[python-escript] 01/03: Upstream 5.1 - with modified /debian

Joel Fenwick jfenwick-guest at moszumanska.debian.org
Thu Nov 30 01:07:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

jfenwick-guest pushed a commit to branch debian
in repository python-escript.

commit dae92b34edb4542639fe6d5cb6d23555ea16950d
Author: Joel Fenwick <joelfenwick at uq.edu.au>
Date:   Mon Nov 27 12:52:58 2017 +1000

    Upstream 5.1 - with modified /debian
---
 SConstruct                                         |    58 +-
 cusplibrary/SConscript                             |     2 +-
 cusplibrary/build/build-env.py                     |     2 +-
 cusplibrary/build/nvcc.py                          |     2 +-
 cusplibrary/performance/spmv/scripts/benchmark.py  |     2 +-
 cusplibrary/testing/data/random_10x10/generator.py |     2 +-
 debian/changelog                                   |     7 +
 debian/control                                     |     4 +-
 debian/copyright                                   |    13 -
 debian/patches/fixopenmpiconf                      |     1 +
 debian/patches/nodatedoxygen                       |    12 -
 debian/patches/rootintar                           |     1 +
 debian/patches/series                              |    10 +-
 debian/utils/cppy.py                               |     2 +-
 doc/SConscript                                     |     2 +-
 doc/completedevs.tex                               |     7 +-
 doc/cookbook/SConscript                            |     2 +-
 doc/cookbook/cookbook.bib                          |     2 +-
 doc/cookbook/cookbook.tex                          |     7 +-
 doc/cookbook/cookbook_defs.tex                     |     2 +-
 doc/cookbook/einsteinETA.tex                       |     2 +-
 doc/cookbook/escpybas.tex                          |     2 +-
 doc/cookbook/example01.tex                         |     2 +-
 doc/cookbook/example02.tex                         |     2 +-
 doc/cookbook/example03.tex                         |     2 +-
 doc/cookbook/example04.tex                         |     2 +-
 doc/cookbook/example05.tex                         |     2 +-
 doc/cookbook/example07.tex                         |     2 +-
 doc/cookbook/example08.tex                         |     2 +-
 doc/cookbook/example09.tex                         |     2 +-
 doc/cookbook/example10.tex                         |     2 +-
 doc/cookbook/example11.tex                         |     2 +-
 doc/cookbook/intro.tex                             |     2 +-
 doc/cookbook/quickstart.tex                        |     2 +-
 doc/copyrights.tex                                 |     4 +-
 doc/currentdev.tex                                 |     7 +-
 doc/docguide.tex                                   |     2 +-
 doc/doxygen/SConscript                             |     2 +-
 doc/doxygen/doxygen_esys                           |     2 +-
 doc/elist.tex                                      |     2 +-
 doc/epydoc/SConscript                              |     2 +-
 doc/examples/SConscript                            |     2 +-
 doc/examples/cookbook/cblib.py                     |     4 +-
 doc/examples/cookbook/cblib1.py                    |     4 +-
 doc/examples/cookbook/cerjen.py                    |     2 +-
 doc/examples/cookbook/example01a.py                |     4 +-
 doc/examples/cookbook/example01b.py                |     4 +-
 doc/examples/cookbook/example01c.py                |     4 +-
 doc/examples/cookbook/example02.py                 |     4 +-
 doc/examples/cookbook/example03a.py                |     4 +-
 doc/examples/cookbook/example03b.py                |     4 +-
 doc/examples/cookbook/example04a.py                |     4 +-
 doc/examples/cookbook/example04b.py                |     4 +-
 doc/examples/cookbook/example05a.py                |     4 +-
 doc/examples/cookbook/example05b.py                |     4 +-
 doc/examples/cookbook/example05c.py                |     4 +-
 doc/examples/cookbook/example06.py                 |     4 +-
 doc/examples/cookbook/example07a.py                |     4 +-
 doc/examples/cookbook/example07b.py                |     4 +-
 doc/examples/cookbook/example08a.py                |     4 +-
 doc/examples/cookbook/example08b.py                |     4 +-
 doc/examples/cookbook/example08c.py                |     4 +-
 doc/examples/cookbook/example09a.py                |     4 +-
 doc/examples/cookbook/example09b.py                |     4 +-
 doc/examples/cookbook/example09c.py                |     4 +-
 doc/examples/cookbook/example09m.py                |     4 +-
 doc/examples/cookbook/example09n.py                |     4 +-
 doc/examples/cookbook/example10a.py                |     4 +-
 doc/examples/cookbook/example10b.py                |     4 +-
 doc/examples/cookbook/example10c_0.py              |     4 +-
 doc/examples/cookbook/example10c_1.py              |     4 +-
 doc/examples/cookbook/example10d.py                |     4 +-
 doc/examples/cookbook/example10e.py                |     4 +-
 doc/examples/cookbook/example10m.py                |     4 +-
 doc/examples/cookbook/example10p.py                |     4 +-
 doc/examples/cookbook/example11a.py                |     4 +-
 doc/examples/cookbook/example11b.py                |     4 +-
 doc/examples/cookbook/example11c.py                |     4 +-
 doc/examples/cookbook/example11m.py                |     4 +-
 doc/examples/cookbook/wave_stab.py                 |     4 +-
 doc/examples/cookbook/wavesolver2d001.py           |     4 +-
 doc/examples/cookbook/wavesolver2d002.py           |     4 +-
 doc/examples/cookbook/wavesolver2d003.py           |     4 +-
 doc/examples/cookbook/wavesolver2d004.py           |     4 +-
 doc/examples/geotutorial/backward_euler.py         |     4 +-
 doc/examples/geotutorial/forward_euler.py          |     4 +-
 doc/examples/geotutorial/myfirstscript.py          |     4 +-
 doc/examples/geotutorial/steadystate.py            |     4 +-
 doc/examples/geotutorial/steadystate_variablek.py  |     4 +-
 doc/examples/inversion/create_netcdf.py            |     2 +-
 doc/examples/inversion/dc_forward.py               |     2 +-
 doc/examples/inversion/grav_ermapper.py            |     4 +-
 doc/examples/inversion/grav_netcdf.py              |     4 +-
 doc/examples/inversion/gravmag_netcdf.py           |     4 +-
 doc/examples/inversion/gravmag_nodriver.py         |     4 +-
 doc/examples/inversion/gravmag_wgs84_nodriver.py   |     4 +-
 doc/examples/inversion/mag_netcdf.py               |     4 +-
 doc/examples/inversion/mag_wgs84_netcdf.py         |     4 +-
 .../inversion/{mag_netcdf.py => magi_netcdf.py}    |     9 +-
 doc/examples/inversion/plot_ermapper.py            |     2 +-
 doc/examples/inversion/plot_netcdf.py              |     2 +-
 doc/examples/inversion/strong_gravmag_netcdf.py    |     4 +-
 doc/examples/inversion/synthetic_HTI.py            |     2 +-
 doc/examples/inversion/synthetic_TTI.py            |     4 +-
 doc/examples/inversion/synthetic_VTI.py            |     4 +-
 doc/examples/inversion/synthetic_sonic.py          |     4 +-
 doc/examples/inversion/synthetic_sonicHTI.py       |     4 +-
 doc/examples/inversion/test_commemi1.py            |     2 +-
 doc/examples/inversion/test_commemi4.py            |     2 +-
 doc/examples/usersguide/brick.py                   |     4 +-
 doc/examples/usersguide/brick_stl.py               |     4 +-
 doc/examples/usersguide/darcy.py                   |     4 +-
 doc/examples/usersguide/diffusion.py               |     4 +-
 doc/examples/usersguide/dirac.py                   |     4 +-
 doc/examples/usersguide/fluid.py                   |     2 +-
 doc/examples/usersguide/heatedblock.py             |     4 +-
 doc/examples/usersguide/helmholtz.py               |     4 +-
 doc/examples/usersguide/int_save.py                |     4 +-
 doc/examples/usersguide/lame.py                    |     2 +-
 doc/examples/usersguide/lid_driven_cavity.py       |     4 +-
 doc/examples/usersguide/mount.py                   |     4 +-
 doc/examples/usersguide/poisson.py                 |     4 +-
 doc/examples/usersguide/poisson_matplotlib.py      |     4 +-
 doc/examples/usersguide/poisson_vtk.py             |     4 +-
 doc/examples/usersguide/quad.py                    |     4 +-
 doc/examples/usersguide/refine.py                  |     4 +-
 doc/examples/usersguide/slip.py                    |     4 +-
 doc/examples/usersguide/trapezoid.py               |     4 +-
 doc/examples/usersguide/voxet_reader.py            |     2 +-
 doc/examples/usersguide/wave.py                    |     4 +-
 doc/install/SConscript                             |     2 +-
 doc/install/allsrccommon.tex                       |     2 +-
 doc/install/binlinux.tex                           |     2 +-
 doc/install/binmac.tex                             |     2 +-
 doc/install/chcomp.tex                             |     2 +-
 doc/install/compiler.tex                           |     2 +-
 doc/install/cxx11.tex                              |     3 +
 doc/install/debbin.tex                             |     2 +-
 doc/install/install.tex                            |     5 +-
 doc/install/install_defs.tex                       |     2 +-
 doc/install/intro.tex                              |     8 +-
 doc/install/source.tex                             |    59 +-
 doc/install/srcadditional.tex                      |     2 +-
 doc/install/srclinux.tex                           |     2 +-
 doc/install/srcmac.tex                             |     2 +-
 doc/install/trilinos.tex                           |   100 +
 doc/inversion/CookDcRes.tex                        |     2 +-
 doc/inversion/Forward2DMTTEMode.tex                |     2 +-
 doc/inversion/ForwardDCRES.tex                     |     2 +-
 doc/inversion/ForwardGravity.tex                   |     2 +-
 doc/inversion/ForwardMagnetic.tex                  |     2 +-
 doc/inversion/ForwardMagneticIntensity.tex         |   172 +
 doc/inversion/ForwardModels.tex                    |     1 +
 doc/inversion/ForwardSelfMagnetic.tex              |     2 +-
 doc/inversion/Minimization.tex                     |     2 +-
 doc/inversion/SConscript                           |     2 +-
 doc/inversion/defs.tex                             |     2 +-
 doc/inversion/intro.tex                            |     2 +-
 doc/inversion/inversion.tex                        |     4 +-
 doc/sphinx_api/SConscript                          |     2 +-
 doc/sphinx_api/genrst.py                           |     2 +-
 doc/user/Models.tex                                |     2 +-
 doc/user/SConscript                                |     2 +-
 doc/user/TutorialPDE.tex                           |     2 +-
 doc/user/appendix.tex                              |     2 +-
 doc/user/changes.tex                               |    22 +-
 doc/user/darcyflux.tex                             |     2 +-
 doc/user/diffusion.tex                             |     2 +-
 doc/user/dirac.tex                                 |     2 +-
 doc/user/escript.tex                               |     2 +-
 doc/user/execute.tex                               |     2 +-
 doc/user/faultsystem.tex                           |     2 +-
 doc/user/finley.tex                                |     2 +-
 doc/user/finleyelements.tex                        |     2 +-
 doc/user/firststep.tex                             |     2 +-
 doc/user/heatedblock.tex                           |     2 +-
 doc/user/levelset.tex                              |     2 +-
 doc/user/levelsetmodel.tex                         |     2 +-
 doc/user/linearPDE.tex                             |     2 +-
 doc/user/lumping.tex                               |     2 +-
 doc/user/modelframe.tex                            |     2 +-
 doc/user/nonlinearPDE.tex                          |     2 +-
 doc/user/notation.tex                              |     2 +-
 doc/user/ourrefs.tex                               |     2 +-
 doc/user/py3.tex                                   |     4 +-
 doc/user/pycad.tex                                 |     2 +-
 doc/user/ripley.tex                                |     2 +-
 doc/user/slip.tex                                  |     2 +-
 doc/user/speckley.tex                              |     2 +-
 doc/user/stokesflow.tex                            |     2 +-
 doc/user/stokessolver.tex                          |     2 +-
 doc/user/subworlds.tex                             |     2 +-
 doc/user/symbolic.tex                              |     2 +-
 doc/user/user.tex                                  |     3 +-
 doc/user/user_defs.tex                             |     2 +-
 doc/user/wave.tex                                  |     2 +-
 doc/user/weipa.tex                                 |     2 +-
 doc/verinfo.tex                                    |     8 +-
 downunder/py_src/SConscript                        |     2 +-
 downunder/py_src/__init__.py                       |     4 +-
 downunder/py_src/coordinates.py                    |     4 +-
 downunder/py_src/costfunctions.py                  |     4 +-
 downunder/py_src/datasources.py                    |    12 +-
 downunder/py_src/dcresistivityforwardmodeling.py   |     2 +-
 downunder/py_src/domainbuilder.py                  |     4 +-
 downunder/py_src/forwardmodels/__init__.py         |     4 +-
 downunder/py_src/forwardmodels/acoustic.py         |     4 +-
 downunder/py_src/forwardmodels/base.py             |    33 +-
 downunder/py_src/forwardmodels/dcresistivity.py    |     4 +-
 downunder/py_src/forwardmodels/gravity.py          |     4 +-
 downunder/py_src/forwardmodels/magnetic.py         |   141 +-
 .../py_src/forwardmodels/magnetotelluric2d.py      |     4 +-
 downunder/py_src/forwardmodels/pressure.py         |     4 +-
 downunder/py_src/forwardmodels/subsidence.py       |     4 +-
 downunder/py_src/inversioncostfunctions.py         |     4 +-
 downunder/py_src/inversions.py                     |    68 +-
 downunder/py_src/mappings.py                       |     4 +-
 downunder/py_src/minimizers.py                     |     5 +-
 downunder/py_src/regularizations.py                |     4 +-
 downunder/py_src/seismic.py                        |     4 +-
 downunder/py_src/splitinversioncostfunctions.py    |     4 +-
 downunder/py_src/splitminimizers.py                |     2 +-
 downunder/py_src/splitregularizations.py           |     4 +-
 downunder/test/python/SConscript                   |     2 +-
 downunder/test/python/inversion_acoustictest_2d.py |     4 +-
 downunder/test/python/run_comm1.py                 |     4 +-
 downunder/test/python/run_comm4.py                 |     2 +-
 downunder/test/python/run_coordinates.py           |     4 +-
 downunder/test/python/run_datasources.py           |     6 +-
 downunder/test/python/run_dcforward.py             |     2 +-
 downunder/test/python/run_domainbuilder.py         |     4 +-
 downunder/test/python/run_forward.py               |    11 +-
 downunder/test/python/run_gravity.py               |     4 +-
 downunder/test/python/run_inversion_gravmag_2d.py  |     4 +-
 downunder/test/python/run_inversioncostfunction.py |     4 +-
 downunder/test/python/run_magnetic.py              |     4 +-
 downunder/test/python/run_mappings.py              |     4 +-
 downunder/test/python/run_minimizers.py            |     4 +-
 downunder/test/python/run_regularization.py        |     4 +-
 downunder/test/python/run_seismic.py               |     4 +-
 dudley/SConscript                                  |     2 +-
 dudley/benchmarks/dudleybench.py                   |     4 +-
 dudley/benchmarks/runbenchmark.py                  |     4 +-
 dudley/py_src/SConscript                           |     2 +-
 dudley/py_src/__init__.py                          |     4 +-
 dudley/py_src/factorywrappers.py                   |     4 +-
 dudley/py_src/readers.py                           |     4 +-
 dudley/src/Assemble.h                              |    10 +-
 dudley/src/Assemble_AverageElementData.cpp         |    37 +-
 dudley/src/Assemble_CopyElementData.cpp            |    35 +-
 dudley/src/Assemble_CopyNodalData.cpp              |   109 +-
 dudley/src/Assemble_LumpedSystem.cpp               |    19 +-
 dudley/src/Assemble_NodeCoordinates.cpp            |     9 +-
 dudley/src/Assemble_PDE.cpp                        |     2 +-
 dudley/src/Assemble_PDE_Points.cpp                 |     2 +-
 dudley/src/Assemble_PDE_Single_2D.cpp              |     2 +-
 dudley/src/Assemble_PDE_Single_3D.cpp              |     2 +-
 dudley/src/Assemble_PDE_System_2D.cpp              |     2 +-
 dudley/src/Assemble_PDE_System_3D.cpp              |     2 +-
 dudley/src/Assemble_addToSystemMatrix.cpp          |     2 +-
 dudley/src/Assemble_getAssembleParameters.cpp      |     2 +-
 dudley/src/Assemble_getNormal.cpp                  |     8 +-
 dudley/src/Assemble_getSize.cpp                    |     8 +-
 dudley/src/Assemble_gradient.cpp                   |    90 +-
 dudley/src/Assemble_integrate.cpp                  |    31 +-
 dudley/src/Assemble_interpolate.cpp                |    27 +-
 dudley/src/Assemble_jacobians.cpp                  |     2 +-
 dudley/src/DomainFactory.cpp                       |   306 +-
 dudley/src/DomainFactory.h                         |     2 +-
 dudley/src/Dudley.h                                |     2 +-
 dudley/src/DudleyDomain.cpp                        |   450 +-
 dudley/src/DudleyDomain.h                          |    11 +-
 dudley/src/DudleyException.h                       |     2 +-
 dudley/src/DudleyVersion.h                         |     4 +-
 dudley/src/ElementFile.cpp                         |    11 +-
 dudley/src/ElementFile.h                           |     2 +-
 dudley/src/ElementFile_createColoring.cpp          |     2 +-
 dudley/src/ElementFile_distributeByRankOfDOF.cpp   |     2 +-
 dudley/src/ElementFile_jacobians.cpp               |     2 +-
 dudley/src/ElementType.h                           |     2 +-
 dudley/src/IndexList.cpp                           |     2 +-
 dudley/src/IndexList.h                             |     2 +-
 dudley/src/Mesh_distributeByRankOfDOF.cpp          |     2 +-
 dudley/src/Mesh_getPattern.cpp                     |     2 +-
 dudley/src/Mesh_optimizeDOFDistribution.cpp        |     2 +-
 dudley/src/Mesh_optimizeDOFLabeling.cpp            |     2 +-
 dudley/src/Mesh_read.cpp                           |     2 +-
 dudley/src/Mesh_readGmsh.cpp                       |     2 +-
 dudley/src/Mesh_resolveNodeIds.cpp                 |     2 +-
 dudley/src/Mesh_tet4.cpp                           |     2 +-
 dudley/src/Mesh_tri3.cpp                           |     2 +-
 dudley/src/Mesh_write.cpp                          |     2 +-
 dudley/src/NodeFile.cpp                            |    15 +-
 dudley/src/NodeFile.h                              |     2 +-
 dudley/src/NodeFile_createDenseLabelings.cpp       |     2 +-
 dudley/src/NodeFile_createMappings.cpp             |     2 +-
 dudley/src/NodeFile_createTrilinosGraph.cpp        |     2 +-
 dudley/src/NodeFile_gather.cpp                     |     2 +-
 dudley/src/NodeMapping.h                           |     2 +-
 dudley/src/SConscript                              |     2 +-
 dudley/src/ShapeTable.cpp                          |     2 +-
 dudley/src/ShapeTable.h                            |     2 +-
 dudley/src/Util.cpp                                |    16 +-
 dudley/src/Util.h                                  |     7 +-
 dudley/src/dudleycpp.cpp                           |     2 +-
 dudley/src/generateReferenceElementList.py         |     2 +-
 dudley/test/DudleyDomainTestCase.cpp               |     2 +-
 dudley/test/DudleyDomainTestCase.h                 |     2 +-
 dudley/test/SConscript                             |     2 +-
 dudley/test/dudley_UnitTests.cpp                   |     2 +-
 dudley/test/python/FCT_benchmark.py                |     4 +-
 dudley/test/python/FCT_test1.py                    |     4 +-
 dudley/test/python/FCT_test2.py                    |     4 +-
 dudley/test/python/OutTest.py                      |     4 +-
 dudley/test/python/PoissonSolverTest.py            |     4 +-
 dudley/test/python/RT2D.py                         |     4 +-
 dudley/test/python/RecTest.py                      |     4 +-
 dudley/test/python/SConscript                      |     2 +-
 dudley/test/python/axisymm-splitB.py               |     4 +-
 dudley/test/python/blocktest.py                    |     4 +-
 dudley/test/python/brick.py                        |     4 +-
 dudley/test/python/convection.py                   |     4 +-
 dudley/test/python/fixme_run_generators.py         |     4 +-
 dudley/test/python/generate_dumps.py               |     4 +-
 dudley/test/python/generate_meshes.py              |     4 +-
 dudley/test/python/linearElastic.py                |     4 +-
 dudley/test/python/rayleigh_taylor_instabilty.py   |     4 +-
 dudley/test/python/rectangle.py                    |     4 +-
 dudley/test/python/run_escriptOnDudley.py          |     4 +-
 dudley/test/python/run_inputOutput.py              |     4 +-
 dudley/test/python/run_linearPDEsOnDudley1.py      |     4 +-
 dudley/test/python/run_linearPDEsOnDudley2.py      |     4 +-
 dudley/test/python/run_models.py                   |     4 +-
 dudley/test/python/run_nonlinearPDEsOnDudley.py    |     4 +-
 dudley/test/python/run_pasoSolversOnDudley.py      |     4 +-
 dudley/test/python/run_splitworldOnDudley.py       |     4 +-
 dudley/test/python/run_trilinosSolversOnDudley.py  |     4 +-
 dudley/test/python/run_utilOnDudley.py             |     4 +-
 dudley/test/python/seismic_wave.py                 |     4 +-
 dudley/test/python/slip_stress_mesh_old.py         |     4 +-
 dudley/test/python/slip_stress_old.py              |     4 +-
 dudley/test/python/stokes_problems.py              |     4 +-
 dudley/test/python/subduction1.py                  |     4 +-
 dudley/test/python/subduction1_gen.py              |     4 +-
 dudley/test/python/time_chunks.py                  |     4 +-
 dudley/test/python/tp.py                           |     4 +-
 escript/py_src/SConscript                          |     2 +-
 escript/py_src/__init__.py                         |     4 +-
 escript/py_src/datamanager.py                      |     2 +-
 escript/py_src/linearPDEs.py                       |     2 +-
 escript/py_src/modelframe.py                       |     2 +-
 escript/py_src/models.py                           |     2 +-
 escript/py_src/pdetools.py                         |     2 +-
 escript/py_src/splitworld.py                       |     2 +-
 escript/py_src/symbolic.py                         |     2 +-
 escript/py_src/unitsSI.py                          |     2 +-
 escript/py_src/util.py                             |     2 +-
 escriptcore/SConscript                             |     2 +-
 escriptcore/py_src/SConscript                      |     2 +-
 escriptcore/py_src/__init__.py                     |     4 +-
 escriptcore/py_src/benchmark.py                    |     4 +-
 escriptcore/py_src/datamanager.py                  |     4 +-
 escriptcore/py_src/domainCouplers.py               |     4 +-
 escriptcore/py_src/faultsystems.py                 |     4 +-
 escriptcore/py_src/flows.py                        |     4 +-
 escriptcore/py_src/gmshrunner.py                   |     4 +-
 escriptcore/py_src/heat.py                         |     4 +-
 escriptcore/py_src/levelset.py                     |    13 +-
 escriptcore/py_src/linearPDEs.py                   |   104 +-
 escriptcore/py_src/modelframe.py                   |     4 +-
 escriptcore/py_src/models.py                       |     4 +-
 escriptcore/py_src/mountains.py                    |     4 +-
 escriptcore/py_src/nonlinearPDE.py                 |     4 +-
 escriptcore/py_src/pdetools.py                     |    28 +-
 escriptcore/py_src/rheologies.py                   |     4 +-
 escriptcore/py_src/runmodel.py                     |     4 +-
 escriptcore/py_src/splitworld.py                   |     4 +-
 escriptcore/py_src/start.py                        |     4 +-
 escriptcore/py_src/symbolic/__init__.py            |     4 +-
 escriptcore/py_src/symbolic/evaluator.py           |     4 +-
 escriptcore/py_src/symbolic/functions.py           |     4 +-
 escriptcore/py_src/symbolic/pretty.py              |     4 +-
 escriptcore/py_src/symbolic/symbol.py              |     4 +-
 escriptcore/py_src/symbolic/symconstants.py        |     2 +-
 escriptcore/py_src/symbolic/utils.py               |     4 +-
 escriptcore/py_src/testing.py                      |     4 +-
 escriptcore/py_src/unitsSI.py                      |     6 +-
 escriptcore/py_src/utestselect.py                  |     4 +-
 escriptcore/py_src/util.py                         |   100 +-
 escriptcore/src/AbstractContinuousDomain.cpp       |    14 +-
 escriptcore/src/AbstractContinuousDomain.h         |     7 +-
 escriptcore/src/AbstractDomain.cpp                 |     2 +-
 escriptcore/src/AbstractDomain.h                   |     2 +-
 escriptcore/src/AbstractReducer.cpp                |     2 +-
 escriptcore/src/AbstractReducer.h                  |     2 +-
 escriptcore/src/AbstractSystemMatrix.cpp           |     2 +-
 escriptcore/src/AbstractSystemMatrix.h             |     2 +-
 escriptcore/src/AbstractTransportProblem.cpp       |     4 +-
 escriptcore/src/AbstractTransportProblem.h         |     4 +-
 escriptcore/src/ArrayOps.cpp                       |     5 +-
 escriptcore/src/ArrayOps.h                         |    47 +-
 escriptcore/src/Assert.h                           |     2 +-
 escriptcore/src/BinaryDataReadyOps.cpp             |     7 +-
 escriptcore/src/BinaryDataReadyOps.h               |     2 +-
 escriptcore/src/Data.cpp                           |   462 +-
 escriptcore/src/Data.h                             |    36 +-
 escriptcore/src/DataAbstract.cpp                   |     2 +-
 escriptcore/src/DataAbstract.h                     |    12 +-
 escriptcore/src/DataConstant.cpp                   |   192 +-
 escriptcore/src/DataConstant.h                     |    11 +-
 escriptcore/src/DataEmpty.cpp                      |     8 +-
 escriptcore/src/DataEmpty.h                        |    11 +-
 escriptcore/src/DataException.h                    |     2 +-
 escriptcore/src/DataExpanded.cpp                   |   253 +-
 escriptcore/src/DataExpanded.h                     |    11 +-
 escriptcore/src/DataFactory.cpp                    |   354 +-
 escriptcore/src/DataFactory.h                      |    28 +-
 escriptcore/src/DataLazy.cpp                       |  1164 +-
 escriptcore/src/DataLazy.h                         |    68 +-
 escriptcore/src/DataReady.cpp                      |     2 +-
 escriptcore/src/DataReady.h                        |     2 +-
 escriptcore/src/DataTagged.cpp                     |   219 +-
 escriptcore/src/DataTagged.h                       |    14 +-
 escriptcore/src/DataTypes.cpp                      |     2 +-
 escriptcore/src/DataTypes.h                        |     2 +-
 escriptcore/src/DataVector.cpp                     |     2 +-
 escriptcore/src/DataVector.h                       |     2 +-
 escriptcore/src/DataVectorAlt.h                    |    20 +-
 escriptcore/src/DataVectorOps.cpp                  |     2 +-
 escriptcore/src/DataVectorOps.h                    |    51 +-
 escriptcore/src/DataVectorTaipan.cpp               |     2 +-
 escriptcore/src/DataVectorTaipan.h                 |     2 +-
 escriptcore/src/Distribution.h                     |     2 +-
 escriptcore/src/Dodgy.cpp                          |     2 +-
 escriptcore/src/Dodgy.h                            |     2 +-
 escriptcore/src/DomainException.h                  |     2 +-
 escriptcore/src/ES_optype.cpp                      |    45 +-
 escriptcore/src/ES_optype.h                        |    15 +-
 escriptcore/src/EscriptParams.cpp                  |     6 +-
 escriptcore/src/EscriptParams.h                    |     2 +-
 escriptcore/src/EsysException.h                    |     2 +-
 escriptcore/src/EsysMPI.cpp                        |     2 +-
 escriptcore/src/EsysMPI.h                          |     2 +-
 escriptcore/src/ExceptionTranslators.cpp           |     2 +-
 escriptcore/src/ExceptionTranslators.h             |     2 +-
 escriptcore/src/FileWriter.h                       |     2 +-
 escriptcore/src/FunctionSpace.cpp                  |     2 +-
 escriptcore/src/FunctionSpace.h                    |     2 +-
 escriptcore/src/FunctionSpaceException.h           |     2 +-
 escriptcore/src/FunctionSpaceFactory.cpp           |     2 +-
 escriptcore/src/FunctionSpaceFactory.h             |     2 +-
 escriptcore/src/IndexList.h                        |     2 +-
 escriptcore/src/LapackInverseHelper.cpp            |     2 +-
 escriptcore/src/LapackInverseHelper.h              |     2 +-
 escriptcore/src/MPIDataReducer.cpp                 |     2 +-
 escriptcore/src/MPIDataReducer.h                   |     2 +-
 escriptcore/src/MPIScalarReducer.cpp               |     2 +-
 escriptcore/src/MPIScalarReducer.h                 |     2 +-
 escriptcore/src/NCHelper.cpp                       |    68 +
 .../DudleyVersion.h => escriptcore/src/NCHelper.h  |    15 +-
 escriptcore/src/NonReducedVariable.cpp             |     2 +-
 escriptcore/src/NonReducedVariable.h               |     2 +-
 escriptcore/src/NullDomain.cpp                     |     2 +-
 escriptcore/src/NullDomain.h                       |     2 +-
 escriptcore/src/Pointers.h                         |     2 +-
 escriptcore/src/Random.cpp                         |     2 +-
 escriptcore/src/Random.h                           |     2 +-
 escriptcore/src/SConscript                         |     4 +-
 escriptcore/src/SolverOptions.cpp                  |     2 +-
 escriptcore/src/SolverOptions.h                    |     2 +-
 escriptcore/src/SplitWorld.cpp                     |     2 +-
 escriptcore/src/SplitWorld.h                       |     2 +-
 escriptcore/src/SplitWorldException.h              |     2 +-
 escriptcore/src/SubWorld.cpp                       |     2 +-
 escriptcore/src/SubWorld.h                         |     2 +-
 escriptcore/src/SystemMatrixException.h            |     2 +-
 escriptcore/src/Taipan.cpp                         |     2 +-
 escriptcore/src/Taipan.h                           |     2 +-
 escriptcore/src/TestDomain.cpp                     |     2 +-
 escriptcore/src/TestDomain.h                       |     2 +-
 escriptcore/src/TransportProblemException.h        |     2 +-
 escriptcore/src/Utils.cpp                          |    11 +-
 escriptcore/src/Utils.h                            |     2 +-
 escriptcore/src/WrappedArray.cpp                   |     2 +-
 escriptcore/src/WrappedArray.h                     |     2 +-
 escriptcore/src/escriptcpp.cpp                     |     5 +-
 escriptcore/src/index.h                            |     2 +-
 escriptcore/src/pyerr.cpp                          |     2 +-
 escriptcore/src/pyerr.h                            |     2 +-
 escriptcore/src/system_dep.h                       |     2 +-
 escriptcore/test/DataCombinationsTestCase.cpp      |     2 +-
 escriptcore/test/DataConstantTestCase.cpp          |     2 +-
 escriptcore/test/DataConstantTestCase.h            |     2 +-
 escriptcore/test/DataEmptyTestCase.cpp             |     2 +-
 escriptcore/test/DataEmptyTestCase.h               |     2 +-
 escriptcore/test/DataExpandedTestCase.cpp          |     2 +-
 escriptcore/test/DataExpandedTestCase.h            |     2 +-
 escriptcore/test/DataFactoryTestCase.cpp           |     2 +-
 escriptcore/test/DataFactoryTestCase.h             |     2 +-
 escriptcore/test/DataLazyTestCase.cpp              |     6 +-
 escriptcore/test/DataLazyTestCase.h                |     2 +-
 escriptcore/test/DataMathsTestCase.cpp             |     2 +-
 escriptcore/test/DataMathsTestCase.h               |     2 +-
 escriptcore/test/DataTaggedTestCase.cpp            |     2 +-
 escriptcore/test/DataTaggedTestCase.h              |     2 +-
 escriptcore/test/DataTestCase.cpp                  |    79 +-
 escriptcore/test/DataTestCase.h                    |     2 +-
 escriptcore/test/DataTypesTestCase.cpp             |     2 +-
 escriptcore/test/DataTypesTestCase.h               |     2 +-
 escriptcore/test/DataVectorTestCase.cpp            |     2 +-
 escriptcore/test/DataVectorTestCase.h              |     2 +-
 escriptcore/test/EsysExceptionTestCase.cpp         |     2 +-
 escriptcore/test/EsysExceptionTestCase.h           |     2 +-
 escriptcore/test/FileWriterTestCase.cpp            |     2 +-
 escriptcore/test/FileWriterTestCase.h              |     2 +-
 escriptcore/test/FunctionSpaceTestCase.cpp         |     2 +-
 escriptcore/test/FunctionSpaceTestCase.h           |     2 +-
 escriptcore/test/SConscript                        |     2 +-
 escriptcore/test/SharedDataTestCase.cpp            |     6 +-
 escriptcore/test/SharedDataTestCase.h              |     2 +-
 escriptcore/test/TaipanTestCase.cpp                |     2 +-
 escriptcore/test/TaipanTestCase.h                  |     2 +-
 escriptcore/test/escript_UnitTest.cpp              |     2 +-
 escriptcore/test/multi_arrayTestCase.cpp           |     2 +-
 escriptcore/test/multi_arrayTestCase.h             |     2 +-
 escriptcore/test/python/SConscript                 |     2 +-
 escriptcore/test/python/run_data_access.py         |     4 +-
 escriptcore/test/python/run_symbolic.py            |     7 +-
 escriptcore/test/python/run_testdomain.py          |    11 +-
 escriptcore/test/python/run_units.py               |     4 +-
 escriptcore/test/python/run_xml.py                 |     4 +-
 escriptcore/test/python/test_assemblage.py         |     4 +-
 escriptcore/test/python/test_assemblage_2Do1.py    | 17890 -----
 escriptcore/test/python/test_assemblage_2Do2.py    | 18022 -----
 escriptcore/test/python/test_assemblage_3Do1.py    | 34177 ---------
 escriptcore/test/python/test_assemblage_3Do2.py    |     4 +-
 escriptcore/test/python/test_condEval.py           |     4 +-
 escriptcore/test/python/test_linearPDEs.py         |     4 +-
 escriptcore/test/python/test_modulefns.py          |     4 +-
 escriptcore/test/python/test_nonLinearPDE.py       |     4 +-
 escriptcore/test/python/test_objects.py            |     4 +-
 escriptcore/test/python/test_pdetools.py           |     4 +-
 escriptcore/test/python/test_shared.py             |     4 +-
 escriptcore/test/python/test_simplesolve.py        |     4 +-
 escriptcore/test/python/test_splitworld.py         |     4 +-
 escriptcore/test/python/test_symfuncs.py           |     4 +-
 escriptcore/test/python/test_util.py               |    53 +-
 escriptcore/test/python/test_util_NaN_funcs.py     |     2 +-
 escriptcore/test/python/test_util_base.py          |  1988 +-
 ...tagged_data.py => test_util_binary_leftover.py} | 74326 ++++++++++---------
 escriptcore/test/python/test_util_binary_new.py    |   245 +
 .../test/python/test_util_binary_no_tagged_data.py |     4 +-
 .../python/test_util_binary_with_tagged_data.py    |     4 +-
 escriptcore/test/python/test_util_grad.py          | 18964 +++++
 escriptcore/test/python/test_util_integrals.py     | 49150 ++++++++++++
 escriptcore/test/python/test_util_interpolation.py | 50162 +++++++++++++
 .../test_util_overloaded_binary_no_tagged_data.py  |     4 +-
 ...test_util_overloaded_binary_with_tagged_data.py |     4 +-
 escriptcore/test/python/test_util_reduction_new.py |   154 +
 .../python/test_util_reduction_no_tagged_data.py   |   760 -
 .../python/test_util_reduction_with_tagged_data.py |   358 -
 .../python/test_util_slicing_no_tagged_data.py     |     4 +-
 .../python/test_util_slicing_with_tagged_data.py   |     4 +-
 .../test/python/test_util_spatial_functions1.py    | 42338 +----------
 .../test/python/test_util_spatial_functions2.py    | 38768 +---------
 .../test/python/test_util_spatial_functions3.py    | 10015 +--
 escriptcore/test/python/test_util_unary_new.py     |   519 +
 .../test/python/test_util_unary_no_tagged_data.py  |     4 +-
 .../python/test_util_unary_with_tagged_data.py     |     4 +-
 finley/SConscript                                  |     2 +-
 finley/benchmarks/finleybench.py                   |     4 +-
 finley/benchmarks/runbenchmark.py                  |     4 +-
 finley/py_src/SConscript                           |     2 +-
 finley/py_src/__init__.py                          |     4 +-
 finley/py_src/factorywrappers.py                   |     4 +-
 finley/py_src/readers.py                           |     4 +-
 finley/src/Assemble.h                              |    10 +-
 finley/src/Assemble_AverageElementData.cpp         |    72 +-
 finley/src/Assemble_CopyElementData.cpp            |    73 +-
 finley/src/Assemble_CopyNodalData.cpp              |   244 +-
 finley/src/Assemble_LumpedSystem.cpp               |     2 +-
 finley/src/Assemble_NodeCoordinates.cpp            |     2 +-
 finley/src/Assemble_PDE.cpp                        |     2 +-
 finley/src/Assemble_PDE_Points.cpp                 |     2 +-
 finley/src/Assemble_PDE_Single_1D.cpp              |     2 +-
 finley/src/Assemble_PDE_Single_2D.cpp              |     2 +-
 finley/src/Assemble_PDE_Single_3D.cpp              |     2 +-
 finley/src/Assemble_PDE_Single_C.cpp               |     2 +-
 finley/src/Assemble_PDE_System_1D.cpp              |     2 +-
 finley/src/Assemble_PDE_System_2D.cpp              |     2 +-
 finley/src/Assemble_PDE_System_3D.cpp              |     2 +-
 finley/src/Assemble_PDE_System_C.cpp               |     2 +-
 finley/src/Assemble_addToSystemMatrix.cpp          |     2 +-
 finley/src/Assemble_getAssembleParameters.cpp      |     2 +-
 finley/src/Assemble_getNormal.cpp                  |     2 +-
 finley/src/Assemble_getSize.cpp                    |     2 +-
 finley/src/Assemble_gradient.cpp                   |   280 +-
 finley/src/Assemble_integrate.cpp                  |    22 +-
 finley/src/Assemble_interpolate.cpp                |    24 +-
 finley/src/Assemble_jacobians.cpp                  |     2 +-
 finley/src/DomainFactory.cpp                       |   434 +-
 finley/src/DomainFactory.h                         |     2 +-
 finley/src/ElementFile.cpp                         |     2 +-
 finley/src/ElementFile.h                           |     2 +-
 finley/src/ElementFile_jacobians.cpp               |     2 +-
 finley/src/Finley.h                                |     2 +-
 finley/src/FinleyDomain.cpp                        |   619 +-
 finley/src/FinleyDomain.h                          |    11 +-
 finley/src/FinleyException.h                       |     2 +-
 finley/src/FinleyVersion.h                         |     4 +-
 finley/src/IndexList.cpp                           |     2 +-
 finley/src/IndexList.h                             |     2 +-
 finley/src/Mesh_addPoints.cpp                      |     2 +-
 finley/src/Mesh_findMatchingFaces.cpp              |     2 +-
 finley/src/Mesh_getPasoPattern.cpp                 |     2 +-
 finley/src/Mesh_getTrilinosGraph.cpp               |     2 +-
 finley/src/Mesh_glueFaces.cpp                      |     2 +-
 finley/src/Mesh_hex20.cpp                          |     2 +-
 finley/src/Mesh_hex8.cpp                           |     2 +-
 finley/src/Mesh_joinFaces.cpp                      |     2 +-
 finley/src/Mesh_merge.cpp                          |     2 +-
 finley/src/Mesh_optimizeDOFDistribution.cpp        |     2 +-
 finley/src/Mesh_read.cpp                           |     2 +-
 finley/src/Mesh_readGmsh.cpp                       |     2 +-
 finley/src/Mesh_rec4.cpp                           |     2 +-
 finley/src/Mesh_rec8.cpp                           |     2 +-
 finley/src/Mesh_write.cpp                          |     2 +-
 finley/src/NodeFile.cpp                            |     2 +-
 finley/src/NodeFile.h                              |     2 +-
 finley/src/NodeMapping.h                           |     2 +-
 finley/src/Quadrature.cpp                          |     2 +-
 finley/src/Quadrature.h                            |     2 +-
 finley/src/ReferenceElementSets.h                  |     2 +-
 finley/src/ReferenceElements.cpp                   |     2 +-
 finley/src/ReferenceElements.h                     |     2 +-
 finley/src/SConscript                              |     2 +-
 finley/src/ShapeFunctions.cpp                      |     2 +-
 finley/src/ShapeFunctions.h                        |     2 +-
 finley/src/Util.cpp                                |    20 +-
 finley/src/Util.h                                  |     7 +-
 finley/src/finleycpp.cpp                           |     2 +-
 finley/src/generateReferenceElementList.py         |     2 +-
 finley/test/FinleyDomainTestCase.cpp               |     2 +-
 finley/test/FinleyDomainTestCase.h                 |     2 +-
 finley/test/SConscript                             |     2 +-
 finley/test/finley_UnitTests.cpp                   |     2 +-
 finley/test/python/FCT_benchmark.py                |     4 +-
 finley/test/python/FCT_test0.py                    |     4 +-
 finley/test/python/FCT_test1.py                    |     4 +-
 finley/test/python/FCT_test2.py                    |     4 +-
 finley/test/python/OutTest.py                      |     4 +-
 finley/test/python/PoissonSolverTest.py            |     4 +-
 finley/test/python/RT2D.py                         |     2 +-
 finley/test/python/RecTest.py                      |     4 +-
 finley/test/python/SConscript                      |     2 +-
 finley/test/python/axisymm-splitB.py               |     4 +-
 finley/test/python/blocktest.py                    |     4 +-
 finley/test/python/brick.py                        |     4 +-
 finley/test/python/coalgas.py                      |     4 +-
 finley/test/python/convection.py                   |     4 +-
 finley/test/python/damage.py                       |     4 +-
 finley/test/python/generate_dumps.py               |     4 +-
 finley/test/python/generate_meshes.py              |     4 +-
 finley/test/python/linearElastic.py                |     4 +-
 finley/test/python/localization.py                 |     4 +-
 finley/test/python/lumping_advection_test.py       |     4 +-
 finley/test/python/lumping_wave_test.py            |     4 +-
 finley/test/python/rayleigh_taylor_instabilty.py   |     4 +-
 finley/test/python/rectangle.py                    |     4 +-
 finley/test/python/run_amg.py                      |     4 +-
 finley/test/python/run_darcy.py                    |     4 +-
 finley/test/python/run_escriptOnFinley.py          |     4 +-
 finley/test/python/run_generators.py               |     4 +-
 finley/test/python/run_inputOutput.py              |     4 +-
 finley/test/python/run_linearPDEsOnFinley1_2D1.py  |     4 +-
 finley/test/python/run_linearPDEsOnFinley1_2D2.py  |     4 +-
 finley/test/python/run_linearPDEsOnFinley1_3D1.py  |     4 +-
 .../python/run_linearPDEsOnFinley1_3D2_part1.py    |     4 +-
 .../python/run_linearPDEsOnFinley1_3D2_part2.py    |     4 +-
 .../python/run_linearPDEsOnFinley1_3D2_part3-2.py  |    48 -
 .../python/run_linearPDEsOnFinley1_3D2_part3-3.py  |    48 -
 .../python/run_linearPDEsOnFinley1_3D2_part3-4.py  |    48 -
 ...3-1.py => run_linearPDEsOnFinley1_3D2_part3.py} |     8 +-
 finley/test/python/run_linearPDEsOnFinley2.py      |     4 +-
 finley/test/python/run_linearPDEsOnFinley3.py      |     4 +-
 finley/test/python/run_linearPDEsOnFinleyMacro.py  |     4 +-
 finley/test/python/run_models.py                   |     4 +-
 finley/test/python/run_nonlinearPDEsOnFinley.py    |     4 +-
 finley/test/python/run_pasoSolversOnFinley.py      |     4 +-
 finley/test/python/run_splitworldOnFinley.py       |     4 +-
 finley/test/python/run_trilinosSolversOnFinley.py  |     4 +-
 finley/test/python/run_utilOnFinley.py             |     4 +-
 finley/test/python/runcoalgas.py                   |     4 +-
 finley/test/python/seismic_wave.py                 |     4 +-
 finley/test/python/slip_stress_mesh_old.py         |     4 +-
 finley/test/python/slip_stress_old.py              |     4 +-
 finley/test/python/stokes_problems.py              |     4 +-
 finley/test/python/subduction1.py                  |     4 +-
 finley/test/python/subduction1_gen.py              |     4 +-
 finley/test/python/time_chunks.py                  |     4 +-
 finley/test/python/tp.py                           |     4 +-
 {debian => localdebian}/changelog                  |    55 +-
 localdebian/changelog.trivial                      |     1 +
 localdebian/compat                                 |     1 +
 {debian => localdebian}/control                    |     9 +-
 {debian => localdebian}/copyright                  |    97 +-
 localdebian/patches/dateless-gz                    |    23 +
 localdebian/patches/doxygenfix                     |    19 +
 localdebian/patches/grammar-errors                 |    36 +
 localdebian/patches/mpi-gaol                       |    33 +
 localdebian/patches/release-sanity                 |    69 +
 localdebian/patches/relocating-debian-dir          |    24 +
 localdebian/patches/series                         |     6 +
 localdebian/python-escript-doc.doc-base.1          |     8 +
 localdebian/python-escript-doc.doc-base.2          |    12 +
 localdebian/python-escript-doc.doc-base.3          |    10 +
 localdebian/python-escript-doc.doc-base.4          |    10 +
 localdebian/python-escript-doc.doc-base.5          |    10 +
 localdebian/python-escript-doc.doc-base.6          |     9 +
 localdebian/python-escript-doc.examples            |     1 +
 localdebian/python-escript-doc.install             |     9 +
 localdebian/python-escript-doc.links               |    19 +
 localdebian/python-escript-doc.lintian-overrides   |     3 +
 localdebian/python-escript-mpi.install             |     5 +
 localdebian/python-escript-mpi.lintian-overrides   |    10 +
 localdebian/python-escript-mpi.manpages            |     1 +
 localdebian/python-escript-mpi.postinst            |    21 +
 localdebian/python-escript-mpi.prerm               |    20 +
 localdebian/python-escript.install                 |     4 +
 localdebian/python-escript.lintian-overrides       |    12 +
 localdebian/python-escript.manpages                |     1 +
 localdebian/python-escript.postinst                |    21 +
 localdebian/python-escript.prerm                   |    20 +
 localdebian/python3-escript-mpi.install            |     5 +
 localdebian/python3-escript-mpi.lintian-overrides  |     9 +
 localdebian/python3-escript-mpi.manpages           |     1 +
 localdebian/python3-escript-mpi.postinst           |    21 +
 localdebian/python3-escript-mpi.prerm              |    20 +
 localdebian/python3-escript.install                |     4 +
 localdebian/python3-escript.lintian-overrides      |     8 +
 localdebian/python3-escript.manpages               |     1 +
 localdebian/python3-escript.postinst               |    21 +
 localdebian/python3-escript.prerm                  |    20 +
 localdebian/rules                                  |   130 +
 localdebian/source/format                          |     1 +
 {debian => localdebian}/utils/cppy.py              |     2 +-
 localdebian/utils/tweak.sh                         |    37 +
 localdebian/watch                                  |     2 +
 modellib/py_src/SConscript                         |     2 +-
 modellib/py_src/__init__.py                        |     2 +-
 modellib/py_src/flow.py                            |     4 +-
 modellib/py_src/geometry.py                        |     4 +-
 modellib/py_src/input.py                           |     4 +-
 modellib/py_src/materials.py                       |     4 +-
 modellib/py_src/mechanics.py                       |     4 +-
 modellib/py_src/probe.py                           |     4 +-
 modellib/py_src/temperature.py                     |     4 +-
 modellib/py_src/visualization.py                   |     4 +-
 modellib/test/python/SConscript                    |     2 +-
 modellib/test/python/drucker_prager.py             |     4 +-
 modellib/test/python/run_convection.py             |     4 +-
 modellib/test/python/run_domainreaders.py          |     4 +-
 modellib/test/python/run_flow.py                   |     4 +-
 modellib/test/python/run_temp.py                   |     4 +-
 paso/SConscript                                    |     2 +-
 paso/src/AMG.cpp                                   |     8 +-
 paso/src/AMG_Interpolation.cpp                     |     6 +-
 paso/src/AMG_Prolongation.cpp                      |     2 +-
 paso/src/AMG_Restriction.cpp                       |     2 +-
 paso/src/AMG_Root.cpp                              |     2 +-
 paso/src/BOOMERAMG.cpp                             |     2 +-
 paso/src/BOOMERAMG.h                               |     2 +-
 paso/src/BiCGStab.cpp                              |     2 +-
 paso/src/BlockOps.h                                |     2 +-
 paso/src/Coupler.cpp                               |    52 +-
 paso/src/Coupler.h                                 |    30 +-
 paso/src/FCT_Solver.cpp                            |    10 +-
 paso/src/FCT_Solver.h                              |     8 +-
 paso/src/FluxLimiter.cpp                           |     6 +-
 paso/src/FluxLimiter.h                             |     6 +-
 paso/src/Functions.cpp                             |     2 +-
 paso/src/Functions.h                               |     2 +-
 paso/src/GMRES.cpp                                 |     2 +-
 paso/src/GMRES2.cpp                                |     2 +-
 paso/src/ILU.cpp                                   |     2 +-
 paso/src/LocalAMG.cpp                              |     2 +-
 paso/src/LocalAMG_Prolongation.cpp                 |     2 +-
 paso/src/MINRES.cpp                                |     2 +-
 paso/src/MKL.cpp                                   |     2 +-
 paso/src/MKL.h                                     |     2 +-
 paso/src/MergedSolver.cpp                          |     2 +-
 paso/src/MergedSolver.h                            |     2 +-
 paso/src/NewtonGMRES.cpp                           |     2 +-
 paso/src/Options.cpp                               |     2 +-
 paso/src/Options.h                                 |     2 +-
 paso/src/PCG.cpp                                   |     2 +-
 paso/src/Paso.h                                    |     3 +-
 paso/src/PasoException.h                           |     2 +-
 paso/src/PasoUtil.cpp                              |     2 +-
 paso/src/PasoUtil.h                                |     2 +-
 paso/src/Pattern.cpp                               |     2 +-
 paso/src/Pattern.h                                 |     2 +-
 paso/src/Pattern_mis.cpp                           |     2 +-
 paso/src/Pattern_reduceBandwidth.cpp               |     2 +-
 paso/src/Preconditioner.cpp                        |     2 +-
 paso/src/Preconditioner.h                          |     2 +-
 paso/src/RILU.cpp                                  |     2 +-
 paso/src/ReactiveSolver.cpp                        |     2 +-
 paso/src/ReactiveSolver.h                          |     2 +-
 paso/src/SConscript                                |     2 +-
 paso/src/SchurComplement.cpp                       |     2 +-
 paso/src/SharedComponents.h                        |     2 +-
 paso/src/Smoother.cpp                              |     2 +-
 paso/src/Solver.cpp                                |     2 +-
 paso/src/Solver.h                                  |     2 +-
 paso/src/Solver_Function.cpp                       |     2 +-
 paso/src/SparseMatrix.cpp                          |     2 +-
 paso/src/SparseMatrix.h                            |     2 +-
 paso/src/SparseMatrix_MatrixMatrix.cpp             |     2 +-
 paso/src/SparseMatrix_MatrixMatrixTranspose.cpp    |     2 +-
 paso/src/SparseMatrix_MatrixVector.cpp             |     2 +-
 paso/src/SparseMatrix_getSubmatrix.cpp             |     2 +-
 paso/src/SparseMatrix_nullifyRowsAndCols.cpp       |     2 +-
 paso/src/SparseMatrix_saveHB.cpp                   |     2 +-
 paso/src/SystemMatrix.cpp                          |    30 +-
 paso/src/SystemMatrix.h                            |     6 +-
 paso/src/SystemMatrixPattern.cpp                   |     2 +-
 paso/src/SystemMatrixPattern.h                     |     2 +-
 paso/src/SystemMatrixPattern_unrollBlocks.cpp      |     2 +-
 paso/src/SystemMatrix_MatrixVector.cpp             |     2 +-
 paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp    |     6 +-
 paso/src/SystemMatrix_debug.cpp                    |     6 +-
 paso/src/SystemMatrix_extendedRows.cpp             |     8 +-
 paso/src/SystemMatrix_loadMM.cpp                   |     2 +-
 paso/src/SystemMatrix_mergeMainAndCouple.cpp       |    10 +-
 paso/src/TFQMR.cpp                                 |     2 +-
 paso/src/Transport.cpp                             |    35 +-
 paso/src/Transport.h                               |     4 +-
 paso/src/Transport_solve.cpp                       |     2 +-
 paso/src/UMFPACK.cpp                               |     2 +-
 paso/src/UMFPACK.h                                 |     2 +-
 paso/src/mmio.cpp                                  |     2 +-
 paso/src/mmio.h                                    |     2 +-
 paso/src/performance.cpp                           |     2 +-
 paso/src/performance.h                             |     2 +-
 paso/src/solve.cpp                                 |     2 +-
 pycad/py_src/SConscript                            |     2 +-
 pycad/py_src/Triangle.py                           |     4 +-
 pycad/py_src/__init__.py                           |     4 +-
 pycad/py_src/design.py                             |     4 +-
 pycad/py_src/extras.py                             |     4 +-
 pycad/py_src/gmsh.py                               |     4 +-
 pycad/py_src/primitives.py                         |     4 +-
 pycad/py_src/shapes.py                             |     4 +-
 pycad/py_src/transformations.py                    |     4 +-
 pycad/test/python/SConscript                       |     2 +-
 pycad/test/python/run_pycad_test.py                |     4 +-
 pythonMPI/src/SConscript                           |     2 +-
 pythonMPI/src/ScriptMPI.cpp                        |     2 +-
 pythonMPI/src/ScriptMPIredirect.cpp                |     2 +-
 ripley/SConscript                                  |     2 +-
 ripley/generators/lamebuilder.py                   |     2 +-
 ripley/generators/lamesource.py                    |     2 +-
 ripley/py_src/MultiResolutionDomain.py             |     2 +-
 ripley/py_src/SConscript                           |     2 +-
 ripley/py_src/__init__.py                          |     4 +-
 ripley/src/AbstractAssembler.h                     |     2 +-
 ripley/src/Brick.cpp                               |  1099 +-
 ripley/src/Brick.h                                 |    21 +-
 ripley/src/DefaultAssembler2D.cpp                  |     2 +-
 ripley/src/DefaultAssembler2D.h                    |     2 +-
 ripley/src/DefaultAssembler3D.cpp                  |     2 +-
 ripley/src/DefaultAssembler3D.h                    |     2 +-
 ripley/src/LameAssembler2D.cpp                     |     2 +-
 ripley/src/LameAssembler2D.h                       |     2 +-
 ripley/src/LameAssembler3D.cpp                     |     2 +-
 ripley/src/LameAssembler3D.h                       |     2 +-
 ripley/src/MultiBrick.cpp                          |   322 +-
 ripley/src/MultiBrick.h                            |    19 +-
 ripley/src/MultiRectangle.cpp                      |   198 +-
 ripley/src/MultiRectangle.h                        |    20 +-
 ripley/src/Rectangle.cpp                           |   677 +-
 ripley/src/Rectangle.h                             |    24 +-
 ripley/src/Ripley.h                                |     2 +-
 ripley/src/RipleyDomain.cpp                        |   177 +-
 ripley/src/RipleyDomain.h                          |    20 +-
 ripley/src/RipleyException.h                       |     2 +-
 ripley/src/RipleySystemMatrix.cu                   |     2 +-
 ripley/src/RipleySystemMatrix.h                    |     2 +-
 ripley/src/SConscript                              |     2 +-
 ripley/src/WaveAssembler2D.cpp                     |     2 +-
 ripley/src/WaveAssembler2D.h                       |     2 +-
 ripley/src/WaveAssembler3D.cpp                     |     2 +-
 ripley/src/WaveAssembler3D.h                       |     2 +-
 ripley/src/blocktools.cpp                          |     2 +-
 ripley/src/blocktools.h                            |     2 +-
 ripley/src/blocktools2.cpp                         |     2 +-
 ripley/src/domainhelpers.cpp                       |     2 +-
 ripley/src/domainhelpers.h                         |     2 +-
 ripley/src/generate_assamblage.py                  |     2 +-
 ripley/src/generate_assemblage_cpp.py              |     2 +-
 ripley/src/ripleycpp.cpp                           |     2 +-
 ripley/src/system_dep.h                            |     2 +-
 ripley/test/SConscript                             |     2 +-
 ripley/test/SystemMatrixTestCase.cpp               |     2 +-
 ripley/test/SystemMatrixTestCase.h                 |     2 +-
 ripley/test/python/SConscript                      |     2 +-
 .../test/python/run_customAssemblersOnMultiRes.py  |     4 +-
 ripley/test/python/run_customAssemblersOnRipley.py |     4 +-
 ripley/test/python/run_diracOnMultiRes.py          |     4 +-
 ripley/test/python/run_diracOnRipley.py            |     4 +-
 ripley/test/python/run_escriptOnMultiResolution.py |     4 +-
 ripley/test/python/run_escriptOnRipley.py          |     4 +-
 ripley/test/python/run_linearPDEsOnMultiRes.py     |     4 +-
 ripley/test/python/run_linearPDEsOnRipley.py       |     4 +-
 ripley/test/python/run_nonlinearPDEOnMultiRes.py   |     4 +-
 ripley/test/python/run_nonlinearPDEOnRipley.py     |     4 +-
 ripley/test/python/run_pasoSolversOnMultiRes.py    |     4 +-
 ripley/test/python/run_pasoSolversOnRipley.py      |     4 +-
 ripley/test/python/run_readWriteOnMultiRes.py      |     4 +-
 ripley/test/python/run_readWriteOnRipley.py        |     4 +-
 ripley/test/python/run_splitworldOnRipley.py       |     4 +-
 .../test/python/run_trilinosSolversOnMultiRes.py   |     4 +-
 ripley/test/python/run_trilinosSolversOnRipley.py  |     4 +-
 ripley/test/python/run_utilOnMultiRes.py           |     4 +-
 ripley/test/python/run_utilOnRipley.py             |     4 +-
 ripley/test/ripley_UnitTest.cpp                    |     2 +-
 run-escript.in                                     |     6 +-
 ...wheezy_py3_mpi_options.py => badger_options.py} |    21 +-
 ...jessie_mpi_options.py => badger_py3_options.py} |     8 +-
 .../windows_options.py => cgisrv3_options.py}      |    70 +-
 ...indows_intelc_options.py => cgisrv6_options.py} |    79 +-
 .../sid_py3_options.py => copper_options.py}       |    22 +-
 .../datamanager.py => scons/ferret_options.py      |    18 +-
 ...freebsd10_0_options.py => guineapig_options.py} |    25 +-
 .../pdetools.py => scons/guineapig_py2_options.py  |     9 +-
 ...windows_intelc_options.py => magnus_options.py} |   147 +-
 scons/mara_options.py                              |    45 +
 .../sid_py3_options.py => mole_options.py}         |    14 +-
 .../jessie_mpi_options.py => newton_options.py}    |     7 +-
 ...windows_intelc_options.py => raijin_options.py} |   118 +-
 .../sid_py3_options.py => sage_options.py}         |    16 +-
 .../jessie_mpi_options.py => sage_py3_options.py}  |     8 +-
 .../savanna_ice_noomp_options.py                   |     9 +-
 ...d_py3_mpi_options.py => savanna_ice_options.py} |    11 +-
 .../pdetools.py => scons/savanna_noomp_options.py  |     9 +-
 scons/savanna_options.py                           |    86 +
 .../jessie_mpi_options.py => squirrel_options.py}  |    13 +-
 ...ows_intelc_options.py => standalone_options.py} |   124 +-
 scons/templates/README_FIRST                       |    23 +-
 scons/templates/__init__.py                        |     2 +-
 scons/templates/centos7_0_options.py               |     6 +-
 .../{fedora21_5_options.py => fedora_options.py}   |     2 +-
 scons/templates/freebsd10_0_options.py             |     2 +-
 scons/templates/homebrew_10.10_options.py          |     2 +-
 scons/templates/homebrew_11_options.py             |     4 +-
 scons/templates/homebrew_options.py                |     2 +-
 scons/templates/jessie_mpi_options.py              |     2 +-
 scons/templates/jessie_options.py                  |     2 +-
 scons/templates/jessie_py3_mpi_options.py          |     2 +-
 scons/templates/jessie_py3_options.py              |     2 +-
 scons/templates/macports_10.10_options.py          |     2 +-
 scons/templates/macports_options.py                |     4 +-
 ...opensuse13_2_options.py => opensuse_options.py} |     8 +-
 scons/templates/sid_options.py                     |     6 +-
 scons/templates/sid_py3_mpi_options.py             |     2 +-
 scons/templates/sid_py3_options.py                 |     2 +-
 scons/templates/trusty_options.py                  |     2 +-
 scons/templates/utopic_options.py                  |     2 +-
 scons/templates/wheezy_mpi_options.py              |     2 +-
 scons/templates/wheezy_options.py                  |     2 +-
 scons/templates/wheezy_py3_mpi_options.py          |     2 +-
 scons/templates/wheezy_py3_options.py              |     2 +-
 scons/templates/windows_intelc_options.py          |     2 +-
 scons/templates/windows_msvc90_options.py          |     2 +-
 scons/templates/windows_options.py                 |     2 +-
 ...zy_py3_mpi_options.py => xenial_mpi_options.py} |     6 +-
 .../{trusty_options.py => xenial_options.py}       |     3 +-
 ...zy_mpi_options.py => xenial_py3_mpi_options.py} |     6 +-
 ...jessie_py3_options.py => xenial_py3_options.py} |     6 +-
 ...y_py3_mpi_options.py => yakkety_mpi_options.py} |     6 +-
 .../{trusty_options.py => yakkety_options.py}      |     3 +-
 ...y_mpi_options.py => yakkety_py3_mpi_options.py} |     6 +-
 ...essie_py3_options.py => yakkety_py3_options.py} |     6 +-
 ...pensuse13_2_options.py => zesty_mpi_options.py} |     9 +-
 .../{trusty_options.py => zesty_options.py}        |     3 +-
 ...ezy_mpi_options.py => zesty_py3_mpi_options.py} |     6 +-
 ...{jessie_py3_options.py => zesty_py3_options.py} |     6 +-
 scons/tinaroo_options.py                           |    60 +
 .../windows_intelc_options.py => vayu_options.py}  |   116 +-
 .../windows_intelc_options.py => vmw_options.py}   |    65 +-
 scripts/makesrc.sh                                 |     2 +-
 scripts/py_comp.py                                 |     2 +-
 site_scons/dependencies.py                         |   117 +-
 site_scons/extractdebbuild.py                      |     4 +-
 site_scons/grouptest.py                            |     4 +-
 site_scons/site_init.py                            |    14 +-
 site_scons/site_tools/nvcc.py                      |     2 +-
 speckley/SConscript                                |     2 +-
 speckley/py_src/SConscript                         |     2 +-
 speckley/py_src/__init__.py                        |     4 +-
 speckley/src/AbstractAssembler.cpp                 |     2 +-
 speckley/src/AbstractAssembler.h                   |     2 +-
 speckley/src/Brick.cpp                             |   321 +-
 speckley/src/Brick.h                               |    63 +-
 speckley/src/BrickGradients.cpp                    |   349 +-
 speckley/src/BrickIntegrals.cpp                    |   132 +-
 speckley/src/BrickReductions.cpp                   |   115 +-
 speckley/src/CrossDomainCoupler.cpp                |     2 +-
 speckley/src/CrossDomainCoupler.h                  |     2 +-
 speckley/src/DefaultAssembler2D.cpp                |     2 +-
 speckley/src/DefaultAssembler2D.h                  |     2 +-
 speckley/src/DefaultAssembler3D.cpp                |     2 +-
 speckley/src/DefaultAssembler3D.h                  |     2 +-
 speckley/src/Rectangle.cpp                         |   430 +-
 speckley/src/Rectangle.h                           |    74 +-
 speckley/src/RectangleGradients.cpp                |   332 +-
 speckley/src/RectangleIntegrals.cpp                |   133 +-
 speckley/src/RectangleReductions.cpp               |   116 +-
 speckley/src/SConscript                            |     2 +-
 speckley/src/Speckley.h                            |     3 +-
 speckley/src/SpeckleyDomain.cpp                    |    65 +-
 speckley/src/SpeckleyDomain.h                      |    17 +-
 speckley/src/SpeckleyException.h                   |     2 +-
 speckley/src/WaveAssembler2D.cpp                   |     2 +-
 speckley/src/WaveAssembler2D.h                     |     2 +-
 speckley/src/WaveAssembler3D.cpp                   |     2 +-
 speckley/src/WaveAssembler3D.h                     |     2 +-
 speckley/src/domainhelpers.cpp                     |     2 +-
 speckley/src/domainhelpers.h                       |     2 +-
 speckley/src/lagrange_functions.h                  |     2 +-
 speckley/src/speckleycpp.cpp                       |     2 +-
 speckley/src/system_dep.h                          |     2 +-
 speckley/test/SConscript                           |     2 +-
 speckley/test/python/SConscript                    |     2 +-
 speckley/test/python/run_SpeckleyRipleyCoupler.py  |     4 +-
 .../test/python/run_customAssemblersOnSpeckley.py  |     4 +-
 speckley/test/python/run_diracOnSpeckley.py        |     4 +-
 speckley/test/python/run_readWriteOnSpeckley.py    |     4 +-
 speckley/test/python/run_specialOnSpeckley.py      |     4 +-
 svn_version                                        |     2 +-
 tools/escriptconvert/SConscript                    |     2 +-
 tools/escriptconvert/escriptconvert.cpp            |     2 +-
 tools/escriptconvert/esdcreate.cpp                 |     2 +-
 tools/netcdf.cc                                    |   715 +
 tools/overlord/SConscript                          |     2 +-
 tools/overlord/overlord.cpp                        |     2 +-
 tools/testrunner.py                                |     2 +-
 tools/trconfcmp.cc                                 |   167 +
 trilinoswrap/SConscript                            |     2 +-
 trilinoswrap/src/Amesos2Wrapper.cpp                |     4 +
 trilinoswrap/src/CrsMatrixWrapper.cpp              |     2 +-
 trilinoswrap/src/SConscript                        |     2 +-
 trilinoswrap/src/TrilinosAdapterException.h        |     2 +-
 weipa/SConscript                                   |     2 +-
 weipa/py_src/SConscript                            |     2 +-
 weipa/py_src/__init__.py                           |     4 +-
 weipa/src/DataVar.cpp                              |   120 +-
 weipa/src/DataVar.h                                |     4 +-
 weipa/src/DomainChunk.h                            |     2 +-
 weipa/src/ElementData.h                            |     2 +-
 weipa/src/EscriptDataset.cpp                       |     2 +-
 weipa/src/EscriptDataset.h                         |     2 +-
 weipa/src/FinleyDomain.cpp                         |    51 +-
 weipa/src/FinleyDomain.h                           |     2 +-
 weipa/src/FinleyElements.cpp                       |   124 +-
 weipa/src/FinleyElements.h                         |    14 +-
 weipa/src/FinleyNodes.cpp                          |    97 +-
 weipa/src/FinleyNodes.h                            |    15 +-
 weipa/src/NodeData.h                               |     2 +-
 weipa/src/RipleyDomain.cpp                         |     2 +-
 weipa/src/RipleyDomain.h                           |     2 +-
 weipa/src/RipleyElements.cpp                       |     2 +-
 weipa/src/RipleyElements.h                         |     2 +-
 weipa/src/RipleyNodes.cpp                          |     2 +-
 weipa/src/RipleyNodes.h                            |     2 +-
 weipa/src/SConscript                               |     2 +-
 weipa/src/SpeckleyDomain.cpp                       |     2 +-
 weipa/src/SpeckleyDomain.h                         |     2 +-
 weipa/src/SpeckleyElements.cpp                     |     2 +-
 weipa/src/SpeckleyElements.h                       |     2 +-
 weipa/src/SpeckleyNodes.cpp                        |     2 +-
 weipa/src/SpeckleyNodes.h                          |     2 +-
 weipa/src/VisItControl.cpp                         |     2 +-
 weipa/src/VisItControl.h                           |     2 +-
 weipa/src/VisItData.cpp                            |     2 +-
 weipa/src/VisItData.h                              |     2 +-
 weipa/src/weipa.h                                  |     2 +-
 weipa/src/weipacpp.cpp                             |     2 +-
 weipa/test/EscriptDatasetTestCase.cpp              |     2 +-
 weipa/test/EscriptDatasetTestCase.h                |     2 +-
 weipa/test/SConscript                              |     2 +-
 weipa/test/python/SConscript                       |     2 +-
 weipa/test/python/run_savesilo_tests.py            |     4 +-
 weipa/test/python/run_savevtk_tests.py             |     4 +-
 weipa/test/weipa_UnitTest.cpp                      |     2 +-
 1096 files changed, 174584 insertions(+), 201557 deletions(-)

diff --git a/SConstruct b/SConstruct
index be1344b..a95d609 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -54,6 +54,9 @@ if not os.path.isfile(options_file):
 
 default_prefix='/usr'
 mpi_flavours=('no', 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')
+netcdf_flavours = ('no', 'off', 'none', 'False', # Must be last of the false alternatives
+                   'yes', 'on', 'True', '3', # Must be last of the version 3 alternatives
+                   '4')
 all_domains = ['dudley','finley','ripley','speckley']
 
 #Note that scons construction vars the the following purposes:
@@ -94,9 +97,9 @@ vars.AddVariables(
   ('mpi_libs', 'MPI shared libraries to link with', ['mpi']),
   BoolVariable('cuda', 'Enable GPU code with CUDA (requires thrust)', False),
   ('cuda_prefix', 'Prefix/Paths to NVidia CUDA installation', default_prefix),
-  BoolVariable('netcdf', 'Enable netCDF file support', False),
+  EnumVariable('netcdf', 'Enable netCDF file support', False, allowed_values=netcdf_flavours),
   ('netcdf_prefix', 'Prefix/Paths of netCDF installation', default_prefix),
-  ('netcdf_libs', 'netCDF libraries to link with', ['netcdf_c++', 'netcdf']),
+  ('netcdf_libs', 'netCDF libraries to link with', 'DEFAULT'),
   BoolVariable('parmetis', 'Enable ParMETIS (requires MPI)', False),
   ('parmetis_prefix', 'Prefix/Paths of ParMETIS installation', default_prefix),
   ('parmetis_libs', 'ParMETIS libraries to link with', ['parmetis', 'metis']),
@@ -152,7 +155,9 @@ vars.AddVariables(
   ('papi_prefix', 'Prefix/Paths to PAPI installation', default_prefix),
   ('papi_libs', 'PAPI libraries to link with', ['papi']),
   BoolVariable('papi_instrument_solver', 'Use PAPI to instrument each iteration of the solver', False),
-  BoolVariable('osx_dependency_fix', 'Fix dependencies for libraries to have absolute paths (OSX)', False)
+  BoolVariable('osx_dependency_fix', 'Fix dependencies for libraries to have absolute paths (OSX)', False),
+  BoolVariable('stdlocationisprefix', 'Set the prefix as escript root in the launcher', False),
+  BoolVariable('mpi_no_host', 'Do not specify --host in run-escript launcher (only OPENMPI)', False)
 )
 
 ##################### Create environment and help text #######################
@@ -177,6 +182,22 @@ if env['tools_names'] != ['default']:
     env = Environment(tools = ['default'] + env['tools_names'], options = vars,
                       ENV = {'PATH' : os.environ['PATH']})
 
+# Covert env['netcdf'] into one of False, 3, 4
+# Also choose default values for libraries
+pos1=netcdf_flavours.index('False')
+pos2=netcdf_flavours.index('3')
+mypos=netcdf_flavours.index(env['netcdf'])
+if 0 <= mypos <=pos1:
+    env['netcdf']=0
+elif pos1 < mypos <= pos2:
+    env['netcdf']=3
+    if env['netcdf_libs']=='DEFAULT':
+        env['netcdf_libs']=['netcdf_c++', 'netcdf']
+else:   # netcdf4
+    env['netcdf']=4
+    if env['netcdf_libs']=='DEFAULT':
+        env['netcdf_libs']=['netcdf_c++4']
+
 if options_file:
     opts_valid=False
     if 'escript_opts_version' in env.Dictionary() and \
@@ -258,8 +279,8 @@ if cc_name == 'icpc':
     cc_flags    = "-std=c++11 -fPIC -w2 -wd1875 -wd1478 -Wno-unknown-pragmas"
     cc_optim    = "-O3 -ftz -fno-alias -inline-level=2 -ipo -xHost"
     cc_debug    = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK -DSLOWSHARECHECK"
-    omp_flags   = "-openmp"
-    omp_ldflags = "-openmp -openmp_report=1"
+    omp_flags   = "-qopenmp"
+    omp_ldflags = "-qopenmp" # removing -openmp-report (which is deprecated) because the replacement outputs to a file
     fatalwarning = "-Werror"
 elif cc_name[:3] == 'g++':
     # GNU C++ on any system
@@ -268,7 +289,9 @@ elif cc_name[:3] == 'g++':
     cc_flags     = "-std=c++11 -pedantic -Wall -fPIC -Wno-unknown-pragmas -Wno-sign-compare -Wno-system-headers -Wno-long-long -Wno-strict-aliasing -finline-functions"
     cc_optim     = "-O3"
     #max-vartrack-size: avoid vartrack limit being exceeded with escriptcpp.cpp
-    cc_debug     = "-g3 -O0 -D_GLIBCXX_DEBUG -DDOASSERT -DDOPROF -DBOUNDS_CHECK -DSLOWSHARECHECK --param=max-vartrack-size=100000000"
+    cc_debug     = "-g3 -O0  -DDOASSERT -DDOPROF -DBOUNDS_CHECK -DSLOWSHARECHECK --param=max-vartrack-size=100000000"
+    #Removed because new netcdf doesn't seem to like it
+    #cc_debug += ' -D_GLIBCXX_DEBUG  ' 
     omp_flags    = "-fopenmp"
     omp_ldflags  = "-fopenmp"
     fatalwarning = "-Werror"
@@ -492,12 +515,16 @@ if env['launcher'] == 'default':
     if env['mpi'] == 'INTELMPI':
         env['launcher'] = "mpirun -hostfile %f -n %N -ppn %p %b"
     elif env['mpi'] == 'OPENMPI':
+        if env['mpi_no_host']:
+            hostoptionstr=''
+        else:
+            hostoptionstr='--host %h'
         # default to OpenMPI version 1.10 or higher
-        env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h --map-by node:pe=%t -bind-to core -np %N %b"
+        env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} "+hostoptionstr+" --map-by node:pe=%t -bind-to core -np %N %b"
         if 'orte_version' in env:
             major,minor,point = [int(i) for i in env['orte_version'].split('.')]
             if major == 1 and minor < 10:
-                env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h --cpus-per-rank %t -np %N %b"
+                env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} "+hostoptionstr+" --cpus-per-rank %t -np %N %b"
     elif env['mpi'] == 'MPT':
         env['launcher'] = "mpirun %h -np %p %b"
     elif env['mpi'] == 'MPICH':
@@ -573,7 +600,7 @@ if env['paso']:
     build_all_list += ['build_paso']
     install_all_list += ['install_paso']
 
-env['buildvars']['paso'] = int(env['trilinos'])
+env['buildvars']['trilinos'] = int(env['trilinos'])
 if env['trilinos']:
     build_all_list += ['build_trilinoswrap']
     install_all_list += ['install_trilinoswrap']
@@ -748,10 +775,15 @@ def print_summary():
     else:
         print("   Direct solver:  NONE")
     print("         domains:  %s"%(", ".join(env['domains'])))
-
+    if env['netcdf']==4:
+        print("          netcdf:  YES (4 + 3)")
+    elif env['netcdf']==3:
+        print("          netcdf:  YES (3)")
+    else:
+        print("          netcdf:  NO")
     e_list=[]
-    for i in 'weipa','debug','openmp','boomeramg','cppunit','gdal','mkl',\
-             'netcdf','papi','pyproj','scipy','silo','sympy','umfpack','visit':
+    for i in ('weipa','debug','openmp','boomeramg','cppunit','gdal','mkl',
+             'papi','pyproj','scipy','silo','sympy','umfpack','visit'):
         if env[i]: e_list.append(i)
         else: d_list.append(i)
 
diff --git a/cusplibrary/SConscript b/cusplibrary/SConscript
index dbabea7..bca4134 100644
--- a/cusplibrary/SConscript
+++ b/cusplibrary/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/cusplibrary/build/build-env.py b/cusplibrary/build/build-env.py
index 9d6705a..edfa7b6 100644
--- a/cusplibrary/build/build-env.py
+++ b/cusplibrary/build/build-env.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/cusplibrary/build/nvcc.py b/cusplibrary/build/nvcc.py
index 1f6fde6..6fd32c5 100644
--- a/cusplibrary/build/nvcc.py
+++ b/cusplibrary/build/nvcc.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/cusplibrary/performance/spmv/scripts/benchmark.py b/cusplibrary/performance/spmv/scripts/benchmark.py
index 20226ca..b8de8ef 100644
--- a/cusplibrary/performance/spmv/scripts/benchmark.py
+++ b/cusplibrary/performance/spmv/scripts/benchmark.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/cusplibrary/testing/data/random_10x10/generator.py b/cusplibrary/testing/data/random_10x10/generator.py
index 6560423..0b6aac9 100644
--- a/cusplibrary/testing/data/random_10x10/generator.py
+++ b/cusplibrary/testing/data/random_10x10/generator.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/debian/changelog b/debian/changelog
index db44cf7..474db0f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-escript (5.1-1) unstable; urgency=low
+
+  [ Joel Fenwick ]
+  * fixing issues with move to buster
+
+ -- Joel Fenwick <j.oelpublic at gmail.com>  Mon, 27 Nov 2017 13:07:00 +1000
+
 python-escript (5.0-4) unstable; urgency=medium
 
   [ Joel Fenwick ]
diff --git a/debian/control b/debian/control
index 32cf52e..7abaed6 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: python-escript
 Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Joel Fenwick <j.oelpublic at gmail.com>, Anton Gladky <gladk at debian.org>
 Section: science
-Priority: extra
+Priority: optional
 Build-Depends: python-all-dev,
                python3-all-dev,
                python-numpy,
@@ -25,7 +25,7 @@ Build-Depends: python-all-dev,
                openmpi-bin,
                debhelper (>= 10),
                dh-python
-Standards-Version: 3.9.8
+Standards-Version: 4.1.1
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/python-escript.git
 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/python-escript.git
 Homepage: https://launchpad.net/escript-finley
diff --git a/debian/copyright b/debian/copyright
index de62bf9..6ded4d5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -88,19 +88,6 @@ Files: cusplibrary/examples/Algorithms/transposed_spmv.cu
 Copyright: The University of Queensland
 License: ASL-2.0
 
-Files: doc/user/listings.cfg
-Copyright: 1996 - 2003 Carsten Heinz and/or any other author listed elsewhere in this file.
-License: LPPL-1.0+
- This file is distributed under the terms of the LaTeX Project Public
- License from CTAN archives in directory  macros/latex/base/lppl.txt.
- Either version 1.0 or, at your option, any later version.
- .
- This file is completely free and comes without any warranty.
- .
- You may obtain a copy of the License at
- .
- https://latex-project.org/lppl/lppl-1-0.txt
-
 License: ASL-2.0
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
diff --git a/debian/patches/fixopenmpiconf b/debian/patches/fixopenmpiconf
index 6eb2c08..c61bb75 100644
--- a/debian/patches/fixopenmpiconf
+++ b/debian/patches/fixopenmpiconf
@@ -1,4 +1,5 @@
 Description: Fixopenmpiconf
+Find where the libraries actually are
 --- a/scons/templates/sid_options.py
 +++ b/scons/templates/sid_options.py
 @@ -21,7 +21,11 @@ escript_opts_version = 203
diff --git a/debian/patches/nodatedoxygen b/debian/patches/nodatedoxygen
deleted file mode 100644
index eb2c004..0000000
--- a/debian/patches/nodatedoxygen
+++ /dev/null
@@ -1,12 +0,0 @@
-Description: Nodatedoxygen
---- a/doc/doxygen/doxygen_esys
-+++ b/doc/doxygen/doxygen_esys
-@@ -1158,7 +1158,7 @@ HTML_COLORSTYLE_GAMMA  = 80
- # The default value is: YES.
- # This tag requires that the tag GENERATE_HTML is set to YES.
- 
--HTML_TIMESTAMP         = YES
-+HTML_TIMESTAMP         = NO
- 
- # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
- # documentation will contain sections that can be hidden and shown after the
diff --git a/debian/patches/rootintar b/debian/patches/rootintar
index c3bfd3f..ef9dd8f 100644
--- a/debian/patches/rootintar
+++ b/debian/patches/rootintar
@@ -1,4 +1,5 @@
 Description: Rootintar
+Make sure files are owned by root
 --- a/doc/SConscript
 +++ b/doc/SConscript
 @@ -199,7 +199,7 @@ env.Alias('examples_zipfile', zip)
diff --git a/debian/patches/series b/debian/patches/series
index a0608dc..0377b04 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,6 @@
-nodatedoxygen
-rootintar
-fixopenmpiconf
-fixFTBFS.patch
+#release-sanity
+#mpi-gaol
+#grammar-errors
+#relocating-debian-dir
+#dateless-gz
+#rootintar
diff --git a/debian/utils/cppy.py b/debian/utils/cppy.py
index 4a84209..f9fa23d 100755
--- a/debian/utils/cppy.py
+++ b/debian/utils/cppy.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/SConscript b/doc/SConscript
index 2100f9e..8c3c1be 100644
--- a/doc/SConscript
+++ b/doc/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/completedevs.tex b/doc/completedevs.tex
index 848f74e..4f208f4 100644
--- a/doc/completedevs.tex
+++ b/doc/completedevs.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -21,8 +21,7 @@
 Cihan Altinay & 2.0 & Current \\
 Joel Fenwick & 2.0 & Current \\
 Lutz Gross & 1.0 & Current \\
-Jaco du Plessis & 3.4.2 & Current \\
-Simon Shaw & 3.4.1 & Current \\
+Qi Shao & 5.1 & Current \\
 	\cline{1-3}  	
 Artak Amirbekyan & 2.0 & 3.2.1 \\
 Imran Syed Azeezullah & 1.0 & 1.0 \\
@@ -33,7 +32,9 @@ Lin Gao & 2.0 & 3.3 \\
 Jon Gui & 2.0 & 2.0 \\
 Derek Hawcroft & 1.0 & 2.0 \\
 Peter Hornby & 1.0 & 2.0 \\
+Jaco du Plessis & 3.4.2 & 4.2.0.1 \\
 Azadeh Salehi & 3.2.1 & 3.4 \\
+Simon Shaw & 3.4.1 & 4.2.0.1 \\
 John Smilie & 1.0 & 1.0 \\
 Ken Steube & 1.0 & 2.0 \\
 Elspeth Thorne & 1.0 & 2.0 \\
diff --git a/doc/cookbook/SConscript b/doc/cookbook/SConscript
index 7bf4339..de42bf4 100644
--- a/doc/cookbook/SConscript
+++ b/doc/cookbook/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/cookbook/cookbook.bib b/doc/cookbook/cookbook.bib
index a9e3b88..5c35f8d 100644
--- a/doc/cookbook/cookbook.bib
+++ b/doc/cookbook/cookbook.bib
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/cookbook.tex b/doc/cookbook/cookbook.tex
index 8010564..8d94093 100644
--- a/doc/cookbook/cookbook.tex
+++ b/doc/cookbook/cookbook.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -40,8 +40,7 @@
 
 \author{Antony Hallam, Lutz Gross, et al.}
 \authoraddress{
-Earth Systems Science Computational Centre (ESSCC) \\
-School of Earth Sciences \\
+Centre for Geoscience Computing (GeoComp) \\
 The University of Queensland \\
 Brisbane, Australia \\
 Email: \email{esys at esscc.uq.edu.au}
@@ -66,7 +65,7 @@ Email: \email{esys at esscc.uq.edu.au}
 \fi
 
 \begin{center}
-Copyright (c) 2009--2016 by The University of Queensland	\\
+Copyright (c) 2009--2017 by The University of Queensland	\\
 \url{http://www.uq.edu.au}				\\
 Primary Business: Queensland, Australia			\\
 Licensed under the Apache License, version 2.0	\\
diff --git a/doc/cookbook/cookbook_defs.tex b/doc/cookbook/cookbook_defs.tex
index 22e0378..67f26fa 100644
--- a/doc/cookbook/cookbook_defs.tex
+++ b/doc/cookbook/cookbook_defs.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/einsteinETA.tex b/doc/cookbook/einsteinETA.tex
index d858242..64cca9e 100644
--- a/doc/cookbook/einsteinETA.tex
+++ b/doc/cookbook/einsteinETA.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/escpybas.tex b/doc/cookbook/escpybas.tex
index a53fd28..984c941 100644
--- a/doc/cookbook/escpybas.tex
+++ b/doc/cookbook/escpybas.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example01.tex b/doc/cookbook/example01.tex
index f930a93..d384335 100644
--- a/doc/cookbook/example01.tex
+++ b/doc/cookbook/example01.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example02.tex b/doc/cookbook/example02.tex
index 09b332d..4bff81f 100644
--- a/doc/cookbook/example02.tex
+++ b/doc/cookbook/example02.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example03.tex b/doc/cookbook/example03.tex
index 7b115c1..a56f5d8 100644
--- a/doc/cookbook/example03.tex
+++ b/doc/cookbook/example03.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example04.tex b/doc/cookbook/example04.tex
index ddd5c76..4c07274 100644
--- a/doc/cookbook/example04.tex
+++ b/doc/cookbook/example04.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example05.tex b/doc/cookbook/example05.tex
index 76d1b0d..cbae96e 100644
--- a/doc/cookbook/example05.tex
+++ b/doc/cookbook/example05.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example07.tex b/doc/cookbook/example07.tex
index addaf20..1c8ad84 100644
--- a/doc/cookbook/example07.tex
+++ b/doc/cookbook/example07.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example08.tex b/doc/cookbook/example08.tex
index 8c9387b..261b1a4 100644
--- a/doc/cookbook/example08.tex
+++ b/doc/cookbook/example08.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example09.tex b/doc/cookbook/example09.tex
index 5689e42..88c26af 100644
--- a/doc/cookbook/example09.tex
+++ b/doc/cookbook/example09.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example10.tex b/doc/cookbook/example10.tex
index 6d379bc..8937004 100644
--- a/doc/cookbook/example10.tex
+++ b/doc/cookbook/example10.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/example11.tex b/doc/cookbook/example11.tex
index 3276fa6..3d3f49a 100644
--- a/doc/cookbook/example11.tex
+++ b/doc/cookbook/example11.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/intro.tex b/doc/cookbook/intro.tex
index 01f7f1a..ad8cbdb 100644
--- a/doc/cookbook/intro.tex
+++ b/doc/cookbook/intro.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/cookbook/quickstart.tex b/doc/cookbook/quickstart.tex
index e82a26a..e0bbbcb 100644
--- a/doc/cookbook/quickstart.tex
+++ b/doc/cookbook/quickstart.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/copyrights.tex b/doc/copyrights.tex
index 3ba6682..ce24634 100644
--- a/doc/copyrights.tex
+++ b/doc/copyrights.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \begin{center}
-Copyright (c) 2003-2016 by The University of Queensland\\
+Copyright (c) 2003-2017 by The University of Queensland\\
 \url{http://www.uq.edu.au}\\
 Primary Business: Queensland, Australia\\
 Licensed under the Apache License, version 2.0\\
diff --git a/doc/currentdev.tex b/doc/currentdev.tex
index 1c563c9..119ef11 100644
--- a/doc/currentdev.tex
+++ b/doc/currentdev.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -31,11 +31,10 @@ guide.
 \hrule
 \vspace{1cm}
 \begin{description}
-\item[Cihan Altinay] \weipa visualisation package, SCons build system rework, \ripley and CUDA solvers.
+\item[Cihan Altinay] \weipa visualisation package, SCons build system rework, \ripley and CUDA solvers, Trilinos integration.
 \item[Joel Fenwick] Lazy evaluation, maintenance of escript module, release wrangler.
 \item[Lutz Gross] Patriarch, technical lead, solvers, large chunks of the original code.
-\item[Jaco du Plessis] Symbolic toolbox, GMSH reader MPI implementation, DC resistivity.
-\item[Simon Shaw] \speckley module, release help, large cluster improvements.
+\item[Qi Shao] Trilinos testing.
 \end{description}
 \end{center}
 \vfill
diff --git a/doc/docguide.tex b/doc/docguide.tex
index 6dbffad..6e483c6 100644
--- a/doc/docguide.tex
+++ b/doc/docguide.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/doxygen/SConscript b/doc/doxygen/SConscript
index fbdd11c..02f1b71 100644
--- a/doc/doxygen/SConscript
+++ b/doc/doxygen/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/doxygen/doxygen_esys b/doc/doxygen/doxygen_esys
index 6455b23..6d495ce 100644
--- a/doc/doxygen/doxygen_esys
+++ b/doc/doxygen/doxygen_esys
@@ -1158,7 +1158,7 @@ HTML_COLORSTYLE_GAMMA  = 80
 # The default value is: YES.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_TIMESTAMP         = YES
+HTML_TIMESTAMP         = NO
 
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
diff --git a/doc/elist.tex b/doc/elist.tex
index e6bc85f..3851a9e 100644
--- a/doc/elist.tex
+++ b/doc/elist.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/epydoc/SConscript b/doc/epydoc/SConscript
index 680f0f2..97cb38d 100644
--- a/doc/epydoc/SConscript
+++ b/doc/epydoc/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/SConscript b/doc/examples/SConscript
index 0b0aae3..ac82d66 100644
--- a/doc/examples/SConscript
+++ b/doc/examples/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/cookbook/cblib.py b/doc/examples/cookbook/cblib.py
index 7d6b96b..4db1437 100644
--- a/doc/examples/cookbook/cblib.py
+++ b/doc/examples/cookbook/cblib.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 
 from __future__ import division, print_function
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/cblib1.py b/doc/examples/cookbook/cblib1.py
index 79f2691..7bbe432 100644
--- a/doc/examples/cookbook/cblib1.py
+++ b/doc/examples/cookbook/cblib1.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/cerjen.py b/doc/examples/cookbook/cerjen.py
index 910c09b..f1d59fe 100644
--- a/doc/examples/cookbook/cerjen.py
+++ b/doc/examples/cookbook/cerjen.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/cookbook/example01a.py b/doc/examples/cookbook/example01a.py
index b29e181..b2ca153 100644
--- a/doc/examples/cookbook/example01a.py
+++ b/doc/examples/cookbook/example01a.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example01b.py b/doc/examples/cookbook/example01b.py
index 458c113..818a0f4 100644
--- a/doc/examples/cookbook/example01b.py
+++ b/doc/examples/cookbook/example01b.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example01c.py b/doc/examples/cookbook/example01c.py
index 05b70ab..62cddd0 100644
--- a/doc/examples/cookbook/example01c.py
+++ b/doc/examples/cookbook/example01c.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example02.py b/doc/examples/cookbook/example02.py
index af82f73..5c9aed2 100644
--- a/doc/examples/cookbook/example02.py
+++ b/doc/examples/cookbook/example02.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example03a.py b/doc/examples/cookbook/example03a.py
index c2441f5..bc92466 100644
--- a/doc/examples/cookbook/example03a.py
+++ b/doc/examples/cookbook/example03a.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example03b.py b/doc/examples/cookbook/example03b.py
index adbff41..de9efb3 100644
--- a/doc/examples/cookbook/example03b.py
+++ b/doc/examples/cookbook/example03b.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example04a.py b/doc/examples/cookbook/example04a.py
index 8fc89f9..dd9960f 100644
--- a/doc/examples/cookbook/example04a.py
+++ b/doc/examples/cookbook/example04a.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example04b.py b/doc/examples/cookbook/example04b.py
index 2e681ba..42df3ed 100644
--- a/doc/examples/cookbook/example04b.py
+++ b/doc/examples/cookbook/example04b.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 
 from __future__ import division, print_function
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example05a.py b/doc/examples/cookbook/example05a.py
index 20f62c9..7a15e2a 100644
--- a/doc/examples/cookbook/example05a.py
+++ b/doc/examples/cookbook/example05a.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 
 from __future__ import division, print_function
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example05b.py b/doc/examples/cookbook/example05b.py
index a837f92..2470e9e 100644
--- a/doc/examples/cookbook/example05b.py
+++ b/doc/examples/cookbook/example05b.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example05c.py b/doc/examples/cookbook/example05c.py
index fd4fcce..dbedcd3 100644
--- a/doc/examples/cookbook/example05c.py
+++ b/doc/examples/cookbook/example05c.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example06.py b/doc/examples/cookbook/example06.py
index 20af3eb..f1ce525 100644
--- a/doc/examples/cookbook/example06.py
+++ b/doc/examples/cookbook/example06.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 
 from __future__ import division, print_function
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example07a.py b/doc/examples/cookbook/example07a.py
index ebc32a9..116b786 100644
--- a/doc/examples/cookbook/example07a.py
+++ b/doc/examples/cookbook/example07a.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example07b.py b/doc/examples/cookbook/example07b.py
index 3ca1c8b..9b3d781 100644
--- a/doc/examples/cookbook/example07b.py
+++ b/doc/examples/cookbook/example07b.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example08a.py b/doc/examples/cookbook/example08a.py
index 39da9a9..65d8cd1 100644
--- a/doc/examples/cookbook/example08a.py
+++ b/doc/examples/cookbook/example08a.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example08b.py b/doc/examples/cookbook/example08b.py
index 5d3b9d9..400fb5f 100644
--- a/doc/examples/cookbook/example08b.py
+++ b/doc/examples/cookbook/example08b.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example08c.py b/doc/examples/cookbook/example08c.py
index a36aeaa..b3a9d2b 100644
--- a/doc/examples/cookbook/example08c.py
+++ b/doc/examples/cookbook/example08c.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example09a.py b/doc/examples/cookbook/example09a.py
index 825f39f..5ef4de2 100644
--- a/doc/examples/cookbook/example09a.py
+++ b/doc/examples/cookbook/example09a.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example09b.py b/doc/examples/cookbook/example09b.py
index a409b83..c2698cf 100644
--- a/doc/examples/cookbook/example09b.py
+++ b/doc/examples/cookbook/example09b.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example09c.py b/doc/examples/cookbook/example09c.py
index f5d6328..fde656c 100644
--- a/doc/examples/cookbook/example09c.py
+++ b/doc/examples/cookbook/example09c.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example09m.py b/doc/examples/cookbook/example09m.py
index 70b075d..eee1805 100644
--- a/doc/examples/cookbook/example09m.py
+++ b/doc/examples/cookbook/example09m.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example09n.py b/doc/examples/cookbook/example09n.py
index de13492..c4bac42 100644
--- a/doc/examples/cookbook/example09n.py
+++ b/doc/examples/cookbook/example09n.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10a.py b/doc/examples/cookbook/example10a.py
index 3bcafe6..f6fea91 100644
--- a/doc/examples/cookbook/example10a.py
+++ b/doc/examples/cookbook/example10a.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10b.py b/doc/examples/cookbook/example10b.py
index acb9552..72818fe 100644
--- a/doc/examples/cookbook/example10b.py
+++ b/doc/examples/cookbook/example10b.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10c_0.py b/doc/examples/cookbook/example10c_0.py
index 6dbdbff..d05f15a 100644
--- a/doc/examples/cookbook/example10c_0.py
+++ b/doc/examples/cookbook/example10c_0.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10c_1.py b/doc/examples/cookbook/example10c_1.py
index 05febd7..c528375 100644
--- a/doc/examples/cookbook/example10c_1.py
+++ b/doc/examples/cookbook/example10c_1.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10d.py b/doc/examples/cookbook/example10d.py
index 0131296..78e1f2c 100644
--- a/doc/examples/cookbook/example10d.py
+++ b/doc/examples/cookbook/example10d.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10e.py b/doc/examples/cookbook/example10e.py
index 4a28308..976c791 100644
--- a/doc/examples/cookbook/example10e.py
+++ b/doc/examples/cookbook/example10e.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10m.py b/doc/examples/cookbook/example10m.py
index 4c3238a..df1991f 100644
--- a/doc/examples/cookbook/example10m.py
+++ b/doc/examples/cookbook/example10m.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example10p.py b/doc/examples/cookbook/example10p.py
index 705a4ad..4855c25 100644
--- a/doc/examples/cookbook/example10p.py
+++ b/doc/examples/cookbook/example10p.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example11a.py b/doc/examples/cookbook/example11a.py
index 3827a6f..10c8212 100644
--- a/doc/examples/cookbook/example11a.py
+++ b/doc/examples/cookbook/example11a.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example11b.py b/doc/examples/cookbook/example11b.py
index 761c28b..a6ab85d 100644
--- a/doc/examples/cookbook/example11b.py
+++ b/doc/examples/cookbook/example11b.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example11c.py b/doc/examples/cookbook/example11c.py
index 943ba87..44c01b8 100644
--- a/doc/examples/cookbook/example11c.py
+++ b/doc/examples/cookbook/example11c.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/example11m.py b/doc/examples/cookbook/example11m.py
index 9f702e8..a890f48 100644
--- a/doc/examples/cookbook/example11m.py
+++ b/doc/examples/cookbook/example11m.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/wave_stab.py b/doc/examples/cookbook/wave_stab.py
index 282cf9a..3d4df9a 100644
--- a/doc/examples/cookbook/wave_stab.py
+++ b/doc/examples/cookbook/wave_stab.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/wavesolver2d001.py b/doc/examples/cookbook/wavesolver2d001.py
index d03e211..570943c 100644
--- a/doc/examples/cookbook/wavesolver2d001.py
+++ b/doc/examples/cookbook/wavesolver2d001.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/wavesolver2d002.py b/doc/examples/cookbook/wavesolver2d002.py
index 1367672..710a3ed 100644
--- a/doc/examples/cookbook/wavesolver2d002.py
+++ b/doc/examples/cookbook/wavesolver2d002.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/wavesolver2d003.py b/doc/examples/cookbook/wavesolver2d003.py
index 9a3afd9..c6e7b44 100644
--- a/doc/examples/cookbook/wavesolver2d003.py
+++ b/doc/examples/cookbook/wavesolver2d003.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/cookbook/wavesolver2d004.py b/doc/examples/cookbook/wavesolver2d004.py
index 0a663fd..b55fb8b 100644
--- a/doc/examples/cookbook/wavesolver2d004.py
+++ b/doc/examples/cookbook/wavesolver2d004.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/geotutorial/backward_euler.py b/doc/examples/geotutorial/backward_euler.py
index 3be8b03..b65f183 100644
--- a/doc/examples/geotutorial/backward_euler.py
+++ b/doc/examples/geotutorial/backward_euler.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/geotutorial/forward_euler.py b/doc/examples/geotutorial/forward_euler.py
index bf493dc..5f38472 100644
--- a/doc/examples/geotutorial/forward_euler.py
+++ b/doc/examples/geotutorial/forward_euler.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/geotutorial/myfirstscript.py b/doc/examples/geotutorial/myfirstscript.py
index 64ac2b4..2692bb3 100644
--- a/doc/examples/geotutorial/myfirstscript.py
+++ b/doc/examples/geotutorial/myfirstscript.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/geotutorial/steadystate.py b/doc/examples/geotutorial/steadystate.py
index 3cb5218..d5009a9 100644
--- a/doc/examples/geotutorial/steadystate.py
+++ b/doc/examples/geotutorial/steadystate.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/geotutorial/steadystate_variablek.py b/doc/examples/geotutorial/steadystate_variablek.py
index cdf50b3..629ba05 100644
--- a/doc/examples/geotutorial/steadystate_variablek.py
+++ b/doc/examples/geotutorial/steadystate_variablek.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/create_netcdf.py b/doc/examples/inversion/create_netcdf.py
index ed64b66..3783ce0 100644
--- a/doc/examples/inversion/create_netcdf.py
+++ b/doc/examples/inversion/create_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/inversion/dc_forward.py b/doc/examples/inversion/dc_forward.py
index 358ec8c..f910a64 100644
--- a/doc/examples/inversion/dc_forward.py
+++ b/doc/examples/inversion/dc_forward.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/inversion/grav_ermapper.py b/doc/examples/inversion/grav_ermapper.py
index a284790..7c81d6d 100644
--- a/doc/examples/inversion/grav_ermapper.py
+++ b/doc/examples/inversion/grav_ermapper.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """3D gravity inversion example using ER Mapper data"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/grav_netcdf.py b/doc/examples/inversion/grav_netcdf.py
index 27fb726..fcf94ed 100644
--- a/doc/examples/inversion/grav_netcdf.py
+++ b/doc/examples/inversion/grav_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """3D gravity inversion example using netCDF data"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/gravmag_netcdf.py b/doc/examples/inversion/gravmag_netcdf.py
index da6785a..51a5ddb 100644
--- a/doc/examples/inversion/gravmag_netcdf.py
+++ b/doc/examples/inversion/gravmag_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """3D gravity/magnetic joint inversion example using netCDF data"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/gravmag_nodriver.py b/doc/examples/inversion/gravmag_nodriver.py
index f03f864..99cda3c 100644
--- a/doc/examples/inversion/gravmag_nodriver.py
+++ b/doc/examples/inversion/gravmag_nodriver.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,7 +19,7 @@ Advanced 3D gravity/magnetic joint inversion example without using any
 inversion drivers
 """
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/gravmag_wgs84_nodriver.py b/doc/examples/inversion/gravmag_wgs84_nodriver.py
index 97c77e0..50719f1 100644
--- a/doc/examples/inversion/gravmag_wgs84_nodriver.py
+++ b/doc/examples/inversion/gravmag_wgs84_nodriver.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,7 +19,7 @@ Advanced 3D gravity/magnetic joint inversion example without using any
 inversion drivers
 """
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/mag_netcdf.py b/doc/examples/inversion/mag_netcdf.py
index bbed4a6..cc9900f 100644
--- a/doc/examples/inversion/mag_netcdf.py
+++ b/doc/examples/inversion/mag_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """3D magnetic inversion example using netCDF data"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/mag_wgs84_netcdf.py b/doc/examples/inversion/mag_wgs84_netcdf.py
index e15ad27..acfddf3 100644
--- a/doc/examples/inversion/mag_wgs84_netcdf.py
+++ b/doc/examples/inversion/mag_wgs84_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@ from __future__ import division, print_function
 
 """3D magnetic inversion example using netCDF data"""
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/mag_netcdf.py b/doc/examples/inversion/magi_netcdf.py
similarity index 93%
copy from doc/examples/inversion/mag_netcdf.py
copy to doc/examples/inversion/magi_netcdf.py
index bbed4a6..c3be008 100644
--- a/doc/examples/inversion/mag_netcdf.py
+++ b/doc/examples/inversion/magi_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """3D magnetic inversion example using netCDF data"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -37,12 +37,11 @@ PAD_Y = 0.2
 thickness = 40. * U.km
 l_air = 6. * U.km
 n_cells_v = 25
-MU = 0.1
+MU = 0.01
 # background magnetic field components (B_East, B_North, B_Vertical)
 B_b = [2201.*U.Nano*U.Tesla, 31232.*U.Nano*U.Tesla, -41405.*U.Nano*U.Tesla]
 
 COORDINATES=CartesianReferenceSystem()
-#COORDINATES=WGS84ReferenceSystem()
 
 
 def work():
@@ -55,7 +54,7 @@ def work():
   db.setBackgroundMagneticFluxDensity(B_b)
   db.fixSusceptibilityBelow(depth=thickness)
 
-  inv=MagneticInversion(self_demagnetization=True)
+  inv=MagneticInversion(magnetic_intensity_data=True)
   inv.setSolverTolerance(1e-4)
   inv.setSolverMaxIterations(50)
   inv.fixMagneticPotentialAtBottom(False)
diff --git a/doc/examples/inversion/plot_ermapper.py b/doc/examples/inversion/plot_ermapper.py
index 5bcfb73..05f4dac 100644
--- a/doc/examples/inversion/plot_ermapper.py
+++ b/doc/examples/inversion/plot_ermapper.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/inversion/plot_netcdf.py b/doc/examples/inversion/plot_netcdf.py
index 0094c75..ecf736a 100644
--- a/doc/examples/inversion/plot_netcdf.py
+++ b/doc/examples/inversion/plot_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/inversion/strong_gravmag_netcdf.py b/doc/examples/inversion/strong_gravmag_netcdf.py
index f8633db..734b76c 100644
--- a/doc/examples/inversion/strong_gravmag_netcdf.py
+++ b/doc/examples/inversion/strong_gravmag_netcdf.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@ from __future__ import division, print_function
 
 """3D gravity/magnetic joint inversion example using netCDF data"""
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/synthetic_HTI.py b/doc/examples/inversion/synthetic_HTI.py
index 6d03821..afd866b 100644
--- a/doc/examples/inversion/synthetic_HTI.py
+++ b/doc/examples/inversion/synthetic_HTI.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/inversion/synthetic_TTI.py b/doc/examples/inversion/synthetic_TTI.py
index 618a198..86241d5 100644
--- a/doc/examples/inversion/synthetic_TTI.py
+++ b/doc/examples/inversion/synthetic_TTI.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -13,7 +13,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/synthetic_VTI.py b/doc/examples/inversion/synthetic_VTI.py
index c9b14a4..af6a149 100644
--- a/doc/examples/inversion/synthetic_VTI.py
+++ b/doc/examples/inversion/synthetic_VTI.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -13,7 +13,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/synthetic_sonic.py b/doc/examples/inversion/synthetic_sonic.py
index 22be445..6c256fb 100644
--- a/doc/examples/inversion/synthetic_sonic.py
+++ b/doc/examples/inversion/synthetic_sonic.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -13,7 +13,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/synthetic_sonicHTI.py b/doc/examples/inversion/synthetic_sonicHTI.py
index debbd0f..955155a 100644
--- a/doc/examples/inversion/synthetic_sonicHTI.py
+++ b/doc/examples/inversion/synthetic_sonicHTI.py
@@ -2,7 +2,7 @@ from __future__ import division
 from __future__ import print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@ from __future__ import print_function
 ##############################################################################
 from __future__ import print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/inversion/test_commemi1.py b/doc/examples/inversion/test_commemi1.py
index 47ebe3a..24145b6 100644
--- a/doc/examples/inversion/test_commemi1.py
+++ b/doc/examples/inversion/test_commemi1.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/inversion/test_commemi4.py b/doc/examples/inversion/test_commemi4.py
index 2e41135..8447647 100644
--- a/doc/examples/inversion/test_commemi4.py
+++ b/doc/examples/inversion/test_commemi4.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/usersguide/brick.py b/doc/examples/usersguide/brick.py
index 6a7d9d7..8020177 100644
--- a/doc/examples/usersguide/brick.py
+++ b/doc/examples/usersguide/brick.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/brick_stl.py b/doc/examples/usersguide/brick_stl.py
index 7f3addf..4eef58d 100644
--- a/doc/examples/usersguide/brick_stl.py
+++ b/doc/examples/usersguide/brick_stl.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/darcy.py b/doc/examples/usersguide/darcy.py
index 4c0fb78..503abc9 100644
--- a/doc/examples/usersguide/darcy.py
+++ b/doc/examples/usersguide/darcy.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/diffusion.py b/doc/examples/usersguide/diffusion.py
index f2c3fc1..bbaf3f4 100644
--- a/doc/examples/usersguide/diffusion.py
+++ b/doc/examples/usersguide/diffusion.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/dirac.py b/doc/examples/usersguide/dirac.py
index 90f2389..8630b41 100644
--- a/doc/examples/usersguide/dirac.py
+++ b/doc/examples/usersguide/dirac.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ example to demonstrate the use of Dirac Delta functions
 """
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/fluid.py b/doc/examples/usersguide/fluid.py
index dc72a03..dee4f12 100644
--- a/doc/examples/usersguide/fluid.py
+++ b/doc/examples/usersguide/fluid.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2008-2016 by The University of Queensland
+# Copyright (c) 2008-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/usersguide/heatedblock.py b/doc/examples/usersguide/heatedblock.py
index b66999d..6851af8 100644
--- a/doc/examples/usersguide/heatedblock.py
+++ b/doc/examples/usersguide/heatedblock.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/helmholtz.py b/doc/examples/usersguide/helmholtz.py
index 701f35b..ba072ea 100644
--- a/doc/examples/usersguide/helmholtz.py
+++ b/doc/examples/usersguide/helmholtz.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/int_save.py b/doc/examples/usersguide/int_save.py
index c6dd3b4..2b9f278 100644
--- a/doc/examples/usersguide/int_save.py
+++ b/doc/examples/usersguide/int_save.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/lame.py b/doc/examples/usersguide/lame.py
index 2d66398..ca0b6fa 100644
--- a/doc/examples/usersguide/lame.py
+++ b/doc/examples/usersguide/lame.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/usersguide/lid_driven_cavity.py b/doc/examples/usersguide/lid_driven_cavity.py
index f272bd4..6b0fa03 100644
--- a/doc/examples/usersguide/lid_driven_cavity.py
+++ b/doc/examples/usersguide/lid_driven_cavity.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/mount.py b/doc/examples/usersguide/mount.py
index da6f0fd..a64a5f9 100644
--- a/doc/examples/usersguide/mount.py
+++ b/doc/examples/usersguide/mount.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/poisson.py b/doc/examples/usersguide/poisson.py
index 0fd56c7..7b84a82 100644
--- a/doc/examples/usersguide/poisson.py
+++ b/doc/examples/usersguide/poisson.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/poisson_matplotlib.py b/doc/examples/usersguide/poisson_matplotlib.py
index 67d38d0..89fa9da 100644
--- a/doc/examples/usersguide/poisson_matplotlib.py
+++ b/doc/examples/usersguide/poisson_matplotlib.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/poisson_vtk.py b/doc/examples/usersguide/poisson_vtk.py
index b6ab474..3b1b607 100644
--- a/doc/examples/usersguide/poisson_vtk.py
+++ b/doc/examples/usersguide/poisson_vtk.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division, print_function
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/quad.py b/doc/examples/usersguide/quad.py
index ddc3101..3cc6bfa 100644
--- a/doc/examples/usersguide/quad.py
+++ b/doc/examples/usersguide/quad.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/refine.py b/doc/examples/usersguide/refine.py
index da1040b..80df519 100644
--- a/doc/examples/usersguide/refine.py
+++ b/doc/examples/usersguide/refine.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/slip.py b/doc/examples/usersguide/slip.py
index ed7df6e..32c7598 100644
--- a/doc/examples/usersguide/slip.py
+++ b/doc/examples/usersguide/slip.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/trapezoid.py b/doc/examples/usersguide/trapezoid.py
index d2cf4a3..3e2afd4 100644
--- a/doc/examples/usersguide/trapezoid.py
+++ b/doc/examples/usersguide/trapezoid.py
@@ -1,7 +1,7 @@
 from __future__ import division
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@ from __future__ import division
 #
 ##############################################################################
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/examples/usersguide/voxet_reader.py b/doc/examples/usersguide/voxet_reader.py
index 6606f78..4a11097 100644
--- a/doc/examples/usersguide/voxet_reader.py
+++ b/doc/examples/usersguide/voxet_reader.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/examples/usersguide/wave.py b/doc/examples/usersguide/wave.py
index 0e57b28..d9317e2 100644
--- a/doc/examples/usersguide/wave.py
+++ b/doc/examples/usersguide/wave.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/doc/install/SConscript b/doc/install/SConscript
index ea9fb5c..da10e46 100644
--- a/doc/install/SConscript
+++ b/doc/install/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/install/allsrccommon.tex b/doc/install/allsrccommon.tex
index dc7dcfc..203f559 100644
--- a/doc/install/allsrccommon.tex
+++ b/doc/install/allsrccommon.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/binlinux.tex b/doc/install/binlinux.tex
index c111f31..5b7ec42 100644
--- a/doc/install/binlinux.tex
+++ b/doc/install/binlinux.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/binmac.tex b/doc/install/binmac.tex
index 4fe7b88..7b4a2fe 100644
--- a/doc/install/binmac.tex
+++ b/doc/install/binmac.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/chcomp.tex b/doc/install/chcomp.tex
index e36e476..27c7ea1 100644
--- a/doc/install/chcomp.tex
+++ b/doc/install/chcomp.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2014-2016 by The University of Queensland
+% Copyright (c) 2014-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/compiler.tex b/doc/install/compiler.tex
index b93b03f..18bbcda 100644
--- a/doc/install/compiler.tex
+++ b/doc/install/compiler.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/cxx11.tex b/doc/install/cxx11.tex
index 0edce0e..15a7bbf 100644
--- a/doc/install/cxx11.tex
+++ b/doc/install/cxx11.tex
@@ -12,3 +12,6 @@ Building escript from source requires that your c++ compiler supports at least t
 \end{itemize}
 The above is not exhaustive and only lists language features which are more recent that our previous baseline of c++99 (or which
 we have recently begun to rely on).
+Note that we test on up to date versions of \texttt{g++, icpc \& clang++} so they should be fine.
+
+Note that in future we may use c++14 features as well.
diff --git a/doc/install/debbin.tex b/doc/install/debbin.tex
index 61e663d..7a891f6 100644
--- a/doc/install/debbin.tex
+++ b/doc/install/debbin.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/install.tex b/doc/install/install.tex
index d89ecde..f1d727a 100644
--- a/doc/install/install.tex
+++ b/doc/install/install.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -26,7 +26,7 @@
 
 \author{Escript development team}
 \authoraddress{
-Earth Systems Science Computational Centre (ESSCC) \\
+Centre for Geoscience Computing (GeoComp) \\
 The University of Queensland \\
 Brisbane, Australia \\
 Email: \email{esys at esscc.uq.edu.au}
@@ -57,4 +57,5 @@ Email: \email{esys at esscc.uq.edu.au}
 
 \esysappendix
 \include{cxx11}
+\include{trilinos}
 \end{document}
diff --git a/doc/install/install_defs.tex b/doc/install/install_defs.tex
index 0b0eedd..fed22b8 100644
--- a/doc/install/install_defs.tex
+++ b/doc/install/install_defs.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/intro.tex b/doc/install/intro.tex
index 61489a7..3915e79 100644
--- a/doc/install/intro.tex
+++ b/doc/install/intro.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -19,13 +19,17 @@ To learn how to use \esfinley please see the Cookbook, User's guide or the API d
 \esfinley is primarily developed on Linux desktop, SGI ICE and \macosx systems.
 It can be installed in two ways:
 \begin{enumerate}
-  \item Binary packages -- ready to run with no compilation required. These will hopefully be available in upcomming Debian and Ubuntu releases so just use your normal package manager (so you don't need this guide).
+  \item Binary packages -- ready to run with no compilation required. 
+  These will hopefully be available in upcomming Debian and Ubuntu releases so just use your normal package manager (so you don't need this guide).
   \item From source -- that is, it must be compiled for your machine.
 This is the topic of this guide.
 \end{enumerate}
 
 See the site \url{https://answers.launchpad.net/escript-finley} for online help.
 Chapter~\ref{chap:source} covers installing from source.
+Appendix~\ref{app:cxxfeatures} lists some c++ features which your compiler must support in order to compile escript.
+This version of escript has the option of using \texttt{Trilinos} in addition to our regular solvers.
+Appendix~\ref{app:trilinos} covers features of \texttt{Trilinos} which escript needs. 
 
 
 
diff --git a/doc/install/source.tex b/doc/install/source.tex
index 99e9bc7..bcb0eec 100644
--- a/doc/install/source.tex
+++ b/doc/install/source.tex
@@ -1,6 +1,6 @@
 %!TEX root = install.tex
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2012-2016 by The University of Queensland
+% Copyright (c) 2012-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -39,9 +39,9 @@ See Appendix~\ref{app:cxxfeatures} for a list.
 
 Our current test compilers include:
 \begin{itemize}
- \item g++ (5 and 6)
- \item clang++ (OSX 10.11 default)
- \item intel icpc v15, v16
+ \item g++ 6
+ \item clang++ 7
+ \item intel icpc v17
 \end{itemize}
 
 Note that:
@@ -73,22 +73,15 @@ If not, then consult the documentation for your MPI libraries (or the compiler d
 If you are using MacOSX, then see the next section, if not, then skip to Section~\ref{sec:build}.
 
 \section{MacOS}
-This release of \escript has only been tested on OSX 10.11.
+This release of \escript has only been tested on OSX 10.11 and 10.12.
 For this section we assume you are using either \texttt{homebrew} or \texttt{MacPorts} as a package 
 manager\footnote{Note that package managers will make changes to your computer based on programs configured by other people from 
 various places around the internet. It is important to satisfy yourself as to the security of those systems.}.
 You can of course install prerequisite software in other ways.
 For example, we have had \emph{some} success changing the default 
 compilers used by those systems. However this is more complicated and we do not provide a guide here.
-Successful combinations of OSX and package managers are given in the table below.
 
-\begin{center}
-\begin{tabular}{|c|c|c|}\hline
- & \texttt{homebrew} & \texttt{MacPorts} \\\hline
-OSX 10.9 & Yes & No\\\hline
-OSX 10.10& Yes & Yes\\\hline
-\end{tabular}
-\end{center}
+This release has been tested with MacPorts on OSX 10.11 and 10.12 and Homebrew on OSX10.12.
 
 \noindent Both of those systems require the XCode command line tools to be installed\footnote{As of OSX10.9, the 
 command \texttt{xcode-select --install} will allow you to download and install the commandline tools.}.
@@ -122,6 +115,7 @@ All of these instructions assume that you have obtained the \escript source (and
 
 \begin{shellCode}
 sudo aptitude install python-dev python-numpy libboost-python-dev libnetcdf-dev 
+sudo aptitude install libnetcdf-cxx-legacy-dev
 sudo aptitude install scons lsb-release libboost-random-dev
 sudo aptitude install python-sympy python-matplotlib python-scipy
 sudo aptitude install python-pyproj python-gdal 
@@ -156,6 +150,7 @@ scons -j1 py_tests options_file=scons/templates/XXXX_options.py
 If you have not installed \texttt{aptitude}, then substitute \texttt{apt-get} in the following.
 \begin{shellCode}
 sudo aptitude install python-dev python-numpy libboost-python-dev 
+sudo aptitude install libnetcdf-cxx-legacy-dev
 sudo aptitude install libnetcdf-dev libboost-random-dev
 sudo aptitude install scons lsb-release
 sudo aptitude install python-sympy python-matplotlib python-scipy
@@ -184,40 +179,30 @@ scons -j1 py_tests options_file=scons/templates/XXXX_options.py
 
 
 \subsection{OpenSuse}\label{sec:susesrc}
-These instructions were prepared using release $13.2$.
+These instructions were prepared using version $42$ of Leap.
 
 \noindent Install packages from the main distribution:
 \begin{shellCode}
-sudo zypper in libboost_python1_54_0 libboost_random1_54_0 
 sudo zypper in python-devel python-numpy libnetcdf_c++-devel
 sudo zypper in python-scipy python-sympy python-matplotlib 
 sudo zypper in gcc gcc-c++ scons boost-devel netcdf-devel
 \end{shellCode}
-These will allow you to use most features except some parts of the \downunder inversion library.
-If you wish to use those, you will need some additional packages [python-pyproj, python-gdal].
-This can be done now or after Escript installation.
-
-\begin{shellCode}
-sudo zypper addrepo \ 
- http://ftp.suse.de/pub/opensuse/repositories/Application:/Geo/openSUSE_13.2/ osgf
-sudo zypper install python-pyproj python-gdal
-\end{shellCode}
 
 Now to build escript itself.
 In the escript source directory:
 \begin{shellCode}
-scons -j1 options_file=scons/templates/opensuse13.1_options.py
+scons -j1 options_file=scons/templates/opensuse_options.py
 \end{shellCode}
 
 \noindent If you wish to test your build, you can use the following:
 \begin{shellCode}
-scons -j1 py_tests options_file=scons/templates/opensuse13.1_options.py 
+scons -j1 py_tests options_file=scons/templates/opensuse_options.py 
 \end{shellCode}
 
 \noindent Now go to Section~\ref{sec:cleanup} for cleanup.
 
 \subsection{CentOS}\label{sec:centossrc}
-These instructions were prepared using CentOS release $7.0$.
+These instructions were prepared using CentOS release $7$ (from late 2016).
 The core of escript works, however some functionality is not available because the default packages for some dependencies in CentOS are too old.
 
 \noindent Add the \texttt{EPEL} repository.
@@ -250,7 +235,7 @@ scons -j1 options_file=scons/templates/centos7_0_options.py
 \noindent Now go to Section~\ref{sec:cleanup} for cleanup.
 
 \subsection{Fedora}\label{sec:fedorasrc}
-These instructions were prepared using release $21.5$.
+These instructions were prepared using the $26$ alpha.
 
 \noindent Install packages
 \begin{shellCode}
@@ -262,19 +247,19 @@ yum install boost-devel
 \noindent Now to build escript itself.
 In the escript source directory:
 \begin{shellCode}
-scons -j1 options_file=scons/templates/fedora21_5_options.py
+scons -j1 options_file=scons/templates/fedora_options.py
 \end{shellCode}
 
 \noindent If you wish to test your build, you can use the following:
 \begin{shellCode}
-scons -j1 py_tests options_file=scons/templates/fedora21_5_options.py 
+scons -j1 py_tests options_file=scons/templates/fedora_options.py 
 \end{shellCode}
 
 \noindent Now go to Section~\ref{sec:cleanup} for cleanup.
 
-\subsection{MacOS 10.10 (macports)}\label{sec:macportsrc}
+\subsection{MacOS 10.10 and later (macports)}\label{sec:macportsrc}
 
-The following will install the capabilities needed for the \texttt{macports_10.10_options.py} file.
+The following will install the capabilities needed for the \texttt{macports_10.10_options.py} file (later versions can use the same options file).
 
 \begin{shellCode}
 sudo port install scons
@@ -287,7 +272,7 @@ sudo port install py27-scipy
 sudo port install py27-pyproj
 sudo port install py27-gdal
 sudo port install netcdf-cxx
-sudo port instal silo
+sudo port install silo
 \end{shellCode}
 
 \begin{shellCode}
@@ -295,7 +280,7 @@ scons -j1 options_file=scons/templates/macports_10.10options.py
 \end{shellCode}
 
 
-\subsection{MacOS 10.9, 10.10 (homebrew)}\label{sec:homebrewsrc}
+\subsection{MacOS 10.10 and later (homebrew)}\label{sec:homebrewsrc}
 
 The following will install the capabilities needed for the \texttt{homebrew_10.10_options.py} file.
 OSX 10.9 can use the same file.
@@ -456,14 +441,12 @@ plug-in to allow direct visualisation of escript simulations.
 
 
 \subsection{Trilinos}
-\escript has now some support for Trilinos\footnote{\url{https://trilinos.org/}}
+\escript now has some support for Trilinos\footnote{\url{https://trilinos.org/}}
 solvers and preconditioners.
 The most significant limitation is that the current Trilinos release does not
 support block matrices so \escript can only use Trilinos solvers for single
 PDEs (i.e. no PDE systems).
 
 If your distribution does not provide Trilinos packages you can build a working
-version from source.
-\ldots
-%provide cmake command here
+version from source. (See Appendix~\ref{app:trilinos})
 
diff --git a/doc/install/srcadditional.tex b/doc/install/srcadditional.tex
index 207a844..fc973ba 100644
--- a/doc/install/srcadditional.tex
+++ b/doc/install/srcadditional.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/srclinux.tex b/doc/install/srclinux.tex
index e651e48..9805797 100644
--- a/doc/install/srclinux.tex
+++ b/doc/install/srclinux.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/srcmac.tex b/doc/install/srcmac.tex
index 6491f35..cea87ca 100644
--- a/doc/install/srcmac.tex
+++ b/doc/install/srcmac.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/install/trilinos.tex b/doc/install/trilinos.tex
new file mode 100644
index 0000000..289df27
--- /dev/null
+++ b/doc/install/trilinos.tex
@@ -0,0 +1,100 @@
+\chapter{Trilinos}
+\label{app:trilinos}
+
+In order to solve PDEs with complex coefficients, escript needs to be compiled with \texttt{Trilinos} support.
+This requires that your version of Trilinos has certain features enabled.
+Since some precompiled distributions of \texttt{Trilinos} are not built with these features, you may 
+need to compile \texttt{Trilinos} yourself as well.
+
+While we can't provide support for building \texttt{Trilinos}, we do list below, a configuration file which seems to work for 
+under Debian 9 ``stretch''\footnote{At time of writing, \texttt{stretch} is still in testing, but is due to release this month}.
+
+\section{Debian ``stretch'' configuration}
+
+
+\subsection{Required packages}
+
+The following packages should be installed to attempt this build:
+\begin{itemize}
+\item[] cmake
+\item[] g++
+\item[] libsuitesparse-dev
+\item[] libmumps-dev
+\item[] libboost-dev
+\item[] libparmetis-dev
+\item[] libmetis-dev
+\item[] libcppunit-dev
+\end{itemize}
+
+
+
+\subsection{Configuration file}
+
+\begin{verbatim}
+#!/bin/sh
+# SuperLu has build issues and escript doesn't _need_ it.
+DIR=build_hybrid
+ROOT=`pwd`
+mkdir -p $DIR || exit 1
+cd $DIR
+cmake -D CMAKE_CXX_COMPILER=`which mpic++` \
+      -D CMAKE_C_COMPILER=`which mpicc` \
+      -D CMAKE_Fortran_COMPILER=`which mpif77` \
+      -D CMAKE_INSTALL_PREFIX=/opt/trilinos/ \
+      -D BUILD_SHARED_LIBS=ON \
+      -D TPL_ENABLE_BLAS=ON \
+      -D TPL_ENABLE_Boost=ON \
+      -D TPL_ENABLE_Cholmod=ON \
+      -D TPL_ENABLE_CppUnit=ON \
+      -D TPL_ENABLE_LAPACK=ON \
+      -D TPL_ENABLE_METIS=ON \
+      -D TPL_ENABLE_MPI=ON \
+      -D TPL_ENABLE_MUMPS=ON \
+      -D TPL_ENABLE_ParMETIS=ON \
+      -D TPL_ENABLE_Pthread=OFF \
+      -D TPL_ENABLE_SCALAPACK=ON \
+      -D TPL_ENABLE_Scotch=OFF \
+      -D TPL_ENABLE_SuperLU=OFF \
+      -D TPL_ENABLE_UMFPACK=ON \
+      -D TPL_BLAS_INCLUDE_DIRS=/usr/include/suitesparse \
+      -D TPL_Cholmod_INCLUDE_DIRS=/usr/include/suitesparse \
+      -D TPL_Cholmod_LIBRARIES='/usr/lib/x86_64-linux-gnu/libcholmod.so;\
+/usr/lib/x86_64-linux-gnu/libamd.so;/usr/lib/x86_64-linux-gnu/libcolamd.so' \
+      -D TPL_SuperLU_INCLUDE_DIRS=/usr/include/superlu \
+      -D TPL_UMFPACK_INCLUDE_DIRS=/usr/include/suitesparse \
+      -D TPL_SCALAPACK_LIBRARIES=/usr/lib/libscalapack-openmpi.so \
+      -D Trilinos_ENABLE_Amesos2=ON \
+      -D Trilinos_ENABLE_Belos=ON \
+      -D Trilinos_ENABLE_Ifpack2=ON \
+      -D Trilinos_ENABLE_Kokkos=ON \
+      -D Trilinos_ENABLE_MueLu=ON \
+      -D Trilinos_ENABLE_OpenMP=ON \
+      -D Trilinos_ENABLE_Teuchos=ON \
+      -D Trilinos_ENABLE_Tpetra=ON \
+      -D Trilinos_ENABLE_AztecOO=OFF \
+      -D Trilinos_ENABLE_Galeri=OFF \
+      -D Trilinos_ENABLE_Ifpack=OFF \
+      -D Trilinos_ENABLE_Isorropia=OFF \
+      -D Trilinos_ENABLE_ML=OFF \
+      -D Trilinos_ENABLE_Thyra=OFF \
+      -D Trilinos_ENABLE_Zoltan=ON \
+      -D Trilinos_ENABLE_Zoltan2=ON \
+      -D Trilinos_ENABLE_EXPLICIT_INSTANTIATION=ON \
+      -D Tpetra_INST_COMPLEX_DOUBLE=ON \
+      -D Tpetra_INST_INT_LONG=OFF \
+      -D Tpetra_INST_LONG_LONG=OFF \
+      -D Tpetra_INST_INT_LONG_LONG=OFF \
+      -D TpetraKernels_ENABLE_Experimental=ON \
+      -D Amesos_ENABLE_EpetraExt=OFF \
+      -D Amesos2_ENABLE_MUMPS=ON \
+      -D Amesos2_ENABLE_Epetra=OFF \
+      -D Amesos2_ENABLE_EpetraExt=OFF \
+      -D Belos_ENABLE_Epetra=OFF \
+      -D Belos_ENABLE_EpetraExt=OFF \
+      -D MueLu_ENABLE_Amesos=OFF \
+      -D MueLu_ENABLE_Epetra=OFF \
+      -D MueLu_ENABLE_EpetraExt=OFF \
+      -D Trilinos_ENABLE_TESTS=OFF \
+      -D MueLu_ENABLE_TESTS=OFF \
+      $ROOT 2>&1 | tee config.log
+\end{verbatim}
diff --git a/doc/inversion/CookDcRes.tex b/doc/inversion/CookDcRes.tex
index caab6d4..2f9c57c 100644
--- a/doc/inversion/CookDcRes.tex
+++ b/doc/inversion/CookDcRes.tex
@@ -1,6 +1,6 @@
 %!TEX root = inversion.tex
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/Forward2DMTTEMode.tex b/doc/inversion/Forward2DMTTEMode.tex
index 36cdec7..ee93277 100644
--- a/doc/inversion/Forward2DMTTEMode.tex
+++ b/doc/inversion/Forward2DMTTEMode.tex
@@ -1,6 +1,6 @@
 %!TEX root = inversion.tex
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/ForwardDCRES.tex b/doc/inversion/ForwardDCRES.tex
index 2cc573b..ddbdc82 100644
--- a/doc/inversion/ForwardDCRES.tex
+++ b/doc/inversion/ForwardDCRES.tex
@@ -1,6 +1,6 @@
 %!TEX root = inversion.tex
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/ForwardGravity.tex b/doc/inversion/ForwardGravity.tex
index 72807a8..e031094 100644
--- a/doc/inversion/ForwardGravity.tex
+++ b/doc/inversion/ForwardGravity.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/ForwardMagnetic.tex b/doc/inversion/ForwardMagnetic.tex
index 781e433..7ccc520 100644
--- a/doc/inversion/ForwardMagnetic.tex
+++ b/doc/inversion/ForwardMagnetic.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/ForwardMagneticIntensity.tex b/doc/inversion/ForwardMagneticIntensity.tex
new file mode 100644
index 0000000..8e32f17
--- /dev/null
+++ b/doc/inversion/ForwardMagneticIntensity.tex
@@ -0,0 +1,172 @@
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Copyright (c) 2003-2017 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)
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\section{Linear Magnetic Intensity Inversion}\label{sec:forward magnetic intensity}
+An alternative target for then inversion is the intensity anomaly of the magnetic flux
+density. In this case the difference $b$ of the length of the total flux
+density $B^{tot}=B^b+B$ to the back ground flux density $B^b$~\index{magnetic flux density}:
+\begin{equation}\label{ref:IMAG:EQU:0}
+b=\|B^{tot}\| -\|B^{b}\|
+\end{equation}
+where is the Euclean norm is defined as  
+\begin{equation}\label{ref:IMAG:EQU:1}
+\|B\| =  \sqrt{B_i B_i}
+\end{equation}
+and we use the notations of the previous section~\ref{sec:forward magnetic}.   
+We have 
+\begin{equation}\label{ref:IMAG:EQU:1b}
+\|B^{tot}\|^2 = \|B^{b}\|^2 + 2 B^{b}_i B_i + \|B\|^2 \approx  \|B^{b}\|^2 + 2 B^{b}_i B_i
+\end{equation}
+where the term $\|B\|^2$ of the anomaly can is assumed to be neglagable. 
+This gives 
+\begin{equation}\label{ref:IMAG:EQU:1bb}
+\|B^{tot}\|  = \|B^{b}\| \sqrt{1 + \frac{2 B^{b}_i B_i}{\|B^{b}\|^2}} \approx  \|B^{b}\| \left(1 + \frac{B^{b}_i B_i}{\|B^{b}\|^2} \right) 
+\end{equation}
+and therefore
+\begin{equation}\label{ref:IMAG:EQU:0b}
+b= \frac{B^{b}_i B_i}{\|B^{b}\|}  = \hat{B}^{b}_i B_i \mbox{ with } \hat{B}^{b}_i = \frac{B^b_i}{\|B^{b}\|} 
+\end{equation}
+If $b^{(s)}_i$ is the measurement of the magnetic flux density intensity anomaly for
+survey $s$ and $\omega^{(s)}$ is a weighting factor the data defect
+$J^{mag}(k)$ in the notation of Chapter~\ref{chapter:ref:inversion cost function} is given as
+\begin{equation}\label{ref:IMAG:EQU:9}
+J^{mag}(k) = \frac{1}{2}\sum_{s} \int_{\Omega} \left( \omega^{(s)} \cdot ( \hat{B}^{b}_i B_i - b^{(s)} )\right)^2 dx
+\end{equation} 
+
+The cost function kernel\index{cost function!kernel} is given as
+\begin{equation}\label{ref:IMAG:EQU:10}
+K^{mag}(\psi_{,i},k) = \frac{1}{2}\sum_{s} \left( \omega^{(s)} \cdot (k \cdot  \|B^{b}\|  -  \hat{B}^{b}_i \psi_{,i} - b^{(s)}) \right)^2
+\end{equation} 
+Notice that if magnetic flux density is measured in air one can ignore the
+$k\cdot B^b_i$ as the susceptibility is zero.
+
+In practice the magnetic flux density intensity $b^{(s)}$ is measured 
+with a standard error deviation $\sigma^{(s)}$ at certain locations in the domain.
+In this case one sets the weighting
+factors $\omega^{(s)}$ as
+\begin{equation}\label{ref:IMAG:EQU:11}
+\omega^{(s)} 
+= \left\{
+\begin{array}{lcl}
+f \cdot  \frac{f}{\sigma^{(s)}} & & \mbox{data are available} \\
+& \mbox{ where } & \\
+0 & & \mbox{ otherwise } \\
+\end{array}
+\right.
+\end{equation} 
+With the objective to control the 
+gradient of the cost function the scaling factor $f$ is chosen in the way that 
+\begin{equation}\label{ref:IMAG:EQU:12}
+\sum_{s} \int_{\Omega} ( \omega^{(s)}_i B^{(s)}_i ) 
+ \cdot ( \omega^{(s)}_j \frac{1}{L_j} ) \cdot L^2 \cdot
+( B^b_n \frac{1}{L_n} )
+ \cdot k' \;
+ dx =\alpha
+\end{equation} 
+where $\alpha$ defines a scaling factor which is typically set to one and $L$ is defined by equation~(\ref{ref:EQU:REG:6b}).
+$k'$ is considering the 
+derivative of the density with respect to the level set function. 
+
+
+
+\subsection{Usage}
+
+\begin{classdesc}{MagneticIntensityModel}{domain, w, b, background_field,
+        \optional{, fixPotentialAtBottom=False},
+        \optional{, tol=1e-8},
+}
+opens a magnetic forward model over the \Domain \member{domain} with 
+weighting factors \member{w} ($=\omega^{(s)}$) and measured magnetic flux
+density anomalies \member{b} ($=b^{(s)}$).
+The weighting factors and the  measured magnetic flux density anomalies must be scalars.
+\member{background_field} defines the background magnetic flux density $B^b$
+as a vector with north, east and vertical components. 
+\member{tol} sets the tolerance for the solution of the PDE~(\ref{ref:MAG:EQU:8}).
+If \member{fixPotentialAtBottom} is set to  \True, the magnetic potential 
+at the bottom is set to zero in addition to the potential on the top. 
+\member{coordinates} set the reference coordinate system to be used. By the default the 
+Cartesian coordinate system is used.
+\end{classdesc}
+
+\begin{methoddesc}[MagneticModel]{rescaleWeights}{
+        \optional{scale=1.}
+ \optional{k_scale=1.}}
+rescale the weighting factors such condition~(\ref{ref:IMAG:EQU:12}) holds where 
+\member{scale} sets the scale $\alpha$
+and \member{k_scale} sets $k'$. This method should be called before any inversion is started
+in order to make sure that all components of the cost function are appropriately scaled.
+\end{methoddesc}
+
+
+\subsection{Gradient Calculation}
+This section briefly explains how the gradient
+$\frac{\partial J^{mag}}{\partial k}$ of the cost function $J^{mag}$ with
+respect to the susceptibility $k$ is calculated.  We follow the concept as outlined in section~\ref{chapter:ref:inversion cost function:gradient}.
+
+The magnetic potential $\psi$ from PDE~(\ref{ref:MAG:EQU:8}) is solved in weak form:
+\begin{equation}\label{ref:IMAG:EQU:201}
+\int_{\Omega} q_{,i} \psi_{,i} \; dx  = \int_{\Omega}  k \cdot q_{,i}  B^r_i \; dx 
+\end{equation} 
+for all $q$ with $q=0$ on $\Gamma_{0}$.
+In the following we set $\Psi[k]=\psi$ for a given susceptibility $k$ as
+solution of the variational problem~(\ref{ref:MAG:EQU:201}).
+If $\Gamma_{k}$ denotes the region of the domain where the susceptibility is
+known and for a given direction $p$ with $p=0$ on $\Gamma_{k}$ one has
+\begin{equation}\label{ref:IMAG:EQU:201aa}
+\int_{\Omega}   \frac{\partial J^{mag}}{\partial k} \cdot p \; dx  = \int_{\Omega}  
+\sum_{s} 
+\omega^{(s)} \; \left(b^{(s)} - k \cdot  \|B^{b}\|  +  \hat{B}^{b}_i \psi_{,i}  \right)
+\cdot \omega^{(s)} \; \left(\hat{B}^{b}_i \Psi[p]_{,i} - p \cdot  \|B^{b}\| \right) \; dx  
+\end{equation}
+With
+\begin{equation}\label{ref:IMAG:EQU:202c}
+Y_i[\psi]=   \sum_{s} 
+(\omega^{(s)})^2 
+\left(b^{(s)} - k \cdot  \|B^{b}\|  +  \hat{B}^{b}_i \psi_{,i} \right) \hat{B}^{b}_i
+\end{equation} 
+this is written as 
+\begin{equation}\label{ref:IMAG:EQU:202cc}
+\int_{\Omega}   \frac{\partial J^{mag}}{\partial k} \cdot p \;  dx  = \int_{\Omega}  
+(Y_i[\psi] \Psi[p]_{,i} -p \cdot Y_i[\psi]B^b_i)   \; dx  
+\end{equation} 
+We then set adjoint function $Y^*[\psi]$ as the solution of the equation 
+\begin{equation}\label{ref:IMAG:EQU:202d}
+\int_{\Omega} r_{,i} Y^*[\psi]_{,i} \; dx  =  \int_{\Omega} r_{,i} Y_i[\psi]  \; dx  \mbox{ for all } r \mbox{ with } r=0 \mbox{ on } \Gamma_{0}
+\end{equation} 
+with $Y^*[\psi]=0$ on $\Gamma_{0}$. With $r=\Psi[p]$ we get
+\begin{equation}\label{ref:IMAG:EQU:202dd}
+\int_{\Omega} \Psi[p]_{,i} Y^*[\psi]_{,i} \; dx  =  \int_{\Omega} \Psi[p]_{,i} Y_i[\psi]  \; dx
+\end{equation} 
+and from Equation~(\ref{ref:IMAG:EQU:201}) with $q=Y^*[\psi]$ we get
+\begin{equation}\label{ref:IMAG:EQU:20e}
+\int_{\Omega} Y^*[\psi]_{,i}  \Psi[p]_{,i} \; dx  = \int_{\Omega}  p \cdot Y^*[\psi]_{,i}  B^r_i \; dx  
+\end{equation}
+which leads to 
+\begin{equation}\label{ref:IMAG:EQU:20ee}
+\int_{\Omega} \Psi[p]_{,i} ,Y_i[\psi]  \; dx  = \int_{\Omega}  p \cdot Y^*[\psi]_{,i}  B^r_i \; dx  
+\end{equation}
+and finally
+\begin{equation}\label{ref:IMAG:EQU:201a}
+\int_{\Omega}   \frac{\partial J^{mag}}{\partial k} \cdot p \;  dx  = \int_{\Omega}  
+p \cdot (Y^*[\psi]_{,i}  B^r_i - Y_i[\psi] B^b_i) \; dx  
+\end{equation} 
+or 
+\begin{equation}\label{ref:IMAG:EQU:201b}
+\frac{\partial J^{mag}}{\partial k} = Y^*[\psi]_{,i}  B^r_i - Y_i[\psi] B^b_i
+\end{equation}
+
+\subsection{Geodetic Coordinates}
+Not supported yet.
diff --git a/doc/inversion/ForwardModels.tex b/doc/inversion/ForwardModels.tex
index 7733bbe..c11979a 100644
--- a/doc/inversion/ForwardModels.tex
+++ b/doc/inversion/ForwardModels.tex
@@ -2,6 +2,7 @@
 
 \input{ForwardGravity}
 \input{ForwardMagnetic}
+\input{ForwardMagneticIntensity}
 \input{ForwardSelfMagnetic}
 \input{Forward2DMTTEMode}
 \input{ForwardDCRES}
diff --git a/doc/inversion/ForwardSelfMagnetic.tex b/doc/inversion/ForwardSelfMagnetic.tex
index f8b10ab..766e9ad 100644
--- a/doc/inversion/ForwardSelfMagnetic.tex
+++ b/doc/inversion/ForwardSelfMagnetic.tex
@@ -1,5 +1,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/Minimization.tex b/doc/inversion/Minimization.tex
index 702a01f..81087dd 100644
--- a/doc/inversion/Minimization.tex
+++ b/doc/inversion/Minimization.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/SConscript b/doc/inversion/SConscript
index b3f84fc..ed37ceb 100644
--- a/doc/inversion/SConscript
+++ b/doc/inversion/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/inversion/defs.tex b/doc/inversion/defs.tex
index ecabdba..a4e5fe0 100644
--- a/doc/inversion/defs.tex
+++ b/doc/inversion/defs.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/intro.tex b/doc/inversion/intro.tex
index 1782990..1bf79dd 100644
--- a/doc/inversion/intro.tex
+++ b/doc/inversion/intro.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/inversion/inversion.tex b/doc/inversion/inversion.tex
index 5097396..2aa93e8 100644
--- a/doc/inversion/inversion.tex
+++ b/doc/inversion/inversion.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -42,7 +42,7 @@ St. Lucia, QLD 4072, Australia.}
 \maketitle
 
 \begin{center}
-Copyright (c) 2012--2016 by The University of Queensland	\\
+Copyright (c) 2012--2017 by The University of Queensland	\\
 \url{http://www.uq.edu.au}				\\
 Primary Business: Queensland, Australia			\\
 Licensed under the Apache License, version 2.0	\\
diff --git a/doc/sphinx_api/SConscript b/doc/sphinx_api/SConscript
index e570bec..f125944 100644
--- a/doc/sphinx_api/SConscript
+++ b/doc/sphinx_api/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/sphinx_api/genrst.py b/doc/sphinx_api/genrst.py
index fd0eca3..773200b 100755
--- a/doc/sphinx_api/genrst.py
+++ b/doc/sphinx_api/genrst.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/user/Models.tex b/doc/user/Models.tex
index a5c4b62..5a6b0a4 100644
--- a/doc/user/Models.tex
+++ b/doc/user/Models.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/SConscript b/doc/user/SConscript
index 039ef7e..7d4f3b5 100644
--- a/doc/user/SConscript
+++ b/doc/user/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/doc/user/TutorialPDE.tex b/doc/user/TutorialPDE.tex
index 8d6f5d2..65ff14c 100644
--- a/doc/user/TutorialPDE.tex
+++ b/doc/user/TutorialPDE.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/appendix.tex b/doc/user/appendix.tex
index 23e6392..1e687f9 100644
--- a/doc/user/appendix.tex
+++ b/doc/user/appendix.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/changes.tex b/doc/user/changes.tex
index 3bca93e..1f5e792 100644
--- a/doc/user/changes.tex
+++ b/doc/user/changes.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -16,6 +16,26 @@
 \chapter{Changes from previous releases}
 \label{app:changes}
 
+\subsection*{5.1}
+\begin{itemize}
+  \item Improvements to maths using complex values.
+	  Note: Use the \texttt{promote()} method on Data objects (added in 5.0) to convert them to complex. 
+This does not change the value itself, (eg $7 \rightarrow 7+0j$) but matters for operations like \emph{sqrt} which behave differently with complex inputs.
+  \item Added \texttt{phase} operation to return the angular part/phase/arg of values.
+  \item Improved inversion.
+  \item Corrections to $\cdot\_transpose\_product$ operations.
+  \item Improved ``integration'' testing.
+  \item NetCDF support (if enabled), can now be built with support for netcdf-4 formatted files.
+  See \texttt{scons/templates/README_FIRST} for the options.
+  \item Support for lazy expressions with complex values.
+  \item Solving PDEs with complex coefficients requires Trilinos support.
+  Since escript requires features which are not 
+  compiled in by default, please consult the install guide if you wish to make use of
+  this feature.
+  \item Note that in the $4.2.0.1$ release, the license for the escript source code was changed to ``Apache2''. 
+  This should be less restrictive than the previous license.  
+\end{itemize}
+
 \subsection*{5.0}
 \begin{itemize}
   \item Minimum Python version is now 2.7.
diff --git a/doc/user/darcyflux.tex b/doc/user/darcyflux.tex
index e7a2b77..6535d15 100644
--- a/doc/user/darcyflux.tex
+++ b/doc/user/darcyflux.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/diffusion.tex b/doc/user/diffusion.tex
index 9111fcd..e03597c 100644
--- a/doc/user/diffusion.tex
+++ b/doc/user/diffusion.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/dirac.tex b/doc/user/dirac.tex
index c678cfb..ca2dee3 100644
--- a/doc/user/dirac.tex
+++ b/doc/user/dirac.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/escript.tex b/doc/user/escript.tex
index 132b5e6..a4141b3 100644
--- a/doc/user/escript.tex
+++ b/doc/user/escript.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/execute.tex b/doc/user/execute.tex
index 301db14..a5fca49 100644
--- a/doc/user/execute.tex
+++ b/doc/user/execute.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/faultsystem.tex b/doc/user/faultsystem.tex
index 0ea0af7..15d0e6e 100644
--- a/doc/user/faultsystem.tex
+++ b/doc/user/faultsystem.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/finley.tex b/doc/user/finley.tex
index 104ee61..a58d008 100644
--- a/doc/user/finley.tex
+++ b/doc/user/finley.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/finleyelements.tex b/doc/user/finleyelements.tex
index a5ec829..9e1394e 100644
--- a/doc/user/finleyelements.tex
+++ b/doc/user/finleyelements.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/firststep.tex b/doc/user/firststep.tex
index 456e3df..e93680d 100644
--- a/doc/user/firststep.tex
+++ b/doc/user/firststep.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/heatedblock.tex b/doc/user/heatedblock.tex
index a96010b..7ef697c 100644
--- a/doc/user/heatedblock.tex
+++ b/doc/user/heatedblock.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/levelset.tex b/doc/user/levelset.tex
index bca7097..ed1f790 100644
--- a/doc/user/levelset.tex
+++ b/doc/user/levelset.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/levelsetmodel.tex b/doc/user/levelsetmodel.tex
index c0f28fa..3175019 100644
--- a/doc/user/levelsetmodel.tex
+++ b/doc/user/levelsetmodel.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/linearPDE.tex b/doc/user/linearPDE.tex
index a22da0d..204f2e3 100644
--- a/doc/user/linearPDE.tex
+++ b/doc/user/linearPDE.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/lumping.tex b/doc/user/lumping.tex
index 2223c4b..562d1b9 100644
--- a/doc/user/lumping.tex
+++ b/doc/user/lumping.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/modelframe.tex b/doc/user/modelframe.tex
index 2e22767..aed781e 100644
--- a/doc/user/modelframe.tex
+++ b/doc/user/modelframe.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/nonlinearPDE.tex b/doc/user/nonlinearPDE.tex
index 433fc07..1af7b79 100644
--- a/doc/user/nonlinearPDE.tex
+++ b/doc/user/nonlinearPDE.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/notation.tex b/doc/user/notation.tex
index 4240e8c..f6b415a 100644
--- a/doc/user/notation.tex
+++ b/doc/user/notation.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/ourrefs.tex b/doc/user/ourrefs.tex
index e979b40..a92cfa6 100644
--- a/doc/user/ourrefs.tex
+++ b/doc/user/ourrefs.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/py3.tex b/doc/user/py3.tex
index fc52399..1909ee9 100644
--- a/doc/user/py3.tex
+++ b/doc/user/py3.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 \chapter{Python3 Support}\label{app:py3}
 
-\textbf{We are not dropping support for recent \pythontwo releases.} ($2.6$ or later is still supported) \\
+\textbf{We are not dropping support for recent \pythontwo releases, \textsl{yet}.} ($2.7$ or later is still supported) \\
 All we are doing is preparing for the time when \pythonthree is used more widely.
 
 \escript compiles and passes tests under \pythonthree.
diff --git a/doc/user/pycad.tex b/doc/user/pycad.tex
index 0b790b1..d6a9e80 100644
--- a/doc/user/pycad.tex
+++ b/doc/user/pycad.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/ripley.tex b/doc/user/ripley.tex
index 1b6dd35..983467c 100644
--- a/doc/user/ripley.tex
+++ b/doc/user/ripley.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/slip.tex b/doc/user/slip.tex
index ee387b9..e2e4869 100644
--- a/doc/user/slip.tex
+++ b/doc/user/slip.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/speckley.tex b/doc/user/speckley.tex
index 1391885..2b187a1 100644
--- a/doc/user/speckley.tex
+++ b/doc/user/speckley.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/stokesflow.tex b/doc/user/stokesflow.tex
index 1624cbe..813cab5 100644
--- a/doc/user/stokesflow.tex
+++ b/doc/user/stokesflow.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/stokessolver.tex b/doc/user/stokessolver.tex
index ff1aefa..4eafc9e 100644
--- a/doc/user/stokessolver.tex
+++ b/doc/user/stokessolver.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/subworlds.tex b/doc/user/subworlds.tex
index 86e6b1d..26f572f 100644
--- a/doc/user/subworlds.tex
+++ b/doc/user/subworlds.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c)2015-2016 by The University of Queensland
+% Copyright (c)2015-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/symbolic.tex b/doc/user/symbolic.tex
index a1ba35c..dee8635 100644
--- a/doc/user/symbolic.tex
+++ b/doc/user/symbolic.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/user.tex b/doc/user/user.tex
index 2d4153a..41696b2 100644
--- a/doc/user/user.tex
+++ b/doc/user/user.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
@@ -78,6 +78,7 @@ solvers.
 
 This release comes with some significant changes and new features.
 Please see Appendix~\ref{app:changes} for a detailed list.
+In particular, if you wish to solve PDEs with complex coefficients, please consult the install guide regarding Trilinos support.
 
 If you use this software in your research, then we would appreciate (but do not
 require) a citation.
diff --git a/doc/user/user_defs.tex b/doc/user/user_defs.tex
index 4136122..e762b72 100644
--- a/doc/user/user_defs.tex
+++ b/doc/user/user_defs.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/wave.tex b/doc/user/wave.tex
index 8d7bd27..f95f806 100644
--- a/doc/user/wave.tex
+++ b/doc/user/wave.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/user/weipa.tex b/doc/user/weipa.tex
index 830071c..b9409a0 100644
--- a/doc/user/weipa.tex
+++ b/doc/user/weipa.tex
@@ -1,6 +1,6 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Copyright (c) 2003-2016 by The University of Queensland
+% Copyright (c) 2003-2017 by The University of Queensland
 % http://www.uq.edu.au
 %
 % Primary Business: Queensland, Australia
diff --git a/doc/verinfo.tex b/doc/verinfo.tex
index fb732d1..8fe899c 100644
--- a/doc/verinfo.tex
+++ b/doc/verinfo.tex
@@ -1,7 +1,7 @@
 
-\newcommand{\relver}{5.0}
-\newcommand{\reldate}{19 Sep 2016}
+%\newcommand{\relver}{4.2}
+%\newcommand{\reldate}{24 July 2015}
 
-%\newcommand{\relver}{development}
-%\newcommand{\reldate}{\today}
+\newcommand{\relver}{5.1}
+\newcommand{\reldate}{8 June 2017}
 
diff --git a/downunder/py_src/SConscript b/downunder/py_src/SConscript
index 8b44b44..38f5771 100644
--- a/downunder/py_src/SConscript
+++ b/downunder/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/downunder/py_src/__init__.py b/downunder/py_src/__init__.py
index bc3b956..398782d 100644
--- a/downunder/py_src/__init__.py
+++ b/downunder/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/coordinates.py b/downunder/py_src/coordinates.py
index f463116..a58b1bf 100644
--- a/downunder/py_src/coordinates.py
+++ b/downunder/py_src/coordinates.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/costfunctions.py b/downunder/py_src/costfunctions.py
index a26a4e8..2e5942f 100644
--- a/downunder/py_src/costfunctions.py
+++ b/downunder/py_src/costfunctions.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/datasources.py b/downunder/py_src/datasources.py
index 0864cf3..718b84f 100644
--- a/downunder/py_src/datasources.py
+++ b/downunder/py_src/datasources.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -737,7 +737,13 @@ class NetCdfData(DataSource):
 
     def getDataType(self):
         return self.__data_type
-
+        
+    def getScaleFactor(self):
+        """
+        returns the data scale factor for adjusting measurement to SI
+        """
+        return self.__scale_factor
+        
     def getSurveyData(self, domain, origin, NE, spacing):
         if not HAS_RIPLEY:
             raise RuntimeError("Ripley module not available for reading")
diff --git a/downunder/py_src/dcresistivityforwardmodeling.py b/downunder/py_src/dcresistivityforwardmodeling.py
index acac872..4e4bdee 100644
--- a/downunder/py_src/dcresistivityforwardmodeling.py
+++ b/downunder/py_src/dcresistivityforwardmodeling.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/downunder/py_src/domainbuilder.py b/downunder/py_src/domainbuilder.py
index 71d6cb7..e4ff302 100644
--- a/downunder/py_src/domainbuilder.py
+++ b/downunder/py_src/domainbuilder.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/__init__.py b/downunder/py_src/forwardmodels/__init__.py
index d749504..0b0b80c 100644
--- a/downunder/py_src/forwardmodels/__init__.py
+++ b/downunder/py_src/forwardmodels/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ from __future__ import print_function, division
 
 """Collection of forward models that define the inversion problem"""
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/acoustic.py b/downunder/py_src/forwardmodels/acoustic.py
index 6197e7c..c4205be 100644
--- a/downunder/py_src/forwardmodels/acoustic.py
+++ b/downunder/py_src/forwardmodels/acoustic.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """Forward model for acoustic wave forms"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/base.py b/downunder/py_src/forwardmodels/base.py
index 2ad7422..d4a0361 100644
--- a/downunder/py_src/forwardmodels/base.py
+++ b/downunder/py_src/forwardmodels/base.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -139,7 +139,11 @@ class ForwardModelWithPotential(ForwardModel):
         self.__weight=[1.*ow for ow in self.__origweight]
 
         for s in range(len(self.__weight)):
-            A += integrate(abs(inner(self.__weight[s], self.__data[s]) * inner(self.__weight[s], 1/self.edge_lengths) * fetch_factor))
+            if self.__data[s].getShape() == ():
+               ff=self.__weight[s]**2*self.__data[s]/length(self.edge_lengths)
+            else:
+               ff=inner(self.__weight[s], self.__data[s]) * inner(self.__weight[s], 1/self.edge_lengths)
+            A += integrate(abs(ff * fetch_factor))
         if A > 0:
             A=sqrt(scale/A)/self.diameter
             if not self.__trafo.isCartesian():
@@ -157,6 +161,29 @@ class ForwardModelWithPotential(ForwardModel):
         """
         return self.__domain
 
+    def getMisfitWeights(self):
+        """
+        Returns the weights of the misfit function
+          
+        :rtype: ``list`` of ``Data``
+        """
+        return self.__weight
+
+    def getData(self):
+        """
+        Returns the data
+
+        :rtype: ``list`` of ``Data``
+        """
+        return self.__data
+    def getDataFunctionSpace(self):
+        """
+        Returns the ``FunctionSpace`` of the data
+
+        :rtype: ``FunctionSpace``
+        """
+        return self.getData()[0].getFunctionSpace()
+        
     def getCoordinateTransformation(self):
         """
         returns the coordinate transformation being used
diff --git a/downunder/py_src/forwardmodels/dcresistivity.py b/downunder/py_src/forwardmodels/dcresistivity.py
index 7098a9b..4d1f665 100644
--- a/downunder/py_src/forwardmodels/dcresistivity.py
+++ b/downunder/py_src/forwardmodels/dcresistivity.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """Forward model for DC Resistivity"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/gravity.py b/downunder/py_src/forwardmodels/gravity.py
index e7bd247..de29fa0 100644
--- a/downunder/py_src/forwardmodels/gravity.py
+++ b/downunder/py_src/forwardmodels/gravity.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """Forward model for gravity (Bouguer) anomaly"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/magnetic.py b/downunder/py_src/forwardmodels/magnetic.py
index 29db21b..e775f41 100644
--- a/downunder/py_src/forwardmodels/magnetic.py
+++ b/downunder/py_src/forwardmodels/magnetic.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,16 +16,17 @@ from __future__ import division, print_function
 
 """Forward models for magnetic fields"""
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 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"
 
-__all__ = ['MagneticModel', 'SelfDemagnetizationModel']
+__all__ = ['MagneticModel', 'SelfDemagnetizationModel', 'MagneticIntensityModel']
 
 from .base import ForwardModelWithPotential
+from esys.escript import Scalar
 from esys.escript.util import *
 
 
@@ -58,7 +59,7 @@ class MagneticModel(ForwardModelWithPotential):
         :type fixPotentialAtBottom: ``bool``
         """
         super(MagneticModel, self).__init__(domain, w, B, coordinates, fixPotentialAtBottom, tol)
-        background_magnetic_flux_density=interpolate(background_magnetic_flux_density, B[0].getFunctionSpace())
+        background_magnetic_flux_density=interpolate(background_magnetic_flux_density, self.getDataFunctionSpace() )
         if not self.getCoordinateTransformation().isCartesian():
             s = self.getCoordinateTransformation().getScalingFactors()
             v = self.getCoordinateTransformation().getVolumeFactor()
@@ -180,7 +181,7 @@ class SelfDemagnetizationModel(ForwardModelWithPotential):
         """
         super(SelfDemagnetizationModel, self).__init__(domain, w, B, coordinates, fixPotentialAtBottom, tol)
         #=========================================================
-        background_magnetic_flux_density = interpolate(background_magnetic_flux_density, B[0].getFunctionSpace())
+        background_magnetic_flux_density = interpolate(background_magnetic_flux_density, self.getDataFunctionSpace())
         if not self.getCoordinateTransformation().isCartesian():
             s = self.getCoordinateTransformation().getScalingFactors()
             v = self.getCoordinateTransformation().getVolumeFactor()
@@ -299,3 +300,133 @@ class SelfDemagnetizationModel(ForwardModelWithPotential):
         else:
             return inner(grad_YT,self.__B_r-grad_phi)+inner(Y,grad_phi-self.__B_b)
 
+class MagneticIntensityModel(ForwardModelWithPotential):
+    """
+    Forward Model for magnetic intensity inversion as described in the inversion
+    cookbook.
+    """
+    def __init__(self, domain, w, b, background_magnetic_flux_density,
+                 coordinates=None, fixPotentialAtBottom=False, tol=1e-8):
+        """
+        Creates a new magnetic intensity model on the given domain with one or more
+        surveys (w, b).
+
+        :param domain: domain of the model
+        :type domain: `Domain`
+        :param w: data weighting factors
+        :type w: ``Scalar`` or list of ``Scalar``
+        :param b: magnetic intensity field data
+        :type b: ``Scalar`` or list of ``Scalar``
+        :param tol: tolerance of underlying PDE
+        :type tol: positive ``float``
+        :param background_magnetic_flux_density: background magnetic flux
+               density (in Tesla) with components (B_east, B_north, B_vertical)
+        :type background_magnetic_flux_density: ``Vector`` or list of `float`
+        :param coordinates: defines coordinate system to be used
+        :type coordinates: None
+        :param fixPotentialAtBottom: if true potential is fixed to zero at the
+                                     bottom of the domain in addition to the top
+        :type fixPotentialAtBottom: ``bool``
+        """
+        super(MagneticIntensityModel, self).__init__(domain, w, b, coordinates, fixPotentialAtBottom, tol)
+        background_magnetic_flux_density=interpolate(background_magnetic_flux_density, self.getDataFunctionSpace())
+        if not self.getCoordinateTransformation().isCartesian():   # need to be checked!
+            s = self.getCoordinateTransformation().getScalingFactors()
+            v = self.getCoordinateTransformation().getVolumeFactor()
+            self.__B_r = background_magnetic_flux_density * s * v
+            self.__B_b = background_magnetic_flux_density / s
+
+            A = self.getPDE().createCoefficient("A")
+            fw = s**2 * v
+            for i in range(self.getDomain().getDim()):
+                A[i,i]=fw[i]
+            self.getPDE().setValue(A=A)
+        else: # cartesian
+            self.getPDE().setValue(A=kronecker(self.getDomain()))
+            self.__B_r = background_magnetic_flux_density
+            self.__B_b = background_magnetic_flux_density
+        self.__normalized_B_b=normalize(self.__B_b)
+
+    def rescaleWeights(self, scale=1., k_scale=1.):
+        """
+        rescales the weights such that
+
+        *sum_s integrate( ( w_i[s] *B_i[s]) (w_j[s]*1/L_j) * L**2 * (background_magnetic_flux_density_j[s]*1/L_j) * k_scale )=scale*
+
+        :param scale: scale of data weighting factors
+        :type scale: positive ``float``
+        :param k_scale: scale of susceptibility.
+        :type k_scale: ``Scalar``
+        """
+        self._rescaleWeights(scale, inner(self.__B_r,1/self.edge_lengths ) * k_scale)
+
+    def getArguments(self, k):
+        """
+        Returns precomputed values shared by `getDefect()` and `getGradient()`.
+
+        :param k: susceptibility
+        :type k: ``Scalar``
+        :return: scalar magnetic potential and corresponding magnetic field
+        :rtype: ``Scalar``, ``Vector``
+        """
+        phi = self.getPotential(k)
+        magnetic_flux_density = k * self.__B_b -grad(phi)
+        return phi, magnetic_flux_density
+
+    def getPotential(self, k):
+        """
+        Calculates the magnetic potential for a given susceptibility.
+
+        :param k: susceptibility
+        :type k: ``Scalar``
+        :return: magnetic potential
+        :rtype: ``Scalar``
+        """
+        pde=self.getPDE()
+        pde.resetRightHandSideCoefficients()
+        pde.setValue(X = k* self.__B_r)
+        phi=pde.getSolution()
+
+        return phi
+
+    def getDefect(self, k, phi, magnetic_flux_density):
+        """
+        Returns the value of the defect.
+
+        :param k: susceptibility
+        :type k: ``Scalar``
+        :param phi: corresponding potential
+        :type phi: ``Scalar``
+        :param magnetic_flux_density: magnetic field
+        :type magnetic_flux_density: ``Vector``
+        :rtype: ``float``
+        """
+        weights=self.getMisfitWeights()
+        data=self.getData()
+        A=0.
+        for s in xrange(len(weights)):
+            A += integrate( (weights[s]*(inner(self.__normalized_B_b, magnetic_flux_density)-data[s]) )**2 )
+        return A/2
+
+    def getGradient(self, k, phi, magnetic_flux_density):
+        """
+        Returns the gradient of the defect with respect to susceptibility.
+
+        :param k: susceptibility
+        :type k: ``Scalar``
+        :param phi: corresponding potential
+        :type phi: ``Scalar``
+        :param magnetic_flux_density: magnetic field
+        :type magnetic_flux_density: ``Vector``
+        :rtype: ``Scalar``
+        """
+        weights=self.getMisfitWeights()
+        data=self.getData()
+        Y=Scalar(0.,magnetic_flux_density.getFunctionSpace())
+        for s in xrange(len(weights)):
+            Y+=weights[s]**2*(data[s]-inner(self.__normalized_B_b, magnetic_flux_density))
+        pde=self.getPDE()
+        pde.resetRightHandSideCoefficients()
+        pde.setValue(X=Y*self.__normalized_B_b)
+        YT=pde.getSolution()
+        return inner(grad(YT),self.__B_r) -Y*inner(self.__normalized_B_b,self.__B_b)
diff --git a/downunder/py_src/forwardmodels/magnetotelluric2d.py b/downunder/py_src/forwardmodels/magnetotelluric2d.py
index 8cdc515..f371d30 100644
--- a/downunder/py_src/forwardmodels/magnetotelluric2d.py
+++ b/downunder/py_src/forwardmodels/magnetotelluric2d.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/pressure.py b/downunder/py_src/forwardmodels/pressure.py
index 0f3f331..cbcea1a 100644
--- a/downunder/py_src/forwardmodels/pressure.py
+++ b/downunder/py_src/forwardmodels/pressure.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """Isostatic Pressure calculation"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/forwardmodels/subsidence.py b/downunder/py_src/forwardmodels/subsidence.py
index 382c910..3c98c39 100644
--- a/downunder/py_src/forwardmodels/subsidence.py
+++ b/downunder/py_src/forwardmodels/subsidence.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 """Forward model for Subsidence modelling"""
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/inversioncostfunctions.py b/downunder/py_src/inversioncostfunctions.py
index 8e18866..926646b 100644
--- a/downunder/py_src/inversioncostfunctions.py
+++ b/downunder/py_src/inversioncostfunctions.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/inversions.py b/downunder/py_src/inversions.py
index 967e2c1..5235c03 100644
--- a/downunder/py_src/inversions.py
+++ b/downunder/py_src/inversions.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -35,7 +35,7 @@ from esys.escript import unitsSI as U
 from esys.weipa import createDataset
 
 from .inversioncostfunctions import InversionCostFunction
-from .forwardmodels import GravityModel, MagneticModel, SelfDemagnetizationModel
+from .forwardmodels import GravityModel, MagneticModel, MagneticIntensityModel, SelfDemagnetizationModel
 from .mappings import *
 from .minimizers import *
 from .regularizations import Regularization
@@ -46,12 +46,13 @@ class InversionDriver(object):
     """
     Base class for running an inversion
     """
-    def __init__(self, solverclass=None, debug=False, self_demagnetization=False):
+    def __init__(self, solverclass=None, debug=False, self_demagnetization=False, magnetic_intensity_data=False):
         """
         creates an instance of an inversion driver.
 
         :param solverclass: class of the solver to be used.
         :param self_demagnetization: if True self-demagnitization is applied.
+        :param magnetic_intensity_data: if True magnetic intensity is used in the cost function. 
         :type solverclass: 'AbstractMinimizer'.
         """
         # This configures basic logging to get some meaningful output
@@ -65,6 +66,7 @@ class InversionDriver(object):
         self.__solver=solverclass()
         self.initial_value = None
         self.self_demagnetization=self_demagnetization
+        self.magnetic_intensity_data=magnetic_intensity_data
         self.m=None
         self.fixGravityPotentialAtBottom()
         self.fixMagneticPotentialAtBottom()
@@ -355,7 +357,7 @@ class MagneticInversion(InversionDriver):
         :type domainbuilder: `DomainBuilder`
         :param k0: reference susceptibility, see `SusceptibilityMapping`. If not specified, zero is used.
         :type k0: ``float`` or ``Scalar``
-        :param dk: susceptibility scale, see `SusceptibilityMapping`. If not specified, 2750kg/m^3 is used.
+        :param dk: susceptibility scale, see `SusceptibilityMapping`. If not specified, 1. is used.
         :type dk: ``float`` or ``Scalar``
         :param z0: reference depth for depth weighting, see `SusceptibilityMapping`. If not specified, zero is used.
         :type z0: ``float`` or ``Scalar``
@@ -399,10 +401,16 @@ class MagneticInversion(InversionDriver):
         w=[]
         for B_i,sigma_i in surveys:
             w_i=es.safeDiv(1., sigma_i)
-            if B_i.getRank()==0:
-                B_i=B_i*d_b
-            if w_i.getRank()==0:
-                w_i=w_i*d_b
+            if self.magnetic_intensity_data:
+                if not B_i.getRank()==0:
+                    B_i=es.length(B_i)
+                if not w_i.getRank()==0:
+                    w_i=length(w_i)
+            else:
+                if B_i.getRank()==0:
+                    B_i=B_i*d_b
+                if w_i.getRank()==0:
+                    w_i=w_i*d_b
             B.append(B_i)
             w.append(w_i)
             self.logger.debug("Added magnetic survey:")
@@ -414,7 +422,10 @@ class MagneticInversion(InversionDriver):
         if self.self_demagnetization:
             forward_model=SelfDemagnetizationModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
         else:
-            forward_model=MagneticModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+            if self.magnetic_intensity_data:
+              forward_model=MagneticIntensityModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+            else:
+              forward_model=MagneticModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
         forward_model.rescaleWeights(k_scale=scale_mapping)
 
         #====================================================================
@@ -574,10 +585,16 @@ class JointGravityMagneticInversion(InversionDriver):
         w=[]
         for B_i,sigma_i in surveys:
             w_i=es.safeDiv(1., sigma_i)
-            if B_i.getRank()==0:
-                B_i=B_i*d_b
-            if w_i.getRank()==0:
-                w_i=w_i*d_b
+            if self.magnetic_intensity_data:
+                if not B_i.getRank()==0:
+                    B_i=es.length(B_i)
+                if not w_i.getRank()==0:
+                    w_i=length(w_i)
+            else:
+              if B_i.getRank()==0:
+                  B_i=B_i*d_b
+              if w_i.getRank()==0:
+                  w_i=w_i*d_b
             B.append(B_i)
             w.append(w_i)
             self.logger.debug("Added magnetic survey:")
@@ -589,7 +606,10 @@ class JointGravityMagneticInversion(InversionDriver):
         if self.self_demagnetization:
             magnetic_model=SelfDemagnetizationModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
         else:
-            magnetic_model=MagneticModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+            if self.magnetic_intensity_data:
+              magnetic_model=MagneticIntensityModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+            else:
+              magnetic_model=MagneticModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
         magnetic_model.rescaleWeights(k_scale=k_scale_mapping)
         #====================================================================
         self.logger.info("Setting cost function...")
@@ -753,9 +773,15 @@ class StrongJointGravityMagneticInversion(InversionDriver):
         w=[]
         for B_i,sigma_i in surveys:
             w_i=es.safeDiv(1., sigma_i)
-            if B_i.getRank()==0:
+            if self.magnetic_intensity_data:
+              if not B_i.getRank()==0:
+                B_i=es.length(B_i)
+              if not w_i.getRank()==0:
+                w_i=length(w_i)
+            else:
+              if B_i.getRank()==0:
                 B_i=B_i*d_b
-            if w_i.getRank()==0:
+              if w_i.getRank()==0:
                 w_i=w_i*d_b
             B.append(B_i)
             w.append(w_i)
@@ -765,7 +791,13 @@ class StrongJointGravityMagneticInversion(InversionDriver):
             self.logger.debug("w = %s"%w_i)
 
         self.logger.info("Setting up magnetic model...")
-        magnetic_model=MagneticModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+        if self.self_demagnetization:
+            magnetic_model=SelfDemagnetizationModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+        else:
+            if self.magnetic_intensity_data:
+              magnetic_model=MagneticIntensityModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
+            else:
+              magnetic_model=MagneticModel(dom, w, B, domainbuilder.getBackgroundMagneticFluxDensity(), fixPotentialAtBottom=self._fixMagneticPotentialAtBottom, coordinates=trafo)
         magnetic_model.rescaleWeights(k_scale=k_scale_mapping)
         #====================================================================
         self.logger.info("Setting cost function...")
diff --git a/downunder/py_src/mappings.py b/downunder/py_src/mappings.py
index 77c46a9..a836391 100644
--- a/downunder/py_src/mappings.py
+++ b/downunder/py_src/mappings.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ from __future__ import print_function, division
 """Collection of parametrizations that map physical values to model parameters
    and back"""
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/minimizers.py b/downunder/py_src/minimizers.py
index 8f1371d..379bd1f 100644
--- a/downunder/py_src/minimizers.py
+++ b/downunder/py_src/minimizers.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -405,6 +405,7 @@ class MinimizerLBFGS(AbstractMinimizer):
 
                 x=x_new
                 if converged:
+                    self.logger.info("********** iteration %3d **********"%(n_iter+1,))
                     self.logger.info("\tJ(x) = %s"%Jx_new)
                     break
 
diff --git a/downunder/py_src/regularizations.py b/downunder/py_src/regularizations.py
index f5fdf92..e698412 100644
--- a/downunder/py_src/regularizations.py
+++ b/downunder/py_src/regularizations.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/seismic.py b/downunder/py_src/seismic.py
index 0422be1..85fab38 100644
--- a/downunder/py_src/seismic.py
+++ b/downunder/py_src/seismic.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/splitinversioncostfunctions.py b/downunder/py_src/splitinversioncostfunctions.py
index d33d0fa..42f9eab 100644
--- a/downunder/py_src/splitinversioncostfunctions.py
+++ b/downunder/py_src/splitinversioncostfunctions.py
@@ -1,7 +1,7 @@
 from __future__ import division, print_function
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@ from __future__ import division, print_function
 
 """Cost functions for inversions with one or more forward models"""
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/py_src/splitminimizers.py b/downunder/py_src/splitminimizers.py
index 130a247..51fc58d 100644
--- a/downunder/py_src/splitminimizers.py
+++ b/downunder/py_src/splitminimizers.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/downunder/py_src/splitregularizations.py b/downunder/py_src/splitregularizations.py
index 4c3f3a1..8cd3d78 100644
--- a/downunder/py_src/splitregularizations.py
+++ b/downunder/py_src/splitregularizations.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/SConscript b/downunder/test/python/SConscript
index ad9b94d..b25e51f 100644
--- a/downunder/test/python/SConscript
+++ b/downunder/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/downunder/test/python/inversion_acoustictest_2d.py b/downunder/test/python/inversion_acoustictest_2d.py
index ba47ef4..24285d8 100644
--- a/downunder/test/python/inversion_acoustictest_2d.py
+++ b/downunder/test/python/inversion_acoustictest_2d.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -22,7 +22,7 @@ from __future__ import print_function, division
 
 """
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_comm1.py b/downunder/test/python/run_comm1.py
index 3e9f5c3..2806478 100644
--- a/downunder/test/python/run_comm1.py
+++ b/downunder/test/python/run_comm1.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ from __future__ import print_function, division
 Test script to run test model COMMEMI-4
 """
 
-__copyright__="""Copyright (c)2015-2016 by The University of Queensland
+__copyright__="""Copyright (c)2015-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_comm4.py b/downunder/test/python/run_comm4.py
index a52b28e..0f1ab71 100644
--- a/downunder/test/python/run_comm4.py
+++ b/downunder/test/python/run_comm4.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/downunder/test/python/run_coordinates.py b/downunder/test/python/run_coordinates.py
index c8a844b..813e053 100644
--- a/downunder/test/python/run_coordinates.py
+++ b/downunder/test/python/run_coordinates.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_datasources.py b/downunder/test/python/run_datasources.py
index 829b2d8..73813a9 100644
--- a/downunder/test/python/run_datasources.py
+++ b/downunder/test/python/run_datasources.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -283,7 +283,7 @@ class TestNetCdfData(unittest.TestCase):
         try:
             import osgeo.osr
             for i in range(len(NC_ORIGIN)):
-                self.assertAlmostEqual(X0[i], NC_ORIGIN[i], msg="Data origin wrong")
+                self.assertAlmostEqual(X0[i], NC_ORIGIN[i], places=3, msg="Data origin wrong")
         except ImportError:
             print("Skipping test of data origin since gdal is not installed.")
 
diff --git a/downunder/test/python/run_dcforward.py b/downunder/test/python/run_dcforward.py
index 8cc172a..a98d7b7 100644
--- a/downunder/test/python/run_dcforward.py
+++ b/downunder/test/python/run_dcforward.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/downunder/test/python/run_domainbuilder.py b/downunder/test/python/run_domainbuilder.py
index f19545d..9a13d04 100644
--- a/downunder/test/python/run_domainbuilder.py
+++ b/downunder/test/python/run_domainbuilder.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_forward.py b/downunder/test/python/run_forward.py
index 07af844..03ec984 100644
--- a/downunder/test/python/run_forward.py
+++ b/downunder/test/python/run_forward.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -176,12 +176,7 @@ class TestAcousticInversion(unittest.TestCase):
         self.assertLess( abs(d2-d0-integrate(dg0[1]*p)), 1e-2*abs(d2-d0) )
 
     def test_numeric2DnoscaleF(self):
-        for x in [int(sqrt(mpisize)),2,3,5,7,1]:
-            NX=x
-            NY=mpisize//x
-            if NX*NY == mpisize:
-                break
-        domain=ripRectangle(n0=10*NX-1, n1=20*NY-1, l0=1., l1=1., d0=NX, d1=NY, diracPoints=[(0.5,1.)], diracTags=['sss'])
+        domain=ripRectangle(n0=10, n1=20, l0=1., l1=1., diracPoints=[(0.5,1.)], diracTags=['sss'])
         omega=1.5
 
         # test solution is u = a * z where a is complex
diff --git a/downunder/test/python/run_gravity.py b/downunder/test/python/run_gravity.py
index 40cd99e..274e71b 100644
--- a/downunder/test/python/run_gravity.py
+++ b/downunder/test/python/run_gravity.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@ from __future__ import print_function, division
 
 """2D gravity inversion example using synthetic data"""
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_inversion_gravmag_2d.py b/downunder/test/python/run_inversion_gravmag_2d.py
index 6b7d2f7..947d379 100644
--- a/downunder/test/python/run_inversion_gravmag_2d.py
+++ b/downunder/test/python/run_inversion_gravmag_2d.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@ from __future__ import print_function, division
 
 """2D magnetic/gravity joint inversion example using synthetic data"""
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_inversioncostfunction.py b/downunder/test/python/run_inversioncostfunction.py
index 991ea8b..27d0922 100644
--- a/downunder/test/python/run_inversioncostfunction.py
+++ b/downunder/test/python/run_inversioncostfunction.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_magnetic.py b/downunder/test/python/run_magnetic.py
index 2fcf45b..e00b7fe 100644
--- a/downunder/test/python/run_magnetic.py
+++ b/downunder/test/python/run_magnetic.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_mappings.py b/downunder/test/python/run_mappings.py
index 3ec044e..1051efe 100644
--- a/downunder/test/python/run_mappings.py
+++ b/downunder/test/python/run_mappings.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_minimizers.py b/downunder/test/python/run_minimizers.py
index 5339040..bf96479 100644
--- a/downunder/test/python/run_minimizers.py
+++ b/downunder/test/python/run_minimizers.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_regularization.py b/downunder/test/python/run_regularization.py
index d198983..960f206 100644
--- a/downunder/test/python/run_regularization.py
+++ b/downunder/test/python/run_regularization.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/downunder/test/python/run_seismic.py b/downunder/test/python/run_seismic.py
index 1a75608..326d577 100644
--- a/downunder/test/python/run_seismic.py
+++ b/downunder/test/python/run_seismic.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/SConscript b/dudley/SConscript
index da397f2..ca81e67 100644
--- a/dudley/SConscript
+++ b/dudley/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/dudley/benchmarks/dudleybench.py b/dudley/benchmarks/dudleybench.py
index 31f392a..682e5b8 100644
--- a/dudley/benchmarks/dudleybench.py
+++ b/dudley/benchmarks/dudleybench.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/benchmarks/runbenchmark.py b/dudley/benchmarks/runbenchmark.py
index 5f90872..e9d236a 100755
--- a/dudley/benchmarks/runbenchmark.py
+++ b/dudley/benchmarks/runbenchmark.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/py_src/SConscript b/dudley/py_src/SConscript
index dc68306..9cc424f 100644
--- a/dudley/py_src/SConscript
+++ b/dudley/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/dudley/py_src/__init__.py b/dudley/py_src/__init__.py
index dae5f38..5b17dd0 100644
--- a/dudley/py_src/__init__.py
+++ b/dudley/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,7 +19,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/py_src/factorywrappers.py b/dudley/py_src/factorywrappers.py
index e17dfd0..25b730a 100644
--- a/dudley/py_src/factorywrappers.py
+++ b/dudley/py_src/factorywrappers.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2014-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2014-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/py_src/readers.py b/dudley/py_src/readers.py
index 541cf43..b9345d2 100644
--- a/dudley/py_src/readers.py
+++ b/dudley/py_src/readers.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/src/Assemble.h b/dudley/src/Assemble.h
index db6e0e9..5722613 100644
--- a/dudley/src/Assemble.h
+++ b/dudley/src/Assemble.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -114,14 +114,17 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
                            bool useHRZ);
 
 /// averages data
+template<typename Scalar>
 void Assemble_AverageElementData(const ElementFile* elements,
                                  escript::Data& out, const escript::Data& in);
 
 /// copies data between different types of elements
+template<typename Scalar>
 void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
                               const escript::Data& in);
 
 /// copies data between different types of nodal representations
+template<typename Scalar>
 void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
                             const escript::Data& in);
 
@@ -139,14 +142,17 @@ void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
 
 /// Assemblage of Jacobians: calculates the gradient of nodal data at
 /// quadrature points
+template<typename Scalar>
 void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                        escript::Data& gradient, const escript::Data& data);
 
 /// integrates data on quadrature points
+template<typename Scalar>
 void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
-                   const escript::Data& data, std::vector<double>& integrals);
+                   const escript::Data& data, std::vector<Scalar>& integrals);
 
 /// interpolates nodal data in a data array onto elements (=integration points)
+template<typename Scalar>
 void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
                           const escript::Data& data, escript::Data& output);
 
diff --git a/dudley/src/Assemble_AverageElementData.cpp b/dudley/src/Assemble_AverageElementData.cpp
index a1a34cf..e3d732d 100644
--- a/dudley/src/Assemble_AverageElementData.cpp
+++ b/dudley/src/Assemble_AverageElementData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -22,6 +22,9 @@
 
 namespace dudley {
 
+using escript::ValueError;
+
+template<typename Scalar>
 void Assemble_AverageElementData(const ElementFile* elements,
                                  escript::Data& out, const escript::Data& in)
 {
@@ -48,24 +51,28 @@ void Assemble_AverageElementData(const ElementFile* elements,
     const int numComps = out.getDataPointSize();
 
     if (numComps != in.getDataPointSize()) {
-        throw DudleyException("Assemble_AverageElementData: number of components of input and output Data do not match.");
+        throw ValueError("Assemble_AverageElementData: number of components of input and output Data do not match.");
     } else if (!in.numSamplesEqual(numQuad_in, numElements)) {
-        throw DudleyException("Assemble_AverageElementData: illegal number of samples of input Data object");
+        throw ValueError("Assemble_AverageElementData: illegal number of samples of input Data object");
     } else if (!out.numSamplesEqual(numQuad_out, numElements)) {
-        throw DudleyException("Assemble_AverageElementData: illegal number of samples of output Data object");
+        throw ValueError("Assemble_AverageElementData: illegal number of samples of output Data object");
     } else if (!out.actsExpanded()) {
-        throw DudleyException("Assemble_AverageElementData: expanded Data object is expected for output data.");
+        throw ValueError("Assemble_AverageElementData: expanded Data object is expected for output data.");
+    } else if (in.isComplex() != out.isComplex()) {
+        throw ValueError("Assemble_AverageElementData: complexity of input and output data must match.");
+
     } else {
+        const Scalar zero = static_cast<Scalar>(0);
         out.requireWrite();
         if (in.actsExpanded()) {
             const double vol = wq * numQuad_in;
             const double volinv = 1. / vol;
 #pragma omp parallel for
             for (index_t n = 0; n < numElements; n++) {
-                const double* in_array = in.getSampleDataRO(n);
-                double* out_array = out.getSampleDataRW(n);
+                const Scalar* in_array = in.getSampleDataRO(n, zero);
+                Scalar* out_array = out.getSampleDataRW(n, zero);
                 for (int i = 0; i < numComps; ++i) {
-                    double rtmp = 0.;
+                    Scalar rtmp = zero;
                     for (int q = 0; q < numQuad_in; ++q)
                         rtmp += in_array[INDEX2(i, q, numComps)] * wq;
                     rtmp *= volinv;
@@ -74,11 +81,11 @@ void Assemble_AverageElementData(const ElementFile* elements,
                 }
             }
         } else { // constant data
-            const size_t numComps_size = numComps * sizeof(double);
+            const size_t numComps_size = numComps * sizeof(Scalar);
 #pragma omp parallel for
             for (index_t n = 0; n < numElements; n++) {
-                const double* in_array = in.getSampleDataRO(n);
-                double* out_array = out.getSampleDataRW(n);
+                const Scalar* in_array = in.getSampleDataRO(n, zero);
+                Scalar* out_array = out.getSampleDataRW(n, zero);
                 for (int q = 0; q < numQuad_out; q++)
                     memcpy(out_array + q * numComps, in_array, numComps_size);
             }
@@ -86,5 +93,13 @@ void Assemble_AverageElementData(const ElementFile* elements,
     }
 }
 
+// instantiate our two supported versions
+template void Assemble_AverageElementData<escript::DataTypes::real_t>(
+                const ElementFile* elements,
+                escript::Data& out, const escript::Data& in);
+template void Assemble_AverageElementData<escript::DataTypes::cplx_t>(
+                const ElementFile* elements,
+                escript::Data& out, const escript::Data& in);
+
 } // namespace dudley
 
diff --git a/dudley/src/Assemble_CopyElementData.cpp b/dudley/src/Assemble_CopyElementData.cpp
index 174951d..eb8923d 100644
--- a/dudley/src/Assemble_CopyElementData.cpp
+++ b/dudley/src/Assemble_CopyElementData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,6 +20,9 @@
 
 namespace dudley {
 
+using escript::ValueError;
+
+template<typename Scalar>
 void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
                               const escript::Data& in)
 {
@@ -34,26 +37,30 @@ void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
     const int numComps = out.getDataPointSize();
 
     if (numComps != in.getDataPointSize()) {
-        throw DudleyException("Assemble_CopyElementData: number of components of input and output Data do not match.");
+        throw ValueError("Assemble_CopyElementData: number of components of input and output Data do not match.");
     } else if (!in.numSamplesEqual(numQuad, numElements)) {
-        throw DudleyException("Assemble_CopyElementData: illegal number of samples of input Data object");
+        throw ValueError("Assemble_CopyElementData: illegal number of samples of input Data object");
     } else if (!out.numSamplesEqual(numQuad, numElements)) {
-        throw DudleyException("Assemble_CopyElementData: illegal number of samples of output Data object");
+        throw ValueError("Assemble_CopyElementData: illegal number of samples of output Data object");
     } else if (!out.actsExpanded()) {
-        throw DudleyException("Assemble_CopyElementData: expanded Data object is expected for output data.");
+        throw ValueError("Assemble_CopyElementData: expanded Data object is expected for output data.");
+    } else if (in.isComplex() != out.isComplex()) {
+        throw ValueError("Assemble_CopyElementData: complexity of input and output Data must match.");
     } else {
+        const Scalar zero = static_cast<Scalar>(0);
         out.requireWrite();
         if (in.actsExpanded()) {
-            const size_t len_size = numComps * numQuad * sizeof(double);
+            const size_t len_size = numComps * numQuad * sizeof(Scalar);
 #pragma omp parallel for
             for (index_t n = 0; n < numElements; n++)
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n), len_size);
+                memcpy(out.getSampleDataRW(n, zero),
+                       in.getSampleDataRO(n, zero), len_size);
         } else {
-            const size_t len_size = numComps * sizeof(double);
+            const size_t len_size = numComps * sizeof(Scalar);
 #pragma omp parallel for
             for (index_t n = 0; n < numElements; n++) {
-                const double* in_array = in.getSampleDataRO(n);
-                double* out_array = out.getSampleDataRW(n);
+                const Scalar* in_array = in.getSampleDataRO(n, zero);
+                Scalar* out_array = out.getSampleDataRW(n, zero);
                 for (int q = 0; q < numQuad; q++)
                     memcpy(out_array + q * numComps, in_array, len_size);
             }
@@ -61,5 +68,13 @@ void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
     }
 }
 
+// instantiate our two supported versions
+template void Assemble_CopyElementData<escript::DataTypes::real_t>(
+                const ElementFile* elements, escript::Data& out,
+                const escript::Data& in);
+template void Assemble_CopyElementData<escript::DataTypes::cplx_t>(
+                const ElementFile* elements, escript::Data& out,
+                const escript::Data& in);
+
 } // namespace dudley
 
diff --git a/dudley/src/Assemble_CopyNodalData.cpp b/dudley/src/Assemble_CopyNodalData.cpp
index 0a20a71..f9fa9ef 100644
--- a/dudley/src/Assemble_CopyNodalData.cpp
+++ b/dudley/src/Assemble_CopyNodalData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -19,6 +19,10 @@
 
 namespace dudley {
 
+using escript::ValueError;
+using escript::NotImplementedError;
+
+template<typename Scalar>
 void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
                             const escript::Data& in)
 {
@@ -32,26 +36,28 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
 
     // check out and in
     if (numComps != in.getDataPointSize()) {
-        throw escript::ValueError("Assemble_CopyNodalData: number of components of input and output Data do not match.");
+        throw ValueError("Assemble_CopyNodalData: number of components of input and output Data do not match.");
     } else if (!out.actsExpanded()) {
-        throw escript::ValueError("Assemble_CopyNodalData: expanded Data object is expected for output data.");
+        throw ValueError("Assemble_CopyNodalData: expanded Data object is expected for output data.");
+    } else if (in.isComplex() != out.isComplex()) {
+        throw ValueError("Assemble_CopyNodalData: complexity of input and output Data must match.");
     }
 
     // more sophisticated test needed for overlapping node/DOF counts
     if (in_data_type == DUDLEY_NODES) {
         if (!in.numSamplesEqual(1, nodes->getNumNodes())) {
-            throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
+            throw ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
         }
     } else if (in_data_type == DUDLEY_DEGREES_OF_FREEDOM) {
         if (!in.numSamplesEqual(1, nodes->getNumDegreesOfFreedom())) {
-            throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
+            throw ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
         }
         if ((((out_data_type == DUDLEY_NODES) || (out_data_type == DUDLEY_DEGREES_OF_FREEDOM)) && !in.actsExpanded() && (mpiSize > 1))) {
 
-            throw DudleyException("Assemble_CopyNodalData: DUDLEY_DEGREES_OF_FREEDOM to DUDLEY_NODES or DUDLEY_DEGREES_OF_FREEDOM requires expanded input data on more than one processor.");
+            throw ValueError("Assemble_CopyNodalData: DUDLEY_DEGREES_OF_FREEDOM to DUDLEY_NODES or DUDLEY_DEGREES_OF_FREEDOM requires expanded input data on more than one processor.");
         }
     } else {
-        throw escript::ValueError( "Assemble_CopyNodalData: illegal function space type for target object");
+        throw ValueError( "Assemble_CopyNodalData: illegal function space type for target object");
     }
 
     dim_t numOut = 0;
@@ -65,14 +71,15 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             break;
 
         default:
-            throw escript::ValueError("Assemble_CopyNodalData: illegal function space type for source object");
+            throw ValueError("Assemble_CopyNodalData: illegal function space type for source object");
     }
 
     if (!out.numSamplesEqual(1, numOut)) {
-        throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of output Data object");
+        throw ValueError("Assemble_CopyNodalData: illegal number of samples of output Data object");
     }
 
-    const size_t numComps_size = numComps * sizeof(double);
+    const Scalar zero = static_cast<Scalar>(0);
+    const size_t numComps_size = numComps * sizeof(Scalar);
 
     /**************************** DUDLEY_NODES ******************************/
     if (in_data_type == DUDLEY_NODES) {
@@ -80,14 +87,15 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
         if (out_data_type == DUDLEY_NODES) {
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n), numComps_size);
+                memcpy(out.getSampleDataRW(n, zero),
+                       in.getSampleDataRO(n, zero), numComps_size);
             }
         } else if (out_data_type == DUDLEY_DEGREES_OF_FREEDOM) {
             const index_t* map = nodes->borrowDegreesOfFreedomTarget();
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(map[n]),
-                       numComps_size);
+                memcpy(out.getSampleDataRW(n, zero),
+                       in.getSampleDataRO(map[n], zero), numComps_size);
             }
         }
     /********************** DUDLEY_DEGREES_OF_FREEDOM ***********************/
@@ -96,24 +104,7 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
         if (out_data_type == DUDLEY_NODES) {
             const_cast<escript::Data*>(&in)->resolve();
             const index_t* target = nodes->borrowTargetDegreesOfFreedom();
-#ifdef ESYS_HAVE_PASO
-            paso::Coupler_ptr coupler(new paso::Coupler(nodes->degreesOfFreedomConnector, numComps, nodes->MPIInfo));
-            coupler->startCollect(in.getDataRO());
-            const double* recv_buffer = coupler->finishCollect();
-            const index_t upperBound = nodes->getNumDegreesOfFreedom();
-#pragma omp parallel for
-            for (index_t n = 0; n < numOut; n++) {
-                const index_t k = target[n];
-                if (k < upperBound) {
-                    memcpy(out.getSampleDataRW(n), in.getSampleDataRO(k),
-                           numComps_size);
-                } else {
-                    memcpy(out.getSampleDataRW(n),
-                           &recv_buffer[(k - upperBound) * numComps],
-                           numComps_size);
-                }
-            }
-#elif defined(ESYS_HAVE_TRILINOS)
+#ifdef ESYS_HAVE_TRILINOS
             using namespace esys_trilinos;
 
             const_TrilinosGraph_ptr graph(nodes->getTrilinosGraph());
@@ -122,10 +113,12 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             MapType colPointMap;
             MapType rowPointMap;
             if (numComps > 1) {
-                colPointMap = RealBlockVector::makePointMap(*graph->getColMap(),
-                                                            numComps);
-                rowPointMap = RealBlockVector::makePointMap(*graph->getRowMap(),
-                                                            numComps);
+                colPointMap = BlockVectorType<Scalar>::makePointMap(
+                                                           *graph->getColMap(),
+                                                           numComps);
+                rowPointMap = BlockVectorType<Scalar>::makePointMap(
+                                                           *graph->getRowMap(),
+                                                           numComps);
                 colMap = Teuchos::rcpFromRef(colPointMap);
                 rowMap = Teuchos::rcpFromRef(rowPointMap);
             } else {
@@ -134,29 +127,53 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             }
 
             const ImportType importer(rowMap, colMap);
-            const Teuchos::ArrayView<const real_t> localIn(
-                                               in.getSampleDataRO(0),
+            const Teuchos::ArrayView<const Scalar> localIn(
+                                               in.getSampleDataRO(0, zero),
                                                in.getNumDataPoints()*numComps);
-            Teuchos::RCP<RealVector> lclData = rcp(new RealVector(rowMap,
-                                                  localIn, localIn.size(), 1));
-            Teuchos::RCP<RealVector> gblData = rcp(new RealVector(colMap, 1));
+            Teuchos::RCP<VectorType<Scalar> > lclData = rcp(
+                    new VectorType<Scalar>(rowMap, localIn, localIn.size(), 1));
+            Teuchos::RCP<VectorType<Scalar> > gblData = rcp(
+                    new VectorType<Scalar>(colMap, 1));
             gblData->doImport(*lclData, importer, Tpetra::INSERT);
-            Teuchos::ArrayRCP<const real_t> gblArray(gblData->getData(0));
+            Teuchos::ArrayRCP<const Scalar> gblArray(gblData->getData(0));
 #pragma omp parallel for
             for (index_t i = 0; i < numOut; i++) {
-                const real_t* src = &gblArray[target[i] * numComps];
-                std::copy(src, src+numComps, out.getSampleDataRW(i));
+                const Scalar* src = &gblArray[target[i] * numComps];
+                std::copy(src, src+numComps, out.getSampleDataRW(i, zero));
             }
-#endif
+#elif defined(ESYS_HAVE_PASO)
+            paso::Coupler_ptr<Scalar> coupler(new paso::Coupler<Scalar>(nodes->degreesOfFreedomConnector, numComps, nodes->MPIInfo));
+            coupler->startCollect(in.getSampleDataRO(0, zero));
+            const Scalar* recv_buffer = coupler->finishCollect();
+            const index_t upperBound = nodes->getNumDegreesOfFreedom();
+#pragma omp parallel for
+            for (index_t n = 0; n < numOut; n++) {
+                const index_t k = target[n];
+                if (k < upperBound) {
+                    memcpy(out.getSampleDataRW(n, zero),
+                           in.getSampleDataRO(k, zero), numComps_size);
+                } else {
+                    memcpy(out.getSampleDataRW(n, zero),
+                           &recv_buffer[(k - upperBound) * numComps],
+                           numComps_size);
+                }
+            }
+#endif // Trilinos / Paso
         } else if (out_data_type == DUDLEY_DEGREES_OF_FREEDOM) {
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n),
-                       numComps_size);
+                memcpy(out.getSampleDataRW(n, zero),
+                       in.getSampleDataRO(n, zero), numComps_size);
             }
         }
     } // in_data_type
 }
 
+// instantiate our two supported versions
+template void Assemble_CopyNodalData<escript::DataTypes::real_t>(
+           const NodeFile* nodes, escript::Data& out, const escript::Data& in);
+template void Assemble_CopyNodalData<escript::DataTypes::cplx_t>(
+           const NodeFile* nodes, escript::Data& out, const escript::Data& in);
+
 } // namespace dudley
 
diff --git a/dudley/src/Assemble_LumpedSystem.cpp b/dudley/src/Assemble_LumpedSystem.cpp
index f816172..45081d4 100644
--- a/dudley/src/Assemble_LumpedSystem.cpp
+++ b/dudley/src/Assemble_LumpedSystem.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -29,6 +29,11 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
     if (!nodes || !elements || lumpedMat.isEmpty() || D.isEmpty())
         return;
 
+    if (D.isComplex() || lumpedMat.isComplex())
+    {
+        throw escript::ValueError("Assemble_LumpedSystem: complex arguments not supported.");
+    }
+    escript::DataTypes::real_t wantreal=0;    
     const int funcspace = D.getFunctionSpace().getTypeCode();
     bool reducedIntegrationOrder;
     // check function space of D
@@ -74,7 +79,7 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
     }
 
     lumpedMat.requireWrite();
-    double* lumpedMat_p = lumpedMat.getSampleDataRW(0);
+    double* lumpedMat_p = lumpedMat.getExpandedVectorReference(wantreal).data();
 
     if (funcspace==DUDLEY_POINTS) {
 #pragma omp parallel
@@ -84,7 +89,7 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
 #pragma omp for
                 for (index_t e=0; e<elements->numElements; e++) {
                     if (elements->Color[e]==color) {
-                        const double* D_p = D.getSampleDataRO(e);
+                        const double* D_p = D.getSampleDataRO(e, wantreal);
                         util::addScatter(1,
                                       &p.DOF[elements->Nodes[INDEX2(0,e,p.NN)]],
                                       p.numEqu, D_p, lumpedMat_p,
@@ -112,7 +117,7 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
                         for (index_t e = 0; e < elements->numElements; e++) {
                             if (elements->Color[e] == color) {
                                 const double vol = p.jac->absD[e] * p.jac->quadweight;
-                                const double* D_p = D.getSampleDataRO(e);
+                                const double* D_p = D.getSampleDataRO(e, wantreal);
                                 if (useHRZ) {
                                     double m_t = 0; // mass of the element
                                     for (int q = 0; q < p.numQuad; q++)
@@ -156,7 +161,7 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
                         for (index_t e = 0; e < elements->numElements; e++) {
                             if (elements->Color[e] == color) {
                                 const double vol = p.jac->absD[e] * p.jac->quadweight;
-                                const double* D_p = D.getSampleDataRO(e);
+                                const double* D_p = D.getSampleDataRO(e, wantreal);
                                 if (useHRZ) { // HRZ lumping
                                     // mass of the element
                                     const double m_t = vol*p.numQuad;
@@ -201,7 +206,7 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
                         for (index_t e = 0; e < elements->numElements; e++) {
                             if (elements->Color[e] == color) {
                                 const double vol = p.jac->absD[e] * p.jac->quadweight;
-                                const double* D_p = D.getSampleDataRO(e);
+                                const double* D_p = D.getSampleDataRO(e, wantreal);
 
                                 if (useHRZ) { // HRZ lumping
                                     for (int k = 0; k < p.numEqu; k++) {
@@ -253,7 +258,7 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
                         for (index_t e = 0; e < elements->numElements; e++) {
                             if (elements->Color[e] == color) {
                                 const double vol = p.jac->absD[e] * p.jac->quadweight;
-                                const double* D_p = D.getSampleDataRO(e);
+                                const double* D_p = D.getSampleDataRO(e, wantreal);
 
                                 if (useHRZ) { // HRZ lumping
                                     double m_t = vol * p.numQuad; // mass of the element
diff --git a/dudley/src/Assemble_NodeCoordinates.cpp b/dudley/src/Assemble_NodeCoordinates.cpp
index f1f7baa..ba36bf0 100644
--- a/dudley/src/Assemble_NodeCoordinates.cpp
+++ b/dudley/src/Assemble_NodeCoordinates.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -28,6 +28,11 @@ void Assemble_NodeCoordinates(const NodeFile* nodes, escript::Data& x)
     if (nodes == NULL)
         return;
 
+    if (x.isComplex())
+    {
+        throw escript::ValueError("Assemble_NodeCoordinates: complex arguments not supported");
+    }
+    
     const escript::DataTypes::ShapeType expectedShape(1, nodes->numDim);
 
     if (!x.numSamplesEqual(1, nodes->getNumNodes())) {
@@ -46,7 +51,7 @@ void Assemble_NodeCoordinates(const NodeFile* nodes, escript::Data& x)
         x.requireWrite();
 #pragma omp parallel for
         for (dim_t n = 0; n < nodes->getNumNodes(); n++)
-            memcpy(x.getSampleDataRW(n),
+            memcpy(x.getSampleDataRW(n, static_cast<escript::DataTypes::real_t>(0)),
                     &nodes->Coordinates[INDEX2(0, n, nodes->numDim)], dim_size);
     }
 }
diff --git a/dudley/src/Assemble_PDE.cpp b/dudley/src/Assemble_PDE.cpp
index f961da2..661e819 100644
--- a/dudley/src/Assemble_PDE.cpp
+++ b/dudley/src/Assemble_PDE.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_PDE_Points.cpp b/dudley/src/Assemble_PDE_Points.cpp
index 7de8caf..ed2d020 100644
--- a/dudley/src/Assemble_PDE_Points.cpp
+++ b/dudley/src/Assemble_PDE_Points.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_PDE_Single_2D.cpp b/dudley/src/Assemble_PDE_Single_2D.cpp
index 4772613..192b4d5 100644
--- a/dudley/src/Assemble_PDE_Single_2D.cpp
+++ b/dudley/src/Assemble_PDE_Single_2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_PDE_Single_3D.cpp b/dudley/src/Assemble_PDE_Single_3D.cpp
index cd2cbe6..3da15a4 100644
--- a/dudley/src/Assemble_PDE_Single_3D.cpp
+++ b/dudley/src/Assemble_PDE_Single_3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_PDE_System_2D.cpp b/dudley/src/Assemble_PDE_System_2D.cpp
index d4557b2..0a0c5fc 100644
--- a/dudley/src/Assemble_PDE_System_2D.cpp
+++ b/dudley/src/Assemble_PDE_System_2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_PDE_System_3D.cpp b/dudley/src/Assemble_PDE_System_3D.cpp
index 275ab60..e0e87cb 100644
--- a/dudley/src/Assemble_PDE_System_3D.cpp
+++ b/dudley/src/Assemble_PDE_System_3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_addToSystemMatrix.cpp b/dudley/src/Assemble_addToSystemMatrix.cpp
index 713727b..02f0a29 100644
--- a/dudley/src/Assemble_addToSystemMatrix.cpp
+++ b/dudley/src/Assemble_addToSystemMatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_getAssembleParameters.cpp b/dudley/src/Assemble_getAssembleParameters.cpp
index f226a4c..1afcc67 100644
--- a/dudley/src/Assemble_getAssembleParameters.cpp
+++ b/dudley/src/Assemble_getAssembleParameters.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Assemble_getNormal.cpp b/dudley/src/Assemble_getNormal.cpp
index 140c86a..8ee7ac3 100644
--- a/dudley/src/Assemble_getNormal.cpp
+++ b/dudley/src/Assemble_getNormal.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -28,6 +28,10 @@ void Assemble_getNormal(const NodeFile* nodes, const ElementFile* elements,
     if (!nodes || !elements)
         return;
 
+    if (normal.isComplex())
+    {
+        throw DudleyException("Assemble_setNormal: complex arguments not supported.");
+    }
     const int NN = elements->numNodes;
     const int numDim = nodes->numDim;
     const int numQuad = (hasReducedIntegrationOrder(normal) ? 1 : NN);
@@ -73,7 +77,7 @@ void Assemble_getNormal(const NodeFile* nodes, const ElementFile* elements,
             util::smallMatMult(numDim, numDim_local * numQuad,
                                      &dVdv[0], NS, &local_X[0], dSdv);
             // get normalized vector
-            double* normal_array = normal.getSampleDataRW(e);
+            double* normal_array = normal.getSampleDataRW(e, static_cast<escript::DataTypes::real_t>(0));
             util::normalVector(numQuad, numDim, numDim_local, &dVdv[0], normal_array);
         }
     }
diff --git a/dudley/src/Assemble_getSize.cpp b/dudley/src/Assemble_getSize.cpp
index 8c3efe2..54d1ac8 100644
--- a/dudley/src/Assemble_getSize.cpp
+++ b/dudley/src/Assemble_getSize.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -27,6 +27,10 @@ void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
     if (!nodes || !elements)
         return;
 
+    if (out.isComplex())
+    {
+        throw DudleyException("Assemble_getSize: complex arguments are not supported.");      
+    }
     const int numDim = nodes->numDim;
 
     // now we look up what type of elements we need based on the function space
@@ -71,7 +75,7 @@ void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
             }
             max_diff = sqrt(max_diff);
             // set all values to max_diff
-            double* out_array = out.getSampleDataRW(e);
+            double* out_array = out.getSampleDataRW(e, static_cast<escript::DataTypes::real_t>(0));
             for (int q = 0; q < numQuad; q++)
                 out_array[q] = max_diff;
         }
diff --git a/dudley/src/Assemble_gradient.cpp b/dudley/src/Assemble_gradient.cpp
index b98cb8b..8c2d590 100644
--- a/dudley/src/Assemble_gradient.cpp
+++ b/dudley/src/Assemble_gradient.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -24,15 +24,19 @@
 
 namespace dudley {
 
+template<typename Scalar>
 void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
-                       escript::Data& grad_data, const escript::Data& data)
+                       escript::Data& out, const escript::Data& data)
 {
     if (!nodes || !elements)
         return;
 
+    if (data.isLazy() && data.isComplex()) {
+        throw DudleyException("Programming error: attempt to Assemble_gradient using lazy complex data");
+    }
     const int numComps = data.getDataPointSize();
     const int NN = elements->numNodes;
-    const bool reducedIntegrationOrder = hasReducedIntegrationOrder(grad_data);
+    const bool reducedIntegrationOrder = hasReducedIntegrationOrder(out);
     const int data_type = data.getFunctionSpace().getTypeCode();
 
     dim_t numNodes = 0;
@@ -54,20 +58,21 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
     const int numDim = jac->numDim;
     const int numShapesTotal = jac->numShapes;
     const int numQuad = jac->numQuad;
-    const size_t localGradSize = sizeof(double) * numDim * numQuad * numComps;
 
     // check the dimensions of data
-    if (!grad_data.numSamplesEqual(numQuad, elements->numElements)) {
+    if (!out.numSamplesEqual(numQuad, elements->numElements)) {
         throw DudleyException("Assemble_gradient: illegal number of samples in gradient Data object");
     } else if (!data.numSamplesEqual(1, numNodes)) {
         throw DudleyException("Assemble_gradient: illegal number of samples of input Data object");
-    } else if (numDim * numComps != grad_data.getDataPointSize()) {
+    } else if (numDim * numComps != out.getDataPointSize()) {
         throw DudleyException("Assemble_gradient: illegal number of components in gradient data object.");
-    } else if (!grad_data.actsExpanded()) {
+    } else if (!out.actsExpanded()) {
         throw DudleyException("Assemble_gradient: expanded Data object is expected for output data.");
     }
 
-    grad_data.requireWrite();
+    const Scalar zero = static_cast<Scalar>(0);
+    const size_t localGradSize = sizeof(Scalar) * numDim * numQuad * numComps;
+    out.requireWrite();
 #pragma omp parallel
     {
         if (data_type == DUDLEY_NODES) {
@@ -75,15 +80,15 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 const int numShapes = 2;
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int s = 0; s < numShapes; s++) {
                         const index_t n = elements->Nodes[INDEX2(s, e, NN)];
-                        const double* data_array = data.getSampleDataRO(n);
+                        const Scalar* data_array = data.getSampleDataRO(n, zero);
                         for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                             for (int l = 0; l < numComps; l++) {
-                                grad_data_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 0, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
                             }
@@ -94,18 +99,18 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 const int numShapes = 3;
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int s = 0; s < numShapes; s++) {
                         const index_t n = elements->Nodes[INDEX2(s, e, NN)];
-                        const double* data_array = data.getSampleDataRO(n);
+                        const Scalar* data_array = data.getSampleDataRO(n, zero);
                         for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                             for (int l = 0; l < numComps; l++) {
-                                grad_data_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 0, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
-                                grad_data_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 1, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
                             }
@@ -116,21 +121,21 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 const int numShapes = 4;
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int s = 0; s < numShapes; s++) {
                         const index_t n = elements->Nodes[INDEX2(s, e, NN)];
-                        const double* data_array = data.getSampleDataRO(n);
+                        const Scalar* data_array = data.getSampleDataRO(n, zero);
                         for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                             for (int l = 0; l < numComps; l++) {
-                                grad_data_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 0, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
-                                grad_data_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 1, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
-                                grad_data_e[INDEX4(l, 2, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 2, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 2, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
                             }
@@ -144,15 +149,15 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 const int numShapes = 2;
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int s = 0; s < numShapes; s++) {
                         const index_t n = elements->Nodes[INDEX2(s, e, NN)];
-                        const double* data_array = data.getSampleDataRO(target[n]);
+                        const Scalar* data_array = data.getSampleDataRO(target[n], zero);
                         for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                             for (int l = 0; l < numComps; l++) {
-                                grad_data_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 0, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
                             }
@@ -163,18 +168,18 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 const int numShapes = 3;
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int s = 0; s < numShapes; s++) {
                         const index_t n = elements->Nodes[INDEX2(s, e, NN)];
-                        const double* data_array = data.getSampleDataRO(target[n]);
+                        const Scalar* data_array = data.getSampleDataRO(target[n], zero);
                         for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                             for (int l = 0; l < numComps; l++) {
-                                grad_data_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 0, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
-                                grad_data_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 1, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
                             }
@@ -185,21 +190,21 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 const int numShapes = 4;
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int s = 0; s < numShapes; s++) {
                         const index_t n = elements->Nodes[INDEX2(s, e, NN)];
-                        const double* data_array = data.getSampleDataRO(target[n]);
+                        const Scalar* data_array = data.getSampleDataRO(target[n], zero);
                         for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                             for (int l = 0; l < numComps; l++) {
-                                grad_data_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 0, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 0, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
-                                grad_data_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 1, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 1, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
-                                grad_data_e[INDEX4(l, 2, q, 0, numComps, numDim, numQuad)] +=
+                                gradData_e[INDEX4(l, 2, q, 0, numComps, numDim, numQuad)] +=
                                     data_array[l] *
                                     jac->DSDX[INDEX5(s, 2, q, 0, e, numShapesTotal, numDim, numQuad, 1)];
                             }
@@ -211,5 +216,14 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
     } // end parallel region
 }
 
+// instantiate our two supported versions
+template void Assemble_gradient<escript::DataTypes::real_t>(
+                       const NodeFile* nodes, const ElementFile* elements,
+                       escript::Data& out, const escript::Data& data);
+template void Assemble_gradient<escript::DataTypes::cplx_t>(
+                       const NodeFile* nodes, const ElementFile* elements,
+                       escript::Data& out, const escript::Data& data);
+
+
 } // namespace dudley
 
diff --git a/dudley/src/Assemble_integrate.cpp b/dudley/src/Assemble_integrate.cpp
index 14c46e7..ea16868 100644
--- a/dudley/src/Assemble_integrate.cpp
+++ b/dudley/src/Assemble_integrate.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -21,12 +21,20 @@
 
 namespace dudley {
 
+using escript::DataTypes::real_t;
+using escript::DataTypes::cplx_t;
+
+template<typename Scalar>
 void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
-                        const escript::Data& data, std::vector<double>& out)
+                        const escript::Data& data, std::vector<Scalar>& out)
 {
     if (!nodes || !elements)
         return;
 
+    if (data.isLazy() && data.isComplex()) {
+        throw DudleyException("Programming error: attempt to Assemble_integrate using lazy complex data");
+    }    
+    
     const int my_mpi_rank = nodes->MPIInfo->rank;
     const ElementFile_Jacobians* jac = elements->borrowJacobians(nodes,
                                          hasReducedIntegrationOrder(data));
@@ -38,20 +46,21 @@ void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
     }
 
     const int numComps = data.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
 
     for (int q = 0; q < numComps; q++)
-        out[q] = 0;
+        out[q] = zero;
 
 #pragma omp parallel
     {
-        std::vector<double> out_local(numComps);
+        std::vector<Scalar> out_local(numComps);
 
         if (data.actsExpanded()) {
 #pragma omp for
             for (index_t e = 0; e < elements->numElements; e++) {
                 if (elements->Owner[e] == my_mpi_rank) {
                     const double vol = jac->absD[e] * jac->quadweight;
-                    const double* data_array = data.getSampleDataRO(e);
+                    const Scalar* data_array = data.getSampleDataRO(e, zero);
                     for (int q = 0; q < numQuadTotal; q++) {
                         for (int i = 0; i < numComps; i++)
                             out_local[i] += data_array[INDEX2(i, q, numComps)] * vol;
@@ -63,7 +72,7 @@ void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
             for (index_t e = 0; e < elements->numElements; e++) {
                 if (elements->Owner[e] == my_mpi_rank) {
                     const double vol = jac->absD[e] * jac->quadweight;
-                    const double* data_array = data.getSampleDataRO(e);
+                    const Scalar* data_array = data.getSampleDataRO(e, zero);
                     double rtmp = 0.;
                     for (int q = 0; q < numQuadTotal; q++)
                         rtmp += vol;
@@ -79,5 +88,15 @@ void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
     }
 }
 
+// instantiate our two supported versions
+template void Assemble_integrate<real_t>(const NodeFile* nodes,
+                                         const ElementFile* elements,
+                                         const escript::Data& data,
+                                         std::vector<real_t>& out);
+template void Assemble_integrate<cplx_t>(const NodeFile* nodes,
+                                         const ElementFile* elements,
+                                         const escript::Data& data,
+                                         std::vector<cplx_t>& out);
+
 } // namespace dudley
 
diff --git a/dudley/src/Assemble_interpolate.cpp b/dudley/src/Assemble_interpolate.cpp
index 0e54f6e..9a99cc2 100644
--- a/dudley/src/Assemble_interpolate.cpp
+++ b/dudley/src/Assemble_interpolate.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -22,6 +22,7 @@
 
 namespace dudley {
 
+template<typename Scalar>
 void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
                           const escript::Data& data,
                           escript::Data& interpolated_data)
@@ -29,6 +30,10 @@ void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
     if (!nodes || !elements)
         return;
 
+    if (data.isLazy() && data.isComplex()) {
+        throw DudleyException("Programming error: attempt to Assemble_interpolate using lazy complex data");
+    }    
+    
     const int data_type = data.getFunctionSpace().getTypeCode();
     const bool reduced_integration = hasReducedIntegrationOrder(interpolated_data);
 
@@ -69,27 +74,39 @@ void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
         throw DudleyException("Assemble_interpolate: unable to locate shape function.");
     }
 
+    const Scalar zero = static_cast<Scalar>(0);
     interpolated_data.requireWrite();
 #pragma omp parallel
     {
-        std::vector<double> local_data(NS_DOF * numComps);
-        const size_t numComps_size = numComps * sizeof(double);
+        std::vector<Scalar> local_data(NS_DOF * numComps);
+        const size_t numComps_size = numComps * sizeof(Scalar);
         // open the element loop
 #pragma omp for
         for (index_t e = 0; e < elements->numElements; e++) {
             for (int q = 0; q < NS_DOF; q++) {
                 const index_t i = elements->Nodes[INDEX2(q, e, NN)];
-                const double* data_array = data.getSampleDataRO(map[i]);
+                const Scalar* data_array = data.getSampleDataRO(map[i], zero);
                 memcpy(&local_data[INDEX3(0, q, 0, numComps, NS_DOF)],
                        data_array, numComps_size);
             }
             // calculate interpolated_data=local_data*S
             util::smallMatSetMult1(1, numComps, numQuad,
-                            interpolated_data.getSampleDataRW(e), NS_DOF,
+                            interpolated_data.getSampleDataRW(e, zero), NS_DOF,
                             &local_data[0], shapeFns);
         } // end of element loop
     } // end of parallel region
 }
 
+// instantiate our two supported versions
+template void Assemble_interpolate<escript::DataTypes::real_t>(
+                          const NodeFile* nodes, const ElementFile* elements,
+                          const escript::Data& data,
+                          escript::Data& interpolated_data);
+template void Assemble_interpolate<escript::DataTypes::cplx_t>(
+                          const NodeFile* nodes, const ElementFile* elements,
+                          const escript::Data& data,
+                          escript::Data& interpolated_data);
+
+
 } // namespace dudley
 
diff --git a/dudley/src/Assemble_jacobians.cpp b/dudley/src/Assemble_jacobians.cpp
index 06a6c4d..73e0619 100644
--- a/dudley/src/Assemble_jacobians.cpp
+++ b/dudley/src/Assemble_jacobians.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/DomainFactory.cpp b/dudley/src/DomainFactory.cpp
index 8e48717..44e52d5 100644
--- a/dudley/src/DomainFactory.cpp
+++ b/dudley/src/DomainFactory.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,8 +20,15 @@
 #include <escript/SubWorld.h>
 
 #ifdef ESYS_HAVE_NETCDF
+#ifdef NETCDF4
+  #include <ncDim.h>
+  #include <ncVar.h>
+  #include <ncFile.h>  
+  #include <escript/NCHelper.h>  
+#else
 #include <netcdfcpp.h>
 #endif
+#endif
 
 #include <boost/python/extract.hpp>
 #include <boost/scoped_array.hpp>
@@ -32,9 +39,31 @@ using namespace std;
 using namespace escript;
 namespace bp = boost::python;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace dudley {
 
 #ifdef ESYS_HAVE_NETCDF
+#ifdef NETCDF4
+
+// A convenience method to retrieve an integer attribute from a NetCDF file
+template<typename T>
+T ncReadAtt(NcFile& dataFile, const string& fName, const string& attrName)
+{
+    NcGroupAtt attr = dataFile.getAtt(attrName.c_str());
+    if (attr.isNull()) {
+        stringstream msg;
+        msg << "loadMesh: Error retrieving integer attribute '" << attrName
+            << "' from NetCDF file '" << fName << "'";
+        throw IOError(msg.str());
+    }
+    T value;
+    attr.getValues(&value);
+    return value;
+}
+#else        
 // A convenience method to retrieve an integer attribute from a NetCDF file
 template<typename T>
 T ncReadAtt(NcFile* dataFile, const string& fName, const string& attrName)
@@ -51,6 +80,7 @@ T ncReadAtt(NcFile* dataFile, const string& fName, const string& attrName)
     return value;
 }
 #endif
+#endif
 
 inline void cleanupAndThrow(DudleyDomain* dom, string msg)
 {
@@ -59,6 +89,279 @@ inline void cleanupAndThrow(DudleyDomain* dom, string msg)
     throw IOError(msgPrefix+msg);
 }
 
+#ifdef NETCDF4
+
+Domain_ptr DudleyDomain::load(const string& fileName)
+{
+#ifdef ESYS_HAVE_NETCDF
+    JMPI mpiInfo = makeInfo(MPI_COMM_WORLD);
+    const string fName(mpiInfo->appendRankToFileName(fileName));
+
+    // Open NetCDF file for reading
+    NcGroupAtt attr;
+    NcVar nc_var_temp;
+    NcFile dataFile;
+    if (!openNcFile(dataFile, fileName))
+    {
+        throw IOError("load: opening of netCDF file for input failed.");
+    }        
+
+    // Read NetCDF integer attributes
+
+    // index_size was only introduced with 64-bit index support so fall back
+    // to 32 bits if not found.
+    int index_size;
+    try {
+        index_size = ncReadAtt<int>(dataFile, fName, "index_size");
+    } catch (IOError& e) {
+        index_size = 4;
+    }
+    // technically we could cast if reading 32-bit data on 64-bit escript
+    // but cost-benefit analysis clearly favours this implementation for now
+    if (sizeof(index_t) != index_size) {
+        throw IOError("loadMesh: size of index types at runtime differ from dump file");
+    }
+
+    int mpi_size = ncReadAtt<int>(dataFile, fName, "mpi_size");
+    int mpi_rank = ncReadAtt<int>(dataFile, fName, "mpi_rank");
+    int numDim = ncReadAtt<int>(dataFile, fName, "numDim");
+    dim_t numNodes = ncReadAtt<dim_t>(dataFile, fName, "numNodes");
+    dim_t num_Elements = ncReadAtt<dim_t>(dataFile, fName, "num_Elements");
+    dim_t num_FaceElements = ncReadAtt<dim_t>(dataFile, fName, "num_FaceElements");
+    dim_t num_Points = ncReadAtt<dim_t>(dataFile, fName, "num_Points");
+    int num_Elements_numNodes = ncReadAtt<int>(dataFile, fName, "num_Elements_numNodes");
+    int Elements_TypeId = ncReadAtt<int>(dataFile, fName, "Elements_TypeId");
+    int num_FaceElements_numNodes = ncReadAtt<int>(dataFile, fName, "num_FaceElements_numNodes");
+    int FaceElements_TypeId = ncReadAtt<int>(dataFile, fName, "FaceElements_TypeId");
+    int Points_TypeId = ncReadAtt<int>(dataFile, fName, "Points_TypeId");
+    int num_Tags = ncReadAtt<int>(dataFile, fName, "num_Tags");
+
+    // Verify size and rank
+    if (mpiInfo->size != mpi_size) {
+        stringstream msg;
+        msg << "loadMesh: The NetCDF file '" << fName
+            << "' can only be read on " << mpi_size
+            << " CPUs. Currently running: " << mpiInfo->size;
+        throw DudleyException(msg.str());
+    }
+    if (mpiInfo->rank != mpi_rank) {
+        stringstream msg;
+        msg << "loadMesh: The NetCDF file '" << fName
+            << "' should be read on CPU #" << mpi_rank
+            << " and NOT on #" << mpiInfo->rank;
+        throw DudleyException(msg.str());
+    }
+
+    // Read mesh name
+    if ((attr=dataFile.getAtt("Name")), attr.isNull() ) {
+        stringstream msg;
+        msg << "loadMesh: Error retrieving mesh name from NetCDF file '"
+            << fName << "'";
+        throw IOError(msg.str());
+    }
+    string name;
+    attr.getValues(name);
+
+    // allocate mesh
+    DudleyDomain* dom = new DudleyDomain(name.c_str(), numDim, mpiInfo);
+
+    // read nodes
+    NodeFile* nodes = dom->getNodes();
+    nodes->allocTable(numNodes);
+    // Nodes_Id
+    if (( nc_var_temp = dataFile.getVar("Nodes_Id")), nc_var_temp.isNull() )
+        cleanupAndThrow(dom, "get_var(Nodes_Id)");
+    nc_var_temp.getVar(&nodes->Id[0]);    // numNodes) )
+    // Nodes_Tag
+    if (( nc_var_temp = dataFile.getVar("Nodes_Tag")), nc_var_temp.isNull() )
+        cleanupAndThrow(dom, "get_var(Nodes_Tag)");
+    nc_var_temp.getVar(&nodes->Tag[0]);   // numNodes
+    // Nodes_gDOF
+    if (( nc_var_temp = dataFile.getVar("Nodes_gDOF")), nc_var_temp.isNull() )
+        cleanupAndThrow(dom, "get_var(Nodes_gDOF)");
+    nc_var_temp.getVar(&nodes->globalDegreesOfFreedom[0]);  // numNodes
+    // Nodes_gNI
+    if (( nc_var_temp = dataFile.getVar("Nodes_gNI")), nc_var_temp.isNull() )
+        cleanupAndThrow(dom, "get_var(Nodes_gNI)");
+    nc_var_temp.getVar(&nodes->globalNodesIndex[0]);    // numNodes
+    // Nodes_Coordinates
+    if ((nc_var_temp = dataFile.getVar("Nodes_Coordinates")), nc_var_temp.isNull())
+        cleanupAndThrow(dom, "get_var(Nodes_Coordinates)");
+    nc_var_temp.getVar(&nodes->Coordinates[0]); // numNodes, numDim
+
+    nodes->updateTagList();
+
+    // read elements
+    ElementFile* elements = new ElementFile((ElementTypeId)Elements_TypeId, mpiInfo);
+    dom->setElements(elements);
+    elements->allocTable(num_Elements);
+    elements->minColor = 0;
+    elements->maxColor = num_Elements-1;
+    if (num_Elements > 0) {
+       // Elements_Id
+       if (( nc_var_temp = dataFile.getVar("Elements_Id")), nc_var_temp.isNull() )
+           cleanupAndThrow(dom, "get_var(Elements_Id)");
+       nc_var_temp.getVar(&elements->Id[0]);    // num_Elements
+       // Elements_Tag
+       if (( nc_var_temp = dataFile.getVar("Elements_Tag")), nc_var_temp.isNull())
+           cleanupAndThrow(dom, "get_var(Elements_Tag)");
+       nc_var_temp.getVar(&elements->Tag[0]);   // num_Elements
+       // Elements_Owner
+       if (( nc_var_temp = dataFile.getVar("Elements_Owner")), nc_var_temp.isNull() )
+           cleanupAndThrow(dom, "get_var(Elements_Owner)");
+       nc_var_temp.getVar(&elements->Owner[0]); // num_Elements
+       // Elements_Color
+       if (( nc_var_temp = dataFile.getVar("Elements_Color")), nc_var_temp.isNull() )
+           cleanupAndThrow(dom, "get_var(Elements_Color)");
+       nc_var_temp.getVar(&elements->Color[0]); // num_Elements
+       // Elements_Nodes
+       int* Elements_Nodes = new int[num_Elements*num_Elements_numNodes];
+       if ((nc_var_temp = dataFile.getVar("Elements_Nodes")), nc_var_temp.isNull()) {
+           delete[] Elements_Nodes;
+           cleanupAndThrow(dom, "get_var(Elements_Nodes)");
+       }
+       nc_var_temp.getVar(&Elements_Nodes[0]);  // num_Elements, num_Elements_numNodes
+       // Copy temp array into elements->Nodes
+       for (index_t i = 0; i < num_Elements; i++) {
+           for (int j = 0; j < num_Elements_numNodes; j++) {
+               elements->Nodes[INDEX2(j,i,num_Elements_numNodes)]
+                    = Elements_Nodes[INDEX2(j,i,num_Elements_numNodes)];
+           }
+       }
+       delete[] Elements_Nodes;
+    } // num_Elements > 0
+    elements->updateTagList();
+
+    // get the face elements
+    ElementFile* faces = new ElementFile((ElementTypeId)FaceElements_TypeId, mpiInfo);
+    dom->setFaceElements(faces);
+    faces->allocTable(num_FaceElements);
+    faces->minColor = 0;
+    faces->maxColor = num_FaceElements-1;
+    if (num_FaceElements > 0) {
+        // FaceElements_Id
+        if (( nc_var_temp = dataFile.getVar("FaceElements_Id")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(FaceElements_Id)");
+        nc_var_temp.getVar(&faces->Id[0]);  // num_FaceElements
+        // FaceElements_Tag
+        if (( nc_var_temp = dataFile.getVar("FaceElements_Tag")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(FaceElements_Tag)");
+        nc_var_temp.getVar(&faces->Tag[0]); // num_FaceElements) )
+        // FaceElements_Owner
+        if (( nc_var_temp = dataFile.getVar("FaceElements_Owner")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(FaceElements_Owner)");
+        nc_var_temp.getVar(&faces->Owner[0]);   //, num_FaceElements) )
+        // FaceElements_Color
+        if (( nc_var_temp = dataFile.getVar("FaceElements_Color")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(FaceElements_Color)");
+        nc_var_temp.getVar(&faces->Color[0]);   //, num_FaceElements) )
+        // FaceElements_Nodes
+        int* FaceElements_Nodes = new int[num_FaceElements*num_FaceElements_numNodes];
+        if ((nc_var_temp = dataFile.getVar("FaceElements_Nodes")), nc_var_temp.isNull()) {
+            delete[] FaceElements_Nodes;
+            cleanupAndThrow(dom, "get_var(FaceElements_Nodes)");
+        }
+        nc_var_temp.getVar(&(FaceElements_Nodes[0]));   // num_FaceElements, num_FaceElements_numNodes
+        // Copy temp array into faces->Nodes
+        for (index_t i = 0; i < num_FaceElements; i++) {
+            for (int j = 0; j < num_FaceElements_numNodes; j++) {
+                faces->Nodes[INDEX2(j,i,num_FaceElements_numNodes)] = FaceElements_Nodes[INDEX2(j,i,num_FaceElements_numNodes)];
+            }
+        }
+        delete[] FaceElements_Nodes;
+    } // num_FaceElements > 0
+    faces->updateTagList();
+
+    // get the Points (nodal elements)
+    ElementFile* points = new ElementFile((ElementTypeId)Points_TypeId, mpiInfo);
+    dom->setPoints(points);
+    points->allocTable(num_Points);
+    points->minColor = 0;
+    points->maxColor = num_Points-1;
+    if (num_Points > 0) {
+        // Points_Id
+        if (( nc_var_temp = dataFile.getVar("Points_Id")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Id)");
+        nc_var_temp.getVar(&points->Id[0]); // num_Points
+        // Points_Tag
+        if (( nc_var_temp = dataFile.getVar("Points_Tag")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Tag)");
+        nc_var_temp.getVar(&points->Tag[0]);    // num_Points
+        // Points_Owner
+        if (( nc_var_temp = dataFile.getVar("Points_Owner")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Owner)");
+        nc_var_temp.getVar(&points->Owner[0]);   // num_Points
+        // Points_Color
+        if (( nc_var_temp = dataFile.getVar("Points_Color")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Color)");
+        nc_var_temp.getVar(&points->Color[0]);  // num_Points
+        // Points_Nodes
+        int* Points_Nodes = new int[num_Points];
+        if ((nc_var_temp = dataFile.getVar("Points_Nodes")), nc_var_temp.isNull()) {
+            delete[] Points_Nodes;
+            cleanupAndThrow(dom, "get_var(Points_Nodes)");
+        }
+        nc_var_temp.getVar(&Points_Nodes[0]);   // num_Points
+        // Copy temp array into points->Nodes
+        for (index_t i = 0; i < num_Points; i++) {
+            points->Id[points->Nodes[INDEX2(0,i,1)]] = Points_Nodes[i];
+        }
+        delete[] Points_Nodes;
+    } // num_Points > 0
+    points->updateTagList();
+
+    // get the tags
+    if (num_Tags > 0) {
+        // Temp storage to gather node IDs
+        int *Tags_keys = new int[num_Tags];
+        char name_temp[4096];
+        int i;
+
+        // Tags_keys
+        if (( nc_var_temp = dataFile.getVar("Tags_keys")), nc_var_temp.isNull() ) {
+            delete[] Tags_keys;
+            cleanupAndThrow(dom, "get_var(Tags_keys)");
+        }
+        nc_var_temp.getVar(&Tags_keys[0]);  // num_Tags
+        for (i=0; i<num_Tags; i++) {
+          // Retrieve tag name
+          sprintf(name_temp, "Tags_name_%d", i);
+          if ((attr=dataFile.getAtt(name_temp)), attr.isNull() ) {
+              delete[] Tags_keys;
+              stringstream msg;
+              msg << "get_att(" << name_temp << ")";
+              cleanupAndThrow(dom, msg.str());
+          }
+          string name;
+          attr.getValues(name);
+          dom->setTagMap(name.c_str(), Tags_keys[i]);
+        }
+        delete[] Tags_keys;
+    }
+
+    // Nodes_DofDistribution
+    IndexVector first_DofComponent(mpi_size+1);
+    if ((nc_var_temp = dataFile.getVar("Nodes_DofDistribution")), nc_var_temp.isNull() ) {
+        cleanupAndThrow(dom, "get_var(Nodes_DofDistribution)");
+    }
+    nc_var_temp.getVar(&first_DofComponent[0]); // mpi_size+1
+
+    // Nodes_NodeDistribution
+    IndexVector first_NodeComponent(mpi_size+1);
+    if ((nc_var_temp = dataFile.getVar("Nodes_NodeDistribution")), nc_var_temp.isNull() ) {
+        cleanupAndThrow(dom, "get_var(Nodes_NodeDistribution)");
+    }
+    nc_var_temp.getVar(&first_NodeComponent[0]); // mpi_size+1
+    dom->createMappings(first_DofComponent, first_NodeComponent);
+
+    return dom->getPtr();
+#else
+    throw DudleyException("loadMesh: not compiled with NetCDF. Please contact your installation manager.");
+#endif // ESYS_HAVE_NETCDF
+}
+
+#else
+
 Domain_ptr DudleyDomain::load(const string& fileName)
 {
 #ifdef ESYS_HAVE_NETCDF
@@ -365,6 +668,7 @@ Domain_ptr DudleyDomain::load(const string& fileName)
     throw DudleyException("loadMesh: not compiled with NetCDF. Please contact your installation manager.");
 #endif // ESYS_HAVE_NETCDF
 }
+#endif
 
 Domain_ptr readMesh(const string& fileName, int /*integrationOrder*/,
                     int /*reducedIntegrationOrder*/, bool optimize)
diff --git a/dudley/src/DomainFactory.h b/dudley/src/DomainFactory.h
index eccb5c0..faef0b9 100644
--- a/dudley/src/DomainFactory.h
+++ b/dudley/src/DomainFactory.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Dudley.h b/dudley/src/Dudley.h
index b0185c8..66e4221 100644
--- a/dudley/src/Dudley.h
+++ b/dudley/src/Dudley.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/DudleyDomain.cpp b/dudley/src/DudleyDomain.cpp
index c010034..a5492bd 100644
--- a/dudley/src/DudleyDomain.cpp
+++ b/dudley/src/DudleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -39,7 +39,14 @@ using esys_trilinos::const_TrilinosGraph_ptr;
 #include <boost/scoped_array.hpp>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
 using namespace std;
@@ -47,8 +54,15 @@ namespace bp = boost::python;
 using escript::NotImplementedError;
 using escript::ValueError;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace dudley {
 
+using escript::DataTypes::real_t;
+using escript::DataTypes::cplx_t;
+
 DudleyDomain::FunctionSpaceNamesMapType DudleyDomain::m_functionSpaceTypeNames;
 
 DudleyDomain::DudleyDomain(const string& name, int numDim, escript::JMPI jmpi) :
@@ -147,6 +161,306 @@ void DudleyDomain::relabelElementNodes(const index_t* newNode, index_t offset)
     m_points->relabelNodes(newNode, offset);
 }
 
+#ifdef NETCDF4
+
+void DudleyDomain::dump(const string& fileName) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    NcDim ncdims[12];
+    NcVar ids;
+    index_t* index_ptr;
+#ifdef ESYS_INDEXTYPE_LONG
+    NcType ncIdxType = ncLong;
+#else
+    NcType ncIdxType = ncInt;
+#endif
+    int num_Tags = 0;
+    int mpi_size                  = getMPISize();
+    int mpi_rank                  = getMPIRank();
+    int numDim                    = m_nodes->numDim;
+    dim_t numNodes                = m_nodes->getNumNodes();
+    dim_t num_Elements            = m_elements->numElements;
+    dim_t num_FaceElements        = m_faceElements->numElements;
+    dim_t num_Points              = m_points->numElements;
+    int num_Elements_numNodes     = m_elements->numNodes;
+    int num_FaceElements_numNodes = m_faceElements->numNodes;
+#ifdef ESYS_MPI
+    MPI_Status status;
+#endif
+
+    // Incoming token indicates it's my turn to write
+#ifdef ESYS_MPI
+    if (mpi_rank > 0)
+        MPI_Recv(&num_Tags, 0, MPI_INT, mpi_rank-1, 81800, getMPIComm(), &status);
+#endif
+
+    const string newFileName(m_mpiInfo->appendRankToFileName(fileName));
+
+    // Figure out how much storage is required for tags
+    num_Tags = m_tagMap.size();
+
+    // Create the file
+    NcFile dataFile;
+    try
+    {
+        dataFile.open(newFileName.c_str(), NcFile::FileMode::replace,   NcFile::FileFormat::classic64);
+    }
+    catch (exceptions::NcException e)
+    {
+        throw DudleyException("Error - DudleyDomain:: opening of netCDF file for output failed.");
+    }        
+
+    string msgPrefix("Error in DudleyDomain::dump: NetCDF operation failed - ");
+    // Define dimensions (num_Elements and dim_Elements are identical,
+    // dim_Elements only appears if > 0)
+    if ((ncdims[0] = dataFile.addDim("numNodes", numNodes)).isNull() )
+        throw DudleyException(msgPrefix+"add_dim(numNodes)");
+    if ((ncdims[1] = dataFile.addDim("numDim", numDim)).isNull() )
+        throw DudleyException(msgPrefix+"add_dim(numDim)");
+    if ((ncdims[2] = dataFile.addDim("mpi_size_plus_1", mpi_size+1)).isNull() )
+        throw DudleyException(msgPrefix+"add_dim(mpi_size)");
+    if (num_Elements > 0)
+        if ((ncdims[3] = dataFile.addDim("dim_Elements", num_Elements)).isNull() )
+            throw DudleyException(msgPrefix+"add_dim(dim_Elements)");
+    if (num_FaceElements > 0)
+        if ((ncdims[4] = dataFile.addDim("dim_FaceElements", num_FaceElements)).isNull() )
+         throw DudleyException(msgPrefix+"add_dim(dim_FaceElements)");
+    if (num_Points > 0)
+        if ((ncdims[6] = dataFile.addDim("dim_Points", num_Points)).isNull() )
+            throw DudleyException(msgPrefix+"add_dim(dim_Points)");
+    if (num_Elements > 0)
+        if ((ncdims[7] = dataFile.addDim("dim_Elements_Nodes", num_Elements_numNodes)).isNull() )
+            throw DudleyException(msgPrefix+"add_dim(dim_Elements_Nodes)");
+    if (num_FaceElements > 0)
+        if ((ncdims[8] = dataFile.addDim("dim_FaceElements_numNodes", num_FaceElements_numNodes)).isNull() )
+            throw DudleyException(msgPrefix+"add_dim(dim_FaceElements_numNodes)");
+    if (num_Tags > 0)
+        if ((ncdims[10] = dataFile.addDim("dim_Tags", num_Tags)).isNull() )
+            throw DudleyException(msgPrefix+"add_dim(dim_Tags)");
+
+    // Attributes: MPI size, MPI rank, Name, order, reduced_order
+    NcInt ni;        
+    if (dataFile.putAtt("index_size", ni, (int)sizeof(index_t)).isNull())
+        throw DudleyException(msgPrefix+"add_att(index_size)");
+    if (dataFile.putAtt("mpi_size", ni, mpi_size).isNull())
+        throw DudleyException(msgPrefix+"add_att(mpi_size)");
+    if (dataFile.putAtt("mpi_rank", ni, mpi_rank).isNull())
+        throw DudleyException(msgPrefix+"add_att(mpi_rank)");
+    if (dataFile.putAtt("Name", m_name.c_str()).isNull())
+        throw DudleyException(msgPrefix+"add_att(Name)");
+    if (dataFile.putAtt("numDim", ni, numDim).isNull())
+        throw DudleyException(msgPrefix+"add_att(numDim)");
+    if (dataFile.putAtt("order", ni, 2).isNull())
+        throw DudleyException(msgPrefix+"add_att(order)");
+    if (dataFile.putAtt("reduced_order", ni, 0).isNull())
+        throw DudleyException(msgPrefix+"add_att(reduced_order)");
+    if (dataFile.putAtt("numNodes", ni, numNodes).isNull())
+        throw DudleyException(msgPrefix+"add_att(numNodes)");
+    if (dataFile.putAtt("num_Elements", ni, num_Elements).isNull())
+        throw DudleyException(msgPrefix+"add_att(num_Elements)");
+    if (dataFile.putAtt("num_FaceElements", ni, num_FaceElements).isNull())
+        throw DudleyException(msgPrefix+"add_att(num_FaceElements)");
+    if (dataFile.putAtt("num_Points", ni, num_Points).isNull())
+        throw DudleyException(msgPrefix+"add_att(num_Points)");
+    if (dataFile.putAtt("num_Elements_numNodes", ni, num_Elements_numNodes).isNull())
+        throw DudleyException(msgPrefix+"add_att(num_Elements_numNodes)");
+    if (dataFile.putAtt("num_FaceElements_numNodes", ni, num_FaceElements_numNodes).isNull())
+        throw DudleyException(msgPrefix+"add_att(num_FaceElements_numNodes)");
+    if (dataFile.putAtt("Elements_TypeId", ni, m_elements->etype).isNull())
+        throw DudleyException(msgPrefix+"add_att(Elements_TypeId)");
+    if (dataFile.putAtt("FaceElements_TypeId", ni, m_faceElements->etype).isNull())
+        throw DudleyException(msgPrefix+"add_att(FaceElements_TypeId)");
+    if (dataFile.putAtt("Points_TypeId", ni, m_points->etype).isNull())
+        throw DudleyException(msgPrefix+"add_att(Points_TypeId)");
+    if (dataFile.putAtt("num_Tags", ni, num_Tags).isNull())
+        throw DudleyException(msgPrefix+"add_att(num_Tags)");
+
+    // // // // // Nodes // // // // //
+
+    // Nodes nodeDistribution
+    if ((ids = dataFile.addVar("Nodes_NodeDistribution", ncIdxType, ncdims[2])).isNull() )
+        throw DudleyException(msgPrefix+"add_var(Nodes_NodeDistribution)");
+    index_ptr = &m_nodes->nodesDistribution->first_component[0];
+    ids.putVar(index_ptr);  // mpi_size+1
+
+    // Nodes degreesOfFreedomDistribution
+    if (( ids = dataFile.addVar("Nodes_DofDistribution", ncIdxType, ncdims[2])).isNull() )
+        throw DudleyException(msgPrefix+"add_var(Nodes_DofDistribution)");
+    index_ptr = &m_nodes->dofDistribution->first_component[0];
+    ids.putVar(index_ptr);  // mpi_size+1
+
+    // Only write nodes if non-empty because NetCDF doesn't like empty arrays
+    // (it treats them as NC_UNLIMITED)
+    if (numNodes > 0) {
+        // Nodes Id
+        if (( ids = dataFile.addVar("Nodes_Id", ncIdxType, ncdims[0])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Nodes_Id)");
+        ids.putVar(m_nodes->Id);    // numNodes
+
+        // Nodes Tag
+        if (( ids = dataFile.addVar("Nodes_Tag", ncInt, ncdims[0])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Nodes_Tag)");
+        ids.putVar(m_nodes->Tag);  // numNodes
+
+        // Nodes gDOF
+        if (( ids = dataFile.addVar("Nodes_gDOF", ncIdxType, ncdims[0])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Nodes_gDOF)");
+        ids.putVar(m_nodes->globalDegreesOfFreedom);  // numNodes
+
+        // Nodes global node index
+        if (( ids = dataFile.addVar("Nodes_gNI", ncIdxType, ncdims[0])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Nodes_gNI)");
+        ids.putVar(m_nodes->globalNodesIndex); // numNodes
+
+        // Nodes Coordinates
+        vector<NcDim> ncds;
+        ncds.push_back(ncdims[0]);
+        ncds.push_back(ncdims[1]);
+        if (( ids = dataFile.addVar("Nodes_Coordinates", ncDouble, ncds)).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Nodes_Coordinates)");
+        ids.putVar(m_nodes->Coordinates);  // should be (numNodes, numDim) values written        
+        
+        
+    }
+
+    // // // // // Elements // // // // //
+    if (num_Elements > 0) {
+        // Elements_Id
+        if (( ids = dataFile.addVar("Elements_Id", ncIdxType, ncdims[3])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Elements_Id)");
+        ids.putVar(m_elements->Id);    // num_Elements
+
+        // Elements_Tag
+        if (( ids = dataFile.addVar("Elements_Tag", ncInt, ncdims[3])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Elements_Tag)");
+        ids.putVar(m_elements->Tag);   // num_Elements
+
+        // Elements_Owner
+        if (( ids = dataFile.addVar("Elements_Owner", ncInt, ncdims[3])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Elements_Owner)");
+        ids.putVar(m_elements->Owner); // num_Elements
+
+        // Elements_Color
+        if (( ids = dataFile.addVar("Elements_Color", ncIdxType, ncdims[3])).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Elements_Color)");
+        ids.putVar(m_elements->Color); // num_Elements
+
+        // Elements_Nodes
+        vector<NcDim> dv;
+        dv.push_back(ncdims[3]);
+        dv.push_back(ncdims[7]);
+        if (( ids = dataFile.addVar("Elements_Nodes", ncIdxType, dv) ).isNull() )
+            throw DudleyException(msgPrefix+"add_var(Elements_Nodes)");
+        ids.putVar(m_elements->Nodes); //(, num_Elements, num_Elements_numNodes) values written        
+        
+        
+    }
+
+    // // // // // Face_Elements // // // // //
+    if (num_FaceElements > 0) {
+        // FaceElements_Id
+        if ((ids = dataFile.addVar("FaceElements_Id", ncIdxType, ncdims[4])).isNull())
+            throw DudleyException(msgPrefix+"add_var(FaceElements_Id)");
+        ids.putVar(m_faceElements->Id); // num_FaceElements
+
+        // FaceElements_Tag
+        if ((ids = dataFile.addVar("FaceElements_Tag", ncInt, ncdims[4])).isNull())
+            throw DudleyException(msgPrefix+"add_var(FaceElements_Tag)");
+        ids.putVar(m_faceElements->Tag);    // num_FaceElements
+
+        // FaceElements_Owner
+        if ((ids = dataFile.addVar("FaceElements_Owner", ncInt, ncdims[4])).isNull())
+            throw DudleyException(msgPrefix+"add_var(FaceElements_Owner)");
+        ids.putVar(m_faceElements->Owner);  // num_FaceElements
+
+        // FaceElements_Color
+        if ((ids = dataFile.addVar("FaceElements_Color", ncIdxType, ncdims[4])).isNull())
+            throw DudleyException(msgPrefix+"add_var(FaceElements_Color)");
+        ids.putVar(m_faceElements->Color);  // num_FaceElements
+
+        // FaceElements_Nodes
+        vector<NcDim> dv;
+        dv.push_back(ncdims[4]);
+        dv.push_back(ncdims[8]);
+        if ((ids = dataFile.addVar("FaceElements_Nodes", ncIdxType, dv)).isNull())
+            throw DudleyException(msgPrefix+"add_var(FaceElements_Nodes)");
+        ids.putVar(m_faceElements->Nodes);  // num_FaceElements, num_FaceElements_numNodes
+    }
+
+    // // // // // Points // // // // //
+    if (num_Points > 0) {
+        // Points_Id
+        if ((ids = dataFile.addVar("Points_Id", ncIdxType, ncdims[6])).isNull())
+            throw DudleyException(msgPrefix+"add_var(Points_Id)");
+        ids.putVar(m_points->Id);   // num_Points
+
+        // Points_Tag
+        if ((ids = dataFile.addVar("Points_Tag", ncInt, ncdims[6])).isNull())
+            throw DudleyException(msgPrefix+"add_var(Points_Tag)");
+        ids.putVar(m_points->Tag);  // num_Points
+
+        // Points_Owner
+        if ((ids = dataFile.addVar("Points_Owner", ncInt, ncdims[6])).isNull())
+            throw DudleyException(msgPrefix+"add_var(Points_Owner)");
+        ids.putVar(m_points->Owner);    // num_Points
+
+        // Points_Color
+        if ((ids = dataFile.addVar("Points_Color", ncIdxType, ncdims[6])).isNull())
+            throw DudleyException(msgPrefix+"add_var(Points_Color)");
+        ids.putVar(m_points->Color);    // num_Points
+
+        // Points_Nodes
+        if ((ids = dataFile.addVar("Points_Nodes", ncIdxType, ncdims[6])).isNull())
+            throw DudleyException(msgPrefix+"add_var(Points_Nodes)");
+        ids.putVar(m_points->Nodes);    // num_Points
+    }
+
+    // // // // // TagMap // // // // //
+    if (num_Tags > 0) {
+        // Temp storage to gather node IDs
+        vector<int> Tags_keys;
+
+        // Copy tag data into temp arrays
+        TagMap::const_iterator it;
+        for (it = m_tagMap.begin(); it != m_tagMap.end(); it++) {
+            Tags_keys.push_back(it->second);
+        }
+
+        // Tags_keys
+        if ((ids = dataFile.addVar("Tags_keys", ncInt, ncdims[10])).isNull())
+            throw DudleyException(msgPrefix+"add_var(Tags_keys)");
+        ids.putVar(&Tags_keys[0]);  // num_Tags
+
+        // Tags_names_*
+        // This is an array of strings, it should be stored as an array but
+        // instead I have hacked in one attribute per string because the NetCDF
+        // manual doesn't tell how to do an array of strings
+        int i = 0;
+        for (it = m_tagMap.begin(); it != m_tagMap.end(); it++, i++) {
+            stringstream ss;
+            ss << "Tags_name_" << i;
+            const string name(ss.str());
+            if (dataFile.putAtt(name.c_str(), it->first.c_str()).isNull())
+                throw DudleyException(msgPrefix+"add_att(Tags_names_X)");
+        }
+    }
+
+    // Send token to next MPI process so he can take his turn
+#ifdef ESYS_MPI
+    if (mpi_rank < mpi_size-1)
+        MPI_Send(&num_Tags, 0, MPI_INT, mpi_rank+1, 81800, getMPIComm());
+#endif
+
+    // NetCDF file is closed by destructor of NcFile object
+
+#else
+    throw DudleyException("DudleyDomain::dump: not configured with netCDF. "
+                          "Please contact your installation manager.");
+#endif // ESYS_HAVE_NETCDF
+}
+
+#else
+
 void DudleyDomain::dump(const string& fileName) const
 {
 #ifdef ESYS_HAVE_NETCDF
@@ -449,6 +763,8 @@ void DudleyDomain::dump(const string& fileName) const
 #endif // ESYS_HAVE_NETCDF
 }
 
+#endif
+
 string DudleyDomain::getDescription() const
 {
     return "DudleyMesh";
@@ -751,18 +1067,30 @@ void DudleyDomain::interpolateOnDomain(escript::Data& target,
             switch (target.getFunctionSpace().getTypeCode()) {
                 case Nodes:
                 case DegreesOfFreedom:
-                    Assemble_CopyNodalData(m_nodes, target, in);
+                    if (in.isComplex())
+                        Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                    else
+                        Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                 break;
                 case Elements:
                 case ReducedElements:
-                    Assemble_interpolate(m_nodes, m_elements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_elements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_elements, in, target);
                 break;
                 case FaceElements:
                 case ReducedFaceElements:
-                    Assemble_interpolate(m_nodes, m_faceElements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_faceElements, in, target);
                 break;
                 case Points:
-                    Assemble_interpolate(m_nodes, m_points, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_points, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_points, in, target);
                 break;
                 default:
                     stringstream ss;
@@ -774,16 +1102,25 @@ void DudleyDomain::interpolateOnDomain(escript::Data& target,
         break;
         case Elements:
             if (target.getFunctionSpace().getTypeCode() == Elements) {
-                Assemble_CopyElementData(m_elements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_elements, target, in);
             } else if (target.getFunctionSpace().getTypeCode()==ReducedElements) {
-                Assemble_AverageElementData(m_elements, target, in);
+                if (in.isComplex())
+                    Assemble_AverageElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_AverageElementData<real_t>(m_elements, target, in);
             } else {
                 throw ValueError("No interpolation with data on elements possible.");
             }
             break;
         case ReducedElements:
             if (target.getFunctionSpace().getTypeCode() == ReducedElements) {
-                Assemble_CopyElementData(m_elements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_elements, target, in);
             } else {
                 throw ValueError("No interpolation with data on elements "
                                  "with reduced integration order possible.");
@@ -791,16 +1128,25 @@ void DudleyDomain::interpolateOnDomain(escript::Data& target,
             break;
         case FaceElements:
             if (target.getFunctionSpace().getTypeCode() == FaceElements) {
-                Assemble_CopyElementData(m_faceElements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_faceElements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_faceElements, target, in);
             } else if (target.getFunctionSpace().getTypeCode() == ReducedFaceElements) {
-                Assemble_AverageElementData(m_faceElements, target, in);
+                if (in.isComplex())
+                    Assemble_AverageElementData<cplx_t>(m_faceElements, target, in);
+                else
+                    Assemble_AverageElementData<real_t>(m_faceElements, target, in);
             } else {
                 throw ValueError("No interpolation with data on face elements possible.");
             }
             break;
         case ReducedFaceElements:
             if (target.getFunctionSpace().getTypeCode() == ReducedFaceElements) {
-                Assemble_CopyElementData(m_faceElements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_faceElements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_faceElements, target, in);
             } else {
                 throw ValueError("No interpolation with data on face "
                          "elements with reduced integration order possible.");
@@ -808,7 +1154,10 @@ void DudleyDomain::interpolateOnDomain(escript::Data& target,
             break;
         case Points:
             if (target.getFunctionSpace().getTypeCode() == Points) {
-                Assemble_CopyElementData(m_points, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_points, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_points, target, in);
             } else {
                 throw ValueError("No interpolation with data on points possible.");
             }
@@ -816,41 +1165,65 @@ void DudleyDomain::interpolateOnDomain(escript::Data& target,
         case DegreesOfFreedom:
             switch (target.getFunctionSpace().getTypeCode()) {
                 case DegreesOfFreedom:
-                    Assemble_CopyNodalData(m_nodes, target, in);
+                    if (in.isComplex())
+                        Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                    else
+                        Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                 break;
 
                 case Nodes:
                     if (getMPISize() > 1) {
                         escript::Data temp(in);
                         temp.expand();
-                        Assemble_CopyNodalData(m_nodes, target, temp);
+                        if (in.isComplex())
+                            Assemble_CopyNodalData<cplx_t>(m_nodes, target, temp);
+                        else
+                            Assemble_CopyNodalData<real_t>(m_nodes, target, temp);
                     } else {
-                        Assemble_CopyNodalData(m_nodes, target, in);
+                        if (in.isComplex())
+                            Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                        else
+                            Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                     }
                 break;
                 case Elements:
                 case ReducedElements:
                     if (getMPISize() > 1) {
                         escript::Data temp(in, continuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_elements, temp, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_elements, temp, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_elements, temp, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_elements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_elements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_elements, in, target);
                     }
                 break;
                 case FaceElements:
                 case ReducedFaceElements:
                     if (getMPISize() > 1) {
                         escript::Data temp(in, continuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_faceElements, temp, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, temp, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_faceElements, temp, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_faceElements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_faceElements, in, target);
                     }
                 break;
                 case Points:
                     if (getMPISize() > 1) {
                         //escript::Data temp(in, continuousFunction(*this));
                     } else {
-                        Assemble_interpolate(m_nodes, m_points, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_points, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_points, in, target);
                     }
                 break;
                 default:
@@ -920,9 +1293,22 @@ void DudleyDomain::interpolateAcross(escript::Data& /*target*/,
 //
 // calculates the integral of a function defined on arg
 //
-void DudleyDomain::setToIntegrals(vector<double>& integrals,
+void DudleyDomain::setToIntegrals(vector<real_t>& integrals,
                                   const escript::Data& arg) const
 {
+    setToIntegralsWorker<real_t>(integrals, arg);
+}
+
+void DudleyDomain::setToIntegrals(vector<cplx_t>& integrals,
+                                  const escript::Data& arg) const
+{
+    setToIntegralsWorker<cplx_t>(integrals, arg);
+}
+
+template<typename Scalar>
+void DudleyDomain::setToIntegralsWorker(vector<Scalar>& integrals,
+                                        const escript::Data& arg) const
+{
     if (*arg.getFunctionSpace().getDomain() != *this)
         throw ValueError("setToIntegrals: Illegal domain of integration kernel");
 
@@ -961,14 +1347,12 @@ void DudleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg)
         throw ValueError("setToGradient: Illegal domain of gradient argument");
     if (*grad.getFunctionSpace().getDomain() != *this)
         throw ValueError("setToGradient: Illegal domain of gradient");
+    if (grad.isComplex() != arg.isComplex())
+        throw ValueError("setToGradient: Complexity of input and output must match");
 
     escript::Data nodeData;
-    if (getMPISize() > 1) {
-        if (arg.getFunctionSpace().getTypeCode() == DegreesOfFreedom) {
-            nodeData = escript::Data(arg, continuousFunction(*this));
-        } else {
-            nodeData = arg;
-        }
+    if (getMPISize() > 1 && arg.getFunctionSpace().getTypeCode() == DegreesOfFreedom) {
+        nodeData = escript::Data(arg, continuousFunction(*this));
     } else {
         nodeData = arg;
     }
@@ -977,11 +1361,17 @@ void DudleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg)
             throw ValueError("Gradient at nodes is not supported.");
         case Elements:
         case ReducedElements:
-            Assemble_gradient(m_nodes, m_elements, grad, nodeData);
+            if (arg.isComplex())
+                Assemble_gradient<cplx_t>(m_nodes, m_elements, grad, nodeData);
+            else
+                Assemble_gradient<real_t>(m_nodes, m_elements, grad, nodeData);
             break;
         case FaceElements:
         case ReducedFaceElements:
-            Assemble_gradient(m_nodes, m_faceElements, grad, nodeData);
+            if (arg.isComplex())
+                Assemble_gradient<cplx_t>(m_nodes, m_faceElements, grad, nodeData);
+            else
+                Assemble_gradient<real_t>(m_nodes, m_faceElements, grad, nodeData);
             break;
         case Points:
             throw ValueError("Gradient at points is not supported.");
diff --git a/dudley/src/DudleyDomain.h b/dudley/src/DudleyDomain.h
index 760284d..6734be2 100644
--- a/dudley/src/DudleyDomain.h
+++ b/dudley/src/DudleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -510,7 +510,10 @@ public:
      copies the integrals of the function defined by arg into integrals.
      arg has to be defined on this.
     */
-    virtual void setToIntegrals(std::vector<double>& integrals, const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<escript::DataTypes::real_t>& integrals,
+                                const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<escript::DataTypes::cplx_t>& integrals,
+                                const escript::Data& arg) const;
 
     /**
      \brief
@@ -674,6 +677,10 @@ public:
     /// If k is the old node, the new node is newNode[k-offset].
     void relabelElementNodes(const index_t* newNode, index_t offset);
 
+    template<typename Scalar>
+    void setToIntegralsWorker(std::vector<Scalar>& integrals,
+                              const escript::Data& arg) const;
+
 #ifdef ESYS_HAVE_PASO
     /// returns a reference to the paso matrix pattern
     paso::SystemMatrixPattern_ptr getPasoPattern() const;
diff --git a/dudley/src/DudleyException.h b/dudley/src/DudleyException.h
index f68f164..d8b651c 100644
--- a/dudley/src/DudleyException.h
+++ b/dudley/src/DudleyException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/DudleyVersion.h b/dudley/src/DudleyVersion.h
index ebccbdf..dade71f 100644
--- a/dudley/src/DudleyVersion.h
+++ b/dudley/src/DudleyVersion.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 #ifndef INC_DUDLEYVERSION
 #define INC_DUDLEYVERSION
 
-char Dudley_Version[] = "$Revision: 6119 $";
+char Dudley_Version[] = "$Revision: 6523 $";
 
 #endif
 
diff --git a/dudley/src/ElementFile.cpp b/dudley/src/ElementFile.cpp
index ea0d655..8f174f7 100644
--- a/dudley/src/ElementFile.cpp
+++ b/dudley/src/ElementFile.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -191,6 +191,10 @@ void ElementFile::optimizeOrdering()
 
 void ElementFile::setTags(int newTag, const escript::Data& mask)
 {
+    if (mask.isComplex())
+    {
+      throw DudleyException("ElementFile::setTags: mask argument must not be complex.");
+    }
     const int numQuad = hasReducedIntegrationOrder(mask) ? 1 : numNodes;
 
     if (1 != mask.getDataPointSize()) {
@@ -199,16 +203,17 @@ void ElementFile::setTags(int newTag, const escript::Data& mask)
         throw DudleyException("ElementFile::setTags: illegal number of samples of mask Data object");
     }
 
+    escript::DataTypes::real_t wantreal=0;
     if (mask.actsExpanded()) {
 #pragma omp parallel for
         for (index_t n = 0; n < numElements; n++) {
-            if (mask.getSampleDataRO(n)[0] > 0)
+            if (mask.getSampleDataRO(n, wantreal)[0] > 0)
                 Tag[n] = newTag;
         }
     } else {
 #pragma omp parallel for
         for (index_t n = 0; n < numElements; n++) {
-            const double* mask_array = mask.getSampleDataRO(n);
+            const double* mask_array = mask.getSampleDataRO(n, wantreal);
             bool check = false;
             for (int q = 0; q < numQuad; q++)
                 check = check || mask_array[q];
diff --git a/dudley/src/ElementFile.h b/dudley/src/ElementFile.h
index db2e750..5705d25 100644
--- a/dudley/src/ElementFile.h
+++ b/dudley/src/ElementFile.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/ElementFile_createColoring.cpp b/dudley/src/ElementFile_createColoring.cpp
index ad51357..e59367f 100644
--- a/dudley/src/ElementFile_createColoring.cpp
+++ b/dudley/src/ElementFile_createColoring.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/ElementFile_distributeByRankOfDOF.cpp b/dudley/src/ElementFile_distributeByRankOfDOF.cpp
index cb55f71..26d8d41 100644
--- a/dudley/src/ElementFile_distributeByRankOfDOF.cpp
+++ b/dudley/src/ElementFile_distributeByRankOfDOF.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/ElementFile_jacobians.cpp b/dudley/src/ElementFile_jacobians.cpp
index 7d71439..7cb55d7 100644
--- a/dudley/src/ElementFile_jacobians.cpp
+++ b/dudley/src/ElementFile_jacobians.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/ElementType.h b/dudley/src/ElementType.h
index c2748e2..ce00125 100644
--- a/dudley/src/ElementType.h
+++ b/dudley/src/ElementType.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2010-2016 by The University of Queensland
+* Copyright (c) 2010-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/IndexList.cpp b/dudley/src/IndexList.cpp
index 9385ba2..1440dd7 100644
--- a/dudley/src/IndexList.cpp
+++ b/dudley/src/IndexList.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/IndexList.h b/dudley/src/IndexList.h
index 6a407a1..0ce5ab0 100644
--- a/dudley/src/IndexList.h
+++ b/dudley/src/IndexList.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_distributeByRankOfDOF.cpp b/dudley/src/Mesh_distributeByRankOfDOF.cpp
index 4c9f888..c7357c6 100644
--- a/dudley/src/Mesh_distributeByRankOfDOF.cpp
+++ b/dudley/src/Mesh_distributeByRankOfDOF.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_getPattern.cpp b/dudley/src/Mesh_getPattern.cpp
index afa4d35..a4d23d2 100644
--- a/dudley/src/Mesh_getPattern.cpp
+++ b/dudley/src/Mesh_getPattern.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_optimizeDOFDistribution.cpp b/dudley/src/Mesh_optimizeDOFDistribution.cpp
index 50b641c..6316532 100644
--- a/dudley/src/Mesh_optimizeDOFDistribution.cpp
+++ b/dudley/src/Mesh_optimizeDOFDistribution.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_optimizeDOFLabeling.cpp b/dudley/src/Mesh_optimizeDOFLabeling.cpp
index b3909e9..c6f2a16 100644
--- a/dudley/src/Mesh_optimizeDOFLabeling.cpp
+++ b/dudley/src/Mesh_optimizeDOFLabeling.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_read.cpp b/dudley/src/Mesh_read.cpp
index 2c5d04b..e80d4cb 100644
--- a/dudley/src/Mesh_read.cpp
+++ b/dudley/src/Mesh_read.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_readGmsh.cpp b/dudley/src/Mesh_readGmsh.cpp
index d8ea9d3..b745318 100644
--- a/dudley/src/Mesh_readGmsh.cpp
+++ b/dudley/src/Mesh_readGmsh.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_resolveNodeIds.cpp b/dudley/src/Mesh_resolveNodeIds.cpp
index 4f2f1fe..31b36c1 100644
--- a/dudley/src/Mesh_resolveNodeIds.cpp
+++ b/dudley/src/Mesh_resolveNodeIds.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_tet4.cpp b/dudley/src/Mesh_tet4.cpp
index 260db6d..0a542ea 100644
--- a/dudley/src/Mesh_tet4.cpp
+++ b/dudley/src/Mesh_tet4.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_tri3.cpp b/dudley/src/Mesh_tri3.cpp
index a5b7056..a19cde3 100644
--- a/dudley/src/Mesh_tri3.cpp
+++ b/dudley/src/Mesh_tri3.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Mesh_write.cpp b/dudley/src/Mesh_write.cpp
index 4de8cc5..45ea11e 100644
--- a/dudley/src/Mesh_write.cpp
+++ b/dudley/src/Mesh_write.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/NodeFile.cpp b/dudley/src/NodeFile.cpp
index c631426..ff175c6 100644
--- a/dudley/src/NodeFile.cpp
+++ b/dudley/src/NodeFile.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -170,6 +170,10 @@ std::pair<index_t,index_t> NodeFile::getGlobalNodeIDIndexRange() const
 
 void NodeFile::setCoordinates(const escript::Data& newX)
 {
+    if (newX.isComplex())
+    {
+        throw escript::ValueError("NodeFile::setCoordinates: argument can not be complex.");
+    }
     if (newX.getDataPointSize() != numDim) {
         std::stringstream ss;
         ss << "NodeFile::setCoordinates: number of dimensions of new "
@@ -184,26 +188,29 @@ void NodeFile::setCoordinates(const escript::Data& newX)
     } else {
         const size_t numDim_size = numDim * sizeof(double);
         ++status;
+	escript::DataTypes::real_t wantreal=0;
 #pragma omp parallel for
         for (index_t n = 0; n < numNodes; n++) {
             memcpy(&Coordinates[INDEX2(0, n, numDim)],
-                    newX.getSampleDataRO(n), numDim_size);
+                    newX.getSampleDataRO(n, wantreal), numDim_size);
         }
     }
 }
 
 void NodeFile::setTags(int newTag, const escript::Data& mask)
 {
+  
     if (1 != mask.getDataPointSize()) {
         throw escript::ValueError("NodeFile::setTags: number of components of mask must be 1.");
     } else if (mask.getNumDataPointsPerSample() != 1 ||
             mask.getNumSamples() != numNodes) {
         throw escript::ValueError("NodeFile::setTags: illegal number of samples of mask Data object");
     }
-
+    
+    escript::DataTypes::real_t wantreal=0;
 #pragma omp parallel for
     for (index_t n = 0; n < numNodes; n++) {
-        if (mask.getSampleDataRO(n)[0] > 0)
+        if (mask.getSampleDataRO(n, wantreal)[0] > 0)
             Tag[n] = newTag;
     }
     updateTagList();
diff --git a/dudley/src/NodeFile.h b/dudley/src/NodeFile.h
index 81f1af2..b93e9b2 100644
--- a/dudley/src/NodeFile.h
+++ b/dudley/src/NodeFile.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/NodeFile_createDenseLabelings.cpp b/dudley/src/NodeFile_createDenseLabelings.cpp
index a60592b..2e7f14d 100644
--- a/dudley/src/NodeFile_createDenseLabelings.cpp
+++ b/dudley/src/NodeFile_createDenseLabelings.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/NodeFile_createMappings.cpp b/dudley/src/NodeFile_createMappings.cpp
index 58251e2..5ef2218 100644
--- a/dudley/src/NodeFile_createMappings.cpp
+++ b/dudley/src/NodeFile_createMappings.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/NodeFile_createTrilinosGraph.cpp b/dudley/src/NodeFile_createTrilinosGraph.cpp
index 7286efb..bb1bac7 100644
--- a/dudley/src/NodeFile_createTrilinosGraph.cpp
+++ b/dudley/src/NodeFile_createTrilinosGraph.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/NodeFile_gather.cpp b/dudley/src/NodeFile_gather.cpp
index 01934c5..2288ce8 100644
--- a/dudley/src/NodeFile_gather.cpp
+++ b/dudley/src/NodeFile_gather.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/NodeMapping.h b/dudley/src/NodeMapping.h
index 5225780..e5f93fe 100644
--- a/dudley/src/NodeMapping.h
+++ b/dudley/src/NodeMapping.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/SConscript b/dudley/src/SConscript
index d6852e0..0268ea4 100644
--- a/dudley/src/SConscript
+++ b/dudley/src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/dudley/src/ShapeTable.cpp b/dudley/src/ShapeTable.cpp
index 1aaa479..16a23de 100644
--- a/dudley/src/ShapeTable.cpp
+++ b/dudley/src/ShapeTable.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/ShapeTable.h b/dudley/src/ShapeTable.h
index c4c864b..9f0e535 100644
--- a/dudley/src/ShapeTable.h
+++ b/dudley/src/ShapeTable.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/Util.cpp b/dudley/src/Util.cpp
index 304189c..23db6f0 100644
--- a/dudley/src/Util.cpp
+++ b/dudley/src/Util.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -83,13 +83,14 @@ void smallMatMult(int A1, int A2, double* A, int B2, const double* B,
     }
 }
 
-void smallMatSetMult1(int len, int A1, int A2, double* A, int B2,
-                      const double* B, const double* C)
+template<typename Scalar>
+void smallMatSetMult1(int len, int A1, int A2, Scalar* A, int B2,
+                      const Scalar* B, const double* C)
 {
     for (int q = 0; q < len; q++) {
         for (int i = 0; i < A1; i++) {
             for (int j = 0; j < A2; j++) {
-                double sum = 0.;
+                Scalar sum = 0;
                 for (int s = 0; s < B2; s++)
                     sum += B[INDEX3(i,s,q,A1,B2)] * C[INDEX2(s,j,B2)];
                 A[INDEX3(i,j,q,A1,A2)] = sum;
@@ -98,6 +99,13 @@ void smallMatSetMult1(int len, int A1, int A2, double* A, int B2,
     }
 }
 
+template
+void smallMatSetMult1<real_t>(int len, int A1, int A2, real_t* A, int B2,
+                              const real_t* B, const real_t* C);
+template
+void smallMatSetMult1<cplx_t>(int len, int A1, int A2, cplx_t* A, int B2,
+                              const cplx_t* B, const real_t* C);
+
 void normalVector(int len, int dim, int dim1, const double* A, double* Normal)
 {
     int q;
diff --git a/dudley/src/Util.h b/dudley/src/Util.h
index 3828400..a900597 100644
--- a/dudley/src/Util.h
+++ b/dudley/src/Util.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -50,8 +50,9 @@ void smallMatMult(int A1, int A2, double* A, int B2, const double* B,
 
 /// multiplies a set of matrices with a single matrix:
 ///   A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2) for i=1,len
-void smallMatSetMult1(int len, int A1, int A2, double* A, int B2,
-                      const double* B, const double* C);
+template<typename Scalar>
+void smallMatSetMult1(int len, int A1, int A2, Scalar* A, int B2,
+                      const Scalar* B, const double* C);
 
 /// returns the normalized vector normal[dim,len] orthogonal to A(:,0,q) and
 /// A(:,1,q) in the case of dim=3, or the vector A(:,0,q) in the case of dim=2
diff --git a/dudley/src/dudleycpp.cpp b/dudley/src/dudleycpp.cpp
index 9c230b2..f06998b 100644
--- a/dudley/src/dudleycpp.cpp
+++ b/dudley/src/dudleycpp.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/src/generateReferenceElementList.py b/dudley/src/generateReferenceElementList.py
index ce009c2..4395cbd 100644
--- a/dudley/src/generateReferenceElementList.py
+++ b/dudley/src/generateReferenceElementList.py
@@ -1,6 +1,6 @@
 #*******************************************************
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/dudley/test/DudleyDomainTestCase.cpp b/dudley/test/DudleyDomainTestCase.cpp
index ea08137..732622f 100644
--- a/dudley/test/DudleyDomainTestCase.cpp
+++ b/dudley/test/DudleyDomainTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/test/DudleyDomainTestCase.h b/dudley/test/DudleyDomainTestCase.h
index 0c9f07e..5bdf250 100644
--- a/dudley/test/DudleyDomainTestCase.h
+++ b/dudley/test/DudleyDomainTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/test/SConscript b/dudley/test/SConscript
index 47f9c68..0aae076 100644
--- a/dudley/test/SConscript
+++ b/dudley/test/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/dudley/test/dudley_UnitTests.cpp b/dudley/test/dudley_UnitTests.cpp
index 18f7fcf..a4f0775 100644
--- a/dudley/test/dudley_UnitTests.cpp
+++ b/dudley/test/dudley_UnitTests.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/dudley/test/python/FCT_benchmark.py b/dudley/test/python/FCT_benchmark.py
index 0249d1c..711f9e4 100644
--- a/dudley/test/python/FCT_benchmark.py
+++ b/dudley/test/python/FCT_benchmark.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/FCT_test1.py b/dudley/test/python/FCT_test1.py
index 1b3bfa9..9f5f965 100644
--- a/dudley/test/python/FCT_test1.py
+++ b/dudley/test/python/FCT_test1.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/FCT_test2.py b/dudley/test/python/FCT_test2.py
index 40851f2..d144b90 100644
--- a/dudley/test/python/FCT_test2.py
+++ b/dudley/test/python/FCT_test2.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/OutTest.py b/dudley/test/python/OutTest.py
index 9cbec7c..3365a05 100644
--- a/dudley/test/python/OutTest.py
+++ b/dudley/test/python/OutTest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/PoissonSolverTest.py b/dudley/test/python/PoissonSolverTest.py
index 6b034cc..5f72422 100644
--- a/dudley/test/python/PoissonSolverTest.py
+++ b/dudley/test/python/PoissonSolverTest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/RT2D.py b/dudley/test/python/RT2D.py
index 5993cf0..adf1116 100644
--- a/dudley/test/python/RT2D.py
+++ b/dudley/test/python/RT2D.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/RecTest.py b/dudley/test/python/RecTest.py
index 0b46f6a..0cf7b1f 100644
--- a/dudley/test/python/RecTest.py
+++ b/dudley/test/python/RecTest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/SConscript b/dudley/test/python/SConscript
index 84787e7..1391398 100644
--- a/dudley/test/python/SConscript
+++ b/dudley/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/dudley/test/python/axisymm-splitB.py b/dudley/test/python/axisymm-splitB.py
index 170a47f..48b5bb9 100644
--- a/dudley/test/python/axisymm-splitB.py
+++ b/dudley/test/python/axisymm-splitB.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/blocktest.py b/dudley/test/python/blocktest.py
index 2a5151b..af30ce6 100644
--- a/dudley/test/python/blocktest.py
+++ b/dudley/test/python/blocktest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -28,7 +28,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/brick.py b/dudley/test/python/brick.py
index e2d97d4..4c21f55 100644
--- a/dudley/test/python/brick.py
+++ b/dudley/test/python/brick.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/convection.py b/dudley/test/python/convection.py
index dac8dd0..d533f3b 100644
--- a/dudley/test/python/convection.py
+++ b/dudley/test/python/convection.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -21,7 +21,7 @@ It is solved in dimensionless form
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/fixme_run_generators.py b/dudley/test/python/fixme_run_generators.py
index 3b40478..2c2a86b 100644
--- a/dudley/test/python/fixme_run_generators.py
+++ b/dudley/test/python/fixme_run_generators.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/generate_dumps.py b/dudley/test/python/generate_dumps.py
index fe4f13b..15962d8 100644
--- a/dudley/test/python/generate_dumps.py
+++ b/dudley/test/python/generate_dumps.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/generate_meshes.py b/dudley/test/python/generate_meshes.py
index db5470b..81e406d 100644
--- a/dudley/test/python/generate_meshes.py
+++ b/dudley/test/python/generate_meshes.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/linearElastic.py b/dudley/test/python/linearElastic.py
index d6d3924..f47cbcf 100644
--- a/dudley/test/python/linearElastic.py
+++ b/dudley/test/python/linearElastic.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/rayleigh_taylor_instabilty.py b/dudley/test/python/rayleigh_taylor_instabilty.py
index 58a3ca9..7df833b 100644
--- a/dudley/test/python/rayleigh_taylor_instabilty.py
+++ b/dudley/test/python/rayleigh_taylor_instabilty.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/rectangle.py b/dudley/test/python/rectangle.py
index ca3469e..612c62c 100644
--- a/dudley/test/python/rectangle.py
+++ b/dudley/test/python/rectangle.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/run_escriptOnDudley.py b/dudley/test/python/run_escriptOnDudley.py
index 479e948..3a95091 100644
--- a/dudley/test/python/run_escriptOnDudley.py
+++ b/dudley/test/python/run_escriptOnDudley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/run_inputOutput.py b/dudley/test/python/run_inputOutput.py
index 93f9855..1de324b 100644
--- a/dudley/test/python/run_inputOutput.py
+++ b/dudley/test/python/run_inputOutput.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/run_linearPDEsOnDudley1.py b/dudley/test/python/run_linearPDEsOnDudley1.py
index 3868191..daf01d7 100644
--- a/dudley/test/python/run_linearPDEsOnDudley1.py
+++ b/dudley/test/python/run_linearPDEsOnDudley1.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/dudley/test/python/run_linearPDEsOnDudley2.py b/dudley/test/python/run_linearPDEsOnDudley2.py
index 89b6129..168daa7 100644
--- a/dudley/test/python/run_linearPDEsOnDudley2.py
+++ b/dudley/test/python/run_linearPDEsOnDudley2.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/dudley/test/python/run_models.py b/dudley/test/python/run_models.py
index 9952e27..633491c 100644
--- a/dudley/test/python/run_models.py
+++ b/dudley/test/python/run_models.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/run_nonlinearPDEsOnDudley.py b/dudley/test/python/run_nonlinearPDEsOnDudley.py
index ee2b9ec..a51c7a9 100644
--- a/dudley/test/python/run_nonlinearPDEsOnDudley.py
+++ b/dudley/test/python/run_nonlinearPDEsOnDudley.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/dudley/test/python/run_pasoSolversOnDudley.py b/dudley/test/python/run_pasoSolversOnDudley.py
index ad81590..695bad5 100644
--- a/dudley/test/python/run_pasoSolversOnDudley.py
+++ b/dudley/test/python/run_pasoSolversOnDudley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/run_splitworldOnDudley.py b/dudley/test/python/run_splitworldOnDudley.py
index 00c4e94..bd58c0d 100644
--- a/dudley/test/python/run_splitworldOnDudley.py
+++ b/dudley/test/python/run_splitworldOnDudley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c)2015-2016 by The University of Queensland
+__copyright__="""Copyright (c)2015-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/run_trilinosSolversOnDudley.py b/dudley/test/python/run_trilinosSolversOnDudley.py
index d794969..92efba0 100644
--- a/dudley/test/python/run_trilinosSolversOnDudley.py
+++ b/dudley/test/python/run_trilinosSolversOnDudley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Open Software License version 3.0
diff --git a/dudley/test/python/run_utilOnDudley.py b/dudley/test/python/run_utilOnDudley.py
index 63bfe14..4e90ee5 100644
--- a/dudley/test/python/run_utilOnDudley.py
+++ b/dudley/test/python/run_utilOnDudley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/seismic_wave.py b/dudley/test/python/seismic_wave.py
index 507f985..5da883d 100644
--- a/dudley/test/python/seismic_wave.py
+++ b/dudley/test/python/seismic_wave.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/slip_stress_mesh_old.py b/dudley/test/python/slip_stress_mesh_old.py
index a645689..818283a 100644
--- a/dudley/test/python/slip_stress_mesh_old.py
+++ b/dudley/test/python/slip_stress_mesh_old.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/slip_stress_old.py b/dudley/test/python/slip_stress_old.py
index ffbc4ec..40707ca 100644
--- a/dudley/test/python/slip_stress_old.py
+++ b/dudley/test/python/slip_stress_old.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/stokes_problems.py b/dudley/test/python/stokes_problems.py
index 7fce77b..4a35a2c 100644
--- a/dudley/test/python/stokes_problems.py
+++ b/dudley/test/python/stokes_problems.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/subduction1.py b/dudley/test/python/subduction1.py
index 763e1de..69950cc 100644
--- a/dudley/test/python/subduction1.py
+++ b/dudley/test/python/subduction1.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/subduction1_gen.py b/dudley/test/python/subduction1_gen.py
index bc1840d..5aebcc1 100644
--- a/dudley/test/python/subduction1_gen.py
+++ b/dudley/test/python/subduction1_gen.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/time_chunks.py b/dudley/test/python/time_chunks.py
index af34ccd..c54efb3 100644
--- a/dudley/test/python/time_chunks.py
+++ b/dudley/test/python/time_chunks.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/dudley/test/python/tp.py b/dudley/test/python/tp.py
index f4bbcdf..670d5dc 100644
--- a/dudley/test/python/tp.py
+++ b/dudley/test/python/tp.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escript/py_src/SConscript b/escript/py_src/SConscript
index 6a30921..3a5ac97 100644
--- a/escript/py_src/SConscript
+++ b/escript/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2013-2016 by The University of Queensland
+# Copyright (c) 2013-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/__init__.py b/escript/py_src/__init__.py
index edd8586..15da577 100644
--- a/escript/py_src/__init__.py
+++ b/escript/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2013-2016 by The University of Queensland
+# Copyright (c) 2013-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2013-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2013-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escript/py_src/datamanager.py b/escript/py_src/datamanager.py
index 1f6a63c..1a77b0e 100644
--- a/escript/py_src/datamanager.py
+++ b/escript/py_src/datamanager.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/linearPDEs.py b/escript/py_src/linearPDEs.py
index 897033f..8c81be8 100644
--- a/escript/py_src/linearPDEs.py
+++ b/escript/py_src/linearPDEs.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/modelframe.py b/escript/py_src/modelframe.py
index 4cbf3f6..468c7eb 100644
--- a/escript/py_src/modelframe.py
+++ b/escript/py_src/modelframe.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/models.py b/escript/py_src/models.py
index c184689..d1e9777 100644
--- a/escript/py_src/models.py
+++ b/escript/py_src/models.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/pdetools.py b/escript/py_src/pdetools.py
index d4227a1..693521f 100644
--- a/escript/py_src/pdetools.py
+++ b/escript/py_src/pdetools.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/splitworld.py b/escript/py_src/splitworld.py
index d2fa00f..d736ffb 100644
--- a/escript/py_src/splitworld.py
+++ b/escript/py_src/splitworld.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/symbolic.py b/escript/py_src/symbolic.py
index 49f436f..34b11e1 100644
--- a/escript/py_src/symbolic.py
+++ b/escript/py_src/symbolic.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/unitsSI.py b/escript/py_src/unitsSI.py
index 655b0fd..bd07b78 100644
--- a/escript/py_src/unitsSI.py
+++ b/escript/py_src/unitsSI.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escript/py_src/util.py b/escript/py_src/util.py
index 3645849..f662a40 100644
--- a/escript/py_src/util.py
+++ b/escript/py_src/util.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/SConscript b/escriptcore/SConscript
index 03e3257..7e4225b 100644
--- a/escriptcore/SConscript
+++ b/escriptcore/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/py_src/SConscript b/escriptcore/py_src/SConscript
index 69704d0..30ad1ad 100644
--- a/escriptcore/py_src/SConscript
+++ b/escriptcore/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/py_src/__init__.py b/escriptcore/py_src/__init__.py
index e755ae5..e3b2886 100644
--- a/escriptcore/py_src/__init__.py
+++ b/escriptcore/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/benchmark.py b/escriptcore/py_src/benchmark.py
index 458ff88..bd14ad7 100644
--- a/escriptcore/py_src/benchmark.py
+++ b/escriptcore/py_src/benchmark.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/datamanager.py b/escriptcore/py_src/datamanager.py
index fe136b4..f293738 100644
--- a/escriptcore/py_src/datamanager.py
+++ b/escriptcore/py_src/datamanager.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/domainCouplers.py b/escriptcore/py_src/domainCouplers.py
index b6a7da5..e3689d3 100644
--- a/escriptcore/py_src/domainCouplers.py
+++ b/escriptcore/py_src/domainCouplers.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -23,7 +23,7 @@ must already support interpolation in at least one direction.
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2014-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2014-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/faultsystems.py b/escriptcore/py_src/faultsystems.py
index a637b3b..cd3e786 100644
--- a/escriptcore/py_src/faultsystems.py
+++ b/escriptcore/py_src/faultsystems.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/flows.py b/escriptcore/py_src/flows.py
index 5ae9850..f4d0a81 100644
--- a/escriptcore/py_src/flows.py
+++ b/escriptcore/py_src/flows.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/gmshrunner.py b/escriptcore/py_src/gmshrunner.py
index 8f1fc65..f888cd8 100644
--- a/escriptcore/py_src/gmshrunner.py
+++ b/escriptcore/py_src/gmshrunner.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/heat.py b/escriptcore/py_src/heat.py
index 3137124..aa258f6 100644
--- a/escriptcore/py_src/heat.py
+++ b/escriptcore/py_src/heat.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/levelset.py b/escriptcore/py_src/levelset.py
index 1f5092d..f1c0ec1 100644
--- a/escriptcore/py_src/levelset.py
+++ b/escriptcore/py_src/levelset.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,13 +16,14 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 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"
 
+from . import escriptcpp as esc
 import esys.escriptcore.linearPDEs as lpe
 import esys.escriptcore.util as es
 import math
@@ -130,7 +131,7 @@ class LevelSet(object):
 
     :return: reinitialized level set
     """
-    fs=es.ReducedFunction(self.__domain)
+    fs=esc.ReducedFunction(self.__domain)
     dtau = 0.2*self.__h
     n =0
     #g=grad(phi,fs)
@@ -156,7 +157,7 @@ class LevelSet(object):
       """
       Returns the volume of the *phi(x)<0* region.
       """
-      return integrate(es.whereNegative(self.__phi.interpolate(es.Function(self.__domain))))
+      return integrate(es.whereNegative(self.__phi.interpolate(esc.Function(self.__domain))))
 
 
   def getJumpingParameter(self, param_neg=-1, param_pos=1, phi=None):
@@ -198,7 +199,7 @@ class LevelSet(object):
       if smoothing_width is None: smoothing_width = self.__smooth
       if phi is None: phi = self.__phi
       s=smoothing_width*self.__h
-      phi_on_h=es.interpolate(phi,es.Function(self.__domain))
+      phi_on_h=es.interpolate(phi,esc.Function(self.__domain))
       mask_neg = es.whereNonNegative(-s-phi_on_h)
       mask_pos = es.whereNonNegative(phi_on_h-s)
       mask_interface = 1.-mask_neg-mask_pos
@@ -213,7 +214,7 @@ class LevelSet(object):
       if smoothing_width is None: smoothing_width = self.__smooth
       if phi is None: phi = self.__phi
       s=smoothing_width*self.__h 
-      phi_on_h=es.interpolate(phi,es.Function(self.__domain))
+      phi_on_h=es.interpolate(phi,esc.Function(self.__domain))
       return es.whereNegative(abs(phi_on_h)-s)
       
   def makeCharacteristicFunction(self, contour=0, phi=None, positiveSide=True, smoothing_width=None):
diff --git a/escriptcore/py_src/linearPDEs.py b/escriptcore/py_src/linearPDEs.py
index b669ec0..41a659e 100644
--- a/escriptcore/py_src/linearPDEs.py
+++ b/escriptcore/py_src/linearPDEs.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -130,7 +130,7 @@ class PDECoef(object):
     CONTACT_REDUCED=15
     DIRACDELTA=16
 
-    def __init__(self, where, pattern, altering, complex=False):
+    def __init__(self, where, pattern, altering, isComplex=False):
        """
        Initialises a PDE coefficient type.
 
@@ -152,17 +152,23 @@ class PDECoef(object):
        :param altering: indicates what part of the PDE is altered if the
                         coefficient is altered
        :type altering: one of `OPERATOR`, `RIGHTHANDSIDE`, `BOTH`
-       :param complex: if true, this coefficient is part of a complex-valued
+       :param isComplex: if true, this coefficient is part of a complex-valued
                        PDE and values will be converted to complex.
-       :type complex: ``boolean``
+       :type isComplex: ``boolean``
        """
        super(PDECoef, self).__init__()
        self.what = where
        self.pattern = pattern
        self.altering = altering
-       self.complex = complex
+       self.__complex = isComplex
        self.resetValue()
 
+    def isComplex(sef):
+        """
+        Returns true if the coefficient is complex
+        """
+        return self.__complex
+
     def resetValue(self):
        """
        Resets the coefficient value to the default.
@@ -242,11 +248,11 @@ class PDECoef(object):
        """
        if newValue is None:
            newValue=escore.Data()
-       elif isinstance(newValue,escore.Data):
+       elif isinstance(newValue, escore.Data):
            if not newValue.isEmpty():
               if not newValue.getFunctionSpace() == self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder):
                 try:
-                  newValue=escore.Data(newValue,self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder))
+                    newValue=escore.Data(newValue,self.getFunctionSpace(domain,reducedEquationOrder,reducedSolutionOrder))
                 except RuntimeError as er:
                  msg="Attempting to interpolate coefficient to function space %s encountered the following error: %s"%(self.getFunctionSpace(domain),str(er))
                  raise IllegalCoefficientFunctionSpace(msg)
@@ -257,9 +263,9 @@ class PDECoef(object):
        if not newValue.isEmpty():
            if not self.getShape(domain,numEquations,numSolutions)==newValue.getShape():
                raise IllegalCoefficientValue("Expected shape of coefficient is %s but actual shape is %s."%(self.getShape(domain,numEquations,numSolutions),newValue.getShape()))
-           if newValue.isComplex() and not self.complex:
+           if newValue.isComplex() and not self.isComplex():
                raise IllegalCoefficientValue("Cannot assign a complex value to a real-valued coefficient!")
-           elif not newValue.isComplex() and self.complex:
+           elif not newValue.isComplex() and self.isComplex():
                newValue.promote()
        self.value = newValue
 
@@ -296,7 +302,7 @@ class PDECoef(object):
         :rtype: ``bool``
         :return: True if the coefficient is complex-valued, False otherwise.
         """
-        return self.complex
+        return self.__complex
 
     def estimateNumEquationsAndNumSolutions(self,domain,shape=()):
        """
@@ -428,7 +434,7 @@ class LinearProblem(object):
    problem will be solved to get the unknown *u*.
 
    """
-   def __init__(self,domain,numEquations=None,numSolutions=None,complex=False,debug=False):
+   def __init__(self,domain,numEquations=None,numSolutions=None,isComplex=False,debug=False):
      """
      Initializes a linear problem.
 
@@ -439,21 +445,21 @@ class LinearProblem(object):
      :param numSolutions: number of solution components. If ``None`` the number
                           of solution components is extracted from the
                           coefficients.
-     :param complex: if True this problem will have complex coefficients and
+     :param isComplex: if True this problem will have complex coefficients and
                      a complex-valued result.
      :param debug: if True debug information is printed
 
      """
      super(LinearProblem, self).__init__()
 
-     self.__complex=complex
+     self.__complex=isComplex
      self.__debug=debug
      self.__domain=domain
      self.domainSupportsAssemblers = hasattr(domain, "createAssembler")
      self.assembler = None
      if self.domainSupportsAssemblers:
         options=[]
-        if complex:
+        if isComplex:
             options=[('dummy', escore.Data(0.j))]
         self.assembler = domain.createAssembler("DefaultAssembler", options)
      self.__numEquations=numEquations
@@ -1689,7 +1695,7 @@ class LinearPDE(LinearProblem):
 
    """
 
-   def __init__(self,domain,numEquations=None,numSolutions=None,complex=False,debug=False):
+   def __init__(self,domain,numEquations=None,numSolutions=None, isComplex=False,debug=False):
      """
      Initializes a new linear PDE.
 
@@ -1703,34 +1709,34 @@ class LinearPDE(LinearProblem):
      :param debug: if True debug information is printed
 
      """
-     super(LinearPDE, self).__init__(domain,numEquations,numSolutions,complex,debug)
+     super(LinearPDE, self).__init__(domain,numEquations,numSolutions,isComplex,debug)
      #
      #   the coefficients of the PDE:
      #
      self.introduceCoefficients(
-       A=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, complex),
-       B=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       C=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, complex),
-       D=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       X=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_DIM),PDECoef.RIGHTHANDSIDE, complex),
-       Y=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       d=PDECoef(PDECoef.BOUNDARY,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       y=PDECoef(PDECoef.BOUNDARY,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       d_contact=PDECoef(PDECoef.CONTACT,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       y_contact=PDECoef(PDECoef.CONTACT,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       A_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, complex),
-       B_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       C_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, complex),
-       D_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       X_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_DIM),PDECoef.RIGHTHANDSIDE, complex),
-       Y_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       d_reduced=PDECoef(PDECoef.BOUNDARY_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       y_reduced=PDECoef(PDECoef.BOUNDARY_REDUCED,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       d_contact_reduced=PDECoef(PDECoef.CONTACT_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       y_contact_reduced=PDECoef(PDECoef.CONTACT_REDUCED,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       d_dirac=PDECoef(PDECoef.DIRACDELTA,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, complex),
-       y_dirac=PDECoef(PDECoef.DIRACDELTA,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, complex),
-       r=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.RIGHTHANDSIDE, complex),
+       A=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, isComplex),
+       B=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       C=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, isComplex),
+       D=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       X=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,PDECoef.BY_DIM),PDECoef.RIGHTHANDSIDE, isComplex),
+       Y=PDECoef(PDECoef.INTERIOR,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       d=PDECoef(PDECoef.BOUNDARY,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       y=PDECoef(PDECoef.BOUNDARY,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       d_contact=PDECoef(PDECoef.CONTACT,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       y_contact=PDECoef(PDECoef.CONTACT,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       A_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, isComplex),
+       B_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_DIM,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       C_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION,PDECoef.BY_DIM),PDECoef.OPERATOR, isComplex),
+       D_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       X_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_DIM),PDECoef.RIGHTHANDSIDE, isComplex),
+       Y_reduced=PDECoef(PDECoef.INTERIOR_REDUCED,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       d_reduced=PDECoef(PDECoef.BOUNDARY_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       y_reduced=PDECoef(PDECoef.BOUNDARY_REDUCED,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       d_contact_reduced=PDECoef(PDECoef.CONTACT_REDUCED,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       y_contact_reduced=PDECoef(PDECoef.CONTACT_REDUCED,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       d_dirac=PDECoef(PDECoef.DIRACDELTA,(PDECoef.BY_EQUATION,PDECoef.BY_SOLUTION),PDECoef.OPERATOR, isComplex),
+       y_dirac=PDECoef(PDECoef.DIRACDELTA,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
+       r=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.RIGHTHANDSIDE, isComplex),
        q=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.BOTH, False) )
 
    def __str__(self):
@@ -2039,10 +2045,10 @@ class LinearPDE(LinearProblem):
                  col_q=escore.Data(q,self.getFunctionSpaceForSolution())
                  u=self.createSolution()
                  u.copyWithMask(r_s,col_q)
-                 righthandside-=operator*u
+                 righthandside-=operator*u                 
                  operator.nullifyRowsAndCols(row_q,col_q,1.)
          righthandside.copyWithMask(r_s,q)
-
+         
    def setValue(self,**coefficients):
       """
       Sets new values to coefficients.
@@ -2791,27 +2797,33 @@ class LameEquation(LinearPDE):
         self.trace("System status is %s."%self.getSystemStatus())
         return (self.getCurrentOperator(), self.getCurrentRightHandSide())
 
-def LinearSinglePDE(domain,debug=False):
+def LinearSinglePDE(domain, isComplex=False, debug=False):
    """
    Defines a single linear PDE.
 
    :param domain: domain of the PDE
    :type domain: `Domain`
+   :param isComplex: if true, this coefficient is part of a complex-valued
+                PDE and values will be converted to complex.
+   :type isComplex: ``boolean``
    :param debug: if True debug information is printed
    :rtype: `LinearPDE`
    """
-   return LinearPDE(domain,numEquations=1,numSolutions=1,debug=debug)
+   return LinearPDE(domain,numEquations=1,numSolutions=1,  isComplex=isComplex, debug=debug)
 
-def LinearPDESystem(domain,debug=False):
+def LinearPDESystem(domain, isComplex=False, debug=False):
    """
    Defines a system of linear PDEs.
 
    :param domain: domain of the PDEs
    :type domain: `Domain`
+   :param isComplex: if true, this coefficient is part of a complex-valued
+                PDE and values will be converted to complex.
+   :type isComplex: ``boolean``
    :param debug: if True debug information is printed
    :rtype: `LinearPDE`
    """
-   return LinearPDE(domain,numEquations=domain.getDim(),numSolutions=domain.getDim(),debug=debug)
+   return LinearPDE(domain,numEquations=domain.getDim(),numSolutions=domain.getDim(), isComplex=isComplex, debug=debug)
 
 
 class TransportPDE(LinearProblem):
diff --git a/escriptcore/py_src/modelframe.py b/escriptcore/py_src/modelframe.py
index f4ba3be..7afe2d2 100644
--- a/escriptcore/py_src/modelframe.py
+++ b/escriptcore/py_src/modelframe.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/models.py b/escriptcore/py_src/models.py
index aef3067..dc5720b 100644
--- a/escriptcore/py_src/models.py
+++ b/escriptcore/py_src/models.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/mountains.py b/escriptcore/py_src/mountains.py
index 91a7524..ef15dc0 100644
--- a/escriptcore/py_src/mountains.py
+++ b/escriptcore/py_src/mountains.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/nonlinearPDE.py b/escriptcore/py_src/nonlinearPDE.py
index 342b6b2..d0ed6f1 100644
--- a/escriptcore/py_src/nonlinearPDE.py
+++ b/escriptcore/py_src/nonlinearPDE.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/pdetools.py b/escriptcore/py_src/pdetools.py
index aba1137..df366b0 100644
--- a/escriptcore/py_src/pdetools.py
+++ b/escriptcore/py_src/pdetools.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -415,19 +415,27 @@ class Locator(object):
         """
         if isinstance(data,escore.Data):
            dat=util.interpolate(data,self.getFunctionSpace())
-           id=self.getId()
+           ii=self.getId()
            r=data.getRank()
-           if isinstance(id,list):
+           if isinstance(ii,list):
                out=[]
-               for i in id:
-                  o=numpy.array(dat.getTupleForGlobalDataPoint(*i))
+               for i in ii:
+                  # workaround for bug #391
+                  if dat.isComplex():
+                      o=numpy.array(dat.real().getTupleForGlobalDataPoint(*i))+1j*numpy.array(dat.imag().getTupleForGlobalDataPoint(*i))
+                  else:
+                     o=numpy.array(dat.getTupleForGlobalDataPoint(*i))
                   if data.getRank()==0:
                      out.append(o[0])
                   else:
                      out.append(o)
                return out
            else:
-             out=numpy.array(dat.getTupleForGlobalDataPoint(*id))
+             # workaround for bug #391
+             if dat.isComplex():
+                 out=numpy.array(dat.real().getTupleForGlobalDataPoint(*ii))+1j*numpy.array(dat.imag().getTupleForGlobalDataPoint(*ii))
+             else:
+                 out=numpy.array(dat.getTupleForGlobalDataPoint(*ii))
              if data.getRank()==0:
                 return out[0]
              else:
@@ -443,12 +451,12 @@ class Locator(object):
          if data.getFunctionSpace()!=self.getFunctionSpace():
            raise TypeError("setValue: FunctionSpace of Locator and Data object must match.")
          data.expand()  
-         id=self.getId()
-         if isinstance(id, list):
+         ii=self.getId()
+         if isinstance(ii, list):
           for i in id:
            data._setTupleForGlobalDataPoint(i[1], i[0], v)
          else:
-           data._setTupleForGlobalDataPoint(id[1], id[0], v)
+           data._setTupleForGlobalDataPoint(ii[1], ii[0], v)
       else:
            raise TypeError("setValue: Invalid argument type.")
 
diff --git a/escriptcore/py_src/rheologies.py b/escriptcore/py_src/rheologies.py
index 5f06532..6fd92d3 100644
--- a/escriptcore/py_src/rheologies.py
+++ b/escriptcore/py_src/rheologies.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/runmodel.py b/escriptcore/py_src/runmodel.py
index 9e86644..2b05db1 100644
--- a/escriptcore/py_src/runmodel.py
+++ b/escriptcore/py_src/runmodel.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/splitworld.py b/escriptcore/py_src/splitworld.py
index f8079ed..9c60cfa 100644
--- a/escriptcore/py_src/splitworld.py
+++ b/escriptcore/py_src/splitworld.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2014-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2014-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/start.py b/escriptcore/py_src/start.py
index 384b49f..32400c8 100644
--- a/escriptcore/py_src/start.py
+++ b/escriptcore/py_src/start.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/symbolic/__init__.py b/escriptcore/py_src/symbolic/__init__.py
index 5f84765..6d3d239 100644
--- a/escriptcore/py_src/symbolic/__init__.py
+++ b/escriptcore/py_src/symbolic/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/symbolic/evaluator.py b/escriptcore/py_src/symbolic/evaluator.py
index 6f21122..b43d46a 100644
--- a/escriptcore/py_src/symbolic/evaluator.py
+++ b/escriptcore/py_src/symbolic/evaluator.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/symbolic/functions.py b/escriptcore/py_src/symbolic/functions.py
index acb6d6e..5d9c69a 100644
--- a/escriptcore/py_src/symbolic/functions.py
+++ b/escriptcore/py_src/symbolic/functions.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/symbolic/pretty.py b/escriptcore/py_src/symbolic/pretty.py
index 7e67bb8..5f87a83 100644
--- a/escriptcore/py_src/symbolic/pretty.py
+++ b/escriptcore/py_src/symbolic/pretty.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/symbolic/symbol.py b/escriptcore/py_src/symbolic/symbol.py
index 3a92790..ca16021 100644
--- a/escriptcore/py_src/symbolic/symbol.py
+++ b/escriptcore/py_src/symbolic/symbol.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/symbolic/symconstants.py b/escriptcore/py_src/symbolic/symconstants.py
index 58fa94f..b479420 100644
--- a/escriptcore/py_src/symbolic/symconstants.py
+++ b/escriptcore/py_src/symbolic/symconstants.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/py_src/symbolic/utils.py b/escriptcore/py_src/symbolic/utils.py
index 58afa11..ee5a003 100644
--- a/escriptcore/py_src/symbolic/utils.py
+++ b/escriptcore/py_src/symbolic/utils.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/testing.py b/escriptcore/py_src/testing.py
index eee6a09..b2a280e 100644
--- a/escriptcore/py_src/testing.py
+++ b/escriptcore/py_src/testing.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -52,7 +52,7 @@ Printing the list of skipped tests::
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2014-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2014-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/unitsSI.py b/escriptcore/py_src/unitsSI.py
index ee2925a..66d03db 100644
--- a/escriptcore/py_src/unitsSI.py
+++ b/escriptcore/py_src/unitsSI.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -79,10 +79,11 @@ from __future__ import print_function, division
     :var R_Earth: Earth's radius
     :var v_light: speed of light
     :var pi: value of pi accurate to 10 decimal places
+    :var Gravitational_Constant: gravitational constant
 """
 
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -310,6 +311,7 @@ ft=Unit("ft", "feet", 0., 0.3048 * m)
 Barrel=Unit("bbl","barrel", 0., 0.158987294928 * m**3)
 Mscf=Unit("MSCF", "thousand standard cubic feet", 0., 28.31685 * m**3)
 Mcf=1000. * ft**3
+ccm=cm**3
 #
 #  time
 #
diff --git a/escriptcore/py_src/utestselect.py b/escriptcore/py_src/utestselect.py
index 1fbe52b..cc66d8e 100644
--- a/escriptcore/py_src/utestselect.py
+++ b/escriptcore/py_src/utestselect.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2014-2016 by The University of Queensland
+# Copyright (c) 2014-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2014-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2014-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/py_src/util.py b/escriptcore/py_src/util.py
index b29162d..58bec79 100644
--- a/escriptcore/py_src/util.py
+++ b/escriptcore/py_src/util.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -45,6 +45,7 @@ import cmath
 import os
 import warnings
 import numpy
+import numbers
 warnings.simplefilter('default', category=DeprecationWarning)
 # suppress the following which comes from sympy with python 3.5
 warnings.filterwarnings('ignore', category=DeprecationWarning, message='inspect.getargspec.*')
@@ -438,7 +439,7 @@ def Lsup(arg):
     elif isinstance(arg,int):
         return abs(float(arg))
     else:
-        raise TypeError("Lsup: Unknown argument type.")
+        raise TypeError("Lsup: Unknown argument type ("+str(type(arg))+").")
 
 def sup(arg):
     """
@@ -451,6 +452,8 @@ def sup(arg):
     :raise TypeError: if type of ``arg`` cannot be processed
     """
     if isinstance(arg,numpy.ndarray):
+        if arg.dtype.kind=='c':
+            raise TypeError("sup: operation not supported for complex");         
         return arg.max()
     elif isinstance(arg,escore.Data):
         return arg._sup()
@@ -474,6 +477,8 @@ def inf(arg):
     :raise TypeError: if type of ``arg`` cannot be processed
     """
     if isinstance(arg,numpy.ndarray):
+        if arg.dtype.kind=='c':
+            raise TypeError("inf: operation not supported for complex");         
         return arg.min()
     elif isinstance(arg,escore.Data):
         return arg._inf()
@@ -486,7 +491,6 @@ def inf(arg):
     else:
       raise TypeError("inf: Unknown argument type.")
 
-
 #=========================================================================
 #   some little helpers
 #=========================================================================
@@ -501,8 +505,9 @@ def getRank(arg):
     :rtype: ``int``
     :raise TypeError: if type of ``arg`` cannot be processed
     """
-
-    if isinstance(arg,numpy.ndarray):
+    if isinstance(arg,list) or isinstance(arg,tuple):
+        return numpy.array(arg).ndim
+    elif isinstance(arg,numpy.ndarray):
         return arg.ndim
     elif isinstance(arg,escore.Data):
         return arg.getRank()
@@ -527,7 +532,7 @@ def getShape(arg):
 
     if isinstance(arg,numpy.ndarray):
         return arg.shape
-    elif isinstance(arg,list):
+    elif isinstance(arg,list) or isinstance(arg,tuple):
         return numpy.array(arg).shape
     elif isinstance(arg,escore.Data):
         return arg.getShape()
@@ -792,8 +797,9 @@ def wherePositive(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("wherePositive: operation not supported for complex");
       out=numpy.greater(arg,numpy.zeros(arg.shape,numpy.float64))*1.
-      if isinstance(out,float): out=numpy.array(out,dtype=numpy.float64)
       return out
    elif isinstance(arg,escore.Data):
       return arg._wherePositive()
@@ -825,8 +831,9 @@ def whereNegative(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("whereNegative: operation not supported for complex");
       out=numpy.less(arg,numpy.zeros(arg.shape,numpy.float64))*1.
-      if isinstance(out,float): out=numpy.array(out,dtype=numpy.float64)
       return out
    elif isinstance(arg,escore.Data):
       return arg._whereNegative()
@@ -858,8 +865,9 @@ def whereNonNegative(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("whereNonNegative: operation not supported for complex");       
       out=numpy.greater_equal(arg,numpy.zeros(arg.shape,numpy.float64))*1.
-      if isinstance(out,float): out=numpy.array(out,dtype=numpy.float64)
       return out
    elif isinstance(arg,escore.Data):
       return arg._whereNonNegative()
@@ -891,8 +899,9 @@ def whereNonPositive(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("whereNonPositive: operation not supported for complex");       
       out=numpy.less_equal(arg,numpy.zeros(arg.shape,numpy.float64))*1.
-      if isinstance(out,float): out=numpy.array(out,dtype=numpy.float64)
       return out
    elif isinstance(arg,escore.Data):
       return arg._whereNonPositive()
@@ -1377,10 +1386,14 @@ def sign(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("sign: operation not supported for complex")        
       return wherePositive(arg)-whereNegative(arg)
    elif isinstance(arg,escore.Data):
       return arg._sign()
-   elif isinstance(arg,float) or isinstance(arg,complex) or isinstance(arg,int):
+   elif isinstance(arg,complex):
+       raise TypeError("sign: operation not supported for complex")
+   elif isinstance(arg,float) or isinstance(arg,int):
       if arg>0:
         return 1.
       elif arg<0:
@@ -1402,6 +1415,8 @@ def minval(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("minval: operation not supported for complex");       
       if arg.ndim==0:
          return float(arg)
       else:
@@ -1427,6 +1442,8 @@ def maxval(arg):
    :raise TypeError: if the type of the argument is not expected
    """
    if isinstance(arg,numpy.ndarray):
+      if arg.dtype.kind=='c':
+          raise TypeError("maxval: operation not supported for complex");
       if arg.ndim==0:
          return float(arg)
       else:
@@ -1450,7 +1467,8 @@ def length(arg):
    :type arg: ``float``, `escript.Data`, `Symbol`, ``numpy.ndarray``
    :rtype: ``float``, `escript.Data`, `Symbol` depending on the type of ``arg``
    """
-   return sqrt(inner(arg,arg))
+   a=abs(arg)
+   return sqrt(inner(a,a))
 
 def trace(arg,axis_offset=0):
    """
@@ -1719,7 +1737,7 @@ def hermitian(arg):
            raise ValueError("argument must be square.")
       else:
         raise ValueError("rank 2 or 4 is required.")
-      return (arg+arg.transpose().conj())/2
+      return (arg+transpose(arg).conj())/2
     elif isinstance(arg,escore.Data):
       if arg.getRank()==2:
         if not (arg.getShape()[0]==arg.getShape()[1]):
@@ -1752,7 +1770,7 @@ def hermitian(arg):
 
 def antihermitian(arg):
     """
-    Returns the anti-symmetric part of the square matrix ``arg``. That is,
+    Returns the anti-hermitian part of the square matrix ``arg``. That is,
     *(arg-adjoint(arg))/2*.
 
     :param arg: input matrix. Must have rank 2 or 4 and be square.
@@ -1769,7 +1787,7 @@ def antihermitian(arg):
            raise ValueError("antihermitian: argument must be square.")
       else:
         raise ValueError("antihermitian: rank 2 or 4 is required.")
-      return (arg-arg.transpose().conj())/2
+      return (arg-transpose(arg).conj())/2
     elif isinstance(arg,escore.Data):
       if arg.getRank()==2:
         if not (arg.getShape()[0]==arg.getShape()[1]):
@@ -2217,7 +2235,7 @@ def tensor_mult(arg0,arg1):
     elif len(sh0)==4 and (len(sh1)==2 or len(sh1)==3 or len(sh1)==4):
         return generalTensorProduct(arg0,arg1,axis_offset=2)
     else:
-        raise ValueError("tensor_mult: first argument must have rank 2 or 4")
+        raise ValueError("tensor_mult: first argument must have rank 2 or 4 and second rank must be in (1,2) or (2,3,4) respectively.")
 
 def generalTensorProduct(arg0,arg1,axis_offset=0):
     """
@@ -2266,10 +2284,11 @@ def generalTensorProduct(arg0,arg1,axis_offset=0):
        for i in sh1[:axis_offset]: d01*=i
        arg0_c.resize((d0,d01))
        arg1_c.resize((d01,d1))
-       if arg0_c.dtype!=numpy.float64:
-           out=numpy.zeros((d0,d1),arg0_c.dtype)
+       if arg0_c.dtype.kind=='c':
+           restype=arg0_c.dtype
        else:
-           out=numpy.zeros((d0,d1),numpy.float64)
+           restype=arg1_c.dtype
+       out=numpy.zeros((d0,d1),restype)
        for i0 in range(d0):
           for i1 in range(d1):
              out[i0,i1]=numpy.sum(arg0_c[i0,:]*arg1_c[:,i1])
@@ -2416,7 +2435,8 @@ def generalTransposedTensorProduct(arg0,arg1,axis_offset=0):
        for i in sh0[:axis_offset]: d01*=i
        arg0_c.resize((d01,d0))
        arg1_c.resize((d01,d1))
-       out=numpy.zeros((d0,d1),numpy.float64)
+       target_type=arg0.dtype if arg0.dtype.kind=='c' else arg1.dtype
+       out=numpy.zeros((d0,d1), target_type)
        for i0 in range(d0):
                 for i1 in range(d1):
                      out[i0,i1]=numpy.sum(arg0_c[:,i0]*arg1_c[:,i1])
@@ -2493,6 +2513,8 @@ def tensor_transposed_mult(arg0,arg1):
              each data point
     :rtype: ``numpy.ndarray``, `escript.Data`, `Symbol` depending on the input
     """
+    return tensor_mult(arg0, transpose(arg1))
+    # The code below has a bug, for now we use the less efficient call above
     sh0=getShape(arg0)
     sh1=getShape(arg1)
     if len(sh0)==2 and ( len(sh1)==2 or len(sh1)==1 ):
@@ -2555,7 +2577,11 @@ def generalTensorTransposedProduct(arg0,arg1,axis_offset=0):
        for i in sh1[arg1.ndim-axis_offset:]: d01*=i
        arg0_c.resize((d0,d01))
        arg1_c.resize((d1,d01))
-       out=numpy.zeros((d0,d1),numpy.float64)
+       
+       if arg0_c.dtype!=numpy.float64:
+           out=numpy.zeros((d0,d1),arg0_c.dtype)
+       else:
+           out=numpy.zeros((d0,d1),numpy.float64)       
        for i0 in range(d0):
           for i1 in range(d1):
              out[i0,i1]=numpy.sum(arg0_c[i0,:]*arg1_c[i1,:])
@@ -2662,7 +2688,11 @@ def interpolate(arg,where):
        elif where == arg.getFunctionSpace():
           return arg
        else:
-          return escore.Data(arg,where)
+          # work around for Bug #390
+          if arg.isComplex():
+              return interpolate(arg.real(), where)+1j*interpolate(arg.imag(), where)
+          else:
+              return escore.Data(arg,where)
     elif isinstance(arg,sym.Symbol):
        return sym.symfn.interpolate(arg, where)
     else:
@@ -3071,3 +3101,27 @@ def condEval(f, tval, fval):
         return escore._condEval(f, tval, Data(fval, tval.getShape(), tval.getFunctionSpace()))
     return escore._condEval(f, Data(fval, fval.getShape(), fval.getFunctionSpace()), fval )
 
+def polarToCart(r, phase):
+    """
+    conversion from cartesian to polar coordinates
+    
+    :param r: length
+    :type r: any float type object
+    :param phase: the phase angle in rad
+    :type phase: any float type object
+    :return: cartesian representation as complex number
+    :rtype: appropriate complex
+    """
+    return r*exp(1*j*phase)
+
+def phase(arg):
+    """
+    return the "phase"/"arg"/"angle" of a number
+    """
+    if isinstance(arg, numbers.Number):
+        return cmath.phase(arg)
+    if isinstance(arg, Data):
+        return arg.phase()
+    if isinstance(arg, numpy.ndarray):
+        return numpy.phase(arg)
+    return arg.phase()
diff --git a/escriptcore/src/AbstractContinuousDomain.cpp b/escriptcore/src/AbstractContinuousDomain.cpp
index 2d52e2c..d35177c 100644
--- a/escriptcore/src/AbstractContinuousDomain.cpp
+++ b/escriptcore/src/AbstractContinuousDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -119,9 +119,17 @@ int AbstractContinuousDomain::getDiracDeltaFunctionsCode() const
   return 0;
 }
 
-void AbstractContinuousDomain::setToIntegrals(std::vector<double>& integrals, const escript::Data& arg) const
+void AbstractContinuousDomain::setToIntegrals(std::vector<DataTypes::real_t>& integrals,
+                                              const escript::Data& arg) const
 {
-  throwStandardException("AbstractContinuousDomain::setToIntegrals");
+  throwStandardException("AbstractContinuousDomain::setToIntegrals<real_t>");
+  return;
+}
+
+void AbstractContinuousDomain::setToIntegrals(std::vector<DataTypes::cplx_t>& integrals,
+                                              const escript::Data& arg) const
+{
+  throwStandardException("AbstractContinuousDomain::setToIntegrals<cplx_t>");
   return;
 }
 
diff --git a/escriptcore/src/AbstractContinuousDomain.h b/escriptcore/src/AbstractContinuousDomain.h
index ba2b7cb..276fbc2 100644
--- a/escriptcore/src/AbstractContinuousDomain.h
+++ b/escriptcore/src/AbstractContinuousDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -190,7 +190,10 @@ class ESCRIPT_DLL_API AbstractContinuousDomain : public AbstractDomain
      arg has to be defined on this.
      has to be implemented by the Domain Adapter.
   */
-  virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
+  virtual void setToIntegrals(std::vector<DataTypes::real_t>& integrals,
+                              const escript::Data& arg) const;
+  virtual void setToIntegrals(std::vector<DataTypes::cplx_t>& integrals,
+                              const escript::Data& arg) const;
 
 //  /**
 //     \brief
diff --git a/escriptcore/src/AbstractDomain.cpp b/escriptcore/src/AbstractDomain.cpp
index 6c1515d..c01e0f5 100644
--- a/escriptcore/src/AbstractDomain.cpp
+++ b/escriptcore/src/AbstractDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/AbstractDomain.h b/escriptcore/src/AbstractDomain.h
index cc30b72..c8e67e7 100644
--- a/escriptcore/src/AbstractDomain.h
+++ b/escriptcore/src/AbstractDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/AbstractReducer.cpp b/escriptcore/src/AbstractReducer.cpp
index 054ed9f..cd3c79a 100644
--- a/escriptcore/src/AbstractReducer.cpp
+++ b/escriptcore/src/AbstractReducer.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/AbstractReducer.h b/escriptcore/src/AbstractReducer.h
index 3214537..f1a8a57 100644
--- a/escriptcore/src/AbstractReducer.h
+++ b/escriptcore/src/AbstractReducer.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/AbstractSystemMatrix.cpp b/escriptcore/src/AbstractSystemMatrix.cpp
index 174caad..8119075 100644
--- a/escriptcore/src/AbstractSystemMatrix.cpp
+++ b/escriptcore/src/AbstractSystemMatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/AbstractSystemMatrix.h b/escriptcore/src/AbstractSystemMatrix.h
index 9f90a4b..c419b31 100644
--- a/escriptcore/src/AbstractSystemMatrix.h
+++ b/escriptcore/src/AbstractSystemMatrix.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/AbstractTransportProblem.cpp b/escriptcore/src/AbstractTransportProblem.cpp
index 9526fe9..112d6b2 100644
--- a/escriptcore/src/AbstractTransportProblem.cpp
+++ b/escriptcore/src/AbstractTransportProblem.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -106,7 +106,7 @@ void AbstractTransportProblem::setToSolution(Data& out, Data &u0, Data& source,
 {
     throw NotImplementedError("setToSolution is not available");
 }
-void AbstractTransportProblem::resetTransport() const
+void AbstractTransportProblem::resetTransport(bool preserveSolverData) const
 {
     throw NotImplementedError("resetProblem is not implemented.");
 }
diff --git a/escriptcore/src/AbstractTransportProblem.h b/escriptcore/src/AbstractTransportProblem.h
index 30faecc..463df8e 100644
--- a/escriptcore/src/AbstractTransportProblem.h
+++ b/escriptcore/src/AbstractTransportProblem.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -110,7 +110,7 @@ public:
      \brief resets the transport operator typically as they have been updated.
   */
   ESCRIPT_DLL_API
-  virtual void resetTransport() const;
+  virtual void resetTransport(bool preserveSolverData) const;
 
   /**
      \brief
diff --git a/escriptcore/src/ArrayOps.cpp b/escriptcore/src/ArrayOps.cpp
index cbf3fc1..e1f3ff6 100644
--- a/escriptcore/src/ArrayOps.cpp
+++ b/escriptcore/src/ArrayOps.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -56,6 +56,7 @@ bool supports_cplx(escript::ES_optype operation)
     case REAL: return true;
     case IMAG: return true;
     case RECIP: return true;
+    case PHS: return true;
     default:
       return false;	// let's be conservative
   }  
@@ -63,7 +64,7 @@ bool supports_cplx(escript::ES_optype operation)
 
 bool always_real(escript::ES_optype operation)
 {
-    return ((operation==REAL) || (operation==IMAG) || (operation==EZ) || (operation==NEZ) || (operation==ABS));
+    return ((operation==REAL) || (operation==IMAG) || (operation==EZ) || (operation==NEZ) || (operation==ABS) || (operation==PHS));
 }
 
 
diff --git a/escriptcore/src/ArrayOps.h b/escriptcore/src/ArrayOps.h
index 2dd7640..6472f8c 100644
--- a/escriptcore/src/ArrayOps.h
+++ b/escriptcore/src/ArrayOps.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -121,6 +121,18 @@ bool nancheck(DataTypes::real_t d)
     return std::isnan(d);       // isNan should be a function in C++ land
 }
 
+// I'm not sure if there is agreement about what a complex nan would be
+// so, in this case I've just checked both components
+inline
+bool nancheck(DataTypes::cplx_t d)
+{
+                // Q: so why not just test d!=d?
+                // A: Coz it doesn't always work [I've checked].
+                // One theory is that the optimizer skips the test.
+    return std::isnan( real(d) ) || std::isnan( imag(d) );       // isNan should be a function in C++ land
+}
+
+
 /**
 \brief returns a NaN.
 \warning Should probably only used where you know you can test for NaNs
@@ -700,9 +712,20 @@ inline void tensor_unary_array_operation_real(const size_t size,
           for (size_t i = 0; i < size; ++i) {
               argRes[i] = abs_f(arg1[i]);
           }
-          break;     	  
+          break;  
+    case PHS:
+          for (size_t i = 0; i < size; ++i) {
+              argRes[i] = std::arg(arg1[i]);
+          }
+          break;
      default:
-          throw DataException("Unsupported unary operation");      
+	  std::ostringstream oss;
+          oss << "Unsupported unary operation=";
+	  oss << opToString(operation);
+	  oss << '/';
+	  oss << operation;
+	  oss << " (Was expecting an operation with real results)";
+          throw DataException(oss.str());      
    }  
 }
 
@@ -721,6 +744,15 @@ inline DataTypes::real_t conjugate(const DataTypes::real_t r)
     return r;
 }
 
+inline void tensor_unary_promote(const size_t size,
+                             const DataTypes::real_t *arg1,
+                             DataTypes::cplx_t * argRes)
+{
+	  for (size_t i = 0; i < size; ++i) {
+              argRes[i] = arg1[i];
+      }
+}
+
 // No openmp because it's called by Lazy
 // In most cases, IN and OUT will be the same
 // but not ruling out putting Re() and Im()
@@ -876,9 +908,12 @@ inline void tensor_unary_array_operation(const size_t size,
 	  break;      
       
     default:
-      std::string s="Unsupported unary operation ";
-      s+=operation;
-      throw DataException(s);
+      std::ostringstream oss;
+      oss << "Unsupported unary operation=";
+      oss << opToString(operation);
+      oss << '/';
+      oss << operation;
+      throw DataException(oss.str());
   }
   return;
 }
diff --git a/escriptcore/src/Assert.h b/escriptcore/src/Assert.h
index e5664ab..4029d6c 100644
--- a/escriptcore/src/Assert.h
+++ b/escriptcore/src/Assert.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/BinaryDataReadyOps.cpp b/escriptcore/src/BinaryDataReadyOps.cpp
index 8d36f6c..77c49ad 100644
--- a/escriptcore/src/BinaryDataReadyOps.cpp
+++ b/escriptcore/src/BinaryDataReadyOps.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -311,7 +311,6 @@ inline void binaryOpDataReadyHelperEET(DataExpanded& res, const DataExpanded& le
   ResSCALAR resdummy=0;
   LSCALAR dummyl=0;
   RSCALAR dummyr=0;
-  DataTypes::RealVectorType::size_type valcount=res.getNumDPPSample()*DataTypes::noValues(res.getShape());
 
     escript::binaryOpVectorTagged(res.getTypedVectorRW(resdummy), 
 			      res.getNumSamples(),res.getNumDPPSample(), DataTypes::noValues(res.getShape()), 
@@ -369,9 +368,7 @@ inline void binaryOpDataReadyHelperETE(DataExpanded& res, const DataTagged& left
   ResSCALAR resdummy=0;
   LSCALAR dummyl=0;
   RSCALAR dummyr=0;
-  DataTypes::RealVectorType::size_type valcount=res.getNumDPPSample()*DataTypes::noValues(res.getShape());
-
-    escript::binaryOpVectorTagged(res.getTypedVectorRW(resdummy), 
+  escript::binaryOpVectorTagged(res.getTypedVectorRW(resdummy), 
 			      res.getNumSamples(),res.getNumDPPSample(), DataTypes::noValues(res.getShape()), 
 			      left.getTypedVectorRO(dummyl), left.getRank()==0,
 			      right.getTypedVectorRO(dummyr), right.getRank()==0,
diff --git a/escriptcore/src/BinaryDataReadyOps.h b/escriptcore/src/BinaryDataReadyOps.h
index 6cfa63a..3390697 100644
--- a/escriptcore/src/BinaryDataReadyOps.h
+++ b/escriptcore/src/BinaryDataReadyOps.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Data.cpp b/escriptcore/src/Data.cpp
index 28bda2c..6749a4c 100644
--- a/escriptcore/src/Data.cpp
+++ b/escriptcore/src/Data.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -104,11 +104,11 @@ using DataTypes::cplx_t;
 #define MAKELAZYBIN2(L,R,X) do {\
   if (L.isLazy() || R.isLazy() || (AUTOLAZYON && (L.isExpanded() || R.isExpanded()))) \
   {\
-  if (L.isComplex() || R.isComplex()) \
+/*  if (L.isComplex() || R.isComplex()) \
   {\
       throw DataException("Lazy operations on complex not supported yet");\
   }\
-        DataLazy* c=new DataLazy(L.borrowDataPtr(),R.borrowDataPtr(),X);\
+*/        DataLazy* c=new DataLazy(L.borrowDataPtr(),R.borrowDataPtr(),X);\
         return Data(c);\
   }\
 }while(0)
@@ -437,35 +437,75 @@ void Data::init_from_data_and_fs(const Data& inData,
     {
         throw DataException("Error - will not interpolate for instances of DataEmpty.");
     }
+    
     if (inData.getFunctionSpace()==functionspace) {
         set_m_data(inData.m_data);
     } 
     else 
     {
-
-        if (inData.isConstant()) {  // for a constant function, we just need to use the new function space
+        if (inData.isConstant()) 
+        {  // for a constant function, we just need to use the new function space
             if (!inData.probeInterpolation(functionspace))
             { // Even though this is constant, we still need to check whether interpolation is allowed
                 throw FunctionSpaceException("Cannot interpolate across to the domain of the specified FunctionSpace. (DataConstant)");
             }
             // if the data is not lazy, this will just be a cast to DataReady
             DataReady_ptr dr=inData.m_data->resolve();
-            DataConstant* dc=new DataConstant(functionspace,inData.m_data->getShape(),dr->getVectorRO());     
+            DataConstant* dc=0;
+            if (inData.isComplex())
+            {
+                dc=new DataConstant(functionspace,inData.m_data->getShape(),dr->getTypedVectorRO((DataTypes::cplx_t)0));     	      
+            }
+            else
+            {
+                dc=new DataConstant(functionspace,inData.m_data->getShape(),dr->getTypedVectorRO((DataTypes::real_t)0));     	      
+            }
             set_m_data(DataAbstract_ptr(dc));
-        } else {
-            Data tmp(0,inData.getDataPointShape(),functionspace,true);
-            // Note: Must use a reference or pointer to a derived object
-            // in order to get polymorphic behaviour. Shouldn't really
-            // be able to create an instance of AbstractDomain but that was done
-            // as a boost:python work around which may no longer be required.
-            /*const AbstractDomain& inDataDomain=inData.getDomain();*/
-            const_Domain_ptr inDataDomain=inData.getDomain();
-            if  (inDataDomain==functionspace.getDomain()) {
-                inDataDomain->interpolateOnDomain(tmp,inData);
-            } else {
-                inDataDomain->interpolateAcross(tmp,inData);
+        } 
+        else 
+        {
+            if (inData.isComplex())
+            {
+                Data tmp((DataTypes::cplx_t)0,inData.getDataPointShape(),functionspace,true);
+                const_Domain_ptr inDataDomain=inData.getDomain();
+                if  (inDataDomain==functionspace.getDomain()) {
+                    if (inData.isLazy())
+                    {
+                        Data temp(inData);
+                        temp.resolve();     // since complex lazy is not a thing
+                        inDataDomain->interpolateOnDomain(tmp,temp);
+                    }
+                    else
+                    {
+                        inDataDomain->interpolateOnDomain(tmp,inData);
+                    }
+                } 
+                else 
+                {
+                    if (inData.isLazy())
+                    {
+                        Data temp(inData);
+                        temp.resolve();
+                        inDataDomain->interpolateAcross(tmp,temp);
+                    }
+                    else
+                    {
+                        inDataDomain->interpolateAcross(tmp,inData);
+                    }
+                }
+                set_m_data(tmp.m_data);	      	      
+            }
+            else
+            {
+                Data tmp(0,inData.getDataPointShape(),functionspace,true);
+                const_Domain_ptr inDataDomain=inData.getDomain();
+                if  (inDataDomain==functionspace.getDomain()) {
+                    inDataDomain->interpolateOnDomain(tmp,inData);
+                } else {
+                    inDataDomain->interpolateAcross(tmp,inData);
+                }
+                set_m_data(tmp.m_data);
             }
-            set_m_data(tmp.m_data);
         }
     }
     m_protected=false;
@@ -525,17 +565,32 @@ Data::Data(const boost::python::object& value,
     const DataTypes::ShapeType& tempShape=w.getShape();
     if (w.getRank()==0) {
 
-        // get the space for the data vector
-        int len1 = DataTypes::noValues(tempShape);
-        RealVectorType temp_data(len1, 0.0, len1);
-        temp_data.copyFromArray(w,1);
+        if (w.isComplex()==true)
+        {
+            // get the space for the data vector
+            int len1 = DataTypes::noValues(tempShape);
+            CplxVectorType temp_data(len1, 0.0, len1);
+            temp_data.copyFromArray(w,1);
 
-        int len = DataTypes::noValues(other.getDataPointShape());
+            int len = DataTypes::noValues(other.getDataPointShape());
 
-        RealVectorType temp2_data(len, temp_data[0], len);
-        DataConstant* t=new DataConstant(other.getFunctionSpace(),other.getDataPointShape(),temp2_data);
-        set_m_data(DataAbstract_ptr(t));
+            CplxVectorType temp2_data(len, temp_data[0], len);
+            DataConstant* t=new DataConstant(other.getFunctionSpace(),other.getDataPointShape(),temp2_data);
+            set_m_data(DataAbstract_ptr(t));
+        }
+        else
+        {
+            // get the space for the data vector
+            int len1 = DataTypes::noValues(tempShape);
+            RealVectorType temp_data(len1, 0.0, len1);
+            temp_data.copyFromArray(w,1);
 
+            int len = DataTypes::noValues(other.getDataPointShape());
+
+            RealVectorType temp2_data(len, temp_data[0], len);
+            DataConstant* t=new DataConstant(other.getFunctionSpace(),other.getDataPointShape(),temp2_data);
+            set_m_data(DataAbstract_ptr(t));
+        }
     } else {
         //
         // Create a DataConstant with the same sample shape as other
@@ -747,6 +802,11 @@ Data::setToZero()
     }
     if (isLazy())
     {
+	// This can't actually be complex yet but Just putting in this for later
+        if (isComplex())
+	{
+	    throw DataException("Programmer Error - setToZero is not supported on lazy complex values.");
+	}
         DataTypes::RealVectorType v(getNoValues(),0);
         DataConstant* dc=new DataConstant(getFunctionSpace(),getDataPointShape(),v);
         DataLazy* dl=new DataLazy(dc->getPtr());
@@ -754,8 +814,17 @@ Data::setToZero()
     }
     else
     {
-        exclusiveWrite();
-        m_data->setToZero();
+	// we don't want to call exclusiveWrite() here because
+        // as soon as we get the copy we'd overwrite it
+        if (isShared())
+        {	  
+                DataAbstract* t=m_data->zeroedCopy();
+                set_m_data(DataAbstract_ptr(t));
+        }	
+	else
+	{
+	    m_data->setToZero();
+	}
     }
 }
 
@@ -771,6 +840,10 @@ Data::copyWithMask(const Data& other,
     {
         throw DataException("Error - copyWithMask not permitted using instances of DataEmpty.");
     }
+    if (mask.isComplex())
+    {
+        throw DataException("Error - copyWithMask not permitted using a complex mask.");
+    }
     Data other2(other);
     Data mask2(mask);
     other2.resolve();
@@ -832,12 +905,6 @@ Data::copyWithMask(const Data& other,
         // and so I'm going to assume that you don't want your data objects getting a new shape.
         throw DataException("Attempt to copyWithMask into a scalar from an object or mask with rank>0.");
     }
-    exclusiveWrite();
-    // Now we iterate over the elements
-    RealVectorType& self=getReady()->getVectorRW();;
-    const RealVectorType& ovec=other2.getReadyPtr()->getVectorRO();
-    const RealVectorType& mvec=mask2.getReadyPtr()->getVectorRO();
-
     if ((selfrank>0) && (otherrank==0) &&(maskrank==0))
     {
         // Not allowing this combination.
@@ -846,11 +913,42 @@ Data::copyWithMask(const Data& other,
         // or should the target object be reshaped to be a scalar as well.
         throw DataException("Attempt to copyWithMask from scalar mask and data into non-scalar target.");
     }
+    
+    if (isComplex()!=other2.isComplex())
+    {
+        complicate();
+        other2.complicate();
+    }
+    
+    exclusiveWrite();
+    if (!isComplex())
+    {
+	maskWorker(other2, mask2, DataTypes::real_t(0));
+    }
+    else
+    {
+	maskWorker(other2, mask2, DataTypes::cplx_t(0));
+    }
+}
+
+template <typename S>
+void 
+Data::maskWorker(Data& other2, Data& mask2, S sentinel)
+{
+     // Now we iterate over the elements
+    auto& self=getReady()->getTypedVectorRW(sentinel);
+    auto& ovec=other2.getReadyPtr()->getTypedVectorRO(sentinel);
+    auto& mvec=mask2.getReadyPtr()->getTypedVectorRO(DataTypes::real_t(0));
+
+    unsigned int selfrank=getDataPointRank();
+    unsigned int otherrank=other2.getDataPointRank();
+    unsigned int maskrank=mask2.getDataPointRank();    
+
     if ((selfrank>0) && (otherrank>0) &&(maskrank==0))
     {
         if (mvec[0]>0)          // copy whole object if scalar is >0
         {
-            copy(other);
+            copy(other2);
         }
         return;
     }
@@ -892,7 +990,8 @@ Data::copyWithMask(const Data& other,
             for (i=tlookup.begin();i!=tlookup.end();i++)
             {
                 // get the target offset
-                DataTypes::RealVectorType::size_type toff=tptr->getOffsetForTag(i->first);
+	        // yes this is explicitly RealType but size_t should not vary
+	        DataTypes::RealVectorType::size_type toff=tptr->getOffsetForTag(i->first);
                 DataTypes::RealVectorType::size_type moff=mptr->getOffsetForTag(i->first);
                 DataTypes::RealVectorType::size_type ooff=optr->getOffsetForTag(i->first);
                 for (int j=0;j<getDataPointSize();++j)
@@ -917,9 +1016,9 @@ Data::copyWithMask(const Data& other,
             for (i=tlookup.begin();i!=tlookup.end();i++)
             {
                 // get the target offset
-                DataTypes::RealVectorType::size_type toff=tptr->getOffsetForTag(i->first);
+	        DataTypes::RealVectorType::size_type toff=tptr->getOffsetForTag(i->first);
                 DataTypes::RealVectorType::size_type moff=mptr->getOffsetForTag(i->first);
-                DataTypes::RealVectorType::size_type ooff=optr->getOffsetForTag(i->first);
+                DataTypes::RealVectorType::size_type ooff=optr->getOffsetForTag(i->first);	      
                 for (int j=0;j<getDataPointSize();++j)
                 {
                     if (mvec[j+moff]>0)
@@ -1205,7 +1304,6 @@ Data::probeInterpolation(const FunctionSpace& functionspace) const
 Data
 Data::gradOn(const FunctionSpace& functionspace) const
 {
-    THROWONCOMPLEX
     if (isEmpty())
     {
         throw DataException("Error - operation not permitted on instances of DataEmpty.");
@@ -1215,14 +1313,24 @@ Data::gradOn(const FunctionSpace& functionspace) const
     DataTypes::ShapeType grad_shape=getDataPointShape();
     grad_shape.push_back(functionspace.getDim());
     Data out(0.0,grad_shape,functionspace,true);
-    getDomain()->setToGradient(out,*this);
+    if (isComplex())
+        out.complicate();    
+    if (isLazy() && isComplex())
+    {
+        Data temp(*this);
+        temp.resolve();     // since lazy complex is not a thing       
+        getDomain()->setToGradient(out, temp);
+    } 
+    else
+    {
+        getDomain()->setToGradient(out,*this);
+    }
     return out;
 }
 
 Data
 Data::grad() const
 {
-    THROWONCOMPLEX
     if (isEmpty())
     {
         throw DataException("Error - operation not permitted on instances of DataEmpty.");
@@ -1606,7 +1714,7 @@ Data::getValueOfGlobalDataPointAsTuple(int procNo, int dataPointNo)
             // TODO: global error handling
             DataTypes::RealVectorType::size_type offset=getDataOffset(sampleNo, dataPointNoInSample);
 
-            memcpy(tmpData,&(getDataAtOffsetRO(offset)),length*sizeof(real_t));
+            memcpy(tmpData,&(getDataAtOffsetRO(offset, static_cast<DataTypes::real_t>(0))),length*sizeof(real_t));
         }
     }
 #ifdef ESYS_MPI
@@ -1625,12 +1733,15 @@ Data::getValueOfGlobalDataPointAsTuple(int procNo, int dataPointNo)
 bp::object
 Data::integrateToTuple_const() const
 {
-    THROWONCOMPLEX
     if (isLazy())
     {
         throw DataException("Error - cannot integrate for constant lazy data.");
     }
-    return integrateWorker();
+    if (isComplex()) {
+        return integrateWorker<cplx_t>();
+    } else {
+        return integrateWorker<real_t>();
+    }
 }
 
 bp::object
@@ -1640,10 +1751,14 @@ Data::integrateToTuple()
     {
         expand();       // Can't do a non-resolving version of this without changing the domain object
     }                     // see the dom->setToIntegrals call. Not saying it can't be done, just not doing it yet.
-    return integrateWorker();
-
+    if (isComplex()) {
+        return integrateWorker<cplx_t>();
+    } else {
+        return integrateWorker<real_t>();
+    }
 }
 
+template<typename Scalar>
 bp::object
 Data::integrateWorker() const
 {
@@ -1652,27 +1767,51 @@ Data::integrateWorker() const
 
     //
     // calculate the integral values
-    vector<real_t> integrals(dataPointSize);
-    vector<real_t> integrals_local(dataPointSize);
+    vector<Scalar> integrals(dataPointSize);
+    vector<Scalar> integrals_local(dataPointSize);
     const AbstractContinuousDomain* dom=dynamic_cast<const AbstractContinuousDomain*>(getDomain().get());
-    if (dom==0)
+    if (dom == 0)
     {                             
         throw DataException("Can not integrate over non-continuous domains.");
     }
+   
 #ifdef ESYS_MPI
-    dom->setToIntegrals(integrals_local,*this);
+    if (isLazy() && isComplex())
+    {
+        Data temp(*this);
+        temp.resolve();
+        dom->setToIntegrals(integrals_local, temp);
+    }
+    else
+    {
+        dom->setToIntegrals(integrals_local, *this);
+    }
+    
     // Global sum: use an array instead of a vector because elements of array are guaranteed to be contiguous in memory
-    real_t *tmp = new real_t[dataPointSize];
-    real_t *tmp_local = new real_t[dataPointSize];
+    Scalar* tmp = new Scalar[dataPointSize];
+    Scalar* tmp_local = new Scalar[dataPointSize];
     for (int i=0; i<dataPointSize; i++) { tmp_local[i] = integrals_local[i]; }
-    MPI_Allreduce( &tmp_local[0], &tmp[0], dataPointSize, MPI_DOUBLE, MPI_SUM, getDomain()->getMPIComm() );
+    if (sizeof(Scalar) == sizeof(double)) {
+        MPI_Allreduce(&tmp_local[0], &tmp[0], dataPointSize, MPI_DOUBLE, MPI_SUM, getDomain()->getMPIComm());
+    } else {
+        MPI_Allreduce(&tmp_local[0], &tmp[0], dataPointSize, MPI_DOUBLE_COMPLEX, MPI_SUM, getDomain()->getMPIComm());
+    }
     for (int i=0; i<dataPointSize; i++) { integrals[i] = tmp[i]; }
-    bp::tuple result=pointToTuple(shape,tmp);
+    bp::tuple result = pointToTuple(shape, tmp);
     delete[] tmp;
     delete[] tmp_local;
 #else
-    dom->setToIntegrals(integrals,*this);
-    bp::tuple result=pointToTuple(shape,integrals);
+    if (isLazy() && isComplex())
+    {
+        Data temp(*this);
+        temp.resolve();
+        dom->setToIntegrals(integrals, temp);
+    }
+    else
+    {
+        dom->setToIntegrals(integrals, *this);
+    }
+    bp::tuple result = pointToTuple(shape, integrals);
 #endif
 
     return result;
@@ -1696,6 +1835,7 @@ Data
 Data::bessel(int order, real_t (*besselfunc) (int,real_t) )
 {
     THROWONCOMPLEX
+    DataTypes::real_t wantreal=0;
     if (isEmpty())  // do this before we attempt to interpolate
     {
      throw DataException("Error - Operations (bessel) not permitted on instances of DataEmpty.");
@@ -1716,8 +1856,8 @@ Data::bessel(int order, real_t (*besselfunc) (int,real_t) )
 
     if (arg_0_Z.isConstant()) {
         res = Data(0.0, shape0, arg_0_Z.getFunctionSpace(),false);      // DataConstant output
-        const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(0));
-        real_t *ptr_2 = &(res.getDataAtOffsetRW(0));
+        const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(0, wantreal));
+        real_t *ptr_2 = &(res.getDataAtOffsetRW(0, wantreal));
         for (int i = 0; i < size0; ++i) {
             ptr_2[i] = besselfunc(order, ptr_0[i]);
         }
@@ -1733,8 +1873,8 @@ Data::bessel(int order, real_t (*besselfunc) (int,real_t) )
         DataTagged* tmp_2=dynamic_cast<DataTagged*>(res.borrowData());
 
         // Get the pointers to the actual data
-        const real_t *ptr_0 = &(tmp_0->getDefaultValueRO(0));
-        real_t *ptr_2 = &(tmp_2->getDefaultValueRW(0));
+        const real_t *ptr_0 = &(tmp_0->getDefaultValueRO(0, wantreal));
+        real_t *ptr_2 = &(tmp_2->getDefaultValueRW(0, wantreal));
         // Compute a result for the default
         for (int i = 0; i < size0; ++i) {
             ptr_2[i] = besselfunc(order, ptr_0[i]);
@@ -1762,14 +1902,15 @@ Data::bessel(int order, real_t (*besselfunc) (int,real_t) )
         int sampleNo_0,dataPointNo_0;
         int numSamples_0 = arg_0_Z.getNumSamples();
         int numDataPointsPerSample_0 = arg_0_Z.getNumDataPointsPerSample();
+	DataTypes::real_t wantreal=0;
         #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
         for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
             dataPointNo_0=0;
         //      for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
             int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
             int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
-            const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
-            real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
+            const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, wantreal));
+            real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2, wantreal));
             for (int i = 0; i < size0*numDataPointsPerSample_0; ++i) {
                 ptr_2[i] = besselfunc(order, ptr_0[i]);
             }
@@ -1842,6 +1983,27 @@ Data::imag() const
     }
 }
 
+Data
+Data::phase() const
+{
+    if (isLazy())
+    {
+        Data temp(*this);
+        temp.resolve();
+        return temp.phase();
+    }
+    if (isComplex())
+    {
+        return C_TensorUnaryOperation(*this, escript::ES_optype::PHS);      
+    }
+    else
+    {
+        return whereNegative()*Data(M_PI, DataTypes::scalarShape, getFunctionSpace(), false);
+    }
+}
+
+
+
 
 
 Data
@@ -1958,6 +2120,7 @@ Data::log() const
 Data
 Data::sign() const
 {
+    THROWONCOMPLEX
     MAKELAZYOP(SIGN);
     return C_TensorUnaryOperation(*this, escript::ES_optype::SIGN);
 }
@@ -2030,12 +2193,12 @@ Data::Lsup()
             }
             else
             {
-                return lazyAlgWorker<AbsMax<cplx_t> >(0,MPI_MAX);             
+                return lazyAlgWorker<AbsMax<real_t> >(0,MPI_MAX);             
             }
 #else
             if (isComplex())
             {
-                return lazyAlgWorker<AbsMax<real_t> >(0);
+                return lazyAlgWorker<AbsMax<cplx_t> >(0);
             }
             else
             {
@@ -2144,15 +2307,15 @@ Data::lazyAlgWorker(real_t init)
     const size_t numsamples=getNumSamples();
     const size_t samplesize=getNoValues()*getNumDataPointsPerSample();
     BinaryOp operation;
-    real_t localValue=0, globalValue;
-   #pragma omp parallel private(i)
+    real_t localValue=0, globalValue;    
+    #pragma omp parallel private(i)
     {
         real_t localtot=init;
         #pragma omp for schedule(static) private(i)
         for (i=0;i<numsamples;++i)
         {
             size_t roffset=0;
-            const DataTypes::RealVectorType* v=dl->resolveSample(i, roffset);
+            auto v=dl->resolveTypedSample(i, roffset, typename BinaryOp::second_argument_type(0));
             // Now we have the sample, run operation on all points
             for (size_t j=0;j<samplesize;++j)
             {
@@ -2571,7 +2734,7 @@ Data::antihermitian() const
     DataTypes::ShapeType s=getDataPointShape();
     if (getDataPointRank()==2) {
         if(s[0] != s[1])
-            throw DataException("Error - Data::antisymmetric can only be calculated for rank 2 object with equal first and second dimension.");
+            throw DataException("Error - Data::antihermitian can only be calculated for rank 2 object with equal first and second dimension.");
 	MAKELAZYOP(NHER);
         DataTypes::ShapeType ev_shape;
         ev_shape.push_back(s[0]);
@@ -2583,7 +2746,7 @@ Data::antihermitian() const
     }
     else if (getDataPointRank()==4) {
         if(!(s[0] == s[2] && s[1] == s[3]))
-            throw DataException("Error - Data::antisymmetric can only be calculated for rank 4 object with dim0==dim2 and dim1==dim3.");
+            throw DataException("Error - Data::antihermitian can only be calculated for rank 4 object with dim0==dim2 and dim1==dim3.");
 	MAKELAZYOP(NHER);
         DataTypes::ShapeType ev_shape;
         ev_shape.push_back(s[0]);
@@ -2596,7 +2759,7 @@ Data::antihermitian() const
         return ev;
     }
     else {
-        throw DataException("Error - Data::antisymmetric can only be calculated for rank 2 or 4 object.");
+        throw DataException("Error - Data::antihermitian can only be calculated for rank 2 or 4 object.");
     }
 }
 
@@ -2743,6 +2906,9 @@ Data::minGlobalDataPoint() const
     int DataPointNo;
     int ProcNo;
     calc_minGlobalDataPoint(ProcNo,DataPointNo);
+    if (ProcNo==-1) {
+	throw DataException("There are no values to find minimum of.");
+    }
     return bp::make_tuple(ProcNo,DataPointNo);
 }
 
@@ -2775,10 +2941,11 @@ Data::calc_minGlobalDataPoint(int& ProcNo,
 #pragma omp parallel firstprivate(local_lowi,local_lowj) private(local_val,local_min)
     {
         local_min=min;
+	DataTypes::real_t wantreal=0;
 #pragma omp for private(i,j) schedule(static)
         for (i=0; i<numSamples; i++) {
             for (j=0; j<numDPPSample; j++) {
-                local_val=temp.getDataAtOffsetRO(temp.getDataOffset(i,j));
+                local_val=temp.getDataAtOffsetRO(temp.getDataOffset(i,j), wantreal);
                 if (local_val<local_min) {
                     local_min=local_val;
                     local_lowi=i;
@@ -2803,20 +2970,27 @@ Data::calc_minGlobalDataPoint(int& ProcNo,
     /*int error =*/ MPI_Gather (next, 2, MPI_DOUBLE, globalMins, 2, MPI_DOUBLE, 0, get_MPIComm() );
 
     if ( get_MPIRank()==0 ) {
-        for (lowProc=0; lowProc<get_MPISize(); lowProc++)
+        for (lowProc=0; lowProc<get_MPISize(); lowProc++) {
             if (globalMins[lowProc*2+1] > 0) break;
-        min = globalMins[lowProc*2];
-        for( i=lowProc+1; i<get_MPISize(); i++ )
-            if( globalMins[i*2+1]>0 && min>globalMins[i*2] ) {
-                lowProc = i;
-                min = globalMins[i*2];
-            }
+        }
+	if (lowProc<get_MPISize()) {
+            min = globalMins[lowProc*2];
+            for( i=lowProc+1; i<get_MPISize(); i++ )
+                if( globalMins[i*2+1]>0 && min>globalMins[i*2] ) {
+                    lowProc = i;
+                    min = globalMins[i*2];
+                }
+        }
     }
     MPI_Bcast( &lowProc, 1, MPI_INT, 0, get_MPIComm() );
     DataPointNo = lowj + lowi * numDPPSample;
-    MPI_Bcast(&DataPointNo, 1, MPI_INT, lowProc, get_MPIComm() );
+    if (lowProc>=get_MPISize()) {
+        ProcNo = -1;
+    } else {
+        MPI_Bcast(&DataPointNo, 1, MPI_INT, lowProc, get_MPIComm() );
+        ProcNo = lowProc;
+    }
     delete [] globalMins;
-    ProcNo = lowProc;
 #else
     ProcNo = 0;
     DataPointNo = lowj + lowi * numDPPSample;
@@ -2864,10 +3038,11 @@ Data::calc_maxGlobalDataPoint(int& ProcNo,
 #pragma omp parallel firstprivate(local_highi,local_highj) private(local_val,local_max)
     {
         local_max=max;
+	DataTypes::real_t wantreal=0;
 #pragma omp for private(i,j) schedule(static)
         for (i=0; i<numSamples; i++) {
             for (j=0; j<numDPPSample; j++) {
-                local_val=temp.getDataAtOffsetRO(temp.getDataOffset(i,j));
+                local_val=temp.getDataAtOffsetRO(temp.getDataOffset(i,j), wantreal);
                 if (local_val>local_max) {
                     local_max=local_val;
                     local_highi=i;
@@ -3562,9 +3737,10 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 	    }
 	    else
 	    {
+	        real_t dummyr=0;
 		const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(0,0));
 		const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(0,0));
-		real_t *ptr_2 = &(res.getDataAtOffsetRW(0));
+		real_t *ptr_2 = &(res.getDataAtOffsetRW(0, dummyr));
 		matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);	      
 	    }
 	}
@@ -3670,8 +3846,9 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 	    else
 	    {
 		// Prepare offset into DataConstant
+	        real_t dummyr=0;
 		int offset_0 = tmp_0->getPointOffset(0,0);
-		const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
+		const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, dummyr));
 
 		const real_t *ptr_1 = &(tmp_1->getDefaultValueRO(0));
 		real_t *ptr_2 = &(tmp_2->getDefaultValueRW(0));
@@ -3859,7 +4036,8 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 	    }
 	    else
 	    {
-		const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));
+		real_t dummyr=0;
+		const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1, dummyr));
 		const real_t *ptr_0 = &(tmp_0->getDefaultValueRO(0));
 		real_t *ptr_2 = &(tmp_2->getDefaultValueRW(0));
 
@@ -4088,12 +4266,12 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 		#pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
 		for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
 		    int offset_0 = tmp_0->getPointOffset(sampleNo_0,0); // They're all the same, so just use #0
-		    const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
+		    const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, dummyr));
 		    for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
 			int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);
 			int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
-			const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));
-			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
+			const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1, dummyr));
+			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2, dummyr));
 			matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
 		    }
 		}	      
@@ -4170,9 +4348,9 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 		    for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
 			int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
 			int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
-			const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
-			const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));
-			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
+			const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, dummyr));
+			const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1, dummyr));
+			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2, dummyr));
 			matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
 		    }
 		}	      
@@ -4252,12 +4430,12 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 		#pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
 		for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
 		    int offset_1 = tmp_1->getPointOffset(sampleNo_0,0);
-		    const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));
+		    const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1, dummyr));
 		    for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
 			int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
 			int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
-			const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
-			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
+			const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, dummyr));
+			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2, dummyr));
 			matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
 		    }
 		}	      
@@ -4340,9 +4518,9 @@ escript::C_GeneralTensorProduct(Data& arg_0,
 			int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
 			int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);
 			int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
-			const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
-			const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));
-			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
+			const real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, dummyr));
+			const real_t *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1, dummyr));
+			real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2, dummyr));
 			matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
 		    }
 		}	      
@@ -4388,6 +4566,7 @@ Data::toString() const
     int globalNeedSummary=0;
 #endif
     if (!m_data->isEmpty() &&
+        m_data->isExpanded() &&
         !m_data->isLazy() && 
         getLength() > escriptParams.getTooManyLines())
     {
@@ -5129,12 +5308,28 @@ Data::print()
     int i,j;
 
     printf( "Data is %dX%d\n", getNumSamples(), getNumDataPointsPerSample() );
-    for( i=0; i<getNumSamples(); i++ )
+    if (isComplex())
+    {
+	for( i=0; i<getNumSamples(); i++ )
+	{
+	    printf( "[%6d]", i );
+	    for( j=0; j<getNumDataPointsPerSample(); j++ )
+	    {
+	        DataTypes::cplx_t* v=getSampleDataRW(i, static_cast<DataTypes::cplx_t>(0));
+		printf( "\t%10.7g,%10.7g", std::real(v[j]), std::imag(v[j]) );    // doesn't really need RW access
+	    }
+	    printf( "\n" );
+	}      
+    }
+    else
     {
-        printf( "[%6d]", i );
-        for( j=0; j<getNumDataPointsPerSample(); j++ )
-            printf( "\t%10.7g", (getSampleDataRW(i))[j] );    // doesn't really need RW access
-        printf( "\n" );
+	for( i=0; i<getNumSamples(); i++ )
+	{
+	    printf( "[%6d]", i );
+	    for( j=0; j<getNumDataPointsPerSample(); j++ )
+		printf( "\t%10.7g", (getSampleDataRW(i, static_cast<DataTypes::real_t>(0)))[j] );    // doesn't really need RW access
+	    printf( "\n" );
+	}
     }
 }
 void
@@ -5371,6 +5566,26 @@ escript::applyBinaryCFunction(bp::object cfunc, bp::tuple shape, escript::Data&
 Data
 escript::condEval(escript::Data& mask, escript::Data& trueval, escript::Data& falseval)
 {
+    if (trueval.isComplex()!=falseval.isComplex())
+    {
+        trueval.complicate();
+        falseval.complicate();
+    }
+    if (trueval.isComplex())
+    {
+        return condEvalWorker(mask, trueval, falseval, static_cast<DataTypes::cplx_t>(0));
+    }
+    else
+    {
+        return condEvalWorker(mask, trueval, falseval, static_cast<DataTypes::real_t>(0));
+    }
+}
+
+
+template <typename S>
+Data
+escript::condEvalWorker(escript::Data& mask, escript::Data& trueval, escript::Data& falseval, S sentinel)
+{
     // First, we need to make sure that trueval and falseval are compatible types.
     // also need to ensure that mask is a proper type for a mask
     // Need to choose a functionspace and shape for result
@@ -5412,7 +5627,7 @@ escript::condEval(escript::Data& mask, escript::Data& trueval, escript::Data& fa
     if (mask.isConstant() && trueval.isConstant() && falseval.isConstant())
     {
         Data result(0,trueval.getDataPointShape(), fs , false);
-        if (mask.getSampleDataRO(0)[0]>0)
+        if (mask.getSampleDataRO(0,static_cast<DataTypes::real_t>(0))[0]>0)	// mask is always real
         {
             result.copy(trueval);
         }
@@ -5445,18 +5660,19 @@ escript::condEval(escript::Data& mask, escript::Data& trueval, escript::Data& fa
         const DataTagged* tdat=dynamic_cast<const DataTagged*>(trueval.getReady());
         const DataTagged* fdat=dynamic_cast<const DataTagged*>(falseval.getReady());
         const DataTagged* mdat=dynamic_cast<DataTagged*>(mask.getReady());
-        RealVectorType::const_pointer srcptr;
+        //RealVectorType::const_pointer srcptr;
+	const S* srcptr;
 
         // default value first
         if (mdat->getDefaultValueRO(0)>0)
         {
-            srcptr=&(tdat->getDefaultValueRO(0));
+            srcptr=&(tdat->getDefaultValueRO(0, sentinel));
         } else {
-            srcptr=&(fdat->getDefaultValueRO(0));
+            srcptr=&(fdat->getDefaultValueRO(0, sentinel));
         }
         for (int i=0;i<trueval.getDataPointSize();++i)
         {
-            *(&(rdat->getDefaultValueRW(0))+i)=*(srcptr+i);
+            *(&(rdat->getDefaultValueRW(0, sentinel))+i)=*(srcptr+i);
         }
 
         // now we copy the tags from the mask - if the mask does not have it then it doesn't appear
@@ -5497,14 +5713,14 @@ escript::condEval(escript::Data& mask, escript::Data& trueval, escript::Data& fa
         }
         else
         {
-            Data result(0,trueval.getDataPointShape(), fs , true);  // Need to support non-expanded as well
+            Data result(sentinel,trueval.getDataPointShape(), fs , true);  // Need to support non-expanded as well
             // OPENMP 3.0 allows unsigned loop vars.
 #if defined(_OPENMP) && (_OPENMP < 200805)
             long i;
 #else
             size_t i;
 #endif
-            RealVectorType& rvec=result.getReady()->getVectorRW();      // don't need to get acquireWrite since we made it
+            auto& rvec=result.getReady()->getTypedVectorRW(sentinel);      // don't need to get acquireWrite since we made it
             unsigned int psize=result.getDataPointSize();
                 
             size_t numsamples=result.getNumSamples();
@@ -5514,15 +5730,15 @@ escript::condEval(escript::Data& mask, escript::Data& trueval, escript::Data& fa
             {
                 // We are assuming that the first datapoint in the sample determines which side to use
                 // for the whole sample.
-                const DataTypes::real_t* src=0;
-                const DataTypes::real_t* masksample=mask.getSampleDataRO(i);
+                const decltype(sentinel)* src=0;
+                const DataTypes::real_t* masksample=mask.getSampleDataRO(i, static_cast<DataTypes::real_t>(0));
                 if (masksample[0]>0)    // first scalar determines whole sample
                 {
-                    src=trueval.getSampleDataRO(i);
+                    src=trueval.getSampleDataRO(i, sentinel);
                 }
                 else
                 {
-                    src=falseval.getSampleDataRO(i);
+                    src=falseval.getSampleDataRO(i, sentinel);
                 }
                 for (int j=0;j<dppsample;++j)
                 {
@@ -5762,7 +5978,20 @@ void Data::complicate()
     if (isProtected()) {
         throw DataException("Error - attempt to update protected Data object.");
     }  
-    m_data->complicate();
+    
+    if (m_data->isLazy())
+    {
+            // This is different to the other types because instead of switching from 
+            // one internal storage vector to the other within the same node
+            // m_data needs to be replaced with an new root (promote) node.
+        DataLazy_ptr nn=dynamic_pointer_cast<DataLazy>(m_data);
+        DataLazy_ptr res=makePromote(nn);
+        set_m_data(res);
+    }
+    else
+    {
+        m_data->complicate();
+    }
 }
 
 Data
@@ -6017,10 +6246,11 @@ escript::C_TensorUnaryOperation(Data const &arg_0,
 #endif      
             if (startsample<numSamples_0)
             {
+	        real_t dummyr=0;
                 size_t offset_0 = tmp_0->getPointOffset(startsample,0);
                 size_t offset_2 = tmp_2->getPointOffset(startsample,0);
-                const DataTypes::real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
-                DataTypes::real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
+                const DataTypes::real_t *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0, dummyr));
+                DataTypes::real_t *ptr_2 = &(res.getDataAtOffsetRW(offset_2, dummyr));
                 if (always_real(operation))
                 {
                     tensor_unary_array_operation_real(size0*samples*numDataPointsPerSample_0, ptr_0, ptr_2, operation, tol);
diff --git a/escriptcore/src/Data.h b/escriptcore/src/Data.h
index cc6aa37..93e5935 100644
--- a/escriptcore/src/Data.h
+++ b/escriptcore/src/Data.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -972,6 +972,15 @@ If false, the result is a list of scalars [1, 2, ...]
   */
   Data
   abs() const;
+  
+  /**
+     \brief
+     Return the phase/arg/angular-part of complex values.
+     *
+  */
+  Data
+  phase() const;
+  
 
   /**
      \brief
@@ -1557,10 +1566,10 @@ instead of manually manipulating process and point IDs.
   */
 
         DataTypes::RealVectorType::const_reference
-        getDataAtOffsetRO(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0);
+        getDataAtOffsetRO(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy);
 
         DataTypes::RealVectorType::reference
-        getDataAtOffsetRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0);
+        getDataAtOffsetRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy);
         
         DataTypes::CplxVectorType::const_reference
         getDataAtOffsetRO(DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy);
@@ -1603,9 +1612,11 @@ instead of manually manipulating process and point IDs.
    void init_from_data_and_fs(const Data& inData,
            const FunctionSpace& functionspace);   
    
-   
+   template <typename S>
+   void 
+   maskWorker(Data& other2, Data& mask2, S sentinel);
 
-template <class BinaryOp>
+  template <class BinaryOp>
   DataTypes::real_t 
 #ifdef ESYS_MPI
   lazyAlgWorker(DataTypes::real_t init, MPI_Op mpiop_type);
@@ -1622,6 +1633,7 @@ template <class BinaryOp>
   DataTypes::real_t
   infWorker() const;
 
+  template<typename Scalar>
   boost::python::object
   integrateWorker() const;
 
@@ -1864,7 +1876,8 @@ template <class BinaryOp>
 #ifdef IKNOWWHATIMDOING
   friend Data applyBinaryCFunction(boost::python::object cfunc, boost::python::tuple shape, escript::Data& d, escript::Data& e);
 #endif
-  friend Data condEval(escript::Data& mask, escript::Data& trueval, escript::Data& falseval);
+  template <typename S>
+  friend Data condEvalWorker(escript::Data& mask, escript::Data& trueval, escript::Data& falseval, S sentinel);
   friend Data randomData(const boost::python::tuple& shape, const FunctionSpace& what, long seed, const boost::python::tuple& filter);
 
 };
@@ -2220,17 +2233,14 @@ Data::reduction(BinaryFunction operation, DataTypes::real_t initial_value) const
     for (std::list<int>::const_iterator i=used.begin();i!=used.end();++i)
     {
       int tag=*i;
-      if (tag==0)	// check for the default tag
+      DataTagged::DataMapType::const_iterator it=lookup.find(tag);
+      if ((tag==0) || (it==lookup.end()))	// check for the default tag
       {
-	  current_value=operation(current_value,escript::reductionOpVector(vec,shape,data.getDefaultOffset(),operation,initial_value));
+        current_value=operation(current_value,escript::reductionOpVector(vec,shape,data.getDefaultOffset(),operation,initial_value));
       }
       else
       {
-	  DataTagged::DataMapType::const_iterator it=lookup.find(tag);
-	  if (it!=lookup.end())
-	  {
-		  current_value=operation(current_value,escript::reductionOpVector(vec,shape,it->second,operation,initial_value));
-	  }
+        current_value=operation(current_value,escript::reductionOpVector(vec,shape,it->second,operation,initial_value));
       }
     }
     return current_value;    
diff --git a/escriptcore/src/DataAbstract.cpp b/escriptcore/src/DataAbstract.cpp
index 5ecb9a8..87d02ce 100644
--- a/escriptcore/src/DataAbstract.cpp
+++ b/escriptcore/src/DataAbstract.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataAbstract.h b/escriptcore/src/DataAbstract.h
index 305bebf..d2296e0 100644
--- a/escriptcore/src/DataAbstract.h
+++ b/escriptcore/src/DataAbstract.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -115,6 +115,16 @@ class ESCRIPT_DLL_API DataAbstract : public REFCOUNT_BASE_CLASS(DataAbstract)
   virtual
   DataAbstract*
   deepCopy() const =0 ;
+  
+  /**
+     \brief Return an object with the same type, domain (and tags if appropriate)
+     as this, but all values are zeroed.
+  */
+  virtual
+  DataAbstract*
+  zeroedCopy() const =0 ;
+  
+  
 
   /**
      \brief Return a data object with all points resolved.
diff --git a/escriptcore/src/DataConstant.cpp b/escriptcore/src/DataConstant.cpp
index 5efbbf6..a5b11a0 100644
--- a/escriptcore/src/DataConstant.cpp
+++ b/escriptcore/src/DataConstant.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -22,7 +22,13 @@
 #include <iostream>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncDim.h>
+  #include <ncVar.h>
+  #include <ncFile.h>
+ #else
+  #include <netcdfcpp.h>
+ #endif
 #endif
 
 
@@ -49,6 +55,10 @@
 using namespace std;
 using namespace boost::python;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace escript {
 
 DataConstant::DataConstant(const WrappedArray& value,
@@ -238,6 +248,22 @@ DataAbstract* DataConstant::deepCopy() const
 }
 
 
+DataAbstract* DataConstant::zeroedCopy() const
+{
+    DataConstant* p=0;
+    if (isComplex())
+    {
+        p=new DataConstant(this->getFunctionSpace(), this->getShape(), DataTypes::cplx_t(0));
+    }
+    else
+    {
+        p=new DataConstant(this->getFunctionSpace(), this->getShape(), DataTypes::real_t(0));
+    }
+    return p;
+}
+
+
+
 DataTypes::RealVectorType::size_type
 DataConstant::getPointOffset(int sampleNo,
                              int dataPointNo) const
@@ -288,6 +314,12 @@ DataConstant::setSlice(const DataAbstract* value,
   if (tempDataConst==0) {
     throw DataException("Programming error - casting to DataConstant.");
   }
+  
+  if (isComplex()!=value->isComplex())
+  {
+    throw DataException("Error - cannot copy between slices of different complexity.");
+  }  
+  
   CHECK_FOR_EX_WRITE
   //
   DataTypes::ShapeType shape(DataTypes::getResultSliceShape(region));
@@ -482,10 +514,160 @@ void
 DataConstant::setToZero()
 {
     CHECK_FOR_EX_WRITE
-    DataTypes::RealVectorType::size_type n=m_data_r.size();
-    for (int i=0; i<n ;++i) m_data_r[i]=0.;
+    if (isComplex())
+    {
+        DataTypes::CplxVectorType::size_type n=m_data_c.size();
+        for (int i=0; i<n ;++i) m_data_c[i]=0.;
+    }
+    else 
+    {
+        DataTypes::RealVectorType::size_type n=m_data_r.size();
+        for (int i=0; i<n ;++i) m_data_r[i]=0.;
+    }
+}
+
+#ifdef NETCDF4
+void
+DataConstant::dump(const std::string fileName) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    vector<NcDim> ncdims;
+    int rank = getRank();
+    int type=  getFunctionSpace().getTypeCode();
+
+    //long dims[DataTypes::maxRank];
+    const double* d_ptr=&(m_data_r[0]);
+    DataTypes::ShapeType shape = getShape();
+    JMPI mpiInfo(getFunctionSpace().getDomain()->getMPI());
+#ifdef ESYS_MPI
+    int ndims =0;    
+    const int mpi_iam = mpiInfo->rank;
+    const int mpi_num = mpiInfo->size;
+    MPI_Status status;
+
+    /* Serialize NetCDF I/O */
+    if (mpi_iam > 0)
+        MPI_Recv(&ndims, 0, MPI_INT, mpi_iam-1, 81802, mpiInfo->comm, &status);
+#endif
+    // Create the file.
+    const std::string newFileName(mpiInfo->appendRankToFileName(fileName));
+    NcFile dataFile;
+    try
+    {
+        dataFile.open(newFileName.c_str(), NcFile::FileMode::replace,   NcFile::FileFormat::classic64);
+    }
+    catch (exceptions::NcException e)
+    {
+        throw DataException("Error - DataConstant:: opening of netCDF file for output failed.");
+    }
+    int line=0;
+    try
+    {
+        const NcInt ni;
+        dataFile.putAtt("type_id", ni, 0);
+        line++;
+        dataFile.putAtt("rank", ni, rank);
+        line++;
+        dataFile.putAtt("function_space_type", ni, type);
+    }
+    catch (exceptions::NcException e)
+    {
+        switch (line)
+        {
+        case 0: throw DataException("Error - DataConstant:: appending data type to netCDF file failed.");
+        case 1: throw DataException("Error - DataConstant:: appending rank attribute to netCDF file failed.");
+        case 2: throw DataException("Error - DataConstant:: appending function space attribute to netCDF file failed.");
+        }
+    }
+    if (rank == 0) {
+        try
+        {
+            ncdims.push_back(dataFile.addDim("l",  1));
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("Error - DataConstant:: appending ncdimension 0 to netCDF file failed.");           
+        }
+//         dims[0]=1,
+#ifdef ESYS_MPI
+        ndims=1;
+#endif        
+    } else {
+#ifdef ESYS_MPI        
+        ndims=rank;
+#endif        
+//         dims[0]=shape[0];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d0", shape[0]));
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("Error - DataConstant:: appending ncdimension 0 to netCDF file failed.");
+        }
+        if ( rank >1 ) {
+//             dims[1]=shape[1];
+            try
+            {
+                ncdims.push_back(dataFile.addDim("d1", shape[1]));
+            }
+            catch (exceptions::NcException e)
+            {
+                throw DataException("Error - DataConstant:: appending ncdimension 1 to netCDF file failed.");
+            }
+        }
+        if ( rank >2 ) {
+//             dims[2]=shape[2];
+            try
+            {
+                ncdims.push_back(dataFile.addDim("d2",  shape[2]));
+            } 
+            catch (exceptions::NcException e)
+            {
+                throw DataException("Error - DataConstant:: appending ncdimension 2 to netCDF file failed.");
+            }
+        }
+        if ( rank >3 ) {
+//             dims[3]=shape[3];
+            try
+            {
+                ncdims.push_back(dataFile.addDim("d3",  shape[3]));
+            } 
+            catch (exceptions::NcException e)
+            {
+                throw DataException("Error - DataConstant:: appending ncdimension 3 to netCDF file failed.");
+            }
+        }
+    }
+
+    try
+    {
+        line=0;     
+        NcVar var = dataFile.addVar("data", ncDouble, ncdims);
+        line++;
+            // d_ptr is the data itself, dims is the shape
+        // var.put(d_ptr,dims);
+        var.putVar(d_ptr);
+    }
+    catch (exceptions::NcException e)
+    {
+        if (line==0)
+        {
+            throw DataException("Error - DataConstant:: appending variable to netCDF file failed.");
+        }
+        throw DataException("Error - DataConstant:: copy data to netCDF buffer failed.");
+    }
+#ifdef ESYS_MPI
+    if (mpi_iam<mpi_num-1) MPI_Send(&ndims, 0, MPI_INT, mpi_iam+1, 81802, MPI_COMM_WORLD);
+#endif
+    #else
+    throw DataException("Error - DataConstant:: dump is not configured with netCDF. Please contact your installation manager.");
+    #endif
 }
 
+#else
+
+// old netcdf implementation
 void
 DataConstant::dump(const std::string fileName) const
 {
@@ -563,6 +745,8 @@ DataConstant::dump(const std::string fileName) const
    #endif
 }
 
+#endif
+
 // These used to be marked as inline in DataConstant.
 // But they are marked virtual in DataReady
 DataTypes::RealVectorType&
diff --git a/escriptcore/src/DataConstant.h b/escriptcore/src/DataConstant.h
index 95305dc..502ef4f 100644
--- a/escriptcore/src/DataConstant.h
+++ b/escriptcore/src/DataConstant.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -143,6 +143,15 @@ typedef DataReady parent;
   DataAbstract*
   deepCopy() const;
 
+  /**
+     \brief Return an object with the same type, domain (and tags if appropriate)
+     as this, but all values are zeroed.
+  */  
+  ESCRIPT_DLL_API
+  virtual
+  DataAbstract*
+  zeroedCopy() const;  
+  
 
  /**
      \brief
diff --git a/escriptcore/src/DataEmpty.cpp b/escriptcore/src/DataEmpty.cpp
index 8e4b144..bbcb7f7 100644
--- a/escriptcore/src/DataEmpty.cpp
+++ b/escriptcore/src/DataEmpty.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -56,6 +56,12 @@ DataEmpty::deepCopy() const
   return new DataEmpty();
 }
 
+DataAbstract*
+DataEmpty::zeroedCopy() const
+{
+  return new DataEmpty();
+}
+
 DataTypes::RealVectorType::size_type
 DataEmpty::getPointOffset(int sampleNo,
                           int dataPointNo) const 
diff --git a/escriptcore/src/DataEmpty.h b/escriptcore/src/DataEmpty.h
index b1981bc..89b09f5 100644
--- a/escriptcore/src/DataEmpty.h
+++ b/escriptcore/src/DataEmpty.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -69,6 +69,15 @@ typedef DataReady parent;
   virtual
   DataAbstract*
   deepCopy() const;
+  
+  /**
+     \brief Return an object with the same type, domain (and tags if appropriate)
+     as this, but all values are zeroed.
+  */  
+  ESCRIPT_DLL_API
+  virtual
+  DataAbstract*
+  zeroedCopy() const;      
 
 
   /**
diff --git a/escriptcore/src/DataException.h b/escriptcore/src/DataException.h
index d39011c..21b6552 100644
--- a/escriptcore/src/DataException.h
+++ b/escriptcore/src/DataException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataExpanded.cpp b/escriptcore/src/DataExpanded.cpp
index dfb15e8..83e70ce 100644
--- a/escriptcore/src/DataExpanded.cpp
+++ b/escriptcore/src/DataExpanded.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -23,13 +23,27 @@
 
 #include <limits>
 
+
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncDim.h>
+  #include <ncVar.h>
+  #include <ncFile.h>
+ #else
+  #include <netcdfcpp.h>
+ #endif
 #endif
 
 using namespace std;
 using namespace escript::DataTypes;
 
+#ifdef ESYS_HAVE_NETCDF
+ #ifdef NETCDF4
+  using namespace netCDF;
+ #endif
+#endif
+
+
 #ifdef SLOWSHARECHECK
   #define CHECK_FOR_EX_WRITE do {\
     if (isShared()) {\
@@ -252,6 +266,21 @@ DataAbstract* DataExpanded::deepCopy() const
     return new DataExpanded(*this);
 }
 
+DataAbstract*
+DataExpanded::zeroedCopy() const
+{
+    DataExpanded* p=0;
+    if (isComplex())
+    {
+        p=new DataExpanded(this->getFunctionSpace(), this->getShape(), DataTypes::cplx_t(0));
+    }
+    else
+    {
+        p=new DataExpanded(this->getFunctionSpace(), this->getShape(), DataTypes::real_t(0));
+    }   
+  return p;
+}
+
 DataAbstract* DataExpanded::getSlice(const DataTypes::RegionType& region) const
 {
     return new DataExpanded(*this,region);
@@ -279,18 +308,42 @@ void DataExpanded::setSlice(const DataAbstract* value,
                 "Error - Couldn't copy slice due to shape mismatch.",
                 shape, value->getShape()));
 
-    // copy the data from the slice into this object
-    DataTypes::RealVectorType& vec=getVectorRW();
-    const ShapeType& mshape=getShape();
-    const DataTypes::RealVectorType& tVec=tempDataExp->getVectorRO();
-    const ShapeType& tShape=tempDataExp->getShape();
-#pragma omp parallel for
-    for (int i=0; i<m_noSamples; i++) {
-        for (int j=0; j<m_noDataPointsPerSample; j++) {
-            DataTypes::copySliceFrom(vec, mshape, getPointOffset(i,j), tVec,
-                                     tShape, tempDataExp->getPointOffset(i,j),
-                                     region_loop_range);
-        }
+    if (value->isComplex()!=isComplex())
+    {
+	throw DataException("Programmer Error: object and new value must be the same complexity.");
+    }
+
+    if (isComplex())
+    {
+	// copy the data from the slice into this object
+	DataTypes::CplxVectorType& vec=getVectorRWC();
+	const ShapeType& mshape=getShape();
+	const DataTypes::CplxVectorType& tVec=tempDataExp->getVectorROC();
+	const ShapeType& tShape=tempDataExp->getShape();
+    #pragma omp parallel for
+	for (int i=0; i<m_noSamples; i++) {
+	    for (int j=0; j<m_noDataPointsPerSample; j++) {
+		DataTypes::copySliceFrom(vec, mshape, getPointOffset(i,j), tVec,
+					tShape, tempDataExp->getPointOffset(i,j),
+					region_loop_range);
+	    }
+	}      
+    }
+    else
+    {
+	// copy the data from the slice into this object
+	DataTypes::RealVectorType& vec=getVectorRW();
+	const ShapeType& mshape=getShape();
+	const DataTypes::RealVectorType& tVec=tempDataExp->getVectorRO();
+	const ShapeType& tShape=tempDataExp->getShape();
+    #pragma omp parallel for
+	for (int i=0; i<m_noSamples; i++) {
+	    for (int j=0; j<m_noDataPointsPerSample; j++) {
+		DataTypes::copySliceFrom(vec, mshape, getPointOffset(i,j), tVec,
+					tShape, tempDataExp->getPointOffset(i,j),
+					region_loop_range);
+	    }
+	}
     }
 }
 
@@ -1024,17 +1077,173 @@ void DataExpanded::setToZero()
     CHECK_FOR_EX_WRITE;
     const int numSamples = getNumSamples();
     const int numDataPointsPerSample = getNumDPPSample();
-    const DataTypes::RealVectorType::size_type n = getNoValues();
-#pragma omp parallel for
-    for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {
-        for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
-            double* p = &m_data_r[getPointOffset(sampleNo,dataPointNo)];
-            for (int i=0; i<n; ++i)
-                p[i] = 0.;
+    if (isComplex())
+    {
+	const DataTypes::CplxVectorType::size_type n = getNoValues();
+    #pragma omp parallel for
+	for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {
+	    for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
+		DataTypes::cplx_t* p = &m_data_c[getPointOffset(sampleNo,dataPointNo)];
+		for (int i=0; i<n; ++i)
+		    p[i] = 0.;
+	    }
+	}
+    }
+    else
+    {
+	const DataTypes::RealVectorType::size_type n = getNoValues();
+    #pragma omp parallel for
+	for (int sampleNo = 0; sampleNo < numSamples; sampleNo++) {
+	    for (int dataPointNo = 0; dataPointNo < numDataPointsPerSample; dataPointNo++) {
+		double* p = &m_data_r[getPointOffset(sampleNo,dataPointNo)];
+		for (int i=0; i<n; ++i)
+		    p[i] = 0.;
+	    }
+	}
+    }
+}
+
+#ifdef NETCDF4
+void DataExpanded::dump(const std::string fileName) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    const int ldims=2+DataTypes::maxRank;
+    vector<NcDim> ncdims;
+    int rank = getRank();
+    int type=  getFunctionSpace().getTypeCode();
+    //int ndims =0;
+    long dims[ldims];
+    const double* d_ptr=&(m_data_r[0]);
+    const DataTypes::ShapeType& shape = getShape();
+    JMPI mpiInfo(getFunctionSpace().getDomain()->getMPI());
+    const std::string newFileName(mpiInfo->appendRankToFileName(fileName));
+    NcFile dataFile;
+    try
+    {
+        dataFile.open(newFileName.c_str(), NcFile::FileMode::replace,   NcFile::FileFormat::classic64);
+    }
+    catch (exceptions::NcException e)
+    {
+        throw DataException("Error - DataExpanded:: opening of netCDF file for output failed.");
+    }
+    int line=0;
+    try
+    {
+        const NcInt ni;
+        dataFile.putAtt("type_id", ni, 2);
+        line++;
+        dataFile.putAtt("rank", ni, rank);
+        line++;
+        dataFile.putAtt("function_space_type", ni, type);
+    }
+    catch (exceptions::NcException e)
+    {
+        switch (line)
+        {
+        case 0: throw DataException("DataExpanded::dump: appending data type to netCDF file failed.");
+        case 1: throw DataException("DataExpanded::dump: appending rank attribute to netCDF file failed.");
+        case 2: throw DataException("DataExpanded::dump: appending function space attribute to netCDF file failed.");
+            
+            
+        }
+        
+    }
+//     ndims=rank+2;
+    if ( rank >0 ) {
+        dims[0]=shape[0];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d0",shape[0]));
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("DataExpanded::dump: appending ncdim 0 to netCDF file failed.");
+        }
+    }
+    if ( rank >1 ) {
+        dims[1]=shape[1];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d1",shape[1]));
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("DataExpanded::dump: appending ncdim 1 to netCDF file failed.");
+        }
+    }
+    if ( rank >2 ) {
+        dims[2]=shape[2];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d2", shape[2]));            
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("DataExpanded::dump: appending ncdim 2 to netCDF file failed.");
         }
     }
+    if ( rank >3 ) {
+        dims[3]=shape[3];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d3", shape[3]));            
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("DataExpanded::dump: appending ncdim 3 to netCDF file failed.");
+        }
+    }
+    dims[rank]=getFunctionSpace().getNumDataPointsPerSample();    
+    try
+    {
+        ncdims.push_back(dataFile.addDim("num_data_points_per_sample", dims[rank]));
+    }
+    catch (exceptions::NcException e)
+    {
+        throw DataException("DataExpanded::dump: appending num_data_points_per_sample to netCDF file failed.");
+    }
+    dims[rank+1]=getFunctionSpace().getNumSamples();
+    try
+    {
+        ncdims.push_back(dataFile.addDim("num_samples", dims[rank+1]));
+    }
+    catch (exceptions::NcException e)
+    {
+        throw DataException("DataExpanded::dump: appending num_sample to netCDF file failed.");
+    }
+    if (getFunctionSpace().getNumSamples() > 0) {
+        line=0;
+        try
+        {
+            NcVar ids = dataFile.addVar("id", ncInt, ncdims[rank+1]);
+            line++;
+            const dim_t* ids_p=getFunctionSpace().borrowSampleReferenceIDs();
+//             ids.put(ids_p,dims[rank+1]);
+            ids.putVar(ids_p);
+            line++;
+            NcVar var = dataFile.addVar("data", ncDouble, ncdims);
+            line++;
+            //var.put(d_ptr,dims);
+            var.putVar(d_ptr);
+        }
+        catch (exceptions::NcException e)
+        {
+            switch (line)
+            {
+            case 0:  throw DataException("DataExpanded::dump: appending reference id to netCDF file failed.");
+            case 1: throw DataException("DataExpanded::dump: copy reference id  to netCDF buffer failed.");
+            case 2: throw DataException("DataExpanded::dump: appending variable to netCDF file failed.");
+            case 3: throw DataException("DataExpanded::dump: copy data to netCDF buffer failed.");
+            }
+        }
+    }
+#else
+    throw DataException("DataExpanded::dump: not configured with netCDF. Please contact your installation manager.");
+#endif // ESYS_HAVE_NETCDF
 }
 
+#else
+
 void DataExpanded::dump(const std::string fileName) const
 {
 #ifdef ESYS_HAVE_NETCDF
@@ -1104,6 +1313,8 @@ void DataExpanded::dump(const std::string fileName) const
 #endif // ESYS_HAVE_NETCDF
 }
 
+#endif
+
 void DataExpanded::setTaggedValue(int tagKey,
                                   const DataTypes::ShapeType& pointshape,
                                   const DataTypes::RealVectorType& value,
diff --git a/escriptcore/src/DataExpanded.h b/escriptcore/src/DataExpanded.h
index ff12be2..0982667 100644
--- a/escriptcore/src/DataExpanded.h
+++ b/escriptcore/src/DataExpanded.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -193,6 +193,15 @@ TODO Note that this constructor will also copy data to all points if it only con
   DataAbstract*
   deepCopy() const;
 
+  /**
+     \brief Return an object with the same type, domain (and tags if appropriate)
+     as this, but all values are zeroed.
+  */  
+  ESCRIPT_DLL_API
+  virtual
+  DataAbstract*
+  zeroedCopy() const;    
+  
 
  /**
      \brief
diff --git a/escriptcore/src/DataFactory.cpp b/escriptcore/src/DataFactory.cpp
index da11fb4..4bee84b 100644
--- a/escriptcore/src/DataFactory.cpp
+++ b/escriptcore/src/DataFactory.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -21,11 +21,27 @@
 
 #include <exception>
 #include <iostream>
+#include <fstream>
+
+
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncDim.h>
+  #include <ncVar.h>
+  #include <ncFile.h>
+  
+ #include "NCHelper.h"  
+  
+ #else
+  #include <netcdfcpp.h>
+ #endif
 #endif
 
 namespace bp = boost::python;
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 
 namespace escript {
 
@@ -36,6 +52,35 @@ Data Scalar(double value, const FunctionSpace& what, bool expanded)
     return Data(value, shape, what, expanded);
 }
 
+Data Scalar(DataTypes::cplx_t value, const FunctionSpace& what, bool expanded)
+{
+    // an empty shape is a scalar
+    DataTypes::ShapeType shape;
+    return Data(value, shape, what, expanded);
+}
+
+Data
+ScalarFromObj(boost::python::object o,
+	const FunctionSpace& what,
+	bool expanded)
+{
+    // check for real first
+    try {
+        double v = bp::extract<double>(o);
+        return Scalar(v, what, expanded);
+    } catch(...) {
+        PyErr_Clear();
+    }    
+    // check for real first
+    try {
+        DataTypes::cplx_t v = bp::extract<DataTypes::cplx_t>(o);
+        return Scalar(v, what, expanded);
+    } catch(...) {
+        PyErr_Clear();
+    }    
+    throw DataException("Can not make a Scalar from a non-scalar value.");
+}
+
 Data Vector(double value, const FunctionSpace& what, bool expanded)
 {
     DataTypes::ShapeType shape(1, what.getDomain()->getDim());
@@ -66,6 +111,11 @@ Data Tensor(double value, const FunctionSpace& what, bool expanded)
     return Data(value, shape, what, expanded);
 }
 
+Data TensorC(DataTypes::cplx_t value, const FunctionSpace& what, bool expanded)
+{
+    DataTypes::ShapeType shape(2, what.getDomain()->getDim());
+    return Data(value, shape, what, expanded);
+}
 
 // We need to take some care here because this signature trumps the other one from boost's point of view
 Data TensorFromObj(bp::object o, const FunctionSpace& what, bool expanded)
@@ -77,6 +127,13 @@ Data TensorFromObj(bp::object o, const FunctionSpace& what, bool expanded)
     } catch(...) {
         PyErr_Clear();
     }
+    // now try to get a complex and route to scalar factory
+    try {
+        DataTypes::cplx_t v = bp::extract<DataTypes::cplx_t>(o);
+        return TensorC(v, what, expanded);
+    } catch(...) {
+        PyErr_Clear();
+    }    
     DataTypes::ShapeType shape(2, what.getDomain()->getDim());
     Data d(o, what, expanded);
     if (d.getDataPointShape() != shape) {
@@ -92,6 +149,13 @@ Data Tensor3(double value, const FunctionSpace& what, bool expanded)
     return Data(value, shape, what, expanded);
 }
 
+Data Tensor3C(DataTypes::cplx_t  value, const FunctionSpace& what, bool expanded)
+{
+    DataTypes::ShapeType shape(3, what.getDomain()->getDim());
+    return Data(value, shape, what, expanded);
+}
+
+
 Data Tensor3FromObj(bp::object o, const FunctionSpace& what, bool expanded)
 {
     // first try to get a double and route it to the other method
@@ -101,6 +165,13 @@ Data Tensor3FromObj(bp::object o, const FunctionSpace& what, bool expanded)
     } catch(...) {
         PyErr_Clear();
     }
+    // first try to get a complex and route it to the other method
+    try {
+        DataTypes::cplx_t v = bp::extract<DataTypes::cplx_t>(o);
+        return Tensor3C(v, what, expanded);
+    } catch(...) {
+        PyErr_Clear();
+    }    
     DataTypes::ShapeType shape(3, what.getDomain()->getDim());
     Data d(o, what, expanded);
     if (d.getDataPointShape() != shape) {
@@ -116,6 +187,13 @@ Data Tensor4(double value, const FunctionSpace& what, bool expanded)
     return Data(value, shape, what, expanded);
 }
 
+Data Tensor4C(DataTypes::cplx_t value, const FunctionSpace& what, bool expanded)
+{
+    DataTypes::ShapeType shape(4, what.getDomain()->getDim());
+    return Data(value, shape, what, expanded);
+}
+
+
 Data Tensor4FromObj(bp::object o, const FunctionSpace& what, bool expanded)
 {
     // first try to get a double and route it to the other method
@@ -125,6 +203,13 @@ Data Tensor4FromObj(bp::object o, const FunctionSpace& what, bool expanded)
     } catch(...) {
         PyErr_Clear();
     }
+    // first try to get a double and route it to the other method
+    try {
+        DataTypes::cplx_t v = bp::extract<DataTypes::cplx_t>(o);
+        return Tensor4C(v, what, expanded);
+    } catch(...) {
+        PyErr_Clear();
+    }    
     DataTypes::ShapeType shape(4, what.getDomain()->getDim());
     Data d(o, what, expanded);
     if (d.getDataPointShape() != shape) {
@@ -134,6 +219,265 @@ Data Tensor4FromObj(bp::object o, const FunctionSpace& what, bool expanded)
     return d;
 }
 
+#ifdef NETCDF4
+
+// Warning: at time of writing, calls to ncVar::getVar are not range checked as was done under the previous API
+// we want to see if it works first, but at some stage that should be tightened up
+
+Data load(const std::string fileName, const AbstractDomain& domain)
+{
+#ifdef ESYS_HAVE_NETCDF
+    JMPI mpiInfo(domain.getMPI());
+    const std::string newFileName(mpiInfo->appendRankToFileName(fileName));
+    NcFile dataFile;
+    if (!openNcFile(dataFile, newFileName))
+    {
+        throw DataException("load: opening of netCDF file for input failed.");
+    }
+    Data out;
+    int error = 0;
+    std::string msg;
+    try {
+        int line=0;
+        int rank=-1;
+        int type=-1;
+        int function_space_type=0;  // =0 should not actually be used but we keep compiler happy
+        try
+        {
+            // recover function space            
+            NcGroupAtt fst=dataFile.getAtt("function_space_type");
+            if (fst.getAttLength()!=1)
+            {
+                throw DataException("load: oversize attribute function_space_type");
+            }
+            fst.getValues(&function_space_type);
+        }
+        catch (exceptions::NcException e)
+        {
+                throw DataException("load: cannot recover function_space_type attribute from escript netCDF file.");    
+        }
+        line=0;
+        if (!domain.isValidFunctionSpaceType(function_space_type))
+        {       // jump to outer catch
+            throw DataException("load: function space type code in netCDF file is invalid for given domain.");
+        }
+        FunctionSpace function_space=FunctionSpace(domain.getPtr(), function_space_type);
+        try
+        {
+            line++;
+            NcGroupAtt rt=dataFile.getAtt("rank");
+            if (rt.getAttLength()!=1)
+            {
+                throw DataException("load: oversize attribute rank");
+            }
+            rt.getValues(&rank);
+            line++;
+            if (rank<0 || rank>DataTypes::maxRank)
+                throw DataException("load: rank in escript netCDF file is greater than maximum rank.");            
+            // recover type attribute
+            //   looks like we can have either "type" or "typeid"
+            NcGroupAtt tatt=dataFile.getAtt("type");
+            if (!tatt.isNull())
+            {
+                std::string type_str;
+                tatt.getValues(&type_str);
+                if (type_str=="constant")
+                {
+                    type = 0;
+                }
+                else if (type_str=="tagged")
+                {
+                    type = 1;
+                }
+                else // if (type_str=="expanded")
+                {
+                    type = 2;
+                }
+            }
+            else 
+            {
+                tatt=dataFile.getAtt("type_id");
+                if (!tatt.isNull())
+                {
+                    if (tatt.getAttLength()>1)
+                    {
+                        throw DataException("load: oversize attribute type_id");
+                    }
+                    //type=dataFile.getAtt("type_id").as_int(0);
+                    tatt.getValues(&type);
+                }
+                else
+                {
+                    throw DataException("load: cannot recover type attribute from escript netCDF file.");
+                }
+            }
+        }
+        catch (exceptions::NcException e)
+        {
+            switch (line)
+            {
+            case 1: throw DataException("load: cannot recover rank attribute from escript netCDF file.");
+            default:
+                throw DataException("load: unspecified error.");
+            }
+        }
+        // recover dimension
+        int ndims=dataFile.getDimCount();
+        int ntags =0 , num_samples =0 , num_data_points_per_sample =0, d=0, len_data_point=1;
+        NcDim d_dim, tags_dim, num_samples_dim, num_data_points_per_sample_dim;
+        /* recover shape */
+        DataTypes::ShapeType shape;
+//        long dims[DataTypes::maxRank+2];
+        if (rank>0) {
+            if ((d_dim=dataFile.getDim("d0")).isNull() )
+                throw DataException("load: unable to recover d0 from netCDF file.");
+            d=d_dim.getSize();
+            shape.push_back(d);
+//             dims[0]=d;
+            len_data_point*=d;
+        }
+        if (rank>1) {
+            if ((d_dim=dataFile.getDim("d1")).isNull() )
+                throw DataException("load: unable to recover d1 from netCDF file.");
+            d=d_dim.getSize();
+            shape.push_back(d);
+//             dims[1]=d;
+            len_data_point*=d;
+        }
+        if (rank>2) {
+            if ((d_dim=dataFile.getDim("d2")).isNull() )
+                throw DataException("load: unable to recover d2 from netCDF file.");
+            d=d_dim.getSize();
+            shape.push_back(d);
+//             dims[2]=d;
+            len_data_point*=d;
+        }
+        if (rank>3) {
+            if ((d_dim=dataFile.getDim("d3")).isNull() )
+                throw DataException("load: unable to recover d3 from netCDF file.");
+            d=d_dim.getSize();
+            shape.push_back(d);
+//             dims[3]=d;
+            len_data_point*=d;
+        }
+
+        NcVar var, ids_var, tags_var;
+        if (type == 0) {
+            // constant data
+            if ( ! ( (ndims == rank && rank >0) || ( ndims ==1 && rank == 0 ) ) )
+                throw DataException("load: illegal number of dimensions for constant data in netCDF file.");
+            if (rank == 0) {
+                if ((d_dim=dataFile.getDim("l")).isNull() )
+                    throw DataException("load: unable to recover d0 for scalar constant data in netCDF file.");
+                int d0 = d_dim.getSize();
+                if (d0 != 1)
+                    throw DataException("load: d0 is expected to be one for scalar constant data in netCDF file.");
+//                 dims[0]=1;
+            }
+            out=Data(0,shape,function_space,false);
+            if ((var = dataFile.getVar("data")).isNull())
+                throw DataException("load: unable to find data in netCDF file.");
+            var.getVar(&(out.getDataAtOffsetRW(out.getDataOffset(0,0), static_cast<DataTypes::real_t>(0))));
+        } else if (type == 1) { 
+            // tagged data
+            if ( ! (ndims == rank + 1) )
+                throw DataException("load: illegal number of dimensions for tagged data in netCDF file.");
+            if ((tags_dim=dataFile.getDim("num_tags")).isNull() )
+                throw DataException("load: unable to recover number of tags from netCDF file.");
+            ntags=tags_dim.getSize();
+//             dims[rank]=ntags;
+            std::vector<int> tags(ntags);
+            if (( tags_var = dataFile.getVar("tags")).isNull() )
+                throw DataException("load: unable to find tags in netCDF file.");
+            // oversize could be a problem here?
+            tags_var.getVar(&tags[0]);
+
+            // A) create a DataTagged dt
+            // B) Read data from file
+            // C) copy default value into dt
+            // D) copy tagged values into dt
+            // E) create a new Data based on dt
+
+            NcVar var1;
+            DataTypes::RealVectorType data1(len_data_point * ntags, 0., len_data_point * ntags);
+            if ((var1 = dataFile.getVar("data")).isNull())
+                throw DataException("load: unable to find data in netCDF file.");
+            var1.getVar(&(data1[0])); 
+            DataTagged* dt=new DataTagged(function_space, shape, &tags[0], data1);
+            out=Data(dt);
+        } else if (type == 2) {
+            // expanded data
+            if ( ! (ndims == rank + 2) )
+                throw DataException("load: illegal number of dimensions for expanded data in netCDF file.");
+            if ((num_samples_dim = dataFile.getDim("num_samples")).isNull() )
+                throw DataException("load: unable to recover number of samples from netCDF file.");
+            num_samples = num_samples_dim.getSize();
+            if ((num_data_points_per_sample_dim = dataFile.getDim("num_data_points_per_sample")).isNull() )
+                throw DataException("load: unable to recover number of data points per sample from netCDF file.");
+            num_data_points_per_sample=num_data_points_per_sample_dim.getSize();
+            // check shape:
+            if ( ! (num_samples == function_space.getNumSamples() && num_data_points_per_sample == function_space.getNumDataPointsPerSample()) )
+                throw DataException("load: data sample layout of file does not match data layout of function space.");
+            if (num_samples==0) {
+                out = Data(0,shape,function_space,true);
+            } else {
+                // get ids
+                if (( ids_var = dataFile.getVar("id")).isNull() )
+                    throw DataException("load: unable to find reference ids in netCDF file.");
+                const DataTypes::dim_t* ids_p=function_space.borrowSampleReferenceIDs();
+                std::vector<DataTypes::dim_t> ids_of_nc(num_samples);
+                // oversize could be a problem here
+                ids_var.getVar(&ids_of_nc[0]);
+                // check order:
+                int failed=-1, local_failed=-1, i;
+#pragma omp parallel private(local_failed)
+                {
+                    local_failed=-1;
+#pragma omp for private(i) schedule(static)
+                    for (i=0; i < num_samples; ++i) {
+                        if (ids_of_nc[i]!=ids_p[i]) local_failed=i;
+                    }
+#pragma omp critical
+                    if (local_failed>=0) failed = local_failed;
+                }
+                // get the data:
+//                 dims[rank]=num_data_points_per_sample;
+//                 dims[rank+1]=num_samples;
+                out=Data(0,shape,function_space,true);
+                if ((var = dataFile.getVar("data")).isNull())
+                    throw DataException("load: unable to find data in netCDF file.");
+                var.getVar(&(out.getDataAtOffsetRW(out.getDataOffset(0,0), static_cast<DataTypes::real_t>(0))));
+                if (failed >= 0) {
+                    try {
+                        std::cout << "Information - load: start reordering data from netCDF file " << fileName << std::endl;
+                        out.borrowData()->reorderByReferenceIDs(&ids_of_nc[0]);
+                    } catch (std::exception&) {
+                        throw DataException("load: unable to reorder data in netCDF file.");
+                    }
+                }
+            }
+        } else {
+            throw DataException("load: unknown escript data type in netCDF file.");
+        }
+    } catch (DataException& e) {
+        error=1;
+        msg=e.what();
+    }
+    int gerror = error;
+    checkResult(error, gerror, mpiInfo);
+    if (gerror > 0) {
+        char* gmsg;
+        shipString(msg.c_str(), &gmsg, mpiInfo->comm);
+        throw DataException(gmsg);
+    }
+    return out;
+#else
+    throw DataException("load: not compiled with netCDF. Please contact your"
+                        " installation manager.");
+#endif // ESYS_HAVE_NETCDF
+}
+
+#else
 
 Data load(const std::string fileName, const AbstractDomain& domain)
 {
@@ -240,7 +584,7 @@ Data load(const std::string fileName, const AbstractDomain& domain)
             out=Data(0,shape,function_space,false);
             if (!(var = dataFile.get_var("data")))
                 throw DataException("load: unable to find data in netCDF file.");
-            if (! var->get(&(out.getDataAtOffsetRW(out.getDataOffset(0,0))), dims) ) 
+            if (! var->get(&(out.getDataAtOffsetRW(out.getDataOffset(0,0), static_cast<DataTypes::real_t>(0))), dims) ) 
                 throw DataException("load: unable to recover data from netCDF file.");
         } else if (type == 1) { 
             // tagged data
@@ -311,7 +655,7 @@ Data load(const std::string fileName, const AbstractDomain& domain)
                 out=Data(0,shape,function_space,true);
                 if (!(var = dataFile.get_var("data")))
                     throw DataException("load: unable to find data in netCDF file.");
-                if (! var->get(&(out.getDataAtOffsetRW(out.getDataOffset(0,0))), dims) ) 
+                if (! var->get(&(out.getDataAtOffsetRW(out.getDataOffset(0,0), static_cast<DataTypes::real_t>(0))), dims)) 
                     throw DataException("load: unable to recover data from netCDF file.");
                 if (failed >= 0) {
                     try {
@@ -343,6 +687,8 @@ Data load(const std::string fileName, const AbstractDomain& domain)
 #endif // ESYS_HAVE_NETCDF
 }
 
+#endif
+
 bool loadConfigured()
 {
 #ifdef ESYS_HAVE_NETCDF
diff --git a/escriptcore/src/DataFactory.h b/escriptcore/src/DataFactory.h
index dfce6df..6668a97 100644
--- a/escriptcore/src/DataFactory.h
+++ b/escriptcore/src/DataFactory.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -49,6 +49,32 @@ Scalar(double value,
        const FunctionSpace& what=FunctionSpace(),
        bool expanded=false);
 
+
+/**
+   \brief
+   Return a Data object containing scalar data-points.
+   ie: rank 0 data-points.
+   \param value - Input - Single value applied to all Data.
+   \param what - Input - A description of what this data represents.
+   \param expanded - Input - if true fill the entire container with 
+                     the value. Otherwise a more efficient storage 
+                     mechanism will be used.
+*/
+ESCRIPT_DLL_API Data
+Scalar(DataTypes::cplx_t value,
+       const FunctionSpace& what=FunctionSpace(),
+       bool expanded=false);
+
+/**
+ * \brief Python interface for the Scalar factory 
+*/
+ESCRIPT_DLL_API
+Data
+ScalarFromObj(boost::python::object o,
+	const FunctionSpace& what=FunctionSpace(),
+	bool expanded=false);
+
+
 /**
    \brief
    Return a Data object containing vector data-points.
diff --git a/escriptcore/src/DataLazy.cpp b/escriptcore/src/DataLazy.cpp
index e468cce..d259baa 100644
--- a/escriptcore/src/DataLazy.cpp
+++ b/escriptcore/src/DataLazy.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -109,6 +109,18 @@ using namespace boost;
 
 namespace escript
 {
+    
+    
+DataLazy_ptr makePromote(DataLazy_ptr p)
+{
+    if (p->isComplex())
+    {
+        return p;
+    }
+    DataLazy* temp=new DataLazy(p, PROM);
+    return DataLazy_ptr(temp);
+}
+    
 
 namespace
 {
@@ -134,6 +146,13 @@ size_t maxstackuse=0;
 #endif
 
 
+inline int max3(int a, int b, int c)
+{
+    int t=(a>b?a:b);
+    return (t>c?t:c);
+
+}
+
 // return the FunctionSpace of the result of "left op right"
 FunctionSpace
 resultFS(DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op)
@@ -389,14 +408,28 @@ void DataLazy::LazyNodeSetup()
 {
 #ifdef _OPENMP
     int numthreads=omp_get_max_threads();
-    m_samples.resize(numthreads*m_samplesize);
+    if (m_iscompl)
+    {
+        m_samples_c.resize(numthreads*m_samplesize);
+    }
+    else
+    {
+        m_samples_r.resize(numthreads*m_samplesize);
+    }    
     m_sampleids=new int[numthreads];
     for (int i=0;i<numthreads;++i) 
     { 
         m_sampleids[i]=-1;  
     }
 #else
-    m_samples.resize(m_samplesize);
+    if (m_iscompl)
+    {
+        m_samples_c.resize(m_samplesize);
+    }
+    else
+    {
+        m_samples_r.resize(m_samplesize);
+    }
     m_sampleids=new int[1];
     m_sampleids[0]=-1;
 #endif  // _OPENMP
@@ -407,7 +440,9 @@ void DataLazy::LazyNodeSetup()
 DataLazy::DataLazy(DataAbstract_ptr p)
         : parent(p->getFunctionSpace(),p->getShape())
         ,m_sampleids(0),
-        m_samples(1)
+        m_samples_r(1),
+        m_op(IDENTITY),
+        m_opgroup(getOpgroup(m_op))
 {
    if (p->isLazy())
    {
@@ -425,18 +460,20 @@ LAZYDEBUG(cout << "Wrapping " << dr.get() << " id=" << m_id.get() << endl;)
 LAZYDEBUG(cout << "(1)Lazy created with " << m_samplesize << endl;)
 }
 
+// Wrapping a unary operation
 DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op)
         : parent(left->getFunctionSpace(),(getOpgroup(op)!=G_REDUCTION)?left->getShape():DataTypes::scalarShape),
         m_op(op),
+        m_opgroup(getOpgroup(m_op)),                  
         m_axis_offset(0),
         m_transpose(0),
         m_SL(0), m_SM(0), m_SR(0)
 {
-   if ((getOpgroup(op)!=G_UNARY) && (getOpgroup(op)!=G_NP1OUT) && (getOpgroup(op)!=G_REDUCTION))
+   ES_opgroup gop=getOpgroup(op);
+   if ((gop!=G_UNARY) && (gop!=G_NP1OUT) && (gop!=G_REDUCTION) && (gop!=G_UNARY_C) && (gop!=G_UNARY_R))
    {
         throw DataException("Programmer error - constructor DataLazy(left, op) will only process UNARY operations.");
    }
-
    DataLazy_ptr lleft;
    if (!left->isLazy())
    {
@@ -451,15 +488,32 @@ DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op)
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+1;
    m_height=m_left->m_height+1;
+   if (gop==G_UNARY_R)
+   {
+       m_iscompl=false;
+   }
+   else if (gop==G_UNARY_C)
+   {
+       m_iscompl=true;
+   }
+   else
+   {
+       m_iscompl=left->isComplex();
+   }
    LazyNodeSetup();
+   if ((lleft->m_readytype!='E') && (op!=IDENTITY))
+   {
+       collapse();
+   }
    SIZELIMIT
 }
 
 
-// In this constructor we need to consider interpolation
+// In this constructor we need to consider interpolation and promotion
 DataLazy::DataLazy(DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op)
         : parent(resultFS(left,right,op), resultShape(left,right,op)),
         m_op(op),
+        m_opgroup(getOpgroup(m_op)),                  
         m_SL(0), m_SM(0), m_SR(0)
 {
 LAZYDEBUG(cout << "Forming operator with " << left.get() << " " << right.get() << endl;)
@@ -517,17 +571,45 @@ LAZYDEBUG(cout << "Right " << right.get() << " wrapped " << m_right->m_id.get()
    {
         m_readytype='C';
    }
+   if ((lt!='E') && (m_left->m_op!=IDENTITY))
+   {
+       m_left->collapse();
+   }
+   if ((rt!='E') && (m_right->m_op!=IDENTITY))
+   {
+       m_right->collapse();
+   }
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+m_right->m_children+2;
    m_height=max(m_left->m_height,m_right->m_height)+1;
+   
+   // now we need to work out if we need to promote anything
+   if (left->isComplex()!=right->isComplex())
+   {
+       if (left->isComplex())
+       {
+           m_right=makePromote(m_right);
+       }
+       else
+       {
+           m_left=makePromote(m_left);
+       }
+   }
+   m_iscompl=m_left->isComplex();
    LazyNodeSetup();
+   if ((m_readytype!='E') && (m_op!=IDENTITY))
+   {
+	collapse();
+   }
    SIZELIMIT
 LAZYDEBUG(cout << "(3)Lazy created with " << m_samplesize << endl;)
 }
 
+// need to consider promotion
 DataLazy::DataLazy(DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op, int axis_offset, int transpose)
         : parent(resultFS(left,right,op), GTPShape(left,right, axis_offset, transpose, m_SL,m_SM, m_SR)),
         m_op(op),
+        m_opgroup(getOpgroup(m_op)),                  
         m_axis_offset(axis_offset),
         m_transpose(transpose)
 {
@@ -583,10 +665,36 @@ DataLazy::DataLazy(DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op,
    {
         m_readytype='C';
    }
+   if ((lt!='E') && (m_left->m_op!=IDENTITY))
+   {
+       m_left->collapse();
+   }
+   if ((rt!='E') && (m_right->m_op!=IDENTITY))
+   {
+       m_right->collapse();
+   }   
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+m_right->m_children+2;
    m_height=max(m_left->m_height,m_right->m_height)+1;
+
+   // now we need to work out if we need to promote anything
+   if (left->isComplex()!=right->isComplex())
+   {
+       if (left->isComplex())
+       {
+           m_right=makePromote(m_right);
+       }
+       else
+       {
+           m_left=makePromote(m_left);
+       }
+   }
+   m_iscompl=m_left->isComplex();      
    LazyNodeSetup();
+   if ((m_readytype!='E') && (m_op!=IDENTITY))
+   {
+	collapse();
+   }
    SIZELIMIT
 LAZYDEBUG(cout << "(4)Lazy created with " << m_samplesize << endl;)
 }
@@ -595,6 +703,7 @@ LAZYDEBUG(cout << "(4)Lazy created with " << m_samplesize << endl;)
 DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op, int axis_offset)
         : parent(left->getFunctionSpace(), resultShape(left,op, axis_offset)),
         m_op(op),
+        m_opgroup(getOpgroup(m_op)),                  
         m_axis_offset(axis_offset),
         m_transpose(0),
         m_tol(0)
@@ -614,22 +723,33 @@ DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op, int axis_offset)
    }
    m_readytype=lleft->m_readytype;
    m_left=lleft;
+   if ((m_left->m_readytype!='E') && (m_left->m_op!=IDENTITY))
+   {
+       m_left->collapse();
+   }
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+1;
    m_height=m_left->m_height+1;
+   m_iscompl=left->isComplex();
    LazyNodeSetup();
+   if ((m_readytype!='E') && (m_op!=IDENTITY))
+   {
+	collapse();
+   }
    SIZELIMIT
 LAZYDEBUG(cout << "(5)Lazy created with " << m_samplesize << endl;)
 }
 
+// G_UNARY_P or G_UNARY_PR
 DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op, double tol)
         : parent(left->getFunctionSpace(), left->getShape()),
         m_op(op),
+        m_opgroup(getOpgroup(m_op)),                  
         m_axis_offset(0),
         m_transpose(0),
         m_tol(tol)
 {
-   if ((getOpgroup(op)!=G_UNARY_P))
+   if ((m_opgroup!=G_UNARY_P) && (m_opgroup!=G_UNARY_PR))
    {
         throw DataException("Programmer error - constructor DataLazy(left, op, tol) will only process UNARY operations which require parameters.");
    }
@@ -644,10 +764,26 @@ DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op, double tol)
    }
    m_readytype=lleft->m_readytype;
    m_left=lleft;
+   if ((m_left->m_readytype!='E') && (m_left->m_op!=IDENTITY))
+   {
+       m_left->collapse();
+   }   
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+1;
    m_height=m_left->m_height+1;
+   if (m_opgroup==G_UNARY_PR)
+   {
+       m_iscompl=false;
+   }
+   else
+   {
+       m_iscompl=left->isComplex();
+   }
    LazyNodeSetup();
+   if ((m_readytype!='E') && (m_op!=IDENTITY))
+   {
+	collapse();
+   }
    SIZELIMIT
 LAZYDEBUG(cout << "(6)Lazy created with " << m_samplesize << endl;)
 }
@@ -656,6 +792,7 @@ LAZYDEBUG(cout << "(6)Lazy created with " << m_samplesize << endl;)
 DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op, const int axis0, const int axis1)
         : parent(left->getFunctionSpace(), SwapShape(left,axis0,axis1)),
         m_op(op),
+        m_opgroup(getOpgroup(m_op)),                  
         m_axis_offset(axis0),
         m_transpose(axis1),
         m_tol(0)
@@ -675,34 +812,34 @@ DataLazy::DataLazy(DataAbstract_ptr left, ES_optype op, const int axis0, const i
    }
    m_readytype=lleft->m_readytype;
    m_left=lleft;
+   if ((m_left->m_readytype!='E') && (m_left->m_op!=IDENTITY))
+   {
+       m_left->collapse();
+   }   
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+1;
    m_height=m_left->m_height+1;
+   m_iscompl=left->isComplex();
    LazyNodeSetup();
+   if ((m_readytype!='E') && (m_op!=IDENTITY))
+   {
+	collapse();
+   }
    SIZELIMIT
 LAZYDEBUG(cout << "(7)Lazy created with " << m_samplesize << endl;)
 }
 
 
-namespace
-{
-
-    inline int max3(int a, int b, int c)
-    {
-        int t=(a>b?a:b);
-        return (t>c?t:c);
 
-    }
-}
 
 DataLazy::DataLazy(DataAbstract_ptr mask, DataAbstract_ptr left, DataAbstract_ptr right/*, double tol*/)
         : parent(left->getFunctionSpace(), left->getShape()),
         m_op(CONDEVAL),
+        m_opgroup(getOpgroup(m_op)),                  
         m_axis_offset(0),
         m_transpose(0),
         m_tol(0)
 {
-
    DataLazy_ptr lmask;
    DataLazy_ptr lleft;
    DataLazy_ptr lright;
@@ -741,7 +878,37 @@ DataLazy::DataLazy(DataAbstract_ptr mask, DataAbstract_ptr left, DataAbstract_pt
    m_samplesize=getNumDPPSample()*getNoValues();
    m_children=m_left->m_children+m_right->m_children+m_mask->m_children+1;
    m_height=max3(m_left->m_height,m_right->m_height,m_mask->m_height)+1;
+   
+   // now we need to work out if we need to promote anything
+   if (left->isComplex()!=right->isComplex())
+   {
+       if (left->isComplex())
+       {
+           m_right=makePromote(m_right);
+       }
+       else
+       {
+           m_left=makePromote(m_left);
+       }
+   }
+   if ((m_left->m_readytype!='E') && (m_left->m_op!=IDENTITY))
+   {
+       m_left->collapse();
+   }
+   if ((m_right->m_readytype!='E') && (m_right->m_op!=IDENTITY))
+   {
+       m_right->collapse();
+   }   
+   if ((m_mask->m_readytype!='E') && (m_mask->m_op!=IDENTITY))
+   {
+       m_mask->collapse();
+   }   
+   m_iscompl=left->isComplex();   
    LazyNodeSetup();
+   if ((m_readytype!='E') && (m_op!=IDENTITY))
+   {
+	collapse();
+   }
    SIZELIMIT
 LAZYDEBUG(cout << "(8)Lazy created with " << m_samplesize << endl;)
 }
@@ -773,7 +940,7 @@ DataLazy::collapseToReady() const
   DataReady_ptr pleft=m_left->collapseToReady();
   Data left(pleft);
   Data right;
-  if ((getOpgroup(m_op)==G_BINARY) || (getOpgroup(m_op)==G_TENSORPROD))
+  if ((m_opgroup==G_BINARY) || (m_opgroup==G_TENSORPROD))
   {
     right=Data(m_right->collapseToReady());
   }
@@ -792,6 +959,8 @@ DataLazy::collapseToReady() const
     case DIV:           
         result=left/right;
         break;
+    case POW:
+	result=left.powD(right);
     case SIN:
         result=left.sin();      
         break;
@@ -903,7 +1072,15 @@ DataLazy::collapseToReady() const
         result=left.minval();
         break;
     case HER:
-	result=left.hermitian();
+        result=left.hermitian();
+        break;
+    case NHER:
+        result=left.antihermitian();
+        break;
+    case PROM:
+        result.copy(left);
+        result.complicate();
+        break;
 	break;
     default:
         throw DataException("Programmer error - collapseToReady does not know how to resolve operator "+opToString(m_op)+".");
@@ -930,6 +1107,8 @@ DataLazy::collapse() const
   }
   m_id=collapseToReady();
   m_op=IDENTITY;
+  m_opgroup=getOpgroup(m_op);
+  m_children=m_height=0;
 }
 
 // The result will be stored in m_samples
@@ -963,13 +1142,18 @@ if (&x<stackend[omp_get_thread_num()])
   if (m_sampleids[tid]==sampleNo)
   {
         roffset=tid*m_samplesize;
-        return &(m_samples);            // sample is already resolved
+        return &(m_samples_r);            // sample is already resolved
   }
   m_sampleids[tid]=sampleNo;
 
-  switch (getOpgroup(m_op))
+  switch (m_opgroup)
   {
+        // note that G_UNARY_C is not listed here - this is deliberate
+        // by definition this type can not produce a real_t answer
+        // so processing it here would be a bug
   case G_UNARY:
+  case G_UNARY_R:
+  case G_UNARY_PR:
   case G_UNARY_P: return resolveNodeUnary(tid, sampleNo, roffset);
   case G_BINARY: return resolveNodeBinary(tid, sampleNo, roffset);
   case G_NP1OUT: return resolveNodeNP1OUT(tid, sampleNo, roffset);
@@ -979,7 +1163,59 @@ if (&x<stackend[omp_get_thread_num()])
   case G_REDUCTION: return resolveNodeReduction(tid, sampleNo, roffset);
   case G_CONDEVAL: return resolveNodeCondEval(tid, sampleNo, roffset);
   default:
-    throw DataException("Programmer Error - resolveSample does not know how to process "+opToString(m_op)+".");
+    throw DataException("Programmer Error - resolveNodeSample does not know how to process "+opToString(m_op)+" in group "+groupToString(m_opgroup)+".");
+  }
+}
+
+// The result will be stored in m_samples
+// The return value is a pointer to the DataVector, offset is the offset within the return value
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeSampleCplx(int tid, int sampleNo, size_t& roffset) const
+{
+LAZYDEBUG(cout << "Resolve sample " << toString() << endl;)
+        // collapse so we have a 'E' node or an IDENTITY for some other type
+  if (m_readytype!='E' && m_op!=IDENTITY)
+  {
+      throw DataException("Programmer Error - attempt to collapse inside resolveNodeSampleCplx. This should not happen.");
+  }
+  if (m_op==IDENTITY)   
+  {
+    const CplxVectorType& vec=m_id->getVectorROC();
+    roffset=m_id->getPointOffset(sampleNo, 0);
+#ifdef LAZY_STACK_PROF
+int x;
+if (&x<stackend[omp_get_thread_num()])
+{
+       stackend[omp_get_thread_num()]=&x;
+}
+#endif
+    return &(vec);
+  }
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer Error - Collapse did not produce an expanded node.");
+  }
+  if (m_sampleids[tid]==sampleNo)
+  {
+        roffset=tid*m_samplesize;
+        return &(m_samples_c);            // sample is already resolved
+  }
+  m_sampleids[tid]=sampleNo;
+
+  switch (m_opgroup)
+  {
+  case G_UNARY:
+  case G_UNARY_P: return resolveNodeUnaryCplx(tid, sampleNo, roffset);
+  case G_UNARY_C: return resolveNodeUnary_C(tid, sampleNo, roffset);  
+  case G_BINARY: return resolveNodeBinaryCplx(tid, sampleNo, roffset);
+  case G_NP1OUT: return resolveNodeNP1OUTCplx(tid, sampleNo, roffset);
+  case G_NP1OUT_P: return resolveNodeNP1OUT_PCplx(tid, sampleNo, roffset);
+  case G_TENSORPROD: return resolveNodeTProdCplx(tid, sampleNo, roffset);
+  case G_NP1OUT_2P: return resolveNodeNP1OUT_2PCplx(tid, sampleNo, roffset);
+  case G_REDUCTION: return resolveNodeReductionCplx(tid, sampleNo, roffset);
+  case G_CONDEVAL: return resolveNodeCondEvalCplx(tid, sampleNo, roffset);
+  default:
+    throw DataException("Programmer Error - resolveNodeSampleCplx does not know how to process "+opToString(m_op)+".");
   }
 }
 
@@ -998,25 +1234,86 @@ DataLazy::resolveNodeUnary(int tid, int sampleNo, size_t& roffset) const
   {
     throw DataException("Programmer error - resolveNodeUnary should not be called on identity nodes.");
   }
-  const DataTypes::RealVectorType* leftres=m_left->resolveNodeSample(tid, sampleNo, roffset);
-  const double* left=&((*leftres)[roffset]);
-  roffset=m_samplesize*tid;
-  double* result=&(m_samples[roffset]);
+  if (m_op==POS)
+  {
+        // this should be prevented earlier
+        // operation is meaningless for lazy
+            throw DataException("Programmer error - POS not supported for lazy data.");    
+  }
+  // The tricky bit here is that we expect a real output, but for G_UNARY_R, the child nodes could be complex
+  if (((m_opgroup==G_UNARY_R) || (m_opgroup==G_UNARY_PR)) && (m_left->isComplex()))
+  {
+    const DataTypes::CplxVectorType* leftres=m_left->resolveNodeSampleCplx(tid, sampleNo, roffset);
+    const cplx_t* left=&((*leftres)[roffset]);
+    roffset=m_samplesize*tid;
+    real_t* result=&(m_samples_r[roffset]);
+    tensor_unary_array_operation_real(m_samplesize,
+                                left,
+                                result,
+                                m_op,
+                                m_tol);
+  }
+  else
+  {
+    const DataTypes::RealVectorType* leftres=m_left->resolveNodeSample(tid, sampleNo, roffset);
+    const real_t* left=&((*leftres)[roffset]);
+    roffset=m_samplesize*tid;
+    real_t* result=&(m_samples_r[roffset]);
+    tensor_unary_array_operation(m_samplesize,
+                                left,
+                                result,
+                                m_op,
+                                m_tol);
+  }  
+  return &(m_samples_r);
+}
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeUnaryCplx(int tid, int sampleNo, size_t& roffset) const
+{
+        // we assume that any collapsing has been done before we get here
+        // since we only have one argument we don't need to think about only
+        // processing single points.
+        // we will also know we won't get identity nodes
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveUnary should only be called on expanded Data.");
+  }
+  if (m_op==IDENTITY)
+  {
+    throw DataException("Programmer error - resolveNodeUnary should not be called on identity nodes.");
+  }
   if (m_op==POS)
   {
 	// this should be prevented earlier
 	// operation is meaningless for lazy
         throw DataException("Programmer error - POS not supported for lazy data.");    
   }
-  tensor_unary_array_operation(m_samplesize,
-                             left,
-                             result,
-                             m_op,
-                             m_tol);  
-  return &(m_samples);
+  
+  roffset=m_samplesize*tid;
+  DataTypes::cplx_t* result=&(m_samples_c[roffset]); 
+  if (m_op==PROM)
+  {
+    size_t subroffset=0;
+    const DataTypes::RealVectorType* leftres=m_left->resolveNodeSample(tid, sampleNo, subroffset);
+    const DataTypes::real_t* left=&((*leftres)[subroffset]);      
+      
+    tensor_unary_promote(m_samplesize, left, result);      
+  }
+  else
+  {
+    size_t subroffset=0;
+    const DataTypes::CplxVectorType* leftres=m_left->resolveNodeSampleCplx(tid, sampleNo, subroffset);
+    const DataTypes::cplx_t* left=&((*leftres)[subroffset]);      
+    tensor_unary_array_operation(m_samplesize,
+                                left,
+                                result,
+                                m_op,
+                                m_tol);  
+  }
+  return &(m_samples_c);
 }
 
-
 const DataTypes::RealVectorType*
 DataLazy::resolveNodeReduction(int tid, int sampleNo, size_t& roffset) const
 {
@@ -1038,7 +1335,7 @@ DataLazy::resolveNodeReduction(int tid, int sampleNo, size_t& roffset) const
   roffset=m_samplesize*tid;
   unsigned int ndpps=getNumDPPSample();
   unsigned int psize=DataTypes::noValues(m_left->getShape());
-  double* result=&(m_samples[roffset]);
+  double* result=&(m_samples_r[roffset]);
   switch (m_op)
   {
     case MINVAL:
@@ -1066,9 +1363,28 @@ DataLazy::resolveNodeReduction(int tid, int sampleNo, size_t& roffset) const
     default:
         throw DataException("Programmer error - resolveUnary can not resolve operator "+opToString(m_op)+".");
   }
-  return &(m_samples);
+  return &(m_samples_r);
+}
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeReductionCplx(int tid, int sampleNo, size_t& roffset) const
+{
+        // we assume that any collapsing has been done before we get here
+        // since we only have one argument we don't need to think about only
+        // processing single points.
+        // we will also know we won't get identity nodes
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveReductionCplx should only be called on expanded Data.");
+  }
+  if (m_op==IDENTITY)
+  {
+    throw DataException("Programmer error - resolveNodeReductionCplx should not be called on identity nodes.");
+  }
+  throw DataException("Programmer error - reduction operations MIN and MAX not supported for complex values.");
 }
 
+
 const DataTypes::RealVectorType*
 DataLazy::resolveNodeNP1OUT(int tid, int sampleNo, size_t& roffset) const
 {
@@ -1095,7 +1411,82 @@ DataLazy::resolveNodeNP1OUT(int tid, int sampleNo, size_t& roffset) const
     case SYM:
         for (loop=0;loop<numsteps;++loop)
         {
-            escript::symmetric(*leftres,m_left->getShape(),subroffset, m_samples, getShape(), offset);
+            escript::symmetric(*leftres,m_left->getShape(),subroffset, m_samples_r, getShape(), offset);
+            subroffset+=step;
+            offset+=step;
+        }
+        break;
+    case NSYM:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::antisymmetric(*leftres,m_left->getShape(),subroffset, m_samples_r, getShape(), offset);
+            subroffset+=step;
+            offset+=step;
+        }
+        break;
+    default:
+        throw DataException("Programmer error - resolveNP1OUT can not resolve operator "+opToString(m_op)+".");
+  }
+  return &m_samples_r;
+}
+
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeUnary_C(int tid, int sampleNo, size_t& roffset) const
+{
+        // we assume that any collapsing has been done before we get here
+        // since we only have one argument we don't need to think about only
+        // processing single points.
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveNodeUnaryC should only be called on expanded Data.");
+  }
+  if (m_op==IDENTITY)
+  {
+    throw DataException("Programmer error - resolveNodeUnaryC should not be called on identity nodes.");
+  }
+  if (m_op!=PROM)
+  {
+    throw DataException("Programmer error - resolveNodeUnaryC can not resolve operator "+opToString(m_op)+".");
+  }
+  const DataTypes::RealVectorType* leftres=m_left->resolveNodeSample(tid, sampleNo, roffset);
+  const real_t* left=&((*leftres)[roffset]);
+  roffset=m_samplesize*tid;
+  cplx_t* result=&(m_samples_c[roffset]);
+  // rather than calling the tensor_unary_array_operation, I'm just coding this one here
+  for (int i = 0; i < m_samplesize; ++i) {
+    result[i] = static_cast<cplx_t>(left[i]);
+  }
+  return &(m_samples_c);  
+}
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeNP1OUTCplx(int tid, int sampleNo, size_t& roffset) const
+{
+        // we assume that any collapsing has been done before we get here
+        // since we only have one argument we don't need to think about only
+        // processing single points.
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveNodeNP1OUT should only be called on expanded Data.");
+  }
+  if (m_op==IDENTITY)
+  {
+    throw DataException("Programmer error - resolveNodeNP1OUT should not be called on identity nodes.");
+  }
+  size_t subroffset;
+  const CplxVectorType* leftres=m_left->resolveNodeSampleCplx(tid, sampleNo, subroffset);
+  roffset=m_samplesize*tid;
+  size_t loop=0;
+  size_t numsteps=(m_readytype=='E')?getNumDPPSample():1;
+  size_t step=getNoValues();
+  size_t offset=roffset;
+  switch (m_op)
+  {
+    case SYM:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::symmetric(*leftres,m_left->getShape(),subroffset, m_samples_c, getShape(), offset);
             subroffset+=step;
             offset+=step;
         }
@@ -1103,7 +1494,23 @@ DataLazy::resolveNodeNP1OUT(int tid, int sampleNo, size_t& roffset) const
     case NSYM:
         for (loop=0;loop<numsteps;++loop)
         {
-            escript::antisymmetric(*leftres,m_left->getShape(),subroffset, m_samples, getShape(), offset);
+            escript::antisymmetric(*leftres,m_left->getShape(),subroffset, m_samples_c, getShape(), offset);
+            subroffset+=step;
+            offset+=step;
+        }
+        break;
+    case HER:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::hermitian(*leftres,m_left->getShape(),subroffset, m_samples_c, getShape(), offset);
+            subroffset+=step;
+            offset+=step;
+        }
+        break;
+    case NHER:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::antihermitian(*leftres,m_left->getShape(),subroffset, m_samples_c, getShape(), offset);
             subroffset+=step;
             offset+=step;
         }
@@ -1111,7 +1518,7 @@ DataLazy::resolveNodeNP1OUT(int tid, int sampleNo, size_t& roffset) const
     default:
         throw DataException("Programmer error - resolveNP1OUT can not resolve operator "+opToString(m_op)+".");
   }
-  return &m_samples;
+  return &m_samples_c;
 }
 
 const DataTypes::RealVectorType*
@@ -1142,7 +1549,7 @@ DataLazy::resolveNodeNP1OUT_P(int tid, int sampleNo, size_t& roffset) const
     case TRACE:
         for (loop=0;loop<numsteps;++loop)
         {
-            escript::trace(*leftres,m_left->getShape(),subroffset, m_samples ,getShape(),offset,m_axis_offset);
+            escript::trace(*leftres,m_left->getShape(),subroffset, m_samples_r ,getShape(),offset,m_axis_offset);
             subroffset+=instep;
             offset+=outstep;
         }
@@ -1150,7 +1557,7 @@ DataLazy::resolveNodeNP1OUT_P(int tid, int sampleNo, size_t& roffset) const
     case TRANS:
         for (loop=0;loop<numsteps;++loop)
         {
-            escript::transpose(*leftres,m_left->getShape(),subroffset, m_samples, getShape(),offset,m_axis_offset);
+            escript::transpose(*leftres,m_left->getShape(),subroffset, m_samples_r, getShape(),offset,m_axis_offset);
             subroffset+=instep;
             offset+=outstep;
         }
@@ -1158,24 +1565,26 @@ DataLazy::resolveNodeNP1OUT_P(int tid, int sampleNo, size_t& roffset) const
     default:
         throw DataException("Programmer error - resolveNP1OUTP can not resolve operator "+opToString(m_op)+".");
   }
-  return &m_samples;
+  return &m_samples_r;
 }
 
-
-const DataTypes::RealVectorType*
-DataLazy::resolveNodeNP1OUT_2P(int tid, int sampleNo, size_t& roffset) const
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeNP1OUT_PCplx(int tid, int sampleNo, size_t& roffset) const
 {
+        // we assume that any collapsing has been done before we get here
+        // since we only have one argument we don't need to think about only
+        // processing single points.
   if (m_readytype!='E')
   {
-    throw DataException("Programmer error - resolveNodeNP1OUT_2P should only be called on expanded Data.");
+    throw DataException("Programmer error - resolveNodeNP1OUT_P should only be called on expanded Data.");
   }
   if (m_op==IDENTITY)
   {
-    throw DataException("Programmer error - resolveNodeNP1OUT_2P should not be called on identity nodes.");
+    throw DataException("Programmer error - resolveNodeNP1OUT_P should not be called on identity nodes.");
   }
   size_t subroffset;
   size_t offset;
-  const RealVectorType* leftres=m_left->resolveNodeSample(tid, sampleNo, subroffset);
+  const CplxVectorType* leftres=m_left->resolveNodeSampleCplx(tid, sampleNo, subroffset);
   roffset=m_samplesize*tid;
   offset=roffset;
   size_t loop=0;
@@ -1184,18 +1593,99 @@ DataLazy::resolveNodeNP1OUT_2P(int tid, int sampleNo, size_t& roffset) const
   size_t instep=m_left->getNoValues();
   switch (m_op)
   {
-    case SWAP:
+    case TRACE:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::trace(*leftres,m_left->getShape(),subroffset, m_samples_c ,getShape(),offset,m_axis_offset);
+            subroffset+=instep;
+            offset+=outstep;
+        }
+        break;
+    case TRANS:
         for (loop=0;loop<numsteps;++loop)
         {
-            escript::swapaxes(*leftres,m_left->getShape(),subroffset, m_samples, getShape(),offset, m_axis_offset, m_transpose);
+            escript::transpose(*leftres,m_left->getShape(),subroffset, m_samples_c, getShape(),offset,m_axis_offset);
             subroffset+=instep;
             offset+=outstep;
         }
         break;
     default:
-        throw DataException("Programmer error - resolveNodeNP1OUT2P can not resolve operator "+opToString(m_op)+".");
+        throw DataException("Programmer error - resolveNP1OUTP can not resolve operator "+opToString(m_op)+".");
   }
-  return &m_samples;
+  return &m_samples_c;
+}
+
+const DataTypes::RealVectorType*
+DataLazy::resolveNodeNP1OUT_2P(int tid, int sampleNo, size_t& roffset) const
+{
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveNodeNP1OUT_2P should only be called on expanded Data.");
+  }
+  if (m_op==IDENTITY)
+  {
+    throw DataException("Programmer error - resolveNodeNP1OUT_2P should not be called on identity nodes.");
+  }
+  size_t subroffset;
+  size_t offset;
+  const RealVectorType* leftres=m_left->resolveNodeSample(tid, sampleNo, subroffset);
+  roffset=m_samplesize*tid;
+  offset=roffset;
+  size_t loop=0;
+  size_t numsteps=(m_readytype=='E')?getNumDPPSample():1;
+  size_t outstep=getNoValues();
+  size_t instep=m_left->getNoValues();
+  switch (m_op)
+  {
+    case SWAP:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::swapaxes(*leftres,m_left->getShape(),subroffset, m_samples_r, getShape(),offset, m_axis_offset, m_transpose);
+            subroffset+=instep;
+            offset+=outstep;
+        }
+        break;
+    default:
+        throw DataException("Programmer error - resolveNodeNP1OUT2P can not resolve operator "+opToString(m_op)+".");
+  }
+  return &m_samples_r;
+}
+
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeNP1OUT_2PCplx(int tid, int sampleNo, size_t& roffset) const
+{
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveNodeNP1OUT_2P should only be called on expanded Data.");
+  }
+  if (m_op==IDENTITY)
+  {
+    throw DataException("Programmer error - resolveNodeNP1OUT_2P should not be called on identity nodes.");
+  }
+  size_t subroffset;
+  size_t offset;
+  const CplxVectorType* leftres=m_left->resolveNodeSampleCplx(tid, sampleNo, subroffset);
+  roffset=m_samplesize*tid;
+  offset=roffset;
+  size_t loop=0;
+  size_t numsteps=(m_readytype=='E')?getNumDPPSample():1;
+  size_t outstep=getNoValues();
+  size_t instep=m_left->getNoValues();
+  switch (m_op)
+  {
+    case SWAP:
+        for (loop=0;loop<numsteps;++loop)
+        {
+            escript::swapaxes(*leftres,m_left->getShape(),subroffset, m_samples_c, getShape(),offset, m_axis_offset, m_transpose);
+            subroffset+=instep;
+            offset+=outstep;
+        }
+        break;
+    default:
+        throw DataException("Programmer error - resolveNodeNP1OUT2P can not resolve operator "+opToString(m_op)+".");
+  }
+  return &m_samples_c;
 }
 
 const DataTypes::RealVectorType*
@@ -1227,12 +1717,48 @@ DataLazy::resolveNodeCondEval(int tid, int sampleNo, size_t& roffset) const
   roffset=m_samplesize*tid;
   for (int i=0;i<m_samplesize;++i)
   {
-        m_samples[roffset+i]=(*srcres)[subroffset+i];   
+        m_samples_r[roffset+i]=(*srcres)[subroffset+i];   
+  }
+
+  return &m_samples_r;
+}
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeCondEvalCplx(int tid, int sampleNo, size_t& roffset) const
+{
+  if (m_readytype!='E')
+  {
+    throw DataException("Programmer error - resolveNodeCondEval should only be called on expanded Data.");
+  }
+  if (m_op!=CONDEVAL)
+  {
+    throw DataException("Programmer error - resolveNodeCondEval should only be called on CONDEVAL nodes.");
+  }
+  size_t subroffset;
+
+  const RealVectorType* maskres=m_mask->resolveNodeSample(tid, sampleNo, subroffset);
+  const CplxVectorType* srcres=0;
+  if ((*maskres)[subroffset]>0)
+  {
+        srcres=m_left->resolveNodeSampleCplx(tid, sampleNo, subroffset);
+  }
+  else
+  {
+        srcres=m_right->resolveNodeSampleCplx(tid, sampleNo, subroffset);
+  }
+
+  // Now we need to copy the result
+
+  roffset=m_samplesize*tid;
+  for (int i=0;i<m_samplesize;++i)
+  {
+        m_samples_c[roffset+i]=(*srcres)[subroffset+i];   
   }
 
-  return &m_samples;
+  return &m_samples_c;
 }
 
+
 // This method assumes that any subexpressions which evaluate to Constant or Tagged Data
 // have already been collapsed to IDENTITY. So we must have at least one expanded child.
 // If both children are expanded, then we can process them in a single operation (we treat
@@ -1370,12 +1896,235 @@ LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
 
 
   roffset=m_samplesize*tid;
-  double* resultp=&(m_samples[roffset]);                // results are stored at the vector offset we received
+  double* resultp=&(m_samples_r[roffset]);                // results are stored at the vector offset we received
+  switch(m_op)
+  {
+    case ADD:
+        //PROC_OP(NO_ARG,plus<double>());
+      escript::binaryOpVectorLazyArithmeticHelper<real_t, real_t, real_t>(resultp, 
+			 &(*left)[0],
+			 &(*right)[0],
+			 chunksize,
+			 onumsteps,
+			 numsteps,
+			 resultStep,
+			 leftstep,
+			 rightstep,
+			 oleftstep,
+			 orightstep,
+			 lroffset,
+			 rroffset,
+			 escript::ES_optype::ADD);	
+        break;
+    case SUB:
+      escript::binaryOpVectorLazyArithmeticHelper<real_t, real_t, real_t>(resultp, 
+			 &(*left)[0],
+			 &(*right)[0],
+			 chunksize,
+			 onumsteps,
+			 numsteps,
+			 resultStep,
+			 leftstep,
+			 rightstep,
+			 oleftstep,
+			 orightstep,
+			 lroffset,
+			 rroffset,
+			 escript::ES_optype::SUB);	      
+        //PROC_OP(NO_ARG,minus<double>());
+        break;
+    case MUL:
+        //PROC_OP(NO_ARG,multiplies<double>());
+      escript::binaryOpVectorLazyArithmeticHelper<real_t, real_t, real_t>(resultp, 
+			 &(*left)[0],
+			 &(*right)[0],
+			 chunksize,
+			 onumsteps,
+			 numsteps,
+			 resultStep,
+			 leftstep,
+			 rightstep,
+			 oleftstep,
+			 orightstep,
+			 lroffset,
+			 rroffset,
+			 escript::ES_optype::MUL);	      
+        break;
+    case DIV:
+        //PROC_OP(NO_ARG,divides<double>());
+      escript::binaryOpVectorLazyArithmeticHelper<real_t, real_t, real_t>(resultp, 
+			 &(*left)[0],
+			 &(*right)[0],
+			 chunksize,
+			 onumsteps,
+			 numsteps,
+			 resultStep,
+			 leftstep,
+			 rightstep,
+			 oleftstep,
+			 orightstep,
+			 lroffset,
+			 rroffset,
+			 escript::ES_optype::DIV);	      
+        break;
+    case POW:
+       //PROC_OP(double (double,double),::pow);
+      escript::binaryOpVectorLazyArithmeticHelper<real_t, real_t, real_t>(resultp, 
+			 &(*left)[0],
+			 &(*right)[0],
+			 chunksize,
+			 onumsteps,
+			 numsteps,
+			 resultStep,
+			 leftstep,
+			 rightstep,
+			 oleftstep,
+			 orightstep,
+			 lroffset,
+			 rroffset,
+			 escript::ES_optype::POW);	      
+        break;
+    default:
+        throw DataException("Programmer error - resolveBinary can not resolve operator "+opToString(m_op)+".");
+  }
+LAZYDEBUG(cout << "Result res[" << roffset<< "]" << m_samples_r[roffset] << endl;)
+  return &m_samples_r;
+}
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeBinaryCplx(int tid, int sampleNo, size_t& roffset) const
+{
+LAZYDEBUG(cout << "Resolve binary: " << toString() << endl;)
+
+  size_t lroffset=0, rroffset=0;        // offsets in the left and right result vectors
+        // first work out which of the children are expanded
+  bool leftExp=(m_left->m_readytype=='E');
+  bool rightExp=(m_right->m_readytype=='E');
+  if (!leftExp && !rightExp)
+  {
+        throw DataException("Programmer Error - please use collapse if neither argument has type 'E'.");
+  }
+  bool leftScalar=(m_left->getRank()==0);
+  bool rightScalar=(m_right->getRank()==0);
+  if ((m_left->getRank()!=m_right->getRank()) && (!leftScalar && !rightScalar))
+  {
+        throw DataException("resolveBinary - ranks of arguments must match unless one of them is scalar."); 
+  }
+  size_t leftsize=m_left->getNoValues();
+  size_t rightsize=m_right->getNoValues();
+  size_t chunksize=1;                   // how many doubles will be processed in one go
+  int leftstep=0;               // how far should the left offset advance after each step
+  int rightstep=0;
+  int numsteps=0;               // total number of steps for the inner loop
+  int oleftstep=0;      // the o variables refer to the outer loop
+  int orightstep=0;     // The outer loop is only required in cases where there is an extended scalar
+  int onumsteps=1;
+  
+  bool LES=(leftExp && leftScalar);     // Left is an expanded scalar
+  bool RES=(rightExp && rightScalar);
+  bool LS=(!leftExp && leftScalar);     // left is a single scalar
+  bool RS=(!rightExp && rightScalar);
+  bool LN=(!leftExp && !leftScalar);    // left is a single non-scalar
+  bool RN=(!rightExp && !rightScalar);
+  bool LEN=(leftExp && !leftScalar);    // left is an expanded non-scalar
+  bool REN=(rightExp && !rightScalar);
+
+  if ((LES && RES) || (LEN && REN))     // both are Expanded scalars or both are expanded non-scalars
+  {
+        chunksize=m_left->getNumDPPSample()*leftsize;
+        leftstep=0;
+        rightstep=0;
+        numsteps=1;
+  }
+  else if (LES || RES)
+  {
+        chunksize=1;
+        if (LES)                // left is an expanded scalar
+        {
+                if (RS)
+                {
+                   leftstep=1;
+                   rightstep=0;
+                   numsteps=m_left->getNumDPPSample();
+                }
+                else            // RN or REN
+                {
+                   leftstep=0;
+                   oleftstep=1;
+                   rightstep=1;
+                   orightstep=(RN ? -(int)rightsize : 0);
+                   numsteps=rightsize;
+                   onumsteps=m_left->getNumDPPSample();
+                }
+        }
+        else            // right is an expanded scalar
+        {
+                if (LS)
+                {
+                   rightstep=1;
+                   leftstep=0;
+                   numsteps=m_right->getNumDPPSample();
+                }
+                else
+                {
+                   rightstep=0;
+                   orightstep=1;
+                   leftstep=1;
+                   oleftstep=(LN ? -(int)leftsize : 0);
+                   numsteps=leftsize;
+                   onumsteps=m_right->getNumDPPSample();
+                }
+        }
+  }
+  else  // this leaves (LEN, RS), (LEN, RN) and their transposes
+  {
+        if (LEN)        // and Right will be a single value 
+        {
+                chunksize=rightsize;
+                leftstep=rightsize;
+                rightstep=0;
+                numsteps=m_left->getNumDPPSample();
+                if (RS)
+                {
+                   numsteps*=leftsize;
+                }
+        }
+        else    // REN
+        {
+                chunksize=leftsize;
+                rightstep=leftsize;
+                leftstep=0;
+                numsteps=m_right->getNumDPPSample();
+                if (LS)
+                {
+                   numsteps*=rightsize;
+                }
+        }
+  }
+
+  int resultStep=max(leftstep,rightstep);       // only one (at most) should be !=0
+        // Get the values of sub-expressions
+  const CplxVectorType* left=m_left->resolveNodeSampleCplx(tid,sampleNo,lroffset);       
+  const CplxVectorType* right=m_right->resolveNodeSampleCplx(tid,sampleNo,rroffset);
+LAZYDEBUG(cout << "Post sub calls in " << toString() << endl;)
+LAZYDEBUG(cout << "shapes=" << DataTypes::shapeToString(m_left->getShape()) << "," << DataTypes::shapeToString(m_right->getShape()) << endl;)
+LAZYDEBUG(cout << "chunksize=" << chunksize << endl << "leftstep=" << leftstep << " rightstep=" << rightstep;)
+LAZYDEBUG(cout << " numsteps=" << numsteps << endl << "oleftstep=" << oleftstep << " orightstep=" << orightstep;)
+LAZYDEBUG(cout << "onumsteps=" << onumsteps << endl;)
+LAZYDEBUG(cout << " DPPS=" << m_left->getNumDPPSample() << "," <<m_right->getNumDPPSample() << endl;)
+LAZYDEBUG(cout << "" << LS << RS << LN << RN << LES << RES <<LEN << REN <<   endl;)
+
+LAZYDEBUG(cout << "Left res["<< lroffset<< "]=" << (*left)[lroffset] << endl;)
+LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
+
+
+  roffset=m_samplesize*tid;
+  cplx_t* resultp=&(m_samples_c[roffset]);                // results are stored at the vector offset we received
   switch(m_op)
   {
     case ADD:
         //PROC_OP(NO_ARG,plus<double>());
-      escript::binaryOpVectorLazyHelper<real_t, real_t, real_t>(resultp, 
+      escript::binaryOpVectorLazyArithmeticHelper<cplx_t, cplx_t, cplx_t>(resultp, 
 			 &(*left)[0],
 			 &(*right)[0],
 			 chunksize,
@@ -1391,7 +2140,7 @@ LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
 			 escript::ES_optype::ADD);	
         break;
     case SUB:
-      escript::binaryOpVectorLazyHelper<real_t, real_t, real_t>(resultp, 
+      escript::binaryOpVectorLazyArithmeticHelper<cplx_t, cplx_t, cplx_t>(resultp, 
 			 &(*left)[0],
 			 &(*right)[0],
 			 chunksize,
@@ -1409,7 +2158,7 @@ LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
         break;
     case MUL:
         //PROC_OP(NO_ARG,multiplies<double>());
-      escript::binaryOpVectorLazyHelper<real_t, real_t, real_t>(resultp, 
+      escript::binaryOpVectorLazyArithmeticHelper<cplx_t, cplx_t, cplx_t>(resultp, 
 			 &(*left)[0],
 			 &(*right)[0],
 			 chunksize,
@@ -1426,7 +2175,7 @@ LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
         break;
     case DIV:
         //PROC_OP(NO_ARG,divides<double>());
-      escript::binaryOpVectorLazyHelper<real_t, real_t, real_t>(resultp, 
+      escript::binaryOpVectorLazyArithmeticHelper<cplx_t, cplx_t, cplx_t>(resultp, 
 			 &(*left)[0],
 			 &(*right)[0],
 			 chunksize,
@@ -1443,7 +2192,7 @@ LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
         break;
     case POW:
        //PROC_OP(double (double,double),::pow);
-      escript::binaryOpVectorLazyHelper<real_t, real_t, real_t>(resultp, 
+      escript::binaryOpVectorLazyArithmeticHelper<cplx_t, cplx_t, cplx_t>(resultp, 
 			 &(*left)[0],
 			 &(*right)[0],
 			 chunksize,
@@ -1461,8 +2210,8 @@ LAZYDEBUG(cout << "Right res["<< rroffset<< "]=" << (*right)[rroffset] << endl;)
     default:
         throw DataException("Programmer error - resolveBinary can not resolve operator "+opToString(m_op)+".");
   }
-LAZYDEBUG(cout << "Result res[" << roffset<< "]" << m_samples[roffset] << endl;)
-  return &m_samples;
+LAZYDEBUG(cout << "Result res[" << roffset<< "]" << m_samples_c[roffset] << endl;)
+  return &m_samples_c;
 }
 
 
@@ -1473,7 +2222,6 @@ const DataTypes::RealVectorType*
 DataLazy::resolveNodeTProd(int tid, int sampleNo, size_t& roffset) const
 {
 LAZYDEBUG(cout << "Resolve TensorProduct: " << toString() << endl;)
-
   size_t lroffset=0, rroffset=0;        // offsets in the left and right result vectors
         // first work out which of the children are expanded
   bool leftExp=(m_left->m_readytype=='E');
@@ -1485,11 +2233,8 @@ LAZYDEBUG(cout << "Resolve TensorProduct: " << toString() << endl;)
   int resultStep=getNoValues();
   roffset=m_samplesize*tid;
   size_t offset=roffset;
-
   const RealVectorType* left=m_left->resolveNodeSample(tid, sampleNo, lroffset);
-
   const RealVectorType* right=m_right->resolveNodeSample(tid, sampleNo, rroffset);
-
 LAZYDEBUG(cerr << "[Left shape]=" << DataTypes::shapeToString(m_left->getShape()) << "\n[Right shape]=" << DataTypes::shapeToString(m_right->getShape()) << " result=" <<DataTypes::shapeToString(getShape()) <<  endl;
 cout << getNoValues() << endl;)
 
@@ -1502,7 +2247,7 @@ LAZYDEBUG(cout << "m_samplesize=" << m_samplesize << endl;)
 LAZYDEBUG(cout << "outputshape=" << DataTypes::shapeToString(getShape()) << endl;)
 LAZYDEBUG(cout << "DPPS=" << m_right->getNumDPPSample() <<"."<<endl;)
 
-  double* resultp=&(m_samples[offset]);         // results are stored at the vector offset we received
+  double* resultp=&(m_samples_r[offset]);         // results are stored at the vector offset we received
   switch(m_op)
   {
     case PROD:
@@ -1524,9 +2269,66 @@ LAZYDEBUG(cout << DataTypes::pointToString(*right,m_right->getShape(),rroffset,
         throw DataException("Programmer error - resolveTProduct can not resolve operator "+opToString(m_op)+".");
   }
   roffset=offset;
-  return &m_samples;
+  return &m_samples_r;
 }
 
+const DataTypes::CplxVectorType*
+DataLazy::resolveNodeTProdCplx(int tid, int sampleNo, size_t& roffset) const
+{
+LAZYDEBUG(cout << "Resolve TensorProduct: " << toString() << endl;)
+
+  size_t lroffset=0, rroffset=0;        // offsets in the left and right result vectors
+        // first work out which of the children are expanded
+  bool leftExp=(m_left->m_readytype=='E');
+  bool rightExp=(m_right->m_readytype=='E');
+  int steps=getNumDPPSample();
+  int leftStep=(leftExp? m_left->getNoValues() : 0);            // do not have scalars as input to this method
+  int rightStep=(rightExp?m_right->getNoValues() : 0);
+
+  int resultStep=getNoValues();
+  roffset=m_samplesize*tid;
+  size_t offset=roffset;
+
+  const CplxVectorType* left=m_left->resolveNodeSampleCplx(tid, sampleNo, lroffset);
+
+  const CplxVectorType* right=m_right->resolveNodeSampleCplx(tid, sampleNo, rroffset);
+
+LAZYDEBUG(cerr << "[Left shape]=" << DataTypes::shapeToString(m_left->getShape()) << "\n[Right shape]=" << DataTypes::shapeToString(m_right->getShape()) << " result=" <<DataTypes::shapeToString(getShape()) <<  endl;
+cout << getNoValues() << endl;)
+
+
+LAZYDEBUG(cerr << "Post sub calls: " << toString() << endl;)
+LAZYDEBUG(cout << "LeftExp=" << leftExp << " rightExp=" << rightExp << endl;)
+LAZYDEBUG(cout << "LeftR=" << m_left->getRank() << " rightExp=" << m_right->getRank() << endl;)
+LAZYDEBUG(cout << "LeftSize=" << m_left->getNoValues() << " RightSize=" << m_right->getNoValues() << endl;)
+LAZYDEBUG(cout << "m_samplesize=" << m_samplesize << endl;)
+LAZYDEBUG(cout << "outputshape=" << DataTypes::shapeToString(getShape()) << endl;)
+LAZYDEBUG(cout << "DPPS=" << m_right->getNumDPPSample() <<"."<<endl;)
+
+  cplx_t* resultp=&(m_samples_c[offset]);         // results are stored at the vector offset we received
+  switch(m_op)
+  {
+    case PROD:
+        for (int i=0;i<steps;++i,resultp+=resultStep)
+        {
+          const cplx_t *ptr_0 = &((*left)[lroffset]);
+          const cplx_t *ptr_1 = &((*right)[rroffset]);
+
+LAZYDEBUG(cout << DataTypes::pointToString(*left, m_left->getShape(),lroffset,"LEFT") << endl;)
+LAZYDEBUG(cout << DataTypes::pointToString(*right,m_right->getShape(),rroffset, "RIGHT") << endl;)
+
+          matrix_matrix_product(m_SL, m_SM, m_SR, ptr_0, ptr_1, resultp, m_transpose);
+
+          lroffset+=leftStep;
+          rroffset+=rightStep;
+        }
+        break;
+    default:
+        throw DataException("Programmer error - resolveTProduct can not resolve operator "+opToString(m_op)+".");
+  }
+  roffset=offset;
+   return &m_samples_c;
+}
 
 const DataTypes::RealVectorType*
 DataLazy::resolveSample(int sampleNo, size_t& roffset) const
@@ -1555,19 +2357,80 @@ cout << "Max resolve Stack use " << d << endl;
 }
 
 
+const DataTypes::RealVectorType*
+DataLazy::resolveTypedSample(int sampleNo, size_t& roffset, DataTypes::real_t dummy) const
+{
+#ifdef _OPENMP
+        int tid=omp_get_thread_num();
+#else
+        int tid=0;
+#endif 
+
+#ifdef LAZY_STACK_PROF
+        stackstart[tid]=&tid;
+        stackend[tid]=&tid;
+        const DataTypes::RealVectorType* r=resolveNodeSample(tid, sampleNo, roffset);
+        size_t d=(size_t)stackstart[tid]-(size_t)stackend[tid];
+        #pragma omp critical
+        if (d>maxstackuse)
+        {
+cout << "Max resolve Stack use " << d << endl;
+                maxstackuse=d;
+        }
+        return r;
+#else
+        return resolveNodeSample(tid, sampleNo, roffset);
+#endif
+}
+
+const DataTypes::CplxVectorType*
+DataLazy::resolveTypedSample(int sampleNo, size_t& roffset, DataTypes::cplx_t dummy) const
+{
+#ifdef _OPENMP
+        int tid=omp_get_thread_num();
+#else
+        int tid=0;
+#endif 
+
+#ifdef LAZY_STACK_PROF
+        stackstart[tid]=&tid;
+        stackend[tid]=&tid;
+        const DataTypes::CplxVectorType* r=resolveNodeSampleCplx(tid, sampleNo, roffset);
+        size_t d=(size_t)stackstart[tid]-(size_t)stackend[tid];
+        #pragma omp critical
+        if (d>maxstackuse)
+        {
+cout << "Max resolve Stack use " << d << endl;
+                maxstackuse=d;
+        }
+        return r;
+#else
+        return resolveNodeSampleCplx(tid, sampleNo, roffset);
+#endif
+}
+
+
+
 // This needs to do the work of the identity constructor
 void
 DataLazy::resolveToIdentity()
 {
    if (m_op==IDENTITY)
         return;
-   DataReady_ptr p=resolveNodeWorker();
-   makeIdentity(p);
+   if (isComplex())
+   {
+        DataReady_ptr p=resolveNodeWorkerCplx();
+        makeIdentity(p);
+   }
+   else
+   {
+        DataReady_ptr p=resolveNodeWorker();
+        makeIdentity(p);
+   }
 }
 
 void DataLazy::makeIdentity(const DataReady_ptr& p)
 {
-   m_op=IDENTITY;
    m_axis_offset=0;
    m_transpose=0;
    m_SL=m_SM=m_SR=0;
@@ -1580,6 +2443,9 @@ void DataLazy::makeIdentity(const DataReady_ptr& p)
    m_samplesize=p->getNumDPPSample()*p->getNoValues();
    m_left.reset();
    m_right.reset();
+   m_iscompl=p->isComplex();
+   m_op=IDENTITY;
+   m_opgroup=getOpgroup(m_op);
 }
 
 
@@ -1729,6 +2595,65 @@ LAZYDEBUG(cout << "Final res[" << roffset<< "]=" << (*res)[roffset] << (*res)[ro
   return resptr;
 }
 
+// This version should only be called on complex lazy nodes
+DataReady_ptr
+DataLazy::resolveNodeWorkerCplx()
+{
+  if (m_readytype!='E')         // if the whole sub-expression is Constant or Tagged, then evaluate it normally
+  {
+    collapse();
+  }
+  if (m_op==IDENTITY)           // So a lazy expression of Constant or Tagged data will be returned here. 
+  {
+    return m_id;
+  }
+        // from this point on we must have m_op!=IDENTITY and m_readytype=='E'
+  DataExpanded* result=new DataExpanded(getFunctionSpace(),getShape(),  CplxVectorType(getNoValues()));
+  CplxVectorType& resvec=result->getVectorRWC();
+  DataReady_ptr resptr=DataReady_ptr(result);
+
+  int sample;
+  int totalsamples=getNumSamples();
+  const CplxVectorType* res=0;       // Storage for answer
+LAZYDEBUG(cout << "Total number of samples=" <<totalsamples << endl;)
+  #pragma omp parallel private(sample,res)
+  {
+        size_t roffset=0;
+#ifdef LAZY_STACK_PROF
+        stackstart[omp_get_thread_num()]=&roffset;
+        stackend[omp_get_thread_num()]=&roffset;
+#endif
+        #pragma omp for schedule(static)
+        for (sample=0;sample<totalsamples;++sample)
+        {
+                roffset=0;
+#ifdef _OPENMP
+                res=resolveNodeSampleCplx(omp_get_thread_num(),sample,roffset);
+#else
+                res=resolveNodeSampleCplx(0,sample,roffset);
+#endif
+LAZYDEBUG(cout << "Sample #" << sample << endl;)
+LAZYDEBUG(cout << "Final res[" << roffset<< "]=" << (*res)[roffset] << (*res)[roffset]<< endl; )
+                CplxVectorType::size_type outoffset=result->getPointOffset(sample,0);
+                memcpy(&(resvec[outoffset]),&((*res)[roffset]),m_samplesize*sizeof(CplxVectorType::ElementType));
+        }
+  }
+#ifdef LAZY_STACK_PROF
+  for (int i=0;i<getNumberOfThreads();++i)
+  {
+        size_t r=((size_t)stackstart[i] - (size_t)stackend[i]);
+//      cout << i << " " << stackstart[i] << " .. " << stackend[i] << " = " <<  r << endl;
+        if (r>maxstackuse)
+        {
+                maxstackuse=r;
+        }
+  }
+  cout << "Max resolve Stack use=" << maxstackuse << endl;
+#endif
+  return resptr;
+}
+
+
 std::string
 DataLazy::toString() const
 {
@@ -1754,7 +2679,7 @@ void
 DataLazy::intoString(ostringstream& oss) const
 {
 //    oss << "[" << m_children <<";"<<m_height <<"]";
-  switch (getOpgroup(m_op))
+  switch (m_opgroup)
   {
   case G_IDENTITY:
         if (m_id->isExpanded())
@@ -1773,6 +2698,10 @@ DataLazy::intoString(ostringstream& oss) const
         {
           oss << "?";
         }
+        if (m_id->isComplex())
+        {
+          oss << "j";  
+        }
         oss << '@' << m_id.get();
         break;
   case G_BINARY:
@@ -1781,15 +2710,25 @@ DataLazy::intoString(ostringstream& oss) const
         oss << ' ' << opToString(m_op) << ' ';
         m_right->intoString(oss);
         oss << ')';
+        if (isComplex())
+        {
+            oss << "j";
+        }            
         break;
   case G_UNARY:
   case G_UNARY_P:
+  case G_UNARY_PR:
+  case G_UNARY_R:
   case G_NP1OUT:
   case G_NP1OUT_P:
   case G_REDUCTION:
         oss << opToString(m_op) << '(';
         m_left->intoString(oss);
         oss << ')';
+        if (isComplex())
+        {
+            oss << "j";
+        }                    
         break;
   case G_TENSORPROD:
         oss << opToString(m_op) << '(';
@@ -1797,12 +2736,20 @@ DataLazy::intoString(ostringstream& oss) const
         oss << ", ";
         m_right->intoString(oss);
         oss << ')'; 
+        if (isComplex())
+        {
+            oss << "j";
+        }                    
         break;
   case G_NP1OUT_2P:
         oss << opToString(m_op) << '(';
         m_left->intoString(oss);
         oss << ", " << m_axis_offset << ", " << m_transpose;
         oss << ')';
+        if (isComplex())
+        {
+            oss << "j";
+        }                    
         break;
   case G_CONDEVAL:
         oss << opToString(m_op)<< '(' ;
@@ -1812,9 +2759,26 @@ DataLazy::intoString(ostringstream& oss) const
         oss << " : ";
         m_right->intoString(oss); 
         oss << ')';
+        if (isComplex())
+        {
+            oss << "j";
+        }                    
+        break;
+  case G_UNARY_C:
+        oss << opToString(m_op) <<'(';
+        m_left->intoString(oss);
+        oss << ')';
+        if (isComplex())
+        {
+            oss << "j";
+        }                    
         break;
   default:
         oss << "UNKNOWN";
+        if (isComplex())
+        {
+            oss << "j";
+        }                    
   }
 }
 
@@ -1823,7 +2787,8 @@ void
 DataLazy::intoTreeString(ostringstream& oss, string indent) const
 {
   oss << '[' << m_rank << ':' << setw(3) << m_samplesize << "] " << indent;
-  switch (getOpgroup(m_op))
+  ES_opgroup gop=m_opgroup;
+  switch (gop)
   {
   case G_IDENTITY:
         if (m_id->isExpanded())
@@ -1842,36 +2807,68 @@ DataLazy::intoTreeString(ostringstream& oss, string indent) const
         {
           oss << "?";
         }
+        if (isComplex())
+        {
+            oss << "j";
+        }
         oss << '@' << m_id.get() << endl;
         break;
   case G_BINARY:
-        oss << opToString(m_op) << endl;
+        oss << opToString(m_op);
+        if (isComplex())
+        {
+            oss << 'j';
+        }
+        oss << endl;
         indent+='.';
         m_left->intoTreeString(oss, indent);
         m_right->intoTreeString(oss, indent);
         break;
   case G_UNARY:
   case G_UNARY_P:
+  case G_UNARY_PR:      
+  case G_UNARY_R:      
   case G_NP1OUT:
   case G_NP1OUT_P:
   case G_REDUCTION:
-        oss << opToString(m_op) << endl;
+  case G_UNARY_C:
+        oss << opToString(m_op);
+        if (isComplex())
+        {
+            oss << 'j';
+        }
+        oss << endl;
         indent+='.';
         m_left->intoTreeString(oss, indent);
         break;
   case G_TENSORPROD:
-        oss << opToString(m_op) << endl;
+        oss << opToString(m_op);
+        if (isComplex())
+        {
+            oss << 'j';
+        }
+        oss << endl;
         indent+='.';
         m_left->intoTreeString(oss, indent);
         m_right->intoTreeString(oss, indent);
         break;
   case G_NP1OUT_2P:
-        oss << opToString(m_op) << ", " << m_axis_offset << ", " << m_transpose<< endl;
+        oss << opToString(m_op);
+        if (isComplex())
+        {
+            oss << 'j';
+        }
+        oss << ", " << m_axis_offset << ", " << m_transpose<< endl;
         indent+='.';
         m_left->intoTreeString(oss, indent);
         break;
   default:
         oss << "UNKNOWN";
+        if (isComplex())
+        {
+            oss << 'j';
+        }
+        oss << endl;                
   }
 }
 
@@ -1879,23 +2876,32 @@ DataLazy::intoTreeString(ostringstream& oss, string indent) const
 DataAbstract* 
 DataLazy::deepCopy() const
 {
-  switch (getOpgroup(m_op))
+  switch (m_opgroup)
   {
   case G_IDENTITY:  return new DataLazy(m_id->deepCopy()->getPtr());
   case G_UNARY: 
+  case G_UNARY_R:
+  case G_UNARY_C:
   case G_REDUCTION:      return new DataLazy(m_left->deepCopy()->getPtr(),m_op);
+  case G_UNARY_PR:
   case G_UNARY_P:       return new DataLazy(m_left->deepCopy()->getPtr(), m_op, m_tol);
   case G_BINARY:        return new DataLazy(m_left->deepCopy()->getPtr(),m_right->deepCopy()->getPtr(),m_op);
   case G_NP1OUT: return new DataLazy(m_left->deepCopy()->getPtr(), m_right->deepCopy()->getPtr(),m_op);
   case G_TENSORPROD: return new DataLazy(m_left->deepCopy()->getPtr(), m_right->deepCopy()->getPtr(), m_op, m_axis_offset, m_transpose);
   case G_NP1OUT_P:   return new DataLazy(m_left->deepCopy()->getPtr(),m_op,  m_axis_offset);
   case G_NP1OUT_2P:  return new DataLazy(m_left->deepCopy()->getPtr(), m_op, m_axis_offset, m_transpose);
+  case G_CONDEVAL:  return new DataLazy(m_mask->deepCopy()->getPtr(), m_left->deepCopy()->getPtr(), m_right->deepCopy()->getPtr());
   default:
         throw DataException("Programmer error - do not know how to deepcopy operator "+opToString(m_op)+".");
   }
 }
 
-
+// For this, we don't care what op you were doing because the answer is now zero
+DataAbstract* 
+DataLazy::zeroedCopy() const
+{
+  return new DataLazy(m_id->zeroedCopy()->getPtr());
+}
 
 // There is no single, natural interpretation of getLength on DataLazy.
 // Instances of DataReady can look at the size of their vectors.
diff --git a/escriptcore/src/DataLazy.h b/escriptcore/src/DataLazy.h
index 0a06594..4cd97b4 100644
--- a/escriptcore/src/DataLazy.h
+++ b/escriptcore/src/DataLazy.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -155,6 +155,9 @@ public:
   DataAbstract* 
   deepCopy() const;
 
+  ESCRIPT_DLL_API
+  DataAbstract* 
+  zeroedCopy() const;  
 
   /**
      \brief
@@ -196,6 +199,15 @@ public:
   ESCRIPT_DLL_API
   const DataTypes::RealVectorType*
   resolveSample(int sampleNo, size_t& roffset) const; 
+  
+  ESCRIPT_DLL_API
+  const DataTypes::CplxVectorType*
+  resolveTypedSample(int sampleNo, size_t& roffset, DataTypes::cplx_t dummy) const; 
+  
+  ESCRIPT_DLL_API
+  const DataTypes::RealVectorType*
+  resolveTypedSample(int sampleNo, size_t& roffset, DataTypes::real_t dummy) const; 
+  
 
   /**
   \brief if resolve() was called would it produce expanded data.
@@ -219,9 +231,14 @@ public:
 
 
 private:
+  int* m_sampleids;		// may be NULL
+  mutable DataTypes::RealVectorType m_samples_r;
+  mutable DataTypes::CplxVectorType m_samples_c;     
+    
   mutable DataReady_ptr m_id;	//  For IDENTITY nodes, stores a wrapped value.
   mutable DataLazy_ptr m_left, m_right, m_mask;	// operands for operation.
   mutable ES_optype m_op;	// operation to perform.
+  mutable ES_opgroup m_opgroup; // type of operation to perform
 
   size_t m_samplesize;	// number of values required to store a sample
 
@@ -234,11 +251,10 @@ private:
 
   double m_tol;		// required extra info for <>0 and ==0
 
-  size_t m_children;
-  size_t m_height;
+  mutable size_t m_children;
+  mutable size_t m_height;
 
-  int* m_sampleids;		// may be NULL
-  mutable DataTypes::RealVectorType m_samples;  
+ 
 
   /**
   Allocates sample storage at each node
@@ -248,32 +264,66 @@ private:
 
   const DataTypes::RealVectorType*
   resolveNodeUnary(int tid, int sampleNo, size_t& roffset) const;
+  
+  const DataTypes::CplxVectorType*
+  resolveNodeUnaryCplx(int tid, int sampleNo, size_t& roffset) const;  
 
 
   const DataTypes::RealVectorType*
   resolveNodeReduction(int tid, int sampleNo, size_t& roffset) const;  
 
+  const DataTypes::CplxVectorType*
+  resolveNodeReductionCplx(int tid, int sampleNo, size_t& roffset) const;  
+  
   const DataTypes::RealVectorType*
   resolveNodeSample(int tid, int sampleNo, size_t& roffset) const;
+  
+  const DataTypes::CplxVectorType*
+  resolveNodeSampleCplx(int tid, int sampleNo, size_t& roffset) const;  
 
   const DataTypes::RealVectorType*
   resolveNodeBinary(int tid, int sampleNo, size_t& roffset) const;
+  
+  const DataTypes::CplxVectorType*
+  resolveNodeBinaryCplx(int tid, int sampleNo, size_t& roffset) const;
+  
 
   const DataTypes::RealVectorType*
   resolveNodeNP1OUT(int tid, int sampleNo, size_t& roffset) const;
 
+  const DataTypes::CplxVectorType*
+  resolveNodeNP1OUTCplx(int tid, int sampleNo, size_t& roffset) const;
+  
   const DataTypes::RealVectorType*
   resolveNodeNP1OUT_P(int tid, int sampleNo, size_t& roffset) const;
 
+  const DataTypes::CplxVectorType*
+  resolveNodeNP1OUT_PCplx(int tid, int sampleNo, size_t& roffset) const;
+  
+  
   const DataTypes::RealVectorType*
   resolveNodeTProd(int tid, int sampleNo, size_t& roffset) const;
 
+  const DataTypes::CplxVectorType*
+  resolveNodeTProdCplx(int tid, int sampleNo, size_t& roffset) const;
+
+  
   const DataTypes::RealVectorType*
   resolveNodeNP1OUT_2P(int tid, int sampleNo, size_t& roffset) const;
 
+  const DataTypes::CplxVectorType*
+  resolveNodeNP1OUT_2PCplx(int tid, int sampleNo, size_t& roffset) const;
+  
   const DataTypes::RealVectorType*
   resolveNodeCondEval(int tid, int sampleNo, size_t& roffset) const;
 
+  const DataTypes::CplxVectorType*
+  resolveNodeCondEvalCplx(int tid, int sampleNo, size_t& roffset) const;
+  
+  
+  const DataTypes::CplxVectorType*
+  resolveNodeUnary_C(int tid, int sampleNo, size_t& roffset) const;
+  
   /**
   Does the work for toString. 
   */
@@ -323,9 +373,17 @@ private:
   */
   DataReady_ptr
   resolveNodeWorker();
+  
+  DataReady_ptr
+  resolveNodeWorkerCplx();  
 
 };
 
+// If an expression is already complex, return the same expression.
+// Otherwise, return the old expression with a promote operation
+// above it
+DataLazy_ptr makePromote(DataLazy_ptr p);
+
 }
 
 #endif // __ESCRIPT_DATALAZY_H__
diff --git a/escriptcore/src/DataReady.cpp b/escriptcore/src/DataReady.cpp
index 764fb44..8c9bcc8 100644
--- a/escriptcore/src/DataReady.cpp
+++ b/escriptcore/src/DataReady.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataReady.h b/escriptcore/src/DataReady.h
index cb10b66..2754313 100644
--- a/escriptcore/src/DataReady.h
+++ b/escriptcore/src/DataReady.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataTagged.cpp b/escriptcore/src/DataTagged.cpp
index 656a4d6..b21f14e 100644
--- a/escriptcore/src/DataTagged.cpp
+++ b/escriptcore/src/DataTagged.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -23,9 +23,16 @@
 #include <complex>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncDim.h>
+  #include <ncVar.h>
+  #include <ncFile.h>
+ #else
+  #include <netcdfcpp.h>
+ #endif
 #endif
 
+
 #ifdef SLOWSHARECHECK
   #define CHECK_FOR_EX_WRITE if (isShared()) {throw DataException("Attempt to modify shared object");}
 #else
@@ -34,6 +41,10 @@
 
 using namespace std;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace escript {
 
 DataTagged::DataTagged(const FunctionSpace& what,
@@ -296,6 +307,28 @@ DataTagged::deepCopy() const
   return new DataTagged(*this);
 }
 
+
+DataAbstract*
+DataTagged::zeroedCopy() const
+{
+    DataTagged* p=0;
+    if (isComplex())
+    {
+        DataTypes::CplxVectorType v(1);
+	v[0]=0;
+        p=new DataTagged(this->getFunctionSpace(), this->getShape(), v, this);
+    }
+    else
+    {
+        DataTypes::RealVectorType v(1);
+	v[0]=0;      
+        p=new DataTagged(this->getFunctionSpace(), this->getShape(), v, this);
+    }   
+  return p;
+}
+
+
+
 DataAbstract*
 DataTagged::getSlice(const DataTypes::RegionType& region) const 
 {
@@ -815,12 +848,26 @@ DataTagged::toString() const
   DataMapType::const_iterator i;
   temp << "Tag(Default)" << endl;
   
+  const FunctionSpace& fs=getFunctionSpace();
+  int usedCount=fs.getNumberOfTagsInUse();
+  const int* usedTags=fs.borrowListOfTagsInUse();
+  
   if (isComplex())
   {
   
       temp << pointToString(m_data_c,getShape(),getDefaultOffset(),empty) << endl;
       for (i=m_offsetLookup.begin();i!=m_offsetLookup.end();++i) {
-        temp << "Tag(" << i->first << ")" << endl;
+        temp << "Tag(" << i->first << ")";
+        bool found=false;
+        for (int j=0;j<usedCount;++j) {
+            if (i->first==usedTags[j]) {
+                found=true;
+            }
+        }
+        if (!found) {
+            temp << " - Unused";
+        }
+        temp << endl;
         temp << pointToString(m_data_c,getShape(),i->second,empty) << endl;
       }
   }
@@ -829,7 +876,17 @@ DataTagged::toString() const
   
       temp << pointToString(m_data_r,getShape(),getDefaultOffset(),empty) << endl;
       for (i=m_offsetLookup.begin();i!=m_offsetLookup.end();++i) {
-        temp << "Tag(" << i->first << ")" << endl;
+        temp << "Tag(" << i->first << ")";
+        bool found=false;
+        for (int j=0;j<usedCount;++j) {
+            if (i->first==usedTags[j]) {
+                found=true;
+            }
+        }
+        if (!found) {
+            temp << " - Unused";
+        }
+        temp << endl;
         temp << pointToString(m_data_r,getShape(),i->second,empty) << endl;
       }    
   }
@@ -1248,10 +1305,159 @@ DataTagged::matrixInverse(DataAbstract* out) const
 void
 DataTagged::setToZero(){
     CHECK_FOR_EX_WRITE
-    DataTypes::RealVectorType::size_type n=m_data_r.size();
-    for (int i=0; i<n ;++i) m_data_r[i]=0.;
+    if (isComplex())
+    {
+        DataTypes::CplxVectorType::size_type n=m_data_c.size();
+        for (int i=0; i<n ;++i) m_data_c[i]=0.;
+    }
+    else 
+    {    
+        DataTypes::RealVectorType::size_type n=m_data_r.size();
+        for (int i=0; i<n ;++i) m_data_r[i]=0.;
+    }
+}
+
+#ifdef NETCDF4
+void
+DataTagged::dump(const std::string fileName) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    const int ldims=DataTypes::maxRank+1;
+    vector<NcDim >ncdims;
+    int rank = getRank();
+    int type=  getFunctionSpace().getTypeCode();
+    long dims[ldims];
+    const double* d_ptr=&(m_data_r[0]);
+    DataTypes::ShapeType shape = getShape();
+    JMPI mpiInfo(getFunctionSpace().getDomain()->getMPI());
+#ifdef ESYS_MPI
+    int ndims =0;    
+    const int mpi_iam = mpiInfo->rank;
+    const int mpi_num = mpiInfo->size;
+    MPI_Status status;
+
+    /* Serialize NetCDF I/O */
+    if (mpi_iam > 0)
+        MPI_Recv(&ndims, 0, MPI_INT, mpi_iam-1, 81803, mpiInfo->comm, &status);
+#endif
+
+    // Create the file.
+    const std::string newFileName(mpiInfo->appendRankToFileName(fileName));
+    NcFile dataFile;
+    try
+    {
+        dataFile.open(newFileName.c_str(), NcFile::FileMode::replace,   NcFile::FileFormat::classic64);
+    }
+    catch (exceptions::NcException e)
+    {
+        throw DataException("Error - DataConstant:: opening of netCDF file for output failed.");
+    }
+    int line=0;
+    try
+    {
+        const NcInt ni;
+        dataFile.putAtt("type_id", ni, 1);
+        line++;
+        dataFile.putAtt("rank", ni, rank);
+        line++;
+        dataFile.putAtt("function_space_type", ni, type);        
+    }
+    catch (exceptions::NcException e)
+    {
+        switch (line)
+        {
+        case 0: throw DataException("Error - DataTagged:: appending data type to netCDF file failed.");
+        case 1: throw DataException("Error - DataTagged:: appending rank attribute to netCDF file failed.");
+        case 2: throw DataException("Error - DataTagged:: appending function space attribute to netCDF file failed.");
+        }
+    }
+    //ndims=rank+1;
+    if ( rank >0 ) {
+        dims[0]=shape[0];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d0",shape[0]));
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("Error - DataTagged:: appending ncdimension 0 to netCDF file failed.");            
+        }
+    }
+    if ( rank >1 ) {
+        dims[1]=shape[1];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d1",shape[1]));            
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("Error - DataTagged:: appending ncdimension 1 to netCDF file failed.");
+        }
+    }
+    if ( rank >2 ) {
+        dims[2]=shape[2];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d2",shape[2]));            
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("Error - DataTagged:: appending ncdimension 2 to netCDF file failed.");
+        }
+    }
+    if ( rank >3 ) {
+        dims[3]=shape[3];
+        try
+        {
+            ncdims.push_back(dataFile.addDim("d3",shape[3]));            
+        }
+        catch (exceptions::NcException e)
+        {
+            throw DataException("Error - DataTagged:: appending ncdimension 3 to netCDF file failed.");
+        }
+    }
+    const DataTagged::DataMapType& thisLookup=getTagLookup();
+    DataTagged::DataMapType::const_iterator i;
+    DataTagged::DataMapType::const_iterator thisLookupEnd=thisLookup.end();
+    std::vector<int> tags;
+    tags.push_back(-1);
+    for (i=thisLookup.begin();i!=thisLookupEnd;i++)
+        tags.push_back(i->first);
+    dims[rank]=tags.size();
+    line=0;
+    try
+    {
+        ncdims.push_back(dataFile.addDim("num_tags", dims[rank]));
+        line++;
+        NcVar tags_var = dataFile.addVar("tags", ncInt, ncdims[rank]);
+        line++;
+        tags_var.putVar(&tags[0]);
+        line++;
+        NcVar var = dataFile.addVar("data", ncDouble, ncdims);
+        line++;
+        var.putVar(d_ptr);
+    }
+    catch (exceptions::NcException e)
+    {
+        switch (line)
+        {
+        case 0: throw DataException("Error - DataTagged:: appending num_tags to netCDF file failed.");  
+        case 1: throw DataException("Error - DataTagged:: appending tags to netCDF file failed.");    
+        case 2: throw DataException("Error - DataTagged:: copy tags to netCDF buffer failed.");
+        case 3: throw DataException("Error - DataTagged:: appending variable to netCDF file failed.");
+        case 4: throw DataException("Error - DataTagged:: copy data to netCDF buffer failed.");
+        }
+        
+    }
+#ifdef ESYS_MPI
+    if (mpi_iam<mpi_num-1) MPI_Send(&ndims, 0, MPI_INT, mpi_iam+1, 81803, MPI_COMM_WORLD);
+#endif
+    #else
+    throw DataException("Error - DataTagged:: dump is not configured with netCDF. Please contact your installation manager.");
+    #endif
 }
 
+#else
 void
 DataTagged::dump(const std::string fileName) const
 {
@@ -1346,6 +1552,7 @@ DataTagged::dump(const std::string fileName) const
    throw DataException("Error - DataTagged:: dump is not configured with netCDF. Please contact your installation manager.");
    #endif
 }
+#endif
 
 DataTypes::RealVectorType&
 DataTagged::getVectorRW()
diff --git a/escriptcore/src/DataTagged.h b/escriptcore/src/DataTagged.h
index 91bc8ad..8007ad1 100644
--- a/escriptcore/src/DataTagged.h
+++ b/escriptcore/src/DataTagged.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -181,7 +181,17 @@ TODO Make sure to document the relationship between tags and data, ie: data also
   DataAbstract*
   deepCopy() const;
 
-
+  
+  /**
+     \brief Return an object with the same type, domain (and tags if appropriate)
+     as this, but all values are zeroed.
+  */  
+  ESCRIPT_DLL_API
+  virtual
+  DataAbstract*
+  zeroedCopy() const;  
+  
+  
   /**
      \brief
      getSampleDataByTag
diff --git a/escriptcore/src/DataTypes.cpp b/escriptcore/src/DataTypes.cpp
index 4c55621..e90dde8 100644
--- a/escriptcore/src/DataTypes.cpp
+++ b/escriptcore/src/DataTypes.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataTypes.h b/escriptcore/src/DataTypes.h
index 68799f1..6f91a53 100644
--- a/escriptcore/src/DataTypes.h
+++ b/escriptcore/src/DataTypes.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataVector.cpp b/escriptcore/src/DataVector.cpp
index 952889d..caa0f97 100644
--- a/escriptcore/src/DataVector.cpp
+++ b/escriptcore/src/DataVector.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataVector.h b/escriptcore/src/DataVector.h
index 0943016..63a4be5 100644
--- a/escriptcore/src/DataVector.h
+++ b/escriptcore/src/DataVector.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataVectorAlt.h b/escriptcore/src/DataVectorAlt.h
index 00030d1..988764f 100644
--- a/escriptcore/src/DataVectorAlt.h
+++ b/escriptcore/src/DataVectorAlt.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -179,7 +179,10 @@ class ESCRIPT_DLL_API DataVectorAlt {
   const_reference
   operator[](const size_type i) const;
 
-
+    // for compatibility with std::vector
+  ElementType* data();
+  const ElementType* data() const; 
+  
  protected:
 
  private:
@@ -191,6 +194,19 @@ class ESCRIPT_DLL_API DataVectorAlt {
   ElementType* m_array_data;
 };
 
+template <class T>
+inline
+typename DataVectorAlt<T>::ElementType* DataVectorAlt<T>::data()
+{
+    return m_array_data;
+}
+
+template <class T>
+inline
+const typename DataVectorAlt<T>::ElementType* DataVectorAlt<T>::data() const
+{
+    return m_array_data;  
+}
 
 template <class T>
 inline
diff --git a/escriptcore/src/DataVectorOps.cpp b/escriptcore/src/DataVectorOps.cpp
index 9912871..2a42931 100644
--- a/escriptcore/src/DataVectorOps.cpp
+++ b/escriptcore/src/DataVectorOps.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataVectorOps.h b/escriptcore/src/DataVectorOps.h
index 15de86e..6d5e041 100644
--- a/escriptcore/src/DataVectorOps.h
+++ b/escriptcore/src/DataVectorOps.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -1169,7 +1169,7 @@ binaryOpVector(DataTypes::RealVectorType& res,                          // where
 */
 template <class ResELT, class LELT, class RELT>
 void
-binaryOpVectorLazyHelper(ResELT* res,
+binaryOpVectorLazyArithmeticHelper(ResELT* res,
                          const LELT* left,
                          const RELT* right,
                          const size_t chunksize,
@@ -1201,6 +1201,38 @@ binaryOpVectorLazyHelper(ResELT* res,
         case DIV:
             OPVECLAZYBODY(left[lroffset+s]/right[rroffset+s])
             break;
+        default:
+            ESYS_ASSERT(false, "Invalid operation. This should never happen!");
+            // I can't throw here because this will be called inside a parallel section
+    }
+}
+
+
+/**
+ * This assumes that all data involved have the same points per sample and same shape
+ * This version is to be called from within DataLazy.
+ * It does not have openmp around loops because it will be evaluating individual samples
+ * (Which will be done within an enclosing openmp region.
+*/
+template <class ResELT, class LELT, class RELT>
+void
+binaryOpVectorLazyRelationalHelper(ResELT* res,
+                         const LELT* left,
+                         const RELT* right,
+                         const size_t chunksize,
+                         const size_t onumsteps,
+                         const size_t numsteps,
+                         const size_t resultStep,
+                         const size_t leftstep,
+                         const size_t rightstep,
+                         const size_t oleftstep,
+                         const size_t orightstep,
+                         size_t lroffset,
+                         size_t rroffset,
+                         escript::ES_optype operation)          // operation to perform
+{
+    switch (operation)
+    {
         case LESS:
             OPVECLAZYBODY(left[lroffset+s]<right[rroffset+s])
             break;
@@ -1446,6 +1478,21 @@ vectorHasNaN(const DataTypes::RealVectorType& in, DataTypes::RealVectorType::siz
         return false;
 }
 
+inline
+bool
+vectorHasNaN(const DataTypes::CplxVectorType& in, DataTypes::CplxVectorType::size_type inOffset, size_t count)
+{
+        for (size_t z=inOffset;z<inOffset+count;++z)
+        {
+            if (nancheck(in[z]))
+            {
+                return true;
+            }
+        }
+        return false;
+}
+
+
 }  // end namespace escript
 
 #endif // __ESCRIPT_DATAMATHS_H__
diff --git a/escriptcore/src/DataVectorTaipan.cpp b/escriptcore/src/DataVectorTaipan.cpp
index 3118d7c..a871857 100644
--- a/escriptcore/src/DataVectorTaipan.cpp
+++ b/escriptcore/src/DataVectorTaipan.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DataVectorTaipan.h b/escriptcore/src/DataVectorTaipan.h
index 6bc14a6..8225748 100644
--- a/escriptcore/src/DataVectorTaipan.h
+++ b/escriptcore/src/DataVectorTaipan.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Distribution.h b/escriptcore/src/Distribution.h
index f262e03..304bf17 100644
--- a/escriptcore/src/Distribution.h
+++ b/escriptcore/src/Distribution.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Dodgy.cpp b/escriptcore/src/Dodgy.cpp
index ad73f84..ed4b316 100644
--- a/escriptcore/src/Dodgy.cpp
+++ b/escriptcore/src/Dodgy.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2009-2016 by The University of Queensland
+* Copyright (c) 2009-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Dodgy.h b/escriptcore/src/Dodgy.h
index 4a55d74..9328e9a 100644
--- a/escriptcore/src/Dodgy.h
+++ b/escriptcore/src/Dodgy.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2009-2016 by The University of Queensland
+* Copyright (c) 2009-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/DomainException.h b/escriptcore/src/DomainException.h
index 3f4918a..78e76d4 100644
--- a/escriptcore/src/DomainException.h
+++ b/escriptcore/src/DomainException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/ES_optype.cpp b/escriptcore/src/ES_optype.cpp
index 21ef739..b3514df 100644
--- a/escriptcore/src/ES_optype.cpp
+++ b/escriptcore/src/ES_optype.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -37,7 +37,9 @@ std::string ES_opstrings[]={"UNKNOWN","IDENTITY","+","-","*","/","^",
                         "condEval",
                         "hermitian","antihermitian",
 			"real","imaginary","conjugate",
-			"<", ">", ">=", "<="
+			"<", ">", ">=", "<=",
+			"phase",
+            "promote"
 };
 
 
@@ -45,21 +47,40 @@ ES_opgroup opgroups[]={G_UNKNOWN,G_IDENTITY,G_BINARY,G_BINARY,G_BINARY,G_BINARY,
                         G_UNARY,G_UNARY,G_UNARY, //10
                         G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,        // 17
                         G_UNARY,G_UNARY,G_UNARY,                                        // 20
-                        G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,        // 28
-                        G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY, G_UNARY_P, G_UNARY_P,          // 35
+                        G_UNARY,G_UNARY,G_UNARY,G_UNARY_R,G_UNARY,G_UNARY,G_UNARY,G_UNARY,        // 28
+                        G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY, G_UNARY_PR, G_UNARY_PR,          // 35
                         G_NP1OUT,G_NP1OUT,
                         G_TENSORPROD,
                         G_NP1OUT_P, G_NP1OUT_P,
                         G_NP1OUT_2P,
                         G_REDUCTION, G_REDUCTION,
                         G_CONDEVAL,
-                        G_UNARY,G_UNARY,
+                        G_NP1OUT,G_NP1OUT,
                         G_UNARY_R, G_UNARY_R, G_UNARY,
-			G_UNARY_R, G_UNARY_R, G_UNARY_R, G_UNARY_R
+			G_UNARY_R, G_UNARY_R, G_UNARY_R, G_UNARY_R,
+			G_UNARY_R,
+            G_UNARY_C
 };
 
+std::string ES_groupstrings[]={
+   "G_UNKNOWN",
+   "G_IDENTITY",
+   "G_BINARY",            // pointwise operations with two arguments
+   "G_UNARY",             // pointwise operations with one argument
+   "G_UNARY_P",           // pointwise operations with one argument, requiring a parameter
+   "G_UNARY_R",		// pointwise operations with one argument, always real output
+   "G_NP1OUT",            // non-pointwise op with one output
+   "G_NP1OUT_P",          // non-pointwise op with one output requiring a parameter
+   "G_TENSORPROD",        // general tensor product
+   "G_NP1OUT_2P",         // non-pointwise op with one output requiring two params
+   "G_REDUCTION",         // non-pointwise unary op with a scalar output
+   "G_CONDEVAL",
+   "G_UNARY_C"            // pointwise operations with one argument, always cplx output    
+   "G_UNARY_PR"           // G_UNARY_P but always real output
+};
 
-int ES_opcount=53;
+int ES_opcount=55;
+int ES_groupcount=14;
 }
 
 // Return a string representing the operation
@@ -78,3 +99,13 @@ escript::getOpgroup(ES_optype op)
 {
   return opgroups[op];
 }
+
+const std::string&
+escript::groupToString(ES_opgroup g)
+{
+  if (g<0 || g>=ES_groupcount) 
+  {
+    g=G_UNKNOWN;
+  }
+  return ES_groupstrings[g];
+}
diff --git a/escriptcore/src/ES_optype.h b/escriptcore/src/ES_optype.h
index 604146e..9ff5427 100644
--- a/escriptcore/src/ES_optype.h
+++ b/escriptcore/src/ES_optype.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -77,7 +77,9 @@ enum ES_optype
 	LESS=CONJ+1,		// a<b
 	GREATER=LESS+1,
 	GREATER_EQUAL=GREATER+1,
-	LESS_EQUAL=GREATER_EQUAL+1
+	LESS_EQUAL=GREATER_EQUAL+1,
+	PHS=LESS_EQUAL+1,	// phase
+	PROM=PHS+1         // promote real to complex
 };
 
 const std::string&
@@ -96,13 +98,18 @@ enum ES_opgroup
    G_TENSORPROD,        // general tensor product
    G_NP1OUT_2P,         // non-pointwise op with one output requiring two params
    G_REDUCTION,         // non-pointwise unary op with a scalar output
-   G_CONDEVAL
+   G_CONDEVAL,
+   G_UNARY_C,           // pointwise operations with one argument, always cplx output
+   G_UNARY_PR           // G_UNARY_P but always real output   
 };
 
 
 
 ES_opgroup
 getOpgroup(ES_optype op);
+
+const std::string&
+groupToString(ES_opgroup g);
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/escriptcore/src/EscriptParams.cpp b/escriptcore/src/EscriptParams.cpp
index fb506cd..cd3597e 100644
--- a/escriptcore/src/EscriptParams.cpp
+++ b/escriptcore/src/EscriptParams.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -68,9 +68,9 @@ EscriptParams::EscriptParams()
 #ifdef ESYS_MPI
     features.insert("mpi");
 #endif
-#ifdef isnan
+        // Given c++11 we assume that this is
+        // supported now
     features.insert("NAN_CHECK");
-#endif
 #ifdef ESYS_HAVE_NETCDF
     features.insert("netcdf");
 #endif
diff --git a/escriptcore/src/EscriptParams.h b/escriptcore/src/EscriptParams.h
index 65752a5..7f575e5 100644
--- a/escriptcore/src/EscriptParams.h
+++ b/escriptcore/src/EscriptParams.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/EsysException.h b/escriptcore/src/EsysException.h
index b44e8f2..7567d61 100644
--- a/escriptcore/src/EsysException.h
+++ b/escriptcore/src/EsysException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/EsysMPI.cpp b/escriptcore/src/EsysMPI.cpp
index 70ff3c9..f45397f 100644
--- a/escriptcore/src/EsysMPI.cpp
+++ b/escriptcore/src/EsysMPI.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/EsysMPI.h b/escriptcore/src/EsysMPI.h
index 8c8a270..26a62ab 100644
--- a/escriptcore/src/EsysMPI.h
+++ b/escriptcore/src/EsysMPI.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/ExceptionTranslators.cpp b/escriptcore/src/ExceptionTranslators.cpp
index 2f34db1..27583c0 100644
--- a/escriptcore/src/ExceptionTranslators.cpp
+++ b/escriptcore/src/ExceptionTranslators.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/ExceptionTranslators.h b/escriptcore/src/ExceptionTranslators.h
index d3707d3..09f43db 100644
--- a/escriptcore/src/ExceptionTranslators.h
+++ b/escriptcore/src/ExceptionTranslators.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/FileWriter.h b/escriptcore/src/FileWriter.h
index 84483ab..b18dda2 100644
--- a/escriptcore/src/FileWriter.h
+++ b/escriptcore/src/FileWriter.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/FunctionSpace.cpp b/escriptcore/src/FunctionSpace.cpp
index db39e6f..f182df1 100644
--- a/escriptcore/src/FunctionSpace.cpp
+++ b/escriptcore/src/FunctionSpace.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/FunctionSpace.h b/escriptcore/src/FunctionSpace.h
index ac56987..9df4527 100644
--- a/escriptcore/src/FunctionSpace.h
+++ b/escriptcore/src/FunctionSpace.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/FunctionSpaceException.h b/escriptcore/src/FunctionSpaceException.h
index 23a9e98..8a5ee6f 100644
--- a/escriptcore/src/FunctionSpaceException.h
+++ b/escriptcore/src/FunctionSpaceException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/FunctionSpaceFactory.cpp b/escriptcore/src/FunctionSpaceFactory.cpp
index d390a2e..b6679b5 100644
--- a/escriptcore/src/FunctionSpaceFactory.cpp
+++ b/escriptcore/src/FunctionSpaceFactory.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/FunctionSpaceFactory.h b/escriptcore/src/FunctionSpaceFactory.h
index ea3f8ea..c14131d 100644
--- a/escriptcore/src/FunctionSpaceFactory.h
+++ b/escriptcore/src/FunctionSpaceFactory.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/IndexList.h b/escriptcore/src/IndexList.h
index ea2d4e2..c5d784d 100644
--- a/escriptcore/src/IndexList.h
+++ b/escriptcore/src/IndexList.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/LapackInverseHelper.cpp b/escriptcore/src/LapackInverseHelper.cpp
index 8538431..f155183 100644
--- a/escriptcore/src/LapackInverseHelper.cpp
+++ b/escriptcore/src/LapackInverseHelper.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2009-2016 by The University of Queensland
+* Copyright (c) 2009-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/LapackInverseHelper.h b/escriptcore/src/LapackInverseHelper.h
index 03cdab2..b0ba657 100644
--- a/escriptcore/src/LapackInverseHelper.h
+++ b/escriptcore/src/LapackInverseHelper.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2009-2016 by The University of Queensland
+* Copyright (c) 2009-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/MPIDataReducer.cpp b/escriptcore/src/MPIDataReducer.cpp
index f3ed662..1a941fd 100644
--- a/escriptcore/src/MPIDataReducer.cpp
+++ b/escriptcore/src/MPIDataReducer.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/MPIDataReducer.h b/escriptcore/src/MPIDataReducer.h
index 44f36a5..aec3dcd 100644
--- a/escriptcore/src/MPIDataReducer.h
+++ b/escriptcore/src/MPIDataReducer.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/MPIScalarReducer.cpp b/escriptcore/src/MPIScalarReducer.cpp
index 8b925fb..678be06 100644
--- a/escriptcore/src/MPIScalarReducer.cpp
+++ b/escriptcore/src/MPIScalarReducer.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/MPIScalarReducer.h b/escriptcore/src/MPIScalarReducer.h
index 214c654..687e6ec 100644
--- a/escriptcore/src/MPIScalarReducer.h
+++ b/escriptcore/src/MPIScalarReducer.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/NCHelper.cpp b/escriptcore/src/NCHelper.cpp
new file mode 100644
index 0000000..8410d46
--- /dev/null
+++ b/escriptcore/src/NCHelper.cpp
@@ -0,0 +1,68 @@
+
+/*****************************************************************************
+*
+* Copyright (c) 2017 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)
+*
+*****************************************************************************/
+
+#ifdef NETCDF4
+#include "NCHelper.h"
+#include <fstream>
+
+using namespace netCDF;
+
+bool openNcFile(netCDF::NcFile& ncf, const std::string& name)
+{
+    try
+    {
+        // since we don't have a parameter path for specifying file type
+        // we'll look at the magic numbers
+        std::ifstream f(name.c_str());
+        if (!f)
+        {
+            return false;
+        }
+        char buff[5];
+        f.read(buff, 4);
+        if (!f)
+        {
+            return false;
+        }
+        buff[4]=0;
+        NcFile::FileFormat fm=NcFile::FileFormat::classic;
+        if (strcmp(buff, "CDF\x01")==0)
+        {
+            fm=NcFile::FileFormat::classic;
+        }
+        else if (strcmp(buff, "CDF\x02")==0)
+        {
+            fm=NcFile::FileFormat::classic64;
+        }
+        else if (strncmp(buff, "HD5", 3)==0)
+        {
+            fm=NcFile::FileFormat::nc4;     // using this rather than nc4classic since we don't intend to write into the file
+        }
+        else
+        {
+            return false;
+        }
+        ncf.open(name.c_str(), NcFile::FileMode::read, fm);
+    }
+    catch (exceptions::NcException e)
+    {
+        return false;
+    }
+    return true;
+}
+
+
+#endif
diff --git a/dudley/src/DudleyVersion.h b/escriptcore/src/NCHelper.h
similarity index 67%
copy from dudley/src/DudleyVersion.h
copy to escriptcore/src/NCHelper.h
index ebccbdf..58fe5ea 100644
--- a/dudley/src/DudleyVersion.h
+++ b/escriptcore/src/NCHelper.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -14,10 +14,17 @@
 *
 *****************************************************************************/
 
-#ifndef INC_DUDLEYVERSION
-#define INC_DUDLEYVERSION
+#ifndef __ESCRIPT_NCHELPER_H__
+#define __ESCRIPT_NCHELPER_H__
+
+#ifdef NETCDF4
+#include <ncFile.h>
+#include <fstream>
+#include <string>
+
+bool openNcFile(netCDF::NcFile& f, const std::string& name);
 
-char Dudley_Version[] = "$Revision: 6119 $";
 
 #endif
 
+#endif
diff --git a/escriptcore/src/NonReducedVariable.cpp b/escriptcore/src/NonReducedVariable.cpp
index 2fc7664..cc5b07a 100644
--- a/escriptcore/src/NonReducedVariable.cpp
+++ b/escriptcore/src/NonReducedVariable.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c)2015-2016 by The University of Queensland
+* Copyright (c)2015-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/NonReducedVariable.h b/escriptcore/src/NonReducedVariable.h
index 94addfe..fd1da86 100644
--- a/escriptcore/src/NonReducedVariable.h
+++ b/escriptcore/src/NonReducedVariable.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/NullDomain.cpp b/escriptcore/src/NullDomain.cpp
index b64bd5a..de9865a 100644
--- a/escriptcore/src/NullDomain.cpp
+++ b/escriptcore/src/NullDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/NullDomain.h b/escriptcore/src/NullDomain.h
index f787b85..4fca645 100644
--- a/escriptcore/src/NullDomain.h
+++ b/escriptcore/src/NullDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Pointers.h b/escriptcore/src/Pointers.h
index 3daf6ce..bff42da 100644
--- a/escriptcore/src/Pointers.h
+++ b/escriptcore/src/Pointers.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Random.cpp b/escriptcore/src/Random.cpp
index f75112a..443f720 100644
--- a/escriptcore/src/Random.cpp
+++ b/escriptcore/src/Random.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2013-2016 by The University of Queensland
+* Copyright (c) 2013-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Random.h b/escriptcore/src/Random.h
index cdeccc7..ee8d949 100644
--- a/escriptcore/src/Random.h
+++ b/escriptcore/src/Random.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2013-2016 by The University of Queensland
+* Copyright (c) 2013-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SConscript b/escriptcore/src/SConscript
index 3e0da6a..ce89672 100644
--- a/escriptcore/src/SConscript
+++ b/escriptcore/src/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -48,6 +48,7 @@ sources = """
     LapackInverseHelper.cpp
     MPIDataReducer.cpp
     MPIScalarReducer.cpp
+    NCHelper.cpp
     NonReducedVariable.cpp
     NullDomain.cpp
     pyerr.cpp
@@ -99,6 +100,7 @@ headers = """
     FunctionSpaceFactory.h
     IndexList.h
     LapackInverseHelper.h
+    NCHelper.h
     NonReducedVariable.h
     NullDomain.h
     MPIDataReducer.h
diff --git a/escriptcore/src/SolverOptions.cpp b/escriptcore/src/SolverOptions.cpp
index 6748fff..4c1e145 100644
--- a/escriptcore/src/SolverOptions.cpp
+++ b/escriptcore/src/SolverOptions.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SolverOptions.h b/escriptcore/src/SolverOptions.h
index 8e10a2a..c215081 100644
--- a/escriptcore/src/SolverOptions.h
+++ b/escriptcore/src/SolverOptions.h
@@ -1,7 +1,7 @@
 
 /******************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SplitWorld.cpp b/escriptcore/src/SplitWorld.cpp
index 153bc82..95aa86f 100644
--- a/escriptcore/src/SplitWorld.cpp
+++ b/escriptcore/src/SplitWorld.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SplitWorld.h b/escriptcore/src/SplitWorld.h
index d75a032..f979248 100644
--- a/escriptcore/src/SplitWorld.h
+++ b/escriptcore/src/SplitWorld.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SplitWorldException.h b/escriptcore/src/SplitWorldException.h
index 59c7183..8cb8a67 100644
--- a/escriptcore/src/SplitWorldException.h
+++ b/escriptcore/src/SplitWorldException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SubWorld.cpp b/escriptcore/src/SubWorld.cpp
index c0af186..1f4b058 100644
--- a/escriptcore/src/SubWorld.cpp
+++ b/escriptcore/src/SubWorld.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SubWorld.h b/escriptcore/src/SubWorld.h
index 29a6052..49d54c1 100644
--- a/escriptcore/src/SubWorld.h
+++ b/escriptcore/src/SubWorld.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/SystemMatrixException.h b/escriptcore/src/SystemMatrixException.h
index 07d21f1..8d6d94d 100644
--- a/escriptcore/src/SystemMatrixException.h
+++ b/escriptcore/src/SystemMatrixException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Taipan.cpp b/escriptcore/src/Taipan.cpp
index 52d1b29..8c5c241 100644
--- a/escriptcore/src/Taipan.cpp
+++ b/escriptcore/src/Taipan.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Taipan.h b/escriptcore/src/Taipan.h
index fca9b8a..0d43ff4 100644
--- a/escriptcore/src/Taipan.h
+++ b/escriptcore/src/Taipan.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/TestDomain.cpp b/escriptcore/src/TestDomain.cpp
index 9eba7e7..6ee5f67 100644
--- a/escriptcore/src/TestDomain.cpp
+++ b/escriptcore/src/TestDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/TestDomain.h b/escriptcore/src/TestDomain.h
index 09463da..5523339 100644
--- a/escriptcore/src/TestDomain.h
+++ b/escriptcore/src/TestDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/TransportProblemException.h b/escriptcore/src/TransportProblemException.h
index 0f2b2a4..ca6ece2 100644
--- a/escriptcore/src/TransportProblemException.h
+++ b/escriptcore/src/TransportProblemException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/Utils.cpp b/escriptcore/src/Utils.cpp
index 5b9e77a..07f3c05 100644
--- a/escriptcore/src/Utils.cpp
+++ b/escriptcore/src/Utils.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -416,6 +416,10 @@ void saveDataCSV(const std::string& filename, bp::dict arg,
                 throw DataException("saveDataCSV: all data must be on the same domain.");
             }
         }
+        if (data[i].isComplex()) 
+	{
+	    throw DataException("saveDataCSV: complex values must be separated into components before calling this.");
+	}
     }
     if (hasmask) {
         if (mask.getDomain() != data[0].getDomain())
@@ -539,16 +543,17 @@ void saveDataCSV(const std::string& filename, bp::dict arg,
         std::vector<int> offset(numdata);
         std::vector<const DataTypes::real_t*> samples(numdata);
 
+	const DataTypes::real_t onlyreal=0;
         for (int i=0; i<numsamples; ++i) {
             if (!best.ownSample(i)) {
                 continue;
             }
             wantrow = true;
             for (int d=0; d<numdata; ++d) {
-                samples[d] = data[d].getSampleDataRO(i);
+                samples[d] = data[d].getSampleDataRO(i, onlyreal);
             }
             if (hasmask) {
-                masksample = mask.getSampleDataRO(i);
+                masksample = mask.getSampleDataRO(i, onlyreal);
                 if (!expandedmask) {
                     // mask controls whole sample
                     if (masksample[0] <= 0) {
diff --git a/escriptcore/src/Utils.h b/escriptcore/src/Utils.h
index 29d22a8..edb06a4 100644
--- a/escriptcore/src/Utils.h
+++ b/escriptcore/src/Utils.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/WrappedArray.cpp b/escriptcore/src/WrappedArray.cpp
index edc5d0b..61a39fa 100644
--- a/escriptcore/src/WrappedArray.cpp
+++ b/escriptcore/src/WrappedArray.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/WrappedArray.h b/escriptcore/src/WrappedArray.h
index 736c622..3967b5a 100644
--- a/escriptcore/src/WrappedArray.h
+++ b/escriptcore/src/WrappedArray.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/escriptcpp.cpp b/escriptcore/src/escriptcpp.cpp
index be4c98f..8827960 100644
--- a/escriptcore/src/escriptcpp.cpp
+++ b/escriptcore/src/escriptcpp.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -690,6 +690,7 @@ args("arg"), "assigns new location to the domain\n\n"
     .def("__lt__",block_cmp_data)
     .def("__le__",block_cmp_data)
     .def("__ge__",block_cmp_data)
+    .def("phase",&escript::Data::phase)
     // NOTE:: The order of these declarations is important. Anything
     // declared before the generic declaration isn't found so the generic
     // version will be called. 
@@ -779,7 +780,7 @@ args("arg"), "assigns new location to the domain\n\n"
         ":param domain:\n"
         ":type domain: `Domain`");
   def("loadIsConfigured",escript::loadConfigured,":return: True if the load function is configured.");
-  def("Scalar",escript::Scalar,
+  def("Scalar",escript::ScalarFromObj,
       (arg("value")=0.0,
        arg("what")=escript::FunctionSpace(),
        arg("expanded")=false),
diff --git a/escriptcore/src/index.h b/escriptcore/src/index.h
index c43d706..6d3b299 100644
--- a/escriptcore/src/index.h
+++ b/escriptcore/src/index.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/pyerr.cpp b/escriptcore/src/pyerr.cpp
index ab2e62a..5f03872 100644
--- a/escriptcore/src/pyerr.cpp
+++ b/escriptcore/src/pyerr.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c)2015-2016 by The University of Queensland
+* Copyright (c)2015-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/pyerr.h b/escriptcore/src/pyerr.h
index 4d372a6..9901fed 100644
--- a/escriptcore/src/pyerr.h
+++ b/escriptcore/src/pyerr.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c)2015-2016 by The University of Queensland
+* Copyright (c)2015-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/src/system_dep.h b/escriptcore/src/system_dep.h
index 63b7586..71a6150 100644
--- a/escriptcore/src/system_dep.h
+++ b/escriptcore/src/system_dep.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataCombinationsTestCase.cpp b/escriptcore/test/DataCombinationsTestCase.cpp
index 81ddf00..cddab66 100644
--- a/escriptcore/test/DataCombinationsTestCase.cpp
+++ b/escriptcore/test/DataCombinationsTestCase.cpp
@@ -34,7 +34,7 @@ inline
 DataTypes::RealVectorType::const_reference
 getRef(Data& d, int x, int y)
 {
-	return d.getDataAtOffsetRO(getRelIndex(d.getDataPointShape(),x,y));
+	return d.getDataAtOffsetRO(getRelIndex(d.getDataPointShape(),x,y), static_cast<DataTypes::real_t>(0));
 }  
 
 
diff --git a/escriptcore/test/DataConstantTestCase.cpp b/escriptcore/test/DataConstantTestCase.cpp
index a1aca18..03583ea 100644
--- a/escriptcore/test/DataConstantTestCase.cpp
+++ b/escriptcore/test/DataConstantTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataConstantTestCase.h b/escriptcore/test/DataConstantTestCase.h
index 80ba9ca..997deae 100644
--- a/escriptcore/test/DataConstantTestCase.h
+++ b/escriptcore/test/DataConstantTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataEmptyTestCase.cpp b/escriptcore/test/DataEmptyTestCase.cpp
index 207302a..f35a49b 100644
--- a/escriptcore/test/DataEmptyTestCase.cpp
+++ b/escriptcore/test/DataEmptyTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataEmptyTestCase.h b/escriptcore/test/DataEmptyTestCase.h
index 31629ca..931b970 100644
--- a/escriptcore/test/DataEmptyTestCase.h
+++ b/escriptcore/test/DataEmptyTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataExpandedTestCase.cpp b/escriptcore/test/DataExpandedTestCase.cpp
index a5c0e50..6b66bc3 100644
--- a/escriptcore/test/DataExpandedTestCase.cpp
+++ b/escriptcore/test/DataExpandedTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataExpandedTestCase.h b/escriptcore/test/DataExpandedTestCase.h
index 19a2f94..80c8702 100644
--- a/escriptcore/test/DataExpandedTestCase.h
+++ b/escriptcore/test/DataExpandedTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataFactoryTestCase.cpp b/escriptcore/test/DataFactoryTestCase.cpp
index 8290825..a5cf4db 100644
--- a/escriptcore/test/DataFactoryTestCase.cpp
+++ b/escriptcore/test/DataFactoryTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataFactoryTestCase.h b/escriptcore/test/DataFactoryTestCase.h
index 50312e9..e44c2a2 100644
--- a/escriptcore/test/DataFactoryTestCase.h
+++ b/escriptcore/test/DataFactoryTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataLazyTestCase.cpp b/escriptcore/test/DataLazyTestCase.cpp
index b0b58d7..82205bc 100644
--- a/escriptcore/test/DataLazyTestCase.cpp
+++ b/escriptcore/test/DataLazyTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -177,6 +177,10 @@ void DataLazyTestCase::testLazy2()
     shape=DataTypes::scalarShape;
     ES_optype op=(ES_optype)(j);			// not even reinterpret_cast works here
 					// if other compilers object I'll write a switch 
+    if (op==POS)
+    {
+        continue;       // not testing this, python handles it differently
+    }
     cout << "\t" << opToString(op) << endl;
     for (int i=0;i<5;++i)
     {
diff --git a/escriptcore/test/DataLazyTestCase.h b/escriptcore/test/DataLazyTestCase.h
index 758fdff..9c8b98f 100644
--- a/escriptcore/test/DataLazyTestCase.h
+++ b/escriptcore/test/DataLazyTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataMathsTestCase.cpp b/escriptcore/test/DataMathsTestCase.cpp
index 0f2ac2b..911233f 100644
--- a/escriptcore/test/DataMathsTestCase.cpp
+++ b/escriptcore/test/DataMathsTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataMathsTestCase.h b/escriptcore/test/DataMathsTestCase.h
index c8737de..a999361 100644
--- a/escriptcore/test/DataMathsTestCase.h
+++ b/escriptcore/test/DataMathsTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataTaggedTestCase.cpp b/escriptcore/test/DataTaggedTestCase.cpp
index 860e041..679720a 100644
--- a/escriptcore/test/DataTaggedTestCase.cpp
+++ b/escriptcore/test/DataTaggedTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataTaggedTestCase.h b/escriptcore/test/DataTaggedTestCase.h
index 2a768cf..50b9338 100644
--- a/escriptcore/test/DataTaggedTestCase.h
+++ b/escriptcore/test/DataTaggedTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataTestCase.cpp b/escriptcore/test/DataTestCase.cpp
index 5d5b14b..b18155d 100644
--- a/escriptcore/test/DataTestCase.cpp
+++ b/escriptcore/test/DataTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -46,14 +46,14 @@ inline
 DataTypes::RealVectorType::const_reference
 getRef(Data& d,int s1, int p1, int x, int y)
 {
-	return d.getDataAtOffsetRO(d.getDataOffset(s1,p1)+getRelIndex(d.getDataPointShape(),x,y));
+	return d.getDataAtOffsetRO(d.getDataOffset(s1,p1)+getRelIndex(d.getDataPointShape(),x,y), static_cast<DataTypes::real_t>(0));
 }
 
 inline
 DataTypes::RealVectorType::const_reference
 getRef(Data& d, int x, int y)
 {
-	return d.getDataAtOffsetRO(getRelIndex(d.getDataPointShape(),x,y));
+	return d.getDataAtOffsetRO(getRelIndex(d.getDataPointShape(),x,y), static_cast<DataTypes::real_t>(0));
 }
 
 }
@@ -97,7 +97,7 @@ void DataTestCase::testCopyingWorker(bool delayed)
 	{
 	    for (int i=0;i<DataTypes::noValues(shape);++i)
 	    {
-	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i)==deep.getDataAtOffsetRO(i));
+	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0))==deep.getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0)));
 	    }
 	}
 	if (delayed)
@@ -113,7 +113,7 @@ void DataTestCase::testCopyingWorker(bool delayed)
 	{	
 	    for (int i=0;i<DataTypes::noValues(shape);++i)
 	    {
-	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i)!=deep.getDataAtOffsetRO(i));
+	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0))!=deep.getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0)));
 	    }
 	}
 	if (delayed)
@@ -130,7 +130,7 @@ void DataTestCase::testCopyingWorker(bool delayed)
 	{	
 	    for (int i=0;i<DataTypes::noValues(shape);++i)
 	    {
-	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i)==deep.getDataAtOffsetRO(i));
+	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0))==deep.getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0)));
 	    }
 	}
 	d->setToZero();
@@ -138,7 +138,7 @@ void DataTestCase::testCopyingWorker(bool delayed)
 	{	
 	    for (int i=0;i<DataTypes::noValues(shape);++i)
 	    {
-	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i)!=deep.getDataAtOffsetRO(i));
+	      CPPUNIT_ASSERT(d->getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0))!=deep.getDataAtOffsetRO(i, static_cast<DataTypes::real_t>(0)));
 	    }
 	}
 	delete dats[k];
@@ -181,8 +181,8 @@ void DataTestCase::testSlicingWorker(bool delayed)
 	dats[k]->requireWrite();
 	if (!dats[k]->hasNoSamples())
 	{
-	    dats[k]->getDataAtOffsetRW(dats[k]->getDataOffset(0,0)+getRelIndex(viewShape,0,0))=1.0;
-	    dats[k]->getDataAtOffsetRW(dats[k]->getDataOffset(0,0)+getRelIndex(viewShape,1,1))=2.0;
+	    dats[k]->getDataAtOffsetRW(dats[k]->getDataOffset(0,0)+getRelIndex(viewShape,0,0), static_cast<DataTypes::real_t>(0))=1.0;
+	    dats[k]->getDataAtOffsetRW(dats[k]->getDataOffset(0,0)+getRelIndex(viewShape,1,1), static_cast<DataTypes::real_t>(0))=2.0;
 	}
     	DataTypes::RegionType region;
     	region.push_back(DataTypes::RegionType::value_type(0,0));
@@ -213,7 +213,7 @@ void DataTestCase::testSlicingWorker(bool delayed)
 	
 	if (!dats[k]->hasNoSamples())
 	{
-	    CPPUNIT_ASSERT(slice2.getDataAtOffsetRO(slice2.getDataOffset(0,0)+getRelIndex(slice2.getDataPointShape(),0,0))==1.0);
+	    CPPUNIT_ASSERT(slice2.getDataAtOffsetRO(slice2.getDataOffset(0,0)+getRelIndex(slice2.getDataPointShape(),0,0), static_cast<DataTypes::real_t>(0))==1.0);
 	}
 	//
 	// create a rank 2 slice with four values
@@ -607,6 +607,7 @@ void DataTestCase::testDataConstant()
 void DataTestCase::testDataTagged()
 {
   cout << endl;
+  DataTypes::real_t dummyr=0;
 
   {
 
@@ -636,14 +637,14 @@ void DataTestCase::testDataTagged()
     CPPUNIT_ASSERT(myData.getLength()==3);
     
     CPPUNIT_ASSERT(myData.getNoValues()==3);
-    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(0)==0.0);
-    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(1)==1.0);
-    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(2)==2.0);
+    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(0, dummyr)==0.0);
+    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(1, dummyr)==1.0);
+    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(2, dummyr)==2.0);
 
 #ifdef EXWRITECHK		
     myData.requireWrite();
 #endif	    
-    double* sampleData=myData.getSampleDataRW(0);
+    double* sampleData=myData.getSampleDataRW(0, dummyr);
     for (int i=0; i<myData.getNoValues(); i++) {
       CPPUNIT_ASSERT(sampleData[i]==i);
     }
@@ -672,9 +673,9 @@ void DataTestCase::testDataTagged()
     CPPUNIT_ASSERT(myData.getDataPointRank()==1);
     CPPUNIT_ASSERT(myData.getNoValues()==3);
 
-    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(offset+0)==2);
-    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(offset+1)==3);
-    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(offset+2)==4);
+    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(offset+0, dummyr)==2);
+    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(offset+1, dummyr)==3);
+    CPPUNIT_ASSERT(myData.getDataAtOffsetRO(offset+2, dummyr)==4);
 
     sampleData=myData.getSampleDataByTag(1);
     for (int i=0; i<myData.getNoValues(); i++) {
@@ -823,7 +824,7 @@ void DataTestCase::testMoreOperations()
 	    {
 	      tmp+=getRef(dats[z],i,i);
 	    }
-	    CPPUNIT_ASSERT(std::abs(results[z].getDataAtOffsetRO(0) - tmp) <= REL_TOL*std::abs(tmp));
+	    CPPUNIT_ASSERT(std::abs(results[z].getDataAtOffsetRO(0, static_cast<DataTypes::real_t>(0)) - tmp) <= REL_TOL*std::abs(tmp));
 	}
   }
 
@@ -832,7 +833,7 @@ void DataTestCase::testMoreOperations()
 
 void DataTestCase::testOperations()
 {
-
+  DataTypes::real_t dummyr=0;
   cout << endl;
   TestDomain* tdp=new TestDomain(1,1,1);	// 1 points per sample, 1 samples, 1D coords
   Domain_ptr p(tdp);
@@ -1440,21 +1441,27 @@ cerr << "Ending sin" << endl;
   cout << "\tTest Data::pos." << endl;
   for (int z=0;z<NUMDATS;++z)
   {
-    results[z].copy(dats[z].pos());
-    if (z>=LAZY)
-    {
-	CPPUNIT_ASSERT(results[z].isLazy());
-    }
+      if (!dats[z].isLazy())     // python handles this differently
+      {
+            results[z].copy(dats[z].pos());
+            if (z>=LAZY)
+            {
+            CPPUNIT_ASSERT(results[z].isLazy());
+            }
+      }
   }
   for (int i=0;i<shape[0];i++) {
     for (int j=0;j<shape[1];j++) {
       for (int z=0;z<NUMDATS;++z)
       {
-	results[z].resolve();		
-	if (!results[z].hasNoSamples())
-	{	
-	    CPPUNIT_ASSERT(std::abs(getRef(results[z],i,j) - getRelIndex(shape,i,j)) <= REL_TOL*std::abs(data[getRelIndex(shape,i,j)]));
-	}
+          if (!dats[z].isLazy())
+          {
+                results[z].resolve();		
+                if (!results[z].hasNoSamples())
+                {	
+                    CPPUNIT_ASSERT(std::abs(getRef(results[z],i,j) - getRelIndex(shape,i,j)) <= REL_TOL*std::abs(data[getRelIndex(shape,i,j)]));
+                }
+          }
       }
     }
   }
@@ -1491,7 +1498,7 @@ cerr << "Ending sin" << endl;
       results[z].resolve();		
       if (!results[z].hasNoSamples())
       {    
-	  CPPUNIT_ASSERT(std::abs(results[z].getDataAtOffsetRO(0) - 0) <= REL_TOL*0); 
+	  CPPUNIT_ASSERT(std::abs(results[z].getDataAtOffsetRO(0, dummyr) - 0) <= REL_TOL*0); 
       }
   }
   
@@ -1506,7 +1513,7 @@ cerr << "Ending sin" << endl;
     results[z].resolve();		
     if (!results[z].hasNoSamples())
     {    
-	CPPUNIT_ASSERT(std::abs(results[z].getDataAtOffsetRO(0) - 5) <= REL_TOL*5);
+	CPPUNIT_ASSERT(std::abs(results[z].getDataAtOffsetRO(0, dummyr) - 5) <= REL_TOL*5);
     }
   }
 
@@ -1591,7 +1598,7 @@ cerr << "Ending sin" << endl;
 // Here we test the binary operators in complex expressions
 void DataTestCase::testBinary()
 {
-
+  DataTypes::real_t dummyr=0;
   cout << endl;
 
   // define the shape for the test data
@@ -1638,10 +1645,10 @@ void DataTestCase::testBinary()
 	}
 	for (int i=0;i<DataTypes::noValues(shape);++i)
 	{
-	  CPPUNIT_ASSERT(std::abs(r1.getDataAtOffsetRO(i)-data[i]) <= REL_TOL*data[i]);
-	  CPPUNIT_ASSERT(std::abs(r2.getDataAtOffsetRO(i)-data[i]) <= REL_TOL*data[i]);
-	  CPPUNIT_ASSERT(std::abs(r3.getDataAtOffsetRO(i)-data[i]) <= REL_TOL*data[i]);
-	  CPPUNIT_ASSERT(std::abs(r4.getDataAtOffsetRO(i)-pow(data[i],i)) <=REL_TOL*pow(data[i],i));
+	  CPPUNIT_ASSERT(std::abs(r1.getDataAtOffsetRO(i, dummyr)-data[i]) <= REL_TOL*data[i]);
+	  CPPUNIT_ASSERT(std::abs(r2.getDataAtOffsetRO(i, dummyr)-data[i]) <= REL_TOL*data[i]);
+	  CPPUNIT_ASSERT(std::abs(r3.getDataAtOffsetRO(i, dummyr)-data[i]) <= REL_TOL*data[i]);
+	  CPPUNIT_ASSERT(std::abs(r4.getDataAtOffsetRO(i, dummyr)-pow(data[i],i)) <=REL_TOL*pow(data[i],i));
 	}
   }
 }
diff --git a/escriptcore/test/DataTestCase.h b/escriptcore/test/DataTestCase.h
index b3ff706..1cd0852 100644
--- a/escriptcore/test/DataTestCase.h
+++ b/escriptcore/test/DataTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataTypesTestCase.cpp b/escriptcore/test/DataTypesTestCase.cpp
index 5f97262..216b3ac 100644
--- a/escriptcore/test/DataTypesTestCase.cpp
+++ b/escriptcore/test/DataTypesTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataTypesTestCase.h b/escriptcore/test/DataTypesTestCase.h
index 0019238..ca9ca16 100644
--- a/escriptcore/test/DataTypesTestCase.h
+++ b/escriptcore/test/DataTypesTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataVectorTestCase.cpp b/escriptcore/test/DataVectorTestCase.cpp
index 0b6798d..951d8c1 100644
--- a/escriptcore/test/DataVectorTestCase.cpp
+++ b/escriptcore/test/DataVectorTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/DataVectorTestCase.h b/escriptcore/test/DataVectorTestCase.h
index 91041ac..179a616 100644
--- a/escriptcore/test/DataVectorTestCase.h
+++ b/escriptcore/test/DataVectorTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/EsysExceptionTestCase.cpp b/escriptcore/test/EsysExceptionTestCase.cpp
index a0c0691..ba6ac0f 100644
--- a/escriptcore/test/EsysExceptionTestCase.cpp
+++ b/escriptcore/test/EsysExceptionTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/EsysExceptionTestCase.h b/escriptcore/test/EsysExceptionTestCase.h
index cfdb1af..4149be8 100644
--- a/escriptcore/test/EsysExceptionTestCase.h
+++ b/escriptcore/test/EsysExceptionTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/FileWriterTestCase.cpp b/escriptcore/test/FileWriterTestCase.cpp
index 84609bc..3c1e8f5 100644
--- a/escriptcore/test/FileWriterTestCase.cpp
+++ b/escriptcore/test/FileWriterTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/FileWriterTestCase.h b/escriptcore/test/FileWriterTestCase.h
index f9fe8a2..3fb02c3 100644
--- a/escriptcore/test/FileWriterTestCase.h
+++ b/escriptcore/test/FileWriterTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/FunctionSpaceTestCase.cpp b/escriptcore/test/FunctionSpaceTestCase.cpp
index 74e37f1..23c00bc 100644
--- a/escriptcore/test/FunctionSpaceTestCase.cpp
+++ b/escriptcore/test/FunctionSpaceTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/FunctionSpaceTestCase.h b/escriptcore/test/FunctionSpaceTestCase.h
index c51cd0d..9282eb7 100644
--- a/escriptcore/test/FunctionSpaceTestCase.h
+++ b/escriptcore/test/FunctionSpaceTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/SConscript b/escriptcore/test/SConscript
index 807f857..def0add 100644
--- a/escriptcore/test/SConscript
+++ b/escriptcore/test/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/test/SharedDataTestCase.cpp b/escriptcore/test/SharedDataTestCase.cpp
index 1a9bb78..47386f4 100644
--- a/escriptcore/test/SharedDataTestCase.cpp
+++ b/escriptcore/test/SharedDataTestCase.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -106,8 +106,8 @@ void SharedDataTestCase::testGetDataAtOffset()
   Data L=d.delay();
   // now change the data directly
   d.requireWrite();
-  d.getDataAtOffsetRW(0)=17;
-  CPPUNIT_ASSERT(L.getDataAtOffsetRO(0)==42);
+  d.getDataAtOffsetRW(0, static_cast<DataTypes::real_t>(0))=17;
+  CPPUNIT_ASSERT(L.getDataAtOffsetRO(0, static_cast<DataTypes::real_t>(0))==42);
 }
 
 void SharedDataTestCase::testGetDataPoint()
diff --git a/escriptcore/test/SharedDataTestCase.h b/escriptcore/test/SharedDataTestCase.h
index 9f635b9..49c4cbe 100644
--- a/escriptcore/test/SharedDataTestCase.h
+++ b/escriptcore/test/SharedDataTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/TaipanTestCase.cpp b/escriptcore/test/TaipanTestCase.cpp
index 96d64d2..93db05d 100644
--- a/escriptcore/test/TaipanTestCase.cpp
+++ b/escriptcore/test/TaipanTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/TaipanTestCase.h b/escriptcore/test/TaipanTestCase.h
index c9035a7..baf78ef 100644
--- a/escriptcore/test/TaipanTestCase.h
+++ b/escriptcore/test/TaipanTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/escript_UnitTest.cpp b/escriptcore/test/escript_UnitTest.cpp
index f4e479f..5803f9f 100644
--- a/escriptcore/test/escript_UnitTest.cpp
+++ b/escriptcore/test/escript_UnitTest.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/multi_arrayTestCase.cpp b/escriptcore/test/multi_arrayTestCase.cpp
index f1bed91..6cf52b0 100644
--- a/escriptcore/test/multi_arrayTestCase.cpp
+++ b/escriptcore/test/multi_arrayTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/multi_arrayTestCase.h b/escriptcore/test/multi_arrayTestCase.h
index 51f0c51..4386803 100644
--- a/escriptcore/test/multi_arrayTestCase.h
+++ b/escriptcore/test/multi_arrayTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/escriptcore/test/python/SConscript b/escriptcore/test/python/SConscript
index 251f8a4..658ec45 100644
--- a/escriptcore/test/python/SConscript
+++ b/escriptcore/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/test/python/run_data_access.py b/escriptcore/test/python/run_data_access.py
index bb1509f..c492f84 100644
--- a/escriptcore/test/python/run_data_access.py
+++ b/escriptcore/test/python/run_data_access.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/run_symbolic.py b/escriptcore/test/python/run_symbolic.py
index 2904657..3a71f3f 100644
--- a/escriptcore/test/python/run_symbolic.py
+++ b/escriptcore/test/python/run_symbolic.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -4562,7 +4562,7 @@ class Test_SymbolicTestCase(unittest.TestCase):
     #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     def test_tensor_transposed_mult_Symbol_rank4_and_2(self):
         sh0=(4, 2, 1, 2)
-        sh1=(1, 2)
+        sh1=(2, 1)
         x=Symbol('x', sh0)
         y=Symbol('y', sh1)
         z=tensor_transposed_mult(x,y)
@@ -4572,6 +4572,7 @@ class Test_SymbolicTestCase(unittest.TestCase):
 -0.36459928785133155]], [[-0.22462276783111212, -0.42161393988755957]]], [[[0.26571160085874457, -0.62600818728809027]], 
 [[-0.71097319952325466, -0.62527074156544704]]]])
         yy=numpy.array([[0.34480495362926078, 0.79127258239206455]])
+        yy=transpose(yy)
         ref=tensor_transposed_mult(xx,yy)
         res=Evaluator(z)(x=xx,y=yy)
         self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
diff --git a/escriptcore/test/python/run_testdomain.py b/escriptcore/test/python/run_testdomain.py
index 1807e02..c97e8c7 100644
--- a/escriptcore/test/python/run_testdomain.py
+++ b/escriptcore/test/python/run_testdomain.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2012-2016 by The University of Queensland
+# Copyright (c) 2012-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2012-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2012-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -30,6 +30,13 @@ import sys
 from esys.escript import *
 
 class TestDomainTests(unittest.TestCase):
+    """
+    escript has a (relatively) trivial domain implementatiobn (called TestDomain) 
+    to be used for testing escriptcore code without needing a full domain 
+    implementation such as finley.
+    
+    This set of tests checks that domain.
+    """
     TOL=EPSILON*100.
     def testreduction(self):
         dom = getTestDomainFunctionSpace(4,2,2).getDomain()
diff --git a/escriptcore/test/python/run_units.py b/escriptcore/test/python/run_units.py
index 51cf90a..a68b3bc 100644
--- a/escriptcore/test/python/run_units.py
+++ b/escriptcore/test/python/run_units.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/run_xml.py b/escriptcore/test/python/run_xml.py
index ef434b8..0925191 100644
--- a/escriptcore/test/python/run_xml.py
+++ b/escriptcore/test/python/run_xml.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_assemblage.py b/escriptcore/test/python/test_assemblage.py
index 2992e31..badee42 100644
--- a/escriptcore/test/python/test_assemblage.py
+++ b/escriptcore/test/python/test_assemblage.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_assemblage_2Do1.py b/escriptcore/test/python/test_assemblage_2Do1.py
deleted file mode 100644
index 551b090..0000000
--- a/escriptcore/test/python/test_assemblage_2Do1.py
+++ /dev/null
@@ -1,17890 +0,0 @@
-
-##############################################################################
-#
-# Copyright (c) 2003-2016 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-2016 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"
-
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-from esys.escript import *
-from esys.escript.linearPDEs import LinearPDE
-
-class Test_assemblage_2Do1(unittest.TestCase):
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(2,[1,0])
-     out.setTaggedValue(1,[-1,0])
-     out.setTaggedValue(20, [0,1])
-     out.setTaggedValue(10, [0,-1])
-     return out
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=5-9*x[1]-7*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=7
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-49))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=(-2)-2*x[1]-7*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=3
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-2)-7*x[1]-4*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=2
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=1+3*x[1]+5*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=5
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=5+5*x[1]+2*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=3
-    Y_test=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(15+15*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=5-8*x[1]+3*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=7
-    Y_test=56
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(35-56*x[1]+21*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_C_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=6-9*x[1]-3*x[0]
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[0]=3
-    Y_test=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_C_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-6)+7*x[1]+5*x[0]
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[1]=8
-    Y_test=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_D_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=1+2*x[1]-7*x[0]
-    D_test=Data(6,(),Function(self.domain))
-    Y_test=6+12*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_d_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=8-4*x[1]+4*x[0]
-    d_test=Data(5,(),FunctionOnBoundary(self.domain))
-    y_test=40-20*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=6-2*x[1]+7*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=x[0]
-    Y_test=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=(-4)-1*x[1]+2*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=x[0]
-    Y_test=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=2+2*x[1]+4*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=x[1]
-    Y_test=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=2-6*x[1]-2*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=x[1]
-    Y_test=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-7)+x[1]+6*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=7-1*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-7)*x[0]+x[0]*x[1]+6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-1)-1*x[1]+2*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=1+2*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-1)*x[1]-1*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_C_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=8-5*x[1]-8*x[0]
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[0]=x[0]
-    Y_test=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_C_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=7+6*x[1]-9*x[0]
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[1]=x[1]
-    Y_test=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_D_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=7
-    D_test=Function(self.domain).getX()[0]
-    Y_test=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_d_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=3
-    d_test=interpolate(x[0],FunctionOnBoundary(self.domain))
-    y_test=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=4+3*x[1]-7*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=1
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-7)-9*x[1]-8*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=8
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-72)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=1+5*x[1]-3*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=3
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=(-1)-7*x[1]+2*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=8
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Const_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=7-5*x[1]-7*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=7
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=49-35*x[1]-49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Const_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-7)-4*x[1]-1*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=4
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-28)-16*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=1+x[1]+2*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-1)-3*x[1]-3*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=(-6)+5*x[1]+x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=(-5)+3*x[1]-6*x[0]
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Vario_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-8)
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Vario_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-8)
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[1]-1*x[0]
-    u[1]=(-4)+7*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-1))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[1]-8*x[0]
-    u[1]=(-3)+5*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[1]+2*x[0]
-    u[1]=6+x[1]-1*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]+6*x[0]
-    u[1]=(-3)-3*x[1]-1*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[1]+2*x[0]
-    u[1]=(-1)+3*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[1]-1*x[0]
-    u[1]=(-9)-5*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]+5*x[0]
-    u[1]=(-9)+4*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]-6*x[0]
-    u[1]=(-8)-7*x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-14))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[1]+5*x[0]
-    u[1]=3+x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[1]+3*x[0]
-    u[1]=(-2)-1*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(49)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]-7*x[0]
-    u[1]=5-8*x[1]-7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-49))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]+4*x[0]
-    u[1]=(-4)+4*x[1]-8*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-1*x[1]-2*x[0]
-    u[1]=7+7*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[1]+6*x[0]
-    u[1]=(-3)+4*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]+7*x[0]
-    u[1]=(-2)-8*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-9*x[0]
-    u[1]=2+8*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[1]-8*x[0]
-    u[1]=(-6)-7*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-15)-27*x[1]-24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-9*x[1]-8*x[0]
-    u[1]=5+6*x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=30
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(30+36*x[1]-30*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]-1*x[0]
-    u[1]=(-9)-2*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-42)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-35)+42*x[1]-7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[1]+4*x[0]
-    u[1]=1+5*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6+30*x[1]+48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[1]-8*x[0]
-    u[1]=1-2*x[1]+5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=64
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(56-40*x[1]-64*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[1]-9*x[0]
-    u[1]=(-6)+4*x[1]+x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-18)+12*x[1]+3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[1]-5*x[0]
-    u[1]=(-1)+7*x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-15)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-15)+15*x[1]-15*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[1]-5*x[0]
-    u[1]=(-7)+7*x[1]-9*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)+7*x[1]-9*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[1]-8*x[0]
-    u[1]=8+6*x[1]+x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]-9*x[0]
-    u[1]=(-7)+7*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[1]-7*x[0]
-    u[1]=2+7*x[1]+7*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[1]+7*x[0]
-    u[1]=(-4)+7*x[1]+2*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-2*x[1]-7*x[0]
-    u[1]=(-8)+2*x[1]-4*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[1]+8*x[0]
-    u[1]=2+x[1]-9*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[1]+6*x[0]
-    u[1]=(-6)-4*x[1]-1*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[1]+7*x[0]
-    u[1]=(-1)-5*x[1]+6*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-1*x[1]-6*x[0]
-    u[1]=(-4)-3*x[1]-9*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=24-3*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]+7*x[0]
-    u[1]=(-2)+3*x[1]-5*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-12)+18*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]-8*x[0]
-    u[1]=7+3*x[1]-9*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=12+12*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+4*x[0]
-    u[1]=1+8*x[1]-8*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5+40*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[1]+8*x[0]
-    u[1]=7+6*x[1]+3*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,0]=8
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-72)+24*x[1]+64*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]+3*x[0]
-    u[1]=(-4)-2*x[1]+2*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,1]=1
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-4)-2*x[1]+2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[1]-7*x[0]
-    u[1]=4+4*x[1]-3*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,0]=2
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-4)+12*x[1]-14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-9*x[0]
-    u[1]=(-8)+6*x[1]+3*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,1]=3
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-24)+18*x[1]+9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[1]-2*x[0]
-    u[1]=(-7)+6*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[1]+x[0]
-    u[1]=5-5*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]+2*x[0]
-    u[1]=(-3)-7*x[1]+8*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]-1*x[0]
-    u[1]=(-9)-2*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[1]-3*x[0]
-    u[1]=6-1*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[1]+6*x[0]
-    u[1]=(-2)-4*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]+6*x[0]
-    u[1]=8-3*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]-1*x[0]
-    u[1]=(-4)-6*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[1]-1*x[0]
-    u[1]=(-6)-9*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[1]-6*x[0]
-    u[1]=(-3)+8*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[1]+4*x[0]
-    u[1]=(-5)-7*x[1]-1*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[1]+4*x[0]
-    u[1]=7-9*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[1]+x[0]
-    u[1]=(-7)-1*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]+5*x[0]
-    u[1]=5+2*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-2*x[1]-1*x[0]
-    u[1]=(-5)+6*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]+4*x[0]
-    u[1]=(-8)-8*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[1]-4*x[0]
-    u[1]=(-4)+3*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1-8*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-1)*x[0]+8*x[0]*x[1]-4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]+3*x[0]
-    u[1]=2+x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)-1*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(2*x[0]+x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+6*x[1]-7*x[0]
-    u[1]=4+2*x[1]-9*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3-12*x[1]+7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1]+6*x[1]**2-7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[1]-7*x[0]
-    u[1]=5-7*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)+14*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1]-7*x[1]**2+8*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[1]+2*x[0]
-    u[1]=(-1)+7*x[1]+6*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)-8*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0]+8*x[0]*x[1]+2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[1]-4*x[0]
-    u[1]=3+4*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)-4*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0]+4*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[1]-3*x[0]
-    u[1]=(-3)+5*x[1]+5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-16*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1]+8*x[1]**2-3*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[1]-3*x[0]
-    u[1]=(-3)-7*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3+14*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1]-7*x[1]**2+7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]+7*x[0]
-    u[1]=6+7*x[1]-5*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]-9*x[0]
-    u[1]=(-3)+7*x[1]-9*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-2*x[1]+x[0]
-    u[1]=3-7*x[1]-1*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]+2*x[0]
-    u[1]=(-8)+x[1]-1*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]+x[0]
-    u[1]=4-5*x[1]-5*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[1]-4*x[0]
-    u[1]=(-2)+x[1]-3*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]+6*x[0]
-    u[1]=2+4*x[1]-4*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[1]+2*x[0]
-    u[1]=8-7*x[1]-8*x[0]
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-4)
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=2
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-3)
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=6
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-9)
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-3)
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-4)
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[1]-8*x[0]
-    u[1]=4-8*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[1]+8*x[0]
-    u[1]=7-2*x[1]-7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]-5*x[0]
-    u[1]=(-3)+4*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[1]-4*x[0]
-    u[1]=6-6*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]-4*x[0]
-    u[1]=1-3*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]+x[0]
-    u[1]=(-2)-9*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-45)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[1]+6*x[0]
-    u[1]=(-3)-7*x[1]+8*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[1]+4*x[0]
-    u[1]=(-4)+2*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]-3*x[0]
-    u[1]=(-5)+3*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]-8*x[0]
-    u[1]=2+6*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-2*x[0]
-    u[1]=7-4*x[1]-8*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[1]-7*x[0]
-    u[1]=8-9*x[1]-8*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-45)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]-7*x[0]
-    u[1]=(-9)-3*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[1]-2*x[0]
-    u[1]=4+7*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[1]-7*x[0]
-    u[1]=4+4*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[1]+x[0]
-    u[1]=3-5*x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]-7*x[0]
-    u[1]=(-5)+7*x[1]-1*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=35-49*x[1]-49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[1]-9*x[0]
-    u[1]=(-6)-5*x[1]-8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-42)-35*x[1]-56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+7*x[0]
-    u[1]=(-8)-8*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-12)-9*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[1]+7*x[0]
-    u[1]=(-7)-6*x[1]+x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-28)-24*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-2*x[0]
-    u[1]=(-8)-3*x[1]+6*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-12)-6*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[1]-4*x[0]
-    u[1]=(-3)-5*x[1]+3*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)-5*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]+2*x[0]
-    u[1]=6-8*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=16-10*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]-9*x[0]
-    u[1]=(-6)-9*x[1]+4*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-30)-45*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]-5*x[0]
-    u[1]=(-8)+8*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]-2*x[0]
-    u[1]=4-7*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]-7*x[0]
-    u[1]=(-1)+2*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[1]-1*x[0]
-    u[1]=(-7)+4*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[1]-5*x[0]
-    u[1]=5-3*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-3*x[0]
-    u[1]=6+8*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]+5*x[0]
-    u[1]=1+7*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]+x[0]
-    u[1]=(-1)-7*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[1]+7*x[0]
-    u[1]=(-2)+2*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]+5*x[0]
-    u[1]=2+x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[1]-8*x[0]
-    u[1]=(-9)+3*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]+5*x[0]
-    u[1]=(-5)-8*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+7*x[1]-4*x[0]
-    u[1]=6-3*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[1]+4*x[0]
-    u[1]=(-9)-9*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[1]+3*x[0]
-    u[1]=6-7*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[1]-6*x[0]
-    u[1]=3+2*x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-7)
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-4)
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=3
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=5
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-4)
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-5)
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-4)
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+7*x[0]
-    u[1]=8-1*x[1]+8*x[0]
-    u[2]=(-1)-9*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+x[1]+2*x[0]
-    u[1]=8+4*x[1]-1*x[0]
-    u[2]=(-9)-8*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[1]-1*x[0]
-    u[1]=7+2*x[1]-3*x[0]
-    u[2]=(-1)-5*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[1]+3*x[0]
-    u[1]=(-1)+3*x[1]+3*x[0]
-    u[2]=8+4*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]+8*x[0]
-    u[1]=(-9)+7*x[1]+4*x[0]
-    u[2]=(-7)+4*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[1]+5*x[0]
-    u[1]=3+8*x[1]+4*x[0]
-    u[2]=(-1)+8*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[1]+2*x[0]
-    u[1]=2+5*x[1]+7*x[0]
-    u[2]=8+6*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[1]+7*x[0]
-    u[1]=(-4)-2*x[1]+x[0]
-    u[2]=5+x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]-7*x[0]
-    u[1]=6-3*x[1]-2*x[0]
-    u[2]=(-7)-9*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[1]+3*x[0]
-    u[1]=5-8*x[1]-9*x[0]
-    u[2]=8+7*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[1]-5*x[0]
-    u[1]=(-6)-9*x[1]+4*x[0]
-    u[2]=(-5)-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[1]+4*x[0]
-    u[1]=(-2)+8*x[1]+7*x[0]
-    u[2]=8+x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]-3*x[0]
-    u[1]=7-5*x[1]+x[0]
-    u[2]=(-6)-8*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-21))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]+x[0]
-    u[1]=(-6)+7*x[1]+8*x[0]
-    u[2]=3+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[1]-5*x[0]
-    u[1]=6-1*x[1]-9*x[0]
-    u[2]=(-5)-5*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-45))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]-3*x[0]
-    u[1]=(-3)-5*x[1]-6*x[0]
-    u[2]=(-4)+8*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[1]-2*x[0]
-    u[1]=(-5)-3*x[1]+8*x[0]
-    u[2]=1+7*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[1]-7*x[0]
-    u[1]=(-1)+6*x[1]-7*x[0]
-    u[2]=1+x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[1]+6*x[0]
-    u[1]=(-6)+8*x[1]+4*x[0]
-    u[2]=5+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[1]-8*x[0]
-    u[1]=1+4*x[1]-1*x[0]
-    u[2]=(-2)-8*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-28))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]-6*x[0]
-    u[1]=(-2)-7*x[1]-2*x[0]
-    u[2]=1-6*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-14))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[1]-3*x[0]
-    u[1]=(-4)-8*x[1]+x[0]
-    u[2]=6-7*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-48))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[1]-1*x[0]
-    u[1]=(-6)+6*x[1]-7*x[0]
-    u[2]=5+4*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[1]-7*x[0]
-    u[1]=7+6*x[1]-9*x[0]
-    u[2]=8-7*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-14))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[1]-7*x[0]
-    u[1]=8-1*x[1]-6*x[0]
-    u[2]=4+5*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-21))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[1]+3*x[0]
-    u[1]=1+3*x[1]+8*x[0]
-    u[2]=(-2)-2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[1]-3*x[0]
-    u[1]=(-9)+7*x[1]-8*x[0]
-    u[2]=(-9)-2*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[1]+6*x[0]
-    u[1]=(-3)-2*x[1]-7*x[0]
-    u[2]=3+8*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]+4*x[0]
-    u[1]=(-1)-9*x[1]-4*x[0]
-    u[2]=5-1*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]+7*x[0]
-    u[1]=1+4*x[1]+3*x[0]
-    u[2]=4-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[1]-1*x[0]
-    u[1]=(-7)+3*x[1]-8*x[0]
-    u[2]=(-9)+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[1]-4*x[0]
-    u[1]=(-7)-6*x[1]-9*x[0]
-    u[2]=(-9)-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]+8*x[0]
-    u[1]=(-7)+8*x[1]+7*x[0]
-    u[2]=4+3*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]+8*x[0]
-    u[1]=8+3*x[1]-1*x[0]
-    u[2]=(-2)+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[1]-7*x[0]
-    u[1]=5+2*x[1]+4*x[0]
-    u[2]=4-1*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-6*x[0]
-    u[1]=(-1)-3*x[1]-9*x[0]
-    u[2]=(-3)+5*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]-3*x[0]
-    u[1]=(-2)-8*x[1]-3*x[0]
-    u[2]=8-5*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=18
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-36)-36*x[1]-18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[1]+6*x[0]
-    u[1]=2-2*x[1]+x[0]
-    u[2]=(-2)+8*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8-8*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[1]+5*x[0]
-    u[1]=(-9)+6*x[1]+3*x[0]
-    u[2]=5+7*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-21)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(35+49*x[1]+21*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]-6*x[0]
-    u[1]=5-1*x[1]+6*x[0]
-    u[2]=(-1)+8*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=48
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-18)-48*x[1]-36*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]+3*x[0]
-    u[1]=(-6)+x[1]-9*x[0]
-    u[2]=(-9)+7*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-18)+3*x[1]-27*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[1]+7*x[0]
-    u[1]=(-8)-1*x[1]+2*x[0]
-    u[2]=(-9)-8*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)-8*x[1]-4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]-9*x[0]
-    u[1]=(-5)+7*x[1]-6*x[0]
-    u[2]=(-4)-5*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=18
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-12)-18*x[1]-18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-9*x[0]
-    u[1]=(-4)-9*x[1]-9*x[0]
-    u[2]=8-6*x[1]+6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=45
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-20)-45*x[1]-45*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]-6*x[0]
-    u[1]=2+6*x[1]-9*x[0]
-    u[2]=5+3*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=16
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(40+24*x[1]-16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]+x[0]
-    u[1]=(-5)-9*x[1]+2*x[0]
-    u[2]=1+3*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=16
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(12-16*x[1]+2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-6*x[0]
-    u[1]=(-6)+5*x[1]+7*x[0]
-    u[2]=1+8*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-15)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-18)+15*x[1]+21*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[1]-1*x[0]
-    u[1]=(-1)-8*x[1]-3*x[0]
-    u[2]=(-8)+8*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-48)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-48)+48*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[1]-5*x[0]
-    u[1]=(-6)+6*x[1]+5*x[0]
-    u[2]=(-2)+5*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4-3*x[1]-5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[1]+3*x[0]
-    u[1]=(-2)-3*x[1]-5*x[0]
-    u[2]=3+8*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=25
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-10)-15*x[1]-25*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[1]+5*x[0]
-    u[1]=5+8*x[1]+3*x[0]
-    u[2]=5-9*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-64)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(40-72*x[1]+64*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[1]-1*x[0]
-    u[1]=6+7*x[1]-3*x[0]
-    u[2]=7+6*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-6)-12*x[1]-2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[1]+3*x[0]
-    u[1]=2-9*x[1]-8*x[0]
-    u[2]=(-6)-6*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(2-9*x[1]-8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[1]+8*x[0]
-    u[1]=2+7*x[1]-1*x[0]
-    u[2]=(-3)+4*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-20)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-15)+20*x[1]+15*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+x[0]
-    u[1]=(-7)+5*x[1]-8*x[0]
-    u[2]=4-4*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]-9*x[0]
-    u[1]=(-3)-6*x[1]-8*x[0]
-    u[2]=4-2*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]+4*x[0]
-    u[1]=(-3)+4*x[1]-6*x[0]
-    u[2]=5-4*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[1]+7*x[0]
-    u[1]=1+3*x[1]+8*x[0]
-    u[2]=5+x[1]-3*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[1]+5*x[0]
-    u[1]=(-4)+7*x[1]-9*x[0]
-    u[2]=1+3*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[1]+x[0]
-    u[1]=3-8*x[1]+5*x[0]
-    u[2]=(-1)+7*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[1]-7*x[0]
-    u[1]=(-8)-8*x[1]+8*x[0]
-    u[2]=4+6*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]+2*x[0]
-    u[1]=2+5*x[1]-2*x[0]
-    u[2]=(-3)-4*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]-7*x[0]
-    u[1]=6-2*x[1]-5*x[0]
-    u[2]=(-5)+4*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]-5*x[0]
-    u[1]=3+5*x[1]-4*x[0]
-    u[2]=7-7*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]-1*x[0]
-    u[1]=5-2*x[1]-2*x[0]
-    u[2]=(-5)+x[1]+3*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=15
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+4*x[0]
-    u[1]=(-1)+x[1]-6*x[0]
-    u[2]=(-8)+4*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[1]+7*x[0]
-    u[1]=(-3)+2*x[1]-7*x[0]
-    u[2]=(-7)+4*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-4*x[0]
-    u[1]=(-6)+3*x[1]+4*x[0]
-    u[2]=(-1)+4*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[1]+2*x[0]
-    u[1]=(-2)-3*x[1]+2*x[0]
-    u[2]=(-1)-9*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[1]-5*x[0]
-    u[1]=(-7)-4*x[1]+x[0]
-    u[2]=(-6)-4*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[1]-9*x[0]
-    u[1]=6+7*x[1]-9*x[0]
-    u[2]=8-1*x[1]+3*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[1]-7*x[0]
-    u[1]=(-9)+4*x[1]+3*x[0]
-    u[2]=8-5*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]-6*x[0]
-    u[1]=4+6*x[1]-5*x[0]
-    u[2]=2+4*x[1]+8*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-24)-24*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]+4*x[0]
-    u[1]=4-1*x[1]-4*x[0]
-    u[2]=8+2*x[1]-4*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=20-5*x[1]-20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]+7*x[0]
-    u[1]=(-7)+x[1]+6*x[0]
-    u[2]=(-7)-3*x[1]+7*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-14)-6*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[1]+7*x[0]
-    u[1]=6+6*x[1]-1*x[0]
-    u[2]=8+x[1]+6*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=14+12*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+2*x[0]
-    u[1]=(-7)+5*x[1]-9*x[0]
-    u[2]=4-1*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-28)+20*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]-8*x[0]
-    u[1]=8+5*x[1]+4*x[0]
-    u[2]=(-3)-6*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-15)-30*x[1]+25*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]-1*x[0]
-    u[1]=(-4)+x[1]+7*x[0]
-    u[2]=(-6)+7*x[1]-3*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-24)+12*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]+8*x[0]
-    u[1]=(-4)-4*x[1]-5*x[0]
-    u[2]=(-5)+2*x[1]-5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)-4*x[1]-5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]-4*x[0]
-    u[1]=7-5*x[1]-3*x[0]
-    u[2]=(-4)+5*x[1]+6*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-16)+20*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[1]+3*x[0]
-    u[1]=(-4)-8*x[1]-5*x[0]
-    u[2]=7-1*x[1]-6*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,0]=7
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=42+14*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[1]+8*x[0]
-    u[1]=(-1)+6*x[1]+4*x[0]
-    u[2]=(-5)+7*x[1]+2*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,1]=3
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-3)+18*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]+7*x[0]
-    u[1]=(-9)-8*x[1]-1*x[0]
-    u[2]=7+4*x[1]-4*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,2]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=28+16*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[1]+2*x[0]
-    u[1]=(-3)+4*x[1]+2*x[0]
-    u[2]=(-8)+2*x[1]-7*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,0]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=1-4*x[1]+2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[1]+8*x[0]
-    u[1]=4-5*x[1]+6*x[0]
-    u[2]=(-1)-5*x[1]-9*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,1]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=4-5*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]-8*x[0]
-    u[1]=3+5*x[1]-4*x[0]
-    u[2]=(-7)+6*x[1]-1*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,2]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-14)+12*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+6*x[1]-8*x[0]
-    u[1]=(-5)-7*x[1]+4*x[0]
-    u[2]=(-2)+7*x[1]+3*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,0]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=24+36*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[1]-8*x[0]
-    u[1]=4-9*x[1]-5*x[0]
-    u[2]=1+3*x[1]+6*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,1]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=4-9*x[1]-5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]-2*x[0]
-    u[1]=(-1)+3*x[1]+6*x[0]
-    u[2]=(-8)-5*x[1]-3*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,2]=5
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-40)-25*x[1]-15*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[1]-3*x[0]
-    u[1]=5+5*x[1]-8*x[0]
-    u[2]=6+8*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[1]-9*x[0]
-    u[1]=8-6*x[1]+4*x[0]
-    u[2]=(-8)+x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[1]+3*x[0]
-    u[1]=(-9)-5*x[1]+4*x[0]
-    u[2]=6+4*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[1]+8*x[0]
-    u[1]=(-5)-8*x[1]+7*x[0]
-    u[2]=2-8*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[1]-8*x[0]
-    u[1]=(-4)-3*x[1]-1*x[0]
-    u[2]=4+2*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]+8*x[0]
-    u[1]=7+3*x[1]+3*x[0]
-    u[2]=7-9*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[1]-8*x[0]
-    u[1]=(-2)-4*x[1]-8*x[0]
-    u[2]=2+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[1]-3*x[0]
-    u[1]=3-6*x[1]+x[0]
-    u[2]=2+5*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]-4*x[0]
-    u[1]=8+8*x[1]+2*x[0]
-    u[2]=8-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[1]-4*x[0]
-    u[1]=5+5*x[1]-5*x[0]
-    u[2]=(-6)+8*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[1]+4*x[0]
-    u[1]=8+7*x[1]-9*x[0]
-    u[2]=7-8*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[1]+2*x[0]
-    u[1]=1-1*x[1]+6*x[0]
-    u[2]=6-3*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]-7*x[0]
-    u[1]=(-4)-2*x[1]+8*x[0]
-    u[2]=2-2*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[1]-8*x[0]
-    u[1]=(-8)-7*x[1]+2*x[0]
-    u[2]=3-5*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]+x[0]
-    u[1]=3+x[1]-4*x[0]
-    u[2]=8+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[1]-7*x[0]
-    u[1]=(-4)-1*x[1]-8*x[0]
-    u[2]=6+2*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]-6*x[0]
-    u[1]=(-2)+4*x[1]+5*x[0]
-    u[2]=(-4)-3*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]+2*x[0]
-    u[1]=(-5)-1*x[1]+5*x[0]
-    u[2]=7-3*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]-3*x[0]
-    u[1]=5-1*x[1]+x[0]
-    u[2]=(-8)+4*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[1]+x[0]
-    u[1]=3+x[1]-4*x[0]
-    u[2]=(-6)-1*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[1]+5*x[0]
-    u[1]=4-8*x[1]+4*x[0]
-    u[2]=(-5)+3*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[1]-9*x[0]
-    u[1]=3+6*x[1]+7*x[0]
-    u[2]=6+x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+x[1]-2*x[0]
-    u[1]=(-4)+5*x[1]-6*x[0]
-    u[2]=(-5)+3*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[1]+4*x[0]
-    u[1]=(-6)+5*x[1]-7*x[0]
-    u[2]=(-4)-8*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]-5*x[0]
-    u[1]=4-7*x[1]-2*x[0]
-    u[2]=5-7*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[1]-8*x[0]
-    u[1]=4-9*x[1]-7*x[0]
-    u[2]=6+7*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]+7*x[0]
-    u[1]=(-7)+7*x[1]+4*x[0]
-    u[2]=1-6*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]+x[0]
-    u[1]=(-1)-9*x[1]-3*x[0]
-    u[2]=(-7)-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[1]-8*x[0]
-    u[1]=(-1)+2*x[1]-6*x[0]
-    u[2]=3-1*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[1]-9*x[0]
-    u[1]=(-7)-6*x[1]+4*x[0]
-    u[2]=(-5)+3*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+7*x[0]
-    u[1]=1+5*x[1]+5*x[0]
-    u[2]=8+6*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]+x[0]
-    u[1]=4-3*x[1]-6*x[0]
-    u[2]=(-2)-3*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+2*x[1]-5*x[0]
-    u[1]=8-2*x[1]+4*x[0]
-    u[2]=6+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[1]-8*x[0]
-    u[1]=(-4)-5*x[1]-2*x[0]
-    u[2]=(-6)-8*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]+5*x[0]
-    u[1]=2-1*x[1]+7*x[0]
-    u[2]=6+2*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-1*x[0]
-    u[1]=6+x[1]-4*x[0]
-    u[2]=3+4*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[1]+x[0]
-    u[1]=6+8*x[1]-2*x[0]
-    u[2]=3-2*x[1]+2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5-3*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-5)*x[0]+3*x[0]*x[1]+x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[1]+8*x[0]
-    u[1]=(-5)-1*x[1]-6*x[0]
-    u[2]=7+6*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5+x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-5)*x[0]-1*x[0]*x[1]-6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[1]+2*x[0]
-    u[1]=6+x[1]+4*x[0]
-    u[2]=6+2*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)-2*x[1]+14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0]+2*x[0]*x[1]-7*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]-9*x[0]
-    u[1]=1-8*x[1]-7*x[0]
-    u[2]=1+7*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)-6*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1]+3*x[1]**2-9*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]-4*x[0]
-    u[1]=1-4*x[1]+4*x[0]
-    u[2]=(-3)-5*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)+8*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1]-4*x[1]**2+4*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[1]-1*x[0]
-    u[1]=(-8)+5*x[1]+2*x[0]
-    u[2]=(-1)+3*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1-6*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1]+3*x[1]**2-5*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[1]+6*x[0]
-    u[1]=7-6*x[1]+3*x[0]
-    u[2]=(-2)-3*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9+4*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0]-4*x[0]*x[1]+6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-1*x[0]
-    u[1]=5+x[1]-5*x[0]
-    u[2]=7-3*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)-1*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(5*x[0]+x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[1]-5*x[0]
-    u[1]=(-9)-7*x[1]-7*x[0]
-    u[2]=5-9*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)+9*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(5*x[0]-9*x[0]*x[1]-9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]+6*x[0]
-    u[1]=(-6)-4*x[1]-2*x[0]
-    u[2]=3-8*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1-14*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1]+7*x[1]**2+6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]-5*x[0]
-    u[1]=(-9)+2*x[1]+x[0]
-    u[2]=1+6*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9-4*x[1]-1*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1]+2*x[1]**2+x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-1*x[0]
-    u[1]=(-1)-9*x[1]+6*x[0]
-    u[2]=7+4*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)-8*x[1]+7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1]+4*x[1]**2-7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]+x[0]
-    u[1]=(-5)-7*x[1]-2*x[0]
-    u[2]=(-4)+6*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3+x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3)*x[0]-1*x[0]*x[1]+x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[1]-2*x[0]
-    u[1]=8+8*x[1]+3*x[0]
-    u[2]=(-5)+8*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)-8*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8*x[0]+8*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]+4*x[0]
-    u[1]=5+2*x[1]-7*x[0]
-    u[2]=1-2*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)+2*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(x[0]-2*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]+2*x[0]
-    u[1]=3-3*x[1]-9*x[0]
-    u[2]=1+x[1]+2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)-6*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(8*x[1]+3*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]-2*x[0]
-    u[1]=6+7*x[1]-5*x[0]
-    u[2]=6+x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)-14*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1]+7*x[1]**2-5*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-9*x[1]-3*x[0]
-    u[1]=1+8*x[1]+8*x[0]
-    u[2]=(-5)+x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5-2*x[1]+7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-5)*x[1]+x[1]**2-7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[1]-9*x[0]
-    u[1]=(-1)+6*x[1]-6*x[0]
-    u[2]=(-3)+8*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+x[1]+5*x[0]
-    u[1]=5+2*x[1]-1*x[0]
-    u[2]=2-3*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[1]+5*x[0]
-    u[1]=4-2*x[1]+7*x[0]
-    u[2]=(-6)-5*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[1]+7*x[0]
-    u[1]=5+5*x[1]+8*x[0]
-    u[2]=6-2*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[1]+8*x[0]
-    u[1]=(-1)-8*x[1]-7*x[0]
-    u[2]=(-8)+2*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[1]+3*x[0]
-    u[1]=(-5)+2*x[1]-4*x[0]
-    u[2]=4-7*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[1]-9*x[0]
-    u[1]=(-4)+7*x[1]-9*x[0]
-    u[2]=5+3*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[1]-4*x[0]
-    u[1]=(-4)+6*x[1]+6*x[0]
-    u[2]=(-2)-2*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[1]+5*x[0]
-    u[1]=7-1*x[1]-5*x[0]
-    u[2]=2-3*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]+3*x[0]
-    u[1]=8+6*x[1]-5*x[0]
-    u[2]=5-3*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[1]-1*x[0]
-    u[1]=(-7)-2*x[1]+4*x[0]
-    u[2]=6-3*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[1]-1*x[0]
-    u[1]=(-9)+2*x[1]+6*x[0]
-    u[2]=(-2)+5*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[1]+5*x[0]
-    u[1]=7+6*x[1]+5*x[0]
-    u[2]=(-8)-8*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]-1*x[0]
-    u[1]=(-8)+5*x[1]+5*x[0]
-    u[2]=8+6*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]+4*x[0]
-    u[1]=6-1*x[1]+x[0]
-    u[2]=(-4)+3*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[1]-7*x[0]
-    u[1]=(-8)+x[1]-8*x[0]
-    u[2]=5-5*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[1]-5*x[0]
-    u[1]=5-3*x[1]+7*x[0]
-    u[2]=1-5*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]+x[0]
-    u[1]=5-3*x[1]-4*x[0]
-    u[2]=6-4*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=4
-    u[2]=(-5)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=2
-    u[2]=(-2)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-5)
-    u[2]=(-9)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=7
-    u[2]=5
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=1
-    u[2]=7
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-7)
-    u[2]=6
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=3
-    u[2]=3
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=7
-    u[2]=(-3)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-8)
-    u[2]=(-2)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-9)
-    u[2]=(-9)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-5)
-    u[2]=(-3)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-8)
-    u[2]=2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-6)
-    u[2]=3
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=2
-    u[2]=7
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=1
-    u[2]=4
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=3
-    u[2]=(-3)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=8
-    u[2]=4
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=8
-    u[2]=(-4)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]+7*x[0]
-    u[1]=7+7*x[1]-2*x[0]
-    u[2]=1-6*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]-5*x[0]
-    u[1]=(-9)-7*x[1]-9*x[0]
-    u[2]=7-6*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[1]-6*x[0]
-    u[1]=(-6)+5*x[1]+6*x[0]
-    u[2]=(-2)-8*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-7*x[0]
-    u[1]=(-4)-7*x[1]-9*x[0]
-    u[2]=(-8)-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[1]-9*x[0]
-    u[1]=(-3)-2*x[1]-4*x[0]
-    u[2]=(-1)+6*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[1]+8*x[0]
-    u[1]=(-8)-5*x[1]-6*x[0]
-    u[2]=2+5*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=10
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-1*x[1]-1*x[0]
-    u[1]=5+2*x[1]+4*x[0]
-    u[2]=(-8)-2*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[1]-8*x[0]
-    u[1]=5-4*x[1]+x[0]
-    u[2]=2+2*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=49
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[1]+7*x[0]
-    u[1]=(-2)-2*x[1]-4*x[0]
-    u[2]=7-2*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-6*x[0]
-    u[1]=2+2*x[1]+6*x[0]
-    u[2]=5+8*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]-2*x[0]
-    u[1]=(-4)-2*x[1]-2*x[0]
-    u[2]=7-6*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]+4*x[0]
-    u[1]=(-8)+4*x[1]-8*x[0]
-    u[2]=(-5)-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[1]+4*x[0]
-    u[1]=(-1)-1*x[1]-5*x[0]
-    u[2]=(-1)+8*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]+2*x[0]
-    u[1]=2+3*x[1]-9*x[0]
-    u[2]=3+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[1]-6*x[0]
-    u[1]=5-9*x[1]-8*x[0]
-    u[2]=4-8*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+2*x[0]
-    u[1]=(-9)+x[1]-7*x[0]
-    u[2]=(-4)-5*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[1]-9*x[0]
-    u[1]=2-9*x[1]-9*x[0]
-    u[2]=(-4)+7*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[1]-5*x[0]
-    u[1]=2+7*x[1]-4*x[0]
-    u[2]=(-2)-6*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[1]-5*x[0]
-    u[1]=3+3*x[1]-9*x[0]
-    u[2]=3+7*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]+x[0]
-    u[1]=8+4*x[1]+6*x[0]
-    u[2]=(-1)+8*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[1]-1*x[0]
-    u[1]=(-8)+5*x[1]-1*x[0]
-    u[2]=4-7*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[1]+8*x[0]
-    u[1]=(-6)-9*x[1]+8*x[0]
-    u[2]=5+x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]+2*x[0]
-    u[1]=(-9)+6*x[1]-3*x[0]
-    u[2]=6-1*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-72)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]-2*x[0]
-    u[1]=5+2*x[1]+6*x[0]
-    u[2]=(-7)+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[1]-8*x[0]
-    u[1]=2-9*x[1]+5*x[0]
-    u[2]=4-3*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]-1*x[0]
-    u[1]=1+2*x[1]+5*x[0]
-    u[2]=(-7)-4*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]-3*x[0]
-    u[1]=(-3)+8*x[1]-6*x[0]
-    u[2]=(-6)-7*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[1]-6*x[0]
-    u[1]=3+x[1]-7*x[0]
-    u[2]=(-9)-9*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=1
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]-9*x[0]
-    u[1]=(-1)-9*x[1]-5*x[0]
-    u[2]=(-7)+8*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[1]+x[0]
-    u[1]=8+5*x[1]-9*x[0]
-    u[2]=2+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]-4*x[0]
-    u[1]=(-7)-4*x[1]+2*x[0]
-    u[2]=8+4*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]-9*x[0]
-    u[1]=8+3*x[1]+7*x[0]
-    u[2]=7+3*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[1]-6*x[0]
-    u[1]=(-5)+7*x[1]-4*x[0]
-    u[2]=6-2*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[1]+4*x[0]
-    u[1]=6-7*x[1]-2*x[0]
-    u[2]=4+5*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]+2*x[0]
-    u[1]=3+x[1]+5*x[0]
-    u[2]=(-1)-3*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]-1*x[0]
-    u[1]=(-9)-3*x[1]+6*x[0]
-    u[2]=(-1)-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[1]-6*x[0]
-    u[1]=1+8*x[1]-4*x[0]
-    u[2]=6-8*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-30)+30*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-1*x[0]
-    u[1]=(-4)-9*x[1]+5*x[0]
-    u[2]=(-5)-7*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-20)-45*x[1]+25*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]+3*x[0]
-    u[1]=3+5*x[1]+8*x[0]
-    u[2]=5+4*x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=30+24*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]+2*x[0]
-    u[1]=1-2*x[1]+2*x[0]
-    u[2]=(-8)+2*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=10-6*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]-8*x[0]
-    u[1]=(-7)+4*x[1]+7*x[0]
-    u[2]=3-5*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-42)+24*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-3*x[0]
-    u[1]=2-3*x[1]+6*x[0]
-    u[2]=(-7)+3*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)+3*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]-4*x[0]
-    u[1]=(-8)+5*x[1]-1*x[0]
-    u[2]=(-7)+5*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)-24*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[1]+6*x[0]
-    u[1]=5-1*x[1]+6*x[0]
-    u[2]=6-3*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=15-3*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[1]-2*x[0]
-    u[1]=3+4*x[1]-9*x[0]
-    u[2]=4-2*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=16-8*x[1]+32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]+2*x[0]
-    u[1]=4+7*x[1]-7*x[0]
-    u[2]=3-6*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)+8*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[1]+4*x[0]
-    u[1]=8-7*x[1]-4*x[0]
-    u[2]=(-2)-7*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=64-56*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[1]+4*x[0]
-    u[1]=(-1)-1*x[1]-2*x[0]
-    u[2]=(-7)+3*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)+3*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]-2*x[0]
-    u[1]=(-1)+4*x[1]+6*x[0]
-    u[2]=(-3)-7*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=20-12*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]-8*x[0]
-    u[1]=(-8)+4*x[1]-4*x[0]
-    u[2]=8+x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-48)+24*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]+8*x[0]
-    u[1]=3+6*x[1]-9*x[0]
-    u[2]=6-3*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=36-18*x[1]+48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[1]+3*x[0]
-    u[1]=(-5)-4*x[1]+6*x[0]
-    u[2]=6+3*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=1-7*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]-7*x[0]
-    u[1]=1-2*x[1]-7*x[0]
-    u[2]=7-4*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=3-6*x[1]-21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[1]+4*x[0]
-    u[1]=(-8)-6*x[1]-9*x[0]
-    u[2]=(-4)-6*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-16)-24*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[1]-3*x[0]
-    u[1]=7-6*x[1]+6*x[0]
-    u[2]=8-6*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]-8*x[0]
-    u[1]=6-5*x[1]-1*x[0]
-    u[2]=(-6)-7*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]-5*x[0]
-    u[1]=(-9)+2*x[1]+5*x[0]
-    u[2]=(-1)+8*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-9*x[0]
-    u[1]=5+4*x[1]+5*x[0]
-    u[2]=(-8)+3*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[1]+4*x[0]
-    u[1]=(-5)+x[1]+4*x[0]
-    u[2]=(-3)+x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]+x[0]
-    u[1]=8-9*x[1]-5*x[0]
-    u[2]=2-6*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[1]-5*x[0]
-    u[1]=(-8)+2*x[1]-1*x[0]
-    u[2]=(-9)-3*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-3*x[0]
-    u[1]=(-1)-3*x[1]-9*x[0]
-    u[2]=(-2)+6*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]-6*x[0]
-    u[1]=2+7*x[1]-2*x[0]
-    u[2]=7+3*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[1]+2*x[0]
-    u[1]=1-4*x[1]-5*x[0]
-    u[2]=2-7*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[1]-4*x[0]
-    u[1]=(-4)-1*x[1]+4*x[0]
-    u[2]=(-6)-3*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[1]-4*x[0]
-    u[1]=2-7*x[1]-9*x[0]
-    u[2]=(-2)-5*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]-1*x[0]
-    u[1]=4+3*x[1]-8*x[0]
-    u[2]=(-7)-8*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[1]+8*x[0]
-    u[1]=2-1*x[1]-9*x[0]
-    u[2]=3+5*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-9*x[0]
-    u[1]=1+3*x[1]+2*x[0]
-    u[2]=1-3*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-2*x[1]-4*x[0]
-    u[1]=7-9*x[1]-9*x[0]
-    u[2]=(-5)-2*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-9*x[0]
-    u[1]=(-6)+6*x[1]-3*x[0]
-    u[2]=3+8*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[1]-8*x[0]
-    u[1]=7+6*x[1]-3*x[0]
-    u[2]=(-8)-4*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]-3*x[0]
-    u[1]=(-2)+5*x[1]-5*x[0]
-    u[2]=1-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[1]-9*x[0]
-    u[1]=8-8*x[1]-2*x[0]
-    u[2]=7+5*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]+7*x[0]
-    u[1]=(-7)+6*x[1]+5*x[0]
-    u[2]=7+2*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]-7*x[0]
-    u[1]=6+7*x[1]+8*x[0]
-    u[2]=(-2)+8*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]+4*x[0]
-    u[1]=7-3*x[1]-5*x[0]
-    u[2]=(-1)+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[1]+5*x[0]
-    u[1]=7+6*x[1]-9*x[0]
-    u[2]=(-1)-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]-9*x[0]
-    u[1]=(-8)-4*x[1]-8*x[0]
-    u[2]=1-4*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]+3*x[0]
-    u[1]=7-2*x[1]+6*x[0]
-    u[2]=4+8*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[1]+3*x[0]
-    u[1]=(-2)+8*x[1]+8*x[0]
-    u[2]=(-1)+8*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[1]-8*x[0]
-    u[1]=5+8*x[1]+6*x[0]
-    u[2]=(-1)-4*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[1]-4*x[0]
-    u[1]=(-1)-2*x[1]+8*x[0]
-    u[2]=(-9)-6*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[1]-7*x[0]
-    u[1]=(-9)+4*x[1]+7*x[0]
-    u[2]=6+4*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[1]-5*x[0]
-    u[1]=(-4)-7*x[1]+7*x[0]
-    u[2]=(-2)+6*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[1]+7*x[0]
-    u[1]=8+8*x[1]+2*x[0]
-    u[2]=6+4*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]+4*x[0]
-    u[1]=6+8*x[1]-9*x[0]
-    u[2]=(-4)-4*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[1]-7*x[0]
-    u[1]=2+8*x[1]+5*x[0]
-    u[2]=(-8)-6*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[1]+5*x[0]
-    u[1]=(-5)+8*x[1]-4*x[0]
-    u[2]=(-1)+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[1]-7*x[0]
-    u[1]=(-2)+6*x[1]+5*x[0]
-    u[2]=2-1*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=4
-    u[2]=2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=1
-    u[2]=4
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-8)
-    u[2]=6
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-7)
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=7
-    u[2]=(-9)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=1
-    u[2]=5
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-8)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-6)
-    u[2]=4
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=4
-    u[2]=(-8)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=1
-    u[2]=3
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-4)
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-5)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=4
-    u[2]=7
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=5
-    u[2]=(-9)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-9)
-    u[2]=(-9)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-3)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-6)
-    u[2]=5
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-3)
-    u[2]=(-8)
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-1)+2*x[1]+6*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=5
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=7-1*x[1]-8*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=6
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-7)+3*x[1]+3*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=5
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=(-8)+7*x[1]+3*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=2
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-5)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-5))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-7)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=7
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-49))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-2)-4*x[1]+2*x[0]
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[0]=3
-    Y_test=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-6)+4*x[1]-2*x[0]
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[1]=2
-    Y_test=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_D_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=(-8)-7*x[1]+4*x[0]
-    D_test=Data(5,(),ReducedFunction(self.domain))
-    Y_test=(-40)-35*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_d_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=4+7*x[1]+3*x[0]
-    d_test=Data(8,(),ReducedFunctionOnBoundary(self.domain))
-    y_test=32+56*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-5)+5*x[1]-1*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=x[0]
-    Y_test=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=2-7*x[1]+2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=x[0]
-    Y_test=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=8-4*x[1]-1*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=x[1]
-    Y_test=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=(-6)+8*x[1]-2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=x[1]
-    Y_test=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-7)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=x[0]
-    Y_test=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-7)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=x[1]
-    Y_test=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=5-7*x[1]-8*x[0]
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[0]=x[0]
-    Y_test=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=8-2*x[1]+2*x[0]
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[1]=x[1]
-    Y_test=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_D_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=(-8)
-    D_test=ReducedFunction(self.domain).getX()[0]
-    Y_test=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_d_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=3
-    d_test=interpolate(x[0],ReducedFunctionOnBoundary(self.domain))
-    y_test=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=8-1*x[1]-6*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=1
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-1)+5*x[1]-3*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=4
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=6+3*x[1]-2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=7
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=7-9*x[1]-2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=7
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=6
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=1
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-6)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=2
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=6-8*x[1]-9*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=7-5*x[1]-1*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=7-5*x[1]+2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=6-8*x[1]+x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-4)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=4
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[1]+8*x[0]
-    u[1]=1+5*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]-1*x[0]
-    u[1]=(-5)-5*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-40))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]+8*x[0]
-    u[1]=(-2)-2*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]-8*x[0]
-    u[1]=(-3)-6*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]+7*x[0]
-    u[1]=(-8)+2*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[1]-8*x[0]
-    u[1]=7-7*x[1]+8*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]+4*x[0]
-    u[1]=6-6*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[1]+8*x[0]
-    u[1]=(-3)+3*x[1]-4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[1]-5*x[0]
-    u[1]=4+2*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[1]-7*x[0]
-    u[1]=8+8*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]+x[0]
-    u[1]=(-7)-9*x[1]-4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[1]-4*x[0]
-    u[1]=5-1*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]+5*x[0]
-    u[1]=2+8*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[1]+6*x[0]
-    u[1]=4+4*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[1]+x[0]
-    u[1]=1-8*x[1]-1*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]+5*x[0]
-    u[1]=6+6*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=2
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-5)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-35))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-2)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-54))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=5
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-6)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-7)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-21))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=7
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-4)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]-4*x[0]
-    u[1]=(-5)+x[1]+8*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[1]-5*x[0]
-    u[1]=4-3*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]+8*x[0]
-    u[1]=1+8*x[1]-1*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[1]+3*x[0]
-    u[1]=6+4*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]+6*x[0]
-    u[1]=(-7)-3*x[1]-9*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=36
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[1]-2*x[0]
-    u[1]=(-1)-2*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]+2*x[0]
-    u[1]=3+7*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[1]+4*x[0]
-    u[1]=(-8)+8*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]+6*x[0]
-    u[1]=(-3)+6*x[1]-3*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9-27*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[1]-5*x[0]
-    u[1]=(-5)-8*x[1]-2*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-10)-16*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+x[0]
-    u[1]=(-5)+x[1]+3*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)+15*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-8*x[0]
-    u[1]=(-7)-7*x[1]+4*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-28)-28*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]-1*x[0]
-    u[1]=6-1*x[1]+2*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=3
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=3-24*x[1]-3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[1]+8*x[0]
-    u[1]=(-3)+7*x[1]-5*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=2
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-6)+14*x[1]-10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[1]-7*x[0]
-    u[1]=(-2)+6*x[1]+8*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=3
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-24)-18*x[1]-21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[1]-4*x[0]
-    u[1]=6+7*x[1]+6*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=7
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=42+49*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[1]+3*x[0]
-    u[1]=(-5)-7*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[1]+7*x[0]
-    u[1]=(-1)+x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+x[1]+6*x[0]
-    u[1]=(-3)+3*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[1]-2*x[0]
-    u[1]=(-8)-6*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]-8*x[0]
-    u[1]=5-1*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]+8*x[0]
-    u[1]=5-4*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]-1*x[0]
-    u[1]=(-6)-7*x[1]-7*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]-1*x[0]
-    u[1]=8-2*x[1]-8*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[1]-5*x[0]
-    u[1]=(-8)-4*x[1]-4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[1]-6*x[0]
-    u[1]=(-6)-5*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]+7*x[0]
-    u[1]=(-8)-3*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]+7*x[0]
-    u[1]=8+8*x[1]-4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]-1*x[0]
-    u[1]=(-1)-4*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[1]+x[0]
-    u[1]=3+4*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[1]-6*x[0]
-    u[1]=8-8*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[1]+x[0]
-    u[1]=(-6)-4*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-7)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-6)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-9)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=3
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-8)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-3)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-1)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-4)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[1]-2*x[0]
-    u[1]=(-3)-8*x[1]+x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]-5*x[0]
-    u[1]=(-1)+4*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[1]+x[0]
-    u[1]=(-3)+3*x[1]-4*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]-1*x[0]
-    u[1]=(-9)+7*x[1]-8*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[1]-9*x[0]
-    u[1]=(-4)-9*x[1]-2*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]-5*x[0]
-    u[1]=6+5*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]-2*x[0]
-    u[1]=4-7*x[1]-7*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[1]-2*x[0]
-    u[1]=2-5*x[1]-8*x[0]
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=3
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=4
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-7)
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-2)
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=4
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-3)
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=1
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=1
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[1]+8*x[0]
-    u[1]=1-9*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[1]+6*x[0]
-    u[1]=(-4)-3*x[1]-8*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[1]+4*x[0]
-    u[1]=(-6)+3*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]-8*x[0]
-    u[1]=(-9)+6*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]-7*x[0]
-    u[1]=(-7)-3*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+8*x[0]
-    u[1]=4-9*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-7*x[1]-8*x[0]
-    u[1]=(-7)+x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]+5*x[0]
-    u[1]=8-5*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]+6*x[0]
-    u[1]=(-2)-9*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=36
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[1]-5*x[0]
-    u[1]=6-9*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=5
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]+5*x[0]
-    u[1]=(-7)+x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+x[1]-1*x[0]
-    u[1]=(-7)-5*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[1]+3*x[0]
-    u[1]=1+7*x[1]-2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=15
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[1]-6*x[0]
-    u[1]=6-8*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[1]-1*x[0]
-    u[1]=(-9)-4*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]-6*x[0]
-    u[1]=(-9)+8*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-3)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=3
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=6
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=1
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=6
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-4)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=8
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-9)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[1]+x[0]
-    u[1]=7+4*x[1]+7*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]-6*x[0]
-    u[1]=3-2*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[1]-2*x[0]
-    u[1]=(-1)+5*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[1]-9*x[0]
-    u[1]=(-4)-8*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[1]-3*x[0]
-    u[1]=(-1)+3*x[1]-4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]-9*x[0]
-    u[1]=8+5*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+6*x[0]
-    u[1]=8+2*x[1]-5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[1]+x[0]
-    u[1]=2+4*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[1]-3*x[0]
-    u[1]=8-4*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-9*x[1]-6*x[0]
-    u[1]=(-9)-6*x[1]-9*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[1]-9*x[0]
-    u[1]=(-7)+6*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]-8*x[0]
-    u[1]=(-9)-5*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]-9*x[0]
-    u[1]=5+7*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]-2*x[0]
-    u[1]=7+4*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[1]+4*x[0]
-    u[1]=3+7*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[1]+x[0]
-    u[1]=(-6)-8*x[1]+8*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=7
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=5
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-2)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=7
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=3
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-7)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=5
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=7
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[1]+3*x[0]
-    u[1]=3-1*x[1]-2*x[0]
-    u[2]=(-3)-4*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]+3*x[0]
-    u[1]=1-8*x[1]+8*x[0]
-    u[2]=7-1*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-56))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]+5*x[0]
-    u[1]=4-6*x[1]+8*x[0]
-    u[2]=(-4)+x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]-4*x[0]
-    u[1]=6+x[1]-4*x[0]
-    u[2]=4-5*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]+7*x[0]
-    u[1]=(-7)-6*x[1]+4*x[0]
-    u[2]=(-5)-8*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[1]-7*x[0]
-    u[1]=(-7)-6*x[1]+4*x[0]
-    u[2]=2+7*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(49)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]-8*x[0]
-    u[1]=5+8*x[1]+5*x[0]
-    u[2]=4+5*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[1]-6*x[0]
-    u[1]=(-1)-9*x[1]-1*x[0]
-    u[2]=(-2)+x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[1]+2*x[0]
-    u[1]=7+x[1]-2*x[0]
-    u[2]=8-3*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[1]+5*x[0]
-    u[1]=(-8)+8*x[1]-7*x[0]
-    u[2]=(-4)+7*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[1]-1*x[0]
-    u[1]=(-3)-8*x[1]-2*x[0]
-    u[2]=7-8*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[1]-8*x[0]
-    u[1]=(-4)+7*x[1]+x[0]
-    u[2]=7-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]+4*x[0]
-    u[1]=(-8)-4*x[1]-6*x[0]
-    u[2]=3-3*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]-8*x[0]
-    u[1]=(-6)-4*x[1]+x[0]
-    u[2]=(-2)+8*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[1]-2*x[0]
-    u[1]=5+2*x[1]-9*x[0]
-    u[2]=4-9*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-45))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]-3*x[0]
-    u[1]=7+2*x[1]+6*x[0]
-    u[2]=1-3*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[1]+4*x[0]
-    u[1]=(-4)-4*x[1]-7*x[0]
-    u[2]=8-2*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[1]+2*x[0]
-    u[1]=4-5*x[1]-3*x[0]
-    u[2]=1+7*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[1]+2*x[0]
-    u[1]=(-1)-8*x[1]-1*x[0]
-    u[2]=(-5)-2*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[1]-1*x[0]
-    u[1]=(-2)+x[1]-3*x[0]
-    u[2]=3+5*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[1]+5*x[0]
-    u[1]=1+6*x[1]+5*x[0]
-    u[2]=6+8*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[1]+8*x[0]
-    u[1]=2+3*x[1]-1*x[0]
-    u[2]=7-6*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]+8*x[0]
-    u[1]=5-2*x[1]-8*x[0]
-    u[2]=(-8)-6*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[1]-6*x[0]
-    u[1]=5-2*x[1]-2*x[0]
-    u[2]=1+6*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[1]+7*x[0]
-    u[1]=(-1)+8*x[1]-8*x[0]
-    u[2]=4-9*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[1]+x[0]
-    u[1]=6-3*x[1]+4*x[0]
-    u[2]=2+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[1]-8*x[0]
-    u[1]=6+6*x[1]-3*x[0]
-    u[2]=(-3)-3*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]+7*x[0]
-    u[1]=(-1)-3*x[1]+7*x[0]
-    u[2]=(-8)+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[1]+5*x[0]
-    u[1]=(-3)+2*x[1]-6*x[0]
-    u[2]=(-4)+4*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[1]-8*x[0]
-    u[1]=(-3)-4*x[1]-1*x[0]
-    u[2]=(-3)+7*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]+3*x[0]
-    u[1]=3+6*x[1]-6*x[0]
-    u[2]=(-1)+x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[1]+6*x[0]
-    u[1]=(-3)+6*x[1]-1*x[0]
-    u[2]=(-5)-5*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]+6*x[0]
-    u[1]=(-2)-7*x[1]-8*x[0]
-    u[2]=(-7)-4*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]+2*x[0]
-    u[1]=(-1)-5*x[1]-7*x[0]
-    u[2]=5+6*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-35))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]-6*x[0]
-    u[1]=1-4*x[1]+7*x[0]
-    u[2]=2-9*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]-6*x[0]
-    u[1]=(-1)+7*x[1]-2*x[0]
-    u[2]=8+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=1
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-35))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-8)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-56))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=1
-    u[2]=(-1)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=2
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=8
-    u[2]=(-8)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-3)
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-5)
-    u[2]=8
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=5
-    u[2]=2
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-2)
-    u[2]=4
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-6)
-    u[2]=4
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=8
-    u[2]=(-3)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=4
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=7
-    u[2]=(-3)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=2
-    u[2]=(-3)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-2)
-    u[2]=4
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=6
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=7
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-42))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-2*x[1]+3*x[0]
-    u[1]=4-3*x[1]-7*x[0]
-    u[2]=2+7*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]-9*x[0]
-    u[1]=(-5)-3*x[1]+2*x[0]
-    u[2]=6-6*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-72)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[1]-2*x[0]
-    u[1]=3+2*x[1]+7*x[0]
-    u[2]=(-4)-3*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[1]+3*x[0]
-    u[1]=2-8*x[1]-5*x[0]
-    u[2]=(-8)+7*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[1]+8*x[0]
-    u[1]=(-3)+x[1]-1*x[0]
-    u[2]=3-2*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]-4*x[0]
-    u[1]=(-7)-4*x[1]+6*x[0]
-    u[2]=4-2*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[1]-2*x[0]
-    u[1]=(-3)-4*x[1]+8*x[0]
-    u[2]=6-3*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]-5*x[0]
-    u[1]=1-3*x[1]+2*x[0]
-    u[2]=5+3*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]-2*x[0]
-    u[1]=3+4*x[1]+6*x[0]
-    u[2]=2+7*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[1]+8*x[0]
-    u[1]=5-8*x[1]-6*x[0]
-    u[2]=(-2)-5*x[1]+x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[1]-6*x[0]
-    u[1]=4+8*x[1]+5*x[0]
-    u[2]=5-9*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]-8*x[0]
-    u[1]=6-8*x[1]+2*x[0]
-    u[2]=(-7)-5*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-25)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]-2*x[0]
-    u[1]=(-8)+6*x[1]+5*x[0]
-    u[2]=(-8)+7*x[1]+3*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-7*x[0]
-    u[1]=(-9)+7*x[1]+3*x[0]
-    u[2]=(-4)-9*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+7*x[1]+4*x[0]
-    u[1]=(-4)-8*x[1]+4*x[0]
-    u[2]=(-3)-6*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[1]+7*x[0]
-    u[1]=(-3)-1*x[1]-9*x[0]
-    u[2]=(-8)-9*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[1]+5*x[0]
-    u[1]=(-4)-4*x[1]+3*x[0]
-    u[2]=5-6*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[1]-8*x[0]
-    u[1]=2-1*x[1]-7*x[0]
-    u[2]=(-2)+3*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[1]-2*x[0]
-    u[1]=(-5)+7*x[1]-3*x[0]
-    u[2]=(-4)+7*x[1]+8*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4-16*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[1]+3*x[0]
-    u[1]=4-8*x[1]-2*x[0]
-    u[2]=3-9*x[1]+2*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8-16*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-1*x[0]
-    u[1]=8+2*x[1]+x[0]
-    u[2]=3-1*x[1]+2*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9-3*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[1]-6*x[0]
-    u[1]=6+8*x[1]+7*x[0]
-    u[2]=6-1*x[1]+8*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=56+7*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-1*x[0]
-    u[1]=(-4)-8*x[1]-5*x[0]
-    u[2]=3+3*x[1]-5*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-24)-48*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[1]-9*x[0]
-    u[1]=(-4)-9*x[1]+5*x[0]
-    u[2]=(-9)-3*x[1]+3*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-54)-18*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]+8*x[0]
-    u[1]=(-8)-9*x[1]+8*x[0]
-    u[2]=(-9)+5*x[1]+4*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)-16*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[1]-1*x[0]
-    u[1]=(-2)+8*x[1]+6*x[0]
-    u[2]=1+8*x[1]+3*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)+16*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[1]-2*x[0]
-    u[1]=7-7*x[1]-7*x[0]
-    u[2]=4+6*x[1]-2*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=12+18*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[1]+7*x[0]
-    u[1]=7-4*x[1]-9*x[0]
-    u[2]=(-2)-9*x[1]+5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=7
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-56)-7*x[1]+49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[1]+8*x[0]
-    u[1]=(-6)-3*x[1]-9*x[0]
-    u[2]=7+6*x[1]+2*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-12)-6*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[1]-7*x[0]
-    u[1]=(-4)-8*x[1]+2*x[0]
-    u[2]=(-3)-8*x[1]+3*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,2]=5
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-15)-40*x[1]+15*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[1]+x[0]
-    u[1]=(-2)-5*x[1]-9*x[0]
-    u[2]=(-7)-7*x[1]-8*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-18)+8*x[1]+2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]+5*x[0]
-    u[1]=(-5)-8*x[1]-1*x[0]
-    u[2]=(-1)-2*x[1]-5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-10)-16*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]-3*x[0]
-    u[1]=(-2)+5*x[1]+x[0]
-    u[2]=(-8)-5*x[1]+5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,2]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-48)-30*x[1]+30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]-8*x[0]
-    u[1]=1+x[1]-7*x[0]
-    u[2]=(-3)-7*x[1]+7*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,0]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-36)-8*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]-2*x[0]
-    u[1]=(-1)-9*x[1]-6*x[0]
-    u[2]=(-7)-1*x[1]+4*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,1]=5
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-5)-45*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]-6*x[0]
-    u[1]=(-4)-7*x[1]-4*x[0]
-    u[2]=7-4*x[1]-6*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,2]=8
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=56-32*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[1]+4*x[0]
-    u[1]=(-4)-5*x[1]-3*x[0]
-    u[2]=8-7*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[1]-9*x[0]
-    u[1]=(-2)+4*x[1]+2*x[0]
-    u[2]=(-4)+8*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+3*x[1]-6*x[0]
-    u[1]=2+5*x[1]+7*x[0]
-    u[2]=(-2)-8*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[1]-6*x[0]
-    u[1]=(-9)+2*x[1]-9*x[0]
-    u[2]=(-8)-6*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]-7*x[0]
-    u[1]=(-9)+7*x[1]-5*x[0]
-    u[2]=1-3*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[1]-2*x[0]
-    u[1]=(-2)+4*x[1]+8*x[0]
-    u[2]=6+6*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]+5*x[0]
-    u[1]=1-2*x[1]+x[0]
-    u[2]=3-9*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[1]+2*x[0]
-    u[1]=7-1*x[1]+5*x[0]
-    u[2]=(-3)-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-4*x[0]
-    u[1]=(-3)-7*x[1]+x[0]
-    u[2]=4+x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]-2*x[0]
-    u[1]=4-9*x[1]-5*x[0]
-    u[2]=(-8)-9*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[1]-3*x[0]
-    u[1]=(-7)-6*x[1]+x[0]
-    u[2]=(-3)-9*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]-7*x[0]
-    u[1]=(-8)+4*x[1]+4*x[0]
-    u[2]=3-4*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[1]-4*x[0]
-    u[1]=8-9*x[1]+3*x[0]
-    u[2]=(-4)+8*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[1]+6*x[0]
-    u[1]=(-1)-2*x[1]+4*x[0]
-    u[2]=(-8)+x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]+x[0]
-    u[1]=(-1)-5*x[1]+3*x[0]
-    u[2]=4+7*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[1]-6*x[0]
-    u[1]=8+8*x[1]+6*x[0]
-    u[2]=(-8)+3*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[1]+5*x[0]
-    u[1]=(-7)+3*x[1]-1*x[0]
-    u[2]=7-9*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[1]-7*x[0]
-    u[1]=3-4*x[1]+4*x[0]
-    u[2]=3-5*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]+5*x[0]
-    u[1]=1-3*x[1]+7*x[0]
-    u[2]=1-7*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-9*x[0]
-    u[1]=4+x[1]+4*x[0]
-    u[2]=(-2)+7*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-3*x[1]-6*x[0]
-    u[1]=4-2*x[1]+3*x[0]
-    u[2]=(-8)+7*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[1]-8*x[0]
-    u[1]=(-5)-6*x[1]-2*x[0]
-    u[2]=8-1*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]-5*x[0]
-    u[1]=(-7)-5*x[1]-5*x[0]
-    u[2]=(-8)-7*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-8*x[1]-9*x[0]
-    u[1]=(-7)+5*x[1]+6*x[0]
-    u[2]=(-4)-9*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]+4*x[0]
-    u[1]=8-7*x[1]+6*x[0]
-    u[2]=(-2)+x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]-5*x[0]
-    u[1]=3-4*x[1]+8*x[0]
-    u[2]=(-2)+6*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[1]-9*x[0]
-    u[1]=(-9)-9*x[1]-1*x[0]
-    u[2]=(-7)+2*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[1]+8*x[0]
-    u[1]=5-5*x[1]-3*x[0]
-    u[2]=2+7*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]-4*x[0]
-    u[1]=7+8*x[1]-1*x[0]
-    u[2]=1+6*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]+2*x[0]
-    u[1]=(-7)-2*x[1]-9*x[0]
-    u[2]=(-1)-7*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[1]-9*x[0]
-    u[1]=(-2)+7*x[1]-8*x[0]
-    u[2]=(-3)+3*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]-8*x[0]
-    u[1]=8+x[1]+3*x[0]
-    u[2]=(-4)-2*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]-3*x[0]
-    u[1]=8-6*x[1]+8*x[0]
-    u[2]=(-5)+3*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]-8*x[0]
-    u[1]=5-1*x[1]+x[0]
-    u[2]=8+6*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[1]+8*x[0]
-    u[1]=4-6*x[1]-1*x[0]
-    u[2]=(-1)-3*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]-6*x[0]
-    u[1]=8+2*x[1]-1*x[0]
-    u[2]=1-6*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-1)
-    u[2]=1
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-5)
-    u[2]=8
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-8)
-    u[2]=(-9)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=6
-    u[2]=4
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=7
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-2)
-    u[2]=(-1)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-7)
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-7)
-    u[2]=2
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=1
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-8)
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-4)
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-4)
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=6
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-2)
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=2
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=4
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-2)
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-3)
-    u[2]=1
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[1]-4*x[0]
-    u[1]=(-1)-7*x[1]+x[0]
-    u[2]=(-9)+5*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[1]-4*x[0]
-    u[1]=5+x[1]-3*x[0]
-    u[2]=(-3)-4*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+4*x[1]-4*x[0]
-    u[1]=3+4*x[1]+2*x[0]
-    u[2]=(-6)+8*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[1]+3*x[0]
-    u[1]=7+3*x[1]-2*x[0]
-    u[2]=(-4)+5*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[1]+8*x[0]
-    u[1]=7-6*x[1]-3*x[0]
-    u[2]=6-9*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[1]+4*x[0]
-    u[1]=(-8)-8*x[1]+2*x[0]
-    u[2]=(-3)+5*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[1]-7*x[0]
-    u[1]=4+3*x[1]+3*x[0]
-    u[2]=6-6*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-7*x[1]+5*x[0]
-    u[1]=(-6)-7*x[1]-4*x[0]
-    u[2]=(-9)+2*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[1]-1*x[0]
-    u[1]=7+7*x[1]+5*x[0]
-    u[2]=(-1)-3*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[1]+4*x[0]
-    u[1]=4+2*x[1]-8*x[0]
-    u[2]=6-6*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[1]+2*x[0]
-    u[1]=(-5)+3*x[1]-7*x[0]
-    u[2]=(-6)+2*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]-7*x[0]
-    u[1]=4-2*x[1]+4*x[0]
-    u[2]=3-2*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[1]-7*x[0]
-    u[1]=(-4)+2*x[1]+5*x[0]
-    u[2]=(-3)-9*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]+8*x[0]
-    u[1]=(-5)+5*x[1]+x[0]
-    u[2]=4+x[1]-1*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-6*x[1]+x[0]
-    u[1]=(-1)+x[1]+4*x[0]
-    u[2]=5+3*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]-8*x[0]
-    u[1]=(-3)+x[1]+8*x[0]
-    u[2]=(-2)-2*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[1]-1*x[0]
-    u[1]=7+7*x[1]-9*x[0]
-    u[2]=1-5*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[1]+5*x[0]
-    u[1]=(-6)+2*x[1]+5*x[0]
-    u[2]=2-8*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=3
-    u[2]=4
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=3
-    u[2]=(-9)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-5)
-    u[2]=(-3)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-8)
-    u[2]=7
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=1
-    u[2]=(-2)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-9)
-    u[2]=6
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-5)
-    u[2]=(-2)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=3
-    u[2]=(-3)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-8)
-    u[2]=8
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-3)
-    u[2]=(-2)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=5
-    u[2]=3
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-6)
-    u[2]=2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=4
-    u[2]=6
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=1
-    u[2]=5
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-8)
-    u[2]=(-2)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-2)
-    u[2]=(-3)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=2
-    u[2]=8
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=2
-    u[2]=(-1)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]-2*x[0]
-    u[1]=1-1*x[1]-7*x[0]
-    u[2]=(-3)-8*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[1]-7*x[0]
-    u[1]=5-4*x[1]-6*x[0]
-    u[2]=(-1)+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[1]-7*x[0]
-    u[1]=(-5)+x[1]-4*x[0]
-    u[2]=4-5*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[1]-7*x[0]
-    u[1]=(-7)+3*x[1]+x[0]
-    u[2]=8-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[1]+3*x[0]
-    u[1]=1+4*x[1]+3*x[0]
-    u[2]=(-2)-1*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[1]-9*x[0]
-    u[1]=(-2)+8*x[1]-7*x[0]
-    u[2]=(-7)+5*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[1]+6*x[0]
-    u[1]=5+3*x[1]+8*x[0]
-    u[2]=(-4)-6*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[1]-5*x[0]
-    u[1]=7+7*x[1]+2*x[0]
-    u[2]=(-9)-3*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]+7*x[0]
-    u[1]=1+2*x[1]-9*x[0]
-    u[2]=(-5)-9*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[1]-5*x[0]
-    u[1]=(-7)+6*x[1]+6*x[0]
-    u[2]=1-8*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]-2*x[0]
-    u[1]=7-9*x[1]-4*x[0]
-    u[2]=4-4*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]-3*x[0]
-    u[1]=6+x[1]+7*x[0]
-    u[2]=(-7)+3*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[1]-5*x[0]
-    u[1]=8+7*x[1]-6*x[0]
-    u[2]=7-1*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[1]+5*x[0]
-    u[1]=7+x[1]+4*x[0]
-    u[2]=(-5)+4*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-1*x[1]+x[0]
-    u[1]=(-8)-1*x[1]-6*x[0]
-    u[2]=4-6*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[1]-1*x[0]
-    u[1]=8+8*x[1]+4*x[0]
-    u[2]=(-4)-5*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[1]+6*x[0]
-    u[1]=6+8*x[1]+4*x[0]
-    u[2]=5+2*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-9*x[1]+7*x[0]
-    u[1]=7+5*x[1]-4*x[0]
-    u[2]=7-4*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]-8*x[0]
-    u[1]=(-7)-8*x[1]+7*x[0]
-    u[2]=4+2*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[1]+x[0]
-    u[1]=(-2)-9*x[1]+2*x[0]
-    u[2]=(-1)-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]+2*x[0]
-    u[1]=2+x[1]-1*x[0]
-    u[2]=8+4*x[1]+5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]+5*x[0]
-    u[1]=8+8*x[1]+7*x[0]
-    u[2]=1+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+4*x[0]
-    u[1]=(-4)-7*x[1]+5*x[0]
-    u[2]=8-7*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[1]-7*x[0]
-    u[1]=(-8)+2*x[1]-3*x[0]
-    u[2]=(-2)+8*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[1]-2*x[0]
-    u[1]=(-9)+4*x[1]+8*x[0]
-    u[2]=1-8*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[1]+4*x[0]
-    u[1]=(-4)-3*x[1]-3*x[0]
-    u[2]=(-8)-1*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[1]+8*x[0]
-    u[1]=8+8*x[1]+8*x[0]
-    u[2]=(-9)-9*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]-3*x[0]
-    u[1]=4-7*x[1]+6*x[0]
-    u[2]=(-7)+5*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-3*x[0]
-    u[1]=3+4*x[1]-6*x[0]
-    u[2]=(-5)-5*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]+x[0]
-    u[1]=(-3)-3*x[1]-4*x[0]
-    u[2]=6+x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[1]+3*x[0]
-    u[1]=3-8*x[1]+x[0]
-    u[2]=(-7)+5*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]-3*x[0]
-    u[1]=4-2*x[1]+7*x[0]
-    u[2]=(-3)+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[1]-2*x[0]
-    u[1]=1+x[1]-8*x[0]
-    u[2]=6-6*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[1]-4*x[0]
-    u[1]=(-7)-9*x[1]+6*x[0]
-    u[2]=(-9)-7*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[1]-7*x[0]
-    u[1]=5+2*x[1]-5*x[0]
-    u[2]=(-9)+4*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[1]-4*x[0]
-    u[1]=3-4*x[1]-7*x[0]
-    u[2]=1+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=1
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=5
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-2)
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=7
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=42
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-1)
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=5
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=15
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=6
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=8
-    u[2]=1
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=6
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-4)
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-1)
-    u[2]=4
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-1)
-    u[2]=1
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-9)
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-2)
-    u[2]=(-1)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=4
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-5)
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-3)
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=7
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-2)
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]+4*x[0]
-    u[1]=1-8*x[1]+4*x[0]
-    u[2]=(-9)+8*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[1]+x[0]
-    u[1]=2-7*x[1]+5*x[0]
-    u[2]=4-3*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]+x[0]
-    u[1]=3-3*x[1]+5*x[0]
-    u[2]=(-4)+x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]-6*x[0]
-    u[1]=2-5*x[1]-8*x[0]
-    u[2]=3+x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[1]+x[0]
-    u[1]=2-7*x[1]-3*x[0]
-    u[2]=(-7)+6*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]-4*x[0]
-    u[1]=(-8)+6*x[1]+2*x[0]
-    u[2]=(-6)-1*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[1]+6*x[0]
-    u[1]=(-4)-8*x[1]-9*x[0]
-    u[2]=3-8*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[1]-7*x[0]
-    u[1]=(-8)-3*x[1]+3*x[0]
-    u[2]=7-5*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[1]+8*x[0]
-    u[1]=(-3)+3*x[1]+5*x[0]
-    u[2]=(-8)-3*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]-1*x[0]
-    u[1]=3+3*x[1]+x[0]
-    u[2]=1-1*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[1]-5*x[0]
-    u[1]=(-1)+4*x[1]+6*x[0]
-    u[2]=7-1*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[1]-4*x[0]
-    u[1]=3-3*x[1]-8*x[0]
-    u[2]=(-8)-5*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+6*x[1]+5*x[0]
-    u[1]=6-7*x[1]+7*x[0]
-    u[2]=(-3)-8*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[1]-7*x[0]
-    u[1]=6-4*x[1]-1*x[0]
-    u[2]=(-9)+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]-2*x[0]
-    u[1]=(-4)-4*x[1]-1*x[0]
-    u[2]=3+6*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]-5*x[0]
-    u[1]=(-3)-7*x[1]+2*x[0]
-    u[2]=2+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]-8*x[0]
-    u[1]=(-3)+4*x[1]-7*x[0]
-    u[2]=2-7*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[1]+8*x[0]
-    u[1]=2+8*x[1]-7*x[0]
-    u[2]=5+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[1]+6*x[0]
-    u[1]=6+x[1]+7*x[0]
-    u[2]=8+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[1]-6*x[0]
-    u[1]=3+8*x[1]-8*x[0]
-    u[2]=(-9)+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[1]+8*x[0]
-    u[1]=(-2)-4*x[1]+6*x[0]
-    u[2]=1+2*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-3*x[1]-1*x[0]
-    u[1]=4+x[1]-8*x[0]
-    u[2]=(-7)-1*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-1*x[1]+8*x[0]
-    u[1]=(-8)-6*x[1]-4*x[0]
-    u[2]=(-3)-6*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[1]+3*x[0]
-    u[1]=(-5)-3*x[1]-5*x[0]
-    u[2]=(-2)-7*x[1]-5*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]-3*x[0]
-    u[1]=(-9)+5*x[1]+3*x[0]
-    u[2]=2-9*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]+6*x[0]
-    u[1]=8+8*x[1]-3*x[0]
-    u[2]=(-1)+x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]+5*x[0]
-    u[1]=2+5*x[1]-4*x[0]
-    u[2]=(-8)+x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]-3*x[0]
-    u[1]=(-8)-6*x[1]-2*x[0]
-    u[2]=3+x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[1]+2*x[0]
-    u[1]=(-2)-7*x[1]+2*x[0]
-    u[2]=(-4)-4*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[1]+5*x[0]
-    u[1]=1+6*x[1]-9*x[0]
-    u[2]=2-7*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[1]-6*x[0]
-    u[1]=4-4*x[1]+7*x[0]
-    u[2]=2-3*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]+2*x[0]
-    u[1]=7+8*x[1]+8*x[0]
-    u[2]=(-8)+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[1]+x[0]
-    u[1]=4+7*x[1]+7*x[0]
-    u[2]=(-7)-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[1]+x[0]
-    u[1]=(-7)+8*x[1]-9*x[0]
-    u[2]=(-9)-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[1]+3*x[0]
-    u[1]=(-5)-6*x[1]+6*x[0]
-    u[2]=(-7)+5*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[1]-5*x[0]
-    u[1]=(-5)-7*x[1]-3*x[0]
-    u[2]=(-5)-9*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=7
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=7
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=3
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-7)
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-7)
-    u[2]=(-3)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=5
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=8
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=2
-    u[2]=(-6)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=5
-    u[2]=(-3)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=6
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-6)
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=8
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=3
-    u[2]=(-8)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-5)
-    u[2]=(-3)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-2)
-    u[2]=5
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=1
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-1)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-4)
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-
-class Test_assemblage_2Do1_Contact(unittest.TestCase):
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(2,[1,0])
-     out.setTaggedValue(1,[-1,0])
-     out.setTaggedValue(20, [0,1])
-     out.setTaggedValue(10, [0,-1])
-     return out
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Const_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=(-6)+4*x[1]+7*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=3
-    Y_test=(-21)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-18)+12*x[1]+21*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*(18-12*x[1]-21*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Const_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=(-4)-3*x[1]+5*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=5
-    Y_test=15
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-20)-15*x[1]+25*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-6)+x[1]-6*x[0])*jump
-    d_contact_test=Data(4,(),FunctionOnContactZero(self.domain))
-    y_contact_test=(-24)+4*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Vario_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=4+6*x[1]+2*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=(-4)-6*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(4*x[0]+6*x[0]*x[1]+2*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*((-4)*x[0]-6*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_B_Vario_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=7+5*x[1]+8*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=(-7)-10*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(7*x[1]+5*x[1]**2+8*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(8)*jump
-    d_contact_test=interpolate(x[0],FunctionOnContactZero(self.domain))
-    y_contact_test=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]-4*x[0]
-    u[1]=(-7)-1*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6-1*x[1]-4*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-6)+x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[1]+7*x[0]
-    u[1]=4+6*x[1]-6*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=42
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(28+42*x[1]-42*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-28)-42*x[1]+42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[1]+3*x[0]
-    u[1]=(-4)-5*x[1]-6*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-42)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7+42*x[1]+21*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]-3*x[0]
-    u[1]=7-2*x[1]+4*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(14-4*x[1]+8*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[1]+2*x[0]
-    u[1]=1+5*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-5)+8*x[1]+2*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(5-8*x[1]-2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]+2*x[0]
-    u[1]=(-8)-3*x[1]+5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)-3*x[1]+5*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(8+3*x[1]-5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[1]-2*x[0]
-    u[1]=(-1)+5*x[1]+3*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=40
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8-40*x[1]-16*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[1]-4*x[0]
-    u[1]=(-2)-7*x[1]+4*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)-7*x[1]+4*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(8-3*x[1]+6*x[0])*jump
-    u[1]=(2-6*x[1]+7*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=7
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=56-21*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-6)-7*x[1]+3*x[0])*jump
-    u[1]=((-8)-5*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=6
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-48)-30*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(2-6*x[1]-7*x[0])*jump
-    u[1]=((-3)-3*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=7
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=14-42*x[1]-49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(3+8*x[1]+3*x[0])*jump
-    u[1]=((-6)-7*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=6
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-36)-42*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-3*x[0]
-    u[1]=(-8)-3*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)-3*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]+3*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-4)*x[0]-3*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]-9*x[0]
-    u[1]=4+7*x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)-7*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]+7*x[0]*x[1]-5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-4)*x[0]-7*x[0]*x[1]+5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[1]-1*x[0]
-    u[1]=(-3)-8*x[1]+x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7+4*x[1]+x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1]-2*x[1]**2-1*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[1]-1*x[0]
-    u[1]=3+5*x[1]-2*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)-10*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1]+5*x[1]**2-2*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[1]-1*x[0]
-    u[1]=(-3)+6*x[1]-8*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8-3*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0]+3*x[0]*x[1]-1*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(8*x[0]-3*x[0]*x[1]+x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]-2*x[0]
-    u[1]=7-4*x[1]-4*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)+4*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7*x[0]-4*x[0]*x[1]-4*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-7)*x[0]+4*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]+7*x[0]
-    u[1]=7-7*x[1]-6*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)-16*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(4*x[1]+8*x[1]**2+7*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-5*x[0]
-    u[1]=(-8)-6*x[1]-2*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8+12*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1]-6*x[1]**2-2*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=((-4))*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-6))*jump
-    u[1]=(8)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-6))*jump
-    u[1]=((-3))*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-4))*jump
-    u[1]=((-3))*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[1]-1*x[0]
-    u[1]=2+8*x[1]-3*x[0]
-    u[2]=(-9)+2*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-20)+20*x[1]-4*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(20-20*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[1]+x[0]
-    u[1]=2-9*x[1]-5*x[0]
-    u[2]=(-8)+6*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=35
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(14-63*x[1]-35*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-14)+63*x[1]+35*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]-5*x[0]
-    u[1]=(-5)-9*x[1]+8*x[0]
-    u[2]=5-9*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(5-9*x[1]-2*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-5)+9*x[1]+2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]-3*x[0]
-    u[1]=(-1)+8*x[1]+5*x[0]
-    u[2]=(-4)-4*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(30+5*x[1]-15*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]+4*x[0]
-    u[1]=(-8)+6*x[1]-1*x[0]
-    u[2]=(-6)-1*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-40)+30*x[1]-5*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[1]+x[0]
-    u[1]=(-2)+7*x[1]+7*x[0]
-    u[2]=(-1)+8*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-56)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)+56*x[1]-35*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[1]+3*x[0]
-    u[1]=6-5*x[1]-3*x[0]
-    u[2]=(-7)-6*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)+2*x[1]+3*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(1-2*x[1]-3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[1]+5*x[0]
-    u[1]=2+2*x[1]-4*x[0]
-    u[2]=(-5)-9*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12+12*x[1]-24*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-12)-12*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[1]-3*x[0]
-    u[1]=2-8*x[1]+x[0]
-    u[2]=5+7*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=28
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(20+28*x[1]-28*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-20)-28*x[1]+28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[1]+2*x[0]
-    u[1]=8-4*x[1]-9*x[0]
-    u[2]=8-8*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=16
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-16)-16*x[1]+16*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[1]-1*x[0]
-    u[1]=8-6*x[1]+4*x[0]
-    u[2]=7+3*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=48
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(64-48*x[1]+32*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[1]+2*x[0]
-    u[1]=5-1*x[1]+8*x[0]
-    u[2]=2+8*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-32)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8+32*x[1]-36*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[1]+5*x[0]
-    u[1]=2-1*x[1]+x[0]
-    u[2]=(-1)+4*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-40)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(32-72*x[1]+40*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-32)+72*x[1]-40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]+8*x[0]
-    u[1]=5-4*x[1]-9*x[0]
-    u[2]=(-8)+6*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=63
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(35-28*x[1]-63*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-35)+28*x[1]+63*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]-3*x[0]
-    u[1]=4+7*x[1]+4*x[0]
-    u[2]=3-5*x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(15-25*x[1]-5*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-15)+25*x[1]+5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]-6*x[0]
-    u[1]=3+x[1]+x[0]
-    u[2]=(-5)-4*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-10)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(8+10*x[1]-12*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]+5*x[0]
-    u[1]=(-8)+7*x[1]+8*x[0]
-    u[2]=8+x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-14)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-16)+14*x[1]+16*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[1]+5*x[0]
-    u[1]=(-5)-6*x[1]-3*x[0]
-    u[2]=7+8*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-40)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(35+40*x[1]+35*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(5+8*x[1]+4*x[0])*jump
-    u[1]=((-9)+3*x[1]+7*x[0])*jump
-    u[2]=((-9)-5*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=30+48*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6-9*x[1]+8*x[0])*jump
-    u[1]=((-2)+8*x[1]-2*x[0])*jump
-    u[2]=(4-7*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-10)+40*x[1]-10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4-9*x[1]+2*x[0])*jump
-    u[1]=(4-9*x[1]+7*x[0])*jump
-    u[2]=(8-7*x[1]+8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=16-14*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2-4*x[1]+6*x[0])*jump
-    u[1]=(5+6*x[1]-5*x[0])*jump
-    u[2]=((-3)-4*x[1]-4*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=6-12*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+5*x[1]-6*x[0])*jump
-    u[1]=(2-5*x[1]+7*x[0])*jump
-    u[2]=((-2)+3*x[1]+8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=1
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=2-5*x[1]+7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6)-6*x[1]+2*x[0])*jump
-    u[1]=((-8)-6*x[1]-9*x[0])*jump
-    u[2]=(2+8*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=12+48*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-4)-4*x[1]-4*x[0])*jump
-    u[1]=(1-3*x[1]-7*x[0])*jump
-    u[2]=((-6)-5*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-28)-28*x[1]-28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3+4*x[1]+8*x[0])*jump
-    u[1]=(7+8*x[1]+6*x[0])*jump
-    u[2]=((-7)-6*x[1]+4*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=28+32*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)-2*x[1]-3*x[0])*jump
-    u[1]=(3+4*x[1]+3*x[0])*jump
-    u[2]=(8+6*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=40+30*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-1*x[0]
-    u[1]=(-7)+x[1]+2*x[0]
-    u[2]=3-8*x[1]+2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)-5*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0]+5*x[0]*x[1]-1*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-8)*x[0]-5*x[0]*x[1]+x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]+2*x[0]
-    u[1]=(-6)-7*x[1]-8*x[0]
-    u[2]=8-1*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6+7*x[1]+16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0]-7*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(6*x[0]+7*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]-5*x[0]
-    u[1]=4+7*x[1]+2*x[0]
-    u[2]=(-7)+7*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7-7*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)*x[0]+7*x[0]*x[1]+7*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(7*x[0]-7*x[0]*x[1]-7*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[1]+2*x[0]
-    u[1]=(-7)+2*x[1]-1*x[0]
-    u[2]=8+4*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)-8*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6*x[1]+4*x[1]**2+2*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]-3*x[0]
-    u[1]=(-2)-5*x[1]+6*x[0]
-    u[2]=(-5)-4*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2+10*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1]-5*x[1]**2+6*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]+6*x[0]
-    u[1]=4-2*x[1]-2*x[0]
-    u[2]=(-3)+8*x[1]+6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3-16*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1]+8*x[1]**2+6*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]+2*x[0]
-    u[1]=(-1)-9*x[1]-4*x[0]
-    u[2]=5+8*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6-4*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0]+4*x[0]*x[1]+2*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(6*x[0]-4*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]-7*x[0]
-    u[1]=(-7)+8*x[1]-9*x[0]
-    u[2]=(-2)+3*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7-8*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-7)*x[0]+8*x[0]*x[1]-9*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(7*x[0]-8*x[0]*x[1]+9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-7*x[0]
-    u[1]=(-5)-4*x[1]+4*x[0]
-    u[2]=(-8)-4*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8+4*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0]-4*x[0]*x[1]-4*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(8*x[0]+4*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+8*x[0]
-    u[1]=1+6*x[1]-3*x[0]
-    u[2]=(-6)+3*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)+14*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1]-7*x[1]**2+8*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]+7*x[0]
-    u[1]=(-3)+4*x[1]+6*x[0]
-    u[2]=(-4)-1*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3-8*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1]+4*x[1]**2+6*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]+5*x[0]
-    u[1]=(-1)-9*x[1]-7*x[0]
-    u[2]=(-3)+x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3-2*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1]+x[1]**2-6*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]-3*x[0]
-    u[1]=7+x[1]+4*x[0]
-    u[2]=(-9)+2*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)+5*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(2*x[0]-5*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-2)*x[0]+5*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[1]-3*x[0]
-    u[1]=(-8)+4*x[1]-3*x[0]
-    u[2]=2-7*x[1]+2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8-4*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-8)*x[0]+4*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(8*x[0]-4*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]+8*x[0]
-    u[1]=6-4*x[1]-6*x[0]
-    u[2]=5-1*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)+x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(5*x[0]-1*x[0]*x[1]+5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-5)*x[0]+x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[1]+3*x[0]
-    u[1]=(-2)+5*x[1]-4*x[0]
-    u[2]=(-7)+7*x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7-16*x[1]-3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-7)*x[1]+8*x[1]**2+3*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[1]-8*x[0]
-    u[1]=5-4*x[1]-4*x[0]
-    u[2]=(-1)-2*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)+8*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(5*x[1]-4*x[1]**2-4*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]-9*x[0]
-    u[1]=5-6*x[1]+7*x[0]
-    u[2]=7-6*x[1]+6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)+12*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1]-6*x[1]**2+6*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2)*jump
-    u[1]=(7)*jump
-    u[2]=((-2))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6))*jump
-    u[1]=(5)*jump
-    u[2]=((-5))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(8)*jump
-    u[1]=(8)*jump
-    u[2]=(7)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6)*jump
-    u[1]=((-1))*jump
-    u[2]=((-5))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8))*jump
-    u[1]=(8)*jump
-    u[2]=(4)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4)*jump
-    u[1]=((-6))*jump
-    u[2]=((-9))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7))*jump
-    u[1]=((-3))*jump
-    u[2]=(6)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(1)*jump
-    u[1]=((-9))*jump
-    u[2]=((-3))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6)*jump
-    u[1]=(8)*jump
-    u[2]=((-4))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(4+3*x[1]-9*x[0])*jump
-    d_contact_test=Data(2,(),ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=8+6*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-6))*jump
-    d_contact_test=interpolate(x[0],ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(1+6*x[1]+4*x[0])*jump
-    u[1]=(3-3*x[1]-5*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=2
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=2+12*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-4)-8*x[1]-5*x[0])*jump
-    u[1]=((-4)+6*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=8
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-32)+48*x[1]+40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(6+3*x[1]-7*x[0])*jump
-    u[1]=((-8)-5*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=6
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=36+18*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(6-2*x[1]-4*x[0])*jump
-    u[1]=(5-5*x[1]+6*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=2
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=10-10*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(3)*jump
-    u[1]=((-5))*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(5)*jump
-    u[1]=((-8))*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-4))*jump
-    u[1]=(7)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(8)*jump
-    u[1]=(8)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)-5*x[1]+4*x[0])*jump
-    u[1]=(2+6*x[1]-6*x[0])*jump
-    u[2]=((-6)-4*x[1]-2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-24)-15*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5)+5*x[1]+8*x[0])*jump
-    u[1]=(5+7*x[1]-9*x[0])*jump
-    u[2]=(2+6*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=25+35*x[1]-45*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(5-1*x[1]-6*x[0])*jump
-    u[1]=((-1)-3*x[1]-7*x[0])*jump
-    u[2]=((-6)+7*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=1
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-6)+7*x[1]+5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)-1*x[1]-3*x[0])*jump
-    u[1]=(6+4*x[1]-3*x[0])*jump
-    u[2]=((-4)-2*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)-8*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4+4*x[1]-9*x[0])*jump
-    u[1]=((-5)-4*x[1]-9*x[0])*jump
-    u[2]=(2+8*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-30)-24*x[1]-54*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)-3*x[1]-3*x[0])*jump
-    u[1]=((-9)-7*x[1]+7*x[0])*jump
-    u[2]=((-2)-9*x[1]-3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-6)-27*x[1]-9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3-9*x[1]-9*x[0])*jump
-    u[1]=(4+4*x[1]-4*x[0])*jump
-    u[2]=((-6)-5*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=24-72*x[1]-72*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6)-9*x[1]+6*x[0])*jump
-    u[1]=((-4)-3*x[1]-9*x[0])*jump
-    u[2]=(2+7*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-16)-12*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)+6*x[1]-3*x[0])*jump
-    u[1]=(1+7*x[1]-8*x[0])*jump
-    u[2]=((-1)+x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-8)+8*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6))*jump
-    u[1]=((-8))*jump
-    u[2]=(5)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-2))*jump
-    u[1]=(2)*jump
-    u[2]=((-3))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=((-5))*jump
-    u[2]=((-7))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1))*jump
-    u[1]=(4)*jump
-    u[2]=((-1))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7))*jump
-    u[1]=(2)*jump
-    u[2]=((-6))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(5)*jump
-    u[1]=((-9))*jump
-    u[2]=(2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-4))*jump
-    u[1]=((-5))*jump
-    u[2]=(4)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3)*jump
-    u[1]=(8)*jump
-    u[2]=(5)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-3))*jump
-    u[1]=((-2))*jump
-    u[2]=((-1))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-
diff --git a/escriptcore/test/python/test_assemblage_2Do2.py b/escriptcore/test/python/test_assemblage_2Do2.py
deleted file mode 100644
index b361ff5..0000000
--- a/escriptcore/test/python/test_assemblage_2Do2.py
+++ /dev/null
@@ -1,18022 +0,0 @@
-
-##############################################################################
-#
-# Copyright (c) 2003-2016 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-2016 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"
-
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-from esys.escript import *
-from esys.escript.linearPDEs import LinearPDE
-
-class Test_assemblage_2Do2(unittest.TestCase):
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(2,[1,0])
-     out.setTaggedValue(1,[-1,0])
-     out.setTaggedValue(20, [0,1])
-     out.setTaggedValue(10, [0,-1])
-     return out
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-5)-2*x[1]+x[1]**2-7*x[0]+5*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=4
-    Y_test=(-64)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-28)+20*x[1]+64*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    
-    op=pde.getOperator()
-    fs=Data(u,pde.getFunctionSpaceForSolution())
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=6-6*x[1]-9*x[1]**2-4*x[0]-2*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=3
-    Y_test=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-18)-54*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=5+8*x[1]-9*x[1]**2+8*x[0]-4*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=6
-    Y_test=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(48-24*x[1]-36*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=2-1*x[1]-5*x[1]**2+8*x[0]-6*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=7
-    Y_test=70
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-7)-70*x[1]-42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-3)+8*x[1]-8*x[1]**2-2*x[0]+5*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=2
-    Y_test=4-10*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-6)+16*x[1]-16*x[1]**2-4*x[0]+10*x[0]*x[1]+2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-8)-4*x[1]+3*x[1]**2-1*x[0]-7*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=4
-    Y_test=16-24*x[1]+28*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-32)-16*x[1]+12*x[1]**2-4*x[0]-28*x[0]*x[1]-24*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_C_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=7-7*x[1]-6*x[1]**2-4*x[0]+4*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[0]=2
-    Y_test=(-8)+8*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_C_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=6+7*x[1]+3*x[1]**2-5*x[0]-3*x[0]*x[1]+8*x[0]**2
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[1]=1
-    Y_test=7+6*x[1]-3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_D_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=7+2*x[1]+2*x[1]**2-6*x[0]+4*x[0]*x[1]-9*x[0]**2
-    D_test=Data(7,(),Function(self.domain))
-    Y_test=49+14*x[1]+14*x[1]**2-42*x[0]+28*x[0]*x[1]-63*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_d_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=(-4)-1*x[1]-7*x[1]**2-8*x[0]+3*x[0]*x[1]-8*x[0]**2
-    d_test=Data(7,(),FunctionOnBoundary(self.domain))
-    y_test=(-28)-7*x[1]-49*x[1]**2-56*x[0]+21*x[0]*x[1]-56*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=7-9*x[1]-1*x[1]**2-2*x[0]-8*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=x[0]
-    Y_test=2+8*x[1]+24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-2)*x[0]-8*x[0]*x[1]-12*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=6+7*x[1]-6*x[1]**2+3*x[0]-3*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=x[0]
-    Y_test=(-7)+12*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(7*x[0]-12*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-1)+8*x[1]+2*x[1]**2+x[0]+2*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=x[1]
-    Y_test=(-1)-4*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(x[1]+2*x[1]**2-18*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=(-5)+5*x[1]-4*x[1]**2-2*x[0]-9*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=x[1]
-    Y_test=(-5)+16*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(5*x[1]-8*x[1]**2-9*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=3-5*x[1]+8*x[1]**2+2*x[0]-3*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=(-3)+5*x[1]-8*x[1]**2-4*x[0]+6*x[0]*x[1]-12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(3*x[0]-5*x[0]*x[1]+8*x[0]*x[1]**2+2*x[0]**2-3*x[0]**2*x[1]+4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-7)+3*x[1]+4*x[1]**2-3*x[0]-9*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=7-6*x[1]-12*x[1]**2+3*x[0]+18*x[0]*x[1]-2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-7)*x[1]+3*x[1]**2+4*x[1]**3-3*x[0]*x[1]-9*x[0]*x[1]**2+2*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_C_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-8)+6*x[1]-7*x[1]**2-4*x[0]-2*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[0]=x[0]
-    Y_test=(-4)*x[0]-2*x[0]*x[1]-14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_C_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=8-8*x[1]-5*x[1]**2-9*x[0]-1*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(2,),Function(self.domain))
-    C_test[1]=x[1]
-    Y_test=(-8)*x[1]-10*x[1]**2-1*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_D_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=1+8*x[1]+2*x[0]
-    D_test=Function(self.domain).getX()[0]
-    Y_test=x[0]+8*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_d_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=(-1)+5*x[1]-9*x[0]
-    d_test=interpolate(x[0],FunctionOnBoundary(self.domain))
-    y_test=(-1)*x[0]+5*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=(-8)-3*x[1]+8*x[1]**2+6*x[0]+6*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=8
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=48+48*x[1]-144*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-4)-5*x[1]+x[1]**2-1*x[0]+7*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=2
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-10)+4*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=(-4)-9*x[1]-2*x[1]**2-4*x[0]+4*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=8
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-32)+32*x[1]-128*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Const_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=(-8)-7*x[1]-2*x[1]**2+8*x[0]+7*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=3
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-21)-12*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Const_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=3-6*x[1]+5*x[1]**2-8*x[0]+7*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=2
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=6-12*x[1]+10*x[1]**2-16*x[0]+14*x[0]*x[1]-10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Const_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-7)-4*x[1]-2*x[1]**2+8*x[0]+4*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=3
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-21)-12*x[1]-6*x[1]**2+24*x[0]+12*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=5-4*x[1]+7*x[1]**2+3*x[0]-5*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=3*x[0]-5*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-9)+x[1]-6*x[1]**2+x[0]+5*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[0,1]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=x[0]-12*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=5-3*x[1]-2*x[1]**2-4*x[0]+6*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,0]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-4)*x[1]+6*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_A_Vario_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=6+8*x[1]-6*x[1]**2+2*x[0]-7*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2),Function(self.domain))
-    A_test[1,1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=8*x[1]-12*x[1]**2-7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Vario_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-1)-7*x[1]+7*x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-1)*x[0]-7*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Vario_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=4-5*x[1]+x[0]
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=4*x[1]-5*x[1]**2+x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]-9*x[1]**2-4*x[0]+x[0]*x[1]+x[0]**2
-    u[1]=(-1)-9*x[1]+4*x[1]**2-1*x[0]-3*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)+2*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[1]+3*x[1]**2-3*x[0]-4*x[0]*x[1]+3*x[0]**2
-    u[1]=(-6)-7*x[1]-3*x[1]**2+4*x[0]+6*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(12+18*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[1]-3*x[1]**2-8*x[0]-6*x[0]*x[1]-4*x[0]**2
-    u[1]=6-8*x[1]+x[1]**2+4*x[0]-9*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-84)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(24-54*x[1]+84*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[1]+2*x[1]**2+3*x[0]-7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-2)-2*x[1]+8*x[1]**2+8*x[0]+2*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)+48*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[1]-5*x[1]**2-4*x[0]+5*x[0]*x[1]+5*x[0]**2
-    u[1]=(-8)-8*x[1]-3*x[1]**2-1*x[0]+8*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-35)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-28)+35*x[1]+70*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[1]+6*x[1]**2-8*x[0]-9*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)+4*x[1]-8*x[1]**2+7*x[0]+8*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-36)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-21)+36*x[1]-27*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[1]+x[1]**2-9*x[0]-8*x[0]*x[1]+4*x[0]**2
-    u[1]=8+5*x[1]-8*x[1]**2-8*x[0]+7*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-42)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-48)+42*x[1]+72*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[1]-3*x[1]**2+6*x[0]-8*x[0]*x[1]-6*x[0]**2
-    u[1]=(-2)+x[1]+x[1]**2+3*x[0]+4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4+8*x[1]+16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[1]-6*x[1]**2-9*x[0]-9*x[0]*x[1]-1*x[0]**2
-    u[1]=(-3)+7*x[1]+3*x[1]**2-7*x[0]+6*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)-9*x[1]-2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]+6*x[1]**2-4*x[0]+7*x[0]*x[1]+8*x[0]**2
-    u[1]=(-1)+2*x[1]+3*x[1]**2+6*x[0]+4*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-21)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(9+36*x[1]+21*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[1]-2*x[1]**2+3*x[0]-6*x[0]*x[1]+8*x[0]**2
-    u[1]=1+x[1]-6*x[1]**2-5*x[0]+x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-14)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-5)+x[1]+14*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[1]-4*x[1]**2+x[0]-7*x[0]*x[1]-3*x[0]**2
-    u[1]=2+2*x[1]+7*x[1]**2-8*x[0]-4*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=20
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(10+70*x[1]-20*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[1]-4*x[1]**2-4*x[0]-6*x[0]*x[1]+x[0]**2
-    u[1]=1+3*x[1]-6*x[1]**2-4*x[0]-8*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=36
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-24)-36*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[1]+8*x[1]**2+2*x[0]-7*x[0]*x[1]+8*x[0]**2
-    u[1]=(-3)+3*x[1]+4*x[1]**2+4*x[0]-6*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-112)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-28)+112*x[1]-49*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]-4*x[1]**2-8*x[0]+5*x[0]*x[1]-1*x[0]**2
-    u[1]=(-2)-9*x[1]+8*x[1]**2-5*x[0]-1*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-35)-7*x[1]-112*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]+2*x[1]**2-2*x[0]-9*x[0]*x[1]-6*x[0]**2
-    u[1]=(-9)-6*x[1]+5*x[1]**2-3*x[0]+x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-80)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-48)+80*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[1]+6*x[1]**2-4*x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[1]=(-6)+4*x[1]-3*x[1]**2-2*x[0]-5*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=20+10*x[1]-30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(35+25*x[1]+30*x[1]**2-20*x[0]-10*x[0]*x[1]+15*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[1]-9*x[1]**2-8*x[0]+x[0]*x[1]+8*x[0]**2
-    u[1]=(-8)-2*x[1]-4*x[1]**2-9*x[0]-3*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=63+21*x[1]-70*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-56)-14*x[1]-28*x[1]**2-63*x[0]-21*x[0]*x[1]+35*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[1]-3*x[1]**2+5*x[0]-3*x[0]*x[1]+7*x[0]**2
-    u[1]=(-8)-8*x[1]+3*x[1]**2-5*x[0]+6*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)+12*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)+2*x[1]-6*x[1]**2+10*x[0]-6*x[0]*x[1]+14*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]-9*x[1]**2+2*x[0]-1*x[0]*x[1]-4*x[0]**2
-    u[1]=(-2)-9*x[1]+4*x[1]**2+x[0]+6*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=18-16*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)-18*x[1]+8*x[1]**2+2*x[0]+12*x[0]*x[1]-12*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[1]-1*x[1]**2-8*x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[1]=6+x[1]-9*x[1]**2+2*x[0]+2*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=56-14*x[1]-28*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-35)-63*x[1]-7*x[1]**2-56*x[0]+14*x[0]*x[1]+14*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]-1*x[1]**2-4*x[0]-3*x[0]*x[1]-9*x[0]**2
-    u[1]=(-9)-8*x[1]-4*x[1]**2-6*x[0]-7*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=24+28*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-36)-32*x[1]-16*x[1]**2-24*x[0]-28*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[1]+6*x[1]**2-1*x[0]-9*x[0]*x[1]-7*x[0]**2
-    u[1]=6-2*x[1]-8*x[1]**2+8*x[0]+5*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=40-96*x[1]+72*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(40-40*x[1]+48*x[1]**2-8*x[0]-72*x[0]*x[1]-56*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[1]+4*x[1]**2-3*x[0]-9*x[0]*x[1]-8*x[0]**2
-    u[1]=2+7*x[1]+x[1]**2+7*x[0]-5*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-49)-14*x[1]+35*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(14+49*x[1]+7*x[1]**2+49*x[0]-35*x[0]*x[1]+21*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]-1*x[1]**2-3*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[1]=(-4)-1*x[1]+2*x[1]**2-5*x[0]+5*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-24)+64*x[1]+48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[1]-3*x[1]**2-1*x[0]-4*x[0]*x[1]+2*x[0]**2
-    u[1]=(-4)-3*x[1]+2*x[1]**2+4*x[0]-1*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-18)-18*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]+7*x[1]**2+8*x[0]-7*x[0]*x[1]-2*x[0]**2
-    u[1]=(-9)-2*x[1]-5*x[1]**2+6*x[0]-3*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=24-12*x[1]+40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]-1*x[1]**2+3*x[0]-2*x[0]*x[1]+8*x[0]**2
-    u[1]=3-3*x[1]+4*x[1]**2+8*x[0]+x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)+24*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]-5*x[1]**2+6*x[0]+4*x[0]*x[1]+x[0]**2
-    u[1]=4-3*x[1]-4*x[1]**2-8*x[0]-8*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=12+8*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-2*x[1]-7*x[1]**2+7*x[0]+4*x[0]*x[1]-5*x[0]**2
-    u[1]=(-8)-8*x[1]-1*x[1]**2-1*x[0]+2*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)-112*x[1]+32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]+4*x[1]**2+2*x[0]+6*x[0]*x[1]-3*x[0]**2
-    u[1]=(-3)+8*x[1]-3*x[1]**2+2*x[0]+5*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=16+40*x[1]+32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-2*x[1]**2-9*x[0]-3*x[0]*x[1]+4*x[0]**2
-    u[1]=(-5)-1*x[1]-6*x[1]**2+5*x[0]-3*x[0]*x[1]-8*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)-12*x[1]-3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-2*x[1]**2-1*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=2+x[1]-5*x[1]**2+8*x[0]+7*x[0]*x[1]+5*x[0]**2
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)+4*x[1]-2*x[1]**2-1*x[0]+7*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]-1*x[1]**2-9*x[0]+5*x[0]*x[1]+6*x[0]**2
-    u[1]=6+6*x[1]-8*x[1]**2-6*x[0]+4*x[0]*x[1]-5*x[0]**2
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=30+30*x[1]-40*x[1]**2-30*x[0]+20*x[0]*x[1]-25*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[1]+6*x[1]**2-9*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)+5*x[1]+x[1]**2-9*x[0]-5*x[0]*x[1]+7*x[0]**2
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=16-28*x[1]+24*x[1]**2-36*x[0]-4*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]-4*x[1]**2-6*x[0]+7*x[0]*x[1]-2*x[0]**2
-    u[1]=4-6*x[1]+6*x[1]**2+2*x[0]+6*x[0]*x[1]-4*x[0]**2
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=32-48*x[1]+48*x[1]**2+16*x[0]+48*x[0]*x[1]-32*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[1]+7*x[1]**2+7*x[0]-3*x[0]*x[1]+7*x[0]**2
-    u[1]=7+3*x[1]-6*x[1]**2-4*x[0]-3*x[0]*x[1]+5*x[0]**2
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,0]=8
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=48+32*x[1]+56*x[1]**2+56*x[0]-24*x[0]*x[1]+56*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]-4*x[1]**2-3*x[0]-6*x[0]*x[1]-1*x[0]**2
-    u[1]=2+2*x[1]+5*x[1]**2-7*x[0]-2*x[0]*x[1]-7*x[0]**2
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,1]=7
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=14+14*x[1]+35*x[1]**2-49*x[0]-14*x[0]*x[1]-49*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]+3*x[1]**2+x[0]-3*x[0]*x[1]+3*x[0]**2
-    u[1]=(-3)+2*x[1]-1*x[1]**2+8*x[0]-5*x[0]*x[1]-7*x[0]**2
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,0]=7
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-28)-28*x[1]+21*x[1]**2+7*x[0]-21*x[0]*x[1]+21*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]+4*x[1]**2+5*x[0]-5*x[0]*x[1]-8*x[0]**2
-    u[1]=7+x[1]-5*x[1]**2-3*x[0]+2*x[0]*x[1]+5*x[0]**2
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,1]=4
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=28+4*x[1]-20*x[1]**2-12*x[0]+8*x[0]*x[1]+20*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[1]-9*x[1]**2-6*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)+8*x[1]+6*x[1]**2-1*x[0]+4*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6-8*x[1]+36*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0]+8*x[0]*x[1]-18*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[1]+6*x[1]**2+5*x[0]+6*x[0]*x[1]+4*x[0]**2
-    u[1]=8+3*x[1]+3*x[1]**2-9*x[0]+3*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4-12*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0]+12*x[0]*x[1]+6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]+8*x[1]**2+7*x[0]-7*x[0]*x[1]-2*x[0]**2
-    u[1]=5-9*x[1]-3*x[1]**2-6*x[0]-9*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6+9*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0]-9*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]-4*x[1]**2-7*x[0]+x[0]*x[1]-7*x[0]**2
-    u[1]=(-2)-2*x[1]+x[1]**2+4*x[0]+3*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2-2*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0]+2*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[1]-7*x[1]**2+2*x[0]+7*x[0]*x[1]+x[0]**2
-    u[1]=7+5*x[1]+3*x[1]**2+5*x[0]+3*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)-14*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2*x[1]+7*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[1]-2*x[1]**2+2*x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[1]=(-2)-7*x[1]-2*x[1]**2-6*x[0]+5*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1+8*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1]-4*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]-9*x[1]**2+6*x[0]+4*x[0]*x[1]+2*x[0]**2
-    u[1]=(-1)+x[1]+2*x[1]**2-6*x[0]-2*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6+4*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)*x[1]-2*x[1]**2+14*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[1]+3*x[1]**2-4*x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[1]=7+7*x[1]+8*x[1]**2-1*x[0]+4*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)-32*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1]+16*x[1]**2+4*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]+4*x[1]**2-8*x[0]-6*x[0]*x[1]-9*x[0]**2
-    u[1]=(-6)+5*x[1]-9*x[1]**2-8*x[0]+7*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8+6*x[1]+36*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0]-6*x[0]*x[1]-18*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[1]+6*x[1]**2-5*x[0]-4*x[0]*x[1]+3*x[0]**2
-    u[1]=(-2)+5*x[1]+x[1]**2+8*x[0]-5*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=9-12*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0]+12*x[0]*x[1]-4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]-6*x[1]**2+x[0]-4*x[0]*x[1]+7*x[0]**2
-    u[1]=(-7)-5*x[1]-6*x[1]**2-3*x[0]+5*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3-5*x[1]+36*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0]+5*x[0]*x[1]-18*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[1]-5*x[1]**2-8*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[1]=(-8)-6*x[1]+x[1]**2+3*x[0]-1*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6-2*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0]+2*x[0]*x[1]-1*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]-3*x[1]**2-7*x[0]+3*x[0]*x[1]-5*x[0]**2
-    u[1]=(-8)-9*x[1]+6*x[1]**2+4*x[0]+7*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7-6*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1]+3*x[1]**2-10*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]+7*x[1]**2-9*x[0]-3*x[0]*x[1]+6*x[0]**2
-    u[1]=3-5*x[1]-4*x[1]**2+x[0]-2*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)-28*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8*x[1]+14*x[1]**2-3*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[1]+6*x[1]**2-2*x[0]-2*x[0]*x[1]-2*x[0]**2
-    u[1]=(-1)-6*x[1]-5*x[1]**2-1*x[0]-1*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1+2*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1]-1*x[1]**2+14*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[1]-5*x[1]**2-4*x[0]+2*x[0]*x[1]+3*x[0]**2
-    u[1]=(-1)+6*x[1]-3*x[1]**2-8*x[0]-6*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)+12*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6*x[1]-6*x[1]**2-6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]+8*x[1]**2+6*x[0]-6*x[0]*x[1]+5*x[0]**2
-    u[1]=5-3*x[1]+5*x[1]**2-6*x[0]-9*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)-6*x[1]-8*x[1]**2-12*x[0]+12*x[0]*x[1]-15*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0]+6*x[0]*x[1]+8*x[0]*x[1]**2+6*x[0]**2-6*x[0]**2*x[1]+5*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]+4*x[1]**2+3*x[0]+7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-8)+x[1]+6*x[1]**2+4*x[0]-7*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8-1*x[1]-6*x[1]**2-8*x[0]+14*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0]+x[0]*x[1]+6*x[0]*x[1]**2+4*x[0]**2-7*x[0]**2*x[1]-3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]+5*x[1]**2+7*x[0]+8*x[0]*x[1]-2*x[0]**2
-    u[1]=1+3*x[1]-8*x[1]**2+5*x[0]-8*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7+2*x[1]-15*x[1]**2-7*x[0]-16*x[0]*x[1]+2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1]-1*x[1]**2+5*x[1]**3+7*x[0]*x[1]+8*x[0]*x[1]**2-2*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[1]-2*x[1]**2-6*x[0]+7*x[0]*x[1]+8*x[0]**2
-    u[1]=(-5)-9*x[1]+7*x[1]**2-1*x[0]+4*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5+18*x[1]-21*x[1]**2+x[0]-8*x[0]*x[1]+x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-5)*x[1]-9*x[1]**2+7*x[1]**3-1*x[0]*x[1]+4*x[0]*x[1]**2-1*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[1]+2*x[1]**2+4*x[0]-2*x[0]*x[1]-8*x[0]**2
-    u[1]=(-9)-9*x[1]+6*x[1]**2-8*x[0]-2*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3+4*x[1]-2*x[1]**2-8*x[0]+4*x[0]*x[1]+24*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0]-4*x[0]*x[1]+2*x[0]*x[1]**2+4*x[0]**2-2*x[0]**2*x[1]-8*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]-3*x[1]**2-6*x[0]-6*x[0]*x[1]-7*x[0]**2
-    u[1]=(-1)-1*x[1]-4*x[1]**2-9*x[0]+2*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1+x[1]+4*x[1]**2+18*x[0]-4*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0]-1*x[0]*x[1]-4*x[0]*x[1]**2-9*x[0]**2+2*x[0]**2*x[1]-2*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[1]-3*x[1]**2-3*x[0]+6*x[0]*x[1]-2*x[0]**2
-    u[1]=6-2*x[1]-4*x[1]**2-9*x[0]-6*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8+14*x[1]+9*x[1]**2+3*x[0]-12*x[0]*x[1]+2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1]-7*x[1]**2-3*x[1]**3-3*x[0]*x[1]+6*x[0]*x[1]**2-2*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[1]-6*x[1]**2+3*x[0]+4*x[0]*x[1]+x[0]**2
-    u[1]=(-7)+2*x[1]+7*x[1]**2+5*x[0]-8*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7-4*x[1]-21*x[1]**2-5*x[0]+16*x[0]*x[1]-7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1]+2*x[1]**2+7*x[1]**3+5*x[0]*x[1]-8*x[0]*x[1]**2+7*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[1]+7*x[1]**2+3*x[0]+2*x[0]*x[1]+5*x[0]**2
-    u[1]=(-6)+4*x[1]+2*x[1]**2+2*x[0]-4*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[0]+2*x[0]*x[1]+10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]+4*x[1]**2-9*x[0]-2*x[0]*x[1]+5*x[0]**2
-    u[1]=6-2*x[1]+x[1]**2+x[0]+6*x[0]*x[1]-8*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[1]+8*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]+3*x[1]**2+8*x[0]+6*x[0]*x[1]+4*x[0]**2
-    u[1]=(-2)+6*x[1]-1*x[1]**2+4*x[0]+3*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4*x[0]+3*x[0]*x[1]-10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[1]+4*x[1]**2+5*x[0]+8*x[0]*x[1]+6*x[0]**2
-    u[1]=(-6)+5*x[1]+8*x[1]**2+4*x[0]-6*x[0]*x[1]-4*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5*x[1]+16*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[1]-7*x[1]**2-4*x[0]-3*x[0]*x[1]-8*x[0]**2
-    u[1]=5+4*x[1]+4*x[1]**2-4*x[0]-1*x[0]*x[1]-6*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)*x[0]-3*x[0]*x[1]-16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]-8*x[1]**2-4*x[0]-8*x[0]*x[1]-3*x[0]**2
-    u[1]=(-1)+2*x[1]-4*x[1]**2-1*x[0]-4*x[0]*x[1]+x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[1]-16*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-3*x[1]**2-6*x[0]-3*x[0]*x[1]-1*x[0]**2
-    u[1]=(-6)-2*x[1]-4*x[1]**2-4*x[0]-5*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)*x[0]-5*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]+3*x[1]**2+3*x[0]-2*x[0]*x[1]-5*x[0]**2
-    u[1]=2+x[1]-2*x[1]**2-4*x[0]-2*x[0]*x[1]+x[0]**2
-    C_test=Data(0.,(2,2,2),Function(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=x[1]-4*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]+3*x[0]
-    u[1]=(-7)-8*x[1]+7*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]-2*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[1]+6*x[0]
-    u[1]=(-4)-2*x[1]+5*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]-2*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]+5*x[0]
-    u[1]=(-6)+7*x[1]+8*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]-3*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]-9*x[0]
-    u[1]=(-7)+x[1]-9*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]+x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[1]-8*x[0]
-    u[1]=(-1)-3*x[1]-9*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-6)*x[0]+7*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]-2*x[0]
-    u[1]=3-2*x[1]-6*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=3*x[0]-2*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[1]-7*x[0]
-    u[1]=5-9*x[1]-8*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=8*x[0]-6*x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[1]-9*x[0]
-    u[1]=(-4)-7*x[1]-2*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-4)*x[0]-7*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[1]-4*x[1]**2-6*x[0]-9*x[0]*x[1]-7*x[0]**2
-    u[1]=(-2)-8*x[1]-1*x[1]**2+x[0]-5*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-36)-54*x[1]-84*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[1]-6*x[1]**2+x[0]-1*x[0]*x[1]-4*x[0]**2
-    u[1]=(-9)+6*x[1]+7*x[1]**2-1*x[0]-3*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=3-12*x[1]-1*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]+6*x[1]**2-6*x[0]-7*x[0]*x[1]-4*x[0]**2
-    u[1]=(-6)-1*x[1]+7*x[1]**2+8*x[0]-4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=64-32*x[1]+80*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[1]+x[1]**2+7*x[0]-9*x[0]*x[1]-6*x[0]**2
-    u[1]=(-8)+3*x[1]+6*x[1]**2+6*x[0]+x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=15+60*x[1]+5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-1*x[1]+7*x[1]**2+5*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[1]=(-8)-4*x[1]-4*x[1]**2-2*x[0]+6*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=30-36*x[1]+48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[1]+x[1]**2-8*x[0]-8*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)+x[1]-6*x[1]**2-3*x[0]+6*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-30)+12*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]+x[1]**2+5*x[0]-3*x[0]*x[1]+8*x[0]**2
-    u[1]=(-8)-6*x[1]+x[1]**2-4*x[0]+2*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-32)+16*x[1]+128*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[1]-7*x[1]**2-8*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[1]=(-2)+6*x[1]-4*x[1]**2-1*x[0]-1*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=24-32*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[1]-9*x[1]**2-9*x[0]+8*x[0]*x[1]+x[0]**2
-    u[1]=(-9)+4*x[1]-4*x[1]**2+2*x[0]+7*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-72)+64*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]+2*x[1]**2-2*x[0]-1*x[0]*x[1]+7*x[0]**2
-    u[1]=(-5)-4*x[1]+7*x[1]**2+5*x[0]-7*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=64+32*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[1]+x[1]**2-3*x[0]-9*x[0]*x[1]-9*x[0]**2
-    u[1]=(-2)-1*x[1]+4*x[1]**2-2*x[0]+3*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-12)+18*x[1]-72*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[1]+5*x[1]**2-4*x[0]+6*x[0]*x[1]-3*x[0]**2
-    u[1]=(-2)-2*x[1]+x[1]**2-4*x[0]+6*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)+4*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[1]-5*x[1]**2-4*x[0]-5*x[0]*x[1]-9*x[0]**2
-    u[1]=5-1*x[1]-9*x[1]**2+5*x[0]-4*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-24)-30*x[1]-108*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[1]-1*x[1]**2+x[0]-9*x[0]*x[1]+8*x[0]**2
-    u[1]=(-5)+8*x[1]-3*x[1]**2-5*x[0]+2*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=21-6*x[1]-27*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-8*x[1]+8*x[1]**2-9*x[0]+2*x[0]*x[1]+4*x[0]**2
-    u[1]=3-2*x[1]-1*x[1]**2+x[0]+5*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=2+10*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[1]-1*x[1]**2-8*x[0]-6*x[0]*x[1]-7*x[0]**2
-    u[1]=8+5*x[1]-4*x[1]**2-4*x[0]+4*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=10-16*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]-3*x[1]**2+3*x[0]-8*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)-1*x[1]+x[1]**2+6*x[0]-7*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6+16*x[1]-6*x[1]**2+6*x[0]-16*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[1]-1*x[1]**2-5*x[0]-3*x[0]*x[1]-2*x[0]**2
-    u[1]=4+3*x[1]-4*x[1]**2-1*x[0]-6*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=32+24*x[1]-32*x[1]**2-8*x[0]-48*x[0]*x[1]+40*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[1]-3*x[1]**2+2*x[0]-1*x[0]*x[1]+8*x[0]**2
-    u[1]=(-5)-4*x[1]+4*x[1]**2+2*x[0]+7*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6+2*x[1]-3*x[1]**2+2*x[0]-1*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+8*x[1]**2-9*x[0]-6*x[0]*x[1]-4*x[0]**2
-    u[1]=(-5)+8*x[1]+2*x[1]**2+7*x[0]+2*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-15)+24*x[1]+6*x[1]**2+21*x[0]+6*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[1]+4*x[1]**2-8*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=1-1*x[1]+2*x[1]**2-7*x[0]-3*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-32)+8*x[1]+16*x[1]**2-32*x[0]-20*x[0]*x[1]-28*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-3*x[1]**2-6*x[0]-1*x[0]*x[1]+x[0]**2
-    u[1]=(-8)+5*x[1]-1*x[1]**2-4*x[0]-1*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)+5*x[1]-1*x[1]**2-4*x[0]-1*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-2*x[1]**2-1*x[0]-3*x[0]*x[1]-8*x[0]**2
-    u[1]=5-2*x[1]-3*x[1]**2+x[0]+4*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=24+18*x[1]-12*x[1]**2-6*x[0]-18*x[0]*x[1]-48*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+x[1]+7*x[1]**2-5*x[0]-5*x[0]*x[1]+8*x[0]**2
-    u[1]=4-3*x[1]-4*x[1]**2-2*x[0]-5*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=20-15*x[1]-20*x[1]**2-10*x[0]-25*x[0]*x[1]-20*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[1]-1*x[1]**2+4*x[0]-5*x[0]*x[1]-3*x[0]**2
-    u[1]=(-5)-5*x[1]-7*x[1]**2-2*x[0]-5*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]-5*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]-4*x[1]**2-1*x[0]-1*x[0]*x[1]+3*x[0]**2
-    u[1]=1-6*x[1]-2*x[1]**2-4*x[0]+3*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]-8*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[1]-6*x[1]**2-5*x[0]+6*x[0]*x[1]+3*x[0]**2
-    u[1]=(-5)-4*x[1]-3*x[1]**2+5*x[0]-4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=5*x[0]-4*x[0]*x[1]+10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]-1*x[1]**2+3*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=7-6*x[1]-2*x[1]**2-1*x[0]-2*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-6)*x[0]-4*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]-7*x[1]**2-9*x[0]-6*x[0]*x[1]-8*x[0]**2
-    u[1]=(-9)-1*x[1]+2*x[1]**2+7*x[0]+3*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-9)*x[1]-6*x[1]**2-16*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[1]-3*x[1]**2+6*x[0]-4*x[0]*x[1]-4*x[0]**2
-    u[1]=8-2*x[1]-3*x[1]**2-8*x[0]-4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)*x[1]-6*x[1]**2-4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[1]-1*x[1]**2-7*x[0]+6*x[0]*x[1]-3*x[0]**2
-    u[1]=(-1)-3*x[1]+5*x[1]**2+6*x[0]+6*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]+6*x[1]**2+14*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[1]-3*x[1]**2-2*x[0]+3*x[0]*x[1]+8*x[0]**2
-    u[1]=(-3)+7*x[1]+2*x[1]**2-8*x[0]+5*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]+4*x[1]**2+5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+x[1]+5*x[1]**2-9*x[0]+6*x[0]*x[1]-7*x[0]**2
-    u[1]=6+5*x[1]+8*x[1]**2+x[0]+2*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-9)*x[0]+6*x[0]*x[1]-14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]-9*x[1]**2-9*x[0]-9*x[0]*x[1]-1*x[0]**2
-    u[1]=(-9)-9*x[1]+3*x[1]**2-1*x[0]-8*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)*x[0]-18*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-1*x[1]-2*x[1]**2-4*x[0]-7*x[0]*x[1]+7*x[0]**2
-    u[1]=(-3)-1*x[1]+6*x[1]**2-1*x[0]+x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-1)*x[0]+x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[1]-3*x[1]**2-9*x[0]+5*x[0]*x[1]-5*x[0]**2
-    u[1]=(-7)-2*x[1]-1*x[1]**2+2*x[0]-3*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)*x[0]-2*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]+7*x[1]**2+x[0]-6*x[0]*x[1]+3*x[0]**2
-    u[1]=5-9*x[1]-5*x[1]**2-3*x[0]-4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=x[1]-6*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]-5*x[1]**2-1*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[1]=(-8)+8*x[1]-7*x[1]**2-9*x[0]+7*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=4*x[1]-10*x[1]**2-4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]+3*x[1]**2-2*x[0]+x[0]*x[1]+4*x[0]**2
-    u[1]=(-2)-8*x[1]-8*x[1]**2-7*x[0]+2*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]+2*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[1]-7*x[1]**2+8*x[0]-8*x[0]*x[1]+6*x[0]**2
-    u[1]=5-8*x[1]-5*x[1]**2-8*x[0]+2*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]-10*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]-2*x[0]
-    u[1]=5-4*x[1]+3*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]+7*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[1]-2*x[0]
-    u[1]=7-1*x[1]+3*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]-1*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[1]+x[0]
-    u[1]=1-4*x[1]+4*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)*x[1]-8*x[1]**2+x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]-7*x[0]
-    u[1]=(-6)+4*x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-6)*x[1]+4*x[1]**2-5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]-2*x[0]
-    u[1]=(-2)+3*x[1]+5*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)*x[0]-8*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]-2*x[0]
-    u[1]=(-6)-1*x[1]-6*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]-1*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[1]-1*x[0]
-    u[1]=2+2*x[1]+2*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]-7*x[1]**2-1*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[1]+5*x[0]
-    u[1]=8-5*x[1]+2*x[0]
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]-5*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[1]+4*x[1]**2+3*x[0]-9*x[0]*x[1]+4*x[0]**2
-    u[1]=(-3)-5*x[1]+4*x[1]**2-1*x[0]-9*x[0]*x[1]-8*x[0]**2
-    u[2]=4-2*x[1]+7*x[1]**2+7*x[0]-7*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3-9*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[1]+6*x[1]**2+6*x[0]+5*x[0]*x[1]-8*x[0]**2
-    u[1]=(-8)-6*x[1]+2*x[1]**2+2*x[0]-9*x[0]*x[1]-6*x[0]**2
-    u[2]=6-4*x[1]+6*x[1]**2-1*x[0]-3*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-40)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-32)+96*x[1]+40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[1]+5*x[1]**2-3*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=(-5)+2*x[1]+6*x[1]**2-3*x[0]+7*x[0]*x[1]+3*x[0]**2
-    u[2]=(-2)+2*x[1]-1*x[1]**2+5*x[0]+6*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-15)+35*x[1]+30*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[1]+5*x[1]**2+5*x[0]+x[0]*x[1]+x[0]**2
-    u[1]=2-5*x[1]-3*x[1]**2-1*x[0]+3*x[0]*x[1]+7*x[0]**2
-    u[2]=(-5)-4*x[1]-8*x[1]**2+6*x[0]-4*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-15)-18*x[1]+9*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[1]-4*x[1]**2+6*x[0]-2*x[0]*x[1]+2*x[0]**2
-    u[1]=(-9)+x[1]-6*x[1]**2-4*x[0]-8*x[0]*x[1]+8*x[0]**2
-    u[2]=6-8*x[1]+8*x[1]**2+7*x[0]+x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=112
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(49+7*x[1]-112*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[1]-5*x[1]**2-6*x[0]+8*x[0]*x[1]+6*x[0]**2
-    u[1]=(-4)+4*x[1]+3*x[1]**2+2*x[0]+2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-9)-3*x[1]-7*x[1]**2+5*x[0]+6*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-42)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-21)-98*x[1]+42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[1]+3*x[1]**2-8*x[0]-8*x[0]*x[1]+x[0]**2
-    u[1]=(-8)-6*x[1]+5*x[1]**2+8*x[0]+2*x[0]*x[1]+3*x[0]**2
-    u[2]=3-3*x[1]+6*x[1]**2-8*x[0]-7*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=48
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-48)-48*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[1]-1*x[1]**2+2*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[1]=2+3*x[1]-1*x[1]**2-7*x[0]-2*x[0]*x[1]+8*x[0]**2
-    u[2]=3+6*x[1]-9*x[1]**2+2*x[0]-9*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=10
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(35-10*x[1]+20*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+7*x[1]-9*x[1]**2-1*x[0]+2*x[0]*x[1]+3*x[0]**2
-    u[1]=(-5)+3*x[1]-1*x[1]**2-4*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[2]=(-2)+8*x[1]-8*x[1]**2-8*x[0]-2*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-32)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-16)+32*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-9*x[1]**2+2*x[0]+7*x[0]*x[1]+6*x[0]**2
-    u[1]=5+4*x[1]-8*x[1]**2+7*x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[2]=5-4*x[1]-2*x[1]**2+4*x[0]+7*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=32
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8-32*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[1]-9*x[1]**2-2*x[0]-2*x[0]*x[1]-2*x[0]**2
-    u[1]=6-9*x[1]-6*x[1]**2+3*x[0]-4*x[0]*x[1]-2*x[0]**2
-    u[2]=(-4)+6*x[1]-3*x[1]**2-5*x[0]+5*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-40)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-40)+40*x[1]-112*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[1]+6*x[1]**2+4*x[0]+4*x[0]*x[1]-4*x[0]**2
-    u[1]=8+2*x[1]-6*x[1]**2-1*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[2]=(-5)-6*x[1]+4*x[1]**2-7*x[0]+4*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-48)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-36)+48*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]-8*x[1]**2-3*x[0]-8*x[0]*x[1]+4*x[0]**2
-    u[1]=1+4*x[1]-2*x[1]**2+4*x[0]+x[0]*x[1]-9*x[0]**2
-    u[2]=(-3)-6*x[1]-8*x[1]**2+3*x[0]+x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-24)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)-24*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]+7*x[1]**2-9*x[0]-3*x[0]*x[1]+3*x[0]**2
-    u[1]=(-9)-3*x[1]-5*x[1]**2-1*x[0]+5*x[0]*x[1]-9*x[0]**2
-    u[2]=4-7*x[1]+x[1]**2-1*x[0]+7*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(16+28*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[1]-1*x[1]**2+8*x[0]-5*x[0]*x[1]-6*x[0]**2
-    u[1]=(-8)+x[1]-9*x[1]**2-4*x[0]+6*x[0]*x[1]+2*x[0]**2
-    u[2]=8+4*x[1]-2*x[1]**2+x[0]+6*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)+6*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[1]-8*x[1]**2+4*x[0]+4*x[0]*x[1]+2*x[0]**2
-    u[1]=(-2)-2*x[1]+7*x[1]**2+6*x[0]-8*x[0]*x[1]+6*x[0]**2
-    u[2]=(-5)+2*x[1]-2*x[1]**2-3*x[0]-7*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=40
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-10)+70*x[1]-40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]-7*x[1]**2-4*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=4-3*x[1]+2*x[1]**2-8*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[2]=7-4*x[1]-5*x[1]**2-2*x[0]+7*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=16
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)+14*x[1]-16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[1]+5*x[1]**2-2*x[0]-1*x[0]*x[1]+2*x[0]**2
-    u[1]=(-1)-5*x[1]-9*x[1]**2-5*x[0]-1*x[0]*x[1]+5*x[0]**2
-    u[2]=4-6*x[1]+3*x[1]**2-5*x[0]-6*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=36
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-36)+36*x[1]-36*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]-8*x[1]**2+3*x[0]+5*x[0]*x[1]-7*x[0]**2
-    u[1]=5+7*x[1]-2*x[1]**2-1*x[0]+8*x[0]*x[1]-2*x[0]**2
-    u[2]=7-1*x[1]-6*x[1]**2-4*x[0]-7*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-25)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(15+25*x[1]-70*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[1]+8*x[1]**2+3*x[0]+7*x[0]*x[1]-3*x[0]**2
-    u[1]=(-2)-2*x[1]+3*x[1]**2+3*x[0]-6*x[0]*x[1]+5*x[0]**2
-    u[2]=(-7)-4*x[1]+8*x[1]**2+3*x[0]+3*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-96)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-12)+96*x[1]+42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-8*x[1]**2+8*x[0]-4*x[0]*x[1]-2*x[0]**2
-    u[1]=(-7)+8*x[1]-1*x[1]**2-5*x[0]+x[0]*x[1]-3*x[0]**2
-    u[2]=8+3*x[1]+3*x[1]**2-8*x[0]-9*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-20)+4*x[1]-24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[1]+3*x[1]**2-4*x[0]-3*x[0]*x[1]-3*x[0]**2
-    u[1]=(-8)-5*x[1]+6*x[1]**2+4*x[0]-6*x[0]*x[1]+7*x[0]**2
-    u[2]=(-5)-7*x[1]-7*x[1]**2+2*x[0]+4*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-84)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-35)+84*x[1]-42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]-3*x[1]**2+3*x[0]-4*x[0]*x[1]-4*x[0]**2
-    u[1]=(-4)+x[1]-9*x[1]**2+5*x[0]-8*x[0]*x[1]+6*x[0]**2
-    u[2]=(-4)+5*x[1]-8*x[1]**2-8*x[0]+5*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-30)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-48)+30*x[1]-24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]+8*x[1]**2-3*x[0]-2*x[0]*x[1]-1*x[0]**2
-    u[1]=8+8*x[1]-7*x[1]**2-6*x[0]-3*x[0]*x[1]+7*x[0]**2
-    u[2]=(-7)-5*x[1]-5*x[1]**2+5*x[0]-1*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=30
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-15)-30*x[1]-3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+3*x[1]+5*x[1]**2+8*x[0]+3*x[0]*x[1]-7*x[0]**2
-    u[1]=(-9)-2*x[1]-6*x[1]**2-5*x[0]+7*x[0]*x[1]+8*x[0]**2
-    u[2]=(-4)-7*x[1]-7*x[1]**2-7*x[0]+3*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=14
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8+3*x[1]-14*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]+6*x[1]**2+5*x[0]-5*x[0]*x[1]+5*x[0]**2
-    u[1]=6-1*x[1]+6*x[1]**2+2*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[2]=4+7*x[1]-9*x[1]**2-7*x[0]+6*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=35
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-56)+84*x[1]-35*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[1]+4*x[1]**2-5*x[0]+2*x[0]*x[1]+x[0]**2
-    u[1]=(-5)-7*x[1]-1*x[1]**2+6*x[0]+8*x[0]*x[1]-1*x[0]**2
-    u[2]=4-4*x[1]+x[1]**2+6*x[0]+x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(18+24*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[1]+x[1]**2-2*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=2+5*x[1]+6*x[1]**2+2*x[0]+8*x[0]*x[1]-3*x[0]**2
-    u[2]=7-1*x[1]+2*x[1]**2-6*x[0]+7*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-48)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(30+72*x[1]+48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]+6*x[1]**2+4*x[0]+2*x[0]*x[1]-6*x[0]**2
-    u[1]=(-1)+4*x[1]-8*x[1]**2+3*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[2]=2-8*x[1]-2*x[1]**2-4*x[0]-9*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=48
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-32)-72*x[1]-48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]+7*x[1]**2+5*x[0]+2*x[0]*x[1]+7*x[0]**2
-    u[1]=2-6*x[1]+2*x[1]**2-4*x[0]-2*x[0]*x[1]+4*x[0]**2
-    u[2]=(-3)+3*x[1]-9*x[1]**2-2*x[0]-5*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=40
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(24-144*x[1]-40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]+x[1]**2+2*x[0]-3*x[0]*x[1]+5*x[0]**2
-    u[1]=6-1*x[1]-1*x[1]**2+2*x[0]+x[0]*x[1]-7*x[0]**2
-    u[2]=(-8)+2*x[1]-4*x[1]**2-6*x[0]+x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6-9*x[1]+30*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[1]+4*x[1]**2-5*x[0]+x[0]*x[1]-6*x[0]**2
-    u[1]=(-9)+5*x[1]+3*x[1]**2+x[0]-5*x[0]*x[1]+4*x[0]**2
-    u[2]=(-9)-4*x[1]+3*x[1]**2+6*x[0]+2*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-64)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-32)+64*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[1]-5*x[1]**2-6*x[0]+8*x[0]*x[1]-8*x[0]**2
-    u[1]=7-3*x[1]+6*x[1]**2+4*x[0]+8*x[0]*x[1]+8*x[0]**2
-    u[2]=(-4)+8*x[1]-9*x[1]**2-5*x[0]+4*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-24)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(12+24*x[1]+48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[1]-8*x[1]**2+8*x[0]-7*x[0]*x[1]+3*x[0]**2
-    u[1]=(-3)-1*x[1]-1*x[1]**2+8*x[0]+3*x[0]*x[1]-6*x[0]**2
-    u[2]=(-1)-6*x[1]+6*x[1]**2-7*x[0]-4*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-6)-12*x[1]+18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]+6*x[1]**2+x[0]+5*x[0]*x[1]-2*x[0]**2
-    u[1]=(-5)+6*x[1]-5*x[1]**2+6*x[0]-5*x[0]*x[1]+4*x[0]**2
-    u[2]=(-2)+8*x[1]-8*x[1]**2-4*x[0]+3*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-18)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-24)+18*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]-8*x[1]**2+5*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=(-6)-3*x[1]-1*x[1]**2+7*x[0]-2*x[0]*x[1]+8*x[0]**2
-    u[2]=(-4)+3*x[1]+5*x[1]**2+6*x[0]+4*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-50)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(15+50*x[1]+20*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[1]+5*x[1]**2+x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=4-8*x[1]+7*x[1]**2-4*x[0]+2*x[0]*x[1]+6*x[0]**2
-    u[2]=(-6)-8*x[1]-7*x[1]**2-8*x[0]-9*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)+35*x[1]+98*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-63)+14*x[1]+35*x[1]**2+7*x[0]-35*x[0]*x[1]-49*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-4*x[1]**2-1*x[0]-3*x[0]*x[1]+x[0]**2
-    u[1]=8+8*x[1]-1*x[1]**2+x[0]-8*x[0]*x[1]+4*x[0]**2
-    u[2]=7-1*x[1]-1*x[1]**2-6*x[0]+x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+32*x[1]-32*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(32+32*x[1]-4*x[1]**2+4*x[0]-32*x[0]*x[1]+16*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[1]+7*x[1]**2-2*x[0]-1*x[0]*x[1]+8*x[0]**2
-    u[1]=6+x[1]+6*x[1]**2-5*x[0]-4*x[0]*x[1]+4*x[0]**2
-    u[2]=(-7)-3*x[1]-7*x[1]**2-5*x[0]+4*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=10-8*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-14)-6*x[1]-14*x[1]**2-10*x[0]+8*x[0]*x[1]+6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]+5*x[1]**2+5*x[0]+x[0]*x[1]-7*x[0]**2
-    u[1]=4+2*x[1]-3*x[1]**2+4*x[0]+8*x[0]*x[1]-3*x[0]**2
-    u[2]=(-8)+5*x[1]-5*x[1]**2-7*x[0]+8*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=36-40*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)-36*x[1]+20*x[1]**2+20*x[0]+4*x[0]*x[1]-28*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[1]+4*x[1]**2+7*x[0]-9*x[0]*x[1]-7*x[0]**2
-    u[1]=(-9)-6*x[1]+3*x[1]**2+4*x[0]-9*x[0]*x[1]-5*x[0]**2
-    u[2]=2-3*x[1]+2*x[1]**2-4*x[0]+4*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6-6*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)-6*x[1]+3*x[1]**2+4*x[0]-9*x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[1]+7*x[1]**2-7*x[0]+5*x[0]*x[1]+5*x[0]**2
-    u[1]=4-2*x[1]-3*x[1]**2-7*x[0]-9*x[0]*x[1]+8*x[0]**2
-    u[2]=(-3)-3*x[1]+8*x[1]**2-1*x[0]-8*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=15-80*x[1]+40*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-15)-15*x[1]+40*x[1]**2-5*x[0]-40*x[0]*x[1]+30*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[1]+8*x[1]**2+7*x[0]+7*x[0]*x[1]+2*x[0]**2
-    u[1]=(-7)-9*x[1]+3*x[1]**2-8*x[0]-3*x[0]*x[1]-9*x[0]**2
-    u[2]=3+3*x[1]+5*x[1]**2+3*x[0]-1*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-14)-14*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)+16*x[1]+16*x[1]**2+14*x[0]+14*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]+3*x[1]**2-8*x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-6)-3*x[1]-5*x[1]**2-7*x[0]+5*x[0]*x[1]+2*x[0]**2
-    u[2]=(-8)-2*x[1]+8*x[1]**2-2*x[0]-6*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=49-35*x[1]-28*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-42)-21*x[1]-35*x[1]**2-49*x[0]+35*x[0]*x[1]+14*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[1]+x[1]**2-6*x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[1]=2-5*x[1]+3*x[1]**2-6*x[0]-7*x[0]*x[1]-5*x[0]**2
-    u[2]=2+4*x[1]+8*x[1]**2+6*x[0]-6*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-36)+36*x[1]-72*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12+24*x[1]+48*x[1]**2+36*x[0]-36*x[0]*x[1]+36*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]+3*x[1]**2-4*x[0]-8*x[0]*x[1]-2*x[0]**2
-    u[1]=(-9)-6*x[1]-3*x[1]**2+2*x[0]-1*x[0]*x[1]-3*x[0]**2
-    u[2]=1+7*x[1]+4*x[1]**2+x[0]-5*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=56-48*x[1]+64*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-56)-56*x[1]+24*x[1]**2-32*x[0]-64*x[0]*x[1]-16*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]-7*x[1]**2+x[0]+2*x[0]*x[1]+6*x[0]**2
-    u[1]=8-3*x[1]+2*x[1]**2-2*x[0]+5*x[0]*x[1]-4*x[0]**2
-    u[2]=3-5*x[1]+8*x[1]**2-6*x[0]+5*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=18-24*x[1]-30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(48-18*x[1]+12*x[1]**2-12*x[0]+30*x[0]*x[1]-24*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]+x[1]**2-4*x[0]-4*x[0]*x[1]-2*x[0]**2
-    u[1]=(-1)-5*x[1]+6*x[1]**2+7*x[0]+8*x[0]*x[1]+x[0]**2
-    u[2]=(-6)-1*x[1]+5*x[1]**2+8*x[0]-1*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3-30*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-18)-3*x[1]+15*x[1]**2+24*x[0]-3*x[0]*x[1]+18*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-8*x[1]-1*x[1]**2-9*x[0]-1*x[0]*x[1]+4*x[0]**2
-    u[1]=7+6*x[1]+8*x[1]**2+3*x[0]-5*x[0]*x[1]-6*x[0]**2
-    u[2]=(-5)+4*x[1]+8*x[1]**2-1*x[0]-9*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=36+4*x[1]-32*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(20-32*x[1]-4*x[1]**2-36*x[0]-4*x[0]*x[1]+16*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[1]+7*x[1]**2-1*x[0]+x[0]*x[1]-1*x[0]**2
-    u[1]=8-1*x[1]-6*x[1]**2-8*x[0]+7*x[0]*x[1]+8*x[0]**2
-    u[2]=4-4*x[1]+4*x[1]**2+7*x[0]+6*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=56-49*x[1]-112*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(56-7*x[1]-42*x[1]**2-56*x[0]+49*x[0]*x[1]+56*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[1]+8*x[1]**2-1*x[0]-6*x[0]*x[1]+6*x[0]**2
-    u[1]=8+3*x[1]-8*x[1]**2+2*x[0]+8*x[0]*x[1]+5*x[0]**2
-    u[2]=(-3)-8*x[1]-4*x[1]**2-6*x[0]+6*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6-6*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3)-8*x[1]-4*x[1]**2-6*x[0]+6*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]-9*x[1]**2-8*x[0]+6*x[0]*x[1]-8*x[0]**2
-    u[1]=(-4)+x[1]+7*x[1]**2-1*x[0]-3*x[0]*x[1]+5*x[0]**2
-    u[2]=6-7*x[1]+4*x[1]**2-2*x[0]+6*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)+90*x[1]-30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(30+5*x[1]-45*x[1]**2-40*x[0]+30*x[0]*x[1]-40*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[1]+2*x[1]**2+2*x[0]+7*x[0]*x[1]-7*x[0]**2
-    u[1]=5+7*x[1]+x[1]**2-1*x[0]-7*x[0]*x[1]-6*x[0]**2
-    u[2]=3-5*x[1]+2*x[1]**2+3*x[0]-7*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-49)-14*x[1]+49*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(35+49*x[1]+7*x[1]**2-7*x[0]-49*x[0]*x[1]-42*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[1]-6*x[1]**2-8*x[0]+5*x[0]*x[1]-4*x[0]**2
-    u[1]=8-2*x[1]+3*x[1]**2+x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[2]=(-3)+8*x[1]-2*x[1]**2+7*x[0]-5*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-40)+20*x[1]+25*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-15)+40*x[1]-10*x[1]**2+35*x[0]-25*x[0]*x[1]+15*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[1]-2*x[1]**2+3*x[0]-9*x[0]*x[1]+7*x[0]**2
-    u[1]=8-3*x[1]-6*x[1]**2-8*x[0]-7*x[0]*x[1]+x[0]**2
-    u[2]=(-9)-7*x[1]-5*x[1]**2+x[0]-3*x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=24-72*x[1]+112*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]+4*x[1]**2-1*x[0]-9*x[0]*x[1]-6*x[0]**2
-    u[1]=(-3)-6*x[1]-3*x[1]**2+5*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[2]=7+4*x[1]+6*x[1]**2-5*x[0]-9*x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)+8*x[1]-9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]-8*x[1]**2+x[0]-1*x[0]*x[1]+7*x[0]**2
-    u[1]=(-4)-5*x[1]+5*x[1]**2-9*x[0]+3*x[0]*x[1]+8*x[0]**2
-    u[2]=3+x[1]-8*x[1]**2-6*x[0]-7*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)+3*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[1]-1*x[1]**2-4*x[0]-2*x[0]*x[1]-6*x[0]**2
-    u[1]=7-3*x[1]+2*x[1]**2-4*x[0]-6*x[0]*x[1]+5*x[0]**2
-    u[2]=(-3)+7*x[1]-4*x[1]**2-5*x[0]+7*x[0]*x[1]-8*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)+12*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[1]+6*x[1]**2+7*x[0]-6*x[0]*x[1]-6*x[0]**2
-    u[1]=1-5*x[1]-4*x[1]**2-7*x[0]-6*x[0]*x[1]+7*x[0]**2
-    u[2]=5-8*x[1]+6*x[1]**2-4*x[0]-4*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)-4*x[1]+10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[1]-8*x[1]**2-9*x[0]-2*x[0]*x[1]+4*x[0]**2
-    u[1]=7-1*x[1]-5*x[1]**2+2*x[0]-8*x[0]*x[1]-3*x[0]**2
-    u[2]=(-2)+3*x[1]+3*x[1]**2+3*x[0]-5*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=21+42*x[1]-35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]-1*x[1]**2-4*x[0]+x[0]*x[1]-6*x[0]**2
-    u[1]=8+6*x[1]-5*x[1]**2-1*x[0]-4*x[0]*x[1]+7*x[0]**2
-    u[2]=5-2*x[1]+5*x[1]**2-5*x[0]+4*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-28)+7*x[1]-84*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[1]-4*x[1]**2+5*x[0]+4*x[0]*x[1]-9*x[0]**2
-    u[1]=3-7*x[1]+5*x[1]**2-9*x[0]+3*x[0]*x[1]-5*x[0]**2
-    u[2]=(-4)+8*x[1]+7*x[1]**2+8*x[0]-2*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=25-40*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+x[1]+5*x[1]**2-8*x[0]+6*x[0]*x[1]+5*x[0]**2
-    u[1]=(-7)-1*x[1]+x[1]**2+8*x[0]-9*x[0]*x[1]-7*x[0]**2
-    u[2]=2+7*x[1]-4*x[1]**2-7*x[0]-8*x[0]*x[1]+x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=64-72*x[1]-112*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]-1*x[1]**2+7*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[1]=(-8)-7*x[1]-8*x[1]**2+2*x[0]+x[0]*x[1]+3*x[0]**2
-    u[2]=(-2)-7*x[1]-9*x[1]**2-8*x[0]+6*x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-49)-112*x[1]+7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[1]+x[1]**2-4*x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[1]=(-2)+5*x[1]-4*x[1]**2-8*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[2]=(-2)-5*x[1]-9*x[1]**2+2*x[0]-6*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8-24*x[1]+48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[1]+7*x[1]**2-1*x[0]+3*x[0]*x[1]+2*x[0]**2
-    u[1]=(-3)-8*x[1]-9*x[1]**2-4*x[0]-4*x[0]*x[1]-8*x[0]**2
-    u[2]=4-4*x[1]-5*x[1]**2+x[0]-1*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)-40*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-8*x[1]**2+7*x[0]-7*x[0]*x[1]-9*x[0]**2
-    u[1]=(-2)+5*x[1]+3*x[1]**2-5*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[2]=(-3)+6*x[1]+2*x[1]**2+x[0]+3*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=35-35*x[1]-90*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]-5*x[1]**2-7*x[0]-8*x[0]*x[1]+7*x[0]**2
-    u[1]=(-8)-2*x[1]-4*x[1]**2-5*x[0]-4*x[0]*x[1]+x[0]**2
-    u[2]=(-9)+2*x[1]+2*x[1]**2-8*x[0]-3*x[0]*x[1]-6*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=12-20*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]-7*x[1]**2-5*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=(-4)+5*x[1]-5*x[1]**2+6*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[2]=(-9)+4*x[1]+3*x[1]**2+4*x[0]+x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=12+14*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[1]-6*x[1]**2-5*x[0]-8*x[0]*x[1]+8*x[0]**2
-    u[1]=(-3)-5*x[1]+6*x[1]**2-5*x[0]-6*x[0]*x[1]-6*x[0]**2
-    u[2]=(-3)-8*x[1]-2*x[1]**2-2*x[0]+x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-25)+60*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]-2*x[1]**2-6*x[0]-1*x[0]*x[1]-1*x[0]**2
-    u[1]=(-8)-2*x[1]-2*x[1]**2+7*x[0]-6*x[0]*x[1]-7*x[0]**2
-    u[2]=(-5)-4*x[1]-6*x[1]**2+2*x[0]-7*x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8-28*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[1]-8*x[1]**2+2*x[0]+6*x[0]*x[1]-8*x[0]**2
-    u[1]=3-3*x[1]-6*x[1]**2-9*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[2]=3+5*x[1]+4*x[1]**2+7*x[0]-8*x[0]*x[1]+x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=30+48*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]-6*x[1]**2-4*x[0]-7*x[0]*x[1]+5*x[0]**2
-    u[1]=6-3*x[1]+3*x[1]**2-9*x[0]+x[0]*x[1]+8*x[0]**2
-    u[2]=4-8*x[1]-9*x[1]**2-9*x[0]-2*x[0]*x[1]-7*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-15)-18*x[1]-18*x[1]**2-12*x[0]-21*x[0]*x[1]+15*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]+x[1]**2+8*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[1]=5+3*x[1]+5*x[1]**2+7*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[2]=8-7*x[1]-6*x[1]**2-2*x[0]-6*x[0]*x[1]-1*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=35+21*x[1]+35*x[1]**2+49*x[0]-7*x[0]*x[1]-63*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[1]+x[1]**2+2*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=8-7*x[1]+2*x[1]**2-5*x[0]-7*x[0]*x[1]+x[0]**2
-    u[2]=7-9*x[1]-1*x[1]**2-8*x[0]+6*x[0]*x[1]-7*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7-9*x[1]-1*x[1]**2-8*x[0]+6*x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[1]+8*x[1]**2+2*x[0]+4*x[0]*x[1]+4*x[0]**2
-    u[1]=(-2)+8*x[1]+6*x[1]**2-1*x[0]+x[0]*x[1]+5*x[0]**2
-    u[2]=2+5*x[1]+5*x[1]**2-8*x[0]+x[0]*x[1]-5*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-25)+15*x[1]+40*x[1]**2+10*x[0]+20*x[0]*x[1]+20*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]+6*x[1]**2-1*x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[1]=(-1)-7*x[1]+4*x[1]**2-4*x[0]-7*x[0]*x[1]-1*x[0]**2
-    u[2]=(-4)-1*x[1]-8*x[1]**2-7*x[0]-8*x[0]*x[1]+3*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)-42*x[1]+24*x[1]**2-24*x[0]-42*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[1]-6*x[1]**2+5*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[1]=(-7)+2*x[1]-7*x[1]**2-9*x[0]+2*x[0]*x[1]-8*x[0]**2
-    u[2]=(-4)-7*x[1]+3*x[1]**2-9*x[0]-5*x[0]*x[1]+5*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)-28*x[1]+12*x[1]**2-36*x[0]-20*x[0]*x[1]+20*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[1]+7*x[1]**2-6*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[1]=3+3*x[1]-6*x[1]**2-1*x[0]-8*x[0]*x[1]+8*x[0]**2
-    u[2]=(-8)-1*x[1]+3*x[1]**2+8*x[0]+8*x[0]*x[1]+6*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-15)+12*x[1]+21*x[1]**2-18*x[0]-9*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[1]-9*x[1]**2+8*x[0]-6*x[0]*x[1]+8*x[0]**2
-    u[1]=(-4)+3*x[1]+3*x[1]**2-6*x[0]-8*x[0]*x[1]+5*x[0]**2
-    u[2]=5-8*x[1]+2*x[1]**2-6*x[0]-5*x[0]*x[1]+5*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)+6*x[1]+6*x[1]**2-12*x[0]-16*x[0]*x[1]+10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]-3*x[1]**2+6*x[0]+5*x[0]*x[1]-8*x[0]**2
-    u[1]=(-3)-7*x[1]-7*x[1]**2+4*x[0]-7*x[0]*x[1]-7*x[0]**2
-    u[2]=(-1)+2*x[1]+3*x[1]**2-5*x[0]+2*x[0]*x[1]-8*x[0]**2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)+16*x[1]+24*x[1]**2-40*x[0]+16*x[0]*x[1]-64*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[1]-8*x[1]**2-7*x[0]+6*x[0]*x[1]+4*x[0]**2
-    u[1]=(-6)-3*x[1]+5*x[1]**2-8*x[0]+x[0]*x[1]-6*x[0]**2
-    u[2]=(-5)-7*x[1]+2*x[1]**2+4*x[0]+2*x[0]*x[1]+2*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,0]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=1-9*x[1]-8*x[1]**2-7*x[0]+6*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]-9*x[1]**2-9*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[1]=(-1)-3*x[1]-1*x[1]**2+6*x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[2]=6-9*x[1]+x[1]**2-5*x[0]-1*x[0]*x[1]-7*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,1]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-4)-12*x[1]-4*x[1]**2+24*x[0]-8*x[0]*x[1]+12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[1]+7*x[1]**2+7*x[0]-8*x[0]*x[1]-4*x[0]**2
-    u[1]=3-2*x[1]-1*x[1]**2-1*x[0]+2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-3)+4*x[1]+x[1]**2-6*x[0]+2*x[0]*x[1]+7*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,2]=7
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-21)+28*x[1]+7*x[1]**2-42*x[0]+14*x[0]*x[1]+49*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]+3*x[1]**2-2*x[0]+7*x[0]*x[1]-9*x[0]**2
-    u[1]=(-9)+5*x[1]+3*x[1]**2-7*x[0]-3*x[0]*x[1]-9*x[0]**2
-    u[2]=(-9)-2*x[1]+4*x[1]**2+x[0]-7*x[0]*x[1]+6*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,0]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=48-30*x[1]+18*x[1]**2-12*x[0]+42*x[0]*x[1]-54*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[1]+3*x[1]**2+7*x[0]-3*x[0]*x[1]-3*x[0]**2
-    u[1]=4+8*x[1]+x[1]**2+8*x[0]-7*x[0]*x[1]-9*x[0]**2
-    u[2]=8+5*x[1]+5*x[1]**2-6*x[0]-7*x[0]*x[1]+7*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,1]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=16+32*x[1]+4*x[1]**2+32*x[0]-28*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[1]-8*x[1]**2+7*x[0]+7*x[0]*x[1]-2*x[0]**2
-    u[1]=(-5)+5*x[1]+8*x[1]**2+x[0]+7*x[0]*x[1]+4*x[0]**2
-    u[2]=(-4)-2*x[1]+7*x[1]**2-7*x[0]-1*x[0]*x[1]-7*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,2]=3
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-12)-6*x[1]+21*x[1]**2-21*x[0]-3*x[0]*x[1]-21*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[1]+3*x[1]**2+3*x[0]+8*x[0]*x[1]-7*x[0]**2
-    u[1]=(-2)+3*x[1]+7*x[1]**2-1*x[0]-5*x[0]*x[1]-4*x[0]**2
-    u[2]=(-9)-4*x[1]+x[1]**2-9*x[0]-2*x[0]*x[1]-7*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,0]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=48+48*x[1]+18*x[1]**2+18*x[0]+48*x[0]*x[1]-42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-2*x[1]**2-6*x[0]+7*x[0]*x[1]-6*x[0]**2
-    u[1]=7+4*x[1]-6*x[1]**2-8*x[0]-9*x[0]*x[1]+7*x[0]**2
-    u[2]=(-2)+4*x[1]+5*x[1]**2+6*x[0]-7*x[0]*x[1]+8*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,1]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=28+16*x[1]-24*x[1]**2-32*x[0]-36*x[0]*x[1]+28*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]+4*x[1]**2-1*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[1]=(-5)-8*x[1]-1*x[1]**2+7*x[0]+5*x[0]*x[1]-8*x[0]**2
-    u[2]=(-9)+5*x[1]-7*x[1]**2+5*x[0]+6*x[0]*x[1]-6*x[0]**2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,2]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-36)+20*x[1]-28*x[1]**2+20*x[0]+24*x[0]*x[1]-24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]+6*x[1]**2+7*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[1]=7-2*x[1]+5*x[1]**2-6*x[0]-9*x[0]*x[1]+6*x[0]**2
-    u[2]=(-3)-5*x[1]+5*x[1]**2-8*x[0]+3*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)-7*x[1]+20*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0]+7*x[0]*x[1]-10*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]+x[1]**2+8*x[0]-9*x[0]*x[1]+6*x[0]**2
-    u[1]=(-6)+4*x[1]+6*x[1]**2+x[0]-7*x[0]*x[1]-8*x[0]**2
-    u[2]=4-2*x[1]-8*x[1]**2+6*x[0]-4*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)-2*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0]+2*x[0]*x[1]-9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[1]-6*x[1]**2+x[0]-3*x[0]*x[1]-4*x[0]**2
-    u[1]=2+2*x[1]+2*x[1]**2-7*x[0]-3*x[0]*x[1]-4*x[0]**2
-    u[2]=6-7*x[1]-5*x[1]**2+3*x[0]+5*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7+3*x[1]+16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)*x[0]-3*x[0]*x[1]-8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[1]-1*x[1]**2+3*x[0]-4*x[0]*x[1]+x[0]**2
-    u[1]=7-5*x[1]+5*x[1]**2-2*x[0]-3*x[0]*x[1]-8*x[0]**2
-    u[2]=(-1)+4*x[1]+6*x[1]**2-8*x[0]+5*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5-10*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-5)*x[0]+10*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[1]-7*x[1]**2-9*x[0]+4*x[0]*x[1]-5*x[0]**2
-    u[1]=6-8*x[1]-6*x[1]**2-9*x[0]-4*x[0]*x[1]-8*x[0]**2
-    u[2]=(-6)+3*x[1]-9*x[1]**2+4*x[0]-4*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+4*x[1]-28*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]-4*x[0]*x[1]+14*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]-8*x[1]**2-6*x[0]-5*x[0]*x[1]-1*x[0]**2
-    u[1]=(-2)+2*x[1]-6*x[1]**2-6*x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[2]=4-4*x[1]+5*x[1]**2-3*x[0]-3*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4-10*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0]+10*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[1]-3*x[1]**2-6*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=3-3*x[1]-6*x[1]**2-5*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[2]=6-1*x[1]+5*x[1]**2+5*x[0]-4*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6-14*x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)*x[1]+7*x[1]**2+10*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[1]-3*x[1]**2-8*x[0]-3*x[0]*x[1]+5*x[0]**2
-    u[1]=6+7*x[1]-5*x[1]**2-4*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[2]=(-2)+5*x[1]+3*x[1]**2-8*x[0]-4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)+12*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1]-6*x[1]**2-3*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[1]-9*x[1]**2-4*x[0]-9*x[0]*x[1]+2*x[0]**2
-    u[1]=(-3)+4*x[1]+5*x[1]**2-9*x[0]+5*x[0]*x[1]-9*x[0]**2
-    u[2]=5-9*x[1]-2*x[1]**2+4*x[0]-6*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9-10*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1]+5*x[1]**2-18*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]-9*x[1]**2-5*x[0]-1*x[0]*x[1]-8*x[0]**2
-    u[1]=(-3)+2*x[1]-2*x[1]**2+8*x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[2]=(-8)+7*x[1]+3*x[1]**2-8*x[0]-2*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)+8*x[1]+7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2*x[1]-4*x[1]**2-7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[1]-5*x[1]**2-8*x[0]-9*x[0]*x[1]-7*x[0]**2
-    u[1]=3+5*x[1]-5*x[1]**2-5*x[0]+7*x[0]*x[1]+2*x[0]**2
-    u[2]=(-9)-2*x[1]+7*x[1]**2+7*x[0]-6*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)+12*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1]-6*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[1]+x[1]**2-4*x[0]-7*x[0]*x[1]+6*x[0]**2
-    u[1]=(-1)+2*x[1]-3*x[1]**2+7*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[2]=4+4*x[1]-5*x[1]**2+7*x[0]+2*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+20*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1]-10*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]+6*x[1]**2-4*x[0]-4*x[0]*x[1]-1*x[0]**2
-    u[1]=(-9)-5*x[1]-8*x[1]**2-1*x[0]-8*x[0]*x[1]+x[0]**2
-    u[2]=6+x[1]-8*x[1]**2-8*x[0]+2*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4+4*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0]-4*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]-3*x[1]**2+7*x[0]-9*x[0]*x[1]+2*x[0]**2
-    u[1]=5+7*x[1]+5*x[1]**2+6*x[0]+4*x[0]*x[1]+x[0]**2
-    u[2]=(-2)+7*x[1]-4*x[1]**2-4*x[0]+5*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3+6*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0]-6*x[0]*x[1]-9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[1]+3*x[1]**2+3*x[0]-2*x[0]*x[1]-4*x[0]**2
-    u[1]=(-6)-8*x[1]-7*x[1]**2+3*x[0]-1*x[0]*x[1]+x[0]**2
-    u[2]=4-8*x[1]-7*x[1]**2+6*x[0]+5*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)+x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0]-1*x[0]*x[1]+2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]-4*x[1]**2-3*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[1]=(-2)+3*x[1]-8*x[1]**2-6*x[0]-2*x[0]*x[1]+8*x[0]**2
-    u[2]=1+8*x[1]+7*x[1]**2+4*x[0]+3*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)+16*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0]-16*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]-7*x[1]**2+3*x[0]-4*x[0]*x[1]-8*x[0]**2
-    u[1]=6-7*x[1]+8*x[1]**2+7*x[0]+6*x[0]*x[1]-4*x[0]**2
-    u[2]=(-7)+3*x[1]-7*x[1]**2-2*x[0]+4*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2-4*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0]+4*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]+5*x[1]**2+3*x[0]-4*x[0]*x[1]+4*x[0]**2
-    u[1]=4+7*x[1]-9*x[1]**2-1*x[0]-1*x[0]*x[1]-5*x[0]**2
-    u[2]=(-6)+6*x[1]+4*x[1]**2-9*x[0]-7*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)-8*x[1]+14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0]+8*x[0]*x[1]-7*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]+6*x[1]**2-9*x[0]+6*x[0]*x[1]-9*x[0]**2
-    u[1]=(-2)+6*x[1]-7*x[1]**2+x[0]-4*x[0]*x[1]+8*x[0]**2
-    u[2]=(-2)+3*x[1]+4*x[1]**2+7*x[0]-2*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9-12*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1]+6*x[1]**2-18*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]-6*x[1]**2-6*x[0]+3*x[0]*x[1]-4*x[0]**2
-    u[1]=2-6*x[1]+3*x[1]**2+3*x[0]-4*x[0]*x[1]-7*x[0]**2
-    u[2]=2-5*x[1]-3*x[1]**2+6*x[0]-7*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8+24*x[1]-3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1]-12*x[1]**2+3*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[1]-4*x[1]**2-8*x[0]+x[0]*x[1]-3*x[0]**2
-    u[1]=6-9*x[1]+6*x[1]**2+3*x[0]-4*x[0]*x[1]-1*x[0]**2
-    u[2]=(-2)+3*x[1]+4*x[1]**2+2*x[0]-2*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)+8*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3*x[1]-4*x[1]**2-2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]-9*x[1]**2+8*x[0]+x[0]*x[1]-9*x[0]**2
-    u[1]=(-5)+2*x[1]-6*x[1]**2+6*x[0]-1*x[0]*x[1]+2*x[0]**2
-    u[2]=7-9*x[1]+x[1]**2+2*x[0]-1*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)+24*x[1]+x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1]-12*x[1]**2-1*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]-8*x[1]**2+4*x[0]-5*x[0]*x[1]-5*x[0]**2
-    u[1]=(-8)-6*x[1]-6*x[1]**2+7*x[0]-8*x[0]*x[1]+8*x[0]**2
-    u[2]=8-2*x[1]+x[1]**2-2*x[0]-7*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2+14*x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)*x[1]-7*x[1]**2-12*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]+7*x[1]**2+7*x[0]+2*x[0]*x[1]-7*x[0]**2
-    u[1]=3+5*x[1]+3*x[1]**2-5*x[0]+8*x[0]*x[1]-5*x[0]**2
-    u[2]=1-5*x[1]+7*x[1]**2+7*x[0]+8*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5-28*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1]+14*x[1]**2+8*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[1]-4*x[1]**2-4*x[0]-1*x[0]*x[1]-2*x[0]**2
-    u[1]=(-4)+6*x[1]+2*x[1]**2-4*x[0]-7*x[0]*x[1]-4*x[0]**2
-    u[2]=(-2)+2*x[1]+4*x[1]**2-8*x[0]+4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4+x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4)*x[0]-1*x[0]*x[1]-4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[1]-8*x[1]**2+5*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[1]=(-3)+3*x[1]-6*x[1]**2+x[0]-3*x[0]*x[1]-4*x[0]**2
-    u[2]=(-2)+x[1]-1*x[1]**2-2*x[0]-4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)+16*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(6*x[0]-16*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[1]-8*x[1]**2+2*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[1]=(-7)-9*x[1]-3*x[1]**2-9*x[0]+6*x[0]*x[1]-3*x[0]**2
-    u[2]=5-8*x[1]+4*x[1]**2-8*x[0]-4*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9-6*x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)*x[0]+6*x[0]*x[1]-6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]+6*x[1]**2-6*x[0]-3*x[0]*x[1]-8*x[0]**2
-    u[1]=4+3*x[1]+7*x[1]**2-2*x[0]+5*x[0]*x[1]-1*x[0]**2
-    u[2]=(-5)+3*x[1]-2*x[1]**2-8*x[0]+5*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)-14*x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(3*x[0]+14*x[0]*x[1]+5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[1]-7*x[1]**2+x[0]-5*x[0]*x[1]-8*x[0]**2
-    u[1]=(-6)-1*x[1]-3*x[1]**2+8*x[0]-2*x[0]*x[1]-6*x[0]**2
-    u[2]=4+3*x[1]-4*x[1]**2-8*x[0]+8*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8-8*x[1]+32*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-8)*x[0]+8*x[0]*x[1]-16*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[1]-9*x[1]**2-2*x[0]-8*x[0]*x[1]-1*x[0]**2
-    u[1]=(-2)-3*x[1]+5*x[1]**2-5*x[0]-5*x[0]*x[1]-4*x[0]**2
-    u[2]=4-7*x[1]-8*x[1]**2-3*x[0]-9*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7+16*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-7)*x[0]-16*x[0]*x[1]-9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]-2*x[1]**2+3*x[0]-5*x[0]*x[1]+8*x[0]**2
-    u[1]=4-9*x[1]+x[1]**2+2*x[0]-3*x[0]*x[1]+8*x[0]**2
-    u[2]=(-2)-1*x[1]+5*x[1]**2-3*x[0]+6*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)+10*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(3*x[1]-5*x[1]**2+16*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[1]-3*x[1]**2-9*x[0]+x[0]*x[1]+7*x[0]**2
-    u[1]=6-6*x[1]-7*x[1]**2-5*x[0]-1*x[0]*x[1]+7*x[0]**2
-    u[2]=(-1)-1*x[1]-8*x[1]**2+2*x[0]-5*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8+12*x[1]-1*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8)*x[1]-6*x[1]**2+x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[1]-4*x[1]**2-4*x[0]+6*x[0]*x[1]+2*x[0]**2
-    u[1]=5-1*x[1]+6*x[1]**2+7*x[0]+5*x[0]*x[1]-9*x[0]**2
-    u[2]=(-2)+2*x[1]-1*x[1]**2+8*x[0]-2*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)-10*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1]+5*x[1]**2-18*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-1*x[1]-3*x[1]**2-6*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=8-7*x[1]+3*x[1]**2+2*x[0]-8*x[0]*x[1]+2*x[0]**2
-    u[2]=4+x[1]-6*x[1]**2-2*x[0]-2*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7-12*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-7)*x[1]+6*x[1]**2-8*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[1]-6*x[1]**2+6*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=(-3)-9*x[1]+x[1]**2+2*x[0]+7*x[0]*x[1]-1*x[0]**2
-    u[2]=(-7)+7*x[1]+4*x[1]**2-8*x[0]-5*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8+10*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8)*x[1]-5*x[1]**2+6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[1]+4*x[1]**2+5*x[0]-6*x[0]*x[1]-8*x[0]**2
-    u[1]=(-1)+6*x[1]+7*x[1]**2+3*x[0]+5*x[0]*x[1]+2*x[0]**2
-    u[2]=(-5)+7*x[1]+2*x[1]**2-2*x[0]+2*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)-8*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1]+4*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]-8*x[1]**2+4*x[0]+6*x[0]*x[1]-7*x[0]**2
-    u[1]=4+8*x[1]-9*x[1]**2-3*x[0]+8*x[0]*x[1]-2*x[0]**2
-    u[2]=(-6)+5*x[1]+8*x[1]**2+4*x[0]-1*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6-4*x[1]+8*x[1]**2-8*x[0]-12*x[0]*x[1]+21*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0]+4*x[0]*x[1]-8*x[0]*x[1]**2+4*x[0]**2+6*x[0]**2*x[1]-7*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]-4*x[1]**2+2*x[0]-7*x[0]*x[1]-4*x[0]**2
-    u[1]=8+4*x[1]-7*x[1]**2+6*x[0]-9*x[0]*x[1]-8*x[0]**2
-    u[2]=(-9)+8*x[1]-6*x[1]**2+7*x[0]-6*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)-4*x[1]+7*x[1]**2-12*x[0]+18*x[0]*x[1]+24*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0]+4*x[0]*x[1]-7*x[0]*x[1]**2+6*x[0]**2-9*x[0]**2*x[1]-8*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[1]-1*x[1]**2+7*x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[1]=(-7)-3*x[1]+7*x[1]**2-1*x[0]+5*x[0]*x[1]-4*x[0]**2
-    u[2]=(-4)-5*x[1]-4*x[1]**2-3*x[0]+6*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4+5*x[1]+4*x[1]**2+6*x[0]-12*x[0]*x[1]+27*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0]-5*x[0]*x[1]-4*x[0]*x[1]**2-3*x[0]**2+6*x[0]**2*x[1]-9*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[1]+6*x[1]**2+7*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[1]=(-6)-3*x[1]-4*x[1]**2-9*x[0]+8*x[0]*x[1]-3*x[0]**2
-    u[2]=(-8)-6*x[1]-6*x[1]**2-9*x[0]-1*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9+18*x[1]-18*x[1]**2-7*x[0]+6*x[0]*x[1]-2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1]-9*x[1]**2+6*x[1]**3+7*x[0]*x[1]-3*x[0]*x[1]**2+2*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[1]-5*x[1]**2-8*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[1]=(-4)+7*x[1]+3*x[1]**2-2*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[2]=(-4)-5*x[1]-4*x[1]**2+4*x[0]+2*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4-14*x[1]-9*x[1]**2+2*x[0]-12*x[0]*x[1]-6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)*x[1]+7*x[1]**2+3*x[1]**3-2*x[0]*x[1]+6*x[0]*x[1]**2+6*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]+2*x[1]**2+8*x[0]+5*x[0]*x[1]+5*x[0]**2
-    u[1]=(-4)-6*x[1]-6*x[1]**2-9*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[2]=(-2)-9*x[1]+3*x[1]**2+x[0]-2*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2+18*x[1]-9*x[1]**2-1*x[0]+4*x[0]*x[1]-2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1]-9*x[1]**2+3*x[1]**3+x[0]*x[1]-2*x[0]*x[1]**2+2*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[1]-5*x[1]**2+3*x[0]+x[0]*x[1]-3*x[0]**2
-    u[1]=2+3*x[1]+7*x[1]**2+4*x[0]-6*x[0]*x[1]+5*x[0]**2
-    u[2]=1+3*x[1]+4*x[1]**2+x[0]+5*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)+9*x[1]+5*x[1]**2-6*x[0]-2*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0]-9*x[0]*x[1]-5*x[0]*x[1]**2+3*x[0]**2+x[0]**2*x[1]-3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[1]+3*x[1]**2-4*x[0]-1*x[0]*x[1]-7*x[0]**2
-    u[1]=(-4)+8*x[1]-1*x[1]**2+3*x[0]-2*x[0]*x[1]-4*x[0]**2
-    u[2]=2+3*x[1]-6*x[1]**2-3*x[0]-9*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4-8*x[1]+x[1]**2-6*x[0]+4*x[0]*x[1]+12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0]+8*x[0]*x[1]-1*x[0]*x[1]**2+3*x[0]**2-2*x[0]**2*x[1]-4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+x[1]-1*x[1]**2-8*x[0]-9*x[0]*x[1]+8*x[0]**2
-    u[1]=6+3*x[1]-5*x[1]**2+x[0]-9*x[0]*x[1]-2*x[0]**2
-    u[2]=(-7)-3*x[1]+6*x[1]**2+8*x[0]-1*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7+3*x[1]-6*x[1]**2-16*x[0]+2*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-7)*x[0]-3*x[0]*x[1]+6*x[0]*x[1]**2+8*x[0]**2-1*x[0]**2*x[1]-2*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[1]-6*x[1]**2+2*x[0]-7*x[0]*x[1]+7*x[0]**2
-    u[1]=(-8)-6*x[1]+6*x[1]**2-8*x[0]-1*x[0]*x[1]+2*x[0]**2
-    u[2]=(-4)+8*x[1]+3*x[1]**2-3*x[0]-3*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)+18*x[1]+18*x[1]**2-2*x[0]+14*x[0]*x[1]-7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8*x[1]-9*x[1]**2-6*x[1]**3+2*x[0]*x[1]-7*x[0]*x[1]**2+7*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[1]-5*x[1]**2-1*x[0]-5*x[0]*x[1]+7*x[0]**2
-    u[1]=(-6)-1*x[1]+3*x[1]**2-9*x[0]+x[0]*x[1]+7*x[0]**2
-    u[2]=(-1)-2*x[1]+4*x[1]**2-3*x[0]+5*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6+2*x[1]-9*x[1]**2+9*x[0]-2*x[0]*x[1]-7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-6)*x[1]-1*x[1]**2+3*x[1]**3-9*x[0]*x[1]+x[0]*x[1]**2+7*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[1]-6*x[1]**2-3*x[0]+x[0]*x[1]-7*x[0]**2
-    u[1]=(-9)-9*x[1]-3*x[1]**2-7*x[0]-5*x[0]*x[1]-5*x[0]**2
-    u[2]=3+6*x[1]-8*x[1]**2+5*x[0]+4*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)-12*x[1]+24*x[1]**2-5*x[0]-8*x[0]*x[1]-3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3*x[1]+6*x[1]**2-8*x[1]**3+5*x[0]*x[1]+4*x[0]*x[1]**2+3*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]+6*x[1]**2+4*x[0]-1*x[0]*x[1]-5*x[0]**2
-    u[1]=1-7*x[1]-7*x[1]**2-2*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[2]=5+2*x[1]-9*x[1]**2+x[0]+7*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1+8*x[1]-6*x[1]**2-8*x[0]+2*x[0]*x[1]+15*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0]-8*x[0]*x[1]+6*x[0]*x[1]**2+4*x[0]**2-1*x[0]**2*x[1]-5*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[1]-2*x[1]**2+4*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=6+2*x[1]+x[1]**2+3*x[0]+3*x[0]*x[1]+4*x[0]**2
-    u[2]=(-8)+6*x[1]+3*x[1]**2+5*x[0]+8*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)-2*x[1]-1*x[1]**2-6*x[0]-6*x[0]*x[1]-12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(6*x[0]+2*x[0]*x[1]+x[0]*x[1]**2+3*x[0]**2+3*x[0]**2*x[1]+4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]+4*x[1]**2+7*x[0]+2*x[0]*x[1]-3*x[0]**2
-    u[1]=4+6*x[1]-6*x[1]**2+x[0]+4*x[0]*x[1]+4*x[0]**2
-    u[2]=(-1)-2*x[1]+3*x[1]**2-2*x[0]+7*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1+2*x[1]-3*x[1]**2+4*x[0]-14*x[0]*x[1]+3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0]-2*x[0]*x[1]+3*x[0]*x[1]**2-2*x[0]**2+7*x[0]**2*x[1]-1*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[1]-3*x[1]**2-1*x[0]+8*x[0]*x[1]+4*x[0]**2
-    u[1]=1+3*x[1]-1*x[1]**2-1*x[0]-6*x[0]*x[1]+2*x[0]**2
-    u[2]=5-5*x[1]+2*x[1]**2+6*x[0]+4*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)-12*x[1]+9*x[1]**2+x[0]-16*x[0]*x[1]-4*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(2*x[1]+6*x[1]**2-3*x[1]**3-1*x[0]*x[1]+8*x[0]*x[1]**2+4*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]+5*x[1]**2+7*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=4+x[1]-5*x[1]**2-9*x[0]-1*x[0]*x[1]-4*x[0]**2
-    u[2]=1+3*x[1]+4*x[1]**2-1*x[0]-6*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)-2*x[1]+15*x[1]**2+9*x[0]+2*x[0]*x[1]+4*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1]+x[1]**2-5*x[1]**3-9*x[0]*x[1]-1*x[0]*x[1]**2-4*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[1]-5*x[1]**2+3*x[0]-8*x[0]*x[1]+4*x[0]**2
-    u[1]=6+8*x[1]-4*x[1]**2-2*x[0]-1*x[0]*x[1]+x[0]**2
-    u[2]=6+x[1]-9*x[1]**2+5*x[0]-5*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)-2*x[1]+27*x[1]**2-5*x[0]+10*x[0]*x[1]+2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1]+x[1]**2-9*x[1]**3+5*x[0]*x[1]-5*x[0]*x[1]**2-2*x[0]**2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-2*x[1]-7*x[1]**2+7*x[0]+7*x[0]*x[1]-9*x[0]**2
-    u[1]=(-3)-2*x[1]-4*x[1]**2+5*x[0]+3*x[0]*x[1]+6*x[0]**2
-    u[2]=5-2*x[1]-4*x[1]**2-7*x[0]-6*x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]+7*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]+7*x[1]**2-7*x[0]-4*x[0]*x[1]-5*x[0]**2
-    u[1]=7-8*x[1]+6*x[1]**2-3*x[0]-1*x[0]*x[1]-5*x[0]**2
-    u[2]=1+2*x[1]-4*x[1]**2-3*x[0]+x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[1]+14*x[1]**2-4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[1]+7*x[1]**2-5*x[0]-9*x[0]*x[1]+8*x[0]**2
-    u[1]=(-8)+4*x[1]+3*x[1]**2-7*x[0]+6*x[0]*x[1]-2*x[0]**2
-    u[2]=6-6*x[1]+5*x[1]**2-7*x[0]+3*x[0]*x[1]-6*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]+6*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-8*x[1]+2*x[1]**2-9*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[1]=(-7)+6*x[1]-1*x[1]**2-7*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[2]=(-1)+8*x[1]+6*x[1]**2+8*x[0]+6*x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6*x[1]-2*x[1]**2+4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[1]+7*x[1]**2-8*x[0]-5*x[0]*x[1]-6*x[0]**2
-    u[1]=5-7*x[1]-5*x[1]**2+6*x[0]-9*x[0]*x[1]-2*x[0]**2
-    u[2]=(-7)+2*x[1]-2*x[1]**2-1*x[0]+7*x[0]*x[1]+8*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)*x[0]+7*x[0]*x[1]+16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+x[1]+3*x[1]**2+7*x[0]-5*x[0]*x[1]+8*x[0]**2
-    u[1]=(-5)+7*x[1]-3*x[1]**2+6*x[0]-4*x[0]*x[1]-3*x[0]**2
-    u[2]=(-1)-8*x[1]-9*x[1]**2+8*x[0]+8*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[0,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)*x[1]-18*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-8*x[1]-3*x[1]**2+8*x[0]-1*x[0]*x[1]-2*x[0]**2
-    u[1]=(-5)-4*x[1]+8*x[1]**2+2*x[0]-3*x[0]*x[1]-1*x[0]**2
-    u[2]=(-4)-9*x[1]-1*x[1]**2-4*x[0]+2*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[0]-1*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]+7*x[1]**2-9*x[0]+3*x[0]*x[1]+2*x[0]**2
-    u[1]=(-8)-3*x[1]+8*x[1]**2-8*x[0]+4*x[0]*x[1]+8*x[0]**2
-    u[2]=3-4*x[1]+6*x[1]**2+7*x[0]+3*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[1]+14*x[1]**2+3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[1]+x[1]**2-3*x[0]+8*x[0]*x[1]-4*x[0]**2
-    u[1]=1-6*x[1]-4*x[1]**2-5*x[0]+4*x[0]*x[1]-8*x[0]**2
-    u[2]=8+3*x[1]+7*x[1]**2+7*x[0]-5*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)*x[0]+4*x[0]*x[1]-16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]-6*x[1]**2-7*x[0]+5*x[0]*x[1]-3*x[0]**2
-    u[1]=1+3*x[1]-5*x[1]**2-7*x[0]-7*x[0]*x[1]+2*x[0]**2
-    u[2]=(-3)-2*x[1]+x[1]**2-5*x[0]-2*x[0]*x[1]-8*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3*x[1]-10*x[1]**2-7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[1]+6*x[1]**2+8*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=7-8*x[1]+2*x[1]**2+8*x[0]+4*x[0]*x[1]+x[0]**2
-    u[2]=4-5*x[1]-4*x[1]**2+5*x[0]+8*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5*x[0]+8*x[0]*x[1]-10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]-9*x[1]**2-8*x[0]-9*x[0]*x[1]-9*x[0]**2
-    u[1]=(-5)-4*x[1]+x[1]**2-8*x[0]-4*x[0]*x[1]-1*x[0]**2
-    u[2]=2+6*x[1]+7*x[1]**2+4*x[0]-8*x[0]*x[1]+7*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[1]+14*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[1]+2*x[1]**2-3*x[0]-1*x[0]*x[1]-7*x[0]**2
-    u[1]=(-5)+8*x[1]-4*x[1]**2+8*x[0]+x[0]*x[1]+8*x[0]**2
-    u[2]=4+3*x[1]+6*x[1]**2+6*x[0]-5*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)*x[0]-1*x[0]*x[1]-14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[1]-9*x[1]**2-8*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-5)-6*x[1]-5*x[1]**2-4*x[0]+2*x[0]*x[1]-2*x[0]**2
-    u[2]=1-8*x[1]+4*x[1]**2-2*x[0]+6*x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4*x[1]-18*x[1]**2+7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]+6*x[1]**2+x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[1]=(-9)+5*x[1]-5*x[1]**2+x[0]-9*x[0]*x[1]+x[0]**2
-    u[2]=(-2)-1*x[1]+2*x[1]**2-1*x[0]+5*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=x[0]-9*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]+x[1]**2-4*x[0]+4*x[0]*x[1]+8*x[0]**2
-    u[1]=(-1)-4*x[1]-5*x[1]**2-3*x[0]-3*x[0]*x[1]+8*x[0]**2
-    u[2]=8+6*x[1]+7*x[1]**2+8*x[0]-2*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[1]-10*x[1]**2-3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[1]+5*x[1]**2+5*x[0]-2*x[0]*x[1]+7*x[0]**2
-    u[1]=7-4*x[1]+6*x[1]**2-3*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[2]=8+8*x[1]+5*x[1]**2-6*x[0]-2*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)*x[0]-2*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_C_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]-2*x[1]**2-4*x[0]+6*x[0]*x[1]-5*x[0]**2
-    u[1]=4+6*x[1]+8*x[1]**2-3*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[2]=6+x[1]-1*x[1]**2+x[0]-4*x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(3,3,2),Function(self.domain))
-    C_test[2,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=x[1]-2*x[1]**2-4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]-9*x[0]
-    u[1]=5-6*x[1]-5*x[0]
-    u[2]=6+5*x[1]-1*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5*x[0]+8*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]-6*x[0]
-    u[1]=(-7)+3*x[1]+6*x[0]
-    u[2]=(-1)-4*x[1]-2*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]+3*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[1]-4*x[0]
-    u[1]=(-9)-9*x[1]+3*x[0]
-    u[2]=6+8*x[1]-9*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6*x[0]+8*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[1]-3*x[0]
-    u[1]=5+4*x[1]-8*x[0]
-    u[2]=(-1)-3*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[0]+x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-9*x[1]+6*x[0]
-    u[1]=(-9)+6*x[1]-1*x[0]
-    u[2]=4+3*x[1]-6*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)*x[0]+6*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[1]-1*x[0]
-    u[1]=(-7)+x[1]-7*x[0]
-    u[2]=1-3*x[1]-8*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]-3*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[1]+x[0]
-    u[1]=4+8*x[1]-9*x[0]
-    u[2]=8+2*x[1]-9*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)*x[0]-8*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[1]+5*x[0]
-    u[1]=(-1)-3*x[1]+7*x[0]
-    u[2]=4+6*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)*x[0]-3*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_D_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-6*x[1]+8*x[0]
-    u[1]=(-6)-8*x[1]-7*x[0]
-    u[2]=5+8*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5*x[0]+8*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]+4*x[0]
-    u[1]=7-6*x[1]+3*x[0]
-    u[2]=(-2)-7*x[1]+x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=x[0]+2*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[1]-3*x[0]
-    u[1]=(-8)-7*x[1]+6*x[0]
-    u[2]=(-3)-8*x[1]-8*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-8)*x[0]-7*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+6*x[1]+5*x[0]
-    u[1]=(-9)-3*x[1]-7*x[0]
-    u[2]=(-4)+3*x[1]+x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-4)*x[0]+3*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]-2*x[0]
-    u[1]=4+2*x[1]-3*x[0]
-    u[2]=6-2*x[1]-1*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-1)*x[0]-9*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]+4*x[0]
-    u[1]=(-7)+2*x[1]+7*x[0]
-    u[2]=(-7)-1*x[1]+4*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-7)*x[0]+2*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[1]+8*x[0]
-    u[1]=(-8)+6*x[1]-3*x[0]
-    u[2]=(-7)+6*x[1]+6*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-7)*x[0]+6*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]-2*x[0]
-    u[1]=(-6)-4*x[1]-8*x[0]
-    u[2]=(-6)+8*x[1]+2*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=5*x[0]-7*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+8*x[0]
-    u[1]=(-3)-3*x[1]-4*x[0]
-    u[2]=(-6)+5*x[1]+5*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-3)*x[0]-3*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[1]-3*x[0]
-    u[1]=5-9*x[1]-6*x[0]
-    u[2]=(-1)-7*x[1]+8*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-1)*x[0]-7*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[1]-8*x[1]**2+4*x[0]+8*x[0]*x[1]-1*x[0]**2
-    u[1]=3-1*x[1]-2*x[1]**2+6*x[0]+4*x[0]*x[1]+2*x[0]**2
-    u[2]=3-3*x[1]-6*x[1]**2-8*x[0]+4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=20+40*x[1]-10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[1]+5*x[1]**2+x[0]+5*x[0]*x[1]-6*x[0]**2
-    u[1]=1+8*x[1]+4*x[1]**2+6*x[0]+5*x[0]*x[1]-7*x[0]**2
-    u[2]=(-9)-4*x[1]+2*x[1]**2+2*x[0]-8*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=40+50*x[1]+25*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[1]-6*x[1]**2-5*x[0]+x[0]*x[1]+8*x[0]**2
-    u[1]=3-3*x[1]-6*x[1]**2-5*x[0]+7*x[0]*x[1]+4*x[0]**2
-    u[2]=(-5)-7*x[1]-6*x[1]**2+8*x[0]+6*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-25)+35*x[1]+40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[1]-5*x[1]**2+7*x[0]-2*x[0]*x[1]-8*x[0]**2
-    u[1]=(-3)-6*x[1]+x[1]**2+3*x[0]-9*x[0]*x[1]-6*x[0]**2
-    u[2]=6-3*x[1]+3*x[1]**2-3*x[0]-2*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-42)+14*x[1]-63*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[1]-1*x[1]**2-6*x[0]+7*x[0]*x[1]-6*x[0]**2
-    u[1]=4-1*x[1]+2*x[1]**2-6*x[0]+2*x[0]*x[1]+8*x[0]**2
-    u[2]=(-8)-9*x[1]+2*x[1]**2+4*x[0]+2*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=12+6*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[1]+8*x[1]**2-4*x[0]+4*x[0]*x[1]-4*x[0]**2
-    u[1]=8-9*x[1]-7*x[1]**2-8*x[0]-8*x[0]*x[1]+5*x[0]**2
-    u[2]=7+x[1]+6*x[1]**2+x[0]-5*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=3+36*x[1]-15*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[1]+3*x[1]**2+8*x[0]+3*x[0]*x[1]+3*x[0]**2
-    u[1]=3-3*x[1]+5*x[1]**2-8*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[2]=3-4*x[1]-8*x[1]**2+8*x[0]-9*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=64+24*x[1]+48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]-9*x[1]**2+4*x[0]+3*x[0]*x[1]+x[0]**2
-    u[1]=7-6*x[1]-8*x[1]**2-7*x[0]-7*x[0]*x[1]+6*x[0]**2
-    u[2]=6+x[1]+7*x[1]**2+7*x[0]-6*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=15-54*x[1]+9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[1]+6*x[1]**2-5*x[0]-7*x[0]*x[1]+6*x[0]**2
-    u[1]=1+5*x[1]+8*x[1]**2-9*x[0]+x[0]*x[1]-7*x[0]**2
-    u[2]=3-2*x[1]-1*x[1]**2+4*x[0]+2*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-27)+3*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]+7*x[1]**2+6*x[0]+x[0]*x[1]+6*x[0]**2
-    u[1]=6+5*x[1]-1*x[1]**2-1*x[0]-9*x[0]*x[1]+5*x[0]**2
-    u[2]=(-7)+6*x[1]-6*x[1]**2+x[0]-9*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=15-6*x[1]-27*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[1]+5*x[1]**2-7*x[0]-3*x[0]*x[1]-1*x[0]**2
-    u[1]=3-7*x[1]-4*x[1]**2+3*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[2]=(-5)+8*x[1]-1*x[1]**2-1*x[0]-4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)-20*x[1]+50*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[1]+6*x[1]**2+6*x[0]-3*x[0]*x[1]-2*x[0]**2
-    u[1]=(-2)+8*x[1]-3*x[1]**2-5*x[0]+3*x[0]*x[1]+2*x[0]**2
-    u[2]=8-9*x[1]-7*x[1]**2+3*x[0]-2*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-18)-28*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[1]+6*x[1]**2-8*x[0]+8*x[0]*x[1]-2*x[0]**2
-    u[1]=1-6*x[1]-9*x[1]**2+2*x[0]+7*x[0]*x[1]+x[0]**2
-    u[2]=1-8*x[1]+8*x[1]**2-9*x[0]+6*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-64)+64*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]+4*x[1]**2+2*x[0]+7*x[0]*x[1]+x[0]**2
-    u[1]=3-2*x[1]-9*x[1]**2-8*x[0]+2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-1)-4*x[1]+7*x[1]**2-6*x[0]-3*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-63)+56*x[1]+49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[1]-8*x[1]**2-3*x[0]+5*x[0]*x[1]-3*x[0]**2
-    u[1]=(-5)-3*x[1]-9*x[1]**2-6*x[0]+2*x[0]*x[1]-9*x[0]**2
-    u[2]=8+6*x[1]-9*x[1]**2+8*x[0]+2*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-48)+16*x[1]-144*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[1]+5*x[1]**2+7*x[0]+5*x[0]*x[1]+2*x[0]**2
-    u[1]=7-8*x[1]-6*x[1]**2-2*x[0]+6*x[0]*x[1]-5*x[0]**2
-    u[2]=6+2*x[1]+7*x[1]**2+4*x[0]+8*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-16)-24*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]-9*x[1]**2+4*x[0]+7*x[0]*x[1]-7*x[0]**2
-    u[1]=5+6*x[1]+x[1]**2+6*x[0]-6*x[0]*x[1]-9*x[0]**2
-    u[2]=(-6)+5*x[1]-9*x[1]**2-8*x[0]-1*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-32)-4*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[1]+7*x[1]**2+3*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=5-2*x[1]+3*x[1]**2+3*x[0]-1*x[0]*x[1]-2*x[0]**2
-    u[2]=5+x[1]-1*x[1]**2-5*x[0]-5*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2-4*x[1]-10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]+6*x[1]**2-5*x[0]-3*x[0]*x[1]+x[0]**2
-    u[1]=6+7*x[1]+2*x[1]**2-6*x[0]-5*x[0]*x[1]+2*x[0]**2
-    u[2]=(-2)-3*x[1]-4*x[1]**2+4*x[0]-1*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-25)-15*x[1]+10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]-9*x[1]**2+3*x[0]+6*x[0]*x[1]-5*x[0]**2
-    u[1]=(-1)+3*x[1]-9*x[1]**2-9*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[2]=4+2*x[1]+3*x[1]**2+7*x[0]-9*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=4-18*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[1]+2*x[1]**2-5*x[0]-8*x[0]*x[1]-6*x[0]**2
-    u[1]=(-7)-1*x[1]-9*x[1]**2+3*x[0]-4*x[0]*x[1]-6*x[0]**2
-    u[2]=(-6)-3*x[1]-8*x[1]**2-2*x[0]-3*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=12-16*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-2*x[1]**2-7*x[0]-6*x[0]*x[1]-8*x[0]**2
-    u[1]=(-1)-8*x[1]+2*x[1]**2-4*x[0]-2*x[0]*x[1]+4*x[0]**2
-    u[2]=(-9)-9*x[1]-5*x[1]**2-4*x[0]-6*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-16)+8*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[1]+7*x[1]**2+2*x[0]-6*x[0]*x[1]-7*x[0]**2
-    u[1]=4-3*x[1]+6*x[1]**2-4*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[2]=(-4)+2*x[1]+2*x[1]**2-4*x[0]-5*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)-10*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[1]+5*x[1]**2+3*x[0]-7*x[0]*x[1]+x[0]**2
-    u[1]=3-7*x[1]+2*x[1]**2+4*x[0]-7*x[0]*x[1]+8*x[0]**2
-    u[2]=(-2)-9*x[1]-6*x[1]**2+2*x[0]-6*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-72)-96*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+x[1]+6*x[1]**2+7*x[0]-7*x[0]*x[1]+2*x[0]**2
-    u[1]=(-9)+2*x[1]+7*x[1]**2-4*x[0]-1*x[0]*x[1]+2*x[0]**2
-    u[2]=8+5*x[1]+3*x[1]**2-3*x[0]+7*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=42-42*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[1]+5*x[1]**2+7*x[0]+7*x[0]*x[1]+2*x[0]**2
-    u[1]=(-6)-9*x[1]-1*x[1]**2+7*x[0]+2*x[0]*x[1]+5*x[0]**2
-    u[2]=(-1)-2*x[1]-2*x[1]**2-9*x[0]-6*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=32+80*x[1]+56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[1]+2*x[1]**2+7*x[0]-9*x[0]*x[1]+7*x[0]**2
-    u[1]=3+8*x[1]+7*x[1]**2-7*x[0]+x[0]*x[1]+4*x[0]**2
-    u[2]=5-5*x[1]-6*x[1]**2-2*x[0]+x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-49)+7*x[1]+56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[1]-1*x[1]**2+6*x[0]-7*x[0]*x[1]-5*x[0]**2
-    u[1]=(-7)-4*x[1]-9*x[1]**2-4*x[0]+8*x[0]*x[1]-3*x[0]**2
-    u[2]=7-7*x[1]-7*x[1]**2-8*x[0]+4*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-28)-126*x[1]+56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[1]-5*x[1]**2+x[0]-3*x[0]*x[1]-2*x[0]**2
-    u[1]=3-7*x[1]+6*x[1]**2+x[0]+4*x[0]*x[1]-5*x[0]**2
-    u[2]=(-6)+4*x[1]-7*x[1]**2-8*x[0]-9*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-40)-45*x[1]+30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[1]+7*x[1]**2-2*x[0]+3*x[0]*x[1]-3*x[0]**2
-    u[1]=3-7*x[1]+7*x[1]**2+5*x[0]-1*x[0]*x[1]-8*x[0]**2
-    u[2]=(-8)-1*x[1]-4*x[1]**2-5*x[0]-6*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-4)-32*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]-3*x[1]**2+4*x[0]-9*x[0]*x[1]-2*x[0]**2
-    u[1]=(-2)+8*x[1]+4*x[1]**2-2*x[0]-8*x[0]*x[1]+2*x[0]**2
-    u[2]=4+5*x[1]-6*x[1]**2+x[0]+4*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=8-18*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[1]+7*x[1]**2+4*x[0]-1*x[0]*x[1]+5*x[0]**2
-    u[1]=(-2)-5*x[1]-1*x[1]**2-3*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[2]=4-3*x[1]-5*x[1]**2-9*x[0]+5*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-21)+42*x[1]-3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]-2*x[1]**2+3*x[0]-7*x[0]*x[1]-7*x[0]**2
-    u[1]=7-8*x[1]+2*x[1]**2-4*x[0]-3*x[0]*x[1]-6*x[0]**2
-    u[2]=2-5*x[1]+8*x[1]**2+8*x[0]-4*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-20)-15*x[1]-60*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[1]+8*x[1]**2-2*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=4-8*x[1]+3*x[1]**2-3*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[2]=(-4)+x[1]+x[1]**2+7*x[0]-1*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-64)+48*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[1]+6*x[1]**2+8*x[0]-5*x[0]*x[1]+8*x[0]**2
-    u[1]=3+5*x[1]-4*x[1]**2+2*x[0]-4*x[0]*x[1]+x[0]**2
-    u[2]=(-9)-8*x[1]+x[1]**2-8*x[0]-9*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-16)-18*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Const_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]-2*x[1]**2+3*x[0]+5*x[0]*x[1]-7*x[0]**2
-    u[1]=(-7)-3*x[1]-9*x[1]**2+5*x[0]+7*x[0]*x[1]-2*x[0]**2
-    u[2]=7-3*x[1]-1*x[1]**2-7*x[0]+4*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-15)-10*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-2*x[1]-2*x[1]**2-7*x[0]+4*x[0]*x[1]+8*x[0]**2
-    u[1]=(-3)+x[1]-4*x[1]**2-2*x[0]+3*x[0]*x[1]+8*x[0]**2
-    u[2]=(-1)-7*x[1]+4*x[1]**2+3*x[0]-7*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=35-14*x[1]-14*x[1]**2-49*x[0]+28*x[0]*x[1]+56*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[1]-8*x[1]**2+7*x[0]+x[0]*x[1]+2*x[0]**2
-    u[1]=2+3*x[1]-4*x[1]**2+3*x[0]+2*x[0]*x[1]-5*x[0]**2
-    u[2]=3-4*x[1]+7*x[1]**2-3*x[0]-3*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=16+24*x[1]-32*x[1]**2+24*x[0]+16*x[0]*x[1]-40*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[1]+3*x[1]**2-5*x[0]+5*x[0]*x[1]+7*x[0]**2
-    u[1]=3-8*x[1]-1*x[1]**2+x[0]-7*x[0]*x[1]+6*x[0]**2
-    u[2]=3+3*x[1]-9*x[1]**2-6*x[0]-6*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=24+24*x[1]-72*x[1]**2-48*x[0]-48*x[0]*x[1]+48*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]-4*x[1]**2-4*x[0]-8*x[0]*x[1]-1*x[0]**2
-    u[1]=(-2)-8*x[1]-3*x[1]**2-8*x[0]+4*x[0]*x[1]+2*x[0]**2
-    u[2]=(-5)+3*x[1]-7*x[1]**2-9*x[0]+8*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=10+6*x[1]-8*x[1]**2-8*x[0]-16*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[1]-8*x[1]**2-9*x[0]+4*x[0]*x[1]-8*x[0]**2
-    u[1]=(-1)+x[1]+5*x[1]**2-9*x[0]-5*x[0]*x[1]-6*x[0]**2
-    u[2]=(-6)+2*x[1]-3*x[1]**2+6*x[0]+5*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)+x[1]+5*x[1]**2-9*x[0]-5*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]-1*x[1]**2+5*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[1]=1+5*x[1]+4*x[1]**2+7*x[0]+x[0]*x[1]-6*x[0]**2
-    u[2]=(-3)+3*x[1]+4*x[1]**2-7*x[0]+x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-18)+18*x[1]+24*x[1]**2-42*x[0]+6*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]+6*x[1]**2+x[0]+5*x[0]*x[1]+4*x[0]**2
-    u[1]=(-9)+8*x[1]-6*x[1]**2-9*x[0]+5*x[0]*x[1]-9*x[0]**2
-    u[2]=(-1)+4*x[1]-4*x[1]**2+x[0]-1*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)-1*x[1]+6*x[1]**2+x[0]+5*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]+x[1]**2-7*x[0]-9*x[0]*x[1]+x[0]**2
-    u[1]=(-3)-2*x[1]+4*x[1]**2-8*x[0]+8*x[0]*x[1]-2*x[0]**2
-    u[2]=(-1)-6*x[1]+4*x[1]**2-1*x[0]-2*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-12)-8*x[1]+16*x[1]**2-32*x[0]+32*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[1]-9*x[1]**2+3*x[0]-8*x[0]*x[1]+8*x[0]**2
-    u[1]=3-2*x[1]+3*x[1]**2-3*x[0]+2*x[0]*x[1]-2*x[0]**2
-    u[2]=4+2*x[1]-6*x[1]**2-1*x[0]-6*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=28+14*x[1]-42*x[1]**2-7*x[0]-42*x[0]*x[1]+49*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]+x[1]**2-2*x[0]-3*x[0]*x[1]+7*x[0]**2
-    u[1]=(-7)-7*x[1]-6*x[1]**2+3*x[0]+3*x[0]*x[1]-5*x[0]**2
-    u[2]=(-8)-8*x[1]+5*x[1]**2+5*x[0]+4*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=18+48*x[1]+6*x[1]**2-12*x[0]-18*x[0]*x[1]+42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]-4*x[1]**2+8*x[0]-3*x[0]*x[1]+x[0]**2
-    u[1]=(-2)-1*x[1]+2*x[1]**2-3*x[0]+2*x[0]*x[1]-2*x[0]**2
-    u[2]=8+2*x[1]-4*x[1]**2+3*x[0]-1*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-16)-8*x[1]+16*x[1]**2-24*x[0]+16*x[0]*x[1]-16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]+3*x[1]**2-4*x[0]+3*x[0]*x[1]+x[0]**2
-    u[1]=(-3)-2*x[1]-7*x[1]**2+4*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[2]=(-6)-1*x[1]+4*x[1]**2+7*x[0]-1*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-30)-5*x[1]+20*x[1]**2+35*x[0]-5*x[0]*x[1]+20*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[1]+6*x[1]**2+7*x[0]-2*x[0]*x[1]+5*x[0]**2
-    u[1]=5+x[1]-9*x[1]**2+6*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[2]=(-2)+2*x[1]-1*x[1]**2+3*x[0]-6*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=48+64*x[1]+48*x[1]**2+56*x[0]-16*x[0]*x[1]+40*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]+7*x[1]**2-8*x[0]+5*x[0]*x[1]-1*x[0]**2
-    u[1]=(-8)+7*x[1]-2*x[1]**2+5*x[0]-9*x[0]*x[1]+4*x[0]**2
-    u[2]=(-7)-3*x[1]-1*x[1]**2+x[0]+8*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-64)+56*x[1]-16*x[1]**2+40*x[0]-72*x[0]*x[1]+32*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[1]-8*x[1]**2-1*x[0]+7*x[0]*x[1]+3*x[0]**2
-    u[1]=6-3*x[1]-4*x[1]**2+4*x[0]-1*x[0]*x[1]+7*x[0]**2
-    u[2]=(-3)+4*x[1]-7*x[1]**2-7*x[0]-8*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-12)+16*x[1]-28*x[1]**2-28*x[0]-32*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[1]-4*x[1]**2-3*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[1]=2+2*x[1]+5*x[1]**2-4*x[0]-6*x[0]*x[1]-9*x[0]**2
-    u[2]=(-9)+x[1]-1*x[1]**2-5*x[0]+4*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-10)+4*x[1]-8*x[1]**2-6*x[0]+8*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[1]-6*x[1]**2-6*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=3+4*x[1]+6*x[1]**2+2*x[0]+x[0]*x[1]+3*x[0]**2
-    u[2]=(-8)-9*x[1]+8*x[1]**2-5*x[0]+4*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=9+12*x[1]+18*x[1]**2+6*x[0]+3*x[0]*x[1]+9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]-8*x[1]**2+x[0]-2*x[0]*x[1]-1*x[0]**2
-    u[1]=(-3)-9*x[1]-6*x[1]**2+5*x[0]-4*x[0]*x[1]-3*x[0]**2
-    u[2]=8-5*x[1]+x[1]**2-3*x[0]-1*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=48-30*x[1]+6*x[1]**2-18*x[0]-6*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[1]+4*x[1]**2+6*x[0]-1*x[0]*x[1]+3*x[0]**2
-    u[1]=(-3)-9*x[1]+4*x[1]**2-3*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[2]=(-8)-9*x[1]-6*x[1]**2-3*x[0]+6*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]-1*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]+5*x[1]**2-7*x[0]+3*x[0]*x[1]-6*x[0]**2
-    u[1]=1-5*x[1]+8*x[1]**2-5*x[0]-3*x[0]*x[1]-3*x[0]**2
-    u[2]=2-8*x[1]+4*x[1]**2+4*x[0]+5*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]+10*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[1]+6*x[1]**2-4*x[0]+5*x[0]*x[1]-7*x[0]**2
-    u[1]=(-1)-4*x[1]-6*x[1]**2-8*x[0]-6*x[0]*x[1]-4*x[0]**2
-    u[2]=(-6)-2*x[1]-4*x[1]**2-3*x[0]-7*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)*x[0]-6*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]-4*x[1]**2-3*x[0]+2*x[0]*x[1]+6*x[0]**2
-    u[1]=3-9*x[1]+8*x[1]**2-6*x[0]+8*x[0]*x[1]+7*x[0]**2
-    u[2]=(-2)+6*x[1]-2*x[1]**2+4*x[0]-4*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-9)*x[0]+16*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[1]+7*x[1]**2-2*x[0]+5*x[0]*x[1]-8*x[0]**2
-    u[1]=7+3*x[1]-7*x[1]**2-4*x[0]-4*x[0]*x[1]+4*x[0]**2
-    u[2]=(-8)-4*x[1]-1*x[1]**2+8*x[0]+3*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=8*x[0]+3*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+x[1]-9*x[1]**2-1*x[0]-3*x[0]*x[1]-8*x[0]**2
-    u[1]=6-1*x[1]-7*x[1]**2+7*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[2]=3+2*x[1]-9*x[1]**2+3*x[0]-3*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=2*x[0]-18*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]+6*x[1]**2-6*x[0]+x[0]*x[1]-9*x[0]**2
-    u[1]=6-8*x[1]+2*x[1]**2+8*x[0]+3*x[0]*x[1]+2*x[0]**2
-    u[2]=(-5)+2*x[1]-3*x[1]**2-4*x[0]+x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-6)*x[1]+x[1]**2-18*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[1]-5*x[1]**2+7*x[0]+6*x[0]*x[1]+8*x[0]**2
-    u[1]=(-2)-2*x[1]-4*x[1]**2+3*x[0]-3*x[0]*x[1]-9*x[0]**2
-    u[2]=1-9*x[1]+5*x[1]**2-6*x[0]-2*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]-10*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[1]+2*x[1]**2-1*x[0]+2*x[0]*x[1]+6*x[0]**2
-    u[1]=(-8)-7*x[1]-6*x[1]**2+4*x[0]-2*x[0]*x[1]-5*x[0]**2
-    u[2]=7+5*x[1]-4*x[1]**2-8*x[0]-2*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=4*x[1]-2*x[1]**2-10*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[1]-7*x[1]**2-2*x[0]+5*x[0]*x[1]+5*x[0]**2
-    u[1]=7-1*x[1]-3*x[1]**2+3*x[0]-2*x[0]*x[1]+x[0]**2
-    u[2]=(-8)+6*x[1]-7*x[1]**2-1*x[0]+4*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)*x[1]-6*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[1]-5*x[1]**2+4*x[0]-6*x[0]*x[1]+x[0]**2
-    u[1]=2+2*x[1]+8*x[1]**2+7*x[0]+4*x[0]*x[1]+4*x[0]**2
-    u[2]=6-2*x[1]-6*x[1]**2+6*x[0]+3*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]+3*x[1]**2+12*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]-1*x[1]**2+4*x[0]-5*x[0]*x[1]+6*x[0]**2
-    u[1]=4-2*x[1]-4*x[1]**2-2*x[0]-8*x[0]*x[1]+7*x[0]**2
-    u[2]=(-8)-5*x[1]-1*x[1]**2-6*x[0]-1*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[0,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]-2*x[1]**2-1*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[1]+3*x[1]**2-3*x[0]-7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-1)-6*x[1]-9*x[1]**2+6*x[0]-4*x[0]*x[1]+8*x[0]**2
-    u[2]=(-8)-9*x[1]-1*x[1]**2-3*x[0]+x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)*x[0]-7*x[0]*x[1]+10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[1]+6*x[1]**2+3*x[0]+2*x[0]*x[1]+5*x[0]**2
-    u[1]=1-7*x[1]+7*x[1]**2+7*x[0]-3*x[0]*x[1]+8*x[0]**2
-    u[2]=7+4*x[1]-5*x[1]**2+4*x[0]-4*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=6*x[0]+12*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[1]+6*x[1]**2-9*x[0]+3*x[0]*x[1]-2*x[0]**2
-    u[1]=6+5*x[1]+2*x[1]**2-3*x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[2]=2-1*x[1]-5*x[1]**2-7*x[0]+3*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)*x[0]+6*x[0]*x[1]-12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[1]+8*x[1]**2-3*x[0]+7*x[0]*x[1]+6*x[0]**2
-    u[1]=7+3*x[1]-1*x[1]**2+7*x[0]-1*x[0]*x[1]+2*x[0]**2
-    u[2]=(-3)-5*x[1]+7*x[1]**2-2*x[0]+5*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=3*x[0]-2*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[1]-1*x[1]**2+4*x[0]+4*x[0]*x[1]+6*x[0]**2
-    u[1]=2-6*x[1]+3*x[1]**2+7*x[0]-4*x[0]*x[1]-6*x[0]**2
-    u[2]=4-2*x[1]-1*x[1]**2+2*x[0]-4*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]-4*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-8*x[1]+x[1]**2-4*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[1]=(-7)+2*x[1]-8*x[1]**2-4*x[0]+3*x[0]*x[1]-6*x[0]**2
-    u[2]=6-2*x[1]+4*x[1]**2+7*x[0]+x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)*x[0]+8*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[1]+6*x[1]**2+4*x[0]+7*x[0]*x[1]+2*x[0]**2
-    u[1]=5+2*x[1]-8*x[1]**2-3*x[0]-5*x[0]*x[1]+4*x[0]**2
-    u[2]=(-8)-7*x[1]+5*x[1]**2+4*x[0]+3*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=4*x[1]+7*x[1]**2+4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[1]-5*x[1]**2-4*x[0]-4*x[0]*x[1]+5*x[0]**2
-    u[1]=(-8)-9*x[1]-8*x[1]**2-8*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[2]=1-5*x[1]-7*x[1]**2-5*x[0]+4*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]-10*x[1]**2-4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[1]-7*x[1]**2+7*x[0]+4*x[0]*x[1]-7*x[0]**2
-    u[1]=(-6)+2*x[1]+x[1]**2-1*x[0]-5*x[0]*x[1]+3*x[0]**2
-    u[2]=(-1)+4*x[1]-9*x[1]**2+3*x[0]-2*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-1)*x[1]-5*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[1]-5*x[1]**2-2*x[0]+x[0]*x[1]+x[0]**2
-    u[1]=6-2*x[1]-4*x[1]**2+7*x[0]+2*x[0]*x[1]-5*x[0]**2
-    u[2]=(-4)-7*x[1]-7*x[1]**2-6*x[0]+6*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)*x[1]-8*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[1]+8*x[1]**2-8*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-5)+3*x[1]-4*x[1]**2-3*x[0]-4*x[0]*x[1]-7*x[0]**2
-    u[2]=1-8*x[1]-8*x[1]**2+6*x[0]-9*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]-9*x[1]**2-16*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[1]-5*x[1]**2+x[0]-7*x[0]*x[1]-4*x[0]**2
-    u[1]=(-2)-9*x[1]+3*x[1]**2+5*x[0]+x[0]*x[1]-7*x[0]**2
-    u[2]=1-3*x[1]+6*x[1]**2-1*x[0]+3*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[1,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-3)*x[1]+12*x[1]**2+3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[1]-3*x[1]**2-3*x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[1]=(-2)+2*x[1]+7*x[1]**2+6*x[0]+3*x[0]*x[1]+4*x[0]**2
-    u[2]=7-2*x[1]+3*x[1]**2-5*x[0]-2*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-3)*x[0]+6*x[0]*x[1]-12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[1]-8*x[1]**2-6*x[0]-6*x[0]*x[1]+2*x[0]**2
-    u[1]=(-9)+5*x[1]-5*x[1]**2-9*x[0]+7*x[0]*x[1]-9*x[0]**2
-    u[2]=(-9)-7*x[1]-6*x[1]**2+6*x[0]-7*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-8)*x[0]-16*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[1]+8*x[1]**2+5*x[0]-8*x[0]*x[1]+2*x[0]**2
-    u[1]=1+4*x[1]+4*x[1]**2+4*x[0]+2*x[0]*x[1]-3*x[0]**2
-    u[2]=8-2*x[1]+7*x[1]**2+5*x[0]+3*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=4*x[0]+2*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[1]+5*x[1]**2-6*x[0]+2*x[0]*x[1]-1*x[0]**2
-    u[1]=(-5)-1*x[1]+2*x[1]**2-8*x[0]-2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-6)+6*x[1]+x[1]**2+4*x[0]-6*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]+4*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[1]+2*x[1]**2+x[0]-3*x[0]*x[1]+6*x[0]**2
-    u[1]=6+3*x[1]-6*x[1]**2+4*x[0]-9*x[0]*x[1]-9*x[0]**2
-    u[2]=5-2*x[1]+x[1]**2-7*x[0]+6*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-7)*x[0]+6*x[0]*x[1]-12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[1]-6*x[1]**2-4*x[0]-5*x[0]*x[1]+x[0]**2
-    u[1]=(-1)+6*x[1]+4*x[1]**2+8*x[0]-4*x[0]*x[1]-2*x[0]**2
-    u[2]=(-7)-3*x[1]-9*x[1]**2-5*x[0]-9*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-3)*x[0]-18*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]-1*x[1]**2+3*x[0]+7*x[0]*x[1]-1*x[0]**2
-    u[1]=(-5)+6*x[1]-1*x[1]**2+7*x[0]+x[0]*x[1]+3*x[0]**2
-    u[2]=5-1*x[1]+x[1]**2+4*x[0]+7*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=3*x[1]+7*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]-5*x[1]**2+x[0]-1*x[0]*x[1]+5*x[0]**2
-    u[1]=1-1*x[1]-2*x[1]**2-4*x[0]-5*x[0]*x[1]+2*x[0]**2
-    u[2]=(-8)+5*x[1]-3*x[1]**2-5*x[0]+6*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-3)*x[1]-10*x[1]**2-1*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[1]+x[1]**2+4*x[0]+2*x[0]*x[1]+7*x[0]**2
-    u[1]=(-1)-6*x[1]+x[1]**2+7*x[0]-3*x[0]*x[1]+4*x[0]**2
-    u[2]=3-2*x[1]-1*x[1]**2-7*x[0]+8*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=7*x[1]-3*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]-6*x[1]**2+x[0]+8*x[0]*x[1]+8*x[0]**2
-    u[1]=6-2*x[1]+7*x[1]**2-5*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[2]=(-3)-2*x[1]-4*x[1]**2+4*x[0]-9*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-2)*x[1]+14*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[1]-6*x[1]**2-3*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[1]=5-5*x[1]+7*x[1]**2-9*x[0]+5*x[0]*x[1]+7*x[0]**2
-    u[2]=7-1*x[1]-4*x[1]**2-4*x[0]+4*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-4)*x[1]+4*x[1]**2+14*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_A_Vario_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]-5*x[1]**2+x[0]+6*x[0]*x[1]+5*x[0]**2
-    u[1]=2-7*x[1]+6*x[1]**2-3*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[2]=(-5)+7*x[1]-1*x[1]**2-4*x[0]-7*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),Function(self.domain))
-    A_test[2,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=7*x[1]-2*x[1]**2-7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[1]-2*x[0]
-    u[1]=(-7)+8*x[1]+5*x[0]
-    u[2]=6-5*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]+6*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[1]-2*x[0]
-    u[1]=(-3)+5*x[1]-7*x[0]
-    u[2]=(-2)+8*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]+5*x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]-9*x[0]
-    u[1]=(-7)-3*x[1]-2*x[0]
-    u[2]=(-2)+4*x[1]+2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]+4*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-8*x[1]-1*x[0]
-    u[1]=(-2)-2*x[1]-7*x[0]
-    u[2]=(-5)-4*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-9)*x[1]-8*x[1]**2-1*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[1]-2*x[0]
-    u[1]=6+x[1]-6*x[0]
-    u[2]=5-2*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]+x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[1]-3*x[0]
-    u[1]=2+2*x[1]+5*x[0]
-    u[2]=5-8*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]-8*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[1]+4*x[0]
-    u[1]=3-3*x[1]-6*x[0]
-    u[2]=(-4)+2*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)*x[0]-4*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[1]-5*x[0]
-    u[1]=(-7)-8*x[1]+4*x[0]
-    u[2]=8+4*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]-8*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]+5*x[0]
-    u[1]=(-5)-2*x[1]+x[0]
-    u[2]=7-1*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]-1*x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]-6*x[0]
-    u[1]=(-8)+3*x[1]-4*x[0]
-    u[2]=(-2)+x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=5*x[1]+7*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]+8*x[0]
-    u[1]=7+8*x[1]+7*x[0]
-    u[2]=8+6*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]+8*x[1]**2+7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-9*x[1]+2*x[0]
-    u[1]=5+5*x[1]-5*x[0]
-    u[2]=8+x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]+x[1]**2+7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[1]-8*x[0]
-    u[1]=(-8)+7*x[1]+2*x[0]
-    u[2]=5-4*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]+6*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[1]-5*x[0]
-    u[1]=(-6)-3*x[1]-9*x[0]
-    u[2]=(-9)-6*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)*x[0]-3*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]+3*x[0]
-    u[1]=(-9)+2*x[1]+x[0]
-    u[2]=5-9*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=5*x[0]-9*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[1]+6*x[0]
-    u[1]=8-7*x[1]+6*x[0]
-    u[2]=(-5)+7*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=6*x[1]-2*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]-3*x[0]
-    u[1]=(-1)+5*x[1]+x[0]
-    u[2]=7+3*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-1)*x[1]+5*x[1]**2+x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]-1*x[0]
-    u[1]=(-2)-1*x[1]+x[0]
-    u[2]=6-6*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=6*x[1]-6*x[1]**2-9*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-9)+7*x[1]-4*x[1]**2-2*x[0]-4*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=8
-    Y_test=96
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-16)-32*x[1]-96*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=(-2)+4*x[1]+7*x[1]**2-7*x[0]+7*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=1
-    Y_test=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(4+14*x[1]+7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=3-6*x[1]+7*x[1]**2+2*x[0]+x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=6
-    Y_test=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(12+6*x[1]-60*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=3-5*x[1]-7*x[1]**2-4*x[0]+4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=1
-    Y_test=14
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-5)-14*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=1-6*x[1]+7*x[0]
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=4
-    Y_test=(-28)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(4-24*x[1]+28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-8)-5*x[1]-6*x[0]
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=7
-    Y_test=35
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-56)-35*x[1]-42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_C_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=6+7*x[1]-1*x[1]**2+5*x[0]-1*x[0]*x[1]-6*x[0]**2
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[0]=2
-    Y_test=10-2*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_C_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-4)+6*x[1]+8*x[1]**2-6*x[0]+x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[1]=5
-    Y_test=30+80*x[1]+5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_D_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=7+5*x[1]+3*x[1]**2+7*x[0]-7*x[0]*x[1]-1*x[0]**2
-    D_test=Data(3,(),ReducedFunction(self.domain))
-    Y_test=21+15*x[1]+9*x[1]**2+21*x[0]-21*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_d_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=(-3)-5*x[1]+3*x[1]**2-9*x[0]-1*x[0]*x[1]+6*x[0]**2
-    d_test=Data(7,(),ReducedFunctionOnBoundary(self.domain))
-    y_test=(-21)-35*x[1]+21*x[1]**2-63*x[0]-7*x[0]*x[1]+42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-1)+x[1]+7*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=x[0]
-    Y_test=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=(-9)+6*x[1]+2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=x[0]
-    Y_test=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-8)+2*x[1]+2*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=x[1]
-    Y_test=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=(-3)-3*x[1]-9*x[0]
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=x[1]
-    Y_test=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-3)
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=x[0]
-    Y_test=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=6
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=x[1]
-    Y_test=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_C_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=5+7*x[1]-6*x[1]**2+4*x[0]+8*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[0]=x[0]
-    Y_test=4*x[0]+8*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_C_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-7)+6*x[1]+5*x[1]**2+8*x[0]-2*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(2,),ReducedFunction(self.domain))
-    C_test[1]=x[1]
-    Y_test=6*x[1]+10*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_D_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=6+7*x[1]+3*x[0]
-    D_test=ReducedFunction(self.domain).getX()[0]
-    Y_test=6*x[0]+7*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_d_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=(-7)+3*x[1]-4*x[0]
-    d_test=interpolate(x[0],ReducedFunctionOnBoundary(self.domain))
-    y_test=(-7)*x[0]+3*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=(-9)-1*x[1]-1*x[1]**2-3*x[0]-3*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=7
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-21)-21*x[1]+70*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-4)-1*x[1]-8*x[1]**2+7*x[0]-6*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=7
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-7)-112*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=1+3*x[1]-1*x[1]**2-9*x[0]+x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=6
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-54)+6*x[1]+96*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Const_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=8+6*x[1]-9*x[1]**2-6*x[0]+4*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=2
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=12-36*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Const_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-1)+2*x[1]+x[0]
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=4
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-4)+8*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Const_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-8)+7*x[1]-1*x[0]
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=2
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=(-16)+14*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=(-2)+2*x[1]-8*x[1]**2-6*x[0]+6*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-6)*x[0]+6*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=2+5*x[1]+7*x[1]**2+2*x[0]+2*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[0,1]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=5*x[0]+14*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=(-6)-9*x[1]-8*x[1]**2+x[0]-5*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,0]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=x[1]-5*x[1]**2-18*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_A_Vario_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=(-6)+x[1]-6*x[1]**2-2*x[0]+4*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    A_test[1,1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=x[1]-12*x[1]**2+4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Vario_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-1)-5*x[1]+4*x[0]
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[0]=x[0]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[0]=(-1)*x[0]-5*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_B_Vario_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=2-5*x[1]+8*x[0]
-    B_test=Data(0.,(2,),ReducedFunction(self.domain))
-    B_test[1]=x[1]
-    X_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    X_test[1]=2*x[1]-5*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]-5*x[1]**2+5*x[0]-6*x[0]*x[1]-8*x[0]**2
-    u[1]=1+7*x[1]+3*x[1]**2+3*x[0]-5*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=80
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(25-30*x[1]-80*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[1]-3*x[1]**2-3*x[0]-4*x[0]*x[1]-5*x[0]**2
-    u[1]=3-2*x[1]-5*x[1]**2+6*x[0]-5*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=32
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)-48*x[1]-32*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+6*x[1]+4*x[1]**2-6*x[0]-1*x[0]*x[1]+4*x[0]**2
-    u[1]=(-3)+x[1]+8*x[1]**2+x[0]+8*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=24
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4+32*x[1]-24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[1]+2*x[1]**2+x[0]+5*x[0]*x[1]-2*x[0]**2
-    u[1]=(-4)+8*x[1]+8*x[1]**2+6*x[0]-9*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=45
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(40+80*x[1]-45*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]+8*x[1]**2+7*x[0]+3*x[0]*x[1]-8*x[0]**2
-    u[1]=(-6)+7*x[1]+3*x[1]**2+8*x[0]-8*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(14+6*x[1]-32*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-9*x[1]+3*x[1]**2+2*x[0]+8*x[0]*x[1]+2*x[0]**2
-    u[1]=(-5)+x[1]+x[1]**2-2*x[0]-4*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-12)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-18)+12*x[1]+16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]+7*x[1]**2+x[0]+3*x[0]*x[1]-6*x[0]**2
-    u[1]=(-1)-5*x[1]+3*x[1]**2+x[0]-7*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=35
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5-35*x[1]-50*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[1]-7*x[1]**2+x[0]-2*x[0]*x[1]-7*x[0]**2
-    u[1]=(-1)+3*x[1]-1*x[1]**2-9*x[0]+2*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=10
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(15-10*x[1]+10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[1]-3*x[1]**2+x[0]+8*x[0]*x[1]-8*x[0]**2
-    u[1]=(-4)+3*x[1]+8*x[1]**2+3*x[0]-2*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=16
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(1+8*x[1]-16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[1]-4*x[1]**2-1*x[0]-7*x[0]*x[1]-9*x[0]**2
-    u[1]=(-6)+2*x[1]-1*x[1]**2-2*x[0]+7*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=56
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(64-64*x[1]-56*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[1]+8*x[1]**2+3*x[0]-7*x[0]*x[1]-8*x[0]**2
-    u[1]=(-9)-4*x[1]+4*x[1]**2+2*x[0]-3*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8-12*x[1]+16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+x[1]**2-2*x[0]+8*x[0]*x[1]+8*x[0]**2
-    u[1]=2-9*x[1]+5*x[1]**2-2*x[0]-2*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=16
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-72)+80*x[1]-16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]+4*x[1]**2-7*x[0]-6*x[0]*x[1]-8*x[0]**2
-    u[1]=4+8*x[1]-2*x[1]**2-8*x[0]+3*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=42
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-49)-42*x[1]-112*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]+2*x[1]**2-9*x[0]+4*x[0]*x[1]-2*x[0]**2
-    u[1]=5+7*x[1]+x[1]**2-8*x[0]+6*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-4)+16*x[1]+16*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]+7*x[1]**2+6*x[0]+6*x[0]*x[1]-1*x[0]**2
-    u[1]=(-1)+7*x[1]-9*x[1]**2-7*x[0]-6*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=48
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-56)-48*x[1]+128*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]-2*x[1]**2-6*x[0]+2*x[0]*x[1]+7*x[0]**2
-    u[1]=1-8*x[1]-3*x[1]**2-8*x[0]+3*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=30
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-40)-30*x[1]+15*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[1]+x[0]
-    u[1]=2-5*x[1]-1*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(18-18*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[1]+5*x[0]
-    u[1]=(-1)+2*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-42)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)+12*x[1]+42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-6*x[1]-5*x[0]
-    u[1]=8+6*x[1]-4*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=12
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)-12*x[1]-10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[1]+5*x[0]
-    u[1]=5-3*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=15
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(25-15*x[1]+35*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]-5*x[0]
-    u[1]=(-3)-6*x[1]-7*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=10
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12+6*x[1]-10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]-2*x[0]
-    u[1]=(-4)+8*x[1]-1*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-32)+64*x[1]-8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[1]-9*x[0]
-    u[1]=2+8*x[1]-6*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-18)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-30)+18*x[1]-54*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]+4*x[0]
-    u[1]=4+4*x[1]-6*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8+8*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[1]+5*x[1]**2+x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[1]=(-2)-9*x[1]-7*x[1]**2-2*x[0]-7*x[0]*x[1]+8*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6+42*x[1]-60*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]+3*x[1]**2-1*x[0]+8*x[0]*x[1]-5*x[0]**2
-    u[1]=(-5)+5*x[1]+6*x[1]**2-2*x[0]+6*x[0]*x[1]-4*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8+12*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[1]-9*x[1]**2-5*x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-4)+8*x[1]-2*x[1]**2+8*x[0]+8*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8+8*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[1]-4*x[1]**2+4*x[0]-3*x[0]*x[1]+7*x[0]**2
-    u[1]=(-5)-9*x[1]+5*x[1]**2-4*x[0]-4*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)+10*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]+x[1]**2-8*x[0]+x[0]*x[1]+8*x[0]**2
-    u[1]=1-6*x[1]-8*x[1]**2-3*x[0]+7*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-56)+7*x[1]+112*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[1]-2*x[1]**2+x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[1]=6-4*x[1]-4*x[1]**2-8*x[0]-6*x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-40)-32*x[1]-56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-2*x[1]+2*x[1]**2+3*x[0]+8*x[0]*x[1]+6*x[0]**2
-    u[1]=(-7)-1*x[1]+7*x[1]**2+3*x[0]-8*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=15-40*x[1]+60*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+x[1]+7*x[1]**2-4*x[0]-1*x[0]*x[1]+8*x[0]**2
-    u[1]=8+2*x[1]-7*x[1]**2-2*x[0]+x[0]*x[1]-1*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=16-112*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[1]+4*x[1]**2+6*x[0]+7*x[0]*x[1]-2*x[0]**2
-    u[1]=6-2*x[1]+3*x[1]**2+8*x[0]+2*x[0]*x[1]-6*x[0]**2
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=18+12*x[1]+24*x[1]**2+36*x[0]+42*x[0]*x[1]-12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[1]-5*x[1]**2+x[0]+5*x[0]*x[1]+4*x[0]**2
-    u[1]=(-7)-2*x[1]+2*x[1]**2-7*x[0]-4*x[0]*x[1]+6*x[0]**2
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-21)-6*x[1]+6*x[1]**2-21*x[0]-12*x[0]*x[1]+18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[1]-6*x[1]**2-8*x[0]+2*x[0]*x[1]+8*x[0]**2
-    u[1]=(-8)+3*x[1]+2*x[1]**2+8*x[0]-7*x[0]*x[1]+5*x[0]**2
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=21+6*x[1]-18*x[1]**2-24*x[0]+6*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]+5*x[1]**2+2*x[0]-1*x[0]*x[1]+8*x[0]**2
-    u[1]=1+4*x[1]+3*x[1]**2+4*x[0]-8*x[0]*x[1]-3*x[0]**2
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3+12*x[1]+9*x[1]**2+12*x[0]-24*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]-5*x[1]**2+3*x[0]+4*x[0]*x[1]-7*x[0]**2
-    u[1]=(-1)-6*x[1]+4*x[1]**2-2*x[0]+6*x[0]*x[1]-8*x[0]**2
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=2
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-14)-2*x[1]-10*x[1]**2+6*x[0]+8*x[0]*x[1]-14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[1]-1*x[1]**2-9*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=1+x[1]-6*x[1]**2+2*x[0]-9*x[0]*x[1]+8*x[0]**2
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=6
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=6+6*x[1]-36*x[1]**2+12*x[0]-54*x[0]*x[1]+48*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[1]-2*x[1]**2+4*x[0]+3*x[0]*x[1]+3*x[0]**2
-    u[1]=2+2*x[1]+2*x[1]**2+5*x[0]+5*x[0]*x[1]+2*x[0]**2
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=8
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-16)-24*x[1]-16*x[1]**2+32*x[0]+24*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+x[1]-4*x[1]**2+2*x[0]-6*x[0]*x[1]+2*x[0]**2
-    u[1]=8+4*x[1]-5*x[1]**2-8*x[0]+x[0]*x[1]+6*x[0]**2
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=5
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=40+20*x[1]-25*x[1]**2-40*x[0]+5*x[0]*x[1]+30*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[1]-7*x[0]
-    u[1]=6-2*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[1]-8*x[0]
-    u[1]=(-5)-1*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[1]+7*x[0]
-    u[1]=2+3*x[1]+6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]+6*x[0]
-    u[1]=(-5)-1*x[1]-7*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]+8*x[0]
-    u[1]=8-1*x[1]+2*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[1]-1*x[0]
-    u[1]=(-2)-5*x[1]-7*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]+6*x[0]
-    u[1]=5+2*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]-4*x[0]
-    u[1]=(-1)-7*x[1]+8*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[1]+8*x[0]
-    u[1]=(-5)+8*x[1]+x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]+6*x[0]
-    u[1]=2-2*x[1]-8*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]-3*x[0]
-    u[1]=(-1)-9*x[1]+4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]+6*x[0]
-    u[1]=(-5)-2*x[1]+3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]-3*x[0]
-    u[1]=7+7*x[1]-3*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]-5*x[0]
-    u[1]=1+6*x[1]-6*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[1]+8*x[0]
-    u[1]=6+6*x[1]-4*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[1]+6*x[0]
-    u[1]=5+2*x[1]+5*x[0]
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-7)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=3
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-8)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-7)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-8)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-1)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=7
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-8)
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[1]+8*x[1]**2-7*x[0]-7*x[0]*x[1]+2*x[0]**2
-    u[1]=1-4*x[1]-4*x[1]**2-2*x[0]-2*x[0]*x[1]+8*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]-7*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[1]+2*x[1]**2-6*x[0]-9*x[0]*x[1]-5*x[0]**2
-    u[1]=7-5*x[1]+6*x[1]**2-1*x[0]+8*x[0]*x[1]-7*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[1]+4*x[1]**2-9*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]-9*x[1]**2+x[0]+7*x[0]*x[1]+6*x[0]**2
-    u[1]=4-3*x[1]-1*x[1]**2+7*x[0]+x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]+x[0]*x[1]-10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[1]+6*x[1]**2-6*x[0]-8*x[0]*x[1]+7*x[0]**2
-    u[1]=(-4)-4*x[1]-4*x[1]**2-5*x[0]-2*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[1]-8*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]+x[1]**2-7*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=8+3*x[1]+4*x[1]**2-1*x[0]-9*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]+7*x[0]*x[1]-16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-1*x[1]-3*x[1]**2-7*x[0]+5*x[0]*x[1]+7*x[0]**2
-    u[1]=(-1)+8*x[1]+3*x[1]**2-7*x[0]-2*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[1]-6*x[1]**2+5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[1]-7*x[1]**2-2*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[1]=8-8*x[1]+4*x[1]**2-7*x[0]+5*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]+5*x[0]*x[1]+10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]+6*x[1]**2-6*x[0]+3*x[0]*x[1]-5*x[0]**2
-    u[1]=(-2)-2*x[1]+8*x[1]**2+7*x[0]+6*x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[1]+16*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[1]+x[0]
-    u[1]=(-1)+3*x[1]+7*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6*x[0]-5*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+2*x[1]+x[0]
-    u[1]=1+4*x[1]-2*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=x[0]+4*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[1]-8*x[0]
-    u[1]=(-9)-6*x[1]+x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)*x[0]-6*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+2*x[1]-1*x[0]
-    u[1]=3+2*x[1]-3*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3*x[0]+2*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]-6*x[0]
-    u[1]=8+5*x[1]+2*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=4*x[0]+8*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]+6*x[0]
-    u[1]=(-1)+5*x[1]+3*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-1)*x[0]+5*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[1]+x[0]
-    u[1]=8+2*x[1]-1*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-7)*x[0]+3*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+x[1]-4*x[0]
-    u[1]=(-2)+6*x[1]+7*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-2)*x[0]+6*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[1]-1*x[1]**2-9*x[0]-4*x[0]*x[1]+7*x[0]**2
-    u[1]=1-7*x[1]-7*x[1]**2+8*x[0]-5*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-54)-24*x[1]+84*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[1]-5*x[1]**2-2*x[0]+4*x[0]*x[1]+5*x[0]**2
-    u[1]=(-9)+5*x[1]+x[1]**2+6*x[0]-4*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-6)-60*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[1]-6*x[1]**2-1*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=(-2)+2*x[1]-1*x[1]**2+4*x[0]-3*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=24-18*x[1]-72*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[1]-5*x[1]**2+3*x[0]-3*x[0]*x[1]+x[0]**2
-    u[1]=(-5)+2*x[1]+7*x[1]**2+2*x[0]+3*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6+42*x[1]+9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[1]-1*x[1]**2+2*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=(-2)+6*x[1]-5*x[1]**2-3*x[0]+6*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=8+28*x[1]-64*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]-8*x[1]**2-9*x[0]+x[0]*x[1]+2*x[0]**2
-    u[1]=6+x[1]-7*x[1]**2-7*x[0]+8*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-21)-112*x[1]+7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[1]+8*x[1]**2+2*x[0]+4*x[0]*x[1]-3*x[0]**2
-    u[1]=2+5*x[1]+3*x[1]**2+x[0]+8*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=4+32*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[1]-3*x[1]**2-8*x[0]-1*x[0]*x[1]-3*x[0]**2
-    u[1]=5-5*x[1]+4*x[1]**2+5*x[0]-5*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-25)+40*x[1]-25*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[1]-7*x[1]**2+x[0]-9*x[0]*x[1]+8*x[0]**2
-    u[1]=5+5*x[1]+7*x[1]**2-2*x[0]-6*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7-63*x[1]+112*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[1]-4*x[1]**2+5*x[0]+8*x[0]*x[1]-4*x[0]**2
-    u[1]=(-5)+x[1]+4*x[1]**2+6*x[0]+6*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=2
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=14-16*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]+x[1]**2-1*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[1]=7-4*x[1]-1*x[1]**2+3*x[0]-4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=5
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=15-20*x[1]+60*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[1]-9*x[1]**2-3*x[0]-5*x[0]*x[1]+x[0]**2
-    u[1]=(-2)-7*x[1]-1*x[1]**2-7*x[0]+2*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-42)-12*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[1]-5*x[1]**2-7*x[0]+5*x[0]*x[1]-4*x[0]**2
-    u[1]=7+7*x[1]+3*x[1]**2+5*x[0]-2*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=3
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-21)+15*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]+7*x[1]**2-8*x[0]-9*x[0]*x[1]+5*x[0]**2
-    u[1]=(-3)-9*x[1]+6*x[1]**2-7*x[0]-7*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=24+84*x[1]-54*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]+4*x[1]**2-7*x[0]-9*x[0]*x[1]-3*x[0]**2
-    u[1]=(-6)+5*x[1]+4*x[1]**2+4*x[0]-7*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=28-49*x[1]+84*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[1]-3*x[1]**2-3*x[0]-1*x[0]*x[1]+6*x[0]**2
-    u[1]=8+2*x[1]-8*x[1]**2-8*x[0]+3*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=12-96*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]-8*x[0]
-    u[1]=(-6)-7*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=35+49*x[1]-56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[1]+5*x[0]
-    u[1]=(-6)-1*x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-48)-8*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]-6*x[0]
-    u[1]=(-5)-8*x[1]+4*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-16)+40*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[1]-6*x[0]
-    u[1]=3-8*x[1]+3*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=7
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=21-56*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[1]-2*x[0]
-    u[1]=1-3*x[1]+2*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=8
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=8-40*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]-7*x[0]
-    u[1]=3-9*x[1]-4*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=6
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=18-54*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[1]+2*x[0]
-    u[1]=(-8)+x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=1
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)+x[1]+2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]-4*x[0]
-    u[1]=(-2)+4*x[1]-5*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=4
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)+16*x[1]-20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+6*x[1]**2+x[0]+6*x[0]*x[1]-6*x[0]**2
-    u[1]=(-3)+5*x[1]+4*x[1]**2-4*x[0]+6*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]+6*x[0]*x[1]-12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[1]+7*x[1]**2-3*x[0]+7*x[0]*x[1]+x[0]**2
-    u[1]=(-5)+x[1]-2*x[1]**2-9*x[0]+2*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]+14*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[1]+3*x[1]**2-8*x[0]-5*x[0]*x[1]-1*x[0]**2
-    u[1]=(-6)-3*x[1]+2*x[1]**2+x[0]+5*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]+5*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[1]+4*x[1]**2+3*x[0]-9*x[0]*x[1]+2*x[0]**2
-    u[1]=1-5*x[1]+7*x[1]**2+8*x[0]-2*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]+14*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[1]+5*x[1]**2+8*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[1]=3+x[1]-6*x[1]**2+2*x[0]+6*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=8*x[1]+4*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-1*x[1]-9*x[1]**2-9*x[0]+4*x[0]*x[1]-2*x[0]**2
-    u[1]=2+8*x[1]-4*x[1]**2-2*x[0]-8*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)*x[1]-18*x[1]**2+4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[1]+6*x[1]**2+3*x[0]-7*x[0]*x[1]-3*x[0]**2
-    u[1]=(-7)-6*x[1]-7*x[1]**2-5*x[0]-2*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-5)*x[1]-2*x[1]**2-18*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]-1*x[1]**2+6*x[0]-7*x[0]*x[1]-7*x[0]**2
-    u[1]=(-4)-1*x[1]-4*x[1]**2-9*x[0]+3*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)*x[1]-8*x[1]**2+3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]-4*x[1]**2-5*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[1]=1+2*x[1]+5*x[1]**2-7*x[0]-1*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)*x[0]+6*x[0]*x[1]+12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[1]+3*x[1]**2+3*x[0]-4*x[0]*x[1]+4*x[0]**2
-    u[1]=(-4)+8*x[1]+4*x[1]**2+8*x[0]-2*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]+6*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[1]-7*x[1]**2-8*x[0]+2*x[0]*x[1]-9*x[0]**2
-    u[1]=2-3*x[1]+2*x[1]**2-7*x[0]+6*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]+6*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[1]+x[1]**2+x[0]-8*x[0]*x[1]-1*x[0]**2
-    u[1]=2+4*x[1]-6*x[1]**2-7*x[0]-8*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]-12*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[1]-2*x[1]**2-5*x[0]+6*x[0]*x[1]+x[0]**2
-    u[1]=(-3)-8*x[1]+2*x[1]**2+3*x[0]-1*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-5)*x[1]+6*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[1]+2*x[1]**2-3*x[0]-8*x[0]*x[1]-8*x[0]**2
-    u[1]=(-6)+7*x[1]+7*x[1]**2-4*x[0]-6*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-9)*x[1]+4*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]+7*x[1]**2+5*x[0]-2*x[0]*x[1]+8*x[0]**2
-    u[1]=5-5*x[1]-8*x[1]**2+x[0]-5*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=x[1]-5*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-2*x[1]+8*x[1]**2-7*x[0]+2*x[0]*x[1]+x[0]**2
-    u[1]=(-1)+5*x[1]-6*x[1]**2-9*x[0]+2*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=5*x[1]-12*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[1]+8*x[0]
-    u[1]=(-5)-2*x[1]-1*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]-7*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]+8*x[0]
-    u[1]=(-2)-8*x[1]+7*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]-8*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[1]+7*x[0]
-    u[1]=6-6*x[1]-2*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-6)*x[1]-8*x[1]**2+7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]-4*x[0]
-    u[1]=(-4)-4*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)*x[1]-4*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]+5*x[0]
-    u[1]=(-4)-6*x[1]-8*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]-4*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]+2*x[0]
-    u[1]=7-8*x[1]+8*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]-8*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]-5*x[0]
-    u[1]=3-3*x[1]+5*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]-4*x[1]**2-5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-8*x[1]-7*x[0]
-    u[1]=2+5*x[1]+3*x[0]
-    B_test=Data(0.,(2,2,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(2, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=2*x[1]+5*x[1]**2+3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]+4*x[1]**2-9*x[0]+2*x[0]*x[1]+7*x[0]**2
-    u[1]=(-4)+5*x[1]-4*x[1]**2+6*x[0]+7*x[0]*x[1]+7*x[0]**2
-    u[2]=(-5)+x[1]-3*x[1]**2-4*x[0]-9*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-14)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)+2*x[1]+14*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[1]+7*x[1]**2-1*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=(-4)-7*x[1]-8*x[1]**2-8*x[0]+2*x[0]*x[1]-5*x[0]**2
-    u[2]=(-5)+2*x[1]-1*x[1]**2+4*x[0]-1*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=15
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(25+70*x[1]-15*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[1]+3*x[1]**2-9*x[0]-8*x[0]*x[1]+6*x[0]**2
-    u[1]=(-1)+4*x[1]+5*x[1]**2+8*x[0]+5*x[0]*x[1]+5*x[0]**2
-    u[2]=8+8*x[1]-4*x[1]**2+8*x[0]-8*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-70)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(56+35*x[1]+70*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]+8*x[1]**2-4*x[0]-9*x[0]*x[1]-2*x[0]**2
-    u[1]=(-3)-6*x[1]-6*x[1]**2-9*x[0]+5*x[0]*x[1]-4*x[0]**2
-    u[2]=4-8*x[1]+6*x[1]**2-6*x[0]-7*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-15)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-18)-36*x[1]+15*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+3*x[1]**2-2*x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[1]=4+4*x[1]+2*x[1]**2+5*x[0]-2*x[0]*x[1]-6*x[0]**2
-    u[2]=3-3*x[1]-1*x[1]**2-6*x[0]+6*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-24)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-24)+24*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]-8*x[1]**2-3*x[0]-3*x[0]*x[1]-4*x[0]**2
-    u[1]=8-3*x[1]-4*x[1]**2-9*x[0]+8*x[0]*x[1]-2*x[0]**2
-    u[2]=(-9)+2*x[1]+3*x[1]**2-4*x[0]-1*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(16+48*x[1]-8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]-6*x[1]**2+4*x[0]-8*x[0]*x[1]-8*x[0]**2
-    u[1]=2+2*x[1]-7*x[1]**2+x[0]-8*x[0]*x[1]-8*x[0]**2
-    u[2]=7-5*x[1]+6*x[1]**2+8*x[0]-6*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=40
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(20-40*x[1]-80*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[1]-4*x[1]**2+3*x[0]+2*x[0]*x[1]-4*x[0]**2
-    u[1]=(-1)+6*x[1]+7*x[1]**2+5*x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[2]=6+5*x[1]-2*x[1]**2-6*x[0]-5*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=40
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-20)-40*x[1]+10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]+7*x[1]**2-9*x[0]-8*x[0]*x[1]-2*x[0]**2
-    u[1]=8+7*x[1]-1*x[1]**2+7*x[0]-2*x[0]*x[1]-7*x[0]**2
-    u[2]=7-9*x[1]-1*x[1]**2+8*x[0]-1*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=14
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(49-14*x[1]-98*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[1]-9*x[1]**2-2*x[0]-9*x[0]*x[1]+3*x[0]**2
-    u[1]=5-9*x[1]-4*x[1]**2-3*x[0]+7*x[0]*x[1]-7*x[0]**2
-    u[2]=(-2)+x[1]-6*x[1]**2-3*x[0]-9*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=32
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-36)-32*x[1]+28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+x[1]-3*x[1]**2+x[0]-5*x[0]*x[1]+x[0]**2
-    u[1]=(-7)-3*x[1]+5*x[1]**2-2*x[0]-7*x[0]*x[1]-3*x[0]**2
-    u[2]=2-1*x[1]-8*x[1]**2-9*x[0]+2*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-10)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-45)+10*x[1]+40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[1]+5*x[1]**2-9*x[0]-9*x[0]*x[1]-3*x[0]**2
-    u[1]=(-7)-4*x[1]-7*x[1]**2+7*x[0]+3*x[0]*x[1]-4*x[0]**2
-    u[2]=4-2*x[1]-3*x[1]**2-8*x[0]+7*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)-6*x[1]+7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]-6*x[1]**2-2*x[0]+6*x[0]*x[1]+7*x[0]**2
-    u[1]=(-6)+x[1]-4*x[1]**2+3*x[0]+7*x[0]*x[1]-9*x[0]**2
-    u[2]=6+2*x[1]+4*x[1]**2+2*x[0]+6*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-112)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-16)+48*x[1]+112*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]-7*x[1]**2+7*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[1]=(-4)-8*x[1]+x[1]**2-2*x[0]-9*x[0]*x[1]+2*x[0]**2
-    u[2]=1-8*x[1]+x[1]**2+7*x[0]+5*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6-42*x[1]-3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[1]+6*x[1]**2-6*x[0]-3*x[0]*x[1]-2*x[0]**2
-    u[1]=5-6*x[1]+7*x[1]**2-8*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[2]=4-1*x[1]-6*x[1]**2-6*x[0]-2*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-30)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-40)+20*x[1]+30*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]-2*x[1]**2-5*x[0]-9*x[0]*x[1]-3*x[0]**2
-    u[1]=(-1)-4*x[1]-3*x[1]**2+3*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[2]=6+3*x[1]+4*x[1]**2-2*x[0]-5*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)-6*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[1]+3*x[1]**2-7*x[0]-5*x[0]*x[1]+2*x[0]**2
-    u[1]=1-2*x[1]+7*x[1]**2+4*x[0]-5*x[0]*x[1]+x[0]**2
-    u[2]=8+5*x[1]+8*x[1]**2-9*x[0]-8*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-70)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-45)-40*x[1]+70*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[1]+7*x[1]**2-2*x[0]+7*x[0]*x[1]-7*x[0]**2
-    u[1]=7+2*x[1]+3*x[1]**2-5*x[0]-1*x[0]*x[1]+4*x[0]**2
-    u[2]=(-4)+3*x[1]-5*x[1]**2-6*x[0]+2*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12-40*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[1]-1*x[1]**2-2*x[0]-5*x[0]*x[1]-4*x[0]**2
-    u[1]=2-7*x[1]-7*x[1]**2-3*x[0]+7*x[0]*x[1]-1*x[0]**2
-    u[2]=(-7)-2*x[1]-6*x[1]**2-1*x[0]+7*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=40
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-16)-40*x[1]-64*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]-5*x[1]**2-5*x[0]+7*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)-8*x[1]+5*x[1]**2+x[0]+4*x[0]*x[1]-5*x[0]**2
-    u[2]=1-1*x[1]-5*x[1]**2-7*x[0]-9*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=80
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-16)-80*x[1]+56*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[1]+5*x[1]**2-8*x[0]+4*x[0]*x[1]+x[0]**2
-    u[1]=2-8*x[1]-6*x[1]**2-9*x[0]+x[0]*x[1]+5*x[0]**2
-    u[2]=3-5*x[1]-8*x[1]**2-3*x[0]-5*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-36)+4*x[1]+40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]+x[1]**2-8*x[0]-5*x[0]*x[1]-5*x[0]**2
-    u[1]=(-1)-5*x[1]-7*x[1]**2-4*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[2]=7-9*x[1]-2*x[1]**2-8*x[0]+6*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=84
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-30)-84*x[1]+36*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]-2*x[1]**2+x[0]+8*x[0]*x[1]-1*x[0]**2
-    u[1]=(-3)+6*x[1]+4*x[1]**2+3*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[2]=1+2*x[1]-6*x[1]**2-9*x[0]+5*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-10)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-18)+10*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[1]-6*x[1]**2-5*x[0]-5*x[0]*x[1]+2*x[0]**2
-    u[1]=(-3)+6*x[1]+7*x[1]**2-2*x[0]-5*x[0]*x[1]-2*x[0]**2
-    u[2]=(-5)+5*x[1]-7*x[1]**2-3*x[0]+7*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=98
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(35-98*x[1]+49*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[1]-7*x[1]**2-9*x[0]+5*x[0]*x[1]-6*x[0]**2
-    u[1]=5-6*x[1]-9*x[1]**2-1*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[2]=(-2)-2*x[1]-7*x[1]**2-8*x[0]+5*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=48
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-36)+20*x[1]-48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]+2*x[1]**2+2*x[0]-6*x[0]*x[1]+8*x[0]**2
-    u[1]=4-6*x[1]-7*x[1]**2+x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[2]=7-6*x[1]+5*x[1]**2-5*x[0]-1*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=18
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-24)+12*x[1]-18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[1]-5*x[1]**2-4*x[0]+4*x[0]*x[1]-9*x[0]**2
-    u[1]=7+3*x[1]+8*x[1]**2+7*x[0]+6*x[0]*x[1]-7*x[0]**2
-    u[2]=(-8)-1*x[1]-4*x[1]**2-6*x[0]-8*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=84
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(42+36*x[1]-84*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[1]-4*x[1]**2-4*x[0]+5*x[0]*x[1]+4*x[0]**2
-    u[1]=(-2)-2*x[1]-4*x[1]**2-8*x[0]-5*x[0]*x[1]-4*x[0]**2
-    u[2]=2-3*x[1]+8*x[1]**2-6*x[0]+8*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=15
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)-24*x[1]-15*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[1]-2*x[1]**2+6*x[0]-5*x[0]*x[1]+6*x[0]**2
-    u[1]=(-1)-5*x[1]-2*x[1]**2+2*x[0]-5*x[0]*x[1]+x[0]**2
-    u[2]=(-3)-6*x[1]-6*x[1]**2-1*x[0]+4*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-24)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3)+12*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[1]-4*x[1]**2+5*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[1]=1-9*x[1]+7*x[1]**2-2*x[0]+5*x[0]*x[1]+7*x[0]**2
-    u[2]=(-4)+2*x[1]-4*x[1]**2+7*x[0]+5*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-35)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(14-56*x[1]+35*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[1]-9*x[1]**2-5*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[1]=(-1)-5*x[1]+7*x[1]**2-6*x[0]+7*x[0]*x[1]-2*x[0]**2
-    u[2]=5-5*x[1]-6*x[1]**2-5*x[0]+2*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-5)+4*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[1]-5*x[1]**2+6*x[0]-2*x[0]*x[1]-5*x[0]**2
-    u[1]=8+4*x[1]+x[1]**2+4*x[0]+5*x[0]*x[1]-5*x[0]**2
-    u[2]=3+5*x[1]-6*x[1]**2-6*x[0]+7*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=50
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-5)-50*x[1]-10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]+6*x[1]**2+7*x[0]+4*x[0]*x[1]+2*x[0]**2
-    u[1]=(-2)+4*x[1]+4*x[1]**2+2*x[0]-8*x[0]*x[1]-9*x[0]**2
-    u[2]=(-5)-1*x[1]+2*x[1]**2-6*x[0]-3*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=48
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(12-48*x[1]-108*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[1]-6*x[1]**2-2*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[1]=1+6*x[1]-9*x[1]**2+4*x[0]+6*x[0]*x[1]-7*x[0]**2
-    u[2]=(-1)-8*x[1]-5*x[1]**2-8*x[0]-4*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=72
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(24-72*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[1]-8*x[1]**2+7*x[0]-3*x[0]*x[1]-2*x[0]**2
-    u[1]=8-3*x[1]-8*x[1]**2-5*x[0]+3*x[0]*x[1]+3*x[0]**2
-    u[2]=(-4)-2*x[1]-1*x[1]**2+5*x[0]+8*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-40)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(25+40*x[1]-70*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]+x[1]**2-4*x[0]-2*x[0]*x[1]+x[0]**2
-    u[1]=(-6)+6*x[1]+x[1]**2-3*x[0]+6*x[0]*x[1]-5*x[0]**2
-    u[2]=(-6)+3*x[1]+6*x[1]**2+x[0]+2*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-60)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(15+60*x[1]+10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]+2*x[0]
-    u[1]=(-7)-8*x[1]+5*x[0]
-    u[2]=(-7)+8*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-10)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(40-25*x[1]+10*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[1]-1*x[0]
-    u[1]=4+x[1]+2*x[0]
-    u[2]=(-9)+5*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-12)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(24+6*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[1]-5*x[0]
-    u[1]=(-6)+3*x[1]+8*x[0]
-    u[2]=(-5)+5*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=40
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-25)+25*x[1]-40*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-9*x[1]-3*x[0]
-    u[1]=(-2)-9*x[1]-9*x[0]
-    u[2]=(-7)+2*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=36
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8-36*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[1]-6*x[0]
-    u[1]=7+4*x[1]-7*x[0]
-    u[2]=(-3)-1*x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-16)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(28+16*x[1]-28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[1]+3*x[0]
-    u[1]=6-8*x[1]+4*x[0]
-    u[2]=2+7*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-56)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(16+56*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[1]-5*x[0]
-    u[1]=(-3)+3*x[1]-5*x[0]
-    u[2]=1-9*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=20
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-24)+12*x[1]-20*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[1]-2*x[0]
-    u[1]=(-1)+2*x[1]-6*x[0]
-    u[2]=(-7)-3*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=48
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)+16*x[1]-48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]+x[0]
-    u[1]=1-4*x[1]-7*x[0]
-    u[2]=(-1)+5*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=12
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)+15*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[1]+2*x[0]
-    u[1]=(-1)+2*x[1]+3*x[0]
-    u[2]=(-1)+6*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=42
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6-42*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[1]-4*x[0]
-    u[1]=8+2*x[1]+4*x[0]
-    u[2]=(-7)+5*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(16+4*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[1]+3*x[0]
-    u[1]=3-3*x[1]-4*x[0]
-    u[2]=5+3*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-18)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(30+18*x[1]+42*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[1]+2*x[0]
-    u[1]=2-4*x[1]-7*x[0]
-    u[2]=(-8)+2*x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-12)-15*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[1]-6*x[0]
-    u[1]=7+6*x[1]-4*x[0]
-    u[2]=1+8*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(7+6*x[1]-4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]+x[0]
-    u[1]=1+2*x[1]-2*x[0]
-    u[2]=(-8)+x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-24)+3*x[1]-9*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]-9*x[0]
-    u[1]=6+2*x[1]+8*x[0]
-    u[2]=(-8)+2*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=24
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-20)-24*x[1]-36*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[1]-3*x[0]
-    u[1]=6+7*x[1]-7*x[0]
-    u[2]=8-8*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-28)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(24+28*x[1]-28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]+3*x[0]
-    u[1]=(-5)+7*x[1]+7*x[0]
-    u[2]=4-1*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(20-5*x[1]-45*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[1]+6*x[1]**2+6*x[0]-8*x[0]*x[1]+7*x[0]**2
-    u[1]=3+5*x[1]-5*x[1]**2+3*x[0]+3*x[0]*x[1]-4*x[0]**2
-    u[2]=8-7*x[1]-2*x[1]**2-6*x[0]-7*x[0]*x[1]+7*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=24-32*x[1]+56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]+x[1]**2+7*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[1]=8+7*x[1]+6*x[1]**2-3*x[0]-4*x[0]*x[1]+x[0]**2
-    u[2]=(-2)+5*x[1]+6*x[1]**2-6*x[0]+5*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)+2*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[1]+8*x[1]**2-3*x[0]-6*x[0]*x[1]+7*x[0]**2
-    u[1]=7+x[1]-5*x[1]**2+8*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[2]=(-9)+5*x[1]+3*x[1]**2+3*x[0]-5*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=56+56*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[1]-6*x[1]**2-4*x[0]+7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-9)-9*x[1]+3*x[1]**2-6*x[0]-7*x[0]*x[1]-7*x[0]**2
-    u[2]=(-6)+8*x[1]+6*x[1]**2+5*x[0]-4*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-63)+42*x[1]-49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]+5*x[1]**2-3*x[0]-8*x[0]*x[1]+2*x[0]**2
-    u[1]=4+x[1]+4*x[1]**2+3*x[0]-7*x[0]*x[1]+7*x[0]**2
-    u[2]=(-9)+6*x[1]-6*x[1]**2+6*x[0]-8*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=30-40*x[1]+40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]-6*x[1]**2+4*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[1]=6-7*x[1]-3*x[1]**2-8*x[0]-9*x[0]*x[1]-1*x[0]**2
-    u[2]=(-8)-6*x[1]+3*x[1]**2+2*x[0]+5*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-36)+36*x[1]+30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[1]+2*x[1]**2+x[0]+4*x[0]*x[1]-2*x[0]**2
-    u[1]=2-3*x[1]-9*x[1]**2+3*x[0]-6*x[0]*x[1]-6*x[0]**2
-    u[2]=8+4*x[1]+6*x[1]**2-4*x[0]-7*x[0]*x[1]-1*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8+32*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[1]+4*x[1]**2+4*x[0]-6*x[0]*x[1]+5*x[0]**2
-    u[1]=(-7)-2*x[1]-1*x[1]**2+5*x[0]-7*x[0]*x[1]-3*x[0]**2
-    u[2]=(-3)+2*x[1]-2*x[1]**2+x[0]+5*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=24+48*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-1*x[1]+5*x[1]**2-5*x[0]+x[0]*x[1]-7*x[0]**2
-    u[1]=(-4)-4*x[1]+3*x[1]**2-5*x[0]-1*x[0]*x[1]-8*x[0]**2
-    u[2]=4+x[1]+4*x[1]**2+6*x[0]-2*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-30)-6*x[1]-96*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[1]-2*x[1]**2+6*x[0]-2*x[0]*x[1]+8*x[0]**2
-    u[1]=(-1)-1*x[1]-2*x[1]**2-4*x[0]+8*x[0]*x[1]-8*x[0]**2
-    u[2]=(-6)-5*x[1]+7*x[1]**2+2*x[0]-1*x[0]*x[1]+3*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-8*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]+8*x[1]**2-9*x[0]-2*x[0]*x[1]-9*x[0]**2
-    u[1]=(-5)-5*x[1]-5*x[1]**2-7*x[0]+x[0]*x[1]+2*x[0]**2
-    u[2]=4-8*x[1]+8*x[1]**2+6*x[0]-5*x[0]*x[1]+7*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=18-15*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[1]-6*x[1]**2+8*x[0]-8*x[0]*x[1]-8*x[0]**2
-    u[1]=(-1)-9*x[1]+8*x[1]**2+4*x[0]-2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-8)+3*x[1]+5*x[1]**2+4*x[0]+5*x[0]*x[1]+8*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=21+70*x[1]+35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]-5*x[1]**2-2*x[0]+7*x[0]*x[1]-7*x[0]**2
-    u[1]=(-8)+3*x[1]-3*x[1]**2-5*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[2]=(-1)-7*x[1]-4*x[1]**2+2*x[0]-1*x[0]*x[1]+x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-10)+35*x[1]-70*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[1]-1*x[1]**2-1*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-3)-8*x[1]-9*x[1]**2+4*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[2]=1+7*x[1]-1*x[1]**2+x[0]-3*x[0]*x[1]-2*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)-2*x[1]+7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]-2*x[1]**2+x[0]-7*x[0]*x[1]-5*x[0]**2
-    u[1]=(-1)-7*x[1]+5*x[1]**2-9*x[0]+2*x[0]*x[1]-4*x[0]**2
-    u[2]=3-6*x[1]-2*x[1]**2+x[0]+8*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-45)+10*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[1]+7*x[1]**2-4*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[1]=(-1)-5*x[1]-2*x[1]**2-8*x[0]-9*x[0]*x[1]+6*x[0]**2
-    u[2]=(-9)+8*x[1]+7*x[1]**2+2*x[0]-8*x[0]*x[1]+5*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-30)-24*x[1]-54*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[1]+7*x[1]**2-5*x[0]-5*x[0]*x[1]+6*x[0]**2
-    u[1]=4+x[1]-9*x[1]**2-9*x[0]-1*x[0]*x[1]-3*x[0]**2
-    u[2]=5+8*x[1]+5*x[1]**2+8*x[0]-9*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=64-72*x[1]-80*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[1]+5*x[1]**2+2*x[0]-3*x[0]*x[1]-5*x[0]**2
-    u[1]=(-9)-9*x[1]+5*x[1]**2+8*x[0]+4*x[0]*x[1]+7*x[0]**2
-    u[2]=(-2)-2*x[1]+7*x[1]**2+6*x[0]+2*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-10)+70*x[1]+10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[1]-6*x[1]**2+8*x[0]+5*x[0]*x[1]+6*x[0]**2
-    u[1]=6-3*x[1]+4*x[1]**2+2*x[0]-1*x[0]*x[1]-3*x[0]**2
-    u[2]=(-7)+2*x[1]-9*x[1]**2-9*x[0]-7*x[0]*x[1]-5*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=24+48*x[1]-36*x[1]**2+48*x[0]+30*x[0]*x[1]+36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[1]-5*x[1]**2-8*x[0]-2*x[0]*x[1]-3*x[0]**2
-    u[1]=1+3*x[1]-3*x[1]**2+7*x[0]-7*x[0]*x[1]-1*x[0]**2
-    u[2]=(-4)-5*x[1]-4*x[1]**2-9*x[0]-1*x[0]*x[1]-1*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2+6*x[1]-6*x[1]**2+14*x[0]-14*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[1]-6*x[1]**2+6*x[0]-3*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)-9*x[1]-3*x[1]**2+7*x[0]-1*x[0]*x[1]-5*x[0]**2
-    u[2]=(-7)+6*x[1]+8*x[1]**2-8*x[0]-6*x[0]*x[1]-6*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-42)+36*x[1]+48*x[1]**2-48*x[0]-36*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[1]-8*x[1]**2+3*x[0]+3*x[0]*x[1]-3*x[0]**2
-    u[1]=(-5)+6*x[1]+7*x[1]**2+2*x[0]+8*x[0]*x[1]-7*x[0]**2
-    u[2]=(-3)+5*x[1]-2*x[1]**2-2*x[0]+7*x[0]*x[1]+4*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7+7*x[1]-56*x[1]**2+21*x[0]+21*x[0]*x[1]-21*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[1]+7*x[1]**2+5*x[0]-7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-4)-2*x[1]-9*x[1]**2+6*x[0]-2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-2)+x[1]-2*x[1]**2+4*x[0]-5*x[0]*x[1]+6*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-16)-8*x[1]-36*x[1]**2+24*x[0]-8*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[1]-7*x[1]**2-7*x[0]+3*x[0]*x[1]-9*x[0]**2
-    u[1]=1-8*x[1]+2*x[1]**2-3*x[0]-7*x[0]*x[1]-2*x[0]**2
-    u[2]=(-3)+4*x[1]+6*x[1]**2+5*x[0]-2*x[0]*x[1]-3*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-18)+24*x[1]+36*x[1]**2+30*x[0]-12*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[1]+x[1]**2-6*x[0]-7*x[0]*x[1]-6*x[0]**2
-    u[1]=4-9*x[1]-7*x[1]**2+8*x[0]+x[0]*x[1]+3*x[0]**2
-    u[2]=(-8)+4*x[1]-5*x[1]**2+2*x[0]+2*x[0]*x[1]+7*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-20)-20*x[1]+4*x[1]**2-24*x[0]-28*x[0]*x[1]-24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+6*x[1]+4*x[1]**2+3*x[0]-8*x[0]*x[1]+5*x[0]**2
-    u[1]=(-8)-5*x[1]-2*x[1]**2+x[0]-9*x[0]*x[1]+x[0]**2
-    u[2]=(-5)+5*x[1]-2*x[1]**2-7*x[0]+2*x[0]*x[1]-1*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-48)-30*x[1]-12*x[1]**2+6*x[0]-54*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[1]+3*x[1]**2-7*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=7-2*x[1]+3*x[1]**2-7*x[0]-2*x[0]*x[1]+2*x[0]**2
-    u[2]=3+8*x[1]+5*x[1]**2+3*x[0]+4*x[0]*x[1]-5*x[0]**2
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=18+48*x[1]+30*x[1]**2+18*x[0]+24*x[0]*x[1]-30*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[1]-1*x[1]**2-6*x[0]-2*x[0]*x[1]-7*x[0]**2
-    u[1]=1+3*x[1]-2*x[1]**2+x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[2]=(-3)-3*x[1]+8*x[1]**2-5*x[0]+7*x[0]*x[1]-9*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=8
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-40)-32*x[1]-8*x[1]**2-48*x[0]-16*x[0]*x[1]-56*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[1]-1*x[1]**2+3*x[0]+8*x[0]*x[1]-3*x[0]**2
-    u[1]=(-8)-6*x[1]+4*x[1]**2-1*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[2]=6+6*x[1]-8*x[1]**2-5*x[0]+3*x[0]*x[1]-8*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-16)-12*x[1]+8*x[1]**2-2*x[0]+16*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]-8*x[1]**2+7*x[0]+x[0]*x[1]+8*x[0]**2
-    u[1]=(-7)-3*x[1]+3*x[1]**2+8*x[0]+6*x[0]*x[1]+x[0]**2
-    u[2]=2+3*x[1]+8*x[1]**2+6*x[0]-8*x[0]*x[1]+x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,2]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=8+12*x[1]+32*x[1]**2+24*x[0]-32*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[1]+5*x[1]**2-1*x[0]+6*x[0]*x[1]-4*x[0]**2
-    u[1]=3-9*x[1]-3*x[1]**2+3*x[0]-8*x[0]*x[1]-1*x[0]**2
-    u[2]=(-4)+3*x[1]+6*x[1]**2-8*x[0]-9*x[0]*x[1]-5*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-54)+24*x[1]+30*x[1]**2-6*x[0]+36*x[0]*x[1]-24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-2*x[1]+x[1]**2+8*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=7-6*x[1]-3*x[1]**2+3*x[0]+3*x[0]*x[1]-3*x[0]**2
-    u[2]=(-9)+2*x[1]+8*x[1]**2-6*x[0]-9*x[0]*x[1]-6*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=5
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=35-30*x[1]-15*x[1]**2+15*x[0]+15*x[0]*x[1]-15*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[1]-9*x[1]**2-6*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=3-5*x[1]+2*x[1]**2+x[0]+5*x[0]*x[1]-3*x[0]**2
-    u[2]=1+7*x[1]+8*x[1]**2+5*x[0]-4*x[0]*x[1]+3*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,2]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=2+14*x[1]+16*x[1]**2+10*x[0]-8*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[1]+3*x[1]**2-8*x[0]-9*x[0]*x[1]-7*x[0]**2
-    u[1]=(-2)+4*x[1]-2*x[1]**2-6*x[0]-2*x[0]*x[1]-4*x[0]**2
-    u[2]=1-2*x[1]+7*x[1]**2-2*x[0]+x[0]*x[1]+2*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,0]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=10-2*x[1]+6*x[1]**2-16*x[0]-18*x[0]*x[1]-14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[1]-3*x[1]**2+x[0]-6*x[0]*x[1]-1*x[0]**2
-    u[1]=1-1*x[1]-1*x[1]**2+3*x[0]-3*x[0]*x[1]-6*x[0]**2
-    u[2]=(-3)-8*x[1]-4*x[1]**2-7*x[0]-2*x[0]*x[1]-7*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,1]=7
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=7-7*x[1]-7*x[1]**2+21*x[0]-21*x[0]*x[1]-42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]+8*x[1]**2+8*x[0]-7*x[0]*x[1]+2*x[0]**2
-    u[1]=(-7)-5*x[1]-9*x[1]**2+x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[2]=(-3)-8*x[1]-6*x[1]**2+8*x[0]+x[0]*x[1]+4*x[0]**2
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,2]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-3)-8*x[1]-6*x[1]**2+8*x[0]+x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[1]-8*x[0]
-    u[1]=(-3)-9*x[1]+7*x[0]
-    u[2]=(-3)+2*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[1]-7*x[0]
-    u[1]=(-8)-9*x[1]+7*x[0]
-    u[2]=5-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]-1*x[0]
-    u[1]=3-8*x[1]-9*x[0]
-    u[2]=(-4)+x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[1]-7*x[0]
-    u[1]=5-8*x[1]-8*x[0]
-    u[2]=7+8*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[1]-7*x[0]
-    u[1]=2+4*x[1]+3*x[0]
-    u[2]=(-7)-1*x[1]-1*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[1]-5*x[0]
-    u[1]=(-3)-2*x[1]+5*x[0]
-    u[2]=6+4*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[1]-7*x[0]
-    u[1]=(-1)-8*x[1]-6*x[0]
-    u[2]=4+2*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[1]-5*x[0]
-    u[1]=6-8*x[1]-1*x[0]
-    u[2]=4-3*x[1]+6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[1]-7*x[0]
-    u[1]=(-8)-7*x[1]+8*x[0]
-    u[2]=(-5)+3*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-9*x[1]+5*x[0]
-    u[1]=(-4)+x[1]+x[0]
-    u[2]=2-9*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[1]-9*x[0]
-    u[1]=7-5*x[1]+3*x[0]
-    u[2]=(-4)+7*x[1]+4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]+8*x[0]
-    u[1]=1-2*x[1]-3*x[0]
-    u[2]=(-8)+x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]-6*x[0]
-    u[1]=4+4*x[1]-5*x[0]
-    u[2]=2+x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[1]+2*x[0]
-    u[1]=1+3*x[1]-5*x[0]
-    u[2]=7+8*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]+5*x[0]
-    u[1]=(-1)-4*x[1]+2*x[0]
-    u[2]=2-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+4*x[0]
-    u[1]=(-9)-7*x[1]-2*x[0]
-    u[2]=5+2*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]+2*x[0]
-    u[1]=7+5*x[1]-1*x[0]
-    u[2]=5+3*x[1]+2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[1]+4*x[0]
-    u[1]=(-2)-8*x[1]-7*x[0]
-    u[2]=(-2)-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[1]+3*x[0]
-    u[1]=2-1*x[1]-3*x[0]
-    u[2]=7+6*x[1]-2*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[1]-6*x[0]
-    u[1]=2-2*x[1]-1*x[0]
-    u[2]=4-8*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[1]+8*x[0]
-    u[1]=(-2)+5*x[1]+6*x[0]
-    u[2]=(-2)-4*x[1]+7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[1]-4*x[0]
-    u[1]=(-2)-3*x[1]+6*x[0]
-    u[2]=(-1)+8*x[1]-9*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[1]+5*x[0]
-    u[1]=1-3*x[1]-6*x[0]
-    u[2]=1-8*x[1]+x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+3*x[1]-7*x[0]
-    u[1]=(-4)+5*x[1]+7*x[0]
-    u[2]=5-1*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[1]-1*x[0]
-    u[1]=(-4)+7*x[1]+x[0]
-    u[2]=(-7)+4*x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[1]+7*x[0]
-    u[1]=1-8*x[1]-2*x[0]
-    u[2]=4-3*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[1]+7*x[0]
-    u[1]=(-7)-9*x[1]+8*x[0]
-    u[2]=(-2)-1*x[1]+3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[1]+5*x[0]
-    u[1]=(-6)-9*x[1]-7*x[0]
-    u[2]=4-2*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]+5*x[0]
-    u[1]=5+3*x[1]-8*x[0]
-    u[2]=(-4)-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[1]+7*x[0]
-    u[1]=4-9*x[1]+8*x[0]
-    u[2]=(-5)-1*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]-4*x[0]
-    u[1]=(-9)-4*x[1]-3*x[0]
-    u[2]=(-5)+x[1]-7*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[1]-4*x[0]
-    u[1]=5+2*x[1]+4*x[0]
-    u[2]=(-7)+7*x[1]+8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]-8*x[0]
-    u[1]=5-3*x[1]+6*x[0]
-    u[2]=1+3*x[1]-4*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]-2*x[0]
-    u[1]=(-2)-4*x[1]+7*x[0]
-    u[2]=4-7*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]-7*x[0]
-    u[1]=(-7)+x[1]-1*x[0]
-    u[2]=8+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]+4*x[0]
-    u[1]=(-1)-9*x[1]-3*x[0]
-    u[2]=1+3*x[1]-3*x[0]
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-5)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=8
-    u[2]=(-2)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-9)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-2)
-    u[2]=8
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=1
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-3)
-    u[2]=3
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-3)
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-3)
-    u[2]=6
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-3)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=3
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-3)
-    u[2]=7
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-7)
-    u[2]=(-9)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=6
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-5)
-    u[2]=(-8)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-6)
-    u[2]=(-5)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=5
-    u[2]=(-9)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-5)
-    u[2]=(-7)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=7
-    u[2]=3
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-5)
-    u[2]=(-4)
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[1]+4*x[1]**2+3*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=1+8*x[1]+6*x[1]**2+2*x[0]+6*x[0]*x[1]+5*x[0]**2
-    u[2]=8-8*x[1]+2*x[1]**2+6*x[0]+6*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[0]-4*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[1]-9*x[1]**2-3*x[0]+7*x[0]*x[1]+2*x[0]**2
-    u[1]=4-1*x[1]+2*x[1]**2+x[0]-8*x[0]*x[1]-2*x[0]**2
-    u[2]=(-2)-8*x[1]-7*x[1]**2+2*x[0]-1*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4*x[1]-18*x[1]**2+7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[1]+5*x[1]**2+8*x[0]+8*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)-4*x[1]-7*x[1]**2+4*x[0]-2*x[0]*x[1]-9*x[0]**2
-    u[2]=(-6)-6*x[1]+7*x[1]**2-6*x[0]+6*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4*x[0]-2*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-7*x[1]**2+x[0]-7*x[0]*x[1]+x[0]**2
-    u[1]=(-5)-6*x[1]-4*x[1]**2+2*x[0]-6*x[0]*x[1]-6*x[0]**2
-    u[2]=4+5*x[1]-9*x[1]**2-6*x[0]+8*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)*x[1]-8*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[1]+5*x[1]**2+8*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[1]=(-9)-8*x[1]+8*x[1]**2-5*x[0]-5*x[0]*x[1]-6*x[0]**2
-    u[2]=(-2)-4*x[1]+3*x[1]**2-4*x[0]+6*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]+6*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]-7*x[1]**2-1*x[0]+6*x[0]*x[1]-1*x[0]**2
-    u[1]=5-5*x[1]+5*x[1]**2-6*x[0]+6*x[0]*x[1]+5*x[0]**2
-    u[2]=1-3*x[1]-2*x[1]**2-4*x[0]+7*x[0]*x[1]+6*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[0,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)*x[1]-4*x[1]**2+7*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[1]-1*x[1]**2+x[0]-9*x[0]*x[1]-3*x[0]**2
-    u[1]=(-9)-3*x[1]-4*x[1]**2-3*x[0]+6*x[0]*x[1]+7*x[0]**2
-    u[2]=(-2)+3*x[1]+6*x[1]**2-4*x[0]-9*x[0]*x[1]-3*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]-9*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[1]-3*x[1]**2-2*x[0]+6*x[0]*x[1]-9*x[0]**2
-    u[1]=8-8*x[1]-2*x[1]**2+3*x[0]+x[0]*x[1]+8*x[0]**2
-    u[2]=(-3)-1*x[1]+2*x[1]**2-4*x[0]+2*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[1]-6*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[1]-5*x[1]**2-7*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=(-3)-6*x[1]+7*x[1]**2+2*x[0]+3*x[0]*x[1]-2*x[0]**2
-    u[2]=3+6*x[1]-1*x[1]**2-7*x[0]+5*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[0]+3*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[1]+5*x[1]**2-5*x[0]-5*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)+8*x[1]-9*x[1]**2-3*x[0]+8*x[0]*x[1]+x[0]**2
-    u[2]=(-2)-4*x[1]+5*x[1]**2+3*x[0]+5*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[1]-18*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[1]-2*x[1]**2-7*x[0]-5*x[0]*x[1]-2*x[0]**2
-    u[1]=4+7*x[1]-1*x[1]**2-1*x[0]-8*x[0]*x[1]+7*x[0]**2
-    u[2]=(-1)+8*x[1]+6*x[1]**2-1*x[0]-2*x[0]*x[1]+7*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[0]-2*x[0]*x[1]+14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+7*x[1]+x[1]**2+5*x[0]+4*x[0]*x[1]-3*x[0]**2
-    u[1]=(-5)+6*x[1]+2*x[1]**2-9*x[0]-3*x[0]*x[1]+8*x[0]**2
-    u[2]=(-9)-6*x[1]+3*x[1]**2+8*x[0]-4*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)*x[1]+6*x[1]**2-4*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[1]-7*x[1]**2+8*x[0]+7*x[0]*x[1]+3*x[0]**2
-    u[1]=(-8)-7*x[1]-7*x[1]**2-4*x[0]-9*x[0]*x[1]-8*x[0]**2
-    u[2]=7+8*x[1]+3*x[1]**2-3*x[0]-3*x[0]*x[1]-5*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8*x[0]+7*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]+6*x[1]**2+8*x[0]+x[0]*x[1]+2*x[0]**2
-    u[1]=5-7*x[1]-6*x[1]**2-2*x[0]+3*x[0]*x[1]-6*x[0]**2
-    u[2]=(-5)-7*x[1]+2*x[1]**2-7*x[0]-7*x[0]*x[1]-9*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[1]+12*x[1]**2+x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[1]-7*x[1]**2-5*x[0]-8*x[0]*x[1]+5*x[0]**2
-    u[1]=3+6*x[1]+3*x[1]**2-8*x[0]-6*x[0]*x[1]-7*x[0]**2
-    u[2]=5+3*x[1]-9*x[1]**2+6*x[0]+2*x[0]*x[1]-8*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)*x[0]-6*x[0]*x[1]-14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[1]-4*x[1]**2-1*x[0]+5*x[0]*x[1]-7*x[0]**2
-    u[1]=(-3)-9*x[1]-9*x[1]**2-7*x[0]-6*x[0]*x[1]+8*x[0]**2
-    u[2]=2-9*x[1]-5*x[1]**2-2*x[0]+4*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-9)*x[1]-18*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[1]+2*x[1]**2+5*x[0]-5*x[0]*x[1]+x[0]**2
-    u[1]=2+4*x[1]-5*x[1]**2-2*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[2]=(-3)+6*x[1]-1*x[1]**2+7*x[0]-9*x[0]*x[1]+4*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7*x[0]-9*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_C_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]+8*x[1]**2-9*x[0]-7*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)-2*x[1]+x[1]**2-9*x[0]+8*x[0]*x[1]-5*x[0]**2
-    u[2]=(-3)+2*x[1]-5*x[1]**2-2*x[0]-3*x[0]*x[1]+2*x[0]**2
-    C_test=Data(0.,(3,3,2),ReducedFunction(self.domain))
-    C_test[2,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2*x[1]-10*x[1]**2-3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]-4*x[0]
-    u[1]=(-2)-5*x[1]-1*x[0]
-    u[2]=(-9)+x[1]+4*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)*x[0]-5*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[1]+x[0]
-    u[1]=(-4)-1*x[1]-1*x[0]
-    u[2]=(-4)+2*x[1]+8*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]-1*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]-9*x[0]
-    u[1]=(-7)-1*x[1]+3*x[0]
-    u[2]=(-4)-1*x[1]+2*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[0]-1*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]-5*x[0]
-    u[1]=2-8*x[1]-9*x[0]
-    u[2]=(-6)-8*x[1]-9*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]+3*x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[1]+6*x[0]
-    u[1]=2-9*x[1]+5*x[0]
-    u[2]=1-1*x[1]+4*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[0]-9*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[1]-6*x[0]
-    u[1]=7+6*x[1]+4*x[0]
-    u[2]=(-1)-8*x[1]+x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[0]-8*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[1]+x[0]
-    u[1]=(-2)+4*x[1]+5*x[0]
-    u[2]=(-4)-6*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5*x[0]-6*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[1]+8*x[0]
-    u[1]=8+7*x[1]-7*x[0]
-    u[2]=3+3*x[1]-9*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8*x[0]+7*x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_D_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]-4*x[0]
-    u[1]=6-8*x[1]+x[0]
-    u[2]=3+5*x[1]-2*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3*x[0]+5*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[1]+4*x[0]
-    u[1]=8+2*x[1]+8*x[0]
-    u[2]=2-5*x[1]-6*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=4*x[0]-1*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[1]+2*x[0]
-    u[1]=8-9*x[1]-5*x[0]
-    u[2]=(-4)-4*x[1]+5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=8*x[0]-9*x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]-5*x[0]
-    u[1]=1+7*x[1]+8*x[0]
-    u[2]=(-8)+8*x[1]+8*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-8)*x[0]+8*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-9*x[0]
-    u[1]=4-3*x[1]+8*x[0]
-    u[2]=4+x[1]-6*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-2)*x[0]+4*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[1]-5*x[0]
-    u[1]=(-3)+4*x[1]-5*x[0]
-    u[2]=(-6)+7*x[1]+8*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-3)*x[0]+4*x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[1]+2*x[0]
-    u[1]=(-4)+5*x[1]+5*x[0]
-    u[2]=(-9)-7*x[1]-3*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-9)*x[0]-7*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[1]+x[0]
-    u[1]=(-4)-4*x[1]-9*x[0]
-    u[2]=1+x[1]+5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=5*x[0]-6*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]-1*x[0]
-    u[1]=6-9*x[1]+7*x[0]
-    u[2]=(-7)-1*x[1]-9*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=6*x[0]-9*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[1]+5*x[0]
-    u[1]=2+3*x[1]+x[0]
-    u[2]=(-8)-9*x[1]+2*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-8)*x[0]-9*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[1]-7*x[1]**2-3*x[0]+3*x[0]*x[1]-2*x[0]**2
-    u[1]=6-1*x[1]-6*x[1]**2-4*x[0]+x[0]*x[1]+5*x[0]**2
-    u[2]=(-2)-6*x[1]+8*x[1]**2+7*x[0]-2*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)+3*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[1]+5*x[1]**2+2*x[0]-1*x[0]*x[1]-9*x[0]**2
-    u[1]=1+6*x[1]-6*x[1]**2-2*x[0]+6*x[0]*x[1]+3*x[0]**2
-    u[2]=7-2*x[1]+2*x[1]**2-2*x[0]+2*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=12+60*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]-6*x[1]**2-9*x[0]-5*x[0]*x[1]-8*x[0]**2
-    u[1]=8-6*x[1]-6*x[1]**2-5*x[0]-4*x[0]*x[1]+8*x[0]**2
-    u[2]=3+5*x[1]+6*x[1]**2+8*x[0]+4*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-40)-32*x[1]+128*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[1]+4*x[1]**2-1*x[0]-1*x[0]*x[1]-3*x[0]**2
-    u[1]=3+5*x[1]-2*x[1]**2+3*x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[2]=4+5*x[1]+3*x[1]**2-9*x[0]-5*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=20-16*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[1]+3*x[1]**2-2*x[0]-5*x[0]*x[1]+8*x[0]**2
-    u[1]=7-6*x[1]-7*x[1]**2+4*x[0]-5*x[0]*x[1]-6*x[0]**2
-    u[2]=(-4)-4*x[1]-4*x[1]**2+4*x[0]-8*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=24-48*x[1]-96*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[1]-8*x[1]**2-5*x[0]+2*x[0]*x[1]+2*x[0]**2
-    u[1]=(-5)+4*x[1]+6*x[1]**2+7*x[0]+6*x[0]*x[1]+x[0]**2
-    u[2]=(-3)+4*x[1]-7*x[1]**2+2*x[0]-9*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=20-70*x[1]-45*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]-3*x[1]**2+4*x[0]-6*x[0]*x[1]-5*x[0]**2
-    u[1]=7-5*x[1]-8*x[1]**2-1*x[0]-4*x[0]*x[1]-8*x[0]**2
-    u[2]=6-4*x[1]+6*x[1]**2-4*x[0]+4*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=12-18*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[1]+6*x[1]**2+6*x[0]-6*x[0]*x[1]+7*x[0]**2
-    u[1]=1+8*x[1]-3*x[1]**2-9*x[0]-8*x[0]*x[1]+8*x[0]**2
-    u[2]=6+5*x[1]-9*x[1]**2-8*x[0]+3*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-40)+96*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[1]+4*x[1]**2-1*x[0]-3*x[0]*x[1]-4*x[0]**2
-    u[1]=3-8*x[1]-6*x[1]**2-7*x[0]+x[0]*x[1]-1*x[0]**2
-    u[2]=5-9*x[1]-9*x[1]**2+3*x[0]-3*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-35)+5*x[1]-10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[1]+2*x[1]**2-1*x[0]+5*x[0]*x[1]-5*x[0]**2
-    u[1]=(-9)+4*x[1]-1*x[1]**2+6*x[0]+5*x[0]*x[1]-2*x[0]**2
-    u[2]=(-5)-3*x[1]+2*x[1]**2+3*x[0]+5*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=12-6*x[1]+15*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[1]-6*x[1]**2-4*x[0]-9*x[0]*x[1]+5*x[0]**2
-    u[1]=4-4*x[1]-1*x[1]**2+7*x[0]+3*x[0]*x[1]-9*x[0]**2
-    u[2]=2+7*x[1]+8*x[1]**2+7*x[0]+x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=56+8*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[1]+x[1]**2-2*x[0]-4*x[0]*x[1]-3*x[0]**2
-    u[1]=6-6*x[1]-3*x[1]**2+4*x[0]-2*x[0]*x[1]+4*x[0]**2
-    u[2]=(-3)+2*x[1]+3*x[1]**2+6*x[0]-2*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=6+18*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[1]-5*x[1]**2+6*x[0]+8*x[0]*x[1]-6*x[0]**2
-    u[1]=(-4)-7*x[1]+x[1]**2-3*x[0]-8*x[0]*x[1]+x[0]**2
-    u[2]=(-9)-6*x[1]-3*x[1]**2+8*x[0]-9*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=48+64*x[1]-96*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[1]-4*x[1]**2+6*x[0]-8*x[0]*x[1]+4*x[0]**2
-    u[1]=(-4)-3*x[1]+4*x[1]**2-5*x[0]+2*x[0]*x[1]-2*x[0]**2
-    u[2]=(-4)+7*x[1]+3*x[1]**2-2*x[0]-6*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=7-8*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[1]+6*x[1]**2-2*x[0]+4*x[0]*x[1]+3*x[0]**2
-    u[1]=(-2)-3*x[1]-1*x[1]**2-1*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[2]=6+2*x[1]+6*x[1]**2-4*x[0]-7*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)+12*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[1]-1*x[1]**2-8*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[1]=(-8)+2*x[1]+x[1]**2+x[0]+6*x[0]*x[1]+8*x[0]**2
-    u[2]=(-6)-1*x[1]+x[1]**2-5*x[0]+7*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=8+8*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[1]+2*x[1]**2+x[0]+2*x[0]*x[1]-6*x[0]**2
-    u[1]=2-5*x[1]+2*x[1]**2+7*x[0]-4*x[0]*x[1]-5*x[0]**2
-    u[2]=1-3*x[1]-7*x[1]**2+6*x[0]+5*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=12+10*x[1]+20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[1]-7*x[1]**2+4*x[0]-3*x[0]*x[1]+6*x[0]**2
-    u[1]=2-7*x[1]-5*x[1]**2-1*x[0]+8*x[0]*x[1]-6*x[0]**2
-    u[2]=(-3)-1*x[1]+x[1]**2-7*x[0]-1*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)+10*x[1]-5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[1]-4*x[1]**2-5*x[0]-5*x[0]*x[1]+6*x[0]**2
-    u[1]=(-9)+6*x[1]-4*x[1]**2+5*x[0]-2*x[0]*x[1]-5*x[0]**2
-    u[2]=(-7)-9*x[1]+8*x[1]**2+8*x[0]+4*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-25)-25*x[1]+60*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[1]+2*x[1]**2-5*x[0]+6*x[0]*x[1]+3*x[0]**2
-    u[1]=(-6)-6*x[1]+x[1]**2+5*x[0]+2*x[0]*x[1]+8*x[0]**2
-    u[2]=(-3)+3*x[1]-6*x[1]**2+x[0]-9*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-27)+12*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[1]-8*x[1]**2-6*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[1]=8-1*x[1]-8*x[1]**2-2*x[0]+7*x[0]*x[1]-2*x[0]**2
-    u[2]=4-8*x[1]+7*x[1]**2-2*x[0]-8*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)+21*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+6*x[1]+6*x[1]**2-2*x[0]-4*x[0]*x[1]+x[0]**2
-    u[1]=(-6)-2*x[1]-7*x[1]**2-4*x[0]+5*x[0]*x[1]+6*x[0]**2
-    u[2]=(-1)+2*x[1]-1*x[1]**2-8*x[0]-4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)-28*x[1]+10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[1]+3*x[1]**2-4*x[0]-8*x[0]*x[1]+4*x[0]**2
-    u[1]=(-8)+2*x[1]+2*x[1]**2-8*x[0]+3*x[0]*x[1]+8*x[0]**2
-    u[2]=6+x[1]-7*x[1]**2-9*x[0]+7*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-9)+7*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-2*x[1]+2*x[1]**2-3*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[1]=2+x[1]+2*x[1]**2+5*x[0]+8*x[0]*x[1]-1*x[0]**2
-    u[2]=5-9*x[1]+x[1]**2+8*x[0]+6*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-72)+16*x[1]+48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[1]+8*x[1]**2-8*x[0]+5*x[0]*x[1]-2*x[0]**2
-    u[1]=1-6*x[1]+x[1]**2+5*x[0]-3*x[0]*x[1]-4*x[0]**2
-    u[2]=3-6*x[1]-5*x[1]**2-8*x[0]-1*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-56)+35*x[1]-28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]+4*x[1]**2+5*x[0]+3*x[0]*x[1]-3*x[0]**2
-    u[1]=(-3)+2*x[1]+8*x[1]**2-1*x[0]-4*x[0]*x[1]+x[0]**2
-    u[2]=(-6)-4*x[1]+x[1]**2+2*x[0]-4*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-45)+40*x[1]+15*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[1]-8*x[1]**2-8*x[0]+5*x[0]*x[1]+5*x[0]**2
-    u[1]=8+3*x[1]-6*x[1]**2-4*x[0]-7*x[0]*x[1]+3*x[0]**2
-    u[2]=(-3)+6*x[1]+6*x[1]**2+5*x[0]+8*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-24)-42*x[1]+36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[1]+3*x[1]**2+5*x[0]-8*x[0]*x[1]-6*x[0]**2
-    u[1]=3+3*x[1]-6*x[1]**2-6*x[0]-7*x[0]*x[1]+7*x[0]**2
-    u[2]=(-5)+6*x[1]-9*x[1]**2-3*x[0]-2*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=18-72*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[1]-6*x[1]**2-7*x[0]+3*x[0]*x[1]+6*x[0]**2
-    u[1]=5+3*x[1]-3*x[1]**2-5*x[0]+6*x[0]*x[1]+3*x[0]**2
-    u[2]=6+x[1]-7*x[1]**2-9*x[0]+8*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-45)+40*x[1]-90*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[1]+2*x[1]**2-4*x[0]+7*x[0]*x[1]-8*x[0]**2
-    u[1]=(-5)-4*x[1]+5*x[1]**2+7*x[0]-6*x[0]*x[1]-8*x[0]**2
-    u[2]=(-5)-2*x[1]+4*x[1]**2+8*x[0]+x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-8)+32*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-6*x[1]+3*x[1]**2-9*x[0]-4*x[0]*x[1]-2*x[0]**2
-    u[1]=(-1)-2*x[1]-5*x[1]**2+4*x[0]-8*x[0]*x[1]-8*x[0]**2
-    u[2]=(-8)-3*x[1]+6*x[1]**2+3*x[0]-2*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-36)-16*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[1]+2*x[1]**2-1*x[0]+4*x[0]*x[1]-4*x[0]**2
-    u[1]=5-3*x[1]-3*x[1]**2-5*x[0]-3*x[0]*x[1]+7*x[0]**2
-    u[2]=1+x[1]+8*x[1]**2-3*x[0]+3*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-14)+28*x[1]+28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[1]+x[1]**2-9*x[0]-3*x[0]*x[1]-6*x[0]**2
-    u[1]=7+2*x[1]-8*x[1]**2-6*x[0]-3*x[0]*x[1]-9*x[0]**2
-    u[2]=(-4)-1*x[1]+5*x[1]**2+7*x[0]+4*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-24)-12*x[1]-72*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[1]+3*x[1]**2-1*x[0]-4*x[0]*x[1]+2*x[0]**2
-    u[1]=(-9)-9*x[1]+x[1]**2+6*x[0]-2*x[0]*x[1]+x[0]**2
-    u[2]=(-9)+6*x[1]-3*x[1]**2+7*x[0]-9*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-36)+8*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[1]-3*x[1]**2+7*x[0]-8*x[0]*x[1]-2*x[0]**2
-    u[1]=(-3)+2*x[1]+5*x[1]**2+3*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[2]=5-4*x[1]+5*x[1]**2+7*x[0]+4*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=56+32*x[1]-144*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Const_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]-4*x[1]**2-4*x[0]+2*x[0]*x[1]+8*x[0]**2
-    u[1]=8-8*x[1]-8*x[1]**2+4*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[2]=(-5)+5*x[1]-7*x[1]**2-8*x[0]+5*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=30-84*x[1]+30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[1]-3*x[0]
-    u[1]=(-3)-9*x[1]-1*x[0]
-    u[2]=2+x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=32-36*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[1]-6*x[0]
-    u[1]=(-3)-8*x[1]-7*x[0]
-    u[2]=(-5)-3*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-24)-64*x[1]-56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]+8*x[0]
-    u[1]=7-5*x[1]-7*x[0]
-    u[2]=(-2)-3*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)-12*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]+x[0]
-    u[1]=6+7*x[1]-1*x[0]
-    u[2]=(-2)+7*x[1]-3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-27)-15*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[1]-3*x[0]
-    u[1]=(-5)-1*x[1]-8*x[0]
-    u[2]=(-6)+7*x[1]+8*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-35)-7*x[1]-56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[1]-4*x[0]
-    u[1]=(-7)+8*x[1]+2*x[0]
-    u[2]=(-4)+6*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)+6*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[1]-9*x[0]
-    u[1]=(-9)-2*x[1]+3*x[0]
-    u[2]=8+6*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-54)-6*x[1]-54*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[1]+x[0]
-    u[1]=(-8)-5*x[1]-1*x[0]
-    u[2]=(-5)-6*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=8
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-64)-40*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[1]-1*x[0]
-    u[1]=(-4)+3*x[1]-7*x[0]
-    u[2]=1+6*x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=4
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=4+24*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[1]+2*x[0]
-    u[1]=5+7*x[1]+7*x[0]
-    u[2]=(-6)-9*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-3)+24*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-6*x[0]
-    u[1]=4+x[1]+3*x[0]
-    u[2]=3-2*x[1]-4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=8+2*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[1]-3*x[0]
-    u[1]=2+2*x[1]+8*x[0]
-    u[2]=2+4*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=5
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=10+20*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[1]+7*x[0]
-    u[1]=(-3)-2*x[1]-3*x[0]
-    u[2]=8-1*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=6
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=12+24*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]+3*x[0]
-    u[1]=3+3*x[1]+4*x[0]
-    u[2]=6-5*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=21+21*x[1]+28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]-9*x[0]
-    u[1]=(-7)-3*x[1]-6*x[0]
-    u[2]=3-2*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=1
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=3-2*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]-9*x[0]
-    u[1]=4-3*x[1]-2*x[0]
-    u[2]=2+7*x[1]+5*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=2
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-18)-10*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[1]+x[0]
-    u[1]=(-2)+4*x[1]-3*x[0]
-    u[2]=2-8*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=7
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-14)+28*x[1]-21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Const_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[1]-8*x[0]
-    u[1]=(-3)-5*x[1]-3*x[0]
-    u[2]=4-4*x[1]+6*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=3
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=12-12*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[1]-2*x[1]**2+7*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=(-6)+6*x[1]-5*x[1]**2-1*x[0]-2*x[0]*x[1]-8*x[0]**2
-    u[2]=(-1)-5*x[1]-3*x[1]**2+8*x[0]+x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]-4*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+x[1]**2+5*x[0]-4*x[0]*x[1]-8*x[0]**2
-    u[1]=(-7)-9*x[1]+3*x[1]**2+4*x[0]-6*x[0]*x[1]+5*x[0]**2
-    u[2]=(-9)-1*x[1]-8*x[1]**2-8*x[0]+2*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-7)*x[0]+2*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[1]-8*x[1]**2-4*x[0]+6*x[0]*x[1]-7*x[0]**2
-    u[1]=5-6*x[1]-1*x[1]**2-4*x[0]+6*x[0]*x[1]+8*x[0]**2
-    u[2]=5+3*x[1]+7*x[1]**2+x[0]-3*x[0]*x[1]-4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]+6*x[0]*x[1]+16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[1]-7*x[1]**2+x[0]+7*x[0]*x[1]+6*x[0]**2
-    u[1]=(-2)+6*x[1]-3*x[1]**2-6*x[0]-9*x[0]*x[1]+2*x[0]**2
-    u[2]=(-7)+6*x[1]-4*x[1]**2-7*x[0]+4*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]-6*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[1]-7*x[1]**2+5*x[0]+2*x[0]*x[1]-7*x[0]**2
-    u[1]=(-3)+7*x[1]+2*x[1]**2+3*x[0]-5*x[0]*x[1]+7*x[0]**2
-    u[2]=7+6*x[1]-3*x[1]**2+x[0]+3*x[0]*x[1]+4*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]+3*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[1]+5*x[1]**2-8*x[0]+4*x[0]*x[1]+6*x[0]**2
-    u[1]=6-2*x[1]+7*x[1]**2-8*x[0]+x[0]*x[1]+x[0]**2
-    u[2]=8-2*x[1]-4*x[1]**2-6*x[0]-3*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]-8*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[1]+3*x[1]**2-8*x[0]+8*x[0]*x[1]-3*x[0]**2
-    u[1]=(-3)-1*x[1]-1*x[1]**2-5*x[0]-4*x[0]*x[1]-2*x[0]**2
-    u[2]=8+7*x[1]+4*x[1]**2+6*x[0]-7*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-8)*x[1]+8*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[1]+5*x[1]**2-2*x[0]-5*x[0]*x[1]-1*x[0]**2
-    u[1]=(-1)-4*x[1]-7*x[1]**2-9*x[0]+5*x[0]*x[1]-3*x[0]**2
-    u[2]=5-4*x[1]-1*x[1]**2+7*x[0]+3*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-1)*x[1]+10*x[1]**2-5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[1]-3*x[1]**2+6*x[0]-4*x[0]*x[1]-5*x[0]**2
-    u[1]=6-4*x[1]+8*x[1]**2-9*x[0]-6*x[0]*x[1]-3*x[0]**2
-    u[2]=2+7*x[1]+5*x[1]**2-8*x[0]+8*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-9)*x[1]-6*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[1]-8*x[1]**2+7*x[0]+6*x[0]*x[1]-3*x[0]**2
-    u[1]=(-7)-9*x[1]-6*x[1]**2-6*x[0]-8*x[0]*x[1]-6*x[0]**2
-    u[2]=(-7)+3*x[1]+6*x[1]**2+2*x[0]-5*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=(-9)*x[1]-12*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]+3*x[1]**2+x[0]-1*x[0]*x[1]-8*x[0]**2
-    u[1]=(-5)+7*x[1]-9*x[1]**2-7*x[0]-7*x[0]*x[1]-6*x[0]**2
-    u[2]=(-7)-5*x[1]+2*x[1]**2+4*x[0]-8*x[0]*x[1]+3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=4*x[1]-8*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[1]-8*x[1]**2+5*x[0]-7*x[0]*x[1]-9*x[0]**2
-    u[1]=8+2*x[1]+2*x[1]**2-7*x[0]-1*x[0]*x[1]+2*x[0]**2
-    u[2]=1+3*x[1]-3*x[1]**2-5*x[0]-6*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=3*x[1]-6*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[1]-9*x[1]**2-5*x[0]+2*x[0]*x[1]-8*x[0]**2
-    u[1]=(-5)+2*x[1]+5*x[1]**2+7*x[0]+8*x[0]*x[1]-4*x[0]**2
-    u[2]=8-1*x[1]-2*x[1]**2-3*x[0]+3*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)*x[0]+2*x[0]*x[1]-16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[1]+7*x[1]**2-3*x[0]-9*x[0]*x[1]-1*x[0]**2
-    u[1]=1-9*x[1]+2*x[1]**2+3*x[0]+3*x[0]*x[1]+3*x[0]**2
-    u[2]=(-2)-1*x[1]-4*x[1]**2-6*x[0]-8*x[0]*x[1]+8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]+14*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[1]-5*x[1]**2-8*x[0]-9*x[0]*x[1]+6*x[0]**2
-    u[1]=3-1*x[1]-5*x[1]**2-7*x[0]-2*x[0]*x[1]-9*x[0]**2
-    u[2]=6-8*x[1]+3*x[1]**2-4*x[0]+4*x[0]*x[1]-9*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]-2*x[0]*x[1]-18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[1]+4*x[1]**2+8*x[0]-7*x[0]*x[1]-5*x[0]**2
-    u[1]=3-2*x[1]+4*x[1]**2-5*x[0]-9*x[0]*x[1]-1*x[0]**2
-    u[2]=(-2)+2*x[1]+8*x[1]**2+7*x[0]-9*x[0]*x[1]-5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)*x[0]+8*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-4*x[1]-1*x[1]**2-5*x[0]-3*x[0]*x[1]+4*x[0]**2
-    u[1]=2-2*x[1]-7*x[1]**2+4*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[2]=4-6*x[1]-4*x[1]**2+4*x[0]+2*x[0]*x[1]-1*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]+2*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[1]+5*x[1]**2+4*x[0]+7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-9)+5*x[1]-8*x[1]**2+7*x[0]-5*x[0]*x[1]-1*x[0]**2
-    u[2]=4+3*x[1]-8*x[1]**2-6*x[0]-1*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=3*x[0]-16*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[1]+2*x[1]**2+3*x[0]-9*x[0]*x[1]-4*x[0]**2
-    u[1]=(-6)+4*x[1]+4*x[1]**2-4*x[0]-6*x[0]*x[1]+6*x[0]**2
-    u[2]=(-7)-7*x[1]+x[1]**2+7*x[0]+7*x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]-9*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[1]+7*x[1]**2-8*x[0]+3*x[0]*x[1]+x[0]**2
-    u[1]=2+x[1]+8*x[1]**2-2*x[0]-6*x[0]*x[1]+6*x[0]**2
-    u[2]=2-5*x[1]+4*x[1]**2+6*x[0]-3*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)*x[1]+14*x[1]**2+3*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[1]+x[1]**2+6*x[0]-1*x[0]*x[1]+6*x[0]**2
-    u[1]=6-4*x[1]+3*x[1]**2-1*x[0]-8*x[0]*x[1]+6*x[0]**2
-    u[2]=(-8)-7*x[1]-3*x[1]**2-5*x[0]-7*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-1)*x[1]-8*x[1]**2+12*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[1]+4*x[1]**2-5*x[0]+6*x[0]*x[1]+7*x[0]**2
-    u[1]=1-6*x[1]+x[1]**2+x[0]+5*x[0]*x[1]+7*x[0]**2
-    u[2]=3+4*x[1]-3*x[1]**2-9*x[0]+4*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)*x[1]+2*x[1]**2+5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-2*x[1]-9*x[1]**2-5*x[0]+5*x[0]*x[1]-2*x[0]**2
-    u[1]=2-9*x[1]-7*x[1]**2+2*x[0]-9*x[0]*x[1]+5*x[0]**2
-    u[2]=(-5)+3*x[1]+2*x[1]**2-4*x[0]-5*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]-5*x[1]**2-16*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+x[1]-6*x[1]**2-3*x[0]-7*x[0]*x[1]+3*x[0]**2
-    u[1]=(-2)-1*x[1]+x[1]**2-9*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[2]=8+6*x[1]+3*x[1]**2+4*x[0]+6*x[0]*x[1]+6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]+6*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[1]+2*x[1]**2-5*x[0]-4*x[0]*x[1]+7*x[0]**2
-    u[1]=8+7*x[1]-6*x[1]**2+6*x[0]+2*x[0]*x[1]-1*x[0]**2
-    u[2]=3+8*x[1]-1*x[1]**2+6*x[0]+5*x[0]*x[1]-8*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-5)*x[0]-4*x[0]*x[1]+14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[1]+5*x[1]**2-9*x[0]+5*x[0]*x[1]-2*x[0]**2
-    u[1]=8+8*x[1]-3*x[1]**2+3*x[0]+4*x[0]*x[1]-3*x[0]**2
-    u[2]=(-6)+6*x[1]-3*x[1]**2+x[0]-3*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=3*x[0]+10*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[1]+x[1]**2-5*x[0]-3*x[0]*x[1]-3*x[0]**2
-    u[1]=2-2*x[1]-2*x[1]**2-6*x[0]-9*x[0]*x[1]+6*x[0]**2
-    u[2]=7+7*x[1]-9*x[1]**2-8*x[0]-6*x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)*x[0]-9*x[0]*x[1]+12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[1]-7*x[1]**2+6*x[0]-7*x[0]*x[1]-3*x[0]**2
-    u[1]=6-9*x[1]+8*x[1]**2-2*x[0]-4*x[0]*x[1]+5*x[0]**2
-    u[2]=5-4*x[1]-6*x[1]**2-6*x[0]-7*x[0]*x[1]-7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-9)*x[0]+16*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[1]-9*x[1]**2+6*x[0]-9*x[0]*x[1]-8*x[0]**2
-    u[1]=(-3)-2*x[1]-5*x[1]**2+x[0]+5*x[0]*x[1]-5*x[0]**2
-    u[2]=5-8*x[1]-6*x[1]**2+7*x[0]+8*x[0]*x[1]-2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=7*x[0]+8*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]+3*x[1]**2+6*x[0]-3*x[0]*x[1]-8*x[0]**2
-    u[1]=(-3)-6*x[1]+7*x[1]**2-9*x[0]+3*x[0]*x[1]+7*x[0]**2
-    u[2]=7+3*x[1]-1*x[1]**2+5*x[0]-8*x[0]*x[1]-6*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=3*x[0]-2*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[1]-2*x[1]**2+x[0]-6*x[0]*x[1]+6*x[0]**2
-    u[1]=(-6)-5*x[1]+4*x[1]**2-7*x[0]+4*x[0]*x[1]-3*x[0]**2
-    u[2]=(-3)-9*x[1]-9*x[1]**2-4*x[0]+x[0]*x[1]+5*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=x[1]-6*x[1]**2+12*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[1]-3*x[1]**2-8*x[0]+8*x[0]*x[1]+6*x[0]**2
-    u[1]=1+8*x[1]-1*x[1]**2+4*x[0]+3*x[0]*x[1]-5*x[0]**2
-    u[2]=6-4*x[1]+7*x[1]**2-4*x[0]-4*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-9)*x[1]-6*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[1]+4*x[1]**2+4*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=7-4*x[1]-9*x[1]**2-9*x[0]+4*x[0]*x[1]-9*x[0]**2
-    u[2]=3+6*x[1]-4*x[1]**2+2*x[0]+8*x[0]*x[1]-3*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-9)*x[1]+4*x[1]**2-18*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[1]+3*x[1]**2-4*x[0]+7*x[0]*x[1]+2*x[0]**2
-    u[1]=(-3)+8*x[1]+2*x[1]**2-8*x[0]-5*x[0]*x[1]+6*x[0]**2
-    u[2]=(-5)+7*x[1]+5*x[1]**2-7*x[0]+x[0]*x[1]+2*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=8*x[1]+4*x[1]**2-5*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[1]+4*x[1]**2+x[0]-8*x[0]*x[1]+2*x[0]**2
-    u[1]=(-6)+2*x[1]+7*x[1]**2+2*x[0]+x[0]*x[1]-2*x[0]**2
-    u[2]=1+4*x[1]-5*x[1]**2+5*x[0]+8*x[0]*x[1]+x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=5*x[1]+8*x[1]**2+2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]-4*x[1]**2+6*x[0]-6*x[0]*x[1]+6*x[0]**2
-    u[1]=7+3*x[1]+4*x[1]**2-6*x[0]+4*x[0]*x[1]-8*x[0]**2
-    u[2]=(-7)-4*x[1]-5*x[1]**2+2*x[0]+8*x[0]*x[1]+7*x[0]**2
-    A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-4)*x[1]-10*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[1]-5*x[0]
-    u[1]=(-4)-7*x[1]+6*x[0]
-    u[2]=2-7*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]-3*x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[1]+4*x[0]
-    u[1]=(-8)+8*x[1]-1*x[0]
-    u[2]=(-7)-1*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)*x[0]+8*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[1]+4*x[0]
-    u[1]=(-6)-5*x[1]-5*x[0]
-    u[2]=(-9)+x[1]-5*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,0]=(-9)*x[0]+x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+3*x[1]+x[0]
-    u[1]=4+3*x[1]+3*x[0]
-    u[2]=(-1)-3*x[1]+4*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=3*x[1]+3*x[1]**2+x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]+4*x[0]
-    u[1]=5-9*x[1]+6*x[0]
-    u[2]=1-3*x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]-9*x[1]**2+6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[1]+4*x[0]
-    u[1]=(-5)+6*x[1]+x[0]
-    u[2]=3-9*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[0,1]=3*x[1]-9*x[1]**2-6*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]-5*x[0]
-    u[1]=6+x[1]+6*x[0]
-    u[2]=(-2)+6*x[1]-7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]-3*x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[1]+4*x[0]
-    u[1]=(-6)+4*x[1]+4*x[0]
-    u[2]=(-8)+6*x[1]+2*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]+4*x[0]*x[1]+4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]-9*x[0]
-    u[1]=(-5)-4*x[1]-9*x[0]
-    u[2]=8+8*x[1]+x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]+8*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[1]+8*x[0]
-    u[1]=(-5)-2*x[1]+3*x[0]
-    u[2]=8-1*x[1]-1*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)*x[1]-9*x[1]**2+8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[1]-6*x[0]
-    u[1]=7+x[1]-8*x[0]
-    u[2]=6-6*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]+x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[1]-2*x[0]
-    u[1]=7-7*x[1]-5*x[0]
-    u[2]=3+7*x[1]-9*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]+7*x[1]**2-9*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[1]+5*x[0]
-    u[1]=(-5)-3*x[1]-2*x[0]
-    u[2]=(-2)-8*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=4*x[0]+5*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[1]+3*x[0]
-    u[1]=(-1)-9*x[1]-7*x[0]
-    u[2]=(-1)+2*x[1]-6*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]-9*x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[1]-3*x[0]
-    u[1]=(-3)+4*x[1]+5*x[0]
-    u[2]=8-9*x[1]-8*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=x[0]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,0]=8*x[0]-9*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[1]-9*x[0]
-    u[1]=(-7)-1*x[1]-1*x[0]
-    u[2]=(-8)+x[1]+7*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=x[1]+6*x[1]**2-9*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[1]-6*x[0]
-    u[1]=(-8)-8*x[1]-8*x[0]
-    u[2]=6-1*x[1]+3*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=(-8)*x[1]-8*x[1]**2-8*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_B_Vario_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[1]-3*x[0]
-    u[1]=5+5*x[1]+8*x[0]
-    u[2]=2+2*x[1]-2*x[0]
-    B_test=Data(0.,(3,2,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=x[1]
-    X_test=Data(0.,(3, 2),ContinuousFunction(self.domain))
-    X_test[2,1]=2*x[1]+2*x[1]**2-2*x[0]*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-
-class Test_assemblage_2Do2_Contact(unittest.TestCase):
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(2,[1,0])
-     out.setTaggedValue(1,[-1,0])
-     out.setTaggedValue(20, [0,1])
-     out.setTaggedValue(10, [0,-1])
-     return out
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Const_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=(-3)-6*x[1]+6*x[1]**2+6*x[0]-9*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=5
-    Y_test=(-30)+45*x[1]+30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-15)-30*x[1]+30*x[1]**2+30*x[0]-45*x[0]*x[1]-15*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*(15+30*x[1]-30*x[1]**2-30*x[0]+45*x[0]*x[1]+15*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Const_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=(-4)-8*x[1]+6*x[1]**2+5*x[0]-9*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=8
-    Y_test=64-96*x[1]+72*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-32)-64*x[1]+48*x[1]**2+40*x[0]-72*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(7-3*x[1]-6*x[1]**2-3*x[0]+7*x[0]*x[1]-9*x[0]**2)*jump
-    d_contact_test=Data(8,(),FunctionOnContactZero(self.domain))
-    y_contact_test=56-24*x[1]-48*x[1]**2-24*x[0]+56*x[0]*x[1]-72*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Vario_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=7+2*x[1]+6*x[1]**2-5*x[0]+4*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=(-7)-2*x[1]-6*x[1]**2+10*x[0]-8*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(7*x[0]+2*x[0]*x[1]+6*x[0]*x[1]**2-5*x[0]**2+4*x[0]**2*x[1]-2*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*((-7)*x[0]-2*x[0]*x[1]-6*x[0]*x[1]**2+5*x[0]**2-4*x[0]**2*x[1]+2*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_B_Vario_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=(-5)+x[1]-7*x[1]**2+7*x[0]+6*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(2,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=5-2*x[1]+21*x[1]**2-7*x[0]-12*x[0]*x[1]-3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-5)*x[1]+x[1]**2-7*x[1]**3+7*x[0]*x[1]+6*x[0]*x[1]**2+3*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(7+4*x[1]+3*x[0])*jump
-    d_contact_test=interpolate(x[0],FunctionOnContactZero(self.domain))
-    y_contact_test=7*x[0]+4*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[1]-6*x[1]**2-1*x[0]+8*x[0]*x[1]-4*x[0]**2
-    u[1]=(-5)+8*x[1]+3*x[1]**2-1*x[0]+x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3-24*x[1]+24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-21)-24*x[1]-18*x[1]**2-3*x[0]+24*x[0]*x[1]-12*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(21+24*x[1]+18*x[1]**2+3*x[0]-24*x[0]*x[1]+12*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]+7*x[1]**2-2*x[0]-6*x[0]*x[1]+4*x[0]**2
-    u[1]=1-2*x[1]-7*x[1]**2+3*x[0]+2*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-21)-14*x[1]-84*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7-14*x[1]-49*x[1]**2+21*x[0]+14*x[0]*x[1]+42*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-7)+14*x[1]+49*x[1]**2-21*x[0]-14*x[0]*x[1]-42*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[1]+6*x[1]**2+8*x[0]+6*x[0]*x[1]+2*x[0]**2
-    u[1]=7-2*x[1]-8*x[1]**2-8*x[0]+x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=18-36*x[1]-18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6-18*x[1]+18*x[1]**2+24*x[0]+18*x[0]*x[1]+6*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[1]-3*x[1]**2+3*x[0]-7*x[0]*x[1]+2*x[0]**2
-    u[1]=(-4)+8*x[1]-3*x[1]**2+7*x[0]+6*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-48)+36*x[1]-36*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-24)+48*x[1]-18*x[1]**2+42*x[0]+36*x[0]*x[1]+30*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[1]-3*x[1]**2+5*x[0]-4*x[0]*x[1]+6*x[0]**2
-    u[1]=5-6*x[1]-6*x[1]**2+6*x[0]+6*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-25)+20*x[1]-60*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-35)+40*x[1]-15*x[1]**2+25*x[0]-20*x[0]*x[1]+30*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(35-40*x[1]+15*x[1]**2-25*x[0]+20*x[0]*x[1]-30*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[1]+5*x[1]**2-4*x[0]+3*x[0]*x[1]+6*x[0]**2
-    u[1]=(-9)-7*x[1]-9*x[1]**2+3*x[0]-3*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)+12*x[1]-64*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-36)-28*x[1]-36*x[1]**2+12*x[0]-12*x[0]*x[1]+32*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(36+28*x[1]+36*x[1]**2-12*x[0]+12*x[0]*x[1]-32*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]+7*x[1]**2+6*x[0]-7*x[0]*x[1]+5*x[0]**2
-    u[1]=6-5*x[1]-9*x[1]**2-3*x[0]+6*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-24)-42*x[1]+21*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(21+24*x[1]+21*x[1]**2+18*x[0]-21*x[0]*x[1]+15*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[1]+x[1]**2+4*x[0]+6*x[0]*x[1]-1*x[0]**2
-    u[1]=(-6)+4*x[1]-8*x[1]**2+7*x[0]+8*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-20)+80*x[1]-40*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-30)+20*x[1]-40*x[1]**2+35*x[0]+40*x[0]*x[1]+5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-6)-5*x[1]+5*x[1]**2-6*x[0]-7*x[0]*x[1]-5*x[0]**2)*jump
-    u[1]=((-2)-3*x[1]-5*x[1]**2+7*x[0]+8*x[0]*x[1]-7*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=2
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-12)-10*x[1]+10*x[1]**2-12*x[0]-14*x[0]*x[1]-10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(4+6*x[1]+3*x[1]**2-9*x[0]-9*x[0]*x[1]-1*x[0]**2)*jump
-    u[1]=((-9)+7*x[1]-5*x[1]**2-5*x[0]+5*x[0]*x[1]-1*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=2
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-18)+14*x[1]-10*x[1]**2-10*x[0]+10*x[0]*x[1]-2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(6+5*x[1]+8*x[1]**2-2*x[0]+3*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=(7+x[1]-3*x[1]**2-3*x[0]-7*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=4
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=24+20*x[1]+32*x[1]**2-8*x[0]+12*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-7)-2*x[1]-2*x[1]**2+8*x[0]+3*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=((-3)+8*x[1]-3*x[1]**2-4*x[0]+2*x[0]*x[1]+4*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=6
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-18)+48*x[1]-18*x[1]**2-24*x[0]+12*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[1]+6*x[1]**2+7*x[0]+4*x[0]*x[1]-2*x[0]**2
-    u[1]=5-8*x[1]+4*x[1]**2-2*x[0]-5*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)-7*x[1]-6*x[1]**2-14*x[0]-8*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0]+7*x[0]*x[1]+6*x[0]*x[1]**2+7*x[0]**2+4*x[0]**2*x[1]-2*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-3)*x[0]-7*x[0]*x[1]-6*x[0]*x[1]**2-7*x[0]**2-4*x[0]**2*x[1]+2*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[1]+x[1]**2+8*x[0]-7*x[0]*x[1]+6*x[0]**2
-    u[1]=(-6)-7*x[1]-3*x[1]**2-7*x[0]+5*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6+7*x[1]+3*x[1]**2+14*x[0]-10*x[0]*x[1]+12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0]-7*x[0]*x[1]-3*x[0]*x[1]**2-7*x[0]**2+5*x[0]**2*x[1]-4*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(6*x[0]+7*x[0]*x[1]+3*x[0]*x[1]**2+7*x[0]**2-5*x[0]**2*x[1]+4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]-7*x[1]**2-9*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=(-4)+5*x[1]+2*x[1]**2-1*x[0]+8*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)-2*x[1]+21*x[1]**2+9*x[0]+8*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6*x[1]+x[1]**2-7*x[1]**3-9*x[0]*x[1]-4*x[0]*x[1]**2-9*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[1]+8*x[1]**2-8*x[0]-1*x[0]*x[1]-2*x[0]**2
-    u[1]=(-9)-3*x[1]-1*x[1]**2-2*x[0]+3*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9+6*x[1]+3*x[1]**2+2*x[0]-6*x[0]*x[1]+3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1]-3*x[1]**2-1*x[1]**3-2*x[0]*x[1]+3*x[0]*x[1]**2-3*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[1]+2*x[1]**2+x[0]+3*x[0]*x[1]-4*x[0]**2
-    u[1]=(-4)+3*x[1]+8*x[1]**2+x[0]+x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)+7*x[1]-2*x[1]**2-2*x[0]-6*x[0]*x[1]+12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7*x[0]-7*x[0]*x[1]+2*x[0]*x[1]**2+x[0]**2+3*x[0]**2*x[1]-4*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-7)*x[0]+7*x[0]*x[1]-2*x[0]*x[1]**2-1*x[0]**2-3*x[0]**2*x[1]+4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[1]+2*x[1]**2-2*x[0]-6*x[0]*x[1]-6*x[0]**2
-    u[1]=(-2)+2*x[1]+8*x[1]**2+7*x[0]-4*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2-2*x[1]-8*x[1]**2-14*x[0]+8*x[0]*x[1]+12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0]+2*x[0]*x[1]+8*x[0]*x[1]**2+7*x[0]**2-4*x[0]**2*x[1]-4*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(2*x[0]-2*x[0]*x[1]-8*x[0]*x[1]**2-7*x[0]**2+4*x[0]**2*x[1]+4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[1]+3*x[1]**2-4*x[0]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=(-2)+8*x[1]-7*x[1]**2+x[0]-5*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)+14*x[1]-9*x[1]**2+4*x[0]+6*x[0]*x[1]+7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3*x[1]-7*x[1]**2+3*x[1]**3-4*x[0]*x[1]-3*x[0]*x[1]**2-7*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[1]+6*x[1]**2+2*x[0]-2*x[0]*x[1]-7*x[0]**2
-    u[1]=2+6*x[1]+3*x[1]**2-1*x[0]+5*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,2,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-12*x[1]-9*x[1]**2+x[0]-10*x[0]*x[1]-5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1]+6*x[1]**2+3*x[1]**3-1*x[0]*x[1]+5*x[0]*x[1]**2+5*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(4+x[1]-7*x[0])*jump
-    u[1]=((-2)-7*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=4*x[0]+x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-8)-8*x[1]-6*x[0])*jump
-    u[1]=((-1)+4*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-1)*x[0]+4*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(8-9*x[1]-9*x[0])*jump
-    u[1]=(1+7*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=8*x[0]-9*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-6)+3*x[1]+5*x[0])*jump
-    u[1]=((-5)+5*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-5)*x[0]+5*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[1]+6*x[1]**2-6*x[0]-7*x[0]*x[1]+5*x[0]**2
-    u[1]=6-6*x[1]-6*x[1]**2+7*x[0]+x[0]*x[1]+4*x[0]**2
-    u[2]=4+3*x[1]-1*x[1]**2+2*x[0]+3*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=48+56*x[1]-80*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(64+48*x[1]+48*x[1]**2-48*x[0]-56*x[0]*x[1]+40*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-64)-48*x[1]-48*x[1]**2+48*x[0]+56*x[0]*x[1]-40*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[1]-5*x[1]**2-1*x[0]-5*x[0]*x[1]-3*x[0]**2
-    u[1]=1+3*x[1]-8*x[1]**2-5*x[0]+4*x[0]*x[1]+5*x[0]**2
-    u[2]=(-8)+2*x[1]+5*x[1]**2+3*x[0]+2*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5-4*x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(1+3*x[1]-8*x[1]**2-5*x[0]+4*x[0]*x[1]+5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-1)-3*x[1]+8*x[1]**2+5*x[0]-4*x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[1]+6*x[1]**2+3*x[0]-8*x[0]*x[1]+7*x[0]**2
-    u[1]=(-3)+2*x[1]+x[1]**2-9*x[0]+4*x[0]*x[1]-6*x[0]**2
-    u[2]=(-1)+8*x[1]-8*x[1]**2+x[0]-3*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)+21*x[1]+70*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)+56*x[1]-56*x[1]**2+7*x[0]-21*x[0]*x[1]-35*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(7-56*x[1]+56*x[1]**2-7*x[0]+21*x[0]*x[1]+35*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-6*x[1]+7*x[1]**2+4*x[0]+7*x[0]*x[1]-5*x[0]**2
-    u[1]=(-7)+x[1]+3*x[1]**2+7*x[0]-2*x[0]*x[1]+6*x[0]**2
-    u[2]=(-8)+x[1]+x[1]**2-6*x[0]-9*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=18-42*x[1]-21*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(18-18*x[1]+21*x[1]**2+12*x[0]+21*x[0]*x[1]-15*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[1]-9*x[1]**2-9*x[0]+4*x[0]*x[1]-1*x[0]**2
-    u[1]=4-9*x[1]-2*x[1]**2-8*x[0]-7*x[0]*x[1]-5*x[0]**2
-    u[2]=(-8)-1*x[1]+3*x[1]**2+2*x[0]+3*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9+4*x[1]+7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4-9*x[1]-2*x[1]**2-8*x[0]-7*x[0]*x[1]-5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[1]+x[1]**2+7*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[1]=(-9)-1*x[1]-2*x[1]**2-2*x[0]+7*x[0]*x[1]+4*x[0]**2
-    u[2]=(-4)+4*x[1]+5*x[1]**2-3*x[0]-9*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)-20*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)+8*x[1]+10*x[1]**2-6*x[0]-18*x[0]*x[1]+10*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[1]+2*x[1]**2+2*x[0]-5*x[0]*x[1]-1*x[0]**2
-    u[1]=3-2*x[1]-3*x[1]**2+5*x[0]+8*x[0]*x[1]-4*x[0]**2
-    u[2]=6+8*x[1]-4*x[1]**2-5*x[0]+7*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)+15*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-24)+21*x[1]+6*x[1]**2+6*x[0]-15*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(24-21*x[1]-6*x[1]**2-6*x[0]+15*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[1]-3*x[1]**2-2*x[0]-6*x[0]*x[1]-3*x[0]**2
-    u[1]=(-4)-9*x[1]-1*x[1]**2-7*x[0]+4*x[0]*x[1]+7*x[0]**2
-    u[2]=2-4*x[1]+4*x[1]**2-5*x[0]-2*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=56-32*x[1]-112*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-32)-72*x[1]-8*x[1]**2-56*x[0]+32*x[0]*x[1]+56*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(32+72*x[1]+8*x[1]**2+56*x[0]-32*x[0]*x[1]-56*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[1]+5*x[1]**2-8*x[0]-6*x[0]*x[1]-1*x[0]**2
-    u[1]=5+6*x[1]+4*x[1]**2-3*x[0]-3*x[0]*x[1]+2*x[0]**2
-    u[2]=7+5*x[1]-8*x[1]**2-4*x[0]-8*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4+8*x[1]+16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7+5*x[1]-8*x[1]**2-4*x[0]-8*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-7)-5*x[1]+8*x[1]**2+4*x[0]+8*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[1]+5*x[1]**2+7*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[1]=(-3)+4*x[1]-9*x[1]**2-9*x[0]+3*x[0]*x[1]+4*x[0]**2
-    u[2]=(-8)+8*x[1]-2*x[1]**2+7*x[0]+8*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6-20*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(10-6*x[1]+10*x[1]**2+14*x[0]+6*x[0]*x[1]+10*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[1]+8*x[1]**2-7*x[0]+2*x[0]*x[1]-5*x[0]**2
-    u[1]=(-9)+4*x[1]+6*x[1]**2+6*x[0]+7*x[0]*x[1]+8*x[0]**2
-    u[2]=6-6*x[1]-5*x[1]**2-8*x[0]-4*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)-24*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-18)+8*x[1]+12*x[1]**2+12*x[0]+14*x[0]*x[1]+16*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[1]-4*x[1]**2-1*x[0]-8*x[0]*x[1]-1*x[0]**2
-    u[1]=1+x[1]-4*x[1]**2-3*x[0]+4*x[0]*x[1]-3*x[0]**2
-    u[2]=(-3)+5*x[1]-3*x[1]**2+6*x[0]+4*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-20)+24*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-12)+20*x[1]-12*x[1]**2+24*x[0]+16*x[0]*x[1]+16*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[1]-2*x[1]**2+3*x[0]+7*x[0]*x[1]-1*x[0]**2
-    u[1]=(-2)+8*x[1]-2*x[1]**2+5*x[0]-2*x[0]*x[1]+x[0]**2
-    u[2]=(-3)+3*x[1]-4*x[1]**2-8*x[0]-9*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)-7*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8+5*x[1]-2*x[1]**2+3*x[0]+7*x[0]*x[1]-1*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-8)-5*x[1]+2*x[1]**2-3*x[0]-7*x[0]*x[1]+x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[1]-5*x[1]**2+2*x[0]+5*x[0]*x[1]-9*x[0]**2
-    u[1]=5+2*x[1]-8*x[1]**2-2*x[0]-1*x[0]*x[1]-7*x[0]**2
-    u[2]=8-8*x[1]-3*x[1]**2-5*x[0]+x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6+3*x[1]+42*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(15+6*x[1]-24*x[1]**2-6*x[0]-3*x[0]*x[1]-21*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-15)-6*x[1]+24*x[1]**2+6*x[0]+3*x[0]*x[1]+21*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[1]+6*x[1]**2+2*x[0]+4*x[0]*x[1]-5*x[0]**2
-    u[1]=(-2)+7*x[1]-7*x[1]**2-5*x[0]+4*x[0]*x[1]-7*x[0]**2
-    u[2]=(-3)-8*x[1]-3*x[1]**2-5*x[0]+7*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=15-21*x[1]-30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)-24*x[1]-9*x[1]**2-15*x[0]+21*x[0]*x[1]+15*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(9+24*x[1]+9*x[1]**2+15*x[0]-21*x[0]*x[1]-15*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[1]+8*x[1]**2-1*x[0]+3*x[0]*x[1]+5*x[0]**2
-    u[1]=1+4*x[1]-2*x[1]**2+5*x[0]+6*x[0]*x[1]+6*x[0]**2
-    u[2]=(-3)-2*x[1]-6*x[1]**2-5*x[0]+x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=40-128*x[1]-24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-64)-40*x[1]+64*x[1]**2-8*x[0]+24*x[0]*x[1]+40*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[1]+8*x[1]**2-9*x[0]+8*x[0]*x[1]+5*x[0]**2
-    u[1]=(-4)-2*x[1]-8*x[1]**2-1*x[0]-9*x[0]*x[1]-9*x[0]**2
-    u[2]=(-1)-8*x[1]-6*x[1]**2-3*x[0]+4*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=10+80*x[1]+45*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-20)-10*x[1]-40*x[1]**2-5*x[0]-45*x[0]*x[1]-45*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[1]-9*x[1]**2-3*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[1]=(-8)+2*x[1]+3*x[1]**2-6*x[0]+3*x[0]*x[1]-9*x[0]**2
-    u[2]=(-9)+2*x[1]-5*x[1]**2+x[0]+x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-12)+60*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-54)+12*x[1]-30*x[1]**2+6*x[0]+6*x[0]*x[1]-18*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)+7*x[1]+5*x[1]**2-3*x[0]+8*x[0]*x[1]-6*x[0]**2)*jump
-    u[1]=((-2)-2*x[1]-4*x[1]**2-8*x[0]-1*x[0]*x[1]+2*x[0]**2)*jump
-    u[2]=((-5)+4*x[1]-2*x[1]**2+8*x[0]+8*x[0]*x[1]+8*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-6)+42*x[1]+30*x[1]**2-18*x[0]+48*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-2)-4*x[1]+2*x[1]**2+3*x[0]+5*x[0]*x[1]+5*x[0]**2)*jump
-    u[1]=(6-1*x[1]-5*x[1]**2+6*x[0]+2*x[0]*x[1]-2*x[0]**2)*jump
-    u[2]=(1+4*x[1]+7*x[1]**2-8*x[0]+7*x[0]*x[1]-1*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=24-4*x[1]-20*x[1]**2+24*x[0]+8*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(5-4*x[1]-4*x[1]**2+7*x[0]-6*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=((-8)+x[1]+x[1]**2-9*x[0]-7*x[0]*x[1]+7*x[0]**2)*jump
-    u[2]=((-2)+5*x[1]+x[1]**2+4*x[0]-8*x[0]*x[1]-3*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-16)+40*x[1]+8*x[1]**2+32*x[0]-64*x[0]*x[1]-24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2-2*x[1]-8*x[1]**2+4*x[0]-7*x[0]*x[1]+2*x[0]**2)*jump
-    u[1]=((-4)+5*x[1]+4*x[1]**2-3*x[0]-5*x[0]*x[1]+3*x[0]**2)*jump
-    u[2]=((-2)-9*x[1]-5*x[1]**2-5*x[0]+8*x[0]*x[1]-5*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=16-16*x[1]-64*x[1]**2+32*x[0]-56*x[0]*x[1]+16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(1+6*x[1]+8*x[1]**2-3*x[0]-9*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=(4-9*x[1]-9*x[1]**2-3*x[0]-8*x[0]*x[1]+7*x[0]**2)*jump
-    u[2]=((-6)-5*x[1]+8*x[1]**2-6*x[0]-3*x[0]*x[1]-3*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=32-72*x[1]-72*x[1]**2-24*x[0]-64*x[0]*x[1]+56*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)-2*x[1]-2*x[1]**2+3*x[0]-1*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=(6-2*x[1]-3*x[1]**2+8*x[0]+4*x[0]*x[1]+x[0]**2)*jump
-    u[2]=(3+6*x[1]-1*x[1]**2-2*x[0]-9*x[0]*x[1]-9*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=12+24*x[1]-4*x[1]**2-8*x[0]-36*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3+6*x[1]-8*x[1]**2-6*x[0]-5*x[0]*x[1]+5*x[0]**2)*jump
-    u[1]=(5-3*x[1]-6*x[1]**2+6*x[0]+8*x[0]*x[1]-7*x[0]**2)*jump
-    u[2]=((-8)+4*x[1]+5*x[1]**2-8*x[0]-5*x[0]*x[1]+8*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=18+36*x[1]-48*x[1]**2-36*x[0]-30*x[0]*x[1]+30*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)-7*x[1]+5*x[1]**2-5*x[0]+3*x[0]*x[1]-1*x[0]**2)*jump
-    u[1]=((-2)-5*x[1]+7*x[1]**2-8*x[0]-4*x[0]*x[1]-3*x[0]**2)*jump
-    u[2]=(6-5*x[1]-4*x[1]**2-3*x[0]+6*x[0]*x[1]-5*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=1
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-2)-5*x[1]+7*x[1]**2-8*x[0]-4*x[0]*x[1]-3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(1+3*x[1]-1*x[1]**2+2*x[0]+8*x[0]*x[1]+7*x[0]**2)*jump
-    u[1]=((-8)-1*x[1]-4*x[1]**2-6*x[0]+x[0]*x[1]-9*x[0]**2)*jump
-    u[2]=((-1)-6*x[1]-3*x[1]**2+4*x[0]+5*x[0]*x[1]-4*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-2)-12*x[1]-6*x[1]**2+8*x[0]+10*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[1]+4*x[1]**2+7*x[0]+x[0]*x[1]+6*x[0]**2
-    u[1]=(-4)-5*x[1]+3*x[1]**2-2*x[0]-2*x[0]*x[1]-5*x[0]**2
-    u[2]=(-4)-6*x[1]-1*x[1]**2+5*x[0]-4*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)-1*x[1]-4*x[1]**2-14*x[0]-2*x[0]*x[1]-18*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0]+x[0]*x[1]+4*x[0]*x[1]**2+7*x[0]**2+x[0]**2*x[1]+6*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-6)*x[0]-1*x[0]*x[1]-4*x[0]*x[1]**2-7*x[0]**2-1*x[0]**2*x[1]-6*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[1]+8*x[1]**2+x[0]-6*x[0]*x[1]+2*x[0]**2
-    u[1]=1+3*x[1]-5*x[1]**2-4*x[0]+x[0]*x[1]+3*x[0]**2
-    u[2]=8-6*x[1]-6*x[1]**2+7*x[0]-2*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)-3*x[1]+5*x[1]**2+8*x[0]-2*x[0]*x[1]-9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(x[0]+3*x[0]*x[1]-5*x[0]*x[1]**2-4*x[0]**2+x[0]**2*x[1]+3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-1)*x[0]-3*x[0]*x[1]+5*x[0]*x[1]**2+4*x[0]**2-1*x[0]**2*x[1]-3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[1]-3*x[1]**2-6*x[0]-2*x[0]*x[1]+4*x[0]**2
-    u[1]=2-6*x[1]-3*x[1]**2-8*x[0]-5*x[0]*x[1]+x[0]**2
-    u[2]=4-2*x[1]-5*x[1]**2+7*x[0]+5*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+2*x[1]+5*x[1]**2-14*x[0]-10*x[0]*x[1]+15*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]-2*x[0]*x[1]-5*x[0]*x[1]**2+7*x[0]**2+5*x[0]**2*x[1]-5*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-4)*x[0]+2*x[0]*x[1]+5*x[0]*x[1]**2-7*x[0]**2-5*x[0]**2*x[1]+5*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[1]+5*x[1]**2-4*x[0]+x[0]*x[1]+x[0]**2
-    u[1]=4-5*x[1]+x[1]**2-3*x[0]-4*x[0]*x[1]+4*x[0]**2
-    u[2]=(-7)+5*x[1]+8*x[1]**2-7*x[0]+3*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3+6*x[1]-15*x[1]**2+4*x[0]-2*x[0]*x[1]-1*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-3)*x[1]-3*x[1]**2+5*x[1]**3-4*x[0]*x[1]+x[0]*x[1]**2+x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-9*x[1]-3*x[1]**2+4*x[0]-5*x[0]*x[1]-7*x[0]**2
-    u[1]=7-7*x[1]+6*x[1]**2+3*x[0]+6*x[0]*x[1]-5*x[0]**2
-    u[2]=5-2*x[1]+7*x[1]**2-2*x[0]-7*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)+14*x[1]-18*x[1]**2-3*x[0]-12*x[0]*x[1]+5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1]-7*x[1]**2+6*x[1]**3+3*x[0]*x[1]+6*x[0]*x[1]**2-5*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[1]+8*x[1]**2+8*x[0]-7*x[0]*x[1]-2*x[0]**2
-    u[1]=(-8)+8*x[1]+x[1]**2-7*x[0]+5*x[0]*x[1]+3*x[0]**2
-    u[2]=2-1*x[1]-4*x[1]**2-9*x[0]+3*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)+2*x[1]+12*x[1]**2+9*x[0]-6*x[0]*x[1]-7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2*x[1]-1*x[1]**2-4*x[1]**3-9*x[0]*x[1]+3*x[0]*x[1]**2+7*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[1]-8*x[1]**2+2*x[0]-5*x[0]*x[1]+7*x[0]**2
-    u[1]=(-9)-5*x[1]+7*x[1]**2+3*x[0]+4*x[0]*x[1]-4*x[0]**2
-    u[2]=1-7*x[1]-4*x[1]**2-6*x[0]+6*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9-3*x[1]+8*x[1]**2-4*x[0]+10*x[0]*x[1]-21*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0]+3*x[0]*x[1]-8*x[0]*x[1]**2+2*x[0]**2-5*x[0]**2*x[1]+7*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(9*x[0]-3*x[0]*x[1]+8*x[0]*x[1]**2-2*x[0]**2+5*x[0]**2*x[1]-7*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[1]-2*x[1]**2-1*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=(-9)-3*x[1]-5*x[1]**2+x[0]-4*x[0]*x[1]-3*x[0]**2
-    u[2]=3+2*x[1]+6*x[1]**2-7*x[0]-5*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9+3*x[1]+5*x[1]**2-2*x[0]+8*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0]-3*x[0]*x[1]-5*x[0]*x[1]**2+x[0]**2-4*x[0]**2*x[1]-3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(9*x[0]+3*x[0]*x[1]+5*x[0]*x[1]**2-1*x[0]**2+4*x[0]**2*x[1]+3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[1]-1*x[1]**2-1*x[0]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=3-6*x[1]+8*x[1]**2-4*x[0]+8*x[0]*x[1]-5*x[0]**2
-    u[2]=3-5*x[1]-8*x[1]**2-4*x[0]-5*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)+5*x[1]+8*x[1]**2+8*x[0]+10*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0]-5*x[0]*x[1]-8*x[0]*x[1]**2-4*x[0]**2-5*x[0]**2*x[1]-2*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-3)*x[0]+5*x[0]*x[1]+8*x[0]*x[1]**2+4*x[0]**2+5*x[0]**2*x[1]+2*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[1]+6*x[1]**2+4*x[0]+8*x[0]*x[1]+3*x[0]**2
-    u[1]=(-1)-6*x[1]-6*x[1]**2+8*x[0]+8*x[0]*x[1]-7*x[0]**2
-    u[2]=(-9)-6*x[1]+x[1]**2+2*x[0]-3*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-10*x[1]-18*x[1]**2-4*x[0]-16*x[0]*x[1]-3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1]+5*x[1]**2+6*x[1]**3+4*x[0]*x[1]+8*x[0]*x[1]**2+3*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[1]-3*x[1]**2+5*x[0]-7*x[0]*x[1]-4*x[0]**2
-    u[1]=2+3*x[1]-5*x[1]**2+3*x[0]-9*x[0]*x[1]+x[0]**2
-    u[2]=(-9)-2*x[1]-8*x[1]**2-3*x[0]+4*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-6*x[1]+15*x[1]**2-3*x[0]+18*x[0]*x[1]-1*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1]+3*x[1]**2-5*x[1]**3+3*x[0]*x[1]-9*x[0]*x[1]**2+x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[1]-6*x[1]**2+7*x[0]-2*x[0]*x[1]+3*x[0]**2
-    u[1]=(-6)+7*x[1]+5*x[1]**2+x[0]+3*x[0]*x[1]-9*x[0]**2
-    u[2]=1+4*x[1]+3*x[1]**2-5*x[0]+8*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)-8*x[1]-9*x[1]**2+5*x[0]-16*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1]+4*x[1]**2+3*x[1]**3-5*x[0]*x[1]+8*x[0]*x[1]**2-9*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[1]+6*x[1]**2+6*x[0]+7*x[0]*x[1]-3*x[0]**2
-    u[1]=5-4*x[1]+3*x[1]**2-4*x[0]+8*x[0]*x[1]-8*x[0]**2
-    u[2]=2+7*x[1]-1*x[1]**2-9*x[0]-8*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3+9*x[1]-6*x[1]**2-12*x[0]-14*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3)*x[0]-9*x[0]*x[1]+6*x[0]*x[1]**2+6*x[0]**2+7*x[0]**2*x[1]-3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(3*x[0]+9*x[0]*x[1]-6*x[0]*x[1]**2-6*x[0]**2-7*x[0]**2*x[1]+3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[1]-3*x[1]**2-7*x[0]+8*x[0]*x[1]+5*x[0]**2
-    u[1]=(-5)+8*x[1]+8*x[1]**2-6*x[0]+7*x[0]*x[1]-3*x[0]**2
-    u[2]=(-2)+5*x[1]-5*x[1]**2+3*x[0]-7*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5-8*x[1]-8*x[1]**2+12*x[0]-14*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0]+8*x[0]*x[1]+8*x[0]*x[1]**2-6*x[0]**2+7*x[0]**2*x[1]-3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(5*x[0]-8*x[0]*x[1]-8*x[0]*x[1]**2+6*x[0]**2-7*x[0]**2*x[1]+3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+x[1]-6*x[1]**2-2*x[0]+5*x[0]*x[1]-8*x[0]**2
-    u[1]=7+5*x[1]+7*x[1]**2-4*x[0]-5*x[0]*x[1]+8*x[0]**2
-    u[2]=(-4)-7*x[1]-6*x[1]**2+7*x[0]-1*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4+7*x[1]+6*x[1]**2-14*x[0]+2*x[0]*x[1]-21*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4)*x[0]-7*x[0]*x[1]-6*x[0]*x[1]**2+7*x[0]**2-1*x[0]**2*x[1]+7*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(4*x[0]+7*x[0]*x[1]+6*x[0]*x[1]**2-7*x[0]**2+x[0]**2*x[1]-7*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[1]-2*x[1]**2-9*x[0]-1*x[0]*x[1]-6*x[0]**2
-    u[1]=4-6*x[1]+3*x[1]**2-2*x[0]-4*x[0]*x[1]-3*x[0]**2
-    u[2]=5-8*x[1]-1*x[1]**2+7*x[0]+2*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)+10*x[1]+6*x[1]**2+9*x[0]+2*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1]-5*x[1]**2-2*x[1]**3-9*x[0]*x[1]-1*x[0]*x[1]**2-6*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-3*x[1]-7*x[1]**2-8*x[0]+7*x[0]*x[1]-3*x[0]**2
-    u[1]=(-9)+4*x[1]-9*x[1]**2-4*x[0]+5*x[0]*x[1]-6*x[0]**2
-    u[2]=8-3*x[1]-5*x[1]**2+6*x[0]-3*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9-8*x[1]+27*x[1]**2+4*x[0]-10*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-9)*x[1]+4*x[1]**2-9*x[1]**3-4*x[0]*x[1]+5*x[0]*x[1]**2-6*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[1]-3*x[1]**2+2*x[0]-4*x[0]*x[1]+2*x[0]**2
-    u[1]=(-4)+8*x[1]-2*x[1]**2-1*x[0]-4*x[0]*x[1]+x[0]**2
-    u[2]=5-7*x[1]+8*x[1]**2-8*x[0]-5*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,2,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)+14*x[1]-24*x[1]**2+8*x[0]+10*x[0]*x[1]+2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(5*x[1]-7*x[1]**2+8*x[1]**3-8*x[0]*x[1]-5*x[0]*x[1]**2-2*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)+6*x[1]+5*x[0])*jump
-    u[1]=((-1)+5*x[1]-1*x[0])*jump
-    u[2]=((-3)+2*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-8)*x[0]+6*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6+x[1]-1*x[0])*jump
-    u[1]=(6+x[1]-5*x[0])*jump
-    u[2]=(2-4*x[1]-3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=6*x[0]+x[0]*x[1]-5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)-1*x[1]-2*x[0])*jump
-    u[1]=((-7)-5*x[1]-9*x[0])*jump
-    u[2]=(6-8*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=6*x[0]-8*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(1+5*x[1]+x[0])*jump
-    u[1]=(1-3*x[1]-9*x[0])*jump
-    u[2]=(7-6*x[1]-6*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=x[0]+5*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3+3*x[1]+8*x[0])*jump
-    u[1]=((-6)+x[1]+x[0])*jump
-    u[2]=((-3)+6*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-6)*x[0]+x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5)+6*x[1]+6*x[0])*jump
-    u[1]=((-4)-8*x[1]-9*x[0])*jump
-    u[2]=(8+3*x[1]-4*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=8*x[0]+3*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+x[1]+3*x[0])*jump
-    u[1]=((-4)+5*x[1]-9*x[0])*jump
-    u[2]=((-8)-7*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=7*x[0]+x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(1+7*x[1]-4*x[0])*jump
-    u[1]=(3+4*x[1]-9*x[0])*jump
-    u[2]=(8-6*x[1]-2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=3*x[0]+4*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5)-5*x[1]+8*x[0])*jump
-    u[1]=((-6)+3*x[1]-1*x[0])*jump
-    u[2]=((-6)+7*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-6)*x[0]+7*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(7-4*x[1]+5*x[1]**2-7*x[0]-6*x[0]*x[1]+8*x[0]**2)*jump
-    d_contact_test=Data(2,(),ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=14-8*x[1]+10*x[1]**2-14*x[0]-12*x[0]*x[1]+16*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-4)+x[1]-1*x[0])*jump
-    d_contact_test=interpolate(x[0],ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=(-4)*x[0]+x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-8)+x[1]+5*x[1]**2-4*x[0]+2*x[0]*x[1]-8*x[0]**2)*jump
-    u[1]=(4+6*x[1]-8*x[1]**2+7*x[0]+3*x[0]*x[1]+4*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=5
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-40)+5*x[1]+25*x[1]**2-20*x[0]+10*x[0]*x[1]-40*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-2)-9*x[1]+7*x[1]**2-8*x[0]+6*x[0]*x[1]-3*x[0]**2)*jump
-    u[1]=(6+8*x[1]-8*x[1]**2-8*x[0]+6*x[0]*x[1]+2*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=1
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=6+8*x[1]-8*x[1]**2-8*x[0]+6*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(6+5*x[1]+4*x[1]**2-7*x[0]-2*x[0]*x[1]+5*x[0]**2)*jump
-    u[1]=((-5)-3*x[1]-8*x[1]**2-2*x[0]-5*x[0]*x[1]-7*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=3
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=18+15*x[1]+12*x[1]**2-21*x[0]-6*x[0]*x[1]+15*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(5+3*x[1]+x[1]**2+6*x[0]+5*x[0]*x[1]-5*x[0]**2)*jump
-    u[1]=(7-6*x[1]+7*x[1]**2-9*x[0]-8*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=2
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=14-12*x[1]+14*x[1]**2-18*x[0]-16*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-7)+6*x[1]-4*x[0])*jump
-    u[1]=(3-1*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-7)*x[0]+6*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-5)+7*x[1]-1*x[0])*jump
-    u[1]=(3-7*x[1]+8*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=3*x[0]-7*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-8)-5*x[1]+6*x[0])*jump
-    u[1]=((-4)+x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]-5*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-7)+4*x[1]-3*x[0])*jump
-    u[1]=((-4)-2*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-4)*x[0]-2*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)+6*x[1]+x[1]**2-4*x[0]-6*x[0]*x[1]+7*x[0]**2)*jump
-    u[1]=(8-2*x[1]-5*x[1]**2-6*x[0]-1*x[0]*x[1]-8*x[0]**2)*jump
-    u[2]=((-4)-7*x[1]+4*x[1]**2-1*x[0]+7*x[0]*x[1]-1*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-32)+24*x[1]+4*x[1]**2-16*x[0]-24*x[0]*x[1]+28*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6+5*x[1]-1*x[1]**2+5*x[0]+8*x[0]*x[1]-2*x[0]**2)*jump
-    u[1]=((-1)-7*x[1]+8*x[1]**2+7*x[0]+3*x[0]*x[1]-6*x[0]**2)*jump
-    u[2]=(5+8*x[1]+7*x[1]**2-1*x[0]+4*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-7)-49*x[1]+56*x[1]**2+49*x[0]+21*x[0]*x[1]-42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6+6*x[1]-5*x[1]**2+4*x[0]+3*x[0]*x[1]+3*x[0]**2)*jump
-    u[1]=((-5)+2*x[1]+x[1]**2+5*x[0]+6*x[0]*x[1]+4*x[0]**2)*jump
-    u[2]=((-5)-5*x[1]-6*x[1]**2-7*x[0]-7*x[0]*x[1]-8*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-40)-40*x[1]-48*x[1]**2-56*x[0]-56*x[0]*x[1]-64*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4-9*x[1]+6*x[1]**2-9*x[0]-9*x[0]*x[1]+3*x[0]**2)*jump
-    u[1]=((-7)+x[1]+2*x[1]**2-3*x[0]+6*x[0]*x[1]-9*x[0]**2)*jump
-    u[2]=((-2)+6*x[1]-9*x[1]**2-5*x[0]+4*x[0]*x[1]-9*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=12-27*x[1]+18*x[1]**2-27*x[0]-27*x[0]*x[1]+9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)+3*x[1]-5*x[1]**2+4*x[0]+6*x[0]*x[1]-4*x[0]**2)*jump
-    u[1]=((-4)+x[1]+3*x[1]**2-8*x[0]+2*x[0]*x[1]+6*x[0]**2)*jump
-    u[2]=(6+2*x[1]-6*x[1]**2+3*x[0]-7*x[0]*x[1]+2*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-28)+7*x[1]+21*x[1]**2-56*x[0]+14*x[0]*x[1]+42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4+3*x[1]+5*x[1]**2+3*x[0]+7*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=((-1)-3*x[1]+2*x[1]**2-2*x[0]-5*x[0]*x[1]+5*x[0]**2)*jump
-    u[2]=(1+7*x[1]+x[1]**2+4*x[0]-2*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=7+49*x[1]+7*x[1]**2+28*x[0]-14*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4-3*x[1]+3*x[1]**2-5*x[0]+5*x[0]*x[1]-9*x[0]**2)*jump
-    u[1]=((-6)+6*x[1]-9*x[1]**2-4*x[0]+8*x[0]*x[1]-7*x[0]**2)*jump
-    u[2]=((-4)-4*x[1]+8*x[1]**2-3*x[0]+8*x[0]*x[1]+8*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=24-18*x[1]+18*x[1]**2-30*x[0]+30*x[0]*x[1]-54*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4+3*x[1]-6*x[1]**2+2*x[0]-1*x[0]*x[1]+x[0]**2)*jump
-    u[1]=((-8)+3*x[1]-1*x[1]**2+6*x[0]-7*x[0]*x[1]-2*x[0]**2)*jump
-    u[2]=((-4)-8*x[1]-6*x[1]**2-7*x[0]-3*x[0]*x[1]-4*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-40)+15*x[1]-5*x[1]**2+30*x[0]-35*x[0]*x[1]-10*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9)+8*x[1]-2*x[1]**2-5*x[0]+6*x[0]*x[1]-6*x[0]**2)*jump
-    u[1]=((-1)+6*x[1]-4*x[1]**2+x[0]-1*x[0]*x[1]+5*x[0]**2)*jump
-    u[2]=((-9)+3*x[1]-5*x[1]**2+x[0]+2*x[0]*x[1]+6*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-45)+15*x[1]-25*x[1]**2+5*x[0]+10*x[0]*x[1]+30*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3+2*x[1]-8*x[0])*jump
-    u[1]=(6-5*x[1]+7*x[0])*jump
-    u[2]=(8-5*x[1]+8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=3*x[0]+2*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+5*x[1]-1*x[0])*jump
-    u[1]=((-8)-3*x[1]+3*x[0])*jump
-    u[2]=(5-7*x[1]+6*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-8)*x[0]-3*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)+7*x[1]-3*x[0])*jump
-    u[1]=(8-1*x[1]-1*x[0])*jump
-    u[2]=(6-4*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=6*x[0]-4*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)+x[1]+2*x[0])*jump
-    u[1]=(2+6*x[1]+7*x[0])*jump
-    u[2]=(8-8*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]+x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6-2*x[1]+x[0])*jump
-    u[1]=(4-7*x[1]-6*x[0])*jump
-    u[2]=((-4)-7*x[1]-6*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=4*x[0]-7*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)-2*x[1]+5*x[0])*jump
-    u[1]=(1-9*x[1]+5*x[0])*jump
-    u[2]=(3-6*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=3*x[0]-6*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-2)+5*x[1]+3*x[0])*jump
-    u[1]=(4-4*x[1]+3*x[0])*jump
-    u[2]=(8+7*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-2)*x[0]+5*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4-8*x[1]+x[0])*jump
-    u[1]=((-9)+7*x[1]-4*x[0])*jump
-    u[2]=((-2)+7*x[1]-7*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-9)*x[0]+7*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_2D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)-1*x[1]+4*x[0])*jump
-    u[1]=((-7)-7*x[1]-4*x[0])*jump
-    u[2]=(5+4*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=5*x[0]+4*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
diff --git a/escriptcore/test/python/test_assemblage_3Do1.py b/escriptcore/test/python/test_assemblage_3Do1.py
deleted file mode 100644
index cf262cf..0000000
--- a/escriptcore/test/python/test_assemblage_3Do1.py
+++ /dev/null
@@ -1,34177 +0,0 @@
-
-##############################################################################
-#
-# Copyright (c) 2003-2016 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-2016 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"
-
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-from esys.escript import *
-from esys.escript.linearPDEs import LinearPDE
-
-class Test_assemblage_3Do1(unittest.TestCase):
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(200,[0,0,1])
-     out.setTaggedValue(100,[0,0,-1])
-     out.setTaggedValue(20,[0,1,0])
-     out.setTaggedValue(10,[0,-1,0])
-     out.setTaggedValue(2,[1,0,0])
-     out.setTaggedValue(1,[-1,0,0])
-     return out
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=1-6*x[2]-1*x[1]-3*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,0]=7
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-21))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=2-7*x[2]+2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,1]=7
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=7-5*x[2]+x[1]-5*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,2]=4
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=2-5*x[2]-8*x[1]+6*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,0]=7
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=(-4)+4*x[2]+2*x[1]-6*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,1]=8
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=(-7)-1*x[2]+5*x[1]+x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,2]=6
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=4+2*x[2]+8*x[1]-1*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,0]=1
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-1))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=(-5)-5*x[2]-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,1]=8
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-56))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=7-4*x[2]+8*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,2]=4
-    Y_test=0
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-3)+x[2]-3*x[1]-1*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=5
-    Y_test=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-15)+5*x[2]-15*x[1]-5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-5)+7*x[2]+2*x[1]+4*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=2
-    Y_test=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-10)+14*x[2]+4*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=7-8*x[2]-3*x[1]-8*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=4
-    Y_test=32
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*(28-32*x[2]-12*x[1]-32*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_C_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=8+2*x[2]+2*x[1]-5*x[0]
-    C_test=Data(0.,(3,),Function(self.domain))
-    C_test[0]=8
-    Y_test=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_C_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=8-5*x[2]+4*x[1]-6*x[0]
-    C_test=Data(0.,(3,),Function(self.domain))
-    C_test[1]=2
-    Y_test=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_C_Const_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=8-4*x[2]+2*x[1]+2*x[0]
-    C_test=Data(0.,(3,),Function(self.domain))
-    C_test[2]=7
-    Y_test=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_D_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=7+x[2]-8*x[1]-6*x[0]
-    D_test=Data(6,(),Function(self.domain))
-    Y_test=42+6*x[2]-48*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_d_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=(-4)+2*x[2]-9*x[1]+2*x[0]
-    d_test=Data(8,(),FunctionOnBoundary(self.domain))
-    y_test=(-32)+16*x[2]-72*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=4-9*x[2]-6*x[1]+x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,0]=x[0]
-    Y_test=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=6-7*x[2]-1*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,1]=x[0]
-    Y_test=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=(-6)-2*x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,2]=x[0]
-    Y_test=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-2)-7*x[2]+8*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,0]=x[1]
-    Y_test=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=7-5*x[2]+7*x[1]-5*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,1]=x[1]
-    Y_test=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=6-9*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,2]=x[1]
-    Y_test=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=(-2)+2*x[2]+5*x[1]+x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,0]=x[2]
-    Y_test=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=1+7*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,1]=x[2]
-    Y_test=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=3-5*x[2]-7*x[1]+8*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,2]=x[2]
-    Y_test=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=5+2*x[2]+4*x[1]+4*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=(-5)-2*x[2]-4*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(5*x[0]+2*x[0]*x[2]+4*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-2)+8*x[2]-6*x[1]-5*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=2-8*x[2]+12*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-2)*x[1]+8*x[1]*x[2]-6*x[1]**2-5*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=(-5)-2*x[2]+4*x[1]-4*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=x[2]
-    Y_test=5+4*x[2]-4*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-5)*x[2]-2*x[2]**2+4*x[1]*x[2]-4*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_C_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=5-4*x[2]+5*x[1]-2*x[0]
-    C_test=Data(0.,(3,),Function(self.domain))
-    C_test[0]=x[0]
-    Y_test=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_C_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=7-3*x[2]+2*x[1]-9*x[0]
-    C_test=Data(0.,(3,),Function(self.domain))
-    C_test[1]=x[1]
-    Y_test=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_C_Vario_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=3-2*x[2]-3*x[1]-4*x[0]
-    C_test=Data(0.,(3,),Function(self.domain))
-    C_test[2]=x[2]
-    Y_test=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_D_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=(-5)
-    D_test=Function(self.domain).getX()[0]
-    Y_test=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_d_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=8
-    d_test=interpolate(x[0],FunctionOnBoundary(self.domain))
-    y_test=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=8+2*x[2]-7*x[1]-2*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,0]=7
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=5-2*x[2]-4*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,1]=8
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp02(self):
-    x=self.domain.getX()
-    u=(-5)+6*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,2]=1
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=(-7)-7*x[2]+4*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,0]=7
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=(-1)+7*x[2]-7*x[1]+8*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,1]=5
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp12(self):
-    x=self.domain.getX()
-    u=(-9)+4*x[2]-1*x[1]-3*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,2]=6
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp20(self):
-    x=self.domain.getX()
-    u=(-8)+8*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,0]=1
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp21(self):
-    x=self.domain.getX()
-    u=(-9)-8*x[2]-6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,1]=3
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Const_typeWeak_comp22(self):
-    x=self.domain.getX()
-    u=(-8)+8*x[2]-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,2]=3
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=2-6*x[2]+3*x[1]+4*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=4
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=8-24*x[2]+12*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=1+2*x[2]+2*x[1]+3*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=7
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=7+14*x[2]+14*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeWeak_comp2(self):
-    x=self.domain.getX()
-    u=5+3*x[2]-2*x[1]+2*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=6
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=30+18*x[2]-12*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=(-5)-2*x[2]+4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,0]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-4)-1*x[2]-1*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,1]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp02(self):
-    x=self.domain.getX()
-    u=(-6)+2*x[2]+5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[0,2]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=4-9*x[2]+2*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,0]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=6-8*x[2]-6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,1]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp12(self):
-    x=self.domain.getX()
-    u=4+8*x[2]-5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[1,2]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp20(self):
-    x=self.domain.getX()
-    u=2-4*x[2]-6*x[1]+5*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,0]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp21(self):
-    x=self.domain.getX()
-    u=6+x[2]-4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,1]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_A_Vario_typeWeak_comp22(self):
-    x=self.domain.getX()
-    u=(-7)-5*x[2]-7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3),Function(self.domain))
-    A_test[2,2]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-6)
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=3
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeWeak_comp2(self):
-    x=self.domain.getX()
-    u=1
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[2]+5*x[1]-4*x[0]
-    u[1]=4+8*x[2]+3*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-5*x[1]+7*x[0]
-    u[1]=3-2*x[2]+x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[2]+x[1]-5*x[0]
-    u[1]=2-3*x[2]+2*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,2]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]+7*x[1]-4*x[0]
-    u[1]=(-7)-6*x[2]+8*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[2]-2*x[1]-4*x[0]
-    u[1]=7+5*x[2]+6*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[2]-9*x[1]+7*x[0]
-    u[1]=7-7*x[2]+7*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,2]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-21))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[2]-5*x[1]-5*x[0]
-    u[1]=(-8)+6*x[2]+4*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-35))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+x[2]-4*x[1]+4*x[0]
-    u[1]=(-7)-7*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-28))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[2]-5*x[1]+7*x[0]
-    u[1]=6-4*x[2]-6*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,2]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(49)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-8*x[2]+2*x[1]+3*x[0]
-    u[1]=(-5)-7*x[2]+x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]+7*x[1]-3*x[0]
-    u[1]=(-5)+8*x[2]+x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-5*x[1]-1*x[0]
-    u[1]=(-4)+x[2]+x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,2]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[2]+2*x[1]-2*x[0]
-    u[1]=3-8*x[2]+5*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[2]-9*x[1]-7*x[0]
-    u[1]=1-2*x[2]-4*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[2]-8*x[1]-2*x[0]
-    u[1]=1-3*x[2]+2*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,2]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[2]-3*x[1]+5*x[0]
-    u[1]=5-7*x[2]-3*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-63))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[2]+3*x[1]+x[0]
-    u[1]=(-3)+x[2]-6*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]+2*x[1]+8*x[0]
-    u[1]=8-9*x[2]-4*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-72))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[2]+x[1]+2*x[0]
-    u[1]=7-2*x[2]+8*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[2]-8*x[1]-3*x[0]
-    u[1]=7+8*x[2]-7*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[2]+4*x[1]-9*x[0]
-    u[1]=8+8*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]-2*x[1]+3*x[0]
-    u[1]=(-7)+7*x[2]+5*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]+5*x[1]-2*x[0]
-    u[1]=(-3)-3*x[2]-3*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[2]-4*x[1]+5*x[0]
-    u[1]=(-9)-1*x[2]+3*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[2]+7*x[1]+x[0]
-    u[1]=2+8*x[2]-4*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-9*x[1]-7*x[0]
-    u[1]=(-4)-6*x[2]-9*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-18))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]-7*x[1]-5*x[0]
-    u[1]=3+7*x[2]-5*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-72))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[2]+8*x[1]-1*x[0]
-    u[1]=(-5)+4*x[2]-6*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[2]-1*x[1]-6*x[0]
-    u[1]=8-5*x[2]-8*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-64))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]+5*x[1]+7*x[0]
-    u[1]=(-5)-8*x[2]-4*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,2]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-40))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]+5*x[1]+8*x[0]
-    u[1]=(-5)-9*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]+6*x[1]-5*x[0]
-    u[1]=5-5*x[2]+x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]-6*x[1]+6*x[0]
-    u[1]=(-3)+x[2]-9*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,2]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-27))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[2]+4*x[1]+3*x[0]
-    u[1]=(-6)+3*x[2]+8*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]+3*x[1]-2*x[0]
-    u[1]=(-3)+8*x[2]-9*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-27))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[2]+3*x[1]+4*x[0]
-    u[1]=(-7)-8*x[2]-5*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,2]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[2]+4*x[1]-4*x[0]
-    u[1]=3+2*x[2]-9*x[1]-2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)+3*x[2]+12*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[2]-3*x[1]-7*x[0]
-    u[1]=(-4)-5*x[2]-4*x[1]-7*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=28
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-16)-20*x[2]-16*x[1]-28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[2]+4*x[1]-8*x[0]
-    u[1]=4+x[2]+5*x[1]+8*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-16)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-36)+32*x[2]+16*x[1]-32*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[2]+8*x[1]-1*x[0]
-    u[1]=8-4*x[2]-6*x[1]+2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=18
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(24-12*x[2]-18*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[2]-1*x[1]+4*x[0]
-    u[1]=(-1)-3*x[2]+7*x[1]-6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=16
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(8-16*x[2]-2*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[2]-1*x[1]-3*x[0]
-    u[1]=(-8)-8*x[2]-2*x[1]-1*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-24)-24*x[2]-6*x[1]-3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[2]-8*x[1]-8*x[0]
-    u[1]=8-2*x[2]+2*x[1]+5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)-7*x[2]-8*x[1]-8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[2]-3*x[1]-4*x[0]
-    u[1]=1-8*x[2]+3*x[1]-4*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=28
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7-56*x[2]+21*x[1]-28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]+8*x[1]-4*x[0]
-    u[1]=(-6)-2*x[2]+x[1]+8*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-24)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(21+24*x[2]+24*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[2]-1*x[1]+6*x[0]
-    u[1]=5+3*x[2]-8*x[1]+6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(15+9*x[2]-24*x[1]+18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]-7*x[1]-1*x[0]
-    u[1]=(-9)-4*x[2]+2*x[1]+3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=14
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(14-14*x[2]-14*x[1]-2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]-9*x[1]-8*x[0]
-    u[1]=(-5)-8*x[2]+7*x[1]+7*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=32
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-20)-32*x[2]+28*x[1]+28*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[2]-1*x[1]-2*x[0]
-    u[1]=(-2)-8*x[2]+7*x[1]-9*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,0,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[2]-7*x[1]+3*x[0]
-    u[1]=(-2)-8*x[2]-4*x[1]+3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[2]-4*x[1]-7*x[0]
-    u[1]=(-5)-8*x[2]+8*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,0,2]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[2]+2*x[1]-7*x[0]
-    u[1]=2-2*x[2]-7*x[1]-3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]+2*x[1]-4*x[0]
-    u[1]=4-7*x[2]-9*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,1,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-5*x[1]-3*x[0]
-    u[1]=(-6)+x[2]+6*x[1]+3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,1,2]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[2]-2*x[1]+3*x[0]
-    u[1]=7-1*x[2]-6*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]-3*x[1]-3*x[0]
-    u[1]=4-8*x[2]+2*x[1]-2*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,0,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[2]-3*x[1]+3*x[0]
-    u[1]=6+4*x[2]-8*x[1]-8*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,0,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[2]-7*x[1]-6*x[0]
-    u[1]=(-6)-9*x[2]-2*x[1]-9*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+7*x[2]+5*x[1]-6*x[0]
-    u[1]=8-8*x[2]+5*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,1,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[2]+2*x[1]+x[0]
-    u[1]=(-3)-7*x[2]+2*x[1]-8*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,1,2]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]+x[1]+7*x[0]
-    u[1]=(-6)-2*x[2]+3*x[1]+6*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)+7*x[2]+x[1]+7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[2]+4*x[1]-5*x[0]
-    u[1]=(-8)-2*x[2]+7*x[1]-1*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-16)-4*x[2]+14*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-5*x[1]+2*x[0]
-    u[1]=7-5*x[2]-2*x[1]+2*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)+14*x[2]-10*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-9*x[2]-7*x[1]+4*x[0]
-    u[1]=2-3*x[2]-3*x[1]+5*x[0]
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=14-21*x[2]-21*x[1]+35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[2]+8*x[1]+8*x[0]
-    u[1]=(-1)-3*x[2]+5*x[1]+x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,0]=5
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-15)-30*x[2]+40*x[1]+40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]-3*x[1]-1*x[0]
-    u[1]=(-8)+5*x[2]+7*x[1]-2*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,1]=1
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-8)+5*x[2]+7*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]+4*x[1]+4*x[0]
-    u[1]=5+7*x[2]-4*x[1]-9*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,0]=6
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=42-54*x[2]+24*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[2]-7*x[1]-3*x[0]
-    u[1]=(-2)-6*x[2]-6*x[1]+4*x[0]
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,1]=2
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-4)-12*x[2]-12*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]+2*x[1]+x[0]
-    u[1]=(-6)+2*x[2]+5*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[2]-2*x[1]-3*x[0]
-    u[1]=(-6)+2*x[2]-2*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[2]+7*x[1]+3*x[0]
-    u[1]=(-3)-3*x[2]-8*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[2]-6*x[1]-8*x[0]
-    u[1]=2-4*x[2]+2*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[2]+5*x[1]+6*x[0]
-    u[1]=(-8)-2*x[2]+5*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[2]+8*x[1]+4*x[0]
-    u[1]=(-7)+8*x[2]+6*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-1*x[1]+7*x[0]
-    u[1]=(-4)-4*x[2]-3*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[2]+8*x[1]-7*x[0]
-    u[1]=8-9*x[2]+7*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[2]+8*x[1]+x[0]
-    u[1]=2-6*x[2]-8*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[2]-8*x[1]+7*x[0]
-    u[1]=(-1)+8*x[2]-8*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+x[2]-1*x[1]+x[0]
-    u[1]=2+6*x[2]-9*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]+2*x[1]-5*x[0]
-    u[1]=3+7*x[2]-5*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[2]-6*x[1]+5*x[0]
-    u[1]=3-9*x[2]+5*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(5*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+x[2]-1*x[1]-4*x[0]
-    u[1]=(-4)-9*x[2]+5*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-1)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[2]-1*x[1]+3*x[0]
-    u[1]=(-8)-3*x[2]+x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(6*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]+x[1]+x[0]
-    u[1]=(-4)+7*x[2]-9*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]-9*x[1]+8*x[0]
-    u[1]=(-8)-5*x[2]-4*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]-9*x[1]-6*x[0]
-    u[1]=(-4)-5*x[2]+8*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]+5*x[1]+7*x[0]
-    u[1]=6+7*x[2]+6*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]+6*x[1]+5*x[0]
-    u[1]=7-4*x[2]-3*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-6*x[1]+2*x[0]
-    u[1]=(-3)-5*x[2]-5*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-8*x[1]-3*x[0]
-    u[1]=(-4)+6*x[2]-5*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[2]-3*x[1]-3*x[0]
-    u[1]=(-8)+3*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+x[2]+6*x[1]-6*x[0]
-    u[1]=2+8*x[2]-9*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]-2*x[1]-7*x[0]
-    u[1]=3+8*x[2]-6*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[2]-1*x[1]+x[0]
-    u[1]=(-4)-2*x[2]+8*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[2]+4*x[1]+5*x[0]
-    u[1]=3-1*x[2]+4*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-2*x[2]-1*x[1]+5*x[0]
-    u[1]=(-2)+x[2]-8*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[2]+7*x[1]+6*x[0]
-    u[1]=3+6*x[2]+7*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]+x[1]-7*x[0]
-    u[1]=(-7)+3*x[2]+5*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]-5*x[1]-6*x[0]
-    u[1]=1-5*x[2]+5*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[2]+7*x[1]-8*x[0]
-    u[1]=5+x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[2]+6*x[1]+6*x[0]
-    u[1]=2+8*x[2]+2*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-2)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]-2*x[1]-8*x[0]
-    u[1]=(-4)-4*x[2]+8*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(5*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]+x[1]+3*x[0]
-    u[1]=1-4*x[2]-4*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[2]+2*x[1]+x[0]
-    u[1]=(-9)+7*x[2]-9*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-1*x[2]-4*x[1]-9*x[0]
-    u[1]=(-4)+3*x[2]-6*x[1]+5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5+x[2]+4*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-5)*x[0]-1*x[0]*x[2]-4*x[0]*x[1]-9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[2]+5*x[1]+2*x[0]
-    u[1]=4-1*x[2]+x[1]-4*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+x[2]-1*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]-1*x[0]*x[2]+x[0]*x[1]-4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[2]+3*x[1]+6*x[0]
-    u[1]=(-1)-9*x[2]-5*x[1]+8*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)-5*x[2]-6*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1]+5*x[1]*x[2]+3*x[1]**2+6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]+2*x[1]+4*x[0]
-    u[1]=(-2)-9*x[2]+4*x[1]+6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2+9*x[2]-8*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1]-9*x[1]*x[2]+4*x[1]**2+6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[2]-9*x[1]-1*x[0]
-    u[1]=3-4*x[2]-9*x[1]-9*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7+12*x[2]+9*x[1]+x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-7)*x[2]-6*x[2]**2-9*x[1]*x[2]-1*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]+8*x[1]+x[0]
-    u[1]=(-6)+8*x[2]+8*x[1]+5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6-16*x[2]-8*x[1]-5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6)*x[2]+8*x[2]**2+8*x[1]*x[2]+5*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]+2*x[1]-9*x[0]
-    u[1]=(-5)-1*x[2]-1*x[1]-1*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)-4*x[2]-2*x[1]+18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0]+4*x[0]*x[2]+2*x[0]*x[1]-9*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]+8*x[1]+2*x[0]
-    u[1]=5+3*x[2]-8*x[1]-3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)-3*x[2]+8*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(5*x[0]+3*x[0]*x[2]-8*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]-4*x[1]-1*x[0]
-    u[1]=(-8)+x[2]+5*x[1]+3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1+9*x[2]+8*x[1]+x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1]-9*x[1]*x[2]-4*x[1]**2-1*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]-2*x[1]+6*x[0]
-    u[1]=(-7)-1*x[2]+2*x[1]+2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7+x[2]-4*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1]-1*x[1]*x[2]+2*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+6*x[2]+8*x[1]-5*x[0]
-    u[1]=3+3*x[2]-8*x[1]-3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3-12*x[2]-8*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-3)*x[2]+6*x[2]**2+8*x[1]*x[2]-5*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]-3*x[1]-8*x[0]
-    u[1]=2-3*x[2]-6*x[1]+3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)+6*x[2]+6*x[1]-3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(2*x[2]-3*x[2]**2-6*x[1]*x[2]+3*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[2]-4*x[1]-7*x[0]
-    u[1]=4-6*x[2]-1*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]+8*x[1]-2*x[0]
-    u[1]=3-9*x[2]+8*x[1]-9*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[2]+4*x[1]-9*x[0]
-    u[1]=(-1)+7*x[2]+x[1]-8*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]+7*x[1]+5*x[0]
-    u[1]=7-6*x[2]-5*x[1]-3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]-5*x[1]-3*x[0]
-    u[1]=(-5)-6*x[2]-7*x[1]-9*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[2]+8*x[1]+6*x[0]
-    u[1]=6-4*x[2]-3*x[1]-1*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[0,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[2]+2*x[1]+x[0]
-    u[1]=4-1*x[2]+8*x[1]-3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[2]-7*x[1]+4*x[0]
-    u[1]=3+8*x[2]-8*x[1]-2*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]-6*x[1]-9*x[0]
-    u[1]=1+7*x[2]+3*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]+7*x[1]+8*x[0]
-    u[1]=3-6*x[2]-8*x[1]-2*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[2]-3*x[1]-9*x[0]
-    u[1]=(-7)-9*x[2]+6*x[1]+3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_C_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]+x[1]+6*x[0]
-    u[1]=(-3)-8*x[2]-1*x[1]+3*x[0]
-    C_test=Data(0.,(2,2,3),Function(self.domain))
-    C_test[1,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=4
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-2)
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-9)
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-8)
-    D_test=Data(0.,(2,2),Function(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=1
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=6
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-8)
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=2
-    d_test=Data(0.,(2,2),FunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[2]-8*x[1]+3*x[0]
-    u[1]=(-2)-3*x[2]+7*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[2]+5*x[1]+4*x[0]
-    u[1]=8+3*x[2]+x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,1]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[2]+8*x[1]-6*x[0]
-    u[1]=3+3*x[2]-3*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[2]-2*x[1]+x[0]
-    u[1]=(-6)-2*x[2]+7*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,0]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]+8*x[1]-6*x[0]
-    u[1]=(-5)-4*x[2]-1*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,1]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[2]+8*x[1]+4*x[0]
-    u[1]=7-5*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,2]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[2]-8*x[1]-8*x[0]
-    u[1]=2+5*x[2]+3*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,0]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[2]-1*x[1]+7*x[0]
-    u[1]=(-1)-2*x[2]+7*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,1]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]+7*x[1]+4*x[0]
-    u[1]=6+7*x[2]+6*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,2]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]-1*x[1]+7*x[0]
-    u[1]=2-1*x[2]-8*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]+x[1]-4*x[0]
-    u[1]=5+3*x[2]-7*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[2]+3*x[1]+3*x[0]
-    u[1]=7-8*x[2]-5*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,2]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[2]+6*x[1]+8*x[0]
-    u[1]=(-6)-5*x[2]+6*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,0]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=64
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]+4*x[1]-1*x[0]
-    u[1]=(-2)+7*x[2]-5*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]-3*x[1]-5*x[0]
-    u[1]=1-7*x[2]+4*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+8*x[1]-2*x[0]
-    u[1]=5+2*x[2]+6*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,0]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[2]+4*x[1]+2*x[0]
-    u[1]=(-1)-3*x[2]+5*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,1]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=10
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]+3*x[1]+7*x[0]
-    u[1]=7+8*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,2]=4
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]-1*x[1]-3*x[0]
-    u[1]=5+x[2]+7*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,0]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[2]-6*x[1]-3*x[0]
-    u[1]=7+6*x[2]-2*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,1]=4
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[2]+7*x[1]+x[0]
-    u[1]=(-3)-7*x[2]+6*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,2]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[2]+8*x[1]-2*x[0]
-    u[1]=(-3)+3*x[2]+8*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,0]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+7*x[1]-2*x[0]
-    u[1]=5-4*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,1]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]+2*x[1]+7*x[0]
-    u[1]=7-8*x[2]+3*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,2]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]+3*x[1]+4*x[0]
-    u[1]=3+4*x[2]+2*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,0]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[2]-9*x[1]-4*x[0]
-    u[1]=(-3)+5*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-54)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[2]+x[1]-8*x[0]
-    u[1]=8-6*x[2]-8*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,2]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]-7*x[1]+7*x[0]
-    u[1]=(-7)-4*x[2]-5*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,0]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[2]+4*x[1]-7*x[0]
-    u[1]=4+6*x[2]-1*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,1]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]+x[1]-8*x[0]
-    u[1]=7+8*x[2]+8*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[2]-5*x[1]+x[0]
-    u[1]=6+3*x[2]-3*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,0]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+4*x[1]-9*x[0]
-    u[1]=2-1*x[2]+5*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]-8*x[1]-9*x[0]
-    u[1]=(-5)-3*x[2]-1*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,2]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[2]-1*x[1]+x[0]
-    u[1]=1-3*x[2]+x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,0]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=42
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[2]-5*x[1]-1*x[0]
-    u[1]=(-1)+8*x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=49
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Const_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[2]-9*x[1]-3*x[0]
-    u[1]=(-7)+2*x[2]-1*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,2]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[2]-3*x[1]+3*x[0]
-    u[1]=(-8)-2*x[2]-9*x[1]-9*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=18+12*x[2]-18*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[2]-1*x[1]-9*x[0]
-    u[1]=(-8)-5*x[2]-6*x[1]-2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-64)-40*x[2]-48*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+6*x[2]-5*x[1]+6*x[0]
-    u[1]=(-3)+7*x[2]+7*x[1]+4*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=20+30*x[2]-25*x[1]+30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[2]+6*x[1]-7*x[0]
-    u[1]=(-2)+x[2]+x[1]+7*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-14)+7*x[2]+7*x[1]+49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]-3*x[1]+2*x[0]
-    u[1]=(-5)+7*x[2]-5*x[1]-9*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-63)-49*x[2]-21*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-7*x[2]+4*x[1]-6*x[0]
-    u[1]=(-7)+5*x[2]+5*x[1]+2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-49)+35*x[2]+35*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[2]+4*x[1]-6*x[0]
-    u[1]=2+7*x[2]+5*x[1]-7*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-35)-42*x[2]+28*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]+7*x[1]-2*x[0]
-    u[1]=(-8)-7*x[2]-9*x[1]+3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)-7*x[2]-9*x[1]+3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-1*x[2]+8*x[1]+2*x[0]
-    u[1]=6-7*x[2]+2*x[1]-4*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=48-6*x[2]+48*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[2]-9*x[1]+7*x[0]
-    u[1]=3-5*x[2]+4*x[1]-3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=18-30*x[2]+24*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[2]+8*x[1]+x[0]
-    u[1]=(-9)+3*x[2]+8*x[1]+5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=6-3*x[2]+8*x[1]+x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[2]-4*x[1]-2*x[0]
-    u[1]=(-4)+6*x[2]-9*x[1]+x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-32)+48*x[2]-72*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[2]-7*x[1]-5*x[0]
-    u[1]=(-3)+5*x[2]-7*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]-8*x[1]+7*x[0]
-    u[1]=(-2)-4*x[2]-9*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[2]+8*x[1]-5*x[0]
-    u[1]=3+7*x[2]-9*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,0,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[2]-6*x[1]-2*x[0]
-    u[1]=(-5)+x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[2]-9*x[1]-1*x[0]
-    u[1]=1+8*x[2]-2*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[2]+6*x[1]+2*x[0]
-    u[1]=(-8)+2*x[2]-2*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,0,1,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[2]-4*x[1]+4*x[0]
-    u[1]=(-2)+4*x[2]-9*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[2]-7*x[1]-2*x[0]
-    u[1]=(-9)-6*x[2]+6*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]+7*x[1]+4*x[0]
-    u[1]=5-4*x[2]+2*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,0,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]+8*x[1]+7*x[0]
-    u[1]=(-4)-4*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[2]+4*x[1]+8*x[0]
-    u[1]=3+6*x[2]+6*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+x[2]-8*x[1]-6*x[0]
-    u[1]=6-2*x[2]-7*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,1,1,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]-5*x[1]-6*x[0]
-    u[1]=(-9)-5*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]+6*x[1]-6*x[0]
-    u[1]=4+7*x[2]-7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[2]-7*x[1]+3*x[0]
-    u[1]=(-4)-9*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,0,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[2]-7*x[1]+6*x[0]
-    u[1]=3+8*x[2]+7*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+x[2]+6*x[1]-6*x[0]
-    u[1]=(-4)+x[2]-2*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[2]+3*x[1]-2*x[0]
-    u[1]=(-5)+3*x[2]+4*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[0,2,1,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=3*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[2]-5*x[1]+2*x[0]
-    u[1]=7+4*x[2]+4*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[2]-4*x[1]+5*x[0]
-    u[1]=(-7)-7*x[2]+4*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[2]+x[1]+5*x[0]
-    u[1]=(-2)-5*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,0,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[2]-8*x[1]-8*x[0]
-    u[1]=(-8)-6*x[2]+7*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[2]-3*x[1]-6*x[0]
-    u[1]=(-1)-8*x[2]-3*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[2]-4*x[1]+8*x[0]
-    u[1]=(-8)+4*x[2]+5*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,0,1,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[2]+3*x[1]+x[0]
-    u[1]=2+2*x[2]+7*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[2]-8*x[1]-2*x[0]
-    u[1]=(-5)-6*x[2]+x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[2]+6*x[1]-7*x[0]
-    u[1]=4-5*x[2]-7*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,0,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[2]+6*x[1]-5*x[0]
-    u[1]=4-7*x[2]+x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[2]-6*x[1]+8*x[0]
-    u[1]=(-8)-8*x[2]-2*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[2]-8*x[1]+2*x[0]
-    u[1]=(-6)-7*x[2]-4*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,1,1,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]+5*x[1]+x[0]
-    u[1]=(-2)-3*x[2]+2*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[2]+8*x[1]+5*x[0]
-    u[1]=1+7*x[2]+x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[2]-3*x[1]-2*x[0]
-    u[1]=6-9*x[2]-9*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,0,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[2]-3*x[1]-9*x[0]
-    u[1]=1+x[2]+8*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=3*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[2]-9*x[1]-7*x[0]
-    u[1]=(-7)-3*x[2]+6*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_A_Vario_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[2]+7*x[1]+6*x[0]
-    u[1]=8-3*x[2]+x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),Function(self.domain))
-    A_test[1,2,1,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-3)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=3
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=5
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=1
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-5)
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=5
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=8
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-4)
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-9)
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=7
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-8)
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-1)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=5
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+x[2]+2*x[1]+8*x[0]
-    u[1]=(-1)-8*x[2]-8*x[1]+7*x[0]
-    u[2]=(-4)+6*x[2]-8*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[2]+x[1]+5*x[0]
-    u[1]=7+2*x[2]-3*x[1]-5*x[0]
-    u[2]=6+6*x[2]-2*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[2]-9*x[1]-3*x[0]
-    u[1]=(-6)+x[2]-3*x[1]+x[0]
-    u[2]=3-1*x[2]-6*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]+7*x[1]+5*x[0]
-    u[1]=3-8*x[2]-2*x[1]-9*x[0]
-    u[2]=2+4*x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-72))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[2]-5*x[1]+7*x[0]
-    u[1]=(-9)-8*x[2]-9*x[1]+x[0]
-    u[2]=1-3*x[2]-6*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-63))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-3*x[1]-5*x[0]
-    u[1]=(-6)-3*x[2]+3*x[1]+6*x[0]
-    u[2]=(-7)-8*x[2]+3*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[2]+5*x[1]+6*x[0]
-    u[1]=2+7*x[2]-7*x[1]-7*x[0]
-    u[2]=(-5)-6*x[2]+5*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[2]-5*x[1]+3*x[0]
-    u[1]=4+6*x[2]-8*x[1]-8*x[0]
-    u[2]=(-5)-2*x[2]+x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[2]-2*x[1]-5*x[0]
-    u[1]=(-7)+5*x[2]-2*x[1]+3*x[0]
-    u[2]=(-5)-9*x[2]+7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[2]-5*x[1]+x[0]
-    u[1]=(-8)-7*x[2]+6*x[1]-6*x[0]
-    u[2]=(-8)+6*x[2]+x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[2]-4*x[1]+7*x[0]
-    u[1]=1+7*x[2]-3*x[1]-8*x[0]
-    u[2]=(-6)-3*x[2]-7*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]-6*x[1]+x[0]
-    u[1]=(-5)+5*x[2]-6*x[1]-1*x[0]
-    u[2]=(-4)-9*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[2]+3*x[1]-1*x[0]
-    u[1]=4-5*x[2]-9*x[1]-4*x[0]
-    u[2]=3+x[2]-2*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[2]+x[1]-1*x[0]
-    u[1]=(-4)+2*x[2]+x[1]-2*x[0]
-    u[2]=3-7*x[2]+2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]+x[1]+3*x[0]
-    u[1]=7-7*x[2]+8*x[1]-4*x[0]
-    u[2]=(-9)+7*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-28))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]+8*x[1]+7*x[0]
-    u[1]=(-3)-4*x[2]-8*x[1]-3*x[0]
-    u[2]=(-3)+8*x[2]+x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-49))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]+4*x[1]-4*x[0]
-    u[1]=(-5)-2*x[2]-8*x[1]-3*x[0]
-    u[2]=2-7*x[2]+6*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[2]+4*x[1]+5*x[0]
-    u[1]=(-8)-7*x[2]-6*x[1]-6*x[0]
-    u[2]=(-6)+3*x[2]+8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]-3*x[1]+x[0]
-    u[1]=5-2*x[2]+3*x[1]-6*x[0]
-    u[2]=(-1)-7*x[2]-2*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-1*x[2]-1*x[1]+2*x[0]
-    u[1]=7+8*x[2]+6*x[1]-4*x[0]
-    u[2]=8+7*x[2]-4*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[2]-1*x[1]-8*x[0]
-    u[1]=(-4)+4*x[2]+4*x[1]+8*x[0]
-    u[2]=4+8*x[2]-5*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]+8*x[1]-6*x[0]
-    u[1]=(-3)-8*x[2]+4*x[1]-5*x[0]
-    u[2]=7-3*x[2]-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-40))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[2]+6*x[1]+5*x[0]
-    u[1]=8-2*x[2]-9*x[1]-7*x[0]
-    u[2]=(-3)+5*x[2]+5*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[2]-7*x[1]+2*x[0]
-    u[1]=(-6)+3*x[2]-1*x[1]-7*x[0]
-    u[2]=2+2*x[2]-8*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]+4*x[1]+4*x[0]
-    u[1]=(-8)-7*x[2]-7*x[1]-7*x[0]
-    u[2]=(-8)-4*x[2]-5*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]-1*x[1]+3*x[0]
-    u[1]=7+6*x[2]+6*x[1]-5*x[0]
-    u[2]=(-6)-3*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[2]-7*x[1]+3*x[0]
-    u[1]=(-3)-2*x[2]-3*x[1]+x[0]
-    u[2]=(-2)-2*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]+2*x[1]-7*x[0]
-    u[1]=1+x[2]+7*x[1]-2*x[0]
-    u[2]=(-6)+3*x[2]-2*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-49))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[2]+3*x[1]+4*x[0]
-    u[1]=(-5)+2*x[2]+3*x[1]+8*x[0]
-    u[2]=2+8*x[2]+4*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]-5*x[1]+5*x[0]
-    u[1]=(-4)+2*x[2]+2*x[1]+7*x[0]
-    u[2]=1+3*x[2]-7*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[2]-8*x[1]-7*x[0]
-    u[1]=(-7)+7*x[2]+5*x[1]-6*x[0]
-    u[2]=8+6*x[2]+8*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[2]-2*x[1]-5*x[0]
-    u[1]=8-9*x[2]-5*x[1]+x[0]
-    u[2]=(-1)+5*x[2]+4*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]+x[1]+x[0]
-    u[1]=6+3*x[2]+7*x[1]+4*x[0]
-    u[2]=2+2*x[2]-6*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[2]+4*x[1]-8*x[0]
-    u[1]=4-4*x[2]-2*x[1]+5*x[0]
-    u[2]=(-2)+x[2]+4*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[2]+7*x[1]+3*x[0]
-    u[1]=(-1)+4*x[2]-1*x[1]+4*x[0]
-    u[2]=4+2*x[2]-3*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-18))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[2]+8*x[1]-4*x[0]
-    u[1]=(-4)-3*x[2]+x[1]-6*x[0]
-    u[2]=(-8)-2*x[2]+8*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[2]+5*x[1]-6*x[0]
-    u[1]=1-7*x[2]-1*x[1]-9*x[0]
-    u[2]=2-3*x[2]+8*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]+x[1]-8*x[0]
-    u[1]=(-8)-9*x[2]+4*x[1]+2*x[0]
-    u[2]=(-3)+5*x[2]-2*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[2]-4*x[1]-9*x[0]
-    u[1]=(-5)-2*x[2]-7*x[1]-2*x[0]
-    u[2]=(-6)+x[2]-5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-3*x[1]+4*x[0]
-    u[1]=(-5)-5*x[2]+x[1]+7*x[0]
-    u[2]=(-4)-1*x[2]+3*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-2*x[1]-6*x[0]
-    u[1]=(-6)-4*x[2]+6*x[1]-2*x[0]
-    u[2]=(-2)-4*x[2]+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[2]+5*x[1]-3*x[0]
-    u[1]=5+8*x[2]-6*x[1]-1*x[0]
-    u[2]=2+7*x[2]+x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[2]-4*x[1]+x[0]
-    u[1]=(-5)-3*x[2]-5*x[1]-9*x[0]
-    u[2]=7+8*x[2]+5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]-8*x[1]+4*x[0]
-    u[1]=(-4)+x[2]-9*x[1]+4*x[0]
-    u[2]=(-3)+5*x[2]+8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[2]+3*x[1]-7*x[0]
-    u[1]=(-8)-3*x[2]-7*x[1]-2*x[0]
-    u[2]=8-6*x[2]-5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[2]+x[1]-5*x[0]
-    u[1]=(-2)+8*x[2]+7*x[1]-2*x[0]
-    u[2]=7-7*x[2]-9*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-5))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-8*x[2]-8*x[1]+x[0]
-    u[1]=6-8*x[2]-4*x[1]+x[0]
-    u[2]=1+2*x[2]+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[2]+3*x[1]-3*x[0]
-    u[1]=5-8*x[2]-8*x[1]-4*x[0]
-    u[2]=(-1)-2*x[2]+6*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]+7*x[1]-7*x[0]
-    u[1]=(-2)+4*x[2]+5*x[1]+8*x[0]
-    u[2]=(-5)-1*x[2]-6*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[2]-3*x[1]+6*x[0]
-    u[1]=(-3)-3*x[2]+5*x[1]+4*x[0]
-    u[2]=(-9)-9*x[2]+8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[2]-2*x[1]-6*x[0]
-    u[1]=8+6*x[2]-4*x[1]-9*x[0]
-    u[2]=(-3)+8*x[2]+x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[2]+8*x[1]-9*x[0]
-    u[1]=2+8*x[2]+8*x[1]-6*x[0]
-    u[2]=(-9)-7*x[2]-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-72))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[2]+3*x[1]-2*x[0]
-    u[1]=8+2*x[2]-7*x[1]+7*x[0]
-    u[2]=3-6*x[2]-9*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]+3*x[1]-4*x[0]
-    u[1]=8-2*x[2]-8*x[1]+7*x[0]
-    u[2]=(-5)+5*x[2]-4*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-2*x[2]+2*x[1]+7*x[0]
-    u[1]=(-1)-3*x[2]+x[1]-6*x[0]
-    u[2]=(-4)-9*x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[2]-6*x[1]-1*x[0]
-    u[1]=(-4)-3*x[2]-5*x[1]+7*x[0]
-    u[2]=(-4)-3*x[2]-9*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]+8*x[1]+4*x[0]
-    u[1]=(-2)-7*x[2]-6*x[1]-4*x[0]
-    u[2]=(-9)-5*x[2]-5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-1*x[2]+5*x[1]+x[0]
-    u[1]=(-9)+4*x[2]-8*x[1]+8*x[0]
-    u[2]=(-8)-5*x[2]-2*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[2]-5*x[1]-1*x[0]
-    u[1]=6-3*x[2]+7*x[1]+5*x[0]
-    u[2]=5-1*x[2]+x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[2]+x[1]-5*x[0]
-    u[1]=(-1)+x[2]-4*x[1]-8*x[0]
-    u[2]=(-8)+3*x[2]-5*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[2]+4*x[1]+8*x[0]
-    u[1]=7+7*x[2]+7*x[1]+3*x[0]
-    u[2]=(-2)-8*x[2]+3*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[2]+3*x[1]-5*x[0]
-    u[1]=5-2*x[2]+4*x[1]-9*x[0]
-    u[2]=3-4*x[2]+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]+4*x[1]-5*x[0]
-    u[1]=(-3)-8*x[2]-3*x[1]-7*x[0]
-    u[2]=7+3*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]-8*x[1]+5*x[0]
-    u[1]=8-4*x[2]+5*x[1]-2*x[0]
-    u[2]=8+5*x[2]-3*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[2]-4*x[1]-3*x[0]
-    u[1]=2+4*x[2]-7*x[1]+7*x[0]
-    u[2]=4+5*x[2]+3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[2]-1*x[1]-9*x[0]
-    u[1]=4-8*x[2]-6*x[1]+2*x[0]
-    u[2]=(-4)+2*x[2]-5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[2]+4*x[1]+4*x[0]
-    u[1]=(-4)+x[2]+5*x[1]-4*x[0]
-    u[2]=2-2*x[2]-8*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[2]-3*x[1]+3*x[0]
-    u[1]=7-7*x[2]-7*x[1]-4*x[0]
-    u[2]=3+2*x[2]-6*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-28))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[2]-3*x[1]-3*x[0]
-    u[1]=4-9*x[2]-5*x[1]-2*x[0]
-    u[2]=5-4*x[2]+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-63))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]-6*x[1]+5*x[0]
-    u[1]=1+x[2]+4*x[1]-1*x[0]
-    u[2]=(-7)-7*x[2]-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]+8*x[1]-2*x[0]
-    u[1]=(-7)+4*x[2]-9*x[1]-7*x[0]
-    u[2]=(-2)+7*x[2]-9*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-45))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]+2*x[1]-7*x[0]
-    u[1]=3+8*x[2]-9*x[1]+5*x[0]
-    u[2]=(-8)+7*x[2]-3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]+4*x[1]-4*x[0]
-    u[1]=(-9)+2*x[2]-3*x[1]+7*x[0]
-    u[2]=5+4*x[2]+4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-8*x[2]+2*x[1]+x[0]
-    u[1]=(-6)-3*x[2]-2*x[1]+5*x[0]
-    u[2]=(-5)-2*x[2]+4*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-5*x[1]+4*x[0]
-    u[1]=8+4*x[2]+4*x[1]-6*x[0]
-    u[2]=(-3)-9*x[2]+7*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]+4*x[1]+8*x[0]
-    u[1]=3+3*x[2]-4*x[1]+x[0]
-    u[2]=4-8*x[2]+4*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+5*x[2]-1*x[1]+7*x[0]
-    u[1]=(-2)+5*x[2]+6*x[1]+3*x[0]
-    u[2]=(-3)+8*x[2]-4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]+3*x[1]-3*x[0]
-    u[1]=6-1*x[2]-5*x[1]-2*x[0]
-    u[2]=8+4*x[2]-9*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-7))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[2]+3*x[1]+3*x[0]
-    u[1]=(-8)-7*x[2]-5*x[1]-9*x[0]
-    u[2]=7+3*x[2]-5*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[2]-8*x[1]-3*x[0]
-    u[1]=(-6)+7*x[2]-2*x[1]-5*x[0]
-    u[2]=(-4)-9*x[2]+6*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeStrong_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[2]-4*x[1]-3*x[0]
-    u[1]=(-8)-7*x[2]+2*x[1]-5*x[0]
-    u[2]=(-7)-5*x[2]-9*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-25))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[2]+7*x[1]+4*x[0]
-    u[1]=(-6)+6*x[2]+5*x[1]-4*x[0]
-    u[2]=5-6*x[2]+x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-32)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-16)-24*x[2]+56*x[1]+32*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[2]+3*x[1]-2*x[0]
-    u[1]=(-1)+5*x[2]+6*x[1]-2*x[0]
-    u[2]=(-2)+7*x[2]-7*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)+30*x[2]+36*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]-3*x[1]+8*x[0]
-    u[1]=1+7*x[2]-3*x[1]-2*x[0]
-    u[2]=(-5)-5*x[2]-4*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-40)-40*x[2]-32*x[1]-24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[2]-1*x[1]+6*x[0]
-    u[1]=7+8*x[2]-1*x[1]-5*x[0]
-    u[2]=(-1)+4*x[2]-3*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-18)+15*x[2]-3*x[1]+18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[2]+x[1]+6*x[0]
-    u[1]=6+6*x[2]-2*x[1]+8*x[0]
-    u[2]=(-3)-7*x[2]+3*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(18+18*x[2]-6*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[2]+8*x[1]-1*x[0]
-    u[1]=2+5*x[2]-3*x[1]-2*x[0]
-    u[2]=3+5*x[2]-9*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=54
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(18+30*x[2]-54*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[2]+x[1]+6*x[0]
-    u[1]=7-3*x[2]-3*x[1]+2*x[0]
-    u[2]=8+7*x[2]-7*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-12)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(20+12*x[2]+4*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+7*x[2]-6*x[1]+4*x[0]
-    u[1]=2-4*x[2]+8*x[1]-2*x[0]
-    u[2]=7+x[2]+x[1]+5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=28
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(14-28*x[2]+56*x[1]-14*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]+4*x[1]-7*x[0]
-    u[1]=4-2*x[2]-1*x[1]+3*x[0]
-    u[2]=(-8)-5*x[2]+4*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-8)-5*x[2]+4*x[1]-9*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[2]-2*x[1]-2*x[0]
-    u[1]=(-8)-5*x[2]+2*x[1]-8*x[0]
-    u[2]=(-1)+3*x[2]-4*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-12)-6*x[2]-6*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[2]-3*x[1]+x[0]
-    u[1]=(-1)-2*x[2]+3*x[1]-3*x[0]
-    u[2]=8+4*x[2]-5*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)-8*x[2]+12*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[2]-6*x[1]-3*x[0]
-    u[1]=7-3*x[2]-6*x[1]-2*x[0]
-    u[2]=(-4)-6*x[2]+2*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)-12*x[2]+4*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]-5*x[1]+x[0]
-    u[1]=7+x[2]+4*x[1]-4*x[0]
-    u[2]=(-9)-6*x[2]-6*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=20
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-28)-12*x[2]-20*x[1]+4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]-8*x[1]-9*x[0]
-    u[1]=(-1)-8*x[2]-4*x[1]-7*x[0]
-    u[2]=(-5)+6*x[2]+6*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)-16*x[2]-8*x[1]-14*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-6*x[1]+5*x[0]
-    u[1]=(-6)-3*x[2]+8*x[1]-8*x[0]
-    u[2]=(-1)-7*x[2]+6*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)-7*x[2]+6*x[1]-7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]+8*x[1]-1*x[0]
-    u[1]=(-7)+6*x[2]-9*x[1]-4*x[0]
-    u[2]=4-3*x[2]-5*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=56
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-21)-56*x[2]+56*x[1]-7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[2]-7*x[1]+5*x[0]
-    u[1]=(-8)+7*x[2]-1*x[1]+x[0]
-    u[2]=4-7*x[2]+3*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-21)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-24)+21*x[2]-3*x[1]+3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[2]-4*x[1]-3*x[0]
-    u[1]=1-7*x[2]-5*x[1]-4*x[0]
-    u[2]=2+x[2]-6*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4+2*x[2]-12*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[2]+x[1]-4*x[0]
-    u[1]=8-9*x[2]-9*x[1]-9*x[0]
-    u[2]=7+6*x[2]+8*x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-8)+14*x[2]+2*x[1]-8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]+2*x[1]-6*x[0]
-    u[1]=4-8*x[2]+4*x[1]+8*x[0]
-    u[2]=2+7*x[2]+3*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4-8*x[2]+4*x[1]+8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[2]+5*x[1]+3*x[0]
-    u[1]=(-4)+7*x[2]+2*x[1]-7*x[0]
-    u[2]=2-2*x[2]+x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=49
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(14-14*x[2]+7*x[1]-49*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[2]-6*x[1]+x[0]
-    u[1]=1-5*x[2]-8*x[1]-3*x[0]
-    u[2]=6+x[2]-4*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)+5*x[2]-6*x[1]+x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[2]-7*x[1]-2*x[0]
-    u[1]=(-9)+4*x[2]-9*x[1]+6*x[0]
-    u[2]=3+4*x[2]+2*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=72
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-72)+32*x[2]-72*x[1]+48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[2]-7*x[1]+2*x[0]
-    u[1]=(-8)+x[2]+x[1]+4*x[0]
-    u[2]=1-7*x[2]-7*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=21
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(3-21*x[2]-21*x[1]+3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]+3*x[1]+x[0]
-    u[1]=(-2)-7*x[2]-1*x[1]+6*x[0]
-    u[2]=(-7)-8*x[2]-8*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-12)-12*x[2]+18*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]-8*x[1]+3*x[0]
-    u[1]=6-3*x[2]-3*x[1]-1*x[0]
-    u[2]=(-2)-3*x[2]+7*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(18-9*x[2]-9*x[1]-3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[2]+3*x[1]+2*x[0]
-    u[1]=(-2)+8*x[2]+6*x[1]+x[0]
-    u[2]=(-6)-7*x[2]-3*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=49
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-42)-49*x[2]-21*x[1]-14*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]-9*x[1]-9*x[0]
-    u[1]=(-9)+7*x[2]+5*x[1]-7*x[0]
-    u[2]=(-4)-1*x[2]+x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-72)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]+6*x[1]+7*x[0]
-    u[1]=(-1)+8*x[2]+6*x[1]-7*x[0]
-    u[2]=6-2*x[2]+2*x[1]+3*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,0,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[2]+4*x[1]+6*x[0]
-    u[1]=4+7*x[2]-5*x[1]-3*x[0]
-    u[2]=(-8)-4*x[2]-8*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,0,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=15
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+4*x[2]-6*x[1]+8*x[0]
-    u[1]=(-4)-4*x[2]-4*x[1]+2*x[0]
-    u[2]=1+7*x[2]+2*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[2]+3*x[1]-3*x[0]
-    u[1]=(-1)+3*x[2]-5*x[1]+x[0]
-    u[2]=(-4)-2*x[2]+8*x[1]+x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[2]-7*x[1]+5*x[0]
-    u[1]=(-1)-7*x[2]+6*x[1]+8*x[0]
-    u[2]=(-2)-3*x[2]+4*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,1,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]-5*x[1]+2*x[0]
-    u[1]=(-2)+6*x[2]-8*x[1]-2*x[0]
-    u[2]=(-4)+7*x[2]-3*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]-9*x[1]-2*x[0]
-    u[1]=(-8)-6*x[2]+6*x[1]-7*x[0]
-    u[2]=7+7*x[2]+8*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=64
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[2]-3*x[1]+6*x[0]
-    u[1]=(-5)+4*x[2]+3*x[1]+7*x[0]
-    u[2]=(-9)+8*x[2]-2*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]-4*x[1]+5*x[0]
-    u[1]=(-6)-3*x[2]+4*x[1]-6*x[0]
-    u[2]=6-1*x[2]+7*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[2]+2*x[1]-4*x[0]
-    u[1]=4-4*x[2]-1*x[1]-2*x[0]
-    u[2]=4+8*x[2]-9*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]-8*x[1]+5*x[0]
-    u[1]=1-6*x[2]-9*x[1]-4*x[0]
-    u[2]=6+7*x[2]+x[1]-8*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[2]+8*x[1]+5*x[0]
-    u[1]=3-2*x[2]+3*x[1]-5*x[0]
-    u[2]=(-8)-2*x[2]-9*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]+7*x[1]-9*x[0]
-    u[1]=7-8*x[2]+6*x[1]-8*x[0]
-    u[2]=(-3)-4*x[2]-4*x[1]+x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[2]+5*x[1]+8*x[0]
-    u[1]=(-3)+x[2]+3*x[1]-8*x[0]
-    u[2]=(-1)-6*x[2]-6*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[2]+x[1]-9*x[0]
-    u[1]=(-8)-5*x[2]+3*x[1]-9*x[0]
-    u[2]=(-6)-8*x[2]-4*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[2]-2*x[1]+5*x[0]
-    u[1]=3+2*x[2]-4*x[1]+4*x[0]
-    u[2]=(-1)-8*x[2]+8*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[2]+3*x[1]+6*x[0]
-    u[1]=(-3)-6*x[2]-2*x[1]+8*x[0]
-    u[2]=(-1)+5*x[2]-5*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[2]-6*x[1]-9*x[0]
-    u[1]=1+7*x[2]+4*x[1]-3*x[0]
-    u[2]=6+7*x[2]-5*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[2]-4*x[1]-9*x[0]
-    u[1]=(-4)-8*x[2]+6*x[1]+4*x[0]
-    u[2]=2+6*x[2]+2*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[2]-8*x[1]+8*x[0]
-    u[1]=1-1*x[2]-8*x[1]+6*x[0]
-    u[2]=(-8)+2*x[2]+x[1]+3*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[2]-7*x[1]+x[0]
-    u[1]=(-3)+6*x[2]+4*x[1]-6*x[0]
-    u[2]=4+8*x[2]-8*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]+6*x[1]-2*x[0]
-    u[1]=(-8)+2*x[2]-4*x[1]-5*x[0]
-    u[2]=8+6*x[2]-8*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,1,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[2]-9*x[1]-6*x[0]
-    u[1]=(-5)-7*x[2]+2*x[1]+5*x[0]
-    u[2]=6+x[2]-5*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-49)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]-4*x[1]+6*x[0]
-    u[1]=(-1)-9*x[2]+4*x[1]-3*x[0]
-    u[2]=(-7)+6*x[2]+2*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[2]+7*x[1]-3*x[0]
-    u[1]=(-2)-6*x[2]-2*x[1]+3*x[0]
-    u[2]=1-8*x[2]+4*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,2,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Const_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[2]+8*x[1]+6*x[0]
-    u[1]=6+7*x[2]-2*x[1]+8*x[0]
-    u[2]=(-9)+5*x[2]-1*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-2*x[1]+4*x[0]
-    u[1]=1-8*x[2]-4*x[1]-7*x[0]
-    u[2]=(-3)-6*x[2]-8*x[1]-7*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)+21*x[2]-6*x[1]+12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[2]+6*x[1]-9*x[0]
-    u[1]=4-1*x[2]-4*x[1]-3*x[0]
-    u[2]=(-5)+2*x[2]+3*x[1]+6*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=24-6*x[2]-24*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]-6*x[1]+2*x[0]
-    u[1]=(-7)+7*x[2]+6*x[1]-8*x[0]
-    u[2]=(-9)-6*x[2]+7*x[1]-9*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-18)-12*x[2]+14*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[2]+7*x[1]-7*x[0]
-    u[1]=3+x[2]-5*x[1]+x[0]
-    u[2]=(-3)+7*x[2]-1*x[1]+7*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-49)-35*x[2]+49*x[1]-49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[2]-4*x[1]-2*x[0]
-    u[1]=(-9)-3*x[2]-9*x[1]+2*x[0]
-    u[2]=4-3*x[2]+2*x[1]-3*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)-3*x[2]-9*x[1]+2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]-2*x[1]+7*x[0]
-    u[1]=(-2)+8*x[2]+3*x[1]-6*x[0]
-    u[2]=6-7*x[2]+8*x[1]+5*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=30-35*x[2]+40*x[1]+25*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]+7*x[1]+2*x[0]
-    u[1]=(-4)+3*x[2]+x[1]+2*x[0]
-    u[2]=3-5*x[2]+3*x[1]-4*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=16+40*x[2]+56*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[2]-8*x[1]+7*x[0]
-    u[1]=(-8)+5*x[2]-5*x[1]+x[0]
-    u[2]=(-3)+6*x[2]-9*x[1]-8*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-64)+40*x[2]-40*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[2]+8*x[1]+2*x[0]
-    u[1]=(-1)-2*x[2]-8*x[1]-2*x[0]
-    u[2]=7-9*x[2]+2*x[1]+4*x[0]
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7-9*x[2]+2*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[2]-1*x[1]-7*x[0]
-    u[1]=(-6)+4*x[2]+5*x[1]+x[0]
-    u[2]=(-6)+4*x[2]-2*x[1]-4*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,0]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-16)-2*x[2]-2*x[1]-14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[2]+x[1]+8*x[0]
-    u[1]=5-5*x[2]-2*x[1]+7*x[0]
-    u[2]=(-3)-5*x[2]+4*x[1]-4*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,1]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=30-30*x[2]-12*x[1]+42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]-7*x[1]+7*x[0]
-    u[1]=(-4)+8*x[2]+6*x[1]-6*x[0]
-    u[2]=(-9)-3*x[2]-3*x[1]-6*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,2]=5
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-45)-15*x[2]-15*x[1]-30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[2]+5*x[1]-3*x[0]
-    u[1]=4-1*x[2]-1*x[1]+3*x[0]
-    u[2]=4-5*x[2]-3*x[1]+3*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,0]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=24+8*x[2]+20*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[2]-4*x[1]+8*x[0]
-    u[1]=8-4*x[2]+3*x[1]+x[0]
-    u[2]=3-9*x[2]+4*x[1]+8*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,1]=5
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=40-20*x[2]+15*x[1]+5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[2]-2*x[1]+2*x[0]
-    u[1]=(-4)+6*x[2]+4*x[1]+4*x[0]
-    u[2]=(-8)-4*x[2]-3*x[1]-9*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,2]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-48)-24*x[2]-18*x[1]-54*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]-2*x[1]+5*x[0]
-    u[1]=3+8*x[2]+5*x[1]-4*x[0]
-    u[2]=(-4)-9*x[2]-3*x[1]-1*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,0]=6
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-48)+12*x[2]-12*x[1]+30*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[2]-2*x[1]+6*x[0]
-    u[1]=(-3)-5*x[2]+8*x[1]+7*x[0]
-    u[2]=(-5)+5*x[2]+6*x[1]-4*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,1]=3
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-9)-15*x[2]+24*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[2]+4*x[1]+2*x[0]
-    u[1]=(-6)-9*x[2]-9*x[1]-7*x[0]
-    u[2]=5+7*x[2]+8*x[1]-4*x[0]
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,2]=4
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=20+28*x[2]+32*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[2]-5*x[1]+x[0]
-    u[1]=(-2)+6*x[2]-9*x[1]+7*x[0]
-    u[2]=(-7)-3*x[2]-2*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]+7*x[1]+5*x[0]
-    u[1]=8-2*x[2]-7*x[1]-4*x[0]
-    u[2]=7+5*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[2]-8*x[1]-3*x[0]
-    u[1]=(-6)+3*x[2]-6*x[1]+x[0]
-    u[2]=6+4*x[2]+2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]+3*x[1]-4*x[0]
-    u[1]=(-8)-6*x[2]-2*x[1]+2*x[0]
-    u[2]=5-2*x[2]+3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[2]-5*x[1]-2*x[0]
-    u[1]=(-2)-9*x[2]-8*x[1]+6*x[0]
-    u[2]=(-7)+5*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[2]+2*x[1]-6*x[0]
-    u[1]=(-8)+4*x[2]-1*x[1]-3*x[0]
-    u[2]=(-5)-2*x[2]-2*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[2]-8*x[1]+2*x[0]
-    u[1]=(-4)+4*x[2]-9*x[1]-1*x[0]
-    u[2]=(-6)-5*x[2]-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[2]+8*x[1]-8*x[0]
-    u[1]=5+4*x[2]+x[1]-9*x[0]
-    u[2]=6-5*x[2]+6*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]-6*x[1]+6*x[0]
-    u[1]=(-1)+x[2]+8*x[1]-1*x[0]
-    u[2]=(-1)-2*x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[2]+2*x[1]-9*x[0]
-    u[1]=6-6*x[2]+7*x[1]-6*x[0]
-    u[2]=(-6)+6*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[2]-9*x[1]-9*x[0]
-    u[1]=(-8)-8*x[2]-9*x[1]-5*x[0]
-    u[2]=(-5)-5*x[2]+x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[2]-2*x[1]+8*x[0]
-    u[1]=6+8*x[2]+6*x[1]+x[0]
-    u[2]=4+5*x[2]+8*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[2]+5*x[1]+3*x[0]
-    u[1]=(-3)+6*x[2]-9*x[1]-9*x[0]
-    u[2]=(-1)-6*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+x[1]-8*x[0]
-    u[1]=(-7)+3*x[2]+6*x[1]-1*x[0]
-    u[2]=(-8)+8*x[2]+x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]+6*x[1]+7*x[0]
-    u[1]=(-4)+6*x[2]+3*x[1]+2*x[0]
-    u[2]=1+2*x[2]-7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[2]-8*x[1]-3*x[0]
-    u[1]=(-8)+3*x[2]+x[1]-4*x[0]
-    u[2]=7-2*x[2]-9*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[2]+5*x[1]-7*x[0]
-    u[1]=7-6*x[2]+8*x[1]-7*x[0]
-    u[2]=(-4)+x[2]+4*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]-5*x[1]-2*x[0]
-    u[1]=(-4)+x[2]-6*x[1]-9*x[0]
-    u[2]=2-9*x[2]+6*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[2]+6*x[1]+x[0]
-    u[1]=(-4)+4*x[2]-6*x[1]+7*x[0]
-    u[2]=4-7*x[2]-1*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[2]+x[1]+6*x[0]
-    u[1]=4-5*x[2]-4*x[1]-5*x[0]
-    u[2]=3+2*x[2]+5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[2]+7*x[1]+2*x[0]
-    u[1]=2+8*x[2]+6*x[1]+3*x[0]
-    u[2]=1+x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[2]+x[1]-9*x[0]
-    u[1]=(-8)-2*x[2]-2*x[1]+2*x[0]
-    u[2]=(-1)-9*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[2]-8*x[1]-1*x[0]
-    u[1]=(-5)+3*x[2]-6*x[1]+8*x[0]
-    u[2]=(-9)+4*x[2]+6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[2]-2*x[1]+3*x[0]
-    u[1]=(-4)-3*x[2]-5*x[1]+2*x[0]
-    u[2]=3-6*x[2]+7*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-3)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[2]-6*x[1]-7*x[0]
-    u[1]=(-1)-9*x[2]+x[1]+3*x[0]
-    u[2]=7-4*x[2]-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-8)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[2]+4*x[1]+5*x[0]
-    u[1]=4-6*x[2]-7*x[1]-2*x[0]
-    u[2]=(-2)-8*x[2]-9*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]-4*x[1]+8*x[0]
-    u[1]=5-4*x[2]+5*x[1]+8*x[0]
-    u[2]=(-5)+6*x[2]+4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(6*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[2]-1*x[1]+2*x[0]
-    u[1]=(-5)-5*x[2]+8*x[1]+6*x[0]
-    u[2]=(-5)+7*x[2]-4*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[2]-1*x[1]+4*x[0]
-    u[1]=(-3)+5*x[2]+5*x[1]-7*x[0]
-    u[2]=4-3*x[2]+7*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]+7*x[1]+4*x[0]
-    u[1]=6+2*x[2]-6*x[1]+7*x[0]
-    u[2]=(-9)-6*x[2]+2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]-6*x[1]+x[0]
-    u[1]=4-9*x[2]-2*x[1]-8*x[0]
-    u[2]=(-4)+6*x[2]+7*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-1*x[2]-6*x[1]-3*x[0]
-    u[1]=(-8)+7*x[2]-5*x[1]+4*x[0]
-    u[2]=(-5)-2*x[2]-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[2]-7*x[1]+x[0]
-    u[1]=(-3)+6*x[2]+7*x[1]+7*x[0]
-    u[2]=6-4*x[2]-8*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]+5*x[1]+7*x[0]
-    u[1]=4-7*x[2]+x[1]+2*x[0]
-    u[2]=6+x[2]-1*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+x[2]-5*x[1]+8*x[0]
-    u[1]=8-4*x[2]+7*x[1]+7*x[0]
-    u[2]=(-8)-4*x[2]-4*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+3*x[2]+7*x[1]+x[0]
-    u[1]=(-1)-9*x[2]+2*x[1]-2*x[0]
-    u[2]=4-8*x[2]+3*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[2]+8*x[1]+5*x[0]
-    u[1]=1+7*x[2]-1*x[1]+x[0]
-    u[2]=(-6)+2*x[2]+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[2]-1*x[1]-1*x[0]
-    u[1]=(-8)+4*x[2]+3*x[1]-4*x[0]
-    u[2]=(-3)+6*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-8*x[1]+8*x[0]
-    u[1]=(-6)-7*x[2]-2*x[1]-9*x[0]
-    u[2]=(-7)+7*x[2]+6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[2]-3*x[1]+4*x[0]
-    u[1]=(-5)+6*x[2]+x[1]+8*x[0]
-    u[2]=2+4*x[2]-1*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]-6*x[1]-8*x[0]
-    u[1]=(-2)+3*x[2]-1*x[1]-4*x[0]
-    u[2]=(-2)+7*x[2]-7*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[2]-6*x[1]+2*x[0]
-    u[1]=(-4)-1*x[2]+6*x[1]-7*x[0]
-    u[2]=6-3*x[2]+5*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[2]+x[1]-5*x[0]
-    u[1]=(-2)-8*x[2]+2*x[1]+x[0]
-    u[2]=3+x[2]+x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[2]+x[1]+4*x[0]
-    u[1]=(-6)-4*x[2]+8*x[1]+4*x[0]
-    u[2]=(-7)+4*x[2]-9*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[2]-6*x[1]+x[0]
-    u[1]=2-1*x[2]-1*x[1]+7*x[0]
-    u[2]=3-5*x[2]-5*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[2]+x[1]-9*x[0]
-    u[1]=(-5)-6*x[2]+7*x[1]+4*x[0]
-    u[2]=1+5*x[2]-2*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[2]+4*x[1]+4*x[0]
-    u[1]=2+2*x[2]+3*x[1]+3*x[0]
-    u[2]=(-4)-9*x[2]+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]-7*x[1]+5*x[0]
-    u[1]=7+5*x[2]+8*x[1]-8*x[0]
-    u[2]=(-6)+6*x[2]+7*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-6*x[1]-4*x[0]
-    u[1]=(-3)+6*x[2]+3*x[1]-4*x[0]
-    u[2]=(-2)-2*x[2]-3*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]-3*x[1]-3*x[0]
-    u[1]=7+2*x[2]-7*x[1]-4*x[0]
-    u[2]=(-9)+5*x[2]+4*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-7)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+4*x[1]-5*x[0]
-    u[1]=(-3)-5*x[2]-8*x[1]+2*x[0]
-    u[2]=(-8)-7*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[2]+2*x[1]-3*x[0]
-    u[1]=(-4)+7*x[2]-3*x[1]-9*x[0]
-    u[2]=(-3)+3*x[2]+x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-3)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[2]+5*x[1]+5*x[0]
-    u[1]=(-8)-7*x[2]+2*x[1]-1*x[0]
-    u[2]=(-5)+8*x[2]-6*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[2]+6*x[1]+3*x[0]
-    u[1]=(-1)-4*x[2]-9*x[1]+x[0]
-    u[2]=1+8*x[2]-6*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(8*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]-5*x[1]-6*x[0]
-    u[1]=1-7*x[2]+7*x[1]+4*x[0]
-    u[2]=(-9)-5*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[2]-7*x[1]-1*x[0]
-    u[1]=(-3)-9*x[2]-8*x[1]-1*x[0]
-    u[2]=(-4)+5*x[2]-8*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[2]+7*x[1]-5*x[0]
-    u[1]=3-1*x[2]-8*x[1]-8*x[0]
-    u[2]=(-2)-3*x[2]+8*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[2]-9*x[1]+4*x[0]
-    u[1]=(-2)-8*x[2]-8*x[1]+6*x[0]
-    u[2]=(-3)+3*x[2]-2*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-8*x[2]+8*x[1]-9*x[0]
-    u[1]=6-1*x[2]+2*x[1]-3*x[0]
-    u[2]=7+3*x[2]-2*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[2]-5*x[1]-8*x[0]
-    u[1]=(-5)+5*x[2]-3*x[1]-4*x[0]
-    u[2]=(-7)+5*x[2]-7*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[2]+7*x[1]-7*x[0]
-    u[1]=3+2*x[2]+x[1]-8*x[0]
-    u[2]=(-2)+7*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[2]+2*x[1]+6*x[0]
-    u[1]=(-5)-2*x[2]-8*x[1]-3*x[0]
-    u[2]=(-8)+3*x[2]-5*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]+3*x[1]+5*x[0]
-    u[1]=(-2)-6*x[2]-6*x[1]-2*x[0]
-    u[2]=(-7)+7*x[2]-5*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+x[2]+2*x[1]-4*x[0]
-    u[1]=(-7)+7*x[2]-7*x[1]-6*x[0]
-    u[2]=(-4)-4*x[2]-5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[2]+5*x[1]-5*x[0]
-    u[1]=6-3*x[2]+6*x[1]+6*x[0]
-    u[2]=7-3*x[2]+6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[2]+4*x[1]+4*x[0]
-    u[1]=(-9)+8*x[2]-6*x[1]-1*x[0]
-    u[2]=2-2*x[2]-2*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]+x[1]+4*x[0]
-    u[1]=4-3*x[2]-4*x[1]+7*x[0]
-    u[2]=(-3)-9*x[2]-2*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[2]+7*x[1]+8*x[0]
-    u[1]=(-7)+4*x[2]+4*x[1]-7*x[0]
-    u[2]=(-7)-8*x[2]+3*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[2]-7*x[1]-9*x[0]
-    u[1]=(-4)+x[2]-7*x[1]-8*x[0]
-    u[2]=(-2)+x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[2]-9*x[1]-9*x[0]
-    u[1]=(-1)-3*x[2]-8*x[1]-6*x[0]
-    u[2]=1-5*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[2]+x[1]-2*x[0]
-    u[1]=1+3*x[2]-3*x[1]-6*x[0]
-    u[2]=3+4*x[2]-3*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-3)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[2]-2*x[1]-3*x[0]
-    u[1]=7+3*x[2]-5*x[1]+x[0]
-    u[2]=7+7*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[2]-7*x[1]-2*x[0]
-    u[1]=(-1)-8*x[2]-9*x[1]+2*x[0]
-    u[2]=8-4*x[2]+x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-2)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[2]-4*x[1]-7*x[0]
-    u[1]=(-6)+4*x[2]+5*x[1]-1*x[0]
-    u[2]=1-9*x[2]-7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[2]+2*x[1]-9*x[0]
-    u[1]=(-5)-2*x[2]-7*x[1]+7*x[0]
-    u[2]=(-8)+3*x[2]+6*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-8)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+x[2]+2*x[1]+2*x[0]
-    u[1]=(-2)-2*x[2]+5*x[1]-9*x[0]
-    u[2]=(-7)+4*x[2]+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[2]+2*x[1]+4*x[0]
-    u[1]=(-5)-5*x[2]+8*x[1]+4*x[0]
-    u[2]=(-4)+5*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(8*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]-2*x[1]-9*x[0]
-    u[1]=(-3)+7*x[2]-9*x[1]-4*x[0]
-    u[2]=(-6)+4*x[2]-4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[2]-8*x[1]-5*x[0]
-    u[1]=(-4)-5*x[2]-6*x[1]+6*x[0]
-    u[2]=(-8)-3*x[2]-5*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]-4*x[1]-3*x[0]
-    u[1]=5+8*x[2]-5*x[1]+7*x[0]
-    u[2]=4-8*x[2]-5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeStrong_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[2]+5*x[1]+7*x[0]
-    u[1]=1+8*x[2]-3*x[1]+3*x[0]
-    u[2]=8-9*x[2]+3*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-9*x[1]-2*x[0]
-    u[1]=6+6*x[2]-2*x[1]+6*x[0]
-    u[2]=6-8*x[2]-8*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8+8*x[2]+9*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0]-8*x[0]*x[2]-9*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[2]+x[1]+8*x[0]
-    u[1]=5-7*x[2]+x[1]+7*x[0]
-    u[2]=(-6)-1*x[2]+8*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)+7*x[2]-1*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(5*x[0]-7*x[0]*x[2]+x[0]*x[1]+7*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[2]-3*x[1]+3*x[0]
-    u[1]=(-7)-7*x[2]+6*x[1]+4*x[0]
-    u[2]=(-8)-3*x[2]-5*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8+3*x[2]+5*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0]-3*x[0]*x[2]-5*x[0]*x[1]+7*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[2]-8*x[1]+7*x[0]
-    u[1]=(-9)-8*x[2]-3*x[1]+6*x[0]
-    u[2]=(-5)-2*x[2]-4*x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5+7*x[2]+16*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-5)*x[1]-7*x[1]*x[2]-8*x[1]**2+7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]+4*x[1]+2*x[0]
-    u[1]=3+x[2]-6*x[1]+6*x[0]
-    u[2]=1-9*x[2]-3*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)-1*x[2]+12*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1]+x[1]*x[2]-6*x[1]**2+6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[2]-2*x[1]-5*x[0]
-    u[1]=2-3*x[2]-7*x[1]-5*x[0]
-    u[2]=2-5*x[2]+3*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)+5*x[2]-6*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(2*x[1]-5*x[1]*x[2]+3*x[1]**2-6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[2]+3*x[1]+7*x[0]
-    u[1]=(-1)-4*x[2]+8*x[1]+2*x[0]
-    u[2]=3+x[2]-6*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)-14*x[2]-3*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(3*x[2]+7*x[2]**2+3*x[1]*x[2]+7*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[2]+2*x[1]+x[0]
-    u[1]=(-6)-1*x[2]-4*x[1]+8*x[0]
-    u[2]=(-2)+6*x[2]-6*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6+2*x[2]+4*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6)*x[2]-1*x[2]**2-4*x[1]*x[2]+8*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[2]+6*x[1]+6*x[0]
-    u[1]=7-2*x[2]+2*x[1]+x[0]
-    u[2]=5-4*x[2]-3*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)+8*x[2]+3*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(5*x[2]-4*x[2]**2-3*x[1]*x[2]-5*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[2]-8*x[1]-5*x[0]
-    u[1]=4+6*x[2]+5*x[1]+8*x[0]
-    u[2]=7+7*x[2]-7*x[1]+5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)+6*x[2]+8*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2*x[0]-6*x[0]*x[2]-8*x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]-7*x[1]+x[0]
-    u[1]=8-3*x[2]+8*x[1]+5*x[0]
-    u[2]=7-7*x[2]-3*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)+3*x[2]-8*x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8*x[0]-3*x[0]*x[2]+8*x[0]*x[1]+5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]-3*x[1]-9*x[0]
-    u[1]=(-2)-1*x[2]-9*x[1]-5*x[0]
-    u[2]=(-2)-6*x[2]+7*x[1]-4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2+6*x[2]-7*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0]-6*x[0]*x[2]+7*x[0]*x[1]-4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]+4*x[1]+2*x[0]
-    u[1]=(-6)-3*x[2]-8*x[1]-9*x[0]
-    u[2]=4+x[2]-4*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1+2*x[2]-8*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1]-2*x[1]*x[2]+4*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[2]+x[1]+x[0]
-    u[1]=(-3)-2*x[2]+8*x[1]-4*x[0]
-    u[2]=7-8*x[2]+4*x[1]+8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3+2*x[2]-16*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3)*x[1]-2*x[1]*x[2]+8*x[1]**2-4*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[2]-5*x[1]+3*x[0]
-    u[1]=1+6*x[2]+2*x[1]+4*x[0]
-    u[2]=(-7)+7*x[2]+8*x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7-7*x[2]-16*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1]+7*x[1]*x[2]+8*x[1]**2+2*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-8*x[2]-7*x[1]-2*x[0]
-    u[1]=2-9*x[2]+2*x[1]-7*x[0]
-    u[2]=(-4)-6*x[2]-6*x[1]+8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5+16*x[2]+7*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-5)*x[2]-8*x[2]**2-7*x[1]*x[2]-2*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]+8*x[1]-1*x[0]
-    u[1]=6+3*x[2]-1*x[1]-9*x[0]
-    u[2]=7-5*x[2]+x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)-6*x[2]+x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(6*x[2]+3*x[2]**2-1*x[1]*x[2]-9*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]+6*x[1]+2*x[0]
-    u[1]=2-8*x[2]-2*x[1]+7*x[0]
-    u[2]=2+6*x[2]-6*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-12*x[2]+6*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(2*x[2]+6*x[2]**2-6*x[1]*x[2]-9*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[2]+x[1]+3*x[0]
-    u[1]=(-5)-1*x[2]+7*x[1]+x[0]
-    u[2]=6+6*x[2]+4*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1+x[2]-1*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0]-1*x[0]*x[2]+x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[2]-8*x[1]+5*x[0]
-    u[1]=3+6*x[2]+4*x[1]+6*x[0]
-    u[2]=(-2)-6*x[2]-6*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)-6*x[2]-4*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(3*x[0]+6*x[0]*x[2]+4*x[0]*x[1]+6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]-6*x[1]-4*x[0]
-    u[1]=8-2*x[2]-8*x[1]+5*x[0]
-    u[2]=(-5)-6*x[2]-9*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5+6*x[2]+9*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0]-6*x[0]*x[2]-9*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[2]+2*x[1]-8*x[0]
-    u[1]=(-8)+6*x[2]-8*x[1]-3*x[0]
-    u[2]=8-5*x[2]-7*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)+4*x[2]-4*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1]-4*x[1]*x[2]+2*x[1]**2-8*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[2]-3*x[1]+2*x[0]
-    u[1]=(-6)-8*x[2]-9*x[1]+7*x[0]
-    u[2]=(-7)+8*x[2]-2*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6+8*x[2]+18*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-6)*x[1]-8*x[1]*x[2]-9*x[1]**2+7*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]-8*x[1]+7*x[0]
-    u[1]=(-7)-1*x[2]-7*x[1]-1*x[0]
-    u[2]=7+6*x[2]-9*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)-6*x[2]+18*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1]+6*x[1]*x[2]-9*x[1]**2+6*x[0]*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+4*x[2]-1*x[1]+8*x[0]
-    u[1]=(-7)-4*x[2]+7*x[1]+x[0]
-    u[2]=(-3)-6*x[2]-2*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4-8*x[2]+x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-4)*x[2]+4*x[2]**2-1*x[1]*x[2]+8*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+3*x[1]+3*x[0]
-    u[1]=(-9)-8*x[2]-1*x[1]+2*x[0]
-    u[2]=(-6)+3*x[2]+7*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9+16*x[2]+x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-9)*x[2]-8*x[2]**2-1*x[1]*x[2]+2*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[2]-9*x[1]+5*x[0]
-    u[1]=(-3)-9*x[2]+4*x[1]-6*x[0]
-    u[2]=(-7)-4*x[2]-7*x[1]-9*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7+8*x[2]+7*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-7)*x[2]-4*x[2]**2-7*x[1]*x[2]-9*x[0]*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[2]+7*x[1]-8*x[0]
-    u[1]=(-6)+7*x[2]-1*x[1]-6*x[0]
-    u[2]=8+4*x[2]+8*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[2]+4*x[1]-3*x[0]
-    u[1]=2-2*x[2]-3*x[1]+8*x[0]
-    u[2]=(-5)-8*x[2]+3*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]-1*x[1]+2*x[0]
-    u[1]=(-9)-9*x[2]+7*x[1]-9*x[0]
-    u[2]=(-2)+4*x[2]-2*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[2]+x[1]-9*x[0]
-    u[1]=5-6*x[2]+5*x[1]-7*x[0]
-    u[2]=5+7*x[2]-7*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]-6*x[1]+2*x[0]
-    u[1]=(-3)+4*x[2]-2*x[1]-7*x[0]
-    u[2]=(-3)-1*x[2]-1*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[2]-7*x[1]-6*x[0]
-    u[1]=(-3)-9*x[2]-1*x[1]-6*x[0]
-    u[2]=6-4*x[2]+5*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[2]+4*x[1]-5*x[0]
-    u[1]=(-3)+2*x[2]-5*x[1]+8*x[0]
-    u[2]=2+5*x[2]-2*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-2*x[1]+3*x[0]
-    u[1]=(-3)+7*x[2]-8*x[1]-8*x[0]
-    u[2]=(-1)-5*x[2]-8*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[2]-6*x[1]+2*x[0]
-    u[1]=5+x[2]-1*x[1]+8*x[0]
-    u[2]=4-7*x[2]+x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[0,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]-2*x[1]-8*x[0]
-    u[1]=8+3*x[2]+4*x[1]+2*x[0]
-    u[2]=1+2*x[2]-5*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[2]+8*x[1]+8*x[0]
-    u[1]=3+2*x[2]-3*x[1]+x[0]
-    u[2]=(-6)+3*x[2]+8*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[2]-3*x[1]-4*x[0]
-    u[1]=(-2)-9*x[2]+6*x[1]-3*x[0]
-    u[2]=(-7)-2*x[2]-2*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]+x[1]-4*x[0]
-    u[1]=2-7*x[2]-7*x[1]-1*x[0]
-    u[2]=3+7*x[2]-4*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[2]-7*x[1]+2*x[0]
-    u[1]=(-4)-9*x[2]+2*x[1]-9*x[0]
-    u[2]=8+3*x[2]+4*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[2]-9*x[1]+4*x[0]
-    u[1]=8-4*x[2]-1*x[1]-2*x[0]
-    u[2]=1+3*x[2]-4*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+4*x[2]+x[1]-2*x[0]
-    u[1]=(-7)+7*x[2]+3*x[1]+7*x[0]
-    u[2]=(-4)-1*x[2]+6*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[2]-3*x[1]+8*x[0]
-    u[1]=(-8)+2*x[2]-6*x[1]+3*x[0]
-    u[2]=(-8)+x[2]+4*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]+2*x[1]-6*x[0]
-    u[1]=(-6)-8*x[2]+4*x[1]+3*x[0]
-    u[2]=1-5*x[2]-9*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[1,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]+6*x[1]-5*x[0]
-    u[1]=7-8*x[2]-1*x[1]-3*x[0]
-    u[2]=6-3*x[2]-6*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]+7*x[1]+6*x[0]
-    u[1]=(-7)-6*x[2]-8*x[1]-1*x[0]
-    u[2]=5-4*x[2]-5*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[2]+8*x[1]+x[0]
-    u[1]=1-2*x[2]+6*x[1]+6*x[0]
-    u[2]=5+7*x[2]-6*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[2]+6*x[1]-5*x[0]
-    u[1]=(-1)-3*x[2]-1*x[1]-6*x[0]
-    u[2]=(-6)-6*x[2]-7*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+x[2]-4*x[1]-5*x[0]
-    u[1]=8-6*x[2]+5*x[1]-2*x[0]
-    u[2]=(-2)-9*x[2]+6*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-1*x[1]-8*x[0]
-    u[1]=(-5)-1*x[2]+7*x[1]+x[0]
-    u[2]=(-1)-2*x[2]+7*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]+8*x[1]-4*x[0]
-    u[1]=6-7*x[2]-4*x[1]-2*x[0]
-    u[2]=(-2)-1*x[2]-4*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]-2*x[1]+3*x[0]
-    u[1]=7+x[2]-6*x[1]-3*x[0]
-    u[2]=(-2)+8*x[2]+2*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_C_Vario_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-4*x[2]-3*x[1]+x[0]
-    u[1]=(-5)+6*x[2]+2*x[1]+x[0]
-    u[2]=(-4)-4*x[2]-8*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,3),Function(self.domain))
-    C_test[2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C=C_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-1)
-    u[2]=2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=7
-    u[2]=1
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=5
-    u[2]=(-7)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-8)
-    u[2]=3
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-6)
-    u[2]=(-2)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=8
-    u[2]=(-3)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=5
-    u[2]=2
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=8
-    u[2]=1
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_D_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-6)
-    u[2]=(-3)
-    D_test=Data(0.,(3,3),Function(self.domain))
-    D_test[2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D=D_test, Y=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-9)
-    u[2]=(-9)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-6)
-    u[2]=2
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=6
-    u[2]=4
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[0,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-5)
-    u[2]=(-5)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=5
-    u[2]=(-8)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-8)
-    u[2]=(-3)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[1,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-9)
-    u[2]=(-5)
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-3)
-    u[2]=4
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-3)
-    u[2]=3
-    d_test=Data(0.,(3,3),FunctionOnBoundary(self.domain))
-    d_test[2,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d=d_test, y=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]+7*x[1]+5*x[0]
-    u[1]=(-4)-3*x[2]-1*x[1]+3*x[0]
-    u[2]=(-9)+6*x[2]+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[2]+6*x[1]+8*x[0]
-    u[1]=4+4*x[2]+3*x[1]-1*x[0]
-    u[2]=3+4*x[2]+8*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[2]-2*x[1]-8*x[0]
-    u[1]=(-6)+7*x[2]+4*x[1]-1*x[0]
-    u[2]=7+8*x[2]-1*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,2]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]+4*x[1]+7*x[0]
-    u[1]=(-6)+3*x[2]-1*x[1]+2*x[0]
-    u[2]=(-3)+x[2]-3*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[2]+x[1]-8*x[0]
-    u[1]=5-5*x[2]+7*x[1]-2*x[0]
-    u[2]=(-4)-5*x[2]+7*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=49
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[2]-2*x[1]-3*x[0]
-    u[1]=(-3)+8*x[2]+2*x[1]+x[0]
-    u[2]=1+2*x[2]+5*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]-8*x[1]-9*x[0]
-    u[1]=(-1)-9*x[2]+2*x[1]-5*x[0]
-    u[2]=3+5*x[2]+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]+3*x[1]+3*x[0]
-    u[1]=(-2)+4*x[2]-6*x[1]-4*x[0]
-    u[2]=2+2*x[2]-5*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]-1*x[1]-6*x[0]
-    u[1]=7-8*x[2]-4*x[1]+4*x[0]
-    u[2]=3+7*x[2]-9*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]+4*x[1]+3*x[0]
-    u[1]=2+7*x[2]+2*x[1]-8*x[0]
-    u[2]=(-3)+x[2]+4*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[2]+6*x[1]+x[0]
-    u[1]=2-2*x[2]+8*x[1]-1*x[0]
-    u[2]=5-8*x[2]-4*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]+x[1]-1*x[0]
-    u[1]=(-6)+x[2]+x[1]-7*x[0]
-    u[2]=(-3)+3*x[2]+5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,2]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[2]-7*x[1]+4*x[0]
-    u[1]=6+6*x[2]+5*x[1]-7*x[0]
-    u[2]=(-6)-7*x[2]+8*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,0]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]+5*x[1]-6*x[0]
-    u[1]=(-7)-7*x[2]+2*x[1]-2*x[0]
-    u[2]=5+2*x[2]+6*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[2]+3*x[1]-6*x[0]
-    u[1]=(-5)-2*x[2]+4*x[1]+6*x[0]
-    u[2]=4-2*x[2]-2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]-2*x[1]-9*x[0]
-    u[1]=(-3)+2*x[2]-9*x[1]-2*x[0]
-    u[2]=(-3)-9*x[2]+x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[2]-4*x[1]-8*x[0]
-    u[1]=5-1*x[2]-1*x[1]-9*x[0]
-    u[2]=(-7)+3*x[2]+3*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[2]-5*x[1]+2*x[0]
-    u[1]=(-2)+2*x[2]+4*x[1]-6*x[0]
-    u[2]=(-9)+2*x[2]+8*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-8*x[2]+2*x[1]-5*x[0]
-    u[1]=2-4*x[2]+2*x[1]-7*x[0]
-    u[2]=1+4*x[2]-8*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[2]-2*x[1]+8*x[0]
-    u[1]=8+2*x[2]+5*x[1]-6*x[0]
-    u[2]=(-9)+2*x[2]-5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[2]+5*x[1]+3*x[0]
-    u[1]=(-1)-2*x[2]-9*x[1]-4*x[0]
-    u[2]=3+2*x[2]+2*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[2]+8*x[1]-1*x[0]
-    u[1]=4+3*x[2]-3*x[1]+2*x[0]
-    u[2]=7+3*x[2]+x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]+x[1]-2*x[0]
-    u[1]=2-6*x[2]+2*x[1]-9*x[0]
-    u[2]=(-2)-6*x[2]+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]-5*x[1]-6*x[0]
-    u[1]=(-3)+6*x[2]-8*x[1]+3*x[0]
-    u[2]=6-7*x[2]+2*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[2]-9*x[1]+8*x[0]
-    u[1]=(-1)-4*x[2]-1*x[1]+x[0]
-    u[2]=8+x[2]-2*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[2]+8*x[1]-8*x[0]
-    u[1]=(-1)+7*x[2]+8*x[1]+8*x[0]
-    u[2]=6-6*x[2]-2*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[2]-8*x[1]+x[0]
-    u[1]=(-6)-9*x[2]-9*x[1]-7*x[0]
-    u[2]=7-6*x[2]-6*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]-6*x[1]+3*x[0]
-    u[1]=6-7*x[2]+8*x[1]+3*x[0]
-    u[2]=(-6)-5*x[2]-3*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[2]+4*x[1]-3*x[0]
-    u[1]=3-6*x[2]+4*x[1]-9*x[0]
-    u[2]=(-3)-7*x[2]+2*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[2]+6*x[1]-7*x[0]
-    u[1]=2-8*x[2]+7*x[1]+x[0]
-    u[2]=2-4*x[2]-1*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,2]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[2]+6*x[1]-6*x[0]
-    u[1]=7+x[2]+5*x[1]-2*x[0]
-    u[2]=2-5*x[2]-2*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]-8*x[1]-8*x[0]
-    u[1]=(-6)+2*x[2]-5*x[1]-9*x[0]
-    u[2]=(-5)+3*x[2]-2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[2]+7*x[1]+3*x[0]
-    u[1]=2+8*x[2]+4*x[1]+5*x[0]
-    u[2]=8+6*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[2]+2*x[1]-2*x[0]
-    u[1]=5+8*x[2]-9*x[1]+6*x[0]
-    u[2]=2+6*x[2]-4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[2]+3*x[1]+7*x[0]
-    u[1]=(-5)+3*x[2]+6*x[1]+7*x[0]
-    u[2]=(-4)-8*x[2]+3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[2]-3*x[1]+x[0]
-    u[1]=(-6)+6*x[2]+x[1]+8*x[0]
-    u[2]=5-5*x[2]-1*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[2]-6*x[1]+2*x[0]
-    u[1]=6-7*x[2]-5*x[1]+7*x[0]
-    u[2]=(-9)-3*x[2]+4*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]-8*x[1]-4*x[0]
-    u[1]=(-9)-1*x[2]+2*x[1]-4*x[0]
-    u[2]=7-8*x[2]+6*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[2]+x[1]+4*x[0]
-    u[1]=(-1)+7*x[2]-2*x[1]+2*x[0]
-    u[2]=(-3)+6*x[2]-3*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-6*x[2]-8*x[1]-3*x[0]
-    u[1]=8-6*x[2]+7*x[1]+6*x[0]
-    u[2]=6-7*x[2]-1*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=36
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[2]-1*x[1]+2*x[0]
-    u[1]=(-5)-4*x[2]-9*x[1]-9*x[0]
-    u[2]=2-1*x[2]-7*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]+x[1]-8*x[0]
-    u[1]=(-1)+4*x[2]-2*x[1]+3*x[0]
-    u[2]=8+4*x[2]+x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,2]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[2]-5*x[1]-4*x[0]
-    u[1]=(-6)+4*x[2]+6*x[1]-6*x[0]
-    u[2]=1+2*x[2]-9*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[2]+7*x[1]-9*x[0]
-    u[1]=1-1*x[2]+4*x[1]-4*x[0]
-    u[2]=(-4)-8*x[2]+8*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]+3*x[1]-7*x[0]
-    u[1]=(-1)-5*x[2]-5*x[1]+7*x[0]
-    u[2]=(-9)+4*x[2]+6*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,2]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[2]-5*x[1]-5*x[0]
-    u[1]=3+2*x[2]+x[1]-6*x[0]
-    u[2]=5-3*x[2]-2*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[2]-2*x[1]-2*x[0]
-    u[1]=5-2*x[2]-6*x[1]+6*x[0]
-    u[2]=7-6*x[2]+5*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[2]+7*x[1]+7*x[0]
-    u[1]=(-1)-5*x[2]-1*x[1]-1*x[0]
-    u[2]=7-3*x[2]+6*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,2]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-5*x[1]+8*x[0]
-    u[1]=7-5*x[2]+3*x[1]-7*x[0]
-    u[2]=(-2)+6*x[2]-1*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[2]+8*x[1]-2*x[0]
-    u[1]=3+x[2]-4*x[1]+6*x[0]
-    u[2]=3+2*x[2]-5*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[2]+7*x[1]+6*x[0]
-    u[1]=8-9*x[2]+4*x[1]-4*x[0]
-    u[2]=(-1)-7*x[2]-2*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-8*x[2]-7*x[1]+2*x[0]
-    u[1]=4-6*x[2]-7*x[1]-4*x[0]
-    u[2]=6-3*x[2]-6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[2]+8*x[1]+8*x[0]
-    u[1]=7-6*x[2]+x[1]-3*x[0]
-    u[2]=(-8)+5*x[2]+5*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[2]+3*x[1]-1*x[0]
-    u[1]=(-4)+6*x[2]+6*x[1]+5*x[0]
-    u[2]=(-6)-9*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[2]-7*x[1]+4*x[0]
-    u[1]=1+7*x[2]-1*x[1]+6*x[0]
-    u[2]=(-2)+4*x[2]+3*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[2]-9*x[1]-9*x[0]
-    u[1]=3-5*x[2]+x[1]+3*x[0]
-    u[2]=3-2*x[2]+4*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[2]-6*x[1]-7*x[0]
-    u[1]=8+6*x[2]-5*x[1]-3*x[0]
-    u[2]=(-8)-7*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[2]+2*x[1]+4*x[0]
-    u[1]=7-9*x[2]-5*x[1]-7*x[0]
-    u[2]=(-3)-8*x[2]-9*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[2]+6*x[1]-4*x[0]
-    u[1]=4-6*x[2]+6*x[1]+3*x[0]
-    u[2]=(-2)-3*x[2]-6*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,1]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=30
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]+4*x[1]-2*x[0]
-    u[1]=(-2)+2*x[2]+6*x[1]+8*x[0]
-    u[2]=(-9)-9*x[2]+6*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]-7*x[1]-4*x[0]
-    u[1]=(-5)-5*x[2]-2*x[1]-5*x[0]
-    u[2]=(-4)+4*x[2]-9*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[2]-6*x[1]-5*x[0]
-    u[1]=(-6)+8*x[2]+5*x[1]+6*x[0]
-    u[2]=(-2)-9*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]-9*x[1]+6*x[0]
-    u[1]=(-1)+8*x[2]-1*x[1]+4*x[0]
-    u[2]=1-3*x[2]-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[2]-4*x[1]+5*x[0]
-    u[1]=(-7)+4*x[2]+2*x[1]-4*x[0]
-    u[2]=(-5)+8*x[2]-6*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=10
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[2]+3*x[1]-1*x[0]
-    u[1]=(-6)+6*x[2]+2*x[1]+2*x[0]
-    u[2]=(-4)-8*x[2]-2*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[2]+5*x[1]-4*x[0]
-    u[1]=(-4)+5*x[2]-2*x[1]-1*x[0]
-    u[2]=3+2*x[2]-9*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[2]+4*x[1]-8*x[0]
-    u[1]=5+6*x[2]-5*x[1]-8*x[0]
-    u[2]=(-4)+6*x[2]+4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+2*x[2]-9*x[1]+3*x[0]
-    u[1]=7+4*x[2]+7*x[1]-1*x[0]
-    u[2]=(-9)-4*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=28
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]+x[1]+7*x[0]
-    u[1]=2-8*x[2]+8*x[1]+3*x[0]
-    u[2]=2+2*x[2]-3*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[2]+3*x[1]+5*x[0]
-    u[1]=2-2*x[2]-7*x[1]-5*x[0]
-    u[2]=4+2*x[2]-5*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+6*x[1]+6*x[0]
-    u[1]=5+7*x[2]-2*x[1]+5*x[0]
-    u[2]=1+3*x[2]+3*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]+3*x[1]-8*x[0]
-    u[1]=1+x[2]+5*x[1]-5*x[0]
-    u[2]=(-2)-9*x[2]+7*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]-6*x[1]+x[0]
-    u[1]=(-5)-8*x[2]-4*x[1]+2*x[0]
-    u[2]=5-5*x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,0]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[2]-8*x[1]-2*x[0]
-    u[1]=3-3*x[2]-8*x[1]-3*x[0]
-    u[2]=5+2*x[2]-8*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-6*x[1]-6*x[0]
-    u[1]=(-5)+5*x[2]-9*x[1]+6*x[0]
-    u[2]=3+8*x[2]+7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]+4*x[1]+3*x[0]
-    u[1]=(-8)-7*x[2]+4*x[1]-5*x[0]
-    u[2]=(-2)-1*x[2]-7*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[2]+6*x[1]-4*x[0]
-    u[1]=(-6)-2*x[2]-6*x[1]-6*x[0]
-    u[2]=5+4*x[2]+8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]+5*x[1]-6*x[0]
-    u[1]=7-5*x[2]+8*x[1]+5*x[0]
-    u[2]=6-9*x[2]-6*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-8*x[1]-9*x[0]
-    u[1]=8+3*x[2]+x[1]-6*x[0]
-    u[2]=5+6*x[2]+5*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]-8*x[1]-4*x[0]
-    u[1]=7-1*x[2]+7*x[1]+2*x[0]
-    u[2]=6+3*x[2]-8*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Const_typeWeak_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+5*x[2]+x[1]+8*x[0]
-    u[1]=(-8)+3*x[2]-3*x[1]+2*x[0]
-    u[2]=(-7)-7*x[2]+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[2]+5*x[1]+3*x[0]
-    u[1]=1-3*x[2]+3*x[1]-5*x[0]
-    u[2]=5-8*x[2]+4*x[1]-1*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=48-64*x[2]+40*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[2]+8*x[1]-2*x[0]
-    u[1]=5-6*x[2]+8*x[1]-4*x[0]
-    u[2]=8-1*x[2]-8*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=20-24*x[2]+32*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[2]-3*x[1]-5*x[0]
-    u[1]=(-8)+3*x[2]-8*x[1]+2*x[0]
-    u[2]=2-7*x[2]+3*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=14-49*x[2]+21*x[1]-49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[2]+4*x[1]-4*x[0]
-    u[1]=(-2)+4*x[2]+6*x[1]+5*x[0]
-    u[2]=6-8*x[2]+5*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=32+16*x[2]+32*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[2]-1*x[1]+6*x[0]
-    u[1]=(-9)+2*x[2]+8*x[1]-4*x[0]
-    u[2]=(-6)-5*x[2]-6*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-72)+16*x[2]+64*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]-6*x[1]+5*x[0]
-    u[1]=4-1*x[2]-2*x[1]-7*x[0]
-    u[2]=2+5*x[2]-1*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=6+15*x[2]-3*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[2]-4*x[1]+2*x[0]
-    u[1]=2+6*x[2]+6*x[1]-1*x[0]
-    u[2]=6-8*x[2]+x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=35+14*x[2]-28*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[2]-9*x[1]-9*x[0]
-    u[1]=(-2)-5*x[2]+6*x[1]-7*x[0]
-    u[2]=(-1)+4*x[2]-6*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-12)-30*x[2]+36*x[1]-42*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[2]+x[1]-8*x[0]
-    u[1]=(-9)-9*x[2]-6*x[1]-1*x[0]
-    u[2]=7-5*x[2]-7*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=49-35*x[2]-49*x[1]-21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[2]-9*x[1]+6*x[0]
-    u[1]=(-2)-4*x[2]-9*x[1]+4*x[0]
-    u[2]=(-2)+x[2]-3*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=12-27*x[2]-27*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]+7*x[1]+3*x[0]
-    u[1]=6-1*x[2]+8*x[1]-1*x[0]
-    u[2]=(-6)+3*x[2]-8*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=18-3*x[2]+24*x[1]-3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[2]-8*x[1]+7*x[0]
-    u[1]=1+5*x[2]+8*x[1]-4*x[0]
-    u[2]=(-5)-6*x[2]-5*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)-6*x[2]-5*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[2]+2*x[1]-4*x[0]
-    u[1]=(-5)+x[2]-8*x[1]-6*x[0]
-    u[2]=(-3)-9*x[2]-1*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=8-2*x[2]+2*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+5*x[2]-5*x[1]+3*x[0]
-    u[1]=3-7*x[2]+2*x[1]+2*x[0]
-    u[2]=(-8)+5*x[2]-8*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3-7*x[2]+2*x[1]+2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[2]-8*x[1]-2*x[0]
-    u[1]=4-8*x[2]+3*x[1]-5*x[0]
-    u[2]=(-6)+4*x[2]+3*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-36)+24*x[2]+18*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]-7*x[1]+4*x[0]
-    u[1]=(-7)+5*x[2]-1*x[1]-7*x[0]
-    u[2]=5-5*x[2]+x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-63)+28*x[2]-49*x[1]+28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[2]+6*x[1]-6*x[0]
-    u[1]=(-1)+x[2]-8*x[1]-8*x[0]
-    u[2]=(-2)+5*x[2]-2*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)+6*x[2]-48*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[2]-3*x[1]+8*x[0]
-    u[1]=6+2*x[2]-8*x[1]+4*x[0]
-    u[2]=(-4)-3*x[2]+x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-32)-24*x[2]+8*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]+8*x[1]-9*x[0]
-    u[1]=(-9)-2*x[2]+7*x[1]+8*x[0]
-    u[2]=(-9)+x[2]+7*x[1]-4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-10)-18*x[2]+16*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[2]+2*x[1]-9*x[0]
-    u[1]=5-2*x[2]+8*x[1]-7*x[0]
-    u[2]=(-8)+8*x[2]+6*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=10-4*x[2]+16*x[1]-14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[2]+x[1]+3*x[0]
-    u[1]=(-2)-1*x[2]-3*x[1]+5*x[0]
-    u[2]=8-7*x[2]-2*x[1]-4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=24-21*x[2]-6*x[1]-12*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[2]+4*x[1]-6*x[0]
-    u[1]=(-9)-4*x[2]-5*x[1]+x[0]
-    u[2]=(-1)+5*x[2]+6*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-3)+8*x[2]+4*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]+4*x[1]+3*x[0]
-    u[1]=(-7)+3*x[2]-2*x[1]-7*x[0]
-    u[2]=(-3)-4*x[2]-8*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-35)+15*x[2]-10*x[1]-35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[2]+7*x[1]-1*x[0]
-    u[1]=5+3*x[2]-7*x[1]-3*x[0]
-    u[2]=6+x[2]-7*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=36+6*x[2]-42*x[1]-48*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]+2*x[1]-8*x[0]
-    u[1]=(-5)+4*x[2]+3*x[1]-1*x[0]
-    u[2]=(-8)-7*x[2]-2*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-5)-10*x[2]+10*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-7*x[2]+4*x[1]+8*x[0]
-    u[1]=(-5)+8*x[2]+4*x[1]-6*x[0]
-    u[2]=(-2)+2*x[2]-3*x[1]-1*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-30)+48*x[2]+24*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeWeak_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]-3*x[1]+7*x[0]
-    u[1]=(-7)+2*x[2]-4*x[1]+4*x[0]
-    u[2]=(-9)+6*x[2]+7*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-27)+18*x[2]+21*x[1]+9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-2*x[2]-5*x[1]-4*x[0]
-    u[1]=(-4)+8*x[2]-3*x[1]+4*x[0]
-    u[2]=4+2*x[2]-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-6*x[2]-4*x[1]-1*x[0]
-    u[1]=5+2*x[2]-9*x[1]+6*x[0]
-    u[2]=2-8*x[2]+8*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[2]-1*x[1]-2*x[0]
-    u[1]=(-1)-1*x[2]+x[1]+5*x[0]
-    u[2]=5-4*x[2]+3*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[2]+7*x[1]+2*x[0]
-    u[1]=(-6)-3*x[2]-7*x[1]-5*x[0]
-    u[2]=5+2*x[2]-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]-3*x[1]+8*x[0]
-    u[1]=(-9)+7*x[2]-3*x[1]+x[0]
-    u[2]=(-9)+8*x[2]-3*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-8*x[2]+x[1]+3*x[0]
-    u[1]=8+7*x[2]+8*x[1]-7*x[0]
-    u[2]=(-7)-6*x[2]+2*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,1,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-3*x[2]+3*x[1]-3*x[0]
-    u[1]=(-4)-8*x[2]-6*x[1]+4*x[0]
-    u[2]=(-6)-5*x[2]-8*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[2]+x[1]+2*x[0]
-    u[1]=4-3*x[2]+7*x[1]+7*x[0]
-    u[2]=2-2*x[2]+4*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[2]+4*x[1]+2*x[0]
-    u[1]=5+6*x[2]-8*x[1]-6*x[0]
-    u[2]=8+4*x[2]+x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,0,2,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-1*x[1]-3*x[0]
-    u[1]=1+3*x[2]-1*x[1]-8*x[0]
-    u[2]=(-9)+4*x[2]-9*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[2]+4*x[1]-5*x[0]
-    u[1]=(-3)-3*x[2]-8*x[1]-3*x[0]
-    u[2]=4+8*x[2]+4*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+5*x[2]-6*x[1]+x[0]
-    u[1]=1-5*x[2]-3*x[1]+7*x[0]
-    u[2]=(-2)-7*x[2]-4*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,0,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[2]+7*x[1]+x[0]
-    u[1]=7-6*x[2]+6*x[1]+8*x[0]
-    u[2]=(-3)+3*x[2]+7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[2]+8*x[1]-1*x[0]
-    u[1]=(-4)-2*x[2]+2*x[1]+8*x[0]
-    u[2]=(-4)+8*x[2]-4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[2]-8*x[1]-3*x[0]
-    u[1]=5+4*x[2]-7*x[1]-9*x[0]
-    u[2]=4-2*x[2]+5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]+6*x[1]+x[0]
-    u[1]=(-7)+x[2]-1*x[1]-6*x[0]
-    u[2]=(-7)+3*x[2]+8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[2]+x[1]+7*x[0]
-    u[1]=8-5*x[2]+8*x[1]-2*x[0]
-    u[2]=(-9)-6*x[2]+6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[2]+x[1]-1*x[0]
-    u[1]=2-4*x[2]+6*x[1]-5*x[0]
-    u[2]=(-9)+7*x[2]+7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,1,2,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[2]+5*x[1]+2*x[0]
-    u[1]=7+7*x[2]-6*x[1]-2*x[0]
-    u[2]=(-8)+7*x[2]-5*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[2]+6*x[1]-7*x[0]
-    u[1]=(-4)-7*x[2]+7*x[1]+x[0]
-    u[2]=(-6)+2*x[2]+7*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]-1*x[1]-3*x[0]
-    u[1]=(-6)+4*x[2]-5*x[1]+5*x[0]
-    u[2]=6+7*x[2]+2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,0,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[2]+x[1]+7*x[0]
-    u[1]=(-5)-9*x[2]-6*x[1]-2*x[0]
-    u[2]=1-6*x[2]+7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-2*x[1]+7*x[0]
-    u[1]=(-9)+2*x[2]-8*x[1]-6*x[0]
-    u[2]=3+7*x[2]+3*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[2]+7*x[1]+2*x[0]
-    u[1]=(-7)-4*x[2]+8*x[1]+2*x[0]
-    u[2]=(-5)+6*x[2]+6*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,1,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[2]-7*x[1]-9*x[0]
-    u[1]=7+7*x[2]+7*x[1]-9*x[0]
-    u[2]=(-8)-1*x[2]-4*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]-9*x[1]+8*x[0]
-    u[1]=8+6*x[2]-9*x[1]+2*x[0]
-    u[2]=(-3)+5*x[2]+6*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+5*x[2]-6*x[1]+x[0]
-    u[1]=(-2)-1*x[2]+x[1]+8*x[0]
-    u[2]=(-3)+4*x[2]-6*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[0,2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]-5*x[1]-8*x[0]
-    u[1]=5-4*x[2]+4*x[1]+8*x[0]
-    u[2]=(-2)+5*x[2]-7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[2]+5*x[1]+8*x[0]
-    u[1]=(-5)-9*x[2]+5*x[1]-4*x[0]
-    u[2]=(-4)-5*x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-2*x[2]-5*x[1]-9*x[0]
-    u[1]=4-9*x[2]-3*x[1]-6*x[0]
-    u[2]=(-6)+6*x[2]+2*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-1*x[2]-8*x[1]-1*x[0]
-    u[1]=8+x[2]+x[1]-5*x[0]
-    u[2]=6+3*x[2]-5*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[2]+7*x[1]-8*x[0]
-    u[1]=(-6)+6*x[2]-9*x[1]+4*x[0]
-    u[2]=7-2*x[2]+2*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[2]+7*x[1]+x[0]
-    u[1]=2+7*x[2]+2*x[1]+6*x[0]
-    u[2]=3+4*x[2]-1*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,1,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]-9*x[1]+3*x[0]
-    u[1]=(-7)-9*x[2]+6*x[1]+x[0]
-    u[2]=8-1*x[2]+x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[2]-5*x[1]-4*x[0]
-    u[1]=(-9)-2*x[2]+x[1]-5*x[0]
-    u[2]=(-1)-9*x[2]+2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]-3*x[1]+7*x[0]
-    u[1]=3-9*x[2]+x[1]-8*x[0]
-    u[2]=3+8*x[2]+5*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,0,2,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[2]-3*x[1]-8*x[0]
-    u[1]=(-9)+2*x[2]-5*x[1]-9*x[0]
-    u[2]=(-3)+8*x[2]-5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[2]-7*x[1]+7*x[0]
-    u[1]=(-7)-2*x[2]+3*x[1]-2*x[0]
-    u[2]=(-2)+4*x[2]+5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[2]+6*x[1]-3*x[0]
-    u[1]=6-3*x[2]+4*x[1]+8*x[0]
-    u[2]=(-3)-4*x[2]+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,0,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[2]+x[1]-7*x[0]
-    u[1]=(-6)-5*x[2]-2*x[1]-9*x[0]
-    u[2]=6+3*x[2]-6*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[2]+3*x[1]-1*x[0]
-    u[1]=1+2*x[2]+8*x[1]+6*x[0]
-    u[2]=2-6*x[2]-9*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[2]-2*x[1]-7*x[0]
-    u[1]=(-5)-2*x[2]-3*x[1]+3*x[0]
-    u[2]=(-3)+2*x[2]-7*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[2]-5*x[1]-6*x[0]
-    u[1]=(-7)+4*x[2]-4*x[1]-4*x[0]
-    u[2]=1+6*x[2]-1*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[2]-7*x[1]-6*x[0]
-    u[1]=3-1*x[2]-8*x[1]-7*x[0]
-    u[2]=(-2)-8*x[2]-5*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[2]-1*x[1]-4*x[0]
-    u[1]=2-1*x[2]+8*x[1]+5*x[0]
-    u[2]=6-8*x[2]+4*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,1,2,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[2]+x[1]-5*x[0]
-    u[1]=1-9*x[2]-7*x[1]-2*x[0]
-    u[2]=(-9)-7*x[2]+3*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[2]+8*x[1]+7*x[0]
-    u[1]=(-7)+4*x[2]-6*x[1]+5*x[0]
-    u[2]=(-7)-3*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[2]-7*x[1]-7*x[0]
-    u[1]=(-8)+7*x[2]+6*x[1]+3*x[0]
-    u[2]=6-7*x[2]+x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,0,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-3)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]+7*x[1]+7*x[0]
-    u[1]=(-5)-9*x[2]-4*x[1]-8*x[0]
-    u[2]=5+6*x[2]-2*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[2]-7*x[1]-4*x[0]
-    u[1]=(-1)-4*x[2]+5*x[1]+7*x[0]
-    u[2]=(-7)-9*x[2]+x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[2]+6*x[1]-7*x[0]
-    u[1]=4+x[2]+5*x[1]-1*x[0]
-    u[2]=1-7*x[2]-8*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,1,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]+5*x[1]+6*x[0]
-    u[1]=(-6)+2*x[2]-5*x[1]-4*x[0]
-    u[2]=(-2)-4*x[2]+x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[2]+x[1]+x[0]
-    u[1]=(-4)+4*x[2]-5*x[1]-6*x[0]
-    u[2]=5-8*x[2]+7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=7*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[2]-1*x[1]-3*x[0]
-    u[1]=8-9*x[2]-3*x[1]+6*x[0]
-    u[2]=8+3*x[2]+5*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[1,2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=3*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[2]-9*x[1]-3*x[0]
-    u[1]=5-8*x[2]-4*x[1]+x[0]
-    u[2]=5+4*x[2]+x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[2]-1*x[1]-4*x[0]
-    u[1]=(-6)-9*x[2]+4*x[1]-9*x[0]
-    u[2]=(-5)+2*x[2]-3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[2]-6*x[1]-9*x[0]
-    u[1]=4-8*x[2]-9*x[1]-6*x[0]
-    u[2]=8-2*x[2]-1*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[2]-8*x[1]+8*x[0]
-    u[1]=(-1)-5*x[2]+7*x[1]+8*x[0]
-    u[2]=(-4)+6*x[2]-3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+x[2]+2*x[1]+6*x[0]
-    u[1]=(-5)+6*x[2]-6*x[1]-2*x[0]
-    u[2]=(-3)+4*x[2]-8*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]-8*x[1]+2*x[0]
-    u[1]=(-5)-1*x[2]-5*x[1]-5*x[0]
-    u[2]=(-4)+3*x[2]-6*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,1,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]+3*x[1]-2*x[0]
-    u[1]=2-6*x[2]-6*x[1]-6*x[0]
-    u[2]=1-4*x[2]+8*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[2]+5*x[1]+8*x[0]
-    u[1]=4-4*x[2]-5*x[1]+x[0]
-    u[2]=4+3*x[2]-7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]+8*x[1]-9*x[0]
-    u[1]=(-5)+4*x[2]+2*x[1]-3*x[0]
-    u[2]=2+6*x[2]-6*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,0,2,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[2]-9*x[1]+3*x[0]
-    u[1]=(-6)+7*x[2]-9*x[1]-9*x[0]
-    u[2]=(-8)+x[2]-5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-2*x[2]+3*x[1]+7*x[0]
-    u[1]=(-6)+x[2]+4*x[1]-9*x[0]
-    u[2]=3+3*x[2]+6*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[2]-4*x[1]-9*x[0]
-    u[1]=(-9)+x[2]-2*x[1]+4*x[0]
-    u[2]=(-6)-1*x[2]+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,0,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]-3*x[1]-6*x[0]
-    u[1]=4+4*x[2]-8*x[1]-7*x[0]
-    u[2]=(-3)-8*x[2]-3*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[2]-4*x[1]-7*x[0]
-    u[1]=6-1*x[2]+7*x[1]-6*x[0]
-    u[2]=(-4)+5*x[2]-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]-5*x[1]+6*x[0]
-    u[1]=5+7*x[2]+8*x[1]+2*x[0]
-    u[2]=4-1*x[2]-8*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]-1*x[1]-7*x[0]
-    u[1]=(-3)-5*x[2]-8*x[1]-2*x[0]
-    u[2]=4+4*x[2]-8*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]-9*x[1]+5*x[0]
-    u[1]=(-1)+7*x[2]+3*x[1]+x[0]
-    u[2]=1+x[2]-7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[2]+7*x[1]+7*x[0]
-    u[1]=(-4)-3*x[2]+2*x[1]+4*x[0]
-    u[2]=(-9)+3*x[2]-7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,1,2,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[2]+3*x[1]-1*x[0]
-    u[1]=(-5)-4*x[2]-1*x[1]+5*x[0]
-    u[2]=5+5*x[2]-3*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-1)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-5*x[2]-5*x[1]+3*x[0]
-    u[1]=7-1*x[2]+5*x[1]+7*x[0]
-    u[2]=2-8*x[2]+5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[2]-5*x[1]-9*x[0]
-    u[1]=(-3)-9*x[2]+3*x[1]+x[0]
-    u[2]=(-9)+6*x[2]-4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,0,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-9*x[2]+4*x[1]+4*x[0]
-    u[1]=2+x[2]-5*x[1]-5*x[0]
-    u[2]=8+6*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]-8*x[1]+x[0]
-    u[1]=7-3*x[2]+2*x[1]+3*x[0]
-    u[2]=1-2*x[2]-3*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[2]-1*x[1]-6*x[0]
-    u[1]=(-6)+6*x[2]-6*x[1]-1*x[0]
-    u[2]=(-8)+7*x[2]-5*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,1,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+4*x[2]-5*x[1]+x[0]
-    u[1]=1+3*x[2]-8*x[1]-4*x[0]
-    u[2]=(-9)+5*x[2]+3*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]-4*x[1]+8*x[0]
-    u[1]=8-9*x[2]-3*x[1]+7*x[0]
-    u[2]=(-3)+6*x[2]+2*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_A_Vario_typeWeak_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[2]-2*x[1]-8*x[0]
-    u[1]=(-5)-9*x[2]+x[1]+7*x[0]
-    u[2]=2-7*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),Function(self.domain))
-    A_test[2,2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A=A_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-4)
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=2
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=7
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=5
-    u[2]=1
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=7
-    u[2]=1
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=8
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-1)
-    u[2]=(-9)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-9)
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-3)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=2
-    u[2]=8
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=1
-    u[2]=5
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-7)
-    u[2]=7
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=8
-    u[2]=8
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=7
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=8
-    u[2]=3
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-2)
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=4
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=4
-    u[2]=5
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=8
-    u[2]=5
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-1)
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=7
-    u[2]=1
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=7
-    u[2]=(-9)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=1
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-8)
-    u[2]=3
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=4
-    u[2]=2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-1)
-    u[2]=1
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-1)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeWeak_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=4
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, X=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-3)-8*x[2]-8*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,0]=8
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-56))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=8-2*x[2]-3*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,1]=5
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=(-1)+6*x[2]-5*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,2]=2
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-9)-7*x[2]-4*x[1]+7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,0]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=4+8*x[2]-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,1]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=(-8)+2*x[2]-5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,2]=4
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=3-1*x[2]+4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,0]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*((-7))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=7+3*x[2]+6*x[1]+3*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,1]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=(-5)-1*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,2]=2
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-4)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[0]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-7)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[1]=7
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-49))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=(-2)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[2]=1
-    Y_test=0
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=5+x[2]-7*x[1]-9*x[0]
-    C_test=Data(0.,(3,),ReducedFunction(self.domain))
-    C_test[0]=2
-    Y_test=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=(-2)+8*x[2]-7*x[1]+4*x[0]
-    C_test=Data(0.,(3,),ReducedFunction(self.domain))
-    C_test[1]=6
-    Y_test=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=2+3*x[2]-5*x[1]+8*x[0]
-    C_test=Data(0.,(3,),ReducedFunction(self.domain))
-    C_test[2]=6
-    Y_test=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_D_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=8-9*x[2]-9*x[1]-7*x[0]
-    D_test=Data(5,(),ReducedFunction(self.domain))
-    Y_test=40-45*x[2]-45*x[1]-35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_d_Const_typeStrong(self):
-    x=self.domain.getX()
-    u=(-8)-2*x[2]-7*x[1]-7*x[0]
-    d_test=Data(8,(),ReducedFunctionOnBoundary(self.domain))
-    y_test=(-64)-16*x[2]-56*x[1]-56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=(-2)+8*x[2]-2*x[1]+4*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,0]=x[0]
-    Y_test=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=(-3)+6*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,1]=x[0]
-    Y_test=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-5)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=5-8*x[2]-3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,2]=x[0]
-    Y_test=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=(-8)+7*x[2]+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,0]=x[1]
-    Y_test=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=(-7)-9*x[2]+2*x[1]+7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,1]=x[1]
-    Y_test=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=(-1)-5*x[2]-5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,2]=x[1]
-    Y_test=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=(-1)+8*x[2]-2*x[1]+2*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,0]=x[2]
-    Y_test=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=(-9)-4*x[2]+2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,1]=x[2]
-    Y_test=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=(-5)+x[2]-2*x[1]+6*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,2]=x[2]
-    Y_test=(-1)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-2)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[0]=x[0]
-    Y_test=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=3
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[1]=x[1]
-    Y_test=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=1
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[2]=x[2]
-    Y_test=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp0(self):
-    x=self.domain.getX()
-    u=(-2)+x[2]+5*x[1]-7*x[0]
-    C_test=Data(0.,(3,),ReducedFunction(self.domain))
-    C_test[0]=x[0]
-    Y_test=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp1(self):
-    x=self.domain.getX()
-    u=8+x[2]+7*x[1]-3*x[0]
-    C_test=Data(0.,(3,),ReducedFunction(self.domain))
-    C_test[1]=x[1]
-    Y_test=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp2(self):
-    x=self.domain.getX()
-    u=(-3)-9*x[2]+x[1]+6*x[0]
-    C_test=Data(0.,(3,),ReducedFunction(self.domain))
-    C_test[2]=x[2]
-    Y_test=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_D_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=2
-    D_test=ReducedFunction(self.domain).getX()[0]
-    Y_test=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_d_Vario_typeStrong(self):
-    x=self.domain.getX()
-    u=(-4)
-    d_test=interpolate(x[0],ReducedFunctionOnBoundary(self.domain))
-    y_test=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=(-1)+3*x[2]-6*x[1]+3*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,0]=2
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=(-2)+3*x[2]+3*x[1]+5*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,1]=8
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp02(self):
-    x=self.domain.getX()
-    u=(-5)-4*x[2]+4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,2]=1
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=7-6*x[2]-5*x[1]+8*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,0]=8
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=64
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=7-1*x[2]+2*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,1]=6
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp12(self):
-    x=self.domain.getX()
-    u=1-8*x[2]+6*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,2]=6
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp20(self):
-    x=self.domain.getX()
-    u=(-6)-3*x[2]-9*x[1]+x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,0]=2
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp21(self):
-    x=self.domain.getX()
-    u=(-8)-6*x[2]+5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,1]=2
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=10
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp22(self):
-    x=self.domain.getX()
-    u=(-8)+6*x[2]-9*x[1]+7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,2]=4
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=(-3)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[0]=1
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-2)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[1]=4
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp2(self):
-    x=self.domain.getX()
-    u=(-3)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[2]=5
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp00(self):
-    x=self.domain.getX()
-    u=(-9)-4*x[2]-9*x[1]-2*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,0]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp01(self):
-    x=self.domain.getX()
-    u=3-8*x[2]+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,1]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp02(self):
-    x=self.domain.getX()
-    u=(-1)-2*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[0,2]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp10(self):
-    x=self.domain.getX()
-    u=(-4)+7*x[2]-3*x[1]-8*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,0]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp11(self):
-    x=self.domain.getX()
-    u=(-1)-5*x[2]+8*x[1]-9*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,1]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp12(self):
-    x=self.domain.getX()
-    u=6+5*x[2]+5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[1,2]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp20(self):
-    x=self.domain.getX()
-    u=(-1)-2*x[2]-3*x[1]+2*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,0]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp21(self):
-    x=self.domain.getX()
-    u=(-6)+8*x[2]-3*x[1]+8*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,1]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-3)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp22(self):
-    x=self.domain.getX()
-    u=2-4*x[2]-1*x[1]-4*x[0]
-    A_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    A_test[2,2]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp0(self):
-    x=self.domain.getX()
-    u=7
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[0]=x[0]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp1(self):
-    x=self.domain.getX()
-    u=(-6)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[1]=x[1]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp2(self):
-    x=self.domain.getX()
-    u=(-1)
-    B_test=Data(0.,(3,),ReducedFunction(self.domain))
-    B_test[2]=x[2]
-    X_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    X_test[2]=(-1)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]+6*x[1]-5*x[0]
-    u[1]=(-9)+7*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[2]+8*x[1]-4*x[0]
-    u[1]=2-5*x[2]+8*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[2]-2*x[1]+6*x[0]
-    u[1]=8-1*x[2]+6*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-3*x[2]+x[1]-6*x[0]
-    u[1]=1-8*x[2]+6*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]+2*x[1]-1*x[0]
-    u[1]=5-4*x[2]-9*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-27))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+4*x[2]-5*x[1]-2*x[0]
-    u[1]=(-4)+3*x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[2]-5*x[1]-3*x[0]
-    u[1]=2-3*x[2]+5*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-18))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-3*x[2]+x[1]+8*x[0]
-    u[1]=(-7)+4*x[2]-3*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[2]+7*x[1]-8*x[0]
-    u[1]=(-7)+5*x[2]-2*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-72))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+3*x[2]-6*x[1]-7*x[0]
-    u[1]=(-1)+2*x[2]+2*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]+4*x[1]-9*x[0]
-    u[1]=8+6*x[2]+5*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]-1*x[1]-1*x[0]
-    u[1]=(-7)+7*x[2]+4*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]+2*x[1]-9*x[0]
-    u[1]=(-5)-7*x[2]-3*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-27))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]+7*x[1]+x[0]
-    u[1]=(-7)-5*x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[2]-1*x[1]+x[0]
-    u[1]=6+7*x[2]-8*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+6*x[2]+x[1]+6*x[0]
-    u[1]=7-1*x[2]-7*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[2]-9*x[1]+x[0]
-    u[1]=(-9)+3*x[2]-3*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]+5*x[1]-3*x[0]
-    u[1]=1-1*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-5))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]-8*x[1]+x[0]
-    u[1]=(-8)+7*x[2]+2*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]+x[1]+3*x[0]
-    u[1]=(-5)-4*x[2]+2*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[2]+8*x[1]+3*x[0]
-    u[1]=(-2)+7*x[2]-9*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]+3*x[1]-4*x[0]
-    u[1]=(-9)-1*x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[2]+3*x[1]-9*x[0]
-    u[1]=1+3*x[2]+5*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[2]-2*x[1]+6*x[0]
-    u[1]=4+8*x[2]+2*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-5*x[1]-1*x[0]
-    u[1]=(-9)+2*x[2]-5*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[2]-3*x[1]-6*x[0]
-    u[1]=7+7*x[2]-6*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[2]-5*x[1]-1*x[0]
-    u[1]=6-2*x[2]+5*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[2]-5*x[1]-6*x[0]
-    u[1]=1+3*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[2]-9*x[1]-6*x[0]
-    u[1]=(-2)-5*x[2]+7*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[2]+2*x[1]-1*x[0]
-    u[1]=4+4*x[2]+8*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]+6*x[1]+6*x[0]
-    u[1]=(-8)-5*x[2]-9*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]+5*x[1]-8*x[0]
-    u[1]=7+5*x[2]-2*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[2]+8*x[1]-9*x[0]
-    u[1]=4-4*x[2]+x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-1))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]+7*x[1]+4*x[0]
-    u[1]=3-8*x[2]+5*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]+3*x[1]+6*x[0]
-    u[1]=(-7)+5*x[2]+3*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[2]-1*x[1]+8*x[0]
-    u[1]=2+4*x[2]-7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=1
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=3
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=8
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=1
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=6
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-6)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-42))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-6)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-2)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-6)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=5
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=1
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=3
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]-5*x[1]+2*x[0]
-    u[1]=6+4*x[2]-1*x[1]-3*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,0,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[2]-5*x[1]-4*x[0]
-    u[1]=1-9*x[2]+5*x[1]+7*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,0,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-10)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-8*x[1]-7*x[0]
-    u[1]=5-5*x[2]-4*x[1]+5*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,0,2]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[2]+6*x[1]-2*x[0]
-    u[1]=8+6*x[2]+4*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,1,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+3*x[2]-5*x[1]-2*x[0]
-    u[1]=(-1)-8*x[2]+3*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[2]+6*x[1]+3*x[0]
-    u[1]=(-6)-7*x[2]-6*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,1,2]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]-7*x[1]-1*x[0]
-    u[1]=(-3)+2*x[2]+x[1]+4*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,0,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-8*x[2]+x[1]-4*x[0]
-    u[1]=(-5)+4*x[2]-9*x[1]-1*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]+x[1]+3*x[0]
-    u[1]=(-4)+3*x[2]+7*x[1]-8*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,0,2]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=28
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+3*x[2]+6*x[1]-5*x[0]
-    u[1]=(-2)-2*x[2]+6*x[1]-5*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,1,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[2]+3*x[1]+x[0]
-    u[1]=3+x[2]-5*x[1]+2*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]+x[1]-2*x[0]
-    u[1]=(-1)-1*x[2]-9*x[1]-7*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,1,2]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]+3*x[1]+7*x[0]
-    u[1]=2-2*x[2]-2*x[1]+x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-35)+56*x[2]+21*x[1]+49*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-7*x[2]-7*x[1]+x[0]
-    u[1]=(-6)+5*x[2]-3*x[1]-8*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,1]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)+25*x[2]-15*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[2]-8*x[1]-8*x[0]
-    u[1]=(-7)+2*x[2]-4*x[1]-9*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4+3*x[2]-8*x[1]-8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]+7*x[1]-8*x[0]
-    u[1]=3-9*x[2]-1*x[1]+7*x[0]
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=24-72*x[2]-8*x[1]+56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[2]+8*x[1]-3*x[0]
-    u[1]=5-3*x[2]-2*x[1]-3*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=5
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-10)+35*x[2]+40*x[1]-15*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[2]+5*x[1]+x[0]
-    u[1]=8+6*x[2]-1*x[1]-4*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=5
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=40+30*x[2]-5*x[1]-20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]+3*x[1]+3*x[0]
-    u[1]=6-9*x[2]-5*x[1]+8*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=7
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=14-21*x[2]+21*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]+3*x[1]+3*x[0]
-    u[1]=(-8)-9*x[2]+8*x[1]-2*x[0]
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=5
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-40)-45*x[2]+40*x[1]-10*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]+7*x[1]-6*x[0]
-    u[1]=(-4)+7*x[2]-3*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]-9*x[1]+4*x[0]
-    u[1]=5+x[2]+8*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[2]+6*x[1]-7*x[0]
-    u[1]=3+7*x[2]+7*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[2]-1*x[1]-2*x[0]
-    u[1]=(-9)+3*x[2]+x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]-8*x[1]-1*x[0]
-    u[1]=(-3)-1*x[2]+x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[2]-3*x[1]+2*x[0]
-    u[1]=3+3*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[2]-8*x[1]-4*x[0]
-    u[1]=3+8*x[2]-3*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[2]+7*x[1]-7*x[0]
-    u[1]=(-9)+7*x[2]+6*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[2]+2*x[1]-5*x[0]
-    u[1]=2-5*x[2]+x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[2]-9*x[1]+4*x[0]
-    u[1]=2+4*x[2]-3*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]-8*x[1]-2*x[0]
-    u[1]=(-5)-7*x[2]+x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[2]+3*x[1]-5*x[0]
-    u[1]=2+x[2]-8*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[2]+4*x[1]+6*x[0]
-    u[1]=7+6*x[2]-5*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(6*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]+7*x[1]+7*x[0]
-    u[1]=8+4*x[2]-8*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-9*x[1]-9*x[0]
-    u[1]=(-6)-2*x[2]+2*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-3)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]-6*x[1]+3*x[0]
-    u[1]=(-2)-1*x[2]+8*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[2]-5*x[1]+x[0]
-    u[1]=(-8)+8*x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-3*x[2]-1*x[1]-4*x[0]
-    u[1]=(-5)+x[2]-5*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]+2*x[1]+3*x[0]
-    u[1]=8+2*x[2]+5*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]-8*x[1]-4*x[0]
-    u[1]=(-6)-8*x[2]-6*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+x[2]+7*x[1]+7*x[0]
-    u[1]=5+5*x[2]-5*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]-2*x[1]+6*x[0]
-    u[1]=2-6*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[2]+5*x[1]-5*x[0]
-    u[1]=1+5*x[2]+6*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-2*x[2]+3*x[1]+8*x[0]
-    u[1]=(-5)-2*x[2]+8*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]-6*x[1]-1*x[0]
-    u[1]=(-5)+x[2]+3*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]+8*x[1]+3*x[0]
-    u[1]=2+x[2]-1*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[2]+x[1]+5*x[0]
-    u[1]=6+2*x[2]+7*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[2]-9*x[1]-6*x[0]
-    u[1]=4-9*x[2]-6*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[2]-9*x[1]-9*x[0]
-    u[1]=(-4)-5*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(8*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-5*x[2]-6*x[1]-4*x[0]
-    u[1]=6+6*x[2]-7*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]-2*x[1]+x[0]
-    u[1]=(-7)-2*x[2]+2*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]+2*x[1]+7*x[0]
-    u[1]=6+3*x[2]-5*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]+3*x[1]-7*x[0]
-    u[1]=6+8*x[2]-3*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+3*x[1]+8*x[0]
-    u[1]=(-8)+8*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[2]-4*x[1]+5*x[0]
-    u[1]=1+8*x[2]+5*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(5*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-6*x[2]-7*x[1]+3*x[0]
-    u[1]=(-9)+7*x[2]-1*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-1)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-4)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-5)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-2)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-2)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-5)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-3)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=4
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=6
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-9)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=1
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-1)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=8
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(8*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[2]+2*x[1]+6*x[0]
-    u[1]=7-4*x[2]-2*x[1]-1*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]-2*x[1]+3*x[0]
-    u[1]=8+5*x[2]-8*x[1]+7*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]-1*x[1]-9*x[0]
-    u[1]=(-6)+4*x[2]-9*x[1]+3*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]+5*x[1]+8*x[0]
-    u[1]=8+7*x[2]+4*x[1]+7*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[2]+3*x[1]-3*x[0]
-    u[1]=8+2*x[2]-1*x[1]+2*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[2]+5*x[1]+5*x[0]
-    u[1]=2-7*x[2]-5*x[1]+5*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[0,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+3*x[2]-7*x[1]-7*x[0]
-    u[1]=8+6*x[2]-5*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]-2*x[1]+5*x[0]
-    u[1]=(-4)+7*x[2]+8*x[1]-6*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]+2*x[1]+2*x[0]
-    u[1]=(-1)-8*x[2]+7*x[1]+8*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,0,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[2]-3*x[1]+7*x[0]
-    u[1]=7+7*x[2]-8*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]+2*x[1]-5*x[0]
-    u[1]=4+6*x[2]-2*x[1]+x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[2]+x[1]-8*x[0]
-    u[1]=(-9)-9*x[2]+6*x[1]+4*x[0]
-    C_test=Data(0.,(2,2,3),ReducedFunction(self.domain))
-    C_test[1,1,2]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=6
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-7)
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=5
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=7
-    D_test=Data(0.,(2,2),ReducedFunction(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-1)
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=8
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=5
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=6
-    d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]+7*x[1]+8*x[0]
-    u[1]=8-9*x[2]-9*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]+3*x[1]-1*x[0]
-    u[1]=2+3*x[2]+6*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[2]+4*x[1]-2*x[0]
-    u[1]=6-3*x[2]+x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]+7*x[1]+5*x[0]
-    u[1]=(-6)+x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]-7*x[1]-2*x[0]
-    u[1]=6+4*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+x[2]+7*x[1]+3*x[0]
-    u[1]=3-5*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[2]-8*x[1]-4*x[0]
-    u[1]=2+x[2]+3*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=4
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[2]-3*x[1]+3*x[0]
-    u[1]=(-8)+6*x[2]-8*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]-6*x[1]+x[0]
-    u[1]=8-6*x[2]-8*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[2]+2*x[1]+8*x[0]
-    u[1]=(-4)+6*x[2]+5*x[1]+4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]-9*x[1]+x[0]
-    u[1]=3+7*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[2]-5*x[1]+2*x[0]
-    u[1]=(-5)+2*x[2]+4*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)+5*x[2]-8*x[1]+4*x[0]
-    u[1]=(-6)-6*x[2]+6*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+6*x[2]-8*x[1]+7*x[0]
-    u[1]=(-5)+6*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]+6*x[1]-8*x[0]
-    u[1]=(-7)-1*x[2]-5*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-25)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[2]-5*x[1]-9*x[0]
-    u[1]=7+3*x[2]-3*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]-6*x[1]-9*x[0]
-    u[1]=6-3*x[2]+2*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=4
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[2]-8*x[1]+8*x[0]
-    u[1]=8+x[2]+7*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-8*x[2]+x[1]+6*x[0]
-    u[1]=4+5*x[2]-6*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-8*x[2]-7*x[1]-4*x[0]
-    u[1]=(-6)-9*x[2]+5*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]+7*x[1]-8*x[0]
-    u[1]=4+7*x[2]-5*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+6*x[1]+7*x[0]
-    u[1]=6+x[2]-4*x[1]+x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=1
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-9*x[1]-2*x[0]
-    u[1]=(-1)-7*x[2]+2*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]-7*x[1]+4*x[0]
-    u[1]=5-5*x[2]-4*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+5*x[2]+8*x[1]-1*x[0]
-    u[1]=(-8)-7*x[2]-6*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+8*x[2]-9*x[1]-4*x[0]
-    u[1]=(-5)+7*x[2]+4*x[1]-8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-54)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[2]+7*x[1]+4*x[0]
-    u[1]=(-8)+2*x[2]-6*x[1]-5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-3*x[2]-8*x[1]+7*x[0]
-    u[1]=(-4)-7*x[2]+7*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=3
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[2]-9*x[1]+2*x[0]
-    u[1]=(-5)-7*x[2]+3*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-5*x[1]+4*x[0]
-    u[1]=(-7)-8*x[2]-1*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-4*x[1]-7*x[0]
-    u[1]=(-9)-9*x[2]-4*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[2]+8*x[1]-6*x[0]
-    u[1]=(-4)+x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=4
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=32
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[2]-3*x[1]+2*x[0]
-    u[1]=1+5*x[2]+4*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]+4*x[1]+4*x[0]
-    u[1]=(-9)-9*x[2]+5*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-2*x[2]+2*x[1]+8*x[0]
-    u[1]=1+3*x[2]+7*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[2]+4*x[1]+8*x[0]
-    u[1]=(-6)-3*x[2]-7*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=8
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=5
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=5
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-9)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=5
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-3)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=2
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,0]=1
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=6
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=42
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-9)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-2)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=7
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=6
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-4)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=6
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=5
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,0]=2
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-1)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,1]=8
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]-6*x[1]+x[0]
-    u[1]=(-8)+3*x[2]-1*x[1]-4*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-7*x[1]-4*x[0]
-    u[1]=7+2*x[2]+5*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]+5*x[1]-9*x[0]
-    u[1]=7-1*x[2]-5*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]+2*x[1]+2*x[0]
-    u[1]=2+2*x[2]-3*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]+6*x[1]-3*x[0]
-    u[1]=(-9)-5*x[2]-5*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]-6*x[1]-2*x[0]
-    u[1]=3+6*x[2]+x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[2]+5*x[1]+7*x[0]
-    u[1]=(-9)+3*x[2]+3*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+2*x[2]-8*x[1]-7*x[0]
-    u[1]=2+7*x[2]+6*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+2*x[1]-3*x[0]
-    u[1]=7-8*x[2]-4*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]+5*x[1]-6*x[0]
-    u[1]=5-9*x[2]+7*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]+4*x[1]+5*x[0]
-    u[1]=(-8)+8*x[2]-9*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-1*x[1]-9*x[0]
-    u[1]=(-4)-3*x[2]-5*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]-8*x[1]-6*x[0]
-    u[1]=(-8)-5*x[2]-7*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+7*x[2]+6*x[1]-1*x[0]
-    u[1]=(-3)-9*x[2]+5*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]-5*x[1]-3*x[0]
-    u[1]=1+7*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[2]-4*x[1]+3*x[0]
-    u[1]=3-5*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[2]-6*x[1]+7*x[0]
-    u[1]=7-2*x[2]+8*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]-1*x[1]+2*x[0]
-    u[1]=6-2*x[2]-1*x[1]+6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]-5*x[1]-6*x[0]
-    u[1]=(-5)-1*x[2]-7*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[2]-4*x[1]-7*x[0]
-    u[1]=(-4)-2*x[2]+3*x[1]-3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[2]-1*x[1]-2*x[0]
-    u[1]=(-3)-6*x[2]+4*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[2]+2*x[1]+7*x[0]
-    u[1]=7-2*x[2]-5*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[2]-5*x[1]+6*x[0]
-    u[1]=4-3*x[2]+8*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[2]+3*x[1]-2*x[0]
-    u[1]=(-6)+7*x[2]-2*x[1]+3*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[2]-3*x[1]-8*x[0]
-    u[1]=5+4*x[2]-9*x[1]+5*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[2]+3*x[1]+6*x[0]
-    u[1]=2+8*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+x[2]-4*x[1]-7*x[0]
-    u[1]=(-8)+2*x[2]-7*x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[2]+8*x[1]+2*x[0]
-    u[1]=1-2*x[2]-2*x[1]-1*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[2]+4*x[1]+4*x[0]
-    u[1]=(-5)+3*x[2]-6*x[1]+8*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[2]-6*x[1]+5*x[0]
-    u[1]=4-1*x[2]+4*x[1]-7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-1*x[2]-4*x[1]+3*x[0]
-    u[1]=(-3)-3*x[2]+x[1]-2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=3*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]-6*x[1]+4*x[0]
-    u[1]=8+8*x[2]-5*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-2*x[2]+8*x[1]-6*x[0]
-    u[1]=8-4*x[2]+2*x[1]-6*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+7*x[2]-6*x[1]-9*x[0]
-    u[1]=2-9*x[2]+7*x[1]+2*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-9*x[2]+2*x[1]-9*x[0]
-    u[1]=5-7*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[2]+4*x[1]+6*x[0]
-    u[1]=(-8)-6*x[2]+6*x[1]+7*x[0]
-    A_test=Data(0.,(2,3,2,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=7
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=4
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=5
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-3)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-6)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=7*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=4
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[0,2,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=6
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=2
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=2
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-9)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,0]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-3)
-    B_test=Data(0.,(2,3,2),ReducedFunction(self.domain))
-    B_test[1,2,1]=x[2]
-    X_test=Data(0.,(2, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-3)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[2]+8*x[1]-6*x[0]
-    u[1]=(-4)+6*x[2]+x[1]+x[0]
-    u[2]=2+8*x[2]-6*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]-7*x[1]+7*x[0]
-    u[1]=(-6)+2*x[2]+6*x[1]+6*x[0]
-    u[2]=(-2)+3*x[2]-9*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-14))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[2]-9*x[1]-5*x[0]
-    u[1]=(-9)+x[2]-6*x[1]+2*x[0]
-    u[2]=6+4*x[2]+5*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-21))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[2]+4*x[1]-6*x[0]
-    u[1]=(-3)-5*x[2]+3*x[1]+2*x[0]
-    u[2]=(-7)-1*x[2]+6*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[2]-1*x[1]-3*x[0]
-    u[1]=(-3)+4*x[2]-2*x[1]-9*x[0]
-    u[2]=5+6*x[2]-6*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+8*x[2]-3*x[1]+8*x[0]
-    u[1]=(-2)-6*x[2]+7*x[1]+8*x[0]
-    u[2]=(-3)-8*x[2]-4*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[2]+8*x[1]-1*x[0]
-    u[1]=6-3*x[2]+4*x[1]+2*x[0]
-    u[2]=7+4*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[2]-6*x[1]-5*x[0]
-    u[1]=(-6)-3*x[2]+4*x[1]+8*x[0]
-    u[2]=6-1*x[2]+6*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+x[2]-8*x[1]+4*x[0]
-    u[1]=2+2*x[2]+4*x[1]+8*x[0]
-    u[2]=(-3)-4*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+8*x[2]-2*x[1]-5*x[0]
-    u[1]=3+x[2]-6*x[1]+5*x[0]
-    u[2]=(-7)-7*x[2]+2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]+7*x[1]-4*x[0]
-    u[1]=(-1)-7*x[2]-5*x[1]-1*x[0]
-    u[2]=(-1)-4*x[2]-2*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[2]-2*x[1]+7*x[0]
-    u[1]=(-8)-5*x[2]+8*x[1]-9*x[0]
-    u[2]=(-1)-7*x[2]-3*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]-6*x[1]-1*x[0]
-    u[1]=(-3)-8*x[2]-6*x[1]+3*x[0]
-    u[2]=(-8)-7*x[2]+5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[2]-4*x[1]+7*x[0]
-    u[1]=(-1)+5*x[2]-1*x[1]+4*x[0]
-    u[2]=(-2)-1*x[2]+7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]+7*x[1]-6*x[0]
-    u[1]=6-9*x[2]+8*x[1]-1*x[0]
-    u[2]=7+8*x[2]+8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-27))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[2]-1*x[1]+6*x[0]
-    u[1]=(-9)-7*x[2]+5*x[1]-3*x[0]
-    u[2]=(-4)+5*x[2]-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]+x[1]+4*x[0]
-    u[1]=4-1*x[2]-6*x[1]-9*x[0]
-    u[2]=5+4*x[2]+7*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[2]+x[1]-6*x[0]
-    u[1]=(-7)+5*x[2]-9*x[1]-5*x[0]
-    u[2]=4-6*x[2]+6*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-42))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]-7*x[1]-5*x[0]
-    u[1]=4-4*x[2]+7*x[1]-4*x[0]
-    u[2]=(-6)+5*x[2]-7*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-25))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[2]-9*x[1]-7*x[0]
-    u[1]=(-1)+6*x[2]+x[1]-6*x[0]
-    u[2]=(-4)+7*x[2]+x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-36))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]-2*x[1]+5*x[0]
-    u[1]=(-4)+8*x[2]+8*x[1]+4*x[0]
-    u[2]=(-9)+2*x[2]-9*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-15))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]-1*x[1]-4*x[0]
-    u[1]=3-3*x[2]+4*x[1]+4*x[0]
-    u[2]=(-1)+3*x[2]+4*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]-3*x[1]+6*x[0]
-    u[1]=(-4)-6*x[2]-4*x[1]-4*x[0]
-    u[2]=(-4)-7*x[2]-9*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[2]-9*x[1]+7*x[0]
-    u[1]=(-6)+8*x[2]-7*x[1]+7*x[0]
-    u[2]=3-4*x[2]-1*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[2]-1*x[1]+3*x[0]
-    u[1]=(-5)-1*x[2]+2*x[1]+4*x[0]
-    u[2]=(-3)+6*x[2]-7*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[2]+x[1]+5*x[0]
-    u[1]=(-9)+2*x[2]-7*x[1]-9*x[0]
-    u[2]=6-9*x[2]-6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-42))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]+6*x[1]+5*x[0]
-    u[1]=(-1)-1*x[2]+5*x[1]+5*x[0]
-    u[2]=6-9*x[2]+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-45))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[2]-5*x[1]-2*x[0]
-    u[1]=(-6)-4*x[2]+4*x[1]+7*x[0]
-    u[2]=5-5*x[2]-5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[2]-5*x[1]-2*x[0]
-    u[1]=(-2)-1*x[2]-7*x[1]-8*x[0]
-    u[2]=1-3*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+6*x[2]+2*x[1]-6*x[0]
-    u[1]=1+7*x[2]+x[1]+3*x[0]
-    u[2]=(-3)-8*x[2]-9*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[2]-3*x[1]-3*x[0]
-    u[1]=(-3)+x[2]-6*x[1]-2*x[0]
-    u[2]=(-3)-4*x[2]+5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[2]-4*x[1]-4*x[0]
-    u[1]=(-4)+2*x[2]-8*x[1]-9*x[0]
-    u[2]=(-4)+x[2]-7*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]+3*x[1]-4*x[0]
-    u[1]=7-6*x[2]-3*x[1]+7*x[0]
-    u[2]=(-8)-8*x[2]-4*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[2]-6*x[1]-5*x[0]
-    u[1]=(-6)-1*x[2]+8*x[1]+x[0]
-    u[2]=4-1*x[2]+4*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-63))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[2]+4*x[1]+4*x[0]
-    u[1]=6+3*x[2]+7*x[1]-3*x[0]
-    u[2]=(-8)+6*x[2]+4*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-8*x[1]+2*x[0]
-    u[1]=(-9)+3*x[2]-6*x[1]-6*x[0]
-    u[2]=1-8*x[2]+4*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]+6*x[1]-3*x[0]
-    u[1]=(-5)+x[2]-6*x[1]+2*x[0]
-    u[2]=7+6*x[2]+x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-3))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+6*x[2]-9*x[1]+6*x[0]
-    u[1]=(-7)-8*x[2]-1*x[1]+3*x[0]
-    u[2]=8-2*x[2]-8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-45))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[2]-6*x[1]-6*x[0]
-    u[1]=2+2*x[2]+5*x[1]-6*x[0]
-    u[2]=6-2*x[2]-1*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]+5*x[1]-3*x[0]
-    u[1]=8+4*x[2]-5*x[1]+3*x[0]
-    u[2]=4-3*x[2]-9*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[2]-4*x[1]-5*x[0]
-    u[1]=(-9)-6*x[2]+3*x[1]-4*x[0]
-    u[2]=(-9)-6*x[2]+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-8*x[2]-9*x[1]+3*x[0]
-    u[1]=(-8)-8*x[2]-9*x[1]-6*x[0]
-    u[2]=1-9*x[2]-7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-40))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]-7*x[1]+4*x[0]
-    u[1]=(-1)+8*x[2]-8*x[1]+3*x[0]
-    u[2]=(-8)+7*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]-8*x[1]+3*x[0]
-    u[1]=2-8*x[2]+5*x[1]-3*x[0]
-    u[2]=(-3)-2*x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[2]+4*x[1]-1*x[0]
-    u[1]=(-1)-9*x[2]+6*x[1]+4*x[0]
-    u[2]=6+6*x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[2]+3*x[1]+7*x[0]
-    u[1]=(-9)+6*x[2]-5*x[1]+3*x[0]
-    u[2]=(-1)+x[2]-6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[2]+x[1]-5*x[0]
-    u[1]=7+4*x[2]+2*x[1]+7*x[0]
-    u[2]=(-1)-8*x[2]-1*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[2]-5*x[1]-4*x[0]
-    u[1]=(-2)+3*x[2]-5*x[1]-4*x[0]
-    u[2]=6-9*x[2]-5*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-6))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[2]-8*x[1]-2*x[0]
-    u[1]=(-4)+4*x[2]+2*x[1]+x[0]
-    u[2]=4+7*x[2]+5*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[2]+2*x[1]-8*x[0]
-    u[1]=3+8*x[2]+7*x[1]-4*x[0]
-    u[2]=(-8)-8*x[2]-5*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[2]-7*x[1]-6*x[0]
-    u[1]=(-2)+5*x[2]+5*x[1]-3*x[0]
-    u[2]=2+8*x[2]+4*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(25)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[2]-5*x[1]-4*x[0]
-    u[1]=3+2*x[2]-6*x[1]-4*x[0]
-    u[2]=5-8*x[2]+6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[2]+8*x[1]-7*x[0]
-    u[1]=(-5)-3*x[2]-2*x[1]-3*x[0]
-    u[2]=(-9)+8*x[2]-8*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]-6*x[1]-5*x[0]
-    u[1]=(-3)+5*x[2]+7*x[1]-1*x[0]
-    u[2]=1+2*x[2]+2*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+5*x[2]-6*x[1]+5*x[0]
-    u[1]=4+x[2]-4*x[1]+5*x[0]
-    u[2]=8+x[2]+7*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(25)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[2]-3*x[1]-1*x[0]
-    u[1]=7-1*x[2]-2*x[1]-8*x[0]
-    u[2]=(-1)+3*x[2]+x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]-9*x[1]+5*x[0]
-    u[1]=(-6)-1*x[2]-9*x[1]-3*x[0]
-    u[2]=(-8)+4*x[2]+3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]-5*x[1]-9*x[0]
-    u[1]=6+x[2]-7*x[1]-9*x[0]
-    u[2]=(-1)-7*x[2]-9*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-63))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[2]+4*x[1]-5*x[0]
-    u[1]=(-6)+3*x[2]+x[1]-9*x[0]
-    u[2]=3+5*x[2]+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-1*x[2]+6*x[1]-1*x[0]
-    u[1]=(-5)-1*x[2]-9*x[1]-5*x[0]
-    u[2]=(-6)+3*x[2]+3*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-7*x[2]-7*x[1]-1*x[0]
-    u[1]=(-7)+5*x[2]+5*x[1]-4*x[0]
-    u[2]=(-3)-8*x[2]-6*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[2]-6*x[1]-2*x[0]
-    u[1]=4-9*x[2]+3*x[1]-3*x[0]
-    u[2]=(-9)-1*x[2]-2*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-1*x[2]-2*x[1]+2*x[0]
-    u[1]=(-2)-5*x[2]-6*x[1]-2*x[0]
-    u[2]=4-6*x[2]-5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-18))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[2]-7*x[1]+x[0]
-    u[1]=(-9)-2*x[2]+3*x[1]+4*x[0]
-    u[2]=(-7)-3*x[2]-1*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]+6*x[1]-2*x[0]
-    u[1]=(-7)-9*x[2]-1*x[1]-8*x[0]
-    u[2]=5+x[2]-1*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+x[2]-1*x[1]-3*x[0]
-    u[1]=3+3*x[2]-3*x[1]+3*x[0]
-    u[2]=7-6*x[2]+7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]-6*x[1]-3*x[0]
-    u[1]=(-2)-5*x[2]+6*x[1]-4*x[0]
-    u[2]=(-6)+8*x[2]-6*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-32))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]+6*x[1]-8*x[0]
-    u[1]=(-5)-2*x[2]+6*x[1]+3*x[0]
-    u[2]=(-2)-6*x[2]-4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[2]+2*x[1]-2*x[0]
-    u[1]=(-9)-1*x[2]+x[1]-7*x[0]
-    u[2]=1-6*x[2]-5*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[2]-4*x[1]+6*x[0]
-    u[1]=(-8)-5*x[2]+4*x[1]+2*x[0]
-    u[2]=(-2)-9*x[2]-1*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]+2*x[1]-4*x[0]
-    u[1]=3-1*x[2]-1*x[1]+7*x[0]
-    u[2]=(-3)-7*x[2]-9*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-27))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[2]+7*x[1]+5*x[0]
-    u[1]=(-9)+4*x[2]-8*x[1]+7*x[0]
-    u[2]=4-8*x[2]+4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[2]+x[1]-3*x[0]
-    u[1]=8+2*x[2]-8*x[1]-5*x[0]
-    u[2]=(-3)-1*x[2]+6*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-24))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[2]+x[1]+4*x[0]
-    u[1]=1-3*x[2]-2*x[1]+x[0]
-    u[2]=6-6*x[2]-1*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(1)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-7*x[2]+2*x[1]+x[0]
-    u[1]=(-9)-4*x[2]+4*x[1]-1*x[0]
-    u[2]=1+x[2]+6*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-7))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[2]-2*x[1]-2*x[0]
-    u[1]=(-5)-1*x[2]-5*x[1]-9*x[0]
-    u[2]=6-6*x[2]+2*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-63))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+3*x[2]+7*x[1]-4*x[0]
-    u[1]=(-7)-5*x[2]-5*x[1]-6*x[0]
-    u[2]=7-9*x[2]-8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-10))
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[2]-9*x[1]+x[0]
-    u[1]=7+3*x[2]+7*x[1]-2*x[0]
-    u[2]=(-7)-9*x[2]-7*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+2*x[2]-3*x[1]+x[0]
-    u[1]=(-4)+8*x[2]-6*x[1]-5*x[0]
-    u[2]=8-7*x[2]+2*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]-6*x[1]+4*x[0]
-    u[1]=(-4)-2*x[2]+4*x[1]-8*x[0]
-    u[2]=(-7)-6*x[2]+3*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+4*x[2]+2*x[1]-8*x[0]
-    u[1]=7-6*x[2]-1*x[1]+2*x[0]
-    u[2]=6+7*x[2]+x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-5)
-    u[2]=(-9)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=4
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-8)
-    u[2]=8
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=7
-    u[2]=(-4)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=6
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-5)
-    u[2]=(-2)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-16))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-9)
-    u[2]=5
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-20))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=6
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=1
-    u[2]=(-2)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=6
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-40))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-2)
-    u[2]=3
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=2
-    u[2]=8
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-2)
-    u[2]=7
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-18))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=5
-    u[2]=5
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-3)
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-7)
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-4)
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=3
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-2))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-9)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-12))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=7
-    u[2]=(-2)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=5
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-30))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=8
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-42))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-1)
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=8
-    u[2]=4
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=1
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(36)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-9)
-    u[2]=8
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-9))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-6)
-    u[2]=2
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+x[2]-8*x[1]-8*x[0]
-    u[1]=(-2)-1*x[2]+4*x[1]-1*x[0]
-    u[2]=6+2*x[2]-2*x[1]+3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]+8*x[1]-4*x[0]
-    u[1]=5-2*x[2]+8*x[1]-4*x[0]
-    u[2]=5+5*x[2]+7*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,0,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]-2*x[1]-8*x[0]
-    u[1]=(-5)+x[2]-8*x[1]+7*x[0]
-    u[2]=(-8)+x[2]-2*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,0,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=49
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]-4*x[1]+2*x[0]
-    u[1]=1-5*x[2]-8*x[1]-4*x[0]
-    u[2]=2-9*x[2]+6*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[2]+3*x[1]+x[0]
-    u[1]=8+3*x[2]-8*x[1]+x[0]
-    u[2]=6+2*x[2]-3*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-48)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+2*x[1]-2*x[0]
-    u[1]=(-4)-5*x[2]-7*x[1]+7*x[0]
-    u[2]=(-5)-8*x[2]+4*x[1]+x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-20)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[2]+8*x[1]+3*x[0]
-    u[1]=(-7)-8*x[2]-6*x[1]+3*x[0]
-    u[2]=7+5*x[2]-7*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[2]-9*x[1]-8*x[0]
-    u[1]=(-3)-2*x[2]-8*x[1]+6*x[0]
-    u[2]=(-9)+4*x[2]+6*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[2]-4*x[1]-6*x[0]
-    u[1]=(-7)-1*x[2]+5*x[1]+3*x[0]
-    u[2]=7+8*x[2]-4*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-5*x[1]+2*x[0]
-    u[1]=(-7)+x[2]+3*x[1]-3*x[0]
-    u[2]=7+7*x[2]-8*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=10
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]-6*x[1]+8*x[0]
-    u[1]=(-7)+x[2]+x[1]+8*x[0]
-    u[2]=(-5)+6*x[2]+4*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,0,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+8*x[1]-6*x[0]
-    u[1]=6-9*x[2]-6*x[1]+7*x[0]
-    u[2]=(-7)+4*x[2]-7*x[1]+3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]+7*x[1]+2*x[0]
-    u[1]=(-2)-4*x[2]-1*x[1]-8*x[0]
-    u[2]=1-2*x[2]+6*x[1]+7*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[2]+4*x[1]-4*x[0]
-    u[1]=(-4)-4*x[2]+3*x[1]-8*x[0]
-    u[2]=1+5*x[2]+6*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=15
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[2]-7*x[1]-5*x[0]
-    u[1]=6-1*x[2]-6*x[1]+7*x[0]
-    u[2]=1-7*x[2]+6*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,1,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[2]-4*x[1]-4*x[0]
-    u[1]=(-3)+5*x[2]-3*x[1]-5*x[0]
-    u[2]=3-8*x[2]-1*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,2,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[2]-1*x[1]-4*x[0]
-    u[1]=(-1)-7*x[2]-9*x[1]-1*x[0]
-    u[2]=(-5)-2*x[2]-2*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]+3*x[1]-9*x[0]
-    u[1]=7+5*x[2]+6*x[1]+2*x[0]
-    u[2]=8+7*x[2]+8*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,2,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=42
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]-7*x[1]-2*x[0]
-    u[1]=(-8)-8*x[2]+5*x[1]-3*x[0]
-    u[2]=2-8*x[2]-5*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+5*x[2]-9*x[1]+7*x[0]
-    u[1]=(-7)-9*x[2]-5*x[1]-7*x[0]
-    u[2]=3-1*x[2]-5*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,0,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]+4*x[1]+3*x[0]
-    u[1]=4+3*x[2]-7*x[1]+6*x[0]
-    u[2]=5-9*x[2]+2*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[2]+3*x[1]+x[0]
-    u[1]=8+5*x[2]+x[1]+5*x[0]
-    u[2]=4+5*x[2]+x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,1,0]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]-6*x[1]-7*x[0]
-    u[1]=(-7)+5*x[2]+6*x[1]+6*x[0]
-    u[2]=2+5*x[2]-5*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=36
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-6*x[2]-5*x[1]-7*x[0]
-    u[1]=(-3)-3*x[2]-9*x[1]-6*x[0]
-    u[2]=(-9)-7*x[2]+x[1]-1*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-9)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]+8*x[1]+4*x[0]
-    u[1]=(-3)+7*x[2]+8*x[1]+6*x[0]
-    u[2]=7-1*x[2]-9*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,2,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[2]-4*x[1]-3*x[0]
-    u[1]=(-4)+6*x[2]+4*x[1]+3*x[0]
-    u[2]=(-4)+3*x[2]+4*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Const_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-4*x[1]-4*x[0]
-    u[1]=8+4*x[2]-2*x[1]+5*x[0]
-    u[2]=(-5)-1*x[2]+8*x[1]+5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,2,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]-2*x[1]+5*x[0]
-    u[1]=(-1)+4*x[2]-6*x[1]+x[0]
-    u[2]=(-1)+7*x[2]+3*x[1]-6*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)+6*x[2]-2*x[1]+5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[2]+6*x[1]-4*x[0]
-    u[1]=3-7*x[2]-8*x[1]+3*x[0]
-    u[2]=(-9)-6*x[2]-2*x[1]-8*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=18-42*x[2]-48*x[1]+18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[2]-2*x[1]-2*x[0]
-    u[1]=(-4)-5*x[2]+4*x[1]-8*x[0]
-    u[2]=7+4*x[2]-7*x[1]+2*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=28+16*x[2]-28*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[2]-1*x[1]-7*x[0]
-    u[1]=(-8)-4*x[2]+4*x[1]+5*x[0]
-    u[2]=(-8)+4*x[2]+6*x[1]-5*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4+16*x[2]-4*x[1]-28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]-4*x[1]-8*x[0]
-    u[1]=(-9)-3*x[2]+6*x[1]+2*x[0]
-    u[2]=7+x[2]+6*x[1]-4*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-63)-21*x[2]+42*x[1]+14*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[2]+2*x[1]+7*x[0]
-    u[1]=4+6*x[2]+4*x[1]-5*x[0]
-    u[2]=6-8*x[2]+5*x[1]+8*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=18-24*x[2]+15*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]-6*x[1]+x[0]
-    u[1]=6+3*x[2]-6*x[1]-7*x[0]
-    u[2]=4+4*x[2]-1*x[1]+3*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,0]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5+7*x[2]-6*x[1]+x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-8*x[2]-3*x[1]+4*x[0]
-    u[1]=(-4)+8*x[2]+2*x[1]-3*x[0]
-    u[2]=(-3)-8*x[2]+4*x[1]+7*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,1]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-12)+24*x[2]+6*x[1]-9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[2]+7*x[1]-8*x[0]
-    u[1]=(-7)-9*x[2]+3*x[1]+6*x[0]
-    u[2]=4-2*x[2]+5*x[1]-9*x[0]
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=16-8*x[2]+20*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]-5*x[1]-8*x[0]
-    u[1]=6-3*x[2]+3*x[1]-4*x[0]
-    u[2]=4+4*x[2]-8*x[1]+7*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=3
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-3)-27*x[2]-15*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]-3*x[1]-3*x[0]
-    u[1]=(-5)+2*x[2]-7*x[1]+5*x[0]
-    u[2]=6-7*x[2]-7*x[1]+5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=7
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-35)+14*x[2]-49*x[1]+35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]+7*x[1]-3*x[0]
-    u[1]=(-1)+5*x[2]-8*x[1]-4*x[0]
-    u[2]=8+3*x[2]-3*x[1]-4*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,2]=8
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=64+24*x[2]-24*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[2]+2*x[1]-9*x[0]
-    u[1]=8-8*x[2]+6*x[1]-6*x[0]
-    u[2]=4+3*x[2]-5*x[1]-2*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=2
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=10-6*x[2]+4*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[2]+7*x[1]-8*x[0]
-    u[1]=(-2)-1*x[2]+7*x[1]+4*x[0]
-    u[2]=1+6*x[2]+x[1]-8*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=7
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-14)-7*x[2]+49*x[1]+28*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[2]-7*x[1]-6*x[0]
-    u[1]=7-7*x[2]-3*x[1]-7*x[0]
-    u[2]=1-1*x[2]+5*x[1]+4*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,2]=8
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=8-8*x[2]+40*x[1]+32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[2]-8*x[1]+7*x[0]
-    u[1]=(-4)+x[2]-3*x[1]-3*x[0]
-    u[2]=(-8)+4*x[2]-1*x[1]+4*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,0]=8
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=40+16*x[2]-64*x[1]+56*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+8*x[2]+6*x[1]-9*x[0]
-    u[1]=(-3)-4*x[2]+x[1]-9*x[0]
-    u[2]=(-9)+2*x[2]-2*x[1]-5*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,1]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-3)-4*x[2]+x[1]-9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Const_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[2]-3*x[1]-6*x[0]
-    u[1]=(-7)-7*x[2]-4*x[1]-8*x[0]
-    u[2]=5-8*x[2]+6*x[1]+8*x[0]
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,2]=1
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=5-8*x[2]+6*x[1]+8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]+3*x[1]-6*x[0]
-    u[1]=(-6)+3*x[2]+2*x[1]-8*x[0]
-    u[2]=7+x[2]-6*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]-7*x[1]-2*x[0]
-    u[1]=(-9)+7*x[2]+8*x[1]-8*x[0]
-    u[2]=(-1)+8*x[2]+4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-7)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[2]+4*x[1]+4*x[0]
-    u[1]=1-3*x[2]-8*x[1]+5*x[0]
-    u[2]=6+4*x[2]-4*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+6*x[2]-1*x[1]+3*x[0]
-    u[1]=(-3)+6*x[2]-4*x[1]-8*x[0]
-    u[2]=2+2*x[2]-1*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+x[2]-5*x[1]+5*x[0]
-    u[1]=4+4*x[2]+3*x[1]+5*x[0]
-    u[2]=(-7)+6*x[2]-6*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-5*x[2]+3*x[1]-5*x[0]
-    u[1]=(-9)-8*x[2]-6*x[1]+3*x[0]
-    u[2]=(-1)+x[2]-8*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[2]+4*x[1]+6*x[0]
-    u[1]=8-3*x[2]-5*x[1]-9*x[0]
-    u[2]=(-3)-7*x[2]-3*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[2]+8*x[1]-3*x[0]
-    u[1]=(-4)-4*x[2]-1*x[1]-8*x[0]
-    u[2]=8-6*x[2]-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[2]-9*x[1]-6*x[0]
-    u[1]=4-1*x[2]-7*x[1]+5*x[0]
-    u[2]=4+8*x[2]+4*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]-1*x[1]+5*x[0]
-    u[1]=(-7)+4*x[2]+3*x[1]-3*x[0]
-    u[2]=1-8*x[2]+2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(5*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]+3*x[1]+3*x[0]
-    u[1]=(-1)-5*x[2]+x[1]+5*x[0]
-    u[2]=(-2)-8*x[2]+7*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]+x[1]-2*x[0]
-    u[1]=(-1)-8*x[2]-6*x[1]+7*x[0]
-    u[2]=(-9)-1*x[2]-5*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]+5*x[1]-6*x[0]
-    u[1]=(-9)+6*x[2]-5*x[1]-1*x[0]
-    u[2]=8-9*x[2]-7*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]+4*x[1]+x[0]
-    u[1]=(-8)+2*x[2]+4*x[1]+4*x[0]
-    u[2]=(-2)+6*x[2]-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]+4*x[1]-9*x[0]
-    u[1]=4-1*x[2]-7*x[1]+4*x[0]
-    u[2]=(-7)-6*x[2]+x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[2]+6*x[1]-7*x[0]
-    u[1]=1-4*x[2]+3*x[1]-7*x[0]
-    u[2]=(-7)+7*x[2]+x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[2]-6*x[1]-3*x[0]
-    u[1]=(-2)-3*x[2]+2*x[1]+7*x[0]
-    u[2]=(-9)-1*x[2]-1*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]-7*x[1]-8*x[0]
-    u[1]=3-6*x[2]+7*x[1]-6*x[0]
-    u[2]=1+7*x[2]+x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+2*x[2]+2*x[1]-7*x[0]
-    u[1]=(-4)-8*x[2]-4*x[1]-5*x[0]
-    u[2]=(-5)-9*x[2]-7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-7)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[2]-7*x[1]+5*x[0]
-    u[1]=7-2*x[2]+7*x[1]+7*x[0]
-    u[2]=(-1)+3*x[2]-1*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-7)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+6*x[2]+7*x[1]-7*x[0]
-    u[1]=4-5*x[2]+5*x[1]-3*x[0]
-    u[2]=3-4*x[2]-9*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(6*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[2]-3*x[1]-6*x[0]
-    u[1]=2-1*x[2]+x[1]-4*x[0]
-    u[2]=(-3)-4*x[2]-6*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[2]+x[1]+8*x[0]
-    u[1]=(-7)-9*x[2]-6*x[1]-7*x[0]
-    u[2]=(-7)-2*x[2]+4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[2]+4*x[1]+2*x[0]
-    u[1]=(-4)+4*x[2]-6*x[1]-7*x[0]
-    u[2]=(-7)-7*x[2]-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(4*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]-5*x[1]+4*x[0]
-    u[1]=2-9*x[2]+6*x[1]+4*x[0]
-    u[2]=(-8)+7*x[2]+x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[2]-4*x[1]+5*x[0]
-    u[1]=(-1)-5*x[2]+3*x[1]-3*x[0]
-    u[2]=2+3*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(6*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+4*x[2]+5*x[1]+5*x[0]
-    u[1]=(-1)+4*x[2]-7*x[1]-7*x[0]
-    u[2]=(-5)-6*x[2]-5*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[2]+6*x[1]-2*x[0]
-    u[1]=(-4)-6*x[2]+3*x[1]-4*x[0]
-    u[2]=(-5)-1*x[2]+4*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]-8*x[1]-8*x[0]
-    u[1]=(-3)+5*x[2]+6*x[1]+6*x[0]
-    u[2]=6+8*x[2]+2*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]+3*x[1]+3*x[0]
-    u[1]=1+4*x[2]+6*x[1]-1*x[0]
-    u[2]=(-3)+5*x[2]+7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[2]+5*x[1]-9*x[0]
-    u[1]=(-4)+6*x[2]-6*x[1]-8*x[0]
-    u[2]=(-9)+6*x[2]+2*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[2]-2*x[1]+2*x[0]
-    u[1]=5-1*x[2]+6*x[1]-4*x[0]
-    u[2]=7-4*x[2]+x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[2]+3*x[1]+5*x[0]
-    u[1]=(-2)-2*x[2]+3*x[1]-1*x[0]
-    u[2]=(-4)-3*x[2]+3*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[2]-8*x[1]+x[0]
-    u[1]=2+6*x[2]-5*x[1]-9*x[0]
-    u[2]=(-1)+4*x[2]-4*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[2]+6*x[1]+5*x[0]
-    u[1]=(-2)+5*x[2]-1*x[1]+4*x[0]
-    u[2]=7+4*x[2]+3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+x[2]+6*x[1]-4*x[0]
-    u[1]=(-9)+5*x[2]-6*x[1]+3*x[0]
-    u[2]=(-7)+4*x[2]+x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(4*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-2*x[2]-8*x[1]+7*x[0]
-    u[1]=6-9*x[2]+7*x[1]-7*x[0]
-    u[2]=5-6*x[2]-5*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[2]-6*x[1]-7*x[0]
-    u[1]=1+8*x[2]-8*x[1]+6*x[0]
-    u[2]=8+x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]-7*x[1]+7*x[0]
-    u[1]=(-5)+x[2]-9*x[1]+4*x[0]
-    u[2]=(-9)+2*x[2]-2*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]-1*x[1]-4*x[0]
-    u[1]=(-5)+4*x[2]+2*x[1]-8*x[0]
-    u[2]=4+5*x[2]+6*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]+2*x[1]-8*x[0]
-    u[1]=(-5)-6*x[2]-2*x[1]+5*x[0]
-    u[2]=2-6*x[2]-2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+3*x[2]-1*x[1]-4*x[0]
-    u[1]=4-7*x[2]-9*x[1]-1*x[0]
-    u[2]=5-7*x[2]-9*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-3*x[2]+5*x[1]-4*x[0]
-    u[1]=3+6*x[2]+3*x[1]-6*x[0]
-    u[2]=(-4)+3*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-7)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+x[2]-9*x[1]-9*x[0]
-    u[1]=1-9*x[2]-6*x[1]+3*x[0]
-    u[2]=6+8*x[2]-1*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-3*x[2]-5*x[1]+8*x[0]
-    u[1]=3+x[2]+4*x[1]+8*x[0]
-    u[2]=(-9)+7*x[2]-7*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-6*x[2]+6*x[1]+5*x[0]
-    u[1]=(-7)+5*x[2]+4*x[1]-7*x[0]
-    u[2]=8-7*x[2]+3*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(5*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]-8*x[1]+7*x[0]
-    u[1]=(-3)-4*x[2]+x[1]-2*x[0]
-    u[2]=(-2)+8*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-8)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]-1*x[1]-9*x[0]
-    u[1]=6-7*x[2]+x[1]-4*x[0]
-    u[2]=(-2)-1*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+4*x[2]-3*x[1]+x[0]
-    u[1]=(-9)-9*x[2]-1*x[1]-9*x[0]
-    u[2]=(-8)+6*x[2]-7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-9)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-8*x[2]-3*x[1]-9*x[0]
-    u[1]=4+5*x[2]+7*x[1]+7*x[0]
-    u[2]=(-4)-8*x[2]-2*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]+2*x[1]+6*x[0]
-    u[1]=(-1)-8*x[2]-1*x[1]-7*x[0]
-    u[2]=(-1)+3*x[2]+6*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-8)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]-7*x[1]+7*x[0]
-    u[1]=(-7)+5*x[2]-4*x[1]+4*x[0]
-    u[2]=(-2)+5*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(2*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]-7*x[1]-7*x[0]
-    u[1]=5-2*x[2]+3*x[1]-9*x[0]
-    u[2]=8-1*x[2]+6*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(6*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-8*x[2]+7*x[1]-8*x[0]
-    u[1]=(-8)-4*x[2]-7*x[1]-9*x[0]
-    u[2]=5-6*x[2]-3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]+x[1]+8*x[0]
-    u[1]=1+4*x[2]+5*x[1]+6*x[0]
-    u[2]=8-9*x[2]+8*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+x[2]+2*x[1]+8*x[0]
-    u[1]=5-8*x[2]-2*x[1]-8*x[0]
-    u[2]=4-2*x[2]-4*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-1*x[2]-3*x[1]-8*x[0]
-    u[1]=8-9*x[2]+2*x[1]+8*x[0]
-    u[2]=5-2*x[2]-6*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-2*x[2]-7*x[1]-3*x[0]
-    u[1]=7-1*x[2]+6*x[1]+8*x[0]
-    u[2]=(-8)-5*x[2]-9*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[2]+2*x[1]+6*x[0]
-    u[1]=(-7)-2*x[2]+3*x[1]+5*x[0]
-    u[2]=(-6)-7*x[2]+8*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+4*x[2]+7*x[1]+6*x[0]
-    u[1]=(-7)+3*x[2]-2*x[1]-1*x[0]
-    u[2]=(-7)+5*x[2]-9*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(3*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]-5*x[1]-8*x[0]
-    u[1]=(-4)-7*x[2]+2*x[1]-4*x[0]
-    u[2]=(-3)-1*x[2]+3*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(5*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+x[2]-1*x[1]-9*x[0]
-    u[1]=1+3*x[2]+2*x[1]+8*x[0]
-    u[2]=(-7)+x[2]-9*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[2]-2*x[1]-7*x[0]
-    u[1]=6+2*x[2]+x[1]+5*x[0]
-    u[2]=5+7*x[2]-1*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(7*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]-1*x[1]-6*x[0]
-    u[1]=(-7)-7*x[2]-1*x[1]-2*x[0]
-    u[2]=6+x[2]-2*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-6)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]-8*x[1]-8*x[0]
-    u[1]=(-4)+5*x[2]+6*x[1]-4*x[0]
-    u[2]=(-5)-9*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]+5*x[1]-5*x[0]
-    u[1]=3+4*x[2]-8*x[1]+4*x[0]
-    u[2]=(-5)+7*x[2]-1*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(6*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-6*x[2]-5*x[1]-6*x[0]
-    u[1]=(-9)+7*x[2]-6*x[1]-2*x[0]
-    u[2]=(-8)+6*x[2]+3*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-2)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[2]+8*x[1]-6*x[0]
-    u[1]=(-7)-3*x[2]-8*x[1]+5*x[0]
-    u[2]=4+3*x[2]-1*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+7*x[2]-7*x[1]+6*x[0]
-    u[1]=(-5)+x[2]-8*x[1]-9*x[0]
-    u[2]=(-6)-5*x[2]-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]+8*x[1]-3*x[0]
-    u[1]=3+8*x[2]+7*x[1]-8*x[0]
-    u[2]=(-1)+x[2]+7*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-9)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-1*x[2]-3*x[1]+6*x[0]
-    u[1]=2+2*x[2]-3*x[1]+2*x[0]
-    u[2]=(-3)+8*x[2]+4*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]-5*x[1]-2*x[0]
-    u[1]=4+8*x[2]-6*x[1]-6*x[0]
-    u[2]=3+2*x[2]+4*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(2*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]+4*x[1]+4*x[0]
-    u[1]=(-4)-8*x[2]+5*x[1]+8*x[0]
-    u[2]=4-9*x[2]-7*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(4*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[2]+5*x[1]-4*x[0]
-    u[1]=5-9*x[2]-6*x[1]-4*x[0]
-    u[2]=(-1)-9*x[2]-2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(5*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[2]-5*x[1]+3*x[0]
-    u[1]=1-8*x[2]-7*x[1]-4*x[0]
-    u[2]=(-7)-7*x[2]+7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]+2*x[1]+5*x[0]
-    u[1]=2-1*x[2]+3*x[1]-6*x[0]
-    u[2]=3+6*x[2]-9*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-6)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[2]-7*x[1]+6*x[0]
-    u[1]=3+4*x[2]+5*x[1]-3*x[0]
-    u[2]=(-2)+8*x[2]+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(5*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[2]+x[1]+5*x[0]
-    u[1]=(-6)-4*x[2]-8*x[1]+2*x[0]
-    u[2]=1+8*x[2]+3*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-4)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-3*x[2]-1*x[1]-4*x[0]
-    u[1]=(-9)-3*x[2]-2*x[1]-7*x[0]
-    u[2]=(-4)-6*x[2]+3*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[2]+x[1]-3*x[0]
-    u[1]=3+3*x[2]+4*x[1]+8*x[0]
-    u[2]=(-6)-8*x[2]-5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeStrong_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]-8*x[1]+7*x[0]
-    u[1]=(-5)+6*x[2]-9*x[1]-8*x[0]
-    u[2]=(-6)-5*x[2]+6*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=7
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-2)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-9)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-9)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-5)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=7
-    u[2]=4
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-8)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-5)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=7
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(8*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-7)
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-7)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-9)
-    u[2]=(-2)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-2)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-8)
-    u[2]=2
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=(-8)
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-8)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=6
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-1)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=1
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(4*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-5)
-    u[2]=3
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-1)
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=4
-    u[2]=(-2)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(8*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-3)
-    u[2]=8
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-3)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-4)
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-7)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-6)
-    u[2]=2
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    u[2]=3
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(2*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-4)
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-6)*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-6)
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-5)
-    u[2]=4
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-5)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=2
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-1)*x[1])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-3)
-    u[2]=7
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(7*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-1)
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-1)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=1
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5
-    n=self.setNormal(ReducedFunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-5)*x[2])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-1*x[2]+x[1]+x[0]
-    u[1]=1+2*x[2]+6*x[1]-8*x[0]
-    u[2]=7+5*x[2]+4*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[2]+7*x[1]-1*x[0]
-    u[1]=(-8)-8*x[2]+7*x[1]+4*x[0]
-    u[2]=2+7*x[2]+5*x[1]-9*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[2]-2*x[1]-8*x[0]
-    u[1]=6+4*x[2]-7*x[1]+3*x[0]
-    u[2]=(-6)+4*x[2]-2*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+2*x[2]-9*x[1]+7*x[0]
-    u[1]=2+2*x[2]+4*x[1]+2*x[0]
-    u[2]=1-1*x[2]-8*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[2]-7*x[1]+2*x[0]
-    u[1]=8-8*x[2]-6*x[1]-5*x[0]
-    u[2]=(-5)+7*x[2]-7*x[1]+4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-9*x[2]-3*x[1]-4*x[0]
-    u[1]=6+x[2]-6*x[1]-4*x[0]
-    u[2]=(-7)-5*x[2]+8*x[1]-8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[2]-1*x[1]+x[0]
-    u[1]=(-3)+3*x[2]-3*x[1]-3*x[0]
-    u[2]=4+x[2]+x[1]+3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[2]-4*x[1]+3*x[0]
-    u[1]=4-8*x[2]+2*x[1]+x[0]
-    u[2]=(-3)+2*x[2]+8*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+4*x[2]+8*x[1]-7*x[0]
-    u[1]=(-3)-2*x[2]-4*x[1]-3*x[0]
-    u[2]=(-7)+x[2]+8*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[0,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[2]+x[1]-3*x[0]
-    u[1]=(-4)-2*x[2]-2*x[1]+2*x[0]
-    u[2]=4+4*x[2]+6*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-2*x[2]-9*x[1]-6*x[0]
-    u[1]=5-8*x[2]-4*x[1]+2*x[0]
-    u[2]=(-2)-6*x[2]+4*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[2]+x[1]-6*x[0]
-    u[1]=1-5*x[2]-1*x[1]+5*x[0]
-    u[2]=6+8*x[2]-5*x[1]-3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]+7*x[1]+8*x[0]
-    u[1]=(-3)+3*x[2]-7*x[1]+6*x[0]
-    u[2]=7+7*x[2]-5*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[2]+8*x[1]-6*x[0]
-    u[1]=5+5*x[2]-5*x[1]-3*x[0]
-    u[2]=(-6)+5*x[2]+8*x[1]-2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[2]-5*x[1]+5*x[0]
-    u[1]=(-8)+6*x[2]-9*x[1]+3*x[0]
-    u[2]=(-1)+3*x[2]-3*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]-6*x[1]+5*x[0]
-    u[1]=(-1)-8*x[2]-2*x[1]+x[0]
-    u[2]=(-5)+7*x[2]+7*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[2]+2*x[1]+4*x[0]
-    u[1]=(-6)+4*x[2]+x[1]-8*x[0]
-    u[2]=(-5)+6*x[2]+7*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=7*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[2]-5*x[1]+8*x[0]
-    u[1]=(-9)+7*x[2]+x[1]+7*x[0]
-    u[2]=5+8*x[2]+8*x[1]+8*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[1,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[2]-9*x[1]-4*x[0]
-    u[1]=(-3)+6*x[2]-5*x[1]-7*x[0]
-    u[2]=1-7*x[2]-9*x[1]+2*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]-8*x[1]-2*x[0]
-    u[1]=5+3*x[2]-2*x[1]+4*x[0]
-    u[2]=(-1)+8*x[2]-4*x[1]+x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,0,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+2*x[2]-2*x[1]-4*x[0]
-    u[1]=5+5*x[2]+8*x[1]+4*x[0]
-    u[2]=(-4)+8*x[2]-5*x[1]-5*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,0,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[2]-7*x[1]+5*x[0]
-    u[1]=3+2*x[2]-8*x[1]+5*x[0]
-    u[2]=5+6*x[2]-8*x[1]-1*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[2]+x[1]+8*x[0]
-    u[1]=2-5*x[2]-1*x[1]+7*x[0]
-    u[2]=4+7*x[2]-4*x[1]-4*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[2]-2*x[1]+5*x[0]
-    u[1]=(-9)-3*x[2]-4*x[1]-6*x[0]
-    u[2]=(-3)+4*x[2]+7*x[1]+3*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,1,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]-3*x[1]+7*x[0]
-    u[1]=(-8)-7*x[2]+4*x[1]+8*x[0]
-    u[2]=8+2*x[2]+2*x[1]-7*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[2]+x[1]-8*x[0]
-    u[1]=4-6*x[2]-1*x[1]+5*x[0]
-    u[2]=3-4*x[2]-1*x[1]-6*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,2,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_C_Vario_typeStrong_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[2]+8*x[1]+4*x[0]
-    u[1]=(-4)-1*x[2]-1*x[1]+3*x[0]
-    u[2]=3-6*x[2]-8*x[1]+6*x[0]
-    C_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    C_test[2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(C_reduced=C_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-1)
-    u[2]=(-1)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=6
-    u[2]=(-5)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-5)
-    u[2]=5
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=1
-    u[2]=3
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=6
-    u[2]=(-6)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=8
-    u[2]=8
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[1,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=4
-    u[2]=(-5)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-6)
-    u[2]=1
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_D_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-7)
-    u[2]=(-4)
-    D_test=Data(0.,(3,3),ReducedFunction(self.domain))
-    D_test[2,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(D_reduced=D_test, Y_reduced=Y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp00(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=2
-    u[2]=(-3)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp01(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=8
-    u[2]=(-5)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp02(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=1
-    u[2]=(-2)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[0,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp10(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-9)
-    u[2]=1
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp11(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=7
-    u[2]=(-9)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp12(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-9)
-    u[2]=4
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[1,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[1]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp20(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-6)
-    u[2]=6
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,0]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp21(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-7)
-    u[2]=(-9)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,1]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_Vario_typeStrong_comp22(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-2)
-    u[2]=(-6)
-    d_test=Data(0.,(3,3),ReducedFunctionOnBoundary(self.domain))
-    d_test[2,2]=x[0]
-    y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_test[2]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_reduced=d_test, y_reduced=y_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]+4*x[1]-5*x[0]
-    u[1]=(-6)+x[2]+6*x[1]+4*x[0]
-    u[2]=2-7*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+6*x[2]-8*x[1]-3*x[0]
-    u[1]=(-6)+6*x[2]-1*x[1]+6*x[0]
-    u[2]=2-4*x[2]-6*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+8*x[2]-2*x[1]+8*x[0]
-    u[1]=(-3)-9*x[2]-8*x[1]+3*x[0]
-    u[2]=2+x[2]-5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]-9*x[1]-7*x[0]
-    u[1]=2-2*x[2]+3*x[1]-8*x[0]
-    u[2]=(-7)+6*x[2]+5*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+7*x[2]+6*x[1]-4*x[0]
-    u[1]=(-3)+6*x[2]+8*x[1]-4*x[0]
-    u[2]=5-6*x[2]+2*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+4*x[2]-2*x[1]-7*x[0]
-    u[1]=(-7)+8*x[2]+5*x[1]-8*x[0]
-    u[2]=(-1)+6*x[2]-1*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]+6*x[1]-6*x[0]
-    u[1]=6+5*x[2]-8*x[1]+7*x[0]
-    u[2]=7+x[2]-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[2]-4*x[1]-9*x[0]
-    u[1]=6+5*x[2]-3*x[1]+7*x[0]
-    u[2]=(-9)+6*x[2]+8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-5*x[2]-2*x[1]-6*x[0]
-    u[1]=(-2)-5*x[2]+3*x[1]-3*x[0]
-    u[2]=3+3*x[2]-8*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-6*x[2]-2*x[1]-3*x[0]
-    u[1]=8+5*x[2]-4*x[1]+5*x[0]
-    u[2]=(-1)+7*x[2]-8*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]-5*x[1]-2*x[0]
-    u[1]=1+6*x[2]+8*x[1]-9*x[0]
-    u[2]=(-9)-2*x[2]+4*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-40)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]+4*x[1]+x[0]
-    u[1]=6-3*x[2]+3*x[1]-3*x[0]
-    u[2]=2-6*x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[2]-3*x[1]+3*x[0]
-    u[1]=(-4)-7*x[2]+x[1]+5*x[0]
-    u[2]=(-2)+5*x[2]-9*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[2]-9*x[1]-1*x[0]
-    u[1]=3+7*x[2]-7*x[1]-8*x[0]
-    u[2]=4-3*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+x[2]-3*x[1]-9*x[0]
-    u[1]=3-6*x[2]-9*x[1]-4*x[0]
-    u[2]=5-7*x[2]+4*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]+4*x[1]+2*x[0]
-    u[1]=3+7*x[2]+6*x[1]-8*x[0]
-    u[2]=(-2)+3*x[2]+6*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=20
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-5*x[2]+2*x[1]-1*x[0]
-    u[1]=5+4*x[2]-7*x[1]-5*x[0]
-    u[2]=1-9*x[2]-2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-14)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[2]-1*x[1]+4*x[0]
-    u[1]=8+2*x[2]-2*x[1]-1*x[0]
-    u[2]=(-3)-2*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,2]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]-5*x[1]-6*x[0]
-    u[1]=5-3*x[2]+x[1]+4*x[0]
-    u[2]=(-6)+x[2]+8*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[2]+8*x[1]-3*x[0]
-    u[1]=(-2)+7*x[2]+6*x[1]-8*x[0]
-    u[2]=(-5)-2*x[2]-3*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+5*x[2]-8*x[1]+3*x[0]
-    u[1]=(-6)+8*x[2]-2*x[1]-2*x[0]
-    u[2]=2-3*x[2]-2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=10
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]+4*x[1]+6*x[0]
-    u[1]=7-9*x[2]-6*x[1]-7*x[0]
-    u[2]=8+5*x[2]+2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[2]+5*x[1]+5*x[0]
-    u[1]=(-1)-4*x[2]-5*x[1]-8*x[0]
-    u[2]=8-5*x[2]-2*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-5)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-8*x[2]+4*x[1]-7*x[0]
-    u[1]=(-3)-5*x[2]-3*x[1]+7*x[0]
-    u[2]=8-6*x[2]+3*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-8*x[2]+4*x[1]-8*x[0]
-    u[1]=(-3)+6*x[2]-8*x[1]+8*x[0]
-    u[2]=4-7*x[2]-3*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]-7*x[1]-5*x[0]
-    u[1]=2-6*x[2]-2*x[1]+8*x[0]
-    u[2]=(-6)-1*x[2]-7*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-49)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+3*x[2]-7*x[1]+x[0]
-    u[1]=2-3*x[2]+3*x[1]+6*x[0]
-    u[2]=(-1)-4*x[2]+6*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-5*x[2]-4*x[1]+3*x[0]
-    u[1]=3-6*x[2]-2*x[1]+3*x[0]
-    u[2]=(-4)+3*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[2]-9*x[1]+4*x[0]
-    u[1]=(-2)-7*x[2]+8*x[1]+6*x[0]
-    u[2]=8+4*x[2]-4*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-54)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[2]+7*x[1]-7*x[0]
-    u[1]=5+7*x[2]+2*x[1]+5*x[0]
-    u[2]=(-3)+x[2]-7*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]-3*x[1]-8*x[0]
-    u[1]=(-6)-6*x[2]+x[1]-7*x[0]
-    u[2]=(-7)+2*x[2]+x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+2*x[2]-6*x[1]+8*x[0]
-    u[1]=8+2*x[2]+7*x[1]+3*x[0]
-    u[2]=4-5*x[2]-9*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]-8*x[1]+2*x[0]
-    u[1]=(-4)-2*x[2]-4*x[1]-7*x[0]
-    u[2]=2+7*x[2]+2*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+2*x[2]-7*x[1]-7*x[0]
-    u[1]=(-9)+7*x[2]-8*x[1]-7*x[0]
-    u[2]=4-9*x[2]+2*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=24
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]+5*x[1]+5*x[0]
-    u[1]=8-1*x[2]+4*x[1]-7*x[0]
-    u[2]=(-7)+6*x[2]+5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=5
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+6*x[2]-3*x[1]-9*x[0]
-    u[1]=(-1)-7*x[2]-3*x[1]-3*x[0]
-    u[2]=(-5)-9*x[2]-5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-4*x[2]-7*x[1]+3*x[0]
-    u[1]=(-2)+x[2]-7*x[1]+4*x[0]
-    u[2]=(-1)+6*x[2]+7*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=15
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]+4*x[1]+x[0]
-    u[1]=(-8)+2*x[2]-3*x[1]+3*x[0]
-    u[2]=7-5*x[2]-3*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[2]+6*x[1]+7*x[0]
-    u[1]=(-6)-3*x[2]+3*x[1]-3*x[0]
-    u[2]=(-7)+5*x[2]+2*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[2]-6*x[1]-8*x[0]
-    u[1]=7+4*x[2]+8*x[1]+6*x[0]
-    u[2]=4-8*x[2]+7*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+2*x[2]+3*x[1]+x[0]
-    u[1]=4-8*x[2]+8*x[1]+4*x[0]
-    u[2]=5+6*x[2]+8*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]+x[1]-1*x[0]
-    u[1]=(-8)-9*x[2]-1*x[1]-2*x[0]
-    u[2]=(-2)-7*x[2]+5*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-6*x[2]-2*x[1]+4*x[0]
-    u[1]=(-7)+6*x[2]-1*x[1]+4*x[0]
-    u[2]=(-6)+6*x[2]-3*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[2]-9*x[1]+6*x[0]
-    u[1]=4-9*x[2]-7*x[1]-4*x[0]
-    u[2]=(-2)+7*x[2]-3*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[2]+8*x[1]+6*x[0]
-    u[1]=8-9*x[2]-1*x[1]-1*x[0]
-    u[2]=4-4*x[2]+5*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,2]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+3*x[2]+3*x[1]-8*x[0]
-    u[1]=(-4)-6*x[2]-3*x[1]-4*x[0]
-    u[2]=2-4*x[2]+2*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-64)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[2]+8*x[1]+4*x[0]
-    u[1]=(-4)+7*x[2]-3*x[1]-8*x[0]
-    u[2]=(-2)-8*x[2]-4*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-1*x[2]+x[1]-1*x[0]
-    u[1]=5-8*x[2]-2*x[1]+2*x[0]
-    u[2]=2-7*x[2]-4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+2*x[2]+x[1]-4*x[0]
-    u[1]=(-7)-7*x[2]+6*x[1]+8*x[0]
-    u[2]=7+2*x[2]+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]+7*x[1]+5*x[0]
-    u[1]=4-8*x[2]+6*x[1]-8*x[0]
-    u[2]=5-3*x[2]-6*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=18
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]-1*x[1]-5*x[0]
-    u[1]=2+8*x[2]+6*x[1]+8*x[0]
-    u[2]=3-1*x[2]-3*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=48
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+8*x[2]-5*x[1]+2*x[0]
-    u[1]=7+2*x[2]-5*x[1]+x[0]
-    u[2]=8-9*x[2]-5*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,0]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]+8*x[1]-7*x[0]
-    u[1]=(-5)-9*x[2]-2*x[1]-9*x[0]
-    u[2]=(-1)+7*x[2]+7*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=42
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+8*x[2]+6*x[1]+6*x[0]
-    u[1]=(-6)-8*x[2]-2*x[1]-1*x[0]
-    u[2]=(-9)+2*x[2]+x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,2]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[2]+8*x[1]-9*x[0]
-    u[1]=(-4)+x[2]+7*x[1]+x[0]
-    u[2]=(-6)+4*x[2]+7*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]+x[1]+5*x[0]
-    u[1]=7-2*x[2]-9*x[1]-6*x[0]
-    u[2]=1+x[2]+3*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]-3*x[1]-8*x[0]
-    u[1]=3-1*x[2]-7*x[1]+8*x[0]
-    u[2]=6+6*x[2]+x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[2]-5*x[1]-6*x[0]
-    u[1]=4-2*x[2]+x[1]+x[0]
-    u[2]=3-4*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=5
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[2]+3*x[1]+4*x[0]
-    u[1]=3+4*x[2]-6*x[1]-8*x[0]
-    u[2]=(-6)-9*x[2]+8*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-3*x[2]-7*x[1]+7*x[0]
-    u[1]=3-4*x[2]-1*x[1]+4*x[0]
-    u[2]=(-7)-6*x[2]+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-28)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+2*x[2]+5*x[1]+2*x[0]
-    u[1]=7-7*x[2]+3*x[1]-3*x[0]
-    u[2]=(-2)+8*x[2]-5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-24)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[2]-6*x[1]-7*x[0]
-    u[1]=(-5)+5*x[2]+x[1]-2*x[0]
-    u[2]=(-1)-5*x[2]+3*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[2]+5*x[1]+3*x[0]
-    u[1]=(-8)+6*x[2]+6*x[1]+6*x[0]
-    u[2]=7-7*x[2]-4*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,2]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-35)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]-2*x[1]-4*x[0]
-    u[1]=4-3*x[2]+3*x[1]-2*x[0]
-    u[2]=(-9)+7*x[2]+8*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[2]+8*x[1]+3*x[0]
-    u[1]=1+3*x[2]-4*x[1]+6*x[0]
-    u[2]=(-4)-4*x[2]+5*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-9*x[2]-4*x[1]-3*x[0]
-    u[1]=(-7)+6*x[2]+2*x[1]-9*x[0]
-    u[2]=(-5)+7*x[2]+8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-1*x[2]-5*x[1]+7*x[0]
-    u[1]=(-6)-1*x[2]-3*x[1]-4*x[0]
-    u[2]=5-6*x[2]+x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]-8*x[1]-3*x[0]
-    u[1]=(-2)+2*x[2]+4*x[1]-8*x[0]
-    u[2]=1+x[2]-1*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-6*x[2]-2*x[1]-8*x[0]
-    u[1]=(-1)+7*x[2]+2*x[1]+8*x[0]
-    u[2]=(-6)+2*x[2]+7*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,2]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=56
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-2*x[2]-1*x[1]+6*x[0]
-    u[1]=(-8)-3*x[2]-1*x[1]-2*x[0]
-    u[2]=(-1)-5*x[2]+7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-12)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+3*x[2]-9*x[1]-3*x[0]
-    u[1]=1+x[2]-5*x[1]+8*x[0]
-    u[2]=6-2*x[2]-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-18)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-6*x[2]+x[1]-4*x[0]
-    u[1]=4+4*x[2]-7*x[1]+7*x[0]
-    u[2]=(-3)-7*x[2]+5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,2]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-21)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-7*x[2]-8*x[1]+3*x[0]
-    u[1]=3-2*x[2]-6*x[1]-6*x[0]
-    u[2]=(-1)-2*x[2]+3*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-4*x[2]-9*x[1]-4*x[0]
-    u[1]=(-2)+2*x[2]-4*x[1]+3*x[0]
-    u[2]=(-1)+x[2]-5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+x[2]+4*x[1]+3*x[0]
-    u[1]=1+x[2]+4*x[1]-1*x[0]
-    u[2]=8+4*x[2]-7*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=2
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+2*x[2]-1*x[1]-3*x[0]
-    u[1]=(-6)-5*x[2]-7*x[1]+4*x[0]
-    u[2]=(-9)-3*x[2]-3*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,0]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=16
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]-7*x[1]+3*x[0]
-    u[1]=(-9)+x[2]+5*x[1]-2*x[0]
-    u[2]=(-9)-1*x[2]+8*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,1]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=5
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[2]-7*x[1]-5*x[0]
-    u[1]=8-4*x[2]-1*x[1]-4*x[0]
-    u[2]=4-6*x[2]-3*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,2]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[2]+4*x[1]-7*x[0]
-    u[1]=4-4*x[2]+3*x[1]-5*x[0]
-    u[2]=(-8)-2*x[2]-1*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-27)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+2*x[2]-1*x[1]-5*x[0]
-    u[1]=(-9)+5*x[2]+x[1]+2*x[0]
-    u[2]=(-8)+6*x[2]-8*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,1]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-32)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Const_typeWeak_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]+4*x[1]+6*x[0]
-    u[1]=(-7)+5*x[2]-1*x[1]-2*x[0]
-    u[2]=(-8)-9*x[2]-5*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-63)
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-7)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-15)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-1)
-    u[2]=7
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=(-3)
-    u[2]=8
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=40
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-6)
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=9
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=1
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=3
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=3
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-3)
-    u[2]=3
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=2
-    u[2]=3
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-45)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=1
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=6
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,2]=1
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=4
-    u[2]=2
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=12
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=1
-    u[2]=(-3)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=6
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)
-    u[1]=(-4)
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=7
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)
-    u[1]=(-6)
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-45)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)
-    u[1]=3
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=21
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-1)
-    u[2]=(-2)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-4)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-9)
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,0]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-30)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-1)
-    u[2]=5
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,1]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-3)
-    u[2]=(-4)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-8)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-8)
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=8
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-56)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-9)
-    u[2]=7
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=6
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-54)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=4
-    u[2]=7
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=14
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=7
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=4
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=8
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=5
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=25
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=3
-    u[2]=7
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=5
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=35
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)
-    u[1]=(-9)
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,0]=2
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-16)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-1)
-    u[2]=(-9)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,1]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-7)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Const_typeWeak_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=8
-    u[2]=(-6)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,2]=7
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-42)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]-5*x[1]+x[0]
-    u[1]=2-8*x[2]-8*x[1]+x[0]
-    u[2]=(-6)+2*x[2]-2*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[2]+7*x[1]+2*x[0]
-    u[1]=(-3)+x[2]-1*x[1]+x[0]
-    u[2]=6+4*x[2]-2*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[2]+x[1]+5*x[0]
-    u[1]=(-1)-4*x[2]+8*x[1]-1*x[0]
-    u[2]=(-6)-7*x[2]-5*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+3*x[2]-1*x[1]+7*x[0]
-    u[1]=(-1)+x[2]+x[1]+7*x[0]
-    u[2]=4-1*x[2]+3*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]+8*x[1]+3*x[0]
-    u[1]=5-8*x[2]+4*x[1]+5*x[0]
-    u[2]=(-5)+5*x[2]+x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+6*x[2]+x[1]-1*x[0]
-    u[1]=(-7)-7*x[2]-4*x[1]-6*x[0]
-    u[2]=4+6*x[2]+x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,1,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+7*x[2]+5*x[1]-5*x[0]
-    u[1]=7+4*x[2]+5*x[1]-7*x[0]
-    u[2]=3-8*x[2]-2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+8*x[2]-4*x[1]-6*x[0]
-    u[1]=(-4)+6*x[2]-5*x[1]+7*x[0]
-    u[2]=8-8*x[2]-8*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-3*x[1]+2*x[0]
-    u[1]=(-6)+2*x[2]-8*x[1]-8*x[0]
-    u[2]=(-3)+3*x[2]-4*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,0,2,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[2]-1*x[1]-3*x[0]
-    u[1]=5+3*x[2]+3*x[1]-1*x[0]
-    u[2]=(-1)+5*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-1*x[2]-8*x[1]+2*x[0]
-    u[1]=7-6*x[2]+4*x[1]-8*x[0]
-    u[2]=6+7*x[2]-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-8)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]+5*x[1]-2*x[0]
-    u[1]=(-6)-6*x[2]-1*x[1]-7*x[0]
-    u[2]=2+6*x[2]-5*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,0,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]-7*x[1]+7*x[0]
-    u[1]=(-3)+2*x[2]-3*x[1]-4*x[0]
-    u[2]=(-1)+7*x[2]-2*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-4)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]-7*x[1]-1*x[0]
-    u[1]=8-8*x[2]+5*x[1]+8*x[0]
-    u[2]=(-9)+x[2]-5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+7*x[2]+4*x[1]-9*x[0]
-    u[1]=(-5)-9*x[2]-7*x[1]-3*x[0]
-    u[2]=2+3*x[2]+5*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[2]+8*x[1]+2*x[0]
-    u[1]=7+2*x[2]+3*x[1]-2*x[0]
-    u[2]=(-1)+5*x[2]-7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[2]-9*x[1]-1*x[0]
-    u[1]=(-3)+5*x[2]+7*x[1]+2*x[0]
-    u[2]=(-5)+6*x[2]+6*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]+7*x[1]+8*x[0]
-    u[1]=4-8*x[2]-3*x[1]+2*x[0]
-    u[2]=(-2)+8*x[2]-9*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,1,2,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]-1*x[1]-2*x[0]
-    u[1]=6+7*x[2]+7*x[1]+x[0]
-    u[2]=(-4)+8*x[2]-2*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]-7*x[1]+7*x[0]
-    u[1]=(-9)+x[2]+2*x[1]-8*x[0]
-    u[2]=8+2*x[2]+3*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-2*x[2]-5*x[1]+5*x[0]
-    u[1]=(-6)+x[2]-5*x[1]-8*x[0]
-    u[2]=7-4*x[2]+3*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,0,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]+8*x[1]+x[0]
-    u[1]=(-7)+5*x[2]+6*x[1]+7*x[0]
-    u[2]=(-8)+6*x[2]-3*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=7*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[2]+x[1]+2*x[0]
-    u[1]=2+5*x[2]-8*x[1]-6*x[0]
-    u[2]=(-8)+7*x[2]-8*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-5*x[2]-5*x[1]+7*x[0]
-    u[1]=1-9*x[2]-3*x[1]-5*x[0]
-    u[2]=7-2*x[2]-9*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,1,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-9*x[2]-7*x[1]+5*x[0]
-    u[1]=5+x[2]-6*x[1]+2*x[0]
-    u[2]=5+5*x[2]+4*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]+2*x[1]+3*x[0]
-    u[1]=(-2)-9*x[2]-5*x[1]+5*x[0]
-    u[2]=4+5*x[2]+3*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=3*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp0222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-3*x[2]-1*x[1]-8*x[0]
-    u[1]=8-8*x[2]+5*x[1]-6*x[0]
-    u[2]=(-3)-4*x[2]+5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[0,2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+6*x[2]+4*x[1]-6*x[0]
-    u[1]=(-5)-6*x[2]-1*x[1]-1*x[0]
-    u[2]=1-3*x[2]-3*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-4*x[2]-7*x[1]+6*x[0]
-    u[1]=(-6)+6*x[2]+6*x[1]+x[0]
-    u[2]=(-6)-4*x[2]-4*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[2]-6*x[1]+2*x[0]
-    u[1]=(-3)+3*x[2]+7*x[1]-4*x[0]
-    u[2]=(-3)+x[2]+4*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-5*x[2]+4*x[1]+x[0]
-    u[1]=(-3)+4*x[2]-1*x[1]-5*x[0]
-    u[2]=3-1*x[2]+x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]-9*x[1]-8*x[0]
-    u[1]=7-4*x[2]-1*x[1]-5*x[0]
-    u[2]=4+3*x[2]-4*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+x[2]+8*x[1]+3*x[0]
-    u[1]=4+8*x[2]+7*x[1]-1*x[0]
-    u[2]=(-9)-1*x[2]-7*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,1,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[2]-6*x[1]-3*x[0]
-    u[1]=(-6)-8*x[2]-9*x[1]-7*x[0]
-    u[2]=4+x[2]-3*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-4*x[2]+5*x[1]+7*x[0]
-    u[1]=(-4)-9*x[2]+5*x[1]+3*x[0]
-    u[2]=(-3)-9*x[2]+x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[2]+5*x[1]+4*x[0]
-    u[1]=(-6)+6*x[2]-9*x[1]+x[0]
-    u[2]=3+8*x[2]-4*x[1]-8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,0,2,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[2]-3*x[1]+6*x[0]
-    u[1]=6+5*x[2]+5*x[1]-8*x[0]
-    u[2]=(-5)-4*x[2]-4*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[2]+3*x[1]-9*x[0]
-    u[1]=(-7)+5*x[2]+6*x[1]+7*x[0]
-    u[2]=2-7*x[2]+4*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-6*x[2]+8*x[1]+2*x[0]
-    u[1]=(-6)+2*x[2]-4*x[1]-5*x[0]
-    u[2]=5-8*x[2]+6*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,0,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]+x[1]-2*x[0]
-    u[1]=(-2)-6*x[2]+x[1]+6*x[0]
-    u[2]=(-2)+2*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+x[2]+8*x[1]+4*x[0]
-    u[1]=(-1)+4*x[2]-2*x[1]-9*x[0]
-    u[2]=8-1*x[2]-5*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-4*x[2]+4*x[1]+2*x[0]
-    u[1]=(-9)-3*x[2]+x[1]-2*x[0]
-    u[2]=(-8)+4*x[2]+2*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=(-3)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[2]+6*x[1]-7*x[0]
-    u[1]=(-8)-3*x[2]-7*x[1]+3*x[0]
-    u[2]=(-1)+4*x[2]-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+5*x[2]-3*x[1]+5*x[0]
-    u[1]=2+6*x[2]+4*x[1]+7*x[0]
-    u[2]=(-6)-5*x[2]+8*x[1]+4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[2]+3*x[1]-6*x[0]
-    u[1]=2-9*x[2]-1*x[1]+4*x[0]
-    u[2]=(-9)+2*x[2]+5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,1,2,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]-8*x[1]-1*x[0]
-    u[1]=6-9*x[2]+2*x[1]+3*x[0]
-    u[2]=3+7*x[2]-1*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-1)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]+3*x[1]-4*x[0]
-    u[1]=(-9)-3*x[2]-8*x[1]-5*x[0]
-    u[2]=6-9*x[2]+2*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=3*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-9*x[2]-2*x[1]-7*x[0]
-    u[1]=(-5)-2*x[2]-2*x[1]+3*x[0]
-    u[2]=3+4*x[2]-4*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,0,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-9)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[2]+8*x[1]-9*x[0]
-    u[1]=(-5)-3*x[2]+5*x[1]+8*x[0]
-    u[2]=4+5*x[2]+2*x[1]-2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-2*x[2]+7*x[1]-3*x[0]
-    u[1]=7+x[2]+4*x[1]-2*x[0]
-    u[2]=1-2*x[2]-5*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-4*x[2]+5*x[1]-6*x[0]
-    u[1]=(-5)-5*x[2]+5*x[1]+4*x[0]
-    u[2]=5+6*x[2]+8*x[1]+8*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,1,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-5)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+4*x[2]+4*x[1]-9*x[0]
-    u[1]=(-7)+5*x[2]+6*x[1]+7*x[0]
-    u[2]=(-6)-1*x[2]+4*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-9*x[2]-7*x[1]-9*x[0]
-    u[1]=(-9)-9*x[2]-4*x[1]+x[0]
-    u[2]=4+x[2]+2*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp1222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+8*x[2]+7*x[1]+2*x[0]
-    u[1]=(-9)+7*x[2]-4*x[1]-6*x[0]
-    u[2]=5-6*x[2]+x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[1,2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-8*x[2]-3*x[1]+6*x[0]
-    u[1]=(-6)-2*x[2]-9*x[1]-2*x[0]
-    u[2]=(-8)+8*x[2]+2*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-3*x[2]+8*x[1]-5*x[0]
-    u[1]=(-8)-7*x[2]-1*x[1]-1*x[0]
-    u[2]=5+8*x[2]-1*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=8*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[2]-9*x[1]-5*x[0]
-    u[1]=8-9*x[2]-1*x[1]+6*x[0]
-    u[2]=(-9)-2*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-2*x[2]+6*x[1]+5*x[0]
-    u[1]=(-5)-3*x[2]+2*x[1]-6*x[0]
-    u[2]=(-6)-2*x[2]+8*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-6)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+3*x[2]-9*x[1]+2*x[0]
-    u[1]=(-6)+3*x[2]-7*x[1]+5*x[0]
-    u[2]=(-1)-9*x[2]+2*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[2]-6*x[1]-3*x[0]
-    u[1]=(-5)-4*x[2]-9*x[1]+4*x[0]
-    u[2]=8-1*x[2]+7*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,1,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+5*x[2]+5*x[1]-8*x[0]
-    u[1]=(-2)-1*x[2]-6*x[1]-5*x[0]
-    u[2]=1-1*x[2]-5*x[1]-9*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=(-9)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[2]+8*x[1]-6*x[0]
-    u[1]=(-5)-5*x[2]-9*x[1]-7*x[0]
-    u[2]=4+5*x[2]+7*x[1]-3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-2*x[2]+x[1]+x[0]
-    u[1]=3-9*x[2]-9*x[1]-6*x[0]
-    u[2]=8+3*x[2]+6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,0,2,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-3*x[2]+x[1]-9*x[0]
-    u[1]=(-4)-1*x[2]+x[1]+x[0]
-    u[2]=8+7*x[2]-6*x[1]+x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-9)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[2]-2*x[1]+7*x[0]
-    u[1]=(-3)-1*x[2]+4*x[1]-1*x[0]
-    u[2]=3+x[2]-6*x[1]+6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+2*x[2]+8*x[1]+7*x[0]
-    u[1]=4+2*x[2]-6*x[1]-1*x[0]
-    u[2]=5+4*x[2]+6*x[1]-5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,0,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=2*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-6*x[2]-9*x[1]-9*x[0]
-    u[1]=(-7)+8*x[2]+7*x[1]-1*x[0]
-    u[2]=(-8)-4*x[2]-8*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-1)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]-4*x[1]+8*x[0]
-    u[1]=(-5)+x[2]-5*x[1]+7*x[0]
-    u[2]=7-7*x[2]+7*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-5)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-7*x[2]-1*x[1]-4*x[0]
-    u[1]=(-3)-7*x[2]-1*x[1]-1*x[0]
-    u[2]=(-1)-2*x[2]+2*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-7)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-6*x[2]+3*x[1]+7*x[0]
-    u[1]=6+2*x[2]+6*x[1]-5*x[0]
-    u[2]=3+3*x[2]-5*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+7*x[2]-1*x[1]+8*x[0]
-    u[1]=5+7*x[2]-7*x[1]-5*x[0]
-    u[2]=(-8)-6*x[2]-2*x[1]-1*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-2)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+7*x[2]+4*x[1]+4*x[0]
-    u[1]=2-3*x[2]-5*x[1]-3*x[0]
-    u[2]=(-1)+8*x[2]-1*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,1,2,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]+5*x[1]-8*x[0]
-    u[1]=(-5)-6*x[2]-6*x[1]-9*x[0]
-    u[2]=(-7)-8*x[2]-5*x[1]-6*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]+5*x[1]-2*x[0]
-    u[1]=2+8*x[2]-6*x[1]+5*x[0]
-    u[2]=(-1)-6*x[2]+5*x[1]+5*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]+6*x[1]-6*x[0]
-    u[1]=7+2*x[2]+2*x[1]-7*x[0]
-    u[2]=(-9)+4*x[2]+6*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,0,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[2]+x[1]+8*x[0]
-    u[1]=(-6)-2*x[2]+7*x[1]-6*x[0]
-    u[2]=5-7*x[2]-3*x[1]-4*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-6)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[2]-8*x[1]-4*x[0]
-    u[1]=4+4*x[2]+8*x[1]+5*x[0]
-    u[2]=(-9)-2*x[2]+6*x[1]+3*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-9*x[2]+4*x[1]-9*x[0]
-    u[1]=(-2)+4*x[2]-9*x[1]+8*x[0]
-    u[2]=1-8*x[2]+3*x[1]+7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,1,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)+2*x[2]-6*x[1]-7*x[0]
-    u[1]=(-1)-9*x[2]-7*x[1]+6*x[0]
-    u[2]=(-4)-8*x[2]-4*x[1]-7*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[2]+7*x[1]-5*x[0]
-    u[1]=8+5*x[2]+5*x[1]+5*x[0]
-    u[2]=8+7*x[2]+2*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=2*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_A_Vario_typeWeak_comp2222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+x[2]+2*x[1]+5*x[0]
-    u[1]=7-8*x[2]-6*x[1]+8*x[0]
-    u[2]=(-8)+8*x[2]+3*x[1]+2*x[0]
-    A_test=Data(0.,(3,3,3,3),ReducedFunction(self.domain))
-    A_test[2,2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=8*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(A_reduced=A_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=(-9)
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=6
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-3)
-    u[2]=(-4)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=2
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=(-6)
-    u[2]=(-1)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-2)
-    u[2]=8
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,1]=8*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)
-    u[1]=(-5)
-    u[2]=(-4)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-4)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=(-2)
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7
-    u[1]=(-1)
-    u[2]=5
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[0,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[0,2]=5*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=6
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5
-    u[1]=4
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-4)
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,0]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6
-    u[1]=(-8)
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=6
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=6*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=(-3)
-    u[2]=3
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,1]=3*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=3
-    u[2]=(-4)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-7)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=(-8)
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)
-    u[1]=(-2)
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[1,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[1,2]=6*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1
-    u[1]=1
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,0]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)
-    u[1]=6
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,1]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=2
-    u[2]=6
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,0,2]=x[0]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,0]=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)
-    u[1]=1
-    u[2]=(-5)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,0]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=(-6)*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)
-    u[1]=4
-    u[2]=(-9)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,1]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=4*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8
-    u[1]=(-4)
-    u[2]=5
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,1,2]=x[1]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,1]=5*x[1]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4
-    u[1]=6
-    u[2]=1
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,0]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=4*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2
-    u[1]=(-2)
-    u[2]=(-7)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,1]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-2)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_B_Vario_typeWeak_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3
-    u[1]=(-5)
-    u[2]=(-8)
-    B_test=Data(0.,(3,3,3),ReducedFunction(self.domain))
-    B_test[2,2,2]=x[2]
-    X_test=Data(0.,(3, 3),ContinuousFunction(self.domain))
-    X_test[2,2]=(-8)*x[2]
-    pde=LinearPDE(self.domain)
-    pde.setValue(B_reduced=B_test, X_reduced=X_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-
-class Test_assemblage_3Do1_Contact(unittest.TestCase):
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(200,[0,0,1])
-     out.setTaggedValue(100,[0,0,-1])
-     out.setTaggedValue(20,[0,1,0])
-     out.setTaggedValue(10,[0,-1,0])
-     out.setTaggedValue(2,[1,0,0])
-     out.setTaggedValue(1,[-1,0,0])
-     return out
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=8-2*x[2]+6*x[1]+4*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=2
-    Y_test=(-8)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(16-4*x[2]+12*x[1]+8*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*((-16)+4*x[2]-12*x[1]-8*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=(-1)+x[2]-7*x[1]-5*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=7
-    Y_test=49
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-7)+7*x[2]-49*x[1]-35*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Const_typeContact_comp2(self):
-    x=self.domain.getX()
-    u=(-7)+2*x[2]+5*x[1]-2*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=6
-    Y_test=(-12)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-42)+12*x[2]+30*x[1]-12*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(7+5*x[2]-2*x[1]-4*x[0])*jump
-    d_contact_test=Data(8,(),FunctionOnContactZero(self.domain))
-    y_contact_test=56+40*x[2]-16*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=7-1*x[2]+4*x[1]+3*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=(-7)+x[2]-4*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(7*x[0]-1*x[0]*x[2]+4*x[0]*x[1]+3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*((-7)*x[0]+x[0]*x[2]-4*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=(-6)+5*x[2]+2*x[1]+4*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=6-5*x[2]-4*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*((-6)*x[1]+5*x[1]*x[2]+2*x[1]**2+4*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_B_Vario_typeContact_comp2(self):
-    x=self.domain.getX()
-    u=(-2)-5*x[2]+5*x[1]+5*x[0]
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=x[2]
-    Y_test=2+10*x[2]-5*x[1]-5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-2)*x[2]-5*x[2]**2+5*x[1]*x[2]+5*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(6)*jump
-    d_contact_test=interpolate(x[0],FunctionOnContactZero(self.domain))
-    y_contact_test=6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]-5*x[1]+6*x[0]
-    u[1]=2+2*x[2]+8*x[1]-4*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6+7*x[2]-5*x[1]+6*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-6)-7*x[2]+5*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+4*x[2]-5*x[1]+4*x[0]
-    u[1]=3-3*x[2]-1*x[1]-6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(12-12*x[2]-4*x[1]-24*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-12)+12*x[2]+4*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+6*x[2]+x[1]+8*x[0]
-    u[1]=(-9)-7*x[2]-2*x[1]+3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-12)+12*x[2]+2*x[1]+16*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[2]+2*x[1]-1*x[0]
-    u[1]=(-2)-5*x[2]-1*x[1]-5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)-15*x[2]-3*x[1]-15*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[2]+7*x[1]+7*x[0]
-    u[1]=(-1)-5*x[2]-2*x[1]-3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=18
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(2-18*x[2]+14*x[1]+14*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[2]+5*x[1]-9*x[0]
-    u[1]=6-4*x[2]-1*x[1]+8*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(12-8*x[2]-2*x[1]+16*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[2]-3*x[1]+4*x[0]
-    u[1]=(-5)+3*x[2]+3*x[1]-3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=3
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-18)+24*x[2]-9*x[1]+12*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(18-24*x[2]+9*x[1]-12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[2]-7*x[1]-9*x[0]
-    u[1]=4+8*x[2]-9*x[1]-9*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=72
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(32+64*x[2]-72*x[1]-72*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-32)-64*x[2]+72*x[1]+72*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-2*x[2]+6*x[1]+x[0]
-    u[1]=4+x[2]+6*x[1]+6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-30)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(35-10*x[2]+30*x[1]+5*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-7*x[2]+5*x[1]+x[0]
-    u[1]=4+6*x[2]-5*x[1]+3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=20
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(16+24*x[2]-20*x[1]+12*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[2]-7*x[1]-6*x[0]
-    u[1]=4-9*x[2]-9*x[1]+8*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=30
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-5)-30*x[2]-35*x[1]-30*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Const_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]-9*x[1]+7*x[0]
-    u[1]=(-2)+4*x[2]-4*x[1]-4*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-32)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-16)+32*x[2]-32*x[1]-32*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-1)-9*x[2]+5*x[1]-1*x[0])*jump
-    u[1]=((-1)+7*x[2]+7*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=4
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-4)-36*x[2]+20*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-6)+5*x[2]-5*x[1]+7*x[0])*jump
-    u[1]=((-1)-6*x[2]+8*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=4
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-4)-24*x[2]+32*x[1]-4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(6-4*x[2]-5*x[1]-2*x[0])*jump
-    u[1]=((-3)+3*x[2]+6*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=1
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=6-4*x[2]-5*x[1]-2*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(3-4*x[2]-7*x[1]-1*x[0])*jump
-    u[1]=((-2)-1*x[2]-6*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=7
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-14)-7*x[2]-42*x[1]-7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]+4*x[1]-6*x[0]
-    u[1]=(-9)-9*x[2]-9*x[1]-7*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)-4*x[2]-4*x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(8*x[0]+4*x[0]*x[2]+4*x[0]*x[1]-6*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-8)*x[0]-4*x[0]*x[2]-4*x[0]*x[1]+6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-4*x[2]-3*x[1]-5*x[0]
-    u[1]=(-4)-4*x[2]-2*x[1]+x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4+4*x[2]+2*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0]-4*x[0]*x[2]-2*x[0]*x[1]+x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(4*x[0]+4*x[0]*x[2]+2*x[0]*x[1]-1*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[2]-7*x[1]+7*x[0]
-    u[1]=6+x[2]-9*x[1]-1*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-8)-6*x[2]+14*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(8*x[1]+6*x[1]*x[2]-7*x[1]**2+7*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-7*x[1]+7*x[0]
-    u[1]=(-4)+7*x[2]+7*x[1]-5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4-7*x[2]-14*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-4)*x[1]+7*x[1]*x[2]+7*x[1]**2-5*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[2]+8*x[1]+8*x[0]
-    u[1]=(-8)-9*x[2]-8*x[1]-6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7+4*x[2]-8*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-7)*x[2]-2*x[2]**2+8*x[1]*x[2]+8*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=8-4*x[2]+7*x[1]-5*x[0]
-    u[1]=2-6*x[2]+5*x[1]+8*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-2)+12*x[2]-5*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(2*x[2]-6*x[2]**2+5*x[1]*x[2]+8*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+6*x[2]+2*x[1]-3*x[0]
-    u[1]=(-6)+2*x[2]-9*x[1]+7*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4-6*x[2]-2*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0]+6*x[0]*x[2]+2*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(4*x[0]-6*x[0]*x[2]-2*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-2)-8*x[2]-8*x[1]-5*x[0]
-    u[1]=3-9*x[2]+2*x[1]-3*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-3)+9*x[2]-2*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(3*x[0]-9*x[0]*x[2]+2*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-3)*x[0]+9*x[0]*x[2]-2*x[0]*x[1]+3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+8*x[2]-8*x[1]-4*x[0]
-    u[1]=1+7*x[2]+3*x[1]+6*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=5-8*x[2]+16*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-5)*x[1]+8*x[1]*x[2]-8*x[1]**2-4*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]-1*x[1]+5*x[0]
-    u[1]=(-9)+8*x[2]-9*x[1]+2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=9-8*x[2]+18*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1]+8*x[1]*x[2]-9*x[1]**2+2*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+5*x[2]-5*x[1]+x[0]
-    u[1]=(-8)+4*x[2]-6*x[1]-5*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-5)-10*x[2]+5*x[1]-1*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(5*x[2]+5*x[2]**2-5*x[1]*x[2]+x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_B_Vario_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-4*x[2]-3*x[1]-2*x[0]
-    u[1]=(-1)-8*x[2]+4*x[1]-2*x[0]
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=1+16*x[2]-4*x[1]+2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-1)*x[2]-8*x[2]**2+4*x[1]*x[2]-2*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-1))*jump
-    u[1]=(1)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(8)*jump
-    u[1]=((-4))*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-1))*jump
-    u[1]=((-8))*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(3)*jump
-    u[1]=((-7))*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]+8*x[1]+7*x[0]
-    u[1]=(-5)+x[2]+4*x[1]-6*x[0]
-    u[2]=(-3)-3*x[2]+3*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-21)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-21)+9*x[2]+24*x[1]+21*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(21-9*x[2]-24*x[1]-21*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-5*x[2]+6*x[1]-5*x[0]
-    u[1]=4-7*x[2]-7*x[1]+5*x[0]
-    u[2]=(-3)+6*x[2]+4*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-25)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(20-35*x[2]-35*x[1]+25*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-20)+35*x[2]+35*x[1]-25*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-5*x[2]+4*x[1]+7*x[0]
-    u[1]=7-6*x[2]-6*x[1]-6*x[0]
-    u[2]=(-9)+x[2]-8*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-27)+3*x[2]-24*x[1]-24*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(27-3*x[2]+24*x[1]+24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-4*x[2]+7*x[1]+x[0]
-    u[1]=(-7)-4*x[2]+2*x[1]-5*x[0]
-    u[2]=2-5*x[2]+x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-28)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-24)-16*x[2]+28*x[1]+4*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+6*x[2]+5*x[1]+2*x[0]
-    u[1]=(-8)-7*x[2]-6*x[1]+8*x[0]
-    u[2]=(-1)+x[2]+2*x[1]+8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=36
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-48)-42*x[2]-36*x[1]+48*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+7*x[2]+6*x[1]+3*x[0]
-    u[1]=4+6*x[2]-2*x[1]-2*x[0]
-    u[2]=(-7)-2*x[2]-5*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=25
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-35)-10*x[2]-25*x[1]-15*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+8*x[2]-6*x[1]+x[0]
-    u[1]=5-1*x[2]-8*x[1]+5*x[0]
-    u[2]=4-8*x[2]+2*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-16)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-4)+16*x[2]-12*x[1]+2*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+8*x[2]-7*x[1]+4*x[0]
-    u[1]=5+x[2]+4*x[1]+8*x[0]
-    u[2]=(-3)-4*x[2]-9*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(20+4*x[2]+16*x[1]+32*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-9*x[2]+5*x[1]-2*x[0]
-    u[1]=4+7*x[2]-6*x[1]-3*x[0]
-    u[2]=(-2)-1*x[2]-6*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-6)-3*x[2]-18*x[1]-18*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-5*x[2]+x[1]-6*x[0]
-    u[1]=(-7)-5*x[2]-2*x[1]-5*x[0]
-    u[2]=8-7*x[2]+2*x[1]-1*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=12
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(12-10*x[2]+2*x[1]-12*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-12)+10*x[2]-2*x[1]+12*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-3*x[2]+5*x[1]+x[0]
-    u[1]=(-4)-9*x[2]+x[1]-3*x[0]
-    u[2]=(-7)+6*x[2]+3*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=18
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-24)-54*x[2]+6*x[1]-18*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(24+54*x[2]-6*x[1]+18*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-2*x[2]-6*x[1]-8*x[0]
-    u[1]=2+x[2]-6*x[1]+2*x[0]
-    u[2]=(-2)+x[2]-1*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-48)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-16)+8*x[2]-8*x[1]+48*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(16-8*x[2]+8*x[1]-48*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[2]-4*x[1]-3*x[0]
-    u[1]=(-3)+8*x[2]-1*x[1]+x[0]
-    u[2]=1+2*x[2]-6*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6+8*x[2]-8*x[1]-6*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6-8*x[2]-3*x[1]+3*x[0]
-    u[1]=3-3*x[2]-4*x[1]-7*x[0]
-    u[2]=(-5)+4*x[2]-3*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=24
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(18-18*x[2]-24*x[1]-42*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+3*x[2]+2*x[1]-6*x[0]
-    u[1]=5+7*x[2]+6*x[1]+3*x[0]
-    u[2]=(-4)-5*x[2]+2*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-14)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-28)-35*x[2]+14*x[1]+42*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+5*x[2]-2*x[1]+4*x[0]
-    u[1]=2-2*x[2]-3*x[1]-1*x[0]
-    u[2]=3-6*x[2]+2*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-15)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(3+15*x[2]-6*x[1]+12*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-1*x[2]-4*x[1]+5*x[0]
-    u[1]=1+3*x[2]+4*x[1]-4*x[0]
-    u[2]=(-2)-2*x[2]-9*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-18)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(6+18*x[2]+24*x[1]-24*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+5*x[2]+6*x[1]-5*x[0]
-    u[1]=4-8*x[2]-1*x[1]+8*x[0]
-    u[2]=(-1)+7*x[2]-6*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-1)+7*x[2]-6*x[1]-7*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-7*x[2]+3*x[1]+3*x[0]
-    u[1]=2-4*x[2]-2*x[1]-7*x[0]
-    u[2]=4+3*x[2]-9*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4-14*x[2]+6*x[1]+6*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-4)+14*x[2]-6*x[1]-6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+7*x[2]-8*x[1]+4*x[0]
-    u[1]=6-5*x[2]+2*x[1]+4*x[0]
-    u[2]=1-3*x[2]-4*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-24)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(36-30*x[2]+12*x[1]+24*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-36)+30*x[2]-12*x[1]-24*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+3*x[2]-2*x[1]-5*x[0]
-    u[1]=3+6*x[2]+4*x[1]+3*x[0]
-    u[2]=(-4)-1*x[2]-3*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-4)-1*x[2]-3*x[1]-6*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(4+x[2]+3*x[1]+6*x[0])
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-9*x[2]-7*x[1]-7*x[0]
-    u[1]=6-9*x[2]+x[1]-2*x[0]
-    u[2]=5-8*x[2]+2*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=42
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-36)-54*x[2]-42*x[1]-42*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[2]-1*x[1]+x[0]
-    u[1]=5-4*x[2]-5*x[1]-2*x[0]
-    u[2]=(-5)-9*x[2]+x[1]+8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=10
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(10-8*x[2]-10*x[1]-4*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[2]+x[1]-1*x[0]
-    u[1]=4+x[2]+x[1]+x[0]
-    u[2]=6+2*x[2]+4*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-24)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(36+12*x[2]+24*x[1]+18*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+6*x[2]+4*x[1]+3*x[0]
-    u[1]=(-8)+3*x[2]-8*x[1]-9*x[0]
-    u[2]=4-3*x[2]+5*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-30)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-10)+30*x[2]+20*x[1]+15*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[2]+6*x[1]+7*x[0]
-    u[1]=(-2)+7*x[2]+7*x[1]+6*x[0]
-    u[2]=(-2)-8*x[2]+8*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-2)+7*x[2]+7*x[1]+6*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Const_typeContact_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-3*x[2]+8*x[1]+8*x[0]
-    u[1]=(-6)-3*x[2]-3*x[1]-2*x[0]
-    u[2]=2+6*x[2]+8*x[1]+4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-42)
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(14+42*x[2]+56*x[1]+28*x[0])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6)+7*x[2]-6*x[1]+4*x[0])*jump
-    u[1]=(4+7*x[2]+5*x[1]-4*x[0])*jump
-    u[2]=(6-8*x[2]-9*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-48)+56*x[2]-48*x[1]+32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6+3*x[2]+3*x[1]+5*x[0])*jump
-    u[1]=((-4)-2*x[2]-2*x[1]-5*x[0])*jump
-    u[2]=(3-9*x[2]-9*x[1]-3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=1
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-4)-2*x[2]-2*x[1]-5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)-2*x[2]+8*x[1]-2*x[0])*jump
-    u[1]=((-5)-1*x[2]-1*x[1]+3*x[0])*jump
-    u[2]=((-4)-1*x[2]-1*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-16)-4*x[2]-4*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-2)-9*x[2]-3*x[1]-7*x[0])*jump
-    u[1]=((-2)-9*x[2]-8*x[1]-4*x[0])*jump
-    u[2]=(1-1*x[2]+4*x[1]-7*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-10)-45*x[2]-15*x[1]-35*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6+4*x[2]+3*x[1]+3*x[0])*jump
-    u[1]=((-5)-8*x[2]+3*x[1]-9*x[0])*jump
-    u[2]=((-1)-3*x[2]+5*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-20)-32*x[2]+12*x[1]-36*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-4)+x[2]+7*x[1]-8*x[0])*jump
-    u[1]=((-2)-1*x[2]-4*x[1]+2*x[0])*jump
-    u[2]=(3-6*x[2]-4*x[1]-3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=6-12*x[2]-8*x[1]-6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-3)-1*x[2]+2*x[1]-3*x[0])*jump
-    u[1]=((-4)-3*x[2]-3*x[1]+5*x[0])*jump
-    u[2]=(1-4*x[2]-1*x[1]-6*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-21)-7*x[2]+14*x[1]-21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(8+6*x[2]+8*x[1]-6*x[0])*jump
-    u[1]=((-3)+7*x[2]-5*x[1]-9*x[0])*jump
-    u[2]=(3-7*x[2]-2*x[1]-2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-6)+14*x[2]-10*x[1]-18*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4-3*x[2]+8*x[1]-7*x[0])*jump
-    u[1]=((-7)+3*x[2]-8*x[1]-7*x[0])*jump
-    u[2]=((-6)+6*x[2]-3*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-48)+48*x[2]-24*x[1]+16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+8*x[2]+7*x[1]-2*x[0]
-    u[1]=8-5*x[2]-5*x[1]+2*x[0]
-    u[2]=1-6*x[2]-3*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4-8*x[2]-7*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0]+8*x[0]*x[2]+7*x[0]*x[1]-2*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(4*x[0]-8*x[0]*x[2]-7*x[0]*x[1]+2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-9*x[2]+3*x[1]+6*x[0]
-    u[1]=(-4)-2*x[2]+3*x[1]-5*x[0]
-    u[2]=(-5)+x[2]+6*x[1]-4*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=4+2*x[2]-3*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-4)*x[0]-2*x[0]*x[2]+3*x[0]*x[1]-5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(4*x[0]+2*x[0]*x[2]-3*x[0]*x[1]+5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+3*x[2]+x[1]+6*x[0]
-    u[1]=(-1)+8*x[2]-3*x[1]+7*x[0]
-    u[2]=1-8*x[2]-1*x[1]+5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)+8*x[2]+x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(x[0]-8*x[0]*x[2]-1*x[0]*x[1]+5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-1)*x[0]+8*x[0]*x[2]+x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+x[2]+5*x[1]+6*x[0]
-    u[1]=3-1*x[2]+2*x[1]+6*x[0]
-    u[2]=6-2*x[2]+x[1]-1*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1-1*x[2]-10*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-1)*x[1]+x[1]*x[2]+5*x[1]**2+6*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-4*x[2]-9*x[1]-9*x[0]
-    u[1]=(-6)-8*x[2]+8*x[1]-9*x[0]
-    u[2]=(-8)-9*x[2]-2*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6+8*x[2]-16*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-6)*x[1]-8*x[1]*x[2]+8*x[1]**2-9*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-6*x[2]+7*x[1]+8*x[0]
-    u[1]=5-8*x[2]-7*x[1]-1*x[0]
-    u[2]=(-5)-3*x[2]-7*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5+3*x[2]+14*x[1]-3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-5)*x[1]-3*x[1]*x[2]-7*x[1]**2+3*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1-7*x[2]+4*x[1]+2*x[0]
-    u[1]=3-7*x[2]+7*x[1]+8*x[0]
-    u[2]=1+8*x[2]+5*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-1)+14*x[2]-4*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(x[2]-7*x[2]**2+4*x[1]*x[2]+2*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-3*x[2]+8*x[1]+3*x[0]
-    u[1]=(-9)+3*x[2]+2*x[1]+2*x[0]
-    u[2]=2+x[2]-6*x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=9-6*x[2]-2*x[1]-2*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-9)*x[2]+3*x[2]**2+2*x[1]*x[2]+2*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-2*x[2]-8*x[1]+3*x[0]
-    u[1]=2-7*x[2]+6*x[1]-2*x[0]
-    u[2]=(-1)+x[2]+8*x[1]+5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1-2*x[2]-8*x[1]-5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-1)*x[2]+x[2]**2+8*x[1]*x[2]+5*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+2*x[2]-1*x[1]+5*x[0]
-    u[1]=(-6)+7*x[2]+8*x[1]-9*x[0]
-    u[2]=2-3*x[2]+7*x[1]+2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)-2*x[2]+x[1]-10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(x[0]+2*x[0]*x[2]-1*x[0]*x[1]+5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-1)*x[0]-2*x[0]*x[2]+x[0]*x[1]-5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7+3*x[2]-8*x[1]-6*x[0]
-    u[1]=(-9)-1*x[2]-8*x[1]+3*x[0]
-    u[2]=(-9)-5*x[2]-6*x[1]-6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9+x[2]+8*x[1]-6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-9)*x[0]-1*x[0]*x[2]-8*x[0]*x[1]+3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(9*x[0]+x[0]*x[2]+8*x[0]*x[1]-3*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+7*x[2]-3*x[1]-9*x[0]
-    u[1]=(-1)-2*x[2]-6*x[1]+6*x[0]
-    u[2]=6-4*x[2]+7*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)+4*x[2]-7*x[1]+16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0]-4*x[0]*x[2]+7*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-6)*x[0]+4*x[0]*x[2]-7*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+7*x[2]-9*x[1]-9*x[0]
-    u[1]=6+2*x[2]-7*x[1]-9*x[0]
-    u[2]=(-9)-8*x[2]-1*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-2)-7*x[2]+18*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(2*x[1]+7*x[1]*x[2]-9*x[1]**2-9*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[2]-5*x[1]-6*x[0]
-    u[1]=(-2)-9*x[2]-3*x[1]+4*x[0]
-    u[2]=6+3*x[2]-3*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=2+9*x[2]+6*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-2)*x[1]-9*x[1]*x[2]-3*x[1]**2+4*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-9*x[2]+6*x[1]+2*x[0]
-    u[1]=(-5)-9*x[2]+8*x[1]+5*x[0]
-    u[2]=(-8)+4*x[2]+4*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8-4*x[2]-8*x[1]-3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-8)*x[1]+4*x[1]*x[2]+4*x[1]**2+3*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-7*x[2]+8*x[1]-5*x[0]
-    u[1]=1-9*x[2]+5*x[1]-5*x[0]
-    u[2]=6-9*x[2]+5*x[1]-2*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-8)+14*x[2]-8*x[1]+5*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(8*x[2]-7*x[2]**2+8*x[1]*x[2]-5*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)+3*x[2]+2*x[1]-3*x[0]
-    u[1]=(-6)+4*x[2]-4*x[1]-1*x[0]
-    u[2]=2-7*x[2]-3*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6-8*x[2]+4*x[1]+x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-6)*x[2]+4*x[2]**2-4*x[1]*x[2]-1*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-5*x[2]-5*x[1]-3*x[0]
-    u[1]=7-1*x[2]+x[1]+2*x[0]
-    u[2]=4-4*x[2]-7*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-4)+8*x[2]+7*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(4*x[2]-4*x[2]**2-7*x[1]*x[2]-3*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-9*x[2]-9*x[1]-5*x[0]
-    u[1]=(-3)+7*x[2]+8*x[1]+4*x[0]
-    u[2]=1+3*x[2]+5*x[1]+6*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=5+9*x[2]+9*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-5)*x[0]-9*x[0]*x[2]-9*x[0]*x[1]-5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(5*x[0]+9*x[0]*x[2]+9*x[0]*x[1]+5*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]-4*x[1]-8*x[0]
-    u[1]=(-3)-9*x[2]-5*x[1]+2*x[0]
-    u[2]=(-7)-5*x[2]-1*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3+9*x[2]+5*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-3)*x[0]-9*x[0]*x[2]-5*x[0]*x[1]+2*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(3*x[0]+9*x[0]*x[2]+5*x[0]*x[1]-2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[2]+x[1]-5*x[0]
-    u[1]=3+6*x[2]+6*x[1]+3*x[0]
-    u[2]=7+7*x[2]-6*x[1]-8*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)-7*x[2]+6*x[1]+16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(7*x[0]+7*x[0]*x[2]-6*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-7)*x[0]-7*x[0]*x[2]+6*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-4*x[2]-6*x[1]-9*x[0]
-    u[1]=(-5)+2*x[2]+2*x[1]+7*x[0]
-    u[2]=4+2*x[2]+7*x[1]+7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=4+4*x[2]+12*x[1]+9*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-4)*x[1]-4*x[1]*x[2]-6*x[1]**2-9*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+4*x[2]+3*x[1]-1*x[0]
-    u[1]=7-4*x[2]+4*x[1]-3*x[0]
-    u[2]=(-2)-3*x[2]-1*x[1]+3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)+4*x[2]-8*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1]-4*x[1]*x[2]+4*x[1]**2-3*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[2]+4*x[1]-6*x[0]
-    u[1]=3+8*x[2]+6*x[1]+3*x[0]
-    u[2]=4+x[2]+6*x[1]-7*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)-1*x[2]-12*x[1]+7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(4*x[1]+x[1]*x[2]+6*x[1]**2-7*x[0]*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+5*x[2]-2*x[1]-8*x[0]
-    u[1]=(-6)+2*x[2]-5*x[1]-4*x[0]
-    u[2]=(-8)-1*x[2]+5*x[1]-5*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-3)-10*x[2]+2*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(3*x[2]+5*x[2]**2-2*x[1]*x[2]-8*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2-5*x[2]+8*x[1]-3*x[0]
-    u[1]=8-8*x[2]+4*x[1]-3*x[0]
-    u[2]=(-5)+4*x[2]-8*x[1]+x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)+16*x[2]-4*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(8*x[2]-8*x[2]**2+4*x[1]*x[2]-3*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_B_Vario_typeContact_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8-2*x[2]-9*x[1]+x[0]
-    u[1]=(-9)+8*x[2]-1*x[1]+2*x[0]
-    u[2]=2-8*x[2]+4*x[1]-3*x[0]
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-2)+16*x[2]-4*x[1]+3*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(2*x[2]-8*x[2]**2+4*x[1]*x[2]-3*x[0]*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4)*jump
-    u[1]=(1)*jump
-    u[2]=((-2))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2)*jump
-    u[1]=(5)*jump
-    u[2]=((-7))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8))*jump
-    u[1]=((-6))*jump
-    u[2]=(3)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=3*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4)*jump
-    u[1]=(5)*jump
-    u[2]=(8)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7)*jump
-    u[1]=((-8))*jump
-    u[2]=(5)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2)*jump
-    u[1]=((-9))*jump
-    u[2]=((-8))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-3))*jump
-    u[1]=((-5))*jump
-    u[2]=((-9))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=((-7))*jump
-    u[2]=((-9))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-7)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(1)*jump
-    u[1]=((-3))*jump
-    u[2]=((-5))*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-3)-3*x[2]-6*x[1]-1*x[0])*jump
-    d_contact_test=Data(7,(),ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=(-21)-21*x[2]-42*x[1]-7*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-4))*jump
-    d_contact_test=interpolate(x[0],ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=(-4)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(4-5*x[2]-6*x[1]-5*x[0])*jump
-    u[1]=(5+2*x[2]-4*x[1]-4*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=4
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=16-20*x[2]-24*x[1]-20*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-2)+4*x[2]-4*x[1]-5*x[0])*jump
-    u[1]=((-9)+8*x[2]+8*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=5
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-45)+40*x[2]+40*x[1]+25*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(5-1*x[2]+8*x[1]-3*x[0])*jump
-    u[1]=((-9)+x[2]+x[1]-7*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=8
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=40-8*x[2]+64*x[1]-24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-5)-1*x[2]-1*x[1]-7*x[0])*jump
-    u[1]=((-8)-6*x[2]-1*x[1]-4*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=8
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-64)-48*x[2]-8*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-3))*jump
-    u[1]=(1)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-3)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(8)*jump
-    u[1]=(1)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-2))*jump
-    u[1]=(4)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-8))*jump
-    u[1]=((-5))*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-8)+2*x[2]+5*x[1]-5*x[0])*jump
-    u[1]=((-2)-2*x[2]+3*x[1]-5*x[0])*jump
-    u[2]=((-1)+x[2]+3*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=1
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-8)+2*x[2]+5*x[1]-5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6-7*x[2]+x[1]-6*x[0])*jump
-    u[1]=(4-5*x[2]+7*x[1]-8*x[0])*jump
-    u[2]=(7-9*x[2]-6*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=20-25*x[2]+35*x[1]-40*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+7*x[2]-9*x[1]+6*x[0])*jump
-    u[1]=((-2)+4*x[2]-4*x[1]-9*x[0])*jump
-    u[2]=(7-3*x[2]-7*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=14-6*x[2]-14*x[1]+4*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-4)+7*x[2]-1*x[1]-8*x[0])*jump
-    u[1]=((-8)+x[2]-9*x[1]-6*x[0])*jump
-    u[2]=(1-7*x[2]+7*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=4
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-16)+28*x[2]-4*x[1]-32*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)-8*x[2]-8*x[1]+3*x[0])*jump
-    u[1]=((-4)-2*x[2]-6*x[1]+3*x[0])*jump
-    u[2]=(7-9*x[2]+8*x[1]-3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)-4*x[2]-12*x[1]+6*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)+5*x[2]+5*x[1]-9*x[0])*jump
-    u[1]=(5-4*x[2]-6*x[1]+7*x[0])*jump
-    u[2]=(3+7*x[2]+4*x[1]-2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=24+56*x[2]+32*x[1]-16*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7-3*x[2]+7*x[1]-3*x[0])*jump
-    u[1]=((-6)+8*x[2]+7*x[1]+6*x[0])*jump
-    u[2]=(3-3*x[2]-7*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=21-9*x[2]+21*x[1]-9*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-4)-8*x[2]-8*x[1]-7*x[0])*jump
-    u[1]=((-8)+6*x[2]+8*x[1]+3*x[0])*jump
-    u[2]=((-7)-8*x[2]+8*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-56)+42*x[2]+56*x[1]+21*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)+8*x[2]-2*x[1]+x[0])*jump
-    u[1]=((-2)+4*x[2]-8*x[1]-3*x[0])*jump
-    u[2]=(4+4*x[2]-7*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=32+32*x[2]-56*x[1]+24*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=((-3))*jump
-    u[2]=(7)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9))*jump
-    u[1]=((-2))*jump
-    u[2]=(2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9))*jump
-    u[1]=(3)*jump
-    u[2]=((-5))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1))*jump
-    u[1]=((-6))*jump
-    u[2]=(4)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-1)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1))*jump
-    u[1]=((-2))*jump
-    u[2]=(3)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-2)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=(4)*jump
-    u[2]=((-8))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=((-4))*jump
-    u[2]=((-6))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2)*jump
-    u[1]=(5)*jump
-    u[2]=((-1))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=5*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO1_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5))*jump
-    u[1]=((-9))*jump
-    u[2]=((-5))*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-5)*x[0]
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-
-  def setNormal(self,fs):
-     out=Vector(0.,fs)
-     out.setTaggedValue(200,[0,0,1])
-     out.setTaggedValue(100,[0,0,-1])
-     out.setTaggedValue(20,[0,1,0])
-     out.setTaggedValue(10,[0,-1,0])
-     out.setTaggedValue(2,[1,0,0])
-     out.setTaggedValue(1,[-1,0,0])
-     return out
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_B_Const_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=(-4)+3*x[2]+6*x[2]**2-2*x[1]-5*x[1]*x[2]-8*x[1]**2+3*x[0]+7*x[0]*x[2]-9*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=1
-    Y_test=(-3)-7*x[2]+9*x[1]+8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*((-4)+3*x[2]+6*x[2]**2-2*x[1]-5*x[1]*x[2]-8*x[1]**2+3*x[0]+7*x[0]*x[2]-9*x[0]*x[1]-4*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*(4-3*x[2]-6*x[2]**2+2*x[1]+5*x[1]*x[2]+8*x[1]**2-3*x[0]-7*x[0]*x[2]+9*x[0]*x[1]+4*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_B_Const_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=5-7*x[2]+3*x[2]**2-4*x[1]-2*x[1]*x[2]-6*x[1]**2-1*x[0]-8*x[0]*x[2]+7*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=1
-    Y_test=4+2*x[2]+12*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(5-7*x[2]+3*x[2]**2-4*x[1]-2*x[1]*x[2]-6*x[1]**2-1*x[0]-8*x[0]*x[2]+7*x[0]*x[1]+x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_B_Const_typeContact_comp2(self):
-    x=self.domain.getX()
-    u=(-2)-2*x[2]-3*x[2]**2+6*x[1]+6*x[1]*x[2]-5*x[1]**2-5*x[0]+3*x[0]*x[2]+2*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=8
-    Y_test=16+48*x[2]-48*x[1]-24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*((-16)-16*x[2]-24*x[2]**2+48*x[1]+48*x[1]*x[2]-40*x[1]**2-40*x[0]+24*x[0]*x[2]+16*x[0]*x[1]-64*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(8+6*x[2]+x[2]**2-8*x[1]-8*x[1]*x[2]-3*x[1]**2-4*x[0]-8*x[0]*x[2]-4*x[0]*x[1]-5*x[0]**2)*jump
-    d_contact_test=Data(5,(),FunctionOnContactZero(self.domain))
-    y_contact_test=40+30*x[2]+5*x[2]**2-40*x[1]-40*x[1]*x[2]-15*x[1]**2-20*x[0]-40*x[0]*x[2]-20*x[0]*x[1]-25*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_B_Vario_typeContact_comp0(self):
-    x=self.domain.getX()
-    u=5+8*x[2]+6*x[2]**2+3*x[1]+5*x[1]*x[2]+x[1]**2-2*x[0]-5*x[0]*x[2]-4*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[0]=x[0]
-    Y_test=(-5)-8*x[2]-6*x[2]**2-3*x[1]-5*x[1]*x[2]-1*x[1]**2+4*x[0]+10*x[0]*x[2]+8*x[0]*x[1]+24*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[0]*(5*x[0]+8*x[0]*x[2]+6*x[0]*x[2]**2+3*x[0]*x[1]+5*x[0]*x[1]*x[2]+x[0]*x[1]**2-2*x[0]**2-5*x[0]**2*x[2]-4*x[0]**2*x[1]-8*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=n_contact[0]*((-5)*x[0]-8*x[0]*x[2]-6*x[0]*x[2]**2-3*x[0]*x[1]-5*x[0]*x[1]*x[2]-1*x[0]*x[1]**2+2*x[0]**2+5*x[0]**2*x[2]+4*x[0]**2*x[1]+8*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_B_Vario_typeContact_comp1(self):
-    x=self.domain.getX()
-    u=6-4*x[2]-9*x[2]**2+8*x[1]-8*x[1]*x[2]-8*x[1]**2+5*x[0]-6*x[0]*x[2]-4*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[1]=x[1]
-    Y_test=(-6)+4*x[2]+9*x[2]**2-16*x[1]+16*x[1]*x[2]+24*x[1]**2-5*x[0]+6*x[0]*x[2]+8*x[0]*x[1]+x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[1]*(6*x[1]-4*x[1]*x[2]-9*x[1]*x[2]**2+8*x[1]**2-8*x[1]**2*x[2]-8*x[1]**3+5*x[0]*x[1]-6*x[0]*x[1]*x[2]-4*x[0]*x[1]**2-1*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_B_Vario_typeContact_comp2(self):
-    x=self.domain.getX()
-    u=4-2*x[2]-8*x[2]**2+8*x[1]+6*x[1]*x[2]+2*x[1]**2+7*x[0]+5*x[0]*x[2]+5*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,),Function(self.domain))
-    B_test[2]=x[2]
-    Y_test=(-4)+4*x[2]+24*x[2]**2-8*x[1]-12*x[1]*x[2]-2*x[1]**2-7*x[0]-10*x[0]*x[2]-5*x[0]*x[1]+3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=n[2]*(4*x[2]-2*x[2]**2-8*x[2]**3+8*x[1]*x[2]+6*x[1]*x[2]**2+2*x[1]**2*x[2]+7*x[0]*x[2]+5*x[0]*x[2]**2+5*x[0]*x[1]*x[2]-3*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=0
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-9)+3*x[2]-7*x[1]-1*x[0])*jump
-    d_contact_test=interpolate(x[0],FunctionOnContactZero(self.domain))
-    y_contact_test=(-9)*x[0]+3*x[0]*x[2]-7*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]-4*x[2]**2-1*x[1]-1*x[1]*x[2]+2*x[1]**2-4*x[0]+x[0]*x[2]-2*x[0]*x[1]-1*x[0]**2
-    u[1]=8+4*x[2]+6*x[2]**2-2*x[1]+7*x[1]*x[2]+4*x[1]**2+5*x[0]+8*x[0]*x[2]+8*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=32-8*x[2]+16*x[1]+16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-24)-64*x[2]-32*x[2]**2-8*x[1]-8*x[1]*x[2]+16*x[1]**2-32*x[0]+8*x[0]*x[2]-16*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(24+64*x[2]+32*x[2]**2+8*x[1]+8*x[1]*x[2]-16*x[1]**2+32*x[0]-8*x[0]*x[2]+16*x[0]*x[1]+8*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=3+7*x[2]+x[2]**2-2*x[1]+4*x[1]*x[2]+6*x[1]**2+6*x[0]-9*x[0]*x[2]+8*x[0]*x[1]+x[0]**2
-    u[1]=5-3*x[2]-9*x[2]**2+7*x[1]+5*x[1]*x[2]-8*x[1]**2-1*x[0]-9*x[0]*x[2]-4*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=6+54*x[2]+24*x[1]-72*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(30-18*x[2]-54*x[2]**2+42*x[1]+30*x[1]*x[2]-48*x[1]**2-6*x[0]-54*x[0]*x[2]-24*x[0]*x[1]+36*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-30)+18*x[2]+54*x[2]**2-42*x[1]-30*x[1]*x[2]+48*x[1]**2+6*x[0]+54*x[0]*x[2]+24*x[0]*x[1]-36*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-8)-1*x[2]-1*x[2]**2-1*x[1]-1*x[1]*x[2]+3*x[1]**2-6*x[0]+6*x[0]*x[2]-6*x[0]*x[1]-8*x[0]**2
-    u[1]=7-5*x[2]+7*x[2]**2+4*x[1]-2*x[1]*x[2]+6*x[1]**2-3*x[0]+4*x[0]*x[2]+x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=5
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=5+5*x[2]-30*x[1]+30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-40)-5*x[2]-5*x[2]**2-5*x[1]-5*x[1]*x[2]+15*x[1]**2-30*x[0]+30*x[0]*x[2]-30*x[0]*x[1]-40*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-8*x[2]+6*x[2]**2+6*x[1]-1*x[1]*x[2]+6*x[1]**2+4*x[0]+7*x[0]*x[2]+7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-7)+3*x[2]+3*x[2]**2+7*x[1]-8*x[1]*x[2]-6*x[1]**2+x[0]+4*x[0]*x[2]-6*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=1
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-7)+8*x[2]+12*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)+3*x[2]+3*x[2]**2+7*x[1]-8*x[1]*x[2]-6*x[1]**2+x[0]+4*x[0]*x[2]-6*x[0]*x[1]-3*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)+x[2]-6*x[2]**2-3*x[1]+5*x[1]*x[2]+4*x[1]**2+8*x[0]+5*x[0]*x[2]-7*x[0]*x[1]+x[0]**2
-    u[1]=(-5)-4*x[2]-4*x[2]**2+5*x[1]+7*x[1]*x[2]+4*x[1]**2+3*x[0]-4*x[0]*x[2]-7*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+48*x[2]-20*x[1]-20*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-16)+4*x[2]-24*x[2]**2-12*x[1]+20*x[1]*x[2]+16*x[1]**2+32*x[0]+20*x[0]*x[2]-28*x[0]*x[1]+4*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5+6*x[2]-6*x[2]**2+8*x[1]-1*x[1]*x[2]+7*x[1]**2+7*x[0]-9*x[0]*x[2]-9*x[0]*x[1]+4*x[0]**2
-    u[1]=(-5)+3*x[2]+5*x[2]**2-4*x[1]+3*x[1]*x[2]-2*x[1]**2-4*x[0]-7*x[0]*x[2]+2*x[0]*x[1]+2*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-18)-60*x[2]-18*x[1]+42*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-30)+18*x[2]+30*x[2]**2-24*x[1]+18*x[1]*x[2]-12*x[1]**2-24*x[0]-42*x[0]*x[2]+12*x[0]*x[1]+12*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-9*x[2]-9*x[2]**2-2*x[1]+7*x[1]*x[2]+3*x[1]**2-8*x[0]-4*x[0]*x[2]-1*x[0]*x[1]+5*x[0]**2
-    u[1]=5+8*x[2]+8*x[2]**2+x[1]-5*x[1]*x[2]+5*x[1]**2-3*x[0]+x[0]*x[2]+7*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=56+28*x[2]+7*x[1]-70*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-28)-63*x[2]-63*x[2]**2-14*x[1]+49*x[1]*x[2]+21*x[1]**2-56*x[0]-28*x[0]*x[2]-7*x[0]*x[1]+35*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(28+63*x[2]+63*x[2]**2+14*x[1]-49*x[1]*x[2]-21*x[1]**2+56*x[0]+28*x[0]*x[2]+7*x[0]*x[1]-35*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-7*x[2]+3*x[2]**2-3*x[1]-7*x[1]*x[2]-9*x[1]**2-6*x[0]-9*x[0]*x[2]+2*x[0]*x[1]-3*x[0]**2
-    u[1]=6+7*x[2]+5*x[2]**2-8*x[1]-8*x[1]*x[2]-4*x[1]**2-7*x[0]+6*x[0]*x[2]-2*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=7
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=49-42*x[2]+14*x[1]+112*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(42+49*x[2]+35*x[2]**2-56*x[1]-56*x[1]*x[2]-28*x[1]**2-49*x[0]+42*x[0]*x[2]-14*x[0]*x[1]-56*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-42)-49*x[2]-35*x[2]**2+56*x[1]+56*x[1]*x[2]+28*x[1]**2+49*x[0]-42*x[0]*x[2]+14*x[0]*x[1]+56*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=5-7*x[2]-1*x[2]**2+6*x[1]-7*x[1]*x[2]+5*x[1]**2+4*x[0]-7*x[0]*x[2]-1*x[0]*x[1]-6*x[0]**2
-    u[1]=5-9*x[2]+4*x[2]**2-2*x[1]+x[1]*x[2]+2*x[1]**2-1*x[0]-1*x[0]*x[2]-4*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=6
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-36)+42*x[2]-60*x[1]+6*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(30-42*x[2]-6*x[2]**2+36*x[1]-42*x[1]*x[2]+30*x[1]**2+24*x[0]-42*x[0]*x[2]-6*x[0]*x[1]-36*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[2]+6*x[2]**2-6*x[1]-6*x[1]*x[2]-7*x[1]**2+x[0]-1*x[0]*x[2]-5*x[0]*x[1]+6*x[0]**2
-    u[1]=(-4)-4*x[2]-5*x[2]**2+5*x[1]-6*x[1]*x[2]-1*x[1]**2-3*x[0]+3*x[0]*x[2]-3*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=4
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-20)+24*x[2]+8*x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-16)-16*x[2]-20*x[2]**2+20*x[1]-24*x[1]*x[2]-4*x[1]**2-12*x[0]+12*x[0]*x[2]-12*x[0]*x[1]+20*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[2]+4*x[2]**2-7*x[1]+7*x[1]*x[2]-9*x[1]**2-4*x[0]-3*x[0]*x[2]-4*x[0]*x[1]+5*x[0]**2
-    u[1]=6-8*x[2]-7*x[2]**2-3*x[1]+2*x[1]*x[2]-7*x[1]**2-6*x[0]+4*x[0]*x[2]-3*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=8
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=32-64*x[2]-56*x[1]+24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-40)-32*x[2]+32*x[2]**2-56*x[1]+56*x[1]*x[2]-72*x[1]**2-32*x[0]-24*x[0]*x[2]-32*x[0]*x[1]+40*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Const_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+8*x[2]-2*x[2]**2-2*x[1]+8*x[1]*x[2]-1*x[1]**2-3*x[0]-9*x[0]*x[2]-5*x[0]*x[1]-2*x[0]**2
-    u[1]=(-9)+3*x[2]-7*x[2]**2+7*x[1]+x[1]*x[2]-4*x[1]**2+4*x[0]-6*x[0]*x[2]+8*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=2
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)+28*x[2]-2*x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-18)+6*x[2]-14*x[2]**2+14*x[1]+2*x[1]*x[2]-8*x[1]**2+8*x[0]-12*x[0]*x[2]+16*x[0]*x[1]-12*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-8)+8*x[2]-4*x[2]**2-8*x[1]-9*x[1]*x[2]+8*x[1]**2+6*x[0]-9*x[0]*x[2]+x[0]*x[1]-5*x[0]**2)*jump
-    u[1]=((-4)-3*x[2]+x[2]**2+2*x[1]-3*x[1]*x[2]+x[1]**2+6*x[0]-2*x[0]*x[2]-9*x[0]*x[1]-2*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=4
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-32)+32*x[2]-16*x[2]**2-32*x[1]-36*x[1]*x[2]+32*x[1]**2+24*x[0]-36*x[0]*x[2]+4*x[0]*x[1]-20*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(7+2*x[2]-7*x[2]**2-8*x[1]-9*x[1]*x[2]+5*x[1]**2+5*x[0]+4*x[0]*x[2]+7*x[0]*x[1]-1*x[0]**2)*jump
-    u[1]=(7+6*x[2]+6*x[2]**2+6*x[1]+3*x[1]*x[2]+4*x[1]**2-1*x[0]+x[0]*x[2]+6*x[0]*x[1]+6*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=7
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=49+42*x[2]+42*x[2]**2+42*x[1]+21*x[1]*x[2]+28*x[1]**2-7*x[0]+7*x[0]*x[2]+42*x[0]*x[1]+42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-4)-5*x[2]-3*x[2]**2+2*x[1]-7*x[1]*x[2]-6*x[1]**2+5*x[0]+x[0]*x[2]-1*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=(8-4*x[2]-7*x[2]**2+4*x[1]-9*x[1]*x[2]-8*x[1]**2-9*x[0]-5*x[0]*x[2]+6*x[0]*x[1]+3*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=8
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-32)-40*x[2]-24*x[2]**2+16*x[1]-56*x[1]*x[2]-48*x[1]**2+40*x[0]+8*x[0]*x[2]-8*x[0]*x[1]+48*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(4-1*x[2]+4*x[2]**2-5*x[1]-7*x[1]*x[2]+2*x[1]**2-3*x[0]-6*x[0]*x[2]-4*x[0]*x[1]-8*x[0]**2)*jump
-    u[1]=((-4)+2*x[2]+3*x[2]**2+3*x[1]+5*x[1]*x[2]-1*x[1]**2-1*x[0]+5*x[0]*x[2]+5*x[0]*x[1]+4*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=2
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)+4*x[2]+6*x[2]**2+6*x[1]+10*x[1]*x[2]-2*x[1]**2-2*x[0]+10*x[0]*x[2]+10*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-3*x[2]**2+x[1]-3*x[1]*x[2]+8*x[1]**2+4*x[0]-4*x[0]*x[2]+8*x[0]*x[1]-5*x[0]**2
-    u[1]=(-2)-1*x[2]-5*x[2]**2+7*x[1]+3*x[1]*x[2]+8*x[1]**2+4*x[0]-5*x[0]*x[2]-6*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=3-7*x[2]+3*x[2]**2-1*x[1]+3*x[1]*x[2]-8*x[1]**2-8*x[0]+8*x[0]*x[2]-16*x[0]*x[1]+15*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-3)*x[0]+7*x[0]*x[2]-3*x[0]*x[2]**2+x[0]*x[1]-3*x[0]*x[1]*x[2]+8*x[0]*x[1]**2+4*x[0]**2-4*x[0]**2*x[2]+8*x[0]**2*x[1]-5*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(3*x[0]-7*x[0]*x[2]+3*x[0]*x[2]**2-1*x[0]*x[1]+3*x[0]*x[1]*x[2]-8*x[0]*x[1]**2-4*x[0]**2+4*x[0]**2*x[2]-8*x[0]**2*x[1]+5*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[2]-8*x[2]**2-5*x[1]-9*x[1]*x[2]-4*x[1]**2+3*x[0]-6*x[0]*x[2]-9*x[0]*x[1]+3*x[0]**2
-    u[1]=6-3*x[2]-9*x[2]**2+5*x[1]+6*x[1]*x[2]-8*x[1]**2-7*x[0]-7*x[0]*x[2]-7*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=(-6)+3*x[2]+9*x[2]**2-5*x[1]-6*x[1]*x[2]+8*x[1]**2+14*x[0]+14*x[0]*x[2]+14*x[0]*x[1]-9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(6*x[0]-3*x[0]*x[2]-9*x[0]*x[2]**2+5*x[0]*x[1]+6*x[0]*x[1]*x[2]-8*x[0]*x[1]**2-7*x[0]**2-7*x[0]**2*x[2]-7*x[0]**2*x[1]+3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-6)*x[0]+3*x[0]*x[2]+9*x[0]*x[2]**2-5*x[0]*x[1]-6*x[0]*x[1]*x[2]+8*x[0]*x[1]**2+7*x[0]**2+7*x[0]**2*x[2]+7*x[0]**2*x[1]-3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[2]+2*x[2]**2-8*x[1]+3*x[1]*x[2]-8*x[1]**2-5*x[0]-9*x[0]*x[2]+6*x[0]*x[1]-4*x[0]**2
-    u[1]=(-5)-8*x[2]-1*x[2]**2-9*x[1]-8*x[1]*x[2]+x[1]**2+5*x[0]+8*x[0]*x[2]+4*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7-5*x[2]-2*x[2]**2+16*x[1]-6*x[1]*x[2]+24*x[1]**2+5*x[0]+9*x[0]*x[2]-12*x[0]*x[1]+4*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1]+5*x[1]*x[2]+2*x[1]*x[2]**2-8*x[1]**2+3*x[1]**2*x[2]-8*x[1]**3-5*x[0]*x[1]-9*x[0]*x[1]*x[2]+6*x[0]*x[1]**2-4*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6-9*x[2]-8*x[2]**2-3*x[1]+8*x[1]*x[2]+6*x[1]**2-1*x[0]-4*x[0]*x[2]+3*x[0]*x[1]+x[0]**2
-    u[1]=(-7)+5*x[2]+5*x[2]**2+6*x[1]+2*x[1]*x[2]+7*x[1]**2+x[0]-9*x[0]*x[2]-2*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7-5*x[2]-5*x[2]**2-12*x[1]-4*x[1]*x[2]-21*x[1]**2-1*x[0]+9*x[0]*x[2]+4*x[0]*x[1]-5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-7)*x[1]+5*x[1]*x[2]+5*x[1]*x[2]**2+6*x[1]**2+2*x[1]**2*x[2]+7*x[1]**3+x[0]*x[1]-9*x[0]*x[1]*x[2]-2*x[0]*x[1]**2+5*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-7)+5*x[2]+5*x[2]**2-5*x[1]+4*x[1]*x[2]-1*x[1]**2-4*x[0]-9*x[0]*x[2]+4*x[0]*x[1]+6*x[0]**2
-    u[1]=(-4)+4*x[2]+6*x[2]**2-8*x[1]-7*x[1]*x[2]-6*x[1]**2-3*x[0]-1*x[0]*x[2]+3*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=7-10*x[2]-15*x[2]**2+5*x[1]-8*x[1]*x[2]+x[1]**2+4*x[0]+18*x[0]*x[2]-4*x[0]*x[1]-6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-7)*x[2]+5*x[2]**2+5*x[2]**3-5*x[1]*x[2]+4*x[1]*x[2]**2-1*x[1]**2*x[2]-4*x[0]*x[2]-9*x[0]*x[2]**2+4*x[0]*x[1]*x[2]+6*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-4)-6*x[2]+7*x[2]**2+2*x[1]-5*x[1]*x[2]+2*x[1]**2-7*x[0]-9*x[0]*x[2]+3*x[0]*x[1]-7*x[0]**2
-    u[1]=(-4)+8*x[2]+8*x[2]**2-5*x[1]-3*x[1]*x[2]+2*x[1]**2+4*x[0]+6*x[0]*x[2]-3*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[0]=4-16*x[2]-24*x[2]**2+5*x[1]+6*x[1]*x[2]-2*x[1]**2-4*x[0]-12*x[0]*x[2]+3*x[0]*x[1]-8*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-4)*x[2]+8*x[2]**2+8*x[2]**3-5*x[1]*x[2]-3*x[1]*x[2]**2+2*x[1]**2*x[2]+4*x[0]*x[2]+6*x[0]*x[2]**2-3*x[0]*x[1]*x[2]+8*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-6)+7*x[2]+5*x[2]**2+x[1]+5*x[1]*x[2]-2*x[1]**2-1*x[0]+2*x[0]*x[2]-9*x[0]*x[1]+5*x[0]**2
-    u[1]=(-1)+2*x[2]+6*x[2]**2+7*x[1]+6*x[1]*x[2]+5*x[1]**2+2*x[0]-1*x[0]*x[2]-6*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=6-7*x[2]-5*x[2]**2-1*x[1]-5*x[1]*x[2]+2*x[1]**2+2*x[0]-4*x[0]*x[2]+18*x[0]*x[1]-15*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0]+7*x[0]*x[2]+5*x[0]*x[2]**2+x[0]*x[1]+5*x[0]*x[1]*x[2]-2*x[0]*x[1]**2-1*x[0]**2+2*x[0]**2*x[2]-9*x[0]**2*x[1]+5*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(6*x[0]-7*x[0]*x[2]-5*x[0]*x[2]**2-1*x[0]*x[1]-5*x[0]*x[1]*x[2]+2*x[0]*x[1]**2+x[0]**2-2*x[0]**2*x[2]+9*x[0]**2*x[1]-5*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-9)-3*x[2]+x[2]**2-8*x[1]+4*x[1]*x[2]+4*x[1]**2-3*x[0]-8*x[0]*x[2]-6*x[0]*x[1]-1*x[0]**2
-    u[1]=(-4)+7*x[2]+5*x[2]**2-9*x[1]+8*x[1]*x[2]+6*x[1]**2-1*x[0]+8*x[0]*x[2]+7*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=4-7*x[2]-5*x[2]**2+9*x[1]-8*x[1]*x[2]-6*x[1]**2+2*x[0]-16*x[0]*x[2]-14*x[0]*x[1]+12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-4)*x[0]+7*x[0]*x[2]+5*x[0]*x[2]**2-9*x[0]*x[1]+8*x[0]*x[1]*x[2]+6*x[0]*x[1]**2-1*x[0]**2+8*x[0]**2*x[2]+7*x[0]**2*x[1]-4*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(4*x[0]-7*x[0]*x[2]-5*x[0]*x[2]**2+9*x[0]*x[1]-8*x[0]*x[1]*x[2]-6*x[0]*x[1]**2+x[0]**2-8*x[0]**2*x[2]-7*x[0]**2*x[1]+4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[2]-4*x[2]**2-6*x[1]-1*x[1]*x[2]+7*x[1]**2+x[0]-9*x[0]*x[2]+x[0]*x[1]-1*x[0]**2
-    u[1]=(-6)-1*x[2]-5*x[2]**2-3*x[1]-1*x[1]*x[2]-2*x[1]**2-1*x[0]+7*x[0]*x[2]-4*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)+x[2]+4*x[2]**2+12*x[1]+2*x[1]*x[2]-21*x[1]**2-1*x[0]+9*x[0]*x[2]-2*x[0]*x[1]+x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(7*x[1]-1*x[1]*x[2]-4*x[1]*x[2]**2-6*x[1]**2-1*x[1]**2*x[2]+7*x[1]**3+x[0]*x[1]-9*x[0]*x[1]*x[2]+x[0]*x[1]**2-1*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=6+8*x[2]+8*x[2]**2+5*x[1]-3*x[1]*x[2]-3*x[1]**2+8*x[0]+6*x[0]*x[2]+8*x[0]*x[1]-7*x[0]**2
-    u[1]=1+5*x[2]+5*x[2]**2-3*x[1]-5*x[1]*x[2]+x[1]**2-4*x[0]+5*x[0]*x[2]+4*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)-5*x[2]-5*x[2]**2+6*x[1]+10*x[1]*x[2]-3*x[1]**2+4*x[0]-5*x[0]*x[2]-8*x[0]*x[1]-7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1]+5*x[1]*x[2]+5*x[1]*x[2]**2-3*x[1]**2-5*x[1]**2*x[2]+x[1]**3-4*x[0]*x[1]+5*x[0]*x[1]*x[2]+4*x[0]*x[1]**2+7*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-3)+7*x[2]-1*x[2]**2-4*x[1]-7*x[1]*x[2]-5*x[1]**2+8*x[0]-9*x[0]*x[2]-3*x[0]*x[1]-8*x[0]**2
-    u[1]=3+x[2]-5*x[2]**2-6*x[1]-2*x[1]*x[2]+7*x[1]**2-8*x[0]-2*x[0]*x[2]+8*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3-14*x[2]+3*x[2]**2+4*x[1]+14*x[1]*x[2]+5*x[1]**2-8*x[0]+18*x[0]*x[2]+3*x[0]*x[1]+8*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-3)*x[2]+7*x[2]**2-1*x[2]**3-4*x[1]*x[2]-7*x[1]*x[2]**2-5*x[1]**2*x[2]+8*x[0]*x[2]-9*x[0]*x[2]**2-3*x[0]*x[1]*x[2]-8*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_B_Vario_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(-5)+5*x[2]+8*x[2]**2-2*x[1]-4*x[1]*x[2]-9*x[1]**2-7*x[0]-8*x[0]*x[2]+5*x[0]*x[1]+x[0]**2
-    u[1]=(-3)+x[2]+4*x[2]**2+5*x[1]-1*x[1]*x[2]+x[1]**2+x[0]-5*x[0]*x[2]-2*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(2,3,2),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    Y_test[1]=3-2*x[2]-12*x[2]**2-5*x[1]+2*x[1]*x[2]-1*x[1]**2-1*x[0]+10*x[0]*x[2]+2*x[0]*x[1]+7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(2,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-3)*x[2]+x[2]**2+4*x[2]**3+5*x[1]*x[2]-1*x[1]*x[2]**2+x[1]**2*x[2]+x[0]*x[2]-5*x[0]*x[2]**2-2*x[0]*x[1]*x[2]-7*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(2,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(4-8*x[2]-8*x[1]+x[0])*jump
-    u[1]=(3+3*x[2]-8*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=4*x[0]-8*x[0]*x[2]-8*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-2)+5*x[2]+8*x[1]-8*x[0])*jump
-    u[1]=((-4)+4*x[2]-7*x[1]+6*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-4)*x[0]+4*x[0]*x[2]-7*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-8)-2*x[2]-3*x[1]-8*x[0])*jump
-    u[1]=((-8)-9*x[2]-7*x[1]+8*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]-2*x[0]*x[2]-3*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(3+4*x[2]+8*x[1]-4*x[0])*jump
-    u[1]=(7+2*x[2]-9*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(2,2),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=7*x[0]+2*x[0]*x[2]-9*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+3*x[2]-5*x[2]**2+5*x[1]-1*x[1]*x[2]-9*x[1]**2-7*x[0]+3*x[0]*x[2]-2*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)+4*x[2]-4*x[2]**2+7*x[1]+2*x[1]*x[2]+5*x[1]**2-1*x[0]+x[0]*x[2]-2*x[0]*x[1]-1*x[0]**2
-    u[2]=(-3)-1*x[2]+x[2]**2-4*x[1]+7*x[1]*x[2]+6*x[1]**2-3*x[0]+x[0]*x[2]-9*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=49-21*x[2]+14*x[1]+126*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-63)+21*x[2]-35*x[2]**2+35*x[1]-7*x[1]*x[2]-63*x[1]**2-49*x[0]+21*x[0]*x[2]-14*x[0]*x[1]-63*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(63-21*x[2]+35*x[2]**2-35*x[1]+7*x[1]*x[2]+63*x[1]**2+49*x[0]-21*x[0]*x[2]+14*x[0]*x[1]+63*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-9*x[2]+3*x[2]**2+3*x[1]+x[1]*x[2]+5*x[1]**2+7*x[0]+4*x[0]*x[2]-3*x[0]*x[1]-9*x[0]**2
-    u[1]=7-2*x[2]-5*x[2]**2-7*x[1]+6*x[1]*x[2]-1*x[1]**2-9*x[0]+3*x[0]*x[2]+8*x[0]*x[1]-9*x[0]**2
-    u[2]=5+7*x[2]+8*x[2]**2-3*x[1]-2*x[1]*x[2]-7*x[1]**2-6*x[0]+6*x[0]*x[2]-6*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=72-24*x[2]-64*x[1]+144*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(56-16*x[2]-40*x[2]**2-56*x[1]+48*x[1]*x[2]-8*x[1]**2-72*x[0]+24*x[0]*x[2]+64*x[0]*x[1]-72*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-56)+16*x[2]+40*x[2]**2+56*x[1]-48*x[1]*x[2]+8*x[1]**2+72*x[0]-24*x[0]*x[2]-64*x[0]*x[1]+72*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-9*x[2]-3*x[2]**2+6*x[1]-7*x[1]*x[2]+7*x[1]**2-3*x[0]-6*x[0]*x[2]+3*x[0]*x[1]+3*x[0]**2
-    u[1]=7+6*x[2]-5*x[2]**2+4*x[1]-2*x[1]*x[2]-6*x[1]**2+2*x[0]-6*x[0]*x[2]+3*x[0]*x[1]+4*x[0]**2
-    u[2]=(-5)+5*x[2]+5*x[2]**2+5*x[1]-7*x[1]*x[2]+x[1]**2-1*x[0]-8*x[0]*x[2]+3*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1+8*x[2]-3*x[1]+4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-5)+5*x[2]+5*x[2]**2+5*x[1]-7*x[1]*x[2]+x[1]**2-1*x[0]-8*x[0]*x[2]+3*x[0]*x[1]-2*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(5-5*x[2]-5*x[2]**2-5*x[1]+7*x[1]*x[2]-1*x[1]**2+x[0]+8*x[0]*x[2]-3*x[0]*x[1]+2*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)+6*x[2]+2*x[2]**2+3*x[1]-7*x[1]*x[2]-5*x[1]**2-9*x[0]-2*x[0]*x[2]+6*x[0]*x[1]+7*x[0]**2
-    u[1]=7-7*x[2]+7*x[2]**2+5*x[1]-3*x[1]*x[2]+x[1]**2-6*x[0]-7*x[0]*x[2]-5*x[0]*x[1]+3*x[0]**2
-    u[2]=(-5)+8*x[2]+7*x[2]**2+8*x[1]+6*x[1]*x[2]+8*x[1]**2-7*x[0]-2*x[0]*x[2]+5*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-15)+35*x[2]+50*x[1]-30*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-25)+30*x[2]+10*x[2]**2+15*x[1]-35*x[1]*x[2]-25*x[1]**2-45*x[0]-10*x[0]*x[2]+30*x[0]*x[1]+35*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=1+x[2]+7*x[2]**2+3*x[1]-3*x[1]*x[2]-4*x[1]**2-3*x[0]+x[0]*x[2]+7*x[0]*x[1]+x[0]**2
-    u[1]=2-4*x[2]+2*x[2]**2-1*x[1]+6*x[1]*x[2]+6*x[1]**2+7*x[0]-4*x[0]*x[2]-7*x[0]*x[1]-9*x[0]**2
-    u[2]=(-4)+2*x[2]-2*x[2]**2-4*x[1]+2*x[1]*x[2]-6*x[1]**2+x[0]-2*x[0]*x[2]+5*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5-30*x[2]-60*x[1]+35*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(10-20*x[2]+10*x[2]**2-5*x[1]+30*x[1]*x[2]+30*x[1]**2+35*x[0]-20*x[0]*x[2]-35*x[0]*x[1]-45*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3-8*x[2]+6*x[2]**2-8*x[1]+6*x[1]*x[2]-2*x[1]**2+5*x[0]-4*x[0]*x[2]-5*x[0]*x[1]+2*x[0]**2
-    u[1]=3+2*x[2]-1*x[2]**2-2*x[1]+5*x[1]*x[2]-1*x[1]**2+8*x[0]+7*x[0]*x[2]-1*x[0]*x[1]+3*x[0]**2
-    u[2]=(-5)-1*x[2]-6*x[2]**2-4*x[1]-9*x[1]*x[2]-3*x[1]**2-1*x[0]+5*x[0]*x[2]-2*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=20+45*x[2]+30*x[1]+10*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-25)-5*x[2]-30*x[2]**2-20*x[1]-45*x[1]*x[2]-15*x[1]**2-5*x[0]+25*x[0]*x[2]-10*x[0]*x[1]-5*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)-1*x[2]+3*x[2]**2-4*x[1]-9*x[1]*x[2]-6*x[1]**2-9*x[0]+8*x[0]*x[2]-9*x[0]*x[1]-2*x[0]**2
-    u[1]=(-2)-8*x[2]-2*x[2]**2+6*x[1]-8*x[1]*x[2]-4*x[1]**2-1*x[0]+6*x[0]*x[2]-6*x[0]*x[1]+2*x[0]**2
-    u[2]=(-6)+5*x[2]+7*x[2]**2+5*x[1]+2*x[1]*x[2]+6*x[1]**2-3*x[0]+5*x[0]*x[2]-1*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=2-12*x[2]+18*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-4)-2*x[2]+6*x[2]**2-8*x[1]-18*x[1]*x[2]-12*x[1]**2-18*x[0]+16*x[0]*x[2]-18*x[0]*x[1]-4*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-6)-6*x[2]-9*x[2]**2-4*x[1]+6*x[1]*x[2]-4*x[1]**2+4*x[0]-5*x[0]*x[2]+5*x[0]*x[1]-9*x[0]**2
-    u[1]=(-9)-5*x[2]+6*x[2]**2+x[1]-7*x[1]*x[2]-6*x[1]**2-3*x[0]+7*x[0]*x[2]+x[0]*x[1]+2*x[0]**2
-    u[2]=(-5)-4*x[2]-5*x[2]**2-7*x[1]-7*x[1]*x[2]+4*x[1]**2+8*x[0]+4*x[0]*x[2]+5*x[0]*x[1]-1*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=30-72*x[2]+42*x[1]-42*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-54)-30*x[2]+36*x[2]**2+6*x[1]-42*x[1]*x[2]-36*x[1]**2-18*x[0]+42*x[0]*x[2]+6*x[0]*x[1]+12*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+8*x[2]+x[2]**2-2*x[1]-4*x[1]*x[2]-3*x[1]**2+x[0]-2*x[0]*x[2]-2*x[0]*x[1]-2*x[0]**2
-    u[1]=4-1*x[2]-6*x[2]**2+4*x[1]-4*x[1]*x[2]-9*x[1]**2-8*x[0]-1*x[0]*x[2]+8*x[0]*x[1]+5*x[0]**2
-    u[2]=(-8)-3*x[2]+5*x[2]**2-1*x[1]+6*x[1]*x[2]+8*x[1]**2-7*x[0]+7*x[0]*x[2]-3*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=6-20*x[2]-12*x[1]-14*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-16)-6*x[2]+10*x[2]**2-2*x[1]+12*x[1]*x[2]+16*x[1]**2-14*x[0]+14*x[0]*x[2]-6*x[0]*x[1]+16*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+7*x[2]-8*x[2]**2-5*x[1]+8*x[1]*x[2]-6*x[1]**2-3*x[0]+7*x[0]*x[2]+x[0]*x[1]-6*x[0]**2
-    u[1]=3+6*x[2]-1*x[2]**2+4*x[1]+2*x[1]*x[2]+6*x[1]**2+4*x[0]+2*x[0]*x[2]+5*x[0]*x[1]+x[0]**2
-    u[2]=(-4)-3*x[2]+7*x[2]**2+4*x[1]+5*x[1]*x[2]+3*x[1]**2+3*x[0]+7*x[0]*x[2]-3*x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=12-28*x[2]-4*x[1]+48*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-28)+28*x[2]-32*x[2]**2-20*x[1]+32*x[1]*x[2]-24*x[1]**2-12*x[0]+28*x[0]*x[2]+4*x[0]*x[1]-24*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(28-28*x[2]+32*x[2]**2+20*x[1]-32*x[1]*x[2]+24*x[1]**2+12*x[0]-28*x[0]*x[2]-4*x[0]*x[1]+24*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-9*x[2]-1*x[2]**2-8*x[1]-4*x[1]*x[2]+3*x[1]**2+2*x[0]+3*x[0]*x[2]+8*x[0]*x[1]+2*x[0]**2
-    u[1]=6-1*x[2]-5*x[2]**2-8*x[1]+x[1]*x[2]-2*x[1]**2-1*x[0]-8*x[0]*x[2]+x[0]*x[1]-4*x[0]**2
-    u[2]=4-4*x[2]+3*x[2]**2+2*x[1]+4*x[1]*x[2]+8*x[1]**2-1*x[0]-3*x[0]*x[2]+5*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=5+40*x[2]-5*x[1]+40*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(30-5*x[2]-25*x[2]**2-40*x[1]+5*x[1]*x[2]-10*x[1]**2-5*x[0]-40*x[0]*x[2]+5*x[0]*x[1]-20*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-30)+5*x[2]+25*x[2]**2+40*x[1]-5*x[1]*x[2]+10*x[1]**2+5*x[0]+40*x[0]*x[2]-5*x[0]*x[1]+20*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[2]+8*x[2]**2+3*x[1]+3*x[1]*x[2]-6*x[1]**2+4*x[0]+8*x[0]*x[2]-7*x[0]*x[1]+4*x[0]**2
-    u[1]=(-3)-6*x[2]-9*x[2]**2-3*x[1]-5*x[1]*x[2]-7*x[1]**2-4*x[0]+3*x[0]*x[2]-1*x[0]*x[1]+4*x[0]**2
-    u[2]=6-6*x[2]-8*x[2]**2+8*x[1]-5*x[1]*x[2]+6*x[1]**2+4*x[0]+2*x[0]*x[2]+4*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)-6*x[2]-12*x[1]+24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(18-18*x[2]-24*x[2]**2+24*x[1]-15*x[1]*x[2]+18*x[1]**2+12*x[0]+6*x[0]*x[2]+12*x[0]*x[1]-12*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-18)+18*x[2]+24*x[2]**2-24*x[1]+15*x[1]*x[2]-18*x[1]**2-12*x[0]-6*x[0]*x[2]-12*x[0]*x[1]+12*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-5*x[2]-7*x[2]**2+3*x[1]+x[1]*x[2]-3*x[1]**2+3*x[0]+2*x[0]*x[2]-5*x[0]*x[1]+7*x[0]**2
-    u[1]=(-8)+5*x[2]+2*x[2]**2+6*x[1]-7*x[1]*x[2]+8*x[1]**2+6*x[0]+8*x[0]*x[2]-9*x[0]*x[1]+6*x[0]**2
-    u[2]=7+x[2]-2*x[2]**2+7*x[1]-1*x[1]*x[2]+5*x[1]**2+4*x[0]+6*x[0]*x[2]+3*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-15)-5*x[2]+30*x[1]+25*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-20)-25*x[2]-35*x[2]**2+15*x[1]+5*x[1]*x[2]-15*x[1]**2+15*x[0]+10*x[0]*x[2]-25*x[0]*x[1]+35*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+5*x[2]+2*x[2]**2-5*x[1]+4*x[1]*x[2]-1*x[1]**2+6*x[0]-6*x[0]*x[2]+2*x[0]*x[1]-6*x[0]**2
-    u[1]=8-8*x[2]-5*x[2]**2+2*x[1]+8*x[1]*x[2]-6*x[1]**2+2*x[0]+8*x[0]*x[2]+8*x[0]*x[1]+6*x[0]**2
-    u[2]=8+4*x[2]-4*x[2]**2+2*x[1]-6*x[1]*x[2]+6*x[1]**2+8*x[0]+x[0]*x[2]+3*x[0]*x[1]-4*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-10)-40*x[2]+60*x[1]-40*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(40-40*x[2]-25*x[2]**2+10*x[1]+40*x[1]*x[2]-30*x[1]**2+10*x[0]+40*x[0]*x[2]+40*x[0]*x[1]+30*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-3*x[2]-4*x[2]**2-4*x[1]+6*x[1]*x[2]-5*x[1]**2-7*x[0]-9*x[0]*x[2]-8*x[0]*x[1]-1*x[0]**2
-    u[1]=3-5*x[2]+7*x[2]**2+5*x[1]+6*x[1]*x[2]-5*x[1]**2+5*x[0]-2*x[0]*x[2]+7*x[0]*x[1]-9*x[0]**2
-    u[2]=(-8)-7*x[2]-5*x[2]**2-1*x[1]-8*x[1]*x[2]-3*x[1]**2+7*x[0]+x[0]*x[2]-5*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=3
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=3+24*x[2]+18*x[1]+15*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-24)-21*x[2]-15*x[2]**2-3*x[1]-24*x[1]*x[2]-9*x[1]**2+21*x[0]+3*x[0]*x[2]-15*x[0]*x[1]-24*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-9*x[2]+4*x[2]**2+3*x[1]+7*x[1]*x[2]+3*x[1]**2-8*x[0]+4*x[0]*x[2]-7*x[0]*x[1]+5*x[0]**2
-    u[1]=(-9)+3*x[2]-1*x[2]**2+3*x[1]+5*x[1]*x[2]-3*x[1]**2+x[0]+5*x[0]*x[2]+7*x[0]*x[1]+3*x[0]**2
-    u[2]=(-2)-7*x[2]+6*x[2]**2-4*x[1]+4*x[1]*x[2]-5*x[1]**2+8*x[0]-5*x[0]*x[2]-2*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=36-32*x[2]-28*x[1]-16*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-28)-36*x[2]+16*x[2]**2+12*x[1]+28*x[1]*x[2]+12*x[1]**2-32*x[0]+16*x[0]*x[2]-28*x[0]*x[1]+20*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)+7*x[2]-1*x[2]**2+2*x[1]-7*x[1]*x[2]-7*x[1]**2+3*x[0]-2*x[0]*x[2]+x[0]*x[1]-8*x[0]**2
-    u[1]=4-9*x[2]+2*x[2]**2-6*x[1]-8*x[1]*x[2]+8*x[1]**2-5*x[0]-4*x[0]*x[2]+8*x[0]*x[1]-9*x[0]**2
-    u[2]=7-6*x[2]-2*x[2]**2-3*x[1]+5*x[1]*x[2]-2*x[1]**2+x[0]+2*x[0]*x[2]+2*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=7
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=63-28*x[2]+56*x[1]+28*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*(28-63*x[2]+14*x[2]**2-42*x[1]-56*x[1]*x[2]+56*x[1]**2-35*x[0]-28*x[0]*x[2]+56*x[0]*x[1]-63*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+7*x[2]+3*x[2]**2-3*x[1]+x[1]*x[2]+5*x[1]**2-7*x[0]+7*x[0]*x[2]+x[0]*x[1]-6*x[0]**2
-    u[1]=(-4)-2*x[2]+4*x[2]**2+4*x[1]-7*x[1]*x[2]-1*x[1]**2+x[0]+6*x[0]*x[2]+x[0]*x[1]-7*x[0]**2
-    u[2]=(-7)+3*x[2]-1*x[2]**2-6*x[1]+2*x[1]*x[2]-5*x[1]**2-1*x[0]-6*x[0]*x[2]+5*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=4
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-12)+8*x[2]-8*x[1]+24*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-28)+12*x[2]-4*x[2]**2-24*x[1]+8*x[1]*x[2]-20*x[1]**2-4*x[0]-24*x[0]*x[2]+20*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)+4*x[2]-9*x[2]**2+3*x[1]-2*x[1]*x[2]+5*x[1]**2-9*x[0]+6*x[0]*x[2]-4*x[0]*x[1]+5*x[0]**2
-    u[1]=3+5*x[2]-5*x[2]**2+2*x[1]-2*x[1]*x[2]+4*x[1]**2-1*x[0]-8*x[0]*x[2]+x[0]*x[1]-6*x[0]**2
-    u[2]=(-2)-4*x[2]-2*x[2]**2-5*x[1]+x[1]*x[2]+6*x[1]**2+2*x[0]+5*x[0]*x[2]-8*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=45-30*x[2]+20*x[1]-50*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-35)+20*x[2]-45*x[2]**2+15*x[1]-10*x[1]*x[2]+25*x[1]**2-45*x[0]+30*x[0]*x[2]-20*x[0]*x[1]+25*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(35-20*x[2]+45*x[2]**2-15*x[1]+10*x[1]*x[2]-25*x[1]**2+45*x[0]-30*x[0]*x[2]+20*x[0]*x[1]-25*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[2]+5*x[2]**2-6*x[1]-7*x[1]*x[2]-3*x[1]**2-4*x[0]-3*x[0]*x[2]+6*x[0]*x[1]-4*x[0]**2
-    u[1]=(-5)-3*x[2]-5*x[2]**2+6*x[1]-9*x[1]*x[2]-8*x[1]**2-7*x[0]+2*x[0]*x[2]-4*x[0]*x[1]+x[0]**2
-    u[2]=7+5*x[2]-2*x[2]**2-3*x[1]+2*x[1]*x[2]-7*x[1]**2+8*x[0]-3*x[0]*x[2]-7*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=42-12*x[2]+24*x[1]-12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-30)-18*x[2]-30*x[2]**2+36*x[1]-54*x[1]*x[2]-48*x[1]**2-42*x[0]+12*x[0]*x[2]-24*x[0]*x[1]+6*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(30+18*x[2]+30*x[2]**2-36*x[1]+54*x[1]*x[2]+48*x[1]**2+42*x[0]-12*x[0]*x[2]+24*x[0]*x[1]-6*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-4*x[2]-2*x[2]**2+3*x[1]-1*x[1]*x[2]+x[1]**2-8*x[0]+2*x[0]*x[2]-3*x[0]*x[1]+2*x[0]**2
-    u[1]=(-2)-1*x[2]-8*x[2]**2+4*x[1]-2*x[1]*x[2]+5*x[1]**2+4*x[0]-5*x[0]*x[2]-8*x[0]*x[1]-5*x[0]**2
-    u[2]=4+3*x[2]-7*x[2]**2-5*x[1]-5*x[1]*x[2]+3*x[1]**2-9*x[0]+3*x[0]*x[2]-3*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=54-18*x[2]+18*x[1]-48*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(24+18*x[2]-42*x[2]**2-30*x[1]-30*x[1]*x[2]+18*x[1]**2-54*x[0]+18*x[0]*x[2]-18*x[0]*x[1]+24*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-24)-18*x[2]+42*x[2]**2+30*x[1]+30*x[1]*x[2]-18*x[1]**2+54*x[0]-18*x[0]*x[2]+18*x[0]*x[1]-24*x[0]**2)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=5-5*x[2]+x[2]**2-2*x[1]-3*x[1]*x[2]-3*x[1]**2-2*x[0]+5*x[0]*x[2]-4*x[0]*x[1]+5*x[0]**2
-    u[1]=(-4)+5*x[2]+8*x[2]**2-8*x[1]-4*x[1]*x[2]+4*x[1]**2-5*x[0]+5*x[0]*x[2]-8*x[0]*x[1]+6*x[0]**2
-    u[2]=4-4*x[2]-2*x[2]**2-6*x[1]-9*x[1]*x[2]-5*x[1]**2+8*x[0]-5*x[0]*x[2]+4*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=5
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=10+15*x[2]+30*x[1]+20*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(25-25*x[2]+5*x[2]**2-10*x[1]-15*x[1]*x[2]-15*x[1]**2-10*x[0]+25*x[0]*x[2]-20*x[0]*x[1]+25*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+4*x[2]-3*x[2]**2-7*x[1]-9*x[1]*x[2]-3*x[1]**2+7*x[0]-2*x[0]*x[2]+7*x[0]*x[1]+3*x[0]**2
-    u[1]=8+8*x[2]-1*x[2]**2-3*x[1]-6*x[1]*x[2]+2*x[1]**2+2*x[0]+2*x[0]*x[2]+2*x[0]*x[1]+7*x[0]**2
-    u[2]=3-5*x[2]+7*x[2]**2+8*x[1]+7*x[1]*x[2]-2*x[1]**2+8*x[0]+4*x[0]*x[2]+8*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=2
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=6+12*x[2]-8*x[1]-4*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(16+16*x[2]-2*x[2]**2-6*x[1]-12*x[1]*x[2]+4*x[1]**2+4*x[0]+4*x[0]*x[2]+4*x[0]*x[1]+14*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=7-1*x[2]-2*x[2]**2-6*x[1]-2*x[1]*x[2]+7*x[1]**2+5*x[0]+3*x[0]*x[2]+2*x[0]*x[1]-9*x[0]**2
-    u[1]=(-8)-4*x[2]+7*x[2]**2+3*x[1]+4*x[1]*x[2]-9*x[1]**2-2*x[0]+6*x[0]*x[2]-1*x[0]*x[1]-1*x[0]**2
-    u[2]=(-9)+4*x[2]-5*x[2]**2+x[1]-3*x[1]*x[2]-5*x[1]**2-3*x[0]-4*x[0]*x[2]+3*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-6)+18*x[2]+60*x[1]-18*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-54)+24*x[2]-30*x[2]**2+6*x[1]-18*x[1]*x[2]-30*x[1]**2-18*x[0]-24*x[0]*x[2]+18*x[0]*x[1]-54*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+8*x[2]+5*x[2]**2+2*x[1]+3*x[1]*x[2]+5*x[1]**2-5*x[0]-2*x[0]*x[2]-1*x[0]*x[1]+6*x[0]**2
-    u[1]=6-8*x[2]-6*x[2]**2+6*x[1]+4*x[1]*x[2]+6*x[1]**2-9*x[0]-9*x[0]*x[2]-2*x[0]*x[1]-7*x[0]**2
-    u[2]=(-7)-4*x[2]-7*x[2]**2+8*x[1]+6*x[1]*x[2]+8*x[1]**2-8*x[0]+3*x[0]*x[2]-9*x[0]*x[1]-7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=6
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-48)-60*x[2]-18*x[1]+12*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(24+48*x[2]+30*x[2]**2+12*x[1]+18*x[1]*x[2]+30*x[1]**2-30*x[0]-12*x[0]*x[2]-6*x[0]*x[1]+36*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-7*x[2]+3*x[2]**2+4*x[1]-4*x[1]*x[2]-9*x[1]**2-5*x[0]-7*x[0]*x[2]-3*x[0]*x[1]-5*x[0]**2
-    u[1]=(-3)-9*x[2]+8*x[2]**2-7*x[1]+8*x[1]*x[2]-3*x[1]**2-1*x[0]+7*x[0]*x[2]-7*x[0]*x[1]-8*x[0]**2
-    u[2]=(-8)+x[2]+5*x[2]**2+4*x[1]-5*x[1]*x[2]-2*x[1]**2-1*x[0]-7*x[0]*x[2]+6*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=1
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=9-16*x[2]-8*x[1]-7*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-3)-9*x[2]+8*x[2]**2-7*x[1]+8*x[1]*x[2]-3*x[1]**2-1*x[0]+7*x[0]*x[2]-7*x[0]*x[1]-8*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Const_typeContact_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-2*x[2]-3*x[2]**2+2*x[1]-9*x[1]*x[2]+6*x[1]**2+2*x[0]-9*x[0]*x[2]+4*x[0]*x[1]+x[0]**2
-    u[1]=4-4*x[2]-8*x[2]**2+x[1]+8*x[1]*x[2]-6*x[1]**2+6*x[0]-5*x[0]*x[2]+8*x[0]*x[1]-5*x[0]**2
-    u[2]=(-7)-2*x[2]-1*x[2]**2+6*x[1]+2*x[1]*x[2]-2*x[1]**2-3*x[0]+x[0]*x[2]+5*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=8
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=16+16*x[2]-16*x[1]-8*x[0]
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-56)-16*x[2]-8*x[2]**2+48*x[1]+16*x[1]*x[2]-16*x[1]**2-24*x[0]+8*x[0]*x[2]+40*x[0]*x[1]+24*x[0]**2)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(6+x[2]+4*x[2]**2-9*x[1]+x[1]*x[2]-2*x[1]**2-2*x[0]+6*x[0]*x[2]+2*x[0]*x[1]-2*x[0]**2)*jump
-    u[1]=(2-4*x[2]+8*x[2]**2+5*x[1]-4*x[1]*x[2]+6*x[1]**2-5*x[0]-9*x[0]*x[2]-4*x[0]*x[1]-7*x[0]**2)*jump
-    u[2]=((-2)+5*x[2]+7*x[2]**2-1*x[1]+4*x[1]*x[2]-2*x[1]**2+x[0]+5*x[0]*x[2]+5*x[0]*x[1]-1*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=12+2*x[2]+8*x[2]**2-18*x[1]+2*x[1]*x[2]-4*x[1]**2-4*x[0]+12*x[0]*x[2]+4*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6)-4*x[2]+x[2]**2-5*x[1]+2*x[1]*x[2]-4*x[1]**2+6*x[0]+4*x[0]*x[2]+2*x[0]*x[1]+5*x[0]**2)*jump
-    u[1]=((-7)+3*x[2]+3*x[2]**2+6*x[1]-5*x[1]*x[2]+5*x[1]**2-1*x[0]+4*x[0]*x[2]+2*x[0]*x[1]-3*x[0]**2)*jump
-    u[2]=((-6)+5*x[2]-8*x[2]**2+7*x[1]-3*x[1]*x[2]-9*x[1]**2-7*x[0]+x[0]*x[2]-3*x[0]*x[1]+5*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-49)+21*x[2]+21*x[2]**2+42*x[1]-35*x[1]*x[2]+35*x[1]**2-7*x[0]+28*x[0]*x[2]+14*x[0]*x[1]-21*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)+5*x[2]-9*x[2]**2+7*x[1]+8*x[1]*x[2]-2*x[1]**2+2*x[0]+3*x[0]*x[2]+6*x[0]*x[1]-4*x[0]**2)*jump
-    u[1]=(6-1*x[2]-8*x[2]**2-1*x[1]+8*x[1]*x[2]-1*x[1]**2+5*x[0]-3*x[0]*x[2]-1*x[0]*x[1]-5*x[0]**2)*jump
-    u[2]=((-4)-1*x[2]+8*x[2]**2+x[1]-7*x[1]*x[2]-7*x[1]**2+x[0]+7*x[0]*x[2]+5*x[0]*x[1]-6*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-24)-6*x[2]+48*x[2]**2+6*x[1]-42*x[1]*x[2]-42*x[1]**2+6*x[0]+42*x[0]*x[2]+30*x[0]*x[1]-36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9)+7*x[2]+2*x[2]**2+6*x[1]+3*x[1]*x[2]-5*x[1]**2+6*x[0]+x[0]*x[2]-1*x[0]*x[1]+7*x[0]**2)*jump
-    u[1]=(1+4*x[2]-3*x[2]**2+2*x[1]-2*x[1]*x[2]-4*x[1]**2+6*x[0]+2*x[0]*x[2]-9*x[0]*x[1]+8*x[0]**2)*jump
-    u[2]=((-4)+7*x[2]+3*x[2]**2-9*x[1]-9*x[1]*x[2]-7*x[1]**2-8*x[0]+7*x[0]*x[2]+8*x[0]*x[1]+5*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-18)+14*x[2]+4*x[2]**2+12*x[1]+6*x[1]*x[2]-10*x[1]**2+12*x[0]+2*x[0]*x[2]-2*x[0]*x[1]+14*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(8+5*x[2]-6*x[2]**2-6*x[1]-3*x[1]*x[2]+x[1]**2-2*x[0]+5*x[0]*x[2]-6*x[0]*x[1]-9*x[0]**2)*jump
-    u[1]=(4+8*x[2]+3*x[2]**2-6*x[1]-6*x[1]*x[2]-6*x[1]**2+3*x[0]+7*x[0]*x[2]-2*x[0]*x[1]+6*x[0]**2)*jump
-    u[2]=((-2)+6*x[2]-8*x[2]**2-3*x[1]+8*x[1]*x[2]+2*x[1]**2-8*x[0]-5*x[0]*x[2]+6*x[0]*x[1]+4*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=6
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=24+48*x[2]+18*x[2]**2-36*x[1]-36*x[1]*x[2]-36*x[1]**2+18*x[0]+42*x[0]*x[2]-12*x[0]*x[1]+36*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7-1*x[2]+3*x[2]**2-8*x[1]-8*x[1]*x[2]+2*x[1]**2-5*x[0]-6*x[0]*x[2]-7*x[0]*x[1]-1*x[0]**2)*jump
-    u[1]=(3-5*x[2]+8*x[2]**2-1*x[1]-3*x[1]*x[2]+5*x[1]**2+6*x[0]-3*x[0]*x[2]+3*x[0]*x[1]-4*x[0]**2)*jump
-    u[2]=((-9)-7*x[2]+5*x[2]**2+6*x[1]+6*x[1]*x[2]-1*x[1]**2+7*x[0]-2*x[0]*x[2]+6*x[0]*x[1]-7*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-45)-35*x[2]+25*x[2]**2+30*x[1]+30*x[1]*x[2]-5*x[1]**2+35*x[0]-10*x[0]*x[2]+30*x[0]*x[1]-35*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-2)-5*x[2]+3*x[2]**2-2*x[1]+7*x[1]*x[2]+7*x[1]**2-8*x[0]-5*x[0]*x[2]+8*x[0]*x[1]+4*x[0]**2)*jump
-    u[1]=(8-2*x[2]-7*x[2]**2-3*x[1]+x[1]*x[2]+2*x[1]**2-8*x[0]-5*x[0]*x[2]+8*x[0]*x[1]-8*x[0]**2)*jump
-    u[2]=(2-8*x[2]+7*x[2]**2-1*x[1]+5*x[1]*x[2]-8*x[1]**2-1*x[0]-5*x[0]*x[2]-7*x[0]*x[1]+5*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-6)-15*x[2]+9*x[2]**2-6*x[1]+21*x[1]*x[2]+21*x[1]**2-24*x[0]-15*x[0]*x[2]+24*x[0]*x[1]+12*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-4)+5*x[2]+x[2]**2-2*x[1]-2*x[1]*x[2]-8*x[1]**2-3*x[0]+3*x[0]*x[2]+6*x[0]*x[1]+x[0]**2)*jump
-    u[1]=((-1)+3*x[2]-6*x[2]**2+x[1]-5*x[1]*x[2]-3*x[1]**2-2*x[0]-4*x[0]*x[2]+6*x[0]*x[1]+3*x[0]**2)*jump
-    u[2]=((-1)+8*x[2]-9*x[2]**2+2*x[1]-2*x[1]*x[2]+3*x[1]**2-3*x[0]-3*x[0]*x[2]-9*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=2
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-2)+6*x[2]-12*x[2]**2+2*x[1]-10*x[1]*x[2]-6*x[1]**2-4*x[0]-8*x[0]*x[2]+12*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+7*x[2]-6*x[2]**2-6*x[1]+8*x[1]*x[2]+x[1]**2+8*x[0]+3*x[0]*x[2]+8*x[0]*x[1]-7*x[0]**2)*jump
-    u[1]=(8-2*x[2]+7*x[2]**2-1*x[1]-7*x[1]*x[2]-3*x[1]**2+2*x[0]-9*x[0]*x[2]-9*x[0]*x[1]+7*x[0]**2)*jump
-    u[2]=((-2)+8*x[2]+2*x[2]**2-3*x[1]+4*x[1]*x[2]+4*x[1]**2+2*x[0]+5*x[0]*x[2]-4*x[0]*x[1]-7*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-6)+24*x[2]+6*x[2]**2-9*x[1]+12*x[1]*x[2]+12*x[1]**2+6*x[0]+15*x[0]*x[2]-12*x[0]*x[1]-21*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp000(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4-4*x[2]-7*x[2]**2+5*x[1]+7*x[1]*x[2]-7*x[1]**2+6*x[0]-3*x[0]*x[2]+5*x[0]*x[1]+2*x[0]**2
-    u[1]=(-2)-7*x[2]+8*x[2]**2+x[1]-4*x[1]*x[2]+2*x[1]**2-9*x[0]-7*x[0]*x[2]-5*x[0]*x[1]+3*x[0]**2
-    u[2]=4-3*x[2]+4*x[2]**2+x[1]+7*x[1]*x[2]+7*x[1]**2-1*x[0]-9*x[0]*x[2]-2*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+4*x[2]+7*x[2]**2-5*x[1]-7*x[1]*x[2]+7*x[1]**2-12*x[0]+6*x[0]*x[2]-10*x[0]*x[1]-6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]-4*x[0]*x[2]-7*x[0]*x[2]**2+5*x[0]*x[1]+7*x[0]*x[1]*x[2]-7*x[0]*x[1]**2+6*x[0]**2-3*x[0]**2*x[2]+5*x[0]**2*x[1]+2*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-4)*x[0]+4*x[0]*x[2]+7*x[0]*x[2]**2-5*x[0]*x[1]-7*x[0]*x[1]*x[2]+7*x[0]*x[1]**2-6*x[0]**2+3*x[0]**2*x[2]-5*x[0]**2*x[1]-2*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp001(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)+5*x[2]-2*x[2]**2+5*x[1]+2*x[1]*x[2]+3*x[1]**2+4*x[0]-2*x[0]*x[2]-1*x[0]*x[1]+5*x[0]**2
-    u[1]=(-1)-6*x[2]+8*x[2]**2+8*x[1]+7*x[1]*x[2]+7*x[1]**2+8*x[0]+x[0]*x[2]+6*x[0]*x[1]+4*x[0]**2
-    u[2]=(-8)-9*x[2]+x[2]**2+2*x[1]+x[1]*x[2]-6*x[1]**2+8*x[0]-9*x[0]*x[2]-2*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=1+6*x[2]-8*x[2]**2-8*x[1]-7*x[1]*x[2]-7*x[1]**2-16*x[0]-2*x[0]*x[2]-12*x[0]*x[1]-12*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*((-1)*x[0]-6*x[0]*x[2]+8*x[0]*x[2]**2+8*x[0]*x[1]+7*x[0]*x[1]*x[2]+7*x[0]*x[1]**2+8*x[0]**2+x[0]**2*x[2]+6*x[0]**2*x[1]+4*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*(x[0]+6*x[0]*x[2]-8*x[0]*x[2]**2-8*x[0]*x[1]-7*x[0]*x[1]*x[2]-7*x[0]*x[1]**2-8*x[0]**2-1*x[0]**2*x[2]-6*x[0]**2*x[1]-4*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp002(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-8*x[2]**2+4*x[1]+x[1]*x[2]+4*x[1]**2-6*x[0]+x[0]*x[2]-3*x[0]*x[1]-3*x[0]**2
-    u[1]=1+6*x[2]-5*x[2]**2-6*x[1]-6*x[1]*x[2]-6*x[1]**2+2*x[0]+7*x[0]*x[2]+3*x[0]*x[1]-7*x[0]**2
-    u[2]=4-3*x[2]-1*x[2]**2+2*x[1]-3*x[1]*x[2]-5*x[1]**2+8*x[0]-7*x[0]*x[2]+8*x[0]*x[1]-3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)+3*x[2]+x[2]**2-2*x[1]+3*x[1]*x[2]+5*x[1]**2-16*x[0]+14*x[0]*x[2]-16*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[0]*(4*x[0]-3*x[0]*x[2]-1*x[0]*x[2]**2+2*x[0]*x[1]-3*x[0]*x[1]*x[2]-5*x[0]*x[1]**2+8*x[0]**2-7*x[0]**2*x[2]+8*x[0]**2*x[1]-3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[0]=n_contact[0]*((-4)*x[0]+3*x[0]*x[2]+x[0]*x[2]**2-2*x[0]*x[1]+3*x[0]*x[1]*x[2]+5*x[0]*x[1]**2-8*x[0]**2+7*x[0]**2*x[2]-8*x[0]**2*x[1]+3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp010(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-8)-8*x[2]-5*x[2]**2+6*x[1]+6*x[1]*x[2]-7*x[1]**2+6*x[0]-4*x[0]*x[2]+2*x[0]*x[1]-4*x[0]**2
-    u[1]=(-2)+7*x[2]+4*x[2]**2+8*x[1]+3*x[1]*x[2]+8*x[1]**2+3*x[0]+7*x[0]*x[2]+6*x[0]*x[1]-3*x[0]**2
-    u[2]=(-4)-1*x[2]-5*x[2]**2+3*x[1]-4*x[1]*x[2]+4*x[1]**2-5*x[0]+3*x[0]*x[2]-9*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=8+8*x[2]+5*x[2]**2-12*x[1]-12*x[1]*x[2]+21*x[1]**2-6*x[0]+4*x[0]*x[2]-4*x[0]*x[1]+4*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*((-8)*x[1]-8*x[1]*x[2]-5*x[1]*x[2]**2+6*x[1]**2+6*x[1]**2*x[2]-7*x[1]**3+6*x[0]*x[1]-4*x[0]*x[1]*x[2]+2*x[0]*x[1]**2-4*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp011(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-5*x[2]+3*x[2]**2+2*x[1]-9*x[1]*x[2]-4*x[1]**2-8*x[0]-6*x[0]*x[2]-7*x[0]*x[1]+3*x[0]**2
-    u[1]=4+x[2]-1*x[2]**2-8*x[1]+6*x[1]*x[2]+4*x[1]**2-7*x[0]-6*x[0]*x[2]-3*x[0]*x[1]+2*x[0]**2
-    u[2]=(-4)+3*x[2]+3*x[2]**2-2*x[1]-6*x[1]*x[2]+6*x[1]**2-9*x[0]-6*x[0]*x[2]+x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)-1*x[2]+x[2]**2+16*x[1]-12*x[1]*x[2]-12*x[1]**2+7*x[0]+6*x[0]*x[2]+6*x[0]*x[1]-2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(4*x[1]+x[1]*x[2]-1*x[1]*x[2]**2-8*x[1]**2+6*x[1]**2*x[2]+4*x[1]**3-7*x[0]*x[1]-6*x[0]*x[1]*x[2]-3*x[0]*x[1]**2+2*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp012(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=8+4*x[2]+8*x[2]**2-6*x[1]-3*x[1]*x[2]-1*x[1]**2-3*x[0]-1*x[0]*x[2]+2*x[0]*x[1]-6*x[0]**2
-    u[1]=1-5*x[2]+4*x[2]**2+x[1]+6*x[1]*x[2]-3*x[1]**2+x[0]-9*x[0]*x[2]-1*x[0]*x[1]-8*x[0]**2
-    u[2]=3-1*x[2]-7*x[2]**2-9*x[1]+x[1]*x[2]+8*x[1]**2+3*x[0]-5*x[0]*x[2]-8*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-3)+x[2]+7*x[2]**2+18*x[1]-2*x[1]*x[2]-24*x[1]**2-3*x[0]+5*x[0]*x[2]+16*x[0]*x[1]-5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[1]*(3*x[1]-1*x[1]*x[2]-7*x[1]*x[2]**2-9*x[1]**2+x[1]**2*x[2]+8*x[1]**3+3*x[0]*x[1]-5*x[0]*x[1]*x[2]-8*x[0]*x[1]**2+5*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp020(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+4*x[2]+3*x[2]**2-1*x[1]+8*x[1]*x[2]+8*x[1]**2-8*x[0]-9*x[0]*x[2]+4*x[0]*x[1]-5*x[0]**2
-    u[1]=8+4*x[2]-1*x[2]**2+7*x[1]+2*x[1]*x[2]-6*x[1]**2+2*x[0]-9*x[0]*x[2]+2*x[0]*x[1]+6*x[0]**2
-    u[2]=(-2)-2*x[2]+4*x[2]**2-1*x[1]+4*x[1]*x[2]+x[1]**2-5*x[0]-2*x[0]*x[2]+4*x[0]*x[1]+5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=(-4)-8*x[2]-9*x[2]**2+x[1]-16*x[1]*x[2]-8*x[1]**2+8*x[0]+18*x[0]*x[2]-4*x[0]*x[1]+5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*(4*x[2]+4*x[2]**2+3*x[2]**3-1*x[1]*x[2]+8*x[1]*x[2]**2+8*x[1]**2*x[2]-8*x[0]*x[2]-9*x[0]*x[2]**2+4*x[0]*x[1]*x[2]-5*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp021(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]-1*x[2]**2-8*x[1]+4*x[1]*x[2]-3*x[1]**2+2*x[0]-7*x[0]*x[2]+5*x[0]*x[1]-6*x[0]**2
-    u[1]=(-3)-7*x[2]+5*x[2]**2-8*x[1]-2*x[1]*x[2]+3*x[1]**2+4*x[0]-9*x[0]*x[2]-9*x[0]*x[1]-2*x[0]**2
-    u[2]=(-2)+6*x[2]-3*x[2]**2+x[1]+5*x[1]*x[2]-2*x[1]**2+6*x[0]+6*x[0]*x[2]-7*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=3+14*x[2]-15*x[2]**2+8*x[1]+4*x[1]*x[2]-3*x[1]**2-4*x[0]+18*x[0]*x[2]+9*x[0]*x[1]+2*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-3)*x[2]-7*x[2]**2+5*x[2]**3-8*x[1]*x[2]-2*x[1]*x[2]**2+3*x[1]**2*x[2]+4*x[0]*x[2]-9*x[0]*x[2]**2-9*x[0]*x[1]*x[2]-2*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp022(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-1*x[2]+7*x[2]**2-2*x[1]-3*x[1]*x[2]+8*x[1]**2-8*x[0]+6*x[0]*x[2]+5*x[0]*x[1]+5*x[0]**2
-    u[1]=5+2*x[2]+7*x[2]**2+2*x[1]+7*x[1]*x[2]-3*x[1]**2-3*x[0]-9*x[0]*x[2]-9*x[0]*x[1]-1*x[0]**2
-    u[2]=(-5)-2*x[2]+4*x[2]**2-1*x[1]-1*x[1]*x[2]-9*x[1]**2-1*x[0]-4*x[0]*x[2]-1*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[0,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[0]=5+4*x[2]-12*x[2]**2+x[1]+2*x[1]*x[2]+9*x[1]**2+x[0]+8*x[0]*x[2]+x[0]*x[1]-3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[0]=n[2]*((-5)*x[2]-2*x[2]**2+4*x[2]**3-1*x[1]*x[2]-1*x[1]*x[2]**2-9*x[1]**2*x[2]-1*x[0]*x[2]-4*x[0]*x[2]**2-1*x[0]*x[1]*x[2]+3*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp100(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[2]-7*x[2]**2-8*x[1]+8*x[1]*x[2]+4*x[1]**2+3*x[0]+x[0]*x[2]-7*x[0]*x[1]+6*x[0]**2
-    u[1]=(-5)-1*x[2]+3*x[2]**2-4*x[1]+5*x[1]*x[2]-2*x[1]**2+x[0]+3*x[0]*x[2]+6*x[0]*x[1]-4*x[0]**2
-    u[2]=5-1*x[2]+6*x[2]**2+x[1]+8*x[1]*x[2]+5*x[1]**2-6*x[0]-4*x[0]*x[2]-6*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)-2*x[2]+7*x[2]**2+8*x[1]-8*x[1]*x[2]-4*x[1]**2-6*x[0]-2*x[0]*x[2]+14*x[0]*x[1]-18*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(6*x[0]+2*x[0]*x[2]-7*x[0]*x[2]**2-8*x[0]*x[1]+8*x[0]*x[1]*x[2]+4*x[0]*x[1]**2+3*x[0]**2+x[0]**2*x[2]-7*x[0]**2*x[1]+6*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-6)*x[0]-2*x[0]*x[2]+7*x[0]*x[2]**2+8*x[0]*x[1]-8*x[0]*x[1]*x[2]-4*x[0]*x[1]**2-3*x[0]**2-1*x[0]**2*x[2]+7*x[0]**2*x[1]-6*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp101(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)+7*x[2]-3*x[2]**2-3*x[1]+7*x[1]*x[2]-9*x[1]**2+2*x[0]+5*x[0]*x[2]-3*x[0]*x[1]-7*x[0]**2
-    u[1]=(-6)-7*x[2]-6*x[2]**2-2*x[1]+6*x[1]*x[2]-4*x[1]**2+8*x[0]-6*x[0]*x[2]+4*x[0]*x[1]-3*x[0]**2
-    u[2]=(-8)-3*x[2]-5*x[2]**2+3*x[1]+4*x[1]*x[2]-4*x[1]**2+2*x[0]-2*x[0]*x[2]-4*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=6+7*x[2]+6*x[2]**2+2*x[1]-6*x[1]*x[2]+4*x[1]**2-16*x[0]+12*x[0]*x[2]-8*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*((-6)*x[0]-7*x[0]*x[2]-6*x[0]*x[2]**2-2*x[0]*x[1]+6*x[0]*x[1]*x[2]-4*x[0]*x[1]**2+8*x[0]**2-6*x[0]**2*x[2]+4*x[0]**2*x[1]-3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*(6*x[0]+7*x[0]*x[2]+6*x[0]*x[2]**2+2*x[0]*x[1]-6*x[0]*x[1]*x[2]+4*x[0]*x[1]**2-8*x[0]**2+6*x[0]**2*x[2]-4*x[0]**2*x[1]+3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp102(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=6+2*x[2]-3*x[2]**2-7*x[1]-1*x[1]*x[2]-4*x[1]**2-6*x[0]-7*x[0]*x[2]-3*x[0]*x[1]+8*x[0]**2
-    u[1]=4-5*x[2]-5*x[2]**2+8*x[1]+2*x[1]*x[2]-7*x[1]**2-2*x[0]-2*x[0]*x[2]-9*x[0]*x[1]+7*x[0]**2
-    u[2]=7+2*x[2]-8*x[2]**2-5*x[1]-6*x[1]*x[2]-1*x[1]**2-4*x[0]+2*x[0]*x[2]-7*x[0]*x[1]-8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-7)-2*x[2]+8*x[2]**2+5*x[1]+6*x[1]*x[2]+x[1]**2+8*x[0]-4*x[0]*x[2]+14*x[0]*x[1]+24*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[0]*(7*x[0]+2*x[0]*x[2]-8*x[0]*x[2]**2-5*x[0]*x[1]-6*x[0]*x[1]*x[2]-1*x[0]*x[1]**2-4*x[0]**2+2*x[0]**2*x[2]-7*x[0]**2*x[1]-8*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[1]=n_contact[0]*((-7)*x[0]-2*x[0]*x[2]+8*x[0]*x[2]**2+5*x[0]*x[1]+6*x[0]*x[1]*x[2]+x[0]*x[1]**2+4*x[0]**2-2*x[0]**2*x[2]+7*x[0]**2*x[1]+8*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp110(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-7*x[2]+4*x[2]**2-1*x[1]-7*x[1]*x[2]+x[1]**2-9*x[0]-8*x[0]*x[2]-9*x[0]*x[1]+4*x[0]**2
-    u[1]=1-6*x[2]-5*x[2]**2-9*x[1]+4*x[1]*x[2]+7*x[1]**2+8*x[0]-3*x[0]*x[2]-5*x[0]*x[1]+3*x[0]**2
-    u[2]=8+4*x[2]-8*x[2]**2-6*x[1]-8*x[1]*x[2]-3*x[1]**2+6*x[0]-3*x[0]*x[2]+7*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9+7*x[2]-4*x[2]**2+2*x[1]+14*x[1]*x[2]-3*x[1]**2+9*x[0]+8*x[0]*x[2]+18*x[0]*x[1]-4*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*((-9)*x[1]-7*x[1]*x[2]+4*x[1]*x[2]**2-1*x[1]**2-7*x[1]**2*x[2]+x[1]**3-9*x[0]*x[1]-8*x[0]*x[1]*x[2]-9*x[0]*x[1]**2+4*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp111(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)+5*x[2]-4*x[2]**2+5*x[1]-9*x[1]*x[2]+3*x[1]**2+5*x[0]-8*x[0]*x[2]-5*x[0]*x[1]-1*x[0]**2
-    u[1]=6-5*x[2]-9*x[2]**2-2*x[1]+2*x[1]*x[2]-8*x[1]**2-2*x[0]+2*x[0]*x[2]-9*x[0]*x[1]+6*x[0]**2
-    u[2]=5-9*x[2]-2*x[2]**2-2*x[1]-7*x[1]*x[2]-2*x[1]**2-2*x[0]-9*x[0]*x[2]+x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-6)+5*x[2]+9*x[2]**2+4*x[1]-4*x[1]*x[2]+24*x[1]**2+2*x[0]-2*x[0]*x[2]+18*x[0]*x[1]-6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(6*x[1]-5*x[1]*x[2]-9*x[1]*x[2]**2-2*x[1]**2+2*x[1]**2*x[2]-8*x[1]**3-2*x[0]*x[1]+2*x[0]*x[1]*x[2]-9*x[0]*x[1]**2+6*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp112(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-3)-7*x[2]+x[2]**2+8*x[1]-7*x[1]*x[2]+6*x[1]**2-3*x[0]+x[0]*x[2]+2*x[0]*x[1]+6*x[0]**2
-    u[1]=(-1)-7*x[2]-4*x[2]**2-5*x[1]+3*x[1]*x[2]+2*x[1]**2-8*x[0]-6*x[0]*x[2]+8*x[0]*x[1]+7*x[0]**2
-    u[2]=1+7*x[2]-3*x[2]**2+3*x[1]-5*x[1]*x[2]-4*x[1]**2-4*x[0]+7*x[0]*x[2]+6*x[0]*x[1]+3*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=(-1)-7*x[2]+3*x[2]**2-6*x[1]+10*x[1]*x[2]+12*x[1]**2+4*x[0]-7*x[0]*x[2]-12*x[0]*x[1]-3*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[1]*(x[1]+7*x[1]*x[2]-3*x[1]*x[2]**2+3*x[1]**2-5*x[1]**2*x[2]-4*x[1]**3-4*x[0]*x[1]+7*x[0]*x[1]*x[2]+6*x[0]*x[1]**2+3*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp120(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-4)-8*x[2]-3*x[2]**2+3*x[1]-8*x[1]*x[2]-4*x[1]**2+2*x[0]+4*x[0]*x[2]+7*x[0]*x[1]+6*x[0]**2
-    u[1]=2-9*x[2]-9*x[2]**2+7*x[1]-5*x[1]*x[2]+x[1]**2+4*x[0]-1*x[0]*x[2]+5*x[0]*x[1]-9*x[0]**2
-    u[2]=(-3)+6*x[2]-7*x[2]**2+8*x[1]-4*x[1]*x[2]+8*x[1]**2-9*x[0]-5*x[0]*x[2]-2*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=4+16*x[2]+9*x[2]**2-3*x[1]+16*x[1]*x[2]+4*x[1]**2-2*x[0]-8*x[0]*x[2]-7*x[0]*x[1]-6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-4)*x[2]-8*x[2]**2-3*x[2]**3+3*x[1]*x[2]-8*x[1]*x[2]**2-4*x[1]**2*x[2]+2*x[0]*x[2]+4*x[0]*x[2]**2+7*x[0]*x[1]*x[2]+6*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp121(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-6*x[2]-3*x[2]**2-2*x[1]-8*x[1]*x[2]+4*x[1]**2-9*x[0]-7*x[0]*x[2]+6*x[0]*x[1]-3*x[0]**2
-    u[1]=(-9)+7*x[2]-6*x[2]**2+4*x[1]-2*x[1]*x[2]+5*x[1]**2+x[0]-1*x[0]*x[2]-7*x[0]*x[1]+x[0]**2
-    u[2]=6-3*x[2]+7*x[2]**2+2*x[1]-2*x[1]*x[2]+2*x[1]**2-3*x[0]+6*x[0]*x[2]+7*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=9-14*x[2]+18*x[2]**2-4*x[1]+4*x[1]*x[2]-5*x[1]**2-1*x[0]+2*x[0]*x[2]+7*x[0]*x[1]-1*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-9)*x[2]+7*x[2]**2-6*x[2]**3+4*x[1]*x[2]-2*x[1]*x[2]**2+5*x[1]**2*x[2]+x[0]*x[2]-1*x[0]*x[2]**2-7*x[0]*x[1]*x[2]+x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp122(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=2+2*x[2]+5*x[2]**2-8*x[1]+x[1]*x[2]+2*x[1]**2+5*x[0]+6*x[0]*x[2]+3*x[0]*x[1]+3*x[0]**2
-    u[1]=7-1*x[2]-5*x[2]**2+2*x[1]-6*x[1]*x[2]+x[1]**2+5*x[0]+2*x[0]*x[2]-5*x[0]*x[1]+6*x[0]**2
-    u[2]=(-8)-3*x[2]-3*x[2]**2-3*x[1]-6*x[1]*x[2]+7*x[1]**2+6*x[0]-8*x[0]*x[2]-8*x[0]*x[1]-6*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[1,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[1]=8+6*x[2]+9*x[2]**2+3*x[1]+12*x[1]*x[2]-7*x[1]**2-6*x[0]+16*x[0]*x[2]+8*x[0]*x[1]+6*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[1]=n[2]*((-8)*x[2]-3*x[2]**2-3*x[2]**3-3*x[1]*x[2]-6*x[1]*x[2]**2+7*x[1]**2*x[2]+6*x[0]*x[2]-8*x[0]*x[2]**2-8*x[0]*x[1]*x[2]-6*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp200(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-1)-4*x[2]-9*x[2]**2+3*x[1]-5*x[1]*x[2]-1*x[1]**2+8*x[0]+5*x[0]*x[2]+x[0]*x[1]+5*x[0]**2
-    u[1]=(-9)-2*x[2]+5*x[2]**2+2*x[1]-8*x[1]*x[2]+8*x[1]**2-5*x[0]-2*x[0]*x[2]-1*x[0]*x[1]-6*x[0]**2
-    u[2]=1-3*x[2]-1*x[2]**2+8*x[1]+2*x[1]*x[2]+6*x[1]**2+6*x[0]-5*x[0]*x[2]+2*x[0]*x[1]-2*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,0]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1+4*x[2]+9*x[2]**2-3*x[1]+5*x[1]*x[2]+x[1]**2-16*x[0]-10*x[0]*x[2]-2*x[0]*x[1]-15*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*((-1)*x[0]-4*x[0]*x[2]-9*x[0]*x[2]**2+3*x[0]*x[1]-5*x[0]*x[1]*x[2]-1*x[0]*x[1]**2+8*x[0]**2+5*x[0]**2*x[2]+x[0]**2*x[1]+5*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*(x[0]+4*x[0]*x[2]+9*x[0]*x[2]**2-3*x[0]*x[1]+5*x[0]*x[1]*x[2]+x[0]*x[1]**2-8*x[0]**2-5*x[0]**2*x[2]-1*x[0]**2*x[1]-5*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp201(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-5*x[2]-6*x[2]**2+6*x[1]+4*x[1]*x[2]+5*x[1]**2+6*x[0]-4*x[0]*x[2]+2*x[0]*x[1]+4*x[0]**2
-    u[1]=8-1*x[2]+4*x[2]**2-3*x[1]-1*x[1]*x[2]-6*x[1]**2+6*x[0]-5*x[0]*x[2]-5*x[0]*x[1]+3*x[0]**2
-    u[2]=(-8)+5*x[2]-2*x[2]**2+7*x[1]-4*x[1]*x[2]-7*x[1]**2+x[0]-3*x[0]*x[2]-8*x[0]*x[1]+4*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,1]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-8)+x[2]-4*x[2]**2+3*x[1]+x[1]*x[2]+6*x[1]**2-12*x[0]+10*x[0]*x[2]+10*x[0]*x[1]-9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(8*x[0]-1*x[0]*x[2]+4*x[0]*x[2]**2-3*x[0]*x[1]-1*x[0]*x[1]*x[2]-6*x[0]*x[1]**2+6*x[0]**2-5*x[0]**2*x[2]-5*x[0]**2*x[1]+3*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-8)*x[0]+x[0]*x[2]-4*x[0]*x[2]**2+3*x[0]*x[1]+x[0]*x[1]*x[2]+6*x[0]*x[1]**2-6*x[0]**2+5*x[0]**2*x[2]+5*x[0]**2*x[1]-3*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp202(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-2)+2*x[2]-8*x[2]**2+x[1]+7*x[1]*x[2]+4*x[1]**2+8*x[0]-2*x[0]*x[2]+8*x[0]*x[1]+4*x[0]**2
-    u[1]=(-4)-4*x[2]-7*x[2]**2+6*x[1]+3*x[1]*x[2]+5*x[1]**2-9*x[0]+7*x[0]*x[2]+x[0]*x[1]-9*x[0]**2
-    u[2]=4+4*x[2]+8*x[2]**2-8*x[1]+2*x[1]*x[2]-9*x[1]**2-7*x[0]+3*x[0]*x[2]+x[0]*x[1]+6*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,0,2]=x[0]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)-4*x[2]-8*x[2]**2+8*x[1]-2*x[1]*x[2]+9*x[1]**2+14*x[0]-6*x[0]*x[2]-2*x[0]*x[1]-18*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[0]*(4*x[0]+4*x[0]*x[2]+8*x[0]*x[2]**2-8*x[0]*x[1]+2*x[0]*x[1]*x[2]-9*x[0]*x[1]**2-7*x[0]**2+3*x[0]**2*x[2]+x[0]**2*x[1]+6*x[0]**3)
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    y_contact_test[2]=n_contact[0]*((-4)*x[0]-4*x[0]*x[2]-8*x[0]*x[2]**2+8*x[0]*x[1]-2*x[0]*x[1]*x[2]+9*x[0]*x[1]**2+7*x[0]**2-3*x[0]**2*x[2]-1*x[0]**2*x[1]-6*x[0]**3)
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp210(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-3*x[2]-7*x[2]**2-8*x[1]+5*x[1]*x[2]+3*x[1]**2-9*x[0]-9*x[0]*x[2]-4*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)-6*x[2]-7*x[2]**2+5*x[1]+6*x[1]*x[2]-1*x[1]**2-6*x[0]+8*x[0]*x[2]-8*x[0]*x[1]-1*x[0]**2
-    u[2]=(-2)+4*x[2]-8*x[2]**2-8*x[1]-8*x[1]*x[2]-3*x[1]**2+7*x[0]-6*x[0]*x[2]+6*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,0]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=7+3*x[2]+7*x[2]**2+16*x[1]-10*x[1]*x[2]-9*x[1]**2+9*x[0]+9*x[0]*x[2]+8*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-7)*x[1]-3*x[1]*x[2]-7*x[1]*x[2]**2-8*x[1]**2+5*x[1]**2*x[2]+3*x[1]**3-9*x[0]*x[1]-9*x[0]*x[1]*x[2]-4*x[0]*x[1]**2-9*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp211(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=3+4*x[2]+8*x[2]**2+5*x[1]-6*x[1]*x[2]+3*x[1]**2-4*x[0]-5*x[0]*x[2]+6*x[0]*x[1]+8*x[0]**2
-    u[1]=7+7*x[2]+4*x[2]**2-9*x[1]+5*x[1]*x[2]-1*x[1]**2+7*x[0]+8*x[0]*x[2]+x[0]*x[1]+7*x[0]**2
-    u[2]=(-7)-1*x[2]-7*x[2]**2+7*x[1]+5*x[1]*x[2]+2*x[1]**2+3*x[0]-3*x[0]*x[2]+8*x[0]*x[1]-9*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,1]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-7)-7*x[2]-4*x[2]**2+18*x[1]-10*x[1]*x[2]+3*x[1]**2-7*x[0]-8*x[0]*x[2]-2*x[0]*x[1]-7*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*(7*x[1]+7*x[1]*x[2]+4*x[1]*x[2]**2-9*x[1]**2+5*x[1]**2*x[2]-1*x[1]**3+7*x[0]*x[1]+8*x[0]*x[1]*x[2]+x[0]*x[1]**2+7*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp212(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-5)-3*x[2]+4*x[2]**2+4*x[1]+6*x[1]*x[2]-6*x[1]**2+x[0]-9*x[0]*x[2]-9*x[0]*x[1]-6*x[0]**2
-    u[1]=(-7)-4*x[2]-4*x[2]**2-3*x[1]+2*x[1]*x[2]-1*x[1]**2+x[0]-8*x[0]*x[2]+6*x[0]*x[1]+2*x[0]**2
-    u[2]=(-3)-8*x[2]+6*x[2]**2+5*x[1]-6*x[1]*x[2]-3*x[1]**2+4*x[0]+2*x[0]*x[2]+5*x[0]*x[1]+8*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,1,2]=x[1]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=3+8*x[2]-6*x[2]**2-10*x[1]+12*x[1]*x[2]+9*x[1]**2-4*x[0]-2*x[0]*x[2]-10*x[0]*x[1]-8*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[1]*((-3)*x[1]-8*x[1]*x[2]+6*x[1]*x[2]**2+5*x[1]**2-6*x[1]**2*x[2]-3*x[1]**3+4*x[0]*x[1]+2*x[0]*x[1]*x[2]+5*x[0]*x[1]**2+8*x[0]**2*x[1])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp220(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=4+6*x[2]+8*x[2]**2-6*x[1]+8*x[1]*x[2]-2*x[1]**2+x[0]-8*x[0]*x[2]+8*x[0]*x[1]-5*x[0]**2
-    u[1]=8+6*x[2]-5*x[2]**2-3*x[1]-1*x[1]*x[2]+4*x[1]**2+2*x[0]+8*x[0]*x[2]+2*x[0]*x[1]-8*x[0]**2
-    u[2]=1-6*x[2]+5*x[2]**2+x[1]-1*x[1]*x[2]+2*x[1]**2-7*x[0]+2*x[0]*x[2]-3*x[0]*x[1]+7*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,0]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-4)-12*x[2]-24*x[2]**2+6*x[1]-16*x[1]*x[2]+2*x[1]**2-1*x[0]+16*x[0]*x[2]-8*x[0]*x[1]+5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(4*x[2]+6*x[2]**2+8*x[2]**3-6*x[1]*x[2]+8*x[1]*x[2]**2-2*x[1]**2*x[2]+x[0]*x[2]-8*x[0]*x[2]**2+8*x[0]*x[1]*x[2]-5*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp221(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-7)-1*x[2]+3*x[2]**2+3*x[1]-1*x[1]*x[2]+6*x[1]**2+7*x[0]-6*x[0]*x[2]+2*x[0]*x[1]-9*x[0]**2
-    u[1]=(-1)-3*x[2]-8*x[2]**2-2*x[1]-9*x[1]*x[2]-9*x[1]**2+7*x[0]-2*x[0]*x[2]+8*x[0]*x[1]-9*x[0]**2
-    u[2]=(-4)-2*x[2]+6*x[2]**2+7*x[1]-1*x[1]*x[2]-3*x[1]**2-5*x[0]+7*x[0]*x[2]-1*x[0]*x[1]+x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,1]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=1+6*x[2]+24*x[2]**2+2*x[1]+18*x[1]*x[2]+9*x[1]**2-7*x[0]+4*x[0]*x[2]-8*x[0]*x[1]+9*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*((-1)*x[2]-3*x[2]**2-8*x[2]**3-2*x[1]*x[2]-9*x[1]*x[2]**2-9*x[1]**2*x[2]+7*x[0]*x[2]-2*x[0]*x[2]**2+8*x[0]*x[1]*x[2]-9*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_B_Vario_typeContact_comp222(self):
-    x=self.domain.getX()
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(-9)-2*x[2]+6*x[2]**2+3*x[1]-1*x[1]*x[2]-5*x[1]**2-9*x[0]-7*x[0]*x[2]+8*x[0]*x[1]-4*x[0]**2
-    u[1]=1-2*x[2]-2*x[2]**2+3*x[1]-8*x[1]*x[2]-3*x[1]**2-1*x[0]-5*x[0]*x[2]+3*x[0]*x[1]-2*x[0]**2
-    u[2]=5+3*x[2]+5*x[2]**2-9*x[1]-8*x[1]*x[2]+5*x[1]**2-8*x[0]+8*x[0]*x[2]-4*x[0]*x[1]-5*x[0]**2
-    B_test=Data(0.,(3,3,3),Function(self.domain))
-    B_test[2,2,2]=x[2]
-    Y_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    Y_test[2]=(-5)-6*x[2]-15*x[2]**2+9*x[1]+16*x[1]*x[2]-5*x[1]**2+8*x[0]-16*x[0]*x[2]+4*x[0]*x[1]+5*x[0]**2
-    n=self.setNormal(FunctionOnBoundary(self.domain))
-    y_test=Data(0.,(3,),FunctionOnBoundary(self.domain))
-    y_test[2]=n[2]*(5*x[2]+3*x[2]**2+5*x[2]**3-9*x[1]*x[2]-8*x[1]*x[2]**2+5*x[1]**2*x[2]-8*x[0]*x[2]+8*x[0]*x[2]**2-4*x[0]*x[1]*x[2]-5*x[0]**2*x[2])
-    n_contact=FunctionOnContactZero(self.domain).getNormal()
-    y_contact_test=Data(0.,(3,),FunctionOnContactZero(self.domain))
-    pde=LinearPDE(self.domain)
-    pde.setValue(B=B_test, Y=Y_test, y=y_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(5-6*x[2]+6*x[1]-1*x[0])*jump
-    u[1]=((-5)+8*x[2]-3*x[1]-4*x[0])*jump
-    u[2]=((-6)+3*x[2]-1*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=5*x[0]-6*x[0]*x[2]+6*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9)-8*x[2]-8*x[1]+2*x[0])*jump
-    u[1]=((-6)-1*x[2]+5*x[1]+7*x[0])*jump
-    u[2]=(7+4*x[2]-1*x[1]-2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-6)*x[0]-1*x[0]*x[2]+5*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)+2*x[2]+7*x[1]+5*x[0])*jump
-    u[1]=((-7)+7*x[2]+7*x[1]+4*x[0])*jump
-    u[2]=(1-5*x[2]+7*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=x[0]-5*x[0]*x[2]+7*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6)-7*x[2]+4*x[1]-4*x[0])*jump
-    u[1]=(7+3*x[2]+2*x[1]-7*x[0])*jump
-    u[2]=(3+8*x[2]+8*x[1]+6*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-6)*x[0]-7*x[0]*x[2]+4*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5)-5*x[2]+4*x[1]-3*x[0])*jump
-    u[1]=(5-5*x[2]-6*x[1]-7*x[0])*jump
-    u[2]=((-1)+2*x[2]-2*x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=5*x[0]-5*x[0]*x[2]-6*x[0]*x[1]-7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+2*x[2]+3*x[1]+3*x[0])*jump
-    u[1]=(5-9*x[2]+x[1]+2*x[0])*jump
-    u[2]=((-2)-4*x[2]-8*x[1]+7*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-2)*x[0]-4*x[0]*x[2]-8*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(5+8*x[2]-4*x[1]-6*x[0])*jump
-    u[1]=((-6)+5*x[2]-7*x[1]-9*x[0])*jump
-    u[2]=((-4)+6*x[2]-1*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=5*x[0]+8*x[0]*x[2]-4*x[0]*x[1]-6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9)-3*x[2]+8*x[1]+5*x[0])*jump
-    u[1]=((-7)+5*x[2]-8*x[1]+3*x[0])*jump
-    u[2]=(6+6*x[2]+2*x[1]-5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-7)*x[0]+5*x[0]*x[2]-8*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOFull_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(4-5*x[2]+x[1]+5*x[0])*jump
-    u[1]=((-2)+6*x[2]-8*x[1]-8*x[0])*jump
-    u[2]=((-9)+4*x[2]+7*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(3,3),FunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-9)*x[0]+4*x[0]*x[2]+7*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact=d_contact_test, y_contact=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu1_d_contact_Const_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=(4+8*x[2]-9*x[2]**2+4*x[1]-1*x[1]*x[2]-3*x[1]**2-9*x[0]-9*x[0]*x[2]-7*x[0]*x[1]+4*x[0]**2)*jump
-    d_contact_test=Data(6,(),ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=24+48*x[2]-54*x[2]**2+24*x[1]-6*x[1]*x[2]-18*x[1]**2-54*x[0]-54*x[0]*x[2]-42*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu1_d_contact_Vario_typeContact(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=((-1)+4*x[2]-8*x[1]+8*x[0])*jump
-    d_contact_test=interpolate(x[0],ReducedFunctionOnContactZero(self.domain))
-    y_contact_test=(-1)*x[0]+4*x[0]*x[2]-8*x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-1)-7*x[2]+4*x[2]**2+5*x[1]+5*x[1]*x[2]-4*x[1]**2+x[0]+3*x[0]*x[2]+3*x[0]*x[1]-4*x[0]**2)*jump
-    u[1]=((-1)-8*x[2]+8*x[2]**2-2*x[1]+7*x[1]*x[2]+7*x[1]**2-4*x[0]-9*x[0]*x[2]-6*x[0]*x[1]+6*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=7
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-7)-49*x[2]+28*x[2]**2+35*x[1]+35*x[1]*x[2]-28*x[1]**2+7*x[0]+21*x[0]*x[2]+21*x[0]*x[1]-28*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(6-3*x[2]+7*x[2]**2-7*x[1]-7*x[1]*x[2]+5*x[1]**2-3*x[0]+3*x[0]*x[2]+4*x[0]*x[1]+7*x[0]**2)*jump
-    u[1]=((-5)+6*x[2]-8*x[2]**2+4*x[1]+x[1]*x[2]-4*x[1]**2-5*x[0]-4*x[0]*x[2]+8*x[0]*x[1]+3*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=6
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-30)+36*x[2]-48*x[2]**2+24*x[1]+6*x[1]*x[2]-24*x[1]**2-30*x[0]-24*x[0]*x[2]+48*x[0]*x[1]+18*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(2+5*x[2]-4*x[2]**2-5*x[1]+3*x[1]*x[2]-1*x[1]**2+2*x[0]-5*x[0]*x[2]-5*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=((-6)-1*x[2]+3*x[2]**2-4*x[1]+2*x[1]*x[2]+7*x[1]**2+8*x[0]+6*x[0]*x[2]+7*x[0]*x[1]+4*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=4
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=8+20*x[2]-16*x[2]**2-20*x[1]+12*x[1]*x[2]-4*x[1]**2+8*x[0]-20*x[0]*x[2]-20*x[0]*x[1]+24*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-4)+4*x[2]-8*x[2]**2-3*x[1]-4*x[1]*x[2]+5*x[1]**2+x[0]-6*x[0]*x[2]+x[0]*x[1]+3*x[0]**2)*jump
-    u[1]=((-9)+8*x[2]+x[2]**2-8*x[1]-3*x[1]*x[2]-9*x[1]**2-9*x[0]+4*x[0]*x[2]+5*x[0]*x[1]-9*x[0]**2)*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=5
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-45)+40*x[2]+5*x[2]**2-40*x[1]-15*x[1]*x[2]-45*x[1]**2-45*x[0]+20*x[0]*x[2]+25*x[0]*x[1]-45*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(5-1*x[2]-7*x[1]+6*x[0])*jump
-    u[1]=(6-2*x[2]-6*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=5*x[0]-1*x[0]*x[2]-7*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-3)+8*x[2]+2*x[1]+5*x[0])*jump
-    u[1]=((-9)-3*x[2]-5*x[1]-1*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-9)*x[0]-3*x[0]*x[2]-5*x[0]*x[1]-1*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=(3-9*x[2]+3*x[1]+3*x[0])*jump
-    u[1]=(5+2*x[2]+x[1]-8*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=3*x[0]-9*x[0]*x[2]+3*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu2_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(2,),ContinuousFunction(self.domain))
-    u[0]=((-5)+3*x[2]-3*x[1]+5*x[0])*jump
-    u[1]=((-7)+5*x[2]-4*x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(2,2),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(2,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-7)*x[0]+5*x[0]*x[2]-4*x[0]*x[1]-9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(3-3*x[2]-8*x[2]**2+x[1]+5*x[1]*x[2]-2*x[1]**2-8*x[0]+8*x[0]*x[2]+3*x[0]*x[1]+x[0]**2)*jump
-    u[1]=(2+7*x[2]-3*x[2]**2-1*x[1]-3*x[1]*x[2]+x[1]**2+x[0]-7*x[0]*x[2]+3*x[0]*x[1]+x[0]**2)*jump
-    u[2]=((-3)-3*x[2]+6*x[2]**2-2*x[1]+8*x[1]*x[2]-4*x[1]**2+4*x[0]-3*x[0]*x[2]-5*x[0]*x[1]+2*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=9-9*x[2]-24*x[2]**2+3*x[1]+15*x[1]*x[2]-6*x[1]**2-24*x[0]+24*x[0]*x[2]+9*x[0]*x[1]+3*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(8-8*x[2]+4*x[2]**2-4*x[1]-6*x[1]*x[2]+2*x[1]**2+6*x[0]-1*x[0]*x[2]+4*x[0]*x[1]+6*x[0]**2)*jump
-    u[1]=(6-3*x[2]-7*x[2]**2+6*x[1]+6*x[1]*x[2]-1*x[1]**2+4*x[0]-4*x[0]*x[2]-5*x[0]*x[1]-9*x[0]**2)*jump
-    u[2]=((-8)+x[2]+x[2]**2-3*x[1]-6*x[1]*x[2]+7*x[1]**2+7*x[0]-8*x[0]*x[2]-6*x[0]*x[1]-4*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=18-9*x[2]-21*x[2]**2+18*x[1]+18*x[1]*x[2]-3*x[1]**2+12*x[0]-12*x[0]*x[2]-15*x[0]*x[1]-27*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)-3*x[2]+8*x[2]**2+3*x[1]+8*x[1]*x[2]+7*x[1]**2-8*x[0]+2*x[0]*x[2]+7*x[0]*x[1]+7*x[0]**2)*jump
-    u[1]=((-6)-1*x[2]+4*x[2]**2-6*x[1]+2*x[1]*x[2]-3*x[1]**2-3*x[0]+x[0]*x[2]-8*x[0]*x[1]-3*x[0]**2)*jump
-    u[2]=((-2)-7*x[2]+3*x[2]**2+4*x[1]-7*x[1]*x[2]-3*x[1]**2+4*x[0]+x[0]*x[2]-3*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-10)-35*x[2]+15*x[2]**2+20*x[1]-35*x[1]*x[2]-15*x[1]**2+20*x[0]+5*x[0]*x[2]-15*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-6)+2*x[2]+2*x[2]**2-7*x[1]-3*x[1]*x[2]-8*x[1]**2+5*x[0]+2*x[0]*x[2]+5*x[0]*x[1]+3*x[0]**2)*jump
-    u[1]=((-9)-6*x[2]-3*x[2]**2-7*x[1]+2*x[1]*x[2]-5*x[1]**2-3*x[0]+7*x[0]*x[2]+7*x[0]*x[1]+x[0]**2)*jump
-    u[2]=(5-2*x[2]+x[2]**2+7*x[1]-9*x[1]*x[2]-8*x[1]**2+8*x[0]-7*x[0]*x[2]-2*x[0]*x[1]-4*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=3
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-18)+6*x[2]+6*x[2]**2-21*x[1]-9*x[1]*x[2]-24*x[1]**2+15*x[0]+6*x[0]*x[2]+15*x[0]*x[1]+9*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(2-9*x[2]+5*x[2]**2-9*x[1]-5*x[1]*x[2]-5*x[1]**2+2*x[0]-1*x[0]*x[2]-6*x[0]*x[1]-4*x[0]**2)*jump
-    u[1]=(8-4*x[2]+x[2]**2-2*x[1]-3*x[1]*x[2]+3*x[1]**2-2*x[0]-7*x[0]*x[2]-4*x[0]*x[1]-6*x[0]**2)*jump
-    u[2]=(4+7*x[2]+2*x[2]**2-2*x[1]+3*x[1]*x[2]-2*x[1]**2-7*x[0]+x[0]*x[2]-4*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=5
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=40-20*x[2]+5*x[2]**2-10*x[1]-15*x[1]*x[2]+15*x[1]**2-10*x[0]-35*x[0]*x[2]-20*x[0]*x[1]-30*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5)-5*x[2]+3*x[2]**2-8*x[1]+6*x[1]*x[2]-3*x[1]**2+3*x[0]+4*x[0]*x[2]+6*x[0]*x[1]-7*x[0]**2)*jump
-    u[1]=(7+8*x[2]-5*x[2]**2+7*x[1]-5*x[1]*x[2]+2*x[1]**2-6*x[0]-4*x[0]*x[2]-3*x[0]*x[1]-9*x[0]**2)*jump
-    u[2]=(1-2*x[2]-2*x[2]**2+7*x[1]-8*x[1]*x[2]+x[1]**2+5*x[0]-7*x[0]*x[2]+5*x[0]*x[1]-5*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=7-14*x[2]-14*x[2]**2+49*x[1]-56*x[1]*x[2]+7*x[1]**2+35*x[0]-49*x[0]*x[2]+35*x[0]*x[1]-35*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-9)-4*x[2]-4*x[2]**2+8*x[1]+7*x[1]*x[2]+6*x[1]**2+2*x[0]+2*x[0]*x[2]+x[0]*x[1]+8*x[0]**2)*jump
-    u[1]=(7-2*x[2]+8*x[2]**2+3*x[1]-9*x[1]*x[2]-5*x[1]**2+5*x[0]-2*x[0]*x[2]-9*x[0]*x[1]-9*x[0]**2)*jump
-    u[2]=((-1)+2*x[2]-5*x[2]**2-2*x[1]+6*x[1]*x[2]-7*x[1]**2-1*x[0]+7*x[0]*x[2]-5*x[0]*x[1]-1*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=1
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-9)-4*x[2]-4*x[2]**2+8*x[1]+7*x[1]*x[2]+6*x[1]**2+2*x[0]+2*x[0]*x[2]+x[0]*x[1]+8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(7+3*x[2]+5*x[2]**2-1*x[1]+4*x[1]*x[2]-2*x[1]**2-1*x[0]+2*x[0]*x[2]+x[0]*x[1]+4*x[0]**2)*jump
-    u[1]=((-8)-3*x[2]+7*x[2]**2+5*x[1]-6*x[1]*x[2]-2*x[1]**2-5*x[0]-5*x[0]*x[2]-3*x[0]*x[1]+6*x[0]**2)*jump
-    u[2]=(3+4*x[2]+6*x[2]**2-9*x[1]+8*x[1]*x[2]-4*x[1]**2+3*x[0]-2*x[0]*x[2]-3*x[0]*x[1]+x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=7
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-56)-21*x[2]+49*x[2]**2+35*x[1]-42*x[1]*x[2]-14*x[1]**2-35*x[0]-35*x[0]*x[2]-21*x[0]*x[1]+42*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Const_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(8-1*x[2]+3*x[2]**2-8*x[1]+2*x[1]*x[2]-1*x[1]**2-5*x[0]+8*x[0]*x[2]+7*x[0]*x[1]-7*x[0]**2)*jump
-    u[1]=(7+6*x[2]+4*x[2]**2+3*x[1]+4*x[1]*x[2]-7*x[1]**2+4*x[0]-2*x[0]*x[2]+3*x[0]*x[1]+5*x[0]**2)*jump
-    u[2]=(2-7*x[2]-6*x[2]**2-6*x[1]+8*x[1]*x[2]+6*x[1]**2-9*x[0]-2*x[0]*x[2]+3*x[0]*x[1]-1*x[0]**2)*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=8
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=16-56*x[2]-48*x[2]**2-48*x[1]+64*x[1]*x[2]+48*x[1]**2-72*x[0]-16*x[0]*x[2]+24*x[0]*x[1]-8*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp00(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-5)-4*x[2]+3*x[1]+x[0])*jump
-    u[1]=((-9)+6*x[2]+7*x[1]+3*x[0])*jump
-    u[2]=((-9)+6*x[2]+3*x[1]-3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-5)*x[0]-4*x[0]*x[2]+3*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp01(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)+3*x[2]+2*x[1]-3*x[0])*jump
-    u[1]=((-4)+5*x[2]+5*x[1]+x[0])*jump
-    u[2]=((-5)+4*x[2]+5*x[1]-2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=(-4)*x[0]+5*x[0]*x[2]+5*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp02(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-2)+2*x[2]+5*x[1]-2*x[0])*jump
-    u[1]=(1+2*x[2]-9*x[1]-2*x[0])*jump
-    u[2]=(3+4*x[2]-4*x[1]+x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[0,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[0]=3*x[0]+4*x[0]*x[2]-4*x[0]*x[1]+x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp10(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)+2*x[2]-2*x[1]+2*x[0])*jump
-    u[1]=(8-6*x[2]-2*x[1]+7*x[0])*jump
-    u[2]=((-7)-4*x[2]+6*x[1]+2*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-1)*x[0]+2*x[0]*x[2]-2*x[0]*x[1]+2*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp11(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=(8-2*x[2]+8*x[1]+3*x[0])*jump
-    u[1]=((-9)+2*x[2]+5*x[1]+7*x[0])*jump
-    u[2]=((-1)+6*x[2]+x[1]-9*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-9)*x[0]+2*x[0]*x[2]+5*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp12(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)+2*x[2]-5*x[1]-4*x[0])*jump
-    u[1]=((-3)-7*x[2]-6*x[1]-8*x[0])*jump
-    u[2]=((-8)+2*x[2]+5*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[1,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[1]=(-8)*x[0]+2*x[0]*x[2]+5*x[0]*x[1]+5*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp20(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-7)+5*x[2]+8*x[1]+7*x[0])*jump
-    u[1]=(3-6*x[2]+x[1]+7*x[0])*jump
-    u[2]=((-1)+8*x[2]-5*x[1]+3*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,0]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=(-7)*x[0]+5*x[0]*x[2]+8*x[0]*x[1]+7*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp21(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-3)-7*x[2]+8*x[1]-1*x[0])*jump
-    u[1]=(2+8*x[2]-8*x[1]-4*x[0])*jump
-    u[2]=((-5)+x[2]-4*x[1]+5*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,1]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=2*x[0]+8*x[0]*x[2]-8*x[0]*x[1]-4*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-  #==================================================
-  def test_assemblage_3D_solO2_coeffOReduced_NEqu3_d_contact_Vario_typeContact_comp22(self):
-    x=self.domain.getX()
-    jump=Data(0.,(),ContinuousFunction(self.domain))
-    jump.setTaggedValue(2,1.)
-    u=Data(0.,(3,),ContinuousFunction(self.domain))
-    u[0]=((-1)-6*x[2]-4*x[1]+5*x[0])*jump
-    u[1]=((-5)+4*x[2]-4*x[1]-6*x[0])*jump
-    u[2]=(7-3*x[2]+8*x[1]+6*x[0])*jump
-    d_contact_test=Data(0.,(3,3),ReducedFunctionOnContactZero(self.domain))
-    d_contact_test[2,2]=x[0]
-    y_contact_test=Data(0.,(3,),ContinuousFunction(self.domain))
-    y_contact_test[2]=7*x[0]-3*x[0]*x[2]+8*x[0]*x[1]+6*x[0]**2
-    pde=LinearPDE(self.domain)
-    pde.setValue(d_contact_reduced=d_contact_test, y_contact_reduced=y_contact_test)
-    r=pde.getResidual(u)
-    rhs=pde.getRightHandSide()
-    self.assertTrue(Lsup(rhs)>0,"right hand side is zero")
-    self.assertTrue(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big")
-
-
-
diff --git a/escriptcore/test/python/test_assemblage_3Do2.py b/escriptcore/test/python/test_assemblage_3Do2.py
index b640e18..3106187 100644
--- a/escriptcore/test/python/test_assemblage_3Do2.py
+++ b/escriptcore/test/python/test_assemblage_3Do2.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_condEval.py b/escriptcore/test/python/test_condEval.py
index 352ef34..631c96b 100644
--- a/escriptcore/test/python/test_condEval.py
+++ b/escriptcore/test/python/test_condEval.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2010-2016 by The University of Queensland
+# Copyright (c) 2010-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2010-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2010-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_linearPDEs.py b/escriptcore/test/python/test_linearPDEs.py
index e9ee508..b2b7c96 100644
--- a/escriptcore/test/python/test_linearPDEs.py
+++ b/escriptcore/test/python/test_linearPDEs.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_modulefns.py b/escriptcore/test/python/test_modulefns.py
index eb686a5..ed9e020 100644
--- a/escriptcore/test/python/test_modulefns.py
+++ b/escriptcore/test/python/test_modulefns.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2009-2016 by The University of Queensland
+# Copyright (c) 2009-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2009-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2009-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_nonLinearPDE.py b/escriptcore/test/python/test_nonLinearPDE.py
index 0df291f..9cccede 100644
--- a/escriptcore/test/python/test_nonLinearPDE.py
+++ b/escriptcore/test/python/test_nonLinearPDE.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_objects.py b/escriptcore/test/python/test_objects.py
index 0ea5c99..01a7ef6 100644
--- a/escriptcore/test/python/test_objects.py
+++ b/escriptcore/test/python/test_objects.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_pdetools.py b/escriptcore/test/python/test_pdetools.py
index 1b3a939..8ddd80a 100644
--- a/escriptcore/test/python/test_pdetools.py
+++ b/escriptcore/test/python/test_pdetools.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_shared.py b/escriptcore/test/python/test_shared.py
index 9ecb312..2c04d18 100644
--- a/escriptcore/test/python/test_shared.py
+++ b/escriptcore/test/python/test_shared.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_simplesolve.py b/escriptcore/test/python/test_simplesolve.py
index 1b7bba2..f97faf0 100644
--- a/escriptcore/test/python/test_simplesolve.py
+++ b/escriptcore/test/python/test_simplesolve.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_splitworld.py b/escriptcore/test/python/test_splitworld.py
index c68317c..01dcdc8 100644
--- a/escriptcore/test/python/test_splitworld.py
+++ b/escriptcore/test/python/test_splitworld.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c)2015-2016 by The University of Queensland
+__copyright__="""Copyright (c)2015-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_symfuncs.py b/escriptcore/test/python/test_symfuncs.py
index a8cac5a..42a3931 100644
--- a/escriptcore/test/python/test_symfuncs.py
+++ b/escriptcore/test/python/test_symfuncs.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util.py b/escriptcore/test/python/test_util.py
index b058894..f080e5a 100644
--- a/escriptcore/test/python/test_util.py
+++ b/escriptcore/test/python/test_util.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -39,7 +39,6 @@ to run the use:
    suite.addTest(unittest.makeSuite(Test_utilOnBruce))
    unittest.TextTestRunner(verbosity=2).run(suite)
 
-For function spaces which support tagging there is the extended test case Test_util_with_tagged_data available.
 This test assumes that samples with x_0 coordinate 0 are tagged with 1 and all samples tagged with 1 have x_0
 coordinate 0.
 
@@ -59,15 +58,21 @@ __author__="Lutz Gross, l.gross at uq.edu.au"
 import esys.escriptcore.utestselect as unittest
 import numpy
 from esys.escript import *
-from test_util_base import Test_util_base
-from test_util_reduction_no_tagged_data import Test_util_reduction_no_tagged_data
-from test_util_reduction_with_tagged_data import Test_util_reduction_with_tagged_data
-from test_util_overloaded_binary_no_tagged_data import Test_util_overloaded_binary_no_tagged_data
-from test_util_overloaded_binary_with_tagged_data import Test_util_overloaded_binary_with_tagged_data
-from test_util_unary_no_tagged_data import Test_util_unary_no_tagged_data
-from test_util_unary_with_tagged_data import Test_util_unary_with_tagged_data
-from test_util_binary_no_tagged_data import Test_util_binary_no_tagged_data
-from test_util_binary_with_tagged_data import Test_util_binary_with_tagged_data
+from test_util_base import Test_util_base, Test_util_values
+
+from test_util_reduction_new import Test_util_reduction_new
+from test_util_unary_new import Test_util_unary_new
+from test_util_binary_new import Test_util_binary_new
+from test_util_binary_leftover import Test_util_binary_leftover
+
+## these aspects are test in the _new tests
+#from test_util_overloaded_binary_no_tagged_data import Test_util_overloaded_binary_no_tagged_data
+#from test_util_overloaded_binary_with_tagged_data import Test_util_overloaded_binary_with_tagged_data
+#from test_util_unary_no_tagged_data import Test_util_unary_no_tagged_data
+#from test_util_unary_with_tagged_data import Test_util_unary_with_tagged_data
+#from test_util_binary_no_tagged_data import Test_util_binary_no_tagged_data
+#from test_util_binary_with_tagged_data import Test_util_binary_with_tagged_data
+
 from test_util_spatial_functions1 import Test_Util_SpatialFunctions_noGradOnBoundary_noContact
 from test_util_spatial_functions2 import Test_Util_SpatialFunctions_noGradOnBoundary
 from test_util_spatial_functions3 import Test_Util_SpatialFunctions
@@ -75,30 +80,24 @@ from test_util_slicing_no_tagged_data import Test_util_slicing_no_tagged_data
 from test_util_slicing_with_tagged_data import Test_util_slicing_with_tagged_data
 
 
-class Test_util_reduction(Test_util_reduction_no_tagged_data,Test_util_reduction_with_tagged_data):
+class Test_util_reduction(Test_util_reduction_new):
    """ test for reduction operation Lsup,sup,inf for all data types"""
    pass 
-class Test_util_unary(Test_util_unary_no_tagged_data,Test_util_unary_with_tagged_data):
+class Test_util_unary(Test_util_unary_new):
    """ all unary tests """
    pass
-class Test_util_binary(Test_util_binary_no_tagged_data,Test_util_binary_with_tagged_data):
+class Test_util_binary(Test_util_binary_new, Test_util_binary_leftover):
    """
    test for all binary operation
    """
    pass
-class Test_util_overloaded_binary(Test_util_overloaded_binary_no_tagged_data,Test_util_overloaded_binary_with_tagged_data):
-   """test for all overloaded operation"""
-   pass
-class Test_util_with_tagged_data(Test_util_unary_with_tagged_data,Test_util_reduction_with_tagged_data,Test_util_binary_with_tagged_data,
-  Test_util_overloaded_binary_with_tagged_data,Test_util_slicing_with_tagged_data):
-   """test for all operations without tagged data"""
-   pass
-class Test_util_no_tagged_data(Test_util_unary_no_tagged_data,Test_util_reduction_no_tagged_data,Test_util_binary_no_tagged_data,
-  Test_util_overloaded_binary_no_tagged_data, Test_util_slicing_no_tagged_data):
-   """all tests without tagged data"""
-   pass
 
-class Test_util(Test_util_unary,Test_util_reduction,Test_util_binary,Test_util_overloaded_binary):
+## Testing of these ops is now in Test_util_binary
+#class Test_util_overloaded_binary(Test_util_overloaded_binary_no_tagged_data,Test_util_overloaded_binary_with_tagged_data):
+   #"""test for all overloaded operation"""
+   #pass
+
+class Test_util(Test_util_unary_new,Test_util_reduction_new, Test_util_binary):
    """all tests"""
    pass
 
diff --git a/escriptcore/test/python/test_util_NaN_funcs.py b/escriptcore/test/python/test_util_NaN_funcs.py
index ebfd549..7c94b53 100644
--- a/escriptcore/test/python/test_util_NaN_funcs.py
+++ b/escriptcore/test/python/test_util_NaN_funcs.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/escriptcore/test/python/test_util_base.py b/escriptcore/test/python/test_util_base.py
index b6c231d..ac79d88 100644
--- a/escriptcore/test/python/test_util_base.py
+++ b/escriptcore/test/python/test_util_base.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -49,12 +49,1990 @@ try:
 except KeyError:
      ESCRIPT_WORKDIR='.'
 
-class Test_util_base(unittest.TestCase):
+
+class Test_util_values(unittest.TestCase):
+    """
+    Please do not define tests in this class.
+    The idea is to make it easier to isolate groups of tests, which
+    will be harder if there are tests in the base class
+    
+    Sets of values could be generated as follows:
+    def z2(levels, row):
+    if levels==1:
+      v=[]
+      for j in range(row):
+          v.append(random.triangular(-1., 1.0))
+      return tuple(v)
+    else:
+      v=[]
+      for j in range(row):
+          v.append(z2(levels-1,row))
+      return tuple(v)
+      
+    z2(2,2)
+    z2(3,3)
+    z2(4,4)
+    
+    However, some of the larger arrays are modified afterwards to ensure
+    that they contain at least one 0 for NaN checking purposes
+    """
+
+    RES_TOL=1.e-7 # RES_TOLerance to compare results
+    DIFF_TOL=1.e-7 # RES_TOLerance to derivatices
+
+    def makeTagged(self, fs, v1, v2):
+        """
+        Helper routine which makes a DataTagged containing the two values
+        (v1 as default and v2 as tag 1).
+        """
+        d=Data(v1, fs)
+        d.setTaggedValue(1, v2)
+        return d
+    
+    def get_scalar_inputL(self, cplx):
+        if not cplx:
+            v1=33489.58300735649
+        else:
+            v1=(9824.950442887115-46215.48181304759j)
+        return (v1,v1)
+
+    def get_python_inputL(self, rank, cplx, no_first_arg_negative=False, no_zeros=False):
+        if cplx:
+            if rank==0:
+                return (-3960.4642291825876+70893.2937559552j,)
+            if rank==1:
+                return ((59731.62346830329-82535.93558513945j), (97413.28611726397-71163.21858234056j))
+            if rank==2:
+                return (((22662.9306818+10450.1928396j), (-5876.588037489+31316.069231294925j)),
+                        ((-48775.88574400305+21535.3746218j), (36479.6003269178-39287.306108j)))
+            if rank==3:
+                return ((((-50847.97960-9062.27j), (-63529.6088+55171.4663j), (215.4-10185.37j)),
+                         ((40080.58380528418-34586.4289827135j), (-27276.009276950237-61855.16687539085j), (-34721.25780748475+82851.2788274762j)),
+                         ((43010.5425+18456.0305j), (-8655.17674+4404.157j), (23658.850518231033-20372.09007648639j))),
+                        (((43347.843141+58591.16j), (25836.3146-5995.971j), (-28969.5+31065.035j)), 
+                         ((-31942.46+61141.334j), (-84655.794+49812.188j), (63001.6-44321.65j)), 
+                         ((-19368.317+29114.8j), (-84938.09+83917.34j), (30356.3+48962.755j))), 
+                        (((-50756.5-28925.102j), (3348.16+79354.6j), (30159.52+6881.75j)), 
+                         ((59025.953-39.831j), (-237.942-53.93j), (9308.8+36247.003775959376j)), 
+                         ((12068.153033533716-68009.47095735556j), (7693.602018284684-23713.22567007532j), (44993.89718529736-3807.1609666917066j))))
+            if rank==4:   
+                return (((((36743.82175242095+26778.737326529765j), (-29754.182129388544+25393.077634889414j), (-7835.209676340906+49819.26015705921j), (33964.789417447566-32778.45444590585j)),
+                          ((-44579.370809357875-68703.24361188836j), (-149.28320431357133-64698.83715098185j), (38295.13314270778+58425.02740389345j), (-59088.20438563965-81586.99049191552j)),
+                          ((22892.612062358283-24715.70868029048j), (13367.867311961876+20860.578306432217j), (-47859.40778589482+71392.8351064374j), (-2304.287041885458+49294.11306179231j)),
+                          ((-62640.841478880255+36871.688232087705j), (10655.923749286507-23128.560897714342j), (-4131.801825297647+4443.2840182007785j), (-27903.670838787744-3117.482981970883j))),
+            (((57034.38962108706+38044.26403584313j), (-4462.844355084104+18211.587917962242j), (4313.178312608696-12868.233657189892j), (46374.72869675713-11812.40480331378j)),
+             ((322.189068738895+47179.67709271595j), (72322.13544947651-3662.5467369358375j), (-9231.467186395414+76230.40517770775j), (-41704.75682501451+32558.11893996234j)),
+             ((79487.23328596324-7366.42862253316j), (10481.924314965669-15120.283604848068j), (26960.83136881994-41071.566704782505j), (-24115.39190283895-7711.336401151741j)),
+             ((22474.95612418659+15623.165463453799j), (25929.087385707462+38175.58304877044j), (-8177.232611463696+21287.640323926986j), (34229.957465479616+34000.54107560321j))),
+            (((26772.169008338446-23226.644157592586j), (44355.462946645705+38435.617150983846j), (82270.23681598579+57228.460214922394j), (-61649.67759149854-29496.646828970726j)),
+             ((33208.12540969731-42543.11381431012j), (-37368.19634070844+36983.91078521421j), (-53479.67762639474+69192.57351520905j), (-16987.119998626833-24907.621827720854j)),
+             ((58265.74226484515+21428.598358311836j), (-25451.773790957814+34641.52936103524j), (49737.44278424142+46668.70872917027j), (-19763.07777821306-55742.60412333406j)),
+             ((39696.62704009203+11792.880723760507j), (45040.78931593459+1353.15524889082j), (38919.41458390256+5018.601358823813j), (24700.01773615746+18638.158415414437j))),
+            (((-27357.697301503198+67993.98776577965j), (43358.65691551873-60981.94828910699j), (-36961.845280498295+73544.32798356535j), (-7005.460088561973+56718.32085849555j)),
+             ((-45794.83454061549-24789.54243897248j), (-35553.771747041705+281.20812003471656j), (741.8214864204201-48926.27892674535j), (15258.748935604614+5750.3134710095765j)),
+             ((13578.214948777008+49023.37779316875j), (-52997.87500887418-28291.632747669166j), (34523.01328904568+70373.31760549065j), (-8549.195292188699+38710.00933198735j)),
+             ((-8724.746595711767+39671.57400059246j), (54220.76682697828+52787.45089736888j), (-2929.7928072663053-14645.947666259133j), (6967.3562262647465+20575.621108094565j)))), 
+            ((((41255.3128726088-4735.07598620026j), (17330.015550087788+39190.403383224395j), (-2409.2939922655205+33755.22845153985j), (-84016.4244828014-28839.63999275923j)),
+              ((-7567.298951515288+24481.103774662595j), (-25149.082523503632-8583.669927251554j), (47788.23750305794+37492.05579481191j), (-19575.167208193656+21113.148224316566j)),
+              ((-8076.55304084401+75096.61990916729j), (42138.65038370111-27451.77036345769j), (17599.47893995483-6322.617589222951j), (43000.60101023788+54422.76834543564j)),
+              ((-24961.480874041634-2122.019874702237j), (6425.889470030932+5622.557974648473j), (-65254.39721134174+59644.00375157643j), (-26617.634404672892-53495.819302484895j))),
+            (((-54060.398876227686+55992.77686553825j), (-29817.626727209106-29704.79980981775j), (-6767.670138070098+10024.257522469488j), (-30133.80524111932+40328.89815642918j)),
+             ((50000.78584499907-5894.192721755971j), (-3021.8049413580593-70247.81603731646j), (695.299152508218+58895.55560166443j), (-16680.2648353032-87022.82137596376j)),
+             ((14249.594063942364-1274.074993916045j), (12234.307608613788-18357.139710977237j), (32290.96562094186+38793.36224883628j), (67656.21258170376-9760.573070193976j)),
+             ((-45601.023706816115-74319.21757213926j), (55876.22452146437-61120.98256716965j), (58027.41230717529+10786.688485100865j), (-3495.6762613661413-46756.553429873304j))),
+            (((92894.48804954227+23902.59394418483j), (1353.988548653011-92567.68243719656j), (65397.064463537616+10248.124624835778j), (567.8160836168245+78786.59184031615j)),
+             ((-40282.49291521364+79825.32258981027j), (-40310.88688269715+455.4179428850184j), (-11166.391823961778+2764.918200738073j), (78697.6368921528-685.3372273494751j)),
+             ((70892.98538412598+78843.94735644812j), (-64882.52692417733+80256.3932249126j), (26045.841803168907-12175.162753092736j), (-58159.5440761434-67887.15729778618j)),
+             ((8775.14598500292+16795.25423101084j), (13155.934674011907+16737.126752117358j), (15975.852541323125+14513.776915618466j), (-25215.109458495746+8530.276446405784j))),
+            (((25795.767870170166-31056.851297134257j), (4037.894742402088-83.2035600123636j), (-19413.455650262404+40693.39115961014j), (-63145.75424957367+34735.00168222326j)),
+             ((17181.9690394505+18815.796074907106j), (45370.782381827026+55332.61058358025j), (-15112.046450780603-88000.14177105221j), (81609.38175982882+21862.010369853655j)),
+             ((-55560.45495276697-8487.570486260593j), (-1240.3046453718998-36806.93746782728j), (2314.7751094353007+66709.2996375249j), (73913.798692593+17715.330241595133j)),
+             ((-6756.64963479065-17680.06798381319j), (-68433.87475450675-1521.61274877697j), (-38429.70821819296-59684.70774465629j), (679.6723316871648-5141.593014362268j)))),
+            ((((6009.97586310716+60604.30942478338j), (32396.109723949165-43790.651419414105j), (28779.550340574773+51904.28569017858j), (22898.47954312162+24374.281930383077j)),
+              ((43337.67939273335-5975.004215923647j), (-20668.774830910013-76079.20355770885j), (28645.123677151292+25672.909247014104j), (-31717.682104715685+9732.221717787586j)),
+              ((53661.13842896042+72923.84155787138j), (35385.072072520015-6307.198139944798j), (30479.544507534592+62234.1254985712j), (-1034.7905621764367+40286.709890159545j)),
+              ((-81367.55312016135+16928.505901155673j), (-7815.888755622378+6045.680730129257j), (23493.410721616994+56525.86301109548j), (64379.29795689413-41596.85817228346j))),
+            (((10077.706189869234-14023.344225890105j), (9787.45494885469+1980.526605239269j), (-41789.42734084199+33109.62355852481j), (77722.47714091674+16230.914008263571j)),
+             ((33929.99686388744+69324.24249861641j), (-42944.721176775936+77239.49498876408j), (-24531.218551429585+33511.72101875048j), (38167.50870231599+48640.295148756864j)),
+             ((5153.059156082629+82411.43319343394j), (46237.63154724835-24482.044081531683j), (-42350.512586094905+21364.573202395462j), (27884.705448024964+27406.374083228744j)),
+             ((26735.822927676723-16229.136581069019j), (-20377.70277018177-48828.24171348816j), (-31499.21640336576-14810.9243228345j), (-7904.957576446148-20229.149437926535j))),
+            (((16522.705470639165+17310.831386237332j), (-76148.34984139015+80969.93773509384j), (-24811.00749069672+38047.29320608019j), (20992.172136102876-22605.533994627098j)),
+             ((-20970.94805191878-11158.194764479718j), (-24776.365668172788+15335.11508002579j), (31475.965557547286+42101.17185492054j), (-5067.057332858472-32895.81793448307j)),
+             ((2682.2679111504112+39461.2760464704j), (8347.197026209295+5913.884037792421j), (-33487.63388762134-63339.09288353257j), (-57157.881248657024+1556.61791639906j)),
+             ((-41068.04079080766+48584.07702236999j), (8498.148930898213+14312.48564445498j), (-21316.05107180962+87054.88334056246j), (-21471.236761054563-59830.259831579846j))),
+            (((29431.72773241329-33178.12936911729j), (26409.71652118041+55871.26981512072j), (66462.49459072504+84224.15533504078j), (54448.348792259174+24319.32902355393j)),
+             ((-71328.38862684023+23367.89957869296j), (-59401.71170696309+49485.585597715195j), (41883.2210796735+19719.46171899562j), (-18795.333157237168-68982.70021560306j)),
+             ((59112.62708481629-45457.26410539314j), (-88790.25871362776-25685.393578202435j), (23696.552787236098+41921.596338817966j), (55010.09931039718-93443.28701025742j)),
+             ((39099.27462555075-21859.303492325664j), (-13175.71402014888+48223.91127425416j), (-5568.289447947842-299.0850724438933j), (-20467.28086020409+30095.8347308894j)))),
+            ((((-16018.868474730582-47768.31986595277j), (51712.37041771119-18503.457760090154j), (-49051.6111606494+23687.829560421436j), (-71984.9830420537+396.65467472762975j)),
+              ((10108.4516848598+51857.057322104636j), (-7216.241612916012+72110.85192662141j), (54626.45574269543-59774.72883503144j), (-657.6522009949113+60897.80850184188j)),
+              ((-7989.0171800768585-89431.37235259652j), (-24705.702245950946+70622.38482297733j), (-63459.904012077815-42658.85544672633j), (50226.10296539047+34122.54286740055j)),
+              ((41218.241998490725+14373.480195603668j), (-54370.32919269195+6808.202490824406j), (-1527.4828551954124+54636.12386175628j), (14472.837501920381-52333.2803360176j))),
+            (((-2746.8539660817187-74513.82700384625j), (-61015.83534421826+53680.73473922199j), (-79322.89757472202-30783.74464730559j), (-46747.1238366321-74773.91885253192j)),
+             ((38500.41669416314-55405.667973400086j), (1396.4878373664105+24775.37482803031j), (58020.02299122539+48560.59423440633j), (-29555.466456927898-2523.0682893230987j)),
+             ((-34617.908388179705-12964.332502930381j), (-45031.80883921236+65602.1489634705j), (-25153.44844444198-12070.474688363538j), (-21543.782061126898-86119.31236007596j)),
+             ((71651.55622950022+37553.55829666175j), (73215.11980883317-718.055454765301j), (7065.864625805567-92990.91593148846j), (11751.07053047308-7707.306990859142j))),
+            (((-43076.79837010652+24177.23355451846j), (6793.467392677732-20449.573606641366j), (-71013.01101746038-6225.881152518472j), (74055.17870813374+66606.15686348274j)),
+             ((11557.138464109157+5388.5729086161155j), (36732.06100793248-37022.585715349574j), (2921.611354480643+55496.19455947708j), (55058.90849766818+18274.262129668554j)),
+             ((-58815.802612553605-3016.8034868425602j), (11211.939776371626+85380.70520152281j), (5184.476190878297-46247.039507761j), (66267.98054810712-61671.71978896645j)),
+             ((-5378.665820848371+9328.328146237982j), (43895.1264174895-68770.39938502887j), (-17511.997277418195+58343.13845945775j), (-85449.25399769237+5421.878678659821j))),
+            (((39759.129208538325-36375.49825029998j), (14116.074449609747-3690.404237582101j), (726.610813691339+20601.83416877652j), (-39703.3656455713+3717.592156691331j)),
+             ((59401.5216214189+24249.24110262998j), (32483.925202512517+12478.691995073255j), (-32680.63271733308-27669.460617493503j), (-49228.06429579756+18669.428245068033j)),
+             ((44330.3653675318-76.05447174097935j), (-77173.70951748395-14072.79466329544j), (44365.91092729417+30775.448092456412j), (-27126.74998375852-42673.613992010614j)),
+             ((69065.27619440478+6707.326801963689j), (30689.082128804977-86800.51053515819j), (49475.52450098609+20399.323850453336j), (-29667.120261194417+8908.992755905914j)))))
+        else:
+            if rank==0:
+                return (1968.4370221151426,)
+            if rank==1:
+                if no_first_arg_negative:
+                    return (24899.54037082102, 25.31549006801)
+                else:
+                    return (-24899.54037082102, -25.31549006801)
+            if rank==2:
+                return ((1830.692020877672, 4256.807988523855), (31330.447580824955, 30088.386511638193))
+            if rank==3:
+                if no_first_arg_negative:
+                    return (((22464.14939770715, 9326.07497133658, 58843.28039835674),
+                         (39132.51601559524, 28984.021248456513, 87606.99636934511),
+                         (82483.31416277925, 58484.471708777906, 28659.10377643413)),
+                        ((48055.05693146407, 36954.49346593733, 25658.428739633804),
+                         (45374.680239837886, 11967.766802782062, 40707.17918100887),
+                         (9272.611657965084, 95545.34560025277, 36552.65523613798)),
+                        ((91272.06575583504, 61258.36210240262, 23700.008344466856),
+                         (76559.99183386622, 74506.2742834793, 40042.39145376187),
+                         (54893.50655552275, 60408.00584363263, 68208.21135366432)))
+                else:
+                    return (((22464.14939770715, 9326.07497133658, -58843.28039835674),
+                         (-39132.51601559524, -28984.021248456513, 87606.99636934511),
+                         (82483.31416277925, 58484.471708777906, 28659.10377643413)),
+                        ((-48055.05693146407, 36954.49346593733, 25658.428739633804),
+                         (-45374.680239837886, -11967.766802782062, 40707.17918100887),
+                         (-9272.611657965084, 95545.34560025277, 36552.65523613798)),
+                        ((-91272.06575583504, 61258.36210240262, 23700.008344466856),
+                         (-76559.99183386622, 74506.2742834793, -40042.39145376187),
+                         (54893.50655552275, -60408.00584363263, -68208.21135366432)))
+            if rank==4:
+                if no_first_arg_negative:
+                    return ((((2613.5684369694354, 384.9724701708765, 17359.719572324335, 63393.27571171061), 
+                          (41041.42067423142, 14993.16104673734, 27399.273319594344, 60051.2377656026),
+                          (18566.32422588553, 73825.83739655794, 95319.0187027347, 27646.03157540709),
+                          (88007.8178172775, 60759.47561504975, 31822.15287970184, 38852.10105560179)), 
+                         ((89386.29724076603, 79511.70453673883, 1325.344653112319, 14210.631402891566), 
+                          (9099.55295712997, 30612.395205911307, 5512.258312859951, 43371.59702594321), 
+                          (24961.325742358764, 6843.62962861413, 43588.35638871549, 37139.61080792606), 
+                          (59901.00300911518, 59802.81275754453, 26119.701955513825, 70973.81339014533)), 
+                         ((10824.815145545523, 37682.56858486531, 14732.374901197414, 14286.141738580205), 
+                          (43004.59056324265, 59441.985441533616, 83687.96499450768, 4325.869356595635),
+                          (56783.42265829212, 28959.61168144866, 83740.97480554663, 10729.510064491638),
+                          (38480.61835393819, 50636.84578373406, 3588.0738023085723, 56239.74544740876)), 
+                         ((18228.900850710852, 16632.129655349723, 8015.163471499967, 4521.799739700364), 
+                          (51505.380752985875, 1524.7016267364233, 19342.421346891773, 48490.57412835015), 
+                          (73047.79149393305, 35239.98425352734, 35458.1734620065, 55659.41536985519), 
+                          (13074.184715655007, 6436.319756047014, 28485.17418228225, 11128.300314215841))), 
+                        (((321.6371242800669, 35572.05942103493, 9515.23626081155, 4433.077669837556), 
+                          (26761.084128710136, 10867.52013173081, 19183.162620251198, 68559.41235027292), 
+                          (11484.667574519088, 51828.050682516754, 38005.19565254123, 76175.23771370867), 
+                          (5227.790707720851, 71440.84429737684, 50336.09378326664, 37678.70778115371)), 
+                         ((45566.74581644684, 5908.975208284799, 22576.958775978783, 50020.73251106653), 
+                          (26017.058082686533, 25299.281527364627, 40976.696154446676, 13431.16881318092), 
+                          (46649.16989082289, 65794.20117285698, 64119.987425361716, 5497.440022742972), 
+                          (2203.2985446707025, 57513.79981817989, 41574.749087273776, 48387.40101623114)), 
+                         ((18416.741032524515, 47640.69430896508, 19679.029797917596, 34810.30464977612), 
+                          (62831.92844082225, 27725.457434774376, 3134.438446956716, 49315.595365086476), 
+                          (73623.94099730175, 20978.640264794405, 5573.772319421056, 36086.56272512534), 
+                          (28660.57533284233, 58241.55583429358, 51661.45261125069, 50693.33103010448)), 
+                         ((56426.23453986164, 78359.73594286482, 38576.297999959155, 8913.910887926046), 
+                          (88189.29548286308, 2602.1208204264694, 15718.494307329529, 39115.51872697051), 
+                          (50134.74938380022, 42828.424427019796, 39528.932684095016, 71074.105860494), 
+                          (10360.78422517216, 3628.4946464838577, 866.6535588603292, 31553.01858562138))), 
+                        (((52390.293064785874, 12243.173190398476, 12973.542140497811, 24679.210914480092), 
+                          (39068.25465569209, 11375.555598436607, 11948.963084895935, 23180.6696549638), 
+                          (7750.742802840003, 4544.655806011273, 17257.229884485423, 38718.29755209083), 
+                          (54962.39017442457, 32692.842165301, 79228.7545707964, 46958.08883925094)), 
+                         ((58808.04021951867, 31679.09607989699, 60465.22396617634, 3778.4799478359637), 
+                          (17712.329884018807, 17874.74312645469, 14954.738052270157, 44753.01307496137), 
+                          (24417.93508883397, 25931.24652138863, 27186.302587945494, 37605.82669369904), 
+                          (20116.370032880397, 22395.271847421376, 39918.504300252374, 43365.55907616498)), 
+                         ((29680.436323581554, 7156.784950690315, 27141.447127045933, 65196.42918411147), 
+                          (10851.323062587486, 12918.348059911383, 61892.308397834146, 49367.20478221224), 
+                          (12048.985149625369, 61619.01673500164, 19594.218775417554, 52093.668037218595), 
+                          (38465.24637072596, 9188.19710817252, 7828.463839086282, 62406.93767988804)), 
+                         ((35787.91825329978, 23117.81737012358, 49967.17854684144, 9030.162340133553), 
+                          (31476.492123520133, 42646.47087585365, 80893.4161545868, 38123.68731593444), 
+                          (23794.505773755358, 1648.5505688887642, 18076.67754352292, 50552.198666715994), 
+                          (31218.595116869503, 36051.76246348336, 23827.05367940539, 6983.787679924746))), 
+                        (((22717.871470141312, 41000.10860057993, 57170.77347009425, 45870.224065572766), 
+                          (75749.5782286584, 82016.05469083885, 15364.324776823589, 34421.772637849994), 
+                          (56091.35037369725, 69020.64428824343, 54982.82912975482, 26461.710610700044), 
+                          (6865.449808598962, 1458.33269652327, 19976.42644646119, 71857.51352483299)), 
+                         ((19816.540187252496, 8015.999325965924, 73384.47295519276, 29811.76619356322), 
+                          (13116.527286368713, 76148.43320182734, 694.6129571919591, 51487.98727764331), 
+                          (18216.321286892955, 19089.44846330423, 49851.57024753545, 23061.547216296094), 
+                          (4069.367521493099, 4460.02510964268, 70628.47512058845, 5320.222269188191)), 
+                         ((55551.601997272795, 15131.970379855833, 9132.149357120768, 1748.749782567771), 
+                          (25571.39049857318, 22269.3336119335, 40013.90106400979, 41645.300687720875), 
+                          (19942.423484201456, 77721.3403094917, 49049.37211887518, 42125.028417728725), 
+                          (20331.591530993654, 18849.729202127564, 11172.361078239031, 42378.721186597744)), 
+                         ((28162.219784186906, 27005.38411136302, 28047.626970074954, 48907.05914121462), 
+                          (21561.00249540838, 16819.379648924267, 21373.309752767862, 81217.52472263864), 
+                          (14530.50392089595, 38878.60235910026, 18507.98920090188, 38187.90762089445),
+                          (24234.820876412356, 50390.96325142998, 5976.493423496679, 16545.42618485792))))                    
+                else:
+                    return ((((-2613.5684369694354, 384.9724701708765, 17359.719572324335, -63393.27571171061), 
+                          (41041.42067423142, -14993.16104673734, -27399.273319594344, 60051.2377656026),
+                          (18566.32422588553, -73825.83739655794, 95319.0187027347, -27646.03157540709),
+                          (-88007.8178172775, 60759.47561504975, 31822.15287970184, -38852.10105560179)), 
+                         ((-89386.29724076603, 79511.70453673883, 1325.344653112319, 14210.631402891566), 
+                          (9099.55295712997, 30612.395205911307, -5512.258312859951, -43371.59702594321), 
+                          (24961.325742358764, 6843.62962861413, -43588.35638871549, 37139.61080792606), 
+                          (-59901.00300911518, -59802.81275754453, -26119.701955513825, 70973.81339014533)), 
+                         ((10824.815145545523, -37682.56858486531, -14732.374901197414, -14286.141738580205), 
+                          (-43004.59056324265, 59441.985441533616, -83687.96499450768, 4325.869356595635),
+                          (-56783.42265829212, -28959.61168144866, -83740.97480554663, -10729.510064491638),
+                          (-38480.61835393819, -50636.84578373406, -3588.0738023085723, 56239.74544740876)), 
+                         ((18228.900850710852, -16632.129655349723, 8015.163471499967, -4521.799739700364), 
+                          (-51505.380752985875, -1524.7016267364233, -19342.421346891773, -48490.57412835015), 
+                          (-73047.79149393305, -35239.98425352734, -35458.1734620065, 55659.41536985519), 
+                          (-13074.184715655007, 6436.319756047014, -28485.17418228225, -11128.300314215841))), 
+                        (((321.6371242800669, 35572.05942103493, 9515.23626081155, -4433.077669837556), 
+                          (26761.084128710136, 10867.52013173081, -19183.162620251198, -68559.41235027292), 
+                          (11484.667574519088, 51828.050682516754, 38005.19565254123, -76175.23771370867), 
+                          (-5227.790707720851, 71440.84429737684, -50336.09378326664, 37678.70778115371)), 
+                         ((-45566.74581644684, 5908.975208284799, 22576.958775978783, -50020.73251106653), 
+                          (-26017.058082686533, -25299.281527364627, 40976.696154446676, -13431.16881318092), 
+                          (-46649.16989082289, -65794.20117285698, 64119.987425361716, 5497.440022742972), 
+                          (-2203.2985446707025, -57513.79981817989, 41574.749087273776, 48387.40101623114)), 
+                         ((-18416.741032524515, -47640.69430896508, 19679.029797917596, -34810.30464977612), 
+                          (62831.92844082225, 27725.457434774376, -3134.438446956716, 49315.595365086476), 
+                          (-73623.94099730175, 20978.640264794405, -5573.772319421056, 36086.56272512534), 
+                          (28660.57533284233, -58241.55583429358, -51661.45261125069, -50693.33103010448)), 
+                         ((56426.23453986164, 78359.73594286482, -38576.297999959155, 8913.910887926046), 
+                          (-88189.29548286308, 2602.1208204264694, -15718.494307329529, 39115.51872697051), 
+                          (50134.74938380022, -42828.424427019796, 39528.932684095016, 71074.105860494), 
+                          (10360.78422517216, 3628.4946464838577, 866.6535588603292, 31553.01858562138))), 
+                        (((52390.293064785874, -12243.173190398476, 12973.542140497811, 24679.210914480092), 
+                          (-39068.25465569209, 11375.555598436607, -11948.963084895935, 23180.6696549638), 
+                          (7750.742802840003, -4544.655806011273, 17257.229884485423, -38718.29755209083), 
+                          (-54962.39017442457, -32692.842165301, 79228.7545707964, -46958.08883925094)), 
+                         ((58808.04021951867, 31679.09607989699, 60465.22396617634, 3778.4799478359637), 
+                          (17712.329884018807, 17874.74312645469, 14954.738052270157, -44753.01307496137), 
+                          (24417.93508883397, -25931.24652138863, -27186.302587945494, 37605.82669369904), 
+                          (-20116.370032880397, 22395.271847421376, 39918.504300252374, 43365.55907616498)), 
+                         ((-29680.436323581554, -7156.784950690315, -27141.447127045933, 65196.42918411147), 
+                          (-10851.323062587486, -12918.348059911383, -61892.308397834146, -49367.20478221224), 
+                          (-12048.985149625369, 61619.01673500164, 19594.218775417554, 52093.668037218595), 
+                          (-38465.24637072596, -9188.19710817252, -7828.463839086282, -62406.93767988804)), 
+                         ((-35787.91825329978, 23117.81737012358, -49967.17854684144, -9030.162340133553), 
+                          (-31476.492123520133, -42646.47087585365, -80893.4161545868, -38123.68731593444), 
+                          (23794.505773755358, -1648.5505688887642, -18076.67754352292, -50552.198666715994), 
+                          (31218.595116869503, 36051.76246348336, -23827.05367940539, 6983.787679924746))), 
+                        (((-22717.871470141312, 41000.10860057993, 57170.77347009425, -45870.224065572766), 
+                          (-75749.5782286584, 82016.05469083885, 15364.324776823589, -34421.772637849994), 
+                          (56091.35037369725, 69020.64428824343, -54982.82912975482, 26461.710610700044), 
+                          (-6865.449808598962, 1458.33269652327, 19976.42644646119, 71857.51352483299)), 
+                         ((-19816.540187252496, 8015.999325965924, 73384.47295519276, -29811.76619356322), 
+                          (-13116.527286368713, -76148.43320182734, 694.6129571919591, -51487.98727764331), 
+                          (-18216.321286892955, 19089.44846330423, -49851.57024753545, -23061.547216296094), 
+                          (4069.367521493099, 4460.02510964268, -70628.47512058845, -5320.222269188191)), 
+                         ((55551.601997272795, 15131.970379855833, 9132.149357120768, -1748.749782567771), 
+                          (25571.39049857318, -22269.3336119335, -40013.90106400979, -41645.300687720875), 
+                          (19942.423484201456, -77721.3403094917, -49049.37211887518, -42125.028417728725), 
+                          (-20331.591530993654, 18849.729202127564, -11172.361078239031, -42378.721186597744)), 
+                         ((-28162.219784186906, 27005.38411136302, 28047.626970074954, -48907.05914121462), 
+                          (21561.00249540838, 16819.379648924267, 21373.309752767862, 81217.52472263864), 
+                          (14530.50392089595, -38878.60235910026, 18507.98920090188, 38187.90762089445),
+                          (24234.820876412356, 50390.96325142998, 5976.493423496679, -16545.42618485792))))
+        
+    def get_scalar_input1(self, cplx, no_first_arg_negative=False, no_zeros=False):
+        if not cplx:
+            v1=0.6081355033581688
+        else:
+            v1=(0.27562178672620385+0.42446484939332796j)
+        return (v1,v1)
+
+    def get_scalar_input2(self, cplx, no_zeros=False):   # optional arg doesn't matter here
+        if not cplx:
+            v2=0.5327268994219874
+        else:
+            v2=(0.49976275640416334+0.4141087840210876j)
+        return (v2,v2)
+    
+    def get_scalar_input3(self, cplx):
+        if not cplx:
+            v3=0.4903827487969067
+        else:
+            v3=(0.4130410618402195+0.7195601418761082j)
+        return (v3,v3)
+    
+    def get_scalar_input4(self, cplx):
+        if not cplx:
+            v3=-0.4555987934301202
+        else:
+            v3=(-0.2562657772006671-0.09989064526858904j)
+        return (v3,v3)
+
+    def get_python_input1(self, rank, cplx, no_first_arg_negative=False, no_zeros=False):
+        if cplx:
+            if rank==0:
+                return (-0.8493106430566671+0.5498588650604705j,)
+            elif rank==1:
+                return (0.5213538174366878+0.45097055421243537j, 0.25896216831911634-0.5966874048733529j)
+            elif rank==2:
+                return (((-0.20984377987310687+0.024810300993445944j), (0.024805532005481523+0.015098314700385806j)),
+                        ((0.2292639954026584-0.7100972341857507j), (0.08682454615283863+0.12332238221542291j)))
+            elif rank==3:
+                return ((((-0.6550500854131598-0.2127087989155373j), (-0.017627543683440106-0.3665841375380333j), (0.12492952051741912+0.05374046981620606j)),
+                         ((-0.11197479851035519-0.5608269924316476j), (-0.5419470859968003+0.07356518546227997j), (-0.42635110929148823+0.47738396333288513j)),
+                         ((-0.16556333483163588+0.009959138144123747j), (-0.17095759700320223+0.19563542216810015j), (0.38543550056193654-0.7475542165987907j))),
+                        (((-0.773039591137402+0.001304882415888442j), (0.005692414753365238+0.7073228171031704j), (0.16149889599978962-0.5779399189029897j)),
+                         ((-0.39240472327059983+0.5661946692113213j), (0.15619153376084327-0.2043397442335695j), (0.12989734566943012-0.6797045089189742j)),
+                         ((-0.2953545934396431+0.00897241164565632j), (0.2424492369208724-0.3012099081809274j), (-0.5052331641775911-0.7560269073586534j))),
+                        (((-0.4330063069118393+0.4662418513842146j), (0.14640515390237896+0.21280275920042335j), (-0.6848374766215319+0.688509731931129j)),
+                         ((-0.7009542857194253+0.5090290863675988j), (-0.08777137326709294-0.0642088074588476j), (-0.22469168662839534-0.20497222057853204j)),
+                         ((-0.004895060324627054-0.0007149461427655712j), (0.5733987472263198-0.020876347517763794j), (0.14677839835678597-0.33748939337229644j))))
+            elif rank==4:
+                return (((((0.790344350-0.675690862j), (-0.33969014424346+0.004667354999j), (-0.353898037-0.23103247j), (-0.173453149+0.350472j)),
+                          ((0.262318036+0.493920836j), (0.122221063-0.2126j), (-0.2002867+0.62847794j), (0.2585201923791-0.1055537993243j)),
+                          ((0.1024287918-0.07259437049j), (0.3338564+0.44847000j), (0.0433384-0.2616078j), (-0.1717597+0.2503709670077j)),
+                          ((-0.768778331-0.076403010j), (0.251991719+0.62985777j), (0.4514933+0.47696252j), (-0.0351486+0.023037350246j))),
+                         (((-0.4863645-0.24921801802j), (-0.023444472-0.5599386j), (-0.56592+0.4275706j), (0.41222370286-0.34867238925j)),
+                          ((-0.5252590+0.04977251205j), (-0.33737953+0.27293775j), (0.66428+0.87048705j), (0.0672260574-0.416242856449j)),
+                          ((0.148783460-0.4520517585j), (-0.41537536+0.16140391j), (0.6278127+0.263838j), (-0.07760387-0.1831155602152j)),
+                          ((0.0470026875+0.481795665j), (0.0215979296-0.081945318j), (0.7913869-0.0861j), (0.39466-0.36695690929153635j))),
+                         (((-0.143371038+0.36692459j), (-0.05936024660+0.57744203j), (0.35210125-0.3062606j), (0.09250628940+0.2787772j)),
+                          ((0.5220814-0.12741648j), (-0.054402209613+0.8726141525j), (0.19115503+0.059924j), (0.34340959513-0.13436584j)),
+                          ((-0.854710-0.3580477j), (-0.45614757+0.0726810109j), (-0.11809521670+0.15075834042j), (-0.028270996-0.13039829j)),
+                          ((-0.4935554755+0.6616606j), (-0.77712599-0.292285j), (-0.29938802+0.958714551j), (0.1306040901396+0.5467211724j))), 
+                         (((-0.490711642822499-0.0679784225903799j), (-0.028147241164195536-0.03995809530085381j), (-0.28811330815221536-0.6815443637070895j), (0.07421744086779403+0.7402073156785812j)),
+                          ((-0.20556698745139912+0.15621646747170792j), (0.09192542596753261+0.12253579257228409j), (-0.3264483145179087-0.946630282004219j), (0.224192041112648-0.90380956121387j)),
+                          ((-0.23224656797256493-0.6768140280012414j), (0.2451768408209073+0.17488492564153224j), (-0.6851697787753819-0.08406614036650228j), (0.20088414272093424+0.1669900873662492j)),
+                          ((-0.36057308512412345+0.4226878583624143j), (0.4490488492756204+0.11240390126422484j), (0.03234540063577107+0.5512325765639803j), (-0.5756238638317961-0.46042879607009257j)))), 
+                        ((((0.24124399378525585-0.8745635773731907j), (-0.19374525735285986+0.5380787997061398j), (-0.4489085299026162-0.6296073456803736j), (0.056570144039872594-0.135671341894538j)),
+                          ((0.05530486113034205-0.45284053426797866j), (-0.04502323738051783+0.0630304737860885j), (0.004887893978963609+0.5713368827301133j), (0.18732743423207876-0.7143408881411377j)),
+                          ((-0.3712234322764927+0.24908466763268566j), (0.6364022966205971-0.21808571418727385j), (-0.5670900710572193+0.6348611392807915j), (0.9245683140013828+0.3899090325528184j)),
+                          ((-0.6094870272364956-0.2685532809269351j), (0.6287315177811945+0.4264823533706973j), (0.1676715780106749-0.48029733292855326j), (-0.5376630517471747-0.7182359990772386j))), 
+                         (((-0.018779747197580465+0.6114308512727638j), (0.3732084851158033-0.4786089418474003j), (-0.5663664323873074+0.39392462282467033j), (0.13538143997466878-0.12985823792228446j)),
+                          ((-0.4780490757496574-0.39805216916921526j), (-0.2797090849741719+0.93720217986173j), (0.6203622207514078-0.15823957110011522j), (0.6060182605777774+0.018214531480017393j)),
+                          ((-0.3696664461011986+0.07708468475820063j), (0.3066672994071602-0.345863819817513j), (-0.18002308351634988+0.6758164917135244j), (-0.3299795335012433+0.3472073085359665j)),
+                          ((-0.018635553181191034-0.2527645838168162j), (0.10050559250760827-0.2682102608362037j), (0.15675656210201427-0.8704771160865176j), (0.2060240187990353+0.1525158024705776j))),
+                         (((0.17233488629737193-0.11594210469295985j), (0.06281516668626441-0.2603634509290429j), (-0.05642743012335105-0.655594777161181j), (0.6959785793264961+0.19699171017512973j)),
+                          ((-0.17348338509217032-0.6986792371372937j), (-0.8346643961801311-0.3680194342368177j), (0.12864312443903647-0.32156359553027614j), (0.6861567331359726-0.010430013106866087j)),
+                          ((-0.6222917331694062+0.112713903157314j), (-0.12621654439609742+0.28520452943867913j), (0.44508284456518865-0.7522188187153122j), (-0.2636591190438452-0.040926078833506185j)),
+                          ((-0.19805372118683406+0.5858778783604968j), (0.8721978764710994-0.548302441850661j), (-0.15430327558703272-0.01201209901149869j), (-0.3670274756811238+0.5474051336552919j))),
+                         (((0.25034760722181615-0.15703084151927404j), (-0.14637027923589074+0.2928912738619156j), (0.46416445476921286+0.08042093992929411j), (-0.506840204775922-0.1186965040818393j)),
+                          ((-0.37679950234230697-0.2701183493158177j), (0.043782673009088335+0.06734842807447794j), (0.2517828293729589-0.46888255931621403j), (0.6737055518213005-0.812365808946925j)),
+                          ((-0.2661639821601073+0.13557351739334367j), (0.7392306869051049+0.5132140781139445j), (0.8364137600747349+0.15412542220542547j), (-0.5220472284167044-0.3618612888730691j)),
+                          ((0.13970939326026943-0.3036727447660489j), (-0.38759251152342933+0.18775991991684293j), (-0.2487083238049208-0.4778652656270306j), (0.1390512499757498-0.9134653209907141j)))), 
+                        ((((0.04833008268979544+0.15219347436054742j), (0.26103655160455086-0.3757461116008425j), (-0.12150273403936784-0.617683120749172j), (0.06086845258368434+0.5631830804862105j)),
+                          ((0.5300453373682147+0.4166351114705461j), (-0.6851243348127105+0.6918703698362535j), (-0.7710255671005614+0.10134603710624956j), (-0.26008427165733317+0.39542364464404867j)),
+                          ((0.5854498106749348+0.549731062650827j), (0.2519939415821417-0.43527531634423966j), (-0.6267811606157699+0.8585285100484663j), (0.07940474123690222-0.5124720092697812j)),
+                          ((0.30776303313314646-0.15530657580599816j), (0.007522269998118669+0.35668611429959896j), (-0.1919814476250188-0.30177638543157503j), (-0.1646298733419591-0.7159546806725978j))), 
+                         (((-0.30218788472478486+0.7760123719336528j), (-0.6314508280105797-0.1304090779644247j), (0.47461359141937576+0.4479088939414325j), (-0.06334668969380608+0.1323481666947287j)),
+                          ((-0.7546949847971307+0.1756014222789699j), (0.25493728708952623-0.1282474899023487j), (0.390011965026524+0.4028431671750171j), (0.06598509493063165+0.7155111116236064j)),
+                          ((0.07881709314826968-0.24405932002231845j), (0.36802109324120846-0.15749901166866498j), (-0.4450424875753707+0.7030178139999255j), (0.27329963141708635-0.7119309406610871j)),
+                          ((-0.30933381776423374-0.11542316873853986j), (-0.0254248179097315-0.7313241377455038j), (0.10700540112141-0.4660169963118146j), (-0.3013644469437623+0.17540339691654783j))), 
+                         (((0.0008073119623276392-0.05721575120619815j), (-0.08090870209548084-0.5957005266957907j), (0.17886979689341065+0.08798138279240286j), (-0.47326181867795214-0.39061153265097337j)),
+                          ((-0.6240780356387126+0.931178282425864j), (0.49774084728858903-0.6554241240698137j), (-0.5514724615982707-0.1357900974308276j), (0.9476110679732384-0.8254384162767912j)),
+                          ((0.339181898243627-0.26749719725842025j), (-0.8452885480367868+0.6880217962554664j), (0.6160319781793868-0.21382367328363683j), (-0.10773724739140955+0.12900692439104278j)), 
+                          ((-0.4524239681624962-0.05106064389660214j), (0.3502260661172907-0.28486272434416593j), (-0.22611152371676513-0.4473111544777272j), (-0.07889011849494199-0.902189430409641j))), 
+                         (((-0.4549255061524088+0.8204137745689758j), (0.6262794891433104-0.07873980006902381j), (-0.2099285569580429-0.5700098959028401j), (0.6485809522680817+0.09567054692828636j)),
+                          ((0.20594301199461984+0.4902067661467834j), (0.3329644191869927-0.02188884849814343j), (-0.22921000231707434+0.3393725843732417j), (0.5813376839449342+0.09312340842380451j)),
+                          ((-0.44184373889384854-0.22572260324605908j), (-0.2865930601221123+0.2963815667447778j), (0.23401187102772336-0.14690195925951866j), (0.5821368881041176+0.7899842539077798j)),
+                          ((0.21512923589171906-0.5017618261731809j), (-0.29710734954707296+0.3058974064324922j), (-0.3522028959822211-0.5211544989239631j), (0.0833888296839771+0.47110470479799904j)))), 
+                        ((((-0.12192871299046759-0.7328491805867747j), (0.7012790193629233+0.7216675552235499j), (0.07746694166806012+0.07187177179945092j), (-0.11596083131875812-0.3402549730235054j)),
+                          ((0.4419525909212654-0.41264178907481297j), (-0.9540280899180219-0.0931626138838092j), (0.5850822884122122+0.023613319021177137j), (0.6204747822108139+0.4817530149691007j)),
+                          ((0.12857240889181254+0.26765277556782874j), (-0.5905959060433874+0.30391448875145577j), (-0.33009606966351646-0.5133049903372606j), (0.3911371567574641-0.5699531083068055j)),
+                          ((-0.06951047741648464+0.09185412570082496j), (0.23412720494006845-0.15301303449597714j), (-0.3632868271203742-0.0854806981764501j), (-0.06898965841232252-0.08895516025337646j))),
+                         (((-0.30228646550028415+0.06630530646305488j), (0.1386457118575627-0.48419676726390337j), (-0.22729071025997294-0.7643686926101503j), (-0.3622425543437594+0.8590754571587876j)), 
+                          ((-0.22721539776726385-0.36036034464849565j), (0.31497309604817325+0.3597772211828737j), (0.5069787174234794-0.8219928876404512j), (0.11194139062149588+0.26293050464964796j)),
+                          ((0.4612090001013647+0.27388506472486907j), (-0.30194776224929665-0.13263761985638922j), (-0.6233657091294399+0.44684364446587943j), (-0.3450340301594258+0.11542147033108141j)),
+                          ((-0.014881287063154947-0.18928627620951555j), (-0.015185483586684478+0.8972647988323046j), (-0.4351552758945989-0.7299460860379636j), (-0.12326133732628419+0.012329124057677388j))), 
+                         (((0.10476345838581014-0.14636495344507483j), (-0.32803930125358216+0.27809153512314866j), (0.22528172636268207+0.3494691827944507j), (-0.5310240602410343+0.04119281216138804j)),
+                          ((-0.5533642323509493+0.2906558493993484j), (-0.33436396580317507+0.4888660226122262j), (-0.4290629671820184+0.09348041559022413j), (-0.1635189281331263+0.08219415853032563j)),
+                          ((-0.48564277336559514-0.39389189119028456j), (-0.07859439546331881-0.5417512106196164j), (-0.2634745687747664+0.6393823484701674j), (-0.4717227533107514+0.7886365869114986j)),
+                          ((0.1574555874287038-0.15735823857163656j), (-0.3407071004516933-0.00848408628817443j), (0.111461150743281-0.4496138761616306j), (-0.08146922125654954+0.5259628325969007j))), 
+                         (((0.34656176542518824+0.07880355128877725j), (-0.258503112094004+0.23322070678863926j), (-0.6883175179734812+0.06684313489266447j), (-0.04692875801791596+0.7384728581195434j)),
+                          ((-0.3413224116842536-0.07621317699837815j), (0.23082091132507632-0.7397247652890888j), (-0.7325151537847703-0.2399819049396238j), (-0.13092551439092603-0.2541771655857984j)),
+                          ((-0.6621690601235584-0.3959496844857878j), (-0.18349053313548802-0.8753348282719295j), (-0.03908532595157577+0.35883701301557147j), (-0.051099789459096545+0.22309220396282636j)), 
+                          ((0.255858259117678+0.5962976405338435j), (-0.4167005907396837-0.7228120687439701j), (-0.4251792094268322-0.5598290555324366j), (-0.02547169493326129-0.10035815157656547j)))))          
+        else:
+            if rank==0:
+                return (0.16343477325759478,)
+            elif rank==1:
+                if no_first_arg_negative:
+                    return (0.414447461350212, 0.5940893953018536)
+                else:
+                    return (-0.414447461350212, 0.5940893953018536)
+            elif rank==2:
+                if no_first_arg_negative:
+                    return ((0.18517072101415805, 0.20812345616476052), 
+                        (0.5546197008728526, 0.5564107547626429))
+                else:
+                    return ((-0.18517072101415805, 0.20812345616476052), 
+                        (-0.5546197008728526, -0.5564107547626429))
+            elif rank==3:
+                if no_first_arg_negative:
+                    return (((0.39959975888207894, 0.6577401243413907, 0.4280968882108843),
+                        (0.22892610169500252, 0.29400534047234894, 0.3596253597614875),
+                        (0.352145347223075, 0.22330947752937103, 0.6040999239623353)),
+                        ((0.5820901702251168, 0.5118427342586129, 0.784142756428528),
+                        (0.32306580123331297, 0.5718638969764223, 0.35139290436334764),
+                        (0.38744644765122205, 0.6230529976422874, 0.4451744915244834)),
+                        ((0.1680467743981198, 0.8270861936315199, 0.2604978984507546),
+                        (0.3179202431655108, 0.592515989853744, 0.37531069237770537),
+                        (0.5594567456296533, 0.5354189906699913, 0.6879940596903789)))
+                else:
+                    return (((0.39959975888207894, -0.6577401243413907, 0.4280968882108843),
+                        (0.22892610169500252, -0.29400534047234894, -0.3596253597614875),
+                        (-0.352145347223075, -0.22330947752937103, 0.6040999239623353)),
+                        ((0.5820901702251168, 0.5118427342586129, -0.784142756428528),
+                        (0.32306580123331297, 0.5718638969764223, 0.35139290436334764),
+                        (-0.38744644765122205, 0.6230529976422874, -0.4451744915244834)),
+                        ((-0.1680467743981198, 0.8270861936315199, 0.2604978984507546),
+                        (-0.3179202431655108, 0.592515989853744, 0.37531069237770537),
+                        (-0.5594567456296533, -0.5354189906699913, -0.6879940596903789)))
+            elif rank==4:
+                if no_first_arg_negative:
+                    return ((((0.07653880859335448, 0.8506240072658446, 0.5669507117736834, 0.5069631117128448), 
+                        (0.7231092428343939, 0.18235569823019526, 0.46022740126490647, 0.8492333455592396), 
+                        (0.6170052818637486, 0.8808747630127647, 0.1563085221153727, 0.8244613246958687), 
+                        (0.4294616619386404, 0.12118821840316875, 0.7616687854731052, 0.6728140330125063)), 
+                        ((0.6436880168986288, 0.25021445743624676, 0.11998265803070028, 0.8312669978628259), 
+                        (0.6870391868795935, 0.41825547772474664, 0.601722908359805, 0.10996760961876721), 
+                        (0.30815741382372003, 0.8484037060918963, 0.6225223666523892, 0.25636768516056313), 
+                        (0.5403219505752949, 0.784036866371234, 0.11777309540223573, 0.4039156719922558)), 
+                        ((0.5543818190876664, 0.5654917578606441, 0.6110438985958697, 0.09343833716996176), 
+                        (0.663012375502168, 0.2314869852119426, 0.23762537471584116, 0.6933683606475624), 
+                        (0.29276295759188187, 0.714837865189284, 0.1872658031279304, 0.1702169706800615), 
+                        (0.4542436592804883, 0.07976845049430197, 0.08816046717012539, 0.462262050647425)), 
+                        ((0.506450528739594, 0.4062122557330939, 0.5462416476803083, 0.25191742530295563), 
+                        (0.3393578341507891, 0.2825671991633298, 0.13447310100386736, 0.5860351833019655), 
+                        (0.6612450693192753, 0.6774796280346236, 0.2676680871992434, 0.507190159923532), 
+                        (0.6953428609343382, 0.7171619543885263, 0.6260223993304953, 0.331615476564711))), 
+                        (((0.27573547448763347, 0.5077386283774998, 0.4453961872519076, 0.43130840985234026), 
+                        (0.580315177591782, 0.5652609083059623, 0.8511780780181941, 0.33371199932631807), 
+                        (0.699271673783864, 0.49366804495096395, 0.06797744724509305, 0.5353269755409358), 
+                        (0.6252936853093409, 0.8905733967820801, 0.3089031678403189, 0.5261014470187029)), 
+                        ((0.7404002858536928, 0.2048176759131214, 0.4980581903575471, 0.42894050825990854), 
+                        (0.45779709857247547, 0.7620468819613082, 0.6247644411339963, 0.6305323474999456), 
+                        (0.7909315252937255, 0.3012402477673979, 0.4525703288970107, 0.9352115724287626), 
+                        (0.31693114412209444, 0.37281844304816186, 0.7318694959034, 0.19786924305064665)), 
+                        ((0.3274437623324882, 0.33087589095095155, 0.8556630658488849, 0.524447118150698), 
+                        (0.41163320939179787, 0.9238459438767593, 0.21861731917563137, 0.4424459362963088), 
+                        (0.5776510801231114, 0.6065647351222803, 0.639307289457621, 0.7314330090773533), 
+                        (0.27421408841108247, 0.12621566941798637, 0.46606608860175, 0.08985539889445235)), 
+                        ((0.25771437676193215, 0.8671956551054035, 0.7024115898342955, 0.6180265239465382), 
+                        (0.3536132615270657, 0.4678494273732346, 0.5440963329219566, 0.5386557403677203), 
+                        (0.425277398166178, 0.5397867882224323, 0.21245876299659439, 0.8499599729452116), 
+                        (0.282819828736375, 0.616976644425216, 0.45750716248923645, 0.10388406898090359))), 
+                        (((0.480212232724941, 0.8937086550918505, 0.6399122280175192, 0.3926739182869949), 
+                        (0.5866305704975537, 0.37523483543667685, 0.34455787558391154, 0.7468191968550546), 
+                        (0.7561559742324413, 0.6618299652906166, 0.5497360987548463, 0.44000411823919794), 
+                        (0.5489342296514085, 0.33299878380451237, 0.6851907132585857, 0.8837744966993399)), 
+                        ((0.2449050432846066, 0.7225682113974873, 0.42149169327348723, 0.5241172273711572), 
+                        (0.7461632214743219, 0.3773660518547119, 0.5911139199924735, 0.12543356040664694), 
+                        (0.4374385476373295, 0.7523855940695361, 0.4381969239605094, 0.37308327852970813), 
+                        (0.21637181734766117, 0.49874174259134, 0.3912614640116107, 0.4526617072173223)), 
+                        ((0.7151470272616507, 0.43893562960939475, 0.4654984531602598, 0.026153794290457506), 
+                        (0.7899612010454996, 0.4349102788459652, 0.7453956466392258, 0.47431536809150776), 
+                        (0.42979681026390004, 0.571667413005515, 0.608322709782375, 0.4374481254420103), 
+                        (0.33514856567435775, 0.5877137248653976, 0.9386863487830309, 0.1386415730993477)), 
+                        ((0.35219579066973905, 0.6168773605138196, 0.40504448843510976, 0.424824210157774), 
+                        (0.7812627665326543, 0.19452639019667187, 0.6000050187112531, 0.7539670503073901), 
+                        (0.2981680001911141, 0.5123292320600974, 0.6035479676835969, 0.5180365031497639), 
+                        (0.4958302538856905, 0.5666881217462356, 0.3057862327558582, 0.16322148534649822))), 
+                        (((0.5219568172234907, 0.6691120408133714, 0.5415030041267854, 0.5178254487487362), 
+                        (0.550999473408774, 0.3224491374840088, 0.40632316238837907, 0.5316822545746088), 
+                        (0.15782246477014253, 0.39011414803016886, 0.5923055243411701, 0.33403984110147705), 
+                        (0.5476956624940421, 0.353567340179472, 0.7751336150761081, 0.3769351266082521)), 
+                        ((0.26092129669846587, 0.38531106190825626, 0.43089380185467957, 0.3517745063606868), 
+                        (0.6068795949566435, 0.7313287811237782, 0.7817415065395071, 0.539725422031037), 
+                        (0.4681995762086918, 0.8081081299514932, 0.45349678068383653, 0.1676286251112078), 
+                        (0.9418725604754995, 0.7388572732026134, 0.44262594936532146, 0.7474149440129483)), 
+                        ((0.8132968384251593, 0.5972218943821608, 0.5919410574164853, 0.35599895731169406), 
+                        (0.7520654612132684, 0.45483154483372135, 0.4059225646226807, 0.4001021311571795), 
+                        (0.241190931159322, 0.8294262552595144, 0.6807436275202874, 0.3970641092078186), 
+                        (0.41214139959674073, 0.49530207420971023, 0.2603640589059204, 0.5320822386899074)),
+                        ((0.4852677073030271, 0.5126350217914364, 0.5251827072400477, 0.4107256987588376), 
+                        (0.5923200155158566, 0.7301177285915048, 0.774241876159728, 0.6746581037497406), 
+                        (0.3573798122820507, 0.169636160666647, 0.5725299039287078, 0.23182444091612892), 
+                        (0.3601137116698788, 0.07438414986800912, 0.4165677125316061, 0.0790530879666291))))                    
+                else:
+                    return ((((0.07653880859335448, -0.8506240072658446, 0.5669507117736834, 0.5069631117128448), 
+                        (0.7231092428343939, -0.18235569823019526, 0.46022740126490647, 0.8492333455592396), 
+                        (0.6170052818637486, -0.8808747630127647, 0.1563085221153727, 0.8244613246958687), 
+                        (0.4294616619386404, -0.12118821840316875, 0.7616687854731052, 0.6728140330125063)), 
+                        ((0.6436880168986288, -0.25021445743624676, 0.11998265803070028, 0.8312669978628259), 
+                        (0.6870391868795935, -0.41825547772474664, 0.601722908359805, 0.10996760961876721), 
+                        (0.30815741382372003, -0.8484037060918963, 0.6225223666523892, 0.25636768516056313), 
+                        (-0.5403219505752949, 0.784036866371234, 0.11777309540223573, 0.4039156719922558)), 
+                        ((0.5543818190876664, 0.5654917578606441, 0.6110438985958697, 0.09343833716996176), 
+                        (0.663012375502168, 0.2314869852119426, 0.23762537471584116, 0.6933683606475624), 
+                        (-0.29276295759188187, 0.714837865189284, 0.1872658031279304, 0.1702169706800615), 
+                        (-0.4542436592804883, 0.07976845049430197, 0.08816046717012539, 0.462262050647425)), 
+                        ((0.506450528739594, 0.4062122557330939, 0.5462416476803083, 0.25191742530295563), 
+                        (0.3393578341507891, 0.2825671991633298, 0.13447310100386736, 0.5860351833019655), 
+                        (0.6612450693192753, 0.6774796280346236, 0.2676680871992434, 0.507190159923532), 
+                        (0.6953428609343382, 0.7171619543885263, 0.6260223993304953, 0.331615476564711))), 
+                        (((-0.27573547448763347, 0.5077386283774998, 0.4453961872519076, 0.43130840985234026), 
+                        (-0.580315177591782, 0.5652609083059623, 0.8511780780181941, 0.33371199932631807), 
+                        (0.699271673783864, 0.49366804495096395, 0.06797744724509305, 0.5353269755409358), 
+                        (-0.6252936853093409, 0.8905733967820801, 0.3089031678403189, 0.5261014470187029)), 
+                        ((-0.7404002858536928, 0.2048176759131214, 0.4980581903575471, 0.42894050825990854), 
+                        (0.45779709857247547, -0.7620468819613082, 0.6247644411339963, 0.6305323474999456), 
+                        (0.7909315252937255, -0.3012402477673979, 0.4525703288970107, 0.9352115724287626), 
+                        (0.31693114412209444, -0.37281844304816186, 0.7318694959034, 0.19786924305064665)), 
+                        ((0.3274437623324882, -0.33087589095095155, 0.8556630658488849, 0.524447118150698), 
+                        (0.41163320939179787, -0.9238459438767593, 0.21861731917563137, 0.4424459362963088), 
+                        (0.5776510801231114, 0.6065647351222803, -0.639307289457621, 0.7314330090773533), 
+                        (0.27421408841108247, 0.12621566941798637, -0.46606608860175, 0.08985539889445235)), 
+                        ((0.25771437676193215, 0.8671956551054035, -0.7024115898342955, 0.6180265239465382), 
+                        (0.3536132615270657, 0.4678494273732346, -0.5440963329219566, 0.5386557403677203), 
+                        (0.425277398166178, 0.5397867882224323, -0.21245876299659439, 0.8499599729452116), 
+                        (0.282819828736375, 0.616976644425216, 0.45750716248923645, 0.10388406898090359))), 
+                        (((0.480212232724941, -0.8937086550918505, -0.6399122280175192, -0.3926739182869949), 
+                        (0.5866305704975537, 0.37523483543667685, 0.34455787558391154, 0.7468191968550546), 
+                        (-0.7561559742324413, 0.6618299652906166, 0.5497360987548463, 0.44000411823919794), 
+                        (0.5489342296514085, 0.33299878380451237, -0.6851907132585857, -0.8837744966993399)), 
+                        ((0.2449050432846066, 0.7225682113974873, -0.42149169327348723, -0.5241172273711572), 
+                        (0.7461632214743219, 0.3773660518547119, 0.5911139199924735, 0.12543356040664694), 
+                        (-0.4374385476373295, -0.7523855940695361, 0.4381969239605094, 0.37308327852970813), 
+                        (-0.21637181734766117, 0.49874174259134, 0.3912614640116107, 0.4526617072173223)), 
+                        ((0.7151470272616507, 0.43893562960939475, 0.4654984531602598, 0.026153794290457506), 
+                        (0.7899612010454996, 0.4349102788459652, 0.7453956466392258, 0.47431536809150776), 
+                        (0.42979681026390004, -0.571667413005515, 0.608322709782375, 0.4374481254420103), 
+                        (0.33514856567435775, 0.5877137248653976, 0.9386863487830309, 0.1386415730993477)), 
+                        ((0.35219579066973905, -0.6168773605138196, 0.40504448843510976, 0.424824210157774), 
+                        (0.7812627665326543, 0.19452639019667187, 0.6000050187112531, 0.7539670503073901), 
+                        (0.2981680001911141, 0.5123292320600974, 0.6035479676835969, 0.5180365031497639), 
+                        (0.4958302538856905, -0.5666881217462356, 0.3057862327558582, 0.16322148534649822))), 
+                        (((0.5219568172234907, 0.6691120408133714, 0.5415030041267854, 0.5178254487487362), 
+                        (0.550999473408774, 0.3224491374840088, 0.40632316238837907, 0.5316822545746088), 
+                        (0.15782246477014253, -0.39011414803016886, 0.5923055243411701, 0.33403984110147705), 
+                        (0.5476956624940421, 0.353567340179472, 0.7751336150761081, 0.3769351266082521)), 
+                        ((0.26092129669846587, 0.38531106190825626, 0.43089380185467957, 0.3517745063606868), 
+                        (0.6068795949566435, -0.7313287811237782, 0.7817415065395071, 0.539725422031037), 
+                        (-0.4681995762086918, 0.8081081299514932, 0.45349678068383653, 0.1676286251112078), 
+                        (0.9418725604754995, 0.7388572732026134, 0.44262594936532146, 0.7474149440129483)), 
+                        ((0.8132968384251593, -0.5972218943821608, -0.5919410574164853, -0.35599895731169406), 
+                        (0.7520654612132684, 0.45483154483372135, 0.4059225646226807, 0.4001021311571795), 
+                        (0.241190931159322, 0.8294262552595144, 0.6807436275202874, -0.3970641092078186), 
+                        (0.41214139959674073, -0.49530207420971023, 0.2603640589059204, -0.5320822386899074)),
+                        ((0.4852677073030271, 0.5126350217914364, 0.5251827072400477, 0.4107256987588376), 
+                        (0.5923200155158566, -0.7301177285915048, -0.774241876159728, 0.6746581037497406), 
+                        (0.3573798122820507, 0.169636160666647, -0.5725299039287078, 0.23182444091612892), 
+                        (0.3601137116698788, -0.07438414986800912, -0.4165677125316061, 0.0790530879666291))))
+    
+    def get_python_input2(self, rank, cplx, no_zeros=False, no_first_arg_negative=False):
+        if not cplx:
+            if rank==0:
+                if no_first_arg_negative:
+                    return (-0.22889838791916658,)
+                else:
+                    return (-0.22889838791916658,)
+            elif rank==1:
+                if no_first_arg_negative:
+                    return (0.49012030903632825, 0.6031662135176437)
+                else:
+                    return (-0.49012030903632825, 0.6031662135176437)
+            elif rank==2:
+                if no_first_arg_negative:
+                    return ((0.6891705183553265, 0.7417620269931902), (0.5710307758197861, 0.39980890346586717))
+                else:
+                    return ((-0.6891705183553265, 0.7417620269931902), (-0.5710307758197861, 0.39980890346586717))
+            elif rank==3:
+                if no_first_arg_negative:
+                    return (((0.450166488818521, 0.40335229027346475, 0.34323251080578104), 
+                        (0.2842555722086943, 0.519038548037327, 0.22356691063536377),
+                        (0.6233434523085559, 0.6939552082789993, 0.20717775496120844)),
+                        ((0.6635014413084468, 0.12427061907674535, 0.4316471005230688), 
+                        (0.3462206066776269, 0.5812789855981269, 0.1513383660423066), 
+                        (0.40921125173698586, 0.6302181341512401, 0.4857376224901844)), 
+                        ((0.5156818720590722, 0.3810418328134193, 0.5228685660307542), 
+                        (0.44668606111653875, 0.8552520337523355, 0.30378907822454826), 
+                        (0.572442375071903, 0.13397389728880899, 0.221)))                    
+                elif no_zeros:
+                    return (((0.450166488818521, 0.40335229027346475, -0.34323251080578104), 
+                        (0.2842555722086943, 0.519038548037327, -0.22356691063536377),
+                        (0.6233434523085559, -0.6939552082789993, 0.20717775496120844)),
+                        ((0.6635014413084468, -0.12427061907674535, 0.4316471005230688), 
+                        (-0.3462206066776269, 0.5812789855981269, 0.1513383660423066), 
+                        (0.40921125173698586, -0.6302181341512401, 0.4857376224901844)), 
+                        ((-0.5156818720590722, 0.3810418328134193, 0.5228685660307542), 
+                        (0.44668606111653875, -0.8552520337523355, -0.30378907822454826), 
+                        (-0.572442375071903, 0.13397389728880899, 0.221)))
+                else:
+                    return (((0.450166488818521, 0.40335229027346475, -0.34323251080578104), 
+                        (0.2842555722086943, 0.519038548037327, -0.22356691063536377),
+                        (0.6233434523085559, -0.6939552082789993, 0.20717775496120844)),
+                        ((0.6635014413084468, -0.12427061907674535, 0.4316471005230688), 
+                        (-0.3462206066776269, 0.5812789855981269, 0.1513383660423066), 
+                        (0.40921125173698586, -0.6302181341512401, 0.4857376224901844)), 
+                        ((-0.5156818720590722, 0.3810418328134193, 0.5228685660307542), 
+                        (0.44668606111653875, -0.8552520337523355, -0.30378907822454826), 
+                        (-0.572442375071903, 0.13397389728880899, 0.)))
+            elif rank==4:
+                if no_first_arg_negative:
+                    return ((((0.45433363368861773, 0.6498884169562154, 0.8968304717142223, 0.8907734241559906), 
+                        (0.4777438965822781, 0.19219763395957137, 0.47760828704065156, 0.099611811950238), 
+                        (0.28320121503596124, 0.6794412465012807, 0.13188620716114968, 0.40410020187234463), 
+                        (0.170095604634749, 0.6491679236703396, 0.48405171480791914, 0.48480616171976565)), 
+                        ((0.40796761374598983, 0.5888935058511742, 0.810959910176321, 0.3519432924326292), 
+                        (0.6778803492879535, 0.15159482372964073, 0.7609511790213423, 0.4291829232233251), 
+                        (0.6597430856795399, 0.5416080050562327, 0.7316035149420569, 0.17492295472360206), 
+                        (0.3585956180854316, 0.4506986634961759, 0.3068624306617866, 0.6450035140643098)), 
+                        ((0.7690325599562085, 0.6582789850176016, 0.6556413596206179, 0.615423012961261), 
+                        (0.3947622967482572, 0.3604341682179244, 0.5689343825826134, 0.22003697279869047), 
+                        (0.6004909191668832, 0.48591852805780483, 0.6670811381503408, 0.33418084981888524), 
+                        (0.5696228030807892, 0.8349733556806979, 0.08716776292987743, 0.6103200906618154)), 
+                        ((0.32673151927490685, 0.3650741778596788, 0.4719563946069752, 0.2624495178810215), 
+                        (0.6911360309172416, 0.629718040535628, 0.37138298773280687, 0.7867876295855086), 
+                        (0.6768502043234856, 0.32903587935447837, 0.6229889864689531, 0.5226994780805113), 
+                        (0.6571446582814051, 0.30807025622961254, 0.3025565918384279, 0.5316791314282434))), 
+                        (((0.7110156690310308, 0.07897654694359649, 0.49671935812956247, 0.15989919493282642), 
+                        (0.4454758263127157, 0.8468596115253173, 0.4603369168686832, 0.7835562740584727), 
+                        (0.1973500874759318, 0.6890077016392274, 0.38353764662415646, 0.2602210860778308), 
+                        (0.3062963684983607, 0.5485723785169033, 0.7558085192193574, 0.7260373711224899)), 
+                        ((0.6292337309967168, 0.6298019421801468, 0.5769038995707547, 0.805909547222589), 
+                        (0.2956786092814956, 0.8516163380649984, 0.0433563110406362, 0.5562648421367056), 
+                        (0.44398600437607083, 0.3132864322653825, 0.1309184523859448, 0.09487956033144461), 
+                        (0.39347200269496224, 0.6744128343886427, 0.17787462973897294, 0.6844498649820736)), 
+                        ((0.4668129815805621, 0.46840442065095245, 0.6348701936076414, 0.534532796163385), 
+                        (0.5401302006866129, 0.42361490419012787, 0.3055178484323608, 0.4099049291060996), 
+                        (0.15643756091005653, 0.5538397868668722, 0.5793672234228313, 0.5343825930606839), 
+                        (0.567145595353928, 0.7936293829906991, 0.5159699957715731, 0.11524767048966807)), 
+                        ((0.46983068856527466, 0.829272105469925, 0.8242448082292821, 0.3155783126108229), 
+                        (0.46679344399363587, 0.35498575768428703, 0.8195558132407107, 0.044710380043836144), 
+                        (0.7228682303918399, 0.5956512578344273, 0.5842273233950968, 0.46445592272801267), 
+                        (0.48424480615111076, 0.43589572454719294, 0.2739525289177576, 0.5141521147948742))), 
+                        (((0.5353156164778932, 0.827716346014944, 0.2661170502005538, 0.6240217001592496), 
+                        (0.5889586875315378, 0.6056309378106368, 0.38460210470822326, 0.3257073061066195), 
+                        (0.38605597818925463, 0.5566287156895975, 0.8868213070850919, 0.10818212758613992), 
+                        (0.44934219884516874, 0.7722925534790802, 0.6824771465971564, 0.4861304182325704)), 
+                        ((0.35670465647772914, 0.40563319853724733, 0.9215374519881303, 0.3261075398074149), 
+                        (0.5466590188369063, 0.8063505325979616, 0.2505468000914572, 0.27573025774136484), 
+                        (0.743952777599612, 0.5916038948220598, 0.5814331576314142, 0.25330559867360414), 
+                        (0.9281192928557953, 0.5526121099889816, 0.7663168620517609, 0.27644519542436335)), 
+                        ((0.4312170339514421, 0.39670998093753257, 0.6147975692316388, 0.49353631380425866), 
+                        (0.2914782490250003, 0.34495461015075896, 0.724277583477783, 0.7656114513280461), 
+                        (0.2967100926835535, 0.3708225100005513, 0.4557999563503535, 0.21401134707432434), 
+                        (0.33196574382892885, 0.6509108525238382, 0.44580359408187276, 0.6130947882235365)), 
+                        ((0.11173436827791464, 0.6700051363761477, 0.12807937551069665, 0.7174522662954508), 
+                        (0.40082249771839484, 0.6435832868289147, 0.47429720113534696, 0.44533186804848607), 
+                        (0.4625441865293232, 0.24229257632548656, 0.655276132353378, 0.27883861657454045), 
+                        (0.638496711915504, 0.5391658143407168, 0.6794910638048037, 0.18819631783938193))), 
+                        (((0.49500523167298044, 0.7621808699493068, 0.8002303121407335, 0.4339016426795843), 
+                        (0.6899502135654372, 0.9438297115207196, 0.39545080237118185, 0.43835240439976453), 
+                        (0.5324364296711654, 0.7403526206887153, 0.421079060947922, 0.28183735731097076), 
+                        (0.7641745784203584, 0.8052630361187237, 0.4113425938410049, 0.4873541423815537)), 
+                        ((0.4763043550807671, 0.8818320340667569, 0.4376950912132615, 0.5155236207246434), 
+                        (0.4770314956120568, 0.6995239422377975, 0.29342906280323733, 0.2207382366023154), 
+                        (0.47119152389910457, 0.5643383062697325, 0.19014363807175272, 0.47728067160438753), 
+                        (0.293549802812087, 0.3091310044125135, 0.8079461149429534, 0.30540675213143226)), 
+                        ((0.6562012019806969, 0.5762140611417803, 0.8922117406714833, 0.5644163171621817), 
+                        (0.28018207838767606, 0.6980601983118322, 0.9321643060248082, 0.6857895197253853), 
+                        (0.30248864387340907, 0.37739756004900193, 0.5011312641768506, 0.19190880686969636), 
+                        (0.36857760657786354, 0.6980580453947155, 0.4162678161352499, 0.6651932863378893)), 
+                        ((0.2969663268640197, 0.5012850908098417, 0.5630486821046159, 0.5994825528795871), 
+                        (0.45367000863631446, 0.24430658191105983, 0.277060548382701, 0.5169546884489187), 
+                        (0.9278462241176814, 0.5112886572173754, 0.3908093365092602, 0.7815138913982161), 
+                        (0.32136995201761503, 0.2619940057725135, 0.35043110649096515, 0.9241246395431221))))                    
+                else:
+                    return ((((0.45433363368861773, 0.6498884169562154, 0.8968304717142223, 0.8907734241559906), 
+                        (0.4777438965822781, 0.19219763395957137, 0.47760828704065156, 0.099611811950238), 
+                        (0.28320121503596124, 0.6794412465012807, 0.13188620716114968, 0.40410020187234463), 
+                        (0.170095604634749, 0.6491679236703396, 0.48405171480791914, -0.48480616171976565)), 
+                        ((0.40796761374598983, 0.5888935058511742, 0.810959910176321, -0.3519432924326292), 
+                        (0.6778803492879535, 0.15159482372964073, 0.7609511790213423, -0.4291829232233251), 
+                        (-0.6597430856795399, 0.5416080050562327, -0.7316035149420569, 0.17492295472360206), 
+                        (0.3585956180854316, 0.4506986634961759, -0.3068624306617866, 0.6450035140643098)), 
+                        ((0.7690325599562085, 0.6582789850176016, -0.6556413596206179, 0.615423012961261), 
+                        (0.3947622967482572, 0.3604341682179244, -0.5689343825826134, -0.22003697279869047), 
+                        (-0.6004909191668832, 0.48591852805780483, 0.6670811381503408, -0.33418084981888524), 
+                        (-0.5696228030807892, 0.8349733556806979, 0.08716776292987743, -0.6103200906618154)), 
+                        ((0.32673151927490685, 0.3650741778596788, 0.4719563946069752, -0.2624495178810215), 
+                        (-0.6911360309172416, 0.629718040535628, 0.37138298773280687, 0.7867876295855086), 
+                        (-0.6768502043234856, 0.32903587935447837, 0.6229889864689531, 0.5226994780805113), 
+                        (-0.6571446582814051, 0.30807025622961254, 0.3025565918384279, 0.5316791314282434))), 
+                        (((0.7110156690310308, 0.07897654694359649, 0.49671935812956247, 0.15989919493282642), 
+                        (0.4454758263127157, -0.8468596115253173, -0.4603369168686832, 0.7835562740584727), 
+                        (0.1973500874759318, -0.6890077016392274, -0.38353764662415646, 0.2602210860778308), 
+                        (0.3062963684983607, -0.5485723785169033, -0.7558085192193574, 0.7260373711224899)), 
+                        ((0.6292337309967168, -0.6298019421801468, 0.5769038995707547, 0.805909547222589), 
+                        (0.2956786092814956, -0.8516163380649984, 0.0433563110406362, 0.5562648421367056), 
+                        (-0.44398600437607083, -0.3132864322653825, 0.1309184523859448, 0.09487956033144461), 
+                        (-0.39347200269496224, 0.6744128343886427, -0.17787462973897294, 0.6844498649820736)), 
+                        ((-0.4668129815805621, 0.46840442065095245, -0.6348701936076414, 0.534532796163385), 
+                        (0.5401302006866129, 0.42361490419012787, 0.3055178484323608, 0.4099049291060996), 
+                        (0.15643756091005653, 0.5538397868668722, 0.5793672234228313, 0.5343825930606839), 
+                        (0.567145595353928, 0.7936293829906991, 0.5159699957715731, -0.11524767048966807)), 
+                        ((0.46983068856527466, 0.829272105469925, 0.8242448082292821, 0.3155783126108229), 
+                        (0.46679344399363587, -0.35498575768428703, 0.8195558132407107, 0.044710380043836144), 
+                        (0.7228682303918399, 0.5956512578344273, 0.5842273233950968, -0.46445592272801267), 
+                        (0.48424480615111076, -0.43589572454719294, 0.2739525289177576, 0.5141521147948742))), 
+                        (((0.5353156164778932, -0.827716346014944, 0.2661170502005538, 0.6240217001592496), 
+                        (0.5889586875315378, -0.6056309378106368, 0.38460210470822326, 0.3257073061066195), 
+                        (0.38605597818925463, 0.5566287156895975, 0.8868213070850919, -0.10818212758613992), 
+                        (0.44934219884516874, 0.7722925534790802, 0.6824771465971564, -0.4861304182325704)), 
+                        ((0.35670465647772914, 0.40563319853724733, 0.9215374519881303, 0.3261075398074149), 
+                        (0.5466590188369063, 0.8063505325979616, 0.2505468000914572, -0.27573025774136484), 
+                        (0.743952777599612, -0.5916038948220598, 0.5814331576314142, -0.25330559867360414), 
+                        (-0.9281192928557953, -0.5526121099889816, 0.7663168620517609, 0.27644519542436335)), 
+                        ((0.4312170339514421, 0.39670998093753257, 0.6147975692316388, 0.49353631380425866), 
+                        (0.2914782490250003, 0.34495461015075896, 0.724277583477783, 0.7656114513280461), 
+                        (0.2967100926835535, -0.3708225100005513, 0.4557999563503535, 0.21401134707432434), 
+                        (-0.33196574382892885, 0.6509108525238382, 0.44580359408187276, 0.6130947882235365)), 
+                        ((0.11173436827791464, 0.6700051363761477, 0.12807937551069665, 0.7174522662954508), 
+                        (0.40082249771839484, -0.6435832868289147, 0.47429720113534696, 0.44533186804848607), 
+                        (0.4625441865293232, 0.24229257632548656, 0.655276132353378, 0.27883861657454045), 
+                        (0.638496711915504, 0.5391658143407168, 0.6794910638048037, 0.18819631783938193))), 
+                        (((0.49500523167298044, -0.7621808699493068, 0.8002303121407335, 0.4339016426795843), 
+                        (0.6899502135654372, 0.9438297115207196, 0.39545080237118185, 0.43835240439976453), 
+                        (-0.5324364296711654, -0.7403526206887153, 0.421079060947922, 0.28183735731097076), 
+                        (0.7641745784203584, -0.8052630361187237, 0.4113425938410049, 0.4873541423815537)), 
+                        ((0.4763043550807671, 0.8818320340667569, 0.4376950912132615, 0.5155236207246434), 
+                        (0.4770314956120568, 0.6995239422377975, 0.29342906280323733, 0.2207382366023154), 
+                        (0.47119152389910457, 0.5643383062697325, 0.19014363807175272, 0.47728067160438753), 
+                        (0.293549802812087, 0.3091310044125135, 0.8079461149429534, 0.30540675213143226)), 
+                        ((-0.6562012019806969, -0.5762140611417803, -0.8922117406714833, -0.5644163171621817), 
+                        (0.28018207838767606, -0.6980601983118322, 0.9321643060248082, -0.6857895197253853), 
+                        (0.30248864387340907, 0.37739756004900193, -0.5011312641768506, 0.19190880686969636), 
+                        (-0.36857760657786354, 0.6980580453947155, -0.4162678161352499, 0.6651932863378893)), 
+                        ((-0.2969663268640197, 0.5012850908098417, -0.5630486821046159, 0.5994825528795871), 
+                        (-0.45367000863631446, 0.24430658191105983, -0.277060548382701, 0.5169546884489187), 
+                        (-0.9278462241176814, 0.5112886572173754, -0.3908093365092602, 0.7815138913982161), 
+                        (-0.32136995201761503, 0.2619940057725135, -0.35043110649096515, 0.9241246395431221))))
+        else:
+            if rank==0:
+                return (0.22889838791916658j,)
+            elif rank==1:
+                return (-0.49012030903632825, 0.6031662135176437j)
+            elif rank==2:
+                return ((0.6891705183553265, 0.7417620269931902j), (0.5710307758197861j, 0.39980890346586717))
+            elif rank==3:
+                return ((((0.07547574295591059+0.525876939609691j), (0.6637422951496057+0.7388772645580287j), (-0.11575430357267835+0.3396973817710597j)), 
+                         ((0.489975174033296-0.7778617185395662j), (-0.8582089062218037+0.7890680975791542j), (-0.34130307486775563+0.3651975276800719j)),
+                         ((0.6269390600608432+0.28192633671923134j), (0.6386868409229303+0.8545339974263741j), (0.8227777914187108+0.9768191533988598j))),
+                        (((0.3925840042771697+0.8092934421771397j), (0.27266165100309064+0.32623317563034737j), (-0.8740927141261398-0.4161371090973831j)),
+                         ((0.6702575659927514-0.450686130655044j), (0.474828305773418+0.7656845168857629j), (0.15253090291865834+0.46008109446176876j)),
+                         ((0.6094857432227104+0.5897008435426775j), (0.5134349957841884+0.09305616116877985j), (0.7954114232091216-0.4633804802000654j))),
+                        (((-0.29941397426915045-0.666629677984151j), (0.41045211458021535+0.6422008897066637j), (0.7608807908849147-0.2263883386308603j)),
+                         ((0.21016378700056504+0.8009138519791235j), (0.10548646537128033+0.43289764157877525j), (0.4083797466047874+0.9040107808706966j)),
+                         ((-0.8930070536981469+0.4674003925883036j), (-0.7258863558039299-0.38206684572695093j), (0.40771065599848233+0.14217138669583038j))))
+
+            elif rank==4:
+                if no_zeros:
+                    return (((((-0.38981592692954015-0.2856117645961309j), (-0.035094151427129905-0.265178716783423j), (-0.34532231395177504+0.36673987839501265j), (0.2041672227930209-0.6128500993893164j)),
+                          ((-0.12421070955162938+0.026349493748204833j), (-0.3415725798389704-0.0775430038163134j), (0.17048268853378434-0.08862480715498033j), (-0.1106967683514759-0.10379778205326462j)),
+                          ((0.7298716846009465+0.20776829436005195j), (-0.33435577984609854+0.039072521387463754j), (-0.05886662990481739-0.05072122421891534j), (0.18354830862254912+0.4606377888934907j)),
+                          ((-0.0767806399525307-0.8221389203690308j), (0.190835818629008+0.16192941104126957j), (0.17778866234180712+0.2584570168682756j), (0.07671782176673747-0.8469237188822869j))),
+                         (((-0.35597391704713033+0.25043169560436107j), (0.41228040156904044-0.3258644927079958j), (0.3255845547364652-0.04129891413069664j), (-0.49623171650577047-0.28943245984704047j)),
+                          ((-0.29908631455896795+0.32223868604261874j), (0.22549183711675158-0.07473853585711632j), (0.8473949873724411-0.1266457939975455j), (-0.28218966494496867-0.7447571699002506j)),
+                          ((0.43626155573856107-0.22452973659230602j), (-0.13852005024639502-0.2549763508471894j), (0.40223991129540115+0.6286067642439117j), (0.05222020648272985+0.36124142226658207j)),
+                          ((-0.5521041254588972+0.04526366394953618j), (0.028005364473586924+0.664136776905772j), (0.19982797953123066+0.6970088780138949j), (-0.27592458615859916+0.05358189338835073j))),
+                         (((-0.01401304893255595-0.2592802467152746j), (0.38457288044239724+0.022898781579736238j), (0.11747849077927963+0.02982853498608895j), (0.43510885272308897-0.5971898990476139j)),
+                          ((-0.1386049812442307+0.48221564332109246j), (0.12985640511010177-0.46733815759024744j), (0.36035270943159226+0.030123486580092673j), (0.13433570628907954-0.3548300324692315j)),
+                          ((0.3630171981969085-0.10489930496648125j), (-0.19285139550925268-0.22152540990095826j), (0.067448080460355-0.22485851852233463j), (-0.22642725802173436-0.8030852201557207j)),
+                          ((-0.4923572157490467+0.6941947968511506j), (-0.3083492643827028-0.21029535607801164j), (0.04516826032767807+0.16347006444443446j), (-0.4979722425636467+0.2600475135508704j))),
+                         (((-0.9146464795838944-0.4811995164563062j), (0.12372743851535117-0.19857635465689238j), (-0.32654984398293085+0.1399970385669752j), (0.5030023710839411-0.15390603274578885j)),
+                          ((0.12140042439229626-0.1677658216785154j), (0.15883782681413416+0.33379103634910656j), (0.185779713490287-0.3870952578769751j), (-0.06711575082420218+0.06791735335184867j)),
+                          ((-0.39839017930339415-0.5701893857302205j), (0.517636015942468+0.2847028688489578j), (0.3792093531943226+0.6747299891837335j), (0.3790566911887919-0.5890859768662702j)),
+                          ((0.10419770368967918-0.5497491933319889j), (0.037156668670760284-0.08813180251072528j), (0.3918645219248724+0.294242167456119j), (0.46981783997943394-0.1336764441655952j)))),
+                        ((((0.033498149202913496+0.5105612554548389j), (-0.00671182242426005-0.34435078880309433j), (-0.0373284784284601-0.5412680712938157j), (-0.21266128835217923+0.7435692921379757j)),
+                          ((-0.6338796544785741-0.1519302355817751j), (0.19056981672575435-0.2151423521624617j), (-0.2906156104811447-0.06976477293942895j), (0.11015974132120787+0.034078789456797876j)),
+                          ((-0.802973040360448+0.25982604363200634j), (0.4470120196869066+0.1070242653063358j), (-0.17139489854864864+0.280001955020894j), (0.481238612220953-0.1754485899809457j)),
+                          ((-0.2395451407327337+0.17708193346527168j), (-0.5161417899394428-0.1119365768848799j), (0.48501626047241986+0.14129638224677343j), (-0.8906342486796647+0.5959903703773012j))),
+                         (((0.4573784894991153+0.5594852951634348j), (0.5713680069309577-0.5494425630562785j), (0.08288855869575895-0.46808758933789407j), (0.0881202973963836+0.030710301266941187j)),
+                          ((-0.06642229051907478-0.22323447873665903j), (-0.7628208743574287-0.6371785162956514j), (-0.2246568157836294+0.3567254755305702j), (0.68327814761898-0.27973991174997725j)),
+                          ((0.2784159984258674-0.17498289569648884j), (0.004730953615886158+0.07715287138774296j), (0.0773670863004613-0.6360012413426752j), (-0.0647551047878423+0.6906328131396173j)),
+                          ((0.558480058973719-0.04481293285577537j), (0.09684530531415203-0.40763537195877164j), (-0.3913240230298858-0.004438441098584933j), (0.031510290166036015-0.30876711061254836j))),
+                         (((-0.588734853251181+0.36452828173265184j), (-0.19810928581934018+0.20823750547135322j), (-0.45274761144312026-0.17983105119023213j), (-0.11229734410645587+0.2560770621269597j)),
+                          ((-0.4038055786345742+0.7025954299708754j), (0.6537842056064525-0.34973368012330475j), (0.35464537317028266-0.21682856487173952j), (-0.01815814374546676+0.4718839114346507j)),
+                          ((-0.36336965745600625+0.3759504695343794j), (0.2248053726148399+0.22029644112859348j), (-0.09064428722611384-0.08254509314972736j), (0.12418920854260185-0.5471431985662905j)),
+                          ((-0.5200354642412095+0.5425236434272582j), (0.4144201383368241-0.03221161184797661j), (0.10973679214385457+0.2887677216157485j), (0.8119344460935665-0.3782880124387231j))),
+                         (((0.5132990185785542+0.1269895435922086j), (-0.8779926345719881-0.5240101078639017j), (-0.1083296281261924-0.8147529275948924j), (0.09647199912137994+0.6723852222785147j)),
+                          ((0.2928885382594636-0.17353985395496885j), (-0.21364153320667634-0.03557466867344006j), (0.09421518259275086+0.6153556681629657j), (0.42459824192798623-0.17443990666881448j)),
+                          ((-0.5143367641601848-0.474941950841561j), (-0.2759320986482162-0.8250929199965524j), (0.21922685784092444-0.5600860240181191j), (-0.8569179028983865-0.16482185283148332j)),
+                          ((0.5268959167118139+0.55401274233894j), (0.08678495563788746-0.11915652486681427j), (-0.35416282616502737-0.4847172453257278j), (0.17111904837721448-0.8480796973331977j)))),
+                        ((((0.5469697524334143+0.02787502521930041j), (0.2605342686105838-0.0738711527960102j), (-0.39955538445037275-0.37613379994879603j), (-0.013180544897028024-0.5858094274207383j)),
+                          ((0.2506641890300212-0.1324021828426094j), (0.2972858012659867+0.21562443620437732j), (-0.6161716236733459-0.16509522040718683j), (-0.18102929570881354-0.6067237673008904j)), 
+                          ((-0.13192637373724614-0.6510388019746922j), (-0.5546497186031663+0.15957406458683243j), (0.3605761118213213+0.25686768414528705j), (0.401508970393731-0.5108236410388888j)), 
+                          ((0.39953367426110775+0.2252371577830028j), (-0.3347746193719203+0.2263747029817541j), (0.43746847580536263+0.5388066331831217j), (-0.07344964656116226+0.5473468419762271j))), 
+                        (((-0.6996969040609468+0.7213293709800207j), (-0.37557411707556654+0.1506412600826108j), (0.46608440397755446+0.013185375483020345j), (0.29865953531762246+0.19232124238469206j)), 
+                         ((-0.06222220564236847+0.5694069457780013j), (-0.5368962596793275+0.36703072903452505j), (-0.05182804478010006+0.3840540087750902j), (0.16375632553791997-0.4661212952339301j)), 
+                         ((-0.4041070739038938-0.04037225736899819j), (0.24215413306521716-0.06631187616668377j), (-0.2663745437846935+0.611183098942953j), (0.337942638568164-0.5670011153091816j)), 
+                         ((0.3876032723274968-0.08306424304240201j), (0.2173881180889634+0.4512865759999062j), (0.8795902664110721+0.8614312675002035j), (0.2870339354260544-0.11303384551216167j))), 
+                        (((-0.1319661103321904-0.1378309763195904j), (-0.03263197183994404+0.03651637220786119j), (-0.33530432503994767-0.007463082947573474j), (-0.3110039705203388+0.17231544573803292j)), 
+                         ((-0.07377573914613977+0.3678250464292866j), (0.3280327212275782-0.08984395132040435j), (-0.4492548090143319-0.3165726498892033j), (0.4186631970202508+0.14692250754002467j)), 
+                         ((0.12300006190073354+0.8465896476419659j), (-0.3266430699658883+0.9258477806121458j), (0.1270817126276501+0.7278063130820139j), (0.04390487289582379-0.07072636756748818j)), 
+                         ((0.8411822363338441+0.3271788959517308j), (0.14233232632431592-0.8034008469283107j), (-0.012057809815140041-0.07447549854466373j), (-0.5078787065469428-0.3322994351304549j))), 
+                        (((0.2823845584710901+0.3169641678915194j), (-0.14926005618963878-0.06141784434383113j), (-0.3336711008317823+0.608644554614276j), (0.042858723261329-0.25353753207960283j)), 
+                         ((-0.19596385250682435+0.29611929225848677j), (0.9379729841249024-0.5720585057483617j), (0.20515378855823352-0.5330821799545553j), (-0.45689594348515183-0.5221745972924456j)), 
+                         ((0.005913178294852495-0.04464774171993757j), (-0.3515104653551274-0.8716563770921714j), (-0.5644652537988155+0.4413367915251234j), (-0.32684204426160013-0.6404138884316928j)), 
+                         ((-0.20862357692064337-0.008586491450952471j), (0.7110044208850719-0.0260275339943824j), (0.33195949443404427-0.060726068233408204j), (-0.24054180926541135-0.22750131116864736j)))), 
+                       ((((-0.19779207637655705-0.06170675636552225j), (0.24801124896429994+0.52301594517833j), (0.3359762170142643+0.006887001901350498j), (-0.5044830473838094-0.023633199563395157j)), 
+                         ((0.35936388285588383-0.12044000986333014j), (0.06567318357927132+0.23081033720558908j), (-0.006063340342035706-0.43355358359223595j), (0.560747142959132-0.019735739750161296j)), 
+                         ((0.16778778206380363+0.4393001381475511j), (-0.19115676223578515+0.023171844709636735j), (-0.10056678281864495+0.11175155826135519j), (-0.24878623491611496+0.8172452900981119j)), 
+                         ((-0.4955653304024539-0.35864956392371916j), (-0.002728871185003978+0.3416061368260671j), (0.12387109110953831-0.2654493686440327j), (0.10889405520664741+0.1218720709206873j))), 
+                        (((0.07498012788575437+0.251986782960711j), (0.3511927502553568+0.27907917288389616j), (-0.6319086362942079-0.11628342415274562j), (-0.02365411536311457+0.7887319952841338j)), 
+                         ((0.38406832355686993+0.03416295519609358j), (0.35717793709754475+0.7751423080742306j), (0.29135030536626805+0.15668909755462013j), (0.14503883313378096-0.030524299930524523j)), 
+                         ((0.3331132451297607-0.03848385697279688j), (0.0750244753960323+0.10077551583585709j), (-0.15490975501427928-0.1798249796504282j), (0.9066796997830194-0.6602275207883976j)), 
+                         ((0.1471293723064081+0.10463425812772786j), (-0.5961028228889094+0.5480663905625878j), (0.0026089287349913004-0.5747699075005761j), (0.2899525342736272+0.1268195775198908j))), 
+                        (((-0.13364076045805806-0.17688339222579297j), (0.6013848685157083+0.3493674941578545j), (0.22523028276047052-0.21939576800830496j), (0.09111222639027305+0.7894981102504295j)), 
+                         ((0.6016850426953799+0.043886903791527376j), (-0.5060405108831854-0.5381151561460222j), (-0.4760569419146623+0.40666832623996363j), (-0.5318516495722876+0.16837803612551516j)), 
+                         ((0.024034551466941778-0.2166311876229967j), (0.26494031063742085-0.002375780112287895j), (-0.4730046544996984+0.6644551176991773j), (-0.39157195926624855+0.6199256868216445j)), 
+                         ((-0.04324867778353203-0.08087976286625231j), (0.1578599942534593-0.5156287674297576j), (-0.15005517462767193-0.09424179596026594j), (-0.13944975064956378-0.17543248499412656j))), 
+                        (((-0.5648616238096438+0.46394478768979586j), (-0.41003938415951235-0.33614785565882677j), (-0.3893130130095368+0.05645367151196268j), (0.3821121473593535+0.17991382827274327j)), 
+                         ((-0.5139083991747512+0.789121431720947j), (-0.6171117805874629+0.3660741433822048j), (0.05303400234375011+0.5094418060177022j), (-0.3545806168076585+0.4629656377266379j)), 
+                         ((0.2658032276104465+0.4237937984173149j), (0.18183157447480658+0.06623748664233398j), (0.12546831548404336-0.10575754034359075j), (-0.6833387940577664+0.23947306785979094j)), 
+                         ((-0.20503554348285624+0.21628529049971312j), (0.23649982943904524-0.6159980174662008j), (-0.20651357702330975+0.08458167450189069j), (0.5j)))))                    
+                else:
+                    return (((((-0.38981592692954015-0.2856117645961309j), (-0.035094151427129905-0.265178716783423j), (-0.34532231395177504+0.36673987839501265j), (0.2041672227930209-0.6128500993893164j)),
+                          ((-0.12421070955162938+0.026349493748204833j), (-0.3415725798389704-0.0775430038163134j), (0.17048268853378434-0.08862480715498033j), (-0.1106967683514759-0.10379778205326462j)),
+                          ((0.7298716846009465+0.20776829436005195j), (-0.33435577984609854+0.039072521387463754j), (-0.05886662990481739-0.05072122421891534j), (0.18354830862254912+0.4606377888934907j)),
+                          ((-0.0767806399525307-0.8221389203690308j), (0.190835818629008+0.16192941104126957j), (0.17778866234180712+0.2584570168682756j), (0.07671782176673747-0.8469237188822869j))),
+                         (((-0.35597391704713033+0.25043169560436107j), (0.41228040156904044-0.3258644927079958j), (0.3255845547364652-0.04129891413069664j), (-0.49623171650577047-0.28943245984704047j)),
+                          ((-0.29908631455896795+0.32223868604261874j), (0.22549183711675158-0.07473853585711632j), (0.8473949873724411-0.1266457939975455j), (-0.28218966494496867-0.7447571699002506j)),
+                          ((0.43626155573856107-0.22452973659230602j), (-0.13852005024639502-0.2549763508471894j), (0.40223991129540115+0.6286067642439117j), (0.05222020648272985+0.36124142226658207j)),
+                          ((-0.5521041254588972+0.04526366394953618j), (0.028005364473586924+0.664136776905772j), (0.19982797953123066+0.6970088780138949j), (-0.27592458615859916+0.05358189338835073j))),
+                         (((-0.01401304893255595-0.2592802467152746j), (0.38457288044239724+0.022898781579736238j), (0.11747849077927963+0.02982853498608895j), (0.43510885272308897-0.5971898990476139j)),
+                          ((-0.1386049812442307+0.48221564332109246j), (0.12985640511010177-0.46733815759024744j), (0.36035270943159226+0.030123486580092673j), (0.13433570628907954-0.3548300324692315j)),
+                          ((0.3630171981969085-0.10489930496648125j), (-0.19285139550925268-0.22152540990095826j), (0.067448080460355-0.22485851852233463j), (-0.22642725802173436-0.8030852201557207j)),
+                          ((-0.4923572157490467+0.6941947968511506j), (-0.3083492643827028-0.21029535607801164j), (0.04516826032767807+0.16347006444443446j), (-0.4979722425636467+0.2600475135508704j))),
+                         (((-0.9146464795838944-0.4811995164563062j), (0.12372743851535117-0.19857635465689238j), (-0.32654984398293085+0.1399970385669752j), (0.5030023710839411-0.15390603274578885j)),
+                          ((0.12140042439229626-0.1677658216785154j), (0.15883782681413416+0.33379103634910656j), (0.185779713490287-0.3870952578769751j), (-0.06711575082420218+0.06791735335184867j)),
+                          ((-0.39839017930339415-0.5701893857302205j), (0.517636015942468+0.2847028688489578j), (0.3792093531943226+0.6747299891837335j), (0.3790566911887919-0.5890859768662702j)),
+                          ((0.10419770368967918-0.5497491933319889j), (0.037156668670760284-0.08813180251072528j), (0.3918645219248724+0.294242167456119j), (0.46981783997943394-0.1336764441655952j)))),
+                        ((((0.033498149202913496+0.5105612554548389j), (-0.00671182242426005-0.34435078880309433j), (-0.0373284784284601-0.5412680712938157j), (-0.21266128835217923+0.7435692921379757j)),
+                          ((-0.6338796544785741-0.1519302355817751j), (0.19056981672575435-0.2151423521624617j), (-0.2906156104811447-0.06976477293942895j), (0.11015974132120787+0.034078789456797876j)),
+                          ((-0.802973040360448+0.25982604363200634j), (0.4470120196869066+0.1070242653063358j), (-0.17139489854864864+0.280001955020894j), (0.481238612220953-0.1754485899809457j)),
+                          ((-0.2395451407327337+0.17708193346527168j), (-0.5161417899394428-0.1119365768848799j), (0.48501626047241986+0.14129638224677343j), (-0.8906342486796647+0.5959903703773012j))),
+                         (((0.4573784894991153+0.5594852951634348j), (0.5713680069309577-0.5494425630562785j), (0.08288855869575895-0.46808758933789407j), (0.0881202973963836+0.030710301266941187j)),
+                          ((-0.06642229051907478-0.22323447873665903j), (-0.7628208743574287-0.6371785162956514j), (-0.2246568157836294+0.3567254755305702j), (0.68327814761898-0.27973991174997725j)),
+                          ((0.2784159984258674-0.17498289569648884j), (0.004730953615886158+0.07715287138774296j), (0.0773670863004613-0.6360012413426752j), (-0.0647551047878423+0.6906328131396173j)),
+                          ((0.558480058973719-0.04481293285577537j), (0.09684530531415203-0.40763537195877164j), (-0.3913240230298858-0.004438441098584933j), (0.031510290166036015-0.30876711061254836j))),
+                         (((-0.588734853251181+0.36452828173265184j), (-0.19810928581934018+0.20823750547135322j), (-0.45274761144312026-0.17983105119023213j), (-0.11229734410645587+0.2560770621269597j)),
+                          ((-0.4038055786345742+0.7025954299708754j), (0.6537842056064525-0.34973368012330475j), (0.35464537317028266-0.21682856487173952j), (-0.01815814374546676+0.4718839114346507j)),
+                          ((-0.36336965745600625+0.3759504695343794j), (0.2248053726148399+0.22029644112859348j), (-0.09064428722611384-0.08254509314972736j), (0.12418920854260185-0.5471431985662905j)),
+                          ((-0.5200354642412095+0.5425236434272582j), (0.4144201383368241-0.03221161184797661j), (0.10973679214385457+0.2887677216157485j), (0.8119344460935665-0.3782880124387231j))),
+                         (((0.5132990185785542+0.1269895435922086j), (-0.8779926345719881-0.5240101078639017j), (-0.1083296281261924-0.8147529275948924j), (0.09647199912137994+0.6723852222785147j)),
+                          ((0.2928885382594636-0.17353985395496885j), (-0.21364153320667634-0.03557466867344006j), (0.09421518259275086+0.6153556681629657j), (0.42459824192798623-0.17443990666881448j)),
+                          ((-0.5143367641601848-0.474941950841561j), (-0.2759320986482162-0.8250929199965524j), (0.21922685784092444-0.5600860240181191j), (-0.8569179028983865-0.16482185283148332j)),
+                          ((0.5268959167118139+0.55401274233894j), (0.08678495563788746-0.11915652486681427j), (-0.35416282616502737-0.4847172453257278j), (0.17111904837721448-0.8480796973331977j)))),
+                        ((((0.5469697524334143+0.02787502521930041j), (0.2605342686105838-0.0738711527960102j), (-0.39955538445037275-0.37613379994879603j), (-0.013180544897028024-0.5858094274207383j)),
+                          ((0.2506641890300212-0.1324021828426094j), (0.2972858012659867+0.21562443620437732j), (-0.6161716236733459-0.16509522040718683j), (-0.18102929570881354-0.6067237673008904j)), 
+                          ((-0.13192637373724614-0.6510388019746922j), (-0.5546497186031663+0.15957406458683243j), (0.3605761118213213+0.25686768414528705j), (0.401508970393731-0.5108236410388888j)), 
+                          ((0.39953367426110775+0.2252371577830028j), (-0.3347746193719203+0.2263747029817541j), (0.43746847580536263+0.5388066331831217j), (-0.07344964656116226+0.5473468419762271j))), 
+                        (((-0.6996969040609468+0.7213293709800207j), (-0.37557411707556654+0.1506412600826108j), (0.46608440397755446+0.013185375483020345j), (0.29865953531762246+0.19232124238469206j)), 
+                         ((-0.06222220564236847+0.5694069457780013j), (-0.5368962596793275+0.36703072903452505j), (-0.05182804478010006+0.3840540087750902j), (0.16375632553791997-0.4661212952339301j)), 
+                         ((-0.4041070739038938-0.04037225736899819j), (0.24215413306521716-0.06631187616668377j), (-0.2663745437846935+0.611183098942953j), (0.337942638568164-0.5670011153091816j)), 
+                         ((0.3876032723274968-0.08306424304240201j), (0.2173881180889634+0.4512865759999062j), (0.8795902664110721+0.8614312675002035j), (0.2870339354260544-0.11303384551216167j))), 
+                        (((-0.1319661103321904-0.1378309763195904j), (-0.03263197183994404+0.03651637220786119j), (-0.33530432503994767-0.007463082947573474j), (-0.3110039705203388+0.17231544573803292j)), 
+                         ((-0.07377573914613977+0.3678250464292866j), (0.3280327212275782-0.08984395132040435j), (-0.4492548090143319-0.3165726498892033j), (0.4186631970202508+0.14692250754002467j)), 
+                         ((0.12300006190073354+0.8465896476419659j), (-0.3266430699658883+0.9258477806121458j), (0.1270817126276501+0.7278063130820139j), (0.04390487289582379-0.07072636756748818j)), 
+                         ((0.8411822363338441+0.3271788959517308j), (0.14233232632431592-0.8034008469283107j), (-0.012057809815140041-0.07447549854466373j), (-0.5078787065469428-0.3322994351304549j))), 
+                        (((0.2823845584710901+0.3169641678915194j), (-0.14926005618963878-0.06141784434383113j), (-0.3336711008317823+0.608644554614276j), (0.042858723261329-0.25353753207960283j)), 
+                         ((-0.19596385250682435+0.29611929225848677j), (0.9379729841249024-0.5720585057483617j), (0.20515378855823352-0.5330821799545553j), (-0.45689594348515183-0.5221745972924456j)), 
+                         ((0.005913178294852495-0.04464774171993757j), (-0.3515104653551274-0.8716563770921714j), (-0.5644652537988155+0.4413367915251234j), (-0.32684204426160013-0.6404138884316928j)), 
+                         ((-0.20862357692064337-0.008586491450952471j), (0.7110044208850719-0.0260275339943824j), (0.33195949443404427-0.060726068233408204j), (-0.24054180926541135-0.22750131116864736j)))), 
+                       ((((-0.19779207637655705-0.06170675636552225j), (0.24801124896429994+0.52301594517833j), (0.3359762170142643+0.006887001901350498j), (-0.5044830473838094-0.023633199563395157j)), 
+                         ((0.35936388285588383-0.12044000986333014j), (0.06567318357927132+0.23081033720558908j), (-0.006063340342035706-0.43355358359223595j), (0.560747142959132-0.019735739750161296j)), 
+                         ((0.16778778206380363+0.4393001381475511j), (-0.19115676223578515+0.023171844709636735j), (-0.10056678281864495+0.11175155826135519j), (-0.24878623491611496+0.8172452900981119j)), 
+                         ((-0.4955653304024539-0.35864956392371916j), (-0.002728871185003978+0.3416061368260671j), (0.12387109110953831-0.2654493686440327j), (0.10889405520664741+0.1218720709206873j))), 
+                        (((0.07498012788575437+0.251986782960711j), (0.3511927502553568+0.27907917288389616j), (-0.6319086362942079-0.11628342415274562j), (-0.02365411536311457+0.7887319952841338j)), 
+                         ((0.38406832355686993+0.03416295519609358j), (0.35717793709754475+0.7751423080742306j), (0.29135030536626805+0.15668909755462013j), (0.14503883313378096-0.030524299930524523j)), 
+                         ((0.3331132451297607-0.03848385697279688j), (0.0750244753960323+0.10077551583585709j), (-0.15490975501427928-0.1798249796504282j), (0.9066796997830194-0.6602275207883976j)), 
+                         ((0.1471293723064081+0.10463425812772786j), (-0.5961028228889094+0.5480663905625878j), (0.0026089287349913004-0.5747699075005761j), (0.2899525342736272+0.1268195775198908j))), 
+                        (((-0.13364076045805806-0.17688339222579297j), (0.6013848685157083+0.3493674941578545j), (0.22523028276047052-0.21939576800830496j), (0.09111222639027305+0.7894981102504295j)), 
+                         ((0.6016850426953799+0.043886903791527376j), (-0.5060405108831854-0.5381151561460222j), (-0.4760569419146623+0.40666832623996363j), (-0.5318516495722876+0.16837803612551516j)), 
+                         ((0.024034551466941778-0.2166311876229967j), (0.26494031063742085-0.002375780112287895j), (-0.4730046544996984+0.6644551176991773j), (-0.39157195926624855+0.6199256868216445j)), 
+                         ((-0.04324867778353203-0.08087976286625231j), (0.1578599942534593-0.5156287674297576j), (-0.15005517462767193-0.09424179596026594j), (-0.13944975064956378-0.17543248499412656j))), 
+                        (((-0.5648616238096438+0.46394478768979586j), (-0.41003938415951235-0.33614785565882677j), (-0.3893130130095368+0.05645367151196268j), (0.3821121473593535+0.17991382827274327j)), 
+                         ((-0.5139083991747512+0.789121431720947j), (-0.6171117805874629+0.3660741433822048j), (0.05303400234375011+0.5094418060177022j), (-0.3545806168076585+0.4629656377266379j)), 
+                         ((0.2658032276104465+0.4237937984173149j), (0.18183157447480658+0.06623748664233398j), (0.12546831548404336-0.10575754034359075j), (-0.6833387940577664+0.23947306785979094j)), 
+                         ((-0.20503554348285624+0.21628529049971312j), (0.23649982943904524-0.6159980174662008j), (-0.20651357702330975+0.08458167450189069j), (0.j)))))
+
+    def get_python_input3(self, rank, cplx, no_first_arg_negative=False, no_zeros=False):
+        if not cplx:
+            if rank==0:
+                return (0.37126864363799594,)
+            elif rank==1:
+                return (0.6234908821535466, 0.6138798448505429)
+            elif rank==2:
+                return ((0.46458697075264, 0.47521353725342), (0.2769991834092879, 0.7655903776259643))
+            elif rank==3:
+                if no_first_arg_negative:
+                    return (((0.7087306338233754, 0.5091993546185136, 0.7823132790082358), 
+                        (0.7809687239325918, 0.7618301393180559, 0.13846012311583666), 
+                        (0.24584408982123662, 0.30175410391822816, 0.6508820239463049)),
+                        ((0.0799357328507963, 0.4268164046934606, 0.3340669557843154), 
+                        (0.5352665915599666, 0.4796035531201281, 0.31521200922735726),
+                        (0.6181927127971525, 0.5813500010909463, 0.6485259530707308)),
+                        ((0.607591622470962, 0.5134390179382666, 0.7761053727330762), 
+                        (0.30315911281007185, 0.7772739725828741, 0.21981237010097954), 
+                        (0.5720780258224234, 0.7199923733581466, 0.8038912730779739)))
+                else:
+                    return (((-0.7087306338233754, 0.5091993546185136, 0.7823132790082358), 
+                        (0.7809687239325918, -0.7618301393180559, 0.13846012311583666), 
+                        (0.24584408982123662, -0.30175410391822816, -0.6508820239463049)),
+                        ((0.0799357328507963, 0.4268164046934606, -0.3340669557843154), 
+                        (-0.5352665915599666, -0.4796035531201281, -0.31521200922735726),
+                        (0.6181927127971525, 0.5813500010909463, 0.6485259530707308)),
+                        ((-0.607591622470962, 0.5134390179382666, -0.7761053727330762), 
+                        (0.30315911281007185, -0.7772739725828741, 0.21981237010097954), 
+                        (0.5720780258224234, -0.7199923733581466, -0.8038912730779739)))
+            elif rank==4:
+                if no_first_arg_negative:
+                    return ((((0.45368972429803434, 0.43658224238126836, 0.327332664787118, 0.1659399779578305), 
+                        (0.5908203393014015, 0.6287596060266886, 0.26557881193403204, 0.7640693855123928), 
+                        (0.6550472925659366, 0.4051939492486867, 0.39695234748477226, 0.7984350907853707), 
+                        (0.45152587205177463, 0.6915126698433964, 0.1408991785923076, 0.5555466803377823)), 
+                        ((0.7111217974645967, 0.22442551434498154, 0.33601178864915354, 0.21277504641255832),
+                        (0.10220061513651632, 0.4523774178793611, 0.4079018667540423, 0.909554257065248), 
+                        (0.6139494095517375, 0.3083569476979329, 0.6376629339543685, 0.28647430781873456), 
+                        (0.36486444793373635, 0.3134770531471723, 0.19207850462685053, 0.2742209367740796)), 
+                        ((0.5206089841634276, 0.24952538894537638, 0.0933758645493489, 0.24304014487798284), 
+                        (0.2039225828898289, 0.423378042043955, 0.21847415387885974, 0.4823494123271024), 
+                        (0.49781756385165377, 0.42765522168555026, 0.4737414300227722, 0.5398374124738391), 
+                        (0.2640617374368053, 0.34880253282719476, 0.32357380359477705, 0.7111559522372015)), 
+                        ((0.23761918672652063, 0.1593578505403827, 0.6530063992033186, 0.9079894778799892),
+                        (0.8250545394400823, 0.4861804550261372, 0.3406365725750848, 0.42480466462889144),
+                        (0.47203132507512685, 0.20818156589620632, 0.20161698569028383, 0.42806013456132413),
+                        (0.7792675299565863, 0.3736959703075082, 0.19761992623295196, 0.4235372420916027))), 
+                        (((0.6459817009885405, 0.2610419659851719, 0.39888588458573665, 0.6358114313716404),
+                        (0.6789108524310596, 0.4760144991501489, 0.5132407231875976, 0.7445121079875354), 
+                        (0.3165090047475903, 0.1882290433512482, 0.30270840337500193, 0.4773827304127968), 
+                        (0.27248041023839426, 0.5356669773887297, 0.5759298824759524, 0.27026295067501754)), 
+                        ((0.2225815420544881, 0.6296933698530776, 0.6420994781708316, 0.5292910401325328),
+                        (0.4838814244753861, 0.3015763358329324, 0.5966105067811018, 0.437555952383517),
+                        (0.2508886824465943, 0.3688703869280175, 0.44848941714873286, 0.6968286221703255), 
+                        (0.7458127375857659, 0.5565367320025696, 0.5221639609134333, 0.5043229193744858)), 
+                        ((0.2704586652152375, 0.23622061144754075, 0.5668874045788246, 0.7383427762361463),
+                        (0.3326338826927772, 0.5180692401299339, 0.6853188934444896, 0.5105611442225273),
+                        (0.32729714889258044, 0.7634733351662765, 0.2667323956085834, 0.3813499428619923),
+                        (0.707758750914661, 0.23317899979615478, 0.6728060312412778, 0.5045011288076484)),
+                        ((0.2758755420358796, 0.6849112850328907, 0.7208465949939953, 0.5465246847493163),
+                        (0.5382081700827642, 0.4626841039902129, 0.38537277159039474, 0.5918003106653552),
+                        (0.7410792569612943, 0.848695963275266, 0.35215371840141596, 0.7859807920638692),
+                        (0.439754658119384, 0.09885040884202281, 0.20324265625602897, 0.6393707779383961))), 
+                        (((0.45932643067605416, 0.4867064483724215, 0.2492845750953945, 0.4071869028109893),
+                        (0.518352199566693, 0.6265341328104177, 0.5719047743470251, 0.8284284690707643),
+                        (0.1255527780884896, 0.133522460155736, 0.5939516968011829, 0.6970674969748756),
+                        (0.821986273583169, 0.3881563859122813, 0.16941736964779366, 0.288738726812057)),
+                        ((0.48102730273877786, 0.1522385344365771, 0.5752150637264031, 0.39522973755221524), 
+                        (0.732520712427958, 0.49190588963815157, 0.6125760080831428, 0.2716702847832281), 
+                        (0.8159103581398756, 0.34507912842082983, 0.7075657623779936, 0.29530894172611916), 
+                        (0.5278442353318813, 0.6539972004065213, 0.48897529954240776, 0.7932403888940815)),
+                        ((0.831358889394934, 0.48050345824229945, 0.6410388202892018, 0.8982570057418652), 
+                        (0.30388123939085465, 0.727912073121657, 0.543834760379716, 0.6710456332208439), 
+                        (0.4417259323277584, 0.5717441377950038, 0.3664067245442036, 0.3280925201821242), 
+                        (0.5400907637568426, 0.43207844188064887, 0.732946675152238, 0.5339092194505695)),
+                        ((0.22369526225631464, 0.5665529520090573, 0.2653373517286637, 0.6914637769007175),
+                        (0.22138531453529892, 0.17362665833183274, 0.11873401018627547, 0.48731998406078203),
+                        (0.5508721228465998, 0.3492961556670177, 0.5692351404720578, 0.5107492266892075), 
+                        (0.17584863513461835, 0.35755945941346623, 0.7650117785966029, 0.48316674832514844))), 
+                        (((0.2982202413301988, 0.2348830652298031, 0.3114442699257422, 0.20218169729319738), 
+                        (0.6846710473822368, 0.8119003553529898, 0.1790804504032915, 0.4781252356617314), 
+                        (0.3766941501672641, 0.5437027703705374, 0.24423050827666176, 0.3323763024031741), 
+                        (0.8189980567608663, 0.5888920746029481, 0.17138276940268463, 0.5475256795584624)), 
+                        ((0.4569907243510988, 0.5255497422421722, 0.1680676291815795, 0.2879601796868399), 
+                        (0.5419471765149858, 0.8765158329632898, 0.21847500231364173, 0.6219663103942495),
+                        (0.8993300494227338, 0.5256551743041176, 0.4312579142909404, 0.28503463714017396),
+                        (0.6601304123050094, 0.9681225089321629, 0.6110831795473397, 0.630733896684101)),
+                        ((0.7252549854189686, 0.48905018110325815, 0.3949054499635516, 0.6883221515509466), 
+                        (0.3510020242244332, 0.5964593467774927, 0.665927090247577, 0.19851750424804993),
+                        (0.49702295298466764, 0.32952301722148614, 0.6578112215358343, 0.629875436683738), 
+                        (0.5228582859488041, 0.48834135369831744, 0.8107618558028835, 0.012956020032133924)), 
+                        ((0.3966015859408982, 0.19901168720580728, 0.6930890007374754, 0.7839579709117346), 
+                        (0.8623235889093344, 0.5661301336086426, 0.6547115325958021, 0.6689861941430038),
+                        (0.5105113993916237, 0.7066840336625683, 0.8004786600943815, 0.5266845579213677),
+                        (0.689553296868146, 0.773301352126767, 0.7364812118860565, 0.5377502245784462))))                    
+                else:
+                    return ((((0.45368972429803434, 0.43658224238126836, 0.327332664787118, 0.1659399779578305), 
+                        (0.5908203393014015, 0.6287596060266886, 0.26557881193403204, 0.7640693855123928), 
+                        (0.6550472925659366, 0.4051939492486867, 0.39695234748477226, 0.7984350907853707), 
+                        (0.45152587205177463, -0.6915126698433964, -0.1408991785923076, 0.5555466803377823)), 
+                        ((-0.7111217974645967, 0.22442551434498154, 0.33601178864915354, 0.21277504641255832),
+                        (0.10220061513651632, 0.4523774178793611, 0.4079018667540423, -0.909554257065248), 
+                        (0.6139494095517375, 0.3083569476979329, 0.6376629339543685, -0.28647430781873456), 
+                        (-0.36486444793373635, 0.3134770531471723, 0.19207850462685053, 0.2742209367740796)), 
+                        ((0.5206089841634276, 0.24952538894537638, 0.0933758645493489, 0.24304014487798284), 
+                        (0.2039225828898289, 0.423378042043955, 0.21847415387885974, 0.4823494123271024), 
+                        (0.49781756385165377, 0.42765522168555026, -0.4737414300227722, -0.5398374124738391), 
+                        (0.2640617374368053, 0.34880253282719476, 0.32357380359477705, -0.7111559522372015)), 
+                        ((0.23761918672652063, 0.1593578505403827, 0.6530063992033186, 0.9079894778799892),
+                        (-0.8250545394400823, 0.4861804550261372, -0.3406365725750848, 0.42480466462889144),
+                        (0.47203132507512685, 0.20818156589620632, 0.20161698569028383, 0.42806013456132413),
+                        (0.7792675299565863, 0.3736959703075082, 0.19761992623295196, 0.4235372420916027))), 
+                        (((0.6459817009885405, 0.2610419659851719, 0.39888588458573665, 0.6358114313716404),
+                        (0.6789108524310596, 0.4760144991501489, 0.5132407231875976, -0.7445121079875354), 
+                        (-0.3165090047475903, 0.1882290433512482, -0.30270840337500193, 0.4773827304127968), 
+                        (0.27248041023839426, 0.5356669773887297, -0.5759298824759524, 0.27026295067501754)), 
+                        ((0.2225815420544881, 0.6296933698530776, 0.6420994781708316, 0.5292910401325328),
+                        (0.4838814244753861, 0.3015763358329324, 0.5966105067811018, 0.437555952383517),
+                        (0.2508886824465943, -0.3688703869280175, 0.44848941714873286, 0.6968286221703255), 
+                        (0.7458127375857659, 0.5565367320025696, -0.5221639609134333, -0.5043229193744858)), 
+                        ((0.2704586652152375, 0.23622061144754075, 0.5668874045788246, -0.7383427762361463),
+                        (0.3326338826927772, -0.5180692401299339, 0.6853188934444896, -0.5105611442225273),
+                        (0.32729714889258044, 0.7634733351662765, 0.2667323956085834, 0.3813499428619923),
+                        (-0.707758750914661, 0.23317899979615478, -0.6728060312412778, -0.5045011288076484)),
+                        ((-0.2758755420358796, -0.6849112850328907, 0.7208465949939953, 0.5465246847493163),
+                        (0.5382081700827642, 0.4626841039902129, 0.38537277159039474, -0.5918003106653552),
+                        (0.7410792569612943, -0.848695963275266, -0.35215371840141596, 0.7859807920638692),
+                        (0.439754658119384, -0.09885040884202281, -0.20324265625602897, 0.6393707779383961))), 
+                        (((0.45932643067605416, 0.4867064483724215, -0.2492845750953945, 0.4071869028109893),
+                        (0.518352199566693, 0.6265341328104177, 0.5719047743470251, -0.8284284690707643),
+                        (0.1255527780884896, -0.133522460155736, 0.5939516968011829, 0.6970674969748756),
+                        (0.821986273583169, 0.3881563859122813, 0.16941736964779366, -0.288738726812057)),
+                        ((0.48102730273877786, 0.1522385344365771, 0.5752150637264031, 0.39522973755221524), 
+                        (-0.732520712427958, -0.49190588963815157, 0.6125760080831428, 0.2716702847832281), 
+                        (-0.8159103581398756, 0.34507912842082983, 0.7075657623779936, 0.29530894172611916), 
+                        (0.5278442353318813, -0.6539972004065213, -0.48897529954240776, 0.7932403888940815)),
+                        ((0.831358889394934, 0.48050345824229945, -0.6410388202892018, 0.8982570057418652), 
+                        (0.30388123939085465, 0.727912073121657, -0.543834760379716, -0.6710456332208439), 
+                        (0.4417259323277584, -0.5717441377950038, 0.3664067245442036, 0.3280925201821242), 
+                        (-0.5400907637568426, 0.43207844188064887, -0.732946675152238, -0.5339092194505695)),
+                        ((-0.22369526225631464, 0.5665529520090573, 0.2653373517286637, 0.6914637769007175),
+                        (0.22138531453529892, 0.17362665833183274, 0.11873401018627547, 0.48731998406078203),
+                        (0.5508721228465998, -0.3492961556670177, -0.5692351404720578, 0.5107492266892075), 
+                        (0.17584863513461835, -0.35755945941346623, 0.7650117785966029, 0.48316674832514844))), 
+                        (((0.2982202413301988, 0.2348830652298031, 0.3114442699257422, -0.20218169729319738), 
+                        (0.6846710473822368, -0.8119003553529898, 0.1790804504032915, 0.4781252356617314), 
+                        (-0.3766941501672641, 0.5437027703705374, -0.24423050827666176, 0.3323763024031741), 
+                        (0.8189980567608663, -0.5888920746029481, 0.17138276940268463, 0.5475256795584624)), 
+                        ((0.4569907243510988, 0.5255497422421722, -0.1680676291815795, -0.2879601796868399), 
+                        (0.5419471765149858, 0.8765158329632898, -0.21847500231364173, 0.6219663103942495),
+                        (0.8993300494227338, 0.5256551743041176, 0.4312579142909404, -0.28503463714017396),
+                        (-0.6601304123050094, 0.9681225089321629, 0.6110831795473397, 0.630733896684101)),
+                        ((0.7252549854189686, -0.48905018110325815, 0.3949054499635516, 0.6883221515509466), 
+                        (0.3510020242244332, 0.5964593467774927, -0.665927090247577, -0.19851750424804993),
+                        (0.49702295298466764, -0.32952301722148614, 0.6578112215358343, 0.629875436683738), 
+                        (0.5228582859488041, 0.48834135369831744, -0.8107618558028835, 0.012956020032133924)), 
+                        ((-0.3966015859408982, 0.19901168720580728, 0.6930890007374754, 0.7839579709117346), 
+                        (0.8623235889093344, 0.5661301336086426, -0.6547115325958021, -0.6689861941430038),
+                        (-0.5105113993916237, 0.7066840336625683, 0.8004786600943815, 0.5266845579213677),
+                        (0.689553296868146, -0.773301352126767, -0.7364812118860565, 0.5377502245784462))))
+        else:
+            if rank==0:
+                return (0.37126864363799594j,)
+            elif rank==1:
+                return (-0.6234908821535466, -0.6138798448505429j)
+            elif rank==2:
+                return ((0.46458697075264j, 0.47521353725342), (-0.2769991834092879j, 0.7655903776259643))
+            elif rank==3:
+                return ((((0.1454277130999836-0.7320274919853249j), (0.6111728482069096+0.3264747748994178j), (-0.5638648912195857-0.17450334170489668j)),
+                         ((0.36745011107568193-0.36335598004419434j), (0.17683177117302507+0.17980667188917787j), (0.1975971229124449+0.4658291218212517j)),
+                         ((-0.2014605099933947+0.2948257187520392j), (-0.744292187546457-0.06353546214852701j), (0.5315307768500955+0.20979695600906234j))),
+                        (((0.6658801836076347-0.5765177344716341j), (0.49015610705744417-0.5133880244308395j), (-0.1502312930208003+0.1561733784845012j)),
+                         ((-0.661348002857287-0.029644750992120383j), (0.006584637699976192-0.4781943559540154j), (0.12266084950784173+0.46542904661542706j)),
+                         ((-0.41697557600280255-0.3537461357888442j), (0.26272750067625794-0.43630595153076535j), (-0.21367481541695688-0.2618183771588106j))),
+                        (((-0.22338538892626414-0.10818049912878436j), (-0.040383727106552136+0.48764341091162444j), (0.014766392396017403+0.8223651913211714j)),
+                         ((0.003228290936111433-0.37610619147220625j), (-0.01103811298925661-0.39851348234329986j), (0.20163130848248234-0.49523755760391885j)),
+                         ((0.37812723691663375+0.354147330172629j), (0.08116710042198705+0.1643297763093502j), (0.015047687899757523-0.05023160033399521j))))
+            elif rank==4:
+                return ((((0.45368972429803434, 0.43658224238126836j, 0.327332664787118, 0.1659399779578305), 
+                        (0.5908203393014015, 0.6287596060266886, 0.26557881193403204, 0.7640693855123928), 
+                        (0.6550472925659366, 0.4051939492486867, 0.39695234748477226, 0.7984350907853707), 
+                        (0.45152587205177463, 0.6915126698433964, 0.1408991785923076, 0.5555466803377823)), 
+                        ((0.7111217974645967, -0.224425514+0.12j, -0.336011788-0.35j, 0.21277504641255832),
+                        (0.10220061513651632, 0.4523774178793611, 0.4079018667540423, 0.909554257065248), 
+                        (0.6139494095517375, 0.3083569476979329, 0.6376629339543685, 0.28647430781873456), 
+                        (0.36486444793373635, -0.31347705-0.8765j, 0.19207850462685053, 0.2742209367740796)), 
+                        ((0.5206089841634276, 0.24952538894537638, 0.0933758645493489, 0.24304014487798284), 
+                        (-0.2039225828898289, 0.423378042043955, 0.21847415387885974, 0.4823494123271024), 
+                        (0.49781756385165377, 0.42765522168555026j, 0.4737414300227722, 0.5398374124738391), 
+                        (0.2640617374368053, 0.34880253282719476, 0.32357380359477705, 0.7111559522372015)), 
+                        ((0.23761918672652063, -0.1593578505403827, 0.6530063992033186, 0.9079894778799892),
+                        (0.8250545394400823, 0.4861804550261372, 0.3406365725750848, 0.42480466462889144),
+                        (0.47203132507512685, 0.20818156589620632, 0.20161698569028383, 0.42806013456132413),
+                        (0.7792675299565863, -0.3736959703075082, -0.19761992623295196, 0.4235372420916027))), 
+                        (((0.6459817009885405, 0.2610419659851719, -0.39888588458573665, 0.6358114313716404),
+                        (0.6789108524310596, 0.4760144991501489, 0.5132407231875976, 0.7445121079875354), 
+                        (0.3165090047475903, 0.1882290433512482, 0.30270840337500193, 0.4773827304127968), 
+                        (0.27248041023839426, 0.5356669773887297, 0.5759298824759524, 0.27026295067501754)), 
+                        ((-0.2225815420544881, 0.6296933698530776, 0.6420994781708316, 0.5292910401325328),
+                        (0.4838814244753861, 0.3015763358329324, 0.5966105067811018, 0.437555952383517),
+                        (0.2508886824465943, 0.3688703869280175j, 0.44848941714873286, 0.6968286221703255), 
+                        (0.7458127375857659, 0.5565367320025696, 0.5221639609134333, 0.5043229193744858)), 
+                        ((0.2704586652152375, 0.23622061144754075, 0.5668874045788246, 0.7383427762361463),
+                        (0.3326338826927772, 0.5180692401299339, -0.6853188934444896, 0.5105611442225273),
+                        (0.32729714889258044, 0.7634733351662765, 0.2667323956085834, 0.3813499428619923),
+                        (0.707758750914661, 0.23317899979615478, 0.6728060312412778, 0.5045011288076484)),
+                        ((0.2758755420358796, 0.6849112850328907, 0.7208465949939953, 0.5465246847493163),
+                        (0.5382081700827642, 0.4626841039902129, 0.38537277159039474, 0.5918003106653552),
+                        (0.7410792569612943, 0.848695963275266, 0.35215371840141596, 0.7859807920638692),
+                        (0.439754658119384, 0.09885040884202281, 0.20324265625602897, 0.6393707779383961))), 
+                        (((0.45932643067605416, 0.4867064483724215, 0.2492845750953945, 0.4071869028109893),
+                        (0.518352199566693, 0.6265341328104177, 0.5719047743470251, 0.8284284690707643),
+                        (0.1255527780884896, 0.133522460155736, 0.5939516968011829, 0.6970674969748756),
+                        (0.821986273583169, 0.3881563859122813, 0.16941736964779366, 0.288738726812057)),
+                        ((0.48102730273877786, 0.1522385344365771, 0.5752150637264031, 0.39522973755221524), 
+                        (0.732520712427958, 0.49190588963815157, 0.6125760080831428, 0.2716702847832281), 
+                        (0.8159103581398756, 0.34507912842082983, 0.7075657623779936, 0.29530894172611916), 
+                        (0.5278442353318813, 0.6539972004065213, 0.48897529954240776, 0.7932403888940815)),
+                        ((0.831358889394934, 0.48050345824229945, 0.6410388202892018, 0.8982570057418652), 
+                        (0.30388123939085465, 0.727912073121657, 0.543834760379716, 0.6710456332208439), 
+                        (0.4417259323277584, 0.5717441377950038, 0.3664067245442036, 0.3280925201821242), 
+                        (0.5400907637568426, 0.43207844188064887, 0.732946675152238, 0.5339092194505695)),
+                        ((0.22369526225631464, 0.5665529520090573, 0.2653373517286637, 0.6914637769007175),
+                        (0.22138531453529892, 0.17362665833183274, 0.11873401018627547, 0.48731998406078203),
+                        (0.5508721228465998, 0.3492961556670177, 0.5692351404720578, 0.5107492266892075), 
+                        (0.17584863513461835, 0.35755945941346623, 0.7650117785966029, 0.48316674832514844))), 
+                        (((0.2982202413301988, 0.2348830652298031, 0.3114442699257422, 0.20218169729319738), 
+                        (0.6846710473822368, 0.8119003553529898, 0.1790804504032915, 0.4781252356617314), 
+                        (0.3766941501672641, 0.5437027703705374, 0.24423050827666176, 0.3323763024031741), 
+                        (0.8189980567608663, 0.5888920746029481, 0.17138276940268463, 0.5475256795584624)), 
+                        ((0.4569907243510988, 0.5255497422421722, 0.1680676291815795, 0.2879601796868399), 
+                        (0.5419471765149858, 0.8765158329632898, 0.21847500231364173, 0.6219663103942495),
+                        (0.8993300494227338, 0.5256551743041176, 0.4312579142909404, 0.28503463714017396),
+                        (0.6601304123050094, 0.9681225089321629, 0.6110831795473397, 0.630733896684101)),
+                        ((0.7252549854189686, 0.48905018110325815, 0.3949054499635516, 0.6883221515509466), 
+                        (0.3510020242244332, 0.5964593467774927, 0.665927090247577, 0.19851750424804993),
+                        (0.49702295298466764, 0.32952301722148614, 0.6578112215358343, 0.629875436683738), 
+                        (0.5228582859488041, 0.48834135369831744, 0.8107618558028835, 0.012956020032133924)), 
+                        ((0.3966015859408982, 0.19901168720580728, 0.6930890007374754, 0.7839579709117346), 
+                        (0.8623235889093344, 0.5661301336086426, 0.6547115325958021, 0.6689861941430038),
+                        (0.5105113993916237, 0.7066840336625683, 0.8004786600943815, 0.5266845579213677),
+                        (0.689553296868146j, 0.773301352126767j, 0.7364812118860565j, 0.5377502245784462))))            
+
+
+    def get_python_input4(self, rank, cplx):
+        if not cplx:
+            if rank==0:
+                return (0.9153151043823012,)
+            elif rank==1:
+                return (-0.5162647246320071, -0.06342374260616546)
+            elif rank==2:
+                return ((0.7011839736500342, 0.625639950892529), (-0.17902320165992758, -0.049498389409131205))
+            elif rank==3:
+                return (((0.008309531806355519, 0.22817074073669497, 0.7216964601946423), 
+                         (0.33084432155377397, -0.48472374994936485, 0.4116921963539759), 
+                         (0.0257088350105531, -0.2370277105296692, 0.3798801329452163)), 
+                        ((0.01734050560720546, 0.16286702001136155, -0.6501064087150703), 
+                         (0.02818311904325488, -0.4169901835040347, 0.4086136135582773), 
+                         (0.5627838019596704, -0.16279418267275847, 0.581645077262897)), 
+                        ((0.6948207132066607, 0.23541367609085884, -0.4228977230091847), 
+                         (0.3216823894305869, 0.37129093662137924, -0.7134833270353387), 
+                         (0.710538786928389, -0.08441890458925416, -0.458946120570603)))
+            elif rank==4:((((0.37235501675945715, 0.11714100415866135, -0.034600745840691394, -0.15554835015413082), 
+                          (0.47232144877941096, 0.07592804193006697, 0.3405294503824112, 0.21948666128556615), 
+                          (-0.5332861513294131, -0.08886798656259431, -0.6083217502772487, 0.2316612945607922), 
+                          (0.5258922230225587, 0.08708823651373188, 0.4234306811212821, -0.04179959817125434)), 
+                         ((-0.3035688394279197, 0.49483554648710537, 0.05745994060999282, -0.12747381808333336), 
+                          (0.39332214767836104, 0.46534190633912254, 0.04365690803996003, 0.7650379849598341), 
+                          (0.1999985251338784, 0.0842829190391805, -0.16877153378631293, 0.31704188690973756), 
+                          (-0.329887201245436, -0.6511923884088605, -0.6220851080992487, -0.8494734189039839)), 
+                         ((-0.3231756242543622, -0.554464792835363, 0.4522418958171174, 0.7395807541527681), 
+                          (0.5498904829451162, -0.05590161752080769, 0.4965321688385663, 0.5728276202033591), 
+                          (0.5272647821134722, 0.5774470894044734, -0.12581800958739708, 0.9700828208339976), 
+                          (0.2893640797543078, -0.5484780137131635, 0.9149540829219327, -0.4070409332163506)), 
+                         ((0.8068861149817737, -0.08739646094657716, 0.15604945884485388, 0.2159877611783666), 
+                          (-0.08757552786227041, -0.5362091498098354, 0.1379626847994988, -0.02263864637679258), 
+                          (-0.05403837215914031, 0.6570928483791509, -0.014539560837078191, 0.1353955668770478), 
+                          (-0.033528144292161, -0.471223531770967, -0.012087259265455508, -0.4443704288092061))), 
+                        (((0.12815286370127177, 0.08288774005977806, -0.6591909957174392, -0.3227689715877514), 
+                          (-0.1560371012493621, 0.04563397602135244, 0.18608455069144747, -0.23618249688069137), 
+                          (-0.1857379168928618, -0.6112258715631804, 0.257168970542067, 0.46862986167858467), 
+                          (0.8134511475542548, -0.2930500911112336, 0.31803040987546893, -0.1662974948326531)), 
+                         ((0.09994879483867802, 0.11656104212951102, 0.24567744809079017, 0.2466674448155779), 
+                          (0.10560598300537649, 0.5594223586687221, -0.269996887150316, -0.006724786299250773), 
+                          (0.2494899758063036, -0.25302027094976054, 0.5346069245538014, 0.9394209073288707), 
+                          (0.4895739925732161, -0.6973902811154304, -0.04576531668146877, -0.05978124614419089)), 
+                         ((-0.4225874457751645, 0.06851122980870317, -0.12558552929455635, -0.059065175364745315), 
+                          (-0.5869469247109007, -0.4166268018632071, -0.17595117034871932, 0.34489468842970006), 
+                          (0.19428688924434412, -0.4410298941561428, -0.07610953060207504, 0.2917329578363864), 
+                          (-0.3087834675004315, -0.5017232119230198, 0.6463307399810825, -0.0997023137687646)), 
+                         ((-0.3721359342866154, 0.012800610965129966, -0.026147073121323694, 0.249394864255974), 
+                          (-0.19732520391810227, 0.6877652212967196, 0.09328828976651427, -0.6510049138630607), 
+                          (-0.4848547986972145, -0.35735976033028827, 0.09165186856904783, -0.40982007152443234), 
+                          (-0.574914716311232, -0.6488293490765211, 0.4883180795650498, -0.15158507647269426))), 
+                        (((0.5708514963046316, -0.21247793529126768, 0.11030963705086905, -0.4353799184220226), 
+                          (0.37323818315312085, -0.10788816216228836, -0.16605325912656543, 0.6104874356554703), 
+                          (-0.30847384861896465, -0.16679636365155348, 0.5922642783564169, 0.07864692847157684), 
+                          (0.2791875133546827, 0.09496780294295215, -0.45316050025403876, -0.1610271603413973)), 
+                         ((-0.42706418878716035, 0.2928066574998388, 0.571174679676169, -0.14560760969133357), 
+                          (0.9643430182032757, -0.008481138733699822, 0.39800339772985893, -0.7013700291692165), 
+                          (0.8355714997095827, -0.624788527855067, 0.05466250391400629, -0.9509878285060569), 
+                          (-0.0973807062547889, -0.5407506278578577, 0.09210951353229235, 0.154379276954291)), 
+                         ((0.020599999927309876, -0.27945772586433815, -0.4172996686676522, -0.01634325308254314), 
+                          (0.20212191256900158, 0.21234576281878903, -0.639142180879022, 0.5580272378144776), 
+                          (0.010545335242685194, 0.29112493809527284, 0.018635172247521647, -0.06613029570794826), 
+                          (0.155833422371511, -0.09759470769513245, -0.03063166472236889, -0.05428014538371495)), 
+                         ((0.23577186821185425, 0.1500579314912276, -0.3132878838809129, -0.1097762446447772), 
+                          (0.6269933317054381, 0.6145430525526924, -0.10380848715617585, -0.06442945507207776), 
+                          (0.2787614779979213, -0.7358725127577144, 0.20796477034679672, -0.23780046049837644), 
+                          (0.9267282798589614, 0.16997001112351162, -0.5282983087375479, 0.36538217505303483))), 
+                        (((-0.8579510472159081, -0.7246352503258299, -0.15510078775815894, 0.12619420876242404), 
+                          (0.24743683866122967, 0.5615110519360075, -0.3322404459371945, -0.7048709861468231), 
+                          (0.7028698531861565, -0.22853480716765995, 0.7720042932598191, -0.13166327267604216), 
+                          (-0.2435352215957982, 0.22931953113912795, 0.3655062306761121, -0.12152100998681392)), 
+                         ((-0.5677571978624529, 0.6521623982090801, 0.45610015782255964, 0.04035238030125632), 
+                          (-0.23851414230639378, -0.30637231258391073, 0.046201693717512704, -0.27136411183670195), 
+                          (0.6857476357642973, 0.3410717717617201, 0.01289524408298115, -0.013360855488527279), 
+                          (-0.032304469159492366, -0.0835492970599051, -0.0028734534647487653, -0.4654703960804025)), 
+                         ((-0.2290818436503651, -0.5296681103638246, 0.6162246876592932, 0.17128234890632854), 
+                          (-0.5811995554061062, 0.6417647758172681, 0.7628730887993724, -0.37912907041142807), 
+                          (-0.09316417943340105, -0.27095731560349645, 0.6194574328449272, -0.24948060355551438), 
+                          (0.5728337951942462, -0.0924305626769284, 0.3298848378599575, 0.415637420812042)), 
+                         ((-0.061049694343089045, -0.8003464214443662, 0.29655140456799867, -0.7735799111191699), 
+                          (0.29917720082276444, 0.3643378373698344, -0.7665309138650984, 0.35430115119764427), 
+                          (0.39429765393905847, -0.215211613577439, 0.22195510594293588, -0.20240345662915427), 
+                          (-0.06694319875792287, -0.6036398699231508, -0.6775777632295854, -0.13199173966023536))))
+            if rank==0:
+                return (0.1916945198248936-0.13520600821648232j,)
+            elif rank==1:
+                return (-0.1083940865407611-0.43931913768613384j,)
+            elif rank==2:
+                return (((-0.0008665125778035687+0.43157678379712805j), (0.6508260343349135-0.13342532131846585j)), 
+                        ((0.25346912744174943-0.6465790214072134j), (-0.15962337965743467-0.01177491815738152j)))
+            elif rank==3:
+                return ((((-0.11057636539275228-0.3175750394405701j), (0.7947500539520073-0.3434988438428338j), (-0.17008528220766383+0.22755084276175752j)),
+                         ((-0.21753248913138046+0.3073046922694095j), (-0.5987149773078468+0.6404407581234498j), (-0.2733628131901674-0.7312216337378827j)),
+                         ((0.46021781519502736-0.32179246699810604j), (-0.4650578935554821+0.5210104598763112j), (-0.36535537317523425+0.4289080712460789j))),
+                        (((-0.19578475796433725-0.1604786258607791j), (-0.070669831429362-0.34066414803932554j), (0.09414012129996285-0.14312760505028332j)),
+                         ((0.02962390819527594-0.08129940555056081j), (-0.29691277198852295+0.5445730330279386j), (-0.8314872838325128-0.10478982105017087j)),
+                         ((-0.4875034489526303+0.11245261823496877j), (0.307917858878609+0.4746451405124599j), (0.41480950330452204+0.4450092645412934j))),
+                        (((0.7567520084099626-0.5568082250793975j), (0.5933616991307173-0.03406028934656724j), (-0.5349903124170489-0.396773950179919j)),
+                         ((0.46555626239679515-0.16518290948365888j), (0.8398844896104096+0.28827801011043974j), (-0.05286735815237498-0.06537526369272817j)),
+                         ((-0.7873594868218297+0.23455905590585036j), (0.43718502738612375+0.17935920771077773j), (-0.16708210956083058-0.29630670019555294j))))
+            elif rank==4:
+                return (((((-0.37669743703656033+0.3367989420952414j), (0.3280202440259613-0.42443833914985585j), (0.5751207710641884-0.6671925997156294j), (0.033365010564720965+0.18416168128369115j)),
+                          ((-0.1305885333955732+0.258183803742714j), (0.5291111892948406+0.12768860044004038j), (0.3044538909411727+0.7018739119608393j), (-0.09384324555072743+0.44762291055240755j)),
+                          ((-0.5172985234092151-0.4246631134190011j), (-0.05697702151796369-0.38499672629412374j), (-0.16330371172505076+0.6329885254352636j), (0.005206064694582513-0.6979570589219142j)), 
+                          ((0.10042081122085011+0.2730078961548078j), (0.37702343940278005+0.3312339822361312j), (-0.38712718853663275+0.043310706850169245j), (-0.43842301200718425-0.15186366915048966j))), 
+                        (((0.5818010551152796-0.36497243994846373j), (0.19198280565084558-0.5011496107835725j), (0.24413432536571378-0.6379767379075698j), (0.34455193126269634-0.08664637040123147j)), 
+                         ((0.8168889487559259-0.9032656902589163j), (-0.5603456946720172-0.1195734571550765j), (-0.1605088593685251-0.13483121449943314j), (0.6174544850032535-0.44047675305704703j)), 
+                         ((-0.42307951312623815-0.30327702147916713j), (-0.2618637556175357-0.1986043745329351j), (0.04718850736664815-0.10738185754632579j), (0.23587778497574974-0.6504332945195135j)), 
+                         ((-0.05076119295424941+0.4047602633806563j), (0.11093393085917946+0.12427836254382474j), (-0.8132105391139205+0.37548311525522216j), (-0.26953236282243265-0.31159778790771064j))), 
+                        (((-0.39250877863236644-0.4881044190028637j), (-0.8360834411136835+0.02188471873683928j), (0.02679042509032048+0.6879063358020456j), (-0.10048291543082566-0.2233219762257277j)), 
+                         ((0.5390402819188123+0.1204054017602989j), (-0.2931730415212582+0.11535281644759132j), (-0.30548980198917564+0.026411218830157512j), (-0.19472436433201012+0.081056583169555j)),
+                         ((0.0005464858113309878+0.3225143801544309j), (-0.07709944497321652-0.7481530123633068j), (0.16337505191696478+0.5103151975086361j), (-0.12750402538858618+0.7545748937897574j)), 
+                         ((-0.9554831189812294+0.13987108056505082j), (-0.27483290404380223+0.8226848528344127j), (0.521831527873442+0.4970661477293601j), (0.9061234743087792-0.1504241528269118j))), 
+                        (((-0.1882846543421225+0.5304062832141554j), (0.10579078542556297+0.22780442714023064j), (-0.011294630508038805+0.5779466549586485j), (0.08025599710182507+0.12004966544994533j)), 
+                         ((-0.6586788023520793+0.29488829592817734j), (-0.5025090781370782-0.495410044054439j), (-0.10853891499487645+0.024651020003384483j), (-0.0009726817521150677-0.0764710138257787j)), 
+                         ((0.32613207343707196+0.7335754039319815j), (0.3508358997571207+0.3240452830066213j), (-0.3835841075004305-0.06342158227281525j), (0.32061104148045194+0.14435049185949667j)), 
+                         ((-0.4702553987233302+0.2965575488822829j), (0.2726823746215451+0.21252896664298115j), (-0.40480220218419416+0.5684528722603068j), (-0.8662951962865073-0.02018655350327081j)))), 
+                       ((((0.31691366872411453-0.16565320239992465j), (0.6119279222420073+0.4061058795460125j), (-0.2724431323567723+0.47301403973137435j), (-0.07564711093225085+0.3318822040674295j)), 
+                         ((0.35444199580157854-0.17921840306504822j), (0.029427102181375453-0.03357316416483169j), (-0.21032412371046783+0.01667316554624787j), (0.0663834457499225+0.2586952407467318j)), 
+                         ((0.20873626161577874+0.5387073631313459j), (-0.7679630879573601-0.6188379588287274j), (-0.3195249665071722-0.597193477248285j), (0.43272245800774456-0.23801421308823245j)), 
+                         ((-0.037613711494389857+0.10818062943154994j), (0.057829377352543676-0.04999419264444982j), (0.3022465975999099-0.5349078896215682j), (-0.5231242476811815+0.42998339300583244j))), 
+                        (((0.0856361897298803-0.6998154250460039j), (-0.11463868513147624+0.16152088708434365j), (-0.5127925687279636+0.11002739851016519j), (0.2599079869203247+0.02491071853128979j)), 
+                         ((0.7015604708055061-0.591598702814476j), (0.7022599678145434+0.41303884890699527j), (0.6770753952633466+0.003915616175995784j), (0.5221501522889332+0.015184149238084643j)), 
+                         ((-0.18955797508665606+0.5485819797109972j), (-0.2971676553030109-0.17836414101585318j), (-0.5711343992923511+0.06842526899025392j), (0.059265927050955236-0.6735602608611315j)), 
+                         ((-0.1520857966428928+0.29169887374589554j), (-0.3146943503222607+0.5076388713801581j), (0.9710102040544507-0.04876498142745134j), (-0.19853216294306686-0.6550688027359666j))), 
+                        (((0.18951981302782428-0.2412793295224065j), (-0.7777428226995063-0.365999090785438j), (0.6228318351380273+0.06995476281885704j), (-0.6740149120004719+0.10711001728991842j)),
+                         ((0.1129279157975297-0.4283924106357786j), (0.40438767481744564-0.2635679354391648j), (-0.29420852109617845+0.4847733937880756j), (-0.3510828870978512-0.11064283076221504j)), 
+                         ((-0.060808250212467274-0.3509555798569397j), (0.2310570876125041+0.27346891132233075j), (-0.07736476852424223-0.24833618620126674j), (-0.78074150969927-0.7230863125461435j)), 
+                         ((-0.4757051297031988-0.3783458735437233j), (-0.5401521152562118+0.035723203675678605j), (-0.17580640953890292+0.6827665743960223j), (0.39326629202893215-0.21993263281519704j))), 
+                        (((0.6386214443611579-0.764943290056036j), (0.18713633494964688+0.06363868519230131j), (0.29526336078276216+0.30178995300494826j), (0.05001443364181468-0.42881696117817625j)), 
+                         ((-0.5275034189476259+0.6550538425247074j), (0.6943261638500615+0.006776882726276523j), (0.5153311571315663-0.05413330835192531j), (0.2988153589979258+0.3049744060817169j)), 
+                         ((0.14785883887146767+0.0763051493978234j), (0.16312754082743042-0.03795584967477661j), (0.040229546593022913+0.16530303115245693j), (-0.1831772476291057+0.06328054147911466j)), 
+                         ((0.1476643669767913+0.325680674159183j), (0.14707868586431028+0.9047584008820329j), (0.9011552589577467+0.11447442281060494j), (0.005973469367093642+0.22263862886336694j)))), 
+                       ((((0.19283269000734593-0.28709497228064285j), (-0.47096481014533476-0.13173508510496024j), (0.562477770007406+0.26491027512352816j), (0.03783964186943933-0.03978396106597093j)), 
+                         ((-0.5333576204038937+0.20057170743675312j), (-0.5554481805321547-0.7626212986623081j), (-0.47686434977953773+0.5802686248218423j), (0.5920361023050167-0.14491946597655325j)), 
+                         ((-0.4126930229374297+0.39966003185091536j), (0.2850544980649773+0.7484131241244993j), (-0.13160190253004878-0.10190869345823672j), (0.34602765479100117-0.18205626983880596j)), 
+                         ((0.4219188545707674+0.5086508238768007j), (-0.0677006672392233-0.11766198036052333j), (0.45020863060305627+0.20389430038718892j), (-0.5125265629738844-0.4771765521430704j))), 
+                        (((0.37701640058097874+0.05204261987362635j), (0.17260326851591068+0.4285264843160088j), (0.10359131962737611-0.8137076321465101j), (-0.02286762418683419+0.34829474498525603j)), 
+                         ((-0.010410922319074811+0.09105220878486131j), (0.43519051427706756-0.20447320160562032j), (-0.14399460120821073-0.46777690039065734j), (-0.04872781035419649-0.4298525400055381j)), 
+                         ((0.18896093939688385-0.16705599789601278j), (-0.5364935215041872+0.3749309246942789j), (-0.18268036947723632-0.25385754338743693j), (-0.5091199532153567-0.32766264406763357j)), 
+                         ((-0.35235219578282473-0.661850620842785j), (-0.6072679594510126+0.09656978047989173j), (-0.5126540710595279-0.1672195227969181j), (-0.2830351750830662+0.12517368885386926j))), 
+                        (((0.04686974540685185+0.08438300173836044j), (-0.17974800480460484-0.5026848778236594j), (0.4496570044640005+0.5182953038532189j), (0.673892629006263-0.39593441606543756j)), 
+                         ((0.2166952267447365+0.191459813763583j), (0.6130127820906195+0.3500318802920196j), (-0.5419820712240513-0.13457437148792628j), (0.3343112127482648+0.07888610819775466j)), 
+                         ((-0.39276675341804346+0.7570076529568248j), (-0.3988406372126929-0.8608946218773403j), (0.576648779753566-0.6725693071527158j), (-0.4183085693722922-0.21421782809798817j)), 
+                         ((-0.3010231423615105-0.020535079475881957j), (0.006107583077576639-0.0812822534033596j), (-0.029724210300932086+0.35635178233793563j), (-0.20891136846604574-0.34703924148843457j))), 
+                        (((-0.07194174413486831-0.07558412271718051j), (0.04378297698600753+0.17934356988151767j), (-0.47189150794751766+0.5780327062551049j), (-0.5125220316089242+0.24892817111211096j)), 
+                         ((-0.36059488463245326-0.44683441504676813j), (-0.26735527077170973-0.3699650359773635j), (-0.3057966963958182-0.07264390084352956j), (-0.7281560219128018-0.3560659246206268j)), 
+                         ((0.1329046092679943-0.03153689763456646j), (-0.39271490859265534+0.2062873488401652j), (0.3802945078185428+0.013499908367005542j), (-0.1756191306230559+0.40464153144244697j)), 
+                         ((0.4802390728634319+0.5190956065611698j), (0.14465603430627616+0.005475878763732567j), (0.3018703057475889-0.0352888758412262j), (0.6943368615391298+0.019202869121973j)))), 
+                       ((((-0.07500673578875616+0.44031114122474946j), (-0.7205258224784314+0.16865003592058259j), (0.07737090079316822-0.1946277248102064j), (-0.34196425749144166+0.03817853010131156j)), 
+                         ((0.17755139682612575+0.8238455606059262j), (-0.6657721503572177+0.19793806270117809j), (0.29019650633065386-0.0952118701646486j), (0.14507433328106534-0.515594049976717j)), 
+                         ((-0.2046653289959417-0.3621700659367947j), (0.6793982849049701+0.3212370850216385j), (0.752468338707956-0.2485926849867901j), (0.5515361195592884-0.4034740977009965j)), 
+                         ((0.06814007049845194-0.598437803123891j), (-0.5946418447770585-0.6903237885619982j), (-0.36295182276739524-0.7047248113077316j), (0.4250255531847421-0.18162334572617966j))), 
+                        (((-0.330842360993192+0.6332178345844492j), (-0.1626525936800115+0.12616954195069585j), (-0.1140983493592932+0.16115787963839956j), (-0.5146861509822459-0.47712128557213807j)), 
+                         ((-0.5846954521386037+0.05824004235002933j), (-0.6485911018934266+0.16723477358583239j), (0.08398284507027964-0.43010971419153865j), (0.473289092320511-0.20201419097169482j)), 
+                         ((0.4304851671543479+0.3403150943545751j), (-0.5833160536688786+0.4728250155621482j), (0.07457807134020211-0.7490249718724199j), (-0.7171842661512965-0.4045396117992399j)), 
+                         ((0.38115752645606027-0.581098921622462j), (-0.5631172341731325-0.3169246082570121j), (-0.3187906517321565-0.04147798917128964j), (0.19509565877461577-0.2078658202899497j))), 
+                        (((0.8183607993729423+0.6099794355828236j), (-0.04871961343893161-0.07033624155755913j), (-0.5113369106671184+0.057386755559324376j), (-0.8572333770628078-0.11952395630018997j)), 
+                         ((-0.14669430492038193+0.22930953454219938j), (0.8593021941295018-0.6567284188814271j), (-0.3498005693861541+0.4978632770594925j), (0.09110494626854304+0.14596905700539575j)), 
+                         ((0.5821565237474922+0.0943377064392501j), (-0.12067415509324098-0.2752660016054119j), (-0.06217450649156364-0.024782412571600743j), (0.18973873165376154-0.4643249608246277j)), 
+                         ((0.221440302929653-0.013268267564226499j), (0.23727492055667987+0.24335036846179636j), (0.20590162356036257-0.7773726672859762j), (0.6650340170009239+0.23251699933937398j))), 
+                        (((-0.10862117873771637-0.37601603473231926j), (0.14702795412639624+0.2708674170765101j), (-0.6649779112242566-0.18174044911513143j), (-0.8835405205485383+0.67800004101369j)), 
+                         ((0.5595753470648851+0.06619472947501459j), (-0.5165025553457263+0.06614105368782663j), (0.6989509353083828-0.04232214137167867j), (0.27326536666764734+0.055971454399568965j)), 
+                         ((-0.4225563301191848-0.46504433769204656j), (0.021693692712496326+0.03736604787989928j), (-0.5231593756263367-0.2743293424312542j), (0.030072300170931987-0.5713925695108115j)), 
+                         ((0.2665173135965969-0.541283942963249j), (0.10755640859650628-0.30605105910067054j), (-0.5717247916937898+0.2531629402939769j), (0.6106906755601762-0.8354582126221755j)))))
+
+    def get_array_inputL(self, rank, cplx, no_first_arg_negative=False, no_zeros=False, mult=1000):
+        z=self.get_python_inputL(rank, cplx, no_first_arg_negative=no_first_arg_negative, no_zeros=no_zeros)
+        r=numpy.array(z)
+        if mult!=1000:
+            r=r/1000*mult
+        return (r,r.copy())
+    
+    # does not have the same range as get_array_inputL but hopefully this will be enough
+    # at the moment it is only used in tagged testing
+    def get_array_inputL2(self, rank, cplx):
+        z=self.get_python_input2(rank, cplx)
+        return (10*numpy.array(z), 10*numpy.array(z))
+        
+    def get_array_input1(self, rank, cplx, no_first_arg_negative=False, no_zeros=False):
+        z=self.get_python_input1(rank, cplx, no_first_arg_negative, no_zeros=no_zeros)
+        return (numpy.array(z),numpy.array(z))
+
+    def get_array_input2(self, rank, cplx, no_zeros=False, no_first_arg_negative=False):
+        z=self.get_python_input2(rank, cplx, no_zeros=no_zeros, no_first_arg_negative=no_first_arg_negative)
+        return (numpy.array(z),numpy.array(z))
+
+    def get_array_input3(self, rank, cplx, no_first_arg_negative=False, no_zeros=False):
+        z=self.get_python_input3(rank, cplx, no_first_arg_negative=no_first_arg_negative, no_zeros=no_zeros)
+        return (numpy.array(z),numpy.array(z))
+    
+    def get_array_input4(self, rank, cplx):
+        z=self.get_python_input4(rank, cplx)
+        return (numpy.array(z),numpy.array(z))    
+
+    def get_const_inputL(self, rank, fs, cplx):
+        z=self.get_python_inputL(rank, cplx)
+        d=Data(z, fs)
+        return (d, numpy.array(z))
+    
+    def get_const_input1(self, rank, fs, cplx, no_first_arg_negative=False, no_zeros=False):
+        z=self.get_python_input1(rank, cplx, no_first_arg_negative, no_zeros=no_zeros)
+        d=Data(z, fs)
+        return (d, numpy.array(z))
+    
+    def get_const_input2(self, rank, fs, cplx, no_zeros=False):
+        z=self.get_python_input2(rank, cplx, no_zeros=no_zeros)
+        d=Data(z, fs)
+        return (d, numpy.array(z))
+ 
+    def get_expanded_inputL(self, rank, fs, cplx, no_first_arg_negative=False, no_zeros=False, mult=1000):
+        base=self.get_python_inputL(rank, cplx, no_first_arg_negative=no_first_arg_negative, no_zeros=no_zeros)
+        v='x'
+        if mult!=1000:
+            base=numpy.array(base)
+            v=Lsup(base)
+            base=base/1000*mult
+            base=base.tolist()
+        x=fs.getX()[0]
+        mask=whereNegative(x-0.5)   # A trick from Lutz Gross' version of tests
+        r=base*mask+(1-mask)*base
+        return (r, base)
+ 
+    def get_expanded_inputL2(self, rank, fs, cplx, no_zeros=False, mult=1000):
+        base=numpy.array(self.get_python_input1(rank, cplx))*mult
+        base=base.tolist()
+        x=fs.getX()[0]
+        mask=whereNegative(x-0.5)   # A trick from Lutz Gross' version of tests
+        r=base*mask+(1-mask)*base
+        return (r, base)
+ 
+    def get_expanded_input1(self, rank, fs, cplx):
+        base=self.get_python_input1(rank, cplx)
+        x=fs.getX()[0]
+        mask=whereNegative(x-0.5)   # A trick from Lutz Gross' version of tests
+        r=base*mask+(1-mask)*base
+        return (r, base)
+
+    def get_expanded_input2(self, rank, fs, cplx):
+        base=self.get_python_input2(rank, cplx)
+        x=fs.getX()[0]
+        mask=whereNegative(x-0.5)   # A trick from Lutz Gross' version of tests
+        r=base*mask+(1-mask)*base
+        return (r, base)
+    
+    def get_tagged_inputL(self, rank, fs, cplx):
+        z=self.get_python_inputL(rank, cplx)
+        ref=self.get_array_inputL(rank, cplx)[0]
+        d=Data(z, fs)
+        d.tag()
+        return (d, ref)   
+    
+    def get_tagged_input2(self, rank, fs, cplx):
+        z=self.get_python_input2(rank, cplx)
+        ref=self.get_array_input2(rank, cplx)[0]
+        d=Data(z, fs)
+        d.tag()
+        return (d, ref)      
+
+    def get_tagged_with_tagL1(self, rank, fs, cplx, set_tags=False, no_first_arg_negative=False, no_zeros=False, mult=1000):
+        ref=self.get_array_inputL(rank, cplx, no_first_arg_negative=no_first_arg_negative, no_zeros=no_zeros, mult=mult)[0]
+        d=Data(ref,fs)
+        d.tag()
+        if set_tags:
+            ref1=self.get_array_input2(rank, cplx, no_first_arg_negative=no_first_arg_negative, no_zeros=no_zeros)[0]*mult
+            for t in fs.getListOfTags():
+                d.setTaggedValue(t, ref1)*mult
+                ref=ref1
+        return (d,ref)
+    
+    def get_tagged_with_tagL2(self, rank, fs, cplx, set_tags=False, no_zeros=False, mult=1000):
+        ref=self.get_array_input2(rank, cplx, no_zeros=no_zeros)[0]*mult
+        d=Data(ref,fs)
+        if set_tags:
+            ref1=self.get_array_input3(rank, cplx, no_zeros=no_zeros)[0]*mult
+            for t in fs.getListOfTags():
+                d.setTaggedValue(t, ref1)
+                ref=ref1
+        return (d,ref)
+    
+    def get_tagged_input1(self, rank, fs, cplx):
+        z=self.get_python_input1(rank, cplx)
+        ref=self.get_array_input1(rank, cplx)[0]
+        d=Data(z, fs)
+        d.tag()
+        return (d, ref)
+    
+    def execute_ce_params(self, pars):
+        for v in pars:
+            a=v[0]
+            op=v[1]
+            misccheck=v[2]
+            ref=v[3]
+            oraclecheck=v[4]
+            description=v[5]
+            res=eval(op)
+            if misccheck is not None:
+                miscres=eval(misccheck)
+                if not miscres:
+                    print("Failed check:"+misccheck)
+                    print(type(a))
+                    print(" vs ")
+                    print(type(res))
+                    print(" values:")
+                    print(a)
+                    print(res)
+                self.assertTrue(miscres,"Failed check for "+description)
+            oraclevalue=eval(oraclecheck)
+            oracleres=Lsup(res-oraclevalue)<=self.RES_TOL*Lsup(oraclevalue)
+            if not oracleres:
+                print("Wrong result:"+oraclecheck)
+                print(type(res))
+                print(" vs ")
+                print(type(oraclevalue))
+                print(" values:")
+                print(res)
+                print(" vs ")
+                print(oraclevalue)                
+            self.assertTrue(oracleres,"wrong result for "+description)
+            
+    def execute_ce_throws(self, pars):
+        for v in pars:
+            a=v[0]
+    def get_expanded_input1(self, rank, fs, cplx):
+        base=self.get_python_input1(rank, cplx)
+        x=fs.getX()[0]
+        mask=whereNegative(x-0.5)   # A trick from Lutz Gross' version of tests
+        r=base*mask+(1-mask)*base
+        return (r, base)
+    
+    def get_tagged_inputL(self, rank, fs, cplx):
+        z=self.get_python_inputL(rank, cplx)
+        ref=self.get_array_inputL(rank, cplx)[0]
+        d=Data(z, fs)
+        d.tag()
+        return (d, ref)   
+
+    def get_tagged_input1(self, rank, fs, cplx):
+        z=self.get_python_input1(rank, cplx)
+        ref=self.get_array_input1(rank, cplx)[0]
+        d=Data(z, fs)
+        d.tag()
+        return (d, ref)
+    
+    def get_array_by_shape(self, s, cplx):
+        dt=numpy.float64 if not cplx else numpy.complex128
+        n=numpy.prod(s)
+        a=numpy.arange(n, dtype=dt).reshape(s)
+        if cplx:
+            a-=((1+numpy.arange(n, dtype=dt))*1j).reshape(s)
+        return a
+    
+    def make_constant_from_array(self, a, fs):
+        d=Data(a, fs)
+        return d
+        
+    def make_tagged_from_array(self, a, fs):
+        d=Data(1.5, getShape(a), fs)
+        if a.dtype.kind=='c':
+            d.promote()
+        for n in fs.getListOfTags():
+            d.setTaggedValue(n, a)
+        return d
+        
+    def make_expanded_from_array(self, a, fs):
+        d=Data(a, fs)
+        d.expand()
+        return d
+    
+    def execute_ce_params(self, pars):
+        for v in pars:
+            a=v[0]
+            op=v[1]
+            misccheck=v[2]
+            ref=v[3]
+            oraclecheck=v[4]
+            description=v[5]
+            res=eval(op)
+            if misccheck is not None:
+                miscres=eval(misccheck)
+                if not miscres:
+                    print("Failed check:"+misccheck)
+                    print(type(a))
+                    print(" vs ")
+                    print(type(res))
+                    print(" values:")
+                    print(a)
+                    print(res)
+                self.assertTrue(miscres,"Failed check for "+description)
+            if oraclecheck is not None:
+                oraclevalue=eval(oraclecheck)
+                if isinstance(res, Data):
+                    res.resolve()
+                if isinstance(oraclevalue, Data):
+                    oraclevalue.resolve()
+                oracleres=Lsup(res-oraclevalue)<=self.RES_TOL*Lsup(oraclevalue)
+                if not oracleres:
+                    print("Wrong result:"+oraclecheck)
+                    print(type(res))
+                    print(" vs ")
+                    print(type(oraclevalue))
+                    print(" values:")
+                    print(res)
+                    print(" vs ")
+                    print(oraclevalue)                
+                self.assertTrue(oracleres,"wrong result for "+description)
+            
+    def execute_ce_throws(self, pars):
+        for v in pars:
+            a=v[0]
+            op=v[1]
+            misccheck=v[2]
+            ref=v[3]
+            oraclecheck=v[4]
+            description=v[5]
+            expected_exceptions=v[6]
+            if expected_exceptions is None:
+                expected_exceptions=(TypeError, RuntimeError)   # These are used for unsupported complex
+            try:
+                res=eval(op)                
+            except Exception as ex:
+                # unfortunately, we don't return a single exception type in this case
+                self.assertTrue(type(ex) in expected_exceptions, "Exception was raised but it was of unexpected type ("+str(type(ex))+")")
+            else:
+                print("Processing expression "+str(op)+" with value "+str(a))
+                raise AssertionError("Exception not raised")
+    
+    def execute_t_params(self, pars):
+        for v in pars:
+            description=v[0]
+            a=v[1]
+            tagcount=1
+            for step in v[3:]:
+                a.setTaggedValue(tagcount, step[0])
+                op=step[1]
+                misccheck=step[2]
+                ref=step[3]
+                oraclecheck=step[4]
+                res=eval(op)
+                if misccheck is not None:
+                    self.assertTrue(eval(misccheck), "Check failed for "+description+" checking "+misccheck)
+                if oraclecheck is not None:
+                    oraclevalue=eval(oraclecheck)
+                else:
+                    oraclevalue=ref
+                if oraclevalue is not None:
+                    oracleres=Lsup(res-oraclevalue)<=self.RES_TOL*Lsup(oraclevalue)
+                    if not oracleres:
+                        print(v)
+                        print(" This step ")
+                        print(step)
+                        print("Failed comparison:")
+                        print(res)
+                        print(" vs ")
+                        print(oraclevalue)
+                        print(" a= ")
+                        print(a)
+                        print(" ref== ")
+                        print(ref)
+                        print(" oraclecheck= ")
+                        print(oraclecheck)
+                    self.assertTrue(oracleres,"wrong result for "+description+" for tag "+str(tagcount))
+                    tagcount+=1
+
+        
+    def execute_t_throws(self, pars):
+        for v in pars:
+            description=v[0]
+            a=v[1]
+            tagcount=1
+            expected_exceptions=v[2]
+            if expected_exceptions is None:
+                expected_exceptions=(TypeError, RuntimeError)   # These are used for unsupported complex
+            for step in v[3:]:
+                a.setTaggedValue(tagcount, step[0])
+                op=step[1]
+                misccheck=step[2]
+                ref=step[3]
+                oraclecheck=step[4]
+                with self.assertRaises(Exception) as err:  
+                    res=eval(op)
+                self.assertTrue(type(err.exception) in expected_exceptions, "Exception was raised but it was of unexpected type ("+str(type(err.exception))+")")                
+                tagcount+=1
+
+    def generate_operation_test_batch(self, supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=None, no_scalars=False, minrank=0, maxrank=4,
+                                      expect_raise_on_ranks=None, expected_exceptions=None):
+        """
+        supportcplx is a boolean indicating whether complex operations should be checked for values (True)
+             or tested to see if they raise (False)
+        opstring is a string of the operation to be performed (in terms of argument a) eg "Lsup(a)"
+        misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
+        opname is a string used to describe the operation being tested eg "inf"
+        update1 and update2 are strings giving code used to update a variable rmerge to  
+            account for tag additions for tagged data.
+            eg:             update1="r2.min()"
+                            update2="min(rmerge, r3.min())"
+            would result in     rmerge=eval(update1) running after the first tag is calculatedand 
+                                rmerge=eval(update2) running after the second
+        """
+        self.generate_operation_test_batch_driver(supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans, no_scalars, minrank, maxrank,
+                                      expect_raise_on_ranks, expected_exceptions, inp_scalar1=self.get_scalar_input1, inp_array1=self.get_array_input1, inp_array2=self.get_array_input2,  inp_const1=self.get_const_input1,  inp_expanded1=self.get_expanded_input1, inp_tagged1=self.get_tagged_input1)
+
+    def generate_operation_test_batch_driver(self, supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=None, no_scalars=False, minrank=0, maxrank=4,
+                                      expect_raise_on_ranks=None, expected_exceptions=None, inp_scalar1=None, inp_array1=None, inp_array2=None,  inp_const1=None,  inp_expanded1=None, inp_tagged1=None):
+        """
+        supportcplx is a boolean indicating whether complex operations should be checked for values (True)
+             or tested to see if they raise (False)
+        opstring is a string of the operation to be performed (in terms of argument a) eg "Lsup(a)"
+        misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
+        opname is a string used to describe the operation being tested eg "inf"
+        update1 and update2 are strings giving code used to update a variable rmerge to  
+            account for tag additions for tagged data.
+            eg:             update1="r2.min()"
+                            update2="min(rmerge, r3.min())"
+            would result in     rmerge=eval(update1) running after the first tag is calculatedand 
+                                rmerge=eval(update2) running after the second
+        """
+        if input_trans is None:
+            input_trans=lambda x: x
+        if expect_raise_on_ranks is None:
+            expect_raise_on_ranks=()
+        pars=[]
+        epars=[]    # operations which should throw
+        if not no_scalars:
+            (f1,f2)=inp_scalar1(False)
+            f1=input_trans(f1)
+            f2=input_trans(f2)
+            pars.append((f1, opstring, misccheck, numpy.array(f2), oraclecheck, opname+" - scalar", expected_exceptions))
+            if supportcplx:
+                (f1,f2)=inp_scalar1(True)
+                f1=input_trans(f1)
+                f2=input_trans(f2)
+                pars.append((f1, opstring, misccheck, numpy.array(f2), oraclecheck, opname+" - complex scalar",expected_exceptions))
+            else:
+                (f1,f2)=inp_scalar1(True)
+                f1=input_trans(f1)
+                f2=input_trans(f2)                
+                epars.append((f1, opstring, misccheck, numpy.array(f2), oraclecheck, opname+" - complex scalar", expected_exceptions))
+        for c in (False, True):
+            if c:
+                cs="complex "
+            else:
+                cs=""
+            for rank in range(minrank, maxrank+1):
+                dest=pars
+                if rank in expect_raise_on_ranks or (c and not supportcplx):
+                    dest=epars                
+                if not no_scalars:
+                    (a, r)=inp_array1(rank, c)
+                    a=input_trans(a)
+                    r=input_trans(r)
+                    p=(a, opstring, misccheck, numpy.array(r), oraclecheck, opname+" - "+cs+"array rank "+str(rank), expected_exceptions)
+                    dest.append(p)
+                (a, r)=inp_const1(rank, self.functionspace, c)
+                a=input_trans(a)
+                r=input_trans(numpy.array(r))                
+                p=(a, opstring, misccheck, r, oraclecheck, opname+" - "+cs+"Constant Data rank "+str(rank), expected_exceptions)
+                dest.append(p)
+                (a, r)=inp_expanded1(rank, self.functionspace, c)
+                a=input_trans(a)
+                r=input_trans(numpy.array(r))                
+                p=(a, opstring, misccheck, r, oraclecheck, opname+" - "+cs+"Expanded Data rank "+str(rank), expected_exceptions)
+                dest.append(p)
+        self.execute_ce_params(pars)
+        self.execute_ce_throws(epars)
+        del pars
+        del epars
+        tpars=[]    # tagged versions
+        epars=[]
+        for c in (False, True):
+            if c:
+                cs="complex "
+            else:
+                cs=""
+            for rank in range(minrank, maxrank+1):
+                dest=tpars
+                if rank in expect_raise_on_ranks or (c and not supportcplx):
+                    dest=epars                
+                test=[opname+" - "+cs+"tagged rank "+str(rank),]
+                (a, r)=inp_tagged1(rank, self.functionspace, c)
+                a=input_trans(a)
+                r=input_trans(numpy.array(r))                                
+                test.append(a)
+                test.append(expected_exceptions)
+                # arguments are new tagged value, operation, extra check, reference_value, reference_check
+                (t2, r2)=inp_array2(rank, c)
+                t2=input_trans(t2)
+                r2=input_trans(numpy.array(r2))
+                if update1 is not None:
+                    rmerge=eval(update1)
+                else:
+                    rmerge=None
+                test.append((t2, opstring, misccheck, rmerge, None,))
+                dest.append(test)
+        self.execute_t_params(tpars)
+        self.execute_t_throws(epars)   
+
+
+    def generate_operation_test_batch(self, supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=None, no_scalars=False, minrank=0, maxrank=4,
+                                      expect_raise_on_ranks=None, expected_exceptions=None):
+        """
+        supportcplx is a boolean indicating whether complex operations should be checked for values (True)
+             or tested to see if they raise (False)
+        opstring is a string of the operation to be performed (in terms of argument a) eg "Lsup(a)"
+        misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
+        opname is a string used to describe the operation being tested eg "inf"
+        update1 and update2 are strings giving code used to update a variable rmerge to  
+            account for tag additions for tagged data.
+            eg:             update1="r2.min()"
+                            update2="min(rmerge, r3.min())"
+            would result in     rmerge=eval(update1) running after the first tag is calculatedand 
+                                rmerge=eval(update2) running after the second
+        """
+        self.generate_operation_test_batch_driver(supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=input_trans, no_scalars=no_scalars, minrank=minrank, maxrank=maxrank,
+                                      expect_raise_on_ranks=expect_raise_on_ranks, expected_exceptions=expected_exceptions, inp_scalar1=self.get_scalar_input1, inp_array1=self.get_array_input1, inp_array2=self.get_array_input2,  inp_const1=self.get_const_input1,  inp_expanded1=self.get_expanded_input1, inp_tagged1=self.get_tagged_input1)
+
+
+    def generate_operation_test_batch_large(self, supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=None, no_scalars=False, minrank=0, maxrank=4, expect_raise_on_ranks=None, expected_exceptions=None):
+        """
+        Uses the same logic as generate_operation_test_batch but uses larger values.
+        supportcplx is a boolean indicating whether complex operations should be checked for values (True)
+             or tested to see if they raise (False)
+        opstring is a string of the operation to be performed (in terms of argument a) eg "Lsup(a)"
+        misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
+        opname is a string used to describe the operation being tested eg "inf"
+        update1 and update2 are strings giving code used to update a variable rmerge to  
+            account for tag additions for tagged data.
+            eg:             update1="r2.min()"
+                            update2="min(rmerge, r3.min())"
+            would result in     rmerge=eval(update1) running after the first tag is calculatedand 
+                                rmerge=eval(update2) running after the second
+        """
+        self.generate_operation_test_batch_driver(supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans, no_scalars, minrank, maxrank,
+                                      expect_raise_on_ranks, expected_exceptions, inp_scalar1=self.get_scalar_inputL, inp_array1=self.get_array_inputL, inp_array2=self.get_array_inputL2,  inp_const1=self.get_const_inputL,  inp_expanded1=self.get_expanded_inputL, inp_tagged1=self.get_tagged_inputL)
+
+    def execute_binary_params(self, pars):
+        for v in pars:
+            a=v[0]
+            b=v[1]
+            op=v[2]
+            misccheck=v[3]
+            refa=v[4]
+            refb=v[5]
+            oraclecheck=v[6]
+            description=v[7]
+            res=eval(op)
+            if misccheck is not None:
+                miscres=eval(misccheck)
+                if not miscres:
+                    print("Failed check:"+misccheck)
+                    print(type(a))
+                    print(" , ")
+                    print(type(b))
+                    print(" vs ")
+                    print(type(res))
+                    print(" values:")
+                    print(a)
+                    print(" , ")
+                    print(b)
+                    print(res)
+                self.assertTrue(miscres,"Failed check for "+description)
+            oraclevalue=eval(oraclecheck)
+            oracleres=Lsup(res-oraclevalue)<=self.RES_TOL*Lsup(oraclevalue)
+            if not oracleres:
+                print("Wrong result:"+oraclecheck)
+                print(" refa=")
+                print(str(refa))
+                print(" refb=")
+                print(str(refb))
+                print(" res=") 
+                print(type(res))
+                print(" vs oraclevalue=")
+                print(type(oraclevalue))
+                print(" values:")
+                print(res)
+                print(" vs ")
+                print(oraclevalue)
+            self.assertTrue(oracleres,"wrong result for "+description)
+
+    def generate_binary_matrixlike_operation_test_batch_large(self, opstring, misccheck, oraclecheck, opname, input_trans=None, minrank=0, maxrank=4, aranks=(2,)):
+        """
+        Generates a set of tests for binary operations.
+        It is similar to the unary versions but with some unneeded options removed.
+        For example, all operations in this type should accept complex arguments.
+        opstring is a string of the operation to be performed (in terms of arguments a and b) eg "inner(a,b)"
+        misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
+        opname is a string used to describe the operation being tested eg "inner"
+        update1 is a string giving code used to update a variable rmerge to  
+            account for tag additions for tagged data.
+            eg:             update1="r2.min()"
+            would result in     rmerge=eval(update1) running after the first tag is calculated 
+        """
+        if input_trans is None:
+            input_trans=lambda x: x
+        pars=[]
+        for ac in (False, True):    # complex or real arguments
+            for bc in (False, True):
+                astr="real" if ac else "complex"
+                bstr="real" if bc else "complex"
+                aargset=[]
+                bargset=[]
+                arange=aranks
+                for atype in "ACTE":   # Array/Constant/Tagged/Expanded
+                    if atype=='A':
+                        for r in arange:
+                            aargset.append((self.get_array_input1(r,ac),astr+' array rank '+str(r), r))
+                    elif atype=='C':
+                        for r in arange:
+                            aargset.append((self.get_const_input1(r, self.functionspace, ac), astr+' Constant rank '+str(r), r))
+                    elif atype=='T':
+                        for r in arange:
+                            aargset.append((self.get_tagged_with_tagL1(r, self.functionspace, ac, set_tags=False),astr+' Tagged rank '+str(r), r))
+                    elif atype=='E':
+                        for r in arange:
+                            aargset.append((self.get_expanded_inputL(r,self.functionspace, ac),astr+' Expanded rank '+str(r), r)) 
+                # Now we have a set of a args, match them with possible b's
+                for v in aargset:
+                    arg=v[0][0]
+                    argref=v[0][1]
+                    adescr=v[1]
+                    rank=v[2]
+                    if rank==2:
+                        brange=(1,2)
+                    elif rank==4:
+                        brange=(2,3,4)
+                    for br in brange:
+                        tshape=(rank,)*br
+                        bargref=self.get_array_by_shape(tshape, bc)
+                        # now convert it to each possbile input type
+                        barg=self.make_constant_from_array(bargref, self.functionspace)
+                        bdescr=bstr+' Constant rank '+str(br)
+                        p=(arg, barg, opstring, misccheck, 
+                           numpy.array(argref), numpy.array(bargref), 
+                           oraclecheck, opname+' '+adescr+'/'+bdescr)
+                        pars.append(p)      
+                        barg=self.make_tagged_from_array(bargref, self.functionspace)
+                        bdescr=bstr+' Tagged rank '+str(br)
+                        p=(arg, barg, opstring, misccheck, 
+                           numpy.array(argref), numpy.array(bargref), 
+                           oraclecheck, opname+' '+adescr+'/'+bdescr)
+                        pars.append(p)           
+                        barg=self.make_expanded_from_array(bargref, self.functionspace)
+                        bdescr=bstr+' Expanded rank '+str(br)
+                        p=(arg, barg, opstring, misccheck, 
+                           numpy.array(argref), numpy.array(bargref), 
+                           oraclecheck, opname+' '+adescr+'/'+bdescr)
+                        pars.append(p)           
+        self.execute_binary_params(pars)
+
+    def generate_binary_operation_test_batch(self, opstring, misccheck, oraclecheck, opname, minrank=0, maxrank=4, no_shape_mismatch=False, permit_scalar_mismatch=True, cap_combined_rank=False, fix_rank_a=None, fix_rank_b=None, support_cplx=True, permit_array_op_data=True, 
+                                                   no_second_arg_zeros=False, no_first_arg_zeros=False, no_first_arg_negative=False, second_large_args=True, first_large_args=True):
+        """
+        Generates a set of tests for binary operations.
+        It is similar to the unary versions but with some unneeded options removed.
+        opstring is a string of the operation to be performed (in terms of arguments a and b) eg "inner(a,b)"
+        misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
+        opname is a string used to describe the operation being tested eg "inner"
+        update1 is a string giving code used to update a variable rmerge to  
+            account for tag additions for tagged data.
+            eg:             update1="r2.min()"
+            would result in     rmerge=eval(update1) running after the first tag is calculated 
+        Note: permit_array_op_data indicates whether cases with a numpy.ndarray as the first
+        argument and Data as the second will be generated. (This is to avoid numpy's interpretation of +)
+        """
+        pars=[]
+        if support_cplx:
+            complexity=(False, True)
+        else:
+            complexity=(False,)
+        for ac in complexity:    # complex or real arguments
+            for bc in complexity:
+                astr="real" if not ac else "complex"
+                bstr="real" if not bc else "complex"
+                aargset=[]
+                bargset=[]
+                if fix_rank_a is not None:
+                    arange=fix_rank_a
+                else:
+                    arange=range(minrank, maxrank+1)
+                if fix_rank_b is not None:
+                    brange=fix_rank_b
+                else:
+                    brange=range(minrank, maxrank+1)
+                amult=1000 if first_large_args else 10
+                bmult=1000 if second_large_args else 10
+                for atype in "SACTE":   # Scalar/Array/Constant/Tagged/Expanded
+                    if atype=='S':
+                        aargset.append((self.get_scalar_input1(ac, no_first_arg_negative=no_first_arg_negative, no_zeros=no_first_arg_zeros),astr+' scalar'))
+                    elif atype=='A':
+                        for r in arange:
+                            aargset.append((self.get_array_input1(r,ac, no_first_arg_negative=no_first_arg_negative, no_zeros=no_first_arg_zeros),astr+' array rank '+str(r)))
+                    elif atype=='C':
+                        for r in arange:
+                            aargset.append((self.get_const_input1(r, self.functionspace, ac, no_first_arg_negative=no_first_arg_negative, no_zeros=no_first_arg_zeros), astr+' Constant rank '+str(r)))
+                    elif atype=='T':
+                        for r in arange:
+                            aargset.append((self.get_tagged_with_tagL1(r, self.functionspace, ac, set_tags=False, no_first_arg_negative=no_first_arg_negative, no_zeros=no_first_arg_zeros, mult=amult),astr+' Tagged rRank '+str(r)))
+                    elif atype=='E':
+                        for r in arange:
+                            aargset.append((self.get_expanded_inputL(r,self.functionspace, ac, no_first_arg_negative=no_first_arg_negative, no_zeros=no_first_arg_zeros, mult=amult),astr+' Expanded rank '+str(r)))    
+                for atype in "SACTE":   # Scalar/Array/Constant/Tagged/Expanded
+                    if atype=='S':
+                        bargset.append((self.get_scalar_input2(bc, no_zeros=no_second_arg_zeros),bstr+' scalar'))
+                    elif atype=='A':
+                        for r in brange:
+                            bargset.append((self.get_array_input2(r, bc, no_zeros=no_second_arg_zeros),bstr+' array rank '+str(r)))
+                    elif atype=='C':
+                        for r in brange:
+                            bargset.append((self.get_const_input2(r, self.functionspace, bc, no_zeros=no_second_arg_zeros),bstr+' Constant rank '+str(r)))
+                    elif atype=='T':
+                        for r in brange:
+                            bargset.append((self.get_tagged_with_tagL2(r, self.functionspace, bc, set_tags=True, no_zeros=no_second_arg_zeros, mult=bmult), bstr+' Tagged rank '+str(r)))                                
+                    elif atype=='E':
+                        for r in brange:
+                            bargset.append((self.get_expanded_inputL2(r, self.functionspace, bc, no_zeros=no_second_arg_zeros, mult=bmult),bstr+' Expanded rank '+str(r)))
+                # now we have a complete set of possible args    
+                for aarg in aargset:
+                    for barg in bargset:
+                        if cap_combined_rank and getRank(aarg[0][0])+getRank(barg[0][0])>4:
+                            continue  #resulting object too big
+                        if no_shape_mismatch:
+                            sa=getShape(aarg[0][0])
+                            sb=getShape(barg[0][0])
+                            if sa!=sb:
+                                if not permit_scalar_mismatch or (sa!=() and sb!=()):
+                                   continue
+                        if isinstance(aarg[0][0], numpy.ndarray) and isinstance(barg[0][0], Data) and not permit_array_op_data:
+                            continue
+                        p=(aarg[0][0], barg[0][0], opstring, misccheck, 
+                           numpy.array(aarg[0][1]), numpy.array(barg[0][1]), 
+                           oraclecheck, opname+' '+aarg[1]+'/'+barg[1])
+                        pars.append(p)           
+        self.execute_binary_params(pars)
+
+class Test_util_base(Test_util_values):
    """
    basic tests on util.py
    """
-   RES_TOL=1.e-7 # RES_TOLerance to compare results
-   DIFF_TOL=1.e-7 # RES_TOLerance to derivatices
 #=========================================================
 #  File writer
 #=========================================================
diff --git a/escriptcore/test/python/test_util_binary_no_tagged_data.py b/escriptcore/test/python/test_util_binary_leftover.py
similarity index 61%
copy from escriptcore/test/python/test_util_binary_no_tagged_data.py
copy to escriptcore/test/python/test_util_binary_leftover.py
index ad6915b..d50eca4 100644
--- a/escriptcore/test/python/test_util_binary_no_tagged_data.py
+++ b/escriptcore/test/python/test_util_binary_leftover.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -24,7 +24,8 @@ http://www.apache.org/licenses/LICENSE-2.0"""
 __url__="https://launchpad.net/escript-finley"
 
 """
-test for unary operations without tagged data
+test for binary operations which don't have new style tests written for them.
+The plan is to remove this file once its tests have been moved over.
 
 :remark: use see `test_util`
 :var __author__: name of author
@@ -42,40357 +43,45522 @@ import numpy
 from esys.escript import *
 from test_util_base import Test_util_base
 
-class Test_util_binary_no_tagged_data(Test_util_base):
-   """
-   test for the binary operations inner, ... without tagged data
-   """
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_float_rank0_float_rank0(self):
-      arg0=-0.63638833874
-      arg1=0.675249449251
-      res=inner(arg0,arg1)
-      ref=-0.42972087524346775
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      res=inner(arg0,arg1*1j)
-      self.assertTrue(isinstance(res,complex),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref*1j)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_float_rank0_array_rank0(self):
-      arg0=-0.0120734848986
-      arg1=numpy.array(0.186721047866)
-      res=inner(arg0,arg1)
-      ref=numpy.array(-0.0022543737516678149)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+class Test_util_binary_leftover(Test_util_base):
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_float_rank0_constData_rank0(self):
-      arg0=0.416970345798
-      arg1=Data(-0.0686904741385,self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-0.028641890754520932,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_float_rank0_float_rank0_offset0(self):
+      arg0=7.0
+      arg1=6.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=42.0
+      self.assertTrue(isinstance(res,float),"wrong type of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
       arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=Data(-0.028641890754520932j,self.functionspace) 
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_float_rank0_expandedData_rank0(self):
-      arg0=-0.702135729267
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.388305302896)+(1.-msk_arg1)*(0.618444759567)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(-0.27264302702700538)+(1.-msk_ref)*numpy.array(-0.43423216227036321)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg1.promote()
-        res=inner(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank0_float_rank0(self):
-      arg0=numpy.array(-0.172668075783)
-      arg1=-0.72035494477
-      res=inner(arg0,arg1)
-      ref=numpy.array(0.12438230219442528)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,complex),"wrong type of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(-0.172668075783j)
-      res=inner(arg0,arg1)
-      ref=ref*1j
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result."+str(type(res)))
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank0_array_rank0(self):
-      arg0=numpy.array(0.367217155332)
-      arg1=numpy.array(0.353427284375)
-      res=inner(arg0,arg1)
-      ref=numpy.array(0.12978456198487195)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(0.367217155332j)
-      arg1=numpy.array(0.353427284375j)
-      res=inner(arg0,arg1)
-      ref=numpy.array(-0.12978456198487195)
+   def test_generalTensorProduct_float_rank0_array_rank0_offset0(self):
+      arg0=0.0
+      arg1=numpy.array(-6.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(-0.0)
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank1_array_rank1(self):
-      arg0=numpy.array([0.17057698496056495, 0.65197508237616231])
-      arg1=numpy.array([0.32087931119793067, 0.47355654012965243])
-      res=inner(arg0,arg1)
-      ref=numpy.array(0.363481689701)
+   def test_generalTensorProduct_float_rank0_array_rank1_offset0(self):
+      arg0=-2.0
+      arg1=numpy.array([-7.0, -5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([14.0, 10.0])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array([0.17057698496056495j, 0.65197508237616231j])
-      arg1=numpy.array([0.32087931119793067j, 0.47355654012965243j])
-      res=inner(arg0,arg1)
-      ref=numpy.array(-0.363481689701)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank2_array_rank2(self):
-      arg0=numpy.array([[-0.035529960222147716, 0.99948208956536089, 0.29174060409603397, 0.80304088757032743, 
--0.22356450624851254], [0.49066384343149982, 0.079758333795518332, -0.99232738609739557, 0.25810714747140073, 
--0.29886716922556156], [-0.69989595642288926, -0.64245939648716655, 0.16655367423389711, -0.95321218749485381, 
-0.21638802862009299], [-0.47773968220001661, -0.23536079683934341, 0.30508717152899334, -0.14545129929727274, 
-0.84846996077931758]])
-      arg1=numpy.array([[0.71176134831396065, -0.11756983608048777, -0.38521912408149217, 0.27444535320199082, 
-0.57303910984221029], [-0.2450861922400549, -0.53694004187819711, 0.45031452258385873, 0.45834369692056742, 
--0.3311126283689303], [0.63516776015807475, -0.60784580998742488, -0.25877736622125513, 0.55939114578330851, 
--0.89510238302072809], [-0.73226548502549438, -0.45276749570816377, 0.0051676384025589606, -0.63694640946938041, 
-0.50513135858382707]])
-      res=inner(arg0,arg1)
-      ref=numpy.array(-0.400418822582)
+   def test_generalTensorProduct_float_rank0_array_rank2_offset0(self):
+      arg0=-3.0
+      arg1=numpy.array([[0.0, -4.0, 2.0, -7.0, -3.0], [-7.0, 4.0, -1.0, 3.0, 0.0], [3.0, 4.0, -3.0, 7.0, -4.0], [5.0, 4.0, 4.0, 
+0.0, 3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-0.0, 12.0, -6.0, 21.0, 9.0], [21.0, -12.0, 3.0, -9.0, -0.0], [-9.0, -12.0, 9.0, -21.0, 12.0], [-15.0, 
+-12.0, -12.0, -0.0, -9.0]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=numpy.array(0.400418822582)
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank3_array_rank3(self):
-      arg0=numpy.array([[[0.89352907932481784, -0.2813007089590529], [-0.69957301452894849, 0.17341921348802947]], 
-[[0.054935566453697016, 0.26169631254615577], [-0.58304701755746646, -0.57114551586649376]], [[0.47352481574743033, 
--0.048416145171658709], [0.93223229353677217, -0.454772692829994]], [[-0.32462211909078809, 0.089935113935614819], 
-[-0.286419458027239, 0.86148561956606584]], [[-0.46565312018771388, 0.68711061108884097], [-0.80180026607064825, 
--0.2937284863457541]], [[0.25592134854363269, -0.76990158619153037], [-0.5453961772646585, -0.3664968003943212]]])
-      arg1=numpy.array([[[0.32367504239132705, 0.14792860294053156], [0.6280980890935608, 0.76580645778924739]], 
-[[0.011893082020882684, -0.82206139884528118], [0.52472067780122855, -0.98039256498560623]], [[0.73565201035010919, 
-0.59105957526157393], [0.26717809906364232, -0.018751742395435533]], [[-0.54650947408049366, 0.40974338641807573], 
-[-0.5411625415474377, -0.55103964175712683]], [[0.17755009800646215, -0.9728086543767589], [0.63120223112293616, 
--0.39282275192220806]], [[-0.51566477827268198, 0.54812090272268477], [-0.7413890093151918, -0.73686610466046076]]])
-      res=inner(arg0,arg1)
-      ref=numpy.array(-0.568960512795)
+   def test_generalTensorProduct_float_rank0_array_rank3_offset0(self):
+      arg0=-6.0
+      arg1=numpy.array([[[-4.0, 7.0], [-1.0, -3.0]], [[3.0, -1.0], [-5.0, -6.0]], [[-6.0, 6.0], [5.0, -5.0]], [[0.0, 6.0], 
+[7.0, 7.0]], [[-6.0, 7.0], [4.0, 5.0]], [[6.0, 1.0], [-5.0, 2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[24.0, -42.0], [6.0, 18.0]], [[-18.0, 6.0], [30.0, 36.0]], [[36.0, -36.0], [-30.0, 30.0]], [[-0.0, 
+-36.0], [-42.0, -42.0]], [[36.0, -42.0], [-24.0, -30.0]], [[-36.0, -6.0], [30.0, -12.0]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank4_array_rank4(self):
-      arg0=numpy.array([[[[0.21900292911625985, -0.60296685402518957, -0.036182884002972315, 0.43073749211345658], 
-[0.17662974671291853, 0.47378352574048255, 0.13148163346860686, -0.9075698563504826], [-0.26566039804635011, 
--0.16850033546278254, 0.07451540452840133, -0.35668991292063268]], [[0.90587343082002314, -0.55800425115866381, 
-0.82036937796381881, -0.52043951259439081], [0.84970150242946874, -0.92369260371025752, -0.1994015294909357, 
--0.3565446913147281], [0.52982924316795788, 0.35685085558316776, 0.8621190418377902, -0.86631488594347084]]], 
-[[[-0.055899301832907478, -0.62636120778693516, -0.98921303748822575, -0.70197234469007541], [-0.40991408807660368, 
--0.053106017924667848, -0.066485118669267873, -0.024378451385486777], [-0.9243594466057472, -0.96050256112690779, 
--0.64964483254915906, -0.99257146022549003]], [[-0.53042944297798789, -0.3730158086125106, 0.21336738115690945, 
-0.50992862268150629], [0.3421173202861485, -0.22668604447876262, 0.27710925912205209, -0.22342248055928193], 
-[0.94642089014990094, -0.86328145577679227, 0.026956203656329336, -0.19213054671644891]]], [[[0.5092821302248649, 
-0.66099009757380012, 0.27398216648635487, 0.79901877176611036], [0.94090012810807888, -0.72354491228080819, 
--0.96828772385126149, -0.22141913324735873], [-0.48542816727608407, -0.76982959274647911, -0.3068381860033953, 
-0.2572561109009035]], [[0.52546472411875222, 0.47516779288045119, -0.63172905926969736, -0.65471479410742206], 
-[0.17532321209404156, -0.87251359508673287, -0.041241206248513462, 0.14482583937594073], [-0.70481434929401998, 
-0.5951965426459036, 0.19848055508804241, -0.90212192321127316]]]])
-      arg1=numpy.array([[[[0.40293190800871881, -0.52178068293538615, -0.0010302315027994613, -0.69940520456709776], 
-[0.51617551422053642, -0.61106171553887001, -0.50747804751707726, -0.13235539501135385], [0.77055869833341051, 
-0.31268222395947043, 0.98450151992025936, -0.24145694940836915]], [[0.10755497690663995, 0.93179498417987583, 
-0.76190767263619685, 0.29396668842920293], [0.49604049008825579, -0.92333650195578332, -0.027861799684368416, 
-0.60296582674521226], [0.60520530056161781, 0.49193959262973541, -0.98823171213192729, 0.26461406021984279]]], 
-[[[0.88914934413791347, -0.1774138189223089, 0.58911406224725549, -0.79660932378069171], [0.12292073845561458, 
--0.11657999170114852, -0.80012642473751705, 0.88884685738952696], [-0.66836072518944745, -0.14373852043843982, 
-0.99356869621344757, 0.82527812224016284]], [[0.94254195204021229, 0.61233093725048682, 0.8263349635204229, 
-0.8169097790734059], [0.67347372348904333, 0.13773189624189031, -0.26566944449497609, 0.73618620492089559], 
-[-0.1682516688141209, -0.65535861723124555, 0.12215518357441701, -0.56159828576022308]]], [[[0.23636310358669732, 
--0.36815150321797252, 0.21433798217009592, 0.44508327099916811], [-0.075644838498539313, -0.22190339086905841, 
--0.062431398652471382, 0.87125454618723563], [0.6058326030522907, 0.99421458438737109, -0.95649568451053169, 
--0.70291984701882626]], [[0.36370399365467687, -0.061169008055809604, -0.033210650166190181, 0.67962607885974613], 
-[0.94337960804017129, -0.31509433991294244, -0.044306808278911758, 0.95119341821522396], [0.38655537876329316, 
--0.29896841578308009, 0.68221891453643635, 0.23502327204928264]]]])
-      res=inner(arg0,arg1)
-      ref=numpy.array(-0.859513882924)
+   def test_generalTensorProduct_float_rank0_array_rank4_offset0(self):
+      arg0=7.0
+      arg1=numpy.array([[[[0.0, -7.0, -6.0, 5.0], [-5.0, 2.0, 6.0, 0.0], [0.0, 1.0, -1.0, -1.0]], [[0.0, -2.0, -1.0, 3.0], 
+[-4.0, 0.0, 2.0, -3.0], [-3.0, -6.0, -3.0, -2.0]]], [[[6.0, 7.0, 5.0, 5.0], [5.0, 1.0, 0.0, -3.0], [0.0, 0.0, -1.0, 0.0]], 
+[[-6.0, 1.0, -7.0, -3.0], [7.0, 7.0, -5.0, 6.0], [-7.0, 1.0, 0.0, 0.0]]], [[[2.0, -2.0, 6.0, -6.0], [-7.0, 2.0, 0.0, -2.0], 
+[3.0, -6.0, -3.0, 1.0]], [[-6.0, 1.0, 2.0, 3.0], [-2.0, 5.0, 4.0, 1.0], [4.0, 0.0, -2.0, -2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[0.0, -49.0, -42.0, 35.0], [-35.0, 14.0, 42.0, 0.0], [0.0, 7.0, -7.0, -7.0]], [[0.0, -14.0, -7.0, 
+21.0], [-28.0, 0.0, 14.0, -21.0], [-21.0, -42.0, -21.0, -14.0]]], [[[42.0, 49.0, 35.0, 35.0], [35.0, 7.0, 0.0, -21.0], [0.0, 
+0.0, -7.0, 0.0]], [[-42.0, 7.0, -49.0, -21.0], [49.0, 49.0, -35.0, 42.0], [-49.0, 7.0, 0.0, 0.0]]], [[[14.0, -14.0, 42.0, 
+-42.0], [-49.0, 14.0, 0.0, -14.0], [21.0, -42.0, -21.0, 7.0]], [[-42.0, 7.0, 14.0, 21.0], [-14.0, 35.0, 28.0, 7.0], [28.0, 0.0, 
+-14.0, -14.0]]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank0_constData_rank0(self):
-      arg0=numpy.array(-0.810401259044)
-      arg1=Data(-0.325113918466,self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(0.26347272885752965,self.functionspace)
+   def test_generalTensorProduct_float_rank0_constData_rank0_offset0(self):
+      arg0=7.0
+      arg1=Data(-4.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-28.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(-0.810401259044j)
-      arg1=Data(-0.325113918466j,self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-0.26347272885752965,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank1_constData_rank1(self):
-      arg0=numpy.array([-0.070866698348063917, 0.050603972040196954])
-      arg1=Data(numpy.array([0.82981473915326354, -0.90417609429403045]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-0.104561132599,self.functionspace)
+   def test_generalTensorProduct_float_rank0_constData_rank1_offset0(self):
+      arg0=3.0
+      arg1=Data(numpy.array([-1.0, -6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-3.0, -18.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[-0.012332909244574752, -0.43045347177805371, -0.56902413378307704, -0.61290486950010425, 
--0.43154713220921792], [-0.19526684671168137, -0.47024244784236813, 0.77901986141687618, -0.71109341477698207, 
--0.32125703210104373], [-0.52994874156774552, 0.91638894385906422, 0.4049789497535381, -0.92738222662475445, 
-0.93783732431033617], [-0.6882772029887636, -0.4796143837430713, 0.34926097584118532, -0.35815861799291304, 
--0.83700114852955054]])
-      arg1=Data(numpy.array([[0.82605893992853674, -0.43129145518369238, 0.42275995124864907, 0.79933162121258117, 
-0.4565204718350151], [-0.43642891929309124, 0.32815803774379337, 0.88547286455610918, 0.47079208955831264, 0.729559199963703], 
-[-0.35223043377128738, 0.4159016971778966, -0.38353234059288832, -0.31502231691509142, 0.31931352402769808], 
-[0.98254332028266433, 0.34217713422490603, 0.7072477440265148, -0.83027415700191431, 0.28019515667625261]]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-0.226903257331,self.functionspace)
+   def test_generalTensorProduct_float_rank0_constData_rank2_offset0(self):
+      arg0=-1.0
+      arg1=Data(numpy.array([[-7.0, 0.0, -7.0, -1.0, -4.0], [0.0, -4.0, -1.0, 3.0, 0.0], [4.0, -5.0, 6.0, -3.0, 0.0], [0.0, 
+-2.0, 3.0, -2.0, 4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[7.0, -0.0, 7.0, 1.0, 4.0], [-0.0, 4.0, 1.0, -3.0, -0.0], [-4.0, 5.0, -6.0, 3.0, -0.0], [-0.0, 2.0, 
+-3.0, 2.0, -4.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=Data(0.226903257331,self.functionspace)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_float_rank0_constData_rank3_offset0(self):
+      arg0=-6.0
+      arg1=Data(numpy.array([[[-6.0, 2.0], [4.0, 2.0]], [[-5.0, -2.0], [-4.0, -3.0]], [[-6.0, 2.0], [-1.0, -4.0]], [[0.0, 0.0], 
+[0.0, 3.0]], [[5.0, 5.0], [-7.0, -6.0]], [[0.0, 5.0], [6.0, 3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[36.0, -12.0], [-24.0, -12.0]], [[30.0, 12.0], [24.0, 18.0]], [[36.0, -12.0], [6.0, 24.0]], 
+[[-0.0, -0.0], [-0.0, -18.0]], [[-30.0, -30.0], [42.0, 36.0]], [[-0.0, -30.0], [-36.0, -18.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank3_constData_rank3(self):
-      arg0=numpy.array([[[0.10241974677245125, -0.5612793405960681], [0.48956883482708147, 0.21824369883334827]], 
-[[-0.94208184708149623, -0.051386571005039627], [-0.91342350452431909, -0.25978647540698407]], [[-0.5951270487657907, 
--0.27571085909871629], [-0.73723013197562359, 0.317886957344657]], [[-0.45037371104994639, -0.029486570998041861], 
-[-0.82789139856903593, -0.94832948730039912]], [[0.27098807734732322, -0.89513169154431971], [-0.24930925111402669, 
-0.97881744824711525]], [[0.08702563256538931, 0.23178250733209138], [-0.67548328336784969, -0.36820646116643152]]])
-      arg1=Data(numpy.array([[[-0.31373964435579982, 0.017883438358496484], [0.6888236499822904, 0.61142611013031667]], 
-[[-0.03634678500533739, -0.63105984256155212], [-0.25953474206005089, -0.016239653369635842]], [[0.24128973568149914, 
--0.21787692878990894], [-0.57616711332523507, -0.97817129188864271]], [[0.009337648257052189, 0.49174072868617746], 
-[-0.15474415928388274, -0.92936833360630899]], [[-0.70978657661432498, 0.87557995989779003], [-0.89720836523803316, 
-0.67329579802870576]], [[0.26372536245876654, -0.76542154521883288], [0.58655422134985846, 
-0.6979828223763247]]]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(0.856438930143,self.functionspace)
+   def test_generalTensorProduct_float_rank0_constData_rank4_offset0(self):
+      arg0=-6.0
+      arg1=Data(numpy.array([[[[7.0, 1.0, -7.0, 0.0], [-6.0, 0.0, -5.0, 4.0], [-6.0, 7.0, 0.0, -5.0]], [[2.0, 3.0, 5.0, -4.0], 
+[7.0, -3.0, 0.0, -6.0], [2.0, -6.0, 7.0, 2.0]]], [[[3.0, 0.0, 1.0, -2.0], [-4.0, -1.0, 0.0, -5.0], [7.0, 3.0, 0.0, -6.0]], 
+[[-7.0, -1.0, 1.0, -7.0], [7.0, 4.0, -1.0, -3.0], [5.0, -2.0, 2.0, 6.0]]], [[[-3.0, -1.0, 7.0, 0.0], [0.0, 6.0, 5.0, 0.0], 
+[2.0, -7.0, 3.0, -4.0]], [[-5.0, 3.0, 5.0, 2.0], [-5.0, 1.0, 3.0, -2.0], [2.0, -3.0, 5.0, -5.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-42.0, -6.0, 42.0, -0.0], [36.0, -0.0, 30.0, -24.0], [36.0, -42.0, -0.0, 30.0]], [[-12.0, -18.0, 
+-30.0, 24.0], [-42.0, 18.0, -0.0, 36.0], [-12.0, 36.0, -42.0, -12.0]]], [[[-18.0, -0.0, -6.0, 12.0], [24.0, 6.0, -0.0, 30.0], 
+[-42.0, -18.0, -0.0, 36.0]], [[42.0, 6.0, -6.0, 42.0], [-42.0, -24.0, 6.0, 18.0], [-30.0, 12.0, -12.0, -36.0]]], [[[18.0, 6.0, 
+-42.0, -0.0], [-0.0, -36.0, -30.0, -0.0], [-12.0, 42.0, -18.0, 24.0]], [[30.0, -18.0, -30.0, -12.0], [30.0, -6.0, -18.0, 12.0], 
+[-12.0, 18.0, -30.0, 30.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
-      res=inner(arg0,arg1)
       ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank4_constData_rank4(self):
-      arg0=numpy.array([[[[0.016639529837428668, 0.84838979094454325, -0.50467114288267378, -0.54181350086674529], 
-[-0.54620830647663876, -0.31499053555167711, -0.48094938871622994, 0.27646333695070058], [0.82724160718728901, 
-0.1737915495866984, -0.34238117387678146, -0.60400537575240221]], [[-0.36746819329091229, -0.64176561322584069, 
-0.52245880667087774, 0.73688903719870424], [0.3179495016926901, 0.85279408078258245, -0.60047774438704749, 
-0.15873638993823813], [0.5076892764693155, 0.84293811414455178, 0.48925585544262318, -0.82237799915319121]]], 
-[[[0.25242600532246828, 0.98620415816453733, -0.67524390609349005, 0.51688560582684695], [-0.69177865939521888, 
-0.63232405584020346, 0.0023024450747841652, -0.79237123558851374], [-0.75432092404493756, 0.79156821576387371, 
-0.053607107332242165, -0.95012768912242951]], [[0.88260562556496636, 0.99069034151790114, -0.53215163846733593, 
-0.3971989742729396], [-0.85212374540238023, 0.50628972942019668, -0.29218975010767423, -0.90647005705651607], 
-[0.13419889681450714, -0.68500671786361833, 0.18920196138340883, -0.16974207058474455]]], [[[0.61164050051299412, 
-0.36642578193074971, 0.37341536941942066, -0.82463585738792067], [-0.08223679232670289, 0.0040037760019404622, 
--0.016299163145779616, 0.84470568309483696], [0.75150985970177553, -0.1990527406518785, 0.35874622129606437, 
-0.22351265216298954]], [[-0.10960282976903146, -0.035365424124620626, 0.91643455408768437, -0.32048481948855656], 
-[0.59775606736847942, -0.60614780477219266, 0.71467667645915967, -0.93549262644917519], [0.41148771993312305, 
-0.17822720261692204, -0.92517551904060591, 0.23574681120190943]]]])
-      arg1=Data(numpy.array([[[[-0.52344546615220522, -0.45296337582365509, 0.63184857984224196, 0.42541233474254758], 
-[-0.23897433488742448, 0.71055269293239243, -0.46634951228173249, 0.076642826379174744], [-0.97484132074029883, 
-0.16864792330825473, 0.95635345134512728, 0.21669053973675578]], [[-0.9069669442268995, -0.21691444531397885, 
-0.15933955144867706, -0.81348324723411847], [-0.31275687451151102, -0.34212629791189086, 0.30384255829756257, 
-0.55895935486113646], [0.85216976110340892, 0.46078915037373602, 0.91937027831781348, -0.3482307708329897]]], 
-[[[-0.45307960753759979, -0.63289481149081328, -0.63520551311755002, -0.92739929533503007], [-0.82080462816910016, 
--0.063643912885194887, 0.7430471470832356, -0.6508836953472783], [0.10170220900992355, 0.77593531995384457, 
-0.91230159203931382, 0.78425954312077284]], [[0.6357266342050405, -0.12466997751467157, 0.32490859933816507, 
-0.1101144072176754], [-0.23463819036749256, 0.64140028824878947, -0.81732691350469833, -0.25015974677132657], 
-[-0.23974953965755108, -0.82125675953865751, 0.97770789947702896, -0.03498443568673304]]], [[[-0.077955029958820754, 
--0.43754142290157572, -0.71454906310952526, 0.33099228123870361], [-0.57320856346297955, 0.57803655157871647, 
--0.46331816432125361, -0.27964923157478383], [0.25214848873585183, -0.14481715104089021, 0.11289539377069313, 
-0.089390090920334897]], [[-0.91410123483641836, -0.86128585400035518, -0.92255914908006731, 0.29388782909507194], 
-[-0.27855479268337269, 0.030076820585910991, 0.98119952695768076, 0.75737484900128438], [-0.31289264565854547, 
-0.04614406591056075, 0.68094161393432828, 0.28036598839232596]]]]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-1.21336440422,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank0_expandedData_rank0(self):
-      arg0=numpy.array(0.685017565314)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.074549723403)+(1.-msk_arg1)*(-0.879253747732)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.051067870020334076)+(1.-msk_ref)*numpy.array(-0.60230426156491856)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(0.685017565314j)
-      if not arg1.isLazy():
-        arg1=arg1*1j
-        ref=-ref
-        res=inner(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank1_expandedData_rank1(self):
-      arg0=numpy.array([-0.33806363855530708, -0.38292988645561055])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.11856789813520696, -0.13776690018680293])+(1.-msk_arg1)*numpy.array([-0.34564715796422996, 
--0.069488375244919798])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.0126715683864)+(1.-msk_ref)*(0.14345991152)
+   def test_generalTensorProduct_float_rank0_expandedData_rank0_offset0(self):
+      arg0=7.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-6.0)+(1-msk_arg1)*(-3.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-42.0)+(1.-msk_ref)*numpy.array(-21.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[0.8235093234178823, -0.039529146873249488, 0.063372460107542938, -0.02619523847089944, 
--0.95775695528662586], [-0.34622913082399309, 0.65703970311335413, 0.13991122080937823, -0.72993544844032421, 
--0.61110494663001846], [0.94702026611810308, 0.28367545790239079, 0.67686520536412309, 0.42751460713834732, 
-0.19113835646707988], [-0.75397238968468683, -0.20449122930723362, -0.21008054171449841, -0.13985634479509779, 
-0.64669654227550311]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.52739632868989683, -0.36965406751101404, -0.39081726084476509, 0.97579405276136999, 
-0.69376649986660421], [0.778547720225927, 0.25692204796805784, -0.57060516104094372, -0.41495750688346966, 
--0.25648389392393289], [-0.33884072596680825, 0.84308494012737856, -0.52829054733196146, 0.65321147965010384, 
-0.48804191576280909], [-0.24641018217509747, 0.087863580087031101, -0.56288330676632148, -0.6022514263107599, 
--0.63532666639301216]])+(1.-msk_arg1)*numpy.array([[-0.14157133127819188, -0.54776353090035768, 0.81467492509210548, 
--0.62049750034243933, -0.37900634079761653], [0.82176313795168232, 0.42864041831927735, 0.24199983631564392, 
-0.41189660175178577, 0.40908911745866505], [0.030519565802787252, -0.68547715815876176, 0.14694228902994233, 
--0.16803721604883659, -0.53884356711170156], [-0.36084080845702471, -0.2746282620691598, 0.63989515977938782, 
-0.26879023564652971, 0.44513874904187345]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.0941431468163)+(1.-msk_ref)*(0.0194138324902)
+   def test_generalTensorProduct_float_rank0_expandedData_rank1_offset0(self):
+      arg0=-6.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([7.0, 2.0])+(1.-msk_arg1)*numpy.array([0.0, -5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-42.0, -12.0])+(1.-msk_ref)*numpy.array([-0.0, 30.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=inner(arg0,arg1)
-        ref=-ref
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank3_expandedData_rank3(self):
-      arg0=numpy.array([[[0.6807678093224121, -0.57723267525409039], [0.70068737825030447, -0.098432327342198533]], 
-[[0.098140634624181322, -0.54424338697813068], [0.71804851090573774, 0.29950212330472437]], [[0.42465927843511464, 
-0.58260173822051264], [-0.40034392645695749, 0.27714450388518275]], [[0.18874402904939913, 0.062894210730298328], 
-[-0.83705822051765666, 0.096190962372082689]], [[-0.75297233787755746, 0.45002414314126327], [-0.72288520216827656, 
-0.70912440219389161]], [[0.14137295031492436, -0.34614151067367471], [0.93935035354863272, -0.83373700012705565]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.10440843510343933, -0.89208525680149098], [-0.62476879751924952, -0.77336672258946537]], 
-[[-0.16279839471814728, -0.0072511576320637428], [0.39123164448829528, 0.29096390323811661]], [[0.43544714395872375, 
-0.19856771196494227], [-0.61262553243481022, 0.92741953379021758]], [[-0.044525429250246829, -0.89645569569903594], 
-[0.60174376712715039, 0.51259492479278346]], [[-0.77538544226011674, -0.68714118832869286], [-0.40232551304269637, 
-0.50588918195801913]], [[-0.95544279028286105, -0.73188009487106576], [0.94088511797831398, 
-0.42873552842727891]]])+(1.-msk_arg1)*numpy.array([[[-0.22185702833951537, 0.60513168028384201], [-0.6423119626413778, 
--0.58036119662568053]], [[0.30081297970455267, -0.6070556981649895], [-0.90233647395001904, 0.62817784677024058]], 
-[[-0.52044268719947984, 0.11509410080733606], [-0.75548193826004817, -0.60670270362377821]], [[0.22643631677427467, 
--0.45635249547105694], [-0.32459092263105682, 0.75218467015134483]], [[-0.045797508987332813, 0.52811472165708517], 
-[0.87346978951632415, -0.44939888990809318]], [[-0.17980683491748972, -0.72256211726739084], [-0.71437002134646899, 
-0.82199165311469602]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(2.29079134711)+(1.-msk_ref)*(-2.46432742627)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_array_rank4_expandedData_rank4(self):
-      arg0=numpy.array([[[[0.15001435572408761, 0.88232864246715459, -0.24610469990288886, 0.67560609162045515], 
-[0.86401150897253132, 0.43421666202257314, -0.86140940673783661, 0.32139301112348884], [-0.45383172852577358, 
-0.52020632092451913, 0.81512898306376735, -0.9742734405822282]], [[0.98066673304755825, -0.94023788286751175, 
--0.40227847101427572, 0.35551124176897919], [0.023933521307637706, -0.53811922182304706, 0.6913422958258757, 
--0.84406449580488818], [-0.50650935800253394, 0.9426192897711656, 0.48842047540240663, 0.94440029359694688]]], 
-[[[0.38346320727782701, -0.87406936246287126, 0.68998833790835068, 0.1571712550522113], [-0.33552688217408133, 
-0.84039147835532146, -0.87599849362515503, 0.47001164445580623], [-0.91299234258139927, -0.17750683498323405, 
-0.36632349854464397, 0.70016097477658779]], [[-0.066200692553295193, -0.058261135948909137, -0.22814373144827504, 
--0.64926256398498539], [0.26196442127305009, 0.64998457480300531, 0.50294142170873934, -0.22074066985171492], 
-[-0.28710043984106881, -0.35115422025792342, -0.023340121762502664, -0.73626684924280084]]], [[[-0.63319886833240191, 
-0.4626606248706171, -0.45536290831045778, -0.6161109835018006], [-0.18669620353738425, -0.34302502854744232, 
-0.09082321884037392, -0.024033185577168048], [-0.64389952822168084, -0.62679870762489798, -0.23800700726467983, 
--0.93865957831833335]], [[0.32502225087125924, 0.28665512174603269, 0.29368673585583949, -0.94801857817809299], 
-[-0.94387554673357887, -0.86999806926650147, 0.23024162709965412, -0.84247401709034264], [-0.26926348184769733, 
-0.09437686600404227, -0.99267356825664055, -0.69396226836589103]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.69982398293267623, 0.41309680911744429, 0.22295573078252606, 0.065367899473801172], 
-[-0.42418776970603456, 0.72498482032837264, 0.58244790217178544, -0.46788783378843202], [-0.16876136986509649, 
-0.25776299059074637, 0.031694131873162279, -0.37723534572713935]], [[-0.33211559209104569, -0.23554524976887059, 
--0.60874446346290112, 0.18836992215618942], [-0.97274913731614254, 0.17533771183253855, 0.76831525607694795, 
-0.36098529286068604], [-0.78559144936195024, 0.85956422754002038, 0.58705783447497617, -0.75059133979061365]]], 
-[[[0.023467803523911757, -0.22375429863866336, -0.83149004680439464, 0.79185129225030026], [-0.63331631885344386, 
-0.56090673973895022, 0.76276329432083534, -0.20867007167164942], [0.14833356982262336, 0.52730370024687101, 
--0.09927133106555841, -0.10049391484766845]], [[-0.1045637502068355, -0.59290766899230785, 0.81880317570587868, 
--0.7594690941697726], [0.50563811016995319, 0.7841853659235094, 0.52355731289255059, 0.012124560297168907], 
-[-0.4414905530370985, 0.37628519305253927, -0.59792951426456353, 0.62279388927523338]]], [[[0.52498756740874608, 
-0.85236651782771622, 0.28393668963979235, -0.97371138479150177], [-0.94199870660473217, -0.7761222781471373, 
-0.28133263444008993, -0.062866327413718448], [-0.6517057507208186, 0.65491103442817566, 0.59299834678865948, 
-0.82740874618675231]], [[0.44012931494554919, 0.99719641511647206, 0.9149812057157205, -0.99082386522433707], 
-[-0.56711688982673825, 0.35833134825795643, -0.20106138526283757, -0.80539330297231193], [0.97328132737404571, 
--0.58869057173184602, -0.60198505227481314, 0.15998823045583488]]]])+(1.-msk_arg1)*numpy.array([[[[-0.3906025329404188, 
--0.66797630599954649, 0.55626332612710394, -0.457068692078344], [-0.78410812521096473, -0.49243638570973625, 
-0.29841020790238093, -0.13552326940959891], [0.5302429043181327, -0.16736605349594891, -0.32299170682193212, 
--0.87075419197777704]], [[0.54629425419275934, 0.93422482754651637, -0.026459574386814344, -0.34680953003122483], 
-[0.29185098278590171, -0.53003159945694334, -0.12574506159971754, 0.65975689963329986], [-0.71584634254643165, 
--0.19571211281268908, 0.46323808195948635, -0.49723992236554437]]], [[[0.027689417062008559, 0.022300669629664371, 
--0.84390270292480429, -0.505113378158903], [-0.54750825000226544, 0.94307048396077531, 0.3108339975708474, 
--0.61172090959047609], [0.43765690868955454, -0.7275628428159473, -0.3370827804832035, -0.059131771918396803]], 
-[[-0.23280105822411001, -0.79969955562783657, -0.81404675045904007, 0.25135673576902229], [0.55826423982562923, 
-0.64622779798664243, -0.16536107142796919, -0.53329031234256563], [0.41394958803272464, 0.10216346250295305, 
-0.18870302903326386, -0.58477587277594778]]], [[[-0.63316090072805942, 0.13981387221419306, -0.71451383537974622, 
--0.0020177533913716683], [-0.88954622708813003, -0.95431668093249011, -0.31610740921578206, -0.78120894488186576], 
-[-0.50298104954776512, 0.33848149773071357, -0.12181804287981279, 0.76299698123850668]], [[0.74324353622072326, 
--0.56716250169963001, 0.39532337596723721, -0.60851190458351456], [0.2290837754652173, 0.48925543744198086, 
-0.22910725686311295, 0.59838985543456413], [0.36495477921428865, -0.98765458011552831, -0.57313136561592271, 
--0.10846619791113143]]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(4.14398942825)+(1.-msk_ref)*(-1.80134112143)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank0_float_rank0(self):
-      arg0=Data(0.240153729026,self.functionspace)
-      arg1=0.494786577508
-      res=inner(arg0,arg1)
-      ref=Data(0.11882484166036042,self.functionspace)
+   def test_generalTensorProduct_float_rank0_expandedData_rank2_offset0(self):
+      arg0=-1.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, 6.0, 6.0, 7.0, 0.0], [7.0, -4.0, 4.0, -2.0, 7.0], [-1.0, -6.0, 5.0, -5.0, 7.0], [-2.0, 
+0.0, -4.0, 3.0, 3.0]])+(1.-msk_arg1)*numpy.array([[-5.0, 4.0, 5.0, -2.0, 7.0], [-6.0, 1.0, -3.0, 3.0, 0.0], [-4.0, 0.0, 5.0, 
+-3.0, 0.0], [-2.0, 6.0, -7.0, 0.0, -1.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-1.0, -6.0, -6.0, -7.0, -0.0], [-7.0, 4.0, -4.0, 2.0, -7.0], [1.0, 6.0, -5.0, 5.0, -7.0], [2.0, 
+-0.0, 4.0, -3.0, -3.0]])+(1.-msk_ref)*numpy.array([[5.0, -4.0, -5.0, 2.0, -7.0], [6.0, -1.0, 3.0, -3.0, -0.0], [4.0, -0.0, 
+-5.0, 3.0, -0.0], [2.0, -6.0, 7.0, -0.0, 1.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      res=res*1j
-      ref=ref*1j
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank0_array_rank0(self):
-      arg0=Data(-0.68099713877,self.functionspace)
-      arg1=numpy.array(0.599013007948)
-      res=inner(arg0,arg1)
-      ref=Data(-0.40792614449895914,self.functionspace)
+   def test_generalTensorProduct_float_rank0_expandedData_rank3_offset0(self):
+      arg0=7.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -5.0], [-6.0, 0.0]], [[3.0, -7.0], [4.0, -1.0]], [[1.0, -6.0], [-6.0, -6.0]], [[0.0, 
+-4.0], [-6.0, 7.0]], [[-3.0, 7.0], [-6.0, 1.0]], [[-2.0, 3.0], [-6.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -4.0], [2.0, 
+1.0]], [[0.0, 0.0], [-7.0, -4.0]], [[-6.0, -1.0], [3.0, -3.0]], [[-4.0, -6.0], [5.0, 1.0]], [[-5.0, 7.0], [-4.0, 0.0]], [[7.0, 
+-7.0], [2.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, -35.0], [-42.0, 0.0]], [[21.0, -49.0], [28.0, -7.0]], [[7.0, -42.0], [-42.0, -42.0]], 
+[[0.0, -28.0], [-42.0, 49.0]], [[-21.0, 49.0], [-42.0, 7.0]], [[-14.0, 21.0], [-42.0, 
+0.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, -28.0], [14.0, 7.0]], [[0.0, 0.0], [-49.0, -28.0]], [[-42.0, -7.0], [21.0, -21.0]], 
+[[-28.0, -42.0], [35.0, 7.0]], [[-35.0, 49.0], [-28.0, 0.0]], [[49.0, -49.0], [14.0, -21.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      res=res*1j
-      ref=ref*1j
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank1_array_rank1(self):
-      arg0=Data(numpy.array([0.033542800183077981, 0.33729160037543515]),self.functionspace)
-      arg1=numpy.array([-0.79953029369586592, -0.40929278080095122])
-      res=inner(arg0,arg1)
-      ref=Data(-0.16486950194,self.functionspace)
+   def test_generalTensorProduct_float_rank0_expandedData_rank4_offset0(self):
+      arg0=3.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[3.0, -4.0, -6.0, 7.0], [7.0, 3.0, 3.0, 6.0], [0.0, -7.0, 6.0, 1.0]], [[-7.0, 1.0, 4.0, 
+4.0], [5.0, 4.0, 1.0, -7.0], [7.0, 0.0, -6.0, 2.0]]], [[[0.0, -7.0, -3.0, 2.0], [1.0, -7.0, 2.0, -6.0], [0.0, 5.0, -1.0, 
+-3.0]], [[-7.0, -1.0, 3.0, 0.0], [5.0, 0.0, 0.0, -6.0], [-5.0, -3.0, 0.0, -5.0]]], [[[-7.0, 0.0, 2.0, -3.0], [0.0, 6.0, -4.0, 
+-1.0], [-4.0, -2.0, 4.0, 7.0]], [[-7.0, 6.0, -5.0, -1.0], [6.0, 2.0, 2.0, -3.0], [-5.0, -7.0, 2.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -4.0, 6.0, -6.0], [7.0, 7.0, -3.0, -2.0], [3.0, -5.0, 0.0, 0.0]], [[3.0, 1.0, 0.0, 
+-1.0], [-3.0, -3.0, 0.0, -3.0], [-3.0, -6.0, 6.0, -2.0]]], [[[-2.0, 3.0, 0.0, -2.0], [0.0, 5.0, -4.0, -3.0], [-5.0, -5.0, -7.0, 
+-1.0]], [[-4.0, -5.0, 2.0, -1.0], [2.0, -1.0, 0.0, 1.0], [6.0, 6.0, 3.0, -4.0]]], [[[-7.0, -6.0, 3.0, -2.0], [-6.0, 7.0, 3.0, 
+-3.0], [-1.0, 2.0, -3.0, 1.0]], [[3.0, -3.0, 0.0, -5.0], [2.0, -6.0, -7.0, 5.0], [-2.0, 0.0, 3.0, 1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[9.0, -12.0, -18.0, 21.0], [21.0, 9.0, 9.0, 18.0], [0.0, -21.0, 18.0, 3.0]], [[-21.0, 3.0, 
+12.0, 12.0], [15.0, 12.0, 3.0, -21.0], [21.0, 0.0, -18.0, 6.0]]], [[[0.0, -21.0, -9.0, 6.0], [3.0, -21.0, 6.0, -18.0], [0.0, 
+15.0, -3.0, -9.0]], [[-21.0, -3.0, 9.0, 0.0], [15.0, 0.0, 0.0, -18.0], [-15.0, -9.0, 0.0, -15.0]]], [[[-21.0, 0.0, 6.0, -9.0], 
+[0.0, 18.0, -12.0, -3.0], [-12.0, -6.0, 12.0, 21.0]], [[-21.0, 18.0, -15.0, -3.0], [18.0, 6.0, 6.0, -9.0], [-15.0, -21.0, 6.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -12.0, 18.0, -18.0], [21.0, 21.0, -9.0, -6.0], [9.0, -15.0, 0.0, 0.0]], [[9.0, 3.0, 
+0.0, -3.0], [-9.0, -9.0, 0.0, -9.0], [-9.0, -18.0, 18.0, -6.0]]], [[[-6.0, 9.0, 0.0, -6.0], [0.0, 15.0, -12.0, -9.0], [-15.0, 
+-15.0, -21.0, -3.0]], [[-12.0, -15.0, 6.0, -3.0], [6.0, -3.0, 0.0, 3.0], [18.0, 18.0, 9.0, -12.0]]], [[[-21.0, -18.0, 9.0, 
+-6.0], [-18.0, 21.0, 9.0, -9.0], [-3.0, 6.0, -9.0, 3.0]], [[9.0, -9.0, 0.0, -15.0], [6.0, -18.0, -21.0, 15.0], [-6.0, 0.0, 9.0, 
+3.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[0.11805480437705862, 0.31753327694424094, 0.73062236450582518, -0.90810070531761888, 
--0.74339066588611802], [-0.87396679950262013, 0.033682508122346633, -0.66916008311259567, -0.61758963219973451, 
--0.014600527977821409], [-0.62476994832958632, 0.94174223303834825, 0.19392565663742545, -0.2183301186062907, 
--0.82572189921234873], [-0.58500710929329358, -0.49464134340105126, 0.43417012225850549, -0.38613577382401987, 
--0.52016166685121545]]),self.functionspace)
-      arg1=numpy.array([[-0.18028690878941611, 0.062613895915825779, 0.38680633581348545, 0.90119541158920313, 
-0.56476663391541426], [-0.64735554161587672, -0.85217678865091129, 0.14569414336970454, -0.91439705751775535, 
--0.58339013293759967], [-0.54453380416009844, 0.6384627434546204, 0.7632588493700363, -0.33123026273510781, 
--0.13210066089445971], [0.26324992126960245, 0.069723410191333324, -0.40664489631445289, 0.76527538981583887, 
-0.90980377502679532]])
-      res=inner(arg0,arg1)
-      ref=Data(0.192897864145,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_float_rank0_offset0(self):
+      arg0=numpy.array(4.0)
+      arg1=-5.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(-20.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank3_array_rank3(self):
-      arg0=Data(numpy.array([[[0.031191586406912997, 0.25749528378875186], [-0.43560426520028694, 0.82186118773863481]], 
-[[-0.27636706429065239, -0.96873716307434288], [0.57212427498318874, -0.89488694319467221]], [[-0.53664653426082554, 
-0.17125910714144532], [0.55223023402118465, 0.7026196657323478]], [[0.47151493133476885, -0.9878569008612994], 
-[0.923273401741177, -0.61291345033616373]], [[-0.21627815010371965, -0.68308350321451483], [0.42003476980191601, 
-0.35437944514165998]], [[0.57930415742194397, 0.15851258736510698], [-0.034124513547037383, 
-0.13910191031173214]]]),self.functionspace)
-      arg1=numpy.array([[[0.4376882511962199, 0.87791312611900185], [0.3872095550010406, -0.80749936076640538]], 
-[[0.99370860605609601, 0.1415181468078317], [0.88396994180208766, -0.080771360869665632]], [[0.10037555131668507, 
--0.30418314544151359], [0.18496158262509454, -0.64787225673616877]], [[-0.63902641553526074, 0.82753535127444788], 
-[0.92366200098645801, 0.71478320656855199]], [[0.87210131386272871, 0.66318134839062681], [0.40332439860072489, 
--0.61714848609477224]], [[-0.026058266846441747, -0.6502882417343101], [-0.039896755710729703, 0.14651276739152008]]])
-      res=inner(arg0,arg1)
-      ref=Data(-2.37679561615,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank4_array_rank4(self):
-      arg0=Data(numpy.array([[[[0.84900275444177553, -0.246217726373545, -0.73088633570089478, -0.047481367331499991], 
-[0.032816845637419156, -0.76812807628518143, -0.81281363329523049, -0.58084890710073589], [-0.73993039657350201, 
-0.83123891495121938, 0.46715743977232393, -0.76686166407968437]], [[0.065941685788379445, 0.6522770195720593, 
-0.55982464930930576, -0.80087140104814658], [0.99239590675011136, 0.31694749481754458, 0.51372543692541339, 
--0.52022278210177308], [-0.32907326950409344, -0.55598341424051401, -0.067704116072573095, 0.31263074534856905]]], 
-[[[-0.23768937860779404, -0.80388720531878, -0.95492614309454349, -0.76905056297799268], [-0.28127606377571679, 
--0.15077250683701848, 0.077788021738735891, -0.20476199518683469], [0.53944050035171465, -0.76150320944042771, 
--0.41896215933942926, 0.029055212182700796]], [[-0.58861237768203778, -0.10490589957463636, -0.20817583378648052, 
-0.45198229030492376], [-0.50700996207133375, 0.90434965349211405, -0.92835653637992666, -0.83045937562172556], 
-[0.13469897080944304, 0.84359291895905919, 0.79200244141954079, -0.19219096641228584]]], [[[0.93312085161368596, 
--0.049735922253603126, -0.2192679149037029, -0.25989030793661816], [0.72644194255242556, 0.74091598098057099, 
--0.30432653743395388, 0.21345622350494531], [-0.97093017386630387, -0.70687128737696248, 0.59112558415095928, 
-0.49788697633828582]], [[0.80030801684525965, -0.029383632137730986, -0.021414167385272354, 0.39283038151162608], 
-[-0.33822921166771125, -0.26639948236330291, -0.53349415516836562, 0.020369480646021065], [0.51135584516748556, 
--0.3710959845124091, 0.26001287550270291, -0.85402920503239654]]]]),self.functionspace)
-      arg1=numpy.array([[[[-0.60896275596671168, -0.96198549401243993, 0.87828678808797989, 0.20466313727661678], 
-[-0.60814598635215744, -0.42907263934755946, 0.34070813799556454, -0.44693550838732787], [-0.45080256697753263, 
-0.38604990495638059, 0.80729145776923339, 0.73718833304242581]], [[-0.035964177002679509, 0.94827643636590153, 
--0.26496089896423247, 0.17351685300419173], [-0.86296994839532148, -0.34374708342173599, 0.93025018200816256, 
--0.51672268415125755], [0.44209583101516747, -0.96811144437281405, 0.4995052724717195, 0.9123136046672522]]], 
-[[[0.088471951920575664, -0.6656163426311541, -0.09894089828246333, 0.069975899888207627], [0.19541385901389585, 
-0.69922988340466619, -0.50164250295332447, -0.50835814069727259], [0.21174890510515954, 0.1461844479384613, 
-0.71251500577579563, 0.47855838895259528]], [[-0.71000611047816142, 0.18410545018704094, -0.16709456416117296, 
-0.7936780300267583], [-0.37262949205049356, -0.55397580023642123, 0.24386454933063217, 0.47508493827539522], 
-[0.19879432084889914, -0.090159004691243494, -0.76971400164621384, -0.79794747780441577]]], [[[-0.074209069031669017, 
--0.087535757179307172, 0.14630099406390684, 0.37408318110918937], [0.90736322792861746, 0.56357314444323792, 
--0.031967808854433954, -0.48045831936901751], [-0.87344873813351165, 0.96387391665293354, 0.27247943246116457, 
--0.097155528382333989]], [[-0.21814477511318953, 0.32096345155185513, 0.91631079955393258, -0.53655097537736762], 
-[-0.44317638848986629, 0.77227497773824183, 0.56920867302973188, 0.021731072527379158], [0.89544436460468901, 
--0.81538646463898146, 0.025217872921130091, -0.2345693190627598]]]])
-      res=inner(arg0,arg1)
-      ref=Data(1.37543330539,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank0_constData_rank0(self):
-      arg0=Data(-0.109880112782,self.functionspace)
-      arg1=Data(0.679037989257,self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-0.074612770843086082,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank1_constData_rank1(self):
-      arg0=Data(numpy.array([-0.38855187589347273, 0.14448607308006922]),self.functionspace)
-      arg1=Data(numpy.array([-0.60202560601945909, -0.80720775185258908]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(0.11728790033,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[0.86706829877617553, 0.49321667183194462, -0.46368761238578982, 0.29128551483742715, 
--0.92830470873637738], [0.29788055279544867, 0.43176703576888875, -0.85641119676627464, 0.46156140731641848, 
-0.72244217301749325], [0.44947710909496763, -0.075355916107305854, -0.41900674017982698, 0.75202312792256043, 
-0.22573770677908533], [0.0031182461358558733, 0.71442090495797195, 0.54936572245556348, -0.74234307901918961, 
--0.5861969161328362]]),self.functionspace)
-      arg1=Data(numpy.array([[-0.76298566426626668, 0.42924119580309217, 0.088601689342662659, -0.92253185082545741, 
--0.10621318192598928], [0.6270532350670448, 0.85936605057441562, 0.46565958269064978, -0.87889242410910473, 
--0.08233008340904413], [0.8819854104670195, -0.80865701059438289, -0.050226129858086166, 0.033418509554747455, 
-0.90566607852023706], [-0.74726523489863084, 0.99737958054864184, 0.56971288996407088, -0.9525569131192575, 
--0.41645026842223332]]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(1.71527222467,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank3_constData_rank3(self):
-      arg0=Data(numpy.array([[[0.15940026922242234, 0.15456201881086518], [0.59670596059649061, -0.78199474933041069]], 
-[[-0.40931306095332465, -0.30330934407899113], [-0.41127966248227921, 0.87766929968889151]], [[-0.50526082253226456, 
--0.55791104709617079], [-0.46341249236547877, 0.94360358235444308]], [[-0.085176359264879542, 0.99973232174249427], 
-[0.14305711539257082, -0.16880638300304596]], [[0.34290503849199472, 0.17643564090355612], [-0.063107186944666438, 
-0.90573192192593233]], [[0.046518471261303596, 0.099777293593690031], [0.27897146863434386, 
--0.11021578865267534]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-0.020655884066142161, -0.63581685932798959], [-0.028189504194750636, -0.33312032709984463]], 
-[[0.18371093040455544, 0.53810369487480392], [-0.6278500905042923, -0.23388196616213763]], [[-0.6265531075236217, 
--0.81242119009526403], [0.85751366598472889, 0.47472755352559814]], [[-0.25421798028957743, 0.76915921038357227], 
-[0.23926613772390404, 0.90786986627874433]], [[-0.32449040895249714, 0.72903050951989146], [0.85899390598941605, 
-0.14162684860538022]], [[-0.47547023426125623, 0.52010210858651917], [-0.026594493728175239, 
--0.85487359950804409]]]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(1.65664288426,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank4_constData_rank4(self):
-      arg0=Data(numpy.array([[[[-0.77842547938200712, -0.27838514037726103, -0.89144217523800173, 0.0054425153781361146], 
-[0.99706601886824098, 0.78178928147355919, -0.48010670862462801, 0.69424527709964767], [0.66013789019771019, 
-0.45824582488789067, -0.96353240437680876, 0.834555866938125]], [[0.3621919162667917, 0.25713435067190016, 
--0.72525415889975187, -0.37623226602641213], [-0.53778025315253108, -0.27139019205119497, -0.067900376115989092, 
-0.4568352783260623], [-0.41907694255774697, -0.2194008083746839, 0.66797370775622289, 0.26820893540122404]]], 
-[[[-0.40605657137194817, -0.12790178125270946, -0.17410735990789283, -0.15888167658286534], [-0.16153499568694052, 
--0.85631531260351879, -0.049876455481712823, -0.46438180769276838], [-0.44000243900407199, -0.40478747773712298, 
-0.92325256219560048, -0.35254132751685119]], [[-0.98549823069498244, 0.51509155773569848, -0.35801892388132384, 
-0.41842044524973021], [-0.81537594633586319, 0.0061482420516145719, 0.73869381108433863, 0.10350459228602715], 
-[0.6485592561496587, 0.29062672359343233, 0.67430545525394114, -0.87352827882424622]]], [[[0.90625102942488267, 
-0.57609384066425284, 0.94149558862395133, 0.13561300628620221], [0.051759965405846264, -0.73180643620986086, 
-0.15917838120678218, -0.19984359746002767], [-0.75895521708451175, 0.02467549025441973, -0.71190411029359635, 
-0.064476244560973006]], [[0.010518277032398826, -0.47261451925786702, -0.72252534248328493, -0.88093533929134749], 
-[0.7554786003180507, -0.53706340160103583, -0.89826064239038872, -0.70850211109993722], [-0.065050104790129737, 
-0.59873154953592889, -0.27115597493835475, 0.60224768895299086]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-0.20249524630900306, -0.96774449919067917, -0.52843683450160439, -0.46516378685072324], 
-[0.97628567894067331, -0.3008376220458906, 0.2085767180427871, -0.64493892545106712], [0.63542883246455828, 
--0.75580660556926271, -0.11642715040710971, -0.57722651873841335]], [[0.9635443621483939, -0.45469939476511745, 
--0.41046595433690669, -0.00087468895810327574], [-0.0064587635049175862, -0.85926878616987445, -0.89729357458235381, 
-0.73746038100106448], [0.011783382508033791, 0.032903862162879216, -0.37599153545615205, 0.59273806574501897]]], 
-[[[0.45474791914542756, -0.53886378385785316, 0.72930018614416792, 0.3818111441831058], [0.819037183960172, 
-0.064783887997734713, -0.67285340441766239, -0.82697093043866676], [-0.41303793669871669, 0.65375901690488325, 
-0.48148908822783976, 0.61591587360434841]], [[0.54012711113369427, -0.63211866188134502, -0.073210952913265626, 
--0.81920966825262687], [-0.51175703045000764, 0.19787169073795052, -0.21697146593273309, 0.063276039413608931], 
-[0.32218457663689404, -0.064958869530121088, -0.35773287769104711, -0.74493151067112429]]], [[[0.17263744713312823, 
--0.8114330555959357, 0.062894929516047027, -0.73765216130276956], [-0.10051063265176641, -0.094306413867799588, 
-0.90282523931118108, 0.6151602807402341], [0.88428575660803332, -0.031152847200344835, -0.52110285906370746, 
--0.52480281782828131]], [[-0.5571306490178789, 0.67789963231677008, 0.79860247005714258, 0.44194411259296795], 
-[-0.27253617209725989, -0.24175511809765515, 0.32343391507911723, 0.48083522723160876], [0.9522975767175601, 
-0.15975334942746611, -0.76757362234650128, -0.9820616906911519]]]]),self.functionspace)
-      res=inner(arg0,arg1)
-      ref=Data(-1.34087782434,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=inner(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank0_expandedData_rank0(self):
-      arg0=Data(0.504999017422,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.949315936357)+(1.-msk_arg1)*(0.226218043381)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.47940361508382373)+(1.-msk_ref)*numpy.array(0.11423988963078481)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank1_expandedData_rank1(self):
-      arg0=Data(numpy.array([-0.081888632374237824, -0.70704843929112626]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.63647001611409015, 0.28001115497616635])+(1.-msk_arg1)*numpy.array([-0.95518664215107396, 
--0.099716134713024651])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.145861790943)+(1.-msk_ref)*(0.148723065209)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[-0.57859909800275866, -0.87214342898618158, 0.016011568175356761, -0.23815542580177862, 
-0.60391292640371552], [0.35788399426640716, 0.017142972407319101, -0.2967562302731197, 0.3534441869214251, 
--0.90980604318790004], [-0.07925842687212481, 0.47853292187338226, 0.64048368330147909, 0.14555091638444151, 
-0.28561330493337755], [-0.3552511008600614, -0.38420485695947626, 0.26739266799421046, -0.60565377378093421, 
-0.11194898284027333]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.93077040816398893, 0.90091471866981743, 0.065383612598433727, 0.6037065816632452, 
--0.74867109215247041], [-0.63866698099654573, 0.53705324255622111, 0.53082384464137666, -0.05830484773571265, 
--0.25706797972194462], [0.09395735902475999, -0.73147043052977256, 0.4501866674408872, 0.7474043741109182, 
--0.95363680556286257], [-0.16128566467235839, 0.82346724291291906, -0.76766336820905723, 0.84787123161224653, 
--0.58085210405634502]])+(1.-msk_arg1)*numpy.array([[-0.45783242037211935, 0.64404206556021504, -0.43367995912720581, 
-0.68924549824928949, 0.67655360249298435], [-0.58959025803189502, 0.4825575464599865, -0.36957742684587358, 
--0.68246492861111885, 0.61875212284828685], [0.12481128840438638, 0.31263132178344266, -0.49457193786999665, 
-0.55938196857186795, -0.72677278202984485], [0.41178913492830782, -0.43314660108339909, 0.93644188167580755, 
-0.17440462131539314, 0.40728030234091483]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-2.28127930167)+(1.-msk_ref)*(-1.04924200455)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank3_expandedData_rank3(self):
-      arg0=Data(numpy.array([[[-0.78262529392534508, 0.19262299116314141], [0.40314342927705571, 0.56765433666196907]], 
-[[-0.077381984119281988, -0.10070169049292366], [0.73590227931222296, 0.67072024003607411]], [[0.52384371186421408, 
--0.12399733883675723], [0.6575827271672896, -0.072890130875433945]], [[0.69043721918464129, 0.25684356518514662], 
-[0.64215553103016898, 0.79678359995253389]], [[-0.34984047601112822, -0.52668353895434161], [0.64670167849951898, 
-0.073109332448158648]], [[0.19460045426646722, -0.27300730637033577], [-0.3615187862955016, 
-0.66093465992733225]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.56847726275050459, 0.22553822811057311], [-0.50483648978341789, 0.18596122471399257]], 
-[[0.82907064642940376, 0.39924212625792066], [-0.61560545397453392, -0.77936842489418856]], [[0.22312691317620548, 
-0.33763279650280675], [0.25967515105910666, 0.83249352707317881]], [[-0.5125813274545159, -0.24474831588504764], 
-[0.61761543752610981, -0.90901051596869187]], [[0.96045364618153561, -0.63252896492430533], [0.30994914138101914, 
-0.19728471412527138]], [[0.5793481344933038, 0.98228090549135483], [0.56156762048276998, 
--0.43886014095897963]]])+(1.-msk_arg1)*numpy.array([[[-0.072477101298686453, -0.88184779719335049], [0.71644251282215632, 
--0.4218857555860287]], [[0.49993394558426107, 0.51515328476076028], [-0.40601362900867066, 0.96411337080457771]], 
-[[0.36949361406832071, -0.56377042221000795], [-0.26007700280810964, -0.32112177435121891]], [[0.033011707625483888, 
--0.19851785034552694], [-0.3443811451793517, 0.74419473885301524]], [[-0.81079826467032756, 0.029779666629704549], 
-[-0.57319734205670558, 0.15998162467162769]], [[-0.61086054296645664, -0.92839666154121758], [-0.40381664895113789, 
-0.41316312614238138]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-1.68558433172)+(1.-msk_ref)*(1.11559168604)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_constData_rank4_expandedData_rank4(self):
-      arg0=Data(numpy.array([[[[0.20663983007903708, 0.30744479922588486, -0.61313072201040253, 0.25088112795266682], 
-[0.33976801897833919, -0.064270205661395075, -0.85843808732189264, 0.50003701608777096], [-0.22943788417321742, 
-0.74280772825811958, -0.0089561666890796143, 0.20113324496421714]], [[0.88307214121599276, -0.39885344149136404, 
--0.3459359788500429, 0.25014778756241052], [-0.88472844025773534, 0.74531568368805612, -0.72531133224660183, 
-0.10223747230426095], [0.53780460336790248, -0.85214383675588068, 0.44977767427703097, 0.41749848532253431]]], 
-[[[0.810262475188956, -0.83945779116489216, -0.40109970785754068, 0.81761928138724738], [-0.64032533906144784, 
--0.20290569312629381, -0.7513065784748898, -0.11353011082332332], [-0.04329051434534259, -0.53099678691971941, 
-0.72579753561683891, 0.10912003488729338]], [[0.25838798321207412, -0.024144789607555728, 0.037189255130095189, 
-0.83617814730817952], [-0.057771627027428885, 0.57135552620608943, -0.29473564102969707, 0.22430933502957195], 
-[0.0066994836377327616, -0.10368706774933312, -0.043730730137522489, -0.48065952960266367]]], [[[-0.43491153992500364, 
-0.88082656940550486, 0.68378859836467565, -0.012356816132639503], [0.62178344914568107, 0.25078866625698182, 
--0.17819520948670231, 0.77144460986479291], [-0.13233066669247773, -0.52312935440794983, -0.69513281910345093, 
-0.35433089338923129]], [[0.98606210920219017, -0.48210615134767609, 0.39736669460124818, 0.4619219074410863], 
-[0.29477660552266371, -0.048973046813332921, -0.90547262460988409, -0.3696640293795237], [0.24863189129449159, 
-0.042312225378325463, -0.5264617262481659, 0.63154246835173189]]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.089737235920831493, -0.56346650919450236, 0.28624099902385591, -0.075846454418770026], 
-[-0.95811348785909334, 0.2752992871874782, 0.13840105973254935, 0.27184883084441624], [0.0074529560285576668, 
--0.90632485195229795, 0.24414236087203656, 0.69344832107210985]], [[-0.99378322357862214, 0.7208847594355694, 
-0.89881914525516038, -0.97829419124154593], [-0.45862576369309904, -0.92319150295659647, -0.013676613305693364, 
-0.49602557059441765], [0.8901810990644663, -0.49566489033100725, -0.37871731857378066, -0.36883668970072847]]], 
-[[[0.18437957632400348, -0.12147921286972108, -0.393537207341218, -0.10680783054154741], [0.59524170515902464, 
--0.66587261729761993, 0.92947386439191648, -0.59547765733667379], [-0.41650352833637716, 0.47904744601647264, 
-0.25048486764121192, -0.41733337222442124]], [[-0.79428459272932228, 0.5722780947544559, 0.12114888559828185, 
-0.56254489926953277], [-0.34164943537144987, 0.81303102768839741, -0.038515748676847927, 0.41404092010551152], 
-[0.20093724259501333, -0.88224230847965268, 0.51276578069438661, 0.72798848537859406]]], [[[-0.45399090015655497, 
-0.79734969926852561, 0.59881323493903804, 0.8863764997702912], [0.73518245422321593, -0.84664030571345616, 0.38783733192343139, 
-0.10097672989077644], [-0.20113660943856826, 0.47646146092328245, -0.45757028576837544, -0.88890427591403598]], 
-[[0.83506841533390697, 0.6716787741303738, -0.10053183201377869, 0.11446135026109738], [-0.41932879449869054, 
--0.53813698492040141, 0.79149344313352699, -0.6411930529087273], [0.97161445556347514, 0.30396839332542291, 
-0.43157396752624089, 0.34620878385763731]]]])+(1.-msk_arg1)*numpy.array([[[[-0.2365951445271044, 0.75967395787052205, 
--0.030266120399357277, -0.062905760835206603], [-0.0034883077622471781, -0.11075118427509789, 0.13174467113806743, 
-0.14259302169144994], [0.85476603592412981, 0.14614550828496253, -0.52196009130408605, 0.81755710115293234]], 
-[[-0.94646680517447002, -0.10727315772865564, 0.61196965517547364, 0.45137437283758808], [0.10990216419068144, 
--0.65862678223718785, -0.84446480541514646, -0.49352662713553697], [0.34069886888804035, 0.59232100391463494, 
--0.45038974037479473, 0.93140701293250738]]], [[[-0.24206999953430408, -0.67008991280004926, 0.29703689217222728, 
-0.34177624779386373], [0.42746834677094858, 0.89522807405287197, 0.81107598861107144, -0.38725554644468985], 
-[0.010653314070785402, -0.53865696273892572, -0.18015869599227829, -0.98478472344271717]], [[-0.29749384360660525, 
-0.91543915007368271, 0.65063936887232066, -0.64142279626575327], [-0.6680021459857739, -0.59184516083841476, 
--0.99887826884567055, -0.77809132563010275], [0.97229142472558627, -0.84596239894234082, 0.41786543173372448, 
-0.48987897019575266]]], [[[-0.94580762978353428, 0.48552438448269752, 0.10135988934582585, 0.1698050051381188], 
-[0.57086484517167979, -0.72706535861218913, 0.59049934683374494, 0.01124997633120417], [0.85945579027607155, 
--0.17921010647927127, -0.60581393629582103, -0.70955535208358023]], [[-0.45839119112204441, -0.71839988876461813, 
-0.56529846008009965, 0.27304931740440574], [-0.802780743166704, -0.2200444749049042, -0.60485461325660217, 
--0.54399770036370776], [-0.72600872797946381, -0.98033359034866319, 0.53661806935321499, 0.44150780904733433]]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-1.15490107051)+(1.-msk_ref)*(-0.542684806247)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank0_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.796068672144)+(1.-msk_arg0)*(0.141569698859)
-      arg1=-0.603765866012
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(-0.48063909124250953)+(1.-msk_ref)*numpy.array(-0.08547495183288302)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank0_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.62865123941)+(1.-msk_arg0)*(0.56747818964)
-      arg1=numpy.array(0.933535236912)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.58686808371773458)+(1.-msk_ref)*numpy.array(0.52976088620826978)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_array_rank0_offset0(self):
+      arg0=numpy.array(-3.0)
+      arg1=numpy.array(-7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(21.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=inner(arg0,arg1)
-        ref=-ref
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank1_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.39152578782990766, -0.52109249508064992])+(1.-msk_arg0)*numpy.array([-0.11199372735313928, 
-0.6249548954816011])
-      arg1=numpy.array([0.21561276669150931, 0.99522225948885312])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.603020808702)+(1.-msk_ref)*(0.597821745753)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank2_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.85357846934618076, 0.2964009731213777, -0.023080151467793186, -0.27661013218309982, 
-0.91448024743450684], [0.038642001670084358, 0.45125127830899081, 0.078079050913618886, 0.15283070827828116, 
-0.11079659530969765], [0.75962692381603292, 0.35160201211707931, 0.18704639739340623, -0.54900920331954639, 
--0.22652306109506082], [-0.45955692269483905, 0.044781495048763054, -0.2231804184681454, 0.2212845809191446, 
--0.53383944584935916]])+(1.-msk_arg0)*numpy.array([[-0.83645714719341768, 0.96709801321284594, -0.058716806047270031, 
-0.79069168020660108, -0.006189196069628089], [0.76088034415206862, 0.35707511806818282, 0.49950296883713152, 
--0.14173588322467801, -0.93983638713043782], [-0.41603986165671203, -0.43918722106447605, 0.59689715924249764, 
-0.70425582964428801, 0.21973881370350368], [-0.62574249966976314, 0.2359074345188692, 0.95673105277827286, 0.73034029598894068, 
--0.46841895831725866]])
-      arg1=numpy.array([[-0.55385492909427314, -0.47641952194387671, -0.89304150409657335, -0.87332537255000009, 
--0.44614032725195774], [0.68166147218263906, -0.81572051421033853, 0.6817858041358531, 0.80364966651683156, 
-0.69869146527717207], [-0.28246872658949052, 0.7565359744867568, -0.58420487370735263, -0.053675921069090915, 
-0.012529594167807634], [0.84491978275008273, 0.20578097220399294, -0.83873899314782618, -0.62655075305381036, 
-0.037134445285017748]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.284110545531)+(1.-msk_ref)*(-3.19151566867)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank3_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.50531540411783182, -0.84947843142415125], [-0.95083916187690498, -0.21527209334022501]], 
-[[0.2583894311796151, 0.54220175557198469], [0.65696482234713316, -0.55740417358634153]], [[0.29656481425005188, 
--0.31044204944929144], [0.50754888593660263, 0.38016247619963761]], [[0.69329849552127065, 0.58139227981628316], 
-[-0.051956674604789699, -0.43018500683995664]], [[0.3632473698109191, -0.52776919844933068], [0.2062693834122924, 
-0.37147496020488502]], [[-0.3209875527716135, -0.33881385226990934], [-0.41746150569840856, 
-0.49408272714889878]]])+(1.-msk_arg0)*numpy.array([[[-0.41041698765894008, 0.89834680164904657], [0.55229868254055225, 
--0.045937486672473327]], [[-0.57946737794748171, 0.82419491486371754], [0.52384160056564988, 0.66720084983331551]], 
-[[0.92072943418247588, 0.044221354735691332], [0.47640305718056308, 0.041941185364050781]], [[-0.59582446422571267, 
-0.54567956683968699], [-0.40584249131142558, -0.44707794880717588]], [[-0.47053963882295413, -0.63790818284295314], 
-[0.83414330884494636, -0.48717768922188109]], [[0.082591022081887511, 0.19857141903282627], [-0.10712395103176831, 
-0.79089222821183669]]])
-      arg1=numpy.array([[[0.49639001737089017, 0.99796022318233724], [-0.26032037322246437, 0.87839121298696399]], 
-[[-0.70668657882973518, -0.052141122088173564], [-0.92298831309774809, 0.10209313818414234]], [[-0.015592425837284374, 
-0.24294783103686157], [-0.066724432625728358, 0.18394037896882964]], [[0.86297004238084862, 0.02978315080350713], 
-[-0.42676542085722868, -0.21841822625410234]], [[0.71093267788754444, 0.70330080989264721], [0.22278712618694252, 
-0.71358709166414203]], [[0.70882998330176572, -0.18543709228630068], [0.80986692291703566, -0.66366121056967531]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-1.35746173436)+(1.-msk_ref)*(-1.32984776059)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank4_array_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.019006423843182851, 0.97637325818737142, -0.3778371247022172, -0.24522935505580201], 
-[0.25482670730200452, 0.49070982279658582, -0.13970200142272571, -0.69060997302262028], [-0.0035452601352568003, 
-0.42044690617808511, 0.23511837122113199, -0.52221931154567769]], [[0.19381933190495082, 0.50012173987864328, 
--0.2386525690285064, -0.37667383268862786], [-0.90971892925469122, -0.35065845094282455, 0.8087148795715664, 
--0.44030179135579273], [-0.13870392554075761, -0.04716338746550508, -0.29904290935096611, -0.79131372436671921]]], 
-[[[0.44896770989300028, -0.53803971979467313, -0.25044275134156724, -0.38914200762310536], [0.68803157043978946, 
-0.58126023831649132, -0.57827031016518915, 0.86926678146573488], [0.21238462391570478, -0.033692118582254516, 
-0.89777850769742762, -0.95875294470846728]], [[0.11907635360994329, 0.98460261094680579, 0.86174977469907055, 
--0.26058948337859], [0.086267828609031483, -0.91293579034927186, -0.38540499021322527, 0.12009708559161325], 
-[0.73392875969958893, 0.18353973800235357, 0.52212765409565609, 0.37309668927918338]]], [[[0.51977741225129326, 
-0.59772951631814597, -0.87702243675428693, -0.46372790641150741], [0.36789568031225017, 0.89534194799267564, 
--0.23506346221068353, -0.55222847869683522], [0.16542389254588907, 0.14294883580010453, 0.089959855117651921, 
--0.68981061483411676]], [[-0.41115958809013176, -0.986489932594244, -0.96413374324085255, 0.32322608077112491], 
-[0.18297301423492152, -0.22781262416705839, -0.024144967009124052, -0.24163855793719113], [-0.058032940521662413, 
--0.24375443215880965, -0.078100049154545825, -0.57894164618957267]]]])+(1.-msk_arg0)*numpy.array([[[[-0.40001705419647693, 
--0.67263334791472262, -0.78918590831661017, 0.78865053701091914], [-0.090034058366400105, -0.37881095982421065, 
-0.91867249206684143, 0.83980019508043813], [0.67448518939744662, 0.96143694144932024, 0.78309732697025192, 
--0.56731276091215888]], [[-0.59467823931614316, -0.021013646322696644, 0.72513102655611639, -0.62960315578871229], 
-[0.86606083067435691, -0.72841084190946459, 0.15543842306958466, 0.31989412769972758], [0.47194268630299918, 
-0.19444174622614785, -0.66695252858363485, 0.8443318710904939]]], [[[0.18223491454007679, 0.82014337464069054, 
--0.96721600534140117, -0.97710964280180557], [-0.33988905556481974, -0.32222643536859397, 0.95343454998321575, 
-0.39976170447642656], [-0.32911640832985767, -0.0051494009105315097, 0.68395988105583672, -0.66658071774810845]], 
-[[-0.51922775999439819, -0.4962702374477268, 0.66698724811873289, -0.13569420026129531], [-0.46821413546121105, 
-0.052814763063328218, 0.98772928696039708, -0.18783043849008596], [0.94396487905072735, -0.62988912286541021, 
-0.77657229350292489, 0.45494324806001996]]], [[[0.49245323985257272, -0.11950235129083819, 0.027258906056445653, 
-0.60373375693159259], [0.43120373969315473, -0.1588341022553017, 0.32757005714599741, -0.80325727791557533], 
-[0.20663774771076104, 0.75387367922315862, 0.6484883492094573, -0.0062877488438248808]], [[-0.84891489459846925, 
-0.79397666107969944, -0.97762738566042362, 0.49200737923277527], [-0.43113202215326463, -0.43968935940027642, 
-0.22521681397809279, -0.24856511685500804], [0.37263947745544268, -0.1323935505978322, -0.24082796491432612, 
-0.56535324006815268]]]])
-      arg1=numpy.array([[[[-0.81163163217881018, 0.14583559156390025, 0.90627553136559591, -0.030656591956136126], 
-[-0.30432921218385545, 0.059587722748475569, -0.40268326742636673, -0.61586544340169969], [-0.8514338629390128, 
--0.8041774874930705, 0.85523791052074705, 0.38333292243623918]], [[0.16821600296096539, 0.83859885983438409, 
-0.43414495762074878, 0.024013057438022178], [0.98564703788576091, -0.79662656719344027, -0.4795278224208761, 
-0.95284714676502769], [0.23808354955330957, -0.46334260291805918, 0.095014259985530369, -0.10374068985654117]]], 
-[[[-0.55773665932704719, 0.86766281454843952, -0.060782779594130254, -0.81799578780935178], [-0.39579207222264756, 
-0.14496469860413042, -0.39443931203825033, 0.46619641301760439], [0.59557714470818546, -0.1844163855468639, 
-0.31701568421598036, 0.99386589088114263]], [[0.28596875555199719, -0.5113185780054228, 0.11275973679314433, 
-0.95984183359351416], [0.56397724998403853, 0.21456711389176819, -0.8869207954469096, 0.082002513156396395], 
-[0.80154311652059129, -0.14918064076265192, 0.87456914801889662, 0.32879945324200155]]], [[[-0.79827538301490764, 
--0.63675913901470316, 0.73918094313334581, -0.69235823201746327], [-0.13014921576975857, 0.21884429385731696, 
--0.61439214698250044, -0.98441367018944836], [0.83244430972608208, -0.9972055581758188, 0.64180363710022958, 
-0.40388529426265696]], [[0.75678188832694704, -0.95635607269517875, 0.8829297874583959, 0.64433269944660188], 
-[-0.88188838313425677, 0.92295774091578653, -0.069016329600187332, -0.16861637091927673], [-0.87830132902116187, 
-0.45182237326637598, -0.94926829916048394, -0.98497920687933416]]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-1.17042066276)+(1.-msk_ref)*(-2.30685891421)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank0_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.291531225166)+(1.-msk_arg0)*(0.0245199868034)
-      arg1=Data(-0.700555766847,self.functionspace)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(-0.20423388100607154)+(1.-msk_ref)*numpy.array(-0.017177618158112615)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy() and not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=inner(arg0,arg1)
-        ref=-ref
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank1_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.13795126128122193, -0.049083343324659578])+(1.-msk_arg0)*numpy.array([0.41150496249996782, 
--0.895867771687894])
-      arg1=Data(numpy.array([-0.48311607076511565, -0.98030703413828491]),self.functionspace)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.114763218027)+(1.-msk_ref)*(0.67942081766)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_array_rank1_offset1(self):
+      arg0=numpy.array([-4.0, 0.0, -6.0])
+      arg1=numpy.array([-4.0, 4.0, -5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array(46.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy() and not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=inner(arg0,arg1)
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=msk_ref*(0.114763218027)+(1.-msk_ref)*(0.67942081766)
-        ref=-ref
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank2_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.75796400257798324, -0.70348397505435734, 0.89005890441617064, 0.28168276991104246, 
--0.22815083366244493], [0.87001455744515122, -0.61199454394107877, -0.88968426082566543, -0.48988343936641043, 
-0.0091061395097682407], [0.00038701284385123103, -0.58154294262613138, 0.12466518547258865, 0.26742919042369873, 
-0.2060419497399868], [0.05209424073622726, 0.36005249160908215, 0.84151943818677521, 0.90383961792029832, 
--0.3365232541585006]])+(1.-msk_arg0)*numpy.array([[-0.75334843408531493, -0.089920064534031008, -0.41287254028214426, 
-0.93961825826695544, -0.099839208277126223], [-0.79338565350602552, 0.50638366051092198, -0.35393904632388651, 
-0.29272444192355396, -0.6584314991602549], [0.85093602922976408, 0.36590867303067798, -0.5094538711100558, 0.89305104272018543, 
--0.10276418819907129], [0.023578509730667108, -0.16387847175810877, -0.18004804284015163, -0.81549358690093499, 
--0.47628686906637374]])
-      arg1=Data(numpy.array([[-0.72674958907045362, -0.93280779919345203, 0.43718221749563302, -0.0088212548455395279, 
-0.921486643264948], [0.49429499981575908, -0.81673962137327916, -0.54992531147908963, -0.8645863398574325, 
--0.086203025330993999], [0.040650358243210727, 0.49655770251078479, 0.6536740821874063, -0.066082623968604537, 
-0.37594522027749044], [0.12475948518736812, 0.71132898153986934, 0.33196050203008243, 0.095617436608621098, 
--0.64995797842956304]]),self.functionspace)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(3.92500564327)+(1.-msk_ref)*(-0.613040413195)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank3_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.93288754023006093, 0.60106570738315845], [0.30801084889880515, -0.10038465186627255]], 
-[[-0.49486005038268965, 0.60921104657314995], [0.87331640600526983, 0.96637335220871035]], [[0.43202597147178401, 
-0.91322807330597522], [-0.62307024365185915, -0.17477126639044194]], [[-0.31822550805442673, -0.90911614050867762], 
-[0.55699981820870859, -0.68063487208669682]], [[0.0034300727389189323, -0.86962091301762912], [-0.57714211960863127, 
--0.85825991865608864]], [[-0.17754376238064573, -0.24779798715479107], [-0.011140993027736412, 
-0.098200156176100561]]])+(1.-msk_arg0)*numpy.array([[[0.24010403647853407, -0.88838665532645722], [0.90501777439104525, 
-0.53632909560538189]], [[-0.54131241789007545, 0.15141641667204264], [-0.99744268542316106, 0.29568079322935215]], 
-[[-0.07533138726578037, 0.51085817705272096], [-0.68401123133882247, -0.026930646609903741]], [[0.31995995928285237, 
-0.31660009563403202], [0.35070586390968561, 0.66058148339954159]], [[0.55381138010714537, -0.22547846639192781], 
-[0.20473202038390381, -0.42712246976137891]], [[-0.83406606159475327, -0.36707521115120145], [0.99394483242876586, 
-0.64057999530308241]]])
-      arg1=Data(numpy.array([[[0.56165585181397337, 0.76350367189248303], [-0.11994286131079535, -0.16253635268259248]], 
-[[-0.95622051234148109, 0.83826617585901686], [0.49593782958986288, 0.49840249855170282]], [[0.69853814174312601, 
-0.087064491712804282], [-0.01647409369557451, 0.43352480342262467]], [[0.98625851181227997, -0.85890738533846744], 
-[-0.75112351254266674, -0.69214254512586582]], [[0.21952135478796331, 0.74856199577848415], [-0.32886277865741609, 
--0.99776445778129808]], [[0.097666284406329407, 0.62425865896691324], [-0.0010713686346326412, 
--0.078146997352248615]]]),self.functionspace)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(3.91262521622)+(1.-msk_ref)*(-1.17757862828)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy() and not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=inner(arg0,arg1)
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=-(msk_ref*(3.91262521622)+(1.-msk_ref)*(-1.17757862828))
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank4_constData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.44681514011031398, 0.33985438742685536, -0.4431136159656559, -0.13354837017362287], 
-[0.73305422778738927, 0.61064286420775193, 0.99914094831721179, 0.20213178104609941], [0.77095705236519541, 
--0.9529046335984086, 0.9520486082598747, -0.042873934491836962]], [[-0.25981270183444449, 0.85055011439346706, 
-0.1307660257197174, -0.75354074853278541], [-0.89931998085420384, -0.31754146844196685, -0.96168179930810993, 
--0.32969850226885389], [-0.81759489072088565, -0.79455455035559308, 0.30554468587756012, -0.97694761502203065]]], 
-[[[0.9524044737827746, -0.5491619770191285, 0.51931562514984453, 0.75704791120318649], [-0.63299678476462362, 
--0.60042020485151748, 0.63938597028752708, 0.97527046159828057], [0.7349335457464401, -0.47635296268781113, 
-0.47610605929806882, -0.91077052361951272]], [[0.92333547515269676, -0.13572130553211714, 0.79962527069075584, 
-0.62582507802038934], [-0.34955705672146808, -0.22067602283071563, 0.98794413498735012, -0.39365343011975495], 
-[-0.9395621189187584, -0.10369246837169155, -0.48126680305363423, -0.51669696645207086]]], [[[0.65028702636009528, 
--0.53411372748691854, 0.32701223381980959, 0.92786702524886722], [0.40479639977686066, -0.081428651882120562, 
--0.83257147695365452, -0.83547803542192933], [-0.21493301104465234, -0.858545831833744, -0.046828862716373321, 
--0.61361609559691499]], [[0.97566639940685507, -0.0056602780003758291, 0.72342396028118405, -0.18050425435644346], 
-[-0.7670123805919975, 0.64963751109942836, 0.74915475749297489, -0.95417005675424726], [0.86875515153318328, 
--0.50354690200796526, -0.20723844381933199, 0.588505435821433]]]])+(1.-msk_arg0)*numpy.array([[[[-0.45187484182260351, 
-0.26218751303890997, 0.85384327705187646, 0.75303646136734614], [-0.80410026271033752, 0.53147720985892377, 
-0.50441076578741106, 0.58596387599943167], [0.98671580330013953, 0.4923260155932212, -0.53541284591070015, 
-0.24215788450392051]], [[-0.085406833040039487, -0.13311435037468855, -0.73318155510231131, -0.38549084622077223], 
-[-0.68928525519152739, -0.68740139381758092, 0.90616221111805806, 0.19007205825157003], [0.17561487416286736, 
--0.90180859526252921, -0.73315538314293272, -0.54323538049256781]]], [[[0.89111566972666645, 0.20443274795271837, 
--0.728969135510944, -0.67352997540305459], [0.60201785288645926, -0.035196174636839217, 0.34578764531428541, 
-0.34953478993313891], [-0.35854486353024217, -0.55920923257522803, -0.42049272504701074, 0.42935874870770507]], 
-[[-0.081340864936127133, -0.75079067727008786, -0.31332393287911153, 0.89072681020132172], [0.69085093202892045, 
--0.97027053638239891, -0.12717831450461681, -0.83994461823002342], [-0.72897706097294757, -0.42745265769195995, 
--0.33355490737943816, -0.97263634639973628]]], [[[-0.76033244671178002, -0.69089710234761292, 0.87282786896240006, 
-0.92436829090199435], [0.58083081564855843, -0.81615646614553428, 0.90398073899985509, 0.42059572648475063], 
-[0.019855973515656711, -0.45396080542761208, 0.53736366245784306, 0.59033308886792213]], [[-0.94138407203855867, 
--0.67937937246377555, -0.054229586011050657, -0.5411240345139039], [0.80177386348099788, 0.23753684966099531, 
--0.34285918400305304, -0.52316423985274541], [-0.15503198735542156, 0.62711500005635878, -0.59892199914183242, 
--0.11115015793655636]]]])
-      arg1=Data(numpy.array([[[[-0.56067461849346856, 0.82436543003426865, -0.85784285960585782, -0.84913542810300635], 
-[0.31644257130645426, -0.15652880988651585, -0.92651670576264755, 0.66860658189646704], [-0.80377814282619164, 
--0.38511769253035455, 0.4108650741538038, -0.50997661822690676]], [[-0.019249788314307237, -0.5845033284576342, 
-0.14061092565362476, 0.83198289487612698], [0.84011230181354235, -0.35733816393052509, 0.96442765761882199, 
--0.76747774313560524], [0.59919634836449132, -0.55144540917616425, 0.97222443025153171, -0.21855343547764483]]], 
-[[[-0.080736106169028155, -0.59334688941447178, -0.34294452941442688, 0.7014605270562615], [-0.44551858269727185, 
--0.1899099392185104, 0.73618040445628052, 0.99607451421460791], [-0.38697159025089833, 0.53225190075118189, 
-0.80372671392552042, -0.26158470174624071]], [[0.78921994505062454, -0.78939118206556924, -0.7493958134408456, 
--0.43440374824874217], [-0.040305328457116429, 0.31872351340112015, -0.72449815921690686, 0.22002072913721205], 
-[-0.061081502789878339, -0.5769041864612805, -0.53698267097296615, -0.060752999644593242]]], [[[-0.61527880545476776, 
--0.016981853524558055, -0.67572274024216328, 0.39259015365922023], [-0.95150026727961223, -0.26067466866724942, 
--0.535056872864345, 0.50070596980230753], [-0.39057009491319405, -0.92296854823798524, 0.16321388919501878, 
-0.56519023268513768]], [[-0.39144376514710566, 0.085591582644400699, 0.86408260436397399, -0.6950100726632451], 
-[0.32560339228050483, -0.4547551945702446, -0.43659989630539719, 0.036767150522588832], [-0.17649832158303713, 
-0.45518147529791864, -0.64714458530939223, -0.87261235042399221]]]]),self.functionspace)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.755579480427)+(1.-msk_ref)*(-0.59812450412)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy() and not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j      
-        res=inner(arg0,arg1)
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=-(msk_ref*(-0.755579480427)+(1.-msk_ref)*(-0.59812450412))
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank0_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.403235728374)+(1.-msk_arg0)*(-0.295926359992)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.541361045232)+(1.-msk_arg1)*(-0.810551377619)
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.21829611538783306)+(1.-msk_ref)*numpy.array(0.23986351876555856)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank2_offset2(self):
+      arg0=numpy.array([[-4.0, -6.0, 0.0], [5.0, 0.0, 0.0]])
+      arg1=numpy.array([[1.0, 1.0, 4.0], [5.0, -3.0, 2.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array(15.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy() and not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j  
-        res=inner(arg0,arg1)
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=-(msk_ref*numpy.array(0.21829611538783306)+(1.-msk_ref)*numpy.array(0.23986351876555856))
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank1_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.90850727965316946, 0.50515315395193428])+(1.-msk_arg0)*numpy.array([0.74762075729523225, 
-0.81043766812190188])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.61574683887358339, 0.93798419219177864])+(1.-msk_arg1)*numpy.array([-0.007714614761548555, 
--0.86522376090217512])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.0855848124973)+(1.-msk_ref)*(-0.706977533319)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank3_offset3(self):
+      arg0=numpy.array([[[-4.0, 6.0, -7.0], [-1.0, 0.0, -3.0], [0.0, -7.0, 5.0], [4.0, -4.0, -3.0]], [[0.0, 6.0, 5.0], [-4.0, 
+0.0, -1.0], [0.0, 7.0, 6.0], [-2.0, -6.0, 6.0]]])
+      arg1=numpy.array([[[-1.0, -6.0, -6.0], [-7.0, 3.0, 0.0], [5.0, 0.0, 1.0], [-6.0, 3.0, -7.0]], [[4.0, 1.0, -3.0], [-3.0, 
+7.0, -1.0], [5.0, 5.0, -6.0], [6.0, -1.0, 1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array(10.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy() and not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j 
-        res=inner(arg0,arg1)
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=-(msk_ref*(-0.0855848124973)+(1.-msk_ref)*(-0.706977533319))
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.97936996315172942, 0.70300297214989427, -0.25061232251134102, 0.44815350126104292, 
--0.30428700430274702], [-0.12023987608121867, 0.12967971629631569, 0.25525677189486284, -0.64554781120983828, 
--0.31958253742431997], [0.076147714924661436, 0.29338897471920244, -0.28506107676730741, -0.85770078975051978, 
-0.91865830392579051], [0.61918931910660246, 0.84653161661238596, 0.85127368640798529, -0.28022811001072645, 
-0.8813404201048407]])+(1.-msk_arg0)*numpy.array([[-0.49148868927913258, -0.46133680864660875, 0.042472319927527868, 
--0.16381315384583361, -0.081512938414658453], [0.13382615090707151, 0.23827946149774837, -0.2677152798942255, 
-0.90613469033837268, 0.70139580236050714], [0.72992965875251414, -0.43511959013079471, -0.15960126320034851, 
-0.12536531981177279, 0.17187813577533584], [0.76790552207840812, 0.038936831804500249, 0.97968906398820965, 
-0.58515284859248307, -0.33790017411269457]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.77792892176813555, -0.48474074670279599, 0.93420142438233378, -0.44466398223378789, 
--0.51263103365865992], [0.63495992637336518, -0.66572912657297234, 0.82268523377741287, -0.66447875079745655, 
--0.43956314173978117], [-0.70214786437828991, -0.98050935373364578, 0.15802372275413235, 0.3060961579403354, 
--0.40748742528675685], [0.72454726587244744, 0.88591188793736531, 0.46813774668437813, -0.83119094161369311, 
-0.92495780926047999]])+(1.-msk_arg1)*numpy.array([[-0.46866746866959152, 0.77485146518085779, 0.078830102748751463, 
-0.86057905914440269, 0.63438949285317259], [-0.46737572651749382, 0.13973168612107201, 0.54911400282390876, 
--0.44226114996595678, -0.28915038149170735], [-0.79873536394315914, 0.17697126209294067, 0.31687102417355439, 
--0.0020160127671704497, -0.045717467295027348], [-0.49355269181235517, -0.94737060160283404, -0.076589075013161478, 
--0.54223770216012301, 0.1330028382259909]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(2.38259814517)+(1.-msk_ref)*(-2.66813933913)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank3_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.82515479906730982, 0.86187150324023643], [-0.64054582590394871, -0.4585412457900413]], 
-[[0.18034602851741566, -0.48817089152477067], [0.84083037658278736, 0.27098186545704439]], [[0.16449913181804132, 
-0.4832607127000943], [-0.58311581170613991, 0.27572947234154332]], [[-0.91649111471063804, -0.31690517728986922], 
-[-0.33677447363475643, 0.75657122713227598]], [[0.15263583122141222, 0.7147460693527834], [-0.77672397702369111, 
--0.88628760970188258]], [[0.26526071178948207, -0.10765846826010272], [0.26436608712533771, 
--0.10491818539219988]]])+(1.-msk_arg0)*numpy.array([[[0.74852211953177816, 0.3186875609801596], [0.18785460974395507, 
--0.0051836560942222221]], [[0.27784421485642063, 0.10151035726096147], [-0.46057699701818189, 0.1048205876836934]], 
-[[0.8619190179244669, 0.7182321218553569], [-0.52469116547623029, -0.64351673986699343]], [[-0.95304560847909769, 
--0.50575897884598531], [-0.49654624538600833, 0.27045902883502704]], [[0.72623722391565204, 0.28200506732420449], 
-[0.49675058588390431, -0.80454908927028956]], [[-0.7252012828553136, -0.15094050576566165], [-0.7527450566268663, 
-0.39277655861690786]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.77848925392078994, -0.52609071667174501], [0.72333872332332971, -0.52349654559260528]], 
-[[-0.781853676722845, 0.26887365320155632], [-0.25467080531596542, -0.12846944357675794]], [[0.27015633772991388, 
-0.46747008919478983], [-0.45708381185132296, 0.033007137251819252]], [[0.61986039250907288, -0.25968752477805968], 
-[0.40222628722983833, -0.75395899203083494]], [[-0.60867569571751678, -0.32633068042911528], [-0.64743474613387764, 
-0.066047300331868453]], [[0.78079227379994265, -0.46586476049812209], [-0.70304649915648398, 
--0.13207766237217911]]])+(1.-msk_arg1)*numpy.array([[[0.65793158785296946, 0.69958336185059955], [-0.83288605047716091, 
--0.74606078974779488]], [[0.91843015701277997, 0.75420640449017595], [-0.61909674393108149, -0.88241525774172858]], 
-[[-0.2168876481400932, -0.88985122212027634], [-0.20849132046611341, -0.096336219615894558]], [[0.99177271903176045, 
--0.36477583556657356], [-0.87653688087840109, 0.86997207008395683]], [[0.88000911935290405, -0.11788561531713126], 
-[-0.26746816228835169, -0.37355939266452176]], [[0.26514166517441073, 0.67136051090322457], [0.57373631491666877, 
--0.47031764453494174]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-2.28253572206)+(1.-msk_ref)*(0.205671973309)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy() and not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j       
-        res=inner(arg0,arg1)
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=-(msk_ref*(-2.28253572206)+(1.-msk_ref)*(0.205671973309))
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inner_expandedData_rank4_expandedData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.85848399921195329, -0.57896707886291332, -0.43034381488523143, -0.44028867476623801], 
-[0.1542009868569123, 0.89134745980511632, -0.31625638349919094, -0.46821880735750909], [-0.00014140379166804884, 
--0.45054390630032426, 0.063612421180540002, 0.2139474282001117]], [[0.14851515293243445, 0.030852297972091103, 
--0.32904205566508327, -0.60470261985184459], [0.2050582049845926, 0.66891227664110531, 0.12664539701770172, 
--0.1512184013561424], [0.43610165485599883, -0.031232254854981267, -0.94367086360711649, 0.99864791296239752]]], 
-[[[-0.0739525337370186, 0.13690549306105271, 0.44836619794469867, 0.86486218754491251], [0.18292690193610994, 
-0.82337273414879975, -0.99426240224917328, -0.2611768138402506], [0.63533397617306964, -0.46590412506632273, 
-0.19710132665811919, 0.92162975601912445]], [[-0.50199990627637336, -0.41579217916435351, -0.033835742233214949, 
--0.99227315756588963], [0.41300955053414445, 0.2404521065620393, -0.70048488468070169, -0.02128933259204846], 
-[-0.2371289244231205, 0.72390162758131571, 0.57245237356825229, 0.3193794886016077]]], [[[0.036010838035816839, 
--0.16697536583993622, -0.40253894630502418, 0.19689771264364264], [0.692038111953033, -0.29737990759908306, 0.3210505962031367, 
--0.39445483259245995], [0.24932266060009267, -0.87499616800979152, -0.024935835903332482, 0.61934652294663839]], 
-[[0.1921206747357862, 0.91683813432396177, -0.35927087384140122, 0.41710362048575012], [0.32246985496822211, 
-0.83179661383912151, -0.56990023935119183, 0.67618438981012918], [0.50718837602815503, -0.84834818782953691, 
-0.37937837632206328, -0.25426188524343107]]]])+(1.-msk_arg0)*numpy.array([[[[-0.52660798398775155, -0.91198538123189898, 
-0.82532828731900576, 0.75474274557208942], [-0.14733998379424951, 0.45177887906173697, -0.36321745594766464, 
-0.34951620533919336], [-0.69560845662216808, -0.11401790466463391, -0.73834803054149334, 0.10722259179197136]], 
-[[0.0177056943396805, -0.47868540405574977, 0.40133180486325815, 0.32115356551548468], [0.91979852980436405, 
-0.34980505610258494, 0.4856493865847229, -0.44919356645331976], [-0.85304974198046613, 0.71519478383129353, 
-0.67204216667633654, 0.7475580019235577]]], [[[0.24217862286310465, 0.95354035165723561, -0.31263155472319304, 
--0.44578837088375711], [-0.11528633107193453, -0.23498522545753464, 0.9180284456824146, 0.20783304264420299], 
-[0.15122575609614941, -0.091557510721294477, 0.40550183981931331, 0.96902348433008778]], [[0.85700567482802037, 
-5.7867086591834038e-05, 0.72809005526213588, -0.2944154096127316], [0.048631557146810112, 0.90940535486443252, 
-0.87370296139337378, 0.29272107817043769], [-0.56122498183076353, 0.73490381573551034, 0.98989427623480863, 
--0.86335822872138035]]], [[[0.44987693855421917, 0.61924124200328845, 0.92027614760278231, -0.92836895964474153], 
-[-0.26038483014295299, 0.7091524621105445, -0.61699126503434165, 0.7867106439773095], [-0.010275133721955321, 
--0.64211611345792963, -0.7266804879141564, -0.37259764086320635]], [[0.23436695670222973, -0.62268616476340166, 
-0.56504976209184354, 0.75852938727342356], [0.018278357410181023, -0.50994535892748472, -0.47740324751282759, 
--0.4048677745526883], [-0.75546010712197464, -0.54279502794620971, 0.65458780889854662, 0.63133081314691397]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.85032148694968157, -0.89307913993242494, 0.82344755515608292, 0.52020307096338647], 
-[-0.71582198836216415, -0.61956713081684667, -0.025632675537781591, -0.96725308876812122], [-0.74840121493833189, 
--0.95704548609145279, 0.02925160124606685, 0.28204436866124238]], [[0.77582565278870219, 0.20399239563725824, 
-0.42072111286039204, -0.98584512646851774], [0.0051541472756353457, -0.31450623803480027, -0.18137342071886264, 
-0.84383008132128734], [0.60539191928307545, 0.93603849652654358, 0.52593897438047366, -0.91238023684979264]]], 
-[[[0.11132156128689674, -0.23856418739373941, -0.45006040991635454, 0.48701817686331794], [-0.64125441277940864, 
-0.88477096108526365, -0.46055858667528038, -0.3010739289286819], [0.302230111668218, -0.12141629391555764, 
--0.69959171269062126, -0.088172608374930794]], [[-0.59067769345245158, -0.43595737005003898, 0.45225872072232964, 
--0.40597848146882853], [-0.37249427288094927, -0.16711051368782659, -0.56238851046142724, 0.40758376843097333], 
-[-0.78419565596843221, 0.94913458725501987, -0.75346190090301124, -0.80854672867882327]]], [[[0.047814610347620023, 
-0.89226292666026841, 0.65891391291871959, -0.043438552217093696], [-0.85376353357903323, 0.58078752052539806, 
--0.24143839852724791, -0.58458556312805987], [-0.63293655693372997, 0.96460464839254167, 0.65159578698950993, 
-0.061326179501126621]], [[-0.17234535569232556, -0.049385685202222529, 0.83562180983328016, -0.9741260950898365], 
-[-0.46358357818427764, -0.93135550143789358, -0.22307605504315453, 0.40839527256023089], [-0.82005299493558326, 
--0.98533424617530185, 0.94391858495261372, 0.67582394987210059]]]])+(1.-msk_arg1)*numpy.array([[[[0.41324938725852634, 
--0.96435227534002066, -0.21728111111808257, 0.70938235599301858], [-0.3679456961352745, -0.24296128506749803, 
--0.51762107537142632, -0.83438579427741177], [-0.96896461424687486, -0.16496310799157143, -0.86728612607361533, 
--0.39351263591764996]], [[0.076791725845727354, 0.85612310092343114, -0.31486157389407832, -0.88870188389020055], 
-[-0.66810623930448432, -0.36426484354507327, -0.87988747852457183, 0.32315595765127236], [-0.75543936721157112, 
-0.49986454498032074, -0.30458644036080273, 0.059409472050175882]]], [[[0.0079330968533004587, 0.21116245050181348, 
--0.44143395119942364, -0.28063483186401439], [0.88751279455182308, -0.073463439487072346, 0.60096508702459972, 
-0.79177470299857999], [0.95243642490697522, -0.21215275520223864, 0.18355745101229259, -0.14013995159823978]], 
-[[0.1627217916908017, 0.41334334239730808, 0.33573546545915911, 0.077565211932971945], [0.91790152497156097, 
-0.63377408643159061, 0.98034579788904486, -0.49206922858999569], [0.49897607647039011, -0.010403252244100214, 
-0.046849195786473175, -0.32202425604129448]]], [[[0.44597817005287776, -0.15805646513978289, 0.66962570699549295, 
--0.62314847800938744], [-0.61692082273961146, 0.22088164537570232, 0.68823694440407768, -0.54817719482377592], 
-[0.13092507486506988, -0.38768295304299594, -0.26250766251874946, -0.020094679080584044]], [[-0.81049573082826165, 
-0.16068165668178569, 0.25337709546983245, 0.53604096791339551], [-0.43325951698250842, 0.57308382811271863, 0.8779157187028388, 
--0.4315436666110668], [-0.47430817479538279, -0.29432135991384145, -0.84855309577270099, 0.77697355338037299]]]])
-      res=inner(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.113297048661)+(1.-msk_ref)*(5.16080189005)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_float_rank0(self):
-      arg0=-0.081861603174
-      arg1=0.765137400833
-      res=outer(arg0,arg1)
-      ref=-0.062635374280529704
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result") 
       arg0=arg0*1j
       arg1=arg1*1j
-      res=outer(arg0,arg1)
       ref=-ref
-      self.assertTrue(isinstance(res,complex),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result") 
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_array_rank0(self):
-      arg0=0.470792845884
-      arg1=numpy.array(0.986628916768)
-      res=outer(arg0,arg1)
-      ref=numpy.array(0.46449783555674595)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=numpy.array(arg1*1j)    
-      ref=-ref
-      res=outer(arg0,arg1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank4_array_rank4_offset4(self):
+      arg0=numpy.array([[[[0.0, 5.0], [-6.0, -7.0], [-5.0, 1.0]], [[1.0, 3.0], [-6.0, 1.0], [-3.0, -1.0]]], [[[-4.0, 0.0], 
+[5.0, 7.0], [-3.0, -2.0]], [[5.0, -3.0], [6.0, 0.0], [6.0, -2.0]]], [[[-4.0, -3.0], [3.0, -5.0], [4.0, 6.0]], [[-4.0, -3.0], 
+[5.0, 6.0], [3.0, 2.0]]], [[[-6.0, -2.0], [-2.0, 5.0], [-4.0, 5.0]], [[2.0, -6.0], [-3.0, -2.0], [-1.0, 3.0]]]])
+      arg1=numpy.array([[[[-5.0, -5.0], [-6.0, -1.0], [-4.0, -7.0]], [[-7.0, -4.0], [-2.0, -1.0], [-7.0, -2.0]]], [[[2.0, 1.0], 
+[3.0, -6.0], [-7.0, 2.0]], [[7.0, 3.0], [3.0, 7.0], [-3.0, 7.0]]], [[[-5.0, 6.0], [6.0, -5.0], [-2.0, 7.0]], [[5.0, 4.0], 
+[-3.0, -7.0], [-2.0, 4.0]]], [[[-1.0, 6.0], [0.0, 2.0], [1.0, 7.0]], [[-5.0, 1.0], [2.0, -2.0], [5.0, -5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=numpy.array(29.0)
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_constData_rank0(self):
-      arg0=0.806587192294
-      arg1=Data(0.459316802107,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(0.37047904978481383,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j    
-      ref=-ref
-      res=outer(arg0,arg1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_expandedData_rank0(self):
-      arg0=0.62510111232
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.932536673263)+(1.-msk_arg1)*(-0.39927472313)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.58292971173616104)+(1.-msk_ref)*numpy.array(-0.24958707354962301)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_array_rank1_offset0(self):
+      arg0=numpy.array(-7.0)
+      arg1=numpy.array([0.0, -6.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([-0.0, 42.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j    
-        ref=-ref
-        res=outer(arg0,arg1)        
-        msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-        ref=-(msk_ref*numpy.array(0.58292971173616104)+(1.-msk_ref)*numpy.array(-0.24958707354962301))
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_array_rank1(self):
-      arg0=-0.147579432862
-      arg1=numpy.array([0.4366735032511968, -0.4840678581242126])
-      res=outer(arg0,arg1)
-      ref=numpy.array([-0.064444027955627856, 0.071438459968642856])
+   def test_generalTensorProduct_array_rank1_array_rank2_offset1(self):
+      arg0=numpy.array([-5.0, -6.0, -2.0])
+      arg1=numpy.array([[6.0, 6.0], [0.0, 7.0], [-1.0, -6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([-28.0, -60.0])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
-      arg1=arg1*1j    
+      arg1=arg1*1j
       ref=-ref
-      res=outer(arg0,arg1)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_constData_rank1(self):
-      arg0=0.307392721359
-      arg1=Data(numpy.array([-0.55600277881165461, -0.97997933943118731]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([-0.1709112072620588, -0.30123851602330931]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j    
-        ref=-ref
-        res=outer(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_expandedData_rank1(self):
-      arg0=-0.533630322003
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.37338763703449107, -0.059381069842770806])+(1.-msk_arg1)*numpy.array([0.66805487237042271, 
--0.44911334201438247])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.19925096498253622, 0.031687539421061568])+(1.-msk_ref)*numpy.array([-0.35649433665848967, 
-0.23966049731483582])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_array_rank2(self):
-      arg0=0.507057355338
-      arg1=numpy.array([[0.82727299573137292, -0.94610810308954418, -0.57533662315989043, -0.28952788602325241, 
-0.018136635315888716], [-0.92320697591850909, -0.40737177126670399, -0.067864270738446253, -0.44712910432163211, 
--0.26252030844042507], [-0.6037930078105489, 0.95214729595957825, -0.34240635693853072, -0.64429323264604199, 
-0.76924375662754518], [-0.56483829149320042, 0.816975372319108, 0.76638795986714259, -0.46644827039746395, 
--0.35838294865216191]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[0.41947485735778095, -0.47973107261607756, -0.29172866656833152, -0.14680724418344251, 
-0.009196314337997431], [-0.46811888763848197, -0.20656085297769719, -0.034411077642552856, -0.22672010113180602, 
--0.13311285332021847], [-0.30615768571176444, 0.48279328978113084, -0.17361966180004085, -0.32669362260742862, 
-0.39005070484553961], [-0.28640541027796246, 0.41425337166409515, 0.38860265209282813, -0.23651602638954558, 
--0.18172071014166363]])
+   def test_generalTensorProduct_array_rank2_array_rank3_offset2(self):
+      arg0=numpy.array([[4.0, 2.0, 5.0], [-5.0, 6.0, -6.0]])
+      arg1=numpy.array([[[4.0, 3.0], [-2.0, -5.0], [-6.0, 6.0]], [[-7.0, 5.0], [-1.0, -6.0], [-6.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([47.0, -29.0])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
-      arg1=arg1*1j    
+      arg1=arg1*1j
       ref=-ref
-      res=outer(arg0,arg1)      
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_constData_rank2(self):
-      arg0=-0.461803900652
-      arg1=Data(numpy.array([[-0.52799308286320312, -0.69180625252696748, -0.70146211143834436, -0.79159352615299805, 
-0.23646350770741109], [0.25829241615476461, 0.3018732714936927, 0.29415929156311038, -0.56921835144236077, 
-0.60564013367395853], [-0.5177543192396723, 0.47622606084243757, -0.6682456782013706, -0.51288857119335751, 
--0.48979664027252068], [-0.38711325402410046, 0.62799192622923905, -0.10406963163713212, 0.86589686023678203, 
-0.48939305358190266]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[0.24382926518345957, 0.31947882591234072, 0.32393793922175912, 0.36556097810826205, 
--0.10919977022111776], [-0.11928044528907927, -0.1394062542783433, -0.13584390825684978, 0.26286725501873759, 
--0.27968697612198423], [0.23910096420426005, -0.21992305248913621, 0.30859846078718056, 0.2368539427768824, 
-0.22618999900405529], [0.17877041070238711, -0.29000912111057531, 0.048059761829436061, -0.39987454761959623, 
--0.22600362109607669]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_expandedData_rank2(self):
-      arg0=0.542639921047
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.74293955171720949, -0.6474141214322553, 0.89013588888960116, -0.14757583754509063, 
-0.081887518972254991], [0.21487307077342988, -0.050194366663281365, -0.93093206605908807, -0.4171126339311515, 
--0.67949074748359117], [-0.39271355958770982, 0.91153629318962737, -0.43013281164693429, 0.75192193609147018, 
--0.50864788267834871], [-0.17454337482838866, -0.48266661220717322, -0.6330500907575769, -0.85640884246823479, 
--0.72710868516954452]])+(1.-msk_arg1)*numpy.array([[0.13502712344398327, -0.30609572077649028, 0.076158340221367027, 
--0.76620762911605222, -0.75414774859793399], [-0.045647655526027675, 0.51826952770744628, 0.9282009241583189, 
-0.62578373001108756, 0.27753347187078115], [0.7635669473363762, -0.13422090527602437, -0.85991252821868414, 
--0.50396182803855938, 0.35889330854675716], [0.57190812057601392, 0.4595840391218784, 0.51334244288848341, 
--0.85329159837300739, 0.86017378063831629]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.40314865968646924, -0.35131274773866755, 0.48302326846809335, -0.080080540833902758, 
-0.044435436829833551], [0.11659870615960571, -0.02723746716316373, -0.50516090282636039, -0.22634196674407769, 
--0.36871880556661635], [-0.21310205496873427, 0.494635982167832, -0.23340723495178708, 0.40802286003413124, 
--0.27601264689726801], [-0.094714203136141789, -0.26191417234009035, -0.34351825126744434, -0.46472162666085692, 
--0.3945581995129398]])+(1.-msk_ref)*numpy.array([[0.073271107604837349, -0.16609975775495828, 0.041326555724787953, 
--0.41577484736909115, -0.40923067475690406], [-0.024770240190621184, 0.28123373559619913, 0.50367887620095897, 
-0.33957523384567084, 0.15060074126384146], [0.41434190801665766, -0.072833621441829532, -0.46662286641985401, 
--0.27346980657751113, 0.19474983661408432], [0.31034017739546715, 0.24938864670352595, 0.27856010267904557, 
--0.46303008557113867, 0.4667646324122165]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank4_offset3(self):
+      arg0=numpy.array([[[-5.0, -4.0, 7.0], [-6.0, -3.0, 1.0], [4.0, -7.0, 1.0], [7.0, 5.0, 2.0]], [[2.0, 0.0, 0.0], [5.0, 
+-2.0, -4.0], [-4.0, 0.0, -5.0], [1.0, -2.0, 1.0]]])
+      arg1=numpy.array([[[[0.0, -2.0], [-1.0, 0.0], [3.0, -1.0]], [[-6.0, 5.0], [-4.0, -1.0], [-7.0, -4.0]], [[0.0, -2.0], 
+[-4.0, 3.0], [2.0, -6.0]], [[3.0, -5.0], [6.0, 0.0], [-5.0, 0.0]]], [[[5.0, 3.0], [0.0, -2.0], [-6.0, -5.0]], [[-5.0, 0.0], 
+[-1.0, 1.0], [-7.0, -3.0]], [[0.0, -4.0], [1.0, 2.0], [-6.0, -5.0]], [[-1.0, 3.0], [6.0, 0.0], [6.0, -3.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([175.0, -41.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j    
-        ref=-ref
-        res=outer(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_array_rank3(self):
-      arg0=0.329599447984
-      arg1=numpy.array([[[0.32822728567176518, 0.76182410862170369], [-0.91107903577061466, -0.82291242821270738]], 
-[[-0.44260136214831292, -0.61872702571531413], [-0.82643984233761358, 0.59956489999270834]], [[0.1872384874131392, 
--0.95740409540478066], [0.34436766116193884, -0.24392537634176192]], [[0.55128906940654687, -0.055866350184200497], 
-[-0.14960910116281423, 0.39785898000498165]], [[-0.69334745701646527, -0.36482981315924334], [0.62969646397122481, 
-0.85157868691814409]], [[-0.4054544548193193, 0.40561559734997887], [0.023758608459736985, -0.58272572766033925]]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[0.10818353217063062, 0.25109680566245424], [-0.30029114725959566, -0.27123148207790621]], 
-[[-0.14588116464095621, -0.20393208612841801], [-0.27239411582628553, 0.19761626006805122]], [[0.061713702092689962, 
--0.31555986134283281], [0.1135033910224429, -0.080397669391482268]], [[0.18170457295589357, -0.018413518181581431], 
-[-0.04931107715661414, 0.13113410018503457]], [[-0.22852693909358954, -0.12024770502531482], [0.2075476069222584, 
-0.2806798651229786]], [[-0.13363756449101502, 0.13369067698016712], [0.0078308242331922451, -0.1920660781627985]]])
+   def test_generalTensorProduct_array_rank0_array_rank2_offset0(self):
+      arg0=numpy.array(1.0)
+      arg1=numpy.array([[0.0, -7.0, 0.0, -2.0, -2.0], [7.0, 1.0, 2.0, -4.0, 3.0], [-7.0, 4.0, 4.0, 5.0, -6.0], [-3.0, 7.0, 4.0, 
+3.0, -4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[0.0, -7.0, 0.0, -2.0, -2.0], [7.0, 1.0, 2.0, -4.0, 3.0], [-7.0, 4.0, 4.0, 5.0, -6.0], [-3.0, 7.0, 4.0, 
+3.0, -4.0]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_constData_rank3(self):
-      arg0=0.676272532347
-      arg1=Data(numpy.array([[[-0.78502641500144188, -0.2959496388941778], [0.9709955494182978, -0.72028076814454289]], 
-[[-0.42229143063252117, -0.57707492065624755], [-0.37028192685951566, -0.77738667668782058]], [[-0.52303963001352782, 
--0.74377516733057392], [0.32553195575683924, -0.14808641834981451]], [[-0.51098172394733266, 0.48839251208215906], 
-[-0.05041292302866851, 0.43615558206766214]], [[-0.18673861291251259, -0.77362964466616568], [-0.10240459910802069, 
-0.31449844481000633]], [[0.71163512256337746, 0.6064924623513579], [-0.012160009387012227, 
--0.56867060961205484]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.53089180163193517, -0.20014261174200376], [0.65665761910231268, -0.48710609907360664]], 
-[[-0.28558409518208988, -0.39025991794586762], [-0.25041149635943355, -0.52572525645611778]], [[-0.35371733510683534, 
--0.50299471590710387], [0.22014832007939297, -0.10014677714355522]], [[-0.34556290443665305, 0.33028644092488008], 
-[-0.034092875119587848, 0.29496003998196829]], [[-0.12628619464122146, -0.52318447889672626], [-0.069253417562711334, 
-0.21268665969070522]], [[0.48125928644266136, 0.41015419336342923], [-0.0082234803415122126, 
--0.38457631323338359]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_array_rank3_offset1(self):
+      arg0=numpy.array([0.0, 2.0, 4.0])
+      arg1=numpy.array([[[7.0, -5.0, -6.0, 6.0, 0.0], [3.0, 3.0, -6.0, 4.0, 1.0], [-7.0, 3.0, 7.0, 3.0, 5.0], [5.0, -2.0, 6.0, 
+-1.0, 4.0]], [[-7.0, 0.0, 5.0, 7.0, 5.0], [0.0, 0.0, 5.0, -7.0, 2.0], [1.0, -4.0, 5.0, 5.0, 3.0], [-2.0, 0.0, 7.0, -7.0, 0.0]], 
+[[-2.0, 2.0, 2.0, 4.0, 3.0], [-3.0, 4.0, 0.0, 3.0, -7.0], [5.0, -4.0, -6.0, -6.0, -2.0], [-6.0, 1.0, -1.0, -1.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[-22.0, 8.0, 18.0, 30.0, 22.0], [-12.0, 16.0, 10.0, -2.0, -24.0], [22.0, -24.0, -14.0, -14.0, -2.0], 
+[-28.0, 4.0, 10.0, -18.0, 0.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j    
-        ref=-ref
-        res=outer(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_expandedData_rank3(self):
-      arg0=0.305104655943
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.30293977445085996, 0.80288896011525268], [0.43540848013586975, 0.40694710798426192]], 
-[[-0.59373430985932441, -0.10176913923597497], [-0.30052400560538772, 0.48490916950152085]], [[0.76780025804496965, 
--0.13092427930556072], [0.71353871888096498, -0.21625028363463095]], [[0.048762689975171636, 0.027421493530511487], 
-[-0.80924187302600847, -0.71846315628216839]], [[-0.71726816616769762, 0.39535977450661641], [0.98564221665367024, 
--0.34445301274369311]], [[0.055019366867498087, -0.40840665672813459], [0.45115914313174343, 
--0.18779261237584977]]])+(1.-msk_arg1)*numpy.array([[[-0.61380336879006725, 0.58597512263121998], [-0.6415509561610433, 
--0.94320197837698028]], [[-0.67863445716181414, -0.49823099756251277], [-0.84557582756626659, -0.97939605205818969]], 
-[[-0.44458557380422148, -0.40082933239532137], [0.63008051889144734, 0.76000112210178639]], [[0.15432738338689655, 
--0.14349590068753426], [0.79389836449546203, 0.6986714070934783]], [[-0.27877479322191001, -0.2681783738236474], 
-[-0.4386996383193229, -0.32550724130405539]], [[-0.74293716545466415, 0.67250397682981777], [-0.47603169981880589, 
--0.37618199584110656]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.09242833565526147, 0.24496515993634904], [0.13284515452649295, 0.12416145736851268]], 
-[[-0.18115110233114812, -0.031050238212201299], [-0.091691273332825993, 0.14794804532433831]], [[0.23425943356371101, 
--0.039945607192100482], [0.21770398532614302, -0.065978968385907263]], [[0.014877723747726992, 0.0083664253490682624], 
-[-0.24690346324422066, -0.21920645410514972]], [[-0.2188418570574189, 0.12062610797451954], [0.30072402939495479, 
--0.10509421794167362]], [[0.016786664998306396, -0.12460677248584391], [0.1376507551407222, 
--0.057296400387559537]]])+(1.-msk_ref)*numpy.array([[[-0.187274265651311, 0.17878373818152046], [-0.19574018374937929, 
--0.28777531509740889]], [[-0.20705453256337916, -0.15201259709141823], [-0.25798912194327256, -0.2988182954950877]], 
-[[-0.13564512853273156, -0.12229489555231286], [0.19224049993272416, 0.23187988087511388]], [[0.047086003210833269, 
--0.043781267408492426], [0.24222208735305073, 0.21316789927842547]], [[-0.085055487371535093, -0.081822470476801093], 
-[-0.13384930221170924, -0.099313774865009377]], [[-0.22667358825326839, 0.20518409447092045], [-0.14523948799114966, 
--0.1147748784130293]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank4_offset2(self):
+      arg0=numpy.array([[2.0, -6.0, -3.0], [-5.0, -5.0, -7.0]])
+      arg1=numpy.array([[[[-5.0, -2.0, 2.0, -2.0, 6.0], [1.0, -6.0, -7.0, -1.0, -5.0], [5.0, 0.0, 2.0, 5.0, 2.0], [-1.0, -5.0, 
+7.0, 0.0, 3.0]], [[7.0, 4.0, 6.0, -6.0, 0.0], [5.0, -5.0, 3.0, 4.0, -2.0], [7.0, -4.0, 4.0, 5.0, 7.0], [-7.0, 0.0, 7.0, 0.0, 
+4.0]], [[5.0, 6.0, 6.0, 4.0, 6.0], [5.0, -4.0, 0.0, -6.0, 2.0], [-5.0, -1.0, -2.0, -1.0, 1.0], [0.0, 6.0, -3.0, -1.0, 5.0]]], 
+[[[3.0, -2.0, 6.0, -4.0, -4.0], [3.0, -2.0, 4.0, -6.0, -1.0], [-5.0, -6.0, 0.0, -6.0, -2.0], [-5.0, -4.0, 7.0, -6.0, -2.0]], 
+[[-7.0, 1.0, 7.0, 4.0, 3.0], [1.0, -1.0, -5.0, 5.0, -7.0], [-2.0, 6.0, 0.0, -6.0, 6.0], [0.0, -2.0, -4.0, 3.0, 2.0]], [[-4.0, 
+7.0, 6.0, -6.0, 1.0], [0.0, 3.0, -3.0, 3.0, -4.0], [-2.0, 0.0, -3.0, -5.0, -7.0], [6.0, -7.0, 0.0, 7.0, -1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[-19.0, -90.0, -157.0, 62.0, -8.0], [-63.0, 24.0, -6.0, -24.0, 64.0], [32.0, 27.0, 7.0, 78.0, -12.0], 
+[23.0, 51.0, -34.0, -31.0, -26.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_array_rank4(self):
-      arg0=-0.311141703693
-      arg1=numpy.array([[[[-0.96242947025367509, 0.31613060708727825, -0.16474461524119355, 0.097607895254317345], 
-[-0.4608076213705925, -0.045189493507184153, -0.23256772880073062, -0.025792894346069906], [0.47221318146065183, 
--0.53932971340006897, -0.9206012533737864, -0.43277979347555129]], [[0.52164453678492451, -0.4177205567007356, 
-0.36074511135280884, 0.44545791479432495], [-0.60244720292977383, 0.73113422773618209, -0.35506077006676295, 
-0.12888290818921266], [-0.018600374399256658, 0.34889421111020491, 0.0095060116754939195, -0.12269843664561075]]], 
-[[[0.11970738714252849, 0.0046044121318216114, 0.7711293226528344, 0.083756858882147567], [-0.96727123111763413, 
--0.62793542034570082, 0.66371387282856142, -0.27404421582471739], [-0.025508922135425216, -0.5860353376499825, 
--0.93418277964334107, 0.098139531888658205]], [[0.57463111535317091, 0.58390453459973113, -0.19312942733947369, 
-0.68367140971995921], [0.020894590195250196, -0.71205314610397163, 0.15500610556452066, 0.99622189868944999], 
-[0.089625133479853458, 0.87254489846494532, -0.27731691759675536, -0.94015242319703418]]], [[[0.13787664510865594, 
--0.92567081934687612, -0.23120204812863565, -0.27798371946865919], [-0.17735552235919139, 0.21911400717697926, 
--0.11484383008164167, -0.93977080140677649], [-0.041189774819279545, -0.96264056886361749, -0.67189498094862232, 
-0.15088102270862103]], [[0.095815805990953073, 0.7429753189232895, -0.37866380561605983, 0.91725934981023949], 
-[-0.18496465764990355, -0.47182302550197419, 0.13864024675702846, 0.87186119166113274], [0.28701359062133958, 
--0.17167237546109382, 0.63761401351486469, -0.43423124188146778]]]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[0.29945194505864181, -0.098361415678494227, 0.051258920260317739, -0.030369886823271755], 
-[0.14337646838775525, 0.014060335998828468, 0.072361519362965046, 0.0080252450899979972], [-0.14692521378574402, 
-0.16780796587930935, 0.28643744239621199, 0.13465584226569072]], [[-0.16230536989716976, 0.12997028567926514, 
--0.11224284854506973, -0.1386005345324347], [0.1874464491043781, -0.22748634924576874, 0.11047421291295953, 
--0.040100847630841464], [0.0057873521799039112, -0.10855553925329554, -0.0029577166680344004, 0.038176600618327103]]], 
-[[[-0.037245960380109341, -0.0014326246351975983, -0.23993049121748097, -0.026060251768527446], [0.30095841878272594, 
-0.19537689649525561, -0.20650906515625561, 0.085266584198790005], [0.0079368894925766695, 0.18234003338045129, 
-0.29066322161846631, -0.030535301151425942]], [[-0.17879170422573282, -0.18167705168916282, 0.06009061905556938, 
--0.21271868718615194], [-0.0065011783913076883, 0.22154942899842625, -0.048228863768091407, -0.30996617881405725], 
-[-0.027886116724593339, -0.27148510625662159, 0.086284858203819523, 0.29252062668419959]]], [[[-0.042899174258519579, 
-0.2880147957900609, 0.071936599151949429, 0.086492328074269056], [0.055182699386120027, -0.06817550549594581, 
-0.035732704950179113, 0.29240188823021263], [0.012815856711982919, 0.29951762663978643, 0.20905454907482426, 
--0.046945378460433888]], [[-0.02981229311669948, -0.23117060653130411, 0.11781810160608347, -0.28539763682787384], 
-[0.057550218704099279, 0.14680381999605527, -0.043136762576336647, -0.27127237655685715], [-0.08930189756883819, 
-0.053414435377910949, -0.19838831046325628, 0.13510744839552941]]]])
+   def test_generalTensorProduct_array_rank0_array_rank3_offset0(self):
+      arg0=numpy.array(6.0)
+      arg1=numpy.array([[[-2.0, 6.0], [-7.0, 5.0]], [[5.0, -4.0], [-5.0, 1.0]], [[-5.0, 4.0], [1.0, -1.0]], [[4.0, -1.0], 
+[-4.0, 4.0]], [[2.0, 1.0], [6.0, -2.0]], [[3.0, 6.0], [3.0, -6.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-12.0, 36.0], [-42.0, 30.0]], [[30.0, -24.0], [-30.0, 6.0]], [[-30.0, 24.0], [6.0, -6.0]], [[24.0, 
+-6.0], [-24.0, 24.0]], [[12.0, 6.0], [36.0, -12.0]], [[18.0, 36.0], [18.0, -36.0]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_constData_rank4(self):
-      arg0=-0.672892796531
-      arg1=Data(numpy.array([[[[-0.15035387426968971, 0.7448082478008573, 0.19832246991022884, 0.66992547222564558], 
-[-0.87242392963594284, -0.043981690167481657, 0.070163273395474457, 0.41278977409290363], [0.92244264078304616, 
--0.52871594235556008, -0.80680164879181415, 0.3638857320985347]], [[0.10604864161257521, -0.88216765288310506, 
--0.91687431340483028, 0.64065686176858061], [-0.57691631049459136, 0.20733489672099492, -0.23698932317186117, 
-0.12997631174408308], [0.74193649559644603, -0.46758879464846692, -0.11845259801302221, 0.92706200519521409]]], 
-[[[-0.91657636595994929, 0.62692336839030194, 0.77538458911871211, -0.78481494192413681], [0.95702122108174481, 
-0.41867966052078098, 0.0038112330327841892, -0.4421255675128164], [0.79198271993779445, 0.41795257294183141, 
-0.56507785727994664, 0.49783786847345235]], [[0.91348936829492056, -0.053708934298375421, -0.11362449808283137, 
--0.12015710605876295], [0.72087868244402276, 0.25135052985676531, 0.19612782696734055, -0.8311278206221322], 
-[0.9492318741345187, 0.96648002899763163, 0.84111363429424535, 0.73138033303662486]]], [[[0.82118391220944731, 
--0.64895386300413671, 0.52527934759865125, 0.83792978829018172], [-0.97163515948825285, 0.94417103202880415, 
--0.56367072296837883, -0.22800894175864372], [-0.74379926261052098, -0.041615774090976387, 0.87421839143037627, 
--0.73199242523809449]], [[0.8704284040109711, -0.91798362066932904, 0.27031454140249722, 0.23116809961765994], 
-[0.34664387098973815, 0.69188536416441937, 0.98111032452439617, -0.47437466946671369], [0.55282380606543646, 
-0.12145535131127505, -0.43470110890054059, 0.1573076701434708]]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.10117203892652984, -0.50117610474171603, -0.13344976139273398, -0.45078802447294447], 
-[0.58704777777287598, 0.029594962492935646, -0.047212361248816302, -0.27776326546857588], [-0.62070500819550267, 
-0.35576914902190249, 0.54289101770095904, -0.24485608788933896]], [[-0.071359367022948705, 0.59360425895727842, 
-0.6169581208139775, -0.43109338733192759], [0.38820282953277591, -0.13951415847295701, 0.15946840841698903, 
--0.087460123892198857], [-0.4992437233699471, 0.31463713165734236, 0.079705899933288138, -0.62381334523299992]]], 
-[[[0.61675763412457241, -0.42185221856648425, -0.52175070455875916, 0.52809632103027082], [-0.64397268579274924, 
--0.28172652761827743, -0.0025645512536596514, 0.29750310954134268], [-0.53291946722279082, -0.28123727562395545, 
--0.38023681964257788, -0.33499151553589501]], [[-0.61468041563286802, 0.036140354998707852, 0.076457106269333219, 
-0.080852851118895397], [-0.48507407258899582, -0.169131960944747, -0.1319730019655079, 0.55925992349274367], 
-[-0.63873129034228371, -0.65033744950311534, -0.56597930558020459, -0.49214055762443826]]], [[[-0.55256873915248883, 
-0.4366763796961381, -0.35345668916538403, -0.56383691853880769], [0.65380629967542914, -0.6353258861449701, 
-0.37928996910057294, 0.15342557445393845], [0.50049716587533277, 0.028002954607859499, -0.58825525818799951, 
-0.49255243005761967]], [[-0.58570500295454042, 0.61770456568139775, -0.18189270770719163, -0.15555134902037324], 
-[-0.23325416375045002, -0.46556467757113401, -0.66018206997418782, 0.31920329794069852], [-0.37199115685201789, 
--0.081726430997440744, 0.29250724482300328, -0.10585119807854079]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j    
-      ref=-ref
-      res=outer(arg0,arg1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_float_rank0_expandedData_rank4(self):
-      arg0=0.184226502646
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.65730545940807961, -0.4190764869923187, -0.91233525335447063, 0.94305454000779299], 
-[0.9595976861826756, -0.25922356850125716, -0.47777030754140215, 0.79357928766377217], [0.82177864020114644, 
-0.57356814342818963, -0.44599790358764069, -0.88625831217822171]], [[0.49549282141744944, -0.71265510458079873, 
--0.44671696505642289, -0.67951574493726463], [0.74664559903254291, 0.24573973378307845, 0.52339278211342077, 
-0.065647498013209127], [-0.29054338210583186, -0.24512034012153916, 0.52316907153411552, 0.4542799080891522]]], 
-[[[0.68013291879022675, -0.59070959949748247, -0.4160977604455971, -0.43475815273698326], [-0.88030221968057565, 
-0.25403036852465499, -0.12823056233409758, -0.65367638618314627], [-0.52340105656477909, -0.48022748873278265, 
--0.28561993280419773, -0.24563030027621902]], [[-0.77189443540773661, 0.76873304337010162, 0.57399920199108667, 
-0.69732176176072125], [0.14482102250488738, -0.79852504962461524, -0.79507037231493638, -0.089040013221562742], 
-[0.5770105324062218, -0.96386024653463465, -0.46049683884974102, 0.11283893421851321]]], [[[-0.55499542827162029, 
--0.68767713721104951, 0.14947438804422863, -0.25844280664845853], [0.91170284074015062, 0.9253661175288237, 
-0.83613688420269416, -0.93229398965659227], [-0.17563135055601586, 0.49891895617816684, -0.46929202386808755, 
--0.057064086850217244]], [[0.11910718268125309, 0.044264612600426467, -0.44246145558194883, -0.34283821975409845], 
-[0.74769433079688574, 0.99312538575709097, 0.9078007214123327, 0.58344305988196599], [-0.87486562805907941, 
--0.74611549307091285, -0.00091221631963400718, -0.95022821552442194]]]])+(1.-msk_arg1)*numpy.array([[[[0.29776538578889933, 
-0.83374470873797013, 0.61415531489559494, -0.71595656682753428], [0.21585625924589302, -0.14697143751100739, 
--0.084575556424320242, 0.47798305756602555], [-0.1338160730259188, -0.49693412037852136, 0.45330650019972452, 
-0.39188345056255458]], [[-0.37922219968267679, -0.20117902721507952, -0.83581818808135022, 0.60961342345292491], 
-[0.99750808819140802, -0.67257491810321568, -0.63236999997628573, -0.88694252684793451], [-0.69149659826752496, 
--0.53943479886510315, -0.92239128362138367, 0.14263274986737273]]], [[[0.10260430817581145, -0.55598580788903007, 
--0.33118324349604222, -0.13224437802571609], [-0.87170370823813759, -0.7395010730547209, 0.53349827266138816, 
-0.18763994168424558], [-0.079441770664999467, 0.15424036810085751, 0.54771635762931381, 0.70513379076545357]], 
-[[-0.2022059207172906, 0.17229783384265307, 0.02013953811621394, 0.016855182454158291], [0.2794366381731519, 
-0.14338154424900629, 0.18037912383416299, 0.80754634988290008], [-0.019647626451636979, -0.56963585459384491, 
--0.85708942953768896, -0.94946928910942985]]], [[[0.15117646226304982, -0.46746072048210907, -0.95653799430305986, 
-0.94491270358315815], [0.29755076195009256, 0.5322007738011707, 0.96013909022432498, 0.37016824938675996], 
-[0.0015505646618996227, -0.083969383227496142, -0.31112268986924185, 0.63143348905277041]], [[0.66576238925902853, 
--0.67268178702623427, 0.026781312366727317, 0.54021600142687909], [0.059925616543585969, -0.4159475667789827, 
--0.45691210248484726, 0.70846379196415565], [-0.69182695381065407, 0.80175306625454734, 0.31836086192875279, 
-0.57079550481579777]]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.12109308595670129, -0.077204995539657414, -0.16807633296590838, 0.17373563970982189], 
-[0.17678332567237773, -0.047755851428334765, -0.08801795282633168, 0.14619833673839361], [0.15139340483322833, 
-0.105666453092785, -0.082164633965282549, -0.16327226929330937]], [[0.09128290957580644, -0.13128995750955394, 
--0.082297104144863603, -0.12518480918250632], [0.13755190742559817, 0.045271771715951509, 0.096422821758778823, 
-0.012094008966416618], [-0.053525791152222002, -0.045157662987925187, 0.096381608341148561, 0.083690398689492282]]], 
-[[[0.12529850896296191, -0.1088243635946864, -0.076656235165616884, -0.080093973975456464], [-0.16217499920303352, 
-0.046799126359105415, -0.02362346803110723, -0.12042451448862652], [-0.09642434613201388, -0.088470630723586588, 
--0.052618761306428334, -0.045251611163710535]], [[-0.14220341224687463, 0.14162100004828904, 0.10574586550426303, 
-0.12846514938794293], [0.026679870485655267, -0.14710947716735806, -0.14647303404882633, -0.016403530231338868], 
-[0.1063006323749541, -0.17756860225833554, -0.084835722100706279, 0.020787922213349297]]], [[[-0.10224486673485472, 
--0.12668835393782565, 0.027537143744500309, -0.047612014402794466], [0.16795982580174315, 0.17047696349920111, 
-0.15403857390976763, -0.17175326115207679], [-0.032355949467882575, 0.091914094400366408, -0.086456028276758454, 
--0.010512717147088228]], [[0.021942699705354392, 0.0081547147703450798, -0.081513126517405443, -0.06315988619858888], 
-[0.13774511161075656, 0.18296001650672933, 0.16724095200507291, 0.10748567441498308], [-0.16117343494229214, 
--0.13745424785825541, -0.00016805442222254076, -0.1750572208613658]]]])+(1.-msk_ref)*numpy.array([[[[0.054856275632848166, 
-0.15359787179018658, 0.113143685744508, -0.13189817435288698], [0.039766443715062841, -0.027076033921469671, 
--0.015581058969369883, 0.088057147019305837], [-0.024652467131351836, -0.091548435042671669, 0.08351107115837525, 
-0.072195317541883797]], [[-0.069862779573163628, -0.037062508589506049, -0.15397986163792568, 0.11230694896862831], 
-[0.18376742644834052, -0.12390612492939977, -0.1164993134737172, -0.16339831976896946], [-0.12739199989025174, 
--0.099378186400325627, -0.16992892025248146, 0.026276732670810578]]], [[[0.018902432851615351, -0.10242732090806175, 
--0.061012730684148059, -0.024362919258238698], [-0.16059092551203377, -0.1362356963916424, 0.098284520939950423, 
-0.034568250213138987], [-0.014635279573597717, 0.028415163582012386, 0.10090386900791133, 0.12990433217005182]], 
-[[-0.037251689588008036, 0.03174182734226863, 0.0037102366720506495, 0.0031051713149854066], [0.051479634561722588, 
-0.026414680440939704, 0.033230615134270516, 0.14877143976325899], [-0.003619613506474992, -0.10494202127344078, 
--0.15789858805836002, -0.17491740650216633]]], [[[0.027850710925077213, -0.086118653658676339, -0.17621964933822257, 
-0.1740779626866551], [0.05481673623364039, 0.098045487262745729, 0.17688306664548908, 0.068194801975018524], 
-[0.0002856551047878403, -0.015469385801321393, -0.057317045048345332, 0.11632678334158844]], [[0.12265107656626197, 
--0.12392581301732901, 0.0049338275135852533, 0.099522104616139501], [0.011039886754714482, -0.076628565511696972, 
--0.084175318657294898, 0.13051780664469484], [-0.12745286013659204, 0.14770416338157275, 0.058650508172417133, 
-0.10515565957812352]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_float_rank0(self):
-      arg0=numpy.array(-0.447383148159)
-      arg1=-0.833832446992
-      res=outer(arg0,arg1)
-      ref=numpy.array(0.37304258517261873)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(arg0*1j)
-      arg1=arg1*1j
-      ref=-ref
-      res=outer(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_float_rank0(self):
-      arg0=numpy.array([-0.7077557598550499, 0.34384980137545629])
-      arg1=-0.117774156535
-      res=outer(arg0,arg1)
-      ref=numpy.array([0.083355337649769559, -0.040496620331747418])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_float_rank0(self):
-      arg0=numpy.array([[-0.74034215690736938, -0.026692072802847244, 0.20164819911474718, 0.83226009454281358, 
-0.91414431655496875], [0.69310910714139085, 0.40494661103705387, -0.070740970341285792, 0.8162325138343971, 
--0.24023752347865712], [0.55012364496204058, -0.40587261759026627, 0.18284956859225754, -0.82971461005420166, 
-0.78296352261416358], [-0.32346840994150194, -0.29416615770821286, -0.93637076734800884, 0.61578785330116848, 
--0.12974392129838419]])
-      arg1=0.964178232458
-      res=outer(arg0,arg1)
-      ref=numpy.array([[-0.71382179226108633, -0.025735915575689355, 0.19442480420079461, 0.80244706690161316, 
-0.88139805134749083], [0.66828071382412468, 0.39044070766956146, -0.068206903746024325, 0.78699362246359428, 
--0.23163179075773749], [0.53041724363284937, -0.39133354303128232, 0.17629957385098963, -0.79999276616663406, 
-0.75491638531320893], [-0.31188119975339523, -0.28362860598806422, -0.90282831138693886, 0.59372924396502325, 
--0.12509626470964516]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_float_rank0(self):
-      arg0=numpy.array([[[-0.15791645491015305, 0.41702383789148212], [-0.90077914152118699, 0.0088427934648849238]], 
-[[0.015777707296524834, 0.02048903309684591], [-0.15738286559336179, -0.84730278576106199]], [[-0.82290207937519555, 
--0.14283446280549805], [0.65481568668046997, -0.045837257239726314]], [[0.5564462185637844, 0.086215516976181572], 
-[-0.58292048601627267, 0.26964649866065393]], [[0.38964230741750172, 0.75334221328525208], [-0.20459531306113932, 
-0.51971180708870413]], [[-0.96004303118597267, 0.076424350124239648], [-0.36806507639747976, 0.95496844011225734]]])
-      arg1=-0.639352122152
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[0.10096422056954935, -0.26662507574394978], [0.57591505572195523, -0.0056536587675272655]], 
-[[-0.010087510642728482, -0.013099706791313899], [0.10062306910750114, 0.54172483418175643]], [[0.52612419077194139, 
-0.091321516911156322], [-0.41865779889767035, 0.029306147689852638]], [[-0.35576507070229002, -0.055122073741165685], 
-[0.37269144978046176, -0.17239906114958373]], [[-0.24911863612763688, -0.48165094277071724], [0.13080844758802121, 
--0.33227884676968744]], [[0.6138055493461263, -0.048862070436030913], [0.23532318768481883, -0.61056109877409215]]])
+   def test_generalTensorProduct_array_rank1_array_rank4_offset1(self):
+      arg0=numpy.array([-3.0, 5.0, 0.0])
+      arg1=numpy.array([[[[-7.0, 0.0], [-7.0, 2.0]], [[7.0, 4.0], [0.0, 6.0]], [[-7.0, 6.0], [-6.0, -4.0]], [[-4.0, 3.0], 
+[-2.0, -1.0]], [[7.0, 0.0], [-4.0, 1.0]], [[6.0, -5.0], [-1.0, 4.0]]], [[[-6.0, 6.0], [-2.0, -2.0]], [[-1.0, 0.0], [5.0, 6.0]], 
+[[2.0, 0.0], [-6.0, 0.0]], [[-5.0, 7.0], [0.0, 0.0]], [[3.0, 2.0], [3.0, 1.0]], [[6.0, 4.0], [-1.0, 0.0]]], [[[-6.0, 5.0], 
+[2.0, 4.0]], [[-7.0, 7.0], [6.0, -7.0]], [[-7.0, -4.0], [-5.0, 3.0]], [[1.0, 2.0], [3.0, 0.0]], [[0.0, 6.0], [-7.0, 3.0]], 
+[[-3.0, 6.0], [-5.0, 2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-9.0, 30.0], [11.0, -16.0]], [[-26.0, -12.0], [25.0, 12.0]], [[31.0, -18.0], [-12.0, 12.0]], [[-13.0, 
+26.0], [6.0, 3.0]], [[-6.0, 10.0], [27.0, 2.0]], [[12.0, 35.0], [-2.0, -12.0]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(arg0*1j)
-      arg1=arg1*1j
-      ref=-ref
-      res=outer(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank4_float_rank0(self):
-      arg0=numpy.array([[[[-0.87020281833627244, 0.38653786763242937, -0.39861176181522451, -0.65499761474764417], 
-[0.05055951134247616, -0.025737969733530264, -0.12216547307173986, -0.87787279426303932], [-0.80700029009802332, 
-0.94697847812541758, 0.29159653307353262, 0.63930031280993882]], [[0.23785001278341023, 0.93992568249991604, 
-0.22199263237551592, -0.052778005340911482], [-0.16862506415237455, 0.25374353614534706, -0.11888781793537628, 
--0.65094094688477777], [-0.44952265798288749, -0.15066801692167542, 0.94480116118414803, 0.32746587459986021]]], 
-[[[0.78917025548681541, -0.084561499269018459, -0.84479426524784618, 0.74962830861495], [0.97673242354717993, 
--0.71494837460876259, -0.80013195830983519, 0.12796340276698337], [0.019165508803590026, -0.21892235269927185, 
--0.39596112938741901, 0.64963194873588415]], [[0.95797829118030275, 0.53000085273002395, -0.93284698498085139, 
--0.86034783100269485], [-0.41924351261022297, 0.064151217188172405, -0.89760216010433047, -0.81302206425904222], 
-[0.68233887569792473, 0.18494775692731746, 0.73925938459522, -0.36536865017631448]]], [[[-0.94205154403397806, 
-0.21091249594021089, -0.076130048892607549, 0.36845534393432722], [0.5111382941147895, -0.54496836419397821, 
--0.11635448135542692, -0.16379745454182637], [-0.8580412291711903, 0.74391783752126805, -0.6049896435642117, 
--0.90606576695648267]], [[0.91914643333426516, -0.92427239857047083, 0.1023644003817421, -0.1239878505251808], 
-[0.084055849795886317, -0.41367241918571263, -0.71001744057354998, -0.19230922867658373], [-0.50023319705649949, 
-0.94827281200621139, -0.2159049077858417, -0.39167467063244432]]]])
-      arg1=-0.568664125355
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[0.49485312457061714, -0.21981021841376658, 0.22667620888885412, 0.37247364570005387], 
-[-0.028751380295943364, 0.014636260046930409, 0.069471121892915821, 0.49921476472250564], [0.4589121141297911, 
--0.53851268799316132, -0.16582048743679897, -0.3635471532232159]], [[-0.13525676948514392, -0.53450201613747816, 
--0.12623924612506784, 0.030012958245168815], [0.095891024619134027, -0.14429484604656836, 0.067607237001580431, 
-0.37016676421796135], [0.25562740912907533, 0.085679496061730795, -0.53727452595913372, -0.18621809516292637]]], 
-[[[-0.4487728130925599, 0.048087091020520438, 0.4804041919520522, -0.42628672645983823], [-0.55543268934228696, 
-0.40656549212084198, 0.45500634024081343, -0.072768196511931019], [-0.0108987373007763, 0.1244932882183814, 0.2251688893176586, 
--0.36942238393052951]], [[-0.54476788706308565, -0.30139247135510183, 0.53047661480414698, 0.48924894681818404], 
-[0.2384087454092334, -0.036480495812768111, 0.51043414729245151, 0.46233648106615199], [-0.38802163994444683, 
--0.10517315442943466, -0.42039029135128647, 0.20777204388463608]]], [[[0.53571091732737131, -0.11993837003027148, 
-0.04329242766674498, -0.20952733589077499], [-0.29066601095821287, 0.30990395817049171, 0.066166619371113802, 
-0.093145736222396441], [0.48793726510512936, -0.42303938640998484, 0.34403590650625121, 0.51524709688037884]], 
-[[-0.52268560258516061, 0.52560055512280734, -0.058210962210568262, 0.070507442573543411], [-0.047799546305145553, 
-0.23524066443971348, 0.40376144683052478, 0.1093593593230564], [0.28446467347764942, -0.53924872923740019, 0.12277737554587888, 
-0.22273133399889083]]]])
+   def test_generalTensorProduct_array_rank0_array_rank4_offset0(self):
+      arg0=numpy.array(6.0)
+      arg1=numpy.array([[[[-3.0, 5.0, 5.0, 0.0], [-3.0, -2.0, 4.0, 4.0], [-1.0, 1.0, 6.0, 3.0]], [[-6.0, -5.0, -5.0, -3.0], 
+[5.0, 3.0, -2.0, 7.0], [0.0, 6.0, -5.0, -1.0]]], [[[2.0, -4.0, 7.0, 7.0], [3.0, -5.0, -7.0, -7.0], [0.0, 5.0, -1.0, 6.0]], 
+[[4.0, 4.0, -3.0, 0.0], [0.0, -4.0, -4.0, -4.0], [-3.0, -4.0, 5.0, 1.0]]], [[[2.0, -3.0, -7.0, -5.0], [-7.0, 3.0, 5.0, 3.0], 
+[-3.0, -2.0, 1.0, 7.0]], [[1.0, 2.0, -1.0, 0.0], [0.0, 5.0, 4.0, 3.0], [6.0, -3.0, -5.0, 4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-18.0, 30.0, 30.0, 0.0], [-18.0, -12.0, 24.0, 24.0], [-6.0, 6.0, 36.0, 18.0]], [[-36.0, -30.0, -30.0, 
+-18.0], [30.0, 18.0, -12.0, 42.0], [0.0, 36.0, -30.0, -6.0]]], [[[12.0, -24.0, 42.0, 42.0], [18.0, -30.0, -42.0, -42.0], [0.0, 
+30.0, -6.0, 36.0]], [[24.0, 24.0, -18.0, 0.0], [0.0, -24.0, -24.0, -24.0], [-18.0, -24.0, 30.0, 6.0]]], [[[12.0, -18.0, -42.0, 
+-30.0], [-42.0, 18.0, 30.0, 18.0], [-18.0, -12.0, 6.0, 42.0]], [[6.0, 12.0, -6.0, 0.0], [0.0, 30.0, 24.0, 18.0], [36.0, -18.0, 
+-30.0, 24.0]]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_array_rank0(self):
-      arg0=numpy.array(-0.207683000649)
-      arg1=numpy.array(0.928165743638)
-      res=outer(arg0,arg1)
-      ref=numpy.array(-0.19276424673857764)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_array_rank0(self):
-      arg0=numpy.array([0.93891187273728738, -0.83684388514200214])
-      arg1=numpy.array(0.325006863482)
-      res=outer(arg0,arg1)
-      ref=numpy.array([0.30515280284446328, -0.27198000633418834])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_constData_rank0_offset0(self):
+      arg0=numpy.array(3.0)
+      arg1=Data(-6.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-18.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_array_rank0(self):
-      arg0=numpy.array([[0.074246212290295599, -0.1783493867998498, 0.06354609168547376, 0.77790826354226272, 
--0.50614134071462624], [-0.41467785638114374, 0.87706967672955005, -0.25212998844060541, -0.93711898146715567, 
--0.34260493725944197], [-0.43608695675866183, 0.86498660822160822, 0.45142390637338137, -0.29020859837544655, 
-0.83090104827681044], [0.31739964223258488, 0.33895596714672016, -0.83141613296839489, 0.49329189927812389, 
-0.018359301817349793]])
-      arg1=numpy.array(0.771453015092)
-      res=outer(arg0,arg1)
-      ref=numpy.array([[0.057277464330503514, -0.13758817218653971, 0.049022824028066493, 0.60011967537460065, 
--0.3904642633569666], [-0.31990448259708865, 0.67661804655870939, -0.19450643977759668, -0.7229432637527089, 
--0.26430361183417556], [-0.33642059763373061, 0.66729652692669539, 0.34825233365631891, -0.22388229822233913, 
-0.64100111893618472], [0.24485891098942519, 0.26148860283873598, -0.64139848257453524, 0.38055152301852974, 
-0.014163338741977116]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_constData_rank1_offset1(self):
+      arg0=numpy.array([-4.0, -7.0, -5.0])
+      arg1=Data(numpy.array([-1.0, -3.0, 4.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(5.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=outer(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_array_rank0(self):
-      arg0=numpy.array([[[0.22890218267521778, 0.14190434160962129], [-0.84482969323319335, 0.91841360418106577]], 
-[[-0.45435795577157667, -0.55641507914234856], [-0.98245728870817817, -0.32379807029523966]], [[0.5404127425337717, 
--0.65902737365430708], [0.2880201704204961, 0.69027355927695666]], [[0.31775056241027944, 0.46458796273435676], 
-[-0.98236559656202838, 0.53823105267672466]], [[-0.99671747177264791, -0.97760339687001663], [-0.020380770488373612, 
--0.12334078575248042]], [[-0.95617586546311739, 0.58649753976234509], [-0.44759240577104609, -0.45666066208325384]]])
-      arg1=numpy.array(0.628984462801)
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[0.14397591640387697, 0.089255626076413061], [-0.53138475075635072, 0.5776678874546719]], 
-[[-0.28578409473020422, -0.34997643964855274], [-0.61795036996273456, -0.20366395530055093]], [[0.33991121855325124, 
--0.41451797858890305], [0.18116021216769854, 0.43417134386733591]], [[0.1998601668022463, 0.29221861016413575], 
-[-0.61789269702744543, 0.33853896953051882]], [[-0.62691980354697951, -0.61489734741241586], [-0.012819187977093804, 
--0.077579437867938736]], [[-0.60141976308130241, 0.36889783998134418], [-0.28152866889756928, -0.28723246122264223]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_constData_rank2_offset2(self):
+      arg0=numpy.array([[2.0, 5.0, 3.0], [-3.0, -2.0, 0.0]])
+      arg1=Data(numpy.array([[3.0, 5.0, -1.0], [3.0, 7.0, 3.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(5.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank4_array_rank0(self):
-      arg0=numpy.array([[[[0.72014732698955375, -0.13486060745334227, 0.23474332003161913, 0.67651069382593376], 
-[-0.78542889973998498, -0.13478196489366945, 0.96798211398773448, -0.68984751443494652], [0.22216169271582276, 
-0.24976428201837564, 0.02856353065993078, 0.22585321890236276]], [[0.55690843170751414, -0.37328922333704595, 
-0.015239158523985052, 0.84768206207577035], [-0.85714719370844827, -0.045370799462534528, -0.5453445151133498, 
--0.014684318738259261], [-0.34003935275514685, 0.52980156993147798, 0.79481595972951635, 0.51231503305548731]]], 
-[[[0.89326872458915108, -0.50630791010133658, -0.43917997165505662, 0.80947422995533214], [0.48814414134967454, 
--0.11445907719210546, -0.12746204293519114, -0.28181681024183125], [-0.47017192506529093, 0.82642588873841349, 
--0.81703786624207453, -0.29160845380722367]], [[0.060809028860670633, -0.96985541156429012, 0.79244483057402282, 
--0.59923632202828148], [-0.39639332317995435, 0.10597687153371615, 0.39091924958652591, -0.90537659080526978], 
-[-0.72195636813718789, -0.5289409025268379, -0.92922629277285518, 0.47252160039886726]]], [[[0.30055684213557465, 
--0.19201302940683496, -0.2904517457543192, 0.39597497120161962], [-0.052595824562017501, 0.018124718453008004, 
--0.72467427579590482, 0.43256723364373473], [0.21958817986407686, 0.15716805388254484, -0.17828449289135739, 
-0.062420281231962527]], [[-0.23906809121972139, 0.43514000120426499, 0.61688858358287857, 0.72030306154158108], 
-[-0.39263270024044195, 0.61790128793808297, -0.23700797179115174, -0.87988848288027777], [0.57534289451001275, 
-0.30915542819777286, 0.18564180823835774, -0.69127657529842268]]]])
-      arg1=numpy.array(0.114228590767)
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[0.08226141430682879, -0.015404937139412466, 0.026814398639240705, 0.077276863194720422], 
-[-0.089718436365181162, -0.015395953910646709, 0.11057123276873601, -0.078800309418203748], [0.025377217081398371, 
-0.028530221958956544, 0.0032627718546214312, 0.025798894915467288]], [[0.063614865340356416, -0.042640301930397237, 
-0.0017407476026737514, 0.096829527369603638], [-0.097910716017431093, -0.0051826424845894574, -0.06229393544405485, 
--0.0016773690358486836], [-0.038842216070632991, 0.060518486719556792, 0.090790706999233098, 0.058521024254812586]]], 
-[[[0.10203682758628999, -0.057834839065194266, -0.050166909255364066, 0.092465100550213786], [0.055760017357669445, 
--0.013074499088175694, -0.014559809540803381, -0.032191537088449837], [-0.053707076418539827, 0.094401464644172678, 
--0.093329084064324511, -0.033310022734219957]], [[0.0069461296726802913, -0.11078521691099369, 0.090519856257273906, 
--0.068449920601848985], [-0.045279450696398826, 0.012105588689219772, 0.044654154984065199, -0.1034198920813558], 
-[-0.082468058527763025, -0.060420173894805439, -0.10614420992733231, 0.053975476520654854]]], [[[0.034332184522605724, 
--0.021933377758095979, -0.033177893603407532, 0.045231662939468953], [-0.006007946919961509, 0.0020703610469405293, 
--0.082778521289453816, 0.049411545511217646], [0.025083248335021995, 0.017953085308636513, -0.02036518637863605, 
-0.0071301807604233769]], [[-0.027308411157448493, 0.049705429124028748, 0.070466313563085761, 0.082279203645240634], 
-[-0.044849880037611277, 0.070581993354444636, -0.027073086618310722, -0.10050842143176002], [0.065720608047837387, 
-0.035314388891081662, 0.021205602142554264, -0.078963549026759283]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=outer(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_constData_rank3_offset3(self):
+      arg0=numpy.array([[[5.0, -7.0, 6.0], [4.0, -4.0, -2.0], [-2.0, 3.0, -7.0], [1.0, -7.0, 7.0]], [[6.0, -2.0, -6.0], [6.0, 
+-4.0, -1.0], [5.0, 2.0, -6.0], [1.0, -2.0, 2.0]]])
+      arg1=Data(numpy.array([[[5.0, -6.0, 4.0], [-4.0, -4.0, -7.0], [-3.0, -6.0, -6.0], [0.0, 4.0, 6.0]], [[-1.0, 1.0, 1.0], 
+[3.0, 2.0, -7.0], [-1.0, -6.0, -2.0], [-4.0, -2.0, 1.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(149.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_constData_rank0(self):
-      arg0=numpy.array(0.887539290361)
-      arg1=Data(-0.160935502236,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(-0.14283658144885403,self.functionspace)
+   def test_generalTensorProduct_array_rank4_constData_rank4_offset4(self):
+      arg0=numpy.array([[[[-7.0, 6.0], [4.0, -1.0], [-6.0, 3.0]], [[1.0, -7.0], [-1.0, 3.0], [-7.0, -1.0]]], [[[4.0, -6.0], 
+[4.0, 6.0], [6.0, 1.0]], [[3.0, -4.0], [-3.0, 6.0], [0.0, -7.0]]], [[[0.0, 7.0], [1.0, -4.0], [-6.0, -6.0]], [[-6.0, -1.0], 
+[6.0, 0.0], [-7.0, -6.0]]], [[[-7.0, -3.0], [-5.0, 0.0], [0.0, 3.0]], [[3.0, 0.0], [0.0, -1.0], [0.0, -4.0]]]])
+      arg1=Data(numpy.array([[[[-4.0, 4.0], [-3.0, 3.0], [5.0, 1.0]], [[-3.0, 0.0], [0.0, 5.0], [-7.0, -7.0]]], [[[5.0, -6.0], 
+[-6.0, 1.0], [-3.0, -7.0]], [[-6.0, 3.0], [5.0, -4.0], [-4.0, -3.0]]], [[[4.0, 5.0], [7.0, -5.0], [7.0, 5.0]], [[0.0, -2.0], 
+[-1.0, 4.0], [-2.0, -5.0]]], [[[2.0, 3.0], [6.0, 0.0], [-7.0, 2.0]], [[0.0, -4.0], [5.0, 1.0], [-6.0, 
+7.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-3.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=4)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_constData_rank0(self):
-      arg0=numpy.array([-0.80443673361283907, 0.88962940157758075])
-      arg1=Data(-0.952119275543,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([0.76591972002781683, -0.84703330133200139]),self.functionspace)
+   def test_generalTensorProduct_array_rank0_constData_rank1_offset0(self):
+      arg0=numpy.array(-5.0)
+      arg1=Data(numpy.array([-2.0, 2.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([10.0, -10.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_constData_rank0(self):
-      arg0=numpy.array([[-0.95383898291833091, -0.46383909201486806, -0.71519060195390449, 0.0048290787630054233, 
--0.044981813281804284], [-0.52949066543669643, 0.99055946009096418, 0.68357813283801949, -0.84851215078442399, 
--0.15535224483408228], [0.27022658310544156, -0.8170007898109839, 0.73088394412821422, -0.029016832652413393, 
--0.16030994451808289], [0.64656138098619609, 0.077804961279747342, 0.25404457715323114, 0.57257780429924776, 
--0.24032882851783999]])
-      arg1=Data(0.148359356872,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[-0.14151093806492476, -0.068814869383281421, -0.10610521774656882, 0.00071643901956229322, 
--0.0066734728894116005], [-0.078554894593759389, 0.14695876444227876, 0.10141521215940949, -0.1258847169882043, 
--0.023047959132160099], [0.040090642079161652, -0.12120971174003259, 0.10843347189871702, -0.0043049186307659408, 
--0.023783480268841486], [0.095923430661193479, 0.011543094016891225, 0.037689890083197612, 0.084947274804849357, 
--0.035655030436637015]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_constData_rank2_offset1(self):
+      arg0=numpy.array([4.0, 3.0, 1.0])
+      arg1=Data(numpy.array([[-1.0, 0.0], [-2.0, 1.0], [0.0, 1.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-10.0, 4.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_constData_rank0(self):
-      arg0=numpy.array([[[0.81268236173682173, -0.61774115797698559], [-0.72454518228764386, 0.24997841496722639]], 
-[[-0.75470763598792434, 0.67603998942603849], [-0.35958699159539176, -0.52667774173871607]], [[-0.084304086883719265, 
-0.4423511992191278], [-0.55266737759737361, -0.80092220260002445]], [[0.51243243708803732, -0.60985056807272109], 
-[0.59800145126702575, -0.47236649314802048]], [[-0.50307511490707713, -0.26267426698901741], [-0.21398082083038661, 
-0.15170633594316407]], [[-0.71895932140375174, -0.32112868090794633], [0.32074928270899106, -0.55325289435955582]]])
-      arg1=Data(-0.635300701687,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.51629767466022392, 0.39245139112385014], [0.46030406271142948, -0.15881146243533611]], 
-[[0.47946629071182573, -0.42948867965097798], [0.22844586807814618, 0.33459873888964281]], [[0.053558445552326576, 
--0.28102602725609183], [0.3511099727872431, 0.50882643730866328]], [[-0.32554868684931848, 0.38743849382094486], 
-[-0.37991074159991289, 0.3000947645504653]], [[0.31960397350184117, 0.16687714613329696], [0.13594216562115033, 
--0.096379141675088126]], [[0.45675536137236566, 0.20401327631270727], [-0.20377224437069213, 
-0.35148195199710708]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_constData_rank3_offset2(self):
+      arg0=numpy.array([[-3.0, 1.0, 3.0], [-3.0, 4.0, 7.0]])
+      arg1=Data(numpy.array([[[1.0, 7.0], [-6.0, -3.0], [2.0, 2.0]], [[-4.0, -2.0], [0.0, 0.0], [-6.0, 
+5.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-33.0, 23.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank4_constData_rank0(self):
-      arg0=numpy.array([[[[-0.18026562838092008, 0.27831868086485678, 0.98579853033629061, 0.88127902674675784], 
-[-0.5364354806419025, -0.13897951092749539, 0.42877943629615789, -0.79530200142915541], [-0.68639139086178824, 
--0.68881420582826625, 0.78988873526541759, -0.55015997231733227]], [[0.67967080280078607, -0.84205267815405049, 
--0.76960487747871231, -0.66764363542422145], [0.13744122174468965, -0.027930655143734606, -0.72106750744828885, 
-0.030892117028429311], [-0.63383485403404816, 0.83772516805124941, -0.88145536554766912, -0.55175259156627643]]], 
-[[[0.95237671798280288, -0.31426345768375819, -0.42409201981500755, -0.80473471628180415], [0.072934421982475017, 
--0.84154816359610995, 0.14914477114807712, -0.034838092348106864], [0.99012346249899785, 0.017641123115833768, 
--0.44204693967023934, -0.17622878218081217]], [[-0.91456939505022539, 0.7675074592143587, 0.70302295778984458, 
-0.7321972361192377], [0.73700357930770388, -0.54386864178108807, -0.8730357957009629, -0.58210683464430324], 
-[-0.55715123434724068, -0.44056110733015719, 0.55416164304167537, 0.86092420650071788]]], [[[0.21182039332567482, 
--0.90059380223329022, 0.56588168450013643, 0.60138762580131289], [-0.98715507058350171, -0.90566299557741159, 
--0.090968976101634125, -0.91128877303181222], [-0.11950637352599403, 0.90900379164478329, 0.39364466601609749, 
--0.74427105029357277]], [[0.88229174877567651, 0.15812352807834085, 0.14579456797030232, 0.14467696011463982], 
-[-0.30198142121146998, 0.8616472362664942, 0.31192655241301304, -0.40610229411455534], [-0.85333199406519222, 
-0.051210495043784832, -0.31613404527326283, 0.46299292449748264]]]])
-      arg1=Data(0.338135219123,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.060954157752957767, 0.094109348140309079, 0.33333320206655742, 0.29799147681766613], 
-[-0.18138772879229101, -0.046993867381099209, 0.1449854286475093, -0.26891961652234059], [-0.23209310335330599, 
--0.23291234242289091, 0.26708920058189306, -0.18602846279231652]], [[0.22982063583666248, -0.28472766684086931, 
--0.26023051388452234, -0.22575382696035681], [0.046473717631196391, -0.0094443381972803067, -0.24381831963362285, 
-0.010445712760586458], [-0.21432188725670331, 0.28326438326400094, -0.29805110317675221, -0.18656698345103803]]], 
-[[[0.3220321102229175, -0.10626354312630162, -0.14340044804853397, -0.27210914962596733], [0.024661696758665703, 
--0.28455707270026925, 0.050431099873229621, -0.011779985989960235], [0.33479561395108726, 0.0059650850303512139, 
--0.14947163880812167, -0.059589157878517755]], [[-0.30924812279865005, 0.25952130290011216, 0.23771682188088594, 
-0.24758167287655555], [0.24920686678376869, -0.18390114236286731, -0.29520415008171336, -0.1968308220855445], 
-[-0.18839245471074709, -0.1489692265642277, 0.18738156859955105, 0.29110879521355876]]], [[[0.071623935111932435, 
--0.30452248265911952, 0.19134452738624036, 0.20335033662828797], [-0.33379189610029752, -0.30623655546131173, 
--0.030759814667536179, -0.30813882895359362], [-0.040409313798827007, 0.30736619627159828, 0.13310512540001893, 
--0.25166425467804671]], [[0.29833391380282542, 0.053467133815298003, 0.049298278187605613, 0.048920375610437397], 
-[-0.10211055403246573, 0.29135327704184211, 0.10547335315050814, -0.13731748820684589], [-0.28854160079804264, 
-0.017316071963036032, -0.10689605467076786, 0.15655421397743211]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_constData_rank4_offset3(self):
+      arg0=numpy.array([[[6.0, 5.0, 1.0], [-2.0, 5.0, 1.0], [0.0, -4.0, -6.0], [-6.0, 2.0, -1.0]], [[-7.0, -5.0, 0.0], [6.0, 
+6.0, -5.0], [-7.0, -2.0, 7.0], [-2.0, 7.0, 1.0]]])
+      arg1=Data(numpy.array([[[[7.0, 5.0], [-2.0, 6.0], [6.0, -3.0]], [[0.0, 1.0], [-1.0, 0.0], [-2.0, -4.0]], [[-4.0, -4.0], 
+[-5.0, -2.0], [-7.0, 0.0]], [[1.0, -7.0], [1.0, -6.0], [7.0, -3.0]]], [[[-3.0, -1.0], [-5.0, -1.0], [-5.0, -1.0]], [[-2.0, 
+0.0], [-7.0, 0.0], [5.0, -5.0]], [[-2.0, -7.0], [2.0, -6.0], [7.0, -4.0]], [[-1.0, -5.0], [3.0, -1.0], [-6.0, 
+7.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([125.0, 172.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=outer(arg0,arg1)
-      ref=-ref
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_expandedData_rank0(self):
-      arg0=numpy.array(-0.219684990046)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.984785150581)+(1.-msk_arg1)*(0.959198032324)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(-0.2163425160025613)+(1.-msk_ref)*numpy.array(-0.21072141018301316)
+   def test_generalTensorProduct_array_rank0_constData_rank2_offset0(self):
+      arg0=numpy.array(3.0)
+      arg1=Data(numpy.array([[6.0, -3.0, -5.0, -3.0, 0.0], [1.0, 6.0, 6.0, 3.0, 0.0], [-6.0, 3.0, 7.0, -5.0, 1.0], [6.0, -1.0, 
+2.0, 0.0, -2.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[18.0, -9.0, -15.0, -9.0, 0.0], [3.0, 18.0, 18.0, 9.0, 0.0], [-18.0, 9.0, 21.0, -15.0, 3.0], [18.0, 
+-3.0, 6.0, 0.0, -6.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_expandedData_rank0(self):
-      arg0=numpy.array([0.3549348644413739, -0.33299431526460643])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.0403903428868)+(1.-msk_arg1)*(0.867826851273)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.01433594087726137, -0.013449754572887379])+(1.-msk_ref)*numpy.array([0.30802200581530792, 
--0.2889814081080247])
+   def test_generalTensorProduct_array_rank1_constData_rank3_offset1(self):
+      arg0=numpy.array([-6.0, 0.0, -1.0])
+      arg1=Data(numpy.array([[[-7.0, 6.0, -2.0, -4.0, -7.0], [1.0, 1.0, -1.0, -7.0, 7.0], [5.0, -4.0, -4.0, 0.0, -3.0], [5.0, 
+-2.0, -4.0, 0.0, -2.0]], [[2.0, -7.0, 0.0, 3.0, -1.0], [1.0, -7.0, -4.0, 6.0, -2.0], [-4.0, 7.0, 5.0, 1.0, 0.0], [7.0, -1.0, 
+-5.0, 7.0, 6.0]], [[-3.0, -5.0, 4.0, -1.0, 6.0], [5.0, -3.0, -7.0, -1.0, -4.0], [7.0, 2.0, 7.0, 3.0, -5.0], [5.0, -6.0, 6.0, 
+5.0, -3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[45.0, -31.0, 8.0, 25.0, 36.0], [-11.0, -3.0, 13.0, 43.0, -38.0], [-37.0, 22.0, 17.0, -3.0, 23.0], 
+[-35.0, 18.0, 18.0, -5.0, 15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_expandedData_rank0(self):
-      arg0=numpy.array([[-0.49543918245473906, -0.18156754427494026, 0.73371800638179052, -0.62302790811506226, 
--0.01418456574302196], [0.3452768699724631, -0.18619769930544483, 0.90490194291210213, -0.40087053280296869, 
--0.84660055652106725], [0.40670965695263761, -0.87788723802393731, -0.97163148178830383, -0.42472364241307847, 
--0.3871763715678489], [0.47028774699673925, -0.39379776090155527, 0.18107041954039649, 0.99960890315982254, 
-0.62771463148164619]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.779222341332)+(1.-msk_arg1)*(0.817056551009)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.38605727973990189, 0.14148148695978688, -0.57172946281013015, 0.4854772652764815, 
-0.011052930529052624], [-0.26904745102766325, 0.14508940720338592, -0.70511981063167628, 0.31236727514166129, 
-0.65969006782516337], [-0.31691725113289343, 0.6840693490383325, 0.7571169581507825, 0.33095415106009546, 0.30169647876145583], 
-[-0.36645871931446328, 0.30685601326093603, -0.14109411626020171, -0.7789175899363241, 
--0.48912926483136554]])+(1.-msk_ref)*numpy.array([[-0.40480182965139777, -0.14835095150053357, 0.59948910370781616, 
--0.50904903378710897, -0.011589592363559949], [0.28211072852302999, -0.15213405000039656, 0.7393560604774887, 
--0.3275338949333037, -0.69172053079376206], [0.33230478957194803, -0.71728351887502739, -0.7938778673621274, 
--0.34702323440218974, -0.31634499078556977], [0.38425168454314829, -0.3217550403174585, 0.14794477247950574, 
-0.81673700277407779, 0.5128783518165454]])
+   def test_generalTensorProduct_array_rank2_constData_rank4_offset2(self):
+      arg0=numpy.array([[-2.0, 0.0, 0.0], [6.0, 3.0, 0.0]])
+      arg1=Data(numpy.array([[[[1.0, -5.0, -1.0, -5.0, -4.0], [0.0, -4.0, -2.0, 7.0, 2.0], [4.0, 5.0, 0.0, 2.0, -4.0], [1.0, 
+-2.0, 1.0, -5.0, 0.0]], [[-1.0, -1.0, 4.0, 6.0, -1.0], [-7.0, 4.0, 2.0, -4.0, 1.0], [-3.0, 1.0, -3.0, -1.0, -6.0], [1.0, -4.0, 
+4.0, 0.0, 0.0]], [[0.0, 1.0, 1.0, -7.0, 6.0], [-7.0, -1.0, 3.0, 3.0, 3.0], [3.0, -6.0, 0.0, 6.0, 6.0], [7.0, 0.0, 2.0, 7.0, 
+6.0]]], [[[-3.0, -2.0, -5.0, -7.0, 0.0], [0.0, -3.0, 1.0, -1.0, 0.0], [-3.0, -5.0, 2.0, 4.0, -1.0], [-7.0, 3.0, 5.0, -1.0, 
+-5.0]], [[-2.0, 0.0, 4.0, -3.0, 0.0], [-3.0, -6.0, 0.0, -7.0, -3.0], [4.0, -6.0, 4.0, 4.0, 2.0], [-5.0, 4.0, -4.0, -1.0, 
+-6.0]], [[0.0, 1.0, -5.0, -7.0, 4.0], [3.0, -3.0, -2.0, -4.0, 2.0], [-1.0, -3.0, 4.0, -3.0, 2.0], [2.0, 1.0, 3.0, 0.0, 
+-2.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-26.0, -2.0, -16.0, -41.0, 8.0], [-9.0, -28.0, 10.0, -41.0, -13.0], [-14.0, -58.0, 24.0, 32.0, 
+8.0], [-59.0, 34.0, 16.0, 1.0, -48.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=outer(arg0,arg1)
-        ref=-ref      
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_expandedData_rank0(self):
-      arg0=numpy.array([[[0.54236255244194465, 0.75659586809114421], [0.3661458269609339, -0.51975633455419379]], 
-[[-0.80861697268642407, -0.75737083498588476], [-0.27761315519041752, -0.65538128106110061]], [[0.45251432733535735, 
-0.95093655581500647], [-0.36525727052008605, -0.4908409940140579]], [[-0.27352299292749049, -0.23117084777931862], 
-[-0.14429773179196048, -0.48471103153587536]], [[0.68495464141255469, -0.1919787494952232], [-0.77482644344771479, 
--0.9802309778068532]], [[-0.072370570945621493, -0.22381199096031423], [-0.58589816807084705, -0.20352533557704966]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.325076605672)+(1.-msk_arg1)*(0.972088798165)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.17630937759136275, -0.24595161666443635], [-0.11902544260938283, 0.16896062501333384]], 
-[[0.26286246076957165, 0.24620354027208669], [0.090245542179160948, 0.213049122268229]], [[-0.14710182154807064, 
--0.30912722777364771], [0.11873659369764412, 0.15956092425870005]], [[0.088915926114081431, 0.075148234526391064], 
-[0.046907816857081411, 0.1575682168633965]], [[-0.22266272986959096, 0.062407800247038729], [0.25187795022079568, 
-0.31865015903987687]], [[0.023525979553538398, 0.072756042330043777], [0.19046178774584188, 
-0.066161325257617018]]])+(1.-msk_ref)*numpy.array([[[0.52722456177304045, 0.73547836810939327], [0.35592625688361718, 
--0.50524931059547862]], [[-0.78604750115463928, -0.73623170474671928], [-0.26986463838387154, -0.63708880184658223]], 
-[[0.43988410861191157, 0.92439477367345957], [-0.35506250112093157, -0.4771410319612836]], [[-0.26588863746540259, 
--0.22471859158860277], [-0.14027020867559534, -0.47118216410307007]], [[0.66583673416833034, -0.18662039187004836], 
-[-0.75320010619762001, -0.9528715531404548]], [[-0.070350621333050561, -0.21756512930754782], [-0.56954504604711753, 
--0.19784469885724082]]])
+   def test_generalTensorProduct_array_rank0_constData_rank3_offset0(self):
+      arg0=numpy.array(0.0)
+      arg1=Data(numpy.array([[[0.0, -1.0], [-3.0, -1.0]], [[5.0, 2.0], [-4.0, 6.0]], [[-5.0, 4.0], [0.0, 7.0]], [[-2.0, -2.0], 
+[5.0, 6.0]], [[0.0, 5.0], [1.0, -6.0]], [[-1.0, -3.0], [4.0, 7.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, -0.0], [-0.0, -0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[-0.0, -0.0], [0.0, 0.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=outer(arg0,arg1)
-        ref=-ref    
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank4_expandedData_rank0(self):
-      arg0=numpy.array([[[[-0.822250636341469, 0.63638809184653833, 0.52959023053761745, -0.0036888432821744477], 
-[-0.0095192693710410836, -0.61885383255801396, 0.73352016357184868, 0.6177409427823235], [-0.68277734563867454, 
-0.41285719119533026, -0.26534099849346537, 0.55786359386333229]], [[0.062308714666052589, 0.1809406597141674, 
--0.3972832420118888, 0.53326051657459539], [-0.8537018610811522, -0.36944105535194449, -0.74127572741761094, 
--0.071601359497779793], [0.62774540796583267, -0.31605339710016711, 0.16176277052083066, -0.62123826544507965]]], 
-[[[0.92456868073754506, 0.61315530468207013, 0.33222920883688434, -0.54113394998908704], [-0.16602855481677925, 
--0.21715771822207275, 0.63670831412113249, -0.94084038285711369], [0.55803542236941817, 0.037332690808041802, 
--0.28711960314612517, 0.046507744312877186]], [[-0.049053830386043717, -0.079295986576197075, -0.61783181583030999, 
--0.88326371464697995], [0.45009667779065543, 0.95843215991445696, 0.72270648953330463, -0.50524740319664985], 
-[0.031675253637922784, 0.056197570308277767, -0.32562149073832658, -0.02611660637834845]]], [[[-0.49213582326329286, 
--0.6446132567206968, -0.17581570927366008, 0.54391357448983135], [-0.96359375506215361, 0.52153541000680015, 
-0.67931642406343462, 0.74271670340750484], [-0.94227463976154291, 0.03116700024629071, 0.28594734622339146, 
--0.089203926776785236]], [[-0.83316454913290783, -0.6887417787132184, -0.79411226326946527, 0.39282591376873621], 
-[-0.44894050979038158, 0.18717976723150787, -0.54009302765234679, 0.5825689649809529], [-0.25538648970381628, 
--0.4225818231655476, -0.49715341260075241, -0.71712430014819817]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.0433066760346)+(1.-msk_arg1)*(-0.474220233298)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.03560894192731321, -0.027559852925898149, -0.022934792545000734, 0.00015975154096367178], 
-[0.00041224791473810842, 0.026800502439382718, -0.031766320088679183, -0.026752306882404632], [0.029568817311362693, 
--0.017879472627665899, 0.011491036660463316, -0.024159217930957023]], [[-0.0026983833201773056, -0.0078359385317347419, 
-0.017205016655798717, -0.023093740433358587], [0.036970989928007195, 0.015999264098020646, 0.032102187779613538, 
-0.0031008168794098494], [-0.027185567015006656, 0.013687222077863069, -0.0070054078974107628, 0.026903764301949202]]], 
-[[[-0.040039996328471571, -0.026553718138784876, -0.014387742716342342, 0.023434712663520253], [0.007190144835949046, 
-0.0094043789514640531, -0.02757372068820307, 0.040744669660695822], [-0.024166659252403602, -0.0016167547463250957, 
-0.012434195636642468, -0.0020140958160594523]], [[0.0021243583407863733, 0.0034340456015022032, 0.026756242292054064, 
-0.038251215543365844], [-0.019492191009345811, -0.041506511050591728, -0.031298015810347801, 0.021880585607578374], 
-[-0.001371749947612444, -0.0024337299712742584, 0.014101584409319901, 0.0011310234115512418]]], [[[0.021312766663102251, 
-0.027916057476434795, 0.0076139939633141267, -0.023555088961271925], [0.041730042579474977, -0.022585965041755498, 
--0.029418936301922497, -0.032164591659981562], [0.040806782559806382, -0.001349739182637529, -0.01238342908586028, 
-0.0038631255579396201]], [[0.036081587212842318, 0.029827117082252233, 0.034390362520542221, -0.017011984585592475], 
-[0.01944212121631634, -0.008106133539733466, 0.023389633777105828, -0.025229125434263269], [0.011059939973226046, 
-0.018300614113956164, 0.021530061779014453, 0.031056269743083013]]]])+(1.-msk_ref)*numpy.array([[[[0.38992788859509775, 
--0.30178810938339307, -0.25114240267777288, 0.0017493241218717072], [0.0045142301419594938, 0.29347300885288535, 
--0.34785010309766623, -0.29294525400382271], [0.32378683213920972, -0.19578523352731481, 0.12583007020903647, 
--0.2645502036302062]], [[-0.02954805320542013, -0.085805721862706297, 0.18839975171217543, -0.25288292657849815], 
-[0.40484269572865111, 0.17519642345877637, 0.35152794839395946, 0.033954813405475195], [-0.29768957381716588, 
-0.14987891570739648, -0.076711178775283217, 0.29460375517287252]]], [[[-0.43844917547917728, -0.29077065163410137, 
--0.15754981292296344, 0.25661666800917293], [0.078734099999305959, 0.10298058379768445, -0.30193996526515826, 
-0.4461655458544711], [-0.26463168818444949, -0.017703917344623388, 0.13615792518832087, -0.022054913358206019]], 
-[[0.023262318889819274, 0.037603761253741638, 0.2929883478418393, 0.4188615248233527], [-0.21344495154843937, 
--0.45450792247472693, -0.34272204007230178, 0.23959854141701173], [-0.015021046169942029, -0.026650024902359754, 
-0.15441629930469944, 0.012385023169686635]]], [[[0.23338076492211271, 0.30568864898892922, 0.083375366669169365, 
--0.25793482218839608], [0.45695565532985627, -0.24732264380647698, -0.32214559310237417, -0.3522112883640634], 
-[0.44684569949829844, -0.014780022127987881, -0.13560201723693716, 0.042302306967164985]], [[0.39510348686524543, 
-0.32661528698330894, 0.37658410275227222, -0.18628599647282285], [0.21289667328961806, -0.088764432885149416, 
-0.25612304157579907, -0.27626599048531247], [0.12110944072844429, 0.20039685076896629, 0.23576020730831521, 
-0.34007485291978418]]]])
+   def test_generalTensorProduct_array_rank1_constData_rank4_offset1(self):
+      arg0=numpy.array([-2.0, 0.0, 1.0])
+      arg1=Data(numpy.array([[[[0.0, 6.0], [5.0, 2.0]], [[-2.0, 2.0], [3.0, 0.0]], [[-2.0, 1.0], [4.0, -6.0]], [[-5.0, 5.0], 
+[-6.0, 4.0]], [[-2.0, -5.0], [5.0, 2.0]], [[-2.0, 2.0], [-7.0, 0.0]]], [[[-1.0, -4.0], [-4.0, -2.0]], [[3.0, -6.0], [-7.0, 
+4.0]], [[-6.0, -3.0], [-6.0, -3.0]], [[5.0, -2.0], [4.0, -5.0]], [[4.0, -6.0], [7.0, 6.0]], [[-7.0, -4.0], [-4.0, 5.0]]], 
+[[[3.0, -2.0], [-3.0, 0.0]], [[4.0, 4.0], [-4.0, 1.0]], [[-4.0, -3.0], [0.0, 2.0]], [[6.0, -3.0], [0.0, -6.0]], [[-1.0, 2.0], 
+[5.0, -3.0]], [[6.0, 7.0], [6.0, 4.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[3.0, -14.0], [-13.0, -4.0]], [[8.0, 0.0], [-10.0, 1.0]], [[0.0, -5.0], [-8.0, 14.0]], [[16.0, 
+-13.0], [12.0, -14.0]], [[3.0, 12.0], [-5.0, -7.0]], [[10.0, 3.0], [20.0, 4.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_array_rank1(self):
-      arg0=numpy.array(-0.0705991943231)
-      arg1=numpy.array([0.31103878225265236, 0.89166364596776915])
-      res=outer(arg0,arg1)
-      ref=numpy.array([-0.021959087430276469, -0.062950735012525461])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_constData_rank4_offset0(self):
+      arg0=numpy.array(5.0)
+      arg1=Data(numpy.array([[[[0.0, -3.0, -4.0, -5.0], [7.0, 4.0, 4.0, -2.0], [-6.0, 1.0, 6.0, 3.0]], [[2.0, 0.0, 6.0, 7.0], 
+[3.0, 7.0, -1.0, -2.0], [6.0, 5.0, 3.0, 5.0]]], [[[-2.0, 1.0, 4.0, 1.0], [6.0, -6.0, -1.0, -4.0], [1.0, 3.0, 7.0, 7.0]], [[7.0, 
+-6.0, 0.0, 5.0], [-1.0, -7.0, 3.0, -3.0], [-1.0, 1.0, 2.0, -3.0]]], [[[3.0, -4.0, 6.0, -2.0], [4.0, -2.0, 5.0, 6.0], [4.0, 
+-3.0, -2.0, 1.0]], [[1.0, 0.0, -2.0, -4.0], [0.0, -7.0, -6.0, 5.0], [7.0, 7.0, -2.0, 2.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, -15.0, -20.0, -25.0], [35.0, 20.0, 20.0, -10.0], [-30.0, 5.0, 30.0, 15.0]], [[10.0, 0.0, 
+30.0, 35.0], [15.0, 35.0, -5.0, -10.0], [30.0, 25.0, 15.0, 25.0]]], [[[-10.0, 5.0, 20.0, 5.0], [30.0, -30.0, -5.0, -20.0], 
+[5.0, 15.0, 35.0, 35.0]], [[35.0, -30.0, 0.0, 25.0], [-5.0, -35.0, 15.0, -15.0], [-5.0, 5.0, 10.0, -15.0]]], [[[15.0, -20.0, 
+30.0, -10.0], [20.0, -10.0, 25.0, 30.0], [20.0, -15.0, -10.0, 5.0]], [[5.0, 0.0, -10.0, -20.0], [0.0, -35.0, -30.0, 25.0], 
+[35.0, 35.0, -10.0, 10.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_array_rank1(self):
-      arg0=numpy.array([-0.55998676190775054, 0.049723485599342698])
-      arg1=numpy.array([0.79135932201024461, -0.21409044108347763])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[-0.44315074423802975, 0.11988781285773868], [0.039349143851881999, -0.010645322964171226]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_expandedData_rank0_offset0(self):
+      arg0=numpy.array(5.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(6.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(5.0)+(1.-msk_ref)*numpy.array(30.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_array_rank1(self):
-      arg0=numpy.array([[0.39370173512983175, -0.95148127262943816, 0.19145825873523825, 0.22194728033627098, 
--0.55485368848311123], [0.21660110788510956, 0.89997912244714051, 0.90465802099620984, 0.82682412007740247, 
--0.37263197268419423], [-0.41711154749590573, -0.12043205783375033, -0.21821535243959223, 0.082355203560406265, 
--0.75205178168271147], [-0.45919525734405653, -0.76847783785798152, -0.84715014107714515, -0.47796513160077603, 
-0.35432747942008547]])
-      arg1=numpy.array([-0.75239679614805688, 0.18991554154474533])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[-0.29621992414961629, 0.074770078234287884], [0.71589146112126512, -0.18070108116110323], 
-[-0.14405258046847899, 0.036360898890916739], [-0.16699242263878492, 0.042151237939446307], [0.4174701375456249, 
--0.10537533872636949]], [[-0.16296997961487605, 0.041135916703192388], [-0.67714140832936831, 0.17092002241851337], 
-[-0.68066179660718984, 0.17180861797029279], [-0.62209981892417388, 0.15702675052675744], [0.28036710238991797, 
--0.070768602889205501]], [[0.31383339197227755, -0.079215965427251692], [0.090612694467631247, -0.022871919482844782], 
-[0.16418453204586825, -0.04144248683194262], [-0.06196379130497072, 0.015640533083202294], [0.56584135107551004, 
--0.14282632138796272]], [[0.3454970404320506, -0.087208315973275191], [0.57820026311513117, -0.14594588474193354], 
-[0.63739305200281837, -0.16088697781237343], [0.35961943368690824, -0.090773006807466847], [-0.26659486030288887, 
-0.067292295138250136]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=outer(arg0,arg1)
-      ref=-ref    
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_array_rank1(self):
-      arg0=numpy.array([[[-0.11650349333382004, -0.93704280994921563], [0.16842803438649012, -0.29159530904824105]], 
-[[0.62977412573709302, -0.38013561791327355], [0.37907571072272361, -0.8115279466802332]], [[-0.88418803236921328, 
--0.51276945192377066], [-0.16107750386484887, 0.67441583586588005]], [[0.53090414717970158, -0.48588821848507924], 
-[-0.017722197481937263, -0.62956203569481728]], [[-0.26077893723743117, -0.052624881493034126], [0.40460561788751304, 
--0.045268579762606898]], [[-0.42518607569172384, 0.93698214557284532], [0.36176722067350453, -0.50067180425631896]]])
-      arg1=numpy.array([0.81982036515978107, 0.2126887982468002])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[-0.095511936447322462, -0.024778987988724282], [-0.76820677862291331, -0.19929850915390346]], 
-[[0.13808073265387649, 0.035822756224733326], [-0.23905577274280818, -0.062019055855874694]]], [[[0.5163016537299655, 
-0.13394590196995157], [-0.31164292108789893, -0.080850587744778962]], [[0.31077398758790681, 0.080625157358167762], 
-[-0.66530713758475613, -0.17260290372311216]]], [[[-0.7248753555668368, -0.18805689002881085], [-0.42037883931892644, 
--0.10906031850733718]], [[-0.13205461803750645, -0.034259380721609022], [0.55289983682910471, 0.14344069364892528]]], 
-[[[0.43524603180570509, 0.11291736504789307], [-0.39834105670527314, -0.10334298127187019]], [[-0.01452901841107556, 
--0.0037693128847257049], [-0.51612777799406018, -0.13390079279373981]]], [[[-0.21379188355197046, -0.055464758769106969], 
-[-0.043142949562109442, -0.011192722802633705]], [[0.33170392540223981, 0.086055082632399194], [-0.03711210359124506, 
--0.0096281198280482819]]], [[[-0.34857620383444338, -0.090432315470145769], [0.76815704473172519, 0.19928560652059688]], 
-[[0.2965841349553916, 0.076943835410132652], [-0.41046094139062184, -0.10648728436333367]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_constData_rank1(self):
-      arg0=numpy.array(0.45620442526)
-      arg1=Data(numpy.array([0.31772359770243996, -0.5126401738892179]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([0.14494691128130036, -0.23386871589418687]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_expandedData_rank1_offset1(self):
+      arg0=numpy.array([1.0, -7.0, 5.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, -2.0, -6.0])+(1.-msk_arg1)*numpy.array([-3.0, -1.0, -2.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-12.0)+(1.-msk_ref)*numpy.array(-6.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_constData_rank1(self):
-      arg0=numpy.array([0.8539936228705296, 0.89072822837147902])
-      arg1=Data(numpy.array([0.90381714995212459, 0.33301162500766246]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[0.77185408230013164, 0.2843898040982959], [0.80505544874861534, 
-0.29662285477018252]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[-6.0, 0.0, 0.0], [7.0, -3.0, 5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, 2.0, 6.0], [7.0, 1.0, 2.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 7.0, -6.0], [-7.0, -2.0, 
+0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(98.0)+(1.-msk_ref)*numpy.array(-7.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_constData_rank1(self):
-      arg0=numpy.array([[0.22004350247352922, -0.35970181275916224, 0.15646348648285158, 0.4212211618405588, 
-0.37626278163592164], [0.33038291515486939, -0.90764100376178236, -0.65433267556937502, 0.43104735731894261, 
--0.033957692220172087], [-0.21077756673600101, 0.57526900030575967, -0.70337369772725622, 0.37091995859980731, 
-0.46236022366388907], [0.44196297866078726, -0.73366403186605034, 0.48888423737293074, 0.51899052032344106, 
-0.62487345661284288]])
-      arg1=Data(numpy.array([-0.28684372213436249, -0.13123413337250533]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.063118097280988925, -0.02887721835136434], [0.10317820683031562, 0.047205155669967837], 
-[-0.044880568840860662, -0.020533350053017728], [-0.12082464590410658, -0.055278594132305549], [-0.10792861678507662, 
--0.049378520068318395]], [[-0.094768265112624012, -0.043357515551431247], [0.26035112388079856, 0.11911348054202836], 
-[0.18769122017445578, 0.085870781615659628], [-0.12364322838954604, -0.056568126380260077], [0.0097405508315272452, 
-0.0044564083098445504]], [[0.060460221784978521, 0.0276612113049645], [-0.16501230127621783, -0.07549492871119387], 
-[0.20175832950749614, 0.092306637658250992], [-0.10639606153869237, -0.048677359317411267], [-0.13262512752262628, 
--0.060677443258448219]], [[-0.12677430584465005, -0.058000628487279486], [0.2104469216965614, 0.096281763408519253], 
-[-0.14023337434087066, -0.064158299211114753], [-0.14886917260202534, -0.068109271163192403], [-0.17924102815779291, 
--0.082004726546068246]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_expandedData_rank3_offset3(self):
+      arg0=numpy.array([[[-5.0, 1.0, -7.0], [5.0, 1.0, -5.0], [7.0, -5.0, -4.0], [-7.0, 0.0, -7.0]], [[2.0, -1.0, 7.0], [2.0, 
+-6.0, -2.0], [-3.0, -7.0, 4.0], [-6.0, 0.0, 6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-6.0, 2.0, -2.0], [-5.0, 4.0, 7.0], [1.0, -1.0, 1.0], [2.0, 6.0, -6.0]], [[-7.0, -5.0, 
+-4.0], [0.0, -6.0, 3.0], [-5.0, 3.0, -4.0], [7.0, 3.0, -6.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 6.0, -1.0], [7.0, 1.0, 
+-5.0], [7.0, -1.0, 3.0], [2.0, -6.0, -2.0]], [[5.0, -1.0, -3.0], [-5.0, -3.0, 1.0], [5.0, 4.0, 2.0], [-7.0, 1.0, -2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-81.0)+(1.-msk_ref)*numpy.array(117.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=outer(arg0,arg1)
-      ref=-ref    
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_constData_rank1(self):
-      arg0=numpy.array([[[-0.66447070728135871, 0.10916086666511138], [0.26746102869120603, -0.70631701651855239]], 
-[[-0.87747366027630269, 0.72562057325760065], [0.3023068504577977, -0.0090824437971253058]], [[-0.37222489903654399, 
-0.080330054398139561], [0.27150597071903082, -0.27524188286388296]], [[-0.54612661303996024, 0.17675616726836862], 
-[-0.94091695872832548, -0.31531671754763124]], [[-0.43884398137503489, 0.69552266955434705], [-0.44929811099008043, 
-0.35789835388832625]], [[-0.24615638375578608, 0.35713986793045427], [-0.45039744128586578, -0.65163958989322479]]])
-      arg1=Data(numpy.array([-0.95289915314530238, 0.048853322366110286]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.63317357425826681, -0.032461601665653525], [-0.1040192974017919, 0.005332871008954668]], 
-[[-0.25486338773922163, 0.01306635985502296], [0.67304888689264508, -0.034505932900650085]]], [[[0.83614390778459757, 
--0.042867503593248958], [-0.69144322976197647, 0.035448975780835307]], [[-0.288067941791259, 0.014768694018898286], 
-[0.0086546530027705078, -0.00044370755469304134]]], [[[0.35469279107151847, -0.018184422985325136], [-0.076546440808103258, 
-0.0039243900431994872]], [[-0.25871780957205776, 0.013263968711860512], [0.26227775709111256, -0.013446480432204441]]], 
-[[[0.52040358707589041, -0.026680099479553146], [-0.16843080210323788, 0.0086351260197597233]], [[0.89659897315227477, 
--0.045966919504494969], [0.30046503312369433, -0.015404269249778172]]], [[[0.41817405821518361, -0.021438986490541878], 
-[-0.66276296281169733, 0.033978593188676118]], [[0.42813578947223174, -0.021949705454682798], [-0.34104103833228383, 
-0.017484523656806621]]], [[[0.23456220962219862, -0.01202555716809737], [-0.340318277705355, 0.017447469097796535]], 
-[[0.42918334038011258, -0.02200341139200963], [0.62094681336520607, -0.031834758951573609]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank4_expandedData_rank4_offset4(self):
+      arg0=numpy.array([[[[7.0, -1.0], [-7.0, 3.0], [5.0, 4.0]], [[-4.0, 6.0], [-2.0, -4.0], [1.0, -1.0]]], [[[1.0, 0.0], [3.0, 
+-3.0], [0.0, 6.0]], [[6.0, -7.0], [-1.0, 7.0], [7.0, 2.0]]], [[[0.0, 4.0], [-4.0, 5.0], [5.0, -3.0]], [[2.0, -3.0], [0.0, 5.0], 
+[4.0, 4.0]]], [[[-7.0, 7.0], [-5.0, -1.0], [2.0, -6.0]], [[-3.0, -5.0], [-6.0, 3.0], [6.0, -5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-3.0, 5.0], [-7.0, 0.0], [-5.0, 4.0]], [[6.0, 3.0], [6.0, 4.0], [-3.0, -6.0]]], [[[-4.0, 
+3.0], [1.0, 1.0], [-2.0, -5.0]], [[5.0, 2.0], [0.0, 6.0], [3.0, -1.0]]], [[[-4.0, -1.0], [7.0, -6.0], [7.0, -1.0]], [[-1.0, 
+0.0], [-6.0, -3.0], [-6.0, -4.0]]], [[[0.0, 0.0], [-5.0, 5.0], [-3.0, 7.0]], [[6.0, 1.0], [-6.0, -3.0], [-2.0, 
+-2.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -3.0], [3.0, -1.0], [-4.0, -7.0]], [[7.0, -7.0], [2.0, 6.0], [-7.0, 6.0]]], 
+[[[6.0, 0.0], [-1.0, -7.0], [-3.0, -7.0]], [[-7.0, 0.0], [4.0, -4.0], [-6.0, -1.0]]], [[[-6.0, 0.0], [-7.0, 7.0], [-7.0, 
+-6.0]], [[5.0, -5.0], [-7.0, 1.0], [3.0, 0.0]]], [[[-2.0, -5.0], [0.0, 2.0], [7.0, 6.0]], [[4.0, 2.0], [1.0, 3.0], [7.0, 
+-5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-81.0)+(1.-msk_ref)*numpy.array(-197.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_expandedData_rank1(self):
-      arg0=numpy.array(0.0952653164761)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.03600206368683323, -0.21567891629700786])+(1.-msk_arg1)*numpy.array([0.98400030929841975, 
--0.057944651857548823])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.0034297479909205435, -0.020546720218266729])+(1.-msk_ref)*numpy.array([0.09374110087793984, 
--0.0055201155973095091])
+   def test_generalTensorProduct_array_rank0_expandedData_rank1_offset0(self):
+      arg0=numpy.array(-3.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-4.0, 7.0])+(1.-msk_arg1)*numpy.array([0.0, -2.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([12.0, -21.0])+(1.-msk_ref)*numpy.array([-0.0, 6.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-          arg0=numpy.array(arg0*1j)
-          arg1=arg1*1j
-          ref=-ref
-          res=outer(arg0,arg1)
-          self.assertTrue(isinstance(res,Data),"wrong type of result.")
-          self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-          self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")          
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_expandedData_rank1(self):
-      arg0=numpy.array([-0.6816375542209947, -0.73859164214492656])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.65424365167993637, -0.84029348680087512])+(1.-msk_arg1)*numpy.array([-0.4070349497467638, 
-0.0094425568140983351])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.44595704259572422, 0.57277559717078019], [-0.48321889305717752, 
-0.6206337462999445]])+(1.-msk_ref)*numpy.array([[0.27745030762784956, -0.006436401332354777], [0.30063261194383994, 
--0.006974193543371655]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-          arg0=numpy.array(arg0*1j)
-          arg1=arg1*1j
-          ref=-ref
-          res=outer(arg0,arg1)
-          self.assertTrue(isinstance(res,Data),"wrong type of result.")
-          self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-          self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")          
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_expandedData_rank1(self):
-      arg0=numpy.array([[0.11413458360117934, -0.39371474720074584, -0.52902000724565745, 0.4389579328234896, 
-0.59175704124133555], [-0.35473395573288258, -0.37884322851013308, 0.91011404456304401, 0.40604179011912978, 
--0.77022685281477199], [-0.55045292580057259, -0.69989776505223489, 0.78949225848162996, 0.0304730903118684, 
--0.47456543934448558], [-0.16824189615650686, 0.97460850007093991, -0.71636079682124976, -0.032193665122135284, 
-0.7901741074913109]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.57288820519795935, 0.13608562597774565])+(1.-msk_arg1)*numpy.array([-0.44236731972391885, 
-0.68478136995014638])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.065386356750296082, 0.015532076255075834], [0.22555453488380359, -0.053578917829483381], 
-[0.30306932246477614, -0.071992018840776828], [-0.25147382229265536, 0.059735865066181809], [-0.33901062927000353, 
-0.080529627384065799]], [[0.20322289922258346, -0.04827419242147124], [0.21703481723257054, -0.051555117899231596], 
-[-0.52139360151517788, 0.12385343946549975], [-0.23261655237671477, 0.055256451181486192], [0.44125387930432752, 
--0.10481680341016721]], [[0.31534798870785552, -0.074908730978852506], [0.40096317444283791, -0.095246025477558532], 
-[-0.45229080297922442, 0.10743854820005679], [-0.01745767401560161, 0.0041469495705669874], [0.27187294279504337, 
--0.064581534880598201]], [[0.096383797928202675, -0.022895303754141116], [-0.55834171437631597, 0.13263020781538562], 
-[0.41039465116510582, -0.097486407461336438], [0.018443371030564225, -0.0043810950706636978], [-0.45268142623459651, 
-0.10753133804936152]]])+(1.-msk_ref)*numpy.array([[[-0.050489409835459249, 0.0781572365171051], [0.17416653745497421, 
--0.2696085239577023], [0.23402116268558962, -0.36226304529271769], [-0.19418064421467912, 0.30059021458935353], 
-[-0.26177397626168614, 0.40522419737888704]], [[0.15692270921261856, -0.24291520417459792], [0.1675878635915837, 
--0.25942478501550525], [-0.40260471053644903, 0.62322914224674986], [-0.17961961839090143, 0.27804985329478749], 
-[0.34072318845906002, -0.52743699944288935]], [[0.24350238542058847, -0.37693990862278237], [0.30961189840691822, 
--0.47927695037751511], [-0.34924557432730197, 0.54062959032808566], [-0.013480299284966142, 0.020867404530375777], 
-[0.20993224143642408, -0.32497357168530994]], [[0.074424716668023833, -0.11520891613306304], [-0.43113494995653046, 
-0.66739374384363559], [0.31689460564510707, -0.49055052782583386], [0.014241425352168394, -0.022045622106052046], 
-[-0.34954720204617096, 0.54109650782703411]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank3_expandedData_rank1(self):
-      arg0=numpy.array([[[0.87420183956214492, -0.94796363776977888], [-0.89619505429056767, 0.98269351205225663]], 
-[[-0.78543686020072778, 0.49801945489413346], [-0.32439744666765336, -0.90769684324544953]], [[0.047647877322015475, 
--0.020522477822865426], [-0.13937854856216125, -0.72983275447960549]], [[-0.29260969381059909, 0.4335589962680908], 
-[0.1678945182964815, -0.50664460296582137]], [[0.14014475688327788, 0.85900221376298114], [0.33192132101855942, 
--0.56956032203941187]], [[0.60043591489976333, -0.696389117775569], [-0.20269845166148004, -0.77081614130858345]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.72311213346341008, -0.73911599083212276])+(1.-msk_arg1)*numpy.array([-0.85972430731293925, 
--0.31600218264079616])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.63214595728342038, -0.64613655883523913], [-0.68548400855344005, 0.70065508340303362]], 
-[[-0.64804951770740904, 0.66239209553082101], [0.71059760204075861, -0.72632448884480227]]], [[[-0.56795892368055045, 
-0.58052894316333237], [0.36012391053478138, -0.36809414285775111]], [[-0.2345757297499296, 0.2397673402171733], 
-[-0.65636660085721954, 0.67089325167055047]]], [[[0.034454758225325448, -0.035217308057908903], [-0.014840052722447738, 
-0.015168491530377444]], [[-0.10078631960981793, 0.10301691402126495], [-0.52775092016322467, 0.539431059468931]]], 
-[[[-0.21158961996345749, 0.21627250376790499], [0.31351177077367381, -0.32045038711087054]], [[0.12140656332218028, 
--0.12409352324598588], [-0.36636085975833743, 0.37446912772083052]]], [[[0.10134037414357799, -0.10358323084371088], 
-[0.62115492344394152, -0.6349022723524127]], [[0.24001633458372393, -0.24532835606293965], [-0.41185597960602605, 
-0.42097114176282285]]], [[[0.43418249543122239, -0.44379178617233073], [-0.50356742067539362, 0.51471233278939754]], 
-[[-0.14657370983066273, 0.14981766693991197], [-0.55738650444968318, 
-0.56972253603268719]]]])+(1.-msk_ref)*numpy.array([[[[-0.75157257096926233, -0.27624968937023692], [0.81498738183947717, 
-0.29955857859935919]], [[0.77048067226724026, 0.28319959322770621], [-0.8448454989500459, -0.31053329467546265]]], 
-[[[0.67525916057412061, 0.24819976214996387], [-0.42815943088722647, -0.15737523474412571]], [[0.27889237013043444, 
-0.10251030119007973], [0.7803690398093357, 0.28683418364172264]]], [[[-0.040964038325601658, -0.015056833231957783], 
-[0.017643673030608136, 0.0064851477852228088]], [[0.11982712611688695, 0.044043925558949155], [0.62745495929927331, 
-0.23062874337829964]]], [[[0.25156366632436855, 0.092465301906004382], [-0.3727412077458776, -0.13700558912426949]], 
-[[-0.14434299844408216, -0.053055034235113242], [0.43557468033862989, 0.16010080036037913]]], [[[-0.12048585403501635, 
--0.044286049060779549], [-0.73850508320766028, -0.2714465744423778]], [[-0.28536082779507677, -0.10488786190688115], 
-[0.48966485333826798, 0.17998230491004891]]], [[[-0.51620935102301002, -0.18973905964424856], [0.59870265189986993, 
-0.22006048118437826]], [[0.17426478594807124, 0.064053153142937608], [0.66268937315215459, 0.24357958306826874]]]])
+   def test_generalTensorProduct_array_rank1_expandedData_rank2_offset1(self):
+      arg0=numpy.array([-6.0, -6.0, -4.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-4.0, 5.0], [7.0, -4.0], [-1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[1.0, 6.0], [6.0, -1.0], 
+[1.0, 5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-14.0, -6.0])+(1.-msk_ref)*numpy.array([-46.0, -50.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_array_rank2(self):
-      arg0=numpy.array(0.218264810985)
-      arg1=numpy.array([[0.62659455796785046, -0.37652765022503543, 0.94590766670555371, 0.094449960134427524, 
--0.22520111876829429], [0.12465652166384422, 0.040617779034448631, 0.23922827763552656, -0.30156812276149814, 
--0.20731745558322934], [0.12441485550270071, 0.0098506262715623016, 0.7491573134680285, 0.4197162216745971, 
-0.15950621707742796], [-0.13087565182032113, -0.03397043006609568, 0.67705732058749746, -0.2032399434958112, 
--0.89027035091146112]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[0.1367635427591869, -0.08218273640705627, 0.20645835808290763, 0.020615102696297342, 
--0.049153479621609805], [0.027208132139027282, 0.0088654318635911934, 0.052215114800425164, -0.0658217093136899, 
--0.04525010525679922], [0.027155384920043782, 0.0021500450812480623, 0.16351467942225445, 0.09160928179121422, 
-0.034814594321363766], [-0.028565549407122866, -0.0074145494974611941, 0.14777778810415348, -0.04436012785174917, 
--0.19431468986738801]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_array_rank2(self):
-      arg0=numpy.array([0.16636827760669792, 0.40745449772685505])
-      arg1=numpy.array([[0.7102545042272097, -0.16509784417725548, 0.20930882056968447, -0.72285238509450433, 
--0.53798767304345074], [-0.81804276796566344, 0.55893736573743813, -0.90691450200816082, 0.37895267866036297, 
--0.17452628062456754], [-0.82868114455863062, 0.10780418724989116, 0.61897790911348216, -0.076685948682186478, 
--0.70998524155215792], [0.73039426394358054, -0.6291725941235613, 0.85291511223351368, -0.003280370193414317, 
-0.98782742462344664]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[0.11816381853068003, -0.027467043972348996, 0.034822347966067792, -0.12025970627206621, 
--0.089504082537874244], [-0.13609636631506308, 0.092989446827762556, -0.15088180363563389, 0.063045704443169065, 
--0.029035636704612518], [-0.13786625470536643, 0.017935196951554336, 0.10297828861580524, -0.012758109198890991, 
--0.11811902176320789], [0.1215144356661054, -0.10467436080167493, 0.14189801816701311, -0.0005457495389906904, 
-0.16434314720726304]], [[0.28939639227813418, -0.067269859175030214, 0.085283820355021217, -0.29452945549934045, 
--0.21920549710315873], [-0.33331520514053564, 0.22774154361731933, -0.36952639289693606, 0.1544059733458045, 
--0.071111518012019329], [-0.33764985953185223, 0.043925300968756235, 0.25220533306185283, -0.031246034703007672, 
--0.28928667999011437], [0.29760242795770758, -0.25635920332211809, 0.3475240986587505, -0.0013366015895157769, 
-0.40249472714075923]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[-1.0, -3.0, -5.0], [5.0, -7.0, 5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-3.0, 7.0], [3.0, 0.0], [-2.0, 3.0]], [[-7.0, 0.0], [6.0, -5.0], [3.0, 
+3.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, -4.0], [0.0, 6.0], [-6.0, -3.0]], [[2.0, -7.0], [-4.0, 3.0], [-4.0, -5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-58.0, 28.0])+(1.-msk_ref)*numpy.array([42.0, -80.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_array_rank2(self):
-      arg0=numpy.array([[-0.81956487123327637, 0.26071542752343602, -0.47037712698936929, 0.094964802681870131, 
--0.46512807889738683], [0.076723197191971071, 0.081140132594234249, 0.093588154099443432, -0.74062097527274462, 
-0.030840140350320233], [-0.8940842367217956, -0.96021909382187043, 0.28300310355728842, -0.76699825705987146, 
--0.71884907337947257], [0.607311761899342, -0.50060925046611637, -0.49716368786464571, 0.7905725723857413, 
-0.65601088235599914]])
-      arg1=numpy.array([[0.90239786983064629, -0.98569087469079975, -0.39644746029235201, 0.35389309790413259, 
--0.32994298913565023], [0.49986542917608778, 0.17646704298247662, -0.044357612957905967, 0.21383297018993774, 
--0.48466538221114286], [-0.90245331337920187, -0.60180396016839999, -0.82878400962931353, 0.56657680356113072, 
-0.41317536821994039], [-0.8755948255170094, -0.31647123327854643, 0.24493355541838535, 0.22973481239643379, 
-0.69502961990367562]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[-0.73957359398893652, 0.80783761479178084, 0.32491441174526092, -0.29003835121414567, 
-0.27040968340528149], [-0.4096721460966668, -0.14462618935885049, 0.036353941352061714, -0.17524999067914535, 
-0.39721472156310195], [0.7396190335736692, 0.49321738512309049, 0.6792422601320468, -0.46434644505433942, 
--0.33862401745193699], [0.71760676042737093, 0.25936870555096808, -0.20073893780717755, -0.18828258193948416, 
--0.56962186093966893]], [[0.2352690464291349, -0.25698481780096144, -0.10335996910070097, 0.09226539031766913, 
--0.086021227470861453], [0.13032262907182957, 0.046007680554972952, -0.011564714026239559, 0.055749554241675769, 
--0.12635974232898764], [-0.23528350141759999, -0.15689957676060126, -0.21607677739509398, 0.14771531356530201, 
-0.10772119276761485], [-0.22828107927197547, -0.082508932883085279, 0.06385795661573955, 0.059895409830952602, 
-0.18120494449463803]], [[-0.42446731741226623, 0.46364644173669678, 0.18647981737454861, -0.16646321865351346, 
-0.15519763529991185], [-0.23512526445715623, -0.083006060686406896, 0.020864806543246229, -0.10058213817354636, 
-0.22797551003568195], [0.42449339678934589, 0.28307481779483684, 0.38984104134416625, -0.26650476907790493, 
--0.19434824264607031], [0.41185977843344895, 0.14886082948434515, -0.11521114210099156, -0.10806200102447626, 
--0.32692603578280427]], [[0.085696035649007254, -0.093605939420331769, -0.03764855484039175, 0.033607388212941701, 
--0.031332970859533446], [0.047469621849195502, 0.016758157916683988, -0.0042124119619863058, 0.020306605820965655, 
--0.04602615238841435], [-0.085701300834655811, -0.057150194330560136, -0.078705309940336921, 0.053804854354307471, 
-0.039237117316015674], [-0.083150689834489297, -0.030053628222785254, 0.023260066760475869, 0.021816721128383787, 
-0.066003350712207753]], [[-0.41973058759542264, 0.45847250293161657, 0.18439884558952974, -0.16460561676319402, 
-0.15346574868232638], [-0.23250144677989149, -0.082079776691141942, 0.020631971299584634, -0.099459718629367935, 
-0.22543147813593661], [0.41975637594664955, 0.27991591986596737, 0.38549071421975595, -0.26353078018821086, 
--0.19217946526786128], [0.40726373908521918, 0.14719965676113705, -0.11392547408926021, -0.10685611194580481, 
--0.3232777918825776]]], [[[0.069234849712631316, -0.075625355349228679, -0.030416716672266243, 0.027151809935376289, 
--0.025314281017562862], [0.038351273892126232, 0.013539115736628589, -0.0034032578859345508, 0.016405949138027464, 
--0.037185077691507543], [-0.069239103518940165, -0.046172323906909257, -0.063586959000342266, 0.043469583824017291, 
-0.031700135250803743], [-0.067178434458411013, -0.024280684836416194, 0.018792085471295353, 0.017625989313352068, 
-0.053324894582130404]], [[0.073220682810813176, -0.079979088269338222, -0.032167799494768862, 0.028714932888125641, 
--0.026771617887004651], [0.040559147202621569, 0.014318559266110586, -0.0035991825969682134, 0.017350435554230489, 
--0.039325813376447354], [-0.07322518150769447, -0.048830453123799245, -0.067247644433303611, 0.045972116965767557, 
-0.033525104162037522], [-0.071045880241275547, -0.025678517830482094, 0.019873941163425009, 0.018640713139358167, 
-0.056394795515904469]], [[0.08445375090072002, -0.092248989474977755, -0.037102786006173623, 0.033120201781381385, 
--0.030878755311258225], [0.046781482814716134, 0.016515224812117129, -0.0041513471169879728, 0.020012232965677588, 
--0.045358938477042088], [-0.08445893976008606, -0.056321721761895538, -0.077564365608342803, 0.053024877200849189, 
-0.038668320031062062], [-0.081945303459161165, -0.029617958548113513, 0.022922879328620416, 0.021500457024564171, 
-0.065046539171222786]], [[-0.66833479043802047, 0.73002333693094479, 0.29361730468612446, -0.26210065131205157, 
-0.24436269839804986], [-0.37021082166152319, -0.13069519347717917, 0.032852178569655249, -0.15836918292753943, 
-0.35895334805415413], [0.66837585309302427, 0.44570863590292037, 0.61381482150211797, -0.41961866482035887, 
--0.30600634416972761], [0.64848389361817615, 0.23438523343652531, -0.1814029286909854, -0.17014642081114781, 
--0.51475351493650523]], [[0.027830076957407138, -0.030398844917494179, -0.012226495316944143, 0.010914112808373068, 
--0.010175488092547638], [0.015415919992063605, 0.0054422683727855725, -0.0013679950092270034, 0.0065946388121835226, 
--0.014947148410333245], [-0.027831786844226113, -0.018559718594971984, -0.025559815177069185, 0.017473308141061086, 
-0.012742386345198203], [-0.027003467308958726, -0.0097600172511493073, 0.0075537852256059431, 0.0070850538576605069, 
-0.021434811025459081]]], [[[-0.80681971066690761, 0.88129067334156275, 0.35445742493578192, -0.31641024032072806, 
-0.29499682560305551], [-0.44692180070851523, -0.1577764014315399, 0.039659442524270186, -0.19118468793822496, 
-0.43333167831972702], [0.80686928186969908, 0.53806343438331783, 0.74100271865665412, -0.50656738895622833, 
--0.36941358372717226], [0.78285553124992913, 0.28295194105025451, -0.21899123094380268, -0.20540227438989039, 
--0.62141502721061759]], [[-0.86649966483556939, 0.94647919848408657, 0.38067642106990418, -0.33981490977932066, 
-0.31681755804071332], [-0.47998032943634339, -0.16944702410205875, 0.042593026918541728, -0.20532650086502105, 
-0.46538495411361408], [0.86655290278952168, 0.57786365329131406, 0.79581423070031576, -0.54403786489596084, 
--0.39673887766166882], [0.84076286991306148, 0.30388172083941561, -0.23518987663041085, -0.22059575337864104, 
--0.66738071180326641]], [[0.25538139780555885, -0.27895357668559462, -0.11219586166014048, 0.10015284503437284, 
--0.093374889922357707], [0.14146346781782879, 0.049940720839618299, -0.012553342133480382, 0.060515394206625515, 
--0.13716180735253283], [-0.25539708850187232, -0.17031238846072397, -0.23454844690374935, 0.16034299381136813, 
-0.11692991151966856], [-0.24779605308001609, -0.089562341204431253, 0.069316956348724146, 0.06501566490334218, 
-0.19669553949698271]], [[-0.69213759333464642, 0.75602318288766357, 0.30407451106004657, -0.27143538927798816, 
-0.25306569759616782], [-0.38339591294254394, -0.135349914396069, 0.034022211826050246, -0.16400951543761769, 
-0.371737503413203], [0.6921801184397538, 0.46158258854089107, 0.63567589086477516, -0.43456342082194044, -0.3169047872847649], 
-[0.67157970506218845, 0.2427328843342331, -0.187863610101379, -0.17620620069404128, -0.53308650707110417]], 
-[[-0.64868787254737004, 0.70856297191008322, 0.28498588947480247, -0.2543957255037767, 0.23717921200821557], 
-[-0.35932780057766306, -0.12685317032996887, 0.031886428972115993, -0.15371363247901712, 0.34840126090158796], 
-[0.64872772809087409, 0.43260621912315134, 0.59577061735375592, -0.40728321023822228, -0.29701073058812655], 
-[0.62942052897876322, 0.22749505279354201, -0.17607025935204601, -0.1651446570141834, -0.49962139823904422]]], 
-[[[0.54803684026106292, -0.59862166179657317, -0.24076720561066772, 0.2149234408121751, -0.2003782580583072], 
-[0.30357415450550063, 0.10717051079085479, -0.026938900079114956, 0.12986327787822058, -0.29434298720226715], 
-[-0.54807051178022215, -0.36548262336787241, -0.50333027712197964, 0.34408875682200768, 0.25092626084706138], 
-[-0.5317590361946819, -0.19219670227285171, 0.14875102908940974, 0.13952065368609301, 0.42209966303593122]], 
-[[-0.45174872123813992, 0.49344596997025192, 0.19846526594614977, -0.17716215848691977, 0.16517251248774784], 
-[-0.25023725783376488, -0.088341034119429562, 0.022205831375323396, -0.10704676293172814, 0.24262797371559403], 
-[0.45177647679142546, 0.30126862942744326, 0.41489694185883325, -0.28363358896222568, -0.20683941139564599], [0.43833086931408, 
-0.15842842688566058, -0.12261600359199887, -0.11500737223975258, -0.34793825707172882]], [[-0.4486394528862046, 
-0.49004971035580636, 0.19709928140351843, -0.17594279766386267, 0.16403567326376461], [-0.24851494020522769, 
--0.087733005875737027, 0.022052994443025126, -0.10630998804668029, 0.24095802880041983], [0.44866701740527282, 
-0.29919507620887009, 0.41204131467055755, -0.28168141311701467, -0.2054157897990585], [0.43531395252923738, 
-0.15733800543983473, -0.12177206969360403, -0.11421580656190354, -0.34554348900647436]], [[0.7134110052674274, 
--0.7792601703814569, -0.31342048849911874, 0.27977817675962907, -0.26084387766161171], [0.3951798981904423, 
-0.13951000411196171, -0.035067912181022814, 0.16905048130394262, -0.38316315796098172], [-0.71345483741623117, 
--0.47576970486225817, -0.65521390644481536, 0.44792008104541392, 0.32664511370006416], [-0.69222125357662645, 
--0.25019347697910849, 0.19363775097069844, 0.18162204160280435, 0.54947135449153284]], [[0.59198282282377634, 
--0.64662394043616811, -0.26007384823418078, 0.232157723415788, -0.21644619143005375], [0.32791716125306553, 
-0.11576430057368851, -0.029099076815721794, 0.14027675545110513, -0.31794576503173938], [-0.59201919439498518, 
--0.39478994691540664, -0.54369132943946885, 0.37168054882657897, 0.27104753787372793], [-0.57439973407376044, 
--0.20760857298335048, 0.16067907780860699, 0.15070853698807446, 0.45594699421656493]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_expandedData_rank4_offset3(self):
+      arg0=numpy.array([[[-5.0, 3.0, 6.0], [-2.0, 7.0, -4.0], [0.0, 4.0, 5.0], [0.0, -7.0, -5.0]], [[0.0, -6.0, 3.0], [-1.0, 
+-3.0, 5.0], [-6.0, 0.0, -2.0], [-6.0, -7.0, 6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, -4.0], [-5.0, 6.0], [2.0, 6.0]], [[-6.0, 0.0], [1.0, 6.0], [0.0, -5.0]], [[-2.0, 
+-4.0], [-1.0, -4.0], [-7.0, -6.0]], [[2.0, 2.0], [-3.0, 5.0], [-7.0, -1.0]]], [[[6.0, 6.0], [-2.0, -6.0], [4.0, -5.0]], [[2.0, 
+5.0], [7.0, -5.0], [0.0, -3.0]], [[2.0, 1.0], [7.0, 4.0], [1.0, 4.0]], [[-2.0, -6.0], [3.0, -1.0], [4.0, 
+3.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, 2.0], [-1.0, -5.0], [3.0, -3.0]], [[6.0, 5.0], [-6.0, 0.0], [6.0, 2.0]], [[3.0, 
+-1.0], [6.0, 4.0], [4.0, 0.0]], [[-7.0, 4.0], [-2.0, -1.0], [-4.0, -2.0]]], [[[-3.0, -6.0], [-3.0, -6.0], [1.0, 4.0]], [[-3.0, 
+-7.0], [-5.0, -5.0], [2.0, 4.0]], [[7.0, -4.0], [-6.0, -4.0], [-2.0, -7.0]], [[-4.0, 7.0], [-6.0, 2.0], [5.0, 1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([35.0, 123.0])+(1.-msk_ref)*numpy.array([97.0, 50.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=numpy.array(arg0*1j)
-      arg1=arg1*1j
-      ref=-ref
-      res=outer(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")          
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_constData_rank2(self):
-      arg0=numpy.array(0.372750342838)
-      arg1=Data(numpy.array([[0.76871462138898106, -0.69295903418971228, 0.054927886711077623, 0.35251075234789675, 
--0.21985084950520184], [0.084613974030040451, -0.55016187666396577, 0.54086086224118057, -0.068569600221233706, 
--0.0033024490285564756], [0.86799036985074474, 0.44034217230811157, -0.096308260724639938, 0.40820711124699538, 
--0.98327313126459037], [0.011621419115650511, -0.81993724395384415, 0.87297909269920226, -0.80204874976487361, 
--0.89363699263737328]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[0.28653863866720669, -0.25830071756679701, 0.020474388602912477, 0.13139850379170509, 
--0.081949479526255378], [0.031539887828570062, -0.20507302814280526, 0.20160607182797236, -0.025559341990718815, 
--0.0012309890075989335], [0.3235437079418127, 0.16413769569380987, -0.035898937203226067, 0.15215934066616374, 
--0.36651539678211714], [0.0043318879596210098, -0.30563188878931291, 0.32540325609389825, -0.29896394644752133, 
--0.33310349537816136]]),self.functionspace)
+   def test_generalTensorProduct_array_rank0_expandedData_rank2_offset0(self):
+      arg0=numpy.array(-6.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[3.0, -3.0, -5.0, 4.0, 3.0], [-3.0, -7.0, 1.0, 0.0, 4.0], [-1.0, 5.0, -3.0, 5.0, 3.0], [-1.0, 
+-3.0, -1.0, 0.0, -7.0]])+(1.-msk_arg1)*numpy.array([[0.0, 4.0, 5.0, -5.0, -6.0], [4.0, 2.0, 0.0, 1.0, 0.0], [5.0, 1.0, 0.0, 
+-6.0, 5.0], [1.0, 0.0, -3.0, -1.0, 3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-18.0, 18.0, 30.0, -24.0, -18.0], [18.0, 42.0, -6.0, -0.0, -24.0], [6.0, -30.0, 18.0, -30.0, 
+-18.0], [6.0, 18.0, 6.0, -0.0, 42.0]])+(1.-msk_ref)*numpy.array([[-0.0, -24.0, -30.0, 30.0, 36.0], [-24.0, -12.0, -0.0, -6.0, 
+-0.0], [-30.0, -6.0, -0.0, 36.0, -30.0], [-6.0, -0.0, 18.0, 6.0, -18.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=numpy.array(arg0*1j)
-        arg1=arg1*1j
-        ref=-ref
-        res=outer(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_constData_rank2(self):
-      arg0=numpy.array([-0.7248354981517402, -0.71175522139340708])
-      arg1=Data(numpy.array([[-0.52973733182056404, 0.93852863726967595, -0.5026798935486676, 0.88752851790782139, 
-0.68830786230505958], [-0.84886692931572005, 0.14548667127138337, 0.38695425878446543, 0.84252686359018125, 
--0.74463622630528481], [-0.55814036535876954, -0.4005814259625835, 0.11271709200032509, -0.57891927518335184, 
-0.71421601651008437], [0.12439171343058342, 0.44403183920210854, -0.76908159470076143, -0.53483151543574237, 
--0.37397019025429445]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[0.3839724227997322, -0.68027887232503947, 0.36436023105121224, -0.64331217540159136, 
--0.49890997225564726], [0.61528888357509803, -0.10545390384543163, -0.28047818292797538, -0.61069337887661224, 
-0.53973877003582305], [0.40455994976341803, 0.29035563743792364, -0.081701349530271167, 0.41962124121716921, 
--0.51768912211503848], [-0.090163529570405437, -0.32185003936329376, 0.55745764081426119, 0.38766486791811644, 
-0.27106686914687256]], [[0.37704331189029833, -0.66800265800393088, 0.35778503892274621, -0.63170305675644389, 
--0.48990671492176041], [0.60418546920865202, -0.1035508979205533, -0.27541671413025892, -0.59967289432452231, 
-0.52999872211146914], [0.39725931931452813, 0.28511592152208531, -0.080226978771512414, 0.41204881687703737, 
--0.50834697895385239], [-0.088536451532290145, -0.3160419800170185, 0.54739784070583497, 0.38066912367713823, 
-0.26617523555897993]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_expandedData_rank3_offset1(self):
+      arg0=numpy.array([6.0, 7.0, 7.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[6.0, -5.0, -7.0, -5.0, 5.0], [2.0, 2.0, 0.0, 0.0, -3.0], [-2.0, 4.0, -4.0, 4.0, -6.0], 
+[-3.0, 0.0, -5.0, -6.0, 4.0]], [[-2.0, 7.0, 6.0, 5.0, 5.0], [-6.0, 0.0, -3.0, 2.0, 5.0], [1.0, 1.0, -2.0, 6.0, 7.0], [-1.0, 
+-6.0, -4.0, 5.0, -2.0]], [[-5.0, -5.0, 5.0, -2.0, 4.0], [0.0, -4.0, -3.0, 0.0, 4.0], [0.0, -6.0, 5.0, 3.0, 4.0], [-5.0, -4.0, 
+-4.0, 1.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 7.0, 7.0, -3.0, 6.0], [3.0, 1.0, 5.0, -5.0, 0.0], [6.0, -5.0, -7.0, 1.0, 
+4.0], [-1.0, 0.0, 3.0, 5.0, 0.0]], [[3.0, 7.0, -7.0, 4.0, 7.0], [2.0, -5.0, 7.0, -7.0, 1.0], [-2.0, -3.0, 4.0, 1.0, 6.0], [1.0, 
+6.0, -4.0, 3.0, 5.0]], [[1.0, 0.0, -6.0, -5.0, 3.0], [-5.0, 2.0, 4.0, -1.0, 5.0], [-6.0, -5.0, 7.0, -6.0, -3.0], [-6.0, -1.0, 
+5.0, -2.0, 4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-13.0, -16.0, 35.0, -9.0, 93.0], [-30.0, -16.0, -42.0, 14.0, 45.0], [-5.0, -11.0, -3.0, 87.0, 
+41.0], [-60.0, -70.0, -86.0, 6.0, 24.0]])+(1.-msk_ref)*numpy.array([[34.0, 91.0, -49.0, -25.0, 106.0], [-3.0, -15.0, 107.0, 
+-86.0, 42.0], [-20.0, -86.0, 35.0, -29.0, 45.0], [-41.0, 35.0, 25.0, 37.0, 63.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[0.11795870957734778, -0.82634566459596437, -0.81327808756997855, 0.76035332192267013, 
-0.34229080331266304], [-0.18303348598622482, -0.68197677284763358, 0.049397167409949372, 0.40385722090682474, 
-0.27340856521325163], [-0.51879714918404063, -0.77485833329140297, 0.14980458961576404, 0.33593403206236161, 
--0.68622055619837052], [-0.42127435895109344, 0.88103478757968023, 0.16906790486401468, -0.86313143450198027, 
-0.30859617370497516]])
-      arg1=Data(numpy.array([[0.71881854358742059, 0.10699636106889332, 0.86427296110378049, -0.48139841430720809, 
--0.57445230950683612], [0.54036999379716311, 0.018193274282380045, -0.74821022888831834, 0.67727540924340257, 
-0.79758060153710808], [0.92275615326190508, -0.32084725677028247, 0.45755998301402356, 0.78740423840981788, 
--0.17005371414933568], [0.88434579513768496, 0.46409423804178584, 0.72546943412878195, -0.23777811168984098, 
-0.73729617122869739]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.08479090782184065, 0.012621152681158628, 0.10194852321439524, -0.056785135744259696, 
--0.067761653143153577], [0.063741347162632786, 0.0021460551573362981, -0.088257913092238044, 0.079890533302821878, 
-0.094081578541242064], [0.10884712509333168, -0.037846728380054477, 0.053973185150567385, 0.092881187878556412, 
--0.020059316679890804], [0.10431628881459487, 0.05474395744169152, 0.085575438287639818, -0.028047999220672113, 
-0.086970504934456391]], [[-0.5939925871246502, -0.088415979096824415, -0.71418821443562552, 0.39780149260613329, 
-0.4746961754781131], [-0.44653240165203389, -0.015033933328050005, 0.61828027884821601, -0.55966359816574329, 
--0.65907727224603063], [-0.76251554672722455, 0.26513073962963107, -0.37810270825624148, -0.6506680786944401, 
-0.14052314943574493], [-0.73077531381569683, -0.38350226156979722, -0.59948852168920652, 0.19648691173071509, 
--0.60926149461803791]], [[-0.58459937043861465, -0.087017795907056467, -0.70289426094492502, 0.39151078174698639, 
-0.4671894756758771], [-0.439471075135558, -0.014796191315010117, 0.60850298405058745, -0.55081324958764899, 
--0.64865482630101234], [-0.7504573596182722, 0.2609380433882092, -0.37212350793419696, -0.64037861315843214, 
-0.13830095942754353], [-0.71921905702012845, -0.37743767436686998, -0.59000839397873028, 0.19337972794111463, 
--0.59962682010954249]], [[0.54655606747631091, 0.081355038572370489, 0.65715281702320216, -0.36603288348679153, 
--0.43678672181967271], [0.41087211985100563, 0.01383331653725795, -0.56890413303175424, 0.51496860727475702, 
-0.60644305987982161], [0.70162070645727403, -0.24395727751506019, 0.34790725306359332, 0.59870542837089513, 
--0.12930090645873554], [0.67241526306128385, 0.35287559558024229, 0.55161309419317905, -0.18079537710387028, 
-0.56060559303460589]], [[0.24604497672057668, 0.036623870381803238, 0.29583268613762698, -0.16477824994665644, 
--0.19662974248590948], [0.1849636792628897, 0.0062273904690034786, -0.25610548029293395, 0.23182514389383688, 
-0.27300450480673372], [0.31585094496172028, -0.10982306526056425, 0.15661857414959859, 0.26952122929709221, 
--0.05820782242247808], [0.30270343262385391, 0.15885518955210115, 0.24832151538672387, -0.081389260860483786, 
-0.2523696987292216]]], [[[-0.13156786382434668, -0.019583916954280335, -0.15819089291446184, 0.088112029918889223, 
-0.10514400874187398], [-0.098905803687049446, -0.0033299784134075525, 0.13694752644398009, -0.123964079126567, 
--0.14598395785432702], [-0.16889527544676564, 0.058725791875782175, -0.083748798738854546, -0.14412134263647744, 
-0.031125524105657915], [-0.1618648937013103, -0.084944786214908891, -0.13278519950504486, 0.043521356673813509, 
--0.13494988842428499]], [[-0.49021755061878514, -0.072969033028204039, -0.5894140848730246, 0.32830253704319784, 
-0.3917631321923421], [-0.36851978451348505, -0.01240739048262939, 0.51026199730884458, -0.461886097924876, 
--0.54393144472215127], [-0.62929826352685037, 0.2188103767492133, -0.31204528060012182, -0.53699140143727631, 
-0.11597268318631791], [-0.60310329144937291, -0.31650149075691858, -0.49475330348674562, 0.16215914926404193, 
--0.5028188634874633]], [[0.035507599934963802, 0.0052853171599755132, 0.042692636147536107, -0.023779718062417327, 
--0.028376316901741236], [0.026692747046911769, 0.00089869621546185359, -0.036959465934232799, 0.033455486773038327, 
-0.039398222497056649], [0.045581540181239222, -0.015848945655704657, 0.022602167081037312, 0.038895538984033459, 
--0.0084001717865184108], [0.043684177290701016, 0.022924940770542988, 0.035836135088460681, -0.011745565189564714, 
-0.036420342400898663]], [[0.29030005934950692, 0.043211253028426433, 0.34904287617628504, -0.19441622575106127, 
--0.23199671326093799], [0.21823232395636041, 0.0073474851908776114, -0.30217010369289549, 0.27352256456557295, 
-0.32210868518597002], [0.372661735631025, -0.1295764814548247, 0.1847889031382175, 0.31799888745444393, -0.068677420401234285], 
-[0.35714943514494163, 0.18742780921442601, 0.29298606952009665, -0.096028407379531749, 0.29776238269766414]], 
-[[0.19653114665091584, 0.029253721562885138, 0.23629963024799305, -0.13161844975166823, -0.15706018172570282], 
-[0.14774178468837604, 0.0049741970180766787, -0.20456708515823371, 0.18517289789545652, 0.21806536790818287], 
-[0.25228943590503677, -0.087722388126170669, 0.12510081845486398, 0.21528306306646142, -0.046494141994754296], 
-[0.2417877150009666, 0.12688733974674193, 0.19834955709121985, -0.06501057235623571, 0.20158308831286206]]], 
-[[[-0.37292101119377785, -0.055509407095608122, -0.44838234833749058, 0.24974812496429724, 0.29802422051433475], 
-[-0.28034241228656592, -0.0094386188320220894, 0.3881693337375981, -0.35136855152793167, -0.41378254232194395], 
-[-0.47872326170430801, 0.16645464213594244, -0.23738081476837347, -0.40850307414244419, 0.088223382108833098], 
-[-0.45879607741032458, -0.24077076764881802, -0.37637147424617123, 0.1233586064830539, -0.38250715173775651]], 
-[[-0.55698253862310243, -0.082907022006087835, -0.6696891061497009, 0.37301557295920751, 0.44511915909986421], 
-[-0.41871019275435556, -0.014097210187558348, 0.57975693090798153, -0.52479249478559575, -0.61801197557259813], 
-[-0.71500529495090615, 0.24861117062213989, -0.35454416581908893, -0.610126735800818, 0.13176753751576692], 
-[-0.68524270887364702, -0.35960728777920181, -0.56213603658288525, 0.18424435131716724, -0.57130008238040131]], 
-[[0.10768231693031474, 0.016028545960305677, 0.12947205625415303, -0.072115691896970854, -0.086055592479499454], 
-[0.080949905161456975, 0.0027254359876389767, -0.11208532628493141, 0.10145896473855656, 0.11948123469876069], 
-[0.13823310685482076, -0.048064391629815836, 0.068544585480011758, 0.11795676879669599, -0.025474826860777677], 
-[0.13247905891902742, 0.069523446872890429, 0.10867865085844275, -0.035620252441307933, 0.11045035035618911]], 
-[[0.24147561166851664, 0.035943718989873627, 0.29033870062606959, -0.16171811034664768, -0.19297808056016716], 
-[0.18152867082179433, 0.006111739986096397, -0.25134927902075527, 0.22751985904382227, 0.26793446736908455], 
-[0.30998519517562628, -0.10778351264298884, 0.15370997000428663, 0.26451588067200321, -0.057126829861366607], 
-[0.29708184869799775, 0.15590504864228658, 0.24370987214488157, -0.079877759796142839, 0.24768287562499769]], 
-[[-0.4932680607862624, -0.073423102403897655, -0.59308187207584895, 0.33034548761890592, 0.3942009833392196], 
-[-0.3708129976963993, -0.012484598797124345, 0.51343723942105191, -0.46476030803048674, -0.54731620399982528], 
-[-0.63321424072685328, 0.22017198299562465, -0.3139870660380002, -0.54033297443453954, 0.11669435430715584], 
-[-0.60685626341107246, -0.31847100615749324, -0.49783203859276987, 0.16316822805560094, -0.50594778870348578]]], 
-[[[-0.30281982115194922, -0.045074823419397766, -0.36409603764775844, 0.20280080838734199, 0.2420020284354675], 
-[-0.22764402273330622, -0.0076643599605310678, 0.31520178453557718, -0.28531876386235389, -0.33600025662437272], 
-[-0.38873350693358599, 0.13516472241711763, -0.19275828852590599, -0.33171321577146995, 0.071639269415513879], 
-[-0.37255220793772326, -0.19551100262394949, -0.30562167080121511, 0.10016982157473925, -0.3106039718914651]], 
-[[0.63330414285787817, 0.094267516246131194, 0.76145454469693052, -0.42412874969034597, -0.5061124684810121], 
-[0.47608476269951672, 0.016028907542755561, -0.65919924007356345, 0.59670319631570223, 0.70269625585291962], 
-[0.8129802714769454, -0.28267759471412895, 0.40312626243972233, 0.69373052592673379, -0.14982323792269561], 
-[0.77913940976611373, 0.40888316843009836, 0.63916380879320223, -0.20949078812375652, 0.64958357560178692]], 
-[[0.12152914514172762, 0.018089650593991421, 0.14612081876443422, -0.081389021311778581, -0.097121448412615288], 
-[0.091359222702666984, 0.0030758987655383546, -0.12649833579597286, 0.1145055344567002, 0.13484528126205939], 
-[0.15600844953236792, -0.054244973483518207, 0.07735870767779511, 0.13312478486899304, -0.028750625165572231], 
-[0.14951449075922954, 0.07846344048518604, 0.12265359727103547, -0.040200647165923094, 0.12465311893389569]], 
-[[-0.6204348806732346, -0.09235192261588572, -0.74598116071878029, 0.41551010390795912, 0.49582784595761104], 
-[-0.46641032790797154, -0.015703186929638673, 0.64580376816942919, -0.58457769553317385, -0.68841688873567641], 
-[-0.79645984226047728, 0.2769333529921591, -0.39493440450959588, -0.67963334983160539, 0.14677870623610581], 
-[-0.76330665475298443, -0.40057432542511012, -0.62617547336691548, 0.20523376263602452, -0.63638350192544324]], 
-[[0.22182465213926089, 0.033018667626216448, 0.26671132883329551, -0.14855770868284679, -0.17727378468979577], 
-[0.1667561124707857, 0.0056143748307076096, -0.23089481376185872, 0.20900459983698519, 0.246130321855664], 
-[0.28475901815934557, -0.099012235783046854, 0.14120125999864111, 0.24298993513234984, -0.052477925510804588], 
-[0.27290572861157342, 0.14321770609822104, 0.22387709151205562, -0.073377415458279152, 
-0.22752677732850421]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[-6.0, -2.0, 0.0], [-2.0, 0.0, 0.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[7.0, 3.0, 7.0, -7.0, 3.0], [-2.0, -2.0, 0.0, -7.0, 2.0], [-2.0, -6.0, 4.0, 2.0, -2.0], 
+[-4.0, 4.0, 3.0, 7.0, -3.0]], [[5.0, 1.0, 0.0, -1.0, 7.0], [5.0, 2.0, 0.0, 4.0, 0.0], [5.0, -7.0, 3.0, 5.0, -4.0], [3.0, -1.0, 
+7.0, 0.0, -2.0]], [[4.0, -7.0, 3.0, 0.0, 0.0], [3.0, 2.0, 4.0, 3.0, -2.0], [5.0, -2.0, -6.0, 5.0, -4.0], [-4.0, -6.0, 0.0, 
+-7.0, -2.0]]], [[[5.0, 7.0, -2.0, 5.0, 3.0], [7.0, 0.0, 5.0, 1.0, -2.0], [0.0, 7.0, 1.0, 5.0, -4.0], [5.0, 7.0, 0.0, 2.0, 
+5.0]], [[6.0, 6.0, 4.0, -4.0, -6.0], [-3.0, 0.0, -4.0, 7.0, 4.0], [7.0, 3.0, 0.0, -6.0, -7.0], [6.0, 3.0, 0.0, -7.0, 4.0]], 
+[[-2.0, 2.0, 0.0, 2.0, 0.0], [-4.0, 0.0, 0.0, 2.0, 3.0], [-7.0, -6.0, 1.0, -7.0, -4.0], [7.0, 4.0, 0.0, 0.0, 
+-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 7.0, 2.0, -7.0, 0.0], [1.0, -7.0, 0.0, -4.0, 5.0], [-7.0, -3.0, 0.0, 3.0, -3.0], 
+[5.0, -4.0, 7.0, -1.0, 3.0]], [[5.0, 4.0, 5.0, 4.0, 3.0], [2.0, 4.0, -7.0, 1.0, -5.0], [-1.0, -7.0, 5.0, 0.0, -3.0], [-2.0, 
+1.0, 1.0, 0.0, 6.0]], [[-3.0, 0.0, 7.0, -5.0, -5.0], [3.0, -4.0, 3.0, 5.0, -7.0], [-7.0, -2.0, 7.0, 7.0, -4.0], [0.0, -3.0, 
+0.0, -7.0, -4.0]]], [[[-3.0, -4.0, 0.0, -7.0, -1.0], [-7.0, 6.0, -7.0, 6.0, 6.0], [7.0, 0.0, 6.0, -3.0, 0.0], [0.0, 4.0, 1.0, 
+1.0, -2.0]], [[0.0, 0.0, 4.0, 4.0, 7.0], [0.0, -5.0, 2.0, -7.0, 4.0], [-3.0, -4.0, -3.0, 2.0, 7.0], [-1.0, -7.0, -7.0, 7.0, 
+0.0]], [[-7.0, 5.0, -3.0, 1.0, 3.0], [-6.0, -1.0, -6.0, -5.0, -6.0], [-2.0, 6.0, -3.0, 4.0, 0.0], [0.0, -1.0, -2.0, 6.0, 
+-7.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-62.0, -34.0, -38.0, 34.0, -38.0], [-12.0, 8.0, -10.0, 32.0, -8.0], [2.0, 36.0, -32.0, -32.0, 
+28.0], [8.0, -36.0, -32.0, -46.0, 12.0]])+(1.-msk_ref)*numpy.array([[-46.0, -42.0, -22.0, 48.0, -4.0], [4.0, 22.0, 28.0, 10.0, 
+-32.0], [30.0, 32.0, -22.0, -12.0, 24.0], [-26.0, 14.0, -46.0, 4.0, -26.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_expandedData_rank2(self):
-      arg0=numpy.array(-0.921419557017)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.27411787614041705, -0.32088094729570171, 0.75322329571656921, -0.7137139228727496, 
-0.22883188436579371], [-0.54384414564382388, 0.65122352185543342, -0.89272014052793924, -0.92983942126507046, 
-0.029342402377037446], [-0.30097855865431367, 0.84358871207542063, -0.40336790135540901, -0.57151413265873607, 
-0.85041879066142778], [-0.87329972577643389, 0.2208570947409334, 0.67495300452707463, -0.081365038924114508, 
-0.61526159570110073]])+(1.-msk_arg1)*numpy.array([[0.073197150752966511, -0.26693292886439668, 0.57752280048264093, 
--0.51305472225006565, -0.8102674893157904], [0.71818111351797986, -0.13429691550499201, 0.12139067548095128, 
--0.17097142145570587, 0.55948298386490847], [-0.54227231534025067, 0.80440840691869786, -0.8401661844295587, 
--0.60447001903774922, 0.7220179464068277], [-0.13044206585017437, 0.15860167865578378, -0.8719997620994473, 
-0.94997502334238826, 0.31743055979649304]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.25257757200387571, 0.29566598031255498, -0.694034675474408, 0.65762996665061724, 
--0.21085017352380497], [0.50110863176568243, -0.60005008902739709, 0.82256979642583683, 0.85677222763945171, 
--0.027036663400078514], [0.2773275301870175, -0.77729913738548106, 0.37167107298197177, 0.52660429894364225, 
--0.78359250537059433], [0.80467544646840894, -0.2035020464003586, -0.62191489843895464, 0.074971338122167649, 
--0.56691406696077651]])+(1.-msk_ref)*numpy.array([[-0.067445286221740147, 0.24595722106761103, -0.53214080298820987, 
-0.472738654901382, 0.74659631107102176], [-0.66174612347605788, 0.12374380439342375, -0.11185174242771087, 0.15753641142036548, 
--0.51551856315162214], [0.49966031658365728, -0.74119763796416382, 0.77414555347815084, 0.55697049717211089, 
--0.66528145633685021], [0.12019187053211269, -0.14613868848924111, 0.80347763451302112, -0.87532556518581417, 
--0.29248672579149548]])
+   def test_generalTensorProduct_array_rank0_expandedData_rank3_offset0(self):
+      arg0=numpy.array(-5.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-5.0, 0.0], [2.0, -6.0]], [[-4.0, 0.0], [-1.0, -5.0]], [[-2.0, 6.0], [-2.0, -4.0]], [[-4.0, 
+4.0], [-2.0, -6.0]], [[0.0, 3.0], [2.0, -1.0]], [[6.0, 7.0], [-3.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 4.0], [5.0, 
+5.0]], [[-5.0, -1.0], [-1.0, 2.0]], [[2.0, -2.0], [0.0, 6.0]], [[-5.0, 6.0], [-2.0, 0.0]], [[4.0, 4.0], [0.0, 5.0]], [[-5.0, 
+-3.0], [4.0, 2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[25.0, -0.0], [-10.0, 30.0]], [[20.0, -0.0], [5.0, 25.0]], [[10.0, -30.0], [10.0, 20.0]], 
+[[20.0, -20.0], [10.0, 30.0]], [[-0.0, -15.0], [-10.0, 5.0]], [[-30.0, -35.0], [15.0, 
+-35.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, -20.0], [-25.0, -25.0]], [[25.0, 5.0], [5.0, -10.0]], [[-10.0, 10.0], [-0.0, 
+-30.0]], [[25.0, -30.0], [10.0, -0.0]], [[-20.0, -20.0], [-0.0, -25.0]], [[25.0, 15.0], [-20.0, -10.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       if not arg1.isLazy():
         arg0=numpy.array(arg0*1j)
         arg1=arg1*1j
         ref=-ref
-        res=outer(arg0,arg1)
+        res=generalTensorProduct(arg0,arg1,axis_offset=0)
         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
         self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_expandedData_rank2(self):
-      arg0=numpy.array([0.45174073833470918, -0.32999422808025969])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.097138691944465005, -0.21553892514741024, -0.51682088548807403, 0.4592939442072681, 
-0.13793149312241337], [-0.86233231279442091, 0.11269037329575693, -0.42541177929681973, 0.41252622674889983, 
-0.34353528222730056], [-0.93182078713230698, 0.64040311928947813, -0.020493489734802806, -0.30033328959216421, 
--0.62520987906799363], [-0.22284178783794584, -0.19029020302641642, -0.12015018256454324, -0.67086908239846776, 
-0.19266225130706749]])+(1.-msk_arg1)*numpy.array([[0.44810843186804195, 0.067119478562676527, 0.97389928428461525, 
--0.89095081193287706, 0.40325892981648548], [-0.8596003320912915, 0.36057172930421189, -0.25785774808618123, 
--0.49573945621014581, 0.12835464234318317], [-0.75805229637792237, 0.54720140452346189, -0.018817847608054938, 
--0.49377906267057603, -0.47063696225714668], [-0.96006565494914842, 0.54119283890237635, 0.53704331265262861, 
-0.059162490255933786, -0.963426135668078]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.043881504419860488, -0.097367713185960714, -0.23346904839718075, 0.20748178546885201, 
-0.062309274542727881], [-0.38955063567162906, 0.050906832435839232, -0.19217583127582769, 0.18635490225397966, 
-0.15518888203738346], [-0.42094141037477822, 0.28929617793967971, -0.0092577441838546035, -0.13567278198685628, 
--0.28243277238432968], [-0.10066671376974026, -0.085961836813015058, -0.054276732182756866, -0.30305889460861268, 
-0.087033387654681951]], [[0.032055207664939869, 0.07112660122526851, 0.17054790916239329, -0.15156435058061529, 
--0.04551659660088845], [0.28456468590925998, -0.037187172747809617, 0.14038343172530382, -0.13613127375886538, 
--0.11336466027693221], [0.30749548135886562, -0.2113293330101218, 0.0067627333257069778, 0.099108252065771313, 
-0.20631565143119507], [0.073536503761607933, 0.06279466865893818, 0.039648866749088719, 0.22138292498899451, 
--0.063577430900280743]]])+(1.-msk_ref)*numpy.array([[[0.20242883386607799, 0.030320602802544179, 0.43994998174637695, 
--0.40247877760246653, 0.18216848669536381], [-0.38831648869168123, 0.16288493921850758, -0.11648484950577695, 
--0.2239457079700185, 0.057983020900797093], [-0.34244310406208445, 0.24719316649721854, -0.0085007883723327796, 
--0.22306011834502665, -0.21260588881764811], [-0.43370076781652445, 0.2444788526272168, 0.24260434257541652, 
-0.026726107029935567, -0.43521883385765325]], [[-0.14787319607055013, -0.022149040517439978, -0.321381142545419, 
-0.29400862544127038, -0.13307311926126275], [0.28366314804600062, -0.11898658947930775, 0.08509156853421343, 
-0.16359115918099476, -0.042356291120556541], [0.25015288238770073, -0.18057330509015374, 0.0062097810955520508, 
-0.16294424062817092, 0.15530748106608544], [0.31681612471131321, -0.17859051311615401, -0.17722119340446973, 
--0.019523280303312754, 0.31792506395213493]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[0.61580845642221882, 0.17822708313385949, 0.58972637660522143, -0.74843177869717703, 
-0.9976037022648363], [0.55187701135213363, 0.22487493386286173, 0.29391218079007464, 0.80458982942274737, 
--0.61481939252808426], [-0.22926550831669279, -0.77143931293288204, 0.84539028644557157, 0.11279761558864387, 
--0.99157575517310503], [-0.70875966152114378, 0.13774326141678772, 0.99325430842393869, 0.28694347396680775, 
-0.3742883562671242]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.25127802526427567, -0.23594707373025448, -0.18977891359341159, -0.037150166425794717, 
--0.93771552478023867], [-0.21845508307326078, 0.41466029902966173, -0.001028329177914955, 0.50999614420739126, 
--0.5183973685029688], [0.039164165095863623, -0.6280324353802238, 0.29056793167506711, -0.015424500823010723, 
--0.39665605959047312], [0.48049748658112046, 0.26031355791525357, 0.63368537749662179, 0.039647163322244383, 
--0.96028049287581796]])+(1.-msk_arg1)*numpy.array([[-0.34344273002027159, 0.47629490451433143, 0.37993140152802929, 
--0.72076603796295546, -0.30431457202317413], [-0.96759705784412997, 0.22558806065373616, 0.42407326960757774, 
--0.61572292288676489, -0.30944640576414106], [-0.064828948526520991, -0.23692625772967313, 0.4289947836296979, 
--0.29011540864147944, -0.49760550944029203], [0.010984444410195859, 0.62280811555934634, -0.29684745695028547, 
--0.10474252571079257, -0.35566145942346195]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.15473913287081689, -0.14529820327116746, -0.11686745984144443, -0.022877386642497183, 
--0.57745314987806962], [-0.13452648750493229, 0.25535131868503169, -0.00063325380374573768, 0.31405993834563695, 
--0.31923348331115337], [0.024117624054748717, -0.38674768461458248, 0.17893418949061982, -0.0094985380429014766, 
--0.24426415578692889], [0.2958944155262756, 0.16030329028556817, 0.39022881417352573, 0.024415058446990923, 
--0.59134884805022492]], [[0.044784549498488105, -0.042052158724912941, -0.033823742210066503, -0.0066211658000068308, 
--0.16712630279091828], [-0.038934612251912228, 0.07390369558747055, -0.00018327610988122208, 0.090895125191598508, 
--0.092392450892552616], [0.0069801149084086841, -0.11193238907127138, 0.051787074914685788, -0.0027490637904810161, 
--0.070694852508180375], [0.085637665486503894, 0.046394926127432644, 0.11293989645580155, 0.0070661982734553539, 
--0.17114799123560198]], [[0.14818527935961659, -0.13914421286154799, -0.11191763106951802, -0.021908433036564867, 
--0.55299557871511384], [-0.12882872459178671, 0.24453611566880001, -0.00060643284004921255, 0.30075817820605882, 
--0.30571260176893755], [0.023096141174752338, -0.37036729250733225, 0.17135557350441089, -0.0090962349812983689, 
--0.23391854078079449], [0.28336204172940016, 0.15351377129057595, 0.37370098157879467, 0.023380977968702612, 
--0.56630273558833222]], [[-0.18806445939605604, 0.17659028807032834, 0.1420365698599349, 0.027804365136953689, 
-0.70181609812323087], [0.16349872638996013, -0.31034494515787303, 0.00076963423571309558, -0.38169732133783985, 
-0.38798506458061288], [-0.029311705743887109, 0.47003943269114079, -0.2174702739359303, 0.011544186586481986, 
-0.29687000021031124], [-0.35961958854143095, -0.19482693916950383, -0.47427027421418871, -0.029673196965564842, 
-0.71870443733125022]], [[0.2506758883014385, -0.23538167429185616, -0.18932414681258586, -0.037061143566127629, 
--0.93546847919197995], [-0.21793159965245734, 0.41366664949423465, -0.0010258649950349147, 0.50877404160208484, 
--0.51715513406291036], [0.039070316095744829, -0.62652748267771285, 0.28987164439848295, -0.015387539126622512, 
--0.3957055535732375], [0.47934607154227427, 0.25968976912598885, 0.63216687866172028, 0.039552156914569626, 
--0.9579793749056178]]], [[[0.13867456560131439, -0.13021376588753436, -0.1047346196515868, -0.020502322818301964, 
--0.51750364131421567], [-0.12056033836115324, 0.22884148655487174, -0.0005675112333939019, 0.28145514786628684, 
--0.28609159042222909], [0.021613802385206764, -0.34659666346983992, 0.16035776172760699, -0.0085124274158016825, 
--0.21890536070150413], [0.26517551685660068, 0.14366106835671069, 0.3497163922703842, 0.021880358002870158, 
--0.5299567284680603]], [[0.056506129312494491, -0.053058582600226736, -0.042676520642884179, -0.0083541412179948937, 
--0.21086871661713485], [-0.049125072358105482, 0.093246707319849645, -0.00023124545587287649, 0.1146853491989516, 
--0.11657457395678666], [0.0088070390357265303, -0.14122875236985979, 0.065341444418099248, -0.0034685836024421924, 
--0.089198005166710989], [0.10805184051620076, 0.058537994119798868, 0.1424999573544154, 0.0089156532299397833, 
--0.21594301232524582]], [[0.07385367239004674, -0.069347718991095625, -0.055778334362210739, -0.010918886430919539, 
--0.27560601484886921], [-0.064206609870738993, 0.12187371277487236, -0.00030223847125104912, 0.14989407893852374, 
--0.15236330109254351], [0.0115108251721478, -0.1845863826895032, 0.085401454466280377, -0.0045334486744893826, 
--0.11658204749783375], [0.14122406414520675, 0.07650932549609557, 0.1862478512348138, 0.011652784234181108, 
--0.28223813383129936]], [[0.20217574348506837, -0.18984061580542186, -0.15269418371615734, -0.029890646067556849, 
--0.75447637412999424], [-0.17576673802644699, 0.33363145926466092, -0.00082738319784902775, 0.41033771067408381, 
--0.41709725029700478], [0.031511088913965229, -0.50530851005452693, 0.23378800258216276, -0.012410396486117223, 
--0.31914543132539791], [0.38660339076636258, 0.20944564115946235, 0.50985680978769621, 0.031899704374540414, 
--0.7726319179609461]], [[-0.15449060284863858, 0.14506483653961416, 0.11667975637014111, 0.022840642754224341, 
-0.57652568930954007], [0.13431042146977437, -0.25494119315493041, 0.00063223672048457694, -0.31355551957325356, 
-0.31872075519115273], [-0.024078888193108473, 0.38612652040840251, -0.17864679924060667, 0.0094832822260523877, 
-0.24387183759999828], [-0.29541917281107583, -0.16004582354428049, -0.38960205884640275, -0.024375844869244035, 
-0.59039906928647978]]], [[[-0.057609384191028935, 0.054094525794602985, 0.043509759092783228, 0.00851725178965956, 
-0.21498582644519576], [0.050084215665156487, -0.095067304235787228, 0.000235760411691559, -0.11692452524126092, 
-0.11885063619986905], [-0.0089789922185020514, 0.14398617553681753, -0.066617204556014317, 0.0035363060217187998, 
-0.090939553128906211], [-0.11016150050591385, -0.05968092017716746, -0.14528220018461835, -0.0090897270523892966, 
-0.22015919532577868]], [[-0.19384574716500419, 0.18201884844699157, 0.14640291471165023, 0.0286590988628573, 
-0.72339062016296429], [0.16852483919273198, -0.31988525618398567, 0.00079329355447954836, -0.39343107508576891, 
-0.39991210978414432], [-0.030212776613142995, 0.48448891044928449, -0.2241555255717424, 0.011899066317236065, 
-0.30599607808113888], [-0.37067465091411628, -0.2008161122652572, -0.48884981223160789, -0.030585380433049966, 
-0.74079812364697029]], [[0.21242800175564358, -0.19946736424681422, -0.1604372501240636, -0.031406389836203252, 
--0.79273559609842548], [-0.18467980525479508, 0.35054978897429206, -0.00086933949827786299, 0.43114578643762352, 
--0.43824809985135532], [0.033109004748793802, -0.53093252044319728, 0.24564330699068226, -0.013039723169044989, 
--0.33532917983756177], [0.40620790781719063, 0.2200665532916421, 0.53571146279823922, 0.033517326757746539, 
--0.81181180094038241]], [[0.028343562099633311, -0.026614267321890657, -0.021406608942340102, -0.0041904501915509366, 
--0.10577207529566482], [-0.024641212483882933, 0.046772693009819899, -0.00011599307930903727, 0.057526349025995904, 
--0.058473987094562439], [0.0044176244393334093, -0.070840561223218301, 0.032775369859471555, -0.0017398469144806845, 
--0.044741857730592402], [0.054198970782686796, 0.029362748638236957, 0.07147819961500862, 0.0044721054876027027, 
--0.10831734989267999]], [[-0.24916119765983072, 0.23395939781496136, 0.18818016956231853, 0.036837204328463928, 
-0.92981597962150964], [0.21661476396977195, -0.41116709915064237, 0.0010196662811575599, -0.50569981182781576, 
-0.51403026215308167], [-0.038834236580655136, 0.62274173638534969, -0.28812011627979184, 0.015294561051745037, 
-0.39331453183241155], [-0.47644965811545342, -0.25812061277161535, -0.62834705673336688, -0.039313165911725907, 
-0.9521908549013407]]], [[[-0.17809572813400945, 0.16722976811395951, 0.13450763856231679, 0.026330539381400425, 
-0.66461493794636373], [0.15483215073657766, -0.29389449318651933, 0.00072883824007131958, -0.36146469454551905, 
-0.36741914343361581], [-0.027757980397102495, 0.44512405632438701, -0.2059428289029194, 0.010932263982449683, 
-0.28113381453565439], [-0.34055723595099524, -0.18449974919737977, -0.4491306336654039, -0.028100310056547437, 
-0.68060807709602189]], [[0.034611854722271317, -0.032500119457352532, -0.026140766506491261, -0.0051171850856654121, 
--0.12916399466438469], [-0.030090715615586239, 0.057116661968406063, -0.00014164541477605007, 0.070248532213112461, 
--0.071405744247479266], [0.0053945998309697764, -0.086507235924800002, 0.040023774572054083, -0.0021246210490874235, 
--0.054636699308723467], [0.066185290904252722, 0.035856438458254883, 0.087285890608512981, 0.0054611295819299863, 
--0.13227216696363556]], [[0.24958298120600111, -0.23435544754259599, -0.18849872357467046, -0.036899562861086956, 
--0.93138998506398674], [-0.21698145245962572, 0.41186312854357027, -0.0010213923864420761, 0.50655586751358772, 
--0.51490041974120593], [0.038899975717292985, -0.62379592227138614, 0.28860785002609307, -0.015320451897743989, 
--0.39398034015069999], [0.47725619873357156, 0.25855756294049009, 0.62941073138376957, 0.039379715786606789, 
--0.95380273684436956]], [[0.07210258950085055, -0.067703473008461745, -0.054455820752140158, -0.010659997812662601, 
--0.2690713502730499], [-0.062684260442749024, 0.11898406671968646, -0.00029507234669234872, 0.1463400653285459, 
--0.14875074181349326], [0.011237901587616705, -0.18020980877183612, 0.083376571738193794, -0.0044259598503585823, 
--0.11381786770887546], [0.13787561803190629, 0.074695276628862661, 0.18183188362084865, 0.011376494776614206, 
--0.2755462206083456]], [[0.094050439042214648, -0.088312242392534906, -0.071032037623038613, -0.013904874726560809, 
--0.35097600241615928], [-0.08176519396168884, 0.15520252173304627, -0.00038489163770331165, 0.19088561851795571, 
--0.19403009895017886], [0.014658690978305074, -0.23506522792090287, 0.10875619353059893, -0.005773211059285588, 
--0.14846374454751265], [0.17984461444293215, 0.097432333706147095, 0.23718105833372266, 0.014839471590537065, 
--0.35942180723387379]]]])+(1.-msk_ref)*numpy.array([[[[-0.21149493744321629, 0.29330642995073852, 0.23396496992130594, 
--0.443853821279526, -0.18739948686437899], [-0.59585445062967402, 0.13891903541845912, 0.26114790556696588, 
--0.37916738272667555, -0.19055971347901932], [-0.039922214723592371, -0.14590119305840279, 0.26417861552018801, 
--0.17865552197981069, -0.30642968067561804], [0.0067643137568983817, 0.38353050428983193, -0.18280117425741635, 
--0.064501333079727732, -0.21901933433643572]], [[-0.061210795995042602, 0.084888651543109414, 0.067714065485299832, 
--0.12846002856808619, -0.054237098526819127], [-0.17245200126846361, 0.040205902040139567, 0.075581341877197367, 
--0.10973850056476241, -0.055151730285599582], [-0.011554274398516954, -0.042226675832980669, 0.076458488965962232, 
--0.051706423054358575, -0.08868677849888143], [0.0019577254870752356, 0.11100127378823799, -0.052906256387953307, 
--0.018667954837507841, -0.063388504496175141]], [[-0.20253723674626006, 0.28088366823476657, 0.22405556878166821, 
--0.42505474394799519, -0.17946232990739516], [-0.57061750693629165, 0.13303522961472675, 0.25008719270080598, 
--0.363108048306788, -0.18248870762479602], [-0.038231340913671634, -0.13972166349355497, 0.25298953933248269, 
--0.17108870873548282, -0.29345109406101871], [0.006477816601046283, 0.36728637330913932, -0.1750587751917663, 
--0.061769430163904945, -0.20974294376392319]], [[0.2570434533096862, -0.35647424257006316, -0.28435273462853433, 
-0.53944420781713176, 0.22775869642277441], [0.72418038706443744, -0.16883727348792241, -0.31738991147032691, 
-0.46082660236076622, 0.23159952387750446], [0.048520045256771838, 0.17732314049268505, -0.32107332896378538, 
-0.21713159131700083, 0.37242377651991265], [-0.0082211072679231507, -0.46612938571511858, 0.22217007020703583, 
-0.078392634822963284, 0.26618833869033548]], [[-0.34261973898416559, 0.47515356011337373, 0.37902097277103008, 
--0.71903886793860194, -0.30358534370345769], [-0.965278407205867, 0.22504748449491163, 0.42305706379207364, 
--0.61424746744116299, -0.3087048800428539], [-0.06467359906399385, -0.23635851187487469, 0.42796678440128899, 
--0.28942020574481575, -0.4964130984850153], [0.010958122410933675, 0.6213156818825899, -0.29613612206150641, 
--0.10449153143365647, -0.35480918867376049]]], [[[-0.18953814741420519, 0.26285620842561908, 0.20967540639411625, 
--0.39777420691511434, -0.16794421651905295], [-0.53399457247613602, 0.12449686471030776, 0.23403628862535761, 
--0.33980332650374806, -0.17077635758677381], [-0.035777606361917715, -0.13075415502669735, 0.23675235907521289, 
--0.16010802466826263, -0.27461704138226428], [0.0060620623524625409, 0.34371348146074632, -0.16382328736920471, 
--0.057804992050746219, -0.19628138327975833]], [[-0.077231661198989249, 0.10710678515187833, 0.085437048791039943, 
--0.1620822151175165, -0.068432719257216348], [-0.21758832438859832, 0.050729100219760161, 0.095363448456011579, 
--0.13846065156200915, -0.069586740030311497], [-0.014578405512300274, -0.053278776537335579, 0.096470173596240993, 
--0.065239683330849799, -0.11189900602518128], [0.0024701262102630752, 0.14005393379566156, -0.066753552249054132, 
--0.023553968541843572, -0.079979347165419878]], [[-0.10094200175675486, 0.13998887408500751, 0.11166646677373258, 
--0.21184191805711397, -0.089441759509529345], [-0.28438856139702823, 0.066303078866943227, 0.12464029948514045, 
--0.18096846702808803, -0.090950067955789027], [-0.019054017639757281, -0.069635513095759508, 0.12608679240417073, 
--0.085268452434620889, -0.1462523204527523], [0.0032284620113680104, 0.18305089145780429, -0.087247083434246198, 
--0.030785104153119507, -0.10453323516213034]], [[-0.27633052756349302, 0.38322203597810967, 0.30568894154778242, 
--0.57992102353832375, -0.24484840959498205], [-0.77851875172076079, 0.18150585924119797, 0.34120503965630772, 
--0.4954044014971376, -0.24897743082925253], [-0.052160712636609596, -0.19062845729248759, 0.34516483978386703, 
--0.23342390715175859, -0.40036833196038385], [0.0088379722543031371, 0.50110507546099725, -0.23884044475220653, 
--0.084274770894954318, -0.28616159296976862]], [[0.21115525063925022, -0.29283534385772314, -0.23358919348980664, 
-0.44314093761525841, 0.18709850030873187], [0.59489743531568962, -0.1386959144127187, -0.26072847000752947, 
-0.37855839341485725, 0.19025365121190829], [0.03985809475131008, 0.14566685785130995, -0.26375431226892782, 
-0.17836857930399133, 0.30593751703270822], [-0.0067534494395351287, -0.38291450726975823, 0.18250757315568117, 
-0.064397736029366728, 0.21866756242838475]]], [[[0.078739572075770259, -0.10919799339212885, -0.087105165896797149, 
-0.16524679207098567, 0.069768835043069841], [0.22183663131237086, -0.051719561395955745, -0.097225373720103217, 
-0.14116402889787399, 0.070945387514289374], [0.014863041837569547, 0.054319018911965271, -0.098353707134072321, 
-0.066513456632693826, 0.11408378006301542], [-0.0025183542312800086, -0.14278841919747509, 0.068056883110224772, 
-0.024013848399459123, 0.081540905283376805]], [[0.2649452236786316, -0.36743261389196852, -0.29309401935640983, 
-0.55602725711149792, 0.23476022435702151], [0.74644240949915375, -0.17402749851657953, -0.32714679173927064, 
-0.47499286858879181, 0.2387191226522388], [0.050011599509460526, 0.18277422947873798, -0.33094344113508456, 0.2238064315136252, 
-0.38387245231423561], [-0.0084738322487509302, -0.48045866475612514, 0.22899979823560151, 0.080802502069188556, 
-0.27437123189434159]], [[-0.29034314790948651, 0.4026550857599368, 0.32119031636744816, -0.60932860729374261, 
--0.25726458321223272], [-0.81799715389474137, 0.19070995521476297, 0.35850742286746023, -0.52052617815034674, 
--0.26160298560849976], [-0.054805763364800794, -0.2002951568885657, 0.3626680230163663, -0.24526074841369436, 
--0.42067086416262306], [0.0092861426063809357, 0.52651593121334239, -0.25095195666184134, -0.088548313813679572, 
--0.30067274305965053]], [[-0.038739521037540997, 0.053724929546237393, 0.042855356179613349, -0.081300690479495341, 
--0.034325958113092678], [-0.10914264097540498, 0.025445795347007808, 0.047834453646614886, -0.069452077564897519, 
--0.034904816722671095], [-0.0073125508149104951, -0.026724716942247633, 0.048389588693396116, -0.032724326340283931, 
--0.056128714968637361], [0.0012390191380361006, 0.070251270404350835, -0.033483685337544811, -0.011814707150909627, 
--0.040117764579743719]], [[0.34054948437856364, -0.47228247962890013, -0.37673076638413183, 0.71469412839624447, 
-0.30175095156405918], [0.9594457833350678, -0.22368765160076465, -0.42050077255986168, 0.61053592223883546, 
-0.30683955348118125], [0.064282813592263413, 0.23493033292863835, -0.42538082654294046, 0.28767140541102892, 
-0.49341355880155519], [-0.010891908761196951, -0.61756142751369736, 0.29434674129669508, 0.10386014903041751, 
-0.35266528021378796]]], [[[0.24341835308106527, -0.33757861530782302, -0.26928005154825979, 0.51084989310256024, 
-0.21568589306309663], [0.68579376320646013, -0.15988771751215328, -0.30056602702723156, 0.43639957041603278, 
-0.21932312980832713], [0.045948143614428671, 0.16792377423395441, -0.30405419763972097, 0.20562209883080329, 
-0.3526827124419577], [-0.0077853311021682369, -0.44142126917646374, 0.21039350311149663, 0.074237277069651039, 
-0.25207849559708889]], [[-0.047306921742877518, 0.065606413544001499, 0.052332990361121878, -0.099280664787473716, 
--0.041917281647125951], [-0.13327997448473866, 0.031073235211133744, 0.058413235235428483, -0.084811683527500278, 
--0.042624157163655446], [-0.0089297508042640566, -0.032634995454959591, 0.05909114062794376, -0.039961442573541499, 
--0.06854180576926798], [0.0015130331979117809, 0.085787621073987977, -0.040888736863611809, -0.014427577100436309, 
--0.048989969381242157]], [[-0.34112597128951433, 0.47308196598922819, 0.37736850147326051, -0.71590397257235772, 
--0.30226175977820469], [-0.96106994652200917, 0.22406631317332423, 0.4212126021251531, -0.61156944595265983, 
--0.30735897575153542], [-0.064391632434560725, -0.23532802626875834, 0.42610091713159282, -0.28815837957332102, 
--0.49424881614705896], [0.010910346736070288, 0.61860684410071509, -0.2948450155605607, -0.10403596493744989, 
--0.3532622769126994]], [[-0.098548650060661186, 0.13666971453403123, 0.10901883622353085, -0.20681911085038249, 
--0.08732108047505191], [-0.27764566117785688, 0.064731021809417991, 0.12168505719766103, -0.17667767449412519, 
--0.088793626676505033], [-0.018602243703815295, -0.067984443466907643, 0.12309725352834454, -0.083246723206886156, 
--0.14278465354382056], [0.0031519146386568826, 0.17871072429331988, -0.085178440535527325, -0.030055184199512499, 
--0.102054734723073]], [[-0.12854661489118116, 0.17827163690907599, 0.14220389977219083, -0.26977433560232222, 
--0.11390140095068722], [-0.36216031230938489, 0.084434984415575218, 0.15872568701824527, -0.2304579207232765, 
--0.1158221865662299], [-0.024264720582517545, -0.08867873956216038, 0.16056775241193022, -0.10858681942818438, 
--0.18624794819787185], [0.0041113496427998084, 0.23310982584253287, -0.11110654672399826, -0.039203907779559545, 
--0.13311994303517405]]]])
+   def test_generalTensorProduct_array_rank1_expandedData_rank4_offset1(self):
+      arg0=numpy.array([-5.0, -6.0, -3.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[6.0, 0.0], [-5.0, 0.0]], [[6.0, -3.0], [4.0, -4.0]], [[-3.0, 6.0], [0.0, 4.0]], [[-6.0, 
+-4.0], [-7.0, 7.0]], [[7.0, -7.0], [-7.0, 1.0]], [[-4.0, 5.0], [0.0, 0.0]]], [[[0.0, 2.0], [0.0, 2.0]], [[-2.0, 0.0], [-5.0, 
+-1.0]], [[5.0, 5.0], [-7.0, -3.0]], [[-7.0, 0.0], [7.0, -5.0]], [[1.0, -7.0], [5.0, 2.0]], [[-2.0, 4.0], [-3.0, -3.0]]], 
+[[[-6.0, 7.0], [1.0, 6.0]], [[0.0, 5.0], [4.0, -1.0]], [[-6.0, -3.0], [5.0, -1.0]], [[0.0, 5.0], [2.0, -1.0]], [[-3.0, 5.0], 
+[7.0, 2.0]], [[6.0, 0.0], [-5.0, 1.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, -2.0], [-6.0, -2.0]], [[-3.0, 0.0], [4.0, 0.0]], 
+[[-4.0, 1.0], [2.0, 3.0]], [[0.0, 2.0], [-4.0, -2.0]], [[2.0, 0.0], [3.0, 4.0]], [[0.0, 7.0], [2.0, -7.0]]], [[[2.0, 2.0], 
+[7.0, 5.0]], [[-2.0, 7.0], [0.0, 3.0]], [[4.0, 7.0], [0.0, 1.0]], [[-3.0, 5.0], [6.0, 4.0]], [[-4.0, 0.0], [4.0, -5.0]], 
+[[-2.0, 6.0], [3.0, -1.0]]], [[[7.0, -1.0], [4.0, 7.0]], [[-6.0, 0.0], [-3.0, 1.0]], [[-1.0, 1.0], [6.0, -3.0]], [[-4.0, 1.0], 
+[0.0, -1.0]], [[1.0, 7.0], [4.0, 4.0]], [[-4.0, -3.0], [-2.0, 7.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-12.0, -33.0], [22.0, -30.0]], [[-18.0, 0.0], [-2.0, 29.0]], [[3.0, -51.0], [27.0, 1.0]], 
+[[72.0, 5.0], [-13.0, -2.0]], [[-32.0, 62.0], [-16.0, -23.0]], [[14.0, -49.0], [33.0, 
+15.0]]])+(1.-msk_ref)*numpy.array([[[-38.0, 1.0], [-24.0, -41.0]], [[45.0, -42.0], [-11.0, -21.0]], [[-1.0, -50.0], [-28.0, 
+-12.0]], [[30.0, -43.0], [-16.0, -11.0]], [[11.0, -21.0], [-51.0, -2.0]], [[24.0, -62.0], [-22.0, 20.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       if not arg1.isLazy():
         arg0=numpy.array(arg0*1j)
         arg1=arg1*1j
         ref=-ref
-        res=outer(arg0,arg1)      
+        res=generalTensorProduct(arg0,arg1,axis_offset=1)
         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_array_rank3(self):
-      arg0=numpy.array(-0.409786441515)
-      arg1=numpy.array([[[-0.24581316871434389, -0.33314609913795179], [-0.79698015548755907, -0.41895026934279977]], 
-[[-0.95131583957856281, -0.020459344268369817], [-0.84875716041095783, 0.40273550306252726]], [[0.54396865218080359, 
--0.63003080302737158], [-0.61695250839228399, -0.46130757001642531]], [[0.21174308619500604, -0.7300390108976802], 
-[0.83728873908140167, -0.61171328391097091]], [[0.53377663455002256, 0.27485489141149699], [0.14771677004966133, 
--0.8418463957002067]], [[0.76892157851423759, 0.10470902366721901], [0.11160616603087448, -0.73241482746681186]]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[0.1007309036848804, 0.13651875447021333], [0.32659166187500405, 0.17168014004557156]], 
-[[0.38983633265737877, 0.0083839618834575125], [0.34780917647484783, -0.16503554867158765]], [[-0.22291097827266779, 
-0.25817808081717608], [0.25281877299758398, 0.18903758756078076]], [[-0.086769445807171969, 0.29916008844260283], 
-[-0.34310957290841881, 0.2506718098410905]], [[-0.2187344276358959, -0.11263180788440072], [-0.06053232955068201, 
-0.34497723879588438]], [[-0.31509363746314295, -0.04290833820305831], [-0.045734693628880323, 0.30013366586015877]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_expandedData_rank4_offset0(self):
+      arg0=numpy.array(-1.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-2.0, -3.0, 4.0, -1.0], [7.0, 1.0, -3.0, 1.0], [2.0, -3.0, 0.0, 5.0]], [[3.0, 4.0, 4.0, 
+1.0], [-7.0, 0.0, 6.0, -6.0], [4.0, -4.0, -2.0, 1.0]]], [[[-7.0, 5.0, 0.0, -5.0], [-5.0, 0.0, 5.0, -5.0], [-4.0, 1.0, -6.0, 
+-1.0]], [[-7.0, -5.0, -3.0, 2.0], [-2.0, 0.0, -7.0, -7.0], [0.0, -6.0, -1.0, 5.0]]], [[[-2.0, 6.0, 5.0, -5.0], [2.0, 4.0, -6.0, 
+-4.0], [-5.0, 4.0, -6.0, 7.0]], [[5.0, 4.0, 4.0, -2.0], [7.0, 3.0, -1.0, -2.0], [-1.0, 6.0, 6.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-3.0, -7.0, 0.0, -5.0], [4.0, 5.0, -1.0, 5.0], [5.0, 2.0, 7.0, 1.0]], [[7.0, 0.0, -6.0, 
+6.0], [-5.0, 0.0, 0.0, 5.0], [-5.0, 7.0, -5.0, 1.0]]], [[[0.0, -1.0, 5.0, 5.0], [4.0, 1.0, 5.0, 2.0], [0.0, -2.0, 3.0, 5.0]], 
+[[-5.0, 4.0, 2.0, -4.0], [0.0, 0.0, -2.0, -6.0], [7.0, 6.0, 0.0, 5.0]]], [[[-3.0, 5.0, 0.0, -6.0], [7.0, -2.0, -5.0, -4.0], 
+[-2.0, 7.0, -4.0, -2.0]], [[-4.0, 1.0, 6.0, 0.0], [1.0, 3.0, 7.0, 0.0], [-3.0, -1.0, -2.0, -3.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[2.0, 3.0, -4.0, 1.0], [-7.0, -1.0, 3.0, -1.0], [-2.0, 3.0, -0.0, -5.0]], [[-3.0, -4.0, -4.0, 
+-1.0], [7.0, -0.0, -6.0, 6.0], [-4.0, 4.0, 2.0, -1.0]]], [[[7.0, -5.0, -0.0, 5.0], [5.0, -0.0, -5.0, 5.0], [4.0, -1.0, 6.0, 
+1.0]], [[7.0, 5.0, 3.0, -2.0], [2.0, -0.0, 7.0, 7.0], [-0.0, 6.0, 1.0, -5.0]]], [[[2.0, -6.0, -5.0, 5.0], [-2.0, -4.0, 6.0, 
+4.0], [5.0, -4.0, 6.0, -7.0]], [[-5.0, -4.0, -4.0, 2.0], [-7.0, -3.0, 1.0, 2.0], [1.0, -6.0, -6.0, 
+-0.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 7.0, -0.0, 5.0], [-4.0, -5.0, 1.0, -5.0], [-5.0, -2.0, -7.0, -1.0]], [[-7.0, -0.0, 
+6.0, -6.0], [5.0, -0.0, -0.0, -5.0], [5.0, -7.0, 5.0, -1.0]]], [[[-0.0, 1.0, -5.0, -5.0], [-4.0, -1.0, -5.0, -2.0], [-0.0, 2.0, 
+-3.0, -5.0]], [[5.0, -4.0, -2.0, 4.0], [-0.0, -0.0, 2.0, 6.0], [-7.0, -6.0, -0.0, -5.0]]], [[[3.0, -5.0, -0.0, 6.0], [-7.0, 
+2.0, 5.0, 4.0], [2.0, -7.0, 4.0, 2.0]], [[4.0, -1.0, -6.0, -0.0], [-1.0, -3.0, -7.0, -0.0], [3.0, 1.0, 2.0, 3.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_array_rank3(self):
-      arg0=numpy.array([-0.49129863317869038, 0.54128675640520529])
-      arg1=numpy.array([[[0.093841980947059422, 0.89307566094746704], [-0.78966131499119219, 0.20641795950763542]], 
-[[-0.54236894611313802, -0.93859447771012605], [0.54563092327710838, -0.33381561458664288]], [[-0.87336998291594892, 
-0.440422743370255], [0.04740961922232878, 0.55570236388504091]], [[0.7408413781394021, 0.0022393702192720077], 
-[-0.44183603347710343, 0.95376042666640082]], [[-0.29549285253968072, 0.33527228096563499], [-0.20900772183724192, 
--0.87406076379355291]], [[0.048859208273817734, -0.82158991022488981], [-0.26546800212877186, 0.55957256702419222]]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[-0.046104436974070996, -0.43876685154864609], [0.38795952472925999, -0.10141286136963554]], 
-[[0.2664651219039515, 0.46113018400805172], [-0.26806772682607022, 0.16400315518012215]], [[0.42908547886590187, 
--0.21637909183861539], [-0.023292281123452295, -0.27301581183088786]], [[-0.36397435648210558, -0.0011001995279094016], 
-[0.217073439336395, -0.4685811940011273]], [[0.14517523456681744, -0.16471881338111832], [0.10268520806242887, 
-0.42942485856689466]], [[-0.024004462243119612, 0.40364599992689132], [0.13042406659854328, -0.27491723734327678]]], 
-[[[0.050795421481472869, 0.4834100277386893], [-0.42743321185025152, 0.11173130776566899]], [[-0.29357712761649007, 
--0.50804876041955194], [0.29534279265504343, -0.18068997125701405]], [[-0.47274360519424358, 0.23839499820596746], 
-[0.025662199011260219, 0.30079433007403888]], [[0.40100762658383915, 0.0012121414423801585], [-0.23915999342376301, 
-0.51625788773790071]], [[-0.15994636769212542, 0.18147844547646322], [-0.11313311181692208, -0.47311751573486854]], 
-[[0.026446842367061171, -0.44471573760087441], [-0.14369431380165307, 0.30288921977785938]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_float_rank0_offset0(self):
+      arg0=numpy.array([4.0, -3.0])
+      arg1=3.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([12.0, -9.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_constData_rank3(self):
-      arg0=numpy.array(0.387355709924)
-      arg1=Data(numpy.array([[[-0.10395844223183359, -0.034376748558501147], [0.12862393234867664, -0.91804162386511479]], 
-[[0.80081261014870431, -0.74967915907766769], [0.3734576493144337, -0.18944617576320444]], [[-0.62224883551171062, 
--0.5896500922539134], [-0.36425230899400796, -0.41356142099185367]], [[0.55848582677774394, -0.40903018734005703], 
-[0.43711358327212779, 0.4802731028544085]], [[0.21468754528887946, 0.58178173257469279], [0.45898096180989745, 
--0.24878056263588544]], [[0.42123126772180419, 0.61407672776484268], [0.55341950102533555, 
-0.22644467592489304]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.04026889619326831, -0.013316029842744909], [0.049823214628092742, -0.35560866495172894]], 
-[[0.31019933711995984, -0.29039250287949242], [0.14466095287660874, -0.073383057905076002]], [[-0.2410316394288011, 
--0.22840433009155836], [-0.14109521174170145, -0.16019537782533158]], [[0.21633267391378774, -0.15844017859730997], 
-[0.16931844236564411, 0.18603652871340198]], [[0.083160446517138942, 0.22535647604207926], [0.17778889630331099, 
--0.096366571455027653]], [[0.16316633675041714, 0.23786612683094052], [0.21437020370525914, 
-0.087714638201317044]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_array_rank0_offset0(self):
+      arg0=numpy.array([3.0, 5.0])
+      arg1=numpy.array(4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([12.0, 20.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_constData_rank3(self):
-      arg0=numpy.array([0.56605108848823593, -0.18851042340241464])
-      arg1=Data(numpy.array([[[0.44970194057812041, 0.057775049092888997], [0.6868268383241618, -0.59156660892409763]], 
-[[0.56945239876636711, -0.2197598623523993], [0.3022233880249896, -0.24972154753827924]], [[0.18469333360262574, 
-0.36337543839803699], [0.24891933100108354, 0.5292816133280307]], [[0.71451631627973322, -0.95542670983685118], 
-[-0.2721393858590675, 0.048385636119469666]], [[-0.59563969298710884, -0.43356870481545284], [0.46921748373561711, 
--0.36221706760565597]], [[-0.027495688126619067, 0.58580762011459719], [0.53855251006612104, 
--0.7732493783904304]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.25455427295951705, 0.032703629426491083], [0.38877907943632545, -0.33485692289478003]], 
-[[0.3223391501639391, -0.12439530929060053], [0.17107387775814786, -0.14135515380300973]], [[0.10454586252228719, 
-0.20568906243509877], [0.14090105825892682, 0.29960043334114139]], [[0.40445273857274766, -0.54082032907388355], 
-[-0.1540447955860452, 0.027388741992621507]], [[-0.33716249656215164, -0.24542203729522175], [0.26560106740625722, 
--0.20503336538719852]], [[-0.015563964192805787, 0.33159704101057075], [0.30484823453099946, -0.43769865231075494]]], 
-[[[-0.084773503223268987, -0.010891198966595796], [-0.12947401809662953, 0.11151647191901229]], [[-0.10734771279896853, 
-0.041427024698907154], [-0.056972258838703042, 0.047075114659147238]], [[-0.034816618517034395, -0.068500057746451987], 
-[-0.046923888480060058, -0.099775101027580179]], [[-0.13469377330982613, 0.18010789360132076], [0.051301110852765903, 
--0.0091211967514763931]], [[0.11228429072028415, 0.081732220118797549], [-0.088452386526816792, 0.068281692777923259]], 
-[[0.0051832238104897056, -0.11043084250016359], [-0.10152276169699764, 0.14576556771603397]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank1_offset1(self):
+      arg0=numpy.array([[0.0, 3.0, -3.0], [3.0, 5.0, 0.0]])
+      arg1=numpy.array([3.0, 3.0, -1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([12.0, 24.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_expandedData_rank3(self):
-      arg0=numpy.array(-0.0528042862132)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.84057186546492013, 0.95475104878375916], [0.82290236437194797, -0.94329886724569456]], 
-[[-0.54658057476605704, -0.1365510319173604], [-0.40460022411662555, -0.1163723229781406]], [[0.37751551926701143, 
-0.54195098813444509], [0.39841038225251446, -0.14876508383575748]], [[-0.16099764993361343, -0.94944586040930856], 
-[0.80917016966538169, 0.028354118907784942]], [[-0.72728317469000103, -0.48372986468381352], [-0.37012289584931302, 
-0.11281353766308144]], [[-0.5644983995881232, 0.50017748063404488], [0.66734901930012702, 
--0.71438652176093376]]])+(1.-msk_arg1)*numpy.array([[[0.74423031805071438, 0.52445338133253472], [-0.60489290108393923, 
-0.60530980668442291]], [[-0.49209968010950811, -0.15600012165422306], [0.52935145057545641, 0.2918272989589823]], 
-[[-0.56506933354856748, -0.53581802436899206], [0.80213522312628971, -0.32830786440359261]], [[0.47913514471837093, 
--0.69421694646042065], [-0.56527548892904078, 0.33046868249119821]], [[0.99709158711162793, 0.84770941063786132], 
-[-0.202469867157685, 0.79247373048264391]], [[0.92657022957706991, -0.88882680191552499], [-0.027318369583105628, 
--0.53152810510410364]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.044385797366810691, -0.050414947642373205], [-0.043452771973852146, 0.049810223370671203]], 
-[[0.028861797108546687, 0.0072104797720782153], [0.021364626036197258, 0.006144957449837893]], [[-0.019934437529316978, 
--0.02861733509100204], [-0.021037775854790015, 0.0078554340654006863]], [[0.0085013659867543053, 0.050134810957033538], 
-[-0.042727653234230618, -0.0014972190101310502]], [[0.038403668914408086, 0.025543010224658234], [0.019544075326502097, 
--0.0059570383314900173]], [[0.029807935058769851, -0.026411514844819781], [-0.03523888861925209, 
-0.037722670361948735]]])+(1.-msk_ref)*numpy.array([[[-0.039298550722924083, -0.027693386453387144], [0.031940937877196263, 
--0.031962952279848106]], [[0.025984972353948643, 0.0082374750731305912], [-0.027952025503582674, -0.015409732219068238]], 
-[[0.029838082819026012, 0.028293488316995598], [-0.042356177903685531, 0.017336062438026448]], [[-0.025300389316533296, 
-0.036657630334980845], [0.029848968706740923, -0.017450162894779127]], [[-0.052650709546660845, -0.04476269034498264], 
-[0.010691276814952039, -0.041846009680883298]], [[-0.048926879599259482, 0.046933864842350362], [0.0014425270063455088, 
-0.028066962192300718]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank2_offset2(self):
+      arg0=numpy.array([[[-3.0, -7.0, 5.0], [2.0, -2.0, 0.0]], [[-1.0, 0.0, 0.0], [-6.0, -5.0, -1.0]]])
+      arg1=numpy.array([[-3.0, -4.0, 0.0], [-1.0, -7.0, -5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([49.0, 49.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank1_expandedData_rank3(self):
-      arg0=numpy.array([0.20678794651781152, 0.2502637168038282])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.053314958879399743, 0.79556982667577225], [0.15870834897630259, 0.47094597084800416]], 
-[[0.069161910646639901, -0.61982663962747275], [-0.62942126336988258, -0.62334021680981344]], [[0.45765903223210813, 
-0.41444013187142548], [0.25471122760688547, -0.7489874822821323]], [[-0.013047736550351852, -0.082011819940301489], 
-[0.73058388881809155, 0.21765601080646824]], [[-0.39232638166275224, -0.47018056584844681], [-0.10867343405645791, 
-0.22042469754020755]], [[-0.53349238995623782, 0.96587951492430824], [-0.72626294178900785, 
-0.47479682180950289]]])+(1.-msk_arg1)*numpy.array([[[-0.68299337038412622, 0.84196499441255401], [-0.62088074728991893, 
--0.44309842738306671]], [[-0.26453631540983413, 0.09336790644058901], [-0.10107396285692016, -0.10155806106462872]], 
-[[-0.031104927846619335, 0.60884094737193872], [0.090208804348483884, 0.8858826510976896]], [[-0.11796959941075391, 
-0.36030799184669116], [0.9595854250855973, 0.0077306962795962164]], [[-0.88641372669713081, -0.50131085906678696], 
-[0.76027428371304806, 0.15483479187808658]], [[-0.59528068006432378, 0.92672986021064641], [0.69245958914554029, 
--0.69230260953398992]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.011024890865352634, 0.16451425076981416], [0.032818973580041828, 0.09738595023249591]], 
-[[0.014301849479867032, -0.12817267800560067], [-0.13015673054690463, -0.12889924341606873]], [[0.094638371480606553, 
-0.085701223824263081], [0.052671211711858748, -0.15488158342866787]], [[-0.0026981146479526531, -0.016959055835643451], 
-[0.15107594212769027, 0.045008639521928157]], [[-0.081128366828803714, -0.097227673704382969], [-0.022472356269573734, 
-0.045581170566149215]], [[-0.11031979580192995, 0.19973224147481758], [-0.1501824223645338, 0.098182259795170368]]], 
-[[[0.013342799770401842, 0.19910226180085616], [0.039718941302608529, 0.11786068907820885]], [[0.017308716819682358, 
--0.15512011860719832], [-0.15752130480630805, -0.15599943949212802]], [[0.11453545043525039, 0.10371932779481163], 
-[0.063744978532565014, -0.18744439115546785]], [[-0.0032653750449682141, -0.020524582880106161], [0.18283863945261036, 
-0.054471402249120934]], [[-0.098185058475117645, -0.11766913597815938], [-0.027197017524804881, 0.055164304081771989]], 
-[[-0.13351378839700537, 0.24172459738963603], [-0.18175726318899943, 
-0.11882441735269111]]]])+(1.-msk_ref)*numpy.array([[[[-0.14123479654701251, 0.17410821223445269], [-0.1283906547645266, 
--0.091627413903815985]], [[-0.054702921442987697, 0.01930735764351655], [-0.020900877225600075, -0.021000982899885081]], 
-[[-0.0064321241559871052, 0.12590096926300215], [0.018654093409050009, 0.18318985427624612]], [[-0.02439469121367863, 
-0.074507349747933632], [0.19843069956187193, 0.0015986148088105868]], [[-0.18329967430890029, -0.10366504311350089], 
-[0.15721555791932124, 0.032017968661982241]], [[-0.12309686943222785, 0.19163656476969809], [0.14319229648597373, 
--0.14315983499445606]]], [[[-0.17092845942470511, 0.2107132889204002], [-0.1553839235087135, -0.11089145934681743]], 
-[[-0.066203841524054896, 0.023366599296013896], [-0.025295145616664919, -0.025416297833424133]], [[-0.0077844348538098507, 
-0.15237079843166534], [0.022575990664680915, 0.22170428491573674]], [[-0.029523510418393975, 0.090172017233676349], 
-[0.24014941507270302, 0.0019347127844132758]], [[-0.22183719386915671, -0.12545991886417421], [0.1902690680323956, 
-0.038749530505957135]], [[-0.14897715553440818, 0.23192685928940851], [0.17329751051601472, -0.1732582242149657]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_array_rank3_offset3(self):
+      arg0=numpy.array([[[[4.0, -5.0, 6.0], [7.0, 5.0, 0.0], [0.0, -5.0, -3.0], [-3.0, -2.0, -2.0]], [[4.0, 1.0, -4.0], [-1.0, 
+-1.0, 0.0], [1.0, 0.0, 6.0], [-5.0, 2.0, -6.0]]], [[[1.0, 2.0, 6.0], [2.0, 7.0, -6.0], [7.0, -6.0, 0.0], [-3.0, 0.0, -6.0]], 
+[[2.0, 1.0, 3.0], [4.0, -4.0, 7.0], [5.0, 0.0, -4.0], [1.0, 0.0, 4.0]]]])
+      arg1=numpy.array([[[-1.0, 7.0, 2.0], [-3.0, -4.0, -6.0], [7.0, -5.0, -5.0], [0.0, -1.0, -4.0]], [[6.0, -3.0, -5.0], 
+[-2.0, 2.0, -1.0], [4.0, -1.0, -7.0], [-4.0, 5.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([33.0, 133.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_array_rank4(self):
-      arg0=numpy.array(-0.730935877851)
-      arg1=numpy.array([[[[-0.78191809977016868, -0.68664195999519873, -0.8091776474747967, 0.2261814966467186], 
-[-0.66902295768628917, 0.73975108805058309, 0.86251664890996871, -0.8523231851989983], [0.9122388979308611, 
--0.30021501495916425, 0.46570071050475015, -0.12990023109379245]], [[0.40617071029300522, 0.036831899135205903, 
-0.8675573142267925, -0.97899632074763021], [-0.76466833566117609, 0.76346806464430306, 0.047664613252238253, 
--0.42508616770889129], [0.023624890751065886, -0.64092450309316806, 0.7730603866640835, -0.66041329891979572]]], 
-[[[0.10268058043631068, -0.25518645921054062, 0.75164024165418319, 0.22733024998903351], [0.15083427638758629, 
-0.71619440821272562, -0.23384587894353004, 0.88967050676253456], [0.042075387601280712, 0.58956579004336107, 
--0.98905184748058761, 0.15987692907760476]], [[0.015268771894321409, -0.038912224301465237, 0.64817891334974553, 
-0.38179161125282923], [-0.20446335810878913, 0.23547727215007752, -0.5759362456810484, 0.81575606232508835], 
-[0.64623346560637107, -0.31553003581827754, 0.53002340359386113, 0.49644058502816635]]], [[[0.99568301932228476, 
-0.22822554384281291, 0.41332850760217266, -0.48455525766166874], [0.41057334644739329, 0.3253517871792273, 
--0.97380219806987234, -0.72358766087548076], [0.25192451036393582, 0.41091345762120102, 0.72457229680370649, 
-0.84860644997230583]], [[0.53535627062493352, -0.38101327657706063, -0.80377189834711249, -0.22316933585178012], 
-[0.68592233680235259, 0.23682060765030966, 0.43467238902828464, 0.20557286974186306], [-0.49884304184952444, 
--0.51082452482911989, -0.6428107713982214, 0.52471220548819542]]]])
-      res=outer(arg0,arg1)
-      ref=numpy.array([[[[0.57153199266316856, 0.50189124379848726, 0.59145697409447462, -0.16532417080514383], 
-[0.48901288287896394, -0.54071061093555584, -0.63044436393219294, 0.62299359558627143], [-0.66678813966900963, 
-0.21943792550325641, -0.34039735764866835, 0.094948739447601321]], [[-0.29688474468542064, -0.026921756527314725, 
--0.63412876706049903, 0.71558353511866146], [0.55892352119143773, -0.5580462000420604, -0.034839775929957718, 
-0.31071073115665637], [-0.017268280260266566, 0.46847471430468179, -0.56505757235821896, 0.4827197743904787]]], 
-[[[-0.075052920199474737, 0.18652493857876923, -0.54940081986170974, -0.16616383583784314], [-0.11025018422139511, 
--0.52349218847901424, 0.17092634280745009, -0.65029209285870193], [-0.030754410372267206, -0.43093478829631865, 
-0.72293348037847094, -0.11685978350347632]], [[-0.01116049318828395, 0.028442340828930216, -0.47377722303386527, 
--0.27906518652727086], [0.14944960414763064, -0.17211878663299818, 0.4209724653231412, -0.59626537352794118], 
-[-0.4723552254797484, 0.23063222371922024, -0.38741312178750426, -0.36286623481847408]]], [[[-0.7277804417897632, 
--0.16681823823679007, -0.30211663554507717, 0.35417882262629546], [-0.30010278940778728, -0.23781129417227123, 
-0.71178696449952827, 0.52889618210424016], [-0.18414066313507077, -0.30035138886718138, -0.5296158878308016, 
--0.6202769004606089]], [[-0.3913111056323243, 0.27849627378777597, 0.58750571811038799, 0.16312247441026681], 
-[-0.50136524538830218, -0.1731006787461089, -0.31771764425202204, -0.15026058600713754], [0.36462227670419278, 
-0.37337997248384136, 0.46985345548409868, -0.38353097653769841]]]])
+   def test_generalTensorProduct_array_rank1_array_rank1_offset0(self):
+      arg0=numpy.array([-2.0, 0.0])
+      arg1=numpy.array([-2.0, -1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[4.0, 2.0], [0.0, 0.0]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_constData_rank4(self):
-      arg0=numpy.array(0.749217389397)
-      arg1=Data(numpy.array([[[[-0.23764815269520856, -0.18455544660624201, -0.86854924762358765, -0.52190811115135682], 
-[0.60231705734854768, -0.38772913109778928, 0.31513849762036106, -0.83855541759102703], [0.60463621224720465, 
-0.83322375980887253, 0.82300214150592166, 0.63478805277209704]], [[-0.92311897579065683, 0.50028758892228264, 
--0.40790848163492055, 0.61140861252818102], [0.2482285795009469, -0.68985582771863574, -0.57852022126144687, 
-0.088837349136333676], [-0.29717142897784332, 0.14598829284286263, -0.69389346371608074, 0.41237743422733653]]], 
-[[[0.68613166005853499, -0.089223037792774296, -0.85328947134450228, -0.2366765680382874], [-0.082832060713332822, 
--0.13298655372469881, -0.096193670872633641, 0.9301320089812195], [0.8616956824865214, -0.45302600597414466, 
-0.5867348229104401, 0.49530471719458924]], [[-0.53236094581109183, 0.15096918538813942, 0.79579488271314314, 
-0.15431250414984166], [0.17451306913175046, 0.11950361241978413, -0.82875828286528663, 0.9324872081668687], 
-[-0.433803042765466, 0.30160290882483398, 0.24618890795144455, 0.034820689896103874]]], [[[0.31785046073691126, 
-0.37491673301292194, 0.24333760131866189, -0.70222242846076033], [-0.53548006611759313, 0.4194970567389269, 
-0.60139635888872478, 0.18758102830458601], [0.082890811553601784, 0.57208279180229082, -0.69611056660004111, 
-0.64094977905094641]], [[-0.04569723508861423, -0.70575800156534818, 0.40407628063560219, -0.74110273778927382], 
-[-0.75353144830274577, -0.86137928176577705, 0.06012369990444677, -0.083786106712061326], [-0.59306811754723965, 
--0.48642200425558246, -0.86997408610813132, -0.27730301946656444]]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.17805012855724847, -0.13827214990526759, -0.6507321998669976, -0.3910226325417735], 
-[0.45126641329577116, -0.29049340739412999, 0.23610724248551976, -0.62826030083199469], [0.45300396447454949, 
-0.62426573010729247, 0.61660751592694618, 0.47559424771811448]], [[-0.69161678914441582, 0.37482416131991358, 
--0.30561212772328006, 0.45807796453301197], [0.18597716830734645, -0.51685198230344431, -0.43343740988669271, 
-0.066558486800845598], [-0.2226460022220616, 0.10937696764620802, -0.51987704940478408, 0.30896034471790745]]], 
-[[[0.514061771131468, -0.06684745144914396, -0.63929931012040386, -0.17732220043701213], [-0.062059220285990778, 
--0.099635838606480592, -0.072069970967678337, 0.69687107556320149], [0.64559738968694469, -0.33941496152475487, 
-0.43959193228908511, 0.37109090717239257]], [[-0.3988540780373353, 0.11310873895584569, 0.59622336452158076, 
-0.11561361151040921], [0.13074822607049297, 0.089534184520623714, -0.62092011712920792, 0.69863563174858279], 
-[-0.32501278321308014, 0.22596614398418796, 0.18444901091380161, 0.026088266380950405]]], [[[0.23813909241184159, 
-0.28089413594907464, 0.18231276240201874, -0.52611725462716996], [-0.40119097721058639, 0.31429448970953106, 
-0.45057660999928112, 0.14053896832670726], [0.062103237437161951, 0.42861437579287853, -0.5215381414395287, 
-0.48021072019493094]], [[-0.034237163175738057, -0.52876616747861038, 0.30274097609492739, -0.55524705848121436], 
-[-0.56455886452568493, -0.64536033676494542, 0.045045721483279219, -0.062774008138522491], [-0.44433694676314811, 
--0.36443582417346981, -0.65179971363669942, -0.20776024431655701]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank2_offset1(self):
+      arg0=numpy.array([[-3.0, 4.0, 6.0], [-1.0, 2.0, -1.0]])
+      arg1=numpy.array([[-4.0, -1.0], [-6.0, -7.0], [7.0, -7.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[30.0, -67.0], [-15.0, -6.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_array_rank0_expandedData_rank4(self):
-      arg0=numpy.array(-0.305801562699)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.076413284641204005, 0.38935210549404298, -0.87416483595564998, -0.17808529342420831], 
-[-0.45136890149782793, -0.76051790558909405, 0.090218653691126249, -0.21900622726658181], [-0.021002797765071968, 
--0.74561261640475429, 0.0089512091020149676, -0.40272388162468853]], [[0.78254729019255809, 0.091319539172886266, 
--0.92162394941705261, 0.0035206880978480015], [-0.97199275524939011, -0.91028332618997254, 0.57471596823472937, 
--0.34679234179543195], [0.32401911995733079, -0.45404235298596274, 0.89010307011958845, -0.62562287427214014]]], 
-[[[-0.89077603808072126, 0.35306075395242598, 0.41112703301475717, -0.78019271431447534], [-0.50972742129771409, 
-0.25265771402863657, -0.20898468571319029, -0.32322942473076854], [-0.67890323338268299, 0.27809696504865955, 
-0.50181490703872633, 0.2474557882082471]], [[-0.50803662282881779, 0.28745039939039341, 0.75142850079254853, 
-0.38461906474766083], [-0.79004617450693693, -0.80488457439045957, 0.28994104666897669, 0.84024531664112345], 
-[0.09295599333181026, -0.77393733706441026, 0.082149420520204242, 0.65119514574683679]]], [[[-0.56328794490739398, 
--0.77708657567269745, -0.35569077221534151, 0.9655445481998306], [0.61573578226884251, 0.96366054275303337, 
-0.79633760080273963, 0.78496512183264811], [0.87001146332336354, -0.23162665449416164, 0.092499885172479646, 
--0.82048676789744923]], [[-0.27665579014160069, 0.78610284117250617, -0.46563337780422298, 0.59181244373631237], 
-[0.97715866220645253, 0.36730209557650206, -0.57698674789558768, -0.73888924091888231], [0.12486787492493812, 
--0.48572943068852403, 0.37108312575493785, 0.17693016092234015]]]])+(1.-msk_arg1)*numpy.array([[[[0.24779411139647256, 
-0.030923197183163165, 0.26385000008947146, 0.26084330968092395], [-0.40869869895284539, 0.27562112292321661, 
--0.034057342292344694, -0.21741963202156644], [0.0085135581535666915, -0.79692161059190791, -0.53555664354946408, 
-0.36274753547938765]], [[-0.18566438430195764, -0.79711944059062279, -0.10551670269570645, 0.29702369829533692], 
-[0.582560976676052, 0.93278036958236088, -0.79230495881995266, -0.23574276521562432], [-0.54366001095056271, 
--0.12021671908123022, -0.74952574526028304, 0.22443224791911232]]], [[[0.79516700008567032, 0.43491471551636662, 
-0.87961514755304537, -0.94994363819548955], [0.70962114713121704, 0.049025057757413171, -0.60055359926960605, 
-0.15148560426616231], [0.9200852427312125, 0.78218919602399173, -0.35575228880385246, 0.57639041676455971]], 
-[[-0.91251891001791252, -0.60692661160038575, -0.25804212419225925, 0.75833778551217645], [-0.8441072639167031, 
--0.77616174870793708, 0.82337316848673225, 0.74305007885292218], [0.49959972075119308, -0.29782295278750781, 
--0.59591336226686775, -0.13699931234570717]]], [[[-0.1854359391396716, 0.98823418676405672, 0.7025739902289343, 
-0.90216845426126446], [-0.21513498062117953, 0.45844653154002812, 0.79638962266025293, -0.053347997254850288], 
-[-0.45013562465321955, -0.33375799278898621, -0.07278996036103158, -0.59715058872691285]], [[0.32569967219899443, 
-0.81866841960423642, -0.13546178282279953, 0.70390122030123692], [0.01050667752783685, 0.4836265262041195, 0.37130052883088704, 
--0.30679879418041689], [0.85442902550949595, 0.17981560260205076, -0.95381997614648251, 0.84655270932562532]]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.023367301854272833, -0.1190644823003728, 0.26732097289208628, 0.054458761022900794], 
-[0.138029315431939, 0.23256756399000567, -0.027589005283380732, 0.066972446539016614], [0.0064226883776180854, 
-0.22800950326494837, -0.0027372937314451046, 0.12315359233719049]], [[-0.23930418422705066, -0.027925657784056007, 
-0.28183404395291045, -0.0010766319220990319], [0.29723690348774096, 0.27836606364808447, -0.17574904119446835, 
-0.10604964005322114], [-0.099085553227430109, 0.13884686107481159, -0.27219490980608729, 0.19131645261289915]]], 
-[[[0.27240070446024833, -0.10796653028647371, -0.12572328916387296, 0.2385841512440387], [0.15587544198356698, 
--0.077263123778010506, 0.063907843471332701, 0.098844063193091136], [0.20760966969008737, -0.085042486493835376, 
--0.15345578275828739, -0.07567236673308915]], [[0.15535839316956876, -0.087902781332143645, -0.22978800979921479, 
--0.11761711104380929], [0.24159735476888958, 0.24613496064122914, -0.088664425162067378, -0.25694833087969221], 
-[-0.028426088023140866, 0.23667124710569462, -0.025121421169927098, -0.19913649319163421]]], [[[0.17225433380240421, 
-0.23763428919342208, 0.10877079398120119, -0.29526503169537649], [-0.18829296442773819, -0.29468889988561175, 
--0.24352128276175403, -0.24004356092093421], [-0.26605086505066022, 0.07083179290714435, -0.028286609435257626, 
-0.25090613579720472]], [[0.084601772955133644, -0.24039147727297611, 0.14239141457752291, -0.18097717011950412], 
-[-0.29881664590797025, -0.11232155481005192, 0.17644344916330479, 0.225953484534754], [-0.038184791282996997, 
-0.14853681895363158, -0.1134777997472311, -0.054105519698704661]]]])+(1.-msk_ref)*numpy.array([[[[-0.075775826492745932, 
--0.009456362022272409, -0.080685742345592323, -0.079766291720105256], [0.12498070081298421, -0.084285370102877968, 
-0.010414788494386745, 0.066487263233719507], [-0.0026034593874927556, 0.24369987386791345, 0.16377405851146176, 
--0.11092876321494609]], [[0.056776458857157167, 0.24376037059066927, 0.03226717257523308, -0.090830311097463659], 
-[-0.17814805703521466, -0.28524569467359262, 0.24228809454161065, 0.072090505998011312], [0.16625208092584495, 
-0.036762460557632756, 0.22920614418401311, -0.068631732133799569]]], [[[-0.24316331123317722, -0.13299759964586186, 
--0.26898768669576834, 0.29049424903651661], [-0.2170032557172539, -0.014991939273644384, 0.18365022914138368, 
--0.046324534511052534], [-0.28136350504384455, -0.23919467847070952, 0.10878960585009977, -0.17626109017155014]], 
-[[0.27904970867621398, 0.18559910627123855, 0.078909684820260756, -0.23190087986361196], [0.25812932039162706, 
-0.23735147566237183, -0.25178880160798389, -0.22722587527712226], [-0.15277837532988947, 0.091074724370164006, 
-0.1822312374146508, 0.041894603804057927]]], [[[0.05670659996953898, -0.30220355862540099, -0.21484822412394811, 
--0.27588452313118017], [0.065788613265257867, -0.1401936657590519, -0.24353719112707614, 0.016313900927415532], 
-[0.13765217744561678, 0.1020637157582809, 0.022259283627229495, 0.18260958319954562]], [[-0.099599468729128809, 
--0.2503500820476085, 0.04142442487325633, -0.21525409315411986], [-0.0032129584067909834, -0.14789374747609313, 
--0.11354428194759202, 0.093819550694657403], [-0.26128573121651361, -0.054987892273438095, 0.29167963923948115, 
--0.25887714141917151]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank3_offset2(self):
+      arg0=numpy.array([[[-4.0, 7.0, 7.0], [-7.0, -7.0, -5.0]], [[-6.0, 0.0, -3.0], [-3.0, 4.0, 4.0]]])
+      arg1=numpy.array([[[-2.0, 7.0], [2.0, -6.0], [-1.0, 7.0]], [[3.0, 6.0], [7.0, 0.0], [5.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[-80.0, -63.0], [54.0, -81.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=outer(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_float_rank0(self):
-      arg0=Data(0.855868237407,self.functionspace)
-      arg1=-0.331240406713
-      res=outer(arg0,arg1)
-      ref=Data(-0.28349814305116411,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_array_rank4_offset3(self):
+      arg0=numpy.array([[[[-6.0, -2.0, -4.0], [1.0, -5.0, -2.0], [0.0, -3.0, -2.0], [0.0, -5.0, 5.0]], [[-3.0, 0.0, 7.0], 
+[-4.0, 4.0, -7.0], [-1.0, 0.0, 5.0], [0.0, -1.0, 6.0]]], [[[-4.0, 4.0, 4.0], [-4.0, -7.0, 5.0], [3.0, 4.0, 5.0], [0.0, -3.0, 
+0.0]], [[-7.0, -6.0, -5.0], [-5.0, -6.0, 0.0], [-7.0, -6.0, -7.0], [-4.0, -6.0, -1.0]]]])
+      arg1=numpy.array([[[[-7.0, 0.0], [3.0, -4.0], [7.0, 5.0]], [[7.0, -1.0], [7.0, -4.0], [-7.0, 4.0]], [[-6.0, 1.0], [1.0, 
+7.0], [1.0, -4.0]], [[-7.0, 3.0], [1.0, -7.0], [7.0, -1.0]]], [[[7.0, -4.0], [-1.0, 3.0], [-6.0, 6.0]], [[-7.0, -2.0], [-5.0, 
+0.0], [-4.0, 6.0]], [[4.0, 0.0], [-1.0, -1.0], [5.0, 0.0]], [[0.0, -4.0], [0.0, 3.0], [1.0, -6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([[19.0, -3.0], [-62.0, 88.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_float_rank0(self):
-      arg0=Data(numpy.array([0.76708082216518658, 0.24900288446126861]),self.functionspace)
-      arg1=0.0458016595743
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([0.035133574682782366, 0.011404745347113238]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_array_rank2_offset0(self):
+      arg0=numpy.array([0.0, -5.0])
+      arg1=numpy.array([[-4.0, 0.0, -6.0, -3.0, 0.0], [1.0, 5.0, -4.0, 6.0, 0.0], [7.0, -6.0, 0.0, -4.0, 5.0], [-6.0, 2.0, 
+-6.0, 0.0, -6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[20.0, 0.0, 30.0, 15.0, 0.0], [-5.0, -25.0, 20.0, -30.0, 0.0], [-35.0, 30.0, 0.0, 20.0, -25.0], [30.0, -10.0, 30.0, 
+0.0, 30.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_float_rank0(self):
-      arg0=Data(numpy.array([[0.27130062800907284, 0.44990188647787566, 0.088311580580226368, -0.99526858922829242, 
-0.85698394752482043], [-0.62451037819636279, -0.939987131220962, 0.64573112346806516, -0.63920340736457271, 
--0.56916567178378163], [0.74097375520088504, -0.5438764905274347, 0.63856368133120744, -0.16653574269539528, 
-0.63460309111640489], [0.34795479077961011, -0.21677917281420012, -0.66518992587141823, -0.1291185912908297, 
--0.89585459262077771]]),self.functionspace)
-      arg1=0.961957356457
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[0.26097963492462783, 0.4327864293811024, 0.084951974599460092, -0.95740594105835508, 
-0.82438201268673272], [-0.60075235248949543, -0.904227535852556, 0.62116580451310155, -0.61488641998648663, 
--0.54751310501498129], [0.71278515475677606, -0.52318599106667352, 0.61427103082257406, -0.16020028279880186, 
-0.61046111192953467], [0.3347176707047691, -0.20853232001520014, -0.63988434263284266, -0.12420657874752894, 
--0.86177391568700312]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank3_offset1(self):
+      arg0=numpy.array([[-6.0, 3.0, -1.0], [2.0, -2.0, -4.0]])
+      arg1=numpy.array([[[7.0, 2.0, -5.0, -1.0, -4.0], [-5.0, 7.0, -1.0, -2.0, -7.0], [4.0, 3.0, -2.0, -6.0, -4.0], [0.0, 0.0, 
+-4.0, -3.0, 7.0]], [[4.0, 0.0, 0.0, -2.0, 0.0], [6.0, 7.0, 7.0, 0.0, 7.0], [0.0, 0.0, 2.0, 5.0, 0.0], [-7.0, 0.0, 3.0, -3.0, 
+0.0]], [[-2.0, -7.0, -4.0, 4.0, -5.0], [-3.0, -5.0, -4.0, -5.0, -3.0], [4.0, -5.0, -1.0, 0.0, 7.0], [1.0, 4.0, -5.0, 6.0, 
+-5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-28.0, -5.0, 34.0, -4.0, 29.0], [51.0, -16.0, 31.0, 17.0, 66.0], [-28.0, -13.0, 19.0, 51.0, 17.0], 
+[-22.0, -4.0, 38.0, 3.0, -37.0]], [[14.0, 32.0, 6.0, -14.0, 12.0], [-10.0, 20.0, 0.0, 16.0, -16.0], [-8.0, 26.0, -4.0, -22.0, 
+-36.0], [10.0, -16.0, 6.0, -24.0, 34.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_float_rank0(self):
-      arg0=Data(numpy.array([[[0.57447118168186195, -0.9350773708453195], [0.77222865652792017, -0.78557350460581077]], 
-[[-0.23304322070648698, -0.23819108901843822], [0.30653294545689524, 0.79724898528053201]], [[-0.88280206793438487, 
-0.40332879737058502], [0.77270626667504283, 0.18441274328652613]], [[-0.76004623321329823, 0.1704480317704693], 
-[-0.51375334514695004, -0.037200815454657032]], [[0.43916408941534923, 0.85295616833129495], [-0.30158632262856933, 
-0.53164939486293217]], [[0.072519001758186263, 0.1379034515343005], [-0.92697335821079752, 
-0.1044833237344418]]]),self.functionspace)
-      arg1=0.835880092036
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[0.4801890242164556, -0.78161255880327773], [0.64549056049165143, -0.6566452533312096]], 
-[[-0.19479618877258173, -0.19909918941096647], [0.25622478666067777, 0.66640455519216402]], [[-0.73791667379485848, 
-0.33713451226702801], [0.64588978530538588, 0.15414694083101407]], [[-0.63530751537019969, 0.14247411648371164], 
-[-0.4294361934254064, -0.031095421046065351]], [[0.3670885194795544, 0.71296908048772056], [-0.25209000311566765, 
-0.44439514510908834]], [[0.060617189864015708, 0.11527074976061906], [-0.77483857597646988, 
-0.087335530259407157]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank4_offset2(self):
+      arg0=numpy.array([[[-3.0, 7.0, 0.0], [7.0, 0.0, -7.0]], [[7.0, 4.0, -2.0], [-1.0, 6.0, 1.0]]])
+      arg1=numpy.array([[[[0.0, -6.0, 1.0, -1.0, -6.0], [1.0, 5.0, -2.0, -5.0, -7.0], [6.0, -4.0, 0.0, -7.0, -5.0], [0.0, 0.0, 
+4.0, -1.0, -6.0]], [[-4.0, 1.0, 1.0, 5.0, -4.0], [5.0, -4.0, 3.0, -3.0, 7.0], [-2.0, -7.0, -3.0, 7.0, -3.0], [7.0, -1.0, 0.0, 
+-2.0, -6.0]], [[1.0, 3.0, 0.0, -7.0, 2.0], [0.0, 0.0, 5.0, -6.0, 0.0], [-2.0, -5.0, 1.0, -2.0, -4.0], [-7.0, 0.0, 6.0, 3.0, 
+-7.0]]], [[[-6.0, 4.0, 1.0, 1.0, 0.0], [7.0, -4.0, -2.0, 0.0, 3.0], [-1.0, -3.0, -3.0, -4.0, 4.0], [-7.0, 5.0, -2.0, 0.0, 
+0.0]], [[-6.0, 0.0, -7.0, -7.0, -6.0], [-2.0, -1.0, 6.0, 0.0, 3.0], [-5.0, -3.0, 0.0, -5.0, -7.0], [5.0, -7.0, -5.0, -3.0, 
+-2.0]], [[0.0, 3.0, -6.0, 5.0, 0.0], [2.0, -2.0, -4.0, 6.0, 4.0], [-1.0, -3.0, 6.0, 6.0, 2.0], [0.0, 3.0, 4.0, 1.0, -1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[-70.0, 32.0, 53.0, 10.0, -10.0], [67.0, -57.0, 41.0, -48.0, 63.0], [-32.0, -37.0, -84.0, 0.0, 8.0], 
+[0.0, 7.0, -54.0, -18.0, -17.0]], [[-48.0, -45.0, -38.0, -11.0, -98.0], [10.0, 15.0, 22.0, -29.0, -2.0], [8.0, -64.0, -5.0, 
+-37.0, -83.0], [79.0, -48.0, -8.0, -38.0, -65.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank4_float_rank0(self):
-      arg0=Data(numpy.array([[[[-0.99003147993777652, 0.99248118182244327, -0.28393801264996088, -0.25782938592976867], 
-[-0.25796348811729675, -0.9366938080443088, -0.41605694953379224, 0.5317307438090042], [0.25368074706940624, 
-0.054844991120822861, -0.26663260028699876, -0.42921257694890991]], [[0.17425190117495082, -0.020499236232457418, 
-0.1047698276591571, -0.64415325405356194], [0.78001969337194033, -0.6623207724498501, -0.83880153563372839, 
-0.2428790987632552], [0.43639348261735389, 0.74734546870049678, 0.53186214770861451, 0.032918407378838221]]], 
-[[[0.87184649475290432, -0.070427396650536878, 0.08083953652836029, -0.93929653796714008], [-0.42554636590081141, 
-0.58060523059381164, -0.23351855337671146, -0.18988344428505166], [-0.84737202935955835, -0.27240603315182432, 
--0.29324807086273341, -0.1206112357169844]], [[-0.72707031300431013, -0.12170258962411951, 0.91097572803827753, 
--0.0017605112124874367], [0.75740702212793365, -0.20946431282305711, 0.65275147924456922, 0.046018209195791693], 
-[-0.16409908608468871, 0.4434084280382713, -0.11952060793439201, -0.65385351680468551]]], [[[0.68236855318799572, 
-0.26826896833718883, -0.9998479914754328, 0.87396403269938672], [0.6901199070263444, 0.99922382186703151, -0.11227870700938802, 
-0.77890290565720632], [-0.54285727890099156, -0.72884280010118552, -0.92003470771768225, -0.69492614208004144]], 
-[[-0.88632998203428381, 0.013555649733227204, -0.30928316046881354, 0.23624644768272107], [-0.94817677989959215, 
--0.62591771484007364, 0.72923780693280738, -0.51992672063312817], [-0.9931941841403773, 0.37974651536759785, 
--0.51815249801128216, -0.47193207425752437]]]]),self.functionspace)
-      arg1=-0.874147612629
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.86543365461470378, -0.86757505566883686, 0.2482037358924544, 0.22538094217598878], 
-[0.22549816728306471, 0.81880865606586484, 0.36369518915247584, -0.46481116026183678], [-0.22175441942054497, 
--0.047942618052900565, 0.23307625098981871, 0.37519514945003146]], [[-0.15232188340806688, 0.017919358413311041, 
--0.091584294723755344, 0.56308502919782411], [-0.68185235276432443, 0.57896612203132436, 0.73323635984337365, 
--0.21231218434126997], [-0.38147232099661249, -0.6532902572732936, -0.46492602666697119, -0.02877554722174502]]], 
-[[[-0.7621225319668089, 0.061563940645709775, -0.070665687862263488, 0.8210838262142246], [0.37199033981494378, 
--0.50753467620322112, 0.20412968593872172, 0.16598615949946155], [0.74072823647285579, 0.23812308354527709, 
-0.25634210105258221, 0.10543202375817955]], [[0.63556677832580022, 0.10638602817063451, -0.79632725782720293, 
-0.0015389466734016624], [-0.66208554018122201, 0.18310272898515223, -0.57060114722138566, -0.040226707705941854], 
-[0.14344682433545528, -0.38760441878902691, 0.10447865408576004, 0.57156449072358828]]], [[[-0.59649084170207478, 
--0.23450667821427396, 0.87401473473968649, -0.76397357270737676], [-0.60326666915450633, -0.87346911836662722, 
-0.098148163681275422, -0.68087611544967686], [0.47453739434932518, 0.63711619368994876, 0.80424614328680499, 
-0.60746802805242717]], [[0.77478323779636249, -0.011849638851929214, 0.27035913635002179, -0.20651426823382299], 
-[0.82884646849904142, 0.54714447612935924, -0.63746148796878288, 0.45449270158323285], [0.86819832494285754, 
--0.33195450981259139, 0.45294176911407463, 0.41253829603504794]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_array_rank3_offset0(self):
+      arg0=numpy.array([1.0, 5.0])
+      arg1=numpy.array([[[4.0, 3.0], [6.0, 0.0]], [[0.0, 0.0], [5.0, 4.0]], [[-5.0, 1.0], [-7.0, -2.0]], [[4.0, -7.0], [7.0, 
+-2.0]], [[5.0, 2.0], [-3.0, 1.0]], [[0.0, 4.0], [-1.0, -5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[4.0, 3.0], [6.0, 0.0]], [[0.0, 0.0], [5.0, 4.0]], [[-5.0, 1.0], [-7.0, -2.0]], [[4.0, -7.0], [7.0, 
+-2.0]], [[5.0, 2.0], [-3.0, 1.0]], [[0.0, 4.0], [-1.0, -5.0]]], [[[20.0, 15.0], [30.0, 0.0]], [[0.0, 0.0], [25.0, 20.0]], 
+[[-25.0, 5.0], [-35.0, -10.0]], [[20.0, -35.0], [35.0, -10.0]], [[25.0, 10.0], [-15.0, 5.0]], [[0.0, 20.0], [-5.0, -25.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_array_rank0(self):
-      arg0=Data(0.72749091269,self.functionspace)
-      arg1=numpy.array(0.544429243769)
-      res=outer(arg0,arg1)
-      ref=Data(0.39606732744475071,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank4_offset1(self):
+      arg0=numpy.array([[-7.0, 4.0, -6.0], [-2.0, -3.0, -7.0]])
+      arg1=numpy.array([[[[3.0, 1.0], [-1.0, 2.0]], [[2.0, 2.0], [0.0, 1.0]], [[-5.0, 2.0], [-2.0, 1.0]], [[-1.0, 7.0], [7.0, 
+5.0]], [[1.0, 0.0], [-5.0, -6.0]], [[-3.0, -1.0], [-7.0, -7.0]]], [[[-7.0, 4.0], [-2.0, 5.0]], [[5.0, -1.0], [-2.0, 7.0]], 
+[[5.0, -2.0], [0.0, 5.0]], [[7.0, -3.0], [0.0, 0.0]], [[1.0, 2.0], [4.0, 7.0]], [[3.0, 0.0], [5.0, 5.0]]], [[[-7.0, -6.0], 
+[-7.0, 3.0]], [[1.0, -6.0], [4.0, -7.0]], [[1.0, -7.0], [-5.0, -1.0]], [[0.0, -1.0], [-3.0, -7.0]], [[5.0, 4.0], [-1.0, -5.0]], 
+[[4.0, 6.0], [2.0, -7.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[-7.0, 45.0], [41.0, -12.0]], [[0.0, 18.0], [-32.0, 63.0]], [[49.0, 20.0], [44.0, 19.0]], [[35.0, 
+-55.0], [-31.0, 7.0]], [[-33.0, -16.0], [57.0, 100.0]], [[9.0, -29.0], [57.0, 111.0]]], [[[64.0, 28.0], [57.0, -40.0]], 
+[[-26.0, 41.0], [-22.0, 26.0]], [[-12.0, 51.0], [39.0, -10.0]], [[-19.0, 2.0], [7.0, 39.0]], [[-40.0, -34.0], [5.0, 26.0]], 
+[[-31.0, -40.0], [-15.0, 48.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_array_rank0(self):
-      arg0=Data(numpy.array([-0.71865788045453294, -0.23655700550904335]),self.functionspace)
-      arg1=numpy.array(-0.0695063340636)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([0.049951274716309058, 0.016442210249995634]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_constData_rank0_offset0(self):
+      arg0=numpy.array([0.0, -5.0])
+      arg1=Data(-7.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, 35.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_array_rank0(self):
-      arg0=Data(numpy.array([[0.9481360650271351, 0.20080183704454591, -0.34235850408590363, -0.21548109592585418, 
--0.3378140780018144], [-0.44688833119774674, -0.64497216507845367, -0.6086273707942087, 0.14685104020157436, 
-0.57295381791887801], [0.064227911010919403, -0.91053622229373166, -0.75875775638735554, -0.13519195091034986, 
-0.1532033919276008], [-0.78483268225608693, -0.89080247571077642, 0.73468888286281442, -0.32300084310035859, 
--0.66646383399504394]]),self.functionspace)
-      arg1=numpy.array(0.18612714645)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[0.17647386022947992, 0.037374672930944604, -0.063722211428272668, -0.040106881498517877, 
--0.062876370368989881], [-0.083178049867473028, -0.12004682862549122, -0.11328207577706595, 0.027332965065878692, 
-0.1066422591766607], [0.011954557798883093, -0.16947550879455675, -0.14122541604290076, -0.025162892045901657, 
-0.028515310165888364], [-0.14607866758873334, -0.16580252285431119, 0.13674554529552091, -0.060119225227093877, 
--0.12404701163337635]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_array_rank0(self):
-      arg0=Data(numpy.array([[[-0.26866259702851858, 0.40120836097358192], [-0.25200668304318952, -0.11455848141269542]], 
-[[0.94398866644768331, 0.82628729899896092], [-0.24330240460710928, -0.094657592656990586]], [[-0.44847718163489403, 
--0.23055820282066608], [-0.26922667564184399, 0.77233417483910416]], [[-0.55642929541911657, 0.0075577282469232454], 
-[0.084036871591784301, -0.80233885576629538]], [[-0.16845827560251547, -0.4472604377306062], [-0.13739162918347314, 
--0.99320600213394195]], [[-0.58138064046843674, -0.11018358249045401], [0.063922835096953401, 
--0.54131725355090565]]]),self.functionspace)
-      arg1=numpy.array(-0.0182349338312)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[0.0048990446797230677, -0.0073160079148620613], [0.0045953251903030727, 0.0020889663283588564]], 
-[[-0.017213570870039975, -0.015067294222775286], [0.0044366032489731432, 0.0017260749387172708]], [[0.0081779517318981317, 
-0.0042042135726663796], [0.0049093306159126299, -0.014083462573735854]], [[0.010146451383687458, -0.00013781467449654628], 
-[-0.0015324067928540101, 0.014630595945068301]], [[0.0030718255089234531, 0.0081557644873139733], [0.002505327267116123, 
-0.018111045729624971]], [[0.010601437509660291, 0.0020091903359937642], [-0.0011656286682931991, 
-0.0098708843001668878]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank4_array_rank0(self):
-      arg0=Data(numpy.array([[[[0.95462962342599722, -0.94724113177473135, 0.49513578884703269, 0.53035952876880899], 
-[-0.61444141225101778, -0.25095323015371473, -0.30817817857191754, 0.40591894392835703], [-0.12576247497385351, 
--0.84457431957082418, 0.51631066561800831, -0.88990809350170674]], [[0.82039700166326313, -0.67660864343626925, 
--0.051274119820798436, 0.12256730192970489], [-0.093676451895046586, -0.014472530095783753, -0.29970090215351486, 
--0.054009917955756048], [-0.76514661163061826, -0.012158493375796775, 0.69391579183245367, 0.69139942245021779]]], 
-[[[-0.30363471850512314, -0.69687459624795034, 0.24579045612403783, 0.5283226969362016], [0.072033061111246743, 
-0.24904040981223075, -0.43822789190142641, -0.78423278697539733], [-0.70651970260583874, -0.11576991731667685, 
--0.196095882982803, -0.49017897450254355]], [[0.22539170133650122, 0.85382114442168566, 0.41170067506447894, 
--0.29281346939592434], [-0.61023932590586205, -0.85662278469281516, 0.47503142183387981, -0.24738801228027674], 
-[0.44543053294663659, -0.54165686048766837, 0.046479281819532092, 0.72957276124480908]]], [[[-0.37555395269063441, 
--0.74769587040326813, 0.16503520916337711, -0.17115445642731308], [0.90114286973352353, 0.46163510304640254, 
--0.87719837601530304, 0.29280571120417842], [0.14051749500984201, -0.67883102537652262, 0.30867803228715318, 
--0.95551022441636113]], [[0.15049183021264345, -0.53128173055033634, -0.69946290860329308, -0.75378481192125379], 
-[-0.51780039536351685, 0.38122248695605632, -0.77441203786786561, 0.55202816275395561], [-0.45762426631314512, 
-0.96921999872840758, 0.52912481251169008, -0.73547276091528513]]]]),self.functionspace)
-      arg1=numpy.array(0.0681689406737)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.065076090164669864, -0.064572424515626697, 0.033752882215332007, 0.036154047252364915], 
-[-0.041885820179195378, -0.017107215858218408, -0.021008179971993609, 0.027671064406977381], [-0.0085730946954685194, 
--0.057573736685342103, 0.035196351133705256, -0.060664092030950717]], [[0.055925594535252726, -0.046123694473710092, 
--0.003495302432159468, 0.0083552831337797926], [-0.0063858244917548166, -0.00098657704549761542, -0.020430293018753081, 
--0.0036817988929165736], [-0.052159233974919353, -0.00082883161361609265, 0.047303504445960265, 0.047131966210829553]]], 
-[[[-0.020698457112247038, -0.047505203008625298, 0.016755275021677719, 0.036015198584005634], [0.0049104174694365663, 
-0.016976820921840368, -0.029873531164582749, -0.053460318329685168], [-0.048162699691727581, -0.0078919126253580597, 
--0.013367648613408738, -0.033414981432352053]], [[0.015364713516749069, 0.058204082940020441, 0.028065198893786877, 
--0.019960784023706889], [-0.041599368404426747, -0.058395067789452075, 0.032382388813130387, -0.01686417873251525], 
-[0.030364527574687536, -0.036924174388078795, 0.0031684434049112082, 0.049734202278434551]]], [[[-0.025601115120736075, 
--0.050969635431480281, 0.011250275382527588, -0.011667417986230454], [0.061429954825379572, 0.031469175952461063, 
--0.059797684053640755, 0.01996025515599403], [0.0095789287809408662, -0.046275191896349495, 0.021042254470253027, 
--0.065136119801339168]], [[0.010258868645640094, -0.036216912770899022, -0.047681645520021625, -0.05138471212458539], 
-[-0.035297904432346656, 0.025987533096782377, -0.052790848266402686, 0.037631175076978191], [-0.031195761461139799, 
-0.066070700593066689, 0.036069877953084542, -0.050136399005945999]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_constData_rank1_offset1(self):
+      arg0=numpy.array([[-4.0, 0.0, 7.0], [-1.0, -7.0, -4.0]])
+      arg1=Data(numpy.array([-5.0, -6.0, -3.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-1.0, 59.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_constData_rank0(self):
-      arg0=Data(-0.761549634663,self.functionspace)
-      arg1=Data(0.0997529748633,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(-0.075966841563735246,self.functionspace)
+   def test_generalTensorProduct_array_rank3_constData_rank2_offset2(self):
+      arg0=numpy.array([[[-1.0, -6.0, 7.0], [-2.0, -7.0, 4.0]], [[-4.0, 1.0, -7.0], [-2.0, -4.0, 7.0]]])
+      arg1=Data(numpy.array([[0.0, -5.0, -2.0], [-1.0, 7.0, 0.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-31.0, -17.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_constData_rank0(self):
-      arg0=Data(numpy.array([0.55868192127741945, 0.65764903734185398]),self.functionspace)
-      arg1=Data(-0.995214717967,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([-0.55600847071728854, -0.65450200121934787]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_constData_rank0(self):
-      arg0=Data(numpy.array([[0.28355419590890651, -0.64569032712320906, 0.50141124723693098, -0.80757327909511289, 
-0.55012578249109922], [0.73848320842017556, 0.30326193928008305, 0.4209398421529722, -0.31301100573218643, 
--0.56419991074326048], [-0.64831653760568275, 0.50941318603805041, -0.53963934101870326, -0.050527384769094574, 
-0.97712479575240763], [-0.30360813532673103, 0.91177458447138848, -0.7012270814638073, 0.84659160172487069, 
--0.012813769261334373]]),self.functionspace)
-      arg1=Data(-0.912549180814,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[-0.25875714919310722, 0.58922417907594948, -0.4575624229170972, 0.73695033428569789, 
--0.50201683215703385], [-0.67390224688888734, -0.27674143426217118, -0.38412830812876142, 0.28563793686674155, 
-0.51486016636421783], [0.59162072530037657, -0.46486458561498423, 0.49244743858174261, 0.046108723579722101, 
--0.89167443191712059], [0.27705735518094093, -0.83203915014659047, 0.63990419875454296, -0.77255647263822824, 
-0.011693194642573103]]),self.functionspace)
+   def test_generalTensorProduct_array_rank4_constData_rank3_offset3(self):
+      arg0=numpy.array([[[[-3.0, 3.0, 5.0], [-4.0, -2.0, 7.0], [-1.0, -1.0, -1.0], [-6.0, -3.0, 6.0]], [[-7.0, -7.0, 1.0], 
+[-5.0, -1.0, -5.0], [4.0, 2.0, 0.0], [-7.0, 1.0, 1.0]]], [[[7.0, -7.0, 3.0], [1.0, -7.0, 0.0], [-4.0, -7.0, 4.0], [-6.0, 0.0, 
+1.0]], [[-3.0, -3.0, 5.0], [-1.0, 1.0, 2.0], [5.0, 0.0, -6.0], [-3.0, 5.0, -5.0]]]])
+      arg1=Data(numpy.array([[[-2.0, -5.0, 0.0], [2.0, 7.0, -4.0], [-2.0, -3.0, 5.0], [-2.0, -3.0, -3.0]], [[3.0, 0.0, 2.0], 
+[-5.0, 0.0, 3.0], [5.0, -6.0, -7.0], [3.0, 6.0, 0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-72.0, 132.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_constData_rank0(self):
-      arg0=Data(numpy.array([[[-0.84881460202203995, 0.54149795397130895], [0.6989075063336776, -0.76126229191446915]], 
-[[-0.64412555419430562, 0.73975769511094036], [0.18952045967857267, 0.44246537421386645]], [[-0.14357708781339995, 
--0.20689271372893048], [0.22560575090442936, 0.3430078217353314]], [[0.67664786945362243, 0.10124599613681817], 
-[-0.17759393001224488, -0.95180121682446628]], [[0.001928327449682854, 0.37269203891262626], [-0.43934319126823351, 
-0.7467473182371025]], [[0.017458344573415996, -0.44215311866986218], [-0.65332164942710658, 
-0.92129804824183625]]]),self.functionspace)
-      arg1=Data(-0.901088980022,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[0.7648574839634189, -0.4879378390277509], [-0.62977785201160286, 0.68596506215005937]], 
-[[0.58041443863474806, -0.66658750695059343], [-0.17077479770497611, -0.39870067274521642]], [[0.12937573161223787, 
-0.18642874438788787], [-0.20329085596946309, -0.30908056822689572]], [[-0.60971993851970441, -0.091231651390189017], 
-[0.16002793325274831, 0.85765758765160716]], [[-0.0017375946147822365, -0.33582868920592185], [0.39588730809929545, 
--0.67288577932408178]], [[-0.015731521904523791, 0.39841930271556358], [0.58870093870825346, 
--0.83017151858606031]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_constData_rank1_offset0(self):
+      arg0=numpy.array([-7.0, 0.0])
+      arg1=Data(numpy.array([-3.0, 4.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[21.0, -28.0], [0.0, 0.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank4_constData_rank0(self):
-      arg0=Data(numpy.array([[[[0.36506979897896308, 0.61233242903390339, -0.24865941965977933, 0.57815860382927831], 
-[-0.73624130099188112, 0.13597465903021155, -0.99478808372728134, 0.91700497409411619], [-0.49724567921575669, 
--0.54691125683738284, 0.9507305292564705, -0.43122965813968106]], [[0.08995318683066178, 0.76455311872055609, 
-0.071910852797488545, -0.35672973572366673], [-0.26623785199264605, 0.97237948150930698, -0.91926047313140868, 
-0.32892783516690316], [-0.087694443509900077, 0.60849775878089041, 0.72436347181268745, -0.83397913799482115]]], 
-[[[0.53469221329579275, -0.24350908703846508, 0.90393177678133441, -0.3445113911551021], [-0.38976994345460647, 
--0.34763449585953965, -0.93882937967617619, 0.46110064961193653], [0.77347702173187827, 0.90339541842388771, 
-0.075137977932457023, -0.8468468433600711]], [[0.85846586709643158, 0.29065862494062333, 0.12332472946607553, 
-0.57985673762797574], [-0.83233995096314151, -0.15708811684665114, 0.963272973347304, 0.31822269071413434], 
-[-0.19626619878721407, 0.87629225061940486, -0.20561672906490625, -0.98671240041738906]]], [[[-0.36810699494738608, 
-0.20825338962819551, -0.43615912691127967, -0.22491076709170787], [0.85985869915219282, 0.39753233629467633, 
-0.36508767523776808, 0.035424381439172814], [-0.10016681257513804, 0.77433650969734646, -0.94187407357980368, 
-0.93922055606159649]], [[0.46394552974372494, 0.28410240599782344, -0.36314219052725183, 0.52252472849970011], 
-[0.80853947102134094, -0.10437974451611942, -0.84506815967908877, 0.64333966413214849], [-0.89726693506002442, 
-0.6859164881500488, 0.18387818447739512, -0.092837085709315481]]]]),self.functionspace)
-      arg1=Data(-0.625847677008,self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.2284780856367617, -0.38322682826753468, 0.15562292016023038, -0.36183921914874262], 
-[0.46077490794311682, -0.08509942448601282, 0.62258581131595925, -0.57390543284158413], [0.31120005323944666, 
-0.34228313962120194, -0.59501249319574878, 0.26988407980367352]], [[-0.056296993017436327, -0.47849379330048197, 
--0.045005240174972469, 0.22325847642233471], [0.16662434120119735, -0.6085614396728436, 0.57531703167456749, 
--0.20585872154247678], [0.054883363757180281, -0.38082690879759484, -0.45334119614342061, 0.52194390618719344]]], 
-[[[-0.33463587960543817, 0.15239959645336235, -0.56572360267231248, 0.2156116538572152], [0.24393661367860511, 
-0.21756624168154021, 0.58756418637719687, -0.28857877042651042], [-0.48407879726996261, -0.56538792404026061, 
--0.04702492894410662, 0.52999712969845847]], [[-0.53726886871296053, -0.18190802522142877, -0.077182495453983466, 
--0.36290199224190617], [0.52091802479123506, 0.098313233014037937, -0.60286215269399968, -0.19915893175467633], 
-[0.12283274458616834, -0.54842546943026704, 0.12868475223925496, 0.61753166367621082]]], [[[0.23037890767821731, 
--0.13033490012784815, 0.27296917638326201, 0.14075988111843279], [-0.53814056941952093, -0.24879468920558637, 
--0.22848927345180842, -0.022170266833151632], [0.062689166963445897, -0.48461670581656724, 0.58946970098398255, 
--0.58780900320931251]], [[-0.2903592320483564, -0.17780483082612158, 0.22727169636507724, -0.32702088751077341], 
-[-0.50602254970798366, 0.065325820632101905, 0.52888394464858368, -0.40263263432421231], [0.56155242696340457, 
--0.42927924073019363, -0.11507973460762629, 0.058101874431367724]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_constData_rank2_offset1(self):
+      arg0=numpy.array([[1.0, -2.0, -6.0], [3.0, -1.0, 2.0]])
+      arg1=Data(numpy.array([[1.0, 3.0], [4.0, -1.0], [-1.0, 2.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-1.0, -7.0], [-3.0, 14.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_expandedData_rank0(self):
-      arg0=Data(-0.642877126562,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.547089422365)+(1.-msk_arg1)*(0.222624469009)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(-0.35171127582219308)+(1.-msk_ref)*numpy.array(-0.14312017893859127)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_expandedData_rank0(self):
-      arg0=Data(numpy.array([-0.3829468436692347, -0.26589916801218894]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.230991317554)+(1.-msk_arg1)*(-0.606772663729)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.088457395972133118, 0.06142039915553054])+(1.-msk_ref)*numpy.array([0.23236167639977173, 
-0.161340346458065])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_expandedData_rank0(self):
-      arg0=Data(numpy.array([[-0.87174569179957362, -0.56872338095146957, 0.26797673469459404, -0.48582324665863297, 
--0.94500956212991372], [-0.35643086869262919, -0.44329490689890672, 0.81325997657563187, -0.71848389647741118, 
--0.73924415246545094], [0.75438515837096842, 0.27031972889573064, 0.84218967617015683, -0.039217444296754778, 
--0.94152621651398638], [-0.14387273018259394, -0.68139020051338228, 0.90325594873061155, -0.98700102624342323, 
--0.37376869960732795]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.0527910607114)+(1.-msk_arg1)*(-0.405654453504)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.046020379740734634, 0.03002351053182907, -0.01414677607051794, 0.025647124509388729, 
-0.049888057167299285], [0.018816363628586782, 0.023402008343175927, -0.042932856797595058, 0.03792952699913682, 
-0.039025482933386632], [-0.039824792695377205, -0.014270465219636713, -0.044460086325253584, 0.0020703304828178165, 
-0.049704167657409905], [0.0075951940337911118, 0.035971311443487773, -0.04768383962741439, 0.05210483109867816, 
-0.019731646113009465]])+(1.-msk_ref)*numpy.array([[0.35362752220125299, 0.23070517229470502, -0.10870595586426984, 
-0.1970763636227523, 0.38334733748168076], [0.14458776925139519, 0.17982455319909638, -0.32990253135430569, 0.29145619237682907, 
-0.29987768267425641], [-0.30601969915035704, -0.10965640189649449, -0.34163799283335194, 0.015908730934015996, 
-0.38193430281948687], [0.058362613736320623, 0.27640896941210458, -0.36640979825637765, 0.40038136190847112, 
-0.1516209375760387]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_expandedData_rank0(self):
-      arg0=Data(numpy.array([[[-0.77328627374203962, 0.079523600460909227], [-0.66474016911635925, -0.43502454702821791]], 
-[[-0.0082597579492271755, 0.35076593869127404], [-0.44497667487629888, 0.1174660507470533]], [[-0.94247002006062308, 
--0.3077056658142272], [0.84316414408989693, -0.49022494198661248]], [[-0.41017795822495784, 0.50503730298836658], 
-[0.83082960996619759, 0.8780217163336772]], [[-0.82118917871286246, 0.10197202621331503], [0.93307721066846172, 
-0.4777386015723819]], [[0.69942467243314588, -0.83580669402499019], [-0.72490505988022047, 
-0.23436457019346668]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.871700854773)+(1.-msk_arg1)*(0.012858077492)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.6740743058054266, -0.069320790496428114], [0.57945457362090469, 0.37921126949188244]], 
-[[0.0072000380645622156, -0.30576296858255642], [0.38788654784386817, -0.10239525684305484]], [[0.82155192208509165, 
-0.26822729190886141], [-0.7349869051173944, 0.42732950096094091]], [[0.35755247679387892, -0.44024144870738124], 
-[-0.72423488117853474, -0.76537228063762108]], [[0.71583130901461889, -0.088889102413116095], [-0.81336420210922156, 
--0.41644514734886523]], [[-0.60968908480953632, 0.72857340960686301], [0.63190036032710706, 
--0.20429579616623125]]])+(1.-msk_ref)*numpy.array([[[-0.009942974831298395, 0.0010225206171716164], [-0.008547280606563382, 
--0.0055935793366241457]], [[-0.00010620460777657516, 0.0045101756212571021], [-0.0057215445677053622, 0.0015103875831883589]], 
-[[-0.012118352551854714, -0.0039565032957760695], [0.01084146990320918, -0.0063033502925898544]], [[-0.0052740999723792188, 
-0.0064938087781903336], [0.010682871507618564, 0.011289671268303747]], [[-0.010558914095506591, 0.0013111642150701356], 
-[0.011997579080822433, 0.006142799959951809]], [[0.0089932566379832025, -0.010746867240130867], [-0.0093208854343046401, 
-0.0030134778049339369]]])
+   def test_generalTensorProduct_array_rank3_constData_rank3_offset2(self):
+      arg0=numpy.array([[[-1.0, -6.0, 0.0], [-2.0, 0.0, 7.0]], [[-5.0, 5.0, 3.0], [-1.0, -4.0, -3.0]]])
+      arg1=Data(numpy.array([[[1.0, 0.0], [-3.0, -4.0], [-2.0, -5.0]], [[6.0, 0.0], [3.0, -1.0], [3.0, 
+-6.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[26.0, -18.0], [-53.0, -13.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=outer(arg0,arg1) 
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank4_expandedData_rank0(self):
-      arg0=Data(numpy.array([[[[-0.83504325403320423, 0.72986446282641149, 0.86742233864227591, -0.0059036297732719678], 
-[0.29820188050100183, -0.17552230466048235, 0.76126162856103852, 0.46771314116943086], [-0.26052995472384133, 
--0.34668561183634683, 0.96178401739697628, -0.80594576244112615]], [[0.57742472247806353, -0.77451120347821623, 
-0.29491164193254282, -0.62602578123637809], [0.14785524502051084, 0.78988617504439018, -0.12588877364162165, 
-0.2155924612104001], [0.8585041497903676, 0.54583569168921997, 0.80556935761893178, -0.46444010468878583]]], 
-[[[0.28107157933058624, 0.047773080942044244, -0.83081398509678506, 0.055612189618716279], [0.38529122516130831, 
-0.049472585315569528, -0.54818234037853664, -0.016806731189929369], [-0.28894913844719183, 0.99248029239537039, 
-0.058901579190173026, -0.54663411835204334]], [[0.45320846987436503, -0.98170747061466113, 0.24373236322199898, 
--0.46104918112498638], [0.68019717040089955, -0.47457064947511274, -0.72411938225628325, -0.72698055420509688], 
-[-0.67048338311954292, -0.41460665211487036, -0.4987048196003625, -0.47176296727437927]]], [[[0.1963630166123862, 
--0.31000614317997255, 0.91699734932975696, 0.23826455365961907], [-0.4962649474436871, 0.36154518492720933, 
--0.41701367639334053, -0.6258638542675814], [0.5472178354039805, 0.61426522480721935, -0.16313628065434438, 
-0.5905860497489801]], [[0.054834609730624484, 0.78207162444878109, 0.66991726836949272, 0.68954181735556452], 
-[-0.0052733385953620537, 0.25102504584418339, 0.58525398946693841, -0.11076231426807115], [-0.82109331075278047, 
--0.72719539932325872, -0.75213299670452183, 0.5381412754258712]]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.767088501143)+(1.-msk_arg1)*(0.319392052905)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.64055207812595427, 0.5598706368270967, 0.66538970160711142, -0.0045286065140827374], 
-[0.22874723355155543, -0.13464114159918497, 0.58395504163061207, 0.35877737242457119], [-0.19984953247198076, 
--0.26593854635140807, 0.73777346032839741, -0.61823172691356432]], [[0.44293586488864523, -0.59411863819461253, 
-0.22622332937967313, -0.48021717820552656], [0.11341805828892357, 0.60591260208842612, -0.096567830683489536, 
-0.16537849792762915], [0.65854866148779023, 0.41870428260826925, 0.61794299110268414, -0.35626666377644667]]], 
-[[[0.21560677650261212, 0.036646181054818809, -0.63730785455658556, 0.04265947117990472], [0.29555246841256128, 
-0.037949851317392397, -0.42050436983406647, -0.01289225023759724], [-0.22164956151803497, 0.7613202199075908, 
-0.045182724095949089, -0.41931674652032708]], [[0.3476510058612664, -0.75305651219474512, 0.18696429318401911, 
--0.35366552530240108], [0.52177142792457676, -0.36403768819235283, -0.555463651583611, -0.55765842368533891], 
-[-0.51432009339849838, -0.31803999533473809, -0.38255073258006228, -0.36188394746130614]]], [[[0.15062781209312515, 
--0.23780214771706604, 0.70341812224952238, 0.18276999934227742], [-0.38067913470441744, 0.27733715400130349, 
--0.31988639598072471, -0.48009296588973766], [0.41976450915878921, 0.47119579060167477, -0.12513996500919464, 
-0.4530317676979459]], [[0.042062998589029399, 0.59991815018493377, 0.51388583328340731, 0.52893959915074173], 
-[-0.0040451173991361278, 0.19255842616598259, 0.44894160556819007, -0.084964497635031278], [-0.6298512370439433, 
--0.55782322890500768, -0.57695257310230985, 0.41280198436964627]]]])+(1.-msk_ref)*numpy.array([[[[-0.26670617917053724, 
-0.23311290912488289, 0.27704780147502889, -0.0018855724328792466], [0.095243310793489563, -0.056060429216212543, 
-0.24314091434427901, 0.14938386032897505], [-0.083211197082619412, -0.11072862927720316, 0.30718617176810004, 
--0.25741267159654352]], [[0.18442486751064571, -0.24737272327720133, 0.094192434742560657, -0.19994765944084364], 
-[0.047223790239943692, 0.25228336700908505, -0.040207873851150808, 0.068858518776934732], [0.27419940282941913, 
-0.17433558211770256, 0.25729245088765929, -0.14833847848818729]]], [[[0.089772028735781384, 0.015258342395699169, 
--0.26535538428264493, 0.01776209140889061], [0.12305895537073776, 0.015801150586481249, -0.17508508306003137, 
--0.0053679363773820998], [-0.092288058513918331, 0.31699031805638828, 0.018812696296924055, -0.17459059324863618]], 
-[[0.14475118358732478, -0.31354956439226267, 0.077846179848978347, -0.14725544444989982], [0.21724957063484182, 
--0.15157409398454316, -0.23127797604748224, -0.23219181162992941], [-0.21414706417356219, -0.13242206976723658, 
--0.15928235612601679, -0.15067734260254473]]], [[[0.06271678699054288, -0.099013498483561571, 0.29288166591131454, 
-0.07609980492795361], [-0.15850308034906932, 0.11547465883199276, -0.1331908541929305, -0.19989594125385893], 
-[0.17477702783617033, 0.1961914311796239, -0.052104431581555574, 0.18862849084666464]], [[0.017513738572134958, 
-0.2497874616518197, 0.2139662516213636, 0.22023417660936923], [-0.0016842624396383862, 0.080175404722865939, 
-0.18692547316696756, -0.035376602938641172], [-0.26225067814828773, -0.23226043145327582, -0.24022530187540778, 
-0.17187804671144227]]]])
+   def test_generalTensorProduct_array_rank4_constData_rank4_offset3(self):
+      arg0=numpy.array([[[[-5.0, -5.0, 6.0], [-7.0, -7.0, 5.0], [1.0, 6.0, -7.0], [0.0, 1.0, -4.0]], [[-6.0, -7.0, 3.0], [2.0, 
+-3.0, -7.0], [-3.0, -2.0, -4.0], [4.0, -4.0, -4.0]]], [[[-3.0, 0.0, 6.0], [-2.0, 0.0, 7.0], [-4.0, -6.0, -3.0], [1.0, -5.0, 
+-6.0]], [[5.0, 7.0, -5.0], [3.0, -2.0, 6.0], [-7.0, -1.0, -7.0], [-4.0, 6.0, 5.0]]]])
+      arg1=Data(numpy.array([[[[7.0, -7.0], [5.0, 4.0], [4.0, -4.0]], [[4.0, 0.0], [6.0, -7.0], [-5.0, 6.0]], [[-4.0, -6.0], 
+[-3.0, -5.0], [0.0, 1.0]], [[1.0, -5.0], [-7.0, -4.0], [0.0, -5.0]]], [[[4.0, 1.0], [-2.0, -4.0], [-7.0, 7.0]], [[1.0, 4.0], 
+[-4.0, 0.0], [3.0, 2.0]], [[2.0, 4.0], [1.0, 5.0], [4.0, -2.0]], [[7.0, 3.0], [-3.0, 5.0], [-4.0, 2.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-166.0, 50.0], [-9.0, 110.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_array_rank1(self):
-      arg0=Data(0.094765405644,self.functionspace)
-      arg1=numpy.array([0.43204953548936986, -0.029784398113217314])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([0.040943349488930969, -0.0028225305690599833]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_constData_rank2_offset0(self):
+      arg0=numpy.array([-4.0, -3.0])
+      arg1=Data(numpy.array([[5.0, -4.0, 2.0, 7.0, 4.0], [3.0, -1.0, 7.0, -6.0, 2.0], [6.0, 0.0, 6.0, -4.0, 6.0], [-6.0, -5.0, 
+-6.0, 3.0, -4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-20.0, 16.0, -8.0, -28.0, -16.0], [-12.0, 4.0, -28.0, 24.0, -8.0], [-24.0, 0.0, -24.0, 16.0, 
+-24.0], [24.0, 20.0, 24.0, -12.0, 16.0]], [[-15.0, 12.0, -6.0, -21.0, -12.0], [-9.0, 3.0, -21.0, 18.0, -6.0], [-18.0, 0.0, 
+-18.0, 12.0, -18.0], [18.0, 15.0, 18.0, -9.0, 12.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_array_rank1(self):
-      arg0=Data(numpy.array([-0.77657105275802074, 0.22498494171069083]),self.functionspace)
-      arg1=numpy.array([0.22091855299981256, -0.068451744610724008])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[-0.17155895327684303, 0.053157643375473115], [0.049703347769472994, 
--0.015400611771238836]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_constData_rank3_offset1(self):
+      arg0=numpy.array([[0.0, 6.0, 4.0], [-5.0, -3.0, -4.0]])
+      arg1=Data(numpy.array([[[0.0, 7.0, -6.0, 2.0, -7.0], [6.0, -4.0, -2.0, -2.0, 6.0], [-7.0, -5.0, -6.0, 7.0, -5.0], [-1.0, 
+0.0, 3.0, -2.0, -7.0]], [[-7.0, -1.0, -4.0, 3.0, 0.0], [6.0, -6.0, 2.0, 4.0, 5.0], [0.0, -3.0, -6.0, 1.0, -1.0], [-7.0, -3.0, 
+0.0, 5.0, -5.0]], [[-6.0, -7.0, -3.0, 4.0, 1.0], [0.0, 3.0, -1.0, 3.0, 0.0], [-7.0, 6.0, -5.0, -4.0, -7.0], [6.0, 3.0, 3.0, 
+7.0, 5.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-66.0, -34.0, -36.0, 34.0, 4.0], [36.0, -24.0, 8.0, 36.0, 30.0], [-28.0, 6.0, -56.0, -10.0, 
+-34.0], [-18.0, -6.0, 12.0, 58.0, -10.0]], [[45.0, -4.0, 54.0, -35.0, 31.0], [-48.0, 26.0, 8.0, -14.0, -45.0], [63.0, 10.0, 
+68.0, -22.0, 56.0], [2.0, -3.0, -27.0, -33.0, 30.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_array_rank1(self):
-      arg0=Data(numpy.array([[-0.19358546521433406, 0.53808130011597055, -0.33754340271808458, -0.26681469630310262, 
--0.027436007634214166], [0.48475778158319649, -0.51694798347645632, -0.36535005917852104, -0.3145900258061618, 
--0.45174258519432553], [-0.14077024477916988, 0.20624720031697841, -0.39314518635241624, -0.82591162366689486, 
--0.8368370323312504], [-0.16007342247871792, 0.84886675840320991, -0.98705708408575532, 0.56621771577631375, 
--0.89012344094023943]]),self.functionspace)
-      arg1=numpy.array([0.093504543477614499, -0.20572310259722482])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.018101120548767929, 0.03982500252161994], [0.050313046321185106, -0.11069575450940593], 
-[-0.031561841775035078, 0.069440476068388893], [-0.024948386370939966, 0.054889947142010558], [-0.0025653913686855419, 
-0.0056442206133916839]], [[0.045327055064157948, -0.099725874835443026], [-0.048336985196639454, 0.10634814304215551], 
-[-0.034161890493007052, 0.075160947708285047], [-0.029415596745616123, 0.064718436154984627], [-0.042239984197992783, 
-0.092933886201467808]], [[-0.013162657473308326, 0.028959691509341617], [0.019285050309175173, -0.042429813951200129], 
-[-0.03676086117030436, 0.080879047507583193], [-0.077226489323828348, 0.16990910169186516], [-0.078248064673295287, 
-0.17215671065943897]], [[-0.014967592291771834, 0.032930801115678199], [0.079372898717814624, -0.1746315032303572], 
-[-0.092294322033783904, 0.2030604457786914], [0.0529439290226019, -0.11648406523501688], [-0.083230585983840435, 
-0.18311895596474367]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_constData_rank4_offset2(self):
+      arg0=numpy.array([[[2.0, 4.0, 4.0], [7.0, -3.0, 1.0]], [[4.0, 3.0, -4.0], [-3.0, -5.0, 0.0]]])
+      arg1=Data(numpy.array([[[[-5.0, -4.0, 0.0, 2.0, 2.0], [-2.0, 0.0, 0.0, 7.0, 5.0], [-4.0, -1.0, 1.0, 4.0, -2.0], [0.0, 
+6.0, -4.0, 7.0, 0.0]], [[0.0, 5.0, 1.0, 0.0, 1.0], [3.0, 3.0, -6.0, 2.0, -4.0], [-6.0, 3.0, 2.0, -4.0, 1.0], [-7.0, -1.0, 5.0, 
+3.0, -3.0]], [[1.0, 4.0, 2.0, 7.0, 3.0], [5.0, -3.0, 3.0, 3.0, -7.0], [-3.0, 2.0, 7.0, -4.0, -6.0], [5.0, -7.0, 4.0, 3.0, 
+2.0]]], [[[2.0, 1.0, 0.0, -6.0, 0.0], [-7.0, 1.0, -4.0, 3.0, -6.0], [-1.0, 4.0, 2.0, 3.0, -1.0], [0.0, -2.0, 0.0, 6.0, 3.0]], 
+[[0.0, -3.0, 5.0, -7.0, -2.0], [-1.0, 7.0, -2.0, -1.0, 1.0], [2.0, -7.0, 3.0, 7.0, 3.0], [-2.0, 5.0, 0.0, -4.0, 3.0]], [[7.0, 
+-1.0, -2.0, 4.0, 6.0], [2.0, 1.0, 2.0, 0.0, 6.0], [2.0, 6.0, -1.0, -2.0, -2.0], [3.0, -4.0, 5.0, 5.0, 
+-7.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[15.0, 43.0, -5.0, 15.0, 32.0], [-16.0, -13.0, -32.0, 58.0, -73.0], [-55.0, 73.0, 42.0, -26.0, 
+-42.0], [1.0, -53.0, 33.0, 97.0, 1.0]], [[-30.0, -5.0, -30.0, 33.0, 9.0], [7.0, -17.0, -8.0, 18.0, 49.0], [-29.0, 20.0, -39.0, 
+-24.0, 7.0], [-31.0, 30.0, -17.0, 27.0, -41.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_array_rank1(self):
-      arg0=Data(numpy.array([[[0.52793389561713155, 0.15497295848870052], [-0.93668753153367779, 0.10326774528137728]], 
-[[-0.67071187831479984, -0.60665708959908526], [0.47550232291478522, 0.86657992322827249]], [[-0.48175286497054448, 
--0.85598675032131721], [0.16819608414084075, 0.72547085781731191]], [[0.078203982287778251, 0.094239263802861961], 
-[-0.63867238064066001, 0.47206552186393114]], [[-0.26618052116044821, 0.49845726599722706], [-0.10756974178355838, 
-0.8587717008057989]], [[0.29948403844539584, 0.87726990965275875], [-0.26732263279729618, 
-0.59819481827892873]]]),self.functionspace)
-      arg1=numpy.array([0.44042322360500719, -0.49121081330391614])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.23251434815804645, -0.25932683823679598], [0.068253689949198448, -0.076124392979348615]], 
-[[-0.4125389421486792, 0.46011104417629545], [0.045481513271244951, -0.050726233147726979]]], [[[-0.29539708755757343, 
-0.32946092723961007], [-0.26718587102406083, 0.2979965223785534]], [[0.20942226588979879, -0.23357188276687302], 
-[0.38166192329957543, -0.42567342888180493]]], [[[-0.21217514977127494, 0.23664221661367285], [-0.37699644393968895, 
-0.42046994780271041]], [[0.074077461575048104, -0.082619735285356294], [0.31951421383139034, -0.35635913009673148]]], 
-[[[0.034442849977932184, -0.038414641743184604], [0.041505160354219132, -0.046291345417766132]], [[-0.28128614870924368, 
-0.31372277952924693], [0.20790861889209256, -0.23188368892751923]]], [[[-0.11723208319034543, 0.13075075028488403], 
-[0.21953215591983727, -0.24484759902774436]], [[-0.047376212438673015, 0.052839420348393965], [0.37822300080964472, 
--0.42183794559520382]]], [[[0.13189972563036714, -0.14710979809630417], [0.3863700415809414, -0.43092446580758464]], 
-[[-0.11773509567916281, 0.13131176787090398], [0.26345889021021729, -0.29383976320098087]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_constData_rank3_offset0(self):
+      arg0=numpy.array([-4.0, -3.0])
+      arg1=Data(numpy.array([[[3.0, 0.0], [7.0, -4.0]], [[-4.0, 3.0], [-4.0, -3.0]], [[4.0, -1.0], [1.0, 2.0]], [[4.0, 5.0], 
+[-7.0, 1.0]], [[-5.0, 4.0], [4.0, 2.0]], [[0.0, -4.0], [-4.0, 2.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-12.0, 0.0], [-28.0, 16.0]], [[16.0, -12.0], [16.0, 12.0]], [[-16.0, 4.0], [-4.0, -8.0]], 
+[[-16.0, -20.0], [28.0, -4.0]], [[20.0, -16.0], [-16.0, -8.0]], [[0.0, 16.0], [16.0, -8.0]]], [[[-9.0, 0.0], [-21.0, 12.0]], 
+[[12.0, -9.0], [12.0, 9.0]], [[-12.0, 3.0], [-3.0, -6.0]], [[-12.0, -15.0], [21.0, -3.0]], [[15.0, -12.0], [-12.0, -6.0]], 
+[[0.0, 12.0], [12.0, -6.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_constData_rank1(self):
-      arg0=Data(-0.919108703748,self.functionspace)
-      arg1=Data(numpy.array([-0.93688283577102016, 0.53170944224710404]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([0.86109716874912567, -0.4886987762342358]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_constData_rank4_offset1(self):
+      arg0=numpy.array([[1.0, -4.0, 7.0], [-3.0, 5.0, 1.0]])
+      arg1=Data(numpy.array([[[[-1.0, 4.0], [0.0, -6.0]], [[4.0, 2.0], [7.0, -2.0]], [[-5.0, 3.0], [5.0, 2.0]], [[0.0, 1.0], 
+[0.0, 3.0]], [[-3.0, 5.0], [-4.0, 2.0]], [[7.0, -6.0], [4.0, -3.0]]], [[[-3.0, 2.0], [1.0, -3.0]], [[2.0, -4.0], [5.0, -1.0]], 
+[[5.0, -7.0], [-3.0, 4.0]], [[-5.0, -5.0], [3.0, -5.0]], [[0.0, -6.0], [0.0, -1.0]], [[3.0, -2.0], [2.0, 5.0]]], [[[-1.0, 1.0], 
+[-5.0, -5.0]], [[-5.0, -6.0], [4.0, -4.0]], [[-2.0, 0.0], [3.0, -7.0]], [[1.0, 6.0], [1.0, 4.0]], [[2.0, 3.0], [2.0, 3.0]], 
+[[-1.0, 0.0], [4.0, -2.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[4.0, 3.0], [-39.0, -29.0]], [[-39.0, -24.0], [15.0, -26.0]], [[-39.0, 31.0], [38.0, -63.0]], 
+[[27.0, 63.0], [-5.0, 51.0]], [[11.0, 50.0], [10.0, 27.0]], [[-12.0, 2.0], [24.0, -37.0]]], [[[-13.0, -1.0], [0.0, -2.0]], 
+[[-7.0, -32.0], [8.0, -3.0]], [[38.0, -44.0], [-27.0, 7.0]], [[-24.0, -22.0], [16.0, -30.0]], [[11.0, -42.0], [14.0, -8.0]], 
+[[-7.0, 8.0], [2.0, 32.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_constData_rank1(self):
-      arg0=Data(numpy.array([-0.29779080932637259, -0.053805000864227903]),self.functionspace)
-      arg1=Data(numpy.array([0.5272408344369186, 0.62962043017047886]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[-0.15700747479688201, -0.18749517746888575], [-0.028368193552534646, 
--0.033876727789458161]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_expandedData_rank0_offset0(self):
+      arg0=numpy.array([-4.0, -2.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-7.0)+(1-msk_arg1)*(4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([28.0, 14.0])+(1.-msk_ref)*numpy.array([-16.0, -8.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_constData_rank1(self):
-      arg0=Data(numpy.array([[-0.61169447974141988, 0.55875640915843894, 0.63173687966141756, -0.037640820319297719, 
--0.99090884499283916], [0.41618393390700192, 0.12956118624983004, -0.71693208691742694, 0.71158379483885348, 
--0.61635924994323665], [0.4413481405572679, 0.08995759548061022, 0.33046412157090854, 0.4466056588564935, 0.23129456001205373], 
-[-0.64922128479527008, -0.03976505531208363, 0.086830616590950704, -0.25200669262905184, 
-0.37855163655036073]]),self.functionspace)
-      arg1=Data(numpy.array([0.7021467630050735, 0.76928149433839033]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.42949929889851046, -0.47056524345402373], [0.39232900399893633, 0.42984096540855693], 
-[0.44357200512519002, 0.48598349081460718], [-0.026429380144050489, -0.028956386503352194], [-0.6957634379448181, 
--0.76228783702921965]], [[0.29222220200751886, 0.32016259859560831], [0.090970967536415606, 0.09966902296652376], 
-[-0.50339154412354337, -0.55152258716297897], [0.49963625815296731, 0.5474082450406158], [-0.43277465219587863, 
--0.47415376484562249]], [[0.30989116825059387, 0.33952095709136498], [0.063163434474430291, 0.069202713478412253], 
-[0.23203431325032853, 0.25421993326729203], [0.31358271770583507, 0.34356546862510468], [0.16240272661314625, 
-0.1779306247584132]], [[-0.45584862359299383, -0.49943392012359505], [-0.027920904868097222, -0.030590521172928441], 
-[0.060967836369070667, 0.066797186485410387], [-0.17694568348510326, -0.19386408508895242], [0.26579880623410884, 
-0.29121276864970469]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[4.0, -1.0, -3.0], [-5.0, 6.0, 7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([5.0, -3.0, -1.0])+(1.-msk_arg1)*numpy.array([-5.0, -3.0, 1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([26.0, -50.0])+(1.-msk_ref)*numpy.array([-20.0, 14.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_constData_rank1(self):
-      arg0=Data(numpy.array([[[0.38252460007169198, -0.051755825978095027], [0.011862285227803859, 0.6098177254103021]], 
-[[-0.83769475721431519, -0.45494251353843351], [0.037872621083969049, 0.33679832205419591]], [[0.80112411616460832, 
--0.0098861829681524682], [0.75418188513559348, -0.019244760229890856]], [[-0.091164744830903643, 0.137855274995063], 
-[0.9289097954794594, 0.12542265606508685]], [[-0.22835257905635764, -0.75524782434503912], [-0.40829474194126947, 
--0.792401786421711]], [[-0.84502099168268718, 0.21593138093987796], [0.75161492138409214, 
-0.14572990444308442]]]),self.functionspace)
-      arg1=Data(numpy.array([-0.55350465181593345, -0.6950619290155835]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.21172914557371106, -0.26587828642174482], [0.02864709043745153, 0.035973504242129577]], 
-[[-0.0065658300547568656, -0.0082450228529704107], [-0.33753694777441379, -0.42386108457158]]], [[[0.46366794491994245, 
-0.58224973387562284], [0.25181279755235625, 0.31621322105122179]], [[-0.020962671946439068, -0.026323817067499786], 
-[-0.18641943798079832, -0.23409569141620115]]], [[[-0.44342592497903893, -0.55683087356227712], [0.0054720482615758436, 
-0.0068715094044450612]], [[-0.41744318173786099, -0.52420311591095481], [0.010652064310326861, 0.013376300168830322]]], 
-[[[0.050460110345517742, 0.063365143400381338], [-0.076303535987132104, -0.095817953363042219]], [[-0.51415589291526809, 
--0.64564983432742418], [-0.069422023575135466, -0.087176513266857339]]], [[[0.12639421476185966, 0.15871918409459548], 
-[0.41803318404884215, 0.5249440096740855]], [[0.22599303897647877, 0.28379013094061861], [0.4385980748916728, 
-0.55076831422566885]]], [[[0.46772304977848056, 0.5873419205376299], [-0.11951902382326084, -0.15008568217107038]], 
-[[-0.41602235536036208, -0.52241891713412325], [-0.080662180017938692, -0.10129130849746691]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[[1.0, 1.0, 7.0], [-4.0, -3.0, -3.0]], [[-4.0, -1.0, 0.0], [4.0, -4.0, -4.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, -2.0, -1.0], [-7.0, 6.0, -4.0]])+(1.-msk_arg1)*numpy.array([[0.0, 7.0, -6.0], [3.0, 
+-6.0, 1.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([6.0, -6.0])+(1.-msk_ref)*numpy.array([-32.0, 25.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_expandedData_rank1(self):
-      arg0=Data(0.94577337941,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.21258989853496657, 0.94855972467563565])+(1.-msk_arg1)*numpy.array([0.092694441816000728, 
-0.70626041960124941])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.20106186676583832, 0.89712253637866823])+(1.-msk_ref)*numpy.array([0.087667935488839999, 
-0.66796230378977828])
+   def test_generalTensorProduct_array_rank4_expandedData_rank3_offset3(self):
+      arg0=numpy.array([[[[0.0, 6.0, -1.0], [3.0, 3.0, -1.0], [-5.0, -4.0, -7.0], [-2.0, -6.0, 3.0]], [[1.0, 7.0, 3.0], [0.0, 
+5.0, 5.0], [-2.0, 7.0, 2.0], [5.0, 6.0, 1.0]]], [[[-2.0, 0.0, -1.0], [0.0, 7.0, -5.0], [-5.0, 1.0, -6.0], [4.0, -2.0, 1.0]], 
+[[-3.0, -1.0, 1.0], [-4.0, 4.0, -1.0], [-5.0, 7.0, -5.0], [3.0, 0.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-5.0, 7.0, -2.0], [-5.0, -6.0, 2.0], [3.0, -6.0, -1.0], [3.0, 0.0, 0.0]], [[4.0, -7.0, 0.0], 
+[-4.0, 5.0, -4.0], [4.0, -4.0, -5.0], [0.0, 4.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 2.0, 5.0], [-6.0, -2.0, 6.0], [0.0, 
+-6.0, -2.0], [-4.0, 6.0, -3.0]], [[0.0, -2.0, 4.0], [5.0, 4.0, 6.0], [-2.0, 6.0, 7.0], [-5.0, -7.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-41.0, -33.0])+(1.-msk_ref)*numpy.array([16.0, -61.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_expandedData_rank1(self):
-      arg0=Data(numpy.array([0.80743269872209877, -0.67335052968308773]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.8696787996472739, -0.85444435201596103])+(1.-msk_arg1)*numpy.array([0.50146272797380598, 
-0.012381584608076812])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.70220710022059385, -0.6899063090561024], [0.58559868039664387, 
-0.57534055701467002]])+(1.-msk_ref)*numpy.array([[0.40489740375643585, 0.009997296274555461], [-0.33766019349748838, 
--0.008337146554164487]])
+   def test_generalTensorProduct_array_rank1_expandedData_rank1_offset0(self):
+      arg0=numpy.array([-3.0, 3.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-1.0, -3.0])+(1.-msk_arg1)*numpy.array([-6.0, 4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[3.0, 9.0], [-3.0, -9.0]])+(1.-msk_ref)*numpy.array([[18.0, -12.0], [-18.0, 12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_expandedData_rank1(self):
-      arg0=Data(numpy.array([[-0.55391791827152037, -0.3590000067754664, 0.024151024496113394, -0.54258909914201925, 
--0.59450570915289913], [-0.99285035958068391, -0.46489595794231819, -0.99762597209037041, 0.57921432631499536, 
--0.24793237890852571], [0.056552525067596671, -0.013315620681917606, -0.91314148739809764, -0.24033483034116565, 
--0.71124375711070598], [-0.63975316839291207, 0.60169935268198982, 0.20660245627981144, -0.72877339290849275, 
-0.80719704598441488]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.54261649421559821, 0.91431185496179834])+(1.-msk_arg1)*numpy.array([0.25664152255339001, 
--0.95718588355394463])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.30056499889569466, -0.50645371935141159], [-0.19479932509987957, -0.32823796212617484], 
-[0.013104744243796084, 0.022081568006269269], [-0.29441779477604213, -0.49609564571859072], [-0.32258860369170422, 
--0.54356361772096662]], [[-0.53873698139636672, -0.90777485396770363], [-0.2522602148736629, -0.42505988567048314], 
-[-0.54132830751410499, -0.91214125310001382], [0.3142912471444923, 0.52958252511351178], [-0.13453219824587753, 
--0.2266875132649456]], [[0.030686332891219043, 0.051706644097327913], [-0.0072252754127268446, -0.012174629845651772], 
-[-0.49548563261477258, -0.83489608718553021], [-0.1304096430776239, -0.21974098454116026], [-0.38593259401614172, 
--0.6502985988938883]], [[-0.34714062139668322, -0.58493390611101115], [0.32649199332409612, 0.55014085127998347], 
-[0.11210590052288269, 0.18889907504085823], [-0.39544446353761303, -0.66632615271696749], [0.43799843123325022, 
-0.73802982843369436]]])+(1.-msk_ref)*numpy.array([[[-0.14215833791480725, 0.53020241201708695], [-0.09213430833553303, 
-0.34362973868124691], [0.0061981556979067605, -0.023117019721045257], [-0.13925089252468009, 0.51935862626899254], 
-[-0.15257485036368287, 0.5690524724933822]], [[-0.25480662795046749, 0.95034234867208855], [-0.11931160647523331, 
-0.44499184826367533], [-0.25603224841607841, 0.95491349755168409], [0.14865044659021648, -0.55441577670092168], 
-[-0.063629743213368034, 0.23731737316718857]], [[0.014513726137586764, -0.054131278674034118], [-0.0034173411655507436, 
-0.012745524147490483], [-0.23435002163251498, 0.87404614142491133], [-0.061679896781367427, 0.23004510692889601], 
-[-0.1825346807314851, 0.68079248407223825]], [[-0.16418722719471227, 0.61236270174460505], [0.15442103799169507, 
--0.57593812653074694], [0.053022768942921003, -0.19775695465860654], [-0.18703351315243549, 0.69757160400172169], 
-[0.207160278882039, -0.77263761766272621]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank3_expandedData_rank1(self):
-      arg0=Data(numpy.array([[[-0.33561040691589383, 0.39295988096864809], [-0.74025647782746185, 0.24467768682694735]], 
-[[-0.36609502502031499, -0.85371902689107326], [-0.87097730147411467, -0.71741878239906942]], [[-0.3037948221187714, 
--0.87597603983988059], [-0.01638418537184827, -0.62994381943706013]], [[-0.36032580215061172, -0.83457235834116617], 
-[0.33584754764220115, -0.67422681043058752]], [[0.3773462048543037, 0.10333686426053723], [-0.22292593411219541, 
--0.46206698428249293]], [[0.26067951497054764, -0.11270196798769594], [0.27159358928923694, 
--0.66048112318849106]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.23855386295122938, 0.34303848989880215])+(1.-msk_arg1)*numpy.array([-0.87981738521624453, 
--0.73300661027850178])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.080061159016420455, -0.11512728718275073], [0.093742097589926285, 0.13480036415829807]], 
-[[-0.17659104236041209, -0.25393646429173861], [0.05836880737053942, 0.08393386420104805]]], [[[-0.087333382425823114, 
--0.12558468454243304], [-0.20365797173983, -0.29285848578258861]], [[-0.20777499980948755, -0.29877873823381401], 
-[-0.17114302189506544, -0.2461022557392141]]], [[[-0.0724714283610145, -0.10421331701869856], [-0.20896746815652353, 
--0.3004934978942056]], [[-0.003908510711763429, -0.005620406208180875], [-0.15027553156896242, -0.21609497654077278]]], 
-[[[-0.085957112024028823, -0.12360561904132039], [-0.19909045999460284, -0.28629044151663563]], [[0.080117729852744138, 
-0.11520863557939669], [-0.16083941013350289, -0.23128574689939468]]], [[[0.090017394837980089, 0.12944427228226438], 
-[0.024651408154617992, 0.035448521866812188]], [[-0.053179842734475458, -0.076472175797127381], [-0.11022786404281368, 
--0.15850676052035992]]], [[[0.06218610528847697, 0.089423107163048854], [-0.026885489825670659, -0.038661112907122354]], 
-[[0.064789699877737111, 0.093167054735975321], [-0.15756032334298134, 
--0.22657044710524468]]]])+(1.-msk_ref)*numpy.array([[[[0.29527587066410155, 0.246004646747608], [-0.34573293496872265, 
--0.28804219032427225]], [[0.65129051871154442, 0.54261289154901071], [-0.21527168264484398, -0.1793503618318055]]], 
-[[[0.32209676765404915, 0.26835007332996441], [0.7511168419486608, 0.62578169003168671]], [[0.76630097196565627, 
-0.63843211938305755], [0.63119751723537121, 0.52587270983647194]]], [[[0.26728396603877158, 0.22268361278144105], 
-[0.77069894888400459, 0.64209622764821672]], [[0.014415091132757789, 0.012009716181593114], [0.55423552405024834, 
-0.46175298375145202]]], [[[0.31702090507409708, 0.264121194830302], [0.73427127008947946, 0.61174705541979335]], 
-[[-0.29548451119784952, -0.2461784724675575], [0.59319646939572812, 0.49421270887261098]]], [[[-0.33199575127618686, 
--0.2765972625217103], [-0.090917569710151858, -0.075746604588426053]], [[0.19613411244748058, 0.163406183306749], 
-[0.40653456590617848, 0.33869815387051988]]], [[[-0.22935036924082611, -0.1910798076376051], [0.099157150783659539, 
-0.082611287526377225]], [[-0.23895276156995107, -0.19907989625827519], [0.58110277478838646, 0.4841370292613334]]]])
+   def test_generalTensorProduct_array_rank2_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[-7.0, 0.0, 1.0], [3.0, 0.0, -4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 3.0], [5.0, -5.0], [0.0, -2.0]])+(1.-msk_arg1)*numpy.array([[0.0, 1.0], [3.0, -2.0], 
+[-3.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, -23.0], [0.0, 17.0]])+(1.-msk_ref)*numpy.array([[-3.0, -1.0], [12.0, -21.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_array_rank2(self):
-      arg0=Data(-0.53334445403,self.functionspace)
-      arg1=numpy.array([[-0.14622035743864048, 0.50649767048635241, -0.024778745805814406, -0.014030242656037251, 
-0.47192766812552156], [0.93282861324086097, 0.32755079828488132, -0.33403983401182868, -0.2189428902004753, 
-0.20544718376209503], [0.009457548649367542, 0.38281810872422306, -0.0070076677237429497, 0.017701352393783898, 
-0.67621360244218298], [0.6183268723103903, 0.30250428096384541, 0.31053406436293884, 0.97314794751525824, 0.69542049607892209]])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[0.077985816706134276, -0.27013772353284116, 0.013215606653341953, 0.007482952109287914, 
--0.25170000449789953], [-0.49751896743219715, -0.17469740167823117, 0.17815829289519891, 0.11677197623764954, 
--0.10957411605552697], [-0.0050441311208559341, -0.20417391519018996, 0.0037375007161409937, -0.0094409181280493883, 
--0.36065477460195949], [-0.32978120812425593, -0.16133898057229873, -0.16562162101526468, -0.51902306075761517, 
--0.37089866480225198]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_array_rank2(self):
-      arg0=Data(numpy.array([0.6082991034824301, -0.89790957751207823]),self.functionspace)
-      arg1=numpy.array([[0.76657659534322575, 0.68288841558950208, -0.52316353807759675, -0.14719334499260706, 
--0.41525172281721101], [-0.64498670026315219, 0.900497810651681, 0.80284887559478979, 0.30499901681381969, 
--0.83593848020492501], [0.89752625807910302, 0.44866872380829048, -0.5104140244105988, 0.36221640249806852, 
--0.96865683502897593], [-0.15265985147484296, 0.59080359638445579, 0.25838669533340086, 0.84017981147952447, 
-0.59099373775915232]])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[0.46630785569789784, 0.41540041098163127, -0.31823991118729827, -0.089537579797582909, 
--0.25259725070924405], [-0.39234483152816635, 0.54777201090730865, 0.48837225125618766, 0.18553062849086915, 
--0.50850062807512098], [0.54596441814145857, 0.27292478245318913, -0.31048439345382645, 0.22033591290620613, 
--0.58923308433025423], [-0.0928628507899079, 0.35938529801485997, 0.15717639512309556, 0.51108062608703186, 
-0.35950096084262273]], [[-0.68831646685528314, -0.61317204872986231, 0.46975355144497893, 0.13216631421490138, 
-0.37285849899596457], [0.5791397355341964, -0.80856560871280225, -0.72088569469136476, -0.27386153832889609, 
-0.75059716758689299], [-0.80589742319780389, -0.40286394423758543, 0.45830564101476035, -0.32523757693498556, 
-0.86976624949505466], [0.13707474274083284, -0.53048820762218307, -0.23200788844155604, -0.75440549955975733, 
--0.53065893738360437]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[[-7.0, 0.0, 2.0], [6.0, 4.0, 7.0]], [[3.0, 0.0, 2.0], [4.0, -7.0, -3.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-1.0, -7.0], [7.0, -7.0], [6.0, -1.0]], [[2.0, 7.0], [0.0, 1.0], [-4.0, 
+-5.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, 0.0], [-2.0, 5.0], [1.0, -2.0]], [[4.0, 4.0], [2.0, -4.0], [-1.0, -7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[3.0, 58.0], [29.0, 13.0]])+(1.-msk_ref)*numpy.array([[62.0, -45.0], [-8.0, 61.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[0.16196797258458528, -0.87553179470356857, -0.60222680248837368, 0.14709037205386077, 
-0.3556166421447251], [-0.6419686001157352, -0.42480335802533564, -0.19594124821840864, 0.70726884481089414, 
-0.75204164044023791], [0.039321557679237396, 0.43748758848062752, 0.75704401346022876, 0.76454523005635644, 
-0.30534874386382027], [0.15112591468115033, 0.089900406644022102, 0.35917646346824705, -0.3421665984079667, 
--0.20565912906789818]]),self.functionspace)
-      arg1=numpy.array([[0.21860412872011858, -0.98840740295497787, -0.069274004080670748, -0.04734481193948481, 
--0.038090044095202558], [-0.86828963553517347, -0.69761872791299773, -0.64672359733995943, -0.59855991393624142, 
--0.36198596308426945], [-0.28082063984983763, -0.61440801497291919, -0.65080269815869363, -0.08863549331887266, 
--0.87236881392923471], [-0.71107952303930211, -0.83721058185920727, -0.12005709440444634, 0.53721957267291631, 
-0.44292111553365765]])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.03540686752741732, -0.160090343144213, -0.011220169993762529, -0.0076683432022368221, 
--0.0061693672177574122], [-0.14063511188384054, -0.11299189099710567, -0.10474850988376293, -0.096947535730656884, 
--0.058630132544837656], [-0.045483949696384196, -0.09951442052488324, -0.10540919357334143, -0.014356111151892359, 
--0.14129580813813747], [-0.11517210869308966, -0.13560130057009678, -0.019445404175084332, 0.087012365018589527, 
-0.071739035097889398]], [[-0.19139486514793533, 0.86538210740746502, 0.060651593119051994, 0.041451888167280078, 
-0.03334904466701076], [0.76021518292261792, 0.61078737686848739, 0.56622707185620269, 0.52405823568621102, 
-0.31693021991667014], [0.2458673987975328, 0.537933752029497, 0.56979845431680587, 0.077603192539908744, 0.76378663330288632], 
-[0.6225727309835577, 0.73300448328001067, 0.10511380333082067, -0.47035281661220257, -0.38779151919528992]], 
-[[-0.13164926544987388, 0.5952454298374138, 0.041718661973068893, 0.028512314708729315, 0.022938845462094994], 
-[0.52290729084214282, 0.42012469586705137, 0.38947428411982227, 0.3604688230675388, 0.21799764909391406], [0.1691177160095069, 
-0.37001297428036994, 0.39193082796291628, 0.053378669728404292, 0.52536388140317802], [0.42823114747491675, 
-0.50419065172250122, 0.072301600079234543, -0.32352802548498089, -0.26673896716241818]], [[0.032154562625952315, 
--0.14538521264143797, -0.01018953903388653, -0.0069639660029988905, -0.005602678757511307], [-0.12771704554137983, 
--0.10261299824046391, -0.095126814548745872, -0.08804240043740863, -0.053244649988340303], [-0.041306012395915859, 
--0.090373503515240747, -0.095726811005818702, -0.01303742768945047, -0.12831705340903637], [-0.10459295160373282, 
--0.12314561597310006, -0.017659242683655499, 0.079019826819075351, 0.065149431674356759]], [[0.077739266214421829, 
--0.35149412170983746, -0.024634988719088115, -0.016836603044893077, -0.013545453580280448], [-0.30877824459808556, 
--0.24808482951769487, -0.22998567408179366, -0.21285786671644183, -0.12872823269555231], [-0.099864492988332443, 
--0.21849371519147551, -0.23143627021792171, -0.031520256508898711, -0.31022886832129093], [-0.25287171228110933, 
--0.29772601588880282, -0.042694300777761471, 0.19104422052836662, 0.15751011984107519]]], [[[-0.14033698649397452, 
-0.63452651681903649, 0.044471735424079929, 0.03039388264353381, 0.024452612286143812], [0.55741468181951725, 
-0.44784931817282714, 0.41517624244614615, 0.38425667003504382, 0.23238362198275467], [0.1802780330480053, 0.39443065327205262, 
-0.41779489708847989, 0.056901203566484281, 0.5600333862627751], [0.45649072597650547, 0.53746290523823537, 
-0.077072884828785077, -0.34487809702360556, -0.28434144850084203]], [[-0.092863767958509091, 0.41987878387237565, 
-0.029427829557329737, 0.020112235096971152, 0.016180778638975154], [0.36885235291393648, 0.2963507782388044, 
-0.27473035586423977, 0.25427026141947123, 0.15377285267623284], [0.1192935508110344, 0.26100258795817677, 0.27646317158976197, 
-0.037652655202089311, 0.37058520159371811], [0.30206896921014958, 0.35564986654813641, 0.051000656857773538, 
--0.22821267846839069, -0.18815437721902542]], [[-0.042833565847117706, 0.19366978028331397, 0.01357363482865376, 
-0.0092768015480884699, 0.0074634107847082144], [0.170133755001869, 0.13669228432781116, 0.12671982891509115, 
-0.11728257667017039, 0.070927981444274549], [0.055024346697669368, 0.12038787336918849, 0.12751909302112266, 
-0.017367349197354328, 0.17093303430810691], [0.13932980932687153, 0.16404408643115326, 0.02352413693508254, 
--0.10526347363689131, -0.08678651623995487]], [[0.15461188959077027, -0.6990697620905032, -0.048995344841561164, 
--0.03348551044822845, -0.026939901486009932], [-0.61411420748623446, -0.49340399180947137, -0.45740745160257895, 
--0.42334277887979366, -0.2560213939483702], [-0.19861568954565081, -0.43455164699245108, -0.46029247252651229, 
--0.062689122968882793, -0.61699928327677966], [-0.50292439282868884, -0.59213296109501801, -0.084912642470785227, 
-0.37995866657417571, 0.31326430572584263]], [[0.16439940756968691, -0.74332352474153685, -0.052096935668691363, 
--0.035605270037304716, -0.028645299245797128], [-0.65298996188512815, -0.52463833254152281, -0.48636307505495496, 
--0.45014197957837859, -0.27222851749423338], [-0.21118881466214914, -0.46206041147986443, -0.48943072872619697, 
--0.066657581796754739, -0.65605767389624636], [-0.53476141098993868, -0.62961721937532433, -0.090287934222408328, 
-0.40401148870954356, 0.33309512231155203]]], [[[0.0085958548563875789, -0.038865718705879404, -0.0027239617471298216, 
--0.0018616717534910992, -0.0014977598658942031], [-0.034142500985980338, -0.027431455047747157, -0.025430179235327116, 
--0.02353630818032329, -0.014233851926492399], [-0.011042304987375741, -0.024159480199343396, -0.025590575833450396, 
--0.0034852856629657121, -0.034302900634486315], [-0.027960754479714533, -0.03292042418424472, -0.0047208319624260859, 
-0.021124310413273343, 0.01741634819180889]], [[0.095636593105673365, -0.43241597115517316, -0.030306516989649795, 
--0.020712767602474032, -0.016663921536330933], [-0.379865938753006, -0.30519953495358043, -0.28293354701377521, 
--0.26186253330913822, -0.15836436605357448], [-0.12285554452349227, -0.26879588081367173, -0.28471810299413258, 
--0.038776928225864371, -0.38165052867160615], [-0.31108846575241911, -0.3662692385080476, -0.052523488710992272, 
-0.23502689533326737, 0.19377249072196931]], [[0.16549294696525504, -0.74826790726683801, -0.052443470077691248, 
--0.035842106447187334, -0.028835839854709232], [-0.65733347053146696, -0.52812808164427516, -0.48959822772967981, 
--0.45313619954270129, -0.27403930630958157], [-0.21259358425439054, -0.46513390955723105, -0.49268628658480323, 
--0.067100969597146648, -0.66042158811452734], [-0.53831849601105852, -0.63380525900206763, -0.090888504592315636, 
-0.40669886140569361, 0.33531077894988187]], [[0.16713274388359242, -0.75568216528161936, -0.052963109386781393, 
--0.036197250136248346, -0.0291215615256234], [-0.66384669915578909, -0.53336107082386552, -0.49444944151115372, 
--0.45762612710289663, -0.27675464142343453], [-0.21470008069856733, -0.46974271715593979, -0.49756809858503592, 
--0.067765843630636147, -0.6669654155395176], [-0.54365245753044744, -0.64008535691316371, -0.09178907886134513, 
-0.41072866177999229, 0.3386332261724983]], [[0.066750496108133092, -0.3018089589180033, -0.021152730128449971, 
--0.014456678854190486, -0.011630747118187625], [-0.26513114952063954, -0.21301700226411008, -0.19747623807484771, 
--0.18276951784766768, -0.1105319591241169], [-0.085748229629182188, -0.18760871559184417, -0.19872178638594207, 
--0.0270647365466678, -0.26637672151926256], [-0.21712723914733534, -0.25564119952020703, -0.036659282968337772, 
-0.16403932169473331, 0.13524540625896436]]], [[[0.033036748905903843, -0.14937397284919135, -0.010469097230317108, 
--0.0071550280097616888, -0.005756392754132836], [-0.13122106537841574, -0.10542826835455232, -0.097736695193885337, 
--0.090457914485085111, -0.05470545977284734], [-0.042439276058652609, -0.092852973250212315, -0.098353153036193158, 
--0.013395120001029619, -0.13183753494436584], [-0.10746254333035064, -0.12652421496421079, -0.018143738205833169, 
-0.081187799304811195, 0.066936858716619474]], [[0.019652600066000812, -0.088858227455614322, -0.0062277611367119465, 
--0.0042563178458444369, -0.0034243104532474429], [-0.078059591319401836, -0.062716207321863907, -0.058140714387147165, 
--0.053810779663678976, -0.032542685280703795], [-0.025245889716534881, -0.055235530391411852, -0.058507427209493333, 
--0.0079683668924601572, -0.07842631111580145], [-0.063926338277470546, -0.07526557175582109, -0.010793181607459476, 
-0.048296258040422958, 0.039818788397699714]], [[0.07851745785324965, -0.35501267545920356, -0.024881591795980235, 
--0.017005142115993393, -0.013681047331464441], [-0.31186920055765677, -0.25056822754100783, -0.23228789453402926, 
--0.2149886330614775, -0.13001683804575534], [-0.10086416429015496, -0.22068089794451889, -0.23375301154023265, 
--0.031835783028036121, -0.31333434542709176], [-0.25540302832994444, -0.30070633597038343, -0.04312168258246251, 
-0.19295662621858101, 0.15908683987279001]], [[-0.074799031122100276, 0.33819999891035724, 0.023703250334382715, 
-0.016199813253598407, 0.013033140821264918], [0.29709971102396349, 0.23870182711568327, 0.22128721341197746, 
-0.20480720969492902, 0.12385950565997629], [0.096087443100167647, 0.21022990051787482, 0.22268294546368689, 
-0.030328105247130716, 0.29849546961935869], [0.24330766159591738, 0.2864654969459195, 0.041079527607113538, 
--0.18381859377967324, -0.15155281146521365]], [[-0.044957934723226296, 0.20327500565598383, 0.014246831346276771, 
-0.0097368927893578729, 0.0078335652947771964], [0.17857169022284652, 0.14347166000404216, 0.13300461177659414, 
-0.1230993105950835, 0.074445717902715203], [0.05775332821580751, 0.12635861725166669, 0.13384351609835515, 
-0.018228698360462859, 0.17941061049868173], [0.1462399954062793, 0.17217999911159285, 0.024690837473640866, 
--0.1104841094341404, -0.09109077086643394]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank4_expandedData_rank4_offset3(self):
+      arg0=numpy.array([[[[6.0, 0.0, 6.0], [0.0, 0.0, -2.0], [-4.0, -6.0, -7.0], [6.0, 7.0, 5.0]], [[3.0, 1.0, -1.0], [0.0, 
+5.0, 6.0], [7.0, 1.0, -6.0], [-5.0, -4.0, 2.0]]], [[[-1.0, 7.0, 7.0], [-4.0, -5.0, 6.0], [-4.0, 4.0, 3.0], [6.0, 6.0, -1.0]], 
+[[-1.0, 2.0, -7.0], [7.0, -6.0, 0.0], [-5.0, -6.0, -3.0], [-2.0, 4.0, 6.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[6.0, -3.0], [-7.0, -6.0], [-2.0, -6.0]], [[5.0, -6.0], [-6.0, 2.0], [-5.0, -2.0]], [[-6.0, 
+-4.0], [0.0, -2.0], [0.0, -2.0]], [[-2.0, -7.0], [-7.0, -1.0], [-4.0, 1.0]]], [[[-7.0, -7.0], [-6.0, 0.0], [6.0, 1.0]], [[1.0, 
+-2.0], [-1.0, 0.0], [0.0, -5.0]], [[0.0, -1.0], [0.0, -2.0], [5.0, 4.0]], [[1.0, -1.0], [-7.0, 0.0], [5.0, 
+-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 0.0], [1.0, 4.0], [3.0, 5.0]], [[4.0, -3.0], [-2.0, -3.0], [6.0, -7.0]], [[-6.0, 
+-7.0], [0.0, -6.0], [-6.0, 3.0]], [[2.0, -6.0], [7.0, -4.0], [-6.0, -7.0]]], [[[2.0, -1.0], [5.0, -6.0], [2.0, -2.0]], [[-1.0, 
+-1.0], [7.0, -6.0], [4.0, 6.0]], [[-4.0, 7.0], [-1.0, 0.0], [5.0, 3.0]], [[1.0, 3.0], [6.0, 6.0], [-3.0, 1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-58.0, -146.0], [-164.0, -175.0]])+(1.-msk_ref)*numpy.array([[95.0, -19.0], [81.0, 20.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_constData_rank2(self):
-      arg0=Data(0.401591456378,self.functionspace)
-      arg1=Data(numpy.array([[-0.20636599075220774, -0.41037145249758167, -0.65372099878190437, -0.71522947074190424, 
-0.6239040269837941], [0.27537558542853469, -0.082977678406752631, -0.81947272137821492, -0.57172533214450616, 
-0.87255906268418171], [0.065289537431470146, 0.58518655847804424, 0.65745809407314848, -0.17463204844297064, 
--0.81657024710887893], [0.45031562839620509, 0.52969267736231962, -0.92934239922061845, -0.94765722904536687, 
--0.30658080708702773]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[-0.082874818773104889, -0.16480166926453246, -0.26252876796582264, -0.28723004479983538, 
-0.25055452683663249], [0.11058848240323885, -0.033323126718247949, -0.32909324364046688, -0.22960000878421025, 
-0.35041226475931919], [0.026219720423361716, 0.2350059222721321, 0.2640295535064574, -0.070130738664517259, 
--0.32792763477154407], [0.18084290903748679, 0.21272005373479075, -0.37321596757699904, -0.38057104675963827, 
--0.12312023281567695]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_constData_rank2(self):
-      arg0=Data(numpy.array([-0.6037699296970036, -0.64977695945749225]),self.functionspace)
-      arg1=Data(numpy.array([[0.11246978049741929, 0.57470907517187886, -0.10635824940352423, 0.81226307149406152, 
-0.18553308629923349], [0.86526504782660396, 0.38800189087870085, -0.90036808440952543, -0.22258074352878832, 
-0.061709096654924744], [0.49362869521577335, -0.50310428478554359, -0.8247507935097822, 0.54201170525013609, 
--0.7474481860057034], [-0.6772962728394869, -0.39473202374126393, -0.12896798728005354, -0.71086115611699374, 
-0.27274538987649644]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.067905871463964276, -0.34699205791275528, 0.064215912765062194, -0.49042001757144171, 
--0.1120192984713563], [-0.52242101709554312, -0.23426387437813767, 0.54361517502536494, 0.13438755987228332, 
--0.037258096949009514], [-0.29803816260685112, 0.30375923865522891, 0.49795972861494914, -0.32725036917382772, 
-0.4512867387168164], [0.40893112303633961, 0.23832732622341887, 0.077866992613241981, 0.42919659025308804, 
--0.16467546487091408]], [[-0.073080272002464669, -0.37343271543781081, 0.069109139910643616, -0.52778982887501491, 
--0.12055512469428045], [-0.5622292919016123, -0.25211468891891992, 0.58503843628018815, 0.14462783876392396, 
--0.040097149195305506], [-0.32074855267827435, 0.32690557245798679, 0.53590406291694026, -0.35218671782780392, 
-0.48567460965480408], [0.44009151281753389, 0.25648777418710111, 0.083800426642185732, 0.46190120061813794, 
--0.17722367013999815]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_expandedData_rank2_offset0(self):
+      arg0=numpy.array([5.0, -5.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[3.0, 2.0, -5.0, 2.0, -6.0], [-4.0, 4.0, 3.0, -7.0, 3.0], [5.0, 3.0, 7.0, 5.0, 1.0], [1.0, 
+4.0, 3.0, -2.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 0.0, 1.0, 1.0, 2.0], [-5.0, 5.0, -6.0, -2.0, -6.0], [-5.0, 5.0, -7.0, 
+7.0, 3.0], [3.0, -7.0, 5.0, -3.0, -4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[15.0, 10.0, -25.0, 10.0, -30.0], [-20.0, 20.0, 15.0, -35.0, 15.0], [25.0, 15.0, 35.0, 25.0, 
+5.0], [5.0, 20.0, 15.0, -10.0, 20.0]], [[-15.0, -10.0, 25.0, -10.0, 30.0], [20.0, -20.0, -15.0, 35.0, -15.0], [-25.0, -15.0, 
+-35.0, -25.0, -5.0], [-5.0, -20.0, -15.0, 10.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 0.0, 5.0, 5.0, 10.0], [-25.0, 
+25.0, -30.0, -10.0, -30.0], [-25.0, 25.0, -35.0, 35.0, 15.0], [15.0, -35.0, 25.0, -15.0, -20.0]], [[30.0, 0.0, -5.0, -5.0, 
+-10.0], [25.0, -25.0, 30.0, 10.0, 30.0], [25.0, -25.0, 35.0, -35.0, -15.0], [-15.0, 35.0, -25.0, 15.0, 20.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[-0.92127095180878116, 0.69094113165284088, 0.47472214054501838, -0.75831139586704532, 
--0.96280360258309083], [-0.41455067519827504, 0.38490685299598559, 0.2447115140349736, 0.00037197105984443368, 
-0.57403409938038674], [0.60014207779041695, 0.059576141602880606, -0.21413099513921741, 0.54640485285359564, 
-0.27570424665373161], [0.26235808321486132, -0.54732464402956138, -0.69381431133305127, -0.43435017056214087, 
-0.19733412935079175]]),self.functionspace)
-      arg1=Data(numpy.array([[-0.77313075143792598, 0.0084607718125822018, -0.64464610044251924, -0.57638099822004474, 
--0.93184039847213129], [0.17235025217443223, -0.13940553724244564, -0.24589043482940109, 0.11872633083126116, 
-0.72206642689275036], [0.27659434094381496, 0.35400790191399789, 0.79422056366365057, 0.77235596300316445, 
-0.72206224814221165], [-0.90875871953557441, -0.28709729641379167, -0.14124077404126978, -0.11279523096346988, 
--0.41136629847249173]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.71226290324985631, -0.0077946633008145116, 0.59389372653449879, 0.53100307083467602, 
-0.85847749083429425], [-0.15878128086522264, 0.12843027198276238, 0.22653171493595742, -0.10937911980968021, 
--0.66521882437264979], [-0.25481833174623092, -0.32613719674413849, -0.73169233463251804, -0.71154911317111302, 
--0.66521497461116363], [0.83721301051106789, 0.26449439952886161, 0.13012102233520961, 0.10391496978920721, 
-0.3789798213358076]], [[-0.5341878363141318, 0.0058458952508420045, -0.44541250615534517, -0.39824533917335175, 
--0.64384685944016862], [0.11908387827805471, -0.096321019660967649, -0.16989581530363551, 0.082032905381541163, 
-0.49890539412580021], [0.19111040694049122, 0.2445986203625056, 0.54875965503971991, 0.53365250311622614, 0.49890250685517412], 
-[-0.62789877807529637, -0.1983673308786163, -0.097589060251598136, -0.07793486452694344, -0.28422989579042374]], 
-[[-0.36702228524379077, 0.0040165157055319775, -0.30602777669607167, -0.27362082124449405, -0.44236526860901304], 
-[0.08181848063572017, -0.066178895043562072, -0.11672963356175863, 0.056362017911272308, 0.34278091979021946], 
-[0.13130545759548645, 0.16805538896646399, 0.37703408604727923, 0.36665447601957124, 0.34277893604481896], 
-[-0.4314078845768779, -0.13629144309824281, -0.067050122585106856, -0.053546393486248157, -0.1952846897589422]], 
-[[0.58627385931063136, -0.0064158996833117606, 0.48884248426681426, 0.43707627931148307, 0.70662519329070561], 
-[-0.13069516030443096, 0.10571280753791433, 0.18646151886583789, -0.09003152965882627, -0.54755120008577141], 
-[-0.20974464077002977, -0.26844822624836778, -0.60226650425809436, -0.58568632841116564, -0.54754803129161733], 
-[0.68912209311737016, 0.21770915159319723, 0.10710448851657722, 0.085533909039054626, 0.31194375200733482]], 
-[[0.74437307275220732, -0.0081460615817876107, 0.62066758789719856, 0.55494170154669709, 0.89717929268143093], 
-[-0.16593944369964753, 0.1342201534770579, 0.23674419649447009, -0.11431013904581014, -0.69520815711664008], 
-[-0.26630602791480074, -0.34084008330567861, -0.76467841994093577, -0.74362710365597917, -0.69520413380056711], 
-[0.87495616904764772, 0.27641831127906408, 0.13598712607855884, 0.1085996547258206, 0.39606495415058607]]], 
-[[[0.32050187502514199, -0.0035074186676044851, 0.26723847620238139, 0.2389391319835753, 0.38629506636365168], 
-[-0.071447913409503849, 0.05779065959023412, 0.10193404578332567, -0.049218080609913097, -0.29933312480639557], 
-[-0.11466237079428039, -0.14675421476397255, -0.32924467092312093, -0.32018068595637578, -0.29933139250253826], 
-[0.37672654077579221, 0.11901637807593664, 0.058551458244335386, 0.046759339155051823, 0.17053217678558658]], 
-[[-0.29758332449039365, 0.003256609052298156, -0.24812870181746413, -0.2218529961515622, -0.35867175527043327], 
-[0.066338793177525238, -0.05365814663020442, -0.094644913451999269, 0.045698578368020992, 0.27792831602934442], 
-[0.1064630573291825, 0.13626006746142846, 0.30570093774447354, 0.29728510311223189, 0.27792670759962512], 
-[-0.34978745886909945, -0.11050571686628821, -0.054364541850942243, -0.043415657383104544, -0.1583377073736541]], 
-[[-0.18919399673137172, 0.0020704482801614183, -0.15775232325603056, -0.14104706673541656, -0.22803207474906834], 
-[0.04217609115391481, -0.03411414008345777, -0.060172220593820748, 0.029053700173535084, 0.17669796855874853], 
-[0.067685819945866643, 0.086629809657718854, 0.19435491661184207, 0.18900439708044442, 0.17669694597037741], 
-[-0.22238372215003435, -0.070256014080766552, -0.034563243659110725, -0.027602291744995251, -0.1006660697221663]], 
-[[-0.00028758226501068873, 3.1471622582281117e-06, -0.00023978969320618513, -0.00021439705078210269, -0.00034661766062553807], 
-[6.4109305965778964e-05, -5.1854825436255177e-05, -9.1464125649100977e-05, 4.4162759110745077e-05, 0.00026858781408937966], 
-[0.00010288509014784348, 0.00013168069446825413, 0.0002954270648162116, 0.0002872940661354553, 0.00026858625971511293], 
-[-0.0003380319440485181, -0.00010679188562550962, -5.2537480413379293e-05, -4.1956561606879575e-05, -0.00015301635802709439]], 
-[[-0.44380341460495148, 0.0048567715274985867, -0.37004884368659985, -0.33086234721321167, -0.53490816390321061], 
-[0.098934921784932739, -0.080023532019606242, -0.14114949430354692, 0.068152962391460847, 0.41449075105419381], 
-[0.15877458339739445, 0.20321260714874206, 0.45590968597204679, 0.44335865962359283, 0.41448835230889181], 
-[-0.52165849312267687, -0.16480363798143483, -0.081077020522569002, -0.064748308820518144, -0.23613828265910014]]], 
-[[[-0.4639882955716233, 0.0050776651753136745, -0.38687925015906333, -0.34591048987069228, -0.55923663290811498], 
-[0.10343463844766608, -0.083663128776170687, -0.14756919646730587, 0.07125266687350551, 0.43334244573811742], 
-[0.1659959024790921, 0.21245503780889283, 0.47664517930097938, 0.46352331243053752, 0.43333993789408654], 
-[-0.54538434615223841, -0.17229916799778416, -0.084764531601854431, -0.067693164275266796, -0.24687822509823401]], 
-[[-0.046060147125207368, 0.00050406013957605804, -0.038405527363708322, -0.034338555967167061, -0.055515455530660382], 
-[0.010267963028836155, -0.0083052440269815869, -0.014649203364190285, 0.0070732566975936642, 0.043017931695248535], 
-[0.016478423622624156, 0.021090424892967006, 0.047316596764745297, 0.046013988219705738, 0.043017682741414716], 
-[-0.054140338157903846, -0.01710414918495224, -0.0084145803543831509, -0.0067199046520093047, -0.024507616848450015]], 
-[[0.16555125717813401, -0.0018117134878740671, 0.13803871100037254, 0.12342103672819367, 0.19953591183576236], 
-[-0.036905531010606243, 0.029851046417642118, 0.05265276350523454, -0.025422987370125903, -0.15461680254716362], 
-[-0.059227421476175081, -0.075804064323990838, -0.17006723965732767, -0.16538535095957618, -0.15461590774715231], 
-[0.19459340895559352, 0.061476429782864085, 0.030244027499690442, 0.024152955053165674, 0.08808627485865099]], 
-[[-0.42244239447602977, 0.0046230067772818273, -0.35223775765493898, -0.31493737452003212, -0.50916211581020088], 
-[0.094173014178650746, -0.076171862063934961, -0.13435572686106556, 0.064872643327702567, 0.39454059973685485], 
-[0.15113249016354247, 0.19343163555432813, 0.43396597022193678, 0.42201904631534121, 0.3945383164472816], 
-[-0.49655017442725752, -0.15687135600164295, -0.077174644356947958, -0.061631861577182097, -0.22477254178579015]], 
-[[-0.21315543139002682, 0.0023326707186971034, -0.17773166748077057, -0.15891068889978324, -0.25691235506227206], 
-[0.047517696436332503, -0.038434698624787204, -0.067793037093998518, 0.032733353599794568, 0.1990767802604175], 
-[0.076258234398599897, 0.097601481906666898, 0.21896998218178887, 0.21294181892830485, 0.19907562816114829], 
-[-0.2505486381595653, -0.079153943824087511, -0.038940681203838215, -0.031098124178917125, -0.11341543541909244]]], 
-[[[-0.20283710202171965, 0.0022197518752673944, -0.16912811526403432, -0.15121821389447934, -0.24447586080532094], 
-[0.045217481802082023, -0.036574169540466002, -0.064511343162710441, 0.031148812584023172, 0.18943996371338578], 
-[0.072566761118097123, 0.092876834589071117, 0.20837018473262209, 0.20263383001307855, 0.18943886738440421], 
-[-0.23842019576214504, -0.075322296383291257, -0.037055658749250882, -0.029592740591353535, -0.10792527356643546]], 
-[[0.42315351331907014, -0.0046307889205369004, 0.35283069744974671, 0.31546752467618921, 0.51001921438612385], 
-[-0.094331540419776261, 0.076300086046971319, 0.13458189471327603, -0.064981846759155956, -0.3952047500647719], 
-[-0.15138689919766465, -0.19375724889873078, -0.43469648728816512, -0.42272945251481608, -0.39520246293162081], 
-[0.49738604267856829, 0.15713542556152799, 0.077304556374597697, 0.061735609635313313, 0.22515091287721484]], 
-[[0.53640917987930903, -0.0058702045684928122, 0.4472646902320635, 0.39990138534549696, 0.64652420433825786], 
-[-0.11957907152048142, 0.096721556817881457, 0.17060230270454543, -0.082374027462791474, -0.50098002071131065], 
-[-0.19190511218055217, -0.2456157486729188, -0.55104159342484349, -0.53587162057501614, -0.50097712143438333], 
-[0.63050980516248001, 0.19919221299691575, 0.097994870373590698, 0.078258945492572313, 0.28541182508031826]], 
-[[0.3358094737538993, -0.003674937679882433, 0.28000214367942722, 0.25035118488565344, 0.40474503601306355], 
-[-0.074860361428392627, 0.060550818878563145, 0.10680255230774935, -0.051568802046775448, -0.31362967567806171], 
-[-0.12013879916546898, -0.15376339257669061, -0.34496983729126629, -0.33547294426511104, -0.3136278606370525], 
-[0.39471950483010948, 0.12470075966525992, 0.061347954295154328, 0.048992627807579216, 0.17867702190504334]], 
-[[-0.1525650837093265, 0.001669599039271629, -0.12721067697020758, -0.11373964245809277, -0.1838839137263929], 
-[0.034010586956230986, -0.027509470318417387, -0.048522574872747463, 0.023428757125600986, 0.14248834968431801], 
-[0.05458150345350378, 0.069857841107499263, 0.15672682344306155, 0.1524121915081218, 0.14248752507421869], 
-[-0.17932911070949292, -0.056654095026781766, -0.02787162517426588, -0.022258348697097797, 
--0.081176610353327086]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_expandedData_rank2(self):
-      arg0=Data(0.0596557925971,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.31928510411621724, 0.064704454835101899, -0.23987836773877858, -0.90618834188613073, 
-0.86835655239726695], [-0.51412650198807031, -0.46973335346415701, -0.8729202258712625, -0.97687278919286924, 
--0.90832968295672534], [-0.049162725267693608, -0.20127692395668162, -0.062009945166549674, -0.30360297570745054, 
--0.522325587313895], [-0.6617808520544175, -0.89148228241511585, 0.0438043718299026, -0.63153844785264757, 
--0.46117950601537605]])+(1.-msk_arg1)*numpy.array([[-0.024236153865825116, -0.12283916168511944, -0.38330902066210149, 
--0.45060899935199306, 0.17935121229739748], [0.82995869977987646, -0.049795990724521344, 0.50232359921601777, 
-0.41922814719074886, -0.47855235126117446], [0.026221206389239082, 0.75310141641819639, 0.88473844001614332, 
--0.53523113043558856, -0.61177775227866893], [0.34495492330617306, -0.92331067160852265, 0.71145038846183661, 
--0.17562305144957313, -0.76964110985703527]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.019047205950485778, 0.0038599955377482727, -0.014310134154344371, -0.054059383777427077, 
-0.051802498390104021], [-0.030670623971249079, -0.028022315510176303, -0.052074747948349376, -0.058276120505795247, 
--0.054187127176214024], [-0.002932841342075465, -0.012007334430132764, -0.0036992524278103649, -0.018111676150652026, 
--0.031159746904932027], [-0.039479061254859865, -0.053182082143704276, 0.0026131845207288946, -0.037674926662162808, 
--0.027512028960864989]])+(1.-msk_ref)*numpy.array([[-0.0014458269683699464, -0.0073280675522834401, -0.022866603437198128, 
--0.026881437007708439, 0.010699338722843706], [0.049511844058188738, -0.002970619294826859, 0.029966512451436323, 
-0.02500938739965845, -0.028548419813669051], [0.001564246850000988, 0.044926861902391355, 0.05277977288024395, 
--0.031929637308752111, -0.036496086705428019], [0.020578559360085652, -0.055080829928124457, 0.042442136817172668, 
--0.01047693233253744, -0.045913550423797578]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_expandedData_rank2(self):
-      arg0=Data(numpy.array([0.81754009937055727, 0.068794605163091882]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.073594571193924319, 0.49278314621057606, -0.79450929904989653, 0.55543766467178646, 
--0.15150111473618222], [0.03670305604595292, -0.67735370664124428, 0.65738905375957324, -0.63103985741826785, 
-0.9628578377269259], [-0.86786828643525094, -0.5752751384508854, 0.39109303732782164, -0.83914853897407826, 
-0.95198513521267536], [0.70762159671469527, -0.6304267832395658, -0.5483870867810221, -0.57642535770284908, 
-0.82988669590837638]])+(1.-msk_arg1)*numpy.array([[-0.38948009589738009, -0.83859298264283355, -0.21024311874563439, 
-0.50084730030558045, -0.46145224636212845], [0.17583332556646702, 0.38526563864204744, 0.30977882677375379, 
-0.87702995861563915, 0.94144902733384161], [0.91242354539656567, -0.12921860172255517, -0.77641969028149282, 
--0.59418535977868281, 0.72270161672714472], [-0.99183426227178062, -0.96151014763149401, -0.46360827099737434, 
-0.43715054312385027, -0.90366235547661167]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.060166513047014439, 0.40286998232113019, -0.64954321129608417, 0.45409256356992256, 
--0.12385823639616861], [0.030006220087011481, -0.5537638166364981, 0.53744191233571814, -0.51590038774051294, 
-0.78717489233499094], [-0.70951712513283027, -0.47031049385454793, 0.31973424060012035, -0.68603757993952585, 
-0.77828602204106401], [0.57850903049488434, -0.51539917501553545, -0.44832843342048723, -0.47125084421609625, 
-0.67846565183923746]], [[0.0050629094674330792, 0.033900821974582759, -0.054657953526542527, 0.038211114833805376, 
--0.010422459370043937], [0.0025249722489601636, -0.046598280804141169, 0.045224820391928426, -0.043412137833263531, 
-0.066239424774612268], [-0.059704656098882217, -0.039575826009871681, 0.026905091085001845, -0.05772889241190713, 
-0.065491441498088637], [0.048680548350864099, -0.043369961637204038, -0.037726073111638621, -0.039654954889161508, 
-0.057091727575119655]]])+(1.-msk_ref)*numpy.array([[[-0.31841559630279831, -0.68558339036127414, -0.17188218019128182, 
-0.40946275166129958, -0.37725571534566138], [0.14375079445626501, 0.31497010849948065, 0.25325661282350931, 
-0.71700715951758531, 0.7696723313588234], [0.74594283597154443, -0.10564138849278222, -0.63475423074598891, 
--0.48577035807799468, 0.59083755155437234], [-0.81086428133679489, -0.78607310164045086, -0.37901835194020567, 
-0.35738809846536562, -0.73878021189378096]], [[-0.026794129416143425, -0.057690673133453295, -0.01446359234236296, 
-0.034455592271522915, -0.031745425090104432], [0.012096384206858489, 0.026504197493286089, 0.021311112075786228, 
-0.060334929719165709, 0.064766614116608529], [0.062769817547065176, -0.0088895426852300067, -0.053413486033765389, 
--0.040876747219664181, 0.049717972373472079], [-0.068232846460213673, -0.066146710966614813, -0.031893747953608068, 
-0.030073599011036449, -0.062167094945763078]]])
+   def test_generalTensorProduct_array_rank2_expandedData_rank3_offset1(self):
+      arg0=numpy.array([[3.0, 2.0, -4.0], [1.0, -2.0, 0.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-6.0, 0.0, 0.0, -3.0, -1.0], [6.0, 5.0, -7.0, 4.0, 3.0], [2.0, 0.0, -1.0, 5.0, 1.0], [-5.0, 
+-7.0, -4.0, -3.0, 1.0]], [[-5.0, 4.0, 7.0, 5.0, -2.0], [0.0, -4.0, 7.0, -1.0, -4.0], [-4.0, -1.0, 7.0, 4.0, 0.0], [0.0, 3.0, 
+-1.0, -5.0, -7.0]], [[-6.0, 6.0, 0.0, -5.0, -3.0], [0.0, 2.0, 6.0, -5.0, 4.0], [-2.0, 7.0, 1.0, 5.0, 0.0], [-2.0, 0.0, 4.0, 
+-2.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 5.0, -4.0, 7.0, 7.0], [1.0, 3.0, -4.0, -6.0, -5.0], [1.0, -1.0, -7.0, 6.0, 
+-1.0], [-1.0, 5.0, 5.0, -4.0, -3.0]], [[0.0, 0.0, -3.0, 1.0, 2.0], [3.0, -3.0, -3.0, 0.0, 1.0], [7.0, 1.0, 2.0, -6.0, 7.0], 
+[2.0, 0.0, -5.0, -7.0, 4.0]], [[5.0, 0.0, -5.0, -5.0, 0.0], [0.0, -2.0, -2.0, 1.0, -2.0], [6.0, 5.0, 1.0, -7.0, -6.0], [2.0, 
+0.0, 5.0, -4.0, 4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-4.0, -16.0, 14.0, 21.0, 5.0], [18.0, -1.0, -31.0, 30.0, -15.0], [6.0, -30.0, 7.0, 3.0, 3.0], 
+[-7.0, -15.0, -30.0, -11.0, -35.0]], [[4.0, -8.0, -14.0, -13.0, 3.0], [6.0, 13.0, -21.0, 6.0, 11.0], [10.0, 2.0, -15.0, -3.0, 
+1.0], [-5.0, -13.0, -2.0, 7.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 15.0, 2.0, 43.0, 25.0], [9.0, 11.0, -10.0, -22.0, 
+-5.0], [-7.0, -21.0, -21.0, 34.0, 35.0], [-7.0, 15.0, -15.0, -10.0, -17.0]], [[0.0, 5.0, 2.0, 5.0, 3.0], [-5.0, 9.0, 2.0, -6.0, 
+-7.0], [-13.0, -3.0, -11.0, 18.0, -15.0], [-5.0, 5.0, 15.0, 10.0, -11.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[0.096587985349336769, -0.41147338952206325, 0.24409171143097264, 0.87622408202359137, 
-0.13972144257176877], [0.90926242262038559, 0.23018290769581995, -0.42857420242821154, -0.66176433450416416, 
-0.13873484339387732], [0.67546872313826256, -0.1473051146243205, 0.18477243685801326, -0.36311347294725893, 
--0.078844790086926464], [-0.10370292228364386, -0.61063338424861202, 0.73079465938438748, -0.97666680454888644, 
--0.64935172531905838]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.9652330546955592, -0.20265266885029432, 0.3716803443575416, 0.92942145427133416, 
-0.2223474274250592], [0.74680455546934854, -0.60335567874715323, -0.23996232680339369, 0.4017292028969488, 
--0.8708951237392375], [0.84719581080672524, -0.83137189315267035, 0.69592012701030304, 0.45226323247994227, 
--0.5411054267749229], [0.96631753795233633, 0.99859139869408753, -0.95454913298656785, 0.0076583508435648096, 
-0.67698130053309269]])+(1.-msk_arg1)*numpy.array([[-0.87833112768788291, -0.6595510056659506, 0.24220570379344464, 
-0.43217280424913507, -0.95579951001036889], [-0.42609761853809225, -0.82180511560918923, 0.71834570005375431, 
--0.26719977697253161, -0.5984655911967709], [0.69700867656891874, -0.5273527604562207, -0.0099409341444107735, 
-0.93986037339584372, -0.08491685305213803], [0.43714405229483755, 0.21144112509039981, -0.81170014133570789, 
--0.14134978605899451, 0.78010563049507331]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.093229916145630254, -0.019573813009916223, 0.035899855655442674, 0.089770945808518895, 
-0.021476090062594339], [0.072132347462491392, -0.05827690945926918, -0.023177477705678951, 0.038802214363811226, 
--0.084118005452534297], [0.081828936562219456, -0.080300536235680495, 0.06721752303197974, 0.04368319447281635, 
--0.052264283033782874], [0.09333466419854744, 0.096451931387038239, -0.092197977672128728, 0.00073970467907831874, 
-0.065388259937665311]], [[-0.39716771669431683, 0.083386180547522851, -0.15293657111152531, -0.38243219608355117, 
--0.091490049614100066], [-0.30729020174949057, 0.24826480622147623, 0.098738111967393447, -0.16530087678600419, 
-0.35835016848322077], [-0.34859853186153583, 0.34208741082890387, -0.28635261349755414, -0.18609428522472674, 
-0.22265048404386012], [-0.3976139526958628, -0.41089378756823425, 0.3927715672153298, -0.0031512075797507644, 
--0.27855979037340622]], [[0.23560538825038466, -0.049465836765722498, 0.090724091359485587, 0.22686407341375342, 
-0.05427316409245668], [0.18228880204896003, -0.14727412022698877, -0.058572815028398721, 0.098058768666916679, 
--0.21257828123039915], [0.20679347537696408, -0.20293098823524303, 0.16986833482120473, 0.11039370643333296, 
--0.13207934968607776], [0.23587010162454963, 0.24374788352748855, -0.23299753151564245, 0.0018693399641445674, 
-0.16524552425388822]], [[0.84576044728944333, -0.17756914873297999, 0.32567526854089923, 0.81438146058193106, 
-0.19482617048582959], [0.65436813606716615, -0.52867477574394528, -0.21026076952354866, 0.35200480203044804, 
--0.7630992803372354], [0.742333371618355, -0.7284680738979139, 0.60978197445134386, 0.39628393571275949, -0.47412960585384045], 
-[0.84671069763558282, 0.87498983163738098, -0.83639893779757046, 0.0067104314377171717, 0.59318731860674612]], 
-[[0.13486375482001853, -0.02831492323278207, 0.05193171388920749, 0.12986010634794204, 0.031066703311950935], 
-[0.10434460980934589, -0.084301725818420936, -0.033527882463848378, 0.056130183751968474, -0.12168272301756533], 
-[0.11837142082667494, -0.11616048022491351, 0.097234964060608081, 0.063190871264268769, -0.075604030812404827], 
-[0.13501528038510036, 0.1395246307652982, -0.13337098186651442, 0.0010700358275835976, 0.094588803904595842]]], 
-[[[0.87765014570575928, -0.18426445662930535, 0.33795497035091743, 0.84508800314611521, 0.20217216052391968], [0.67904131933, 
--0.54860864615940363, -0.21818872660687844, 0.36527726826343609, -0.79187221005941955], [0.77032331536796483, 
--0.75593522166649341, 0.63277402063567456, 0.41122596242683895, -0.49200683124240407], [0.8786362255791077, 
-0.90798163438446533, -0.86793565716955534, 0.0069634506412966125, 0.61555365739141921]], [[0.22218015113394224, 
--0.046647180568278865, 0.085554462397602574, 0.21393693281905327, 0.051180577363385424], [0.1719016440584189, 
--0.13888216450880478, -0.055235226121059751, 0.092471196029143693, -0.2004651718804086], [0.19500999511920977, 
--0.1913675997424602, 0.16018891835927587, 0.10410326589614372, -0.12455322050503934], [0.22242978064333463, 0.2298586717514409, 
--0.21972089496937211, 0.0017628214653264834, 0.15582952421240501]], [[-0.41367398657349558, 0.086851705922463357, 
--0.15929260714127641, -0.39832605848400554, -0.095292371370659393], [-0.3200611667300311, 0.2585826787995934, 
-0.10284166282258229, -0.172170772723681, 0.3732431830551623], [-0.36308626891701429, 0.35630454602913797, -0.29825341338718031, 
--0.19382835414769609, 0.2319038267096396], [-0.41413876812031558, -0.42797051224699079, 0.40909513334825914, 
--0.0032821716046962093, -0.2901367209347836]], [[-0.63875681008202823, 0.13410830853720779, -0.24596479573204708, 
--0.61505797015976194, -0.14714159733865723], [-0.49420861965485158, 0.39927926921541812, 0.15879850950311858, 
--0.26585005860598765, 0.57632733198421815], [-0.56064397193322835, 0.55017226759764393, -0.46053511971902661, 
--0.29929167706279108, 0.35808427264629861], [-0.63947448242273019, -0.66083217239837533, 0.63168657174238296, 
--0.0050680234493910709, -0.44800207981904566]], [[0.13391145668178223, -0.028114986276296862, 0.05156501436702593, 
-0.12894313990524325, 0.030847335522847089], [0.10360781304887423, -0.083706455601792851, -0.033291135829499233, 
-0.055733838050655356, -0.12082349860445452], [0.11753557813621994, -0.11534024939860703, 0.096548369835421602, 
-0.062744668730913514, -0.075070176643196082], [0.13406191229657449, 0.13853942131229713, -0.13242922447665287, 
-0.001062480104937332, 0.093920894710042002]]], [[[0.65198473898605414, -0.13688553946886944, 0.25105844761877838, 
-0.62779512297396523, 0.15018873289588225], [0.50444311951671861, -0.40754788992155933, -0.16208704648717481, 
-0.27135551172815403, -0.58826241721948191], [0.57225427257370376, -0.56156571112087428, 0.4700722795978669, 0.3054896681656098, 
--0.36549979170684183], [0.65271727350677422, 0.67451725701274701, -0.64476808403117258, 0.005172976465647558, 
-0.45727969465956853]], [[-0.14218376576111236, 0.029851774613917068, -0.054750415729194583, -0.13690853385574153, 
--0.03275291328327113], [-0.11000813064537711, 0.088877377417084097, 0.035347678055292563, -0.05917676628067195, 
-0.12828730602817015], [-0.1247962760201288, 0.12246533201629244, -0.10251259407862437, -0.0666206873008236, 
-0.07970759691492188], [-0.14234351569156006, -0.14709762044749308, 0.14060996944913212, -0.001128114248844576, 
--0.099722808073548788]], [[0.17834846365200246, -0.037444627459248876, 0.068676282959168486, 0.17173146697383296, 
-0.041083675994438434], [0.13798889757073687, -0.1114834990542321, -0.044338423877582002, 0.074228483776296469, 
--0.1609174142610599], [0.15653843445865898, -0.15361461063307871, 0.1285868577262318, 0.083565779566601106, 
--0.099981368302297757], [0.17854884626608888, 0.18451216616215843, -0.1763743694026319, 0.0014150521476790914, 
-0.12508748460680658]], [[-0.35048912669399601, 0.073585914388261162, -0.13496214066590007, -0.33748545209215614, 
--0.080737346573201849], [-0.27117479574930903, 0.21908657593232947, 0.087133553862085406, -0.14587328604824512, 
-0.31623375295378736], [-0.30762821312839894, 0.30188233543340359, -0.25269797421260864, -0.16422287303214539, 
-0.19648267074685097], [-0.35088291717571751, -0.362601990835071, 0.34660965077754757, -0.0027808503718553881, 
--0.24582103115692333]], [[-0.076103597582434179, 0.015978107136056876, -0.029305058730306911, -0.073280039464309263, 
--0.017530936241696909], [-0.058881648411941219, 0.047571451838574336, 0.018919779285584023, -0.031674254674198217, 
-0.068665543218948022], [-0.066796975865579714, 0.065549342399792945, -0.05486967633139455, -0.03565859962891587, 
-0.042663343788965552], [-0.07618910343716756, -0.078733729212645626, 0.075261226017983601, -0.00060382106467290358, 
--0.05337644853330617]]], [[[-0.10009748845669773, 0.021015673968355086, -0.038544337865268126, -0.096383720841051429, 
--0.023058077986229056], [-0.077445814776909053, 0.062569747062511227, 0.024884794527494685, -0.041660492307092477, 
-0.090314369334334552], [-0.087856681327118477, 0.086215694824417238, -0.072168950846973015, -0.046901018849617011, 
-0.056114214020097773], [-0.10020995253959321, -0.10355684621188818, 0.098989534554025677, -0.00079419336235107981, 
--0.070204939196663457]], [[-0.58940352677737495, 0.1237464850070685, -0.22696042653373513, -0.56753576801497141, 
--0.13577276208753655], [-0.45602379307852858, 0.36842912001899253, 0.14652900770812771, -0.24530926271646117, 
-0.53179763673450431], [-0.51732604507415747, 0.50766343268499059, -0.42495206232302524, -0.27616702822044392, 
-0.33041703798686067], [-0.5900657484586217, -0.60977324526612564, 0.5828795675071663, -0.004676444693369192, 
--0.41338738261754909]], [[0.70538716143279301, -0.14809748810578791, 0.27162201065464148, 0.67921623509876172, 
-0.16249031249009094], [0.54576078074093148, -0.44092910773766175, -0.17536318688137117, 0.29358155599583718, 
--0.63644550531254007], [0.61912617399038072, -0.6075621394782591, 0.50857471217723405, 0.33051155493226148, 
--0.39543695605102341], [0.70617969600503749, 0.7297652610728248, -0.69757940850658129, 0.0055966818961690817, 
-0.49473431893268111]], [[-0.94271108317447228, 0.19792413451932062, -0.36300785423730991, -0.90773508182236295, 
--0.217159351442898], [-0.72937921881280021, 0.58927746276840665, 0.23436323893118613, -0.39235557688733425, 
-0.85057435759960809], [-0.82742802536780724, 0.81197333027717677, -0.6796820866684079, -0.44171048608113539, 
-0.52847970809232536], [-0.94377026197145564, -0.97529107041255747, 0.93227645149890126, -0.0074796570464987118, 
--0.66118516353100498]], [[-0.62677574940154646, 0.13159286015845043, -0.24135127287575139, -0.60352142487963911, 
--0.14438168561871631], [-0.48493882657015391, 0.3917900509755155, 0.15581995092135942, -0.26086355101218378, 
-0.56551725117202867], [-0.55012806143042559, 0.53985277320045832, -0.45189693515839852, -0.29367791030922491, 
-0.3513677424558016], [-0.62747996047541432, -0.64843704763077747, 0.61983812640663916, -0.0049729633333674755, 
--0.43959897550990373]]]])+(1.-msk_ref)*numpy.array([[[[-0.084836234092983673, -0.063704702872403166, 0.023394160969527032, 
-0.041742700485197244, -0.092318749069784767], [-0.041155910536744542, -0.079376500466470379, 0.069383563952551089, 
--0.025808288143568937, -0.057804585754595877], [0.067322663840799338, -0.050935940700877751, -0.00096017480149906942, 
-0.090779219975979944, -0.0082019477585116921], [0.042222863318603476, 0.020422672292478818, -0.078400481359387944, 
--0.013652691064998048, 0.075348831209193265]], [[0.36140988623246934, 0.27138768786405426, -0.099661201901465518, 
--0.17782760862364674, 0.39328606408749373], [0.17532783136714794, 0.33815093644628413, -0.29558014004971767, 
-0.10994559791042692, 0.24625266532206078], [-0.2868005226741005, 0.21699162781873782, 0.0040904298674163128, 
--0.38672753351865979, 0.034941025352910195], [-0.17987314490716688, -0.087002396425305384, 0.33399300843094154, 
-0.05816167557791295, -0.32099270796505402]], [[-0.21439334816043149, -0.16099093374902101, 0.059120404757285125, 
-0.1054897994230941, -0.23330273818331601], [-0.10400689694562466, -0.20059581713177532, 0.17534223132520102, 
--0.065221250855199434, -0.14608049038776863], [0.17013404074594465, -0.12872243782760667, -0.0024264996285318172, 
-0.22941212704834449, -0.020727499990828784], [0.1067032398665175, 0.051611026090206055, -0.19812927666739533, 
--0.034502311189541807, 0.1904173184444804]], [[-0.76961488607106099, -0.57791447448738409, 0.2122264704672889, 
-0.37868021867875962, -0.83749454825743386], [-0.37335699465597827, -0.72008543302695316, 0.62943180160519496, 
--0.23412687929466486, -0.52438996326909648], [0.61073578778907911, -0.46207918843335888, -0.0087104858951433054, 
-0.82352829290912299, -0.074406191613941852], [0.38303614593411683, 0.18526980573437093, -0.71123121122029997, 
--0.1238540865337735, 0.68354733996198058]], [[-0.12272169221623944, -0.092153417961307452, 0.033841330333130616, 
-0.060383807649975793, -0.13354568634803848], [-0.059534973938537496, -0.11482379626577513, 0.10036829747673767, 
--0.037333538293457001, -0.083618475731579267], [0.097387057775248739, -0.073682488435147575, -0.0013889616591680253, 
-0.13131864718690853, -0.011864705207099632], [0.061078397598303427, 0.029542859016628474, -0.1134119146831337, 
--0.019749596015373603, 0.10899748405113086]]], [[[-0.79863348902437969, -0.59970494525353391, 0.22022854500370298, 
-0.39295849098221425, -0.86907257801140547], [-0.38743455290472267, -0.74723651034063743, 0.65316475150981346, 
--0.24295471653367082, -0.54416227330651723], [0.63376379784448389, -0.47950204854797113, -0.0090389178632566507, 
-0.854579720038805, -0.077211703527486311], [0.39747866002369653, 0.19225546964127693, -0.73804843695221511, 
--0.12852404890887456, 0.70932073548375374]], [[-0.20217681289094538, -0.15181736825789072, 0.055751613159687574, 
-0.099478792709122327, -0.22000871038842668], [-0.098080388797362389, -0.18916549107022265, 0.16535090196916249, 
--0.061504821599211917, -0.13775654993757064], [0.16043948386184903, -0.12138759178323009, -0.0022882331265731298, 
-0.21633979357633437, -0.019546408147919796], [0.10062308903915929, 0.048670132979783821, -0.18683949870976127, 
--0.032536304757241431, 0.17956698233723689]], [[0.37643006251670602, 0.28266654621400961, -0.10380311632683918, 
--0.18521811489223666, 0.40963101268396923], [0.18261444702152321, 0.35220447197363247, -0.30786443546827302, 
-0.11451493130499873, 0.25648691342788416], [-0.29871993764606758, 0.22600978871084049, 0.0042604279223322225, 
--0.40279990992200482, 0.036393172569533699], [-0.18734866355849639, -0.090618211546141803, 0.3478737406838176, 
-0.060578871823631905, -0.33433314839918316]], [[0.5812482141886639, 0.43646733233607998, -0.16028309638398161, 
--0.28599654819472725, 0.63251402666141798], [0.28197620696566983, 0.54384131542323277, -0.47537556414000065, 
-0.17682328258788846, 0.39604318368197228], [-0.46125548299325869, 0.34898324857224478, 0.0065785556684257182, 
--0.6219660745271357, 0.056194944748236025], [-0.28928634284934673, -0.13992419543226015, 0.53715420384796075, 
-0.093540247103636481, -0.51624608340752354]], [[-0.1218551314477461, -0.091502705481339944, 0.033602370384887378, 
-0.059957426316596549, -0.13260269533723321], [-0.059114586378386305, -0.11401300401432811, 0.099659578199622775, 
--0.037069919213163119, -0.083028030071308212], [0.096699389587962634, -0.073162202635222676, -0.0013791539417136764, 
-0.13039138171518344, -0.011780926309689263], [0.060647111635689206, 0.029334251376441842, -0.11261109199099752, 
--0.019610140432652665, 0.10822783247741592]]], [[[-0.59328520531192452, -0.44550607564173661, 0.16360237747816228, 
-0.29191921226124556, -0.64561267460288085], [-0.28781561432617964, -0.55510365210903134, 0.48522005278717079, 
--0.18048509217446446, -0.40424478872786829], [0.47080756077829777, -0.35621029574880142, -0.0067147900933267014, 
-0.6348462863459412, -0.057358678304047152], [0.29527713483107981, 0.14282186678373002, -0.54827805803917784, 
--0.095477359505135612, 0.52693695414347641]], [[0.12938266744217228, 0.097155236490208713, -0.035678138959957584, 
--0.063661264467432865, 0.14079415637994674], [0.062766358539903672, 0.12105609675366458, -0.10581599568630604, 
-0.03935989377453164, 0.088157042509952072], [-0.10267294299613051, 0.077681758826455422, 0.0014643504436152503, 
--0.13844624003393141, 0.012508686772381773], [-0.064393554730631006, -0.031146359167736632, 0.11956758236003361, 
-0.020821546437543366, -0.11491354931915458]], [[-0.16229138283113692, -0.121866846549051, 0.044752938110824911, 
-0.079853622184873838, -0.17660540461231089], [-0.078731095316679475, -0.15184693383349121, 0.13273048550540764, 
--0.04937115391913232, -0.11057994566109892], [0.12878799168081792, -0.097440254633296031, -0.0018368106265078076, 
-0.1736602914986323, -0.015690293868757366], [0.080772171800503917, 0.039068491934953181, -0.14997981311259251, 
--0.026117544419479246, 0.14414201835323157]], [[0.31893386617242953, 0.23949185625322059, -0.087948154272072768, 
--0.15692776786425933, 0.34706367952115341], [0.15472178608192302, 0.29840850961467635, -0.26084100192324872, 
-0.09702383898722898, 0.21731091925889398], [-0.25309324122331284, 0.1914888923175822, 0.0036096871215169839, 
--0.34127596426927237, 0.030834453423513885], [-0.15873289500701665, -0.076777121255450886, 0.29473925731218981, 
-0.051326011716233542, -0.28326686475477719]], [[0.069251833389364539, 0.052002160593353122, -0.01909665787345043, 
--0.034074574032301415, 0.075359811731954704], [0.033595577290175149, 0.064795051832568853, -0.056637815930584499, 
-0.021067310326672823, 0.047185893912157745], [-0.054955502792842816, 0.041579017699931935, 0.00078379086588402738, 
--0.074103093851415627, 0.0066952514537382034], [-0.034466531040934868, -0.016671031123496133, 0.063998327257142426, 
-0.011144694210653387, -0.061507264682013472]]], [[[0.091085504673921791, 0.068397366682675223, -0.025117439277146856, 
--0.044817582732152486, 0.099119202305350165], [0.044187568220501509, 0.085223592036320711, -0.074494548305464231, 
-0.027709397705589417, 0.062062630693313713], [-0.072281836617252043, 0.054688022333656515, 0.0010309039210046522, 
--0.097466267259745679, 0.0088061258126374761], [-0.045333115681888685, -0.021927062562815951, 0.084175676674559649, 
-0.014658385878485595, -0.080899233572263585]], [[0.5363383089909517, 0.4027438626743749, -0.14789888859170799, 
--0.26389914203886228, 0.58364308946079668], [0.26018943082818941, 0.50182163893726106, -0.43864586588426235, 
-0.16316110408321133, 0.36544306930883058], [-0.42561676702392509, 0.32201920081022967, 0.0060702662591941309, 
--0.57391012052786816, 0.051853065358969122], [-0.26693475205694889, -0.12911300978328494, 0.49565120429890003, 
-0.086312898224021092, -0.47635854122060384]], [[-0.64187969728537131, -0.48199635253227857, 0.17700263480468623, 
-0.31582957727644223, -0.69849317735779204], [-0.31138986400404378, -0.60057078954196463, 0.5249632011910228, 
--0.19526817000022553, -0.43735545787192026], [0.50937021838114571, -0.38538658095302031, -0.0072647815820272984, 
-0.68684494144469888, -0.062056782702231299], [0.31946253879871667, 0.1545200449902904, -0.59318612830968787, 
--0.10329766875703894, 0.57009702852148991]], [[0.85783685581474456, 0.6441615731407685, -0.23655427076745766, 
--0.42208883173893413, 0.93349765323121836], [0.4161553995234889, 0.80262977622395504, -0.70158439943293305, 
-0.26096515235193757, 0.58450147658661045], [-0.68074523688741417, 0.51504793542481142, 0.0097089803850525878, 
--0.9179304276066419, 0.082935471522779011], [-0.42694408468235029, -0.20650752799226216, 0.79276058329022536, 
-0.13805164387390689, -0.76190327334621755]], [[0.57034583316556098, 0.42828058346510506, -0.15727669164039007, 
--0.28063215607515152, 0.6206500608843436], [0.27668722375205218, 0.53364056969685525, -0.46645901970543219, 
-0.17350663618198101, 0.38861466418771345], [-0.45260378669238094, 0.34243742485401502, 0.0064551627379562729, 
--0.61029995502360557, 0.05514090503807078], [-0.28386024457061743, -0.13729965938085395, 0.52707888721806551, 
-0.091785727450887866, -0.50656293709308775]]]])
+   def test_generalTensorProduct_array_rank3_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[[6.0, 2.0, -1.0], [4.0, 1.0, -6.0]], [[0.0, -4.0, -2.0], [5.0, 6.0, 2.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[4.0, 7.0, 3.0, 0.0, 1.0], [-2.0, 5.0, 0.0, -1.0, -4.0], [-1.0, 3.0, 0.0, 3.0, 0.0], [-7.0, 
+1.0, -6.0, -2.0, 4.0]], [[-4.0, -4.0, 0.0, 6.0, 2.0], [6.0, -2.0, -7.0, 5.0, 0.0], [-3.0, 1.0, -4.0, 0.0, 2.0], [-7.0, -1.0, 
+-7.0, 2.0, 0.0]], [[5.0, 1.0, 0.0, -1.0, 4.0], [2.0, -1.0, 2.0, 0.0, -2.0], [-4.0, -6.0, -7.0, 2.0, 0.0], [-7.0, -7.0, -6.0, 
+-4.0, -2.0]]], [[[5.0, -3.0, 6.0, 6.0, 3.0], [0.0, -1.0, 0.0, 6.0, 6.0], [-1.0, -4.0, 7.0, 6.0, -2.0], [0.0, 2.0, -2.0, 6.0, 
+0.0]], [[3.0, -2.0, -3.0, -2.0, -7.0], [-1.0, -2.0, -3.0, -1.0, 1.0], [5.0, -6.0, 6.0, -3.0, 0.0], [-4.0, -5.0, 5.0, -1.0, 
+0.0]], [[4.0, 0.0, 0.0, -3.0, 0.0], [-1.0, -6.0, 4.0, 3.0, 6.0], [2.0, -4.0, -2.0, -4.0, 0.0], [3.0, 5.0, -2.0, -3.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -5.0, -3.0, -1.0, -7.0], [-6.0, 6.0, 1.0, -2.0, -4.0], [-5.0, 6.0, -5.0, -6.0, 
+-4.0], [-1.0, 1.0, -7.0, 3.0, 7.0]], [[1.0, 7.0, -3.0, 6.0, 0.0], [-1.0, 2.0, 6.0, 5.0, 5.0], [-7.0, 1.0, 5.0, -1.0, -7.0], 
+[1.0, -4.0, 0.0, 1.0, 3.0]], [[-4.0, -4.0, 1.0, 3.0, -5.0], [0.0, 0.0, -3.0, -2.0, 6.0], [-6.0, -5.0, 2.0, -6.0, 0.0], [-2.0, 
+-6.0, -4.0, -4.0, -2.0]]], [[[-1.0, -2.0, 3.0, 0.0, -2.0], [0.0, 3.0, -6.0, 2.0, 3.0], [4.0, 6.0, -1.0, 3.0, -3.0], [3.0, 7.0, 
+5.0, -3.0, 3.0]], [[-1.0, 5.0, -7.0, 1.0, 1.0], [-4.0, 5.0, -3.0, 0.0, -5.0], [-1.0, 1.0, 0.0, 7.0, -1.0], [-5.0, -6.0, -7.0, 
+-5.0, 5.0]], [[-6.0, 0.0, 6.0, 3.0, 2.0], [3.0, 4.0, 2.0, 0.0, -1.0], [5.0, 0.0, -4.0, -3.0, -6.0], [7.0, 1.0, -6.0, 0.0, 
+-3.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[10.0, 19.0, 39.0, 53.0, 11.0], [3.0, 57.0, -43.0, 9.0, -33.0], [-19.0, 28.0, 45.0, 61.0, 
+-4.0], [-71.0, -16.0, -35.0, 37.0, 62.0]], [[57.0, -13.0, 12.0, -10.0, -43.0], [-36.0, -19.0, 14.0, 10.0, 52.0], [49.0, -56.0, 
+97.0, 0.0, -18.0], [24.0, 8.0, 56.0, 18.0, -8.0]]])+(1.-msk_ref)*numpy.array([[[61.0, -15.0, -56.0, -14.0, -56.0], [-60.0, 
+33.0, -18.0, 8.0, -7.0], [-53.0, 68.0, -2.0, 5.0, -15.0], [-37.0, 20.0, 11.0, 7.0, 85.0]], [[-19.0, 0.0, -5.0, -18.0, 10.0], 
+[-14.0, 45.0, -62.0, -6.0, -49.0], [64.0, 42.0, -37.0, 67.0, -5.0], [-1.0, 29.0, -21.0, -41.0, 31.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_array_rank3(self):
-      arg0=Data(0.63085697321,self.functionspace)
-      arg1=numpy.array([[[0.7511494295457346, -0.63812308385015082], [-0.79031758533022489, 0.72347714731302926]], 
-[[-0.1549764196296024, -0.42229395140139703], [0.84788909172282212, 0.61113423428304059]], [[0.055651654082436774, 
-0.84180242209460854], [0.67477676686322829, -0.31421937445641834]], [[-0.039714909406222576, 0.36656647335745873], 
-[-0.54627624730718272, -0.40593534119731323]], [[-0.90428276936389351, -0.34475114430785903], [0.57493034903473594, 
-0.067723576808715213]], [[-0.65528381944986314, 0.75340720688533924], [0.90833199251890773, 0.61485294800008217]]])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[0.47386785555184341, -0.40256439721330978], [-0.49857735975627532, 0.45641060334069861]], 
-[[-0.09776795500649571, -0.26640708398609037], [0.53489674602226489, 0.3855382932649753]], [[0.035108234048591057, 
-0.53105692804367921], [0.42568762873594851, -0.19822748349360064]], [[-0.025054427539329675, 0.23125101586264965], 
-[-0.34462217991287447, -0.25608714066681543]], [[-0.57047309080710695, -0.2174886634088331], [0.36269881979877788, 
-0.04272389068051935]], [[-0.41339036693180603, 0.47529219013048912], [0.57302757147053218, 
-0.38788426974474366]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_expandedData_rank3_offset0(self):
+      arg0=numpy.array([-6.0, 6.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[7.0, -1.0], [-5.0, 3.0]], [[2.0, 3.0], [2.0, -2.0]], [[0.0, 0.0], [-5.0, -1.0]], [[-2.0, 
+0.0], [-6.0, -4.0]], [[-3.0, -3.0], [7.0, -7.0]], [[5.0, 0.0], [-5.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 7.0], [3.0, 
+6.0]], [[-7.0, -4.0], [-7.0, -4.0]], [[0.0, 3.0], [3.0, 0.0]], [[-7.0, -3.0], [7.0, -2.0]], [[-6.0, 0.0], [6.0, -6.0]], [[7.0, 
+0.0], [2.0, -5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-42.0, 6.0], [30.0, -18.0]], [[-12.0, -18.0], [-12.0, 12.0]], [[0.0, 0.0], [30.0, 6.0]], 
+[[12.0, 0.0], [36.0, 24.0]], [[18.0, 18.0], [-42.0, 42.0]], [[-30.0, 0.0], [30.0, 18.0]]], [[[42.0, -6.0], [-30.0, 18.0]], 
+[[12.0, 18.0], [12.0, -12.0]], [[0.0, 0.0], [-30.0, -6.0]], [[-12.0, 0.0], [-36.0, -24.0]], [[-18.0, -18.0], [42.0, -42.0]], 
+[[30.0, 0.0], [-30.0, -18.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -42.0], [-18.0, -36.0]], [[42.0, 24.0], [42.0, 24.0]], 
+[[0.0, -18.0], [-18.0, 0.0]], [[42.0, 18.0], [-42.0, 12.0]], [[36.0, 0.0], [-36.0, 36.0]], [[-42.0, 0.0], [-12.0, 30.0]]], 
+[[[0.0, 42.0], [18.0, 36.0]], [[-42.0, -24.0], [-42.0, -24.0]], [[0.0, 18.0], [18.0, 0.0]], [[-42.0, -18.0], [42.0, -12.0]], 
+[[-36.0, 0.0], [36.0, -36.0]], [[42.0, 0.0], [12.0, -30.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_array_rank3(self):
-      arg0=Data(numpy.array([-0.37351169248831639, 0.754681078152595]),self.functionspace)
-      arg1=numpy.array([[[0.33151316835686417, -0.47169541761088807], [-0.27677524227489081, -0.10665081466068571]], 
-[[-0.41169023354507717, 0.80275407203831062], [0.67347081713473345, -0.21720762663964099]], [[-0.57688106717229926, 
-0.53185800711579634], [0.78853005774813067, -0.23925046278153528]], [[0.65670628554389765, 0.52680954318837214], 
-[0.70580059327607159, 0.99072646018628818]], [[-0.47118853616110168, -0.077236143350451369], [-0.74397504936769643, 
-0.43281688949676145]], [[0.061635190625851877, -0.97480843561904251], [0.69244102903953375, 0.35790333135525043]]])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.12382404459513652, 0.17618375377082601], [0.10337878918095829, 0.03983532628917047]], 
-[[0.15377111591233203, -0.29983803209891724], [-0.25154922474948371, 0.081129588247542628]], [[0.21547182376399163, 
--0.1986551844012841], [-0.29452519644741415, 0.089362845282144193]], [[-0.2452874761812168, -0.1967695240952857], 
-[-0.26362477415380331, -0.37004791693713912]], [[0.17599442762262535, 0.028848602624097316], [0.27788337985840705, 
--0.16166216893346397]], [[-0.023021464367501947, 0.36410234863995655], [-0.25863482070490768, -0.13368107904170631]]], 
-[[[0.25018671531734099, -0.35597960632222353], [-0.20887703824596029, -0.080487351793978881]], [[-0.31069482931669246, 
-0.60582330857725819], [0.50825568237954977, -0.16392248585537059]], [[-0.43536122573941038, 0.40138317423423975], 
-[0.5950887141370873, -0.18055779720047635]], [[0.49560380760385458, 0.39757319403447677], [0.53265435269432693, 
-0.74768251312769196]], [[-0.35559707248320321, -0.058288655936067017], [-0.56146389237544325, 0.3266387168080685]], 
-[[0.046514912113658609, -0.73566948118522346], [0.52257214235264771, 0.27010287198158583]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_expandedData_rank4_offset1(self):
+      arg0=numpy.array([[-2.0, -6.0, 2.0], [-5.0, 6.0, 3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[5.0, 2.0], [5.0, 4.0]], [[-3.0, 0.0], [-4.0, 0.0]], [[-1.0, -1.0], [-2.0, 5.0]], [[-7.0, 
+0.0], [-4.0, -4.0]], [[-1.0, 0.0], [7.0, -2.0]], [[-2.0, 3.0], [-3.0, -2.0]]], [[[0.0, -4.0], [0.0, -3.0]], [[-6.0, -1.0], 
+[1.0, -3.0]], [[3.0, -7.0], [6.0, -6.0]], [[7.0, 5.0], [-2.0, 3.0]], [[6.0, 1.0], [-6.0, 7.0]], [[7.0, -3.0], [2.0, 0.0]]], 
+[[[7.0, 5.0], [2.0, -2.0]], [[-4.0, -2.0], [-7.0, 0.0]], [[-4.0, -2.0], [5.0, -1.0]], [[-6.0, 6.0], [-4.0, -2.0]], [[6.0, 
+-2.0], [5.0, -1.0]], [[-4.0, 0.0], [-5.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, 7.0], [2.0, -7.0]], [[3.0, 4.0], [5.0, 
+3.0]], [[6.0, -5.0], [6.0, -7.0]], [[-2.0, 6.0], [5.0, 3.0]], [[-3.0, -7.0], [-5.0, 0.0]], [[7.0, 4.0], [4.0, -2.0]]], [[[2.0, 
+-4.0], [-2.0, -6.0]], [[-6.0, -7.0], [0.0, 6.0]], [[5.0, 6.0], [3.0, 5.0]], [[2.0, 6.0], [-4.0, 6.0]], [[-3.0, -4.0], [-6.0, 
+-2.0]], [[2.0, 1.0], [6.0, 2.0]]], [[[2.0, 3.0], [7.0, 5.0]], [[-4.0, 3.0], [4.0, 1.0]], [[2.0, -7.0], [-4.0, -6.0]], [[-4.0, 
+0.0], [-2.0, 7.0]], [[-7.0, 6.0], [2.0, 4.0]], [[6.0, 4.0], [4.0, 1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[4.0, 30.0], [-6.0, 6.0]], [[34.0, 2.0], [-12.0, 18.0]], [[-24.0, 40.0], [-22.0, 24.0]], 
+[[-40.0, -18.0], [12.0, -14.0]], [[-22.0, -10.0], [32.0, -40.0]], [[-46.0, 12.0], [-16.0, 10.0]]], [[[-4.0, -19.0], [-19.0, 
+-44.0]], [[-33.0, -12.0], [5.0, -18.0]], [[11.0, -43.0], [61.0, -64.0]], [[59.0, 48.0], [-4.0, 32.0]], [[59.0, 0.0], [-56.0, 
+49.0]], [[40.0, -33.0], [12.0, 19.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 16.0], [22.0, 60.0]], [[22.0, 40.0], [-2.0, -40.0]], 
+[[-38.0, -40.0], [-38.0, -28.0]], [[-16.0, -48.0], [10.0, -28.0]], [[10.0, 50.0], [50.0, 20.0]], [[-14.0, -6.0], [-36.0, 
+-6.0]]], [[[48.0, -50.0], [-1.0, 14.0]], [[-63.0, -53.0], [-13.0, 24.0]], [[6.0, 40.0], [-24.0, 47.0]], [[10.0, 6.0], [-55.0, 
+42.0]], [[-24.0, 29.0], [-5.0, 0.0]], [[-5.0, -2.0], [28.0, 25.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_constData_rank3(self):
-      arg0=Data(-0.22015011451,self.functionspace)
-      arg1=Data(numpy.array([[[0.21611300599883188, 0.85367468515937839], [0.20206252928537971, -0.33534565187777221]], 
-[[-0.28753014455938852, 0.94369326713724155], [0.5960541281912437, -0.35610462964096889]], [[-0.43821404099900829, 
-0.71729335722593879], [0.96696190055936571, -0.11902778733421071]], [[-0.52697654397718829, -0.74626763346059466], 
-[-0.894797071002152, 0.51441543102202125]], [[0.13108682526670457, -0.12314148797673896], [0.97800726769710322, 
--0.31679390749747505]], [[0.60304956080461203, -0.17187084537541608], [0.20646553622807273, 
--0.79892531291287883]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[-0.04757730301771268, -0.18793657969200497], [-0.044484088960328079, 0.073826383661274864]], 
-[[0.063299794249785699, -0.20775418082244668], [-0.13122138457537647, 0.07839647499295023]], [[0.096472871305759725, 
--0.15791221473045161], [-0.21287677313481526, 0.026203981011481633]], [[0.11601394650058774, 0.1642909049613514], 
-[0.19698967764421019, -0.11324861604513645]], [[-0.028858779593198887, 0.027109612678993505], [-0.21530841197499159, 
-0.069742215011594805]], [[-0.13276142986625553, 0.037837386290304122], [-0.045453411442949655, 
-0.17588349912259521]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_float_rank0_offset0(self):
+      arg0=numpy.array([[-4.0, 0.0, -3.0, -4.0, -6.0], [3.0, 3.0, -3.0, 2.0, -3.0], [-4.0, 2.0, 5.0, -6.0, 4.0], [-3.0, 5.0, 
+1.0, -6.0, 0.0]])
+      arg1=0.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-0.0, 0.0, -0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 
+0.0, -0.0, 0.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_constData_rank3(self):
-      arg0=Data(numpy.array([-0.6964528596908941, 0.14349836695029716]),self.functionspace)
-      arg1=Data(numpy.array([[[0.18464657487749325, -0.13451960456249568], [-0.15051112471229877, -0.95360578587102784]], 
-[[0.48599623445465157, 0.94785127929647262], [-0.80233042263825016, -0.29668787050614687]], [[0.97413159829837248, 
-0.8251455931670626], [0.30707955779124552, -0.98124009531244316]], [[-0.19974203930633738, -0.76739425913226422], 
-[-0.6100504802439064, 0.089384999831634726]], [[-0.94203847780455074, 0.14571372034187569], [-0.62694687714414532, 
--0.2985007731314655]], [[0.04558018528447616, 0.32028111128322179], [0.88398088330267788, 
--0.87923676066261702]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.12859763510555897, 0.093686563282038365], [0.10482390322117328, 0.66414147658765976]], 
-[[-0.33847346728494832, -0.6601337340277007], [0.55878531726341296, 0.20662911584960766]], [[-0.67843673735016286, 
--0.57467500802253979], [-0.21386643617632811, 0.6833874704237165]], [[0.13911091447538965, 0.53445392628304045], 
-[0.42487140152167191, -0.062252438746212092]], [[0.65608539180583625, -0.10148273722829852], [0.43663894546131565, 
-0.20789171706735196]], [[-0.031744450386614234, -0.22306069585817731], [-0.61565101408823253, 0.61234695630883784]]], 
-[[[0.026496481957886047, -0.019303343577517874], [-0.021598100604067388, -0.13684087298684725]], [[0.069739665988236249, 
-0.13601511069079383], [-0.11513310540313063, -0.042574224911593309]], [[0.13978629355049932, 0.11840704511570777], 
-[0.04406541506686313, -0.14080635126348953]], [[-0.028662656451781482, -0.11011982299251308], [-0.087541247672245096, 
-0.01282660150569217]], [[-0.1351809831692968, 0.020909680911311457], [-0.089965853034773433, -0.042834373477766439]], 
-[[0.0065406821536142948, 0.045959816434168722], [0.12684981316921548, -0.12616903931775481]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_expandedData_rank3(self):
-      arg0=Data(0.11946137623,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.60009572891304597, -0.90370197398073504], [0.24596895409604413, -0.62521236806063096]], 
-[[0.73989407342463687, 0.98218131541014264], [-0.8161448228849888, -0.76997935470965029]], [[0.93799867068875042, 
-0.15725815651379604], [0.04143890929725047, -0.3138816191100573]], [[0.18267431352457963, -0.74895957924499701], 
-[-0.18371856301252509, 0.46216104492375054]], [[0.19599041150492469, 0.47743431899460353], [0.6887260182789392, 
-0.83062239870725207]], [[0.3689738891803549, 0.46162556151726752], [-0.81813499745096308, 
--0.45772317035683363]]])+(1.-msk_arg1)*numpy.array([[[0.67627092574222458, 0.29414155783672391], [0.18312599623788461, 
--0.83022275044559457]], [[0.74444175782501998, -0.83170336216878682], [-0.68427091786799332, 0.52224497857627394]], 
-[[0.74612578255800099, 0.2171108033711453], [-0.90597048931563728, 0.99802670455100317]], [[-0.13764985206780667, 
-0.34424923204205204], [-0.77946707677156035, -0.14045604097079534]], [[-0.67766328759702876, -0.0061437012722671547], 
-[0.68403256260133172, -0.36106006739046248]], [[-0.73725728883864083, -0.70852286233785988], [0.94731906938117993, 
--0.29743929808334824]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.071688261645656878, -0.10795748151344513], [0.029383789766150491, -0.074688729924497987]], 
-[[0.088388764275677739, 0.11733273164622091], [-0.097497783744775149, -0.091982793382250072]], [[0.11205461210232524, 
-0.018786275800520176], [0.0049503491341168805, -0.037496730192166879]], [[0.02182252489550443, -0.089471742077198421], 
-[-0.021947272376461796, 0.055210394466454836]], [[0.023413284286249073, 0.057034960806495873], [0.082276157988963622, 
-0.099227294876975916]], [[0.044078128594395742, 0.055146424881768082], [-0.097735532737364253, 
--0.054680239863155122]]])+(1.-msk_ref)*numpy.array([[[0.080788255493456543, 0.035138555305591283], [0.021876483534055111, 
--0.099179552345630417]], [[0.088932036912806905, -0.099356428259745139], [-0.081743945562629497, 0.062388103869893227]], 
-[[0.08913321282501406, 0.025936355365103254], [-0.10822848147735126, 0.11922564363988694]], [[-0.016443840765866784, 
-0.041124487025840865], [-0.093116209717052936, -0.016779071954178975]], [[-0.080954588956841503, -0.00073393500913062064], 
-[0.081715471314442442, -0.043132732552136767]], [[-0.088073770360212786, -0.084641116225251653], [0.11316803975713453, 
--0.03553250789390186]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank0_offset0(self):
+      arg0=numpy.array([[-6.0, -7.0, -2.0, 4.0, -3.0], [6.0, -2.0, 4.0, 6.0, 4.0], [-5.0, 0.0, -1.0, -3.0, -7.0], [0.0, -5.0, 
+7.0, -3.0, 2.0]])
+      arg1=numpy.array(-2.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[12.0, 14.0, 4.0, -8.0, 6.0], [-12.0, 4.0, -8.0, -12.0, -8.0], [10.0, -0.0, 2.0, 6.0, 14.0], [-0.0, 
+10.0, -14.0, 6.0, -4.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank1_expandedData_rank3(self):
-      arg0=Data(numpy.array([-0.28740085940932802, 0.24764677399374602]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.67242579391337953, -0.89317712926090165], [-0.99701004112330294, 0.89526514770181609]], 
-[[-0.91740715313646759, -0.35134117664448827], [-0.049093269571241605, 0.15259130609547955]], [[0.88272014101965879, 
--0.4251717004763671], [0.022740311589840356, -0.60226254447714189]], [[-0.63411600184138606, -0.57221024361603012], 
-[-0.72835035653650548, 0.47257931918100105]], [[0.63109086308110807, -0.78774731648430785], [0.032191936052698766, 
-0.29192410722269302]], [[-0.8070392067870551, 0.25497980893334793], [-0.57544468016613104, 
--0.18247344197239346]]])+(1.-msk_arg1)*numpy.array([[[-0.72180000146745971, 0.67186892782174601], [0.15238074428723825, 
--0.38705902177094997]], [[0.029915034122554252, 0.44216489583112395], [0.42650164147091751, 0.11272393150830373]], 
-[[0.36411532614042019, -0.93726403450581586], [0.037190266021924545, 0.10796202997472304]], [[-0.18544138361845919, 
--0.59619018146266511], [-0.18514933596332872, 0.1897906248393959]], [[0.72764377986819939, 0.18040101973592271], 
-[-0.44782228345532848, 0.088378488666651434]], [[-0.17616843716837183, -0.57623381041958188], [0.6551520906908892, 
--0.97896984058814596]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.19325575105970497, 0.25669987455433962], [0.28654154265856674, -0.25729997284872091]], 
-[[0.26366360423968577, 0.10097575611351045], [0.01410944786598865, -0.043854872510232658]], [[-0.25369452714697316, 
-0.1221947121134333], [-0.0065355850941560207, 0.17309077287277921]], [[0.18224548389442138, 0.164453715778068], 
-[0.20932851841968214, -0.13581970247169484]], [[-0.18137605641488502, 0.22639925575498199], [-0.0092519900875957569, 
--0.083899239298102793]], [[0.23194376160762203, -0.073281416219470444], [0.16538329562227197, 0.052443024042244026]]], 
-[[[0.16652407861283194, -0.22119243466645738], [-0.24690632032355803, 0.2217095256973893]], [[-0.22719292191303272, 
--0.087008508967174381], [-0.012157789834123318, 0.037788744694037743]], [[0.21860279526282306, -0.10529240001640756], 
-[0.005631564804836558, -0.14914837623702917]], [[-0.15703678219383158, -0.14170602087768536], [-0.18037361613346031, 
-0.11703274385133573]], [[0.15628761633896529, -0.19508308164956931], [0.0079722291120638156, 0.072294063404704331]], 
-[[-0.1998606560472859, 0.06314492711588536], [-0.14250701865500531, 
--0.045188959243998253]]]])+(1.-msk_ref)*numpy.array([[[[0.20744594074340214, -0.19309570726639358], [-0.043794356865585325, 
-0.11124109549910483]], [[-0.0085976065160814647, -0.12707857106250103], [-0.1225769382982308, -0.032396954791484724]], 
-[[-0.10464705765686452, 0.26937048901042554], [-0.010688514416362645, -0.031028380198311035]], [[0.053296013022000051, 
-0.17134557052377317], [0.053212078274927077, -0.054545988686675741]], [[-0.20912544767797239, -0.051847408110423335], 
-[0.12870450912770912, -0.025400053596093177]], [[0.050630960242988271, 0.16561009233529964], [-0.18829127390837958, 
-0.28135677352084598]]], [[[-0.17875144183209754, 0.16638617252169238], [0.037736599741500496, -0.095853918086750867]], 
-[[0.0074083616943633928, 0.10950071002585861], [0.10562175561331, 0.0279157179899234]], [[0.090171985880355757, 
--0.23211041452572834], [0.0092100494042988389, 0.026736448437056269]], [[-0.045923960418048117, -0.14764457512597506], 
-[-0.04585163575840262, 0.04700103597573372]], [[0.18019863470097505, 0.044675730562783365], [-0.110901743820225, 
-0.021886647608739072]], [[-0.043627545144267227, -0.14270244421653328], [0.16224630173485682, -0.24243872285882614]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank1_offset1(self):
+      arg0=numpy.array([[[6.0, -7.0, 0.0], [0.0, 1.0, 6.0], [-1.0, 6.0, 6.0], [-4.0, 2.0, 4.0], [-6.0, 6.0, 5.0]], [[-5.0, 6.0, 
+4.0], [6.0, -5.0, -7.0], [-3.0, 1.0, -6.0], [-3.0, 2.0, 0.0], [1.0, -1.0, 5.0]], [[4.0, 0.0, -6.0], [-1.0, 5.0, -6.0], [0.0, 
+-6.0, -3.0], [0.0, 4.0, 7.0], [-1.0, -4.0, 0.0]], [[-2.0, -4.0, -1.0], [0.0, 0.0, 5.0], [-4.0, -4.0, 0.0], [-5.0, 1.0, -7.0], 
+[6.0, 4.0, 0.0]]])
+      arg1=numpy.array([-7.0, -5.0, -5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[-7.0, -35.0, -53.0, -2.0, -13.0], [-15.0, 18.0, 46.0, 11.0, -27.0], [2.0, 12.0, 45.0, -55.0, 27.0], 
+[39.0, -25.0, 48.0, 65.0, -62.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_array_rank4(self):
-      arg0=Data(-0.448440211752,self.functionspace)
-      arg1=numpy.array([[[[-0.25515102245128873, 0.36730616433963759, 0.17450639786221234, -0.36562008126248435], 
-[0.35434412138378724, -0.0087194181035530338, -0.82333920735532318, 0.93803882900265978], [-0.60591702633892441, 
-0.63607654180945716, 0.31940940747376056, 0.15366531796524296]], [[-0.86048365345962585, -0.011426882553942974, 
--0.43114257438679471, 0.9724566228920053], [-0.25770702633276033, 0.46387524920783285, -0.13014386176362192, 
-0.78555502852532433], [-0.71597477612394567, 0.93125380345187714, -0.01746761040089484, -0.30285112237192524]]], 
-[[[-0.13998741907158574, 0.32762499088219132, -0.68181548853288021, -0.72915647255318494], [-0.063111239566042032, 
--0.34496963082412591, 0.52408052730259103, -0.97614011386580235], [0.21818049843376852, -0.99285280659954767, 
--0.94141588395163112, 0.23244192959824495]], [[0.38929568410850446, 0.33251835049575984, -0.28250822038803847, 
-0.68001471362974253], [-0.0057615102952528474, -0.27448682595580909, -0.41348165426752881, 0.36856267355724026], 
-[0.20140002479968566, 0.3740960197975931, 0.96136038238721211, 0.11315580646280576]]], [[[-0.084662037656419331, 
--0.77212322168240699, 0.34567399161637669, 0.45692298418094368], [0.64724676592952934, 0.79532036096776637, 
-0.43505835701500573, -0.46844161826170061], [-0.68218528288427494, 0.34353392644124114, 0.4129843557441697, 
-0.40791753970232913]], [[0.89919955957474107, 0.80499016523171996, 0.96080359935353998, -0.26014772593819702], 
-[-0.15237087519497927, 0.92286473964411764, 0.62941743892544189, -0.3482537369458607], [0.32637149670430898, 
--0.58702804227088135, 0.48043802099880728, -0.424008055959604]]]])
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.1144199785366858, -0.16471485411412445, -0.078255686009334413, 0.16395874666197513], 
-[-0.15890215282626996, 0.0039101377007078053, 0.36921840848979187, -0.42065433110914857], [0.27171755959530958, 
--0.28524229909924004, -0.14323602232297705, -0.06890970772720606]], [[0.38587547176620018, 0.0051242736321505207, 
-0.19334166735313171, -0.43608865388890861], [0.11556619345853075, -0.20802031498107337, 0.05836174092744581, 
--0.35227446333440793], [0.32107188021380589, -0.41761165281441576, 0.0078331789069712287, 0.13581062144566713]]], 
-[[[0.062775987851017831, -0.14692022028631643, 0.3057534820531857, 0.32698308295177891], [0.028301617634900023, 
-0.15469825429463233, -0.23501878263844897, 0.43774047936118315], [-0.097840908917702488, 0.44523512282964284, 
-0.42216873834556196, -0.10423630812898074]], [[-0.17457583901559048, -0.1491145995076017, 0.12668804617237148, 
--0.30494594217430571], [0.0025836928968120437, 0.12309093035463968, 0.18542180059512053, -0.16527832337373399], 
-[-0.090315869767942716, -0.16775969833345258, -0.43111265344729277, -0.050743613811100416]]], [[[0.037965862093964173, 
-0.34625110102956386, -0.15501411799745879, -0.20490263978026216], [-0.29025147676895774, -0.35665363108272113, 
--0.19509766174409979, 0.21006805848652566], [0.30591931271042971, -0.15405442671715883, -0.18519879194000163, 
--0.18292662788129241]], [[-0.40323724090261637, -0.36098996015444473, -0.43086296954577319, 0.11666070130641476], 
-[0.068329227537208714, -0.41384965926406664, -0.28225608959185672, 0.15617097953927772], [-0.14635810309175751, 
-0.26324697958006427, -0.21544772787021091, 0.19014226239889684]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_array_rank2_offset2(self):
+      arg0=numpy.array([[[[-4.0, 1.0, -1.0], [-1.0, -4.0, 1.0]], [[0.0, -7.0, 0.0], [0.0, 6.0, 2.0]], [[-6.0, 7.0, 1.0], [7.0, 
+-5.0, 6.0]], [[-2.0, 0.0, 4.0], [2.0, -3.0, -3.0]], [[3.0, 5.0, -4.0], [4.0, 4.0, 2.0]]], [[[-3.0, -3.0, 7.0], [7.0, -1.0, 
+5.0]], [[-3.0, -7.0, -7.0], [7.0, -5.0, 5.0]], [[2.0, -4.0, -1.0], [-4.0, -2.0, 0.0]], [[6.0, -5.0, -3.0], [6.0, -1.0, 0.0]], 
+[[-6.0, -1.0, 5.0], [0.0, 6.0, 3.0]]], [[[4.0, 6.0, -2.0], [3.0, -6.0, -4.0]], [[2.0, -4.0, 1.0], [0.0, -6.0, -4.0]], [[-7.0, 
+-1.0, -1.0], [-1.0, 5.0, -6.0]], [[6.0, -7.0, -7.0], [0.0, -3.0, -4.0]], [[2.0, 3.0, 3.0], [1.0, 6.0, -1.0]]], [[[-2.0, 5.0, 
+-2.0], [7.0, 1.0, -6.0]], [[-7.0, -4.0, 1.0], [3.0, 0.0, 5.0]], [[-3.0, -4.0, 6.0], [-7.0, -3.0, 0.0]], [[6.0, -7.0, 7.0], 
+[-5.0, 6.0, -6.0]], [[1.0, -1.0, -2.0], [7.0, -1.0, 0.0]]]])
+      arg1=numpy.array([[2.0, 1.0, 3.0], [-7.0, -6.0, -1.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[20.0, -45.0, -27.0, 15.0, -55.0], [-36.0, -58.0, 37.0, -38.0, -37.0], [27.0, 43.0, -35.0, 6.0, -26.0], 
+[-54.0, -41.0, 75.0, 31.0, -48.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_constData_rank4(self):
-      arg0=Data(-0.417410053051,self.functionspace)
-      arg1=Data(numpy.array([[[[-0.94576928300862351, -0.62048842948887883, -0.39889033328627965, -0.017179219367599252], 
-[-0.096071312182654411, 0.091364138729949085, 0.10187595078927769, 0.47143692177797614], [0.46966210476308135, 
-0.43389890996641811, 0.23972434500924034, 0.63268538631155091]], [[0.38944441855279255, -0.91092437832945938, 
-0.90538426583677034, -0.52350775380487624], [0.17979340245138054, 0.7143507616587641, -0.40349151482927992, 
--0.82811672312040918], [0.078986528205921003, -0.9170053419240094, 0.61367718689934736, 0.76517759465324175]]], 
-[[[0.043013142565961893, 0.13675292997260069, 0.17643812054635499, -0.76496364495945546], [-0.36356111513980127, 
-0.69414565540107609, -0.5927406081713007, -0.063802585021933922], [-0.69540657661054039, -0.97942078046711467, 
-0.68334764317920427, -0.84217667903769078]], [[0.86049775957003605, 0.81374832485360726, 0.85720321784346187, 
-0.68990788631562938], [0.26635690263035317, -0.24450877678071303, -0.90021483752868448, 0.68721263455353809], 
-[0.1715336960840641, 0.10045919693030037, 0.15564365826854853, -0.16002747995296263]]], [[[-0.86904748630712514, 
-0.74810020405840127, 0.36169408128210412, 0.27880264117974929], [0.97015926227527594, 0.67344800575323349, 0.6377297902349004, 
--0.14473893506001301], [0.054955764189549949, -0.15602273858521687, 0.50576167221108159, 0.63985303207983679]], 
-[[-0.69541655011200687, 0.87626714412326745, 0.96026810922009309, -0.048868982009782957], [-0.66540954681536535, 
-0.56553627820198216, 0.87398572584185885, 0.43190709586551845], [0.15933540203546537, -0.5872633487310277, 
--0.44598472235855247, 0.1405540914022323]]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      ref=Data(numpy.array([[[[0.39477360659474714, 0.25899810827055769, 0.16650083517860403, 0.0071707788676063939], 
-[0.040101131514852277, -0.038136309994237734, -0.042524046023585463, -0.19678251052960069], [-0.19604168406525743, 
--0.18111376702790477, -0.10006335156795147, -0.26408924066497141]], [[-0.16255801540858286, 0.38022899308405611, 
--0.37791649443457365, 0.21851739928836489], [-0.075047573655471725, -0.29817718932109111, 0.16842141461056562, 
-0.34566424533020779], [-0.032969770928757094, 0.38276724842065918, -0.25615502713991728, -0.31939282037773636]]], 
-[[[-0.017954118120353448, -0.057082047754759051, -0.073647045257493549, 0.31930351562470272], [0.15175406435782798, 
--0.28974337484616608, 0.24741588870233444, 0.02663184039880389], [0.29026969603510189, 0.40882007993414554, 
--0.28523617599178797, 0.35153301227553668]], [[-0.35918041547249674, -0.33966673144740245, -0.3578052406356283, 
--0.2879744874273914], [-0.11118004885746713, 0.10206042148750134, 0.37575872309025155, -0.28684946224639074], 
-[-0.071599889182503512, -0.041932678720149365, -0.064967227654944892, 0.066797078896802822]]], [[[0.36274915736339763, 
--0.31226454586356933, -0.15097474565623839, -0.11637502524563091], [-0.40495422913435619, -0.28110396780862668, 
--0.26619482557422797, 0.060415486561962321], [-0.022939088445824762, 0.065125459590036058, -0.21111000642884961, 
--0.26708108806536324]], [[0.29027385907487807, -0.36576271511544456, -0.40082556241285561, 0.020398404373257625], 
-[0.27774863423692187, -0.23606052788662107, -0.36481042818956999, -0.18028236379838028], [-0.066508198616544778, 
-0.24512962554879536, 0.18615850661967143, -0.058668690748757441]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank1_offset0(self):
+      arg0=numpy.array([[5.0, -7.0, -6.0, -3.0, -3.0], [5.0, 6.0, -4.0, 7.0, 4.0], [6.0, 2.0, 3.0, 6.0, 7.0], [1.0, 5.0, -5.0, 
+-5.0, 7.0]])
+      arg1=numpy.array([-6.0, 4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-30.0, 20.0], [42.0, -28.0], [36.0, -24.0], [18.0, -12.0], [18.0, -12.0]], [[-30.0, 20.0], [-36.0, 
+24.0], [24.0, -16.0], [-42.0, 28.0], [-24.0, 16.0]], [[-36.0, 24.0], [-12.0, 8.0], [-18.0, 12.0], [-36.0, 24.0], [-42.0, 
+28.0]], [[-6.0, 4.0], [-30.0, 20.0], [30.0, -20.0], [30.0, -20.0], [-42.0, 28.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_constData_rank0_expandedData_rank4(self):
-      arg0=Data(0.0446296352099,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.83493992475885648, 0.26024474473146442, -0.27641842981279918, 0.39870398910379912], 
-[-0.43615518465977599, 0.1307617326084376, 0.86325047901245844, -0.84740155321183575], [-0.34277425115768612, 
--0.99665619154375484, 0.62572624536880328, -0.36861771215142802]], [[0.16172507619941046, -0.055604708141027581, 
--0.90158191963756384, -0.67799237877879848], [0.44875857145027864, 0.91322040050478948, 0.35541011910030074, 
--0.42252559157082814], [0.71841452661281235, -0.42399254291293587, 0.011968355890833005, -0.53503912065223402]]], 
-[[[0.21733911718324173, 0.82586341121125884, -0.20351620055918773, 0.26849828803684539], [-0.0027675040975294607, 
--0.90282176942342085, 0.45961809987326774, -0.11579856226490515], [0.46881150577395014, -0.84463688913836088, 
-0.90015960010663676, -0.84682738008523284]], [[0.58676349652971305, -0.56400170636377922, -0.41853456169608139, 
--0.3251869433384682], [-0.99772483767357212, -0.50911148213419288, 0.49774853321201795, -0.66890484092032088], 
-[0.81808185587295612, 0.15836639889620208, 0.88622045509309211, 0.4269146725362889]]], [[[-0.010073445030529093, 
-0.68142450068881155, 0.72926994273213608, 0.78881989849172096], [0.31238844618913486, -0.15409616695845152, 
-0.27529205688076686, 0.075112836227879232], [0.08126758577522053, -0.30328648172851302, 0.82803294830929541, 
--0.089323169102796474]], [[-0.082243386649075045, 0.51484339977082172, 0.62765845253957075, 0.67404265033697675], 
-[0.4548897701434913, -0.8102518961352132, -0.29182113685584543, 0.5064938009939024], [0.80135108524261534, 
--0.58862292165723362, 0.5819953900635888, 0.0037514290888855939]]]])+(1.-msk_arg1)*numpy.array([[[[-0.024467085503008024, 
-0.9104785955182606, 0.60676090282793549, 0.72485116145544759], [0.39311257256698462, 0.35984428315119699, 0.45151886370107963, 
-0.42708476399446682], [-0.35235399139098145, 0.6862957160449068, 0.21487591789820559, -0.50613288972477966]], 
-[[-0.81610963170031847, 0.1774050944192096, -0.0095511449550185201, -0.48048006558641121], [-0.47063578677355622, 
--0.16145416553119429, 0.74620701119135546, -0.42746436133938515], [-0.03424527257764054, 0.74238485619319361, 
--0.04847517230856413, 0.50122429886182962]]], [[[-0.20315484399875117, 0.96514809821932857, 0.29423326020356955, 
--0.20935538616946547], [0.88318603351275926, 0.22679185747668562, -0.055942671603035565, 0.8146375864496469], 
-[0.15353310928014818, 0.25602474775840256, 0.27815841161798804, 0.42634852514419119]], [[-0.2872372834622503, 
-0.10221917675293035, 0.67883549368623219, -0.77139665041407635], [0.09322742044113852, -0.16991436282799399, 
-0.98682491498336566, -0.4934527011871821], [0.72697976062816294, 0.066156633283350308, 0.80418716417699621, 
-0.94451153492052131]]], [[[0.9829866607602209, -0.78349886466420493, -0.81693247875887742, 0.62902855141793013], 
-[0.44277257894516309, 0.91490629885114383, 0.69990829951854105, 0.75473359841841403], [0.44370819987613053, 
--0.34912347902903607, 0.82994105470259694, -0.40646982696858935]], [[0.066450599902513563, 0.6750221435230741, 
--0.89762862866476367, 0.61411954144575187], [0.32079212183711636, 0.25113487890755271, -0.51828827116657927, 
-0.56840005789848536], [-0.93967160610378597, -0.87552179468722069, 0.63506723414018063, 0.18149549290406863]]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.037263064264134484, 0.011614628022648007, -0.012336453687827108, 0.017794013590417962], 
-[-0.019465446786254285, 0.0058358484257236319, 0.03852655397306165, -0.037819222196111744], [-0.015297889788499957, 
--0.044480402258244657, 0.027925934072044113, -0.016451274025210866]], [[0.0072177311550662608, -0.0024816178402847114, 
--0.040237272185228455, -0.030258552539962], [0.020027931341123167, 0.040756693340729649, 0.015861823965338792, 
--0.018857163018635732], [0.032062578252193011, -0.018922632521904612, 0.00053414335746963825, -0.023878600777712686]]], 
-[[[0.0096997655167207712, 0.036857982775527862, -0.0090828537902529535, 0.011982980649555929], [-0.00012351269831452854, 
--0.040292606228886273, 0.020512588133192261, -0.0051680475917088046], [0.020922886484875877, -0.037695836247034757, 
-0.040173794583411318, -0.037793597058924149]], [[0.02618704080458218, -0.025171190412753206, -0.018679044811214136, 
--0.014512974656204769], [-0.04452809554518683, -0.022721459728799433, 0.022214335463494508, -0.029852979040382366], 
-[0.036510694799414087, 0.0070678346122364398, 0.039551695626319508, 0.019053046101030778]]], [[[-0.00044957417701907556, 
-0.030411726888801647, 0.032547051513649644, 0.035204744315963134], [0.013941782397195606, -0.0068772557185931447, 
-0.012286184074760247, 0.0033522584804280956], [0.0036269427075339795, -0.013535565043624957, 0.036954808424787489, 
--0.0039864604528463124]], [[-0.0036704923445715679, 0.022977273121975131, 0.028012167773225339, 0.030082277600425492], 
-[0.020301564502200407, -0.036161246552610743, -0.013023870884402581, 0.022604633574412541], [0.035764006609402162, 
--0.026270026269723468, 0.025974241952357285, 0.00016742491175261598]]]])+(1.-msk_ref)*numpy.array([[[[-0.0010919571006476659, 
-0.040634327584364298, 0.027079517752815172, 0.03234984291719889], [0.017544470710073558, 0.01605971908939096, 
-0.020151122177349014, 0.019060637220761574], [-0.015725430100517131, 0.030629127453172839, 0.0095898338311804256, 
--0.022588526236128465]], [[-0.036422675154037201, 0.0079175246482998327, -0.00042626411517895712, -0.021443650052730429], 
-[-0.021004303480408573, -0.007205640510769315, 0.033302946700509012, -0.019077578511791909], [-0.0015283540228022688, 
-0.033132365317225507, -0.0021634292568662524, 0.022369457616520563]]], [[[-0.0090667265787799795, 0.043074207547017337, 
-0.013131523069492692, -0.0093434545139623043], [0.039416270498116329, 0.010121637867750704, -0.0024967010263083887, 
-0.036356978311487327], [0.0068521266598083573, 0.011426291097153549, 0.012414108441064478, 0.019027779149446446]], 
-[[-0.012819295179590958, 0.0045620045699353321, 0.030296180450720758, -0.034427151110086984], [0.0041607057658441197, 
--0.0075832160299289164, 0.044041635971707259, -0.022022614047303258], [0.03244484152178518, 0.0029525464101483089, 
-0.035890579777669941, 0.042153205255006411]]], [[[0.043870336085885607, -0.034967268517301774, -0.036459398518094197, 
-0.028073314786367955], [0.019760778679250912, 0.040831934368928353, 0.031236652087864882, 0.033683485178037674], 
-[0.019802535100094696, -0.015581253512262571, 0.037039966517062137, -0.018140600101422457]], [[0.0029656660331254404, 
-0.030125992024011561, -0.040060838251233959, 0.027407931109969495], [0.014316835375786994, 0.011208058034116069, 
--0.023131016475712668, 0.025367487237271863], [-0.041937200997473834, -0.039074218315171307, 0.028342818993410072, 
-0.0081000776405420489]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank2_offset1(self):
+      arg0=numpy.array([[[-5.0, -2.0, 7.0], [-6.0, 2.0, 1.0], [-6.0, 3.0, -5.0], [-1.0, 4.0, -5.0], [-5.0, 7.0, -5.0]], [[2.0, 
+2.0, -6.0], [-7.0, 0.0, 2.0], [-5.0, 1.0, -2.0], [-6.0, 0.0, -3.0], [-7.0, -2.0, -1.0]], [[-4.0, 7.0, -3.0], [-3.0, -2.0, 5.0], 
+[-5.0, -1.0, -4.0], [-3.0, 3.0, 7.0], [-3.0, -5.0, -1.0]], [[-2.0, -6.0, -3.0], [-6.0, 5.0, -2.0], [-1.0, -5.0, -7.0], [5.0, 
+2.0, 5.0], [1.0, -1.0, 4.0]]])
+      arg1=numpy.array([[3.0, 7.0], [5.0, 0.0], [4.0, 5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[3.0, 0.0], [-4.0, -37.0], [-23.0, -67.0], [-3.0, -32.0], [0.0, -60.0]], [[-8.0, -16.0], [-13.0, 
+-39.0], [-18.0, -45.0], [-30.0, -57.0], [-35.0, -54.0]], [[11.0, -43.0], [1.0, 4.0], [-36.0, -55.0], [34.0, 14.0], [-38.0, 
+-26.0]], [[-48.0, -29.0], [-1.0, -52.0], [-56.0, -42.0], [45.0, 60.0], [14.0, 27.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.668020810252)+(1.-msk_arg0)*(-0.199373680103)
-      arg1=-0.414108752084
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(-0.27663326409916661)+(1.-msk_ref)*numpy.array(0.082562385865791135)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.89803697641820968, -0.11561484456563709])+(1.-msk_arg0)*numpy.array([-0.32840922337831913, 
--0.52183272187384655])
-      arg1=0.777737979352
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.69843746342312674, -0.089918055595606172])+(1.-msk_ref)*numpy.array([-0.25541632579090445, 
--0.40584912667006418])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.17536854353567821, -0.78928042811432308, -0.97636831926807344, -0.27888945307416857, 
-0.010622511883872532], [0.75263624986742128, -0.5592719942188058, -0.013841027001748607, -0.052258497265722292, 
-0.58265643840157866], [0.98297043285336128, 0.77043885820702096, -0.18809135815129996, 0.91236177100903726, 
-0.6082829915489476], [-0.27330126762450457, 0.20962667467243068, -0.81369505041848655, 0.49080308139066298, 
--0.1249881775189563]])+(1.-msk_arg0)*numpy.array([[0.63107319493892855, 0.84913314407214524, -0.47663244422210194, 
-0.54298257454386545, -0.25310528901917007], [-0.74538586542084051, -0.63889727230382065, -0.34508951051308467, 
--0.30076076768983873, -0.5692494007765323], [0.46403709770754098, 0.07981428366460297, 0.071007166588557213, 
--0.58626153560215855, -0.90404379525966672], [0.93173030530645828, 0.32579774985788545, -0.65037365393573832, 
-0.99004422028261851, -0.44078045182846037]])
-      arg1=-0.234522178058
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.041127812792920319, 0.18510376510025423, 0.22898002482198859, 0.06540576197247587, 
--0.0024912146234572496], [-0.17650989260462979, 0.13116168621127111, 0.0032460277990155029, 0.012255776600817243, 
--0.13664585699370058], [-0.23052836687979938, -0.18068499908755373, 0.04411159498760945, -0.21396906971427798, 
--0.14265585205395143], [0.064095208549426297, -0.049162104323322527, 0.19082953549950035, -0.11510420764552287, 
-0.029312499623298231]])+(1.-msk_ref)*numpy.array([[-0.14800066019136418, -0.19914055440939471, 0.11178087895227631, 
--0.12734145602979641, 0.059358803658881971], [0.17480951665245678, 0.14983557985627627, 0.080931143630643076, 
-0.070535070313143822, 0.1335016093285635], [-0.10882699085428094, -0.01871821964519536, -0.016652755366105595, 
-0.1374913322412929, 0.21201831992449846], [-0.21851142056350839, -0.076406797903203996, 0.15252704587282326, 
--0.23218732691483107, 0.10337279160838554]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.25740843478106368, 0.73423343206754943], [-0.6427051620706361, -0.89580613442810764]], 
-[[-0.22740639543899688, -0.84905678784073912], [0.84197910761975647, -0.25666510559167866]], [[0.28439305888670252, 
-0.6223153710205096], [-0.77856279651648896, 0.7399236312518287]], [[0.048181875839945487, -0.38581915202623618], 
-[0.7742861694449017, -0.83641627537952057]], [[0.48993888851279577, -0.8103853288250773], [0.11418354207494752, 
-0.35973611692648522]], [[-0.1081267874550631, -0.69353637113732813], [-0.82769375941263057, 
--0.18143269032927378]]])+(1.-msk_arg0)*numpy.array([[[0.58533346116207041, 0.28874612633378605], [-0.13007576734424164, 
-0.18467312201063169]], [[-0.83082036907737877, -0.060060583903163822], [0.34197864311618154, 0.6939585737259415]], 
-[[-0.79098633992461753, 0.84652008035450477], [0.14677195874921889, -0.42095550171758123]], [[-0.96050106947722624, 
--0.43788444443669405], [-0.39609118372006691, -0.90094996813009498]], [[0.086117360299087897, -0.32697201394953446], 
-[0.78954648940984051, -0.22063927607971023]], [[0.2610626132674041, 0.34277618940295862], [0.30158294235422911, 
--0.99775481707329794]]])
-      arg1=-0.613278501288
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.15786305910143908, -0.4502895788139839], [0.39415725856478695, 0.54937864356673072]], 
-[[0.13946345337815058, 0.52070827435543277], [-0.51636768523691223, 0.15740719129020936]], [[-0.17441214893076726, 
--0.38165263806798844], [0.47747582500628227, -0.45377925564174931]], [[-0.02954890860436972, 0.23661459132288482], 
-[-0.47485306156525126, 0.51295611981770339]], [[-0.30046898726987104, 0.49699189992768461], [-0.070026311555487289, 
--0.22061842664786538]], [[0.066311834159534969, 0.42533094627986845], [0.50760678829806782, 
-0.11126876840979985]]])+(1.-msk_ref)*numpy.array([[[-0.35897242781523425, -0.17708179161072052], [0.079772671650772412, 
--0.1132560554948694]], [[0.5095242707873775, 0.036833864882618791], [-0.20972814972282014, -0.42558987405065324]], 
-[[0.48509491708830665, -0.51915256619006867], [-0.090012086892835644, 0.25816295920232651]], [[0.58905465637458332, 
-0.26854511582149565], [0.24291420752526091, 0.55253324619036059]], [[-0.052813925659109515, 0.20052490667811296], 
-[-0.48421188772252538, 0.13531332455944978]], [[-0.16010408820698105, -0.21021726771428267], [-0.18495433490104857, 
-0.61190157886766627]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_array_rank3_offset2(self):
+      arg0=numpy.array([[[[-6.0, -4.0, 0.0], [0.0, -1.0, 2.0]], [[0.0, -3.0, 4.0], [2.0, -2.0, 1.0]], [[-3.0, 7.0, -3.0], [5.0, 
+-4.0, -3.0]], [[3.0, 5.0, 1.0], [-5.0, -6.0, 3.0]], [[-5.0, 0.0, 1.0], [-7.0, 2.0, 6.0]]], [[[-2.0, 6.0, 6.0], [0.0, 3.0, 
+-2.0]], [[-1.0, 4.0, -7.0], [6.0, -5.0, 1.0]], [[-6.0, -3.0, -6.0], [7.0, -6.0, 5.0]], [[-4.0, -2.0, 5.0], [3.0, -2.0, 5.0]], 
+[[-7.0, -3.0, -6.0], [-7.0, 4.0, 1.0]]], [[[6.0, -1.0, 0.0], [0.0, 2.0, -7.0]], [[1.0, 5.0, -5.0], [3.0, 7.0, -5.0]], [[-3.0, 
+6.0, -6.0], [6.0, 7.0, 0.0]], [[0.0, -7.0, 2.0], [-6.0, 1.0, -6.0]], [[3.0, -4.0, -4.0], [1.0, -5.0, 3.0]]], [[[-3.0, -1.0, 
+-2.0], [-7.0, 0.0, 6.0]], [[-1.0, 2.0, -7.0], [-4.0, 6.0, 0.0]], [[-6.0, 1.0, 7.0], [3.0, -4.0, 1.0]], [[4.0, 0.0, 3.0], [7.0, 
+-3.0, 2.0]], [[-2.0, 3.0, 6.0], [0.0, 3.0, 2.0]]]])
+      arg1=numpy.array([[[0.0, -4.0], [0.0, 1.0], [5.0, 1.0]], [[-7.0, -1.0], [4.0, -7.0], [7.0, -1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[10.0, 25.0], [5.0, 12.0], [-87.0, 42.0], [37.0, 38.0], [104.0, 8.0]], [[28.0, 1.0], [-90.0, 29.0], 
+[-68.0, 45.0], [31.0, 25.0], [42.0, -3.0]], [[-41.0, -32.0], [-53.0, -51.0], [-44.0, -43.0], [14.0, 0.0], [-26.0, 11.0]], 
+[[81.0, 10.0], [17.0, -39.0], [5.0, 56.0], [-32.0, -1.0], [56.0, -6.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank4_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.51373130732142314, -0.49826403224687299, -0.14925439016692477, 0.16168858249137918], 
-[0.85919417540887144, -0.064282795632149003, 0.5515090118931254, -0.44099930119256969], [-0.71487224437524155, 
-0.0042457584859505459, 0.64173479370803466, 0.46078959800040109]], [[-0.40754479414590783, 0.725128391302996, 
-0.72850950188907149, -0.56409961600821523], [-0.022347866841244679, -0.32715203968889051, -0.0021558078400554237, 
--0.21285177956047807], [-0.9534140635323769, -0.42255393690504173, 0.27521318354608226, 0.57194316501709985]]], 
-[[[0.98916441835287316, 0.48416942773906935, 0.68388501815994296, -0.097292654680867008], [0.24471140330887642, 
-0.71914389963411529, -0.44963477073130309, 0.527935384037723], [-0.68654030358372786, 0.88089482181212042, 0.22551553093490395, 
-0.50153512068782025]], [[-0.050412827743439026, -0.42713936461634372, -0.7302549257426092, -0.15609649997827968], 
-[-0.41466745825868179, -0.39687267255639691, -0.35974562857433545, 0.60426450876362203], [0.26980797832737724, 
-0.06245476882456602, -0.8699550919775223, -0.26835386848971177]]], [[[0.44368144640849461, -0.45077538942190087, 
--0.4844355295838132, 0.50519709918605082], [-0.86012856869553977, -0.63594022089366686, 0.66789619211143192, 
-0.75734366205209036], [-0.50346727384050727, -0.072080239588779182, 0.83356371123426221, 0.1323134254267162]], 
-[[0.68690502648922536, -0.34609252078420827, -0.394197615091467, -0.1394901997472644], [0.7938132612482065, 
-0.023217155424228419, 0.073861196778270521, -0.39694336802580144], [0.002027476811779616, 0.85655908725606755, 
-0.26981208768492859, -0.47583056631722642]]]])+(1.-msk_arg0)*numpy.array([[[[0.99538415389773904, 0.23823136326685446, 
--0.95985216090673009, 0.81660962284280081], [-0.13147899307334221, 0.96465576217747939, -0.053627611872602898, 
-0.63155894105576849], [-0.31614712525834432, -0.31560053874951, 0.3475495545383982, -0.49451553112039814]], 
-[[0.25647863330323406, -0.84355062453784013, -0.023875899680008139, 0.98678089365882671], [-0.18117294237811077, 
-0.96325207513942224, 0.44001398623201249, 0.22639152697392451], [0.041655855711577594, 0.43114749731298319, 
--0.24049119940790997, -0.3179433057487997]]], [[[-0.018558917849502032, -0.71289989545026167, -0.029025319641343916, 
-0.84936380123980859], [0.5757942789674213, -0.4399905546039673, -0.2984122303891934, 0.69320778125482319], 
-[-0.97557323408510177, 0.97758894999817825, -0.13294946758508241, -0.12124450243022733]], [[0.23090968905588616, 
-0.43492506953951815, 0.023440743934802777, -0.74633022318926501], [-0.26926132428283522, -0.43824040687843446, 
-0.91308299706660057, -0.9114403702994931], [0.65526167223687182, -0.67644618397949108, -0.32545238214563077, 
--0.95407218158865947]]], [[[0.54539062662972126, 0.73588406488339753, 0.84117839560109031, 0.37807152717999637], 
-[0.68558935225302253, 0.43008087372839232, -0.27646314630559865, 0.9023041381229171], [0.62363434616615621, 
--0.42667050127974804, 0.60746106586901494, 0.8106742973298775]], [[0.42330331017042222, -0.74611903242880073, 
--0.5622261508844506, -0.27517600179999246], [0.6470216876552195, -0.66974562018521988, -0.6884238802306839, 
--0.10904474913681272], [0.30444409123221572, -0.89746722334726736, -0.94500306008683066, -0.79495475061134968]]]])
-      arg1=-0.76173064645
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.39132488082748135, 0.37954298338612641, 0.11369164310733181, -0.12316314846472041], 
-[-0.65447453466015737, 0.048966175472481346, -0.42010131615227608, 0.33592268278135434], [0.54454009683701776, 
--0.0032341243561731046, -0.48882905926059128, -0.35099755836221841]], [[0.31043935950203905, -0.55235251826638099, 
--0.55492801381883072, 0.42969196516405778], [0.017023055055756787, 0.2492017346796101, 0.0016421448996271027, 
-0.16213572364260689], [0.72624471094890908, 0.32187228351861241, -0.20963831621408227, -0.43566663682105666]]], 
-[[[-0.75347685183713764, -0.36880669118294196, -0.52093617698035022, 0.074110796744880206], [-0.18640417543612378, 
--0.54779394755877064, 0.34250058457549182, -0.40214456136681187], [0.52295878926271877, -0.67100458207328417, 
--0.17178209116352866, -0.38203467169884381]], [[0.038400995866375444, 0.32536514433339164, 0.55625755665911503, 
-0.11890348783701614], [0.31586491104110764, 0.30231007742466937, 0.27402927021144119, -0.46028679488722324], 
-[-0.20552100574864393, -0.04757371143061348, 0.66267145459438881, 0.2044133657219899]]], [[[-0.33796575499055326, 
-0.34336942878803367, 0.36900938911316017, -0.38482411294758651], [0.65518629066244971, 0.48441515556480208, 
--0.50875699817844355, -0.57689187727964608], [0.38350645196888022, 0.05490572749822184, -0.63495102461562225, 
--0.10078719108428839]], [[-0.52323660987729848, 0.26362927958841792, 0.3002724041726178, 0.10625396002690435], 
-[-0.60467188865107102, -0.017685218810024477, -0.056262337169472605, 0.30236392833027997], [-0.001544391222498996, 
--0.65246730725806967, -0.20552413597222802, 0.36245472488142572]]]])+(1.-msk_ref)*numpy.array([[[[-0.75821461501447551, 
--0.1814681303458934, 0.73114880702378227, -0.62203657590522621], [0.10015157838833413, -0.73480785732503751, 
-0.040849795459280198, -0.48107780044160203], [0.24081895409630472, 0.24040260240158956, -0.26473914685189626, 
-0.37668763519983867]], [[-0.19536763514665006, 0.6425583625423954, 0.018187004497824698, -0.75166124803111245], 
-[0.13800498251690224, -0.73373862589012495, -0.33517213817949237, -0.1724493641926193], [-0.031730541899602255, 
--0.32841826184345962, 0.18318951679049039, 0.24218715982243991]]], [[[0.014136896490911101, 0.54303769821536818, 
-0.022109475493814833, -0.64698643738951311], [-0.43860014833998712, 0.33515428959031413, 0.227309741162906, 
--0.52803761133931226], [0.743124030258829, -0.74465946284435602, 0.10127168388875005, 0.092355653214669153]], 
-[[-0.17589098671607722, -0.33129575437758918, -0.017855533030723045, 0.56850260337503], [0.20510460260991051, 
-0.33382114843196126, -0.69552330161792086, 0.69427206246873618], [-0.4991328971868112, 0.51526978901124132, 
-0.24790705344043945, 0.72674601964136154]]], [[[-0.4154407545903539, -0.56054544445578403, -0.64075136306087788, 
--0.28798866880310592], [-0.52223442049083835, -0.32760578197085055, 0.21059045115492694, -0.6873127144267569], 
-[-0.47504139365348436, 0.32500799676090997, -0.46272171039752807, -0.61751545656537676]], [[-0.32244310410048294, 
-0.56834173290053736, 0.42826488936423129, 0.20960999373859718], [-0.49285624840469228, 0.51016576422065252, 
-0.52439356731964248, 0.083062727251947591], [-0.23190439442215702, 0.68362828820787835, 0.71983779185704111, 
-0.60554139608157376]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_array_rank2_offset0(self):
+      arg0=numpy.array([[6.0, -4.0, 0.0, 4.0, -6.0], [1.0, -1.0, 7.0, 6.0, 6.0], [-2.0, -7.0, 1.0, -3.0, -7.0], [0.0, -6.0, 
+7.0, -2.0, 6.0]])
+      arg1=numpy.array([[3.0, -6.0, -1.0, 2.0, -6.0], [-7.0, -6.0, 0.0, -2.0, 5.0], [-2.0, 6.0, 7.0, -6.0, -4.0], [0.0, 6.0, 
+4.0, 0.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 30.0], [-12.0, 36.0, 42.0, -36.0, -24.0], 
+[0.0, 36.0, 24.0, 0.0, 0.0]], [[-12.0, 24.0, 4.0, -8.0, 24.0], [28.0, 24.0, 0.0, 8.0, -20.0], [8.0, -24.0, -28.0, 24.0, 16.0], 
+[0.0, -24.0, -16.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[12.0, -24.0, -4.0, 8.0, -24.0], [-28.0, -24.0, 0.0, -8.0, 20.0], [-8.0, 24.0, 28.0, -24.0, -16.0], [0.0, 
+24.0, 16.0, 0.0, 0.0]], [[-18.0, 36.0, 6.0, -12.0, 36.0], [42.0, 36.0, 0.0, 12.0, -30.0], [12.0, -36.0, -42.0, 36.0, 24.0], 
+[0.0, -36.0, -24.0, 0.0, 0.0]]], [[[3.0, -6.0, -1.0, 2.0, -6.0], [-7.0, -6.0, 0.0, -2.0, 5.0], [-2.0, 6.0, 7.0, -6.0, -4.0], 
+[0.0, 6.0, 4.0, 0.0, 0.0]], [[-3.0, 6.0, 1.0, -2.0, 6.0], [7.0, 6.0, 0.0, 2.0, -5.0], [2.0, -6.0, -7.0, 6.0, 4.0], [0.0, -6.0, 
+-4.0, 0.0, 0.0]], [[21.0, -42.0, -7.0, 14.0, -42.0], [-49.0, -42.0, 0.0, -14.0, 35.0], [-14.0, 42.0, 49.0, -42.0, -28.0], [0.0, 
+42.0, 28.0, 0.0, 0.0]], [[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 30.0], [-12.0, 36.0, 42.0, -36.0, -24.0], 
+[0.0, 36.0, 24.0, 0.0, 0.0]], [[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 30.0], [-12.0, 36.0, 42.0, -36.0, 
+-24.0], [0.0, 36.0, 24.0, 0.0, 0.0]]], [[[-6.0, 12.0, 2.0, -4.0, 12.0], [14.0, 12.0, 0.0, 4.0, -10.0], [4.0, -12.0, -14.0, 
+12.0, 8.0], [0.0, -12.0, -8.0, 0.0, 0.0]], [[-21.0, 42.0, 7.0, -14.0, 42.0], [49.0, 42.0, 0.0, 14.0, -35.0], [14.0, -42.0, 
+-49.0, 42.0, 28.0], [0.0, -42.0, -28.0, 0.0, 0.0]], [[3.0, -6.0, -1.0, 2.0, -6.0], [-7.0, -6.0, 0.0, -2.0, 5.0], [-2.0, 6.0, 
+7.0, -6.0, -4.0], [0.0, 6.0, 4.0, 0.0, 0.0]], [[-9.0, 18.0, 3.0, -6.0, 18.0], [21.0, 18.0, 0.0, 6.0, -15.0], [6.0, -18.0, 
+-21.0, 18.0, 12.0], [0.0, -18.0, -12.0, 0.0, 0.0]], [[-21.0, 42.0, 7.0, -14.0, 42.0], [49.0, 42.0, 0.0, 14.0, -35.0], [14.0, 
+-42.0, -49.0, 42.0, 28.0], [0.0, -42.0, -28.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-18.0, 36.0, 6.0, -12.0, 36.0], [42.0, 36.0, 0.0, 12.0, -30.0], [12.0, -36.0, 
+-42.0, 36.0, 24.0], [0.0, -36.0, -24.0, 0.0, 0.0]], [[21.0, -42.0, -7.0, 14.0, -42.0], [-49.0, -42.0, 0.0, -14.0, 35.0], 
+[-14.0, 42.0, 49.0, -42.0, -28.0], [0.0, 42.0, 28.0, 0.0, 0.0]], [[-6.0, 12.0, 2.0, -4.0, 12.0], [14.0, 12.0, 0.0, 4.0, -10.0], 
+[4.0, -12.0, -14.0, 12.0, 8.0], [0.0, -12.0, -8.0, 0.0, 0.0]], [[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 
+30.0], [-12.0, 36.0, 42.0, -36.0, -24.0], [0.0, 36.0, 24.0, 0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.771414181912)+(1.-msk_arg0)*(0.183128004107)
-      arg1=numpy.array(-0.536035695845)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.41350553778552301)+(1.-msk_ref)*numpy.array(-0.098163147110422982)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.84211476238897176, -0.63311767547216014])+(1.-msk_arg0)*numpy.array([0.7228079105361378, 
-0.53424529529876619])
-      arg1=numpy.array(-0.42076964503)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.35433632964514156, 0.26639669957079831])+(1.-msk_ref)*numpy.array([-0.30413562794134791, 
--0.22479420326194333])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.3799622126195461, 0.37236705072111187, 0.6232161190449097, -0.67341084973043053, 
-0.38354033302504886], [0.52272884055284385, 0.42129933951125409, 0.27778957298543006, -0.62481768620975697, 
--0.43452070079407457], [0.57971563148932437, 0.58259832375302456, 0.10661588551405843, -0.14869063205343003, 
-0.013692674452755238], [-0.65472061118789893, -0.62775351208846275, 0.037602772251926764, -0.046802628906359445, 
--0.75513434598744889]])+(1.-msk_arg0)*numpy.array([[0.010910815632426019, -0.74920910177769695, 0.16281908062279138, 
-0.83277196168888179, 0.34638945889459172], [-0.85272886856179153, -0.7706397301146295, -0.7113468219626875, 
--0.76118910476955093, 0.68080399454121632], [0.69545723388366931, 0.64141052030309353, 0.98073714527561151, 
-0.85583897830349431, -0.26940020551838795], [0.63045657920698028, -0.28809893405512432, -0.95967764455003657, 
--0.22259961891726254, 0.60520236510218428]])
-      arg1=numpy.array(0.885486966476)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.33645158702807043, 0.32972617015873018, 0.55184975071215336, -0.59629653051996545, 
-0.3396199660116257], [0.46286957531076389, 0.37305507412225103, 0.24597904630159007, -0.55326791756256188, 
--0.38476241721726179], [0.513330635946322, 0.51588322237419026, 0.094406977042018447, -0.13166361672042198, 
-0.012124684764116527], [-0.5797465678902225, -0.55586755311399938, 0.033296764732454416, -0.041443117893403977, 
--0.6686616213104225]])+(1.-msk_ref)*numpy.array([[0.00966138503613812, -0.66341489478949855, 0.14417417378512093, 
-0.73740871812233011, 0.30672335117590771], [-0.75508029904947116, -0.68239143686524806, -0.62988833949223244, 
--0.67402303129713126, 0.60284306389118758], [0.61581831634558604, 0.56796065588911349, 0.86842995968063885, 
-0.75783426069005966, -0.23855037075254473], [0.55826108381695705, -0.25510785116150159, -0.84978204626764597, 
--0.19710906129380706, 0.53589880637856058]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.4463432675487522, 0.76019878661702078], [-0.085592688955817842, 0.82447078133220941]], 
-[[0.43940759438778776, -0.091163458108980633], [0.079709332561558099, -0.86851544097558375]], [[0.087497133213726874, 
--0.92480764823561001], [-0.28404925251082513, -0.1517033585351546]], [[-0.95839918828928683, 0.15658266453206582], 
-[0.15208993384197234, -0.96379349512777934]], [[0.93942990915614644, -0.75969946811255618], [-0.8659092222707192, 
--0.60537319805077083]], [[0.327337965548961, -0.11291815862827148], [-0.84266681171659097, 
-0.21912726347102573]]])+(1.-msk_arg0)*numpy.array([[[0.56292885389644121, 0.18488731830320915], [0.54430645574055037, 
-0.59866881602820388]], [[0.91497718043284904, 0.0089825862396000211], [-0.60272668870203394, 0.68427682734608464]], 
-[[0.45077649549700283, -0.26629280817811218], [0.95186464074863908, 0.65977924770938334]], [[0.0025375671708003367, 
-0.57653705835051272], [0.51442792009275506, 0.13344738186607263]], [[0.75394596315267992, 0.82486677200307179], 
-[-0.210421866790929, 0.51981409505314136]], [[-0.56875483910531988, -0.50228072629755971], [0.67568239247773842, 
--0.21188179097900317]]])
-      arg1=numpy.array(-0.325283555839)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.14518812519300994, -0.24728016445519885], [0.027841894217361048, -0.26818678743701413]], 
-[[-0.14293206476507503, 0.02965397381625948], [-0.025928135129168733, 0.2825137909415249]], [[-0.028461378617470667, 
-0.30082472028508633], [0.092396550890101722, 0.049346607897018058]], [[0.31175149587985107, -0.050933765901719386], 
-[-0.04947235448741924, 0.31350617518956198]], [[-0.30558110131172256, 0.24711774435657044], [0.28166603085391267, 
-0.19691794647151911]], [[-0.10647765739483614, 0.036730420157384688], [0.27410565690259836, 
--0.071278495443101927]]])+(1.-msk_ref)*numpy.array([[[-0.1831114992797489, -0.060140804327185715], [-0.17705393938935302, 
--0.19473712124751616]], [[-0.29762703076264446, -0.0029218875926466342], [0.19605708050000109, -0.22258399957729288]], 
-[[-0.14663018134386127, 0.086620671538501434], [-0.30962591502003084, -0.21461533976362016]], [[-0.00082542887249798121, 
--0.18753802441315198], [-0.16733494307057895, -0.043408238890787147]], [[-0.24524622380468517, -0.2683155966905113], 
-[0.068446773056011934, -0.16908697721406382]], [[0.18500659646475776, 0.16338366067941362], [-0.21978837124289144, 
-0.068921662387163921]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank3_offset1(self):
+      arg0=numpy.array([[[-1.0, -2.0, -7.0], [-3.0, 0.0, -2.0], [0.0, 1.0, -5.0], [0.0, -6.0, 5.0], [6.0, -1.0, -4.0]], [[0.0, 
+1.0, 6.0], [0.0, -7.0, -7.0], [1.0, 3.0, 7.0], [6.0, 7.0, 0.0], [7.0, 0.0, 0.0]], [[6.0, 3.0, -3.0], [0.0, 2.0, 0.0], [4.0, 
+-1.0, 6.0], [3.0, 3.0, 0.0], [7.0, 0.0, -6.0]], [[3.0, 5.0, -4.0], [-6.0, 0.0, 6.0], [-5.0, -2.0, -5.0], [-2.0, 4.0, 0.0], 
+[-3.0, -5.0, -6.0]]])
+      arg1=numpy.array([[[-7.0, 4.0, -3.0, 4.0, 5.0], [-6.0, -2.0, 5.0, -1.0, 7.0], [-2.0, -7.0, -2.0, 4.0, -5.0], [5.0, 3.0, 
+-1.0, 3.0, 4.0]], [[3.0, -2.0, -1.0, 4.0, 3.0], [-6.0, 2.0, -3.0, -4.0, 4.0], [2.0, 2.0, -1.0, -1.0, -2.0], [2.0, -7.0, 7.0, 
+6.0, -2.0]], [[7.0, -4.0, 0.0, -4.0, -3.0], [-3.0, 6.0, 4.0, -6.0, 0.0], [1.0, 2.0, 6.0, 4.0, 4.0], [0.0, 0.0, 5.0, -7.0, 
+2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[-48.0, 28.0, 5.0, 16.0, 10.0], [39.0, -44.0, -27.0, 51.0, -15.0], [-9.0, -11.0, -38.0, -30.0, -19.0], 
+[-9.0, 11.0, -48.0, 34.0, -14.0]], [[7.0, -4.0, 9.0, -4.0, -9.0], [24.0, -6.0, -23.0, 15.0, -21.0], [4.0, 17.0, -6.0, -20.0, 
+7.0], [-15.0, -9.0, -7.0, 5.0, -16.0]], [[-32.0, 18.0, -1.0, 24.0, 18.0], [9.0, -28.0, -23.0, 26.0, 4.0], [-3.0, -8.0, -31.0, 
+-21.0, -22.0], [2.0, -7.0, -18.0, 41.0, -12.0]], [[17.0, -8.0, 6.0, -44.0, -33.0], [21.0, 18.0, 38.0, -6.0, -24.0], [-7.0, 
+-2.0, 36.0, 26.0, 32.0], [-12.0, 42.0, -17.0, -71.0, 22.0]], [[-73.0, 42.0, -17.0, 36.0, 39.0], [-18.0, -38.0, 17.0, 22.0, 
+38.0], [-18.0, -52.0, -35.0, 9.0, -44.0], [28.0, 25.0, -33.0, 40.0, 18.0]]], [[[45.0, -26.0, -1.0, -20.0, -15.0], [-24.0, 38.0, 
+21.0, -40.0, 4.0], [8.0, 14.0, 35.0, 23.0, 22.0], [2.0, -7.0, 37.0, -36.0, 10.0]], [[-70.0, 42.0, 7.0, 0.0, 0.0], [63.0, -56.0, 
+-7.0, 70.0, -28.0], [-21.0, -28.0, -35.0, -21.0, -14.0], [-14.0, 49.0, -84.0, 7.0, 0.0]], [[51.0, -30.0, -6.0, -12.0, -7.0], 
+[-45.0, 46.0, 24.0, -55.0, 19.0], [11.0, 13.0, 37.0, 29.0, 17.0], [11.0, -18.0, 55.0, -28.0, 12.0]], [[-21.0, 10.0, -25.0, 
+52.0, 51.0], [-78.0, 2.0, 9.0, -34.0, 70.0], [2.0, -28.0, -19.0, 17.0, -44.0], [44.0, -31.0, 43.0, 60.0, 10.0]], [[-49.0, 28.0, 
+-21.0, 28.0, 35.0], [-42.0, -14.0, 35.0, -7.0, 49.0], [-14.0, -49.0, -14.0, 28.0, -35.0], [35.0, 21.0, -7.0, 21.0, 28.0]]], 
+[[[-54.0, 30.0, -21.0, 48.0, 48.0], [-45.0, -24.0, 9.0, 0.0, 54.0], [-9.0, -42.0, -33.0, 9.0, -48.0], [36.0, -3.0, 0.0, 57.0, 
+12.0]], [[6.0, -4.0, -2.0, 8.0, 6.0], [-12.0, 4.0, -6.0, -8.0, 8.0], [4.0, 4.0, -2.0, -2.0, -4.0], [4.0, -14.0, 14.0, 12.0, 
+-4.0]], [[11.0, -6.0, -11.0, -12.0, -1.0], [-36.0, 26.0, 47.0, -36.0, 24.0], [-4.0, -18.0, 29.0, 41.0, 6.0], [18.0, 19.0, 19.0, 
+-36.0, 30.0]], [[-12.0, 6.0, -12.0, 24.0, 24.0], [-36.0, 0.0, 6.0, -15.0, 33.0], [0.0, -15.0, -9.0, 9.0, -21.0], [21.0, -12.0, 
+18.0, 27.0, 6.0]], [[-91.0, 52.0, -21.0, 52.0, 53.0], [-24.0, -50.0, 11.0, 29.0, 49.0], [-20.0, -61.0, -50.0, 4.0, -59.0], 
+[35.0, 21.0, -37.0, 63.0, 16.0]]], [[[-34.0, 18.0, -14.0, 48.0, 42.0], [-36.0, -20.0, -16.0, 1.0, 41.0], [0.0, -19.0, -35.0, 
+-9.0, -41.0], [25.0, -26.0, 12.0, 67.0, -6.0]], [[84.0, -48.0, 18.0, -48.0, -48.0], [18.0, 48.0, -6.0, -30.0, -42.0], [18.0, 
+54.0, 48.0, 0.0, 54.0], [-30.0, -18.0, 36.0, -60.0, -12.0]], [[-6.0, 4.0, 17.0, -8.0, -16.0], [57.0, -24.0, -39.0, 43.0, 
+-43.0], [1.0, 21.0, -18.0, -38.0, 9.0], [-29.0, -1.0, -34.0, 8.0, -26.0]], [[26.0, -16.0, 2.0, 8.0, 2.0], [-12.0, 12.0, -22.0, 
+-14.0, 2.0], [12.0, 22.0, 0.0, -12.0, 2.0], [-2.0, -34.0, 30.0, 18.0, -16.0]], [[-36.0, 22.0, 14.0, -8.0, -12.0], [66.0, -40.0, 
+-24.0, 59.0, -41.0], [-10.0, -1.0, -25.0, -31.0, 1.0], [-25.0, 26.0, -62.0, 3.0, -14.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank4_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.31403475340174825, -0.44529723351568418, 0.51246391185524365, 0.015942733483527372], 
-[-0.19794432119927841, 0.62979766487987732, -0.84218684969223756, 0.15189290257478816], [0.86628145613116603, 
-0.38957710836696569, 0.34806921903528654, 0.36452391358710057]], [[-0.64769996681692077, -0.047944207922439253, 
-0.94071577948782714, 0.52995994246574862], [0.26288341509963287, -0.15842925139810515, 0.91677042237312678, 
-0.15971871842058727], [0.44159924798644834, -0.14690277912758298, 0.77053530275794735, -0.35986252789064088]]], 
-[[[-0.74464208984073332, 0.72496627953920334, 0.26229282682528532, -0.068267617453663831], [-0.76150062127382534, 
--0.20925073378676129, 0.63271920674188653, -0.96019340322931912], [-0.51401548152996024, -0.73307789292371095, 
-0.455130321312188, -0.42605394012282183]], [[-0.035194814480391523, 0.064715103894955606, 0.90184393500337712, 
-0.24845297240730058], [0.81903131284113417, -0.23449420225909279, 0.62678067988682762, -0.089125260315905397], 
-[-0.41604544571592372, -0.44637819653861577, -0.41262781940722992, 0.44373825265876921]]], [[[-0.55741425141821543, 
--0.63116860073803238, -0.66473958174575998, -0.93061641622253921], [0.52565065522145038, 0.0082169278534585111, 
--0.99664732047156646, 0.57986628098319626], [0.72377726280554611, -0.064307043837671163, -0.46706787517406378, 
--0.057762943884072993]], [[-0.51171804164063572, -0.76248011577579433, -0.42796445301156694, 0.54372186320210147], 
-[-0.28113071911784271, 0.35689467924681773, -0.99216842853938347, -0.24168176746071879], [0.23856810831436648, 
--0.36199751109310641, 0.42562845583970299, 0.93737052769639173]]]])+(1.-msk_arg0)*numpy.array([[[[0.82548941551363519, 
--0.68138599365956676, -0.51539648999145315, 0.27055203069465716], [-0.013577166973204546, 0.74914204467550438, 
-0.22588966745390393, 0.44467674134569868], [0.45398425526542119, 0.55326654311637169, -0.15622051962428807, 
-0.22712387279217716]], [[-0.76302079685336022, -0.010006803251566554, 0.90680167826394986, 0.93372627404849129], 
-[-0.86287658390765731, -0.83203302829617942, -0.82197141311309196, -0.10756454509262281], [0.89889902656412257, 
-0.74650286195648552, 0.48209134818193422, 0.49202847344226019]]], [[[-0.8236922495556962, 0.4402185595395165, 
-0.59617768874750054, 0.43160190247889241], [0.090939262879082605, -0.56163456612849871, 0.65668545765448738, 
-0.69677153031341676], [-0.75813962516501898, 0.56072548596055438, 0.49834724021091015, -0.55130227447148217]], 
-[[-0.23707881592363633, 0.33187755120540041, 0.51813023043316853, 0.63995125436627198], [0.76663867303590205, 
--0.39574894154855045, 0.93322035844601747, -0.28350509209773556], [0.14854930412492307, -0.24385741736058764, 
-0.44739292318740342, 0.877983527645539]]], [[[0.046091094481068406, -0.91843340666079021, -0.82002661750842343, 
-0.86971525588010068], [-0.91383310935561468, -0.27915760973248127, -0.48475397039245682, 0.12823696714625843], 
-[0.90996461848980581, 0.4084380779897745, 0.89206120622010365, -0.32816874514194683]], [[0.60341747123153389, 
-0.38813934596379518, 0.84260955813589744, 0.69588078179445301], [-0.39269177831721969, 0.55534794867574577, 
--0.53195052385209407, -0.38118771487043079], [0.63206575369569284, -0.7867420000743337, -0.63506205778412328, 
-0.50965870349872211]]]])
-      arg1=numpy.array(-0.185196674525)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.058158192015161848, 0.082467566822116423, -0.094906612289467437, -0.0029525412239815281], 
-[0.036658630027138955, -0.11663643315912228, 0.15597020389136565, -0.028130060440742365], [-0.16043244487783462, 
--0.072148384940478288, -0.0644612618697155, -0.067508616581029787]], [[0.11995187994419834, 0.0088791078699525343, 
--0.17421743403397827, -0.09814681897591386], [-0.048685134264126427, 0.029340570506353563, -0.16978283352603138, 
--0.02957937551082641], [-0.081782712199661795, 0.027205906172852647, -0.1427005756745906, 0.066645343451368841]]], 
-[[[0.1379052387495647, -0.13426134411314417, -0.048575759279704027, 0.012642935730137226], [0.14102738270834209, 
-0.038752540039144058, -0.11717749299645085, 0.1778246251785443], [0.095193957833518195, 0.13576358793698434, 
--0.084288621982337525, 0.07890377287885679]], [[0.0065179626022793371, -0.011985022032860851, -0.16701849770282004, 
--0.046012664265588428], [-0.15168187546970907, 0.043427546453686856, -0.11607769757131881, 0.016505701826646471], 
-[0.077050232997701029, 0.082667757579247422, 0.076417299970563096, -0.08217884875176823]]], [[[0.10323126569528213, 
-0.11689032592103916, 0.12310755996419938, 0.17234706554243087], [-0.09734875330869848, -0.0015217477132692136, 
-0.18457576942520409, -0.10738930690704496], [-0.13404114216811672, 0.011909450667245447, 0.086499417259515418, 
-0.010697505118082368]], [[0.094768479606095093, 0.14120878183282187, 0.079257593512488803, -0.10069548093135777], 
-[0.052064474287338569, -0.066095707752040392, 0.18374629353380867, 0.044758659626956847], [-0.044182020307449242, 
-0.067040735240631366, -0.078824974604560685, -0.17359790452675691]]]])+(1.-msk_ref)*numpy.array([[[[-0.15287789460839482, 
-0.12619042009340337, 0.095449716008077043, -0.050105336370532542], [0.0025144461729029381, -0.13873861542047528, 
--0.041834015221934556, -0.082352653735666539], [-0.084076374361690728, -0.10246312391088253, 0.028931520726925779, 
--0.04206258594626329]], [[0.14130891417036545, 0.0018532266848122476, -0.16793665526782495, -0.17292300087004153], 
-[0.15980187386485956, 0.15408974993509877, 0.15222637226284458, 0.019920596047906927], [-0.16647311045309063, 
--0.13824984755745015, -0.089281714500383358, -0.091122037052930288]]], [[[0.15254506544941565, -0.081527013290735459, 
--0.11041012538180912, -0.079931237057588811], [-0.016841649068926021, 0.10401285394507391, -0.12161596296628709, 
--0.12903977031747296], [0.14040493740590096, -0.10384449532109434, -0.092292251645580928, 0.10209934788997602]], 
-[[0.043906208309291206, -0.061462618832613371, -0.095955995646896192, -0.11851684416649069], [-0.14197893280821403, 
-0.073291387921428475, -0.17282930698287327, 0.052504200267295825], [-0.027510837126881686, 0.045161582753342373, 
--0.082855681580154411, -0.16259962960734572]]], [[[-0.0085359174230937845, 0.17009081268589335, 0.15186620258422989, 
--0.16106837317232078], [0.16923885292315027, 0.051699060990696315, 0.089774823279287527, -0.023749059866609593], 
-[-0.16852242127937361, -0.075641373792932301, -0.16520676886438154, 0.060775760283205027]], [[-0.11175090902213367, 
--0.071882116124654588, -0.15604848808942492, -0.12887480665392315], [0.072725211457507086, -0.10284859329881565, 
-0.098515468029035644, 0.070594697163641584], [-0.11705647566533781, 0.14570200212261239, 0.11761138121837963, 
--0.094387097030490988]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_array_rank4_offset2(self):
+      arg0=numpy.array([[[[-1.0, -7.0, 5.0], [2.0, 1.0, 0.0]], [[-4.0, 0.0, 0.0], [-1.0, 3.0, 2.0]], [[-5.0, 3.0, 3.0], [4.0, 
+-5.0, 3.0]], [[0.0, -6.0, -7.0], [-2.0, -2.0, 5.0]], [[-3.0, 7.0, 7.0], [-7.0, 0.0, 7.0]]], [[[-2.0, -3.0, -1.0], [0.0, 0.0, 
+-4.0]], [[0.0, -1.0, 0.0], [-7.0, 4.0, -4.0]], [[5.0, -2.0, 3.0], [-7.0, 1.0, 0.0]], [[-7.0, 3.0, -2.0], [-7.0, 5.0, -6.0]], 
+[[5.0, -1.0, -1.0], [6.0, -4.0, -6.0]]], [[[-6.0, -1.0, 0.0], [5.0, 5.0, 4.0]], [[-1.0, 0.0, -4.0], [-4.0, -3.0, -7.0]], 
+[[-6.0, -1.0, 0.0], [4.0, -3.0, -6.0]], [[6.0, -1.0, 6.0], [-5.0, 5.0, -4.0]], [[6.0, -1.0, 6.0], [2.0, -4.0, 1.0]]], [[[4.0, 
+7.0, -6.0], [0.0, 4.0, -5.0]], [[3.0, -2.0, -3.0], [-2.0, -3.0, 4.0]], [[4.0, 7.0, 1.0], [7.0, 3.0, 1.0]], [[3.0, -5.0, -7.0], 
+[-1.0, -4.0, -7.0]], [[-5.0, 6.0, 6.0], [5.0, 7.0, 0.0]]]])
+      arg1=numpy.array([[[[6.0, 3.0, -6.0, 7.0, -5.0], [7.0, 7.0, 0.0, 5.0, 2.0], [1.0, -5.0, -3.0, -3.0, 1.0], [1.0, -7.0, 
+2.0, -2.0, -1.0]], [[7.0, -7.0, -7.0, -7.0, 0.0], [7.0, 1.0, -1.0, 0.0, -4.0], [1.0, 1.0, 0.0, -4.0, 7.0], [-4.0, 0.0, -5.0, 
+6.0, 4.0]], [[-4.0, 2.0, 1.0, 4.0, 6.0], [-7.0, 4.0, -3.0, 5.0, -5.0], [5.0, -2.0, 3.0, -6.0, 4.0], [3.0, 5.0, -5.0, -3.0, 
+4.0]]], [[[3.0, 6.0, -1.0, -2.0, -6.0], [-5.0, -3.0, 4.0, -3.0, 0.0], [-1.0, -4.0, 0.0, 3.0, 0.0], [3.0, 7.0, 5.0, 1.0, 3.0]], 
+[[3.0, -1.0, -6.0, 7.0, 0.0], [2.0, 7.0, 3.0, 0.0, 3.0], [0.0, 2.0, -3.0, 2.0, 4.0], [6.0, 3.0, -3.0, -3.0, -7.0]], [[-7.0, 
+7.0, 0.0, 3.0, 4.0], [-3.0, 6.0, 0.0, 4.0, -2.0], [2.0, 3.0, 6.0, 3.0, -3.0], [-3.0, 6.0, -2.0, -2.0, -7.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[[-66.0, 67.0, 52.0, 65.0, 23.0], [-99.0, 7.0, 3.0, 14.0, 4.0], [15.0, -18.0, 15.0, 9.0, -26.0], [54.0, 
+49.0, 15.0, -56.0, -8.0]], [[-32.0, -7.0, 7.0, 1.0, 34.0], [-23.0, 8.0, 5.0, -9.0, -3.0], [1.0, 36.0, 15.0, 21.0, 2.0], [5.0, 
+42.0, -26.0, -6.0, -34.0]], [[-45.0, 20.0, 38.0, -78.0, 31.0], [-74.0, -49.0, -11.0, -10.0, -58.0], [15.0, 5.0, 57.0, -4.0, 
+-1.0], [-35.0, 81.0, -11.0, 32.0, 55.0]], [[-61.0, 53.0, 49.0, 19.0, -10.0], [-2.0, -12.0, 13.0, -9.0, 43.0], [-29.0, 27.0, 
+15.0, 71.0, -93.0], [-30.0, -25.0, 51.0, -21.0, -79.0]], [[-67.0, -37.0, -17.0, -7.0, 127.0], [-7.0, 77.0, -56.0, 69.0, -83.0], 
+[60.0, 57.0, 72.0, -61.0, 53.0], [-52.0, 49.0, -125.0, 6.0, -11.0]]], [[[-1.0, -15.0, 32.0, -9.0, -12.0], [-16.0, -45.0, 6.0, 
+-31.0, 21.0], [-18.0, -3.0, -21.0, 12.0, -15.0], [19.0, -15.0, 24.0, -3.0, 14.0]], [[12.0, -67.0, -10.0, 37.0, 26.0], [48.0, 
+24.0, -15.0, 5.0, 24.0], [-2.0, 23.0, -36.0, -21.0, 21.0], [19.0, -61.0, -34.0, -17.0, -25.0]], [[-14.0, -8.0, -12.0, 82.0, 
+35.0], [37.0, 73.0, -32.0, 61.0, 6.0], [25.0, -3.0, -9.0, -44.0, 7.0], [7.0, -66.0, -33.0, -41.0, -29.0]], [[23.0, -135.0, 
+-4.0, -47.0, 41.0], [49.0, -34.0, -10.0, -48.0, 11.0], [-19.0, 62.0, -36.0, -8.0, 44.0], [2.0, -31.0, -57.0, 28.0, -3.0]], 
+[[75.0, 18.0, -6.0, -20.0, -91.0], [15.0, -52.0, 16.0, -22.0, 19.0], [-19.0, -74.0, -42.0, -13.0, -4.0], [18.0, -46.0, 74.0, 
+17.0, 75.0]]], [[[-41.0, 42.0, 8.0, 2.0, 16.0], [-76.0, 1.0, 36.0, -29.0, -1.0], [-4.0, 31.0, 27.0, 59.0, -5.0], [31.0, 116.0, 
+-5.0, -12.0, -46.0]], [[38.0, -81.0, 24.0, -57.0, -23.0], [56.0, -74.0, -13.0, -41.0, 23.0], [-31.0, 2.0, -42.0, -12.0, -8.0], 
+[-22.0, -92.0, 21.0, 33.0, 43.0]], [[2.0, -26.0, 57.0, -82.0, -18.0], [-57.0, -112.0, 8.0, -66.0, -5.0], [-23.0, -11.0, -9.0, 
+10.0, -7.0], [10.0, 25.0, 34.0, 31.0, 77.0]], [[33.0, -26.0, -48.0, 106.0, 20.0], [40.0, 91.0, -22.0, 59.0, 9.0], [32.0, -25.0, 
+-39.0, -67.0, 55.0], [55.0, -56.0, -45.0, -48.0, -8.0]], [[-8.0, 60.0, -1.0, 44.0, -2.0], [-28.0, 37.0, -21.0, 58.0, -28.0], 
+[35.0, -56.0, 18.0, -49.0, 4.0], [7.0, -4.0, 7.0, -24.0, 41.0]]], [[[144.0, -88.0, -103.0, -32.0, -76.0], [142.0, 9.0, 23.0, 
+-30.0, 32.0], [-29.0, -8.0, -72.0, -11.0, 60.0], [-3.0, -76.0, 1.0, 50.0, 7.0]], [[-27.0, 36.0, 13.0, 18.0, -5.0], [20.0, 16.0, 
+-6.0, 22.0, 12.0], [-4.0, 3.0, 15.0, 17.0, -47.0], [-34.0, -35.0, 22.0, -10.0, -36.0]], [[92.0, 11.0, -97.0, -7.0, -52.0], 
+[38.0, 45.0, 27.0, 8.0, -18.0], [11.0, -34.0, -12.0, -16.0, 66.0], [15.0, 41.0, -8.0, 27.0, 21.0]], [[45.0, -21.0, 35.0, -19.0, 
+-79.0], [53.0, -79.0, 10.0, -45.0, 63.0], [-50.0, -31.0, -60.0, 21.0, -55.0], [-4.0, -117.0, 87.0, 10.0, 23.0]], [[24.0, -22.0, 
+-53.0, -14.0, 31.0], [-46.0, 29.0, 17.0, -10.0, -43.0], [26.0, 13.0, 12.0, -16.0, 89.0], [46.0, 121.0, -66.0, 12.0, 19.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=numpy.array(arg1*1j)
-        ref=-ref
-        res=outer(arg0, arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.791652550411)+(1.-msk_arg0)*(0.27657970676)
-      arg1=Data(0.524788097784,self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.41544983603581132)+(1.-msk_ref)*numpy.array(0.14514573819592874)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.2777005478551926, -0.11730389760971582])+(1.-msk_arg0)*numpy.array([0.14278735863381065, 
--0.59771418621042871])
-      arg1=Data(-0.929492640069,self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.25812061537453374, 0.10903310947963972])+(1.-msk_ref)*numpy.array([-0.13271979894502137, 
-0.55557093694743187])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.13317664602533652, -0.8278119096032821, 0.81800967280777881, -0.49731655159751642, 
--0.46639600919465596], [0.54488677268272023, 0.29640062843549808, -0.067602651839557826, 0.070422007044289581, 
-0.10857751872635713], [-0.10303795811028849, 0.92312867631464468, 0.83674986777882965, 0.56457088498604824, 
-0.24440215677678134], [0.88430294741407822, 0.78808073457631256, -0.48973872679301778, 0.44081702009759072, 
--0.80189819054052025]])+(1.-msk_arg0)*numpy.array([[-0.8024246446648049, 0.150768401322257, 0.36988293952586004, 
--0.03966117250769452, 0.56627044745398591], [0.26077699778899999, 0.62989660003720349, -0.99418330021016099, 
--0.90421489639872443, -0.2575086193377818], [-0.20703755181091976, 0.57518613221448489, -0.29410545024012147, 
-0.089755770194008822, 0.38574047734125716], [-0.34763454259115556, 0.48021712485292833, -0.84799225914637599, 
-0.96309475859407079, -0.78914836659374887]])
-      arg1=Data(-0.355722959141,self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.047373990612636169, 0.29447170209642776, -0.29098482141732834, 0.17690691536417824, 
-0.16590776852238098], [-0.19382873517560922, -0.10543650863839409, 0.024047815358161487, -0.025050724734458879, 
--0.038623516257551525], [0.036652967362861402, -0.32837806440676748, -0.29765113902731405, -0.20083082585221726, 
--0.086939458429134253], [-0.31456686123144295, -0.28033841094567619, 0.17421130910086821, -0.15680873482893182, 
-0.28525359726906774]])+(1.-msk_ref)*numpy.array([[0.28544086908801036, -0.053631781863345038, -0.1315758537839937, 
-0.014108389647447693, -0.20143539924255741], [-0.09276436532946776, -0.22406868251823067, 0.35365382547954732, 
-0.32164999864653043, 0.091601728075207015], [0.073648010583535067, -0.20460691300833245, 0.10462006105897831, 
--0.031928188173412579, -0.13721674406038065], [0.12366158819023207, -0.17082425668297477, 0.30165031575240137, 
--0.34259491746048659, 0.28071819216619254]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.71614527258053018, -0.04214798739915282], [-0.85602591015480667, -0.63437029957306024]], 
-[[0.48616819208344642, -0.68488217634113524], [0.16967198365605829, 0.51842248585142947]], [[0.12768328872289358, 
--0.6502475147161737], [0.25458052156920608, 0.82355211118303573]], [[0.34057178868714955, 0.67446046215066358], 
-[0.051489994935964178, -0.39981816352451194]], [[0.83849369299165977, -0.50780980914803031], [-0.099483057187065294, 
-0.16116058957979695]], [[-0.59619809542046154, 0.17687119993864409], [-0.59048580388867711, 
-0.52200367122135582]]])+(1.-msk_arg0)*numpy.array([[[0.15979749909800622, 0.79913484946863145], [0.78599981054426094, 
--0.33299470529963315]], [[-0.63169398011950184, 0.97937647208491163], [0.41559571088800507, -0.89012278000386758]], 
-[[-0.61202692897310218, 0.50430213793464462], [-0.674353480635832, -0.90845669378286154]], [[-0.88096226389709842, 
-0.27048679451685098], [-0.88479897767137117, -0.97502331724884006]], [[-0.46088647641014102, -0.54914351217085633], 
-[0.8665650718293656, -0.99478510823778965]], [[-0.24029797246396223, -0.071361817533693195], [-0.72546360451150349, 
--0.61207451014397418]]])
-      arg1=Data(-0.631902761531,self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.45253417540070151, 0.026633429630480432], [0.54092513656854391, 0.40086034413319321]], 
-[[-0.30721102314585552, 0.43277893855303179], [-0.10721619502663338, -0.32759260044906235]], [[-0.080683422745301839, 
-0.41089320022754167], [-0.16087013461147476, -0.52040485332089326]], [[-0.21520825377081634, -0.42619342857619036], 
-[-0.032536669991230949, 0.25264620164122104]], [[-0.52984648012739777, 0.32088642073295326], [0.062863618562010407, 
--0.10183782160536888]], [[0.37673922291545731, -0.1117653996764552], [0.37312961012185503, 
--0.32985556137387168]]])+(1.-msk_ref)*numpy.array([[[-0.10097648096570927, -0.50497551821454645], [-0.49667545084542514, 
-0.2104202738538973]], [[0.3991691704797517, -0.61887069728852517], [-0.26261607739039178, 0.56247104278571403]], 
-[[0.38674150654917872, -0.31866991360667352], [0.42612582666153559, 0.57405629353232368]], [[0.55668248736080128, 
--0.17092135241275061], [0.55910691738996665, 0.61611992672624138]], [[0.29123543719566308, 0.34700530181736156], 
-[-0.54758486193491496, 0.62860745702494858]], [[0.15184495239017518, 0.045093729567381551], [0.45842245508074203, 
-0.38677157322244959]]])
+   def test_generalTensorProduct_array_rank2_constData_rank0_offset0(self):
+      arg0=numpy.array([[-7.0, 6.0, 1.0, 0.0, -6.0], [1.0, 3.0, -4.0, 5.0, -3.0], [-2.0, -7.0, -2.0, 0.0, -6.0], [6.0, -1.0, 
+3.0, -2.0, 1.0]])
+      arg1=Data(-6.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[42.0, -36.0, -6.0, -0.0, 36.0], [-6.0, -18.0, 24.0, -30.0, 18.0], [12.0, 42.0, 12.0, -0.0, 36.0], 
+[-36.0, 6.0, -18.0, 12.0, -6.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank4_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.33614499471732762, -0.38763051892321343, -0.67310246736468238, 0.54147114643914462], 
-[0.79807775395112168, 0.65747863038277421, -0.82356537264935969, 0.97369681738798897], [-0.55352515849093664, 
--0.79137549467897039, 0.1987852106562471, -0.7374247699467178]], [[0.90001316105185181, 0.89817527500492433, 
--0.39221865336499651, 0.2541763072784724], [0.85319027771590972, -0.64517033625387277, -0.6040202851658163, 
--0.027827968094352507], [0.33853315146414942, 0.73257354535595054, -0.43164449645334657, 0.5741811015673548]]], 
-[[[0.36107836699350915, -0.017101929430308527, 0.90242939202759342, -0.39777338170880627], [0.97430916784023713, 
-0.67115836087484748, 0.58825808307274419, 0.05087528266536756], [-0.96855449930468684, -0.92599616247707472, 
-0.017156628965631304, 0.98848943258679478]], [[-0.1015215647727179, 0.033919722549923037, -0.48391259268061093, 
--0.038419572012241332], [-0.31296886312169048, 0.6763235149893454, -0.43060770967905682, -0.56601062303268557], 
-[-0.51970228140602592, -0.098958271363178474, -0.89913559217507522, -0.75328978108805522]]], [[[0.7928607866930224, 
-0.93404095404258913, 0.058432793246443682, -0.36756309946219856], [0.57169716993400965, 0.18136666084464381, 
-0.0030118825408098626, -0.61854504527165433], [-0.49261584481107556, 0.67908138854072941, -0.079794244062769026, 
-0.70216268024066131]], [[-0.23110518553918236, 0.221210552858077, -0.9089179127211533, -0.65776227434369638], 
-[-0.36972745210471825, 0.67252662597655788, 0.42985612896673686, -0.42719967674258852], [0.61250180881279626, 
-0.40884633171139528, 0.73839275838093421, -0.58021136703013321]]]])+(1.-msk_arg0)*numpy.array([[[[-0.31009462545392563, 
-0.19911016528579473, 0.15798365667222125, -0.33924318891169092], [-0.46683321503505382, 0.96265767240208344, 
-0.16348606888355133, -0.04670429266016729], [-0.22730536037283411, -0.60736704221980231, 0.11646128721190485, 
-0.19817799892539867]], [[0.22650372920304318, -0.30264633978965572, -0.17506598233551052, -0.13724912529266642], 
-[0.058668115865703419, 0.051609198623017383, -0.87565988190737931, -0.094481322335332907], [0.50273756152670601, 
--0.019114983721407741, -0.31015293298428226, -0.43861313303089045]]], [[[0.77531930002959948, -0.39709154910793831, 
--0.33698975134292386, 0.65281235409873872], [0.34828176289241219, 0.66750619882050244, 0.64624691865888506, 
--0.7148248388267775], [0.2906366405892904, 0.92778907252451792, 0.40218686572635032, 0.92138695697192396]], 
-[[-0.98774207903531885, -0.44795498518746713, 0.54602942308871483, -0.62025586524331833], [-0.20252787584458476, 
--0.31858728562069905, -0.52867934500457392, -0.53999227776338721], [-0.040113310138338187, -0.98575276362842268, 
-0.24615633737850562, -0.054113937410190882]]], [[[-0.64735009236087149, 0.21069057561826776, 0.3280043377298274, 
--0.99782439129055489], [0.65027332347529598, -0.68432726910756392, 0.51695839859198411, -0.71134830648984892], 
-[0.19173752494194862, 0.14071904346667186, -0.85589771591759933, -0.69208088909502607]], [[-0.73371064987758849, 
--0.32688482596206314, 0.15057874653305237, 0.16123884704326841], [0.40523773076670322, -0.80911074177084941, 
-0.087570240521975373, 0.51863272802496585], [0.78101380659994502, 0.185492143914324, 0.043925946630618329, 
--0.73751576574241118]]]])
-      arg1=Data(0.880552249443,self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.29599323123725768, -0.34132892539048859, -0.59270189174342325, 0.47679363600532304], 
-[0.70274916147186239, 0.57894428694407751, -0.72519234144953448, 0.85739092282622142], [-0.48740782343233829, 
--0.69684747199342112, 0.17504076439930547, -0.64934103997137049]], [[0.79250861349227075, 0.79089025879942942, 
--0.34536901749394633, 0.22381551912910561], [0.75127861824541242, -0.56810619086207059, -0.53187142081179917, 
--0.02450397990290264], [0.29809612803269342, 0.64506928324541857, -0.38008553231156911, 0.50559646057263929]]], 
-[[[0.31794836828124234, -0.015059142429669011, 0.79463623111313331, -0.35026024603213129], [0.85793012939439584, 
-0.59099000440064298, 0.5179919783025736, 0.04479834459202417], [-0.85286284307061977, -0.81538800384452448, 
-0.015107308228540955, 0.87041659341467059]], [[-0.089395042227562629, 0.029868087991808047, -0.42611032201857585, 
--0.033830440558006082], [-0.27558543642733863, 0.59553819247488249, -0.37917258738527582, -0.49840192731991273], 
-[-0.45762501293259517, -0.08713792844981097, -0.79173586824378417, -0.66331101121930924]]], [[[0.69815534921747391, 
-0.82247186315383614, 0.051453127534377988, -0.32365851404358109], [0.50340922898543528, 0.15970282118066795, 
-0.0026521199463674116, -0.54466123099561092], [-0.43377399025952373, 0.59796664423423229, -0.070263001102053524, 
-0.61829092756065118]], [[-0.20350019098440666, 0.19478744991964977, -0.80034971260540311, -0.5791940502719084], 
-[-0.32556433963153913, 0.59219483331378808, 0.37851078129840471, -0.37617163631689371], [0.53933984553784908, 
-0.36001055706487795, 0.65019340436455431, -0.51090642439062561]]]])+(1.-msk_ref)*numpy.array([[[[-0.27305451998355529, 
-0.17532690392932046, 0.1391128642579125, -0.29872135310431469], [-0.41107103761369862, 0.84767037887695795, 
-0.14395802570796035, -0.041125569960541924], [-0.2001542463866896, -0.53481841526402496, 0.10255024842743875, 
-0.17450608274381887]], [[0.19944836825690682, -0.26649591528739036, -0.15415474454643513, -0.1208550260105046], 
-[0.051660341396111906, 0.045444595939434639, -0.77106427876029882, -0.083195740912701099], [0.44268669068169419, 
--0.016831741913946766, -0.27310586281057025, -0.38622178092547427]]], [[[0.68270915367742724, -0.34965985680169365, 
--0.29673708358415807, 0.57483538686564883], [0.30668028975479333, 0.58777408488836003, 0.5690541779205146, 
--0.62944061978645638], [0.25592074764137812, 0.81696675481984904, 0.35414654931165929, 0.81132935756882019]], 
-[[-0.86975850956378953, -0.39444776985590929, 0.48080743676268434, -0.54616769737005122], [-0.1783363766498072, 
--0.2805327509971603, -0.46552978647768706, -0.47549141486625446], [-0.035321865474907586, -0.86800681340739605, 
-0.21675351659322686, -0.04765014931274672]]], [[[-0.57002558000532488, 0.18552406029704943, 0.28882495741497266, 
--0.87863651229972162], [0.57259963773877232, -0.60258591616766632, 0.45520888074848337, -0.62637935141691348], 
-[0.16883490889021455, 0.1239104702640073, -0.75366265904413743, -0.60941338368895026]], [[-0.64607056318979839, 
--0.28783916880959021, 0.13259245397794606, 0.14197922946150238], [0.35683299538568819, -0.7124642837145978, 
-0.077110172275866376, 0.45668321529700362], [0.68772346424741138, 0.16333552457771272, 0.038679091114492303, 
--0.6494211665239582]]]])
+   def test_generalTensorProduct_array_rank3_constData_rank1_offset1(self):
+      arg0=numpy.array([[[-7.0, 7.0, -5.0], [-3.0, 0.0, -6.0], [7.0, -6.0, -4.0], [3.0, -6.0, -4.0], [-4.0, -3.0, -7.0]], 
+[[7.0, 4.0, 6.0], [0.0, 5.0, -3.0], [6.0, -3.0, -2.0], [-7.0, 3.0, 4.0], [5.0, 4.0, 5.0]], [[-3.0, 3.0, 1.0], [-1.0, -7.0, 
+6.0], [-5.0, -2.0, 7.0], [3.0, 3.0, 4.0], [4.0, 4.0, -6.0]], [[1.0, 0.0, -1.0], [-7.0, 0.0, 0.0], [4.0, -7.0, -5.0], [-4.0, 
+-4.0, 3.0], [-7.0, -1.0, -4.0]]])
+      arg1=Data(numpy.array([1.0, 2.0, -6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[37.0, 33.0, 19.0, 15.0, 32.0], [-21.0, 28.0, 12.0, -25.0, -17.0], [-3.0, -51.0, -51.0, -15.0, 
+48.0], [7.0, -7.0, 20.0, -30.0, 15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.264591594097)+(1.-msk_arg0)*(-0.427834372758)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.12978686673)+(1.-msk_arg1)*(0.427514232563)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array(0.034340513960799644)+(1.-msk_ref)*numpy.array(-0.18290528353399987)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.21293714109293549, -0.97325505842674231])+(1.-msk_arg0)*numpy.array([-0.6125640006994324, 
-0.78735279410138892])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.233178513628)+(1.-msk_arg1)*(0.731625996957)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.04965236605634122, 0.22694216790531338])+(1.-msk_ref)*numpy.array([-0.44816774771145035, 
-0.57604777294099929])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.32941699506058231, 0.50568121904021801, -0.35213527917652732, 0.69364322007306822, 
--0.48890801916381332], [0.91487273015996218, 0.35548718050125561, 0.9280950949893787, 0.76483319225020319, 
--0.13978070240719553], [0.47902080752887843, 0.24418645006654782, 0.39670242841894154, -0.64460121466056619, 
-0.092516635563920646], [-0.66523647553523979, 0.58631041062426514, -0.45387928658778942, 0.89804929988327054, 
--0.34436500698567896]])+(1.-msk_arg0)*numpy.array([[0.45830684062404137, 0.02169027792878131, -0.48337085922610523, 
--0.4796207471344418, -0.87794907194563687], [-0.53017579701142581, 0.24506177783476679, 0.88874600023393135, 
-0.86671281296747926, 0.64119254334737619], [-0.14087777246442301, 0.94002508153033104, 0.89390247775514986, 
-0.51517305006431546, 0.83904630357552934], [-0.00086796920917087128, -0.77123745415412803, -0.77950764862612276, 
-0.43488999834439879, 0.21147604980506163]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.581754419525)+(1.-msk_arg1)*(0.905971318599)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.19163979274307527, -0.29418228404733882, 0.20485625493154649, -0.40353000885092577, 
-0.28442440088966742], [-0.5322312540732842, -0.20680623834101824, -0.5399234232493666, -0.44494508979082209, 
-0.081318041389667833], [-0.27867247182426697, -0.14205654651428778, -0.23078339096894263, 0.37499960545984318, 
--0.053821961618876771], [0.38700425967173191, -0.34108867259407061, 0.26404628090321297, -0.52244414915825133, 
-0.20033586474360976]])+(1.-msk_ref)*numpy.array([[0.41521285272297331, 0.019650769695910581, -0.43792013470526781, 
--0.43452264070869051, -0.79539667837310557], [-0.48032406590756543, 0.2220189420031087, 0.80517838573126754, 
-0.78521695001054748, 0.58090205397208527], [-0.12763122128084287, 0.85163576262989737, 0.80985000647049044, 
-0.46673200747328902, 0.76015188601569894], [-0.00078635520893561705, -0.69871901329273034, -0.70621157228359122, 
-0.39399786524546737, 0.19159123569393893]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.33745884555915162, -0.66375221821549824], [0.35050591871233383, 0.042176466180520178]], 
-[[0.20748673291497721, -0.76371032387997184], [-0.32482792758474766, -0.70921662870826352]], [[0.50212745454878882, 
-0.36618836225151474], [0.19785234293440346, -0.77302966670008377]], [[0.64935634997914415, 0.57990195989895033], 
-[-0.80742363450638099, -0.21732793929102523]], [[-0.1072984723427084, 0.25601710633311225], [0.55861416589548618, 
-0.51491586728123639]], [[-0.1317501155335572, 0.83648625632547402], [0.091416210119983576, 
--0.48358358241352173]]])+(1.-msk_arg0)*numpy.array([[[0.42886586178498498, -0.069787877992939507], [0.30684797181993506, 
-0.46417129346574049]], [[0.77136474775699138, 0.078418535081947294], [-0.49859534298556052, -0.72222304926459113]], 
-[[0.4388243207897955, -0.11542252838195743], [-0.38927617211922882, 0.048609512811642386]], [[0.96883423294606907, 
--0.87835366478764509], [-0.51994722843107555, 0.07625890302971694]], [[-0.22900078843687521, 0.19274199077969256], 
-[-0.7277710383793552, -0.51046116944335274]], [[0.81208765776357139, -0.22720534187686625], [0.60017241969465607, 
-0.43244947860361416]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.637368901774)+(1.-msk_arg1)*(-0.36037041184)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.21508577378804244, 0.42305502237423392], [-0.22340157247505449, -0.026881967930196909]], 
-[[-0.13224559109074599, 0.48676521040503384], [0.20703521947029596, 0.45203262375982139]], [[-0.32004042425646079, 
--0.2333970742907589], [-0.12610493052956287, 0.49270506970354627]], [[-0.41387954364634211, -0.36961147531752869], 
-[0.51462671519190484, 0.13851806999078145]], [[0.068388709479126703, -0.16317734189895694], [-0.35604329743234431, 
--0.32819136083517669]], [[0.083973426446253802, -0.53315032654342054], [-0.058265849448537937, 
-0.30822113683896346]]])+(1.-msk_ref)*numpy.array([[[-0.15455056723538993, 0.02514948633372573], [-0.11057892997688877, 
--0.16727360019035784]], [[-0.27797703182771805, -0.028259719783337627], [0.17967900909300136, 0.26026781770351548]], 
-[[-0.15813930120824105, 0.041594864088571208], [0.14028361446594037, -0.017517430151252737]], [[-0.3491391915310551, 
-0.31653267192032503], [0.18737359684455307, -0.027481452291253424]], [[0.082525108440584458, -0.069458510596057663], 
-[0.26226714882568447, 0.18395510186041289]], [[-0.29265236367809527, 0.081878082624318074], [-0.21628438206011838, 
--0.15584199670419457]]])
+   def test_generalTensorProduct_array_rank4_constData_rank2_offset2(self):
+      arg0=numpy.array([[[[0.0, -6.0, 5.0], [-3.0, 1.0, 2.0]], [[-3.0, -7.0, 2.0], [-5.0, 1.0, -1.0]], [[5.0, 0.0, -7.0], [0.0, 
+0.0, -4.0]], [[4.0, 1.0, -2.0], [0.0, 2.0, 6.0]], [[7.0, 4.0, -7.0], [4.0, 7.0, 1.0]]], [[[0.0, -7.0, -4.0], [-4.0, 0.0, 
+-6.0]], [[4.0, 2.0, 1.0], [1.0, 2.0, -4.0]], [[-3.0, 1.0, 6.0], [0.0, -6.0, 3.0]], [[0.0, -1.0, -2.0], [-2.0, -2.0, 0.0]], 
+[[3.0, 1.0, -1.0], [7.0, 0.0, -4.0]]], [[[-6.0, 2.0, 3.0], [-7.0, -2.0, -5.0]], [[-5.0, 3.0, 1.0], [2.0, -4.0, 2.0]], [[-1.0, 
+-3.0, -7.0], [3.0, 6.0, 0.0]], [[-2.0, -6.0, -4.0], [-5.0, 1.0, 1.0]], [[-7.0, 3.0, -6.0], [-4.0, -2.0, 5.0]]], [[[3.0, -4.0, 
+4.0], [-7.0, 1.0, 2.0]], [[-6.0, 6.0, 6.0], [-1.0, -3.0, 7.0]], [[-1.0, -5.0, -7.0], [0.0, 7.0, 7.0]], [[-2.0, -7.0, 0.0], 
+[-2.0, 1.0, 0.0]], [[6.0, -1.0, -2.0], [5.0, -7.0, 6.0]]]])
+      arg1=Data(numpy.array([[-4.0, 4.0, -4.0], [2.0, -2.0, -5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-62.0, -31.0, 28.0, -38.0, 5.0], [10.0, 6.0, -11.0, 4.0, 30.0], [35.0, 30.0, 14.0, -17.0, 35.0], 
+[-70.0, -7.0, -37.0, -26.0, -26.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank4_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.13152428269210881, -0.3249269355703337, 0.50929908793572332, 0.54884977050839079], 
-[0.93776551306946487, 0.10668163504602424, -0.84845010039488855, -0.9726067912742018], [0.1083611448838746, 
-0.84834672122815569, -0.92827615365710492, -0.18820948907656354]], [[-0.83470741457517228, -0.75974999350460037, 
--0.61856244293820262, 0.53074924989214667], [-0.42304235638745968, 0.60869483277582392, 0.24882199006295203, 
--0.83711417504221308], [0.34239912938615635, 0.32163181395462992, 0.57530808877203632, -0.48131089429291762]]], 
-[[[0.27536846712519769, 0.31419276389072537, 0.86070347055427066, -0.28452411904104302], [0.17730288224396284, 
-0.16756821629920848, 0.66092392041239179, -0.71636704098355231], [-0.19092608481195517, 0.41713386566086319, 
--0.75212160203626044, 0.69628026918488284]], [[0.39790165641326158, 0.63795247582254455, 0.46050525883551074, 
--0.77107410798654508], [-0.89469611490295264, -0.91344706342184856, 0.083105874082978648, 0.73203700836399621], 
-[0.83297065676902582, -0.3314079580353988, 0.52631137651761151, -0.065404468481846223]]], [[[0.069369776635408664, 
-0.14627252260314005, 0.3527723050915994, -0.90634105218740446], [0.2810853455317881, -0.89740910295554155, 0.23938138895920114, 
-0.98563119512268726], [0.26555452729196527, -0.024169136008622916, 0.34220225993250453, -0.97686411145602192]], 
-[[-0.61998394665672785, 0.67363885378633603, -0.39612107107938477, -0.95171740177791797], [0.72427341015815094, 
--0.7096180514308017, -0.92874702670260212, -0.15181963621277306], [0.42525537412781644, 0.55610853161171336, 
-0.82710212515693238, -0.93985339008584168]]]])+(1.-msk_arg0)*numpy.array([[[[0.24363200118490158, -0.1513324253842474, 
-0.57133660366702466, 0.57053434632287159], [0.48129939414584433, -0.48919366668235287, 0.83801855845680429, 
-0.71261770393977741], [0.67852259714775998, 0.44877787453470797, 0.12516534181874928, 0.0025008086222404469]], 
-[[0.097901205990076567, 0.72150826959730896, 0.52873140790976669, 0.37216804509190715], [0.80008770995803724, 
-0.057197703972295288, 0.62784333251223257, -0.10801727402453931], [0.41920817219938389, -0.72998152074020539, 
-0.76777140255742826, 0.072679087275026255]]], [[[0.80301108161918444, 0.093661774013343857, 0.4100575037780303, 
-0.017742627021203994], [-0.63220586939490575, 0.87175869618491353, 0.79014166286733545, -0.96226421942608464], 
-[-0.14275240493695485, -0.23295462209719209, -0.65589256553715414, -0.0025931052289895895]], [[0.84256758603185, 
-0.68983388564910175, -0.35000681991373761, -0.50778119657276477], [0.047412329402986009, 0.44722652266486396, 
-0.38058248940630457, 0.049682360264559744], [0.61095978397269701, -0.6566569411821479, -0.2181239549048084, 
--0.33434575728366167]]], [[[0.71884062279606309, -0.56019619993759928, -0.11950311285462911, 0.89269367228125018], 
-[-0.51800440731713415, -0.50124129173870924, -0.35877777621882045, 0.28245223081806858], [-0.85623006074111352, 
-0.0017039409286681018, 0.84801473994961341, 0.69242336798734838]], [[0.63349834503210944, 0.76984527473816655, 
-0.29278199906355118, 0.45303590963602947], [-0.88505218143270015, 0.012178144653693268, -0.83892758808741852, 
--0.92284598773509319], [-0.87068117618378538, -0.45190637812759382, -0.3925910200527376, 0.22267783977567768]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.0844199344821)+(1.-msk_arg1)*(0.941872663068)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.011103271327677369, 0.02743031061232783, -0.042994995635343869, -0.046333861666852098], 
-[-0.07916610317292809, -0.0090060566410321927, 0.071626101886695687, 0.082107401596245758], [-0.009147840751505619, 
--0.071617374624213276, 0.078365012073059251, 0.015888632736759226]], [[0.070465945250186693, 0.064138044674459355, 
-0.052219000905951218, -0.044805816902336273], [0.035713208009396515, -0.051385977902547973, -0.021005536098828367, 
-0.07066912381112847], [-0.028905312069518709, -0.027152136661419458, -0.048567471161176476, 0.040632234161744961]]], 
-[[[-0.023246587953154593, -0.026524132542415327, -0.072660530592736042, 0.024019507488031472], [-0.014967897702528691, 
--0.014146097841267077, -0.055795154058888623, 0.060475658664990994], [0.016117967570755429, -0.035214413609368951, 
-0.063494056366498033, -0.058779934705789759]], [[-0.033590831764739752, -0.053855906211653766, -0.038875823779571529, 
-0.065094025677093298], [0.075530187401526228, 0.077113141246969275, -0.0070157924451654547, -0.061798516284585228], 
-[-0.070319328269980483, 0.02797743810420586, -0.044431171922818015, 0.0055214409440761929]]], [[[-0.0058561919986014023, 
--0.012348316774693406, -0.029781014882943865, 0.076513252244128194], [-0.023729206453681276, 0.075759217675176599, 
--0.020208561172177762, -0.083206920915803742], [-0.022418095795421516, 0.0020403568783377087, -0.02888869236313989, 
-0.082466804287064474]], [[0.052339004156735223, -0.056868547901261682, 0.033440514867514023, 0.080343920703597707], 
-[-0.061143113832702163, 0.059905909409127184, 0.078404763144709524, 0.012816603742183573], [-0.035900030822045237, 
--0.046946645803616044, -0.069823907215781231, 0.079342361613857368]]]])+(1.-msk_ref)*numpy.array([[[[0.22947032176470283, 
--0.14253587450525856, 0.53812632840430608, 0.53737070414310251], [0.45332274209734597, -0.4607581415942949, 
-0.78930677135443816, 0.67119513455943514], [0.63908188552763667, 0.42269161181417431, 0.1178898138226899, 
-0.0023554432768539851]], [[0.092210469603479797, 0.67956891531147867, 0.49799765921586775, 0.35053490773966883], 
-[0.75358074206646097, 0.053872953761782826, 0.59134847158302517, -0.10173851754288017], [0.3948407175294632, 
--0.68754963893028576, 0.72314289555451294, 0.068454445481108447]]], [[[0.75633418591808432, 0.088217464517657301, 
-0.38622195309458718, 0.016711295362290466], [-0.59545742581444261, 0.82108568472870647, 0.74421283220613821, 
--0.90633036292626579], [-0.13445458779738592, -0.21941359028877122, -0.61776727738923365, -0.0024423749276449754]], 
-[[0.7935913760709179, 0.64973567895113027, -0.32966185556424821, -0.47826522787204034], [0.044656376957065855, 
-0.42123043589716824, 0.35846024281431099, 0.046794456969903725], [0.57544631875804841, -0.61848722191356853, 
--0.20544499028519989, -0.31491112879837785]]], [[[0.67705633171466328, -0.52763348667601528, -0.1125567151493511, 
-0.84080376641583598], [-0.4878941906009488, -0.47210547028977462, -0.33792297953697298, 0.26603403483022003], 
-[-0.80645968750943642, 0.0016048953801958397, 0.79872190143758515, 0.65217464157702321]], [[0.59667477328480667, 
-0.72509621906824828, 0.27576336115647193, 0.42670213867449464], [-0.83360645508049946, 0.011470261536206077, 
--0.79016296151343279, -0.86920340807002505], [-0.82007079809573435, -0.42563826382462472, -0.36977074955380512, 
-0.20973416995583236]]]])
+   def test_generalTensorProduct_array_rank2_constData_rank1_offset0(self):
+      arg0=numpy.array([[-2.0, 4.0, 2.0, -7.0, -2.0], [-3.0, -1.0, -4.0, -5.0, 0.0], [-7.0, 1.0, -3.0, -5.0, 3.0], [-5.0, -5.0, 
+0.0, -1.0, -3.0]])
+      arg1=Data(numpy.array([2.0, 0.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-4.0, 0.0], [8.0, 0.0], [4.0, 0.0], [-14.0, 0.0], [-4.0, 0.0]], [[-6.0, 0.0], [-2.0, 0.0], [-8.0, 
+0.0], [-10.0, 0.0], [0.0, 0.0]], [[-14.0, 0.0], [2.0, 0.0], [-6.0, 0.0], [-10.0, 0.0], [6.0, 0.0]], [[-10.0, 0.0], [-10.0, 
+0.0], [0.0, 0.0], [-2.0, 0.0], [-6.0, 0.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.809916642498)+(1.-msk_arg0)*(0.858853571425)
-      arg1=numpy.array([0.18792098079616504, -0.0087948976168672477])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.15220032982133061, -0.0071231339489653553])+(1.-msk_ref)*numpy.array([0.16139660550243365, 
--0.0075535292285617128])
+   def test_generalTensorProduct_array_rank3_constData_rank2_offset1(self):
+      arg0=numpy.array([[[-7.0, -5.0, 0.0], [5.0, -6.0, 6.0], [0.0, -3.0, -7.0], [2.0, -2.0, 5.0], [2.0, 1.0, 3.0]], [[-1.0, 
+-4.0, -4.0], [0.0, -5.0, 4.0], [-2.0, -7.0, -3.0], [-6.0, -4.0, -5.0], [0.0, -4.0, -3.0]], [[-2.0, 2.0, 3.0], [-6.0, 5.0, 5.0], 
+[3.0, -6.0, 3.0], [-1.0, 0.0, 3.0], [6.0, -1.0, 6.0]], [[-7.0, 1.0, -7.0], [7.0, -2.0, 5.0], [0.0, 5.0, -5.0], [7.0, 4.0, 3.0], 
+[-3.0, 4.0, 3.0]]])
+      arg1=Data(numpy.array([[-7.0, -3.0], [1.0, 6.0], [5.0, -4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[44.0, -9.0], [-11.0, -75.0], [-38.0, 10.0], [9.0, -38.0], [2.0, -12.0]], [[-17.0, -5.0], [15.0, 
+-46.0], [-8.0, -24.0], [13.0, 14.0], [-19.0, -12.0]], [[31.0, 6.0], [72.0, 28.0], [-12.0, -57.0], [22.0, -9.0], [-13.0, 
+-48.0]], [[15.0, 55.0], [-26.0, -53.0], [-20.0, 50.0], [-30.0, -9.0], [40.0, 21.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.69225378146116934, -0.05852530104787812])+(1.-msk_arg0)*numpy.array([-0.90322445384304317, 
-0.97425063291510239])
-      arg1=numpy.array([-0.94088931049844371, -0.95517417934997439])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.65133418312893998, -0.6612229376090889], [0.055065830149651891, 
-0.055901856399617179]])+(1.-msk_ref)*numpy.array([[0.84983423360171428, 0.86273667646835761], [-0.91666200625616312, 
--0.93057904877587605]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.68854400539697558, -0.65841481073462838, 0.093032278271191648, 0.90655175598475313, 
--0.3675552924858676], [0.10025318514000503, 0.70593657398898335, -0.31748455253330365, -0.43299186356982067, 
-0.69988564454522106], [0.64562779777595503, 0.070769172172916894, -0.86753891003133443, -0.072516413535663293, 
--0.3535574126470018], [0.761728829327315, 0.31243787616296226, -0.3731441451355042, 0.59820441601917862, 
-0.8188916120757328]])+(1.-msk_arg0)*numpy.array([[-0.38284500969415047, -0.21780851164808479, 0.13254498807361514, 
--0.27159469939107406, 0.80967081260907348], [0.2985837063418848, -0.7067565097923707, -0.16488817957428337, 
--0.34413067911586759, 0.93265287047179957], [0.37419307563750981, -0.23034427559306847, 0.36688817263928009, 
--0.07634503898964029, -0.28028449653149945], [0.23430328570643932, -0.54406841361731795, 0.44301529307210474, 0.14940947211625, 
--0.041130763768178147]])
-      arg1=numpy.array([0.9852682146970666, -0.49287947409927302])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.67840052293784547, 0.33936920727426834], [-0.64871518510261428, 0.32451914565405604], 
-[0.091661746721457701, -0.045853700388562166], [0.8931966301495885, -0.44682075273353761], [-0.3621405468300089, 
-0.18116045926283889]], [[0.09877627674058724, -0.049412737168582729], [0.69553686794348935, -0.34794164733513266], 
-[-0.31280743826838514, 0.15648161928725773], [-0.42661312039779303, 0.21341280200555737], [0.68957507949317576, 
--0.34495926841307928]], [[0.636116547673514, -0.31821668943168452], [0.069726615922399149, -0.034880672363028185], 
-[-0.85475851306681194, 0.42759212173690064], [-0.071448117300517172, 0.035741851767023131], [-0.34834888075162557, 
-0.17426119160935391]], [[0.75050720375461022, -0.37544050480510194], [0.30783510845082501, -0.15399421609189462], 
-[-0.36764706570232131, 0.18391509001761011], [0.58939179699511746, -0.29484267797139552], [0.80682787666026012, 
--0.40361486710419309]]])+(1.-msk_ref)*numpy.array([[[-0.37720501920703681, 0.18869644703958396], [-0.21459980341733373, 
-0.10735334467545342], [0.13059236376633479, -0.065328704016217848], [-0.26759362459023001, 0.13386345260402271], 
-[0.79774291603166503, -0.39907012431229116]], [[0.29418503528510204, -0.14716578015639994], [-0.69634472462865893, 
-0.34834577686270135], [-0.16245908231380349, 0.081269999233759271], [-0.33906101983497994, 0.16961494814405451], 
-[0.91891322862184444, -0.45968545631531799]], [[0.36868054358537372, -0.18443208633180533], [-0.22695089317927167, 
-0.11353196541608959], [0.36148325484977267, -0.18083164958369166], [-0.075220340266300825, 0.0376289026673024], 
-[-0.27615540550485662, 0.13814647524862497]], [[0.23085158000564018, -0.11548328023872152], [-0.53605331455780003, 
-0.26816015357772943], [0.4364888868886504, -0.21835314466731429], [0.1472084038508088, -0.073640862042107291], 
-[-0.040524834186999675, 0.020272509215361077]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.11711260368278764, 0.10980142262859216], [-0.91665357370244083, -0.093333775529722329]], 
-[[0.47884791251865955, 0.81001994543770106], [-0.48359066455925381, -0.38107346610484627]], [[0.62252050489004418, 
-0.50277828007388337], [0.28603879958825051, 0.69684786424599521]], [[-0.34602034382597702, 0.91199419628949729], 
-[0.69639120035850022, -0.6737254134675501]], [[-0.51849356148680248, -0.36035315909332022], [-0.7751326363239297, 
-0.29837003569811249]], [[0.56940063451215206, 0.23880928332203633], [0.87412068108193952, 
-0.84235747779910075]]])+(1.-msk_arg0)*numpy.array([[[-0.73797274562881965, 0.087647337119837188], [0.42606202197474197, 
-0.99157082131401553]], [[-0.64032420926864053, 0.15915908019775871], [0.12876515050279203, -0.30175036005486278]], 
-[[-0.3189537853451887, 0.56434647528486237], [0.41060862455421976, 0.42765641045758773]], [[0.79174083353568236, 
--0.054672767013720813], [0.26963343963365571, -0.98947217950649047]], [[-0.43169389761932053, -0.23379247312147111], 
-[0.54814164739271654, 0.61555291583611349]], [[0.35096141936800329, -0.80263157305871813], [-0.26078342225015771, 
--0.13421208138753649]]])
-      arg1=numpy.array([0.13180785873603296, 0.57438234807218902])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.015436361522429887, 0.067267412292167261], [0.014472690402844927, 0.06306799895107755]], 
-[[-0.12082214475245109, -0.52650963203197132], [-0.012302125100322251, -0.053609273143204531]]], [[[0.063115918009303745, 
-0.27504178836193383], [0.10676699454162163, 0.46526115824581316]], [[-0.063741050000290428, -0.27776594141533451], 
-[-0.050228477588398018, -0.21888187224930933]]], [[[0.082053094768830853, 0.35756478932182822], [0.066270128515524038, 
-0.28878696906853379]], [[0.037702161689152566, 0.16429563734724961], [0.091850024851042406, 0.40025711251470475]]], 
-[[[-0.045608200598807935, -0.19874797756751086], [0.12020800219260797, 0.5238333678929703]], [[0.091789832961869613, 
-0.39999481283872562], [-0.088802304125206247, -0.38697598494339785]]], [[[-0.068341526107995085, -0.29781354930710152], 
-[-0.047497378288855564, -0.20698049365525237]], [[-0.10216857303027334, -0.44522250371912492], [0.039327515516361919, 
-0.17137848169866471]]], [[[0.075051478397985275, 0.32705367344488423], [0.031476940280964233, 0.13716783689594786]], 
-[[0.1152159752502932, 0.50207948929830548], [0.11102933543898488, 
-0.48383526601441434]]]])+(1.-msk_ref)*numpy.array([[[[-0.09727060740688584, -0.42387851844756169], [0.011552607829680957, 
-0.050343083297166816]], [[0.056158322805235361, 0.24472250460623687], [0.13069682674252994, 0.56954077662621316]]], 
-[[[-0.084399762920542978, -0.36779092284718951], [0.020978417559263121, 0.091418166200998491]], [[0.016972258767596036, 
-0.073960429495662491], [-0.039773068831658431, -0.17332008033994056]]], [[[-0.042040615482101612, -0.18320142415308244], 
-[0.074385300492525258, 0.32415065360038281]], [[0.054121443581039388, 0.23584634591014464], [0.056368475737152653, 
-0.24563829320675309]]], [[[0.10435766394222021, 0.45476195903085737], [-0.0072063003512525554, -0.03140307229294468]], 
-[[0.035539806321743563, 0.15487268817555999], [-0.13042020925962614, -0.56833535381704448]]], [[[-0.056900648274614878, 
--0.24795735456302051], [-0.030815685270742646, -0.13428626967311472]], [[0.072249376826875572, 0.31484288650558639], 
-[0.081134711775079638, 0.35356272916062942]]], [[[0.046259473185855396, 0.20158604413934197], [-0.10579314899880343, 
--0.46101740757034126]], [[-0.034373304480648022, -0.14978939441034672], [-0.017690207064197366, -0.077089050447028948]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.754627721144)+(1.-msk_arg0)*(0.58366899685)
-      arg1=Data(numpy.array([-0.23430637466555004, -0.19529124738101356]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.17681408556336167, -0.14737218897049123])+(1.-msk_ref)*numpy.array([-0.13675736665662333, 
--0.11398544645247927])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.42201616119905205, 0.27767742277886431])+(1.-msk_arg0)*numpy.array([0.36965951817707077, 
-0.016971039947976774])
-      arg1=Data(numpy.array([-0.88941504482415179, -0.014645484245880747]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.37534752292937135, -0.0061806310403477865], [-0.24697047742751854, 
--0.0040667203207446247]])+(1.-msk_ref)*numpy.array([[-0.32878073692913373, -0.0054138426498021577], [-0.015094298256042233, 
--0.00024854909819430667]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.32565014483404586, 0.010119090846729684, 0.81211966143393899, -0.87604363255028828, 
--0.076988721786289904], [-0.36406220548242252, 0.40674278274405906, 0.60188613892112408, -0.30971097973586437, 
-0.62504329060164121], [0.80632167789462628, 0.035718851870698343, 0.62756915889350329, 0.15400741967310783, 
--0.80078011954154671], [-0.60228312653172322, -0.95589393004111911, -0.12966642233915548, -0.65230700307710321, 
-0.59350325591256503]])+(1.-msk_arg0)*numpy.array([[0.38013816651553789, 0.38544277320184328, -0.11994397447910532, 
-0.90332228918106083, 0.1620135444547588], [-0.29343253074237796, 0.61947664145034387, -0.085366125919957181, 
--0.92522686233194484, -0.20398584627625538], [0.92366281232068936, 0.60773805084890609, 0.27891181403544163, 
--0.87242066265766005, 0.9594846291366943], [-0.3720465977870473, 0.24525390349168763, 0.97924605524931319, 
--0.58203005863290769, -0.62666251303222253]])
-      arg1=Data(numpy.array([0.2674613723521404, -0.54031949922685807]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.087098834643987197, 0.17595512317988546], [0.0027064659248223037, -0.0054675420989360657], 
-[0.21721063916127695, -0.43880408877827143], [-0.23430783220225432, 0.47334345684044943], [-0.020591509184598226, 
-0.041598507601684057]], [[-0.097372577099875665, 0.19670990855368803], [0.10878798286705453, -0.21977105668640873], 
-[0.16098129271557488, -0.32521081717344891], [-0.082835723672680231, 0.16734288147594181], [0.16717493628381266, 
--0.33772307777298632]], [[0.21565990252697725, -0.43567132521578444], [0.0095534131401797968, -0.019299592155734051], 
-[0.16785050848353486, -0.3390878536635582], [0.041191035818181447, -0.083213211874994183], [-0.21417774972489312, 
-0.43267711318151209]], [[-0.16108747156671252, 0.32542531732040708], [-0.2556647023518786, 0.51648812959381074], 
-[-0.034680759266822764, 0.070061296384830773], [-0.17446692623791391, 0.35245419324479299], [0.15873919532183822, 
--0.32068138202418695]]])+(1.-msk_ref)*numpy.array([[[0.10167227569967223, -0.20539606376869141], [0.1030910530837798, 
--0.2082622461970314], [-0.032080380019551616, 0.064808068225829227], [0.24160381914064355, -0.48808264693076986], 
-[0.043332364939504292, -0.087539077207763577]], [[-0.078481867365118044, 0.15854731806759129], [0.16568607266240379, 
--0.33471530869118571], [-0.02283214119093737, 0.046124982408008171], [-0.24746244633636685, 0.49991811492643357], 
-[-0.054558334385460011, 0.11021753030935316]], [[0.24704412337392909, -0.49907302820758626], [0.16254645311066332, 
--0.32837271929578776], [0.0745981365471442, -0.15070149168808439], [-0.2333388277027815, 0.47138589556235055], 
-[0.25662507565968473, -0.51842825433100626]], [[-0.099508093623068478, 0.20102403140535369], [0.065595945602606176, 
--0.13251546631806083], [0.26191049380740122, -0.52910573819218509], [-0.15567055823215423, 0.31448218981551151], 
-[-0.1676080157372393, 0.33859797522581492]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.8308383256533951, -0.0020690666107840983], [0.21524076447995588, -0.10475888330800176]], 
-[[-0.087242765977021852, 0.70888825028190872], [0.78270518430092428, 0.29269417305487044]], [[-0.44144040991368905, 
--0.12863921174128756], [-0.24101563144741855, -0.92331317605137442]], [[0.047840171049458258, 0.80686689373407749], 
-[-0.61618586167476153, -0.10436202485840806]], [[0.13957673157835604, -0.20644022281349739], [0.52298215287361449, 
-0.80141225819897266]], [[0.46802794923437463, -0.53954185089423423], [-0.059424631459731536, 
-0.46892840066385233]]])+(1.-msk_arg0)*numpy.array([[[0.24025366440042739, -0.94615132172696148], [-0.60120188385701789, 
--0.61359598051779263]], [[0.80388555717190679, -0.52479497642943729], [-0.59558320626551553, -0.37112136946130847]], 
-[[0.18761274066806388, 0.78545898789654789], [-0.92703360405653634, -0.18394419220048652]], [[-0.45611388588357693, 
--0.73857176458521323], [-0.76968431314751107, 0.59284454646853635]], [[-0.85058232257517341, 0.84176506815894236], 
-[-0.54396196879800685, -0.31031616416812891]], [[-0.92721672793037735, -0.55179586860640684], [0.092088579256883074, 
-0.22532501099469493]]])
-      arg1=Data(numpy.array([0.59121762951075518, -0.29269610838823557]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.49120626539948509, 0.24318314461854629], [-0.0012232686569276269, 
-0.00060560774497254164]], [[0.12725413454992227, -0.063000134129791857], [-0.061935298659550622, 0.030662517463349404]]], 
-[[[-0.051579461292896422, 0.025535618086499859], [0.41910723091969698, -0.20748883213966021]], [[0.46274910366817118, 
--0.22909476146017724], [0.17304595516511126, -0.085670445401073339]]], [[[-0.2609873527194273, 0.12920789006704428], 
-[-0.076053769827816142, 0.037652196662805087]], [[-0.14249269029938061, 0.070544337385392661], [-0.54587902724114012, 
-0.27025017345381913]]], [[[0.028283952523249768, -0.014002631890803963], [0.47703393224416768, -0.23616679978326849]], 
-[[-0.36429994447739461, 0.18035520375605432], [-0.061700668947730519, 0.030546358539572341]]], [[[0.082520224378614629, 
--0.040853566154534164], [-0.12205109916746805, 0.060424249832310935]], [[0.30919626869836975, -0.15307484090260826], 
-[0.47380905555325792, -0.23457024918946712]]], [[[0.27670637469112702, -0.13698995935782812], [-0.31898665410753446, 
-0.15792180006932802]], [[-0.035132889746172728, 0.017393358370668535], [0.27723873745075239, 
--0.13725351798702887]]]])+(1.-msk_ref)*numpy.array([[[[0.14204220194809319, -0.070321312596018273], [-0.55938134158988206, 
-0.27693480981586704]], [[-0.35544115263134646, 0.17596945176062512], [-0.36276876107905687, 0.17959715562022152]]], 
-[[[0.4752713135091074, -0.23529417417372556], [-0.31026804194376456, 0.1536054473025921]], [[-0.35211929138471326, 
-0.17432488669530419], [-0.21941349631369997, 0.10862578058103756]]], [[[0.11091995980378878, -0.054913519077593557], 
-[0.46437720090211398, -0.22990078905588179]], [[-0.54807860986711743, 0.27133912825246864], [-0.10875104927504238, 
-0.053839749217700038]]], [[[-0.26966257039902747, 0.13350275937995873], [-0.43665664788164527, 0.21617708125952398]], 
-[[-0.45505093509068528, 0.22528360314574855], [0.35050014743150681, -0.17352329163052907]]], [[[-0.50287926445664655, 
-0.2489621356815801], [0.49766634820188915, -0.24638135962728031]], [[-0.321599905736761, 0.15921555137837942], 
-[-0.18346438697835152, 0.090828333621976162]]], [[[-0.54818687592971649, 0.27139272789769486], [-0.326231445411308, 
-0.16150850336580144]], [[0.054444391533267709, -0.02695396877549127], [0.13321611886976839, -0.065951753840683594]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.196322146119)+(1.-msk_arg0)*(-0.426019435555)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.4008017758092961, -0.69247468010822177])+(1.-msk_arg1)*numpy.array([0.043612026398168968, 
-0.10558868904036522])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.078686264795153185, 0.13594811533185513])+(1.-msk_ref)*numpy.array([-0.018579570869536998, 
--0.044982833705918678])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.084694054093183979, -0.71334990178012059])+(1.-msk_arg0)*numpy.array([0.338433690248783, 
--0.43486916422203836])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.29984942829353645, -0.5647027318292841])+(1.-msk_arg1)*numpy.array([-0.89076776806819269, 
-0.45228449535701198])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.025395463699703066, 0.047826963716118151], [0.21389756022201953, 
-0.40283063828538557]])+(1.-msk_ref)*numpy.array([[-0.30146582290199048, 0.15306831080598213], [0.38736743481574548, 
--0.19668458048649018]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.91685841531765533, -0.22384099195951723, 0.43367807439332395, 0.49498927216479727, 
--0.4553686876237637], [-0.48723087581788382, -0.028233650781919417, 0.46252772974398493, -0.49004398489623546, 
--0.60474523114706269], [-0.22700145502566982, -0.022434491114989852, -0.43737706246764052, -0.093536595481270579, 
-0.41370261256966478], [-0.66811934938107242, -0.47714142742132659, 0.98632342655140781, 0.19496584964968111, 
--0.19394544936355596]])+(1.-msk_arg0)*numpy.array([[-0.64866638345178118, -0.18375521953732088, -0.62929258930351617, 
--0.39782127311369653, -0.44126747720393511], [-0.21672598946323585, -0.90341157394747817, -0.71731330077304722, 
-0.22435617216144998, 0.93087894537294358], [0.80243746270150695, -0.82807947233128676, -0.71606775170573944, 
--0.79843563358641201, 0.87736535077078859], [-0.56915521568888772, 0.59242256876910404, -0.067116567370258728, 
-0.1996295935260104, -0.42950669257857754]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.90604925456086072, 0.69995302293583572])+(1.-msk_arg1)*numpy.array([0.76093140511844881, 
--0.11727039054567712])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.83071888373641367, -0.64175781940575283], [0.20281096390508421, -0.15667817897902017], 
-[-0.39293369602346068, 0.30355427915259936], [-0.44848466106053758, 0.34646923737255897], [0.41258645997186855, 
--0.31873668945257766]], [[0.44145517183382893, -0.34103872439640254], [0.025581078244489752, -0.019762229213319219], 
-[-0.41907290474826481, 0.32374768262595149], [0.4440039872172678, -0.34300776859964305], [0.54792896588003159, 
--0.42329325264741724]], [[0.20567449911023888, -0.15889035465605075], [0.020326753951188808, -0.015703089873964293], 
-[0.3962851614108247, -0.30614339703702081], [0.084748762609965986, -0.065471222762241779], [-0.37483494372862536, 
-0.28957239426458975]], [[0.60534903846440791, -0.46765215828120543], [0.43231363463519801, -0.33397658449147721], 
-[-0.89365760538281691, 0.69038006400708962], [-0.17664866273991842, 0.13646693583154795], [0.17572412982132102, 
--0.13575270356667005]]])+(1.-msk_ref)*numpy.array([[[-0.49359062261306635, 0.076069360121242324], [-0.13982511740038261, 
-0.021549046359948257], [-0.47884849420935149, 0.07379738771512373], [-0.30271470033641529, 0.046652656065421669], 
-[-0.33577428146186344, 0.051747609386811146]], [[-0.16491361168794619, 0.025415541425751972], [-0.68743423836412398, 
-0.10594342810030563], [-0.54582621786738728, 0.084119610925264002], [0.17071965732980873, -0.026310335930706412], 
-[0.70833502389781366, -0.10916453747463313]], [[0.61059986601314054, -0.094102154639487928], [-0.63011167643078969, 
-0.097109203123148233], [-0.54487844046545686, 0.083973544899697022], [-0.60755474856154745, 0.093632858576263689], 
-[0.66761484916425684, -0.10288897733613538]], [[-0.43308807800463911, 0.066745054424944952], [0.45079293767735523, 
--0.069473626007626091], [-0.051071103915778009, 0.0078707860675954911], [0.15190442710497187, -0.023410640397270015], 
-[-0.32682513109159467, 0.05036841758067187]]])
+   def test_generalTensorProduct_array_rank4_constData_rank3_offset2(self):
+      arg0=numpy.array([[[[1.0, 5.0, -7.0], [2.0, -1.0, -6.0]], [[6.0, 0.0, 7.0], [-1.0, -7.0, -6.0]], [[2.0, 0.0, 2.0], [7.0, 
+7.0, -2.0]], [[4.0, 0.0, 2.0], [5.0, 0.0, 0.0]], [[-3.0, 0.0, 2.0], [0.0, -3.0, -6.0]]], [[[0.0, -6.0, -4.0], [-6.0, 6.0, 
+6.0]], [[-1.0, 3.0, -4.0], [-5.0, 3.0, 4.0]], [[3.0, -3.0, -1.0], [0.0, 5.0, -2.0]], [[-5.0, -7.0, -1.0], [0.0, -3.0, 1.0]], 
+[[-4.0, 4.0, -5.0], [-2.0, 4.0, 5.0]]], [[[0.0, -1.0, -7.0], [7.0, 5.0, -5.0]], [[1.0, -6.0, 7.0], [6.0, -6.0, 1.0]], [[2.0, 
+3.0, 1.0], [0.0, 5.0, 4.0]], [[-6.0, 4.0, -4.0], [0.0, 4.0, 6.0]], [[1.0, -4.0, 2.0], [2.0, 0.0, -3.0]]], [[[-4.0, -7.0, -7.0], 
+[0.0, 5.0, 6.0]], [[-4.0, 0.0, 3.0], [-3.0, -2.0, 7.0]], [[-5.0, 4.0, -6.0], [-1.0, 0.0, 0.0]], [[-2.0, 1.0, 0.0], [0.0, 0.0, 
+-5.0]], [[6.0, 0.0, -3.0], [2.0, 5.0, -3.0]]]])
+      arg1=Data(numpy.array([[[-5.0, 6.0], [0.0, -5.0], [-2.0, -5.0]], [[3.0, -4.0], [0.0, 3.0], [1.0, 
+4.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[9.0, -19.0], [-53.0, -40.0], [5.0, -13.0], [-9.0, -6.0], [5.0, -61.0]], [[-4.0, 116.0], [2.0, 
+44.0], [-15.0, 45.0], [28.0, 5.0], [29.0, 21.0]], [[30.0, 7.0], [0.0, -37.0], [-8.0, 23.0], [44.0, 0.0], [-6.0, -4.0]], [[40.0, 
+85.0], [12.0, -5.0], [34.0, -16.0], [5.0, -37.0], [-21.0, 46.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank3_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.13883456031409991, -0.3292702283004636], [0.30614442524975405, 0.14505263944761793]], 
-[[-0.77383501589957482, 0.64758425412559206], [-0.27726204439273783, -0.9519754075218414]], [[0.607081071850609, 
--0.82120053072857457], [-0.29135529803867821, 0.68144743891650239]], [[0.23511839162296355, -0.47188904024163913], 
-[0.6432406982842358, -0.5274484392482397]], [[0.018132367332716726, -0.49504783001903019], [0.63952767645173836, 
-0.76314424887778909]], [[0.98218793657759296, 0.022328732960420039], [-0.79791121219488392, 
--0.76829567228829099]]])+(1.-msk_arg0)*numpy.array([[[0.6479716279159895, -0.01948819418153902], [-0.56839741520435338, 
--0.78827860664172444]], [[-0.68170115669068876, 0.67613005216917665], [-0.40665000876541457, -0.26812785551717999]], 
-[[-0.60645082773233461, -0.91576122624446632], [0.091252226719450436, -0.62939783050003162]], [[-0.91514322861177599, 
--0.45280213878396358], [0.23315706784438728, -0.29481090681351674]], [[0.96787113640604794, 0.88227228556255488], 
-[0.70113912024859593, 0.86814108302189719]], [[0.90063169303264656, -0.90300469456878085], [0.82130049361510138, 
-0.3235079425689702]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.12214824086500831, -0.69411170222450136])+(1.-msk_arg1)*numpy.array([-0.65090991803994647, 
-0.19335409710404261])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.016958397313634199, 0.096366692987210095], [-0.040219779156121301, 0.22855031865748496]], 
-[[0.037395002994886489, -0.2124984281366484], [0.01771792474135284, -0.10068273447914293]]], [[[-0.094522585911878801, 
-0.53712794012697795], [0.079101277453319574, -0.44949580896489877]], [[-0.033867070981208766, 0.19245082959568852], 
-[-0.11628212137554232, 0.66077727059084868]]], [[[0.074153884988995597, -0.42138207617050105], [-0.10030820022590659, 
-0.57000489825167489]], [[-0.035588537122124751, 0.20223312187375386], [0.083237605905615963, -0.47300064180286039]]], 
-[[[0.028719297931755101, -0.16319842703370216], [-0.057640416148993331, 0.32754370498321034]], [[0.078570719748198972, 
--0.44648089602614782], [-0.064426899001166688, 0.36610813400225217]]], [[[0.0022148367724094909, -0.012585888354671948], 
-[-0.060469221580864187, 0.34361849197705463]], [[0.078117180663066041, -0.44390364412159627], [0.093216727526670026, 
--0.52970735363140065]]], [[[0.11997252865178533, -0.68174814056224364], [0.0027274154518598368, -0.015498634843673482]], 
-[[-0.097463450936071436, 0.55383950972060614], [-0.09384596483421366, 
-0.53328301690374336]]]])+(1.-msk_ref)*numpy.array([[[[-0.42177115921900743, 0.1252879690647328], [0.012685058877452126, 
--0.0037681221901597339]], [[0.36997551494478309, -0.10990196901310938], [0.51309836324180802, -0.15241689825364341]]], 
-[[[0.4437260440292729, -0.1318097116467096], [-0.44009975684178348, 0.13073251576208039]], [[0.26469252387643949, 
--0.07862744528218775], [0.17452708045891424, -0.05184361941196753]]], [[[0.39474485857451164, -0.11725975223418485], 
-[0.59607806471894642, -0.17706618506338967]], [[-0.059396979414920094, 0.017643991906072732], [0.40968129026529571, 
--0.12169664923557687]]], [[[0.59567580393050312, -0.1769466926891084], [0.29473340304418222, -0.087551148711352667]], 
-[[-0.15176424792102436, 0.045081874336477507], [0.19189534319126847, -0.057002896703351576]]], [[[-0.62999692207129054, 
-0.18714184969285508], [-0.57427978108443889, 0.17059096117486786]], [[-0.45637840729561374, 0.13556812153999004], 
-[-0.56508164119689341, 0.16785863526662462]]], [[[-0.58623010149605825, 0.17414082782961263], [0.58777471173145202, 
--0.17459965739905839]], [[-0.53459263698517323, 0.15880181539405244], [-0.2105745283828401, 0.06255158614140971]]]])
+   def test_generalTensorProduct_array_rank2_constData_rank2_offset0(self):
+      arg0=numpy.array([[0.0, -6.0, 0.0, 0.0, 0.0], [0.0, 7.0, -3.0, 6.0, -1.0], [-3.0, -3.0, -3.0, -1.0, 3.0], [-2.0, -3.0, 
+1.0, -2.0, 6.0]])
+      arg1=Data(numpy.array([[5.0, 0.0, -3.0, -5.0, -1.0], [-2.0, -2.0, 0.0, -4.0, 6.0], [-2.0, 5.0, 5.0, 0.0, -1.0], [3.0, 
+-6.0, 3.0, -7.0, 7.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[-30.0, 0.0, 18.0, 30.0, 6.0], [12.0, 12.0, 0.0, 24.0, -36.0], [12.0, -30.0, -30.0, 0.0, 6.0], [-18.0, 36.0, 
+-18.0, 42.0, -42.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[35.0, 0.0, -21.0, -35.0, -7.0], 
+[-14.0, -14.0, 0.0, -28.0, 42.0], [-14.0, 35.0, 35.0, 0.0, -7.0], [21.0, -42.0, 21.0, -49.0, 49.0]], [[-15.0, 0.0, 9.0, 15.0, 
+3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[30.0, 0.0, -18.0, -30.0, 
+-6.0], [-12.0, -12.0, 0.0, -24.0, 36.0], [-12.0, 30.0, 30.0, 0.0, -6.0], [18.0, -36.0, 18.0, -42.0, 42.0]], [[-5.0, 0.0, 3.0, 
+5.0, 1.0], [2.0, 2.0, 0.0, 4.0, -6.0], [2.0, -5.0, -5.0, 0.0, 1.0], [-3.0, 6.0, -3.0, 7.0, -7.0]]], [[[-15.0, 0.0, 9.0, 15.0, 
+3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[-15.0, 0.0, 9.0, 15.0, 
+3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[-15.0, 0.0, 9.0, 15.0, 
+3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[-5.0, 0.0, 3.0, 5.0, 
+1.0], [2.0, 2.0, 0.0, 4.0, -6.0], [2.0, -5.0, -5.0, 0.0, 1.0], [-3.0, 6.0, -3.0, 7.0, -7.0]], [[15.0, 0.0, -9.0, -15.0, -3.0], 
+[-6.0, -6.0, 0.0, -12.0, 18.0], [-6.0, 15.0, 15.0, 0.0, -3.0], [9.0, -18.0, 9.0, -21.0, 21.0]]], [[[-10.0, 0.0, 6.0, 10.0, 
+2.0], [4.0, 4.0, 0.0, 8.0, -12.0], [4.0, -10.0, -10.0, 0.0, 2.0], [-6.0, 12.0, -6.0, 14.0, -14.0]], [[-15.0, 0.0, 9.0, 15.0, 
+3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[5.0, 0.0, -3.0, -5.0, 
+-1.0], [-2.0, -2.0, 0.0, -4.0, 6.0], [-2.0, 5.0, 5.0, 0.0, -1.0], [3.0, -6.0, 3.0, -7.0, 7.0]], [[-10.0, 0.0, 6.0, 10.0, 2.0], 
+[4.0, 4.0, 0.0, 8.0, -12.0], [4.0, -10.0, -10.0, 0.0, 2.0], [-6.0, 12.0, -6.0, 14.0, -14.0]], [[30.0, 0.0, -18.0, -30.0, -6.0], 
+[-12.0, -12.0, 0.0, -24.0, 36.0], [-12.0, 30.0, 30.0, 0.0, -6.0], [18.0, -36.0, 18.0, -42.0, 42.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.135679058676)+(1.-msk_arg0)*(-0.629820830028)
-      arg1=numpy.array([[-0.15137218142962316, -0.56892857471855862, 0.57687741496105271, -0.39999495525550022, 
--0.21860517149339675], [0.39059915618285679, 0.20078616449879449, -0.67471414803258778, -0.51436995307718436, 
--0.52869142419732817], [0.33338414638611669, 0.25052717773521804, -0.59775810180367017, -0.14479228654166709, 
-0.71189655719882228], [-0.94444987904345812, 0.92044245306127359, -0.54335603171718994, 0.094025208931912241, 
-0.3880528931344569]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.020538035086050812, 0.077191693471492615, -0.078270184633157325, 0.054270939004074564, 
-0.029660143889852865], [-0.052996125830392773, -0.02724247779429043, 0.091544580480203933, 0.069789231044550065, 
-0.07173235476498166], [-0.045233247159053046, -0.03399129164778137, 0.081103256568464663, 0.019645281141468216, 
--0.096589454755171444], [0.12814207055494686, -0.12488476559645874, 0.073722034909124351, -0.012757251839663067, 
--0.052650651256845288]])+(1.-msk_ref)*numpy.array([[0.095337352951132076, 0.3583230671558062, -0.36332941231509264, 
-0.25192515472597321, 0.13768209055835237], [-0.24600748475526601, -0.12645930878273987, 0.4249490247454204, 
-0.32396091078846023, 0.33298087161656914], [-0.20997227979503139, -0.15778723502573058, 0.37648050383386161, 
-0.091193198091303551, -0.44836728054893343], [0.59483420673885656, -0.57971382977992481, 0.34221694689676119, 
--0.059219035133039298, -0.24440379524865352]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.86660731561558046, 0.10293397253942249])+(1.-msk_arg0)*numpy.array([0.68626330708301464, 
--0.64806613946281844])
-      arg1=numpy.array([[-0.61871824119745367, 0.1369785624298181, -0.69937967814104596, -0.1603390367364621, 
--0.47726573003741879], [0.12320225807433371, 0.79412062731893673, -0.20323882416546035, 0.60524988458207907, 
--0.062024186681118199], [0.29346975098615879, 0.55556808629568799, -0.79331957665352171, -0.35436718901142772, 
--0.64062927975535078], [0.45054591806262989, 0.89434005681699191, -0.53782149229694065, 0.67608265546193191, 
-0.5902052140526306]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.53618575412651859, 0.11870662428418587, -0.60608754546990051, -0.13895098221457336, 
--0.41360197314303782], [0.10676797814757631, 0.68819074511582456, -0.17612825183889655, 0.52451397775431541, 
--0.053750613922963479], [0.25432303311648791, 0.48145936790639132, -0.68749654874899713, -0.3070971984114324, 
--0.55517402043352726], [0.39044638861381298, 0.77504163588565911, -0.46608003971981732, 0.58589817518411813, 
-0.51147615621246922]], [[-0.063687126449058482, 0.014099747583640465, -0.071989928584400564, -0.016504334004428443, 
--0.049126857549679097], [0.012681697849418309, 0.081741990845436402, -0.020920179545592013, 0.062300774999060358, 
--0.0063843959286142352], [0.030208007289160427, 0.057186830138539854, -0.081659535518239873, -0.036476422502574643, 
--0.065942516690287292], [0.046376481157607639, 0.092057974849305793, -0.055360102719204517, 0.069591873491698333, 
-0.060752167295917453]]])+(1.-msk_ref)*numpy.array([[[-0.42460362635675086, 0.094003361252564144, -0.47995861082772856, 
--0.11003479760526946, -0.32752995825286829], [0.084549189066187302, 0.5449758479267317, -0.13947534759945213, 
-0.4153607874049105, -0.042564923470918448], [0.20139752184059012, 0.3812659922110605, -0.5444261162479429, 
--0.24318919905269412, -0.43964036813911678], [0.30919313172241331, 0.61375276504804011, -0.36908715592402058, 
-0.46397071899877179, 0.40503618205339681]], [[0.40097034198805875, -0.088771168143058882, 0.45324428803161615, 
-0.10391030054298601, 0.3092997591632537], [-0.079843211763335295, -0.51464268921437495, 0.13171220016587246, 
--0.39224195611142443, 0.040195775215753432], [-0.19018780857071457, -0.36004486489439247, 0.51412355540212529, 
-0.22965337613492687, 0.4151701441578961], [-0.29198355376957985, -0.57959150798834569, 0.3485438982330103, 
--0.43814627648298499, -0.38249201456191473]]])
+   def test_generalTensorProduct_array_rank3_constData_rank3_offset1(self):
+      arg0=numpy.array([[[-2.0, -7.0, 6.0], [0.0, -6.0, 0.0], [2.0, 1.0, -1.0], [4.0, 5.0, -3.0], [1.0, 7.0, -5.0]], [[1.0, 
+0.0, 6.0], [7.0, -1.0, -6.0], [0.0, 3.0, 4.0], [-2.0, 7.0, 0.0], [2.0, 2.0, -1.0]], [[-6.0, 5.0, -1.0], [-7.0, -4.0, -4.0], 
+[-5.0, -4.0, 0.0], [1.0, 4.0, 6.0], [0.0, 0.0, -7.0]], [[-3.0, -4.0, -7.0], [3.0, -4.0, -1.0], [3.0, 5.0, 4.0], [0.0, 3.0, 
+0.0], [-4.0, -5.0, 7.0]]])
+      arg1=Data(numpy.array([[[0.0, 5.0, -7.0, -2.0, -6.0], [5.0, 0.0, 5.0, -3.0, -3.0], [-3.0, -3.0, -4.0, -6.0, 0.0], [-7.0, 
+-2.0, 7.0, -5.0, 7.0]], [[0.0, -7.0, 0.0, 4.0, 2.0], [0.0, 0.0, 6.0, 5.0, 2.0], [-1.0, 4.0, -3.0, -7.0, -7.0], [0.0, 0.0, -6.0, 
+-5.0, 4.0]], [[0.0, 6.0, 2.0, -5.0, 0.0], [7.0, -1.0, 7.0, -3.0, 6.0], [0.0, 1.0, -2.0, -3.0, 3.0], [-7.0, 0.0, 0.0, 2.0, 
+4.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[0.0, 75.0, 26.0, -54.0, -2.0], [32.0, -6.0, -10.0, -47.0, 28.0], [13.0, -16.0, 17.0, 43.0, 
+67.0], [-28.0, 4.0, 28.0, 57.0, -18.0]], [[0.0, 42.0, 0.0, -24.0, -12.0], [0.0, 0.0, -36.0, -30.0, -12.0], [6.0, -24.0, 18.0, 
+42.0, 42.0], [0.0, 0.0, 36.0, 30.0, -24.0]], [[0.0, -3.0, -16.0, 5.0, -10.0], [3.0, 1.0, 9.0, 2.0, -10.0], [-7.0, -3.0, -9.0, 
+-16.0, -10.0], [-7.0, -4.0, 8.0, -17.0, 14.0]], [[0.0, -33.0, -34.0, 27.0, -14.0], [-1.0, 3.0, 29.0, 22.0, -20.0], [-17.0, 5.0, 
+-25.0, -50.0, -44.0], [-7.0, -8.0, -2.0, -51.0, 36.0]], [[0.0, -74.0, -17.0, 51.0, 8.0], [-30.0, 5.0, 12.0, 47.0, -19.0], 
+[-10.0, 20.0, -15.0, -40.0, -64.0], [28.0, -2.0, -35.0, -50.0, 15.0]]], [[[0.0, 41.0, 5.0, -32.0, -6.0], [47.0, -6.0, 47.0, 
+-21.0, 33.0], [-3.0, 3.0, -16.0, -24.0, 18.0], [-49.0, -2.0, 7.0, 7.0, 31.0]], [[0.0, 6.0, -61.0, 12.0, -44.0], [-7.0, 6.0, 
+-13.0, -8.0, -59.0], [-20.0, -31.0, -13.0, -17.0, -11.0], [-7.0, -14.0, 55.0, -42.0, 21.0]], [[0.0, 3.0, 8.0, -8.0, 6.0], 
+[28.0, -4.0, 46.0, 3.0, 30.0], [-3.0, 16.0, -17.0, -33.0, -9.0], [-28.0, 0.0, -18.0, -7.0, 28.0]], [[0.0, -59.0, 14.0, 32.0, 
+26.0], [-10.0, 0.0, 32.0, 41.0, 20.0], [-1.0, 34.0, -13.0, -37.0, -49.0], [14.0, 4.0, -56.0, -25.0, 14.0]], [[0.0, -10.0, 
+-16.0, 9.0, -8.0], [3.0, 1.0, 15.0, 7.0, -8.0], [-8.0, 1.0, -12.0, -23.0, -17.0], [-7.0, -4.0, 2.0, -22.0, 18.0]]], [[[0.0, 
+-71.0, 40.0, 37.0, 46.0], [-37.0, 1.0, -7.0, 46.0, 22.0], [13.0, 37.0, 11.0, 4.0, -38.0], [49.0, 12.0, -72.0, 3.0, -26.0]], 
+[[0.0, -31.0, 41.0, 18.0, 34.0], [-63.0, 4.0, -87.0, 13.0, -11.0], [25.0, 1.0, 48.0, 82.0, 16.0], [77.0, 14.0, -25.0, 47.0, 
+-81.0]], [[0.0, 3.0, 35.0, -6.0, 22.0], [-25.0, 0.0, -49.0, -5.0, 7.0], [19.0, -1.0, 32.0, 58.0, 28.0], [35.0, 10.0, -11.0, 
+45.0, -51.0]], [[0.0, 13.0, 5.0, -16.0, 2.0], [47.0, -6.0, 71.0, -1.0, 41.0], [-7.0, 19.0, -28.0, -52.0, -10.0], [-49.0, -2.0, 
+-17.0, -13.0, 47.0]], [[0.0, -42.0, -14.0, 35.0, 0.0], [-49.0, 7.0, -49.0, 21.0, -42.0], [0.0, -7.0, 14.0, 21.0, -21.0], [49.0, 
+0.0, 0.0, -14.0, -28.0]]], [[[0.0, -29.0, 7.0, 25.0, 10.0], [-64.0, 7.0, -88.0, 10.0, -41.0], [13.0, -14.0, 38.0, 67.0, 7.0], 
+[70.0, 6.0, 3.0, 21.0, -65.0]], [[0.0, 37.0, -23.0, -17.0, -26.0], [8.0, 1.0, -16.0, -26.0, -23.0], [-5.0, -26.0, 2.0, 13.0, 
+25.0], [-14.0, -6.0, 45.0, 3.0, 1.0]], [[0.0, 4.0, -13.0, -6.0, -8.0], [43.0, -4.0, 73.0, 4.0, 25.0], [-14.0, 15.0, -35.0, 
+-65.0, -23.0], [-49.0, -6.0, -9.0, -32.0, 57.0]], [[0.0, -21.0, 0.0, 12.0, 6.0], [0.0, 0.0, 18.0, 15.0, 6.0], [-3.0, 12.0, 
+-9.0, -21.0, -21.0], [0.0, 0.0, -18.0, -15.0, 12.0]], [[0.0, 57.0, 42.0, -47.0, 14.0], [29.0, -7.0, -1.0, -34.0, 44.0], [17.0, 
+-1.0, 17.0, 38.0, 56.0], [-21.0, 8.0, 2.0, 59.0, -20.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.82198701632641225, -0.0055809644583895146, -0.81997433832370969, -0.013440107755883002, 
--0.0052025136098590163], [0.012338171120628516, -0.94554806940956548, -0.25511026330949549, -0.51527037834293887, 
-0.62279006579732687], [0.5635167688932019, 0.86230385418831657, 0.73570223287298075, 0.47639158369102952, 0.19187623056909731], 
-[-0.27036352797170204, -0.40710182516029136, -0.80722681219478321, -0.90792685183815003, 
--0.31384743450951436]])+(1.-msk_arg0)*numpy.array([[0.89229130193725426, 0.18307842930067797, 0.29290544525661, 
-0.027650258983314302, 0.14508277074613707], [-0.1224177638677284, 0.96014567322005839, -0.95987661764430232, 
--0.32853655808001747, 0.38933705747241021], [-0.66540729123951414, -0.70473240520780589, -0.36230465711735671, 
--0.96645064654281287, -0.50720451022365531], [0.30009717637530686, -0.93720424349855591, -0.90344207829791445, 
-0.095855935879436416, -0.44243063558063711]])
-      arg1=numpy.array([[0.87835048566625273, -0.87601670858751768, -0.81895933805461363, -0.61129077480889138, 
--0.0016464416367591994], [-0.079158624147162682, -0.29676575864334032, -0.8121801333168146, -0.54247405024734552, 
--0.51631405473326453], [-0.24550181580863573, -0.17128786684120079, 0.72400612674452747, -0.11041705408522606, 
-0.67698164797895566], [-0.036509002781882849, -0.60084796882118874, 0.48115497910310912, -0.34643162579331177, 
--0.50453128354835663]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.72199269500165819, 0.72007436054393781, 0.67317394278016551, 0.50247308009302138, 
-0.001353353648555269], [0.065067361279230143, 0.24393760049508348, 0.66760152450467614, 0.44590662599731978, 
-0.424403449337588], [0.20179930507925692, 0.14079640259771445, -0.59512363592477635, 0.090761384839067066, 
--0.55647012492995929], [0.030009926265732567, 0.49388922915711408, -0.39550314566356187, 0.2847622984469525, 
-0.41471816440724873]], [[-0.0049020428425125256, 0.0048890181155823009, 0.0045705829585490024, 0.0034115920879498112, 
-9.1887322575657513e-06], [0.00044178146794032893, 0.0016562391514554832, 0.0045327484578512002, 0.0030275283940290432, 
-0.0028815303888333277], [0.001370136908498085, 0.00095595149699409748, -0.0040406524610174617, 0.00061623365444971945, 
--0.0037782105163525134], [0.00020375544693693209, 0.0033533111588865856, -0.0026853088373516017, 0.0019334225908145693, 
-0.0028157711616290208]], [[-0.72022485830049465, 0.71831122098456379, 0.67152564133535508, 0.50124274859730855, 
-0.00135003989169023], [0.064908040457684946, 0.24334030658070671, 0.66596686741611733, 0.44481480040935001, 
-0.42336427539714022], [0.20130518897495533, 0.14045165527599332, -0.59366644471965579, 0.090539150863186507, 
--0.55510757885883877], [0.029936445398932865, 0.49267991566729918, -0.39453473562123026, 0.28406504313427783, 
-0.41370270539117571]], [[-0.011805125174786605, 0.011773758959370197, 0.011006901751140621, 0.0082158138836087111, 
-2.2128353011816019e-05], [0.0010639004383453086, 0.0039885637744228614, 0.010915788508965411, 0.0072909096900946133, 
-0.0069393165314919495], [0.0032995708587330052, 0.0023021273876210773, -0.0097307203593659346, 0.0014840171049925997, 
--0.0090987062975924175], [0.00049068493144833775, 0.0080754614458602072, -0.0064667747664254203, 0.0046560783807078473, 
-0.0067809548171038738]], [[-0.0045696303559049564, 0.0045574888488904607, 0.0042606471021502581, 0.0031802485755245205, 
-8.5656350230782907e-06], [0.00041182381946332843, 0.0015439278982821139, 0.0042253781972378382, 0.0028222286294071587, 
-0.0026861308967113017], [0.0012772265379895288, 0.000891127458445066, -0.0037666517280097161, 0.00057444622663892773, 
--0.0035220062372353024], [0.0001899385838551262, 0.0031259197352483804, -0.0025032153272353556, 0.0018023152480752904, 
-0.0026248308692599638]]], [[[0.01083723859603739, -0.010808444055082557, -0.010104460453754479, -0.007542210184053693, 
--2.0314078654462699e-05], [-0.00097667265040120971, -0.0036615467128846739, -0.01002081746563774, -0.0066931376604521808, 
--0.0063703711592845757], [-0.0030290434138719705, -0.0021133790119741663, 0.0089329114841574381, -0.0013623445079392132, 
-0.0083527154182894501], [-0.00045045432376637312, -0.0074133650567978935, 0.0059365724677165983, -0.0042743326806354244, 
--0.006224993312129971]], [[-0.83052260598667949, 0.82831590757544926, 0.77436542102247563, 0.57800481196842468, 
-0.0015567897110331862], [0.074848284239467086, 0.2806062901520755, 0.76795535707051754, 0.51293529091616519, 
-0.48819975766206297], [0.23213376797439825, 0.16196091180498012, -0.68458259538398514, 0.10440463232017708, 
--0.64011869027220758], [0.034521017096477785, 0.56813063692753385, -0.45495516157774463, 0.32756775495128299, 
-0.47705858111587868]], [[-0.22407622367634097, 0.22348085319127922, 0.20892493237088261, 0.15594655052016179, 
-0.00042002415947735609], [0.020194177449400059, 0.075707990828744728, 0.20719548766519372, 0.13839069779716881, 
-0.13171701445339637], [0.062630032873900315, 0.043697292811580531, -0.18470139363148436, 0.028168523741540826, 
--0.17270496647160757], [0.0093138213128532363, 0.153282483534949, -0.12274757341166896, 0.088378263274868377, 
-0.128711108593899]], [[-0.45258798706695413, 0.45138546086862624, 0.42198548796688357, 0.31498002881332571, 
-0.00084836260509248021], [0.040788094213415012, 0.15291460473538324, 0.41849236457677358, 0.27952080911217614, 
-0.26604133832618604], [0.12649981351559422, 0.088259563952820461, -0.37305891085025844, 0.05689463723400718, 
--0.34882858988534277], [0.018812007676344184, 0.30959916022108025, -0.24792490812404788, 0.17850595489247917, 
-0.25997002535981029]], [[0.54702795676119953, -0.54557450358077786, -0.51003974003236807, -0.38070582186452839, 
--0.0010253874952887204], [-0.049299204741037314, -0.18482276635187955, -0.50581771866766068, -0.33784744944688672, 
--0.32155526411941443], [-0.15289609202082347, -0.10667638186031521, 0.45090382331289203, -0.068766644378884939, 
-0.42161744508839655], [-0.022737444244723608, -0.37420214603633833, 0.29965854109433676, -0.21575417502209157, 
--0.31421707127789084]]], [[[0.49496522763842138, -0.49365010511969559, -0.4614973200354513, -0.34447260227452836, 
--0.00092779747131777881], [-0.044607212109440506, -0.16723248142883493, -0.45767712448594133, -0.30569322400379262, 
--0.290951627857437], [-0.13834439000189641, -0.096523585272962481, 0.40798959320195816, -0.062221861548812513, 
-0.38149051086909613], [-0.020573435283159542, -0.33858790598615962, 0.27113889916106015, -0.19522003040946587, 
--0.28431183871070981]], [[0.75740500911818942, -0.75539258414837984, -0.70619179362800577, -0.52711839114746928, 
--0.001419732969073578], [-0.068258786694342724, -0.25590225746927209, -0.70034605925426996, -0.46777746432543255, 
--0.44521959936809141], [-0.21169716198201677, -0.14770218775286259, 0.62431327354776089, -0.095213051305810245, 
-0.58376388426701165], [-0.03148185381138955, -0.51811351929573246, 0.41490179294250989, -0.29872932613429737, 
--0.43505927036232633]], [[0.64620441354972924, -0.64448744854187601, -0.60251021363895751, -0.44972798796155583, 
--0.0012112907884587881], [-0.058237176536220639, -0.21833123127414955, -0.59752273757625574, -0.39909937004262164, 
--0.37985340293096509], [-0.18061623406478455, -0.12601686609912122, 0.53265292405966713, -0.081234073237757498, 
-0.49805691003214791], [-0.026859754866597078, -0.44204519227894368, 0.35398679248410975, -0.25487052063395638, 
--0.37118479186079695]], [[0.41843877890233105, -0.41732698714381067, -0.39014533603439461, -0.29121378030692424, 
--0.00078435093879056575], [-0.037710502320269804, -0.14137670974537073, -0.38691577995318882, -0.25843007190862005, 
--0.2459676702163168], [-0.11695499883209939, -0.08160009815153782, 0.34491042532183369, -0.052601755262158906, 
-0.32250835941045775], [-0.017392581654241374, -0.28623891542426444, 0.22921818249575437, -0.16503711085233391, 
--0.24035445719126949]], [[0.1685345803081765, -0.16808678395932028, -0.15713883077528235, -0.11729216965199298, 
--0.00031591301511337011], [-0.015188658418393501, -0.056942295130462652, -0.15583806252393731, -0.10408787594301175, 
--0.099068394612065389], [-0.047105963015229846, -0.032866070231711078, 0.13891956650867204, -0.021186408128417322, 
-0.12989668677865757], [-0.0070052098356243684, -0.1152884434025082, 0.092322203709857359, -0.066471994507144722, 
--0.096807560891447084]]], [[[-0.237473936100386, 0.23684296789587969, 0.22141673590181513, 0.16527073049388713, 
-0.00044513776951372072], [0.021401604893812865, 0.080234637488012114, 0.21958388619206129, 0.14666519805797071, 
-0.13959248937905985], [0.066374737045481733, 0.046309991977934166, -0.19574485069977771, 0.029852744290723956, 
--0.18303114671968732], [0.0098707027948385321, 0.16244737662512782, -0.13008675765146716, 0.093662476550452262, 
-0.13640685779222486]], [[-0.35757808584515982, 0.35662800093688951, 0.33339984125409727, 0.24885759012834835, 
-0.00067026939534456755], [0.03222562036748744, 0.12081388198878236, 0.33064001463220399, 0.22084217595778996, 
-0.21019239403782256], [0.099944237295861271, 0.06973160321886579, -0.29474421562493036, 0.044950984246918138, 
--0.27560046449225473], [0.014862881667286663, 0.24460630475095976, -0.19587907017783757, 0.14103294715370429, 
-0.20539560638300047]], [[-0.70902806253410877, 0.7071441751024683, 0.66108593577497554, 0.49345030347306046, 
-0.0013290518339058898], [0.063898963828039126, 0.23955727731823004, 0.65561357994526626, 0.43789959827955738, 
-0.41678254849369595], [0.19817564816323585, 0.13826815871786702, -0.58443715770147708, 0.089131606581156, 
--0.54647773761242324], [0.029471045932029764, 0.48502059048523866, -0.38840119995305028, 0.2796488969325911, 
-0.40727117967128218]], [[-0.79747799126147101, 0.79535909238548297, 0.74355517358338064, 0.55500730872994031, 
-0.0014948485719980308], [0.071870240417772777, 0.26944160097840825, 0.73740015156782446, 0.49252675664496282, 
-0.46877539427376314], [0.22289769074768401, 0.15551685369920368, -0.65734460336669143, 0.10025060830484205, 
--0.61464981640173588], [0.033147503959505158, 0.54552600476516877, -0.43685352542333672, 0.31453457538369362, 
-0.45807749992592045]], [[-0.27566804652653937, 0.27493559657766126, 0.25702828721605059, 0.19185204141310383, 
-0.00051673148376652042], [0.024843731107889903, 0.093139172000482093, 0.25490065120107763, 0.17025408895811478, 
-0.16204384147924006], [0.077050115058967653, 0.053758257570718178, -0.22722746544794023, 0.034654109150746494, 
--0.21246895342821839], [0.011458256859594654, 0.18857459354478276, -0.15100925579298979, 0.108726676988191, 
-0.15834584897144408]]]])+(1.-msk_ref)*numpy.array([[[[0.78374449841236027, -0.78166208942434445, -0.73075029398642311, 
--0.54544944131645856, -0.0014691055516275699], [-0.070632551799833562, -0.26480150515026307, -0.72470126856483319, 
--0.48404487656237943, -0.46070254010644734], [-0.21905913485584755, -0.1528386737097901, 0.64602436944342312, 
--0.098524176945782582, 0.60406483606277028], [-0.032576665624677086, -0.5361314163658133, 0.42933040273750561, 
--0.30911792641135383, -0.45018887586543715]], [[0.1608070272912652, -0.16037976304935248, -0.14993378927216161, 
--0.11191415489800628, -0.00030142794879311162], [-0.014492236574465262, -0.054331408962646842, -0.14869266311685764, 
--0.09931529705566107, -0.094525966166430345], [-0.044946086828709382, -0.031359113619550717, 0.13254990448845566, 
--0.020214980829931194, 0.12394073677737169], [-0.0066840108846411943, -0.11000230238028597, 0.08808909782439775, 
--0.063424157910319759, -0.092368794925088121]], [[0.25727364009543341, -0.25659006408105683, -0.2398776495599452, 
--0.17905039657665645, -0.00048225172070397507], [-0.023185992051725324, -0.086924306672343257, -0.23789198357773444, 
--0.15889360322785537, -0.15123119809389254], [-0.071908818670734703, -0.050171148904176843, 0.21206533692261942, 
--0.032341756390756329, 0.19829161103182963], [-0.010693685715702209, -0.17599164183910002, 0.14093291339163105, 
--0.10147170960396128, -0.14777996025362036]], [[0.024286618406791784, -0.024222088866155438, -0.022644437794013716, 
--0.016902348237576709, -4.5524537657303756e-05], [-0.0021887564584318854, -0.0082056500838681053, -0.022456991027312662, 
--0.01499954798106656, -0.01427621733009988], [-0.0067881887879827031, -0.0047361538788586559, 0.020018956909992464, 
--0.0030530601416311233, 0.018718717893569038], [-0.0010094833821416031, -0.016613601947504227, 0.013304059783312148, 
--0.0095789241731956982, -0.013950420655296043]], [[0.12743352214667511, -0.12709493130178839, -0.11881688989338568, 
--0.088687759340826886, -0.0002388703145328296], [-0.011484552519722434, -0.043055598526555189, -0.11783334408657045, 
--0.078703638267764067, -0.074908273635874684], [-0.035618083660724664, -0.024850918316516788, 0.10504081490527493, 
--0.01601961214431067, 0.098218373233072892], [-0.0052968272807739896, -0.087172688113766633, 0.069807297526578757, 
--0.050261260144182598, -0.073198796545300496]]], [[[-0.10752570234739589, 0.10724000657605139, 0.10025517086324084, 
-0.074832849725075604, 0.00020155370351078393], [0.0096904217589416242, 0.036329400565627716, 0.099425275778437988, 
-0.06640846018754977, 0.063206012033926173], [0.030053783316760119, 0.020968677636373022, -0.088631211062600204, 
-0.0135170088539754, -0.082874579525073433], [0.0044693504815987743, 0.073554464767556518, -0.058901916615626208, 
-0.042409384962678889, 0.061763591533304643]], [[0.84334441838318952, -0.84110365241878182, -0.78632026497630036, 
--0.58692819251209416, -0.0015808238137436964], [-0.076003810472951086, -0.28493835912127136, -0.77981124087942977, 
--0.52085411217914934, -0.49573670567484834], [-0.23571750621632934, -0.16446130422267244, 0.6951513499785712, 
--0.10601645672963497, 0.65000100015637896], [-0.035053961054603892, -0.57690157752672488, 0.46197887133413784, 
--0.33262482657203868, -0.48442352890311707]], [[-0.84310809328755287, 0.84086795523888092, 0.78609991940007928, 
-0.58676372132072352, 0.0015803808294411693], [0.075982512403755115, 0.28485851263921486, 0.77959271928604257, 
-0.52070815651122737, 0.49559778849958114], [0.23565145258392778, 0.16441521826703945, -0.6949565520932891, 0.10598674840557479, 
--0.64981885446930565], [0.035044138103840133, 0.57673991603053187, -0.46184941390420736, 0.33253161721150076, 
-0.48428778194813499]], [[-0.2885702453487024, 0.28780351425992873, 0.26905808213195226, 0.20083136714178024, 
-0.00054091626842049775], [0.026006501919658587, 0.097498400900688217, 0.26683086554087598, 0.17822255731598935, 
-0.16962804243040447], [0.080656321568163603, 0.056274326212876459, -0.23786248090949194, 0.036276038902495304, 
--0.2224132205103441], [0.011994542112893573, 0.197400523605883, -0.1580770007375982, 0.11381545394819925, 
-0.16575697134067044]], [[0.34197439351876124, -0.34106576761813001, -0.31885121886773615, -0.23799815152412351, 
--0.00064102074215588553], [-0.030819385799020795, -0.1155419072287656, -0.31621182324311842, -0.21120525047844191, 
--0.20102019480149816], [-0.095582954571067871, -0.066688714056679144, 0.28188241497871119, -0.042989450932313884, 
-0.26357404278694962], [-0.014214307714350307, -0.23393238016911611, 0.18733146375220353, -0.13487866980175114, 
--0.19643272533949541]]], [[[-0.5844608174260929, 0.58290790514177493, 0.54494151477022601, 0.40675733862528823, 
-0.001095554269699891], [0.052672725672010312, 0.19747009959150452, 0.54043058250888909, 0.36096618834281424, 
-0.34355913658895182], [0.16335869825160643, 0.11397619549699801, -0.4817589556378884, 0.0734723128654972, 
--0.45046852460053921], [0.024293356646948552, 0.39980861938007123, -0.32016403131140486, 0.2305181297188286, 
-0.33571879473150723]], [[-0.61900205037902267, 0.61735736204510694, 0.57714718407462051, 0.43079641801241325, 
-0.0011603007747075873], [0.055785647588170659, 0.20914044687204042, 0.5723696588143552, 0.38229904219363198, 
-0.36386324563476824], [0.17301308513770361, 0.12071211038191382, -0.51023057908585845, 0.077814476101441751, 
--0.47709090506175361], [0.025729077342214777, 0.42343703423158108, -0.33908550570104568, 0.24414159288537116, 
-0.35555954495761488]], [[-0.31823047153817546, 0.31738493323387601, 0.2967127821669342, 0.22147349456613871, 
-0.00059651347266978126], [0.028679538179519487, 0.10751961642944766, 0.29425664471887758, 0.19654087476992826, 
-0.18706298656500756], [0.088946451198236229, 0.062058391864264706, -0.26231079150104153, 0.040004612920256456, 
--0.24527360384575861], [0.013227381734586688, 0.21769001732342103, -0.17432468972426088, 0.12551379139765426, 
-0.18279403369096722]], [[-0.8488823947633436, 0.84662691439671334, 0.79148378175515544, 0.59078236453971011, 
-0.0015912045843409354], [0.076502903486464893, 0.28680945931262458, 0.78493201495326348, 0.52427439659424546, 
-0.4989920520161048], [0.23726538861569055, 0.16554126965361773, -0.69971618929320634, 0.10671263331001947, 
--0.65426935138688069], [0.035284149343184031, 0.5806899079411737, -0.46501254064149344, 0.33480906873082394, 
-0.4876045851863845]], [[-0.44550332788706148, 0.4443196256268705, 0.41537986995107928, 0.31004943804118251, 
-0.0008350826239842832], [0.040149611190540065, 0.15052093126384694, 0.41194142673233802, 0.27514528496474749, 
-0.261876817252575], [0.12451962824623712, 0.086877978608445941, -0.36721917291438377, 0.056004027837635945, 
--0.34336814519356923], [0.018517530874738959, 0.30475279974482916, -0.24404397551766557, 0.17571168308648133, 
-0.25590054256465639]]], [[[0.26359050061632189, -0.26289014070470407, -0.24576738491637995, -0.18344663546442186, 
--0.00049409248625817436], [-0.023755279592317703, -0.089058566213742252, -0.24373296471649636, -0.16279493073610474, 
--0.15494438994833831], [-0.073674401719182256, -0.051403005186393909, 0.21727219431445524, -0.033135846154655882, 
-0.20316028101638656], [-0.010956248647121266, -0.18031277887407715, 0.14439325062776281, -0.10396315270767979, 
--0.15140841358587115]], [[-0.82319380244542961, 0.82100657666385946, 0.76753216687755232, 0.57290430816241311, 
-0.0015430520886434297], [0.074187798460228119, 0.2781301283256068, 0.7611786674297415, 0.5084089818796611, 
-0.48389172307396117], [0.23008534356245425, 0.16053171566338897, -0.67854161430392446, 0.10348333164328342, 
--0.63447007325652283], [0.034216392333081186, 0.56311726607670609, -0.45094048819589283, 0.32467718977559556, 
-0.47284885991929299]], [[-0.79353878824430191, 0.79143035583000543, 0.73988232641354446, 0.55226580803768721, 
-0.0014874646541099511], [0.071515231914716135, 0.26811067375639663, 0.73375770759602021, 0.49009388337814913, 
-0.46645984266264368], [0.22179667070006565, 0.15474866640623086, -0.65409759984649918, 0.099755412822289863, 
--0.61161370701965478], [0.032983769349848584, 0.54283133769289527, -0.43469565430430251, 0.31298090799483497, 
-0.45581479137524167]], [[0.084195107833696159, -0.083971401447680033, -0.078502113796428741, -0.058595849313772097, 
--0.00015782120396242417], [-0.007587824000554833, -0.028446759531728334, -0.077852286781768698, -0.051999357776767723, 
--0.049491766924163627], [-0.023532806314437795, -0.016418958780855586, 0.069400284861542538, -0.010584130056389692, 
-0.064892709440225974], [-0.0034996046296823279, -0.057594844372613481, 0.046121560824979195, -0.033207527708652602, 
--0.048362318364981026]], [[-0.38860916363588149, 0.3875766291596332, 0.36233270045020055, 0.27045376602327792, 
-0.0007284362197977971], [0.035022200393117951, 0.13129826321514301, 0.35933337258932485, 0.24000713883693556, 
-0.22843315539485409], [0.1086175244044152, 0.075782999793803998, -0.32032249081985659, 0.048851887417868153, 
--0.29951742079175647], [0.016152701305203677, 0.26583354873289339, -0.21287770321737673, 0.15327196438496837, 
-0.22322009645061405]]]])
+   def test_generalTensorProduct_array_rank4_constData_rank4_offset2(self):
+      arg0=numpy.array([[[[-7.0, -7.0, 1.0], [0.0, 0.0, -6.0]], [[1.0, 4.0, 1.0], [-5.0, 3.0, -6.0]], [[7.0, 6.0, -6.0], [0.0, 
+-5.0, 4.0]], [[-1.0, -5.0, 5.0], [6.0, 0.0, 5.0]], [[0.0, -3.0, 3.0], [-4.0, 0.0, 7.0]]], [[[5.0, -6.0, -6.0], [0.0, -1.0, 
+-3.0]], [[3.0, 0.0, 6.0], [-1.0, -2.0, 4.0]], [[1.0, -7.0, 5.0], [-4.0, 0.0, -2.0]], [[0.0, -7.0, 2.0], [1.0, 6.0, 0.0]], 
+[[1.0, 3.0, -3.0], [-5.0, -5.0, 5.0]]], [[[-1.0, -5.0, -5.0], [7.0, 3.0, -2.0]], [[-1.0, 0.0, 7.0], [-3.0, 0.0, -7.0]], [[-2.0, 
+7.0, -6.0], [-3.0, -5.0, -2.0]], [[7.0, 6.0, 4.0], [-3.0, -1.0, 6.0]], [[-5.0, 7.0, 2.0], [5.0, 2.0, -3.0]]], [[[6.0, -2.0, 
+-6.0], [-6.0, 1.0, 5.0]], [[-2.0, -7.0, 3.0], [6.0, 0.0, 3.0]], [[-3.0, 0.0, -7.0], [-5.0, -6.0, -4.0]], [[7.0, -2.0, 5.0], 
+[-4.0, 3.0, 4.0]], [[-4.0, -6.0, -6.0], [2.0, 4.0, 7.0]]]])
+      arg1=Data(numpy.array([[[[1.0, 5.0, -3.0, -3.0, 1.0], [0.0, 7.0, -1.0, 0.0, 4.0], [6.0, 2.0, 0.0, -4.0, -3.0], [3.0, 0.0, 
+2.0, 6.0, -4.0]], [[0.0, 0.0, -1.0, 3.0, 0.0], [-1.0, 3.0, -6.0, 4.0, -1.0], [0.0, 5.0, -5.0, -4.0, 2.0], [-4.0, -2.0, 0.0, 
+0.0, 5.0]], [[-6.0, 0.0, -2.0, 4.0, 4.0], [-6.0, -2.0, 3.0, 2.0, -3.0], [5.0, -5.0, -2.0, 3.0, 3.0], [-4.0, -1.0, -2.0, -4.0, 
+-2.0]]], [[[3.0, -5.0, 5.0, 0.0, -7.0], [1.0, 6.0, 5.0, 0.0, 0.0], [-7.0, 6.0, 1.0, -2.0, 3.0], [-6.0, 0.0, 6.0, 0.0, -7.0]], 
+[[6.0, 0.0, -3.0, 2.0, 4.0], [4.0, 7.0, 0.0, 3.0, 2.0], [-4.0, -2.0, 4.0, -3.0, -1.0], [7.0, -7.0, 0.0, 5.0, 2.0]], [[6.0, 
+-1.0, 0.0, -6.0, -3.0], [0.0, -7.0, -6.0, 7.0, -3.0], [4.0, -1.0, 6.0, 1.0, -5.0], [-2.0, -2.0, -2.0, 4.0, 
+-1.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-49.0, -29.0, 26.0, 40.0, 15.0], [1.0, -30.0, 88.0, -68.0, -6.0], [-61.0, -48.0, -3.0, 53.0, 
+40.0], [15.0, 25.0, -4.0, -70.0, -3.0]], [[-38.0, 36.0, -43.0, 55.0, 70.0], [-3.0, 50.0, -11.0, -15.0, 21.0], [10.0, -13.0, 
+-51.0, -22.0, 20.0], [46.0, -18.0, -18.0, -7.0, 61.0]], [[37.0, 31.0, 0.0, -61.0, -49.0], [10.0, 16.0, -85.0, 25.0, 18.0], 
+[48.0, 80.0, -14.0, -51.0, -42.0], [-22.0, 21.0, 18.0, 57.0, 0.0]], [[17.0, -40.0, 28.0, -22.0, -38.0], [-19.0, -31.0, 46.0, 
+25.0, -29.0], [-3.0, -21.0, 51.0, 32.0, 1.0], [-49.0, -5.0, 14.0, -6.0, -78.0]], [[12.0, 13.0, -23.0, -39.0, 19.0], [-19.0, 
+-88.0, -35.0, 43.0, -27.0], [71.0, -61.0, 47.0, 36.0, -44.0], [10.0, -11.0, -44.0, 16.0, 0.0]]], [[[17.0, 28.0, 6.0, -41.0, 
+-14.0], [38.0, 43.0, 31.0, -60.0, 51.0], [-8.0, 15.0, 20.0, -14.0, -29.0], [62.0, 31.0, 28.0, 37.0, -37.0]], [[-24.0, 16.0, 
+-20.0, -13.0, 14.0], [-45.0, -39.0, -14.0, 34.0, -22.0], [79.0, -30.0, 3.0, 18.0, -12.0], [-31.0, 0.0, -20.0, 0.0, -25.0]], 
+[[-53.0, 27.0, -26.0, 8.0, 55.0], [-27.0, -34.0, 48.0, -32.0, 2.0], [51.0, -80.0, 9.0, 45.0, -4.0], [39.0, 13.0, -28.0, -22.0, 
+-19.0]], [[27.0, -5.0, -10.0, -1.0, 25.0], [20.0, 23.0, 53.0, -6.0, 13.0], [-21.0, -51.0, 56.0, 14.0, -11.0], [56.0, -30.0, 
+2.0, 22.0, -34.0]], [[4.0, 25.0, -10.0, -46.0, -11.0], [-10.0, -78.0, -83.0, 26.0, -15.0], [66.0, 7.0, -4.0, 5.0, -41.0], 
+[-12.0, 22.0, -32.0, 13.0, 37.0]]], [[[56.0, -38.0, 44.0, -14.0, -52.0], [54.0, 65.0, 63.0, -35.0, 28.0], [-100.0, 36.0, 42.0, 
+-16.0, 6.0], [20.0, -2.0, 54.0, 21.0, -52.0]], [[-94.0, 17.0, -26.0, 73.0, 69.0], [-45.0, 10.0, 49.0, -35.0, -4.0], [22.0, 
+-48.0, -59.0, 24.0, 50.0], [1.0, 7.0, -20.0, -62.0, 18.0]], [[-17.0, 7.0, 11.0, 5.0, -19.0], [6.0, -20.0, -61.0, -13.0, -1.0], 
+[-9.0, 55.0, -58.0, -19.0, 8.0], [-23.0, 31.0, -6.0, -21.0, 68.0]], [[4.0, 44.0, -47.0, -25.0, 22.0], [-37.0, -8.0, -82.0, 
+71.0, -10.0], [111.0, 2.0, -9.0, -25.0, -35.0], [-20.0, -21.0, -24.0, 45.0, 7.0]], [[-8.0, -47.0, 23.0, 66.0, -15.0], [-6.0, 
+47.0, 12.0, 17.0, -20.0], [-75.0, 44.0, -44.0, -21.0, 63.0], [-61.0, -24.0, 22.0, -40.0, 23.0]]], [[[60.0, 55.0, -37.0, -76.0, 
+13.0], [36.0, -16.0, -72.0, 18.0, 31.0], [64.0, -11.0, 50.0, -20.0, -84.0], [83.0, -7.0, -22.0, 85.0, 17.0]], [[16.0, -43.0, 
+37.0, -21.0, -41.0], [-5.0, -26.0, 65.0, -1.0, -19.0], [-27.0, -21.0, 53.0, 36.0, 4.0], [-32.0, 5.0, 20.0, -12.0, -78.0]], 
+[[-36.0, 14.0, 16.0, -7.0, -8.0], [13.0, -51.0, -19.0, -60.0, 9.0], [-10.0, 15.0, -39.0, 15.0, -1.0], [15.0, 57.0, -14.0, 
+-36.0, 53.0]], [[7.0, 51.0, -58.0, -25.0, 55.0], [-20.0, 2.0, -24.0, 39.0, 9.0], [99.0, -55.0, 32.0, -2.0, -45.0], [46.0, 
+-30.0, -28.0, 53.0, -18.0]], [[104.0, -37.0, 28.0, -64.0, -47.0], [60.0, -43.0, -10.0, 25.0, -5.0], [-56.0, -11.0, 102.0, 13.0, 
+-51.0], [38.0, -24.0, 2.0, 48.0, -15.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.301813613463)+(1.-msk_arg0)*(0.727110642101)
-      arg1=Data(numpy.array([[-0.84614696308677417, -0.33247673122998478, 0.57230573144163022, -0.70955774937999205, 
-0.29481519101937215], [-0.17747847979304732, 0.35977904309928066, -0.78470207141906911, 0.79315989800765641, 
--0.48880985228402341], [-0.85970978747551619, -0.54651625396590786, -0.91193431861718222, -0.89861413456560735, 
--0.013520906220351403], [-0.46786512942225889, 0.69005135718166533, 0.59083978122721126, -0.52809667689026507, 
--0.5516605228719571]]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.25537867244997542, 0.10034600364489327, -0.17272966081199209, 0.21415418830105959, 
--0.088979238105345637], [0.05356542129826225, -0.1085862130460596, 0.2368337676669019, -0.23938645487164698, 
-0.14752946781416357], [0.25947211748750598, 0.1649460454257213, 0.27523419194278392, 0.27121397906218569, 
-0.0040807935636588098], [0.14120806532427299, -0.20826689358605585, -0.17832348934988171, 0.15938676631006105, 
-0.16649865581288145]])+(1.-msk_ref)*numpy.array([[-0.61524246164179008, -0.24174736952825798, 0.4161295878665755, 
--0.51592699075938842, 0.21436326284320883], [-0.12904649140142246, 0.26159917104238201, -0.57056522700746204, 
-0.57671500272906817, -0.35541884555950498], [-0.62510413559179068, -0.39737778433975512, -0.66307714796362838, 
--0.65339190038498496, -0.0098311948036663883], [-0.34018971467086101, 0.50174368540299019, 0.42960589270690025, 
--0.38398471382505661, -0.40111823700717253]])
+   def test_generalTensorProduct_array_rank2_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[-5.0, 3.0, 3.0, 0.0, -1.0], [-7.0, 0.0, 0.0, 0.0, -3.0], [2.0, -5.0, -1.0, 1.0, -6.0], [-6.0, -3.0, 
+0.0, 1.0, 0.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-2.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[15.0, -9.0, -9.0, -0.0, 3.0], [21.0, -0.0, -0.0, -0.0, 9.0], [-6.0, 15.0, 3.0, -3.0, 18.0], 
+[18.0, 9.0, -0.0, -3.0, -0.0]])+(1.-msk_ref)*numpy.array([[10.0, -6.0, -6.0, -0.0, 2.0], [14.0, -0.0, -0.0, -0.0, 6.0], [-4.0, 
+10.0, 2.0, -2.0, 12.0], [12.0, 6.0, -0.0, -2.0, -0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=outer(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.50837565399440865, 0.027194880772694496])+(1.-msk_arg0)*numpy.array([-0.95525264517241903, 
-0.39119361412161857])
-      arg1=Data(numpy.array([[0.57395007622644179, 0.042614720839584175, 0.067192262504945255, 0.89561435895389252, 
--0.10709780675364455], [-0.27314154100005039, 0.054487430934573089, 0.72790883928028505, -0.48871374949030733, 
--0.68034067253660457], [0.51320482651384713, 0.11688658195513679, 0.51427970574258475, 0.39407629047254322, 
--0.36105065851902607], [-0.96414116432459473, 0.42030377683323783, 0.06595019391169199, 0.82912154649728698, 
-0.49091056947243605]]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.29178224536175806, -0.021664286576612759, -0.034158910394315525, -0.45530853545996819, 
-0.054445917549750845], [0.13885850953894119, -0.027700083335838767, -0.3700511322174258, 0.24845017201319458, 
-0.34586863433979215], [-0.26090083931206409, -0.05942229254461371, -0.26144728174293858, -0.2003387918926697, 
-0.1835493646497218], [0.49014589495644645, -0.21367220742391727, -0.033527472960914483, -0.42150520844141376, 
--0.24956698180831727]], [[0.015608503892457002, 0.0011589022523941512, 0.001827285567669577, 0.024356125710064319, 
--0.0029125120856824389], [-0.0074280516415664161, 0.001481779187876141, 0.019795394097617793, -0.013290512149365394, 
--0.018501783474447749], [0.013956544069015435, 0.0031787166601977292, 0.013985775281486002, 0.010716857734746538, 
--0.0098187296113277488], [-0.026219704011854205, 0.011430111099293098, 0.0017935076603645462, 0.022547861603065794, 
-0.013350254406858457]]])+(1.-msk_ref)*numpy.array([[[-0.54826732851222004, -0.040707824805296992, -0.064185586492968502, 
--0.85553798544510617, 0.10230546319358352], [0.26091917954676891, -0.052049262528900436, -0.69533684416687758, 
-0.46684510193274703, 0.64989722705897401], [-0.4902402680426049, -0.11165621659780717, -0.49126704926909737, 
--0.37644241887363145, 0.34489459659154342], [0.92099839754068502, -0.40149629459590852, -0.062999097183777733, 
--0.79202055046098019, -0.46894362003164314]], [[0.22452560464440025, 0.016670606660020789, 0.026285184010318055, 
-0.35035861793838979, -0.041895978088456902], [-0.10685122659055797, 0.021315135031497727, 0.2847532895891271, 
--0.19118169793404066, -0.26614492652352695], [0.20076245086861011, 0.045725284437352728, 0.20118293675884424, 
-0.15416012830959494, -0.14124071198704816], [-0.37716586659556356, 0.16442015348836053, 0.025799294708336355, 
-0.3243470543203793, 0.19204107988242416]]])
+   def test_generalTensorProduct_array_rank3_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[[-1.0, 6.0, -2.0], [5.0, 6.0, 1.0], [-1.0, 0.0, -3.0], [-1.0, -5.0, -6.0], [-6.0, -1.0, -7.0]], [[3.0, 
+-1.0, 6.0], [-2.0, -2.0, -4.0], [2.0, -1.0, 7.0], [4.0, 1.0, 3.0], [-4.0, 1.0, 5.0]], [[-7.0, 2.0, 2.0], [2.0, 2.0, -3.0], 
+[-5.0, -6.0, -1.0], [-6.0, 6.0, 5.0], [2.0, 4.0, -3.0]], [[1.0, 0.0, 2.0], [7.0, 6.0, -6.0], [-1.0, -5.0, -6.0], [0.0, -1.0, 
+-5.0], [-5.0, -1.0, 5.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-2.0, -2.0, 2.0])+(1.-msk_arg1)*numpy.array([0.0, 0.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-14.0, -20.0, -4.0, 0.0, 0.0], [8.0, 0.0, 12.0, -4.0, 16.0], [14.0, -14.0, 20.0, 10.0, -18.0], 
+[2.0, -38.0, 0.0, -8.0, 22.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.83545533635143987, 0.88593802697563584, -0.13137432742715816, 0.79834957810499785, 
--0.34659285335561085], [0.79205920222768489, -0.5442503557523124, 0.86098363592905813, -0.76446806321431415, 
--0.35901720438855866], [-0.9188798609420834, -0.017033504748293238, 0.96462600688012778, 0.7697190958071789, 
-0.6421550306644519], [-0.53342932023783485, 0.97574947391618738, 0.84854160434718096, 0.72296579812545336, 
-0.78585488081390209]])+(1.-msk_arg0)*numpy.array([[0.51969551986658802, -0.35447466539562233, -0.059544973375288857, 
--0.062774266876408635, -0.42472411284195855], [0.39001387745137195, 0.97309649704704704, 0.11415452203338505, 
-0.11381837680652263, -0.82397904811236433], [0.9895740872665495, -0.31498857505399092, -0.40291668499781208, 
-0.93169920182411015, 0.41199078249099985], [-0.12259217203566819, 0.2331181342170332, 0.30338795758460391, 
--0.12961221673806556, 0.98861933981363448]])
-      arg1=Data(numpy.array([[-0.30478629701541937, -0.85322616191583101, -0.070080896897894318, -0.07976899175371166, 
-0.56375603635745741], [-0.94577255650508674, 0.086139062157043034, -0.61915925584671561, -0.36178122159045034, 
--0.63253379352393613], [-0.79337541122853206, 0.54284661040204329, 0.81227036754821502, 0.26828885205022979, 
--0.91953815164783226], [0.91196283696851133, 0.6331936479996243, 0.1362363900972261, 0.53126051613995862, 
-0.23306894578328841]]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.25463533828832702, 0.71283235008723866, 0.058549459289640879, 0.066643429836012402, 
--0.47099298897517416], [0.79015072930691843, -0.071965339147409976, 0.517279904348525, 0.30225205216948448, 
-0.52845373322219225], [0.66282972104089521, -0.45352409748067812, -0.67861561312830165, -0.22414335312896641, 
-0.768233055772921], [-0.76190421869954095, -0.5290050121651213, -0.11381941911198401, -0.44384443320194866, 
--0.19471869449245272]], [[-0.27002177062705074, -0.75590550245170574, -0.062087331526403451, -0.070670383168119077, 
-0.49945291054613067], [-0.83789587267781962, 0.076313870772942369, -0.54853672950854215, -0.32051574165267888, 
--0.56038574103001015], [-0.70288144647478945, 0.48092845496999792, 0.71962120679644015, 0.23768729624493884, 
--0.81465381579970353], [0.80794255645898638, 0.56097033120229245, 0.12069699864501955, 0.47066389347909288, 
-0.20648464197653796]], [[0.040041094779414782, 0.11209201316494784, 0.0092068306954528802, 0.010479597641186394, 
--0.07406307010946149], [0.12425023350991971, -0.011316461356087699, 0.081341630807162002, 0.047528764662221085, 
-0.083098701699156036], [0.10422916104739342, -0.071316108337680997, -0.1067114732256573, -0.035246267494303277, 
-0.12080370621634612], [-0.11980850434530126, -0.083185389637099372, -0.017897964120127029, -0.069793992996491958, 
--0.030619275996436303]], [[-0.24332601163444462, -0.68117274639365022, -0.055949054471653784, -0.063683540912436762, 
-0.45007439378012193], [-0.75505712146912118, 0.068769083931435493, -0.4943055306850298, -0.28882788562304679, 
--0.50498308719698826], [-0.63339092483317772, 0.43338136239019942, 0.64847570523930897, 0.21418829184457513, 
--0.73411289541949643], [0.72806514614124795, 0.50550988173926459, 0.10876426455666836, 0.42413160892417934, 
-0.18607049453546493]], [[0.10563675234626491, 0.29572209001606431, 0.024289538021561568, 0.027647362461219117, 
--0.19539381323758065], [0.32779800898452871, -0.029855183338385865, 0.21459617316544985, 0.1253907858815127, 
-0.21923169234130982], [0.27497824755987804, -0.18814675563366581, -0.2815271043847466, -0.092986998755590466, 
-0.31870535174896658], [-0.3160798018191941, -0.21946039318683805, -0.047218559174665678, -0.18413109816412282, 
--0.080780030947614101]]], [[[-0.24140879126396328, -0.67580563312684261, -0.055508219288346809, -0.063181763970951627, 
-0.44652815640832944], [-0.74910785659425705, 0.068227236852748466, -0.49041078623783663, -0.28655214575388938, 
--0.50100421188062005], [-0.62840029528473251, 0.4299666531670453, 0.64336621931342752, 0.21250065412148639, 
--0.72832865481210196], [0.72232855711057531, 0.50152685569021993, 0.10790728645478857, 0.42078978058888372, 
-0.18460440326115896]], [[0.16588005057907193, 0.46436864215987111, 0.038141553068120108, 0.043414302139960843, 
--0.30682442334505977], [0.51473705033866746, -0.046881215223141225, 0.33697764526191198, 0.19689955855510877, 
-0.34425674215076196], [0.4317948498062657, -0.295444460830249, -0.44207843650517759, -0.14601630317271708, 
-0.50045896616215646], [-0.49633609845300036, -0.3446158681839, -0.074146703776826112, -0.28913872490632958, 
--0.12684785665737114]], [[-0.26241601418568961, -0.7346137631560874, -0.060338505420318503, -0.06867979655450572, 
-0.48538472195999799], [-0.81429469446167013, 0.074164322931490043, -0.53308598731803514, -0.31148771157580218, 
--0.54460124539623866], [-0.68308324621625327, 0.46738204837571612, 0.69935149440909461, 0.23099231131744, 
--0.79170730118123622], [0.78518507920532776, 0.54516936930190074, 0.11729730249175926, 0.45740661081172962, 
-0.20066854836264816]], [[0.23299939017364035, 0.65226415148357819, 0.053574607519855308, 0.060980846630518552, 
--0.43097348523956391], [0.72301291451269412, -0.065850562014292111, 0.47332747713835471, 0.27657018977656017, 
-0.48355188405284633], [0.60651016402373592, -0.41498889687650542, -0.62095475468596306, -0.20509825910883084, 
-0.70295754984188863], [-0.69716646370074919, -0.48405632172587898, -0.1041483692769362, -0.40613169783575104, 
--0.17817376557835249]], [[0.10942352429041677, 0.30632287136220132, 0.025160247685324832, 0.028638440416311549, 
--0.20239811613022901], [0.33954861922387636, -0.030925405284273878, 0.22228882510538819, 0.12988568277568113, 
-0.22709051423225335], [0.28483542216989066, -0.19489127247834664, -0.29161903656482718, -0.096320313631689122, 
-0.33013001653322727], [-0.32741034823469384, -0.22732741334141818, -0.048911207908695235, -0.19073166530659069, 
--0.083675761344904745]]], [[[0.28006199021858108, 0.78401233701336637, 0.064395924796233614, 0.073298120050140775, 
--0.51802406829340053], [0.86905135520423282, -0.079151449456545175, 0.56893297091343387, 0.33243347858649008, 
-0.58122256423444296], [0.72901668754454174, -0.49881081787911086, -0.74637888238007877, -0.24652522306422633, 
-0.84494508891710052], [-0.8379842848179736, -0.58182889122330528, -0.12518487518779056, -0.48816458919470462, 
--0.21416236049126602]], [[0.0051915788374268593, 0.014533431880361323, 0.0011937232900749318, 0.0013587454998034117, 
--0.0096027411221737257], [0.01610982133203483, -0.0014672501242655189, 0.010546452124414738, 0.0061624021558042636, 
-0.010774267375445901], [0.0135139638343403, -0.0092465803158780936, -0.013835811162530414, -0.0045698994353117308, 
-0.015662957472330138], [-0.01553392331377011, -0.010785507009790718, -0.0023205831976114305, -0.0090492285242507013, 
--0.0039699809946793421]], [[-0.2940047886417646, -0.82304414553452543, -0.06760185573319373, -0.076947243988236727, 
-0.54381373420606227], [-0.91231680459831188, 0.083091979564947543, -0.59725712059028868, -0.34898357514701078, 
--0.61015854746373377], [-0.76531055489025812, 0.52364395814053544, 0.78353712115508833, 0.25879840404366655, 
--0.88701041539798187], [0.87970306984800806, 0.6107950602517388, 0.13141716497125061, 0.51246771029716398, 
-0.2248243664986945]], [[-0.23459983295312686, -0.65674446986888302, -0.053942604593603345, -0.061399716206117248, 
-0.4339337865609012], [-0.72797919703233938, 0.066302881037197545, -0.47657870257097967, -0.27846991476261806, 
--0.48687333961872892], [-0.61067620416647439, 0.41783940212065268, 0.62522001286017692, 0.20650705261524888, 
--0.70778607464657395], [0.70195521028115226, 0.48738124220911994, 0.10486375100167097, 0.40892136412130414, 
-0.17939761820904515]], [[-0.19572005390604136, -0.54790347216877311, -0.045002800496459619, -0.051224059345677121, 
-0.36201877481439293], [-0.60733260502412101, 0.055314632100863098, -0.39759623092442686, -0.23231963144423851, 
--0.40618475757666528], [-0.50947001152588012, 0.34859168174881788, 0.52160350278074963, 0.17228303601524592, 
--0.59048604996854714], [0.58562152353835495, 0.4066084864477349, 0.087484883260498456, 0.34115161303266767, 
-0.14966639602639906]]], [[[0.16258194723474198, 0.45513585155989855, 0.037383205193901557, 0.042551119047239863, 
--0.30072399925413462], [0.50450281191610769, -0.045949101372356069, 0.3302777009652772, 0.19298471110780743, 
-0.33741207150693225], [0.42320970630504856, -0.28957029838017473, -0.43328883001058061, -0.14311313997654312, 
-0.49050861116625827], [-0.48646771620628038, -0.33776405723135444, -0.072672484961219808, -0.28338993599373941, 
--0.12432580931772833]], [[-0.29739506896965828, -0.83253497862089987, -0.068381398279694944, -0.077834551738508839, 
-0.55008465589286404], [-0.92283707445420604, 0.0840501445833685, -0.60414431816277081, -0.35300783663963753, 
--0.61719451626519095], [-0.77413564012427893, 0.52968229451697924, 0.79257238381287898, 0.26178270624558952, 
--0.89723886771623562], [0.88984725840313872, 0.61783836892270494, 0.13293258596560883, 0.51837716913600684, 
-0.22741690123424407]], [[-0.25862385345250039, -0.72399789630304678, -0.059466556687828624, -0.067687308239851543, 
-0.47837045155116459], [-0.80252736244436118, 0.073092577999698843, -0.52538238830257877, -0.30698641819104372, 
--0.53673123996060923], [-0.67321204429346304, 0.4606279337049789, 0.68924520084303675, 0.22765425294716546, 
--0.78026637845769298], [0.7738384087862672, 0.53729115393604532, 0.11560224502356863, 0.45079665069171193, 
-0.19776869717845769]], [[-0.22035006847945415, -0.61685333313099611, -0.050666091559133777, -0.057670252788884858, 
-0.40757633277321131], [-0.68376121115885047, 0.062275595822144654, -0.4476309655699825, -0.26155544961394145, 
--0.45730029887635321], [-0.57358328739194542, 0.39245953294901026, 0.58724369456815062, 0.19396366405065604, 
--0.66479463371287917], [0.65931794028969248, 0.45777735109401574, 0.09849425050037168, 0.38408318306366546, 
-0.16850087640647313]], [[-0.23951779911476295, -0.6705119437796685, -0.055073414879026103, -0.062686851507258209, 
-0.44303043275980752], [-0.74323997966936439, 0.067692802424844351, -0.48656932320824503, -0.28430753877367126, 
--0.49707976892051819], [-0.6234779392316786, 0.42659865831772847, 0.63832663287826696, 0.21083610385163193, 
--0.72262354456704303], [0.71667044655259748, 0.49759831878086463, 0.10706203210237189, 0.41749366959229928, 
-0.18315836860994791]]]])+(1.-msk_ref)*numpy.array([[[[-0.15839607307564069, -0.44341781378062139, -0.036420728146067942, 
--0.041455587638678751, 0.29298148639271593], [-0.49151376042846306, 0.044766084688524818, -0.32177429134746866, 
--0.18801608003241838, -0.32872497865860706], [-0.41231364678778004, 0.28211495140070508, 0.42213327093519415, 
-0.13942851444065429, -0.47787985775778163], [0.47394300065735895, 0.3290679020733861, 0.070801441576325203, 
-0.27609371011994766, 0.12112488694360368]], [[0.10803902065171155, 0.30244705825190527, 0.024841902478506196, 
-0.028276086660843098, -0.199837232352572], [0.33525241050750293, -0.030534115235610542, 0.21947627004286704, 
-0.12824227746969438, 0.22421720481082091], [0.28123148342834819, -0.19242537058341205, -0.28792926674743269, 
--0.09510160105988083, 0.32595297862387435], [-0.32326772148765553, -0.22445110650530029, -0.048292348794421701, 
--0.18831839369661746, -0.082617036570641594]], [[0.01814849194093603, 0.050805329094378057, 0.0041729651399014809, 
-0.0047498424901483973, -0.033568838175063176], [0.056316001696174268, -0.005129148162713479, 0.036867821404456345, 
-0.021542253207282844, 0.037664207894353235], [0.047241517738211787, -0.032323786963255469, -0.048366617409194554, 
--0.015975252552217743, 0.0547538747574325], [-0.054302802846542902, -0.037703498911539651, -0.0081121922210847953, 
--0.031633893288896049, -0.013878084171272551]], [[0.019132736349118284, 0.053560646794038221, 0.0043992769248064958, 
-0.0050074399768095358, -0.035389371879489359], [0.05937017886643358, -0.0054073164763297713, 0.038867268365520298, 
-0.022710550954992061, 0.039706845163018721], [0.049803559797640319, -0.034076797994331692, -0.050989676828270179, 
--0.016841635998566435, 0.057723333334580539], [-0.057247798509228072, -0.039748267043975168, -0.0085521395102417866, 
--0.033349489421068357, -0.014630732203203361]], [[0.12945008960625967, 0.36238572467325059, 0.029765046762126927, 
-0.033879814254892691, -0.23944078240122002], [0.4016924100118941, -0.036585336755688425, 0.26297186564738351, 
-0.15365720838288405, 0.26865235429701234], [0.3369656676846623, -0.23056004501227215, -0.34499081124472725, 
--0.11394874467242132, 0.39055002568295988], [-0.38733260687628662, -0.26893261040380378, -0.057862879920835344, 
--0.22563915140550492, -0.098990001228817709]]], [[[-0.11887088549302922, -0.33277004375174535, -0.027332522334417589, 
--0.0311110137742516, 0.21987267767638857], [-0.36886442194964564, 0.03359542963189309, -0.24148070213268358, 
--0.14109969702158554, -0.24669695743129583], [-0.30942742040781651, 0.21171771138423517, 0.31679671558633038, 
-0.10463637546508758, -0.3586326399886387], [0.35567816213764247, 0.24695430983391262, 0.053134082751796846, 
-0.20719897383656244, 0.090900123258443891]], [[-0.29658647797364546, -0.83027138934919176, -0.068195475281256232, 
--0.077622926448511598, 0.54858902416856947], [-0.92032796173833031, 0.083821619643936432, -0.60250170297869532, 
--0.35204803942706875, -0.61551641874202234], [-0.772030833509745, 0.52824213501609141, 0.79041744931628544, 
-0.26107094212685206, -0.89479935426962187], [0.88742784209114567, 0.6161585208208753, 0.13257115397394573, 0.5169677472751999, 
-0.22679857471216608]], [[-0.034792734058120535, -0.097399624699881296, -0.0080000512890500627, -0.0091059911267299884, 
-0.0643553008738212], [-0.10796421414013084, 0.0098331634689412944, -0.07067982891372819, -0.041298962431312022, 
--0.072206592869688793], [-0.090567390861833394, 0.061968395347888443, 0.09272433556934849, 0.03062638567267954, 
--0.10496943819282063], [0.10410468176635027, 0.072281918241972568, 0.015551999995102638, 0.060645790295166424, 
-0.026605874106716224]], [[-0.034690281599165727, -0.097112816798119131, -0.0079764939300635985, -0.0090791771609003494, 
-0.064165796973084763], [-0.10764629720956417, 0.0098042082343507975, -0.070471701485207622, -0.041177351400505935, 
--0.071993969654166545], [-0.090300701504238898, 0.061785920050883347, 0.092451294762375361, 0.030536201655642452, 
--0.10466033983222632], [0.10379812981162738, 0.072069073219517887, 0.015506204782846488, 0.060467209608445503, 
-0.026527529093061313]], [[0.25113752289245761, 0.70304048071997249, 0.057745190716787707, 0.065727977894106379, 
--0.46452316220541723], [0.77929677083985871, -0.070976782441452099, 0.5101742542625366, 0.29810014659102763, 
-0.52119459308675564], [0.6537247161398414, -0.44729423331009915, -0.66929376426225851, -0.22106439293150729, 
-0.75768017089778372], [-0.75143827031916521, -0.52173829934952587, -0.1122559310305771, -0.43774753438868647, 
--0.19204392809106624]]], [[[-0.3016086216803851, -0.84433050040979962, -0.069350239582554929, -0.078937327206852134, 
-0.55787836511943856], [-0.93591201436527227, 0.085240983812052432, -0.61270395547714962, -0.3580093221455472, 
--0.62593905139169714], [-0.78510374842619801, 0.53718693901434222, 0.80380170758018954, 0.26549169589139648, 
--0.90995112712367354], [0.9024547920141277, 0.62659202628220501, 0.13481600138295211, 0.5257216403599555, 
-0.23063898929367455]], [[0.096004201392869387, 0.26875649294065335, 0.022074681852373382, 0.025126321045995187, 
--0.1775767105703214], [0.29790754989870738, -0.02713282044533414, 0.19502809173064634, 0.11395695147006808, 
-0.19924091829559995], [0.24990419026574937, -0.17099048028342859, -0.2558558856325937, -0.084507923210172864, 
-0.2896440120953313], [-0.28725787451890639, -0.19944876491663996, -0.042912906387224892, -0.16734099296137331, 
--0.073414055121613878]], [[0.12280348442621132, 0.34377905671253306, 0.02823676265977303, 0.032140257723023313, 
--0.22714671331665276], [0.38106754322893543, -0.034706865373136261, 0.24946959485147086, 0.14576769049768312, 
-0.25485841923575486], [0.31966419065097607, -0.21872195672549011, -0.32727728381448118, -0.10809805488994705, 
-0.37049726379095999], [-0.36744504311255272, -0.25512428561368011, -0.054891914674043092, -0.21405372603333878, 
--0.093907367010937354]], [[-0.28396914965619241, -0.79495013403242876, -0.065294315702885894, -0.074320705947247184, 
-0.5252510490977671], [-0.88117553600293741, 0.080255695457594409, -0.57687018447439498, -0.33707127539077408, 
--0.58933123055302783], [-0.73918723738849845, 0.50576975362450738, 0.75679165311004848, 0.24996450931350586, 
--0.85673296193710291], [0.84967504729681309, 0.58994601644134648, 0.12693133591298367, 0.49497499884826424, 
-0.21715015075627661]], [[-0.12556914499991692, -0.35152131408949577, -0.028872683550634565, -0.032864089331129782, 
-0.23226229055293343], [-0.38964957561304403, 0.035488499621121036, -0.25508790630283351, -0.14905052857359943, 
--0.26059809254592697], [-0.32686335648116172, 0.22364779979212476, 0.33464790432044117, 0.11053253408978626, 
--0.37884124262771812], [0.37572028280536912, 0.26086994650769596, 0.056128136959905282, 0.21887443575107401, 
-0.096022257347609413]]], [[[0.037364414157828554, 0.10459884842691844, 0.0085913693689205848, 0.0097790539601828163, 
--0.069112076995279825], [0.11594431195368531, -0.010559974726947335, 0.075904078010236853, 0.044351545756490682, 
-0.077543691634060205], [0.097261614902197202, -0.066548745051386637, -0.099577988637946202, -0.032890113105793699, 
-0.1127281792801714], [-0.11179950499977977, -0.077624584627462273, -0.016701514972317543, -0.065128380590387683, 
--0.028572428297636714]], [[-0.071051212895153079, -0.19890249093097878, -0.016337127929093392, -0.018595598525999169, 
-0.13142175534924042], [-0.22047673376613944, 0.020080577453254922, -0.14433725050619306, -0.084337763371924834, 
--0.1474550977755221], [-0.18495019559926684, 0.12654738898296505, 0.18935495256262369, 0.062542996621179237, 
--0.214361018253522], [0.21259507502937181, 0.1476089218197493, 0.031759173071929249, 0.1238464603057252, 
-0.054332597784931061]], [[-0.092468492151282541, -0.25885854262139452, -0.021261700175549361, -0.02420095148674169, 
-0.17103679244648071], [-0.28693600425764765, 0.02613355413607853, -0.18784546205093827, -0.10976006591078974, 
--0.19190313572046855], [-0.24070054561046958, 0.16469312441160111, 0.2464330478169485, 0.081395606866237188, 
--0.27897680174955763], [0.27667854250093776, 0.19210332762215063, 0.041332480140296786, 0.16117804293704455, 
-0.070710311437588644]], [[0.03950402758755496, 0.11058853422482251, 0.0090833403979279047, 0.010339035848159039, 
--0.073069669571755536], [0.12258367757865166, -0.011164674793912362, 0.080250603664183892, 0.046891266104543569, 
-0.081984107140375212], [0.10283114575480438, -0.070359552522953867, -0.10528016292856741, -0.034773512840341185, 
-0.11918337821029902], [-0.11820152488222384, -0.082069632341693691, -0.017657900520893319, -0.068857853162308885, 
--0.030208582715776026]], [[-0.30131762773962623, -0.84351588490495, -0.06928333002474367, -0.078861167965153675, 
-0.55734012047966086], [-0.93500904042591215, 0.085158742761861514, -0.61211281475468116, -0.35766391244572121, 
--0.62533514136344748], [-0.78434627527312217, 0.53666865759573723, 0.80302619451569457, 0.26523554779325603, 
--0.90907320041552964], [0.90158409781837889, 0.62598748625957545, 0.13468593003651244, 0.52521442073533664, 
-0.23041646731133436]]]])
+   def test_generalTensorProduct_array_rank4_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[[[5.0, -3.0, 1.0], [1.0, -2.0, 1.0]], [[-7.0, 5.0, 1.0], [3.0, 2.0, -2.0]], [[-6.0, 2.0, -4.0], [-6.0, 
+1.0, -5.0]], [[5.0, -1.0, 0.0], [-3.0, 1.0, 2.0]], [[-1.0, 4.0, 0.0], [0.0, 4.0, -4.0]]], [[[3.0, 4.0, 3.0], [-5.0, -2.0, 
+5.0]], [[3.0, -2.0, -5.0], [0.0, -4.0, 0.0]], [[5.0, 5.0, -7.0], [-6.0, 2.0, -2.0]], [[3.0, -3.0, 0.0], [-2.0, 3.0, -6.0]], 
+[[-3.0, 1.0, 2.0], [6.0, 5.0, -3.0]]], [[[4.0, 0.0, 0.0], [-1.0, 2.0, -1.0]], [[-4.0, 1.0, 1.0], [6.0, 4.0, -4.0]], [[-1.0, 
+-2.0, -4.0], [-6.0, 3.0, -7.0]], [[0.0, -3.0, 0.0], [6.0, -1.0, -3.0]], [[-6.0, 0.0, 3.0], [1.0, 7.0, -7.0]]], [[[0.0, 0.0, 
+-4.0], [-4.0, 1.0, -6.0]], [[-1.0, 2.0, 3.0], [-1.0, 5.0, -5.0]], [[5.0, 3.0, 3.0], [4.0, -2.0, 1.0]], [[1.0, -4.0, 0.0], [5.0, 
+3.0, 5.0]], [[5.0, 6.0, -3.0], [1.0, 5.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-1.0, 1.0, 1.0], [6.0, -7.0, -7.0]])+(1.-msk_arg1)*numpy.array([[3.0, 6.0, -7.0], [7.0, 6.0, 
+4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[6.0, 31.0, -4.0, -45.0, 5.0], [-47.0, 18.0, -43.0, 3.0, 28.0], [-17.0, 42.0, -13.0, 61.0, 
+15.0], [7.0, 0.0, 32.0, -31.0, -66.0]])+(1.-msk_ref)*numpy.array([[-11.0, 27.0, -34.0, 2.0, 29.0], [-15.0, 8.0, 56.0, -29.0, 
+43.0], [13.0, 37.0, -39.0, 6.0, -18.0], [-18.0, -9.0, 32.0, 52.0, 129.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.464030061953)+(1.-msk_arg0)*(-0.96738565521)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.67402898847849047, 0.20486008013328139, 0.86910684630548163, 0.11617789766533293, 
--0.67091974768759255], [0.63735266421821568, 0.52482421330068418, 0.96549957417820953, 0.93314176044328634, 
--0.66620391933821188], [-0.56446554507968827, 0.97270940295746322, 0.4273768968805165, 0.0795646430337138, 
--0.56522717749374385], [0.64133192382437154, -0.69241677052592632, 0.75734947668207875, -0.69971855592277477, 
--0.31147593247856209]])+(1.-msk_arg1)*numpy.array([[0.95121411016144797, 0.1130560179342579, 0.52012252957284932, 
--0.68225588101818579, 0.17730561916900478], [0.59947361921565534, 0.7649078291107767, 0.45338418670272795, 
--0.85303367434739097, -0.50029340792348398], [0.35754933425934743, 0.33821264868230383, -0.74573645227047036, 
--0.75507994872497042, -0.53190481570081594], [-0.93781246725424849, -0.38341219731292941, 0.42257095557524416, 
--0.18386027017029849, -0.38407080653131875]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.31276971328169517, 0.095061235675913722, 0.4032917037347844, 0.053910037051197068, 
--0.31132693208486845], [0.29575079626299683, 0.2435342122122757, 0.44802082722137121, 0.43300582890929579, 
--0.30913864596374629], [-0.26192898185358071, 0.4513664045164778, 0.19831572793668567, 0.036920386236191136, 
--0.26228240218986021], [0.29759729234456783, -0.32130219692434248, 0.35143292458474851, -0.32469044485440851, 
--0.14453419624485092]])+(1.-msk_ref)*numpy.array([[-0.92019088520370329, -0.10936876998478624, -0.5031590740604085, 
-0.66000455247977807, -0.17152291257225483], [-0.57992217990615635, -0.73996086143972717, -0.43859735851535431, 
-0.82521253997490041, 0.48397666622139479], [-0.34588809699244344, -0.32718206474590183, 0.72141474649378612, 
-0.73045351093337663, 0.51455708864618532], [0.90722632809902926, 0.37090745971314409, -0.40878908073195058, 
-0.17786378792581542, 0.37154458882340313]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.38164549218084232, -0.84943064650584477])+(1.-msk_arg0)*numpy.array([-0.063913606660673583, 
--0.89479132834762409])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.22046330966882177, 0.83542118723512249, 0.49831593535934582, 0.6272392679616996, 
--0.31521766907302196], [0.40162162896491904, 0.06623229899035965, 0.95859730892263073, 0.25588908389287979, 
--0.8272136207389138], [0.81517961958285157, 0.77730439461900702, -0.079977269227189174, 0.80967752989262998, 
--0.21695203317986378], [-0.28088513635915779, -0.40055183374451619, 0.96377618778594387, 0.97555828700940062, 
--0.27852718947653399]])+(1.-msk_arg1)*numpy.array([[0.18744921804733261, 0.84141914602805357, -0.67806681231531796, 
--0.27641832837831171, -0.7576319052308631], [0.35459885597183805, 0.60938573262227713, 0.59102751490644856, 
-0.58222541360655056, 0.7558014619438469], [0.06759826978510608, -0.45978302887178413, 0.20446940512042167, 0.11211057267987212, 
--0.37033917552328299], [0.53135465885908939, 0.33701500564107301, 0.54425303922014434, -0.18130551567932396, 
--0.078814758820267894]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.08413882832637494, 0.31883473018065195, 0.19018003041177434, 0.23938303913639408, 
--0.12030140245747134], [0.15327708425678815, 0.025277258346444516, 0.36584434176700836, 0.097658915366002963, 
--0.31570234942559938], [0.31110962713148921, 0.2966547182587026, -0.030522964277490346, 0.30900977940364144, 
--0.082798765482563541], [-0.10719854611207379, -0.15286880173336481, 0.36782083753974248, 0.37231742259680212, 
--0.10629864631351854]], [[-0.18726829166280554, -0.70963235917781053, -0.42328482713645388, -0.53279625689855925, 
-0.26775554843076249], [-0.34114971994240167, -0.056259744550949606, -0.8142619318569132, -0.21736002996491724, 
-0.7026606006626962], [-0.69243855128065024, -0.66026617445305746, 0.067935143505423304, -0.68776490767795218, 
-0.18428570580472917], [0.23859244297144178, 0.34024100309670602, -0.81866103027795278, -0.82866910643852965, 
-0.2365895306265082]]])+(1.-msk_ref)*numpy.array([[[-0.011980555591128053, -0.053778132335996882, 0.043337695531978013, 
-0.017666892313772321, 0.048422987584502107], [-0.022663691802908902, -0.038948040019446621, -0.037774700113366144, 
--0.037212126073097061, -0.048305997352241087], [-0.0043204492259873656, 0.029386391656564335, -0.013068377133008548, 
--0.0071653910447642046, 0.023669712395433262], [-0.033960792663636233, -0.021539844509288229, -0.034785174672592456, 
-0.011587889414538899, 0.0050373354942944565]], [[-0.16772793481429618, -0.75289455537156558, 0.60672830370006248, 
-0.24733672322925929, 0.67792245888006519], [-0.31729198136558878, -0.54527306916917739, -0.5288462951531363, 
--0.52097025123875018, -0.67628459409981101], [-0.060486345615016132, 0.41140986715587774, -0.18295745061415059, 
--0.10031556825003562, 0.3313762828056423], [-0.47545154102422327, -0.30155810457065774, -0.48699289992102451, 
-0.16223060321145327, 0.070522762738185127]]])
+   def test_generalTensorProduct_array_rank2_expandedData_rank1_offset0(self):
+      arg0=numpy.array([[7.0, -2.0, 0.0, -1.0, 5.0], [-4.0, 7.0, 1.0, -2.0, -1.0], [-1.0, 2.0, -7.0, -5.0, 6.0], [0.0, -7.0, 
+-5.0, 3.0, -5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-5.0, -5.0])+(1.-msk_arg1)*numpy.array([0.0, -7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-35.0, -35.0], [10.0, 10.0], [0.0, 0.0], [5.0, 5.0], [-25.0, -25.0]], [[20.0, 20.0], [-35.0, 
+-35.0], [-5.0, -5.0], [10.0, 10.0], [5.0, 5.0]], [[5.0, 5.0], [-10.0, -10.0], [35.0, 35.0], [25.0, 25.0], [-30.0, -30.0]], 
+[[0.0, 0.0], [35.0, 35.0], [25.0, 25.0], [-15.0, -15.0], [25.0, 25.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -49.0], [0.0, 14.0], 
+[0.0, 0.0], [0.0, 7.0], [0.0, -35.0]], [[0.0, 28.0], [0.0, -49.0], [0.0, -7.0], [0.0, 14.0], [0.0, 7.0]], [[0.0, 7.0], [0.0, 
+-14.0], [0.0, 49.0], [0.0, 35.0], [0.0, -42.0]], [[0.0, 0.0], [0.0, 49.0], [0.0, 35.0], [0.0, -21.0], [0.0, 35.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.7404773332238368, 0.54735446305705127, -0.60976156515517843, -0.91988988534917771, 
-0.94982879508028195], [-0.47925259590889246, 0.018461915276561269, 0.074865997893243552, -0.91906868677879183, 
--0.66380093527647133], [0.32921485725414845, 0.2327164935228383, -0.99951906447055583, -0.29839110112065903, 
--0.97521805679670415], [0.42585346098043475, 0.84140569875823989, -0.25614418347587686, 0.93757162920473247, 
--0.24299196943566526]])+(1.-msk_arg0)*numpy.array([[0.74735966835600798, 0.55356556314205907, -0.79664761259132577, 
--0.083573228323402304, -0.09886577387565576], [-0.11423197215038416, 0.50110483461189959, -0.32401081610725013, 
--0.95250271200920489, -0.08323616314293858], [0.47358512315705692, -0.86022323801341516, -0.11039972820750443, 
--0.083964682778386868, -0.78651382635546296], [-0.020880118242885715, 0.52612289356883424, -0.90535873207328499, 
--0.43573562176556124, 0.029851727443945597]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.94170691718388344, 0.88462212402533158, -0.10385925507555438, -0.97727211719508178, 
-0.67739494200640826], [0.27883639324142595, -0.36261004110559969, 0.90290987220864816, -0.69147390917696439, 
--0.98681627347326661], [0.064480872009119894, 0.44687978524198879, -0.86518312423678867, -0.41416292585597159, 
-0.16212940218186911], [0.78165062167133437, 0.89987109000799292, -0.91765215528596289, 0.6706855143282453, 
--0.49690520527620263]])+(1.-msk_arg1)*numpy.array([[-0.55087645570753607, 0.069507565325803045, -0.60607347319922145, 
-0.50137395826357256, 0.765268821355368], [-0.43076688393051321, 0.5987114326134837, -0.58866918847603333, -0.4089799468708637, 
--0.46204382982823478], [0.44673372515774679, -0.8896304761646654, 0.50531756290906094, 0.55178853719531307, 
--0.42163121911561885], [0.25546186385324576, -0.33184726578369128, -0.22570142190403009, 0.8324772605226114, 
--0.93173636328846476]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.69731262671476257, -0.65504263130908369, 0.076905424228960739, 0.72364785117462704, 
--0.50159560019622074], [-0.20647202887316415, 0.26850451623806032, -0.66858429431453503, 0.51202075626122012, 
-0.73071508256336892], [-0.04774662414926064, -0.33090435164762877, 0.6406484925851248, 0.30667825885801148, 
--0.12005314736480535], [-0.57879456784794381, -0.66633414497434584, 0.67950062077325601, -0.49662742108163649, 
-0.36794704126796574]], [[-0.51544748401229556, 0.48420186770427359, -0.056847826795385394, -0.53491425496794165, 
-0.37077514475947998], [0.1526223443034255, -0.1984762243484508, 0.49421174829167541, -0.37848133027551756, 
--0.54013829150292014], [0.035293893076002267, 0.24460164490217914, -0.47356184441264954, -0.22669392590003265, 
-0.088742251877017689], [0.42783995632312355, 0.4925484572918884, -0.502281002729694, 0.36710270957527896, 
--0.27198328182420972]], [[0.57421668373950274, -0.53940857091658456, 0.063329381930720949, 0.59590297576338802, 
--0.4130494000660288], [-0.1700237155651167, 0.22110566620553404, -0.55055973687200743, 0.42163421312371552, 
-0.60172263543365967], [-0.039317957438851685, -0.2724901172853651, 0.5275554159804714, 0.25254063389918535, 
--0.09886027803208991], [-0.47662050647483106, -0.54870680428117025, 0.55954901447519156, -0.4089582489436967, 
-0.30299369570297252]], [[0.8662666680808101, -0.81375494424700834, 0.095539078243902717, 0.89898273584153199, 
--0.62312875553838776], [-0.25649877781003355, 0.33356130913909071, -0.83057765882665402, 0.63607985503474551, 
-0.90776230866602603], [-0.059315301959684298, -0.4110801944111182, 0.79587320496022285, 0.3809842863815297, 
--0.14914119718481031], [-0.71903250075235725, -0.82778231381649214, 0.84413893591643019, -0.61695682088076387, 
-0.45709807231093563]], [[-0.89446034646753492, 0.84023956616434048, -0.098648511106349479, -0.92824119754096057, 
-0.64340922155942426], [0.2648468354170353, -0.34441745842734328, 0.8576097959860316, -0.65678182998300838, 
--0.93730651199872683], [0.061245788966148226, 0.42445928796213339, -0.82177584441762286, -0.39338387283270165, 
-0.15399517472149118], [0.7424342681558368, 0.85472347314987185, -0.87161244095808987, 0.63703641395219646, 
--0.47197487239661573]]], [[[0.45131548464573656, -0.4239574493375784, 0.04977481760412325, 0.46836019907512233, 
--0.32464328441212481], [-0.13363306529482616, 0.17378180350248884, -0.43272190012776102, 0.33139066597632993, 
-0.47293426074720257], [-0.03090262529683975, -0.21416829713643151, 0.41464125822704678, 0.19848865734569654, 
--0.077700936868817627], [-0.37460808952978658, -0.43126555586969523, 0.43978717756218783, -0.32142777378030224, 
-0.23814310954926121]], [[-0.017385713320400557, 0.016331818705527346, -0.0019174407678916509, -0.018042315029801255, 
-0.012506008028093443], [0.0051478538680451271, -0.0066944758573219808, 0.016669445563086825, -0.012765932727177739, 
--0.018218518434395363], [0.0011904403959911625, 0.0082502567339454921, -0.015972937538370174, -0.0076462408478456742, 
-0.0029932192869211952], [0.014430767553167622, 0.016613343823554404, -0.016941616344243293, 0.012382139142744985, 
--0.0091738218002915383]], [[-0.070501828077941503, 0.066228118073597117, -0.0077755267716802991, -0.073164452267052663, 
-0.0507138483011456], [0.020875364828972225, -0.027147162573480783, 0.06759724859056146, -0.051767884227675497, 
--0.073878985050868026], [0.0048274248279892773, 0.033456101060459861, -0.064772797956381301, -0.031006720734592753, 
-0.01213797948218065], [0.058519053795298634, 0.067369747128729174, -0.068700944324369309, 0.050211540302727384, 
--0.037201304051349943]], [[0.86549333970669629, -0.81302849382342701, 0.095453789172113335, 0.8981802013760134, 
--0.62257247978042551], [-0.25626979776253211, 0.33326353429172723, -0.82983619053040902, 0.63551201764907028, 
-0.9069519365530162], [-0.059262350359773175, -0.41071321737034316, 0.79516271781547765, 0.38064417637890996, 
--0.14900805675152104], [-0.71839061037929952, -0.82704334096384602, 0.84338536127839792, -0.61640605489521894, 
-0.45669001446674551]], [[0.6251059323829844, -0.58721299329427368, 0.068941870656270596, 0.64871414541371253, 
--0.44965539605540483], [-0.1850918586227765, 0.24070088442653678, -0.59935241764245983, 0.45900102763094675, 
-0.6550495652775965], [-0.042802463147096223, -0.29663921939978083, 0.57430936705379976, 0.27492173754003379, 
--0.10762164880413988], [-0.51886041372486702, -0.5973352711755634, 0.60913835893729185, -0.44520167168747043, 
-0.3298461400060903]]], [[[-0.3100239083159364, 0.29123074628486112, -0.034192009834220827, -0.3217325005608383, 
-0.22300847913732186], [0.091797083398237653, -0.11937661292150091, 0.29725134469253151, -0.22764348430466233, 
--0.32487457860757218], [0.021228061074105423, 0.14711946470820586, -0.2848311387443126, -0.13634858851563417, 
-0.053375407996004466], [0.25733099783614471, 0.29625093244411638, -0.30210472331142996, 0.22079963586199841, 
--0.1635885762238484]], [[-0.21915073169323523, 0.20586615879590053, -0.024169761661077063, -0.22742734033127973, 
-0.15764097563383772], [0.06488982770169989, -0.084385337282267422, 0.21012201942755063, -0.1609173835061927, 
--0.22964842291397289], [0.015005762433257314, 0.10399629664775466, -0.20134238292751963, -0.096382543852360975, 
-0.037730185972718586], [0.18190299183529962, 0.20941484468923452, -0.21355279185182438, 0.15607958115103057, 
--0.11563803698512404]], [[0.94125401686908639, -0.88419667781575539, 0.10380930546972694, 0.97680211231198755, 
--0.67706915871133155], [-0.27870229091301407, 0.36243564905349879, -0.90247563077121717, 0.69114135480635752, 
-0.98634167846631959], [-0.06444986086680117, -0.44666486487587553, 0.86476702693286767, 0.41396374018994891, 
--0.1620514283919923], [-0.78127469811576045, -0.89943831002888841, 0.91721082376081486, -0.67036295783532129, 
-0.49666622590821957]], [[0.28099696395144025, -0.26396336966361489, 0.030990677483566067, 0.29160930314435818, 
--0.20212862263885711], [-0.083202298411822181, 0.10819960944290732, -0.26942027098105203, 0.20632966115552098, 
-0.29445719444547341], [-0.019240518400021566, -0.13334495118692066, 0.25816294511202731, 0.12358253148951723, 
--0.048377970841082099], [-0.23323758969215713, -0.2685135254141327, 0.27381923706152445, -0.20012658912608067, 
-0.1482720913549532]], [[0.91836958984808159, -0.86269946879135684, 0.10128542091513537, 0.95305341509258856, 
--0.66060777902740553], [-0.27192628558110504, 0.35362385966197596, -0.88053401103787832, 0.67433784203317992, 
-0.96236104863196403], [-0.062882910701290901, -0.4358052357854208, 0.84374220519150256, 0.40389916375049806, 
--0.15811152054541372], [-0.76227980036025444, -0.87757053576512689, 0.89491095169328416, -0.65406462400488941, 
-0.48459092870162573]]], [[[-0.40102914991197242, 0.37671939317605085, -0.044228823228774618, -0.41617471342720264, 
-0.28847098050406983], [0.11874344310916275, -0.15441874099107733, 0.38450729403345485, -0.29446655740068106, 
--0.42023912541040576], [0.027459402512120146, 0.19030530318749433, -0.3684412278381019, -0.17637271538554869, 
-0.069043367045837814], [0.33286862251624616, 0.38321321811614012, -0.39078534630468265, 0.28561374750612623, 
--0.21160880144606428]], [[-0.79235756667857338, 0.74432609640253244, -0.087387769089357109, -0.82228232864547235, 
-0.56996396451419928], [0.23461453029452936, -0.3051021550132112, 0.75971351194143066, -0.58181008772413545, 
--0.83031283612777629], [0.054254573169374154, 0.37600719796246779, -0.72797001120229221, -0.34847904602960089, 
-0.13641660293209129], [0.65768528751218169, 0.75715666328051423, -0.77211775293539042, 0.56431861383038673, 
--0.4180988714620299]], [[0.24121274937565101, -0.22659081164316444, 0.026602944087740697, 0.25032256849267565, 
--0.17351077431092041], [-0.071422320270183554, 0.092880452899147981, -0.23127511196919251, 0.17711701986100617, 
-0.25276724860951749], [-0.016516400310588538, -0.11446565770268442, 0.22161162491474037, 0.10608542446935797, 
--0.04152850333930691], [-0.20021526025141548, -0.23049674558364464, 0.23505126203060153, -0.1717921934367069, 
-0.12727937807038589]], [[-0.88291768857745967, 0.82939660605298104, -0.097375490989177402, -0.91626261109495111, 
-0.63510627939199349], [0.26142909149293519, -0.33997288700537209, 0.84654267991169907, -0.64830631957961171, 
--0.92521094124607339], [0.060455436222132369, 0.41898180830799242, -0.81117115135112638, -0.38830740915098211, 
-0.15200792774564434], [0.73285344682928488, 0.84369360393303239, -0.86036462627469434, 0.62881571035274686, 
--0.4658842228711213]], [[0.22882721843770076, -0.21495607212327664, 0.025236964934930071, 0.23746927643179519, 
--0.16460153104389538], [-0.067755004344071709, 0.088111328025397201, -0.21939984807088425, 0.16802260700428889, 
-0.23978842976243309], [-0.015668334080425103, -0.108588199116938, 0.21023255128079912, 0.10063826502097994, 
--0.039396142739599418], [-0.18993482397052963, -0.21866144839926099, 0.22298210446981903, -0.16297119399859242, 
-0.120743974452898]]]])+(1.-msk_ref)*numpy.array([[[[-0.41170284524271727, 0.05194715097012572, -0.45295486992954404, 
-0.37470667517020256, 0.57193105253134091], [-0.32193779551305934, 0.44745277771896358, -0.4399476094708486, 
--0.30565511745766644, -0.34531292342636932], [0.33387076867733767, -0.66487393762582181, 0.37765396623018199, 
-0.41238449816093592, -0.31511016808678821], [0.19092189384696942, -0.24800926250094754, -0.16868013982167537, 
-0.62215992933809694, -0.69634217946249999]], [[-0.30494623542544375, 0.038476994542211623, -0.33550140349699065, 
-0.27754335755093779, 0.42362646604864407], [-0.23845771268594454, 0.33142603135427207, -0.32586699082311432, 
--0.22639721460337905, -0.2557715528551805], [0.24729640614149795, -0.49246879552643114, 0.27972640127732717, 
-0.30545113232785648, -0.23340052324801044], [0.141414890525242, -0.18369921856070162, -0.12494053471826788, 
-0.46083074352415798, -0.51577716464371315]], [[0.43885441327217983, -0.05537303597383661, 0.48282698547909264, 
--0.39941836686613807, -0.60964957952333165], [0.34316940966664811, -0.47696203342266419, 0.46896190360550516, 
-0.32581289827240084, 0.36808611394521601], [-0.35588935561094848, 0.70872199492506505, -0.40256003009197044, 
--0.43958102081190609, 0.33589150410242791], [-0.20351308394681855, 0.26436533203153678, 0.17980449891831313, 
--0.66319102213190551, 0.7422655493782796]], [[0.046038523810832531, -0.0058089716271771388, 0.050651516756435984, 
--0.041901440289369526, -0.063955985935913146], [0.036000579144885317, -0.050036247257637965, 0.049196984495459478, 
-0.034179774479531633, 0.038614494485654308], [-0.037334979612372421, 0.074349290907966686, -0.042231020060824159, 
--0.046114749405260065, 0.035237082143424081], [-0.021349772675729222, 0.027733547311837199, 0.018862596465702059, 
--0.06957281216769666, 0.077868215826323389]], [[0.054462827103403957, -0.0068719192361482145, 0.05991992295334754, 
--0.049568724384828837, -0.075658894246209418], [0.042588101339794973, -0.059192069113534591, 0.058199234875437295, 
-0.040434118947012515, 0.045680320800440231], [-0.044166675454075141, 0.087954005489387768, -0.049958611909964673, 
--0.05455300074553069, 0.041684896768001842], [-0.025256434865568552, 0.032808336740225062, 0.022314145741377817, 
--0.082303508595453864, 0.092116836604603208]]], [[[0.062927703946685593, -0.0079399862665381418, 0.06923296811158007, 
--0.057272936037292291, -0.087418166688623705], [0.049207350688458155, -0.068391987696420076, 0.067244842343783487, 
-0.0467185859010181, 0.052780177901195754], [-0.051031274450857103, 0.10162424377737506, -0.05772342177332785, 
--0.063031892813796217, 0.048163765679747894], [-0.029181912517169201, 0.037907567623183758, 0.025782318541243271, 
--0.095095519239847048, 0.10643408230266813]], [[-0.27604685522891431, 0.03483057702686234, -0.30370634755015541, 
-0.25124091443438096, 0.38347990615892502], [-0.21585936812828316, 0.30001719342003319, -0.29498497633240384, 
--0.20494182863630764, -0.23153239692952626], [0.22386042946073051, -0.44579813262420015, 0.25321707378803315, 
-0.27650390367199934, -0.21128144232214577], [0.12801317503582832, -0.1662902692369477, -0.11310007369488957, 
-0.41715837995235044, -0.46689759622755894]], [[0.1784899299880682, -0.022521202966841444, 0.19637436067223532, 
--0.16245058539190252, -0.2479553753487862], [0.13957312961430268, -0.19398897989383573, 0.19073518417531221, 
-0.13251392635712836, 0.14970719837996574], [-0.14474655887099352, 0.28824989661599476, -0.16372835595149154, 
--0.17878545425527914, 0.13661307540194648], [-0.082772406991369382, 0.10752210340953336, 0.073129701907691566, 
--0.26973163657265919, 0.30189265946589677]], [[0.52471131804344673, -0.066206144477984369, 0.5772866268990966, 
--0.47756005497684278, -0.72892062775707578], [0.41030662518756822, -0.57027426327525954, 0.56070899849967948, 
-0.38955450855187818, 0.4400980009785132], [-0.42551508475872857, 0.84737544123288411, -0.48131634909676252, 
--0.52558007813412777, 0.40160487967537428], [-0.24332811813514285, 0.31608542063180539, 0.21498121646792243, 
--0.79293684833378075, 0.88748141290985649]], [[0.045852842538876254, -0.0057855430471270026, 0.050447230491817811, 
--0.041732444585647607, -0.063698040462539726], [0.035855382627415486, -0.049834442480558405, 0.048998564609212369, 
-0.034041921579933562, 0.038458755598771099], [-0.037184401228682898, 0.074049427450972219, -0.042060695105290723, 
--0.045928760702392511, 0.035094964940463734], [-0.021263665376487929, 0.027621693153309427, 0.018786520375197058, 
--0.069292213069646669, 0.077554159940886935]]], [[[-0.26088689412057647, 0.032917748885167616, -0.28702738044727855, 
-0.23744324777199513, 0.36241992900983777], [-0.20400478777821374, 0.28354082754979465, -0.27878497012318698, 
--0.19368681850760458, -0.2188170840531628], [0.21156644624724233, -0.42131575861871423, 0.23931088026371147, 
-0.26131884234429464, -0.1996782728317304], [0.12098293825487071, -0.15715792823550204, -0.10688883568914295, 
-0.39424884595005028, -0.4412564803578759]], [[0.47387672847409035, -0.059792022910991276, 0.52135848558947107, 
--0.43129352983309327, -0.65830202345702438], [0.37055568372365505, -0.51502548719842156, 0.50638691542958281, 
-0.35181405417980888, 0.39746083939896348], [-0.384290731584992, 0.76528080884178484, -0.43468591019068004, 
--0.47466132216483797, 0.36269697255518141], [-0.2197542317127813, 0.28546272949834528, 0.1941536079745167, 
--0.71611628461929822, 0.80150127140284688]], [[0.060816610986025338, -0.0076736163203340157, 0.066910346714972271, 
--0.055351548722619083, -0.084485469883309891], [0.047556546906722265, -0.066097579435254211, 0.064988918411886282, 
-0.045151274976862957, 0.051009513232991549], [-0.049319281838541229, 0.098214962773691808, -0.05578692160363885, 
--0.060917304534379012, 0.046547971994163072], [-0.028202920336780832, 0.036635847948923002, 0.024917375634252208, 
--0.091905263300624152, 0.10286344126809512]], [[0.04625416685356535, -0.0058361806732790547, 0.050888766917567781, 
--0.042097705358945046, -0.064255553825293479], [0.03616920476065974, -0.050270615515184705, 0.049427421671800573, 
-0.034339871501733586, 0.038795363601238697], [-0.037509855519277276, 0.074697540721151395, -0.04242882887200685, 
--0.046330749486354586, 0.035402131562507461], [-0.021449774360413235, 0.027863450402402672, 0.018950948292802743, 
--0.06989868910000159, 0.07823294817660377]], [[0.43327194902766991, -0.054668661165049655, 0.47668516645846482, 
--0.39433755034886664, -0.60189450887474572], [0.33880411014740752, -0.47089481974759201, 0.4629964558858502, 
-0.32166838291605698, 0.3634038605421373], [-0.35136225153584916, 0.69970666985070351, -0.39743924992822288, 
--0.43398931372856936, 0.33161878345754398], [-0.20092428802711465, 0.26100246277712935, 0.17751728895560739, 
--0.65475487552755274, 0.73282353224453411]]], [[[0.011502365532395148, -0.0014513261827778707, 0.012654885784276169, 
--0.010468747532447042, -0.01597890347749387], [0.0089944634715885419, -0.012501165506337042, 0.012291482261323153, 
-0.0085395496496327508, 0.009647529800209307], [-0.0093278530043785623, 0.018575589534792936, -0.010551090463748032, 
--0.011521409901707079, 0.0088037097100261766], [-0.0053340739238037435, 0.0069290101481417968, 0.0047126723769435842, 
--0.017382223634225702, 0.019454765436659464]], [[-0.28982871487579265, 0.036569521394136266, -0.31886912943488771, 
-0.26378431768169075, 0.40262544664949751], [-0.22663631942715176, 0.31499579133934813, -0.3097123367958281, 
--0.21517371305932689, -0.24309183670485693], [0.23503684013477805, -0.46805496032677357, 0.26585913836886654, 
-0.29030858182731245, -0.22182983702006456], [0.13440433500695725, -0.17459244369702165, -0.11874668517474857, 
-0.43798534513641257, -0.49020783149662961]], [[0.49874080946839999, -0.062929281212870072, 0.54871391123889923, 
--0.45392329114807217, -0.69284280979751323], [0.38999855985448939, -0.54204862350872363, 0.53295679008927122, 
-0.37027356614240464, 0.41831541593557531], [-0.40445427898319303, 0.80543471991419424, -0.45749366804970981, 
--0.49956657040772129, 0.38172750594103011], [-0.23128462915125272, 0.30044081979190917, 0.20434075316217024, 
--0.75369055706659316, 0.84355565249341813]], [[0.24003649494373189, -0.030286922194649155, 0.26408780168007595, 
--0.21846649344103833, -0.33345488569107951], [0.18770047600547551, -0.26087989834798625, 0.25650413485483275, 
-0.17820713143942199, 0.20132895547314705], [-0.19465779749525614, 0.38764368867320281, -0.22018486246323776, 
--0.24043392133790925, 0.18371974141711578], [-0.11131383408348319, 0.14459767468745818, 0.098346149406723815, 
--0.36273999671951118, 0.40599072357908206]], [[-0.016444613811068137, 0.002074920895398116, -0.018092340132948626, 
-0.014966878749576324, 0.022844596276449941], [-0.012859135610971429, 0.017872570503951916, -0.017572792169035189, 
--0.012208757904028374, -0.013792806475189245], [0.013335773403427559, -0.026557006500295133, 0.015084602160600121, 
-0.016471841019047924, -0.012586420234897958], [0.0076259779320694302, -0.0099062141311933253, -0.0067375773303900788, 
-0.024850884284403487, -0.027813939966500327]]]])
+   def test_generalTensorProduct_array_rank3_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[[-6.0, -2.0, -7.0], [5.0, -2.0, 3.0], [7.0, -7.0, -3.0], [5.0, -7.0, -1.0], [6.0, 0.0, 3.0]], [[-6.0, 
+-3.0, -5.0], [6.0, 5.0, 5.0], [-2.0, 5.0, -4.0], [5.0, 0.0, 1.0], [-6.0, -6.0, 6.0]], [[-7.0, 7.0, -1.0], [2.0, -3.0, -4.0], 
+[-1.0, 2.0, 7.0], [5.0, -5.0, -4.0], [-2.0, 6.0, -7.0]], [[5.0, 1.0, 6.0], [-1.0, -1.0, -5.0], [-5.0, -3.0, 5.0], [6.0, -6.0, 
+-6.0], [0.0, 0.0, -5.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 7.0], [3.0, -3.0], [-2.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 4.0], [-4.0, -6.0], 
+[-4.0, -2.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[8.0, -64.0], [-12.0, 53.0], [-15.0, 58.0], [-19.0, 52.0], [-6.0, 54.0]], [[1.0, -53.0], [5.0, 
+47.0], [23.0, -45.0], [-2.0, 39.0], [-30.0, 0.0]], [[23.0, -74.0], [-1.0, 7.0], [-8.0, 15.0], [-7.0, 34.0], [32.0, -60.0]], 
+[[-9.0, 56.0], [7.0, -24.0], [-19.0, -6.0], [-6.0, 36.0], [10.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[18.0, 2.0], [11.0, 
+26.0], [61.0, 76.0], [47.0, 64.0], [6.0, 18.0]], [[14.0, 4.0], [-22.0, -16.0], [-10.0, -30.0], [11.0, 18.0], [-18.0, 0.0]], 
+[[-45.0, -68.0], [34.0, 34.0], [-39.0, -30.0], [51.0, 58.0], [-2.0, -30.0]], [[-13.0, 2.0], [21.0, 12.0], [-23.0, -12.0], 
+[66.0, 72.0], [20.0, 10.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.993549884155)+(1.-msk_arg0)*(0.929529899002)
-      arg1=numpy.array([[[-0.96404073390044864, 0.68299636489748128], [0.36400286263553872, -0.2902214898897415]], 
-[[0.52744858859312793, -0.045387940631246293], [0.40639487510984895, 0.6685781294180575]], [[-0.20069163885522623, 
-0.19403923621031405], [0.20120512920242328, -0.87559023882949072]], [[-0.39214221655530723, -0.65080180395854148], 
-[0.5640793644347486, -0.98168633861320709]], [[-0.54996581116145982, 0.084797595420068594], [0.079502859459630315, 
-0.053027222376161642]], [[0.71554985948411787, -0.18034726142179469], [0.3513773812994283, 0.62946438984268482]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.95782255948772366, -0.6785909592223428], [-0.36165500200371536, 0.28834952765931393]], 
-[[-0.52404648409454735, 0.04509518315621968], [-0.40377358108667383, -0.66426572303203835]], [[0.19939715453553536, 
--0.19278766065832884], [-0.19990733281050782, 0.86994258035649974]], [[0.38961285383090466, 0.64660405693103029], 
-[-0.5604409871885061, 0.97535434800593401]], [[0.54641846796881122, -0.084250641106252092], [-0.078990056806126058, 
--0.052685190648909572]], [[-0.71093447999774384, 0.17918400069333898], [-0.34911095648481871, 
--0.62540427160804857]]])+(1.-msk_ref)*numpy.array([[[-0.89610468601611992, 0.63486554208176271], [0.33835154414198393, 
--0.26976955218536774]], [[0.49027923328362022, -0.042189447870862755], [0.37775618721571325, 0.62146336111278955]], 
-[[-0.18654887879560722, 0.18036527163696259], [0.18702618342617572, -0.8138873062661518]], [[-0.3645079149490027, 
--0.60493973510378218], [0.52432863465204005, -0.91250680318259625]], [[-0.51120966490336317, 0.078821900306413159], 
-[0.073900284923865675, 0.049290388659660331]], [[0.66512498861703517, -0.16763817169465478], [0.32661578175077993, 
-0.58510597071571013]]])
+   def test_generalTensorProduct_array_rank4_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[[[-4.0, 1.0, 0.0], [0.0, -5.0, 1.0]], [[6.0, -4.0, -2.0], [-2.0, 3.0, -1.0]], [[2.0, 7.0, 0.0], [5.0, 
+-2.0, 0.0]], [[7.0, 7.0, 3.0], [3.0, -1.0, -4.0]], [[-2.0, -1.0, -5.0], [0.0, 1.0, -3.0]]], [[[0.0, -5.0, -6.0], [6.0, 0.0, 
+-1.0]], [[-2.0, -5.0, -1.0], [-7.0, -3.0, -4.0]], [[7.0, -7.0, -3.0], [-5.0, -2.0, 3.0]], [[-2.0, 4.0, -5.0], [4.0, 7.0, 
+-7.0]], [[3.0, 0.0, 2.0], [7.0, -2.0, -1.0]]], [[[-3.0, -7.0, 5.0], [-4.0, -2.0, -4.0]], [[6.0, -6.0, 6.0], [0.0, 5.0, -7.0]], 
+[[0.0, 3.0, -1.0], [-5.0, -6.0, 1.0]], [[1.0, -1.0, 0.0], [5.0, 7.0, 1.0]], [[4.0, 5.0, -3.0], [-7.0, 0.0, 0.0]]], [[[1.0, 
+-6.0, -4.0], [1.0, 1.0, 1.0]], [[-3.0, -1.0, 4.0], [1.0, -6.0, 6.0]], [[6.0, 7.0, -7.0], [-6.0, 0.0, 2.0]], [[1.0, 4.0, -7.0], 
+[6.0, -6.0, 6.0]], [[-3.0, 4.0, 0.0], [-3.0, -7.0, -7.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, 7.0], [-1.0, 5.0], [6.0, 6.0]], [[6.0, 7.0], [-4.0, -2.0], [7.0, 
+3.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, -2.0], [2.0, -2.0], [4.0, 2.0]], [[-4.0, -7.0], [4.0, 4.0], [-7.0, -6.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[14.0, -10.0], [-21.0, -13.0], [37.0, 88.0], [26.0, 113.0], [-60.0, -60.0]], [[-2.0, -22.0], 
+[-65.0, -100.0], [9.0, -26.0], [-93.0, -31.0], [64.0, 83.0]], [[-16.0, -62.0], [-9.0, 17.0], [-8.0, -11.0], [13.0, 26.0], 
+[-53.0, -14.0]], [[-6.0, -39.0], [88.0, 35.0], [-53.0, -1.0], [59.0, 57.0], [-52.0, -29.0]]])+(1.-msk_ref)*numpy.array([[[-1.0, 
+-20.0], [-25.0, 24.0], [-26.0, -61.0], [-4.0, -23.0], [15.0, 18.0]], [[-51.0, -38.0], [42.0, 73.0], [-77.0, 3.0], [61.0, 28.0], 
+[-39.0, -53.0]], [[60.0, 74.0], [45.0, 74.0], [-9.0, -3.0], [-7.0, -13.0], [2.0, 25.0]], [[-41.0, -7.0], [-38.0, -51.0], 
+[-40.0, -10.0], [-116.0, -126.0], [59.0, 33.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.56879413112408872, -0.28005683913711432])+(1.-msk_arg0)*numpy.array([0.78833884726990999, 
-0.66356112587536176])
-      arg1=numpy.array([[[-0.85252097033383101, 0.58175331209550607], [-0.70869360301507678, -0.2927221987776345]], 
-[[0.36754488753156189, -0.66559884167391159], [-0.43601741806713212, -0.82616620732624724]], [[0.61801257801317044, 
-0.21090349649113005], [0.41668879754804911, 0.49086430937885894]], [[-0.097196959600152955, 0.49753981495824773], 
-[-0.29445462587602544, -0.60285511181456664]], [[0.77183435706312098, -0.44132925471347328], [-0.47567793664135172, 
-0.59066187435301054]], [[-0.97049765916666608, -0.62489178685474744], [-0.052994325480985038, 0.76185763449074395]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.48490892458609641, 0.33089786968192419], [-0.40310076216016044, -0.1664986687144574]], 
-[[0.20905737495261564, -0.37858871482711243], [-0.24800414846446295, -0.46991849006021652]], [[0.3515219273347594, 
-0.11996067103770461], [0.23701014255048389, 0.27920073835297393]], [[-0.055285060183672151, 0.2829977267488164], 
-[-0.1674840630806225, -0.3429004495182818]], [[0.43901485249743755, -0.25102548997439167], [-0.27056281866681697, 
-0.33596500761074627]], [[-0.5520133728036658, -0.35543478095062531], [-0.030142861316464039, 0.43334015125041625]]], 
-[[[0.23875432824979831, -0.16292399374301461], [0.1984744903770953, 0.081978853734930385]], [[-0.1029334594430954, 
-0.18640550773252029], [0.12210965991260675, 0.23137349662568665]], [[-0.17307864914534779, -0.059064966590271363], 
-[-0.11669654754515159, -0.13746990692986583]], [[0.027220673279356636, -0.1393394279220716], [0.082464031792141235, 
-0.16883369707243914]], [[-0.21615749037652454, 0.12359727609379374], [0.13321685938304151, -0.16541889753010749]], 
-[[0.271794506816185, 0.17500521862928395], [0.014841423286408105, 
--0.21336344098795673]]]])+(1.-msk_ref)*numpy.array([[[[-0.67207539902639746, 0.45861873545282344], [-0.55869069806846483, 
--0.23076428075467384]], [[0.2897499129565802, -0.52471742358939877], [-0.34372946874864535, -0.6512989155369272]], 
-[[0.48720332334920813, 0.16626341930901098], [0.32849196632931393, 0.38696740382167011]], [[-0.076624139089324597, 
-0.39222996419506934], [-0.23213002033639851, -0.47525410391866818]], [[0.60846700733045289, -0.34791699592730801], 
-[-0.37499539624357248, 0.46564170115373676]], [[-0.76508100590559558, -0.49262647091750589], [-0.041777485461526161, 
-0.60060196935821353]]], [[[-0.56569977490707279, 0.38602888275581471], [-0.47026152511735103, -0.19423907178959859]], 
-[[0.24388849938017643, -0.44166551676247745], [-0.28932420883389448, -0.54821177869358217]], [[0.41008912207155424, 
-0.13994736158270465], [0.27649848764063417, 0.32571847378346752]], [[-0.06449612394393954, 0.330148079781514], 
-[-0.19538864306550388, -0.40003121673539094]], [[0.51215927496209057, -0.29284893713940663], [-0.31564138719180435, 
-0.39194025835733515]], [[-0.64398451937603607, -0.41465389763560279], [-0.035164974281167806, 0.50553910969941784]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.564569713)+(1.-msk_arg0)*(0.765058255003)
-      arg1=Data(numpy.array([[[-0.061916195813281893, -0.77770650262277941], [0.34046883403604578, 0.80949355749984009]], 
-[[-0.64459103147321128, 0.51540888259634965], [-0.11655602739516113, -0.67199689966441034]], [[-0.88499197249500594, 
-0.25313378268983855], [0.99236121472568417, -0.6940495946852514]], [[0.22304924598053755, 0.25241118750820246], 
-[-0.11946085671392392, 0.16792236720876286]], [[-0.24099441005664635, 0.6916611269224997], [-0.24961596509577566, 
-0.96472588150588923]], [[0.31899818052162288, 0.50443582458100011], [-0.98115542257236155, 
--0.52015867465733923]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.034956008900342971, -0.43906953698380813], [0.19221839191710138, 0.45701554543285866]], 
-[[-0.3639165736410655, 0.29098424492496039], [-0.065804002934881048, -0.37938909678028065]], [[-0.49963966391861803, 
-0.14291166704375177], [0.56025708618979631, -0.39183938047906863]], [[0.12592684878805024, 0.14250371168944045], 
-[-0.067443981589688326, 0.094803882661295552]], [[-0.13605814492023302, 0.39049092391974266], [-0.14092561377428611, 
-0.5446550140452433]], [[0.18009671122454585, 0.28478918871050452], [-0.55393063532985976, 
--0.29366583366564192]]])+(1.-msk_ref)*numpy.array([[[-0.04736949672535657, -0.5949907798013595], [0.26047849205065005, 
-0.61930972853729993]], [[-0.49314968972971907, 0.39431782033240143], [-0.089172150929067273, -0.51411677542493028]], 
-[[-0.67707041416902203, 0.19366209006709081], [0.75921413927105907, -0.53098837179569647]], [[0.17064566690968808, 
-0.19310926265835446], [-0.091394514578762576, 0.12847039323277168]], [[-0.1843747628235051, 0.52916105481699383], 
-[-0.19097075467715691, 0.73807149946148609]], [[0.24405219133912365, 0.38592279171512733], [-0.75064105548030768, 
--0.39795168795821101]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.25980353350036678, 0.38094246378925556])+(1.-msk_arg0)*numpy.array([-0.20352129609671588, 
-0.1685951958778884])
-      arg1=Data(numpy.array([[[-0.81679769816057579, -0.55786887196221646], [-0.50302600787280327, 0.8965691928576569]], 
-[[0.64790141094910392, -0.79264082526829949], [0.8095029626250736, -0.64555155689440324]], [[0.6861970523964751, 
--0.33083887691935732], [-0.46426092136451613, -0.99503807327607685]], [[0.23706478599730141, 0.31436258162329533], 
-[-0.55669207740676829, -0.94500743138959731]], [[-0.20834312393451926, 0.029866861841089998], [0.10057659973846467, 
--0.74860703974958365]], [[-0.62776180242682456, -0.2236049291303901], [0.55635192604811978, 
-0.57047326936893739]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.21220692813708361, -0.14493630416564754], [-0.1306879342879376, 0.23293184433199107]], 
-[[0.16832707592445043, -0.20593088720135103], [0.21031173006900947, -0.16771657553782901]], [[0.17827641889014056, 
--0.085953109242941972], [-0.12061662783663721, -0.25851440740452164]], [[0.061590269070607176, 0.081672509506029597], 
-[-0.14463056878193811, -0.24551626985912281]], [[-0.054128279778692945, 0.0077595162408824513], [0.026130155999505186, 
--0.19449075413019137]], [[-0.16309473446704814, -0.058093350696174439], [0.14454219625703627, 0.14821097114955648]]], 
-[[[-0.31115292755468243, -0.21251594255661949], [-0.19162396678913915, 0.34154127728474004]], [[0.24681315977948659, 
--0.30195054887765482], [0.30837405302709719, -0.24591800058634375]], [[0.26140159578483813, -0.12603057689093025], 
-[-0.1768566992256686, -0.37905225519790253]], [[0.090308043655484616, 0.11975405636672908], [-0.21206765153929327, 
--0.35999345921270909]], [[-0.079366742945165991, 0.011377555935398125], [0.038313897703916529, -0.28517621013218758]], 
-[[-0.23914112768925841, -0.085180612618352691], [0.21193807344266846, 
-0.21731749275931467]]]])+(1.-msk_ref)*numpy.array([[[[0.1662357261784545, 0.11353819587376314], [0.10237650509262973, 
--0.18247092417077676]], [[-0.13186173489925257, 0.16131928809777482], [-0.16475109214758632, 0.13138348955640178]], 
-[[-0.13965571348147668, 0.067332757029809454], [0.094486984443161809, 0.20251143833872612]], [[-0.048247732505061362, 
--0.063979480056282706], [0.11329869312059876, 0.19232913725743914]], [[0.042402262615992066, -0.0060785424322401822], 
-[-0.020469479935772944, 0.15235747499696095]], [[0.1277628956699178, 0.045508364990231288], [-0.11322946507521756, 
--0.11610345917049707]]], [[[-0.13770816791399065, -0.094054011742646534], [-0.084807768328987496, 0.15115725868791696]], 
-[[0.10923306528852444, -0.13363543519692006], [0.13647831054750525, -0.10883689118388773]], [[0.11568952645961338, 
--0.055777845258239658], [-0.078272160975899549, -0.16775863886993686]], [[0.039967984030964729, 0.053000021025458158], 
-[-0.093855609834062714, -0.15932371300118933]], [[-0.035125649789551454, 0.0050354094223563992], [0.016956731533638431, 
--0.12621155050214725]], [[-0.10583762404480676, -0.03769871682599947], [0.093798261949123232, 0.096179052592355388]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.989567049022)+(1.-msk_arg0)*(0.111704893141)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.98564278032184371, -0.98926209581241942], [0.71884820439034591, -0.35985766245982154]], 
-[[-0.31829775311751174, -0.31295355476148701], [-0.23289595230410742, 0.96397526515271847]], [[-0.98050373305327909, 
-0.16502651443126082], [-0.15672073533714692, 0.11515718288678323]], [[0.68514762048745004, -0.080742832957046984], 
-[0.37115655840142603, -0.018109035859751987]], [[0.120811315682819, -0.54008732129415926], [0.96170319243592362, 
--0.90135016688370628]], [[-0.039383107820948116, -0.0037324704980368217], [0.039849656968649283, 
-0.0067319961117462412]]])+(1.-msk_arg1)*numpy.array([[[-0.93341969370184841, -0.6562498098736802], [0.0040611019140541771, 
-0.75590407496308654]], [[0.16399251424059869, 0.35107616902065164], [-0.85195584055986484, 0.78978808695479863]], 
-[[0.82449515840869503, -0.64524111675619156], [-0.58553323716380201, 0.865742756902522]], [[-0.60338001261042762, 
--0.92648566542986877], [0.0044011356577715599, 0.71778707833593858]], [[-0.44437597093742087, 0.64750491748878591], 
-[-0.54543489906039855, -0.19085528281537423]], [[0.31818415050754689, -0.38866553388085512], [0.99116002770573752, 
-0.58200948995953605]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.97535961751305766, -0.97894117286254678], [0.7113484963134139, -0.35610328510836853]], 
-[[-0.31497696826287164, -0.30968852566631128], [-0.2304661602507751, 0.95391815846750416]], [[-0.97027418567271895, 
-0.16330480089615126], [-0.15508567558815925, 0.11395575364297619]], [[0.67799950895030248, -0.079900446938992037], 
-[0.36728430022251024, -0.017920105176370764]], [[0.11955089714872857, -0.53445261674733002], [0.95166979017398179, 
--0.89194642477871666]], [[-0.03897222578769613, -0.0036935298163044698], [0.039433907451010559, 
-0.0066617615263292037]]])+(1.-msk_ref)*numpy.array([[[-0.10426754714068533, -0.073306314885751844], [0.00045364495534419943, 
-0.084438183918610507]], [[0.018318766279172703, 0.039216925944809342], [-0.095167636130604596, 0.088223193857333626]], 
-[[0.092100143565328751, -0.072076589997440529], [-0.06540692768789598, 0.096707702147405247]], [[-0.06740049983207301, 
--0.10349298225352706], [0.00049162838835048949, 0.080180328883518462]], [[-0.049638970348000057, 0.072329467616367535], 
-[-0.060927747114922944, -0.021319468972289861]], [[0.035542726531610641, -0.043415841929757053], [0.11071742498051637, 
-0.065013307882987495]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank1_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.46339937678895926, -0.07398819985425642])+(1.-msk_arg0)*numpy.array([0.19125387973739794, 
-0.363847965390933])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.53932222036196209, -0.79546889428276879], [0.40819649651641421, -0.5403822480074254]], 
-[[0.0075571699341703269, -0.69508479063866702], [0.87061594540981035, 0.38284731713654407]], [[0.40134777280270062, 
--0.10155047091049663], [0.12057619184612833, 0.50213788884001476]], [[0.071581753019605454, -0.64541201057082165], 
-[0.45596858567208742, 0.050327024187448721]], [[0.27646171390120755, 0.27886795358673111], [0.27909761715969683, 
--0.99945859082854316]], [[0.14330865380306212, 0.65405782838481552], [0.24232918771382317, 
-0.66576254667772328]]])+(1.-msk_arg1)*numpy.array([[[0.57991223054867791, -0.57792205794002527], [-0.70572588770907418, 
-0.84975079195812264]], [[-0.88071566625166353, 0.72019098358391775], [-0.96333620472007286, 0.51504226327966207]], 
-[[-0.13724807986659671, 0.81420229896465002], [0.45193448201464936, 0.97654411668289964]], [[0.28266570566132843, 
--0.90883007344716837], [-0.71593930216139778, -0.11859113719293135]], [[-0.41717200473919158, 0.3619607436530321], 
-[-0.050599521071579057, -0.49442202374371336]], [[-0.88738130429442186, 0.27396039024978158], [-0.4578514852002773, 
-0.2201967143529151]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.24992158080417098, -0.36861978986563759], [0.18915800209314293, -0.25041279695445773]], 
-[[0.0035019878377827896, -0.32210185879744252], [0.40344288652543669, 0.17741120816639958]], [[0.18598430779240829, 
--0.04705842493254947], [0.055874932157081864, 0.23269038475058654]], [[0.033170939738746373, -0.29908352347062794], 
-[0.21129555843578848, 0.023321511644106615]], [[0.12811218592782714, 0.1292272358985036], [0.12933366185508705, 
--0.46314848811631831]], [[0.066409140860803711, 0.30308999005746357], [0.11229519456436038, 0.30851394921988734]]], 
-[[[-0.039903480225982176, 0.058855311528037871], [-0.030201723964063738, 0.039981909763265752]], [[-0.00055914139942197193, 
-0.051428072405427676], [-0.064415306565283451, -0.028326183813964512]], [[-0.029694999225186914, 0.0075135365370196773], 
-[-0.0089212153799765066, -0.037152278473889404]], [[-0.0052962050483325914, 0.047752872826451409], [-0.033736294843969047, 
--0.0037236059236509527]], [[-0.020454904540172805, -0.020632937882922565], [-0.020649930277258394, 0.073948141964275738]], 
-[[-0.010603149318425405, -0.048392561322776681], [-0.017929500371089969, 
--0.049258572359070107]]]])+(1.-msk_ref)*numpy.array([[[[0.11091046399960303, -0.11052983576685112], [-0.13497281405547967, 
-0.16251813577191745]], [[-0.16844028811613795, 0.13773931976231693], [-0.18424178664421417, 0.098503831080965734]], 
-[[-0.026249227760994875, 0.1557193485680981], [0.086434223072412983, 0.18676785105033478]], [[0.054060912876438431, 
--0.17381727756879528], [-0.13692616919485256, -0.022681015090618151]], [[-0.079785764424198546, 0.06922639653627613], 
-[-0.0096773547177937142, -0.094560130268601064]], [[-0.16971511725274069, 0.052395987529642335], [-0.08756587288808286, 
-0.04211347592542259]]], [[[0.21099988519045412, -0.2102757649360191], [-0.25677692836665672, 0.30918009674329694]], 
-[[-0.32044660325358776, 0.26204002406990329], [-0.35050791807482184, 0.1873970795846463]], [[-0.04993743461327349, 
-0.29624584989490804], [0.16443544177103536, 0.35531358996955892]], [[0.10284734189066667, -0.33067597310984442], 
-[-0.26049305843482901, -0.043149143981045072]], [[-0.15178718514241152, 0.1316986801295448], [-0.01841053279164968, 
--0.17989444738361768]], [[-0.32287188209347778, 0.099679930590089033], [-0.16658833134133777, 0.08011812650307662]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_array_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.43804651728)+(1.-msk_arg0)*(-0.543337177571)
-      arg1=numpy.array([[[[0.60795094604023503, -0.097794445632283677, 0.75426723610529667, -0.034864365796523078], 
-[0.85978429070534101, 0.12902059279871558, -0.31201948276004643, 0.076558135122647863], [-0.97390792210779908, 
-0.49232230873386418, -0.97840440866285516, 0.36414936327706937]], [[0.79385832462423922, 0.42654756978458575, 
--0.68994913906275612, 0.98855386129816658], [-0.20652839986652571, 0.33057772983488531, -0.5920830737384537, 
-0.20621684716524569], [-0.031916346185909106, 0.48720143271352656, -0.74521372086186055, 0.26511369448021682]]], 
-[[[0.92814304130352876, -0.60386390960393133, 0.8231201717346297, -0.14016735785423751], [-0.40984787457581096, 
-0.67837081242748476, -0.2357430543063852, -0.81200518114201992], [0.41040668039544603, 0.81899606955074167, 
--0.22180340249305619, -0.25792851582212095]], [[-0.77493277192916898, 0.73469674814970154, 0.013542845859844999, 
-0.5913689784999816], [-0.85270304587659984, 0.049194424212611887, -0.72045050859561766, -0.7655798577204973], 
-[0.16786575391896652, 0.92315757404538923, 0.11199468205897722, -0.88181526809288391]]], [[[0.49210255594399932, 
--0.052030715984012987, 0.65375080354347515, -0.78565820813980913], [0.29470788038440965, 0.55718988716903617, 
-0.10815871903784302, 0.75227607016471398], [-0.44501413908595944, 0.67574867634473756, -0.026177234674506833, 
--0.4513298929006202]], [[-0.92238036282832137, 0.34283069911981556, -0.94496013493330766, -0.86792383195402123], 
-[-0.47685078769718392, -0.13354947626753133, 0.20909536400421036, 0.71714871813267655], [-0.62375289750212426, 
-0.83122191743468754, 0.37425198819303973, 0.39703242187001364]]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.26631079459014878, 0.042838516318573112, -0.33040413587451362, 0.015272214014351066], 
-[-0.37662551415573142, -0.056517021332908673, 0.13667904774661854, -0.033536024459945503], [0.42661697343095134, 
--0.21566007272023363, 0.4285866437063911, -0.15951436035333519]], [[-0.34774687431556989, -0.1868476773984856, 
-0.30222981746693656, -0.43303257608558993], [0.090469046280991255, -0.14480842324457782, 0.25935992839170596, 
--0.090332571705246292], [0.013980844291047782, -0.21341689081410087, 0.3264382750529829, -0.11613213055035512]]], 
-[[[-0.4065698267808957, 0.26452048251322852, -0.3605649245314631, 0.061399822944421076], [0.17953243407264038, 
--0.29715797180842296, 0.10326642391191725, 0.35569604161276785], [-0.17977721701576746, -0.35875837593290316, 
-0.097160207982989369, 0.11298468806313997]], [[0.33945660186989079, -0.32183135178409039, -0.0059323964629681451, 
--0.25904712145948688], [0.37352359952049263, -0.021549446195941083, 0.31559083616308403, 0.33535959037436136], 
-[-0.073533008874824168, -0.40438596021145301, -0.049058880429842147, 0.38627610707262416]]], [[[-0.2155638107759707, 
-0.022791873928393921, -0.28637326266137414, 0.34415484184827305], [-0.12909576061743061, -0.24407508953816315, 
--0.047378550188018537, -0.32953191256891434], [0.19493689376706644, -0.29600935422954072, 0.011466846481195113, 
-0.19770348772957794]], [[0.40404550554462532, -0.1501757937661832, 0.41393649607619598, 0.38019101185197457], 
-[0.20888282681308795, 0.05850088296359144, -0.091593495981487277, -0.31414449835000358], [0.27323278439426069, 
--0.3641138660192636, -0.16393978001316453, -0.1739186696474963]]]])+(1.-msk_ref)*numpy.array([[[[-0.33032235112318914, 
-0.053135358071976641, -0.40982143119981596, 0.018943106109689686], [-0.46715276983182102, -0.07010168473980595, 
-0.16953178511004208, -0.041596881057647361], [0.52916038161219858, -0.26749701368275169, 0.53160348992600925, 
--0.19785588725728065]], [[-0.43133274149266626, -0.23175915266657404, 0.37487501788597705, -0.53711806487477098], 
-[0.11221455787175624, -0.17961517069635238, 0.32170074617268041, -0.11204527970637809], [0.017341337455034401, 
--0.26471465135916988, 0.40490231978035029, -0.14404612649433127]]], [[[-0.50429462044412798, 0.32810171228125756, 
--0.44723179091214327, 0.076158136604121532], [0.22268558740554051, -0.36858408257097225, 0.12808796575882486, 
-0.44119260329482518], [-0.22298920738239134, -0.44499101287153464, 0.12051403468624665, 0.14014215180189726]], 
-[[0.42104978510735341, -0.39918805751033343, -0.00735833164576881, -0.32131275168129203], [0.46330526625288276, 
--0.026729159603916548, 0.39144754592001552, 0.415967999099149], [-0.091207704945178214, -0.50158583073521723, 
--0.060850874452898815, 0.4791230189047016]]], [[[-0.26737761382214315, 0.028270222369757795, -0.35520711643215874, 
-0.42687731334626167], [-0.16012574793603021, -0.30274198066559083, -0.058766653131728595, -0.408739556717584], 
-[0.24179272631020376, -0.36715937855256503, 0.014223064804663206, 0.24522431016209553]], [[0.50116354298615895, 
--0.18627266444449192, 0.51343197263188112, 0.4715752852006026], [0.25909076110994977, 0.072562395501300767, 
--0.11360928492125208, -0.38965356040894988], [0.33890813883060772, -0.45163377055421156, -0.20334501896518359, 
--0.21572247550307652]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_constData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.647480014887)+(1.-msk_arg0)*(-0.378983139168)
-      arg1=Data(numpy.array([[[[-0.15966497293401405, -0.82379668881748769, 0.42255757211308609, 0.27970108322437981], 
-[-0.11267007778659455, 0.0049557419911394618, 0.85704943783706944, 0.58893235535539623], [0.99687634124774305, 
-0.58590098057034923, 0.11077319930465057, 0.31718343280306582]], [[-0.9128103218342134, -0.46964610822504937, 
--0.57260883670011609, 0.69637833743595912], [0.16045131981896832, -0.71296302378250265, 0.054788118352184778, 
--0.59976311458090792], [-0.50177368977017611, -0.022496865498684349, 0.43022221754422185, -0.90687847956880363]]], 
-[[[-0.8375205296921322, 0.47187921735539762, 0.036701311258400704, 0.15982997815519395], [0.40454750391093253, 
-0.057429996683073803, 0.049686735148374073, -0.048948156089927863], [-0.51397104354091527, -0.91196540959389893, 
-0.36981298229808446, 0.09035240445060122]], [[0.69669588663419968, 0.99953429884768585, 0.98393221607933246, 
--0.51244956485403348], [-0.37301000438945131, 0.99808559202134495, -0.080812184802454778, -0.068534716172923504], 
-[0.094817978807470338, 0.57847078543819253, -0.37507654657691658, 0.90495886400539605]]], [[[0.24152699525662746, 
-0.9003824620926717, 0.96762490705552207, -0.47904707822731774], [-0.93822028424107917, -0.25496865217469478, 
-0.78629828304891158, 0.7349206929295633], [0.99985514559762789, 0.0022368160793040381, -0.49421642858409776, 
-0.25409309561466964]], [[-0.51028035342680056, -0.30059759007213782, -0.36242607685938144, 0.097490979178828097], 
-[-0.17210992271799341, 0.15143026193152109, -0.55920023737619973, 0.867565538988045], [0.16060374897895957, 
-0.67533415472816549, 0.48603174128372562, -0.54273022379048674]]]]),self.functionspace)
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.10337987905231617, 0.5333918923397607, -0.27359758308257631, -0.18110086153015112], 
-[0.072951623642631885, -0.0032087438982012296, -0.55492238277000738, -0.38132193021319988], [-0.6454575082720132, 
--0.37935917562224825, -0.071723432734903156, -0.20536993379337451]], [[0.59102644077061428, 0.30408646914537751, 
-0.37075277811126389, -0.450891056290317], [-0.10388902294509304, 0.46162930925288037, -0.035474211686326758, 
-0.38833463035777632], [0.32488843612251322, 0.014566270808008602, -0.27856028782043496, 0.58718569145229682]]], 
-[[[0.54227780503358813, -0.30553236267834061, -0.02376336555997741, -0.10348671663538224], [-0.26193642385492233, 
--0.037184775107341556, -0.032171168013576924, 0.031692952833818636], [0.33278597892357864, 0.59047937698067687, 
--0.2394465152839278, -0.058501376178790178]], [[-0.4510966630499213, -0.64717848269839429, -0.63707644591526602, 
-0.33180085188074548], [0.24151652319524144, -0.64624047398090756, 0.052324274618978983, 0.044374859047950146], 
-[-0.061392746329856709, -0.37454827276746294, 0.24285456796154695, -0.58594277873872358]]], [[[-0.15638390248447684, 
--0.58297964996014195, -0.62651778922575541, 0.31017340934240245], [0.60747888360810065, 0.16508710670589877, 
--0.50911242401446821, -0.47584646119911239], [-0.64738622455682338, -0.0014482937083282164, 0.31999526053724303, 
--0.1645202013313789]], [[0.33039633083354675, 0.19463093209503271, 0.23466364164050435, -0.063123460650097524], 
-[0.11143773532372042, -0.098048068249828368, 0.36207097802139493, -0.56173134809979874], [-0.10398771777987346, 
--0.43726536855738107, -0.3146958390821491, 0.35140697337972138]]]])+(1.-msk_ref)*numpy.array([[[[0.060510332657683796, 
-0.31220505516413888, -0.16014219515856606, -0.10600199454902588], [0.042700059769850397, -0.0018781426567080065, 
--0.32480728637354089, -0.22319543279010878], [-0.37779932516823894, -0.22204659285807737, -0.041981174808143305, 
--0.12020717305574337]], [[0.34593972123355332, 0.17798795639309697, 0.21700909444786562, -0.26391564836997394], 
-[-0.060808344868618629, 0.27020096486370138, -0.02076377308221114, 0.22730010792096444], [0.19016376810094046, 
-0.0085259327081284829, -0.16304696654466649, 0.34369165303075977]]], [[[0.31740615946025186, -0.17883426710142078, 
--0.013909178152285363, -0.060572866854385642], [-0.1533166829746867, -0.021765000425351008, -0.018830434861532772, 
-0.018550525851439188], [0.19478635952251611, 0.34561951374039762, -0.14015288493635569, -0.034242037870052831]], 
-[[-0.26403599416196338, -0.37880664628324029, -0.37289371997813298, 0.19420974475358466], [0.14136450240453091, 
--0.37825761082245973, 0.030626455479447413, 0.025973501877192745], [-0.035934415258006579, -0.21923067418226289, 
-0.14214768704995931, -0.34296415109854406]]], [[[-0.091534658856137124, -0.34122977193556603, -0.36671352481290898, 
-0.18155076551577951], [0.3555696685526446, 0.096628820190563638, -0.29799379163217377, -0.27852255124586361], 
-[-0.37892824179172513, -0.00084771557947578569, 0.18729969353312909, -0.096296999016926302]], [[0.19338765019737314, 
-0.11392141831183186, 0.1373533723244599, -0.036947437329740596], [0.065226758793602652, -0.05738951603181891, 
-0.21192746138424376, -0.32879271139954436], [-0.060866112950172836, -0.25594025794615238, -0.18419783504692674, 
-0.20568560393339297]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_outer_expandedData_rank0_expandedData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.690473237624)+(1.-msk_arg0)*(-0.0562045307337)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.56201639410078919, -0.67905807272448215, -0.25380207692191359, -0.32222609823072079], 
-[0.76016816954232169, 0.24391957505617157, 0.26418043996577079, -0.32148058834963256], [-0.69353153778537813, 
--0.85059153048984104, -0.41192354690135802, -0.09464631974832094]], [[-0.64890091661083549, -0.087129640274469011, 
-0.92245871263029744, 0.17058762013903395], [-0.29767982521749548, -0.47635452775846954, 0.36511868715211371, 
-0.65030298443566781], [-0.52341553066884439, -0.136229235578611, 0.13799323750383441, -0.74164324953122218]]], 
-[[[-0.81201740098239839, -0.11022566256500266, 0.82203378705157415, 0.13325227536636453], [0.18849371161493056, 
--0.50191772584346173, -0.64447769012620082, 0.058216229392509922], [0.67428521460060353, 0.6029321949871751, 
-0.50664817337072376, 0.1680297553997907]], [[-0.20918113073753042, -0.8713521135486364, 0.91086493006721159, 
--0.47669574703485496], [-0.17870237370162179, 0.19863142254470101, -0.44726017245596061, 0.21973053356979233], 
-[-0.13665198792278255, -0.58338985283344003, -0.83782387884143894, 0.37637197375960674]]], [[[0.48442932734435407, 
--0.66084657381684431, 0.013136421713676016, -0.30866551598460745], [0.97879855698655449, -0.77731723293622768, 
-0.67126837966669139, -0.26330714312312908], [0.92670271865249032, -0.58770621430601544, 0.40426437257369874, 
-0.14919210195014121]], [[-0.63536521155437176, -0.82420572388288837, -0.53044375853468684, -0.53196527767767821], 
-[-0.2730105313227722, -0.13733715172520444, -0.33175551206416021, -0.019053105080914845], [-0.66132172779628196, 
-0.58168822478577753, 0.36299207595924909, -0.016604553536709643]]]])+(1.-msk_arg1)*numpy.array([[[[-0.93858479936100658, 
-0.85293162859941574, -0.23719969973251875, -0.59966352839920201], [0.76964952963950251, 0.099205810203436107, 
-0.10815561430526488, -0.2269339495561149], [0.7272309695157666, 0.98459525877631671, -0.38356325840308836, 
--0.79663843013422331]], [[-0.61086241061772206, 0.50866661913662514, 0.8750602262829843, -0.41188300050386295], 
-[0.60240578511221887, -0.66351955655808426, -0.42029065852688063, 0.12740508973692011], [-0.65658994729083653, 
--0.29334456722385105, -0.87068164399583092, -0.25083390343440404]]], [[[0.3684013559470114, -0.098457429179994449, 
--0.85367203809283088, -0.46399893153072269], [-0.80864851862858034, 0.43887697186794949, 0.57510730528110399, 
-0.85667058370089966], [0.025836965582203275, -0.23640860192184587, 0.21613477422384664, 0.67145006285814479]], 
-[[-0.87221722248074096, 0.35929053249580289, 0.79083599288546269, 0.1352443609608609], [0.13264053413890675, 
--0.062105862078114304, 0.5600587428281163, -0.11056941015246968], [-0.15919859652552848, 0.73179978310420735, 
--0.80962177892350429, -0.72481111775677354]]], [[[-0.98213931444948832, -0.99397587509615715, -0.32204725603144935, 
-0.40306261750230998], [-0.089799448848834951, 0.65825162639669088, -0.52160276190906951, 0.84004216473803495], 
-[-0.5391586472258616, -0.25865381238936069, -0.67372728245366553, -0.51690007321233233]], [[0.68035296315998606, 
--0.39722085397897633, 0.94591470622274665, -0.26720530940111842], [0.23930428363536183, -0.65515207918738083, 
--0.81974978522324471, -0.0056555485824274498], [0.922210890681332, 0.74667199058644851, -0.90112295821245314, 
-0.27807862829333208]]]])
-      res=outer(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.38805727923252009, 0.46887142600876536, 0.17524354176796114, 0.22248849729230466], 
-[-0.52487577716257261, -0.16841993870889735, -0.18240952370009017, 0.22197374267102901], [0.47886496628899961, 
-0.58731068795284702, 0.28442218508252926, 0.065350750825816498]], [[0.4480487167894443, 0.06016068481332433, 
--0.63693305388427934, -0.11778618637596644], [0.20553995269326114, 0.32891005303822701, -0.2521046820349328, 
--0.44901680709982467], [0.36140441608358453, 0.094062641349001844, -0.095280637469485757, 0.51208481566578368]]], 
-[[[0.5606762838633168, 0.076107870100504432, -0.56759233038179224, -0.092007129992974279], [-0.13014986333051973, 
-0.34656075718399437, 0.44499459727785451, -0.040196748390905958], [-0.46557589520725107, -0.41630854474052059, 
--0.34982700460355326, -0.11602004922805698]], [[0.14443397259018523, 0.60164531495241469, -0.62892785730163714, 
-0.32914565581673255], [0.1233892065408471, -0.1371496814182942, 0.30882117933592157, -0.15171805291877657], 
-[0.094354540528795092, 0.40281508048287579, 0.57849496618231977, -0.25987477527271896]]], [[[-0.33448548605145734, 
-0.45629687339602332, -0.0090703476314356775, 0.21312527816476468], [-0.67583420862417465, 0.53671674648638157, 
--0.46349285142305563, 0.18180653560174456], [-0.63986342646291849, 0.4057954125636003, -0.27913373018698395, 
--0.10301315366143916]], [[0.43870267469558466, 0.5690919946376245, 0.36625721933287175, 0.36730778758163984], 
-[0.18850646546787436, 0.094827627797756095, 0.22906830251453819, 0.013155659152008956], [0.45662495450257551, 
--0.4016401518555745, -0.2506363139194282, 0.011464999839792421]]]])+(1.-msk_ref)*numpy.array([[[[0.052752718201846856, 
--0.047938621933340218, 0.013331697813635078, 0.033703807211777563], [-0.043257790642782727, -0.0055758160085382568, 
--0.0060788355482398722, 0.012754716142341149], [-0.040873675376629927, -0.055338714482125205, 0.021557992945225302, 
-0.044774689130106383]], [[0.034333235131611191, -0.028589368628459531, -0.049182349381939501, 0.023149690760498068], 
-[-0.033857934463483952, 0.037292805308963943, 0.023622239234251004, -0.00716074328174548], [0.036903329871930554, 
-0.016487293744089832, 0.048936253219211259, 0.014098001834626889]]], [[[-0.02070582533265173, 0.0055337536043057302, 
-0.047980236301468374, 0.026078842207611346], [0.045449710518001646, -0.024666874253654842, -0.032323636214833418, 
--0.048148768150253408], [-0.001452154526129874, 0.01328723453242177, -0.012147753560480321, -0.037738535694039309]], 
-[[0.049022559687360356, -0.020193755775979184, -0.044448565867428194, -0.0076013458421810825], [-0.0074549989775413907, 
-0.0034906308339108208, -0.031477838823946828, 0.0062145018111189141], [0.0089476824111771568, -0.041130463400377883, 
-0.045504412156159565, 0.040737668744070664]]], [[[0.05520067928372778, 0.055865947620374501, 0.01810051489931563, 
--0.022653945273004492], [0.0050471358826915131, -0.036996723766305049, 0.029316438462488603, -0.047214175665602633], 
-[0.030303158758333136, 0.0145375161478203, 0.037866525752783084, 0.029052126051101926]], [[-0.038238919027672999, 
-0.022325611695518416, -0.053164692177332502, 0.015018149024436576], [-0.013449984964284022, 0.036822515169918905, 
-0.046073651997504191, 0.00031786745411684157], [-0.05183243034822968, -0.041966348842891112, 0.050647192999672894, 
--0.015629278810291056]]]])
+   def test_generalTensorProduct_array_rank2_expandedData_rank2_offset0(self):
+      arg0=numpy.array([[6.0, 7.0, -6.0, 5.0, 0.0], [2.0, -4.0, -1.0, 0.0, 0.0], [6.0, 2.0, -2.0, 5.0, -1.0], [5.0, -4.0, 5.0, 
+1.0, 3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-4.0, 5.0, 0.0, -2.0, 6.0], [-3.0, -7.0, -2.0, -3.0, 0.0], [0.0, -6.0, 6.0, 0.0, -6.0], 
+[-3.0, -6.0, 6.0, -3.0, -3.0]])+(1.-msk_arg1)*numpy.array([[4.0, 0.0, 6.0, -4.0, 5.0], [-7.0, 0.0, 3.0, -2.0, 1.0], [0.0, 3.0, 
+-7.0, 4.0, -5.0], [-4.0, -5.0, 6.0, 1.0, -4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-24.0, 30.0, 0.0, -12.0, 36.0], [-18.0, -42.0, -12.0, -18.0, 0.0], [0.0, -36.0, 36.0, 0.0, 
+-36.0], [-18.0, -36.0, 36.0, -18.0, -18.0]], [[-28.0, 35.0, 0.0, -14.0, 42.0], [-21.0, -49.0, -14.0, -21.0, 0.0], [0.0, -42.0, 
+42.0, 0.0, -42.0], [-21.0, -42.0, 42.0, -21.0, -21.0]], [[24.0, -30.0, 0.0, 12.0, -36.0], [18.0, 42.0, 12.0, 18.0, 0.0], [0.0, 
+36.0, -36.0, 0.0, 36.0], [18.0, 36.0, -36.0, 18.0, 18.0]], [[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], 
+[0.0, -30.0, 30.0, 0.0, -30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-8.0, 10.0, 0.0, -4.0, 12.0], [-6.0, -14.0, -4.0, -6.0, 0.0], [0.0, 
+-12.0, 12.0, 0.0, -12.0], [-6.0, -12.0, 12.0, -6.0, -6.0]], [[16.0, -20.0, 0.0, 8.0, -24.0], [12.0, 28.0, 8.0, 12.0, 0.0], 
+[0.0, 24.0, -24.0, 0.0, 24.0], [12.0, 24.0, -24.0, 12.0, 12.0]], [[4.0, -5.0, 0.0, 2.0, -6.0], [3.0, 7.0, 2.0, 3.0, 0.0], [0.0, 
+6.0, -6.0, 0.0, 6.0], [3.0, 6.0, -6.0, 3.0, 3.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]], [[[-24.0, 30.0, 0.0, -12.0, 36.0], [-18.0, -42.0, -12.0, -18.0, 0.0], [0.0, -36.0, 36.0, 0.0, -36.0], [-18.0, 
+-36.0, 36.0, -18.0, -18.0]], [[-8.0, 10.0, 0.0, -4.0, 12.0], [-6.0, -14.0, -4.0, -6.0, 0.0], [0.0, -12.0, 12.0, 0.0, -12.0], 
+[-6.0, -12.0, 12.0, -6.0, -6.0]], [[8.0, -10.0, 0.0, 4.0, -12.0], [6.0, 14.0, 4.0, 6.0, 0.0], [0.0, 12.0, -12.0, 0.0, 12.0], 
+[6.0, 12.0, -12.0, 6.0, 6.0]], [[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], [0.0, -30.0, 30.0, 0.0, 
+-30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[4.0, -5.0, 0.0, 2.0, -6.0], [3.0, 7.0, 2.0, 3.0, 0.0], [0.0, 6.0, -6.0, 0.0, 
+6.0], [3.0, 6.0, -6.0, 3.0, 3.0]]], [[[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], [0.0, -30.0, 30.0, 
+0.0, -30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[16.0, -20.0, 0.0, 8.0, -24.0], [12.0, 28.0, 8.0, 12.0, 0.0], [0.0, 24.0, 
+-24.0, 0.0, 24.0], [12.0, 24.0, -24.0, 12.0, 12.0]], [[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], [0.0, 
+-30.0, 30.0, 0.0, -30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[-4.0, 5.0, 0.0, -2.0, 6.0], [-3.0, -7.0, -2.0, -3.0, 0.0], 
+[0.0, -6.0, 6.0, 0.0, -6.0], [-3.0, -6.0, 6.0, -3.0, -3.0]], [[-12.0, 15.0, 0.0, -6.0, 18.0], [-9.0, -21.0, -6.0, -9.0, 0.0], 
+[0.0, -18.0, 18.0, 0.0, -18.0], [-9.0, -18.0, 18.0, -9.0, -9.0]]]])+(1.-msk_ref)*numpy.array([[[[24.0, 0.0, 36.0, -24.0, 30.0], 
+[-42.0, 0.0, 18.0, -12.0, 6.0], [0.0, 18.0, -42.0, 24.0, -30.0], [-24.0, -30.0, 36.0, 6.0, -24.0]], [[28.0, 0.0, 42.0, -28.0, 
+35.0], [-49.0, 0.0, 21.0, -14.0, 7.0], [0.0, 21.0, -49.0, 28.0, -35.0], [-28.0, -35.0, 42.0, 7.0, -28.0]], [[-24.0, 0.0, -36.0, 
+24.0, -30.0], [42.0, 0.0, -18.0, 12.0, -6.0], [0.0, -18.0, 42.0, -24.0, 30.0], [24.0, 30.0, -36.0, -6.0, 24.0]], [[20.0, 0.0, 
+30.0, -20.0, 25.0], [-35.0, 0.0, 15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[8.0, 0.0, 12.0, 
+-8.0, 10.0], [-14.0, 0.0, 6.0, -4.0, 2.0], [0.0, 6.0, -14.0, 8.0, -10.0], [-8.0, -10.0, 12.0, 2.0, -8.0]], [[-16.0, 0.0, -24.0, 
+16.0, -20.0], [28.0, 0.0, -12.0, 8.0, -4.0], [0.0, -12.0, 28.0, -16.0, 20.0], [16.0, 20.0, -24.0, -4.0, 16.0]], [[-4.0, 0.0, 
+-6.0, 4.0, -5.0], [7.0, 0.0, -3.0, 2.0, -1.0], [0.0, -3.0, 7.0, -4.0, 5.0], [4.0, 5.0, -6.0, -1.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[24.0, 0.0, 36.0, -24.0, 30.0], [-42.0, 0.0, 18.0, 
+-12.0, 6.0], [0.0, 18.0, -42.0, 24.0, -30.0], [-24.0, -30.0, 36.0, 6.0, -24.0]], [[8.0, 0.0, 12.0, -8.0, 10.0], [-14.0, 0.0, 
+6.0, -4.0, 2.0], [0.0, 6.0, -14.0, 8.0, -10.0], [-8.0, -10.0, 12.0, 2.0, -8.0]], [[-8.0, 0.0, -12.0, 8.0, -10.0], [14.0, 0.0, 
+-6.0, 4.0, -2.0], [0.0, -6.0, 14.0, -8.0, 10.0], [8.0, 10.0, -12.0, -2.0, 8.0]], [[20.0, 0.0, 30.0, -20.0, 25.0], [-35.0, 0.0, 
+15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[-4.0, 0.0, -6.0, 4.0, -5.0], [7.0, 
+0.0, -3.0, 2.0, -1.0], [0.0, -3.0, 7.0, -4.0, 5.0], [4.0, 5.0, -6.0, -1.0, 4.0]]], [[[20.0, 0.0, 30.0, -20.0, 25.0], [-35.0, 
+0.0, 15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[-16.0, 0.0, -24.0, 16.0, -20.0], 
+[28.0, 0.0, -12.0, 8.0, -4.0], [0.0, -12.0, 28.0, -16.0, 20.0], [16.0, 20.0, -24.0, -4.0, 16.0]], [[20.0, 0.0, 30.0, -20.0, 
+25.0], [-35.0, 0.0, 15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[4.0, 0.0, 6.0, 
+-4.0, 5.0], [-7.0, 0.0, 3.0, -2.0, 1.0], [0.0, 3.0, -7.0, 4.0, -5.0], [-4.0, -5.0, 6.0, 1.0, -4.0]], [[12.0, 0.0, 18.0, -12.0, 
+15.0], [-21.0, 0.0, 9.0, -6.0, 3.0], [0.0, 9.0, -21.0, 12.0, -15.0], [-12.0, -15.0, 18.0, 3.0, -12.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
+      if not arg1.isLazy():
         arg0=arg0*1j
         arg1=arg1*1j
         ref=-ref
-        res=outer(arg0,arg1)
+        res=generalTensorProduct(arg0,arg1,axis_offset=0)
         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
         self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_float_rank0(self):
-      arg0=0.190833616561
-      arg1=0.400555937829
-      res=maximum(arg0,arg1)
-      ref=0.400555937829
-      if isinstance(res,numpy.ndarray):
-         self.assertEqual(res.shape,(),"wrong shape of result.")
-      else: 
-         self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_array_rank0(self):
-      arg0=-0.607520185637
-      arg1=numpy.array(-0.822580587394)
-      res=maximum(arg0,arg1)
-      ref=numpy.array(-0.607520185637)
-      if isinstance(res,numpy.ndarray):
-         self.assertEqual(res.shape,(),"wrong shape of result.")
-      else: 
-         self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      res=maximum(5.0,-1e20)
-      self.assertTrue(Lsup(res-5.0)<=self.RES_TOL*5,"Wrong large result")
-      self.assertTrue(Lsup(maximum(-numpy.inf,-5.)+5)<self.RES_TOL*5,"Wrong large result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_constData_rank0(self):
-      arg0=0.66510948385
-      arg1=Data(0.447127953255,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(0.66510948385,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_expandedData_rank0(self):
-      arg0=-0.626379875424
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.808319082591)+(1.-msk_arg1)*(-0.732167960529)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.626379875424)+(1.-msk_ref)*(-0.626379875424)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_array_rank1(self):
-      arg0=-0.34068193517
-      arg1=numpy.array([-0.28498591942826468, -0.9244388369769494])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([-0.28498591942826468, -0.34068193517048506])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg1=numpy.array([-1e16, -numpy.inf])
-      arg0=5.
-      res=maximum(arg0,arg1)
-      ref=numpy.array([5.,5.])
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*5,"wrong large result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_constData_rank1(self):
-      arg0=0.133219946847
-      arg1=Data(numpy.array([0.73105505422959327, -0.57302577924904785]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.73105505422959327, 0.13321994684664973]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_expandedData_rank3_offset1(self):
+      arg0=numpy.array([[[-4.0, 7.0, -5.0], [-6.0, -3.0, 0.0], [1.0, -1.0, -5.0], [-4.0, 5.0, 7.0], [5.0, 7.0, -7.0]], [[1.0, 
+0.0, 0.0], [-1.0, -2.0, 2.0], [-4.0, 6.0, 6.0], [0.0, 1.0, 6.0], [2.0, 2.0, -7.0]], [[3.0, 6.0, 0.0], [2.0, -4.0, -1.0], [3.0, 
+6.0, -4.0], [7.0, -5.0, -6.0], [-6.0, 7.0, -2.0]], [[4.0, -7.0, 3.0], [-3.0, -7.0, 2.0], [7.0, 5.0, -4.0], [4.0, -3.0, 0.0], 
+[-7.0, 6.0, 3.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-6.0, -3.0, -3.0, -4.0, -5.0], [-6.0, 2.0, 6.0, -6.0, 7.0], [5.0, -4.0, 2.0, 5.0, -5.0], 
+[1.0, 0.0, 7.0, -3.0, -2.0]], [[5.0, -7.0, 2.0, 5.0, -7.0], [6.0, -6.0, 3.0, 2.0, 0.0], [2.0, -1.0, 3.0, 2.0, 0.0], [0.0, 0.0, 
+-4.0, -7.0, -5.0]], [[2.0, -5.0, -5.0, -4.0, 1.0], [3.0, 0.0, -7.0, 6.0, -4.0], [-1.0, -7.0, 0.0, 1.0, 0.0], [0.0, -2.0, -2.0, 
+6.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, -4.0, 5.0, 0.0, 4.0], [-6.0, 0.0, 2.0, 0.0, 0.0], [0.0, 7.0, 2.0, 1.0, 2.0], 
+[-5.0, 2.0, 4.0, 2.0, 0.0]], [[-5.0, -2.0, 7.0, 7.0, 3.0], [3.0, 4.0, 5.0, 0.0, -6.0], [-5.0, -3.0, 7.0, 0.0, -7.0], [-5.0, 
+-6.0, 0.0, 3.0, 0.0]], [[6.0, 0.0, 4.0, 2.0, 0.0], [6.0, 0.0, 1.0, 1.0, -5.0], [1.0, 5.0, -4.0, -6.0, 0.0], [-7.0, -7.0, -6.0, 
+4.0, -4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[49.0, -12.0, 51.0, 71.0, -34.0], [51.0, -50.0, 32.0, 8.0, -8.0], [-1.0, 44.0, 13.0, -11.0, 
+20.0], [-4.0, 10.0, -46.0, -67.0, -12.0]], [[21.0, 39.0, 12.0, 9.0, 51.0], [18.0, 6.0, -45.0, 30.0, -42.0], [-36.0, 27.0, 
+-21.0, -36.0, 30.0], [-6.0, 0.0, -30.0, 39.0, 27.0]], [[-21.0, 29.0, 20.0, 11.0, -3.0], [-27.0, 8.0, 38.0, -38.0, 27.0], [8.0, 
+32.0, -1.0, -2.0, -5.0], [1.0, 10.0, 21.0, -26.0, 18.0]], [[63.0, -58.0, -13.0, 13.0, -8.0], [75.0, -38.0, -58.0, 76.0, -56.0], 
+[-17.0, -38.0, 7.0, -3.0, 20.0], [-4.0, -14.0, -62.0, 19.0, -38.0]], [[-9.0, -29.0, 34.0, 43.0, -81.0], [-9.0, -32.0, 100.0, 
+-58.0, 63.0], [46.0, 22.0, 31.0, 32.0, -25.0], [5.0, 14.0, 21.0, -106.0, -24.0]]], [[[-6.0, -3.0, -3.0, -4.0, -5.0], [-6.0, 
+2.0, 6.0, -6.0, 7.0], [5.0, -4.0, 2.0, 5.0, -5.0], [1.0, 0.0, 7.0, -3.0, -2.0]], [[0.0, 7.0, -11.0, -14.0, 21.0], [0.0, 10.0, 
+-26.0, 14.0, -15.0], [-11.0, -8.0, -8.0, -7.0, 5.0], [-1.0, -4.0, -3.0, 29.0, 6.0]], [[66.0, -60.0, -6.0, 22.0, -16.0], [78.0, 
+-44.0, -48.0, 72.0, -52.0], [-14.0, -32.0, 10.0, -2.0, 20.0], [-4.0, -12.0, -64.0, 6.0, -40.0]], [[17.0, -37.0, -28.0, -19.0, 
+-1.0], [24.0, -6.0, -39.0, 38.0, -24.0], [-4.0, -43.0, 3.0, 8.0, 0.0], [0.0, -12.0, -16.0, 29.0, -23.0]], [[-16.0, 15.0, 33.0, 
+30.0, -31.0], [-21.0, -8.0, 67.0, -50.0, 42.0], [21.0, 39.0, 10.0, 7.0, -10.0], [2.0, 14.0, 20.0, -62.0, 7.0]]], [[[12.0, 
+-51.0, 3.0, 18.0, -57.0], [18.0, -30.0, 36.0, -6.0, 21.0], [27.0, -18.0, 24.0, 27.0, -15.0], [3.0, 0.0, -3.0, -51.0, -36.0]], 
+[[-34.0, 27.0, -9.0, -24.0, 17.0], [-39.0, 28.0, 7.0, -26.0, 18.0], [3.0, 3.0, -8.0, 1.0, -10.0], [2.0, 2.0, 32.0, 16.0, 
+19.0]], [[4.0, -31.0, 23.0, 34.0, -61.0], [6.0, -30.0, 64.0, -30.0, 37.0], [31.0, 10.0, 24.0, 23.0, -15.0], [3.0, 8.0, 5.0, 
+-75.0, -24.0]], [[-79.0, 44.0, -1.0, -29.0, -6.0], [-90.0, 44.0, 69.0, -88.0, 73.0], [31.0, 19.0, -1.0, 19.0, -35.0], [7.0, 
+12.0, 81.0, -22.0, 29.0]], [[67.0, -21.0, 42.0, 67.0, -21.0], [72.0, -54.0, -1.0, 38.0, -34.0], [-14.0, 31.0, 9.0, -18.0, 
+30.0], [-6.0, 4.0, -66.0, -43.0, -17.0]]], [[[-53.0, 22.0, -41.0, -63.0, 32.0], [-57.0, 50.0, -18.0, -20.0, 16.0], [3.0, -30.0, 
+-13.0, 9.0, -20.0], [4.0, -6.0, 50.0, 55.0, 18.0]], [[-13.0, 48.0, -15.0, -31.0, 66.0], [-18.0, 36.0, -53.0, 16.0, -29.0], 
+[-31.0, 5.0, -27.0, -27.0, 15.0], [-3.0, -4.0, 3.0, 70.0, 35.0]], [[-25.0, -36.0, 9.0, 13.0, -74.0], [-24.0, -16.0, 85.0, 
+-56.0, 65.0], [49.0, -5.0, 29.0, 41.0, -35.0], [7.0, 8.0, 37.0, -80.0, -27.0]], [[-39.0, 9.0, -18.0, -31.0, 1.0], [-42.0, 26.0, 
+15.0, -30.0, 28.0], [14.0, -13.0, -1.0, 14.0, -20.0], [4.0, 0.0, 40.0, 9.0, 7.0]], [[78.0, -36.0, 18.0, 46.0, -4.0], [87.0, 
+-50.0, -45.0, 72.0, -61.0], [-26.0, 1.0, 4.0, -20.0, 35.0], [-7.0, -6.0, -79.0, -3.0, 
+-25.0]]]])+(1.-msk_ref)*numpy.array([[[[-89.0, 2.0, 9.0, 39.0, 5.0], [15.0, 28.0, 22.0, -5.0, -17.0], [-40.0, -74.0, 61.0, 
+26.0, -57.0], [20.0, -15.0, 14.0, -7.0, 20.0]], [[-21.0, 30.0, -51.0, -21.0, -33.0], [27.0, -12.0, -27.0, 0.0, 18.0], [15.0, 
+-33.0, -33.0, -6.0, 9.0], [45.0, 6.0, -24.0, -21.0, 0.0]], [[-19.0, -2.0, -22.0, -17.0, 1.0], [-39.0, -4.0, -8.0, -5.0, 31.0], 
+[0.0, -15.0, 15.0, 31.0, 9.0], [35.0, 43.0, 34.0, -21.0, 20.0]], [[-7.0, 6.0, 43.0, 49.0, -1.0], [81.0, 20.0, 24.0, 7.0, 
+-65.0], [-18.0, -8.0, -1.0, -46.0, -43.0], [-54.0, -87.0, -58.0, 35.0, -28.0]], [[-47.0, -34.0, 46.0, 35.0, 41.0], [-51.0, 
+28.0, 38.0, -7.0, -7.0], [-42.0, -21.0, 87.0, 47.0, -39.0], [-11.0, 17.0, 62.0, 3.0, 28.0]]], [[[6.0, -4.0, 5.0, 0.0, 4.0], 
+[-6.0, 0.0, 2.0, 0.0, 0.0], [0.0, 7.0, 2.0, 1.0, 2.0], [-5.0, 2.0, 4.0, 2.0, 0.0]], [[16.0, 8.0, -11.0, -10.0, -10.0], [12.0, 
+-8.0, -10.0, 2.0, 2.0], [12.0, 9.0, -24.0, -13.0, 12.0], [1.0, -4.0, -16.0, 0.0, -8.0]], [[-18.0, 4.0, 46.0, 54.0, 2.0], [78.0, 
+24.0, 28.0, 6.0, -66.0], [-24.0, -16.0, 10.0, -40.0, -50.0], [-52.0, -86.0, -52.0, 34.0, -24.0]], [[31.0, -2.0, 31.0, 19.0, 
+3.0], [39.0, 4.0, 11.0, 6.0, -36.0], [1.0, 27.0, -17.0, -36.0, -7.0], [-47.0, -48.0, -36.0, 27.0, -24.0]], [[-40.0, -12.0, 
+-4.0, 0.0, 14.0], [-48.0, 8.0, 7.0, -7.0, 23.0], [-17.0, -27.0, 46.0, 44.0, -10.0], [29.0, 41.0, 50.0, -18.0, 28.0]]], 
+[[[-12.0, -24.0, 57.0, 42.0, 30.0], [0.0, 24.0, 36.0, 0.0, -36.0], [-30.0, 3.0, 48.0, 3.0, -36.0], [-45.0, -30.0, 12.0, 24.0, 
+0.0]], [[26.0, 0.0, -22.0, -30.0, -4.0], [-30.0, -16.0, -17.0, -1.0, 29.0], [19.0, 21.0, -20.0, 8.0, 32.0], [17.0, 35.0, 14.0, 
+-12.0, 4.0]], [[-36.0, -24.0, 41.0, 34.0, 30.0], [-24.0, 24.0, 32.0, -4.0, -16.0], [-34.0, -17.0, 64.0, 27.0, -36.0], [-17.0, 
+-2.0, 36.0, 8.0, 16.0]], [[31.0, -18.0, -24.0, -47.0, 13.0], [-93.0, -20.0, -17.0, -6.0, 60.0], [19.0, 34.0, 3.0, 43.0, 49.0], 
+[32.0, 86.0, 64.0, -25.0, 24.0]], [[-83.0, 10.0, 11.0, 45.0, -3.0], [45.0, 28.0, 21.0, -2.0, -32.0], [-37.0, -73.0, 45.0, 6.0, 
+-61.0], [9.0, -40.0, -12.0, 1.0, 8.0]]], [[[77.0, -2.0, -17.0, -43.0, -5.0], [-27.0, -28.0, -24.0, 3.0, 27.0], [38.0, 64.0, 
+-53.0, -14.0, 57.0], [-6.0, 29.0, -2.0, -1.0, -12.0]], [[29.0, 26.0, -56.0, -45.0, -33.0], [9.0, -28.0, -39.0, 2.0, 32.0], 
+[37.0, 10.0, -63.0, -15.0, 43.0], [36.0, 22.0, -24.0, -19.0, -8.0]], [[-7.0, -38.0, 54.0, 27.0, 43.0], [-51.0, 20.0, 35.0, 
+-4.0, -10.0], [-29.0, 14.0, 65.0, 31.0, -21.0], [-32.0, 12.0, 52.0, 13.0, 16.0]], [[39.0, -10.0, -1.0, -21.0, 7.0], [-33.0, 
+-12.0, -7.0, 0.0, 18.0], [15.0, 37.0, -13.0, 4.0, 29.0], [-5.0, 26.0, 16.0, -1.0, 0.0]], [[-54.0, 16.0, 19.0, 48.0, -10.0], 
+[78.0, 24.0, 19.0, 3.0, -51.0], [-27.0, -52.0, 16.0, -25.0, -56.0], [-16.0, -71.0, -46.0, 16.0, -12.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_expandedData_rank1(self):
-      arg0=-0.989795574687
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.12744166984605543, 0.1251383582008796])+(1.-msk_arg1)*numpy.array([-0.75971755196106439, 
--0.044294049795981616])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.12744166984605543, 0.1251383582008796])+(1.-msk_ref)*numpy.array([-0.75971755196106439, 
--0.044294049795981616])
+   def test_generalTensorProduct_array_rank4_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[[[-6.0, 7.0, -2.0], [-2.0, -5.0, 4.0]], [[-2.0, -3.0, 3.0], [-3.0, 2.0, -6.0]], [[1.0, 7.0, -7.0], 
+[-5.0, 5.0, -5.0]], [[4.0, 5.0, -5.0], [6.0, -6.0, -6.0]], [[4.0, -7.0, -1.0], [4.0, 1.0, -5.0]]], [[[-6.0, 7.0, 6.0], [-1.0, 
+7.0, -2.0]], [[0.0, -6.0, -3.0], [3.0, 2.0, -7.0]], [[0.0, 2.0, 1.0], [-1.0, 0.0, 3.0]], [[-2.0, -1.0, -4.0], [-5.0, -3.0, 
+-2.0]], [[4.0, 7.0, 4.0], [4.0, 2.0, -2.0]]], [[[4.0, -1.0, 0.0], [4.0, 0.0, 2.0]], [[-5.0, 3.0, 4.0], [-7.0, -6.0, -3.0]], 
+[[1.0, 7.0, -6.0], [7.0, 2.0, -2.0]], [[0.0, 0.0, 3.0], [5.0, -5.0, 2.0]], [[-3.0, -7.0, 0.0], [-7.0, -5.0, -7.0]]], [[[0.0, 
+5.0, 7.0], [3.0, -7.0, -2.0]], [[3.0, -5.0, 7.0], [5.0, -7.0, 0.0]], [[-6.0, 3.0, 5.0], [-4.0, 5.0, 2.0]], [[7.0, 0.0, -3.0], 
+[1.0, 6.0, 0.0]], [[-1.0, 4.0, 5.0], [-2.0, -2.0, -4.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-7.0, 2.0, -2.0, 4.0, -4.0], [1.0, 1.0, 3.0, 4.0, 2.0], [5.0, -5.0, -3.0, 2.0, -1.0], 
+[-3.0, 6.0, -3.0, -1.0, -7.0]], [[0.0, -4.0, -4.0, -4.0, 2.0], [6.0, 7.0, -7.0, -7.0, 4.0], [0.0, 4.0, -5.0, 1.0, -3.0], [-7.0, 
+2.0, -5.0, -6.0, 5.0]], [[-7.0, -7.0, -4.0, -3.0, -1.0], [1.0, -3.0, -4.0, -1.0, -6.0], [7.0, 2.0, -6.0, 0.0, 0.0], [-3.0, 
+-5.0, -3.0, -6.0, -7.0]]], [[[0.0, 0.0, -4.0, 5.0, 7.0], [-1.0, -3.0, -3.0, 0.0, 0.0], [2.0, -3.0, 5.0, -3.0, 7.0], [0.0, -6.0, 
+-2.0, 6.0, 2.0]], [[5.0, 7.0, 7.0, 3.0, 7.0], [0.0, 5.0, 3.0, 4.0, -7.0], [5.0, -5.0, 7.0, -1.0, -4.0], [-4.0, 1.0, 1.0, -3.0, 
+-4.0]], [[-1.0, 2.0, -1.0, 0.0, -1.0], [0.0, -3.0, 5.0, -7.0, 6.0], [-1.0, -7.0, -3.0, -6.0, -3.0], [-1.0, 6.0, -6.0, 6.0, 
+6.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, -5.0, 3.0, 3.0, 7.0], [-6.0, -7.0, -4.0, 7.0, -7.0], [3.0, 3.0, 0.0, -1.0, 3.0], 
+[3.0, -7.0, -2.0, -4.0, -3.0]], [[-5.0, -4.0, -1.0, -5.0, 4.0], [-1.0, 6.0, -7.0, 6.0, 5.0], [6.0, -5.0, -1.0, 0.0, -4.0], 
+[-7.0, 1.0, -6.0, -3.0, 7.0]], [[6.0, 0.0, -3.0, 1.0, -2.0], [1.0, 4.0, -4.0, 5.0, 6.0], [-1.0, 4.0, -4.0, 5.0, -2.0], [1.0, 
+0.0, 0.0, 1.0, -7.0]]], [[[-5.0, 4.0, -2.0, 2.0, -4.0], [7.0, -5.0, 0.0, 2.0, 7.0], [-3.0, -7.0, 2.0, -1.0, 1.0], [6.0, -1.0, 
+4.0, -4.0, -4.0]], [[2.0, -2.0, 4.0, 7.0, 0.0], [3.0, -5.0, 4.0, -5.0, 6.0], [0.0, -7.0, 0.0, -2.0, -2.0], [-4.0, -2.0, 7.0, 
+-6.0, -3.0]], [[-2.0, -2.0, -6.0, -4.0, -3.0], [5.0, 0.0, 5.0, 2.0, -4.0], [-4.0, -6.0, 1.0, -6.0, -1.0], [2.0, 0.0, 4.0, 6.0, 
+-1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[27.0, -53.0, -39.0, -71.0, -13.0], [36.0, 18.0, -48.0, -119.0, 87.0], [-77.0, 57.0, -62.0, 
+-18.0, -21.0], [-9.0, 19.0, -36.0, 3.0, 131.0]], [[9.0, -11.0, 36.0, -14.0, -2.0], [-14.0, 5.0, -12.0, 60.0, -84.0], [21.0, 
+45.0, 20.0, 36.0, 0.0], [16.0, -49.0, 56.0, -58.0, -72.0]], [[72.0, 48.0, 58.0, -13.0, 22.0], [41.0, 126.0, -13.0, 17.0, 7.0], 
+[-24.0, 34.0, 29.0, 49.0, -62.0], [-46.0, 60.0, 28.0, -76.0, 17.0]], [[-17.0, -31.0, -68.0, 23.0, 5.0], [23.0, 24.0, -69.0, 
+4.0, 64.0], [-27.0, 44.0, -1.0, 37.0, 65.0], [-2.0, -19.0, -4.0, 14.0, 32.0]], [[-11.0, 40.0, 20.0, 70.0, 11.0], [-43.0, -34.0, 
+31.0, 105.0, -51.0], [31.0, -32.0, 71.0, 18.0, 56.0], [41.0, -38.0, 49.0, 35.0, -82.0]]], [[[37.0, -37.0, 15.0, -54.0, 76.0], 
+[43.0, 69.0, -77.0, -37.0, -81.0], [47.0, 52.0, -3.0, 3.0, -44.0], [-75.0, -51.0, -14.0, -111.0, -7.0]], [[38.0, 45.0, 45.0, 
+54.0, 33.0], [-42.0, -11.0, 16.0, 102.0, -62.0], [2.0, 0.0, 98.0, 25.0, 52.0], [50.0, -55.0, 77.0, 24.0, -53.0]], [[-10.0, 
+-9.0, -11.0, -16.0, -7.0], [14.0, 5.0, 0.0, -36.0, 20.0], [2.0, -8.0, -30.0, -13.0, -22.0], [-20.0, 23.0, -29.0, -6.0, 19.0]], 
+[[29.0, 3.0, 25.0, -26.0, -44.0], [-7.0, 9.0, 13.0, 5.0, 25.0], [-61.0, 42.0, -5.0, 25.0, -12.0], [39.0, 21.0, 42.0, -1.0, 
+27.0]], [[-44.0, -38.0, -52.0, 2.0, 38.0], [46.0, 45.0, -69.0, -15.0, -14.0], [68.0, 8.0, -31.0, 13.0, 1.0], [-79.0, -16.0, 
+-53.0, -64.0, -33.0]]], [[[-30.0, 16.0, -22.0, 40.0, 8.0], [-6.0, -21.0, 17.0, 9.0, 16.0], [26.0, -50.0, 7.0, -17.0, 21.0], 
+[-7.0, 10.0, -27.0, 38.0, -13.0]], [[-20.0, -98.0, -29.0, -97.0, -66.0], [24.0, 4.0, -64.0, -48.0, 2.0], [-38.0, 117.0, -92.0, 
+38.0, -20.0], [9.0, -26.0, 14.0, -79.0, 14.0]], [[47.0, 26.0, -18.0, 35.0, 81.0], [30.0, 63.0, -47.0, -17.0, 40.0], [-11.0, 
+-6.0, 53.0, -2.0, 25.0], [-40.0, -2.0, -20.0, 17.0, 64.0]], [[-48.0, -52.0, -69.0, 1.0, -5.0], [-2.0, -55.0, -32.0, -37.0, 
+29.0], [4.0, 2.0, -34.0, -22.0, 49.0], [9.0, -38.0, -36.0, 39.0, 21.0]], [[3.0, -27.0, 34.0, -34.0, -79.0], [-38.0, -35.0, 
+11.0, 66.0, -41.0], [-47.0, 82.0, -5.0, 55.0, 16.0], [85.0, -37.0, 95.0, -24.0, -50.0]]], [[[-82.0, -122.0, -107.0, -47.0, 
+-23.0], [34.0, -24.0, -103.0, -56.0, 15.0], [22.0, 74.0, -95.0, 15.0, 40.0], [-26.0, -62.0, -47.0, -45.0, -2.0]], [[-105.0, 
+-72.0, -83.0, 15.0, -43.0], [-25.0, -103.0, -20.0, 12.0, -7.0], [39.0, -1.0, -50.0, -7.0, 75.0], [33.0, -64.0, -22.0, 36.0, 
+-57.0]], [[30.0, -20.0, 29.0, -56.0, 30.0], [21.0, 31.0, -22.0, -44.0, -53.0], [20.0, 25.0, -18.0, -14.0, -57.0], [-40.0, 
+-14.0, -11.0, -69.0, 6.0]], [[2.0, 77.0, 36.0, 60.0, 24.0], [3.0, 43.0, 48.0, 55.0, -10.0], [46.0, -74.0, 44.0, 5.0, -24.0], 
+[-36.0, 57.0, -8.0, -1.0, -50.0]], [[-34.0, -75.0, -36.0, -51.0, -17.0], [30.0, 20.0, -71.0, -17.0, -26.0], [20.0, 75.0, -59.0, 
+34.0, -5.0], [-28.0, -37.0, -6.0, -83.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[-67.0, -4.0, -59.0, -110.0, -14.0], [18.0, 
+111.0, -17.0, 19.0, 5.0], [16.0, -36.0, 1.0, -16.0, -38.0], [-53.0, 61.0, -57.0, 63.0, 100.0]], [[60.0, 18.0, 38.0, 44.0, 
+-2.0], [-27.0, 13.0, -5.0, -45.0, 32.0], [6.0, 64.0, -21.0, 52.0, -1.0], [-20.0, 10.0, 0.0, -16.0, -24.0]], [[-30.0, -53.0, 
+77.0, 6.0, 84.0], [-65.0, 7.0, -30.0, -31.0, 1.0], [87.0, -30.0, 6.0, -11.0, -21.0], [-113.0, -5.0, -49.0, -72.0, 105.0]], 
+[[-77.0, 8.0, 22.0, -24.0, 52.0], [-40.0, -18.0, -85.0, 63.0, -3.0], [53.0, 3.0, 21.0, 13.0, 26.0], [20.0, -17.0, -80.0, -60.0, 
+58.0]], [[29.0, 32.0, 48.0, 81.0, 1.0], [-12.0, -99.0, 16.0, -26.0, -15.0], [-21.0, 38.0, 14.0, 15.0, 49.0], [70.0, -41.0, 
+37.0, -48.0, -68.0]]], [[[12.0, -12.0, -1.0, 8.0, -16.0], [39.0, 78.0, -31.0, -11.0, 156.0], [29.0, -59.0, -35.0, 35.0, -71.0], 
+[-99.0, 36.0, 7.0, -41.0, 10.0]], [[15.0, 46.0, 59.0, 75.0, -9.0], [-5.0, -73.0, 27.0, -69.0, 13.0], [-14.0, 25.0, 17.0, 20.0, 
+36.0], [35.0, -13.0, 34.0, -51.0, -32.0]], [[-5.0, -18.0, -21.0, -23.0, 1.0], [7.0, 21.0, -3.0, 21.0, -3.0], [2.0, -17.0, -5.0, 
+-12.0, -14.0], [-13.0, 3.0, -4.0, 17.0, 8.0]], [[0.0, 4.0, 17.0, -28.0, 16.0], [-45.0, 32.0, 9.0, -39.0, -60.0], [15.0, 51.0, 
+5.0, 5.0, 9.0], [-25.0, 24.0, -39.0, 33.0, 58.0]], [[-15.0, -32.0, 5.0, 11.0, 38.0], [-3.0, 0.0, -83.0, 84.0, 79.0], [46.0, 
+-37.0, -17.0, 20.0, -22.0], [-21.0, -29.0, -28.0, -73.0, -11.0]]], [[[-11.0, -4.0, -7.0, 17.0, 2.0], [15.0, -54.0, 1.0, 34.0, 
+-13.0], [-14.0, -23.0, 11.0, -20.0, 18.0], [47.0, -33.0, 22.0, -17.0, -37.0]], [[28.0, 3.0, -22.0, -70.0, 6.0], [-51.0, 134.0, 
+-56.0, 13.0, 1.0], [32.0, 95.0, -36.0, 62.0, -27.0], [-56.0, 57.0, -90.0, 61.0, 57.0]], [[-96.0, -5.0, 20.0, -2.0, 25.0], 
+[26.0, -34.0, -31.0, 19.0, 61.0], [38.0, -107.0, 29.0, -30.0, -8.0], [-22.0, -11.0, -10.0, -83.0, 56.0]], [[-21.0, 26.0, -51.0, 
+-30.0, -32.0], [33.0, 12.0, -22.0, 54.0, 15.0], [-26.0, 0.0, 0.0, 8.0, 7.0], [57.0, 5.0, -7.0, 25.0, -28.0]], [[68.0, 39.0, 
+34.0, 5.0, 0.0], [-74.0, 39.0, 6.0, -66.0, -65.0], [-2.0, 152.0, -14.0, 62.0, 29.0], [4.0, 31.0, -43.0, 49.0, 10.0]]], [[[-8.0, 
+10.0, -48.0, -53.0, 0.0], [-8.0, 78.0, -101.0, 102.0, 54.0], [22.0, 43.0, -29.0, 58.0, -15.0], [14.0, 16.0, -75.0, 10.0, 
+-3.0]], [[34.0, 39.0, -45.0, 2.0, -33.0], [8.0, -13.0, -33.0, 71.0, -11.0], [-43.0, 76.0, -13.0, 41.0, 34.0], [109.0, -17.0, 
+-5.0, 32.0, -92.0]], [[29.0, -12.0, -20.0, -9.0, -30.0], [35.0, 75.0, 13.0, -28.0, 81.0], [-1.0, -32.0, -29.0, 13.0, -56.0], 
+[-74.0, 39.0, 21.0, 18.0, 3.0]], [[3.0, -43.0, 52.0, 62.0, 51.0], [-20.0, -96.0, 8.0, 6.0, -24.0], [21.0, -40.0, 14.0, -35.0, 
+16.0], [0.0, -62.0, 32.0, -71.0, -22.0]], [[22.0, -7.0, -2.0, -20.0, 19.0], [-33.0, 71.0, -72.0, 40.0, 47.0], [38.0, 49.0, 
+-32.0, 56.0, -23.0], [-38.0, 17.0, -60.0, -7.0, 14.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_array_rank2(self):
-      arg0=-0.918302739699
-      arg1=numpy.array([[0.19183086796477156, 0.41569819970182253, -0.57007179868513158, 0.18371653862222859, 
--0.95803703880242908], [-0.99708943520039761, -0.33564912838654082, 0.22798896799780199, -0.32560020734492867, 
--0.83553942115001578], [0.90329116559065703, -0.4744523361429227, -0.48030437204982679, -0.25285363526704185, 
-0.4839054158389946], [-0.75326661018214147, -0.89189805199917815, -0.29494941406721664, 0.33826278929980447, 
-0.52219823679588995]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[0.19183086796477156, 0.41569819970182253, -0.57007179868513158, 0.18371653862222859, 
--0.91830273969888498], [-0.91830273969888498, -0.33564912838654082, 0.22798896799780199, -0.32560020734492867, 
--0.83553942115001578], [0.90329116559065703, -0.4744523361429227, -0.48030437204982679, -0.25285363526704185, 
-0.4839054158389946], [-0.75326661018214147, -0.89189805199917815, -0.29494941406721664, 0.33826278929980447, 
-0.52219823679588995]])
+   def test_generalTensorProduct_array_rank3_float_rank0_offset0(self):
+      arg0=numpy.array([[[-4.0, -1.0], [-5.0, 6.0]], [[6.0, 4.0], [-3.0, -2.0]], [[4.0, -2.0], [-2.0, -6.0]], [[-5.0, -6.0], 
+[0.0, 2.0]], [[-5.0, -1.0], [-6.0, 2.0]], [[6.0, -7.0], [3.0, -7.0]]])
+      arg1=2.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-8.0, -2.0], [-10.0, 12.0]], [[12.0, 8.0], [-6.0, -4.0]], [[8.0, -4.0], [-4.0, -12.0]], [[-10.0, 
+-12.0], [0.0, 4.0]], [[-10.0, -2.0], [-12.0, 4.0]], [[12.0, -14.0], [6.0, -14.0]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_constData_rank2(self):
-      arg0=-0.711360717248
-      arg1=Data(numpy.array([[-0.49649726218321621, -0.1862706537495149, 0.6559357060844726, -0.60255638663804834, 
--0.72898391055117684], [0.877046256493895, -0.62092354207162237, -0.42516414792107171, -0.06686623727516694, 
-0.93735063523149598], [0.64862166841681268, 0.45648573520660918, -0.63173946887266208, 0.070770417261089902, 
-0.27864121106526873], [-0.25951227165524937, 0.85373113390321809, 0.5672699499488485, 0.22967921637760402, 
-0.88510133022334969]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[-0.49649726218321621, -0.1862706537495149, 0.6559357060844726, -0.60255638663804834, 
--0.71136071724766237], [0.877046256493895, -0.62092354207162237, -0.42516414792107171, -0.06686623727516694, 
-0.93735063523149598], [0.64862166841681268, 0.45648573520660918, -0.63173946887266208, 0.070770417261089902, 
-0.27864121106526873], [-0.25951227165524937, 0.85373113390321809, 0.5672699499488485, 0.22967921637760402, 
-0.88510133022334969]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_expandedData_rank2(self):
-      arg0=0.959635515709
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.0064259026939066377, -0.7701474037173317, -0.19596310110827386, -0.73984521228212596, 
--0.61313716616198133], [0.43189572076819838, 0.088536215133996565, 0.067634491583320466, -0.70571296121285232, 
--0.21462215163400677], [-0.29878468443140771, 0.49093472354971013, 0.86357875479621882, 0.021213198562558766, 
--0.68952176426127321], [-0.64172570311955179, -0.10403523776207346, -0.1560226988237976, 0.18544285896364587, 
--0.99033629867964823]])+(1.-msk_arg1)*numpy.array([[0.59197813276731015, 0.69989892013318467, 0.37778322838437939, 
--0.96988982584154027, -0.12556098215489531], [-0.57102119315921684, -0.97261687381790707, 0.59394598916500385, 
--0.95926160849480113, -0.74824572871782435], [0.3774569754088497, -0.71634815703797106, -0.64965181170462061, 
--0.88835061435822782, 0.049571630549325674], [0.056229799936159397, 0.69426319270729175, 0.32265901320206658, 
--0.26876155184504102, 0.5465577920078144]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646], [0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646], [0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646], [0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646]])+(1.-msk_ref)*numpy.array([[0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646, 0.95963551570949646], [0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646], [0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646], [0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 0.95963551570949646, 
-0.95963551570949646]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_array_rank3(self):
-      arg0=0.417103350623
-      arg1=numpy.array([[[-0.45176533427754739, -0.55230637452486797], [-0.2772690226072374, -0.43884388551060138]], 
-[[0.43650997405556069, -0.91050440106967101], [-0.0097638249506593056, -0.99719694387315783]], [[-0.88346341044578236, 
--0.42616345838712633], [0.47323800588958997, 0.31718901666579002]], [[0.72726350287088914, 0.18527925932004718], 
-[0.95182455621773032, 0.5402040160782311]], [[-0.60062553156664, 0.18455913185890904], [-0.041559661168358408, 
-0.65568567006769984]], [[0.46551889127092827, -0.88399518601736693], [-0.45129696041660194, -0.97227033198060986]]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[0.41710335062270154, 0.41710335062270154], [0.41710335062270154, 0.41710335062270154]], 
-[[0.43650997405556069, 0.41710335062270154], [0.41710335062270154, 0.41710335062270154]], [[0.41710335062270154, 
-0.41710335062270154], [0.47323800588958997, 0.41710335062270154]], [[0.72726350287088914, 0.41710335062270154], 
-[0.95182455621773032, 0.5402040160782311]], [[0.41710335062270154, 0.41710335062270154], [0.41710335062270154, 
-0.65568567006769984]], [[0.46551889127092827, 0.41710335062270154], [0.41710335062270154, 0.41710335062270154]]])
+   def test_generalTensorProduct_array_rank3_array_rank0_offset0(self):
+      arg0=numpy.array([[[5.0, -2.0], [-7.0, 1.0]], [[-4.0, -5.0], [0.0, 6.0]], [[2.0, -4.0], [-2.0, 7.0]], [[-7.0, -7.0], 
+[6.0, -7.0]], [[1.0, 3.0], [6.0, 0.0]], [[6.0, -7.0], [1.0, -2.0]]])
+      arg1=numpy.array(4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[20.0, -8.0], [-28.0, 4.0]], [[-16.0, -20.0], [0.0, 24.0]], [[8.0, -16.0], [-8.0, 28.0]], [[-28.0, 
+-28.0], [24.0, -28.0]], [[4.0, 12.0], [24.0, 0.0]], [[24.0, -28.0], [4.0, -8.0]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_constData_rank3(self):
-      arg0=-0.143403966016
-      arg1=Data(numpy.array([[[0.95668360633256144, -0.1800322431671213], [-0.42783838761912918, -0.89612594522855216]], 
-[[0.60799134259365384, 0.37935166549606292], [-0.16348477876382117, 0.055255205348395009]], [[-0.84148244802025407, 
--0.08342603479235744], [-0.073128933987135269, 0.91858564423034572]], [[-0.44722942409971833, 0.12566700748073134], 
-[-0.84487161060035754, 0.69960515111291777]], [[0.28894841908227131, -0.28216896408608538], [-0.4241999876693332, 
-0.41787923950246331]], [[-0.74860509777465034, 0.95471157706396692], [0.3975080494679184, 
--0.47708712009131093]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.95668360633256144, -0.14340396601550798], [-0.14340396601550798, -0.14340396601550798]], 
-[[0.60799134259365384, 0.37935166549606292], [-0.14340396601550798, 0.055255205348395009]], [[-0.14340396601550798, 
--0.08342603479235744], [-0.073128933987135269, 0.91858564423034572]], [[-0.14340396601550798, 0.12566700748073134], 
-[-0.14340396601550798, 0.69960515111291777]], [[0.28894841908227131, -0.14340396601550798], [-0.14340396601550798, 
-0.41787923950246331]], [[-0.14340396601550798, 0.95471157706396692], [0.3975080494679184, 
--0.14340396601550798]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_array_rank1_offset1(self):
+      arg0=numpy.array([[[[5.0, -2.0, 7.0], [0.0, -3.0, 6.0]], [[4.0, 4.0, -5.0], [0.0, -1.0, -2.0]]], [[[-4.0, 5.0, 0.0], 
+[5.0, 6.0, -6.0]], [[4.0, -5.0, 0.0], [5.0, -3.0, 4.0]]], [[[3.0, 0.0, 5.0], [7.0, -4.0, 6.0]], [[0.0, 6.0, 0.0], [-4.0, -3.0, 
+-3.0]]], [[[6.0, 2.0, 0.0], [-3.0, -6.0, -2.0]], [[0.0, 1.0, 0.0], [-2.0, 4.0, -5.0]]], [[[5.0, 3.0, 0.0], [2.0, -3.0, -5.0]], 
+[[6.0, 1.0, 3.0], [-1.0, 2.0, 0.0]]], [[[1.0, -4.0, 1.0], [6.0, -6.0, -3.0]], [[0.0, 0.0, 7.0], [2.0, 3.0, -6.0]]]])
+      arg1=numpy.array([6.0, -4.0, -2.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[24.0, 0.0], [18.0, 8.0]], [[-44.0, 18.0], [44.0, 34.0]], [[8.0, 46.0], [-24.0, -6.0]], [[28.0, 10.0], 
+[-4.0, -18.0]], [[18.0, 34.0], [26.0, -14.0]], [[20.0, 66.0], [-14.0, 12.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_expandedData_rank3(self):
-      arg0=-0.801969488354
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.9889605718250738, -0.37340300276544558], [-0.23838119100250488, 0.20477150811741951]], 
-[[-0.20467295181293843, 0.35301722647248601], [-0.095474828781975996, -0.8510749109672644]], [[-0.70425456344214243, 
--0.46755265678910085], [0.66251795702833483, -0.92448552384625948]], [[-0.66717945104318677, -0.78744474882359006], 
-[-0.16257558572897457, -0.26356489046284248]], [[-0.27934849406098761, 0.93892978662484139], [-0.18468624033742786, 
--0.70668348468539377]], [[-0.41995260750527241, -0.046679843759030781], [0.13620169917808034, 
-0.46624408802032424]]])+(1.-msk_arg1)*numpy.array([[[-0.56084457456829484, 0.032990993182650197], [0.42149270935344574, 
-0.1750548418363671]], [[-0.78410663312115148, -0.74664526632471984], [0.88029830669181575, -0.60878924835930359]], 
-[[0.054733122499459386, 0.19985918328880037], [0.60155025489305403, 0.19928445576334952]], [[-0.086860661257179173, 
--0.14114143266705215], [0.57480201913819329, 0.38294532940281845]], [[0.39095132070017913, 0.096587125583033284], 
-[0.50661117336330563, -0.043716480204347041]], [[0.74636288223324332, 0.82758235657560153], [-0.88560450972740812, 
--0.97248750693241459]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.80196948835439708, -0.37340300276544558], [-0.23838119100250488, 0.20477150811741951]], 
-[[-0.20467295181293843, 0.35301722647248601], [-0.095474828781975996, -0.80196948835439708]], [[-0.70425456344214243, 
--0.46755265678910085], [0.66251795702833483, -0.80196948835439708]], [[-0.66717945104318677, -0.78744474882359006], 
-[-0.16257558572897457, -0.26356489046284248]], [[-0.27934849406098761, 0.93892978662484139], [-0.18468624033742786, 
--0.70668348468539377]], [[-0.41995260750527241, -0.046679843759030781], [0.13620169917808034, 
-0.46624408802032424]]])+(1.-msk_ref)*numpy.array([[[-0.56084457456829484, 0.032990993182650197], [0.42149270935344574, 
-0.1750548418363671]], [[-0.78410663312115148, -0.74664526632471984], [0.88029830669181575, -0.60878924835930359]], 
-[[0.054733122499459386, 0.19985918328880037], [0.60155025489305403, 0.19928445576334952]], [[-0.086860661257179173, 
--0.14114143266705215], [0.57480201913819329, 0.38294532940281845]], [[0.39095132070017913, 0.096587125583033284], 
-[0.50661117336330563, -0.043716480204347041]], [[0.74636288223324332, 0.82758235657560153], [-0.80196948835439708, 
--0.80196948835439708]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_array_rank1_offset0(self):
+      arg0=numpy.array([[[2.0, -5.0], [-1.0, -2.0]], [[-1.0, 7.0], [-3.0, -4.0]], [[-2.0, -7.0], [0.0, 6.0]], [[-1.0, 3.0], 
+[5.0, 5.0]], [[6.0, -3.0], [3.0, 0.0]], [[-7.0, 0.0], [-4.0, 0.0]]])
+      arg1=numpy.array([1.0, 4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[2.0, 8.0], [-5.0, -20.0]], [[-1.0, -4.0], [-2.0, -8.0]]], [[[-1.0, -4.0], [7.0, 28.0]], [[-3.0, 
+-12.0], [-4.0, -16.0]]], [[[-2.0, -8.0], [-7.0, -28.0]], [[0.0, 0.0], [6.0, 24.0]]], [[[-1.0, -4.0], [3.0, 12.0]], [[5.0, 
+20.0], [5.0, 20.0]]], [[[6.0, 24.0], [-3.0, -12.0]], [[3.0, 12.0], [0.0, 0.0]]], [[[-7.0, -28.0], [0.0, 0.0]], [[-4.0, -16.0], 
+[0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_array_rank4(self):
-      arg0=0.270905406087
-      arg1=numpy.array([[[[-0.95360288151815653, -0.64078885487275894, 0.96879725589600185, 0.37349635624215671], 
-[-0.23784772076621397, 0.65332164004684334, -0.2721768925317285, 0.22325285780446613], [0.065576671186904578, 
--0.0042823363828001781, 0.15081972618097739, -0.96500711704114939]], [[0.52806648530122047, -0.25468561493618047, 
-0.55916471457602035, 0.48281251134172609], [0.55407748333919904, -0.11022873429516356, -0.43913854875915792, 
--0.12104124446879827], [-0.17051966474671065, 0.390161734069155, -0.40998699913604164, -0.63105941814244515]]], 
-[[[-0.94813299631664916, 0.33923647049967887, -0.6464524838010095, 0.099997153482365375], [-0.19694004792045505, 
--0.21476580508277232, 0.50450751987287878, 0.0044718532670784406], [-0.35156116891903766, 0.93361770074048556, 
-0.64503353549824793, 0.31429197499208672]], [[0.67485265775424352, -0.0069832167465539996, -0.27581854606767786, 
--0.049974746554111604], [0.88520110268538477, 0.59559353742053656, -0.88876809828391945, 0.14398781431221419], 
-[0.49156586086617393, 0.34186756327969836, -0.39488984681038053, -0.49978462106847665]]], [[[0.4711536016262412, 
--0.84357230970236885, -0.60522103581380593, 0.74011510067186914], [0.058929816244633448, -0.51830971900097267, 
--0.92512610450551414, 0.79105987068184391], [-0.08685194216427039, 0.9276912197047904, 0.75649609887119307, 
--0.2819853018873526]], [[-0.23960953208469071, -0.026232616293173194, -0.60625185640538937, 0.41226223746307045], 
-[-0.48188248446866555, -0.57075257849297079, -0.98430513472426018, 0.0026142817361640702], [-0.25427236937723752, 
--0.83104284375176407, -0.76917008485860205, 0.63675334398029215]]]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[[0.27090540608696001, 0.27090540608696001, 0.96879725589600185, 0.37349635624215671], 
-[0.27090540608696001, 0.65332164004684334, 0.27090540608696001, 0.27090540608696001], [0.27090540608696001, 
-0.27090540608696001, 0.27090540608696001, 0.27090540608696001]], [[0.52806648530122047, 0.27090540608696001, 
-0.55916471457602035, 0.48281251134172609], [0.55407748333919904, 0.27090540608696001, 0.27090540608696001, 
-0.27090540608696001], [0.27090540608696001, 0.390161734069155, 0.27090540608696001, 0.27090540608696001]]], 
-[[[0.27090540608696001, 0.33923647049967887, 0.27090540608696001, 0.27090540608696001], [0.27090540608696001, 
-0.27090540608696001, 0.50450751987287878, 0.27090540608696001], [0.27090540608696001, 0.93361770074048556, 0.64503353549824793, 
-0.31429197499208672]], [[0.67485265775424352, 0.27090540608696001, 0.27090540608696001, 0.27090540608696001], 
-[0.88520110268538477, 0.59559353742053656, 0.27090540608696001, 0.27090540608696001], [0.49156586086617393, 
-0.34186756327969836, 0.27090540608696001, 0.27090540608696001]]], [[[0.4711536016262412, 0.27090540608696001, 
-0.27090540608696001, 0.74011510067186914], [0.27090540608696001, 0.27090540608696001, 0.27090540608696001, 
-0.79105987068184391], [0.27090540608696001, 0.9276912197047904, 0.75649609887119307, 0.27090540608696001]], 
-[[0.27090540608696001, 0.27090540608696001, 0.27090540608696001, 0.41226223746307045], [0.27090540608696001, 
-0.27090540608696001, 0.27090540608696001, 0.27090540608696001], [0.27090540608696001, 0.27090540608696001, 0.27090540608696001, 
-0.63675334398029215]]]])
+   def test_generalTensorProduct_array_rank4_array_rank2_offset1(self):
+      arg0=numpy.array([[[[4.0, -3.0, -4.0], [4.0, -2.0, 0.0]], [[-4.0, -3.0, -4.0], [2.0, 0.0, 7.0]]], [[[0.0, -6.0, 2.0], 
+[6.0, -1.0, -7.0]], [[-1.0, -5.0, -2.0], [6.0, -6.0, -4.0]]], [[[2.0, 0.0, 4.0], [-2.0, -3.0, 1.0]], [[0.0, 0.0, -5.0], [7.0, 
+7.0, -6.0]]], [[[7.0, -5.0, 2.0], [-3.0, -3.0, 6.0]], [[6.0, 1.0, -3.0], [-2.0, -2.0, 1.0]]], [[[-6.0, 4.0, 2.0], [-3.0, -6.0, 
+0.0]], [[2.0, -2.0, -7.0], [7.0, 4.0, 4.0]]], [[[6.0, 2.0, 6.0], [4.0, -7.0, 4.0]], [[6.0, 7.0, -2.0], [-1.0, -5.0, 2.0]]]])
+      arg1=numpy.array([[-1.0, -3.0], [-3.0, -6.0], [-3.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[17.0, -18.0], [2.0, 0.0]], [[25.0, 6.0], [-23.0, 36.0]]], [[[12.0, 48.0], [18.0, -54.0]], [[22.0, 
+21.0], [24.0, -6.0]]], [[[-14.0, 18.0], [8.0, 30.0]], [[15.0, -30.0], [-10.0, -99.0]]], [[[2.0, 21.0], [-6.0, 63.0]], [[0.0, 
+-42.0], [5.0, 24.0]]], [[[-12.0, 6.0], [21.0, 45.0]], [[25.0, -36.0], [-31.0, -21.0]]], [[[-30.0, 6.0], [5.0, 54.0]], [[-21.0, 
+-72.0], [10.0, 45.0]]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_constData_rank4(self):
-      arg0=-0.309869238816
-      arg1=Data(numpy.array([[[[-0.82719032260804259, 0.55581165940832689, 0.28993332944093009, -0.86289948135541761], 
-[0.48402181856866533, -0.32199675516574411, 0.12059109046218897, -0.7225649933438465], [-0.83246155788795284, 
-0.81949583430522099, 0.917821601053878, -0.38511162370320817]], [[0.040807935475384971, 0.064255792480005569, 
--0.31189093961899572, -0.84263132870438207], [-0.019662050520152574, 0.44586496426970701, -0.91681580233687932, 
--0.18241240078470145], [-0.5433480154993422, -0.59905565233432823, -0.92180233099065312, 0.86950034082755967]]], 
-[[[0.59960822306615458, 0.13652846774954908, 0.43957232336106244, -0.43425247806437417], [-0.96917998667692262, 
-0.55216812010001926, 0.71335421685640177, 0.58559993798062027], [0.70518632845671458, -0.51213306047690121, 
-0.49991004029291486, -0.88896060694390422]], [[-0.01327086420919299, 0.94285928205783565, 0.36084019612625773, 
-0.75948720217972943], [0.15534832801909948, -0.087517839294278144, -0.82737480559591559, -0.17830159519382138], 
-[-0.53216202742506535, 0.14079322663297011, 0.51872828089506218, -0.87286763824554892]]], [[[0.63517519655793753, 
-0.83248640824649534, -0.96421638668998866, -0.21027115956215714], [-0.65484094298333928, -0.20529300129283179, 
-0.30264230449111329, 0.57118632679487069], [0.94473501747170197, -0.073741122006270921, -0.16445760290671507, 
--0.94122715459958095]], [[-0.47320172714174435, 0.52414108821599092, -0.58822269419300688, 0.65154104107711608], 
-[0.79073955181970002, 0.66222126451513996, 0.50406761329019711, 0.80692979137230991], [-0.44007779482511467, 
-0.83184141637396403, -0.59153030329212752, 0.67780297389993294]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.30986923881604533, 0.55581165940832689, 0.28993332944093009, -0.30986923881604533], 
-[0.48402181856866533, -0.30986923881604533, 0.12059109046218897, -0.30986923881604533], [-0.30986923881604533, 
-0.81949583430522099, 0.917821601053878, -0.30986923881604533]], [[0.040807935475384971, 0.064255792480005569, 
--0.30986923881604533, -0.30986923881604533], [-0.019662050520152574, 0.44586496426970701, -0.30986923881604533, 
--0.18241240078470145], [-0.30986923881604533, -0.30986923881604533, -0.30986923881604533, 0.86950034082755967]]], 
-[[[0.59960822306615458, 0.13652846774954908, 0.43957232336106244, -0.30986923881604533], [-0.30986923881604533, 
-0.55216812010001926, 0.71335421685640177, 0.58559993798062027], [0.70518632845671458, -0.30986923881604533, 
-0.49991004029291486, -0.30986923881604533]], [[-0.01327086420919299, 0.94285928205783565, 0.36084019612625773, 
-0.75948720217972943], [0.15534832801909948, -0.087517839294278144, -0.30986923881604533, -0.17830159519382138], 
-[-0.30986923881604533, 0.14079322663297011, 0.51872828089506218, -0.30986923881604533]]], [[[0.63517519655793753, 
-0.83248640824649534, -0.30986923881604533, -0.21027115956215714], [-0.30986923881604533, -0.20529300129283179, 
-0.30264230449111329, 0.57118632679487069], [0.94473501747170197, -0.073741122006270921, -0.16445760290671507, 
--0.30986923881604533]], [[-0.30986923881604533, 0.52414108821599092, -0.30986923881604533, 0.65154104107711608], 
-[0.79073955181970002, 0.66222126451513996, 0.50406761329019711, 0.80692979137230991], [-0.30986923881604533, 
-0.83184141637396403, -0.30986923881604533, 0.67780297389993294]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_constData_rank0_offset0(self):
+      arg0=numpy.array([[[-5.0, 4.0], [-3.0, -4.0]], [[4.0, 0.0], [2.0, 7.0]], [[1.0, 1.0], [3.0, -6.0]], [[4.0, 2.0], [2.0, 
+-2.0]], [[6.0, -3.0], [0.0, 0.0]], [[0.0, -6.0], [-1.0, -4.0]]])
+      arg1=Data(2.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-10.0, 8.0], [-6.0, -8.0]], [[8.0, 0.0], [4.0, 14.0]], [[2.0, 2.0], [6.0, -12.0]], [[8.0, 4.0], 
+[4.0, -4.0]], [[12.0, -6.0], [0.0, 0.0]], [[0.0, -12.0], [-2.0, -8.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_float_rank0_expandedData_rank4(self):
-      arg0=-0.246649004468
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.59710738457463131, 0.081437393836007343, -0.56546756227867667, 0.71443872053420754], 
-[-0.57457972849842576, 0.99714958865565517, -0.39999443875374929, -0.68094907708339836], [0.34526888607366546, 
--0.29241451792195905, 0.96907276723625935, -0.2966708791455217]], [[-0.76911685555342713, 0.21001220920747699, 
-0.7216150128564951, 0.57784624578115795], [0.59505769173662104, -0.11354294660473241, -0.66879018252488964, 
-0.78630853516684396], [0.3616307103083698, -0.79300540303062417, 0.74450579924491178, -0.054555970573139767]]], 
-[[[0.96283128026153286, -0.87620458144557722, 0.72154059555131611, 0.0082452389660727654], [-0.046764826200485832, 
--0.53421181085747382, -0.19205291797994817, 0.15732232154864123], [-0.64350186911984397, 0.86535072837345894, 
--0.089737099310619683, -0.68915912536904322]], [[-0.50600653327166056, 0.87271444603618842, 0.42777020885243378, 
-0.63522958101972282], [-0.62649776548253322, 0.4567028350414013, 0.97523051451214271, 0.81579778175168283], 
-[0.20125503319935079, -0.46379240558699131, -0.31245213377702896, 0.2704000376928466]]], [[[-0.52356266147432984, 
-0.17857675536580886, 0.3664267659935363, -0.88731256350709842], [-0.37314717051082713, 0.54211837452172662, 
--0.72485428615154301, -0.60715112600284726], [-0.99925424756131687, -0.16075147245083277, -0.0025301737170317917, 
-0.14075502002330875]], [[-0.72510015564658348, -0.070820851711875132, -0.05397335487409638, 0.31296807923888648], 
-[0.66626010161325921, -0.7189380142049282, -0.62806927909760879, 0.23068004843743117], [-0.70574206651459992, 
--0.10745983979108953, -0.16531954799426085, -0.43129597709381007]]]])+(1.-msk_arg1)*numpy.array([[[[0.87166570761445938, 
-0.7318590182568474, -0.80737962090297621, 0.53766528032150029], [-0.29770111995100423, -0.041729104475766832, 
-0.95558043277951188, 0.87068423363682523], [0.26116387820103548, 0.76929801350975846, -0.34600777484521661, 
-0.20956877787614303]], [[-0.27623529169912397, 0.74714116143240372, 0.67467631548270068, 0.80485965465015274], 
-[-0.80196951310483411, 0.54024415368197976, -0.45263989703849994, -0.77389469864887639], [-0.11922685978923897, 
-0.39196315394661263, 0.17728969359335789, -0.38647232675584942]]], [[[0.96589541331221995, -0.80607305323690448, 
--0.7174848711693449, 0.37455766619796327], [0.91224675515514875, -0.8324612503371378, -0.95542285313177433, 
--0.11861636937415732], [0.47029221874868399, -0.40274109861783103, 0.9175933763798334, -0.43517134542523084]], 
-[[-0.47437396776048946, -0.62388433551176026, -0.93178844269694805, 0.16109167169456717], [0.41540675061264087, 
-0.56983043087032437, 0.79225905558275778, -0.70471106926370264], [0.57876248922509843, -0.92178848481156983, 
--0.20102218593254717, -0.51116400848044763]]], [[[0.43214438484520512, -0.44676797608176422, -0.96373941940887264, 
--0.97610643146800369], [0.1482565940064382, -0.15856386047336768, -0.97338314492097022, -0.77655581838335452], 
-[0.14918854112868329, 0.35190145831475594, 0.76106715747610876, 0.87042812467135966]], [[0.5937340223957881, 
-0.93249676000364778, 0.62934483950694187, -0.79475089188750059], [-0.7844570636858641, 0.063504498696464129, 
-0.80077845206462461, -0.17147808526676922], [0.77647533980748817, -0.41826398787923291, -0.93662968561496873, 
-0.5899829279078268]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.24664900446763838, 0.081437393836007343, -0.24664900446763838, 0.71443872053420754], 
-[-0.24664900446763838, 0.99714958865565517, -0.24664900446763838, -0.24664900446763838], [0.34526888607366546, 
--0.24664900446763838, 0.96907276723625935, -0.24664900446763838]], [[-0.24664900446763838, 0.21001220920747699, 
-0.7216150128564951, 0.57784624578115795], [0.59505769173662104, -0.11354294660473241, -0.24664900446763838, 
-0.78630853516684396], [0.3616307103083698, -0.24664900446763838, 0.74450579924491178, -0.054555970573139767]]], 
-[[[0.96283128026153286, -0.24664900446763838, 0.72154059555131611, 0.0082452389660727654], [-0.046764826200485832, 
--0.24664900446763838, -0.19205291797994817, 0.15732232154864123], [-0.24664900446763838, 0.86535072837345894, 
--0.089737099310619683, -0.24664900446763838]], [[-0.24664900446763838, 0.87271444603618842, 0.42777020885243378, 
-0.63522958101972282], [-0.24664900446763838, 0.4567028350414013, 0.97523051451214271, 0.81579778175168283], 
-[0.20125503319935079, -0.24664900446763838, -0.24664900446763838, 0.2704000376928466]]], [[[-0.24664900446763838, 
-0.17857675536580886, 0.3664267659935363, -0.24664900446763838], [-0.24664900446763838, 0.54211837452172662, 
--0.24664900446763838, -0.24664900446763838], [-0.24664900446763838, -0.16075147245083277, -0.0025301737170317917, 
-0.14075502002330875]], [[-0.24664900446763838, -0.070820851711875132, -0.05397335487409638, 0.31296807923888648], 
-[0.66626010161325921, -0.24664900446763838, -0.24664900446763838, 0.23068004843743117], [-0.24664900446763838, 
--0.10745983979108953, -0.16531954799426085, -0.24664900446763838]]]])+(1.-msk_ref)*numpy.array([[[[0.87166570761445938, 
-0.7318590182568474, -0.24664900446763838, 0.53766528032150029], [-0.24664900446763838, -0.041729104475766832, 
-0.95558043277951188, 0.87068423363682523], [0.26116387820103548, 0.76929801350975846, -0.24664900446763838, 
-0.20956877787614303]], [[-0.24664900446763838, 0.74714116143240372, 0.67467631548270068, 0.80485965465015274], 
-[-0.24664900446763838, 0.54024415368197976, -0.24664900446763838, -0.24664900446763838], [-0.11922685978923897, 
-0.39196315394661263, 0.17728969359335789, -0.24664900446763838]]], [[[0.96589541331221995, -0.24664900446763838, 
--0.24664900446763838, 0.37455766619796327], [0.91224675515514875, -0.24664900446763838, -0.24664900446763838, 
--0.11861636937415732], [0.47029221874868399, -0.24664900446763838, 0.9175933763798334, -0.24664900446763838]], 
-[[-0.24664900446763838, -0.24664900446763838, -0.24664900446763838, 0.16109167169456717], [0.41540675061264087, 
-0.56983043087032437, 0.79225905558275778, -0.24664900446763838], [0.57876248922509843, -0.24664900446763838, 
--0.20102218593254717, -0.24664900446763838]]], [[[0.43214438484520512, -0.24664900446763838, -0.24664900446763838, 
--0.24664900446763838], [0.1482565940064382, -0.15856386047336768, -0.24664900446763838, -0.24664900446763838], 
-[0.14918854112868329, 0.35190145831475594, 0.76106715747610876, 0.87042812467135966]], [[0.5937340223957881, 
-0.93249676000364778, 0.62934483950694187, -0.24664900446763838], [-0.24664900446763838, 0.063504498696464129, 
-0.80077845206462461, -0.17147808526676922], [0.77647533980748817, -0.24664900446763838, -0.24664900446763838, 
-0.5899829279078268]]]])
+   def test_generalTensorProduct_array_rank4_constData_rank1_offset1(self):
+      arg0=numpy.array([[[[-2.0, -3.0, -1.0], [7.0, -4.0, -1.0]], [[-4.0, 0.0, 6.0], [-3.0, 1.0, 4.0]]], [[[7.0, -2.0, -4.0], 
+[1.0, 0.0, -3.0]], [[-6.0, -2.0, -2.0], [0.0, 6.0, 2.0]]], [[[-6.0, 7.0, -4.0], [3.0, 5.0, 5.0]], [[3.0, 5.0, -4.0], [-1.0, 
+0.0, 7.0]]], [[[1.0, -1.0, 4.0], [0.0, -3.0, 0.0]], [[3.0, -4.0, 0.0], [-3.0, 7.0, -1.0]]], [[[-4.0, -4.0, 2.0], [0.0, -4.0, 
+-1.0]], [[4.0, 6.0, -5.0], [0.0, 2.0, -7.0]]], [[[-7.0, 3.0, 5.0], [-4.0, -7.0, -5.0]], [[-1.0, -4.0, 0.0], [-1.0, 1.0, 
+-6.0]]]])
+      arg1=Data(numpy.array([-5.0, 0.0, -3.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[13.0, -32.0], [2.0, 3.0]], [[-23.0, 4.0], [36.0, -6.0]], [[42.0, -30.0], [-3.0, -16.0]], [[-17.0, 
+0.0], [-15.0, 18.0]], [[14.0, 3.0], [-5.0, 21.0]], [[20.0, 35.0], [5.0, 23.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_float_rank0(self):
-      arg0=numpy.array(-0.532218032885)
-      arg1=-0.367677151081
-      res=maximum(arg0,arg1)
-      ref=numpy.array(-0.367677151081)
-      if isinstance(res,numpy.ndarray):
-          self.assertEqual(res.shape,(),"wrong shape of result.")
-      else:
-          self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_float_rank0(self):
-      arg0=numpy.array([0.53113072385818016, -0.91297296718973731])
-      arg1=0.192754148616
-      res=maximum(arg0,arg1)
-      ref=numpy.array([0.53113072385818016, 0.19275414861572537])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_float_rank0(self):
-      arg0=numpy.array([[-0.83224495764259587, 0.67546682831068661, 0.79825688470140466, -0.51659524388186018, 
--0.57330212318607887], [0.43871883762893171, -0.51383061657367102, 0.046022377444661977, -0.97181480474218085, 
--0.064914882677348462], [0.54107834535109811, 0.52030930437850165, -0.46403217495914517, -0.40333646983529814, 
-0.14402492053142035], [-0.06466356036920895, -0.72560803049513556, -0.71248570650624976, 0.29239946340327383, 
-0.23126053673271052]])
-      arg1=0.436559137295
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[0.43655913729458451, 0.67546682831068661, 0.79825688470140466, 0.43655913729458451, 
-0.43655913729458451], [0.43871883762893171, 0.43655913729458451, 0.43655913729458451, 0.43655913729458451, 
-0.43655913729458451], [0.54107834535109811, 0.52030930437850165, 0.43655913729458451, 0.43655913729458451, 
-0.43655913729458451], [0.43655913729458451, 0.43655913729458451, 0.43655913729458451, 0.43655913729458451, 
-0.43655913729458451]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_constData_rank1_offset0(self):
+      arg0=numpy.array([[[-4.0, 6.0], [-6.0, -1.0]], [[-1.0, 4.0], [-3.0, 3.0]], [[-6.0, -6.0], [-3.0, 4.0]], [[-2.0, 4.0], 
+[-2.0, 0.0]], [[5.0, 5.0], [3.0, 7.0]], [[3.0, 0.0], [0.0, 0.0]]])
+      arg1=Data(numpy.array([-2.0, -4.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[8.0, 16.0], [-12.0, -24.0]], [[12.0, 24.0], [2.0, 4.0]]], [[[2.0, 4.0], [-8.0, -16.0]], [[6.0, 
+12.0], [-6.0, -12.0]]], [[[12.0, 24.0], [12.0, 24.0]], [[6.0, 12.0], [-8.0, -16.0]]], [[[4.0, 8.0], [-8.0, -16.0]], [[4.0, 
+8.0], [0.0, 0.0]]], [[[-10.0, -20.0], [-10.0, -20.0]], [[-6.0, -12.0], [-14.0, -28.0]]], [[[-6.0, -12.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_float_rank0(self):
-      arg0=numpy.array([[[0.14602536321923187, 0.3890404886953438], [0.96763189489480217, 0.31878780255153472]], 
-[[-0.80681415429363024, 0.81150006186927182], [0.085441963781010877, 0.28294027876384797]], [[-0.90676678758245544, 
-0.035304671448607161], [-0.24178422686744017, -0.020920873167083132]], [[-0.85375981355743735, -0.44307345060683789], 
-[0.0374669536660035, -0.0058344936858338858]], [[0.31755388514905247, 0.33655876978208488], [-0.60668072237969684, 
--0.046438959267768309]], [[-0.74363599042485151, -0.8956664888069259], [-0.53199684552981585, 0.75892708027917499]]])
-      arg1=-0.149468998389
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[0.14602536321923187, 0.3890404886953438], [0.96763189489480217, 0.31878780255153472]], 
-[[-0.1494689983892894, 0.81150006186927182], [0.085441963781010877, 0.28294027876384797]], [[-0.1494689983892894, 
-0.035304671448607161], [-0.1494689983892894, -0.020920873167083132]], [[-0.1494689983892894, -0.1494689983892894], 
-[0.0374669536660035, -0.0058344936858338858]], [[0.31755388514905247, 0.33655876978208488], [-0.1494689983892894, 
--0.046438959267768309]], [[-0.1494689983892894, -0.1494689983892894], [-0.1494689983892894, 0.75892708027917499]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_constData_rank2_offset1(self):
+      arg0=numpy.array([[[[3.0, 3.0, 0.0], [4.0, 0.0, 3.0]], [[5.0, 1.0, -4.0], [-2.0, -5.0, 7.0]]], [[[-7.0, -6.0, 1.0], 
+[-6.0, -5.0, -4.0]], [[2.0, 0.0, -2.0], [6.0, -7.0, 6.0]]], [[[-2.0, 3.0, 0.0], [0.0, -6.0, -1.0]], [[-1.0, -6.0, -4.0], [-4.0, 
+0.0, -2.0]]], [[[4.0, 0.0, 6.0], [-5.0, -1.0, 5.0]], [[7.0, -4.0, -2.0], [6.0, 5.0, -3.0]]], [[[1.0, -1.0, 3.0], [3.0, -1.0, 
+3.0]], [[-6.0, 0.0, -3.0], [-5.0, -3.0, -6.0]]], [[[2.0, 0.0, -3.0], [2.0, -3.0, 2.0]], [[0.0, 7.0, 7.0], [0.0, -1.0, -5.0]]]])
+      arg1=Data(numpy.array([[-1.0, 4.0], [0.0, 3.0], [-1.0, 5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-3.0, 21.0], [-7.0, 31.0]], [[-1.0, 3.0], [-5.0, 12.0]]], [[[6.0, -41.0], [10.0, -59.0]], [[0.0, 
+-2.0], [-12.0, 33.0]]], [[[2.0, 1.0], [1.0, -23.0]], [[5.0, -42.0], [6.0, -26.0]]], [[[-10.0, 46.0], [0.0, 2.0]], [[-5.0, 6.0], 
+[-3.0, 24.0]]], [[[-4.0, 16.0], [-6.0, 24.0]], [[9.0, -39.0], [11.0, -59.0]]], [[[1.0, -7.0], [-4.0, 9.0]], [[-7.0, 56.0], 
+[5.0, -28.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_float_rank0(self):
-      arg0=numpy.array([[[[0.2890956567711751, 0.0047389611017556454, 0.87892527211444582, -0.65150693309569196], 
-[0.41621480995390114, -0.43854307594957254, -0.59815785643830077, -0.67517272581107557], [0.29083357354248873, 
--0.34488587447865737, -0.3534529402795854, -0.76014085074946847]], [[-0.19051880582497072, 0.85284977603728396, 
-0.31270253036076934, 0.37421013369344447], [0.71318255965443345, 0.92162734459590911, 0.67934988220751147, 
--0.42337007079808697], [0.42833893416405266, 0.30720360302238192, 0.27000152473334049, 0.95393479511777279]]], 
-[[[-0.098035752002608278, 0.13176090528152407, 0.62934363744184929, -0.053289126771334905], [0.81346047837084501, 
--0.45301649520463716, -0.96631411831608749, -0.071951542993987649], [0.99690192197172367, -0.025819634205427322, 
-0.87468585164061108, 0.60501309254424518]], [[-0.88303485657993463, 0.46312758028512135, -0.77275723545859076, 
--0.067439349816685201], [0.14089517815207553, 0.56655437330646286, 0.35573146108388021, -0.9370989113947783], 
-[-0.33072965554665301, -0.81929016865935234, -0.981755182164328, -0.80123180974034836]]], [[[0.32559736893252644, 
--0.15298445424344309, 0.5756357845038651, 0.54846826957121642], [0.49314026154864776, 0.40147202599848408, 0.65052530484204629, 
-0.78030715854096466], [0.11772129008710874, 0.97339684272768734, -0.46213970918704739, 0.64480146515364178]], 
-[[-0.489873441461109, 0.67676986710802556, 0.57320598982638238, -0.081510204873377567], [0.14129642797645747, 
--0.88117171552134099, 0.62120016125873723, 0.62570138942740905], [-0.4571545505832082, 0.18504471982789994, 0.269612515446229, 
--0.92783580872646998]]]])
-      arg1=0.44439427692
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[[0.44439427692047384, 0.44439427692047384, 0.87892527211444582, 0.44439427692047384], 
-[0.44439427692047384, 0.44439427692047384, 0.44439427692047384, 0.44439427692047384], [0.44439427692047384, 
-0.44439427692047384, 0.44439427692047384, 0.44439427692047384]], [[0.44439427692047384, 0.85284977603728396, 
-0.44439427692047384, 0.44439427692047384], [0.71318255965443345, 0.92162734459590911, 0.67934988220751147, 
-0.44439427692047384], [0.44439427692047384, 0.44439427692047384, 0.44439427692047384, 0.95393479511777279]]], 
-[[[0.44439427692047384, 0.44439427692047384, 0.62934363744184929, 0.44439427692047384], [0.81346047837084501, 
-0.44439427692047384, 0.44439427692047384, 0.44439427692047384], [0.99690192197172367, 0.44439427692047384, 0.87468585164061108, 
-0.60501309254424518]], [[0.44439427692047384, 0.46312758028512135, 0.44439427692047384, 0.44439427692047384], 
-[0.44439427692047384, 0.56655437330646286, 0.44439427692047384, 0.44439427692047384], [0.44439427692047384, 
-0.44439427692047384, 0.44439427692047384, 0.44439427692047384]]], [[[0.44439427692047384, 0.44439427692047384, 
-0.5756357845038651, 0.54846826957121642], [0.49314026154864776, 0.44439427692047384, 0.65052530484204629, 0.78030715854096466], 
-[0.44439427692047384, 0.97339684272768734, 0.44439427692047384, 0.64480146515364178]], [[0.44439427692047384, 
-0.67676986710802556, 0.57320598982638238, 0.44439427692047384], [0.44439427692047384, 0.44439427692047384, 0.62120016125873723, 
-0.62570138942740905], [0.44439427692047384, 0.44439427692047384, 0.44439427692047384, 0.44439427692047384]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[[-1.0, 3.0], [-1.0, 0.0]], [[-1.0, -2.0], [1.0, 0.0]], [[-5.0, 2.0], [-3.0, 0.0]], [[5.0, -2.0], 
+[-4.0, 0.0]], [[-5.0, 6.0], [6.0, -6.0]], [[5.0, 3.0], [-7.0, 4.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[3.0, -9.0], [3.0, -0.0]], [[3.0, 6.0], [-3.0, -0.0]], [[15.0, -6.0], [9.0, -0.0]], [[-15.0, 
+6.0], [12.0, -0.0]], [[15.0, -18.0], [-18.0, 18.0]], [[-15.0, -9.0], [21.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[7.0, -21.0], 
+[7.0, -0.0]], [[7.0, 14.0], [-7.0, -0.0]], [[35.0, -14.0], [21.0, -0.0]], [[-35.0, 14.0], [28.0, -0.0]], [[35.0, -42.0], 
+[-42.0, 42.0]], [[-35.0, -21.0], [49.0, -28.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+         arg0=arg0*1j
+         arg1=arg1*1j
+         ref=-ref
+         res=generalTensorProduct(arg0,arg1,axis_offset=0)
+         self.assertTrue(isinstance(res,Data),"wrong type of result.")
+         self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+         self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")         
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_array_rank0(self):
-      arg0=numpy.array(-0.595911728088)
-      arg1=numpy.array(-0.259958577128)
-      res=maximum(arg0,arg1)
-      ref=numpy.array(-0.259958577128)
-      if isinstance(res,numpy.ndarray):
-          self.assertEqual(res.shape,(),"wrong shape of result.")
-      else:
-          self.assertTrue(isinstance(res,float),"wrong type of result.")
+   def test_generalTensorProduct_array_rank4_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[[[-5.0, 0.0, 6.0], [-2.0, 7.0, -1.0]], [[-3.0, -3.0, -1.0], [4.0, 6.0, 0.0]]], [[[-6.0, 3.0, 7.0], 
+[-3.0, -1.0, 0.0]], [[2.0, -2.0, -5.0], [-4.0, 7.0, 6.0]]], [[[0.0, -1.0, 1.0], [5.0, 7.0, -1.0]], [[-6.0, -4.0, 0.0], [-7.0, 
+1.0, -1.0]]], [[[7.0, -4.0, -5.0], [1.0, -6.0, -4.0]], [[1.0, 4.0, -7.0], [-1.0, -1.0, 5.0]]], [[[4.0, -1.0, 0.0], [3.0, -2.0, 
+6.0]], [[4.0, -3.0, 4.0], [3.0, 1.0, 4.0]]], [[[-5.0, 4.0, -6.0], [0.0, 0.0, 2.0]], [[-1.0, 0.0, 7.0], [-4.0, 1.0, 2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-3.0, -3.0, -4.0])+(1.-msk_arg1)*numpy.array([3.0, -2.0, 6.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-9.0, -11.0], [22.0, -30.0]], [[-19.0, 12.0], [20.0, -33.0]], [[-1.0, -32.0], [30.0, 22.0]], 
+[[11.0, 31.0], [13.0, -14.0]], [[-9.0, -27.0], [-19.0, -28.0]], [[27.0, -8.0], [-25.0, 
+1.0]]])+(1.-msk_ref)*numpy.array([[[21.0, -26.0], [-9.0, 0.0]], [[18.0, -7.0], [-20.0, 10.0]], [[8.0, -5.0], [-10.0, -29.0]], 
+[[-1.0, -9.0], [-47.0, 29.0]], [[14.0, 49.0], [42.0, 31.0]], [[-59.0, 12.0], [39.0, -2.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_array_rank0(self):
-      arg0=numpy.array([0.70448785703212291, 0.83900014998124073])
-      arg1=numpy.array(-0.728326601622)
-      res=maximum(arg0,arg1)
-      ref=numpy.array([0.70448785703212291, 0.83900014998124073])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank3_expandedData_rank1_offset0(self):
+      arg0=numpy.array([[[-1.0, 3.0], [-5.0, 5.0]], [[0.0, -1.0], [-2.0, 4.0]], [[-5.0, 5.0], [-7.0, 3.0]], [[-5.0, -4.0], 
+[4.0, -5.0]], [[5.0, -3.0], [1.0, 2.0]], [[-2.0, -6.0], [6.0, 4.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([3.0, 1.0])+(1.-msk_arg1)*numpy.array([5.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-3.0, -1.0], [9.0, 3.0]], [[-15.0, -5.0], [15.0, 5.0]]], [[[0.0, 0.0], [-3.0, -1.0]], [[-6.0, 
+-2.0], [12.0, 4.0]]], [[[-15.0, -5.0], [15.0, 5.0]], [[-21.0, -7.0], [9.0, 3.0]]], [[[-15.0, -5.0], [-12.0, -4.0]], [[12.0, 
+4.0], [-15.0, -5.0]]], [[[15.0, 5.0], [-9.0, -3.0]], [[3.0, 1.0], [6.0, 2.0]]], [[[-6.0, -2.0], [-18.0, -6.0]], [[18.0, 6.0], 
+[12.0, 4.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, 0.0], [15.0, 0.0]], [[-25.0, 0.0], [25.0, 0.0]]], [[[0.0, 0.0], [-5.0, 
+0.0]], [[-10.0, 0.0], [20.0, 0.0]]], [[[-25.0, 0.0], [25.0, 0.0]], [[-35.0, 0.0], [15.0, 0.0]]], [[[-25.0, 0.0], [-20.0, 0.0]], 
+[[20.0, 0.0], [-25.0, 0.0]]], [[[25.0, 0.0], [-15.0, 0.0]], [[5.0, 0.0], [10.0, 0.0]]], [[[-10.0, 0.0], [-30.0, 0.0]], [[30.0, 
+0.0], [20.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_array_rank0(self):
-      arg0=numpy.array([[0.58907572104688044, -0.30767970415015888, -0.78138846520643046, -0.15168954291983616, 
-0.31446212443091293], [0.074998472598995392, -0.9250742963204186, 0.45334932675665041, -0.95916572344077733, 
--0.99342314865250936], [-0.79251531920902263, 0.44321789574157977, 0.62908133704628444, 0.24472622296386093, 
-0.29465980693370675], [-0.5523390670941164, -0.096556923965434915, -0.97293609728291464, 0.4811104330547229, 
-0.11676047360942654]])
-      arg1=numpy.array(-0.637835089534)
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[0.58907572104688044, -0.30767970415015888, -0.63783508953404722, -0.15168954291983616, 
-0.31446212443091293], [0.074998472598995392, -0.63783508953404722, 0.45334932675665041, -0.63783508953404722, 
--0.63783508953404722], [-0.63783508953404722, 0.44321789574157977, 0.62908133704628444, 0.24472622296386093, 
-0.29465980693370675], [-0.5523390670941164, -0.096556923965434915, -0.63783508953404722, 0.4811104330547229, 
-0.11676047360942654]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[[[6.0, 3.0, 4.0], [-7.0, 2.0, 7.0]], [[5.0, 3.0, -4.0], [7.0, -6.0, 6.0]]], [[[-4.0, 6.0, 0.0], [0.0, 
+-2.0, 0.0]], [[3.0, 3.0, 7.0], [-1.0, -5.0, 5.0]]], [[[6.0, 7.0, -1.0], [2.0, 5.0, 6.0]], [[0.0, -4.0, -5.0], [-5.0, 3.0, 
+-3.0]]], [[[7.0, 5.0, -6.0], [0.0, -4.0, 3.0]], [[0.0, 3.0, 2.0], [7.0, 0.0, 6.0]]], [[[4.0, 0.0, 0.0], [-7.0, -5.0, -4.0]], 
+[[-2.0, 2.0, -7.0], [2.0, 5.0, 0.0]]], [[[2.0, 5.0, 3.0], [5.0, -5.0, 1.0]], [[-4.0, -1.0, 4.0], [5.0, -2.0, -2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, -2.0], [7.0, -4.0], [0.0, 2.0]])+(1.-msk_arg1)*numpy.array([[2.0, 7.0], [-4.0, -2.0], 
+[-3.0, -4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-21.0, -16.0], [63.0, 20.0]], [[-14.0, -30.0], [-91.0, 22.0]]], [[[70.0, -16.0], [-14.0, 
+8.0]], [[0.0, -4.0], [-28.0, 32.0]]], [[[7.0, -42.0], [21.0, -12.0]], [[-28.0, 6.0], [56.0, -8.0]]], [[[-14.0, -46.0], [-28.0, 
+22.0]], [[21.0, -8.0], [-49.0, -2.0]]], [[[-28.0, -8.0], [14.0, 26.0]], [[28.0, -18.0], [21.0, -24.0]]], [[[21.0, -18.0], 
+[-70.0, 12.0]], [[21.0, 20.0], [-49.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 20.0], [-43.0, -81.0]], [[10.0, 45.0], 
+[20.0, 37.0]]], [[[-32.0, -40.0], [8.0, 4.0]], [[-27.0, -13.0], [3.0, -17.0]]], [[[-13.0, 32.0], [-34.0, -20.0]], [[31.0, 
+28.0], [-13.0, -29.0]]], [[[12.0, 63.0], [7.0, -4.0]], [[-18.0, -14.0], [-4.0, 25.0]]], [[[8.0, 28.0], [18.0, -23.0]], [[9.0, 
+10.0], [-16.0, 4.0]]], [[[-25.0, -8.0], [27.0, 41.0]], [[-16.0, -42.0], [24.0, 47.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_array_rank0(self):
-      arg0=numpy.array([[[0.26078403166817066, -0.88883099092846662], [0.2962776357981165, 0.33765471443325268]], 
-[[0.61994569524479037, -0.86070803156387798], [0.40887497854892496, -0.95032693825538606]], [[-0.6230603384583091, 
-0.84641044210513128], [0.072929215696905469, 0.63605426925408093]], [[0.82476138834838242, -0.87239621000692358], 
-[0.9136576981759601, 0.012874827321107896]], [[0.6527601185704035, 0.45834972014119924], [-0.20281376602514722, 
-0.78801993661046477]], [[-0.84382527553821407, 0.69859016456466971], [0.95609346718482136, -0.9642394043877307]]])
-      arg1=numpy.array(-0.0639685246813)
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[0.26078403166817066, -0.063968524681262906], [0.2962776357981165, 0.33765471443325268]], 
-[[0.61994569524479037, -0.063968524681262906], [0.40887497854892496, -0.063968524681262906]], [[-0.063968524681262906, 
-0.84641044210513128], [0.072929215696905469, 0.63605426925408093]], [[0.82476138834838242, -0.063968524681262906], 
-[0.9136576981759601, 0.012874827321107896]], [[0.6527601185704035, 0.45834972014119924], [-0.063968524681262906, 
-0.78801993661046477]], [[-0.063968524681262906, 0.69859016456466971], [0.95609346718482136, -0.063968524681262906]]])
+   def test_generalTensorProduct_array_rank4_float_rank0_offset0(self):
+      arg0=numpy.array([[[[5.0, 0.0, 3.0, -6.0], [-1.0, 7.0, 0.0, -6.0], [-1.0, 0.0, 0.0, 6.0]], [[5.0, -1.0, 7.0, -4.0], [2.0, 
+5.0, 0.0, 1.0], [0.0, 1.0, -1.0, -5.0]]], [[[2.0, 0.0, 3.0, 6.0], [-7.0, -1.0, 0.0, -6.0], [-3.0, 5.0, -4.0, 3.0]], [[-5.0, 
+-2.0, 7.0, 4.0], [0.0, 1.0, -1.0, -1.0], [6.0, -2.0, 0.0, 3.0]]], [[[-4.0, 2.0, -2.0, 7.0], [-7.0, 6.0, -5.0, -4.0], [3.0, 1.0, 
+-7.0, 0.0]], [[6.0, 0.0, -4.0, 1.0], [6.0, 0.0, -2.0, -2.0], [-5.0, 5.0, -4.0, 5.0]]]])
+      arg1=6.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[30.0, 0.0, 18.0, -36.0], [-6.0, 42.0, 0.0, -36.0], [-6.0, 0.0, 0.0, 36.0]], [[30.0, -6.0, 42.0, 
+-24.0], [12.0, 30.0, 0.0, 6.0], [0.0, 6.0, -6.0, -30.0]]], [[[12.0, 0.0, 18.0, 36.0], [-42.0, -6.0, 0.0, -36.0], [-18.0, 30.0, 
+-24.0, 18.0]], [[-30.0, -12.0, 42.0, 24.0], [0.0, 6.0, -6.0, -6.0], [36.0, -12.0, 0.0, 18.0]]], [[[-24.0, 12.0, -12.0, 42.0], 
+[-42.0, 36.0, -30.0, -24.0], [18.0, 6.0, -42.0, 0.0]], [[36.0, 0.0, -24.0, 6.0], [36.0, 0.0, -12.0, -12.0], [-30.0, 30.0, 
+-24.0, 30.0]]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_array_rank0(self):
-      arg0=numpy.array([[[[-0.49178507725843357, -0.95412613874160401, -0.89953408681402758, -0.4182783638072558], 
-[-0.12851206262547121, 0.97771672278447719, 0.095498689842355322, -0.63677823186616767], [-0.31171543678709579, 
--0.24066261014019164, 0.8884558662985651, -0.86534369235026132]], [[0.41073749486304023, -0.75082798331554312, 
--0.021514401962046348, -0.4552145355922177], [0.025376418086104691, 0.94693831924338046, 0.72528013847070816, 
-0.5590032330140231], [-0.63961957547864201, 0.38553731067491559, 0.47766722193193556, 0.22722302846704578]]], 
-[[[-0.8552086040279212, -0.028628848798257334, 0.39615293686569841, 0.60472409304678898], [-0.76179395489150892, 
-0.34743550408059365, 0.84900306720985297, -0.32754549604906047], [0.96774618220062791, -0.17510456094746396, 
--0.83577780367198806, -0.28595508510654843]], [[-0.72033121788336163, -0.96380753221847604, 0.64121075422201179, 
-0.50807412144193731], [-0.22520904548844145, -0.79626857735444134, 0.6727388150821505, -0.97429723888611686], 
-[-0.3912584771763985, 0.017073154831940274, -0.78645964556472814, 0.063579858350630403]]], [[[0.49275761913585359, 
-0.68061912084321108, 0.27488873542534376, -0.91020336944963454], [0.38754903931740148, -0.095266564605377857, 
--0.34983002073831537, -0.98686346316121343], [-0.57870251452427079, 0.019782802975875313, -0.99030465294393522, 
-0.36519674435393079]], [[0.36201122081142789, 0.89247761722577512, 0.88862029406919207, 0.65118385314611027], 
-[0.62444020668337985, 0.29010577239708102, 0.50090883083435256, -0.86322012454452723], [-0.25882379276404111, 
-0.50333245341748101, -0.98127424266544994, 0.32881151993132085]]]])
-      arg1=numpy.array(0.54009693064)
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[[0.54009693064018083, 0.54009693064018083, 0.54009693064018083, 0.54009693064018083], 
-[0.54009693064018083, 0.97771672278447719, 0.54009693064018083, 0.54009693064018083], [0.54009693064018083, 
-0.54009693064018083, 0.8884558662985651, 0.54009693064018083]], [[0.54009693064018083, 0.54009693064018083, 
-0.54009693064018083, 0.54009693064018083], [0.54009693064018083, 0.94693831924338046, 0.72528013847070816, 0.5590032330140231], 
-[0.54009693064018083, 0.54009693064018083, 0.54009693064018083, 0.54009693064018083]]], [[[0.54009693064018083, 
-0.54009693064018083, 0.54009693064018083, 0.60472409304678898], [0.54009693064018083, 0.54009693064018083, 0.84900306720985297, 
-0.54009693064018083], [0.96774618220062791, 0.54009693064018083, 0.54009693064018083, 0.54009693064018083]], 
-[[0.54009693064018083, 0.54009693064018083, 0.64121075422201179, 0.54009693064018083], [0.54009693064018083, 
-0.54009693064018083, 0.6727388150821505, 0.54009693064018083], [0.54009693064018083, 0.54009693064018083, 0.54009693064018083, 
-0.54009693064018083]]], [[[0.54009693064018083, 0.68061912084321108, 0.54009693064018083, 0.54009693064018083], 
-[0.54009693064018083, 0.54009693064018083, 0.54009693064018083, 0.54009693064018083], [0.54009693064018083, 
-0.54009693064018083, 0.54009693064018083, 0.54009693064018083]], [[0.54009693064018083, 0.89247761722577512, 
-0.88862029406919207, 0.65118385314611027], [0.62444020668337985, 0.54009693064018083, 0.54009693064018083, 
-0.54009693064018083], [0.54009693064018083, 0.54009693064018083, 0.54009693064018083, 0.54009693064018083]]]])
+   def test_generalTensorProduct_array_rank4_array_rank0_offset0(self):
+      arg0=numpy.array([[[[-6.0, 0.0, -7.0, -5.0], [-6.0, 0.0, 0.0, 6.0], [-7.0, 0.0, 3.0, 7.0]], [[-7.0, -1.0, 2.0, 5.0], 
+[-3.0, 6.0, 4.0, -4.0], [0.0, 3.0, -2.0, -3.0]]], [[[-6.0, 6.0, 6.0, 1.0], [4.0, 3.0, 2.0, 3.0], [6.0, 7.0, -7.0, -3.0]], 
+[[-5.0, 4.0, -5.0, 0.0], [-2.0, 6.0, -1.0, -2.0], [-1.0, 4.0, 5.0, -6.0]]], [[[-3.0, -1.0, -5.0, -7.0], [5.0, 5.0, 0.0, -3.0], 
+[-1.0, 6.0, -6.0, -2.0]], [[1.0, -1.0, 5.0, 2.0], [-5.0, 6.0, 1.0, -2.0], [6.0, -6.0, 3.0, -3.0]]]])
+      arg1=numpy.array(-1.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[6.0, -0.0, 7.0, 5.0], [6.0, -0.0, -0.0, -6.0], [7.0, -0.0, -3.0, -7.0]], [[7.0, 1.0, -2.0, -5.0], 
+[3.0, -6.0, -4.0, 4.0], [-0.0, -3.0, 2.0, 3.0]]], [[[6.0, -6.0, -6.0, -1.0], [-4.0, -3.0, -2.0, -3.0], [-6.0, -7.0, 7.0, 3.0]], 
+[[5.0, -4.0, 5.0, -0.0], [2.0, -6.0, 1.0, 2.0], [1.0, -4.0, -5.0, 6.0]]], [[[3.0, 1.0, 5.0, 7.0], [-5.0, -5.0, -0.0, 3.0], 
+[1.0, -6.0, 6.0, 2.0]], [[-1.0, 1.0, -5.0, -2.0], [5.0, -6.0, -1.0, 2.0], [-6.0, 6.0, -3.0, 3.0]]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_constData_rank0(self):
-      arg0=numpy.array(0.275719067126)
-      arg1=Data(0.379978099496,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(0.379978099496,self.functionspace)
+   def test_generalTensorProduct_array_rank4_constData_rank0_offset0(self):
+      arg0=numpy.array([[[[1.0, 1.0, -5.0, 6.0], [1.0, 6.0, 7.0, 0.0], [2.0, -6.0, -5.0, 5.0]], [[0.0, -2.0, 0.0, 2.0], [3.0, 
+-3.0, -6.0, -4.0], [-2.0, 0.0, -4.0, 2.0]]], [[[0.0, 1.0, 4.0, -4.0], [-6.0, -3.0, -6.0, 3.0], [0.0, -1.0, -2.0, 5.0]], [[6.0, 
+-1.0, 6.0, 4.0], [0.0, 3.0, 0.0, 7.0], [-1.0, 6.0, -1.0, 5.0]]], [[[-2.0, -4.0, -3.0, -7.0], [0.0, -2.0, -3.0, 5.0], [3.0, 
+-2.0, 1.0, 0.0]], [[-2.0, 7.0, -5.0, -6.0], [1.0, -5.0, -7.0, -6.0], [-1.0, 5.0, -2.0, 3.0]]]])
+      arg1=Data(6.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[6.0, 6.0, -30.0, 36.0], [6.0, 36.0, 42.0, 0.0], [12.0, -36.0, -30.0, 30.0]], [[0.0, -12.0, 0.0, 
+12.0], [18.0, -18.0, -36.0, -24.0], [-12.0, 0.0, -24.0, 12.0]]], [[[0.0, 6.0, 24.0, -24.0], [-36.0, -18.0, -36.0, 18.0], [0.0, 
+-6.0, -12.0, 30.0]], [[36.0, -6.0, 36.0, 24.0], [0.0, 18.0, 0.0, 42.0], [-6.0, 36.0, -6.0, 30.0]]], [[[-12.0, -24.0, -18.0, 
+-42.0], [0.0, -12.0, -18.0, 30.0], [18.0, -12.0, 6.0, 0.0]], [[-12.0, 42.0, -30.0, -36.0], [6.0, -30.0, -42.0, -36.0], [-6.0, 
+30.0, -12.0, 18.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_constData_rank0(self):
-      arg0=numpy.array([0.23412985120029073, 0.96842799591312634])
-      arg1=Data(0.0282351777389,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.23412985120029073, 0.96842799591312634]),self.functionspace)
+   def test_generalTensorProduct_array_rank4_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[[[-1.0, 2.0, 0.0, -7.0], [3.0, 1.0, 3.0, 7.0], [2.0, 4.0, 0.0, -2.0]], [[2.0, 0.0, 7.0, -5.0], [-1.0, 
+0.0, -3.0, -3.0], [0.0, -1.0, -7.0, 2.0]]], [[[0.0, 4.0, -2.0, 4.0], [-1.0, 6.0, -7.0, 2.0], [0.0, -1.0, 5.0, 0.0]], [[-3.0, 
+3.0, 1.0, 5.0], [3.0, -5.0, -1.0, 0.0], [5.0, 0.0, 5.0, 0.0]]], [[[-6.0, -3.0, -4.0, -3.0], [0.0, -7.0, -3.0, -7.0], [3.0, 0.0, 
+0.0, 3.0]], [[-2.0, 3.0, 7.0, -4.0], [0.0, 3.0, 4.0, -1.0], [3.0, 2.0, 4.0, 4.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(0.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, 0.0, 0.0, -0.0], 
+[-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]], 
+[[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, -0.0, -0.0], 
+[0.0, 0.0, 0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, 0.0, 0.0, 
+-0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 
+0.0]], [[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 
+-0.0], [0.0, 0.0, 0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_constData_rank0(self):
-      arg0=numpy.array([[0.75083228363058563, 0.14021129209291994, 0.66454891543379668, 0.52438137383900618, 
-0.59989233019891586], [-0.64926806752121502, -0.31973316364062088, -0.15677459149134809, 0.94726185071047286, 
-0.77006499756531577], [0.96436511217108922, 0.10798486901631477, 0.49614119848238003, -0.58809677000944571, 
-0.40684393221640747], [-0.33426541098798523, -0.99641768740611458, 0.019371391555169426, 0.41032148071109376, 
-0.55944773037045037]])
-      arg1=Data(0.0504551040829,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.75083228363058563, 0.14021129209291994, 0.66454891543379668, 0.52438137383900618, 
-0.59989233019891586], [0.050455104082914204, 0.050455104082914204, 0.050455104082914204, 0.94726185071047286, 
-0.77006499756531577], [0.96436511217108922, 0.10798486901631477, 0.49614119848238003, 0.050455104082914204, 
-0.40684393221640747], [0.050455104082914204, 0.050455104082914204, 0.050455104082914204, 0.41032148071109376, 
-0.55944773037045037]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_float_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg1=4.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(8.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_constData_rank0(self):
-      arg0=numpy.array([[[0.68078035361717415, 0.77513835622840355], [0.88778377916351281, -0.59991037059023289]], 
-[[-0.31479263876172614, 0.52689690629824115], [-0.32445682623377969, 0.70068635269972779]], [[0.7068855302553303, 
--0.90632512202385662], [-0.69310089072096459, 0.21580652641517606]], [[0.18682929631820056, 0.98487526483307875], 
-[-0.80732797686141189, -0.74387425497735205]], [[-0.94959049904561454, -0.26401122319745207], [0.97666196551554485, 
-0.13397037446463989]], [[-0.32237452231000963, 0.23366086287779164], [-0.66314084754224023, 0.061657994330439836]]])
-      arg1=Data(0.887177842883,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.88717784288295465, 0.88717784288295465], [0.88778377916351281, 0.88717784288295465]], 
-[[0.88717784288295465, 0.88717784288295465], [0.88717784288295465, 0.88717784288295465]], [[0.88717784288295465, 
-0.88717784288295465], [0.88717784288295465, 0.88717784288295465]], [[0.88717784288295465, 0.98487526483307875], 
-[0.88717784288295465, 0.88717784288295465]], [[0.88717784288295465, 0.88717784288295465], [0.97666196551554485, 
-0.88717784288295465]], [[0.88717784288295465, 0.88717784288295465], [0.88717784288295465, 
-0.88717784288295465]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_array_rank0_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg1=numpy.array(6.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(30.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_constData_rank0(self):
-      arg0=numpy.array([[[[-0.44596394506288406, -0.99451216053143821, 0.80947207669238974, 0.53381678739762761], 
-[0.24988481018214626, 0.97340528016730477, -0.88181308417483706, -0.10501736634476666], [0.67231055089947356, 
--0.41705694674616267, -0.99130432976066873, -0.76183835148666756]], [[0.87564340019720688, -0.56545607723354552, 
-0.35986228734119252, -0.95148055206041304], [0.54888663455682729, 0.97420887940931578, 0.058263938512163049, 
-0.76370352854831602], [-0.82673099109694004, 0.9659484007501713, -0.92707003031757185, -0.29800942664995955]]], 
-[[[0.22672462889085043, 0.77216678282924223, -0.68765485895438716, -0.41035411530512622], [-0.10574234135684346, 
-0.41868370912220354, -0.42894043779354374, 0.14689038755897377], [0.80637358889951183, 0.0048710336014621269, 
-0.95227700237370771, 0.67742226677379058]], [[0.33943135111692935, 0.051854083713816834, -0.11097498559618657, 
--0.28695360058894792], [0.25170868190713924, 0.51759300366308403, 0.045719489002853608, 0.85414177693285209], 
-[-0.62313668843495651, -0.65158905094111397, -0.35965515542399928, -0.91881459559837508]]], [[[0.50411396804110731, 
--0.35071960896573962, 0.85463428495185267, 0.047161400398034514], [0.96936117001305488, -0.23708858547871281, 
--0.97958490805427312, 0.19911749296919523], [0.3558068103726566, 0.83166317419688163, 0.094348126909065133, 
-0.53229454234478757]], [[-0.95064691521898426, 0.40080396732915236, 0.33234699751344388, -0.9871206815396758], 
-[0.98903106268798591, 0.091842667447183279, 0.29485522713344281, -0.33705972294401088], [0.29805334379644233, 
--0.9604786924125317, -0.73602864043687255, -0.40470873942057994]]]])
-      arg1=Data(-0.176207534638,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.17620753463766059, -0.17620753463766059, 0.80947207669238974, 0.53381678739762761], 
-[0.24988481018214626, 0.97340528016730477, -0.17620753463766059, -0.10501736634476666], [0.67231055089947356, 
--0.17620753463766059, -0.17620753463766059, -0.17620753463766059]], [[0.87564340019720688, -0.17620753463766059, 
-0.35986228734119252, -0.17620753463766059], [0.54888663455682729, 0.97420887940931578, 0.058263938512163049, 
-0.76370352854831602], [-0.17620753463766059, 0.9659484007501713, -0.17620753463766059, -0.17620753463766059]]], 
-[[[0.22672462889085043, 0.77216678282924223, -0.17620753463766059, -0.17620753463766059], [-0.10574234135684346, 
-0.41868370912220354, -0.17620753463766059, 0.14689038755897377], [0.80637358889951183, 0.0048710336014621269, 
-0.95227700237370771, 0.67742226677379058]], [[0.33943135111692935, 0.051854083713816834, -0.11097498559618657, 
--0.17620753463766059], [0.25170868190713924, 0.51759300366308403, 0.045719489002853608, 0.85414177693285209], 
-[-0.17620753463766059, -0.17620753463766059, -0.17620753463766059, -0.17620753463766059]]], [[[0.50411396804110731, 
--0.17620753463766059, 0.85463428495185267, 0.047161400398034514], [0.96936117001305488, -0.17620753463766059, 
--0.17620753463766059, 0.19911749296919523], [0.3558068103726566, 0.83166317419688163, 0.094348126909065133, 
-0.53229454234478757]], [[-0.17620753463766059, 0.40080396732915236, 0.33234699751344388, -0.17620753463766059], 
-[0.98903106268798591, 0.091842667447183279, 0.29485522713344281, -0.17620753463766059], [0.29805334379644233, 
--0.17620753463766059, -0.17620753463766059, -0.17620753463766059]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_array_rank1_offset1(self):
+      arg0=Data(numpy.array([-7.0, -7.0, 5.0]),self.functionspace)
+      arg1=numpy.array([-6.0, -1.0, 7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(84.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_expandedData_rank0(self):
-      arg0=numpy.array(-0.239808661002)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.499507234748)+(1.-msk_arg1)*(-0.671148207596)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.239808661002)+(1.-msk_ref)*(-0.239808661002)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_expandedData_rank0(self):
-      arg0=numpy.array([-0.097106554962706371, -0.53299957388591124])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.48432167856)+(1.-msk_arg1)*(-0.25985897402)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.097106554962706371, -0.48432167856004193])+(1.-msk_ref)*numpy.array([-0.097106554962706371, 
--0.25985897401999281])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_expandedData_rank0(self):
-      arg0=numpy.array([[-0.13167949633164855, -0.0083337422827065577, -0.38573640576223611, -0.069870464900080531, 
-0.77840356126391153], [0.62218334866236424, 0.68483355583508021, -0.48863487618037715, -0.0082838053084859364, 
--0.33346342674536089], [-0.89360989325312534, -0.9751359066636649, -0.0084300747210315219, -0.96657583767552402, 
--0.10309752389903437], [-0.22842150326198207, -0.49737293664485316, -0.47025074030093283, -0.67836806796837679, 
-0.99564770637844346]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.0781036984237)+(1.-msk_arg1)*(-0.0843238721184)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.078103698423652057, 0.078103698423652057, 0.078103698423652057, 0.078103698423652057, 
-0.77840356126391153], [0.62218334866236424, 0.68483355583508021, 0.078103698423652057, 0.078103698423652057, 
-0.078103698423652057], [0.078103698423652057, 0.078103698423652057, 0.078103698423652057, 0.078103698423652057, 
-0.078103698423652057], [0.078103698423652057, 0.078103698423652057, 0.078103698423652057, 0.078103698423652057, 
-0.99564770637844346]])+(1.-msk_ref)*numpy.array([[-0.084323872118388099, -0.0083337422827065577, -0.084323872118388099, 
--0.069870464900080531, 0.77840356126391153], [0.62218334866236424, 0.68483355583508021, -0.084323872118388099, 
--0.0082838053084859364, -0.084323872118388099], [-0.084323872118388099, -0.084323872118388099, -0.0084300747210315219, 
--0.084323872118388099, -0.084323872118388099], [-0.084323872118388099, -0.084323872118388099, -0.084323872118388099, 
--0.084323872118388099, 0.99564770637844346]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_expandedData_rank0(self):
-      arg0=numpy.array([[[-0.70161399966991178, 0.33853877023786727], [-0.76494633110216448, -0.93684954048568492]], 
-[[-0.65137354058954, 0.26553439129603973], [0.64552443308190122, -0.60830143039855877]], [[0.8023162924896885, 
--0.32038038872912455], [-0.47547406933615965, 0.27454091657539204]], [[-0.9672523328014897, -0.71919678369683115], 
-[-0.35423678746927645, 0.81975223582448642]], [[-0.81403739453676183, 0.0020767234774008436], [0.94253026200138423, 
-0.98275512168780477]], [[-0.24210704831235974, 0.71604514999739655], [-0.55274691970980117, 0.99831912241667875]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.0102246658782)+(1.-msk_arg1)*(0.652230128332)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.010224665878218353, 0.33853877023786727], [0.010224665878218353, 0.010224665878218353]], 
-[[0.010224665878218353, 0.26553439129603973], [0.64552443308190122, 0.010224665878218353]], [[0.8023162924896885, 
-0.010224665878218353], [0.010224665878218353, 0.27454091657539204]], [[0.010224665878218353, 0.010224665878218353], 
-[0.010224665878218353, 0.81975223582448642]], [[0.010224665878218353, 0.010224665878218353], [0.94253026200138423, 
-0.98275512168780477]], [[0.010224665878218353, 0.71604514999739655], [0.010224665878218353, 
-0.99831912241667875]]])+(1.-msk_ref)*numpy.array([[[0.65223012833196758, 0.65223012833196758], [0.65223012833196758, 
-0.65223012833196758]], [[0.65223012833196758, 0.65223012833196758], [0.65223012833196758, 0.65223012833196758]], 
-[[0.8023162924896885, 0.65223012833196758], [0.65223012833196758, 0.65223012833196758]], [[0.65223012833196758, 
-0.65223012833196758], [0.65223012833196758, 0.81975223582448642]], [[0.65223012833196758, 0.65223012833196758], 
-[0.94253026200138423, 0.98275512168780477]], [[0.65223012833196758, 0.71604514999739655], [0.65223012833196758, 
-0.99831912241667875]]])
+   def test_generalTensorProduct_constData_rank2_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[1.0, -3.0, 5.0], [-1.0, 0.0, -2.0]]),self.functionspace)
+      arg1=numpy.array([[-5.0, -3.0, 3.0], [5.0, -7.0, -2.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(18.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_expandedData_rank0(self):
-      arg0=numpy.array([[[[0.11857521935136139, 0.093929496673029522, -0.86185255457483856, 0.66859958438889944], 
-[-0.71414593797980697, 0.11258374469683963, 0.94835492072493288, -0.68730039028716172], [-0.69653609424045704, 
-0.079954029214261757, -0.091180257555399713, -0.1442422632927951]], [[0.26155223948894291, -0.27259910943079357, 
-0.74661493838533688, 0.53585345987130495], [-0.60022580287227467, -0.48790336997422057, 0.94579083650142803, 
--0.8863996264681393], [-0.48285648955978755, 0.43421403658329649, 0.12057557891417603, -0.48016460023246776]]], 
-[[[0.82622400614598757, 0.89451467594773959, -0.42386713423727307, 0.4292564116088935], [0.15325746129096651, 
--0.40650587605155497, 0.48852383833911195, -0.12133478623760663], [0.79062049417854996, -0.18313225818980827, 
--0.97553885725628553, -0.8652842476948277]], [[-0.05398981985994844, 0.25155972652674774, 0.58065613688539863, 
-0.49996739942398416], [-0.96741564092273324, 0.25704723590663892, 0.21718381354462557, -0.87988046847383972], 
-[0.17224341707309865, 0.2585605917314151, -0.61262203743428256, 0.088679962718663852]]], [[[0.95856449568455826, 
--0.21525011988362075, -0.87880681141864181, 0.74102075636768272], [0.41959007487547573, 0.80453495515335471, 
-0.48817109722463581, -0.11806636970967643], [0.90075904019500075, 0.47717994916605289, 0.35995395169862054, 
-0.40418049684201307]], [[0.28919635447948355, -0.28199908853065292, -0.051524269447178916, 0.39147412124693748], 
-[-0.21236681046692141, -0.35585295155544783, -0.4325141024321022, 0.50366801462727206], [-0.69662947289754285, 
--0.10168687807009102, -0.74795243165887348, -0.26529343675798978]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.933797791441)+(1.-msk_arg1)*(-0.798477769938)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.11857521935136139, 0.093929496673029522, -0.86185255457483856, 0.66859958438889944], 
-[-0.71414593797980697, 0.11258374469683963, 0.94835492072493288, -0.68730039028716172], [-0.69653609424045704, 
-0.079954029214261757, -0.091180257555399713, -0.1442422632927951]], [[0.26155223948894291, -0.27259910943079357, 
-0.74661493838533688, 0.53585345987130495], [-0.60022580287227467, -0.48790336997422057, 0.94579083650142803, 
--0.8863996264681393], [-0.48285648955978755, 0.43421403658329649, 0.12057557891417603, -0.48016460023246776]]], 
-[[[0.82622400614598757, 0.89451467594773959, -0.42386713423727307, 0.4292564116088935], [0.15325746129096651, 
--0.40650587605155497, 0.48852383833911195, -0.12133478623760663], [0.79062049417854996, -0.18313225818980827, 
--0.93379779144110442, -0.8652842476948277]], [[-0.05398981985994844, 0.25155972652674774, 0.58065613688539863, 
-0.49996739942398416], [-0.93379779144110442, 0.25704723590663892, 0.21718381354462557, -0.87988046847383972], 
-[0.17224341707309865, 0.2585605917314151, -0.61262203743428256, 0.088679962718663852]]], [[[0.95856449568455826, 
--0.21525011988362075, -0.87880681141864181, 0.74102075636768272], [0.41959007487547573, 0.80453495515335471, 
-0.48817109722463581, -0.11806636970967643], [0.90075904019500075, 0.47717994916605289, 0.35995395169862054, 
-0.40418049684201307]], [[0.28919635447948355, -0.28199908853065292, -0.051524269447178916, 0.39147412124693748], 
-[-0.21236681046692141, -0.35585295155544783, -0.4325141024321022, 0.50366801462727206], [-0.69662947289754285, 
--0.10168687807009102, -0.74795243165887348, -0.26529343675798978]]]])+(1.-msk_ref)*numpy.array([[[[0.11857521935136139, 
-0.093929496673029522, -0.79847776993817776, 0.66859958438889944], [-0.71414593797980697, 0.11258374469683963, 
-0.94835492072493288, -0.68730039028716172], [-0.69653609424045704, 0.079954029214261757, -0.091180257555399713, 
--0.1442422632927951]], [[0.26155223948894291, -0.27259910943079357, 0.74661493838533688, 0.53585345987130495], 
-[-0.60022580287227467, -0.48790336997422057, 0.94579083650142803, -0.79847776993817776], [-0.48285648955978755, 
-0.43421403658329649, 0.12057557891417603, -0.48016460023246776]]], [[[0.82622400614598757, 0.89451467594773959, 
--0.42386713423727307, 0.4292564116088935], [0.15325746129096651, -0.40650587605155497, 0.48852383833911195, 
--0.12133478623760663], [0.79062049417854996, -0.18313225818980827, -0.79847776993817776, -0.79847776993817776]], 
-[[-0.05398981985994844, 0.25155972652674774, 0.58065613688539863, 0.49996739942398416], [-0.79847776993817776, 
-0.25704723590663892, 0.21718381354462557, -0.79847776993817776], [0.17224341707309865, 0.2585605917314151, 
--0.61262203743428256, 0.088679962718663852]]], [[[0.95856449568455826, -0.21525011988362075, -0.79847776993817776, 
-0.74102075636768272], [0.41959007487547573, 0.80453495515335471, 0.48817109722463581, -0.11806636970967643], 
-[0.90075904019500075, 0.47717994916605289, 0.35995395169862054, 0.40418049684201307]], [[0.28919635447948355, 
--0.28199908853065292, -0.051524269447178916, 0.39147412124693748], [-0.21236681046692141, -0.35585295155544783, 
--0.4325141024321022, 0.50366801462727206], [-0.69662947289754285, -0.10168687807009102, -0.74795243165887348, 
--0.26529343675798978]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_array_rank1(self):
-      arg0=numpy.array(0.174025779864)
-      arg1=numpy.array([-0.80468496847716819, -0.55702002599440315])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([0.17402577986423351, 0.17402577986423351])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank3_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[6.0, -2.0, 2.0], [-5.0, -5.0, -3.0], [-7.0, 2.0, 3.0], [-5.0, 2.0, 3.0]], [[7.0, 6.0, 3.0], 
+[0.0, 1.0, 7.0], [2.0, 1.0, 2.0], [3.0, 4.0, 0.0]]]),self.functionspace)
+      arg1=numpy.array([[[-4.0, -1.0, 5.0], [-2.0, 3.0, -2.0], [0.0, 6.0, 3.0], [-6.0, -1.0, -3.0]], [[7.0, 0.0, 3.0], [-4.0, 
+-5.0, 5.0], [-4.0, -4.0, 0.0], [3.0, 5.0, -4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(134.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_array_rank1(self):
-      arg0=numpy.array([0.40031346790971001, 0.42660221126313203])
-      arg1=numpy.array([-0.60356690978921446, 0.38041619399718063])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([0.40031346790971001, 0.42660221126313203])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank4_array_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[2.0, 5.0], [-7.0, 6.0], [-3.0, 0.0]], [[3.0, -2.0], [0.0, 7.0], [-3.0, -6.0]]], [[[2.0, -7.0], 
+[-6.0, -1.0], [-2.0, 3.0]], [[-6.0, -4.0], [0.0, -7.0], [0.0, 1.0]]], [[[-2.0, -6.0], [-6.0, 1.0], [2.0, 1.0]], [[3.0, 0.0], 
+[-1.0, -1.0], [3.0, -3.0]]], [[[0.0, -5.0], [-2.0, -2.0], [5.0, 4.0]], [[-5.0, 4.0], [-2.0, 0.0], [-1.0, 
+-1.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[2.0, 1.0], [4.0, 7.0], [-5.0, 0.0]], [[0.0, 0.0], [-5.0, 2.0], [-6.0, 1.0]]], [[[-7.0, 6.0], [-4.0, 
+-6.0], [-5.0, 2.0]], [[7.0, -2.0], [-5.0, -6.0], [5.0, 0.0]]], [[[2.0, 6.0], [5.0, -7.0], [0.0, 1.0]], [[2.0, 1.0], [2.0, 
+-3.0], [4.0, 7.0]]], [[[-6.0, -1.0], [4.0, 5.0], [-3.0, 7.0]], [[-4.0, -1.0], [5.0, -7.0], [-4.0, 0.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-6.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_constData_rank1(self):
-      arg0=numpy.array(-0.232441816441)
-      arg1=Data(numpy.array([0.7042628437324705, -0.052385211928024367]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.7042628437324705, -0.052385211928024367]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_array_rank1_offset0(self):
+      arg0=Data(-6.0,self.functionspace)
+      arg1=numpy.array([-5.0, 4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([30.0, -24.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_constData_rank1(self):
-      arg0=numpy.array([0.43161703003093366, -0.69479066934103839])
-      arg1=Data(numpy.array([0.0397394354531031, 0.99784298068228838]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.43161703003093366, 0.99784298068228838]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_array_rank2_offset1(self):
+      arg0=Data(numpy.array([7.0, -5.0, 3.0]),self.functionspace)
+      arg1=numpy.array([[-7.0, 6.0], [3.0, 7.0], [3.0, 3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-55.0, 16.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_expandedData_rank1(self):
-      arg0=numpy.array(0.531197916018)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.10695530878160886, -0.091570793259940553])+(1.-msk_arg1)*numpy.array([0.19175738089028238, 
--0.89275588159527008])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.53119791601751842, 0.53119791601751842])+(1.-msk_ref)*numpy.array([0.53119791601751842, 
-0.53119791601751842])
+      arg0=1j*arg0
+      arg1=1j*arg1
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank1_expandedData_rank1(self):
-      arg0=numpy.array([0.16613419849800959, 0.79547150938095146])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.76819288363166582, 0.064091176986368348])+(1.-msk_arg1)*numpy.array([-0.37616391703349095, 
--0.52746213013335952])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.16613419849800959, 0.79547150938095146])+(1.-msk_ref)*numpy.array([0.16613419849800959, 
-0.79547150938095146])
+   def test_generalTensorProduct_constData_rank2_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[-2.0, 4.0, 5.0], [0.0, -3.0, 0.0]]),self.functionspace)
+      arg1=numpy.array([[[4.0, -1.0], [1.0, 6.0], [-2.0, -1.0]], [[7.0, 5.0], [-7.0, 0.0], [7.0, -5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([7.0, 21.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_array_rank2(self):
-      arg0=numpy.array(0.386947484668)
-      arg1=numpy.array([[0.87213326940203939, -0.38189636586633791, -0.72473189333280996, -0.21432483890478471, 
-0.88028312911208029], [0.2064306399504563, 0.30698465546256481, -0.43583358859083776, -0.70245985617074291, 
--0.31221616245670569], [0.33731000862177352, -0.22831708789872907, -0.776015520692938, 0.90598610188778328, 
--0.45012002694087161], [-0.97538226851945575, 0.79531267578818832, -0.52616844351177017, 0.30697695091792299, 
--0.82183015670659132]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[0.87213326940203939, 0.38694748466821971, 0.38694748466821971, 0.38694748466821971, 
-0.88028312911208029], [0.38694748466821971, 0.38694748466821971, 0.38694748466821971, 0.38694748466821971, 
-0.38694748466821971], [0.38694748466821971, 0.38694748466821971, 0.38694748466821971, 0.90598610188778328, 
-0.38694748466821971], [0.38694748466821971, 0.79531267578818832, 0.38694748466821971, 0.38694748466821971, 
-0.38694748466821971]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_array_rank2(self):
-      arg0=numpy.array([[-0.83417152417968299, 0.83688796349341943, -0.27671759181162559, -0.67424349443288167, 
--0.42278111327171874], [0.99320754959522506, -0.82405717801872003, -0.76061490742008808, 0.5386983552951472, 
--0.90805452020755628], [-0.54835914387487272, -0.87502977528875259, 0.6410277115607339, 0.33439192634626114, 
-0.053433089463401418], [0.32291094963350808, -0.30495569379510146, 0.5766949489189841, 0.12613166199354442, 
--0.36970324165010404]])
-      arg1=numpy.array([[0.71480188355203733, -0.80922817795802859, -0.19167944208480336, -0.40332523244781227, 
-0.40664695590425337], [-0.24805869736740882, 0.76973514026691303, 0.080936864295739319, 0.95644003803365796, 
--0.62680571189350576], [0.094574552319768079, 0.45665785511001311, -0.40597207626956666, 0.74668608783219925, 
--0.24298652271704668], [0.51320676722505087, 0.46491077097585576, -0.12305996770430627, -0.35470356431074013, 
--0.8913618557905405]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[0.71480188355203733, 0.83688796349341943, -0.19167944208480336, -0.40332523244781227, 
-0.40664695590425337], [0.99320754959522506, 0.76973514026691303, 0.080936864295739319, 0.95644003803365796, 
--0.62680571189350576], [0.094574552319768079, 0.45665785511001311, 0.6410277115607339, 0.74668608783219925, 
-0.053433089463401418], [0.51320676722505087, 0.46491077097585576, 0.5766949489189841, 0.12613166199354442, 
--0.36970324165010404]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_constData_rank2(self):
-      arg0=numpy.array(-0.304885788971)
-      arg1=Data(numpy.array([[-0.22172548151150773, -0.93904306211217503, 0.25957365759321482, 0.96193812818412838, 
--0.3025989293684388], [0.15322972106506172, -0.17624868576712505, -0.96966588216584459, -0.34755630024821937, 
--0.80746601605652324], [-0.29018139429836909, 0.43809370308475382, 0.11270049169675955, -0.082055163241442131, 
-0.54761620786381182], [0.48410554687630114, 0.36722666263652659, -0.013480413011818015, 0.05569938806142205, 
-0.87738343744750513]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[-0.22172548151150773, -0.30488578897068686, 0.25957365759321482, 0.96193812818412838, 
--0.3025989293684388], [0.15322972106506172, -0.17624868576712505, -0.30488578897068686, -0.30488578897068686, 
--0.30488578897068686], [-0.29018139429836909, 0.43809370308475382, 0.11270049169675955, -0.082055163241442131, 
-0.54761620786381182], [0.48410554687630114, 0.36722666263652659, -0.013480413011818015, 0.05569938806142205, 
-0.87738343744750513]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[-0.076997964172731859, -0.67651472726038619, 0.79667022354874106, -0.84019816840575978, 
-0.94360680273325759], [0.47038093139447756, -0.59450503868551907, -0.023296743257425589, -0.34991504516580862, 
-0.10421432583738932], [0.66486132511251816, -0.83990036625902253, -0.4366608776718115, 0.13311527467714845, 
-0.3382164722060923], [0.52398650977835115, -0.70218769667138736, 0.062518838539082466, 0.40994775955849438, 
--0.058568911794933065]])
-      arg1=Data(numpy.array([[0.40801392810258319, 0.55970232701195477, 0.53761617047533083, -0.97909149343422142, 
-0.98483751837359579], [0.17961521617799492, -0.22784069507161275, 0.1643289876635754, -0.37631266069934499, 
-0.11329288954069172], [0.14297194831055426, 0.17614343920854547, -0.22505241632107609, -0.40785463004531297, 
--0.3909325837682216], [-0.047415577352520666, 0.92663082365757532, 0.078178606632032466, 0.91281457271967104, 
-0.81139969205422791]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.40801392810258319, 0.55970232701195477, 0.79667022354874106, -0.84019816840575978, 
-0.98483751837359579], [0.47038093139447756, -0.22784069507161275, 0.1643289876635754, -0.34991504516580862, 
-0.11329288954069172], [0.66486132511251816, 0.17614343920854547, -0.22505241632107609, 0.13311527467714845, 
-0.3382164722060923], [0.52398650977835115, 0.92663082365757532, 0.078178606632032466, 0.91281457271967104, 
-0.81139969205422791]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_expandedData_rank2(self):
-      arg0=numpy.array(-0.8135239605)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.61388846009494302, 0.28085229667463008, 0.96966170418990538, 0.4756731086027064, 
-0.089044479963028111], [-0.22360355015236388, 0.6233791983511312, 0.68326777995318166, 0.54220296868399953, 
--0.75022793841884283], [-0.35635379209712803, -0.23282610888785338, 0.96092420087535979, -0.42869505675150421, 
-0.65750802195711344], [-0.42871508206319087, -0.56475764881159818, -0.96280950832962331, 0.40149040331234409, 
--0.26763005910436588]])+(1.-msk_arg1)*numpy.array([[0.39944561956393798, -0.43585902666808818, -0.58310182711372915, 
-0.0015142487710770869, 0.46901395376714472], [-0.87900855153850288, 0.38639011731442729, -0.95185702388174454, 
-0.53002944784207284, -0.73959003057720962], [0.53242706460536771, -0.50214820452948183, -0.54088517606287101, 
--0.68854716037107155, 0.39914930452741304], [0.017706305731783445, -0.37994166987594036, -0.78515827077432565, 
-0.61126257987463384, 0.453222031968322]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.61388846009494302, 0.28085229667463008, 0.96966170418990538, 0.4756731086027064, 
-0.089044479963028111], [-0.22360355015236388, 0.6233791983511312, 0.68326777995318166, 0.54220296868399953, 
--0.75022793841884283], [-0.35635379209712803, -0.23282610888785338, 0.96092420087535979, -0.42869505675150421, 
-0.65750802195711344], [-0.42871508206319087, -0.56475764881159818, -0.81352396050002107, 0.40149040331234409, 
--0.26763005910436588]])+(1.-msk_ref)*numpy.array([[0.39944561956393798, -0.43585902666808818, -0.58310182711372915, 
-0.0015142487710770869, 0.46901395376714472], [-0.81352396050002107, 0.38639011731442729, -0.81352396050002107, 
-0.53002944784207284, -0.73959003057720962], [0.53242706460536771, -0.50214820452948183, -0.54088517606287101, 
--0.68854716037107155, 0.39914930452741304], [0.017706305731783445, -0.37994166987594036, -0.78515827077432565, 
-0.61126257987463384, 0.453222031968322]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[-0.78653766932808744, -0.079549862437257701, -0.97814835106959053, 0.040719482339229174, 
--0.97962562375604301], [-0.40079581080394244, -0.09401787400557815, 0.62166778688084201, -0.75199001510197849, 
-0.20816228185381469], [0.0095398820105889737, -0.68544916461350902, 0.60254682946002269, -0.5420118338827502, 
-0.088366583114217079], [-0.14450048156635842, 0.54026628193149651, -0.61281491161900647, 0.94473957477532911, 
-0.041380925722077633]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.5466488143349244, -0.99031514955758526, -0.0376062612628143, -0.96730469425974897, 
-0.35607274289209556], [-0.8471312962686266, -0.54896276227621144, -0.63471248523310386, -0.24615168151838396, 
--0.25723265379342197], [0.049145120793863128, 0.41925950625254549, 0.053557161047377511, -0.3343699299117846, 
-0.084647011122490401], [0.14946012103736361, 0.80747938071502534, 0.91500285776142665, -0.39265567276306723, 
-0.92295370825448098]])+(1.-msk_arg1)*numpy.array([[0.54379962366779711, -0.78061481958224044, 0.050683010869727596, 
--0.93957509919839777, -0.83910628271728838], [0.85987841725590952, -0.55992543465972155, -0.49874145776952972, 
--0.054873430290065972, -0.44738464167107428], [-0.42793766792957233, 0.13909111370769045, 0.39594342406841165, 
-0.69552748643520901, -0.29658339184532245], [-0.053113369145769695, -0.88956129876827283, -0.56416742238479545, 
--0.71325747423089059, 0.21741601018126056]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.5466488143349244, -0.079549862437257701, -0.0376062612628143, 0.040719482339229174, 
-0.35607274289209556], [-0.40079581080394244, -0.09401787400557815, 0.62166778688084201, -0.24615168151838396, 
-0.20816228185381469], [0.049145120793863128, 0.41925950625254549, 0.60254682946002269, -0.3343699299117846, 
-0.088366583114217079], [0.14946012103736361, 0.80747938071502534, 0.91500285776142665, 0.94473957477532911, 
-0.92295370825448098]])+(1.-msk_ref)*numpy.array([[0.54379962366779711, -0.079549862437257701, 0.050683010869727596, 
-0.040719482339229174, -0.83910628271728838], [0.85987841725590952, -0.09401787400557815, 0.62166778688084201, 
--0.054873430290065972, 0.20816228185381469], [0.0095398820105889737, 0.13909111370769045, 0.60254682946002269, 
-0.69552748643520901, 0.088366583114217079], [-0.053113369145769695, 0.54026628193149651, -0.56416742238479545, 
-0.94473957477532911, 0.21741601018126056]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_array_rank3(self):
-      arg0=numpy.array(0.206495354305)
-      arg1=numpy.array([[[-0.28919465172476477, 0.73115741235130649], [0.66849766546201494, 0.32380315894628775]], 
-[[0.34229286100657319, 0.89978338241535871], [-0.94517862805279029, -0.76245816228020713]], [[-0.33058799974889852, 
-0.91202625598008713], [-0.056699425352694677, -0.96047331967606175]], [[-0.18669649213118422, 0.89626981818651652], 
-[0.12998045639700662, 0.48782120229237735]], [[-0.15134137439915119, -0.88244397684457598], [-0.52188376295396921, 
--0.81844180102396336]], [[-0.94590032799150481, -0.89329016632804104], [0.96506970958692784, -0.7503920073950836]]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[0.20649535430469368, 0.73115741235130649], [0.66849766546201494, 0.32380315894628775]], 
-[[0.34229286100657319, 0.89978338241535871], [0.20649535430469368, 0.20649535430469368]], [[0.20649535430469368, 
-0.91202625598008713], [0.20649535430469368, 0.20649535430469368]], [[0.20649535430469368, 0.89626981818651652], 
-[0.20649535430469368, 0.48782120229237735]], [[0.20649535430469368, 0.20649535430469368], [0.20649535430469368, 
-0.20649535430469368]], [[0.20649535430469368, 0.20649535430469368], [0.96506970958692784, 0.20649535430469368]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank3_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[0.0, 6.0, 2.0], [-2.0, 3.0, -2.0], [3.0, -7.0, -4.0], [2.0, 1.0, -5.0]], [[-1.0, 1.0, -1.0], 
+[-7.0, 0.0, -3.0], [-4.0, -4.0, 0.0], [3.0, 2.0, 0.0]]]),self.functionspace)
+      arg1=numpy.array([[[[0.0, -4.0], [4.0, -7.0], [-2.0, -1.0]], [[-2.0, -2.0], [5.0, 0.0], [-5.0, -7.0]], [[-5.0, -3.0], 
+[0.0, 6.0], [-4.0, 7.0]], [[2.0, 1.0], [0.0, 6.0], [-3.0, -3.0]]], [[[-7.0, 0.0], [5.0, -3.0], [-2.0, -1.0]], [[-3.0, 4.0], 
+[2.0, -6.0], [-6.0, 4.0]], [[-4.0, -1.0], [-1.0, 2.0], [1.0, -7.0]], [[7.0, 3.0], [4.0, 5.0], [0.0, 5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([171.0, -109.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_array_rank3(self):
-      arg0=numpy.array([[[0.39235233572087225, 0.74304758249838065], [-0.66779588135394619, 0.9432836579138042]], 
-[[0.49351107181892084, -0.54694467231291211], [0.99103217822194889, -0.54216696018531252]], [[-0.8175841098544685, 
-0.8326990222625672], [0.055153398295502587, -0.069716551616386457]], [[0.77626178147117608, 0.11964332061737948], 
-[0.63436115410214011, 0.45842546157944164]], [[0.74397226514682946, -0.77625932725898372], [0.31696360097990373, 
-0.0024321261945943196]], [[-0.65200916938862652, -0.66937271743063431], [0.32954705135201956, -0.16907363126350994]]])
-      arg1=numpy.array([[[-0.50482866899770862, -0.44765629013986286], [0.06780136207618459, 0.15558669698070049]], 
-[[0.044218703621608846, 0.2249976385020942], [0.65123878442216898, 0.65553773857321596]], [[-0.17880284508873401, 
--0.12255713511715682], [-0.10992299072827882, 0.7685617836322296]], [[0.91958169502841858, -0.44956276558073194], 
-[0.31549165750027508, -0.68010957917212078]], [[-0.8629768256097865, 0.026136425252384576], [-0.71708710148747556, 
-0.30781358079440957]], [[0.41046623722164766, -0.91807050647819977], [-0.80193690343803214, 0.39991444698935408]]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[0.39235233572087225, 0.74304758249838065], [0.06780136207618459, 0.9432836579138042]], 
-[[0.49351107181892084, 0.2249976385020942], [0.99103217822194889, 0.65553773857321596]], [[-0.17880284508873401, 
-0.8326990222625672], [0.055153398295502587, 0.7685617836322296]], [[0.91958169502841858, 0.11964332061737948], 
-[0.63436115410214011, 0.45842546157944164]], [[0.74397226514682946, 0.026136425252384576], [0.31696360097990373, 
-0.30781358079440957]], [[0.41046623722164766, -0.66937271743063431], [0.32954705135201956, 0.39991444698935408]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank0_array_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg1=numpy.array([[5.0, -3.0, 1.0, 0.0, 6.0], [-5.0, -6.0, -7.0, -2.0, -2.0], [-6.0, -6.0, -6.0, 6.0, -6.0], [-4.0, 7.0, 
+-5.0, -5.0, -3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, -0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 0.0, -0.0], [-0.0, 
+0.0, -0.0, -0.0, -0.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_constData_rank3(self):
-      arg0=numpy.array(0.378728231479)
-      arg1=Data(numpy.array([[[-0.67114944879927396, -0.16379812287341133], [-0.9257424893497439, -0.39645982000198798]], 
-[[0.9478088084230436, -0.18879856392144134], [-0.16336027795938834, -0.77606729529959839]], [[0.1844003363969049, 
-0.78778704269394706], [-0.28578747268227223, 0.64431707984038233]], [[0.68238252707515246, 0.06834327476896096], 
-[0.55758618402198645, -0.27105782153341762]], [[0.83653411523399557, -0.36510045139192182], [-0.013797618027125758, 
-0.11305598817590523]], [[0.9030275523114546, 0.86927059946280005], [0.79084757115115578, 
--0.51570522549785514]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.37872823147870549, 0.37872823147870549], [0.37872823147870549, 0.37872823147870549]], 
-[[0.9478088084230436, 0.37872823147870549], [0.37872823147870549, 0.37872823147870549]], [[0.37872823147870549, 
-0.78778704269394706], [0.37872823147870549, 0.64431707984038233]], [[0.68238252707515246, 0.37872823147870549], 
-[0.55758618402198645, 0.37872823147870549]], [[0.83653411523399557, 0.37872823147870549], [0.37872823147870549, 
-0.37872823147870549]], [[0.9030275523114546, 0.86927059946280005], [0.79084757115115578, 
-0.37872823147870549]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_array_rank3_offset1(self):
+      arg0=Data(numpy.array([3.0, -2.0, -3.0]),self.functionspace)
+      arg1=numpy.array([[[-6.0, -2.0, -3.0, 5.0, -4.0], [-5.0, 6.0, 6.0, 0.0, -1.0], [0.0, -5.0, 6.0, -5.0, 0.0], [1.0, -2.0, 
+-4.0, 7.0, 4.0]], [[-6.0, -2.0, -6.0, -3.0, -7.0], [-5.0, 2.0, -2.0, 0.0, 4.0], [4.0, -3.0, 0.0, -1.0, -6.0], [7.0, 0.0, -3.0, 
+6.0, 0.0]], [[0.0, -6.0, -1.0, 5.0, -4.0], [0.0, 3.0, 2.0, 2.0, 0.0], [3.0, -6.0, 1.0, 0.0, 6.0], [1.0, 0.0, -1.0, -3.0, 
+-5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-6.0, 16.0, 6.0, 6.0, 14.0], [-5.0, 5.0, 16.0, -6.0, -11.0], [-17.0, 9.0, 15.0, -13.0, -6.0], 
+[-14.0, -6.0, -3.0, 18.0, 27.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_constData_rank3(self):
-      arg0=numpy.array([[[0.18144247762408483, -0.78353539631767855], [0.4162761253699141, 0.86266675194423259]], 
-[[0.012556149953617091, 0.4804386420113258], [-0.76805986046045316, 0.14356514697520395]], [[0.49194772346347282, 
--0.092267796433379345], [-0.26102733986309756, 0.41571439368388496]], [[0.10264134639034794, -0.080200667814620541], 
-[-0.63587157924917848, 0.18913827649625636]], [[-0.36058395425965362, 0.77598983861399407], [-0.73989677505891915, 
--0.1411309114240975]], [[0.34868774774129974, 0.19384418036852469], [-0.637183036828326, -0.19633048544319909]]])
-      arg1=Data(numpy.array([[[0.83338557285258363, 0.075765655696657497], [-0.034150038711153075, 0.48867409214454072]], 
-[[-0.016093860376023894, 0.2815160832699517], [-0.61553678302662829, -0.14883913383260139]], [[-0.94569473686322292, 
-0.50994618929453117], [-0.42494790481694533, -0.1667068481277989]], [[0.19933276666126143, 0.57718400900736966], 
-[-0.51588024821082401, -0.65798936279151676]], [[-0.90857839351892578, 0.80942308915069616], [-0.75446107420460651, 
-0.50588344731088331]], [[0.38538650065235491, 0.81707429971303891], [-0.97815096479177388, 
--0.71051070913370973]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.83338557285258363, 0.075765655696657497], [0.4162761253699141, 0.86266675194423259]], 
-[[0.012556149953617091, 0.4804386420113258], [-0.61553678302662829, 0.14356514697520395]], [[0.49194772346347282, 
-0.50994618929453117], [-0.26102733986309756, 0.41571439368388496]], [[0.19933276666126143, 0.57718400900736966], 
-[-0.51588024821082401, 0.18913827649625636]], [[-0.36058395425965362, 0.80942308915069616], [-0.73989677505891915, 
-0.50588344731088331]], [[0.38538650065235491, 0.81707429971303891], [-0.637183036828326, 
--0.19633048544319909]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[0.0, -2.0, -1.0], [-3.0, 6.0, 7.0]]),self.functionspace)
+      arg1=numpy.array([[[[1.0, -3.0, 7.0, 0.0, -7.0], [2.0, 4.0, -4.0, -7.0, 1.0], [6.0, 6.0, 2.0, 1.0, 0.0], [7.0, -2.0, 4.0, 
+0.0, -7.0]], [[6.0, -7.0, 4.0, 4.0, 3.0], [-3.0, 2.0, -6.0, 0.0, -5.0], [3.0, 1.0, 1.0, 1.0, -6.0], [7.0, 5.0, -6.0, 2.0, 
+-5.0]], [[0.0, -4.0, 0.0, 0.0, -5.0], [7.0, 0.0, -4.0, -6.0, -6.0], [-4.0, -2.0, 3.0, 2.0, -3.0], [-4.0, 0.0, 5.0, -2.0, 
+-6.0]]], [[[-1.0, 7.0, -5.0, 7.0, 7.0], [5.0, -3.0, 5.0, -4.0, 2.0], [-2.0, 4.0, 5.0, 5.0, 7.0], [-3.0, 3.0, 7.0, -2.0, -3.0]], 
+[[-7.0, -4.0, 5.0, 5.0, -3.0], [-3.0, 2.0, -6.0, -5.0, 5.0], [-6.0, -2.0, 0.0, -1.0, -6.0], [7.0, -1.0, 0.0, 1.0, 2.0]], [[1.0, 
+4.0, 0.0, -7.0, 3.0], [-1.0, 0.0, 0.0, 1.0, -2.0], [-3.0, 2.0, 0.0, 2.0, -1.0], [5.0, -7.0, -4.0, 0.0, 0.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-44.0, 1.0, 37.0, -48.0, -19.0], [-41.0, 17.0, -35.0, -5.0, 26.0], [-53.0, -10.0, -20.0, -11.0, 
+-49.0], [76.0, -74.0, -42.0, 10.0, 37.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_expandedData_rank3(self):
-      arg0=numpy.array(-0.609061899567)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.02221934064502995, -0.24823677577161973], [0.21094272664364166, -0.55842446834946635]], 
-[[0.42482246714205973, 0.06867811566792148], [-0.09860813606919594, -0.38907891589509846]], [[0.040756602755701365, 
--0.56155860925355627], [-0.63505984155662887, 0.1755095121350585]], [[-0.66997146937465057, 0.29725734526569592], 
-[-0.2396248349932053, -0.32831714430302616]], [[0.4825884611716833, 0.52633576472674903], [0.21070943365647499, 
-0.27856846579068084]], [[-0.0073100047866563322, -0.25318043364058052], [-0.34499905875957904, 
--0.1738541124162174]]])+(1.-msk_arg1)*numpy.array([[[-0.54275150799677596, 0.048651829704920102], [0.50592847793838391, 
--0.6263705525173533]], [[0.67364333189053371, 0.56674993507685767], [0.65430400632474917, 0.80805941287995409]], 
-[[0.064865726857806116, 0.56140841973052491], [-0.22773339570038464, 0.11192902757904855]], [[0.39747464964694235, 
--0.071536903509030747], [0.0085715500683487544, -0.69734624746017571]], [[-0.39876917998500661, 0.63390636634158959], 
-[-0.39861821315858226, -0.35254308646570043]], [[0.14082903951981685, -0.99563200824916698], [0.086951946864466167, 
-0.57962945075783878]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.02221934064502995, -0.24823677577161973], [0.21094272664364166, -0.55842446834946635]], 
-[[0.42482246714205973, 0.06867811566792148], [-0.09860813606919594, -0.38907891589509846]], [[0.040756602755701365, 
--0.56155860925355627], [-0.60906189956736645, 0.1755095121350585]], [[-0.60906189956736645, 0.29725734526569592], 
-[-0.2396248349932053, -0.32831714430302616]], [[0.4825884611716833, 0.52633576472674903], [0.21070943365647499, 
-0.27856846579068084]], [[-0.0073100047866563322, -0.25318043364058052], [-0.34499905875957904, 
--0.1738541124162174]]])+(1.-msk_ref)*numpy.array([[[-0.54275150799677596, 0.048651829704920102], [0.50592847793838391, 
--0.60906189956736645]], [[0.67364333189053371, 0.56674993507685767], [0.65430400632474917, 0.80805941287995409]], 
-[[0.064865726857806116, 0.56140841973052491], [-0.22773339570038464, 0.11192902757904855]], [[0.39747464964694235, 
--0.071536903509030747], [0.0085715500683487544, -0.60906189956736645]], [[-0.39876917998500661, 0.63390636634158959], 
-[-0.39861821315858226, -0.35254308646570043]], [[0.14082903951981685, -0.60906189956736645], [0.086951946864466167, 
-0.57962945075783878]]])
+   def test_generalTensorProduct_constData_rank0_array_rank3_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      arg1=numpy.array([[[-6.0, -2.0], [0.0, 7.0]], [[-3.0, 7.0], [-5.0, 3.0]], [[-6.0, -3.0], [0.0, 3.0]], [[-7.0, 0.0], [2.0, 
+-1.0]], [[6.0, 1.0], [5.0, 4.0]], [[7.0, -7.0], [-4.0, 1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-36.0, -12.0], [0.0, 42.0]], [[-18.0, 42.0], [-30.0, 18.0]], [[-36.0, -18.0], [0.0, 18.0]], 
+[[-42.0, 0.0], [12.0, -6.0]], [[36.0, 6.0], [30.0, 24.0]], [[42.0, -42.0], [-24.0, 6.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank3_expandedData_rank3(self):
-      arg0=numpy.array([[[0.38841144894036916, 0.92715868690960357], [-0.77447087138717952, 0.36220771166763188]], 
-[[-0.16230793101547336, 0.49331094494024885], [-0.46865610524207124, -0.034121204544792283]], [[0.60386974342368327, 
-0.2626947818589247], [0.93855252670546929, 0.3634155608194618]], [[0.57612389585726764, 0.92358799548671633], 
-[-0.299282269070823, 0.63505715881940072]], [[-0.42338854353484456, -0.42092239793600861], [0.95171309029484008, 
-0.66415309416591728]], [[-0.54765368059109276, 0.23554498111650468], [0.76618949130819791, -0.3948153453377552]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.9266725179072941, 0.53090206757564506], [-0.59713986747580439, 0.076267888409365936]], 
-[[0.22324371017712408, 0.87148261272246397], [-0.67623763534981807, 0.52405697820419905]], [[-0.097525537051566191, 
-0.89706368891826105], [-0.3810691076053736, 0.013402757258889952]], [[0.5113244637433414, -0.55238850920540195], 
-[-0.99749026942641228, 0.67337322595687987]], [[-0.7550449944751183, -0.80888632434803931], [0.5666662381666081, 
-0.79044507419751109]], [[0.54280750281353374, -0.52462690319031169], [-0.75601693543054327, 
--0.63628825071666228]]])+(1.-msk_arg1)*numpy.array([[[0.33073885193792507, 0.46494205056802484], [-0.0093783968795420058, 
--0.99272021120250731]], [[-0.50160691421559145, 0.7830226406524603], [0.7158546638991472, 0.10681849654155018]], 
-[[-0.65696144464899331, 0.25217540916152914], [-0.93176795276651858, 0.2468866135972112]], [[0.63556079393859766, 
-0.91078215014392927], [0.11430987826908967, 0.4340935122722549]], [[0.50475199331880161, 0.74420618264664129], 
-[-0.068579135846449146, 0.7950673667181396]], [[0.41364534013008858, -0.49894363315644497], [-0.46943702047349745, 
-0.72811686317254676]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.9266725179072941, 0.92715868690960357], [-0.59713986747580439, 0.36220771166763188]], 
-[[0.22324371017712408, 0.87148261272246397], [-0.46865610524207124, 0.52405697820419905]], [[0.60386974342368327, 
-0.89706368891826105], [0.93855252670546929, 0.3634155608194618]], [[0.57612389585726764, 0.92358799548671633], 
-[-0.299282269070823, 0.67337322595687987]], [[-0.42338854353484456, -0.42092239793600861], [0.95171309029484008, 
-0.79044507419751109]], [[0.54280750281353374, 0.23554498111650468], [0.76618949130819791, 
--0.3948153453377552]]])+(1.-msk_ref)*numpy.array([[[0.38841144894036916, 0.92715868690960357], [-0.0093783968795420058, 
-0.36220771166763188]], [[-0.16230793101547336, 0.7830226406524603], [0.7158546638991472, 0.10681849654155018]], 
-[[0.60386974342368327, 0.2626947818589247], [0.93855252670546929, 0.3634155608194618]], [[0.63556079393859766, 
-0.92358799548671633], [0.11430987826908967, 0.63505715881940072]], [[0.50475199331880161, 0.74420618264664129], 
-[0.95171309029484008, 0.7950673667181396]], [[0.41364534013008858, 0.23554498111650468], [0.76618949130819791, 
-0.72811686317254676]]])
+   def test_generalTensorProduct_constData_rank1_array_rank4_offset1(self):
+      arg0=Data(numpy.array([-1.0, -5.0, 3.0]),self.functionspace)
+      arg1=numpy.array([[[[1.0, -2.0], [3.0, 3.0]], [[-6.0, 5.0], [7.0, 7.0]], [[-4.0, 6.0], [-5.0, 5.0]], [[-1.0, 4.0], [-3.0, 
+2.0]], [[5.0, -1.0], [-2.0, 3.0]], [[-4.0, 2.0], [-5.0, -2.0]]], [[[-2.0, 4.0], [1.0, -6.0]], [[-1.0, 0.0], [-5.0, 0.0]], 
+[[1.0, -5.0], [-7.0, 0.0]], [[3.0, -2.0], [1.0, 4.0]], [[-7.0, -4.0], [-3.0, -2.0]], [[6.0, 4.0], [1.0, -5.0]]], [[[7.0, 7.0], 
+[2.0, -2.0]], [[6.0, -2.0], [-7.0, 3.0]], [[0.0, -5.0], [-4.0, 6.0]], [[-2.0, -2.0], [5.0, -3.0]], [[-4.0, -4.0], [1.0, -3.0]], 
+[[3.0, -3.0], [-5.0, 0.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[30.0, 3.0], [-2.0, 21.0]], [[29.0, -11.0], [-3.0, 2.0]], [[-1.0, 4.0], [28.0, 13.0]], [[-20.0, 
+0.0], [13.0, -31.0]], [[18.0, 9.0], [20.0, -2.0]], [[-17.0, -31.0], [-15.0, 27.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_array_rank4(self):
-      arg0=numpy.array(0.129171289856)
-      arg1=numpy.array([[[[0.3673768442593579, 0.11571490160281228, -0.64517552668077371, 0.21138864531232571], 
-[-0.17300389051526821, 0.38561202294913177, -0.7799425045145012, 0.91789518329451791], [0.44295986488382333, 
--0.56752817407673462, -0.67717388658505007, -0.13952018204273786]], [[-0.76623182406287338, 0.85573861149727271, 
--0.95164332684139752, 0.86720827147905721], [0.74534759751714708, 0.50799031619007984, -0.41362920053940533, 
--0.36619696053715045], [0.6430492090475719, 0.082871936976270044, -0.68180628674605592, -0.92951630862957102]]], 
-[[[0.29463597351945991, -0.58173079797975968, -0.7230223183212805, 0.61668827498944934], [0.57368054758243181, 
-0.3467677103973561, -0.86059141654013738, -0.14937151897206813], [-0.75121283127075067, -0.69342076558479571, 
--0.29776459669994493, -0.29380111352128369]], [[-0.61904618645811826, 0.037206696855934807, -0.30720321824196484, 
--0.42828827933323077], [0.94459053163673512, 0.75017970241763399, -0.024543351104895805, 0.7317992761434462], 
-[-0.68772557726122208, -0.26921105423467973, -0.33303964038314393, 0.88689290884788208]]], [[[0.19931943871727253, 
-0.50620323919947507, 0.026887179304865505, 0.9726645366564568], [0.39022216572404478, 0.20642036994395507, 0.58810510782489067, 
-0.022525598659116186], [0.29380513762421545, -0.51206092926883473, 0.23740794951394628, 0.83348785598584829]], 
-[[0.82449928560496843, -0.88047679800160905, 0.0437070552148493, -0.33527652724059176], [-0.15159772508509795, 
--0.45358363740648411, -0.51667738655965545, 0.5776497411681254], [0.9659629370206908, -0.41135044415686139, 
--0.37504198978467462, -0.36072733216551578]]]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[[0.3673768442593579, 0.1291712898560109, 0.1291712898560109, 0.21138864531232571], 
-[0.1291712898560109, 0.38561202294913177, 0.1291712898560109, 0.91789518329451791], [0.44295986488382333, 0.1291712898560109, 
-0.1291712898560109, 0.1291712898560109]], [[0.1291712898560109, 0.85573861149727271, 0.1291712898560109, 0.86720827147905721], 
-[0.74534759751714708, 0.50799031619007984, 0.1291712898560109, 0.1291712898560109], [0.6430492090475719, 0.1291712898560109, 
-0.1291712898560109, 0.1291712898560109]]], [[[0.29463597351945991, 0.1291712898560109, 0.1291712898560109, 
-0.61668827498944934], [0.57368054758243181, 0.3467677103973561, 0.1291712898560109, 0.1291712898560109], [0.1291712898560109, 
-0.1291712898560109, 0.1291712898560109, 0.1291712898560109]], [[0.1291712898560109, 0.1291712898560109, 0.1291712898560109, 
-0.1291712898560109], [0.94459053163673512, 0.75017970241763399, 0.1291712898560109, 0.7317992761434462], [0.1291712898560109, 
-0.1291712898560109, 0.1291712898560109, 0.88689290884788208]]], [[[0.19931943871727253, 0.50620323919947507, 
-0.1291712898560109, 0.9726645366564568], [0.39022216572404478, 0.20642036994395507, 0.58810510782489067, 0.1291712898560109], 
-[0.29380513762421545, 0.1291712898560109, 0.23740794951394628, 0.83348785598584829]], [[0.82449928560496843, 
-0.1291712898560109, 0.1291712898560109, 0.1291712898560109], [0.1291712898560109, 0.1291712898560109, 0.1291712898560109, 
-0.5776497411681254], [0.9659629370206908, 0.1291712898560109, 0.1291712898560109, 0.1291712898560109]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_array_rank4(self):
-      arg0=numpy.array([[[[-0.65015954456679181, 0.40240408318498599, 0.84464712425699462, -0.43969720683132807], 
-[0.060269909487150608, -0.74687444707146433, -0.6437215821030513, 0.50694044142420136], [-0.95651303413075461, 
-0.30077769940421639, -0.88469041671271231, 0.35428303244641701]], [[-0.64479714996431903, -0.02806358507098361, 
-0.17146951356917417, 0.17856182601303572], [0.82338647213827665, 0.62775989519430597, 0.98131295897678883, 
--0.27925295851008336], [-0.077888587859346714, 0.39299547141403646, -0.76703658182228662, 0.69803559132588267]]], 
-[[[-0.60438450369130425, 0.50974341740755325, 0.2628982550897998, 0.62253269815816936], [0.098454268427629721, 
--0.11354020704871637, 0.97520314368136374, 0.82424110975204568], [0.15014068269747205, -0.42103180617954483, 
-0.90299092501087008, -0.23139020793721432]], [[0.76941820515528692, -0.1765839158818503, -0.5913087365745302, 
-0.7161045583038077], [0.85854815816198493, 0.024439202303835561, -0.75033601915149672, 0.47128628281539831], 
-[-0.41886779770164062, -0.18310623967189343, -0.6230995563003221, 0.9482826576576675]]], [[[0.094084288889770606, 
--0.1009961699861317, -0.24821425388692853, -0.70296524988401554], [0.67010687729768903, 0.57353374648941413, 
-0.81190592473146639, 0.99708169066638397], [-0.37503932645378679, -0.24423377176761285, -0.18549806495578736, 
--0.47985036549736715]], [[0.62433786823811555, 0.22620666330362238, -0.18049352036474309, 0.99051652854626893], 
-[-0.3286392033550134, 0.83921438988823871, 0.68465908457587843, 0.44769792179940149], [0.11216755461815131, 
-0.21844427393884125, -0.42328115351224671, -0.85880777265173469]]]])
-      arg1=numpy.array([[[[-0.73093615882935814, -0.70919589053874077, 0.78870394532867283, -0.50159810974536545], 
-[-0.85519344422155075, -0.56155628934300195, -0.62373278444802516, -0.9772447843857226], [0.87755710000772535, 
--0.013588596244209494, -0.90114581352274459, 0.55410820192830745]], [[-0.72956039379052307, -0.35348269136869503, 
--0.42184790113450843, -0.89870920570023705], [-0.14489448657028414, -0.91755892231285974, 0.89607768435234414, 
-0.4058334012935787], [-0.55720951018176401, 0.90451728855028346, -0.54876588909958501, 0.70078916216098674]]], 
-[[[0.84626531438079744, 0.45264260263683553, 0.12965000086402689, -0.021003962192429393], [-0.27005492904656037, 
-0.55590537183241318, -0.24978960230861946, 0.92321598749374068], [0.016189016341156437, -0.35579544797087137, 
-0.62297910324803074, 0.10682842803458792]], [[-0.5264656932595686, 0.044463460549419409, -0.73796856857767978, 
-0.16294987868437039], [0.78510668328973954, 0.756487852598553, 0.44081375563129299, -0.60856363687850457], 
-[0.60854054966272164, 0.83451336734693471, 0.71676784780975211, 0.7477674423454328]]], [[[0.94511009490633557, 
--0.45500546126530228, -0.27748406592529928, -0.11960260520462684], [0.83727559558880982, 0.6973251313608686, 
-0.43086624118575867, 0.0099152218565310424], [0.18361709779587665, 0.53065002315173349, 0.45664732903855709, 
-0.71620430423422099]], [[-0.60506520502917138, 0.69610912235182143, -0.10835353752278154, -0.63873781536516083], 
-[-0.80308848611516837, 0.54896014232641921, 0.48999568478728261, 0.075051256341975181], [0.00034354126399538387, 
-0.14982509954067424, 0.33039570291905651, -0.95215296115442083]]]])
-      res=maximum(arg0,arg1)
-      ref=numpy.array([[[[-0.65015954456679181, 0.40240408318498599, 0.84464712425699462, -0.43969720683132807], 
-[0.060269909487150608, -0.56155628934300195, -0.62373278444802516, 0.50694044142420136], [0.87755710000772535, 
-0.30077769940421639, -0.88469041671271231, 0.55410820192830745]], [[-0.64479714996431903, -0.02806358507098361, 
-0.17146951356917417, 0.17856182601303572], [0.82338647213827665, 0.62775989519430597, 0.98131295897678883, 0.4058334012935787], 
-[-0.077888587859346714, 0.90451728855028346, -0.54876588909958501, 0.70078916216098674]]], [[[0.84626531438079744, 
-0.50974341740755325, 0.2628982550897998, 0.62253269815816936], [0.098454268427629721, 0.55590537183241318, 0.97520314368136374, 
-0.92321598749374068], [0.15014068269747205, -0.35579544797087137, 0.90299092501087008, 0.10682842803458792]], 
-[[0.76941820515528692, 0.044463460549419409, -0.5913087365745302, 0.7161045583038077], [0.85854815816198493, 0.756487852598553, 
-0.44081375563129299, 0.47128628281539831], [0.60854054966272164, 0.83451336734693471, 0.71676784780975211, 
-0.9482826576576675]]], [[[0.94511009490633557, -0.1009961699861317, -0.24821425388692853, -0.11960260520462684], 
-[0.83727559558880982, 0.6973251313608686, 0.81190592473146639, 0.99708169066638397], [0.18361709779587665, 0.53065002315173349, 
-0.45664732903855709, 0.71620430423422099]], [[0.62433786823811555, 0.69610912235182143, -0.10835353752278154, 
-0.99051652854626893], [-0.3286392033550134, 0.83921438988823871, 0.68465908457587843, 0.44769792179940149], 
-[0.11216755461815131, 0.21844427393884125, 0.33039570291905651, -0.85880777265173469]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_constData_rank4(self):
-      arg0=numpy.array(-0.943242637062)
-      arg1=Data(numpy.array([[[[0.46673989197448695, 0.6549649376118345, 0.9984111355226466, -0.70351419152946271], 
-[0.71307312699624026, 0.5419548297460679, -0.17409109440608583, -0.97014228996198115], [-0.54280492332372599, 
-0.86380903975785861, -0.34701233365455697, 0.48567075553942263]], [[0.54700266237459316, -0.35248705368749378, 
-0.23377808128753208, 0.96721598543765519], [0.88430869613619123, -0.1219865051849538, -0.058637092978300664, 
--0.61754559413262333], [0.74079280717308227, -0.78739161180686512, 0.85037530898787361, 0.16508890280036592]]], 
-[[[0.44817727199203761, 0.8926307678886285, -0.76111914551638038, 0.14362232256439045], [-0.48467388532021149, 
--0.8094428609146751, 0.53535210524492927, -0.56637649678780466], [0.98969180896200037, -0.3271162647098742, 
-0.69094018879758989, -0.61586242247168044]], [[-0.36044332609306107, -0.98997760997627204, 0.90220389283531444, 
--0.60156374176429561], [0.40405941425843839, 0.4234467099813175, -0.95866754182894565, 0.8344078032898532], 
-[-0.48131027576552698, -0.59963997992966767, -0.83658860482593256, -0.75913735933586257]]], [[[0.88365651759965269, 
-0.89012413369555121, -0.4898888357384561, 0.67718373616908689], [0.32819567260296134, -0.89006474342304842, 
--0.58497923437075872, -0.025361716234509002], [-0.27583713562824563, -0.1438801449075906, 0.75117793183554871, 
--0.44679974659724797]], [[0.71819263148139534, -0.73238371283246728, -0.92822578406489709, -0.13704547005331813], 
-[0.13259671454727084, -0.45302324436441288, -0.28335401748666711, 0.32261970225996106], [0.90169925985201749, 
-0.89781229478225999, -0.54573322813790259, -0.22215533008165655]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.46673989197448695, 0.6549649376118345, 0.9984111355226466, -0.70351419152946271], 
-[0.71307312699624026, 0.5419548297460679, -0.17409109440608583, -0.94324263706204037], [-0.54280492332372599, 
-0.86380903975785861, -0.34701233365455697, 0.48567075553942263]], [[0.54700266237459316, -0.35248705368749378, 
-0.23377808128753208, 0.96721598543765519], [0.88430869613619123, -0.1219865051849538, -0.058637092978300664, 
--0.61754559413262333], [0.74079280717308227, -0.78739161180686512, 0.85037530898787361, 0.16508890280036592]]], 
-[[[0.44817727199203761, 0.8926307678886285, -0.76111914551638038, 0.14362232256439045], [-0.48467388532021149, 
--0.8094428609146751, 0.53535210524492927, -0.56637649678780466], [0.98969180896200037, -0.3271162647098742, 
-0.69094018879758989, -0.61586242247168044]], [[-0.36044332609306107, -0.94324263706204037, 0.90220389283531444, 
--0.60156374176429561], [0.40405941425843839, 0.4234467099813175, -0.94324263706204037, 0.8344078032898532], 
-[-0.48131027576552698, -0.59963997992966767, -0.83658860482593256, -0.75913735933586257]]], [[[0.88365651759965269, 
-0.89012413369555121, -0.4898888357384561, 0.67718373616908689], [0.32819567260296134, -0.89006474342304842, 
--0.58497923437075872, -0.025361716234509002], [-0.27583713562824563, -0.1438801449075906, 0.75117793183554871, 
--0.44679974659724797]], [[0.71819263148139534, -0.73238371283246728, -0.92822578406489709, -0.13704547005331813], 
-[0.13259671454727084, -0.45302324436441288, -0.28335401748666711, 0.32261970225996106], [0.90169925985201749, 
-0.89781229478225999, -0.54573322813790259, -0.22215533008165655]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_array_rank4_offset0(self):
+      arg0=Data(-7.0,self.functionspace)
+      arg1=numpy.array([[[[5.0, -7.0, 6.0, -7.0], [6.0, 3.0, -6.0, -5.0], [0.0, -7.0, 6.0, 6.0]], [[6.0, 3.0, 0.0, -1.0], [6.0, 
+0.0, 0.0, -3.0], [-5.0, -3.0, 7.0, 0.0]]], [[[-7.0, -2.0, 0.0, 0.0], [7.0, -2.0, 6.0, 2.0], [-3.0, -7.0, 1.0, -1.0]], [[2.0, 
+-7.0, 7.0, -3.0], [-5.0, -1.0, 2.0, -2.0], [-2.0, -4.0, -7.0, 2.0]]], [[[3.0, 6.0, -6.0, 7.0], [5.0, 0.0, 5.0, -5.0], [-7.0, 
+6.0, -2.0, -6.0]], [[6.0, -2.0, 3.0, 2.0], [4.0, 1.0, 1.0, -4.0], [-4.0, 3.0, -7.0, -1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-35.0, 49.0, -42.0, 49.0], [-42.0, -21.0, 42.0, 35.0], [-0.0, 49.0, -42.0, -42.0]], [[-42.0, 
+-21.0, -0.0, 7.0], [-42.0, -0.0, -0.0, 21.0], [35.0, 21.0, -49.0, -0.0]]], [[[49.0, 14.0, -0.0, -0.0], [-49.0, 14.0, -42.0, 
+-14.0], [21.0, 49.0, -7.0, 7.0]], [[-14.0, 49.0, -49.0, 21.0], [35.0, 7.0, -14.0, 14.0], [14.0, 28.0, 49.0, -14.0]]], [[[-21.0, 
+-42.0, 42.0, -49.0], [-35.0, -0.0, -35.0, 35.0], [49.0, -42.0, 14.0, 42.0]], [[-42.0, 14.0, -21.0, -14.0], [-28.0, -7.0, -7.0, 
+28.0], [28.0, -21.0, 49.0, 7.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_constData_rank4(self):
-      arg0=numpy.array([[[[0.6710452933322606, 0.73655023524342855, -0.96637183491308676, 0.47953689956820522], 
-[0.98053583083570528, 0.1461687898181756, 0.012703818765450459, 0.48064837271561767], [0.52408663541340594, 
--0.6101131637614976, 0.71951147562469586, 0.97773169491505763]], [[0.85269224639001395, -0.64939328460945966, 
--0.40530815940692455, -0.043873643895695258], [0.013474207600136179, -0.83199072645059813, -0.24875392233750837, 
--0.14945963740023349], [-0.19859755265586743, -0.83519278737823521, -0.16490322565926241, 0.19988995509904828]]], 
-[[[0.54261691324742345, -0.83216349466983819, -0.82229431953325571, -0.95593602291977064], [-0.038265980497722341, 
-0.38578299235089331, -0.43729585014806571, -0.94893987277299208], [-0.27213639583191407, 0.1045917845853499, 
-0.0051298010833620289, -0.87753324258171328]], [[0.47867910844244244, -0.7935953174942354, 0.48633491846960841, 
--0.16964491089477818], [-0.73725496052678019, -0.65544040345490262, 0.82473847295242608, -0.86310822408155241], 
-[-0.22876295798043222, 0.087254884598592541, -0.66897239866347769, -0.88155102312679112]]], [[[0.80518718751035201, 
-0.9208930345840538, -0.84320779895756859, -0.22169550184009501], [0.34144334236516105, -0.65813010675475092, 
--0.67816684120052328, 0.03057411294794643], [0.83964290874070091, -0.65242174738552761, 0.65986798996685425, 
-0.55354844330886732]], [[0.41987573705519776, 0.86448705917430524, 0.89887374333241499, 0.50981938714297903], 
-[-0.66180921979411456, 0.59715491866752002, -0.94380294634555173, 0.61085742396555731], [-0.061851722069981907, 
--0.82539430034923944, -0.05820899628782894, -0.12313347830576449]]]])
-      arg1=Data(numpy.array([[[[0.74351019640477412, -0.98281371332345957, 0.047498607093644729, 0.15927637373867798], 
-[-0.56718099478511252, -0.40521930963777275, -0.15323791375707096, -0.13397472408265321], [0.32026529445003682, 
-0.94984367824314786, -0.21650883898062334, 0.36878669403603381]], [[0.76460386081962728, 0.26035938179375706, 
--0.17228362074739612, -0.76176095860293325], [0.79650097864796598, -0.92064005521421444, 0.63695414023301522, 
-0.29763045353273676], [0.028233556083444356, 0.65356505734241077, 0.64710795344625938, 0.47088770373999034]]], 
-[[[0.052592817909343559, 0.90142884270306523, -0.55744523632845322, -0.10133937858296571], [-0.38270754560875409, 
-0.84777761145662178, -0.19647228139194683, 0.2624309028567815], [-0.36151988444214433, 0.79453458152737544, 
-0.035112284546496175, 0.090453586873261216]], [[-0.042959217360417634, -0.40165574292355521, 0.87853656547492331, 
--0.74381165790643089], [-0.035497537775224242, -0.26990065440269873, 0.52801706764535417, 0.44592510638569061], 
-[-0.46487843397425954, 0.88572704975088068, -0.70820902545471909, -0.83719918740365951]]], [[[-0.17444138264473819, 
-0.44713858293412612, 0.42308639570713846, 0.11624103502896643], [-0.53171945486995664, -0.43730113574911877, 
-0.023341839389971808, -0.9174119628732611], [-0.34478808240190162, -0.64263237508691695, 0.09480577060325146, 
--0.54979877472252747]], [[-0.83762097768252852, -0.28250723065451577, -0.70302270429800839, 0.20350206223682488], 
-[-0.51785671081588647, -0.99895978214481795, -0.09100830119876635, -0.10432462166690804], [-0.2140802658780443, 
--0.32749288111075736, -0.34840221305540831, -0.33613300029766058]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.74351019640477412, 0.73655023524342855, 0.047498607093644729, 0.47953689956820522], 
-[0.98053583083570528, 0.1461687898181756, 0.012703818765450459, 0.48064837271561767], [0.52408663541340594, 
-0.94984367824314786, 0.71951147562469586, 0.97773169491505763]], [[0.85269224639001395, 0.26035938179375706, 
--0.17228362074739612, -0.043873643895695258], [0.79650097864796598, -0.83199072645059813, 0.63695414023301522, 
-0.29763045353273676], [0.028233556083444356, 0.65356505734241077, 0.64710795344625938, 0.47088770373999034]]], 
-[[[0.54261691324742345, 0.90142884270306523, -0.55744523632845322, -0.10133937858296571], [-0.038265980497722341, 
-0.84777761145662178, -0.19647228139194683, 0.2624309028567815], [-0.27213639583191407, 0.79453458152737544, 
-0.035112284546496175, 0.090453586873261216]], [[0.47867910844244244, -0.40165574292355521, 0.87853656547492331, 
--0.16964491089477818], [-0.035497537775224242, -0.26990065440269873, 0.82473847295242608, 0.44592510638569061], 
-[-0.22876295798043222, 0.88572704975088068, -0.66897239866347769, -0.83719918740365951]]], [[[0.80518718751035201, 
-0.9208930345840538, 0.42308639570713846, 0.11624103502896643], [0.34144334236516105, -0.43730113574911877, 
-0.023341839389971808, 0.03057411294794643], [0.83964290874070091, -0.64263237508691695, 0.65986798996685425, 
-0.55354844330886732]], [[0.41987573705519776, 0.86448705917430524, 0.89887374333241499, 0.50981938714297903], 
-[-0.51785671081588647, 0.59715491866752002, -0.09100830119876635, 0.61085742396555731], [-0.061851722069981907, 
--0.32749288111075736, -0.05820899628782894, -0.12313347830576449]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_constData_rank0_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg1=Data(4.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-16.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank0_expandedData_rank4(self):
-      arg0=numpy.array(0.816751245349)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.40706796204856954, -0.53751083415836831, -0.45864908744463273, -0.16181548971941506], 
-[0.24911417445318973, -0.90143034728419491, 0.49231704616202521, -0.02953522449634538], [-0.54604157728790303, 
-0.96956023052870233, -0.35875149576930676, -0.65119882270566221]], [[-0.63683028644751638, 0.517070292194729, 
-0.88993945395848617, 0.45862552604255513], [-0.3937255872490002, 0.62928624666236899, 0.15644492847277935, 
-0.39426821818667213], [0.18687916068352117, -0.90059464422537161, 0.63405011651666454, -0.91397232745661849]]], 
-[[[-0.59152682775898779, -0.29881608198483178, -0.12022357576247278, -0.14636655539718824], [0.10683837535157203, 
-0.4534643980627564, 0.56557067866858457, -0.0058893033942237771], [0.2438289343318536, -0.44513011643495815, 
--0.82351570680276276, -0.74628626035713075]], [[0.24049586413674917, 0.93536796522792276, 0.40179585898884218, 
-0.11001812792063603], [0.24888872211708435, 0.13170738221634015, -0.23386082553392895, 0.26287786471668606], 
-[-0.12817923648221208, -0.81433650068603169, -0.85580088180765967, 0.37425524564540913]]], [[[-0.0015262470861385768, 
--0.13657548471526271, -0.17763500899807361, -0.29008714552601167], [-0.29605361382858919, -0.30804118243930012, 
--0.69034132273448701, 0.17159914379615593], [-0.055083234234476253, 0.27179546429245183, 0.73841704903963601, 
-0.56943419450749744]], [[-0.13221678354751099, -0.25975064422559724, 0.98055444051148144, 0.041900636495320498], 
-[-0.67581584371274128, -0.044493982042192126, 0.38493910887288241, -0.053928330783549638], [0.24767507371629205, 
-0.02740918244429702, -0.40707529813083276, -0.53224165365256848]]]])+(1.-msk_arg1)*numpy.array([[[[-0.74622638578077849, 
-0.075132461697541508, -0.33313454924071673, -0.67257843324720423], [-0.89086147690801054, -0.37521216146728076, 
--0.3769720211792944, -0.25074902554592482], [0.03327796652289905, -0.831487975870429, -0.46430521993783014, 
-0.35666688446285999]], [[-0.3002282511139418, -0.9131223259696819, -0.35725566311385237, -0.08122060507717177], 
-[0.49125425698890024, 0.04278065414817589, -0.10736165776646334, -0.58357962728965052], [-0.78389654631628258, 
-0.014252969571323604, -0.58349722415645489, 0.48015407778285857]]], [[[0.8629968548019411, -0.39330356017360191, 
--0.43953900522134193, -0.93850862679670422], [-0.67563892257080771, -0.30985847916271125, -0.73029188466858708, 
-0.45768180905096179], [0.89312962196038459, 0.24375888513531274, 0.79974754704490114, 0.062990767856061503]], 
-[[0.19388446284468785, 0.2228516825113267, 0.58972079924045051, 0.16046525287644209], [0.16738918455502771, 
--0.87793601312414005, 0.55708100133014371, 0.79422379620746852], [0.48900265257984232, 0.20469753181175121, 
--0.076793936351922776, -0.66050327071342485]]], [[[0.37333906028974995, -0.13276337459811982, 0.55257492514565332, 
--0.87250909004301769], [-0.92159637562262575, 0.035611817197426232, 0.49669980616950649, 0.81933503740201186], 
-[-0.96340332935349826, 0.85175864132768342, -0.56016253718759845, 0.56499606586394324]], [[-0.33109596385421125, 
-0.97878513835337344, -0.16451086770378209, 0.10562009554922169], [0.64934854776565909, 0.39252253014845206, 
-0.086082586528108962, -0.87179727093305726], [-0.64734193154791497, -0.11793903610185485, -0.80594955530268586, 
--0.7145408832676321]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], 
-[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 
-0.96956023052870233, 0.81675124534906574, 0.81675124534906574]], [[0.81675124534906574, 0.81675124534906574, 
-0.88993945395848617, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574]]], 
-[[[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574]], [[0.81675124534906574, 0.93536796522792276, 0.81675124534906574, 0.81675124534906574], 
-[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574]]], [[[0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574]], 
-[[0.81675124534906574, 0.81675124534906574, 0.98055444051148144, 0.81675124534906574], [0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574]]]])+(1.-msk_ref)*numpy.array([[[[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], 
-[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574]], [[0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574]]], 
-[[[0.8629968548019411, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.89312962196038459, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574]], [[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], 
-[0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574]]], [[[0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81933503740201186], [0.81675124534906574, 0.85175864132768342, 0.81675124534906574, 0.81675124534906574]], 
-[[0.81675124534906574, 0.97878513835337344, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 
-0.81675124534906574, 0.81675124534906574, 0.81675124534906574], [0.81675124534906574, 0.81675124534906574, 0.81675124534906574, 
-0.81675124534906574]]]])
+   def test_generalTensorProduct_constData_rank1_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([7.0, 5.0, -4.0]),self.functionspace)
+      arg1=Data(numpy.array([7.0, -2.0, 0.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(39.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_array_rank4_expandedData_rank4(self):
-      arg0=numpy.array([[[[0.42000806204653474, 0.43445211169835551, 0.67259254968505977, -0.44236725657295772], 
-[0.57797003911910583, -0.56843078081208565, 0.73401747796917305, 0.2724166496453182], [-0.63816568661349526, 
-0.47652891249952689, 0.22262872392584887, 0.57248495666865962]], [[0.67126178307885032, 0.55524712080063265, 
--0.57633405842088048, -0.51172125052107154], [0.64644288887632562, -0.30158732813994793, 0.066495417813510427, 
-0.55087047201075623], [-0.70640833320964092, 0.79392204123529808, -0.30151094639813847, 0.63477282920213551]]], 
-[[[-0.33887822678892188, -0.17257825839362329, -0.86588501606225043, 0.79230278052527692], [-0.39941731689877535, 
--0.079106652140733758, 0.34561234826387599, -0.3250977623978315], [-0.072143230372351264, -0.35332740106055804, 
-0.36569821506455535, -0.40358096819303957]], [[-0.46326111929557134, -0.65734587522945453, 0.36365229912540875, 
-0.29629501392799629], [0.76965355270422631, 0.86916618870287166, -0.30399370154030803, 0.052406314916716434], 
-[-0.76844408403720332, -0.80603282987458247, 0.87923305663161355, -0.47575486213082696]]], [[[0.064241833879999932, 
-0.75416840871509683, -0.16640916907322456, 0.51810523833466604], [-0.52612642670199117, -0.54881438921402426, 
--0.60230840326054902, -0.27590086084382826], [0.56589884837057913, 0.63901913471463057, 0.14143396068435887, 
-0.4572178777562419]], [[-0.77613236188204149, -0.10681746398394076, 0.56066764451409656, -0.2652991439307546], 
-[-0.47167240379595765, 0.13624117786721168, 0.90830564372286182, -0.50408842514981544], [-0.10789679373755079, 
-0.89455801147160074, 0.64339672677130522, -0.52438730821821777]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.58994058399593396, -0.84790900163215799, -0.2810393046159938, 0.95132339628179641], 
-[-0.96691100251741302, -0.27351720946556934, -0.59482024886374374, 0.067410044082623743], [-0.47797733987261082, 
--0.15881452904936122, 0.048733333513018007, -0.2097978517034238]], [[-0.022424892496763604, 0.95039754974581636, 
--0.26755918731750183, 0.11642407168693469], [0.42843959365869888, 0.87961951831310414, 0.87592903677448142, 
--0.14801753665349993], [-0.44794994006371702, 0.90952976942348851, 0.86095504356940866, 0.40092005641620676]]], 
-[[[-0.87293977911397436, -0.26515845603721533, 0.51886214635551764, -0.84860714710587803], [-0.96644396225751872, 
--0.7631489360116015, 0.32411191551565888, -0.61020033012558517], [0.62767467887627681, 0.37469207688125628, 
-0.97311127999171076, -0.48576153689962909]], [[0.80653641318766311, 0.7667470510008485, -0.1244805386140686, 
--0.58255916955809517], [-0.68905687561103779, 0.73624509848196351, 0.14977570034343146, 0.040371627889322026], 
-[0.59631748792445949, -0.36976261889718165, -0.32387905826980279, -0.70956255815582425]]], [[[-0.47168955139676272, 
--0.62259149336107811, -0.71438890780775055, -0.70887906389104938], [-0.22646044424514478, 0.22578442905780038, 
-0.82289907678613572, 0.78508276520394693], [0.66158100390938746, 0.81084818404365477, 0.41404741540900059, 
-0.29086117891310748]], [[-0.48563213325230881, -0.66773681864261558, 0.13251259057679676, 0.38312110170916869], 
-[0.4985513501920098, -0.054491390265769768, -0.034239376662770438, 0.15118777726900667], [0.637203043607808, 
--0.63220275381972035, -0.83486043539732502, -0.89196454166383954]]]])+(1.-msk_arg1)*numpy.array([[[[0.77783291145936362, 
-0.14573546502013346, 0.16427843684067489, 0.070174330346382652], [-0.75910085997762344, -0.13628190232977233, 
-0.050999095952770856, 0.11715267966221887], [0.24272200394062349, 0.5320807594862087, 0.56874924645624914, 
--0.97874608588909484]], [[-0.98167918496033835, -0.92884768363832904, 0.020720960458232351, 0.60484296418798422], 
-[0.43656063194574424, 0.24417269636492955, 0.88220623197013071, 0.0051165565172857086], [0.59919244135295746, 
--0.24769803256244494, 0.46747145925858957, -0.32539081032403749]]], [[[0.36547407180069946, 0.69858798920753662, 
--0.11815619917568543, 0.7202806361724019], [0.89566175611285326, -0.56471605346156917, -0.96295426503805337, 
--0.79642127774673965], [0.0082356467622470841, 0.86729114253916273, -0.61543952427247706, 0.84048187872968816]], 
-[[-0.70083513366236239, -0.63770108259677039, 0.8010185543717967, -0.171777821609852], [0.28780672248819994, 
-0.77948501197327458, 0.80566125829149815, -0.48883690350583775], [-0.31426640827493268, 0.010369391352117008, 
--0.17008192331534411, -0.24571331409278607]]], [[[-0.81997880316304705, -0.65143657046299919, 0.53349064661197132, 
-0.56466068808179881], [0.9458545705591126, -0.62032388429602836, -0.20671123052978779, -0.87582148391296899], 
-[0.025494758959417885, -0.16261424915626144, -0.44378234236454994, -0.22992948225644549]], [[0.81002927637991107, 
--0.68316174531148488, -0.85225788243989031, -0.88222373281789257], [-0.26541667769836907, 0.17943188950419575, 
-0.63512022836563475, -0.38654668208377108], [-0.31161290145238318, 0.35849193061546902, -0.032927010158966707, 
-0.33048499755046112]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.58994058399593396, 0.43445211169835551, 0.67259254968505977, 0.95132339628179641], 
-[0.57797003911910583, -0.27351720946556934, 0.73401747796917305, 0.2724166496453182], [-0.47797733987261082, 
-0.47652891249952689, 0.22262872392584887, 0.57248495666865962]], [[0.67126178307885032, 0.95039754974581636, 
--0.26755918731750183, 0.11642407168693469], [0.64644288887632562, 0.87961951831310414, 0.87592903677448142, 
-0.55087047201075623], [-0.44794994006371702, 0.90952976942348851, 0.86095504356940866, 0.63477282920213551]]], 
-[[[-0.33887822678892188, -0.17257825839362329, 0.51886214635551764, 0.79230278052527692], [-0.39941731689877535, 
--0.079106652140733758, 0.34561234826387599, -0.3250977623978315], [0.62767467887627681, 0.37469207688125628, 
-0.97311127999171076, -0.40358096819303957]], [[0.80653641318766311, 0.7667470510008485, 0.36365229912540875, 
-0.29629501392799629], [0.76965355270422631, 0.86916618870287166, 0.14977570034343146, 0.052406314916716434], 
-[0.59631748792445949, -0.36976261889718165, 0.87923305663161355, -0.47575486213082696]]], [[[0.064241833879999932, 
-0.75416840871509683, -0.16640916907322456, 0.51810523833466604], [-0.22646044424514478, 0.22578442905780038, 
-0.82289907678613572, 0.78508276520394693], [0.66158100390938746, 0.81084818404365477, 0.41404741540900059, 
-0.4572178777562419]], [[-0.48563213325230881, -0.10681746398394076, 0.56066764451409656, 0.38312110170916869], 
-[0.4985513501920098, 0.13624117786721168, 0.90830564372286182, 0.15118777726900667], [0.637203043607808, 0.89455801147160074, 
-0.64339672677130522, -0.52438730821821777]]]])+(1.-msk_ref)*numpy.array([[[[0.77783291145936362, 0.43445211169835551, 
-0.67259254968505977, 0.070174330346382652], [0.57797003911910583, -0.13628190232977233, 0.73401747796917305, 
-0.2724166496453182], [0.24272200394062349, 0.5320807594862087, 0.56874924645624914, 0.57248495666865962]], 
-[[0.67126178307885032, 0.55524712080063265, 0.020720960458232351, 0.60484296418798422], [0.64644288887632562, 
-0.24417269636492955, 0.88220623197013071, 0.55087047201075623], [0.59919244135295746, 0.79392204123529808, 0.46747145925858957, 
-0.63477282920213551]]], [[[0.36547407180069946, 0.69858798920753662, -0.11815619917568543, 0.79230278052527692], 
-[0.89566175611285326, -0.079106652140733758, 0.34561234826387599, -0.3250977623978315], [0.0082356467622470841, 
-0.86729114253916273, 0.36569821506455535, 0.84048187872968816]], [[-0.46326111929557134, -0.63770108259677039, 
-0.8010185543717967, 0.29629501392799629], [0.76965355270422631, 0.86916618870287166, 0.80566125829149815, 
-0.052406314916716434], [-0.31426640827493268, 0.010369391352117008, 0.87923305663161355, -0.24571331409278607]]], 
-[[[0.064241833879999932, 0.75416840871509683, 0.53349064661197132, 0.56466068808179881], [0.9458545705591126, 
--0.54881438921402426, -0.20671123052978779, -0.27590086084382826], [0.56589884837057913, 0.63901913471463057, 
-0.14143396068435887, 0.4572178777562419]], [[0.81002927637991107, -0.10681746398394076, 0.56066764451409656, 
--0.2652991439307546], [-0.26541667769836907, 0.17943188950419575, 0.90830564372286182, -0.38654668208377108], 
-[-0.10789679373755079, 0.89455801147160074, 0.64339672677130522, 0.33048499755046112]]]])
+   def test_generalTensorProduct_constData_rank2_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[0.0, 5.0, 7.0], [-5.0, 2.0, -6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[0.0, -1.0, -5.0], [-7.0, -7.0, 4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-43.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_float_rank0(self):
-      arg0=Data(-0.103724211678,self.functionspace)
-      arg1=0.328283764361
-      res=maximum(arg0,arg1)
-      ref=Data(0.328283764361,self.functionspace)
+   def test_generalTensorProduct_constData_rank3_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[4.0, -2.0, 4.0], [-3.0, -7.0, -6.0], [5.0, -2.0, 0.0], [-3.0, -3.0, -3.0]], [[-3.0, -1.0, 7.0], 
+[2.0, 7.0, 6.0], [3.0, 7.0, 4.0], [0.0, -3.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[5.0, -3.0, 6.0], [-6.0, -3.0, -3.0], [3.0, -5.0, 0.0], [7.0, -4.0, -5.0]], [[2.0, 7.0, -4.0], 
+[4.0, -4.0, -2.0], [-4.0, 3.0, -5.0], [4.0, -3.0, 3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(72.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_float_rank0(self):
-      arg0=Data(numpy.array([-0.994662543839125, -0.74842601409030385]),self.functionspace)
-      arg1=0.83441404241
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.83441404241015316, 0.83441404241015316]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_constData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[3.0, -3.0], [-1.0, -4.0], [5.0, -7.0]], [[7.0, -1.0], [7.0, -3.0], [5.0, -4.0]]], [[[6.0, 
+-3.0], [7.0, -7.0], [3.0, 0.0]], [[-2.0, -4.0], [0.0, -1.0], [-1.0, 5.0]]], [[[7.0, -1.0], [5.0, -4.0], [6.0, 6.0]], [[6.0, 
+1.0], [-2.0, 0.0], [1.0, -2.0]]], [[[2.0, 7.0], [-4.0, -2.0], [4.0, -2.0]], [[-6.0, -7.0], [4.0, -5.0], [3.0, 
+4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[1.0, -7.0], [-7.0, -4.0], [0.0, 0.0]], [[2.0, 1.0], [-6.0, 0.0], [-4.0, 6.0]]], [[[-6.0, -6.0], 
+[-5.0, 0.0], [5.0, 5.0]], [[6.0, -3.0], [7.0, -4.0], [0.0, 2.0]]], [[[-2.0, 4.0], [4.0, 0.0], [6.0, -2.0]], [[3.0, 2.0], [-7.0, 
+2.0], [-4.0, 4.0]]], [[[1.0, -6.0], [-6.0, -5.0], [7.0, -2.0]], [[-5.0, 2.0], [-2.0, 0.0], [2.0, -7.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(10.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_float_rank0(self):
-      arg0=Data(numpy.array([[-0.93123334581207584, -0.6375770434441641, 0.14522839584946268, -0.73025618312998342, 
--0.43938340547287202], [-0.94178326076177643, 0.37494459873539854, -0.41021077539181738, -0.20418492678279287, 
-0.66837201836494731], [-0.8482840255895383, -0.37013598496106792, 0.9491945264624071, -0.84517384298961939, 
--0.98444834611902565], [-0.62650653009151203, -0.80707547020964321, -0.54928564740444141, 0.62760912325779228, 
--0.068170353902772929]]),self.functionspace)
-      arg1=0.416476250509
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.41647625050863057, 0.41647625050863057, 0.41647625050863057, 0.41647625050863057, 
-0.41647625050863057], [0.41647625050863057, 0.41647625050863057, 0.41647625050863057, 0.41647625050863057, 
-0.66837201836494731], [0.41647625050863057, 0.41647625050863057, 0.9491945264624071, 0.41647625050863057, 0.41647625050863057], 
-[0.41647625050863057, 0.41647625050863057, 0.41647625050863057, 0.62760912325779228, 0.41647625050863057]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_constData_rank1_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg1=Data(numpy.array([-2.0, 4.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, 0.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_float_rank0(self):
-      arg0=Data(numpy.array([[[-0.30986069585890852, -0.71233438667691962], [-0.71108485594464965, 0.46803401869143135]], 
-[[0.047347209617666586, 0.40377859059535814], [-0.076869071518825383, 0.66840655201248778]], [[-0.73984483745703389, 
-0.15706212028006727], [-0.75038361207139048, 0.71534375261818672]], [[-0.16981297613502533, 0.95326334909603228], 
-[-0.578228141354864, 0.69445686433215403]], [[0.85239986273571344, 0.70437733963137261], [-0.64356702754466366, 
-0.98497620890820303]], [[-0.73348032264680829, -0.90903872026049592], [-0.30876237687286801, 
-0.85358440828017468]]]),self.functionspace)
-      arg1=-0.707243668032
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.30986069585890852, -0.70724366803240968], [-0.70724366803240968, 0.46803401869143135]], 
-[[0.047347209617666586, 0.40377859059535814], [-0.076869071518825383, 0.66840655201248778]], [[-0.70724366803240968, 
-0.15706212028006727], [-0.70724366803240968, 0.71534375261818672]], [[-0.16981297613502533, 0.95326334909603228], 
-[-0.578228141354864, 0.69445686433215403]], [[0.85239986273571344, 0.70437733963137261], [-0.64356702754466366, 
-0.98497620890820303]], [[-0.70724366803240968, -0.70724366803240968], [-0.30876237687286801, 
-0.85358440828017468]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([6.0, -5.0, 0.0]),self.functionspace)
+      arg1=Data(numpy.array([[-3.0, -2.0], [7.0, 4.0], [2.0, -5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-53.0, -32.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_float_rank0(self):
-      arg0=Data(numpy.array([[[[-0.44038422283869894, -0.99307493506995592, -0.64116938861589978, -0.52885072305198189], 
-[-0.60664143188537656, -0.53692428608899201, 0.9427489146021919, -0.66511035190756762], [-0.95640611039066736, 
-0.98227091107399023, -0.35080572865502968, -0.062671325929018584]], [[-0.74010294573905111, -0.60760114920218666, 
-0.45863579037285751, -0.45688569472448681], [-0.33875049551517833, 0.35019781316828325, 0.45173979734058101, 
-0.8762043904815493], [-0.34188391703990084, 0.19998649935419754, -0.63879709781309413, 0.18545222105657011]]], 
-[[[0.011754072910120206, -0.90550908100131511, -0.93322868838339446, -0.11741827984316866], [0.77558036495515026, 
--0.85219854425588326, -0.061841571000625484, -0.066269008250732009], [0.96157185984128013, -0.95342288705795242, 
-0.45172913312384599, 0.018267106882194906]], [[0.1591168098755007, -0.27340675847513096, -0.14469177879585371, 
-0.694740264377673], [-0.80538537088324014, 0.20415359879847728, -0.25347422230372807, -0.93986986572358044], 
-[0.82523363323342358, 0.95118360314535688, -0.084226421580063437, 0.23148605050984217]]], [[[0.19213259368793234, 
-0.79589318105724693, -0.54294778796310839, -0.20471748468873829], [0.18053098336615636, -0.84012326762801948, 
--0.62575984457545952, -0.14368177341561639], [0.62597131428981112, 0.38509874618804685, 0.47371812469111485, 
--0.86705010549302908]], [[-0.36502653007689423, -0.79613146258086531, 0.15329391158627304, 0.68148041836662387], 
-[0.73324139002880684, 0.38529515075962784, -0.9317611817520175, -0.6261241009923757], [0.80092298112981131, 
-0.34865093765311261, 0.89442927947537765, 0.92170715451548602]]]]),self.functionspace)
-      arg1=0.635778225458
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.63577822545793317, 0.63577822545793317, 0.63577822545793317, 0.63577822545793317], 
-[0.63577822545793317, 0.63577822545793317, 0.9427489146021919, 0.63577822545793317], [0.63577822545793317, 0.98227091107399023, 
-0.63577822545793317, 0.63577822545793317]], [[0.63577822545793317, 0.63577822545793317, 0.63577822545793317, 
-0.63577822545793317], [0.63577822545793317, 0.63577822545793317, 0.63577822545793317, 0.8762043904815493], 
-[0.63577822545793317, 0.63577822545793317, 0.63577822545793317, 0.63577822545793317]]], [[[0.63577822545793317, 
-0.63577822545793317, 0.63577822545793317, 0.63577822545793317], [0.77558036495515026, 0.63577822545793317, 0.63577822545793317, 
-0.63577822545793317], [0.96157185984128013, 0.63577822545793317, 0.63577822545793317, 0.63577822545793317]], 
-[[0.63577822545793317, 0.63577822545793317, 0.63577822545793317, 0.694740264377673], [0.63577822545793317, 0.63577822545793317, 
-0.63577822545793317, 0.63577822545793317], [0.82523363323342358, 0.95118360314535688, 0.63577822545793317, 
-0.63577822545793317]]], [[[0.63577822545793317, 0.79589318105724693, 0.63577822545793317, 0.63577822545793317], 
-[0.63577822545793317, 0.63577822545793317, 0.63577822545793317, 0.63577822545793317], [0.63577822545793317, 
-0.63577822545793317, 0.63577822545793317, 0.63577822545793317]], [[0.63577822545793317, 0.63577822545793317, 
-0.63577822545793317, 0.68148041836662387], [0.73324139002880684, 0.63577822545793317, 0.63577822545793317, 
-0.63577822545793317], [0.80092298112981131, 0.63577822545793317, 0.89442927947537765, 
-0.92170715451548602]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[0.0, -6.0, 7.0], [0.0, -5.0, 4.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 3.0], [7.0, -1.0], [0.0, 1.0]], [[-4.0, -3.0], [0.0, 2.0], [3.0, 
+1.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-30.0, 7.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_array_rank0(self):
-      arg0=Data(0.131131173778,self.functionspace)
-      arg1=numpy.array(-0.576805781524)
-      res=maximum(arg0,arg1)
-      ref=Data(0.131131173778,self.functionspace)
+   def test_generalTensorProduct_constData_rank3_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[4.0, -6.0, -5.0], [3.0, 2.0, 6.0], [-7.0, -3.0, 2.0], [7.0, 1.0, 5.0]], [[-5.0, -6.0, -3.0], 
+[6.0, 0.0, 1.0], [4.0, 7.0, 4.0], [-5.0, -3.0, -5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[1.0, -3.0], [4.0, 3.0], [-3.0, 7.0]], [[6.0, 6.0], [-3.0, -7.0], [6.0, 0.0]], [[-2.0, -3.0], 
+[-7.0, -7.0], [3.0, -6.0]], [[-1.0, 3.0], [3.0, 7.0], [7.0, 3.0]]], [[[-3.0, 3.0], [0.0, -1.0], [-1.0, 6.0]], [[0.0, 2.0], 
+[2.0, -4.0], [-5.0, -5.0]], [[0.0, 1.0], [0.0, 4.0], [-3.0, 7.0]], [[7.0, 2.0], [6.0, -2.0], [0.0, 1.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([63.0, 43.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_array_rank0(self):
-      arg0=Data(numpy.array([0.14808740913781926, 0.35567967234737252]),self.functionspace)
-      arg1=numpy.array(-0.935584836565)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.14808740913781926, 0.35567967234737252]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=-ref
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_array_rank0(self):
-      arg0=Data(numpy.array([[0.11219561462947825, -0.18427729976238316, -0.26893116897649416, 0.40378445902375137, 
--0.64010126735322159], [-0.54548479863007193, -0.6771466146796592, -0.65941588238170357, -0.080554716485880862, 
--0.51142929986801766], [0.1802163583855485, 0.4654264085214439, -0.88158680167000036, -0.67093289247607557, 
-0.47213709052956609], [-0.15939930729103469, -0.25730020832439515, -0.97874531075582616, 0.10703962128016098, 
-0.32041153354414065]]),self.functionspace)
-      arg1=numpy.array(0.896240426157)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 
-0.89624042615692456], [0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 
-0.89624042615692456], [0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 
-0.89624042615692456], [0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 0.89624042615692456, 
-0.89624042615692456]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_constData_rank2_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg1=Data(numpy.array([[0.0, -7.0, -1.0, 7.0, 6.0], [0.0, 7.0, -4.0, -4.0, -5.0], [-5.0, 2.0, -2.0, -6.0, -6.0], [2.0, 
+-3.0, 0.0, 3.0, 4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, 7.0, 1.0, -7.0, -6.0], [-0.0, -7.0, 4.0, 4.0, 5.0], [5.0, -2.0, 2.0, 6.0, 6.0], [-2.0, 3.0, 
+-0.0, -3.0, -4.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_array_rank0(self):
-      arg0=Data(numpy.array([[[0.11547252472671099, 0.27715619160036087], [-0.0011872311418676951, -0.38096891774653074]], 
-[[0.37877267210850607, -0.8255429528666729], [-0.63956098319827714, -0.70194003551721074]], [[0.44309695940748495, 
--0.88721518381663578], [-0.53272604278013991, 0.79625941492663554]], [[-0.1703558707341577, -0.95114537821544309], 
-[-0.32281622748150207, 0.31750595998728737]], [[0.30447422840521154, -0.82721331108465446], [0.65676818386047175, 
-0.40338692981661328]], [[0.39404755664916813, -0.78343567350875953], [-0.30036954834309015, 
--0.83068548144181831]]]),self.functionspace)
-      arg1=numpy.array(0.597874377242)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.59787437724227765, 0.59787437724227765], [0.59787437724227765, 0.59787437724227765]], 
-[[0.59787437724227765, 0.59787437724227765], [0.59787437724227765, 0.59787437724227765]], [[0.59787437724227765, 
-0.59787437724227765], [0.59787437724227765, 0.79625941492663554]], [[0.59787437724227765, 0.59787437724227765], 
-[0.59787437724227765, 0.59787437724227765]], [[0.59787437724227765, 0.59787437724227765], [0.65676818386047175, 
-0.59787437724227765]], [[0.59787437724227765, 0.59787437724227765], [0.59787437724227765, 
-0.59787437724227765]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([0.0, -2.0, 0.0]),self.functionspace)
+      arg1=Data(numpy.array([[[3.0, 0.0, -2.0, -4.0, -2.0], [2.0, -3.0, -3.0, -7.0, 0.0], [7.0, -3.0, -3.0, 6.0, -1.0], [0.0, 
+3.0, -3.0, -5.0, 3.0]], [[0.0, -1.0, 0.0, 1.0, -3.0], [4.0, -4.0, 5.0, -4.0, 0.0], [-1.0, -7.0, -2.0, 2.0, 0.0], [3.0, -4.0, 
+4.0, 0.0, 6.0]], [[-3.0, -5.0, -5.0, -4.0, 4.0], [-3.0, 0.0, 2.0, -7.0, 5.0], [-1.0, -5.0, 4.0, -4.0, -4.0], [0.0, -1.0, 6.0, 
+1.0, 0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[0.0, 2.0, 0.0, -2.0, 6.0], [-8.0, 8.0, -10.0, 8.0, 0.0], [2.0, 14.0, 4.0, -4.0, 0.0], [-6.0, 8.0, 
+-8.0, 0.0, -12.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_array_rank0(self):
-      arg0=Data(numpy.array([[[[-0.12333178650474741, -0.41601255505495294, 0.78421542610699757, -0.89389135345287363], 
-[-0.89386090823390885, 0.56081437970269388, -0.39255299041023939, 0.32411039481285564], [0.8551210553300661, 
--0.90707027924543415, 0.16036883016043224, -0.10713182442360014]], [[0.62413380378897632, -0.33807365498251962, 
--0.14322028563106537, -0.28390387123110661], [0.10848574295659086, -0.3237100322279467, 0.40626470900918554, 
--0.86322529775615497], [-0.53241603186354824, 0.96450022170256, 0.7410412312711554, -0.90628249882883471]]], 
-[[[0.56961012500639319, 0.46258567990715616, 0.2691574282574225, -0.70084123183330149], [0.32178078403959587, 
--0.16491236638222273, -0.67544384124087165, 0.49044876181851271], [0.87426425567196486, 0.99113280536628512, 
--0.33592835344070004, -0.48167757670424649]], [[0.37582959179360564, 0.079659313583228863, 0.13142551769766975, 
--0.50982437173132999], [-0.80549764829567927, -0.99459313338638555, -0.24095207228821169, -0.91245577244012499], 
-[0.36688639267496503, 0.20893052084134811, -0.95250384603251925, -0.46421785538004756]]], [[[-0.69408638083069896, 
--0.60590039199066448, 0.65199154172599783, 0.5600386130626831], [-0.45945308229643844, -0.33990278016795927, 
--0.12156326670116702, 0.76710181803628164], [-0.30308185765731799, -0.47607829009357494, -0.66299346892125444, 
-0.85153168985207617]], [[0.97196327159277796, -0.76370007931813078, 0.50139581647673981, 0.63066011940195899], 
-[-0.98705858372661903, 0.30251550651882297, -0.12436255937028684, 0.47348321672077809], [-0.11280446521491339, 
-0.3669717233616796, -0.58417675366941624, -0.8354338127149179]]]]),self.functionspace)
-      arg1=numpy.array(-0.987163870919)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.12333178650474741, -0.41601255505495294, 0.78421542610699757, -0.89389135345287363], 
-[-0.89386090823390885, 0.56081437970269388, -0.39255299041023939, 0.32411039481285564], [0.8551210553300661, 
--0.90707027924543415, 0.16036883016043224, -0.10713182442360014]], [[0.62413380378897632, -0.33807365498251962, 
--0.14322028563106537, -0.28390387123110661], [0.10848574295659086, -0.3237100322279467, 0.40626470900918554, 
--0.86322529775615497], [-0.53241603186354824, 0.96450022170256, 0.7410412312711554, -0.90628249882883471]]], 
-[[[0.56961012500639319, 0.46258567990715616, 0.2691574282574225, -0.70084123183330149], [0.32178078403959587, 
--0.16491236638222273, -0.67544384124087165, 0.49044876181851271], [0.87426425567196486, 0.99113280536628512, 
--0.33592835344070004, -0.48167757670424649]], [[0.37582959179360564, 0.079659313583228863, 0.13142551769766975, 
--0.50982437173132999], [-0.80549764829567927, -0.98716387091897451, -0.24095207228821169, -0.91245577244012499], 
-[0.36688639267496503, 0.20893052084134811, -0.95250384603251925, -0.46421785538004756]]], [[[-0.69408638083069896, 
--0.60590039199066448, 0.65199154172599783, 0.5600386130626831], [-0.45945308229643844, -0.33990278016795927, 
--0.12156326670116702, 0.76710181803628164], [-0.30308185765731799, -0.47607829009357494, -0.66299346892125444, 
-0.85153168985207617]], [[0.97196327159277796, -0.76370007931813078, 0.50139581647673981, 0.63066011940195899], 
-[-0.98705858372661903, 0.30251550651882297, -0.12436255937028684, 0.47348321672077809], [-0.11280446521491339, 
-0.3669717233616796, -0.58417675366941624, -0.8354338127149179]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[3.0, -5.0, 5.0], [0.0, 5.0, -7.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, 5.0, -4.0, 1.0, 6.0], [7.0, 0.0, -6.0, 7.0, -1.0], [-6.0, -5.0, 0.0, 2.0, 6.0], [-5.0, 
+5.0, 7.0, 6.0, -2.0]], [[-4.0, -7.0, 0.0, -6.0, 0.0], [-4.0, 5.0, 5.0, -2.0, -1.0], [5.0, -1.0, 1.0, -6.0, -2.0], [1.0, -2.0, 
+3.0, -4.0, -7.0]], [[4.0, 3.0, -7.0, 1.0, -3.0], [-5.0, 1.0, 3.0, 6.0, 4.0], [0.0, -5.0, 1.0, -2.0, 4.0], [0.0, -3.0, -6.0, 
+0.0, -4.0]]], [[[5.0, 0.0, 0.0, -1.0, -4.0], [7.0, 5.0, 1.0, -6.0, 1.0], [-5.0, -5.0, -3.0, 4.0, -2.0], [-5.0, 3.0, 2.0, 4.0, 
+5.0]], [[2.0, 7.0, 2.0, -2.0, -6.0], [6.0, 0.0, 6.0, -6.0, 4.0], [-4.0, 0.0, 4.0, 5.0, -3.0], [3.0, 1.0, 2.0, -4.0, 0.0]], 
+[[-4.0, 2.0, 6.0, 1.0, -6.0], [-2.0, -2.0, -7.0, 6.0, 3.0], [-5.0, 7.0, 0.0, -6.0, -4.0], [-6.0, -1.0, -2.0, 0.0, 
+-1.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[78.0, 86.0, -79.0, 21.0, 15.0], [60.0, -6.0, 51.0, -11.0, 21.0], [-28.0, -84.0, 20.0, 93.0, 61.0], 
+[37.0, 22.0, 0.0, 18.0, 16.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_constData_rank0(self):
-      arg0=Data(0.585764561052,self.functionspace)
-      arg1=Data(0.562102768003,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(0.585764561052,self.functionspace)
+   def test_generalTensorProduct_constData_rank0_constData_rank3_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 5.0], [-4.0, 3.0]], [[-4.0, 2.0], [5.0, 7.0]], [[0.0, -6.0], [-7.0, 0.0]], [[-2.0, -3.0], 
+[-5.0, -4.0]], [[-2.0, 5.0], [4.0, -3.0]], [[4.0, 1.0], [-7.0, -1.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-12.0, 30.0], [-24.0, 18.0]], [[-24.0, 12.0], [30.0, 42.0]], [[0.0, -36.0], [-42.0, 0.0]], 
+[[-12.0, -18.0], [-30.0, -24.0]], [[-12.0, 30.0], [24.0, -18.0]], [[24.0, 6.0], [-42.0, -6.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_constData_rank0(self):
-      arg0=Data(numpy.array([0.36817249063478297, 0.84922379654348235]),self.functionspace)
-      arg1=Data(-0.000326831113467,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.36817249063478297, 0.84922379654348235]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([0.0, -7.0, 7.0]),self.functionspace)
+      arg1=Data(numpy.array([[[[-7.0, 6.0], [3.0, -5.0]], [[2.0, 3.0], [-2.0, 1.0]], [[-2.0, 4.0], [6.0, -1.0]], [[5.0, 5.0], 
+[4.0, 4.0]], [[4.0, 0.0], [5.0, 7.0]], [[-1.0, 6.0], [-2.0, -7.0]]], [[[3.0, -2.0], [3.0, -6.0]], [[0.0, -1.0], [-6.0, 0.0]], 
+[[-3.0, 6.0], [5.0, 6.0]], [[4.0, 3.0], [-6.0, -3.0]], [[-5.0, 0.0], [-7.0, 0.0]], [[0.0, -4.0], [-3.0, 7.0]]], [[[-1.0, 6.0], 
+[0.0, -1.0]], [[1.0, -6.0], [-4.0, -1.0]], [[5.0, 2.0], [-1.0, -6.0]], [[1.0, 3.0], [1.0, -6.0]], [[-7.0, -1.0], [2.0, 7.0]], 
+[[2.0, -6.0], [5.0, -4.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-28.0, 56.0], [-21.0, 35.0]], [[7.0, -35.0], [14.0, -7.0]], [[56.0, -28.0], [-42.0, -84.0]], 
+[[-21.0, 0.0], [49.0, -21.0]], [[-14.0, -7.0], [63.0, 49.0]], [[14.0, -14.0], [56.0, -77.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_constData_rank0(self):
-      arg0=Data(numpy.array([[0.62061167912589932, -0.38731372384862972, -0.095757334081436607, -0.71510399904747191, 
--0.7960986251434321], [-0.62309855289829441, -0.87302083840022671, 0.19339618209313958, -0.46839248025963864, 
--0.50779431412333742], [-0.21582349308100612, 0.38788705235820564, 0.013156532615211658, 0.48974126868597168, 
--0.8747876083639794], [-0.03351051938462235, -0.01330223402014763, 0.41055032605572195, -0.83673851035555735, 
-0.75259533240721854]]),self.functionspace)
-      arg1=Data(0.834120422885,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 
-0.8341204228848349], [0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 0.8341204228848349], 
-[0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 0.8341204228848349], [0.8341204228848349, 
-0.8341204228848349, 0.8341204228848349, 0.8341204228848349, 0.8341204228848349]]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_constData_rank0(self):
-      arg0=Data(numpy.array([[[-0.34639348942196935, 0.54454548312732642], [0.54767137350158723, -0.1261592719343172]], 
-[[0.50901738204046398, -0.84585881665715412], [-0.13374339923115808, -0.2770246163740675]], [[-0.54418624743208754, 
-0.12594979383328964], [0.36093139391063178, 0.82920727027033436]], [[0.27913464865114546, 0.80222365962388098], 
-[0.20763542419244296, 0.90359922967678674]], [[0.84504710858705456, 0.65071402913489296], [-0.38961429927310487, 
--0.71287474316420352]], [[0.21051157156997924, 0.12062151771734198], [0.15420074047028498, 
--0.77490659965239894]]]),self.functionspace)
-      arg1=Data(-0.719008102783,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.34639348942196935, 0.54454548312732642], [0.54767137350158723, -0.1261592719343172]], 
-[[0.50901738204046398, -0.71900810278299088], [-0.13374339923115808, -0.2770246163740675]], [[-0.54418624743208754, 
-0.12594979383328964], [0.36093139391063178, 0.82920727027033436]], [[0.27913464865114546, 0.80222365962388098], 
-[0.20763542419244296, 0.90359922967678674]], [[0.84504710858705456, 0.65071402913489296], [-0.38961429927310487, 
--0.71287474316420352]], [[0.21051157156997924, 0.12062151771734198], [0.15420074047028498, 
--0.71900810278299088]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_constData_rank4_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg1=Data(numpy.array([[[[5.0, 0.0, -2.0, -5.0], [-3.0, -5.0, -4.0, 6.0], [5.0, -4.0, -1.0, 3.0]], [[-6.0, 0.0, 6.0, 
+2.0], [6.0, -3.0, 4.0, 6.0], [-3.0, 2.0, 1.0, 3.0]]], [[[0.0, 4.0, 4.0, 4.0], [-4.0, -6.0, -6.0, 0.0], [6.0, 7.0, 7.0, -2.0]], 
+[[-2.0, -5.0, 2.0, 3.0], [4.0, 2.0, -7.0, 6.0], [-7.0, 3.0, 5.0, 2.0]]], [[[-4.0, -1.0, -3.0, 6.0], [2.0, 7.0, 5.0, 2.0], 
+[-6.0, -7.0, 0.0, -6.0]], [[-5.0, -1.0, 4.0, 4.0], [-4.0, 4.0, -6.0, 0.0], [-5.0, 3.0, -5.0, -2.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-25.0, -0.0, 10.0, 25.0], [15.0, 25.0, 20.0, -30.0], [-25.0, 20.0, 5.0, -15.0]], [[30.0, -0.0, 
+-30.0, -10.0], [-30.0, 15.0, -20.0, -30.0], [15.0, -10.0, -5.0, -15.0]]], [[[-0.0, -20.0, -20.0, -20.0], [20.0, 30.0, 30.0, 
+-0.0], [-30.0, -35.0, -35.0, 10.0]], [[10.0, 25.0, -10.0, -15.0], [-20.0, -10.0, 35.0, -30.0], [35.0, -15.0, -25.0, -10.0]]], 
+[[[20.0, 5.0, 15.0, -30.0], [-10.0, -35.0, -25.0, -10.0], [30.0, 35.0, -0.0, 30.0]], [[25.0, 5.0, -20.0, -20.0], [20.0, -20.0, 
+30.0, -0.0], [25.0, -15.0, 25.0, 10.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_constData_rank0(self):
-      arg0=Data(numpy.array([[[[0.24615935787720122, -0.78756263814918848, 0.14312411275206283, -0.61209069712580444], 
-[0.66751834472618388, -0.97270217915095181, 0.44734491429921719, 0.56094524052401296], [-0.52616981543309271, 
--0.59090561139819875, 0.72854643636544969, 0.28084180850612128]], [[-0.13831139862668707, -0.41869220979295729, 
-0.45665100088168176, -0.17425379986376388], [-0.71060410977750221, -0.23490189062085109, 0.55707427536980814, 
--0.47235867785724728], [-0.7825415636663855, -0.50535912385584014, 0.18080270846310542, 0.81347475179814932]]], 
-[[[0.11676945660942573, 0.0090598274192139616, -0.45702967566484753, 0.10306553976340282], [0.99323093060600787, 
-0.29434293524837996, 0.54768497876439315, 0.64082304875839924], [0.11154113644780606, -0.92134481397307355, 
-0.47282662127503539, 0.88748076184699709]], [[0.22357060873765233, -0.64706904541581722, 0.19015911386848727, 
--0.17771475973870299], [0.26760950005587758, 0.53275086600982924, -0.67459888863079587, -0.47669911211071847], 
-[0.13841053267986525, -0.55447231310576828, -0.60380591334225908, 0.45443682452695322]]], [[[0.90802807850631129, 
-0.5777144475067848, 0.29643536414101779, -0.70268788049900732], [-0.40417344419730084, 0.60820239131834386, 
-0.98877684418314415, 0.02773308630434923], [-0.99593792390185087, -0.99197717949359321, -0.57269874716477709, 
-0.23365613209137837]], [[0.74741771939310353, -0.57587639566704985, 0.74979270157039379, 0.88416116732103767], 
-[0.3503774673176725, 0.4043599318959008, 0.92900873297982289, -0.060730954440895157], [-0.82062848810850908, 
-0.36166456925688828, -0.98165811447801321, 0.10663254098157515]]]]),self.functionspace)
-      arg1=Data(-0.218709768625,self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.24615935787720122, -0.21870976862466218, 0.14312411275206283, -0.21870976862466218], 
-[0.66751834472618388, -0.21870976862466218, 0.44734491429921719, 0.56094524052401296], [-0.21870976862466218, 
--0.21870976862466218, 0.72854643636544969, 0.28084180850612128]], [[-0.13831139862668707, -0.21870976862466218, 
-0.45665100088168176, -0.17425379986376388], [-0.21870976862466218, -0.21870976862466218, 0.55707427536980814, 
--0.21870976862466218], [-0.21870976862466218, -0.21870976862466218, 0.18080270846310542, 0.81347475179814932]]], 
-[[[0.11676945660942573, 0.0090598274192139616, -0.21870976862466218, 0.10306553976340282], [0.99323093060600787, 
-0.29434293524837996, 0.54768497876439315, 0.64082304875839924], [0.11154113644780606, -0.21870976862466218, 
-0.47282662127503539, 0.88748076184699709]], [[0.22357060873765233, -0.21870976862466218, 0.19015911386848727, 
--0.17771475973870299], [0.26760950005587758, 0.53275086600982924, -0.21870976862466218, -0.21870976862466218], 
-[0.13841053267986525, -0.21870976862466218, -0.21870976862466218, 0.45443682452695322]]], [[[0.90802807850631129, 
-0.5777144475067848, 0.29643536414101779, -0.21870976862466218], [-0.21870976862466218, 0.60820239131834386, 
-0.98877684418314415, 0.02773308630434923], [-0.21870976862466218, -0.21870976862466218, -0.21870976862466218, 
-0.23365613209137837]], [[0.74741771939310353, -0.21870976862466218, 0.74979270157039379, 0.88416116732103767], 
-[0.3503774673176725, 0.4043599318959008, 0.92900873297982289, -0.060730954440895157], [-0.21870976862466218, 
-0.36166456925688828, -0.21870976862466218, 0.10663254098157515]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_expandedData_rank0_offset0(self):
+      arg0=Data(-7.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-5.0)+(1-msk_arg1)*(0.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(-0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_expandedData_rank0(self):
-      arg0=Data(-0.0924750298109,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.719276974378)+(1.-msk_arg1)*(-0.901780055402)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.719276974378)+(1.-msk_ref)*(-0.0924750298109)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_expandedData_rank0(self):
-      arg0=Data(numpy.array([0.19003810057983306, 0.86747179360557602]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.979758050952)+(1.-msk_arg1)*(0.498784837635)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.19003810057983306, 0.86747179360557602])+(1.-msk_ref)*numpy.array([0.49878483763491466, 
-0.86747179360557602])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_expandedData_rank0(self):
-      arg0=Data(numpy.array([[-0.21116738853853634, 0.39376908967419455, -0.90448828983244067, 0.39775680151484716, 
--0.62546967898667782], [0.71684884432650064, -0.2950221732323155, 0.061549355711304932, 0.92168965316615159, 
-0.54752726203495428], [-0.12485263858702367, 0.16626287261463624, -0.79329781788494325, -0.22207097268419607, 
-0.19795438035557633], [0.76599397431182026, 0.56414018544113698, 0.95805026779533731, -0.69615823883217742, 
-0.21821142022539242]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.243791427144)+(1.-msk_arg1)*(-0.440291613911)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.21116738853853634, 0.39376908967419455, -0.24379142714392676, 0.39775680151484716, 
--0.24379142714392676], [0.71684884432650064, -0.24379142714392676, 0.061549355711304932, 0.92168965316615159, 
-0.54752726203495428], [-0.12485263858702367, 0.16626287261463624, -0.24379142714392676, -0.22207097268419607, 
-0.19795438035557633], [0.76599397431182026, 0.56414018544113698, 0.95805026779533731, -0.24379142714392676, 
-0.21821142022539242]])+(1.-msk_ref)*numpy.array([[-0.21116738853853634, 0.39376908967419455, -0.44029161391063454, 
-0.39775680151484716, -0.44029161391063454], [0.71684884432650064, -0.2950221732323155, 0.061549355711304932, 
-0.92168965316615159, 0.54752726203495428], [-0.12485263858702367, 0.16626287261463624, -0.44029161391063454, 
--0.22207097268419607, 0.19795438035557633], [0.76599397431182026, 0.56414018544113698, 0.95805026779533731, 
--0.44029161391063454, 0.21821142022539242]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_expandedData_rank0(self):
-      arg0=Data(numpy.array([[[0.71382052722853828, 0.59639246293382753], [0.79091055029858603, 0.6098069915009563]], 
-[[-0.81877756445176075, -0.12572711561586747], [0.6629503717900096, 0.088668188470614639]], [[-0.25907968164793926, 
-0.078844106245125056], [0.53171494813158082, -0.48562454486265927]], [[-0.16221141560120533, -0.22108938742601714], 
-[-0.19849691519790702, 0.1366342465866397]], [[0.97032753659399651, 0.10811990970766572], [-0.53083812183678813, 
-0.48681350528164535]], [[0.94501075888711217, 0.15734516046100699], [0.67336660412428007, 
-0.54871928770743117]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.154574403253)+(1.-msk_arg1)*(0.444360735115)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.71382052722853828, 0.59639246293382753], [0.79091055029858603, 0.6098069915009563]], 
-[[0.15457440325278737, 0.15457440325278737], [0.6629503717900096, 0.15457440325278737]], [[0.15457440325278737, 
-0.15457440325278737], [0.53171494813158082, 0.15457440325278737]], [[0.15457440325278737, 0.15457440325278737], 
-[0.15457440325278737, 0.15457440325278737]], [[0.97032753659399651, 0.15457440325278737], [0.15457440325278737, 
-0.48681350528164535]], [[0.94501075888711217, 0.15734516046100699], [0.67336660412428007, 
-0.54871928770743117]]])+(1.-msk_ref)*numpy.array([[[0.71382052722853828, 0.59639246293382753], [0.79091055029858603, 
-0.6098069915009563]], [[0.4443607351150709, 0.4443607351150709], [0.6629503717900096, 0.4443607351150709]], 
-[[0.4443607351150709, 0.4443607351150709], [0.53171494813158082, 0.4443607351150709]], [[0.4443607351150709, 
-0.4443607351150709], [0.4443607351150709, 0.4443607351150709]], [[0.97032753659399651, 0.4443607351150709], 
-[0.4443607351150709, 0.48681350528164535]], [[0.94501075888711217, 0.4443607351150709], [0.67336660412428007, 
-0.54871928770743117]]])
+   def test_generalTensorProduct_constData_rank1_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-6.0, -1.0, -3.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-3.0, -4.0, 3.0])+(1.-msk_arg1)*numpy.array([4.0, 4.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(13.0)+(1.-msk_ref)*numpy.array(-28.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_expandedData_rank0(self):
-      arg0=Data(numpy.array([[[[0.17987454394191782, -0.47366581235947391, 0.57343836836209627, -0.38076754396458123], 
-[0.57156205056895448, 0.22221196833792156, -0.63457115192030189, -0.90743873572672884], [0.50190781994193601, 
--0.72382204778829151, -0.16048375541143778, 0.24666469799623414]], [[0.1797380572435916, 0.16543463798169644, 
--0.38942568372144026, -0.60094923326812366], [0.58369106606630172, -0.72979782894371525, -0.71685913494409648, 
--0.43487862431086666], [0.94570907221553924, -0.71041646506714295, -0.57201057001577316, -0.27780439634546106]]], 
-[[[0.21885917868948757, 0.691429511541092, -0.86074155940358898, -0.74572948424544871], [-0.67104106531707486, 
-0.65026368776100796, -0.77242606184409479, -0.17309140373321386], [-0.71424293657762106, 0.0160043137660697, 
--0.86608565479945288, 0.21568143007726359]], [[0.17793601295093553, 0.8241368231005648, -0.56689484436349358, 
--0.64591475368907791], [-0.83488920100836284, 0.89807531811166474, 0.12481763857472217, 0.19555968134032309], 
-[0.90280696977547814, -0.3114337513979637, -0.4016548633642858, 0.84998160623596397]]], [[[-0.41113212039641711, 
-0.69589842214715314, 0.40122617777186043, 0.66162309921520612], [-0.64259349002452848, -0.61545179085033141, 
-0.35720959723129897, -0.74561290819100612], [0.25049896732519583, -0.84957718142891347, -0.69000881268819692, 
-0.55532528673635673]], [[0.65030548208217898, 0.61753581199201957, 0.55386412523479889, -0.59819873675646185], 
-[0.59881331123370507, -0.73382421864055347, -0.25155846699294737, -0.83893004279709227], [-0.68286287600890794, 
--0.029611557116543841, 0.092485711989719332, 0.54588443381266383]]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.647690225694)+(1.-msk_arg1)*(-0.116678653334)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.17987454394191782, -0.47366581235947391, 0.57343836836209627, -0.38076754396458123], 
-[0.57156205056895448, 0.22221196833792156, -0.63457115192030189, -0.64769022569387036], [0.50190781994193601, 
--0.64769022569387036, -0.16048375541143778, 0.24666469799623414]], [[0.1797380572435916, 0.16543463798169644, 
--0.38942568372144026, -0.60094923326812366], [0.58369106606630172, -0.64769022569387036, -0.64769022569387036, 
--0.43487862431086666], [0.94570907221553924, -0.64769022569387036, -0.57201057001577316, -0.27780439634546106]]], 
-[[[0.21885917868948757, 0.691429511541092, -0.64769022569387036, -0.64769022569387036], [-0.64769022569387036, 
-0.65026368776100796, -0.64769022569387036, -0.17309140373321386], [-0.64769022569387036, 0.0160043137660697, 
--0.64769022569387036, 0.21568143007726359]], [[0.17793601295093553, 0.8241368231005648, -0.56689484436349358, 
--0.64591475368907791], [-0.64769022569387036, 0.89807531811166474, 0.12481763857472217, 0.19555968134032309], 
-[0.90280696977547814, -0.3114337513979637, -0.4016548633642858, 0.84998160623596397]]], [[[-0.41113212039641711, 
-0.69589842214715314, 0.40122617777186043, 0.66162309921520612], [-0.64259349002452848, -0.61545179085033141, 
-0.35720959723129897, -0.64769022569387036], [0.25049896732519583, -0.64769022569387036, -0.64769022569387036, 
-0.55532528673635673]], [[0.65030548208217898, 0.61753581199201957, 0.55386412523479889, -0.59819873675646185], 
-[0.59881331123370507, -0.64769022569387036, -0.25155846699294737, -0.64769022569387036], [-0.64769022569387036, 
--0.029611557116543841, 0.092485711989719332, 0.54588443381266383]]]])+(1.-msk_ref)*numpy.array([[[[0.17987454394191782, 
--0.11667865333375405, 0.57343836836209627, -0.11667865333375405], [0.57156205056895448, 0.22221196833792156, 
--0.11667865333375405, -0.11667865333375405], [0.50190781994193601, -0.11667865333375405, -0.11667865333375405, 
-0.24666469799623414]], [[0.1797380572435916, 0.16543463798169644, -0.11667865333375405, -0.11667865333375405], 
-[0.58369106606630172, -0.11667865333375405, -0.11667865333375405, -0.11667865333375405], [0.94570907221553924, 
--0.11667865333375405, -0.11667865333375405, -0.11667865333375405]]], [[[0.21885917868948757, 0.691429511541092, 
--0.11667865333375405, -0.11667865333375405], [-0.11667865333375405, 0.65026368776100796, -0.11667865333375405, 
--0.11667865333375405], [-0.11667865333375405, 0.0160043137660697, -0.11667865333375405, 0.21568143007726359]], 
-[[0.17793601295093553, 0.8241368231005648, -0.11667865333375405, -0.11667865333375405], [-0.11667865333375405, 
-0.89807531811166474, 0.12481763857472217, 0.19555968134032309], [0.90280696977547814, -0.11667865333375405, 
--0.11667865333375405, 0.84998160623596397]]], [[[-0.11667865333375405, 0.69589842214715314, 0.40122617777186043, 
-0.66162309921520612], [-0.11667865333375405, -0.11667865333375405, 0.35720959723129897, -0.11667865333375405], 
-[0.25049896732519583, -0.11667865333375405, -0.11667865333375405, 0.55532528673635673]], [[0.65030548208217898, 
-0.61753581199201957, 0.55386412523479889, -0.11667865333375405], [0.59881331123370507, -0.11667865333375405, 
--0.11667865333375405, -0.11667865333375405], [-0.11667865333375405, -0.029611557116543841, 0.092485711989719332, 
-0.54588443381266383]]]])
+   def test_generalTensorProduct_constData_rank2_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[5.0, 0.0, -1.0], [3.0, 6.0, 1.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 7.0, 0.0], [6.0, 6.0, -5.0]])+(1.-msk_arg1)*numpy.array([[0.0, 6.0, -4.0], [-4.0, -1.0, 
+3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(49.0)+(1.-msk_ref)*numpy.array(-11.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_array_rank1(self):
-      arg0=Data(-0.977109354346,self.functionspace)
-      arg1=numpy.array([0.70276044813264082, -0.31317697172843362])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.70276044813264082, -0.31317697172843362]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[1.0, -6.0, -6.0], [7.0, 0.0, 5.0], [1.0, 5.0, 0.0], [6.0, -5.0, -3.0]], [[7.0, -5.0, 6.0], 
+[-5.0, -2.0, 1.0], [7.0, 5.0, 7.0], [4.0, -4.0, -2.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[1.0, 5.0, 1.0], [5.0, 4.0, -2.0], [5.0, 4.0, 3.0], [-2.0, 3.0, 0.0]], [[2.0, 2.0, 0.0], 
+[-7.0, 7.0, -6.0], [1.0, 1.0, -1.0], [1.0, -4.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 3.0, 0.0], [5.0, 2.0, 4.0], [-5.0, 
+-1.0, 2.0], [-7.0, -1.0, 0.0]], [[-5.0, -7.0, 7.0], [0.0, 1.0, -5.0], [-6.0, -6.0, 4.0], [4.0, 1.0, -2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(40.0)+(1.-msk_ref)*numpy.array(-2.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_array_rank1(self):
-      arg0=Data(numpy.array([-0.62917253954533403, -0.91478760916921553]),self.functionspace)
-      arg1=numpy.array([0.33852418316707711, -0.28298537896949161])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.33852418316707711, -0.28298537896949161]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_expandedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-5.0, 7.0], [-2.0, 7.0], [3.0, 7.0]], [[5.0, -4.0], [0.0, 0.0], [2.0, 5.0]]], [[[4.0, 6.0], 
+[4.0, -4.0], [-7.0, 1.0]], [[0.0, -6.0], [-6.0, 2.0], [2.0, 3.0]]], [[[-5.0, 6.0], [-6.0, 0.0], [-6.0, 4.0]], [[-2.0, 3.0], 
+[7.0, -6.0], [0.0, 6.0]]], [[[-5.0, -4.0], [0.0, -3.0], [-7.0, 4.0]], [[-3.0, 6.0], [0.0, 0.0], [5.0, 
+2.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[7.0, 5.0], [0.0, -5.0], [-4.0, -5.0]], [[0.0, -3.0], [4.0, 5.0], [6.0, -6.0]]], [[[-4.0, 
+-3.0], [-6.0, 3.0], [-1.0, 0.0]], [[5.0, 1.0], [0.0, -6.0], [2.0, 5.0]]], [[[6.0, 7.0], [3.0, -1.0], [5.0, 6.0]], [[3.0, 1.0], 
+[-7.0, 0.0], [5.0, -5.0]]], [[[7.0, -4.0], [0.0, 5.0], [6.0, -6.0]], [[0.0, -4.0], [-2.0, 1.0], [-2.0, 
+2.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 4.0], [-5.0, 4.0], [0.0, -5.0]], [[-4.0, 0.0], [0.0, 3.0], [-5.0, -3.0]]], [[[1.0, 
+-1.0], [-2.0, -4.0], [4.0, 3.0]], [[-5.0, 2.0], [0.0, -4.0], [4.0, 0.0]]], [[[-1.0, 0.0], [0.0, 4.0], [7.0, 0.0]], [[-4.0, 
+-6.0], [-7.0, 2.0], [-4.0, 4.0]]], [[[3.0, 5.0], [-4.0, -6.0], [0.0, 2.0]], [[4.0, 0.0], [-2.0, 0.0], [-4.0, 0.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-374.0)+(1.-msk_ref)*numpy.array(-145.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_constData_rank1(self):
-      arg0=Data(-0.159726189832,self.functionspace)
-      arg1=Data(numpy.array([0.1189612003237861, -0.63087634684158944]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([0.1189612003237861, -0.15972618983177433]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_expandedData_rank1_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([1.0, -3.0])+(1.-msk_arg1)*numpy.array([0.0, 5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([1.0, -3.0])+(1.-msk_ref)*numpy.array([0.0, 5.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_constData_rank1(self):
-      arg0=Data(numpy.array([-0.740289439487964, 0.50792620718681647]),self.functionspace)
-      arg1=Data(numpy.array([-0.98869116031302773, -0.030691151152568041]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([-0.740289439487964, 0.50792620718681647]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([7.0, 3.0, -1.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, -2.0], [4.0, -7.0], [6.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 7.0], [0.0, 6.0], 
+[-6.0, -7.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-29.0, -40.0])+(1.-msk_ref)*numpy.array([-43.0, 74.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_expandedData_rank1(self):
-      arg0=Data(0.0787324456408,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.48016870047192817, -0.99662347188520961])+(1.-msk_arg1)*numpy.array([0.58774285667709059, 
-0.67262794612436538])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.078732445640770532, 0.078732445640770532])+(1.-msk_ref)*numpy.array([0.58774285667709059, 
-0.67262794612436538])
+   def test_generalTensorProduct_constData_rank2_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-6.0, -5.0, 4.0], [-6.0, -2.0, 1.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[4.0, 6.0], [-3.0, 5.0], [5.0, -3.0]], [[-3.0, -5.0], [-5.0, -2.0], [-5.0, 
+-5.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 1.0], [5.0, 1.0], [-3.0, 6.0]], [[-4.0, -4.0], [0.0, -7.0], [-3.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([34.0, -44.0])+(1.-msk_ref)*numpy.array([-34.0, 48.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=1j*arg0
+        arg1=1j*arg1
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank1_expandedData_rank1(self):
-      arg0=Data(numpy.array([0.17322811204814759, 0.25536817066436801]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.91972158516709168, -0.98465374807727835])+(1.-msk_arg1)*numpy.array([-0.19155853001762169, 
--0.43931509419045467])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.91972158516709168, 0.25536817066436801])+(1.-msk_ref)*numpy.array([0.17322811204814759, 
-0.25536817066436801])
+   def test_generalTensorProduct_constData_rank3_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-1.0, 4.0, 3.0], [4.0, 0.0, 3.0], [3.0, -4.0, -6.0], [7.0, 5.0, -4.0]], [[1.0, 4.0, -1.0], [5.0, 
+-3.0, -5.0], [2.0, -5.0, 3.0], [-5.0, -2.0, 1.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-1.0, -1.0], [-4.0, -7.0], [0.0, 6.0]], [[-3.0, 6.0], [5.0, 7.0], [-1.0, -5.0]], [[3.0, 
+-1.0], [-6.0, -2.0], [-3.0, 6.0]], [[5.0, 0.0], [2.0, -2.0], [0.0, 0.0]]], [[[-4.0, 5.0], [6.0, -3.0], [7.0, -6.0]], [[-4.0, 
+2.0], [2.0, -6.0], [1.0, -5.0]], [[3.0, 0.0], [1.0, -7.0], [-3.0, 0.0]], [[7.0, -6.0], [-4.0, 7.0], [-5.0, 
+5.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 0.0], [0.0, -4.0], [0.0, -1.0]], [[2.0, 5.0], [-4.0, 0.0], [-5.0, 5.0]], [[-7.0, 
+3.0], [-4.0, -3.0], [7.0, -5.0]], [[-3.0, -7.0], [-3.0, -3.0], [1.0, 1.0]]], [[[-4.0, 1.0], [-3.0, 7.0], [0.0, -6.0]], [[6.0, 
+5.0], [-4.0, -5.0], [3.0, -1.0]], [[-2.0, 6.0], [-7.0, 4.0], [-3.0, -5.0]], [[0.0, -2.0], [-1.0, -4.0], [1.0, -3.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([8.0, 67.0])+(1.-msk_ref)*numpy.array([-65.0, 71.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_array_rank2(self):
-      arg0=Data(-0.590060805237,self.functionspace)
-      arg1=numpy.array([[-0.46148245190505666, 0.72542064767267411, -0.49628838214418636, 0.36379029454198486, 
--0.35637937725143498], [0.77716266154028713, -0.0294929702278659, 0.77367789791539621, 0.26018292128939491, 
--0.0013933338625782277], [-0.71102579607495486, 0.058714555627548126, 0.62191425731141292, -0.9329697856968644, 
-0.48541403689676299], [-0.78897231411198532, -0.72015354884882865, -0.62803607199062306, -0.96795550516592099, 
-0.86073050375759519]])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[-0.46148245190505666, 0.72542064767267411, -0.49628838214418636, 0.36379029454198486, 
--0.35637937725143498], [0.77716266154028713, -0.0294929702278659, 0.77367789791539621, 0.26018292128939491, 
--0.0013933338625782277], [-0.59006080523717053, 0.058714555627548126, 0.62191425731141292, -0.59006080523717053, 
-0.48541403689676299], [-0.59006080523717053, -0.59006080523717053, -0.59006080523717053, -0.59006080523717053, 
-0.86073050375759519]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_expandedData_rank2_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, 2.0, -5.0, -7.0, 0.0], [-7.0, -2.0, -2.0, -3.0, -5.0], [-7.0, -2.0, -2.0, 0.0, 0.0], 
+[7.0, 2.0, 2.0, -6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 2.0, 0.0, -1.0, 0.0], [-1.0, 4.0, 1.0, -2.0, -1.0], [-7.0, 
+-2.0, -7.0, 1.0, 3.0], [4.0, 6.0, 4.0, -7.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-2.0, -4.0, 10.0, 14.0, -0.0], [14.0, 4.0, 4.0, 6.0, 10.0], [14.0, 4.0, 4.0, -0.0, -0.0], 
+[-14.0, -4.0, -4.0, 12.0, 4.0]])+(1.-msk_ref)*numpy.array([[4.0, -4.0, -0.0, 2.0, -0.0], [2.0, -8.0, -2.0, 4.0, 2.0], [14.0, 
+4.0, 14.0, -2.0, -6.0], [-8.0, -12.0, -8.0, 14.0, -0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[-0.73760404253705514, 0.50224248181499931, 0.11399712803883166, -0.13254212815072308, 
-0.74172163669326041], [-0.87041848231795704, 0.84343778201486463, -0.75554993046891106, 0.9855020616978345, 
--0.54320886383165745], [0.015954104044625605, -0.72612141326347879, -0.34799202711515242, -0.59679759609203797, 
--0.2575746318844927], [-0.2477036236422252, -0.021811926970866979, 0.81844582541975552, -0.14903149292622531, 
-0.80053174022124529]]),self.functionspace)
-      arg1=numpy.array([[-0.86954510950167463, 0.1017003127120133, -0.16951929662470433, 0.70137020593450439, 
-0.77429037367257458], [0.39247727833147628, -0.71486192220367606, -0.59117959653327024, 0.50948617730426826, 
--0.88092334234319924], [-0.95167080948153315, 0.021566922221860629, -0.37806539314914223, 0.3191199630251873, 
-0.21890366409298223], [0.8635367262140623, 0.52741696809771943, 0.40373578351947836, 0.40740580857358721, 0.50991869479490881]])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[-0.73760404253705514, 0.50224248181499931, 0.11399712803883166, 0.70137020593450439, 
-0.77429037367257458], [0.39247727833147628, 0.84343778201486463, -0.59117959653327024, 0.9855020616978345, 
--0.54320886383165745], [0.015954104044625605, 0.021566922221860629, -0.34799202711515242, 0.3191199630251873, 
-0.21890366409298223], [0.8635367262140623, 0.52741696809771943, 0.81844582541975552, 0.40740580857358721, 
-0.80053174022124529]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-3.0, -7.0, -3.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[4.0, 7.0, 6.0, 7.0, 1.0], [5.0, -5.0, 4.0, 1.0, 1.0], [-1.0, 2.0, -2.0, -7.0, 5.0], [-4.0, 
+0.0, -5.0, 0.0, -6.0]], [[-2.0, 1.0, -4.0, -1.0, 3.0], [4.0, 4.0, 4.0, 3.0, -4.0], [3.0, -2.0, -1.0, -6.0, 0.0], [-5.0, -6.0, 
+-6.0, -4.0, -7.0]], [[3.0, -1.0, -5.0, 4.0, -2.0], [-5.0, 4.0, 5.0, 6.0, -3.0], [-5.0, 3.0, 1.0, 0.0, 0.0], [2.0, 7.0, 6.0, 
+4.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -4.0, 3.0, -3.0, -6.0], [-2.0, -4.0, -1.0, 6.0, -1.0], [6.0, 0.0, 0.0, 0.0, 
+5.0], [-4.0, -4.0, 5.0, -7.0, 0.0]], [[-2.0, 1.0, 1.0, -3.0, -3.0], [1.0, 6.0, -6.0, -2.0, 7.0], [2.0, 3.0, 0.0, 5.0, -5.0], 
+[4.0, 0.0, -4.0, -1.0, 2.0]], [[-3.0, 7.0, -5.0, -5.0, 5.0], [4.0, 4.0, -7.0, -7.0, -3.0], [7.0, -5.0, 6.0, -5.0, 0.0], [2.0, 
+7.0, 3.0, -3.0, 7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-7.0, -25.0, 25.0, -26.0, -18.0], [-28.0, -25.0, -55.0, -42.0, 34.0], [-3.0, -1.0, 10.0, 63.0, 
+-15.0], [41.0, 21.0, 39.0, 16.0, 88.0]])+(1.-msk_ref)*numpy.array([[26.0, -16.0, -1.0, 45.0, 24.0], [-13.0, -42.0, 66.0, 17.0, 
+-37.0], [-53.0, -6.0, -18.0, -20.0, 20.0], [-22.0, -9.0, 4.0, 37.0, -35.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_constData_rank2(self):
-      arg0=Data(0.471113579692,self.functionspace)
-      arg1=Data(numpy.array([[0.20278512451424202, 0.46932554124551484, 0.51627101397671771, -0.15806811678484656, 
-0.90125732162226746], [-0.64525760065047266, -0.99646917035423299, -0.0079700168467822241, -0.1148252168651378, 
--0.60869273468514651], [-0.81920269598799123, 0.18492463625508537, 0.67703260540557975, 0.38678293776089578, 
--0.58337450118932721], [-0.85103881319765606, -0.18597068284684348, 0.55532783770806615, -0.3391026116648197, 
-0.59931507372202009]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.47111357969230805, 0.47111357969230805, 0.51627101397671771, 0.47111357969230805, 
-0.90125732162226746], [0.47111357969230805, 0.47111357969230805, 0.47111357969230805, 0.47111357969230805, 
-0.47111357969230805], [0.47111357969230805, 0.47111357969230805, 0.67703260540557975, 0.47111357969230805, 
-0.47111357969230805], [0.47111357969230805, 0.47111357969230805, 0.55532783770806615, 0.47111357969230805, 
-0.59931507372202009]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[-0.17406452878186696, -0.34759214930565996, -0.13708153516362609, 0.93110590449668984, 
--0.47649961659515139], [-0.35702537789588118, -0.4057682901706241, 0.56892562984164674, 0.20451757373433055, 
--0.47729926624352892], [-0.55493234840963379, 0.020855045362278224, 0.95156666561071002, 0.14975165550539549, 
--0.17074783729098764], [-0.2364495010997254, -0.32021782391836329, -0.45843843696539488, -0.47665234638234, 
--0.41919606212785676]]),self.functionspace)
-      arg1=Data(numpy.array([[0.64408124666207822, -0.67629542279010635, -0.4931164628479503, -0.96447891179315248, 
--0.45618690487636582], [0.18569576708094893, -0.085193091641874163, 0.08793086582533971, 0.64570776148383136, 
--0.5516531478806932], [0.87675126968759676, -0.39508497185268077, -0.97669171907295138, -0.68655710586099006, 
--0.028857220969970232], [-0.3670380390017618, 0.76258006170069592, -0.31454790037894464, 0.6627659629911522, 
-0.82734991520477563]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[0.64408124666207822, -0.34759214930565996, -0.13708153516362609, 0.93110590449668984, 
--0.45618690487636582], [0.18569576708094893, -0.085193091641874163, 0.56892562984164674, 0.64570776148383136, 
--0.47729926624352892], [0.87675126968759676, 0.020855045362278224, 0.95156666561071002, 0.14975165550539549, 
--0.028857220969970232], [-0.2364495010997254, 0.76258006170069592, -0.31454790037894464, 0.6627659629911522, 
-0.82734991520477563]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_expandedData_rank2(self):
-      arg0=Data(-0.0165871765665,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.73128249610105489, 0.8419999761644652, 0.32706544558055151, 0.98621609382436559, 
-0.11814390137662678], [0.19794947116873596, 0.31254355907321152, -0.87988550364485918, -0.11555651603083028, 
--0.71600368849223273], [-0.1893391600405403, 0.90957761312463936, -0.52243082625432802, -0.61123719298866308, 
-0.33907244894623134], [0.69675393273476094, 0.80610078097181703, -0.025854445517779379, 0.94898341046945389, 
-0.46113499488993592]])+(1.-msk_arg1)*numpy.array([[0.23505303855840864, 0.99481465040860417, -0.086492983784499877, 
--0.65370229345838227, 0.10003757203241559], [-0.55539504622389524, -0.97706587559470259, 0.76222581775594289, 
-0.77064743585593676, 0.37822774452875341], [0.63726139395335868, 0.82448429030660098, -0.98743591219817395, 
--0.11783271519582783, 0.82622085914926746], [0.79063087780255503, -0.51677954263556924, -0.11079135634696624, 
-0.55532802164644224, 0.97336607909484085]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.016587176566458695, 0.8419999761644652, 0.32706544558055151, 0.98621609382436559, 
-0.11814390137662678], [0.19794947116873596, 0.31254355907321152, -0.016587176566458695, -0.016587176566458695, 
--0.016587176566458695], [-0.016587176566458695, 0.90957761312463936, -0.016587176566458695, -0.016587176566458695, 
-0.33907244894623134], [0.69675393273476094, 0.80610078097181703, -0.016587176566458695, 0.94898341046945389, 
-0.46113499488993592]])+(1.-msk_ref)*numpy.array([[0.23505303855840864, 0.99481465040860417, -0.016587176566458695, 
--0.016587176566458695, 0.10003757203241559], [-0.016587176566458695, -0.016587176566458695, 0.76222581775594289, 
-0.77064743585593676, 0.37822774452875341], [0.63726139395335868, 0.82448429030660098, -0.016587176566458695, 
--0.016587176566458695, 0.82622085914926746], [0.79063087780255503, -0.016587176566458695, -0.016587176566458695, 
-0.55532802164644224, 0.97336607909484085]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[-0.58944550721294209, 0.11789616185996188, 0.72555020927912528, 0.95067825171691411, 
-0.44929807483372386], [-0.90050975945004685, -0.14027235979416108, -0.50271571837565965, 0.71764496858912841, 
-0.13936247694569537], [-0.55363895921566852, -0.29692903194729126, -0.12968512147399403, 0.16630251248490757, 
--0.15779583568993605], [-0.91804262372165168, -0.0058087569025269126, 0.57431208620955165, -0.71561067889580943, 
--0.22286757830799497]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.99165981962421723, 0.056234396987206559, -0.96929836288649107, 0.85741514845807765, 
-0.31290702472003784], [0.66879661516796074, 0.74410544323631544, 0.61758123318413549, 0.0023178475410641219, 
-0.035637036084378515], [0.80734776741943692, -0.93425673113467789, -0.3545773036750044, 0.17713706129968121, 
--0.78562855023306311], [0.95764289578713813, 0.82592763875748232, 0.56453388909804225, 0.33669515016119256, 
-0.68270953107335797]])+(1.-msk_arg1)*numpy.array([[0.46121428483489479, 0.77301745076266992, -0.75239767323970663, 
--0.84007824075301141, 0.54854476434581101], [-0.18306960903719038, 0.22306205318244277, 0.95307177391042264, 
--0.83728247335587391, -0.64823533348017937], [0.90595429846142239, -0.55842375993133087, 0.69860419850019628, 
--0.58794473533051539, -0.90321846168159303], [0.19112532041271257, -0.16066829098287294, 0.62710659839874872, 
--0.58348891958458182, -0.43880626183960802]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.58944550721294209, 0.11789616185996188, 0.72555020927912528, 0.95067825171691411, 
-0.44929807483372386], [0.66879661516796074, 0.74410544323631544, 0.61758123318413549, 0.71764496858912841, 
-0.13936247694569537], [0.80734776741943692, -0.29692903194729126, -0.12968512147399403, 0.17713706129968121, 
--0.15779583568993605], [0.95764289578713813, 0.82592763875748232, 0.57431208620955165, 0.33669515016119256, 
-0.68270953107335797]])+(1.-msk_ref)*numpy.array([[0.46121428483489479, 0.77301745076266992, 0.72555020927912528, 
-0.95067825171691411, 0.54854476434581101], [-0.18306960903719038, 0.22306205318244277, 0.95307177391042264, 
-0.71764496858912841, 0.13936247694569537], [0.90595429846142239, -0.29692903194729126, 0.69860419850019628, 
-0.16630251248490757, -0.15779583568993605], [0.19112532041271257, -0.0058087569025269126, 0.62710659839874872, 
--0.58348891958458182, -0.22286757830799497]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_array_rank3(self):
-      arg0=Data(0.516978268542,self.functionspace)
-      arg1=numpy.array([[[0.1203754261590837, -0.30872063802497229], [-0.54367292398629163, -0.28894544783644749]], 
-[[0.98579636264447745, -0.1617667296901939], [-0.71399942465432775, 0.53397315922387301]], [[-0.30699998747323254, 
-0.077194107501915799], [0.79875258103307534, 0.80801781194196387]], [[0.15460773887563417, 0.90896321404086278], 
-[0.20719915824628354, 0.51262923866513121]], [[-0.42605851894450963, 0.11121377720978609], [0.83365318051571125, 
--0.090277192445190391]], [[0.11506747491337666, 0.6855450860006127], [-0.55520344405285305, -0.29122646515827966]]])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.51697826854212692, 0.51697826854212692], [0.51697826854212692, 0.51697826854212692]], 
-[[0.98579636264447745, 0.51697826854212692], [0.51697826854212692, 0.53397315922387301]], [[0.51697826854212692, 
-0.51697826854212692], [0.79875258103307534, 0.80801781194196387]], [[0.51697826854212692, 0.90896321404086278], 
-[0.51697826854212692, 0.51697826854212692]], [[0.51697826854212692, 0.51697826854212692], [0.83365318051571125, 
-0.51697826854212692]], [[0.51697826854212692, 0.6855450860006127], [0.51697826854212692, 
-0.51697826854212692]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-2.0, -1.0, 3.0], [3.0, 2.0, 3.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-4.0, 4.0, 0.0, -3.0, 6.0], [5.0, -4.0, 4.0, 4.0, 2.0], [-7.0, -2.0, -3.0, -3.0, 5.0], 
+[-5.0, -4.0, -4.0, 1.0, -3.0]], [[-5.0, 7.0, -6.0, 1.0, 2.0], [-5.0, 4.0, 4.0, 6.0, -6.0], [7.0, 6.0, 6.0, 3.0, -3.0], [7.0, 
+4.0, 7.0, -6.0, -3.0]], [[2.0, -3.0, -3.0, -5.0, -6.0], [2.0, -4.0, 5.0, -4.0, -1.0], [1.0, -3.0, 1.0, -3.0, -2.0], [3.0, 7.0, 
+1.0, 0.0, -1.0]]], [[[4.0, -4.0, 0.0, 5.0, 2.0], [1.0, -3.0, 0.0, 0.0, -5.0], [-7.0, -5.0, -5.0, 0.0, -1.0], [6.0, -3.0, 7.0, 
+1.0, -3.0]], [[5.0, 4.0, 0.0, -4.0, 1.0], [1.0, 7.0, -7.0, 3.0, 5.0], [0.0, 4.0, 3.0, 7.0, -4.0], [-1.0, 4.0, -3.0, 4.0, 5.0]], 
+[[-6.0, 1.0, 5.0, -2.0, 2.0], [1.0, 6.0, -4.0, 1.0, -6.0], [-3.0, -6.0, 2.0, -7.0, 0.0], [3.0, 6.0, -5.0, -5.0, 
+-1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, -4.0, 7.0, -4.0, 2.0], [5.0, -7.0, -5.0, -3.0, 4.0], [0.0, 6.0, -7.0, -2.0, 
+-7.0], [-6.0, 7.0, -5.0, 4.0, -2.0]], [[6.0, 5.0, 6.0, -3.0, 0.0], [0.0, -7.0, 6.0, -5.0, -3.0], [-3.0, 1.0, 6.0, 5.0, -4.0], 
+[3.0, 0.0, 2.0, -5.0, 4.0]], [[-3.0, -3.0, 5.0, -5.0, 6.0], [3.0, -6.0, 7.0, 1.0, -5.0], [2.0, 5.0, 5.0, 5.0, 1.0], [1.0, -4.0, 
+3.0, 5.0, -6.0]]], [[[3.0, -7.0, 2.0, 6.0, 0.0], [1.0, 6.0, -4.0, -1.0, -7.0], [2.0, 4.0, -2.0, -7.0, 4.0], [6.0, 0.0, 1.0, 
+0.0, 4.0]], [[1.0, 1.0, 5.0, -1.0, 3.0], [5.0, 5.0, 6.0, 4.0, -5.0], [-3.0, 1.0, -3.0, -2.0, 0.0], [2.0, 1.0, -2.0, -5.0, 
+-4.0]], [[-5.0, 7.0, -1.0, -5.0, -6.0], [-3.0, 3.0, 6.0, 7.0, -1.0], [-6.0, -6.0, 4.0, 1.0, -7.0], [-2.0, -6.0, -1.0, 2.0, 
+-5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[23.0, -25.0, 12.0, -9.0, -18.0], [9.0, 15.0, -23.0, -17.0, -24.0], [-20.0, -36.0, 0.0, -13.0, 
+-24.0], [37.0, 42.0, 4.0, 0.0, 4.0]])+(1.-msk_ref)*numpy.array([[-9.0, -4.0, 8.0, -3.0, 2.0], [3.0, 40.0, 43.0, 40.0, -54.0], 
+[-9.0, -2.0, 23.0, -8.0, 12.0], [28.0, -42.0, 13.0, 8.0, -29.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_array_rank3(self):
-      arg0=Data(numpy.array([[[-0.019064560845273526, -0.66082512842015606], [0.7775245397942645, -0.97863728880489664]], 
-[[0.14796990911746843, -0.14940640351421752], [-0.86829509897198331, 0.37449746403230755]], [[0.37150654719541598, 
--0.28378634170515826], [-0.50000172789557618, 0.12870803836646894]], [[0.011474562798716059, 0.62211999362561543], 
-[0.20936671603779877, 0.1596384101994337]], [[0.48413175379125017, -0.70455876802613626], [0.95196006961287805, 
-0.20450770288369013]], [[-0.69630908911115341, -0.40070777001767066], [0.39061204191308385, 
--0.7494107073434304]]]),self.functionspace)
-      arg1=numpy.array([[[-0.78977223364983429, -0.39796958371743218], [-0.72434391726505232, -0.52658036061654578]], 
-[[0.30677953915987843, -0.27325740398129361], [-0.44704945638883409, 0.35675189799215068]], [[-0.85496603242765823, 
--0.49015497061116231], [0.38100286965101793, 0.71258135816204082]], [[-0.69502829292158985, -0.66075782445418518], 
-[0.62742938866730125, -0.0042722353662665302]], [[0.47028792653016804, -0.43167155331296869], [0.46101712703457975, 
--0.26196273464811326]], [[-0.79525334450742657, 0.58902924204184304], [0.071218600732356085, -0.44930940165988953]]])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.019064560845273526, -0.39796958371743218], [0.7775245397942645, -0.52658036061654578]], 
-[[0.30677953915987843, -0.14940640351421752], [-0.44704945638883409, 0.37449746403230755]], [[0.37150654719541598, 
--0.28378634170515826], [0.38100286965101793, 0.71258135816204082]], [[0.011474562798716059, 0.62211999362561543], 
-[0.62742938866730125, 0.1596384101994337]], [[0.48413175379125017, -0.43167155331296869], [0.95196006961287805, 
-0.20450770288369013]], [[-0.69630908911115341, 0.58902924204184304], [0.39061204191308385, 
--0.44930940165988953]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_expandedData_rank3_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-4.0, 0.0], [-5.0, 4.0]], [[-4.0, 6.0], [0.0, 0.0]], [[-3.0, 0.0], [2.0, -4.0]], [[6.0, 
+7.0], [2.0, -2.0]], [[3.0, 2.0], [-6.0, 3.0]], [[5.0, 0.0], [6.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 0.0], [-6.0, 
+5.0]], [[2.0, 3.0], [7.0, -2.0]], [[1.0, 7.0], [0.0, 0.0]], [[-7.0, -7.0], [0.0, -7.0]], [[6.0, -7.0], [3.0, 0.0]], [[0.0, 
+5.0], [6.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-16.0, 0.0], [-20.0, 16.0]], [[-16.0, 24.0], [0.0, 0.0]], [[-12.0, 0.0], [8.0, -16.0]], 
+[[24.0, 28.0], [8.0, -8.0]], [[12.0, 8.0], [-24.0, 12.0]], [[20.0, 0.0], [24.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, 
+0.0], [-24.0, 20.0]], [[8.0, 12.0], [28.0, -8.0]], [[4.0, 28.0], [0.0, 0.0]], [[-28.0, -28.0], [0.0, -28.0]], [[24.0, -28.0], 
+[12.0, 0.0]], [[0.0, 20.0], [24.0, -12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_constData_rank3(self):
-      arg0=Data(-0.520111358301,self.functionspace)
-      arg1=Data(numpy.array([[[-0.53755593069331176, 0.37344778982644522], [0.90325038776102318, -0.89380296608704612]], 
-[[0.59616188236635415, 0.051917694202589626], [-0.04448028945702287, 0.41100328136339304]], [[0.33171935562963939, 
--0.24899622688538758], [0.62960041822469925, 0.33958207874297885]], [[0.77867517548268683, 0.42072327881397564], 
-[-0.74938980192739946, 0.81416985659114172]], [[0.3116774006710874, -0.33738332950437711], [0.78527047728394561, 
--0.74961547941494744]], [[-0.20009722385279827, -0.6571543996337208], [0.17776822203863141, 
-0.44451143669045345]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.52011135830068911, 0.37344778982644522], [0.90325038776102318, -0.52011135830068911]], 
-[[0.59616188236635415, 0.051917694202589626], [-0.04448028945702287, 0.41100328136339304]], [[0.33171935562963939, 
--0.24899622688538758], [0.62960041822469925, 0.33958207874297885]], [[0.77867517548268683, 0.42072327881397564], 
-[-0.52011135830068911, 0.81416985659114172]], [[0.3116774006710874, -0.33738332950437711], [0.78527047728394561, 
--0.52011135830068911]], [[-0.20009722385279827, -0.52011135830068911], [0.17776822203863141, 
-0.44451143669045345]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([-6.0, -1.0, -4.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-4.0, 0.0], [-7.0, 7.0]], [[2.0, 3.0], [-4.0, 5.0]], [[-7.0, -1.0], [4.0, 4.0]], [[-4.0, 
+-4.0], [0.0, -6.0]], [[4.0, -3.0], [-2.0, -2.0]], [[-5.0, 3.0], [-5.0, -6.0]]], [[[-7.0, 3.0], [-1.0, -6.0]], [[0.0, -1.0], 
+[-2.0, -3.0]], [[0.0, 5.0], [7.0, 3.0]], [[-6.0, 5.0], [-5.0, 0.0]], [[-2.0, 6.0], [2.0, 1.0]], [[4.0, -4.0], [-7.0, 5.0]]], 
+[[[-4.0, 3.0], [-5.0, -7.0]], [[-7.0, 6.0], [-6.0, 3.0]], [[5.0, 3.0], [4.0, 2.0]], [[-1.0, 7.0], [4.0, -5.0]], [[6.0, -6.0], 
+[3.0, 2.0]], [[-2.0, 3.0], [-3.0, 7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, -3.0], [7.0, 5.0]], [[-5.0, 3.0], [7.0, 4.0]], 
+[[7.0, -2.0], [0.0, 0.0]], [[2.0, -4.0], [7.0, 2.0]], [[-3.0, 6.0], [4.0, -2.0]], [[-4.0, -2.0], [0.0, 0.0]]], [[[1.0, 7.0], 
+[-5.0, -5.0]], [[5.0, 3.0], [7.0, 0.0]], [[-3.0, 0.0], [-5.0, -4.0]], [[1.0, 0.0], [5.0, -4.0]], [[0.0, -1.0], [0.0, 2.0]], 
+[[-5.0, 6.0], [4.0, 3.0]]], [[[7.0, -6.0], [-4.0, 6.0]], [[5.0, -1.0], [7.0, -4.0]], [[3.0, -6.0], [5.0, 2.0]], [[-6.0, 2.0], 
+[5.0, -5.0]], [[0.0, 7.0], [-7.0, 0.0]], [[5.0, 0.0], [-6.0, -2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[47.0, -15.0], [63.0, -8.0]], [[16.0, -41.0], [50.0, -39.0]], [[22.0, -11.0], [-47.0, -35.0]], 
+[[34.0, -9.0], [-11.0, 56.0]], [[-46.0, 36.0], [-2.0, 3.0]], [[34.0, -26.0], [49.0, 3.0]]])+(1.-msk_ref)*numpy.array([[[13.0, 
+35.0], [-21.0, -49.0]], [[5.0, -17.0], [-77.0, -8.0]], [[-51.0, 36.0], [-15.0, -4.0]], [[11.0, 16.0], [-67.0, 12.0]], [[18.0, 
+-63.0], [4.0, 10.0]], [[9.0, 6.0], [20.0, 5.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_constData_rank3(self):
-      arg0=Data(numpy.array([[[0.22644209225706202, -0.82408753542802948], [-0.3229055658381601, 0.2590293226229694]], 
-[[-0.26905946802022762, 0.2903861382640851], [0.12277829585192546, -0.77850587791871839]], [[-0.89889146053925439, 
-0.38226490597490859], [0.90580586744844571, 0.55103010631847082]], [[-0.039650312436662727, -0.88676021840684105], 
-[-0.51601766497181489, -0.25197490301551628]], [[0.61158062010002601, 0.29776204958735475], [0.71009302472890323, 
--0.66290156645868592]], [[0.35864937589582269, 0.39150421091712273], [0.62113215392768795, 
--0.60699036535846251]]]),self.functionspace)
-      arg1=Data(numpy.array([[[0.19115277784536788, -0.12179826773639668], [0.93712678010940254, 0.88203929581384566]], 
-[[-0.88435454431013327, 0.9789660191397036], [0.59264976401288116, -0.95487963435415701]], [[-0.63201606726111259, 
--0.55289610271892187], [-0.28138775032557017, 0.10882077764575948]], [[-0.49427255052853813, -0.052753620845127358], 
-[0.041666359004336684, 0.79096925989660916]], [[-0.41422835506377953, 0.44371821729329164], [0.29584910796715769, 
-0.32801776168641106]], [[0.48887697683026987, 0.060894815731677765], [0.03438210218260096, 
-0.012054779031575036]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[0.22644209225706202, -0.12179826773639668], [0.93712678010940254, 0.88203929581384566]], 
-[[-0.26905946802022762, 0.9789660191397036], [0.59264976401288116, -0.77850587791871839]], [[-0.63201606726111259, 
-0.38226490597490859], [0.90580586744844571, 0.55103010631847082]], [[-0.039650312436662727, -0.052753620845127358], 
-[0.041666359004336684, 0.79096925989660916]], [[0.61158062010002601, 0.44371821729329164], [0.71009302472890323, 
-0.32801776168641106]], [[0.48887697683026987, 0.39150421091712273], [0.62113215392768795, 
-0.012054779031575036]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_expandedData_rank4_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[2.0, 3.0, 1.0, 0.0], [7.0, -4.0, -4.0, 0.0], [-4.0, 0.0, 4.0, -6.0]], [[-7.0, -7.0, -5.0, 
+-5.0], [-6.0, -1.0, 3.0, -1.0], [2.0, 3.0, 4.0, -3.0]]], [[[7.0, 1.0, -1.0, 1.0], [7.0, -3.0, 7.0, 3.0], [-3.0, -3.0, -5.0, 
+0.0]], [[-6.0, 5.0, -5.0, 0.0], [-6.0, -6.0, 0.0, -6.0], [-2.0, -2.0, -3.0, 7.0]]], [[[-7.0, -5.0, 4.0, -4.0], [-2.0, 2.0, 
+-2.0, -5.0], [-6.0, -3.0, -2.0, 2.0]], [[-5.0, 0.0, 1.0, -6.0], [-7.0, 2.0, 6.0, 0.0], [3.0, 1.0, 0.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, 5.0, 4.0, -6.0], [-4.0, 0.0, -2.0, -4.0], [-6.0, 0.0, 5.0, -4.0]], [[-3.0, 0.0, 
+1.0, -5.0], [-3.0, -5.0, 3.0, -7.0], [0.0, -6.0, -1.0, -7.0]]], [[[2.0, 7.0, 1.0, 2.0], [-2.0, -1.0, 4.0, -7.0], [4.0, -3.0, 
+-6.0, 2.0]], [[-4.0, 6.0, -7.0, -3.0], [0.0, 2.0, 6.0, -5.0], [1.0, -2.0, -7.0, 7.0]]], [[[-2.0, -1.0, 3.0, -3.0], [-5.0, -6.0, 
+5.0, -1.0], [6.0, 1.0, -5.0, -7.0]], [[0.0, 1.0, 3.0, -2.0], [-3.0, -6.0, 4.0, 1.0], [-6.0, -6.0, -1.0, -7.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[8.0, 12.0, 4.0, 0.0], [28.0, -16.0, -16.0, 0.0], [-16.0, 0.0, 16.0, -24.0]], [[-28.0, -28.0, 
+-20.0, -20.0], [-24.0, -4.0, 12.0, -4.0], [8.0, 12.0, 16.0, -12.0]]], [[[28.0, 4.0, -4.0, 4.0], [28.0, -12.0, 28.0, 12.0], 
+[-12.0, -12.0, -20.0, 0.0]], [[-24.0, 20.0, -20.0, 0.0], [-24.0, -24.0, 0.0, -24.0], [-8.0, -8.0, -12.0, 28.0]]], [[[-28.0, 
+-20.0, 16.0, -16.0], [-8.0, 8.0, -8.0, -20.0], [-24.0, -12.0, -8.0, 8.0]], [[-20.0, 0.0, 4.0, -24.0], [-28.0, 8.0, 24.0, 0.0], 
+[12.0, 4.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[8.0, 20.0, 16.0, -24.0], [-16.0, 0.0, -8.0, -16.0], [-24.0, 0.0, 20.0, 
+-16.0]], [[-12.0, 0.0, 4.0, -20.0], [-12.0, -20.0, 12.0, -28.0], [0.0, -24.0, -4.0, -28.0]]], [[[8.0, 28.0, 4.0, 8.0], [-8.0, 
+-4.0, 16.0, -28.0], [16.0, -12.0, -24.0, 8.0]], [[-16.0, 24.0, -28.0, -12.0], [0.0, 8.0, 24.0, -20.0], [4.0, -8.0, -28.0, 
+28.0]]], [[[-8.0, -4.0, 12.0, -12.0], [-20.0, -24.0, 20.0, -4.0], [24.0, 4.0, -20.0, -28.0]], [[0.0, 4.0, 12.0, -8.0], [-12.0, 
+-24.0, 16.0, 4.0], [-24.0, -24.0, -4.0, -28.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_expandedData_rank3(self):
-      arg0=Data(-0.417160613179,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.59344857070579238, 0.57386185515692323], [0.22052027505720551, -0.02253631100635034]], 
-[[-0.79319250300435051, -0.80838786337089852], [0.72156951045421569, 0.79754573800662776]], [[0.44658460292787949, 
--0.6036139053961691], [-0.0074518374538019572, 0.10259587076510246]], [[-0.67150694427957869, -0.24769554924870607], 
-[0.34642765365536365, 0.40804680401868687]], [[-0.48546098050896314, -0.37273512567714118], [-0.93149112098916875, 
-0.56189739537971306]], [[0.38968682790960374, 0.6967969004356549], [0.31719546261205389, 
-0.66755203749869896]]])+(1.-msk_arg1)*numpy.array([[[-0.32798712079017855, 0.91458585203417941], [-0.1858316961301949, 
-0.10471165389886661]], [[0.25739129223381751, -0.20580522632299081], [-0.77836146736583722, 0.71646905903017921]], 
-[[-0.12213192671753959, 0.2681111999511725], [-0.88598687196668746, -0.10299574975782755]], [[-0.47951968494409059, 
-0.38762496133793989], [-0.20961640133930182, -0.46499685779521527]], [[-0.63002780928919999, 0.99970479651183686], 
-[-0.28892538074111696, -0.86014943997554583]], [[-0.87521791528084747, -0.2290352438643557], [0.61458437038138758, 
--0.054295041010556266]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.41716061317925801, 0.57386185515692323], [0.22052027505720551, -0.02253631100635034]], 
-[[-0.41716061317925801, -0.41716061317925801], [0.72156951045421569, 0.79754573800662776]], [[0.44658460292787949, 
--0.41716061317925801], [-0.0074518374538019572, 0.10259587076510246]], [[-0.41716061317925801, -0.24769554924870607], 
-[0.34642765365536365, 0.40804680401868687]], [[-0.41716061317925801, -0.37273512567714118], [-0.41716061317925801, 
-0.56189739537971306]], [[0.38968682790960374, 0.6967969004356549], [0.31719546261205389, 
-0.66755203749869896]]])+(1.-msk_ref)*numpy.array([[[-0.32798712079017855, 0.91458585203417941], [-0.1858316961301949, 
-0.10471165389886661]], [[0.25739129223381751, -0.20580522632299081], [-0.41716061317925801, 0.71646905903017921]], 
-[[-0.12213192671753959, 0.2681111999511725], [-0.41716061317925801, -0.10299574975782755]], [[-0.41716061317925801, 
-0.38762496133793989], [-0.20961640133930182, -0.41716061317925801]], [[-0.41716061317925801, 0.99970479651183686], 
-[-0.28892538074111696, -0.41716061317925801]], [[-0.41716061317925801, -0.2290352438643557], [0.61458437038138758, 
--0.054295041010556266]]])
+   def test_generalTensorProduct_constData_rank1_float_rank0_offset0(self):
+      arg0=Data(numpy.array([3.0, -7.0]),self.functionspace)
+      arg1=2.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([6.0, -14.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank3_expandedData_rank3(self):
-      arg0=Data(numpy.array([[[-0.83383467576998993, -0.83006279778742731], [0.61582380340209775, -0.4064088511087891]], 
-[[-0.4159938969754351, -0.073787477564773329], [-0.021547740656737036, 0.5133460168591264]], [[0.91656606912919014, 
-0.53167536065528687], [-0.61521902289133901, 0.4664937027114231]], [[0.97834019232877312, -0.93183928685658612], 
-[-0.89297362621765086, 0.98615396264285726]], [[0.34755706158837762, 0.58475703376154442], [-0.15101139759741611, 
-0.40395116766294437]], [[0.62168225352120166, 0.50496809316394398], [0.72198090495722789, 
-0.85904449954970996]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.19214098611675801, 0.07906975802244931], [0.70387607748340963, 0.73265073793599189]], 
-[[-0.6142258277704653, 0.6255979194324861], [0.46214070326839796, -0.28059147251841399]], [[-0.57130450989061998, 
-0.5709484739777515], [0.48615540360013054, -0.60718602833024926]], [[0.48182675680934151, -0.66948554719719966], 
-[0.8085115047175595, -0.95171986323783053]], [[0.5870376913405424, 0.59265808147737098], [0.49569538437672511, 
--0.32465377675760454]], [[0.41879820042914684, 0.82573065216442831], [0.14668313470902383, 
-0.78600006019282054]]])+(1.-msk_arg1)*numpy.array([[[0.63268720723055161, 0.78130831328720141], [-0.18520848313978489, 
--0.35202194720092805]], [[0.58179955935294925, 0.1226309312208731], [0.29154247836357272, -0.9060564605671757]], 
-[[0.71741017447493505, 0.96466082998871294], [-0.81353604274588265, -0.098340216808310954]], [[-0.88020377622640522, 
--0.84721483807877607], [0.6939301069991286, -0.30953811263549613]], [[0.99593228905602715, 0.32599642612508051], 
-[-0.40377432683868597, 0.0021172786571095337]], [[0.69285022412981334, 0.70887735927613194], [0.17846982139165757, 
-0.33981526774046644]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.19214098611675801, 0.07906975802244931], [0.70387607748340963, 0.73265073793599189]], 
-[[-0.4159938969754351, 0.6255979194324861], [0.46214070326839796, 0.5133460168591264]], [[0.91656606912919014, 
-0.5709484739777515], [0.48615540360013054, 0.4664937027114231]], [[0.97834019232877312, -0.66948554719719966], 
-[0.8085115047175595, 0.98615396264285726]], [[0.5870376913405424, 0.59265808147737098], [0.49569538437672511, 
-0.40395116766294437]], [[0.62168225352120166, 0.82573065216442831], [0.72198090495722789, 
-0.85904449954970996]]])+(1.-msk_ref)*numpy.array([[[0.63268720723055161, 0.78130831328720141], [0.61582380340209775, 
--0.35202194720092805]], [[0.58179955935294925, 0.1226309312208731], [0.29154247836357272, 0.5133460168591264]], 
-[[0.91656606912919014, 0.96466082998871294], [-0.61521902289133901, 0.4664937027114231]], [[0.97834019232877312, 
--0.84721483807877607], [0.6939301069991286, 0.98615396264285726]], [[0.99593228905602715, 0.58475703376154442], 
-[-0.15101139759741611, 0.40395116766294437]], [[0.69285022412981334, 0.70887735927613194], [0.72198090495722789, 
-0.85904449954970996]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_array_rank4(self):
-      arg0=Data(-0.142135287883,self.functionspace)
-      arg1=numpy.array([[[[-0.3214758956274788, -0.095246696795476593, 0.88428285109896976, 0.16221904765171113], 
-[0.2694361196789572, -0.88687321541037512, 0.02982831555263199, 0.36044697686186544], [0.089838925108686407, 
-0.1168644540354129, -0.41060659412622824, 0.51404357016969393]], [[-0.7228284299326766, -0.74820755507542192, 
--0.53859530054671856, -0.10221620366876616], [0.59211782258097068, -0.9868578737653857, 0.51866928562956849, 
--0.47068533837586557], [0.54008589927595518, 0.30880228975280732, 0.011323333079816589, -0.23519250089433008]]], 
-[[[-0.88835060064517424, 0.97805478155238479, 0.044980281282704704, 0.54172810913588032], [0.50306412490394248, 
--0.9089797473431025, -0.65257701723518702, -0.81985356457976932], [-0.55532857771618849, 0.90847532179586454, 
-0.73479685498652625, -0.95360986864558894]], [[-0.070414261238669784, -0.55257468908581853, -0.8087953736998108, 
--0.88978135385971924], [0.30925435765744647, 0.011985479496297913, -0.94329973754759822, -0.78626227567625295], 
-[-0.80368619190217405, -0.0018149953637613958, -0.64327784734883697, -0.70628255506304627]]], [[[0.21889092381937481, 
-0.95982372912792258, -0.51545817953418194, -0.79191496743321532], [0.24699184622858739, -0.97716194806902634, 
--0.74023402440265662, -0.68483112762279252], [-0.80837443342334714, 0.39602906627714529, -0.93722656251851855, 
--0.36568401963574959]], [[-0.062719970600047636, -0.75215102861789918, 0.80346816982468328, -0.03123166762679852], 
-[0.87032572315546886, -0.26645188225830663, 0.16577077009238161, -0.42846478915247221], [-0.83350849887379552, 
--0.09057758663591553, -0.72415237677358313, -0.11083229941883377]]]])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.14213528788334617, -0.095246696795476593, 0.88428285109896976, 0.16221904765171113], 
-[0.2694361196789572, -0.14213528788334617, 0.02982831555263199, 0.36044697686186544], [0.089838925108686407, 
-0.1168644540354129, -0.14213528788334617, 0.51404357016969393]], [[-0.14213528788334617, -0.14213528788334617, 
--0.14213528788334617, -0.10221620366876616], [0.59211782258097068, -0.14213528788334617, 0.51866928562956849, 
--0.14213528788334617], [0.54008589927595518, 0.30880228975280732, 0.011323333079816589, -0.14213528788334617]]], 
-[[[-0.14213528788334617, 0.97805478155238479, 0.044980281282704704, 0.54172810913588032], [0.50306412490394248, 
--0.14213528788334617, -0.14213528788334617, -0.14213528788334617], [-0.14213528788334617, 0.90847532179586454, 
-0.73479685498652625, -0.14213528788334617]], [[-0.070414261238669784, -0.14213528788334617, -0.14213528788334617, 
--0.14213528788334617], [0.30925435765744647, 0.011985479496297913, -0.14213528788334617, -0.14213528788334617], 
-[-0.14213528788334617, -0.0018149953637613958, -0.14213528788334617, -0.14213528788334617]]], [[[0.21889092381937481, 
-0.95982372912792258, -0.14213528788334617, -0.14213528788334617], [0.24699184622858739, -0.14213528788334617, 
--0.14213528788334617, -0.14213528788334617], [-0.14213528788334617, 0.39602906627714529, -0.14213528788334617, 
--0.14213528788334617]], [[-0.062719970600047636, -0.14213528788334617, 0.80346816982468328, -0.03123166762679852], 
-[0.87032572315546886, -0.14213528788334617, 0.16577077009238161, -0.14213528788334617], [-0.14213528788334617, 
--0.09057758663591553, -0.14213528788334617, -0.11083229941883377]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_array_rank0_offset0(self):
+      arg0=Data(numpy.array([-2.0, 2.0]),self.functionspace)
+      arg1=numpy.array(5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-10.0, 10.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_array_rank4(self):
-      arg0=Data(numpy.array([[[[0.46361503964213124, 0.75212103924315676, 0.1517014593635575, 0.63148557170685327], 
-[-0.9875146867756015, 0.42928007237587473, 0.85118517914010172, -0.15509137168645615], [0.15514320286516092, 
-0.0005342941540116275, -0.89094877398399008, 0.908865463056445]], [[0.45054003146551436, -0.23123539736983156, 
--0.076540616512914772, 0.10502324913621375], [-0.0071973112790566507, -0.81620273555925849, -0.79541946133102126, 
-0.26480060384338566], [-0.45249656775626268, 0.010265849576416963, -0.9086687652789831, -0.71275837340643822]]], 
-[[[0.67609301986855086, 0.37746787067053145, -0.42950164086299925, -0.034365339088483715], [0.3373674099598567, 
-0.18896844133041868, 0.93458147614245779, -0.40631016965933098], [-0.19339720965663387, 0.66853942853358883, 
-0.56086919503548471, 0.49829638104085539]], [[-0.67730793306659365, -0.93402109411008638, -0.53909789907854089, 
--0.11494460733501222], [0.47127259923995135, 0.40243458962316581, 0.65232695613202951, 0.87100864021002966], 
-[-0.62331578035775403, -0.78832076452515865, 0.98453152930704513, -0.32270285556445955]]], [[[0.030889419318346212, 
--0.74436621353272381, -0.41393005003246119, -0.27459836901005485], [0.2727885358054869, 0.39114640764062014, 
--0.62734280749087201, -0.68278841829167125], [0.45687670732427632, -0.41786887648402415, 0.14358785951974951, 
-0.20168949679051473]], [[-0.61804283685818384, -0.74947293782095592, 0.47882556396076903, -0.38116235218691275], 
-[-0.16868935807808083, -0.31479531035901021, -0.629767051514182, 0.40666969603452707], [0.47141425542113868, 
-0.42602189213064201, -0.42510981826215244, 0.35951635388005387]]]]),self.functionspace)
-      arg1=numpy.array([[[[-0.075878674569879179, -0.39617760413616954, -0.37441304528755759, 0.059028750333119939], 
-[-0.45199615428664996, -0.67982487852801032, -0.43878514017544568, -0.2306154287295592], [-0.028641567153798952, 
-0.20315619172000665, 0.25175605070668317, -0.62452580082432019]], [[-0.5510023141107756, 0.47087051768615695, 
--0.20141109488796705, -0.75776728595767517], [0.13680386381556775, -0.43979686709904531, -0.97978303421397572, 
-0.84162201515236612], [-0.26616111363933515, -0.32677302519872753, -0.74540501454095254, -0.31553251505895985]]], 
-[[[0.0019165847734914365, -0.34429378460591642, -0.6920165333737931, 0.54536804846096953], [-0.21558916120957838, 
-0.60934895052910298, -0.72555820711554286, 0.81566556247952771], [0.28566419298828816, -0.94399443344238465, 
--0.11385943971564827, 0.0098538097357632193]], [[0.23053049901245104, -0.63018177830499922, -0.58754298214345324, 
-0.32371305451881383], [0.34351012374192247, 0.50137166714297887, 0.95947548444362751, 0.42833198450872101], 
-[-0.72876678207075196, -0.016030958882900848, 0.31136367053725356, 0.4736018523880543]]], [[[-0.49061444452775582, 
-0.81114387212475636, 0.38995779155236199, 0.68167382208379479], [-0.99234885343352053, 0.54948405195911665, 
-0.67748560641952316, 0.12361771392509757], [0.74957930366266456, 0.29970297400899271, 0.3159611266551301, 
--0.42046308727640236]], [[0.20950673516815188, -0.088341400215833366, 0.9638973190702973, 0.68199731178218692], 
-[-0.57396477728598105, -0.89652900611840525, 0.019727515752113067, 0.57108671455067683], [0.70179048884165618, 
--0.72010473438276934, 0.82364341343487069, 0.81816644420876461]]]])
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.46361503964213124, 0.75212103924315676, 0.1517014593635575, 0.63148557170685327], 
-[-0.45199615428664996, 0.42928007237587473, 0.85118517914010172, -0.15509137168645615], [0.15514320286516092, 
-0.20315619172000665, 0.25175605070668317, 0.908865463056445]], [[0.45054003146551436, 0.47087051768615695, 
--0.076540616512914772, 0.10502324913621375], [0.13680386381556775, -0.43979686709904531, -0.79541946133102126, 
-0.84162201515236612], [-0.26616111363933515, 0.010265849576416963, -0.74540501454095254, -0.31553251505895985]]], 
-[[[0.67609301986855086, 0.37746787067053145, -0.42950164086299925, 0.54536804846096953], [0.3373674099598567, 
-0.60934895052910298, 0.93458147614245779, 0.81566556247952771], [0.28566419298828816, 0.66853942853358883, 0.56086919503548471, 
-0.49829638104085539]], [[0.23053049901245104, -0.63018177830499922, -0.53909789907854089, 0.32371305451881383], 
-[0.47127259923995135, 0.50137166714297887, 0.95947548444362751, 0.87100864021002966], [-0.62331578035775403, 
--0.016030958882900848, 0.98453152930704513, 0.4736018523880543]]], [[[0.030889419318346212, 0.81114387212475636, 
-0.38995779155236199, 0.68167382208379479], [0.2727885358054869, 0.54948405195911665, 0.67748560641952316, 0.12361771392509757], 
-[0.74957930366266456, 0.29970297400899271, 0.3159611266551301, 0.20168949679051473]], [[0.20950673516815188, 
--0.088341400215833366, 0.9638973190702973, 0.68199731178218692], [-0.16868935807808083, -0.31479531035901021, 
-0.019727515752113067, 0.57108671455067683], [0.70179048884165618, 0.42602189213064201, 0.82364341343487069, 
-0.81816644420876461]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[7.0, -5.0, -1.0], [-7.0, 0.0, -4.0]]),self.functionspace)
+      arg1=numpy.array([-4.0, -7.0, -3.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([10.0, 40.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_constData_rank4(self):
-      arg0=Data(-0.893686645203,self.functionspace)
-      arg1=Data(numpy.array([[[[0.61638843267588261, -0.97285254339522864, 0.39019707596035991, -0.38329856435815723], 
-[-0.39669633259426185, -0.43633677524387782, -0.062118904024617283, 0.52486356486440955], [0.59806243722015462, 
--0.95562790660740671, 0.89716362287428741, 0.25616048508546663]], [[0.24435399713825645, 0.58840030186856374, 
--0.11669001468268436, -0.10473414559607241], [0.53850954948156304, -0.21927908342820301, 0.5308446295654845, 
--0.14536822578932429], [0.90594574080059331, 0.77607397603230743, 0.34830152058308195, 0.53599148614980741]]], 
-[[[0.84897407852148055, -0.54152647293785039, 0.93603932280166657, 0.8311250335877951], [-0.048354616437206177, 
-0.82001605920812848, 0.92696057539180776, -0.08827000636161686], [0.020618916247708174, 0.98375130765872387, 
-0.8200458168780016, -0.053631253048684435]], [[-0.37789023552666512, 0.052215678410592714, -0.18675922076149987, 
-0.43345944086720611], [-0.30827748070532701, -0.66668820782501603, 0.084841064566959279, -0.95519159649105756], 
-[-0.6725560045726664, -0.53620416688473016, -0.25767276940639294, 0.58749559487682013]]], [[[-0.19257594002810241, 
-0.72549845431588622, 0.39704918849500959, 0.61577341276098552], [0.70773259021309665, -0.22540767589709043, 
--0.031031950353477278, -0.33370198061247858], [-0.8280003728298464, -0.81439343811994092, 0.95962098528552975, 
-0.50268932526386201]], [[-0.37240249982818407, -0.92063840650310702, 0.12378723541570058, -0.75766552223525885], 
-[-0.8507935520807457, 0.40017389307358187, -0.23436141671947053, 0.5452149596180087], [0.49123509401676135, 
--0.2193283129711836, 0.29665843719288354, -0.61641191860539335]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.61638843267588261, -0.89368664520320795, 0.39019707596035991, -0.38329856435815723], 
-[-0.39669633259426185, -0.43633677524387782, -0.062118904024617283, 0.52486356486440955], [0.59806243722015462, 
--0.89368664520320795, 0.89716362287428741, 0.25616048508546663]], [[0.24435399713825645, 0.58840030186856374, 
--0.11669001468268436, -0.10473414559607241], [0.53850954948156304, -0.21927908342820301, 0.5308446295654845, 
--0.14536822578932429], [0.90594574080059331, 0.77607397603230743, 0.34830152058308195, 0.53599148614980741]]], 
-[[[0.84897407852148055, -0.54152647293785039, 0.93603932280166657, 0.8311250335877951], [-0.048354616437206177, 
-0.82001605920812848, 0.92696057539180776, -0.08827000636161686], [0.020618916247708174, 0.98375130765872387, 
-0.8200458168780016, -0.053631253048684435]], [[-0.37789023552666512, 0.052215678410592714, -0.18675922076149987, 
-0.43345944086720611], [-0.30827748070532701, -0.66668820782501603, 0.084841064566959279, -0.89368664520320795], 
-[-0.6725560045726664, -0.53620416688473016, -0.25767276940639294, 0.58749559487682013]]], [[[-0.19257594002810241, 
-0.72549845431588622, 0.39704918849500959, 0.61577341276098552], [0.70773259021309665, -0.22540767589709043, 
--0.031031950353477278, -0.33370198061247858], [-0.8280003728298464, -0.81439343811994092, 0.95962098528552975, 
-0.50268932526386201]], [[-0.37240249982818407, -0.89368664520320795, 0.12378723541570058, -0.75766552223525885], 
-[-0.8507935520807457, 0.40017389307358187, -0.23436141671947053, 0.5452149596180087], [0.49123509401676135, 
--0.2193283129711836, 0.29665843719288354, -0.61641191860539335]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 5.0, 2.0], [1.0, 0.0, 6.0]], [[-4.0, 7.0, 0.0], [7.0, -5.0, 1.0]]]),self.functionspace)
+      arg1=numpy.array([[3.0, 5.0, 1.0], [0.0, -4.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([63.0, 49.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_constData_rank4(self):
-      arg0=Data(numpy.array([[[[0.96485565509648352, 0.53935464926562759, 0.53077936146728266, -0.73952245406800854], 
-[-0.60881766722021902, 0.66032495037649741, 0.93304470628387515, -0.29318048118189055], [-0.66535631878242762, 
-0.86695831494535347, -0.14571574174128665, -0.33755901373168684]], [[0.10130701439391632, -0.17559510038495674, 
-0.48296274631000302, -0.57408428494447028], [-0.27410670377127633, 0.17219315446797312, -0.60634684633721503, 
-0.20140988897507128], [0.063883370598835532, 0.062627983781888386, -0.2846290129863831, 0.15747009011324331]]], 
-[[[-0.33786498745323823, -0.77773342159826253, -0.43944390559155377, 0.30699880066796359], [0.45721299355990963, 
--0.93225225636245979, 0.24951116488168035, -0.60399840561802765], [-0.98061260494043778, -0.75645258975794905, 
-0.27958959667741956, 0.087975846205211594]], [[0.66543448707063324, 0.85514480449431862, 0.82014945665654015, 
-0.81505258529464553], [0.36193943466925615, -0.43856446384821646, -0.28386557764570841, -0.44311355588507073], 
-[0.8203258501802293, 0.88410934322225532, -0.42070109791391741, 0.095773374554660284]]], [[[-0.27073826415250957, 
-0.66740636068176817, -0.48896464867053013, -0.94994837491554485], [0.6540939867398663, 0.3623199797026595, 
--0.46325457322592967, -0.018711908974897273], [-0.35561156732560661, 0.41410104364264733, -0.17250699705434713, 
--0.25548148839396423]], [[-0.52110139543812939, -0.48803425309908843, 0.96222057216100421, -0.53953717021125525], 
-[-0.50454727047867465, 0.66698964265585015, -0.15287504292958864, 0.50355653533991096], [0.83323461461179282, 
-0.62448988217093437, 0.4654771267287694, 0.72161921224557446]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-0.57504027263496882, -0.70962427655760041, 0.5000686248515589, 0.22836735474708636], 
-[-0.2456640208529155, 0.55145194339939985, -0.18188128973631157, -0.010052160520559017], [-0.67026258406375816, 
--0.097417557973243252, 0.78510475463922025, -0.96873477555278131]], [[-0.10002520261013537, 0.63100857099364571, 
--0.37013228408685617, -0.59175793402432819], [0.77337490554492994, 0.46196627477364838, -0.64798814992967224, 
-0.60516599121325076], [-0.0017246851860892587, -0.30784264595534161, -0.65209147103284981, -0.88757120178936799]]], 
-[[[0.80040151821525596, 0.43450571239861646, 0.0078842302106048034, -0.55464057489099483], [0.84844302837406849, 
-0.48335761669393862, 0.018983703352744907, 0.89616530091553726], [-0.57373660097290591, -0.84825568142179031, 
--0.35092918722312461, 0.92340153576769501]], [[-0.85244829995021609, 0.095947521825416882, -0.18971802853754727, 
--0.65909953891892914], [0.11749664922727288, 0.13980571669569475, -0.79988329726892982, 0.055016274898991968], 
-[0.35743533014846873, 0.27824733541877245, 0.42999566458196914, 0.3568350967844669]]], [[[0.99608799667364067, 
--0.5403793610139318, -0.12575108132177171, 0.41721666984548333], [0.875733275967848, 0.9523625165119125, -0.20675560052583641, 
--0.41564394921784187], [-0.84876383654236665, 0.62662285663526829, 0.49660771467477982, 0.5918409282574939]], 
-[[-0.4729461618005697, -0.64161728948155772, 0.65333699389309863, 0.49984898391509858], [0.43829686077623897, 
-0.33192534406508289, 0.61100656789543994, 0.073960447209926006], [0.78875551306588365, -0.25000292972836191, 
-0.99289944129181062, -0.54605870017388525]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.96485565509648352, 0.53935464926562759, 0.53077936146728266, 0.22836735474708636], 
-[-0.2456640208529155, 0.66032495037649741, 0.93304470628387515, -0.010052160520559017], [-0.66535631878242762, 
-0.86695831494535347, 0.78510475463922025, -0.33755901373168684]], [[0.10130701439391632, 0.63100857099364571, 
-0.48296274631000302, -0.57408428494447028], [0.77337490554492994, 0.46196627477364838, -0.60634684633721503, 
-0.60516599121325076], [0.063883370598835532, 0.062627983781888386, -0.2846290129863831, 0.15747009011324331]]], 
-[[[0.80040151821525596, 0.43450571239861646, 0.0078842302106048034, 0.30699880066796359], [0.84844302837406849, 
-0.48335761669393862, 0.24951116488168035, 0.89616530091553726], [-0.57373660097290591, -0.75645258975794905, 
-0.27958959667741956, 0.92340153576769501]], [[0.66543448707063324, 0.85514480449431862, 0.82014945665654015, 
-0.81505258529464553], [0.36193943466925615, 0.13980571669569475, -0.28386557764570841, 0.055016274898991968], 
-[0.8203258501802293, 0.88410934322225532, 0.42999566458196914, 0.3568350967844669]]], [[[0.99608799667364067, 
-0.66740636068176817, -0.12575108132177171, 0.41721666984548333], [0.875733275967848, 0.9523625165119125, -0.20675560052583641, 
--0.018711908974897273], [-0.35561156732560661, 0.62662285663526829, 0.49660771467477982, 0.5918409282574939]], 
-[[-0.4729461618005697, -0.48803425309908843, 0.96222057216100421, 0.49984898391509858], [0.43829686077623897, 
-0.66698964265585015, 0.61100656789543994, 0.50355653533991096], [0.83323461461179282, 0.62448988217093437, 0.99289944129181062, 
-0.72161921224557446]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[6.0, -6.0, -4.0], [4.0, 0.0, 4.0], [5.0, 7.0, 5.0], [0.0, 2.0, 0.0]], [[5.0, -5.0, -6.0], [0.0, 
+1.0, 4.0], [-6.0, -7.0, -5.0], [7.0, -1.0, 0.0]]], [[[3.0, 2.0, 4.0], [-7.0, -7.0, -6.0], [-6.0, 0.0, -5.0], [-5.0, 0.0, 
+-5.0]], [[6.0, -6.0, 0.0], [-1.0, -3.0, -7.0], [-7.0, 3.0, 3.0], [7.0, 5.0, -2.0]]]]),self.functionspace)
+      arg1=numpy.array([[[-4.0, 0.0, -1.0], [2.0, 3.0, -2.0], [-3.0, -4.0, 6.0], [-3.0, 0.0, 4.0]], [[-4.0, 3.0, 4.0], [-4.0, 
+-1.0, 4.0], [-3.0, 6.0, -5.0], [0.0, 6.0, -7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-82.0, -51.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank0_expandedData_rank4(self):
-      arg0=Data(0.216711670991,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.81879161478097595, 0.23338466982083461, -0.037340658437786667, 0.53960130549007368], 
-[-0.8433547141558082, 0.51986550271704757, -0.22844534933352723, -0.89465705240856908], [-0.11648963460000861, 
--0.96923924737633538, 0.072867751072468012, 0.65625904184925732]], [[0.27849706772004201, -0.90647830830724296, 
-0.96202673895146806, 0.22494056179803157], [-0.2684069854476685, -0.42191439566230504, -0.95625432477352734, 
-0.72510262095158207], [-0.036924511893698497, -0.93553684683379412, -0.76943122405185593, 0.42971341646797767]]], 
-[[[0.89494738055097778, 0.46650780268669378, 0.30405300775028121, -0.084542513395697849], [-0.027722135654347779, 
--0.59483396322557391, -0.028304510159490759, -0.88731646326202407], [0.34624637943920167, -0.39682309028436302, 
-0.89367998074843014, 0.56073508085183299]], [[0.63023798830300204, 0.18652798267686688, -0.3328850324391277, 
--0.21182328663126193], [-0.53239281368561087, 0.22479105625018425, 0.90626113618872939, -7.4251614887721473e-05], 
-[-0.98623780619390233, -0.5666180903186695, -0.30927062686357099, -0.79727648923625138]]], [[[0.59536350392532866, 
-0.22068473036479674, -0.66623026326771462, 0.10843352912766102], [0.52432284313983835, -0.3431109607082834, 
--0.23886295117126921, -0.8119295310297503], [-0.54397735011730486, -0.7068782977204644, 0.71740443446430424, 
--0.31144890281105586]], [[-0.32351391151939302, -0.35563858193171405, 0.65601036166328086, -0.032917953499258745], 
-[0.45870081001448093, 0.3006509634165655, -0.15553712418631416, 0.85594927731050774], [-0.84241444057987591, 
--0.64337027261577129, 0.32134231645586109, -0.39606743840399128]]]])+(1.-msk_arg1)*numpy.array([[[[0.55712979668912488, 
--0.80066523551532121, -0.48656514655750849, 0.76097556013292111], [-0.13438565652155154, -0.94821563688317712, 
--0.31012625194007182, -0.84105859136182715], [-0.20208116248301411, -0.50024164072503563, 0.87481453005108034, 
-0.13755575289800137]], [[-0.085598442928114249, -0.45841913232395637, -0.18238598324276789, 0.62303900657350142], 
-[-0.79318456738858467, 0.34558408974177413, -0.8550879149504329, 0.8287523579134235], [-0.40328058936497357, 
--0.83102127169123086, -0.21653057906368112, -0.76688016358972666]]], [[[0.68068340217757584, 0.57860355650918649, 
--0.19514598498967861, 0.35797229868730107], [-0.940274604582233, -0.52273338186671348, -0.37314192021830439, 
-0.10804775393755039], [-0.20074283030723383, 0.95964123909155385, -0.98950080490821501, -0.58835700500290256]], 
-[[0.99348893772020896, 0.85220955503331552, 0.41443782029517151, 0.83659124171927268], [-0.65635663807364564, 
-0.70812110348599355, 0.13053831014253792, 0.91230146888102226], [0.19243965515044836, 0.96567248884233092, 
--0.28016453566744892, -0.65082014990966219]]], [[[-0.013133698627046275, -0.9481821696335877, 0.63769890160711773, 
--0.35875665803034429], [-0.65944938772191586, 0.01066509243901459, 0.17762038374459466, -0.21321783232210256], 
-[0.99670034374764271, 0.67813675209818114, 0.37840221867825585, 0.45475310270530489]], [[0.29249236353371622, 
--0.51219658392539991, 0.22458795099500506, -0.29060307474253499], [-0.86387736284336181, -0.17064143853256808, 
--0.45438045421185458, 0.9948613071200707], [-0.38789172342813538, 0.052527231540111297, 0.81849101524424928, 
-0.43381945218064333]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.21671167099079991, 0.23338466982083461, 0.21671167099079991, 0.53960130549007368], 
-[0.21671167099079991, 0.51986550271704757, 0.21671167099079991, 0.21671167099079991], [0.21671167099079991, 
-0.21671167099079991, 0.21671167099079991, 0.65625904184925732]], [[0.27849706772004201, 0.21671167099079991, 
-0.96202673895146806, 0.22494056179803157], [0.21671167099079991, 0.21671167099079991, 0.21671167099079991, 
-0.72510262095158207], [0.21671167099079991, 0.21671167099079991, 0.21671167099079991, 0.42971341646797767]]], 
-[[[0.89494738055097778, 0.46650780268669378, 0.30405300775028121, 0.21671167099079991], [0.21671167099079991, 
-0.21671167099079991, 0.21671167099079991, 0.21671167099079991], [0.34624637943920167, 0.21671167099079991, 0.89367998074843014, 
-0.56073508085183299]], [[0.63023798830300204, 0.21671167099079991, 0.21671167099079991, 0.21671167099079991], 
-[0.21671167099079991, 0.22479105625018425, 0.90626113618872939, 0.21671167099079991], [0.21671167099079991, 
-0.21671167099079991, 0.21671167099079991, 0.21671167099079991]]], [[[0.59536350392532866, 0.22068473036479674, 
-0.21671167099079991, 0.21671167099079991], [0.52432284313983835, 0.21671167099079991, 0.21671167099079991, 
-0.21671167099079991], [0.21671167099079991, 0.21671167099079991, 0.71740443446430424, 0.21671167099079991]], 
-[[0.21671167099079991, 0.21671167099079991, 0.65601036166328086, 0.21671167099079991], [0.45870081001448093, 
-0.3006509634165655, 0.21671167099079991, 0.85594927731050774], [0.21671167099079991, 0.21671167099079991, 0.32134231645586109, 
-0.21671167099079991]]]])+(1.-msk_ref)*numpy.array([[[[0.55712979668912488, 0.21671167099079991, 0.21671167099079991, 
-0.76097556013292111], [0.21671167099079991, 0.21671167099079991, 0.21671167099079991, 0.21671167099079991], 
-[0.21671167099079991, 0.21671167099079991, 0.87481453005108034, 0.21671167099079991]], [[0.21671167099079991, 
-0.21671167099079991, 0.21671167099079991, 0.62303900657350142], [0.21671167099079991, 0.34558408974177413, 0.21671167099079991, 
-0.8287523579134235], [0.21671167099079991, 0.21671167099079991, 0.21671167099079991, 0.21671167099079991]]], 
-[[[0.68068340217757584, 0.57860355650918649, 0.21671167099079991, 0.35797229868730107], [0.21671167099079991, 
-0.21671167099079991, 0.21671167099079991, 0.21671167099079991], [0.21671167099079991, 0.95964123909155385, 0.21671167099079991, 
-0.21671167099079991]], [[0.99348893772020896, 0.85220955503331552, 0.41443782029517151, 0.83659124171927268], 
-[0.21671167099079991, 0.70812110348599355, 0.21671167099079991, 0.91230146888102226], [0.21671167099079991, 
-0.96567248884233092, 0.21671167099079991, 0.21671167099079991]]], [[[0.21671167099079991, 0.21671167099079991, 
-0.63769890160711773, 0.21671167099079991], [0.21671167099079991, 0.21671167099079991, 0.21671167099079991, 
-0.21671167099079991], [0.99670034374764271, 0.67813675209818114, 0.37840221867825585, 0.45475310270530489]], 
-[[0.29249236353371622, 0.21671167099079991, 0.22458795099500506, 0.21671167099079991], [0.21671167099079991, 
-0.21671167099079991, 0.21671167099079991, 0.9948613071200707], [0.21671167099079991, 0.21671167099079991, 0.81849101524424928, 
-0.43381945218064333]]]])
+   def test_generalTensorProduct_constData_rank1_array_rank1_offset0(self):
+      arg0=Data(numpy.array([3.0, -3.0]),self.functionspace)
+      arg1=numpy.array([-3.0, 7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-9.0, 21.0], [9.0, -21.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_constData_rank4_expandedData_rank4(self):
-      arg0=Data(numpy.array([[[[0.9662251484946478, -0.26481381091852141, -0.066210160157844644, 0.40117951882974068], 
-[0.2455027289465177, 0.67324997630420214, 0.79365479453824861, -0.037015541405008623], [-0.86030987461175457, 
--0.45616271741243231, 0.39179913013670342, -0.10731696095517629]], [[-0.19449522639452876, -0.67751174669485992, 
-0.28984158743095256, 0.67531831661784203], [-0.49980904983410723, -0.02577831866914404, 0.94104429684279367, 
-0.74763465415851904], [-0.28985388443946092, -0.90882129286702029, -0.90352359388616366, 0.0516463980384263]]], 
-[[[-0.99639029481638874, 0.23581131279953027, 0.73436613098786441, 0.89956373143685453], [0.70388018442763145, 
-0.079895063328745408, -0.75367452457404527, 0.56811816966845319], [0.90284242548995652, 0.66397516482541619, 
--0.99647484543635345, 0.79709159927353346]], [[0.70723973142155505, 0.27467701034793879, -0.79995723813418396, 
--0.24824137685387848], [0.56082965044735578, 0.73559725370917817, 0.62475940100976302, 0.030745279822806282], 
-[-0.36016041397070708, 0.7839330226446426, -0.69945965257975473, -0.89855265013928132]]], [[[0.33431193949654969, 
--0.46895691087357716, 0.94874414920913108, 0.35408330328067761], [-0.56725159045543427, -0.11646626979600483, 
--0.27664126953599744, -0.62696292984368651], [0.15060075336069922, -0.16895232031523566, -0.83212543422584218, 
-0.37516376063681012]], [[-0.21699302716045343, -0.24013090348080812, 0.73993829114859677, -0.63476480682303671], 
-[-0.34968439152048214, 0.46819693714489508, 0.62165805854076095, -0.3791178743428667], [-0.41700973768159155, 
-0.79899832669176507, -0.86119824926464239, 0.46575159472502037]]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.31931488193208657, -0.28905671753527695, 0.85561932051536327, 0.43258332189744197], 
-[-0.022093948889682302, -0.87293800937103039, 0.56614871319438853, 0.86910428719314292], [0.68092117827772292, 
-0.53186005878844611, 0.28162238085357139, 0.97361457365289072]], [[-0.79666566403785954, 0.37011155709186694, 
--0.68233116747040423, 0.89387098751104865], [0.42703403901311821, 0.89550507893657039, 0.84501584710121325, 
--0.66998942788818261], [0.53860906470280701, -0.094095450408768766, -0.35365080444144259, 0.4361075442378417]]], 
-[[[-0.16099982532347235, -0.8651116694760872, 0.52385238626653319, -0.28446906365453173], [0.14671592161598701, 
-0.71409402259173094, 0.3258739797599115, 0.70362092527950693], [-0.32717756310317503, -0.95828422715748962, 
-0.68727489580226919, 0.15249900882725109]], [[0.22017885162589113, 0.80937795601648843, 0.35945120041216438, 
-0.93900043111170084], [0.79190649660945756, 0.57203937052107467, 0.54292126003639929, 0.84571132339638178], 
-[0.23760803956899457, 0.52713270420645153, -0.24975442892820454, -0.72715475618178438]]], [[[-0.84787512935758658, 
--0.62122949761588964, 0.68568216243118529, 0.34087206419913829], [-0.66077267614956314, 0.88586283683410505, 
-0.48865077882965502, -0.2823801328248261], [0.24010264814531568, -0.77577498913372622, -0.55288042007565297, 
--0.34642896895972042]], [[-0.42554067083401659, 0.87743453278083261, 0.50397543167721515, 0.97556159346990001], 
-[0.84530378175248244, 0.66561045498275107, 0.80033289693830301, 0.92226186452120906], [-0.4442108477506006, 
--0.52692217686024989, -0.85590042003205369, 0.43455207703783549]]]])+(1.-msk_arg1)*numpy.array([[[[0.21605231242464118, 
-0.32170152972234489, 0.69540488109778908, 0.2547128534596883], [0.34796901405025005, -0.31607291081984523, 
--0.98038121857023519, -0.93906508361402574], [-0.28276602806278417, -0.62275848697078584, -0.26878568593014385, 
--0.22758564658522573]], [[0.85908277675070277, 0.70033299040044406, 0.93445045187257891, -0.75943811515314663], 
-[0.50550467560364476, -0.89661957212631349, -0.20586932595053264, 0.74555292517790739], [-0.46974519139411886, 
--0.064153765304233668, -0.5695552407484461, -0.11199926962703399]]], [[[-0.046076882407277919, -0.4751273456616687, 
-0.54211989560690821, -0.95839866060661283], [-0.34429450468712863, 0.9945935413627196, 0.12045306605821482, 
-0.70763311498764381], [-0.93229388462703189, -0.8159573239034752, 0.43375216165599206, -0.58156200439008288]], 
-[[-0.94359110518590672, 0.21676492225881594, -0.57979669038590131, 0.035244336548687416], [-0.13786684734995425, 
-0.75386861643073622, 0.022898320967623453, 0.66532275876665459], [-0.30607908894667135, -0.066287086564079223, 
--0.64210438699958949, 0.58486901207821607]]], [[[0.69742093261447113, 0.77935504242461695, 0.28045816177452632, 
-0.35225109286857292], [-0.96809103221557291, 0.77688458560421636, 0.92713086412266987, 0.49029829063110997], 
-[-0.1905974439471938, 0.14508130554930188, 0.24154428575645048, 0.45490680510213011]], [[-0.021068579578790381, 
--0.055644755704836957, -0.71431963870922144, -0.65498904995738161], [0.87855331454880914, 0.53311774880814933, 
-0.18160214068170566, -0.33338460760283883], [-0.49933663079121393, -0.30118428496778038, 0.86142651573184215, 
--0.99665689200339136]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.9662251484946478, -0.26481381091852141, 0.85561932051536327, 0.43258332189744197], 
-[0.2455027289465177, 0.67324997630420214, 0.79365479453824861, 0.86910428719314292], [0.68092117827772292, 0.53186005878844611, 
-0.39179913013670342, 0.97361457365289072]], [[-0.19449522639452876, 0.37011155709186694, 0.28984158743095256, 
-0.89387098751104865], [0.42703403901311821, 0.89550507893657039, 0.94104429684279367, 0.74763465415851904], 
-[0.53860906470280701, -0.094095450408768766, -0.35365080444144259, 0.4361075442378417]]], [[[-0.16099982532347235, 
-0.23581131279953027, 0.73436613098786441, 0.89956373143685453], [0.70388018442763145, 0.71409402259173094, 0.3258739797599115, 
-0.70362092527950693], [0.90284242548995652, 0.66397516482541619, 0.68727489580226919, 0.79709159927353346]], 
-[[0.70723973142155505, 0.80937795601648843, 0.35945120041216438, 0.93900043111170084], [0.79190649660945756, 
-0.73559725370917817, 0.62475940100976302, 0.84571132339638178], [0.23760803956899457, 0.7839330226446426, -0.24975442892820454, 
--0.72715475618178438]]], [[[0.33431193949654969, -0.46895691087357716, 0.94874414920913108, 0.35408330328067761], 
-[-0.56725159045543427, 0.88586283683410505, 0.48865077882965502, -0.2823801328248261], [0.24010264814531568, 
--0.16895232031523566, -0.55288042007565297, 0.37516376063681012]], [[-0.21699302716045343, 0.87743453278083261, 
-0.73993829114859677, 0.97556159346990001], [0.84530378175248244, 0.66561045498275107, 0.80033289693830301, 
-0.92226186452120906], [-0.41700973768159155, 0.79899832669176507, -0.85590042003205369, 
-0.46575159472502037]]]])+(1.-msk_ref)*numpy.array([[[[0.9662251484946478, 0.32170152972234489, 0.69540488109778908, 
-0.40117951882974068], [0.34796901405025005, 0.67324997630420214, 0.79365479453824861, -0.037015541405008623], 
-[-0.28276602806278417, -0.45616271741243231, 0.39179913013670342, -0.10731696095517629]], [[0.85908277675070277, 
-0.70033299040044406, 0.93445045187257891, 0.67531831661784203], [0.50550467560364476, -0.02577831866914404, 
-0.94104429684279367, 0.74763465415851904], [-0.28985388443946092, -0.064153765304233668, -0.5695552407484461, 
-0.0516463980384263]]], [[[-0.046076882407277919, 0.23581131279953027, 0.73436613098786441, 0.89956373143685453], 
-[0.70388018442763145, 0.9945935413627196, 0.12045306605821482, 0.70763311498764381], [0.90284242548995652, 0.66397516482541619, 
-0.43375216165599206, 0.79709159927353346]], [[0.70723973142155505, 0.27467701034793879, -0.57979669038590131, 
-0.035244336548687416], [0.56082965044735578, 0.75386861643073622, 0.62475940100976302, 0.66532275876665459], 
-[-0.30607908894667135, 0.7839330226446426, -0.64210438699958949, 0.58486901207821607]]], [[[0.69742093261447113, 
-0.77935504242461695, 0.94874414920913108, 0.35408330328067761], [-0.56725159045543427, 0.77688458560421636, 
-0.92713086412266987, 0.49029829063110997], [0.15060075336069922, 0.14508130554930188, 0.24154428575645048, 
-0.45490680510213011]], [[-0.021068579578790381, -0.055644755704836957, 0.73993829114859677, -0.63476480682303671], 
-[0.87855331454880914, 0.53311774880814933, 0.62165805854076095, -0.33338460760283883], [-0.41700973768159155, 
-0.79899832669176507, 0.86142651573184215, 0.46575159472502037]]]])
+   def test_generalTensorProduct_constData_rank2_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[1.0, 0.0, 2.0], [5.0, 3.0, 1.0]]),self.functionspace)
+      arg1=numpy.array([[3.0, -1.0], [-4.0, -2.0], [1.0, -4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[5.0, -9.0], [4.0, -15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.318576793935)+(1.-msk_arg0)*(-0.920315318998)
-      arg1=0.264453770493
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.318576793935)+(1.-msk_ref)*(0.264453770493)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.61984078319308633, -0.74126411397009218])+(1.-msk_arg0)*numpy.array([-0.36354960922197699, 
--0.45840304611368676])
-      arg1=0.798333407454
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.79833340745371917, 0.79833340745371917])+(1.-msk_ref)*numpy.array([0.79833340745371917, 
-0.79833340745371917])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.56027127038237556, -0.38092190445101282, -0.77591749903008322, -0.36171347397940457, 
--0.3091925404043383], [0.34776167092224908, -0.37902110057843474, 0.8566813057073317, -0.87799841344488661, 
-0.61149184516634381], [0.11264186928512365, 0.34551824833197631, 0.4058993843871157, 0.42214558457038209, 
--0.88397115089856348], [0.57017035572765851, -0.17472794481465992, -0.37739320194928472, 0.24459442745468318, 
--0.0032651849035065794]])+(1.-msk_arg0)*numpy.array([[-0.63041245210130414, -0.40539069241410175, 0.95484833881413089, 
-0.76528251808922398, -0.45472655311970289], [-0.34559052794751488, -0.91180569915010246, -0.08113468153701886, 
-0.31746466254664774, 0.69806708955802943], [0.76702933573803689, -0.24228609093935383, 0.35224880600670572, 
-0.47231857975553981, -0.88896833667212327], [-0.087726728409511789, -0.23153089968162344, 0.39249534318815371, 
-0.23502532808353349, 0.68373987182917317]])
-      arg1=0.989825243681
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427], [0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427], [0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427], [0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427]])+(1.-msk_ref)*numpy.array([[0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427, 0.98982524368093427], [0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427], [0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427], [0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 0.98982524368093427, 
-0.98982524368093427]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.028875141511675473, 0.59607526974242653], [-0.85743668105869553, 0.70579283933075554]], 
-[[0.53533801908700807, -0.63679610683946919], [-0.079395571307905088, 0.48032940038802163]], [[0.62755828198212904, 
--0.43131717689352711], [-0.69602024353252068, -0.39729826147508174]], [[0.871577527593145, 0.13860228070825675], 
-[-0.41566762577178307, 0.94629933788596232]], [[0.67599858677777047, 0.69484194011263689], [0.60029405821428594, 
-0.28493844302972837]], [[-0.71484527552962907, 0.22995449367240717], [0.791550071610712, 
--0.87117943761246108]]])+(1.-msk_arg0)*numpy.array([[[0.78242950070530659, 0.014091229458666366], [0.25389636301837526, 
--0.32650460454438401]], [[-0.2924625700857808, 0.6366577134210214], [-0.93500357448199378, -0.040378324895707918]], 
-[[-0.50017267851444713, -0.27455430871359354], [-0.54888413525358515, 0.39328658448761655]], [[0.32330904571084806, 
--0.58124263920494301], [0.15299156800247538, -0.28958015194809961]], [[-0.2894735013468257, 0.39047784429864718], 
-[0.41819146976323429, 0.016153713585879137]], [[0.8615981317548056, -0.37210375853443756], [-0.84988813841877109, 
-0.90373148295773231]]])
-      arg1=0.832320572018
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], 
-[[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], [[0.8323205720176674, 
-0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], [[0.871577527593145, 0.8323205720176674], [0.8323205720176674, 
-0.94629933788596232]], [[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], 
-[[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 
-0.8323205720176674]]])+(1.-msk_ref)*numpy.array([[[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 
-0.8323205720176674]], [[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], 
-[[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], [[0.8323205720176674, 
-0.8323205720176674], [0.8323205720176674, 0.8323205720176674]], [[0.8323205720176674, 0.8323205720176674], [0.8323205720176674, 
-0.8323205720176674]], [[0.8615981317548056, 0.8323205720176674], [0.8323205720176674, 0.90373148295773231]]])
+   def test_generalTensorProduct_constData_rank3_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, -7.0, 0.0], [6.0, 5.0, 7.0]], [[2.0, -7.0, 3.0], [2.0, 3.0, -2.0]]]),self.functionspace)
+      arg1=numpy.array([[[-3.0, 0.0], [3.0, 6.0], [-6.0, 7.0]], [[0.0, 6.0], [3.0, 5.0], [-3.0, -5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-6.0, -16.0], [-30.0, 16.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.42251039851841288, -0.5086459170688129, -0.45492102664037537, 0.31392311416403995], 
-[0.65608273573528852, -0.85710626049138106, 0.21505967960738959, 0.70718137746639131], [0.83790464665837794, 
--0.60856345438902792, -0.60079149562707634, -0.1076802420164078]], [[0.46732380623178282, -0.35500225168117239, 
-0.25444444559611989, -0.48744596442284194], [0.90027866484871244, -0.31706597272192649, 0.59522974780728655, 
--0.47446522005210379], [-0.8633196459105501, 0.66961511233335314, 0.061156594494290673, 0.79799072926268422]]], 
-[[[-0.76276876249566472, -0.099532420785620968, 0.10129392224865463, 0.39167447951002199], [-0.98828984273881293, 
--0.57023782466024131, -0.065377529996557548, -0.40442289015670507], [-0.82339803606408557, 0.014662422844692102, 
-0.21649789675243114, 0.77505805175113651]], [[-0.76191062946085264, 0.42107637324614444, 0.92357976930849417, 
--0.83786675093267315], [0.52554082210275488, -0.8888682988825547, 0.40287390701474046, -0.52290176387004972], 
-[-0.34201346434522772, 0.38682001181478975, -0.819612138653941, -0.94002052598078389]]], [[[-0.51734417834945168, 
--0.94482365146869829, 0.64319147138071275, -0.35722472189352694], [-0.94118399117998175, -0.28909676588864341, 
--0.77521699548798018, 0.57822873832654831], [0.89952167291261254, 0.6107886611155009, -0.013437891648716782, 
--0.474928738027242]], [[0.26286809808854472, 0.25318532614933087, -0.74577774138101782, -0.5726071651639919], 
-[0.97839123557228058, 0.9460156616470814, -0.35659193985301241, 0.12569654130562768], [-0.99682390578515179, 
--0.60347225844308694, 0.39905112336897774, -0.6498254841152844]]]])+(1.-msk_arg0)*numpy.array([[[[-0.43200273953647184, 
-0.38040962014976043, -0.6572991923365028, 0.45207958622632516], [-0.58836374817160375, 0.26862299998111294, 
-0.21139361003683721, 0.3086343700658376], [-0.77309660882283571, -0.70430093120909287, -0.56474331239969677, 
--0.017208266779719983]], [[0.67436506707034893, -0.30858059192041742, -0.031394042016385626, -0.63378689685176881], 
-[-0.66569084269765399, 0.97185177189397032, -0.58300442478147785, 0.70372679431572527], [-0.022365773489303686, 
-0.85035019395735212, -0.97846447525858959, -0.64044194234297014]]], [[[-0.97775916672490459, -0.41628654841289214, 
--0.48245585793355605, -0.055238920243368517], [0.78673608724885491, -0.19279316198073482, -0.98976200752193, 
--0.47776310463081839], [0.84717802695622835, -0.68427094271230504, -0.4804198631320109, 0.96098954130826031]], 
-[[0.53394958997155872, -0.22737455212877689, 0.30471343662030992, 0.18229541027562624], [0.37038417314131489, 
-0.87665381096600825, 0.44054927441029701, 0.35339162806138336], [-0.17989219181739258, 0.71059747268101714, 
--0.98051690316527695, 0.27992594956317007]]], [[[0.52813647387794704, 0.024570478697439002, 0.93464353314847237, 
--0.84326079071506377], [-0.53538275657360623, 0.93198072028257628, -0.74578726744677581, -0.35281011313225541], 
-[0.56547473195301534, 0.11350722177621453, 0.12064243147442166, -0.56343163545267116]], [[-0.048739251574649201, 
-0.24929112934527575, 0.99164564508467357, -0.44909041546971151], [0.74190021533591577, 0.65438363932926258, 0.4220458996941816, 
--0.69453814291522642], [-0.30803415118241451, 0.24508007551774624, 0.53629014177782874, 0.31168691811329174]]]])
-      arg1=0.734113764334
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], [0.83790464665837794, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908]], [[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.90027866484871244, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.79799072926268422]]], [[[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.77505805175113651]], [[0.7341137643336908, 0.7341137643336908, 0.92357976930849417, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908]]], [[[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], [0.89952167291261254, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908]], [[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.97839123557228058, 0.9460156616470814, 0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908]]]])+(1.-msk_ref)*numpy.array([[[[0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908]], [[0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.97185177189397032, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.85035019395735212, 0.7341137643336908, 0.7341137643336908]]], [[[0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908], [0.78673608724885491, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.84717802695622835, 0.7341137643336908, 0.7341137643336908, 0.96098954130826031]], [[0.7341137643336908, 0.7341137643336908, 
-0.7341137643336908, 0.7341137643336908], [0.7341137643336908, 0.87665381096600825, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908]]], [[[0.7341137643336908, 0.7341137643336908, 
-0.93464353314847237, 0.7341137643336908], [0.7341137643336908, 0.93198072028257628, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908]], [[0.7341137643336908, 0.7341137643336908, 
-0.99164564508467357, 0.7341137643336908], [0.74190021533591577, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908], 
-[0.7341137643336908, 0.7341137643336908, 0.7341137643336908, 0.7341137643336908]]]])
+   def test_generalTensorProduct_constData_rank4_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[5.0, -7.0, -3.0], [3.0, -2.0, -6.0], [2.0, -2.0, -3.0], [1.0, -4.0, 4.0]], [[0.0, -4.0, 6.0], 
+[4.0, -4.0, 0.0], [0.0, -7.0, -2.0], [3.0, 4.0, 5.0]]], [[[0.0, 2.0, 0.0], [-1.0, 7.0, 5.0], [5.0, -5.0, 6.0], [6.0, 5.0, 
+-7.0]], [[0.0, -3.0, -1.0], [-3.0, -6.0, 1.0], [0.0, 3.0, -3.0], [2.0, 7.0, 0.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[-6.0, -1.0], [-5.0, 4.0], [-6.0, 0.0]], [[-6.0, 0.0], [7.0, 7.0], [-2.0, 2.0]], [[-5.0, -1.0], 
+[-2.0, -3.0], [-5.0, 4.0]], [[7.0, -1.0], [6.0, 0.0], [6.0, -2.0]]], [[[6.0, 4.0], [4.0, -2.0], [0.0, 1.0]], [[6.0, -7.0], 
+[7.0, -2.0], [0.0, 0.0]], [[0.0, 5.0], [4.0, 0.0], [0.0, 0.0]], [[-6.0, 2.0], [-4.0, 0.0], [-4.0, -5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-83.0, -101.0], [-80.0, 151.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.0285167629509)+(1.-msk_arg0)*(-0.0753791701623)
-      arg1=numpy.array(0.369649061202)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.369649061202)+(1.-msk_ref)*(0.369649061202)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.32342379681372324, 0.54353331547928652])+(1.-msk_arg0)*numpy.array([0.22862832886262274, 
-0.31483883730737539])
-      arg1=numpy.array(0.626949968399)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.62694996839906447, 0.62694996839906447])+(1.-msk_ref)*numpy.array([0.62694996839906447, 
-0.62694996839906447])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.71394651499733919, -0.92287830402130533, -0.90858139421470385, -0.13825598900369229, 
--0.080541309303345132], [-0.36949666654546265, 0.3898727048518853, -0.28621012865918916, -0.25638266490918404, 
-0.20407905334345466], [0.15975716776790327, 0.86409710321773558, 0.71725217347095049, 0.20875761848553376, 
--0.24238991057422754], [-0.78556146630181956, -0.076076120078814924, 0.5830295620999455, 0.62973766057396441, 
--0.44550377230379912]])+(1.-msk_arg0)*numpy.array([[-0.88705425678644301, 0.55511600368349057, 0.50879851258581632, 
-0.65698430346681214, -0.92944433639452151], [0.72904334195690801, -0.57898988094606052, 0.80587168656123565, 
-0.75367205014945649, -0.51428464418517805], [-0.32501367205410969, -0.97880582883393408, 0.053009572718297759, 
-0.094411264210482848, -0.63030483500737655], [-0.088813446479829139, -0.75746914620099148, -0.95633858232383417, 
-0.67276534899551677, 0.15202939959842365]])
-      arg1=numpy.array(-0.940581531438)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.71394651499733919, -0.92287830402130533, -0.90858139421470385, -0.13825598900369229, 
--0.080541309303345132], [-0.36949666654546265, 0.3898727048518853, -0.28621012865918916, -0.25638266490918404, 
-0.20407905334345466], [0.15975716776790327, 0.86409710321773558, 0.71725217347095049, 0.20875761848553376, 
--0.24238991057422754], [-0.78556146630181956, -0.076076120078814924, 0.5830295620999455, 0.62973766057396441, 
--0.44550377230379912]])+(1.-msk_ref)*numpy.array([[-0.88705425678644301, 0.55511600368349057, 0.50879851258581632, 
-0.65698430346681214, -0.92944433639452151], [0.72904334195690801, -0.57898988094606052, 0.80587168656123565, 
-0.75367205014945649, -0.51428464418517805], [-0.32501367205410969, -0.94058153143782453, 0.053009572718297759, 
-0.094411264210482848, -0.63030483500737655], [-0.088813446479829139, -0.75746914620099148, -0.94058153143782453, 
-0.67276534899551677, 0.15202939959842365]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.18937114215158379, 0.97884605242301004], [-0.10174593321344649, -0.022379247683969705]], 
-[[0.37143236733782325, 0.9436323979261656], [-0.1396616687095853, -0.36032181421557552]], [[-0.082984451143639948, 
-0.68652743342457567], [-0.935628845473649, 0.58410565742224385]], [[-0.12311403457235026, 0.051753925365314313], 
-[-0.19479735727282055, -0.97762777864901618]], [[-0.43740194607254024, 0.047952734299117505], [-0.83030948972383301, 
-0.2720270466764092]], [[-0.13916673117721445, -0.38789957921110485], [-0.82523648008893313, 
--0.90290874072044436]]])+(1.-msk_arg0)*numpy.array([[[0.45196786956134583, 0.61219599413960424], [-0.065721595612748152, 
--0.26282718706162234]], [[-0.77537708674852834, 0.44532451113123472], [-0.069741033742395819, 0.85312396785377786]], 
-[[0.77152934839087872, -0.89912864802471115], [-0.59570931290004303, -0.20558993214725563]], [[0.47614495941699153, 
--0.87515809599830097], [0.5635701134536959, 0.79401765404455427]], [[-0.22008420609503343, -0.65942311245997409], 
-[0.9655251213411864, -0.30378791706072894]], [[0.44247117863110397, 0.10977233527612396], [0.050396835055231071, 
--0.17185541796448978]]])
-      arg1=numpy.array(0.879188127312)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.87918812731204588, 0.97884605242301004], [0.87918812731204588, 0.87918812731204588]], 
-[[0.87918812731204588, 0.9436323979261656], [0.87918812731204588, 0.87918812731204588]], [[0.87918812731204588, 
-0.87918812731204588], [0.87918812731204588, 0.87918812731204588]], [[0.87918812731204588, 0.87918812731204588], 
-[0.87918812731204588, 0.87918812731204588]], [[0.87918812731204588, 0.87918812731204588], [0.87918812731204588, 
-0.87918812731204588]], [[0.87918812731204588, 0.87918812731204588], [0.87918812731204588, 
-0.87918812731204588]]])+(1.-msk_ref)*numpy.array([[[0.87918812731204588, 0.87918812731204588], [0.87918812731204588, 
-0.87918812731204588]], [[0.87918812731204588, 0.87918812731204588], [0.87918812731204588, 0.87918812731204588]], 
-[[0.87918812731204588, 0.87918812731204588], [0.87918812731204588, 0.87918812731204588]], [[0.87918812731204588, 
-0.87918812731204588], [0.87918812731204588, 0.87918812731204588]], [[0.87918812731204588, 0.87918812731204588], 
-[0.9655251213411864, 0.87918812731204588]], [[0.87918812731204588, 0.87918812731204588], [0.87918812731204588, 
-0.87918812731204588]]])
+   def test_generalTensorProduct_constData_rank1_array_rank2_offset0(self):
+      arg0=Data(numpy.array([1.0, -2.0]),self.functionspace)
+      arg1=numpy.array([[-1.0, -3.0, 0.0, -4.0, 1.0], [1.0, -7.0, 0.0, -3.0, -1.0], [0.0, -3.0, 3.0, 4.0, 2.0], [1.0, -1.0, 
+-1.0, -2.0, 1.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-1.0, -3.0, 0.0, -4.0, 1.0], [1.0, -7.0, 0.0, -3.0, -1.0], [0.0, -3.0, 3.0, 4.0, 2.0], [1.0, 
+-1.0, -1.0, -2.0, 1.0]], [[2.0, 6.0, 0.0, 8.0, -2.0], [-2.0, 14.0, 0.0, 6.0, 2.0], [0.0, 6.0, -6.0, -8.0, -4.0], [-2.0, 2.0, 
+2.0, 4.0, -2.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.44580962530016999, -0.69348488146163345, -0.34481050040016448, 0.59519412601278909], 
-[-0.29649588803121163, -0.90433699382125621, 0.58229774413551061, -0.36778950106866248], [-0.367202105893363, 
--0.11391186768016848, 0.091423849403935442, -0.80223166648482014]], [[-0.80093892706918934, -0.29174863765813419, 
--0.16211197355096374, 0.075768040268325176], [0.68362107850802523, 0.30569303924697744, -0.27076611907986936, 
--0.32562966437337582], [0.32515793722254704, 0.077836894356146047, -0.37435906797035168, -0.35187117123705081]]], 
-[[[-0.51098052012853468, -0.13010630276624302, 0.87102220930593499, -0.64012790280688536], [-0.21267317186303125, 
--0.88402284628937533, 0.02431388699609216, 0.06052877315768912], [-0.28034820201167854, 0.95297399082866185, 
--0.30163718369713011, -0.50183508057815374]], [[-0.43680686484138076, -0.82955436525397341, -0.30888908734602927, 
-0.73714563499555674], [0.85936269560114997, -0.37602998325975867, -0.16401661856146643, 0.42565242322259933], 
-[-0.27441411269419902, 0.29164819210771387, -0.85938658660708112, -0.99892556232036434]]], [[[-0.81554459002181479, 
--0.35510738606811576, -0.6024526618358339, -0.96050342654364496], [-0.56351464899865644, -0.15196137810022159, 
-0.10412313747497359, 0.2755721298497178], [0.69743953672566561, -0.36580894827046495, 0.95677556962500332, 
--0.99552242481327524]], [[-0.11222970781965746, -0.33762110851060645, 0.27106365544031208, -0.29815607031304237], 
-[-0.056603466192955532, -0.93774716471967889, 0.74223460094575988, 0.42675210408069519], [-0.73797087885832946, 
--0.14895862461116716, -0.026765745522702833, 0.86420158258370283]]]])+(1.-msk_arg0)*numpy.array([[[[0.19372975479304544, 
--0.66808663318684403, 0.77537567177849098, 0.81919260999807397], [-0.10116256869273443, -0.57520810468712269, 
-0.15753839520629942, 0.79473404582834428], [-0.73645830163893855, 0.87616863458367211, -0.96733449165902963, 
--0.3516939203286118]], [[0.48878397140623631, 0.45609994336875803, 0.91436485388943489, -0.17781328406697527], 
-[0.65055833166980692, 0.10117618648410831, -0.09041980822458906, 0.59283939012926501], [0.78272644881934017, 
-0.25217910521330689, -0.84476748260357493, -0.42169419337471803]]], [[[-0.45223518020548759, 0.38375427581487509, 
--0.033829350614732911, 0.70903023968037648], [-0.80644295317701453, 0.54199751717049516, -0.3972649595244353, 
--0.26862061395744208], [0.163939148868391, -0.19776011299147966, -0.29279137734597294, 0.38651062526683488]], 
-[[0.73784058524755514, -0.62987052734714788, 0.96978901651430682, 0.68202116917743494], [-0.9741599743353393, 
--0.70746264080763765, -0.73637201007369524, -0.36338439617661566], [0.5758662884613357, 0.58540767089470402, 
--0.40111460235649776, 0.061425771822538389]]], [[[0.90108401417416362, 0.72943001699832255, -0.75909447019101606, 
-0.97176132609079291], [-0.31728686169672304, -0.40901210547887934, 0.96695071353736539, 0.032603047050764777], 
-[-0.12055510695784455, 0.768561520375171, 0.948776815267379, -0.50392752129221652]], [[-0.87599954417448522, 
-0.95279874663930531, 0.90744334941927685, -0.50378095934118838], [0.9824024122546311, 0.69765742163802824, 
--0.38287651073484019, 0.40060850054520558], [0.91703259523128899, -0.39809207284495951, -0.84284247078113972, 
-0.36091797506547008]]]])
-      arg1=numpy.array(-0.694396194523)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.44580962530016999, -0.69348488146163345, -0.34481050040016448, 0.59519412601278909], 
-[-0.29649588803121163, -0.6943961945233823, 0.58229774413551061, -0.36778950106866248], [-0.367202105893363, 
--0.11391186768016848, 0.091423849403935442, -0.6943961945233823]], [[-0.6943961945233823, -0.29174863765813419, 
--0.16211197355096374, 0.075768040268325176], [0.68362107850802523, 0.30569303924697744, -0.27076611907986936, 
--0.32562966437337582], [0.32515793722254704, 0.077836894356146047, -0.37435906797035168, -0.35187117123705081]]], 
-[[[-0.51098052012853468, -0.13010630276624302, 0.87102220930593499, -0.64012790280688536], [-0.21267317186303125, 
--0.6943961945233823, 0.02431388699609216, 0.06052877315768912], [-0.28034820201167854, 0.95297399082866185, 
--0.30163718369713011, -0.50183508057815374]], [[-0.43680686484138076, -0.6943961945233823, -0.30888908734602927, 
-0.73714563499555674], [0.85936269560114997, -0.37602998325975867, -0.16401661856146643, 0.42565242322259933], 
-[-0.27441411269419902, 0.29164819210771387, -0.6943961945233823, -0.6943961945233823]]], [[[-0.6943961945233823, 
--0.35510738606811576, -0.6024526618358339, -0.6943961945233823], [-0.56351464899865644, -0.15196137810022159, 
-0.10412313747497359, 0.2755721298497178], [0.69743953672566561, -0.36580894827046495, 0.95677556962500332, 
--0.6943961945233823]], [[-0.11222970781965746, -0.33762110851060645, 0.27106365544031208, -0.29815607031304237], 
-[-0.056603466192955532, -0.6943961945233823, 0.74223460094575988, 0.42675210408069519], [-0.6943961945233823, 
--0.14895862461116716, -0.026765745522702833, 0.86420158258370283]]]])+(1.-msk_ref)*numpy.array([[[[0.19372975479304544, 
--0.66808663318684403, 0.77537567177849098, 0.81919260999807397], [-0.10116256869273443, -0.57520810468712269, 
-0.15753839520629942, 0.79473404582834428], [-0.6943961945233823, 0.87616863458367211, -0.6943961945233823, 
--0.3516939203286118]], [[0.48878397140623631, 0.45609994336875803, 0.91436485388943489, -0.17781328406697527], 
-[0.65055833166980692, 0.10117618648410831, -0.09041980822458906, 0.59283939012926501], [0.78272644881934017, 
-0.25217910521330689, -0.6943961945233823, -0.42169419337471803]]], [[[-0.45223518020548759, 0.38375427581487509, 
--0.033829350614732911, 0.70903023968037648], [-0.6943961945233823, 0.54199751717049516, -0.3972649595244353, 
--0.26862061395744208], [0.163939148868391, -0.19776011299147966, -0.29279137734597294, 0.38651062526683488]], 
-[[0.73784058524755514, -0.62987052734714788, 0.96978901651430682, 0.68202116917743494], [-0.6943961945233823, 
--0.6943961945233823, -0.6943961945233823, -0.36338439617661566], [0.5758662884613357, 0.58540767089470402, 
--0.40111460235649776, 0.061425771822538389]]], [[[0.90108401417416362, 0.72943001699832255, -0.6943961945233823, 
-0.97176132609079291], [-0.31728686169672304, -0.40901210547887934, 0.96695071353736539, 0.032603047050764777], 
-[-0.12055510695784455, 0.768561520375171, 0.948776815267379, -0.50392752129221652]], [[-0.6943961945233823, 
-0.95279874663930531, 0.90744334941927685, -0.50378095934118838], [0.9824024122546311, 0.69765742163802824, 
--0.38287651073484019, 0.40060850054520558], [0.91703259523128899, -0.39809207284495951, -0.6943961945233823, 
-0.36091797506547008]]]])
+   def test_generalTensorProduct_constData_rank2_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[3.0, -6.0, 2.0], [0.0, 5.0, 4.0]]),self.functionspace)
+      arg1=numpy.array([[[1.0, 6.0, 0.0, 6.0, 1.0], [0.0, 5.0, 6.0, 5.0, 1.0], [6.0, 0.0, -3.0, 0.0, -5.0], [-6.0, 6.0, -6.0, 
+0.0, -7.0]], [[-2.0, 4.0, -2.0, -2.0, 2.0], [6.0, -4.0, -2.0, 1.0, 1.0], [0.0, 5.0, 6.0, 0.0, -2.0], [6.0, -1.0, 7.0, 7.0, 
+0.0]], [[-3.0, 0.0, -2.0, 1.0, -1.0], [6.0, 4.0, 4.0, -6.0, 0.0], [2.0, -7.0, -5.0, 7.0, 2.0], [-5.0, 5.0, -7.0, 1.0, 1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[9.0, -6.0, 8.0, 32.0, -11.0], [-24.0, 47.0, 38.0, -3.0, -3.0], [22.0, -44.0, -55.0, 14.0, 1.0], 
+[-64.0, 34.0, -74.0, -40.0, -19.0]], [[-22.0, 20.0, -18.0, -6.0, 6.0], [54.0, -4.0, 6.0, -19.0, 5.0], [8.0, -3.0, 10.0, 28.0, 
+-2.0], [10.0, 15.0, 7.0, 39.0, 4.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.88000228503)+(1.-msk_arg0)*(-0.20984850813)
-      arg1=Data(0.659456392175,self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.88000228503)+(1.-msk_ref)*(0.659456392175)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.71272356771458245, -0.3611606406674901])+(1.-msk_arg0)*numpy.array([-0.82598998478380836, 
--0.42990113071867553])
-      arg1=Data(0.178686493024,self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.17868649302435347, 0.17868649302435347])+(1.-msk_ref)*numpy.array([0.17868649302435347, 
-0.17868649302435347])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.63593420649217469, 0.071252699353494764, 0.52730188526412869, 0.90707321993763812, 
--0.49826390881410676], [0.65603487673248218, -0.1221632218420734, -0.65505386558118928, -0.092624138241382603, 
--0.60221631581080404], [0.59133951441423194, 0.62499728002156107, 0.91980036751900829, -0.76085845352133918, 
--0.85482925516349528], [-0.080754965852170235, 0.044026814393698155, -0.39390549886182535, -0.39036051478539835, 
--0.22353088797836307]])+(1.-msk_arg0)*numpy.array([[-0.72561188067886895, 0.44063138647043476, -0.71568806092968162, 
-0.79302562670403565, -0.7203898051760802], [-0.47457497511194724, 0.49128310742058168, 0.24651099047400171, 
--0.8094160968572508, -0.24832575278907898], [-0.38354631430621122, 0.21584585668083234, 0.88500663492033116, 
--0.17117462898833979, 0.91967256531048047], [0.53756830959719037, -0.037911466866273003, 0.014786652808508993, 
--0.43313218614069782, 0.83859088561946526]])
-      arg1=Data(0.24971708422,self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.63593420649217469, 0.24971708421996541, 0.52730188526412869, 0.90707321993763812, 
-0.24971708421996541], [0.65603487673248218, 0.24971708421996541, 0.24971708421996541, 0.24971708421996541, 
-0.24971708421996541], [0.59133951441423194, 0.62499728002156107, 0.91980036751900829, 0.24971708421996541, 
-0.24971708421996541], [0.24971708421996541, 0.24971708421996541, 0.24971708421996541, 0.24971708421996541, 
-0.24971708421996541]])+(1.-msk_ref)*numpy.array([[0.24971708421996541, 0.44063138647043476, 0.24971708421996541, 
-0.79302562670403565, 0.24971708421996541], [0.24971708421996541, 0.49128310742058168, 0.24971708421996541, 0.24971708421996541, 
-0.24971708421996541], [0.24971708421996541, 0.24971708421996541, 0.88500663492033116, 0.24971708421996541, 
-0.91967256531048047], [0.53756830959719037, 0.24971708421996541, 0.24971708421996541, 0.24971708421996541, 
-0.83859088561946526]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.22561961094336969, -0.69644978225088083], [-0.44227121250995638, -0.50735454965999582]], 
-[[0.16161200783821461, -0.4347630322634457], [0.26562304460337183, -0.15583347531179226]], [[0.59080340657647357, 
--0.30898005352956903], [-0.96090859496814618, 0.64957222823764948]], [[-0.78194949614475751, -0.96330346961526092], 
-[-0.75472165908116562, -0.97849212182888756]], [[-0.75432107675432469, 0.082043851417474389], [0.47974376178170175, 
-0.6709257227867087]], [[0.54824661624696036, -0.54157677822383921], [-0.659240045201267, 
-0.18082823678245341]]])+(1.-msk_arg0)*numpy.array([[[-0.54709583559254926, -0.15868154997696871], [0.026457093040474833, 
-0.56251013754601731]], [[-0.37622675052380505, -0.23721419821220846], [0.52430722837144028, -0.02821186532212705]], 
-[[-0.7164360240992329, 0.87804574359157361], [-0.36055956747943774, 0.8665138503873846]], [[-0.87103016729055427, 
--0.36978512045411382], [0.16675457478226341, 0.23700377551418117]], [[0.32530875953749505, 0.73065087014702934], 
-[-0.31548638071883328, -0.89169514477602374]], [[-0.58353491789348433, 0.3017692417364648], [0.42105486881407872, 
--0.24670377062806792]]])
-      arg1=Data(-0.751837483947,self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.22561961094336969, -0.69644978225088083], [-0.44227121250995638, -0.50735454965999582]], 
-[[0.16161200783821461, -0.4347630322634457], [0.26562304460337183, -0.15583347531179226]], [[0.59080340657647357, 
--0.30898005352956903], [-0.75183748394658645, 0.64957222823764948]], [[-0.75183748394658645, -0.75183748394658645], 
-[-0.75183748394658645, -0.75183748394658645]], [[-0.75183748394658645, 0.082043851417474389], [0.47974376178170175, 
-0.6709257227867087]], [[0.54824661624696036, -0.54157677822383921], [-0.659240045201267, 
-0.18082823678245341]]])+(1.-msk_ref)*numpy.array([[[-0.54709583559254926, -0.15868154997696871], [0.026457093040474833, 
-0.56251013754601731]], [[-0.37622675052380505, -0.23721419821220846], [0.52430722837144028, -0.02821186532212705]], 
-[[-0.7164360240992329, 0.87804574359157361], [-0.36055956747943774, 0.8665138503873846]], [[-0.75183748394658645, 
--0.36978512045411382], [0.16675457478226341, 0.23700377551418117]], [[0.32530875953749505, 0.73065087014702934], 
-[-0.31548638071883328, -0.75183748394658645]], [[-0.58353491789348433, 0.3017692417364648], [0.42105486881407872, 
--0.24670377062806792]]])
+   def test_generalTensorProduct_constData_rank3_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, 2.0, -7.0], [-2.0, 2.0, -5.0]], [[5.0, 5.0, -1.0], [6.0, 0.0, -3.0]]]),self.functionspace)
+      arg1=numpy.array([[[[4.0, 0.0, 7.0, -6.0, -3.0], [6.0, 0.0, -2.0, 5.0, -3.0], [7.0, 7.0, 5.0, -5.0, -3.0], [4.0, 6.0, 
+-5.0, 0.0, 1.0]], [[-5.0, -4.0, 6.0, 3.0, 5.0], [5.0, 2.0, 7.0, -5.0, -4.0], [-4.0, 3.0, 0.0, 1.0, 2.0], [-2.0, 1.0, 3.0, -7.0, 
+5.0]], [[6.0, -7.0, -1.0, -6.0, 0.0], [-3.0, 5.0, 7.0, 5.0, 3.0], [6.0, -6.0, 5.0, -2.0, -3.0], [-3.0, -7.0, 6.0, 5.0, 4.0]]], 
+[[[5.0, -3.0, 5.0, 3.0, -3.0], [3.0, -7.0, 0.0, 0.0, 0.0], [4.0, 2.0, 6.0, -7.0, -2.0], [-1.0, 0.0, 4.0, 0.0, -2.0]], [[7.0, 
+-6.0, -2.0, -7.0, 0.0], [-6.0, -2.0, -3.0, -4.0, -5.0], [0.0, -4.0, 2.0, -5.0, -2.0], [6.0, 3.0, -1.0, 1.0, -2.0]], [[3.0, 6.0, 
+4.0, 2.0, -2.0], [3.0, 0.0, 4.0, 0.0, 4.0], [-1.0, 0.0, 0.0, 5.0, 6.0], [-7.0, -2.0, -3.0, 4.0, 4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-71.0, 5.0, -29.0, 30.0, 32.0], [-14.0, -21.0, -57.0, -63.0, -53.0], [-67.0, 22.0, -53.0, 5.0, 
+1.0], [58.0, 55.0, -21.0, -67.0, -40.0]], [[10.0, -49.0, 84.0, 3.0, -2.0], [67.0, -37.0, 6.0, -5.0, -50.0], [36.0, 68.0, 56.0, 
+-75.0, -32.0], [28.0, 48.0, 17.0, -52.0, 2.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.46836650421512216, 0.55392434050869133, 0.64462355173707331, 0.47549964468485606], 
-[-0.69289889981348418, -0.20461909725159777, -0.95905690844675684, 0.01420826477124737], [-0.77419156074874329, 
-0.93441370846146876, 0.67855558163879071, 0.16075772354444062]], [[-0.0065968567345067175, 0.20050959624333031, 
-0.72598290161102197, -0.97695441137457473], [0.34654853789303552, 0.48359989540054027, 0.45795932416242602, 
--0.13036567808708344], [-0.45679097037796268, 0.15641582786074903, 0.31786075279898829, -0.23870739994752288]]], 
-[[[0.95042836806476449, 0.78075242319855431, -0.36462778215860348, -0.81076625675969294], [0.11060510010106617, 
--0.72824020802919986, -0.56633417520061813, -0.45562654021780635], [-0.42709566814202682, 0.79610178616158822, 
--0.85661543848488786, 0.070560494507247107]], [[0.20045514586255098, -0.19237619847201781, 0.49739688886609956, 
--0.96963620011390494], [0.17787451059406711, 0.95809663437507897, -0.68662219002349167, 0.20731333335407776], 
-[-0.40982045954261337, -0.16017268023574838, -0.24073312330589358, -0.043607865804729862]]], [[[-0.89903746166893161, 
-0.21373862072105831, -0.01480721421090192, -0.12849469109133538], [0.89888673761286042, 0.87560850881946917, 
--0.81952018477772159, 0.37617546473368257], [0.92421029785719599, 0.26088854799923022, -0.75492467331593938, 
-0.8355004322022761]], [[-0.98145328336063553, -0.93694991169090569, 0.36611389422804419, 0.49453177652277347], 
-[0.35699505986429214, -0.73480516245106497, 0.15750510738097434, 0.60146580130477645], [0.8080086070813568, 
--0.57380389192843828, 0.45232139162778928, -0.87668421492511817]]]])+(1.-msk_arg0)*numpy.array([[[[0.79049818853845744, 
--0.31643284915831793, 0.62698204144556136, 0.15055585522974413], [0.18428359666870175, -0.90655403355361042, 
--0.61799856818968246, -0.96209670683248194], [-0.22150547598602555, 0.11608945933719728, -0.93550584238462808, 
--0.51437923919154094]], [[0.11433307037970808, -0.6697957728739139, 0.026080474663143338, 0.89687571470160266], 
-[0.74220257866685402, 0.80630222035973476, -0.88765397198480867, -0.30073269119267354], [-0.61692766321637516, 
-0.70275565435456011, -0.770480369255093, 0.45855506259202561]]], [[[-0.25841786485345164, -0.9569035410607365, 
--0.2354046937481602, -0.76468796690158114], [-0.12764743888647057, -0.7570280529729656, -0.31857315603959679, 
-0.15543454155327607], [-0.46592327565824387, -0.60197786685351118, 0.24325043755979214, -0.70586610361238722]], 
-[[0.25903971611354648, -0.516785599192078, -0.4534446250373132, 0.19387204679020309], [-0.43563421185323126, 
-0.55496223606378137, -0.13284603494736147, -0.58152191275770404], [-0.19132818776329441, 0.16638009745376592, 
-0.92524151693459689, -0.22952254139222439]]], [[[0.3341414793432731, -0.40904633866616935, 0.86990541483951533, 
--0.38690851826482731], [0.34494363122687943, 0.41021617144572242, 0.33061965307913654, -0.43580755194659915], 
-[-0.69103379639840234, 0.50350152095540768, -0.69843540817247174, 0.26288005317296004]], [[-0.2886477174481421, 
--0.78908077047169134, 0.11673976034770406, 0.33019842460207882], [-0.93492125398225467, -0.2334918373016639, 
-0.98554713583062536, 0.4728612818618716], [-0.93118935725322149, 0.039886713080873326, 0.023210062083922844, 
--0.17367472025873631]]]])
-      arg1=Data(0.515617958919,self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.51561795891922024, 0.55392434050869133, 0.64462355173707331, 0.51561795891922024], 
-[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.93441370846146876, 0.67855558163879071, 0.51561795891922024]], [[0.51561795891922024, 0.51561795891922024, 
-0.72598290161102197, 0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 
-0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024]]], 
-[[[0.95042836806476449, 0.78075242319855431, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.51561795891922024, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 0.79610178616158822, 0.51561795891922024, 
-0.51561795891922024]], [[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], 
-[0.51561795891922024, 0.95809663437507897, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.51561795891922024, 0.51561795891922024, 0.51561795891922024]]], [[[0.51561795891922024, 0.51561795891922024, 
-0.51561795891922024, 0.51561795891922024], [0.89888673761286042, 0.87560850881946917, 0.51561795891922024, 
-0.51561795891922024], [0.92421029785719599, 0.51561795891922024, 0.51561795891922024, 0.8355004322022761]], 
-[[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.51561795891922024, 0.51561795891922024, 0.60146580130477645], [0.8080086070813568, 0.51561795891922024, 0.51561795891922024, 
-0.51561795891922024]]]])+(1.-msk_ref)*numpy.array([[[[0.79049818853845744, 0.51561795891922024, 0.62698204144556136, 
-0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], 
-[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024]], [[0.51561795891922024, 
-0.51561795891922024, 0.51561795891922024, 0.89687571470160266], [0.74220257866685402, 0.80630222035973476, 0.51561795891922024, 
-0.51561795891922024], [0.51561795891922024, 0.70275565435456011, 0.51561795891922024, 0.51561795891922024]]], 
-[[[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.51561795891922024, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 
-0.51561795891922024]], [[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], 
-[0.51561795891922024, 0.55496223606378137, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.51561795891922024, 0.92524151693459689, 0.51561795891922024]]], [[[0.51561795891922024, 0.51561795891922024, 
-0.86990541483951533, 0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 
-0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024]], 
-[[0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 0.51561795891922024], [0.51561795891922024, 
-0.51561795891922024, 0.98554713583062536, 0.51561795891922024], [0.51561795891922024, 0.51561795891922024, 0.51561795891922024, 
-0.51561795891922024]]]])
+   def test_generalTensorProduct_constData_rank1_array_rank3_offset0(self):
+      arg0=Data(numpy.array([-4.0, 0.0]),self.functionspace)
+      arg1=numpy.array([[[4.0, -5.0], [6.0, 4.0]], [[7.0, -4.0], [7.0, 5.0]], [[-1.0, -6.0], [4.0, -1.0]], [[-5.0, -2.0], 
+[-6.0, -1.0]], [[6.0, -3.0], [0.0, -1.0]], [[-2.0, 1.0], [1.0, -1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-16.0, 20.0], [-24.0, -16.0]], [[-28.0, 16.0], [-28.0, -20.0]], [[4.0, 24.0], [-16.0, 4.0]], 
+[[20.0, 8.0], [24.0, 4.0]], [[-24.0, 12.0], [0.0, 4.0]], [[8.0, -4.0], [-4.0, 4.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.802743243229)+(1.-msk_arg0)*(0.99702688738)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.596467110586)+(1.-msk_arg1)*(0.684381079372)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.802743243229)+(1.-msk_ref)*(0.99702688738)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.30614519824934328, -0.51813576976876141])+(1.-msk_arg0)*numpy.array([0.5500576508538344, 
-0.12364229321815245])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.321480996125)+(1.-msk_arg1)*(0.0905449773774)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.32148099612549919, 0.32148099612549919])+(1.-msk_ref)*numpy.array([0.5500576508538344, 
-0.12364229321815245])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.35552309152320305, -0.11101213305383895, -0.74227520152636406, 0.46252596749984454, 
-0.42113714908898525], [0.93097659800329025, 0.83327502155685007, 0.52757195622578923, 0.061911816792792118, 
--0.70771644366942166], [0.073915923799455552, -0.5867632562644447, -0.47160386240000851, -0.37172839238353261, 
-0.91218541682748122], [0.8577488749130433, -0.56376354937296624, -0.81071810619576512, 0.81701750260161798, 
--0.06159461532096655]])+(1.-msk_arg0)*numpy.array([[-0.14196838411601753, 0.54924551192337701, 0.19495347583316969, 
--0.68202363369328567, 0.39461470689048062], [-0.3688063281037306, 0.48318268985280555, -0.77231524148262065, 
-0.98493877845621736, -0.42013126010835244], [-0.9491470463541829, 0.10891550790333016, 0.93107340408360417, 
--0.70621836778754332, 0.71341896718143105], [-0.45972826679918621, -0.21350972161348403, 0.96659767157606402, 
--0.12881865656272806, 0.4043650376973722]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.67091545012)+(1.-msk_arg1)*(-0.0757810945746)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.35552309152320305, -0.11101213305383895, -0.67091545012013643, 0.46252596749984454, 
-0.42113714908898525], [0.93097659800329025, 0.83327502155685007, 0.52757195622578923, 0.061911816792792118, 
--0.67091545012013643], [0.073915923799455552, -0.5867632562644447, -0.47160386240000851, -0.37172839238353261, 
-0.91218541682748122], [0.8577488749130433, -0.56376354937296624, -0.67091545012013643, 0.81701750260161798, 
--0.06159461532096655]])+(1.-msk_ref)*numpy.array([[-0.075781094574565167, 0.54924551192337701, 0.19495347583316969, 
--0.075781094574565167, 0.39461470689048062], [-0.075781094574565167, 0.48318268985280555, -0.075781094574565167, 
-0.98493877845621736, -0.075781094574565167], [-0.075781094574565167, 0.10891550790333016, 0.93107340408360417, 
--0.075781094574565167, 0.71341896718143105], [-0.075781094574565167, -0.075781094574565167, 0.96659767157606402, 
--0.075781094574565167, 0.4043650376973722]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.73259259492432927, 0.43516685226353369], [0.34658816662510294, 0.99694890396299152]], 
-[[-0.82513842361582301, -0.60640821327530237], [-0.46651350541260106, -0.44412570768110937]], [[-0.095664979228247793, 
-0.53884106143660015], [-0.15097890528281876, -0.0053807492881323693]], [[0.83781924943391406, -0.99066586932757672], 
-[-0.88389801870266527, 0.065863228211280322]], [[-0.1940964066265598, -0.44657666544066421], [-0.7618618185275754, 
--0.022638072362826334]], [[0.64174101237204484, -0.75430513988969916], [0.97134520182564943, 
-0.4795408665156784]]])+(1.-msk_arg0)*numpy.array([[[0.26927998366552952, 0.75523312878691362], [0.076434487275322427, 
--0.6819391552501628]], [[-0.48721751558695492, -0.18534329149598827], [-0.40788258318505388, -0.70764982356182471]], 
-[[-0.82449663467055356, 0.16419130511566893], [0.25011445773188701, 0.1035128720077596]], [[-0.0022868899113452912, 
--0.47461046292673736], [-0.48883758713916237, 0.93798235093853721]], [[0.18720827904762127, -0.0030792936071819543], 
-[-0.47477258458581706, -0.62011335136235024]], [[-0.63547863145971673, -0.81616381306744112], [-0.87756446408192956, 
-0.25672900864254466]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.043916106452)+(1.-msk_arg1)*(0.158271071418)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.043916106452033032, 0.43516685226353369], [0.34658816662510294, 0.99694890396299152]], 
-[[-0.043916106452033032, -0.043916106452033032], [-0.043916106452033032, -0.043916106452033032]], [[-0.043916106452033032, 
-0.53884106143660015], [-0.043916106452033032, -0.0053807492881323693]], [[0.83781924943391406, -0.043916106452033032], 
-[-0.043916106452033032, 0.065863228211280322]], [[-0.043916106452033032, -0.043916106452033032], [-0.043916106452033032, 
--0.022638072362826334]], [[0.64174101237204484, -0.043916106452033032], [0.97134520182564943, 
-0.4795408665156784]]])+(1.-msk_ref)*numpy.array([[[0.26927998366552952, 0.75523312878691362], [0.15827107141755392, 
-0.15827107141755392]], [[0.15827107141755392, 0.15827107141755392], [0.15827107141755392, 0.15827107141755392]], 
-[[0.15827107141755392, 0.16419130511566893], [0.25011445773188701, 0.15827107141755392]], [[0.15827107141755392, 
-0.15827107141755392], [0.15827107141755392, 0.93798235093853721]], [[0.18720827904762127, 0.15827107141755392], 
-[0.15827107141755392, 0.15827107141755392]], [[0.15827107141755392, 0.15827107141755392], [0.15827107141755392, 
-0.25672900864254466]]])
+   def test_generalTensorProduct_constData_rank2_array_rank4_offset1(self):
+      arg0=Data(numpy.array([[-2.0, 3.0, -5.0], [6.0, 3.0, -1.0]]),self.functionspace)
+      arg1=numpy.array([[[[1.0, -1.0], [-3.0, -3.0]], [[-1.0, -3.0], [1.0, 5.0]], [[-7.0, 2.0], [-2.0, -3.0]], [[1.0, -1.0], 
+[-1.0, 0.0]], [[-2.0, -3.0], [-7.0, 0.0]], [[-7.0, 0.0], [-4.0, 5.0]]], [[[-5.0, 6.0], [2.0, 6.0]], [[-1.0, 6.0], [2.0, 0.0]], 
+[[3.0, 5.0], [-2.0, -4.0]], [[-7.0, 5.0], [-1.0, -3.0]], [[5.0, 0.0], [2.0, -1.0]], [[-7.0, 1.0], [-6.0, -2.0]]], [[[-3.0, 
+0.0], [-3.0, 6.0]], [[5.0, -7.0], [2.0, -2.0]], [[-1.0, 5.0], [4.0, -2.0]], [[2.0, 4.0], [4.0, -5.0]], [[-4.0, 7.0], [2.0, 
+1.0]], [[-2.0, -1.0], [-7.0, 2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-2.0, 20.0], [27.0, -6.0]], [[-26.0, 59.0], [-6.0, 0.0]], [[28.0, -14.0], [-22.0, 4.0]], 
+[[-33.0, -3.0], [-21.0, 16.0]], [[39.0, -29.0], [10.0, -8.0]], [[3.0, 8.0], [25.0, -26.0]]], [[[-6.0, 12.0], [-9.0, -6.0]], 
+[[-14.0, 7.0], [10.0, 32.0]], [[-32.0, 22.0], [-22.0, -28.0]], [[-17.0, 5.0], [-13.0, -4.0]], [[7.0, -25.0], [-38.0, -4.0]], 
+[[-61.0, 4.0], [-35.0, 22.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.97239764595471057, -0.43270302318573983, -0.17542209868837455, -0.71317358004463216], 
-[0.72878255833928107, 0.25393968296339708, 0.7062928811864444, 0.70798565970935257], [-0.8868456954486732, 
--0.074127186200250605, -0.26518707102168726, -0.91047990906076226]], [[-0.5485021908717751, 0.4625407566939097, 
--0.013117973326893795, 0.98963345359662513], [-0.56450486895185792, 0.40832041648188855, -0.48341521803155008, 
--0.99848277869207203], [0.30951894134880442, 0.60735662998233275, 0.61717782998775084, 0.19184298106071851]]], 
-[[[0.6509286048782652, -0.86979300962840544, -0.5411735404074498, 0.88956340514970922], [-0.96087197906551292, 
--0.21534927161261552, -0.26855994833000074, 0.87089013542946114], [-0.62559526136686361, 0.64612780085586707, 
--0.71008042900676327, -0.12675921354333219]], [[0.14266331123609066, 0.12940917183095224, 0.53440833399954135, 
-0.5541645660247565], [0.045871400215263813, 0.0028821188154224409, 0.61511017352453567, 0.23973103956187747], 
-[-0.5445038209174482, 0.91013574526764818, -0.23848811565899952, -0.50332896814919081]]], [[[0.68813990143394066, 
--0.056178984894786232, -0.90169036885976483, -0.53603412124753502], [0.72461066752157022, -0.78363334606207768, 
--0.30673442696718567, -0.57239754291823752], [0.47800787094455832, 0.22707910699571876, 0.15163871045515576, 
-0.34159974670530202]], [[0.22466552974210119, 0.61881183505470827, 0.1234877438382167, -0.12282347214627087], 
-[0.61057990868408396, 0.8011211522833841, 0.04817598302759829, -0.69530242501742423], [-0.89443503352680165, 
--0.28642491039227203, 0.85109648851133368, 0.76098655847489716]]]])+(1.-msk_arg0)*numpy.array([[[[-0.78310919117047861, 
-0.85334677407078319, -0.62426072225732399, 0.46836843422702801], [0.19400083911486732, 0.51787351106685575, 
-0.77734214592705597, -0.95555304880082459], [-0.57736565407128349, -0.962078230900135, 0.71908577835422061, 
-0.52860269178335706]], [[-0.23053457594726123, -0.266981616166589, 0.14706660164143481, 0.87362580720893002], 
-[-0.13519752223577863, 0.68403053579261708, 0.81667447656236591, -0.63546890273087198], [-0.6941496632135975, 
--0.97716830228976104, -0.76264707972380985, 0.95414050486223734]]], [[[0.81051389375652416, -0.20260132938999731, 
--0.15605191092737858, 0.00027979793612331605], [0.35802562761073653, -0.90719191248436526, -0.43781707733763953, 
--0.011859015060990297], [-0.00026721880675317777, 0.03389014993537498, -0.86094631324460957, 0.63209497268625059]], 
-[[0.84985041427879127, 0.63435047168217107, 0.63306132652062419, 0.15142825356810752], [-0.95169088382223621, 
--0.53852352077320687, 0.40757365469216311, 0.72549198576227814], [-0.40725622434408404, 0.2979281144336543, 
-0.66349993369849813, 0.90003860925876911]]], [[[-0.18468813635358217, -0.15991413502959206, -0.37936629946621503, 
-0.68121986886073937], [0.62629515765129828, -0.69478206811435461, -0.055458611202817476, 0.51186245363263772], 
-[0.66956258449967776, 0.95206087000905248, 0.84125023317845504, -0.80845902992651286]], [[-0.24067863353083996, 
-0.34352122106482885, 0.4111960087158808, 0.49747272331840375], [-0.71349227438459728, -0.017613099557210354, 
--0.66930930912049247, -0.042255829832726244], [0.69452252329293929, -0.54976031507306566, -0.76373909421180697, 
-0.13579444083187586]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.0564655883036)+(1.-msk_arg1)*(0.980742034114)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.056465588303555192, -0.056465588303555192, -0.056465588303555192, -0.056465588303555192], 
-[0.72878255833928107, 0.25393968296339708, 0.7062928811864444, 0.70798565970935257], [-0.056465588303555192, 
--0.056465588303555192, -0.056465588303555192, -0.056465588303555192]], [[-0.056465588303555192, 0.4625407566939097, 
--0.013117973326893795, 0.98963345359662513], [-0.056465588303555192, 0.40832041648188855, -0.056465588303555192, 
--0.056465588303555192], [0.30951894134880442, 0.60735662998233275, 0.61717782998775084, 0.19184298106071851]]], 
-[[[0.6509286048782652, -0.056465588303555192, -0.056465588303555192, 0.88956340514970922], [-0.056465588303555192, 
--0.056465588303555192, -0.056465588303555192, 0.87089013542946114], [-0.056465588303555192, 0.64612780085586707, 
--0.056465588303555192, -0.056465588303555192]], [[0.14266331123609066, 0.12940917183095224, 0.53440833399954135, 
-0.5541645660247565], [0.045871400215263813, 0.0028821188154224409, 0.61511017352453567, 0.23973103956187747], 
-[-0.056465588303555192, 0.91013574526764818, -0.056465588303555192, -0.056465588303555192]]], [[[0.68813990143394066, 
--0.056178984894786232, -0.056465588303555192, -0.056465588303555192], [0.72461066752157022, -0.056465588303555192, 
--0.056465588303555192, -0.056465588303555192], [0.47800787094455832, 0.22707910699571876, 0.15163871045515576, 
-0.34159974670530202]], [[0.22466552974210119, 0.61881183505470827, 0.1234877438382167, -0.056465588303555192], 
-[0.61057990868408396, 0.8011211522833841, 0.04817598302759829, -0.056465588303555192], [-0.056465588303555192, 
--0.056465588303555192, 0.85109648851133368, 0.76098655847489716]]]])+(1.-msk_ref)*numpy.array([[[[0.98074203411363214, 
-0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 
-0.98074203411363214], [0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214]], 
-[[0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 
-0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 
-0.98074203411363214]]], [[[0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214], 
-[0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 
-0.98074203411363214, 0.98074203411363214, 0.98074203411363214]], [[0.98074203411363214, 0.98074203411363214, 
-0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 
-0.98074203411363214], [0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214]]], 
-[[[0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 
-0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 
-0.98074203411363214]], [[0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214], 
-[0.98074203411363214, 0.98074203411363214, 0.98074203411363214, 0.98074203411363214], [0.98074203411363214, 
-0.98074203411363214, 0.98074203411363214, 0.98074203411363214]]]])
+   def test_generalTensorProduct_constData_rank1_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([2.0, 0.0]),self.functionspace)
+      arg1=Data(3.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([6.0, 0.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.91472696079)+(1.-msk_arg0)*(0.0113171772217)
-      arg1=numpy.array([0.14371887572797215, 0.37905569309172993])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.14371887572797215, 0.37905569309172993])+(1.-msk_ref)*numpy.array([0.14371887572797215, 
-0.37905569309172993])
+   def test_generalTensorProduct_constData_rank2_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[2.0, 0.0, 6.0], [5.0, 7.0, 2.0]]),self.functionspace)
+      arg1=Data(numpy.array([6.0, 4.0, -4.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-12.0, 50.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.81630127664035768, -0.15929336428417074])+(1.-msk_arg0)*numpy.array([0.68019737932345881, 
--0.093124132522008241])
-      arg1=numpy.array([-0.18398194604258977, -0.032707152944865703])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.18398194604258977, -0.032707152944865703])+(1.-msk_ref)*numpy.array([0.68019737932345881, 
--0.032707152944865703])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.548457814582)+(1.-msk_arg0)*(0.436923684914)
-      arg1=Data(numpy.array([0.32727602859016058, -0.69475369769015094]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.54845781458158971, 0.54845781458158971])+(1.-msk_ref)*numpy.array([0.43692368491449796, 
-0.43692368491449796])
+   def test_generalTensorProduct_constData_rank3_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 3.0, -5.0], [1.0, 2.0, 1.0]], [[-3.0, 7.0, 1.0], [-1.0, 5.0, -4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[4.0, -6.0, 2.0], [7.0, -7.0, 5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-30.0, -114.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.99653128761363829, -0.95662233086782145])+(1.-msk_arg0)*numpy.array([-0.2807142353642802, 
--0.065215727549697844])
-      arg1=Data(numpy.array([-0.79471881002574074, -0.20025122987772725]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.99653128761363829, -0.20025122987772725])+(1.-msk_ref)*numpy.array([-0.2807142353642802, 
--0.065215727549697844])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.29012502378)+(1.-msk_arg0)*(0.41584476555)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.51903312957260583, 0.43793002132024195])+(1.-msk_arg1)*numpy.array([-0.78491146092485953, 
--0.011835549572744242])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.29012502378044203, 0.43793002132024195])+(1.-msk_ref)*numpy.array([0.41584476555003325, 
-0.41584476555003325])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank1_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.82921401986738741, 0.80635465212532376])+(1.-msk_arg0)*numpy.array([0.88940997358724871, 
--0.066276300855594661])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.48900030716550646, 0.89815654363021591])+(1.-msk_arg1)*numpy.array([-0.28630310397292424, 
-0.90329307144140514])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.48900030716550646, 0.89815654363021591])+(1.-msk_ref)*numpy.array([0.88940997358724871, 
-0.90329307144140514])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.738866997633)+(1.-msk_arg0)*(-0.433750876359)
-      arg1=numpy.array([[-0.72541252238085341, -0.27328120068358186, -0.25768712583393794, 0.21782093726317253, 
-0.21367510956324054], [0.98361068092360515, 0.35248978957852106, 0.42339790030821889, -0.94369935325387355, 
--0.37125013968130149], [0.40578636976051574, 0.092530880501699109, 0.53629223276669968, -0.79074006834632415, 
--0.15815695657904016], [-0.919681786301078, 0.94894235245350478, 0.5214898825250871, -0.66979099258767993, 
--0.38568393578428029]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.72541252238085341, -0.27328120068358186, -0.25768712583393794, 0.21782093726317253, 
-0.21367510956324054], [0.98361068092360515, 0.35248978957852106, 0.42339790030821889, -0.73886699763279085, 
--0.37125013968130149], [0.40578636976051574, 0.092530880501699109, 0.53629223276669968, -0.73886699763279085, 
--0.15815695657904016], [-0.73886699763279085, 0.94894235245350478, 0.5214898825250871, -0.66979099258767993, 
--0.38568393578428029]])+(1.-msk_ref)*numpy.array([[-0.43375087635858489, -0.27328120068358186, -0.25768712583393794, 
-0.21782093726317253, 0.21367510956324054], [0.98361068092360515, 0.35248978957852106, 0.42339790030821889, 
--0.43375087635858489, -0.37125013968130149], [0.40578636976051574, 0.092530880501699109, 0.53629223276669968, 
--0.43375087635858489, -0.15815695657904016], [-0.43375087635858489, 0.94894235245350478, 0.5214898825250871, 
--0.43375087635858489, -0.38568393578428029]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.59602224313129293, -0.11901786006980619, 0.47394054830502341, 0.71692130476721272, 
-0.09678329807748387], [-0.7741902289056608, 0.45979801568792888, -0.98432358068659065, 0.43810958790745702, 
--0.2181908164969264], [0.68635344198849357, -0.63580672602393418, 0.56914340993295376, 0.72582816628325864, 
-0.28625749548694635], [-0.96371518108689647, 0.96240821379092734, 0.28345092970524055, 0.30653314343609073, 
--0.46516206234910218]])+(1.-msk_arg0)*numpy.array([[-0.34558335496233084, 0.12813098391466982, 0.41371341344934742, 
--0.31603088740499929, 0.84942205473057886], [-0.047845479330066443, -0.9688999068869768, 0.13558507922573537, 
--0.0021241484260634547, -0.0031519468474074941], [-0.24144821576740583, 0.75686073650684005, 0.42949597298606812, 
--0.3727904968363922, -0.17834896282439594], [-0.94049628031166632, 0.38349145105884608, 0.023352370386710009, 
--0.42358610500863669, 0.37437019047424891]])
-      arg1=numpy.array([[-0.18542847783609706, 0.22742315441537819, -0.89799604135669098, -0.029715367528657666, 
-0.26637098196110909], [0.08744313945977189, -0.3111398797675895, 0.33915365506764372, 0.17136460418220367, 
-0.74584076818085498], [0.31715314583046261, 0.67587032025034177, -0.10233387490482748, 0.66906369472410776, 
-0.47404774150329287], [0.20628235268347828, 0.6926711444575866, -0.17570076094413967, -0.73720093961838984, 
-0.18922410282454538]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.59602224313129293, 0.22742315441537819, 0.47394054830502341, 0.71692130476721272, 
-0.26637098196110909], [0.08744313945977189, 0.45979801568792888, 0.33915365506764372, 0.43810958790745702, 
-0.74584076818085498], [0.68635344198849357, 0.67587032025034177, 0.56914340993295376, 0.72582816628325864, 
-0.47404774150329287], [0.20628235268347828, 0.96240821379092734, 0.28345092970524055, 0.30653314343609073, 
-0.18922410282454538]])+(1.-msk_ref)*numpy.array([[-0.18542847783609706, 0.22742315441537819, 0.41371341344934742, 
--0.029715367528657666, 0.84942205473057886], [0.08744313945977189, -0.3111398797675895, 0.33915365506764372, 
-0.17136460418220367, 0.74584076818085498], [0.31715314583046261, 0.75686073650684005, 0.42949597298606812, 0.66906369472410776, 
-0.47404774150329287], [0.20628235268347828, 0.6926711444575866, 0.023352370386710009, -0.42358610500863669, 
-0.37437019047424891]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.968391321824)+(1.-msk_arg0)*(-0.7099346671)
-      arg1=Data(numpy.array([[0.29701179879797723, 0.70347702823080427, -0.79471835800766311, -0.68731376369202835, 
-0.90311857651371241], [0.7103320021427153, 0.054717441367131858, -0.99745778238441463, 0.04873028739048979, 
--0.61006905413485013], [-0.93842733155605274, 0.50853628427338804, -0.30426091903544128, 0.58360725848963546, 
--0.31705926426858344], [0.69399270037069161, 0.86826926031660534, -0.47801614714304264, -0.70843001046225007, 
-0.41841801765930908]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 
-0.9683913218243918], [0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 0.9683913218243918], 
-[0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 0.9683913218243918], [0.9683913218243918, 
-0.9683913218243918, 0.9683913218243918, 0.9683913218243918, 
-0.9683913218243918]])+(1.-msk_ref)*numpy.array([[0.29701179879797723, 0.70347702823080427, -0.7099346670995712, 
--0.68731376369202835, 0.90311857651371241], [0.7103320021427153, 0.054717441367131858, -0.7099346670995712, 
-0.04873028739048979, -0.61006905413485013], [-0.7099346670995712, 0.50853628427338804, -0.30426091903544128, 
-0.58360725848963546, -0.31705926426858344], [0.69399270037069161, 0.86826926031660534, -0.47801614714304264, 
--0.70843001046225007, 0.41841801765930908]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.17637613197723212, 0.81368899697847774, -0.70066741436084534, 0.52296323461967109, 
-0.66661088326806484], [-0.67485549317596027, 0.59758445609776101, 0.45040429582876418, 0.4217012917259817, 
-0.31279429738001019], [-0.58077835069237804, 0.29166102420102469, 0.2526616156848065, -0.99562234283945816, 
-0.65468685772365487], [0.19825255328895963, -0.76510565916121398, -0.50483448612496407, -0.45238980645974602, 
--0.53086113668897883]])+(1.-msk_arg0)*numpy.array([[-0.22161254255821672, 0.68759782267067937, 0.42154665952894632, 
--0.985440698773, 0.65635042945475552], [-0.98478600172882391, -0.5752667375492353, 0.65357545821292073, -0.56915537584382703, 
-0.81813057385681121], [-0.40228961090376347, 0.33922609331886067, 0.39610970863817063, -0.73836203087494967, 
-0.024995750541199069], [0.88777276882702072, 0.17246350399093902, -0.61218504009487229, 0.31396178043500922, 
-0.11512731297688328]])
-      arg1=Data(numpy.array([[-0.13197862175472586, 0.14177033935387584, 0.014728422246227613, 0.79013786976409039, 
--0.18503758822783389], [-0.55156124342170476, 0.42996511802016557, -0.48720125682385684, -0.15886085390437277, 
-0.30830039080251459], [-0.33140838037629905, 0.11411784911565048, -0.73051867757577305, 0.254789079889016, 
--0.43020531322659283], [0.95938676389248312, 0.30942507644975104, -0.50054369053870018, 0.38636057061586304, 
--0.98930316764198034]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.17637613197723212, 0.81368899697847774, 0.014728422246227613, 0.79013786976409039, 
-0.66661088326806484], [-0.55156124342170476, 0.59758445609776101, 0.45040429582876418, 0.4217012917259817, 
-0.31279429738001019], [-0.33140838037629905, 0.29166102420102469, 0.2526616156848065, 0.254789079889016, 0.65468685772365487], 
-[0.95938676389248312, 0.30942507644975104, -0.50054369053870018, 0.38636057061586304, 
--0.53086113668897883]])+(1.-msk_ref)*numpy.array([[-0.13197862175472586, 0.68759782267067937, 0.42154665952894632, 
-0.79013786976409039, 0.65635042945475552], [-0.55156124342170476, 0.42996511802016557, 0.65357545821292073, 
--0.15886085390437277, 0.81813057385681121], [-0.33140838037629905, 0.33922609331886067, 0.39610970863817063, 0.254789079889016, 
-0.024995750541199069], [0.95938676389248312, 0.30942507644975104, -0.50054369053870018, 0.38636057061586304, 
-0.11512731297688328]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.886606128808)+(1.-msk_arg0)*(0.700768026575)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.64305532973646962, -0.60638128218256138, -0.61260373793718603, 0.70274481583329318, 
-0.67216573607284502], [0.056357513607530052, -0.48959189340698983, 0.77594105159309468, -0.33512945900811486, 
--0.25598250131831435], [-0.30715706143639299, 0.74424305314625716, 0.24844080090239506, 0.6650072844121715, 
--0.11577214960345117], [0.22799447655880756, 0.12096394541929056, -0.61783357756637769, -0.7264377493442018, 
--0.47973788724609601]])+(1.-msk_arg1)*numpy.array([[0.40953857832882945, -0.99145479187770569, -0.44359836716615697, 
--0.30133864079518013, 0.9989647760984417], [0.23049902934564859, 0.076896464188720426, 0.89322879768241381, 
-0.23892993150226904, 0.19317941564711605], [0.61204111604612521, -0.071423367004127769, 0.74464158577928607, 
--0.26337579380661036, -0.42258481952201143], [0.43093362538307511, 0.39300817159427748, -0.86217742540170916, 
--0.60481644540941271, 0.29651542402341824]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.64305532973646962, -0.60638128218256138, -0.61260373793718603, 0.70274481583329318, 
-0.67216573607284502], [0.056357513607530052, -0.48959189340698983, 0.77594105159309468, -0.33512945900811486, 
--0.25598250131831435], [-0.30715706143639299, 0.74424305314625716, 0.24844080090239506, 0.6650072844121715, 
--0.11577214960345117], [0.22799447655880756, 0.12096394541929056, -0.61783357756637769, -0.7264377493442018, 
--0.47973788724609601]])+(1.-msk_ref)*numpy.array([[0.70076802657454795, 0.70076802657454795, 0.70076802657454795, 
-0.70076802657454795, 0.9989647760984417], [0.70076802657454795, 0.70076802657454795, 0.89322879768241381, 0.70076802657454795, 
-0.70076802657454795], [0.70076802657454795, 0.70076802657454795, 0.74464158577928607, 0.70076802657454795, 
-0.70076802657454795], [0.70076802657454795, 0.70076802657454795, 0.70076802657454795, 0.70076802657454795, 
-0.70076802657454795]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.30612019189686168, 0.95135935967120422, -0.075353866244783019, -0.56798070953046609, 
-0.42529437925846336], [-0.7968326902743923, 0.25500403452815013, -0.34667163196195383, -0.15250832494823841, 
--0.98608167456642448], [0.75976092051693511, -0.71954763745402794, -0.85716569577642621, 0.5049444481642722, 
--0.5589267595072247], [-0.44267531322074372, 0.92213529484491441, 0.55119130907482328, -0.68170498176248873, 
-0.90555976103882951]])+(1.-msk_arg0)*numpy.array([[0.59519177758892727, 0.25976913209471464, -0.27191012388999081, 
-0.8616827024136533, 0.48496769325691225], [0.42123832877010292, 0.97608441953561509, -0.033557590270044457, 
--0.80335344330470848, 0.2498103208196969], [-0.28440764569673171, 0.48513587003581704, -0.26670168419543239, 
--0.023258098131885507, -0.28285209082596752], [-0.77293657173661967, -0.87258589181928414, 0.16777292094842156, 
-0.98554552171112531, -0.58041025857394812]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.53980428075498432, -0.8620985675765529, 0.10318753714451057, -0.34594469649839743, 
--0.26253653354933437], [0.5568000522030927, 0.95471851543455877, 0.76494137771653703, -0.89909752018530487, 
-0.065218938426729212], [-0.94889860454446717, -0.27132057498615136, 0.25050587653834056, -0.022689614047457729, 
--0.83525701623221682], [-0.72343888167391657, -0.94000414827540379, -0.12680345659866288, -0.3726106505034219, 
-0.12322122882315356]])+(1.-msk_arg1)*numpy.array([[0.42724124999901059, -0.22595557355760132, -0.80352821333452384, 
--0.92811140531522573, 0.63931956037221016], [-0.6877750864294403, -0.0056332903472737783, 0.21419300884938419, 
--0.69188811767615754, -0.9138285400178312], [-0.54256535713927923, 0.73733527645626329, -0.098012441663765548, 
-0.80054498308143573, 0.11936239919805236], [0.46067331791290411, -0.85622216822493269, -0.85577286610605174, 
--0.64462140755589581, -0.91167565524099992]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.53980428075498432, 0.95135935967120422, 0.10318753714451057, -0.34594469649839743, 
-0.42529437925846336], [0.5568000522030927, 0.95471851543455877, 0.76494137771653703, -0.15250832494823841, 
-0.065218938426729212], [0.75976092051693511, -0.27132057498615136, 0.25050587653834056, 0.5049444481642722, 
--0.5589267595072247], [-0.44267531322074372, 0.92213529484491441, 0.55119130907482328, -0.3726106505034219, 
-0.90555976103882951]])+(1.-msk_ref)*numpy.array([[0.59519177758892727, 0.25976913209471464, -0.27191012388999081, 
-0.8616827024136533, 0.63931956037221016], [0.42123832877010292, 0.97608441953561509, 0.21419300884938419, -0.69188811767615754, 
-0.2498103208196969], [-0.28440764569673171, 0.73733527645626329, -0.098012441663765548, 0.80054498308143573, 
-0.11936239919805236], [0.46067331791290411, -0.85622216822493269, 0.16777292094842156, 0.98554552171112531, 
--0.58041025857394812]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.718530103778)+(1.-msk_arg0)*(0.793689594671)
-      arg1=numpy.array([[[-0.0024451589941487661, 0.37962439196941866], [0.63153612360410327, -0.47899847783370531]], 
-[[-0.90520992078403451, -0.95918575086250835], [-0.28115016997012687, -0.51161918860583588]], [[-0.61627320654983975, 
--0.54619724559098004], [0.47194607858515991, 0.70563469194352724]], [[0.77071388199460955, 0.071543453256624145], 
-[0.320642130841571, -0.23511721513687456]], [[0.565685956805559, 0.39919171271086351], [0.39452154791888394, 
--0.8334230961358382]], [[0.71553572930335529, -0.72729092650994009], [-0.57115890968262772, -0.19116184636450217]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.71853010377798143, 0.71853010377798143], [0.71853010377798143, 0.71853010377798143]], 
-[[0.71853010377798143, 0.71853010377798143], [0.71853010377798143, 0.71853010377798143]], [[0.71853010377798143, 
-0.71853010377798143], [0.71853010377798143, 0.71853010377798143]], [[0.77071388199460955, 0.71853010377798143], 
-[0.71853010377798143, 0.71853010377798143]], [[0.71853010377798143, 0.71853010377798143], [0.71853010377798143, 
-0.71853010377798143]], [[0.71853010377798143, 0.71853010377798143], [0.71853010377798143, 
-0.71853010377798143]]])+(1.-msk_ref)*numpy.array([[[0.79368959467057976, 0.79368959467057976], [0.79368959467057976, 
-0.79368959467057976]], [[0.79368959467057976, 0.79368959467057976], [0.79368959467057976, 0.79368959467057976]], 
-[[0.79368959467057976, 0.79368959467057976], [0.79368959467057976, 0.79368959467057976]], [[0.79368959467057976, 
-0.79368959467057976], [0.79368959467057976, 0.79368959467057976]], [[0.79368959467057976, 0.79368959467057976], 
-[0.79368959467057976, 0.79368959467057976]], [[0.79368959467057976, 0.79368959467057976], [0.79368959467057976, 
-0.79368959467057976]]])
+   def test_generalTensorProduct_constData_rank4_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[7.0, -3.0, 6.0], [0.0, 2.0, -2.0], [2.0, -6.0, -2.0], [2.0, -5.0, 7.0]], [[0.0, -5.0, 6.0], 
+[6.0, -1.0, 2.0], [-7.0, 3.0, -7.0], [4.0, -7.0, 7.0]]], [[[-1.0, -3.0, 0.0], [-6.0, 7.0, -6.0], [-2.0, 5.0, 0.0], [-6.0, 0.0, 
+-5.0]], [[5.0, -3.0, 5.0], [-7.0, -2.0, -2.0], [5.0, -6.0, -7.0], [-6.0, 3.0, 2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 4.0, 3.0], [-2.0, -3.0, -3.0], [6.0, -6.0, -5.0], [7.0, -3.0, 7.0]], [[5.0, -2.0, 4.0], 
+[5.0, 0.0, -7.0], [7.0, -4.0, -6.0], [0.0, -3.0, 6.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([222.0, 14.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.23289574950911729, -0.39979931374519451], [0.15897379012575996, -0.50180377622002981]], 
-[[-0.82406624777113491, 0.68978178267237378], [-0.49214098282971119, 0.91663604312644487]], [[0.51961880703793417, 
-0.33271371791298732], [-0.029330613495592406, -0.33267726604768266]], [[-0.44169585496973585, -0.19253039780834591], 
-[-0.86233079085192776, 0.22210644263950541]], [[0.58157093465620235, 0.4651068757348702], [-0.80136699806451972, 
-0.4791116027753044]], [[-0.34358341468322973, 0.97285610062438943], [0.54582634844290179, 
--0.3844491351792334]]])+(1.-msk_arg0)*numpy.array([[[0.43243149290797156, 0.42118817946076303], [-0.18453847901320564, 
--0.66339724486601703]], [[0.44682412774501268, 0.06259230513593339], [-0.85030268678048393, 0.090377810940876158]], 
-[[0.56249810268779799, 0.23332735750156597], [-0.6347229076098917, 0.17946284083046082]], [[-0.44724133701655133, 
--0.98766139526109908], [-0.19160273520718185, 0.37747814250070011]], [[-0.376248630682541, 0.97158262633526449], 
-[0.2983965823325585, -0.33246515396523035]], [[0.79962535603610885, 0.42934691003447378], [0.76478449568109652, 
-0.91637336177037865]]])
-      arg1=numpy.array([[[0.088752584503619891, -0.39447101553511321], [-0.22430239048448097, -0.72298239865701297]], 
-[[-0.39702422374427049, -0.82719309363155413], [-0.88688183257968389, 0.23290068315861734]], [[0.19723100073754174, 
-0.17510622396992837], [-0.75586102931009358, 0.086122900287766813]], [[0.2038452039966705, 0.69127428790485257], 
-[-0.35550974805881208, 0.95332996260066616]], [[0.86443048779177034, -0.38168990310894912], [0.38182538983725678, 
-0.73503462747021775]], [[-0.70625227491884734, -0.12131105742004333], [0.85069828133096981, -0.6433556681341337]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.088752584503619891, -0.39447101553511321], [0.15897379012575996, -0.50180377622002981]], 
-[[-0.39702422374427049, 0.68978178267237378], [-0.49214098282971119, 0.91663604312644487]], [[0.51961880703793417, 
-0.33271371791298732], [-0.029330613495592406, 0.086122900287766813]], [[0.2038452039966705, 0.69127428790485257], 
-[-0.35550974805881208, 0.95332996260066616]], [[0.86443048779177034, 0.4651068757348702], [0.38182538983725678, 
-0.73503462747021775]], [[-0.34358341468322973, 0.97285610062438943], [0.85069828133096981, 
--0.3844491351792334]]])+(1.-msk_ref)*numpy.array([[[0.43243149290797156, 0.42118817946076303], [-0.18453847901320564, 
--0.66339724486601703]], [[0.44682412774501268, 0.06259230513593339], [-0.85030268678048393, 0.23290068315861734]], 
-[[0.56249810268779799, 0.23332735750156597], [-0.6347229076098917, 0.17946284083046082]], [[0.2038452039966705, 
-0.69127428790485257], [-0.19160273520718185, 0.95332996260066616]], [[0.86443048779177034, 0.97158262633526449], 
-[0.38182538983725678, 0.73503462747021775]], [[0.79962535603610885, 0.42934691003447378], [0.85069828133096981, 
-0.91637336177037865]]])
+   def test_generalTensorProduct_constData_rank1_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([6.0, -5.0]),self.functionspace)
+      arg1=Data(numpy.array([2.0, -6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[12.0, -36.0], [-10.0, 30.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.989176914801)+(1.-msk_arg0)*(-0.989986362534)
-      arg1=Data(numpy.array([[[-0.49388719096314349, -0.79623559567830759], [-0.83658541823517818, 0.42072406054838662]], 
-[[-0.48192235106585324, -0.14003155480478036], [0.47407230666875866, 0.95145307875088792]], [[0.81276956345717855, 
-0.54577402893520022], [-0.90122971458194412, -0.58274583646026556]], [[0.85522050991554255, 0.75964838308411031], 
-[0.5778018835429104, -0.76867690348681994]], [[0.15025246865549424, 0.055620041059527336], [-0.54156080230040549, 
--0.63085875592520013]], [[-0.335005199709838, 0.74217379824147822], [-0.61569565476952914, 
--0.23786048005871696]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.49388719096314349, -0.79623559567830759], [-0.83658541823517818, 0.42072406054838662]], 
-[[-0.48192235106585324, -0.14003155480478036], [0.47407230666875866, 0.95145307875088792]], [[0.81276956345717855, 
-0.54577402893520022], [-0.90122971458194412, -0.58274583646026556]], [[0.85522050991554255, 0.75964838308411031], 
-[0.5778018835429104, -0.76867690348681994]], [[0.15025246865549424, 0.055620041059527336], [-0.54156080230040549, 
--0.63085875592520013]], [[-0.335005199709838, 0.74217379824147822], [-0.61569565476952914, 
--0.23786048005871696]]])+(1.-msk_ref)*numpy.array([[[-0.49388719096314349, -0.79623559567830759], [-0.83658541823517818, 
-0.42072406054838662]], [[-0.48192235106585324, -0.14003155480478036], [0.47407230666875866, 0.95145307875088792]], 
-[[0.81276956345717855, 0.54577402893520022], [-0.90122971458194412, -0.58274583646026556]], [[0.85522050991554255, 
-0.75964838308411031], [0.5778018835429104, -0.76867690348681994]], [[0.15025246865549424, 0.055620041059527336], 
-[-0.54156080230040549, -0.63085875592520013]], [[-0.335005199709838, 0.74217379824147822], [-0.61569565476952914, 
--0.23786048005871696]]])
+   def test_generalTensorProduct_constData_rank2_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[7.0, 5.0, 3.0], [-4.0, -5.0, -6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[0.0, -3.0], [-6.0, -3.0], [6.0, -7.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-12.0, -57.0], [-6.0, 69.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.9515053377069429, 0.47807174372932359], [-0.75564278236571569, -0.28735791360983409]], 
-[[0.38398978657266181, 0.81107114048034323], [-0.83362651172912039, -0.7692532587204759]], [[-0.85019914335870261, 
--0.74233731831744643], [0.094460048711824784, 0.88107054995270251]], [[-0.16449632437481898, -0.44322035699164086], 
-[-0.93906847021333362, 0.63056982121743488]], [[-0.15478314379855163, -0.51272224940380906], [-0.90580658840006745, 
--0.088880576181244342]], [[-0.57864595898321425, -0.98961581993571057], [0.69127717551907675, 
-0.12303841555427852]]])+(1.-msk_arg0)*numpy.array([[[0.54991250710512474, 0.75252556510707502], [0.4524255659499381, 
-0.034482370597328282]], [[0.048275902648243552, -0.42803062132180703], [-0.42953608825084499, -0.52649686005029883]], 
-[[0.98434263591531024, 0.045527551414420664], [0.25896487569318261, -0.82768236289669472]], [[0.82974872968024926, 
--0.85936448047482017], [-0.48527758532198395, -0.76833200375575417]], [[0.89349009195765672, -0.19880662446189135], 
-[0.2966368207713177, -0.18896189651548845]], [[0.1803928604184375, -0.82241408231310964], [0.22841835028060076, 
-0.39317537222153964]]])
-      arg1=Data(numpy.array([[[0.68617253474215634, 0.15087223754864798], [-0.10726012723616618, -0.92665009980729041]], 
-[[-0.041620269299473822, 0.015752588101144216], [-0.14427171039873188, -0.42796473013430236]], [[0.11932262149106454, 
-0.64034918365669058], [-0.48270730652849725, 0.053510918018123022]], [[0.33635000832920325, -0.86051716060430916], 
-[-0.70908675709144253, -0.11679411206479129]], [[-0.071763389013920875, 0.16572479797356277], [0.77137834529942251, 
-0.26120416887974818]], [[0.61310060082682982, 0.015920493203621211], [-0.46407909287571503, 
--0.60491137260032635]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.9515053377069429, 0.47807174372932359], [-0.10726012723616618, -0.28735791360983409]], 
-[[0.38398978657266181, 0.81107114048034323], [-0.14427171039873188, -0.42796473013430236]], [[0.11932262149106454, 
-0.64034918365669058], [0.094460048711824784, 0.88107054995270251]], [[0.33635000832920325, -0.44322035699164086], 
-[-0.70908675709144253, 0.63056982121743488]], [[-0.071763389013920875, 0.16572479797356277], [0.77137834529942251, 
-0.26120416887974818]], [[0.61310060082682982, 0.015920493203621211], [0.69127717551907675, 
-0.12303841555427852]]])+(1.-msk_ref)*numpy.array([[[0.68617253474215634, 0.75252556510707502], [0.4524255659499381, 
-0.034482370597328282]], [[0.048275902648243552, 0.015752588101144216], [-0.14427171039873188, -0.42796473013430236]], 
-[[0.98434263591531024, 0.64034918365669058], [0.25896487569318261, 0.053510918018123022]], [[0.82974872968024926, 
--0.85936448047482017], [-0.48527758532198395, -0.11679411206479129]], [[0.89349009195765672, 0.16572479797356277], 
-[0.77137834529942251, 0.26120416887974818]], [[0.61310060082682982, 0.015920493203621211], [0.22841835028060076, 
-0.39317537222153964]]])
+   def test_generalTensorProduct_constData_rank3_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, -6.0, 4.0], [4.0, -6.0, 6.0]], [[4.0, 2.0, -3.0], [-3.0, 0.0, -3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[0.0, -1.0], [-7.0, -1.0], [0.0, 5.0]], [[3.0, 5.0], [-5.0, 4.0], [-6.0, 
+0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[48.0, 29.0], [-5.0, -36.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.293076478313)+(1.-msk_arg0)*(0.415695253254)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.42476097366268384, -0.99781990217086425], [-0.42797078478453088, 0.56788496043163539]], 
-[[0.88356209487076054, -0.21592478018874428], [0.59903633153983038, 0.99453929697875876]], [[-0.4031451864299096, 
--0.78793554032137436], [0.99404205252643041, -0.46900675116702062]], [[-0.35961855333700887, -0.11711382975673645], 
-[0.18349118086242, -0.035040226820079123]], [[-0.67627961022952809, 0.4515888728838664], [0.93565887741312981, 
-0.31169707414443426]], [[0.96128404783088417, -0.8324773748092742], [0.23613968220346138, 
--0.11039468454161838]]])+(1.-msk_arg1)*numpy.array([[[-0.88023059794213743, 0.927763549181158], [-0.83970906479816909, 
-0.79761854094125706]], [[-0.40619318341717858, 0.69914276566700284], [0.44376855556648342, -0.91825223070551631]], 
-[[0.39649333256863528, -0.092930299765284108], [-0.072283891404024025, 0.13436467337237956]], [[0.19751892281774874, 
--0.82813284163388401], [0.6214385672795204, 0.47316992672533109]], [[-0.97549578931282155, -0.50190475490773157], 
-[0.6647972184776747, -0.63181839238397086]], [[-0.16594757687004513, -0.34293676516292471], [0.14039762775702891, 
--0.044223647723118154]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.29307647831298689, -0.29307647831298689], [-0.29307647831298689, 0.56788496043163539]], 
-[[0.88356209487076054, -0.21592478018874428], [0.59903633153983038, 0.99453929697875876]], [[-0.29307647831298689, 
--0.29307647831298689], [0.99404205252643041, -0.29307647831298689]], [[-0.29307647831298689, -0.11711382975673645], 
-[0.18349118086242, -0.035040226820079123]], [[-0.29307647831298689, 0.4515888728838664], [0.93565887741312981, 
-0.31169707414443426]], [[0.96128404783088417, -0.29307647831298689], [0.23613968220346138, 
--0.11039468454161838]]])+(1.-msk_ref)*numpy.array([[[0.41569525325398415, 0.927763549181158], [0.41569525325398415, 
-0.79761854094125706]], [[0.41569525325398415, 0.69914276566700284], [0.44376855556648342, 0.41569525325398415]], 
-[[0.41569525325398415, 0.41569525325398415], [0.41569525325398415, 0.41569525325398415]], [[0.41569525325398415, 
-0.41569525325398415], [0.6214385672795204, 0.47316992672533109]], [[0.41569525325398415, 0.41569525325398415], 
-[0.6647972184776747, 0.41569525325398415]], [[0.41569525325398415, 0.41569525325398415], [0.41569525325398415, 
-0.41569525325398415]]])
+   def test_generalTensorProduct_constData_rank4_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[0.0, 5.0, -5.0], [5.0, 6.0, 4.0], [3.0, -2.0, 0.0], [-3.0, 4.0, 4.0]], [[1.0, 7.0, -1.0], [0.0, 
+-1.0, -5.0], [-2.0, 2.0, -1.0], [-1.0, -3.0, -6.0]]], [[[6.0, -6.0, -6.0], [-5.0, -6.0, 5.0], [-5.0, 3.0, 2.0], [5.0, 1.0, 
+6.0]], [[1.0, -3.0, 0.0], [-3.0, -1.0, 0.0], [-4.0, 0.0, -3.0], [7.0, -4.0, 2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-7.0, -2.0], [-7.0, -3.0], [1.0, 4.0]], [[5.0, -4.0], [5.0, 5.0], [7.0, 1.0]], [[-7.0, 5.0], 
+[-1.0, 3.0], [-1.0, 5.0]], [[2.0, 7.0], [5.0, 5.0], [4.0, -3.0]]], [[[3.0, -4.0], [5.0, -6.0], [-6.0, 4.0]], [[-3.0, 7.0], 
+[-3.0, -2.0], [-6.0, 7.0]], [[1.0, 0.0], [5.0, 0.0], [-1.0, -6.0]], [[5.0, -5.0], [3.0, 0.0], [-3.0, 
+-6.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[144.0, -61.0], [59.0, -41.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank3_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.36130298057679111, -0.72982256164520121], [-0.98427828362689751, -0.71392419224338233]], 
-[[0.0028648066420755569, 0.40593075742981033], [-0.39308624937033798, 0.41173487980367285]], [[0.040429985666669666, 
-0.9956986678939499], [-0.3766616780070684, -0.14800180944610708]], [[-0.34619453852173332, -0.17504597230775909], 
-[0.88567660560918915, -0.74291128943136053]], [[0.03679824663741571, -0.10882953030274356], [0.45259132917204359, 
-0.6036332348120923]], [[-0.74384731565805584, -0.98281302250512592], [-0.97516438572854058, 
--0.43418945070204695]]])+(1.-msk_arg0)*numpy.array([[[-0.56133979475379858, 0.5901398064050758], [0.26863333535059408, 
-0.21622822005148534]], [[-0.014772805904820441, -0.61818138105374354], [0.3201607812914451, -0.16980551408521727]], 
-[[0.65927338717041262, 0.82573021065854024], [-0.9382351948264771, 0.46463417799389251]], [[0.55336804661738448, 
--0.16893054714418709], [-0.45486072472527739, -0.36714074972175692]], [[-0.45180298993654455, -0.029952989308233535], 
-[0.71588478817998147, -0.59014771697946466]], [[0.86344487271841497, -0.66727303798019189], [-0.36584595815879517, 
-0.33547655315459779]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.64224348205869819, 0.049037997241984765], [-0.98116819130903643, 0.94181846056675522]], 
-[[-0.16946566364672533, 0.3705330855361475], [-0.18152511908793034, 0.018261630850941124]], [[0.029393061582448254, 
--0.32804788747238334], [-0.08265934486633153, -0.62626548403291404]], [[-0.81665972655100605, 0.18713502632711143], 
-[0.069041181401869434, -0.012080898549561292]], [[-0.49967653078908558, -0.88780398744026323], [-0.96151630421477496, 
-0.17188541642458732]], [[0.8559946449708169, 0.78065817299993023], [-0.37293727862758685, 
--0.60616899821341486]]])+(1.-msk_arg1)*numpy.array([[[-0.49032583607212854, -0.8136795614509551], [0.89577823564665859, 
-0.79840425740211107]], [[0.41626566605101467, -0.24782501100599741], [-0.59737466766066505, 0.053224551388946217]], 
-[[-0.49418240106620037, -0.014671319634904867], [0.43041860621440775, -0.6139043809851934]], [[-0.70080342153969033, 
-0.3930154267575332], [-0.31944992543072104, -0.82077676018890178]], [[-0.25102242325231439, 0.045813485089310158], 
-[0.89982702067370801, 0.27597754182222012]], [[-0.13163387797868897, 0.50410986652020684], [0.4718132434424589, 
-0.55301018967858151]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.64224348205869819, 0.049037997241984765], [-0.98116819130903643, 0.94181846056675522]], 
-[[0.0028648066420755569, 0.40593075742981033], [-0.18152511908793034, 0.41173487980367285]], [[0.040429985666669666, 
-0.9956986678939499], [-0.08265934486633153, -0.14800180944610708]], [[-0.34619453852173332, 0.18713502632711143], 
-[0.88567660560918915, -0.012080898549561292]], [[0.03679824663741571, -0.10882953030274356], [0.45259132917204359, 
-0.6036332348120923]], [[0.8559946449708169, 0.78065817299993023], [-0.37293727862758685, 
--0.43418945070204695]]])+(1.-msk_ref)*numpy.array([[[-0.49032583607212854, 0.5901398064050758], [0.89577823564665859, 
-0.79840425740211107]], [[0.41626566605101467, -0.24782501100599741], [0.3201607812914451, 0.053224551388946217]], 
-[[0.65927338717041262, 0.82573021065854024], [0.43041860621440775, 0.46463417799389251]], [[0.55336804661738448, 
-0.3930154267575332], [-0.31944992543072104, -0.36714074972175692]], [[-0.25102242325231439, 0.045813485089310158], 
-[0.89982702067370801, 0.27597754182222012]], [[0.86344487271841497, 0.50410986652020684], [0.4718132434424589, 
-0.55301018967858151]]])
+   def test_generalTensorProduct_constData_rank1_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([5.0, -2.0]),self.functionspace)
+      arg1=Data(numpy.array([[0.0, -2.0, 3.0, -7.0, 1.0], [0.0, 1.0, 0.0, -7.0, -7.0], [-1.0, -1.0, 7.0, 0.0, 3.0], [-5.0, 1.0, 
+3.0, 6.0, -4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, -10.0, 15.0, -35.0, 5.0], [0.0, 5.0, 0.0, -35.0, -35.0], [-5.0, -5.0, 35.0, 0.0, 15.0], 
+[-25.0, 5.0, 15.0, 30.0, -20.0]], [[0.0, 4.0, -6.0, 14.0, -2.0], [0.0, -2.0, 0.0, 14.0, 14.0], [2.0, 2.0, -14.0, 0.0, -6.0], 
+[10.0, -2.0, -6.0, -12.0, 8.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_array_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.93122841147)+(1.-msk_arg0)*(0.690664190259)
-      arg1=numpy.array([[[[-0.14129653506270778, -0.057224607125864191, 0.9211833065741597, 0.6473574724937774], 
-[0.79342813565602577, 0.58188727876918134, 0.54967922043088868, -0.86099657295389598], [0.72149005255943988, 
-0.49970954592644179, 0.20671785867262726, -0.70256925121758917]], [[0.30291193430769958, 0.38342882633653308, 
--0.8482847466432486, 0.80705958071323347], [-0.29500788390136612, -0.45682358930611389, 0.42671080439327636, 
-0.82874473369979196], [0.33378375281988304, 0.57146717744436648, 0.71657597252409011, -0.35470560156724984]]], 
-[[[0.64905652148048087, 0.066757786624187521, -0.033149691345921273, -0.09095042959743993], [0.23199263733313469, 
-0.37983826394739206, 0.64154881030545563, -0.51234130039277082], [0.69621394755055732, -0.82794221977727456, 
--0.39538559469645329, -0.1618575046203059]], [[-0.29009671679704652, -0.9022342552920628, 0.81807598072470888, 
--0.13568667169335469], [-0.5503101579327343, 0.5357357653203636, -0.15952645784198238, 0.70807762475485791], 
-[-0.64948567730623208, 0.75852757462222153, -0.3563619745115234, -0.069412219258663477]]], [[[0.80762645906831954, 
-0.34639538845074114, -0.36919251697493238, 0.32457680007810064], [-0.9161626068958062, 0.90565137289941, -0.68875897981177348, 
--0.23023391707486063], [0.12566730654437941, 0.28534019901624386, 0.28644025853864852, -0.36938545264538325]], 
-[[-0.59831408015871768, -0.17176820348331701, 0.54554002636113474, 0.58717693841655438], [-0.67460631161913742, 
--0.53038034535930567, 0.41207107058237002, 0.86424360099095976], [0.84577384964306712, 0.76585183685560199, 
--0.67847345259712255, -0.46920326976603643]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.14129653506270778, -0.057224607125864191, 0.9211833065741597, 0.6473574724937774], 
-[0.79342813565602577, 0.58188727876918134, 0.54967922043088868, -0.86099657295389598], [0.72149005255943988, 
-0.49970954592644179, 0.20671785867262726, -0.70256925121758917]], [[0.30291193430769958, 0.38342882633653308, 
--0.8482847466432486, 0.80705958071323347], [-0.29500788390136612, -0.45682358930611389, 0.42671080439327636, 
-0.82874473369979196], [0.33378375281988304, 0.57146717744436648, 0.71657597252409011, -0.35470560156724984]]], 
-[[[0.64905652148048087, 0.066757786624187521, -0.033149691345921273, -0.09095042959743993], [0.23199263733313469, 
-0.37983826394739206, 0.64154881030545563, -0.51234130039277082], [0.69621394755055732, -0.82794221977727456, 
--0.39538559469645329, -0.1618575046203059]], [[-0.29009671679704652, -0.9022342552920628, 0.81807598072470888, 
--0.13568667169335469], [-0.5503101579327343, 0.5357357653203636, -0.15952645784198238, 0.70807762475485791], 
-[-0.64948567730623208, 0.75852757462222153, -0.3563619745115234, -0.069412219258663477]]], [[[0.80762645906831954, 
-0.34639538845074114, -0.36919251697493238, 0.32457680007810064], [-0.9161626068958062, 0.90565137289941, -0.68875897981177348, 
--0.23023391707486063], [0.12566730654437941, 0.28534019901624386, 0.28644025853864852, -0.36938545264538325]], 
-[[-0.59831408015871768, -0.17176820348331701, 0.54554002636113474, 0.58717693841655438], [-0.67460631161913742, 
--0.53038034535930567, 0.41207107058237002, 0.86424360099095976], [0.84577384964306712, 0.76585183685560199, 
--0.67847345259712255, -0.46920326976603643]]]])+(1.-msk_ref)*numpy.array([[[[0.69066419025918635, 0.69066419025918635, 
-0.9211833065741597, 0.69066419025918635], [0.79342813565602577, 0.69066419025918635, 0.69066419025918635, 0.69066419025918635], 
-[0.72149005255943988, 0.69066419025918635, 0.69066419025918635, 0.69066419025918635]], [[0.69066419025918635, 
-0.69066419025918635, 0.69066419025918635, 0.80705958071323347], [0.69066419025918635, 0.69066419025918635, 0.69066419025918635, 
-0.82874473369979196], [0.69066419025918635, 0.69066419025918635, 0.71657597252409011, 0.69066419025918635]]], 
-[[[0.69066419025918635, 0.69066419025918635, 0.69066419025918635, 0.69066419025918635], [0.69066419025918635, 
-0.69066419025918635, 0.69066419025918635, 0.69066419025918635], [0.69621394755055732, 0.69066419025918635, 0.69066419025918635, 
-0.69066419025918635]], [[0.69066419025918635, 0.69066419025918635, 0.81807598072470888, 0.69066419025918635], 
-[0.69066419025918635, 0.69066419025918635, 0.69066419025918635, 0.70807762475485791], [0.69066419025918635, 
-0.75852757462222153, 0.69066419025918635, 0.69066419025918635]]], [[[0.80762645906831954, 0.69066419025918635, 
-0.69066419025918635, 0.69066419025918635], [0.69066419025918635, 0.90565137289941, 0.69066419025918635, 0.69066419025918635], 
-[0.69066419025918635, 0.69066419025918635, 0.69066419025918635, 0.69066419025918635]], [[0.69066419025918635, 
-0.69066419025918635, 0.69066419025918635, 0.69066419025918635], [0.69066419025918635, 0.69066419025918635, 0.69066419025918635, 
-0.86424360099095976], [0.84577384964306712, 0.76585183685560199, 0.69066419025918635, 0.69066419025918635]]]])
+   def test_generalTensorProduct_constData_rank2_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[0.0, 6.0, -4.0], [-6.0, -6.0, -3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-1.0, -2.0, -1.0, 3.0, 3.0], [0.0, 0.0, 5.0, -2.0, 3.0], [3.0, -6.0, 3.0, 3.0, 6.0], [-2.0, 
+-6.0, 7.0, 5.0, 2.0]], [[0.0, -5.0, -6.0, -7.0, 3.0], [5.0, 5.0, 5.0, -5.0, 4.0], [3.0, 4.0, 2.0, -6.0, -5.0], [1.0, 0.0, -1.0, 
+5.0, -2.0]], [[5.0, 2.0, 6.0, -7.0, -2.0], [0.0, -2.0, -6.0, -5.0, 5.0], [0.0, 0.0, 0.0, -4.0, -5.0], [3.0, 0.0, -4.0, 4.0, 
+3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-20.0, -38.0, -60.0, -14.0, 26.0], [30.0, 38.0, 54.0, -10.0, 4.0], [18.0, 24.0, 12.0, -20.0, 
+-10.0], [-6.0, 0.0, 10.0, 14.0, -24.0]], [[-9.0, 36.0, 24.0, 45.0, -30.0], [-30.0, -24.0, -42.0, 57.0, -57.0], [-36.0, 12.0, 
+-30.0, 30.0, 9.0], [-3.0, 36.0, -24.0, -72.0, -9.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_array_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.44772485229861014, 0.33612133273895872, 0.85463791292335456, 0.041150956342052902], 
-[0.86196525725452178, -0.39230412793663172, -0.55689630426568115, 0.24500138369530022], [0.250440568048236, 
-0.56208355979267344, -0.83931525120237538, -0.89962845216257148]], [[0.93199744061363954, 0.036161545737686263, 
-0.17600123827465097, -0.15644558799055064], [0.51769117284229615, 0.33689820823374972, 0.060403722261924919, 
--0.67401337318561683], [-0.5870077618091023, 0.35549507870374053, -0.91444103477854144, 0.23111635010592591]]], 
-[[[0.30427728778811924, 0.11748924311521702, 0.10481933285039213, -0.33502229131967587], [0.26515755662112572, 
-0.099878676762299445, 0.69816433138192102, -0.98773857616342631], [-0.092028032496626722, -0.70240638229622876, 
-0.71611949446200152, 0.25170319313794276]], [[0.037527545049968802, 0.49361154856116607, 0.62722682321215739, 
--0.87892648689079045], [-0.95341541684169084, -0.010773509314439877, -0.58116207689853905, -0.58140329890782971], 
-[0.27136771093638901, 0.082457582086216341, -0.21110397496607991, -0.29970993820392677]]], [[[-0.22265001693402553, 
-0.94823954643701369, -0.7266026099756171, -0.32353607416408758], [0.53071688333832867, -0.28644943651030919, 
--0.7169950181827689, 0.58843920390628113], [-0.68278304053745997, -0.73191962597309357, 0.83951460129804634, 
--0.28603981175880899]], [[-0.62530509820592028, 0.19163503831394335, 0.71630459577755268, -0.48358514127015995], 
-[0.35290552000196262, 0.42122549901315964, 0.48162879235316169, 0.92685704379160105], [0.21890865144110738, 
--0.69229869309205228, -0.51436410927581733, 0.77525889246393453]]]])+(1.-msk_arg0)*numpy.array([[[[-0.47994795124062661, 
-0.74856862291517623, 0.5821395617608589, -0.31324499648561299], [0.13609834355782402, 0.8651786428977688, -0.22241596237712269, 
-0.59595179741831994], [0.52442180802467986, -0.67755617307904803, 0.041047440148369585, -0.63982185998775787]], 
-[[0.89633393878486145, 0.60528407122761974, 0.087008352545255407, 0.61818598246202194], [-0.82215369326968912, 
--0.17257825389866843, -0.97707914343112701, 0.10612032693135687], [0.54832826138702373, 0.14418882636852293, 
--0.59559456960762192, -0.20767572929860978]]], [[[-0.80347236426212421, -0.91815707719608963, 0.91255277503919396, 
-0.045503228874384849], [0.75467835024620356, 0.25562178283718717, 0.24903527543586712, 0.56502967349932165], 
-[-0.1335888822357898, -0.68279551726839105, 0.43491768196300673, 0.46168510826508036]], [[0.4356763541452715, 
-0.98085251814408414, -0.62755096901235152, -0.78345634103039363], [-0.60500930133859709, 0.56402299324965721, 
-0.59561490314477927, 0.82072216033311784], [0.95001617573414032, 0.20468480993367022, 0.30565824220619442, 
--0.070107462971154888]]], [[[0.23393156511221869, -0.37563984619602975, 0.36378548060529137, 0.43451806931870163], 
-[-0.1642002012922239, -0.54728511822572523, 0.36670201211269826, 0.18918610945368441], [-0.33406116215906256, 
--0.25576174770698823, -0.02020947518693661, 0.87728898366655694]], [[-0.59338050831235423, -0.14657407934408662, 
-0.69570242811712601, 0.36366022997929148], [0.94456195322361602, -0.86212596260553642, 0.5145071925072755, 
--0.61650036986407497], [-0.47495276384029639, -0.9072767739797154, 0.60749045264710033, 0.80404847388366707]]]])
-      arg1=numpy.array([[[[0.12235724577495133, 0.030550102850180449, 0.82361823715408589, -0.47577063319692625], 
-[0.24762255252735432, -0.18117195942957376, 0.78421570529513662, -0.33120166549504804], [-0.31661878366910501, 
-0.050408417654134619, 0.93543377163183949, 0.7138338863269178]], [[0.60609599680976656, -0.18646992543326979, 
-0.032245229491007832, -0.16135181789862751], [-0.2197064057048792, 0.89130327750849525, 0.87528272382646333, 
--0.4054146695562737], [0.34864798718456469, 0.6865288809229968, -0.27667529617816933, 0.0036869563701744656]]], 
-[[[-0.95770828799863805, 0.096015202531622768, -0.60118964454981816, -0.77935740289018307], [0.72274943044452389, 
-0.0073194320184981621, -0.059288992988969946, 0.79201968761767816], [-0.12866704041475518, 0.98722308476263909, 
--0.4127435552309402, 0.90334700524787515]], [[0.46963073206058481, 0.79351354921673289, 0.044478338561507069, 
--0.86621149843666823], [-0.86768077600190563, 0.87895872758421212, -0.68813225933821531, 0.051058982021920718], 
-[-0.6400145105837145, -0.6791315301293348, 0.35602453634758469, -0.40925802590739879]]], [[[0.6864899883695792, 
-0.44223216849695901, -0.89165346027070291, 0.40133713829912065], [0.78750618231061065, -0.013479137470628899, 
-0.6577875955603778, -0.87184650021107624], [-0.69474956775331775, 0.93518928901459675, 0.90966513308817243, 
-0.77851041589827696]], [[-0.50347347741991966, 0.98138043351913606, -0.88658887741951498, 0.89654400325398464], 
-[-0.78549232237218436, -0.34691444129238169, 0.30748561536051167, 0.62508666703593296], [0.44494445035343788, 
--0.87171691786051886, 0.31674335839547196, 0.8800806202145921]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.12235724577495133, 0.33612133273895872, 0.85463791292335456, 0.041150956342052902], 
-[0.86196525725452178, -0.18117195942957376, 0.78421570529513662, 0.24500138369530022], [0.250440568048236, 0.56208355979267344, 
-0.93543377163183949, 0.7138338863269178]], [[0.93199744061363954, 0.036161545737686263, 0.17600123827465097, 
--0.15644558799055064], [0.51769117284229615, 0.89130327750849525, 0.87528272382646333, -0.4054146695562737], 
-[0.34864798718456469, 0.6865288809229968, -0.27667529617816933, 0.23111635010592591]]], [[[0.30427728778811924, 
-0.11748924311521702, 0.10481933285039213, -0.33502229131967587], [0.72274943044452389, 0.099878676762299445, 
-0.69816433138192102, 0.79201968761767816], [-0.092028032496626722, 0.98722308476263909, 0.71611949446200152, 
-0.90334700524787515]], [[0.46963073206058481, 0.79351354921673289, 0.62722682321215739, -0.86621149843666823], 
-[-0.86768077600190563, 0.87895872758421212, -0.58116207689853905, 0.051058982021920718], [0.27136771093638901, 
-0.082457582086216341, 0.35602453634758469, -0.29970993820392677]]], [[[0.6864899883695792, 0.94823954643701369, 
--0.7266026099756171, 0.40133713829912065], [0.78750618231061065, -0.013479137470628899, 0.6577875955603778, 
-0.58843920390628113], [-0.68278304053745997, 0.93518928901459675, 0.90966513308817243, 0.77851041589827696]], 
-[[-0.50347347741991966, 0.98138043351913606, 0.71630459577755268, 0.89654400325398464], [0.35290552000196262, 
-0.42122549901315964, 0.48162879235316169, 0.92685704379160105], [0.44494445035343788, -0.69229869309205228, 
-0.31674335839547196, 0.8800806202145921]]]])+(1.-msk_ref)*numpy.array([[[[0.12235724577495133, 0.74856862291517623, 
-0.82361823715408589, -0.31324499648561299], [0.24762255252735432, 0.8651786428977688, 0.78421570529513662, 
-0.59595179741831994], [0.52442180802467986, 0.050408417654134619, 0.93543377163183949, 0.7138338863269178]], 
-[[0.89633393878486145, 0.60528407122761974, 0.087008352545255407, 0.61818598246202194], [-0.2197064057048792, 
-0.89130327750849525, 0.87528272382646333, 0.10612032693135687], [0.54832826138702373, 0.6865288809229968, -0.27667529617816933, 
-0.0036869563701744656]]], [[[-0.80347236426212421, 0.096015202531622768, 0.91255277503919396, 0.045503228874384849], 
-[0.75467835024620356, 0.25562178283718717, 0.24903527543586712, 0.79201968761767816], [-0.12866704041475518, 
-0.98722308476263909, 0.43491768196300673, 0.90334700524787515]], [[0.46963073206058481, 0.98085251814408414, 
-0.044478338561507069, -0.78345634103039363], [-0.60500930133859709, 0.87895872758421212, 0.59561490314477927, 
-0.82072216033311784], [0.95001617573414032, 0.20468480993367022, 0.35602453634758469, -0.070107462971154888]]], 
-[[[0.6864899883695792, 0.44223216849695901, 0.36378548060529137, 0.43451806931870163], [0.78750618231061065, 
--0.013479137470628899, 0.6577875955603778, 0.18918610945368441], [-0.33406116215906256, 0.93518928901459675, 
-0.90966513308817243, 0.87728898366655694]], [[-0.50347347741991966, 0.98138043351913606, 0.69570242811712601, 
-0.89654400325398464], [0.94456195322361602, -0.34691444129238169, 0.5145071925072755, 0.62508666703593296], 
-[0.44494445035343788, -0.87171691786051886, 0.60749045264710033, 0.8800806202145921]]]])
+   def test_generalTensorProduct_constData_rank3_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-3.0, 4.0, -1.0], [1.0, -7.0, -7.0]], [[2.0, 5.0, 1.0], [0.0, -1.0, -6.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-1.0, -1.0, 0.0, 6.0, 3.0], [-3.0, 4.0, -6.0, 7.0, 3.0], [7.0, -3.0, -4.0, 3.0, 6.0], [0.0, 
+2.0, 0.0, 7.0, -1.0]], [[4.0, -4.0, 2.0, -2.0, -7.0], [1.0, 7.0, 2.0, -6.0, -7.0], [-1.0, 5.0, -1.0, 5.0, -2.0], [-6.0, -6.0, 
+-5.0, -5.0, -2.0]], [[0.0, 7.0, -7.0, 2.0, 7.0], [-3.0, 4.0, 6.0, -5.0, 1.0], [5.0, 6.0, 7.0, -5.0, 5.0], [-3.0, 0.0, 2.0, 
+-3.0, -5.0]]], [[[-6.0, -7.0, 2.0, 6.0, 1.0], [0.0, -1.0, -6.0, -4.0, -2.0], [5.0, -1.0, 6.0, 5.0, -4.0], [-2.0, -1.0, 4.0, 
+-3.0, 0.0]], [[7.0, -1.0, -3.0, 0.0, -4.0], [0.0, -6.0, -6.0, 7.0, 5.0], [1.0, 3.0, 1.0, -2.0, -1.0], [1.0, 6.0, 0.0, 7.0, 
+7.0]], [[-3.0, 6.0, 1.0, -4.0, -7.0], [-6.0, -3.0, 6.0, 7.0, 0.0], [2.0, -3.0, -1.0, -3.0, 4.0], [-7.0, -4.0, -5.0, -6.0, 
+6.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-15.0, -62.0, 31.0, 6.0, 34.0], [58.0, 74.0, 14.0, -142.0, -75.0], [-46.0, 22.0, 7.0, 56.0, 
+-56.0], [19.0, -45.0, 17.0, -48.0, -91.0]], [[29.0, -50.0, 0.0, 28.0, 24.0], [32.0, 71.0, -26.0, -70.0, -33.0], [1.0, 40.0, 
+-1.0, 46.0, -16.0], [8.0, -8.0, 7.0, 15.0, -60.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_constData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.0881956698806)+(1.-msk_arg0)*(-0.731128324845)
-      arg1=Data(numpy.array([[[[-0.64189758046957146, -0.53815399874264136, 0.033693340777282366, 0.99925795797181571], 
-[-0.2419875717107054, -0.50747686174550699, -0.81027767900895475, -0.84877637041813614], [-0.20071783395542631, 
--0.8069228315827619, 0.66582338261558349, 0.64096730572944427]], [[0.81185199455197243, -0.90778080246183657, 
-0.017632995172836674, -0.32090381670185386], [0.13011082833732179, 0.6578464151231187, -0.6959246201621212, 
--0.6545688299236001], [0.14663475574733353, 0.91800376327950861, 0.56376151063798741, -0.96804446803081667]]], 
-[[[-0.0021218076221873883, -0.10724622444534382, 0.38123000588899658, 0.12283867161727002], [0.3563313122155094, 
--0.042825459741448135, -0.39224174048110716, -0.93819757083393496], [-0.56950271363830596, 0.037025945267049831, 
--0.10711115625494805, -0.12244688771221512]], [[0.55557589199957658, 0.95005362115253589, 0.084514241828244518, 
--0.67046064450650178], [0.01747628454518857, 0.18620488628187792, 0.66507212829733886, 0.76247784353876535], 
-[0.37735898180876082, 0.32486295087694095, 0.47501482765124581, 0.52248847470936344]]], [[[0.0036882590128266557, 
-0.8282751649691007, -0.80873751745324807, 0.47849609936161519], [0.39166314221529275, 0.48831283571527884, 
--0.86334428729172585, 0.79143886820146481], [0.83249453703468279, -0.98930182274409639, -0.083316120352270762, 
-0.294221269622853]], [[0.18930386704305269, -0.99776611169212037, 0.14587140405481969, -0.95686905824011759], 
-[-0.15749539134547641, -0.56249207552408076, 0.45265834859712295, -0.46177078880637601], [0.66396367131331657, 
-0.96630757924567945, -0.86681340389547001, 0.6623848566435715]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.088195669880560379, 0.088195669880560379, 0.088195669880560379, 0.99925795797181571], 
-[0.088195669880560379, 0.088195669880560379, 0.088195669880560379, 0.088195669880560379], [0.088195669880560379, 
-0.088195669880560379, 0.66582338261558349, 0.64096730572944427]], [[0.81185199455197243, 0.088195669880560379, 
-0.088195669880560379, 0.088195669880560379], [0.13011082833732179, 0.6578464151231187, 0.088195669880560379, 
-0.088195669880560379], [0.14663475574733353, 0.91800376327950861, 0.56376151063798741, 0.088195669880560379]]], 
-[[[0.088195669880560379, 0.088195669880560379, 0.38123000588899658, 0.12283867161727002], [0.3563313122155094, 
-0.088195669880560379, 0.088195669880560379, 0.088195669880560379], [0.088195669880560379, 0.088195669880560379, 
-0.088195669880560379, 0.088195669880560379]], [[0.55557589199957658, 0.95005362115253589, 0.088195669880560379, 
-0.088195669880560379], [0.088195669880560379, 0.18620488628187792, 0.66507212829733886, 0.76247784353876535], 
-[0.37735898180876082, 0.32486295087694095, 0.47501482765124581, 0.52248847470936344]]], [[[0.088195669880560379, 
-0.8282751649691007, 0.088195669880560379, 0.47849609936161519], [0.39166314221529275, 0.48831283571527884, 
-0.088195669880560379, 0.79143886820146481], [0.83249453703468279, 0.088195669880560379, 0.088195669880560379, 
-0.294221269622853]], [[0.18930386704305269, 0.088195669880560379, 0.14587140405481969, 0.088195669880560379], 
-[0.088195669880560379, 0.088195669880560379, 0.45265834859712295, 0.088195669880560379], [0.66396367131331657, 
-0.96630757924567945, 0.088195669880560379, 0.6623848566435715]]]])+(1.-msk_ref)*numpy.array([[[[-0.64189758046957146, 
--0.53815399874264136, 0.033693340777282366, 0.99925795797181571], [-0.2419875717107054, -0.50747686174550699, 
--0.73112832484494983, -0.73112832484494983], [-0.20071783395542631, -0.73112832484494983, 0.66582338261558349, 
-0.64096730572944427]], [[0.81185199455197243, -0.73112832484494983, 0.017632995172836674, -0.32090381670185386], 
-[0.13011082833732179, 0.6578464151231187, -0.6959246201621212, -0.6545688299236001], [0.14663475574733353, 0.91800376327950861, 
-0.56376151063798741, -0.73112832484494983]]], [[[-0.0021218076221873883, -0.10724622444534382, 0.38123000588899658, 
-0.12283867161727002], [0.3563313122155094, -0.042825459741448135, -0.39224174048110716, -0.73112832484494983], 
-[-0.56950271363830596, 0.037025945267049831, -0.10711115625494805, -0.12244688771221512]], [[0.55557589199957658, 
-0.95005362115253589, 0.084514241828244518, -0.67046064450650178], [0.01747628454518857, 0.18620488628187792, 
-0.66507212829733886, 0.76247784353876535], [0.37735898180876082, 0.32486295087694095, 0.47501482765124581, 
-0.52248847470936344]]], [[[0.0036882590128266557, 0.8282751649691007, -0.73112832484494983, 0.47849609936161519], 
-[0.39166314221529275, 0.48831283571527884, -0.73112832484494983, 0.79143886820146481], [0.83249453703468279, 
--0.73112832484494983, -0.083316120352270762, 0.294221269622853]], [[0.18930386704305269, -0.73112832484494983, 
-0.14587140405481969, -0.73112832484494983], [-0.15749539134547641, -0.56249207552408076, 0.45265834859712295, 
--0.46177078880637601], [0.66396367131331657, 0.96630757924567945, -0.73112832484494983, 0.6623848566435715]]]])
+   def test_generalTensorProduct_constData_rank1_constData_rank3_offset0(self):
+      arg0=Data(numpy.array([6.0, 3.0]),self.functionspace)
+      arg1=Data(numpy.array([[[2.0, 0.0], [0.0, 2.0]], [[4.0, 4.0], [-1.0, 4.0]], [[0.0, 7.0], [3.0, -5.0]], [[-5.0, -7.0], 
+[-6.0, -1.0]], [[5.0, 2.0], [-6.0, 7.0]], [[4.0, 7.0], [0.0, -4.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[12.0, 0.0], [0.0, 12.0]], [[24.0, 24.0], [-6.0, 24.0]], [[0.0, 42.0], [18.0, -30.0]], [[-30.0, 
+-42.0], [-36.0, -6.0]], [[30.0, 12.0], [-36.0, 42.0]], [[24.0, 42.0], [0.0, -24.0]]], [[[6.0, 0.0], [0.0, 6.0]], [[12.0, 12.0], 
+[-3.0, 12.0]], [[0.0, 21.0], [9.0, -15.0]], [[-15.0, -21.0], [-18.0, -3.0]], [[15.0, 6.0], [-18.0, 21.0]], [[12.0, 21.0], [0.0, 
+-12.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_constData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.10531364581559632, -0.26135514113778791, 0.75823435654818261, 0.41913136584038457], 
-[0.43115964993714972, 0.43325049456887954, 0.99798790086677469, 0.12148464100767264], [-0.792314005480238, 0.94449170983715258, 
--0.51282378136184414, 0.78279449919260413]], [[-0.256730957467878, -0.54685067746437355, 0.13799031452254362, 
-0.54420562233980974], [0.79271302319406733, 0.61289153297761811, 0.22488152217118107, 0.38057207678407945], 
-[-0.58355124854227669, 0.33339550351240987, -0.45440247482861396, -0.32858088081907244]]], [[[0.42804301050211202, 
-0.71528000472301367, -0.29947441761599003, -0.65907060023841413], [0.21382369966318948, -0.23392820079386456, 
-0.1149254861227258, 0.26438763174771629], [0.54292796867386128, 0.93595972935560612, 0.63111118015829226, 
--0.48720925111434954]], [[-0.64752714499820963, 0.23062867134246989, -0.44111125359638725, 0.87281600565752915], 
-[0.17646081091253429, 0.16503304920470341, -0.76446719475275016, -0.9496673356542491], [0.81402347205529568, 
--0.7279756234241106, 0.32595508977473875, 0.78908310868157816]]], [[[-0.7994446077113897, 0.54116981041814904, 
--0.29869702018833433, -0.60523743501453087], [-0.46193843131786938, -0.87737364655870431, -0.53149381910526228, 
-0.32118149490277959], [0.88124482945730831, 0.76961174010593836, -0.51624564499591163, 0.46112358500778217]], 
-[[-0.72956420221936336, -0.49297722281654144, -0.93821464396887477, 0.6257868729024445], [-0.22970749405216329, 
--0.44455529448948572, 0.85363272062066464, 0.84754506932043783], [-0.66852456480381584, 0.79050538702573658, 
-0.32041213027833426, 0.036833079887540254]]]])+(1.-msk_arg0)*numpy.array([[[[-0.19914272243996511, -0.22066958304650086, 
--0.051623157097562489, -0.30649365550154917], [0.70526559900670605, 0.79190691746271002, -0.1840028427567888, 
-0.11449103902153879], [-0.5924052950405061, 0.3079650735182351, -0.9438123347143772, -0.065661960754274995]], 
-[[-0.0036167079524380696, 0.84054224471953476, -0.53140279065734641, 0.35467617149678676], [0.29362960794600701, 
--0.14052271099644154, 0.1293556777292062, 0.45589620449734247], [0.45309220884092505, 0.070251984236403331, 
--0.79210333449212667, 0.10845805646166129]]], [[[0.30350245072854709, -0.61792951212226188, -0.98924055757045237, 
-0.75886074238090151], [0.19835957943587212, -0.32993508643372804, -0.81430829784396175, 0.67280893395841113], 
-[-0.23121853491576294, 0.53086442636291209, -0.63883554946929699, 0.17420740192224771]], [[0.89221420493213976, 
--0.2045207552720627, -0.20771044164770736, 0.42648308785419431], [0.87113955270066956, 0.24540728624391916, 
--0.45094960000767226, -0.16188150623057007], [-0.45960021467049605, -0.95157979026703687, -0.82635297970091592, 
--0.97341062097802844]]], [[[0.48800175644884614, -0.50576269437461963, -0.17133398261855226, -0.72602653879188628], 
-[-0.85605984598767382, -0.58287114441973764, 0.005984177454671169, 0.26177073655897831], [0.64181206014940528, 
-0.87931494110685526, 0.78403977073172282, 0.024419280675760158]], [[-0.68551675053970906, 0.14152572212171521, 
--0.77906301525452615, -0.12878542896599199], [0.33305465516919974, 0.0082682574899826111, -0.39785724636599062, 
-0.047898579856563428], [-0.84404774609808642, 0.67721243023535527, -0.59693854720693174, -0.37505322327010027]]]])
-      arg1=Data(numpy.array([[[[-0.82759551572398471, 0.058473671021340712, -0.10837091814903643, 0.57740785960292684], 
-[0.27913511962597259, 0.0011338106694573913, 0.0009601979643438785, -0.04802408596147334], [0.92688524933994465, 
-0.78439774647519878, -0.31909062602360128, 0.72602592282456158]], [[0.94140041851607315, 0.94570499934150676, 
-0.26198355391860817, 0.3065174789316123], [-0.48677124302537544, -0.85999326805316434, -0.99216619030997077, 
--0.083870140182316755], [-0.26968066595677942, -0.028588804387562616, 0.57648293580256471, 0.70249263700215847]]], 
-[[[-0.59432588710527101, -0.015338113227458816, -0.67625911560986385, 0.87073185203582937], [0.26418569454285712, 
-0.76837073130429445, 0.32369932417835279, 0.14645995660195821], [-0.50777857923006087, 0.27528983484000102, 
-0.57195763489050599, 0.75155872411421054]], [[0.30020184045055109, -0.83179186646902536, 0.66761313528171162, 
-0.93305194275955561], [-0.44456663805664576, 0.55650037021524135, 0.62058565622477313, -0.61150812573877777], 
-[-0.31226647099785221, 0.14513696705524182, 0.68032486017657678, -0.22086700354642508]]], [[[0.66284368284982187, 
-0.61236796493579271, 0.43440212926366417, 0.083118805833193532], [-0.85956397424801834, -0.10084123824854152, 
-0.67438359152521032, 0.85048470938007048], [0.66201451496804764, -0.61354777895468482, -0.80926632689236633, 
-0.8510794761665228]], [[-0.73695063130269212, 0.44757527421684307, 0.68262028916181294, 0.10862811437247544], 
-[0.65035504442237335, -0.49416276490023092, 0.99800064674598987, -0.91779706704154007], [-0.69460250652998123, 
-0.81518826983336323, 0.33775413898516593, -0.57214687266614961]]]]),self.functionspace)
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.10531364581559632, 0.058473671021340712, 0.75823435654818261, 0.57740785960292684], 
-[0.43115964993714972, 0.43325049456887954, 0.99798790086677469, 0.12148464100767264], [0.92688524933994465, 
-0.94449170983715258, -0.31909062602360128, 0.78279449919260413]], [[0.94140041851607315, 0.94570499934150676, 
-0.26198355391860817, 0.54420562233980974], [0.79271302319406733, 0.61289153297761811, 0.22488152217118107, 
-0.38057207678407945], [-0.26968066595677942, 0.33339550351240987, 0.57648293580256471, 0.70249263700215847]]], 
-[[[0.42804301050211202, 0.71528000472301367, -0.29947441761599003, 0.87073185203582937], [0.26418569454285712, 
-0.76837073130429445, 0.32369932417835279, 0.26438763174771629], [0.54292796867386128, 0.93595972935560612, 0.63111118015829226, 
-0.75155872411421054]], [[0.30020184045055109, 0.23062867134246989, 0.66761313528171162, 0.93305194275955561], 
-[0.17646081091253429, 0.55650037021524135, 0.62058565622477313, -0.61150812573877777], [0.81402347205529568, 
-0.14513696705524182, 0.68032486017657678, 0.78908310868157816]]], [[[0.66284368284982187, 0.61236796493579271, 
-0.43440212926366417, 0.083118805833193532], [-0.46193843131786938, -0.10084123824854152, 0.67438359152521032, 
-0.85048470938007048], [0.88124482945730831, 0.76961174010593836, -0.51624564499591163, 0.8510794761665228]], 
-[[-0.72956420221936336, 0.44757527421684307, 0.68262028916181294, 0.6257868729024445], [0.65035504442237335, 
--0.44455529448948572, 0.99800064674598987, 0.84754506932043783], [-0.66852456480381584, 0.81518826983336323, 
-0.33775413898516593, 0.036833079887540254]]]])+(1.-msk_ref)*numpy.array([[[[-0.19914272243996511, 0.058473671021340712, 
--0.051623157097562489, 0.57740785960292684], [0.70526559900670605, 0.79190691746271002, 0.0009601979643438785, 
-0.11449103902153879], [0.92688524933994465, 0.78439774647519878, -0.31909062602360128, 0.72602592282456158]], 
-[[0.94140041851607315, 0.94570499934150676, 0.26198355391860817, 0.35467617149678676], [0.29362960794600701, 
--0.14052271099644154, 0.1293556777292062, 0.45589620449734247], [0.45309220884092505, 0.070251984236403331, 
-0.57648293580256471, 0.70249263700215847]]], [[[0.30350245072854709, -0.015338113227458816, -0.67625911560986385, 
-0.87073185203582937], [0.26418569454285712, 0.76837073130429445, 0.32369932417835279, 0.67280893395841113], 
-[-0.23121853491576294, 0.53086442636291209, 0.57195763489050599, 0.75155872411421054]], [[0.89221420493213976, 
--0.2045207552720627, 0.66761313528171162, 0.93305194275955561], [0.87113955270066956, 0.55650037021524135, 0.62058565622477313, 
--0.16188150623057007], [-0.31226647099785221, 0.14513696705524182, 0.68032486017657678, -0.22086700354642508]]], 
-[[[0.66284368284982187, 0.61236796493579271, 0.43440212926366417, 0.083118805833193532], [-0.85605984598767382, 
--0.10084123824854152, 0.67438359152521032, 0.85048470938007048], [0.66201451496804764, 0.87931494110685526, 
-0.78403977073172282, 0.8510794761665228]], [[-0.68551675053970906, 0.44757527421684307, 0.68262028916181294, 
-0.10862811437247544], [0.65035504442237335, 0.0082682574899826111, 0.99800064674598987, 0.047898579856563428], 
-[-0.69460250652998123, 0.81518826983336323, 0.33775413898516593, -0.37505322327010027]]]])
+   def test_generalTensorProduct_constData_rank2_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([[3.0, -3.0, 0.0], [-6.0, -7.0, 6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-2.0, 7.0], [-6.0, -3.0]], [[4.0, -4.0], [3.0, 4.0]], [[4.0, -6.0], [5.0, 4.0]], [[-7.0, 3.0], 
+[2.0, 6.0]], [[-3.0, 3.0], [0.0, -2.0]], [[-7.0, -7.0], [4.0, 2.0]]], [[[4.0, 7.0], [-3.0, -1.0]], [[-1.0, -5.0], [0.0, 6.0]], 
+[[2.0, 5.0], [4.0, 6.0]], [[0.0, 2.0], [-3.0, -1.0]], [[4.0, -1.0], [-6.0, -3.0]], [[-6.0, -7.0], [-3.0, 1.0]]], [[[0.0, 5.0], 
+[4.0, 1.0]], [[0.0, -3.0], [1.0, 7.0]], [[3.0, 4.0], [-1.0, 4.0]], [[4.0, 7.0], [2.0, 4.0]], [[4.0, 1.0], [-7.0, -7.0]], 
+[[-6.0, -1.0], [-2.0, 0.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-18.0, 0.0], [-9.0, -6.0]], [[15.0, 3.0], [9.0, -6.0]], [[6.0, -33.0], [3.0, -6.0]], [[-21.0, 
+3.0], [15.0, 21.0]], [[-21.0, 12.0], [18.0, 3.0]], [[-3.0, 0.0], [21.0, 3.0]]], [[[-16.0, -61.0], [81.0, 31.0]], [[-17.0, 
+41.0], [-12.0, -24.0]], [[-20.0, 25.0], [-64.0, -42.0]], [[66.0, 10.0], [21.0, -5.0]], [[14.0, -5.0], [0.0, -9.0]], [[48.0, 
+85.0], [-15.0, -19.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank0_expandedData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.430656784848)+(1.-msk_arg0)*(-0.700783789461)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.68835738514383604, -0.76863401076143667, 0.92032350741511615, -0.1469001502609133], 
-[0.06288453409673278, 0.38073779065461522, -0.90058807506723526, 0.38778286232709025], [0.96668256007501041, 
-0.057601266285067343, 0.79648117729052714, 0.49143175520310778]], [[0.98909339096938509, 0.7602637867878832, 
--0.912321941323607, -0.54315061194825787], [0.80423923526891117, 0.47661901140330509, 0.99031475342531228, 
--0.89450136434961736], [-0.36910767598659655, 0.55360242758997402, -0.24636032220916326, 0.013256286221418945]]], 
-[[[0.15603828628588978, -0.70571626749096739, -0.22412221738086946, -0.44778376773528183], [0.83165578331141399, 
-0.65163198519388876, 0.6039897710150941, -0.3822861567244713], [0.31330097532750978, -0.81103293228454709, 0.17174182343570354, 
--0.035823123408156521]], [[0.62310089072276864, 0.54271156487897554, 0.44186419167763291, 0.22536200856774924], 
-[0.81691779953483756, 0.97875287193551719, -0.10259001428076586, 0.99985268669145078], [-0.6545383935440594, 
--0.91966644139989562, 0.54410275610147973, -0.25257465340702723]]], [[[0.22718370645623831, -0.8974233572367345, 
--0.75452612517607376, -0.58709992502677699], [-0.063069442929713171, -0.2742728542659314, 0.0030934546784433525, 
-0.88865344687736392], [-0.28059615259505599, -0.38818143127085736, -0.26036533554867081, -0.91372878625635412]], 
-[[-0.19770833412921429, -0.2520416533993588, -0.32329826656736227, -0.2921042427795626], [-0.77757026759743275, 
-0.19691427600790279, -0.82662487726058442, 0.76440912595714972], [-0.8785601665435594, 0.6685997731242812, 0.17858501472408173, 
--0.072430031752663382]]]])+(1.-msk_arg1)*numpy.array([[[[0.218050144488529, -0.97758051946393643, 0.850873231285731, 
--0.62549319560829364], [0.64439251587171076, 0.02043882543426645, -0.40088447997559573, 0.32825901856835582], 
-[0.40086412906080149, 0.44806775103789498, 0.7575462104983206, -0.71189398852218688]], [[-0.47405190774543682, 
--0.13001057892794665, -0.51504190270399475, 0.35420972217429236], [-0.83399490871466253, 0.0058345121935481359, 
-0.14938712239679286, 0.94294724195590929], [0.52941947608322826, 0.92556345140725682, -0.88319470923943211, 
-0.76396950935303654]]], [[[0.89036261550337015, 0.87671711452257739, 0.25741308722544365, 0.62226771243047474], 
-[-0.015121664468682905, 0.93979205811046596, -0.71174182978124589, 0.97248180642636251], [-0.64050451914857787, 
--0.61134599587804939, -0.9143086087295571, -0.10806644675596133]], [[0.21434619581078618, 0.85410384206731016, 
--0.051783648108333358, 0.80705842847270559], [0.059772809014316586, 0.63262662785196522, 0.16149018829346895, 
--0.34656541265527929], [-0.88512172547595824, -0.86523726523371947, -0.82269875427618322, -0.72165361398578187]]], 
-[[[0.93903641427310136, 0.28209257258291887, -0.51351863703745515, 0.68881576173912262], [-0.19081765518314353, 
--0.044663078887927421, 0.065339976778740816, 0.97860023971151544], [0.065270643177932852, 0.84667221338805354, 
-0.015860276910488746, -0.23037023584540139]], [[0.56220085723088831, 0.2868468697603257, 0.73939367184777383, 
-0.48844672936175515], [-0.54331103170726092, -0.55778174945812209, -0.95425197901750436, 0.59928943529546808], 
-[0.79804805060136541, 0.64738539292254482, 0.47278529075708753, -0.84128123298524726]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.68835738514383604, -0.43065678484805492, 0.92032350741511615, -0.1469001502609133], 
-[0.06288453409673278, 0.38073779065461522, -0.43065678484805492, 0.38778286232709025], [0.96668256007501041, 
-0.057601266285067343, 0.79648117729052714, 0.49143175520310778]], [[0.98909339096938509, 0.7602637867878832, 
--0.43065678484805492, -0.43065678484805492], [0.80423923526891117, 0.47661901140330509, 0.99031475342531228, 
--0.43065678484805492], [-0.36910767598659655, 0.55360242758997402, -0.24636032220916326, 0.013256286221418945]]], 
-[[[0.15603828628588978, -0.43065678484805492, -0.22412221738086946, -0.43065678484805492], [0.83165578331141399, 
-0.65163198519388876, 0.6039897710150941, -0.3822861567244713], [0.31330097532750978, -0.43065678484805492, 0.17174182343570354, 
--0.035823123408156521]], [[0.62310089072276864, 0.54271156487897554, 0.44186419167763291, 0.22536200856774924], 
-[0.81691779953483756, 0.97875287193551719, -0.10259001428076586, 0.99985268669145078], [-0.43065678484805492, 
--0.43065678484805492, 0.54410275610147973, -0.25257465340702723]]], [[[0.22718370645623831, -0.43065678484805492, 
--0.43065678484805492, -0.43065678484805492], [-0.063069442929713171, -0.2742728542659314, 0.0030934546784433525, 
-0.88865344687736392], [-0.28059615259505599, -0.38818143127085736, -0.26036533554867081, -0.43065678484805492]], 
-[[-0.19770833412921429, -0.2520416533993588, -0.32329826656736227, -0.2921042427795626], [-0.43065678484805492, 
-0.19691427600790279, -0.43065678484805492, 0.76440912595714972], [-0.43065678484805492, 0.6685997731242812, 
-0.17858501472408173, -0.072430031752663382]]]])+(1.-msk_ref)*numpy.array([[[[0.218050144488529, -0.70078378946110842, 
-0.850873231285731, -0.62549319560829364], [0.64439251587171076, 0.02043882543426645, -0.40088447997559573, 
-0.32825901856835582], [0.40086412906080149, 0.44806775103789498, 0.7575462104983206, -0.70078378946110842]], 
-[[-0.47405190774543682, -0.13001057892794665, -0.51504190270399475, 0.35420972217429236], [-0.70078378946110842, 
-0.0058345121935481359, 0.14938712239679286, 0.94294724195590929], [0.52941947608322826, 0.92556345140725682, 
--0.70078378946110842, 0.76396950935303654]]], [[[0.89036261550337015, 0.87671711452257739, 0.25741308722544365, 
-0.62226771243047474], [-0.015121664468682905, 0.93979205811046596, -0.70078378946110842, 0.97248180642636251], 
-[-0.64050451914857787, -0.61134599587804939, -0.70078378946110842, -0.10806644675596133]], [[0.21434619581078618, 
-0.85410384206731016, -0.051783648108333358, 0.80705842847270559], [0.059772809014316586, 0.63262662785196522, 
-0.16149018829346895, -0.34656541265527929], [-0.70078378946110842, -0.70078378946110842, -0.70078378946110842, 
--0.70078378946110842]]], [[[0.93903641427310136, 0.28209257258291887, -0.51351863703745515, 0.68881576173912262], 
-[-0.19081765518314353, -0.044663078887927421, 0.065339976778740816, 0.97860023971151544], [0.065270643177932852, 
-0.84667221338805354, 0.015860276910488746, -0.23037023584540139]], [[0.56220085723088831, 0.2868468697603257, 
-0.73939367184777383, 0.48844672936175515], [-0.54331103170726092, -0.55778174945812209, -0.70078378946110842, 
-0.59928943529546808], [0.79804805060136541, 0.64738539292254482, 0.47278529075708753, -0.70078378946110842]]]])
+   def test_generalTensorProduct_constData_rank1_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([2.0, 1.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-6.0, -3.0])+(1.-msk_ref)*numpy.array([14.0, 7.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_maximum_expandedData_rank4_expandedData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.56285787359423467, 0.37775535632450929, -0.3363819504506349, -0.39614224287220079], 
-[-0.65956942938945873, -0.050567052731754325, -0.54905395376446253, -0.94001597388873392], [-0.78068340465775754, 
--0.89097864337441868, -0.83984842944522442, 0.74631234877918584]], [[0.08573606948206014, 0.55431246693940839, 
--0.8641772485747512, -0.42863009943253139], [0.80323187807206664, -0.74856933876086118, -0.01644211276713814, 
--0.91644648328349509], [0.40224351184954954, -0.91717203862964691, -0.84862948625343493, -0.25037544559678815]]], 
-[[[0.82728992326268469, -0.95042129406079257, -0.93015204068307433, -0.28209813227511105], [-0.51972916795137514, 
-0.74506459052200502, -0.58415751918737313, -0.72089184286465779], [0.70832242911523857, 0.32910818999400115, 
-0.51617654973055238, 0.88129235546352791]], [[0.58177700099759, 0.63909107674454901, 0.86508533718829983, 
--0.45384546311830021], [0.34909094815239139, -0.85407855551520706, -0.83626668667446791, -0.19144948150684948], 
-[-0.54080937187207279, -0.29228298836204991, 0.073340450796397505, -0.39919385201564572]]], [[[-0.35454323448815428, 
-0.78785581682131256, -0.37407581640252885, -0.9491936944611421], [-0.90501286696617278, 0.69422301523334684, 
-0.080299003664048518, -0.10604345961307726], [0.37557752598770766, -0.11425319383355337, 0.43620438053394817, 
--0.63938084921875493]], [[-0.6542747934342823, -0.77225386259596918, -0.30885873461055691, -0.93491787154442219], 
-[0.44906982794974248, 0.47078393816377861, -0.53577916133628367, 0.57388498777390184], [0.53885977209128866, 
-0.79843035696797116, 0.29270123507386536, 0.76740426807290363]]]])+(1.-msk_arg0)*numpy.array([[[[-0.89333258741389199, 
-0.57101135857695096, 0.82736606705903304, -0.55893684971502733], [-0.92021692928061039, -0.55348474011111159, 
-0.29566092180536008, -0.13507617727452992], [0.13917734283523964, -0.83620085111886411, 0.23398407194295245, 
-0.31146881246574765]], [[-0.029507824602079902, 0.1574243100965087, 0.31486576471582972, -0.95685787951979218], 
-[-0.48899322354200181, -0.94149220476950357, -0.24568012939396544, -0.15845295863431397], [0.29158080714097045, 
-0.23100712186933658, 0.7981595934007133, 0.38286456647335521]]], [[[0.61716197962362473, -0.45981943122067626, 
-0.77169576646882287, -0.61914888379614541], [0.85941618082643645, 0.3953325518632147, -0.071709454511042603, 
--0.16346196683480119], [-0.27195889282127017, 0.640204102093195, 0.36381437568430219, -0.23698452461448793]], 
-[[-0.19651750243903776, -0.85806312069582069, -0.16697127876879536, -0.13043639826490505], [0.30397572395834271, 
--0.72931842874315134, -0.042718535847001471, 0.29178523953544122], [-0.26391565154853391, -0.45797052486847045, 
--0.31300470368371225, -0.25426548079345146]]], [[[0.25564008776185876, -0.33973920939409541, -0.42791398656409929, 
--0.52664151938223003], [-0.10999100193161926, -0.29629666691577783, -0.40782973073033224, -0.7964414558802948], 
-[0.76976134456727685, -0.91549509332347023, 0.72186262412866609, -0.56773143000653792]], [[-0.42862609106683847, 
--0.35583358749489524, 0.87176384608629998, -0.6521142543462386], [0.067116251967670904, 0.48376703343805683, 
--0.38447080115823962, -0.52461174025121959], [0.95864693409401736, -0.18283658347090248, 0.65543503798526181, 
-0.34294213784697214]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.91334699106125039, 0.08034469059439342, 0.95336683070903305, -0.30302709745042145], 
-[0.67698272338736065, -0.081495809822069276, -0.96880332310388173, -0.65951169314669], [0.14645181982635735, 
-0.95081750997466497, 0.070403435387265789, 0.86128470750091801]], [[0.31458850366898372, 0.37355625042636609, 
-0.59835306604159055, -0.55972405824577054], [0.58982641275618297, -0.92890562173951086, -0.30083832088441054, 
-0.89547691587223865], [-0.63027121919601004, -0.64536171128018927, 0.24414107153983289, 0.87244828606233771]]], 
-[[[-0.89466900572920127, 0.5598293778988026, -0.89619884347773127, -0.88632252361082808], [-0.43917654443748066, 
--0.26084937566420874, 0.085241904688784231, 0.91415146709412731], [0.21564731418211958, 0.48337780597622526, 
-0.19274924619906364, 0.68742605559501802]], [[-0.52271461311172263, 0.86796787718622181, 0.60388060730113802, 
-0.59164210921511518], [0.06016452677678541, -0.69422396793023222, -0.94949047918679574, -0.023652022509516479], 
-[0.47311564439251907, -0.83556354001059763, 0.30169446600775252, -0.41514884541574859]]], [[[0.94784819259638442, 
--0.96878672195987425, 0.41736597890415839, -0.54187648571449287], [0.087381032350053456, 0.45323520162423536, 
-0.04915039358163531, 0.44902577072276673], [-0.36295093024222025, -0.3956861841715571, -0.26069456297899429, 
-0.96853061131817464]], [[0.11413660171644269, -0.36860481482212748, -0.65069198361079228, 0.46860889975506259], 
-[-0.96249981724552258, -0.64237067775573453, -0.20746509600546581, -0.41040214652163631], [-0.38498880402659741, 
-0.97133351909870091, -0.20699459203726933, 0.52388252445004002]]]])+(1.-msk_arg1)*numpy.array([[[[0.59326071032227223, 
--0.80869719454086364, 0.94238621327406347, -0.84308193696275091], [0.70828574326935856, 0.91353233044236459, 
--0.15648092096926169, 0.18059659161430264], [-0.37080639325253117, -0.096042972458373566, -0.50397349081083131, 
-0.90885407233921245]], [[-0.36356977188789052, 0.07834805962528657, -0.50427040211387508, -0.17978606506745876], 
-[0.0037874599835847622, 0.5356158232271877, -0.95158338448852087, 0.77887517249080407], [-0.97788888695396725, 
-0.025164090720837473, 0.61062564247754847, 0.50036684617541782]]], [[[-0.51188738745996476, -0.56019687946102437, 
-0.5290236210334176, -0.59831305037402949], [0.16156648393526041, 0.013553898362512085, 0.47562501938041502, 
-0.88759773681313248], [0.8561694563853337, 0.60259960885555874, -0.082171173450925172, 0.63858906210461575]], 
-[[-0.46713128615175425, -0.055061913628714487, -0.26470592863123388, 0.12914283139830651], [0.30407054362431873, 
--0.51481475425475165, -0.61454326667132175, -0.83597993953409167], [-0.361452844057218, -0.14442685496647223, 
-0.78922625506892952, -0.60792243592735828]]], [[[-0.49703903944354133, 0.095413976577233273, 0.16265112247299029, 
-0.61673952395802845], [-0.88844924670122549, -0.36852319019343116, 0.90935427930023738, -0.29773383810366583], 
-[-0.80667363405005532, -0.16023550925636854, 0.40614983587173814, -0.81931798357574137]], [[0.75510295592173726, 
--0.43123287953825495, 0.70147960136393661, 0.14788978483969961], [-0.23220064658101736, 0.5689017497000739, 
-0.012773766156810806, 0.088171873737747708], [-0.67756995292205335, -0.43998855003188519, 0.96781348177706006, 
-0.8176918424069477]]]])
-      res=maximum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.56285787359423467, 0.37775535632450929, 0.95336683070903305, -0.30302709745042145], 
-[0.67698272338736065, -0.050567052731754325, -0.54905395376446253, -0.65951169314669], [0.14645181982635735, 
-0.95081750997466497, 0.070403435387265789, 0.86128470750091801]], [[0.31458850366898372, 0.55431246693940839, 
-0.59835306604159055, -0.42863009943253139], [0.80323187807206664, -0.74856933876086118, -0.01644211276713814, 
-0.89547691587223865], [0.40224351184954954, -0.64536171128018927, 0.24414107153983289, 0.87244828606233771]]], 
-[[[0.82728992326268469, 0.5598293778988026, -0.89619884347773127, -0.28209813227511105], [-0.43917654443748066, 
-0.74506459052200502, 0.085241904688784231, 0.91415146709412731], [0.70832242911523857, 0.48337780597622526, 
-0.51617654973055238, 0.88129235546352791]], [[0.58177700099759, 0.86796787718622181, 0.86508533718829983, 0.59164210921511518], 
-[0.34909094815239139, -0.69422396793023222, -0.83626668667446791, -0.023652022509516479], [0.47311564439251907, 
--0.29228298836204991, 0.30169446600775252, -0.39919385201564572]]], [[[0.94784819259638442, 0.78785581682131256, 
-0.41736597890415839, -0.54187648571449287], [0.087381032350053456, 0.69422301523334684, 0.080299003664048518, 
-0.44902577072276673], [0.37557752598770766, -0.11425319383355337, 0.43620438053394817, 0.96853061131817464]], 
-[[0.11413660171644269, -0.36860481482212748, -0.30885873461055691, 0.46860889975506259], [0.44906982794974248, 
-0.47078393816377861, -0.20746509600546581, 0.57388498777390184], [0.53885977209128866, 0.97133351909870091, 
-0.29270123507386536, 0.76740426807290363]]]])+(1.-msk_ref)*numpy.array([[[[0.59326071032227223, 0.57101135857695096, 
-0.94238621327406347, -0.55893684971502733], [0.70828574326935856, 0.91353233044236459, 0.29566092180536008, 
-0.18059659161430264], [0.13917734283523964, -0.096042972458373566, 0.23398407194295245, 0.90885407233921245]], 
-[[-0.029507824602079902, 0.1574243100965087, 0.31486576471582972, -0.17978606506745876], [0.0037874599835847622, 
-0.5356158232271877, -0.24568012939396544, 0.77887517249080407], [0.29158080714097045, 0.23100712186933658, 0.7981595934007133, 
-0.50036684617541782]]], [[[0.61716197962362473, -0.45981943122067626, 0.77169576646882287, -0.59831305037402949], 
-[0.85941618082643645, 0.3953325518632147, 0.47562501938041502, 0.88759773681313248], [0.8561694563853337, 0.640204102093195, 
-0.36381437568430219, 0.63858906210461575]], [[-0.19651750243903776, -0.055061913628714487, -0.16697127876879536, 
-0.12914283139830651], [0.30407054362431873, -0.51481475425475165, -0.042718535847001471, 0.29178523953544122], 
-[-0.26391565154853391, -0.14442685496647223, 0.78922625506892952, -0.25426548079345146]]], [[[0.25564008776185876, 
-0.095413976577233273, 0.16265112247299029, 0.61673952395802845], [-0.10999100193161926, -0.29629666691577783, 
-0.90935427930023738, -0.29773383810366583], [0.76976134456727685, -0.16023550925636854, 0.72186262412866609, 
--0.56773143000653792]], [[0.75510295592173726, -0.35583358749489524, 0.87176384608629998, 0.14788978483969961], 
-[0.067116251967670904, 0.5689017497000739, 0.012773766156810806, 0.088171873737747708], [0.95864693409401736, 
--0.18283658347090248, 0.96781348177706006, 0.8176918424069477]]]])
+   def test_generalTensorProduct_constData_rank2_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[6.0, -6.0, 1.0], [-3.0, 2.0, -2.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([1.0, 5.0, -3.0])+(1.-msk_arg1)*numpy.array([5.0, 6.0, -4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-27.0, 13.0])+(1.-msk_ref)*numpy.array([-10.0, 5.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_float_rank0(self):
-      arg0=0.576130683834
-      arg1=0.412116338185
-      res=minimum(arg0,arg1)
-      ref=0.412116338185
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_array_rank0(self):
-      arg0=0.289003350398
-      arg1=numpy.array(-0.445379036457)
-      res=minimum(arg0,arg1)
-      ref=numpy.array(-0.445379036457)
-      if isinstance(res,numpy.ndarray):
-         self.assertEqual(res.shape,(),"wrong shape of result.")
-      else:
-         self.assertTrue(isinstance(res,float),"wrong type of result.")
+   def test_generalTensorProduct_constData_rank3_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[7.0, 0.0, -7.0], [7.0, 0.0, -3.0]], [[4.0, 6.0, 3.0], [0.0, 0.0, -7.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-3.0, 6.0, -4.0], [0.0, 4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 2.0, -1.0], [4.0, -1.0, 
+-3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-5.0, -16.0])+(1.-msk_ref)*numpy.array([16.0, 14.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_constData_rank0(self):
-      arg0=0.371238578658
-      arg1=Data(-0.645135030501,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(-0.645135030501,self.functionspace)
+   def test_generalTensorProduct_constData_rank4_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[5.0, -2.0, 4.0], [-1.0, 2.0, 3.0], [-5.0, 4.0, 6.0], [-2.0, 1.0, 4.0]], [[-5.0, 1.0, -4.0], 
+[-2.0, -7.0, 1.0], [7.0, 0.0, -7.0], [6.0, 0.0, 0.0]]], [[[-3.0, 0.0, 6.0], [0.0, -4.0, 5.0], [2.0, 1.0, 5.0], [0.0, 1.0, 
+3.0]], [[-7.0, -4.0, -4.0], [7.0, -3.0, -3.0], [-2.0, -3.0, 0.0], [-1.0, -6.0, -3.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-4.0, 4.0, 6.0], [-3.0, 2.0, -4.0], [-3.0, 6.0, 1.0], [-7.0, -6.0, 3.0]], [[-5.0, 7.0, 
+-6.0], [-5.0, 3.0, -6.0], [-2.0, 5.0, -5.0], [0.0, -3.0, -2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -2.0, -2.0], [1.0, 3.0, 
+6.0], [-7.0, -3.0, 0.0], [0.0, 7.0, 1.0]], [[3.0, 2.0, 3.0], [-5.0, 4.0, -7.0], [0.0, -4.0, -7.0], [-5.0, -5.0, 7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([116.0, 46.0])+(1.-msk_ref)*numpy.array([27.0, -45.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_expandedData_rank0(self):
-      arg0=-0.911968300013
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.806502526946)+(1.-msk_arg1)*(-0.438461765499)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.911968300013)+(1.-msk_ref)*(-0.911968300013)
+   def test_generalTensorProduct_constData_rank1_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-7.0, -3.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-3.0, -5.0])+(1.-msk_arg1)*numpy.array([-2.0, -3.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[21.0, 35.0], [9.0, 15.0]])+(1.-msk_ref)*numpy.array([[14.0, 21.0], [6.0, 9.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_array_rank1(self):
-      arg0=-0.819071116627
-      arg1=numpy.array([0.31932661296889409, -0.069005867155198297])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([-0.81907111662704235, -0.81907111662704235])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank2_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[0.0, 3.0, 4.0], [-5.0, -6.0, 1.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, 0.0], [6.0, 1.0], [-3.0, 0.0]])+(1.-msk_arg1)*numpy.array([[6.0, 3.0], [6.0, -6.0], 
+[-5.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[6.0, 3.0], [-4.0, -6.0]])+(1.-msk_ref)*numpy.array([[-2.0, 6.0], [-71.0, 27.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_constData_rank1(self):
-      arg0=-0.968249647669
-      arg1=Data(numpy.array([-0.52214145626118125, -0.58128985653909826]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.96824964766889465, -0.96824964766889465]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[6.0, 3.0, 2.0], [-7.0, -2.0, 7.0]], [[-6.0, -4.0, -7.0], [3.0, 6.0, 2.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -3.0], [1.0, 2.0], [7.0, 5.0]], [[0.0, -1.0], [-7.0, 4.0], [-4.0, 
+5.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -5.0], [1.0, 0.0], [2.0, 4.0]], [[-5.0, 6.0], [-6.0, -5.0], [0.0, -4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[3.0, 32.0], [-103.0, 6.0]])+(1.-msk_ref)*numpy.array([[48.0, -82.0], [-63.0, -18.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_expandedData_rank1(self):
-      arg0=0.925021455714
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.51802917099944845, -0.73552775153957839])+(1.-msk_arg1)*numpy.array([0.94684306680258179, 
-0.90506150125803431])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.51802917099944845, -0.73552775153957839])+(1.-msk_ref)*numpy.array([0.92502145571355165, 
-0.90506150125803431])
+   def test_generalTensorProduct_constData_rank4_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-7.0, 6.0, -7.0], [0.0, 2.0, 6.0], [0.0, -2.0, 0.0], [6.0, 6.0, 7.0]], [[-4.0, 6.0, -4.0], 
+[6.0, 0.0, -2.0], [7.0, -2.0, 0.0], [0.0, 7.0, -3.0]]], [[[3.0, -2.0, 5.0], [-6.0, -7.0, -5.0], [-6.0, -6.0, 7.0], [6.0, 4.0, 
+-5.0]], [[-3.0, -7.0, 0.0], [6.0, -5.0, -7.0], [1.0, 2.0, 1.0], [4.0, 0.0, -7.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-2.0, 0.0], [6.0, 4.0], [-7.0, -2.0]], [[6.0, 2.0], [5.0, -2.0], [-3.0, -5.0]], [[-6.0, 
+2.0], [-4.0, -6.0], [5.0, -2.0]], [[2.0, -4.0], [3.0, 6.0], [0.0, 5.0]]], [[[6.0, -2.0], [1.0, 1.0], [-3.0, -3.0]], [[3.0, 
+-4.0], [3.0, 4.0], [-2.0, -3.0]], [[-5.0, 2.0], [-2.0, 3.0], [-5.0, 7.0]], [[4.0, 2.0], [2.0, -2.0], [-7.0, 
+6.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -5.0], [3.0, 0.0], [-3.0, -7.0]], [[-3.0, 7.0], [1.0, -6.0], [1.0, 1.0]], [[-4.0, 
+3.0], [0.0, 1.0], [5.0, -3.0]], [[-1.0, 3.0], [-4.0, 2.0], [-7.0, 1.0]]], [[[3.0, 0.0], [0.0, -3.0], [-6.0, 7.0]], [[-1.0, 
+3.0], [-3.0, 7.0], [-3.0, -2.0]], [[7.0, -2.0], [0.0, 4.0], [6.0, -5.0]], [[-1.0, -5.0], [0.0, -7.0], [2.0, -5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[149.0, 47.0], [53.0, -49.0]])+(1.-msk_ref)*numpy.array([[-19.0, 33.0], [91.0, -45.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_array_rank2(self):
-      arg0=0.478671800384
-      arg1=numpy.array([[0.90441638908409461, 0.65105243799339574, 0.55757907837341425, 0.96796203872288622, 
-0.65429378508429648], [-0.9839204249726301, -0.074489762658563885, 0.60404519273294666, -0.49171021040278884, 
--0.96236949107971359], [-0.34775021026631392, 0.03117292968711971, -0.12859207137734652, 0.82761350470691464, 
--0.47178241252823083], [0.34614973425604645, 0.54814360606236878, 0.73720876600461183, 0.76149194774572737, 
-0.22429834323918452]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[0.47867180038398538, 0.47867180038398538, 0.47867180038398538, 0.47867180038398538, 
-0.47867180038398538], [-0.9839204249726301, -0.074489762658563885, 0.47867180038398538, -0.49171021040278884, 
--0.96236949107971359], [-0.34775021026631392, 0.03117292968711971, -0.12859207137734652, 0.47867180038398538, 
--0.47178241252823083], [0.34614973425604645, 0.47867180038398538, 0.47867180038398538, 0.47867180038398538, 
-0.22429834323918452]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank1_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([2.0, 5.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[4.0, 3.0, 3.0, 4.0, -1.0], [5.0, -3.0, 1.0, -3.0, -2.0], [0.0, -7.0, -7.0, 2.0, -4.0], [-1.0, 
+-3.0, -2.0, -3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-5.0, 0.0, -1.0, 6.0, 0.0], [1.0, 3.0, -4.0, 3.0, 4.0], [0.0, 6.0, -1.0, 
+6.0, 5.0], [-2.0, -4.0, 0.0, 2.0, 4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[8.0, 6.0, 6.0, 8.0, -2.0], [10.0, -6.0, 2.0, -6.0, -4.0], [0.0, -14.0, -14.0, 4.0, -8.0], 
+[-2.0, -6.0, -4.0, -6.0, -8.0]], [[20.0, 15.0, 15.0, 20.0, -5.0], [25.0, -15.0, 5.0, -15.0, -10.0], [0.0, -35.0, -35.0, 10.0, 
+-20.0], [-5.0, -15.0, -10.0, -15.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 0.0, -2.0, 12.0, 0.0], [2.0, 6.0, -8.0, 6.0, 
+8.0], [0.0, 12.0, -2.0, 12.0, 10.0], [-4.0, -8.0, 0.0, 4.0, 8.0]], [[-25.0, 0.0, -5.0, 30.0, 0.0], [5.0, 15.0, -20.0, 15.0, 
+20.0], [0.0, 30.0, -5.0, 30.0, 25.0], [-10.0, -20.0, 0.0, 10.0, 20.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_constData_rank2(self):
-      arg0=-0.720838996247
-      arg1=Data(numpy.array([[-0.3194234988515039, 0.61804206873773371, 0.38173572485452434, 0.83348152044490842, 
-0.62513540816554869], [-0.8843675267723512, 0.47081586165207501, -0.8954880719672702, 0.87135071329587555, 
-0.45445544130117765], [0.45909558655893501, -0.2196943692231903, -0.84367859877127671, -0.8839183602265086, 
-0.57583179655742933], [0.70220506269758887, -0.96222604760788122, -0.73678170743805582, -0.49608249020194473, 
--0.80887113413205292]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.7208389962473174, -0.7208389962473174, -0.7208389962473174, -0.7208389962473174, 
--0.7208389962473174], [-0.8843675267723512, -0.7208389962473174, -0.8954880719672702, -0.7208389962473174, 
--0.7208389962473174], [-0.7208389962473174, -0.7208389962473174, -0.84367859877127671, -0.8839183602265086, 
--0.7208389962473174], [-0.7208389962473174, -0.96222604760788122, -0.73678170743805582, -0.7208389962473174, 
--0.80887113413205292]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_expandedData_rank2(self):
-      arg0=0.495699222644
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.49930708441927374, 0.7877563342214875, 0.18718421840595245, 0.28640212239203855, 
--0.098555309394831481], [0.13795575274883176, -0.40917614030441851, 0.32903723135509, -0.38623631617861931, 
-0.029402757771769261], [-0.96910292054156155, -0.56109509853717054, -0.10246680739939507, 0.3287515340044147, 
-0.17887298858214229], [-0.81089405837278794, 0.042371551758132675, -0.51600300197393367, -0.55464369981571227, 
--0.47783840203259986]])+(1.-msk_arg1)*numpy.array([[-0.051685226236429349, -0.13272660137191084, 0.78576887405219753, 
--0.7748999659405067, 0.14209476128681842], [0.84845388952803136, -0.26771507129818128, 0.04001228027127457, 
--0.65756325918272207, 0.83341994005464581], [0.69877677820696116, -0.34424091482753227, -0.33461693696891515, 
--0.77592869887258065, 0.065093052535560192], [0.93191889936701977, -0.88228320287439876, 0.96359621418279051, 
--0.61215698455214462, 0.57613852010423794]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.4956992226436987, 0.4956992226436987, 0.18718421840595245, 0.28640212239203855, 
--0.098555309394831481], [0.13795575274883176, -0.40917614030441851, 0.32903723135509, -0.38623631617861931, 
-0.029402757771769261], [-0.96910292054156155, -0.56109509853717054, -0.10246680739939507, 0.3287515340044147, 
-0.17887298858214229], [-0.81089405837278794, 0.042371551758132675, -0.51600300197393367, -0.55464369981571227, 
--0.47783840203259986]])+(1.-msk_ref)*numpy.array([[-0.051685226236429349, -0.13272660137191084, 0.4956992226436987, 
--0.7748999659405067, 0.14209476128681842], [0.4956992226436987, -0.26771507129818128, 0.04001228027127457, 
--0.65756325918272207, 0.4956992226436987], [0.4956992226436987, -0.34424091482753227, -0.33461693696891515, 
--0.77592869887258065, 0.065093052535560192], [0.4956992226436987, -0.88228320287439876, 0.4956992226436987, 
--0.61215698455214462, 0.4956992226436987]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_array_rank3(self):
-      arg0=0.637928830253
-      arg1=numpy.array([[[-0.35653583772730757, 0.61571708422109794], [0.07350669790974762, 0.61876388475252808]], 
-[[-0.053463270495726967, 0.83419890725283885], [-0.96099905287190679, -0.80575372226068542]], [[0.24300609133706175, 
-0.2756588695642721], [-0.87654405373062816, -0.3200825567458685]], [[-0.34218532069750118, -0.4170463384581613], 
-[0.53608434420038287, -0.26824412326699676]], [[0.56718420178173146, -0.75344847265520709], [0.4436615786631195, 
--0.52972537223344784]], [[-0.75515269605520174, 0.50931856772376993], [-0.84961959248176089, 0.02703055814068378]]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[-0.35653583772730757, 0.61571708422109794], [0.07350669790974762, 0.61876388475252808]], 
-[[-0.053463270495726967, 0.63792883025270131], [-0.96099905287190679, -0.80575372226068542]], [[0.24300609133706175, 
-0.2756588695642721], [-0.87654405373062816, -0.3200825567458685]], [[-0.34218532069750118, -0.4170463384581613], 
-[0.53608434420038287, -0.26824412326699676]], [[0.56718420178173146, -0.75344847265520709], [0.4436615786631195, 
--0.52972537223344784]], [[-0.75515269605520174, 0.50931856772376993], [-0.84961959248176089, 0.02703055814068378]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank2_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[2.0, 2.0, -6.0], [2.0, -5.0, 0.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[4.0, -4.0, 6.0, 5.0, 5.0], [4.0, -1.0, 3.0, -4.0, 3.0], [-4.0, 2.0, -7.0, -5.0, -7.0], [3.0, 
+-3.0, 1.0, 3.0, 0.0]], [[7.0, -1.0, 6.0, 1.0, 4.0], [4.0, 7.0, -5.0, -1.0, 3.0], [4.0, -7.0, -6.0, 7.0, -1.0], [-2.0, -3.0, 
+4.0, 2.0, 0.0]], [[-4.0, 4.0, 2.0, -4.0, 0.0], [7.0, 7.0, -7.0, -7.0, -2.0], [0.0, 5.0, -6.0, 2.0, -3.0], [-7.0, -6.0, -2.0, 
+-1.0, -5.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, -4.0, 6.0, 3.0, 3.0], [-3.0, 1.0, 6.0, -5.0, 5.0], [-4.0, 5.0, -1.0, 2.0, 
+7.0], [-5.0, 2.0, 3.0, 0.0, 0.0]], [[-6.0, 0.0, -5.0, -2.0, 5.0], [3.0, -1.0, -3.0, 6.0, -2.0], [0.0, 1.0, -1.0, 3.0, 7.0], 
+[-2.0, -4.0, 7.0, -7.0, 2.0]], [[-4.0, 3.0, -5.0, 3.0, 6.0], [-3.0, -7.0, 2.0, -1.0, 1.0], [2.0, -5.0, -2.0, 0.0, -5.0], [-5.0, 
+-6.0, 6.0, 2.0, -1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[46.0, -34.0, 12.0, 36.0, 18.0], [-26.0, -30.0, 38.0, 32.0, 24.0], [0.0, -40.0, 10.0, -8.0, 
+2.0], [44.0, 24.0, 22.0, 16.0, 30.0]], [[-27.0, -3.0, -18.0, 5.0, -10.0], [-12.0, -37.0, 31.0, -3.0, -9.0], [-28.0, 39.0, 16.0, 
+-45.0, -9.0], [16.0, 9.0, -18.0, -4.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[4.0, -26.0, 32.0, -16.0, -20.0], [18.0, 42.0, -6.0, 
+8.0, 0.0], [-20.0, 42.0, 8.0, 10.0, 58.0], [16.0, 32.0, -16.0, -26.0, 10.0]], [[22.0, -8.0, 37.0, 16.0, -19.0], [-21.0, 7.0, 
+27.0, -40.0, 20.0], [-8.0, 5.0, 3.0, -11.0, -21.0], [0.0, 24.0, -29.0, 35.0, -10.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_constData_rank3(self):
-      arg0=-0.310043459727
-      arg1=Data(numpy.array([[[0.38697328105644235, 0.70221233643550196], [0.34544746758392653, -0.11055874729875126]], 
-[[0.42778446857838048, -0.8880788764748333], [0.73132093952186783, 0.8033154117025938]], [[-0.5661335107684673, 
-0.49843795591687612], [0.22595639372635068, 0.044169583330319506]], [[-0.9124201688421103, 0.67544031532457383], 
-[0.25484397741761766, 0.047857857156642147]], [[0.91698387844722751, -0.63314665729291408], [-0.56451465364624975, 
-0.97099413120842981]], [[-0.96623694702119445, -0.36559666676379576], [0.48002112676354947, 
--0.49901854944236645]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.31004345972712621, -0.31004345972712621], [-0.31004345972712621, -0.31004345972712621]], 
-[[-0.31004345972712621, -0.8880788764748333], [-0.31004345972712621, -0.31004345972712621]], [[-0.5661335107684673, 
--0.31004345972712621], [-0.31004345972712621, -0.31004345972712621]], [[-0.9124201688421103, -0.31004345972712621], 
-[-0.31004345972712621, -0.31004345972712621]], [[-0.31004345972712621, -0.63314665729291408], [-0.56451465364624975, 
--0.31004345972712621]], [[-0.96623694702119445, -0.36559666676379576], [-0.31004345972712621, 
--0.49901854944236645]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, 0.0, -6.0], [-5.0, 1.0, 3.0]], [[6.0, 6.0, -4.0], [5.0, 5.0, 3.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[6.0, -7.0, 2.0, 0.0, 1.0], [0.0, 2.0, 7.0, -2.0, -3.0], [4.0, -4.0, 5.0, 7.0, 5.0], [1.0, 
+0.0, 4.0, -5.0, -1.0]], [[3.0, -3.0, -2.0, 2.0, 4.0], [7.0, -2.0, 6.0, -2.0, -5.0], [4.0, 6.0, -7.0, 6.0, -4.0], [4.0, -6.0, 
+-2.0, -6.0, 5.0]], [[6.0, -5.0, 6.0, -4.0, -5.0], [-6.0, -6.0, -4.0, 3.0, 4.0], [2.0, -6.0, 6.0, -3.0, -2.0], [-3.0, -3.0, 0.0, 
+3.0, 5.0]]], [[[-1.0, 0.0, -3.0, -5.0, 7.0], [3.0, -1.0, -2.0, -2.0, 7.0], [2.0, -3.0, -1.0, 5.0, -7.0], [-7.0, -4.0, -4.0, 
+2.0, 6.0]], [[0.0, 2.0, -3.0, -2.0, -2.0], [-4.0, -4.0, -2.0, -4.0, -1.0], [7.0, 7.0, -2.0, 4.0, 3.0], [1.0, -4.0, 7.0, -7.0, 
+2.0]], [[6.0, 6.0, -6.0, -5.0, 0.0], [5.0, 1.0, -4.0, 3.0, 1.0], [-7.0, 0.0, 4.0, 0.0, -5.0], [5.0, -4.0, 5.0, -4.0, 
+6.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, -5.0, -2.0, -1.0, 0.0], [-5.0, -2.0, -3.0, 4.0, -2.0], [7.0, 0.0, 3.0, -2.0, 5.0], 
+[-2.0, 1.0, 3.0, 0.0, 1.0]], [[6.0, 7.0, 6.0, -7.0, 0.0], [3.0, -1.0, 7.0, 0.0, -1.0], [2.0, 6.0, 5.0, 3.0, 1.0], [4.0, -3.0, 
+-4.0, -3.0, -4.0]], [[-5.0, 4.0, 7.0, 0.0, -2.0], [-7.0, 0.0, 5.0, 3.0, 6.0], [0.0, 0.0, -5.0, 2.0, 4.0], [0.0, 5.0, 0.0, 1.0, 
+-4.0]]], [[[4.0, 3.0, 6.0, 0.0, 6.0], [-7.0, -4.0, 1.0, -4.0, 4.0], [-5.0, -1.0, -5.0, 1.0, 2.0], [0.0, -1.0, -2.0, -3.0, 
+-5.0]], [[0.0, 7.0, 5.0, -7.0, -6.0], [-7.0, -4.0, 0.0, -4.0, -1.0], [-3.0, -1.0, 0.0, 0.0, 7.0], [-4.0, -7.0, 7.0, -7.0, 
+5.0]], [[-7.0, -1.0, -3.0, -3.0, 0.0], [5.0, 1.0, 6.0, 7.0, -3.0], [-5.0, -5.0, -1.0, -4.0, 1.0], [5.0, 3.0, -6.0, 0.0, 
+-6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-55.0, 99.0, -56.0, 32.0, -14.0], [32.0, 26.0, -29.0, 11.0, -36.0], [-64.0, 86.0, -56.0, 
+-52.0, 0.0], [62.0, 22.0, 14.0, -12.0, -33.0]], [[43.0, -12.0, -72.0, -22.0, 75.0], [76.0, 2.0, 62.0, -57.0, -31.0], [64.0, 
+56.0, -39.0, 135.0, -21.0], [27.0, -76.0, 42.0, -115.0, 62.0]]])+(1.-msk_ref)*numpy.array([[[-60.0, 0.0, -62.0, -9.0, -24.0], 
+[120.0, 33.0, 4.0, -9.0, -52.0], [-42.0, -11.0, 31.0, -15.0, -59.0], [25.0, -30.0, -22.0, 2.0, 29.0]], [[97.0, 43.0, 42.0, 
+-92.0, 8.0], [-39.0, -55.0, 27.0, -7.0, -36.0], [-1.0, 11.0, 40.0, -9.0, 68.0], [7.0, -63.0, 1.0, -72.0, -20.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_expandedData_rank3(self):
-      arg0=0.180877844009
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.72765769710886885, -0.77950756222280115], [-0.76657464297493383, 0.26360833458842103]], 
-[[-0.63889942876567685, -0.96415887226926067], [0.40819049952211262, 0.53747956489837434]], [[-0.17320920691384134, 
--0.66907140584029845], [0.12483196580198208, -0.70507661237760755]], [[0.071507590554227729, 0.062086896243514822], 
-[-0.37700203793464682, -0.06698451825887064]], [[0.99908694441096602, -0.49471711706132759], [-0.25036019181025893, 
-0.69865642814709528]], [[-0.47164774628773198, 0.19617691072048715], [-0.50986442038570967, 
-0.18436333118518289]]])+(1.-msk_arg1)*numpy.array([[[0.10851375096232618, -0.13477534514489853], [0.18640776317948937, 
--0.18353749086282534]], [[0.64663017185804406, 0.25612468253827858], [-0.64860384050774189, -0.26232530692787082]], 
-[[0.51631302366268272, 0.74589200206144768], [0.2374091871954056, 0.055785511654019571]], [[-0.8453176382142269, 
--0.10030284644757259], [-0.56959526008388495, 0.13512355223289974]], [[0.99581050667376392, 0.48594409950935535], 
-[-0.92853699670508494, -0.8971336427464387]], [[0.69034433856458577, 0.14940275380447643], [-0.23670374220161006, 
-0.79042782527452959]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.72765769710886885, -0.77950756222280115], [-0.76657464297493383, 0.18087784400928597]], 
-[[-0.63889942876567685, -0.96415887226926067], [0.18087784400928597, 0.18087784400928597]], [[-0.17320920691384134, 
--0.66907140584029845], [0.12483196580198208, -0.70507661237760755]], [[0.071507590554227729, 0.062086896243514822], 
-[-0.37700203793464682, -0.06698451825887064]], [[0.18087784400928597, -0.49471711706132759], [-0.25036019181025893, 
-0.18087784400928597]], [[-0.47164774628773198, 0.18087784400928597], [-0.50986442038570967, 
-0.18087784400928597]]])+(1.-msk_ref)*numpy.array([[[0.10851375096232618, -0.13477534514489853], [0.18087784400928597, 
--0.18353749086282534]], [[0.18087784400928597, 0.18087784400928597], [-0.64860384050774189, -0.26232530692787082]], 
-[[0.18087784400928597, 0.18087784400928597], [0.18087784400928597, 0.055785511654019571]], [[-0.8453176382142269, 
--0.10030284644757259], [-0.56959526008388495, 0.13512355223289974]], [[0.18087784400928597, 0.18087784400928597], 
-[-0.92853699670508494, -0.8971336427464387]], [[0.18087784400928597, 0.14940275380447643], [-0.23670374220161006, 
-0.18087784400928597]]])
+   def test_generalTensorProduct_constData_rank1_expandedData_rank3_offset0(self):
+      arg0=Data(numpy.array([7.0, 7.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, -6.0], [-2.0, -2.0]], [[4.0, 6.0], [-1.0, -3.0]], [[-3.0, -1.0], [1.0, 6.0]], [[0.0, 
+3.0], [7.0, 5.0]], [[-7.0, -7.0], [4.0, 4.0]], [[-5.0, -3.0], [7.0, 5.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -6.0], [4.0, 
+5.0]], [[-5.0, 3.0], [-2.0, 0.0]], [[0.0, -7.0], [-7.0, 3.0]], [[0.0, 3.0], [-5.0, -4.0]], [[-6.0, 6.0], [2.0, 0.0]], [[-6.0, 
+3.0], [-2.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[21.0, -42.0], [-14.0, -14.0]], [[28.0, 42.0], [-7.0, -21.0]], [[-21.0, -7.0], [7.0, 42.0]], 
+[[0.0, 21.0], [49.0, 35.0]], [[-49.0, -49.0], [28.0, 28.0]], [[-35.0, -21.0], [49.0, 35.0]]], [[[21.0, -42.0], [-14.0, -14.0]], 
+[[28.0, 42.0], [-7.0, -21.0]], [[-21.0, -7.0], [7.0, 42.0]], [[0.0, 21.0], [49.0, 35.0]], [[-49.0, -49.0], [28.0, 28.0]], 
+[[-35.0, -21.0], [49.0, 35.0]]]])+(1.-msk_ref)*numpy.array([[[[-35.0, -42.0], [28.0, 35.0]], [[-35.0, 21.0], [-14.0, 0.0]], 
+[[0.0, -49.0], [-49.0, 21.0]], [[0.0, 21.0], [-35.0, -28.0]], [[-42.0, 42.0], [14.0, 0.0]], [[-42.0, 21.0], [-14.0, 0.0]]], 
+[[[-35.0, -42.0], [28.0, 35.0]], [[-35.0, 21.0], [-14.0, 0.0]], [[0.0, -49.0], [-49.0, 21.0]], [[0.0, 21.0], [-35.0, -28.0]], 
+[[-42.0, 42.0], [14.0, 0.0]], [[-42.0, 21.0], [-14.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_array_rank4(self):
-      arg0=-0.603085006827
-      arg1=numpy.array([[[[-0.70607704048865649, -0.56029094543871594, 0.2759474860161828, -0.41979392009896799], 
-[-0.75548953091054183, 0.40511972963574361, 0.71460850587655478, 0.27090479688119151], [-0.061794010531437848, 
--0.0015136391740222521, -0.30206698891426353, 0.013381419945716289]], [[0.31994705777693921, 0.47258343222484944, 
-0.37643022651957669, 0.85194373648799337], [0.45941386337903189, -0.45892812095380631, 0.41582039496693923, 
-0.21413609093107877], [-0.0060070961090430419, 0.51567534162223505, 0.51312188502507339, -0.68845438476518916]]], 
-[[[-0.42927693241618514, -0.87617183460935077, 0.75076927409777072, -0.55153508970034371], [-0.44024321061727245, 
--0.83467085878218961, -0.39572065240267684, 0.13922892068583947], [0.9347261071909736, 0.2983629795170144, 0.35380597203291431, 
-0.96801563109079991]], [[0.52944817085309537, -0.029814060272752352, -0.055395760818877315, -0.11553414997981881], 
-[-0.72927205003089735, 0.14151430463091752, 0.26469336301284674, -0.84290814078559761], [0.53244003607890944, 
-0.56077533799253754, -0.54463232950117257, -0.49240028005267633]]], [[[0.5938398944802763, -0.98169089874803594, 
--0.44777749260327093, -0.99372717001525279], [0.61554748714269025, -0.99945790763342135, -0.9487593851596996, 
--0.26853211882521277], [0.59884043432358047, 0.62939900229019474, 0.12091425374976561, -0.16087608097193984]], 
-[[-0.48710949684942784, 0.52733606804478717, -0.5988443576649074, 0.60717746327021271], [-0.6025481691604162, 
-0.59859173620695305, 0.72649190091814697, 0.44926682636298154], [0.04851453171235165, -0.9672918515015474, -0.230126974255626, 
-0.82817952796288097]]]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[[-0.70607704048865649, -0.60308500682709254, -0.60308500682709254, -0.60308500682709254], 
-[-0.75548953091054183, -0.60308500682709254, -0.60308500682709254, -0.60308500682709254], [-0.60308500682709254, 
--0.60308500682709254, -0.60308500682709254, -0.60308500682709254]], [[-0.60308500682709254, -0.60308500682709254, 
--0.60308500682709254, -0.60308500682709254], [-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, 
--0.60308500682709254], [-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, -0.68845438476518916]]], 
-[[[-0.60308500682709254, -0.87617183460935077, -0.60308500682709254, -0.60308500682709254], [-0.60308500682709254, 
--0.83467085878218961, -0.60308500682709254, -0.60308500682709254], [-0.60308500682709254, -0.60308500682709254, 
--0.60308500682709254, -0.60308500682709254]], [[-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, 
--0.60308500682709254], [-0.72927205003089735, -0.60308500682709254, -0.60308500682709254, -0.84290814078559761], 
-[-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, -0.60308500682709254]]], [[[-0.60308500682709254, 
--0.98169089874803594, -0.60308500682709254, -0.99372717001525279], [-0.60308500682709254, -0.99945790763342135, 
--0.9487593851596996, -0.60308500682709254], [-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, 
--0.60308500682709254]], [[-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, -0.60308500682709254], 
-[-0.60308500682709254, -0.60308500682709254, -0.60308500682709254, -0.60308500682709254], [-0.60308500682709254, 
--0.9672918515015474, -0.60308500682709254, -0.60308500682709254]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank2_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[-1.0, 7.0, -2.0], [-4.0, -2.0, -5.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-2.0, -2.0], [3.0, 6.0]], [[5.0, 2.0], [3.0, -4.0]], [[6.0, -1.0], [-5.0, -4.0]], [[6.0, 
+0.0], [0.0, 0.0]], [[-4.0, 0.0], [4.0, 5.0]], [[0.0, -1.0], [-4.0, 0.0]]], [[[4.0, 6.0], [6.0, 1.0]], [[-4.0, 2.0], [-5.0, 
+2.0]], [[-3.0, 6.0], [0.0, 0.0]], [[-1.0, -2.0], [-5.0, -4.0]], [[-1.0, -3.0], [5.0, 0.0]], [[-7.0, -4.0], [5.0, -1.0]]], 
+[[[-1.0, 6.0], [-2.0, -6.0]], [[-2.0, 0.0], [-4.0, -3.0]], [[6.0, -2.0], [2.0, -3.0]], [[6.0, 1.0], [-5.0, -3.0]], [[6.0, 0.0], 
+[0.0, 2.0]], [[6.0, -2.0], [0.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -6.0], [6.0, 7.0]], [[5.0, -3.0], [-7.0, -2.0]], 
+[[0.0, -1.0], [-5.0, -2.0]], [[-5.0, 0.0], [-3.0, -5.0]], [[7.0, -3.0], [3.0, 1.0]], [[2.0, 5.0], [2.0, 3.0]]], [[[2.0, -3.0], 
+[-6.0, 5.0]], [[7.0, -4.0], [6.0, -4.0]], [[6.0, -5.0], [4.0, 0.0]], [[6.0, 3.0], [-2.0, -1.0]], [[6.0, 5.0], [-4.0, -6.0]], 
+[[7.0, 2.0], [-6.0, -2.0]]], [[[5.0, -3.0], [0.0, 4.0]], [[-7.0, 0.0], [1.0, 2.0]], [[-4.0, -6.0], [-3.0, 0.0]], [[5.0, -5.0], 
+[2.0, 7.0]], [[-2.0, 7.0], [5.0, -7.0]], [[-6.0, -7.0], [-4.0, 1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[32.0, 32.0], [43.0, 13.0]], [[-29.0, 12.0], [-30.0, 24.0]], [[-39.0, 47.0], [1.0, 10.0]], 
+[[-25.0, -16.0], [-25.0, -22.0]], [[-15.0, -21.0], [31.0, -9.0]], [[-61.0, -23.0], [39.0, -7.0]]], [[[5.0, -34.0], [-14.0, 
+4.0]], [[-2.0, -12.0], [18.0, 27.0]], [[-48.0, 2.0], [10.0, 31.0]], [[-52.0, -1.0], [35.0, 23.0]], [[-12.0, 6.0], [-26.0, 
+-30.0]], [[-16.0, 22.0], [6.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, -9.0], [-48.0, 20.0]], [[58.0, -25.0], [47.0, 
+-30.0]], [[50.0, -22.0], [39.0, 2.0]], [[37.0, 31.0], [-15.0, -16.0]], [[39.0, 24.0], [-41.0, -29.0]], [[59.0, 23.0], [-36.0, 
+-19.0]]], [[[-29.0, 45.0], [-12.0, -58.0]], [[1.0, 20.0], [11.0, 6.0]], [[8.0, 44.0], [27.0, 8.0]], [[-17.0, 19.0], [6.0, 
+-13.0]], [[-30.0, -33.0], [-29.0, 43.0]], [[8.0, 11.0], [24.0, -13.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_constData_rank4(self):
-      arg0=-0.581792947884
-      arg1=Data(numpy.array([[[[0.87747226519015875, 0.6231426348902005, -0.3932757823780173, 0.67597306605245411], 
-[0.92013106431870528, 0.60546278260755204, 0.58894428300734991, 0.2230598410169915], [0.7187674472486103, 0.65740312497866116, 
-0.066181623539462109, -0.032620866916025282]], [[-0.89637094500210379, -0.15642889276419836, 0.73313064244502302, 
-0.30877465905136403], [0.81586268596284639, -0.2219566251724403, 0.53103247253907337, -0.44215014316465151], 
-[0.11755306734261484, 0.31433786581830625, -0.80401777975618272, 0.5146635941296418]]], [[[0.25999133341202407, 
-0.41054339747028967, 0.97464606783013896, 0.76696477751629222], [-0.86950974391029412, 0.087870184538882512, 
--0.084176512771706236, -0.99250158443436454], [-0.56396487277988316, -0.44981899824167204, 0.37907997865231202, 
--0.13846599928934089]], [[0.37241467604039702, 0.28102865211565753, -0.24431836156486675, -0.10719573858498843], 
-[0.56675159336001268, 0.068143087890095044, 0.19812077662531657, -0.4370159846273598], [-0.16895140057040403, 
--0.76247762793663942, -0.22872027382334315, 0.92369238513446073]]], [[[-0.63173384125877408, 0.33275973707979567, 
-0.12580695086856153, -0.19807779864906205], [0.50013208954093913, -0.4238507591084324, -0.44016338346600081, 
--0.079960057043174881], [0.87220448346661161, -0.16431705938389696, 0.23619941013837775, 0.39692507332646398]], 
-[[0.059734965680461105, -0.64303318483765759, -0.33036924826159075, -0.8397929579564527], [0.84754199125021534, 
-0.3277818253539122, 0.24711249515614564, 0.86244655028076544], [-0.18611073492048535, -0.53349032076852021, 
--0.81648674433785762, -0.76088310405458248]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, -0.58179294788395652], 
-[-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, -0.58179294788395652], [-0.58179294788395652, 
--0.58179294788395652, -0.58179294788395652, -0.58179294788395652]], [[-0.89637094500210379, -0.58179294788395652, 
--0.58179294788395652, -0.58179294788395652], [-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, 
--0.58179294788395652], [-0.58179294788395652, -0.58179294788395652, -0.80401777975618272, -0.58179294788395652]]], 
-[[[-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, -0.58179294788395652], [-0.86950974391029412, 
--0.58179294788395652, -0.58179294788395652, -0.99250158443436454], [-0.58179294788395652, -0.58179294788395652, 
--0.58179294788395652, -0.58179294788395652]], [[-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, 
--0.58179294788395652], [-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, -0.58179294788395652], 
-[-0.58179294788395652, -0.76247762793663942, -0.58179294788395652, -0.58179294788395652]]], [[[-0.63173384125877408, 
--0.58179294788395652, -0.58179294788395652, -0.58179294788395652], [-0.58179294788395652, -0.58179294788395652, 
--0.58179294788395652, -0.58179294788395652], [-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, 
--0.58179294788395652]], [[-0.58179294788395652, -0.64303318483765759, -0.58179294788395652, -0.8397929579564527], 
-[-0.58179294788395652, -0.58179294788395652, -0.58179294788395652, -0.58179294788395652], [-0.58179294788395652, 
--0.58179294788395652, -0.81648674433785762, -0.76088310405458248]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[4.0, -1.0, 6.0, -6.0, 0.0], [-1.0, -2.0, -1.0, 7.0, -1.0], [0.0, 4.0, 1.0, 6.0, -7.0], [0.0, 5.0, 
+-2.0, 6.0, -1.0]]),self.functionspace)
+      arg1=-3.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-12.0, 3.0, -18.0, 18.0, -0.0], [3.0, 6.0, 3.0, -21.0, 3.0], [-0.0, -12.0, -3.0, -18.0, 21.0], 
+[-0.0, -15.0, 6.0, -18.0, 3.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_float_rank0_expandedData_rank4(self):
-      arg0=-0.10290430648
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.85187225610746631, 0.64558385225605552, 0.36117210026029056, -0.03422553197228817], 
-[0.24323566750290659, -0.57877387738099317, 0.52697125903685293, -0.93181939519771917], [0.53731967233777023, 
--0.72710062296494615, 0.97368033040394164, -0.53409182293530799]], [[0.82844548806310003, 0.5213969124995439, 
--0.27770318177172659, -0.17619831855758017], [0.48771787591444626, 0.93796688405206363, 0.025437621104899666, 
-0.19876953601259006], [-0.040481365114872991, 0.89537512768984895, -0.81935917804915803, -0.99907977569170137]]], 
-[[[-0.48987287243545707, 0.61994560528887011, 0.55888316071892397, -0.77637054376351999], [-0.66089259237922282, 
--0.88068129189395061, 0.93239068267859482, -0.78746314792351146], [-0.14315793732359605, 0.41361971509445605, 
-0.95568183192572898, -0.36880629855877523]], [[0.2172025525332788, -0.34936830028158439, 0.57184924406041859, 
--0.23412108331402326], [-0.23445523796533108, 0.19578577497365091, 0.14009352718615009, 0.14133228086993066], 
-[0.10020812115061251, -0.33883877747695057, 0.20560447740398247, -0.77600027604688715]]], [[[-0.4942915852751073, 
--0.29235022442187919, -0.51116999803212382, 0.37093582472300968], [-0.27376810487262837, -0.8987464689482163, 
--0.87245236617626798, 0.21392735696162135], [0.89481650900006993, 0.72356062177150782, 0.026226541387195601, 
-0.045736178732056709]], [[0.3686576166289619, -0.23135459106690015, 0.81774316603276498, -0.44173564156250134], 
-[-0.98798277603952345, 0.11479044811880423, -0.63649413700127844, 0.88953686149105238], [0.22524856598321619, 
-0.69039006747762377, 0.28184364889788771, -0.7480606303977928]]]])+(1.-msk_arg1)*numpy.array([[[[-0.8455279216269902, 
--0.43871740189967201, -0.093114977650723629, 0.93535789029724681], [0.19668699619808239, -0.63153668349117908, 
--0.30409206579554415, -0.16200487448713541], [0.31762815788635312, 0.64257458918316024, 0.30369800481028641, 
-0.096271411370706828]], [[-0.3519302369911308, -0.73908595879854055, 0.45561936679827331, 0.14072878601025618], 
-[0.50517314547955894, 0.76234026364558671, 0.26197719351314808, -0.80972622054330379], [-0.45574391278975557, 
--0.50005275856572107, 0.12476127070454868, 0.53226113313979795]]], [[[0.80337843968115918, -0.5107867211640178, 
--0.48889196777448052, 0.84244453195505953], [-0.58857634025677297, 0.088235543304351349, 0.74319890254648469, 
--0.50361561223490159], [0.0011302964934849502, -0.04113483334572976, 0.2937309133365209, 0.82522969217995268]], 
-[[0.71359750060924054, 0.722636991660494, -0.80351833294633779, 0.87106029082868752], [-0.32816347153535119, 
--0.65528138827757654, 0.55150801541119088, -0.81367209614811142], [0.45181211779440011, -0.5765470015831522, 
--0.90927890301572711, -0.22101251340165429]]], [[[-0.94593773582688456, 0.95215960064055705, 0.38466411752637231, 
-0.9820597265068487], [0.14778124466184317, -0.47015621926212225, 0.088603825063333419, -0.64973922336995482], 
-[0.92791653906193416, 0.19050873211481267, 0.0016011818744656736, -0.46740459879994556]], [[0.38875790905781193, 
-0.66071108129954692, 0.57881914215991492, 0.56584702828234157], [0.098816526092418977, 0.82921905428706588, 0.6807498250186037, 
-0.56130783810878215], [-0.50006331453622477, -0.42728851210218832, -0.91864985916115116, -0.58556436060393446]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, -0.1029043064799362], 
-[-0.1029043064799362, -0.57877387738099317, -0.1029043064799362, -0.93181939519771917], [-0.1029043064799362, 
--0.72710062296494615, -0.1029043064799362, -0.53409182293530799]], [[-0.1029043064799362, -0.1029043064799362, 
--0.27770318177172659, -0.17619831855758017], [-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, 
--0.1029043064799362], [-0.1029043064799362, -0.1029043064799362, -0.81935917804915803, -0.99907977569170137]]], 
-[[[-0.48987287243545707, -0.1029043064799362, -0.1029043064799362, -0.77637054376351999], [-0.66089259237922282, 
--0.88068129189395061, -0.1029043064799362, -0.78746314792351146], [-0.14315793732359605, -0.1029043064799362, 
--0.1029043064799362, -0.36880629855877523]], [[-0.1029043064799362, -0.34936830028158439, -0.1029043064799362, 
--0.23412108331402326], [-0.23445523796533108, -0.1029043064799362, -0.1029043064799362, -0.1029043064799362], 
-[-0.1029043064799362, -0.33883877747695057, -0.1029043064799362, -0.77600027604688715]]], [[[-0.4942915852751073, 
--0.29235022442187919, -0.51116999803212382, -0.1029043064799362], [-0.27376810487262837, -0.8987464689482163, 
--0.87245236617626798, -0.1029043064799362], [-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, 
--0.1029043064799362]], [[-0.1029043064799362, -0.23135459106690015, -0.1029043064799362, -0.44173564156250134], 
-[-0.98798277603952345, -0.1029043064799362, -0.63649413700127844, -0.1029043064799362], [-0.1029043064799362, 
--0.1029043064799362, -0.1029043064799362, -0.7480606303977928]]]])+(1.-msk_ref)*numpy.array([[[[-0.8455279216269902, 
--0.43871740189967201, -0.1029043064799362, -0.1029043064799362], [-0.1029043064799362, -0.63153668349117908, 
--0.30409206579554415, -0.16200487448713541], [-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, 
--0.1029043064799362]], [[-0.3519302369911308, -0.73908595879854055, -0.1029043064799362, -0.1029043064799362], 
-[-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, -0.80972622054330379], [-0.45574391278975557, 
--0.50005275856572107, -0.1029043064799362, -0.1029043064799362]]], [[[-0.1029043064799362, -0.5107867211640178, 
--0.48889196777448052, -0.1029043064799362], [-0.58857634025677297, -0.1029043064799362, -0.1029043064799362, 
--0.50361561223490159], [-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, -0.1029043064799362]], 
-[[-0.1029043064799362, -0.1029043064799362, -0.80351833294633779, -0.1029043064799362], [-0.32816347153535119, 
--0.65528138827757654, -0.1029043064799362, -0.81367209614811142], [-0.1029043064799362, -0.5765470015831522, 
--0.90927890301572711, -0.22101251340165429]]], [[[-0.94593773582688456, -0.1029043064799362, -0.1029043064799362, 
--0.1029043064799362], [-0.1029043064799362, -0.47015621926212225, -0.1029043064799362, -0.64973922336995482], 
-[-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, -0.46740459879994556]], [[-0.1029043064799362, 
--0.1029043064799362, -0.1029043064799362, -0.1029043064799362], [-0.1029043064799362, -0.1029043064799362, -0.1029043064799362, 
--0.1029043064799362], [-0.50006331453622477, -0.42728851210218832, -0.91864985916115116, -0.58556436060393446]]]])
+   def test_generalTensorProduct_constData_rank2_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -5.0, 6.0, -5.0, 4.0], [-4.0, 3.0, -4.0, 1.0, -5.0], [4.0, -2.0, -3.0, 0.0, -5.0], [2.0, 
+-5.0, -2.0, 4.0, 4.0]]),self.functionspace)
+      arg1=numpy.array(-4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[28.0, 20.0, -24.0, 20.0, -16.0], [16.0, -12.0, 16.0, -4.0, 20.0], [-16.0, 8.0, 12.0, -0.0, 20.0], 
+[-8.0, 20.0, 8.0, -16.0, -16.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_float_rank0(self):
-      arg0=numpy.array(0.857550779512)
-      arg1=-0.931803549177
-      res=minimum(arg0,arg1)
-      ref=numpy.array(-0.931803549177)
-      if isinstance(res,numpy.ndarray):
-          self.assertEqual(res.shape,(),"wrong shape of result.")
-      else:
-          self.assertTrue(isinstance(res,float),"wrong type of result.")
+   def test_generalTensorProduct_constData_rank3_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[0.0, 3.0, 5.0], [6.0, -5.0, -2.0], [4.0, 3.0, 7.0], [-2.0, -2.0, -7.0], [3.0, 4.0, 6.0]], 
+[[-1.0, 7.0, 5.0], [7.0, 7.0, 0.0], [4.0, 5.0, 0.0], [2.0, -1.0, 2.0], [3.0, -2.0, -5.0]], [[3.0, -5.0, -6.0], [2.0, -6.0, 
+-2.0], [4.0, 7.0, 0.0], [0.0, 7.0, -5.0], [6.0, -1.0, 7.0]], [[7.0, 1.0, -6.0], [0.0, -1.0, -3.0], [-5.0, 3.0, 3.0], [7.0, 
+-1.0, 7.0], [-3.0, -4.0, 6.0]]]),self.functionspace)
+      arg1=numpy.array([5.0, 2.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[6.0, 20.0, 26.0, -14.0, 23.0], [9.0, 49.0, 30.0, 8.0, 11.0], [5.0, -2.0, 34.0, 14.0, 28.0], [37.0, 
+-2.0, -19.0, 33.0, -23.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_float_rank0(self):
-      arg0=numpy.array([-0.3787763125444279, 0.61640691487825783])
-      arg1=0.94517726501
-      res=minimum(arg0,arg1)
-      ref=numpy.array([-0.3787763125444279, 0.61640691487825783])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank4_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-3.0, -2.0, 0.0], [3.0, 1.0, 5.0]], [[5.0, 4.0, -6.0], [4.0, -6.0, 2.0]], [[0.0, 0.0, 1.0], 
+[6.0, -6.0, 7.0]], [[-2.0, -7.0, -5.0], [-1.0, 0.0, -3.0]], [[-5.0, -3.0, -2.0], [4.0, -1.0, 7.0]]], [[[-1.0, 6.0, 0.0], [-3.0, 
+-2.0, 5.0]], [[4.0, 2.0, -4.0], [1.0, -6.0, 7.0]], [[3.0, -1.0, -5.0], [2.0, -7.0, 0.0]], [[1.0, 0.0, -1.0], [-2.0, 0.0, 
+-5.0]], [[-5.0, -1.0, -2.0], [0.0, -6.0, -1.0]]], [[[1.0, 0.0, 7.0], [-1.0, 3.0, -6.0]], [[-7.0, -3.0, 3.0], [6.0, -1.0, 2.0]], 
+[[0.0, -1.0, 7.0], [-7.0, -3.0, 4.0]], [[-6.0, 5.0, 1.0], [-5.0, 1.0, 2.0]], [[6.0, 3.0, 0.0], [-4.0, 6.0, -1.0]]], [[[-5.0, 
+0.0, -3.0], [-6.0, -1.0, -6.0]], [[-7.0, 0.0, 5.0], [4.0, 6.0, -3.0]], [[6.0, -2.0, 1.0], [3.0, 0.0, 0.0]], [[-3.0, 5.0, 4.0], 
+[-2.0, 4.0, -4.0]], [[-2.0, -3.0, -2.0], [7.0, -6.0, -7.0]]]]),self.functionspace)
+      arg1=numpy.array([[0.0, 1.0, -5.0], [-4.0, 0.0, 4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[6.0, 26.0, -1.0, 10.0, 19.0], [38.0, 46.0, 16.0, -7.0, 5.0], [-55.0, -34.0, 8.0, 28.0, 15.0], 
+[15.0, -53.0, -19.0, -23.0, -49.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_float_rank0(self):
-      arg0=numpy.array([[0.73487364184043158, 0.85512732743605779, -0.33783827568479152, 0.052087941059582255, 
--0.9768667842826757], [0.49681750240627554, -0.1673990705734647, 0.34496840412171048, -0.55168843110085031, 
-0.96005491316714942], [-0.17374074046696575, -0.00020542667606160414, 0.83993824499041558, 0.26937612547408407, 
-0.62423339248770437], [0.46916929579476263, 0.027976087899955537, 0.56428053215234608, 0.0037181200269902348, 
--0.82795822733434399]])
-      arg1=0.774188926122
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[0.73487364184043158, 0.77418892612235446, -0.33783827568479152, 0.052087941059582255, 
--0.9768667842826757], [0.49681750240627554, -0.1673990705734647, 0.34496840412171048, -0.55168843110085031, 
-0.77418892612235446], [-0.17374074046696575, -0.00020542667606160414, 0.77418892612235446, 0.26937612547408407, 
-0.62423339248770437], [0.46916929579476263, 0.027976087899955537, 0.56428053215234608, 0.0037181200269902348, 
--0.82795822733434399]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank2_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[-5.0, -4.0, 6.0, -2.0, 3.0], [7.0, 0.0, 6.0, -2.0, 3.0], [-6.0, -6.0, -2.0, -2.0, 0.0], [-6.0, 
+-5.0, 7.0, 6.0, -5.0]]),self.functionspace)
+      arg1=numpy.array([-5.0, -3.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[25.0, 15.0], [20.0, 12.0], [-30.0, -18.0], [10.0, 6.0], [-15.0, -9.0]], [[-35.0, -21.0], [0.0, 
+0.0], [-30.0, -18.0], [10.0, 6.0], [-15.0, -9.0]], [[30.0, 18.0], [30.0, 18.0], [10.0, 6.0], [10.0, 6.0], [0.0, 0.0]], [[30.0, 
+18.0], [25.0, 15.0], [-35.0, -21.0], [-30.0, -18.0], [25.0, 15.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_float_rank0(self):
-      arg0=numpy.array([[[-0.46087902964363803, -0.57129195776970931], [0.0076277080182611812, -0.41537987414122468]], 
-[[-0.13192465918260998, -0.812803248157564], [0.36381513982996605, -0.9997332266509058]], [[0.70174669839708037, 
-0.024330102842379686], [0.81487919329588299, -0.52678709995947504]], [[-0.72411149617151471, 0.70679642938999798], 
-[-0.3498991701900156, -0.96024889494342114]], [[-0.06909535466653538, 0.1962226565582319], [-0.86504927743940008, 
-0.26157135071251991]], [[0.84244033106704874, 0.92704263636113993], [-0.95355033204340445, 0.26248819447807525]]])
-      arg1=0.943913650475
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[-0.46087902964363803, -0.57129195776970931], [0.0076277080182611812, -0.41537987414122468]], 
-[[-0.13192465918260998, -0.812803248157564], [0.36381513982996605, -0.9997332266509058]], [[0.70174669839708037, 
-0.024330102842379686], [0.81487919329588299, -0.52678709995947504]], [[-0.72411149617151471, 0.70679642938999798], 
-[-0.3498991701900156, -0.96024889494342114]], [[-0.06909535466653538, 0.1962226565582319], [-0.86504927743940008, 
-0.26157135071251991]], [[0.84244033106704874, 0.92704263636113993], [-0.95355033204340445, 0.26248819447807525]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_float_rank0(self):
-      arg0=numpy.array([[[[-0.83625307245463865, -0.98092419056114721, -0.41276929014027663, 0.22870779277970277], 
-[0.061813298478873957, 0.68068220259497325, -0.59242034530039533, -0.23160001258621188], [0.84245839390738309, 
--0.69364898209393511, 0.27911312262812582, 0.52734351530235135]], [[-0.29691958348502956, -0.27360051966730414, 
--0.75953910304979599, -0.50280490074627293], [0.20366134391546309, 0.61433073050478693, 0.12105359319633124, 
--0.47500250514633802], [0.10283925179231024, 0.31934023713999782, 0.32672660137224585, -0.88915465274000738]]], 
-[[[0.64044241730765195, -0.58502981647791041, 0.29232033967124815, 0.49761920262791626], [0.19279011387703693, 
--0.90954455094873077, 0.46668774191172258, 0.53332298417661672], [-0.65415679726684228, 0.048987662787866482, 
--0.5670428493706543, 0.41710263147312898]], [[0.88536193649022077, -0.58797937643338116, -0.58729792385186452, 
-0.51901779786057145], [-0.2132527448536401, 0.47436958605338297, 0.45876189062645278, -0.25260854832951041], 
-[-0.9043252274086746, -0.21672385749114187, -0.051211493465172175, -0.75228882024605115]]], [[[-0.52436255644704577, 
--0.72862396222744175, 0.69400005913482521, -0.23999690561865661], [-0.29737752504935466, 0.55286786193362603, 
-0.95036177416639966, -0.95894560840181464], [0.56248187365701585, -0.14169630012641865, -0.55808511422967433, 
--0.98783111835212356]], [[-0.74629979771557209, -0.98792590326574592, 0.28466555035646102, -0.6908222095481058], 
-[0.52849233626894532, 0.51479121086295399, 0.79278677375459461, -0.64298385481196307], [0.81646839664183801, 
-0.91859825266245809, -0.65957056952356319, -0.10172208823781093]]]])
-      arg1=0.805915464943
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[[-0.83625307245463865, -0.98092419056114721, -0.41276929014027663, 0.22870779277970277], 
-[0.061813298478873957, 0.68068220259497325, -0.59242034530039533, -0.23160001258621188], [0.80591546494255284, 
--0.69364898209393511, 0.27911312262812582, 0.52734351530235135]], [[-0.29691958348502956, -0.27360051966730414, 
--0.75953910304979599, -0.50280490074627293], [0.20366134391546309, 0.61433073050478693, 0.12105359319633124, 
--0.47500250514633802], [0.10283925179231024, 0.31934023713999782, 0.32672660137224585, -0.88915465274000738]]], 
-[[[0.64044241730765195, -0.58502981647791041, 0.29232033967124815, 0.49761920262791626], [0.19279011387703693, 
--0.90954455094873077, 0.46668774191172258, 0.53332298417661672], [-0.65415679726684228, 0.048987662787866482, 
--0.5670428493706543, 0.41710263147312898]], [[0.80591546494255284, -0.58797937643338116, -0.58729792385186452, 
-0.51901779786057145], [-0.2132527448536401, 0.47436958605338297, 0.45876189062645278, -0.25260854832951041], 
-[-0.9043252274086746, -0.21672385749114187, -0.051211493465172175, -0.75228882024605115]]], [[[-0.52436255644704577, 
--0.72862396222744175, 0.69400005913482521, -0.23999690561865661], [-0.29737752504935466, 0.55286786193362603, 
-0.80591546494255284, -0.95894560840181464], [0.56248187365701585, -0.14169630012641865, -0.55808511422967433, 
--0.98783111835212356]], [[-0.74629979771557209, -0.98792590326574592, 0.28466555035646102, -0.6908222095481058], 
-[0.52849233626894532, 0.51479121086295399, 0.79278677375459461, -0.64298385481196307], [0.80591546494255284, 
-0.80591546494255284, -0.65957056952356319, -0.10172208823781093]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_array_rank0(self):
-      arg0=numpy.array(0.389872782207)
-      arg1=numpy.array(0.770887964108)
-      res=minimum(arg0,arg1)
-      ref=numpy.array(0.389872782207)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_array_rank0(self):
-      arg0=numpy.array([0.62053337242222106, 0.9378071268909014])
-      arg1=numpy.array(-0.00670569008167)
-      res=minimum(arg0,arg1)
-      ref=numpy.array([-0.0067056900816702125, -0.0067056900816702125])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_array_rank0(self):
-      arg0=numpy.array([[-0.53581508774705489, -0.81694620054214262, 0.10622104587034653, 0.71457914938406719, 
-0.13736693490304352], [-0.96860495698991578, 0.11246557480273189, -0.25211716028434417, -0.75842206367277676, 
-0.46930135143129736], [-0.7392131609723176, 0.62472685015314267, -0.85230854677453771, -0.68801606930350068, 
--0.072796679374400153], [-0.17581662031575007, -0.40120307594212457, 0.087091851442376189, 0.48178507094534528, 
-0.68553402521876916]])
-      arg1=numpy.array(0.909515806974)
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[-0.53581508774705489, -0.81694620054214262, 0.10622104587034653, 0.71457914938406719, 
-0.13736693490304352], [-0.96860495698991578, 0.11246557480273189, -0.25211716028434417, -0.75842206367277676, 
-0.46930135143129736], [-0.7392131609723176, 0.62472685015314267, -0.85230854677453771, -0.68801606930350068, 
--0.072796679374400153], [-0.17581662031575007, -0.40120307594212457, 0.087091851442376189, 0.48178507094534528, 
-0.68553402521876916]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_array_rank0(self):
-      arg0=numpy.array([[[-0.60423663694916696, 0.81178484746809043], [0.40721555680054, 0.96464766417481118]], 
-[[0.83267825176593901, -0.114463937229067], [0.074552643403738905, 0.90263895861717436]], [[-0.83917862228856999, 
-0.29580567543478775], [0.7356101992386741, 0.7081218375203]], [[0.32914154435747078, -0.45511477742165662], 
-[-0.27307419370718855, -0.71710400533929675]], [[0.49887556634883579, 0.10645599573484876], [-0.54797030132655555, 
--0.024678156116086036]], [[-0.23798655863607632, -0.71155424564324576], [-0.50580795685584201, -0.6367245911624706]]])
-      arg1=numpy.array(-0.203164817525)
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[-0.60423663694916696, -0.20316481752504534], [-0.20316481752504534, -0.20316481752504534]], 
-[[-0.20316481752504534, -0.20316481752504534], [-0.20316481752504534, -0.20316481752504534]], [[-0.83917862228856999, 
--0.20316481752504534], [-0.20316481752504534, -0.20316481752504534]], [[-0.20316481752504534, -0.45511477742165662], 
-[-0.27307419370718855, -0.71710400533929675]], [[-0.20316481752504534, -0.20316481752504534], [-0.54797030132655555, 
--0.20316481752504534]], [[-0.23798655863607632, -0.71155424564324576], [-0.50580795685584201, -0.6367245911624706]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_array_rank0(self):
-      arg0=numpy.array([[[[-0.88409627233633015, -0.24180880044828168, -0.16109379951963732, 0.054780850074784615], 
-[0.088497394752413916, 0.12739685401428691, 0.91613533694130633, -0.12330788977174723], [0.59156881341898626, 
-0.097883418078583251, -0.42019448331551068, 0.93499807156448056]], [[-0.28124888615332799, -0.070680388991419818, 
--0.98156318945166121, -0.30427047986189004], [-0.69697011679708165, 0.45690333366086189, 0.29894632104366292, 
--0.045313440763791402], [0.014105507577271581, -0.73962116497441976, 0.64459249185291112, -0.65033503935731996]]], 
-[[[0.080118695849563437, -0.98565794524601902, -0.30068448750058363, 0.39824415379508893], [-0.26040900506020015, 
-0.34311381611429415, 0.85968572379571007, 0.10451592223118], [-0.5900350618330874, 0.39587445892497297, -0.39705501036035828, 
--0.76595207715516089]], [[0.87009079679190982, 0.44293188122529714, 0.2692810520962956, 0.84644072410474203], 
-[0.080851462622369974, 0.065149905551311393, -0.33718206162615094, 0.032794151371295488], [-0.68745989338873525, 
--0.67986231166762789, 0.5482539578904575, -0.25593960686285988]]], [[[-0.46618713532480949, -0.3468711581159647, 
--0.58787716751812269, -0.9476946148329235], [-0.28418210099892649, -0.53141237500870053, 0.9814823709551237, 
--0.21408035592456343], [-0.38038762215406852, 0.53764354138724557, -0.8732296453732491, -0.68309253564894012]], 
-[[-0.93251515388706663, 0.13721073537317197, 0.90279717503452539, -0.69626879529176033], [0.93285049558560673, 
-0.62824431407597237, 0.77017740778577104, -0.68709117985967616], [-0.36529411543321433, -0.56693930195860442, 
-0.77404342041484209, -0.77208297857019681]]]])
-      arg1=numpy.array(0.860202631207)
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[[-0.88409627233633015, -0.24180880044828168, -0.16109379951963732, 0.054780850074784615], 
-[0.088497394752413916, 0.12739685401428691, 0.86020263120695017, -0.12330788977174723], [0.59156881341898626, 
-0.097883418078583251, -0.42019448331551068, 0.86020263120695017]], [[-0.28124888615332799, -0.070680388991419818, 
--0.98156318945166121, -0.30427047986189004], [-0.69697011679708165, 0.45690333366086189, 0.29894632104366292, 
--0.045313440763791402], [0.014105507577271581, -0.73962116497441976, 0.64459249185291112, -0.65033503935731996]]], 
-[[[0.080118695849563437, -0.98565794524601902, -0.30068448750058363, 0.39824415379508893], [-0.26040900506020015, 
-0.34311381611429415, 0.85968572379571007, 0.10451592223118], [-0.5900350618330874, 0.39587445892497297, -0.39705501036035828, 
--0.76595207715516089]], [[0.86020263120695017, 0.44293188122529714, 0.2692810520962956, 0.84644072410474203], 
-[0.080851462622369974, 0.065149905551311393, -0.33718206162615094, 0.032794151371295488], [-0.68745989338873525, 
--0.67986231166762789, 0.5482539578904575, -0.25593960686285988]]], [[[-0.46618713532480949, -0.3468711581159647, 
--0.58787716751812269, -0.9476946148329235], [-0.28418210099892649, -0.53141237500870053, 0.86020263120695017, 
--0.21408035592456343], [-0.38038762215406852, 0.53764354138724557, -0.8732296453732491, -0.68309253564894012]], 
-[[-0.93251515388706663, 0.13721073537317197, 0.86020263120695017, -0.69626879529176033], [0.86020263120695017, 
-0.62824431407597237, 0.77017740778577104, -0.68709117985967616], [-0.36529411543321433, -0.56693930195860442, 
-0.77404342041484209, -0.77208297857019681]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_constData_rank0(self):
-      arg0=numpy.array(-0.664721644752)
-      arg1=Data(-0.591271306444,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(-0.664721644752,self.functionspace)
+   def test_generalTensorProduct_constData_rank3_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-3.0, -3.0, -6.0], [-5.0, 1.0, 0.0], [-7.0, 3.0, 0.0], [7.0, -6.0, 7.0], [-4.0, -1.0, -5.0]], 
+[[4.0, -1.0, 0.0], [3.0, 0.0, 6.0], [0.0, -3.0, -7.0], [4.0, -1.0, 6.0], [-1.0, 7.0, -3.0]], [[-6.0, 1.0, 0.0], [-4.0, -6.0, 
+4.0], [0.0, 0.0, 0.0], [3.0, -3.0, 1.0], [-1.0, 0.0, -4.0]], [[3.0, -1.0, -7.0], [7.0, -6.0, 7.0], [6.0, 0.0, -1.0], [3.0, 4.0, 
+3.0], [-2.0, -6.0, -3.0]]]),self.functionspace)
+      arg1=numpy.array([[0.0, -1.0], [0.0, -4.0], [4.0, -6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-24.0, 51.0], [0.0, 1.0], [0.0, -5.0], [28.0, -25.0], [-20.0, 38.0]], [[0.0, 0.0], [24.0, -39.0], 
+[-28.0, 54.0], [24.0, -36.0], [-12.0, -9.0]], [[0.0, 2.0], [16.0, 4.0], [0.0, 0.0], [4.0, 3.0], [-16.0, 25.0]], [[-28.0, 43.0], 
+[28.0, -25.0], [-4.0, 0.0], [12.0, -37.0], [-12.0, 44.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_constData_rank0(self):
-      arg0=numpy.array([0.042987704765046875, -0.75971623114729758])
-      arg1=Data(0.259779720844,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([0.042987704765046875, -0.75971623114729758]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 0.0, -6.0], [-7.0, 2.0, -6.0]], [[-7.0, 4.0, 0.0], [4.0, 0.0, 1.0]], [[3.0, -5.0, 0.0], 
+[-6.0, -4.0, -6.0]], [[-2.0, -6.0, 6.0], [-3.0, 2.0, 2.0]], [[6.0, -6.0, 1.0], [1.0, -4.0, -3.0]]], [[[0.0, 0.0, 4.0], [-3.0, 
+6.0, -6.0]], [[-6.0, -5.0, 4.0], [6.0, -6.0, -6.0]], [[7.0, -2.0, 0.0], [0.0, -6.0, -1.0]], [[-7.0, -4.0, -2.0], [-5.0, -3.0, 
+6.0]], [[-5.0, 2.0, 0.0], [-6.0, 2.0, 2.0]]], [[[-2.0, -4.0, 2.0], [3.0, 6.0, -6.0]], [[6.0, 0.0, -5.0], [-6.0, 0.0, 4.0]], 
+[[0.0, 0.0, -5.0], [4.0, 2.0, -2.0]], [[2.0, -1.0, 4.0], [0.0, -5.0, -3.0]], [[4.0, -3.0, -1.0], [7.0, 7.0, -2.0]]], [[[-6.0, 
+6.0, -3.0], [6.0, -2.0, 3.0]], [[1.0, -1.0, 2.0], [3.0, -3.0, -3.0]], [[2.0, -6.0, 2.0], [-7.0, 7.0, -7.0]], [[1.0, -3.0, 1.0], 
+[-6.0, -6.0, -2.0]], [[6.0, -3.0, -2.0], [-7.0, 5.0, 0.0]]]]),self.functionspace)
+      arg1=numpy.array([[[4.0, 6.0], [0.0, 4.0], [-1.0, 4.0]], [[-4.0, 4.0], [4.0, 7.0], [-2.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[74.0, 10.0], [-46.0, -13.0], [32.0, -36.0], [2.0, -16.0], [9.0, 1.0]], [[44.0, 64.0], [-64.0, 
+-40.0], [6.0, -5.0], [-30.0, -125.0], [8.0, -38.0]], [[14.0, 52.0], [45.0, -20.0], [1.0, 16.0], [-10.0, -2.0], [21.0, 91.0]], 
+[[-59.0, -23.0], [-16.0, 10.0], [76.0, 38.0], [7.0, -62.0], [74.0, 23.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_constData_rank0(self):
-      arg0=numpy.array([[-0.40694840135770916, 0.014819351600515729, 0.22945217906940396, 0.24172192708217133, 
-0.93718430559874277], [-0.67233903053984378, 0.6303475818609956, 0.47580560616279821, 0.011270456829029385, 
-0.12521216351981534], [-0.34833156966200152, 0.77212022808581104, 0.062723415721219977, 0.23428298086606669, 
-0.88603401165303297], [-0.8932351864413437, 0.8135967320357218, 0.38936600077325179, -0.64561296346977559, 
-0.91200200131622999]])
-      arg1=Data(-0.342763784081,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.40694840135770916, -0.34276378408100094, -0.34276378408100094, -0.34276378408100094, 
--0.34276378408100094], [-0.67233903053984378, -0.34276378408100094, -0.34276378408100094, -0.34276378408100094, 
--0.34276378408100094], [-0.34833156966200152, -0.34276378408100094, -0.34276378408100094, -0.34276378408100094, 
--0.34276378408100094], [-0.8932351864413437, -0.34276378408100094, -0.34276378408100094, -0.64561296346977559, 
--0.34276378408100094]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_array_rank2_offset0(self):
+      arg0=Data(numpy.array([[1.0, 4.0, 6.0, 1.0, 3.0], [-1.0, 2.0, 0.0, -3.0, -3.0], [7.0, 4.0, -6.0, -3.0, 4.0], [-7.0, -6.0, 
+4.0, 0.0, 4.0]]),self.functionspace)
+      arg1=numpy.array([[-7.0, 6.0, 7.0, 5.0, -1.0], [-3.0, -1.0, 6.0, -7.0, 3.0], [-1.0, -1.0, 3.0, 6.0, 7.0], [-4.0, 7.0, 
+0.0, 6.0, -7.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-7.0, 6.0, 7.0, 5.0, -1.0], [-3.0, -1.0, 6.0, -7.0, 3.0], [-1.0, -1.0, 3.0, 6.0, 7.0], [-4.0, 
+7.0, 0.0, 6.0, -7.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], [-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], 
+[-16.0, 28.0, 0.0, 24.0, -28.0]], [[-42.0, 36.0, 42.0, 30.0, -6.0], [-18.0, -6.0, 36.0, -42.0, 18.0], [-6.0, -6.0, 18.0, 36.0, 
+42.0], [-24.0, 42.0, 0.0, 36.0, -42.0]], [[-7.0, 6.0, 7.0, 5.0, -1.0], [-3.0, -1.0, 6.0, -7.0, 3.0], [-1.0, -1.0, 3.0, 6.0, 
+7.0], [-4.0, 7.0, 0.0, 6.0, -7.0]], [[-21.0, 18.0, 21.0, 15.0, -3.0], [-9.0, -3.0, 18.0, -21.0, 9.0], [-3.0, -3.0, 9.0, 18.0, 
+21.0], [-12.0, 21.0, 0.0, 18.0, -21.0]]], [[[7.0, -6.0, -7.0, -5.0, 1.0], [3.0, 1.0, -6.0, 7.0, -3.0], [1.0, 1.0, -3.0, -6.0, 
+-7.0], [4.0, -7.0, 0.0, -6.0, 7.0]], [[-14.0, 12.0, 14.0, 10.0, -2.0], [-6.0, -2.0, 12.0, -14.0, 6.0], [-2.0, -2.0, 6.0, 12.0, 
+14.0], [-8.0, 14.0, 0.0, 12.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[21.0, -18.0, -21.0, -15.0, 3.0], [9.0, 3.0, -18.0, 21.0, -9.0], [3.0, 3.0, -9.0, -18.0, -21.0], [12.0, 
+-21.0, 0.0, -18.0, 21.0]], [[21.0, -18.0, -21.0, -15.0, 3.0], [9.0, 3.0, -18.0, 21.0, -9.0], [3.0, 3.0, -9.0, -18.0, -21.0], 
+[12.0, -21.0, 0.0, -18.0, 21.0]]], [[[-49.0, 42.0, 49.0, 35.0, -7.0], [-21.0, -7.0, 42.0, -49.0, 21.0], [-7.0, -7.0, 21.0, 
+42.0, 49.0], [-28.0, 49.0, 0.0, 42.0, -49.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], [-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 
+12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]], [[42.0, -36.0, -42.0, -30.0, 6.0], [18.0, 6.0, -36.0, 42.0, -18.0], [6.0, 
+6.0, -18.0, -36.0, -42.0], [24.0, -42.0, 0.0, -36.0, 42.0]], [[21.0, -18.0, -21.0, -15.0, 3.0], [9.0, 3.0, -18.0, 21.0, -9.0], 
+[3.0, 3.0, -9.0, -18.0, -21.0], [12.0, -21.0, 0.0, -18.0, 21.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], [-12.0, -4.0, 24.0, -28.0, 
+12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]]], [[[49.0, -42.0, -49.0, -35.0, 7.0], [21.0, 7.0, 
+-42.0, 49.0, -21.0], [7.0, 7.0, -21.0, -42.0, -49.0], [28.0, -49.0, 0.0, -42.0, 49.0]], [[42.0, -36.0, -42.0, -30.0, 6.0], 
+[18.0, 6.0, -36.0, 42.0, -18.0], [6.0, 6.0, -18.0, -36.0, -42.0], [24.0, -42.0, 0.0, -36.0, 42.0]], [[-28.0, 24.0, 28.0, 20.0, 
+-4.0], [-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], 
+[-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_constData_rank0(self):
-      arg0=numpy.array([[[-0.94517666245515719, 0.58346090245069915], [0.1183278909908978, -0.42796547087031644]], 
-[[-0.14342455990554237, 0.2264971166960672], [0.52502555931526484, -0.68340476112619131]], [[0.19183738551063034, 
--0.42115644937505303], [0.47811884751893574, -0.93686472499067253]], [[0.4432181165912128, 0.35719501497132122], 
-[0.94125080725572152, 0.46228585982612369]], [[0.72278047347309027, 0.50193474124708115], [-0.49919230064208908, 
--0.46046094534597826]], [[-0.87157976779416679, -0.057714519068007064], [-0.32308528611964626, -0.45683830566307004]]])
-      arg1=Data(-0.305838120197,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.94517666245515719, -0.30583812019708456], [-0.30583812019708456, -0.42796547087031644]], 
-[[-0.30583812019708456, -0.30583812019708456], [-0.30583812019708456, -0.68340476112619131]], [[-0.30583812019708456, 
--0.42115644937505303], [-0.30583812019708456, -0.93686472499067253]], [[-0.30583812019708456, -0.30583812019708456], 
-[-0.30583812019708456, -0.30583812019708456]], [[-0.30583812019708456, -0.30583812019708456], [-0.49919230064208908, 
--0.46046094534597826]], [[-0.87157976779416679, -0.30583812019708456], [-0.32308528611964626, 
--0.45683830566307004]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -5.0, 0.0], [-5.0, -3.0, 7.0], [5.0, 6.0, -4.0], [3.0, -4.0, 7.0], [0.0, -1.0, -4.0]], 
+[[4.0, -5.0, -6.0], [-7.0, 2.0, -6.0], [3.0, -6.0, -5.0], [1.0, 6.0, 2.0], [5.0, -3.0, 2.0]], [[0.0, 2.0, -5.0], [5.0, 4.0, 
+-3.0], [-6.0, 7.0, 2.0], [0.0, -4.0, -7.0], [1.0, 1.0, -4.0]], [[2.0, -5.0, 5.0], [6.0, 7.0, -5.0], [0.0, 6.0, 4.0], [1.0, 0.0, 
+4.0], [0.0, -7.0, 3.0]]]),self.functionspace)
+      arg1=numpy.array([[[-7.0, -2.0, 7.0, 0.0, -4.0], [-6.0, -2.0, 5.0, 6.0, -3.0], [0.0, -2.0, 6.0, -1.0, -3.0], [0.0, -5.0, 
+2.0, -7.0, 0.0]], [[-1.0, 7.0, 3.0, 3.0, 3.0], [-2.0, -7.0, -2.0, 2.0, 4.0], [-6.0, 2.0, 3.0, -2.0, -3.0], [-4.0, 5.0, -1.0, 
+3.0, 1.0]], [[6.0, -1.0, -7.0, -2.0, -4.0], [-1.0, -3.0, 2.0, -1.0, -1.0], [-5.0, -3.0, 1.0, -3.0, -7.0], [-4.0, -2.0, 4.0, 
+0.0, 1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[5.0, -35.0, -15.0, -15.0, -15.0], [10.0, 35.0, 10.0, -10.0, -20.0], [30.0, -10.0, -15.0, 10.0, 
+15.0], [20.0, -25.0, 5.0, -15.0, -5.0]], [[80.0, -18.0, -93.0, -23.0, -17.0], [29.0, 10.0, -5.0, -43.0, -4.0], [-17.0, -17.0, 
+-32.0, -10.0, -25.0], [-16.0, -4.0, 21.0, 26.0, 4.0]], [[-65.0, 36.0, 81.0, 26.0, 14.0], [-38.0, -40.0, 5.0, 46.0, 13.0], 
+[-16.0, 14.0, 44.0, -5.0, -5.0], [-8.0, 13.0, -12.0, -17.0, 2.0]], [[25.0, -41.0, -40.0, -26.0, -52.0], [-17.0, 1.0, 37.0, 3.0, 
+-32.0], [-11.0, -35.0, 13.0, -16.0, -46.0], [-12.0, -49.0, 38.0, -33.0, 3.0]], [[-23.0, -3.0, 25.0, 5.0, 13.0], [6.0, 19.0, 
+-6.0, 2.0, 0.0], [26.0, 10.0, -7.0, 14.0, 31.0], [20.0, 3.0, -15.0, -3.0, -5.0]]], [[[-59.0, -37.0, 55.0, -3.0, -7.0], [-8.0, 
+45.0, 18.0, 20.0, -26.0], [60.0, 0.0, 3.0, 24.0, 45.0], [44.0, -33.0, -11.0, -43.0, -11.0]], [[11.0, 34.0, -1.0, 18.0, 58.0], 
+[44.0, 18.0, -51.0, -32.0, 35.0], [18.0, 36.0, -42.0, 21.0, 57.0], [16.0, 57.0, -40.0, 55.0, -4.0]], [[-45.0, -43.0, 38.0, 
+-8.0, -10.0], [-1.0, 51.0, 17.0, 11.0, -28.0], [61.0, -3.0, -5.0, 24.0, 44.0], [44.0, -35.0, -8.0, -39.0, -11.0]], [[-1.0, 
+38.0, 11.0, 14.0, 6.0], [-20.0, -50.0, -3.0, 16.0, 19.0], [-46.0, 4.0, 26.0, -19.0, -35.0], [-32.0, 21.0, 4.0, 11.0, 8.0]], 
+[[-20.0, -33.0, 12.0, -13.0, -37.0], [-26.0, 5.0, 35.0, 22.0, -29.0], [8.0, -22.0, 23.0, -5.0, -20.0], [4.0, -44.0, 21.0, 
+-44.0, -1.0]]], [[[-32.0, 19.0, 41.0, 16.0, 26.0], [1.0, 1.0, -14.0, 9.0, 13.0], [13.0, 19.0, 1.0, 11.0, 29.0], [12.0, 20.0, 
+-22.0, 6.0, -3.0]], [[-57.0, 21.0, 68.0, 18.0, 4.0], [-35.0, -29.0, 11.0, 41.0, 4.0], [-9.0, 7.0, 39.0, -4.0, -6.0], [-4.0, 
+1.0, -6.0, -23.0, 1.0]], [[47.0, 59.0, -35.0, 17.0, 37.0], [20.0, -43.0, -40.0, -24.0, 44.0], [-52.0, 20.0, -13.0, -14.0, 
+-17.0], [-36.0, 61.0, -11.0, 63.0, 9.0]], [[-38.0, -21.0, 37.0, 2.0, 16.0], [15.0, 49.0, -6.0, -1.0, -9.0], [59.0, 13.0, -19.0, 
+29.0, 61.0], [44.0, -6.0, -24.0, -12.0, -11.0]], [[-32.0, 9.0, 38.0, 11.0, 15.0], [-4.0, 3.0, -5.0, 12.0, 5.0], [14.0, 12.0, 
+5.0, 9.0, 22.0], [12.0, 8.0, -15.0, -4.0, -3.0]]], [[[21.0, -44.0, -36.0, -25.0, -43.0], [-7.0, 16.0, 30.0, -3.0, -31.0], [5.0, 
+-29.0, 2.0, -7.0, -26.0], [0.0, -45.0, 29.0, -29.0, 0.0]], [[-79.0, 42.0, 98.0, 31.0, 17.0], [-45.0, -46.0, 6.0, 55.0, 15.0], 
+[-17.0, 17.0, 52.0, -5.0, -4.0], [-8.0, 15.0, -15.0, -21.0, 2.0]], [[18.0, 38.0, -10.0, 10.0, 2.0], [-16.0, -54.0, -4.0, 8.0, 
+20.0], [-56.0, 0.0, 22.0, -24.0, -46.0], [-40.0, 22.0, 10.0, 18.0, 10.0]], [[17.0, -6.0, -21.0, -8.0, -20.0], [-10.0, -14.0, 
+13.0, 2.0, -7.0], [-20.0, -14.0, 10.0, -13.0, -31.0], [-16.0, -13.0, 18.0, -7.0, 4.0]], [[25.0, -52.0, -42.0, -27.0, -33.0], 
+[11.0, 40.0, 20.0, -17.0, -31.0], [27.0, -23.0, -18.0, 5.0, 0.0], [16.0, -41.0, 19.0, -21.0, -4.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_constData_rank0(self):
-      arg0=numpy.array([[[[0.3052119132493083, 0.11354358001719866, -0.78678845999523728, -0.89713683920060361], 
-[0.22313671955092262, -0.77524459473219154, -0.19689450126311048, -0.65921975688805134], [-0.32637449117625894, 
-0.93571751315249174, -0.033965491584570184, -0.095406238741338578]], [[-0.69558665665303332, 0.59193970427477627, 
-0.11950863130350098, -0.077954679843484698], [0.12794466376386215, 0.43377077999781344, 0.65045339412460534, 
-0.55334364692466331], [0.52135873564148949, 0.88714742787211742, 0.98151745723995343, 0.40097573933625963]]], 
-[[[-0.77163074313229774, -0.18221408708888043, -0.75097864636239975, -0.17309967927973546], [0.41837092940580578, 
--0.43013478261701144, -0.86866401698486473, 0.61023733125886293], [0.40079818259749067, 0.38964383635805655, 
--0.86726724319815718, -0.63749061316478639]], [[-0.59777777836614443, -0.67040010737276701, 0.91135630031305537, 
--0.25724680669481215], [-0.59690625496551508, -0.31209228496860009, -0.78429011435216345, -0.70538350697491015], 
-[0.24029207385364049, -0.063254594454844382, -0.087946871394203985, -0.23820668895538444]]], [[[-0.82311664743046276, 
-0.010040840100980608, -0.4060817484849244, -0.98411327160277295], [-0.84677009076546872, 0.77599780734071033, 
--0.29779780944522383, -0.49165390908579165], [-0.65193081384960094, 0.87337389590410597, 0.7267891901788428, 
-0.75166395878354964]], [[0.48654688816567582, -0.62133642270161471, -0.32769997280633167, 0.37264222787251011], 
-[0.21125896682256107, -0.048121022159131721, 0.4442699768969478, -0.59237144025170818], [0.18742833104058154, 
--0.48877147524805387, -0.0059717660824947227, -0.94205779052527672]]]])
-      arg1=Data(-0.619822489751,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.6198224897512703, -0.6198224897512703, -0.78678845999523728, -0.89713683920060361], 
-[-0.6198224897512703, -0.77524459473219154, -0.6198224897512703, -0.65921975688805134], [-0.6198224897512703, 
--0.6198224897512703, -0.6198224897512703, -0.6198224897512703]], [[-0.69558665665303332, -0.6198224897512703, 
--0.6198224897512703, -0.6198224897512703], [-0.6198224897512703, -0.6198224897512703, -0.6198224897512703, 
--0.6198224897512703], [-0.6198224897512703, -0.6198224897512703, -0.6198224897512703, -0.6198224897512703]]], 
-[[[-0.77163074313229774, -0.6198224897512703, -0.75097864636239975, -0.6198224897512703], [-0.6198224897512703, 
--0.6198224897512703, -0.86866401698486473, -0.6198224897512703], [-0.6198224897512703, -0.6198224897512703, 
--0.86726724319815718, -0.63749061316478639]], [[-0.6198224897512703, -0.67040010737276701, -0.6198224897512703, 
--0.6198224897512703], [-0.6198224897512703, -0.6198224897512703, -0.78429011435216345, -0.70538350697491015], 
-[-0.6198224897512703, -0.6198224897512703, -0.6198224897512703, -0.6198224897512703]]], [[[-0.82311664743046276, 
--0.6198224897512703, -0.6198224897512703, -0.98411327160277295], [-0.84677009076546872, -0.6198224897512703, 
--0.6198224897512703, -0.6198224897512703], [-0.65193081384960094, -0.6198224897512703, -0.6198224897512703, 
--0.6198224897512703]], [[-0.6198224897512703, -0.62133642270161471, -0.6198224897512703, -0.6198224897512703], 
-[-0.6198224897512703, -0.6198224897512703, -0.6198224897512703, -0.6198224897512703], [-0.6198224897512703, 
--0.6198224897512703, -0.6198224897512703, -0.94205779052527672]]]]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_expandedData_rank0(self):
-      arg0=numpy.array(0.241014004012)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.457147006796)+(1.-msk_arg1)*(0.227139154357)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.457147006796)+(1.-msk_ref)*(0.227139154357)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_expandedData_rank0(self):
-      arg0=numpy.array([0.43114521020975749, 0.25123749545997365])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.99599266468)+(1.-msk_arg1)*(-0.382405565433)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.99599266468023795, -0.99599266468023795])+(1.-msk_ref)*numpy.array([-0.3824055654327454, 
--0.3824055654327454])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_expandedData_rank0(self):
-      arg0=numpy.array([[0.32956811869988312, -0.72127093781956364, 0.15029370486346361, -0.98944296051175962, 
-0.87237931970997074], [-0.85087910536284106, -0.86252552109077363, -0.82444622757962271, -0.39010362623932537, 
-0.37533351790526615], [0.070658492002692475, 0.20863035530184848, 0.87001918006677337, 0.2481886335923762, 
--0.7581726725142397], [-0.48197484007023994, 0.82658729741930448, 0.90458054560265877, 0.73803797500734669, 
--0.69060406577633482]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.706056822366)+(1.-msk_arg1)*(-0.0808000064869)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.70605682236550793, -0.72127093781956364, -0.70605682236550793, -0.98944296051175962, 
--0.70605682236550793], [-0.85087910536284106, -0.86252552109077363, -0.82444622757962271, -0.70605682236550793, 
--0.70605682236550793], [-0.70605682236550793, -0.70605682236550793, -0.70605682236550793, -0.70605682236550793, 
--0.7581726725142397], [-0.70605682236550793, -0.70605682236550793, -0.70605682236550793, -0.70605682236550793, 
--0.70605682236550793]])+(1.-msk_ref)*numpy.array([[-0.080800006486851039, -0.72127093781956364, -0.080800006486851039, 
--0.98944296051175962, -0.080800006486851039], [-0.85087910536284106, -0.86252552109077363, -0.82444622757962271, 
--0.39010362623932537, -0.080800006486851039], [-0.080800006486851039, -0.080800006486851039, -0.080800006486851039, 
--0.080800006486851039, -0.7581726725142397], [-0.48197484007023994, -0.080800006486851039, -0.080800006486851039, 
--0.080800006486851039, -0.69060406577633482]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_expandedData_rank0(self):
-      arg0=numpy.array([[[0.21007160385608681, 0.11305037671936513], [0.1329485349489512, -0.37626478532743368]], 
-[[-0.95527489621779949, 0.37237241085840544], [-0.33392087721063235, 0.62050805087855454]], [[-0.8205233599259667, 
-0.12652200692553306], [-0.5949694037862463, 0.19068506824209219]], [[-0.60519441327651968, -0.18185610588607126], 
-[0.89518944895353969, -0.85635279227786532]], [[-0.52971437192678517, 0.24588120319937623], [0.15760323116388042, 
--0.870908007371749]], [[0.6586753617957728, -0.25550368902454612], [-0.95372243692221703, -0.071797083499290704]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.890951276982)+(1.-msk_arg1)*(0.623818404953)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.89095127698233023, -0.89095127698233023], [-0.89095127698233023, -0.89095127698233023]], 
-[[-0.95527489621779949, -0.89095127698233023], [-0.89095127698233023, -0.89095127698233023]], [[-0.89095127698233023, 
--0.89095127698233023], [-0.89095127698233023, -0.89095127698233023]], [[-0.89095127698233023, -0.89095127698233023], 
-[-0.89095127698233023, -0.89095127698233023]], [[-0.89095127698233023, -0.89095127698233023], [-0.89095127698233023, 
--0.89095127698233023]], [[-0.89095127698233023, -0.89095127698233023], [-0.95372243692221703, 
--0.89095127698233023]]])+(1.-msk_ref)*numpy.array([[[0.21007160385608681, 0.11305037671936513], [0.1329485349489512, 
--0.37626478532743368]], [[-0.95527489621779949, 0.37237241085840544], [-0.33392087721063235, 0.62050805087855454]], 
-[[-0.8205233599259667, 0.12652200692553306], [-0.5949694037862463, 0.19068506824209219]], [[-0.60519441327651968, 
--0.18185610588607126], [0.62381840495341323, -0.85635279227786532]], [[-0.52971437192678517, 0.24588120319937623], 
-[0.15760323116388042, -0.870908007371749]], [[0.62381840495341323, -0.25550368902454612], [-0.95372243692221703, 
--0.071797083499290704]]])
+   def test_generalTensorProduct_constData_rank4_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-6.0, 7.0, 1.0], [0.0, 0.0, -5.0]], [[-4.0, 7.0, -5.0], [2.0, 0.0, -7.0]], [[3.0, -1.0, 4.0], 
+[-1.0, 1.0, -5.0]], [[6.0, 2.0, 2.0], [-6.0, 1.0, 7.0]], [[7.0, 7.0, 7.0], [4.0, -2.0, 7.0]]], [[[-6.0, 0.0, -6.0], [-4.0, 
+-7.0, 1.0]], [[0.0, -7.0, -7.0], [-4.0, 3.0, -3.0]], [[-3.0, 4.0, 0.0], [5.0, 0.0, 3.0]], [[-4.0, -7.0, -5.0], [1.0, 4.0, 
+-4.0]], [[7.0, 7.0, 7.0], [-1.0, 1.0, 3.0]]], [[[-4.0, -2.0, 4.0], [2.0, 5.0, 7.0]], [[1.0, 0.0, -7.0], [0.0, -3.0, -1.0]], 
+[[4.0, 0.0, -3.0], [-7.0, 5.0, -7.0]], [[-5.0, -1.0, 0.0], [-7.0, 3.0, 0.0]], [[0.0, -1.0, -7.0], [7.0, 5.0, -5.0]]], [[[-1.0, 
+7.0, -6.0], [-3.0, 5.0, 5.0]], [[4.0, 0.0, 4.0], [5.0, -7.0, 3.0]], [[4.0, -6.0, 5.0], [6.0, 5.0, 1.0]], [[-7.0, -1.0, -7.0], 
+[0.0, -5.0, -7.0]], [[6.0, 0.0, 4.0], [4.0, 4.0, -6.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[1.0, 0.0, 2.0, -6.0, -4.0], [2.0, 6.0, 1.0, 0.0, 3.0], [-4.0, 4.0, -5.0, 3.0, -1.0], [-6.0, -7.0, 
+3.0, -7.0, -1.0]], [[5.0, 1.0, -7.0, 2.0, -5.0], [4.0, 5.0, 0.0, 7.0, -1.0], [0.0, 4.0, -6.0, 0.0, -3.0], [0.0, -7.0, -4.0, 
+7.0, -2.0]], [[-1.0, 3.0, -7.0, -3.0, -2.0], [6.0, -2.0, -4.0, 1.0, -5.0], [4.0, -3.0, 4.0, 0.0, 1.0], [0.0, 5.0, 0.0, 0.0, 
+-6.0]]], [[[1.0, 1.0, -6.0, 6.0, -3.0], [-7.0, -1.0, -3.0, -7.0, 7.0], [7.0, 6.0, -2.0, 5.0, -4.0], [-4.0, 5.0, 4.0, -5.0, 
+0.0]], [[-1.0, 6.0, 0.0, -5.0, 4.0], [7.0, 7.0, -2.0, -7.0, -6.0], [-2.0, 0.0, -5.0, 0.0, 2.0], [-1.0, -4.0, 7.0, 4.0, -5.0]], 
+[[4.0, 7.0, -7.0, 6.0, -3.0], [-2.0, 7.0, -3.0, 0.0, 4.0], [6.0, 0.0, -7.0, 5.0, -2.0], [3.0, 0.0, -3.0, 0.0, 3.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[8.0, -25.0, -33.0, 17.0, 2.0], [32.0, -38.0, 5.0, 50.0, -50.0], [-2.0, 1.0, 27.0, -43.0, -4.0], 
+[21.0, -2.0, -31.0, 91.0, -29.0]], [[10.0, -55.0, 15.0, 23.0, 6.0], [-10.0, -30.0, 31.0, 30.0, -8.0], [-32.0, 39.0, 3.0, -37.0, 
+-16.0], [-5.0, -36.0, -11.0, 67.0, -1.0]], [[-28.0, -19.0, 26.0, -73.0, 7.0], [50.0, -22.0, 3.0, -3.0, -43.0], [-35.0, -10.0, 
+39.0, -21.0, 20.0], [-30.0, -3.0, 31.0, -19.0, -45.0]], [[35.0, 57.0, -29.0, -37.0, -37.0], [67.0, 104.0, -7.0, 51.0, -14.0], 
+[-18.0, -10.0, -76.0, 23.0, 2.0], [8.0, -80.0, -28.0, 6.0, -6.0]], [[69.0, 69.0, -157.0, 27.0, -118.0], [28.0, 94.0, -50.0, 
+42.0, 47.0], [74.0, 59.0, -96.0, 76.0, -55.0], [-35.0, -35.0, -26.0, -28.0, -32.0]]], [[[7.0, -57.0, 47.0, 71.0, 17.0], [-71.0, 
+-62.0, 41.0, 71.0, 30.0], [-8.0, -30.0, 42.0, -33.0, 0.0], [62.0, 20.0, -86.0, 34.0, 80.0]], [[-47.0, -35.0, 143.0, -50.0, 
+82.0], [-15.0, -17.0, 43.0, -49.0, -16.0], [-80.0, -31.0, 28.0, -35.0, 42.0], [4.0, -18.0, 42.0, -17.0, 32.0]], [[34.0, 30.0, 
+-85.0, 74.0, -32.0], [-31.0, 18.0, -27.0, -7.0, 34.0], [65.0, 34.0, -40.0, 31.0, -35.0], [7.0, 18.0, -14.0, 24.0, 4.0]], 
+[[-53.0, -25.0, 98.0, -13.0, 86.0], [-37.0, -50.0, 17.0, -89.0, -13.0], [-29.0, -23.0, 48.0, -27.0, 32.0], [4.0, 41.0, 60.0, 
+-10.0, 16.0]], [[45.0, 54.0, -99.0, -42.0, -79.0], [92.0, 92.0, -29.0, 56.0, -22.0], [9.0, 29.0, -73.0, 31.0, -21.0], [-30.0, 
+-72.0, -13.0, 9.0, -59.0]]], [[[7.0, 91.0, -83.0, 37.0, 11.0], [15.0, 40.0, -57.0, -59.0, -18.0], [78.0, -24.0, -30.0, 33.0, 
+2.0], [32.0, 52.0, 18.0, 24.0, -20.0]], [[7.0, -46.0, 58.0, 24.0, 1.0], [-59.0, -8.0, 38.0, 14.0, 52.0], [-32.0, 25.0, -11.0, 
+-2.0, -12.0], [-6.0, -30.0, -15.0, -19.0, 53.0]], [[-33.0, -35.0, 120.0, -124.0, 52.0], [88.0, 23.0, 48.0, 11.0, -80.0], 
+[-129.0, -17.0, 6.0, -58.0, 45.0], [-22.0, -98.0, 40.0, 27.0, -32.0]], [[-20.0, 10.0, 39.0, -29.0, 58.0], [56.0, -7.0, 10.0, 
+21.0, -81.0], [-35.0, -66.0, 30.0, -50.0, 42.0], [55.0, -5.0, -18.0, 75.0, -8.0]], [[-16.0, -20.0, 49.0, 6.0, 33.0], [-50.0, 
+2.0, 12.0, -98.0, 35.0], [-19.0, 59.0, -26.0, 10.0, -12.0], [-48.0, -13.0, 82.0, -22.0, 4.0]]], [[[52.0, 51.0, -26.0, 25.0, 
+-5.0], [36.0, 114.0, 7.0, 29.0, -11.0], [-21.0, 24.0, -115.0, 7.0, -14.0], [28.0, -107.0, -23.0, 91.0, 13.0]], [[24.0, -4.0, 
+-71.0, 47.0, -76.0], [-58.0, -17.0, -22.0, 18.0, 81.0], [67.0, 34.0, 0.0, 52.0, -40.0], [-28.0, 45.0, -26.0, -81.0, 16.0]], 
+[[-26.0, 52.0, -28.0, -34.0, 3.0], [5.0, 20.0, -47.0, -114.0, 9.0], [42.0, 13.0, -8.0, 47.0, 3.0], [-50.0, 49.0, 92.0, -80.0, 
+-44.0]], [[-28.0, -101.0, 91.0, 44.0, 48.0], [-81.0, -117.0, 52.0, 21.0, 17.0], [-32.0, -11.0, 87.0, -56.0, 7.0], [26.0, 41.0, 
+-31.0, 22.0, 55.0]], [[-22.0, -2.0, 2.0, -80.0, -10.0], [48.0, 10.0, -12.0, -52.0, -22.0], [-24.0, 36.0, 0.0, 8.0, 2.0], 
+[-74.0, -18.0, 80.0, -46.0, -68.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_expandedData_rank0(self):
-      arg0=numpy.array([[[[0.5319546215297335, 0.014486017479623303, -0.54561251957725654, 0.70676057147864357], 
-[0.95665516215206936, 0.42356636884393906, 0.39029118354891779, 0.44603954002421675], [0.92990219203288915, 
--0.90909317758589392, 0.46611081644715724, 0.29055430681920802]], [[-0.91155951283019276, 0.74250070159423065, 
--0.94260663726745997, 0.21713004866508911], [0.37717440578553885, 0.55086890867978577, 0.48044217937659273, 
-0.87125216315341114], [0.0012827116164471075, 0.10391331945326088, -0.89512521613322171, -0.63242089633718823]]], 
-[[[0.99287218328082161, -0.60268837233942274, -0.45797847239881295, 0.78879545032188858], [-0.19319080141923073, 
-0.75615504801389899, 0.47818809342018209, -0.16124654985220377], [0.85197759536734896, 0.15549246283537355, 
-0.75129715031855548, -0.44165321471408414]], [[0.25971006353169246, 0.052116379050871187, 0.68949102137257401, 
--0.59886239358865256], [0.14346581310485762, -0.3117872771788206, 0.44953749857580161, 0.92090364630578914], 
-[0.40751637305011257, -0.54069505182237121, -0.71213156573192404, 0.58153046320690138]]], [[[-0.42132810212390703, 
-0.48730929096977937, 0.19411109887127287, 0.099214783457927114], [-0.84318150658342517, -0.66492817632386658, 
--0.14704164995798408, -0.18152600563982224], [-0.21604880586706798, -0.56126901733033363, -0.24748282523677911, 
--0.84868545378868609]], [[0.13568526650716017, 0.96708538831757584, -0.15109262038747517, -0.46535759104069307], 
-[0.049465625840152461, -0.22606211316804803, 0.052449869862204679, -0.23571546724487868], [-0.33605192256366734, 
-0.36904095940403669, -0.33972902717567965, -0.55168459126114211]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.778218875313)+(1.-msk_arg1)*(0.921171099156)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309], 
-[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309], [-0.77821887531322309, 
--0.90909317758589392, -0.77821887531322309, -0.77821887531322309]], [[-0.91155951283019276, -0.77821887531322309, 
--0.94260663726745997, -0.77821887531322309], [-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, 
--0.77821887531322309], [-0.77821887531322309, -0.77821887531322309, -0.89512521613322171, -0.77821887531322309]]], 
-[[[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309], [-0.77821887531322309, 
--0.77821887531322309, -0.77821887531322309, -0.77821887531322309], [-0.77821887531322309, -0.77821887531322309, 
--0.77821887531322309, -0.77821887531322309]], [[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, 
--0.77821887531322309], [-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309], 
-[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309]]], [[[-0.77821887531322309, 
--0.77821887531322309, -0.77821887531322309, -0.77821887531322309], [-0.84318150658342517, -0.77821887531322309, 
--0.77821887531322309, -0.77821887531322309], [-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, 
--0.84868545378868609]], [[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309], 
-[-0.77821887531322309, -0.77821887531322309, -0.77821887531322309, -0.77821887531322309], [-0.77821887531322309, 
--0.77821887531322309, -0.77821887531322309, -0.77821887531322309]]]])+(1.-msk_ref)*numpy.array([[[[0.5319546215297335, 
-0.014486017479623303, -0.54561251957725654, 0.70676057147864357], [0.92117109915615503, 0.42356636884393906, 
-0.39029118354891779, 0.44603954002421675], [0.92117109915615503, -0.90909317758589392, 0.46611081644715724, 
-0.29055430681920802]], [[-0.91155951283019276, 0.74250070159423065, -0.94260663726745997, 0.21713004866508911], 
-[0.37717440578553885, 0.55086890867978577, 0.48044217937659273, 0.87125216315341114], [0.0012827116164471075, 
-0.10391331945326088, -0.89512521613322171, -0.63242089633718823]]], [[[0.92117109915615503, -0.60268837233942274, 
--0.45797847239881295, 0.78879545032188858], [-0.19319080141923073, 0.75615504801389899, 0.47818809342018209, 
--0.16124654985220377], [0.85197759536734896, 0.15549246283537355, 0.75129715031855548, -0.44165321471408414]], 
-[[0.25971006353169246, 0.052116379050871187, 0.68949102137257401, -0.59886239358865256], [0.14346581310485762, 
--0.3117872771788206, 0.44953749857580161, 0.92090364630578914], [0.40751637305011257, -0.54069505182237121, 
--0.71213156573192404, 0.58153046320690138]]], [[[-0.42132810212390703, 0.48730929096977937, 0.19411109887127287, 
-0.099214783457927114], [-0.84318150658342517, -0.66492817632386658, -0.14704164995798408, -0.18152600563982224], 
-[-0.21604880586706798, -0.56126901733033363, -0.24748282523677911, -0.84868545378868609]], [[0.13568526650716017, 
-0.92117109915615503, -0.15109262038747517, -0.46535759104069307], [0.049465625840152461, -0.22606211316804803, 
-0.052449869862204679, -0.23571546724487868], [-0.33605192256366734, 0.36904095940403669, -0.33972902717567965, 
--0.55168459126114211]]]])
+   def test_generalTensorProduct_constData_rank2_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[7.0, -4.0, -1.0, 0.0, -1.0], [-5.0, 2.0, -5.0, -2.0, 2.0], [-2.0, -7.0, 5.0, -3.0, -1.0], [-7.0, 
+0.0, 4.0, 3.0, 1.0]]),self.functionspace)
+      arg1=Data(-5.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-35.0, 20.0, 5.0, -0.0, 5.0], [25.0, -10.0, 25.0, 10.0, -10.0], [10.0, 35.0, -25.0, 15.0, 5.0], 
+[35.0, -0.0, -20.0, -15.0, -5.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_array_rank1(self):
-      arg0=numpy.array(0.960254008827)
-      arg1=numpy.array([-0.66609491116549435, -0.87378120113921232])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([-0.66609491116549435, -0.87378120113921232])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_array_rank1(self):
-      arg0=numpy.array([-0.38894166493230808, 0.20208487199063119])
-      arg1=numpy.array([0.89827294190446416, -0.96322664887318887])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([-0.38894166493230808, -0.96322664887318887])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_constData_rank1(self):
-      arg0=numpy.array(-0.731395791021)
-      arg1=Data(numpy.array([0.53510826895876917, 0.51633606525927722]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.7313957910208817, -0.7313957910208817]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -4.0, 3.0], [2.0, 5.0, 1.0], [-6.0, -7.0, 7.0], [6.0, -7.0, 5.0], [-2.0, 1.0, 4.0]], [[7.0, 
+-6.0, 0.0], [3.0, 3.0, -5.0], [4.0, -2.0, 0.0], [4.0, -4.0, -4.0], [5.0, 7.0, 4.0]], [[-5.0, -4.0, 7.0], [-1.0, -1.0, -6.0], 
+[7.0, -4.0, 6.0], [3.0, -6.0, 1.0], [4.0, 0.0, 6.0]], [[3.0, 1.0, 6.0], [5.0, -7.0, 1.0], [-3.0, -3.0, -2.0], [-6.0, 3.0, 6.0], 
+[0.0, 4.0, 4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-6.0, 5.0, 2.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-14.0, 15.0, 15.0, -61.0, 25.0], [-72.0, -13.0, -34.0, -52.0, 13.0], [24.0, -11.0, -50.0, -46.0, 
+-12.0], [-1.0, -63.0, -1.0, 63.0, 28.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_constData_rank1(self):
-      arg0=numpy.array([0.1714742838097425, 0.66214623250405524])
-      arg1=Data(numpy.array([0.79240518333092513, 0.38008637184861516]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([0.1714742838097425, 0.38008637184861516]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[7.0, 4.0, 0.0], [2.0, 5.0, 7.0]], [[-1.0, 0.0, 3.0], [6.0, 0.0, -2.0]], [[2.0, 5.0, -7.0], 
+[-3.0, 0.0, 7.0]], [[-5.0, 7.0, 2.0], [-4.0, 7.0, 7.0]], [[3.0, -1.0, 0.0], [4.0, -5.0, 5.0]]], [[[-4.0, -1.0, 2.0], [1.0, 2.0, 
+2.0]], [[0.0, 0.0, -5.0], [-4.0, 7.0, -6.0]], [[-1.0, 6.0, 1.0], [7.0, 0.0, 7.0]], [[0.0, 6.0, -7.0], [-7.0, 5.0, -1.0]], 
+[[7.0, 4.0, -2.0], [5.0, 6.0, -1.0]]], [[[-3.0, -2.0, 3.0], [-4.0, 3.0, 0.0]], [[7.0, -7.0, 4.0], [7.0, 0.0, -7.0]], [[0.0, 
+3.0, -7.0], [-7.0, -1.0, 3.0]], [[0.0, 0.0, -7.0], [0.0, 1.0, 5.0]], [[-4.0, 0.0, 5.0], [4.0, -5.0, 2.0]]], [[[0.0, 2.0, -5.0], 
+[7.0, 0.0, 2.0]], [[1.0, 0.0, 6.0], [-1.0, 0.0, -5.0]], [[2.0, 0.0, 5.0], [-1.0, -5.0, 1.0]], [[-2.0, -2.0, -6.0], [-5.0, 4.0, 
+-3.0]], [[2.0, 0.0, 0.0], [0.0, -7.0, -4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-5.0, 0.0, -2.0], [0.0, 0.0, -6.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-77.0, 11.0, -38.0, -21.0, -45.0], [4.0, 46.0, -39.0, 20.0, -25.0], [9.0, -1.0, -4.0, -16.0, 
+-2.0], [-2.0, 13.0, -26.0, 40.0, 14.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_expandedData_rank1(self):
-      arg0=numpy.array(0.770633081927)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.8170469154149016, -0.29762829699380955])+(1.-msk_arg1)*numpy.array([-0.57189641056897145, 
--0.86898445344861885])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.8170469154149016, -0.29762829699380955])+(1.-msk_ref)*numpy.array([-0.57189641056897145, 
--0.86898445344861885])
+   def test_generalTensorProduct_constData_rank2_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-4.0, 7.0, 6.0, 4.0, 6.0], [0.0, -3.0, -6.0, 3.0, -7.0], [5.0, 4.0, -5.0, -4.0, -5.0], [6.0, 
+-3.0, -4.0, -6.0, 5.0]]),self.functionspace)
+      arg1=Data(numpy.array([2.0, -6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-8.0, 24.0], [14.0, -42.0], [12.0, -36.0], [8.0, -24.0], [12.0, -36.0]], [[0.0, 0.0], [-6.0, 
+18.0], [-12.0, 36.0], [6.0, -18.0], [-14.0, 42.0]], [[10.0, -30.0], [8.0, -24.0], [-10.0, 30.0], [-8.0, 24.0], [-10.0, 30.0]], 
+[[12.0, -36.0], [-6.0, 18.0], [-8.0, 24.0], [-12.0, 36.0], [10.0, -30.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank1_expandedData_rank1(self):
-      arg0=numpy.array([0.41049279682053763, -0.53167200359367706])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.54148250128142039, 0.16845646697398187])+(1.-msk_arg1)*numpy.array([0.85939525034344966, 
-0.39108855742598903])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.41049279682053763, -0.53167200359367706])+(1.-msk_ref)*numpy.array([0.41049279682053763, 
--0.53167200359367706])
+   def test_generalTensorProduct_constData_rank3_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[3.0, 0.0, -5.0], [-7.0, -7.0, 3.0], [-4.0, -4.0, -4.0], [-4.0, -2.0, -7.0], [5.0, -7.0, 0.0]], 
+[[-4.0, 3.0, -6.0], [6.0, 6.0, -2.0], [-7.0, 3.0, 3.0], [0.0, -5.0, -6.0], [-2.0, -3.0, -3.0]], [[5.0, 1.0, 4.0], [-6.0, 1.0, 
+7.0], [0.0, -2.0, 4.0], [6.0, -1.0, -6.0], [-2.0, -2.0, 6.0]], [[-5.0, 2.0, -2.0], [-7.0, 3.0, -6.0], [7.0, 1.0, -3.0], [-4.0, 
+-1.0, 7.0], [-5.0, -6.0, -4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[1.0, -7.0], [6.0, -5.0], [3.0, 5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-12.0, -46.0], [-40.0, 99.0], [-40.0, 28.0], [-37.0, 3.0], [-37.0, 0.0]], [[-4.0, -17.0], [36.0, 
+-82.0], [20.0, 49.0], [-48.0, -5.0], [-29.0, 14.0]], [[23.0, -20.0], [21.0, 72.0], [0.0, 30.0], [-18.0, -67.0], [4.0, 54.0]], 
+[[1.0, 15.0], [-7.0, 4.0], [4.0, -69.0], [11.0, 68.0], [-53.0, 45.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_array_rank2(self):
-      arg0=numpy.array(0.886650683606)
-      arg1=numpy.array([[-0.65399170339400814, 0.47980443873712031, -0.25085945423758371, -0.028943356192464353, 
-0.81546730268100753], [0.57632529126086918, -0.36854370936412906, 0.81416498341382249, 0.27632464907736343, 
-0.58458812649896674], [0.4716175113202945, 0.35448013516386245, 0.018767823745010626, 0.56206535311293981, 
--0.28073247599362805], [-0.78383718255395873, -0.77266624598659006, -0.46461735860239917, 0.44552501249197496, 
--0.28151470416065716]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[-0.65399170339400814, 0.47980443873712031, -0.25085945423758371, -0.028943356192464353, 
-0.81546730268100753], [0.57632529126086918, -0.36854370936412906, 0.81416498341382249, 0.27632464907736343, 
-0.58458812649896674], [0.4716175113202945, 0.35448013516386245, 0.018767823745010626, 0.56206535311293981, 
--0.28073247599362805], [-0.78383718255395873, -0.77266624598659006, -0.46461735860239917, 0.44552501249197496, 
--0.28151470416065716]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_array_rank2(self):
-      arg0=numpy.array([[-0.33033503295609346, 0.14920008371124904, 0.76638872345598585, 0.67290758513209004, 
--0.13428745331417624], [-0.763692946784162, 0.60795873984430937, 0.56376621800116311, -0.90622233301415278, 
--0.95353924031714676], [0.11895544876173392, 0.73118052844668591, 0.89037593914185598, -0.17977961042776203, 
--0.95894626264533112], [-0.58212225400480455, 0.81630235390327277, -0.9290666495511597, 0.025047408496705836, 
--0.51157939784496564]])
-      arg1=numpy.array([[0.61873938162772646, 0.49746335505769168, 0.063416602568223901, -0.061568244302447672, 
--0.99370907587651902], [-0.79347164177425111, 0.78351121005795665, 0.4527345542965644, -0.6309610156799359, 
-0.040831744033480666], [0.86011562640382211, -0.03710348102207317, 0.40344479967307523, -0.34196234788019897, 
--0.097843135118964364], [0.22327526174792123, -0.6270958938205442, -0.58788184415622369, -0.34140040204976252, 
--0.18752742848795667]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[-0.33033503295609346, 0.14920008371124904, 0.063416602568223901, -0.061568244302447672, 
--0.99370907587651902], [-0.79347164177425111, 0.60795873984430937, 0.4527345542965644, -0.90622233301415278, 
--0.95353924031714676], [0.11895544876173392, -0.03710348102207317, 0.40344479967307523, -0.34196234788019897, 
--0.95894626264533112], [-0.58212225400480455, -0.6270958938205442, -0.9290666495511597, -0.34140040204976252, 
--0.51157939784496564]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_constData_rank2(self):
-      arg0=numpy.array(-0.372822602531)
-      arg1=Data(numpy.array([[0.72628613344987181, 0.50327993112189007, 0.9193025455046322, 0.82868336373458495, 
-0.67610666756669557], [0.97218830704717463, -0.44810794051580394, -0.94732714933736517, 0.57150664067167622, 
-0.27183454929052608], [-0.9405370053109674, -0.96009187309070909, 0.73298247999572808, 0.22203108993302645, 
-0.35811406887935404], [-0.013576202508727597, -0.14720442130805989, 0.90781108331407112, -0.25737497489237193, 
-0.54985552366240609]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.37282260253057853, -0.37282260253057853, -0.37282260253057853, -0.37282260253057853, 
--0.37282260253057853], [-0.37282260253057853, -0.44810794051580394, -0.94732714933736517, -0.37282260253057853, 
--0.37282260253057853], [-0.9405370053109674, -0.96009187309070909, -0.37282260253057853, -0.37282260253057853, 
--0.37282260253057853], [-0.37282260253057853, -0.37282260253057853, -0.37282260253057853, -0.37282260253057853, 
--0.37282260253057853]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[0.78275358721638888, 0.013870539089549494, -0.32339075804088613, -0.027328231721210017, 
--0.099374020448430134], [-0.77823473646082952, 0.52402046446606088, 0.55663042341320157, 0.42491774012211403, 
-0.21493436248644882], [0.83326564594425867, -0.1260860351322981, 0.50885191862449197, -0.97006016463034173, 
-0.56992486824713295], [-0.71316955615260413, 0.42719756593962277, 0.29616224873037789, -0.072683279822802316, 
--0.8517359579542032]])
-      arg1=Data(numpy.array([[0.66470003290035251, 0.18486555639964108, -0.98204547383856067, -0.15942552938494137, 
--0.14875789909341375], [-0.33159592694847673, 0.077392701340451175, 0.45890670062481798, -0.22535620257887934, 
--0.3310921066635728], [0.13803969146973882, -0.039958188696183949, 0.049577345690025254, 0.091617517260889958, 
--0.67195731085357058], [-0.34948904665046587, -0.17370967665836745, -0.37287470045721727, -0.14888793861918637, 
--0.29632405958706576]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[0.66470003290035251, 0.013870539089549494, -0.98204547383856067, -0.15942552938494137, 
--0.14875789909341375], [-0.77823473646082952, 0.077392701340451175, 0.45890670062481798, -0.22535620257887934, 
--0.3310921066635728], [0.13803969146973882, -0.1260860351322981, 0.049577345690025254, -0.97006016463034173, 
--0.67195731085357058], [-0.71316955615260413, -0.17370967665836745, -0.37287470045721727, -0.14888793861918637, 
--0.8517359579542032]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_expandedData_rank2(self):
-      arg0=numpy.array(-0.637530102226)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[0.59807216885365033, -0.66094264631987287, 0.1467742033353252, 0.14926516531057832, 
-0.036308193213772766], [-0.98363286133358918, -0.58648307185312598, 0.094047680117578469, -0.07815794946211474, 
-0.59519966122415746], [0.67160795944833729, 0.87835497110541016, 0.53893624842926147, -0.50569954639711234, 
--0.88259518993263697], [-0.56480487916923394, -0.43716018144810365, 0.47779476696933854, 0.75402797028101309, 
--0.78550418646809828]])+(1.-msk_arg1)*numpy.array([[-0.67836057167916808, 0.25817773105522512, -0.55590752578847713, 
--0.37042155216568817, -0.38068486553076886], [-0.29957095557543933, -0.49327680200822166, 0.97116509867177037, 
--0.15461941909736865, 0.18640933745498134], [-0.062767091537753616, 0.37485538624605508, 0.85725224712282655, 
-0.76653901471472929, -0.24928692146813658], [0.59860836449271515, -0.69948672203405149, -0.45656755189509557, 
--0.30014445425305292, -0.30942585188514604]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.63753010222647744, -0.66094264631987287, -0.63753010222647744, -0.63753010222647744, 
--0.63753010222647744], [-0.98363286133358918, -0.63753010222647744, -0.63753010222647744, -0.63753010222647744, 
--0.63753010222647744], [-0.63753010222647744, -0.63753010222647744, -0.63753010222647744, -0.63753010222647744, 
--0.88259518993263697], [-0.63753010222647744, -0.63753010222647744, -0.63753010222647744, -0.63753010222647744, 
--0.78550418646809828]])+(1.-msk_ref)*numpy.array([[-0.67836057167916808, -0.63753010222647744, -0.63753010222647744, 
--0.63753010222647744, -0.63753010222647744], [-0.63753010222647744, -0.63753010222647744, -0.63753010222647744, 
--0.63753010222647744, -0.63753010222647744], [-0.63753010222647744, -0.63753010222647744, -0.63753010222647744, 
--0.63753010222647744, -0.63753010222647744], [-0.63753010222647744, -0.69948672203405149, -0.63753010222647744, 
--0.63753010222647744, -0.63753010222647744]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[-0.13611954010555682, -0.58442826873562659, 0.78399043478976482, -0.4804011172459175, 
--0.68188345765257696], [-0.18552675805111951, -0.29045979536132926, 0.15992135022530518, 0.16384701397334345, 
--0.65137403965964369], [0.51543557690911634, -0.97819571140752926, -0.96836272151235891, -0.13965398445259325, 
--0.31589396478709886], [-0.26685094001247323, 0.9990205085652557, 0.46747732907560868, -0.59994040792857128, 
--0.896108124510266]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.34894152894459185, 0.90762321494679665, -0.97878939335657056, 0.2745456947117868, 
-0.48803358804154273], [0.38716880605185122, -0.058351115663058506, 0.45162240402813536, -0.03794281391886134, 
-0.55481142352719881], [0.93601145392657181, -0.73735739898988362, -0.88202008227545714, -0.72566359273837544, 
--0.35070506745617847], [0.64345030423445149, 0.42641364278345173, -0.94607743162746849, -0.0096308587427624825, 
-0.56327698410566085]])+(1.-msk_arg1)*numpy.array([[-0.36711228363198467, 0.60993685278791365, 0.67388569157974287, 
--0.39140988838288182, -0.1945456360227622], [-0.33055765121925584, 0.35776313895404321, -0.87249443881683586, 
--0.58774954006405578, -0.29392346801996938], [0.29587592498579318, 0.057559557483068513, 0.52394023815596058, 
-0.49672424405480009, -0.97022178907476664], [0.42099470426519003, -0.093764421364879169, -0.9094771825968202, 
-0.73952907119560729, 0.89047956672450312]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.34894152894459185, -0.58442826873562659, -0.97878939335657056, -0.4804011172459175, 
--0.68188345765257696], [-0.18552675805111951, -0.29045979536132926, 0.15992135022530518, -0.03794281391886134, 
--0.65137403965964369], [0.51543557690911634, -0.97819571140752926, -0.96836272151235891, -0.72566359273837544, 
--0.35070506745617847], [-0.26685094001247323, 0.42641364278345173, -0.94607743162746849, -0.59994040792857128, 
--0.896108124510266]])+(1.-msk_ref)*numpy.array([[-0.36711228363198467, -0.58442826873562659, 0.67388569157974287, 
--0.4804011172459175, -0.68188345765257696], [-0.33055765121925584, -0.29045979536132926, -0.87249443881683586, 
--0.58774954006405578, -0.65137403965964369], [0.29587592498579318, -0.97819571140752926, -0.96836272151235891, 
--0.13965398445259325, -0.97022178907476664], [-0.26685094001247323, -0.093764421364879169, -0.9094771825968202, 
--0.59994040792857128, -0.896108124510266]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_array_rank3(self):
-      arg0=numpy.array(-0.160330065964)
-      arg1=numpy.array([[[0.66642437288411904, -0.9539277688704344], [-0.21909074438146647, 0.28178316529445091]], 
-[[-0.96337470673707815, -0.04634602269617405], [-0.046220251565481041, 0.06720708926727248]], [[0.93281550648799061, 
-0.74175233295480569], [-0.49306838408655018, 0.69539856077920503]], [[-0.5700912419893196, -0.079304552093697911], 
-[0.35674517284883289, -0.37426284214721428]], [[-0.2261370585629694, 0.37269786708046104], [-0.23891963570307384, 
-0.37569228452350978]], [[-0.8689417221552671, -0.62092135302941887], [0.079810053424291816, -0.59449663162803823]]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[-0.16033006596359911, -0.9539277688704344], [-0.21909074438146647, -0.16033006596359911]], 
-[[-0.96337470673707815, -0.16033006596359911], [-0.16033006596359911, -0.16033006596359911]], [[-0.16033006596359911, 
--0.16033006596359911], [-0.49306838408655018, -0.16033006596359911]], [[-0.5700912419893196, -0.16033006596359911], 
-[-0.16033006596359911, -0.37426284214721428]], [[-0.2261370585629694, -0.16033006596359911], [-0.23891963570307384, 
--0.16033006596359911]], [[-0.8689417221552671, -0.62092135302941887], [-0.16033006596359911, -0.59449663162803823]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank4_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-2.0, -1.0, 6.0], [3.0, 0.0, -1.0]], [[-4.0, -3.0, -4.0], [0.0, 2.0, -4.0]], [[-6.0, 2.0, 3.0], 
+[7.0, -1.0, 0.0]], [[-4.0, 3.0, 4.0], [0.0, 0.0, 4.0]], [[5.0, 1.0, -5.0], [5.0, 0.0, 6.0]]], [[[2.0, 1.0, 1.0], [-5.0, 7.0, 
+6.0]], [[-7.0, 1.0, 4.0], [0.0, 6.0, 1.0]], [[-3.0, -2.0, 3.0], [2.0, 7.0, 0.0]], [[-4.0, -7.0, -5.0], [-7.0, -6.0, 0.0]], 
+[[-1.0, 2.0, 6.0], [4.0, 4.0, 6.0]]], [[[6.0, 0.0, 1.0], [0.0, 0.0, 3.0]], [[-4.0, -5.0, 0.0], [7.0, 0.0, 4.0]], [[-1.0, 7.0, 
+0.0], [0.0, -4.0, 4.0]], [[-2.0, -3.0, -1.0], [-4.0, 0.0, 2.0]], [[-2.0, 7.0, 6.0], [-4.0, 3.0, 2.0]]], [[[7.0, -3.0, 4.0], 
+[7.0, -7.0, -2.0]], [[-1.0, -3.0, -2.0], [2.0, 3.0, 1.0]], [[-7.0, 3.0, -5.0], [-3.0, -5.0, -3.0]], [[7.0, -3.0, 6.0], [-5.0, 
+1.0, -6.0]], [[6.0, -4.0, 7.0], [4.0, 0.0, -2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-7.0, -5.0], [6.0, -3.0], [-2.0, 6.0]], [[0.0, -1.0], [0.0, -6.0], [-5.0, 
+7.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[1.0, 39.0], [38.0, -35.0], [48.0, 41.0], [18.0, 63.0], [-49.0, -21.0]], [[-40.0, -2.0], [42.0, 
+27.0], [3.0, -5.0], [-4.0, 54.0], [-23.0, 49.0]], [[-59.0, -3.0], [-22.0, 56.0], [29.0, 36.0], [-12.0, 31.0], [34.0, 25.0]], 
+[[-65.0, 19.0], [-12.0, -11.0], [92.0, 8.0], [-49.0, -33.0], [-70.0, 6.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_array_rank3(self):
-      arg0=numpy.array([[[-0.8423526318709591, -0.16053619313971046], [0.73189603499057876, -0.38237117980202173]], 
-[[0.38584994653117577, 0.85015131457011228], [0.32983458172008606, 0.57811782533087275]], [[-0.98579258243383894, 
--0.42979707397457023], [-0.43261722389463531, -0.23370476519492356]], [[-0.52471160167446484, -0.9508706003642684], 
-[0.42661463243079112, 0.16754764921086163]], [[-0.068683949091622454, -0.82327987329609287], [0.21978392262225999, 
-0.34359441114911049]], [[-0.93043809811342815, 0.35820386607448906], [0.94948379953751361, 0.019561305096486903]]])
-      arg1=numpy.array([[[0.95683035066787214, 0.11003778351929938], [0.47613188450434341, -0.30465302048878229]], 
-[[0.11097248204969623, 0.69505330674919286], [0.062351207203307446, 0.50933617475673865]], [[0.13215588609064022, 
-0.13770293801069466], [-0.53759649782456798, 0.79212030026190883]], [[-0.67581481944096478, -0.83475159690761158], 
-[0.54132413076965058, 0.92842304332122683]], [[-0.74564446845387677, -0.31318928847970628], [0.2820014665884687, 
--0.48198054219113651]], [[-0.16623544819263958, -0.0028432350581752974], [-0.38154927399718419, 0.66989103426736252]]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[-0.8423526318709591, -0.16053619313971046], [0.47613188450434341, -0.38237117980202173]], 
-[[0.11097248204969623, 0.69505330674919286], [0.062351207203307446, 0.50933617475673865]], [[-0.98579258243383894, 
--0.42979707397457023], [-0.53759649782456798, -0.23370476519492356]], [[-0.67581481944096478, -0.9508706003642684], 
-[0.42661463243079112, 0.16754764921086163]], [[-0.74564446845387677, -0.82327987329609287], [0.21978392262225999, 
--0.48198054219113651]], [[-0.93043809811342815, -0.0028432350581752974], [-0.38154927399718419, 0.019561305096486903]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_constData_rank3(self):
-      arg0=numpy.array(-0.415889907293)
-      arg1=Data(numpy.array([[[0.078285035507941636, -0.88829449384195969], [0.78284628623875596, 0.48487975776181758]], 
-[[-0.64877397556696148, 0.27779634599817737], [-0.46090863581088648, -0.55154952339707375]], [[0.092940243150796631, 
-0.28795449293522557], [-0.7542371081895396, -0.9093143329877087]], [[0.63399239655683126, 0.81538932920917251], 
-[-0.68950618704829258, 0.13515238776853478]], [[-0.98817482146142543, -0.65010930256058352], [0.86444673534538152, 
--0.95207803410803282]], [[-0.92838098819484083, -0.055470455907630667], [-0.39027240185255807, 
-0.58151262225085487]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.41588990729265674, -0.88829449384195969], [-0.41588990729265674, -0.41588990729265674]], 
-[[-0.64877397556696148, -0.41588990729265674], [-0.46090863581088648, -0.55154952339707375]], [[-0.41588990729265674, 
--0.41588990729265674], [-0.7542371081895396, -0.9093143329877087]], [[-0.41588990729265674, -0.41588990729265674], 
-[-0.68950618704829258, -0.41588990729265674]], [[-0.98817482146142543, -0.65010930256058352], [-0.41588990729265674, 
--0.95207803410803282]], [[-0.92838098819484083, -0.41588990729265674], [-0.41588990729265674, 
--0.41588990729265674]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_constData_rank3(self):
-      arg0=numpy.array([[[0.23230794457336801, 0.6295482391959788], [-0.86598061725124631, -0.71081480028995569]], 
-[[-0.0070531167247123161, -0.16394097673965735], [0.29985683892413628, -0.14835484085662687]], [[0.082331089547942993, 
--0.077703177546636137], [0.15993152398681709, -0.67249786082949115]], [[0.71817030563728057, 0.91126316805303298], 
-[0.6552162285397114, -0.052120819881793956]], [[0.47085218410118945, 0.47762222399359455], [0.69638513430354543, 
--0.29164000136522406]], [[0.49701961970062092, 0.43153336108405438], [-0.13926013494181588, -0.074842289140794493]]])
-      arg1=Data(numpy.array([[[-0.71759635999776594, 0.7956629210514985], [-0.70190580432881067, 0.50873386933266262]], 
-[[-0.83072489665769789, 0.96369912618839826], [0.83008627283250647, -0.75029334468040298]], [[-0.4968341939778611, 
-0.41495249799406775], [0.023558072093853744, -0.45220570760800594]], [[-0.98470889446903631, -0.45939707055229384], 
-[0.25767031211634528, 0.26171833423275404]], [[-0.58834348362746614, -0.78118404391334062], [0.45620441373827947, 
-0.75119227847384784]], [[-0.49513587087712052, -0.77230564464754425], [0.69120761611386072, 
-0.32178715271392666]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.71759635999776594, 0.6295482391959788], [-0.86598061725124631, -0.71081480028995569]], 
-[[-0.83072489665769789, -0.16394097673965735], [0.29985683892413628, -0.75029334468040298]], [[-0.4968341939778611, 
--0.077703177546636137], [0.023558072093853744, -0.67249786082949115]], [[-0.98470889446903631, -0.45939707055229384], 
-[0.25767031211634528, -0.052120819881793956]], [[-0.58834348362746614, -0.78118404391334062], [0.45620441373827947, 
--0.29164000136522406]], [[-0.49513587087712052, -0.77230564464754425], [-0.13926013494181588, 
--0.074842289140794493]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_expandedData_rank3(self):
-      arg0=numpy.array(0.421175117364)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.2829539473674072, 0.26460463438963866], [0.4944241195463408, -0.14183289114499043]], 
-[[-0.23141500621564015, 0.72498785591645865], [-0.58704992796483135, -0.073035863218186448]], [[-0.36205001010349336, 
-0.23509533190089771], [0.99239767418126235, -0.22859926662165808]], [[-0.37580413579582972, 0.34666574092921598], 
-[0.34165651594416047, -0.4852533001340793]], [[0.78319458318008017, 0.69711733836445733], [-0.78801005334209351, 
--0.87515019413759942]], [[-0.7984610368004843, -0.59209920431386887], [0.95189109002620209, 
-0.27537361386975356]]])+(1.-msk_arg1)*numpy.array([[[0.27446575000248274, 0.017349123112922138], [-0.77096715555414685, 
--0.097087488470648964]], [[0.85944675368687107, -0.70393045517842956], [0.19314904950952894, 0.052600456260221362]], 
-[[-0.26236400545090666, 0.43790436341387151], [0.43014747797369157, 0.77978061312029023]], [[-0.39532661171030092, 
--0.56484594847043423], [0.59568394714667661, -0.63797433280420091]], [[0.020636830350132973, -0.41371359474401759], 
-[0.73147374907031248, 0.36429486148697654]], [[-0.80644341652331408, 0.31189793837408408], [0.89659030970463793, 
-0.55651979999695933]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.2829539473674072, 0.26460463438963866], [0.42117511736446667, -0.14183289114499043]], 
-[[-0.23141500621564015, 0.42117511736446667], [-0.58704992796483135, -0.073035863218186448]], [[-0.36205001010349336, 
-0.23509533190089771], [0.42117511736446667, -0.22859926662165808]], [[-0.37580413579582972, 0.34666574092921598], 
-[0.34165651594416047, -0.4852533001340793]], [[0.42117511736446667, 0.42117511736446667], [-0.78801005334209351, 
--0.87515019413759942]], [[-0.7984610368004843, -0.59209920431386887], [0.42117511736446667, 
-0.27537361386975356]]])+(1.-msk_ref)*numpy.array([[[0.27446575000248274, 0.017349123112922138], [-0.77096715555414685, 
--0.097087488470648964]], [[0.42117511736446667, -0.70393045517842956], [0.19314904950952894, 0.052600456260221362]], 
-[[-0.26236400545090666, 0.42117511736446667], [0.42117511736446667, 0.42117511736446667]], [[-0.39532661171030092, 
--0.56484594847043423], [0.42117511736446667, -0.63797433280420091]], [[0.020636830350132973, -0.41371359474401759], 
-[0.42117511736446667, 0.36429486148697654]], [[-0.80644341652331408, 0.31189793837408408], [0.42117511736446667, 
-0.42117511736446667]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank3_expandedData_rank3(self):
-      arg0=numpy.array([[[-0.44437682880277785, 0.17119541519503967], [0.020929249805486272, 0.58170300942349695]], 
-[[0.73028470694488234, -0.7016569695632946], [-0.62783764903554995, -0.36781622192912433]], [[-0.01675601911778446, 
-0.7692551787251134], [0.8011270201656655, 0.11025975693234935]], [[-0.84459689494534174, -0.11099094965229672], 
-[0.4562713252772248, -0.87014121921591037]], [[-0.85802171684943973, -0.027261182455522226], [-0.94235114333802628, 
-0.0098853109764975855]], [[-0.056015196275054357, 0.77622858573743847], [0.10644091959164026, 0.89772237308605818]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.8593066865690393, -0.58245592888380959], [0.91937667904714337, -0.81385389061758473]], 
-[[-0.3365880437476958, -0.068098054719098799], [0.18688186984410238, -0.66851156981592008]], [[0.069434941986412424, 
-0.40467055700243026], [0.3233186730856723, 0.29236614723618914]], [[-0.83403672060967904, -0.6957481066212301], 
-[-0.51549137067202033, -0.17926352650150323]], [[-0.93561865200237371, -0.80417566586104572], [0.21767801216519467, 
-0.17338459780994175]], [[-0.68175254457359746, -0.8359966716618179], [-0.62548811235394464, 
--0.77067444521092821]]])+(1.-msk_arg1)*numpy.array([[[0.080984278450838998, 0.92431525231552847], [0.72290054114827584, 
-0.027666007066041942]], [[-0.4284361911118022, 0.83516056306889208], [-0.60050207373833175, -0.6528086645912512]], 
-[[-0.52881328986023135, -0.72290003842147654], [-0.43345053521437826, 0.81521539489200001]], [[0.97056103386445125, 
-0.42677224349907683], [0.35309634734929873, -0.86105870683644969]], [[-0.64117624992120859, 0.73828461790461919], 
-[-0.35162808537783885, -0.91996400261609557]], [[0.94379663317243123, -0.29093618357265916], [0.25221741055218727, 
--0.3748647916959682]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.44437682880277785, -0.58245592888380959], [0.020929249805486272, -0.81385389061758473]], 
-[[-0.3365880437476958, -0.7016569695632946], [-0.62783764903554995, -0.66851156981592008]], [[-0.01675601911778446, 
-0.40467055700243026], [0.3233186730856723, 0.11025975693234935]], [[-0.84459689494534174, -0.6957481066212301], 
-[-0.51549137067202033, -0.87014121921591037]], [[-0.93561865200237371, -0.80417566586104572], [-0.94235114333802628, 
-0.0098853109764975855]], [[-0.68175254457359746, -0.8359966716618179], [-0.62548811235394464, 
--0.77067444521092821]]])+(1.-msk_ref)*numpy.array([[[-0.44437682880277785, 0.17119541519503967], [0.020929249805486272, 
-0.027666007066041942]], [[-0.4284361911118022, -0.7016569695632946], [-0.62783764903554995, -0.6528086645912512]], 
-[[-0.52881328986023135, -0.72290003842147654], [-0.43345053521437826, 0.11025975693234935]], [[-0.84459689494534174, 
--0.11099094965229672], [0.35309634734929873, -0.87014121921591037]], [[-0.85802171684943973, -0.027261182455522226], 
-[-0.94235114333802628, -0.91996400261609557]], [[-0.056015196275054357, -0.29093618357265916], [0.10644091959164026, 
--0.3748647916959682]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_array_rank4(self):
-      arg0=numpy.array(-0.425021300795)
-      arg1=numpy.array([[[[0.61485980119305039, 0.3536734485821571, 0.052250192878319668, 0.050101524233152839], 
-[-0.039055350717554393, 0.7713984496570816, -0.73726824203828367, -0.41761983874039488], [-0.39471456087181944, 
-0.47715720673594375, 0.58378594752525248, 0.9847168762336389]], [[-0.68846166272752263, 0.89123145679985138, 
--0.54696246032404061, -0.31473352128891041], [0.61406524479214819, 0.87161245947951183, -0.68639513801258745, 
-0.9875941844426499], [0.39234126544038617, -0.27317552546725499, 0.34483861351735268, 0.25840962926583155]]], 
-[[[-0.17803493909693047, -0.95925086177480923, 0.80696656451276971, -0.16348233631392994], [-0.30672770197390054, 
--0.22062718838574868, -0.73072807724460676, 0.34145064687010396], [-0.2031521866358974, -0.97455493027649043, 
--0.84632780030579613, 0.21522265188033973]], [[-0.49543951705969769, -0.68786374270050077, 0.0083934267287057995, 
--0.46851701005951418], [0.31110904898927538, -0.50460034026401313, -0.76732460633745703, 0.24531335380988151], 
-[0.75868219019798255, 0.59950483231628771, 0.034430641577910315, -0.8574307841533626]]], [[[-0.040193080937767522, 
-0.3050590978518708, -0.51149457708662482, -0.63023453461760548], [-0.58444008961073712, -0.89533794260129529, 
-0.001718281287224066, -0.15026721804901189], [0.51164427280872116, -0.3004974735745658, -0.16293466115535393, 
-0.74220646871136609]], [[0.50215439753218849, -0.022004013369893771, 0.20858271078395774, -0.65255125579857287], 
-[-0.60876611946674219, 0.50167757288927173, 0.13001533342573723, -0.34671537042375489], [-0.23089939867254539, 
-0.39558498022357491, 0.35653763449420883, -0.28348035905940594]]]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[[-0.4250213007947381, -0.4250213007947381, -0.4250213007947381, -0.4250213007947381], 
-[-0.4250213007947381, -0.4250213007947381, -0.73726824203828367, -0.4250213007947381], [-0.4250213007947381, 
--0.4250213007947381, -0.4250213007947381, -0.4250213007947381]], [[-0.68846166272752263, -0.4250213007947381, 
--0.54696246032404061, -0.4250213007947381], [-0.4250213007947381, -0.4250213007947381, -0.68639513801258745, 
--0.4250213007947381], [-0.4250213007947381, -0.4250213007947381, -0.4250213007947381, -0.4250213007947381]]], 
-[[[-0.4250213007947381, -0.95925086177480923, -0.4250213007947381, -0.4250213007947381], [-0.4250213007947381, 
--0.4250213007947381, -0.73072807724460676, -0.4250213007947381], [-0.4250213007947381, -0.97455493027649043, 
--0.84632780030579613, -0.4250213007947381]], [[-0.49543951705969769, -0.68786374270050077, -0.4250213007947381, 
--0.46851701005951418], [-0.4250213007947381, -0.50460034026401313, -0.76732460633745703, -0.4250213007947381], 
-[-0.4250213007947381, -0.4250213007947381, -0.4250213007947381, -0.8574307841533626]]], [[[-0.4250213007947381, 
--0.4250213007947381, -0.51149457708662482, -0.63023453461760548], [-0.58444008961073712, -0.89533794260129529, 
--0.4250213007947381, -0.4250213007947381], [-0.4250213007947381, -0.4250213007947381, -0.4250213007947381, 
--0.4250213007947381]], [[-0.4250213007947381, -0.4250213007947381, -0.4250213007947381, -0.65255125579857287], 
-[-0.60876611946674219, -0.4250213007947381, -0.4250213007947381, -0.4250213007947381], [-0.4250213007947381, 
--0.4250213007947381, -0.4250213007947381, -0.4250213007947381]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_array_rank4(self):
-      arg0=numpy.array([[[[0.042003939301036075, -0.28174094403147287, 0.39166430802192709, -0.72286091356523685], 
-[-0.33886759908862429, 0.25462030836845817, -0.78150236199695322, -0.059614808287742793], [-0.91591074314123899, 
--0.45794579861759788, -0.4794446505723069, 0.51761381411325758]], [[-0.37116726176147496, 0.36874577496090977, 
-0.04653712013143485, 0.66047333430625699], [-0.11772512279714653, 0.41125989291869902, -0.051596578298892526, 
-0.31531054601415121], [0.94777892963159904, 0.34055291308435898, 0.85891030072275276, 0.085100918532384107]]], 
-[[[-0.081424966162158219, 0.017887385295465297, 0.81032953717541512, 0.28349857468643225], [0.59854856200751305, 
--0.70570895384304211, 0.47548664744321822, -0.30265312351112916], [0.0038629985751263973, 0.28479936753094237, 
-0.87288390787059145, 0.9256013729582182]], [[0.69848851185160865, 0.39861043628990434, -0.1057564500882362, 
--0.56551442610005487], [-0.053463682328375617, 0.54600713350550056, -0.33231542828693561, 0.46378044816114583], 
-[-0.60774604129762033, -0.26185686498031457, 0.57006282462040714, 0.46411501898722873]]], [[[-0.88481620176041575, 
-0.30210577801645266, 0.34849551054895844, 0.06626118165337691], [-0.76290211249462025, 0.19755714842723759, 
-0.73700013120301588, -0.71744858881488205], [0.15791315216699831, -0.82314659794161793, 0.82294870945863874, 
--0.40651539260931102]], [[-0.041507420283407814, 0.15798803074352841, -0.28927616509900411, 0.64378065731080558], 
-[0.0080178331193350161, 0.20000920176907111, 0.24165479179411586, 0.11678446509431195], [0.71631630922307332, 
-0.96181563579772433, 0.33502329535286735, -0.62034315202089352]]]])
-      arg1=numpy.array([[[[-0.34043458800732118, 0.00057191896702213363, -0.76297413648161472, -0.5050662500035803], 
-[0.4353622860421511, 0.20101382044109961, 0.61932945299685871, -0.3381915344269435], [0.81634370838873238, 0.92937038910446157, 
--0.28919701417780952, -0.39864650332866391]], [[0.51428419957766658, -0.79550542226298426, -0.260123277813191, 
--0.27241781897892281], [-0.14877045824181745, 0.08042370779557606, 0.30500099902824629, 0.44964628041638699], 
-[0.21700093634831807, -0.29956762605653742, 0.71766894400698145, -0.32820710507925344]]], [[[0.84141687607897753, 
-0.22081991062484074, -0.19074104132815517, 0.537673379263784], [-0.44222009045488586, 0.26203424208040871, 
--0.17734796805122111, 0.9927355338030146], [0.9797124453041044, -0.72244264377131451, 0.98779150207768684, 
--0.26095818585381969]], [[-0.42451198440543014, -0.053120518772907355, 0.61116466119905111, 0.039629276722799256], 
-[0.12611917229199521, -0.58173761969395499, -0.36454834186256813, -0.85777456539054131], [0.71915215975897673, 
-0.13301874138712888, 0.47141499862787462, 0.52747331468349512]]], [[[0.91143202507268772, 0.6538661838232469, 
-0.52091089894188869, -0.70207947258922232], [0.32509302860839639, 0.36200994883335547, 0.32722934083113109, 
-0.0016335040878923124], [0.24852406000762395, -0.20983527910110555, 0.47273912630193338, -0.36377154614083507]], 
-[[-0.91101787425493375, 0.46886398300907817, 0.66985160031839097, -0.2793849302445901], [0.45054535807781981, 
--0.4937162343641992, -0.59936511558946393, -0.56881807522634475], [0.99668071551760007, -0.15821676346947111, 
-0.34842119194446042, -0.39580568445408937]]]])
-      res=minimum(arg0,arg1)
-      ref=numpy.array([[[[-0.34043458800732118, -0.28174094403147287, -0.76297413648161472, -0.72286091356523685], 
-[-0.33886759908862429, 0.20101382044109961, -0.78150236199695322, -0.3381915344269435], [-0.91591074314123899, 
--0.45794579861759788, -0.4794446505723069, -0.39864650332866391]], [[-0.37116726176147496, -0.79550542226298426, 
--0.260123277813191, -0.27241781897892281], [-0.14877045824181745, 0.08042370779557606, -0.051596578298892526, 
-0.31531054601415121], [0.21700093634831807, -0.29956762605653742, 0.71766894400698145, -0.32820710507925344]]], 
-[[[-0.081424966162158219, 0.017887385295465297, -0.19074104132815517, 0.28349857468643225], [-0.44222009045488586, 
--0.70570895384304211, -0.17734796805122111, -0.30265312351112916], [0.0038629985751263973, -0.72244264377131451, 
-0.87288390787059145, -0.26095818585381969]], [[-0.42451198440543014, -0.053120518772907355, -0.1057564500882362, 
--0.56551442610005487], [-0.053463682328375617, -0.58173761969395499, -0.36454834186256813, -0.85777456539054131], 
-[-0.60774604129762033, -0.26185686498031457, 0.47141499862787462, 0.46411501898722873]]], [[[-0.88481620176041575, 
-0.30210577801645266, 0.34849551054895844, -0.70207947258922232], [-0.76290211249462025, 0.19755714842723759, 
-0.32722934083113109, -0.71744858881488205], [0.15791315216699831, -0.82314659794161793, 0.47273912630193338, 
--0.40651539260931102]], [[-0.91101787425493375, 0.15798803074352841, -0.28927616509900411, -0.2793849302445901], 
-[0.0080178331193350161, -0.4937162343641992, -0.59936511558946393, -0.56881807522634475], [0.71631630922307332, 
--0.15821676346947111, 0.33502329535286735, -0.62034315202089352]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_constData_rank4(self):
-      arg0=numpy.array(-0.728265524667)
-      arg1=Data(numpy.array([[[[-0.91504547999740171, 0.012810369887270801, 0.21587944606381781, 0.34119766573266341], 
-[-0.32280199779375085, -0.054237935216707722, -0.79623690920579104, 0.37088241127304933], [0.12150991633148944, 
--0.69101227785116848, 0.73073892595521994, -0.39934370895848681]], [[-0.3693789717505116, 0.75661694648430133, 
--0.85836142330610854, -0.32592487428594308], [0.22624952359253991, -0.60247521964053385, -0.70161823705348025, 
--0.24954872237120762], [0.75171081324418454, -0.15657093890028562, -0.25090153278953364, 0.59505994298610987]]], 
-[[[-0.05826875212801208, 0.29442028374780427, -0.53038798155388278, 0.091061125683532085], [-0.079005593570049548, 
-0.00038909916899121377, -0.98829583577709301, 0.88259853324762538], [0.039576704346908853, -0.89938608943741927, 
-0.17757413934391741, -0.75009089150150232]], [[0.55508806275619582, 0.03370053177355703, -0.32048468296258648, 
-0.26936484745950495], [-0.66575518682742252, -0.014717889405908791, 0.095144932559580564, -0.44264133289207175], 
-[0.93538260370364279, 0.1969856382674855, 0.95006635748916191, 0.26793304941124396]]], [[[-0.99713043387118305, 
-0.91152513517539258, 0.16558703416532627, -0.8732226182327969], [0.41787238147618089, -0.24825788959565842, 
--0.93904745746514684, 0.65940703339290052], [0.39049965031397704, -0.01633210611410818, 0.76623765746407324, 
-0.79548430500716738]], [[-0.9295138582981306, 0.87668478493227453, 0.11974242787104439, 0.99380782515202259], 
-[0.023477675853753821, 0.12563754123099624, 0.59918906448149012, 0.24490444444099158], [0.11158552855467185, 
--0.90242799905815874, -0.32273327237013638, -0.63910566525377743]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.91504547999740171, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475], 
-[-0.72826552466718475, -0.72826552466718475, -0.79623690920579104, -0.72826552466718475], [-0.72826552466718475, 
--0.72826552466718475, -0.72826552466718475, -0.72826552466718475]], [[-0.72826552466718475, -0.72826552466718475, 
--0.85836142330610854, -0.72826552466718475], [-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, 
--0.72826552466718475], [-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475]]], 
-[[[-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475], [-0.72826552466718475, 
--0.72826552466718475, -0.98829583577709301, -0.72826552466718475], [-0.72826552466718475, -0.89938608943741927, 
--0.72826552466718475, -0.75009089150150232]], [[-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, 
--0.72826552466718475], [-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475], 
-[-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475]]], [[[-0.99713043387118305, 
--0.72826552466718475, -0.72826552466718475, -0.8732226182327969], [-0.72826552466718475, -0.72826552466718475, 
--0.93904745746514684, -0.72826552466718475], [-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, 
--0.72826552466718475]], [[-0.9295138582981306, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475], 
-[-0.72826552466718475, -0.72826552466718475, -0.72826552466718475, -0.72826552466718475], [-0.72826552466718475, 
--0.90242799905815874, -0.72826552466718475, -0.72826552466718475]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_constData_rank4(self):
-      arg0=numpy.array([[[[0.89616945966184547, -0.14645510856890098, -0.86944537131732735, 0.71847451412555885], 
-[-0.70029804236386828, -0.59541381010443239, 0.46801127601195169, -0.98906614917578506], [-0.0038988657105638591, 
-0.89334894552295396, 0.80207365883677695, 0.045257584587148569]], [[-0.89527264919235794, 0.25135871481774141, 
--0.13871252779034937, -0.2268380251899389], [0.82776928299769925, -0.68463706276658498, 0.67371921923813471, 
--0.84777953655418981], [-0.62874608627117512, 0.42722345466709055, -0.94537803283246236, 0.36509199072064469]]], 
-[[[-0.061019954251117836, -0.90043209976059879, -0.022522952319181444, -0.30808636639781128], [-0.059270354706197015, 
--0.98946793146803502, -0.084217982787760493, 0.50140625510490033], [-0.36014449522505387, -0.0012891593072639207, 
--0.7676490938631908, 0.97777264426399246]], [[-0.58620170107081848, 0.51110054858214671, -0.82865872761639325, 
--0.28662262522030013], [0.98406191940826915, -0.19441394216509345, -0.80699650983760751, 0.83474185695992764], 
-[0.21626770610979862, 0.56723393086742901, -0.45682530021332535, 0.30071795628255216]]], [[[0.95678003089117025, 
-0.64036149833716083, 0.69037514189719995, 0.86338039107159026], [0.44798670324388978, -0.8821382997160776, 0.53761088703496585, 
--0.59796439421036895], [0.77175483432437963, 0.55279794412778749, 0.51171466465772752, -0.78060131818837952]], 
-[[-0.0019563325668305875, 0.45035895276343862, 0.71256826749792679, 0.059872047958682284], [-0.0045286660467727113, 
-0.052392141396692571, -0.93729392803827971, -0.12521252410639683], [0.74090180294982066, 0.40862302453986343, 
--0.91445707601869186, 0.97035478267697162]]]])
-      arg1=Data(numpy.array([[[[-0.75590562416235296, 0.14642023157793571, -0.12653964381022997, 0.42197150408388007], 
-[0.58565806704221313, -0.45752468513384636, 0.37530077420954244, -0.004886124862624408], [-0.94573442434973387, 
-0.69031368457162623, -0.22430619417909337, 0.37189041044203774]], [[0.72030982570688162, 0.084943716693110405, 
-0.70869964682131847, 0.65056340832307979], [-0.50256410430250154, -0.80187490102990533, 0.36305309609681768, 
--0.49170901485046947], [0.15916719884739439, 0.55444505244047804, -0.49309231895000694, -0.012241059835174317]]], 
-[[[-0.32488113260609497, -0.9506670587376318, 0.22143799462804314, -0.83450193323794597], [-0.66841387730291268, 
--0.68891638572947711, 0.90173799584959169, 0.20367991669827634], [-0.88038622593071425, -0.35055128187852258, 
-0.46266021883328223, 0.51901972460544465]], [[0.53282314089226923, -0.40039628012906325, 0.74925467656589073, 
--0.66283838835894349], [0.8539284273772747, 0.23870884717634011, -0.52872969622654864, 0.004765180524383128], 
-[-0.15473284316236779, 0.52492084303138831, 0.85159883021105176, -0.87240307400493955]]], [[[-0.83306261910311052, 
-0.79895454199389393, -0.92709032553525006, -0.80730790080570647], [0.42263888236227642, -0.016657249528685192, 
-0.97554582357090669, 0.061298475762013194], [-0.97792819096272021, -0.79595674466849009, -0.15669485807783312, 
--0.55958160117965061]], [[0.51306876856470796, 0.28658084223168268, -0.57526824659959508, 0.47201153027836873], 
-[-0.95345014094079827, 0.65039071677434834, -0.48813003978909841, -0.12064204080928587], [-0.58226564935141245, 
--0.22086805263933829, -0.11701890565008766, 0.27034100986868181]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.75590562416235296, -0.14645510856890098, -0.86944537131732735, 0.42197150408388007], 
-[-0.70029804236386828, -0.59541381010443239, 0.37530077420954244, -0.98906614917578506], [-0.94573442434973387, 
-0.69031368457162623, -0.22430619417909337, 0.045257584587148569]], [[-0.89527264919235794, 0.084943716693110405, 
--0.13871252779034937, -0.2268380251899389], [-0.50256410430250154, -0.80187490102990533, 0.36305309609681768, 
--0.84777953655418981], [-0.62874608627117512, 0.42722345466709055, -0.94537803283246236, -0.012241059835174317]]], 
-[[[-0.32488113260609497, -0.9506670587376318, -0.022522952319181444, -0.83450193323794597], [-0.66841387730291268, 
--0.98946793146803502, -0.084217982787760493, 0.20367991669827634], [-0.88038622593071425, -0.35055128187852258, 
--0.7676490938631908, 0.51901972460544465]], [[-0.58620170107081848, -0.40039628012906325, -0.82865872761639325, 
--0.66283838835894349], [0.8539284273772747, -0.19441394216509345, -0.80699650983760751, 0.004765180524383128], 
-[-0.15473284316236779, 0.52492084303138831, -0.45682530021332535, -0.87240307400493955]]], [[[-0.83306261910311052, 
-0.64036149833716083, -0.92709032553525006, -0.80730790080570647], [0.42263888236227642, -0.8821382997160776, 
-0.53761088703496585, -0.59796439421036895], [-0.97792819096272021, -0.79595674466849009, -0.15669485807783312, 
--0.78060131818837952]], [[-0.0019563325668305875, 0.28658084223168268, -0.57526824659959508, 0.059872047958682284], 
-[-0.95345014094079827, 0.052392141396692571, -0.93729392803827971, -0.12521252410639683], [-0.58226564935141245, 
--0.22086805263933829, -0.91445707601869186, 0.27034100986868181]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank0_expandedData_rank4(self):
-      arg0=numpy.array(0.281482687583)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.96139931694264602, -0.46542502700306065, 0.21705020250000717, 0.25998144094215436], 
-[-0.67599497210438408, -0.88726153965521437, 0.50714519594861973, -0.94351230306971434], [0.4735621454256087, 
-0.66535053046165382, -0.92160757851582442, 0.56806474443196353]], [[-0.79648092981517116, -0.91914568320849033, 
-0.061585600611920865, 0.40796935385442001], [0.51063761899195481, -0.63004783356942196, 0.29473857980068674, 
-0.3993733500273533], [-0.86738854332012272, -0.90515907494131387, -0.53950068927270856, 0.63224096754179016]]], 
-[[[-0.89351049172945252, -0.10390460426084824, 0.69035315350800897, -0.93521456718548146], [0.39827705680524073, 
-0.73667161808316028, 0.28704469449069014, 0.88865905114776966], [0.87149264051148667, -0.74166315186312604, 
--0.7737992814615251, -0.7013002656683156]], [[0.01183038355658983, 0.69969112055301053, -0.69259784860387152, 
-0.72657661951184838], [-0.0011547332973642632, 0.42540737329381795, -0.89384884283793609, -0.62524545534864617], 
-[0.59186830563376747, -0.3950350803692193, 0.67372642149590822, 0.97846778898779418]]], [[[0.64847624613338084, 
--0.88588135991859018, 0.0098973918958247253, -0.22092271944289599], [0.019301469314388697, -0.29040469916195244, 
-0.74571810999576105, -0.82485168516556739], [-0.96894898013431607, 0.44051204266918909, -0.87294543885774289, 
-0.30028502270655122]], [[-0.70101408967227208, -0.51776039315507005, 0.90350367325208669, 0.10904456854021327], 
-[0.61537494807808057, 0.64923447601306727, -0.47834048264925055, -0.64570185204968511], [0.48998647902070847, 
-0.36405054395814584, 0.13174866605530777, -0.15696623732480997]]]])+(1.-msk_arg1)*numpy.array([[[[-0.95592431340402562, 
--0.60487536368214267, -0.70132740049521569, 0.33572363884270229], [-0.098366265904404449, 0.9871748496737538, 
-0.24895594396041809, -0.45423489233820269], [0.78592718677440909, -0.19086024983760552, 0.16439749870129217, 
--0.04056652690832907]], [[-0.031753883057961563, 0.67732913621272894, 0.93957129305443887, -0.91173472602648853], 
-[-0.27159715341342894, -0.53046432854904779, -0.12734481648913021, 0.00035975804336385586], [0.3983625491254712, 
-0.91201218719416577, -0.18752057545397216, 0.58097395184941303]]], [[[0.31110931733325153, 0.59709777785508633, 
-0.015313248760234988, -0.84817068169239951], [0.67194461729786537, -0.60439213536887459, -0.48302160342844225, 
--0.30697988179917512], [0.67323921500232453, -0.68065095783053819, 0.32806852285911003, -0.35698994357893921]], 
-[[0.033347651443349058, -0.49997367580630692, 0.84884845716150847, -0.34517141483336999], [-0.78606121659755734, 
--0.038076895417745726, 0.15363901358486598, -0.95959538054192728], [0.70460148255700306, -0.6314651277352985, 
-0.57195126378779571, 0.61365414684478425]]], [[[-0.52421196371811485, 0.051881060064812523, 0.84475480281804982, 
--0.038368254608132757], [0.55468719070482808, 0.36163262036185251, 0.14013678078593461, 0.69111743548010685], 
-[0.48452729217682733, -0.77957351851064516, 0.70582041801806028, -0.22776541561739805]], [[-0.99620405759506614, 
--0.065100342142452972, -0.98034381283504834, -0.24442864167348999], [-0.79840506656885291, -0.11423424587912767, 
-0.62928672738040414, 0.51459561217101402], [0.90827122726638509, 0.036154935543965427, -0.75332876638410395, 
--0.77542998162694277]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.28148268758292794, -0.46542502700306065, 0.21705020250000717, 0.25998144094215436], 
-[-0.67599497210438408, -0.88726153965521437, 0.28148268758292794, -0.94351230306971434], [0.28148268758292794, 
-0.28148268758292794, -0.92160757851582442, 0.28148268758292794]], [[-0.79648092981517116, -0.91914568320849033, 
-0.061585600611920865, 0.28148268758292794], [0.28148268758292794, -0.63004783356942196, 0.28148268758292794, 
-0.28148268758292794], [-0.86738854332012272, -0.90515907494131387, -0.53950068927270856, 0.28148268758292794]]], 
-[[[-0.89351049172945252, -0.10390460426084824, 0.28148268758292794, -0.93521456718548146], [0.28148268758292794, 
-0.28148268758292794, 0.28148268758292794, 0.28148268758292794], [0.28148268758292794, -0.74166315186312604, 
--0.7737992814615251, -0.7013002656683156]], [[0.01183038355658983, 0.28148268758292794, -0.69259784860387152, 
-0.28148268758292794], [-0.0011547332973642632, 0.28148268758292794, -0.89384884283793609, -0.62524545534864617], 
-[0.28148268758292794, -0.3950350803692193, 0.28148268758292794, 0.28148268758292794]]], [[[0.28148268758292794, 
--0.88588135991859018, 0.0098973918958247253, -0.22092271944289599], [0.019301469314388697, -0.29040469916195244, 
-0.28148268758292794, -0.82485168516556739], [-0.96894898013431607, 0.28148268758292794, -0.87294543885774289, 
-0.28148268758292794]], [[-0.70101408967227208, -0.51776039315507005, 0.28148268758292794, 0.10904456854021327], 
-[0.28148268758292794, 0.28148268758292794, -0.47834048264925055, -0.64570185204968511], [0.28148268758292794, 
-0.28148268758292794, 0.13174866605530777, -0.15696623732480997]]]])+(1.-msk_ref)*numpy.array([[[[-0.95592431340402562, 
--0.60487536368214267, -0.70132740049521569, 0.28148268758292794], [-0.098366265904404449, 0.28148268758292794, 
-0.24895594396041809, -0.45423489233820269], [0.28148268758292794, -0.19086024983760552, 0.16439749870129217, 
--0.04056652690832907]], [[-0.031753883057961563, 0.28148268758292794, 0.28148268758292794, -0.91173472602648853], 
-[-0.27159715341342894, -0.53046432854904779, -0.12734481648913021, 0.00035975804336385586], [0.28148268758292794, 
-0.28148268758292794, -0.18752057545397216, 0.28148268758292794]]], [[[0.28148268758292794, 0.28148268758292794, 
-0.015313248760234988, -0.84817068169239951], [0.28148268758292794, -0.60439213536887459, -0.48302160342844225, 
--0.30697988179917512], [0.28148268758292794, -0.68065095783053819, 0.28148268758292794, -0.35698994357893921]], 
-[[0.033347651443349058, -0.49997367580630692, 0.28148268758292794, -0.34517141483336999], [-0.78606121659755734, 
--0.038076895417745726, 0.15363901358486598, -0.95959538054192728], [0.28148268758292794, -0.6314651277352985, 
-0.28148268758292794, 0.28148268758292794]]], [[[-0.52421196371811485, 0.051881060064812523, 0.28148268758292794, 
--0.038368254608132757], [0.28148268758292794, 0.28148268758292794, 0.14013678078593461, 0.28148268758292794], 
-[0.28148268758292794, -0.77957351851064516, 0.28148268758292794, -0.22776541561739805]], [[-0.99620405759506614, 
--0.065100342142452972, -0.98034381283504834, -0.24442864167348999], [-0.79840506656885291, -0.11423424587912767, 
-0.28148268758292794, 0.28148268758292794], [0.28148268758292794, 0.036154935543965427, -0.75332876638410395, 
--0.77542998162694277]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_array_rank4_expandedData_rank4(self):
-      arg0=numpy.array([[[[0.97758867065194388, 0.1574715083841578, 0.92126133529285936, 0.0017485576090787713], 
-[0.30821540583119145, -0.0025962813909445881, -0.96197375828255094, -0.17194860271430423], [0.094454498954737121, 
--0.07250961702271419, 0.62778955379908385, 0.0079850761766036005]], [[-0.60879110851107665, 0.47215584168603542, 
--0.98584787335963897, -0.73779857765254264], [-0.83454070683860015, 0.71015247657599923, -0.12985974578869364, 
-0.1442477762775396], [0.83715255131333088, -0.98841700808434618, 0.50984203618760593, 0.44426127969468876]]], 
-[[[-0.23720255382404654, 0.87338277179418444, 0.65518040493836915, 0.43693499615282794], [-0.74945847124111942, 
--0.20205597361726579, 0.16075177649972994, 0.76542786079844416], [0.0084223442203108512, 0.62485445223452429, 
--0.80756840753979398, 0.69416166740918994]], [[0.50369752501143816, -0.28619664928209976, 0.73165224082732983, 
--0.83834270633927233], [-0.87567827976335533, 0.20958630766347386, -0.96710268290637158, 0.97297089353810251], 
-[-0.74444429732585271, 0.73028907717698144, 0.79344172504077126, 0.30570201766123484]]], [[[-0.92244419927829013, 
-0.59913714085120406, -0.35711739481389837, 0.88880258561481273], [-0.89231644998518367, 0.19489484911023292, 
--0.39451485599809466, 0.27240452235133139], [0.2987117668996726, 0.3206929594555108, -0.32011263224255404, 
--0.84191955653278927]], [[-0.10047467343115413, 0.36870094503673023, -0.11718151966864498, 0.94218134444430746], 
-[-0.86040589643937704, -0.38260047523296281, 0.5015039443115934, -0.5357932441680231], [-0.57857336437949636, 
-0.044525865869085024, -0.3671500832314345, 0.98066964135088841]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[0.7291751279524481, -0.82295874146889636, -0.51901123107040248, -0.94385821506324263], 
-[0.52294198124270164, -0.14066371662637622, -0.097520794836683411, 0.075409404431268978], [0.23559899515853866, 
--0.29600101634192733, -0.1751856203151525, -0.50967621684885756]], [[-0.8768845479609868, 0.99854052839455631, 
--0.30669679984325215, -0.37134456828559181], [0.68518337298456267, 0.13654662776898308, -0.47464629422009064, 
--0.011280137872295093], [0.40164036996810104, 0.37774591678565561, -0.74261475554766676, 0.98647492200385689]]], 
-[[[0.68809646007526037, 0.90499229150499949, -0.68585979550179599, 0.62601311739091314], [-0.5805994620782815, 
-0.58051780093835159, -0.56955547233437276, 0.45211084783869149], [0.39755039928225622, -0.32712115094789707, 
-0.57617901672016059, 0.015699026079915912]], [[0.32301557183066287, 0.28929822753850409, -0.66402611654355659, 
--0.80524061708853534], [-0.68700827200906578, -0.63985275312192713, -0.30966086791544556, -0.95007157363421046], 
-[-0.61111269316547867, 0.62577720815804883, -0.76699263429637488, 0.78025394665315306]]], [[[-0.47340018072776724, 
--0.92358854884009567, -0.86082413472578834, 0.30344956406647272], [0.92125667910051856, 0.073668347431324888, 
--0.60350141920277145, -0.028444018908313051], [-0.60429126796395538, -0.28222700986008209, 0.48016499084307274, 
--0.059464320230215417]], [[0.065766576024333556, -0.52347734065420548, 0.016237375223726147, 0.42922281621395175], 
-[-0.99857921802796556, -0.0077971875052467166, -0.96806290472645085, 0.15635839223982595], [0.19379650848173302, 
--0.41071589816893872, -0.55531682359218126, -0.63323305108665906]]]])+(1.-msk_arg1)*numpy.array([[[[-0.31178601958278973, 
-0.12684778530306096, -0.080846647401125349, 0.048217540170149675], [-0.023908426556572104, -0.85794324333380501, 
-0.6724681026582755, -0.13821299320362268], [-0.071069979997626875, -0.14530184611306152, -0.055119495841453148, 
-0.95397372024346017]], [[-0.47831340013473711, -0.66383344642512765, 0.81086102238370406, 0.45600927493737786], 
-[0.44566995864355974, -0.22137428274745985, -0.24935027071035054, 0.77905263525564439], [-0.56872754605053299, 
--0.71165324113234418, 0.57765580895481872, -0.51244917020295588]]], [[[-0.71609928733020745, -0.87099442425058093, 
-0.97220643808598095, -0.82807409932896592], [-0.44989238496978312, 0.19505344002723879, -0.81516005237704814, 
-0.1311739770256346], [0.79987025852551774, 0.56139062013262508, -0.40098839998976055, 0.58213997350561786]], 
-[[0.78581917651153765, 0.27526409545213815, 0.24194305054027732, -0.57780081412091744], [-0.15028899104477866, 
--0.81143553920292733, 0.89191984931908475, 0.50772063858105621], [-0.8909661319611808, 0.15236586097218385, 
--0.99310008767165203, -0.81001930174950521]]], [[[0.96631073454664596, -0.30422026751622155, -0.63386350345029441, 
--0.080745092712922295], [-0.32769338763082501, 0.72745103771464192, -0.11565640992324844, -0.68262761307055708], 
-[-0.43871134404200429, 0.86969922871936189, 0.15221660186189334, -0.10926022795256984]], [[-0.29081627930669951, 
-0.93426803597386665, -0.53586220853287103, 0.83151004347999669], [0.25571746811416229, -0.69085800408630038, 
--0.72177795263395961, -0.23374635001601196], [0.35949139491405213, 0.16688540524134865, 0.23071452816086579, 
--0.83712306643881917]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.7291751279524481, -0.82295874146889636, -0.51901123107040248, -0.94385821506324263], 
-[0.30821540583119145, -0.14066371662637622, -0.96197375828255094, -0.17194860271430423], [0.094454498954737121, 
--0.29600101634192733, -0.1751856203151525, -0.50967621684885756]], [[-0.8768845479609868, 0.47215584168603542, 
--0.98584787335963897, -0.73779857765254264], [-0.83454070683860015, 0.13654662776898308, -0.47464629422009064, 
--0.011280137872295093], [0.40164036996810104, -0.98841700808434618, -0.74261475554766676, 0.44426127969468876]]], 
-[[[-0.23720255382404654, 0.87338277179418444, -0.68585979550179599, 0.43693499615282794], [-0.74945847124111942, 
--0.20205597361726579, -0.56955547233437276, 0.45211084783869149], [0.0084223442203108512, -0.32712115094789707, 
--0.80756840753979398, 0.015699026079915912]], [[0.32301557183066287, -0.28619664928209976, -0.66402611654355659, 
--0.83834270633927233], [-0.87567827976335533, -0.63985275312192713, -0.96710268290637158, -0.95007157363421046], 
-[-0.74444429732585271, 0.62577720815804883, -0.76699263429637488, 0.30570201766123484]]], [[[-0.92244419927829013, 
--0.92358854884009567, -0.86082413472578834, 0.30344956406647272], [-0.89231644998518367, 0.073668347431324888, 
--0.60350141920277145, -0.028444018908313051], [-0.60429126796395538, -0.28222700986008209, -0.32011263224255404, 
--0.84191955653278927]], [[-0.10047467343115413, -0.52347734065420548, -0.11718151966864498, 0.42922281621395175], 
-[-0.99857921802796556, -0.38260047523296281, -0.96806290472645085, -0.5357932441680231], [-0.57857336437949636, 
--0.41071589816893872, -0.55531682359218126, -0.63323305108665906]]]])+(1.-msk_ref)*numpy.array([[[[-0.31178601958278973, 
-0.12684778530306096, -0.080846647401125349, 0.0017485576090787713], [-0.023908426556572104, -0.85794324333380501, 
--0.96197375828255094, -0.17194860271430423], [-0.071069979997626875, -0.14530184611306152, -0.055119495841453148, 
-0.0079850761766036005]], [[-0.60879110851107665, -0.66383344642512765, -0.98584787335963897, -0.73779857765254264], 
-[-0.83454070683860015, -0.22137428274745985, -0.24935027071035054, 0.1442477762775396], [-0.56872754605053299, 
--0.98841700808434618, 0.50984203618760593, -0.51244917020295588]]], [[[-0.71609928733020745, -0.87099442425058093, 
-0.65518040493836915, -0.82807409932896592], [-0.74945847124111942, -0.20205597361726579, -0.81516005237704814, 
-0.1311739770256346], [0.0084223442203108512, 0.56139062013262508, -0.80756840753979398, 0.58213997350561786]], 
-[[0.50369752501143816, -0.28619664928209976, 0.24194305054027732, -0.83834270633927233], [-0.87567827976335533, 
--0.81143553920292733, -0.96710268290637158, 0.50772063858105621], [-0.8909661319611808, 0.15236586097218385, 
--0.99310008767165203, -0.81001930174950521]]], [[[-0.92244419927829013, -0.30422026751622155, -0.63386350345029441, 
--0.080745092712922295], [-0.89231644998518367, 0.19489484911023292, -0.39451485599809466, -0.68262761307055708], 
-[-0.43871134404200429, 0.3206929594555108, -0.32011263224255404, -0.84191955653278927]], [[-0.29081627930669951, 
-0.36870094503673023, -0.53586220853287103, 0.83151004347999669], [-0.86040589643937704, -0.69085800408630038, 
--0.72177795263395961, -0.5357932441680231], [-0.57857336437949636, 0.044525865869085024, -0.3671500832314345, 
--0.83712306643881917]]]])
+   def test_generalTensorProduct_constData_rank2_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-4.0, 5.0, -4.0, 3.0, 2.0], [7.0, 5.0, 7.0, -2.0, 3.0], [1.0, 5.0, -2.0, 0.0, -4.0], [3.0, -7.0, 
+3.0, -6.0, -5.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-4.0, -1.0, 3.0, -5.0, 5.0], [6.0, 1.0, 3.0, 0.0, -2.0], [4.0, 3.0, 0.0, 0.0, -4.0], [-5.0, -5.0, 
+5.0, 5.0, -7.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[16.0, 4.0, -12.0, 20.0, -20.0], [-24.0, -4.0, -12.0, 0.0, 8.0], [-16.0, -12.0, 0.0, 0.0, 16.0], 
+[20.0, 20.0, -20.0, -20.0, 28.0]], [[-20.0, -5.0, 15.0, -25.0, 25.0], [30.0, 5.0, 15.0, 0.0, -10.0], [20.0, 15.0, 0.0, 0.0, 
+-20.0], [-25.0, -25.0, 25.0, 25.0, -35.0]], [[16.0, 4.0, -12.0, 20.0, -20.0], [-24.0, -4.0, -12.0, 0.0, 8.0], [-16.0, -12.0, 
+0.0, 0.0, 16.0], [20.0, 20.0, -20.0, -20.0, 28.0]], [[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 3.0, 9.0, 0.0, -6.0], [12.0, 9.0, 
+0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]], [[-8.0, -2.0, 6.0, -10.0, 10.0], [12.0, 2.0, 6.0, 0.0, -4.0], [8.0, 6.0, 
+0.0, 0.0, -8.0], [-10.0, -10.0, 10.0, 10.0, -14.0]]], [[[-28.0, -7.0, 21.0, -35.0, 35.0], [42.0, 7.0, 21.0, 0.0, -14.0], [28.0, 
+21.0, 0.0, 0.0, -28.0], [-35.0, -35.0, 35.0, 35.0, -49.0]], [[-20.0, -5.0, 15.0, -25.0, 25.0], [30.0, 5.0, 15.0, 0.0, -10.0], 
+[20.0, 15.0, 0.0, 0.0, -20.0], [-25.0, -25.0, 25.0, 25.0, -35.0]], [[-28.0, -7.0, 21.0, -35.0, 35.0], [42.0, 7.0, 21.0, 0.0, 
+-14.0], [28.0, 21.0, 0.0, 0.0, -28.0], [-35.0, -35.0, 35.0, 35.0, -49.0]], [[8.0, 2.0, -6.0, 10.0, -10.0], [-12.0, -2.0, -6.0, 
+0.0, 4.0], [-8.0, -6.0, 0.0, 0.0, 8.0], [10.0, 10.0, -10.0, -10.0, 14.0]], [[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 3.0, 9.0, 
+0.0, -6.0], [12.0, 9.0, 0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]]], [[[-4.0, -1.0, 3.0, -5.0, 5.0], [6.0, 1.0, 3.0, 
+0.0, -2.0], [4.0, 3.0, 0.0, 0.0, -4.0], [-5.0, -5.0, 5.0, 5.0, -7.0]], [[-20.0, -5.0, 15.0, -25.0, 25.0], [30.0, 5.0, 15.0, 
+0.0, -10.0], [20.0, 15.0, 0.0, 0.0, -20.0], [-25.0, -25.0, 25.0, 25.0, -35.0]], [[8.0, 2.0, -6.0, 10.0, -10.0], [-12.0, -2.0, 
+-6.0, 0.0, 4.0], [-8.0, -6.0, 0.0, 0.0, 8.0], [10.0, 10.0, -10.0, -10.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[16.0, 4.0, -12.0, 20.0, -20.0], [-24.0, -4.0, -12.0, 0.0, 
+8.0], [-16.0, -12.0, 0.0, 0.0, 16.0], [20.0, 20.0, -20.0, -20.0, 28.0]]], [[[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 3.0, 9.0, 
+0.0, -6.0], [12.0, 9.0, 0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]], [[28.0, 7.0, -21.0, 35.0, -35.0], [-42.0, -7.0, 
+-21.0, 0.0, 14.0], [-28.0, -21.0, 0.0, 0.0, 28.0], [35.0, 35.0, -35.0, -35.0, 49.0]], [[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 
+3.0, 9.0, 0.0, -6.0], [12.0, 9.0, 0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]], [[24.0, 6.0, -18.0, 30.0, -30.0], 
+[-36.0, -6.0, -18.0, 0.0, 12.0], [-24.0, -18.0, 0.0, 0.0, 24.0], [30.0, 30.0, -30.0, -30.0, 42.0]], [[20.0, 5.0, -15.0, 25.0, 
+-25.0], [-30.0, -5.0, -15.0, 0.0, 10.0], [-20.0, -15.0, 0.0, 0.0, 20.0], [25.0, 25.0, -25.0, -25.0, 
+35.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_float_rank0(self):
-      arg0=Data(-0.29611572534,self.functionspace)
-      arg1=-0.797756770219
-      res=minimum(arg0,arg1)
-      ref=Data(-0.797756770219,self.functionspace)
+   def test_generalTensorProduct_constData_rank3_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-1.0, 4.0, 0.0], [-3.0, 6.0, -1.0], [2.0, 7.0, 6.0], [-3.0, 7.0, 0.0], [6.0, 7.0, 0.0]], [[-1.0, 
+0.0, 2.0], [-4.0, -1.0, -7.0], [-2.0, 1.0, -5.0], [-1.0, -4.0, -1.0], [-4.0, 1.0, -5.0]], [[1.0, -4.0, -7.0], [-2.0, -3.0, 
+-7.0], [3.0, 7.0, 3.0], [1.0, 0.0, -4.0], [-2.0, 6.0, -1.0]], [[6.0, 4.0, 0.0], [-7.0, 0.0, 0.0], [5.0, -4.0, -6.0], [1.0, 7.0, 
+-5.0], [6.0, -7.0, -3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, 3.0, 0.0, -7.0, 0.0], [5.0, -2.0, -5.0, -5.0, -5.0], [2.0, -1.0, 5.0, -2.0, -2.0], [0.0, 
+-7.0, -3.0, 5.0, 6.0]], [[2.0, -6.0, 0.0, -3.0, 6.0], [6.0, -1.0, 6.0, 6.0, 2.0], [-2.0, 7.0, 1.0, -7.0, 3.0], [-7.0, 7.0, 
+-6.0, -4.0, 4.0]], [[-3.0, -2.0, -1.0, 0.0, -7.0], [-6.0, 7.0, -1.0, -3.0, 7.0], [-4.0, 1.0, -4.0, -7.0, 6.0], [5.0, 7.0, -3.0, 
+-1.0, -3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[14.0, -27.0, 0.0, -5.0, 24.0], [19.0, -2.0, 29.0, 29.0, 13.0], [-10.0, 29.0, -1.0, -26.0, 14.0], 
+[-28.0, 35.0, -21.0, -21.0, 10.0]], [[33.0, -43.0, 1.0, 3.0, 43.0], [27.0, -7.0, 52.0, 54.0, 20.0], [-14.0, 44.0, -5.0, -29.0, 
+18.0], [-47.0, 56.0, -24.0, -38.0, 9.0]], [[-16.0, -48.0, -6.0, -35.0, 0.0], [16.0, 31.0, 26.0, 14.0, 46.0], [-34.0, 53.0, 
+-7.0, -95.0, 53.0], [-19.0, 77.0, -66.0, -24.0, 22.0]], [[32.0, -51.0, 0.0, 0.0, 42.0], [27.0, -1.0, 57.0, 57.0, 29.0], [-20.0, 
+52.0, -8.0, -43.0, 27.0], [-49.0, 70.0, -33.0, -43.0, 10.0]], [[-22.0, -24.0, 0.0, -63.0, 42.0], [72.0, -19.0, 12.0, 12.0, 
+-16.0], [-2.0, 43.0, 37.0, -61.0, 9.0], [-49.0, 7.0, -60.0, 2.0, 64.0]]], [[[0.0, -7.0, -2.0, 7.0, -14.0], [-17.0, 16.0, 3.0, 
+-1.0, 19.0], [-10.0, 3.0, -13.0, -12.0, 14.0], [10.0, 21.0, -3.0, -7.0, -12.0]], [[43.0, 8.0, 7.0, 31.0, 43.0], [16.0, -40.0, 
+21.0, 35.0, -31.0], [22.0, -10.0, 7.0, 64.0, -37.0], [-28.0, -28.0, 39.0, -9.0, -7.0]], [[29.0, -2.0, 5.0, 11.0, 41.0], [26.0, 
+-32.0, 21.0, 31.0, -23.0], [14.0, 4.0, 11.0, 32.0, -23.0], [-32.0, -14.0, 15.0, -9.0, 7.0]], [[1.0, 23.0, 1.0, 19.0, -17.0], 
+[-23.0, -1.0, -18.0, -16.0, -10.0], [10.0, -28.0, -5.0, 37.0, -16.0], [23.0, -28.0, 30.0, 12.0, -19.0]], [[41.0, -8.0, 5.0, 
+25.0, 41.0], [16.0, -28.0, 31.0, 41.0, -13.0], [10.0, 6.0, 1.0, 36.0, -19.0], [-32.0, 0.0, 21.0, -19.0, -5.0]]], [[[7.0, 41.0, 
+7.0, 5.0, 25.0], [23.0, -47.0, -22.0, -8.0, -62.0], [38.0, -36.0, 29.0, 75.0, -56.0], [-7.0, -84.0, 42.0, 28.0, 11.0]], [[27.0, 
+26.0, 7.0, 23.0, 31.0], [14.0, -42.0, -1.0, 13.0, -45.0], [30.0, -26.0, 15.0, 74.0, -47.0], [-14.0, -56.0, 45.0, 9.0, -3.0]], 
+[[-13.0, -39.0, -3.0, -42.0, 21.0], [39.0, 8.0, 24.0, 18.0, 20.0], [-20.0, 49.0, 10.0, -76.0, 33.0], [-34.0, 49.0, -60.0, 
+-16.0, 37.0]], [[6.0, 11.0, 4.0, -7.0, 28.0], [29.0, -30.0, -1.0, 7.0, -33.0], [18.0, -5.0, 21.0, 26.0, -26.0], [-20.0, -35.0, 
+9.0, 9.0, 18.0]], [[27.0, -40.0, 1.0, -4.0, 43.0], [32.0, -9.0, 47.0, 49.0, 15.0], [-12.0, 43.0, 0.0, -31.0, 16.0], [-47.0, 
+49.0, -27.0, -33.0, 15.0]]], [[[-28.0, -6.0, 0.0, -54.0, 24.0], [54.0, -16.0, -6.0, -6.0, -22.0], [4.0, 22.0, 34.0, -40.0, 
+0.0], [-28.0, -14.0, -42.0, 14.0, 52.0]], [[42.0, -21.0, 0.0, 49.0, 0.0], [-35.0, 14.0, 35.0, 35.0, 35.0], [-14.0, 7.0, -35.0, 
+14.0, 14.0], [0.0, 49.0, 21.0, -35.0, -42.0]], [[-20.0, 51.0, 6.0, -23.0, 18.0], [37.0, -48.0, -43.0, -31.0, -75.0], [42.0, 
+-39.0, 45.0, 60.0, -58.0], [-2.0, -105.0, 27.0, 47.0, 32.0]], [[23.0, -29.0, 5.0, -28.0, 77.0], [77.0, -44.0, 42.0, 52.0, 
+-26.0], [8.0, 43.0, 32.0, -16.0, -11.0], [-74.0, 7.0, -30.0, -18.0, 49.0]], [[-41.0, 66.0, 3.0, -21.0, -21.0], [6.0, -26.0, 
+-69.0, -63.0, -65.0], [38.0, -58.0, 35.0, 58.0, -51.0], [34.0, -112.0, 33.0, 61.0, 17.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_float_rank0(self):
-      arg0=Data(numpy.array([-0.25887636523261937, 0.58795283912157514]),self.functionspace)
-      arg1=0.297005924794
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.25887636523261937, 0.29700592479356924]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-7.0, 0.0, -7.0], [6.0, 6.0, -3.0]], [[-7.0, 7.0, -1.0], [6.0, 5.0, -2.0]], [[0.0, -2.0, -6.0], 
+[-6.0, -1.0, -5.0]], [[-4.0, 2.0, -5.0], [1.0, 5.0, -2.0]], [[-7.0, -1.0, -1.0], [-7.0, 2.0, 1.0]]], [[[-5.0, 7.0, 2.0], [7.0, 
+5.0, 2.0]], [[5.0, 2.0, -5.0], [4.0, 6.0, -3.0]], [[3.0, 0.0, 1.0], [-6.0, -2.0, -1.0]], [[6.0, -6.0, -6.0], [4.0, 4.0, -1.0]], 
+[[-2.0, -7.0, 6.0], [4.0, 7.0, -4.0]]], [[[7.0, 0.0, 7.0], [-6.0, -6.0, 4.0]], [[-7.0, -2.0, -2.0], [-1.0, -4.0, -5.0]], [[5.0, 
+3.0, -3.0], [7.0, 0.0, -4.0]], [[5.0, -3.0, 5.0], [0.0, -4.0, -7.0]], [[0.0, -4.0, 6.0], [2.0, -7.0, 7.0]]], [[[2.0, 7.0, 
+-2.0], [6.0, -2.0, 5.0]], [[-3.0, -5.0, 2.0], [-6.0, 2.0, -5.0]], [[-1.0, 7.0, -2.0], [3.0, 7.0, 5.0]], [[-3.0, -5.0, -4.0], 
+[-2.0, -3.0, 0.0]], [[-3.0, 0.0, 7.0], [-5.0, -1.0, 6.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-3.0, 4.0, -2.0, 4.0, -7.0], [-5.0, -3.0, -6.0, -4.0, -4.0], [7.0, -5.0, 4.0, -6.0, 2.0], 
+[-6.0, 3.0, -4.0, -7.0, 3.0]], [[7.0, -5.0, 5.0, 6.0, 7.0], [-2.0, 2.0, -3.0, 1.0, -6.0], [-7.0, -5.0, 7.0, 5.0, 3.0], [0.0, 
+2.0, -4.0, -4.0, -4.0]], [[-2.0, 4.0, 5.0, -4.0, -6.0], [-5.0, 3.0, -6.0, -4.0, 3.0], [0.0, -3.0, -4.0, -2.0, 6.0], [-3.0, 
+-5.0, -3.0, -5.0, -6.0]]], [[[1.0, -2.0, -1.0, -4.0, 4.0], [1.0, 7.0, -2.0, 3.0, 1.0], [0.0, 0.0, 6.0, 2.0, 0.0], [-2.0, 0.0, 
+2.0, 0.0, -4.0]], [[0.0, -4.0, 3.0, -5.0, 2.0], [5.0, -7.0, -1.0, -3.0, 0.0], [5.0, 2.0, 4.0, -2.0, 5.0], [-6.0, -3.0, -1.0, 
+0.0, 6.0]], [[-1.0, 3.0, 0.0, 7.0, 2.0], [-3.0, 0.0, -4.0, 5.0, 0.0], [2.0, 5.0, 3.0, -5.0, -1.0], [-5.0, 3.0, 3.0, 5.0, 
+-4.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[44.0, -101.0, -9.0, -75.0, 121.0], [115.0, 0.0, 78.0, 41.0, 13.0], [-25.0, 53.0, 51.0, 71.0, 
+-23.0], [30.0, -13.0, 46.0, 69.0, 45.0]], [[80.0, -105.0, 53.0, -45.0, 134.0], [63.0, 39.0, 18.0, 32.0, -11.0], [-77.0, 3.0, 
+75.0, 91.0, 28.0], [13.0, -23.0, 4.0, 16.0, -29.0]], [[-3.0, -13.0, -37.0, 6.0, -14.0], [38.0, -57.0, 75.0, -18.0, -12.0], 
+[-1.0, 1.0, -45.0, 17.0, -42.0], [61.0, 14.0, 0.0, 13.0, 82.0]], [[39.0, -74.0, 7.0, -27.0, 82.0], [73.0, -27.0, 49.0, 16.0, 
+-10.0], [-21.0, 25.0, 38.0, 46.0, -5.0], [17.0, -4.0, 14.0, 35.0, 44.0]], [[8.0, -18.0, 17.0, -5.0, 26.0], [42.0, -47.0, 59.0, 
+9.0, 24.0], [-30.0, 52.0, -62.0, 16.0, -14.0], [42.0, -21.0, 22.0, 63.0, 25.0]]], [[[65.0, -75.0, 63.0, -25.0, 114.0], [27.0, 
+49.0, -30.0, 35.0, -9.0], [-55.0, 4.0, 89.0, 55.0, 46.0], [-30.0, -20.0, 1.0, 7.0, -61.0]], [[16.0, -51.0, -11.0, -15.0, 31.0], 
+[39.0, -40.0, -8.0, -19.0, -43.0], [45.0, -23.0, 93.0, 1.0, 19.0], [-44.0, 17.0, -20.0, -33.0, 69.0]], [[-16.0, 33.0, -1.0, 
+35.0, -57.0], [-33.0, -34.0, -6.0, -33.0, -15.0], [9.0, -27.0, -39.0, -23.0, 3.0], [8.0, 7.0, -28.0, -31.0, 19.0]], [[-43.0, 
+3.0, -64.0, -31.0, -26.0], [39.0, -48.0, 10.0, -11.0, -2.0], [102.0, 21.0, 43.0, -49.0, -21.0], [-45.0, 21.0, 19.0, 7.0, 
+90.0]], [[-47.0, 3.0, 16.0, -153.0, -49.0], [45.0, -11.0, -2.0, -52.0, 72.0], [62.0, 21.0, -41.0, -21.0, 50.0], [-36.0, -83.0, 
+7.0, -8.0, 28.0]]], [[[-45.0, 104.0, 9.0, 82.0, -119.0], [-118.0, 0.0, -82.0, -36.0, -13.0], [27.0, -48.0, -48.0, -76.0, 22.0], 
+[-35.0, 16.0, -43.0, -64.0, -49.0]], [[15.0, -23.0, -17.0, -43.0, 25.0], [43.0, 32.0, 86.0, 18.0, 33.0], [-65.0, 18.0, -71.0, 
+67.0, -47.0], [99.0, -18.0, 29.0, 42.0, -1.0]], [[23.0, -33.0, -17.0, -6.0, 24.0], [3.0, 31.0, -19.0, -4.0, -40.0], [6.0, 
+-51.0, 83.0, 25.0, 5.0], [-15.0, 24.0, -21.0, -52.0, 9.0]], [[-39.0, 50.0, -12.0, -47.0, -108.0], [-43.0, 22.0, -19.0, -66.0, 
+13.0], [22.0, -68.0, -58.0, -12.0, 18.0], [14.0, -25.0, -40.0, -83.0, 1.0]], [[-45.0, 89.0, -13.0, 28.0, -56.0], [-76.0, 73.0, 
+-49.0, 34.0, 44.0], [7.0, 23.0, -47.0, -49.0, -18.0], [-15.0, 4.0, 30.0, 21.0, -98.0]]], [[[48.0, -24.0, 9.0, 79.0, 77.0], 
+[-33.0, 58.0, -51.0, 56.0, -50.0], [-35.0, -18.0, 108.0, 18.0, -2.0], [-31.0, 51.0, -1.0, -7.0, -66.0]], [[-31.0, 10.0, 3.0, 
+-71.0, -56.0], [34.0, -51.0, 51.0, -50.0, 42.0], [14.0, 13.0, -98.0, -2.0, 6.0], [37.0, -50.0, -3.0, 6.0, 55.0]], [[54.0, 
+-66.0, 45.0, 34.0, 104.0], [24.0, -17.0, -36.0, 32.0, -41.0], [-11.0, 15.0, 114.0, 12.0, 37.0], [-61.0, 15.0, -4.0, 14.0, 
+-9.0]], [[-20.0, 13.0, -46.0, -3.0, -4.0], [28.0, -6.0, 64.0, 26.0, 28.0], [-1.0, 46.0, -55.0, 3.0, -60.0], [52.0, 10.0, 43.0, 
+61.0, 25.0]], [[-16.0, 48.0, 43.0, 27.0, -31.0], [-48.0, 2.0, -37.0, 2.0, 28.0], [-14.0, 22.0, -56.0, -34.0, 25.0], [-17.0, 
+-23.0, 0.0, 16.0, -61.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_float_rank0(self):
-      arg0=Data(numpy.array([[0.92166039196513494, -0.88756772726825806, 0.51584477639977289, -0.091769134949095443, 
--0.59410155596129877], [-0.21264133241776295, -0.99912379000472296, -0.39510039872407354, 0.63706725072139769, 
--0.014024596004296619], [-0.71763440840753634, 0.18493934212184127, -0.048531213740846457, 0.65025127044880593, 
-0.28319580428582536], [0.3890980206496224, -0.55389622293052998, -0.11386564567836932, 0.47865626831071628, 
-0.77724870834768001]]),self.functionspace)
-      arg1=-0.792380770389
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.79238077038907662, -0.88756772726825806, -0.79238077038907662, -0.79238077038907662, 
--0.79238077038907662], [-0.79238077038907662, -0.99912379000472296, -0.79238077038907662, -0.79238077038907662, 
--0.79238077038907662], [-0.79238077038907662, -0.79238077038907662, -0.79238077038907662, -0.79238077038907662, 
--0.79238077038907662], [-0.79238077038907662, -0.79238077038907662, -0.79238077038907662, -0.79238077038907662, 
--0.79238077038907662]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[1.0, 6.0, 0.0, 3.0, -2.0], [6.0, 3.0, 2.0, -7.0, 5.0], [2.0, 7.0, 1.0, 2.0, -4.0], [5.0, 4.0, 
+-3.0, -1.0, 7.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(-4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-4.0, -24.0, -0.0, -12.0, 8.0], [-24.0, -12.0, -8.0, 28.0, -20.0], [-8.0, -28.0, -4.0, -8.0, 
+16.0], [-20.0, -16.0, 12.0, 4.0, -28.0]])+(1.-msk_ref)*numpy.array([[-4.0, -24.0, -0.0, -12.0, 8.0], [-24.0, -12.0, -8.0, 28.0, 
+-20.0], [-8.0, -28.0, -4.0, -8.0, 16.0], [-20.0, -16.0, 12.0, 4.0, -28.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_float_rank0(self):
-      arg0=Data(numpy.array([[[0.74944567586463773, -0.33978343253328824], [-0.37890850997240322, 0.24248607098113717]], 
-[[-0.89701702176207077, 0.87276965314348209], [0.40649570156709047, 0.23333768985973946]], [[-0.099164468164592234, 
-0.80557277646808578], [0.16263513747592051, 0.90057254013938648]], [[-0.69543374467469943, 0.6643337919851946], 
-[-0.79741770598340134, -0.99292456633157555]], [[0.16172944706257919, -0.35955193794626594], [-0.5330239044023739, 
-0.21493737787509892]], [[0.2790541359506078, -0.6732090415846117], [0.87628168163683506, 
-0.87903061493575962]]]),self.functionspace)
-      arg1=-0.871289677371
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.87128967737138519, -0.87128967737138519], [-0.87128967737138519, -0.87128967737138519]], 
-[[-0.89701702176207077, -0.87128967737138519], [-0.87128967737138519, -0.87128967737138519]], [[-0.87128967737138519, 
--0.87128967737138519], [-0.87128967737138519, -0.87128967737138519]], [[-0.87128967737138519, -0.87128967737138519], 
-[-0.87128967737138519, -0.99292456633157555]], [[-0.87128967737138519, -0.87128967737138519], [-0.87128967737138519, 
--0.87128967737138519]], [[-0.87128967737138519, -0.87128967737138519], [-0.87128967737138519, 
--0.87128967737138519]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_float_rank0(self):
-      arg0=Data(numpy.array([[[[-0.1388269187667055, 0.63673847966886488, -0.66759240330085645, -0.34685771879646921], 
-[-0.8392936053248905, 0.105179246187733, 0.0075929780086834153, -0.61673063456035648], [0.85000062095565854, 
--0.063763121690259439, -0.34883169739146491, 0.48037150690786268]], [[0.29358432415872904, -0.4707085862025322, 
--0.65438978095826439, -0.71740395392272682], [-0.47514822799320178, -0.97629638396916341, 0.17825044054295769, 
--0.25246398111694068], [-0.6220915922021002, 0.84788597777577634, 0.82889468506100461, -0.012674439024131567]]], 
-[[[0.35116363603933731, -0.021538026059338744, -0.17384192774016105, -0.45553109503155098], [0.20056679586272153, 
-0.30744588054944422, -0.77874328797484016, -0.88012265977233417], [-0.42260697201030206, -0.61038803434718636, 
-0.47895312009091717, -0.038151577343234599]], [[-0.53415574143168665, 0.84695135128253862, 0.18589602384578963, 
--0.61915445579529371], [0.52952255634814915, -0.98555762331258112, 0.96914190429825697, -0.7938040908090811], 
-[-0.21437472718479267, -0.97693491984729741, -0.20188828071516474, -0.97583229805026028]]], [[[0.17231265722644173, 
--0.068428660408735631, -0.63970341301842293, -0.82382393634357487], [-0.66840533565477145, -0.80976059948291401, 
--0.5982127225211793, 0.72748975461801502], [-0.10852873189382928, -0.42677679737230956, 0.46920906990042588, 
-0.86994684336813899]], [[-0.11514183406335321, -0.092372123984953092, 0.83938403886434299, 0.90243772022516411], 
-[-0.75932711388683383, -0.29960560855890805, -0.14267592964077958, -0.014233063379661903], [0.96335057859736772, 
-0.8315593009623734, -0.77043221707324938, -0.26892059588084694]]]]),self.functionspace)
-      arg1=-0.456782141397
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.45678214139666196, -0.45678214139666196, -0.66759240330085645, -0.45678214139666196], 
-[-0.8392936053248905, -0.45678214139666196, -0.45678214139666196, -0.61673063456035648], [-0.45678214139666196, 
--0.45678214139666196, -0.45678214139666196, -0.45678214139666196]], [[-0.45678214139666196, -0.4707085862025322, 
--0.65438978095826439, -0.71740395392272682], [-0.47514822799320178, -0.97629638396916341, -0.45678214139666196, 
--0.45678214139666196], [-0.6220915922021002, -0.45678214139666196, -0.45678214139666196, -0.45678214139666196]]], 
-[[[-0.45678214139666196, -0.45678214139666196, -0.45678214139666196, -0.45678214139666196], [-0.45678214139666196, 
--0.45678214139666196, -0.77874328797484016, -0.88012265977233417], [-0.45678214139666196, -0.61038803434718636, 
--0.45678214139666196, -0.45678214139666196]], [[-0.53415574143168665, -0.45678214139666196, -0.45678214139666196, 
--0.61915445579529371], [-0.45678214139666196, -0.98555762331258112, -0.45678214139666196, -0.7938040908090811], 
-[-0.45678214139666196, -0.97693491984729741, -0.45678214139666196, -0.97583229805026028]]], [[[-0.45678214139666196, 
--0.45678214139666196, -0.63970341301842293, -0.82382393634357487], [-0.66840533565477145, -0.80976059948291401, 
--0.5982127225211793, -0.45678214139666196], [-0.45678214139666196, -0.45678214139666196, -0.45678214139666196, 
--0.45678214139666196]], [[-0.45678214139666196, -0.45678214139666196, -0.45678214139666196, -0.45678214139666196], 
-[-0.75932711388683383, -0.45678214139666196, -0.45678214139666196, -0.45678214139666196], [-0.45678214139666196, 
--0.45678214139666196, -0.77043221707324938, -0.45678214139666196]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_array_rank0(self):
-      arg0=Data(-0.703477260169,self.functionspace)
-      arg1=numpy.array(-0.111524267259)
-      res=minimum(arg0,arg1)
-      ref=Data(-0.703477260169,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_array_rank0(self):
-      arg0=Data(numpy.array([-0.051626260426405057, -0.86657522504242901]),self.functionspace)
-      arg1=numpy.array(-0.129380536671)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.12938053667112936, -0.86657522504242901]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_array_rank0(self):
-      arg0=Data(numpy.array([[-0.6309979859705459, 0.78447705956664482, 0.917224542144363, -0.83129287572552357, 
-0.5512981316358605], [0.43503920838346177, 0.46800695003772042, -0.69428086176864978, 0.088050921116030967, 
--0.15187099091557288], [0.045904757583457245, 0.43220580296973821, 0.21222982060715156, 0.31117897079074908, 
--0.44179607670877008], [0.22348517314633543, 0.44230213315739264, -0.82108511449959209, -0.35816040215571188, 
--0.44975983281622223]]),self.functionspace)
-      arg1=numpy.array(0.14849378456)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.6309979859705459, 0.14849378455981843, 0.14849378455981843, -0.83129287572552357, 
-0.14849378455981843], [0.14849378455981843, 0.14849378455981843, -0.69428086176864978, 0.088050921116030967, 
--0.15187099091557288], [0.045904757583457245, 0.14849378455981843, 0.14849378455981843, 0.14849378455981843, 
--0.44179607670877008], [0.14849378455981843, 0.14849378455981843, -0.82108511449959209, -0.35816040215571188, 
--0.44975983281622223]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-4.0, -6.0, 3.0], [3.0, 5.0, -4.0], [1.0, 1.0, 6.0], [-7.0, -2.0, -7.0], [-7.0, -2.0, -6.0]], 
+[[-4.0, -5.0, 7.0], [-7.0, 0.0, 2.0], [2.0, -6.0, -6.0], [7.0, 5.0, 3.0], [-5.0, -4.0, 3.0]], [[4.0, 7.0, -7.0], [-4.0, -1.0, 
+6.0], [-6.0, -1.0, -7.0], [7.0, -1.0, -1.0], [0.0, 5.0, -2.0]], [[-7.0, -3.0, 7.0], [-5.0, -7.0, 2.0], [-2.0, 0.0, 0.0], [-6.0, 
+-3.0, 2.0], [7.0, -2.0, -4.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-4.0, -5.0, 2.0])+(1.-msk_arg1)*numpy.array([1.0, -3.0, -4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[52.0, -45.0, 3.0, 24.0, 26.0], [55.0, 32.0, 10.0, -47.0, 46.0], [-65.0, 33.0, 15.0, -25.0, 
+-29.0], [57.0, 59.0, 8.0, 43.0, -26.0]])+(1.-msk_ref)*numpy.array([[2.0, 4.0, -26.0, 27.0, 23.0], [-17.0, -15.0, 44.0, -20.0, 
+-5.0], [11.0, -25.0, 25.0, 14.0, -7.0], [-26.0, 8.0, -2.0, -5.0, 29.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_array_rank0(self):
-      arg0=Data(numpy.array([[[-0.39477601512904448, 0.93108074593242995], [0.5196584332324099, 0.079546360600516008]], 
-[[-0.011408950668585494, -0.19261328272506151], [-0.56101138822270258, 0.0080905002789830593]], [[-0.12985789454999708, 
-0.18948827014477776], [0.97067644642834749, 0.91441994772822888]], [[0.70947246023344901, 0.057294420615167985], 
-[-0.55510575011556451, -0.67986242508465433]], [[0.53473055660037172, 0.62107497512061527], [0.31696913866088416, 
--0.84521363185821374]], [[0.57739437704357788, 0.28991965886080817], [0.16266973488424896, 
-0.5671198696134534]]]),self.functionspace)
-      arg1=numpy.array(-0.578089688994)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.57808968899364288, -0.57808968899364288], [-0.57808968899364288, -0.57808968899364288]], 
-[[-0.57808968899364288, -0.57808968899364288], [-0.57808968899364288, -0.57808968899364288]], [[-0.57808968899364288, 
--0.57808968899364288], [-0.57808968899364288, -0.57808968899364288]], [[-0.57808968899364288, -0.57808968899364288], 
-[-0.57808968899364288, -0.67986242508465433]], [[-0.57808968899364288, -0.57808968899364288], [-0.57808968899364288, 
--0.84521363185821374]], [[-0.57808968899364288, -0.57808968899364288], [-0.57808968899364288, 
--0.57808968899364288]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-3.0, -7.0, -3.0], [-4.0, 3.0, -4.0]], [[-7.0, -2.0, -5.0], [0.0, -2.0, 7.0]], [[2.0, -4.0, 
+3.0], [-1.0, -1.0, 4.0]], [[1.0, 1.0, 7.0], [-1.0, 0.0, -2.0]], [[-2.0, 1.0, -2.0], [-5.0, 0.0, 6.0]]], [[[-3.0, -5.0, 0.0], 
+[-1.0, -1.0, 1.0]], [[-7.0, -4.0, -6.0], [1.0, 7.0, -2.0]], [[1.0, -2.0, -4.0], [4.0, -2.0, 0.0]], [[0.0, 1.0, -5.0], [-1.0, 
+-7.0, -7.0]], [[-5.0, 0.0, 2.0], [0.0, 0.0, 1.0]]], [[[0.0, -6.0, 2.0], [0.0, -1.0, -4.0]], [[-7.0, -1.0, 7.0], [3.0, -7.0, 
+-4.0]], [[4.0, 1.0, -3.0], [7.0, -5.0, 4.0]], [[0.0, 2.0, -4.0], [7.0, 0.0, 0.0]], [[4.0, -3.0, -5.0], [1.0, -1.0, -6.0]]], 
+[[[6.0, -2.0, -4.0], [-7.0, 3.0, -2.0]], [[-1.0, 3.0, 1.0], [4.0, 0.0, 7.0]], [[6.0, 1.0, -1.0], [-3.0, -1.0, -7.0]], [[-2.0, 
+-6.0, -1.0], [-7.0, -4.0, -3.0]], [[-6.0, -5.0, -1.0], [-4.0, -4.0, 4.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[2.0, -5.0, 5.0], [-4.0, -1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[0.0, -2.0, 0.0], [1.0, 6.0, 
+5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[27.0, -27.0, 44.0, 36.0, 1.0], [24.0, -35.0, -22.0, -19.0, 0.0], [41.0, 21.0, -35.0, -58.0, 
+-5.0], [27.0, -28.0, 15.0, 53.0, 28.0]])+(1.-msk_ref)*numpy.array([[8.0, 27.0, 21.0, -13.0, 23.0], [8.0, 41.0, -4.0, -80.0, 
+5.0], [-14.0, -57.0, -5.0, 3.0, -29.0], [5.0, 33.0, -46.0, -34.0, 2.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_array_rank0(self):
-      arg0=Data(numpy.array([[[[0.58465167980803057, 0.0072059833259232597, 0.10727877587063395, 0.63113722764806979], 
-[0.93653531533863443, 0.16810528871356945, 0.21643745838889594, -0.93449191563091616], [-0.62020651520280623, 
-0.074389445958584322, -0.8665042207324325, 0.99896909552637947]], [[-0.16598165682557431, 0.051228620323296115, 
-0.12782685941597638, 0.99340798955327081], [-0.38550610833728238, 0.040786943724632208, -0.32308295140597143, 
-0.87369291428889384], [0.0012250072168713544, 0.42329577041092215, 0.91221785716084169, 0.95683884961498467]]], 
-[[[0.78554940016237707, -0.038755571687487222, -0.22988059146204809, -0.89249557409600633], [-0.95357834899939875, 
--0.55681052529943598, -0.85504105863507385, 0.67389329257018593], [-0.057504850827395648, 0.76153677924906082, 
--0.60495762331902969, 0.51113529335496688]], [[-0.049075872488488104, -0.038400746530552032, 0.69878393264314442, 
-0.011406572165138851], [-0.90312910067746444, -0.20667382966347003, -0.1155681279992582, 0.39031082462470401], 
-[-0.71121787314583318, -0.87280260307269142, 0.50415662027435815, -0.93354815046253092]]], [[[0.23763626249632419, 
--0.56488234036028739, 0.8658467087211914, -0.98353794563121855], [0.9906136361815927, -0.44094476246559688, 0.6015899220857992, 
-0.76861991342931102], [0.4688721921620318, -0.89478060385034408, -0.91040519788606256, 0.13095510541648592]], 
-[[0.54226227573912822, -0.25705182063540133, 0.2900354262376923, -0.2164301562016222], [-0.53559360744049722, 
--0.24938270106067995, 0.68768814954490987, -0.20605799444486284], [0.013941991501521089, -0.50250813872002276, 
-0.78373202627834027, -0.1225349799036779]]]]),self.functionspace)
-      arg1=numpy.array(0.119932171092)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[0.11993217109155174, 0.0072059833259232597, 0.10727877587063395, 0.11993217109155174], 
-[0.11993217109155174, 0.11993217109155174, 0.11993217109155174, -0.93449191563091616], [-0.62020651520280623, 
-0.074389445958584322, -0.8665042207324325, 0.11993217109155174]], [[-0.16598165682557431, 0.051228620323296115, 
-0.11993217109155174, 0.11993217109155174], [-0.38550610833728238, 0.040786943724632208, -0.32308295140597143, 
-0.11993217109155174], [0.0012250072168713544, 0.11993217109155174, 0.11993217109155174, 0.11993217109155174]]], 
-[[[0.11993217109155174, -0.038755571687487222, -0.22988059146204809, -0.89249557409600633], [-0.95357834899939875, 
--0.55681052529943598, -0.85504105863507385, 0.11993217109155174], [-0.057504850827395648, 0.11993217109155174, 
--0.60495762331902969, 0.11993217109155174]], [[-0.049075872488488104, -0.038400746530552032, 0.11993217109155174, 
-0.011406572165138851], [-0.90312910067746444, -0.20667382966347003, -0.1155681279992582, 0.11993217109155174], 
-[-0.71121787314583318, -0.87280260307269142, 0.11993217109155174, -0.93354815046253092]]], [[[0.11993217109155174, 
--0.56488234036028739, 0.11993217109155174, -0.98353794563121855], [0.11993217109155174, -0.44094476246559688, 
-0.11993217109155174, 0.11993217109155174], [0.11993217109155174, -0.89478060385034408, -0.91040519788606256, 
-0.11993217109155174]], [[0.11993217109155174, -0.25705182063540133, 0.11993217109155174, -0.2164301562016222], 
-[-0.53559360744049722, -0.24938270106067995, 0.11993217109155174, -0.20605799444486284], [0.013941991501521089, 
--0.50250813872002276, 0.11993217109155174, -0.1225349799036779]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank2_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[2.0, 5.0, 1.0, -7.0, -5.0], [7.0, 2.0, 2.0, -5.0, 0.0], [-6.0, 0.0, 5.0, -5.0, 0.0], [6.0, 5.0, 
+-5.0, 1.0, 1.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([7.0, -2.0])+(1.-msk_arg1)*numpy.array([0.0, 4.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[14.0, -4.0], [35.0, -10.0], [7.0, -2.0], [-49.0, 14.0], [-35.0, 10.0]], [[49.0, -14.0], [14.0, 
+-4.0], [14.0, -4.0], [-35.0, 10.0], [0.0, 0.0]], [[-42.0, 12.0], [0.0, 0.0], [35.0, -10.0], [-35.0, 10.0], [0.0, 0.0]], [[42.0, 
+-12.0], [35.0, -10.0], [-35.0, 10.0], [7.0, -2.0], [7.0, -2.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 8.0], [0.0, 20.0], [0.0, 
+4.0], [0.0, -28.0], [0.0, -20.0]], [[0.0, 28.0], [0.0, 8.0], [0.0, 8.0], [0.0, -20.0], [0.0, 0.0]], [[0.0, -24.0], [0.0, 0.0], 
+[0.0, 20.0], [0.0, -20.0], [0.0, 0.0]], [[0.0, 24.0], [0.0, 20.0], [0.0, -20.0], [0.0, 4.0], [0.0, 4.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_constData_rank0(self):
-      arg0=Data(-0.0682904128536,self.functionspace)
-      arg1=Data(0.59973017062,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(-0.0682904128536,self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[4.0, 1.0, -3.0], [-3.0, -6.0, 3.0], [-1.0, -4.0, 1.0], [-3.0, 6.0, -7.0], [-5.0, -1.0, -4.0]], 
+[[1.0, 7.0, -2.0], [7.0, 4.0, -5.0], [-3.0, -6.0, 1.0], [-6.0, 0.0, -7.0], [-3.0, -3.0, -5.0]], [[7.0, 6.0, 4.0], [5.0, 5.0, 
+-6.0], [7.0, -3.0, 2.0], [4.0, -5.0, -4.0], [-1.0, 7.0, 1.0]], [[-5.0, -1.0, 0.0], [-2.0, -4.0, 6.0], [-1.0, 5.0, 0.0], [6.0, 
+0.0, -6.0], [-6.0, 0.0, -4.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, 0.0], [-6.0, -4.0], [-6.0, 4.0]])+(1.-msk_arg1)*numpy.array([[4.0, -6.0], [-3.0, 4.0], 
+[-3.0, -3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-12.0, -16.0], [36.0, 36.0], [24.0, 20.0], [24.0, -52.0], [60.0, -12.0]], [[-36.0, -36.0], 
+[-36.0, -36.0], [48.0, 28.0], [78.0, -28.0], [66.0, -8.0]], [[-102.0, -8.0], [-24.0, -44.0], [-36.0, 20.0], [30.0, 4.0], 
+[-42.0, -24.0]], [[36.0, 4.0], [0.0, 40.0], [-24.0, -20.0], [0.0, -24.0], [60.0, -16.0]]])+(1.-msk_ref)*numpy.array([[[22.0, 
+-11.0], [-3.0, -15.0], [5.0, -13.0], [-9.0, 63.0], [-5.0, 38.0]], [[-11.0, 28.0], [31.0, -11.0], [3.0, -9.0], [-3.0, 57.0], 
+[12.0, 21.0]], [[-2.0, -30.0], [23.0, 8.0], [31.0, -60.0], [43.0, -32.0], [-28.0, 31.0]], [[-17.0, 26.0], [-14.0, -22.0], 
+[-19.0, 26.0], [42.0, -18.0], [-12.0, 48.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_constData_rank0(self):
-      arg0=Data(numpy.array([-0.046535259888465186, 0.48670114343582571]),self.functionspace)
-      arg1=Data(-0.348298274913,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.34829827491324861, -0.34829827491324861]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, 7.0, -2.0], [2.0, -2.0, 6.0]], [[-3.0, 5.0, 0.0], [-7.0, 0.0, -6.0]], [[0.0, 0.0, 1.0], 
+[4.0, 2.0, 3.0]], [[7.0, -5.0, 0.0], [2.0, 0.0, -5.0]], [[0.0, -4.0, 1.0], [7.0, -6.0, -3.0]]], [[[0.0, 0.0, -1.0], [-6.0, 1.0, 
+-2.0]], [[0.0, 3.0, 5.0], [-3.0, -3.0, 0.0]], [[-2.0, 7.0, -2.0], [6.0, -3.0, -6.0]], [[-6.0, -3.0, 6.0], [5.0, 7.0, 2.0]], 
+[[-5.0, -5.0, 0.0], [-6.0, -1.0, -7.0]]], [[[-5.0, -7.0, -5.0], [5.0, -7.0, -3.0]], [[-3.0, 2.0, 4.0], [-1.0, -1.0, 1.0]], 
+[[-1.0, 6.0, -3.0], [0.0, -3.0, -4.0]], [[6.0, 3.0, 7.0], [-6.0, -1.0, 0.0]], [[7.0, 1.0, -3.0], [-1.0, -3.0, 5.0]]], [[[5.0, 
+-6.0, -7.0], [6.0, -6.0, 4.0]], [[7.0, -6.0, -5.0], [-3.0, -5.0, 7.0]], [[1.0, -2.0, -2.0], [0.0, 1.0, 0.0]], [[-2.0, -7.0, 
+7.0], [-3.0, 4.0, 0.0]], [[3.0, -2.0, 3.0], [-2.0, -4.0, -1.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-1.0, 0.0], [4.0, -6.0], [-6.0, -2.0]], [[-3.0, 2.0], [-1.0, -2.0], [2.0, 
+-3.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 4.0], [2.0, -3.0], [-4.0, -1.0]], [[5.0, -2.0], [1.0, 0.0], [6.0, -6.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[49.0, -48.0], [32.0, -26.0], [-14.0, -7.0], [-43.0, 49.0], [-43.0, 57.0]], [[19.0, -6.0], 
+[-6.0, -28.0], [15.0, -2.0], [-60.0, -4.0], [-10.0, 41.0]], [[-7.0, 85.0], [-7.0, -23.0], [38.0, -12.0], [-17.0, -42.0], [31.0, 
+-11.0]], [[9.0, 62.0], [27.0, 29.0], [2.0, 14.0], [-63.0, 14.0], [-21.0, 13.0]]])+(1.-msk_ref)*numpy.array([[[72.0, -63.0], 
+[-43.0, 23.0], [36.0, -27.0], [-72.0, 69.0], [-1.0, 15.0]], [[-37.0, 25.0], [-32.0, -8.0], [25.0, -3.0], [50.0, -43.0], [-53.0, 
+49.0]], [[36.0, 14.0], [6.0, -26.0], [3.0, 5.0], [-89.0, 20.0], [-6.0, 0.0]], [[34.0, 9.0], [-12.0, 15.0], [-1.0, 12.0], 
+[-41.0, 12.0], [-54.0, 25.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_constData_rank0(self):
-      arg0=Data(numpy.array([[0.0043433043409331074, -0.57853974767086314, 0.66921930943734331, 0.6516414165234734, 
--0.10393719679290947], [-0.53471960534791219, -0.013287726154472157, 0.48621509573775468, 0.40828070350173196, 
-0.60537705279057641], [-0.83716110570575375, 0.31558661264530308, -0.37910809975832604, 0.57779622112999607, 
-0.93389423604887267], [-0.49975805605893742, 0.1709728139617237, -0.45509192065283166, 0.59113241384052828, 
-0.6466938264587454]]),self.functionspace)
-      arg1=Data(-0.168612415903,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.16861241590337417, -0.57853974767086314, -0.16861241590337417, -0.16861241590337417, 
--0.16861241590337417], [-0.53471960534791219, -0.16861241590337417, -0.16861241590337417, -0.16861241590337417, 
--0.16861241590337417], [-0.83716110570575375, -0.16861241590337417, -0.37910809975832604, -0.16861241590337417, 
--0.16861241590337417], [-0.49975805605893742, -0.16861241590337417, -0.45509192065283166, -0.16861241590337417, 
--0.16861241590337417]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   def test_generalTensorProduct_constData_rank2_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[2.0, -1.0, 0.0, -2.0, -1.0], [-5.0, 3.0, -4.0, -7.0, 7.0], [-1.0, 7.0, -5.0, -1.0, -4.0], [7.0, 
+-3.0, 2.0, 2.0, 0.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[5.0, 4.0, 1.0, -2.0, -4.0], [7.0, 5.0, -5.0, 0.0, -4.0], [4.0, 4.0, 1.0, 5.0, -3.0], [-3.0, 
+-4.0, 0.0, -5.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-2.0, -1.0, 4.0, 4.0, 4.0], [-4.0, 2.0, 3.0, 3.0, 7.0], [3.0, -4.0, -1.0, 
+2.0, -7.0], [-4.0, -7.0, -3.0, -7.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[10.0, 8.0, 2.0, -4.0, -8.0], [14.0, 10.0, -10.0, 0.0, -8.0], [8.0, 8.0, 2.0, 10.0, -6.0], 
+[-6.0, -8.0, 0.0, -10.0, -12.0]], [[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 4.0], [-4.0, -4.0, -1.0, -5.0, 3.0], 
+[3.0, 4.0, 0.0, 5.0, 6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[-10.0, -8.0, -2.0, 4.0, 8.0], [-14.0, -10.0, 10.0, 0.0, 8.0], [-8.0, -8.0, -2.0, -10.0, 6.0], [6.0, 8.0, 0.0, 
+10.0, 12.0]], [[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 4.0], [-4.0, -4.0, -1.0, -5.0, 3.0], [3.0, 4.0, 0.0, 5.0, 
+6.0]]], [[[-25.0, -20.0, -5.0, 10.0, 20.0], [-35.0, -25.0, 25.0, 0.0, 20.0], [-20.0, -20.0, -5.0, -25.0, 15.0], [15.0, 20.0, 
+0.0, 25.0, 30.0]], [[15.0, 12.0, 3.0, -6.0, -12.0], [21.0, 15.0, -15.0, 0.0, -12.0], [12.0, 12.0, 3.0, 15.0, -9.0], [-9.0, 
+-12.0, 0.0, -15.0, -18.0]], [[-20.0, -16.0, -4.0, 8.0, 16.0], [-28.0, -20.0, 20.0, 0.0, 16.0], [-16.0, -16.0, -4.0, -20.0, 
+12.0], [12.0, 16.0, 0.0, 20.0, 24.0]], [[-35.0, -28.0, -7.0, 14.0, 28.0], [-49.0, -35.0, 35.0, 0.0, 28.0], [-28.0, -28.0, -7.0, 
+-35.0, 21.0], [21.0, 28.0, 0.0, 35.0, 42.0]], [[35.0, 28.0, 7.0, -14.0, -28.0], [49.0, 35.0, -35.0, 0.0, -28.0], [28.0, 28.0, 
+7.0, 35.0, -21.0], [-21.0, -28.0, 0.0, -35.0, -42.0]]], [[[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 4.0], [-4.0, 
+-4.0, -1.0, -5.0, 3.0], [3.0, 4.0, 0.0, 5.0, 6.0]], [[35.0, 28.0, 7.0, -14.0, -28.0], [49.0, 35.0, -35.0, 0.0, -28.0], [28.0, 
+28.0, 7.0, 35.0, -21.0], [-21.0, -28.0, 0.0, -35.0, -42.0]], [[-25.0, -20.0, -5.0, 10.0, 20.0], [-35.0, -25.0, 25.0, 0.0, 
+20.0], [-20.0, -20.0, -5.0, -25.0, 15.0], [15.0, 20.0, 0.0, 25.0, 30.0]], [[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 
+4.0], [-4.0, -4.0, -1.0, -5.0, 3.0], [3.0, 4.0, 0.0, 5.0, 6.0]], [[-20.0, -16.0, -4.0, 8.0, 16.0], [-28.0, -20.0, 20.0, 0.0, 
+16.0], [-16.0, -16.0, -4.0, -20.0, 12.0], [12.0, 16.0, 0.0, 20.0, 24.0]]], [[[35.0, 28.0, 7.0, -14.0, -28.0], [49.0, 35.0, 
+-35.0, 0.0, -28.0], [28.0, 28.0, 7.0, 35.0, -21.0], [-21.0, -28.0, 0.0, -35.0, -42.0]], [[-15.0, -12.0, -3.0, 6.0, 12.0], 
+[-21.0, -15.0, 15.0, 0.0, 12.0], [-12.0, -12.0, -3.0, -15.0, 9.0], [9.0, 12.0, 0.0, 15.0, 18.0]], [[10.0, 8.0, 2.0, -4.0, 
+-8.0], [14.0, 10.0, -10.0, 0.0, -8.0], [8.0, 8.0, 2.0, 10.0, -6.0], [-6.0, -8.0, 0.0, -10.0, -12.0]], [[10.0, 8.0, 2.0, -4.0, 
+-8.0], [14.0, 10.0, -10.0, 0.0, -8.0], [8.0, 8.0, 2.0, 10.0, -6.0], [-6.0, -8.0, 0.0, -10.0, -12.0]], [[0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 
+-2.0, 8.0, 8.0, 8.0], [-8.0, 4.0, 6.0, 6.0, 14.0], [6.0, -8.0, -2.0, 4.0, -14.0], [-8.0, -14.0, -6.0, -14.0, 0.0]], [[2.0, 1.0, 
+-4.0, -4.0, -4.0], [4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], [4.0, 7.0, 3.0, 7.0, 0.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[4.0, 2.0, -8.0, -8.0, -8.0], 
+[8.0, -4.0, -6.0, -6.0, -14.0], [-6.0, 8.0, 2.0, -4.0, 14.0], [8.0, 14.0, 6.0, 14.0, 0.0]], [[2.0, 1.0, -4.0, -4.0, -4.0], 
+[4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], [4.0, 7.0, 3.0, 7.0, 0.0]]], [[[10.0, 5.0, -20.0, -20.0, -20.0], 
+[20.0, -10.0, -15.0, -15.0, -35.0], [-15.0, 20.0, 5.0, -10.0, 35.0], [20.0, 35.0, 15.0, 35.0, 0.0]], [[-6.0, -3.0, 12.0, 12.0, 
+12.0], [-12.0, 6.0, 9.0, 9.0, 21.0], [9.0, -12.0, -3.0, 6.0, -21.0], [-12.0, -21.0, -9.0, -21.0, 0.0]], [[8.0, 4.0, -16.0, 
+-16.0, -16.0], [16.0, -8.0, -12.0, -12.0, -28.0], [-12.0, 16.0, 4.0, -8.0, 28.0], [16.0, 28.0, 12.0, 28.0, 0.0]], [[14.0, 7.0, 
+-28.0, -28.0, -28.0], [28.0, -14.0, -21.0, -21.0, -49.0], [-21.0, 28.0, 7.0, -14.0, 49.0], [28.0, 49.0, 21.0, 49.0, 0.0]], 
+[[-14.0, -7.0, 28.0, 28.0, 28.0], [-28.0, 14.0, 21.0, 21.0, 49.0], [21.0, -28.0, -7.0, 14.0, -49.0], [-28.0, -49.0, -21.0, 
+-49.0, 0.0]]], [[[2.0, 1.0, -4.0, -4.0, -4.0], [4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], [4.0, 7.0, 3.0, 7.0, 
+0.0]], [[-14.0, -7.0, 28.0, 28.0, 28.0], [-28.0, 14.0, 21.0, 21.0, 49.0], [21.0, -28.0, -7.0, 14.0, -49.0], [-28.0, -49.0, 
+-21.0, -49.0, 0.0]], [[10.0, 5.0, -20.0, -20.0, -20.0], [20.0, -10.0, -15.0, -15.0, -35.0], [-15.0, 20.0, 5.0, -10.0, 35.0], 
+[20.0, 35.0, 15.0, 35.0, 0.0]], [[2.0, 1.0, -4.0, -4.0, -4.0], [4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], 
+[4.0, 7.0, 3.0, 7.0, 0.0]], [[8.0, 4.0, -16.0, -16.0, -16.0], [16.0, -8.0, -12.0, -12.0, -28.0], [-12.0, 16.0, 4.0, -8.0, 
+28.0], [16.0, 28.0, 12.0, 28.0, 0.0]]], [[[-14.0, -7.0, 28.0, 28.0, 28.0], [-28.0, 14.0, 21.0, 21.0, 49.0], [21.0, -28.0, -7.0, 
+14.0, -49.0], [-28.0, -49.0, -21.0, -49.0, 0.0]], [[6.0, 3.0, -12.0, -12.0, -12.0], [12.0, -6.0, -9.0, -9.0, -21.0], [-9.0, 
+12.0, 3.0, -6.0, 21.0], [12.0, 21.0, 9.0, 21.0, 0.0]], [[-4.0, -2.0, 8.0, 8.0, 8.0], [-8.0, 4.0, 6.0, 6.0, 14.0], [6.0, -8.0, 
+-2.0, 4.0, -14.0], [-8.0, -14.0, -6.0, -14.0, 0.0]], [[-4.0, -2.0, 8.0, 8.0, 8.0], [-8.0, 4.0, 6.0, 6.0, 14.0], [6.0, -8.0, 
+-2.0, 4.0, -14.0], [-8.0, -14.0, -6.0, -14.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_constData_rank0(self):
-      arg0=Data(numpy.array([[[-0.96748467197599286, 0.64903315279047846], [-0.47705259350894802, -0.49164181292261167]], 
-[[-0.7015432941767461, -0.92535952728804727], [-0.36711963241188994, 0.92953764813788631]], [[-0.4385844921920905, 
--0.65550129890521247], [-0.74532935198119943, -0.40457816408817449]], [[-0.92662104366440556, -0.29287316117065054], 
-[0.96615565125929637, -0.36691971273969104]], [[0.72210396163733281, 0.081839009617667768], [-0.2691125588227703, 
--0.51493797950128295]], [[-0.54949192982790951, -0.6774418688721966], [-0.17061276299902639, 
-0.82709731250799012]]]),self.functionspace)
-      arg1=Data(0.499190483375,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.96748467197599286, 0.49919048337529159], [-0.47705259350894802, -0.49164181292261167]], 
-[[-0.7015432941767461, -0.92535952728804727], [-0.36711963241188994, 0.49919048337529159]], [[-0.4385844921920905, 
--0.65550129890521247], [-0.74532935198119943, -0.40457816408817449]], [[-0.92662104366440556, -0.29287316117065054], 
-[0.49919048337529159, -0.36691971273969104]], [[0.49919048337529159, 0.081839009617667768], [-0.2691125588227703, 
--0.51493797950128295]], [[-0.54949192982790951, -0.6774418688721966], [-0.17061276299902639, 
-0.49919048337529159]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[5.0, -7.0, 0.0], [2.0, 0.0, -3.0], [-1.0, -5.0, 3.0], [-2.0, -4.0, -4.0], [2.0, -1.0, 5.0]], 
+[[-6.0, -7.0, -4.0], [7.0, 2.0, 5.0], [5.0, 0.0, 4.0], [4.0, -2.0, -2.0], [-1.0, -5.0, -3.0]], [[0.0, 4.0, 7.0], [3.0, 1.0, 
+2.0], [3.0, 3.0, 5.0], [0.0, 7.0, 5.0], [-1.0, 2.0, -7.0]], [[-5.0, 0.0, 0.0], [1.0, 5.0, 0.0], [-7.0, 5.0, -4.0], [-3.0, 5.0, 
+5.0], [-6.0, -5.0, 6.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-1.0, 1.0, -5.0, -5.0, -2.0], [5.0, 7.0, -7.0, -5.0, -3.0], [3.0, 5.0, 4.0, 0.0, 2.0], 
+[-2.0, 0.0, -3.0, -5.0, 6.0]], [[3.0, 4.0, 6.0, -4.0, -7.0], [-3.0, 6.0, 3.0, 5.0, 1.0], [7.0, 4.0, -4.0, -4.0, -3.0], [3.0, 
+-2.0, -1.0, 6.0, -3.0]], [[5.0, -3.0, -1.0, 1.0, 0.0], [1.0, 7.0, -3.0, -4.0, 7.0], [-6.0, -6.0, 6.0, -5.0, -4.0], [-3.0, -1.0, 
+-5.0, 7.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, 4.0, -4.0, -7.0, 6.0], [-7.0, 2.0, 4.0, 4.0, -1.0], [4.0, -1.0, 6.0, 6.0, 
+-5.0], [1.0, -7.0, 7.0, -5.0, 3.0]], [[-2.0, 3.0, 1.0, -1.0, -2.0], [-6.0, -5.0, 6.0, 4.0, 7.0], [-1.0, -1.0, 7.0, -7.0, -4.0], 
+[-6.0, 0.0, -6.0, -5.0, 0.0]], [[5.0, 5.0, 1.0, 2.0, 5.0], [7.0, -6.0, -1.0, 1.0, 0.0], [7.0, -2.0, -1.0, -2.0, -1.0], [2.0, 
+-3.0, 1.0, 7.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-26.0, -23.0, -67.0, 3.0, 39.0], [46.0, -7.0, -56.0, -60.0, -22.0], [-34.0, -3.0, 48.0, 28.0, 
+31.0], [-31.0, 14.0, -8.0, -67.0, 51.0]], [[-17.0, 11.0, -7.0, -13.0, -4.0], [7.0, -7.0, -5.0, 2.0, -27.0], [24.0, 28.0, -10.0, 
+15.0, 16.0], [5.0, 3.0, 9.0, -31.0, 6.0]], [[1.0, -30.0, -28.0, 28.0, 37.0], [13.0, -16.0, -17.0, -32.0, 19.0], [-56.0, -43.0, 
+34.0, 5.0, 1.0], [-22.0, 7.0, -7.0, -4.0, 15.0]], [[-30.0, -6.0, -10.0, 22.0, 32.0], [-2.0, -66.0, 14.0, 6.0, -26.0], [-10.0, 
+-2.0, -16.0, 36.0, 24.0], [4.0, 12.0, 30.0, -42.0, -8.0]], [[20.0, -17.0, -21.0, -1.0, 3.0], [18.0, 43.0, -32.0, -35.0, 28.0], 
+[-31.0, -24.0, 42.0, -21.0, -13.0], [-22.0, -3.0, -30.0, 19.0, 25.0]]], [[[-35.0, -22.0, -8.0, 54.0, 61.0], [-13.0, -112.0, 
+33.0, 11.0, -17.0], [-43.0, -34.0, -20.0, 48.0, 25.0], [3.0, 18.0, 45.0, -40.0, -23.0]], [[24.0, 0.0, -28.0, -38.0, -28.0], 
+[34.0, 96.0, -58.0, -45.0, 16.0], [5.0, 13.0, 50.0, -33.0, -12.0], [-23.0, -9.0, -48.0, 12.0, 46.0]], [[15.0, -7.0, -29.0, 
+-21.0, -10.0], [29.0, 63.0, -47.0, -41.0, 13.0], [-9.0, 1.0, 44.0, -20.0, -6.0], [-22.0, -4.0, -35.0, 3.0, 38.0]], [[-20.0, 
+2.0, -30.0, -14.0, 6.0], [24.0, 2.0, -28.0, -22.0, -28.0], [10.0, 24.0, 12.0, 18.0, 22.0], [-8.0, 6.0, 0.0, -46.0, 26.0]], 
+[[-29.0, -12.0, -22.0, 22.0, 37.0], [7.0, -58.0, 1.0, -8.0, -23.0], [-20.0, -7.0, -2.0, 35.0, 25.0], [-4.0, 13.0, 23.0, -46.0, 
+3.0]]], [[[47.0, -5.0, 17.0, -9.0, -28.0], [-5.0, 73.0, -9.0, -8.0, 53.0], [-14.0, -26.0, 26.0, -51.0, -40.0], [-9.0, -15.0, 
+-39.0, 73.0, 2.0]], [[10.0, 1.0, -11.0, -17.0, -13.0], [14.0, 41.0, -24.0, -18.0, 6.0], [4.0, 7.0, 20.0, -14.0, -5.0], [-9.0, 
+-4.0, -20.0, 5.0, 19.0]], [[31.0, 0.0, -2.0, -22.0, -27.0], [11.0, 74.0, -27.0, -20.0, 29.0], [0.0, -3.0, 30.0, -37.0, -23.0], 
+[-12.0, -11.0, -37.0, 38.0, 19.0]], [[46.0, 13.0, 37.0, -23.0, -49.0], [-16.0, 77.0, 6.0, 15.0, 42.0], [19.0, -2.0, 2.0, -53.0, 
+-41.0], [6.0, -19.0, -32.0, 77.0, -11.0]], [[-28.0, 28.0, 24.0, -10.0, -12.0], [-18.0, -44.0, 34.0, 43.0, -44.0], [53.0, 45.0, 
+-54.0, 27.0, 20.0], [29.0, 3.0, 36.0, -32.0, -26.0]]], [[[5.0, -5.0, 25.0, 25.0, 10.0], [-25.0, -35.0, 35.0, 25.0, 15.0], 
+[-15.0, -25.0, -20.0, 0.0, -10.0], [10.0, 0.0, 15.0, 25.0, -30.0]], [[14.0, 21.0, 25.0, -25.0, -37.0], [-10.0, 37.0, 8.0, 20.0, 
+2.0], [38.0, 25.0, -16.0, -20.0, -13.0], [13.0, -10.0, -8.0, 25.0, -9.0]], [[2.0, 25.0, 69.0, 11.0, -21.0], [-54.0, -47.0, 
+76.0, 76.0, -2.0], [38.0, 9.0, -72.0, 0.0, -13.0], [41.0, -6.0, 36.0, 37.0, -65.0]], [[43.0, 2.0, 40.0, 0.0, -29.0], [-25.0, 
+44.0, 21.0, 20.0, 49.0], [-4.0, -25.0, -2.0, -45.0, -41.0], [6.0, -15.0, -21.0, 80.0, -23.0]], [[21.0, -44.0, -6.0, 56.0, 
+47.0], [-9.0, -30.0, 9.0, -19.0, 55.0], [-89.0, -86.0, 32.0, -10.0, -21.0], [-21.0, 4.0, -7.0, 42.0, 
+-9.0]]]])+(1.-msk_ref)*numpy.array([[[[44.0, -1.0, -27.0, -28.0, 44.0], [7.0, 45.0, -22.0, -8.0, -54.0], [27.0, 2.0, -19.0, 
+79.0, 3.0], [47.0, -35.0, 77.0, 10.0, 15.0]], [[-3.0, -7.0, -11.0, -20.0, -3.0], [-35.0, 22.0, 11.0, 5.0, -2.0], [-13.0, 4.0, 
+15.0, 18.0, -7.0], [-4.0, -5.0, 11.0, -31.0, 6.0]], [[19.0, -4.0, 2.0, 18.0, 19.0], [58.0, 5.0, -37.0, -21.0, -34.0], [22.0, 
+0.0, -44.0, 23.0, 22.0], [35.0, -2.0, 26.0, 51.0, -3.0]], [[-24.0, -40.0, 0.0, 10.0, -24.0], [10.0, 40.0, -28.0, -28.0, -26.0], 
+[-32.0, 14.0, -36.0, 24.0, 30.0], [14.0, 26.0, 6.0, 2.0, -6.0]], [[39.0, 30.0, -4.0, -3.0, 39.0], [27.0, -21.0, -3.0, 9.0, 
+-9.0], [44.0, -11.0, 0.0, 9.0, -11.0], [18.0, -29.0, 25.0, 30.0, 6.0]]], [[[-42.0, -65.0, 13.0, 41.0, -42.0], [56.0, 47.0, 
+-62.0, -56.0, -43.0], [-45.0, 21.0, -81.0, 21.0, 62.0], [28.0, 54.0, -4.0, 37.0, -18.0]], [[63.0, 59.0, -21.0, -41.0, 63.0], 
+[-26.0, -26.0, 35.0, 41.0, 7.0], [61.0, -19.0, 51.0, 18.0, -48.0], [5.0, -64.0, 42.0, -10.0, 21.0]], [[50.0, 40.0, -16.0, 
+-27.0, 50.0], [-7.0, -14.0, 16.0, 24.0, -5.0], [48.0, -13.0, 26.0, 22.0, -29.0], [13.0, -47.0, 39.0, 3.0, 15.0]], [[18.0, 0.0, 
+-20.0, -30.0, 18.0], [-30.0, 30.0, 6.0, 6.0, -18.0], [4.0, 2.0, 12.0, 42.0, -10.0], [12.0, -22.0, 38.0, -24.0, 12.0]], [[-11.0, 
+-34.0, -4.0, 6.0, -11.0], [16.0, 41.0, -31.0, -27.0, -34.0], [-20.0, 12.0, -38.0, 35.0, 28.0], [23.0, 16.0, 20.0, 9.0, -3.0]]], 
+[[[27.0, 47.0, 11.0, 10.0, 27.0], [25.0, -62.0, 17.0, 23.0, 28.0], [45.0, -18.0, 21.0, -42.0, -23.0], [-10.0, -21.0, -17.0, 
+29.0, 0.0]], [[26.0, 25.0, -9.0, -18.0, 26.0], [-13.0, -11.0, 16.0, 18.0, 4.0], [25.0, -8.0, 23.0, 7.0, -21.0], [1.0, -27.0, 
+17.0, -6.0, 9.0]], [[37.0, 46.0, -4.0, -14.0, 37.0], [-4.0, -39.0, 25.0, 29.0, 18.0], [44.0, -16.0, 34.0, -13.0, -32.0], [-5.0, 
+-36.0, 8.0, 5.0, 9.0]], [[11.0, 46.0, 12.0, 3.0, 11.0], [-7.0, -65.0, 37.0, 33.0, 49.0], [28.0, -17.0, 44.0, -59.0, -33.0], 
+[-32.0, -15.0, -37.0, 0.0, 0.0]], [[-45.0, -33.0, -1.0, -9.0, -45.0], [-54.0, 30.0, 15.0, -3.0, 15.0], [-55.0, 13.0, 15.0, 
+-6.0, 4.0], [-27.0, 28.0, -26.0, -54.0, -3.0]]], [[[-30.0, -20.0, 20.0, 35.0, -30.0], [35.0, -10.0, -20.0, -20.0, 5.0], [-20.0, 
+5.0, -30.0, -30.0, 25.0], [-5.0, 35.0, -35.0, 25.0, -15.0]], [[-4.0, 19.0, 1.0, -12.0, -4.0], [-37.0, -23.0, 34.0, 24.0, 34.0], 
+[-1.0, -6.0, 41.0, -29.0, -25.0], [-29.0, -7.0, -23.0, -30.0, 3.0]], [[-72.0, -33.0, 29.0, 36.0, -72.0], [-9.0, -15.0, 6.0, 
+-12.0, 42.0], [-61.0, 10.0, -3.0, -69.0, 19.0], [-45.0, 61.0, -83.0, -18.0, -21.0]], [[-3.0, 28.0, 22.0, 26.0, -3.0], [26.0, 
+-61.0, 13.0, 13.0, 38.0], [18.0, -12.0, 12.0, -63.0, -10.0], [-23.0, 6.0, -46.0, 25.0, -9.0]], [[4.0, -9.0, 25.0, 59.0, 4.0], 
+[114.0, -23.0, -60.0, -38.0, -29.0], [23.0, -1.0, -77.0, -13.0, 44.0], [36.0, 24.0, -6.0, 97.0, -18.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_constData_rank0(self):
-      arg0=Data(numpy.array([[[[-0.37733922304651357, 0.93859055187304907, -0.66898461244429197, -0.46585811774138564], 
-[0.19019525471841159, 0.17346337979132165, -0.64718916649618929, -0.67366242394796338], [0.21369470981955363, 
--0.51799021616039864, -0.6056442944578373, -0.38855873336390934]], [[0.99912850246702045, -0.22170809303306993, 
--0.10146419048978084, 0.57504962195842402], [-0.65839444610623876, -0.11875165595273174, 0.68203592892318099, 
-0.35593988456162529], [0.99397536248303098, 0.74338026360660292, -0.19639175275880572, 0.57004920258862946]]], 
-[[[-0.65958353056467245, 0.65427773671661527, -0.14175338875473731, 0.39791966909561971], [0.40653156970772342, 
--0.99830720962539998, -0.47147437649596791, -0.18366519810361259], [-0.94376751485499333, 0.53108747554058211, 
--0.87104507659859154, 0.49459590756485095]], [[-0.83564421015096224, -0.94951507050099071, 0.8807711293336058, 
--0.078107576456112771], [-0.1222045997717498, -0.28558604389610087, 0.73718369414227958, -0.3309739040944093], 
-[-0.1342824947722332, -0.40766565005604072, 0.14915899465306381, -0.089308100175077065]]], [[[0.95785187074356348, 
--0.89162565354404499, -0.29472586924251343, 0.7678226475120653], [-0.37455223108752689, -0.23254090056192767, 
--0.42146652737226464, 0.52324509319178381], [0.51533338332973488, 0.50126475193545161, -0.95767232046665685, 
--0.033673825475154961]], [[-0.33046373133706775, 0.47620518964597536, 0.78139637666038175, 0.66138116717578854], 
-[0.79787867018082315, -0.72738889276213015, 0.28490828339394891, -0.55618525346623437], [-0.50670753528575885, 
--0.54352326092270364, -0.90122107838353926, -0.81241061207885834]]]]),self.functionspace)
-      arg1=Data(-0.145562749107,self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.37733922304651357, -0.14556274910733213, -0.66898461244429197, -0.46585811774138564], 
-[-0.14556274910733213, -0.14556274910733213, -0.64718916649618929, -0.67366242394796338], [-0.14556274910733213, 
--0.51799021616039864, -0.6056442944578373, -0.38855873336390934]], [[-0.14556274910733213, -0.22170809303306993, 
--0.14556274910733213, -0.14556274910733213], [-0.65839444610623876, -0.14556274910733213, -0.14556274910733213, 
--0.14556274910733213], [-0.14556274910733213, -0.14556274910733213, -0.19639175275880572, -0.14556274910733213]]], 
-[[[-0.65958353056467245, -0.14556274910733213, -0.14556274910733213, -0.14556274910733213], [-0.14556274910733213, 
--0.99830720962539998, -0.47147437649596791, -0.18366519810361259], [-0.94376751485499333, -0.14556274910733213, 
--0.87104507659859154, -0.14556274910733213]], [[-0.83564421015096224, -0.94951507050099071, -0.14556274910733213, 
--0.14556274910733213], [-0.14556274910733213, -0.28558604389610087, -0.14556274910733213, -0.3309739040944093], 
-[-0.14556274910733213, -0.40766565005604072, -0.14556274910733213, -0.14556274910733213]]], [[[-0.14556274910733213, 
--0.89162565354404499, -0.29472586924251343, -0.14556274910733213], [-0.37455223108752689, -0.23254090056192767, 
--0.42146652737226464, -0.14556274910733213], [-0.14556274910733213, -0.14556274910733213, -0.95767232046665685, 
--0.14556274910733213]], [[-0.33046373133706775, -0.14556274910733213, -0.14556274910733213, -0.14556274910733213], 
-[-0.14556274910733213, -0.72738889276213015, -0.14556274910733213, -0.55618525346623437], [-0.50670753528575885, 
--0.54352326092270364, -0.90122107838353926, -0.81241061207885834]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-5.0, -3.0, -5.0], [0.0, 0.0, 0.0]], [[6.0, 3.0, 0.0], [0.0, -7.0, -2.0]], [[4.0, -6.0, 4.0], 
+[2.0, 2.0, 7.0]], [[3.0, 3.0, 4.0], [1.0, -6.0, 4.0]], [[4.0, 6.0, -1.0], [-6.0, 6.0, 7.0]]], [[[1.0, -2.0, 2.0], [5.0, 7.0, 
+-5.0]], [[-3.0, -3.0, 0.0], [6.0, -5.0, -4.0]], [[5.0, 0.0, -3.0], [-3.0, -7.0, 4.0]], [[-5.0, 1.0, 0.0], [-2.0, 0.0, 0.0]], 
+[[5.0, -3.0, -1.0], [1.0, -6.0, 7.0]]], [[[4.0, -3.0, 4.0], [3.0, 0.0, 7.0]], [[-3.0, 7.0, -6.0], [1.0, 1.0, -4.0]], [[2.0, 
+-2.0, -3.0], [7.0, -2.0, -1.0]], [[-2.0, 7.0, 2.0], [-7.0, -4.0, -3.0]], [[-3.0, -5.0, -1.0], [-4.0, -3.0, 3.0]]], [[[7.0, 
+-7.0, 3.0], [0.0, 0.0, -2.0]], [[-5.0, -7.0, -3.0], [-3.0, 6.0, 0.0]], [[-3.0, -4.0, 2.0], [6.0, -4.0, -4.0]], [[5.0, 2.0, 
+-4.0], [3.0, -3.0, 0.0]], [[7.0, 2.0, 0.0], [5.0, -1.0, 0.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-3.0, 3.0, 0.0, -1.0, 0.0], [-6.0, -1.0, -2.0, -2.0, -4.0], [6.0, 2.0, 3.0, -6.0, -4.0], 
+[-4.0, 1.0, -2.0, -7.0, -6.0]], [[6.0, -7.0, -3.0, 3.0, 0.0], [7.0, -4.0, 4.0, 1.0, 6.0], [4.0, 4.0, 4.0, -2.0, -1.0], [-2.0, 
+4.0, -3.0, -4.0, 5.0]], [[4.0, -5.0, -6.0, 1.0, 0.0], [3.0, -6.0, -6.0, 1.0, 4.0], [-2.0, 7.0, -3.0, -5.0, -4.0], [0.0, 5.0, 
+-1.0, -7.0, 0.0]]], [[[-3.0, -4.0, -2.0, 2.0, 2.0], [6.0, 1.0, -2.0, -5.0, -1.0], [6.0, 1.0, -6.0, 0.0, 5.0], [0.0, -3.0, 5.0, 
+-5.0, 6.0]], [[1.0, -1.0, -1.0, -3.0, 1.0], [6.0, 0.0, 3.0, 0.0, 3.0], [2.0, -2.0, 1.0, -7.0, 6.0], [-7.0, 7.0, -6.0, 6.0, 
+1.0]], [[-2.0, -6.0, -2.0, -4.0, 0.0], [-3.0, -2.0, -4.0, 4.0, -2.0], [1.0, -5.0, 6.0, 0.0, 6.0], [4.0, 5.0, 5.0, 6.0, 
+3.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, 1.0, -3.0, -3.0, -7.0], [4.0, 3.0, 4.0, 1.0, -1.0], [0.0, -5.0, 2.0, -4.0, -7.0], 
+[-1.0, -2.0, 1.0, -4.0, 6.0]], [[-7.0, 6.0, -2.0, -4.0, 1.0], [1.0, 6.0, 5.0, 4.0, 1.0], [-1.0, 2.0, -5.0, -2.0, 7.0], [0.0, 
+0.0, 4.0, -1.0, -5.0]], [[7.0, -1.0, 0.0, 7.0, -5.0], [-1.0, -7.0, -7.0, -2.0, 4.0], [-4.0, -5.0, -2.0, 5.0, -6.0], [0.0, -4.0, 
+5.0, -1.0, -3.0]]], [[[2.0, 0.0, 2.0, 4.0, 4.0], [-6.0, 5.0, 2.0, 0.0, -5.0], [-7.0, 0.0, 7.0, 2.0, 2.0], [6.0, 0.0, -3.0, 
+-1.0, -7.0]], [[-5.0, 1.0, 0.0, -3.0, 7.0], [7.0, 3.0, -6.0, 0.0, 5.0], [-2.0, 0.0, 0.0, -6.0, 0.0], [1.0, -7.0, -7.0, 7.0, 
+-3.0]], [[7.0, -2.0, 4.0, -5.0, -5.0], [-4.0, -4.0, -1.0, 7.0, 7.0], [-5.0, -1.0, 1.0, 0.0, -7.0], [-7.0, -1.0, 0.0, 4.0, 
+-6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-23.0, 31.0, 39.0, -9.0, 0.0], [-6.0, 47.0, 28.0, 2.0, -18.0], [-32.0, -57.0, -12.0, 61.0, 
+43.0], [26.0, -42.0, 24.0, 82.0, 15.0]], [[-3.0, 16.0, 2.0, 32.0, -7.0], [-51.0, -14.0, -13.0, -17.0, -23.0], [32.0, 48.0, 
+11.0, 7.0, -81.0], [11.0, -41.0, 11.0, -108.0, -34.0]], [[-50.0, -18.0, -26.0, -48.0, 6.0], [-51.0, -16.0, -82.0, 8.0, -46.0], 
+[15.0, -25.0, 8.0, -46.0, 38.0], [10.0, 43.0, 39.0, 12.0, -19.0]], [[8.0, -54.0, -37.0, 14.0, -4.0], [-27.0, -46.0, -54.0, 
+12.0, -5.0], [20.0, 39.0, 21.0, -2.0, -38.0], [40.0, 10.0, 42.0, -78.0, 9.0]], [[30.0, -49.0, -20.0, -45.0, -6.0], [-6.0, 
+-42.0, 24.0, 55.0, 26.0], [33.0, -28.0, 123.0, -73.0, 30.0], [-42.0, 118.0, -56.0, 63.0, -3.0]]], [[[-5.0, 10.0, -13.0, 4.0, 
+17.0], [73.0, 10.0, 9.0, -47.0, 18.0], [33.0, 24.0, -64.0, -61.0, 27.0], [-69.0, 12.0, -40.0, -26.0, 6.0]], [[-24.0, 17.0, 
+10.0, 37.0, 7.0], [15.0, 29.0, -17.0, -43.0, -19.0], [-8.0, 18.0, -86.0, 59.0, -9.0], [37.0, -88.0, 55.0, -51.0, 22.0]], 
+[[-33.0, 25.0, 23.0, -9.0, -13.0], [-111.0, 2.0, -23.0, 18.0, -58.0], [8.0, -20.0, 59.0, 34.0, -41.0], [45.0, -30.0, 40.0, 
+-17.0, -43.0]], [[27.0, -14.0, 1.0, 4.0, -4.0], [25.0, -1.0, 18.0, 21.0, 28.0], [-38.0, -8.0, 1.0, 28.0, 9.0], [18.0, 5.0, 
+-3.0, 41.0, 23.0]], [[-60.0, 1.0, 5.0, -23.0, -4.0], [-105.0, 0.0, -64.0, 9.0, -75.0], [21.0, -31.0, 36.0, 23.0, -2.0], [56.0, 
+-22.0, 76.0, -15.0, -24.0]]], [[[-37.0, -41.0, -35.0, -31.0, 6.0], [-36.0, -27.0, -78.0, 6.0, -35.0], [29.0, -8.0, 12.0, -38.0, 
+28.0], [18.0, 38.0, 47.0, -17.0, 0.0]], [[33.0, -9.0, 20.0, 33.0, 3.0], [73.0, 20.0, 87.0, -14.0, 40.0], [26.0, -1.0, 8.0, 
+27.0, 16.0], [-25.0, -21.0, -30.0, 12.0, 48.0]], [[-51.0, 15.0, 14.0, 13.0, 12.0], [-2.0, 33.0, -10.0, -48.0, -43.0], [47.0, 
+-9.0, -43.0, 21.0, 23.0], [6.0, -61.0, 47.0, -38.0, 15.0]], [[79.0, -15.0, -9.0, 35.0, -18.0], [10.0, -39.0, 34.0, 36.0, 59.0], 
+[-41.0, 54.0, 36.0, 16.0, -84.0], [10.0, 14.0, -45.0, -35.0, -8.0]], [[-22.0, 32.0, 26.0, -24.0, -11.0], [-71.0, 19.0, -21.0, 
+32.0, -33.0], [-63.0, -46.0, 13.0, 54.0, 1.0], [55.0, -22.0, 35.0, 68.0, -25.0]]], [[[-47.0, 67.0, 7.0, -17.0, 0.0], [-76.0, 
+7.0, -52.0, -26.0, -54.0], [6.0, 17.0, -28.0, -43.0, -45.0], [-22.0, -16.0, -6.0, -54.0, -83.0]], [[-24.0, 55.0, 39.0, -43.0, 
+0.0], [-10.0, 48.0, 24.0, 15.0, -13.0], [-58.0, -74.0, -10.0, 17.0, 60.0], [-8.0, 3.0, -17.0, 135.0, -17.0]], [[-21.0, 13.0, 
+0.0, 33.0, 8.0], [20.0, 21.0, -30.0, -42.0, -14.0], [-14.0, 26.0, -95.0, 44.0, -10.0], [32.0, -75.0, 50.0, -55.0, 18.0]], 
+[[-31.0, 12.0, 15.0, 12.0, 3.0], [-28.0, 14.0, 7.0, -27.0, -36.0], [58.0, -1.0, 14.0, 7.0, -9.0], [-3.0, -37.0, 21.0, -48.0, 
+-5.0]], [[-25.0, -12.0, -15.0, 12.0, 9.0], [-4.0, -10.0, -19.0, -37.0, -24.0], [78.0, 29.0, -2.0, -39.0, -11.0], [-25.0, -7.0, 
+11.0, -88.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[-44.0, -18.0, 21.0, -8.0, 57.0], [-18.0, 2.0, 0.0, -7.0, -18.0], [23.0, 
+44.0, 15.0, 1.0, 44.0], [5.0, 30.0, -42.0, 28.0, 0.0]], [[36.0, 21.0, -32.0, 1.0, -78.0], [-14.0, 23.0, 83.0, 4.0, -52.0], 
+[21.0, -22.0, -5.0, 12.0, -7.0], [1.0, 39.0, 67.0, -84.0, 54.0]], [[137.0, -48.0, 32.0, 7.0, -67.0], [-20.0, -64.0, -57.0, 
+21.0, 55.0], [-63.0, -59.0, 51.0, 8.0, -139.0], [-39.0, -45.0, -20.0, 26.0, -20.0]], [[85.0, 3.0, 3.0, 9.0, -96.0], [-53.0, 
+-30.0, 33.0, 35.0, 9.0], [-34.0, -33.0, -6.0, 40.0, -50.0], [-31.0, 16.0, 74.0, -46.0, -22.0]], [[-18.0, 33.0, -8.0, -120.0, 
+-34.0], [73.0, 15.0, -2.0, 79.0, 107.0], [-7.0, -10.0, -55.0, -81.0, -41.0], [-83.0, -53.0, -1.0, 55.0, -21.0]]], [[[-26.0, 
+4.0, -9.0, 43.0, 75.0], [39.0, 43.0, -47.0, -46.0, -20.0], [-30.0, -14.0, 38.0, -22.0, 12.0], [71.0, -54.0, -61.0, 20.0, 
+-16.0]], [[12.0, -18.0, 11.0, 80.0, 27.0], [-70.0, 4.0, 19.0, -43.0, -83.0], [-9.0, 13.0, 47.0, 60.0, 40.0], [62.0, 45.0, 2.0, 
+-42.0, -6.0]], [[66.0, -7.0, -5.0, -47.0, -101.0], [-24.0, -16.0, 73.0, 39.0, -9.0], [27.0, -14.0, -1.0, 1.0, -51.0], [-58.0, 
+47.0, 48.0, -47.0, 57.0]], [[-41.0, 1.0, 9.0, 3.0, 28.0], [-7.0, -19.0, -19.0, -1.0, 16.0], [13.0, 27.0, -29.0, 14.0, 38.0], 
+[-7.0, 10.0, 5.0, 21.0, -21.0]], [[125.0, -32.0, 21.0, -23.0, -106.0], [-58.0, -37.0, 43.0, 44.0, 2.0], [-23.0, -33.0, 41.0, 
+19.0, -97.0], [-54.0, 29.0, 27.0, -31.0, 17.0]]], [[[128.0, -32.0, 28.0, 5.0, -74.0], [-37.0, -47.0, -28.0, 33.0, 43.0], 
+[-69.0, -53.0, 43.0, 16.0, -116.0], [-35.0, -31.0, 3.0, 8.0, -36.0]], [[-140.0, 54.0, -19.0, -40.0, 89.0], [18.0, 99.0, 65.0, 
+9.0, -42.0], [28.0, 63.0, -26.0, -36.0, 136.0], [38.0, 27.0, -15.0, 1.0, -21.0]], [[22.0, -7.0, 8.0, 20.0, 18.0], [-43.0, 48.0, 
+46.0, -7.0, -68.0], [-26.0, 2.0, 68.0, 7.0, 11.0], [45.0, 23.0, -28.0, -28.0, -6.0]], [[-62.0, 40.0, -34.0, -9.0, -30.0], 
+[23.0, -13.0, 26.0, 1.0, 11.0], [57.0, 17.0, -95.0, 14.0, 58.0], [-23.0, 27.0, 85.0, -34.0, 26.0]], [[38.0, -41.0, 23.0, 0.0, 
+-31.0], [-25.0, -73.0, -23.0, 0.0, 20.0], [28.0, 7.0, -4.0, 27.0, -37.0], [-45.0, 28.0, 5.0, 13.0, 29.0]]], [[[98.0, -34.0, 
+-15.0, 38.0, -61.0], [26.0, -34.0, -26.0, -41.0, -16.0], [5.0, -62.0, 41.0, 1.0, -102.0], [7.0, -24.0, -6.0, -32.0, 80.0]], 
+[[-38.0, -38.0, 23.0, -8.0, 73.0], [36.0, -33.0, -76.0, -27.0, 31.0], [28.0, 26.0, 10.0, -23.0, -2.0], [-7.0, -20.0, -81.0, 
+75.0, 17.0]], [[28.0, -25.0, 13.0, 95.0, 23.0], [-66.0, -13.0, -6.0, -51.0, -71.0], [-18.0, 1.0, 48.0, 66.0, 21.0], [63.0, 
+30.0, 1.0, -36.0, -10.0]], [[9.0, 18.0, -13.0, -30.0, -22.0], [-13.0, 61.0, 82.0, 21.0, -49.0], [-1.0, -1.0, 29.0, -20.0, 9.0], 
+[10.0, 27.0, 5.0, -42.0, 20.0]], [[43.0, 18.0, -15.0, -6.0, -34.0], [-7.0, 55.0, 54.0, 15.0, -35.0], [-35.0, -31.0, 39.0, 
+-16.0, -25.0], [22.0, -7.0, 7.0, -42.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_expandedData_rank0(self):
-      arg0=Data(0.847648908098,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.311113868368)+(1.-msk_arg1)*(0.434427772754)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.311113868368)+(1.-msk_ref)*(0.434427772754)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_expandedData_rank0(self):
-      arg0=Data(numpy.array([0.46831305963737124, 0.11263222450309307]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.149120762552)+(1.-msk_arg1)*(0.152164813827)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.14912076255240625, 0.11263222450309307])+(1.-msk_ref)*numpy.array([0.15216481382704261, 
-0.11263222450309307])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_expandedData_rank0(self):
-      arg0=Data(numpy.array([[-0.54224621195320832, 0.47554128544693075, 0.79438328624548626, 0.42268775103957679, 
-0.5508013258342499], [-0.052795411003615067, -0.39861061718913571, 0.16757651909234195, -0.1655995184462824, 
-0.64613941746480097], [-0.85102433746626382, -0.41445863472983424, -0.24645592071424027, -0.24779944984550029, 
--0.59625567262833989], [-0.93188639663803285, -0.37478830578694033, 0.9991234193984555, -0.93683631624508812, 
-0.52050343962722456]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.345473349033)+(1.-msk_arg1)*(0.211321735562)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.54224621195320832, -0.34547334903252191, -0.34547334903252191, -0.34547334903252191, 
--0.34547334903252191], [-0.34547334903252191, -0.39861061718913571, -0.34547334903252191, -0.34547334903252191, 
--0.34547334903252191], [-0.85102433746626382, -0.41445863472983424, -0.34547334903252191, -0.34547334903252191, 
--0.59625567262833989], [-0.93188639663803285, -0.37478830578694033, -0.34547334903252191, -0.93683631624508812, 
--0.34547334903252191]])+(1.-msk_ref)*numpy.array([[-0.54224621195320832, 0.21132173556238087, 0.21132173556238087, 
-0.21132173556238087, 0.21132173556238087], [-0.052795411003615067, -0.39861061718913571, 0.16757651909234195, 
--0.1655995184462824, 0.21132173556238087], [-0.85102433746626382, -0.41445863472983424, -0.24645592071424027, 
--0.24779944984550029, -0.59625567262833989], [-0.93188639663803285, -0.37478830578694033, 0.21132173556238087, 
--0.93683631624508812, 0.21132173556238087]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_expandedData_rank0(self):
-      arg0=Data(numpy.array([[[0.77625068038328937, 0.75783014853553654], [-0.040642761077081202, 0.79204260731199394]], 
-[[-0.54776326748801329, 0.65058903205233287], [-0.01282121102231315, 0.15475725458670797]], [[0.31470843587449004, 
--0.07753563902895122], [0.11099859076132779, -0.81518098747217427]], [[-0.55118665017984303, -0.67078063912337416], 
-[-0.98004112137157251, -0.18816152794055951]], [[-0.046829245664697039, 0.16829625958590699], [-0.038355227747033371, 
-0.56440637140131744]], [[0.59007303065181005, 0.50473600523369155], [-0.12313540236032172, 
--0.92117335984586246]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.73895651651)+(1.-msk_arg1)*(0.719199756325)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.73895651650968386, 0.73895651650968386], [-0.040642761077081202, 0.73895651650968386]], 
-[[-0.54776326748801329, 0.65058903205233287], [-0.01282121102231315, 0.15475725458670797]], [[0.31470843587449004, 
--0.07753563902895122], [0.11099859076132779, -0.81518098747217427]], [[-0.55118665017984303, -0.67078063912337416], 
-[-0.98004112137157251, -0.18816152794055951]], [[-0.046829245664697039, 0.16829625958590699], [-0.038355227747033371, 
-0.56440637140131744]], [[0.59007303065181005, 0.50473600523369155], [-0.12313540236032172, 
--0.92117335984586246]]])+(1.-msk_ref)*numpy.array([[[0.71919975632513666, 0.71919975632513666], [-0.040642761077081202, 
-0.71919975632513666]], [[-0.54776326748801329, 0.65058903205233287], [-0.01282121102231315, 0.15475725458670797]], 
-[[0.31470843587449004, -0.07753563902895122], [0.11099859076132779, -0.81518098747217427]], [[-0.55118665017984303, 
--0.67078063912337416], [-0.98004112137157251, -0.18816152794055951]], [[-0.046829245664697039, 0.16829625958590699], 
-[-0.038355227747033371, 0.56440637140131744]], [[0.59007303065181005, 0.50473600523369155], [-0.12313540236032172, 
--0.92117335984586246]]])
+   def test_generalTensorProduct_constData_rank3_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[4.0, 2.0], [-1.0, 6.0]], [[3.0, 3.0], [7.0, 2.0]], [[-2.0, -4.0], [1.0, -6.0]], [[-6.0, -5.0], 
+[-6.0, 1.0]], [[6.0, 4.0], [-1.0, 5.0]], [[-3.0, 5.0], [0.0, 5.0]]]),self.functionspace)
+      arg1=-5.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-20.0, -10.0], [5.0, -30.0]], [[-15.0, -15.0], [-35.0, -10.0]], [[10.0, 20.0], [-5.0, 30.0]], 
+[[30.0, 25.0], [30.0, -5.0]], [[-30.0, -20.0], [5.0, -25.0]], [[15.0, -25.0], [-0.0, -25.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_expandedData_rank0(self):
-      arg0=Data(numpy.array([[[[0.99268289857921577, 0.41088037150125367, 0.26177708839700098, 0.82376151099681261], 
-[-0.54331004634703661, 0.031496969431629163, 0.52688351495449215, -0.26722050954674859], [0.38313164658014309, 
-0.53282042430453891, -0.078299137887749559, -0.056014546456052861]], [[-0.76995708990435641, 0.061549978967386787, 
-0.69527255728927351, 0.10969825231765773], [0.37086234261002815, -0.95794861186225044, -0.86426578495087525, 
--0.97802222289390506], [-0.4471798391315418, -0.6251092573946726, 0.27276076837895524, -0.91339059646578202]]], 
-[[[-0.66459163952874545, -0.15129505705337598, 0.56364833895809929, 0.97582274938998448], [0.83601385850089827, 
--0.84277453397822333, -0.031356869131770715, 0.44962798226714273], [0.89692171300867551, 0.27995650006365791, 
--0.074995651859347978, -0.84552021003774147]], [[-0.77755385628089391, -0.95235277479154123, 0.22063465156856288, 
--0.29165804377398152], [-0.51877939160718611, 0.81455229280273311, -0.28420396833550776, 0.43845728843849896], 
-[-0.71947115048083421, 0.13592865235020035, -0.37959986478412966, 0.062674966057193471]]], [[[0.17452369197943218, 
--0.37523426512393177, -0.95494844959095526, -0.41924989267453139], [0.45425791383688785, 0.67211643814140909, 
--0.60261482866032257, -0.68685820529638919], [0.95173027347869144, 0.69422535407147024, -0.075058683952093475, 
-0.10782056487000879]], [[-0.5324481902328142, -0.46623598923291354, 0.046695183173332211, 0.92082584868164785], 
-[-0.83964862951040442, 0.60757410631852449, 0.14647609641995141, 0.88180327423933225], [-0.76119594211399955, 
--0.76985823613463378, -0.048217420980172454, 0.34485508040439328]]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.971083689041)+(1.-msk_arg1)*(0.961141977621)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234], 
-[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234, -0.97108368904079234]], [[-0.97108368904079234, -0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, 
--0.97802222289390506], [-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234]]], 
-[[[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, -0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234]], [[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, 
--0.97108368904079234], [-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234], 
-[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234]]], [[[-0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, -0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, 
--0.97108368904079234]], [[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234], 
-[-0.97108368904079234, -0.97108368904079234, -0.97108368904079234, -0.97108368904079234], [-0.97108368904079234, 
--0.97108368904079234, -0.97108368904079234, -0.97108368904079234]]]])+(1.-msk_ref)*numpy.array([[[[0.96114197762050035, 
-0.41088037150125367, 0.26177708839700098, 0.82376151099681261], [-0.54331004634703661, 0.031496969431629163, 
-0.52688351495449215, -0.26722050954674859], [0.38313164658014309, 0.53282042430453891, -0.078299137887749559, 
--0.056014546456052861]], [[-0.76995708990435641, 0.061549978967386787, 0.69527255728927351, 0.10969825231765773], 
-[0.37086234261002815, -0.95794861186225044, -0.86426578495087525, -0.97802222289390506], [-0.4471798391315418, 
--0.6251092573946726, 0.27276076837895524, -0.91339059646578202]]], [[[-0.66459163952874545, -0.15129505705337598, 
-0.56364833895809929, 0.96114197762050035], [0.83601385850089827, -0.84277453397822333, -0.031356869131770715, 
-0.44962798226714273], [0.89692171300867551, 0.27995650006365791, -0.074995651859347978, -0.84552021003774147]], 
-[[-0.77755385628089391, -0.95235277479154123, 0.22063465156856288, -0.29165804377398152], [-0.51877939160718611, 
-0.81455229280273311, -0.28420396833550776, 0.43845728843849896], [-0.71947115048083421, 0.13592865235020035, 
--0.37959986478412966, 0.062674966057193471]]], [[[0.17452369197943218, -0.37523426512393177, -0.95494844959095526, 
--0.41924989267453139], [0.45425791383688785, 0.67211643814140909, -0.60261482866032257, -0.68685820529638919], 
-[0.95173027347869144, 0.69422535407147024, -0.075058683952093475, 0.10782056487000879]], [[-0.5324481902328142, 
--0.46623598923291354, 0.046695183173332211, 0.92082584868164785], [-0.83964862951040442, 0.60757410631852449, 
-0.14647609641995141, 0.88180327423933225], [-0.76119594211399955, -0.76985823613463378, -0.048217420980172454, 
-0.34485508040439328]]]])
+   def test_generalTensorProduct_constData_rank3_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-4.0, -3.0], [3.0, 0.0]], [[3.0, -6.0], [5.0, -4.0]], [[-7.0, -3.0], [4.0, -6.0]], [[-3.0, 0.0], 
+[-4.0, -6.0]], [[7.0, -2.0], [0.0, -1.0]], [[-4.0, -1.0], [0.0, 0.0]]]),self.functionspace)
+      arg1=numpy.array(-4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[16.0, 12.0], [-12.0, -0.0]], [[-12.0, 24.0], [-20.0, 16.0]], [[28.0, 12.0], [-16.0, 24.0]], 
+[[12.0, -0.0], [16.0, 24.0]], [[-28.0, 8.0], [-0.0, 4.0]], [[16.0, 4.0], [-0.0, -0.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_array_rank1(self):
-      arg0=Data(-0.333406435888,self.functionspace)
-      arg1=numpy.array([-0.09652682757478126, 0.26251725837796158])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.33340643588845387, -0.33340643588845387]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[2.0, 6.0, -1.0], [4.0, -1.0, 3.0]], [[-5.0, 7.0, -6.0], [-2.0, 0.0, -7.0]]], [[[6.0, -2.0, 
+2.0], [3.0, 1.0, 6.0]], [[2.0, -3.0, 0.0], [2.0, 7.0, 7.0]]], [[[0.0, -3.0, -5.0], [-4.0, 3.0, 2.0]], [[-1.0, 1.0, 6.0], [-2.0, 
+-1.0, 3.0]]], [[[2.0, 0.0, 5.0], [-5.0, 7.0, 3.0]], [[-1.0, -5.0, -5.0], [-2.0, 5.0, -1.0]]], [[[-5.0, -3.0, -4.0], [6.0, 3.0, 
+4.0]], [[-3.0, 7.0, -4.0], [-5.0, 2.0, 5.0]]], [[[6.0, 0.0, -5.0], [-6.0, -5.0, 0.0]], [[-7.0, -3.0, 0.0], [0.0, 3.0, 
+0.0]]]]),self.functionspace)
+      arg1=numpy.array([-7.0, -6.0, -5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-45.0, -37.0], [23.0, 49.0]], [[-40.0, -57.0], [4.0, -91.0]], [[43.0, 0.0], [-29.0, 5.0]], 
+[[-39.0, -22.0], [62.0, -11.0]], [[73.0, -80.0], [-1.0, -2.0]], [[-17.0, 72.0], [67.0, -18.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_array_rank1(self):
-      arg0=Data(numpy.array([0.53558157958236996, 0.54103401750141189]),self.functionspace)
-      arg1=numpy.array([0.033108086171252271, -0.32851105843468731])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([0.033108086171252271, -0.32851105843468731]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, -2.0], [-4.0, -2.0]], [[2.0, -4.0], [0.0, 5.0]], [[7.0, 3.0], [5.0, -4.0]], [[-3.0, 6.0], 
+[2.0, 5.0]], [[-1.0, 0.0], [2.0, 2.0]], [[-6.0, 1.0], [4.0, 4.0]]]),self.functionspace)
+      arg1=numpy.array([-3.0, -7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [6.0, 14.0]], [[12.0, 28.0], [6.0, 14.0]]], [[[-6.0, -14.0], [12.0, 28.0]], [[0.0, 
+0.0], [-15.0, -35.0]]], [[[-21.0, -49.0], [-9.0, -21.0]], [[-15.0, -35.0], [12.0, 28.0]]], [[[9.0, 21.0], [-18.0, -42.0]], 
+[[-6.0, -14.0], [-15.0, -35.0]]], [[[3.0, 7.0], [0.0, 0.0]], [[-6.0, -14.0], [-6.0, -14.0]]], [[[18.0, 42.0], [-3.0, -7.0]], 
+[[-12.0, -28.0], [-12.0, -28.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_constData_rank1(self):
-      arg0=Data(-0.924549249904,self.functionspace)
-      arg1=Data(numpy.array([-0.51873551296636755, -0.75625179387206831]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.9245492499043575, -0.9245492499043575]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-6.0, -4.0, 3.0], [3.0, 6.0, -4.0]], [[6.0, 5.0, 6.0], [-3.0, -4.0, 5.0]]], [[[0.0, 5.0, 0.0], 
+[0.0, 5.0, 0.0]], [[5.0, -5.0, 7.0], [-3.0, 4.0, 1.0]]], [[[4.0, -6.0, 0.0], [-6.0, 0.0, -7.0]], [[7.0, -1.0, -1.0], [6.0, 5.0, 
+-3.0]]], [[[4.0, 6.0, 5.0], [0.0, 0.0, -5.0]], [[1.0, 3.0, -5.0], [-1.0, -6.0, 4.0]]], [[[0.0, 6.0, -1.0], [-7.0, -2.0, -5.0]], 
+[[-6.0, -7.0, 5.0], [-6.0, 7.0, -6.0]]], [[[3.0, 3.0, 2.0], [0.0, 7.0, -4.0]], [[-1.0, -3.0, -1.0], [-6.0, -6.0, 
+0.0]]]]),self.functionspace)
+      arg1=numpy.array([[4.0, -5.0], [-4.0, 1.0], [5.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[7.0, 44.0], [-32.0, -33.0]], [[34.0, 11.0], [29.0, 41.0]]], [[[-20.0, 5.0], [-20.0, 5.0]], 
+[[75.0, 12.0], [-23.0, 25.0]]], [[[40.0, -26.0], [-59.0, -12.0]], [[27.0, -42.0], [-11.0, -43.0]]], [[[17.0, 16.0], [-25.0, 
+-30.0]], [[-33.0, -32.0], [40.0, 23.0]]], [[[-29.0, 0.0], [-45.0, 3.0]], [[29.0, 53.0], [-82.0, 1.0]]], [[[10.0, 0.0], [-48.0, 
+-17.0]], [[3.0, -4.0], [0.0, 24.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_constData_rank1(self):
-      arg0=Data(numpy.array([-0.68795188857449396, -0.29420892408496324]),self.functionspace)
-      arg1=Data(numpy.array([-0.28574289295395161, 0.6744015597648072]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([-0.68795188857449396, -0.29420892408496324]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[1.0, -7.0], [0.0, 2.0]], [[-2.0, 3.0], [-4.0, -6.0]], [[-2.0, -4.0], [7.0, 4.0]], [[5.0, -2.0], 
+[6.0, -2.0]], [[-4.0, 7.0], [3.0, -3.0]], [[-1.0, 1.0], [0.0, -5.0]]]),self.functionspace)
+      arg1=Data(-6.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-6.0, 42.0], [-0.0, -12.0]], [[12.0, -18.0], [24.0, 36.0]], [[12.0, 24.0], [-42.0, -24.0]], 
+[[-30.0, 12.0], [-36.0, 12.0]], [[24.0, -42.0], [-18.0, 18.0]], [[6.0, -6.0], [-0.0, 30.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_expandedData_rank1(self):
-      arg0=Data(-0.750967691228,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.048427606313035332, 0.1772855405310334])+(1.-msk_arg1)*numpy.array([-0.58305150173003639, 
--0.30318806576525592])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.75096769122823592, -0.75096769122823592])+(1.-msk_ref)*numpy.array([-0.75096769122823592, 
--0.75096769122823592])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank1_expandedData_rank1(self):
-      arg0=Data(numpy.array([-0.72405478212841956, 0.56611255103978775]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([-0.10702258655126662, 0.720896326748794])+(1.-msk_arg1)*numpy.array([0.63801284539466074, 
--0.9382170945092474])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.72405478212841956, 0.56611255103978775])+(1.-msk_ref)*numpy.array([-0.72405478212841956, 
--0.9382170945092474])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_array_rank2(self):
-      arg0=Data(0.910609441281,self.functionspace)
-      arg1=numpy.array([[0.48920816916927046, 0.38845789826158716, 0.18954063794801335, 0.023657833905485814, 
--0.24335189451304085], [0.41796465128268401, -0.048936612595969597, 0.64823155567840685, 0.29039777666930822, 
--0.53281597530118585], [-0.10651289123882024, 0.83991176563396963, -0.72137841171371009, 0.55448443855013263, 
--0.80348654064522074], [-0.73024847464826581, -0.25234530262628896, -0.80021064888998783, 0.97549310512084197, 
-0.36123493587136224]])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[0.48920816916927046, 0.38845789826158716, 0.18954063794801335, 0.023657833905485814, 
--0.24335189451304085], [0.41796465128268401, -0.048936612595969597, 0.64823155567840685, 0.29039777666930822, 
--0.53281597530118585], [-0.10651289123882024, 0.83991176563396963, -0.72137841171371009, 0.55448443855013263, 
--0.80348654064522074], [-0.73024847464826581, -0.25234530262628896, -0.80021064888998783, 0.91060944128075971, 
-0.36123493587136224]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[0.08078793489159497, -0.33015773315187524, 0.7208408272666289, 0.90090565140641932, 
-0.45038382747708505], [-0.44631629717055077, 0.92019630193275503, 0.55457196852919588, -0.96327169927714973, 
-0.25167968115551953], [0.82864955108820237, -0.80653937904066941, -0.35846366619861936, 0.26239388808589048, 
--0.91303681812093873], [0.21705894462164244, 0.47242401589506522, -0.38614229297848901, 0.15755257819143931, 
-0.58667580805751429]]),self.functionspace)
-      arg1=numpy.array([[-0.15136529414604083, 0.65675934597948293, 0.79594791912751184, 0.0039503927380593051, 
-0.4030018796340924], [-0.069724849720067317, -0.24367772766093632, -0.2670851341110807, -0.14093561399556664, 
-0.67627965935820122], [-0.094422971120954768, 0.070547327429800744, 0.2858023558445848, -0.43318476417767449, 
-0.2047025555027675], [0.88303425731739571, 0.47446500843168438, 0.82298295629449925, 0.80823799516835959, 
--0.24838912878339392]])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.15136529414604083, -0.33015773315187524, 0.7208408272666289, 0.0039503927380593051, 
-0.4030018796340924], [-0.44631629717055077, -0.24367772766093632, -0.2670851341110807, -0.96327169927714973, 
-0.25167968115551953], [-0.094422971120954768, -0.80653937904066941, -0.35846366619861936, -0.43318476417767449, 
--0.91303681812093873], [0.21705894462164244, 0.47242401589506522, -0.38614229297848901, 0.15755257819143931, 
--0.24838912878339392]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_constData_rank2(self):
-      arg0=Data(0.0239593304379,self.functionspace)
-      arg1=Data(numpy.array([[-0.59888776552553891, 0.35901840582658107, 0.17754465465295954, -0.48822681164526882, 
-0.45276081231428589], [0.83489996452941728, -0.30010523751131601, -0.64228605313824461, 0.95333586170524698, 
-0.10209629399219056], [-0.54322049612252821, -0.92654073718452046, 0.75062980899156462, 0.88949655954583196, 
--0.3868042904873723], [-0.17063584074434668, -0.79809397702897344, -0.41996162827215389, 0.088624383432029719, 
-0.89769190209046035]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.59888776552553891, 0.02395933043787446, 0.02395933043787446, -0.48822681164526882, 
-0.02395933043787446], [0.02395933043787446, -0.30010523751131601, -0.64228605313824461, 0.02395933043787446, 
-0.02395933043787446], [-0.54322049612252821, -0.92654073718452046, 0.02395933043787446, 0.02395933043787446, 
--0.3868042904873723], [-0.17063584074434668, -0.79809397702897344, -0.41996162827215389, 0.02395933043787446, 
-0.02395933043787446]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[-0.47049212755913183, -0.85815760292450549, -0.64814433099547597, 0.69566639600669289, 
-0.81114832798074943], [0.86045847392291086, -0.9507762296416713, 0.026978084565971505, 0.21635857059107022, 
--0.50046578534540043], [-0.37253935557470541, -0.91069795235443007, 0.91705556814935663, -0.79767296009783273, 
-0.8050421099408025], [-0.78804909207842289, -0.50434135046043482, -0.58071301654969454, -0.40529046283604075, 
-0.84807168898735696]]),self.functionspace)
-      arg1=Data(numpy.array([[0.40161578060172576, 0.31441352033987457, 0.047543882582621766, -0.20104789816683488, 
-0.86293270121963683], [0.50656495929015333, 0.60433274181199637, 0.34562048971548243, -0.23424953925520531, 
--0.73111290581640276], [-0.76921531534692766, 0.28376156860966839, -0.84056992787629148, 0.32326868123239572, 
-0.032180307079568538], [0.091253746570855609, -0.99341071581959839, -0.34932331687068707, -0.047001517360826695, 
--0.82435184257320859]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[-0.47049212755913183, -0.85815760292450549, -0.64814433099547597, -0.20104789816683488, 
-0.81114832798074943], [0.50656495929015333, -0.9507762296416713, 0.026978084565971505, -0.23424953925520531, 
--0.73111290581640276], [-0.76921531534692766, -0.91069795235443007, -0.84056992787629148, -0.79767296009783273, 
-0.032180307079568538], [-0.78804909207842289, -0.99341071581959839, -0.58071301654969454, -0.40529046283604075, 
--0.82435184257320859]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_expandedData_rank2(self):
-      arg0=Data(0.189657622991,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.18376557892890588, 0.12110246401885338, -0.64761301931505133, -0.69595937001166641, 
-0.35069437237070078], [0.32938697739593326, -0.91748075155543973, -0.72839042080982397, 0.50415374667448254, 
-0.40160094055295659], [0.02236767999635525, -0.76495302251454933, 0.86629740539658662, 0.18671842475226774, 
--0.2658514625358972], [0.95540045082863534, -0.92875987145830741, 0.66616191088909549, 0.11035961552319518, 
-0.10163562178107366]])+(1.-msk_arg1)*numpy.array([[0.35008579380261962, -0.60954248283174572, -0.037442952446151034, 
--0.14410574074733562, -0.96681555558116083], [0.29126400064373015, -0.79197966253541474, -0.91254474981822042, 
--0.41773510590652774, -0.17378599502988767], [0.048161799918185366, -0.27715116449573607, -0.90483097123086886, 
--0.80243310930260559, -0.6787797463078884], [-0.65044916557513721, -0.12487664924483943, -0.30825616699309388, 
-0.78378671040517389, 0.54441120182034552]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.18376557892890588, 0.12110246401885338, -0.64761301931505133, -0.69595937001166641, 
-0.18965762299059485], [0.18965762299059485, -0.91748075155543973, -0.72839042080982397, 0.18965762299059485, 
-0.18965762299059485], [0.02236767999635525, -0.76495302251454933, 0.18965762299059485, 0.18671842475226774, 
--0.2658514625358972], [0.18965762299059485, -0.92875987145830741, 0.18965762299059485, 0.11035961552319518, 
-0.10163562178107366]])+(1.-msk_ref)*numpy.array([[0.18965762299059485, -0.60954248283174572, -0.037442952446151034, 
--0.14410574074733562, -0.96681555558116083], [0.18965762299059485, -0.79197966253541474, -0.91254474981822042, 
--0.41773510590652774, -0.17378599502988767], [0.048161799918185366, -0.27715116449573607, -0.90483097123086886, 
--0.80243310930260559, -0.6787797463078884], [-0.65044916557513721, -0.12487664924483943, -0.30825616699309388, 
-0.18965762299059485, 0.18965762299059485]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[-0.78654644680753871, 0.55961885541804057, 0.78635098458761354, -0.47414005397332759, 
--0.83773565056572608], [0.31776536222415586, 0.69745302712485069, -0.50695368166781773, 0.71939099429230158, 
--0.39845136350516897], [-0.60099546595039843, 0.83429249800028593, 0.0050669949631381161, 0.32053992884667837, 
-0.1385215907570978], [-0.38958871724035449, 0.22024255605896847, 0.20855802880863794, -0.94225915133387361, 
-0.082766981560819186]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.94587560739078214, -0.06012667850573572, -0.18884011568186154, -0.60124634429146795, 
--0.44576092212698071], [0.29806772015174787, -0.29488756301924868, -0.61373344769163674, 0.95034093102437733, 
-0.50416904107236293], [0.7033899516286104, 0.69091894086205641, 0.87867773693996498, -0.82966547623571274, 
--0.3515708581381416], [0.50229506332467166, 0.22165018627630495, 0.48988537522316977, -0.66859426709231107, 
-0.46826446395382471]])+(1.-msk_arg1)*numpy.array([[-0.82446139999685264, -0.93255187838673748, 0.91641818901164207, 
--0.58093848925466629, -0.3148674142340484], [-0.053487594740966982, 0.88279305640627359, 0.63682069571190603, 
-0.34983672903592811, -0.79327143310207404], [-0.69326917294834955, -0.80882632387270115, -0.87048032759728811, 
--0.49214313684585131, 0.84403839932037616], [0.24217467723805708, -0.40468462039855391, -0.954439477554897, 
-0.96941174619882831, 0.89530244951755122]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.94587560739078214, -0.06012667850573572, -0.18884011568186154, -0.60124634429146795, 
--0.83773565056572608], [0.29806772015174787, -0.29488756301924868, -0.61373344769163674, 0.71939099429230158, 
--0.39845136350516897], [-0.60099546595039843, 0.69091894086205641, 0.0050669949631381161, -0.82966547623571274, 
--0.3515708581381416], [-0.38958871724035449, 0.22024255605896847, 0.20855802880863794, -0.94225915133387361, 
-0.082766981560819186]])+(1.-msk_ref)*numpy.array([[-0.82446139999685264, -0.93255187838673748, 0.78635098458761354, 
--0.58093848925466629, -0.83773565056572608], [-0.053487594740966982, 0.69745302712485069, -0.50695368166781773, 
-0.34983672903592811, -0.79327143310207404], [-0.69326917294834955, -0.80882632387270115, -0.87048032759728811, 
--0.49214313684585131, 0.1385215907570978], [-0.38958871724035449, -0.40468462039855391, -0.954439477554897, 
--0.94225915133387361, 0.082766981560819186]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_array_rank3(self):
-      arg0=Data(-0.399707245146,self.functionspace)
-      arg1=numpy.array([[[0.32117886095005566, 0.56385535645967932], [-0.31072551227289691, -0.47028934103651188]], 
-[[0.63314052806338372, 0.39229120262840222], [-0.96294339222657377, 0.38844528467320361]], [[-0.07479702462209481, 
--0.30265890482966595], [0.23289771129855019, -0.38794173062652981]], [[-0.67550413520579045, 0.25973443342653324], 
-[-0.81714722110875426, 0.36919583400258849]], [[0.93260213643622958, -0.66295130418161108], [-0.72853296567395098, 
--0.93602246828388491]], [[-0.61740804378795633, -0.76118555874949156], [-0.28823968696345581, 0.64899458607866034]]])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.39970724514590361, -0.39970724514590361], [-0.39970724514590361, -0.47028934103651188]], 
-[[-0.39970724514590361, -0.39970724514590361], [-0.96294339222657377, -0.39970724514590361]], [[-0.39970724514590361, 
--0.39970724514590361], [-0.39970724514590361, -0.39970724514590361]], [[-0.67550413520579045, -0.39970724514590361], 
-[-0.81714722110875426, -0.39970724514590361]], [[-0.39970724514590361, -0.66295130418161108], [-0.72853296567395098, 
--0.93602246828388491]], [[-0.61740804378795633, -0.76118555874949156], [-0.39970724514590361, 
--0.39970724514590361]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_array_rank3(self):
-      arg0=Data(numpy.array([[[0.44305388856965466, 0.0013166608880175179], [-0.076147766778611459, -0.14487786772472755]], 
-[[-0.67723537207517381, -0.070777211678995089], [-0.63470560980709556, -0.30698248123253213]], [[-0.39598874813071938, 
--0.90648087138003741], [0.1214487144962384, 0.34356420008573307]], [[-0.69848939714645186, 0.68144645566325046], 
-[-0.66662066848117507, -0.7147542146013306]], [[-0.96447338478373013, 0.73254823315118878], [-0.75980707780766821, 
--0.62572827865652214]], [[-0.48777657969769672, 0.73666769252686093], [-0.67894536034535968, 
--0.57970185442492972]]]),self.functionspace)
-      arg1=numpy.array([[[-0.70005976804998915, 0.48549864818248989], [0.036760051800379889, 0.32565531260532921]], 
-[[0.10129372494847333, -0.71024810419330509], [-0.069828207153450395, -0.3699999105876941]], [[0.63841369462640207, 
-0.89143029501478876], [-0.33109302170189769, -0.99066238438389886]], [[0.59337989328951224, -0.50689562938629584], 
-[-0.45502338271299769, -0.28400466841449035]], [[-0.5042825245311775, 0.77442066705951818], [-0.048179651918959898, 
--0.72572413224436638]], [[-0.63067040118636131, 0.21983466534382412], [0.21907146521294329, -0.15512888807256653]]])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.70005976804998915, 0.0013166608880175179], [-0.076147766778611459, -0.14487786772472755]], 
-[[-0.67723537207517381, -0.71024810419330509], [-0.63470560980709556, -0.3699999105876941]], [[-0.39598874813071938, 
--0.90648087138003741], [-0.33109302170189769, -0.99066238438389886]], [[-0.69848939714645186, -0.50689562938629584], 
-[-0.66662066848117507, -0.7147542146013306]], [[-0.96447338478373013, 0.73254823315118878], [-0.75980707780766821, 
--0.72572413224436638]], [[-0.63067040118636131, 0.21983466534382412], [-0.67894536034535968, 
--0.57970185442492972]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-1.0, -2.0, -2.0], [-2.0, 6.0, -2.0]], [[-2.0, 1.0, -2.0], [-1.0, 4.0, 1.0]]], [[[-2.0, 0.0, 
+0.0], [-3.0, 4.0, 2.0]], [[0.0, 3.0, 4.0], [6.0, -7.0, 5.0]]], [[[-5.0, 0.0, 2.0], [0.0, 1.0, -7.0]], [[-5.0, -7.0, -7.0], 
+[7.0, 7.0, 5.0]]], [[[0.0, -7.0, 3.0], [-1.0, 7.0, -4.0]], [[0.0, 7.0, 0.0], [4.0, 2.0, -6.0]]], [[[0.0, -3.0, -2.0], [-4.0, 
+-1.0, 6.0]], [[-5.0, -1.0, -3.0], [7.0, 0.0, 4.0]]], [[[0.0, -5.0, 3.0], [-7.0, 1.0, -2.0]], [[-5.0, 3.0, 5.0], [-6.0, 1.0, 
+6.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([-3.0, 5.0, -2.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-3.0, 40.0], [15.0, 21.0]], [[6.0, 25.0], [7.0, -63.0]], [[11.0, 19.0], [-6.0, 4.0]], [[-41.0, 
+46.0], [35.0, 10.0]], [[-11.0, -5.0], [16.0, -29.0]], [[-31.0, 30.0], [20.0, 11.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_constData_rank3(self):
-      arg0=Data(0.306106140788,self.functionspace)
-      arg1=Data(numpy.array([[[-0.76628841233666734, -0.96371501470546184], [-0.34126495594876216, 0.18894152239541517]], 
-[[-0.36483136112890335, 0.8943400498524452], [-0.54631863424863458, -0.84010175892825467]], [[0.0081249961006295557, 
--0.67664073631754462], [0.44319699434566351, 0.96423211852501933]], [[0.91667848543544794, 0.89893697272059359], 
-[-0.20338371318227799, -0.30427474472848037]], [[0.44194604199111009, -0.59352681992452183], [-0.11023929944091049, 
--0.64282414795628573]], [[-0.014833179963952947, 0.57301070365369355], [-0.36132359965492999, 
--0.98894708526171526]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[-0.76628841233666734, -0.96371501470546184], [-0.34126495594876216, 0.18894152239541517]], 
-[[-0.36483136112890335, 0.30610614078839071], [-0.54631863424863458, -0.84010175892825467]], [[0.0081249961006295557, 
--0.67664073631754462], [0.30610614078839071, 0.30610614078839071]], [[0.30610614078839071, 0.30610614078839071], 
-[-0.20338371318227799, -0.30427474472848037]], [[0.30610614078839071, -0.59352681992452183], [-0.11023929944091049, 
--0.64282414795628573]], [[-0.014833179963952947, 0.30610614078839071], [-0.36132359965492999, 
--0.98894708526171526]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[6.0, 4.0], [0.0, 5.0]], [[7.0, -2.0], [-6.0, 0.0]], [[4.0, -4.0], [5.0, 4.0]], [[1.0, -5.0], 
+[-3.0, -5.0]], [[6.0, 3.0], [5.0, 5.0]], [[1.0, 0.0], [-5.0, -7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([3.0, 0.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[18.0, 0.0], [12.0, 0.0]], [[0.0, 0.0], [15.0, 0.0]]], [[[21.0, 0.0], [-6.0, 0.0]], [[-18.0, 
+0.0], [0.0, 0.0]]], [[[12.0, 0.0], [-12.0, 0.0]], [[15.0, 0.0], [12.0, 0.0]]], [[[3.0, 0.0], [-15.0, 0.0]], [[-9.0, 0.0], 
+[-15.0, 0.0]]], [[[18.0, 0.0], [9.0, 0.0]], [[15.0, 0.0], [15.0, 0.0]]], [[[3.0, 0.0], [0.0, 0.0]], [[-15.0, 0.0], [-21.0, 
+0.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_constData_rank3(self):
-      arg0=Data(numpy.array([[[0.24567939374194059, -0.38142740695929578], [-0.45193989939619628, -0.60115687085650782]], 
-[[0.40594139345453262, 0.97508967903353594], [0.34438709659068212, 0.31053499742808777]], [[0.93059078021899566, 
-0.96998574489152789], [-0.84363978388948002, 0.6629663278454232]], [[-0.41723438500109711, 0.42734365580775457], 
-[-0.088489927594940898, 0.90823902949603252]], [[-0.046089968165372808, 0.36520442413194498], [-0.65188308833513231, 
--0.5383045342958277]], [[-0.40865875951128161, 0.45119724930116223], [0.069688167864556672, 
-0.30197762054058819]]]),self.functionspace)
-      arg1=Data(numpy.array([[[0.44671276211928546, 0.26562039078771993], [-0.28157505639816005, -0.4851959967926136]], 
-[[0.17825021121860729, 0.75683931430668094], [0.12694088292947425, -0.42472824719280333]], [[0.44726690408557213, 
--0.21945987825453672], [-0.14909412802808797, -0.63216133393393603]], [[-0.69495213737893424, 0.34469639671173802], 
-[0.3878750427664559, 0.60867075359136424]], [[0.67057924207194852, -0.028638569332069874], [0.073464850844077612, 
-0.29022832698390588]], [[-0.75093446070075354, 0.32452516889914951], [0.40790244242845186, 
-0.50041267619106833]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[0.24567939374194059, -0.38142740695929578], [-0.45193989939619628, -0.60115687085650782]], 
-[[0.17825021121860729, 0.75683931430668094], [0.12694088292947425, -0.42472824719280333]], [[0.44726690408557213, 
--0.21945987825453672], [-0.84363978388948002, -0.63216133393393603]], [[-0.69495213737893424, 0.34469639671173802], 
-[-0.088489927594940898, 0.60867075359136424]], [[-0.046089968165372808, -0.028638569332069874], [-0.65188308833513231, 
--0.5383045342958277]], [[-0.75093446070075354, 0.32452516889914951], [0.069688167864556672, 
-0.30197762054058819]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 3.0, 6.0], [2.0, -6.0, -4.0]], [[0.0, 2.0, 4.0], [-3.0, 7.0, 5.0]]], [[[2.0, 0.0, 0.0], 
+[-2.0, 3.0, -6.0]], [[-7.0, 6.0, -3.0], [7.0, -3.0, 6.0]]], [[[0.0, 1.0, -7.0], [-2.0, 7.0, -2.0]], [[-6.0, -1.0, 2.0], [2.0, 
+-7.0, 5.0]]], [[[-3.0, 7.0, 5.0], [2.0, -2.0, 3.0]], [[7.0, -3.0, -4.0], [1.0, -1.0, 6.0]]], [[[1.0, -3.0, 0.0], [6.0, 7.0, 
+4.0]], [[-7.0, -3.0, 7.0], [-3.0, -7.0, -4.0]]], [[[0.0, -5.0, -4.0], [-2.0, 0.0, -1.0]], [[0.0, -7.0, 3.0], [-6.0, -5.0, 
+0.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 3.0], [2.0, 0.0], [-7.0, -2.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-36.0, -12.0], [14.0, 14.0]], [[-24.0, -8.0], [-18.0, -19.0]]], [[[-2.0, 6.0], [50.0, 6.0]], 
+[[40.0, -15.0], [-55.0, 9.0]]], [[[51.0, 14.0], [30.0, -2.0]], [[-10.0, -22.0], [-51.0, -4.0]]], [[[-18.0, -19.0], [-27.0, 
+0.0]], [[15.0, 29.0], [-45.0, -9.0]]], [[[-7.0, 3.0], [-20.0, 10.0]], [[-48.0, -35.0], [17.0, -1.0]]], [[[18.0, 8.0], [9.0, 
+-4.0]], [[-35.0, -6.0], [-4.0, -18.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_expandedData_rank3(self):
-      arg0=Data(-0.836569215512,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.0024226368124502518, 0.64626783949599176], [-0.71898521427264317, -0.18483317016051592]], 
-[[-0.47307147238988212, 0.79763262909599852], [0.52364063135954586, -0.61937346851712216]], [[-0.76282149769301033, 
--0.64904752516245057], [0.93907088642565162, 0.96685235581600226]], [[0.12189103305672844, -0.51070310777104777], 
-[-0.090621388334109154, 0.22410552394163807]], [[0.91340775337554625, 0.35287893605146636], [-0.74762018439877886, 
--0.15696287119314145]], [[0.11546929065407152, -0.29744659369830906], [0.93497363688637014, 
--0.11682432676327692]]])+(1.-msk_arg1)*numpy.array([[[-0.94931185014972086, 0.99193538177716722], [-0.035269459879945231, 
-0.35464262245808165]], [[-0.60551379563530783, 0.51916345808629627], [0.26545394272858713, -0.81998328654200936]], 
-[[-0.95242636787230794, 0.52460143031151452], [0.99799721328684132, -0.79436151790394627]], [[-0.95708432366448304, 
-0.90933789353263106], [-0.022305122342574091, -0.89613876437123396]], [[0.058129126978553103, -0.69704018907759346], 
-[0.39959135809831436, -0.64652472369812308]], [[-0.75606632025522269, 0.33381184296675093], [-0.54165429915660934, 
--0.63654269092587668]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.8365692155115747, -0.8365692155115747], [-0.8365692155115747, -0.8365692155115747]], 
-[[-0.8365692155115747, -0.8365692155115747], [-0.8365692155115747, -0.8365692155115747]], [[-0.8365692155115747, 
--0.8365692155115747], [-0.8365692155115747, -0.8365692155115747]], [[-0.8365692155115747, -0.8365692155115747], 
-[-0.8365692155115747, -0.8365692155115747]], [[-0.8365692155115747, -0.8365692155115747], [-0.8365692155115747, 
--0.8365692155115747]], [[-0.8365692155115747, -0.8365692155115747], [-0.8365692155115747, 
--0.8365692155115747]]])+(1.-msk_ref)*numpy.array([[[-0.94931185014972086, -0.8365692155115747], [-0.8365692155115747, 
--0.8365692155115747]], [[-0.8365692155115747, -0.8365692155115747], [-0.8365692155115747, -0.8365692155115747]], 
-[[-0.95242636787230794, -0.8365692155115747], [-0.8365692155115747, -0.8365692155115747]], [[-0.95708432366448304, 
--0.8365692155115747], [-0.8365692155115747, -0.89613876437123396]], [[-0.8365692155115747, -0.8365692155115747], 
-[-0.8365692155115747, -0.8365692155115747]], [[-0.8365692155115747, -0.8365692155115747], [-0.8365692155115747, 
--0.8365692155115747]]])
+   def test_generalTensorProduct_constData_rank3_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[4.0, 0.0], [-7.0, 7.0]], [[-1.0, -6.0], [-3.0, -1.0]], [[1.0, -2.0], [6.0, -5.0]], [[0.0, 3.0], 
+[-5.0, 6.0]], [[-4.0, 1.0], [0.0, 6.0]], [[0.0, 4.0], [-4.0, 4.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-7.0)+(1-msk_arg1)*(-1.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-28.0, -0.0], [49.0, -49.0]], [[7.0, 42.0], [21.0, 7.0]], [[-7.0, 14.0], [-42.0, 35.0]], 
+[[-0.0, -21.0], [35.0, -42.0]], [[28.0, -7.0], [-0.0, -42.0]], [[-0.0, -28.0], [28.0, 
+-28.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, -0.0], [7.0, -7.0]], [[1.0, 6.0], [3.0, 1.0]], [[-1.0, 2.0], [-6.0, 5.0]], [[-0.0, 
+-3.0], [5.0, -6.0]], [[4.0, -1.0], [-0.0, -6.0]], [[-0.0, -4.0], [4.0, -4.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank3_expandedData_rank3(self):
-      arg0=Data(numpy.array([[[0.75964452604296873, -0.89348107946885191], [-0.41218941014767307, 0.40844033266000968]], 
-[[0.86046959206135343, -0.91223626329510155], [-0.11862402483165457, -0.62819770978089395]], [[0.56560345509134691, 
-0.10568049331599827], [0.78793384183324888, 0.21337503906297495]], [[0.66193858822265805, -0.064401115240066087], 
-[0.24647023480484376, -0.47588212296961552]], [[-0.74179072374435751, 0.088069147157366023], [-0.79176467880000967, 
-0.21210987755503719]], [[0.49387369092153666, -0.31959746689300417], [-0.34097200906052572, 
-0.13922605308003688]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.31595471950209397, 0.82453578732293487], [0.75794522324307767, 0.63644182349283529]], 
-[[0.72925822129227158, 0.52087049163865173], [-0.45476973061941273, -0.89335455668133612]], [[0.61143698481419473, 
--0.65384306592233199], [0.378636765400447, -0.023818683640318028]], [[-0.938532389456745, -0.00027962213071797137], 
-[-0.43930821567776546, 0.44332698824814143]], [[0.5329108455500724, 0.47486313435035754], [-0.61132171802401558, 
-0.097006988244661585]], [[-0.3391099827768016, -0.76579771581643419], [0.41020559026703696, 
-0.86559375559218066]]])+(1.-msk_arg1)*numpy.array([[[-0.26331725482265234, -0.57792952276439524], [-0.2050465665484682, 
--0.21770528604664929]], [[-0.31732965952574066, -0.42106371843051038], [-0.66318456931694159, 0.5182526477227194]], 
-[[0.77683969846260958, 0.73693704099147594], [0.76609864599594135, 0.93451258070155774]], [[0.78588350599736012, 
-0.068555366305665499], [0.19918094727315583, -0.20734889615792107]], [[0.75154151939412506, -0.01180570902421052], 
-[-0.068804421156342555, -0.26082347483593238]], [[-0.98873689234072804, 0.35189554141420087], [-0.50861156667682361, 
-0.44100584053254077]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.31595471950209397, -0.89348107946885191], [-0.41218941014767307, 0.40844033266000968]], 
-[[0.72925822129227158, -0.91223626329510155], [-0.45476973061941273, -0.89335455668133612]], [[0.56560345509134691, 
--0.65384306592233199], [0.378636765400447, -0.023818683640318028]], [[-0.938532389456745, -0.064401115240066087], 
-[-0.43930821567776546, -0.47588212296961552]], [[-0.74179072374435751, 0.088069147157366023], [-0.79176467880000967, 
-0.097006988244661585]], [[-0.3391099827768016, -0.76579771581643419], [-0.34097200906052572, 
-0.13922605308003688]]])+(1.-msk_ref)*numpy.array([[[-0.26331725482265234, -0.89348107946885191], [-0.41218941014767307, 
--0.21770528604664929]], [[-0.31732965952574066, -0.91223626329510155], [-0.66318456931694159, -0.62819770978089395]], 
-[[0.56560345509134691, 0.10568049331599827], [0.76609864599594135, 0.21337503906297495]], [[0.66193858822265805, 
--0.064401115240066087], [0.19918094727315583, -0.47588212296961552]], [[-0.74179072374435751, -0.01180570902421052], 
-[-0.79176467880000967, -0.26082347483593238]], [[-0.98873689234072804, -0.31959746689300417], [-0.50861156667682361, 
-0.13922605308003688]]])
+   def test_generalTensorProduct_constData_rank4_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-1.0, -2.0, -4.0], [0.0, 6.0, 7.0]], [[0.0, 4.0, -1.0], [-5.0, 0.0, -7.0]]], [[[6.0, -6.0, 
+-7.0], [-3.0, -6.0, 3.0]], [[-4.0, -2.0, 1.0], [-4.0, -6.0, 5.0]]], [[[4.0, 1.0, -1.0], [1.0, -1.0, 3.0]], [[4.0, 0.0, 4.0], 
+[2.0, -5.0, -6.0]]], [[[5.0, -1.0, 1.0], [3.0, 4.0, -6.0]], [[-7.0, 6.0, 0.0], [2.0, -1.0, 4.0]]], [[[2.0, 6.0, 5.0], [7.0, 
+-5.0, 2.0]], [[-1.0, -5.0, 0.0], [-7.0, 3.0, 5.0]]], [[[1.0, 1.0, 6.0], [6.0, -3.0, 7.0]], [[-6.0, 2.0, 0.0], [7.0, 0.0, 
+-5.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-6.0, -2.0, -3.0])+(1.-msk_arg1)*numpy.array([-3.0, -2.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[22.0, -33.0], [-5.0, 51.0]], [[-3.0, 21.0], [25.0, 21.0]], [[-23.0, -13.0], [-36.0, 16.0]], 
+[[-31.0, -8.0], [30.0, -22.0]], [[-39.0, -38.0], [16.0, 21.0]], [[-26.0, -51.0], [32.0, 
+-27.0]]])+(1.-msk_ref)*numpy.array([[[7.0, -12.0], [-8.0, 15.0]], [[-6.0, 21.0], [16.0, 24.0]], [[-14.0, -1.0], [-12.0, 4.0]], 
+[[-13.0, -17.0], [9.0, -4.0]], [[-18.0, -11.0], [13.0, 15.0]], [[-5.0, -12.0], [14.0, -21.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_array_rank4(self):
-      arg0=Data(-0.441965249048,self.functionspace)
-      arg1=numpy.array([[[[0.90170112707882399, -0.64427343648076119, 0.35920636506172676, 0.057389178295796262], 
-[0.22997258478639138, 0.44784729359623054, -0.928355620464278, 0.49366772307302731], [0.36717630946052582, 
--0.16851022366846236, -0.87888599683564927, 0.28360278891652557]], [[0.5831228061573368, 0.79071167169113088, 
-0.7172198061891184, 0.068659884110793046], [-0.51441433806109282, 0.51207829378963354, -0.37426160656263474, 
-0.9633698226222962], [-0.57999017047476609, -0.3669237698440464, 0.85356673680899697, 0.86349829166070169]]], 
-[[[-0.95543429065165419, -0.54201040689187741, 0.67156808962188919, -0.055940012634396297], [-0.45225528034059992, 
--0.95114412168177509, 0.088098067745095543, 0.22717635789586366], [0.095818180743235004, -0.31854132927367074, 
--0.14782415215257427, 0.63959521433800393]], [[-0.18612216897636258, -0.63008696815824217, -0.9871454720776065, 
--0.80139763362000016], [0.80414211200737284, 0.18635900004782258, -0.61604752040682942, 0.1648537654269675], 
-[-0.24712466266261268, 0.79298079666599364, 0.013292716674855543, -0.65192047085780369]]], [[[-0.07948997363400423, 
-0.83622357362129462, -0.64710935873163944, 0.78088026623203199], [-0.079437465004570385, -0.24452858641521313, 
--0.19057591654920092, -0.60089415009256708], [-0.069520201782470314, 0.36883323379128519, 0.042285991306272752, 
--0.77443470266431436]], [[-0.84569211427906454, -0.44482174237235217, 0.11489913371520433, 0.54835343548387994], 
-[0.97320324483020282, -0.61405933933254664, 0.33173263918038032, -0.57050877022505531], [-0.12077190543524385, 
-0.36150632743457489, -0.068101080694213945, -0.4546305711521279]]]])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.4419652490476238, -0.64427343648076119, -0.4419652490476238, -0.4419652490476238], 
-[-0.4419652490476238, -0.4419652490476238, -0.928355620464278, -0.4419652490476238], [-0.4419652490476238, -0.4419652490476238, 
--0.87888599683564927, -0.4419652490476238]], [[-0.4419652490476238, -0.4419652490476238, -0.4419652490476238, 
--0.4419652490476238], [-0.51441433806109282, -0.4419652490476238, -0.4419652490476238, -0.4419652490476238], 
-[-0.57999017047476609, -0.4419652490476238, -0.4419652490476238, -0.4419652490476238]]], [[[-0.95543429065165419, 
--0.54201040689187741, -0.4419652490476238, -0.4419652490476238], [-0.45225528034059992, -0.95114412168177509, 
--0.4419652490476238, -0.4419652490476238], [-0.4419652490476238, -0.4419652490476238, -0.4419652490476238, 
--0.4419652490476238]], [[-0.4419652490476238, -0.63008696815824217, -0.9871454720776065, -0.80139763362000016], 
-[-0.4419652490476238, -0.4419652490476238, -0.61604752040682942, -0.4419652490476238], [-0.4419652490476238, 
--0.4419652490476238, -0.4419652490476238, -0.65192047085780369]]], [[[-0.4419652490476238, -0.4419652490476238, 
--0.64710935873163944, -0.4419652490476238], [-0.4419652490476238, -0.4419652490476238, -0.4419652490476238, 
--0.60089415009256708], [-0.4419652490476238, -0.4419652490476238, -0.4419652490476238, -0.77443470266431436]], 
-[[-0.84569211427906454, -0.44482174237235217, -0.4419652490476238, -0.4419652490476238], [-0.4419652490476238, 
--0.61405933933254664, -0.4419652490476238, -0.57050877022505531], [-0.4419652490476238, -0.4419652490476238, 
--0.4419652490476238, -0.4546305711521279]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, -2.0], [-7.0, -4.0]], [[-3.0, 3.0], [-2.0, -3.0]], [[4.0, -3.0], [-5.0, -2.0]], [[1.0, 
+0.0], [0.0, -5.0]], [[3.0, 5.0], [6.0, 0.0]], [[6.0, -7.0], [2.0, 1.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([1.0, 2.0])+(1.-msk_arg1)*numpy.array([6.0, -1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [-2.0, -4.0]], [[-7.0, -14.0], [-4.0, -8.0]]], [[[-3.0, -6.0], [3.0, 6.0]], 
+[[-2.0, -4.0], [-3.0, -6.0]]], [[[4.0, 8.0], [-3.0, -6.0]], [[-5.0, -10.0], [-2.0, -4.0]]], [[[1.0, 2.0], [0.0, 0.0]], [[0.0, 
+0.0], [-5.0, -10.0]]], [[[3.0, 6.0], [5.0, 10.0]], [[6.0, 12.0], [0.0, 0.0]]], [[[6.0, 12.0], [-7.0, -14.0]], [[2.0, 4.0], 
+[1.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [-12.0, 2.0]], [[-42.0, 7.0], [-24.0, 4.0]]], [[[-18.0, 3.0], [18.0, 
+-3.0]], [[-12.0, 2.0], [-18.0, 3.0]]], [[[24.0, -4.0], [-18.0, 3.0]], [[-30.0, 5.0], [-12.0, 2.0]]], [[[6.0, -1.0], [0.0, 
+0.0]], [[0.0, 0.0], [-30.0, 5.0]]], [[[18.0, -3.0], [30.0, -5.0]], [[36.0, -6.0], [0.0, 0.0]]], [[[36.0, -6.0], [-42.0, 7.0]], 
+[[12.0, -2.0], [6.0, -1.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_array_rank4(self):
-      arg0=Data(numpy.array([[[[-0.51530089384428823, -0.5345844623433913, 0.87401774844575941, 0.45002410870429377], 
-[0.904555542052909, -0.18275561484024849, -0.21404331798026099, -0.28848183617848155], [0.24054399907052826, 
-0.35436917676168878, -0.45959352447418755, 0.43151245238610403]], [[0.068395691230318967, 0.72778171656693558, 
--0.81685869439276226, 0.28666012215553627], [0.069979226420893381, -0.44552834059566093, 0.9000378385296457, 
-0.25755405964297506], [-0.93840728377736071, 0.085503990101015503, -0.52327551969733488, -0.47600827962065573]]], 
-[[[0.35891500889634043, -0.76794687894658797, 0.27297737299087221, -0.14444722654289421], [-0.65807224946127207, 
-0.33656135158116518, 0.53691155421768966, -0.82123315518174667], [0.74691672155002986, -0.22265611186493373, 
-0.014444817111401553, -0.68448298226507109]], [[0.10529759492705582, 0.47149678183606492, 0.89842029505228127, 
-0.52171041358953962], [0.53282707947023966, 0.61961053067985539, -0.10855051050934916, 0.363477700849552], 
-[-0.38195165309676948, 0.96497264562810536, -0.61516337011164413, 0.24928063284391966]]], [[[-0.41137557106048472, 
--0.14139620422554033, -0.040691550605413074, -0.40176139538677047], [-0.76064522142761892, -0.51725323830086323, 
-0.66334491900051384, -0.64739820840737905], [0.019124520418513979, 0.39115651057203404, -0.17472681319897276, 
--0.02651555586260379]], [[-0.95082839249290152, -0.20596353818634294, -0.57721748029229958, 0.60568524787826306], 
-[0.9835866552981587, -0.69093164788788619, -0.92689157655664034, -0.36153457781800702], [-0.39218315735539644, 
--0.2610778320289322, -0.85950149433400092, 0.52441170091953859]]]]),self.functionspace)
-      arg1=numpy.array([[[[0.43303953044031118, -0.73571584733951711, 0.0042665769615761739, -0.10257787561659071], 
-[0.19809834639869695, -0.259483377199629, 0.57019413308355027, 0.1244648016566452], [0.029029608792817463, 0.70934806279242157, 
--0.89042703551266111, 0.39381556732884193]], [[0.99499159811475391, 0.24566810789927018, -0.21693845637681508, 
--0.23380543644165863], [0.5178154149165739, -0.75797274290326455, -0.27361700039045589, -0.527160043141083], 
-[-0.46223530755517839, 0.20849539411532669, 0.39518075099797745, -0.41269654461030192]]], [[[0.67953505185008312, 
-0.054156715132414712, 0.19072473654602673, 0.25942335630497637], [0.72590396510832367, -0.97370415191925996, 
-0.40403187319501321, 0.066046555101955784], [-0.67087636019860319, -0.33754965949797699, 0.66566569311518031, 
-0.25311273314057092]], [[-0.49337017567894459, 0.41205367414414917, -0.31007193815224943, 0.80676899243211464], 
-[-0.85418776374264738, -0.98351831500831199, -0.59719845307986663, -0.95737176975883198], [-0.64198375664141705, 
-0.57548823578699504, -0.25900425755775469, 0.14619726680373546]]], [[[-0.56765617368135124, 0.39274800205686411, 
-0.63136199848034624, -0.46983677240895538], [0.60607116354140467, 0.15641956236114596, 0.026688254748447271, 
-0.42814938916885259], [-0.63078578929266249, -0.56088664335956318, -0.93644570551476702, -0.36325409946308973]], 
-[[-0.4432069513096375, -0.48070579866519259, -0.3600050021296981, -0.18010675378602881], [0.7073427260537446, 
-0.44691840750064449, 0.62666275491474166, 0.48451269233352146], [-0.60540524473384205, -0.29303927106857852, 
--0.3105015501989401, 0.90154427673081505]]]])
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.51530089384428823, -0.73571584733951711, 0.0042665769615761739, -0.10257787561659071], 
-[0.19809834639869695, -0.259483377199629, -0.21404331798026099, -0.28848183617848155], [0.029029608792817463, 
-0.35436917676168878, -0.89042703551266111, 0.39381556732884193]], [[0.068395691230318967, 0.24566810789927018, 
--0.81685869439276226, -0.23380543644165863], [0.069979226420893381, -0.75797274290326455, -0.27361700039045589, 
--0.527160043141083], [-0.93840728377736071, 0.085503990101015503, -0.52327551969733488, -0.47600827962065573]]], 
-[[[0.35891500889634043, -0.76794687894658797, 0.19072473654602673, -0.14444722654289421], [-0.65807224946127207, 
--0.97370415191925996, 0.40403187319501321, -0.82123315518174667], [-0.67087636019860319, -0.33754965949797699, 
-0.014444817111401553, -0.68448298226507109]], [[-0.49337017567894459, 0.41205367414414917, -0.31007193815224943, 
-0.52171041358953962], [-0.85418776374264738, -0.98351831500831199, -0.59719845307986663, -0.95737176975883198], 
-[-0.64198375664141705, 0.57548823578699504, -0.61516337011164413, 0.14619726680373546]]], [[[-0.56765617368135124, 
--0.14139620422554033, -0.040691550605413074, -0.46983677240895538], [-0.76064522142761892, -0.51725323830086323, 
-0.026688254748447271, -0.64739820840737905], [-0.63078578929266249, -0.56088664335956318, -0.93644570551476702, 
--0.36325409946308973]], [[-0.95082839249290152, -0.48070579866519259, -0.57721748029229958, -0.18010675378602881], 
-[0.7073427260537446, -0.69093164788788619, -0.92689157655664034, -0.36153457781800702], [-0.60540524473384205, 
--0.29303927106857852, -0.85950149433400092, 0.52441170091953859]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-2.0, 0.0, 1.0], [1.0, -4.0, 1.0]], [[-4.0, -6.0, -1.0], [5.0, 1.0, 0.0]]], [[[-5.0, 6.0, 
+-4.0], [-6.0, 3.0, 5.0]], [[0.0, 4.0, 6.0], [-1.0, 2.0, -6.0]]], [[[6.0, 4.0, 2.0], [7.0, 1.0, -5.0]], [[6.0, -1.0, 5.0], 
+[-3.0, -7.0, 4.0]]], [[[1.0, 0.0, -7.0], [7.0, 0.0, -3.0]], [[-4.0, -7.0, -5.0], [-1.0, 4.0, -2.0]]], [[[7.0, 6.0, 5.0], [4.0, 
+-2.0, -4.0]], [[5.0, 7.0, 6.0], [-5.0, 2.0, 0.0]]], [[[6.0, -7.0, -1.0], [-2.0, 0.0, -2.0]], [[6.0, 0.0, -7.0], [-5.0, -7.0, 
+0.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, -1.0], [-1.0, -7.0], [6.0, -3.0]])+(1.-msk_arg1)*numpy.array([[0.0, 5.0], [-1.0, 3.0], 
+[0.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[16.0, -1.0], [5.0, 24.0]], [[20.0, 49.0], [-26.0, -12.0]]], [[[-5.0, -25.0], [57.0, -30.0]], 
+[[32.0, -46.0], [-33.0, 5.0]]], [[[-22.0, -40.0], [-66.0, 1.0]], [[1.0, -14.0], [46.0, 40.0]]], [[[-47.0, 20.0], [-53.0, 2.0]], 
+[[-3.0, 68.0], [-11.0, -21.0]]], [[[-11.0, -64.0], [-42.0, 22.0]], [[4.0, -72.0], [23.0, -9.0]]], [[[-29.0, 46.0], [-2.0, 
+8.0]], [[-72.0, 15.0], [32.0, 54.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -10.0], [4.0, -7.0]], [[6.0, -38.0], [-1.0, 28.0]]], 
+[[[-6.0, -7.0], [-3.0, -21.0]], [[-4.0, 12.0], [-2.0, 1.0]]], [[[-4.0, 42.0], [-1.0, 38.0]], [[1.0, 27.0], [7.0, -36.0]]], 
+[[[0.0, 5.0], [0.0, 35.0]], [[7.0, -41.0], [-4.0, 7.0]]], [[[-6.0, 53.0], [2.0, 14.0]], [[-7.0, 46.0], [-2.0, -19.0]]], [[[7.0, 
+9.0], [0.0, -10.0]], [[0.0, 30.0], [7.0, -46.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_constData_rank4(self):
-      arg0=Data(0.891735083193,self.functionspace)
-      arg1=Data(numpy.array([[[[-0.72203768857693551, -0.41411712052199667, -0.035331134676287679, 0.55758258245386427], 
-[0.75338709881292676, -0.36350254911788116, -0.75993093691310132, 0.70447797605003237], [-0.037788491392551915, 
-0.56878553125366382, 0.81116121000923824, 0.2223985611830317]], [[-0.41515674664945834, 0.037076606947510582, 
--0.85516490079085417, -0.048103352600587845], [0.78899433337234859, -0.39667640020196338, -0.39907228581187004, 
-0.37033536518374444], [0.6502243364215694, -0.54408171649819681, -0.11018474323398109, 0.28802582231668872]]], 
-[[[0.11960730057388647, -0.27231559614579326, 0.97477423712713884, 0.87436535045988562], [0.40588083121866858, 
-0.67917533822992349, 0.53624575670919006, 0.42863165673791803], [-0.81421658977971934, -0.47090725645970055, 
-0.52414977704280918, -0.86989526260792149]], [[0.5262247411090677, -0.83468582885633391, 0.47908955620427496, 
--0.19151822890455361], [0.68839087823497791, -0.80199977977182701, -0.99698818178604953, 0.6450566248973959], 
-[-0.10957877883728395, 0.66604278801404204, 0.20364558370243446, 0.4630430950022415]]], [[[0.57174367066436149, 
--0.92783012055691327, -0.71868586438947601, -0.56230882090472978], [0.051114429961445662, -0.065326037484948474, 
--0.02928983521946793, 0.4244404756507314], [-0.15803743255916403, 0.46586183224671363, -0.15594140495277231, 
--0.11096137267486283]], [[0.074437673391905435, -0.17916258499215765, 0.58674546072894329, -0.29877668964767268], 
-[0.18909123865906041, -0.70642032548817313, -0.29342586282114747, 0.71513650161087261], [-0.028468734471830848, 
-0.6230463797833472, -0.097661383995800044, 0.17315221205431386]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.72203768857693551, -0.41411712052199667, -0.035331134676287679, 0.55758258245386427], 
-[0.75338709881292676, -0.36350254911788116, -0.75993093691310132, 0.70447797605003237], [-0.037788491392551915, 
-0.56878553125366382, 0.81116121000923824, 0.2223985611830317]], [[-0.41515674664945834, 0.037076606947510582, 
--0.85516490079085417, -0.048103352600587845], [0.78899433337234859, -0.39667640020196338, -0.39907228581187004, 
-0.37033536518374444], [0.6502243364215694, -0.54408171649819681, -0.11018474323398109, 0.28802582231668872]]], 
-[[[0.11960730057388647, -0.27231559614579326, 0.89173508319332551, 0.87436535045988562], [0.40588083121866858, 
-0.67917533822992349, 0.53624575670919006, 0.42863165673791803], [-0.81421658977971934, -0.47090725645970055, 
-0.52414977704280918, -0.86989526260792149]], [[0.5262247411090677, -0.83468582885633391, 0.47908955620427496, 
--0.19151822890455361], [0.68839087823497791, -0.80199977977182701, -0.99698818178604953, 0.6450566248973959], 
-[-0.10957877883728395, 0.66604278801404204, 0.20364558370243446, 0.4630430950022415]]], [[[0.57174367066436149, 
--0.92783012055691327, -0.71868586438947601, -0.56230882090472978], [0.051114429961445662, -0.065326037484948474, 
--0.02928983521946793, 0.4244404756507314], [-0.15803743255916403, 0.46586183224671363, -0.15594140495277231, 
--0.11096137267486283]], [[0.074437673391905435, -0.17916258499215765, 0.58674546072894329, -0.29877668964767268], 
-[0.18909123865906041, -0.70642032548817313, -0.29342586282114747, 0.71513650161087261], [-0.028468734471830848, 
-0.6230463797833472, -0.097661383995800044, 0.17315221205431386]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-3.0, 4.0, 5.0, -5.0], [4.0, 1.0, -1.0, 2.0], [7.0, -3.0, 2.0, 3.0]], [[-7.0, 1.0, 5.0, 7.0], 
+[-7.0, 0.0, -4.0, 5.0], [-6.0, 6.0, -6.0, 5.0]]], [[[-2.0, -7.0, 0.0, -1.0], [-1.0, 0.0, -6.0, -1.0], [0.0, 2.0, 6.0, -5.0]], 
+[[6.0, -4.0, 0.0, 7.0], [3.0, 4.0, 2.0, -7.0], [5.0, -7.0, -6.0, -3.0]]], [[[-1.0, 3.0, -5.0, -2.0], [-7.0, -7.0, 0.0, -7.0], 
+[-7.0, 7.0, 6.0, 1.0]], [[7.0, -7.0, -5.0, -6.0], [-7.0, 7.0, 7.0, 0.0], [7.0, -5.0, -4.0, 3.0]]]]),self.functionspace)
+      arg1=-3.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[9.0, -12.0, -15.0, 15.0], [-12.0, -3.0, 3.0, -6.0], [-21.0, 9.0, -6.0, -9.0]], [[21.0, -3.0, 
+-15.0, -21.0], [21.0, -0.0, 12.0, -15.0], [18.0, -18.0, 18.0, -15.0]]], [[[6.0, 21.0, -0.0, 3.0], [3.0, -0.0, 18.0, 3.0], 
+[-0.0, -6.0, -18.0, 15.0]], [[-18.0, 12.0, -0.0, -21.0], [-9.0, -12.0, -6.0, 21.0], [-15.0, 21.0, 18.0, 9.0]]], [[[3.0, -9.0, 
+15.0, 6.0], [21.0, 21.0, -0.0, 21.0], [21.0, -21.0, -18.0, -3.0]], [[-21.0, 21.0, 15.0, 18.0], [21.0, -21.0, -21.0, -0.0], 
+[-21.0, 15.0, 12.0, -9.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_constData_rank4(self):
-      arg0=Data(numpy.array([[[[-0.47777935053857146, 0.51316552051709263, 0.88742512685450414, 0.48952191876435913], 
-[0.41202779986075044, 0.77404073221013903, -0.94676425093241035, 0.50237644935067216], [-0.37965342477781316, 
-0.67131426768130131, -0.14063757901097174, -0.26750582781962473]], [[-0.050107785374164715, -0.83992581313093662, 
--0.80250312368621834, -0.33568592401079411], [-0.11397976003118249, -0.44669983253036549, 0.8690123529393472, 
-0.90063236093865551], [0.15837327302030935, -0.95854666045623516, -0.80616209677280914, -0.31842107377317364]]], 
-[[[0.85022897247710905, 0.5839959379551829, 0.44612811860910351, 0.10978570557810263], [0.6430376987942843, 
-0.085773987365875382, -0.98381281067446569, -0.5785782108545614], [-0.97395881411588148, 0.23293947833417428, 
--0.80154114989688474, -0.5411078331058059]], [[-0.20202996036682364, -0.62298638721157129, -0.7576426160764187, 
--0.96110793936858419], [0.039902022303325957, 0.95970890710541568, -0.49433734854466183, 0.024279241207748603], 
-[-0.33419375034649512, 0.80948391343505643, 0.42134649611306618, -0.062467245134910199]]], [[[-0.75572791191304689, 
-0.70458156902591251, 0.15154171655867099, -0.4583951436461946], [0.67235681790284341, 0.53943912513522818, 
--0.89569430105247161, 0.36935947260022051], [-0.057387342010895237, 0.37282610862137999, -0.62070663534803949, 
--0.74749869011929881]], [[0.0063662944109017516, 0.95287811076359397, -0.48218175270003694, 0.99726134245386144], 
-[-0.79471912871921724, 0.7810353581622016, -0.93026670417550372, 0.95100361471790817], [-0.26211300902795065, 
-0.083282449448966567, -0.48644073147660105, 0.79058224860134874]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[0.9044762237957813, -0.4165617794514338, -0.84316547505942374, -0.83502739048194075], 
-[0.4765574192484292, 0.71882262037480693, 0.56463189469898589, -0.42463654489820257], [-0.43922183033040563, 
-0.38657471796018816, 0.61866675565004203, 0.93824806697394769]], [[-0.72104247828474777, 0.30022085686185962, 
--0.10640971824214818, -0.095386702945631674], [0.29431326865861096, 0.38141853130311043, 0.75349472607164469, 
--0.11359897246925343], [-0.30881692673047323, -0.054713691342018533, -0.076942269721663736, -0.86385624349593293]]], 
-[[[-0.91975215252728471, -0.97113742068953313, 0.91998252036130057, 0.98586686095690501], [0.76005823212864088, 
--0.43964985948023272, 0.20604133120413848, -0.64800567651972929], [0.093176759927668718, -0.35216616072049511, 
-0.38818593035522286, -0.23699608167896336]], [[-0.33979970436946694, 0.37786671793745219, 0.45905605365501434, 
-0.32329028459669162], [0.91064201311612525, -0.5820740522897403, 0.28626480691507727, -0.25257010865511065], 
-[-0.36624442568743398, 0.39826792488190055, -0.61074895830358722, 0.48219677250559201]]], [[[-0.46963234204880111, 
-0.00085481749717941646, -0.98783853145909517, 0.26145880073622019], [-0.21110894864995977, 0.82609873032705305, 
--0.19904218310269717, 0.82411923550522492], [-0.16294712128624456, -0.34713332785339834, -0.040962843188556031, 
-0.5372056695231342]], [[0.3040740909862587, 0.30653728349056175, 0.74174999512063966, 0.48061529794500668], 
-[0.010756035221834992, -0.9065960753598894, -0.93890917258128948, -0.9725300746483847], [0.6506929930879044, 
-0.74106769304325515, -0.87987031844181507, 0.092640477359948514]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      ref=Data(numpy.array([[[[-0.47777935053857146, -0.4165617794514338, -0.84316547505942374, -0.83502739048194075], 
-[0.41202779986075044, 0.71882262037480693, -0.94676425093241035, -0.42463654489820257], [-0.43922183033040563, 
-0.38657471796018816, -0.14063757901097174, -0.26750582781962473]], [[-0.72104247828474777, -0.83992581313093662, 
--0.80250312368621834, -0.33568592401079411], [-0.11397976003118249, -0.44669983253036549, 0.75349472607164469, 
--0.11359897246925343], [-0.30881692673047323, -0.95854666045623516, -0.80616209677280914, -0.86385624349593293]]], 
-[[[-0.91975215252728471, -0.97113742068953313, 0.44612811860910351, 0.10978570557810263], [0.6430376987942843, 
--0.43964985948023272, -0.98381281067446569, -0.64800567651972929], [-0.97395881411588148, -0.35216616072049511, 
--0.80154114989688474, -0.5411078331058059]], [[-0.33979970436946694, -0.62298638721157129, -0.7576426160764187, 
--0.96110793936858419], [0.039902022303325957, -0.5820740522897403, -0.49433734854466183, -0.25257010865511065], 
-[-0.36624442568743398, 0.39826792488190055, -0.61074895830358722, -0.062467245134910199]]], [[[-0.75572791191304689, 
-0.00085481749717941646, -0.98783853145909517, -0.4583951436461946], [-0.21110894864995977, 0.53943912513522818, 
--0.89569430105247161, 0.36935947260022051], [-0.16294712128624456, -0.34713332785339834, -0.62070663534803949, 
--0.74749869011929881]], [[0.0063662944109017516, 0.30653728349056175, -0.48218175270003694, 0.48061529794500668], 
-[-0.79471912871921724, -0.9065960753598894, -0.93890917258128948, -0.9725300746483847], [-0.26211300902795065, 
-0.083282449448966567, -0.87987031844181507, 0.092640477359948514]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[4.0, 0.0, -5.0, 6.0], [7.0, -1.0, -5.0, -5.0], [2.0, -1.0, -7.0, -3.0]], [[2.0, -3.0, 4.0, 
+6.0], [6.0, 2.0, 3.0, 6.0], [5.0, -1.0, 0.0, 0.0]]], [[[2.0, 7.0, 3.0, 2.0], [0.0, -1.0, -2.0, -3.0], [-7.0, 7.0, -3.0, -6.0]], 
+[[2.0, 2.0, 6.0, -6.0], [6.0, 4.0, -3.0, 0.0], [-4.0, -1.0, 2.0, 6.0]]], [[[7.0, 2.0, 3.0, -1.0], [0.0, -4.0, -7.0, -7.0], 
+[2.0, 1.0, -2.0, -6.0]], [[-7.0, -6.0, 0.0, 6.0], [4.0, -6.0, -4.0, 1.0], [5.0, 1.0, 7.0, 0.0]]]]),self.functionspace)
+      arg1=numpy.array(7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[28.0, 0.0, -35.0, 42.0], [49.0, -7.0, -35.0, -35.0], [14.0, -7.0, -49.0, -21.0]], [[14.0, -21.0, 
+28.0, 42.0], [42.0, 14.0, 21.0, 42.0], [35.0, -7.0, 0.0, 0.0]]], [[[14.0, 49.0, 21.0, 14.0], [0.0, -7.0, -14.0, -21.0], [-49.0, 
+49.0, -21.0, -42.0]], [[14.0, 14.0, 42.0, -42.0], [42.0, 28.0, -21.0, 0.0], [-28.0, -7.0, 14.0, 42.0]]], [[[49.0, 14.0, 21.0, 
+-7.0], [0.0, -28.0, -49.0, -49.0], [14.0, 7.0, -14.0, -42.0]], [[-49.0, -42.0, 0.0, 42.0], [28.0, -42.0, -28.0, 7.0], [35.0, 
+7.0, 49.0, 0.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank0_expandedData_rank4(self):
-      arg0=Data(0.316000715921,self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.37755969956550639, 0.36096931524775444, 0.95451965100827829, -0.43778927185741034], 
-[-0.1629892982850687, -0.67234249843048977, -0.70971458497585305, -0.93063861231689038], [0.83603147762023577, 
--0.033608855259837922, -0.27179761381437872, -0.73676617519650112]], [[0.15778727712231966, 0.73747423055335704, 
-0.27387137708130549, 0.44356861336674069], [-0.35716705733248988, -0.84396471006743834, -0.15553398284535724, 
--0.93650145850970135], [0.42487581822832898, 0.23786348031884486, 0.8396087607535061, 0.38507604571186871]]], 
-[[[0.39829311097167919, 0.67632063438127732, -0.95575880406143243, -0.75973639782870861], [0.94163396413932121, 
-0.11518518289272595, 0.80397065121148126, -0.79049563434914361], [0.727812873273602, 0.49635152562076179, -0.62036081501552331, 
--0.56579689878028372]], [[-0.26378624581050802, 0.090099480628977657, -0.49537633544458504, -0.52696913511146759], 
-[-0.76634891512661563, 0.021743249235644413, 0.52889001340348663, -0.23091101336365827], [0.26967534066181731, 
-0.60851799360922665, 0.66612069814599839, -0.26596843544371485]]], [[[-0.4421738685329899, 0.54351668881464921, 
-0.085141505067702905, -0.71225260085711728], [0.57563600579702867, -0.38484962942553413, -0.75521288610876103, 
-0.28529838559586151], [0.721887966315087, -0.62430636161445729, -0.6901704195658962, 0.57637611174539227]], 
-[[-0.2272238299492273, 0.52802390990066561, -0.53954880773503922, 0.74273270379966472], [-0.23081372311262394, 
-0.13968851302108121, -0.22489242015891531, -0.096494606150010931], [0.65044538305087429, -0.15595510601618234, 
-0.45761158985282946, 0.27521900803800459]]]])+(1.-msk_arg1)*numpy.array([[[[-0.85637723195299276, -0.22531301543043658, 
-0.73380568704308136, -0.19605666398270749], [-0.53037531460080878, 0.13437937725542914, -0.77731053360350244, 
-0.31686759234243222], [-0.53057977927535838, 0.40334641708084429, 0.18747944506803416, 0.2240578584733679]], 
-[[-0.7582667750656864, -0.71197977040865568, -0.32083171472023597, -0.93452911580057973], [-0.2319980929469394, 
-0.22952685272066708, 0.99718674382924788, -0.56515226645193151], [0.23463548081498375, 0.2756888531629198, 0.22671245584002064, 
-0.76467896098677191]]], [[[-0.12889979409763397, 0.57877838294149542, -0.054266377341127159, 0.32225886284062533], 
-[0.96897693705886301, 0.75226902690537178, 0.27650958731641029, -0.40548580796679912], [-0.5794149922830012, 
--0.93179222846167664, 0.93389510265410469, 0.45423395359675678]], [[0.51861877705472748, -0.93602090371304869, 
--0.76487812793156018, -0.058905480629213081], [-0.33342462067329492, -0.994038389912965, 0.13028734936504827, 
-0.6869314181732129], [-0.39062165766102863, -0.70044510997957499, -0.26533438821902733, 0.15795503030560276]]], 
-[[[0.51904407201881719, 0.99197957687365435, 0.82080152139235829, 0.50162858513889907], [-0.98462565456527695, 
--0.15183193504837877, 0.86675561015521496, 0.82372301903200351], [-0.71821744090184803, -0.74296552709816277, 
--0.95671144435889177, -0.51378186028823158]], [[-0.8369732970991226, 0.81681701960603115, -0.98096813889999024, 
-0.20834643803841346], [-0.56513579029019856, -0.66870035965430974, -0.4843056575612692, -0.69365171409366488], 
-[0.63435591930774482, -0.26430268204553498, 0.72043513688760585, -0.10195564698579229]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.37755969956550639, 0.31600071592090728, 0.31600071592090728, -0.43778927185741034], 
-[-0.1629892982850687, -0.67234249843048977, -0.70971458497585305, -0.93063861231689038], [0.31600071592090728, 
--0.033608855259837922, -0.27179761381437872, -0.73676617519650112]], [[0.15778727712231966, 0.31600071592090728, 
-0.27387137708130549, 0.31600071592090728], [-0.35716705733248988, -0.84396471006743834, -0.15553398284535724, 
--0.93650145850970135], [0.31600071592090728, 0.23786348031884486, 0.31600071592090728, 0.31600071592090728]]], 
-[[[0.31600071592090728, 0.31600071592090728, -0.95575880406143243, -0.75973639782870861], [0.31600071592090728, 
-0.11518518289272595, 0.31600071592090728, -0.79049563434914361], [0.31600071592090728, 0.31600071592090728, 
--0.62036081501552331, -0.56579689878028372]], [[-0.26378624581050802, 0.090099480628977657, -0.49537633544458504, 
--0.52696913511146759], [-0.76634891512661563, 0.021743249235644413, 0.31600071592090728, -0.23091101336365827], 
-[0.26967534066181731, 0.31600071592090728, 0.31600071592090728, -0.26596843544371485]]], [[[-0.4421738685329899, 
-0.31600071592090728, 0.085141505067702905, -0.71225260085711728], [0.31600071592090728, -0.38484962942553413, 
--0.75521288610876103, 0.28529838559586151], [0.31600071592090728, -0.62430636161445729, -0.6901704195658962, 
-0.31600071592090728]], [[-0.2272238299492273, 0.31600071592090728, -0.53954880773503922, 0.31600071592090728], 
-[-0.23081372311262394, 0.13968851302108121, -0.22489242015891531, -0.096494606150010931], [0.31600071592090728, 
--0.15595510601618234, 0.31600071592090728, 0.27521900803800459]]]])+(1.-msk_ref)*numpy.array([[[[-0.85637723195299276, 
--0.22531301543043658, 0.31600071592090728, -0.19605666398270749], [-0.53037531460080878, 0.13437937725542914, 
--0.77731053360350244, 0.31600071592090728], [-0.53057977927535838, 0.31600071592090728, 0.18747944506803416, 
-0.2240578584733679]], [[-0.7582667750656864, -0.71197977040865568, -0.32083171472023597, -0.93452911580057973], 
-[-0.2319980929469394, 0.22952685272066708, 0.31600071592090728, -0.56515226645193151], [0.23463548081498375, 
-0.2756888531629198, 0.22671245584002064, 0.31600071592090728]]], [[[-0.12889979409763397, 0.31600071592090728, 
--0.054266377341127159, 0.31600071592090728], [0.31600071592090728, 0.31600071592090728, 0.27650958731641029, 
--0.40548580796679912], [-0.5794149922830012, -0.93179222846167664, 0.31600071592090728, 0.31600071592090728]], 
-[[0.31600071592090728, -0.93602090371304869, -0.76487812793156018, -0.058905480629213081], [-0.33342462067329492, 
--0.994038389912965, 0.13028734936504827, 0.31600071592090728], [-0.39062165766102863, -0.70044510997957499, 
--0.26533438821902733, 0.15795503030560276]]], [[[0.31600071592090728, 0.31600071592090728, 0.31600071592090728, 
-0.31600071592090728], [-0.98462565456527695, -0.15183193504837877, 0.31600071592090728, 0.31600071592090728], 
-[-0.71821744090184803, -0.74296552709816277, -0.95671144435889177, -0.51378186028823158]], [[-0.8369732970991226, 
-0.31600071592090728, -0.98096813889999024, 0.20834643803841346], [-0.56513579029019856, -0.66870035965430974, 
--0.4843056575612692, -0.69365171409366488], [0.31600071592090728, -0.26430268204553498, 0.31600071592090728, 
--0.10195564698579229]]]])
+   def test_generalTensorProduct_constData_rank4_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[7.0, 2.0, 5.0, -3.0], [-6.0, -6.0, 1.0, -2.0], [-5.0, 4.0, 7.0, -1.0]], [[-1.0, -7.0, -2.0, 
+-1.0], [4.0, 6.0, 0.0, 4.0], [7.0, 6.0, -7.0, -1.0]]], [[[-7.0, 7.0, 0.0, 7.0], [6.0, 0.0, -1.0, 0.0], [0.0, -3.0, -5.0, 
+-6.0]], [[3.0, 1.0, 4.0, -6.0], [1.0, 2.0, -3.0, -4.0], [-3.0, 6.0, 2.0, -6.0]]], [[[4.0, 1.0, -7.0, -2.0], [-7.0, 2.0, 4.0, 
+3.0], [5.0, 6.0, 1.0, 1.0]], [[-5.0, -4.0, 5.0, 1.0], [6.0, -5.0, -6.0, 6.0], [6.0, -1.0, 7.0, -2.0]]]]),self.functionspace)
+      arg1=Data(-6.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-42.0, -12.0, -30.0, 18.0], [36.0, 36.0, -6.0, 12.0], [30.0, -24.0, -42.0, 6.0]], [[6.0, 42.0, 
+12.0, 6.0], [-24.0, -36.0, -0.0, -24.0], [-42.0, -36.0, 42.0, 6.0]]], [[[42.0, -42.0, -0.0, -42.0], [-36.0, -0.0, 6.0, -0.0], 
+[-0.0, 18.0, 30.0, 36.0]], [[-18.0, -6.0, -24.0, 36.0], [-6.0, -12.0, 18.0, 24.0], [18.0, -36.0, -12.0, 36.0]]], [[[-24.0, 
+-6.0, 42.0, 12.0], [42.0, -12.0, -24.0, -18.0], [-30.0, -36.0, -6.0, -6.0]], [[30.0, 24.0, -30.0, -6.0], [-36.0, 30.0, 36.0, 
+-36.0], [-36.0, 6.0, -42.0, 12.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_constData_rank4_expandedData_rank4(self):
-      arg0=Data(numpy.array([[[[-0.082948971486332068, -0.8185207403445125, -0.60916521073513796, 0.69890586240725083], 
-[-0.85580002362796836, 0.46734043198688302, -0.67397330493613916, -0.52932217312961649], [0.5751081669961573, 
-0.052941628165801058, 0.098163203354192152, 0.38179995083187723]], [[0.53767215178340888, -0.73150448350908204, 
-0.79051300480353959, -0.76741350463770286], [-0.63252343652595422, -0.20704378252566169, 0.73994977677913876, 
-0.010608838986240876], [0.42470265198407309, 0.064509699095955719, 0.69780923538137096, -0.73368376961204418]]], 
-[[[0.67114701541099153, -0.096186192218104649, -0.35213406260979152, 0.47414640994359991], [0.57776297104209728, 
--0.12129927169254184, 0.66004288476383932, -0.34976968314726742], [-0.079196098179713292, 0.8095559688460725, 
--0.45381584972272249, -0.42312632509663017]], [[0.45437467710092028, 0.30748161382877059, -0.029464813833504078, 
-0.69702146761293315], [-0.65011341281663348, -0.087301283591635359, 0.86654367992566983, 0.33315766268509006], 
-[0.9455067082307691, 0.23015920988881899, 0.18234716907032289, -0.50456272603383279]]], [[[0.0078729928569665208, 
-0.69731173748581221, 0.49970395768415377, 0.082420781284541222], [0.92931850420460083, -0.0061160337028260958, 
-0.76986905856890631, 0.36344781002822146], [0.76550152853294962, 0.56796799078432691, 0.30688505811574607, 
-0.17074010306728082]], [[0.59020456928225928, 0.24362230608362645, -0.32466678999008902, 0.30563086098209458], 
-[-0.95962944437257724, -0.29191868772168217, -0.12704158563474799, -0.67874623436275505], [0.16919381995510241, 
--0.96468755364254899, -0.22719249912901507, -0.28389379495055422]]]]),self.functionspace)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.77522513090163669, -0.80635267202421312, 0.94233668188620756, -0.45658996926920992], 
-[0.25112652901834354, 0.52640525584683284, 0.51104938355418983, 0.33201070386050224], [0.61637556743500754, 0.3042010867044147, 
--0.047839405067248153, -0.2640132345768671]], [[0.10264903345536336, -0.73683207607320234, 0.069246745195582937, 
--0.32287172580414225], [0.30995571522493481, -0.82084745507109091, -0.33981780426883557, 0.14491188736164284], 
-[-0.71602311035524302, 0.2766751304240469, -0.86451180045316023, -0.84988304495821465]]], [[[0.31804733675909169, 
--0.81564972895920818, 0.96671061401348335, -0.70055538066741985], [0.053083457750787044, 0.91371825554084962, 
-0.38663635014232711, 0.00090513077608278536], [-0.54612064201970534, 0.68147787479274302, -0.77298036810153237, 
-0.83912530419823095]], [[0.44035593042649568, 0.81527025451484381, -0.64131114335863293, 0.51552585289312369], 
-[0.89486573235115974, 0.76998778596631912, 0.11117369822532019, -0.97206597240432502], [0.15307161716384332, 
-0.87640722766535317, -0.19680515819738842, 0.4572939716025195]]], [[[0.41287051892656246, 0.63382278248957458, 
-0.22942170089067293, -0.51085554706807135], [0.72864808970530914, -0.19935178364826323, -0.15568291665146261, 
--0.485912841653515], [-0.81435667376152643, -0.015893633225117165, -0.70747754430419785, -0.91438960906100375]], 
-[[0.49161162358807431, -0.37469690458832061, -0.36420300133574735, 0.48516242994294201], [-0.88510878690266148, 
--0.59765120583551856, -0.085076081801722436, 0.47172114387495845], [-0.10243328873293822, 0.71598263259232064, 
--0.34597076174440833, 0.50550262127338264]]]])+(1.-msk_arg1)*numpy.array([[[[-0.33593578300648619, -0.56242545797659882, 
--0.43259300047183369, 0.60975351860299476], [-0.02246403277780229, -0.34695041342876953, 0.21608419785673472, 
-0.71236574239944783], [-0.14760964716830305, 0.79084556506300907, -0.56753645222226501, 0.37044570460434123]], 
-[[-0.15520476820418772, -0.89403655751177724, 0.43653625711027777, -0.50213469071532391], [-0.65169030098169367, 
--0.76540354918033926, 0.053850360299739553, 0.87753524596482224], [0.24770890750127994, 0.42745906433629433, 
--0.84900220123156545, 0.47162957032782726]]], [[[0.16370780834360921, -0.23123623323395481, -0.99531518184273637, 
-0.64911640690557815], [-0.16939552664705682, -0.44508487152560727, 0.93675404476766655, 0.70544654458716871], 
-[-0.070725470702952986, 0.27145346226473599, 0.58243235416032579, 0.35080534465830149]], [[0.08882593105537917, 
-0.58501183479991914, 0.47653867211448286, 0.17035838850009011], [-0.12480704343941573, 0.7815321741368928, 0.5965737714975663, 
-0.23566973902026289], [-0.28987700695566376, -0.8017050606090701, 0.68223074082642809, -0.70544535100287553]]], 
-[[[-0.77126412665483546, 0.022612276143459287, 0.90170123505951372, -0.87611945096268884], [0.13590453833353489, 
-0.90858638661704583, 0.64915192636583363, 0.1040140355630772], [-0.11166416716567751, -0.36494170175989593, 
--0.36908225517180071, -0.1520350621282216]], [[0.61894169405811095, -0.87237289574196764, 0.94300015667511072, 
--0.86980426118376197], [0.063922248082339816, 0.36973018852956674, 0.27399321809408206, -0.8269329208347509], 
-[-0.19172428640293182, 0.20528097568175507, -0.7586224706371929, 0.24071100688645974]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.77522513090163669, -0.8185207403445125, -0.60916521073513796, -0.45658996926920992], 
-[-0.85580002362796836, 0.46734043198688302, -0.67397330493613916, -0.52932217312961649], [0.5751081669961573, 
-0.052941628165801058, -0.047839405067248153, -0.2640132345768671]], [[0.10264903345536336, -0.73683207607320234, 
-0.069246745195582937, -0.76741350463770286], [-0.63252343652595422, -0.82084745507109091, -0.33981780426883557, 
-0.010608838986240876], [-0.71602311035524302, 0.064509699095955719, -0.86451180045316023, -0.84988304495821465]]], 
-[[[0.31804733675909169, -0.81564972895920818, -0.35213406260979152, -0.70055538066741985], [0.053083457750787044, 
--0.12129927169254184, 0.38663635014232711, -0.34976968314726742], [-0.54612064201970534, 0.68147787479274302, 
--0.77298036810153237, -0.42312632509663017]], [[0.44035593042649568, 0.30748161382877059, -0.64131114335863293, 
-0.51552585289312369], [-0.65011341281663348, -0.087301283591635359, 0.11117369822532019, -0.97206597240432502], 
-[0.15307161716384332, 0.23015920988881899, -0.19680515819738842, -0.50456272603383279]]], [[[0.0078729928569665208, 
-0.63382278248957458, 0.22942170089067293, -0.51085554706807135], [0.72864808970530914, -0.19935178364826323, 
--0.15568291665146261, -0.485912841653515], [-0.81435667376152643, -0.015893633225117165, -0.70747754430419785, 
--0.91438960906100375]], [[0.49161162358807431, -0.37469690458832061, -0.36420300133574735, 0.30563086098209458], 
-[-0.95962944437257724, -0.59765120583551856, -0.12704158563474799, -0.67874623436275505], [-0.10243328873293822, 
--0.96468755364254899, -0.34597076174440833, -0.28389379495055422]]]])+(1.-msk_ref)*numpy.array([[[[-0.33593578300648619, 
--0.8185207403445125, -0.60916521073513796, 0.60975351860299476], [-0.85580002362796836, -0.34695041342876953, 
--0.67397330493613916, -0.52932217312961649], [-0.14760964716830305, 0.052941628165801058, -0.56753645222226501, 
-0.37044570460434123]], [[-0.15520476820418772, -0.89403655751177724, 0.43653625711027777, -0.76741350463770286], 
-[-0.65169030098169367, -0.76540354918033926, 0.053850360299739553, 0.010608838986240876], [0.24770890750127994, 
-0.064509699095955719, -0.84900220123156545, -0.73368376961204418]]], [[[0.16370780834360921, -0.23123623323395481, 
--0.99531518184273637, 0.47414640994359991], [-0.16939552664705682, -0.44508487152560727, 0.66004288476383932, 
--0.34976968314726742], [-0.079196098179713292, 0.27145346226473599, -0.45381584972272249, -0.42312632509663017]], 
-[[0.08882593105537917, 0.30748161382877059, -0.029464813833504078, 0.17035838850009011], [-0.65011341281663348, 
--0.087301283591635359, 0.5965737714975663, 0.23566973902026289], [-0.28987700695566376, -0.8017050606090701, 
-0.18234716907032289, -0.70544535100287553]]], [[[-0.77126412665483546, 0.022612276143459287, 0.49970395768415377, 
--0.87611945096268884], [0.13590453833353489, -0.0061160337028260958, 0.64915192636583363, 0.1040140355630772], 
-[-0.11166416716567751, -0.36494170175989593, -0.36908225517180071, -0.1520350621282216]], [[0.59020456928225928, 
--0.87237289574196764, -0.32466678999008902, -0.86980426118376197], [-0.95962944437257724, -0.29191868772168217, 
--0.12704158563474799, -0.8269329208347509], [-0.19172428640293182, -0.96468755364254899, -0.7586224706371929, 
--0.28389379495055422]]]])
+   def test_generalTensorProduct_constData_rank4_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-4.0, 7.0, -3.0, -5.0], [6.0, -3.0, -6.0, -2.0], [0.0, 0.0, -5.0, 4.0]], [[-1.0, 3.0, -5.0, 
+0.0], [3.0, 0.0, -5.0, -2.0], [-6.0, 1.0, 0.0, 1.0]]], [[[3.0, 5.0, -1.0, -2.0], [-6.0, -6.0, -3.0, -5.0], [-3.0, -2.0, -3.0, 
+-5.0]], [[0.0, -1.0, -3.0, -7.0], [-2.0, 4.0, -7.0, 3.0], [-5.0, -6.0, 6.0, -5.0]]], [[[7.0, -2.0, -4.0, -3.0], [-2.0, 3.0, 
+1.0, 7.0], [-5.0, -1.0, 5.0, -6.0]], [[-5.0, 2.0, 5.0, 3.0], [0.0, 7.0, 5.0, -5.0], [-6.0, -5.0, -5.0, 
+-3.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[12.0, -21.0, 9.0, 15.0], [-18.0, 9.0, 18.0, 6.0], [-0.0, -0.0, 15.0, -12.0]], [[3.0, -9.0, 
+15.0, -0.0], [-9.0, -0.0, 15.0, 6.0], [18.0, -3.0, -0.0, -3.0]]], [[[-9.0, -15.0, 3.0, 6.0], [18.0, 18.0, 9.0, 15.0], [9.0, 
+6.0, 9.0, 15.0]], [[-0.0, 3.0, 9.0, 21.0], [6.0, -12.0, 21.0, -9.0], [15.0, 18.0, -18.0, 15.0]]], [[[-21.0, 6.0, 12.0, 9.0], 
+[6.0, -9.0, -3.0, -21.0], [15.0, 3.0, -15.0, 18.0]], [[15.0, -6.0, -15.0, -9.0], [-0.0, -21.0, -15.0, 15.0], [18.0, 15.0, 15.0, 
+9.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, -49.0, 21.0, 35.0], [-42.0, 21.0, 42.0, 14.0], [-0.0, -0.0, 35.0, -28.0]], [[7.0, 
+-21.0, 35.0, -0.0], [-21.0, -0.0, 35.0, 14.0], [42.0, -7.0, -0.0, -7.0]]], [[[-21.0, -35.0, 7.0, 14.0], [42.0, 42.0, 21.0, 
+35.0], [21.0, 14.0, 21.0, 35.0]], [[-0.0, 7.0, 21.0, 49.0], [14.0, -28.0, 49.0, -21.0], [35.0, 42.0, -42.0, 35.0]]], [[[-49.0, 
+14.0, 28.0, 21.0], [14.0, -21.0, -7.0, -49.0], [35.0, 7.0, -35.0, 42.0]], [[35.0, -14.0, -35.0, -21.0], [-0.0, -49.0, -35.0, 
+35.0], [42.0, 35.0, 35.0, 21.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.802185224287)+(1.-msk_arg0)*(-0.823984932181)
-      arg1=0.702168831355
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.802185224287)+(1.-msk_ref)*(-0.823984932181)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.31499734364793808, -0.64546172566180404])+(1.-msk_arg0)*numpy.array([0.57336113182024961, 
-0.7643120118283262])
-      arg1=0.594809736858
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.31499734364793808, -0.64546172566180404])+(1.-msk_ref)*numpy.array([0.57336113182024961, 
-0.59480973685824345])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.98383676749216908, 0.86440260904723765, 0.73344359288963279, -0.17397728468125617, 
--0.5938265296569154], [-0.58067394710115927, -0.44194706748457513, 0.27967035693140119, 0.074730365268826482, 
-0.69729235073669682], [-0.42381209475255077, -0.32932440466462043, 0.87791272277942922, 0.23848484063958675, 
--0.58763030313364073], [0.58014841638267201, 0.39037463608931611, 0.81425418742887401, -0.10613404447735553, 
-0.51799412509184828]])+(1.-msk_arg0)*numpy.array([[0.61907871601423992, -0.43702600031341965, 0.076002585444592263, 
--0.3435730095806635, -0.028739878240547023], [0.25304979868147393, 0.46903784589121167, 0.020380446238655203, 
--0.16308379559145014, 0.19405790849438431], [0.76223526305495692, 0.31307173153337819, 0.41301691085010406, 
--0.12908655648683509, -0.76242941180774193], [0.87655686472521355, 0.84110825321307225, -0.94080344664271731, 
--0.012273803170802733, 0.89276957902139253]])
-      arg1=0.971999246082
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.97199924608175192, 0.86440260904723765, 0.73344359288963279, -0.17397728468125617, 
--0.5938265296569154], [-0.58067394710115927, -0.44194706748457513, 0.27967035693140119, 0.074730365268826482, 
-0.69729235073669682], [-0.42381209475255077, -0.32932440466462043, 0.87791272277942922, 0.23848484063958675, 
--0.58763030313364073], [0.58014841638267201, 0.39037463608931611, 0.81425418742887401, -0.10613404447735553, 
-0.51799412509184828]])+(1.-msk_ref)*numpy.array([[0.61907871601423992, -0.43702600031341965, 0.076002585444592263, 
--0.3435730095806635, -0.028739878240547023], [0.25304979868147393, 0.46903784589121167, 0.020380446238655203, 
--0.16308379559145014, 0.19405790849438431], [0.76223526305495692, 0.31307173153337819, 0.41301691085010406, 
--0.12908655648683509, -0.76242941180774193], [0.87655686472521355, 0.84110825321307225, -0.94080344664271731, 
--0.012273803170802733, 0.89276957902139253]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.35818675832618307, 0.66251667998983321], [0.44019858334827289, 0.80797363314062398]], 
-[[-0.50875035066170571, 0.1850621473253049], [0.51643121442949136, 0.78957724033603993]], [[0.024803462659992004, 
-0.36090008797224926], [-0.40840720414424614, 0.33362856444192657]], [[-0.91448475681065045, 0.58046892641875081], 
-[0.077155098664183575, 0.28778717742664117]], [[-0.0924686868337945, -0.00030014203367789705], [0.40742006235432759, 
--0.1675532175983081]], [[-0.44504569133159877, -0.54854390964934829], [0.6396789050300129, 
-0.59932475896449144]]])+(1.-msk_arg0)*numpy.array([[[0.41018693806518547, 0.27067191793728607], [-0.67161859940333368, 
-0.4779122230495445]], [[0.39418228244142606, -0.67720841536523468], [0.10786860697717726, -0.49729127516348415]], 
-[[0.85375250311878537, -0.69445649759543193], [0.96360749355350905, 0.58162118701559451]], [[0.79545219381900667, 
--0.59196899563762573], [0.9399625831374443, -0.81064564899123104]], [[0.064606030286278093, -0.067628344496847514], 
-[-0.25937635968343487, -0.31843859488575843]], [[-0.31806705339180064, -0.36476927543472448], [-0.85350703236145065, 
-0.96598062699500153]]])
-      arg1=-0.105078713676
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.35818675832618307, -0.10507871367577559], [-0.10507871367577559, -0.10507871367577559]], 
-[[-0.50875035066170571, -0.10507871367577559], [-0.10507871367577559, -0.10507871367577559]], [[-0.10507871367577559, 
--0.10507871367577559], [-0.40840720414424614, -0.10507871367577559]], [[-0.91448475681065045, -0.10507871367577559], 
-[-0.10507871367577559, -0.10507871367577559]], [[-0.10507871367577559, -0.10507871367577559], [-0.10507871367577559, 
--0.1675532175983081]], [[-0.44504569133159877, -0.54854390964934829], [-0.10507871367577559, 
--0.10507871367577559]]])+(1.-msk_ref)*numpy.array([[[-0.10507871367577559, -0.10507871367577559], [-0.67161859940333368, 
--0.10507871367577559]], [[-0.10507871367577559, -0.67720841536523468], [-0.10507871367577559, -0.49729127516348415]], 
-[[-0.10507871367577559, -0.69445649759543193], [-0.10507871367577559, -0.10507871367577559]], [[-0.10507871367577559, 
--0.59196899563762573], [-0.10507871367577559, -0.81064564899123104]], [[-0.10507871367577559, -0.10507871367577559], 
-[-0.25937635968343487, -0.31843859488575843]], [[-0.31806705339180064, -0.36476927543472448], [-0.85350703236145065, 
--0.10507871367577559]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_float_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.1673905629670811, 0.4823761924849661, 0.26764137614442407, -0.60861245207012837], 
-[0.81207772906574993, -0.19481378571026675, -0.68696933857396947, -0.83490575205488016], [0.91048162991973736, 
--0.011872095205975652, 0.3228228503728281, 0.9846389748649369]], [[0.47865443995711709, -0.052374822305633728, 
-0.55524952723542609, 0.89862533426637237], [0.25000787318830997, -0.83925180949611278, -0.57694886610954743, 
-0.22989642774423347], [-0.99098202123805956, -0.782526244818877, 0.76293059825092313, 0.25321959328143429]]], 
-[[[-0.79558118032687841, -0.65200692367995861, -0.63808693821221318, -0.34957058264418084], [-0.92018607122064067, 
--0.8233939374948176, -0.33026462204352747, 0.4978099437902499], [0.18337802396535441, -0.20296321990869104, 
-0.72854075222480108, -0.59755758924975333]], [[0.51028788055695884, 0.10055515756334144, 0.058927234239805504, 
-0.34214029017102621], [0.20495462641135176, -0.22772555958250384, -0.87845202723777782, -0.97332774435546465], 
-[0.82216539419002954, 0.55513989920065088, 0.14055973874252681, 0.16104095379698213]]], [[[-0.82240318552779113, 
-0.69191749483779263, 0.58090156909485091, -0.53896089228036015], [0.62423861157834315, -0.99300034048831809, 
--0.47207283729237037, -0.5513640483443949], [0.17882096863182828, 0.71019678377287399, -0.064032963761873063, 
--0.85638868871581564]], [[-0.25414488117093148, -0.37884680134470416, 0.84221144197438447, -0.34840820199457445], 
-[0.85176550954687125, 0.79796351752116323, 0.29891957756077292, -0.28400221389535885], [0.5317500607729484, 
-0.13516570259352556, -0.41149304720465829, -0.8735268753644041]]]])+(1.-msk_arg0)*numpy.array([[[[0.0065215397792657281, 
-0.12834491205802556, -0.015697763382179764, -0.25915206650850653], [-0.71979894074050899, -0.92007415267088888, 
--0.12122704948084029, -0.19160146136619138], [-0.93957001515002592, -0.55520004603224482, -0.99293749286636968, 
--0.086066806389853756]], [[0.16051813794273717, 0.43096892110838736, 0.81330510865915295, 0.55946134760795507], 
-[0.79197637782615571, 0.70474500001109952, -0.46497326823377239, -0.68931545158187846], [-0.43158350324336059, 
--0.50574491215569806, 0.23216889455744449, -0.65669272586291272]]], [[[-0.95311899689549695, 0.48656523140642793, 
--0.51145914130788617, -0.97835361498153417], [-0.76029447855376331, 0.8491047318765681, -0.63012145578386503, 
--0.48488780240026674], [0.48001806190712526, 0.85277368570324508, -0.5591782811307755, -0.70829693233712288]], 
-[[-0.1435407512454181, 0.23197093520841183, 0.62351793318353677, -0.26581074459525], [0.049100018055762362, 
--0.59491369065388855, 0.91424634055756115, -0.54961406544295288], [0.35654242968961802, 0.45509805445077878, 
--0.55366692200073819, -0.86384046944165038]]], [[[-0.40639958646080232, -0.51600064003387924, 0.14685762017526827, 
-0.60425898325870597], [0.15549336728605834, 0.61482215207579549, -0.08570713597168611, -0.55072667475672521], 
-[-0.20776110369317746, 0.61201617495459937, 0.0016843880876091788, 0.83913217927551509]], [[0.024554926743849403, 
-0.79386330058413157, -0.50359963472303293, 0.61453042322610285], [0.74107463400371909, 0.49356232454200022, 
--0.83323707925421742, -0.85429233597972942], [-0.029915917258621638, -0.46919535249699251, -0.77590589476588923, 
-0.35658003104386915]]]])
-      arg1=0.225526822619
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.1673905629670811, 0.22552682261871149, 0.22552682261871149, -0.60861245207012837], 
-[0.22552682261871149, -0.19481378571026675, -0.68696933857396947, -0.83490575205488016], [0.22552682261871149, 
--0.011872095205975652, 0.22552682261871149, 0.22552682261871149]], [[0.22552682261871149, -0.052374822305633728, 
-0.22552682261871149, 0.22552682261871149], [0.22552682261871149, -0.83925180949611278, -0.57694886610954743, 
-0.22552682261871149], [-0.99098202123805956, -0.782526244818877, 0.22552682261871149, 0.22552682261871149]]], 
-[[[-0.79558118032687841, -0.65200692367995861, -0.63808693821221318, -0.34957058264418084], [-0.92018607122064067, 
--0.8233939374948176, -0.33026462204352747, 0.22552682261871149], [0.18337802396535441, -0.20296321990869104, 
-0.22552682261871149, -0.59755758924975333]], [[0.22552682261871149, 0.10055515756334144, 0.058927234239805504, 
-0.22552682261871149], [0.20495462641135176, -0.22772555958250384, -0.87845202723777782, -0.97332774435546465], 
-[0.22552682261871149, 0.22552682261871149, 0.14055973874252681, 0.16104095379698213]]], [[[-0.82240318552779113, 
-0.22552682261871149, 0.22552682261871149, -0.53896089228036015], [0.22552682261871149, -0.99300034048831809, 
--0.47207283729237037, -0.5513640483443949], [0.17882096863182828, 0.22552682261871149, -0.064032963761873063, 
--0.85638868871581564]], [[-0.25414488117093148, -0.37884680134470416, 0.22552682261871149, -0.34840820199457445], 
-[0.22552682261871149, 0.22552682261871149, 0.22552682261871149, -0.28400221389535885], [0.22552682261871149, 
-0.13516570259352556, -0.41149304720465829, -0.8735268753644041]]]])+(1.-msk_ref)*numpy.array([[[[0.0065215397792657281, 
-0.12834491205802556, -0.015697763382179764, -0.25915206650850653], [-0.71979894074050899, -0.92007415267088888, 
--0.12122704948084029, -0.19160146136619138], [-0.93957001515002592, -0.55520004603224482, -0.99293749286636968, 
--0.086066806389853756]], [[0.16051813794273717, 0.22552682261871149, 0.22552682261871149, 0.22552682261871149], 
-[0.22552682261871149, 0.22552682261871149, -0.46497326823377239, -0.68931545158187846], [-0.43158350324336059, 
--0.50574491215569806, 0.22552682261871149, -0.65669272586291272]]], [[[-0.95311899689549695, 0.22552682261871149, 
--0.51145914130788617, -0.97835361498153417], [-0.76029447855376331, 0.22552682261871149, -0.63012145578386503, 
--0.48488780240026674], [0.22552682261871149, 0.22552682261871149, -0.5591782811307755, -0.70829693233712288]], 
-[[-0.1435407512454181, 0.22552682261871149, 0.22552682261871149, -0.26581074459525], [0.049100018055762362, 
--0.59491369065388855, 0.22552682261871149, -0.54961406544295288], [0.22552682261871149, 0.22552682261871149, 
--0.55366692200073819, -0.86384046944165038]]], [[[-0.40639958646080232, -0.51600064003387924, 0.14685762017526827, 
-0.22552682261871149], [0.15549336728605834, 0.22552682261871149, -0.08570713597168611, -0.55072667475672521], 
-[-0.20776110369317746, 0.22552682261871149, 0.0016843880876091788, 0.22552682261871149]], [[0.024554926743849403, 
-0.22552682261871149, -0.50359963472303293, 0.22552682261871149], [0.22552682261871149, 0.22552682261871149, 
--0.83323707925421742, -0.85429233597972942], [-0.029915917258621638, -0.46919535249699251, -0.77590589476588923, 
-0.22552682261871149]]]])
+   def test_generalTensorProduct_expandedData_rank0_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(-3.0)
+      arg1=5.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-30.0)+(1.-msk_ref)*numpy.array(-15.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.462133770027)+(1.-msk_arg0)*(0.99788331378)
-      arg1=numpy.array(0.908337733011)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(0.462133770027)+(1.-msk_ref)*(0.908337733011)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.5733632905595285, 0.6185641476203565])+(1.-msk_arg0)*numpy.array([-0.57891950666832592, 
--0.94424966124896148])
-      arg1=numpy.array(0.239828052473)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.5733632905595285, 0.23982805247344641])+(1.-msk_ref)*numpy.array([-0.57891950666832592, 
--0.94424966124896148])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.47489425311934097, 0.48485384309032153, -0.41298654790185441, 0.61628910965045813, 
--0.051589397258991809], [-0.041217574062325291, -0.50403021400870363, -0.51648306146470246, 0.65144771240193, 
-0.13772917467182766], [-0.63237436710276507, -0.36065888688746162, 0.99022504045723836, 0.3420571281089948, 
-0.44702312852105663], [0.93857189128770857, 0.92228180949743788, 0.61695947141749552, 0.068784573992198617, 
--0.17921548948849697]])+(1.-msk_arg0)*numpy.array([[0.39940690921861766, 0.95037421923313525, -0.50038788053702765, 
-0.83968383150250459, -0.053875737417968805], [0.59451864194975013, 0.10567824093127354, -0.30821210325749182, 
--0.79172745325260951, -0.73086269168476448], [-0.3164850272328712, -0.16817246386270313, 0.70363824093253502, 
-0.70929526377113761, -0.44059322736590101], [0.23117511818942793, 0.94921332798368763, 0.22627184611548135, 
--0.24690800725411743, 0.186957271620938]])
-      arg1=numpy.array(-0.949988230451)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338], [-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338], [-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338], [-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338]])+(1.-msk_ref)*numpy.array([[-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338, -0.94998823045081338], [-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338, -0.94998823045081338], [-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338, -0.94998823045081338], [-0.94998823045081338, -0.94998823045081338, -0.94998823045081338, 
--0.94998823045081338, -0.94998823045081338]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.73794431904656754, 0.82355104070281926], [-0.50256159560105451, 0.79946678939692362]], 
-[[0.59921594903633513, 0.34868340968016698], [0.78046383177587297, 0.31486385139022754]], [[-0.7791322226161963, 
--0.69843267401804199], [0.92008699903449398, -0.055041092543384407]], [[0.96946957784223708, 0.25591085275570125], 
-[-0.13557629412674466, -0.67420645331323414]], [[0.0071872882500698676, -0.62002453139022129], [0.40690757676771372, 
--0.87014099230175734]], [[-0.040965080772459306, -0.46099765218654332], [-0.89900694430032946, 
--0.48472600774799046]]])+(1.-msk_arg0)*numpy.array([[[0.80833301324171236, 0.2674952859099724], [0.71850258587004778, 
-0.41103346168326471]], [[0.58859616213957899, 0.10197618336054082], [0.8435722774885317, 0.73753382196389694]], 
-[[0.72709746124741192, -0.86283974734421531], [0.64353494729470673, -0.29573499097342193]], [[0.46098346490248554, 
-0.64150182208622963], [0.012077818122483208, -0.14382055035546171]], [[0.61343195695553732, -0.69238020541238821], 
-[0.36434239110549527, 0.15131686557122093]], [[-0.87222563567199884, 0.16839624403313125], [0.68506532285248589, 
-0.17364984720840893]]])
-      arg1=numpy.array(-0.706034523686)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.73794431904656754, -0.70603452368611097], [-0.70603452368611097, -0.70603452368611097]], 
-[[-0.70603452368611097, -0.70603452368611097], [-0.70603452368611097, -0.70603452368611097]], [[-0.7791322226161963, 
--0.70603452368611097], [-0.70603452368611097, -0.70603452368611097]], [[-0.70603452368611097, -0.70603452368611097], 
-[-0.70603452368611097, -0.70603452368611097]], [[-0.70603452368611097, -0.70603452368611097], [-0.70603452368611097, 
--0.87014099230175734]], [[-0.70603452368611097, -0.70603452368611097], [-0.89900694430032946, 
--0.70603452368611097]]])+(1.-msk_ref)*numpy.array([[[-0.70603452368611097, -0.70603452368611097], [-0.70603452368611097, 
--0.70603452368611097]], [[-0.70603452368611097, -0.70603452368611097], [-0.70603452368611097, -0.70603452368611097]], 
-[[-0.70603452368611097, -0.86283974734421531], [-0.70603452368611097, -0.70603452368611097]], [[-0.70603452368611097, 
--0.70603452368611097], [-0.70603452368611097, -0.70603452368611097]], [[-0.70603452368611097, -0.70603452368611097], 
-[-0.70603452368611097, -0.70603452368611097]], [[-0.87222563567199884, -0.70603452368611097], [-0.70603452368611097, 
--0.70603452368611097]]])
+   def test_generalTensorProduct_expandedData_rank0_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-3.0)+(1-msk_arg0)*(4.0)
+      arg1=numpy.array(-5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(15.0)+(1.-msk_ref)*numpy.array(-20.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_array_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.003572883152234585, -0.83248851627990117, -0.90059434128670612, -0.5545936894966883], 
-[0.18266188687930596, -0.67278350237110263, -0.2259850606001792, 0.64561879250800192], [-0.03375412750509299, 
-0.11592092713001323, -0.54064533415290694, -0.38526693665320977]], [[-0.82574461299081436, 0.6573736905587424, 
--0.0068627178436753145, -0.13869449105647647], [0.67225844133198986, 0.34593382971626685, 0.27340450146826267, 
-0.85160802149470505], [-0.66999148400103103, -0.73276437740140854, 0.63553345158765873, 0.4596323856921023]]], 
-[[[0.075990498475986934, 0.55235878286543105, -0.72626608553487371, 0.43754421080024053], [-0.043789935840196081, 
--0.89420819788538308, 0.0081478352868700199, -0.10555379301806322], [0.054254094230939742, 0.56992485311953622, 
-0.50341369164178551, 0.043647549383019513]], [[-0.77506453965638866, 0.83308193461012325, 0.84523474681226451, 
-0.26073073370767563], [-0.98297600612437219, 0.43720681360806002, -0.41707679842475742, 0.5982142439324114], 
-[-0.36040280392867774, -0.96719255289859274, 0.8904467550533588, 0.84756694743012551]]], [[[-0.64937319147417805, 
-0.58831554830922328, -0.35634380136295274, -0.93930859763560992], [-0.68526847870442387, -0.29528295261473736, 
--0.4018362720052826, 0.51449899473279914], [-0.9621007507783661, 0.38641494717541702, -0.36988826598461011, 
-0.78887945477223465]], [[0.65362213702130934, -0.43446121264100857, -0.32276035405760539, 0.20061429545458442], 
-[-0.033249637634963802, 0.18143851012971979, -0.42348143688431228, -0.28782314589036329], [-0.38241249258873178, 
--0.14806811190300029, 0.51438624882026995, -0.60230580855814098]]]])+(1.-msk_arg0)*numpy.array([[[[0.616531518223294, 
--0.88751393989696181, -0.034786720749853117, 0.41864688199010436], [0.64913739343864263, -0.8394089948517216, 
-0.60394421876557081, 0.99308681736162474], [-0.98479628762575788, -0.58230884762427926, -0.15846222737518278, 
--0.59007729262231923]], [[-0.26546171374352978, 0.6402636132864834, 0.086209503624699035, 0.018751916551482228], 
-[-0.78597083872371343, 0.57140347860684781, 0.085834016205685204, -0.7222132440798763], [0.22271838932504751, 
--0.072533664224724514, 0.041360865451035567, 0.32854489275958554]]], [[[0.43862328123174721, -0.67606573245299528, 
-0.70186633219862271, -0.017264169432553045], [-0.56333048313503276, 0.71392662651080996, -0.68201580778163073, 
--0.43008865680379227], [0.75828789750863845, 0.66146308220586469, -0.43210049831356745, 0.72595395947562369]], 
-[[0.45894812979278532, 0.49822692657848378, 0.45001204304095488, 0.6088261732425917], [0.2596755550790224, -0.6512896582296519, 
--0.014857341412102487, 0.58058436759554821], [-0.057701880520455218, -0.82045427404409166, -0.93527611591253845, 
-0.46524710162916016]]], [[[0.999161503495551, 0.90016356716091117, -0.20055873229761856, 0.93853783232131449], 
-[-0.32761194245027903, -0.72191519213242406, 0.20971406207416754, -0.83636736103877651], [-0.45359327429169061, 
-0.3734719973424343, 0.92418407152812487, -0.29321828753943602]], [[-0.36734823413473694, 0.41689911801280255, 
-0.18137743926892891, -0.21532480896170347], [0.73752810368759891, -0.52161649336255822, 0.5062463901789771, 
--0.8865676309480528], [0.99751166299242722, 0.20175756810895229, 0.11999531795492135, -0.030929223769755376]]]])
-      arg1=numpy.array(-0.279029648621)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.27902964862139656, -0.83248851627990117, -0.90059434128670612, -0.5545936894966883], 
-[-0.27902964862139656, -0.67278350237110263, -0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, 
--0.27902964862139656, -0.54064533415290694, -0.38526693665320977]], [[-0.82574461299081436, -0.27902964862139656, 
--0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, -0.27902964862139656, -0.27902964862139656, 
--0.27902964862139656], [-0.66999148400103103, -0.73276437740140854, -0.27902964862139656, -0.27902964862139656]]], 
-[[[-0.27902964862139656, -0.27902964862139656, -0.72626608553487371, -0.27902964862139656], [-0.27902964862139656, 
--0.89420819788538308, -0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, -0.27902964862139656, 
--0.27902964862139656, -0.27902964862139656]], [[-0.77506453965638866, -0.27902964862139656, -0.27902964862139656, 
--0.27902964862139656], [-0.98297600612437219, -0.27902964862139656, -0.41707679842475742, -0.27902964862139656], 
-[-0.36040280392867774, -0.96719255289859274, -0.27902964862139656, -0.27902964862139656]]], [[[-0.64937319147417805, 
--0.27902964862139656, -0.35634380136295274, -0.93930859763560992], [-0.68526847870442387, -0.29528295261473736, 
--0.4018362720052826, -0.27902964862139656], [-0.9621007507783661, -0.27902964862139656, -0.36988826598461011, 
--0.27902964862139656]], [[-0.27902964862139656, -0.43446121264100857, -0.32276035405760539, -0.27902964862139656], 
-[-0.27902964862139656, -0.27902964862139656, -0.42348143688431228, -0.28782314589036329], [-0.38241249258873178, 
--0.27902964862139656, -0.27902964862139656, -0.60230580855814098]]]])+(1.-msk_ref)*numpy.array([[[[-0.27902964862139656, 
--0.88751393989696181, -0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, -0.8394089948517216, 
--0.27902964862139656, -0.27902964862139656], [-0.98479628762575788, -0.58230884762427926, -0.27902964862139656, 
--0.59007729262231923]], [[-0.27902964862139656, -0.27902964862139656, -0.27902964862139656, -0.27902964862139656], 
-[-0.78597083872371343, -0.27902964862139656, -0.27902964862139656, -0.7222132440798763], [-0.27902964862139656, 
--0.27902964862139656, -0.27902964862139656, -0.27902964862139656]]], [[[-0.27902964862139656, -0.67606573245299528, 
--0.27902964862139656, -0.27902964862139656], [-0.56333048313503276, -0.27902964862139656, -0.68201580778163073, 
--0.43008865680379227], [-0.27902964862139656, -0.27902964862139656, -0.43210049831356745, -0.27902964862139656]], 
-[[-0.27902964862139656, -0.27902964862139656, -0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, 
--0.6512896582296519, -0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, -0.82045427404409166, 
--0.93527611591253845, -0.27902964862139656]]], [[[-0.27902964862139656, -0.27902964862139656, -0.27902964862139656, 
--0.27902964862139656], [-0.32761194245027903, -0.72191519213242406, -0.27902964862139656, -0.83636736103877651], 
-[-0.45359327429169061, -0.27902964862139656, -0.27902964862139656, -0.29321828753943602]], [[-0.36734823413473694, 
--0.27902964862139656, -0.27902964862139656, -0.27902964862139656], [-0.27902964862139656, -0.52161649336255822, 
--0.27902964862139656, -0.8865676309480528], [-0.27902964862139656, -0.27902964862139656, -0.27902964862139656, 
--0.27902964862139656]]]])
+   def test_generalTensorProduct_expandedData_rank1_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-3.0, -2.0, -6.0])+(1.-msk_arg0)*numpy.array([0.0, 2.0, 3.0])
+      arg1=numpy.array([-4.0, -6.0, -1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(30.0)+(1.-msk_ref)*numpy.array(-15.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.52005123366)+(1.-msk_arg0)*(-0.958999719052)
-      arg1=Data(-0.0708731017333,self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.0708731017333)+(1.-msk_ref)*(-0.958999719052)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.034425264741442252, -0.25794327443852638])+(1.-msk_arg0)*numpy.array([0.55328368359564517, 
--0.7545462490824173])
-      arg1=Data(-0.480407268311,self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.48040726831111624, -0.48040726831111624])+(1.-msk_ref)*numpy.array([-0.48040726831111624, 
--0.7545462490824173])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.27849143638905716, -0.81816127855938081, 0.69606228158862371, 0.088242144542835854, 
-0.72827996193193223], [0.22446314701273384, 0.52486458845088135, -0.56328987644667716, 0.96401440200654265, 
--0.45785103334420252], [-0.63305172879430938, 0.35865428691855961, -0.569393829831361, -0.12161223217288253, 
--0.61491458388035025], [-0.79391210001212853, 0.51704887878501915, 0.88799473490616476, 0.31718933752579814, 
-0.33400216210835976]])+(1.-msk_arg0)*numpy.array([[0.88709645024753669, 0.40173931175005051, -0.11125074388760958, 
-0.22067298812180125, -0.14045418809412369], [0.49181919797271267, 0.20790408021387274, 0.48665659642663606, 
--0.73508616755061795, 0.48899223794148439], [0.096462720018308801, 0.99484725712415867, 0.5212821515664845, 
-0.66472970224333516, 0.65483542392463612], [-0.68749624980452695, 0.046250707599986507, 0.30102899693285412, 
--0.74255558225134988, -0.24410315816412154]])
-      arg1=Data(0.882879392343,self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.27849143638905716, -0.81816127855938081, 0.69606228158862371, 0.088242144542835854, 
-0.72827996193193223], [0.22446314701273384, 0.52486458845088135, -0.56328987644667716, 0.8828793923426248, 
--0.45785103334420252], [-0.63305172879430938, 0.35865428691855961, -0.569393829831361, -0.12161223217288253, 
--0.61491458388035025], [-0.79391210001212853, 0.51704887878501915, 0.8828793923426248, 0.31718933752579814, 
-0.33400216210835976]])+(1.-msk_ref)*numpy.array([[0.8828793923426248, 0.40173931175005051, -0.11125074388760958, 
-0.22067298812180125, -0.14045418809412369], [0.49181919797271267, 0.20790408021387274, 0.48665659642663606, 
--0.73508616755061795, 0.48899223794148439], [0.096462720018308801, 0.8828793923426248, 0.5212821515664845, 0.66472970224333516, 
-0.65483542392463612], [-0.68749624980452695, 0.046250707599986507, 0.30102899693285412, -0.74255558225134988, 
--0.24410315816412154]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.1103051566256672, -0.19648336038552183], [0.14839247071435313, -0.40700556791885134]], 
-[[-0.71066715925814417, -0.83992804777778951], [-0.29459995067111877, -0.81474982136381691]], [[-0.32120619159672992, 
-0.17237728295360344], [-0.99051659837636619, -0.62127719001414072]], [[0.95449221429340092, 0.82360801918298709], 
-[0.5318330818379351, -0.70200136085562281]], [[-0.79497949850504268, -0.49818711248341052], [0.034872855252941148, 
-0.11110350266570124]], [[-0.22756949133965776, -0.38114513438097375], [0.2265504559910787, 
-0.50417573362442281]]])+(1.-msk_arg0)*numpy.array([[[-0.94514200940537618, -0.77537348277307783], [0.63636770768104811, 
-0.022128213807887764]], [[0.62061270420486903, -0.31049755146640301], [-0.8668020566821506, 0.075675575276644702]], 
-[[0.53418336467311667, -0.90449984407341888], [0.26414066251050228, 0.4789955701240205]], [[-0.79364470705171386, 
--0.89799383156450374], [-0.73319936648412321, -0.62470096724911706]], [[-0.6611890645524221, 0.0015673250623819968], 
-[0.23300764861253742, 0.49118920845054381]], [[0.77418383504698474, 0.85778927929979853], [-0.23024965361662053, 
--0.13327488849319868]]])
-      arg1=Data(0.60832751022,self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.1103051566256672, -0.19648336038552183], [0.14839247071435313, -0.40700556791885134]], 
-[[-0.71066715925814417, -0.83992804777778951], [-0.29459995067111877, -0.81474982136381691]], [[-0.32120619159672992, 
-0.17237728295360344], [-0.99051659837636619, -0.62127719001414072]], [[0.60832751021962284, 0.60832751021962284], 
-[0.5318330818379351, -0.70200136085562281]], [[-0.79497949850504268, -0.49818711248341052], [0.034872855252941148, 
-0.11110350266570124]], [[-0.22756949133965776, -0.38114513438097375], [0.2265504559910787, 
-0.50417573362442281]]])+(1.-msk_ref)*numpy.array([[[-0.94514200940537618, -0.77537348277307783], [0.60832751021962284, 
-0.022128213807887764]], [[0.60832751021962284, -0.31049755146640301], [-0.8668020566821506, 0.075675575276644702]], 
-[[0.53418336467311667, -0.90449984407341888], [0.26414066251050228, 0.4789955701240205]], [[-0.79364470705171386, 
--0.89799383156450374], [-0.73319936648412321, -0.62470096724911706]], [[-0.6611890645524221, 0.0015673250623819968], 
-[0.23300764861253742, 0.49118920845054381]], [[0.60832751021962284, 0.60832751021962284], [-0.23024965361662053, 
--0.13327488849319868]]])
+   def test_generalTensorProduct_expandedData_rank2_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, -7.0, 0.0], [3.0, -4.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -4.0, -7.0], [-1.0, 
+-6.0, 5.0]])
+      arg1=numpy.array([[0.0, -7.0, 6.0], [-5.0, 7.0, -6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(42.0)+(1.-msk_ref)*numpy.array(-81.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_constData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.076054737410755635, -0.72933991048518987, -0.30374092730161983, -0.96623484277144489], 
-[0.26241998633761421, -0.15173597932636973, -0.13766545284134324, 0.71621334182239549], [-0.35659865699692372, 
-0.67632274098233558, -0.86123445121824838, 0.66935017428129973]], [[-0.23799031523212033, 0.63264528280808618, 
-0.017178832261615318, -0.048992885430059196], [0.26189284562651527, -0.098324061946928332, -0.84769621042425403, 
-0.95598541040480378], [-0.5666491522221766, -0.91220870779368557, 0.044186763535234652, -0.22773955761163256]]], 
-[[[-0.81391008905988627, 0.94134815974881603, -0.71181797425869231, 0.58931705578025761], [0.27434744450909032, 
-0.28236916304783, 0.91023791064138959, 0.68979277440267328], [-0.720953929625195, 0.82242068121848089, 0.27635478930198754, 
--0.95091791893578104]], [[-0.25203499022073439, -0.68568413257267435, -0.29924710780745079, 0.69965309436670231], 
-[-0.53071819612057314, -0.039075518371336493, -0.78639467261753437, -0.92015810457855163], [-0.42005878303025823, 
-0.81364725175999397, -0.51827954915638941, -0.74688756593230687]]], [[[-0.19357706524175278, -0.50241444585477191, 
--0.56723586186680675, -0.83952868893443555], [-0.54123827126039425, 0.41236143271136139, -0.78452155659763756, 
--0.84584424443890915], [0.028483192381424383, 0.27603692837961313, -0.21670730721198272, 0.61097851846601636]], 
-[[0.89295301820646777, 0.16387018597327541, -0.24406195263139097, -0.80560101508762272], [0.078848859642367763, 
-0.0024368363763078715, -0.7783690225546902, -0.50753078234011828], [0.67282794405846125, 0.62648284872330318, 
--0.11026758119417712, 0.92501906189262328]]]])+(1.-msk_arg0)*numpy.array([[[[-0.07611528984507876, -0.47812530896237626, 
--0.25942623749172178, 0.55493254138929649], [-0.22946271939066754, 0.73840875153960073, -0.040983059976963832, 
-0.17588271052000692], [-0.65716349160644816, -0.59828010440641055, 0.4403478331348325, 0.77972835168314947]], 
-[[0.75921663312389209, -0.2784580521221387, -0.74420894259584824, 0.66040845029143846], [0.51546181862148099, 
-0.63248490527752654, -0.61848381965575561, 0.41091980869937217], [0.97079564136341667, -0.59000592327596468, 
--0.27591995603626063, -0.51995789329755993]]], [[[-0.65043240731215168, -0.75853074956668132, 0.53056801836881573, 
--0.025730918022197624], [0.29260532688272711, 0.68060539297868883, -0.59529254688050703, -0.29787661868788451], 
-[0.51479365939487498, 0.37299502583565203, -0.8838683779838945, -0.056242853801407922]], [[0.97478509415738723, 
--0.6088450671522132, -0.3576635906904837, -0.41783175536232986], [-0.96931154248893847, -0.10227178975707663, 
--0.65210198192227931, 0.36335439111687462], [-0.77482950956053132, 0.2204388099696537, -0.067043895866304659, 
--0.6424907017287933]]], [[[0.62323183107976821, 0.88333740893801105, -0.78349398705810236, 0.4997741844267396], 
-[0.64250440974075218, -0.4126927948016792, 0.40236419396109602, 0.82279414179119925], [-0.43795775664127023, 
--0.44903791714375796, -0.45277914810155551, 0.92971899356307874]], [[-0.38092442486833433, 0.0091969461730894153, 
-0.059546651251002336, 0.51321128033471131], [-0.64020797134164131, -0.54586469622389844, -0.82586172506752953, 
-0.095536359033647766], [-0.39064177768555197, -0.74606450260273638, 0.72964185657906278, 0.28114058336683456]]]])
-      arg1=Data(0.971581327027,self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[0.076054737410755635, -0.72933991048518987, -0.30374092730161983, -0.96623484277144489], 
-[0.26241998633761421, -0.15173597932636973, -0.13766545284134324, 0.71621334182239549], [-0.35659865699692372, 
-0.67632274098233558, -0.86123445121824838, 0.66935017428129973]], [[-0.23799031523212033, 0.63264528280808618, 
-0.017178832261615318, -0.048992885430059196], [0.26189284562651527, -0.098324061946928332, -0.84769621042425403, 
-0.95598541040480378], [-0.5666491522221766, -0.91220870779368557, 0.044186763535234652, -0.22773955761163256]]], 
-[[[-0.81391008905988627, 0.94134815974881603, -0.71181797425869231, 0.58931705578025761], [0.27434744450909032, 
-0.28236916304783, 0.91023791064138959, 0.68979277440267328], [-0.720953929625195, 0.82242068121848089, 0.27635478930198754, 
--0.95091791893578104]], [[-0.25203499022073439, -0.68568413257267435, -0.29924710780745079, 0.69965309436670231], 
-[-0.53071819612057314, -0.039075518371336493, -0.78639467261753437, -0.92015810457855163], [-0.42005878303025823, 
-0.81364725175999397, -0.51827954915638941, -0.74688756593230687]]], [[[-0.19357706524175278, -0.50241444585477191, 
--0.56723586186680675, -0.83952868893443555], [-0.54123827126039425, 0.41236143271136139, -0.78452155659763756, 
--0.84584424443890915], [0.028483192381424383, 0.27603692837961313, -0.21670730721198272, 0.61097851846601636]], 
-[[0.89295301820646777, 0.16387018597327541, -0.24406195263139097, -0.80560101508762272], [0.078848859642367763, 
-0.0024368363763078715, -0.7783690225546902, -0.50753078234011828], [0.67282794405846125, 0.62648284872330318, 
--0.11026758119417712, 0.92501906189262328]]]])+(1.-msk_ref)*numpy.array([[[[-0.07611528984507876, -0.47812530896237626, 
--0.25942623749172178, 0.55493254138929649], [-0.22946271939066754, 0.73840875153960073, -0.040983059976963832, 
-0.17588271052000692], [-0.65716349160644816, -0.59828010440641055, 0.4403478331348325, 0.77972835168314947]], 
-[[0.75921663312389209, -0.2784580521221387, -0.74420894259584824, 0.66040845029143846], [0.51546181862148099, 
-0.63248490527752654, -0.61848381965575561, 0.41091980869937217], [0.97079564136341667, -0.59000592327596468, 
--0.27591995603626063, -0.51995789329755993]]], [[[-0.65043240731215168, -0.75853074956668132, 0.53056801836881573, 
--0.025730918022197624], [0.29260532688272711, 0.68060539297868883, -0.59529254688050703, -0.29787661868788451], 
-[0.51479365939487498, 0.37299502583565203, -0.8838683779838945, -0.056242853801407922]], [[0.97158132702703259, 
--0.6088450671522132, -0.3576635906904837, -0.41783175536232986], [-0.96931154248893847, -0.10227178975707663, 
--0.65210198192227931, 0.36335439111687462], [-0.77482950956053132, 0.2204388099696537, -0.067043895866304659, 
--0.6424907017287933]]], [[[0.62323183107976821, 0.88333740893801105, -0.78349398705810236, 0.4997741844267396], 
-[0.64250440974075218, -0.4126927948016792, 0.40236419396109602, 0.82279414179119925], [-0.43795775664127023, 
--0.44903791714375796, -0.45277914810155551, 0.92971899356307874]], [[-0.38092442486833433, 0.0091969461730894153, 
-0.059546651251002336, 0.51321128033471131], [-0.64020797134164131, -0.54586469622389844, -0.82586172506752953, 
-0.095536359033647766], [-0.39064177768555197, -0.74606450260273638, 0.72964185657906278, 0.28114058336683456]]]])
+   def test_generalTensorProduct_expandedData_rank3_array_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-3.0, -5.0, 5.0], [0.0, -3.0, -3.0], [-6.0, -3.0, -3.0], [-2.0, -6.0, 2.0]], [[7.0, -4.0, 
+-7.0], [6.0, 0.0, 0.0], [-3.0, 4.0, -3.0], [-4.0, -2.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -2.0, 2.0], [0.0, 7.0, 
+-3.0], [-7.0, 1.0, -2.0], [0.0, 4.0, 5.0]], [[-5.0, -3.0, 0.0], [-4.0, 5.0, 3.0], [-1.0, -7.0, 3.0], [6.0, 0.0, 7.0]]])
+      arg1=numpy.array([[[4.0, 4.0, 0.0], [5.0, -7.0, -6.0], [3.0, -7.0, -4.0], [7.0, 3.0, 0.0]], [[-5.0, 6.0, -6.0], [-5.0, 
+2.0, 5.0], [5.0, 5.0, -1.0], [1.0, -4.0, 5.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-10.0)+(1.-msk_ref)*numpy.array(-13.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.990889660926)+(1.-msk_arg0)*(0.638489586459)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.021440027298)+(1.-msk_arg1)*(-0.0214498921701)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*(-0.021440027298)+(1.-msk_ref)*(-0.0214498921701)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([-0.61872992563211127, -0.86423515014777452])+(1.-msk_arg0)*numpy.array([-0.99897758157836147, 
--0.24165908859903573])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.810450971302)+(1.-msk_arg1)*(-0.883898898489)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.61872992563211127, -0.86423515014777452])+(1.-msk_ref)*numpy.array([-0.99897758157836147, 
--0.8838988984892151])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.57809290836321137, 0.61131024795215816, -0.16254350429937503, 0.53006905966067874, 
--0.50349392968088313], [-0.6440698094038757, 0.69454530962563577, -0.43817952396547577, 0.66034062958614959, 
--0.80884372520734327], [0.5626787379919842, 0.16259434796566108, 0.36622353383061745, -0.63845551344583629, 
-0.71558766822651343], [-0.50993166335705009, 0.26665578154492375, 0.53861866283245163, 0.77572810173574358, 
-0.74206103313474725]])+(1.-msk_arg0)*numpy.array([[-0.99107016113317403, 0.11075671480706628, 0.12612840476437825, 
-0.61863078266044269, 0.48431224547242668], [-0.25461635661047466, 0.69516433698361269, -0.80164710660605976, 
--0.96382939052091254, 0.69153703842540004], [0.8032011468446667, 0.51162994103725934, 0.84668546301153458, 0.67855415544892428, 
-0.6376083288170471], [-0.30647246938944672, -0.77463775878238184, 0.15940259391181444, 0.16031964275027333, 
-0.052373723628484692]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.530634180494)+(1.-msk_arg1)*(-0.0731398927261)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.57809290836321137, -0.53063418049374378, -0.53063418049374378, -0.53063418049374378, 
--0.53063418049374378], [-0.6440698094038757, -0.53063418049374378, -0.53063418049374378, -0.53063418049374378, 
--0.80884372520734327], [-0.53063418049374378, -0.53063418049374378, -0.53063418049374378, -0.63845551344583629, 
--0.53063418049374378], [-0.53063418049374378, -0.53063418049374378, -0.53063418049374378, -0.53063418049374378, 
--0.53063418049374378]])+(1.-msk_ref)*numpy.array([[-0.99107016113317403, -0.073139892726098443, -0.073139892726098443, 
--0.073139892726098443, -0.073139892726098443], [-0.25461635661047466, -0.073139892726098443, -0.80164710660605976, 
--0.96382939052091254, -0.073139892726098443], [-0.073139892726098443, -0.073139892726098443, -0.073139892726098443, 
--0.073139892726098443, -0.073139892726098443], [-0.30647246938944672, -0.77463775878238184, -0.073139892726098443, 
--0.073139892726098443, -0.073139892726098443]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.62662566987321666, -0.97785256576949564], [0.23964451398543463, -0.074653930720721906]], 
-[[0.14613932634279547, 0.72739918144327609], [-0.70895254628118209, -0.090214115825494767]], [[0.26908483072350275, 
-0.5667442102134046], [0.51818108101124261, -0.097385193899757638]], [[-0.63710850656554974, -0.12166014794356905], 
-[-0.097239376342243888, -0.72150207112372833]], [[-0.85135658001837689, 0.31875222504542222], [-0.18443479840717103, 
--0.6307702882058337]], [[0.88840209950027615, -0.46887359427357933], [0.41615845048775046, 
-0.83151132811969752]]])+(1.-msk_arg0)*numpy.array([[[0.48802916573201882, -0.25179150075753687], [0.75058606225722668, 
--0.919263471295797]], [[-0.85078803369522671, 0.98392726478149406], [-0.030340361270548843, -0.69847653668336207]], 
-[[0.79450282770036718, -0.75478589838619703], [-0.46878127116264201, 0.38353402057374253]], [[-0.1467064753395606, 
--0.039916975353142758], [-0.83351905954235894, -0.35369261795507212]], [[0.64105874338970148, 0.95392297007217874], 
-[-0.49197871404718452, -0.84675547319521094]], [[-0.63511776113388918, 0.11504612909116263], [-0.82667947607167047, 
-0.45816753353235207]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(0.570228458514)+(1.-msk_arg1)*(0.495811657368)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.62662566987321666, -0.97785256576949564], [0.23964451398543463, -0.074653930720721906]], 
-[[0.14613932634279547, 0.57022845851385418], [-0.70895254628118209, -0.090214115825494767]], [[0.26908483072350275, 
-0.5667442102134046], [0.51818108101124261, -0.097385193899757638]], [[-0.63710850656554974, -0.12166014794356905], 
-[-0.097239376342243888, -0.72150207112372833]], [[-0.85135658001837689, 0.31875222504542222], [-0.18443479840717103, 
--0.6307702882058337]], [[0.57022845851385418, -0.46887359427357933], [0.41615845048775046, 
-0.57022845851385418]]])+(1.-msk_ref)*numpy.array([[[0.48802916573201882, -0.25179150075753687], [0.49581165736751709, 
--0.919263471295797]], [[-0.85078803369522671, 0.49581165736751709], [-0.030340361270548843, -0.69847653668336207]], 
-[[0.49581165736751709, -0.75478589838619703], [-0.46878127116264201, 0.38353402057374253]], [[-0.1467064753395606, 
--0.039916975353142758], [-0.83351905954235894, -0.35369261795507212]], [[0.49581165736751709, 0.49581165736751709], 
-[-0.49197871404718452, -0.84675547319521094]], [[-0.63511776113388918, 0.11504612909116263], [-0.82667947607167047, 
-0.45816753353235207]]])
+   def test_generalTensorProduct_expandedData_rank4_array_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, -5.0], [-1.0, 0.0], [-4.0, -2.0]], [[5.0, 0.0], [3.0, 3.0], [-3.0, 0.0]]], [[[7.0, 
+-6.0], [-5.0, 4.0], [-3.0, -2.0]], [[-6.0, -3.0], [5.0, -5.0], [0.0, 4.0]]], [[[1.0, -6.0], [6.0, -5.0], [-1.0, -5.0]], [[-5.0, 
+-5.0], [0.0, 2.0], [-4.0, -5.0]]], [[[3.0, 0.0], [4.0, -4.0], [6.0, 4.0]], [[3.0, -2.0], [0.0, 0.0], [-1.0, 
+-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -2.0], [6.0, -1.0], [5.0, -7.0]], [[3.0, 3.0], [7.0, -5.0], [-2.0, -3.0]]], 
+[[[0.0, -5.0], [5.0, 1.0], [-1.0, 5.0]], [[2.0, 0.0], [-3.0, 1.0], [-1.0, 5.0]]], [[[-2.0, 1.0], [-5.0, 5.0], [1.0, -7.0]], 
+[[0.0, 0.0], [2.0, -1.0], [-5.0, 2.0]]], [[[-1.0, 0.0], [0.0, 0.0], [5.0, -4.0]], [[2.0, 6.0], [1.0, -5.0], [0.0, 6.0]]]])
+      arg1=numpy.array([[[[0.0, 3.0], [-2.0, -2.0], [1.0, 1.0]], [[0.0, -1.0], [-2.0, 4.0], [-2.0, -3.0]]], [[[-7.0, -2.0], 
+[-2.0, -3.0], [3.0, 7.0]], [[1.0, 7.0], [5.0, -5.0], [0.0, 2.0]]], [[[1.0, -3.0], [4.0, 3.0], [2.0, -5.0]], [[7.0, -4.0], [6.0, 
+4.0], [-1.0, -2.0]]], [[[3.0, 3.0], [7.0, -2.0], [-7.0, 6.0]], [[6.0, -7.0], [-5.0, -7.0], [-4.0, -4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(95.0)+(1.-msk_ref)*numpy.array(-71.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_expandedData_rank0(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.74750281784624617, -0.16810413074236652, 0.20491321566244536, -0.67356012035003787], 
-[0.31772253789818516, -0.35715430243987512, 0.15241924652764038, -0.97738248216292445], [-0.55346404106743519, 
-0.42450603037819601, -0.51001429198785986, -0.86305438174304494]], [[0.2102550993356751, -0.12159077685239006, 
-0.2810710925465103, 0.26771615139810101], [0.33821864945390079, -0.4101445566744355, 0.18302102112191521, 0.66164182553960393], 
-[0.15911549848063955, -0.232374949064861, -0.69248034637240941, 0.32538142102794243]]], [[[0.17369006334931103, 
--0.014029816006901896, -0.52212087160686727, -0.29886260222462568], [0.59017180540161807, 0.76006263042563549, 
-0.27009318877981769, -0.65645032190576025], [0.64387813999459609, -0.26057823323071072, 0.80988595315353384, 
-0.66596183778084383]], [[-0.62477851498697512, 0.93258445510388577, -0.96982815821406509, 0.66789797870433265], 
-[-0.69624572930402762, 0.80593925908451625, 0.31046995739879102, 0.11972949289855328], [0.55970746818155703, 
--0.7733626102525597, -0.18865486562809819, -0.51856611048655021]]], [[[0.96340818941619988, -0.16263669505051692, 
--0.78159060340714115, -0.92535685332446582], [-0.71386749338910782, 0.53129450882747764, -0.24287648064530121, 
--0.12452046034889408], [0.87891446407436891, 0.0054348401841746163, 0.30230039171882339, 0.94174537336542774]], 
-[[0.46455818744441468, -0.68657738004796465, 0.88842688515073753, -0.74607666323782773], [0.21447623068514954, 
--0.1116454759172465, -0.2807036222457886, -0.062950816540038534], [-0.42874253139276197, -0.51941738551773486, 
--0.48575320893944385, -0.61951429900930566]]]])+(1.-msk_arg0)*numpy.array([[[[0.64369186385254595, 0.8481169719642494, 
--0.16704691612962619, -0.80504153152296865], [-0.2793021349186966, -0.67077158740474463, 0.89097378085746404, 
--0.7890292463009545], [0.66037859190841042, 0.22743352408456663, 0.91195275727738956, 0.29974658727634296]], 
-[[-0.18198705147094629, 0.87058398804650672, -0.31452429840530094, 0.33689241114523871], [-0.86670614218442843, 
--0.99834601812736801, 0.14948038401416186, 0.97301727980592845], [-0.90466859748611794, 0.84088229266876513, 
-0.77977499163625152, -0.12989656380369863]]], [[[-0.95994738469792229, 0.30947246860769484, -0.92321912041941823, 
-0.15245956593492815], [-0.89799544869786252, 0.28223362758996506, 0.85846999177486771, -0.87647083674033777], 
-[0.21471919709356713, 0.70497308908502121, -0.36837722065914291, 0.51843208878191005]], [[-0.52840754288074843, 
--0.45618921814156166, -0.8830374929111553, 0.45740248927322602], [-0.11569412689515457, -0.19863429186345183, 
--0.15282914387081026, -0.44633295838014164], [0.25332031687368994, -0.46813445792309416, -0.84384770385119756, 
-0.016806455416438215]]], [[[-0.18051459322469965, -0.50301089439637248, -0.62781185314946919, -0.40007293245258246], 
-[-0.47548142248719616, -0.22781247155660211, 0.90269966673649549, 0.70524383707492877], [-0.23146222053393495, 
--0.26427861043705847, 0.74880558221941307, -0.68387223179284606]], [[0.36599886499265866, -0.63511510971353458, 
--0.86357579314386146, 0.036272527918985498], [0.61488686718146202, -0.0029840665914477871, -0.023348354989592535, 
-0.61838170040130724], [-0.70102889151426417, -0.39329490866743155, -0.27387847945258437, -0.65904674572060951]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*(-0.66378266073)+(1.-msk_arg1)*(0.176867584007)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.74750281784624617, -0.66378266073015757, -0.66378266073015757, -0.67356012035003787], 
-[-0.66378266073015757, -0.66378266073015757, -0.66378266073015757, -0.97738248216292445], [-0.66378266073015757, 
--0.66378266073015757, -0.66378266073015757, -0.86305438174304494]], [[-0.66378266073015757, -0.66378266073015757, 
--0.66378266073015757, -0.66378266073015757], [-0.66378266073015757, -0.66378266073015757, -0.66378266073015757, 
--0.66378266073015757], [-0.66378266073015757, -0.66378266073015757, -0.69248034637240941, -0.66378266073015757]]], 
-[[[-0.66378266073015757, -0.66378266073015757, -0.66378266073015757, -0.66378266073015757], [-0.66378266073015757, 
--0.66378266073015757, -0.66378266073015757, -0.66378266073015757], [-0.66378266073015757, -0.66378266073015757, 
--0.66378266073015757, -0.66378266073015757]], [[-0.66378266073015757, -0.66378266073015757, -0.96982815821406509, 
--0.66378266073015757], [-0.69624572930402762, -0.66378266073015757, -0.66378266073015757, -0.66378266073015757], 
-[-0.66378266073015757, -0.7733626102525597, -0.66378266073015757, -0.66378266073015757]]], [[[-0.66378266073015757, 
--0.66378266073015757, -0.78159060340714115, -0.92535685332446582], [-0.71386749338910782, -0.66378266073015757, 
--0.66378266073015757, -0.66378266073015757], [-0.66378266073015757, -0.66378266073015757, -0.66378266073015757, 
--0.66378266073015757]], [[-0.66378266073015757, -0.68657738004796465, -0.66378266073015757, -0.74607666323782773], 
-[-0.66378266073015757, -0.66378266073015757, -0.66378266073015757, -0.66378266073015757], [-0.66378266073015757, 
--0.66378266073015757, -0.66378266073015757, -0.66378266073015757]]]])+(1.-msk_ref)*numpy.array([[[[0.176867584006833, 
-0.176867584006833, -0.16704691612962619, -0.80504153152296865], [-0.2793021349186966, -0.67077158740474463, 0.176867584006833, 
--0.7890292463009545], [0.176867584006833, 0.176867584006833, 0.176867584006833, 0.176867584006833]], [[-0.18198705147094629, 
-0.176867584006833, -0.31452429840530094, 0.176867584006833], [-0.86670614218442843, -0.99834601812736801, 0.14948038401416186, 
-0.176867584006833], [-0.90466859748611794, 0.176867584006833, 0.176867584006833, -0.12989656380369863]]], 
-[[[-0.95994738469792229, 0.176867584006833, -0.92321912041941823, 0.15245956593492815], [-0.89799544869786252, 
-0.176867584006833, 0.176867584006833, -0.87647083674033777], [0.176867584006833, 0.176867584006833, -0.36837722065914291, 
-0.176867584006833]], [[-0.52840754288074843, -0.45618921814156166, -0.8830374929111553, 0.176867584006833], 
-[-0.11569412689515457, -0.19863429186345183, -0.15282914387081026, -0.44633295838014164], [0.176867584006833, 
--0.46813445792309416, -0.84384770385119756, 0.016806455416438215]]], [[[-0.18051459322469965, -0.50301089439637248, 
--0.62781185314946919, -0.40007293245258246], [-0.47548142248719616, -0.22781247155660211, 0.176867584006833, 
-0.176867584006833], [-0.23146222053393495, -0.26427861043705847, 0.176867584006833, -0.68387223179284606]], 
-[[0.176867584006833, -0.63511510971353458, -0.86357579314386146, 0.036272527918985498], [0.176867584006833, 
--0.0029840665914477871, -0.023348354989592535, 0.176867584006833], [-0.70102889151426417, -0.39329490866743155, 
--0.27387847945258437, -0.65904674572060951]]]])
+   def test_generalTensorProduct_expandedData_rank0_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-2.0)+(1-msk_arg0)*(-4.0)
+      arg1=numpy.array([-1.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([2.0, -0.0])+(1.-msk_ref)*numpy.array([4.0, -0.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.842402847791)+(1.-msk_arg0)*(-0.906601537829)
-      arg1=numpy.array([-0.83377825260090077, -0.37098755558629559])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.84240284779105989, -0.84240284779105989])+(1.-msk_ref)*numpy.array([-0.90660153782895114, 
--0.90660153782895114])
+   def test_generalTensorProduct_expandedData_rank1_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([3.0, 5.0, 2.0])+(1.-msk_arg0)*numpy.array([5.0, 2.0, -2.0])
+      arg1=numpy.array([[-5.0, -2.0], [6.0, -7.0], [-2.0, 5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([11.0, -31.0])+(1.-msk_ref)*numpy.array([-9.0, -34.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_array_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.73587872494774897, -0.35869074864056683])+(1.-msk_arg0)*numpy.array([-0.05725872410823718, 
-0.0057164705554890727])
-      arg1=numpy.array([0.0047780275563675811, 0.49289913890538206])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.0047780275563675811, -0.35869074864056683])+(1.-msk_ref)*numpy.array([-0.05725872410823718, 
-0.0057164705554890727])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.619316501359)+(1.-msk_arg0)*(-0.927367468503)
-      arg1=Data(numpy.array([0.96164988567854826, -0.99965820160885044]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.61931650135891236, -0.99965820160885044])+(1.-msk_ref)*numpy.array([-0.92736746850307972, 
--0.99965820160885044])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+   def test_generalTensorProduct_expandedData_rank2_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, 5.0, -2.0], [-4.0, 2.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-7.0, -5.0, 2.0], [-2.0, 2.0, 
+2.0]])
+      arg1=numpy.array([[[2.0, 7.0], [1.0, -1.0], [-6.0, -4.0]], [[-1.0, 0.0], [-6.0, 6.0], [7.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([15.0, 36.0])+(1.-msk_ref)*numpy.array([-27.0, -40.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_constData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.57054897177490749, 0.416033158291641])+(1.-msk_arg0)*numpy.array([0.2617796914222692, 
-0.52730548338587258])
-      arg1=Data(numpy.array([-0.1749926103514714, 0.50274541958270724]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.1749926103514714, 0.416033158291641])+(1.-msk_ref)*numpy.array([-0.1749926103514714, 
-0.50274541958270724])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.941509969475)+(1.-msk_arg0)*(0.242172275309)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.48825215447838954, 0.31988160282319056])+(1.-msk_arg1)*numpy.array([-0.79394085108267487, 
--0.41735178266651318])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([-0.9415099694746234, -0.9415099694746234])+(1.-msk_ref)*numpy.array([-0.79394085108267487, 
--0.41735178266651318])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank1_expandedData_rank1(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([0.47303262562639325, 0.97495522515615107])+(1.-msk_arg0)*numpy.array([-0.077894892719945652, 
--0.80065799694397244])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([0.50527520338016552, 0.63581449187935135])+(1.-msk_arg1)*numpy.array([-0.74058292461788722, 
--0.086272320749931186])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([0.47303262562639325, 0.63581449187935135])+(1.-msk_ref)*numpy.array([-0.74058292461788722, 
--0.80065799694397244])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.837334269788)+(1.-msk_arg0)*(0.367325728134)
-      arg1=numpy.array([[-0.26930492594254019, -0.70861001514038446, 0.17806025039496376, 0.159191588435871, 
-0.61003454305661009], [-0.25923503090502953, -0.54123612211598116, -0.3966703187476599, -0.29699036099242981, 
--0.98304899367567167], [-0.72076074463771977, -0.042036317413082891, 0.9894280426739952, 0.74933245243739166, 
--0.86976425309626104], [-0.38359630193550109, -0.63973145949886545, 0.065755683172032953, -0.78659151700231655, 
-0.054022302543793366]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.83733426978787429, -0.83733426978787429, -0.83733426978787429, -0.83733426978787429, 
--0.83733426978787429], [-0.83733426978787429, -0.83733426978787429, -0.83733426978787429, -0.83733426978787429, 
--0.98304899367567167], [-0.83733426978787429, -0.83733426978787429, -0.83733426978787429, -0.83733426978787429, 
--0.86976425309626104], [-0.83733426978787429, -0.83733426978787429, -0.83733426978787429, -0.83733426978787429, 
--0.83733426978787429]])+(1.-msk_ref)*numpy.array([[-0.26930492594254019, -0.70861001514038446, 0.17806025039496376, 
-0.159191588435871, 0.3673257281343052], [-0.25923503090502953, -0.54123612211598116, -0.3966703187476599, -0.29699036099242981, 
--0.98304899367567167], [-0.72076074463771977, -0.042036317413082891, 0.3673257281343052, 0.3673257281343052, 
--0.86976425309626104], [-0.38359630193550109, -0.63973145949886545, 0.065755683172032953, -0.78659151700231655, 
-0.054022302543793366]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_array_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.75815278427330535, -0.27270067098681383, 0.92671089144236896, -0.31300472038705407, 
--0.12807238722747716], [0.30270779135884918, 0.17037287970182469, -0.94548742814506781, 0.33674841464466998, 
-0.34429077909496564], [0.32867448512654152, 0.67725765973494978, 0.82883690795141973, -0.51356925221380267, 
--0.98912544405895142], [0.045243314512963595, 0.30354161910270827, 0.37200578160967734, -0.61446540812665851, 
-0.8887845172980926]])+(1.-msk_arg0)*numpy.array([[0.064220508829170964, 0.60798774433734448, 0.14851265280731241, 
--0.18471909240954298, 0.16966453665990699], [0.6438102319203407, -0.17704175423046764, 0.61167617222284676, 
--0.34971119244540216, 0.732954609990915], [0.42324588735524404, 0.52133339938382339, -0.92319854295578074, 
--0.40006301004744138, -0.69059244059516223], [-0.24369347835723598, -0.27531182231117768, 0.48239945839028486, 
-0.65638123709950325, 0.90625207376964823]])
-      arg1=numpy.array([[0.448486011755586, -0.67331511464486593, -0.37806173423897516, -0.76306330811466561, 
-0.64755678844523312], [-0.55651629951659332, -0.25795556875335279, 0.80210907489549799, 0.67098877934185142, 
-0.22173805112838307], [-0.73253370512115845, 0.41073071032983166, -0.75720113901150432, -0.45769873369275227, 
-0.61081635920859223], [0.29817938927724419, -0.96429389230646612, 0.55058157545006536, 0.97293629823480265, 
-0.51849193033631291]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[0.448486011755586, -0.67331511464486593, -0.37806173423897516, -0.76306330811466561, 
--0.12807238722747716], [-0.55651629951659332, -0.25795556875335279, -0.94548742814506781, 0.33674841464466998, 
-0.22173805112838307], [-0.73253370512115845, 0.41073071032983166, -0.75720113901150432, -0.51356925221380267, 
--0.98912544405895142], [0.045243314512963595, -0.96429389230646612, 0.37200578160967734, -0.61446540812665851, 
-0.51849193033631291]])+(1.-msk_ref)*numpy.array([[0.064220508829170964, -0.67331511464486593, -0.37806173423897516, 
--0.76306330811466561, 0.16966453665990699], [-0.55651629951659332, -0.25795556875335279, 0.61167617222284676, 
--0.34971119244540216, 0.22173805112838307], [-0.73253370512115845, 0.41073071032983166, -0.92319854295578074, 
--0.45769873369275227, -0.69059244059516223], [-0.24369347835723598, -0.96429389230646612, 0.48239945839028486, 
-0.65638123709950325, 0.51849193033631291]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.0279144982409)+(1.-msk_arg0)*(0.951595483286)
-      arg1=Data(numpy.array([[-0.20525723047497046, 0.44406498165406472, -0.50663137104109146, -0.0094296875132247049, 
-0.21937718429591624], [0.49438849701232823, -0.11336717468638846, -0.53383364430959035, -0.96570584014918293, 
--0.98776298518457151], [0.27459905386577899, 0.60017419185598575, 0.49029888171329694, 0.18988750499695306, 
--0.1529071923195835], [0.7429715793928906, 0.048216176997676996, 0.064002471983303444, -0.27681595931854019, 
--0.91276991952999031]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.20525723047497046, -0.027914498240869223, -0.50663137104109146, -0.027914498240869223, 
--0.027914498240869223], [-0.027914498240869223, -0.11336717468638846, -0.53383364430959035, -0.96570584014918293, 
--0.98776298518457151], [-0.027914498240869223, -0.027914498240869223, -0.027914498240869223, -0.027914498240869223, 
--0.1529071923195835], [-0.027914498240869223, -0.027914498240869223, -0.027914498240869223, -0.27681595931854019, 
--0.91276991952999031]])+(1.-msk_ref)*numpy.array([[-0.20525723047497046, 0.44406498165406472, -0.50663137104109146, 
--0.0094296875132247049, 0.21937718429591624], [0.49438849701232823, -0.11336717468638846, -0.53383364430959035, 
--0.96570584014918293, -0.98776298518457151], [0.27459905386577899, 0.60017419185598575, 0.49029888171329694, 
-0.18988750499695306, -0.1529071923195835], [0.7429715793928906, 0.048216176997676996, 0.064002471983303444, 
--0.27681595931854019, -0.91276991952999031]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_constData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[-0.27792738422539265, 0.23444343102606546, 0.16596951294627971, 0.17766898950827636, 
-0.44478466282317286], [0.55950970958455937, 0.56401204651204973, 0.050792478353166359, 0.028728181883849402, 
-0.86208502573296308], [-0.78403835802146005, 0.82607783691130243, -0.52989316961523825, 0.38521532888490162, 
-0.69440766176590718], [-0.881352053729062, -0.6836179857944733, 0.63676578558739894, 0.76552557956090461, 
-0.40601714876946682]])+(1.-msk_arg0)*numpy.array([[-0.14772602208893515, -0.0057983182761083274, -0.61304420546599636, 
--0.56544454729009885, -0.68792446085798953], [0.10442431600863156, 0.35302531028405149, -0.11187210982409512, 
-0.86478686155186524, -0.73529197897456022], [0.16884780642383035, -0.92809027234487651, 0.65142594109899665, 
-0.63031501470674778, 0.36522828323811884], [0.025123879513389236, 0.031699123872386492, 0.85233492028813496, 
-0.77979846694746491, -0.98379846966027729]])
-      arg1=Data(numpy.array([[0.37595351260671905, 0.23289713071327633, 0.1381696607688716, 0.58924415425351695, 
--0.10594593177841927], [0.95143615675180548, 0.1498326531994012, -0.11091188264571294, -0.37546274438281557, 
--0.51751054960208309], [-0.94743480613147391, 0.32366686928449773, 0.51629592716499451, 0.82465031835797342, 
-0.91991475132391565], [0.35634689986603174, 0.25070301849541243, 0.97452003970305356, -0.6982231861464967, 
-0.75616699116538988]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.27792738422539265, 0.23289713071327633, 0.1381696607688716, 0.17766898950827636, 
--0.10594593177841927], [0.55950970958455937, 0.1498326531994012, -0.11091188264571294, -0.37546274438281557, 
--0.51751054960208309], [-0.94743480613147391, 0.32366686928449773, -0.52989316961523825, 0.38521532888490162, 
-0.69440766176590718], [-0.881352053729062, -0.6836179857944733, 0.63676578558739894, -0.6982231861464967, 
-0.40601714876946682]])+(1.-msk_ref)*numpy.array([[-0.14772602208893515, -0.0057983182761083274, -0.61304420546599636, 
--0.56544454729009885, -0.68792446085798953], [0.10442431600863156, 0.1498326531994012, -0.11187210982409512, 
--0.37546274438281557, -0.73529197897456022], [-0.94743480613147391, -0.92809027234487651, 0.51629592716499451, 
-0.63031501470674778, 0.36522828323811884], [0.025123879513389236, 0.031699123872386492, 0.85233492028813496, 
--0.6982231861464967, -0.98379846966027729]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.515781668257)+(1.-msk_arg0)*(0.051010474103)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.4716970375401659, -0.80091422265073131, -0.91800698021859883, 0.30140546864420625, 
--0.54205382857510109], [0.48468330239335145, 0.8121797189082931, -0.98220426187303023, -0.40905203022702019, 
--0.50401385876780669], [0.10234807318411132, -0.10939804858183644, 0.38168880078563849, 0.88251628140862848, 
--0.44641947628160983], [0.26030678583841205, 0.27045518367821075, -0.70924156725516885, 0.98157706245208898, 
-0.19058740609834102]])+(1.-msk_arg1)*numpy.array([[-0.0137301895429216, 0.27262376862289628, -0.75802785888055135, 
-0.76610381404644157, 0.82096961069783703], [0.75822457249477826, 0.036715084201798254, -0.70869577770163361, 
-0.15654024859068061, 0.0060195628618959773], [0.44714767436082048, 0.92251496067612471, 0.014229541294706438, 
-0.067954707485034627, -0.23637805650611576], [-0.88316013612057875, -0.90332534164080647, 0.7384105903555731, 
--0.70788207126646396, 0.10817711546041053]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.4716970375401659, -0.80091422265073131, -0.91800698021859883, 0.30140546864420625, 
--0.54205382857510109], [0.48468330239335145, 0.51578166825729332, -0.98220426187303023, -0.40905203022702019, 
--0.50401385876780669], [0.10234807318411132, -0.10939804858183644, 0.38168880078563849, 0.51578166825729332, 
--0.44641947628160983], [0.26030678583841205, 0.27045518367821075, -0.70924156725516885, 0.51578166825729332, 
-0.19058740609834102]])+(1.-msk_ref)*numpy.array([[-0.0137301895429216, 0.051010474102958669, -0.75802785888055135, 
-0.051010474102958669, 0.051010474102958669], [0.051010474102958669, 0.036715084201798254, -0.70869577770163361, 
-0.051010474102958669, 0.0060195628618959773], [0.051010474102958669, 0.051010474102958669, 0.014229541294706438, 
-0.051010474102958669, -0.23637805650611576], [-0.88316013612057875, -0.90332534164080647, 0.051010474102958669, 
--0.70788207126646396, 0.051010474102958669]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[0.48958556868934022, -0.92296741349090583, 0.756389119775708, 0.44596469123090987, 
--0.90874783171417195], [-0.87047452465149666, -0.69235262479968007, 0.23455567017497381, -0.60619013984908521, 
--0.26655399724861706], [-0.64015777846090582, -0.3979247904074954, -0.31877828435919642, -0.68896577604504028, 
-0.24470700495248154], [0.87685592432440673, -0.88284138475013219, 0.20116425269259652, 0.97804970927411294, 
--0.55832579222530243]])+(1.-msk_arg0)*numpy.array([[-0.67094039460485955, 0.49329579545631663, -0.25798550389191366, 
--0.3033729691562701, -0.45980255214895571], [-0.43235301323149433, 0.20259735692549641, 0.12957480859334303, 
-0.85504708724770251, 0.21519665932683529], [-0.24828164256662055, 0.31034514326190044, -0.07956987101411972, 
-0.81880318506813232, -0.20052058236191028], [0.53861651708347291, -0.42490387836762156, 0.57690197647907993, 
-0.64952738513893138, 0.87440192262236582]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[-0.65301063658808034, -0.14802803725456748, 0.81648431650889242, -0.55784261539989055, 
--0.67549296495256828], [0.03612600926348386, 0.99386456975773863, 0.066782075434601351, 0.02913802662680598, 
--0.94467733879185878], [0.47858022222548935, 0.21226410302106258, -0.87590896713901212, 0.65125411844531955, 
-0.74715254306631351], [0.70005687768137892, 0.83177496391627193, 0.76507320584197003, 0.018246533054664393, 
--0.15202050754910323]])+(1.-msk_arg1)*numpy.array([[0.73598880205409301, 0.56550154595645119, -0.58776334393975427, 
-0.79848113338752902, 0.73365579037605566], [0.77185086956647275, -0.99151219641012367, 0.034446020166434721, 
--0.83131844368372021, 0.52267028767700108], [0.2688697063427461, -0.096653256973761925, -0.45575687556295952, 
--0.22184422552763849, -0.71388218415699822], [0.081321870523604511, 0.31496661153999228, 0.60830091695300137, 
-0.57070604534672276, -0.28326204332472593]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[-0.65301063658808034, -0.92296741349090583, 0.756389119775708, -0.55784261539989055, 
--0.90874783171417195], [-0.87047452465149666, -0.69235262479968007, 0.066782075434601351, -0.60619013984908521, 
--0.94467733879185878], [-0.64015777846090582, -0.3979247904074954, -0.87590896713901212, -0.68896577604504028, 
-0.24470700495248154], [0.70005687768137892, -0.88284138475013219, 0.20116425269259652, 0.018246533054664393, 
--0.55832579222530243]])+(1.-msk_ref)*numpy.array([[-0.67094039460485955, 0.49329579545631663, -0.58776334393975427, 
--0.3033729691562701, -0.45980255214895571], [-0.43235301323149433, -0.99151219641012367, 0.034446020166434721, 
--0.83131844368372021, 0.21519665932683529], [-0.24828164256662055, -0.096653256973761925, -0.45575687556295952, 
--0.22184422552763849, -0.71388218415699822], [0.081321870523604511, -0.42490387836762156, 0.57690197647907993, 
-0.57070604534672276, -0.28326204332472593]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.456000460704)+(1.-msk_arg0)*(-0.167260028739)
-      arg1=numpy.array([[[0.13937174506790306, 0.84327753669433614], [0.85706887732388015, 0.071511216613709516]], 
-[[-0.086281789429336841, 0.29597330487755391], [-0.8635381630195289, 0.86708569963266102]], [[-0.5640393169443878, 
-0.30046483949713854], [0.30853449887358297, 0.74430016909887087]], [[-0.15438015325021492, 0.37472319156518563], 
-[0.27825695617780677, 0.73412418348958575]], [[0.48563694458782325, 0.36987117832247174], [-0.46961645536814811, 
--0.81933933145747218]], [[-0.9252348288823391, -0.8922391966247214], [0.61619531785506343, 0.84230576327925855]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.45600046070363742, -0.45600046070363742], [-0.45600046070363742, -0.45600046070363742]], 
-[[-0.45600046070363742, -0.45600046070363742], [-0.8635381630195289, -0.45600046070363742]], [[-0.5640393169443878, 
--0.45600046070363742], [-0.45600046070363742, -0.45600046070363742]], [[-0.45600046070363742, -0.45600046070363742], 
-[-0.45600046070363742, -0.45600046070363742]], [[-0.45600046070363742, -0.45600046070363742], [-0.46961645536814811, 
--0.81933933145747218]], [[-0.9252348288823391, -0.8922391966247214], [-0.45600046070363742, 
--0.45600046070363742]]])+(1.-msk_ref)*numpy.array([[[-0.1672600287386532, -0.1672600287386532], [-0.1672600287386532, 
--0.1672600287386532]], [[-0.1672600287386532, -0.1672600287386532], [-0.8635381630195289, -0.1672600287386532]], 
-[[-0.5640393169443878, -0.1672600287386532], [-0.1672600287386532, -0.1672600287386532]], [[-0.1672600287386532, 
--0.1672600287386532], [-0.1672600287386532, -0.1672600287386532]], [[-0.1672600287386532, -0.1672600287386532], 
-[-0.46961645536814811, -0.81933933145747218]], [[-0.9252348288823391, -0.8922391966247214], [-0.1672600287386532, 
--0.1672600287386532]]])
+   def test_generalTensorProduct_expandedData_rank3_array_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[6.0, 2.0, -3.0], [3.0, -7.0, -2.0], [6.0, -5.0, -2.0], [-1.0, -5.0, -1.0]], [[-7.0, -2.0, 
+-4.0], [5.0, -5.0, -2.0], [4.0, -3.0, 2.0], [2.0, 0.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -5.0, 7.0], [5.0, 0.0, -6.0], 
+[-1.0, 2.0, -5.0], [-5.0, 1.0, 0.0]], [[-3.0, 0.0, -2.0], [-3.0, 5.0, 0.0], [5.0, -2.0, 0.0], [0.0, 5.0, 2.0]]])
+      arg1=numpy.array([[[[-2.0, 7.0], [4.0, -1.0], [-7.0, 1.0]], [[-3.0, 0.0], [-2.0, -2.0], [-4.0, -1.0]], [[6.0, 6.0], 
+[-6.0, -4.0], [-2.0, 6.0]], [[0.0, 7.0], [4.0, -2.0], [7.0, 1.0]]], [[[-3.0, -1.0], [-6.0, -6.0], [4.0, 6.0]], [[0.0, -1.0], 
+[0.0, -1.0], [5.0, 0.0]], [[1.0, -4.0], [1.0, 2.0], [-4.0, 5.0]], [[1.0, -3.0], [7.0, 0.0], [0.0, 4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([75.0, 100.0])+(1.-msk_ref)*numpy.array([-29.0, -76.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_array_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.50902118805999708, -0.18317307708008745], [0.10634106921471487, -0.45135218679343447]], 
-[[0.73113512494233701, 0.16943536778692336], [-0.89040735378621916, 0.76655626991914971]], [[-0.46819770910180702, 
--0.19921185032515232], [-0.47207487512874158, 0.42589679438989436]], [[0.48135158601495442, -0.99765967147455603], 
-[0.30932976351634345, -0.029823241097793884]], [[0.56168625607256217, 0.29967354622543074], [0.33181448671884461, 
--0.043048866655934992]], [[0.45605232382230443, 0.57174744726102467], [-0.82577795333017545, 
--0.94230549246517747]]])+(1.-msk_arg0)*numpy.array([[[-0.46031607927851792, 0.23300367312345105], [0.85507510560237776, 
-0.16191785677978521]], [[0.97738994108064192, -0.87426038087742031], [-0.49508150161214437, 0.37811213070530836]], 
-[[0.67965742738835355, -0.85732509592015749], [-0.010796832324976302, -0.89825123009871333]], [[0.78515665696733361, 
--0.3438282520674607], [0.94790509512478405, -0.3378903605036776]], [[-0.37250074683817957, 0.81121471125884814], 
-[-0.59258769261980171, -0.67826483726896925]], [[-0.43350164058606944, -0.30490510988148256], [0.30060848608294211, 
-0.1564514970888804]]])
-      arg1=numpy.array([[[-0.055628046074645887, 0.28723878423994198], [0.96421895538402325, -0.25542888003843944]], 
-[[0.2814582475473506, -0.24188293210233724], [-0.040754722253135922, -0.1419313705266001]], [[-0.51293930277570521, 
--0.73451472898444914], [0.93564899737256568, -0.90101279293833469]], [[0.97020682652671342, -0.050083267760595573], 
-[0.66526331308884856, 0.24803233515044121]], [[-0.45338256545319178, -0.17053125666171609], [0.80912438817255627, 
-0.78524510835846861]], [[0.82393877660358239, 0.51396256792410622], [-0.49877066821748661, -0.088871848844500168]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.055628046074645887, -0.18317307708008745], [0.10634106921471487, -0.45135218679343447]], 
-[[0.2814582475473506, -0.24188293210233724], [-0.89040735378621916, -0.1419313705266001]], [[-0.51293930277570521, 
--0.73451472898444914], [-0.47207487512874158, -0.90101279293833469]], [[0.48135158601495442, -0.99765967147455603], 
-[0.30932976351634345, -0.029823241097793884]], [[-0.45338256545319178, -0.17053125666171609], [0.33181448671884461, 
--0.043048866655934992]], [[0.45605232382230443, 0.51396256792410622], [-0.82577795333017545, 
--0.94230549246517747]]])+(1.-msk_ref)*numpy.array([[[-0.46031607927851792, 0.23300367312345105], [0.85507510560237776, 
--0.25542888003843944]], [[0.2814582475473506, -0.87426038087742031], [-0.49508150161214437, -0.1419313705266001]], 
-[[-0.51293930277570521, -0.85732509592015749], [-0.010796832324976302, -0.90101279293833469]], [[0.78515665696733361, 
--0.3438282520674607], [0.66526331308884856, -0.3378903605036776]], [[-0.45338256545319178, -0.17053125666171609], 
-[-0.59258769261980171, -0.67826483726896925]], [[-0.43350164058606944, -0.30490510988148256], [-0.49877066821748661, 
--0.088871848844500168]]])
+   def test_generalTensorProduct_expandedData_rank0_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-5.0)
+      arg1=numpy.array([[3.0, -3.0, 2.0, 1.0, -7.0], [2.0, 0.0, -1.0, 5.0, 6.0], [-6.0, 6.0, 7.0, 0.0, -3.0], [-5.0, 7.0, -6.0, 
+2.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 
+0.0, -0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-15.0, 15.0, -10.0, -5.0, 35.0], [-10.0, -0.0, 5.0, -25.0, -30.0], [30.0, 
+-30.0, -35.0, -0.0, 15.0], [25.0, -35.0, 30.0, -10.0, -0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.679107826024)+(1.-msk_arg0)*(-0.113570924181)
-      arg1=Data(numpy.array([[[0.33329203989625777, -0.91954307756499953], [0.34450633089160454, -0.10471102182382985]], 
-[[-0.41494252311686997, -0.28271397592119341], [-0.82409222082895606, 0.72533393026724324]], [[-0.032671245195534437, 
--0.27677672184833524], [0.65217184883685819, 0.32602715966453233]], [[-0.2205689520694718, -0.15326419961899562], 
-[0.61091020137658147, 0.61190314349809927]], [[0.95970298571009693, -0.010972522520193762], [-0.11566440298399749, 
-0.23492362121363808]], [[0.07360441194930134, -0.13172715363179521], [0.9928059463094443, 
-0.21564006861807883]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.67910782602413255, -0.91954307756499953], [-0.67910782602413255, -0.67910782602413255]], 
-[[-0.67910782602413255, -0.67910782602413255], [-0.82409222082895606, -0.67910782602413255]], [[-0.67910782602413255, 
--0.67910782602413255], [-0.67910782602413255, -0.67910782602413255]], [[-0.67910782602413255, -0.67910782602413255], 
-[-0.67910782602413255, -0.67910782602413255]], [[-0.67910782602413255, -0.67910782602413255], [-0.67910782602413255, 
--0.67910782602413255]], [[-0.67910782602413255, -0.67910782602413255], [-0.67910782602413255, 
--0.67910782602413255]]])+(1.-msk_ref)*numpy.array([[[-0.11357092418082804, -0.91954307756499953], [-0.11357092418082804, 
--0.11357092418082804]], [[-0.41494252311686997, -0.28271397592119341], [-0.82409222082895606, -0.11357092418082804]], 
-[[-0.11357092418082804, -0.27677672184833524], [-0.11357092418082804, -0.11357092418082804]], [[-0.2205689520694718, 
--0.15326419961899562], [-0.11357092418082804, -0.11357092418082804]], [[-0.11357092418082804, -0.11357092418082804], 
-[-0.11566440298399749, -0.11357092418082804]], [[-0.11357092418082804, -0.13172715363179521], [-0.11357092418082804, 
--0.11357092418082804]]])
+   def test_generalTensorProduct_expandedData_rank1_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-4.0, 0.0, 5.0])+(1.-msk_arg0)*numpy.array([3.0, 3.0, 0.0])
+      arg1=numpy.array([[[7.0, 5.0, -7.0, -6.0, -1.0], [-6.0, 4.0, -5.0, 3.0, -2.0], [-5.0, 2.0, -2.0, -7.0, 3.0], [5.0, -1.0, 
+5.0, -2.0, 3.0]], [[7.0, -6.0, 7.0, -4.0, -7.0], [-6.0, 6.0, 6.0, 3.0, 4.0], [-4.0, -7.0, 4.0, 3.0, -1.0], [4.0, -2.0, -4.0, 
+6.0, 3.0]], [[3.0, -5.0, -7.0, 3.0, -5.0], [0.0, 5.0, 7.0, 2.0, -1.0], [-5.0, 4.0, -2.0, 0.0, -6.0], [-6.0, 4.0, 3.0, -1.0, 
+4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-13.0, -45.0, -7.0, 39.0, -21.0], [24.0, 9.0, 55.0, -2.0, 3.0], [-5.0, 12.0, -2.0, 28.0, 
+-42.0], [-50.0, 24.0, -5.0, 3.0, 8.0]])+(1.-msk_ref)*numpy.array([[42.0, -3.0, 0.0, -30.0, -24.0], [-36.0, 30.0, 3.0, 18.0, 
+6.0], [-27.0, -15.0, 6.0, -12.0, 6.0], [27.0, -9.0, 3.0, 12.0, 18.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_constData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[-0.25214048068745654, 0.052389293687070237], [-0.8949647052646803, -0.27585834032294332]], 
-[[0.22184475555399641, -0.56715818139855378], [0.77652646549636484, 0.31123320652071751]], [[0.47345789745894407, 
-0.93447830642024599], [-0.76094394758857975, -0.51989943557816498]], [[-0.058824415433247124, 0.68066678084345833], 
-[-0.4830602950457461, -0.39110225661972353]], [[0.059813400688766283, -0.79442499243782705], [-0.47324005118901247, 
--0.9076200020735361]], [[0.67127181461617536, -0.091174963242821816], [-0.59972841400200205, 
-0.22232690585568493]]])+(1.-msk_arg0)*numpy.array([[[0.35031203271240385, -0.030671131974060462], [-0.35757486391234861, 
--0.65170562549894928]], [[-0.9227500536624742, 0.99582109272603003], [-0.55773348830849478, -0.95042016392778961]], 
-[[0.33426027164849459, 0.52038109936391019], [-0.70292077134722342, 0.52842010844803444]], [[0.38671137833529357, 
--0.60570395854628201], [0.42787075706226285, -0.29013024206172378]], [[-0.63227960362939917, -0.079247152879650562], 
-[-0.072590521312945633, 0.12814260574044756]], [[-0.20752759218194905, -0.11683262699701902], [-0.068631605741806379, 
--0.58348069043497119]]])
-      arg1=Data(numpy.array([[[-0.15981045445506359, 0.43654189802682497], [-0.88239882561497707, -0.25366011510066722]], 
-[[-0.83386402274848104, 0.59235390541543764], [-0.80971771629326095, 0.068403152150757096]], [[0.61564510864046884, 
-0.63119731998001893], [0.02740626311603056, 0.35235715499437892]], [[0.55802775336809862, 0.029925210418192405], 
-[-0.070883024844496711, -0.25458667417329606]], [[0.50988304366259896, 0.87819033789609091], [-0.76742563926932972, 
--0.52216527308067895]], [[-0.99883361025339701, -0.77982220168608851], [0.95362183785557164, 
-0.28776070357810934]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.25214048068745654, 0.052389293687070237], [-0.8949647052646803, -0.27585834032294332]], 
-[[-0.83386402274848104, -0.56715818139855378], [-0.80971771629326095, 0.068403152150757096]], [[0.47345789745894407, 
-0.63119731998001893], [-0.76094394758857975, -0.51989943557816498]], [[-0.058824415433247124, 0.029925210418192405], 
-[-0.4830602950457461, -0.39110225661972353]], [[0.059813400688766283, -0.79442499243782705], [-0.76742563926932972, 
--0.9076200020735361]], [[-0.99883361025339701, -0.77982220168608851], [-0.59972841400200205, 
-0.22232690585568493]]])+(1.-msk_ref)*numpy.array([[[-0.15981045445506359, -0.030671131974060462], [-0.88239882561497707, 
--0.65170562549894928]], [[-0.9227500536624742, 0.59235390541543764], [-0.80971771629326095, -0.95042016392778961]], 
-[[0.33426027164849459, 0.52038109936391019], [-0.70292077134722342, 0.35235715499437892]], [[0.38671137833529357, 
--0.60570395854628201], [-0.070883024844496711, -0.29013024206172378]], [[-0.63227960362939917, -0.079247152879650562], 
-[-0.76742563926932972, -0.52216527308067895]], [[-0.99883361025339701, -0.77982220168608851], [-0.068631605741806379, 
--0.58348069043497119]]])
+   def test_generalTensorProduct_expandedData_rank2_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-3.0, 3.0, -7.0], [-3.0, 4.0, -4.0]])+(1.-msk_arg0)*numpy.array([[-4.0, -4.0, -3.0], [4.0, 
+1.0, 2.0]])
+      arg1=numpy.array([[[[-3.0, -6.0, -6.0, 0.0, 4.0], [-4.0, 1.0, 7.0, 2.0, 4.0], [0.0, 3.0, -3.0, -6.0, -4.0], [1.0, 0.0, 
+0.0, 4.0, 0.0]], [[0.0, -5.0, -6.0, -4.0, 1.0], [0.0, 0.0, -7.0, -2.0, -6.0], [-6.0, -6.0, -2.0, -4.0, 4.0], [1.0, 3.0, -6.0, 
+0.0, -2.0]], [[6.0, -5.0, -7.0, -5.0, 5.0], [-7.0, -1.0, 3.0, 2.0, 5.0], [-7.0, -2.0, -2.0, -6.0, 6.0], [5.0, 4.0, 7.0, -5.0, 
+-5.0]]], [[[5.0, 0.0, -1.0, -1.0, 5.0], [6.0, -3.0, -7.0, -7.0, -4.0], [-4.0, -1.0, 1.0, -6.0, -2.0], [-1.0, -5.0, 3.0, 3.0, 
+-6.0]], [[-3.0, 2.0, -6.0, 7.0, 1.0], [1.0, -7.0, 6.0, 5.0, 7.0], [-2.0, -3.0, -6.0, 6.0, -6.0], [-3.0, 6.0, -7.0, 1.0, 1.0]], 
+[[1.0, 0.0, 0.0, -3.0, -2.0], [-1.0, -6.0, 2.0, -3.0, -7.0], [0.0, 5.0, -3.0, -4.0, 6.0], [0.0, 6.0, 6.0, 4.0, -6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-64.0, 46.0, 28.0, 66.0, -47.0], [51.0, 9.0, -26.0, 27.0, 3.0], [35.0, -42.0, 2.0, 106.0, 
+-60.0], [-44.0, -4.0, -128.0, 2.0, 75.0]])+(1.-msk_ref)*numpy.array([[13.0, 61.0, 59.0, 28.0, -18.0], [60.0, -32.0, -27.0, 
+-35.0, -30.0], [27.0, 21.0, 18.0, 32.0, -20.0], [-30.0, -26.0, 20.0, 20.0, -12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.114792422685)+(1.-msk_arg0)*(-0.785613561753)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[-0.3308745126288275, 0.40363749209476207], [0.71828623724867402, -0.6355958244786617]], 
-[[-0.73314814963148223, 0.6693898248186656], [0.9888546361728856, -0.57987104287119529]], [[-0.64946657181007827, 
-0.33326711353828786], [-0.39892579649162974, 0.38714634266813563]], [[0.51779091113984754, 0.93508546917815383], 
-[-0.15673085305270607, 0.86475721978994069]], [[0.31256147138595969, 0.83354861625901422], [-0.36251535352822462, 
-0.46543041668694785]], [[0.25756344688370003, 0.43790014025549251], [0.75555702045698303, 
-0.76267793272936046]]])+(1.-msk_arg1)*numpy.array([[[0.85118686570877067, 0.57467342820461553], [0.84658625434126344, 
--0.72178766140974959]], [[0.19328282140220798, 0.065066104776074996], [0.5439633716390091, 0.18315925686668888]], 
-[[0.97577415800903644, 0.97309035476408812], [-0.37530219846764346, -0.0024991607999924614]], [[0.21722963310672871, 
-0.0906245651131381], [-0.67755086532158559, 0.27698112112210249]], [[0.2936457534156538, 0.87538922827156451], 
-[0.88543814629738971, -0.56496547293896393]], [[0.20165980916866411, 0.053935389314735405], [0.63176295036156516, 
-0.095597905287107432]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[-0.3308745126288275, -0.11479242268464551], [-0.11479242268464551, -0.6355958244786617]], 
-[[-0.73314814963148223, -0.11479242268464551], [-0.11479242268464551, -0.57987104287119529]], [[-0.64946657181007827, 
--0.11479242268464551], [-0.39892579649162974, -0.11479242268464551]], [[-0.11479242268464551, -0.11479242268464551], 
-[-0.15673085305270607, -0.11479242268464551]], [[-0.11479242268464551, -0.11479242268464551], [-0.36251535352822462, 
--0.11479242268464551]], [[-0.11479242268464551, -0.11479242268464551], [-0.11479242268464551, 
--0.11479242268464551]]])+(1.-msk_ref)*numpy.array([[[-0.78561356175317187, -0.78561356175317187], [-0.78561356175317187, 
--0.78561356175317187]], [[-0.78561356175317187, -0.78561356175317187], [-0.78561356175317187, -0.78561356175317187]], 
-[[-0.78561356175317187, -0.78561356175317187], [-0.78561356175317187, -0.78561356175317187]], [[-0.78561356175317187, 
--0.78561356175317187], [-0.78561356175317187, -0.78561356175317187]], [[-0.78561356175317187, -0.78561356175317187], 
-[-0.78561356175317187, -0.78561356175317187]], [[-0.78561356175317187, -0.78561356175317187], [-0.78561356175317187, 
--0.78561356175317187]]])
+   def test_generalTensorProduct_expandedData_rank0_array_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(7.0)+(1-msk_arg0)*(6.0)
+      arg1=numpy.array([[[-5.0, 5.0], [3.0, 0.0]], [[-2.0, -2.0], [6.0, 3.0]], [[0.0, 1.0], [4.0, -4.0]], [[1.0, -4.0], [7.0, 
+0.0]], [[5.0, 4.0], [-2.0, -6.0]], [[6.0, 2.0], [2.0, 3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-35.0, 35.0], [21.0, 0.0]], [[-14.0, -14.0], [42.0, 21.0]], [[0.0, 7.0], [28.0, -28.0]], 
+[[7.0, -28.0], [49.0, 0.0]], [[35.0, 28.0], [-14.0, -42.0]], [[42.0, 14.0], [14.0, 21.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 
+30.0], [18.0, 0.0]], [[-12.0, -12.0], [36.0, 18.0]], [[0.0, 6.0], [24.0, -24.0]], [[6.0, -24.0], [42.0, 0.0]], [[30.0, 24.0], 
+[-12.0, -36.0]], [[36.0, 12.0], [12.0, 18.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank3_expandedData_rank3(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[0.70599769281292724, -0.62682631245719378], [0.16240992398018328, -0.30461390116360687]], 
-[[-0.66439851208005218, 0.46530295777225938], [-0.36745772150478584, -0.27272767458596392]], [[0.88754891209809683, 
-0.46974918792912979], [0.73864747310244594, -0.85151003919293977]], [[-0.21533682034437662, -0.65561908253956425], 
-[-0.026146585653293197, 0.37445084878522317]], [[-0.65005710266960848, -0.33540146795034365], [-0.037980818728829968, 
--0.30364243761179033]], [[0.31272912236735406, 0.16550088425772569], [-0.89170233888417894, 
--0.060949202001112202]]])+(1.-msk_arg0)*numpy.array([[[0.03286881168483613, 0.67897982415725555], [0.86674048211321231, 
--0.7715805177911832]], [[0.57397638092698355, -0.46435045979941525], [-0.29987021473606057, 0.87217680942595788]], 
-[[0.52593281930871338, -0.22040994139329739], [0.12885850657281939, 0.51524829386818638]], [[-0.81786035801465506, 
--0.69917257706297731], [-0.46237380435922737, -0.056518365979367546]], [[0.57018001026326126, 0.31171572340356191], 
-[0.55939816262581243, -0.26197875119045522]], [[0.0072844237960489888, 0.64459875521538446], [-0.40207692212912938, 
-0.64490365474220956]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[0.70453547216543, -0.12231449560661978], [0.29420749022638937, -0.93357418232171252]], 
-[[-0.02053427845359046, -0.28702503130392953], [0.52220540192354958, 0.92383968724995458]], [[0.97144381493916687, 
--0.60696351581127272], [0.68922464624268009, -0.49710998060183753]], [[0.58241855005131193, 0.604412405951545], 
-[-0.43975941517157091, 0.20218472702182466]], [[-0.2257267484009271, 0.35309477884304297], [0.30535733178859248, 
-0.63998611311098386]], [[0.29815046744726392, -0.4864327918438307], [0.65496056346310016, 
-0.41955651331429822]]])+(1.-msk_arg1)*numpy.array([[[-0.38605355398936614, 0.78789415276076147], [0.89324602443799805, 
--0.13988696926738986]], [[0.74453111726612797, 0.03448364798448833], [-0.72607655515611658, -0.97274438747404868]], 
-[[0.97026316417312142, 0.0037806894980239036], [0.95950452063026637, -0.021164822335755895]], [[-0.35203247359910783, 
--0.74465227741444173], [0.7287982213029951, 0.19487117344269222]], [[0.29936219789706842, -0.34653236125488474], 
-[0.89506213449943783, 0.96596505828086432]], [[0.27105399968338606, -0.076712170200837315], [0.73041163689677102, 
-0.20392573047329665]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[0.70453547216543, -0.62682631245719378], [0.16240992398018328, -0.93357418232171252]], 
-[[-0.66439851208005218, -0.28702503130392953], [-0.36745772150478584, -0.27272767458596392]], [[0.88754891209809683, 
--0.60696351581127272], [0.68922464624268009, -0.85151003919293977]], [[-0.21533682034437662, -0.65561908253956425], 
-[-0.43975941517157091, 0.20218472702182466]], [[-0.65005710266960848, -0.33540146795034365], [-0.037980818728829968, 
--0.30364243761179033]], [[0.29815046744726392, -0.4864327918438307], [-0.89170233888417894, 
--0.060949202001112202]]])+(1.-msk_ref)*numpy.array([[[-0.38605355398936614, 0.67897982415725555], [0.86674048211321231, 
--0.7715805177911832]], [[0.57397638092698355, -0.46435045979941525], [-0.72607655515611658, -0.97274438747404868]], 
-[[0.52593281930871338, -0.22040994139329739], [0.12885850657281939, -0.021164822335755895]], [[-0.81786035801465506, 
--0.74465227741444173], [-0.46237380435922737, -0.056518365979367546]], [[0.29936219789706842, -0.34653236125488474], 
-[0.55939816262581243, -0.26197875119045522]], [[0.0072844237960489888, -0.076712170200837315], [-0.40207692212912938, 
-0.20392573047329665]]])
+   def test_generalTensorProduct_expandedData_rank1_array_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-3.0, 2.0, -1.0])+(1.-msk_arg0)*numpy.array([6.0, 6.0, 7.0])
+      arg1=numpy.array([[[[-3.0, 2.0], [3.0, -6.0]], [[-5.0, 6.0], [2.0, 7.0]], [[-6.0, 1.0], [1.0, -5.0]], [[-3.0, -3.0], 
+[7.0, -4.0]], [[-1.0, -5.0], [-3.0, 1.0]], [[-3.0, -7.0], [7.0, 0.0]]], [[[5.0, 7.0], [4.0, -2.0]], [[-4.0, 7.0], [0.0, 6.0]], 
+[[1.0, 3.0], [0.0, -2.0]], [[6.0, -5.0], [-4.0, 0.0]], [[-1.0, -7.0], [0.0, 2.0]], [[6.0, -4.0], [-1.0, -5.0]]], [[[2.0, 7.0], 
+[7.0, 1.0]], [[-1.0, -5.0], [4.0, 6.0]], [[5.0, -7.0], [-5.0, 7.0]], [[4.0, -2.0], [-1.0, 0.0]], [[7.0, -6.0], [2.0, -4.0]], 
+[[-5.0, -7.0], [0.0, 2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[17.0, 1.0], [-8.0, 13.0]], [[8.0, 1.0], [-10.0, -15.0]], [[15.0, 10.0], [2.0, 4.0]], [[17.0, 
+1.0], [-28.0, 12.0]], [[-6.0, 7.0], [7.0, 5.0]], [[26.0, 20.0], [-23.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[26.0, 103.0], 
+[91.0, -41.0]], [[-61.0, 43.0], [40.0, 120.0]], [[5.0, -25.0], [-29.0, 7.0]], [[46.0, -62.0], [11.0, -24.0]], [[37.0, -114.0], 
+[-4.0, -10.0]], [[-17.0, -115.0], [36.0, -16.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_array_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.758366898322)+(1.-msk_arg0)*(-0.816907957339)
-      arg1=numpy.array([[[[-0.089336930207332133, -0.3488365704255485, -0.75783339384575088, 0.41855694747691374], 
-[0.08692745527314738, 0.40313277705580841, -0.25416741545283172, 0.026893797246153373], [-0.32798951844355484, 
-0.51029639997479248, -0.2839293463233914, -0.78086184089955268]], [[0.62944259459658491, -0.76427579770952625, 
-0.81531302514649262, 0.061876143318732035], [0.37762165583704688, 0.20952038685705632, 0.74407804412193745, 
-0.21476614230824298], [0.71099068148543521, -0.51421400497578773, -0.65582151123549526, 0.061174309790876347]]], 
-[[[0.51374975530413702, -0.4508956749476476, 0.39023088117997751, -0.37827753651300733], [-0.55435950583055438, 
--0.044318978933388653, -0.99117935367048782, -0.13920995803715375], [-0.80924381779847909, -0.94708607824384528, 
-0.83447951476568161, 0.84398795898910062]], [[-0.028577073800450714, -0.16455399905080426, 0.020668146918353392, 
-0.88907591993932011], [0.18505213419131517, 0.16856443645261043, -0.52487575282311805, 0.78255342105905967], 
-[0.15120940626236146, -0.11671747557258083, 0.69155772564727247, 0.8051395342733616]]], [[[0.091550377384957082, 
-0.5750401476966438, 0.099762805806505206, -0.12024001715072496], [-0.58381802062603549, 0.66699112831631924, 
-0.0062305482940636647, -0.35721485573505074], [-0.88802900331983858, -0.84609101198132519, 0.4139953198063071, 
--0.11375810156048205]], [[-0.68954916248695231, 0.32623442994355756, -0.25993997016456682, -0.5582295558308441], 
-[0.52507211113380481, 0.20142225363651134, 0.046540894108333619, -0.050245880461216474], [0.93120134587043113, 
-0.16805624381737783, -0.82317750595266204, 0.98122107375241496]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575], 
-[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575], [-0.75836689832230575, 
--0.75836689832230575, -0.75836689832230575, -0.78086184089955268]], [[-0.75836689832230575, -0.76427579770952625, 
--0.75836689832230575, -0.75836689832230575], [-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, 
--0.75836689832230575], [-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575]]], 
-[[[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575], [-0.75836689832230575, 
--0.75836689832230575, -0.99117935367048782, -0.75836689832230575], [-0.80924381779847909, -0.94708607824384528, 
--0.75836689832230575, -0.75836689832230575]], [[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, 
--0.75836689832230575], [-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575], 
-[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575]]], [[[-0.75836689832230575, 
--0.75836689832230575, -0.75836689832230575, -0.75836689832230575], [-0.75836689832230575, -0.75836689832230575, 
--0.75836689832230575, -0.75836689832230575], [-0.88802900331983858, -0.84609101198132519, -0.75836689832230575, 
--0.75836689832230575]], [[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575], 
-[-0.75836689832230575, -0.75836689832230575, -0.75836689832230575, -0.75836689832230575], [-0.75836689832230575, 
--0.75836689832230575, -0.82317750595266204, -0.75836689832230575]]]])+(1.-msk_ref)*numpy.array([[[[-0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, -0.81690795733923549, 
--0.81690795733923549]], [[-0.81690795733923549, -0.81690795733923549, -0.81690795733923549, -0.81690795733923549], 
-[-0.81690795733923549, -0.81690795733923549, -0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549, -0.81690795733923549]]], [[[-0.81690795733923549, -0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, -0.99117935367048782, 
--0.81690795733923549], [-0.81690795733923549, -0.94708607824384528, -0.81690795733923549, -0.81690795733923549]], 
-[[-0.81690795733923549, -0.81690795733923549, -0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549]]], [[[-0.81690795733923549, -0.81690795733923549, -0.81690795733923549, 
--0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, -0.81690795733923549, -0.81690795733923549], 
-[-0.88802900331983858, -0.84609101198132519, -0.81690795733923549, -0.81690795733923549]], [[-0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, 
--0.81690795733923549, -0.81690795733923549], [-0.81690795733923549, -0.81690795733923549, -0.82317750595266204, 
--0.81690795733923549]]]])
+   def test_generalTensorProduct_expandedData_rank0_array_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(0.0)
+      arg1=numpy.array([[[[-2.0, -1.0, -2.0, -6.0], [4.0, -1.0, 6.0, -1.0], [-4.0, -2.0, -5.0, 4.0]], [[-1.0, -1.0, -2.0, 6.0], 
+[5.0, 4.0, -6.0, -3.0], [-2.0, -1.0, 4.0, -7.0]]], [[[0.0, 3.0, -2.0, 2.0], [-6.0, 0.0, 1.0, -4.0], [-7.0, -7.0, -5.0, 2.0]], 
+[[6.0, -3.0, 5.0, 6.0], [-5.0, -3.0, 0.0, -2.0], [-3.0, -5.0, 0.0, 0.0]]], [[[-6.0, 3.0, -5.0, 5.0], [7.0, 6.0, 5.0, 4.0], 
+[0.0, -5.0, -1.0, 0.0]], [[-6.0, 5.0, 3.0, -7.0], [-5.0, -2.0, 0.0, 2.0], [-1.0, 6.0, -1.0, -5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[10.0, 5.0, 10.0, 30.0], [-20.0, 5.0, -30.0, 5.0], [20.0, 10.0, 25.0, -20.0]], [[5.0, 5.0, 
+10.0, -30.0], [-25.0, -20.0, 30.0, 15.0], [10.0, 5.0, -20.0, 35.0]]], [[[-0.0, -15.0, 10.0, -10.0], [30.0, -0.0, -5.0, 20.0], 
+[35.0, 35.0, 25.0, -10.0]], [[-30.0, 15.0, -25.0, -30.0], [25.0, 15.0, -0.0, 10.0], [15.0, 25.0, -0.0, -0.0]]], [[[30.0, -15.0, 
+25.0, -25.0], [-35.0, -30.0, -25.0, -20.0], [-0.0, 25.0, 5.0, -0.0]], [[30.0, -25.0, -15.0, 35.0], [25.0, 10.0, -0.0, -10.0], 
+[5.0, -30.0, 5.0, 25.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 
+0.0]], [[-0.0, -0.0, -0.0, 0.0], [0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, -0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 
+-0.0], [-0.0, -0.0, -0.0, 0.0]], [[0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 
+-0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_array_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.49606432274244439, -0.12284044252066506, 0.11396427127974107, -0.23891306807966939], 
-[-0.60255849157853825, 0.097766837584110533, 0.99911269434311079, 0.91586023591892651], [-0.53888661521823655, 
-0.68331848676079954, 0.41233676219180926, -0.031508906318399532]], [[0.049667557510936655, -0.57787470309708544, 
-0.27191409276622469, -0.76634432702232913], [0.34954140309705539, 0.83629446151104436, 0.8980545228768857, 
--0.77493605422725254], [-0.45349761024232205, 0.39464559276929512, -0.37779168388472262, 0.48344610692479173]]], 
-[[[0.62542242125573533, -0.76083586876152443, -0.66647782332284722, 0.41050924047271775], [-0.27837179693769332, 
-0.45619739372057944, -0.85214198840226585, 0.7017477830032397], [-0.7408609838764566, -0.51764398965413672, 
--0.030243582412935455, 0.75281934842242348]], [[-0.7788969655058573, 0.75281945130855465, 0.3382442492127915, 
-0.52493679565792006], [-0.78481524699129213, -0.22418514822507762, -0.30086761755155833, 0.19532894016325453], 
-[0.53547505421768959, -0.073834424193617965, -0.99035088191485099, -0.28041462699302677]]], [[[0.98346573898461132, 
--0.68600843141448697, -0.2663344236460039, -0.75643928230429225], [0.91941455886367041, 0.7760704919158643, 
--0.82827072579253436, -0.6761780995175477], [0.38532138796094029, -0.38656159426822456, 0.24837951918329226, 
-0.28428982821685977]], [[0.28366600539943065, 0.92891105091657833, 0.084516164128678017, 0.63344723710600226], 
-[0.62889618468874087, 0.16867908081195115, -0.36401389394896411, -0.45267654295944948], [0.45807884772662488, 
--0.60800911998886464, 0.99247440611006787, -0.29140746081807567]]]])+(1.-msk_arg0)*numpy.array([[[[0.80306832083438295, 
-0.45380343230866615, -0.81859733571389515, 0.49222046967396005], [0.38143740035274099, 0.58486130070634368, 
-0.30403435196519601, -0.36650642825728474], [0.29887879077490775, -0.40845032290228556, -0.5431598285703183, 
-0.13475156717942238]], [[0.75417450356940652, 0.89249294152043523, -0.40593907203447244, -0.61986107758979259], 
-[0.19160048053597145, 0.342064487447997, 0.27070576607926489, -0.63845009908674477], [0.99735490677681127, 
--0.07027588824433173, -0.49305637448540329, -0.72580147612898527]]], [[[-0.34547620865449669, 0.83311260564863066, 
-0.80112622267541678, -0.56300568757995695], [-0.29508013079198014, 0.54309669725669019, -0.29035907077685996, 
--0.57918385294842811], [-0.36638640241290688, 0.71079186227365532, 0.68408201846508088, 0.098941840697029271]], 
-[[-0.0083776891277580479, -0.66934245974582929, -0.40196203264670105, -0.21809863804953045], [0.7086148720548755, 
-0.92918702222597904, 0.32724460264843902, 0.084196985144037173], [-0.75061680086990212, 0.90576411892179953, 
--0.043172076885423127, -0.50670707732414688]]], [[[-0.18429522436961276, -0.98517895664828359, -0.31809447394197532, 
--0.65766694559763561], [0.10277198103867979, 0.13507862514731039, 0.77391686457442033, 0.84397781207882416], 
-[0.88095026569445523, 0.30627922070338309, 0.071650944921933135, 0.70303512474291341]], [[0.44076384652016931, 
--0.3696173929940656, -0.18349170631666301, 0.022647439106598943], [-0.6163482466651351, -0.71247536265046474, 
--0.59464770203407813, -0.65488370258744655], [-0.72810003445735783, 0.126782641507865, -0.10780968972322191, 
--0.44575083371064461]]]])
-      arg1=numpy.array([[[[-0.40646020267158511, -0.94392299321327577, 0.63653845256210473, 0.018123141345770977], 
-[-0.58007359110062051, -0.035141670205105724, -0.56085284601427232, 0.4982263447559756], [0.89111944510230678, 
--0.6978849999061898, 0.69660183851440616, -0.84311137937700176]], [[0.075304243529505488, -0.37445167860256556, 
--0.99852100531274823, -0.95361378824481613], [0.59232224338855555, -0.65407829559440844, 0.53093039161054434, 
--0.32542186245998606], [0.4259892094597022, -0.79571852348154337, 0.57065703382798039, -0.1757223919746298]]], 
-[[[0.34601371301863448, 0.80747948770295519, -0.86511166399201556, -0.74056228089333587], [0.97480864356061359, 
--0.11752105298069071, 0.75068672969592742, 0.071689919914833755], [0.17921987443575671, 0.61188638379964888, 
--0.62475728387574914, -0.020086980543206234]], [[0.62270356873520427, -0.7023606282123791, 0.13646179507218359, 
-0.46457079389295264], [-0.20088755948476478, 0.64693768372202198, 0.28881302912352691, -0.82453766358705738], 
-[-0.11379651691536408, 0.019035208347425225, -0.36105451312547676, 0.989384055038947]]], [[[-0.42022042513581503, 
-0.22479463994542725, 0.89805854180185252, -0.061610380722787683], [-0.25620732047220529, -0.029958018671728093, 
--0.78948055498350711, -0.4710653685201871], [-0.89181028184506328, -0.61622699261807412, -0.47912802119186182, 
--0.55122670074272984]], [[0.96354450197573982, -0.34221151585365006, -0.53914756727179403, -0.79966242791688713], 
-[0.054418810355942426, 0.49431247670409828, -0.8952893167318865, 0.90166797356140105], [-0.96945322437856607, 
--0.35752184536471265, 0.66612719206177506, 0.24007800416472835]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.40646020267158511, -0.94392299321327577, 0.11396427127974107, -0.23891306807966939], 
-[-0.60255849157853825, -0.035141670205105724, -0.56085284601427232, 0.4982263447559756], [-0.53888661521823655, 
--0.6978849999061898, 0.41233676219180926, -0.84311137937700176]], [[0.049667557510936655, -0.57787470309708544, 
--0.99852100531274823, -0.95361378824481613], [0.34954140309705539, -0.65407829559440844, 0.53093039161054434, 
--0.77493605422725254], [-0.45349761024232205, -0.79571852348154337, -0.37779168388472262, -0.1757223919746298]]], 
-[[[0.34601371301863448, -0.76083586876152443, -0.86511166399201556, -0.74056228089333587], [-0.27837179693769332, 
--0.11752105298069071, -0.85214198840226585, 0.071689919914833755], [-0.7408609838764566, -0.51764398965413672, 
--0.62475728387574914, -0.020086980543206234]], [[-0.7788969655058573, -0.7023606282123791, 0.13646179507218359, 
-0.46457079389295264], [-0.78481524699129213, -0.22418514822507762, -0.30086761755155833, -0.82453766358705738], 
-[-0.11379651691536408, -0.073834424193617965, -0.99035088191485099, -0.28041462699302677]]], [[[-0.42022042513581503, 
--0.68600843141448697, -0.2663344236460039, -0.75643928230429225], [-0.25620732047220529, -0.029958018671728093, 
--0.82827072579253436, -0.6761780995175477], [-0.89181028184506328, -0.61622699261807412, -0.47912802119186182, 
--0.55122670074272984]], [[0.28366600539943065, -0.34221151585365006, -0.53914756727179403, -0.79966242791688713], 
-[0.054418810355942426, 0.16867908081195115, -0.8952893167318865, -0.45267654295944948], [-0.96945322437856607, 
--0.60800911998886464, 0.66612719206177506, -0.29140746081807567]]]])+(1.-msk_ref)*numpy.array([[[[-0.40646020267158511, 
--0.94392299321327577, -0.81859733571389515, 0.018123141345770977], [-0.58007359110062051, -0.035141670205105724, 
--0.56085284601427232, -0.36650642825728474], [0.29887879077490775, -0.6978849999061898, -0.5431598285703183, 
--0.84311137937700176]], [[0.075304243529505488, -0.37445167860256556, -0.99852100531274823, -0.95361378824481613], 
-[0.19160048053597145, -0.65407829559440844, 0.27070576607926489, -0.63845009908674477], [0.4259892094597022, 
--0.79571852348154337, -0.49305637448540329, -0.72580147612898527]]], [[[-0.34547620865449669, 0.80747948770295519, 
--0.86511166399201556, -0.74056228089333587], [-0.29508013079198014, -0.11752105298069071, -0.29035907077685996, 
--0.57918385294842811], [-0.36638640241290688, 0.61188638379964888, -0.62475728387574914, -0.020086980543206234]], 
-[[-0.0083776891277580479, -0.7023606282123791, -0.40196203264670105, -0.21809863804953045], [-0.20088755948476478, 
-0.64693768372202198, 0.28881302912352691, -0.82453766358705738], [-0.75061680086990212, 0.019035208347425225, 
--0.36105451312547676, -0.50670707732414688]]], [[[-0.42022042513581503, -0.98517895664828359, -0.31809447394197532, 
--0.65766694559763561], [-0.25620732047220529, -0.029958018671728093, -0.78948055498350711, -0.4710653685201871], 
-[-0.89181028184506328, -0.61622699261807412, -0.47912802119186182, -0.55122670074272984]], [[0.44076384652016931, 
--0.3696173929940656, -0.53914756727179403, -0.79966242791688713], [-0.6163482466651351, -0.71247536265046474, 
--0.8952893167318865, -0.65488370258744655], [-0.96945322437856607, -0.35752184536471265, -0.10780968972322191, 
--0.44575083371064461]]]])
+   def test_generalTensorProduct_expandedData_rank0_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(-5.0)
+      arg1=Data(-7.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(35.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_constData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(0.915014570808)+(1.-msk_arg0)*(0.00693309937149)
-      arg1=Data(numpy.array([[[[-0.024616493564646014, 0.73986506071275615, 0.40045069363770303, -0.349587964480369], 
-[0.096004295226797431, 0.49415258135071571, -0.25174172967066832, 0.54249134677714772], [-0.87581721391988365, 
-0.10847159986262644, -0.3688371682325351, 0.30383154728572248]], [[-0.84813991148188839, 0.92539057923751389, 
--0.04808129585241594, -0.76044944158127881], [-0.37956815177630943, -0.0021700374885920137, 0.12804567444566484, 
--0.84584319411046383], [-0.66698396570131679, -0.86375301071471444, 0.6266795734119297, 0.72969896277602908]]], 
-[[[0.37505603318395497, 0.15695183669002444, -0.50506507527916145, 0.78544822702085604], [0.43781850470970518, 
-0.82020434557550126, -0.67497282695188909, 0.57574879486380559], [0.49745792521920018, 0.41403102534370628, 
-0.19334686956486169, -0.094285235742264328]], [[0.91078143137671685, -0.64662819523078952, -0.49160107656731356, 
-0.21244530928296457], [-0.12892029937078608, 0.0065983102969269236, -0.72815551209722429, -0.87074291789406821], 
-[-0.33951262082135991, -0.28909708798195943, 0.78297670060616809, -0.1813889085841629]]], [[[0.15302183077978571, 
-0.9821284263110488, 0.79282893507840635, 0.64017446726074545], [0.83261679997442761, 0.34583690439257486, -0.87367948663003148, 
-0.013024284133244635], [-0.55472238642899518, -0.98196829116013173, 0.34590028258804728, 0.56193507184117908]], 
-[[-0.91806403728542074, 0.46759895278200192, -0.22691484440602205, -0.1360765618692974], [-0.2630245734727592, 
-0.89706296333461988, -0.92618670589312568, 0.56460258310291511], [-0.63907522579916498, 0.99651590418151725, 
--0.47525732685460365, -0.19631796941274882]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.024616493564646014, 0.73986506071275615, 0.40045069363770303, -0.349587964480369], 
-[0.096004295226797431, 0.49415258135071571, -0.25174172967066832, 0.54249134677714772], [-0.87581721391988365, 
-0.10847159986262644, -0.3688371682325351, 0.30383154728572248]], [[-0.84813991148188839, 0.91501457080784343, 
--0.04808129585241594, -0.76044944158127881], [-0.37956815177630943, -0.0021700374885920137, 0.12804567444566484, 
--0.84584319411046383], [-0.66698396570131679, -0.86375301071471444, 0.6266795734119297, 0.72969896277602908]]], 
-[[[0.37505603318395497, 0.15695183669002444, -0.50506507527916145, 0.78544822702085604], [0.43781850470970518, 
-0.82020434557550126, -0.67497282695188909, 0.57574879486380559], [0.49745792521920018, 0.41403102534370628, 
-0.19334686956486169, -0.094285235742264328]], [[0.91078143137671685, -0.64662819523078952, -0.49160107656731356, 
-0.21244530928296457], [-0.12892029937078608, 0.0065983102969269236, -0.72815551209722429, -0.87074291789406821], 
-[-0.33951262082135991, -0.28909708798195943, 0.78297670060616809, -0.1813889085841629]]], [[[0.15302183077978571, 
-0.91501457080784343, 0.79282893507840635, 0.64017446726074545], [0.83261679997442761, 0.34583690439257486, 
--0.87367948663003148, 0.013024284133244635], [-0.55472238642899518, -0.98196829116013173, 0.34590028258804728, 
-0.56193507184117908]], [[-0.91806403728542074, 0.46759895278200192, -0.22691484440602205, -0.1360765618692974], 
-[-0.2630245734727592, 0.89706296333461988, -0.92618670589312568, 0.56460258310291511], [-0.63907522579916498, 
-0.91501457080784343, -0.47525732685460365, -0.19631796941274882]]]])+(1.-msk_ref)*numpy.array([[[[-0.024616493564646014, 
-0.0069330993714913358, 0.0069330993714913358, -0.349587964480369], [0.0069330993714913358, 0.0069330993714913358, 
--0.25174172967066832, 0.0069330993714913358], [-0.87581721391988365, 0.0069330993714913358, -0.3688371682325351, 
-0.0069330993714913358]], [[-0.84813991148188839, 0.0069330993714913358, -0.04808129585241594, -0.76044944158127881], 
-[-0.37956815177630943, -0.0021700374885920137, 0.0069330993714913358, -0.84584319411046383], [-0.66698396570131679, 
--0.86375301071471444, 0.0069330993714913358, 0.0069330993714913358]]], [[[0.0069330993714913358, 0.0069330993714913358, 
--0.50506507527916145, 0.0069330993714913358], [0.0069330993714913358, 0.0069330993714913358, -0.67497282695188909, 
-0.0069330993714913358], [0.0069330993714913358, 0.0069330993714913358, 0.0069330993714913358, -0.094285235742264328]], 
-[[0.0069330993714913358, -0.64662819523078952, -0.49160107656731356, 0.0069330993714913358], [-0.12892029937078608, 
-0.0065983102969269236, -0.72815551209722429, -0.87074291789406821], [-0.33951262082135991, -0.28909708798195943, 
-0.0069330993714913358, -0.1813889085841629]]], [[[0.0069330993714913358, 0.0069330993714913358, 0.0069330993714913358, 
-0.0069330993714913358], [0.0069330993714913358, 0.0069330993714913358, -0.87367948663003148, 0.0069330993714913358], 
-[-0.55472238642899518, -0.98196829116013173, 0.0069330993714913358, 0.0069330993714913358]], [[-0.91806403728542074, 
-0.0069330993714913358, -0.22691484440602205, -0.1360765618692974], [-0.2630245734727592, 0.0069330993714913358, 
--0.92618670589312568, 0.0069330993714913358], [-0.63907522579916498, 0.0069330993714913358, -0.47525732685460365, 
--0.19631796941274882]]]])
+   def test_generalTensorProduct_expandedData_rank1_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-1.0, 3.0, 2.0])+(1.-msk_arg0)*numpy.array([1.0, -4.0, -5.0])
+      arg1=Data(numpy.array([3.0, 3.0, -3.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(6.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_constData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[-0.34701240595496552, -0.066590066066970044, 0.68893642710771608, -0.17424522506882512], 
-[0.024355088381233791, 0.05633425284930893, 0.88879426240819681, -0.92863593547037859], [0.83669776930697304, 
--0.39579600459575404, 0.47192813756614016, 0.99172878988195778]], [[-0.91551508139749727, 0.68326775998294154, 
--0.89927562350378354, 0.57943460559444593], [0.44460535034711812, 0.53502178865053773, 0.14278367326090602, 
--0.58322836856114124], [0.1419481361577406, -0.41584721501837718, -0.34887760440988136, -0.82956487366913989]]], 
-[[[0.43035841120515195, -0.33252375929641009, -0.067318115758067121, 0.84803550650774739], [-0.62015844837686718, 
-0.38772843909572074, 0.64565778860413992, 0.89579458002448398], [0.34136535785486344, -0.050471545430222475, 
-0.81193883786827192, 0.53984856950978832]], [[-0.27538461578377293, 0.084308717068411809, -0.11883741328977337, 
--0.85222725709749736], [-0.63763814472991376, 0.059471248494016082, 0.73094946640875458, -0.13046786055282689], 
-[0.69664180936494846, -0.42460910739161783, 0.52027742705763869, -0.76923727859653113]]], [[[-0.73466423193399621, 
--0.011639215664459579, 0.95320371554189598, 0.62649241111665455], [-0.25811374588837577, 0.61082264991855828, 
--0.24422765522426393, 0.32506948963370585], [0.20347634345487453, 0.97972000096265566, 0.60645379455271597, 
-0.8589946844017029]], [[-0.041699531836799197, 0.88375542257324491, 0.67422122172347598, -0.054675511226085494], 
-[0.65426125902067622, 0.45574875234198231, -0.3229715640720443, 0.28227990718457141], [0.26764386074170599, 
-0.67423488792039055, 0.30435538461696798, 0.093625119111805377]]]])+(1.-msk_arg0)*numpy.array([[[[0.99213262869399821, 
-0.47146052239570513, -0.39451256286827108, -0.12052296338715451], [0.30982502841033499, 0.91165464856342027, 
-0.69003585651378629, 0.58749700860257104], [0.13762751362008552, -0.36280676873926487, 0.44729807825768031, 
-0.034791000996944543]], [[-0.67726750805352709, -0.68750211316933463, -0.90630896884080681, -0.89677743485238182], 
-[0.98934429876382213, -0.046251856573284122, 0.7758619897125183, 0.4195696059348375], [0.16092756713974654, 
-0.18650696278593371, 0.13872078227177354, 0.36678306618403123]]], [[[0.3335529154575263, -0.7349642744095326, 
--0.49715646607759001, 0.63213686477707398], [-0.6617700431351845, -0.20753978747261148, 0.97303348087248631, 
--0.96573015784394056], [-0.51630494384942915, -0.99455947865587224, 0.12992473826799666, -0.97846484067113382]], 
-[[-0.8046496501788245, -0.88598910169886835, 0.25950100249661379, 0.68437657086603343], [0.40057865795459313, 
-0.41091540387964853, 0.92851419973982474, 0.4518258714544543], [0.48341844439544968, -0.17590981446341858, 0.5237804617238333, 
--0.95206524255248937]]], [[[-0.19617319531924671, 0.98343738990959761, -0.18690278454110754, -0.88243885345113027], 
-[0.37831438577629273, -0.34195429513329212, -0.2069020831166215, 0.45040781392162299], [-0.88278705514420563, 
--0.71402473105050923, 0.89699923794244452, 0.17595933142076903]], [[0.7193053321972116, -0.85703390263672685, 
--0.83884713109593068, 0.65941444232361102], [0.38261507706130127, -0.71870105969512688, 0.6223634029597902, 
--0.7273911403112685], [-0.86420470101157987, -0.10232739528406842, -0.78869794636170787, 0.79418519099703522]]]])
-      arg1=Data(numpy.array([[[[-0.59070702028860333, 0.47242671894939003, -0.99417581760700324, 0.25914160458610813], 
-[-0.43354412582670943, -0.76322412365052394, 0.13514439555568769, 0.39346038940016315], [0.32243253754739754, 
-0.31773533228571216, -0.59218535240200554, 0.50303263671827736]], [[0.89049748904122983, 0.17458866658741901, 
-0.43564362337626239, -0.72584448709673288], [0.87461640678970753, 0.79807509864035886, 0.51505568184861983, 
--0.53337386976464263], [-0.4396377432223153, 0.99980566879211419, 0.32344354369863737, 0.075629494773711059]]], 
-[[[0.77629624350318815, -0.097059670735997416, -0.21145608563375506, 0.2166695317184284], [0.82464631495795238, 
-0.75425365270193701, -0.29174907876180001, 0.60917873956124002], [0.21721508803541867, 0.28524117459309739, 
--0.59985368595416277, 0.11934295191090305]], [[-0.91434634851775698, 0.3617103235489485, 0.78303293404161955, 
--0.11004975165444675], [-0.89770389762359248, 0.60492008175175105, -0.77381993927717874, 0.57716284532775708], 
-[-0.27910751265213629, 0.95374373631541665, -0.4433049708535739, -0.66837888038023663]]], [[[0.42163029229014648, 
--0.43572007771569798, 0.22863778408918156, 0.045561253608975338], [0.86892968183383967, -0.35152860041100142, 
--0.030501286783599202, -0.8628259117493855], [0.45870319970757767, -0.37563694895442001, -0.64243884527119111, 
--0.31114603092393911]], [[-0.60575845350360313, -0.26221713284580184, 0.95348527655101001, 0.96594382139883628], 
-[0.19168896809532643, -0.26791303190916049, -0.72106038473599887, -0.71790845704998341], [-0.79579865588188592, 
-0.38819717867276826, 0.47952089305368006, 0.87339431832908687]]]]),self.functionspace)
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.59070702028860333, -0.066590066066970044, -0.99417581760700324, -0.17424522506882512], 
-[-0.43354412582670943, -0.76322412365052394, 0.13514439555568769, -0.92863593547037859], [0.32243253754739754, 
--0.39579600459575404, -0.59218535240200554, 0.50303263671827736]], [[-0.91551508139749727, 0.17458866658741901, 
--0.89927562350378354, -0.72584448709673288], [0.44460535034711812, 0.53502178865053773, 0.14278367326090602, 
--0.58322836856114124], [-0.4396377432223153, -0.41584721501837718, -0.34887760440988136, -0.82956487366913989]]], 
-[[[0.43035841120515195, -0.33252375929641009, -0.21145608563375506, 0.2166695317184284], [-0.62015844837686718, 
-0.38772843909572074, -0.29174907876180001, 0.60917873956124002], [0.21721508803541867, -0.050471545430222475, 
--0.59985368595416277, 0.11934295191090305]], [[-0.91434634851775698, 0.084308717068411809, -0.11883741328977337, 
--0.85222725709749736], [-0.89770389762359248, 0.059471248494016082, -0.77381993927717874, -0.13046786055282689], 
-[-0.27910751265213629, -0.42460910739161783, -0.4433049708535739, -0.76923727859653113]]], [[[-0.73466423193399621, 
--0.43572007771569798, 0.22863778408918156, 0.045561253608975338], [-0.25811374588837577, -0.35152860041100142, 
--0.24422765522426393, -0.8628259117493855], [0.20347634345487453, -0.37563694895442001, -0.64243884527119111, 
--0.31114603092393911]], [[-0.60575845350360313, -0.26221713284580184, 0.67422122172347598, -0.054675511226085494], 
-[0.19168896809532643, -0.26791303190916049, -0.72106038473599887, -0.71790845704998341], [-0.79579865588188592, 
-0.38819717867276826, 0.30435538461696798, 0.093625119111805377]]]])+(1.-msk_ref)*numpy.array([[[[-0.59070702028860333, 
-0.47146052239570513, -0.99417581760700324, -0.12052296338715451], [-0.43354412582670943, -0.76322412365052394, 
-0.13514439555568769, 0.39346038940016315], [0.13762751362008552, -0.36280676873926487, -0.59218535240200554, 
-0.034791000996944543]], [[-0.67726750805352709, -0.68750211316933463, -0.90630896884080681, -0.89677743485238182], 
-[0.87461640678970753, -0.046251856573284122, 0.51505568184861983, -0.53337386976464263], [-0.4396377432223153, 
-0.18650696278593371, 0.13872078227177354, 0.075629494773711059]]], [[[0.3335529154575263, -0.7349642744095326, 
--0.49715646607759001, 0.2166695317184284], [-0.6617700431351845, -0.20753978747261148, -0.29174907876180001, 
--0.96573015784394056], [-0.51630494384942915, -0.99455947865587224, -0.59985368595416277, -0.97846484067113382]], 
-[[-0.91434634851775698, -0.88598910169886835, 0.25950100249661379, -0.11004975165444675], [-0.89770389762359248, 
-0.41091540387964853, -0.77381993927717874, 0.4518258714544543], [-0.27910751265213629, -0.17590981446341858, 
--0.4433049708535739, -0.95206524255248937]]], [[[-0.19617319531924671, -0.43572007771569798, -0.18690278454110754, 
--0.88243885345113027], [0.37831438577629273, -0.35152860041100142, -0.2069020831166215, -0.8628259117493855], 
-[-0.88278705514420563, -0.71402473105050923, -0.64243884527119111, -0.31114603092393911]], [[-0.60575845350360313, 
--0.85703390263672685, -0.83884713109593068, 0.65941444232361102], [0.19168896809532643, -0.71870105969512688, 
--0.72106038473599887, -0.7273911403112685], [-0.86420470101157987, -0.10232739528406842, -0.78869794636170787, 
-0.79418519099703522]]]])
+   def test_generalTensorProduct_expandedData_rank2_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-3.0, -5.0, -3.0], [3.0, 5.0, 5.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -1.0, 0.0], [0.0, 1.0, 
+0.0]])
+      arg1=Data(numpy.array([[-3.0, -3.0, 3.0], [0.0, 6.0, -2.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(24.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank0_expandedData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*(-0.281440687124)+(1.-msk_arg0)*(-0.35596270117)
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.35379270015815001, 0.39138893129730512, 0.17268454564435354, 0.27495962726829037], 
-[-0.42478195929874141, 0.81114791137829712, 0.49891790941554914, -0.84889097868629948], [-0.80354923791611466, 
--0.99875111821489648, -0.15295293690319189, -0.23948710705684717]], [[0.7805413687322833, -0.98188721215648256, 
-0.067676870968989888, -0.81348894976268782], [0.51781452911506731, -0.68957839475146754, -0.35693520061661244, 
-0.50816586186118617], [-0.037127168597973492, 0.87527048404958374, 0.3907745056832348, 0.3424864780213035]]], 
-[[[-0.74587202908015726, -0.91209200550772151, -0.45967987413130373, 0.47364848085989331], [0.55813495312028105, 
-0.69155459403636499, 0.57371625967095441, 0.30866830662451483], [0.67024978892614429, 0.62918201641780858, 
--0.29910907170343304, 0.72463645868347082]], [[-0.13317748932441864, -0.9204063014033288, 0.75421236332449348, 
--0.64526129483169914], [0.16143967775323942, -0.50063348653036743, -0.0032020169286099964, -0.098411289042768857], 
-[0.79703082376106371, -0.8478212917704453, 0.25159317951323068, 0.96570013411217848]]], [[[-0.67936202530106371, 
-0.65848615916060815, 0.0342330141319378, 0.1830705561479844], [0.59696897864236109, -0.90892311891528177, -0.85226027785125735, 
--0.094758937987674985], [0.046843830140058218, -0.46623548865208053, 0.95940015221237096, -0.074574115874788127]], 
-[[-0.35689244415995436, 0.9386540295859791, 0.98024546961490633, 0.66425792601153422], [0.32479805893954339, 
-0.18451300545005034, -0.17544017380326538, -0.52561231707548273], [-0.3534490724726933, -0.12495276741935912, 
--0.35564363665390397, -0.73327365076131912]]]])+(1.-msk_arg1)*numpy.array([[[[0.27368905393342446, 0.51017421645331118, 
--0.42724661619890125, 0.28046826996439989], [0.40050816583205218, -0.46169248751741998, -0.84630948383699978, 
--0.7238308756095988], [-0.5900363110555269, 0.19871173292364341, 0.0032822419523403923, -0.6289290678175401]], 
-[[0.55188643485228916, 0.53505012324679879, -0.10508508660536475, 0.86026174516162857], [-0.65932929728702394, 
-0.03617752320813894, -0.66465550799693784, -0.070428965950132483], [0.94883643499055936, 0.82888540594303439, 
-0.65244299870764255, -0.86131623082268183]]], [[[-0.63797413232474165, 0.46987977398290481, 0.127332908906991, 
-0.11442327661551732], [0.10848855516345557, 0.45352945434542136, 0.4833214761528497, 0.73064138639748299], 
-[-0.73347934704847217, -0.49295671859578061, -0.31440523153896116, -0.7835557756250735]], [[0.41901609701772569, 
--0.44948463644971337, -0.24302629954154664, -0.023138045232491855], [0.733124095901178, -0.56727159154999107, 
--0.019172829153542015, -0.24666017927879302], [-0.17010065342109293, 0.074460303015782214, -0.31188620889066887, 
--0.56017651115588873]]], [[[-0.62539591562958363, 0.62376910063026658, 0.84867780557098604, 0.66461784742102359], 
-[-0.17708382487177809, 0.44481741630262528, 0.34179971179574986, 0.97256706794332581], [0.9287135448908217, 
--0.4095713814718418, 0.79776224226010961, 0.3794798609396457]], [[0.53675571412073686, 0.51971846190698212, 0.9097391503559551, 
-0.80384587348141245], [0.70665590624068031, -0.98930795849510522, -0.47071997860101367, 0.80774878578135545], 
-[0.89959467660483683, 0.88160223458711506, 0.82429762924456917, 0.032127226351953198]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.35379270015815001, -0.28144068712411241, -0.28144068712411241, -0.28144068712411241], 
-[-0.42478195929874141, -0.28144068712411241, -0.28144068712411241, -0.84889097868629948], [-0.80354923791611466, 
--0.99875111821489648, -0.28144068712411241, -0.28144068712411241]], [[-0.28144068712411241, -0.98188721215648256, 
--0.28144068712411241, -0.81348894976268782], [-0.28144068712411241, -0.68957839475146754, -0.35693520061661244, 
--0.28144068712411241], [-0.28144068712411241, -0.28144068712411241, -0.28144068712411241, -0.28144068712411241]]], 
-[[[-0.74587202908015726, -0.91209200550772151, -0.45967987413130373, -0.28144068712411241], [-0.28144068712411241, 
--0.28144068712411241, -0.28144068712411241, -0.28144068712411241], [-0.28144068712411241, -0.28144068712411241, 
--0.29910907170343304, -0.28144068712411241]], [[-0.28144068712411241, -0.9204063014033288, -0.28144068712411241, 
--0.64526129483169914], [-0.28144068712411241, -0.50063348653036743, -0.28144068712411241, -0.28144068712411241], 
-[-0.28144068712411241, -0.8478212917704453, -0.28144068712411241, -0.28144068712411241]]], [[[-0.67936202530106371, 
--0.28144068712411241, -0.28144068712411241, -0.28144068712411241], [-0.28144068712411241, -0.90892311891528177, 
--0.85226027785125735, -0.28144068712411241], [-0.28144068712411241, -0.46623548865208053, -0.28144068712411241, 
--0.28144068712411241]], [[-0.35689244415995436, -0.28144068712411241, -0.28144068712411241, -0.28144068712411241], 
-[-0.28144068712411241, -0.28144068712411241, -0.28144068712411241, -0.52561231707548273], [-0.3534490724726933, 
--0.28144068712411241, -0.35564363665390397, -0.73327365076131912]]]])+(1.-msk_ref)*numpy.array([[[[-0.35596270116966267, 
--0.35596270116966267, -0.42724661619890125, -0.35596270116966267], [-0.35596270116966267, -0.46169248751741998, 
--0.84630948383699978, -0.7238308756095988], [-0.5900363110555269, -0.35596270116966267, -0.35596270116966267, 
--0.6289290678175401]], [[-0.35596270116966267, -0.35596270116966267, -0.35596270116966267, -0.35596270116966267], 
-[-0.65932929728702394, -0.35596270116966267, -0.66465550799693784, -0.35596270116966267], [-0.35596270116966267, 
--0.35596270116966267, -0.35596270116966267, -0.86131623082268183]]], [[[-0.63797413232474165, -0.35596270116966267, 
--0.35596270116966267, -0.35596270116966267], [-0.35596270116966267, -0.35596270116966267, -0.35596270116966267, 
--0.35596270116966267], [-0.73347934704847217, -0.49295671859578061, -0.35596270116966267, -0.7835557756250735]], 
-[[-0.35596270116966267, -0.44948463644971337, -0.35596270116966267, -0.35596270116966267], [-0.35596270116966267, 
--0.56727159154999107, -0.35596270116966267, -0.35596270116966267], [-0.35596270116966267, -0.35596270116966267, 
--0.35596270116966267, -0.56017651115588873]]], [[[-0.62539591562958363, -0.35596270116966267, -0.35596270116966267, 
--0.35596270116966267], [-0.35596270116966267, -0.35596270116966267, -0.35596270116966267, -0.35596270116966267], 
-[-0.35596270116966267, -0.4095713814718418, -0.35596270116966267, -0.35596270116966267]], [[-0.35596270116966267, 
--0.35596270116966267, -0.35596270116966267, -0.35596270116966267], [-0.35596270116966267, -0.98930795849510522, 
--0.47071997860101367, -0.35596270116966267], [-0.35596270116966267, -0.35596270116966267, -0.35596270116966267, 
--0.35596270116966267]]]])
+   def test_generalTensorProduct_expandedData_rank3_constData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, 7.0, 0.0], [-6.0, 4.0, 5.0], [3.0, -3.0, 3.0], [6.0, -7.0, 7.0]], [[-3.0, 4.0, 2.0], 
+[-5.0, -3.0, -2.0], [3.0, -6.0, -7.0], [4.0, 2.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, 4.0, 4.0], [-4.0, 1.0, 0.0], [6.0, 
+0.0, -6.0], [5.0, -4.0, -7.0]], [[-1.0, 4.0, 3.0], [-1.0, -5.0, 4.0], [1.0, 1.0, -6.0], [-7.0, 6.0, 6.0]]])
+      arg1=Data(numpy.array([[[-6.0, 0.0, 5.0], [3.0, -4.0, -6.0], [6.0, 0.0, -3.0], [5.0, 2.0, 7.0]], [[-5.0, 0.0, -3.0], 
+[5.0, 0.0, 3.0], [2.0, 4.0, 7.0], [-7.0, -1.0, -3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-103.0)+(1.-msk_ref)*numpy.array(-18.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_minimum_expandedData_rank4_expandedData_rank4(self):
-      msk_arg0=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg0=msk_arg0*numpy.array([[[[0.16571615363407544, -0.15953462441407429, -0.68043226043641081, -0.87681401094494094], 
-[-0.9695983155906287, -0.15364919368303798, 0.030160758861827119, -0.92415648368275738], [0.82219196541332606, 
-0.95377813518040711, 0.19171337543821187, 0.10581899828603314]], [[-0.88867133240432428, 0.52390121671003653, 
-0.27634854506335915, -0.83253250212204444], [0.68836708148447934, -0.944819458613956, -0.65875103578172434, 
-0.75220212840386891], [0.43162549126481475, -0.89619209121093757, 0.30709465760721777, -0.58977699061810096]]], 
-[[[-0.95992219762575615, -0.066575866315797372, -0.39911206297446955, 0.47436127044029619], [-0.89976461972455346, 
-0.31866787036320132, 0.72722010061752695, -0.23250235959439425], [0.30897331797821015, 0.69432613471155391, 
--0.52945320471416024, -0.4294587659101694]], [[0.046053965984596434, -0.33603355979512473, -0.45371629141797443, 
-0.53619070384652145], [0.17824930535811601, -0.41289723392230493, 0.82622334829024346, -0.62092390819188248], 
-[0.13528973033119573, 0.65860517582594169, -0.59994769111313673, 0.86347249694863781]]], [[[0.062965273551715883, 
-0.3984423920467417, 0.8412369286949386, 0.48653611314147449], [0.076552434980462714, -0.74637079543318352, 
--0.93111256601427783, 0.24019128438975446], [0.54932891961257702, -0.36479323325406687, -0.36227281864741689, 
--0.6426381946129549]], [[0.87535402737995538, -0.22622773167577637, 0.53698671630387973, -0.015222102108113145], 
-[-0.23230268554196098, -0.59313355157251668, -0.27386335124317984, 0.40869078283118898], [0.49847726683133531, 
-0.30018332336192199, -0.89742548476289596, 0.91923945312301303]]]])+(1.-msk_arg0)*numpy.array([[[[-0.98224484945839463, 
-0.7590398139904484, 0.90218789449350356, 0.794570940224119], [0.065804782544962137, -0.43702907186543016, -0.97674631897757735, 
-0.32386280340723728], [0.52537049868532804, -0.91155503921923597, 0.97099132032305335, -0.04553695938314517]], 
-[[0.98725809756636784, -0.33391372704158195, -0.63493116997531973, -0.058358115695967161], [0.62008950317384048, 
--0.19140831812052861, 0.87762021206781871, -0.35590907029535046], [-0.69105597053150425, -0.94527231725182959, 
--0.8102802593916536, -0.40046146143927785]]], [[[0.23812505816617868, 0.67420998385603159, 0.60705754082266328, 
--0.69124361116174593], [0.24845222081689045, 0.39236925649498011, 0.84439909529847723, 0.19820436834791244], 
-[-0.97817921648061867, 0.7658360887578135, 0.91830949704569953, 0.69788275060624128]], [[0.86705579380032538, 
-0.50278661317081963, -0.65318848328350376, 0.87473434196921507], [-0.95695137577762912, -0.47131199534772339, 
-0.52066934994631886, 0.68123222673178385], [0.08060465442413145, -0.71465794226684465, -0.12366819719187494, 
-0.21266832142581893]]], [[[0.26114660171599891, 0.86748987236737696, 0.33557193919758266, -0.77240321798355382], 
-[-0.55175199625157334, 0.73517151916955004, 0.44786064200667841, -0.028816980538964643], [0.17183266111472473, 
--0.36898894101335911, 0.036378238609670488, 0.17012681736007407]], [[-0.30590119814148453, 0.4568227076734801, 
-0.36372090687649461, -0.32049948781332871], [-0.2367582269308024, 0.38591976993568977, 0.95772294509922817, 
-0.20975307783256003], [-0.18061661907409143, 0.56011139300635548, -0.85781971479507502, 0.51683029807570202]]]])
-      msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg1=msk_arg1*numpy.array([[[[-0.25546937210977871, 0.24832683088632401, -0.14545464691490784, 0.080235186525601687], 
-[0.11069137789143491, -0.016207251388733024, 0.77248522205512682, 0.7916830124200489], [0.24188876407985682, 
--0.37726568082801926, -0.031244555386071182, 0.23719843766370108]], [[-0.52530895845960357, -0.040442550882596295, 
--0.96671783461884542, -0.31844929396282939], [0.63028509118943798, -0.82987066268733845, 0.40226273254697853, 
-0.6416560128654627], [-0.51768106525739577, -0.95314812231221246, 0.91646994008831739, 0.10500079998103473]]], 
-[[[-0.43762630469563502, 0.88953292259189332, 0.20989650270724391, -0.2252897487980432], [0.22990139512492824, 
-0.3938910226926513, -0.89967417979417186, -0.20081505765042973], [0.51252688708846761, -0.63589317933525402, 
-0.43780388779762469, -0.8219515227692169]], [[0.45878322925691384, 0.65986650945619796, 0.86195023375372393, 
-0.92947598086978256], [0.74115675870795483, -0.3216339775383199, 0.46769531478658299, -0.22253987779723783], 
-[0.16061925701180435, 0.5771814412103291, -0.079603474945781683, -0.71267492351189787]]], [[[0.17583785687054077, 
-0.59324083913910819, 0.64345037699888441, 0.30816424930249453], [-0.62579483160181737, 0.22078302970647767, 
-0.32405747132008256, 0.87513873105183126], [-0.093324441995394247, 0.54868508307347397, -0.56595771086234792, 
--0.34881472760328158]], [[0.52000927142362841, -0.39276100837897543, -0.20324203866299317, -0.63660389564486386], 
-[-0.88829184611129675, 0.1589791241084153, 0.030944332643213501, -0.61769836226507069], [-0.59576399350712039, 
-0.32459356457722199, -0.96040815278083791, 0.973733761332366]]]])+(1.-msk_arg1)*numpy.array([[[[0.72410480548498746, 
-0.85139119034874633, 0.60917416945078062, -0.95323666037912491], [0.40303015222384286, 0.83523232097517108, 
--0.87374826353837798, 0.022982393583445671], [-0.89361829233112866, -0.94599386362372728, -0.93231635029418403, 
-0.34529834386005431]], [[-0.16748037734067323, 0.96004226924202563, -0.42974360142484525, -0.90439036915169324], 
-[0.25068095981494043, 0.1834607986753285, 0.35750719638369866, -0.071025360246698588], [-0.019474311003289335, 
-0.60750499913984646, 0.5413467925025135, -0.73372966368662751]]], [[[0.64667907904540933, -0.88151193083904777, 
-0.095207905980526197, 0.43753183700227116], [0.14858701799370544, 0.093928805343780786, -0.95743778636458687, 
--0.14774514961802643], [0.45962714702945218, 0.99081133934136334, -0.79683179728428799, 0.043961512901157684]], 
-[[0.35756731123310392, -0.48264940908142151, 0.099071925139986972, 0.96376061087137077], [-0.66314226659986986, 
--0.052455192302455655, -0.54481953495951108, -0.44645464432144211], [-0.43854372305478373, -0.35203765642805251, 
-0.59303138116541465, 0.053016146326937852]]], [[[0.9701121331518916, -0.73394722395651057, 0.021272086611772822, 
--0.53271581135173629], [0.72587623540675916, 0.27049855862575178, -0.42218196424565946, -0.68367437973492895], 
-[0.56588978128030054, -0.12810113550265623, 0.49704499320239148, 0.16474024394444542]], [[-0.39535356597941762, 
--0.88290828211650996, -0.21519102192100914, 0.41118028396703177], [0.50973881288865242, -0.57773555361305662, 
--0.057544577579257794, -0.38940814537914492], [0.63601981762837778, -0.07334659860804571, 0.13001360256183525, 
--0.94605829289307453]]]])
-      res=minimum(arg0,arg1)
-      msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
-      ref=msk_ref*numpy.array([[[[-0.25546937210977871, -0.15953462441407429, -0.68043226043641081, -0.87681401094494094], 
-[-0.9695983155906287, -0.15364919368303798, 0.030160758861827119, -0.92415648368275738], [0.24188876407985682, 
--0.37726568082801926, -0.031244555386071182, 0.10581899828603314]], [[-0.88867133240432428, -0.040442550882596295, 
--0.96671783461884542, -0.83253250212204444], [0.63028509118943798, -0.944819458613956, -0.65875103578172434, 
-0.6416560128654627], [-0.51768106525739577, -0.95314812231221246, 0.30709465760721777, -0.58977699061810096]]], 
-[[[-0.95992219762575615, -0.066575866315797372, -0.39911206297446955, -0.2252897487980432], [-0.89976461972455346, 
-0.31866787036320132, -0.89967417979417186, -0.23250235959439425], [0.30897331797821015, -0.63589317933525402, 
--0.52945320471416024, -0.8219515227692169]], [[0.046053965984596434, -0.33603355979512473, -0.45371629141797443, 
-0.53619070384652145], [0.17824930535811601, -0.41289723392230493, 0.46769531478658299, -0.62092390819188248], 
-[0.13528973033119573, 0.5771814412103291, -0.59994769111313673, -0.71267492351189787]]], [[[0.062965273551715883, 
-0.3984423920467417, 0.64345037699888441, 0.30816424930249453], [-0.62579483160181737, -0.74637079543318352, 
--0.93111256601427783, 0.24019128438975446], [-0.093324441995394247, -0.36479323325406687, -0.56595771086234792, 
--0.6426381946129549]], [[0.52000927142362841, -0.39276100837897543, -0.20324203866299317, -0.63660389564486386], 
-[-0.88829184611129675, -0.59313355157251668, -0.27386335124317984, -0.61769836226507069], [-0.59576399350712039, 
-0.30018332336192199, -0.96040815278083791, 0.91923945312301303]]]])+(1.-msk_ref)*numpy.array([[[[-0.98224484945839463, 
-0.7590398139904484, 0.60917416945078062, -0.95323666037912491], [0.065804782544962137, -0.43702907186543016, 
--0.97674631897757735, 0.022982393583445671], [-0.89361829233112866, -0.94599386362372728, -0.93231635029418403, 
--0.04553695938314517]], [[-0.16748037734067323, -0.33391372704158195, -0.63493116997531973, -0.90439036915169324], 
-[0.25068095981494043, -0.19140831812052861, 0.35750719638369866, -0.35590907029535046], [-0.69105597053150425, 
--0.94527231725182959, -0.8102802593916536, -0.73372966368662751]]], [[[0.23812505816617868, -0.88151193083904777, 
-0.095207905980526197, -0.69124361116174593], [0.14858701799370544, 0.093928805343780786, -0.95743778636458687, 
--0.14774514961802643], [-0.97817921648061867, 0.7658360887578135, -0.79683179728428799, 0.043961512901157684]], 
-[[0.35756731123310392, -0.48264940908142151, -0.65318848328350376, 0.87473434196921507], [-0.95695137577762912, 
--0.47131199534772339, -0.54481953495951108, -0.44645464432144211], [-0.43854372305478373, -0.71465794226684465, 
--0.12366819719187494, 0.053016146326937852]]], [[[0.26114660171599891, -0.73394722395651057, 0.021272086611772822, 
--0.77240321798355382], [-0.55175199625157334, 0.27049855862575178, -0.42218196424565946, -0.68367437973492895], 
-[0.17183266111472473, -0.36898894101335911, 0.036378238609670488, 0.16474024394444542]], [[-0.39535356597941762, 
--0.88290828211650996, -0.21519102192100914, -0.32049948781332871], [-0.2367582269308024, -0.57773555361305662, 
--0.057544577579257794, -0.38940814537914492], [-0.18061661907409143, -0.07334659860804571, -0.85781971479507502, 
--0.94605829289307453]]]])
+   def test_generalTensorProduct_expandedData_rank4_constData_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -7.0], [0.0, -7.0], [-7.0, 0.0]], [[-5.0, 5.0], [2.0, -5.0], [0.0, 1.0]]], [[[4.0, 
+6.0], [-2.0, 0.0], [-5.0, 5.0]], [[5.0, -5.0], [3.0, -2.0], [-7.0, 1.0]]], [[[1.0, 7.0], [-7.0, 6.0], [0.0, 0.0]], [[4.0, 
+-4.0], [-2.0, 2.0], [-3.0, -7.0]]], [[[5.0, -5.0], [-1.0, -1.0], [0.0, 4.0]], [[1.0, 5.0], [7.0, 0.0], [5.0, 
+-1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 3.0], [-4.0, 2.0], [-1.0, -6.0]], [[6.0, 4.0], [5.0, 7.0], [0.0, -5.0]]], [[[7.0, 
+-2.0], [-2.0, 0.0], [-6.0, -7.0]], [[-2.0, 0.0], [7.0, 4.0], [3.0, 0.0]]], [[[0.0, -5.0], [-5.0, 0.0], [5.0, 4.0]], [[-3.0, 
+6.0], [0.0, 0.0], [-7.0, 5.0]]], [[[-2.0, 3.0], [0.0, 6.0], [-4.0, -4.0]], [[-5.0, 0.0], [-7.0, -3.0], [-5.0, 1.0]]]])
+      arg1=Data(numpy.array([[[[-7.0, 6.0], [-4.0, 1.0], [-4.0, 0.0]], [[-4.0, 3.0], [0.0, -6.0], [-1.0, -5.0]]], [[[2.0, 
+-6.0], [-7.0, -6.0], [1.0, -6.0]], [[-1.0, 2.0], [6.0, -1.0], [-1.0, 1.0]]], [[[-6.0, -5.0], [-5.0, -1.0], [-7.0, 6.0]], [[0.0, 
+0.0], [-6.0, -2.0], [6.0, -2.0]]], [[[-5.0, -4.0], [7.0, 0.0], [-3.0, 3.0]], [[6.0, 7.0], [5.0, -4.0], [6.0, 
+-3.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(62.0)+(1.-msk_ref)*numpy.array(51.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank2_array_rank1(self):
-      arg0=numpy.array([[1.0, -1.0, 5.0], [-1.0, -6.0, 6.0]])
-      arg1=numpy.array([4.0, 0.0, -7.0])
-      res=tensor_mult(arg0,arg1)
-      ref=numpy.array([-31.0, -46.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank2_array_rank2(self):
-      arg0=numpy.array([[-1.0, 5.0, -3.0], [5.0, 7.0, 0.0]])
-      arg1=numpy.array([[6.0, -6.0], [-5.0, -2.0], [0.0, 2.0]])
-      res=tensor_mult(arg0,arg1)
-      ref=numpy.array([[-31.0, -10.0], [-5.0, -44.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank2_constData_rank1(self):
-      arg0=numpy.array([[2.0, -4.0, 3.0], [-3.0, 3.0, 7.0]])
-      arg1=Data(numpy.array([-5.0, 4.0, -4.0]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([-38.0, -1.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank0_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(1.0)
+      arg1=Data(numpy.array([0.0, -5.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-0.0, 30.0])+(1.-msk_ref)*numpy.array([0.0, -5.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank1_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-1.0, 6.0, -1.0])+(1.-msk_arg0)*numpy.array([4.0, -5.0, -2.0])
+      arg1=Data(numpy.array([[0.0, -3.0], [0.0, 1.0], [6.0, -5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-6.0, 14.0])+(1.-msk_ref)*numpy.array([-12.0, -7.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[-5.0, 0.0, -6.0], [-6.0, 2.0, 4.0]])
-      arg1=Data(numpy.array([[1.0, 4.0], [5.0, -6.0], [7.0, -3.0]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[-47.0, -2.0], [32.0, -48.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-2.0, 1.0, 7.0], [-2.0, 0.0, -3.0]])+(1.-msk_arg0)*numpy.array([[1.0, 3.0, 1.0], [7.0, 6.0, 
+-2.0]])
+      arg1=Data(numpy.array([[[-2.0, -6.0], [-5.0, -3.0], [2.0, 1.0]], [[-6.0, -3.0], [3.0, -3.0], [-5.0, 
+-7.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([40.0, 43.0])+(1.-msk_ref)*numpy.array([-29.0, -39.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank2_expandedData_rank1(self):
-      arg0=numpy.array([[3.0, 5.0, -3.0], [4.0, -5.0, -2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([3.0, -4.0, 5.0])+(1.-msk_arg1)*numpy.array([-7.0, -3.0, -5.0])
-      res=tensor_mult(arg0,arg1)
+   def test_generalTensorProduct_expandedData_rank3_constData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[6.0, -5.0, -3.0], [5.0, 0.0, -7.0], [4.0, 5.0, 0.0], [-2.0, 6.0, 0.0]], [[-4.0, -1.0, -2.0], 
+[-3.0, 2.0, -5.0], [3.0, -6.0, 1.0], [6.0, -3.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[5.0, -2.0, 0.0], [7.0, 3.0, -3.0], 
+[-5.0, -4.0, 2.0], [6.0, -3.0, -5.0]], [[5.0, -5.0, -4.0], [-5.0, -4.0, 5.0], [5.0, 4.0, 1.0], [0.0, 4.0, 4.0]]])
+      arg1=Data(numpy.array([[[[3.0, -3.0], [0.0, -1.0], [-2.0, 6.0]], [[-7.0, 7.0], [-6.0, -3.0], [-2.0, 5.0]], [[-6.0, -7.0], 
+[-3.0, -5.0], [-7.0, 2.0]], [[6.0, -1.0], [0.0, -4.0], [1.0, 1.0]]], [[[-5.0, -4.0], [0.0, 5.0], [0.0, 0.0]], [[0.0, -6.0], 
+[4.0, 4.0], [1.0, 5.0]], [[3.0, 4.0], [-1.0, 2.0], [1.0, 4.0]], [[-3.0, 2.0], [2.0, 7.0], [6.0, 0.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-26.0, 22.0])+(1.-msk_ref)*numpy.array([-21.0, -3.0])
+      ref=msk_ref*numpy.array([-39.0, -99.0])+(1.-msk_ref)*numpy.array([21.0, 126.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=tensor_mult(arg0,arg1)      
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[6.0, 7.0, 4.0], [-1.0, -4.0, 4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, -2.0], [-2.0, -3.0], [-5.0, -5.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 7.0], [-6.0, 
--6.0], [-4.0, 4.0]])
-      res=tensor_mult(arg0,arg1)
+   def test_generalTensorProduct_expandedData_rank0_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-6.0)
+      arg1=Data(numpy.array([[6.0, 6.0, -5.0, -1.0, -2.0], [-4.0, 5.0, 0.0, -6.0, 6.0], [2.0, 7.0, 4.0, -5.0, 2.0], [1.0, 4.0, 
+-4.0, 0.0, 5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-16.0, -53.0], [-15.0, -6.0]])+(1.-msk_ref)*numpy.array([[-70.0, 16.0], [10.0, 33.0]])
+      ref=msk_ref*numpy.array([[0.0, 0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0, 0.0], [0.0, 
+0.0, -0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-36.0, -36.0, 30.0, 6.0, 12.0], [24.0, -30.0, -0.0, 36.0, -36.0], [-12.0, 
+-42.0, -24.0, 30.0, -12.0], [-6.0, -24.0, 24.0, -0.0, -30.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_array_rank2(self):
-      arg0=numpy.array([[[[-7.0, 4.0, 2.0], [7.0, -2.0, 7.0]], [[3.0, 5.0, 0.0], [7.0, 0.0, -4.0]], [[0.0, -2.0, -4.0], [-3.0, 
--7.0, 0.0]], [[-1.0, -2.0, 5.0], [-5.0, 5.0, 4.0]], [[-5.0, -2.0, -1.0], [-5.0, 0.0, -2.0]]], [[[7.0, 0.0, -1.0], [5.0, -1.0, 
-7.0]], [[5.0, -6.0, -7.0], [-6.0, -2.0, 0.0]], [[-5.0, 4.0, 7.0], [-5.0, -4.0, 3.0]], [[0.0, -5.0, 1.0], [1.0, -4.0, -3.0]], 
-[[-3.0, 4.0, -6.0], [-4.0, -6.0, -2.0]]], [[[0.0, 5.0, 0.0], [7.0, -7.0, -2.0]], [[1.0, -6.0, 3.0], [0.0, -5.0, -5.0]], [[-6.0, 
--4.0, 4.0], [0.0, 0.0, 2.0]], [[-5.0, -3.0, -7.0], [-1.0, 3.0, -4.0]], [[5.0, -3.0, 3.0], [-6.0, -1.0, 0.0]]], [[[2.0, -7.0, 
-0.0], [-4.0, 5.0, 1.0]], [[-2.0, -4.0, -6.0], [6.0, 2.0, 4.0]], [[0.0, 1.0, -1.0], [4.0, -4.0, -7.0]], [[-5.0, 6.0, 6.0], [0.0, 
-2.0, 1.0]], [[-5.0, 2.0, -7.0], [-7.0, -4.0, -3.0]]]])
-      arg1=numpy.array([[0.0, 2.0, -5.0], [-2.0, -5.0, 1.0]])
-      res=tensor_mult(arg0,arg1)
-      ref=numpy.array([[1.0, -8.0, 57.0, -40.0, 9.0], [7.0, 45.0, 6.0, 0.0, 74.0], [29.0, -7.0, -26.0, 12.0, -4.0], [-30.0, 
-4.0, 12.0, -27.0, 70.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)        
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_array_rank3(self):
-      arg0=numpy.array([[[[6.0, 6.0, 2.0], [0.0, 5.0, 0.0]], [[-6.0, -2.0, -4.0], [-2.0, 4.0, -3.0]], [[-5.0, -6.0, 0.0], [5.0, 
-0.0, 7.0]], [[1.0, -7.0, -7.0], [2.0, 7.0, 4.0]], [[-6.0, -5.0, 2.0], [5.0, 0.0, 7.0]]], [[[-5.0, 7.0, 7.0], [-6.0, 0.0, 
--2.0]], [[0.0, -4.0, -4.0], [-2.0, 6.0, 4.0]], [[-7.0, -4.0, 0.0], [3.0, 0.0, 3.0]], [[-1.0, 1.0, 4.0], [0.0, 0.0, -4.0]], 
-[[0.0, 6.0, 3.0], [2.0, 6.0, -7.0]]], [[[-6.0, 7.0, -1.0], [7.0, -1.0, 7.0]], [[-6.0, 2.0, 2.0], [-7.0, -2.0, 7.0]], [[-1.0, 
--5.0, 1.0], [3.0, 0.0, 0.0]], [[-2.0, 0.0, -7.0], [-5.0, -3.0, -2.0]], [[2.0, 6.0, -5.0], [-2.0, -3.0, -7.0]]], [[[-4.0, 1.0, 
-0.0], [-4.0, 3.0, 2.0]], [[1.0, 0.0, 6.0], [-6.0, -5.0, -7.0]], [[-4.0, -6.0, 2.0], [-1.0, 6.0, 0.0]], [[7.0, 4.0, -7.0], 
-[-2.0, 2.0, 1.0]], [[-7.0, -1.0, -2.0], [0.0, -7.0, 3.0]]]])
-      arg1=numpy.array([[[3.0, -4.0], [-1.0, -1.0], [-6.0, -7.0]], [[-2.0, 1.0], [1.0, 2.0], [3.0, 1.0]]])
-      res=tensor_mult(arg0,arg1)
-      ref=numpy.array([[[5.0, -34.0], [7.0, 57.0], [2.0, 38.0], [67.0, 72.0], [-14.0, 27.0]], [[-58.0, -44.0], [50.0, 46.0], 
-[-14.0, 38.0], [-40.0, -29.0], [-43.0, -20.0]], [[-13.0, 36.0], [1.0, 4.0], [-10.0, 5.0], [37.0, 44.0], [10.0, 6.0]], [[4.0, 
-19.0], [-47.0, -69.0], [-10.0, 19.0], [68.0, 20.0], [-6.0, 32.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_array_rank4(self):
-      arg0=numpy.array([[[[-1.0, -6.0, -4.0], [-2.0, 3.0, 3.0]], [[3.0, -6.0, 2.0], [-2.0, -1.0, -3.0]], [[4.0, -4.0, -4.0], 
-[3.0, 1.0, 1.0]], [[6.0, -6.0, -6.0], [-4.0, -5.0, 0.0]], [[-2.0, 1.0, 7.0], [2.0, -1.0, -6.0]]], [[[-4.0, 6.0, 0.0], [2.0, 
--6.0, 1.0]], [[0.0, -7.0, 1.0], [7.0, 6.0, 4.0]], [[3.0, 4.0, -3.0], [2.0, 1.0, 7.0]], [[1.0, -6.0, 0.0], [2.0, 4.0, 6.0]], 
-[[-5.0, 6.0, 3.0], [-3.0, 0.0, 0.0]]], [[[-1.0, 5.0, -5.0], [0.0, -6.0, -5.0]], [[-5.0, -2.0, 6.0], [-5.0, 4.0, -6.0]], [[0.0, 
-4.0, -5.0], [6.0, 4.0, 0.0]], [[2.0, -2.0, -4.0], [7.0, -5.0, -4.0]], [[-7.0, 3.0, -7.0], [2.0, 0.0, -2.0]]], [[[6.0, -7.0, 
-1.0], [7.0, -6.0, -4.0]], [[6.0, 7.0, 4.0], [-6.0, 7.0, 0.0]], [[4.0, 0.0, -6.0], [0.0, 1.0, 7.0]], [[-5.0, 7.0, 1.0], [2.0, 
--1.0, -1.0]], [[-1.0, 0.0, 6.0], [7.0, -2.0, 4.0]]]])
-      arg1=numpy.array([[[[-2.0, 2.0, -6.0, 0.0, 0.0], [-2.0, 1.0, -4.0, 4.0, -3.0], [0.0, -7.0, 2.0, 2.0, 0.0], [3.0, 5.0, 
--1.0, -1.0, 0.0]], [[-5.0, -3.0, -1.0, 2.0, -6.0], [-3.0, -7.0, 2.0, -5.0, 3.0], [2.0, 6.0, -3.0, -4.0, 0.0], [5.0, 5.0, -1.0, 
-2.0, 7.0]], [[-1.0, 2.0, -7.0, 5.0, 2.0], [2.0, 0.0, -2.0, 4.0, 1.0], [3.0, -6.0, -6.0, 5.0, 7.0], [0.0, -3.0, 0.0, -6.0, 
--2.0]]], [[[4.0, 5.0, -2.0, 3.0, 3.0], [2.0, -5.0, 4.0, 4.0, -6.0], [3.0, 0.0, 0.0, -2.0, 6.0], [-1.0, 0.0, 4.0, -7.0, 0.0]], 
-[[0.0, -2.0, -1.0, 3.0, 0.0], [4.0, 3.0, -3.0, -1.0, -4.0], [2.0, 7.0, 6.0, -4.0, 0.0], [-2.0, 5.0, -4.0, -1.0, 6.0]], [[1.0, 
--1.0, 0.0, -4.0, 2.0], [-3.0, 7.0, -4.0, 7.0, -4.0], [-1.0, 4.0, 0.0, -7.0, -7.0], [-2.0, 6.0, -6.0, 1.0, -4.0]]]])
-      res=tensor_mult(arg0,arg1)
-      ref=numpy.array([[[[31.0, -11.0, 41.0, -41.0, 28.0], [11.0, 81.0, -29.0, 20.0, -31.0], [-27.0, 28.0, 58.0, -27.0, -61.0], 
-[-43.0, 10.0, -31.0, 27.0, -28.0]], [[11.0, 23.0, -21.0, 1.0, 28.0], [17.0, 31.0, -21.0, 22.0, 3.0], [-11.0, -88.0, 6.0, 69.0, 
-23.0], [-11.0, -44.0, 17.0, -15.0, -40.0]], [[29.0, 24.0, 1.0, -20.0, 27.0], [3.0, 27.0, -11.0, 38.0, -54.0], [-10.0, -17.0, 
-50.0, -13.0, -17.0], [-15.0, 23.0, 2.0, -9.0, -18.0]], [[8.0, 8.0, 25.0, -69.0, 12.0], [-34.0, 53.0, -25.0, 19.0, 2.0], [-52.0, 
--77.0, 36.0, 34.0, -66.0], [2.0, -7.0, 4.0, 51.0, -60.0]], [[-6.0, 25.0, -41.0, 64.0, 2.0], [33.0, -64.0, 31.0, -18.0, 32.0], 
-[33.0, -53.0, -55.0, 69.0, 103.0], [11.0, -67.0, 49.0, -57.0, 11.0]]], [[[-13.0, -5.0, 20.0, -4.0, -28.0], [-33.0, -67.0, 50.0, 
--25.0, 38.0], [5.0, 26.0, -62.0, -19.0, 5.0], [26.0, -14.0, 24.0, 9.0, 2.0]], [[66.0, 42.0, -20.0, 14.0, 73.0], [49.0, 60.0, 
--22.0, 89.0, -102.0], [18.0, 10.0, 51.0, -33.0, 21.0], [-62.0, 16.0, -13.0, -71.0, -31.0]], [[-8.0, -11.0, -6.0, -26.0, -10.0], 
-[-37.0, 17.0, -21.0, 36.0, -44.0], [0.0, 56.0, 18.0, -82.0, -58.0], [11.0, 91.0, -45.0, 15.0, 12.0]], [[42.0, 16.0, -8.0, 
--18.0, 54.0], [18.0, 87.0, -44.0, 80.0, -73.0], [-4.0, 9.0, 44.0, -36.0, -30.0], [-49.0, 31.0, -39.0, -25.0, -42.0]], [[-35.0, 
--37.0, 9.0, 18.0, -39.0], [-8.0, -32.0, 14.0, -50.0, 54.0], [12.0, 53.0, -46.0, -13.0, 3.0], [18.0, -4.0, -13.0, 20.0, 36.0]]], 
-[[[-23.0, -10.0, 42.0, -13.0, -50.0], [-32.0, -89.0, 62.0, -78.0, 57.0], [-12.0, 5.0, -23.0, 12.0, 0.0], [44.0, -25.0, 50.0, 
-42.0, 29.0]], [[-12.0, -19.0, -4.0, 47.0, -3.0], [52.0, 4.0, -4.0, -52.0, 53.0], [13.0, -9.0, -16.0, 64.0, 54.0], [-16.0, 
--69.0, 7.0, -10.0, 22.0]], [[9.0, 0.0, 15.0, 13.0, -16.0], [6.0, -46.0, 30.0, -20.0, -45.0], [19.0, 82.0, 42.0, -69.0, 1.0], 
-[6.0, 55.0, 4.0, -8.0, 62.0]], [[34.0, 51.0, 9.0, -2.0, 17.0], [0.0, -62.0, 55.0, 7.0, -22.0], [-1.0, -53.0, 4.0, 26.0, 42.0], 
-[7.0, -37.0, 72.0, -30.0, -20.0]], [[12.0, -25.0, 84.0, -15.0, -30.0], [1.0, -52.0, 64.0, -77.0, 19.0], [-7.0, 101.0, 19.0, 
--51.0, -23.0], [-4.0, -11.0, 24.0, 39.0, 43.0]]], [[[46.0, 86.0, -44.0, 10.0, 57.0], [13.0, -26.0, 22.0, 69.0, -40.0], [2.0, 
--148.0, -9.0, 83.0, 77.0], [-4.0, -62.0, 77.0, -73.0, -71.0]], [[-75.0, -45.0, -66.0, 37.0, -52.0], [-9.0, 8.0, -63.0, -26.0, 
-15.0], [22.0, 25.0, 9.0, -12.0, -8.0], [45.0, 88.0, -65.0, 19.0, 83.0]], [[5.0, -13.0, 17.0, -55.0, 2.0], [-37.0, 56.0, -35.0, 
-40.0, -50.0], [-23.0, 43.0, 50.0, -75.0, -91.0], [-4.0, 85.0, -50.0, 38.0, -10.0]], [[-19.0, -16.0, 13.0, 26.0, -36.0], [-6.0, 
--74.0, 47.0, -49.0, 33.0], [22.0, 60.0, -43.0, -26.0, 26.0], [22.0, -4.0, 16.0, -1.0, 45.0]], [[28.0, 45.0, -48.0, 29.0, 41.0], 
-[8.0, -14.0, 10.0, 78.0, -41.0], [31.0, -27.0, -50.0, -6.0, 56.0], [-14.0, -9.0, 13.0, -78.0, -40.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank1_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([7.0, 2.0, 5.0])+(1.-msk_arg0)*numpy.array([-7.0, 3.0, 5.0])
+      arg1=Data(numpy.array([[[5.0, 5.0, 0.0, 3.0, 1.0], [6.0, -5.0, -7.0, -5.0, -5.0], [-1.0, -2.0, 5.0, 6.0, -6.0], [1.0, 
+-7.0, 4.0, -1.0, 2.0]], [[3.0, 1.0, 7.0, -2.0, 1.0], [6.0, 3.0, 0.0, -1.0, 2.0], [0.0, -1.0, -3.0, -3.0, 5.0], [5.0, -4.0, 
+-2.0, 5.0, -5.0]], [[2.0, -1.0, -6.0, 6.0, -4.0], [3.0, 0.0, -7.0, -2.0, 4.0], [-1.0, 3.0, 4.0, -3.0, -7.0], [-7.0, -3.0, -1.0, 
+2.0, 5.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[51.0, 32.0, -16.0, 47.0, -11.0], [69.0, -29.0, -84.0, -47.0, -11.0], [-12.0, -1.0, 49.0, 21.0, 
+-67.0], [-18.0, -72.0, 19.0, 13.0, 29.0]])+(1.-msk_ref)*numpy.array([[-16.0, -37.0, -9.0, 3.0, -24.0], [-9.0, 44.0, 14.0, 22.0, 
+61.0], [2.0, 26.0, -24.0, -66.0, 22.0], [-27.0, 22.0, -39.0, 32.0, -4.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_constData_rank2(self):
-      arg0=numpy.array([[[[-1.0, -2.0, -5.0], [-5.0, 6.0, 0.0]], [[-6.0, 1.0, 7.0], [1.0, 3.0, 1.0]], [[-2.0, 3.0, 0.0], [6.0, 
--1.0, 1.0]], [[4.0, -2.0, 4.0], [7.0, 6.0, -5.0]], [[5.0, -2.0, 4.0], [-1.0, 3.0, 4.0]]], [[[-4.0, -5.0, -5.0], [0.0, 5.0, 
--5.0]], [[-3.0, 1.0, 0.0], [7.0, 6.0, -3.0]], [[3.0, 0.0, 6.0], [2.0, -5.0, -2.0]], [[-2.0, -6.0, -2.0], [3.0, -1.0, -1.0]], 
-[[0.0, -5.0, 3.0], [-2.0, 2.0, 4.0]]], [[[0.0, -6.0, 7.0], [-5.0, 0.0, -7.0]], [[6.0, -5.0, -6.0], [-2.0, -6.0, -4.0]], [[4.0, 
-4.0, 0.0], [6.0, 0.0, -3.0]], [[0.0, -2.0, -5.0], [-7.0, -1.0, -6.0]], [[-2.0, 7.0, 3.0], [-2.0, -7.0, 0.0]]], [[[-7.0, -6.0, 
-2.0], [3.0, 4.0, 3.0]], [[5.0, 3.0, -2.0], [7.0, 4.0, 2.0]], [[5.0, 1.0, 1.0], [6.0, -6.0, -3.0]], [[-6.0, -6.0, 5.0], [7.0, 
-2.0, -2.0]], [[-5.0, 2.0, -1.0], [-6.0, 4.0, -1.0]]]])
-      arg1=Data(numpy.array([[-1.0, 4.0, 5.0], [6.0, -5.0, 6.0]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[-92.0, 42.0, 61.0, -10.0, 10.0], [-96.0, 1.0, 52.0, -15.0, -3.0], [-61.0, -62.0, 30.0, -106.0, 
-68.0], [9.0, 31.0, 52.0, 27.0, -54.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[2.0, 5.0, 7.0], [-5.0, -7.0, -1.0]])+(1.-msk_arg0)*numpy.array([[7.0, -4.0, 1.0], [-1.0, 
+-4.0, -1.0]])
+      arg1=Data(numpy.array([[[[-2.0, 0.0, 1.0, 3.0, -4.0], [0.0, -7.0, -5.0, -1.0, -5.0], [-6.0, -2.0, -1.0, 7.0, 1.0], [2.0, 
+-5.0, 7.0, 4.0, 6.0]], [[6.0, 3.0, 4.0, -6.0, 4.0], [-4.0, 1.0, -6.0, -6.0, -1.0], [-6.0, 1.0, 0.0, 2.0, 0.0], [0.0, -3.0, 0.0, 
+7.0, 3.0]], [[-4.0, -6.0, 3.0, -2.0, 4.0], [2.0, 4.0, 3.0, -3.0, -1.0], [-1.0, -2.0, 7.0, -7.0, 2.0], [0.0, -5.0, -6.0, -6.0, 
+-1.0]]], [[[0.0, 0.0, 7.0, -5.0, 7.0], [3.0, -1.0, -4.0, 0.0, -5.0], [7.0, -7.0, -6.0, 2.0, 7.0], [-1.0, 7.0, -7.0, 2.0, 
+-4.0]], [[7.0, -2.0, 2.0, 5.0, -7.0], [-7.0, -1.0, -1.0, 2.0, 3.0], [-6.0, 4.0, -2.0, 1.0, 2.0], [-2.0, -7.0, 7.0, 1.0, -1.0]], 
+[[-7.0, 0.0, -4.0, -4.0, 1.0], [-3.0, -7.0, -6.0, -5.0, -1.0], [-7.0, 0.0, -4.0, 7.0, 7.0], [7.0, 4.0, 5.0, -4.0, 
+-5.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-44.0, -13.0, -2.0, -44.0, 53.0], [31.0, 38.0, 14.0, -62.0, -17.0], [-35.0, -6.0, 95.0, -49.0, 
+-40.0], [16.0, -50.0, -47.0, -12.0, 52.0]])+(1.-msk_ref)*numpy.array([[-63.0, -10.0, -17.0, 32.0, -20.0], [46.0, -37.0, 6.0, 
+11.0, -38.0], [5.0, -29.0, 18.0, 21.0, -13.0], [16.0, -11.0, 17.0, -8.0, 42.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_constData_rank3(self):
-      arg0=numpy.array([[[[-3.0, -6.0, 5.0], [6.0, 2.0, -3.0]], [[2.0, 4.0, 3.0], [-5.0, -7.0, -3.0]], [[1.0, -7.0, 7.0], [0.0, 
-3.0, 5.0]], [[5.0, 3.0, -2.0], [-7.0, 0.0, 0.0]], [[7.0, -7.0, -4.0], [-5.0, -2.0, 5.0]]], [[[-6.0, 4.0, -2.0], [0.0, -5.0, 
--1.0]], [[5.0, -1.0, 4.0], [3.0, -1.0, 7.0]], [[-4.0, -1.0, -4.0], [7.0, 6.0, 7.0]], [[2.0, -4.0, 4.0], [3.0, 1.0, 1.0]], 
-[[-5.0, 0.0, 5.0], [5.0, 6.0, 0.0]]], [[[0.0, 1.0, 1.0], [5.0, 2.0, 1.0]], [[0.0, 1.0, 6.0], [-6.0, 6.0, 4.0]], [[2.0, -4.0, 
--6.0], [6.0, 6.0, 5.0]], [[-4.0, -6.0, -4.0], [-2.0, 4.0, 7.0]], [[3.0, 5.0, 6.0], [-3.0, -1.0, 0.0]]], [[[-2.0, 2.0, -1.0], 
-[0.0, 4.0, 3.0]], [[3.0, -5.0, -5.0], [7.0, 1.0, 7.0]], [[-1.0, 2.0, -6.0], [-6.0, 7.0, 5.0]], [[3.0, -4.0, 7.0], [0.0, -7.0, 
--3.0]], [[-4.0, 4.0, 4.0], [-2.0, 1.0, -1.0]]]])
-      arg1=Data(numpy.array([[[7.0, 6.0], [7.0, -3.0], [-4.0, -3.0]], [[1.0, 7.0], [-4.0, 4.0], [-4.0, 
-5.0]]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[-73.0, 20.0], [65.0, -87.0], [-102.0, 43.0], [57.0, -22.0], [-1.0, 57.0]], [[18.0, -67.0], [-9.0, 
-73.0], [-64.0, 99.0], [-35.0, 42.0], [-74.0, 14.0]], [[-4.0, 42.0], [-63.0, -19.0], [-28.0, 133.0], [-100.0, 43.0], [33.0, 
--40.0]], [[-24.0, 16.0], [-19.0, 136.0], [-23.0, 17.0], [5.0, -34.0], [-18.0, -63.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank0_constData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(3.0)
+      arg1=Data(numpy.array([[[-6.0, -3.0], [2.0, -2.0]], [[1.0, 6.0], [4.0, 0.0]], [[-7.0, 7.0], [1.0, 4.0]], [[-3.0, 1.0], 
+[-2.0, -3.0]], [[7.0, -6.0], [-6.0, 2.0]], [[5.0, 0.0], [-3.0, 0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-36.0, -18.0], [12.0, -12.0]], [[6.0, 36.0], [24.0, 0.0]], [[-42.0, 42.0], [6.0, 24.0]], 
+[[-18.0, 6.0], [-12.0, -18.0]], [[42.0, -36.0], [-36.0, 12.0]], [[30.0, 0.0], [-18.0, 
+0.0]]])+(1.-msk_ref)*numpy.array([[[-18.0, -9.0], [6.0, -6.0]], [[3.0, 18.0], [12.0, 0.0]], [[-21.0, 21.0], [3.0, 12.0]], 
+[[-9.0, 3.0], [-6.0, -9.0]], [[21.0, -18.0], [-18.0, 6.0]], [[15.0, 0.0], [-9.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)    
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank1_constData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([4.0, -5.0, -5.0])+(1.-msk_arg0)*numpy.array([-5.0, -7.0, 0.0])
+      arg1=Data(numpy.array([[[[1.0, -1.0], [-7.0, -4.0]], [[-6.0, 6.0], [4.0, 2.0]], [[-5.0, -1.0], [6.0, -5.0]], [[0.0, 
+-5.0], [-2.0, -3.0]], [[-6.0, 0.0], [5.0, 6.0]], [[-1.0, -7.0], [7.0, -2.0]]], [[[-4.0, 0.0], [2.0, -6.0]], [[5.0, -2.0], [1.0, 
+7.0]], [[3.0, -7.0], [3.0, 2.0]], [[-2.0, 0.0], [3.0, -6.0]], [[7.0, 3.0], [-7.0, 5.0]], [[-7.0, -6.0], [-4.0, 3.0]]], [[[-4.0, 
+7.0], [0.0, -7.0]], [[-6.0, -4.0], [-2.0, -2.0]], [[0.0, 5.0], [-4.0, 6.0]], [[6.0, 1.0], [-7.0, 3.0]], [[3.0, 3.0], [-4.0, 
+-2.0]], [[-5.0, 6.0], [-5.0, -5.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[44.0, -39.0], [-38.0, 49.0]], [[-19.0, 54.0], [21.0, -17.0]], [[-35.0, 6.0], [29.0, -60.0]], 
+[[-20.0, -25.0], [12.0, 3.0]], [[-74.0, -30.0], [75.0, 9.0]], [[56.0, -28.0], [73.0, 2.0]]])+(1.-msk_ref)*numpy.array([[[23.0, 
+5.0], [21.0, 62.0]], [[-5.0, -16.0], [-27.0, -59.0]], [[4.0, 54.0], [-51.0, 11.0]], [[14.0, 25.0], [-11.0, 57.0]], [[-19.0, 
+-21.0], [24.0, -65.0]], [[54.0, 77.0], [-7.0, -11.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_constData_rank4(self):
-      arg0=numpy.array([[[[3.0, -7.0, -1.0], [2.0, 7.0, 0.0]], [[-3.0, 7.0, -6.0], [5.0, -5.0, 5.0]], [[5.0, 7.0, 3.0], [3.0, 
-0.0, -4.0]], [[4.0, 7.0, -5.0], [6.0, -3.0, 1.0]], [[-3.0, 3.0, 6.0], [-2.0, 4.0, -4.0]]], [[[3.0, 0.0, -1.0], [0.0, -4.0, 
-1.0]], [[-5.0, 6.0, -7.0], [-6.0, 1.0, -3.0]], [[3.0, 7.0, 1.0], [-6.0, -4.0, 7.0]], [[7.0, 3.0, 1.0], [-7.0, 6.0, -4.0]], 
-[[-4.0, 6.0, 5.0], [1.0, 6.0, 5.0]]], [[[-4.0, -6.0, -4.0], [-5.0, 2.0, 1.0]], [[0.0, -7.0, 3.0], [4.0, 1.0, 3.0]], [[-7.0, 
--2.0, -1.0], [4.0, 7.0, 5.0]], [[-5.0, 6.0, 4.0], [-4.0, 3.0, -5.0]], [[6.0, -5.0, 5.0], [-5.0, 4.0, -1.0]]], [[[2.0, 6.0, 
--3.0], [-2.0, 3.0, -2.0]], [[-1.0, 0.0, -5.0], [-1.0, -6.0, -5.0]], [[-2.0, 5.0, 4.0], [-7.0, -5.0, -7.0]], [[2.0, 1.0, -5.0], 
-[1.0, 0.0, 4.0]], [[-4.0, -1.0, -6.0], [0.0, 7.0, -2.0]]]])
-      arg1=Data(numpy.array([[[[7.0, 7.0, -6.0, 0.0, 3.0], [2.0, 0.0, -2.0, -6.0, 1.0], [0.0, -3.0, -2.0, 1.0, -6.0], [0.0, 
--1.0, -3.0, 0.0, -1.0]], [[2.0, 3.0, 1.0, 7.0, -1.0], [6.0, 7.0, -3.0, -2.0, -4.0], [3.0, -1.0, -3.0, 6.0, 6.0], [4.0, 7.0, 
--6.0, -5.0, -6.0]], [[-7.0, 4.0, 4.0, -4.0, -7.0], [2.0, -2.0, 1.0, -1.0, 3.0], [-3.0, 4.0, 6.0, -5.0, -4.0], [3.0, -2.0, 5.0, 
-7.0, -6.0]]], [[[-6.0, -1.0, -3.0, 1.0, 3.0], [4.0, 0.0, 0.0, 0.0, 6.0], [6.0, 0.0, -4.0, -1.0, 6.0], [-2.0, -4.0, 0.0, -6.0, 
-3.0]], [[3.0, -1.0, 2.0, 7.0, 6.0], [5.0, -3.0, 5.0, -1.0, -7.0], [-5.0, -4.0, 1.0, -7.0, 1.0], [-5.0, 4.0, 1.0, -3.0, -2.0]], 
-[[2.0, 2.0, 3.0, -2.0, -5.0], [5.0, 2.0, 4.0, 4.0, -5.0], [0.0, -1.0, -3.0, 0.0, 0.0], [0.0, 4.0, 4.0, 7.0, 
--1.0]]]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[23.0, -13.0, -21.0, 6.0, 71.0], [5.0, -68.0, 49.0, -10.0, -9.0], [-41.0, -34.0, 8.0, -85.0, 
--37.0], [-70.0, -30.0, 35.0, -5.0, 37.0]], [[0.0, -14.0, -9.0, 33.0, -14.0], [44.0, 86.0, -26.0, 35.0, -9.0], [94.0, -7.0, 
--91.0, 99.0, 109.0], [25.0, 44.0, -48.0, -57.0, 17.0]], [[2.0, 57.0, -32.0, 48.0, 16.0], [50.0, 35.0, -44.0, -63.0, 24.0], 
-[30.0, -6.0, -13.0, 29.0, 18.0], [31.0, 10.0, -58.0, -60.0, -52.0]], [[34.0, 28.0, -58.0, 52.0, 35.0], [54.0, 70.0, -45.0, 
--26.0, 13.0], [87.0, -28.0, -89.0, 86.0, 71.0], [16.0, 23.0, -78.0, -90.0, 7.0]], [[-41.0, 2.0, 47.0, 31.0, -16.0], [16.0, 
--11.0, 7.0, -14.0, -17.0], [-41.0, 18.0, 57.0, -41.0, 4.0], [14.0, 20.0, 9.0, -1.0, -61.0]]], [[[18.0, 23.0, -27.0, -26.0, 
--13.0], [-11.0, 16.0, -23.0, -9.0, 23.0], [23.0, 2.0, -19.0, 36.0, -18.0], [17.0, -13.0, -14.0, 12.0, 10.0]], [[59.0, -46.0, 
-19.0, 77.0, 31.0], [-22.0, 47.0, -22.0, 12.0, -78.0], [-2.0, -20.0, -16.0, 65.0, 59.0], [10.0, 77.0, -67.0, -67.0, -6.0]], 
-[[66.0, 70.0, 24.0, -3.0, -82.0], [41.0, 73.0, -18.0, -1.0, -65.0], [2.0, -3.0, -22.0, 74.0, -20.0], [63.0, 80.0, -22.0, 69.0, 
--68.0]], [[100.0, 55.0, -14.0, 60.0, 46.0], [16.0, -7.0, -8.0, -71.0, -66.0], [-66.0, -40.0, 29.0, -15.0, -64.0], [-1.0, 48.0, 
--44.0, -12.0, -60.0]], [[-29.0, 13.0, 74.0, 55.0, -39.0], [97.0, 24.0, 45.0, 21.0, -74.0], [-21.0, -3.0, 7.0, -36.0, 52.0], 
-[7.0, 76.0, 27.0, 16.0, -76.0]]], [[[26.0, -57.0, 24.0, -19.0, 14.0], [-57.0, -38.0, 36.0, 42.0, -41.0], [-46.0, -7.0, 21.0, 
--29.0, -24.0], [-36.0, 2.0, 34.0, 33.0, 44.0]], [[-50.0, -8.0, 4.0, -56.0, -11.0], [0.0, -52.0, 41.0, 22.0, 39.0], [-11.0, 
-12.0, 15.0, -68.0, -29.0], [-32.0, -55.0, 70.0, 50.0, 31.0]], [[-39.0, -60.0, 53.0, 33.0, 17.0], [48.0, -23.0, 74.0, 60.0, 
--52.0], [-14.0, -14.0, -10.0, -67.0, 65.0], [-54.0, 27.0, 55.0, -7.0, 18.0]], [[-28.0, -10.0, 55.0, 53.0, -18.0], [8.0, 15.0, 
--9.0, -9.0, -37.0], [-33.0, 18.0, 50.0, -6.0, 29.0], [29.0, 47.0, -18.0, -22.0, -68.0]], [[37.0, 46.0, -1.0, -30.0, 2.0], 
-[-13.0, -59.0, 24.0, -39.0, -12.0], [-80.0, -8.0, 60.0, -72.0, -112.0], [-15.0, -19.0, 37.0, 71.0, -28.0]]], [[[64.0, 15.0, 
--12.0, 77.0, 43.0], [31.0, 35.0, -18.0, -32.0, -54.0], [0.0, -34.0, -23.0, 34.0, 27.0], [4.0, 58.0, -62.0, -62.0, -30.0]], 
-[[6.0, -30.0, -38.0, -13.0, 18.0], [-71.0, 18.0, -53.0, -3.0, 45.0], [39.0, 12.0, -15.0, 67.0, 14.0], [17.0, -29.0, -48.0, 
--46.0, 45.0]], [[-19.0, 15.0, 23.0, -9.0, -55.0], [-54.0, 28.0, -60.0, -25.0, 18.0], [-14.0, 44.0, 57.0, 50.0, -21.0], [71.0, 
-9.0, -37.0, 11.0, -56.0]], [[53.0, 4.0, -22.0, 20.0, 23.0], [24.0, 25.0, 4.0, 7.0, -31.0], [24.0, -31.0, -53.0, 32.0, 20.0], 
-[-13.0, 27.0, -21.0, -18.0, 21.0]], [[29.0, -66.0, 7.0, 70.0, 83.0], [-1.0, -20.0, 32.0, 17.0, -57.0], [-20.0, -37.0, -12.0, 
--29.0, 49.0], [-57.0, 29.0, -13.0, -72.0, 34.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank0_constData_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(2.0)+(1-msk_arg0)*(3.0)
+      arg1=Data(numpy.array([[[[5.0, 1.0, -5.0, -7.0], [7.0, 4.0, 7.0, 2.0], [-4.0, 5.0, -3.0, 2.0]], [[5.0, 1.0, -6.0, -1.0], 
+[-4.0, -6.0, -5.0, 0.0], [4.0, 2.0, 7.0, 0.0]]], [[[-6.0, 6.0, 0.0, 0.0], [5.0, 7.0, 6.0, -3.0], [-3.0, -6.0, 3.0, -1.0]], 
+[[-2.0, 6.0, 7.0, -5.0], [-2.0, -7.0, 1.0, 5.0], [-5.0, 6.0, 3.0, 0.0]]], [[[1.0, 2.0, -6.0, 7.0], [2.0, 6.0, -5.0, -4.0], 
+[-2.0, -7.0, 7.0, 5.0]], [[-2.0, -2.0, 3.0, 3.0], [4.0, 5.0, -4.0, -3.0], [2.0, -3.0, 5.0, -6.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[10.0, 2.0, -10.0, -14.0], [14.0, 8.0, 14.0, 4.0], [-8.0, 10.0, -6.0, 4.0]], [[10.0, 2.0, 
+-12.0, -2.0], [-8.0, -12.0, -10.0, 0.0], [8.0, 4.0, 14.0, 0.0]]], [[[-12.0, 12.0, 0.0, 0.0], [10.0, 14.0, 12.0, -6.0], [-6.0, 
+-12.0, 6.0, -2.0]], [[-4.0, 12.0, 14.0, -10.0], [-4.0, -14.0, 2.0, 10.0], [-10.0, 12.0, 6.0, 0.0]]], [[[2.0, 4.0, -12.0, 14.0], 
+[4.0, 12.0, -10.0, -8.0], [-4.0, -14.0, 14.0, 10.0]], [[-4.0, -4.0, 6.0, 6.0], [8.0, 10.0, -8.0, -6.0], [4.0, -6.0, 10.0, 
+-12.0]]]])+(1.-msk_ref)*numpy.array([[[[15.0, 3.0, -15.0, -21.0], [21.0, 12.0, 21.0, 6.0], [-12.0, 15.0, -9.0, 6.0]], [[15.0, 
+3.0, -18.0, -3.0], [-12.0, -18.0, -15.0, 0.0], [12.0, 6.0, 21.0, 0.0]]], [[[-18.0, 18.0, 0.0, 0.0], [15.0, 21.0, 18.0, -9.0], 
+[-9.0, -18.0, 9.0, -3.0]], [[-6.0, 18.0, 21.0, -15.0], [-6.0, -21.0, 3.0, 15.0], [-15.0, 18.0, 9.0, 0.0]]], [[[3.0, 6.0, -18.0, 
+21.0], [6.0, 18.0, -15.0, -12.0], [-6.0, -21.0, 21.0, 15.0]], [[-6.0, -6.0, 9.0, 9.0], [12.0, 15.0, -12.0, -9.0], [6.0, -9.0, 
+15.0, -18.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_expandedData_rank2(self):
-      arg0=numpy.array([[[[6.0, -5.0, 2.0], [-7.0, -7.0, 6.0]], [[-4.0, 7.0, 0.0], [4.0, -4.0, 7.0]], [[-5.0, 0.0, 7.0], [2.0, 
--6.0, -1.0]], [[0.0, 5.0, 0.0], [5.0, 0.0, 5.0]], [[-5.0, 0.0, -2.0], [3.0, 3.0, 1.0]]], [[[7.0, 1.0, 2.0], [-6.0, -3.0, 0.0]], 
-[[7.0, -7.0, 7.0], [-7.0, 6.0, -2.0]], [[0.0, -7.0, 7.0], [6.0, 1.0, 4.0]], [[5.0, 5.0, 0.0], [-2.0, 7.0, -6.0]], [[6.0, -5.0, 
-7.0], [0.0, -6.0, -1.0]]], [[[6.0, -4.0, 0.0], [-2.0, -1.0, -4.0]], [[0.0, 6.0, 6.0], [-4.0, -2.0, 4.0]], [[0.0, -6.0, 6.0], 
-[5.0, -5.0, -6.0]], [[7.0, 2.0, 0.0], [0.0, 0.0, -2.0]], [[5.0, 3.0, 7.0], [-5.0, 4.0, 2.0]]], [[[0.0, 7.0, 1.0], [7.0, 2.0, 
-3.0]], [[6.0, -6.0, -7.0], [0.0, -7.0, 0.0]], [[-2.0, 4.0, 0.0], [-6.0, -3.0, -6.0]], [[-2.0, 0.0, 0.0], [-3.0, 5.0, -1.0]], 
-[[-1.0, 0.0, -6.0], [5.0, 4.0, -1.0]]]])
+   def test_generalTensorProduct_expandedData_rank0_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-3.0)+(1-msk_arg0)*(2.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, -2.0, 1.0], [2.0, -5.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -5.0, 1.0], [2.0, 
--6.0, -3.0]])
-      res=tensor_mult(arg0,arg1)
+      arg1=msk_arg1*(5.0)+(1-msk_arg1)*(2.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[27.0, 29.0, 50.0, 5.0, 0.0], [-11.0, -39.0, 32.0, -65.0, 34.0], [-7.0, 0.0, 47.0, -20.0, 
--37.0], [-6.0, 28.0, -7.0, -28.0, -15.0]])+(1.-msk_ref)*numpy.array([[13.0, -8.0, 70.0, -30.0, 3.0], [-25.0, -30.0, 36.0, 
--73.0, 47.0], [10.0, -32.0, 94.0, -32.0, -68.0], [-41.0, 41.0, 12.0, -25.0, -13.0]])
+      ref=msk_ref*numpy.array(-15.0)+(1.-msk_ref)*numpy.array(4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=tensor_mult(arg0,arg1)        
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_expandedData_rank3(self):
-      arg0=numpy.array([[[[-3.0, 1.0, -6.0], [-6.0, 7.0, -4.0]], [[5.0, 2.0, 5.0], [7.0, -3.0, -2.0]], [[-7.0, 6.0, 5.0], [0.0, 
-1.0, 7.0]], [[-6.0, 7.0, -1.0], [5.0, 4.0, -6.0]], [[-4.0, -4.0, 4.0], [-6.0, 7.0, -2.0]]], [[[5.0, 4.0, -1.0], [-4.0, 3.0, 
-0.0]], [[2.0, -2.0, 5.0], [-5.0, -3.0, 6.0]], [[-6.0, 0.0, -6.0], [-2.0, 0.0, 0.0]], [[-5.0, -3.0, -3.0], [4.0, -1.0, 2.0]], 
-[[6.0, 6.0, -2.0], [-6.0, 2.0, 6.0]]], [[[-2.0, 5.0, 1.0], [5.0, 7.0, 5.0]], [[2.0, -1.0, 5.0], [0.0, -6.0, 3.0]], [[-3.0, 
--2.0, 6.0], [-7.0, -6.0, 1.0]], [[5.0, 3.0, -5.0], [0.0, 0.0, 4.0]], [[-4.0, -2.0, 2.0], [4.0, 0.0, -7.0]]], [[[7.0, 0.0, 6.0], 
-[4.0, -5.0, 1.0]], [[-2.0, 2.0, -3.0], [3.0, 2.0, 3.0]], [[4.0, 3.0, -4.0], [4.0, -5.0, 3.0]], [[-5.0, -3.0, 1.0], [-3.0, 0.0, 
-6.0]], [[0.0, -4.0, 4.0], [-2.0, -1.0, 4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[5.0, 6.0], [4.0, 3.0], [-5.0, -6.0]], [[-6.0, -3.0], [0.0, -7.0], [7.0, 
-6.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, -2.0], [3.0, -6.0], [-3.0, 7.0]], [[2.0, -5.0], [3.0, -3.0], [5.0, -1.0]]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[27.0, -34.0], [-48.0, -6.0], [13.0, -19.0], [-69.0, -88.0], [-34.0, -103.0]], [[70.0, 39.0], 
-[49.0, 48.0], [12.0, 6.0], [-32.0, -14.0], [142.0, 106.0]], [[10.0, -37.0], [2.0, 39.0], [-4.0, 9.0], [90.0, 93.0], [-111.0, 
--96.0]], [[-12.0, 35.0], [16.0, 7.0], [49.0, 98.0], [18.0, 0.0], [4.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[28.0, -29.0], 
-[-44.0, -11.0], [83.0, 3.0], [52.0, -68.0], [-1.0, 71.0]], [[-14.0, -30.0], [-22.0, 71.0], [50.0, -20.0], [45.0, -12.0], [12.0, 
--44.0]], [[80.0, -70.0], [-33.0, 52.0], [-33.0, 112.0], [14.0, -67.0], [-15.0, 21.0]], [[-62.0, 22.0], [54.0, -53.0], [5.0, 
--62.0], [42.0, 44.0], [-11.0, 61.0]]])
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, 7.0, 0.0])+(1.-msk_arg0)*numpy.array([-5.0, -6.0, 6.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([5.0, 0.0, -6.0])+(1.-msk_arg1)*numpy.array([-2.0, -2.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-25.0)+(1.-msk_ref)*numpy.array(22.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=tensor_mult(arg0,arg1)   
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_array_rank4_expandedData_rank4(self):
-      arg0=numpy.array([[[[-5.0, -7.0, 4.0], [-7.0, 3.0, -7.0]], [[3.0, -2.0, 7.0], [-6.0, 2.0, 6.0]], [[-1.0, 6.0, -4.0], 
-[0.0, -1.0, 0.0]], [[7.0, -7.0, 0.0], [-1.0, -1.0, -5.0]], [[2.0, -1.0, 7.0], [7.0, -4.0, 0.0]]], [[[1.0, 2.0, -5.0], [1.0, 
-0.0, -4.0]], [[0.0, 6.0, 7.0], [0.0, 3.0, -6.0]], [[0.0, -2.0, -5.0], [-4.0, 0.0, -5.0]], [[4.0, 0.0, 7.0], [-6.0, -2.0, 
--6.0]], [[3.0, -3.0, 0.0], [-5.0, -1.0, -1.0]]], [[[5.0, -4.0, -7.0], [0.0, 7.0, -3.0]], [[6.0, 5.0, -4.0], [-2.0, -6.0, 2.0]], 
-[[5.0, 0.0, 5.0], [3.0, 3.0, 0.0]], [[-1.0, -3.0, 7.0], [4.0, -3.0, -7.0]], [[-6.0, 1.0, -2.0], [-6.0, -1.0, -1.0]]], [[[-6.0, 
--1.0, 2.0], [6.0, 0.0, -5.0]], [[5.0, 7.0, 2.0], [2.0, 3.0, 1.0]], [[3.0, -6.0, 1.0], [2.0, -3.0, 0.0]], [[-1.0, 7.0, 7.0], 
-[1.0, 0.0, -7.0]], [[-6.0, 0.0, -6.0], [3.0, 0.0, 6.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[3.0, -5.0, -6.0, -7.0, 0.0], [7.0, 3.0, 6.0, 5.0, 3.0], [2.0, -1.0, -3.0, -5.0, -3.0], 
-[5.0, 4.0, 0.0, 4.0, -7.0]], [[4.0, -7.0, 6.0, 0.0, -1.0], [4.0, 4.0, 1.0, -7.0, 7.0], [0.0, 7.0, -4.0, -5.0, -4.0], [4.0, 4.0, 
--7.0, 6.0, 2.0]], [[-2.0, -5.0, -2.0, -6.0, 2.0], [-5.0, 5.0, 1.0, 0.0, -2.0], [-5.0, 3.0, 4.0, -4.0, -2.0], [-7.0, 7.0, -7.0, 
--1.0, -6.0]]], [[[2.0, 5.0, 3.0, 6.0, -7.0], [-1.0, 5.0, 1.0, -5.0, -1.0], [-7.0, -3.0, 6.0, 0.0, -5.0], [-4.0, 0.0, 7.0, -2.0, 
-4.0]], [[-7.0, -6.0, 0.0, 1.0, 0.0], [-2.0, 7.0, 4.0, 5.0, 0.0], [0.0, -5.0, -4.0, 3.0, -3.0], [-6.0, 0.0, -3.0, 2.0, -1.0]], 
-[[5.0, 3.0, 1.0, -1.0, 0.0], [-2.0, 5.0, -5.0, -2.0, 1.0], [0.0, 0.0, -5.0, 2.0, -4.0], [2.0, 0.0, -2.0, -3.0, 
-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -1.0, -2.0, 3.0, 4.0], [-4.0, 0.0, 6.0, 7.0, -5.0], [-1.0, 1.0, -5.0, 0.0, 4.0], 
-[-4.0, -5.0, 3.0, -1.0, 3.0]], [[7.0, 6.0, -3.0, 1.0, -1.0], [-7.0, -2.0, 0.0, 0.0, 6.0], [4.0, 5.0, -7.0, 5.0, 1.0], [-2.0, 
-0.0, -5.0, -5.0, -4.0]], [[2.0, 2.0, -2.0, 1.0, 3.0], [0.0, 0.0, 7.0, 6.0, -2.0], [1.0, -6.0, 2.0, -6.0, -4.0], [2.0, -2.0, 
--6.0, -7.0, -6.0]]], [[[4.0, 7.0, -5.0, -7.0, 0.0], [7.0, 0.0, -7.0, 6.0, 0.0], [3.0, 5.0, -6.0, -6.0, -6.0], [0.0, -6.0, -1.0, 
--2.0, 4.0]], [[0.0, 2.0, 0.0, 0.0, 7.0], [3.0, 2.0, -2.0, 2.0, 0.0], [-3.0, -3.0, -7.0, -5.0, 6.0], [-3.0, -2.0, -1.0, 1.0, 
-0.0]], [[-1.0, 7.0, 6.0, -1.0, 6.0], [2.0, -1.0, 5.0, 0.0, 5.0], [5.0, 0.0, -4.0, 0.0, -6.0], [0.0, 6.0, 6.0, 2.0, 3.0]]]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-121.0, -20.0, -48.0, -21.0, 64.0], [-68.0, -72.0, 7.0, 88.0, -72.0], [19.0, -26.0, 40.0, 
-39.0, 89.0], [-85.0, -20.0, -23.0, -25.0, -62.0]], [[-9.0, -60.0, -56.0, -103.0, 58.0], [-32.0, 50.0, -5.0, 57.0, -7.0], [13.0, 
-12.0, -47.0, -15.0, -15.0], [-18.0, 53.0, -95.0, -9.0, -69.0]], [[36.0, -11.0, 50.0, 30.0, -14.0], [39.0, -6.0, -8.0, -52.0, 
-47.0], [18.0, 36.0, -33.0, -12.0, -10.0], [53.0, -8.0, -11.0, 34.0, 44.0]], [[-27.0, 0.0, -92.0, -51.0, 14.0], [34.0, -44.0, 
-55.0, 94.0, -32.0], [21.0, -48.0, 30.0, -13.0, 35.0], [7.0, 0.0, 55.0, 1.0, -86.0]], [[30.0, 21.0, -11.0, -18.0, -34.0], 
-[-24.0, 44.0, 9.0, -38.0, -22.0], [-80.0, 11.0, 84.0, -45.0, -39.0], [-47.0, 53.0, 19.0, -27.0, -26.0]]], [[[3.0, -1.0, 15.0, 
-33.0, -19.0], [47.0, -29.0, 24.0, -6.0, 22.0], [20.0, -5.0, -5.0, -3.0, 10.0], [36.0, -23.0, 36.0, 31.0, 15.0]], [[-41.0, 
--113.0, 16.0, -33.0, 8.0], [-5.0, 50.0, 55.0, -15.0, 22.0], [-35.0, 48.0, 22.0, -61.0, -23.0], [-55.0, 73.0, -88.0, 53.0, 
--57.0]], [[-31.0, 4.0, -19.0, 11.0, 20.0], [31.0, -78.0, 14.0, 44.0, -5.0], [53.0, -17.0, -11.0, 20.0, 58.0], [33.0, -43.0, 
-31.0, 16.0, -10.0]], [[-30.0, -91.0, -62.0, -102.0, 56.0], [15.0, -27.0, 47.0, 52.0, -2.0], [15.0, 45.0, 18.0, -66.0, 34.0], 
-[-5.0, 65.0, -73.0, 35.0, -116.0]], [[-11.0, -16.0, -52.0, -51.0, 38.0], [18.0, -40.0, 11.0, 58.0, -8.0], [41.0, -4.0, -18.0, 
--5.0, 35.0], [27.0, 0.0, -9.0, 5.0, -50.0]]], [[[-51.0, -13.0, -43.0, 17.0, -10.0], [46.0, -2.0, 62.0, 94.0, -2.0], [45.0, 
--89.0, -40.0, 38.0, 6.0], [10.0, -45.0, 62.0, 26.0, -20.0]], [[94.0, -13.0, -2.0, -38.0, 1.0], [92.0, -24.0, 1.0, -29.0, 65.0], 
-[46.0, 53.0, -52.0, -53.0, -10.0], [126.0, 16.0, -7.0, 44.0, -2.0]], [[-10.0, -53.0, -31.0, -44.0, -11.0], [1.0, 76.0, 50.0, 
-25.0, 2.0], [-36.0, -14.0, 11.0, -36.0, -49.0], [-40.0, 55.0, -23.0, 15.0, -56.0]], [[-35.0, 8.0, -21.0, -7.0, -11.0], [-38.0, 
--16.0, 25.0, -5.0, -49.0], [-65.0, 4.0, 114.0, -31.0, 18.0], [-78.0, 33.0, 23.0, -22.0, -50.0]], [[-20.0, 6.0, 27.0, 18.0, 
-37.0], [-18.0, -66.0, -42.0, -10.0, -2.0], [40.0, 30.0, -21.0, 28.0, 55.0], [16.0, -34.0, -30.0, -3.0, 29.0]]], [[[-39.0, 42.0, 
-39.0, 71.0, -37.0], [-52.0, -7.0, -4.0, -43.0, -40.0], [-64.0, -13.0, 91.0, 17.0, 8.0], [-82.0, -14.0, 45.0, -29.0, 32.0]], 
-[[27.0, -89.0, 15.0, -33.0, -17.0], [43.0, 89.0, 48.0, -21.0, 59.0], [-14.0, 29.0, -40.0, -57.0, -70.0], [15.0, 62.0, -60.0, 
-59.0, -24.0]], [[8.0, 50.0, -50.0, -18.0, -6.0], [-4.0, -21.0, 3.0, 32.0, -37.0], [-13.0, -33.0, 43.0, 2.0, 12.0], [-6.0, -5.0, 
-58.0, -35.0, -28.0]], [[-22.0, -95.0, 30.0, -22.0, 0.0], [-1.0, 30.0, 44.0, -45.0, 24.0], [-44.0, 68.0, 44.0, -72.0, -16.0], 
-[-44.0, 73.0, -77.0, 50.0, -45.0]], [[30.0, 93.0, 63.0, 90.0, -33.0], [-27.0, -3.0, -69.0, -57.0, -3.0], [-3.0, -21.0, -18.0, 
-66.0, -9.0], [12.0, -66.0, 51.0, -42.0, 114.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, -121.0, 16.0, 38.0, -22.0], [15.0, 27.0, 
-6.0, -47.0, -60.0], [-84.0, -108.0, 131.0, -32.0, 59.0], [33.0, 11.0, -42.0, 15.0, -60.0]], [[-42.0, 3.0, 52.0, 50.0, 85.0], 
-[-22.0, 2.0, 135.0, 31.0, -11.0], [2.0, -85.0, 11.0, -26.0, -6.0], [0.0, 39.0, 17.0, -16.0, -31.0]], [[38.0, 27.0, -8.0, -1.0, 
--29.0], [-41.0, -14.0, -32.0, -33.0, 49.0], [24.0, 56.0, -38.0, 59.0, 12.0], [-13.0, 15.0, -8.0, -2.0, -3.0]], [[-76.0, -93.0, 
--18.0, 26.0, -2.0], [1.0, 17.0, 26.0, 41.0, -102.0], [-60.0, -30.0, 47.0, -24.0, 51.0], [-11.0, -57.0, 28.0, 19.0, 30.0]], 
-[[27.0, 47.0, -50.0, -37.0, 2.0], [36.0, -6.0, 20.0, 90.0, -30.0], [34.0, 2.0, -3.0, -69.0, -87.0], [20.0, -58.0, -34.0, -64.0, 
--4.0]]], [[[8.0, -20.0, -27.0, -3.0, -37.0], [-19.0, 0.0, -56.0, -17.0, -3.0], [-15.0, 46.0, -19.0, 34.0, 44.0], [-18.0, -25.0, 
--2.0, 14.0, 17.0]], [[62.0, 14.0, -68.0, 19.0, 0.0], [-45.0, 0.0, 13.0, 48.0, -8.0], [-8.0, -21.0, -25.0, -27.0, 32.0], [-7.0, 
--56.0, -111.0, -88.0, -84.0]], [[-35.0, -85.0, 6.0, 26.0, -43.0], [-24.0, 9.0, -32.0, -54.0, -27.0], [-50.0, 0.0, 48.0, 44.0, 
-72.0], [-6.0, 4.0, 14.0, 43.0, 7.0]], [[-20.0, -78.0, -28.0, 67.0, -13.0], [-76.0, 2.0, 89.0, 30.0, -64.0], [-39.0, -62.0, 
-68.0, 4.0, 48.0], [4.0, -30.0, -58.0, -55.0, -72.0]], [[-52.0, -65.0, 22.0, 42.0, 2.0], [-31.0, 5.0, 50.0, -11.0, -38.0], 
-[-32.0, -34.0, 47.0, 20.0, 39.0], [-3.0, 11.0, 24.0, 19.0, -2.0]]], [[[-59.0, -50.0, -2.0, 7.0, 34.0], [23.0, 25.0, -48.0, 7.0, 
--50.0], [-64.0, 6.0, -48.0, -13.0, 104.0], [-47.0, -43.0, 52.0, 65.0, 64.0]], [[-7.0, 4.0, 3.0, 31.0, -23.0], [-87.0, -24.0, 
-44.0, -6.0, 18.0], [32.0, 63.0, -27.0, 91.0, 9.0], [-24.0, 14.0, 37.0, -1.0, 20.0]], [[2.0, 32.0, -35.0, -1.0, 56.0], [10.0, 
-6.0, 38.0, 89.0, -35.0], [0.0, -19.0, -54.0, -63.0, 0.0], [-19.0, -59.0, -21.0, -43.0, -3.0]], [[20.0, -30.0, -65.0, -20.0, 
--43.0], [30.0, 7.0, -14.0, 53.0, -62.0], [-18.0, -29.0, 65.0, -66.0, -35.0], [33.0, -69.0, -73.0, -58.0, -38.0]], [[4.0, -43.0, 
-37.0, 24.0, -44.0], [-30.0, -3.0, -11.0, -92.0, 35.0], [-12.0, -16.0, 66.0, 58.0, 21.0], [21.0, 66.0, -10.0, 24.0, -37.0]]], 
-[[[50.0, 11.0, -49.0, -54.0, -47.0], [63.0, 7.0, -89.0, 6.0, -5.0], [-3.0, 7.0, 25.0, -53.0, -39.0], [30.0, -40.0, -61.0, 
--25.0, -17.0]], [[40.0, 68.0, -39.0, 9.0, 46.0], [-44.0, -9.0, 29.0, 65.0, 18.0], [27.0, 29.0, -107.0, -4.0, 19.0], [-39.0, 
--41.0, -31.0, -53.0, -14.0]], [[-44.0, -29.0, 0.0, -10.0, 0.0], [35.0, 6.0, 17.0, 33.0, -53.0], [-11.0, -14.0, 38.0, -33.0, 
--28.0], [11.0, -23.0, 34.0, 13.0, 35.0]], [[78.0, 15.0, -80.0, 11.0, -32.0], [-52.0, -7.0, 1.0, 41.0, -2.0], [4.0, -3.0, -8.0, 
--13.0, 11.0], [4.0, -57.0, -123.0, -99.0, -90.0]], [[18.0, 57.0, 45.0, -51.0, -6.0], [57.0, -6.0, -69.0, -60.0, 72.0], [39.0, 
-45.0, -24.0, 18.0, -54.0], [12.0, 60.0, 51.0, 54.0, 48.0]]]])
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-5.0, -6.0, 6.0], [0.0, 7.0, -5.0]])+(1.-msk_arg0)*numpy.array([[0.0, -7.0, 2.0], [-1.0, 5.0, 
+-2.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, -3.0, -1.0], [-7.0, 0.0, 0.0]])+(1.-msk_arg1)*numpy.array([[6.0, 3.0, 6.0], [1.0, 5.0, 
+1.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(47.0)+(1.-msk_ref)*numpy.array(13.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank2_array_rank1(self):
-      arg0=Data(numpy.array([[-7.0, 2.0, 3.0], [5.0, -1.0, -4.0]]),self.functionspace)
-      arg1=numpy.array([-3.0, -4.0, -2.0])
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([7.0, -3.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 4.0, 1.0], [0.0, 0.0, 2.0], [0.0, -4.0, 2.0], [1.0, -2.0, -4.0]], [[-7.0, 6.0, 7.0], 
+[-7.0, -3.0, 6.0], [1.0, 5.0, -4.0], [-4.0, 5.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, -7.0, -3.0], [4.0, 5.0, 0.0], [-2.0, 
+-1.0, 7.0], [2.0, 5.0, 5.0]], [[7.0, 4.0, 2.0], [-3.0, -7.0, -4.0], [-5.0, -2.0, 4.0], [2.0, 3.0, 2.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[1.0, -2.0, -2.0], [2.0, 3.0, 1.0], [2.0, -7.0, 3.0], [-1.0, 3.0, -7.0]], [[-1.0, 0.0, -5.0], 
+[5.0, -3.0, 5.0], [-6.0, -6.0, -3.0], [-4.0, -3.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 0.0, -3.0], [6.0, 0.0, -7.0], 
+[-2.0, 1.0, 2.0], [-3.0, -7.0, 0.0]], [[-1.0, 5.0, 5.0], [3.0, -3.0, -4.0], [-2.0, 4.0, 0.0], [-5.0, -7.0, 2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-17.0)+(1.-msk_ref)*numpy.array(32.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[0.0, 3.0, -2.0], [-7.0, -3.0, -7.0]]),self.functionspace)
-      arg1=numpy.array([[2.0, 6.0], [-4.0, -1.0], [-2.0, 3.0]])
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[-8.0, -9.0], [12.0, -60.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[1.0, -7.0], [-7.0, 3.0], [3.0, -2.0]], [[-7.0, 4.0], [1.0, -3.0], [6.0, -7.0]]], [[[-4.0, 
+0.0], [-4.0, 5.0], [-4.0, -4.0]], [[0.0, 6.0], [5.0, 2.0], [1.0, 0.0]]], [[[0.0, 2.0], [-5.0, -7.0], [-5.0, 0.0]], [[-2.0, 
+-4.0], [0.0, 1.0], [0.0, -7.0]]], [[[-6.0, 0.0], [-4.0, -3.0], [7.0, 3.0]], [[-5.0, -3.0], [-3.0, 2.0], [-3.0, 
+7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 5.0], [-4.0, -1.0], [4.0, 0.0]], [[-2.0, 7.0], [-4.0, -5.0], [-5.0, 7.0]]], 
+[[[-5.0, 3.0], [-7.0, -6.0], [-6.0, -4.0]], [[6.0, -3.0], [1.0, -2.0], [1.0, 2.0]]], [[[-1.0, -4.0], [6.0, -2.0], [1.0, 4.0]], 
+[[0.0, 0.0], [-2.0, -6.0], [4.0, -7.0]]], [[[-3.0, -7.0], [0.0, -2.0], [-6.0, -1.0]], [[0.0, -3.0], [4.0, 1.0], [-1.0, 0.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[3.0, -5.0], [-7.0, 1.0], [-4.0, -6.0]], [[-6.0, -3.0], [-2.0, -2.0], [5.0, -7.0]]], [[[0.0, 
+0.0], [0.0, 0.0], [2.0, 2.0]], [[4.0, -6.0], [-1.0, -7.0], [4.0, -7.0]]], [[[3.0, -1.0], [5.0, -3.0], [-7.0, -3.0]], [[-4.0, 
+-4.0], [0.0, 2.0], [-5.0, 0.0]]], [[[2.0, 1.0], [-1.0, -6.0], [0.0, 3.0]], [[6.0, 0.0], [-4.0, -4.0], [-3.0, 
+2.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, 0.0], [-1.0, 0.0], [-5.0, 3.0]], [[-5.0, -2.0], [1.0, 6.0], [2.0, 6.0]]], [[[-5.0, 
+-5.0], [6.0, 6.0], [3.0, -4.0]], [[6.0, 6.0], [3.0, 6.0], [-7.0, -2.0]]], [[[5.0, -7.0], [-3.0, 7.0], [-2.0, 7.0]], [[-7.0, 
+7.0], [7.0, 2.0], [7.0, 4.0]]], [[[-5.0, 5.0], [-4.0, -2.0], [0.0, -5.0]], [[3.0, 7.0], [5.0, -4.0], [-3.0, 2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(207.0)+(1.-msk_ref)*numpy.array(-110.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank2_constData_rank1(self):
-      arg0=Data(numpy.array([[5.0, -6.0, 5.0], [-3.0, 7.0, -5.0]]),self.functionspace)
-      arg1=Data(numpy.array([-1.0, 3.0, -6.0]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([-53.0, 54.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank0_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(0.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-3.0, 1.0])+(1.-msk_arg1)*numpy.array([1.0, 3.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-18.0, 6.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[6.0, 3.0, -3.0], [-7.0, -7.0, -2.0]]),self.functionspace)
-      arg1=Data(numpy.array([[5.0, -4.0], [3.0, 3.0], [3.0, -6.0]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[30.0, 3.0], [-62.0, 19.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([3.0, -7.0, -1.0])+(1.-msk_arg0)*numpy.array([2.0, 3.0, 6.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, 1.0], [-5.0, 2.0], [-4.0, 0.0]])+(1.-msk_arg1)*numpy.array([[5.0, 2.0], [0.0, -7.0], 
+[-4.0, -6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([24.0, -11.0])+(1.-msk_ref)*numpy.array([-14.0, -53.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank2_expandedData_rank1(self):
-      arg0=Data(numpy.array([[6.0, 6.0, -5.0], [5.0, -6.0, -6.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, 1.0, 0.0], [-2.0, 4.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -1.0, -1.0], [-3.0, 
+3.0, 2.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, -2.0, 0.0])+(1.-msk_arg1)*numpy.array([-1.0, -6.0, -7.0])
-      res=tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[[4.0, 5.0], [-7.0, 1.0], [-4.0, 0.0]], [[1.0, -3.0], [2.0, 4.0], [2.0, 
+-5.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 7.0], [0.0, 2.0], [5.0, 7.0]], [[1.0, -7.0], [-4.0, 3.0], [-1.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([12.0, 32.0])+(1.-msk_ref)*numpy.array([-7.0, 73.0])
+      ref=msk_ref*numpy.array([9.0, 73.0])+(1.-msk_ref)*numpy.array([13.0, -14.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[-3.0, 5.0, -2.0], [-1.0, -1.0, -5.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-6.0, -4.0, 6.0], [1.0, -2.0, -5.0], [4.0, 4.0, 7.0], [2.0, -6.0, -5.0]], [[2.0, -1.0, 
+-2.0], [2.0, 3.0, 3.0], [7.0, 2.0, -6.0], [5.0, -2.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 3.0, 5.0], [3.0, 6.0, -5.0], 
+[-4.0, -2.0, -5.0], [-1.0, 0.0, 6.0]], [[-2.0, 5.0, 5.0], [-4.0, 3.0, 5.0], [-6.0, 0.0, 7.0], [5.0, 3.0, 6.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 4.0], [2.0, 6.0], [7.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 0.0], [-1.0, 4.0], 
-[-3.0, 1.0]])
-      res=tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[[[-5.0, -7.0], [6.0, -1.0], [-1.0, -5.0]], [[5.0, 1.0], [4.0, 6.0], [-5.0, 4.0]], [[-1.0, 
+0.0], [2.0, -7.0], [0.0, 1.0]], [[5.0, 0.0], [0.0, -3.0], [-7.0, 1.0]]], [[[2.0, 0.0], [-5.0, 3.0], [3.0, 0.0]], [[2.0, -1.0], 
+[-5.0, 6.0], [-4.0, 0.0]], [[-2.0, -3.0], [-4.0, -7.0], [0.0, -4.0]], [[0.0, 0.0], [2.0, 2.0], [-1.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 5.0], [5.0, 0.0], [-2.0, 0.0]], [[-4.0, -4.0], [0.0, -1.0], [-6.0, 5.0]], [[6.0, 
+7.0], [-7.0, 2.0], [7.0, 0.0]], [[7.0, -3.0], [-5.0, -3.0], [3.0, -3.0]]], [[[-6.0, -3.0], [5.0, -6.0], [3.0, -7.0]], [[3.0, 
+-6.0], [-2.0, -2.0], [-4.0, 5.0]], [[4.0, -6.0], [1.0, -3.0], [6.0, 0.0]], [[-2.0, 6.0], [-6.0, -7.0], [-7.0, 7.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[11.0, 16.0], [-32.0, -15.0]])+(1.-msk_ref)*numpy.array([[13.0, 18.0], [20.0, -9.0]])
+      ref=msk_ref*numpy.array([22.0, -43.0])+(1.-msk_ref)*numpy.array([-42.0, -14.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=3)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_array_rank2(self):
-      arg0=Data(numpy.array([[[[7.0, -6.0, 1.0], [-7.0, -2.0, 2.0]], [[0.0, -7.0, -1.0], [2.0, 0.0, -5.0]], [[3.0, 4.0, 3.0], 
-[-2.0, 5.0, 7.0]], [[0.0, 0.0, 4.0], [0.0, 6.0, -7.0]], [[2.0, 3.0, -2.0], [-1.0, -7.0, 0.0]]], [[[3.0, 2.0, 1.0], [3.0, 0.0, 
-3.0]], [[-4.0, 0.0, -2.0], [-5.0, 3.0, -5.0]], [[-7.0, -7.0, -2.0], [3.0, 0.0, 5.0]], [[-1.0, 7.0, -3.0], [-4.0, 0.0, 6.0]], 
-[[-7.0, 6.0, -1.0], [-4.0, -7.0, 2.0]]], [[[-3.0, 5.0, 0.0], [-4.0, -2.0, -4.0]], [[-1.0, 7.0, -6.0], [3.0, 0.0, 3.0]], [[-1.0, 
--1.0, -7.0], [1.0, 3.0, 6.0]], [[-2.0, 7.0, -4.0], [-2.0, -2.0, -3.0]], [[-6.0, -7.0, 0.0], [6.0, 4.0, -6.0]]], [[[-7.0, -4.0, 
-4.0], [-2.0, -7.0, 5.0]], [[-3.0, 1.0, -4.0], [1.0, -6.0, 7.0]], [[4.0, 0.0, 7.0], [-2.0, 6.0, -3.0]], [[-5.0, 2.0, 7.0], [3.0, 
-4.0, -2.0]], [[-7.0, 5.0, 5.0], [-5.0, 1.0, 3.0]]]]),self.functionspace)
-      arg1=numpy.array([[-3.0, -4.0, 1.0], [-2.0, 5.0, -3.0]])
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[2.0, 38.0, -14.0, 55.0, -53.0], [-31.0, 50.0, 26.0, -38.0, -37.0], [-1.0, -46.0, -5.0, -23.0, 
-72.0], [-5.0, -52.0, 38.0, 34.0, 12.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_mult(arg0,arg1)
+   def test_generalTensorProduct_expandedData_rank0_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(7.0)+(1-msk_arg0)*(4.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-2.0, -5.0, 0.0, 2.0, 3.0], [-7.0, -2.0, 5.0, -1.0, 5.0], [-4.0, 2.0, 6.0, 2.0, 2.0], [0.0, 
+-7.0, 0.0, -2.0, -7.0]])+(1.-msk_arg1)*numpy.array([[5.0, 0.0, 0.0, -4.0, -4.0], [0.0, 6.0, -7.0, 6.0, 1.0], [0.0, 0.0, -4.0, 
+-4.0, -6.0], [0.0, -7.0, 5.0, -1.0, -3.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-14.0, -35.0, 0.0, 14.0, 21.0], [-49.0, -14.0, 35.0, -7.0, 35.0], [-28.0, 14.0, 42.0, 14.0, 
+14.0], [0.0, -49.0, 0.0, -14.0, -49.0]])+(1.-msk_ref)*numpy.array([[20.0, 0.0, 0.0, -16.0, -16.0], [0.0, 24.0, -28.0, 24.0, 
+4.0], [0.0, 0.0, -16.0, -16.0, -24.0], [0.0, -28.0, 20.0, -4.0, -12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_array_rank3(self):
-      arg0=Data(numpy.array([[[[-5.0, -4.0, 7.0], [0.0, 5.0, -2.0]], [[1.0, 2.0, -7.0], [6.0, 0.0, 5.0]], [[-2.0, 5.0, 2.0], 
-[6.0, 4.0, 5.0]], [[4.0, -4.0, 0.0], [2.0, 3.0, 0.0]], [[5.0, 4.0, -5.0], [-1.0, -5.0, 0.0]]], [[[5.0, 5.0, -7.0], [4.0, -7.0, 
--3.0]], [[2.0, 7.0, 5.0], [3.0, -3.0, -1.0]], [[3.0, -5.0, -1.0], [-3.0, 6.0, -5.0]], [[-5.0, -1.0, 2.0], [-7.0, 3.0, -2.0]], 
-[[-4.0, 2.0, 6.0], [-6.0, 4.0, 2.0]]], [[[-5.0, 2.0, -4.0], [6.0, -1.0, -4.0]], [[-3.0, 0.0, 6.0], [-5.0, -3.0, -4.0]], [[4.0, 
-0.0, 7.0], [1.0, -1.0, 4.0]], [[7.0, 5.0, 6.0], [-4.0, 3.0, 1.0]], [[1.0, 0.0, -4.0], [0.0, -5.0, 5.0]]], [[[-3.0, 1.0, 4.0], 
-[6.0, 6.0, 3.0]], [[-3.0, 5.0, 3.0], [-2.0, -6.0, 0.0]], [[3.0, 4.0, 7.0], [7.0, 5.0, -4.0]], [[-7.0, -6.0, -6.0], [-7.0, -6.0, 
-2.0]], [[6.0, 4.0, -3.0], [0.0, -7.0, -3.0]]]]),self.functionspace)
-      arg1=numpy.array([[[3.0, 6.0], [0.0, 7.0], [3.0, -4.0]], [[-6.0, -3.0], [-3.0, -2.0], [-1.0, -5.0]]])
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[-7.0, -86.0], [-59.0, 5.0], [-53.0, -36.0], [-9.0, -16.0], [21.0, 91.0]], [[-6.0, 110.0], [13.0, 
-43.0], [11.0, 9.0], [26.0, -20.0], [28.0, -34.0]], [[-56.0, 4.0], [52.0, -1.0], [26.0, -25.0], [53.0, 54.0], [1.0, 7.0]], 
-[[-54.0, -72.0], [30.0, 23.0], [-23.0, 7.0], [19.0, -37.0], [33.0, 105.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_array_rank4(self):
-      arg0=Data(numpy.array([[[[2.0, 6.0, -1.0], [-2.0, -2.0, -2.0]], [[-4.0, -6.0, 3.0], [1.0, 6.0, 0.0]], [[1.0, 2.0, -6.0], 
-[-7.0, -5.0, -5.0]], [[5.0, 2.0, 6.0], [3.0, 0.0, -1.0]], [[-7.0, -1.0, 4.0], [1.0, -3.0, -5.0]]], [[[2.0, -6.0, -7.0], [-2.0, 
-5.0, 7.0]], [[6.0, -3.0, 6.0], [-2.0, -5.0, -4.0]], [[2.0, 7.0, -4.0], [-1.0, 6.0, -5.0]], [[0.0, -3.0, -7.0], [7.0, 0.0, 
--7.0]], [[-5.0, -5.0, -5.0], [0.0, -3.0, 6.0]]], [[[-6.0, -7.0, -3.0], [6.0, 3.0, 3.0]], [[-5.0, 6.0, -5.0], [3.0, -5.0, 6.0]], 
-[[3.0, -3.0, -6.0], [-5.0, -6.0, -6.0]], [[-1.0, -3.0, 1.0], [-4.0, 1.0, 2.0]], [[6.0, -6.0, 1.0], [2.0, -6.0, 5.0]]], [[[6.0, 
-6.0, 5.0], [2.0, 6.0, 1.0]], [[6.0, -6.0, -1.0], [7.0, -4.0, 6.0]], [[-3.0, -2.0, 0.0], [5.0, 1.0, 0.0]], [[-3.0, 2.0, 4.0], 
-[3.0, 4.0, -1.0]], [[-5.0, 0.0, 2.0], [1.0, 4.0, 0.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[6.0, 0.0, -1.0, 6.0, -4.0], [-2.0, -4.0, 1.0, 1.0, -2.0], [0.0, -7.0, -1.0, 2.0, 6.0], [3.0, -3.0, 
--3.0, 4.0, 0.0]], [[-1.0, 6.0, 0.0, 3.0, 2.0], [0.0, 4.0, 5.0, 7.0, -5.0], [-4.0, 0.0, 7.0, 4.0, 2.0], [-5.0, 1.0, -6.0, 1.0, 
--7.0]], [[4.0, 6.0, -7.0, -4.0, -1.0], [-7.0, 6.0, 1.0, 7.0, 0.0], [-3.0, -4.0, -7.0, 1.0, 0.0], [1.0, -4.0, -5.0, 2.0, 3.0]]], 
-[[[-5.0, 3.0, 1.0, 5.0, -1.0], [-1.0, 0.0, 0.0, 7.0, 7.0], [4.0, 0.0, 4.0, -7.0, -7.0], [-7.0, 5.0, 6.0, -5.0, -2.0]], [[-4.0, 
-7.0, 4.0, -3.0, -4.0], [-5.0, -3.0, 4.0, 0.0, 6.0], [6.0, -1.0, 0.0, 3.0, -7.0], [0.0, -7.0, -4.0, 4.0, 4.0]], [[6.0, -6.0, 
--6.0, 6.0, 0.0], [0.0, 6.0, -2.0, -1.0, -3.0], [-7.0, 2.0, -3.0, 1.0, -4.0], [-5.0, 3.0, 0.0, -6.0, -3.0]]]])
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[8.0, 22.0, 7.0, 18.0, 15.0], [15.0, 4.0, 27.0, 25.0, -54.0], [-27.0, -12.0, 45.0, 33.0, 60.0], 
-[-1.0, 2.0, -41.0, 26.0, -43.0]], [[-35.0, 27.0, 8.0, -67.0, -24.0], [-44.0, -8.0, -7.0, -18.0, 81.0], [55.0, 10.0, -55.0, 
--18.0, -85.0], [14.0, -43.0, 15.0, 3.0, 73.0]], [[5.0, -50.0, 44.0, -14.0, 33.0], [72.0, -47.0, -5.0, -71.0, -76.0], [-13.0, 
-12.0, 42.0, 33.0, 114.0], [61.0, 8.0, -7.0, 39.0, -23.0]], [[31.0, 63.0, -38.0, 21.0, -25.0], [-55.0, 18.0, 23.0, 83.0, 4.0], 
-[-7.0, -61.0, -18.0, 2.0, 17.0], [-5.0, -25.0, -39.0, 25.0, 1.0]], [[-48.0, 30.0, -2.0, -77.0, 33.0], [0.0, 27.0, -10.0, 26.0, 
-23.0], [13.0, 26.0, -9.0, -35.0, -10.0], [6.0, 15.0, 25.0, -8.0, 20.0]]], [[[22.0, -91.0, 23.0, 39.0, -31.0], [22.0, -47.0, 
--29.0, -110.0, 21.0], [18.0, 23.0, -24.0, 9.0, -49.0], [8.0, -8.0, 33.0, -24.0, 24.0]], [[69.0, 1.0, -46.0, -16.0, -14.0], 
-[-27.0, -9.0, -15.0, 17.0, -29.0], [-16.0, -69.0, -65.0, 1.0, 95.0], [73.0, -32.0, -22.0, 47.0, 35.0]], [[-60.0, 87.0, 79.0, 
--4.0, -13.0], [-5.0, -52.0, 67.0, 21.0, 5.0], [51.0, -14.0, 86.0, 48.0, 11.0], [-1.0, -45.0, -58.0, 66.0, -20.0]], [[-102.0, 
-3.0, 98.0, 12.0, -6.0], [42.0, -96.0, -8.0, -14.0, 85.0], [110.0, 14.0, 77.0, -75.0, -27.0], [-6.0, 39.0, 95.0, -10.0, 7.0]], 
-[[3.0, -117.0, -8.0, 20.0, 27.0], [60.0, 15.0, -59.0, -81.0, -1.0], [-25.0, 70.0, -13.0, -38.0, -43.0], [-25.0, 69.0, 82.0, 
--83.0, -10.0]]], [[[-65.0, -39.0, 27.0, -6.0, -5.0], [12.0, -13.0, -38.0, -37.0, 98.0], [58.0, 57.0, -7.0, -73.0, -125.0], 
-[-43.0, 41.0, 99.0, -73.0, 31.0]], [[-15.0, -56.0, -13.0, 74.0, 54.0], [67.0, 65.0, -12.0, 17.0, -47.0], [-69.0, 72.0, 76.0, 
--21.0, -28.0], [-101.0, 109.0, 42.0, -95.0, -101.0]], [[10.0, -75.0, 46.0, -10.0, 17.0], [71.0, -78.0, -30.0, -89.0, -44.0], 
-[16.0, -3.0, 16.0, -1.0, 113.0], [83.0, 11.0, 33.0, 34.0, 7.0]], [[29.0, -29.0, -18.0, -30.0, -3.0], [-6.0, 7.0, -15.0, -45.0, 
--11.0], [-15.0, 6.0, -49.0, 20.0, 1.0], [31.0, -25.0, -12.0, 7.0, 30.0]], [[90.0, -96.0, -65.0, 72.0, -15.0], [9.0, 6.0, -57.0, 
--20.0, -19.0], [-42.0, -30.0, -62.0, -38.0, 32.0], [10.0, 39.0, 49.0, -44.0, 2.0]]], [[[22.0, 108.0, -21.0, 32.0, -43.0], 
-[-79.0, 18.0, 63.0, 96.0, 5.0], [-2.0, -66.0, 6.0, 46.0, -12.0], [-26.0, -61.0, -91.0, 48.0, -10.0]], [[55.0, -85.0, -44.0, 
-105.0, -26.0], [8.0, -6.0, -53.0, 0.0, 25.0], [-11.0, -22.0, -31.0, -68.0, -21.0], [-32.0, 61.0, 81.0, -71.0, -9.0]], [[-45.0, 
-10.0, 12.0, -2.0, -1.0], [-4.0, 1.0, -9.0, 18.0, 57.0], [34.0, 20.0, 9.0, -46.0, -64.0], [-34.0, 25.0, 47.0, -35.0, 8.0]], 
-[[-41.0, 79.0, 0.0, -31.0, -7.0], [-45.0, 26.0, 29.0, 61.0, 44.0], [23.0, -1.0, 4.0, -4.0, -59.0], [-31.0, -21.0, -21.0, 5.0, 
-11.0]], [[-43.0, 43.0, 8.0, -45.0, 1.0], [-25.0, 20.0, 13.0, 16.0, 41.0], [22.0, 23.0, -5.0, -3.0, -65.0], [-20.0, -16.0, -5.0, 
--5.0, 20.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_constData_rank2(self):
-      arg0=Data(numpy.array([[[[0.0, 6.0, -6.0], [0.0, 3.0, 7.0]], [[7.0, 0.0, 4.0], [-7.0, -6.0, -6.0]], [[5.0, -3.0, 2.0], 
-[-5.0, -1.0, 4.0]], [[4.0, -3.0, 1.0], [0.0, -3.0, -2.0]], [[1.0, 5.0, -7.0], [4.0, 0.0, -1.0]]], [[[0.0, -2.0, 1.0], [-1.0, 
--3.0, 7.0]], [[0.0, 6.0, -3.0], [-7.0, 6.0, 3.0]], [[6.0, -1.0, 7.0], [-6.0, -5.0, 2.0]], [[6.0, 0.0, 0.0], [-7.0, -3.0, 
--4.0]], [[0.0, 1.0, 0.0], [-4.0, -5.0, -4.0]]], [[[3.0, 5.0, -2.0], [7.0, 3.0, -2.0]], [[-5.0, 0.0, 4.0], [-4.0, 5.0, 0.0]], 
-[[3.0, -4.0, 5.0], [2.0, -1.0, 0.0]], [[-4.0, 0.0, 4.0], [5.0, 0.0, 4.0]], [[0.0, 6.0, -6.0], [-5.0, -7.0, -1.0]]], [[[1.0, 
--3.0, 0.0], [4.0, 4.0, 5.0]], [[-7.0, 1.0, -7.0], [3.0, 3.0, -3.0]], [[5.0, 5.0, -5.0], [0.0, 3.0, 0.0]], [[0.0, -6.0, -5.0], 
-[-1.0, 6.0, 5.0]], [[-5.0, -4.0, -4.0], [4.0, 0.0, -6.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[-1.0, -6.0, -6.0], [0.0, 6.0, -7.0]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[-31.0, -25.0, -33.0, 4.0, 18.0], [-61.0, -3.0, -86.0, 4.0, -8.0], [11.0, 11.0, -15.0, -48.0, 
--35.0], [6.0, 82.0, 13.0, 67.0, 95.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_constData_rank3(self):
-      arg0=Data(numpy.array([[[[-1.0, 2.0, -7.0], [-6.0, 2.0, 6.0]], [[0.0, 3.0, 6.0], [-6.0, 5.0, -3.0]], [[5.0, 5.0, -2.0], 
-[2.0, 0.0, -2.0]], [[-1.0, 1.0, 5.0], [3.0, 1.0, -7.0]], [[-6.0, 0.0, -7.0], [-2.0, -2.0, 7.0]]], [[[-7.0, 4.0, 1.0], [1.0, 
-2.0, -2.0]], [[6.0, -5.0, -3.0], [1.0, 0.0, 7.0]], [[-4.0, 4.0, 2.0], [7.0, 0.0, 3.0]], [[-5.0, -7.0, 4.0], [-4.0, -5.0, 3.0]], 
-[[0.0, 6.0, 5.0], [-2.0, 7.0, 3.0]]], [[[-2.0, 1.0, 3.0], [0.0, -6.0, -7.0]], [[7.0, -7.0, -6.0], [-2.0, 6.0, 3.0]], [[4.0, 
-2.0, -1.0], [1.0, 4.0, -4.0]], [[1.0, 0.0, -6.0], [0.0, -7.0, 0.0]], [[-6.0, 0.0, 1.0], [1.0, -6.0, -6.0]]], [[[-6.0, -4.0, 
-1.0], [-5.0, 4.0, -4.0]], [[-7.0, 3.0, 7.0], [7.0, 7.0, 0.0]], [[3.0, 3.0, -2.0], [-4.0, 0.0, 0.0]], [[5.0, 3.0, -4.0], [-2.0, 
--4.0, -6.0]], [[5.0, 1.0, 7.0], [-1.0, 7.0, 2.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[0.0, -7.0], [4.0, 7.0], [5.0, 1.0]], [[-3.0, 1.0], [2.0, -6.0], [-3.0, 
-0.0]]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[-23.0, -4.0], [79.0, -9.0], [10.0, 0.0], [43.0, 16.0], [-54.0, 45.0]], [[28.0, 67.0], [-59.0, 
--79.0], [-4.0, 65.0], [-15.0, 16.0], [60.0, 3.0]], [[28.0, 60.0], [-49.0, -142.0], [20.0, -38.0], [-44.0, 29.0], [8.0, 80.0]], 
-[[24.0, -14.0], [40.0, 42.0], [14.0, -6.0], [8.0, 4.0], [50.0, -64.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_constData_rank4(self):
-      arg0=Data(numpy.array([[[[0.0, 1.0, -6.0], [-6.0, 6.0, -2.0]], [[5.0, -2.0, 0.0], [-7.0, 0.0, 4.0]], [[-3.0, -4.0, -6.0], 
-[-7.0, -6.0, 2.0]], [[-4.0, -2.0, -7.0], [0.0, 6.0, 3.0]], [[-3.0, 3.0, -4.0], [0.0, 5.0, 4.0]]], [[[-5.0, 1.0, -6.0], [-4.0, 
-5.0, 4.0]], [[2.0, 7.0, 6.0], [-7.0, 0.0, -3.0]], [[-6.0, -6.0, 7.0], [-2.0, 6.0, 6.0]], [[-5.0, 7.0, 6.0], [0.0, 3.0, -7.0]], 
-[[7.0, 5.0, -2.0], [1.0, -1.0, -1.0]]], [[[-2.0, 0.0, 6.0], [0.0, -3.0, 0.0]], [[0.0, 7.0, -1.0], [-6.0, 3.0, 2.0]], [[-3.0, 
-0.0, -2.0], [4.0, -5.0, 0.0]], [[-6.0, 3.0, 3.0], [0.0, 3.0, 6.0]], [[-2.0, 4.0, -2.0], [-4.0, -5.0, -7.0]]], [[[-4.0, 1.0, 
-0.0], [0.0, 3.0, 5.0]], [[5.0, 1.0, -7.0], [6.0, 0.0, 0.0]], [[-7.0, 3.0, 6.0], [-6.0, -2.0, 2.0]], [[0.0, -6.0, 6.0], [5.0, 
-7.0, 0.0]], [[-5.0, -4.0, -5.0], [6.0, -2.0, -5.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-2.0, 7.0, 4.0, -6.0, 4.0], [3.0, 1.0, 7.0, 2.0, -5.0], [-6.0, -2.0, -2.0, 0.0, -1.0], [-3.0, 
--2.0, 1.0, -5.0, 6.0]], [[-1.0, 0.0, 6.0, 7.0, -1.0], [7.0, 0.0, -5.0, -6.0, 2.0], [-1.0, 2.0, -4.0, -2.0, 6.0], [7.0, -1.0, 
--4.0, 2.0, 4.0]], [[3.0, -6.0, 4.0, -3.0, -1.0], [0.0, 0.0, -3.0, -7.0, -6.0], [7.0, 3.0, 1.0, 2.0, -6.0], [-5.0, -2.0, 2.0, 
-0.0, 3.0]]], [[[1.0, -7.0, 0.0, -5.0, 6.0], [-5.0, -2.0, 4.0, -2.0, 4.0], [-5.0, -4.0, 2.0, 4.0, -7.0], [-5.0, 1.0, -3.0, -6.0, 
-6.0]], [[-3.0, 4.0, 2.0, -1.0, -1.0], [-3.0, -1.0, -3.0, 0.0, 5.0], [1.0, 7.0, -6.0, -5.0, 4.0], [5.0, -2.0, 4.0, 5.0, 2.0]], 
-[[0.0, 7.0, 6.0, -4.0, 3.0], [6.0, -5.0, 0.0, 5.0, -2.0], [-4.0, -2.0, 3.0, -6.0, -1.0], [-4.0, 5.0, 0.0, -4.0, 
-4.0]]]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-43.0, 88.0, -18.0, 57.0, -43.0], [7.0, 16.0, -29.0, 38.0, 48.0], [1.0, 54.0, -64.0, -56.0, 
-110.0], [105.0, -17.0, 26.0, 76.0, -46.0]], [[-15.0, 112.0, 32.0, -25.0, -8.0], [60.0, -1.0, 17.0, 56.0, -65.0], [-9.0, 6.0, 
--4.0, -48.0, 28.0], [-10.0, 5.0, 34.0, -3.0, -4.0]], [[3.0, 54.0, -60.0, 41.0, -32.0], [28.0, 7.0, 7.0, 84.0, -19.0], [1.0, 
--38.0, 44.0, -14.0, 38.0], [8.0, 37.0, -2.0, 11.0, -98.0]], [[-29.0, 59.0, -26.0, 13.0, -4.0], [-26.0, -25.0, -15.0, 68.0, 
-82.0], [-29.0, 19.0, -18.0, -58.0, 55.0], [51.0, 27.0, 14.0, 34.0, -29.0]], [[-24.0, 51.0, 24.0, 30.0, -4.0], [21.0, -28.0, 
--39.0, 24.0, 62.0], [-24.0, 27.0, -28.0, -63.0, 61.0], [59.0, 21.0, -3.0, 30.0, 8.0]]], [[[-28.0, 77.0, -4.0, 54.0, -32.0], 
-[21.0, -22.0, -53.0, 54.0, 64.0], [-4.0, 37.0, -26.0, -79.0, 91.0], [81.0, 27.0, 11.0, 60.0, -42.0]], [[0.0, 6.0, 56.0, 66.0, 
--56.0], [72.0, 31.0, -67.0, -81.0, -54.0], [70.0, 62.0, -49.0, -12.0, 56.0], [60.0, -45.0, 7.0, 58.0, 4.0]], [[19.0, -4.0, 
-16.0, -47.0, -25.0], [-32.0, -38.0, -59.0, 9.0, -14.0], [83.0, 59.0, 21.0, -48.0, -40.0], [-43.0, 20.0, 62.0, 36.0, -15.0]], 
-[[12.0, -108.0, 10.0, 86.0, -57.0], [-17.0, 27.0, -97.0, -129.0, 32.0], [96.0, 77.0, -51.0, 25.0, 30.0], [77.0, -50.0, -9.0, 
-82.0, -6.0]], [[-21.0, 43.0, 42.0, -1.0, 29.0], [48.0, 11.0, 37.0, -9.0, -12.0], [-63.0, -19.0, -31.0, 1.0, 25.0], [18.0, 
--17.0, -24.0, -32.0, 56.0]]], [[[31.0, -62.0, 10.0, -3.0, -11.0], [3.0, 1.0, -23.0, -46.0, -41.0], [51.0, 1.0, 28.0, 27.0, 
--46.0], [-39.0, -2.0, -2.0, -5.0, 0.0]], [[-25.0, 74.0, 56.0, 71.0, -39.0], [82.0, -1.0, -65.0, -13.0, 7.0], [11.0, 52.0, 
--53.0, -67.0, 100.0], [91.0, -7.0, 0.0, 57.0, 3.0]], [[19.0, -57.0, -30.0, 9.0, 19.0], [-14.0, -6.0, 16.0, 0.0, 18.0], [-21.0, 
--51.0, 42.0, 37.0, -33.0], [-26.0, 24.0, -39.0, -34.0, -10.0]], [[9.0, -6.0, 48.0, 21.0, -15.0], [30.0, -39.0, -75.0, -21.0, 
-21.0], [33.0, 36.0, 3.0, -51.0, 12.0], [15.0, 27.0, 0.0, 27.0, 15.0]], [[5.0, -43.0, -44.0, 99.0, -50.0], [15.0, 46.0, -29.0, 
--41.0, 3.0], [37.0, 1.0, -13.0, 39.0, 53.0], [67.0, -25.0, -30.0, 45.0, -64.0]]], [[[-2.0, 19.0, 26.0, 8.0, -5.0], [16.0, 
--32.0, -42.0, 11.0, 27.0], [6.0, 21.0, 1.0, -47.0, 17.0], [14.0, 26.0, 4.0, 17.0, 6.0]], [[-26.0, 35.0, -2.0, -32.0, 62.0], 
-[-8.0, -7.0, 75.0, 41.0, 43.0], [-110.0, -53.0, -9.0, 8.0, 1.0], [-3.0, 9.0, -31.0, -59.0, 49.0]], [[29.0, -37.0, 22.0, 69.0, 
--65.0], [48.0, -3.0, -100.0, -52.0, -33.0], [101.0, 44.0, 14.0, -20.0, 21.0], [24.0, 7.0, 3.0, 59.0, -44.0]], [[8.0, -43.0, 
-2.0, -92.0, 23.0], [-88.0, -17.0, 11.0, -16.0, 7.0], [30.0, 35.0, -2.0, 9.0, -79.0], [-62.0, -15.0, 49.0, -7.0, 38.0]], [[11.0, 
--90.0, -98.0, 9.0, 12.0], [-97.0, 10.0, 30.0, 12.0, 71.0], [-13.0, -41.0, 30.0, 62.0, -34.0], [-8.0, 9.0, -25.0, -9.0, 
--49.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_expandedData_rank2(self):
-      arg0=Data(numpy.array([[[[0.0, -5.0, -6.0], [3.0, 1.0, -4.0]], [[1.0, 7.0, -2.0], [0.0, 7.0, -4.0]], [[5.0, -6.0, -6.0], 
-[-2.0, 1.0, 5.0]], [[1.0, 5.0, 6.0], [-4.0, -4.0, 0.0]], [[4.0, -7.0, 4.0], [-1.0, 3.0, 6.0]]], [[[2.0, 5.0, -1.0], [-6.0, 1.0, 
-2.0]], [[6.0, 2.0, 6.0], [5.0, 7.0, 4.0]], [[-7.0, 1.0, 6.0], [0.0, 6.0, 0.0]], [[-5.0, -3.0, 1.0], [7.0, 6.0, 2.0]], [[3.0, 
--3.0, -4.0], [-3.0, -7.0, -1.0]]], [[[-4.0, -4.0, 4.0], [0.0, -4.0, 0.0]], [[-2.0, 7.0, 4.0], [2.0, -7.0, -1.0]], [[2.0, 6.0, 
-1.0], [2.0, 0.0, 6.0]], [[-2.0, 0.0, -6.0], [1.0, 4.0, 3.0]], [[-6.0, 7.0, 6.0], [1.0, 3.0, -7.0]]], [[[-7.0, 0.0, 3.0], [-6.0, 
--5.0, -5.0]], [[-5.0, -5.0, 7.0], [-7.0, 6.0, -6.0]], [[-1.0, -3.0, 5.0], [-7.0, -6.0, -1.0]], [[7.0, 1.0, -2.0], [4.0, 0.0, 
-0.0]], [[-3.0, -4.0, 2.0], [-1.0, -3.0, 1.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-6.0, 0.0, 7.0])+(1.-msk_arg0)*numpy.array([5.0, -5.0, -5.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 1.0, -3.0], [5.0, 4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-1.0, 0.0, 7.0], [0.0, -5.0, 
--2.0]])
-      res=tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[[-5.0, 3.0, 7.0, 1.0, -7.0], [-5.0, -2.0, 2.0, -5.0, 0.0], [-1.0, 5.0, -1.0, 2.0, 2.0], [0.0, 
+-4.0, 5.0, -5.0, -6.0]], [[-2.0, -6.0, 0.0, -2.0, -1.0], [0.0, 3.0, 3.0, 2.0, -5.0], [5.0, -1.0, -6.0, 1.0, -1.0], [-2.0, -5.0, 
+1.0, -7.0, 4.0]], [[0.0, -7.0, 2.0, 0.0, 2.0], [-1.0, -3.0, -2.0, 0.0, 2.0], [-5.0, -4.0, 5.0, -4.0, -5.0], [7.0, -1.0, 4.0, 
+-2.0, 5.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 2.0, -5.0, -5.0, 7.0], [5.0, 0.0, 0.0, 2.0, -2.0], [3.0, -1.0, 7.0, -4.0, 2.0], 
+[1.0, -1.0, 5.0, 0.0, -2.0]], [[0.0, 0.0, 5.0, -3.0, 7.0], [-4.0, -7.0, -3.0, 1.0, 5.0], [1.0, 6.0, -4.0, 0.0, -2.0], [-5.0, 
+0.0, 7.0, 0.0, 0.0]], [[1.0, -7.0, -1.0, 2.0, 3.0], [-1.0, 1.0, -4.0, 5.0, 4.0], [5.0, -7.0, 0.0, -6.0, 0.0], [-2.0, -6.0, 
+-4.0, -3.0, 2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[16.0, 20.0, 1.0, -54.0, -8.0], [-20.0, 23.0, 42.0, 86.0, -53.0], [-12.0, -17.0, 27.0, 61.0, 
-8.0], [-44.0, -36.0, -76.0, -8.0, -8.0]])+(1.-msk_ref)*numpy.array([[-39.0, -42.0, -62.0, 61.0, -3.0], [-18.0, -7.0, 19.0, 
--22.0, 6.0], [52.0, 67.0, -7.0, -66.0, 47.0], [63.0, 36.0, 68.0, -21.0, 30.0]])
+      ref=msk_ref*numpy.array([[30.0, -67.0, -28.0, -6.0, 56.0], [23.0, -9.0, -26.0, 30.0, 14.0], [-29.0, -58.0, 41.0, -40.0, 
+-47.0], [49.0, 17.0, -2.0, 16.0, 71.0]])+(1.-msk_ref)*numpy.array([[10.0, 45.0, -45.0, -20.0, -15.0], [50.0, 30.0, 35.0, -20.0, 
+-55.0], [-15.0, 0.0, 55.0, 10.0, 20.0], [40.0, 25.0, 10.0, 15.0, -20.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_expandedData_rank3(self):
-      arg0=Data(numpy.array([[[[-2.0, 7.0, -3.0], [-5.0, -1.0, -4.0]], [[2.0, -2.0, 4.0], [-7.0, 2.0, -2.0]], [[-2.0, 0.0, 
-2.0], [-3.0, 5.0, 4.0]], [[0.0, 0.0, 2.0], [2.0, 0.0, -3.0]], [[6.0, 6.0, -6.0], [4.0, 6.0, -1.0]]], [[[-1.0, 0.0, 1.0], [-2.0, 
-7.0, 2.0]], [[-6.0, -3.0, 1.0], [0.0, 7.0, -5.0]], [[0.0, 2.0, -3.0], [0.0, -6.0, 3.0]], [[6.0, -3.0, 4.0], [2.0, -2.0, 3.0]], 
-[[-6.0, -1.0, 1.0], [5.0, -3.0, -1.0]]], [[[5.0, -5.0, -1.0], [4.0, -5.0, -4.0]], [[-2.0, 4.0, 7.0], [-4.0, 0.0, 5.0]], [[5.0, 
-2.0, 1.0], [-7.0, -7.0, 2.0]], [[4.0, 6.0, 7.0], [-3.0, -1.0, -1.0]], [[2.0, 5.0, -4.0], [-7.0, 6.0, -6.0]]], [[[2.0, -4.0, 
--4.0], [-5.0, -7.0, 1.0]], [[-7.0, 3.0, 7.0], [-3.0, -6.0, 1.0]], [[-4.0, -7.0, -5.0], [-1.0, 1.0, 7.0]], [[-5.0, 4.0, 3.0], 
-[-5.0, 1.0, 3.0]], [[6.0, -5.0, 0.0], [-1.0, -3.0, -6.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[7.0, 2.0, 5.0], [-7.0, -6.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 3.0, -1.0], [2.0, 2.0, 
+4.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-2.0, -2.0], [-7.0, -3.0], [-5.0, 3.0]], [[0.0, -7.0], [-1.0, -4.0], [5.0, 
-1.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, -5.0], [0.0, -7.0], [-5.0, -1.0]], [[3.0, 3.0], [0.0, 3.0], [2.0, 2.0]]])
-      res=tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[[[0.0, 2.0, -3.0, 4.0, -1.0], [-7.0, -7.0, -5.0, 3.0, 4.0], [7.0, -6.0, -2.0, -2.0, -3.0], 
+[1.0, 6.0, -7.0, -6.0, -6.0]], [[-6.0, -7.0, -7.0, 6.0, 0.0], [0.0, 2.0, 1.0, -4.0, -1.0], [3.0, -5.0, -6.0, 3.0, 7.0], [-3.0, 
+-7.0, -7.0, 1.0, -7.0]], [[-4.0, 5.0, 6.0, 4.0, -7.0], [3.0, 6.0, 5.0, -6.0, 0.0], [0.0, 0.0, -1.0, 7.0, 2.0], [-6.0, 7.0, 
+-6.0, 2.0, 6.0]]], [[[1.0, -1.0, -5.0, -4.0, -3.0], [0.0, 1.0, -7.0, 7.0, 7.0], [-7.0, 5.0, -1.0, -6.0, -1.0], [6.0, -6.0, 
+-7.0, -1.0, 7.0]], [[-4.0, 3.0, 5.0, -3.0, 0.0], [-5.0, 2.0, 0.0, -4.0, -6.0], [-7.0, -1.0, 0.0, 0.0, 0.0], [4.0, 6.0, 4.0, 
+0.0, -7.0]], [[7.0, 5.0, -3.0, -6.0, 1.0], [-5.0, -5.0, -6.0, 4.0, 0.0], [-3.0, 3.0, 4.0, 1.0, 1.0], [2.0, -1.0, 5.0, 4.0, 
+-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, 5.0, -7.0, -5.0, 2.0], [2.0, 3.0, -5.0, -2.0, 5.0], [4.0, -4.0, 2.0, 0.0, 7.0], 
+[-2.0, 6.0, -3.0, -3.0, 4.0]], [[5.0, -2.0, -1.0, -4.0, 3.0], [0.0, -1.0, 6.0, -2.0, -6.0], [3.0, 4.0, 5.0, 0.0, 1.0], [-2.0, 
+3.0, 4.0, -5.0, -1.0]], [[0.0, 5.0, -6.0, -6.0, -4.0], [2.0, 7.0, -1.0, 1.0, 5.0], [-1.0, -3.0, -3.0, -6.0, 4.0], [2.0, 5.0, 
+0.0, 5.0, 0.0]]], [[[2.0, 0.0, 3.0, -3.0, -5.0], [-5.0, 0.0, 1.0, -3.0, -6.0], [6.0, 0.0, -3.0, 2.0, 0.0], [-7.0, 4.0, 0.0, 
+-4.0, -1.0]], [[1.0, 7.0, -2.0, 1.0, -4.0], [0.0, -3.0, -2.0, -4.0, -5.0], [-2.0, 1.0, 4.0, 0.0, 6.0], [-6.0, -7.0, -3.0, 0.0, 
+-6.0]], [[3.0, -6.0, 6.0, -1.0, -5.0], [0.0, 0.0, 7.0, 1.0, 7.0], [-2.0, 1.0, 7.0, 0.0, 0.0], [0.0, 1.0, 2.0, -6.0, 0.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-49.0, 9.0], [-22.0, 53.0], [9.0, 15.0], [-25.0, -11.0], [-35.0, -101.0]], [[0.0, -7.0], 
-[-4.0, -9.0], [22.0, 12.0], [6.0, 6.0], [12.0, -6.0]], [[15.0, -10.0], [-34.0, 46.0], [-12.0, 66.0], [-89.0, 19.0], [-55.0, 
--12.0]], [[56.0, 60.0], [-31.0, 72.0], [116.0, 24.0], [-19.0, 41.0], [-4.0, 16.0]]])+(1.-msk_ref)*numpy.array([[[-8.0, -62.0], 
-[-45.0, -19.0], [-11.0, 22.0], [-10.0, -2.0], [40.0, -38.0]], [[-7.0, 23.0], [-15.0, 61.0], [21.0, -23.0], [-8.0, -7.0], [8.0, 
-40.0]], [[9.0, 0.0], [-37.0, -27.0], [-22.0, -78.0], [-46.0, -83.0], [-13.0, -56.0]], [[7.0, -12.0], [-42.0, -18.0], [36.0, 
-88.0], [-24.0, -12.0], [-15.0, -19.0]]])
+      ref=msk_ref*numpy.array([[-15.0, 14.0, 0.0, 106.0, -21.0], [-4.0, -34.0, 41.0, -42.0, 13.0], [146.0, -81.0, -24.0, 69.0, 
+10.0], [-95.0, 69.0, -68.0, -23.0, -33.0]])+(1.-msk_ref)*numpy.array([[13.0, -46.0, 64.0, 11.0, -35.0], [-22.0, -31.0, 70.0, 
+-7.0, -42.0], [-10.0, 41.0, 38.0, 10.0, -24.0], [-24.0, -28.0, 29.0, -37.0, -37.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       if not arg1.isLazy():
         arg0=arg0*1j
         arg1=arg1*1j
         ref=-ref
-        res=tensor_mult(arg0,arg1)
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")                
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_constData_rank4_expandedData_rank4(self):
-      arg0=Data(numpy.array([[[[-2.0, 0.0, -7.0], [-6.0, 0.0, 3.0]], [[-7.0, 0.0, -4.0], [-6.0, 5.0, 3.0]], [[6.0, 5.0, -3.0], 
-[-7.0, -3.0, -4.0]], [[7.0, 0.0, 3.0], [0.0, 4.0, 6.0]], [[-5.0, 0.0, -1.0], [0.0, 0.0, -6.0]]], [[[-5.0, 1.0, 7.0], [-1.0, 
-1.0, -6.0]], [[6.0, -6.0, 1.0], [6.0, -3.0, -6.0]], [[-7.0, 6.0, -6.0], [-3.0, 0.0, -6.0]], [[0.0, 0.0, 7.0], [2.0, 0.0, 
--3.0]], [[-4.0, -5.0, 4.0], [-7.0, 2.0, -4.0]]], [[[4.0, -1.0, 0.0], [-3.0, 2.0, -4.0]], [[3.0, -2.0, -7.0], [3.0, 2.0, 5.0]], 
-[[-3.0, 7.0, 4.0], [5.0, 0.0, -1.0]], [[2.0, 6.0, 5.0], [0.0, -6.0, 1.0]], [[-4.0, 4.0, 2.0], [-1.0, -4.0, -3.0]]], [[[4.0, 
--5.0, 5.0], [-3.0, -7.0, -3.0]], [[-6.0, -7.0, 5.0], [-6.0, 7.0, 1.0]], [[-2.0, 1.0, -7.0], [0.0, 5.0, 0.0]], [[3.0, 2.0, 1.0], 
-[0.0, -2.0, 1.0]], [[-1.0, -1.0, 5.0], [7.0, 1.0, 3.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-7.0, -4.0, -5.0, -6.0, -4.0], [0.0, 0.0, -5.0, 1.0, 6.0], [7.0, -1.0, -5.0, 4.0, 5.0], 
-[-5.0, 5.0, 0.0, 1.0, -3.0]], [[3.0, 1.0, 3.0, 4.0, -5.0], [5.0, 7.0, -2.0, -1.0, 0.0], [-5.0, -3.0, -5.0, 6.0, 3.0], [6.0, 
--5.0, 0.0, -4.0, 0.0]], [[6.0, -1.0, -4.0, -6.0, 1.0], [-1.0, -3.0, 2.0, -7.0, -4.0], [0.0, -2.0, 7.0, 5.0, 1.0], [4.0, 0.0, 
-0.0, 6.0, 4.0]]], [[[6.0, -2.0, 7.0, 1.0, -1.0], [-7.0, -5.0, 3.0, 4.0, 0.0], [-7.0, 4.0, -4.0, 0.0, 0.0], [0.0, -6.0, -7.0, 
--2.0, 1.0]], [[0.0, 0.0, 2.0, 0.0, 2.0], [4.0, -5.0, 3.0, 2.0, 0.0], [1.0, -3.0, -4.0, -2.0, 2.0], [6.0, -3.0, 6.0, -7.0, 
-5.0]], [[-4.0, -2.0, -7.0, -4.0, -1.0], [-1.0, 5.0, 0.0, -2.0, -1.0], [4.0, 0.0, 4.0, 4.0, -5.0], [0.0, -1.0, 4.0, 1.0, 
-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 7.0, 3.0, 3.0, -6.0], [2.0, 6.0, -4.0, 0.0, -4.0], [-7.0, 7.0, 2.0, 5.0, -3.0], 
-[-6.0, 1.0, -3.0, -7.0, 5.0]], [[5.0, -5.0, 0.0, 5.0, -3.0], [-4.0, 5.0, 6.0, 4.0, -7.0], [-6.0, 3.0, 6.0, 5.0, 2.0], [-1.0, 
-3.0, -4.0, 5.0, 0.0]], [[0.0, 6.0, 0.0, -1.0, 6.0], [-6.0, -1.0, 2.0, -1.0, 6.0], [3.0, 1.0, 1.0, -1.0, 2.0], [-3.0, -2.0, 
--4.0, 1.0, 3.0]]], [[[4.0, -6.0, 2.0, 2.0, 7.0], [-4.0, -3.0, 7.0, -5.0, 1.0], [4.0, -7.0, 4.0, 5.0, -4.0], [3.0, 1.0, -5.0, 
--7.0, -6.0]], [[-7.0, -3.0, -6.0, -2.0, 1.0], [0.0, 0.0, 0.0, 2.0, -1.0], [5.0, 3.0, 7.0, 6.0, 1.0], [-6.0, 5.0, -5.0, -2.0, 
--2.0]], [[-2.0, -6.0, -5.0, -7.0, -5.0], [0.0, -2.0, -1.0, 6.0, 5.0], [6.0, -6.0, 0.0, 7.0, -2.0], [1.0, -5.0, 2.0, -5.0, 
--6.0]]]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-76.0, 21.0, -25.0, 36.0, 4.0], [46.0, 66.0, -22.0, 17.0, 13.0], [40.0, -8.0, -3.0, -31.0, 
--32.0], [-18.0, 23.0, 54.0, -29.0, -10.0]], [[-23.0, 38.0, -2.0, 48.0, 37.0], [63.0, 32.0, 24.0, 1.0, -29.0], [10.0, -24.0, 
-23.0, -46.0, -44.0], [49.0, -17.0, 84.0, -51.0, 42.0]], [[-71.0, 6.0, -30.0, 11.0, -47.0], [69.0, 74.0, -76.0, -4.0, 52.0], 
-[47.0, -34.0, -52.0, 29.0, 56.0], [-30.0, 60.0, 15.0, -1.0, -76.0]], [[-55.0, -43.0, -81.0, -84.0, -23.0], [7.0, 1.0, -17.0, 
--18.0, 24.0], [77.0, -25.0, -6.0, 59.0, 16.0], [1.0, 17.0, 48.0, 3.0, 47.0]], [[53.0, 33.0, 71.0, 60.0, 25.0], [7.0, -27.0, 
-23.0, 14.0, -20.0], [-59.0, 7.0, -6.0, -49.0, 4.0], [21.0, -19.0, -24.0, -17.0, -25.0]]], [[[98.0, 28.0, 37.0, 15.0, 31.0], 
-[15.0, -44.0, 37.0, -45.0, -52.0], [-56.0, -19.0, 45.0, -5.0, 17.0], [65.0, -21.0, -11.0, 22.0, 11.0]], [[6.0, -31.0, 26.0, 
--36.0, 1.0], [-79.0, -90.0, -7.0, 35.0, 38.0], [3.0, 43.0, -29.0, -25.0, 37.0], [-80.0, 39.0, -84.0, 39.0, -59.0]], [[37.0, 
-58.0, 98.0, 123.0, 1.0], [63.0, 45.0, 2.0, 29.0, -12.0], [-82.0, -11.0, -49.0, -46.0, 7.0], [47.0, -41.0, -3.0, -67.0, -42.0]], 
-[[66.0, -5.0, 7.0, -28.0, 8.0], [-18.0, -46.0, 20.0, -35.0, -25.0], [-26.0, -6.0, 29.0, 23.0, 22.0], [28.0, -9.0, -26.0, 35.0, 
-12.0]], [[11.0, 29.0, -28.0, -11.0, 60.0], [32.0, -42.0, 23.0, -43.0, -36.0], [32.0, -23.0, 77.0, -46.0, -7.0], [18.0, 45.0, 
-45.0, 36.0, 7.0]]], [[[-33.0, -3.0, -12.0, -15.0, 0.0], [28.0, -22.0, -21.0, 5.0, 28.0], [40.0, -19.0, -27.0, -10.0, 41.0], 
-[-14.0, 41.0, 17.0, -4.0, -29.0]], [[-71.0, -23.0, -3.0, -1.0, -13.0], [-21.0, 7.0, -10.0, 60.0, 41.0], [32.0, 23.0, -54.0, 
--19.0, -19.0], [-43.0, -4.0, 11.0, -46.0, 6.0]], [[100.0, 7.0, 62.0, 31.0, -23.0], [-3.0, 7.0, 24.0, -16.0, -33.0], [-95.0, 
--6.0, -16.0, 46.0, 15.0], [73.0, -79.0, -39.0, -18.0, 24.0]], [[30.0, -9.0, -31.0, -22.0, -46.0], [0.0, 62.0, -30.0, -53.0, 
--9.0], [-18.0, -12.0, 23.0, 85.0, 16.0], [10.0, -3.0, -32.0, 51.0, -10.0]], [[58.0, 26.0, 30.0, 39.0, -6.0], [12.0, 32.0, 1.0, 
--28.0, -29.0], [-57.0, -4.0, 22.0, 14.0, 1.0], [28.0, -19.0, -29.0, 19.0, -19.0]]], [[[-19.0, -14.0, -69.0, -65.0, 6.0], 
-[-34.0, -15.0, -30.0, -46.0, 7.0], [55.0, 10.0, 68.0, 13.0, 11.0], [-72.0, 87.0, -33.0, 106.0, -48.0]], [[11.0, 22.0, -46.0, 
--32.0, 83.0], [29.0, -64.0, 57.0, -46.0, -57.0], [46.0, -28.0, 100.0, -51.0, -37.0], [50.0, 19.0, 88.0, 16.0, 73.0]], [[-25.0, 
-16.0, 51.0, 58.0, 6.0], [32.0, 3.0, 9.0, 56.0, 16.0], [-14.0, -2.0, -64.0, -47.0, -4.0], [18.0, -30.0, 30.0, -83.0, 3.0]], 
-[[-13.0, -13.0, -24.0, -20.0, -26.0], [0.0, 26.0, -23.0, -12.0, 13.0], [13.0, -5.0, -6.0, 37.0, 13.0], [-11.0, 10.0, -8.0, 
-16.0, -9.0]], [[64.0, -22.0, 12.0, -33.0, 6.0], [-58.0, -47.0, 41.0, -11.0, -29.0], [-38.0, 19.0, 25.0, 25.0, -16.0], [25.0, 
--48.0, -31.0, 15.0, 53.0]]]])+(1.-msk_ref)*numpy.array([[[[-16.0, -38.0, -33.0, -32.0, -87.0], [62.0, 7.0, -51.0, 55.0, -25.0], 
-[-13.0, 3.0, -35.0, -12.0, 10.0], [18.0, -9.0, 70.0, 34.0, -13.0]], [[-16.0, -70.0, -78.0, -60.0, -34.0], [34.0, -26.0, -25.0, 
-62.0, 8.0], [56.0, -14.0, -7.0, -10.0, 36.0], [9.0, 5.0, 48.0, 62.0, -39.0]], [[-16.0, 74.0, 42.0, 66.0, -101.0], [38.0, 93.0, 
--45.0, 28.0, -101.0], [-148.0, 118.0, -10.0, -23.0, 19.0], [-39.0, 25.0, 16.0, 55.0, 93.0]], [[-89.0, 19.0, -33.0, -32.0, 
--50.0], [-4.0, 27.0, -28.0, 41.0, 16.0], [16.0, 28.0, 45.0, 98.0, -23.0], [-69.0, -9.0, -41.0, -84.0, 0.0]], [[47.0, -5.0, 
-15.0, 28.0, 54.0], [-4.0, -17.0, 24.0, -35.0, -16.0], [-4.0, 0.0, -11.0, -66.0, 25.0], [27.0, 27.0, 7.0, 64.0, 8.0]]], [[[41.0, 
-41.0, 7.0, 21.0, 93.0], [-52.0, -17.0, 39.0, -32.0, 23.0], [15.0, 21.0, 6.0, -68.0, 48.0], [-7.0, 18.0, -29.0, 82.0, 36.0]], 
-[[-15.0, 87.0, 78.0, 47.0, 57.0], [6.0, -1.0, -10.0, -97.0, 3.0], [-30.0, 10.0, -20.0, -31.0, -43.0], [-3.0, 7.0, -25.0, -77.0, 
-39.0]], [[79.0, -61.0, 3.0, 51.0, -3.0], [10.0, 15.0, 37.0, 9.0, -83.0], [-53.0, 20.0, 4.0, -56.0, 45.0], [39.0, 50.0, 24.0, 
-124.0, 1.0]], [[14.0, 48.0, 19.0, 18.0, 71.0], [-50.0, -7.0, 31.0, -35.0, 29.0], [11.0, 11.0, 15.0, -18.0, 12.0], [-18.0, 3.0, 
--44.0, 8.0, 27.0]], [[-31.0, 81.0, -18.0, -31.0, 36.0], [16.0, -24.0, -51.0, -9.0, 46.0], [28.0, 40.0, -48.0, -100.0, 48.0], 
-[-20.0, -4.0, 33.0, 72.0, 54.0]]], [[[-51.0, 69.0, 14.0, 25.0, -20.0], [24.0, 36.0, -39.0, -9.0, -34.0], [-48.0, 76.0, 4.0, 
--16.0, 8.0], [-48.0, 28.0, -11.0, 4.0, 58.0]], [[-43.0, -65.0, -22.0, -27.0, -56.0], [44.0, -4.0, -22.0, 18.0, -14.0], [22.0, 
--37.0, 13.0, 74.0, -47.0], [7.0, -1.0, 12.0, -88.0, -58.0]], [[78.0, -56.0, 6.0, 39.0, 61.0], [-78.0, 0.0, 98.0, -7.0, -13.0], 
-[5.0, -25.0, 60.0, 34.0, 13.0], [13.0, 20.0, -62.0, 30.0, -27.0]], [[56.0, 26.0, 37.0, 36.0, -11.0], [-50.0, 35.0, 37.0, 13.0, 
--9.0], [-59.0, 13.0, 3.0, 6.0, 8.0], [4.0, -25.0, -18.0, 28.0, 31.0]], [[78.0, 0.0, 25.0, 33.0, 28.0], [-32.0, 3.0, 40.0, -7.0, 
--12.0], [-32.0, -1.0, -14.0, -52.0, 30.0], [32.0, -2.0, 7.0, 80.0, 18.0]]], [[[-10.0, 140.0, 63.0, 11.0, 8.0], [10.0, 9.0, 
--54.0, -42.0, 38.0], [-48.0, 36.0, -78.0, -88.0, -1.0], [-4.0, -44.0, 32.0, 2.0, 85.0]], [[-68.0, 32.0, -77.0, -91.0, 47.0], 
-[10.0, -60.0, -51.0, 17.0, 95.0], [116.0, -1.0, -24.0, -51.0, 43.0], [-31.0, -13.0, 23.0, 35.0, 1.0]], [[-16.0, -76.0, -36.0, 
--4.0, -28.0], [34.0, 0.0, 0.0, 21.0, -46.0], [12.0, -3.0, 30.0, 32.0, -1.0], [2.0, 40.0, 5.0, 2.0, -41.0]], [[1.0, 17.0, 16.0, 
-15.0, -25.0], [-8.0, 25.0, 1.0, 9.0, -13.0], [-34.0, 16.0, 5.0, 19.0, -7.0], [-10.0, -8.0, -9.0, -11.0, 16.0]], [[17.0, -35.0, 
--10.0, -22.0, 74.0], [-56.0, -43.0, 54.0, -24.0, 62.0], [79.0, -69.0, 32.0, 47.0, -22.0], [10.0, -17.0, -47.0, -59.0, -52.0]]]])
+        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank0_expandedData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(7.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-5.0, 3.0], [3.0, 1.0]], [[7.0, -2.0], [-7.0, 4.0]], [[3.0, 6.0], [3.0, -1.0]], [[-2.0, 
+7.0], [2.0, -4.0]], [[-7.0, 1.0], [-3.0, -3.0]], [[6.0, -3.0], [1.0, -6.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, -4.0], [0.0, 
+6.0]], [[1.0, 4.0], [-5.0, -7.0]], [[4.0, 5.0], [0.0, -7.0]], [[5.0, -2.0], [-1.0, -2.0]], [[2.0, 5.0], [-1.0, 7.0]], [[2.0, 
+-7.0], [4.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[25.0, -15.0], [-15.0, -5.0]], [[-35.0, 10.0], [35.0, -20.0]], [[-15.0, -30.0], [-15.0, 5.0]], 
+[[10.0, -35.0], [-10.0, 20.0]], [[35.0, -5.0], [15.0, 15.0]], [[-30.0, 15.0], [-5.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[14.0, 
+-28.0], [0.0, 42.0]], [[7.0, 28.0], [-35.0, -49.0]], [[28.0, 35.0], [0.0, -49.0]], [[35.0, -14.0], [-7.0, -14.0]], [[14.0, 
+35.0], [-7.0, 49.0]], [[14.0, -49.0], [28.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank2_array_rank1(self):
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank4_offset1(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, 1.0, 0.0], [7.0, 7.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 3.0, -1.0], [0.0, -5.0, 
--2.0]])
-      arg1=numpy.array([-1.0, 5.0, 0.0])
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([-6.0, -1.0, -7.0])+(1.-msk_arg0)*numpy.array([-6.0, -4.0, 4.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[3.0, 6.0], [-1.0, 3.0]], [[-5.0, -2.0], [6.0, 2.0]], [[-5.0, -7.0], [-1.0, 2.0]], [[3.0, 
+7.0], [4.0, 4.0]], [[-5.0, 0.0], [-5.0, -6.0]], [[3.0, 6.0], [-6.0, -7.0]]], [[[0.0, 1.0], [-2.0, 1.0]], [[-1.0, -4.0], [-5.0, 
+-7.0]], [[5.0, 5.0], [0.0, -4.0]], [[4.0, 7.0], [-6.0, 3.0]], [[0.0, 6.0], [7.0, 5.0]], [[-3.0, 4.0], [-6.0, -6.0]]], [[[0.0, 
+-1.0], [1.0, -6.0]], [[6.0, 2.0], [-6.0, 6.0]], [[1.0, 7.0], [-1.0, 4.0]], [[2.0, 7.0], [1.0, -2.0]], [[-5.0, -5.0], [-6.0, 
+3.0]], [[0.0, -2.0], [0.0, 6.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, -2.0], [7.0, 3.0]], [[2.0, 0.0], [0.0, 4.0]], [[4.0, 
+3.0], [0.0, -6.0]], [[-7.0, 5.0], [0.0, 0.0]], [[-4.0, 7.0], [4.0, -6.0]], [[7.0, 5.0], [7.0, -3.0]]], [[[-3.0, 7.0], [7.0, 
+4.0]], [[4.0, -4.0], [-3.0, -3.0]], [[-1.0, 4.0], [-6.0, 3.0]], [[6.0, 7.0], [5.0, 3.0]], [[6.0, -6.0], [0.0, -5.0]], [[-7.0, 
+-6.0], [5.0, 5.0]]], [[[0.0, 2.0], [-7.0, 5.0]], [[5.0, -4.0], [0.0, 7.0]], [[3.0, 5.0], [7.0, -4.0]], [[-5.0, -5.0], [-4.0, 
+7.0]], [[-1.0, 0.0], [-1.0, -4.0]], [[-4.0, 2.0], [5.0, 4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([9.0, 28.0])+(1.-msk_ref)*numpy.array([19.0, -25.0])
+      ref=msk_ref*numpy.array([[[-18.0, -30.0], [1.0, 23.0]], [[-11.0, 2.0], [11.0, -47.0]], [[18.0, -12.0], [13.0, -36.0]], 
+[[-36.0, -98.0], [-25.0, -13.0]], [[65.0, 29.0], [65.0, 10.0]], [[-15.0, -26.0], [42.0, 
+6.0]]])+(1.-msk_ref)*numpy.array([[[54.0, -8.0], [-98.0, -14.0]], [[-8.0, 0.0], [12.0, 16.0]], [[-8.0, -14.0], [52.0, 8.0]], 
+[[-2.0, -78.0], [-36.0, 16.0]], [[-4.0, -18.0], [-28.0, 40.0]], [[-30.0, 2.0], [-42.0, 14.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank2_array_rank2(self):
+   def test_generalTensorProduct_expandedData_rank0_expandedData_rank4_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, -5.0, 5.0], [7.0, -2.0, 0.0]])+(1.-msk_arg0)*numpy.array([[1.0, -2.0, -1.0], [6.0, 2.0, 
-0.0]])
-      arg1=numpy.array([[1.0, 6.0], [-5.0, 3.0], [0.0, 6.0]])
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(-7.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[2.0, -5.0, 3.0, 5.0], [-3.0, 3.0, 1.0, 7.0], [-3.0, -6.0, 0.0, -2.0]], [[-3.0, 3.0, 0.0, 
+-5.0], [3.0, -1.0, 0.0, 3.0], [-7.0, -4.0, -5.0, -7.0]]], [[[1.0, 3.0, -4.0, 0.0], [-4.0, -7.0, -5.0, -2.0], [-3.0, -5.0, -4.0, 
+5.0]], [[5.0, 0.0, 2.0, -5.0], [-4.0, 4.0, -1.0, -4.0], [-5.0, 3.0, -3.0, -5.0]]], [[[-3.0, 7.0, -6.0, -1.0], [-5.0, 7.0, -3.0, 
+1.0], [-1.0, -2.0, 1.0, -1.0]], [[-6.0, -7.0, 3.0, -4.0], [3.0, 6.0, 0.0, 2.0], [6.0, -3.0, 1.0, 
+5.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 2.0, 6.0, -7.0], [3.0, 0.0, 4.0, -5.0], [-4.0, 1.0, 4.0, 2.0]], [[-4.0, -1.0, 6.0, 
+2.0], [-2.0, -5.0, -2.0, -2.0], [-3.0, -1.0, -7.0, 0.0]]], [[[4.0, -7.0, -5.0, -4.0], [-4.0, 5.0, 7.0, 3.0], [4.0, -7.0, 7.0, 
+-5.0]], [[4.0, 2.0, 4.0, 0.0], [0.0, 5.0, 3.0, 0.0], [-7.0, 5.0, 2.0, 7.0]]], [[[1.0, -2.0, 4.0, 6.0], [0.0, 2.0, 0.0, 3.0], 
+[6.0, -5.0, 0.0, -5.0]], [[-2.0, 4.0, -5.0, 0.0], [-4.0, 0.0, 5.0, 0.0], [1.0, -5.0, -1.0, 0.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[19.0, -21.0], [17.0, 36.0]])+(1.-msk_ref)*numpy.array([[11.0, -6.0], [-4.0, 42.0]])
+      ref=msk_ref*numpy.array([[[[-12.0, 30.0, -18.0, -30.0], [18.0, -18.0, -6.0, -42.0], [18.0, 36.0, -0.0, 12.0]], [[18.0, 
+-18.0, -0.0, 30.0], [-18.0, 6.0, -0.0, -18.0], [42.0, 24.0, 30.0, 42.0]]], [[[-6.0, -18.0, 24.0, -0.0], [24.0, 42.0, 30.0, 
+12.0], [18.0, 30.0, 24.0, -30.0]], [[-30.0, -0.0, -12.0, 30.0], [24.0, -24.0, 6.0, 24.0], [30.0, -18.0, 18.0, 30.0]]], [[[18.0, 
+-42.0, 36.0, 6.0], [30.0, -42.0, 18.0, -6.0], [6.0, 12.0, -6.0, 6.0]], [[36.0, 42.0, -18.0, 24.0], [-18.0, -36.0, -0.0, -12.0], 
+[-36.0, 18.0, -6.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -14.0, -42.0, 49.0], [-21.0, -0.0, -28.0, 35.0], [28.0, 
+-7.0, -28.0, -14.0]], [[28.0, 7.0, -42.0, -14.0], [14.0, 35.0, 14.0, 14.0], [21.0, 7.0, 49.0, -0.0]]], [[[-28.0, 49.0, 35.0, 
+28.0], [28.0, -35.0, -49.0, -21.0], [-28.0, 49.0, -49.0, 35.0]], [[-28.0, -14.0, -28.0, -0.0], [-0.0, -35.0, -21.0, -0.0], 
+[49.0, -35.0, -14.0, -49.0]]], [[[-7.0, 14.0, -28.0, -42.0], [-0.0, -14.0, -0.0, -21.0], [-42.0, 35.0, -0.0, 35.0]], [[14.0, 
+-28.0, 35.0, -0.0], [28.0, -0.0, -35.0, -0.0], [-7.0, 35.0, 7.0, -0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank2_constData_rank1(self):
+   def test_generalTensorProduct_expandedData_rank1_float_rank0_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[2.0, -5.0, 5.0], [-4.0, -7.0, 6.0]])+(1.-msk_arg0)*numpy.array([[5.0, -2.0, -3.0], [5.0, 
--4.0, -6.0]])
-      arg1=Data(numpy.array([2.0, 1.0, 6.0]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([7.0, -3.0])+(1.-msk_arg0)*numpy.array([-7.0, 7.0])
+      arg1=-6.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([29.0, 21.0])+(1.-msk_ref)*numpy.array([-10.0, -30.0])
+      ref=msk_ref*numpy.array([-42.0, 18.0])+(1.-msk_ref)*numpy.array([42.0, -42.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank2_constData_rank2(self):
+   def test_generalTensorProduct_expandedData_rank1_array_rank0_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, 1.0, -7.0], [-1.0, -4.0, 3.0]])+(1.-msk_arg0)*numpy.array([[0.0, -2.0, -4.0], [5.0, 
--5.0, -3.0]])
-      arg1=Data(numpy.array([[5.0, -6.0], [-7.0, 5.0], [0.0, 0.0]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([-1.0, 0.0])+(1.-msk_arg0)*numpy.array([-2.0, -3.0])
+      arg1=numpy.array(-2.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-27.0, 29.0], [23.0, -14.0]])+(1.-msk_ref)*numpy.array([[14.0, -10.0], [60.0, -55.0]])
+      ref=msk_ref*numpy.array([2.0, -0.0])+(1.-msk_ref)*numpy.array([4.0, 6.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank2_expandedData_rank1(self):
+   def test_generalTensorProduct_expandedData_rank2_array_rank1_offset1(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 0.0, 2.0], [2.0, 2.0, 5.0]])+(1.-msk_arg0)*numpy.array([[5.0, 2.0, 3.0], [5.0, 5.0, 
+      arg0=msk_arg0*numpy.array([[3.0, 2.0, 3.0], [-5.0, 5.0, -7.0]])+(1.-msk_arg0)*numpy.array([[6.0, -6.0, -7.0], [-2.0, 0.0, 
 7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, 0.0, 6.0])+(1.-msk_arg1)*numpy.array([-2.0, -2.0, 1.0])
-      res=tensor_mult(arg0,arg1)
+      arg1=numpy.array([6.0, -1.0, 3.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([16.0, 32.0])+(1.-msk_ref)*numpy.array([-11.0, -13.0])
+      ref=msk_ref*numpy.array([25.0, -56.0])+(1.-msk_ref)*numpy.array([21.0, 9.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank2_expandedData_rank2(self):
+   def test_generalTensorProduct_expandedData_rank3_array_rank2_offset2(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, -4.0, -6.0], [2.0, 0.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-6.0, -6.0, -3.0], [-7.0, 
--2.0, -2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[2.0, 2.0], [0.0, 4.0], [3.0, -2.0]])+(1.-msk_arg1)*numpy.array([[2.0, 1.0], [-7.0, 1.0], 
-[-7.0, 5.0]])
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[[1.0, -6.0, -1.0], [-4.0, -4.0, 0.0]], [[0.0, -6.0, 3.0], [2.0, 0.0, 
+-3.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 2.0, -3.0], [5.0, 2.0, -7.0]], [[1.0, -3.0, -3.0], [2.0, -7.0, -5.0]]])
+      arg1=numpy.array([[6.0, -2.0, -3.0], [4.0, -4.0, 2.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-10.0, 4.0], [-11.0, 14.0]])+(1.-msk_ref)*numpy.array([[51.0, -27.0], [14.0, -19.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_array_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, -7.0, 3.0], [7.0, -2.0, -6.0]], [[0.0, -1.0, -7.0], [4.0, 1.0, 7.0]], [[0.0, -7.0, 
-5.0], [-5.0, 0.0, 3.0]], [[-6.0, 4.0, -6.0], [4.0, -6.0, 0.0]], [[-2.0, 6.0, 0.0], [1.0, 0.0, -7.0]]], [[[1.0, -1.0, 1.0], 
-[3.0, -2.0, 6.0]], [[-5.0, 1.0, -3.0], [0.0, -6.0, 5.0]], [[2.0, 4.0, -4.0], [-7.0, -5.0, 0.0]], [[6.0, 1.0, -5.0], [6.0, -4.0, 
-3.0]], [[-1.0, -7.0, 7.0], [-3.0, 1.0, 4.0]]], [[[-7.0, -6.0, 3.0], [-2.0, -4.0, 0.0]], [[4.0, -5.0, -6.0], [3.0, -2.0, 0.0]], 
-[[2.0, 3.0, -7.0], [5.0, 0.0, 7.0]], [[-2.0, -6.0, 6.0], [-4.0, 6.0, -2.0]], [[7.0, 0.0, -5.0], [-4.0, 3.0, 1.0]]], [[[1.0, 
--3.0, -4.0], [2.0, 2.0, -1.0]], [[5.0, 5.0, 1.0], [7.0, 0.0, 7.0]], [[-2.0, 7.0, -7.0], [-7.0, 3.0, 3.0]], [[0.0, -3.0, 1.0], 
-[3.0, 2.0, -2.0]], [[-1.0, 5.0, -3.0], [7.0, -4.0, 2.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, -7.0, -2.0], [0.0, -4.0, 4.0]], 
-[[2.0, 6.0, -5.0], [0.0, 0.0, 2.0]], [[4.0, 0.0, 0.0], [0.0, 7.0, -1.0]], [[-1.0, 5.0, 5.0], [-6.0, -1.0, 4.0]], [[0.0, -7.0, 
--4.0], [2.0, -7.0, -6.0]]], [[[0.0, 5.0, 0.0], [-1.0, 6.0, 3.0]], [[4.0, -6.0, -4.0], [3.0, 2.0, 3.0]], [[2.0, 0.0, 2.0], [1.0, 
-2.0, 4.0]], [[4.0, -3.0, -3.0], [6.0, -6.0, -7.0]], [[2.0, -3.0, 1.0], [2.0, -6.0, 7.0]]], [[[6.0, 0.0, 6.0], [-2.0, 0.0, 
--3.0]], [[3.0, 5.0, -5.0], [6.0, 0.0, -4.0]], [[5.0, 1.0, 1.0], [-2.0, 5.0, -4.0]], [[-2.0, -5.0, 0.0], [5.0, -6.0, 7.0]], 
-[[-1.0, 2.0, -5.0], [6.0, 4.0, 0.0]]], [[[4.0, 7.0, 6.0], [-3.0, 1.0, 7.0]], [[5.0, 0.0, 7.0], [-1.0, 5.0, 0.0]], [[-6.0, -1.0, 
-7.0], [-7.0, -4.0, 0.0]], [[2.0, 3.0, 2.0], [3.0, 3.0, -1.0]], [[7.0, 3.0, 7.0], [-7.0, 1.0, 0.0]]]])
-      arg1=numpy.array([[1.0, -7.0, -1.0], [3.0, 1.0, -6.0]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[94.0, -15.0, 11.0, -22.0, 1.0], [-22.0, -45.0, -48.0, 0.0, 9.0], [22.0, 52.0, -39.0, 40.0, 
--3.0], [40.0, -52.0, -80.0, 43.0, -28.0]])+(1.-msk_ref)*numpy.array([[18.0, -47.0, 17.0, -84.0, 88.0], [-50.0, 43.0, -19.0, 
-82.0, -20.0], [12.0, 15.0, 20.0, 0.0, 12.0], [-101.0, 0.0, -31.0, -3.0, -41.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_array_rank3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, 5.0, 6.0], [5.0, -2.0, 0.0]], [[-6.0, -5.0, 1.0], [4.0, -1.0, 3.0]], [[6.0, -3.0, 
--7.0], [7.0, 3.0, 7.0]], [[0.0, 0.0, 2.0], [-5.0, -4.0, 7.0]], [[-5.0, 3.0, -1.0], [1.0, 0.0, -5.0]]], [[[0.0, -6.0, 0.0], 
-[-2.0, 4.0, -1.0]], [[4.0, -4.0, 3.0], [-1.0, 3.0, -6.0]], [[-1.0, 5.0, 3.0], [5.0, -4.0, -1.0]], [[7.0, -6.0, 2.0], [6.0, 
--1.0, 4.0]], [[0.0, -1.0, -2.0], [-4.0, -4.0, 0.0]]], [[[-2.0, 5.0, -2.0], [-1.0, 6.0, -7.0]], [[-7.0, 0.0, -1.0], [4.0, 3.0, 
--3.0]], [[-1.0, 2.0, 7.0], [6.0, -7.0, 3.0]], [[1.0, 7.0, -5.0], [5.0, 7.0, -1.0]], [[1.0, 3.0, -3.0], [-7.0, -2.0, 1.0]]], 
-[[[6.0, 4.0, 0.0], [1.0, 5.0, 5.0]], [[-2.0, -1.0, -5.0], [-4.0, 5.0, 3.0]], [[7.0, 0.0, 0.0], [3.0, -6.0, -6.0]], [[4.0, 0.0, 
-4.0], [-4.0, -6.0, 0.0]], [[1.0, 0.0, -4.0], [-3.0, 5.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -7.0, 5.0], [-4.0, 6.0, 
--3.0]], [[5.0, -5.0, -4.0], [6.0, -7.0, -3.0]], [[7.0, 2.0, 0.0], [0.0, -3.0, 2.0]], [[0.0, -1.0, 7.0], [4.0, 0.0, 3.0]], 
-[[-4.0, -2.0, -6.0], [7.0, -1.0, -7.0]]], [[[-4.0, -4.0, 1.0], [-5.0, -3.0, -1.0]], [[-1.0, 6.0, -6.0], [5.0, 5.0, 1.0]], 
-[[6.0, 4.0, -1.0], [-1.0, 3.0, 5.0]], [[-6.0, -6.0, -5.0], [0.0, 0.0, -3.0]], [[4.0, -4.0, -1.0], [0.0, -5.0, 0.0]]], [[[-5.0, 
-2.0, 6.0], [5.0, -4.0, 2.0]], [[6.0, -3.0, 2.0], [4.0, 1.0, 6.0]], [[-6.0, -4.0, 5.0], [-5.0, 7.0, 2.0]], [[2.0, 4.0, -7.0], 
-[6.0, 1.0, 5.0]], [[-6.0, 5.0, -6.0], [3.0, 4.0, -6.0]]], [[[-3.0, -6.0, -6.0], [-3.0, -6.0, 0.0]], [[-2.0, -5.0, -6.0], [-4.0, 
--1.0, 5.0]], [[3.0, 5.0, 3.0], [-3.0, 3.0, 7.0]], [[6.0, 3.0, -6.0], [-4.0, 7.0, 3.0]], [[-6.0, 5.0, 5.0], [0.0, -5.0, 5.0]]]])
-      arg1=numpy.array([[[7.0, -4.0], [5.0, 2.0], [-6.0, 7.0]], [[5.0, -2.0], [-3.0, 7.0], [-5.0, 0.0]]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[41.0, 16.0], [-65.0, 6.0], [60.0, -72.0], [-60.0, -4.0], [16.0, 17.0]], [[-47.0, 20.0], [6.0, 
-20.0], [42.0, -3.0], [20.0, -45.0], [-1.0, -36.0]], [[35.0, 48.0], [-17.0, 34.0], [-3.0, -4.0], [81.0, 14.0], [6.0, -19.0]], 
-[[27.0, 17.0], [-39.0, 14.0], [112.0, -76.0], [2.0, -22.0], [21.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[-88.0, 71.0], [100.0, 
--119.0], [58.0, -45.0], [-42.0, 39.0], [71.0, -51.0]], [[-65.0, 4.0], [64.0, -1.0], [29.0, 0.0], [-27.0, -23.0], [29.0, 
--66.0]], [[-34.0, 28.0], [2.0, -17.0], [-148.0, 110.0], [78.0, -54.0], [52.0, 14.0]], [[-12.0, -78.0], [-45.0, -43.0], [-31.0, 
-46.0], [37.0, -3.0], [-57.0, 34.0]]])
+      ref=msk_ref*numpy.array([21.0, 5.0])+(1.-msk_ref)*numpy.array([21.0, 47.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_array_rank4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-3.0, -1.0, -5.0], [6.0, 0.0, -3.0]], [[4.0, -2.0, -2.0], [3.0, -1.0, -4.0]], [[5.0, 3.0, 
-7.0], [-4.0, 2.0, 1.0]], [[3.0, 4.0, 0.0], [7.0, -6.0, -6.0]], [[-4.0, -5.0, 7.0], [-5.0, -3.0, -3.0]]], [[[7.0, -4.0, 0.0], 
-[-2.0, 2.0, 0.0]], [[1.0, -5.0, 0.0], [0.0, -4.0, -6.0]], [[-6.0, 3.0, 7.0], [3.0, -4.0, 5.0]], [[-1.0, 2.0, -1.0], [1.0, 0.0, 
--2.0]], [[1.0, -2.0, 6.0], [-2.0, 6.0, 7.0]]], [[[2.0, 6.0, 7.0], [-4.0, 3.0, -6.0]], [[-7.0, -3.0, 0.0], [-4.0, -5.0, -2.0]], 
-[[1.0, 7.0, -7.0], [-2.0, -1.0, 7.0]], [[4.0, 2.0, 6.0], [-3.0, 1.0, 7.0]], [[7.0, 0.0, -3.0], [0.0, -5.0, -3.0]]], [[[3.0, 
--6.0, -3.0], [-6.0, 6.0, 0.0]], [[0.0, -2.0, -7.0], [-1.0, 0.0, 5.0]], [[-3.0, -2.0, -5.0], [7.0, 3.0, -7.0]], [[-2.0, -3.0, 
--2.0], [-3.0, 0.0, -2.0]], [[-1.0, -5.0, 2.0], [3.0, -3.0, 6.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 1.0, 0.0], [-7.0, -1.0, 
--1.0]], [[-2.0, 3.0, 0.0], [-4.0, 6.0, -4.0]], [[-5.0, 6.0, -5.0], [-4.0, 0.0, 0.0]], [[5.0, 1.0, -7.0], [7.0, -5.0, 3.0]], 
-[[5.0, 2.0, 5.0], [-1.0, 4.0, 0.0]]], [[[-1.0, 4.0, -4.0], [-5.0, -1.0, 2.0]], [[0.0, 6.0, 4.0], [0.0, -6.0, -2.0]], [[-5.0, 
-5.0, -7.0], [-3.0, -4.0, -7.0]], [[-6.0, -6.0, 0.0], [0.0, 5.0, 4.0]], [[-6.0, 6.0, 0.0], [5.0, -4.0, -3.0]]], [[[0.0, 3.0, 
--3.0], [-3.0, -1.0, 1.0]], [[-3.0, -2.0, -7.0], [7.0, 4.0, -2.0]], [[0.0, 2.0, -1.0], [-6.0, 7.0, -6.0]], [[0.0, -3.0, -4.0], 
-[-7.0, -6.0, -4.0]], [[-2.0, -2.0, 0.0], [0.0, -5.0, -7.0]]], [[[5.0, 6.0, -4.0], [4.0, 2.0, 5.0]], [[6.0, 3.0, 5.0], [-1.0, 
-7.0, -4.0]], [[4.0, -1.0, -5.0], [0.0, 7.0, 0.0]], [[-3.0, -1.0, -2.0], [6.0, -3.0, -2.0]], [[0.0, -2.0, 6.0], [-1.0, 5.0, 
-7.0]]]])
-      arg1=numpy.array([[[[-3.0, -3.0, 7.0, 4.0, -1.0], [7.0, -1.0, -4.0, -7.0, -3.0], [3.0, -3.0, -1.0, -6.0, 2.0], [-4.0, 
--6.0, 3.0, 3.0, 7.0]], [[7.0, -4.0, 4.0, 6.0, 2.0], [0.0, -3.0, 0.0, -2.0, -1.0], [0.0, -6.0, 7.0, -7.0, 7.0], [-1.0, 6.0, 
--1.0, 4.0, 0.0]], [[-1.0, -7.0, 2.0, 2.0, -2.0], [6.0, -6.0, -4.0, -6.0, 4.0], [-6.0, -5.0, -2.0, 7.0, -1.0], [6.0, 0.0, 3.0, 
--4.0, -6.0]]], [[[1.0, 0.0, -2.0, 6.0, -7.0], [6.0, -4.0, -6.0, 4.0, -1.0], [-7.0, 0.0, -7.0, 6.0, 1.0], [1.0, -5.0, 2.0, 1.0, 
-0.0]], [[2.0, -6.0, -5.0, 0.0, -4.0], [0.0, 2.0, -6.0, -6.0, -7.0], [5.0, 6.0, 4.0, 7.0, -7.0], [1.0, 7.0, 1.0, 1.0, -7.0]], 
-[[-4.0, -6.0, -5.0, -5.0, 3.0], [-6.0, 3.0, 4.0, 0.0, 7.0], [7.0, 4.0, 0.0, 6.0, 5.0], [0.0, -2.0, 0.0, 0.0, -7.0]]]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[25.0, 66.0, -32.0, 23.0, -40.0], [3.0, 3.0, -16.0, 77.0, -37.0], [-42.0, 28.0, -36.0, 8.0, 
--17.0], [-11.0, -12.0, -11.0, 13.0, 30.0]], [[-7.0, 40.0, 35.0, 38.0, -33.0], [58.0, -12.0, -36.0, 6.0, -42.0], [-30.0, -12.0, 
--39.0, -37.0, -14.0], [-24.0, -50.0, 13.0, 14.0, 75.0]], [[-5.0, -94.0, 54.0, 23.0, 10.0], [47.0, -33.0, -32.0, -111.0, 7.0], 
-[18.0, -52.0, 38.0, -6.0, 11.0], [17.0, 20.0, 27.0, -3.0, -28.0]], [[38.0, 47.0, 83.0, 108.0, -38.0], [99.0, -73.0, -42.0, 
-35.0, -20.0], [-112.0, -93.0, -48.0, -82.0, 53.0], [-15.0, -59.0, 13.0, 26.0, 105.0]], [[-29.0, 19.0, 6.0, -47.0, 18.0], [2.0, 
--18.0, 24.0, -6.0, 50.0], [-55.0, -23.0, -22.0, 39.0, -49.0], [55.0, 4.0, 1.0, -68.0, -28.0]]], [[[-47.0, -17.0, 27.0, -8.0, 
--9.0], [37.0, 17.0, -28.0, -61.0, -29.0], [45.0, 15.0, -13.0, -12.0, -30.0], [-24.0, -42.0, 23.0, 5.0, 35.0]], [[-22.0, 77.0, 
-37.0, 4.0, -13.0], [43.0, -12.0, -4.0, 27.0, -12.0], [-59.0, -21.0, -52.0, -35.0, -35.0], [-3.0, -52.0, 4.0, -21.0, 77.0]], 
-[[7.0, -49.0, -27.0, 1.0, 8.0], [-12.0, -50.0, 22.0, 30.0, 103.0], [-66.0, -39.0, -24.0, 84.0, 58.0], [62.0, 1.0, 2.0, -35.0, 
--91.0]], [[27.0, 14.0, 7.0, 22.0, -6.0], [5.0, -9.0, -6.0, 13.0, -18.0], [-18.0, -12.0, 10.0, -21.0, 4.0], [-3.0, 17.0, -6.0, 
-10.0, 13.0]], [[-41.0, -115.0, -50.0, -43.0, -6.0], [-11.0, 10.0, -24.0, -83.0, 32.0], [60.0, 43.0, 11.0, 122.0, -27.0], [38.0, 
-20.0, 25.0, -25.0, -120.0]]], [[[55.0, -61.0, 75.0, 64.0, -6.0], [68.0, -58.0, -54.0, -102.0, -43.0], [-35.0, -83.0, 66.0, 
--44.0, -16.0], [27.0, 77.0, 16.0, 1.0, -7.0]], [[-6.0, 75.0, -18.0, -60.0, 43.0], [-61.0, 16.0, 74.0, 69.0, 49.0], [-32.0, 1.0, 
--6.0, -8.0, -14.0], [22.0, 13.0, -31.0, -42.0, 0.0]], [[21.0, -18.0, -5.0, -15.0, 66.0], [-89.0, 47.0, 70.0, 19.0, 20.0], 
-[103.0, 12.0, 72.0, -81.0, 98.0], [-56.0, 25.0, -30.0, 56.0, 7.0]], [[-33.0, -110.0, 14.0, -13.0, 26.0], [4.0, -11.0, 0.0, 
--86.0, 55.0], [51.0, -20.0, 23.0, 35.0, 41.0], [16.0, -4.0, 23.0, -6.0, -64.0]], [[-16.0, 48.0, 83.0, 37.0, 10.0], [49.0, -8.0, 
-2.0, -1.0, -19.0], [-7.0, -48.0, -21.0, -116.0, 37.0], [-51.0, -71.0, 7.0, 28.0, 123.0]]], [[[-42.0, 0.0, -27.0, -66.0, 9.0], 
-[-33.0, 69.0, 0.0, -51.0, -51.0], [99.0, 78.0, 27.0, 9.0, -81.0], [-24.0, 18.0, 0.0, -3.0, -3.0]], [[-28.0, 27.0, -45.0, -57.0, 
-32.0], [-78.0, 67.0, 54.0, 42.0, 10.0], [84.0, 67.0, 7.0, -11.0, 17.0], [-41.0, -17.0, -21.0, 19.0, 7.0]], [[41.0, 76.0, -33.0, 
-43.0, -73.0], [33.0, -4.0, -56.0, 65.0, -86.0], [-62.0, 36.0, -38.0, 18.0, -64.0], [-6.0, 6.0, -5.0, 13.0, 37.0]], [[-8.0, 
-44.0, -14.0, -38.0, 15.0], [-32.0, 29.0, 26.0, 20.0, -10.0], [13.0, 26.0, 6.0, -11.0, -36.0], [-4.0, 13.0, -15.0, -13.0, 
-12.0]], [[-61.0, -9.0, -44.0, -42.0, -4.0], [-13.0, 4.0, 20.0, 35.0, 76.0], [-9.0, 29.0, -71.0, 88.0, 15.0], [21.0, -72.0, 
-11.0, -31.0, -40.0]]]])+(1.-msk_ref)*numpy.array([[[[2.0, 8.0, 28.0, -31.0, 52.0], [-36.0, 20.0, 44.0, -24.0, 6.0], [37.0, 
--16.0, 52.0, -62.0, 2.0], [-9.0, 36.0, -16.0, -4.0, 14.0]], [[51.0, -18.0, -4.0, 6.0, 0.0], [-14.0, 9.0, -20.0, -44.0, -63.0], 
-[24.0, 8.0, 75.0, -15.0, -49.0], [7.0, 100.0, -11.0, 8.0, -28.0]], [[58.0, 26.0, -13.0, -18.0, 55.0], [-89.0, 33.0, 64.0, 37.0, 
--7.0], [43.0, 4.0, 85.0, -71.0, 33.0], [-20.0, 86.0, -44.0, 25.0, -5.0]], [[-16.0, 42.0, 21.0, 39.0, -9.0], [17.0, 5.0, 8.0, 
-63.0, 5.0], [4.0, -4.0, -53.0, -61.0, 81.0], [-61.0, -100.0, 2.0, 49.0, 91.0]], [[1.0, -82.0, 35.0, 36.0, -20.0], [59.0, -29.0, 
--58.0, -97.0, -24.0], [12.0, -28.0, 22.0, 13.0, -10.0], [11.0, 15.0, 30.0, 6.0, -23.0]]], [[[20.0, 9.0, 6.0, -28.0, 62.0], 
-[-73.0, 37.0, 64.0, 9.0, 9.0], [65.0, 1.0, 68.0, -75.0, 42.0], [-30.0, 44.0, -30.0, 23.0, 10.0]], [[34.0, -4.0, 72.0, 54.0, 
-22.0], [36.0, -60.0, 12.0, 0.0, 38.0], [-68.0, -100.0, 10.0, -68.0, 70.0], [12.0, -2.0, 0.0, 2.0, 32.0]], [[74.0, 110.0, 32.0, 
-13.0, 45.0], [-53.0, 15.0, 62.0, 79.0, -36.0], [-21.0, -32.0, 59.0, -142.0, 22.0], [-34.0, 61.0, -51.0, 26.0, 84.0]], [[-30.0, 
--12.0, -111.0, -80.0, -14.0], [-66.0, 46.0, 10.0, 24.0, 17.0], [35.0, 100.0, -16.0, 137.0, -69.0], [35.0, 27.0, -7.0, -37.0, 
--105.0]], [[69.0, 36.0, 7.0, 57.0, -10.0], [6.0, -49.0, 6.0, 74.0, 14.0], [-94.0, -54.0, -3.0, -22.0, 48.0], [19.0, 25.0, 
--18.0, 7.0, 7.0]]], [[[15.0, 9.0, 12.0, -11.0, 40.0], [-42.0, 22.0, 40.0, 6.0, 2.0], [41.0, -5.0, 44.0, -61.0, 33.0], [-25.0, 
-24.0, -19.0, 20.0, 18.0]], [[25.0, 54.0, -67.0, 14.0, -58.0], [-9.0, 25.0, -34.0, 71.0, -66.0], [-10.0, 72.0, -30.0, 41.0, 
--44.0], [-17.0, 3.0, -10.0, 22.0, 7.0]], [[47.0, -7.0, 13.0, 4.0, 2.0], [-6.0, 20.0, -26.0, -64.0, -91.0], [41.0, 11.0, 86.0, 
--44.0, -70.0], [-7.0, 103.0, -10.0, 13.0, -1.0]], [[-20.0, 100.0, 44.0, -48.0, 63.0], [-42.0, 37.0, 78.0, 38.0, 8.0], [15.0, 
--14.0, 12.0, -115.0, -2.0], [-34.0, -17.0, -29.0, -9.0, 94.0]], [[10.0, 86.0, 38.0, 15.0, -3.0], [28.0, -23.0, 10.0, 48.0, 
--6.0], [-80.0, -40.0, -32.0, -51.0, -18.0], [5.0, -21.0, -9.0, -19.0, 70.0]]], [[[19.0, -53.0, 8.0, 47.0, -6.0], [5.0, 4.0, 
--20.0, -19.0, -20.0], [56.0, 1.0, 25.0, -32.0, 71.0], [-44.0, -10.0, 7.0, 61.0, 10.0]], [[27.0, -83.0, 51.0, 66.0, -43.0], 
-[90.0, -39.0, -96.0, -124.0, -77.0], [2.0, -35.0, 40.0, -3.0, -42.0], [9.0, 44.0, 35.0, 16.0, -9.0]], [[0.0, -15.0, -21.0, 0.0, 
--24.0], [-2.0, 43.0, -38.0, -38.0, -80.0], [77.0, 61.0, 27.0, -3.0, -43.0], [-38.0, 19.0, 5.0, 35.0, 9.0]], [[12.0, 57.0, 
--16.0, 24.0, -31.0], [15.0, -18.0, -6.0, 77.0, 3.0], [-68.0, -1.0, -54.0, 14.0, 6.0], [4.0, -35.0, -5.0, -2.0, 26.0]], [[-39.0, 
--106.0, -54.0, -41.0, -8.0], [-12.0, 5.0, -20.0, -66.0, 41.0], [45.0, 40.0, 1.0, 127.0, -21.0], [42.0, 14.0, 23.0, -28.0, 
--120.0]]]])
+   def test_generalTensorProduct_expandedData_rank4_array_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-6.0, 1.0, 0.0], [-5.0, 4.0, 1.0], [-1.0, 0.0, -7.0], [-3.0, 6.0, -3.0]], [[-6.0, -2.0, 
+2.0], [-5.0, -5.0, 5.0], [-7.0, 5.0, -4.0], [6.0, 0.0, 6.0]]], [[[7.0, -6.0, 7.0], [0.0, -2.0, 6.0], [3.0, 5.0, 7.0], [-4.0, 
+3.0, 2.0]], [[7.0, 7.0, -1.0], [0.0, 0.0, -5.0], [1.0, 3.0, -4.0], [-1.0, 1.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 
+0.0, 2.0], [0.0, 0.0, 3.0], [-7.0, -2.0, 4.0], [-5.0, 4.0, 0.0]], [[0.0, 1.0, 6.0], [1.0, 1.0, 0.0], [3.0, 0.0, -2.0], [2.0, 
+2.0, 5.0]]], [[[2.0, 0.0, -1.0], [1.0, 1.0, -6.0], [0.0, 4.0, -5.0], [2.0, -3.0, 3.0]], [[6.0, -6.0, 4.0], [-6.0, 0.0, -7.0], 
+[0.0, 0.0, 3.0], [4.0, -2.0, -6.0]]]])
+      arg1=numpy.array([[[1.0, -5.0, 7.0], [-7.0, -4.0, -1.0], [-2.0, 1.0, 7.0], [-7.0, 0.0, -5.0]], [[6.0, 0.0, 0.0], [-4.0, 
+-6.0, 0.0], [-2.0, -6.0, -7.0], [6.0, -2.0, 7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([100.0, 245.0])+(1.-msk_ref)*numpy.array([124.0, -45.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_constData_rank2(self):
+   def test_generalTensorProduct_expandedData_rank1_array_rank1_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, 2.0, 3.0], [4.0, 0.0, 6.0]], [[0.0, -6.0, 1.0], [7.0, 7.0, 5.0]], [[-2.0, -7.0, 4.0], 
-[-2.0, -3.0, 2.0]], [[0.0, 0.0, 4.0], [-6.0, -5.0, 6.0]], [[-3.0, -5.0, 2.0], [7.0, 5.0, 1.0]]], [[[-6.0, -1.0, 1.0], [-7.0, 
-2.0, -1.0]], [[-6.0, -1.0, -7.0], [2.0, 5.0, -2.0]], [[-1.0, -6.0, -1.0], [3.0, -7.0, -6.0]], [[-5.0, -2.0, 6.0], [1.0, -5.0, 
--6.0]], [[0.0, 0.0, -2.0], [-7.0, -3.0, 6.0]]], [[[0.0, -7.0, 4.0], [-1.0, -5.0, -5.0]], [[-2.0, 1.0, 7.0], [2.0, 4.0, -3.0]], 
-[[-5.0, -4.0, 7.0], [-7.0, 4.0, 2.0]], [[-6.0, 4.0, 1.0], [-2.0, 0.0, 0.0]], [[5.0, 0.0, -1.0], [0.0, -2.0, 3.0]]], [[[6.0, 
-2.0, -6.0], [-2.0, -7.0, 3.0]], [[-1.0, 4.0, 6.0], [0.0, 7.0, 7.0]], [[6.0, -1.0, 6.0], [0.0, -4.0, 2.0]], [[5.0, 2.0, 0.0], 
-[0.0, -7.0, 5.0]], [[0.0, 4.0, 4.0], [-2.0, -2.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, -7.0, 4.0], [-3.0, -2.0, -3.0]], 
-[[-5.0, -2.0, 5.0], [-1.0, -5.0, -3.0]], [[0.0, -7.0, 5.0], [6.0, -3.0, -2.0]], [[2.0, -7.0, -4.0], [0.0, -2.0, 6.0]], [[1.0, 
--3.0, -6.0], [0.0, 5.0, -4.0]]], [[[-6.0, -1.0, -5.0], [1.0, -7.0, 2.0]], [[4.0, 0.0, 7.0], [2.0, 2.0, 3.0]], [[0.0, -7.0, 
-0.0], [3.0, 1.0, 3.0]], [[4.0, -1.0, 3.0], [-1.0, -7.0, -3.0]], [[6.0, 0.0, -7.0], [5.0, 3.0, 4.0]]], [[[6.0, -5.0, -1.0], 
-[-3.0, 1.0, -6.0]], [[4.0, 4.0, 0.0], [-3.0, 2.0, 1.0]], [[3.0, 5.0, 0.0], [6.0, -7.0, 7.0]], [[-7.0, -3.0, -5.0], [-5.0, -4.0, 
-3.0]], [[-4.0, 0.0, 3.0], [6.0, -4.0, -1.0]]], [[[0.0, -3.0, 0.0], [0.0, 1.0, -7.0]], [[0.0, 3.0, -3.0], [2.0, -3.0, 1.0]], 
-[[-4.0, -1.0, 2.0], [-4.0, 2.0, -5.0]], [[7.0, -2.0, 7.0], [-4.0, 1.0, -2.0]], [[-2.0, 0.0, -7.0], [5.0, 0.0, 7.0]]]])
-      arg1=Data(numpy.array([[1.0, -3.0, 0.0], [1.0, -3.0, 1.0]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([-2.0, -1.0])+(1.-msk_arg0)*numpy.array([-7.0, -6.0])
+      arg1=numpy.array([-4.0, 7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[7.0, 9.0, 28.0, 15.0, 5.0], [-17.0, -18.0, 35.0, 11.0, 8.0], [30.0, -18.0, -10.0, -20.0, 14.0], 
-[22.0, -27.0, 23.0, 25.0, -1.0]])+(1.-msk_ref)*numpy.array([[16.0, 12.0, 34.0, 35.0, -9.0], [21.0, 3.0, 24.0, 24.0, 6.0], [9.0, 
--16.0, 22.0, 12.0, 13.0], [-1.0, 3.0, -16.0, 4.0, 10.0]])
+      ref=msk_ref*numpy.array([[8.0, -14.0], [4.0, -7.0]])+(1.-msk_ref)*numpy.array([[28.0, -49.0], [24.0, -42.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_constData_rank3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, -5.0, 1.0], [-3.0, -7.0, 3.0]], [[-4.0, -7.0, -3.0], [0.0, -2.0, -7.0]], [[3.0, -3.0, 
--2.0], [-7.0, 3.0, 0.0]], [[-4.0, -7.0, -2.0], [-2.0, -3.0, -4.0]], [[7.0, 4.0, 0.0], [3.0, 2.0, 0.0]]], [[[-3.0, 5.0, -6.0], 
-[-1.0, 6.0, 4.0]], [[-7.0, -3.0, 1.0], [-1.0, -5.0, 1.0]], [[1.0, -7.0, -3.0], [-3.0, 4.0, -7.0]], [[-4.0, 2.0, -4.0], [-2.0, 
--5.0, 0.0]], [[7.0, -6.0, -7.0], [-5.0, -1.0, -3.0]]], [[[-1.0, -7.0, 5.0], [3.0, 0.0, -6.0]], [[4.0, 7.0, -2.0], [-4.0, 4.0, 
--3.0]], [[-4.0, 0.0, -5.0], [0.0, 6.0, 6.0]], [[2.0, 5.0, 2.0], [-5.0, -4.0, 0.0]], [[-1.0, -3.0, -2.0], [3.0, 4.0, 1.0]]], 
-[[[-2.0, -1.0, 7.0], [-4.0, -4.0, 0.0]], [[-3.0, -6.0, 2.0], [2.0, -1.0, 3.0]], [[-7.0, -2.0, -7.0], [1.0, 1.0, 4.0]], [[-1.0, 
-0.0, 2.0], [-5.0, 7.0, 7.0]], [[-2.0, 1.0, 7.0], [6.0, 1.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -7.0, 0.0], [0.0, 3.0, 
--7.0]], [[7.0, 5.0, -2.0], [0.0, 1.0, -2.0]], [[7.0, -7.0, -7.0], [-3.0, 3.0, -1.0]], [[-3.0, -1.0, 0.0], [0.0, 0.0, 5.0]], 
-[[-5.0, -1.0, -5.0], [1.0, 7.0, 2.0]]], [[[-2.0, 5.0, -4.0], [-4.0, 2.0, 5.0]], [[0.0, 0.0, -3.0], [-5.0, 7.0, -4.0]], [[-4.0, 
--5.0, 5.0], [-2.0, 0.0, 7.0]], [[4.0, 6.0, 6.0], [0.0, 2.0, -1.0]], [[0.0, -5.0, -5.0], [-3.0, -2.0, -1.0]]], [[[-1.0, 0.0, 
-0.0], [-1.0, 2.0, 2.0]], [[-1.0, -5.0, -7.0], [7.0, -3.0, 0.0]], [[-4.0, 0.0, 6.0], [1.0, 3.0, -2.0]], [[7.0, -3.0, -3.0], 
-[1.0, 2.0, 5.0]], [[-4.0, 5.0, 4.0], [-6.0, -3.0, -7.0]]], [[[-2.0, 0.0, 5.0], [-2.0, 0.0, 0.0]], [[-5.0, 0.0, -4.0], [-4.0, 
-2.0, 7.0]], [[1.0, -6.0, 6.0], [-4.0, 3.0, -7.0]], [[-4.0, -2.0, 4.0], [6.0, 1.0, -6.0]], [[-1.0, 2.0, -2.0], [7.0, 0.0, 
-0.0]]]])
-      arg1=Data(numpy.array([[[7.0, -1.0], [-1.0, -4.0], [4.0, -4.0]], [[6.0, -5.0], [4.0, -2.0], [1.0, 
--6.0]]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
+   def test_generalTensorProduct_expandedData_rank2_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-3.0, 4.0, 0.0], [-2.0, 0.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 6.0, 6.0], [-1.0, 6.0, 
+-7.0]])
+      arg1=numpy.array([[0.0, 7.0], [1.0, -3.0], [7.0, 2.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-41.0, 28.0], [-48.0, 90.0], [-14.0, 46.0], [-57.0, 80.0], [71.0, -42.0]], [[-28.0, -24.0], 
-[-67.0, 24.0], [-7.0, 88.0], [-78.0, 32.0], [-10.0, 90.0]], [[32.0, 30.0], [2.0, 6.0], [-18.0, -24.0], [-29.0, 3.0], [23.0, 
--8.0]], [[-25.0, 6.0], [4.0, -7.0], [-61.0, 12.0], [6.0, -38.0], [49.0, -38.0]]])+(1.-msk_ref)*numpy.array([[[19.0, 63.0], 
-[38.0, -9.0], [21.0, 64.0], [-15.0, -23.0], [-18.0, -2.0]], [[-46.0, -16.0], [-18.0, 47.0], [-8.0, -28.0], [53.0, -50.0], 
-[-42.0, 65.0]], [[-3.0, -10.0], [0.0, 20.0], [12.0, -19.0], [59.0, -22.0], [-72.0, 46.0]], [[-6.0, -8.0], [-60.0, -5.0], [18.0, 
-55.0], [24.0, 0.0], [25.0, -34.0]]])
+      ref=msk_ref*numpy.array([[4.0, -33.0], [0.0, -14.0]])+(1.-msk_ref)*numpy.array([[48.0, -41.0], [-43.0, -39.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_constData_rank4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, -3.0, -2.0], [0.0, 5.0, 3.0]], [[3.0, 1.0, -5.0], [-6.0, -3.0, -3.0]], [[-2.0, 4.0, 
-4.0], [7.0, 7.0, 6.0]], [[-2.0, -5.0, -4.0], [-4.0, -4.0, 2.0]], [[-3.0, -4.0, -2.0], [-4.0, -5.0, 2.0]]], [[[-1.0, -1.0, 6.0], 
-[-3.0, -5.0, 5.0]], [[1.0, 4.0, -2.0], [5.0, -3.0, 0.0]], [[2.0, 7.0, 0.0], [1.0, 5.0, -5.0]], [[-3.0, -4.0, 3.0], [-5.0, 3.0, 
-5.0]], [[7.0, 3.0, -5.0], [7.0, -4.0, -1.0]]], [[[-6.0, -3.0, -1.0], [1.0, -7.0, -7.0]], [[4.0, 2.0, -4.0], [-3.0, 7.0, -6.0]], 
-[[5.0, 7.0, -3.0], [3.0, -6.0, -6.0]], [[0.0, -5.0, -7.0], [7.0, -1.0, -1.0]], [[3.0, -1.0, -5.0], [-3.0, -7.0, -1.0]]], 
-[[[-5.0, 6.0, 1.0], [2.0, -6.0, 5.0]], [[-4.0, -7.0, 1.0], [6.0, 0.0, -6.0]], [[-2.0, 7.0, 2.0], [-1.0, 5.0, -4.0]], [[-4.0, 
-1.0, -7.0], [-1.0, 6.0, -3.0]], [[5.0, 0.0, 2.0], [-2.0, 0.0, 2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -5.0, 5.0], [6.0, 
-5.0, -1.0]], [[-1.0, 0.0, -7.0], [-6.0, 0.0, 0.0]], [[-5.0, -1.0, -6.0], [0.0, -7.0, 7.0]], [[-6.0, 3.0, 3.0], [-2.0, -5.0, 
--3.0]], [[0.0, -4.0, 6.0], [-1.0, -5.0, 5.0]]], [[[-2.0, -4.0, 0.0], [-2.0, -1.0, 7.0]], [[-1.0, -4.0, 0.0], [-1.0, -3.0, 
-1.0]], [[3.0, 3.0, 7.0], [-4.0, -3.0, -3.0]], [[-2.0, 6.0, 4.0], [-5.0, -5.0, -5.0]], [[-3.0, -5.0, 5.0], [7.0, -2.0, 6.0]]], 
-[[[6.0, 1.0, -5.0], [0.0, 0.0, -3.0]], [[1.0, 2.0, -4.0], [2.0, 4.0, 6.0]], [[0.0, -3.0, 4.0], [3.0, 0.0, 2.0]], [[-4.0, 0.0, 
-1.0], [-1.0, -3.0, 7.0]], [[-6.0, -6.0, -6.0], [6.0, 5.0, -6.0]]], [[[2.0, -3.0, -5.0], [3.0, 5.0, -3.0]], [[0.0, 3.0, 7.0], 
-[3.0, -6.0, 2.0]], [[-1.0, 2.0, 7.0], [7.0, 4.0, -6.0]], [[-7.0, -5.0, -1.0], [-2.0, 7.0, 7.0]], [[-2.0, -3.0, 0.0], [0.0, 
--6.0, 7.0]]]])
-      arg1=Data(numpy.array([[[[-6.0, 5.0, -2.0, -2.0, -1.0], [5.0, -4.0, 2.0, -5.0, -6.0], [-6.0, 0.0, 7.0, 3.0, 3.0], [-7.0, 
-5.0, 6.0, -4.0, 0.0]], [[-1.0, 5.0, -6.0, -6.0, 0.0], [-4.0, 5.0, 0.0, 3.0, -6.0], [7.0, 0.0, -1.0, -6.0, 4.0], [-3.0, 5.0, 
-6.0, -4.0, 4.0]], [[4.0, -3.0, 5.0, 5.0, -3.0], [2.0, 6.0, -2.0, 2.0, -2.0], [4.0, -6.0, -4.0, -2.0, -5.0], [3.0, 0.0, -3.0, 
--5.0, 0.0]]], [[[0.0, -5.0, -6.0, 0.0, 3.0], [5.0, 2.0, 0.0, 0.0, -1.0], [-4.0, -5.0, 0.0, 7.0, 0.0], [6.0, 5.0, 4.0, -7.0, 
-7.0]], [[-2.0, -3.0, 5.0, -6.0, -5.0], [-2.0, 5.0, -6.0, 2.0, -6.0], [-5.0, 4.0, 0.0, 4.0, -4.0], [4.0, 7.0, -6.0, -5.0, 6.0]], 
-[[6.0, -6.0, 3.0, -7.0, 0.0], [-6.0, 0.0, -4.0, 5.0, 4.0], [0.0, -3.0, 6.0, 0.0, 6.0], [-4.0, 1.0, -5.0, -6.0, 
-3.0]]]]),self.functionspace)
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-9.0, -32.0, 38.0, -47.0, -21.0], [-10.0, -10.0, -34.0, 2.0, -8.0], [-66.0, 23.0, 43.0, 48.0, 
-2.0], [-3.0, 33.0, -45.0, -29.0, 27.0]], [[-51.0, 92.0, -25.0, 2.0, 9.0], [-5.0, -64.0, 46.0, -43.0, -2.0], [8.0, 57.0, 22.0, 
--41.0, 32.0], [-75.0, -34.0, 48.0, 84.0, -65.0]], [[46.0, -94.0, 11.0, -84.0, -24.0], [-33.0, 101.0, -78.0, 74.0, -45.0], 
-[-7.0, -49.0, 2.0, 39.0, -2.0], [60.0, 100.0, -44.0, -148.0, 125.0]], [[21.0, -3.0, 24.0, 24.0, 22.0], [-22.0, -69.0, 20.0, 
--11.0, 86.0], [-3.0, 22.0, 19.0, -12.0, 22.0], [-31.0, -81.0, -32.0, 84.0, -66.0]], [[36.0, -6.0, 25.0, 36.0, 22.0], [-25.0, 
--53.0, 20.0, -1.0, 88.0], [23.0, 6.0, 3.0, -29.0, 17.0], [-25.0, -88.0, -32.0, 79.0, -68.0]]], [[[71.0, -28.0, 46.0, 33.0, 
--1.0], [-24.0, 4.0, -4.0, 29.0, 53.0], [60.0, -56.0, 0.0, -50.0, 13.0], [-30.0, -55.0, -37.0, -6.0, -40.0]], [[-12.0, 15.0, 
--81.0, -18.0, 35.0], [16.0, -1.0, 24.0, -3.0, -13.0], [9.0, -25.0, 11.0, 6.0, 41.0], [-7.0, 29.0, 74.0, -30.0, 33.0]], [[-59.0, 
-55.0, -42.0, -41.0, -24.0], [7.0, 54.0, -6.0, -4.0, -105.0], [8.0, 30.0, -23.0, -9.0, -16.0], [11.0, 80.0, 53.0, -38.0, 50.0]], 
-[[58.0, -58.0, 105.0, -8.0, -36.0], [-54.0, 15.0, -50.0, 40.0, 43.0], [7.0, 4.0, 1.0, -14.0, -22.0], [4.0, -34.0, -114.0, 3.0, 
--18.0]], [[-63.0, 48.0, -122.0, -26.0, 49.0], [62.0, -49.0, 52.0, -49.0, -37.0], [-49.0, -18.0, 60.0, 46.0, 68.0], [-43.0, 
-56.0, 132.0, -38.0, 34.0]]], [[[7.0, 16.0, -37.0, 116.0, 47.0], [41.0, -30.0, 60.0, -30.0, 69.0], [42.0, -6.0, -77.0, -19.0, 
--39.0], [54.0, -96.0, 30.0, 111.0, -68.0]], [[-92.0, 72.0, -5.0, -40.0, -36.0], [11.0, -1.0, -2.0, -38.0, -91.0], [-49.0, 85.0, 
-6.0, 15.0, -24.0], [-12.0, 58.0, 24.0, 18.0, 11.0]], [[-73.0, 108.0, -133.0, 11.0, 43.0], [54.0, -27.0, 76.0, -52.0, -57.0], 
-[25.0, -3.0, 4.0, -24.0, 46.0], [-47.0, 27.0, 159.0, 12.0, -5.0]], [[-27.0, -30.0, -55.0, 8.0, 47.0], [49.0, -58.0, 24.0, 
--36.0, 39.0], [-86.0, 6.0, 27.0, 89.0, 13.0], [36.0, 2.0, 30.0, 17.0, 20.0]], [[-29.0, 67.0, -45.0, 24.0, 38.0], [14.0, -88.0, 
-62.0, -47.0, 39.0], [2.0, 20.0, 36.0, -24.0, 52.0], [-75.0, -55.0, 62.0, 79.0, -70.0]]], [[[70.0, -20.0, -48.0, -20.0, 38.0], 
-[-55.0, 30.0, 4.0, 58.0, 46.0], [98.0, -55.0, -15.0, -63.0, 58.0], [-12.0, -22.0, 22.0, -23.0, 17.0]], [[-1.0, -52.0, 1.0, 
-97.0, 19.0], [76.0, -1.0, 14.0, -29.0, 34.0], [-45.0, -18.0, -61.0, 70.0, -81.0], [112.0, -31.0, -15.0, 33.0, -4.0]], [[-21.0, 
-33.0, -9.0, -30.0, -32.0], [-25.0, 78.0, -22.0, 25.0, -79.0], [48.0, 25.0, -53.0, -39.0, -32.0], [29.0, 51.0, 10.0, -24.0, 
-39.0]], [[-35.0, 11.0, -6.0, -48.0, -8.0], [-37.0, 7.0, -18.0, 6.0, -15.0], [-23.0, 80.0, -19.0, 13.0, -15.0], [34.0, 19.0, 
--22.0, 42.0, 24.0]], [[-10.0, 17.0, 18.0, -14.0, -17.0], [7.0, -12.0, -2.0, -11.0, -24.0], [-14.0, -8.0, 39.0, -3.0, 17.0], 
-[-49.0, 17.0, 6.0, -28.0, -8.0]]]])+(1.-msk_ref)*numpy.array([[[[9.0, -79.0, 41.0, 32.0, -22.0], [56.0, 42.0, -36.0, 0.0, 
--20.0], [-64.0, -37.0, -21.0, 82.0, -71.0], [90.0, 39.0, -46.0, -66.0, 49.0]], [[-22.0, 46.0, 3.0, -33.0, 4.0], [-49.0, -50.0, 
-12.0, -9.0, 26.0], [2.0, 72.0, 21.0, -31.0, 32.0], [-50.0, -35.0, -9.0, 81.0, -42.0]], [[63.0, -33.0, -28.0, -21.0, 58.0], 
-[-61.0, -56.0, 16.0, 31.0, 118.0], [34.0, -13.0, 32.0, -25.0, 81.0], [-36.0, -72.0, -11.0, 47.0, -25.0]], [[37.0, 19.0, -13.0, 
-60.0, 16.0], [-18.0, 28.0, 24.0, 20.0, 32.0], [102.0, -19.0, -75.0, -76.0, -19.0], [22.0, -63.0, 10.0, 54.0, -41.0]], [[68.0, 
--48.0, 50.0, 49.0, 4.0], [3.0, -11.0, -2.0, 15.0, 63.0], [25.0, -66.0, 10.0, -15.0, 4.0], [-16.0, -55.0, -41.0, -12.0, 
--38.0]]], [[[60.0, -59.0, 56.0, -15.0, 1.0], [-44.0, -21.0, -26.0, 31.0, 72.0], [-3.0, -15.0, 32.0, 0.0, 24.0], [-18.0, -40.0, 
--73.0, 1.0, -15.0]], [[22.0, -17.0, 20.0, 37.0, 13.0], [6.0, -33.0, 12.0, -8.0, 53.0], [-3.0, -10.0, 3.0, 2.0, -1.0], [-3.0, 
--50.0, -21.0, 36.0, -38.0]], [[-5.0, 56.0, 11.0, 50.0, -21.0], [21.0, 22.0, 22.0, -13.0, -40.0], [62.0, -25.0, -28.0, -63.0, 
--20.0], [-33.0, -14.0, 32.0, 2.0, -43.0]], [[2.0, 78.0, -22.0, 53.0, 0.0], [-11.0, 27.0, 38.0, 1.0, -17.0], [115.0, -4.0, 
--66.0, -105.0, -12.0], [-22.0, -45.0, 47.0, 54.0, -56.0]], [[83.0, -120.0, 27.0, 31.0, 19.0], [18.0, 21.0, -28.0, 36.0, 67.0], 
-[-15.0, -91.0, 0.0, 52.0, -10.0], [61.0, -13.0, -53.0, -68.0, 35.0]]], [[[-75.0, 68.0, -52.0, -22.0, 9.0], [34.0, -49.0, 34.0, 
--52.0, -44.0], [-49.0, 39.0, 43.0, 22.0, 29.0], [-48.0, 32.0, 72.0, 15.0, -5.0]], [[4.0, -31.0, -8.0, -100.0, -3.0], [-45.0, 
-6.0, -38.0, 31.0, -12.0], [-36.0, 12.0, 57.0, 29.0, 51.0], [-21.0, 59.0, -16.0, -62.0, 64.0]], [[31.0, -54.0, 26.0, 24.0, 
--3.0], [23.0, 15.0, -16.0, 9.0, 15.0], [-17.0, -45.0, -1.0, 31.0, -20.0], [31.0, 2.0, -28.0, -41.0, 15.0]], [[76.0, -51.0, 
-25.0, -18.0, 13.0], [-59.0, 5.0, -20.0, 51.0, 69.0], [47.0, -34.0, 10.0, -33.0, 37.0], [-15.0, -39.0, -48.0, -9.0, -4.0]], 
-[[-28.0, -51.0, -11.0, 30.0, 17.0], [38.0, -5.0, -6.0, -20.0, 24.0], [-79.0, 44.0, -48.0, 92.0, -68.0], [122.0, -1.0, -30.0, 
-47.0, 30.0]]], [[[-57.0, -2.0, -13.0, -20.0, -3.0], [35.0, -22.0, -4.0, -34.0, -29.0], [-90.0, 44.0, 19.0, 75.0, -19.0], [30.0, 
-42.0, 6.0, 1.0, 30.0]], [[49.0, -15.0, -25.0, 39.0, 18.0], [17.0, 33.0, 14.0, 21.0, 9.0], [67.0, -87.0, -19.0, -35.0, 13.0], 
-[-2.0, -10.0, 35.0, -50.0, 3.0]], [[-12.0, -27.0, -15.0, 43.0, -19.0], [64.0, 90.0, -16.0, 3.0, -75.0], [0.0, -43.0, -73.0, 
-36.0, -82.0], [104.0, 62.0, 19.0, -72.0, 63.0]], [[71.0, -110.0, 107.0, -52.0, -31.0], [-83.0, 28.0, -82.0, 67.0, 62.0], 
-[-24.0, 23.0, 2.0, 25.0, -22.0], [49.0, -14.0, -154.0, -10.0, 29.0]], [[69.0, -49.0, 13.0, 9.0, 32.0], [-28.0, -37.0, 4.0, 
-24.0, 94.0], [21.0, -45.0, 31.0, -12.0, 48.0], [-29.0, -60.0, -29.0, 8.0, -27.0]]]])
+   def test_generalTensorProduct_expandedData_rank3_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[5.0, 3.0, 1.0], [-6.0, 0.0, -6.0]], [[-3.0, 0.0, 5.0], [-5.0, 3.0, 
+-4.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 7.0, 1.0], [2.0, 7.0, -6.0]], [[-6.0, -2.0, -5.0], [-4.0, 3.0, 2.0]]])
+      arg1=numpy.array([[[6.0, -4.0], [-6.0, -7.0], [-2.0, 6.0]], [[-6.0, 6.0], [5.0, 2.0], [-2.0, -3.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[58.0, -53.0], [25.0, 30.0]])+(1.-msk_ref)*numpy.array([[-3.0, -3.0], [21.0, -16.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_expandedData_rank2(self):
+   def test_generalTensorProduct_expandedData_rank4_array_rank4_offset3(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, -4.0, 1.0], [3.0, -4.0, -3.0]], [[-4.0, -1.0, 7.0], [-4.0, -2.0, -2.0]], [[-6.0, 
--5.0, -2.0], [-5.0, -3.0, 0.0]], [[2.0, 0.0, 3.0], [0.0, 2.0, -5.0]], [[-2.0, -2.0, 0.0], [-6.0, 0.0, 0.0]]], [[[7.0, 6.0, 
-2.0], [-4.0, 7.0, -6.0]], [[7.0, -7.0, -1.0], [0.0, 7.0, 1.0]], [[-6.0, -4.0, 7.0], [-6.0, -3.0, -1.0]], [[7.0, -4.0, 6.0], 
-[2.0, -7.0, -3.0]], [[6.0, 5.0, -1.0], [-6.0, -1.0, 0.0]]], [[[-7.0, -7.0, 2.0], [7.0, 3.0, 2.0]], [[-3.0, -3.0, 2.0], [3.0, 
--1.0, 2.0]], [[-2.0, -1.0, -2.0], [5.0, -4.0, 7.0]], [[-5.0, -7.0, -6.0], [7.0, -3.0, -3.0]], [[0.0, -2.0, -5.0], [7.0, 0.0, 
--1.0]]], [[[-4.0, 6.0, -4.0], [-1.0, 0.0, 0.0]], [[6.0, -5.0, 5.0], [2.0, 2.0, -1.0]], [[0.0, 0.0, -1.0], [1.0, 1.0, -6.0]], 
-[[-1.0, 3.0, -1.0], [-1.0, 6.0, 1.0]], [[0.0, -7.0, -1.0], [3.0, 2.0, 1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 7.0, -3.0], 
-[-6.0, -7.0, 6.0]], [[5.0, -7.0, 1.0], [-7.0, 0.0, 1.0]], [[-2.0, -1.0, 6.0], [0.0, 0.0, 1.0]], [[-6.0, 5.0, -6.0], [-1.0, 3.0, 
-3.0]], [[5.0, -5.0, -2.0], [3.0, 7.0, 5.0]]], [[[-6.0, 0.0, 4.0], [3.0, -4.0, -5.0]], [[4.0, 4.0, 0.0], [4.0, 7.0, 3.0]], 
-[[-7.0, 7.0, 3.0], [0.0, 0.0, 3.0]], [[-5.0, 6.0, 6.0], [5.0, -5.0, -3.0]], [[0.0, 4.0, -3.0], [-4.0, -2.0, -5.0]]], [[[0.0, 
--6.0, 4.0], [6.0, 0.0, 5.0]], [[-5.0, 7.0, 5.0], [4.0, 0.0, -2.0]], [[7.0, -4.0, 7.0], [7.0, 5.0, 2.0]], [[-3.0, -4.0, -5.0], 
-[-7.0, 0.0, 6.0]], [[5.0, 6.0, 3.0], [-4.0, -7.0, 0.0]]], [[[-4.0, -1.0, 0.0], [0.0, 0.0, -6.0]], [[-6.0, 0.0, 5.0], [1.0, 0.0, 
-0.0]], [[5.0, 0.0, -6.0], [-3.0, 3.0, 0.0]], [[3.0, 0.0, -3.0], [0.0, 5.0, 2.0]], [[-4.0, 1.0, 2.0], [6.0, 2.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, 6.0, 6.0], [0.0, 4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[1.0, -1.0, 7.0], [-4.0, 5.0, 
--6.0]])
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[[[3.0, -1.0, 3.0], [-5.0, -7.0, 0.0], [5.0, -5.0, -7.0], [-3.0, 7.0, -5.0]], [[1.0, -5.0, 
+0.0], [-1.0, -6.0, -7.0], [-2.0, -2.0, 0.0], [4.0, 1.0, -2.0]]], [[[7.0, -5.0, 2.0], [4.0, -6.0, 0.0], [-5.0, 2.0, 3.0], [-1.0, 
+6.0, 2.0]], [[0.0, 5.0, -4.0], [-7.0, -4.0, 3.0], [1.0, -2.0, 0.0], [-4.0, -4.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 
+1.0, 1.0], [2.0, 2.0, 0.0], [7.0, 0.0, 0.0], [-6.0, 4.0, -3.0]], [[1.0, -2.0, -1.0], [0.0, 3.0, -1.0], [0.0, 5.0, 2.0], [-4.0, 
+-5.0, -3.0]]], [[[-6.0, 0.0, -3.0], [0.0, 1.0, 4.0], [2.0, -3.0, -3.0], [4.0, 7.0, 6.0]], [[-6.0, -5.0, -6.0], [0.0, 3.0, 5.0], 
+[2.0, -7.0, 6.0], [3.0, -2.0, 1.0]]]])
+      arg1=numpy.array([[[[0.0, -2.0], [-2.0, 5.0], [4.0, 1.0]], [[3.0, 7.0], [1.0, -2.0], [-1.0, 1.0]], [[1.0, -1.0], [0.0, 
+-4.0], [-6.0, -3.0]], [[-3.0, 1.0], [1.0, 6.0], [5.0, -3.0]]], [[[7.0, 7.0], [-6.0, 7.0], [0.0, 5.0]], [[4.0, -4.0], [-2.0, 
+-7.0], [1.0, 2.0]], [[-6.0, 7.0], [-1.0, -6.0], [-4.0, 3.0]], [[6.0, 3.0], [-7.0, 4.0], [6.0, -2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-64.0, 8.0, -72.0, 12.0, -18.0], [73.0, 5.0, -16.0, -7.0, 38.0], [-31.0, -11.0, -12.0, -117.0, 
--46.0], [0.0, 22.0, -26.0, 37.0, -36.0]])+(1.-msk_ref)*numpy.array([[-82.0, 41.0, 35.0, -52.0, -11.0], [20.0, 1.0, -11.0, 4.0, 
-11.0], [-20.0, 19.0, 45.0, -42.0, 1.0], [33.0, 25.0, -10.0, -5.0, 25.0]])
+      ref=msk_ref*numpy.array([[87.0, 83.0], [-51.0, 96.0]])+(1.-msk_ref)*numpy.array([[16.0, -43.0], [26.0, 13.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_expandedData_rank3(self):
+   def test_generalTensorProduct_expandedData_rank1_array_rank2_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, -4.0, -5.0], [5.0, 0.0, -6.0]], [[-5.0, -5.0, 6.0], [5.0, -5.0, 4.0]], [[-2.0, 1.0, 
-0.0], [6.0, 4.0, -1.0]], [[0.0, 0.0, 0.0], [-5.0, 2.0, 4.0]], [[-1.0, -1.0, 4.0], [-1.0, 1.0, 1.0]]], [[[-3.0, 1.0, 0.0], [0.0, 
--5.0, -6.0]], [[6.0, 6.0, 2.0], [-3.0, -6.0, 7.0]], [[-4.0, -3.0, 3.0], [-5.0, 3.0, -6.0]], [[0.0, -4.0, -5.0], [4.0, 3.0, 
--1.0]], [[-3.0, -1.0, 5.0], [2.0, -3.0, -2.0]]], [[[7.0, 0.0, 3.0], [-1.0, -2.0, 0.0]], [[1.0, 7.0, -6.0], [0.0, 0.0, -5.0]], 
-[[4.0, -7.0, -3.0], [0.0, 4.0, 6.0]], [[1.0, 1.0, -6.0], [3.0, 5.0, 4.0]], [[0.0, 3.0, -6.0], [-7.0, -1.0, 7.0]]], [[[7.0, 0.0, 
--1.0], [-1.0, 4.0, 3.0]], [[-5.0, 0.0, 0.0], [1.0, -5.0, -3.0]], [[-6.0, 0.0, -6.0], [-5.0, -2.0, -2.0]], [[-4.0, 6.0, 7.0], 
-[-7.0, -4.0, 0.0]], [[7.0, -6.0, 4.0], [-7.0, -7.0, 1.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, 1.0, 7.0], [3.0, -2.0, -1.0]], 
-[[-7.0, -3.0, 2.0], [7.0, -3.0, 7.0]], [[0.0, 3.0, 3.0], [0.0, 3.0, -6.0]], [[6.0, 6.0, 6.0], [-4.0, -2.0, -1.0]], [[-1.0, 1.0, 
--6.0], [6.0, 0.0, 6.0]]], [[[3.0, -5.0, -4.0], [2.0, 4.0, -6.0]], [[-5.0, 2.0, -6.0], [-2.0, -5.0, 7.0]], [[3.0, -7.0, -4.0], 
-[7.0, -3.0, -4.0]], [[-3.0, -1.0, -1.0], [0.0, 2.0, 0.0]], [[-5.0, -3.0, -7.0], [-2.0, -3.0, 1.0]]], [[[3.0, 0.0, 2.0], [-2.0, 
-1.0, 0.0]], [[0.0, 6.0, -7.0], [-6.0, -1.0, -1.0]], [[0.0, -5.0, -4.0], [-3.0, 1.0, -3.0]], [[-6.0, -3.0, 0.0], [1.0, -2.0, 
--3.0]], [[-1.0, -2.0, 4.0], [5.0, 7.0, -1.0]]], [[[-4.0, 5.0, -3.0], [-2.0, -5.0, -7.0]], [[-1.0, 5.0, 7.0], [-5.0, 0.0, 
--3.0]], [[-3.0, 6.0, 6.0], [0.0, -1.0, 1.0]], [[4.0, 6.0, 4.0], [7.0, 7.0, -3.0]], [[7.0, -6.0, 3.0], [6.0, 0.0, 4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, 0.0], [-2.0, -6.0], [-3.0, 6.0]], [[1.0, 5.0], [3.0, 0.0], [5.0, 
-3.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 5.0], [7.0, -2.0], [6.0, 2.0]], [[-7.0, 3.0], [6.0, 0.0], [-7.0, -7.0]]])
-      res=tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([-6.0, 2.0])+(1.-msk_arg0)*numpy.array([-5.0, 3.0])
+      arg1=numpy.array([[2.0, 2.0, -7.0, 1.0, -6.0], [-5.0, 5.0, 1.0, -6.0, -3.0], [5.0, 7.0, 1.0, -5.0, 6.0], [-2.0, -1.0, 
+4.0, 5.0, -2.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-22.0, 1.0], [27.0, 103.0], [21.0, 21.0], [21.0, -13.0], [2.0, 28.0]], [[-32.0, -24.0], 
-[-34.0, -18.0], [-9.0, -7.0], [31.0, 11.0], [-15.0, 40.0]], [[-51.0, 13.0], [-26.0, -93.0], [45.0, 42.0], [49.0, -15.0], [37.0, 
--68.0]], [[-6.0, -2.0], [-4.0, -4.0], [27.0, -67.0], [-32.0, -29.0], [-58.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[-26.0, 63.0], 
-[-76.0, -53.0], [99.0, 42.0], [59.0, 25.0], [-106.0, -43.0]], [[-28.0, 65.0], [-52.0, -96.0], [-133.0, 70.0], [20.0, -15.0], 
-[-39.0, -46.0]], [[11.0, 13.0], [43.0, -37.0], [-11.0, 14.0], [23.0, 0.0], [31.0, 29.0]], [[78.0, 7.0], [140.0, 5.0], [86.0, 
--22.0], [52.0, 58.0], [-143.0, 43.0]]])
+      ref=msk_ref*numpy.array([[[-12.0, -12.0, 42.0, -6.0, 36.0], [30.0, -30.0, -6.0, 36.0, 18.0], [-30.0, -42.0, -6.0, 30.0, 
+-36.0], [12.0, 6.0, -24.0, -30.0, 12.0]], [[4.0, 4.0, -14.0, 2.0, -12.0], [-10.0, 10.0, 2.0, -12.0, -6.0], [10.0, 14.0, 2.0, 
+-10.0, 12.0], [-4.0, -2.0, 8.0, 10.0, -4.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -10.0, 35.0, -5.0, 30.0], [25.0, -25.0, -5.0, 
+30.0, 15.0], [-25.0, -35.0, -5.0, 25.0, -30.0], [10.0, 5.0, -20.0, -25.0, 10.0]], [[6.0, 6.0, -21.0, 3.0, -18.0], [-15.0, 15.0, 
+3.0, -18.0, -9.0], [15.0, 21.0, 3.0, -15.0, 18.0], [-6.0, -3.0, 12.0, 15.0, -6.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_mult_expandedData_rank4_expandedData_rank4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, -3.0, -5.0], [0.0, 4.0, -6.0]], [[7.0, -1.0, 2.0], [-5.0, 2.0, -3.0]], [[7.0, -1.0, 
-0.0], [0.0, -2.0, 0.0]], [[0.0, 7.0, 2.0], [-1.0, 5.0, 2.0]], [[0.0, 6.0, -7.0], [-7.0, 7.0, -7.0]]], [[[2.0, -6.0, 2.0], 
-[-7.0, -5.0, 3.0]], [[-4.0, -1.0, 1.0], [3.0, 1.0, -5.0]], [[5.0, 6.0, -6.0], [-2.0, -7.0, -5.0]], [[7.0, 6.0, 4.0], [-4.0, 
--3.0, 4.0]], [[-4.0, 6.0, -1.0], [-4.0, -7.0, 4.0]]], [[[7.0, 4.0, 0.0], [2.0, -5.0, 4.0]], [[2.0, 3.0, 0.0], [2.0, 6.0, 2.0]], 
-[[-2.0, 6.0, -1.0], [0.0, 7.0, -7.0]], [[3.0, -5.0, -6.0], [-5.0, -2.0, 7.0]], [[7.0, -6.0, 2.0], [-5.0, 5.0, -7.0]]], [[[4.0, 
--4.0, -1.0], [-1.0, 0.0, 5.0]], [[0.0, 7.0, 0.0], [2.0, 6.0, -3.0]], [[0.0, 5.0, 6.0], [0.0, -6.0, 0.0]], [[0.0, -2.0, -3.0], 
-[-7.0, 5.0, -5.0]], [[0.0, 5.0, 5.0], [-6.0, 3.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -7.0, -2.0], [-1.0, 6.0, -3.0]], 
-[[0.0, 3.0, 0.0], [-4.0, -5.0, 1.0]], [[-5.0, 7.0, 4.0], [3.0, -5.0, 2.0]], [[0.0, -1.0, -3.0], [3.0, 5.0, -4.0]], [[5.0, -6.0, 
-2.0], [4.0, 4.0, 3.0]]], [[[-4.0, 3.0, 7.0], [-6.0, -7.0, -6.0]], [[-1.0, 0.0, -5.0], [6.0, 2.0, 6.0]], [[2.0, 4.0, 6.0], 
-[-2.0, -2.0, -7.0]], [[-4.0, 2.0, -4.0], [-5.0, 1.0, -7.0]], [[-7.0, -3.0, -5.0], [1.0, 2.0, 7.0]]], [[[-6.0, 6.0, -7.0], 
-[-3.0, -1.0, 3.0]], [[4.0, 2.0, 4.0], [0.0, -2.0, -7.0]], [[4.0, -1.0, 1.0], [0.0, -4.0, 0.0]], [[-5.0, -6.0, 7.0], [0.0, 3.0, 
-3.0]], [[7.0, -5.0, 7.0], [4.0, -3.0, 4.0]]], [[[7.0, -2.0, 5.0], [5.0, 1.0, 5.0]], [[-5.0, -1.0, 1.0], [-2.0, -5.0, -5.0]], 
-[[-6.0, 5.0, 0.0], [-2.0, 6.0, -5.0]], [[-4.0, 2.0, -6.0], [1.0, -2.0, 1.0]], [[0.0, 0.0, -2.0], [-3.0, -2.0, 5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-1.0, -5.0, 2.0, -7.0, -3.0], [-5.0, 7.0, -1.0, -2.0, -6.0], [6.0, -1.0, -1.0, -3.0, -4.0], 
-[6.0, -1.0, -5.0, 0.0, 6.0]], [[-5.0, -1.0, -5.0, -6.0, 5.0], [3.0, 0.0, -3.0, -1.0, 3.0], [7.0, -3.0, 5.0, -1.0, -1.0], [4.0, 
-6.0, 0.0, -5.0, 0.0]], [[-5.0, 0.0, 3.0, -1.0, 2.0], [-5.0, -6.0, 0.0, 0.0, 1.0], [-4.0, -6.0, 7.0, 4.0, 0.0], [-2.0, 4.0, 1.0, 
-0.0, -6.0]]], [[[4.0, -2.0, 0.0, -6.0, 5.0], [1.0, -7.0, 0.0, 5.0, -1.0], [-6.0, 0.0, -3.0, -3.0, 4.0], [2.0, -6.0, 0.0, -1.0, 
-2.0]], [[4.0, -3.0, 6.0, -3.0, 0.0], [-4.0, 2.0, -7.0, 1.0, 7.0], [7.0, 3.0, 1.0, 7.0, -1.0], [-2.0, -1.0, 6.0, -2.0, -1.0]], 
-[[3.0, 7.0, 7.0, 1.0, -4.0], [-4.0, 2.0, -6.0, -7.0, -1.0], [0.0, -6.0, 0.0, -7.0, 4.0], [0.0, -3.0, -7.0, -2.0, 
-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -1.0, 3.0, -4.0, 4.0], [7.0, 4.0, 5.0, 6.0, -1.0], [-2.0, 3.0, -5.0, 7.0, -4.0], 
-[-6.0, 1.0, -5.0, -5.0, 6.0]], [[-6.0, -4.0, -4.0, 3.0, 6.0], [-6.0, 0.0, 6.0, -2.0, 6.0], [-7.0, -3.0, 7.0, -4.0, 3.0], [3.0, 
--4.0, 1.0, 2.0, -4.0]], [[5.0, 3.0, -2.0, 2.0, -7.0], [1.0, 1.0, 1.0, 2.0, 2.0], [-7.0, 6.0, 2.0, 0.0, -4.0], [6.0, 6.0, 2.0, 
-5.0, -3.0]]], [[[7.0, -5.0, -4.0, -4.0, 3.0], [-6.0, -2.0, -2.0, 1.0, -6.0], [-5.0, 5.0, -5.0, 4.0, -4.0], [5.0, 1.0, -1.0, 
-0.0, 2.0]], [[-7.0, -1.0, -4.0, -5.0, 7.0], [7.0, -6.0, -4.0, -7.0, 3.0], [-6.0, -6.0, 7.0, -1.0, 2.0], [1.0, 0.0, 5.0, 1.0, 
--5.0]], [[-7.0, 0.0, 0.0, -4.0, -1.0], [-1.0, -1.0, 7.0, -2.0, 6.0], [2.0, 0.0, 0.0, 3.0, -7.0], [1.0, -6.0, 1.0, 6.0, 0.0]]]])
-      res=tensor_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[34.0, -71.0, -10.0, -23.0, -13.0], [4.0, 54.0, 13.0, 41.0, -4.0], [51.0, 83.0, -50.0, 41.0, 
--41.0], [14.0, -28.0, 41.0, 19.0, 20.0]], [[-33.0, -51.0, 16.0, -24.0, -35.0], [-49.0, 70.0, 0.0, -15.0, -21.0], [71.0, 8.0, 
-19.0, 38.0, -61.0], [20.0, 32.0, 0.0, 12.0, 3.0]], [[-10.0, -28.0, 7.0, -37.0, -26.0], [-30.0, 45.0, 10.0, -15.0, -59.0], 
-[21.0, -10.0, -14.0, -34.0, -25.0], [42.0, -11.0, -47.0, 9.0, 44.0]], [[-23.0, -6.0, 15.0, -51.0, 26.0], [-18.0, 9.0, -68.0, 
--21.0, 57.0], [82.0, -30.0, 57.0, 25.0, -8.0], [12.0, 45.0, 18.0, -48.0, -9.0]], [[-16.0, -62.0, -58.0, -15.0, 9.0], [46.0, 
-91.0, -25.0, 15.0, 74.0], [161.0, 87.0, 9.0, 85.0, -69.0], [10.0, 64.0, 84.0, -23.0, -14.0]]], [[[-21.0, 46.0, 31.0, 80.0, 
--79.0], [-37.0, 47.0, 33.0, -59.0, -59.0], [-31.0, -29.0, -2.0, -27.0, -13.0], [-20.0, 8.0, -59.0, 41.0, 6.0]], [[5.0, -23.0, 
--29.0, 7.0, 44.0], [31.0, -63.0, 30.0, 60.0, 31.0], [-46.0, 34.0, -2.0, 50.0, 8.0], [-26.0, -2.0, 62.0, 10.0, -50.0]], [[-56.0, 
--41.0, -115.0, -37.0, 13.0], [69.0, 61.0, 56.0, 2.0, -60.0], [59.0, 22.0, -18.0, -53.0, -47.0], [76.0, 41.0, -38.0, -4.0, 
-44.0]], [[-73.0, 4.0, 6.0, -52.0, -19.0], [-45.0, 55.0, -28.0, -71.0, -41.0], [71.0, -82.0, 60.0, -48.0, -31.0], [56.0, 60.0, 
--77.0, -28.0, 33.0]], [[-53.0, 71.0, -55.0, 42.0, 4.0], [51.0, 0.0, 11.0, -53.0, -8.0], [-3.0, -53.0, 32.0, -63.0, 17.0], [8.0, 
-55.0, -51.0, -20.0, 1.0]]], [[[-27.0, 0.0, -8.0, -66.0, -7.0], [-17.0, 33.0, -8.0, -41.0, -71.0], [23.0, -58.0, 2.0, -94.0, 
--3.0], [72.0, -2.0, -93.0, -20.0, 71.0]], [[21.0, -21.0, 39.0, -60.0, 11.0], [-31.0, 16.0, -65.0, -5.0, 35.0], [63.0, -5.0, 
-13.0, 13.0, -1.0], [16.0, -8.0, 12.0, -33.0, 20.0]], [[-16.0, -66.0, -44.0, -49.0, 62.0], [33.0, -8.0, -23.0, 54.0, 85.0], 
-[83.0, 53.0, 32.0, 94.0, -33.0], [0.0, 48.0, 100.0, -30.0, -48.0]], [[45.0, 55.0, 50.0, 58.0, -99.0], [-25.0, 102.0, -16.0, 
--77.0, -55.0], [23.0, 0.0, -57.0, -76.0, 3.0], [4.0, -46.0, -82.0, 20.0, 81.0]], [[-8.0, -83.0, 31.0, -7.0, -44.0], [-60.0, 
-68.0, 18.0, 21.0, -11.0], [57.0, 56.0, -3.0, 92.0, -75.0], [-6.0, 11.0, 46.0, 39.0, -20.0]]], [[[32.0, 21.0, 60.0, 8.0, -59.0], 
-[-48.0, 51.0, -22.0, -44.0, -41.0], [6.0, -16.0, -28.0, -44.0, 4.0], [8.0, -41.0, -56.0, 11.0, 53.0]], [[-12.0, -50.0, -20.0, 
--75.0, 57.0], [11.0, -8.0, -45.0, 30.0, 64.0], [79.0, 15.0, 35.0, 50.0, -17.0], [20.0, 33.0, 57.0, -43.0, -17.0]], [[-79.0, 
-13.0, -43.0, -18.0, 37.0], [9.0, -48.0, 27.0, -11.0, -21.0], [-31.0, -69.0, 61.0, -23.0, 1.0], [20.0, 60.0, -30.0, -13.0, 
--30.0]], [[2.0, -34.0, -4.0, 37.0, -31.0], [2.0, 67.0, 1.0, 7.0, 38.0], [75.0, 69.0, -5.0, 81.0, -51.0], [-26.0, 28.0, 62.0, 
-17.0, -26.0]], [[-47.0, 33.0, 43.0, -3.0, -15.0], [-48.0, 28.0, -66.0, -67.0, 42.0], [72.0, -66.0, 81.0, 19.0, -12.0], [-8.0, 
-68.0, -12.0, -35.0, -20.0]]]])+(1.-msk_ref)*numpy.array([[[[40.0, 15.0, 30.0, -63.0, 38.0], [133.0, -9.0, -57.0, 9.0, -46.0], 
-[14.0, -14.0, -36.0, 51.0, 0.0], [-71.0, 39.0, -13.0, -66.0, 38.0]], [[-18.0, 13.0, 24.0, 46.0, -30.0], [-30.0, 37.0, 53.0, 
-23.0, 33.0], [31.0, 1.0, 6.0, -20.0, 8.0], [-15.0, -22.0, -17.0, 7.0, 5.0]], [[-10.0, -21.0, -43.0, 54.0, -34.0], [-128.0, 6.0, 
-49.0, -2.0, 34.0], [-48.0, 33.0, 32.0, -40.0, -11.0], [87.0, -18.0, 14.0, 66.0, -39.0]], [[5.0, -25.0, -22.0, -30.0, 63.0], 
-[24.0, -35.0, -63.0, -28.0, -39.0], [-25.0, -30.0, 7.0, -1.0, 35.0], [-5.0, 13.0, 11.0, -36.0, -6.0]], [[55.0, 1.0, 3.0, -82.0, 
-7.0], [74.0, -13.0, -12.0, 16.0, -31.0], [-20.0, 41.0, -55.0, 80.0, -75.0], [-9.0, 27.0, -8.0, -5.0, 36.0]]], [[[42.0, 50.0, 
-14.0, 122.0, -108.0], [-46.0, 51.0, 3.0, 39.0, 15.0], [-2.0, 33.0, 36.0, -75.0, 49.0], [32.0, 56.0, 2.0, 18.0, -34.0]], 
-[[-45.0, -46.0, -25.0, -64.0, 57.0], [-40.0, -39.0, 12.0, -36.0, -3.0], [7.0, -15.0, -21.0, 33.0, -38.0], [14.0, -61.0, 5.0, 
-18.0, 11.0]], [[67.0, 12.0, -6.0, 62.0, -23.0], [1.0, 37.0, 3.0, 42.0, -2.0], [-66.0, 32.0, 26.0, -29.0, 33.0], [17.0, 62.0, 
--9.0, -16.0, -16.0]], [[-49.0, 8.0, 4.0, 57.0, 23.0], [0.0, -9.0, -55.0, -34.0, -1.0], [27.0, -73.0, 58.0, -78.0, 109.0], 
-[-25.0, 1.0, 17.0, -37.0, -35.0]], [[-105.0, -3.0, -11.0, -33.0, -1.0], [-35.0, -54.0, -19.0, -73.0, 21.0], [67.0, -49.0, 13.0, 
--14.0, -10.0], [17.0, -66.0, 38.0, 48.0, -23.0]]], [[[-142.0, -23.0, -12.0, 33.0, 42.0], [-77.0, -22.0, 30.0, -64.0, 61.0], 
-[46.0, -87.0, 66.0, -68.0, 59.0], [-1.0, -93.0, 23.0, 24.0, -40.0]], [[95.0, 2.0, 4.0, 36.0, -7.0], [13.0, 39.0, -5.0, 56.0, 
--32.0], [-52.0, 42.0, -12.0, 1.0, 19.0], [-3.0, 62.0, -27.0, -40.0, 14.0]], [[63.0, 7.0, 30.0, 3.0, -25.0], [7.0, 41.0, 31.0, 
-56.0, -20.0], [16.0, 45.0, -53.0, 36.0, -31.0], [-25.0, 14.0, -39.0, -21.0, 45.0]], [[-1.0, 47.0, -17.0, -11.0, -87.0], [26.0, 
--34.0, -45.0, -31.0, 10.0], [-9.0, 27.0, 18.0, -5.0, -41.0], [60.0, 43.0, 51.0, 69.0, -42.0]], [[128.0, 17.0, 23.0, -46.0, 
--64.0], [37.0, 41.0, 44.0, 83.0, -32.0], [-22.0, 116.0, -97.0, 100.0, -121.0], [6.0, 49.0, -41.0, 11.0, 64.0]]], [[[72.0, 
--10.0, -5.0, -69.0, -2.0], [38.0, 12.0, 49.0, 44.0, -6.0], [-56.0, 76.0, -57.0, 91.0, -107.0], [13.0, 20.0, -22.0, 17.0, 
-40.0]], [[37.0, 27.0, 15.0, 72.0, -69.0], [-46.0, 20.0, -41.0, 17.0, -32.0], [40.0, 14.0, -5.0, -49.0, 46.0], [13.0, 33.0, 
--2.0, -7.0, -8.0]], [[-87.0, -10.0, -54.0, 37.0, 47.0], [-13.0, -51.0, -55.0, -80.0, 36.0], [-59.0, -79.0, 117.0, -91.0, 94.0], 
-[42.0, 2.0, 62.0, 16.0, -90.0]], [[-52.0, -25.0, -4.0, 12.0, 26.0], [-67.0, -13.0, -1.0, -27.0, -2.0], [45.0, -37.0, 3.0, 
--27.0, 31.0], [-2.0, -53.0, 0.0, -2.0, -2.0]], [[-52.0, 11.0, 24.0, -2.0, -14.0], [-3.0, 11.0, 47.0, -3.0, 38.0], [51.0, -15.0, 
--3.0, 5.0, -19.0], [-24.0, -45.0, -6.0, 18.0, 10.0]]]])
+   def test_generalTensorProduct_expandedData_rank2_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-3.0, -3.0, 0.0], [-7.0, -2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 1.0, -4.0], [-1.0, 
+-7.0, -6.0]])
+      arg1=numpy.array([[[0.0, 2.0, 3.0, 7.0, -5.0], [3.0, -5.0, -1.0, -5.0, -6.0], [7.0, 3.0, 5.0, -3.0, -3.0], [1.0, -4.0, 
+-2.0, 7.0, 0.0]], [[3.0, -7.0, -2.0, 0.0, -3.0], [7.0, 3.0, 3.0, 7.0, -7.0], [-6.0, 6.0, 5.0, -4.0, -2.0], [6.0, 7.0, 0.0, 1.0, 
+5.0]], [[-2.0, -5.0, 0.0, 0.0, 0.0], [1.0, 0.0, -1.0, 6.0, 6.0], [-2.0, -3.0, -7.0, 0.0, -5.0], [4.0, -3.0, 7.0, 3.0, 7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-9.0, 15.0, -3.0, -21.0, 24.0], [-30.0, 6.0, -6.0, -6.0, 39.0], [-3.0, -27.0, -30.0, 21.0, 
+15.0], [-21.0, -9.0, 6.0, -24.0, -15.0]], [[-20.0, -35.0, -17.0, -49.0, 41.0], [-28.0, 29.0, -6.0, 63.0, 98.0], [-51.0, -54.0, 
+-94.0, 29.0, -10.0], [9.0, -7.0, 63.0, -30.0, 39.0]]])+(1.-msk_ref)*numpy.array([[[11.0, 9.0, -8.0, -14.0, 7.0], [-3.0, 13.0, 
+9.0, -7.0, -19.0], [-12.0, 12.0, 23.0, 2.0, 24.0], [-12.0, 27.0, -24.0, -25.0, -23.0]], [[-9.0, 77.0, 11.0, -7.0, 26.0], 
+[-58.0, -16.0, -14.0, -80.0, 19.0], [47.0, -27.0, 2.0, 31.0, 47.0], [-67.0, -27.0, -40.0, -32.0, -77.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_float_rank0_offset0(self):
-      arg0=7.0
-      arg1=6.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=42.0
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      self.assertTrue(isinstance(res,complex),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_array_rank0_offset0(self):
-      arg0=0.0
-      arg1=numpy.array(-6.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(-0.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_array_rank1_offset0(self):
-      arg0=-2.0
-      arg1=numpy.array([-7.0, -5.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([14.0, 10.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_array_rank2_offset0(self):
-      arg0=-3.0
-      arg1=numpy.array([[0.0, -4.0, 2.0, -7.0, -3.0], [-7.0, 4.0, -1.0, 3.0, 0.0], [3.0, 4.0, -3.0, 7.0, -4.0], [5.0, 4.0, 4.0, 
-0.0, 3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-0.0, 12.0, -6.0, 21.0, 9.0], [21.0, -12.0, 3.0, -9.0, -0.0], [-9.0, -12.0, 9.0, -21.0, 12.0], [-15.0, 
--12.0, -12.0, -0.0, -9.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_array_rank3_offset0(self):
-      arg0=-6.0
-      arg1=numpy.array([[[-4.0, 7.0], [-1.0, -3.0]], [[3.0, -1.0], [-5.0, -6.0]], [[-6.0, 6.0], [5.0, -5.0]], [[0.0, 6.0], 
-[7.0, 7.0]], [[-6.0, 7.0], [4.0, 5.0]], [[6.0, 1.0], [-5.0, 2.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[24.0, -42.0], [6.0, 18.0]], [[-18.0, 6.0], [30.0, 36.0]], [[36.0, -36.0], [-30.0, 30.0]], [[-0.0, 
--36.0], [-42.0, -42.0]], [[36.0, -42.0], [-24.0, -30.0]], [[-36.0, -6.0], [30.0, -12.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_array_rank4_offset0(self):
-      arg0=7.0
-      arg1=numpy.array([[[[0.0, -7.0, -6.0, 5.0], [-5.0, 2.0, 6.0, 0.0], [0.0, 1.0, -1.0, -1.0]], [[0.0, -2.0, -1.0, 3.0], 
-[-4.0, 0.0, 2.0, -3.0], [-3.0, -6.0, -3.0, -2.0]]], [[[6.0, 7.0, 5.0, 5.0], [5.0, 1.0, 0.0, -3.0], [0.0, 0.0, -1.0, 0.0]], 
-[[-6.0, 1.0, -7.0, -3.0], [7.0, 7.0, -5.0, 6.0], [-7.0, 1.0, 0.0, 0.0]]], [[[2.0, -2.0, 6.0, -6.0], [-7.0, 2.0, 0.0, -2.0], 
-[3.0, -6.0, -3.0, 1.0]], [[-6.0, 1.0, 2.0, 3.0], [-2.0, 5.0, 4.0, 1.0], [4.0, 0.0, -2.0, -2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[0.0, -49.0, -42.0, 35.0], [-35.0, 14.0, 42.0, 0.0], [0.0, 7.0, -7.0, -7.0]], [[0.0, -14.0, -7.0, 
-21.0], [-28.0, 0.0, 14.0, -21.0], [-21.0, -42.0, -21.0, -14.0]]], [[[42.0, 49.0, 35.0, 35.0], [35.0, 7.0, 0.0, -21.0], [0.0, 
-0.0, -7.0, 0.0]], [[-42.0, 7.0, -49.0, -21.0], [49.0, 49.0, -35.0, 42.0], [-49.0, 7.0, 0.0, 0.0]]], [[[14.0, -14.0, 42.0, 
--42.0], [-49.0, 14.0, 0.0, -14.0], [21.0, -42.0, -21.0, 7.0]], [[-42.0, 7.0, 14.0, 21.0], [-14.0, 35.0, 28.0, 7.0], [28.0, 0.0, 
--14.0, -14.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_constData_rank0_offset0(self):
-      arg0=7.0
-      arg1=Data(-4.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-28.0,self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -1.0, -3.0], [3.0, 5.0, 0.0]], [[1.0, 2.0, -5.0], [5.0, -5.0, 
+-3.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, 0.0, -6.0], [2.0, -6.0, 5.0]], [[-4.0, -7.0, -1.0], [-5.0, 5.0, -3.0]]])
+      arg1=numpy.array([[[[-5.0, -2.0, -4.0, -1.0, 4.0], [6.0, -4.0, -6.0, 5.0, -7.0], [0.0, 1.0, -2.0, -1.0, 0.0], [4.0, 5.0, 
+-3.0, 2.0, -4.0]], [[-6.0, -3.0, -1.0, 2.0, -2.0], [0.0, -4.0, 0.0, 0.0, 4.0], [-3.0, 0.0, 4.0, -2.0, 6.0], [0.0, 5.0, 0.0, 
+3.0, -7.0]], [[-7.0, 3.0, 1.0, -2.0, 2.0], [7.0, -2.0, -2.0, 7.0, -6.0], [-6.0, -7.0, -3.0, 4.0, -5.0], [-5.0, 0.0, 5.0, 3.0, 
+2.0]]], [[[7.0, 0.0, 7.0, 3.0, 2.0], [0.0, 6.0, 5.0, -2.0, 0.0], [-1.0, 2.0, 1.0, -1.0, -2.0], [3.0, 4.0, 7.0, 6.0, 3.0]], 
+[[-3.0, 0.0, -7.0, -2.0, 0.0], [3.0, -2.0, 2.0, 7.0, -2.0], [-2.0, -4.0, 0.0, -2.0, 7.0], [-7.0, 0.0, -1.0, 0.0, 4.0]], [[5.0, 
+-7.0, 0.0, 6.0, 0.0], [-2.0, -7.0, -2.0, 3.0, 7.0], [-5.0, 3.0, 1.0, -3.0, -7.0], [0.0, -1.0, 4.0, -4.0, 6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[33.0, -6.0, -16.0, 3.0, 2.0], [-6.0, 18.0, 31.0, 8.0, 4.0], [8.0, 7.0, 8.0, -23.0, 38.0], 
+[-11.0, 7.0, 1.0, 6.0, 30.0]], [[53.0, -2.0, 59.0, 20.0, 0.0], [-38.0, 59.0, 25.0, -84.0, 20.0], [44.0, 57.0, 23.0, -11.0, 
+13.0], [79.0, 38.0, 0.0, 35.0, -51.0]]])+(1.-msk_ref)*numpy.array([[[124.0, -43.0, 70.0, 65.0, -28.0], [-100.0, 21.0, 30.0, 
+-98.0, 118.0], [21.0, 80.0, 35.0, -24.0, -51.0], [58.0, -22.0, 25.0, -36.0, 20.0]], [[4.0, 47.0, -48.0, -51.0, -14.0], [-10.0, 
+27.0, 17.0, 9.0, -25.0], [37.0, -36.0, -25.0, 18.0, 29.0], [-61.0, -72.0, -45.0, -50.0, 50.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_constData_rank1_offset0(self):
-      arg0=3.0
-      arg1=Data(numpy.array([-1.0, -6.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank1_array_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([7.0, 6.0])+(1.-msk_arg0)*numpy.array([2.0, 0.0])
+      arg1=numpy.array([[[-5.0, 3.0], [4.0, 7.0]], [[1.0, 1.0], [5.0, 7.0]], [[-4.0, 4.0], [-3.0, 0.0]], [[-7.0, 1.0], [5.0, 
+-2.0]], [[6.0, 5.0], [0.0, 5.0]], [[5.0, 5.0], [-6.0, 0.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-3.0, -18.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-35.0, 21.0], [28.0, 49.0]], [[7.0, 7.0], [35.0, 49.0]], [[-28.0, 28.0], [-21.0, 0.0]], 
+[[-49.0, 7.0], [35.0, -14.0]], [[42.0, 35.0], [0.0, 35.0]], [[35.0, 35.0], [-42.0, 0.0]]], [[[-30.0, 18.0], [24.0, 42.0]], 
+[[6.0, 6.0], [30.0, 42.0]], [[-24.0, 24.0], [-18.0, 0.0]], [[-42.0, 6.0], [30.0, -12.0]], [[36.0, 30.0], [0.0, 30.0]], [[30.0, 
+30.0], [-36.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-10.0, 6.0], [8.0, 14.0]], [[2.0, 2.0], [10.0, 14.0]], [[-8.0, 8.0], 
+[-6.0, 0.0]], [[-14.0, 2.0], [10.0, -4.0]], [[12.0, 10.0], [0.0, 10.0]], [[10.0, 10.0], [-12.0, 0.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_constData_rank2_offset0(self):
-      arg0=-1.0
-      arg1=Data(numpy.array([[-7.0, 0.0, -7.0, -1.0, -4.0], [0.0, -4.0, -1.0, 3.0, 0.0], [4.0, -5.0, 6.0, -3.0, 0.0], [0.0, 
--2.0, 3.0, -2.0, 4.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[7.0, -0.0, 7.0, 1.0, 4.0], [-0.0, 4.0, 1.0, -3.0, -0.0], [-4.0, 5.0, -6.0, 3.0, -0.0], [-0.0, 2.0, 
--3.0, 2.0, -4.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_array_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-7.0, 4.0, 2.0], [-2.0, -1.0, 0.0]])+(1.-msk_arg0)*numpy.array([[6.0, 7.0, -7.0], [7.0, 6.0, 
+-7.0]])
+      arg1=numpy.array([[[[3.0, -5.0], [0.0, 1.0]], [[-7.0, -2.0], [-3.0, -3.0]], [[-6.0, -3.0], [0.0, 6.0]], [[-4.0, -6.0], 
+[-1.0, 7.0]], [[0.0, 5.0], [6.0, 0.0]], [[4.0, -5.0], [-7.0, -7.0]]], [[[6.0, -6.0], [4.0, -2.0]], [[1.0, -5.0], [-4.0, 6.0]], 
+[[-3.0, -3.0], [-4.0, -7.0]], [[-1.0, 0.0], [3.0, -6.0]], [[7.0, 4.0], [3.0, 7.0]], [[3.0, -3.0], [-6.0, -4.0]]], [[[2.0, 7.0], 
+[0.0, -2.0]], [[7.0, 7.0], [-6.0, -3.0]], [[-4.0, 3.0], [-5.0, 6.0]], [[-6.0, 0.0], [-3.0, 1.0]], [[-7.0, -6.0], [6.0, 0.0]], 
+[[-4.0, 5.0], [-2.0, -2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[7.0, 25.0], [16.0, -19.0]], [[67.0, 8.0], [-7.0, 39.0]], [[22.0, 15.0], [-26.0, -58.0]], 
+[[12.0, 42.0], [13.0, -71.0]], [[14.0, -31.0], [-18.0, 28.0]], [[-24.0, 33.0], [21.0, 29.0]]], [[[-12.0, 16.0], [-4.0, 0.0]], 
+[[13.0, 9.0], [10.0, 0.0]], [[15.0, 9.0], [4.0, -5.0]], [[9.0, 12.0], [-1.0, -8.0]], [[-7.0, -14.0], [-15.0, -7.0]], [[-11.0, 
+13.0], [20.0, 18.0]]]])+(1.-msk_ref)*numpy.array([[[[46.0, -121.0], [28.0, 6.0]], [[-84.0, -96.0], [-4.0, 45.0]], [[-29.0, 
+-60.0], [7.0, -55.0]], [[11.0, -36.0], [36.0, -7.0]], [[98.0, 100.0], [15.0, 49.0]], [[73.0, -86.0], [-70.0, -56.0]]], [[[43.0, 
+-120.0], [24.0, 9.0]], [[-92.0, -93.0], [-3.0, 36.0]], [[-32.0, -60.0], [11.0, -42.0]], [[8.0, -42.0], [32.0, 6.0]], [[91.0, 
+101.0], [18.0, 42.0]], [[74.0, -88.0], [-71.0, -59.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_constData_rank3_offset0(self):
-      arg0=-6.0
-      arg1=Data(numpy.array([[[-6.0, 2.0], [4.0, 2.0]], [[-5.0, -2.0], [-4.0, -3.0]], [[-6.0, 2.0], [-1.0, -4.0]], [[0.0, 0.0], 
-[0.0, 3.0]], [[5.0, 5.0], [-7.0, -6.0]], [[0.0, 5.0], [6.0, 3.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank1_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-7.0, 5.0])+(1.-msk_arg0)*numpy.array([0.0, -5.0])
+      arg1=Data(7.0,self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[36.0, -12.0], [-24.0, -12.0]], [[30.0, 12.0], [24.0, 18.0]], [[36.0, -12.0], [6.0, 24.0]], 
-[[-0.0, -0.0], [-0.0, -18.0]], [[-30.0, -30.0], [42.0, 36.0]], [[-0.0, -30.0], [-36.0, -18.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-49.0, 35.0])+(1.-msk_ref)*numpy.array([0.0, -35.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_constData_rank4_offset0(self):
-      arg0=-6.0
-      arg1=Data(numpy.array([[[[7.0, 1.0, -7.0, 0.0], [-6.0, 0.0, -5.0, 4.0], [-6.0, 7.0, 0.0, -5.0]], [[2.0, 3.0, 5.0, -4.0], 
-[7.0, -3.0, 0.0, -6.0], [2.0, -6.0, 7.0, 2.0]]], [[[3.0, 0.0, 1.0, -2.0], [-4.0, -1.0, 0.0, -5.0], [7.0, 3.0, 0.0, -6.0]], 
-[[-7.0, -1.0, 1.0, -7.0], [7.0, 4.0, -1.0, -3.0], [5.0, -2.0, 2.0, 6.0]]], [[[-3.0, -1.0, 7.0, 0.0], [0.0, 6.0, 5.0, 0.0], 
-[2.0, -7.0, 3.0, -4.0]], [[-5.0, 3.0, 5.0, 2.0], [-5.0, 1.0, 3.0, -2.0], [2.0, -3.0, 5.0, -5.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-42.0, -6.0, 42.0, -0.0], [36.0, -0.0, 30.0, -24.0], [36.0, -42.0, -0.0, 30.0]], [[-12.0, -18.0, 
--30.0, 24.0], [-42.0, 18.0, -0.0, 36.0], [-12.0, 36.0, -42.0, -12.0]]], [[[-18.0, -0.0, -6.0, 12.0], [24.0, 6.0, -0.0, 30.0], 
-[-42.0, -18.0, -0.0, 36.0]], [[42.0, 6.0, -6.0, 42.0], [-42.0, -24.0, 6.0, 18.0], [-30.0, 12.0, -12.0, -36.0]]], [[[18.0, 6.0, 
--42.0, -0.0], [-0.0, -36.0, -30.0, -0.0], [-12.0, 42.0, -18.0, 24.0]], [[30.0, -18.0, -30.0, -12.0], [30.0, -6.0, -18.0, 12.0], 
-[-12.0, 18.0, -30.0, 30.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, 3.0, -4.0], [-2.0, 4.0, -4.0]])+(1.-msk_arg0)*numpy.array([[5.0, 5.0, -5.0], [4.0, 7.0, 
+-6.0]])
+      arg1=Data(numpy.array([6.0, -3.0, -1.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([25.0, -20.0])+(1.-msk_ref)*numpy.array([20.0, 9.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_expandedData_rank0_offset0(self):
-      arg0=7.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-6.0)+(1-msk_arg1)*(-3.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank3_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, 3.0, -5.0], [3.0, 5.0, 7.0]], [[0.0, -4.0, 6.0], [0.0, 1.0, 
+3.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -2.0, -4.0], [1.0, 0.0, -2.0]], [[2.0, -6.0, -4.0], [-5.0, 5.0, -1.0]]])
+      arg1=Data(numpy.array([[2.0, 7.0, 0.0], [1.0, 6.0, -5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-42.0)+(1.-msk_ref)*numpy.array(-21.0)
+      ref=msk_ref*numpy.array([21.0, -37.0])+(1.-msk_ref)*numpy.array([1.0, -8.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_expandedData_rank1_offset0(self):
-      arg0=-6.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([7.0, 2.0])+(1.-msk_arg1)*numpy.array([0.0, -5.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank4_constData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, 0.0, -6.0], [-2.0, -2.0, 4.0], [-4.0, 7.0, -5.0], [1.0, -5.0, -7.0]], [[5.0, 6.0, 
+-3.0], [7.0, -5.0, -5.0], [7.0, 2.0, -6.0], [3.0, 0.0, 7.0]]], [[[5.0, 1.0, -4.0], [0.0, -5.0, 4.0], [4.0, -2.0, 6.0], [-2.0, 
+-4.0, 0.0]], [[-1.0, -3.0, -2.0], [0.0, -3.0, 5.0], [1.0, 5.0, 6.0], [0.0, 7.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 
+-2.0, 0.0], [-5.0, -6.0, 7.0], [-2.0, -3.0, 4.0], [-3.0, -2.0, -1.0]], [[-6.0, 2.0, -5.0], [5.0, 3.0, 0.0], [3.0, 1.0, -7.0], 
+[2.0, -2.0, 5.0]]], [[[6.0, 0.0, -4.0], [-6.0, -5.0, 1.0], [-3.0, 7.0, 7.0], [0.0, -5.0, -4.0]], [[2.0, 5.0, -6.0], [1.0, -3.0, 
+5.0], [-6.0, 1.0, 6.0], [7.0, 7.0, 6.0]]]])
+      arg1=Data(numpy.array([[[-5.0, 3.0, -6.0], [-7.0, 6.0, 0.0], [0.0, 4.0, 7.0], [-4.0, -3.0, -6.0]], [[2.0, 3.0, 5.0], 
+[4.0, -7.0, 1.0], [5.0, 2.0, -3.0], [7.0, 6.0, -1.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-42.0, -12.0])+(1.-msk_ref)*numpy.array([-0.0, 30.0])
+      ref=msk_ref*numpy.array([206.0, 67.0])+(1.-msk_ref)*numpy.array([41.0, 180.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_expandedData_rank2_offset0(self):
-      arg0=-1.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 6.0, 6.0, 7.0, 0.0], [7.0, -4.0, 4.0, -2.0, 7.0], [-1.0, -6.0, 5.0, -5.0, 7.0], [-2.0, 
-0.0, -4.0, 3.0, 3.0]])+(1.-msk_arg1)*numpy.array([[-5.0, 4.0, 5.0, -2.0, 7.0], [-6.0, 1.0, -3.0, 3.0, 0.0], [-4.0, 0.0, 5.0, 
--3.0, 0.0], [-2.0, 6.0, -7.0, 0.0, -1.0]])
+   def test_generalTensorProduct_expandedData_rank1_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-7.0, 6.0])+(1.-msk_arg0)*numpy.array([-5.0, -2.0])
+      arg1=Data(numpy.array([-2.0, -3.0]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-1.0, -6.0, -6.0, -7.0, -0.0], [-7.0, 4.0, -4.0, 2.0, -7.0], [1.0, 6.0, -5.0, 5.0, -7.0], [2.0, 
--0.0, 4.0, -3.0, -3.0]])+(1.-msk_ref)*numpy.array([[5.0, -4.0, -5.0, 2.0, -7.0], [6.0, -1.0, 3.0, -3.0, -0.0], [4.0, -0.0, 
--5.0, 3.0, -0.0], [2.0, -6.0, 7.0, -0.0, 1.0]])
+      ref=msk_ref*numpy.array([[14.0, 21.0], [-12.0, -18.0]])+(1.-msk_ref)*numpy.array([[10.0, 15.0], [4.0, 6.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_expandedData_rank3_offset0(self):
-      arg0=7.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -5.0], [-6.0, 0.0]], [[3.0, -7.0], [4.0, -1.0]], [[1.0, -6.0], [-6.0, -6.0]], [[0.0, 
--4.0], [-6.0, 7.0]], [[-3.0, 7.0], [-6.0, 1.0]], [[-2.0, 3.0], [-6.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -4.0], [2.0, 
-1.0]], [[0.0, 0.0], [-7.0, -4.0]], [[-6.0, -1.0], [3.0, -3.0]], [[-4.0, -6.0], [5.0, 1.0]], [[-5.0, 7.0], [-4.0, 0.0]], [[7.0, 
--7.0], [2.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank2_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, 0.0, 5.0], [-3.0, -5.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 0.0, 7.0], [0.0, 
+-1.0, -2.0]])
+      arg1=Data(numpy.array([[1.0, -5.0], [0.0, 0.0], [-3.0, 5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -35.0], [-42.0, 0.0]], [[21.0, -49.0], [28.0, -7.0]], [[7.0, -42.0], [-42.0, -42.0]], 
-[[0.0, -28.0], [-42.0, 49.0]], [[-21.0, 49.0], [-42.0, 7.0]], [[-14.0, 21.0], [-42.0, 
-0.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, -28.0], [14.0, 7.0]], [[0.0, 0.0], [-49.0, -28.0]], [[-42.0, -7.0], [21.0, -21.0]], 
-[[-28.0, -42.0], [35.0, 7.0]], [[-35.0, 49.0], [-28.0, 0.0]], [[49.0, -49.0], [14.0, -21.0]]])
+      ref=msk_ref*numpy.array([[-21.0, 55.0], [3.0, 5.0]])+(1.-msk_ref)*numpy.array([[-27.0, 65.0], [6.0, -10.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_float_rank0_expandedData_rank4_offset0(self):
-      arg0=3.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[3.0, -4.0, -6.0, 7.0], [7.0, 3.0, 3.0, 6.0], [0.0, -7.0, 6.0, 1.0]], [[-7.0, 1.0, 4.0, 
-4.0], [5.0, 4.0, 1.0, -7.0], [7.0, 0.0, -6.0, 2.0]]], [[[0.0, -7.0, -3.0, 2.0], [1.0, -7.0, 2.0, -6.0], [0.0, 5.0, -1.0, 
--3.0]], [[-7.0, -1.0, 3.0, 0.0], [5.0, 0.0, 0.0, -6.0], [-5.0, -3.0, 0.0, -5.0]]], [[[-7.0, 0.0, 2.0, -3.0], [0.0, 6.0, -4.0, 
--1.0], [-4.0, -2.0, 4.0, 7.0]], [[-7.0, 6.0, -5.0, -1.0], [6.0, 2.0, 2.0, -3.0], [-5.0, -7.0, 2.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -4.0, 6.0, -6.0], [7.0, 7.0, -3.0, -2.0], [3.0, -5.0, 0.0, 0.0]], [[3.0, 1.0, 0.0, 
--1.0], [-3.0, -3.0, 0.0, -3.0], [-3.0, -6.0, 6.0, -2.0]]], [[[-2.0, 3.0, 0.0, -2.0], [0.0, 5.0, -4.0, -3.0], [-5.0, -5.0, -7.0, 
--1.0]], [[-4.0, -5.0, 2.0, -1.0], [2.0, -1.0, 0.0, 1.0], [6.0, 6.0, 3.0, -4.0]]], [[[-7.0, -6.0, 3.0, -2.0], [-6.0, 7.0, 3.0, 
--3.0], [-1.0, 2.0, -3.0, 1.0]], [[3.0, -3.0, 0.0, -5.0], [2.0, -6.0, -7.0, 5.0], [-2.0, 0.0, 3.0, 1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank3_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -5.0, -1.0], [0.0, -2.0, 3.0]], [[2.0, -6.0, 1.0], [0.0, -4.0, 
+2.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, -5.0, 0.0], [0.0, -4.0, -1.0]], [[-6.0, -7.0, -3.0], [-1.0, 0.0, -6.0]]])
+      arg1=Data(numpy.array([[[-5.0, -7.0], [5.0, 0.0], [-1.0, 0.0]], [[-4.0, -1.0], [-6.0, 1.0], [-4.0, 
+-4.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[9.0, -12.0, -18.0, 21.0], [21.0, 9.0, 9.0, 18.0], [0.0, -21.0, 18.0, 3.0]], [[-21.0, 3.0, 
-12.0, 12.0], [15.0, 12.0, 3.0, -21.0], [21.0, 0.0, -18.0, 6.0]]], [[[0.0, -21.0, -9.0, 6.0], [3.0, -21.0, 6.0, -18.0], [0.0, 
-15.0, -3.0, -9.0]], [[-21.0, -3.0, 9.0, 0.0], [15.0, 0.0, 0.0, -18.0], [-15.0, -9.0, 0.0, -15.0]]], [[[-21.0, 0.0, 6.0, -9.0], 
-[0.0, 18.0, -12.0, -3.0], [-12.0, -6.0, 12.0, 21.0]], [[-21.0, 18.0, -15.0, -3.0], [18.0, 6.0, 6.0, -9.0], [-15.0, -21.0, 6.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -12.0, 18.0, -18.0], [21.0, 21.0, -9.0, -6.0], [9.0, -15.0, 0.0, 0.0]], [[9.0, 3.0, 
-0.0, -3.0], [-9.0, -9.0, 0.0, -9.0], [-9.0, -18.0, 18.0, -6.0]]], [[[-6.0, 9.0, 0.0, -6.0], [0.0, 15.0, -12.0, -9.0], [-15.0, 
--15.0, -21.0, -3.0]], [[-12.0, -15.0, 6.0, -3.0], [6.0, -3.0, 0.0, 3.0], [18.0, 18.0, 9.0, -12.0]]], [[[-21.0, -18.0, 9.0, 
--6.0], [-18.0, 21.0, 9.0, -9.0], [-3.0, 6.0, -9.0, 3.0]], [[9.0, -9.0, 0.0, -15.0], [6.0, -18.0, -21.0, 15.0], [-6.0, 0.0, 9.0, 
-3.0]]]])
+      ref=msk_ref*numpy.array([[-24.0, -14.0], [-25.0, -26.0]])+(1.-msk_ref)*numpy.array([[-32.0, -49.0], [26.0, 67.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_float_rank0_offset0(self):
-      arg0=numpy.array(4.0)
-      arg1=-5.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(-20.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank4_constData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 3.0, -2.0], [-3.0, -6.0, 6.0], [1.0, 3.0, 6.0], [-2.0, -7.0, -2.0]], [[-7.0, -3.0, 
+-3.0], [-1.0, 2.0, -6.0], [2.0, -5.0, 4.0], [3.0, -5.0, 0.0]]], [[[-6.0, -2.0, 5.0], [7.0, 4.0, 3.0], [7.0, 2.0, 3.0], [2.0, 
+0.0, 2.0]], [[5.0, -1.0, 0.0], [-6.0, 0.0, 7.0], [0.0, 4.0, -2.0], [-5.0, 6.0, -3.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, 
+-6.0, -4.0], [4.0, 7.0, 3.0], [0.0, -2.0, 6.0], [2.0, 5.0, -4.0]], [[6.0, 0.0, 4.0], [-5.0, 2.0, 1.0], [-2.0, 3.0, -6.0], 
+[-6.0, -5.0, -3.0]]], [[[0.0, -5.0, 7.0], [1.0, 6.0, 5.0], [5.0, 2.0, -1.0], [-1.0, -3.0, 5.0]], [[-1.0, 4.0, -2.0], [3.0, 5.0, 
+-7.0], [2.0, 0.0, 3.0], [-2.0, 0.0, 0.0]]]])
+      arg1=Data(numpy.array([[[[-2.0, 3.0], [1.0, 2.0], [2.0, 3.0]], [[3.0, -7.0], [-2.0, 1.0], [0.0, -1.0]], [[-6.0, 7.0], 
+[0.0, -5.0], [0.0, 2.0]], [[-7.0, -2.0], [0.0, -1.0], [1.0, 0.0]]], [[[6.0, 5.0], [-2.0, -5.0], [-6.0, 5.0]], [[-2.0, 5.0], 
+[-2.0, 1.0], [-7.0, -5.0]], [[-5.0, -2.0], [-1.0, -3.0], [-7.0, -1.0]], [[1.0, -1.0], [7.0, -5.0], [2.0, 
+-1.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-45.0, 60.0], [15.0, -81.0]])+(1.-msk_ref)*numpy.array([[-35.0, 43.0], [-20.0, 48.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_array_rank0_offset0(self):
-      arg0=numpy.array(-3.0)
-      arg1=numpy.array(-7.0)
+   def test_generalTensorProduct_expandedData_rank1_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([4.0, 0.0])+(1.-msk_arg0)*numpy.array([0.0, -5.0])
+      arg1=Data(numpy.array([[6.0, 1.0, -6.0, 6.0, 0.0], [-2.0, -3.0, 1.0, 2.0, 0.0], [4.0, 1.0, 4.0, 7.0, -6.0], [6.0, 0.0, 
+5.0, -5.0, 0.0]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(21.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[24.0, 4.0, -24.0, 24.0, 0.0], [-8.0, -12.0, 4.0, 8.0, 0.0], [16.0, 4.0, 16.0, 28.0, -24.0], 
+[24.0, 0.0, 20.0, -20.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, -5.0, 30.0, -30.0, 0.0], [10.0, 15.0, -5.0, -10.0, 0.0], [-20.0, -5.0, -20.0, -35.0, 
+30.0], [-30.0, 0.0, -25.0, 25.0, 0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank1_offset1(self):
-      arg0=numpy.array([-4.0, 0.0, -6.0])
-      arg1=numpy.array([-4.0, 4.0, -5.0])
+   def test_generalTensorProduct_expandedData_rank2_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, 1.0, 7.0], [1.0, 0.0, 1.0]])+(1.-msk_arg0)*numpy.array([[3.0, 4.0, -5.0], [-1.0, 3.0, 
+6.0]])
+      arg1=Data(numpy.array([[[7.0, -3.0, 2.0, 4.0, 6.0], [-2.0, 5.0, -7.0, -6.0, 1.0], [3.0, -1.0, -5.0, -7.0, 6.0], [-3.0, 
+-1.0, -4.0, -6.0, 1.0]], [[-1.0, 1.0, -6.0, -5.0, -4.0], [5.0, -3.0, -2.0, -7.0, 0.0], [-7.0, 0.0, 4.0, 5.0, 6.0], [-5.0, 4.0, 
+4.0, -3.0, -6.0]], [[-6.0, 1.0, 6.0, 6.0, 0.0], [5.0, 7.0, -3.0, -3.0, 7.0], [-4.0, -2.0, 3.0, -3.0, -7.0], [3.0, 2.0, -1.0, 
+-4.0, -2.0]]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array(46.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-85.0, 26.0, 24.0, 13.0, -40.0], [52.0, 16.0, 19.0, 8.0, 43.0], [-53.0, -8.0, 55.0, 26.0, 
+-79.0], [34.0, 24.0, 21.0, 5.0, -26.0]], [[1.0, -2.0, 8.0, 10.0, 6.0], [3.0, 12.0, -10.0, -9.0, 8.0], [-1.0, -3.0, -2.0, -10.0, 
+-1.0], [0.0, 1.0, -5.0, -10.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[47.0, -10.0, -48.0, -38.0, 2.0], [-11.0, -32.0, -14.0, 
+-31.0, -32.0], [1.0, 7.0, -14.0, 14.0, 77.0], [-44.0, 3.0, 9.0, -10.0, -11.0]], [[-46.0, 12.0, 16.0, 17.0, -18.0], [47.0, 28.0, 
+-17.0, -33.0, 41.0], [-48.0, -11.0, 35.0, 4.0, -30.0], [6.0, 25.0, 10.0, -27.0, -31.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank2_offset2(self):
-      arg0=numpy.array([[-4.0, -6.0, 0.0], [5.0, 0.0, 0.0]])
-      arg1=numpy.array([[1.0, 1.0, 4.0], [5.0, -3.0, 2.0]])
+   def test_generalTensorProduct_expandedData_rank3_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -2.0, -7.0], [-5.0, -3.0, -4.0]], [[6.0, -4.0, -1.0], [-5.0, 2.0, 
+0.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, 4.0, 3.0], [-1.0, 5.0, -7.0]], [[-2.0, 1.0, -7.0], [2.0, 0.0, 0.0]]])
+      arg1=Data(numpy.array([[[[0.0, 4.0, -4.0, 0.0, -4.0], [6.0, -5.0, -3.0, 5.0, 0.0], [1.0, 0.0, -5.0, 3.0, 4.0], [-6.0, 
+6.0, -2.0, -2.0, -2.0]], [[2.0, 5.0, 5.0, -1.0, 0.0], [-5.0, -5.0, 4.0, -3.0, -1.0], [0.0, -5.0, 5.0, 0.0, -2.0], [0.0, 0.0, 
+7.0, 3.0, -1.0]], [[-5.0, 1.0, -6.0, -6.0, -3.0], [-1.0, 4.0, -5.0, -3.0, -4.0], [-1.0, 4.0, 6.0, 3.0, 3.0], [2.0, -1.0, 0.0, 
+7.0, 5.0]]], [[[4.0, 1.0, 1.0, -6.0, 0.0], [-5.0, 1.0, 1.0, 1.0, 6.0], [-7.0, 6.0, -1.0, 0.0, -7.0], [-6.0, 0.0, -2.0, 4.0, 
+0.0]], [[1.0, -2.0, 2.0, -4.0, -2.0], [5.0, -6.0, 7.0, -2.0, -7.0], [0.0, 6.0, 7.0, 4.0, 6.0], [6.0, 6.0, 4.0, -7.0, -7.0]], 
+[[6.0, 4.0, -2.0, -1.0, -1.0], [7.0, 4.0, 3.0, -2.0, 5.0], [0.0, 0.0, -4.0, -4.0, 4.0], [0.0, -5.0, -3.0, -4.0, 
+3.0]]]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array(15.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-16.0, -32.0, 29.0, 90.0, 31.0], [-1.0, -21.0, -11.0, 36.0, 1.0], [42.0, -66.0, -52.0, -17.0, 
+-16.0], [-2.0, 9.0, -4.0, -38.0, -24.0]], [[-21.0, -6.0, -39.0, 32.0, -25.0], [92.0, -31.0, -20.0, 36.0, -36.0], [42.0, -2.0, 
+-37.0, 23.0, 76.0], [4.0, 49.0, -22.0, -65.0, -27.0]]])+(1.-msk_ref)*numpy.array([[[-48.0, -24.0, 33.0, -29.0, -4.0], [-54.0, 
+-57.0, 20.0, -28.0, -92.0], [2.0, 16.0, 112.0, 51.0, 2.0], [54.0, 50.0, 75.0, 26.0, -41.0]], [[45.0, -8.0, 57.0, 29.0, 29.0], 
+[-20.0, -21.0, 47.0, 10.0, 39.0], [-9.0, -21.0, -29.0, -27.0, -45.0], [-14.0, -5.0, 7.0, -34.0, -32.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank3_offset3(self):
-      arg0=numpy.array([[[-4.0, 6.0, -7.0], [-1.0, 0.0, -3.0], [0.0, -7.0, 5.0], [4.0, -4.0, -3.0]], [[0.0, 6.0, 5.0], [-4.0, 
-0.0, -1.0], [0.0, 7.0, 6.0], [-2.0, -6.0, 6.0]]])
-      arg1=numpy.array([[[-1.0, -6.0, -6.0], [-7.0, 3.0, 0.0], [5.0, 0.0, 1.0], [-6.0, 3.0, -7.0]], [[4.0, 1.0, -3.0], [-3.0, 
-7.0, -1.0], [5.0, 5.0, -6.0], [6.0, -1.0, 1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array(10.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank1_constData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([0.0, 3.0])+(1.-msk_arg0)*numpy.array([6.0, -1.0])
+      arg1=Data(numpy.array([[[5.0, 2.0], [2.0, 5.0]], [[-7.0, -4.0], [-4.0, 4.0]], [[4.0, -1.0], [2.0, -5.0]], [[-5.0, -1.0], 
+[0.0, 2.0]], [[-5.0, 4.0], [-7.0, -2.0]], [[2.0, -2.0], [7.0, -4.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[15.0, 6.0], [6.0, 15.0]], [[-21.0, -12.0], [-12.0, 12.0]], 
+[[12.0, -3.0], [6.0, -15.0]], [[-15.0, -3.0], [0.0, 6.0]], [[-15.0, 12.0], [-21.0, -6.0]], [[6.0, -6.0], [21.0, 
+-12.0]]]])+(1.-msk_ref)*numpy.array([[[[30.0, 12.0], [12.0, 30.0]], [[-42.0, -24.0], [-24.0, 24.0]], [[24.0, -6.0], [12.0, 
+-30.0]], [[-30.0, -6.0], [0.0, 12.0]], [[-30.0, 24.0], [-42.0, -12.0]], [[12.0, -12.0], [42.0, -24.0]]], [[[-5.0, -2.0], [-2.0, 
+-5.0]], [[7.0, 4.0], [4.0, -4.0]], [[-4.0, 1.0], [-2.0, 5.0]], [[5.0, 1.0], [0.0, -2.0]], [[5.0, -4.0], [7.0, 2.0]], [[-2.0, 
+2.0], [-7.0, 4.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank4_offset4(self):
-      arg0=numpy.array([[[[0.0, 5.0], [-6.0, -7.0], [-5.0, 1.0]], [[1.0, 3.0], [-6.0, 1.0], [-3.0, -1.0]]], [[[-4.0, 0.0], 
-[5.0, 7.0], [-3.0, -2.0]], [[5.0, -3.0], [6.0, 0.0], [6.0, -2.0]]], [[[-4.0, -3.0], [3.0, -5.0], [4.0, 6.0]], [[-4.0, -3.0], 
-[5.0, 6.0], [3.0, 2.0]]], [[[-6.0, -2.0], [-2.0, 5.0], [-4.0, 5.0]], [[2.0, -6.0], [-3.0, -2.0], [-1.0, 3.0]]]])
-      arg1=numpy.array([[[[-5.0, -5.0], [-6.0, -1.0], [-4.0, -7.0]], [[-7.0, -4.0], [-2.0, -1.0], [-7.0, -2.0]]], [[[2.0, 1.0], 
-[3.0, -6.0], [-7.0, 2.0]], [[7.0, 3.0], [3.0, 7.0], [-3.0, 7.0]]], [[[-5.0, 6.0], [6.0, -5.0], [-2.0, 7.0]], [[5.0, 4.0], 
-[-3.0, -7.0], [-2.0, 4.0]]], [[[-1.0, 6.0], [0.0, 2.0], [1.0, 7.0]], [[-5.0, 1.0], [2.0, -2.0], [5.0, -5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      ref=numpy.array(29.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank2_constData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 6.0, -6.0], [-3.0, 5.0, 2.0]])+(1.-msk_arg0)*numpy.array([[5.0, 3.0, 6.0], [3.0, 6.0, 
+3.0]])
+      arg1=Data(numpy.array([[[[4.0, 6.0], [6.0, 1.0]], [[1.0, 2.0], [-4.0, 0.0]], [[6.0, -2.0], [-5.0, -5.0]], [[-4.0, 2.0], 
+[3.0, -1.0]], [[2.0, -1.0], [2.0, -1.0]], [[0.0, 0.0], [0.0, 4.0]]], [[[-3.0, 3.0], [-1.0, -5.0]], [[-3.0, 0.0], [-4.0, 2.0]], 
+[[3.0, -6.0], [1.0, -6.0]], [[7.0, 5.0], [2.0, -7.0]], [[6.0, -1.0], [-2.0, 4.0]], [[3.0, -7.0], [-5.0, -2.0]]], [[[-3.0, 
+-7.0], [2.0, -5.0]], [[3.0, 2.0], [-7.0, 4.0]], [[6.0, 1.0], [-6.0, 4.0]], [[-1.0, -5.0], [4.0, -3.0]], [[0.0, -7.0], [-1.0, 
+-6.0]], [[1.0, -5.0], [0.0, 4.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[16.0, 84.0], [6.0, 4.0]], [[-32.0, -4.0], [2.0, -12.0]], [[6.0, -50.0], [22.0, -80.0]], 
+[[32.0, 68.0], [0.0, -28.0]], [[44.0, 32.0], [2.0, 56.0]], [[12.0, -12.0], [-30.0, -20.0]]], [[[-33.0, -17.0], [-19.0, -38.0]], 
+[[-12.0, -2.0], [-22.0, 18.0]], [[9.0, -22.0], [8.0, -7.0]], [[45.0, 9.0], [9.0, -38.0]], [[24.0, -16.0], [-18.0, 11.0]], 
+[[17.0, -45.0], [-25.0, -14.0]]]])+(1.-msk_ref)*numpy.array([[[[-7.0, -3.0], [39.0, -40.0]], [[14.0, 22.0], [-74.0, 30.0]], 
+[[75.0, -22.0], [-58.0, -19.0]], [[-5.0, -5.0], [45.0, -44.0]], [[28.0, -50.0], [-2.0, -29.0]], [[15.0, -51.0], [-15.0, 
+38.0]]], [[[-15.0, 15.0], [18.0, -42.0]], [[-6.0, 12.0], [-57.0, 24.0]], [[54.0, -39.0], [-27.0, -39.0]], [[27.0, 21.0], [33.0, 
+-54.0]], [[42.0, -30.0], [-9.0, 3.0]], [[21.0, -57.0], [-30.0, 12.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_array_rank1_offset0(self):
-      arg0=numpy.array(-7.0)
-      arg1=numpy.array([0.0, -6.0])
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([4.0, 0.0])+(1.-msk_arg0)*numpy.array([1.0, 1.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-2.0)+(1-msk_arg1)*(0.0)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([-0.0, 42.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-8.0, -0.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank2_offset1(self):
-      arg0=numpy.array([-5.0, -6.0, -2.0])
-      arg1=numpy.array([[6.0, 6.0], [0.0, 7.0], [-1.0, -6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([-28.0, -60.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, 4.0, -5.0], [-3.0, -5.0, 6.0]])+(1.-msk_arg0)*numpy.array([[2.0, 5.0, -4.0], [3.0, 
+-3.0, 2.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-7.0, -3.0, 3.0])+(1.-msk_arg1)*numpy.array([-7.0, 1.0, -3.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([15.0, 54.0])+(1.-msk_ref)*numpy.array([3.0, -30.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank3_offset2(self):
-      arg0=numpy.array([[4.0, 2.0, 5.0], [-5.0, 6.0, -6.0]])
-      arg1=numpy.array([[[4.0, 3.0], [-2.0, -5.0], [-6.0, 6.0]], [[-7.0, 5.0], [-1.0, -6.0], [-6.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([47.0, -29.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-2.0, 1.0, -7.0], [5.0, -4.0, 4.0]], [[3.0, 7.0, 2.0], [-1.0, 5.0, 
+1.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, 5.0, -5.0], [5.0, -1.0, 0.0]], [[-4.0, 6.0, 1.0], [-2.0, 3.0, -1.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, 2.0, 1.0], [2.0, -4.0, 6.0]])+(1.-msk_arg1)*numpy.array([[7.0, -1.0, 3.0], [-6.0, -2.0, 
+4.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank4_offset3(self):
-      arg0=numpy.array([[[-5.0, -4.0, 7.0], [-6.0, -3.0, 1.0], [4.0, -7.0, 1.0], [7.0, 5.0, 2.0]], [[2.0, 0.0, 0.0], [5.0, 
--2.0, -4.0], [-4.0, 0.0, -5.0], [1.0, -2.0, 1.0]]])
-      arg1=numpy.array([[[[0.0, -2.0], [-1.0, 0.0], [3.0, -1.0]], [[-6.0, 5.0], [-4.0, -1.0], [-7.0, -4.0]], [[0.0, -2.0], 
-[-4.0, 3.0], [2.0, -6.0]], [[3.0, -5.0], [6.0, 0.0], [-5.0, 0.0]]], [[[5.0, 3.0], [0.0, -2.0], [-6.0, -5.0]], [[-5.0, 0.0], 
-[-1.0, 1.0], [-7.0, -3.0]], [[0.0, -4.0], [1.0, 2.0], [-6.0, -5.0]], [[-1.0, 3.0], [6.0, 0.0], [6.0, -3.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([175.0, -41.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([43.0, 3.0])+(1.-msk_ref)*numpy.array([-55.0, -29.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_array_rank2_offset0(self):
-      arg0=numpy.array(1.0)
-      arg1=numpy.array([[0.0, -7.0, 0.0, -2.0, -2.0], [7.0, 1.0, 2.0, -4.0, 3.0], [-7.0, 4.0, 4.0, 5.0, -6.0], [-3.0, 7.0, 4.0, 
-3.0, -4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[0.0, -7.0, 0.0, -2.0, -2.0], [7.0, 1.0, 2.0, -4.0, 3.0], [-7.0, 4.0, 4.0, 5.0, -6.0], [-3.0, 7.0, 4.0, 
-3.0, -4.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank3_offset1(self):
-      arg0=numpy.array([0.0, 2.0, 4.0])
-      arg1=numpy.array([[[7.0, -5.0, -6.0, 6.0, 0.0], [3.0, 3.0, -6.0, 4.0, 1.0], [-7.0, 3.0, 7.0, 3.0, 5.0], [5.0, -2.0, 6.0, 
--1.0, 4.0]], [[-7.0, 0.0, 5.0, 7.0, 5.0], [0.0, 0.0, 5.0, -7.0, 2.0], [1.0, -4.0, 5.0, 5.0, 3.0], [-2.0, 0.0, 7.0, -7.0, 0.0]], 
-[[-2.0, 2.0, 2.0, 4.0, 3.0], [-3.0, 4.0, 0.0, 3.0, -7.0], [5.0, -4.0, -6.0, -6.0, -2.0], [-6.0, 1.0, -1.0, -1.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[-22.0, 8.0, 18.0, 30.0, 22.0], [-12.0, 16.0, 10.0, -2.0, -24.0], [22.0, -24.0, -14.0, -14.0, -2.0], 
-[-28.0, 4.0, 10.0, -18.0, 0.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank4_offset2(self):
-      arg0=numpy.array([[2.0, -6.0, -3.0], [-5.0, -5.0, -7.0]])
-      arg1=numpy.array([[[[-5.0, -2.0, 2.0, -2.0, 6.0], [1.0, -6.0, -7.0, -1.0, -5.0], [5.0, 0.0, 2.0, 5.0, 2.0], [-1.0, -5.0, 
-7.0, 0.0, 3.0]], [[7.0, 4.0, 6.0, -6.0, 0.0], [5.0, -5.0, 3.0, 4.0, -2.0], [7.0, -4.0, 4.0, 5.0, 7.0], [-7.0, 0.0, 7.0, 0.0, 
-4.0]], [[5.0, 6.0, 6.0, 4.0, 6.0], [5.0, -4.0, 0.0, -6.0, 2.0], [-5.0, -1.0, -2.0, -1.0, 1.0], [0.0, 6.0, -3.0, -1.0, 5.0]]], 
-[[[3.0, -2.0, 6.0, -4.0, -4.0], [3.0, -2.0, 4.0, -6.0, -1.0], [-5.0, -6.0, 0.0, -6.0, -2.0], [-5.0, -4.0, 7.0, -6.0, -2.0]], 
-[[-7.0, 1.0, 7.0, 4.0, 3.0], [1.0, -1.0, -5.0, 5.0, -7.0], [-2.0, 6.0, 0.0, -6.0, 6.0], [0.0, -2.0, -4.0, 3.0, 2.0]], [[-4.0, 
-7.0, 6.0, -6.0, 1.0], [0.0, 3.0, -3.0, 3.0, -4.0], [-2.0, 0.0, -3.0, -5.0, -7.0], [6.0, -7.0, 0.0, 7.0, -1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[-19.0, -90.0, -157.0, 62.0, -8.0], [-63.0, 24.0, -6.0, -24.0, 64.0], [32.0, 27.0, 7.0, 78.0, -12.0], 
-[23.0, 51.0, -34.0, -31.0, -26.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_array_rank3_offset0(self):
-      arg0=numpy.array(6.0)
-      arg1=numpy.array([[[-2.0, 6.0], [-7.0, 5.0]], [[5.0, -4.0], [-5.0, 1.0]], [[-5.0, 4.0], [1.0, -1.0]], [[4.0, -1.0], 
-[-4.0, 4.0]], [[2.0, 1.0], [6.0, -2.0]], [[3.0, 6.0], [3.0, -6.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-12.0, 36.0], [-42.0, 30.0]], [[30.0, -24.0], [-30.0, 6.0]], [[-30.0, 24.0], [6.0, -6.0]], [[24.0, 
--6.0], [-24.0, 24.0]], [[12.0, 6.0], [36.0, -12.0]], [[18.0, 36.0], [18.0, -36.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank4_offset1(self):
-      arg0=numpy.array([-3.0, 5.0, 0.0])
-      arg1=numpy.array([[[[-7.0, 0.0], [-7.0, 2.0]], [[7.0, 4.0], [0.0, 6.0]], [[-7.0, 6.0], [-6.0, -4.0]], [[-4.0, 3.0], 
-[-2.0, -1.0]], [[7.0, 0.0], [-4.0, 1.0]], [[6.0, -5.0], [-1.0, 4.0]]], [[[-6.0, 6.0], [-2.0, -2.0]], [[-1.0, 0.0], [5.0, 6.0]], 
-[[2.0, 0.0], [-6.0, 0.0]], [[-5.0, 7.0], [0.0, 0.0]], [[3.0, 2.0], [3.0, 1.0]], [[6.0, 4.0], [-1.0, 0.0]]], [[[-6.0, 5.0], 
-[2.0, 4.0]], [[-7.0, 7.0], [6.0, -7.0]], [[-7.0, -4.0], [-5.0, 3.0]], [[1.0, 2.0], [3.0, 0.0]], [[0.0, 6.0], [-7.0, 3.0]], 
-[[-3.0, 6.0], [-5.0, 2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-9.0, 30.0], [11.0, -16.0]], [[-26.0, -12.0], [25.0, 12.0]], [[31.0, -18.0], [-12.0, 12.0]], [[-13.0, 
-26.0], [6.0, 3.0]], [[-6.0, 10.0], [27.0, 2.0]], [[12.0, 35.0], [-2.0, -12.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_array_rank4_offset0(self):
-      arg0=numpy.array(6.0)
-      arg1=numpy.array([[[[-3.0, 5.0, 5.0, 0.0], [-3.0, -2.0, 4.0, 4.0], [-1.0, 1.0, 6.0, 3.0]], [[-6.0, -5.0, -5.0, -3.0], 
-[5.0, 3.0, -2.0, 7.0], [0.0, 6.0, -5.0, -1.0]]], [[[2.0, -4.0, 7.0, 7.0], [3.0, -5.0, -7.0, -7.0], [0.0, 5.0, -1.0, 6.0]], 
-[[4.0, 4.0, -3.0, 0.0], [0.0, -4.0, -4.0, -4.0], [-3.0, -4.0, 5.0, 1.0]]], [[[2.0, -3.0, -7.0, -5.0], [-7.0, 3.0, 5.0, 3.0], 
-[-3.0, -2.0, 1.0, 7.0]], [[1.0, 2.0, -1.0, 0.0], [0.0, 5.0, 4.0, 3.0], [6.0, -3.0, -5.0, 4.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-18.0, 30.0, 30.0, 0.0], [-18.0, -12.0, 24.0, 24.0], [-6.0, 6.0, 36.0, 18.0]], [[-36.0, -30.0, -30.0, 
--18.0], [30.0, 18.0, -12.0, 42.0], [0.0, 36.0, -30.0, -6.0]]], [[[12.0, -24.0, 42.0, 42.0], [18.0, -30.0, -42.0, -42.0], [0.0, 
-30.0, -6.0, 36.0]], [[24.0, 24.0, -18.0, 0.0], [0.0, -24.0, -24.0, -24.0], [-18.0, -24.0, 30.0, 6.0]]], [[[12.0, -18.0, -42.0, 
--30.0], [-42.0, 18.0, 30.0, 18.0], [-18.0, -12.0, 6.0, 42.0]], [[6.0, 12.0, -6.0, 0.0], [0.0, 30.0, 24.0, 18.0], [36.0, -18.0, 
--30.0, 24.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, 6.0, -7.0], [7.0, 2.0, -7.0], [0.0, 1.0, 1.0], [-5.0, -3.0, 5.0]], [[0.0, 3.0, -7.0], 
+[-2.0, -3.0, 4.0], [6.0, -6.0, 0.0], [-6.0, 4.0, 6.0]]], [[[0.0, -4.0, 4.0], [7.0, 0.0, 0.0], [7.0, 4.0, 3.0], [-5.0, -4.0, 
+3.0]], [[-5.0, -3.0, -2.0], [6.0, 0.0, -6.0], [7.0, 3.0, -2.0], [6.0, 0.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, 4.0, 
+3.0], [-3.0, 4.0, -1.0], [5.0, -2.0, -7.0], [6.0, -7.0, 0.0]], [[0.0, 6.0, -6.0], [-6.0, -1.0, 0.0], [-4.0, -4.0, 2.0], [3.0, 
+-2.0, 6.0]]], [[[-7.0, -5.0, 5.0], [-6.0, -2.0, 5.0], [-3.0, -3.0, 6.0], [3.0, -7.0, -3.0]], [[-2.0, 6.0, -5.0], [-7.0, -3.0, 
+6.0], [-7.0, 7.0, 7.0], [1.0, -3.0, 0.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-4.0, 0.0, 6.0], [2.0, 3.0, -6.0], [-6.0, 5.0, 7.0], [5.0, -5.0, -5.0]], [[0.0, 6.0, -3.0], 
+[4.0, -5.0, 1.0], [-5.0, -6.0, -6.0], [5.0, 4.0, 1.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 3.0, 0.0], [-2.0, 1.0, 0.0], [-6.0, 
+0.0, 0.0], [7.0, 3.0, -2.0]], [[1.0, -4.0, -4.0], [6.0, 5.0, 5.0], [0.0, -4.0, 0.0], [7.0, -5.0, 4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([17.0, 12.0])+(1.-msk_ref)*numpy.array([61.0, -41.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_constData_rank0_offset0(self):
-      arg0=numpy.array(3.0)
-      arg1=Data(-6.0,self.functionspace)
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([7.0, -3.0])+(1.-msk_arg0)*numpy.array([1.0, 7.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([6.0, -4.0])+(1.-msk_arg1)*numpy.array([1.0, 0.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-18.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[42.0, -28.0], [-18.0, 12.0]])+(1.-msk_ref)*numpy.array([[1.0, 0.0], [7.0, 0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank1_offset1(self):
-      arg0=numpy.array([-4.0, -7.0, -5.0])
-      arg1=Data(numpy.array([-1.0, -3.0, 4.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-1.0, 0.0, -5.0], [6.0, -2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0, -5.0], [3.0, -2.0, 
+4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-2.0, -1.0], [4.0, 7.0], [2.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -4.0], [2.0, 5.0], 
+[0.0, 0.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(5.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-8.0, 31.0], [-6.0, -62.0]])+(1.-msk_ref)*numpy.array([[12.0, 30.0], [-13.0, -22.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank2_offset2(self):
-      arg0=numpy.array([[2.0, 5.0, 3.0], [-3.0, -2.0, 0.0]])
-      arg1=Data(numpy.array([[3.0, 5.0, -1.0], [3.0, 7.0, 3.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[6.0, -1.0, 7.0], [2.0, 1.0, 3.0]], [[0.0, 0.0, -1.0], [2.0, 0.0, 
+5.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 3.0, 4.0], [-4.0, 4.0, 0.0]], [[-3.0, 3.0, 4.0], [-1.0, -3.0, 0.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-6.0, -3.0], [2.0, 0.0], [7.0, -3.0]], [[6.0, 1.0], [-1.0, -6.0], [-5.0, 
+1.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, -4.0], [-3.0, 1.0], [4.0, 5.0]], [[-4.0, -5.0], [7.0, -5.0], [0.0, -6.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(5.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[7.0, -40.0], [-20.0, 10.0]])+(1.-msk_ref)*numpy.array([[51.0, 51.0], [-10.0, 55.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank3_offset3(self):
-      arg0=numpy.array([[[5.0, -7.0, 6.0], [4.0, -4.0, -2.0], [-2.0, 3.0, -7.0], [1.0, -7.0, 7.0]], [[6.0, -2.0, -6.0], [6.0, 
--4.0, -1.0], [5.0, 2.0, -6.0], [1.0, -2.0, 2.0]]])
-      arg1=Data(numpy.array([[[5.0, -6.0, 4.0], [-4.0, -4.0, -7.0], [-3.0, -6.0, -6.0], [0.0, 4.0, 6.0]], [[-1.0, 1.0, 1.0], 
-[3.0, 2.0, -7.0], [-1.0, -6.0, -2.0], [-4.0, -2.0, 1.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, -5.0, -5.0], [-1.0, 2.0, 1.0], [4.0, -6.0, 1.0], [-5.0, 0.0, -2.0]], [[-1.0, 6.0, 
+-1.0], [-4.0, 0.0, -3.0], [2.0, 4.0, 6.0], [-3.0, 4.0, -1.0]]], [[[0.0, 1.0, 6.0], [-1.0, -3.0, 2.0], [6.0, 4.0, 5.0], [1.0, 
+6.0, 0.0]], [[0.0, 2.0, 0.0], [-4.0, 0.0, 1.0], [7.0, -6.0, -6.0], [1.0, 7.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 
+2.0, 7.0], [-5.0, 0.0, -4.0], [4.0, -1.0, 1.0], [3.0, -5.0, 3.0]], [[-7.0, 0.0, -3.0], [-4.0, -5.0, -6.0], [0.0, -4.0, 1.0], 
+[-3.0, -5.0, -1.0]]], [[[-4.0, -2.0, 6.0], [2.0, -5.0, 0.0], [4.0, -5.0, 4.0], [5.0, -1.0, 0.0]], [[-6.0, 0.0, -2.0], [-7.0, 
+3.0, -4.0], [-1.0, -1.0, -6.0], [4.0, 2.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-3.0, -3.0], [-5.0, 6.0], [-2.0, -1.0]], [[-3.0, 1.0], [-5.0, -5.0], [-1.0, 5.0]], [[-5.0, 
+6.0], [3.0, -3.0], [-6.0, -7.0]], [[6.0, 2.0], [-4.0, -6.0], [3.0, -7.0]]], [[[-5.0, 0.0], [0.0, -5.0], [-2.0, -3.0]], [[0.0, 
+5.0], [1.0, -5.0], [7.0, -4.0]], [[2.0, 0.0], [2.0, -1.0], [-7.0, -5.0]], [[-3.0, -7.0], [-1.0, 5.0], [2.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -5.0], [7.0, 7.0], [5.0, 7.0]], [[-6.0, 0.0], [6.0, 4.0], [-5.0, -4.0]], [[-1.0, 
+-1.0], [0.0, -7.0], [0.0, 6.0]], [[2.0, 0.0], [2.0, 0.0], [-5.0, -6.0]]], [[[-2.0, 3.0], [-2.0, -1.0], [-2.0, 0.0]], [[0.0, 
+-1.0], [2.0, 4.0], [-3.0, -6.0]], [[-1.0, -1.0], [-5.0, 1.0], [2.0, -7.0]], [[4.0, 2.0], [3.0, 0.0], [-1.0, 1.0]]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(149.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank4_offset4(self):
-      arg0=numpy.array([[[[-7.0, 6.0], [4.0, -1.0], [-6.0, 3.0]], [[1.0, -7.0], [-1.0, 3.0], [-7.0, -1.0]]], [[[4.0, -6.0], 
-[4.0, 6.0], [6.0, 1.0]], [[3.0, -4.0], [-3.0, 6.0], [0.0, -7.0]]], [[[0.0, 7.0], [1.0, -4.0], [-6.0, -6.0]], [[-6.0, -1.0], 
-[6.0, 0.0], [-7.0, -6.0]]], [[[-7.0, -3.0], [-5.0, 0.0], [0.0, 3.0]], [[3.0, 0.0], [0.0, -1.0], [0.0, -4.0]]]])
-      arg1=Data(numpy.array([[[[-4.0, 4.0], [-3.0, 3.0], [5.0, 1.0]], [[-3.0, 0.0], [0.0, 5.0], [-7.0, -7.0]]], [[[5.0, -6.0], 
-[-6.0, 1.0], [-3.0, -7.0]], [[-6.0, 3.0], [5.0, -4.0], [-4.0, -3.0]]], [[[4.0, 5.0], [7.0, -5.0], [7.0, 5.0]], [[0.0, -2.0], 
-[-1.0, 4.0], [-2.0, -5.0]]], [[[2.0, 3.0], [6.0, 0.0], [-7.0, 2.0]], [[0.0, -4.0], [5.0, 1.0], [-6.0, 
-7.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      ref=Data(-3.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-115.0, -35.0], [-36.0, 39.0]])+(1.-msk_ref)*numpy.array([[76.0, 81.0], [7.0, 163.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=4)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_constData_rank1_offset0(self):
-      arg0=numpy.array(-5.0)
-      arg1=Data(numpy.array([-2.0, 2.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-7.0, -4.0])+(1.-msk_arg0)*numpy.array([1.0, 6.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-3.0, 6.0, -1.0, -7.0, 0.0], [6.0, -2.0, 0.0, 5.0, 5.0], [-3.0, 4.0, -6.0, -7.0, 0.0], [-4.0, 
+-3.0, 5.0, -2.0, 3.0]])+(1.-msk_arg1)*numpy.array([[1.0, 2.0, -5.0, -7.0, -3.0], [0.0, -3.0, 1.0, 3.0, -1.0], [-5.0, 7.0, -1.0, 
+7.0, -5.0], [6.0, 5.0, 6.0, -1.0, 0.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([10.0, -10.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[21.0, -42.0, 7.0, 49.0, 0.0], [-42.0, 14.0, 0.0, -35.0, -35.0], [21.0, -28.0, 42.0, 49.0, 
+0.0], [28.0, 21.0, -35.0, 14.0, -21.0]], [[12.0, -24.0, 4.0, 28.0, 0.0], [-24.0, 8.0, 0.0, -20.0, -20.0], [12.0, -16.0, 24.0, 
+28.0, 0.0], [16.0, 12.0, -20.0, 8.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 2.0, -5.0, -7.0, -3.0], [0.0, -3.0, 1.0, 3.0, 
+-1.0], [-5.0, 7.0, -1.0, 7.0, -5.0], [6.0, 5.0, 6.0, -1.0, 0.0]], [[6.0, 12.0, -30.0, -42.0, -18.0], [0.0, -18.0, 6.0, 18.0, 
+-6.0], [-30.0, 42.0, -6.0, 42.0, -30.0], [36.0, 30.0, 36.0, -6.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank2_offset1(self):
-      arg0=numpy.array([4.0, 3.0, 1.0])
-      arg1=Data(numpy.array([[-1.0, 0.0], [-2.0, 1.0], [0.0, 1.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-4.0, 1.0, -4.0], [-1.0, 5.0, -4.0]])+(1.-msk_arg0)*numpy.array([[5.0, -4.0, 3.0], [-4.0, 
+-3.0, -5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, 3.0, 0.0, -4.0, -3.0], [7.0, -4.0, 0.0, 0.0, -5.0], [-7.0, 7.0, 1.0, 7.0, 5.0], [-6.0, 
+5.0, 1.0, -6.0, 0.0]], [[1.0, -7.0, 3.0, -4.0, -7.0], [-4.0, -5.0, 4.0, 1.0, 2.0], [6.0, -1.0, -4.0, -1.0, 2.0], [1.0, -3.0, 
+5.0, -7.0, 2.0]], [[3.0, -7.0, 0.0, -4.0, -1.0], [-4.0, -6.0, 7.0, 2.0, -7.0], [-3.0, 5.0, -7.0, 7.0, 0.0], [0.0, 3.0, -2.0, 
+-2.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, -1.0, 2.0, 4.0, 4.0], [0.0, 2.0, 2.0, 6.0, -2.0], [-3.0, 6.0, 3.0, -3.0, 
+-6.0], [7.0, -2.0, -4.0, 4.0, 1.0]], [[0.0, -7.0, 4.0, 2.0, -5.0], [7.0, -5.0, -5.0, -1.0, -4.0], [-1.0, 7.0, -1.0, 6.0, 7.0], 
+[-7.0, 5.0, -2.0, -2.0, 6.0]], [[-3.0, 7.0, 4.0, 1.0, -1.0], [6.0, -6.0, -7.0, 0.0, -4.0], [5.0, 3.0, -3.0, -2.0, 5.0], [1.0, 
+7.0, -7.0, -6.0, 0.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-10.0, 4.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-11.0, 9.0, 3.0, 28.0, 9.0], [-16.0, 35.0, -24.0, -7.0, 50.0], [46.0, -49.0, 20.0, -57.0, 
+-18.0], [25.0, -35.0, 9.0, 25.0, -22.0]], [[-7.0, -10.0, 15.0, 0.0, -28.0], [-11.0, 3.0, -8.0, -3.0, 43.0], [49.0, -32.0, 7.0, 
+-40.0, 5.0], [11.0, -32.0, 32.0, -21.0, -14.0]]])+(1.-msk_ref)*numpy.array([[[-19.0, 44.0, 6.0, 15.0, 37.0], [-10.0, 12.0, 9.0, 
+34.0, -6.0], [4.0, 11.0, 10.0, -45.0, -43.0], [66.0, -9.0, -33.0, 10.0, -19.0]], [[23.0, -10.0, -40.0, -27.0, 4.0], [-51.0, 
+37.0, 42.0, -21.0, 40.0], [-10.0, -60.0, 6.0, 4.0, -22.0], [-12.0, -42.0, 57.0, 20.0, -22.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank3_offset2(self):
-      arg0=numpy.array([[-3.0, 1.0, 3.0], [-3.0, 4.0, 7.0]])
-      arg1=Data(numpy.array([[[1.0, 7.0], [-6.0, -3.0], [2.0, 2.0]], [[-4.0, -2.0], [0.0, 0.0], [-6.0, 
-5.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-3.0, 4.0, -3.0], [-6.0, 3.0, -1.0]], [[0.0, -3.0, -5.0], [-1.0, -6.0, 
+-3.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, 1.0, 6.0], [-6.0, -6.0, -1.0]], [[-2.0, 6.0, -7.0], [-3.0, -6.0, -2.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[7.0, -6.0, -5.0, -7.0, 5.0], [2.0, -6.0, 4.0, -5.0, 5.0], [-1.0, -5.0, -5.0, 5.0, -1.0], 
+[0.0, 4.0, -2.0, -3.0, -4.0]], [[-1.0, -2.0, -7.0, -1.0, -3.0], [6.0, -5.0, 0.0, -3.0, 3.0], [-4.0, 0.0, 3.0, 0.0, 5.0], [-7.0, 
+-1.0, -6.0, 5.0, -2.0]], [[-2.0, 3.0, 0.0, -6.0, 4.0], [-3.0, -5.0, 0.0, 5.0, -4.0], [0.0, 5.0, 4.0, -7.0, 5.0], [7.0, -6.0, 
+0.0, -7.0, -4.0]]], [[[3.0, 7.0, 0.0, 1.0, 6.0], [2.0, 6.0, -4.0, 2.0, -5.0], [6.0, -4.0, 0.0, -2.0, 1.0], [-3.0, 2.0, -7.0, 
+-3.0, 6.0]], [[6.0, 1.0, -6.0, 7.0, -5.0], [2.0, -5.0, 0.0, 3.0, 4.0], [2.0, 1.0, -5.0, 0.0, 5.0], [4.0, 0.0, -3.0, 2.0, 2.0]], 
+[[5.0, -4.0, -3.0, 7.0, 4.0], [-4.0, -6.0, 4.0, 3.0, 4.0], [6.0, 5.0, 5.0, 3.0, -5.0], [0.0, 3.0, 6.0, 6.0, 
+-1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -5.0, 7.0, 7.0, -4.0], [0.0, -3.0, 0.0, -2.0, 1.0], [-5.0, -5.0, -7.0, 2.0, 1.0], 
+[3.0, 0.0, -5.0, -1.0, -2.0]], [[-4.0, 5.0, -4.0, 1.0, 3.0], [6.0, 5.0, -6.0, -2.0, -3.0], [5.0, 0.0, -7.0, 3.0, 0.0], [0.0, 
+-6.0, -5.0, 4.0, 0.0]], [[-2.0, -7.0, 6.0, -5.0, -2.0], [-3.0, 2.0, 5.0, 2.0, -5.0], [2.0, -3.0, 1.0, 1.0, 3.0], [-3.0, 5.0, 
+-5.0, -5.0, -2.0]]], [[[1.0, 4.0, -6.0, 0.0, -7.0], [-7.0, 5.0, -7.0, 1.0, 2.0], [0.0, 0.0, 5.0, -3.0, -1.0], [5.0, 4.0, 0.0, 
+-4.0, 0.0]], [[3.0, 0.0, 6.0, 5.0, 4.0], [-1.0, 7.0, 0.0, 2.0, -7.0], [5.0, -2.0, 6.0, 5.0, -4.0], [6.0, -1.0, -2.0, 4.0, 
+2.0]], [[-7.0, 0.0, -3.0, -1.0, -5.0], [2.0, 0.0, -5.0, -7.0, -4.0], [7.0, 7.0, -6.0, -6.0, 7.0], [1.0, 3.0, -4.0, 0.0, 2.0]]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-33.0, 23.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-24.0, -34.0, -28.0, 43.0, -94.0], [25.0, -32.0, 8.0, -18.0, 47.0], [-49.0, 22.0, -5.0, 15.0, 
+22.0], [-19.0, -13.0, 9.0, 68.0, -13.0]], [[-41.0, -10.0, 66.0, -31.0, 1.0], [-5.0, 82.0, -8.0, -45.0, -20.0], [-24.0, -42.0, 
+-14.0, 28.0, -56.0], [-35.0, 22.0, 25.0, -7.0, 11.0]]])+(1.-msk_ref)*numpy.array([[[-25.0, -51.0, 21.0, -72.0, 22.0], [34.0, 
+-49.0, 71.0, 3.0, -1.0], [-10.0, -3.0, -47.0, -1.0, 39.0], [-91.0, 3.0, -9.0, -24.0, -22.0]], [[-9.0, 77.0, -92.0, -1.0, 47.0], 
+[80.0, -35.0, -40.0, -23.0, 59.0], [-18.0, 29.0, -74.0, -2.0, -10.0], [-38.0, -83.0, 35.0, 49.0, 2.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank4_offset3(self):
-      arg0=numpy.array([[[6.0, 5.0, 1.0], [-2.0, 5.0, 1.0], [0.0, -4.0, -6.0], [-6.0, 2.0, -1.0]], [[-7.0, -5.0, 0.0], [6.0, 
-6.0, -5.0], [-7.0, -2.0, 7.0], [-2.0, 7.0, 1.0]]])
-      arg1=Data(numpy.array([[[[7.0, 5.0], [-2.0, 6.0], [6.0, -3.0]], [[0.0, 1.0], [-1.0, 0.0], [-2.0, -4.0]], [[-4.0, -4.0], 
-[-5.0, -2.0], [-7.0, 0.0]], [[1.0, -7.0], [1.0, -6.0], [7.0, -3.0]]], [[[-3.0, -1.0], [-5.0, -1.0], [-5.0, -1.0]], [[-2.0, 
-0.0], [-7.0, 0.0], [5.0, -5.0]], [[-2.0, -7.0], [2.0, -6.0], [7.0, -4.0]], [[-1.0, -5.0], [3.0, -1.0], [-6.0, 
-7.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([125.0, 172.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_constData_rank2_offset0(self):
-      arg0=numpy.array(3.0)
-      arg1=Data(numpy.array([[6.0, -3.0, -5.0, -3.0, 0.0], [1.0, 6.0, 6.0, 3.0, 0.0], [-6.0, 3.0, 7.0, -5.0, 1.0], [6.0, -1.0, 
-2.0, 0.0, -2.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank1_expandedData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([6.0, -2.0])+(1.-msk_arg0)*numpy.array([-3.0, 0.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[4.0, 4.0], [3.0, 6.0]], [[-1.0, 3.0], [6.0, -7.0]], [[-7.0, 5.0], [-5.0, -6.0]], [[-6.0, 
+4.0], [5.0, 2.0]], [[-7.0, 0.0], [-2.0, -5.0]], [[-2.0, 5.0], [0.0, 3.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -6.0], [-7.0, 
+2.0]], [[3.0, 6.0], [2.0, 0.0]], [[-4.0, 4.0], [6.0, 1.0]], [[-3.0, -4.0], [-4.0, -4.0]], [[6.0, 7.0], [0.0, -4.0]], [[7.0, 
+0.0], [-1.0, -1.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[18.0, -9.0, -15.0, -9.0, 0.0], [3.0, 18.0, 18.0, 9.0, 0.0], [-18.0, 9.0, 21.0, -15.0, 3.0], [18.0, 
--3.0, 6.0, 0.0, -6.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[24.0, 24.0], [18.0, 36.0]], [[-6.0, 18.0], [36.0, -42.0]], [[-42.0, 30.0], [-30.0, -36.0]], 
+[[-36.0, 24.0], [30.0, 12.0]], [[-42.0, 0.0], [-12.0, -30.0]], [[-12.0, 30.0], [0.0, 18.0]]], [[[-8.0, -8.0], [-6.0, -12.0]], 
+[[2.0, -6.0], [-12.0, 14.0]], [[14.0, -10.0], [10.0, 12.0]], [[12.0, -8.0], [-10.0, -4.0]], [[14.0, 0.0], [4.0, 10.0]], [[4.0, 
+-10.0], [0.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[21.0, 18.0], [21.0, -6.0]], [[-9.0, -18.0], [-6.0, 0.0]], [[12.0, -12.0], 
+[-18.0, -3.0]], [[9.0, 12.0], [12.0, 12.0]], [[-18.0, -21.0], [0.0, 12.0]], [[-21.0, 0.0], [3.0, 3.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank3_offset1(self):
-      arg0=numpy.array([-6.0, 0.0, -1.0])
-      arg1=Data(numpy.array([[[-7.0, 6.0, -2.0, -4.0, -7.0], [1.0, 1.0, -1.0, -7.0, 7.0], [5.0, -4.0, -4.0, 0.0, -3.0], [5.0, 
--2.0, -4.0, 0.0, -2.0]], [[2.0, -7.0, 0.0, 3.0, -1.0], [1.0, -7.0, -4.0, 6.0, -2.0], [-4.0, 7.0, 5.0, 1.0, 0.0], [7.0, -1.0, 
--5.0, 7.0, 6.0]], [[-3.0, -5.0, 4.0, -1.0, 6.0], [5.0, -3.0, -7.0, -1.0, -4.0], [7.0, 2.0, 7.0, 3.0, -5.0], [5.0, -6.0, 6.0, 
-5.0, -3.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 2.0, 0.0], [-5.0, -1.0, 4.0]])+(1.-msk_arg0)*numpy.array([[1.0, 0.0, -1.0], [-6.0, -3.0, 
+0.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-6.0, -7.0], [-1.0, 7.0]], [[0.0, 0.0], [4.0, -4.0]], [[-4.0, -6.0], [-5.0, 4.0]], [[-1.0, 
+-6.0], [-3.0, 1.0]], [[0.0, -3.0], [-4.0, 0.0]], [[-5.0, 6.0], [6.0, -4.0]]], [[[-7.0, 5.0], [0.0, 5.0]], [[3.0, -1.0], [7.0, 
+-3.0]], [[-6.0, 5.0], [5.0, 0.0]], [[-4.0, 1.0], [-2.0, 5.0]], [[-5.0, 2.0], [-5.0, -3.0]], [[3.0, 7.0], [-3.0, -2.0]]], 
+[[[6.0, -3.0], [6.0, -6.0]], [[-1.0, 4.0], [4.0, -2.0]], [[4.0, 5.0], [-2.0, -3.0]], [[0.0, -3.0], [3.0, 3.0]], [[-6.0, -2.0], 
+[-4.0, -3.0]], [[5.0, 0.0], [2.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 7.0], [-2.0, -2.0]], [[-2.0, 4.0], [0.0, 
+-5.0]], [[5.0, 5.0], [5.0, -7.0]], [[-3.0, 0.0], [0.0, 0.0]], [[-3.0, -4.0], [-6.0, -5.0]], [[0.0, -5.0], [0.0, 7.0]]], [[[6.0, 
+-7.0], [4.0, -5.0]], [[0.0, 1.0], [-2.0, 0.0]], [[-3.0, -2.0], [-1.0, -1.0]], [[-4.0, 1.0], [0.0, -4.0]], [[-7.0, -2.0], [-7.0, 
+1.0]], [[-2.0, 6.0], [-3.0, -4.0]]], [[[6.0, 0.0], [0.0, 2.0]], [[3.0, 6.0], [-2.0, -7.0]], [[-3.0, 1.0], [-3.0, 2.0]], [[0.0, 
+4.0], [-4.0, -5.0]], [[0.0, 4.0], [3.0, 7.0]], [[2.0, 4.0], [0.0, 6.0]]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[45.0, -31.0, 8.0, 25.0, 36.0], [-11.0, -3.0, 13.0, 43.0, -38.0], [-37.0, 22.0, 17.0, -3.0, 23.0], 
-[-35.0, 18.0, 18.0, -5.0, 15.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-14.0, 10.0], [0.0, 10.0]], [[6.0, -2.0], [14.0, -6.0]], [[-12.0, 10.0], [10.0, 0.0]], 
+[[-8.0, 2.0], [-4.0, 10.0]], [[-10.0, 4.0], [-10.0, -6.0]], [[6.0, 14.0], [-6.0, -4.0]]], [[[61.0, 18.0], [29.0, -64.0]], 
+[[-7.0, 17.0], [-11.0, 15.0]], [[42.0, 45.0], [12.0, -32.0]], [[9.0, 17.0], [29.0, 2.0]], [[-19.0, 5.0], [9.0, -9.0]], [[42.0, 
+-37.0], [-19.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[-11.0, 7.0], [-2.0, -4.0]], [[-5.0, -2.0], [2.0, 2.0]], [[8.0, 4.0], 
+[8.0, -9.0]], [[-3.0, -4.0], [4.0, 5.0]], [[-3.0, -8.0], [-9.0, -12.0]], [[-2.0, -9.0], [0.0, 1.0]]], [[[12.0, -21.0], [0.0, 
+27.0]], [[12.0, -27.0], [6.0, 30.0]], [[-21.0, -24.0], [-27.0, 45.0]], [[30.0, -3.0], [0.0, 12.0]], [[39.0, 30.0], [57.0, 
+27.0]], [[6.0, 12.0], [9.0, -30.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank4_offset2(self):
-      arg0=numpy.array([[-2.0, 0.0, 0.0], [6.0, 3.0, 0.0]])
-      arg1=Data(numpy.array([[[[1.0, -5.0, -1.0, -5.0, -4.0], [0.0, -4.0, -2.0, 7.0, 2.0], [4.0, 5.0, 0.0, 2.0, -4.0], [1.0, 
--2.0, 1.0, -5.0, 0.0]], [[-1.0, -1.0, 4.0, 6.0, -1.0], [-7.0, 4.0, 2.0, -4.0, 1.0], [-3.0, 1.0, -3.0, -1.0, -6.0], [1.0, -4.0, 
-4.0, 0.0, 0.0]], [[0.0, 1.0, 1.0, -7.0, 6.0], [-7.0, -1.0, 3.0, 3.0, 3.0], [3.0, -6.0, 0.0, 6.0, 6.0], [7.0, 0.0, 2.0, 7.0, 
-6.0]]], [[[-3.0, -2.0, -5.0, -7.0, 0.0], [0.0, -3.0, 1.0, -1.0, 0.0], [-3.0, -5.0, 2.0, 4.0, -1.0], [-7.0, 3.0, 5.0, -1.0, 
--5.0]], [[-2.0, 0.0, 4.0, -3.0, 0.0], [-3.0, -6.0, 0.0, -7.0, -3.0], [4.0, -6.0, 4.0, 4.0, 2.0], [-5.0, 4.0, -4.0, -1.0, 
--6.0]], [[0.0, 1.0, -5.0, -7.0, 4.0], [3.0, -3.0, -2.0, -4.0, 2.0], [-1.0, -3.0, 4.0, -3.0, 2.0], [2.0, 1.0, 3.0, 0.0, 
--2.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-26.0, -2.0, -16.0, -41.0, 8.0], [-9.0, -28.0, 10.0, -41.0, -13.0], [-14.0, -58.0, 24.0, 32.0, 
-8.0], [-59.0, 34.0, 16.0, 1.0, -48.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -3.0, -5.0, 5.0, 0.0], [-1.0, 3.0, 0.0, -3.0, 7.0], [0.0, 7.0, 0.0, -2.0, -3.0], [-5.0, 
+2.0, 5.0, 6.0, 5.0]])+(1.-msk_arg0)*numpy.array([[-7.0, 2.0, -1.0, 0.0, 2.0], [-6.0, -4.0, -2.0, 3.0, -5.0], [0.0, -1.0, 6.0, 
+0.0, -1.0], [-5.0, -2.0, -7.0, -3.0, 7.0]])
+      arg1=-7.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-21.0, 21.0, 35.0, -35.0, -0.0], [7.0, -21.0, -0.0, 21.0, -49.0], [-0.0, -49.0, -0.0, 14.0, 
+21.0], [35.0, -14.0, -35.0, -42.0, -35.0]])+(1.-msk_ref)*numpy.array([[49.0, -14.0, 7.0, -0.0, -14.0], [42.0, 28.0, 14.0, 
+-21.0, 35.0], [-0.0, 7.0, -42.0, -0.0, 7.0], [35.0, 14.0, 49.0, 21.0, -49.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_constData_rank3_offset0(self):
-      arg0=numpy.array(0.0)
-      arg1=Data(numpy.array([[[0.0, -1.0], [-3.0, -1.0]], [[5.0, 2.0], [-4.0, 6.0]], [[-5.0, 4.0], [0.0, 7.0]], [[-2.0, -2.0], 
-[5.0, 6.0]], [[0.0, 5.0], [1.0, -6.0]], [[-1.0, -3.0], [4.0, 7.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, -5.0, 7.0, 2.0, 7.0], [6.0, 1.0, 6.0, -7.0, -6.0], [-4.0, 4.0, -6.0, -7.0, -3.0], [7.0, 
+-2.0, 4.0, 0.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 3.0, 1.0, 5.0, -4.0], [-4.0, 6.0, -5.0, -5.0, -1.0], [-4.0, 6.0, 0.0, 
+-2.0, 0.0], [0.0, -3.0, 6.0, 1.0, 7.0]])
+      arg1=numpy.array(0.0)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, -0.0], [-0.0, -0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], 
-[0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[-0.0, -0.0], [0.0, 0.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, -0.0, -0.0], [0.0, 
+-0.0, 0.0, 0.0, -0.0]])+(1.-msk_ref)*numpy.array([[-0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, 0.0, 
+-0.0, 0.0], [0.0, -0.0, 0.0, 0.0, 0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank4_offset1(self):
-      arg0=numpy.array([-2.0, 0.0, 1.0])
-      arg1=Data(numpy.array([[[[0.0, 6.0], [5.0, 2.0]], [[-2.0, 2.0], [3.0, 0.0]], [[-2.0, 1.0], [4.0, -6.0]], [[-5.0, 5.0], 
-[-6.0, 4.0]], [[-2.0, -5.0], [5.0, 2.0]], [[-2.0, 2.0], [-7.0, 0.0]]], [[[-1.0, -4.0], [-4.0, -2.0]], [[3.0, -6.0], [-7.0, 
-4.0]], [[-6.0, -3.0], [-6.0, -3.0]], [[5.0, -2.0], [4.0, -5.0]], [[4.0, -6.0], [7.0, 6.0]], [[-7.0, -4.0], [-4.0, 5.0]]], 
-[[[3.0, -2.0], [-3.0, 0.0]], [[4.0, 4.0], [-4.0, 1.0]], [[-4.0, -3.0], [0.0, 2.0]], [[6.0, -3.0], [0.0, -6.0]], [[-1.0, 2.0], 
-[5.0, -3.0]], [[6.0, 7.0], [6.0, 4.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-2.0, 1.0, -5.0], [0.0, 5.0, 4.0], [0.0, -5.0, -3.0], [6.0, 7.0, 5.0], [0.0, -7.0, 5.0]], 
+[[2.0, 0.0, -6.0], [-3.0, 2.0, 5.0], [0.0, 2.0, 5.0], [4.0, -6.0, 0.0], [-6.0, 0.0, 0.0]], [[-3.0, 2.0, -2.0], [-7.0, -4.0, 
+-2.0], [5.0, 0.0, -1.0], [-3.0, -3.0, 6.0], [5.0, 7.0, 2.0]], [[-3.0, 0.0, -5.0], [0.0, 0.0, 4.0], [6.0, 2.0, -6.0], [0.0, 
+-7.0, -3.0], [5.0, -3.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 5.0, -7.0], [-6.0, -1.0, 2.0], [-4.0, -6.0, 1.0], [-4.0, 
+-3.0, 2.0], [-4.0, -3.0, -1.0]], [[-4.0, -5.0, 7.0], [2.0, -2.0, 0.0], [2.0, 3.0, -1.0], [-5.0, 5.0, -5.0], [0.0, 0.0, 1.0]], 
+[[-4.0, -7.0, -1.0], [7.0, -5.0, 3.0], [0.0, 0.0, -5.0], [-1.0, 7.0, 6.0], [0.0, -6.0, -1.0]], [[3.0, 5.0, 0.0], [1.0, -5.0, 
+7.0], [-3.0, -6.0, 6.0], [0.0, -1.0, -1.0], [-4.0, 3.0, 2.0]]])
+      arg1=numpy.array([0.0, 6.0, -7.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[3.0, -14.0], [-13.0, -4.0]], [[8.0, 0.0], [-10.0, 1.0]], [[0.0, -5.0], [-8.0, 14.0]], [[16.0, 
--13.0], [12.0, -14.0]], [[3.0, 12.0], [-5.0, -7.0]], [[10.0, 3.0], [20.0, 4.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[41.0, 2.0, -9.0, 7.0, -77.0], [42.0, -23.0, -23.0, -36.0, 0.0], [26.0, -10.0, 7.0, -60.0, 
+28.0], [35.0, -28.0, 54.0, -21.0, 17.0]])+(1.-msk_ref)*numpy.array([[79.0, -20.0, -43.0, -32.0, -11.0], [-79.0, -12.0, 25.0, 
+65.0, -7.0], [-35.0, -51.0, 35.0, 0.0, -29.0], [30.0, -79.0, -78.0, 1.0, 4.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_constData_rank4_offset0(self):
-      arg0=numpy.array(5.0)
-      arg1=Data(numpy.array([[[[0.0, -3.0, -4.0, -5.0], [7.0, 4.0, 4.0, -2.0], [-6.0, 1.0, 6.0, 3.0]], [[2.0, 0.0, 6.0, 7.0], 
-[3.0, 7.0, -1.0, -2.0], [6.0, 5.0, 3.0, 5.0]]], [[[-2.0, 1.0, 4.0, 1.0], [6.0, -6.0, -1.0, -4.0], [1.0, 3.0, 7.0, 7.0]], [[7.0, 
--6.0, 0.0, 5.0], [-1.0, -7.0, 3.0, -3.0], [-1.0, 1.0, 2.0, -3.0]]], [[[3.0, -4.0, 6.0, -2.0], [4.0, -2.0, 5.0, 6.0], [4.0, 
--3.0, -2.0, 1.0]], [[1.0, 0.0, -2.0, -4.0], [0.0, -7.0, -6.0, 5.0], [7.0, 7.0, -2.0, 2.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, -15.0, -20.0, -25.0], [35.0, 20.0, 20.0, -10.0], [-30.0, 5.0, 30.0, 15.0]], [[10.0, 0.0, 
-30.0, 35.0], [15.0, 35.0, -5.0, -10.0], [30.0, 25.0, 15.0, 25.0]]], [[[-10.0, 5.0, 20.0, 5.0], [30.0, -30.0, -5.0, -20.0], 
-[5.0, 15.0, 35.0, 35.0]], [[35.0, -30.0, 0.0, 25.0], [-5.0, -35.0, 15.0, -15.0], [-5.0, 5.0, 10.0, -15.0]]], [[[15.0, -20.0, 
-30.0, -10.0], [20.0, -10.0, 25.0, 30.0], [20.0, -15.0, -10.0, 5.0]], [[5.0, 0.0, -10.0, -20.0], [0.0, -35.0, -30.0, 25.0], 
-[35.0, 35.0, -10.0, 10.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 1.0, 3.0], [2.0, -3.0, 4.0]], [[-6.0, 7.0, -4.0], [-4.0, 3.0, 5.0]], [[-3.0, -5.0, 
+3.0], [-3.0, 2.0, 3.0]], [[-6.0, 6.0, 3.0], [4.0, 3.0, 2.0]], [[-5.0, 6.0, 5.0], [0.0, -5.0, 6.0]]], [[[-4.0, 6.0, -4.0], 
+[-2.0, -4.0, 0.0]], [[4.0, -1.0, -4.0], [7.0, -5.0, -3.0]], [[-1.0, 3.0, -6.0], [-3.0, -2.0, 4.0]], [[5.0, -3.0, -1.0], [-3.0, 
+2.0, -1.0]], [[0.0, -6.0, 1.0], [3.0, 5.0, 2.0]]], [[[-5.0, -3.0, -4.0], [4.0, 3.0, 0.0]], [[4.0, -1.0, -2.0], [-3.0, -1.0, 
+6.0]], [[2.0, -3.0, 5.0], [-4.0, 4.0, -4.0]], [[4.0, -6.0, 3.0], [-2.0, 4.0, -1.0]], [[-1.0, -6.0, 1.0], [-5.0, -6.0, 0.0]]], 
+[[[-5.0, 3.0, 6.0], [2.0, 7.0, 2.0]], [[5.0, -2.0, 0.0], [0.0, -6.0, 5.0]], [[4.0, 3.0, 0.0], [5.0, 0.0, 2.0]], [[5.0, -4.0, 
+-5.0], [-1.0, -4.0, 2.0]], [[1.0, -6.0, -4.0], [5.0, -4.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -5.0, -1.0], [5.0, 
+-6.0, 6.0]], [[-4.0, 0.0, -7.0], [-7.0, 0.0, -1.0]], [[0.0, 5.0, 2.0], [-2.0, 5.0, 2.0]], [[-2.0, -5.0, 5.0], [-1.0, 7.0, 
+-2.0]], [[4.0, 3.0, -7.0], [-6.0, 0.0, 3.0]]], [[[-4.0, -4.0, -3.0], [-4.0, -5.0, -7.0]], [[1.0, 2.0, 6.0], [1.0, 3.0, -5.0]], 
+[[5.0, 0.0, 0.0], [5.0, 3.0, -4.0]], [[6.0, -7.0, -4.0], [-4.0, 7.0, 7.0]], [[6.0, 4.0, 7.0], [-2.0, 6.0, 4.0]]], [[[2.0, 3.0, 
+1.0], [0.0, 7.0, -6.0]], [[-1.0, 6.0, -6.0], [0.0, -5.0, 0.0]], [[6.0, -2.0, -3.0], [1.0, -2.0, -5.0]], [[4.0, 4.0, 7.0], [7.0, 
+-5.0, -7.0]], [[4.0, 2.0, 0.0], [-1.0, -3.0, -2.0]]], [[[3.0, -4.0, 4.0], [0.0, 5.0, -2.0]], [[-5.0, 0.0, -5.0], [-5.0, 6.0, 
+-5.0]], [[6.0, -3.0, 3.0], [-7.0, -6.0, 3.0]], [[-4.0, 2.0, 6.0], [-6.0, -2.0, -7.0]], [[-2.0, 5.0, -5.0], [-4.0, 0.0, -3.0]]]])
+      arg1=numpy.array([[5.0, -6.0, -3.0], [-3.0, 5.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-36.0, -33.0, 25.0, -72.0, -101.0], [-58.0, -8.0, -6.0, 65.0, 49.0], [8.0, 36.0, 45.0, 73.0, 
+13.0], [-32.0, 7.0, -13.0, 47.0, 18.0]])+(1.-msk_ref)*numpy.array([[-12.0, 22.0, -5.0, 43.0, 41.0], [0.0, -13.0, 25.0, 131.0, 
+21.0], [24.0, -48.0, 38.0, -71.0, -4.0], [52.0, 35.0, 30.0, -42.0, -13.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_expandedData_rank0_offset0(self):
-      arg0=numpy.array(5.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(6.0)
+   def test_generalTensorProduct_expandedData_rank2_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[6.0, 1.0, 5.0, 7.0, 2.0], [0.0, 5.0, 5.0, 3.0, 2.0], [7.0, 0.0, 3.0, 0.0, 4.0], [-1.0, 5.0, 
+-3.0, -6.0, -4.0]])+(1.-msk_arg0)*numpy.array([[2.0, 4.0, 3.0, -3.0, -1.0], [1.0, 6.0, 6.0, -2.0, -3.0], [-2.0, -4.0, 2.0, 0.0, 
+7.0], [-4.0, 5.0, -6.0, -6.0, 0.0]])
+      arg1=numpy.array([6.0, -3.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(5.0)+(1.-msk_ref)*numpy.array(30.0)
+      ref=msk_ref*numpy.array([[[36.0, -18.0], [6.0, -3.0], [30.0, -15.0], [42.0, -21.0], [12.0, -6.0]], [[0.0, 0.0], [30.0, 
+-15.0], [30.0, -15.0], [18.0, -9.0], [12.0, -6.0]], [[42.0, -21.0], [0.0, 0.0], [18.0, -9.0], [0.0, 0.0], [24.0, -12.0]], 
+[[-6.0, 3.0], [30.0, -15.0], [-18.0, 9.0], [-36.0, 18.0], [-24.0, 12.0]]])+(1.-msk_ref)*numpy.array([[[12.0, -6.0], [24.0, 
+-12.0], [18.0, -9.0], [-18.0, 9.0], [-6.0, 3.0]], [[6.0, -3.0], [36.0, -18.0], [36.0, -18.0], [-12.0, 6.0], [-18.0, 9.0]], 
+[[-12.0, 6.0], [-24.0, 12.0], [12.0, -6.0], [0.0, 0.0], [42.0, -21.0]], [[-24.0, 12.0], [30.0, -15.0], [-36.0, 18.0], [-36.0, 
+18.0], [0.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank1_offset1(self):
-      arg0=numpy.array([1.0, -7.0, 5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, -2.0, -6.0])+(1.-msk_arg1)*numpy.array([-3.0, -1.0, -2.0])
+   def test_generalTensorProduct_expandedData_rank3_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 1.0, -3.0], [-6.0, -3.0, -3.0], [-4.0, 4.0, -1.0], [-5.0, 3.0, -5.0], [-3.0, 1.0, 
+5.0]], [[-6.0, -3.0, 4.0], [2.0, -6.0, -1.0], [6.0, 5.0, 0.0], [-1.0, -2.0, 7.0], [1.0, -3.0, -3.0]], [[-5.0, -5.0, -1.0], 
+[-3.0, 7.0, -7.0], [0.0, 1.0, 0.0], [-7.0, 4.0, 1.0], [-1.0, 7.0, -6.0]], [[-5.0, 1.0, -2.0], [-2.0, -7.0, -2.0], [7.0, 6.0, 
+-6.0], [-4.0, 0.0, 3.0], [-6.0, -1.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, -4.0, 0.0], [-1.0, -5.0, -5.0], [-4.0, -1.0, 
+6.0], [3.0, -7.0, -7.0], [-6.0, 7.0, -2.0]], [[1.0, -3.0, -4.0], [1.0, -4.0, 1.0], [-5.0, 5.0, 7.0], [6.0, -7.0, -7.0], [-1.0, 
+2.0, 7.0]], [[7.0, -7.0, -4.0], [-5.0, -1.0, 3.0], [-7.0, 7.0, 3.0], [-6.0, -7.0, 6.0], [3.0, 0.0, 7.0]], [[-7.0, 0.0, -7.0], 
+[0.0, -5.0, 0.0], [6.0, 6.0, 7.0], [5.0, 6.0, -5.0], [7.0, 5.0, -7.0]]])
+      arg1=numpy.array([[-3.0, 5.0], [4.0, -1.0], [2.0, -7.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-12.0)+(1.-msk_ref)*numpy.array(-6.0)
+      ref=msk_ref*numpy.array([[[13.0, -5.0], [0.0, -6.0], [26.0, -17.0], [17.0, 7.0], [23.0, -51.0]], [[14.0, -55.0], [-32.0, 
+23.0], [2.0, 25.0], [9.0, -52.0], [-21.0, 29.0]], [[-7.0, -13.0], [23.0, 27.0], [4.0, -1.0], [39.0, -46.0], [19.0, 30.0]], 
+[[15.0, -12.0], [-26.0, 11.0], [-9.0, 71.0], [18.0, -41.0], [16.0, -36.0]]])+(1.-msk_ref)*numpy.array([[[-25.0, 19.0], [-27.0, 
+35.0], [20.0, -61.0], [-51.0, 71.0], [42.0, -23.0]], [[-23.0, 36.0], [-17.0, 2.0], [49.0, -79.0], [-60.0, 86.0], [25.0, 
+-56.0]], [[-57.0, 70.0], [17.0, -45.0], [55.0, -63.0], [2.0, -65.0], [5.0, -34.0]], [[7.0, 14.0], [-20.0, 5.0], [20.0, -25.0], 
+[-1.0, 54.0], [-15.0, 79.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[-6.0, 0.0, 0.0], [7.0, -3.0, 5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, 2.0, 6.0], [7.0, 1.0, 2.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 7.0, -6.0], [-7.0, -2.0, 
-0.0]])
+   def test_generalTensorProduct_expandedData_rank4_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, -4.0, 0.0], [-1.0, 5.0, -3.0]], [[-2.0, 2.0, 7.0], [6.0, 0.0, 7.0]], [[-3.0, 6.0, 
+0.0], [-3.0, 4.0, 0.0]], [[0.0, 0.0, -5.0], [-7.0, 6.0, 4.0]], [[-2.0, 5.0, 5.0], [4.0, -6.0, 6.0]]], [[[5.0, 1.0, 0.0], [-5.0, 
+7.0, -3.0]], [[5.0, 0.0, 5.0], [-3.0, 7.0, 6.0]], [[-3.0, -1.0, 1.0], [-5.0, 1.0, -4.0]], [[2.0, 6.0, -2.0], [-3.0, -6.0, 
+-5.0]], [[5.0, 2.0, 2.0], [-6.0, 1.0, 3.0]]], [[[-2.0, 5.0, 0.0], [-7.0, 4.0, 0.0]], [[2.0, -6.0, 3.0], [4.0, 2.0, -1.0]], 
+[[0.0, -4.0, 7.0], [4.0, -3.0, -3.0]], [[4.0, 4.0, -2.0], [1.0, -2.0, -7.0]], [[5.0, 1.0, 7.0], [0.0, 7.0, -7.0]]], [[[-4.0, 
+7.0, 6.0], [0.0, 2.0, 5.0]], [[3.0, -1.0, -5.0], [-7.0, 7.0, -3.0]], [[-5.0, 2.0, -5.0], [5.0, 7.0, 3.0]], [[-5.0, -4.0, 1.0], 
+[-4.0, -1.0, -6.0]], [[3.0, -1.0, 2.0], [0.0, 3.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 0.0, -1.0], [6.0, 1.0, -1.0]], 
+[[0.0, 1.0, 7.0], [5.0, 7.0, 0.0]], [[-1.0, 6.0, 6.0], [1.0, -6.0, 5.0]], [[-2.0, 0.0, 2.0], [0.0, -4.0, -7.0]], [[0.0, -6.0, 
+4.0], [7.0, 0.0, 2.0]]], [[[0.0, 7.0, -7.0], [6.0, -1.0, -5.0]], [[4.0, 1.0, 7.0], [0.0, 1.0, 2.0]], [[-4.0, 7.0, -6.0], [-7.0, 
+-3.0, 3.0]], [[1.0, 6.0, 2.0], [5.0, -5.0, 2.0]], [[-3.0, 7.0, -2.0], [0.0, 5.0, -5.0]]], [[[1.0, -4.0, 4.0], [-1.0, -6.0, 
+7.0]], [[-1.0, 0.0, -5.0], [3.0, -1.0, 6.0]], [[-6.0, 2.0, -2.0], [7.0, 7.0, 0.0]], [[5.0, -6.0, -1.0], [-4.0, 0.0, 3.0]], 
+[[4.0, -1.0, 0.0], [-3.0, 5.0, -4.0]]], [[[1.0, -1.0, -7.0], [0.0, -1.0, 7.0]], [[6.0, 3.0, 0.0], [-7.0, -2.0, -2.0]], [[0.0, 
+-1.0, -5.0], [-5.0, -7.0, -1.0]], [[-5.0, 4.0, -1.0], [-7.0, 4.0, 0.0]], [[-6.0, 1.0, 6.0], [3.0, 4.0, 3.0]]]])
+      arg1=numpy.array([[[3.0, 6.0], [2.0, 6.0], [2.0, 0.0]], [[-3.0, 4.0], [-5.0, -4.0], [1.0, -3.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(98.0)+(1.-msk_ref)*numpy.array(-7.0)
+      ref=msk_ref*numpy.array([[[-21.0, -15.0], [1.0, 3.0], [-8.0, -10.0], [-15.0, -64.0], [38.0, 40.0]], [[-6.0, -3.0], [5.0, 
+-28.0], [-3.0, -36.0], [48.0, 75.0], [39.0, 5.0]], [[5.0, -26.0], [-23.0, -13.0], [6.0, 13.0], [16.0, 81.0], [-11.0, 29.0]], 
+[[9.0, -5.0], [-20.0, -35.0], [-68.0, -35.0], [-10.0, -48.0], [-1.0, -9.0]]])+(1.-msk_ref)*numpy.array([[[-47.0, -19.0], 
+[-34.0, -2.0], [53.0, 43.0], [11.0, 25.0], [-23.0, -14.0]], [[-18.0, 85.0], [25.0, 20.0], [29.0, -7.0], [31.0, 76.0], [-29.0, 
+19.0]], [[43.0, -19.0], [-11.0, -8.0], [-74.0, -24.0], [16.0, -31.0], [-10.0, -2.0]], [[-1.0, -17.0], [53.0, 40.0], [37.0, 
+5.0], [-8.0, -50.0], [-30.0, -43.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank3_offset3(self):
-      arg0=numpy.array([[[-5.0, 1.0, -7.0], [5.0, 1.0, -5.0], [7.0, -5.0, -4.0], [-7.0, 0.0, -7.0]], [[2.0, -1.0, 7.0], [2.0, 
--6.0, -2.0], [-3.0, -7.0, 4.0], [-6.0, 0.0, 6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, 2.0, -2.0], [-5.0, 4.0, 7.0], [1.0, -1.0, 1.0], [2.0, 6.0, -6.0]], [[-7.0, -5.0, 
--4.0], [0.0, -6.0, 3.0], [-5.0, 3.0, -4.0], [7.0, 3.0, -6.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 6.0, -1.0], [7.0, 1.0, 
--5.0], [7.0, -1.0, 3.0], [2.0, -6.0, -2.0]], [[5.0, -1.0, -3.0], [-5.0, -3.0, 1.0], [5.0, 4.0, 2.0], [-7.0, 1.0, -2.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-81.0)+(1.-msk_ref)*numpy.array(117.0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank4_offset4(self):
-      arg0=numpy.array([[[[7.0, -1.0], [-7.0, 3.0], [5.0, 4.0]], [[-4.0, 6.0], [-2.0, -4.0], [1.0, -1.0]]], [[[1.0, 0.0], [3.0, 
--3.0], [0.0, 6.0]], [[6.0, -7.0], [-1.0, 7.0], [7.0, 2.0]]], [[[0.0, 4.0], [-4.0, 5.0], [5.0, -3.0]], [[2.0, -3.0], [0.0, 5.0], 
-[4.0, 4.0]]], [[[-7.0, 7.0], [-5.0, -1.0], [2.0, -6.0]], [[-3.0, -5.0], [-6.0, 3.0], [6.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-3.0, 5.0], [-7.0, 0.0], [-5.0, 4.0]], [[6.0, 3.0], [6.0, 4.0], [-3.0, -6.0]]], [[[-4.0, 
-3.0], [1.0, 1.0], [-2.0, -5.0]], [[5.0, 2.0], [0.0, 6.0], [3.0, -1.0]]], [[[-4.0, -1.0], [7.0, -6.0], [7.0, -1.0]], [[-1.0, 
-0.0], [-6.0, -3.0], [-6.0, -4.0]]], [[[0.0, 0.0], [-5.0, 5.0], [-3.0, 7.0]], [[6.0, 1.0], [-6.0, -3.0], [-2.0, 
--2.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -3.0], [3.0, -1.0], [-4.0, -7.0]], [[7.0, -7.0], [2.0, 6.0], [-7.0, 6.0]]], 
-[[[6.0, 0.0], [-1.0, -7.0], [-3.0, -7.0]], [[-7.0, 0.0], [4.0, -4.0], [-6.0, -1.0]]], [[[-6.0, 0.0], [-7.0, 7.0], [-7.0, 
--6.0]], [[5.0, -5.0], [-7.0, 1.0], [3.0, 0.0]]], [[[-2.0, -5.0], [0.0, 2.0], [7.0, 6.0]], [[4.0, 2.0], [1.0, 3.0], [7.0, 
--5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-81.0)+(1.-msk_ref)*numpy.array(-197.0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_expandedData_rank1_offset0(self):
-      arg0=numpy.array(-3.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-4.0, 7.0])+(1.-msk_arg1)*numpy.array([0.0, -2.0])
+   def test_generalTensorProduct_expandedData_rank2_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -4.0, -7.0, -6.0, -2.0], [0.0, 6.0, -2.0, 7.0, 7.0], [-2.0, 4.0, 1.0, 0.0, 2.0], [-7.0, 
+-4.0, -5.0, 2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[7.0, -3.0, 5.0, -3.0, -2.0], [2.0, -1.0, -3.0, -5.0, 3.0], [5.0, 5.0, 7.0, 
+1.0, 7.0], [5.0, 7.0, -2.0, -5.0, -1.0]])
+      arg1=numpy.array([[0.0, 1.0, 5.0, -6.0, -1.0], [-6.0, 0.0, 1.0, 5.0, 0.0], [-4.0, 1.0, 0.0, -2.0, 7.0], [0.0, -3.0, 7.0, 
+3.0, -4.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([12.0, -21.0])+(1.-msk_ref)*numpy.array([-0.0, 6.0])
+      ref=msk_ref*numpy.array([[[[0.0, 3.0, 15.0, -18.0, -3.0], [-18.0, 0.0, 3.0, 15.0, 0.0], [-12.0, 3.0, 0.0, -6.0, 21.0], 
+[0.0, -9.0, 21.0, 9.0, -12.0]], [[0.0, -4.0, -20.0, 24.0, 4.0], [24.0, 0.0, -4.0, -20.0, 0.0], [16.0, -4.0, 0.0, 8.0, -28.0], 
+[0.0, 12.0, -28.0, -12.0, 16.0]], [[0.0, -7.0, -35.0, 42.0, 7.0], [42.0, 0.0, -7.0, -35.0, 0.0], [28.0, -7.0, 0.0, 14.0, 
+-49.0], [0.0, 21.0, -49.0, -21.0, 28.0]], [[0.0, -6.0, -30.0, 36.0, 6.0], [36.0, 0.0, -6.0, -30.0, 0.0], [24.0, -6.0, 0.0, 
+12.0, -42.0], [0.0, 18.0, -42.0, -18.0, 24.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 0.0, 
+4.0, -14.0], [0.0, 6.0, -14.0, -6.0, 8.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 6.0, 30.0, -36.0, -6.0], [-36.0, 0.0, 6.0, 30.0, 0.0], [-24.0, 6.0, 0.0, -12.0, 42.0], [0.0, 
+-18.0, 42.0, 18.0, -24.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 0.0, 4.0, -14.0], [0.0, 
+6.0, -14.0, -6.0, 8.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, -14.0, 49.0], [0.0, 
+-21.0, 49.0, 21.0, -28.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, -14.0, 49.0], [0.0, 
+-21.0, 49.0, 21.0, -28.0]]], [[[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 0.0, 4.0, -14.0], 
+[0.0, 6.0, -14.0, -6.0, 8.0]], [[0.0, 4.0, 20.0, -24.0, -4.0], [-24.0, 0.0, 4.0, 20.0, 0.0], [-16.0, 4.0, 0.0, -8.0, 28.0], 
+[0.0, -12.0, 28.0, 12.0, -16.0]], [[0.0, 1.0, 5.0, -6.0, -1.0], [-6.0, 0.0, 1.0, 5.0, 0.0], [-4.0, 1.0, 0.0, -2.0, 7.0], [0.0, 
+-3.0, 7.0, 3.0, -4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[0.0, 2.0, 10.0, -12.0, -2.0], [-12.0, 0.0, 2.0, 10.0, 0.0], [-8.0, 2.0, 0.0, -4.0, 14.0], [0.0, -6.0, 14.0, 6.0, 
+-8.0]]], [[[0.0, -7.0, -35.0, 42.0, 7.0], [42.0, 0.0, -7.0, -35.0, 0.0], [28.0, -7.0, 0.0, 14.0, -49.0], [0.0, 21.0, -49.0, 
+-21.0, 28.0]], [[0.0, -4.0, -20.0, 24.0, 4.0], [24.0, 0.0, -4.0, -20.0, 0.0], [16.0, -4.0, 0.0, 8.0, -28.0], [0.0, 12.0, -28.0, 
+-12.0, 16.0]], [[0.0, -5.0, -25.0, 30.0, 5.0], [30.0, 0.0, -5.0, -25.0, 0.0], [20.0, -5.0, 0.0, 10.0, -35.0], [0.0, 15.0, 
+-35.0, -15.0, 20.0]], [[0.0, 2.0, 10.0, -12.0, -2.0], [-12.0, 0.0, 2.0, 10.0, 0.0], [-8.0, 2.0, 0.0, -4.0, 14.0], [0.0, -6.0, 
+14.0, 6.0, -8.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, -14.0, 49.0], [0.0, -21.0, 
+49.0, 21.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 
+0.0, -14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]], [[0.0, -3.0, -15.0, 18.0, 3.0], [18.0, 0.0, -3.0, -15.0, 0.0], [12.0, 
+-3.0, 0.0, 6.0, -21.0], [0.0, 9.0, -21.0, -9.0, 12.0]], [[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 
+5.0, 0.0, -10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, -3.0, -15.0, 18.0, 3.0], [18.0, 0.0, -3.0, -15.0, 0.0], [12.0, 
+-3.0, 0.0, 6.0, -21.0], [0.0, 9.0, -21.0, -9.0, 12.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, 
+-2.0, 0.0, 4.0, -14.0], [0.0, 6.0, -14.0, -6.0, 8.0]]], [[[0.0, 2.0, 10.0, -12.0, -2.0], [-12.0, 0.0, 2.0, 10.0, 0.0], [-8.0, 
+2.0, 0.0, -4.0, 14.0], [0.0, -6.0, 14.0, 6.0, -8.0]], [[0.0, -1.0, -5.0, 6.0, 1.0], [6.0, 0.0, -1.0, -5.0, 0.0], [4.0, -1.0, 
+0.0, 2.0, -7.0], [0.0, 3.0, -7.0, -3.0, 4.0]], [[0.0, -3.0, -15.0, 18.0, 3.0], [18.0, 0.0, -3.0, -15.0, 0.0], [12.0, -3.0, 0.0, 
+6.0, -21.0], [0.0, 9.0, -21.0, -9.0, 12.0]], [[0.0, -5.0, -25.0, 30.0, 5.0], [30.0, 0.0, -5.0, -25.0, 0.0], [20.0, -5.0, 0.0, 
+10.0, -35.0], [0.0, 15.0, -35.0, -15.0, 20.0]], [[0.0, 3.0, 15.0, -18.0, -3.0], [-18.0, 0.0, 3.0, 15.0, 0.0], [-12.0, 3.0, 0.0, 
+-6.0, 21.0], [0.0, -9.0, 21.0, 9.0, -12.0]]], [[[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 5.0, 0.0, 
+-10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 5.0, 0.0, 
+-10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, 
+-14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]], [[0.0, 1.0, 5.0, -6.0, -1.0], [-6.0, 0.0, 1.0, 5.0, 0.0], [-4.0, 1.0, 0.0, 
+-2.0, 7.0], [0.0, -3.0, 7.0, 3.0, -4.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, 
+-14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]]], [[[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 5.0, 
+0.0, -10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 
+0.0, -14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 
+0.0, 4.0, -14.0], [0.0, 6.0, -14.0, -6.0, 8.0]], [[0.0, -5.0, -25.0, 30.0, 5.0], [30.0, 0.0, -5.0, -25.0, 0.0], [20.0, -5.0, 
+0.0, 10.0, -35.0], [0.0, 15.0, -35.0, -15.0, 20.0]], [[0.0, -1.0, -5.0, 6.0, 1.0], [6.0, 0.0, -1.0, -5.0, 0.0], [4.0, -1.0, 
+0.0, 2.0, -7.0], [0.0, 3.0, -7.0, -3.0, 4.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank2_offset1(self):
-      arg0=numpy.array([-6.0, -6.0, -4.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 5.0], [7.0, -4.0], [-1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[1.0, 6.0], [6.0, -1.0], 
-[1.0, 5.0]])
+   def test_generalTensorProduct_expandedData_rank3_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, -5.0, 2.0], [-2.0, 2.0, -3.0], [1.0, 0.0, -5.0], [-3.0, 4.0, -7.0], [-5.0, 0.0, -3.0]], 
+[[0.0, -6.0, -5.0], [4.0, 3.0, -4.0], [-1.0, 7.0, 0.0], [-2.0, 1.0, 7.0], [-3.0, 4.0, -4.0]], [[-3.0, -5.0, -5.0], [0.0, -1.0, 
+-5.0], [-7.0, 7.0, -7.0], [-5.0, -4.0, -6.0], [6.0, 1.0, 3.0]], [[4.0, 7.0, -6.0], [3.0, 3.0, 1.0], [1.0, 3.0, 1.0], [7.0, 4.0, 
+4.0], [0.0, -7.0, -6.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 5.0, -5.0], [-6.0, -6.0, 3.0], [7.0, -7.0, -4.0], [3.0, -1.0, 
+-3.0], [-4.0, -1.0, 1.0]], [[3.0, -5.0, 0.0], [-4.0, -6.0, 7.0], [5.0, 3.0, -7.0], [3.0, 6.0, 6.0], [4.0, -7.0, -1.0]], [[-6.0, 
+-3.0, -3.0], [-3.0, 2.0, -4.0], [5.0, -3.0, -3.0], [-2.0, 2.0, -3.0], [-7.0, 0.0, 1.0]], [[0.0, 2.0, 2.0], [-4.0, -4.0, 2.0], 
+[-7.0, 5.0, 5.0], [-1.0, 5.0, 0.0], [0.0, -3.0, -6.0]]])
+      arg1=numpy.array([[[-5.0, 3.0, 0.0, -1.0, -7.0], [7.0, -7.0, -5.0, 2.0, 2.0], [-6.0, -5.0, -1.0, -2.0, 7.0], [-4.0, -4.0, 
+7.0, 0.0, -5.0]], [[2.0, 0.0, -2.0, 0.0, -1.0], [2.0, 4.0, 3.0, 2.0, -2.0], [-6.0, -1.0, 3.0, 3.0, 4.0], [2.0, -7.0, 4.0, 1.0, 
+-1.0]], [[0.0, -4.0, -5.0, 5.0, -5.0], [-3.0, -2.0, 0.0, 5.0, -1.0], [0.0, 1.0, -5.0, 4.0, 0.0], [-6.0, 5.0, 3.0, 3.0, 6.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-14.0, -6.0])+(1.-msk_ref)*numpy.array([-46.0, -50.0])
+      ref=msk_ref*numpy.array([[[[-30.0, 4.0, 0.0, 6.0, -33.0], [12.0, -52.0, -35.0, 8.0, 16.0], [6.0, -13.0, -29.0, -15.0, 
+8.0], [-38.0, 29.0, 14.0, 1.0, -3.0]], [[14.0, 6.0, 11.0, -13.0, 27.0], [-1.0, 28.0, 16.0, -15.0, -5.0], [0.0, 5.0, 23.0, -2.0, 
+-6.0], [30.0, -21.0, -15.0, -7.0, -10.0]], [[-5.0, 23.0, 25.0, -26.0, 18.0], [22.0, 3.0, -5.0, -23.0, 7.0], [-6.0, -10.0, 24.0, 
+-22.0, 7.0], [26.0, -29.0, -8.0, -15.0, -35.0]], [[23.0, 19.0, 27.0, -32.0, 52.0], [8.0, 51.0, 27.0, -33.0, -7.0], [-6.0, 4.0, 
+50.0, -10.0, -5.0], [62.0, -51.0, -26.0, -17.0, -31.0]], [[25.0, -3.0, 15.0, -10.0, 50.0], [-26.0, 41.0, 25.0, -25.0, -7.0], 
+[30.0, 22.0, 20.0, -2.0, -35.0], [38.0, 5.0, -44.0, -9.0, 7.0]]], [[[-12.0, 20.0, 37.0, -25.0, 31.0], [3.0, -14.0, -18.0, 
+-37.0, 17.0], [36.0, 1.0, 7.0, -38.0, -24.0], [18.0, 17.0, -39.0, -21.0, -24.0]], [[-14.0, 28.0, 14.0, -24.0, -11.0], [46.0, 
+-8.0, -11.0, -6.0, 6.0], [-42.0, -27.0, 25.0, -15.0, 40.0], [14.0, -57.0, 28.0, -9.0, -47.0]], [[19.0, -3.0, -14.0, 1.0, 0.0], 
+[7.0, 35.0, 26.0, 12.0, -16.0], [-36.0, -2.0, 22.0, 23.0, 21.0], [18.0, -45.0, 21.0, 7.0, -2.0]], [[12.0, -34.0, -37.0, 37.0, 
+-22.0], [-33.0, 4.0, 13.0, 33.0, -13.0], [6.0, 16.0, -30.0, 35.0, -10.0], [-32.0, 36.0, 11.0, 22.0, 51.0]], [[23.0, 7.0, 12.0, 
+-17.0, 37.0], [-1.0, 45.0, 27.0, -18.0, -10.0], [-6.0, 7.0, 35.0, 2.0, -5.0], [44.0, -36.0, -17.0, -8.0, -13.0]]], [[[5.0, 
+11.0, 35.0, -22.0, 51.0], [-16.0, 11.0, 0.0, -41.0, 9.0], [48.0, 15.0, 13.0, -29.0, -41.0], [32.0, 22.0, -56.0, -20.0, -10.0]], 
+[[-2.0, 20.0, 27.0, -25.0, 26.0], [13.0, 6.0, -3.0, -27.0, 7.0], [6.0, -4.0, 22.0, -23.0, -4.0], [28.0, -18.0, -19.0, -16.0, 
+-29.0]], [[49.0, 7.0, 21.0, -28.0, 77.0], [-14.0, 91.0, 56.0, -35.0, -21.0], [0.0, 21.0, 63.0, 7.0, -21.0], [84.0, -56.0, 
+-42.0, -14.0, -14.0]], [[17.0, 9.0, 38.0, -25.0, 69.0], [-25.0, 31.0, 13.0, -48.0, 4.0], [54.0, 23.0, 23.0, -26.0, -51.0], 
+[48.0, 18.0, -69.0, -22.0, -7.0]], [[-28.0, 6.0, -17.0, 9.0, -58.0], [35.0, -44.0, -27.0, 29.0, 7.0], [-42.0, -28.0, -18.0, 
+3.0, 46.0], [-40.0, -16.0, 55.0, 10.0, -13.0]]], [[[-6.0, 36.0, 16.0, -34.0, -5.0], [60.0, 12.0, 1.0, -8.0, 0.0], [-66.0, 
+-33.0, 47.0, -11.0, 56.0], [34.0, -95.0, 38.0, -11.0, -63.0]], [[-9.0, 5.0, -11.0, 2.0, -29.0], [24.0, -11.0, -6.0, 17.0, 
+-1.0], [-36.0, -17.0, 1.0, 7.0, 33.0], [-12.0, -28.0, 36.0, 6.0, -12.0]], [[1.0, -1.0, -11.0, 4.0, -15.0], [10.0, 3.0, 4.0, 
+13.0, -5.0], [-24.0, -7.0, 3.0, 11.0, 19.0], [-4.0, -20.0, 22.0, 6.0, -2.0]], [[-27.0, 5.0, -28.0, 13.0, -73.0], [45.0, -41.0, 
+-23.0, 42.0, 2.0], [-66.0, -35.0, -15.0, 14.0, 65.0], [-44.0, -36.0, 77.0, 16.0, -15.0]], [[-14.0, 24.0, 44.0, -30.0, 37.0], 
+[4.0, -16.0, -21.0, -44.0, 20.0], [42.0, 1.0, 9.0, -45.0, -28.0], [22.0, 19.0, -46.0, -25.0, 
+-29.0]]]])+(1.-msk_ref)*numpy.array([[[[-25.0, 41.0, 15.0, -32.0, -29.0], [74.0, -19.0, -20.0, -1.0, 9.0], [-72.0, -45.0, 33.0, 
+-19.0, 69.0], [12.0, -88.0, 54.0, -10.0, -70.0]], [[18.0, -30.0, -3.0, 21.0, 33.0], [-63.0, 12.0, 12.0, -9.0, -3.0], [72.0, 
+39.0, -27.0, 6.0, -66.0], [-6.0, 81.0, -57.0, 3.0, 54.0]], [[-49.0, 37.0, 34.0, -27.0, -22.0], [47.0, -69.0, -56.0, -20.0, 
+32.0], [0.0, -32.0, -8.0, -51.0, 21.0], [-18.0, 1.0, 9.0, -19.0, -52.0]], [[-17.0, 21.0, 17.0, -18.0, -5.0], [28.0, -19.0, 
+-18.0, -11.0, 11.0], [-12.0, -17.0, 9.0, -21.0, 17.0], [4.0, -20.0, 8.0, -10.0, -32.0]], [[18.0, -16.0, -3.0, 9.0, 24.0], 
+[-33.0, 22.0, 17.0, -5.0, -7.0], [30.0, 22.0, -4.0, 9.0, -32.0], [8.0, 28.0, -29.0, 2.0, 27.0]]], [[[-25.0, 9.0, 10.0, -3.0, 
+-16.0], [11.0, -41.0, -30.0, -4.0, 16.0], [12.0, -10.0, -18.0, -21.0, 1.0], [-22.0, 23.0, 1.0, -5.0, -10.0]], [[8.0, -40.0, 
+-23.0, 39.0, -1.0], [-61.0, -10.0, 2.0, 15.0, -3.0], [60.0, 33.0, -49.0, 18.0, -52.0], [-38.0, 93.0, -31.0, 15.0, 68.0]], 
+[[-19.0, 43.0, 29.0, -40.0, -3.0], [62.0, -9.0, -16.0, -19.0, 11.0], [-48.0, -35.0, 39.0, -29.0, 47.0], [28.0, -76.0, 26.0, 
+-18.0, -70.0]], [[-3.0, -15.0, -42.0, 27.0, -57.0], [15.0, -9.0, 3.0, 48.0, -12.0], [-54.0, -15.0, -15.0, 36.0, 45.0], [-36.0, 
+-24.0, 63.0, 24.0, 15.0]], [[-34.0, 16.0, 19.0, -9.0, -16.0], [17.0, -54.0, -41.0, -11.0, 23.0], [18.0, -14.0, -20.0, -33.0, 
+0.0], [-24.0, 28.0, -3.0, -10.0, -19.0]]], [[[24.0, -6.0, 21.0, -9.0, 60.0], [-39.0, 36.0, 21.0, -33.0, -3.0], [54.0, 30.0, 
+12.0, -9.0, -54.0], [36.0, 30.0, -63.0, -12.0, 15.0]], [[19.0, 7.0, 16.0, -17.0, 39.0], [-5.0, 37.0, 21.0, -22.0, -6.0], [6.0, 
+9.0, 29.0, -4.0, -13.0], [40.0, -22.0, -25.0, -10.0, -11.0]], [[-31.0, 27.0, 21.0, -20.0, -17.0], [38.0, -41.0, -34.0, -11.0, 
+19.0], [-12.0, -25.0, 1.0, -31.0, 23.0], [-8.0, -14.0, 14.0, -12.0, -40.0]], [[14.0, 6.0, 11.0, -13.0, 27.0], [-1.0, 28.0, 
+16.0, -15.0, -5.0], [0.0, 5.0, 23.0, -2.0, -6.0], [30.0, -21.0, -15.0, -7.0, -10.0]], [[35.0, -25.0, -5.0, 12.0, 44.0], [-52.0, 
+47.0, 35.0, -9.0, -15.0], [42.0, 36.0, 2.0, 18.0, -49.0], [22.0, 33.0, -46.0, 3.0, 41.0]]], [[[4.0, -8.0, -14.0, 10.0, -12.0], 
+[-2.0, 4.0, 6.0, 14.0, -6.0], [-12.0, 0.0, -4.0, 14.0, 8.0], [-8.0, -4.0, 14.0, 8.0, 10.0]], [[12.0, -20.0, -2.0, 14.0, 22.0], 
+[-42.0, 8.0, 8.0, -6.0, -2.0], [48.0, 26.0, -18.0, 4.0, -44.0], [-4.0, 54.0, -38.0, 2.0, 36.0]], [[45.0, -41.0, -35.0, 32.0, 
+19.0], [-54.0, 59.0, 50.0, 21.0, -29.0], [12.0, 35.0, -3.0, 49.0, -29.0], [8.0, 18.0, -14.0, 20.0, 60.0]], [[15.0, -3.0, -10.0, 
+1.0, 2.0], [3.0, 27.0, 20.0, 8.0, -12.0], [-24.0, 0.0, 16.0, 17.0, 13.0], [14.0, -31.0, 13.0, 5.0, 0.0]], [[-6.0, 24.0, 36.0, 
+-30.0, 33.0], [12.0, 0.0, -9.0, -36.0, 12.0], [18.0, -3.0, 21.0, -33.0, -12.0], [30.0, -9.0, -30.0, -21.0, -33.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[-1.0, -3.0, -5.0], [5.0, -7.0, 5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-3.0, 7.0], [3.0, 0.0], [-2.0, 3.0]], [[-7.0, 0.0], [6.0, -5.0], [3.0, 
-3.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, -4.0], [0.0, 6.0], [-6.0, -3.0]], [[2.0, -7.0], [-4.0, 3.0], [-4.0, -5.0]]])
+   def test_generalTensorProduct_expandedData_rank4_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[1.0, -7.0, 6.0], [-3.0, -3.0, -2.0]], [[-3.0, -5.0, 0.0], [1.0, 5.0, 4.0]], [[-6.0, 7.0, 
+-7.0], [0.0, 4.0, -7.0]], [[1.0, 0.0, 0.0], [6.0, 3.0, 5.0]], [[6.0, 0.0, -4.0], [6.0, -1.0, -6.0]]], [[[-5.0, 6.0, -5.0], 
+[1.0, -6.0, 2.0]], [[-5.0, -2.0, -6.0], [-2.0, 2.0, -1.0]], [[-7.0, -4.0, -1.0], [4.0, -1.0, 3.0]], [[6.0, -2.0, 0.0], [5.0, 
+0.0, 3.0]], [[-1.0, 7.0, 0.0], [0.0, 0.0, 4.0]]], [[[-4.0, 4.0, -6.0], [-6.0, -7.0, 0.0]], [[1.0, 3.0, 1.0], [4.0, -6.0, 
+-3.0]], [[3.0, 0.0, 7.0], [0.0, 2.0, -3.0]], [[-2.0, 1.0, 6.0], [-6.0, 3.0, 0.0]], [[-3.0, 4.0, 4.0], [0.0, 3.0, 7.0]]], 
+[[[0.0, 2.0, -7.0], [-2.0, 6.0, 5.0]], [[6.0, 3.0, -6.0], [2.0, -7.0, 6.0]], [[6.0, 4.0, -7.0], [-7.0, -1.0, -2.0]], [[-2.0, 
+7.0, 6.0], [-2.0, 1.0, 0.0]], [[7.0, 7.0, 2.0], [-1.0, 1.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, 6.0, 0.0], [-5.0, 0.0, 
+5.0]], [[-5.0, -4.0, 3.0], [1.0, -4.0, -5.0]], [[4.0, 2.0, 3.0], [2.0, 3.0, 6.0]], [[5.0, -6.0, -7.0], [0.0, -4.0, 0.0]], 
+[[-5.0, 0.0, 4.0], [7.0, 5.0, 4.0]]], [[[-2.0, -2.0, 3.0], [3.0, -5.0, -2.0]], [[-1.0, 5.0, 0.0], [1.0, 0.0, 4.0]], [[1.0, 7.0, 
+1.0], [0.0, 2.0, 4.0]], [[0.0, -4.0, -6.0], [2.0, -6.0, 4.0]], [[-2.0, -3.0, 6.0], [-4.0, -4.0, 0.0]]], [[[-2.0, -6.0, -4.0], 
+[2.0, -6.0, -4.0]], [[-6.0, -3.0, -3.0], [0.0, 0.0, -7.0]], [[-5.0, -3.0, 4.0], [-1.0, 4.0, -1.0]], [[-5.0, -5.0, 0.0], [1.0, 
+-1.0, -1.0]], [[0.0, -3.0, -6.0], [5.0, -4.0, -5.0]]], [[[7.0, 5.0, 0.0], [1.0, -4.0, 6.0]], [[0.0, -5.0, -4.0], [4.0, -6.0, 
+-5.0]], [[-7.0, 1.0, 0.0], [7.0, 2.0, 6.0]], [[4.0, 0.0, 6.0], [-3.0, 3.0, 6.0]], [[0.0, 1.0, -2.0], [2.0, 4.0, 5.0]]]])
+      arg1=numpy.array([[[[4.0, -6.0, -7.0, 2.0, 4.0], [6.0, 7.0, 0.0, 1.0, 0.0], [-3.0, -6.0, -5.0, 0.0, -6.0], [4.0, -1.0, 
+3.0, 6.0, -2.0]], [[4.0, 2.0, -3.0, 5.0, 7.0], [0.0, -2.0, -6.0, 4.0, 5.0], [5.0, -1.0, -4.0, 5.0, -6.0], [4.0, -3.0, -7.0, 
+3.0, -7.0]], [[3.0, -3.0, -1.0, 0.0, -7.0], [-1.0, -1.0, 1.0, 5.0, 2.0], [-2.0, -7.0, 7.0, 2.0, 2.0], [7.0, -7.0, 5.0, -5.0, 
+7.0]]], [[[2.0, 5.0, 7.0, -4.0, 1.0], [7.0, -7.0, -6.0, 6.0, -1.0], [4.0, 2.0, -3.0, 5.0, -3.0], [2.0, 2.0, 7.0, -5.0, -1.0]], 
+[[-1.0, 2.0, 3.0, -1.0, -6.0], [0.0, 7.0, -3.0, 5.0, 0.0], [5.0, 7.0, 0.0, -6.0, 2.0], [-7.0, 4.0, -1.0, 6.0, -2.0]], [[-2.0, 
+7.0, 6.0, 4.0, -5.0], [6.0, 6.0, -6.0, -5.0, -6.0], [-5.0, 6.0, -4.0, -7.0, -2.0], [0.0, -1.0, 0.0, 1.0, 4.0]]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-58.0, 28.0])+(1.-msk_ref)*numpy.array([42.0, -80.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank4_offset3(self):
-      arg0=numpy.array([[[-5.0, 3.0, 6.0], [-2.0, 7.0, -4.0], [0.0, 4.0, 5.0], [0.0, -7.0, -5.0]], [[0.0, -6.0, 3.0], [-1.0, 
--3.0, 5.0], [-6.0, 0.0, -2.0], [-6.0, -7.0, 6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -4.0], [-5.0, 6.0], [2.0, 6.0]], [[-6.0, 0.0], [1.0, 6.0], [0.0, -5.0]], [[-2.0, 
--4.0], [-1.0, -4.0], [-7.0, -6.0]], [[2.0, 2.0], [-3.0, 5.0], [-7.0, -1.0]]], [[[6.0, 6.0], [-2.0, -6.0], [4.0, -5.0]], [[2.0, 
-5.0], [7.0, -5.0], [0.0, -3.0]], [[2.0, 1.0], [7.0, 4.0], [1.0, 4.0]], [[-2.0, -6.0], [3.0, -1.0], [4.0, 
-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, 2.0], [-1.0, -5.0], [3.0, -3.0]], [[6.0, 5.0], [-6.0, 0.0], [6.0, 2.0]], [[3.0, 
--1.0], [6.0, 4.0], [4.0, 0.0]], [[-7.0, 4.0], [-2.0, -1.0], [-4.0, -2.0]]], [[[-3.0, -6.0], [-3.0, -6.0], [1.0, 4.0]], [[-3.0, 
--7.0], [-5.0, -5.0], [2.0, 4.0]], [[7.0, -4.0], [-6.0, -4.0], [-2.0, -7.0]], [[-4.0, 7.0], [-6.0, 2.0], [5.0, 1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([35.0, 123.0])+(1.-msk_ref)*numpy.array([97.0, 50.0])
+      ref=msk_ref*numpy.array([[[[-5.0, -73.0, -34.0, -26.0, -62.0], [-33.0, 3.0, 87.0, -20.0, -8.0], [-67.0, -80.0, 82.0, 
+-6.0, 55.0], [33.0, -38.0, 64.0, -50.0, 90.0]], [[-43.0, 51.0, 82.0, -24.0, -96.0], [13.0, 41.0, -15.0, -12.0, -50.0], [-7.0, 
+84.0, 16.0, -78.0, 47.0], [-65.0, 36.0, 28.0, -4.0, 46.0]], [[-7.0, 30.0, -2.0, -9.0, 85.0], [-71.0, -63.0, -19.0, 42.0, 63.0], 
+[122.0, 64.0, -19.0, 46.0, 2.0], [-73.0, 57.0, -106.0, 37.0, -122.0]], [[3.0, 65.0, 74.0, -5.0, -33.0], [78.0, 16.0, -75.0, 
+27.0, -36.0], [11.0, 57.0, -43.0, -23.0, -28.0], [-5.0, 18.0, 42.0, -1.0, 6.0]], [[37.0, -38.0, -35.0, -35.0, 94.0], [46.0, 
+-39.0, -1.0, 47.0, 22.0], [39.0, -39.0, -52.0, 70.0, -52.0], [15.0, 36.0, 41.0, 14.0, -68.0]]], [[[-7.0, 64.0, 23.0, 30.0, 
+84.0], [-6.0, -79.0, -41.0, -40.0, 7.0], [19.0, 31.0, -45.0, 47.0, -35.0], [13.0, -2.0, -69.0, -26.0, -48.0]], [[-50.0, 31.0, 
+33.0, -18.0, -1.0], [-44.0, -3.0, 18.0, -40.0, -14.0], [24.0, 78.0, 1.0, -37.0, 42.0], [-88.0, 58.0, -47.0, 15.0, -24.0]], 
+[[-44.0, 76.0, 105.0, -37.0, -54.0], [5.0, -57.0, -16.0, -24.0, -44.0], [-1.0, 72.0, 20.0, -17.0, 44.0], [-36.0, 27.0, 31.0, 
+-72.0, 45.0]], [[20.0, 6.0, 17.0, -6.0, 0.0], [89.0, 29.0, -36.0, 13.0, -33.0], [-23.0, -6.0, -49.0, -6.0, -45.0], [26.0, 7.0, 
+67.0, 8.0, 9.0]], [[16.0, 48.0, 10.0, 49.0, 25.0], [18.0, 3.0, -66.0, 7.0, 11.0], [18.0, 23.0, -39.0, 7.0, -44.0], [24.0, 
+-24.0, -52.0, 19.0, -31.0]]], [[[-23.0, 6.0, -41.0, 43.0, 90.0], [-60.0, -37.0, 27.0, -89.0, 14.0], [-15.0, 1.0, -20.0, 20.0, 
+-8.0], [-5.0, -6.0, -105.0, 6.0, -42.0]], [[39.0, -16.0, -25.0, -5.0, 73.0], [15.0, -88.0, -5.0, 27.0, 31.0], [11.0, -68.0, 
+-10.0, 94.0, -40.0], [73.0, -30.0, 21.0, -49.0, -20.0]], [[37.0, -56.0, -40.0, -8.0, -34.0], [-7.0, 10.0, 19.0, 63.0, 32.0], 
+[2.0, -71.0, 46.0, 23.0, 6.0], [47.0, -41.0, 42.0, -8.0, 27.0]], [[-1.0, -28.0, -28.0, 22.0, -67.0], [-60.0, 41.0, 27.0, 11.0, 
+23.0], [-10.0, -22.0, 66.0, -31.0, 42.0], [5.0, -43.0, -28.0, 9.0, 39.0]], [[-1.0, 69.0, 56.0, 39.0, -65.0], [20.0, 30.0, 
+-71.0, 13.0, -14.0], [1.0, 49.0, -1.0, -39.0, -6.0], [11.0, -32.0, -20.0, -1.0, 28.0]]], [[[-33.0, 62.0, 35.0, 32.0, 0.0], 
+[23.0, 89.0, -55.0, -34.0, -32.0], [21.0, 115.0, -71.0, -85.0, -18.0], [-87.0, 58.0, -69.0, 92.0, -53.0]], [[17.0, 26.0, -16.0, 
+50.0, 101.0], [92.0, 15.0, -51.0, -65.0, -35.0], [-48.0, -6.0, -114.0, 13.0, -98.0], [47.0, -3.0, -12.0, 29.0, -39.0]], [[10.0, 
+-58.0, -111.0, 53.0, 110.0], [-18.0, 71.0, 26.0, -50.0, 25.0], [-7.0, -24.0, -66.0, -9.0, -51.0], [-16.0, 15.0, -93.0, 110.0, 
+-88.0]], [[33.0, 0.0, -24.0, 38.0, -9.0], [-32.0, -13.0, -27.0, 49.0, 49.0], [26.0, -34.0, 30.0, 31.0, -10.0], [51.0, -61.0, 
+-40.0, -5.0, -3.0]], [[67.0, -65.0, -100.0, 36.0, 76.0], [9.0, 23.0, -13.0, 64.0, 64.0], [31.0, -82.0, -30.0, 56.0, -67.0], 
+[61.0, -36.0, -26.0, 60.0, -66.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, -14.0, -65.0, 82.0, 36.0], [31.0, 95.0, -36.0, -25.0, 
+5.0], [-33.0, -22.0, -59.0, -30.0, -67.0], [38.0, -39.0, -59.0, 84.0, -29.0]], [[-11.0, -25.0, 9.0, -50.0, -19.0], [-56.0, 
+-95.0, 63.0, 5.0, 15.0], [-2.0, -43.0, 79.0, 50.0, 59.0], [15.0, -13.0, 39.0, -91.0, 46.0]], [[22.0, 29.0, 22.0, 31.0, -37.0], 
+[71.0, 64.0, -66.0, 24.0, -22.0], [-15.0, 14.0, -37.0, -34.0, -42.0], [28.0, -21.0, 24.0, 29.0, 15.0]], [[-21.0, -29.0, -22.0, 
+-16.0, 51.0], [37.0, 26.0, 41.0, -74.0, -44.0], [-51.0, -3.0, -50.0, -20.0, -16.0], [-25.0, 46.0, 26.0, 23.0, -9.0]], [[-7.0, 
+91.0, 119.0, -27.0, -91.0], [39.0, -29.0, -77.0, 62.0, -23.0], [40.0, 75.0, 16.0, -15.0, 19.0], [-13.0, 7.0, 49.0, -51.0, 
+37.0]]], [[[8.0, -10.0, 11.0, -29.0, 0.0], [-6.0, -81.0, 24.0, 8.0, 5.0], [-13.0, -48.0, 38.0, 55.0, 15.0], [46.0, -25.0, 49.0, 
+-80.0, 38.0]], [[10.0, 49.0, 23.0, 35.0, 12.0], [25.0, 0.0, -60.0, 5.0, 0.0], [12.0, 27.0, -34.0, 2.0, -35.0], [18.0, -16.0, 
+-31.0, 8.0, -18.0]], [[25.0, 37.0, 1.0, 51.0, 14.0], [29.0, 30.0, -71.0, 24.0, 13.0], [20.0, 18.0, -42.0, -3.0, -50.0], [25.0, 
+-25.0, -43.0, 38.0, -32.0]], [[-32.0, 36.0, 38.0, -6.0, 32.0], [44.0, -18.0, 0.0, -84.0, -58.0], [-50.0, 32.0, -48.0, -14.0, 
+-14.0], [-12.0, 30.0, 18.0, -24.0, 12.0]], [[-6.0, -40.0, -23.0, 1.0, -51.0], [-46.0, -14.0, 60.0, -28.0, 1.0], [-57.0, -63.0, 
+76.0, 1.0, 46.0], [42.0, -55.0, 21.0, -55.0, 79.0]]], [[[-26.0, -18.0, 8.0, -52.0, 36.0], [-18.0, -78.0, 62.0, -44.0, -16.0], 
+[-18.0, -16.0, 16.0, 36.0, 30.0], [-14.0, 32.0, 36.0, -60.0, 12.0]], [[-31.0, -10.0, 12.0, -55.0, 11.0], [-75.0, -75.0, 57.0, 
+2.0, 21.0], [44.0, 18.0, 49.0, 28.0, 62.0], [-57.0, 43.0, -12.0, -37.0, -16.0]], [[-24.0, 8.0, 39.0, -29.0, -89.0], [-47.0, 
+-4.0, 22.0, 22.0, 0.0], [13.0, 25.0, 72.0, -29.0, 69.0], [-34.0, 1.0, 15.0, -31.0, 48.0]], [[-35.0, 16.0, 48.0, -42.0, -43.0], 
+[-29.0, -45.0, 33.0, -19.0, -20.0], [-6.0, 24.0, 46.0, -7.0, 57.0], [-31.0, 19.0, 28.0, -57.0, 42.0]], [[-6.0, -6.0, 8.0, 
+-51.0, 75.0], [11.0, -81.0, 24.0, -7.0, -2.0], [22.0, -3.0, -25.0, 57.0, -7.0], [-16.0, 50.0, 30.0, -33.0, -38.0]]], [[[42.0, 
+7.0, -33.0, 63.0, 58.0], [85.0, 40.0, -60.0, -17.0, -12.0], [-42.0, -37.0, -82.0, 12.0, -95.0], [78.0, -42.0, -3.0, 34.0, 
+-18.0]], [[-8.0, -25.0, -1.0, -55.0, 58.0], [2.0, -86.0, 50.0, -21.0, -7.0], [-6.0, -31.0, 0.0, 58.0, 8.0], [2.0, 32.0, 49.0, 
+-56.0, -5.0]], [[-24.0, 125.0, 137.0, -15.0, -56.0], [43.0, -50.0, -90.0, 19.0, -38.0], [34.0, 105.0, -14.0, -14.0, 7.0], 
+[-24.0, 20.0, 19.0, -56.0, 20.0]], [[13.0, -9.0, -10.0, 41.0, -77.0], [33.0, 100.0, -21.0, 1.0, -21.0], [-51.0, -15.0, 7.0, 
+-63.0, -9.0], [31.0, -46.0, 18.0, 33.0, 55.0]], [[-12.0, 61.0, 55.0, 13.0, -26.0], [46.0, 44.0, -62.0, 1.0, -31.0], [12.0, 
+75.0, -44.0, -48.0, -18.0], [-34.0, 26.0, -7.0, 32.0, -11.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_expandedData_rank2_offset0(self):
-      arg0=numpy.array(-6.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, -3.0, -5.0, 4.0, 3.0], [-3.0, -7.0, 1.0, 0.0, 4.0], [-1.0, 5.0, -3.0, 5.0, 3.0], [-1.0, 
--3.0, -1.0, 0.0, -7.0]])+(1.-msk_arg1)*numpy.array([[0.0, 4.0, 5.0, -5.0, -6.0], [4.0, 2.0, 0.0, 1.0, 0.0], [5.0, 1.0, 0.0, 
--6.0, 5.0], [1.0, 0.0, -3.0, -1.0, 3.0]])
+   def test_generalTensorProduct_expandedData_rank2_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 7.0, 6.0, 0.0, -1.0], [-7.0, -6.0, -5.0, 7.0, -3.0], [3.0, 7.0, 1.0, 0.0, 0.0], [4.0, 
+2.0, -3.0, 4.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -1.0, 1.0, 4.0, 1.0], [0.0, 2.0, 0.0, 3.0, 1.0], [5.0, 2.0, 1.0, 4.0, 
+-5.0], [0.0, -6.0, 2.0, 7.0, 3.0]])
+      arg1=Data(-7.0,self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-18.0, 18.0, 30.0, -24.0, -18.0], [18.0, 42.0, -6.0, -0.0, -24.0], [6.0, -30.0, 18.0, -30.0, 
--18.0], [6.0, 18.0, 6.0, -0.0, 42.0]])+(1.-msk_ref)*numpy.array([[-0.0, -24.0, -30.0, 30.0, 36.0], [-24.0, -12.0, -0.0, -6.0, 
--0.0], [-30.0, -6.0, -0.0, 36.0, -30.0], [-6.0, -0.0, 18.0, 6.0, -18.0]])
+      ref=msk_ref*numpy.array([[-0.0, -49.0, -42.0, -0.0, 7.0], [49.0, 42.0, 35.0, -49.0, 21.0], [-21.0, -49.0, -7.0, -0.0, 
+-0.0], [-28.0, -14.0, 21.0, -28.0, 14.0]])+(1.-msk_ref)*numpy.array([[35.0, 7.0, -7.0, -28.0, -7.0], [-0.0, -14.0, -0.0, -21.0, 
+-7.0], [-35.0, -14.0, -7.0, -28.0, 35.0], [-0.0, 42.0, -14.0, -49.0, -21.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank3_offset1(self):
-      arg0=numpy.array([6.0, 7.0, 7.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[6.0, -5.0, -7.0, -5.0, 5.0], [2.0, 2.0, 0.0, 0.0, -3.0], [-2.0, 4.0, -4.0, 4.0, -6.0], 
-[-3.0, 0.0, -5.0, -6.0, 4.0]], [[-2.0, 7.0, 6.0, 5.0, 5.0], [-6.0, 0.0, -3.0, 2.0, 5.0], [1.0, 1.0, -2.0, 6.0, 7.0], [-1.0, 
--6.0, -4.0, 5.0, -2.0]], [[-5.0, -5.0, 5.0, -2.0, 4.0], [0.0, -4.0, -3.0, 0.0, 4.0], [0.0, -6.0, 5.0, 3.0, 4.0], [-5.0, -4.0, 
--4.0, 1.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 7.0, 7.0, -3.0, 6.0], [3.0, 1.0, 5.0, -5.0, 0.0], [6.0, -5.0, -7.0, 1.0, 
-4.0], [-1.0, 0.0, 3.0, 5.0, 0.0]], [[3.0, 7.0, -7.0, 4.0, 7.0], [2.0, -5.0, 7.0, -7.0, 1.0], [-2.0, -3.0, 4.0, 1.0, 6.0], [1.0, 
-6.0, -4.0, 3.0, 5.0]], [[1.0, 0.0, -6.0, -5.0, 3.0], [-5.0, 2.0, 4.0, -1.0, 5.0], [-6.0, -5.0, 7.0, -6.0, -3.0], [-6.0, -1.0, 
-5.0, -2.0, 4.0]]])
+   def test_generalTensorProduct_expandedData_rank3_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[5.0, 3.0, 3.0], [-4.0, -1.0, 6.0], [5.0, 1.0, 2.0], [-2.0, -5.0, -2.0], [0.0, 2.0, 5.0]], 
+[[-3.0, -1.0, -4.0], [5.0, 2.0, 2.0], [0.0, 4.0, -7.0], [-2.0, 5.0, -2.0], [1.0, 4.0, 1.0]], [[0.0, -5.0, -1.0], [-7.0, 1.0, 
+3.0], [-3.0, 6.0, 6.0], [0.0, -1.0, -2.0], [1.0, 0.0, -5.0]], [[2.0, -7.0, 2.0], [-7.0, 0.0, -6.0], [-6.0, -7.0, -5.0], [-3.0, 
+-4.0, -3.0], [1.0, 0.0, -6.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -5.0, 5.0], [0.0, -6.0, 2.0], [7.0, 4.0, -3.0], [2.0, 4.0, 
+7.0], [4.0, 5.0, 1.0]], [[-7.0, 6.0, 0.0], [0.0, -5.0, 1.0], [-3.0, 6.0, 0.0], [0.0, -5.0, 7.0], [-5.0, 1.0, 0.0]], [[7.0, 
+-1.0, -4.0], [4.0, 3.0, 1.0], [-2.0, 0.0, 7.0], [-5.0, 6.0, 6.0], [7.0, 4.0, 4.0]], [[7.0, 7.0, 7.0], [3.0, -5.0, 0.0], [0.0, 
+-2.0, 5.0], [0.0, -3.0, 0.0], [3.0, 2.0, -1.0]]])
+      arg1=Data(numpy.array([-1.0, -6.0, 4.0]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-13.0, -16.0, 35.0, -9.0, 93.0], [-30.0, -16.0, -42.0, 14.0, 45.0], [-5.0, -11.0, -3.0, 87.0, 
-41.0], [-60.0, -70.0, -86.0, 6.0, 24.0]])+(1.-msk_ref)*numpy.array([[34.0, 91.0, -49.0, -25.0, 106.0], [-3.0, -15.0, 107.0, 
--86.0, 42.0], [-20.0, -86.0, 35.0, -29.0, 45.0], [-41.0, 35.0, 25.0, 37.0, 63.0]])
+      ref=msk_ref*numpy.array([[-11.0, 34.0, -3.0, 24.0, 8.0], [-7.0, -9.0, -52.0, -36.0, -21.0], [26.0, 13.0, -9.0, -2.0, 
+-21.0], [48.0, -17.0, 28.0, 15.0, -25.0]])+(1.-msk_ref)*numpy.array([[54.0, 44.0, -43.0, 2.0, -30.0], [-29.0, 34.0, -33.0, 
+58.0, -1.0], [-17.0, -18.0, 30.0, -7.0, -15.0], [-21.0, 27.0, 32.0, 18.0, -19.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[-6.0, -2.0, 0.0], [-2.0, 0.0, 0.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[7.0, 3.0, 7.0, -7.0, 3.0], [-2.0, -2.0, 0.0, -7.0, 2.0], [-2.0, -6.0, 4.0, 2.0, -2.0], 
-[-4.0, 4.0, 3.0, 7.0, -3.0]], [[5.0, 1.0, 0.0, -1.0, 7.0], [5.0, 2.0, 0.0, 4.0, 0.0], [5.0, -7.0, 3.0, 5.0, -4.0], [3.0, -1.0, 
-7.0, 0.0, -2.0]], [[4.0, -7.0, 3.0, 0.0, 0.0], [3.0, 2.0, 4.0, 3.0, -2.0], [5.0, -2.0, -6.0, 5.0, -4.0], [-4.0, -6.0, 0.0, 
--7.0, -2.0]]], [[[5.0, 7.0, -2.0, 5.0, 3.0], [7.0, 0.0, 5.0, 1.0, -2.0], [0.0, 7.0, 1.0, 5.0, -4.0], [5.0, 7.0, 0.0, 2.0, 
-5.0]], [[6.0, 6.0, 4.0, -4.0, -6.0], [-3.0, 0.0, -4.0, 7.0, 4.0], [7.0, 3.0, 0.0, -6.0, -7.0], [6.0, 3.0, 0.0, -7.0, 4.0]], 
-[[-2.0, 2.0, 0.0, 2.0, 0.0], [-4.0, 0.0, 0.0, 2.0, 3.0], [-7.0, -6.0, 1.0, -7.0, -4.0], [7.0, 4.0, 0.0, 0.0, 
--3.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 7.0, 2.0, -7.0, 0.0], [1.0, -7.0, 0.0, -4.0, 5.0], [-7.0, -3.0, 0.0, 3.0, -3.0], 
-[5.0, -4.0, 7.0, -1.0, 3.0]], [[5.0, 4.0, 5.0, 4.0, 3.0], [2.0, 4.0, -7.0, 1.0, -5.0], [-1.0, -7.0, 5.0, 0.0, -3.0], [-2.0, 
-1.0, 1.0, 0.0, 6.0]], [[-3.0, 0.0, 7.0, -5.0, -5.0], [3.0, -4.0, 3.0, 5.0, -7.0], [-7.0, -2.0, 7.0, 7.0, -4.0], [0.0, -3.0, 
-0.0, -7.0, -4.0]]], [[[-3.0, -4.0, 0.0, -7.0, -1.0], [-7.0, 6.0, -7.0, 6.0, 6.0], [7.0, 0.0, 6.0, -3.0, 0.0], [0.0, 4.0, 1.0, 
-1.0, -2.0]], [[0.0, 0.0, 4.0, 4.0, 7.0], [0.0, -5.0, 2.0, -7.0, 4.0], [-3.0, -4.0, -3.0, 2.0, 7.0], [-1.0, -7.0, -7.0, 7.0, 
-0.0]], [[-7.0, 5.0, -3.0, 1.0, 3.0], [-6.0, -1.0, -6.0, -5.0, -6.0], [-2.0, 6.0, -3.0, 4.0, 0.0], [0.0, -1.0, -2.0, 6.0, 
--7.0]]]])
+   def test_generalTensorProduct_expandedData_rank4_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, 0.0, -6.0], [7.0, 2.0, -3.0]], [[0.0, -3.0, -1.0], [7.0, 7.0, -3.0]], [[7.0, -3.0, 
+-2.0], [6.0, 3.0, -3.0]], [[3.0, -6.0, 2.0], [-2.0, -3.0, -1.0]], [[-4.0, 0.0, -1.0], [-2.0, -7.0, 1.0]]], [[[4.0, -5.0, 2.0], 
+[-4.0, 3.0, 4.0]], [[4.0, -7.0, 3.0], [0.0, 6.0, -3.0]], [[4.0, 3.0, -5.0], [6.0, -1.0, 6.0]], [[-1.0, -5.0, 3.0], [-1.0, -2.0, 
+-2.0]], [[-1.0, 7.0, -5.0], [1.0, -5.0, 6.0]]], [[[-7.0, -5.0, 1.0], [0.0, 0.0, 0.0]], [[7.0, 4.0, 0.0], [2.0, 0.0, 4.0]], 
+[[7.0, -3.0, -4.0], [-7.0, -5.0, -4.0]], [[-7.0, 6.0, 6.0], [-5.0, -1.0, 3.0]], [[-5.0, 5.0, -7.0], [5.0, 4.0, -5.0]]], [[[1.0, 
+-5.0, -5.0], [4.0, 2.0, -6.0]], [[0.0, 1.0, -7.0], [-5.0, 7.0, -7.0]], [[2.0, 0.0, 1.0], [-3.0, -5.0, 0.0]], [[7.0, 2.0, 2.0], 
+[3.0, 3.0, 6.0]], [[7.0, 6.0, 4.0], [4.0, -7.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -7.0, -4.0], [-3.0, 2.0, 3.0]], 
+[[-7.0, -6.0, 0.0], [-3.0, -6.0, 1.0]], [[2.0, -7.0, 6.0], [-3.0, -5.0, 0.0]], [[-2.0, 6.0, -3.0], [-7.0, 2.0, -6.0]], [[5.0, 
+-6.0, 6.0], [4.0, 1.0, -1.0]]], [[[-6.0, -6.0, 2.0], [-2.0, 7.0, 4.0]], [[-1.0, 3.0, 2.0], [-1.0, 4.0, -5.0]], [[2.0, -1.0, 
+-1.0], [-4.0, -4.0, 4.0]], [[5.0, 0.0, -5.0], [-2.0, -5.0, -1.0]], [[5.0, -1.0, 5.0], [-3.0, -6.0, 3.0]]], [[[-3.0, 0.0, 1.0], 
+[-6.0, -4.0, 1.0]], [[6.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[-4.0, 7.0, 6.0], [-7.0, -4.0, -2.0]], [[0.0, 4.0, -4.0], [-6.0, -6.0, 
+4.0]], [[4.0, -1.0, 5.0], [6.0, 7.0, 0.0]]], [[[-4.0, 0.0, -2.0], [0.0, -1.0, 3.0]], [[7.0, -3.0, -4.0], [4.0, 7.0, -5.0]], 
+[[3.0, 7.0, 2.0], [-5.0, 4.0, 2.0]], [[5.0, 0.0, 3.0], [-2.0, 3.0, -1.0]], [[-2.0, -2.0, -2.0], [6.0, 2.0, -3.0]]]])
+      arg1=Data(numpy.array([[2.0, -5.0, 0.0], [-3.0, -3.0, 7.0]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-62.0, -34.0, -38.0, 34.0, -38.0], [-12.0, 8.0, -10.0, 32.0, -8.0], [2.0, 36.0, -32.0, -32.0, 
-28.0], [8.0, -36.0, -32.0, -46.0, 12.0]])+(1.-msk_ref)*numpy.array([[-46.0, -42.0, -22.0, 48.0, -4.0], [4.0, 22.0, 28.0, 10.0, 
--32.0], [30.0, 32.0, -22.0, -12.0, 24.0], [-26.0, 14.0, -46.0, 4.0, -26.0]])
+      ref=msk_ref*numpy.array([[-62.0, -48.0, -19.0, 44.0, 26.0], [64.0, 4.0, 20.0, 18.0, 17.0], [11.0, 16.0, 37.0, -5.0, 
+-97.0], [-33.0, -60.0, 28.0, 28.0, 14.0]])+(1.-msk_ref)*numpy.array([[63.0, 50.0, 63.0, -61.0, 18.0], [31.0, -61.0, 61.0, 24.0, 
+63.0], [31.0, 12.0, -24.0, 44.0, -26.0], [16.0, -39.0, -12.0, 0.0, -39.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_expandedData_rank3_offset0(self):
-      arg0=numpy.array(-5.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, 0.0], [2.0, -6.0]], [[-4.0, 0.0], [-1.0, -5.0]], [[-2.0, 6.0], [-2.0, -4.0]], [[-4.0, 
-4.0], [-2.0, -6.0]], [[0.0, 3.0], [2.0, -1.0]], [[6.0, 7.0], [-3.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 4.0], [5.0, 
-5.0]], [[-5.0, -1.0], [-1.0, 2.0]], [[2.0, -2.0], [0.0, 6.0]], [[-5.0, 6.0], [-2.0, 0.0]], [[4.0, 4.0], [0.0, 5.0]], [[-5.0, 
--3.0], [4.0, 2.0]]])
+   def test_generalTensorProduct_expandedData_rank2_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[6.0, 0.0, 3.0, 0.0, 6.0], [-6.0, -7.0, -5.0, -4.0, -7.0], [3.0, 7.0, 4.0, 1.0, -1.0], [-3.0, 
+2.0, 5.0, 3.0, 6.0]])+(1.-msk_arg0)*numpy.array([[-7.0, -2.0, -1.0, 6.0, 6.0], [2.0, 3.0, 7.0, 7.0, -4.0], [7.0, 0.0, 1.0, 2.0, 
+-5.0], [-7.0, -5.0, 5.0, 6.0, -4.0]])
+      arg1=Data(numpy.array([5.0, 0.0]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[25.0, -0.0], [-10.0, 30.0]], [[20.0, -0.0], [5.0, 25.0]], [[10.0, -30.0], [10.0, 20.0]], 
-[[20.0, -20.0], [10.0, 30.0]], [[-0.0, -15.0], [-10.0, 5.0]], [[-30.0, -35.0], [15.0, 
--35.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, -20.0], [-25.0, -25.0]], [[25.0, 5.0], [5.0, -10.0]], [[-10.0, 10.0], [-0.0, 
--30.0]], [[25.0, -30.0], [10.0, -0.0]], [[-20.0, -20.0], [-0.0, -25.0]], [[25.0, 15.0], [-20.0, -10.0]]])
+      ref=msk_ref*numpy.array([[[30.0, 0.0], [0.0, 0.0], [15.0, 0.0], [0.0, 0.0], [30.0, 0.0]], [[-30.0, 0.0], [-35.0, 0.0], 
+[-25.0, 0.0], [-20.0, 0.0], [-35.0, 0.0]], [[15.0, 0.0], [35.0, 0.0], [20.0, 0.0], [5.0, 0.0], [-5.0, 0.0]], [[-15.0, 0.0], 
+[10.0, 0.0], [25.0, 0.0], [15.0, 0.0], [30.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, 0.0], [-10.0, 0.0], [-5.0, 0.0], 
+[30.0, 0.0], [30.0, 0.0]], [[10.0, 0.0], [15.0, 0.0], [35.0, 0.0], [35.0, 0.0], [-20.0, 0.0]], [[35.0, 0.0], [0.0, 0.0], [5.0, 
+0.0], [10.0, 0.0], [-25.0, 0.0]], [[-35.0, 0.0], [-25.0, 0.0], [25.0, 0.0], [30.0, 0.0], [-20.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=numpy.array(arg0*1j)
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=0)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank4_offset1(self):
-      arg0=numpy.array([-5.0, -6.0, -3.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[6.0, 0.0], [-5.0, 0.0]], [[6.0, -3.0], [4.0, -4.0]], [[-3.0, 6.0], [0.0, 4.0]], [[-6.0, 
--4.0], [-7.0, 7.0]], [[7.0, -7.0], [-7.0, 1.0]], [[-4.0, 5.0], [0.0, 0.0]]], [[[0.0, 2.0], [0.0, 2.0]], [[-2.0, 0.0], [-5.0, 
--1.0]], [[5.0, 5.0], [-7.0, -3.0]], [[-7.0, 0.0], [7.0, -5.0]], [[1.0, -7.0], [5.0, 2.0]], [[-2.0, 4.0], [-3.0, -3.0]]], 
-[[[-6.0, 7.0], [1.0, 6.0]], [[0.0, 5.0], [4.0, -1.0]], [[-6.0, -3.0], [5.0, -1.0]], [[0.0, 5.0], [2.0, -1.0]], [[-3.0, 5.0], 
-[7.0, 2.0]], [[6.0, 0.0], [-5.0, 1.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, -2.0], [-6.0, -2.0]], [[-3.0, 0.0], [4.0, 0.0]], 
-[[-4.0, 1.0], [2.0, 3.0]], [[0.0, 2.0], [-4.0, -2.0]], [[2.0, 0.0], [3.0, 4.0]], [[0.0, 7.0], [2.0, -7.0]]], [[[2.0, 2.0], 
-[7.0, 5.0]], [[-2.0, 7.0], [0.0, 3.0]], [[4.0, 7.0], [0.0, 1.0]], [[-3.0, 5.0], [6.0, 4.0]], [[-4.0, 0.0], [4.0, -5.0]], 
-[[-2.0, 6.0], [3.0, -1.0]]], [[[7.0, -1.0], [4.0, 7.0]], [[-6.0, 0.0], [-3.0, 1.0]], [[-1.0, 1.0], [6.0, -3.0]], [[-4.0, 1.0], 
-[0.0, -1.0]], [[1.0, 7.0], [4.0, 4.0]], [[-4.0, -3.0], [-2.0, 7.0]]]])
+   def test_generalTensorProduct_expandedData_rank3_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, 3.0, -5.0], [-4.0, 5.0, 0.0], [-3.0, 1.0, 0.0], [-3.0, -5.0, 5.0], [6.0, -6.0, 4.0]], 
+[[-4.0, 5.0, 6.0], [-2.0, 0.0, 0.0], [-2.0, -1.0, -2.0], [-2.0, -5.0, -3.0], [4.0, 4.0, 4.0]], [[-7.0, 1.0, -6.0], [5.0, -4.0, 
+2.0], [-2.0, 2.0, 4.0], [-2.0, -7.0, 6.0], [2.0, -4.0, -7.0]], [[3.0, 0.0, -4.0], [-6.0, -3.0, 5.0], [-3.0, -1.0, -4.0], [-1.0, 
+2.0, 5.0], [0.0, 0.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, 7.0, 3.0], [0.0, -5.0, 0.0], [0.0, -7.0, 7.0], [5.0, 4.0, 
+3.0], [3.0, 7.0, 4.0]], [[-2.0, -6.0, 7.0], [-4.0, -5.0, 2.0], [4.0, -1.0, 1.0], [3.0, 6.0, 2.0], [-6.0, -7.0, -3.0]], [[6.0, 
+-7.0, 2.0], [0.0, 3.0, 2.0], [6.0, -7.0, 7.0], [1.0, 3.0, 1.0], [-1.0, 0.0, -6.0]], [[-3.0, -2.0, 1.0], [-6.0, -1.0, -6.0], 
+[-3.0, 1.0, -1.0], [-1.0, -4.0, 6.0], [7.0, -2.0, -6.0]]])
+      arg1=Data(numpy.array([[3.0, 6.0], [7.0, 7.0], [7.0, 7.0]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, -33.0], [22.0, -30.0]], [[-18.0, 0.0], [-2.0, 29.0]], [[3.0, -51.0], [27.0, 1.0]], 
-[[72.0, 5.0], [-13.0, -2.0]], [[-32.0, 62.0], [-16.0, -23.0]], [[14.0, -49.0], [33.0, 
-15.0]]])+(1.-msk_ref)*numpy.array([[[-38.0, 1.0], [-24.0, -41.0]], [[45.0, -42.0], [-11.0, -21.0]], [[-1.0, -50.0], [-28.0, 
--12.0]], [[30.0, -43.0], [-16.0, -11.0]], [[11.0, -21.0], [-51.0, -2.0]], [[24.0, -62.0], [-22.0, 20.0]]])
+      ref=msk_ref*numpy.array([[[-2.0, 10.0], [23.0, 11.0], [-2.0, -11.0], [-9.0, -18.0], [4.0, 22.0]], [[65.0, 53.0], [-6.0, 
+-12.0], [-27.0, -33.0], [-62.0, -68.0], [68.0, 80.0]], [[-56.0, -77.0], [1.0, 16.0], [36.0, 30.0], [-13.0, -19.0], [-71.0, 
+-65.0]], [[-19.0, -10.0], [-4.0, -22.0], [-44.0, -53.0], [46.0, 43.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[55.0, 40.0], 
+[-35.0, -35.0], [0.0, 0.0], [64.0, 79.0], [86.0, 95.0]], [[1.0, -5.0], [-33.0, -45.0], [12.0, 24.0], [65.0, 74.0], [-88.0, 
+-106.0]], [[-17.0, 1.0], [35.0, 35.0], [18.0, 36.0], [31.0, 34.0], [-45.0, -48.0]], [[-16.0, -25.0], [-67.0, -85.0], [-9.0, 
+-18.0], [11.0, 8.0], [-35.0, -14.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=numpy.array(arg0*1j)
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank0_expandedData_rank4_offset0(self):
-      arg0=numpy.array(-1.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -3.0, 4.0, -1.0], [7.0, 1.0, -3.0, 1.0], [2.0, -3.0, 0.0, 5.0]], [[3.0, 4.0, 4.0, 
-1.0], [-7.0, 0.0, 6.0, -6.0], [4.0, -4.0, -2.0, 1.0]]], [[[-7.0, 5.0, 0.0, -5.0], [-5.0, 0.0, 5.0, -5.0], [-4.0, 1.0, -6.0, 
--1.0]], [[-7.0, -5.0, -3.0, 2.0], [-2.0, 0.0, -7.0, -7.0], [0.0, -6.0, -1.0, 5.0]]], [[[-2.0, 6.0, 5.0, -5.0], [2.0, 4.0, -6.0, 
--4.0], [-5.0, 4.0, -6.0, 7.0]], [[5.0, 4.0, 4.0, -2.0], [7.0, 3.0, -1.0, -2.0], [-1.0, 6.0, 6.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-3.0, -7.0, 0.0, -5.0], [4.0, 5.0, -1.0, 5.0], [5.0, 2.0, 7.0, 1.0]], [[7.0, 0.0, -6.0, 
-6.0], [-5.0, 0.0, 0.0, 5.0], [-5.0, 7.0, -5.0, 1.0]]], [[[0.0, -1.0, 5.0, 5.0], [4.0, 1.0, 5.0, 2.0], [0.0, -2.0, 3.0, 5.0]], 
-[[-5.0, 4.0, 2.0, -4.0], [0.0, 0.0, -2.0, -6.0], [7.0, 6.0, 0.0, 5.0]]], [[[-3.0, 5.0, 0.0, -6.0], [7.0, -2.0, -5.0, -4.0], 
-[-2.0, 7.0, -4.0, -2.0]], [[-4.0, 1.0, 6.0, 0.0], [1.0, 3.0, 7.0, 0.0], [-3.0, -1.0, -2.0, -3.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank4_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[1.0, -3.0, 7.0], [-3.0, 0.0, 6.0]], [[-1.0, 7.0, -3.0], [-7.0, -7.0, 2.0]], [[2.0, -6.0, 
+1.0], [-6.0, -2.0, 6.0]], [[0.0, 7.0, 4.0], [3.0, 7.0, 7.0]], [[-4.0, 4.0, -5.0], [-4.0, -3.0, -5.0]]], [[[-3.0, 0.0, -5.0], 
+[6.0, 4.0, 1.0]], [[7.0, 1.0, -4.0], [0.0, 1.0, 0.0]], [[-7.0, 4.0, 4.0], [5.0, -3.0, 5.0]], [[6.0, -4.0, -4.0], [7.0, 0.0, 
+-5.0]], [[0.0, 4.0, 1.0], [7.0, 3.0, 6.0]]], [[[7.0, 1.0, 0.0], [-6.0, -5.0, -7.0]], [[-7.0, -4.0, -2.0], [5.0, 5.0, 1.0]], 
+[[0.0, -7.0, 7.0], [-5.0, -7.0, 4.0]], [[0.0, 0.0, 6.0], [-2.0, 3.0, 1.0]], [[7.0, 7.0, 0.0], [-7.0, -2.0, 0.0]]], [[[-1.0, 
+0.0, -4.0], [0.0, -7.0, 5.0]], [[6.0, -2.0, -4.0], [-1.0, -7.0, -1.0]], [[1.0, 7.0, -6.0], [2.0, -4.0, -1.0]], [[0.0, 2.0, 
+-2.0], [3.0, 3.0, 4.0]], [[-2.0, -2.0, 7.0], [-5.0, -7.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 1.0, 0.0], [6.0, -5.0, 
+0.0]], [[1.0, -6.0, 5.0], [-7.0, 1.0, -7.0]], [[3.0, 5.0, -1.0], [-7.0, 3.0, 4.0]], [[4.0, -5.0, 3.0], [-6.0, -7.0, -2.0]], 
+[[1.0, -4.0, 5.0], [4.0, -2.0, 3.0]]], [[[3.0, -3.0, -4.0], [2.0, -4.0, -1.0]], [[5.0, 2.0, 4.0], [2.0, 5.0, 0.0]], [[-3.0, 
+1.0, 3.0], [-6.0, -4.0, 5.0]], [[-4.0, 0.0, 1.0], [-1.0, 4.0, -5.0]], [[-1.0, -3.0, -2.0], [0.0, 4.0, 7.0]]], [[[-5.0, -2.0, 
+6.0], [-6.0, -5.0, -7.0]], [[4.0, -1.0, -1.0], [-2.0, -6.0, -3.0]], [[-6.0, -4.0, 7.0], [0.0, -7.0, -5.0]], [[2.0, -2.0, 0.0], 
+[1.0, -1.0, 5.0]], [[7.0, -7.0, -4.0], [-6.0, 5.0, 3.0]]], [[[-7.0, 0.0, 1.0], [-5.0, -6.0, 4.0]], [[-4.0, -1.0, -2.0], [6.0, 
+-3.0, 2.0]], [[0.0, 5.0, -5.0], [-2.0, 3.0, 5.0]], [[-2.0, 6.0, -5.0], [-6.0, -4.0, 0.0]], [[4.0, -7.0, 1.0], [-6.0, 4.0, 
+0.0]]]])
+      arg1=Data(numpy.array([[[-5.0, 5.0], [-4.0, -6.0], [-2.0, -4.0]], [[-3.0, 1.0], [-7.0, -3.0], [1.0, 
+-3.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[2.0, 3.0, -4.0, 1.0], [-7.0, -1.0, 3.0, -1.0], [-2.0, 3.0, -0.0, -5.0]], [[-3.0, -4.0, -4.0, 
--1.0], [7.0, -0.0, -6.0, 6.0], [-4.0, 4.0, 2.0, -1.0]]], [[[7.0, -5.0, -0.0, 5.0], [5.0, -0.0, -5.0, 5.0], [4.0, -1.0, 6.0, 
-1.0]], [[7.0, 5.0, 3.0, -2.0], [2.0, -0.0, 7.0, 7.0], [-0.0, 6.0, 1.0, -5.0]]], [[[2.0, -6.0, -5.0, 5.0], [-2.0, -4.0, 6.0, 
-4.0], [5.0, -4.0, 6.0, -7.0]], [[-5.0, -4.0, -4.0, 2.0], [-7.0, -3.0, 1.0, 2.0], [1.0, -6.0, -6.0, 
--0.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 7.0, -0.0, 5.0], [-4.0, -5.0, 1.0, -5.0], [-5.0, -2.0, -7.0, -1.0]], [[-7.0, -0.0, 
-6.0, -6.0], [5.0, -0.0, -0.0, -5.0], [5.0, -7.0, 5.0, -1.0]]], [[[-0.0, 1.0, -5.0, -5.0], [-4.0, -1.0, -5.0, -2.0], [-0.0, 2.0, 
--3.0, -5.0]], [[5.0, -4.0, -2.0, 4.0], [-0.0, -0.0, 2.0, 6.0], [-7.0, -6.0, -0.0, -5.0]]], [[[3.0, -5.0, -0.0, 6.0], [-7.0, 
-2.0, 5.0, 4.0], [2.0, -7.0, 4.0, 2.0]], [[4.0, -1.0, -6.0, -0.0], [-1.0, -3.0, -7.0, -0.0], [3.0, 1.0, 2.0, 3.0]]]])
+      ref=msk_ref*numpy.array([[[8.0, -26.0], [55.0, -27.0], [50.0, 24.0], [-87.0, -97.0], [42.0, -4.0]], [[-20.0, -4.0], 
+[-38.0, 42.0], [22.0, -76.0], [-32.0, 92.0], [-54.0, -48.0]], [[7.0, 59.0], [6.0, -16.0], [82.0, 18.0], [-26.0, -38.0], [-28.0, 
+-8.0]], [[67.0, 17.0], [37.0, 81.0], [0.0, 4.0], [-30.0, -22.0], [71.0, -19.0]]])+(1.-msk_ref)*numpy.array([[[33.0, -5.0], 
+[16.0, 32.0], [-29.0, -39.0], [59.0, 59.0], [6.0, 10.0]], [[26.0, 66.0], [-82.0, -16.0], [56.0, -42.0], [-12.0, -22.0], [0.0, 
+-12.0]], [[67.0, -7.0], [31.0, 55.0], [76.0, 2.0], [7.0, 11.0], [-13.0, 63.0]], [[94.0, -38.0], [33.0, 3.0], [-20.0, -36.0], 
+[42.0, -20.0], [-4.0, 40.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_float_rank0_offset0(self):
-      arg0=numpy.array([4.0, -3.0])
-      arg1=3.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([12.0, -9.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank0_offset0(self):
-      arg0=numpy.array([3.0, 5.0])
-      arg1=numpy.array(4.0)
+   def test_generalTensorProduct_expandedData_rank2_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[1.0, -1.0, 6.0, 6.0, -7.0], [6.0, 1.0, 5.0, 2.0, -4.0], [0.0, -6.0, 2.0, -2.0, 0.0], [-5.0, 
+-7.0, 0.0, 0.0, -3.0]])+(1.-msk_arg0)*numpy.array([[-2.0, -5.0, 5.0, 0.0, 7.0], [0.0, 0.0, 6.0, 6.0, 4.0], [1.0, -6.0, -7.0, 
+-6.0, 6.0], [3.0, -4.0, 5.0, -3.0, 0.0]])
+      arg1=Data(numpy.array([[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 2.0], [0.0, 3.0, -3.0, 1.0, -7.0], [3.0, -2.0, 
+-7.0, -2.0, 0.0]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([12.0, 20.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 2.0], [0.0, 3.0, -3.0, 1.0, -7.0], [3.0, 
+-2.0, -7.0, -2.0, 0.0]], [[5.0, -5.0, 4.0, -6.0, 7.0], [5.0, -2.0, 0.0, -6.0, -2.0], [0.0, -3.0, 3.0, -1.0, 7.0], [-3.0, 2.0, 
+7.0, 2.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, -18.0, 6.0, -42.0], [18.0, 
+-12.0, -42.0, -12.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, -18.0, 6.0, -42.0], 
+[18.0, -12.0, -42.0, -12.0, 0.0]], [[35.0, -35.0, 28.0, -42.0, 49.0], [35.0, -14.0, 0.0, -42.0, -14.0], [0.0, -21.0, 21.0, 
+-7.0, 49.0], [-21.0, 14.0, 49.0, 14.0, 0.0]]], [[[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, 
+-18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]], [[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 2.0], [0.0, 3.0, 
+-3.0, 1.0, -7.0], [3.0, -2.0, -7.0, -2.0, 0.0]], [[-25.0, 25.0, -20.0, 30.0, -35.0], [-25.0, 10.0, 0.0, 30.0, 10.0], [0.0, 
+15.0, -15.0, 5.0, -35.0], [15.0, -10.0, -35.0, -10.0, 0.0]], [[-10.0, 10.0, -8.0, 12.0, -14.0], [-10.0, 4.0, 0.0, 12.0, 4.0], 
+[0.0, 6.0, -6.0, 2.0, -14.0], [6.0, -4.0, -14.0, -4.0, 0.0]], [[20.0, -20.0, 16.0, -24.0, 28.0], [20.0, -8.0, 0.0, -24.0, 
+-8.0], [0.0, -12.0, 12.0, -4.0, 28.0], [-12.0, 8.0, 28.0, 8.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[30.0, -30.0, 24.0, -36.0, 42.0], [30.0, -12.0, 0.0, -36.0, -12.0], 
+[0.0, -18.0, 18.0, -6.0, 42.0], [-18.0, 12.0, 42.0, 12.0, 0.0]], [[-10.0, 10.0, -8.0, 12.0, -14.0], [-10.0, 4.0, 0.0, 12.0, 
+4.0], [0.0, 6.0, -6.0, 2.0, -14.0], [6.0, -4.0, -14.0, -4.0, 0.0]], [[10.0, -10.0, 8.0, -12.0, 14.0], [10.0, -4.0, 0.0, -12.0, 
+-4.0], [0.0, -6.0, 6.0, -2.0, 14.0], [-6.0, 4.0, 14.0, 4.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[25.0, -25.0, 20.0, -30.0, 35.0], [25.0, -10.0, 0.0, -30.0, -10.0], [0.0, 
+-15.0, 15.0, -5.0, 35.0], [-15.0, 10.0, 35.0, 10.0, 0.0]], [[35.0, -35.0, 28.0, -42.0, 49.0], [35.0, -14.0, 0.0, -42.0, -14.0], 
+[0.0, -21.0, 21.0, -7.0, 49.0], [-21.0, 14.0, 49.0, 14.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[15.0, -15.0, 12.0, -18.0, 21.0], [15.0, -6.0, 0.0, -18.0, -6.0], [0.0, -9.0, 9.0, -3.0, 
+21.0], [-9.0, 6.0, 21.0, 6.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, -10.0, 8.0, -12.0, 14.0], [10.0, -4.0, 0.0, -12.0, 
+-4.0], [0.0, -6.0, 6.0, -2.0, 14.0], [-6.0, 4.0, 14.0, 4.0, 0.0]], [[25.0, -25.0, 20.0, -30.0, 35.0], [25.0, -10.0, 0.0, -30.0, 
+-10.0], [0.0, -15.0, 15.0, -5.0, 35.0], [-15.0, 10.0, 35.0, 10.0, 0.0]], [[-25.0, 25.0, -20.0, 30.0, -35.0], [-25.0, 10.0, 0.0, 
+30.0, 10.0], [0.0, 15.0, -15.0, 5.0, -35.0], [15.0, -10.0, -35.0, -10.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-35.0, 35.0, -28.0, 42.0, -49.0], [-35.0, 14.0, 0.0, 42.0, 
+14.0], [0.0, 21.0, -21.0, 7.0, -49.0], [21.0, -14.0, -49.0, -14.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, 
+-18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], 
+[0.0, 18.0, -18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]], [[-20.0, 20.0, -16.0, 24.0, -28.0], [-20.0, 8.0, 0.0, 24.0, 
+8.0], [0.0, 12.0, -12.0, 4.0, -28.0], [12.0, -8.0, -28.0, -8.0, 0.0]]], [[[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 
+2.0], [0.0, 3.0, -3.0, 1.0, -7.0], [3.0, -2.0, -7.0, -2.0, 0.0]], [[30.0, -30.0, 24.0, -36.0, 42.0], [30.0, -12.0, 0.0, -36.0, 
+-12.0], [0.0, -18.0, 18.0, -6.0, 42.0], [-18.0, 12.0, 42.0, 12.0, 0.0]], [[35.0, -35.0, 28.0, -42.0, 49.0], [35.0, -14.0, 0.0, 
+-42.0, -14.0], [0.0, -21.0, 21.0, -7.0, 49.0], [-21.0, 14.0, 49.0, 14.0, 0.0]], [[30.0, -30.0, 24.0, -36.0, 42.0], [30.0, 
+-12.0, 0.0, -36.0, -12.0], [0.0, -18.0, 18.0, -6.0, 42.0], [-18.0, 12.0, 42.0, 12.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], 
+[-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, -18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]]], [[[-15.0, 15.0, -12.0, 
+18.0, -21.0], [-15.0, 6.0, 0.0, 18.0, 6.0], [0.0, 9.0, -9.0, 3.0, -21.0], [9.0, -6.0, -21.0, -6.0, 0.0]], [[20.0, -20.0, 16.0, 
+-24.0, 28.0], [20.0, -8.0, 0.0, -24.0, -8.0], [0.0, -12.0, 12.0, -4.0, 28.0], [-12.0, 8.0, 28.0, 8.0, 0.0]], [[-25.0, 25.0, 
+-20.0, 30.0, -35.0], [-25.0, 10.0, 0.0, 30.0, 10.0], [0.0, 15.0, -15.0, 5.0, -35.0], [15.0, -10.0, -35.0, -10.0, 0.0]], [[15.0, 
+-15.0, 12.0, -18.0, 21.0], [15.0, -6.0, 0.0, -18.0, -6.0], [0.0, -9.0, 9.0, -3.0, 21.0], [-9.0, 6.0, 21.0, 6.0, 0.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank1_offset1(self):
-      arg0=numpy.array([[0.0, 3.0, -3.0], [3.0, 5.0, 0.0]])
-      arg1=numpy.array([3.0, 3.0, -1.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([12.0, 24.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank3_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[5.0, -1.0, 0.0], [0.0, -2.0, 5.0], [-1.0, -6.0, -5.0], [-1.0, -6.0, 3.0], [-1.0, -3.0, 
+1.0]], [[6.0, 0.0, 5.0], [3.0, 0.0, -7.0], [-1.0, 3.0, 4.0], [5.0, -6.0, -1.0], [-3.0, 5.0, -6.0]], [[1.0, -4.0, -3.0], [-3.0, 
+4.0, 1.0], [5.0, 5.0, 1.0], [-3.0, -6.0, -4.0], [-2.0, 0.0, 6.0]], [[2.0, -4.0, -1.0], [5.0, -4.0, 0.0], [5.0, -7.0, 3.0], 
+[1.0, 7.0, -1.0], [0.0, -7.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, 0.0, -6.0], [4.0, -2.0, -4.0], [4.0, 5.0, 4.0], [5.0, 
+-1.0, 0.0], [4.0, -2.0, -2.0]], [[6.0, 0.0, -1.0], [3.0, 3.0, 2.0], [7.0, 2.0, -5.0], [4.0, -2.0, 5.0], [0.0, 5.0, -6.0]], 
+[[-4.0, -1.0, -1.0], [7.0, -7.0, 7.0], [3.0, 0.0, 5.0], [-2.0, -6.0, 3.0], [7.0, 1.0, -7.0]], [[-7.0, 4.0, 2.0], [6.0, -2.0, 
+5.0], [5.0, -4.0, 0.0], [4.0, 0.0, -6.0], [5.0, 7.0, 5.0]]])
+      arg1=Data(numpy.array([[[-6.0, -7.0, 1.0, -5.0, -5.0], [0.0, -5.0, 2.0, -1.0, 6.0], [0.0, 0.0, -3.0, 1.0, -6.0], [0.0, 
+3.0, -4.0, 4.0, 0.0]], [[-1.0, 2.0, -2.0, -3.0, -3.0], [2.0, 4.0, 2.0, 6.0, -1.0], [3.0, -2.0, -1.0, 2.0, 6.0], [3.0, 4.0, 
+-6.0, 2.0, 2.0]], [[-5.0, -1.0, 3.0, 4.0, 6.0], [1.0, 4.0, 3.0, -1.0, -7.0], [-5.0, -3.0, 1.0, 1.0, 4.0], [-6.0, -3.0, -1.0, 
+-6.0, 0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-29.0, -37.0, 7.0, -22.0, -22.0], [-2.0, -29.0, 8.0, -11.0, 31.0], [-3.0, 2.0, -14.0, 3.0, 
+-36.0], [-3.0, 11.0, -14.0, 18.0, -2.0]], [[-23.0, -9.0, 19.0, 26.0, 36.0], [1.0, 12.0, 11.0, -17.0, -33.0], [-31.0, -11.0, 
+7.0, 1.0, 8.0], [-36.0, -23.0, 7.0, -34.0, -4.0]], [[37.0, 0.0, -4.0, 3.0, -7.0], [-17.0, -39.0, -29.0, -30.0, 35.0], [7.0, 
+27.0, 4.0, -18.0, -50.0], [12.0, -12.0, 45.0, 14.0, -12.0]], [[-3.0, -8.0, 20.0, 35.0, 41.0], [-9.0, -7.0, -5.0, -38.0, -21.0], 
+[-33.0, 3.0, 12.0, -10.0, -18.0], [-36.0, -36.0, 37.0, -34.0, -12.0]], [[4.0, 0.0, 8.0, 18.0, 20.0], [-5.0, -3.0, -5.0, -18.0, 
+-10.0], [-14.0, 3.0, 7.0, -6.0, -8.0], [-15.0, -18.0, 21.0, -16.0, -6.0]]], [[[-61.0, -47.0, 21.0, -10.0, 0.0], [5.0, -10.0, 
+27.0, -11.0, 1.0], [-25.0, -15.0, -13.0, 11.0, -16.0], [-30.0, 3.0, -29.0, -6.0, 0.0]], [[17.0, -14.0, -18.0, -43.0, -57.0], 
+[-7.0, -43.0, -15.0, 4.0, 67.0], [35.0, 21.0, -16.0, -4.0, -46.0], [42.0, 30.0, -5.0, 54.0, 0.0]], [[-17.0, 9.0, 5.0, 12.0, 
+20.0], [10.0, 33.0, 16.0, 15.0, -37.0], [-11.0, -18.0, 4.0, 9.0, 40.0], [-15.0, -3.0, -18.0, -22.0, 6.0]], [[-19.0, -46.0, 
+14.0, -11.0, -13.0], [-13.0, -53.0, -5.0, -40.0, 43.0], [-13.0, 15.0, -10.0, -8.0, -70.0], [-12.0, -6.0, 17.0, 14.0, -12.0]], 
+[[43.0, 37.0, -31.0, -24.0, -36.0], [4.0, 11.0, -14.0, 39.0, 19.0], [45.0, 8.0, -2.0, 1.0, 24.0], [51.0, 29.0, -12.0, 34.0, 
+10.0]]], [[[13.0, -12.0, 0.0, -5.0, -11.0], [-11.0, -33.0, -15.0, -22.0, 31.0], [3.0, 17.0, -2.0, -10.0, -42.0], [6.0, -4.0, 
+23.0, 14.0, -8.0]], [[9.0, 28.0, -8.0, 7.0, 9.0], [9.0, 35.0, 5.0, 26.0, -29.0], [7.0, -11.0, 6.0, 6.0, 46.0], [6.0, 4.0, 
+-13.0, -10.0, 8.0]], [[-40.0, -26.0, -2.0, -36.0, -34.0], [11.0, -1.0, 23.0, 24.0, 18.0], [10.0, -13.0, -19.0, 16.0, 4.0], 
+[9.0, 32.0, -51.0, 24.0, 10.0]], [[44.0, 13.0, -3.0, 17.0, 9.0], [-16.0, -25.0, -30.0, -29.0, 16.0], [2.0, 24.0, 11.0, -19.0, 
+-34.0], [6.0, -21.0, 52.0, 0.0, -12.0]], [[-18.0, 8.0, 16.0, 34.0, 46.0], [6.0, 34.0, 14.0, -4.0, -54.0], [-30.0, -18.0, 12.0, 
+4.0, 36.0], [-36.0, -24.0, 2.0, -44.0, 0.0]]], [[[-3.0, -21.0, 7.0, -2.0, -4.0], [-9.0, -30.0, -7.0, -25.0, 23.0], [-7.0, 11.0, 
+-3.0, -7.0, -40.0], [-6.0, -7.0, 17.0, 6.0, -8.0]], [[-26.0, -43.0, 13.0, -13.0, -13.0], [-8.0, -41.0, 2.0, -29.0, 34.0], 
+[-12.0, 8.0, -11.0, -3.0, -54.0], [-12.0, -1.0, 4.0, 12.0, -8.0]], [[-38.0, -52.0, 28.0, 8.0, 14.0], [-11.0, -41.0, 5.0, -50.0, 
+16.0], [-36.0, 5.0, -5.0, -6.0, -60.0], [-39.0, -22.0, 19.0, -12.0, -14.0]], [[-8.0, 8.0, -16.0, -30.0, -32.0], [13.0, 19.0, 
+13.0, 42.0, 6.0], [26.0, -11.0, -11.0, 14.0, 32.0], [27.0, 34.0, -45.0, 24.0, 14.0]], [[22.0, -11.0, 5.0, 9.0, 3.0], [-17.0, 
+-40.0, -23.0, -39.0, 28.0], [-6.0, 23.0, 4.0, -17.0, -54.0], [-3.0, -19.0, 45.0, 4.0, 
+-14.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -36.0, -12.0, -54.0, -66.0], [-6.0, -54.0, -6.0, 0.0, 78.0], [30.0, 18.0, -24.0, 
+0.0, -60.0], [36.0, 36.0, -18.0, 60.0, 0.0]], [[-2.0, -28.0, -4.0, -30.0, -38.0], [-8.0, -44.0, -8.0, -12.0, 54.0], [14.0, 
+16.0, -14.0, -4.0, -52.0], [18.0, 16.0, 0.0, 36.0, -4.0]], [[-49.0, -22.0, 6.0, -19.0, -11.0], [14.0, 16.0, 30.0, 22.0, -9.0], 
+[-5.0, -22.0, -13.0, 18.0, 22.0], [-9.0, 20.0, -50.0, 2.0, 10.0]], [[-29.0, -37.0, 7.0, -22.0, -22.0], [-2.0, -29.0, 8.0, 
+-11.0, 31.0], [-3.0, 2.0, -14.0, 3.0, -36.0], [-3.0, 11.0, -14.0, 18.0, -2.0]], [[-12.0, -30.0, 2.0, -22.0, -26.0], [-6.0, 
+-36.0, -2.0, -14.0, 40.0], [4.0, 10.0, -12.0, -2.0, -44.0], [6.0, 10.0, -2.0, 24.0, -4.0]]], [[[-31.0, -41.0, 3.0, -34.0, 
+-36.0], [-1.0, -34.0, 9.0, -5.0, 43.0], [5.0, 3.0, -19.0, 5.0, -40.0], [6.0, 21.0, -23.0, 30.0, 0.0]], [[-31.0, -17.0, 3.0, 
+-16.0, -12.0], [8.0, 5.0, 18.0, 13.0, 1.0], [-1.0, -12.0, -10.0, 11.0, 8.0], [-3.0, 15.0, -32.0, 6.0, 6.0]], [[-19.0, -40.0, 
+-12.0, -61.0, -71.0], [-1.0, -47.0, 3.0, 10.0, 75.0], [31.0, 11.0, -28.0, 6.0, -50.0], [36.0, 44.0, -35.0, 62.0, 4.0]], 
+[[-47.0, -37.0, 23.0, 6.0, 16.0], [1.0, -8.0, 19.0, -21.0, -9.0], [-31.0, -11.0, -5.0, 5.0, -16.0], [-36.0, -11.0, -9.0, -18.0, 
+-4.0]], [[25.0, 16.0, -28.0, -39.0, -51.0], [4.0, -4.0, -8.0, 36.0, 37.0], [45.0, 8.0, -11.0, 4.0, 6.0], [51.0, 38.0, -24.0, 
+46.0, 10.0]]], [[[30.0, 27.0, -5.0, 19.0, 17.0], [-3.0, 12.0, -13.0, -1.0, -16.0], [2.0, 5.0, 12.0, -7.0, 14.0], [3.0, -13.0, 
+23.0, -12.0, -2.0]], [[-70.0, -70.0, 42.0, 14.0, 28.0], [-7.0, -35.0, 21.0, -56.0, 0.0], [-56.0, -7.0, -7.0, 0.0, -56.0], 
+[-63.0, -28.0, 7.0, -28.0, -14.0]], [[-43.0, -26.0, 18.0, 5.0, 15.0], [5.0, 5.0, 21.0, -8.0, -17.0], [-25.0, -15.0, -4.0, 8.0, 
+2.0], [-30.0, -6.0, -17.0, -18.0, 0.0]], [[3.0, -1.0, 19.0, 40.0, 46.0], [-9.0, -2.0, -7.0, -37.0, -27.0], [-33.0, 3.0, 15.0, 
+-11.0, -12.0], [-36.0, -39.0, 41.0, -38.0, -12.0]], [[-8.0, -40.0, -16.0, -66.0, -80.0], [-5.0, -59.0, -5.0, 6.0, 90.0], [38.0, 
+19.0, -29.0, 2.0, -64.0], [45.0, 46.0, -27.0, 72.0, 2.0]]], [[[28.0, 55.0, -9.0, 31.0, 35.0], [10.0, 59.0, 0.0, 29.0, -60.0], 
+[2.0, -14.0, 19.0, 3.0, 74.0], [0.0, -11.0, 2.0, -32.0, 8.0]], [[-59.0, -51.0, 25.0, -4.0, 6.0], [1.0, -18.0, 23.0, -23.0, 
+3.0], [-31.0, -11.0, -11.0, 7.0, -28.0], [-36.0, -5.0, -17.0, -10.0, -4.0]], [[-26.0, -43.0, 13.0, -13.0, -13.0], [-8.0, -41.0, 
+2.0, -29.0, 34.0], [-12.0, 8.0, -11.0, -3.0, -54.0], [-12.0, -1.0, 4.0, 12.0, -8.0]], [[6.0, -22.0, -14.0, -44.0, -56.0], 
+[-6.0, -44.0, -10.0, 2.0, 66.0], [30.0, 18.0, -18.0, -2.0, -48.0], [36.0, 30.0, -10.0, 52.0, 0.0]], [[-62.0, -26.0, 6.0, -26.0, 
+-16.0], [19.0, 23.0, 39.0, 32.0, -12.0], [-4.0, -29.0, -17.0, 24.0, 32.0], [-9.0, 28.0, -67.0, 4.0, 14.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank2_offset2(self):
-      arg0=numpy.array([[[-3.0, -7.0, 5.0], [2.0, -2.0, 0.0]], [[-1.0, 0.0, 0.0], [-6.0, -5.0, -1.0]]])
-      arg1=numpy.array([[-3.0, -4.0, 0.0], [-1.0, -7.0, -5.0]])
+   def test_generalTensorProduct_expandedData_rank4_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -1.0, 5.0], [-5.0, 0.0, 5.0]], [[4.0, 6.0, 0.0], [0.0, -5.0, -2.0]], [[-1.0, -4.0, 
+1.0], [6.0, 0.0, 0.0]], [[-6.0, 6.0, 7.0], [7.0, 7.0, 2.0]], [[7.0, 1.0, 7.0], [5.0, -6.0, 2.0]]], [[[-3.0, 2.0, 4.0], [-5.0, 
+5.0, 0.0]], [[0.0, 3.0, 1.0], [7.0, 7.0, 6.0]], [[-3.0, -1.0, 3.0], [2.0, 6.0, -7.0]], [[3.0, 2.0, 1.0], [4.0, 7.0, -2.0]], 
+[[-2.0, -6.0, -7.0], [0.0, -6.0, -7.0]]], [[[-1.0, -5.0, -5.0], [-4.0, 7.0, 0.0]], [[3.0, -4.0, 1.0], [1.0, -1.0, -7.0]], 
+[[3.0, 6.0, 5.0], [5.0, 4.0, 0.0]], [[0.0, 1.0, 2.0], [3.0, 4.0, -4.0]], [[-6.0, -6.0, 5.0], [-7.0, 0.0, 7.0]]], [[[-2.0, 0.0, 
+7.0], [0.0, -7.0, -2.0]], [[-1.0, 0.0, -2.0], [-1.0, 4.0, 1.0]], [[-5.0, -7.0, -1.0], [-7.0, -3.0, -1.0]], [[-6.0, 0.0, -4.0], 
+[-5.0, 0.0, -7.0]], [[4.0, 3.0, 1.0], [-2.0, 0.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, 7.0, 2.0], [5.0, -5.0, 1.0]], 
+[[2.0, 4.0, 1.0], [-6.0, -6.0, -7.0]], [[0.0, -5.0, 5.0], [-7.0, -5.0, 0.0]], [[4.0, 2.0, -5.0], [5.0, 2.0, 0.0]], [[-6.0, 
+-4.0, -4.0], [6.0, 3.0, 1.0]]], [[[-4.0, -1.0, -4.0], [-5.0, 1.0, 1.0]], [[-1.0, -1.0, 1.0], [0.0, -1.0, 4.0]], [[-6.0, 4.0, 
+5.0], [-4.0, 1.0, 1.0]], [[-7.0, -1.0, -3.0], [0.0, 0.0, 1.0]], [[4.0, 1.0, 0.0], [6.0, 0.0, -4.0]]], [[[-4.0, -2.0, -6.0], 
+[-3.0, 6.0, -3.0]], [[2.0, -2.0, -4.0], [-1.0, -5.0, 4.0]], [[3.0, 0.0, -3.0], [7.0, 7.0, -3.0]], [[-1.0, 1.0, -5.0], [4.0, 
+-6.0, 6.0]], [[-7.0, 7.0, 1.0], [4.0, -3.0, -6.0]]], [[[3.0, -4.0, -7.0], [5.0, 6.0, -2.0]], [[-6.0, 0.0, -1.0], [-2.0, -2.0, 
+-3.0]], [[6.0, 7.0, 7.0], [0.0, 0.0, -7.0]], [[2.0, 3.0, -6.0], [-6.0, 7.0, 3.0]], [[2.0, 0.0, -3.0], [5.0, -5.0, 6.0]]]])
+      arg1=Data(numpy.array([[[[-4.0, -3.0, -1.0, -6.0, -3.0], [2.0, 4.0, 5.0, -3.0, -5.0], [0.0, -5.0, 3.0, -1.0, 6.0], [1.0, 
+-2.0, 7.0, -5.0, -3.0]], [[7.0, -3.0, -1.0, 0.0, -6.0], [-2.0, -1.0, 6.0, -6.0, -7.0], [5.0, -1.0, 0.0, -2.0, -3.0], [-7.0, 
+0.0, -5.0, 2.0, 7.0]], [[3.0, 0.0, 0.0, 2.0, 2.0], [6.0, 3.0, 2.0, 5.0, 0.0], [7.0, -3.0, 4.0, 1.0, 5.0], [4.0, 7.0, 6.0, -3.0, 
+6.0]]], [[[-3.0, -4.0, 0.0, 0.0, -1.0], [1.0, 1.0, -1.0, -1.0, -6.0], [0.0, 0.0, 7.0, 7.0, 4.0], [-5.0, -6.0, 3.0, -7.0, 
+-4.0]], [[-4.0, 5.0, 6.0, 7.0, 3.0], [6.0, 0.0, 4.0, -2.0, -2.0], [0.0, 4.0, -4.0, -7.0, 2.0], [-2.0, 6.0, -5.0, -5.0, -6.0]], 
+[[5.0, 4.0, -6.0, 4.0, -7.0], [-6.0, -3.0, -5.0, 3.0, 4.0], [-7.0, 2.0, -4.0, -6.0, 4.0], [-7.0, -1.0, 5.0, -6.0, 
+-5.0]]]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([49.0, 49.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank3_offset3(self):
-      arg0=numpy.array([[[[4.0, -5.0, 6.0], [7.0, 5.0, 0.0], [0.0, -5.0, -3.0], [-3.0, -2.0, -2.0]], [[4.0, 1.0, -4.0], [-1.0, 
--1.0, 0.0], [1.0, 0.0, 6.0], [-5.0, 2.0, -6.0]]], [[[1.0, 2.0, 6.0], [2.0, 7.0, -6.0], [7.0, -6.0, 0.0], [-3.0, 0.0, -6.0]], 
-[[2.0, 1.0, 3.0], [4.0, -4.0, 7.0], [5.0, 0.0, -4.0], [1.0, 0.0, 4.0]]]])
-      arg1=numpy.array([[[-1.0, 7.0, 2.0], [-3.0, -4.0, -6.0], [7.0, -5.0, -5.0], [0.0, -1.0, -4.0]], [[6.0, -3.0, -5.0], 
-[-2.0, 2.0, -1.0], [4.0, -1.0, -7.0], [-4.0, 5.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([33.0, 133.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[24.0, 25.0, -35.0, -6.0, -32.0], [9.0, 20.0, 14.0, 33.0, 27.0], [-5.0, -34.0, -17.0, -64.0, 
+64.0], [23.0, 48.0, 87.0, -42.0, 0.0]], [[36.0, -63.0, -28.0, -67.0, -49.0], [-22.0, 16.0, 46.0, -44.0, -60.0], [44.0, -50.0, 
+40.0, 31.0, -12.0], [-14.0, -36.0, 13.0, 29.0, 70.0]], [[-39.0, -9.0, 5.0, 8.0, 23.0], [18.0, 9.0, -33.0, 26.0, -3.0], [-13.0, 
+6.0, 43.0, 52.0, 35.0], [1.0, -27.0, 37.0, -48.0, -43.0]], [[48.0, 15.0, 30.0, 107.0, -4.0], [55.0, -8.0, 31.0, 2.0, -60.0], 
+[65.0, 35.0, 23.0, -11.0, 31.0], [-83.0, 59.0, -34.0, -75.0, 22.0]], [[19.0, -66.0, -56.0, -62.0, -50.0], [11.0, 47.0, 16.0, 
+21.0, -52.0], [40.0, -77.0, 100.0, 63.0, 90.0], [1.0, -33.0, 141.0, -71.0, 34.0]]], [[[33.0, 48.0, 31.0, 61.0, 25.0], [39.0, 
+-7.0, 30.0, 12.0, 21.0], [38.0, 21.0, -48.0, -67.0, -14.0], [14.0, 94.0, -47.0, 17.0, 37.0]], [[5.0, 22.0, 3.0, 75.0, -44.0], 
+[13.0, -11.0, 11.0, -16.0, -53.0], [-20.0, 34.0, 1.0, -41.0, 62.0], [-108.0, 1.0, 7.0, -117.0, -73.0]], [[-51.0, 6.0, 82.0, 
+38.0, 86.0], [94.0, 21.0, 42.0, -5.0, -30.0], [65.0, 17.0, 21.0, 22.0, -8.0], [43.0, 58.0, -57.0, 2.0, 11.0]], [[-45.0, -4.0, 
+49.0, 25.0, 12.0], [66.0, 23.0, 63.0, -40.0, -75.0], [31.0, 4.0, 21.0, -15.0, 39.0], [-27.0, 21.0, -16.0, -65.0, -37.0]], 
+[[-66.0, -34.0, 14.0, -72.0, 59.0], [-28.0, -2.0, -49.0, -2.0, 36.0], [-30.0, -1.0, 18.0, 91.0, -69.0], [73.0, -74.0, -31.0, 
+91.0, -7.0]]], [[[-62.0, 69.0, 48.0, 45.0, 48.0], [16.0, -18.0, -13.0, -2.0, 50.0], [-60.0, 53.0, -79.0, -71.0, -18.0], [20.0, 
+33.0, -59.0, 3.0, -88.0]], [[-71.0, -34.0, 37.0, -51.0, 62.0], [57.0, 41.0, 23.0, 0.0, -19.0], [36.0, -32.0, 52.0, 62.0, 9.0], 
+[81.0, -4.0, 20.0, 14.0, 6.0]], [[14.0, -27.0, 15.0, 20.0, -28.0], [53.0, 26.0, 72.0, -33.0, -95.0], [65.0, -20.0, 48.0, -3.0, 
+53.0], [-52.0, 23.0, 16.0, -73.0, 19.0]], [[-32.0, -11.0, 47.0, 16.0, 35.0], [61.0, 20.0, 43.0, -19.0, -49.0], [47.0, 1.0, 
+29.0, 17.0, 11.0], [6.0, 24.0, -24.0, -21.0, 3.0]], [[53.0, 92.0, -30.0, 74.0, 22.0], [-19.0, -31.0, -84.0, 107.0, 142.0], 
+[-44.0, 35.0, -75.0, -68.0, 7.0], [42.0, 82.0, 32.0, 10.0, -1.0]]], [[[47.0, -37.0, -28.0, -31.0, 13.0], [8.0, 19.0, -14.0, 
+49.0, 16.0], [63.0, -43.0, 58.0, 70.0, 1.0], [54.0, 13.0, 53.0, 36.0, 100.0]], [[-10.0, 31.0, 19.0, 34.0, 5.0], [3.0, -14.0, 
+3.0, -11.0, 7.0], [-21.0, 29.0, -38.0, -42.0, -8.0], [-19.0, 17.0, -37.0, -8.0, -34.0]], [[-4.0, 45.0, 0.0, 3.0, 60.0], [-21.0, 
+-20.0, -69.0, 62.0, 118.0], [-35.0, 21.0, -52.0, -4.0, -52.0], [88.0, 28.0, -17.0, 84.0, 11.0]], [[-8.0, 10.0, 48.0, 0.0, 
+64.0], [1.0, -20.0, 2.0, -18.0, 32.0], [21.0, 28.0, -41.0, 9.0, -104.0], [52.0, 21.0, -116.0, 119.0, 49.0]], [[-21.0, -41.0, 
+35.0, -50.0, 23.0], [48.0, 35.0, 77.0, -44.0, -57.0], [71.0, -40.0, 30.0, 19.0, -16.0], [46.0, 18.0, -22.0, 39.0, 
+58.0]]]])+(1.-msk_ref)*numpy.array([[[[37.0, -83.0, -50.0, -69.0, -86.0], [-19.0, 29.0, 51.0, -45.0, -100.0], [42.0, -66.0, 
+80.0, 45.0, 45.0], [-56.0, -61.0, 71.0, -43.0, 45.0]], [[30.0, -52.0, 0.0, -80.0, 9.0], [2.0, 22.0, 53.0, -28.0, -18.0], [76.0, 
+-55.0, 20.0, 33.0, -59.0], [69.0, 10.0, -23.0, 109.0, 123.0]], [[21.0, 18.0, -25.0, -25.0, 32.0], [3.0, 13.0, -33.0, 72.0, 
+87.0], [10.0, -30.0, -9.0, 1.0, 2.0], [100.0, 47.0, 59.0, 49.0, 53.0]], [[-40.0, -28.0, 6.0, -20.0, -33.0], [-9.0, 4.0, 25.0, 
+-58.0, -68.0], [-25.0, 1.0, 19.0, 8.0, 17.0], [-59.0, -61.0, -7.0, -46.0, -60.0]], [[-41.0, 25.0, 22.0, 53.0, 30.0], [-10.0, 
+-29.0, -61.0, 13.0, 20.0], [-55.0, 60.0, -8.0, 25.0, -10.0], [-37.0, -35.0, -38.0, -29.0, -81.0]]], [[[13.0, 44.0, 5.0, 27.0, 
+11.0], [-35.0, -35.0, -30.0, 4.0, 59.0], [-40.0, 39.0, -71.0, -46.0, -55.0], [3.0, 15.0, -62.0, 54.0, -10.0]], [[24.0, 17.0, 
+-28.0, 17.0, -20.0], [-24.0, -12.0, -33.0, 28.0, 30.0], [-26.0, 7.0, -11.0, -13.0, 16.0], [-16.0, -1.0, 29.0, -19.0, -12.0]], 
+[[80.0, 31.0, 2.0, 57.0, 4.0], [6.0, -20.0, 7.0, 24.0, 28.0], [48.0, 17.0, -34.0, -38.0, -33.0], [-3.0, 76.0, -44.0, 40.0, 
+81.0]], [[17.0, 28.0, 2.0, 40.0, 14.0], [-36.0, -39.0, -52.0, 15.0, 46.0], [-33.0, 47.0, -37.0, 0.0, -50.0], [-19.0, -8.0, 
+-57.0, 36.0, -9.0]], [[-47.0, -55.0, 19.0, -40.0, 4.0], [36.0, 33.0, 40.0, -36.0, -79.0], [33.0, -29.0, 70.0, 60.0, 29.0], 
+[-5.0, -40.0, 21.0, -36.0, -9.0]]], [[[-46.0, 48.0, 60.0, 42.0, 54.0], [11.0, -26.0, -2.0, -24.0, 28.0], [-31.0, 58.0, -69.0, 
+-43.0, -60.0], [10.0, 23.0, -108.0, 43.0, -47.0]], [[9.0, -5.0, -54.0, -39.0, -44.0], [-71.0, -15.0, -49.0, 9.0, 36.0], [-66.0, 
+-8.0, -13.0, 2.0, 0.0], [-13.0, -60.0, 42.0, 6.0, -30.0]], [[-85.0, -14.0, 57.0, 13.0, 20.0], [55.0, 19.0, 45.0, -54.0, -83.0], 
+[0.0, 16.0, 30.0, 12.0, 33.0], [-37.0, -24.0, -26.0, -72.0, -82.0]], [[38.0, -22.0, -72.0, -22.0, -77.0], [-102.0, -34.0, 
+-67.0, -2.0, 10.0], [-72.0, 7.0, 5.0, 28.0, -6.0], [-78.0, -99.0, 30.0, -12.0, -30.0]], [[50.0, -55.0, 18.0, -1.0, 10.0], [0.0, 
+-10.0, 23.0, -32.0, -56.0], [84.0, 1.0, 47.0, 79.0, -72.0], [-24.0, -15.0, -81.0, 69.0, 108.0]]], [[[-110.0, 5.0, 49.0, 2.0, 
+28.0], [25.0, 6.0, 6.0, -43.0, -37.0], [-55.0, 30.0, 0.0, 3.0, 19.0], [-20.0, -47.0, -26.0, -55.0, -125.0]], [[20.0, 4.0, 12.0, 
+8.0, 33.0], [-14.0, -20.0, -23.0, 10.0, 34.0], [14.0, 19.0, -16.0, 23.0, -65.0], [25.0, 8.0, -59.0, 75.0, 47.0]], [[11.0, 
+-67.0, 29.0, -50.0, 3.0], [82.0, 59.0, 121.0, -46.0, -107.0], [133.0, -72.0, 74.0, 29.0, 22.0], [34.0, 44.0, 14.0, 5.0, 
+108.0]], [[0.0, 56.0, 19.0, 37.0, -30.0], [-20.0, -28.0, 35.0, -53.0, 3.0], [-48.0, 39.0, -100.0, -123.0, -25.0], [-48.0, 29.0, 
+-75.0, 3.0, -54.0]], [[18.0, -27.0, -68.0, -29.0, -74.0], [-75.0, -14.0, -51.0, 2.0, -6.0], [-63.0, -9.0, 25.0, 29.0, 31.0], 
+[-67.0, -91.0, 66.0, -47.0, -44.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank1_offset0(self):
-      arg0=numpy.array([-2.0, 0.0])
-      arg1=numpy.array([-2.0, -1.0])
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-4.0, -7.0, 2.0, 6.0, -6.0], [-3.0, 4.0, -6.0, -2.0, -3.0], [-2.0, 0.0, 0.0, -5.0, 6.0], 
+[2.0, -3.0, 3.0, -3.0, 6.0]])+(1.-msk_arg0)*numpy.array([[0.0, -3.0, -7.0, -6.0, -2.0], [-7.0, 0.0, 6.0, 2.0, -4.0], [0.0, 
+-1.0, 5.0, 7.0, 2.0], [7.0, 5.0, 2.0, -6.0, -3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-7.0)+(1-msk_arg1)*(-6.0)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[4.0, 2.0], [0.0, 0.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[28.0, 49.0, -14.0, -42.0, 42.0], [21.0, -28.0, 42.0, 14.0, 21.0], [14.0, -0.0, -0.0, 35.0, 
+-42.0], [-14.0, 21.0, -21.0, 21.0, -42.0]])+(1.-msk_ref)*numpy.array([[-0.0, 18.0, 42.0, 36.0, 12.0], [42.0, -0.0, -36.0, 
+-12.0, 24.0], [-0.0, 6.0, -30.0, -42.0, -12.0], [-42.0, -30.0, -12.0, 36.0, 18.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank2_offset1(self):
-      arg0=numpy.array([[-3.0, 4.0, 6.0], [-1.0, 2.0, -1.0]])
-      arg1=numpy.array([[-4.0, -1.0], [-6.0, -7.0], [7.0, -7.0]])
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, 0.0, -4.0], [4.0, 3.0, -7.0], [4.0, 0.0, -2.0], [-7.0, 4.0, 5.0], [-7.0, -1.0, -3.0]], 
+[[0.0, 4.0, 2.0], [-7.0, 4.0, 2.0], [0.0, -5.0, 0.0], [0.0, 6.0, -5.0], [5.0, -4.0, -5.0]], [[-5.0, 1.0, -3.0], [-6.0, 3.0, 
+2.0], [0.0, -2.0, -7.0], [-2.0, -5.0, -6.0], [-2.0, -5.0, -1.0]], [[-3.0, -1.0, 4.0], [0.0, 6.0, -5.0], [-3.0, -6.0, 5.0], 
+[3.0, -5.0, -4.0], [-2.0, 4.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 0.0, 7.0], [-7.0, 1.0, 0.0], [7.0, -7.0, 4.0], [0.0, 
+0.0, 2.0], [-4.0, 4.0, -7.0]], [[3.0, 2.0, 4.0], [0.0, -3.0, -4.0], [-6.0, -7.0, -4.0], [6.0, -4.0, -3.0], [6.0, -2.0, 0.0]], 
+[[-5.0, 5.0, 7.0], [3.0, 5.0, 0.0], [3.0, -7.0, 3.0], [6.0, 2.0, -3.0], [0.0, -3.0, 1.0]], [[-1.0, -1.0, 6.0], [4.0, 7.0, 6.0], 
+[3.0, -7.0, 4.0], [2.0, 7.0, 0.0], [7.0, 3.0, -3.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, 4.0, -3.0])+(1.-msk_arg1)*numpy.array([-2.0, 7.0, 2.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[30.0, -67.0], [-15.0, -6.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[28.0, 49.0, 22.0, -27.0, -23.0], [10.0, -18.0, -20.0, 39.0, 19.0], [-7.0, -18.0, 13.0, -10.0, 
+-25.0], [-28.0, 39.0, -51.0, 4.0, 23.0]])+(1.-msk_ref)*numpy.array([[22.0, 21.0, -55.0, 4.0, 22.0], [16.0, -29.0, -45.0, -46.0, 
+-26.0], [59.0, 29.0, -49.0, -4.0, -19.0], [7.0, 53.0, -47.0, 45.0, 1.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank3_offset2(self):
-      arg0=numpy.array([[[-4.0, 7.0, 7.0], [-7.0, -7.0, -5.0]], [[-6.0, 0.0, -3.0], [-3.0, 4.0, 4.0]]])
-      arg1=numpy.array([[[-2.0, 7.0], [2.0, -6.0], [-1.0, 7.0]], [[3.0, 6.0], [7.0, 0.0], [5.0, 0.0]]])
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-4.0, 2.0, -6.0], [2.0, -4.0, -6.0]], [[2.0, -3.0, 1.0], [3.0, 1.0, -3.0]], [[0.0, 0.0, 
+4.0], [0.0, 5.0, 0.0]], [[0.0, 0.0, 7.0], [5.0, -4.0, 5.0]], [[-4.0, -5.0, -2.0], [4.0, -4.0, -1.0]]], [[[-1.0, -4.0, 0.0], 
+[5.0, 0.0, -2.0]], [[3.0, 4.0, 2.0], [-7.0, 3.0, -2.0]], [[-2.0, 0.0, -4.0], [6.0, 3.0, -7.0]], [[0.0, 7.0, -1.0], [0.0, 2.0, 
+2.0]], [[-5.0, 5.0, 6.0], [6.0, -4.0, 2.0]]], [[[-2.0, 4.0, -5.0], [2.0, 4.0, 4.0]], [[5.0, 3.0, 4.0], [-6.0, -7.0, -7.0]], 
+[[-7.0, -1.0, 4.0], [0.0, -2.0, -3.0]], [[-2.0, -7.0, -3.0], [0.0, -2.0, -1.0]], [[6.0, 6.0, -5.0], [3.0, -7.0, -1.0]]], 
+[[[-2.0, 4.0, -6.0], [6.0, 6.0, 2.0]], [[7.0, 2.0, 6.0], [2.0, 5.0, -4.0]], [[0.0, 5.0, 0.0], [6.0, 4.0, 7.0]], [[2.0, -4.0, 
+-2.0], [5.0, 2.0, -4.0]], [[5.0, 0.0, -5.0], [-3.0, 2.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, -5.0, -5.0], [0.0, 3.0, 
+-2.0]], [[1.0, -2.0, -1.0], [-6.0, 7.0, 2.0]], [[7.0, -3.0, 1.0], [7.0, -6.0, 1.0]], [[4.0, 4.0, -5.0], [-7.0, -7.0, -1.0]], 
+[[0.0, -5.0, 2.0], [7.0, 1.0, 0.0]]], [[[4.0, -6.0, 2.0], [-4.0, -5.0, -7.0]], [[2.0, 1.0, 2.0], [-5.0, 6.0, -1.0]], [[-2.0, 
+1.0, 0.0], [-4.0, -5.0, -6.0]], [[7.0, 3.0, -6.0], [2.0, 0.0, -6.0]], [[4.0, 2.0, -4.0], [-1.0, 3.0, -2.0]]], [[[7.0, 0.0, 
+7.0], [4.0, 2.0, 1.0]], [[-6.0, 3.0, -3.0], [-7.0, -2.0, 0.0]], [[-5.0, -3.0, 1.0], [-2.0, -3.0, 1.0]], [[6.0, -5.0, 6.0], 
+[0.0, 4.0, -2.0]], [[-3.0, 1.0, -4.0], [0.0, 6.0, -6.0]]], [[[-1.0, -2.0, -4.0], [-7.0, -7.0, -7.0]], [[-6.0, -2.0, 5.0], [0.0, 
+-3.0, -3.0]], [[0.0, 6.0, 7.0], [2.0, -5.0, 7.0]], [[1.0, 6.0, 4.0], [-4.0, -6.0, -1.0]], [[-1.0, 7.0, 0.0], [6.0, -7.0, 
+-3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-3.0, 3.0, 0.0], [-4.0, -2.0, 5.0]])+(1.-msk_arg1)*numpy.array([[0.0, -1.0, -7.0], [-7.0, 
+7.0, 7.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[-80.0, -63.0], [54.0, -81.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-12.0, -44.0, -10.0, 13.0, -16.0], [-39.0, 15.0, -59.0, 27.0, 24.0], [22.0, -3.0, 7.0, -16.0, 
+-3.0], [-8.0, -53.0, 18.0, -62.0, -7.0]])+(1.-msk_ref)*numpy.array([[47.0, 114.0, -88.0, 24.0, -51.0], [-64.0, 55.0, -50.0, 
+-17.0, 40.0], [-56.0, 53.0, -4.0, -23.0, 27.0], [-19.0, -75.0, -55.0, -55.0, -119.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank4_offset3(self):
-      arg0=numpy.array([[[[-6.0, -2.0, -4.0], [1.0, -5.0, -2.0], [0.0, -3.0, -2.0], [0.0, -5.0, 5.0]], [[-3.0, 0.0, 7.0], 
-[-4.0, 4.0, -7.0], [-1.0, 0.0, 5.0], [0.0, -1.0, 6.0]]], [[[-4.0, 4.0, 4.0], [-4.0, -7.0, 5.0], [3.0, 4.0, 5.0], [0.0, -3.0, 
-0.0]], [[-7.0, -6.0, -5.0], [-5.0, -6.0, 0.0], [-7.0, -6.0, -7.0], [-4.0, -6.0, -1.0]]]])
-      arg1=numpy.array([[[[-7.0, 0.0], [3.0, -4.0], [7.0, 5.0]], [[7.0, -1.0], [7.0, -4.0], [-7.0, 4.0]], [[-6.0, 1.0], [1.0, 
-7.0], [1.0, -4.0]], [[-7.0, 3.0], [1.0, -7.0], [7.0, -1.0]]], [[[7.0, -4.0], [-1.0, 3.0], [-6.0, 6.0]], [[-7.0, -2.0], [-5.0, 
-0.0], [-4.0, 6.0]], [[4.0, 0.0], [-1.0, -1.0], [5.0, 0.0]], [[0.0, -4.0], [0.0, 3.0], [1.0, -6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([[19.0, -3.0], [-62.0, 88.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, 6.0, 7.0, 7.0, 1.0], [1.0, -7.0, -3.0, 6.0, 0.0], [-5.0, -6.0, 1.0, -3.0, -7.0], [4.0, 
+3.0, 1.0, 0.0, -1.0]])+(1.-msk_arg0)*numpy.array([[1.0, -2.0, 4.0, 6.0, 7.0], [0.0, -5.0, 4.0, -7.0, 0.0], [-2.0, -1.0, 4.0, 
+-3.0, -6.0], [3.0, 1.0, 3.0, 4.0, 4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, -7.0])+(1.-msk_arg1)*numpy.array([3.0, -7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-24.0, 42.0], [24.0, -42.0], [28.0, -49.0], [28.0, -49.0], [4.0, -7.0]], [[4.0, -7.0], [-28.0, 
+49.0], [-12.0, 21.0], [24.0, -42.0], [0.0, 0.0]], [[-20.0, 35.0], [-24.0, 42.0], [4.0, -7.0], [-12.0, 21.0], [-28.0, 49.0]], 
+[[16.0, -28.0], [12.0, -21.0], [4.0, -7.0], [0.0, 0.0], [-4.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[3.0, -7.0], [-6.0, 14.0], 
+[12.0, -28.0], [18.0, -42.0], [21.0, -49.0]], [[0.0, 0.0], [-15.0, 35.0], [12.0, -28.0], [-21.0, 49.0], [0.0, 0.0]], [[-6.0, 
+14.0], [-3.0, 7.0], [12.0, -28.0], [-9.0, 21.0], [-18.0, 42.0]], [[9.0, -21.0], [3.0, -7.0], [9.0, -21.0], [12.0, -28.0], 
+[12.0, -28.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank2_offset0(self):
-      arg0=numpy.array([0.0, -5.0])
-      arg1=numpy.array([[-4.0, 0.0, -6.0, -3.0, 0.0], [1.0, 5.0, -4.0, 6.0, 0.0], [7.0, -6.0, 0.0, -4.0, 5.0], [-6.0, 2.0, 
--6.0, 0.0, -6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]], [[20.0, 0.0, 30.0, 15.0, 0.0], [-5.0, -25.0, 20.0, -30.0, 0.0], [-35.0, 30.0, 0.0, 20.0, -25.0], [30.0, -10.0, 30.0, 
-0.0, 30.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank3_offset1(self):
-      arg0=numpy.array([[-6.0, 3.0, -1.0], [2.0, -2.0, -4.0]])
-      arg1=numpy.array([[[7.0, 2.0, -5.0, -1.0, -4.0], [-5.0, 7.0, -1.0, -2.0, -7.0], [4.0, 3.0, -2.0, -6.0, -4.0], [0.0, 0.0, 
--4.0, -3.0, 7.0]], [[4.0, 0.0, 0.0, -2.0, 0.0], [6.0, 7.0, 7.0, 0.0, 7.0], [0.0, 0.0, 2.0, 5.0, 0.0], [-7.0, 0.0, 3.0, -3.0, 
-0.0]], [[-2.0, -7.0, -4.0, 4.0, -5.0], [-3.0, -5.0, -4.0, -5.0, -3.0], [4.0, -5.0, -1.0, 0.0, 7.0], [1.0, 4.0, -5.0, 6.0, 
--5.0]]])
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, 0.0, -1.0], [-2.0, -4.0, 5.0], [1.0, 6.0, 6.0], [-7.0, -6.0, 0.0], [-6.0, 7.0, 3.0]], 
+[[3.0, -2.0, 5.0], [-1.0, 2.0, -5.0], [7.0, 0.0, 5.0], [-1.0, 2.0, 4.0], [-2.0, 3.0, -1.0]], [[-6.0, 6.0, 3.0], [-2.0, 6.0, 
+-7.0], [-5.0, 3.0, -4.0], [-3.0, 0.0, -6.0], [3.0, 4.0, 2.0]], [[-4.0, 3.0, 6.0], [-7.0, -6.0, -3.0], [5.0, 5.0, 0.0], [7.0, 
+5.0, 3.0], [0.0, 3.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 5.0, -3.0], [-1.0, -3.0, 6.0], [5.0, -3.0, 7.0], [7.0, 2.0, 
+3.0], [7.0, -1.0, 3.0]], [[-5.0, -4.0, 4.0], [3.0, 6.0, -4.0], [-2.0, 0.0, 0.0], [7.0, 1.0, 2.0], [-5.0, 5.0, 5.0]], [[1.0, 
+6.0, 2.0], [3.0, 3.0, -5.0], [4.0, -2.0, -3.0], [-3.0, 0.0, 5.0], [1.0, 5.0, -2.0]], [[7.0, 6.0, 3.0], [-1.0, -1.0, 2.0], [2.0, 
+5.0, 4.0], [-6.0, 0.0, 0.0], [-5.0, 2.0, 6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-3.0, -3.0], [6.0, 3.0], [-7.0, -1.0]])+(1.-msk_arg1)*numpy.array([[0.0, 2.0], [4.0, 3.0], 
+[-7.0, 6.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-28.0, -5.0, 34.0, -4.0, 29.0], [51.0, -16.0, 31.0, 17.0, 66.0], [-28.0, -13.0, 19.0, 51.0, 17.0], 
-[-22.0, -4.0, 38.0, 3.0, -37.0]], [[14.0, 32.0, 6.0, -14.0, 12.0], [-10.0, 20.0, 0.0, 16.0, -16.0], [-8.0, 26.0, -4.0, -22.0, 
--36.0], [10.0, -16.0, 6.0, -24.0, 34.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[4.0, -2.0], [-53.0, -11.0], [-9.0, 9.0], [-15.0, 3.0], [39.0, 36.0]], [[-56.0, -20.0], [50.0, 
+14.0], [-56.0, -26.0], [-13.0, 5.0], [31.0, 16.0]], [[33.0, 33.0], [91.0, 31.0], [61.0, 28.0], [51.0, 15.0], [1.0, 1.0]], 
+[[-12.0, 15.0], [6.0, 6.0], [15.0, 0.0], [-12.0, -9.0], [53.0, 14.0]]])+(1.-msk_ref)*numpy.array([[[41.0, -1.0], [-54.0, 25.0], 
+[-61.0, 43.0], [-13.0, 38.0], [-25.0, 29.0]], [[-44.0, 2.0], [52.0, 0.0], [0.0, -4.0], [-10.0, 29.0], [-15.0, 35.0]], [[10.0, 
+32.0], [47.0, -15.0], [13.0, -16.0], [-35.0, 24.0], [34.0, 5.0]], [[3.0, 50.0], [-18.0, 7.0], [-8.0, 43.0], [0.0, -12.0], 
+[-34.0, 32.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank4_offset2(self):
-      arg0=numpy.array([[[-3.0, 7.0, 0.0], [7.0, 0.0, -7.0]], [[7.0, 4.0, -2.0], [-1.0, 6.0, 1.0]]])
-      arg1=numpy.array([[[[0.0, -6.0, 1.0, -1.0, -6.0], [1.0, 5.0, -2.0, -5.0, -7.0], [6.0, -4.0, 0.0, -7.0, -5.0], [0.0, 0.0, 
-4.0, -1.0, -6.0]], [[-4.0, 1.0, 1.0, 5.0, -4.0], [5.0, -4.0, 3.0, -3.0, 7.0], [-2.0, -7.0, -3.0, 7.0, -3.0], [7.0, -1.0, 0.0, 
--2.0, -6.0]], [[1.0, 3.0, 0.0, -7.0, 2.0], [0.0, 0.0, 5.0, -6.0, 0.0], [-2.0, -5.0, 1.0, -2.0, -4.0], [-7.0, 0.0, 6.0, 3.0, 
--7.0]]], [[[-6.0, 4.0, 1.0, 1.0, 0.0], [7.0, -4.0, -2.0, 0.0, 3.0], [-1.0, -3.0, -3.0, -4.0, 4.0], [-7.0, 5.0, -2.0, 0.0, 
-0.0]], [[-6.0, 0.0, -7.0, -7.0, -6.0], [-2.0, -1.0, 6.0, 0.0, 3.0], [-5.0, -3.0, 0.0, -5.0, -7.0], [5.0, -7.0, -5.0, -3.0, 
--2.0]], [[0.0, 3.0, -6.0, 5.0, 0.0], [2.0, -2.0, -4.0, 6.0, 4.0], [-1.0, -3.0, 6.0, 6.0, 2.0], [0.0, 3.0, 4.0, 1.0, -1.0]]]])
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 3.0, -4.0], [-6.0, -2.0, 2.0]], [[2.0, -3.0, 1.0], [5.0, -1.0, -5.0]], [[4.0, -2.0, 
+3.0], [-2.0, 4.0, -2.0]], [[-3.0, -4.0, -2.0], [1.0, -7.0, 0.0]], [[3.0, -3.0, -2.0], [-6.0, 0.0, 1.0]]], [[[0.0, -5.0, -2.0], 
+[0.0, 1.0, 3.0]], [[0.0, 5.0, 3.0], [4.0, 3.0, -6.0]], [[4.0, -7.0, 3.0], [2.0, 0.0, 7.0]], [[2.0, -7.0, 7.0], [-5.0, 2.0, 
+-2.0]], [[7.0, 0.0, -5.0], [0.0, 0.0, -4.0]]], [[[1.0, 3.0, 6.0], [4.0, 1.0, 2.0]], [[-2.0, 4.0, 2.0], [0.0, -5.0, 6.0]], 
+[[-1.0, -1.0, -2.0], [1.0, -6.0, -2.0]], [[0.0, 5.0, -2.0], [-3.0, -4.0, 0.0]], [[-6.0, 1.0, -1.0], [0.0, -1.0, -6.0]]], 
+[[[5.0, -6.0, -5.0], [7.0, -4.0, 0.0]], [[5.0, -6.0, 4.0], [-7.0, 7.0, 4.0]], [[-7.0, 0.0, -3.0], [3.0, -1.0, -6.0]], [[6.0, 
+-6.0, -7.0], [-6.0, -4.0, 4.0]], [[0.0, -5.0, -2.0], [4.0, -1.0, -2.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -6.0, 6.0], [0.0, 
+2.0, 5.0]], [[0.0, 3.0, 7.0], [-7.0, -4.0, -1.0]], [[2.0, 2.0, 0.0], [3.0, 0.0, -1.0]], [[-1.0, -3.0, 3.0], [-2.0, 3.0, 0.0]], 
+[[-2.0, -6.0, 0.0], [-3.0, -6.0, 2.0]]], [[[-4.0, 7.0, -5.0], [-1.0, 7.0, 4.0]], [[3.0, 0.0, 2.0], [0.0, 4.0, 6.0]], [[-2.0, 
+-2.0, 0.0], [3.0, -3.0, -5.0]], [[5.0, -4.0, 1.0], [-5.0, -3.0, 5.0]], [[6.0, 0.0, 7.0], [0.0, -6.0, 5.0]]], [[[7.0, 2.0, 7.0], 
+[6.0, 0.0, 7.0]], [[3.0, 5.0, -2.0], [-3.0, 0.0, -7.0]], [[3.0, -5.0, 3.0], [-6.0, -2.0, 0.0]], [[6.0, -5.0, -3.0], [0.0, 1.0, 
+0.0]], [[1.0, -4.0, -6.0], [3.0, 6.0, -5.0]]], [[[-1.0, -3.0, -6.0], [3.0, 6.0, -4.0]], [[3.0, 0.0, 3.0], [0.0, -4.0, 7.0]], 
+[[0.0, 1.0, -5.0], [-5.0, -6.0, 4.0]], [[4.0, -5.0, -5.0], [-4.0, -5.0, 7.0]], [[6.0, -3.0, -4.0], [6.0, 6.0, 0.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[1.0, 3.0], [6.0, 0.0], [6.0, 6.0]], [[-3.0, 2.0], [7.0, 4.0], [3.0, 
+-3.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 6.0], [-2.0, -3.0], [-4.0, 5.0]], [[-4.0, 3.0], [-5.0, -6.0], [1.0, -3.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[-70.0, 32.0, 53.0, 10.0, -10.0], [67.0, -57.0, 41.0, -48.0, 63.0], [-32.0, -37.0, -84.0, 0.0, 8.0], 
-[0.0, 7.0, -54.0, -18.0, -17.0]], [[-48.0, -45.0, -38.0, -11.0, -98.0], [10.0, 15.0, 22.0, -29.0, -2.0], [8.0, -64.0, -5.0, 
--37.0, -83.0], [79.0, -48.0, -8.0, -38.0, -65.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_array_rank3_offset0(self):
-      arg0=numpy.array([1.0, 5.0])
-      arg1=numpy.array([[[4.0, 3.0], [6.0, 0.0]], [[0.0, 0.0], [5.0, 4.0]], [[-5.0, 1.0], [-7.0, -2.0]], [[4.0, -7.0], [7.0, 
--2.0]], [[5.0, 2.0], [-3.0, 1.0]], [[0.0, 4.0], [-1.0, -5.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[4.0, 3.0], [6.0, 0.0]], [[0.0, 0.0], [5.0, 4.0]], [[-5.0, 1.0], [-7.0, -2.0]], [[4.0, -7.0], [7.0, 
--2.0]], [[5.0, 2.0], [-3.0, 1.0]], [[0.0, 4.0], [-1.0, -5.0]]], [[[20.0, 15.0], [30.0, 0.0]], [[0.0, 0.0], [25.0, 20.0]], 
-[[-25.0, 5.0], [-35.0, -10.0]], [[20.0, -35.0], [35.0, -10.0]], [[25.0, 10.0], [-15.0, 5.0]], [[0.0, 20.0], [-5.0, -25.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank4_offset1(self):
-      arg0=numpy.array([[-7.0, 4.0, -6.0], [-2.0, -3.0, -7.0]])
-      arg1=numpy.array([[[[3.0, 1.0], [-1.0, 2.0]], [[2.0, 2.0], [0.0, 1.0]], [[-5.0, 2.0], [-2.0, 1.0]], [[-1.0, 7.0], [7.0, 
-5.0]], [[1.0, 0.0], [-5.0, -6.0]], [[-3.0, -1.0], [-7.0, -7.0]]], [[[-7.0, 4.0], [-2.0, 5.0]], [[5.0, -1.0], [-2.0, 7.0]], 
-[[5.0, -2.0], [0.0, 5.0]], [[7.0, -3.0], [0.0, 0.0]], [[1.0, 2.0], [4.0, 7.0]], [[3.0, 0.0], [5.0, 5.0]]], [[[-7.0, -6.0], 
-[-7.0, 3.0]], [[1.0, -6.0], [4.0, -7.0]], [[1.0, -7.0], [-5.0, -1.0]], [[0.0, -1.0], [-3.0, -7.0]], [[5.0, 4.0], [-1.0, -5.0]], 
-[[4.0, 6.0], [2.0, -7.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[-7.0, 45.0], [41.0, -12.0]], [[0.0, 18.0], [-32.0, 63.0]], [[49.0, 20.0], [44.0, 19.0]], [[35.0, 
--55.0], [-31.0, 7.0]], [[-33.0, -16.0], [57.0, 100.0]], [[9.0, -29.0], [57.0, 111.0]]], [[[64.0, 28.0], [57.0, -40.0]], 
-[[-26.0, 41.0], [-22.0, 26.0]], [[-12.0, 51.0], [39.0, -10.0]], [[-19.0, 2.0], [7.0, 39.0]], [[-40.0, -34.0], [5.0, 26.0]], 
-[[-31.0, -40.0], [-15.0, 48.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[4.0, -50.0], [-47.0, 33.0], [38.0, 48.0], [-91.0, -47.0], [-6.0, -18.0]], [[-26.0, -17.0], 
+[39.0, 56.0], [-5.0, 13.0], [25.0, 52.0], [-35.0, 3.0]], [[56.0, 45.0], [17.0, -32.0], [-70.0, -31.0], [-1.0, -34.0], [-31.0, 
+-10.0]], [[-110.0, -17.0], [75.0, 41.0], [-59.0, -19.0], [-70.0, -64.0], [-67.0, -2.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 
+27.0], [13.0, 32.0], [-3.0, 18.0], [-20.0, -6.0], [42.0, 27.0]], [[-49.0, -127.0], [-1.0, -14.0], [-12.0, 36.0], [79.0, 35.0], 
+[49.0, 92.0]], [[0.0, 68.0], [24.0, 5.0], [53.0, 42.0], [59.0, 30.0], [-8.0, -24.0]], [[-23.0, -42.0], [36.0, 36.0], [72.0, 
+-19.0], [106.0, 11.0], [10.0, 7.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank0_offset0(self):
-      arg0=numpy.array([0.0, -5.0])
-      arg1=Data(-7.0,self.functionspace)
+   def test_generalTensorProduct_expandedData_rank2_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, 0.0, -7.0, -4.0, 1.0], [2.0, -5.0, -7.0, -1.0, 2.0], [0.0, -4.0, 5.0, -7.0, 1.0], [-1.0, 
+-7.0, -6.0, -1.0, 5.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -1.0, -1.0, -5.0, 3.0], [3.0, -2.0, -5.0, 6.0, 3.0], [6.0, 3.0, 
+-3.0, 2.0, -6.0], [4.0, 3.0, 6.0, 2.0, 5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[5.0, 6.0, 6.0, 0.0, 1.0], [-1.0, 4.0, -5.0, -3.0, -6.0], [-1.0, 2.0, 5.0, 4.0, 0.0], [-4.0, 
+6.0, 6.0, -1.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-6.0, -7.0, -4.0, -1.0, 7.0], [0.0, 7.0, -5.0, 0.0, 0.0], [-2.0, 0.0, 4.0, 
+-1.0, -3.0], [-7.0, 7.0, 2.0, 0.0, -1.0]])
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-0.0, 35.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[25.0, 30.0, 30.0, 0.0, 5.0], [-5.0, 20.0, -25.0, -15.0, -30.0], [-5.0, 10.0, 25.0, 20.0, 
+0.0], [-20.0, 30.0, 30.0, -5.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, -35.0, -28.0, 0.0], 
+[28.0, -42.0, -42.0, 7.0, 42.0]], [[-20.0, -24.0, -24.0, 0.0, -4.0], [4.0, -16.0, 20.0, 12.0, 24.0], [4.0, -8.0, -20.0, -16.0, 
+0.0], [16.0, -24.0, -24.0, 4.0, 24.0]], [[5.0, 6.0, 6.0, 0.0, 1.0], [-1.0, 4.0, -5.0, -3.0, -6.0], [-1.0, 2.0, 5.0, 4.0, 0.0], 
+[-4.0, 6.0, 6.0, -1.0, -6.0]]], [[[10.0, 12.0, 12.0, 0.0, 2.0], [-2.0, 8.0, -10.0, -6.0, -12.0], [-2.0, 4.0, 10.0, 8.0, 0.0], 
+[-8.0, 12.0, 12.0, -2.0, -12.0]], [[-25.0, -30.0, -30.0, 0.0, -5.0], [5.0, -20.0, 25.0, 15.0, 30.0], [5.0, -10.0, -25.0, -20.0, 
+0.0], [20.0, -30.0, -30.0, 5.0, 30.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, -35.0, 
+-28.0, 0.0], [28.0, -42.0, -42.0, 7.0, 42.0]], [[-5.0, -6.0, -6.0, 0.0, -1.0], [1.0, -4.0, 5.0, 3.0, 6.0], [1.0, -2.0, -5.0, 
+-4.0, 0.0], [4.0, -6.0, -6.0, 1.0, 6.0]], [[10.0, 12.0, 12.0, 0.0, 2.0], [-2.0, 8.0, -10.0, -6.0, -12.0], [-2.0, 4.0, 10.0, 
+8.0, 0.0], [-8.0, 12.0, 12.0, -2.0, -12.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-20.0, -24.0, -24.0, 0.0, -4.0], [4.0, -16.0, 20.0, 12.0, 24.0], [4.0, -8.0, -20.0, -16.0, 
+0.0], [16.0, -24.0, -24.0, 4.0, 24.0]], [[25.0, 30.0, 30.0, 0.0, 5.0], [-5.0, 20.0, -25.0, -15.0, -30.0], [-5.0, 10.0, 25.0, 
+20.0, 0.0], [-20.0, 30.0, 30.0, -5.0, -30.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, 
+-35.0, -28.0, 0.0], [28.0, -42.0, -42.0, 7.0, 42.0]], [[5.0, 6.0, 6.0, 0.0, 1.0], [-1.0, 4.0, -5.0, -3.0, -6.0], [-1.0, 2.0, 
+5.0, 4.0, 0.0], [-4.0, 6.0, 6.0, -1.0, -6.0]]], [[[-5.0, -6.0, -6.0, 0.0, -1.0], [1.0, -4.0, 5.0, 3.0, 6.0], [1.0, -2.0, -5.0, 
+-4.0, 0.0], [4.0, -6.0, -6.0, 1.0, 6.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, 
+-35.0, -28.0, 0.0], [28.0, -42.0, -42.0, 7.0, 42.0]], [[-30.0, -36.0, -36.0, 0.0, -6.0], [6.0, -24.0, 30.0, 18.0, 36.0], [6.0, 
+-12.0, -30.0, -24.0, 0.0], [24.0, -36.0, -36.0, 6.0, 36.0]], [[-5.0, -6.0, -6.0, 0.0, -1.0], [1.0, -4.0, 5.0, 3.0, 6.0], [1.0, 
+-2.0, -5.0, -4.0, 0.0], [4.0, -6.0, -6.0, 1.0, 6.0]], [[25.0, 30.0, 30.0, 0.0, 5.0], [-5.0, 20.0, -25.0, -15.0, -30.0], [-5.0, 
+10.0, 25.0, 20.0, 0.0], [-20.0, 30.0, 30.0, -5.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[18.0, 21.0, 12.0, 3.0, -21.0], [0.0, 
+-21.0, 15.0, 0.0, 0.0], [6.0, 0.0, -12.0, 3.0, 9.0], [21.0, -21.0, -6.0, 0.0, 3.0]], [[6.0, 7.0, 4.0, 1.0, -7.0], [0.0, -7.0, 
+5.0, 0.0, 0.0], [2.0, 0.0, -4.0, 1.0, 3.0], [7.0, -7.0, -2.0, 0.0, 1.0]], [[6.0, 7.0, 4.0, 1.0, -7.0], [0.0, -7.0, 5.0, 0.0, 
+0.0], [2.0, 0.0, -4.0, 1.0, 3.0], [7.0, -7.0, -2.0, 0.0, 1.0]], [[30.0, 35.0, 20.0, 5.0, -35.0], [0.0, -35.0, 25.0, 0.0, 0.0], 
+[10.0, 0.0, -20.0, 5.0, 15.0], [35.0, -35.0, -10.0, 0.0, 5.0]], [[-18.0, -21.0, -12.0, -3.0, 21.0], [0.0, 21.0, -15.0, 0.0, 
+0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]]], [[[-18.0, -21.0, -12.0, -3.0, 21.0], [0.0, 21.0, -15.0, 
+0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]], [[12.0, 14.0, 8.0, 2.0, -14.0], [0.0, -14.0, 10.0, 
+0.0, 0.0], [4.0, 0.0, -8.0, 2.0, 6.0], [14.0, -14.0, -4.0, 0.0, 2.0]], [[30.0, 35.0, 20.0, 5.0, -35.0], [0.0, -35.0, 25.0, 0.0, 
+0.0], [10.0, 0.0, -20.0, 5.0, 15.0], [35.0, -35.0, -10.0, 0.0, 5.0]], [[-36.0, -42.0, -24.0, -6.0, 42.0], [0.0, 42.0, -30.0, 
+0.0, 0.0], [-12.0, 0.0, 24.0, -6.0, -18.0], [-42.0, 42.0, 12.0, 0.0, -6.0]], [[-18.0, -21.0, -12.0, -3.0, 21.0], [0.0, 21.0, 
+-15.0, 0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]]], [[[-36.0, -42.0, -24.0, -6.0, 42.0], [0.0, 
+42.0, -30.0, 0.0, 0.0], [-12.0, 0.0, 24.0, -6.0, -18.0], [-42.0, 42.0, 12.0, 0.0, -6.0]], [[-18.0, -21.0, -12.0, -3.0, 21.0], 
+[0.0, 21.0, -15.0, 0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]], [[18.0, 21.0, 12.0, 3.0, -21.0], 
+[0.0, -21.0, 15.0, 0.0, 0.0], [6.0, 0.0, -12.0, 3.0, 9.0], [21.0, -21.0, -6.0, 0.0, 3.0]], [[-12.0, -14.0, -8.0, -2.0, 14.0], 
+[0.0, 14.0, -10.0, 0.0, 0.0], [-4.0, 0.0, 8.0, -2.0, -6.0], [-14.0, 14.0, 4.0, 0.0, -2.0]], [[36.0, 42.0, 24.0, 6.0, -42.0], 
+[0.0, -42.0, 30.0, 0.0, 0.0], [12.0, 0.0, -24.0, 6.0, 18.0], [42.0, -42.0, -12.0, 0.0, 6.0]]], [[[-24.0, -28.0, -16.0, -4.0, 
+28.0], [0.0, 28.0, -20.0, 0.0, 0.0], [-8.0, 0.0, 16.0, -4.0, -12.0], [-28.0, 28.0, 8.0, 0.0, -4.0]], [[-18.0, -21.0, -12.0, 
+-3.0, 21.0], [0.0, 21.0, -15.0, 0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]], [[-36.0, -42.0, 
+-24.0, -6.0, 42.0], [0.0, 42.0, -30.0, 0.0, 0.0], [-12.0, 0.0, 24.0, -6.0, -18.0], [-42.0, 42.0, 12.0, 0.0, -6.0]], [[-12.0, 
+-14.0, -8.0, -2.0, 14.0], [0.0, 14.0, -10.0, 0.0, 0.0], [-4.0, 0.0, 8.0, -2.0, -6.0], [-14.0, 14.0, 4.0, 0.0, -2.0]], [[-30.0, 
+-35.0, -20.0, -5.0, 35.0], [0.0, 35.0, -25.0, 0.0, 0.0], [-10.0, 0.0, 20.0, -5.0, -15.0], [-35.0, 35.0, 10.0, 0.0, -5.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank1_offset1(self):
-      arg0=numpy.array([[-4.0, 0.0, 7.0], [-1.0, -7.0, -4.0]])
-      arg1=Data(numpy.array([-5.0, -6.0, -3.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, 7.0, 4.0], [0.0, 5.0, -3.0], [-2.0, 7.0, -3.0], [0.0, -4.0, 0.0], [0.0, -2.0, 2.0]], 
+[[-5.0, -1.0, 4.0], [-6.0, 4.0, -3.0], [-3.0, 7.0, -1.0], [-1.0, 3.0, 5.0], [-4.0, -3.0, 6.0]], [[-6.0, -3.0, 7.0], [7.0, 6.0, 
+2.0], [2.0, 5.0, -6.0], [6.0, -7.0, -5.0], [-4.0, 0.0, -2.0]], [[4.0, -1.0, -3.0], [-7.0, 7.0, -1.0], [-6.0, -4.0, 7.0], [-7.0, 
+-3.0, 0.0], [1.0, 5.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 0.0, -1.0], [-7.0, -7.0, 6.0], [-5.0, 5.0, -5.0], [-1.0, 
+-5.0, -2.0], [-5.0, -3.0, 5.0]], [[-5.0, 7.0, 3.0], [1.0, -1.0, 4.0], [1.0, 2.0, 2.0], [2.0, -2.0, -7.0], [-1.0, 6.0, 1.0]], 
+[[7.0, -1.0, -3.0], [-4.0, 2.0, 6.0], [-3.0, 0.0, -7.0], [-2.0, -1.0, -6.0], [-7.0, 0.0, -4.0]], [[-3.0, -1.0, 2.0], [-7.0, 
+0.0, -6.0], [6.0, -1.0, 5.0], [0.0, -3.0, -2.0], [0.0, 5.0, 7.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-2.0, -1.0, -6.0, 0.0, -6.0], [-1.0, -7.0, -5.0, 5.0, -6.0], [1.0, -5.0, -7.0, 6.0, -5.0], 
+[4.0, -1.0, -1.0, -1.0, 0.0]], [[-4.0, 7.0, -7.0, 1.0, 2.0], [1.0, -7.0, -1.0, -5.0, -6.0], [0.0, 2.0, 5.0, 7.0, -1.0], [7.0, 
+4.0, -2.0, -3.0, 5.0]], [[-4.0, 0.0, 0.0, 4.0, 7.0], [-3.0, 0.0, -5.0, -4.0, -3.0], [-1.0, 7.0, -2.0, -3.0, 6.0], [0.0, 2.0, 
+7.0, 5.0, 1.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -4.0, -5.0, -7.0, 4.0], [1.0, 2.0, 2.0, -3.0, -3.0], [0.0, -6.0, 5.0, 2.0, 
+-6.0], [0.0, -4.0, 1.0, -7.0, 0.0]], [[-7.0, -7.0, -2.0, 7.0, -6.0], [-1.0, 2.0, -7.0, 3.0, -4.0], [6.0, -6.0, -3.0, 7.0, 4.0], 
+[7.0, 0.0, -5.0, -6.0, -5.0]], [[-6.0, 5.0, -4.0, 6.0, -1.0], [-1.0, -3.0, 7.0, 5.0, 0.0], [-7.0, 5.0, 2.0, -1.0, -4.0], [-6.0, 
+-1.0, -2.0, 4.0, 0.0]]])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-1.0, 59.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank2_offset2(self):
-      arg0=numpy.array([[[-1.0, -6.0, 7.0], [-2.0, -7.0, 4.0]], [[-4.0, 1.0, -7.0], [-2.0, -4.0, 7.0]]])
-      arg1=Data(numpy.array([[0.0, -5.0, -2.0], [-1.0, 7.0, 0.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-31.0, -17.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-30.0, 56.0, -7.0, 23.0, 84.0], [2.0, 0.0, 8.0, -86.0, -12.0], [-11.0, 77.0, 76.0, -5.0, 
+52.0], [21.0, 43.0, 21.0, 6.0, 39.0]], [[-8.0, 35.0, -35.0, -7.0, -11.0], [14.0, -35.0, 10.0, -13.0, -21.0], [3.0, -11.0, 31.0, 
+44.0, -23.0], [35.0, 14.0, -31.0, -30.0, 22.0]], [[-12.0, 51.0, -37.0, -5.0, 5.0], [18.0, -35.0, 18.0, -33.0, -21.0], [1.0, 
+3.0, 55.0, 46.0, -15.0], [41.0, 24.0, -33.0, -34.0, 32.0]], [[16.0, -28.0, 28.0, -4.0, -8.0], [-4.0, 28.0, 4.0, 20.0, 24.0], 
+[0.0, -8.0, -20.0, -28.0, 4.0], [-28.0, -16.0, 8.0, 12.0, -20.0]], [[0.0, -14.0, 14.0, 6.0, 10.0], [-8.0, 14.0, -8.0, 2.0, 
+6.0], [-2.0, 10.0, -14.0, -20.0, 14.0], [-14.0, -4.0, 18.0, 16.0, -8.0]]], [[[-2.0, -2.0, 37.0, 15.0, 56.0], [-8.0, 42.0, 6.0, 
+-36.0, 24.0], [-9.0, 51.0, 22.0, -49.0, 50.0], [-27.0, 9.0, 35.0, 28.0, -1.0]], [[8.0, 34.0, 8.0, -8.0, 23.0], [19.0, 14.0, 
+41.0, -38.0, 21.0], [-3.0, 17.0, 68.0, 1.0, 8.0], [4.0, 16.0, -23.0, -21.0, 17.0]], [[-18.0, 52.0, -31.0, 3.0, 25.0], [13.0, 
+-28.0, 13.0, -46.0, -21.0], [-2.0, 22.0, 58.0, 34.0, 2.0], [37.0, 29.0, -18.0, -23.0, 34.0]], [[-30.0, 22.0, -15.0, 23.0, 
+47.0], [-11.0, -14.0, -23.0, -40.0, -27.0], [-6.0, 46.0, 12.0, 0.0, 32.0], [17.0, 23.0, 30.0, 17.0, 20.0]], [[-4.0, -17.0, 
+45.0, 21.0, 60.0], [-17.0, 49.0, -7.0, -29.0, 24.0], [-10.0, 56.0, 1.0, -63.0, 59.0], [-37.0, 4.0, 52.0, 43.0, -9.0]]], 
+[[[-4.0, -15.0, 57.0, 25.0, 79.0], [-18.0, 63.0, -2.0, -43.0, 33.0], [-13.0, 73.0, 13.0, -78.0, 75.0], [-45.0, 8.0, 61.0, 50.0, 
+-8.0]], [[-46.0, 35.0, -84.0, 14.0, -16.0], [-7.0, -91.0, -51.0, -3.0, -84.0], [5.0, -9.0, -23.0, 78.0, -29.0], [70.0, 21.0, 
+-5.0, -15.0, 32.0]], [[0.0, 33.0, -47.0, -19.0, -44.0], [21.0, -49.0, 15.0, 9.0, -24.0], [8.0, -42.0, 23.0, 65.0, -51.0], 
+[43.0, 6.0, -54.0, -47.0, 19.0]], [[36.0, -55.0, 13.0, -27.0, -85.0], [2.0, 7.0, 2.0, 85.0, 21.0], [11.0, -79.0, -67.0, 2.0, 
+-53.0], [-25.0, -44.0, -27.0, -10.0, -40.0]], [[16.0, 4.0, 24.0, -8.0, 10.0], [10.0, 28.0, 30.0, -12.0, 30.0], [-2.0, 6.0, 
+32.0, -18.0, 8.0], [-16.0, 0.0, -10.0, -6.0, -2.0]]], [[[8.0, -11.0, -17.0, -13.0, -47.0], [4.0, -21.0, -4.0, 37.0, -9.0], 
+[7.0, -43.0, -27.0, 26.0, -37.0], [9.0, -14.0, -23.0, -16.0, -8.0]], [[-10.0, 56.0, -7.0, 3.0, 49.0], [17.0, 0.0, 33.0, -66.0, 
+3.0], [-6.0, 42.0, 86.0, 10.0, 22.0], [21.0, 33.0, -14.0, -19.0, 34.0]], [[0.0, -22.0, 64.0, 24.0, 77.0], [-19.0, 70.0, -1.0, 
+-38.0, 39.0], [-13.0, 71.0, 8.0, -85.0, 76.0], [-52.0, 4.0, 63.0, 53.0, -13.0]], [[26.0, -14.0, 63.0, -3.0, 36.0], [4.0, 70.0, 
+38.0, -20.0, 60.0], [-7.0, 29.0, 34.0, -63.0, 38.0], [-49.0, -5.0, 13.0, 16.0, -15.0]], [[-50.0, 34.0, -41.0, 33.0, 53.0], 
+[-17.0, -42.0, -45.0, -48.0, -57.0], [-6.0, 54.0, 4.0, 20.0, 32.0], [39.0, 33.0, 38.0, 19.0, 
+32.0]]]])+(1.-msk_ref)*numpy.array([[[[13.0, 23.0, 39.0, 43.0, -27.0], [-6.0, -11.0, -21.0, 16.0, 21.0], [7.0, 37.0, -37.0, 
+-13.0, 46.0], [6.0, 29.0, -5.0, 45.0, 0.0]], [[20.0, 107.0, 25.0, 36.0, 8.0], [-6.0, -46.0, 77.0, 30.0, 49.0], [-84.0, 114.0, 
+-2.0, -69.0, -10.0], [-85.0, 22.0, 16.0, 115.0, 35.0]], [[0.0, -40.0, 35.0, 40.0, -45.0], [-5.0, 15.0, -80.0, 5.0, -5.0], 
+[65.0, -25.0, -50.0, 30.0, 70.0], [65.0, 25.0, -20.0, -15.0, -25.0]], [[48.0, 29.0, 23.0, -40.0, 28.0], [6.0, -6.0, 19.0, 
+-22.0, 23.0], [-16.0, 26.0, 6.0, -35.0, -6.0], [-23.0, 6.0, 28.0, 29.0, 25.0]], [[-4.0, 66.0, 11.0, 44.0, -7.0], [-7.0, -31.0, 
+46.0, 31.0, 27.0], [-53.0, 73.0, -6.0, -36.0, -2.0], [-51.0, 15.0, 0.0, 73.0, 15.0]]], [[[-62.0, -14.0, -1.0, 102.0, -65.0], 
+[-15.0, -5.0, -38.0, 51.0, -13.0], [21.0, 3.0, -40.0, 36.0, 46.0], [31.0, 17.0, -46.0, 5.0, -35.0]], [[-18.0, 23.0, -19.0, 
+10.0, 6.0], [-2.0, -12.0, 37.0, 14.0, 1.0], [-34.0, 20.0, 16.0, -9.0, -26.0], [-31.0, -8.0, -2.0, 15.0, 5.0]], [[-27.0, -8.0, 
+-17.0, 19.0, -10.0], [-3.0, 0.0, 2.0, 13.0, -11.0], [-2.0, -8.0, 3.0, 14.0, -6.0], [2.0, -6.0, -13.0, -11.0, -10.0]], [[54.0, 
+-29.0, 22.0, -70.0, 27.0], [11.0, 21.0, -31.0, -47.0, 2.0], [37.0, -35.0, 2.0, -3.0, 8.0], [28.0, -1.0, 26.0, -30.0, 10.0]], 
+[[-47.0, -33.0, -11.0, 55.0, -41.0], [-8.0, 7.0, -37.0, 26.0, -21.0], [29.0, -25.0, -21.0, 39.0, 26.0], [36.0, 3.0, -33.0, 
+-25.0, -30.0]]], [[[18.0, -36.0, -21.0, -74.0, 37.0], [11.0, 21.0, 0.0, -39.0, -17.0], [15.0, -51.0, 32.0, 10.0, -34.0], [11.0, 
+-25.0, 18.0, -55.0, 5.0]], [[-46.0, 32.0, -8.0, 78.0, -34.0], [-12.0, -22.0, 20.0, 48.0, 4.0], [-30.0, 42.0, -14.0, 0.0, 8.0], 
+[-22.0, 10.0, -26.0, 40.0, -10.0]], [[45.0, -23.0, 43.0, -21.0, -5.0], [4.0, 15.0, -55.0, -26.0, 9.0], [49.0, -17.0, -29.0, 
+1.0, 46.0], [42.0, 19.0, 11.0, -7.0, 0.0]], [[45.0, -15.0, 36.0, -29.0, 4.0], [5.0, 12.0, -39.0, -27.0, 10.0], [36.0, -12.0, 
+-19.0, -5.0, 32.0], [29.0, 14.0, 15.0, -4.0, 5.0]], [[31.0, 8.0, 51.0, 25.0, -24.0], [-3.0, -2.0, -42.0, 1.0, 21.0], [28.0, 
+22.0, -43.0, -10.0, 58.0], [24.0, 32.0, 1.0, 33.0, 0.0]]], [[[-2.0, 29.0, 9.0, 26.0, -8.0], [-4.0, -14.0, 15.0, 16.0, 13.0], 
+[-20.0, 34.0, -8.0, -15.0, 6.0], [-19.0, 10.0, -2.0, 35.0, 5.0]], [[43.0, -2.0, 59.0, 13.0, -22.0], [-1.0, 4.0, -56.0, -9.0, 
+21.0], [42.0, 12.0, -47.0, -8.0, 66.0], [36.0, 34.0, 5.0, 25.0, 0.0]], [[-29.0, 8.0, -48.0, -19.0, 25.0], [2.0, -5.0, 54.0, 
+4.0, -14.0], [-41.0, -5.0, 43.0, 0.0, -60.0], [-37.0, -29.0, 1.0, -16.0, 5.0]], [[33.0, 11.0, 14.0, -33.0, 20.0], [5.0, 0.0, 
+7.0, -19.0, 12.0], [-4.0, 8.0, 5.0, -19.0, -4.0], [-9.0, 2.0, 19.0, 10.0, 15.0]], [[-77.0, 0.0, -38.0, 77.0, -37.0], [-12.0, 
+-11.0, 14.0, 50.0, -20.0], [-19.0, 5.0, -1.0, 28.0, -8.0], [-7.0, -7.0, -39.0, -2.0, -25.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank3_offset3(self):
-      arg0=numpy.array([[[[-3.0, 3.0, 5.0], [-4.0, -2.0, 7.0], [-1.0, -1.0, -1.0], [-6.0, -3.0, 6.0]], [[-7.0, -7.0, 1.0], 
-[-5.0, -1.0, -5.0], [4.0, 2.0, 0.0], [-7.0, 1.0, 1.0]]], [[[7.0, -7.0, 3.0], [1.0, -7.0, 0.0], [-4.0, -7.0, 4.0], [-6.0, 0.0, 
-1.0]], [[-3.0, -3.0, 5.0], [-1.0, 1.0, 2.0], [5.0, 0.0, -6.0], [-3.0, 5.0, -5.0]]]])
-      arg1=Data(numpy.array([[[-2.0, -5.0, 0.0], [2.0, 7.0, -4.0], [-2.0, -3.0, 5.0], [-2.0, -3.0, -3.0]], [[3.0, 0.0, 2.0], 
-[-5.0, 0.0, 3.0], [5.0, -6.0, -7.0], [3.0, 6.0, 0.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([-72.0, 132.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -3.0, -7.0], [7.0, 1.0, 0.0]], [[3.0, -4.0, 7.0], [7.0, 1.0, 3.0]], [[6.0, 0.0, 2.0], 
+[0.0, -1.0, 3.0]], [[-3.0, 5.0, 1.0], [-6.0, -7.0, 0.0]], [[-7.0, 2.0, -6.0], [0.0, 7.0, -1.0]]], [[[4.0, 5.0, -4.0], [5.0, 
+-7.0, -6.0]], [[6.0, -1.0, -7.0], [-6.0, 4.0, -7.0]], [[-7.0, -6.0, -5.0], [6.0, -4.0, 1.0]], [[3.0, -6.0, -6.0], [0.0, -1.0, 
+-4.0]], [[-2.0, 0.0, 3.0], [0.0, 4.0, -6.0]]], [[[3.0, -6.0, -2.0], [5.0, 0.0, -5.0]], [[-1.0, 4.0, 7.0], [5.0, -7.0, -5.0]], 
+[[-1.0, 4.0, -2.0], [-3.0, 2.0, 7.0]], [[7.0, 6.0, -2.0], [-6.0, 0.0, 0.0]], [[-3.0, 5.0, 3.0], [3.0, 0.0, -5.0]]], [[[-4.0, 
+-7.0, 7.0], [5.0, -3.0, -2.0]], [[0.0, 3.0, 0.0], [-7.0, 4.0, -5.0]], [[1.0, -6.0, 5.0], [6.0, 1.0, 1.0]], [[7.0, 2.0, 4.0], 
+[4.0, -5.0, 2.0]], [[3.0, -4.0, 5.0], [4.0, 5.0, -2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -5.0, -5.0], [6.0, 0.0, 5.0]], 
+[[6.0, 5.0, 4.0], [-6.0, 4.0, -5.0]], [[4.0, -7.0, -5.0], [2.0, 7.0, -1.0]], [[-2.0, -5.0, 0.0], [7.0, -7.0, 6.0]], [[7.0, 
+-4.0, 2.0], [-2.0, 0.0, -4.0]]], [[[-1.0, -1.0, 5.0], [7.0, 5.0, -5.0]], [[2.0, 4.0, 0.0], [2.0, -4.0, 4.0]], [[-7.0, 0.0, 
+-4.0], [5.0, 1.0, -1.0]], [[-5.0, 1.0, -7.0], [-7.0, -3.0, 4.0]], [[2.0, -6.0, 6.0], [-6.0, 3.0, 0.0]]], [[[-1.0, -2.0, 5.0], 
+[-1.0, 5.0, -5.0]], [[-4.0, 0.0, -3.0], [-7.0, 4.0, 0.0]], [[5.0, -1.0, 0.0], [6.0, 6.0, -1.0]], [[2.0, -6.0, -6.0], [6.0, 4.0, 
+4.0]], [[2.0, -2.0, -6.0], [4.0, 5.0, 4.0]]], [[[1.0, -2.0, -7.0], [2.0, 0.0, -1.0]], [[0.0, 4.0, 5.0], [7.0, -2.0, 7.0]], 
+[[5.0, 7.0, 1.0], [3.0, -7.0, -5.0]], [[-7.0, -2.0, 2.0], [0.0, -3.0, -5.0]], [[-2.0, 7.0, 6.0], [-7.0, -6.0, -3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-6.0, 1.0, -6.0, -2.0, -1.0], [0.0, 0.0, 3.0, 0.0, -5.0], [-5.0, -7.0, -2.0, -6.0, 6.0], 
+[2.0, -4.0, -2.0, -2.0, 0.0]], [[3.0, -6.0, 2.0, -4.0, 2.0], [5.0, 2.0, 4.0, -3.0, 1.0], [-6.0, 2.0, 2.0, 7.0, 0.0], [3.0, 7.0, 
+-1.0, -2.0, 4.0]], [[7.0, 4.0, 0.0, -3.0, 0.0], [1.0, -4.0, 4.0, -1.0, -4.0], [0.0, 0.0, 5.0, -1.0, -4.0], [-1.0, 6.0, 4.0, 
+-3.0, -6.0]]], [[[0.0, -4.0, 1.0, 6.0, 0.0], [0.0, 4.0, -7.0, 5.0, 6.0], [-7.0, 0.0, -6.0, -3.0, 0.0], [7.0, -6.0, 0.0, -3.0, 
+-7.0]], [[0.0, 0.0, 3.0, 3.0, -4.0], [4.0, -5.0, -5.0, 6.0, 2.0], [0.0, -2.0, 3.0, -7.0, 2.0], [0.0, -3.0, 0.0, 1.0, 5.0]], 
+[[-4.0, 2.0, 0.0, 2.0, -7.0], [7.0, -5.0, -4.0, -7.0, 6.0], [-7.0, 0.0, 1.0, -5.0, 0.0], [1.0, 6.0, 7.0, 5.0, 
+3.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, 7.0, -2.0, -4.0, 0.0], [-4.0, 6.0, 3.0, 0.0, 7.0], [6.0, 2.0, 1.0, 1.0, 5.0], 
+[-1.0, -5.0, -5.0, -7.0, -4.0]], [[2.0, 6.0, -3.0, 0.0, 6.0], [7.0, -6.0, -1.0, 0.0, 0.0], [5.0, 4.0, 6.0, 4.0, -4.0], [5.0, 
+1.0, -6.0, 1.0, -4.0]], [[2.0, -7.0, 0.0, 2.0, 3.0], [0.0, -1.0, 4.0, -3.0, -1.0], [4.0, 2.0, -6.0, 0.0, 7.0], [-2.0, -5.0, 
+-3.0, 0.0, 0.0]]], [[[-6.0, 3.0, 0.0, -3.0, -3.0], [0.0, 2.0, 3.0, -5.0, -2.0], [7.0, 6.0, 2.0, 1.0, -5.0], [1.0, -2.0, -7.0, 
+3.0, 6.0]], [[5.0, 2.0, -1.0, 0.0, 0.0], [-3.0, 7.0, -3.0, 3.0, 0.0], [-7.0, 7.0, -2.0, 2.0, 7.0], [6.0, 3.0, -2.0, -2.0, 
+-6.0]], [[7.0, -1.0, 6.0, -6.0, -5.0], [0.0, 4.0, 0.0, 2.0, 1.0], [-2.0, -7.0, 6.0, 0.0, -2.0], [-7.0, 4.0, -4.0, 5.0, -6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-94.0, -32.0, -32.0, 66.0, -16.0], [-18.0, 45.0, -76.0, 57.0, 39.0], [-61.0, -50.0, -92.0, 
+-78.0, 66.0], [59.0, -132.0, -37.0, -5.0, -14.0]], [[7.0, 33.0, -16.0, 40.0, -36.0], [12.0, -28.0, -45.0, 25.0, 15.0], [-61.0, 
+-31.0, -15.0, -96.0, -8.0], [39.0, -25.0, 47.0, -24.0, -93.0]], [[-34.0, 20.0, -39.0, -15.0, -23.0], [19.0, -18.0, 19.0, -29.0, 
+-22.0], [-51.0, -40.0, -2.0, -46.0, 26.0], [13.0, 9.0, 17.0, -4.0, -8.0]], [[40.0, -5.0, 1.0, -74.0, 41.0], [-2.0, 17.0, 92.0, 
+-88.0, -34.0], [27.0, 45.0, 36.0, 119.0, -36.0], [-34.0, 110.0, 5.0, 4.0, 21.0]], [[10.0, -45.0, 67.0, 43.0, -10.0], [25.0, 
+-2.0, -68.0, 49.0, 69.0], [30.0, 39.0, 8.0, 18.0, -4.0], [-3.0, -21.0, -19.0, 30.0, 76.0]]], [[[-13.0, -74.0, -30.0, -19.0, 
+76.0], [-49.0, 111.0, 40.0, 14.0, -19.0], [-43.0, -4.0, -75.0, 79.0, 26.0], [56.0, -50.0, -71.0, -58.0, -44.0]], [[-60.0, -6.0, 
+-32.0, -25.0, 25.0], [-45.0, 17.0, 36.0, 53.0, -73.0], [67.0, -52.0, -8.0, -11.0, 72.0], [-33.0, -91.0, -88.0, -2.0, 79.0]], 
+[[-15.0, -13.0, 24.0, 79.0, 4.0], [-44.0, 47.0, -91.0, 22.0, 83.0], [22.0, 45.0, -70.0, 10.0, -30.0], [16.0, -62.0, 7.0, 24.0, 
+-53.0]], [[-62.0, 7.0, -33.0, 25.0, 17.0], [-68.0, 37.0, -18.0, 46.0, -23.0], [49.0, -31.0, -55.0, -27.0, 40.0], [-10.0, 
+-111.0, -52.0, 3.0, -5.0]], [[57.0, -2.0, 24.0, -5.0, 28.0], [-23.0, -2.0, 10.0, 63.0, -30.0], [52.0, 6.0, 25.0, 11.0, -16.0], 
+[-13.0, -22.0, -26.0, -31.0, -16.0]]], [[[-30.0, 1.0, -25.0, 44.0, 20.0], [-67.0, 41.0, -38.0, 80.0, -13.0], [21.0, -33.0, 
+-63.0, -48.0, 26.0], [20.0, -126.0, -43.0, -28.0, -62.0]], [[87.0, -27.0, -2.0, -36.0, 72.0], [-36.0, 60.0, 61.0, -1.0, -33.0], 
+[-19.0, 29.0, -11.0, 86.0, -48.0], [33.0, 35.0, -9.0, -74.0, -111.0]], [[-24.0, -7.0, 17.0, -6.0, -48.0], [75.0, -41.0, -12.0, 
+-62.0, 45.0], [-47.0, 11.0, 31.0, -4.0, 6.0], [-2.0, 74.0, 39.0, 46.0, 80.0]], [[-38.0, -13.0, -36.0, -68.0, 5.0], [28.0, -4.0, 
+79.0, -46.0, -57.0], [-29.0, -37.0, 24.0, 20.0, 50.0], [-8.0, 38.0, -28.0, -2.0, 78.0]], [[74.0, -43.0, 31.0, -15.0, 48.0], 
+[-7.0, 35.0, 22.0, 32.0, -4.0], [-1.0, 31.0, 8.0, 66.0, -30.0], [22.0, 17.0, -22.0, -47.0, -34.0]]], [[[60.0, 42.0, 6.0, 32.0, 
+16.0], [-54.0, 3.0, -24.0, 35.0, -3.0], [41.0, 20.0, -12.0, -16.0, -58.0], [-3.0, -24.0, 29.0, -27.0, -126.0]], [[29.0, 0.0, 
+11.0, -52.0, 25.0], [-4.0, -17.0, 61.0, 15.0, -61.0], [66.0, -2.0, 55.0, 39.0, 8.0], [-45.0, 21.0, -38.0, -6.0, 66.0]], [[7.0, 
+35.0, -9.0, 48.0, -24.0], [-14.0, -18.0, -52.0, 42.0, 13.0], [-18.0, -21.0, -21.0, -83.0, -12.0], [22.0, -49.0, 31.0, -17.0, 
+-88.0]], [[-16.0, -1.0, -49.0, -21.0, 3.0], [8.0, 19.0, 34.0, -34.0, -23.0], [-89.0, -35.0, -27.0, -19.0, 16.0], [46.0, 13.0, 
+14.0, -37.0, -63.0]], [[13.0, 27.0, -7.0, 30.0, -17.0], [-9.0, -27.0, -32.0, 71.0, -17.0], [-5.0, -39.0, 0.0, -88.0, 8.0], 
+[15.0, -61.0, 4.0, -30.0, -55.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, 18.0, 45.0, -58.0, -88.0], [-35.0, 67.0, 3.0, -5.0, 
+-2.0], [-13.0, -29.0, 42.0, -14.0, -55.0], [-44.0, 28.0, -17.0, 38.0, 26.0]], [[69.0, 39.0, -61.0, 32.0, 85.0], [-1.0, -2.0, 
+-1.0, 20.0, 45.0], [17.0, 67.0, -38.0, 28.0, 106.0], [64.0, -41.0, -18.0, -88.0, -74.0]], [[12.0, 42.0, 0.0, -26.0, -58.0], 
+[-86.0, 120.0, -16.0, 24.0, 28.0], [-64.0, 38.0, -24.0, -8.0, 54.0], [22.0, 11.0, 13.0, -48.0, -12.0]], [[-55.0, -43.0, 62.0, 
+-49.0, -81.0], [-6.0, 7.0, 41.0, -44.0, -22.0], [49.0, -73.0, 32.0, -29.0, -86.0], [-100.0, -6.0, -19.0, 74.0, 76.0]], [[15.0, 
+9.0, -26.0, 6.0, 8.0], [-56.0, 44.0, 27.0, -4.0, 47.0], [24.0, 18.0, -57.0, -11.0, 83.0], [-5.0, -61.0, 13.0, -79.0, 0.0]]], 
+[[[-49.0, -12.0, -30.0, 23.0, 13.0], [-18.0, 24.0, 24.0, -45.0, -31.0], [33.0, 116.0, -63.0, 12.0, 44.0], [58.0, -40.0, -43.0, 
+-8.0, 50.0]], [[14.0, 32.0, 12.0, -38.0, -2.0], [32.0, -20.0, 20.0, -14.0, 14.0], [66.0, -24.0, 62.0, 12.0, -52.0], [-32.0, 
+-6.0, -56.0, 24.0, -12.0]], [[-75.0, -3.0, 7.0, 11.0, -22.0], [25.0, -25.0, -25.0, -12.0, -56.0], [-28.0, 22.0, 19.0, 0.0, 
+-79.0], [33.0, 44.0, 14.0, 57.0, 58.0]], [[18.0, -11.0, 34.0, 3.0, -14.0], [36.0, -48.0, -56.0, 55.0, -10.0], [-89.0, -111.0, 
+59.0, -14.0, -72.0], [-29.0, 82.0, 79.0, 41.0, -32.0]], [[61.0, -76.0, 11.0, 22.0, 0.0], [-59.0, 51.0, 9.0, 21.0, 20.0], 
+[-57.0, -23.0, -88.0, -22.0, 127.0], [-32.0, -25.0, 44.0, -44.0, -38.0]]], [[[-3.0, -42.0, -27.0, 47.0, 31.0], [-25.0, 14.0, 
+1.0, -5.0, -15.0], [-28.0, 64.0, -85.0, 0.0, 88.0], [45.0, -25.0, 19.0, -33.0, 6.0]], [[36.0, -20.0, 4.0, 31.0, 12.0], [4.0, 
+-7.0, -57.0, 56.0, -11.0], [-113.0, -28.0, -8.0, -3.0, 22.0], [27.0, 61.0, 70.0, -1.0, -50.0]], [[10.0, 60.0, -19.0, -32.0, 
+-19.0], [-45.0, 86.0, 16.0, -14.0, 22.0], [27.0, 91.0, -7.0, 19.0, 43.0], [39.0, -24.0, -69.0, -35.0, -10.0]], [[-2.0, 42.0, 
+34.0, -62.0, -92.0], [-62.0, 110.0, -6.0, 8.0, 12.0], [-36.0, 4.0, 30.0, -8.0, -18.0], [-18.0, 30.0, -22.0, 10.0, 4.0]], 
+[[23.0, 62.0, 21.0, -56.0, -62.0], [-37.0, 89.0, -19.0, 21.0, 16.0], [-37.0, 15.0, 48.0, 8.0, -17.0], [6.0, 41.0, -34.0, 6.0, 
+-30.0]]], [[[-32.0, 51.0, -2.0, -18.0, -34.0], [-18.0, 25.0, -17.0, 9.0, 9.0], [-16.0, -1.0, 29.0, -5.0, -44.0], [12.0, 20.0, 
+18.0, -8.0, 22.0]], [[15.0, -1.0, 32.0, -53.0, -17.0], [34.0, -1.0, 43.0, -42.0, -12.0], [89.0, 5.0, 54.0, 19.0, -44.0], 
+[-44.0, -13.0, -112.0, 64.0, -4.0]], [[-47.0, 70.0, -54.0, 3.0, 61.0], [50.0, -76.0, 42.0, -49.0, 23.0], [149.0, 44.0, 31.0, 
+22.0, -50.0], [24.0, -70.0, -57.0, -30.0, 42.0]], [[-85.0, -76.0, -7.0, 62.0, 19.0], [23.0, -73.0, -2.0, -25.0, -56.0], [-13.0, 
+-4.0, -55.0, -21.0, -24.0], [10.0, -6.0, 67.0, 28.0, 84.0]], [[7.0, -44.0, -29.0, 59.0, 96.0], [75.0, -128.0, 8.0, -7.0, -9.0], 
+[46.0, -27.0, -16.0, 7.0, 3.0], [3.0, -29.0, 23.0, -3.0, -8.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank1_offset0(self):
-      arg0=numpy.array([-7.0, 0.0])
-      arg1=Data(numpy.array([-3.0, 4.0]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[7.0, 7.0], [-1.0, -5.0]], [[-6.0, -6.0], [4.0, -3.0]], [[-4.0, -6.0], [-4.0, 7.0]], [[-3.0, 
+-7.0], [-6.0, 0.0]], [[-4.0, 6.0], [0.0, -2.0]], [[-4.0, 1.0], [-5.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 5.0], [7.0, 
+-1.0]], [[6.0, 7.0], [-2.0, 5.0]], [[3.0, 5.0], [0.0, -2.0]], [[5.0, 0.0], [-1.0, -6.0]], [[6.0, 4.0], [5.0, 0.0]], [[-3.0, 
+0.0], [7.0, 7.0]]])
+      arg1=-5.0
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[21.0, -28.0], [0.0, 0.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-35.0, -35.0], [5.0, 25.0]], [[30.0, 30.0], [-20.0, 15.0]], [[20.0, 30.0], [20.0, -35.0]], 
+[[15.0, 35.0], [30.0, -0.0]], [[20.0, -30.0], [-0.0, 10.0]], [[20.0, -5.0], [25.0, -25.0]]])+(1.-msk_ref)*numpy.array([[[-5.0, 
+-25.0], [-35.0, 5.0]], [[-30.0, -35.0], [10.0, -25.0]], [[-15.0, -25.0], [-0.0, 10.0]], [[-25.0, -0.0], [5.0, 30.0]], [[-30.0, 
+-20.0], [-25.0, -0.0]], [[15.0, -0.0], [-35.0, -35.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank2_offset1(self):
-      arg0=numpy.array([[1.0, -2.0, -6.0], [3.0, -1.0, 2.0]])
-      arg1=Data(numpy.array([[1.0, 3.0], [4.0, -1.0], [-1.0, 2.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, -1.0], [-4.0, 5.0]], [[-3.0, 5.0], [6.0, 2.0]], [[0.0, -2.0], [2.0, 3.0]], [[6.0, 
+7.0], [2.0, 5.0]], [[0.0, 4.0], [1.0, 3.0]], [[-5.0, 0.0], [-6.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -6.0], [-6.0, 
+-4.0]], [[-2.0, -2.0], [7.0, -5.0]], [[5.0, 3.0], [2.0, 1.0]], [[1.0, 0.0], [0.0, 2.0]], [[-5.0, -7.0], [4.0, 7.0]], [[3.0, 
+-4.0], [5.0, -2.0]]])
+      arg1=numpy.array(6.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-6.0, -6.0], [-24.0, 30.0]], [[-18.0, 30.0], [36.0, 12.0]], [[0.0, -12.0], [12.0, 18.0]], 
+[[36.0, 42.0], [12.0, 30.0]], [[0.0, 24.0], [6.0, 18.0]], [[-30.0, 0.0], [-36.0, 6.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 
+-36.0], [-36.0, -24.0]], [[-12.0, -12.0], [42.0, -30.0]], [[30.0, 18.0], [12.0, 6.0]], [[6.0, 0.0], [0.0, 12.0]], [[-30.0, 
+-42.0], [24.0, 42.0]], [[18.0, -24.0], [30.0, -12.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank4_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, -7.0, 2.0], [-2.0, -4.0, 1.0]], [[3.0, -4.0, 3.0], [5.0, 5.0, -2.0]]], [[[7.0, -7.0, 
+-6.0], [3.0, -2.0, 0.0]], [[-3.0, -3.0, -4.0], [6.0, 2.0, -2.0]]], [[[1.0, -6.0, -3.0], [6.0, -1.0, -7.0]], [[-7.0, 6.0, -5.0], 
+[-7.0, 6.0, 2.0]]], [[[-4.0, 5.0, 7.0], [2.0, 1.0, -3.0]], [[2.0, 0.0, -4.0], [7.0, -4.0, -2.0]]], [[[4.0, -1.0, -4.0], [-6.0, 
+-5.0, 4.0]], [[-6.0, 0.0, -7.0], [-5.0, 7.0, 0.0]]], [[[2.0, 0.0, 1.0], [7.0, -7.0, 6.0]], [[0.0, -3.0, 7.0], [3.0, 4.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, -5.0, -3.0], [-1.0, 0.0, 7.0]], [[1.0, 1.0, 3.0], [2.0, -1.0, -6.0]]], [[[-6.0, 
+6.0, 3.0], [-4.0, 7.0, 0.0]], [[-1.0, 7.0, -3.0], [4.0, 7.0, -6.0]]], [[[0.0, -2.0, -7.0], [-5.0, 1.0, 5.0]], [[4.0, -2.0, 
+0.0], [5.0, 6.0, -6.0]]], [[[4.0, 7.0, 7.0], [0.0, 0.0, 3.0]], [[-7.0, -2.0, -5.0], [6.0, -5.0, 7.0]]], [[[-1.0, 0.0, -2.0], 
+[-2.0, 7.0, 2.0]], [[0.0, 5.0, -2.0], [-4.0, 5.0, 1.0]]], [[[3.0, -3.0, -4.0], [-3.0, 0.0, 1.0]], [[2.0, 3.0, -7.0], [0.0, 
+-5.0, 3.0]]]])
+      arg1=numpy.array([-1.0, 0.0, -7.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-1.0, -7.0], [-3.0, 14.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-14.0, -5.0], [-24.0, 9.0]], [[35.0, -3.0], [31.0, 8.0]], [[20.0, 43.0], [42.0, -7.0]], 
+[[-45.0, 19.0], [26.0, 7.0]], [[24.0, -22.0], [55.0, 5.0]], [[-9.0, -49.0], [-49.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[28.0, 
+-48.0], [-22.0, 40.0]], [[-15.0, 4.0], [22.0, 38.0]], [[49.0, -30.0], [-4.0, 37.0]], [[-53.0, -21.0], [42.0, -55.0]], [[15.0, 
+-12.0], [14.0, -3.0]], [[25.0, -4.0], [47.0, -21.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank3_offset2(self):
-      arg0=numpy.array([[[-1.0, -6.0, 0.0], [-2.0, 0.0, 7.0]], [[-5.0, 5.0, 3.0], [-1.0, -4.0, -3.0]]])
-      arg1=Data(numpy.array([[[1.0, 0.0], [-3.0, -4.0], [-2.0, -5.0]], [[6.0, 0.0], [3.0, -1.0], [3.0, 
--6.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[26.0, -18.0], [-53.0, -13.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, 0.0], [-5.0, 1.0]], [[6.0, 5.0], [6.0, -6.0]], [[1.0, -6.0], [7.0, -7.0]], [[0.0, 
+-5.0], [-5.0, -1.0]], [[-6.0, 6.0], [0.0, -2.0]], [[3.0, -4.0], [0.0, 2.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, -5.0], [-2.0, 
+4.0]], [[0.0, 6.0], [6.0, 6.0]], [[1.0, 1.0], [6.0, -2.0]], [[-3.0, -7.0], [6.0, -5.0]], [[2.0, 6.0], [-7.0, -3.0]], [[7.0, 
+2.0], [-6.0, 1.0]]])
+      arg1=numpy.array([6.0, -6.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-6.0, 6.0], [0.0, 0.0]], [[-30.0, 30.0], [6.0, -6.0]]], [[[36.0, -36.0], [30.0, -30.0]], 
+[[36.0, -36.0], [-36.0, 36.0]]], [[[6.0, -6.0], [-36.0, 36.0]], [[42.0, -42.0], [-42.0, 42.0]]], [[[0.0, 0.0], [-30.0, 30.0]], 
+[[-30.0, 30.0], [-6.0, 6.0]]], [[[-36.0, 36.0], [36.0, -36.0]], [[0.0, 0.0], [-12.0, 12.0]]], [[[18.0, -18.0], [-24.0, 24.0]], 
+[[0.0, 0.0], [12.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[36.0, -36.0], [-30.0, 30.0]], [[-12.0, 12.0], [24.0, -24.0]]], 
+[[[0.0, 0.0], [36.0, -36.0]], [[36.0, -36.0], [36.0, -36.0]]], [[[6.0, -6.0], [6.0, -6.0]], [[36.0, -36.0], [-12.0, 12.0]]], 
+[[[-18.0, 18.0], [-42.0, 42.0]], [[36.0, -36.0], [-30.0, 30.0]]], [[[12.0, -12.0], [36.0, -36.0]], [[-42.0, 42.0], [-18.0, 
+18.0]]], [[[42.0, -42.0], [12.0, -12.0]], [[-36.0, 36.0], [6.0, -6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank4_offset3(self):
-      arg0=numpy.array([[[[-5.0, -5.0, 6.0], [-7.0, -7.0, 5.0], [1.0, 6.0, -7.0], [0.0, 1.0, -4.0]], [[-6.0, -7.0, 3.0], [2.0, 
--3.0, -7.0], [-3.0, -2.0, -4.0], [4.0, -4.0, -4.0]]], [[[-3.0, 0.0, 6.0], [-2.0, 0.0, 7.0], [-4.0, -6.0, -3.0], [1.0, -5.0, 
--6.0]], [[5.0, 7.0, -5.0], [3.0, -2.0, 6.0], [-7.0, -1.0, -7.0], [-4.0, 6.0, 5.0]]]])
-      arg1=Data(numpy.array([[[[7.0, -7.0], [5.0, 4.0], [4.0, -4.0]], [[4.0, 0.0], [6.0, -7.0], [-5.0, 6.0]], [[-4.0, -6.0], 
-[-3.0, -5.0], [0.0, 1.0]], [[1.0, -5.0], [-7.0, -4.0], [0.0, -5.0]]], [[[4.0, 1.0], [-2.0, -4.0], [-7.0, 7.0]], [[1.0, 4.0], 
-[-4.0, 0.0], [3.0, 2.0]], [[2.0, 4.0], [1.0, 5.0], [4.0, -2.0]], [[7.0, 3.0], [-3.0, 5.0], [-4.0, 2.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[-166.0, 50.0], [-9.0, 110.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -7.0, 4.0], [-6.0, -1.0, -5.0]], [[-1.0, 6.0, 1.0], [6.0, -3.0, 3.0]]], [[[-7.0, 7.0, 
+-6.0], [-1.0, -2.0, 5.0]], [[7.0, -6.0, -4.0], [0.0, -6.0, 3.0]]], [[[-1.0, 3.0, 0.0], [-3.0, 3.0, 3.0]], [[0.0, 7.0, 5.0], 
+[5.0, 5.0, 2.0]]], [[[5.0, -3.0, -1.0], [5.0, 4.0, -6.0]], [[-2.0, -5.0, 6.0], [6.0, 7.0, -2.0]]], [[[-6.0, 4.0, 1.0], [3.0, 
+-3.0, 7.0]], [[2.0, -5.0, 0.0], [0.0, 0.0, -1.0]]], [[[0.0, 3.0, 1.0], [3.0, 5.0, 6.0]], [[-5.0, -2.0, -6.0], [4.0, 0.0, 
+-6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 6.0, 7.0], [0.0, 0.0, 4.0]], [[-2.0, -5.0, 5.0], [1.0, -7.0, 4.0]]], [[[-5.0, 
+5.0, -1.0], [7.0, 0.0, 2.0]], [[2.0, 0.0, -2.0], [-3.0, 5.0, -1.0]]], [[[5.0, 3.0, -7.0], [-1.0, 0.0, 0.0]], [[-7.0, 3.0, 
+-5.0], [7.0, -1.0, 0.0]]], [[[0.0, 4.0, 2.0], [2.0, 1.0, -2.0]], [[7.0, 2.0, -6.0], [-2.0, -4.0, 3.0]]], [[[3.0, -2.0, 0.0], 
+[7.0, -4.0, -2.0]], [[-1.0, -1.0, -4.0], [-3.0, 1.0, 0.0]]], [[[-4.0, 4.0, -3.0], [-1.0, -3.0, -2.0]], [[-7.0, -2.0, 7.0], 
+[-6.0, -5.0, 3.0]]]])
+      arg1=numpy.array([[0.0, -1.0], [5.0, -3.0], [-7.0, -5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-63.0, -5.0], [30.0, 34.0]], [[23.0, -22.0], [-36.0, -12.0]]], [[[77.0, 16.0], [-45.0, 
+-18.0]], [[-2.0, 31.0], [-51.0, 3.0]]], [[[15.0, -8.0], [-6.0, -21.0]], [[0.0, -46.0], [11.0, -30.0]]], [[[-8.0, 9.0], [62.0, 
+13.0]], [[-67.0, -13.0], [49.0, -17.0]]], [[[13.0, -11.0], [-64.0, -29.0]], [[-25.0, 13.0], [7.0, 5.0]]], [[[8.0, -14.0], 
+[-17.0, -48.0]], [[32.0, 41.0], [42.0, 26.0]]]])+(1.-msk_ref)*numpy.array([[[[-19.0, -47.0], [-28.0, -20.0]], [[-60.0, -8.0], 
+[-63.0, 0.0]]], [[[32.0, -5.0], [-14.0, -17.0]], [[14.0, 8.0], [32.0, -7.0]]], [[[64.0, 21.0], [0.0, 1.0]], [[50.0, 23.0], 
+[-5.0, -4.0]]], [[[6.0, -22.0], [19.0, 5.0]], [[52.0, 17.0], [-41.0, -1.0]]], [[[-10.0, 3.0], [-6.0, 15.0]], [[23.0, 24.0], 
+[5.0, 0.0]]], [[[41.0, 7.0], [-1.0, 20.0]], [[-59.0, -22.0], [-46.0, 6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank2_offset0(self):
-      arg0=numpy.array([-4.0, -3.0])
-      arg1=Data(numpy.array([[5.0, -4.0, 2.0, 7.0, 4.0], [3.0, -1.0, 7.0, -6.0, 2.0], [6.0, 0.0, 6.0, -4.0, 6.0], [-6.0, -5.0, 
--6.0, 3.0, -4.0]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, -4.0], [-2.0, 2.0]], [[-1.0, -2.0], [-2.0, 2.0]], [[-5.0, 4.0], [5.0, 7.0]], [[0.0, 
+0.0], [7.0, 4.0]], [[3.0, 3.0], [6.0, 0.0]], [[5.0, 3.0], [0.0, -7.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 0.0], [7.0, -6.0]], 
+[[7.0, 0.0], [4.0, 2.0]], [[-6.0, -7.0], [-2.0, 7.0]], [[6.0, -7.0], [2.0, 7.0]], [[1.0, 6.0], [-2.0, 4.0]], [[0.0, 2.0], 
+[-3.0, -5.0]]])
+      arg1=Data(-1.0,self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-20.0, 16.0, -8.0, -28.0, -16.0], [-12.0, 4.0, -28.0, 24.0, -8.0], [-24.0, 0.0, -24.0, 16.0, 
--24.0], [24.0, 20.0, 24.0, -12.0, 16.0]], [[-15.0, 12.0, -6.0, -21.0, -12.0], [-9.0, 3.0, -21.0, 18.0, -6.0], [-18.0, 0.0, 
--18.0, 12.0, -18.0], [18.0, 15.0, 18.0, -9.0, 12.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-1.0, 4.0], [2.0, -2.0]], [[1.0, 2.0], [2.0, -2.0]], [[5.0, -4.0], [-5.0, -7.0]], [[-0.0, 
+-0.0], [-7.0, -4.0]], [[-3.0, -3.0], [-6.0, -0.0]], [[-5.0, -3.0], [-0.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, -0.0], 
+[-7.0, 6.0]], [[-7.0, -0.0], [-4.0, -2.0]], [[6.0, 7.0], [2.0, -7.0]], [[-6.0, 7.0], [-2.0, -7.0]], [[-1.0, -6.0], [2.0, 
+-4.0]], [[-0.0, -2.0], [3.0, 5.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank3_offset1(self):
-      arg0=numpy.array([[0.0, 6.0, 4.0], [-5.0, -3.0, -4.0]])
-      arg1=Data(numpy.array([[[0.0, 7.0, -6.0, 2.0, -7.0], [6.0, -4.0, -2.0, -2.0, 6.0], [-7.0, -5.0, -6.0, 7.0, -5.0], [-1.0, 
-0.0, 3.0, -2.0, -7.0]], [[-7.0, -1.0, -4.0, 3.0, 0.0], [6.0, -6.0, 2.0, 4.0, 5.0], [0.0, -3.0, -6.0, 1.0, -1.0], [-7.0, -3.0, 
-0.0, 5.0, -5.0]], [[-6.0, -7.0, -3.0, 4.0, 1.0], [0.0, 3.0, -1.0, 3.0, 0.0], [-7.0, 6.0, -5.0, -4.0, -7.0], [6.0, 3.0, 3.0, 
-7.0, 5.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, 0.0, 5.0], [3.0, -3.0, 4.0]], [[7.0, 5.0, -1.0], [-6.0, -2.0, 7.0]]], [[[7.0, 5.0, 
+4.0], [-6.0, 3.0, -4.0]], [[4.0, 0.0, 2.0], [1.0, -3.0, 0.0]]], [[[-6.0, 5.0, 5.0], [6.0, -3.0, 5.0]], [[5.0, -4.0, -2.0], 
+[4.0, 5.0, 2.0]]], [[[-6.0, 5.0, -7.0], [0.0, 2.0, -4.0]], [[1.0, -5.0, -1.0], [5.0, 7.0, -4.0]]], [[[6.0, -6.0, 6.0], [4.0, 
+4.0, 6.0]], [[-5.0, 7.0, 7.0], [0.0, -6.0, 2.0]]], [[[0.0, 7.0, 2.0], [0.0, -7.0, 0.0]], [[-1.0, 2.0, -4.0], [-6.0, 3.0, 
+4.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -5.0, -2.0], [1.0, 7.0, -6.0]], [[5.0, 6.0, 7.0], [0.0, -6.0, -4.0]]], [[[3.0, 
+-6.0, -7.0], [0.0, 6.0, 0.0]], [[-5.0, 6.0, -1.0], [-4.0, 0.0, -2.0]]], [[[2.0, 3.0, -5.0], [3.0, 3.0, -4.0]], [[0.0, 7.0, 
+-5.0], [-5.0, -7.0, 0.0]]], [[[4.0, 7.0, 4.0], [-2.0, 2.0, -3.0]], [[-2.0, -2.0, 0.0], [-2.0, 5.0, -2.0]]], [[[1.0, 3.0, 0.0], 
+[7.0, 4.0, 2.0]], [[6.0, 1.0, -2.0], [5.0, 3.0, -5.0]]], [[[2.0, 0.0, 0.0], [3.0, -1.0, -4.0]], [[-4.0, -2.0, 0.0], [0.0, -5.0, 
+2.0]]]])
+      arg1=Data(numpy.array([-4.0, 2.0, -6.0]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-66.0, -34.0, -36.0, 34.0, 4.0], [36.0, -24.0, 8.0, 36.0, 30.0], [-28.0, 6.0, -56.0, -10.0, 
--34.0], [-18.0, -6.0, 12.0, 58.0, -10.0]], [[45.0, -4.0, 54.0, -35.0, 31.0], [-48.0, 26.0, 8.0, -14.0, -45.0], [63.0, 10.0, 
-68.0, -22.0, 56.0], [2.0, -3.0, -27.0, -33.0, 30.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-58.0, -42.0], [-12.0, -22.0]], [[-42.0, 54.0], [-28.0, -10.0]], [[4.0, -60.0], [-16.0, 
+-18.0]], [[76.0, 28.0], [-8.0, 18.0]], [[-72.0, -44.0], [-8.0, -24.0]], [[2.0, -14.0], [32.0, 
+6.0]]])+(1.-msk_ref)*numpy.array([[[-6.0, 46.0], [-50.0, 12.0]], [[18.0, 12.0], [38.0, 28.0]], [[28.0, 18.0], [44.0, 6.0]], 
+[[-26.0, 30.0], [4.0, 30.0]], [[2.0, -32.0], [-10.0, 16.0]], [[-8.0, 10.0], [12.0, -22.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank4_offset2(self):
-      arg0=numpy.array([[[2.0, 4.0, 4.0], [7.0, -3.0, 1.0]], [[4.0, 3.0, -4.0], [-3.0, -5.0, 0.0]]])
-      arg1=Data(numpy.array([[[[-5.0, -4.0, 0.0, 2.0, 2.0], [-2.0, 0.0, 0.0, 7.0, 5.0], [-4.0, -1.0, 1.0, 4.0, -2.0], [0.0, 
-6.0, -4.0, 7.0, 0.0]], [[0.0, 5.0, 1.0, 0.0, 1.0], [3.0, 3.0, -6.0, 2.0, -4.0], [-6.0, 3.0, 2.0, -4.0, 1.0], [-7.0, -1.0, 5.0, 
-3.0, -3.0]], [[1.0, 4.0, 2.0, 7.0, 3.0], [5.0, -3.0, 3.0, 3.0, -7.0], [-3.0, 2.0, 7.0, -4.0, -6.0], [5.0, -7.0, 4.0, 3.0, 
-2.0]]], [[[2.0, 1.0, 0.0, -6.0, 0.0], [-7.0, 1.0, -4.0, 3.0, -6.0], [-1.0, 4.0, 2.0, 3.0, -1.0], [0.0, -2.0, 0.0, 6.0, 3.0]], 
-[[0.0, -3.0, 5.0, -7.0, -2.0], [-1.0, 7.0, -2.0, -1.0, 1.0], [2.0, -7.0, 3.0, 7.0, 3.0], [-2.0, 5.0, 0.0, -4.0, 3.0]], [[7.0, 
--1.0, -2.0, 4.0, 6.0], [2.0, 1.0, 2.0, 0.0, 6.0], [2.0, 6.0, -1.0, -2.0, -2.0], [3.0, -4.0, 5.0, 5.0, 
--7.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[15.0, 43.0, -5.0, 15.0, 32.0], [-16.0, -13.0, -32.0, 58.0, -73.0], [-55.0, 73.0, 42.0, -26.0, 
--42.0], [1.0, -53.0, 33.0, 97.0, 1.0]], [[-30.0, -5.0, -30.0, 33.0, 9.0], [7.0, -17.0, -8.0, 18.0, 49.0], [-29.0, 20.0, -39.0, 
--24.0, 7.0], [-31.0, 30.0, -17.0, 27.0, -41.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_constData_rank3_offset0(self):
-      arg0=numpy.array([-4.0, -3.0])
-      arg1=Data(numpy.array([[[3.0, 0.0], [7.0, -4.0]], [[-4.0, 3.0], [-4.0, -3.0]], [[4.0, -1.0], [1.0, 2.0]], [[4.0, 5.0], 
-[-7.0, 1.0]], [[-5.0, 4.0], [4.0, 2.0]], [[0.0, -4.0], [-4.0, 2.0]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank3_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -5.0], [-7.0, -5.0]], [[2.0, -6.0], [-3.0, 5.0]], [[-6.0, -2.0], [1.0, -3.0]], [[-7.0, 
+3.0], [0.0, -4.0]], [[-4.0, 3.0], [-3.0, 3.0]], [[2.0, -6.0], [-3.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -4.0], [-2.0, 
+7.0]], [[5.0, 0.0], [3.0, -6.0]], [[-1.0, -5.0], [4.0, -1.0]], [[-2.0, 6.0], [7.0, 5.0]], [[-5.0, -1.0], [4.0, -7.0]], [[6.0, 
+-3.0], [0.0, -3.0]]])
+      arg1=Data(numpy.array([2.0, -4.0]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-12.0, 0.0], [-28.0, 16.0]], [[16.0, -12.0], [16.0, 12.0]], [[-16.0, 4.0], [-4.0, -8.0]], 
-[[-16.0, -20.0], [28.0, -4.0]], [[20.0, -16.0], [-16.0, -8.0]], [[0.0, 16.0], [16.0, -8.0]]], [[[-9.0, 0.0], [-21.0, 12.0]], 
-[[12.0, -9.0], [12.0, 9.0]], [[-12.0, 3.0], [-3.0, -6.0]], [[-12.0, -15.0], [21.0, -3.0]], [[15.0, -12.0], [-12.0, -6.0]], 
-[[0.0, 12.0], [12.0, -6.0]]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [-10.0, 20.0]], [[-14.0, 28.0], [-10.0, 20.0]]], [[[4.0, -8.0], [-12.0, 24.0]], 
+[[-6.0, 12.0], [10.0, -20.0]]], [[[-12.0, 24.0], [-4.0, 8.0]], [[2.0, -4.0], [-6.0, 12.0]]], [[[-14.0, 28.0], [6.0, -12.0]], 
+[[0.0, 0.0], [-8.0, 16.0]]], [[[-8.0, 16.0], [6.0, -12.0]], [[-6.0, 12.0], [6.0, -12.0]]], [[[4.0, -8.0], [-12.0, 24.0]], 
+[[-6.0, 12.0], [0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [-8.0, 16.0]], [[-4.0, 8.0], [14.0, -28.0]]], [[[10.0, 
+-20.0], [0.0, 0.0]], [[6.0, -12.0], [-12.0, 24.0]]], [[[-2.0, 4.0], [-10.0, 20.0]], [[8.0, -16.0], [-2.0, 4.0]]], [[[-4.0, 
+8.0], [12.0, -24.0]], [[14.0, -28.0], [10.0, -20.0]]], [[[-10.0, 20.0], [-2.0, 4.0]], [[8.0, -16.0], [-14.0, 28.0]]], [[[12.0, 
+-24.0], [-6.0, 12.0]], [[0.0, 0.0], [-6.0, 12.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank4_offset1(self):
-      arg0=numpy.array([[1.0, -4.0, 7.0], [-3.0, 5.0, 1.0]])
-      arg1=Data(numpy.array([[[[-1.0, 4.0], [0.0, -6.0]], [[4.0, 2.0], [7.0, -2.0]], [[-5.0, 3.0], [5.0, 2.0]], [[0.0, 1.0], 
-[0.0, 3.0]], [[-3.0, 5.0], [-4.0, 2.0]], [[7.0, -6.0], [4.0, -3.0]]], [[[-3.0, 2.0], [1.0, -3.0]], [[2.0, -4.0], [5.0, -1.0]], 
-[[5.0, -7.0], [-3.0, 4.0]], [[-5.0, -5.0], [3.0, -5.0]], [[0.0, -6.0], [0.0, -1.0]], [[3.0, -2.0], [2.0, 5.0]]], [[[-1.0, 1.0], 
-[-5.0, -5.0]], [[-5.0, -6.0], [4.0, -4.0]], [[-2.0, 0.0], [3.0, -7.0]], [[1.0, 6.0], [1.0, 4.0]], [[2.0, 3.0], [2.0, 3.0]], 
-[[-1.0, 0.0], [4.0, -2.0]]]]),self.functionspace)
+   def test_generalTensorProduct_expandedData_rank4_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, -6.0, 0.0], [4.0, -4.0, 7.0]], [[-7.0, -3.0, 5.0], [1.0, -2.0, 1.0]]], [[[2.0, 0.0, 
+-3.0], [0.0, 0.0, 7.0]], [[5.0, 7.0, -4.0], [2.0, -1.0, 0.0]]], [[[1.0, 2.0, 6.0], [-2.0, 5.0, 7.0]], [[-3.0, -2.0, 3.0], 
+[-7.0, 4.0, -6.0]]], [[[-2.0, 7.0, 5.0], [4.0, -2.0, -6.0]], [[5.0, -4.0, -4.0], [5.0, -6.0, 2.0]]], [[[-4.0, 0.0, 7.0], [-3.0, 
+0.0, -3.0]], [[-4.0, -7.0, -7.0], [-1.0, 0.0, -6.0]]], [[[5.0, 1.0, -6.0], [0.0, 4.0, 1.0]], [[1.0, 4.0, -3.0], [3.0, 0.0, 
+-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, -2.0, 7.0], [0.0, 2.0, -4.0]], [[-4.0, 0.0, 2.0], [0.0, 4.0, 5.0]]], [[[-1.0, 6.0, 
+-3.0], [0.0, -1.0, -1.0]], [[-3.0, 5.0, 6.0], [-1.0, 7.0, 3.0]]], [[[-6.0, 1.0, -3.0], [0.0, -4.0, -7.0]], [[1.0, -4.0, -7.0], 
+[4.0, 7.0, -4.0]]], [[[1.0, 0.0, -7.0], [3.0, 0.0, 6.0]], [[-2.0, -1.0, 0.0], [-4.0, 0.0, 2.0]]], [[[7.0, 4.0, -5.0], [0.0, 
+-5.0, 2.0]], [[-3.0, 1.0, -5.0], [-6.0, 7.0, 2.0]]], [[[7.0, 3.0, 7.0], [-3.0, 0.0, 1.0]], [[0.0, 2.0, 0.0], [-3.0, -6.0, 
+4.0]]]])
+      arg1=Data(numpy.array([[4.0, -4.0], [-6.0, 1.0], [5.0, -7.0]]),self.functionspace)
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[4.0, 3.0], [-39.0, -29.0]], [[-39.0, -24.0], [15.0, -26.0]], [[-39.0, 31.0], [38.0, -63.0]], 
-[[27.0, 63.0], [-5.0, 51.0]], [[11.0, 50.0], [10.0, 27.0]], [[-12.0, 2.0], [24.0, -37.0]]], [[[-13.0, -1.0], [0.0, -2.0]], 
-[[-7.0, -32.0], [8.0, -3.0]], [[38.0, -44.0], [-27.0, 7.0]], [[-24.0, -22.0], [16.0, -30.0]], [[11.0, -42.0], [14.0, -8.0]], 
-[[-7.0, 8.0], [2.0, 32.0]]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[8.0, 22.0], [75.0, -69.0]], [[15.0, -10.0], [21.0, -13.0]]], [[[-7.0, 13.0], [35.0, -49.0]], 
+[[-42.0, 15.0], [14.0, -9.0]]], [[[22.0, -44.0], [-3.0, -36.0]], [[15.0, -11.0], [-82.0, 74.0]]], [[[-25.0, -20.0], [-2.0, 
+24.0]], [[24.0, 4.0], [66.0, -40.0]]], [[[19.0, -33.0], [-27.0, 33.0]], [[-9.0, 58.0], [-34.0, 46.0]]], [[[-16.0, 23.0], 
+[-19.0, -3.0]], [[-35.0, 21.0], [-3.0, 9.0]]]])+(1.-msk_ref)*numpy.array([[[[59.0, -63.0], [-32.0, 30.0]], [[-6.0, 2.0], [1.0, 
+-31.0]]], [[[-55.0, 31.0], [1.0, 6.0]], [[-12.0, -25.0], [-31.0, -10.0]]], [[[-45.0, 46.0], [-11.0, 45.0]], [[-7.0, 41.0], 
+[-46.0, 19.0]]], [[[-31.0, 45.0], [42.0, -54.0]], [[-2.0, 7.0], [-6.0, 2.0]]], [[[-21.0, 11.0], [40.0, -19.0]], [[-43.0, 48.0], 
+[-56.0, 17.0]]], [[[45.0, -74.0], [-7.0, 5.0]], [[-12.0, 2.0], [44.0, -22.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank0_offset0(self):
-      arg0=numpy.array([-4.0, -2.0])
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[7.0, 6.0], [5.0, 1.0]], [[-6.0, -1.0], [-6.0, -2.0]], [[2.0, -4.0], [0.0, 4.0]], [[6.0, 
+3.0], [7.0, 6.0]], [[-5.0, 4.0], [-2.0, -6.0]], [[-5.0, -5.0], [6.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 0.0], [1.0, 
+3.0]], [[4.0, -7.0], [-4.0, 7.0]], [[-2.0, 0.0], [-5.0, -5.0]], [[2.0, -2.0], [-3.0, 0.0]], [[4.0, -5.0], [6.0, 5.0]], [[1.0, 
+1.0], [3.0, -1.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-7.0)+(1-msk_arg1)*(4.0)
+      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(2.0)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([28.0, 14.0])+(1.-msk_ref)*numpy.array([-16.0, -8.0])
+      ref=msk_ref*numpy.array([[[7.0, 6.0], [5.0, 1.0]], [[-6.0, -1.0], [-6.0, -2.0]], [[2.0, -4.0], [0.0, 4.0]], [[6.0, 3.0], 
+[7.0, 6.0]], [[-5.0, 4.0], [-2.0, -6.0]], [[-5.0, -5.0], [6.0, -5.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [2.0, 6.0]], 
+[[8.0, -14.0], [-8.0, 14.0]], [[-4.0, 0.0], [-10.0, -10.0]], [[4.0, -4.0], [-6.0, 0.0]], [[8.0, -10.0], [12.0, 10.0]], [[2.0, 
+2.0], [6.0, -2.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[4.0, -1.0, -3.0], [-5.0, 6.0, 7.0]])
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-1.0, -5.0, 3.0], [1.0, 0.0, -3.0]], [[6.0, -6.0, 0.0], [1.0, -4.0, 3.0]]], [[[-5.0, -6.0, 
+-4.0], [-4.0, -3.0, -5.0]], [[-4.0, -5.0, -1.0], [-7.0, -6.0, -3.0]]], [[[-3.0, -7.0, -6.0], [6.0, -3.0, -5.0]], [[-3.0, -1.0, 
+1.0], [5.0, -1.0, -5.0]]], [[[0.0, 6.0, 4.0], [6.0, -3.0, 0.0]], [[-1.0, -3.0, -2.0], [6.0, 4.0, -6.0]]], [[[4.0, 7.0, -5.0], 
+[-4.0, 4.0, 4.0]], [[5.0, -5.0, -2.0], [-2.0, 2.0, 7.0]]], [[[7.0, -4.0, 1.0], [0.0, 5.0, 5.0]], [[-2.0, -3.0, -3.0], [7.0, 
+-2.0, -3.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 6.0, 2.0], [-6.0, -1.0, -6.0]], [[1.0, 2.0, -2.0], [0.0, 0.0, -1.0]]], 
+[[[-4.0, 0.0, -7.0], [2.0, 1.0, -2.0]], [[-6.0, 1.0, 6.0], [7.0, -5.0, 4.0]]], [[[5.0, 7.0, -1.0], [-1.0, 5.0, -4.0]], [[4.0, 
+-1.0, 0.0], [2.0, -2.0, 5.0]]], [[[-7.0, -7.0, -2.0], [1.0, -4.0, -3.0]], [[3.0, -4.0, 3.0], [-3.0, -2.0, 1.0]]], [[[-1.0, 7.0, 
+2.0], [0.0, -6.0, 7.0]], [[-3.0, -7.0, 0.0], [3.0, 7.0, 5.0]]], [[[0.0, 1.0, 3.0], [5.0, 4.0, 2.0]], [[-4.0, -6.0, 4.0], [-4.0, 
+1.0, -2.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([5.0, -3.0, -1.0])+(1.-msk_arg1)*numpy.array([-5.0, -3.0, 1.0])
+      arg1=msk_arg1*numpy.array([5.0, 4.0, -5.0])+(1.-msk_arg1)*numpy.array([7.0, -4.0, 2.0])
       res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([26.0, -50.0])+(1.-msk_ref)*numpy.array([-20.0, 14.0])
+      ref=msk_ref*numpy.array([[[-40.0, 20.0], [6.0, -26.0]], [[-29.0, -7.0], [-35.0, -44.0]], [[-13.0, 43.0], [-24.0, 46.0]], 
+[[4.0, 18.0], [-7.0, 76.0]], [[73.0, -24.0], [15.0, -37.0]], [[14.0, -5.0], [-7.0, 42.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 
+-50.0], [-5.0, -2.0]], [[-42.0, 6.0], [-34.0, 77.0]], [[5.0, -35.0], [32.0, 32.0]], [[-25.0, 17.0], [43.0, -11.0]], [[-31.0, 
+38.0], [7.0, 3.0]], [[2.0, 23.0], [4.0, -36.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[[1.0, 1.0, 7.0], [-4.0, -3.0, -3.0]], [[-4.0, -1.0, 0.0], [4.0, -4.0, -4.0]]])
+   def test_generalTensorProduct_expandedData_rank3_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, 0.0], [3.0, 6.0]], [[1.0, 0.0], [-5.0, 2.0]], [[-2.0, -7.0], [2.0, -1.0]], [[7.0, 
+-3.0], [4.0, -4.0]], [[-5.0, -5.0], [-1.0, 1.0]], [[-2.0, -3.0], [-5.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, 3.0], [-4.0, 
+0.0]], [[-4.0, 5.0], [-3.0, -2.0]], [[7.0, 7.0], [-6.0, 1.0]], [[4.0, 0.0], [3.0, -3.0]], [[-3.0, 5.0], [0.0, 7.0]], [[-6.0, 
+-3.0], [6.0, 5.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, -2.0, -1.0], [-7.0, 6.0, -4.0]])+(1.-msk_arg1)*numpy.array([[0.0, 7.0, -6.0], [3.0, 
--6.0, 1.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([-3.0, -6.0])+(1.-msk_arg1)*numpy.array([-5.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([6.0, -6.0])+(1.-msk_ref)*numpy.array([-32.0, 25.0])
+      ref=msk_ref*numpy.array([[[[-3.0, -6.0], [0.0, 0.0]], [[-9.0, -18.0], [-18.0, -36.0]]], [[[-3.0, -6.0], [0.0, 0.0]], 
+[[15.0, 30.0], [-6.0, -12.0]]], [[[6.0, 12.0], [21.0, 42.0]], [[-6.0, -12.0], [3.0, 6.0]]], [[[-21.0, -42.0], [9.0, 18.0]], 
+[[-12.0, -24.0], [12.0, 24.0]]], [[[15.0, 30.0], [15.0, 30.0]], [[3.0, 6.0], [-3.0, -6.0]]], [[[6.0, 12.0], [9.0, 18.0]], 
+[[15.0, 30.0], [0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, 0.0], [-15.0, 0.0]], [[20.0, 0.0], [0.0, 0.0]]], [[[20.0, 0.0], 
+[-25.0, 0.0]], [[15.0, 0.0], [10.0, 0.0]]], [[[-35.0, 0.0], [-35.0, 0.0]], [[30.0, 0.0], [-5.0, 0.0]]], [[[-20.0, 0.0], [0.0, 
+0.0]], [[-15.0, 0.0], [15.0, 0.0]]], [[[15.0, 0.0], [-25.0, 0.0]], [[0.0, 0.0], [-35.0, 0.0]]], [[[30.0, 0.0], [15.0, 0.0]], 
+[[-30.0, 0.0], [-25.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank3_offset3(self):
-      arg0=numpy.array([[[[0.0, 6.0, -1.0], [3.0, 3.0, -1.0], [-5.0, -4.0, -7.0], [-2.0, -6.0, 3.0]], [[1.0, 7.0, 3.0], [0.0, 
-5.0, 5.0], [-2.0, 7.0, 2.0], [5.0, 6.0, 1.0]]], [[[-2.0, 0.0, -1.0], [0.0, 7.0, -5.0], [-5.0, 1.0, -6.0], [4.0, -2.0, 1.0]], 
-[[-3.0, -1.0, 1.0], [-4.0, 4.0, -1.0], [-5.0, 7.0, -5.0], [3.0, 0.0, -1.0]]]])
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, -2.0, 6.0], [-6.0, -3.0, -5.0]], [[-1.0, 4.0, 0.0], [-4.0, -4.0, 3.0]]], [[[-7.0, 
+5.0, 3.0], [-1.0, 7.0, 0.0]], [[0.0, -3.0, -2.0], [-7.0, 1.0, 2.0]]], [[[-4.0, 2.0, -1.0], [1.0, 1.0, -4.0]], [[-5.0, -4.0, 
+3.0], [0.0, -4.0, -2.0]]], [[[0.0, 0.0, -3.0], [1.0, -1.0, 4.0]], [[7.0, 0.0, -5.0], [5.0, 2.0, -4.0]]], [[[5.0, -4.0, 2.0], 
+[3.0, -1.0, 7.0]], [[-2.0, 6.0, -4.0], [-3.0, 4.0, 1.0]]], [[[-6.0, -2.0, -3.0], [-6.0, -3.0, 2.0]], [[-1.0, 0.0, 6.0], [3.0, 
+4.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, 2.0, -6.0], [-1.0, 3.0, 5.0]], [[-6.0, -4.0, -4.0], [0.0, 0.0, -1.0]]], 
+[[[-4.0, 4.0, 7.0], [0.0, 1.0, -6.0]], [[-5.0, 0.0, 1.0], [3.0, 3.0, -5.0]]], [[[-5.0, 0.0, 1.0], [0.0, 0.0, 1.0]], [[4.0, 6.0, 
+5.0], [1.0, -2.0, 0.0]]], [[[2.0, 5.0, -5.0], [4.0, 3.0, -6.0]], [[0.0, 0.0, -6.0], [-2.0, 4.0, -1.0]]], [[[-6.0, 2.0, -4.0], 
+[-3.0, 6.0, -3.0]], [[-5.0, 6.0, 1.0], [-1.0, 2.0, -4.0]]], [[[-5.0, -4.0, -2.0], [1.0, 4.0, -3.0]], [[-5.0, 2.0, -2.0], [-6.0, 
+-2.0, 2.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, 7.0, -2.0], [-5.0, -6.0, 2.0], [3.0, -6.0, -1.0], [3.0, 0.0, 0.0]], [[4.0, -7.0, 0.0], 
-[-4.0, 5.0, -4.0], [4.0, -4.0, -5.0], [0.0, 4.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 2.0, 5.0], [-6.0, -2.0, 6.0], [0.0, 
--6.0, -2.0], [-4.0, 6.0, -3.0]], [[0.0, -2.0, 4.0], [5.0, 4.0, 6.0], [-2.0, 6.0, 7.0], [-5.0, -7.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      arg1=msk_arg1*numpy.array([[-4.0, 4.0], [5.0, -1.0], [6.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 1.0], [4.0, -6.0], 
+[-4.0, 5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-41.0, -33.0])+(1.-msk_ref)*numpy.array([16.0, -61.0])
+      ref=msk_ref*numpy.array([[[[54.0, -2.0], [-21.0, -41.0]], [[24.0, -8.0], [14.0, 0.0]]], [[[71.0, -21.0], [39.0, -11.0]], 
+[[-27.0, -5.0], [45.0, -21.0]]], [[[20.0, -22.0], [-23.0, -13.0]], [[18.0, -4.0], [-32.0, -4.0]]], [[[-18.0, -12.0], [15.0, 
+21.0]], [[-58.0, 8.0], [-34.0, 2.0]]], [[[-28.0, 32.0], [25.0, 41.0]], [[14.0, -30.0], [38.0, -12.0]]], [[[-4.0, -34.0], [21.0, 
+-13.0]], [[40.0, 20.0], [8.0, 8.0]]]])+(1.-msk_ref)*numpy.array([[[[41.0, -39.0], [-11.0, 6.0]], [[-18.0, -2.0], [4.0, -5.0]]], 
+[[[-24.0, 7.0], [28.0, -36.0]], [[-19.0, 0.0], [41.0, -40.0]]], [[[-19.0, 0.0], [-4.0, 5.0]], [[16.0, -7.0], [-5.0, 13.0]]], 
+[[[46.0, -53.0], [48.0, -44.0]], [[24.0, -30.0], [14.0, -31.0]]], [[[6.0, -38.0], [27.0, -54.0]], [[5.0, -36.0], [21.0, 
+-33.0]]], [[[-23.0, 9.0], [31.0, -38.0]], [[1.0, -27.0], [-34.0, 16.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank1_offset0(self):
-      arg0=numpy.array([-3.0, 3.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-1.0, -3.0])+(1.-msk_arg1)*numpy.array([-6.0, 4.0])
+   def test_generalTensorProduct_expandedData_rank4_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[3.0, 4.0, -7.0, 3.0], [1.0, 5.0, -6.0, 3.0], [7.0, -1.0, -3.0, -2.0]], [[4.0, -3.0, -3.0, 
+5.0], [-5.0, 3.0, 4.0, -7.0], [1.0, -4.0, -6.0, -3.0]]], [[[5.0, 6.0, -3.0, 2.0], [-2.0, 0.0, 6.0, 6.0], [-7.0, 4.0, -2.0, 
+7.0]], [[-2.0, -7.0, 1.0, -5.0], [-7.0, 4.0, -1.0, -6.0], [-6.0, -4.0, -4.0, 3.0]]], [[[6.0, -7.0, 3.0, -6.0], [4.0, -3.0, 4.0, 
+-3.0], [0.0, 1.0, 7.0, 0.0]], [[3.0, 5.0, -7.0, 2.0], [2.0, 2.0, 6.0, -5.0], [-4.0, 4.0, -1.0, 
+-1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, -2.0, 6.0, -4.0], [-2.0, 2.0, 0.0, -7.0], [0.0, 4.0, 0.0, 0.0]], [[-3.0, -6.0, 
+-3.0, -2.0], [-7.0, 1.0, -7.0, 5.0], [1.0, 2.0, 3.0, 5.0]]], [[[-3.0, 6.0, 1.0, -2.0], [0.0, 0.0, -1.0, -6.0], [1.0, 7.0, 4.0, 
+3.0]], [[-5.0, 1.0, 4.0, 4.0], [-2.0, 2.0, -4.0, 7.0], [0.0, 4.0, -2.0, 7.0]]], [[[-5.0, -4.0, 0.0, 2.0], [-2.0, -7.0, -1.0, 
+4.0], [-6.0, -5.0, 6.0, 1.0]], [[2.0, 2.0, 6.0, 5.0], [1.0, 1.0, -3.0, 2.0], [0.0, 1.0, -4.0, -1.0]]]])
+      arg1=-7.0
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[3.0, 9.0], [-3.0, -9.0]])+(1.-msk_ref)*numpy.array([[18.0, -12.0], [-18.0, 12.0]])
+      ref=msk_ref*numpy.array([[[[-21.0, -28.0, 49.0, -21.0], [-7.0, -35.0, 42.0, -21.0], [-49.0, 7.0, 21.0, 14.0]], [[-28.0, 
+21.0, 21.0, -35.0], [35.0, -21.0, -28.0, 49.0], [-7.0, 28.0, 42.0, 21.0]]], [[[-35.0, -42.0, 21.0, -14.0], [14.0, -0.0, -42.0, 
+-42.0], [49.0, -28.0, 14.0, -49.0]], [[14.0, 49.0, -7.0, 35.0], [49.0, -28.0, 7.0, 42.0], [42.0, 28.0, 28.0, -21.0]]], 
+[[[-42.0, 49.0, -21.0, 42.0], [-28.0, 21.0, -28.0, 21.0], [-0.0, -7.0, -49.0, -0.0]], [[-21.0, -35.0, 49.0, -14.0], [-14.0, 
+-14.0, -42.0, 35.0], [28.0, -28.0, 7.0, 7.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, 14.0, -42.0, 28.0], [14.0, -14.0, -0.0, 
+49.0], [-0.0, -28.0, -0.0, -0.0]], [[21.0, 42.0, 21.0, 14.0], [49.0, -7.0, 49.0, -35.0], [-7.0, -14.0, -21.0, -35.0]]], 
+[[[21.0, -42.0, -7.0, 14.0], [-0.0, -0.0, 7.0, 42.0], [-7.0, -49.0, -28.0, -21.0]], [[35.0, -7.0, -28.0, -28.0], [14.0, -14.0, 
+28.0, -49.0], [-0.0, -28.0, 14.0, -49.0]]], [[[35.0, 28.0, -0.0, -14.0], [14.0, 49.0, 7.0, -28.0], [42.0, 35.0, -42.0, -7.0]], 
+[[-14.0, -14.0, -42.0, -35.0], [-7.0, -7.0, 21.0, -14.0], [-0.0, -7.0, 28.0, 7.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[-7.0, 0.0, 1.0], [3.0, 0.0, -4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 3.0], [5.0, -5.0], [0.0, -2.0]])+(1.-msk_arg1)*numpy.array([[0.0, 1.0], [3.0, -2.0], 
-[-3.0, 6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank4_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, -2.0, 1.0, 0.0], [3.0, 1.0, 0.0, -4.0], [1.0, 0.0, -1.0, -7.0]], [[2.0, 0.0, -1.0, 
+-3.0], [1.0, 2.0, -6.0, 3.0], [-1.0, 1.0, -6.0, -1.0]]], [[[3.0, 0.0, -6.0, 0.0], [-4.0, 0.0, 3.0, 1.0], [-2.0, 1.0, 0.0, 
+-1.0]], [[0.0, 3.0, -6.0, 2.0], [-7.0, 3.0, -4.0, -2.0], [6.0, 0.0, -6.0, -4.0]]], [[[4.0, -5.0, 3.0, 7.0], [2.0, 7.0, -3.0, 
+3.0], [4.0, 5.0, -2.0, -5.0]], [[-2.0, -7.0, 3.0, -1.0], [1.0, 1.0, -1.0, -7.0], [-6.0, -5.0, -5.0, 
+4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 5.0, -5.0, 1.0], [-3.0, 5.0, 6.0, 1.0], [4.0, 0.0, -1.0, 6.0]], [[-4.0, 0.0, 2.0, 
+1.0], [7.0, 6.0, -1.0, -1.0], [4.0, 7.0, -3.0, -7.0]]], [[[1.0, -2.0, 6.0, 5.0], [2.0, 5.0, 7.0, 6.0], [-1.0, 0.0, -2.0, 
+-6.0]], [[5.0, -1.0, -2.0, 4.0], [5.0, 4.0, 1.0, 3.0], [-2.0, 7.0, -1.0, -1.0]]], [[[0.0, -7.0, 6.0, -4.0], [-6.0, 3.0, -5.0, 
+0.0], [0.0, 0.0, 4.0, -3.0]], [[-3.0, -6.0, 4.0, 0.0], [-5.0, -4.0, -3.0, 5.0], [5.0, -2.0, 1.0, 6.0]]]])
+      arg1=numpy.array(0.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, -23.0], [0.0, 17.0]])+(1.-msk_ref)*numpy.array([[-3.0, -1.0], [12.0, -21.0]])
+      ref=msk_ref*numpy.array([[[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, -0.0]], [[0.0, 0.0, -0.0, 
+-0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 
+-0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 
+0.0], [0.0, 0.0, -0.0, -0.0]], [[-0.0, -0.0, 0.0, -0.0], [0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 
+-0.0]], [[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 
+0.0], [0.0, 0.0, 0.0, -0.0]], [[-0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[[-7.0, 0.0, 2.0], [6.0, 4.0, 7.0]], [[3.0, 0.0, 2.0], [4.0, -7.0, -3.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-1.0, -7.0], [7.0, -7.0], [6.0, -1.0]], [[2.0, 7.0], [0.0, 1.0], [-4.0, 
--5.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, 0.0], [-2.0, 5.0], [1.0, -2.0]], [[4.0, 4.0], [2.0, -4.0], [-1.0, -7.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank4_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[2.0, 1.0, 4.0, -7.0], [0.0, -6.0, 2.0, 1.0], [-6.0, 4.0, -6.0, 3.0]], [[-4.0, 7.0, 5.0, 
+-5.0], [-2.0, -7.0, 4.0, 0.0], [5.0, 5.0, -6.0, 0.0]]], [[[-7.0, 4.0, 7.0, -6.0], [0.0, 0.0, 5.0, -5.0], [-1.0, -3.0, 3.0, 
+-3.0]], [[4.0, 4.0, 0.0, -5.0], [-1.0, 0.0, -4.0, -5.0], [1.0, -5.0, 1.0, 4.0]]], [[[5.0, 4.0, 1.0, -3.0], [0.0, 7.0, -1.0, 
+3.0], [1.0, -6.0, -5.0, -5.0]], [[-4.0, -1.0, 1.0, 6.0], [-3.0, 0.0, -2.0, 0.0], [-6.0, -3.0, 0.0, 
+1.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, -3.0, -3.0, 0.0], [-3.0, -4.0, -4.0, 6.0], [0.0, -6.0, -5.0, 5.0]], [[6.0, 1.0, 
+2.0, 7.0], [0.0, 7.0, 1.0, 5.0], [-2.0, -4.0, 6.0, 5.0]]], [[[-3.0, -1.0, 5.0, -5.0], [3.0, 6.0, 6.0, 0.0], [6.0, 1.0, 1.0, 
+5.0]], [[7.0, -7.0, -6.0, 7.0], [-3.0, 6.0, 6.0, -2.0], [-2.0, 1.0, -2.0, 5.0]]], [[[-6.0, 4.0, -6.0, 0.0], [-1.0, -7.0, 0.0, 
+0.0], [4.0, -7.0, -4.0, -2.0]], [[3.0, -3.0, 6.0, -2.0], [5.0, -5.0, 3.0, -2.0], [0.0, -4.0, 4.0, 6.0]]]])
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[3.0, 58.0], [29.0, 13.0]])+(1.-msk_ref)*numpy.array([[62.0, -45.0], [-8.0, 61.0]])
+      ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, 
+-0.0], [-0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0]]], [[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 
+-0.0]], [[0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 
+0.0], [0.0, -0.0, -0.0, -0.0]], [[-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]]], [[[-0.0, -0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], 
+[[0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], 
+[0.0, -0.0, -0.0, -0.0]], [[0.0, -0.0, 0.0, -0.0], [0.0, -0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank4_offset3(self):
-      arg0=numpy.array([[[[6.0, 0.0, 6.0], [0.0, 0.0, -2.0], [-4.0, -6.0, -7.0], [6.0, 7.0, 5.0]], [[3.0, 1.0, -1.0], [0.0, 
-5.0, 6.0], [7.0, 1.0, -6.0], [-5.0, -4.0, 2.0]]], [[[-1.0, 7.0, 7.0], [-4.0, -5.0, 6.0], [-4.0, 4.0, 3.0], [6.0, 6.0, -1.0]], 
-[[-1.0, 2.0, -7.0], [7.0, -6.0, 0.0], [-5.0, -6.0, -3.0], [-2.0, 4.0, 6.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[6.0, -3.0], [-7.0, -6.0], [-2.0, -6.0]], [[5.0, -6.0], [-6.0, 2.0], [-5.0, -2.0]], [[-6.0, 
--4.0], [0.0, -2.0], [0.0, -2.0]], [[-2.0, -7.0], [-7.0, -1.0], [-4.0, 1.0]]], [[[-7.0, -7.0], [-6.0, 0.0], [6.0, 1.0]], [[1.0, 
--2.0], [-1.0, 0.0], [0.0, -5.0]], [[0.0, -1.0], [0.0, -2.0], [5.0, 4.0]], [[1.0, -1.0], [-7.0, 0.0], [5.0, 
--7.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 0.0], [1.0, 4.0], [3.0, 5.0]], [[4.0, -3.0], [-2.0, -3.0], [6.0, -7.0]], [[-6.0, 
--7.0], [0.0, -6.0], [-6.0, 3.0]], [[2.0, -6.0], [7.0, -4.0], [-6.0, -7.0]]], [[[2.0, -1.0], [5.0, -6.0], [2.0, -2.0]], [[-1.0, 
--1.0], [7.0, -6.0], [4.0, 6.0]], [[-4.0, 7.0], [-1.0, 0.0], [5.0, 3.0]], [[1.0, 3.0], [6.0, 6.0], [-3.0, 1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-58.0, -146.0], [-164.0, -175.0]])+(1.-msk_ref)*numpy.array([[95.0, -19.0], [81.0, 20.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank2_offset0(self):
-      arg0=numpy.array([5.0, -5.0])
+   def test_generalTensorProduct_expandedData_rank4_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, 0.0, -2.0, 6.0], [7.0, -4.0, 1.0, -5.0], [5.0, 4.0, -6.0, -4.0]], [[7.0, -7.0, -4.0, 
+6.0], [2.0, -3.0, 0.0, -2.0], [-6.0, 4.0, -2.0, 1.0]]], [[[1.0, 3.0, -7.0, 2.0], [-7.0, -6.0, -4.0, 1.0], [0.0, -3.0, 0.0, 
+-4.0]], [[-3.0, -3.0, -1.0, -7.0], [-3.0, 6.0, 7.0, 2.0], [5.0, 2.0, -7.0, -7.0]]], [[[7.0, -6.0, 7.0, -6.0], [7.0, 1.0, -3.0, 
+-3.0], [-1.0, -1.0, -3.0, -1.0]], [[4.0, -1.0, -3.0, 0.0], [-4.0, -2.0, -4.0, -4.0], [-6.0, 6.0, -7.0, 
+7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 7.0, -2.0, 7.0], [-6.0, -1.0, 3.0, -4.0], [0.0, 6.0, -2.0, 1.0]], [[3.0, 2.0, 
+-2.0, 5.0], [-3.0, 7.0, 7.0, 5.0], [6.0, -2.0, -5.0, 0.0]]], [[[2.0, 6.0, -4.0, 6.0], [4.0, 2.0, 4.0, -2.0], [1.0, 3.0, 4.0, 
+-7.0]], [[4.0, 0.0, -5.0, -2.0], [3.0, -5.0, 4.0, -2.0], [-3.0, 3.0, 2.0, -3.0]]], [[[-2.0, -6.0, 0.0, 3.0], [7.0, -2.0, -3.0, 
+-3.0], [-7.0, 6.0, -3.0, 2.0]], [[6.0, -3.0, -1.0, 5.0], [-3.0, -1.0, -2.0, 3.0], [0.0, -4.0, 0.0, -4.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, 2.0, -5.0, 2.0, -6.0], [-4.0, 4.0, 3.0, -7.0, 3.0], [5.0, 3.0, 7.0, 5.0, 1.0], [1.0, 
-4.0, 3.0, -2.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 0.0, 1.0, 1.0, 2.0], [-5.0, 5.0, -6.0, -2.0, -6.0], [-5.0, 5.0, -7.0, 
-7.0, 3.0], [3.0, -7.0, 5.0, -3.0, -4.0]])
+      arg1=msk_arg1*(6.0)+(1-msk_arg1)*(1.0)
       res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[15.0, 10.0, -25.0, 10.0, -30.0], [-20.0, 20.0, 15.0, -35.0, 15.0], [25.0, 15.0, 35.0, 25.0, 
-5.0], [5.0, 20.0, 15.0, -10.0, 20.0]], [[-15.0, -10.0, 25.0, -10.0, 30.0], [20.0, -20.0, -15.0, 35.0, -15.0], [-25.0, -15.0, 
--35.0, -25.0, -5.0], [-5.0, -20.0, -15.0, 10.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 0.0, 5.0, 5.0, 10.0], [-25.0, 
-25.0, -30.0, -10.0, -30.0], [-25.0, 25.0, -35.0, 35.0, 15.0], [15.0, -35.0, 25.0, -15.0, -20.0]], [[30.0, 0.0, -5.0, -5.0, 
--10.0], [25.0, -25.0, 30.0, 10.0, 30.0], [25.0, -25.0, 35.0, -35.0, -15.0], [-15.0, 35.0, -25.0, 15.0, 20.0]]])
+      ref=msk_ref*numpy.array([[[[24.0, 0.0, -12.0, 36.0], [42.0, -24.0, 6.0, -30.0], [30.0, 24.0, -36.0, -24.0]], [[42.0, 
+-42.0, -24.0, 36.0], [12.0, -18.0, 0.0, -12.0], [-36.0, 24.0, -12.0, 6.0]]], [[[6.0, 18.0, -42.0, 12.0], [-42.0, -36.0, -24.0, 
+6.0], [0.0, -18.0, 0.0, -24.0]], [[-18.0, -18.0, -6.0, -42.0], [-18.0, 36.0, 42.0, 12.0], [30.0, 12.0, -42.0, -42.0]]], 
+[[[42.0, -36.0, 42.0, -36.0], [42.0, 6.0, -18.0, -18.0], [-6.0, -6.0, -18.0, -6.0]], [[24.0, -6.0, -18.0, 0.0], [-24.0, -12.0, 
+-24.0, -24.0], [-36.0, 36.0, -42.0, 42.0]]]])+(1.-msk_ref)*numpy.array([[[[-7.0, 7.0, -2.0, 7.0], [-6.0, -1.0, 3.0, -4.0], 
+[0.0, 6.0, -2.0, 1.0]], [[3.0, 2.0, -2.0, 5.0], [-3.0, 7.0, 7.0, 5.0], [6.0, -2.0, -5.0, 0.0]]], [[[2.0, 6.0, -4.0, 6.0], [4.0, 
+2.0, 4.0, -2.0], [1.0, 3.0, 4.0, -7.0]], [[4.0, 0.0, -5.0, -2.0], [3.0, -5.0, 4.0, -2.0], [-3.0, 3.0, 2.0, -3.0]]], [[[-2.0, 
+-6.0, 0.0, 3.0], [7.0, -2.0, -3.0, -3.0], [-7.0, 6.0, -3.0, 2.0]], [[6.0, -3.0, -1.0, 5.0], [-3.0, -1.0, -2.0, 3.0], [0.0, 
+-4.0, 0.0, -4.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank3_offset1(self):
-      arg0=numpy.array([[3.0, 2.0, -4.0], [1.0, -2.0, 0.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, 0.0, 0.0, -3.0, -1.0], [6.0, 5.0, -7.0, 4.0, 3.0], [2.0, 0.0, -1.0, 5.0, 1.0], [-5.0, 
--7.0, -4.0, -3.0, 1.0]], [[-5.0, 4.0, 7.0, 5.0, -2.0], [0.0, -4.0, 7.0, -1.0, -4.0], [-4.0, -1.0, 7.0, 4.0, 0.0], [0.0, 3.0, 
--1.0, -5.0, -7.0]], [[-6.0, 6.0, 0.0, -5.0, -3.0], [0.0, 2.0, 6.0, -5.0, 4.0], [-2.0, 7.0, 1.0, 5.0, 0.0], [-2.0, 0.0, 4.0, 
--2.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 5.0, -4.0, 7.0, 7.0], [1.0, 3.0, -4.0, -6.0, -5.0], [1.0, -1.0, -7.0, 6.0, 
--1.0], [-1.0, 5.0, 5.0, -4.0, -3.0]], [[0.0, 0.0, -3.0, 1.0, 2.0], [3.0, -3.0, -3.0, 0.0, 1.0], [7.0, 1.0, 2.0, -6.0, 7.0], 
-[2.0, 0.0, -5.0, -7.0, 4.0]], [[5.0, 0.0, -5.0, -5.0, 0.0], [0.0, -2.0, -2.0, 1.0, -2.0], [6.0, 5.0, 1.0, -7.0, -6.0], [2.0, 
-0.0, 5.0, -4.0, 4.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-4.0, -16.0, 14.0, 21.0, 5.0], [18.0, -1.0, -31.0, 30.0, -15.0], [6.0, -30.0, 7.0, 3.0, 3.0], 
-[-7.0, -15.0, -30.0, -11.0, -35.0]], [[4.0, -8.0, -14.0, -13.0, 3.0], [6.0, 13.0, -21.0, 6.0, 11.0], [10.0, 2.0, -15.0, -3.0, 
-1.0], [-5.0, -13.0, -2.0, 7.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 15.0, 2.0, 43.0, 25.0], [9.0, 11.0, -10.0, -22.0, 
--5.0], [-7.0, -21.0, -21.0, 34.0, 35.0], [-7.0, 15.0, -15.0, -10.0, -17.0]], [[0.0, 5.0, 2.0, 5.0, 3.0], [-5.0, 9.0, 2.0, -6.0, 
--7.0], [-13.0, -3.0, -11.0, 18.0, -15.0], [-5.0, 5.0, 15.0, 10.0, -11.0]]])
+   def test_transposed_tensor_mult_array_rank2_array_rank1(self):
+      arg0=numpy.array([[-5.0, 6.0], [-1.0, -1.0], [1.0, -7.0]])
+      arg1=numpy.array([-7.0, 0.0, -2.0])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=numpy.array([33.0, -28.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_array_rank2_array_rank2(self):
+      arg0=numpy.array([[7.0, 5.0], [3.0, -7.0], [1.0, 2.0]])
+      arg1=numpy.array([[-2.0, 5.0], [0.0, -1.0], [0.0, 3.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=numpy.array([[-14.0, 35.0], [-10.0, 38.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_array_rank2_constData_rank1(self):
+      arg0=numpy.array([[-4.0, -2.0], [-1.0, -7.0], [-7.0, 0.0]])
+      arg1=Data(numpy.array([-6.0, 7.0, 1.0]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([10.0, -37.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[[6.0, 2.0, -1.0], [4.0, 1.0, -6.0]], [[0.0, -4.0, -2.0], [5.0, 6.0, 2.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[4.0, 7.0, 3.0, 0.0, 1.0], [-2.0, 5.0, 0.0, -1.0, -4.0], [-1.0, 3.0, 0.0, 3.0, 0.0], [-7.0, 
-1.0, -6.0, -2.0, 4.0]], [[-4.0, -4.0, 0.0, 6.0, 2.0], [6.0, -2.0, -7.0, 5.0, 0.0], [-3.0, 1.0, -4.0, 0.0, 2.0], [-7.0, -1.0, 
--7.0, 2.0, 0.0]], [[5.0, 1.0, 0.0, -1.0, 4.0], [2.0, -1.0, 2.0, 0.0, -2.0], [-4.0, -6.0, -7.0, 2.0, 0.0], [-7.0, -7.0, -6.0, 
--4.0, -2.0]]], [[[5.0, -3.0, 6.0, 6.0, 3.0], [0.0, -1.0, 0.0, 6.0, 6.0], [-1.0, -4.0, 7.0, 6.0, -2.0], [0.0, 2.0, -2.0, 6.0, 
-0.0]], [[3.0, -2.0, -3.0, -2.0, -7.0], [-1.0, -2.0, -3.0, -1.0, 1.0], [5.0, -6.0, 6.0, -3.0, 0.0], [-4.0, -5.0, 5.0, -1.0, 
-0.0]], [[4.0, 0.0, 0.0, -3.0, 0.0], [-1.0, -6.0, 4.0, 3.0, 6.0], [2.0, -4.0, -2.0, -4.0, 0.0], [3.0, 5.0, -2.0, -3.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -5.0, -3.0, -1.0, -7.0], [-6.0, 6.0, 1.0, -2.0, -4.0], [-5.0, 6.0, -5.0, -6.0, 
--4.0], [-1.0, 1.0, -7.0, 3.0, 7.0]], [[1.0, 7.0, -3.0, 6.0, 0.0], [-1.0, 2.0, 6.0, 5.0, 5.0], [-7.0, 1.0, 5.0, -1.0, -7.0], 
-[1.0, -4.0, 0.0, 1.0, 3.0]], [[-4.0, -4.0, 1.0, 3.0, -5.0], [0.0, 0.0, -3.0, -2.0, 6.0], [-6.0, -5.0, 2.0, -6.0, 0.0], [-2.0, 
--6.0, -4.0, -4.0, -2.0]]], [[[-1.0, -2.0, 3.0, 0.0, -2.0], [0.0, 3.0, -6.0, 2.0, 3.0], [4.0, 6.0, -1.0, 3.0, -3.0], [3.0, 7.0, 
-5.0, -3.0, 3.0]], [[-1.0, 5.0, -7.0, 1.0, 1.0], [-4.0, 5.0, -3.0, 0.0, -5.0], [-1.0, 1.0, 0.0, 7.0, -1.0], [-5.0, -6.0, -7.0, 
--5.0, 5.0]], [[-6.0, 0.0, 6.0, 3.0, 2.0], [3.0, 4.0, 2.0, 0.0, -1.0], [5.0, 0.0, -4.0, -3.0, -6.0], [7.0, 1.0, -6.0, 0.0, 
--3.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[10.0, 19.0, 39.0, 53.0, 11.0], [3.0, 57.0, -43.0, 9.0, -33.0], [-19.0, 28.0, 45.0, 61.0, 
--4.0], [-71.0, -16.0, -35.0, 37.0, 62.0]], [[57.0, -13.0, 12.0, -10.0, -43.0], [-36.0, -19.0, 14.0, 10.0, 52.0], [49.0, -56.0, 
-97.0, 0.0, -18.0], [24.0, 8.0, 56.0, 18.0, -8.0]]])+(1.-msk_ref)*numpy.array([[[61.0, -15.0, -56.0, -14.0, -56.0], [-60.0, 
-33.0, -18.0, 8.0, -7.0], [-53.0, 68.0, -2.0, 5.0, -15.0], [-37.0, 20.0, 11.0, 7.0, 85.0]], [[-19.0, 0.0, -5.0, -18.0, 10.0], 
-[-14.0, 45.0, -62.0, -6.0, -49.0], [64.0, 42.0, -37.0, 67.0, -5.0], [-1.0, 29.0, -21.0, -41.0, 31.0]]])
+   def test_transposed_tensor_mult_array_rank2_constData_rank2(self):
+      arg0=numpy.array([[-1.0, 0.0], [2.0, -6.0], [-2.0, 0.0]])
+      arg1=Data(numpy.array([[5.0, 0.0], [7.0, -4.0], [-7.0, -5.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[23.0, 2.0], [-42.0, 24.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank1_expandedData_rank3_offset0(self):
-      arg0=numpy.array([-6.0, 6.0])
+   def test_transposed_tensor_mult_array_rank2_expandedData_rank1(self):
+      arg0=numpy.array([[7.0, 0.0], [-3.0, 4.0], [2.0, 7.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, -1.0], [-5.0, 3.0]], [[2.0, 3.0], [2.0, -2.0]], [[0.0, 0.0], [-5.0, -1.0]], [[-2.0, 
-0.0], [-6.0, -4.0]], [[-3.0, -3.0], [7.0, -7.0]], [[5.0, 0.0], [-5.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 7.0], [3.0, 
-6.0]], [[-7.0, -4.0], [-7.0, -4.0]], [[0.0, 3.0], [3.0, 0.0]], [[-7.0, -3.0], [7.0, -2.0]], [[-6.0, 0.0], [6.0, -6.0]], [[7.0, 
-0.0], [2.0, -5.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([2.0, -7.0, -6.0])+(1.-msk_arg1)*numpy.array([0.0, -7.0, -6.0])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-42.0, 6.0], [30.0, -18.0]], [[-12.0, -18.0], [-12.0, 12.0]], [[0.0, 0.0], [30.0, 6.0]], 
-[[12.0, 0.0], [36.0, 24.0]], [[18.0, 18.0], [-42.0, 42.0]], [[-30.0, 0.0], [30.0, 18.0]]], [[[42.0, -6.0], [-30.0, 18.0]], 
-[[12.0, 18.0], [12.0, -12.0]], [[0.0, 0.0], [-30.0, -6.0]], [[-12.0, 0.0], [-36.0, -24.0]], [[-18.0, -18.0], [42.0, -42.0]], 
-[[30.0, 0.0], [-30.0, -18.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -42.0], [-18.0, -36.0]], [[42.0, 24.0], [42.0, 24.0]], 
-[[0.0, -18.0], [-18.0, 0.0]], [[42.0, 18.0], [-42.0, 12.0]], [[36.0, 0.0], [-36.0, 36.0]], [[-42.0, 0.0], [-12.0, 30.0]]], 
-[[[0.0, 42.0], [18.0, 36.0]], [[-42.0, -24.0], [-42.0, -24.0]], [[0.0, 18.0], [18.0, 0.0]], [[-42.0, -18.0], [42.0, -12.0]], 
-[[-36.0, 0.0], [36.0, -36.0]], [[42.0, 0.0], [12.0, -30.0]]]])
+      ref=msk_ref*numpy.array([23.0, -70.0])+(1.-msk_ref)*numpy.array([9.0, -70.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank4_offset1(self):
-      arg0=numpy.array([[-2.0, -6.0, 2.0], [-5.0, 6.0, 3.0]])
+   def test_transposed_tensor_mult_array_rank2_expandedData_rank2(self):
+      arg0=numpy.array([[-4.0, -2.0], [4.0, -4.0], [1.0, 4.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[5.0, 2.0], [5.0, 4.0]], [[-3.0, 0.0], [-4.0, 0.0]], [[-1.0, -1.0], [-2.0, 5.0]], [[-7.0, 
-0.0], [-4.0, -4.0]], [[-1.0, 0.0], [7.0, -2.0]], [[-2.0, 3.0], [-3.0, -2.0]]], [[[0.0, -4.0], [0.0, -3.0]], [[-6.0, -1.0], 
-[1.0, -3.0]], [[3.0, -7.0], [6.0, -6.0]], [[7.0, 5.0], [-2.0, 3.0]], [[6.0, 1.0], [-6.0, 7.0]], [[7.0, -3.0], [2.0, 0.0]]], 
-[[[7.0, 5.0], [2.0, -2.0]], [[-4.0, -2.0], [-7.0, 0.0]], [[-4.0, -2.0], [5.0, -1.0]], [[-6.0, 6.0], [-4.0, -2.0]], [[6.0, 
--2.0], [5.0, -1.0]], [[-4.0, 0.0], [-5.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, 7.0], [2.0, -7.0]], [[3.0, 4.0], [5.0, 
-3.0]], [[6.0, -5.0], [6.0, -7.0]], [[-2.0, 6.0], [5.0, 3.0]], [[-3.0, -7.0], [-5.0, 0.0]], [[7.0, 4.0], [4.0, -2.0]]], [[[2.0, 
--4.0], [-2.0, -6.0]], [[-6.0, -7.0], [0.0, 6.0]], [[5.0, 6.0], [3.0, 5.0]], [[2.0, 6.0], [-4.0, 6.0]], [[-3.0, -4.0], [-6.0, 
--2.0]], [[2.0, 1.0], [6.0, 2.0]]], [[[2.0, 3.0], [7.0, 5.0]], [[-4.0, 3.0], [4.0, 1.0]], [[2.0, -7.0], [-4.0, -6.0]], [[-4.0, 
-0.0], [-2.0, 7.0]], [[-7.0, 6.0], [2.0, 4.0]], [[6.0, 4.0], [4.0, 1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[6.0, -7.0], [6.0, -1.0], [7.0, 4.0]])+(1.-msk_arg1)*numpy.array([[7.0, -3.0], [-3.0, -6.0], 
+[-3.0, 0.0]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[4.0, 30.0], [-6.0, 6.0]], [[34.0, 2.0], [-12.0, 18.0]], [[-24.0, 40.0], [-22.0, 24.0]], 
-[[-40.0, -18.0], [12.0, -14.0]], [[-22.0, -10.0], [32.0, -40.0]], [[-46.0, 12.0], [-16.0, 10.0]]], [[[-4.0, -19.0], [-19.0, 
--44.0]], [[-33.0, -12.0], [5.0, -18.0]], [[11.0, -43.0], [61.0, -64.0]], [[59.0, 48.0], [-4.0, 32.0]], [[59.0, 0.0], [-56.0, 
-49.0]], [[40.0, -33.0], [12.0, 19.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 16.0], [22.0, 60.0]], [[22.0, 40.0], [-2.0, -40.0]], 
-[[-38.0, -40.0], [-38.0, -28.0]], [[-16.0, -48.0], [10.0, -28.0]], [[10.0, 50.0], [50.0, 20.0]], [[-14.0, -6.0], [-36.0, 
--6.0]]], [[[48.0, -50.0], [-1.0, 14.0]], [[-63.0, -53.0], [-13.0, 24.0]], [[6.0, 40.0], [-24.0, 47.0]], [[10.0, 6.0], [-55.0, 
-42.0]], [[-24.0, 29.0], [-5.0, 0.0]], [[-5.0, -2.0], [28.0, 25.0]]]])
+      ref=msk_ref*numpy.array([[7.0, 28.0], [-8.0, 34.0]])+(1.-msk_ref)*numpy.array([[-43.0, -12.0], [-14.0, 30.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_float_rank0_offset0(self):
-      arg0=numpy.array([[-4.0, 0.0, -3.0, -4.0, -6.0], [3.0, 3.0, -3.0, 2.0, -3.0], [-4.0, 2.0, 5.0, -6.0, 4.0], [-3.0, 5.0, 
-1.0, -6.0, 0.0]])
-      arg1=0.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-0.0, 0.0, -0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 
-0.0, -0.0, 0.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=transposed_tensor_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank0_offset0(self):
-      arg0=numpy.array([[-6.0, -7.0, -2.0, 4.0, -3.0], [6.0, -2.0, 4.0, 6.0, 4.0], [-5.0, 0.0, -1.0, -3.0, -7.0], [0.0, -5.0, 
-7.0, -3.0, 2.0]])
-      arg1=numpy.array(-2.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[12.0, 14.0, 4.0, -8.0, 6.0], [-12.0, 4.0, -8.0, -12.0, -8.0], [10.0, -0.0, 2.0, 6.0, 14.0], [-0.0, 
-10.0, -14.0, 6.0, -4.0]])
+   def test_transposed_tensor_mult_array_rank4_array_rank2(self):
+      arg0=numpy.array([[[[-1.0, -6.0, 4.0, 4.0, -2.0], [5.0, 0.0, -2.0, -2.0, -4.0], [-1.0, -2.0, -7.0, -6.0, 3.0], [3.0, 
+-2.0, 4.0, -1.0, 5.0]], [[6.0, 3.0, 6.0, 4.0, 7.0], [6.0, 7.0, 4.0, 5.0, -2.0], [-5.0, 6.0, 0.0, -7.0, 7.0], [1.0, -1.0, -2.0, 
+0.0, 7.0]], [[-5.0, 7.0, -4.0, 2.0, -1.0], [-1.0, 0.0, 0.0, 7.0, -7.0], [-2.0, 3.0, -4.0, 5.0, 4.0], [-3.0, -2.0, 2.0, 0.0, 
+6.0]]], [[[-5.0, -3.0, 2.0, -3.0, 3.0], [6.0, 1.0, 0.0, -7.0, -3.0], [-1.0, -7.0, 2.0, 5.0, 0.0], [1.0, -4.0, 5.0, 2.0, 7.0]], 
+[[1.0, -3.0, -7.0, 7.0, -6.0], [6.0, -4.0, 2.0, 3.0, 7.0], [2.0, -1.0, 2.0, 1.0, 1.0], [-7.0, 3.0, -3.0, 7.0, 2.0]], [[6.0, 
+-4.0, 3.0, 3.0, 5.0], [-3.0, -6.0, -7.0, 5.0, 0.0], [-7.0, 0.0, -3.0, -4.0, -6.0], [4.0, 4.0, 1.0, -2.0, -4.0]]]])
+      arg1=numpy.array([[-7.0, -5.0, -5.0], [6.0, -6.0, -6.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=numpy.array([[-70.0, 16.0, -2.0, -136.0, 8.0], [-42.0, 31.0, 24.0, -136.0, 13.0], [66.0, -67.0, 87.0, 100.0, -46.0], 
+[13.0, -37.0, 14.0, -11.0, -46.0]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank1_offset1(self):
-      arg0=numpy.array([[[6.0, -7.0, 0.0], [0.0, 1.0, 6.0], [-1.0, 6.0, 6.0], [-4.0, 2.0, 4.0], [-6.0, 6.0, 5.0]], [[-5.0, 6.0, 
-4.0], [6.0, -5.0, -7.0], [-3.0, 1.0, -6.0], [-3.0, 2.0, 0.0], [1.0, -1.0, 5.0]], [[4.0, 0.0, -6.0], [-1.0, 5.0, -6.0], [0.0, 
--6.0, -3.0], [0.0, 4.0, 7.0], [-1.0, -4.0, 0.0]], [[-2.0, -4.0, -1.0], [0.0, 0.0, 5.0], [-4.0, -4.0, 0.0], [-5.0, 1.0, -7.0], 
-[6.0, 4.0, 0.0]]])
-      arg1=numpy.array([-7.0, -5.0, -5.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[-7.0, -35.0, -53.0, -2.0, -13.0], [-15.0, 18.0, 46.0, 11.0, -27.0], [2.0, 12.0, 45.0, -55.0, 27.0], 
-[39.0, -25.0, 48.0, 65.0, -62.0]])
+   def test_transposed_tensor_mult_array_rank4_array_rank3(self):
+      arg0=numpy.array([[[[-1.0, 4.0, 6.0, 6.0, 0.0], [0.0, -1.0, -4.0, -3.0, -3.0], [-1.0, 3.0, -3.0, -1.0, -6.0], [-7.0, 0.0, 
+-3.0, 5.0, 2.0]], [[5.0, 0.0, -2.0, 0.0, 1.0], [7.0, -2.0, 0.0, -7.0, 3.0], [5.0, -7.0, 0.0, 6.0, -1.0], [-4.0, 3.0, -2.0, 
+-1.0, 0.0]], [[5.0, 4.0, 3.0, 5.0, -7.0], [3.0, -7.0, 6.0, -3.0, 3.0], [7.0, -2.0, -7.0, 0.0, 0.0], [-6.0, 7.0, -6.0, 0.0, 
+0.0]]], [[[6.0, -6.0, 4.0, 2.0, 7.0], [4.0, 6.0, -7.0, 6.0, 5.0], [-1.0, 6.0, -5.0, -2.0, 6.0], [5.0, 4.0, 6.0, 6.0, -1.0]], 
+[[7.0, 3.0, 0.0, 2.0, -7.0], [0.0, 4.0, 3.0, -2.0, -6.0], [-7.0, 3.0, 5.0, -6.0, -6.0], [5.0, 5.0, 0.0, -2.0, 7.0]], [[6.0, 
+-3.0, -2.0, 7.0, 7.0], [-3.0, -6.0, -2.0, -7.0, 3.0], [7.0, 4.0, -2.0, 5.0, 2.0], [-3.0, -6.0, -7.0, 0.0, -3.0]]]])
+      arg1=numpy.array([[[3.0, 5.0], [-5.0, 1.0], [0.0, 0.0]], [[5.0, 3.0], [-5.0, 3.0], [-4.0, 6.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=numpy.array([[[-57.0, 75.0], [-21.0, -7.0], [56.0, 28.0], [-10.0, 84.0], [37.0, 43.0]], [[-3.0, 1.0], [41.0, -13.0], 
+[-54.0, -44.0], [94.0, -52.0], [19.0, 3.0]], [[-26.0, 18.0], [43.0, 59.0], [-51.0, -27.0], [-33.0, 7.0], [39.0, -19.0]], 
+[[11.0, -27.0], [4.0, -6.0], [59.0, -41.0], [60.0, 36.0], [-22.0, 10.0]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank2_offset2(self):
-      arg0=numpy.array([[[[-4.0, 1.0, -1.0], [-1.0, -4.0, 1.0]], [[0.0, -7.0, 0.0], [0.0, 6.0, 2.0]], [[-6.0, 7.0, 1.0], [7.0, 
--5.0, 6.0]], [[-2.0, 0.0, 4.0], [2.0, -3.0, -3.0]], [[3.0, 5.0, -4.0], [4.0, 4.0, 2.0]]], [[[-3.0, -3.0, 7.0], [7.0, -1.0, 
-5.0]], [[-3.0, -7.0, -7.0], [7.0, -5.0, 5.0]], [[2.0, -4.0, -1.0], [-4.0, -2.0, 0.0]], [[6.0, -5.0, -3.0], [6.0, -1.0, 0.0]], 
-[[-6.0, -1.0, 5.0], [0.0, 6.0, 3.0]]], [[[4.0, 6.0, -2.0], [3.0, -6.0, -4.0]], [[2.0, -4.0, 1.0], [0.0, -6.0, -4.0]], [[-7.0, 
--1.0, -1.0], [-1.0, 5.0, -6.0]], [[6.0, -7.0, -7.0], [0.0, -3.0, -4.0]], [[2.0, 3.0, 3.0], [1.0, 6.0, -1.0]]], [[[-2.0, 5.0, 
--2.0], [7.0, 1.0, -6.0]], [[-7.0, -4.0, 1.0], [3.0, 0.0, 5.0]], [[-3.0, -4.0, 6.0], [-7.0, -3.0, 0.0]], [[6.0, -7.0, 7.0], 
-[-5.0, 6.0, -6.0]], [[1.0, -1.0, -2.0], [7.0, -1.0, 0.0]]]])
-      arg1=numpy.array([[2.0, 1.0, 3.0], [-7.0, -6.0, -1.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[20.0, -45.0, -27.0, 15.0, -55.0], [-36.0, -58.0, 37.0, -38.0, -37.0], [27.0, 43.0, -35.0, 6.0, -26.0], 
-[-54.0, -41.0, 75.0, 31.0, -48.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank1_offset0(self):
-      arg0=numpy.array([[5.0, -7.0, -6.0, -3.0, -3.0], [5.0, 6.0, -4.0, 7.0, 4.0], [6.0, 2.0, 3.0, 6.0, 7.0], [1.0, 5.0, -5.0, 
--5.0, 7.0]])
-      arg1=numpy.array([-6.0, 4.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-30.0, 20.0], [42.0, -28.0], [36.0, -24.0], [18.0, -12.0], [18.0, -12.0]], [[-30.0, 20.0], [-36.0, 
-24.0], [24.0, -16.0], [-42.0, 28.0], [-24.0, 16.0]], [[-36.0, 24.0], [-12.0, 8.0], [-18.0, 12.0], [-36.0, 24.0], [-42.0, 
-28.0]], [[-6.0, 4.0], [-30.0, 20.0], [30.0, -20.0], [30.0, -20.0], [-42.0, 28.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank2_offset1(self):
-      arg0=numpy.array([[[-5.0, -2.0, 7.0], [-6.0, 2.0, 1.0], [-6.0, 3.0, -5.0], [-1.0, 4.0, -5.0], [-5.0, 7.0, -5.0]], [[2.0, 
-2.0, -6.0], [-7.0, 0.0, 2.0], [-5.0, 1.0, -2.0], [-6.0, 0.0, -3.0], [-7.0, -2.0, -1.0]], [[-4.0, 7.0, -3.0], [-3.0, -2.0, 5.0], 
-[-5.0, -1.0, -4.0], [-3.0, 3.0, 7.0], [-3.0, -5.0, -1.0]], [[-2.0, -6.0, -3.0], [-6.0, 5.0, -2.0], [-1.0, -5.0, -7.0], [5.0, 
-2.0, 5.0], [1.0, -1.0, 4.0]]])
-      arg1=numpy.array([[3.0, 7.0], [5.0, 0.0], [4.0, 5.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[3.0, 0.0], [-4.0, -37.0], [-23.0, -67.0], [-3.0, -32.0], [0.0, -60.0]], [[-8.0, -16.0], [-13.0, 
--39.0], [-18.0, -45.0], [-30.0, -57.0], [-35.0, -54.0]], [[11.0, -43.0], [1.0, 4.0], [-36.0, -55.0], [34.0, 14.0], [-38.0, 
--26.0]], [[-48.0, -29.0], [-1.0, -52.0], [-56.0, -42.0], [45.0, 60.0], [14.0, 27.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank3_offset2(self):
-      arg0=numpy.array([[[[-6.0, -4.0, 0.0], [0.0, -1.0, 2.0]], [[0.0, -3.0, 4.0], [2.0, -2.0, 1.0]], [[-3.0, 7.0, -3.0], [5.0, 
--4.0, -3.0]], [[3.0, 5.0, 1.0], [-5.0, -6.0, 3.0]], [[-5.0, 0.0, 1.0], [-7.0, 2.0, 6.0]]], [[[-2.0, 6.0, 6.0], [0.0, 3.0, 
--2.0]], [[-1.0, 4.0, -7.0], [6.0, -5.0, 1.0]], [[-6.0, -3.0, -6.0], [7.0, -6.0, 5.0]], [[-4.0, -2.0, 5.0], [3.0, -2.0, 5.0]], 
-[[-7.0, -3.0, -6.0], [-7.0, 4.0, 1.0]]], [[[6.0, -1.0, 0.0], [0.0, 2.0, -7.0]], [[1.0, 5.0, -5.0], [3.0, 7.0, -5.0]], [[-3.0, 
-6.0, -6.0], [6.0, 7.0, 0.0]], [[0.0, -7.0, 2.0], [-6.0, 1.0, -6.0]], [[3.0, -4.0, -4.0], [1.0, -5.0, 3.0]]], [[[-3.0, -1.0, 
--2.0], [-7.0, 0.0, 6.0]], [[-1.0, 2.0, -7.0], [-4.0, 6.0, 0.0]], [[-6.0, 1.0, 7.0], [3.0, -4.0, 1.0]], [[4.0, 0.0, 3.0], [7.0, 
--3.0, 2.0]], [[-2.0, 3.0, 6.0], [0.0, 3.0, 2.0]]]])
-      arg1=numpy.array([[[0.0, -4.0], [0.0, 1.0], [5.0, 1.0]], [[-7.0, -1.0], [4.0, -7.0], [7.0, -1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[10.0, 25.0], [5.0, 12.0], [-87.0, 42.0], [37.0, 38.0], [104.0, 8.0]], [[28.0, 1.0], [-90.0, 29.0], 
-[-68.0, 45.0], [31.0, 25.0], [42.0, -3.0]], [[-41.0, -32.0], [-53.0, -51.0], [-44.0, -43.0], [14.0, 0.0], [-26.0, 11.0]], 
-[[81.0, 10.0], [17.0, -39.0], [5.0, 56.0], [-32.0, -1.0], [56.0, -6.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_array_rank2_offset0(self):
-      arg0=numpy.array([[6.0, -4.0, 0.0, 4.0, -6.0], [1.0, -1.0, 7.0, 6.0, 6.0], [-2.0, -7.0, 1.0, -3.0, -7.0], [0.0, -6.0, 
-7.0, -2.0, 6.0]])
-      arg1=numpy.array([[3.0, -6.0, -1.0, 2.0, -6.0], [-7.0, -6.0, 0.0, -2.0, 5.0], [-2.0, 6.0, 7.0, -6.0, -4.0], [0.0, 6.0, 
-4.0, 0.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 30.0], [-12.0, 36.0, 42.0, -36.0, -24.0], 
-[0.0, 36.0, 24.0, 0.0, 0.0]], [[-12.0, 24.0, 4.0, -8.0, 24.0], [28.0, 24.0, 0.0, 8.0, -20.0], [8.0, -24.0, -28.0, 24.0, 16.0], 
-[0.0, -24.0, -16.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[12.0, -24.0, -4.0, 8.0, -24.0], [-28.0, -24.0, 0.0, -8.0, 20.0], [-8.0, 24.0, 28.0, -24.0, -16.0], [0.0, 
-24.0, 16.0, 0.0, 0.0]], [[-18.0, 36.0, 6.0, -12.0, 36.0], [42.0, 36.0, 0.0, 12.0, -30.0], [12.0, -36.0, -42.0, 36.0, 24.0], 
-[0.0, -36.0, -24.0, 0.0, 0.0]]], [[[3.0, -6.0, -1.0, 2.0, -6.0], [-7.0, -6.0, 0.0, -2.0, 5.0], [-2.0, 6.0, 7.0, -6.0, -4.0], 
-[0.0, 6.0, 4.0, 0.0, 0.0]], [[-3.0, 6.0, 1.0, -2.0, 6.0], [7.0, 6.0, 0.0, 2.0, -5.0], [2.0, -6.0, -7.0, 6.0, 4.0], [0.0, -6.0, 
--4.0, 0.0, 0.0]], [[21.0, -42.0, -7.0, 14.0, -42.0], [-49.0, -42.0, 0.0, -14.0, 35.0], [-14.0, 42.0, 49.0, -42.0, -28.0], [0.0, 
-42.0, 28.0, 0.0, 0.0]], [[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 30.0], [-12.0, 36.0, 42.0, -36.0, -24.0], 
-[0.0, 36.0, 24.0, 0.0, 0.0]], [[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 30.0], [-12.0, 36.0, 42.0, -36.0, 
--24.0], [0.0, 36.0, 24.0, 0.0, 0.0]]], [[[-6.0, 12.0, 2.0, -4.0, 12.0], [14.0, 12.0, 0.0, 4.0, -10.0], [4.0, -12.0, -14.0, 
-12.0, 8.0], [0.0, -12.0, -8.0, 0.0, 0.0]], [[-21.0, 42.0, 7.0, -14.0, 42.0], [49.0, 42.0, 0.0, 14.0, -35.0], [14.0, -42.0, 
--49.0, 42.0, 28.0], [0.0, -42.0, -28.0, 0.0, 0.0]], [[3.0, -6.0, -1.0, 2.0, -6.0], [-7.0, -6.0, 0.0, -2.0, 5.0], [-2.0, 6.0, 
-7.0, -6.0, -4.0], [0.0, 6.0, 4.0, 0.0, 0.0]], [[-9.0, 18.0, 3.0, -6.0, 18.0], [21.0, 18.0, 0.0, 6.0, -15.0], [6.0, -18.0, 
--21.0, 18.0, 12.0], [0.0, -18.0, -12.0, 0.0, 0.0]], [[-21.0, 42.0, 7.0, -14.0, 42.0], [49.0, 42.0, 0.0, 14.0, -35.0], [14.0, 
--42.0, -49.0, 42.0, 28.0], [0.0, -42.0, -28.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-18.0, 36.0, 6.0, -12.0, 36.0], [42.0, 36.0, 0.0, 12.0, -30.0], [12.0, -36.0, 
--42.0, 36.0, 24.0], [0.0, -36.0, -24.0, 0.0, 0.0]], [[21.0, -42.0, -7.0, 14.0, -42.0], [-49.0, -42.0, 0.0, -14.0, 35.0], 
-[-14.0, 42.0, 49.0, -42.0, -28.0], [0.0, 42.0, 28.0, 0.0, 0.0]], [[-6.0, 12.0, 2.0, -4.0, 12.0], [14.0, 12.0, 0.0, 4.0, -10.0], 
-[4.0, -12.0, -14.0, 12.0, 8.0], [0.0, -12.0, -8.0, 0.0, 0.0]], [[18.0, -36.0, -6.0, 12.0, -36.0], [-42.0, -36.0, 0.0, -12.0, 
-30.0], [-12.0, 36.0, 42.0, -36.0, -24.0], [0.0, 36.0, 24.0, 0.0, 0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank3_offset1(self):
-      arg0=numpy.array([[[-1.0, -2.0, -7.0], [-3.0, 0.0, -2.0], [0.0, 1.0, -5.0], [0.0, -6.0, 5.0], [6.0, -1.0, -4.0]], [[0.0, 
-1.0, 6.0], [0.0, -7.0, -7.0], [1.0, 3.0, 7.0], [6.0, 7.0, 0.0], [7.0, 0.0, 0.0]], [[6.0, 3.0, -3.0], [0.0, 2.0, 0.0], [4.0, 
--1.0, 6.0], [3.0, 3.0, 0.0], [7.0, 0.0, -6.0]], [[3.0, 5.0, -4.0], [-6.0, 0.0, 6.0], [-5.0, -2.0, -5.0], [-2.0, 4.0, 0.0], 
-[-3.0, -5.0, -6.0]]])
-      arg1=numpy.array([[[-7.0, 4.0, -3.0, 4.0, 5.0], [-6.0, -2.0, 5.0, -1.0, 7.0], [-2.0, -7.0, -2.0, 4.0, -5.0], [5.0, 3.0, 
--1.0, 3.0, 4.0]], [[3.0, -2.0, -1.0, 4.0, 3.0], [-6.0, 2.0, -3.0, -4.0, 4.0], [2.0, 2.0, -1.0, -1.0, -2.0], [2.0, -7.0, 7.0, 
-6.0, -2.0]], [[7.0, -4.0, 0.0, -4.0, -3.0], [-3.0, 6.0, 4.0, -6.0, 0.0], [1.0, 2.0, 6.0, 4.0, 4.0], [0.0, 0.0, 5.0, -7.0, 
-2.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[-48.0, 28.0, 5.0, 16.0, 10.0], [39.0, -44.0, -27.0, 51.0, -15.0], [-9.0, -11.0, -38.0, -30.0, -19.0], 
-[-9.0, 11.0, -48.0, 34.0, -14.0]], [[7.0, -4.0, 9.0, -4.0, -9.0], [24.0, -6.0, -23.0, 15.0, -21.0], [4.0, 17.0, -6.0, -20.0, 
-7.0], [-15.0, -9.0, -7.0, 5.0, -16.0]], [[-32.0, 18.0, -1.0, 24.0, 18.0], [9.0, -28.0, -23.0, 26.0, 4.0], [-3.0, -8.0, -31.0, 
--21.0, -22.0], [2.0, -7.0, -18.0, 41.0, -12.0]], [[17.0, -8.0, 6.0, -44.0, -33.0], [21.0, 18.0, 38.0, -6.0, -24.0], [-7.0, 
--2.0, 36.0, 26.0, 32.0], [-12.0, 42.0, -17.0, -71.0, 22.0]], [[-73.0, 42.0, -17.0, 36.0, 39.0], [-18.0, -38.0, 17.0, 22.0, 
-38.0], [-18.0, -52.0, -35.0, 9.0, -44.0], [28.0, 25.0, -33.0, 40.0, 18.0]]], [[[45.0, -26.0, -1.0, -20.0, -15.0], [-24.0, 38.0, 
-21.0, -40.0, 4.0], [8.0, 14.0, 35.0, 23.0, 22.0], [2.0, -7.0, 37.0, -36.0, 10.0]], [[-70.0, 42.0, 7.0, 0.0, 0.0], [63.0, -56.0, 
--7.0, 70.0, -28.0], [-21.0, -28.0, -35.0, -21.0, -14.0], [-14.0, 49.0, -84.0, 7.0, 0.0]], [[51.0, -30.0, -6.0, -12.0, -7.0], 
-[-45.0, 46.0, 24.0, -55.0, 19.0], [11.0, 13.0, 37.0, 29.0, 17.0], [11.0, -18.0, 55.0, -28.0, 12.0]], [[-21.0, 10.0, -25.0, 
-52.0, 51.0], [-78.0, 2.0, 9.0, -34.0, 70.0], [2.0, -28.0, -19.0, 17.0, -44.0], [44.0, -31.0, 43.0, 60.0, 10.0]], [[-49.0, 28.0, 
--21.0, 28.0, 35.0], [-42.0, -14.0, 35.0, -7.0, 49.0], [-14.0, -49.0, -14.0, 28.0, -35.0], [35.0, 21.0, -7.0, 21.0, 28.0]]], 
-[[[-54.0, 30.0, -21.0, 48.0, 48.0], [-45.0, -24.0, 9.0, 0.0, 54.0], [-9.0, -42.0, -33.0, 9.0, -48.0], [36.0, -3.0, 0.0, 57.0, 
-12.0]], [[6.0, -4.0, -2.0, 8.0, 6.0], [-12.0, 4.0, -6.0, -8.0, 8.0], [4.0, 4.0, -2.0, -2.0, -4.0], [4.0, -14.0, 14.0, 12.0, 
--4.0]], [[11.0, -6.0, -11.0, -12.0, -1.0], [-36.0, 26.0, 47.0, -36.0, 24.0], [-4.0, -18.0, 29.0, 41.0, 6.0], [18.0, 19.0, 19.0, 
--36.0, 30.0]], [[-12.0, 6.0, -12.0, 24.0, 24.0], [-36.0, 0.0, 6.0, -15.0, 33.0], [0.0, -15.0, -9.0, 9.0, -21.0], [21.0, -12.0, 
-18.0, 27.0, 6.0]], [[-91.0, 52.0, -21.0, 52.0, 53.0], [-24.0, -50.0, 11.0, 29.0, 49.0], [-20.0, -61.0, -50.0, 4.0, -59.0], 
-[35.0, 21.0, -37.0, 63.0, 16.0]]], [[[-34.0, 18.0, -14.0, 48.0, 42.0], [-36.0, -20.0, -16.0, 1.0, 41.0], [0.0, -19.0, -35.0, 
--9.0, -41.0], [25.0, -26.0, 12.0, 67.0, -6.0]], [[84.0, -48.0, 18.0, -48.0, -48.0], [18.0, 48.0, -6.0, -30.0, -42.0], [18.0, 
-54.0, 48.0, 0.0, 54.0], [-30.0, -18.0, 36.0, -60.0, -12.0]], [[-6.0, 4.0, 17.0, -8.0, -16.0], [57.0, -24.0, -39.0, 43.0, 
--43.0], [1.0, 21.0, -18.0, -38.0, 9.0], [-29.0, -1.0, -34.0, 8.0, -26.0]], [[26.0, -16.0, 2.0, 8.0, 2.0], [-12.0, 12.0, -22.0, 
--14.0, 2.0], [12.0, 22.0, 0.0, -12.0, 2.0], [-2.0, -34.0, 30.0, 18.0, -16.0]], [[-36.0, 22.0, 14.0, -8.0, -12.0], [66.0, -40.0, 
--24.0, 59.0, -41.0], [-10.0, -1.0, -25.0, -31.0, 1.0], [-25.0, 26.0, -62.0, 3.0, -14.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank4_offset2(self):
-      arg0=numpy.array([[[[-1.0, -7.0, 5.0], [2.0, 1.0, 0.0]], [[-4.0, 0.0, 0.0], [-1.0, 3.0, 2.0]], [[-5.0, 3.0, 3.0], [4.0, 
--5.0, 3.0]], [[0.0, -6.0, -7.0], [-2.0, -2.0, 5.0]], [[-3.0, 7.0, 7.0], [-7.0, 0.0, 7.0]]], [[[-2.0, -3.0, -1.0], [0.0, 0.0, 
--4.0]], [[0.0, -1.0, 0.0], [-7.0, 4.0, -4.0]], [[5.0, -2.0, 3.0], [-7.0, 1.0, 0.0]], [[-7.0, 3.0, -2.0], [-7.0, 5.0, -6.0]], 
-[[5.0, -1.0, -1.0], [6.0, -4.0, -6.0]]], [[[-6.0, -1.0, 0.0], [5.0, 5.0, 4.0]], [[-1.0, 0.0, -4.0], [-4.0, -3.0, -7.0]], 
-[[-6.0, -1.0, 0.0], [4.0, -3.0, -6.0]], [[6.0, -1.0, 6.0], [-5.0, 5.0, -4.0]], [[6.0, -1.0, 6.0], [2.0, -4.0, 1.0]]], [[[4.0, 
-7.0, -6.0], [0.0, 4.0, -5.0]], [[3.0, -2.0, -3.0], [-2.0, -3.0, 4.0]], [[4.0, 7.0, 1.0], [7.0, 3.0, 1.0]], [[3.0, -5.0, -7.0], 
-[-1.0, -4.0, -7.0]], [[-5.0, 6.0, 6.0], [5.0, 7.0, 0.0]]]])
-      arg1=numpy.array([[[[6.0, 3.0, -6.0, 7.0, -5.0], [7.0, 7.0, 0.0, 5.0, 2.0], [1.0, -5.0, -3.0, -3.0, 1.0], [1.0, -7.0, 
-2.0, -2.0, -1.0]], [[7.0, -7.0, -7.0, -7.0, 0.0], [7.0, 1.0, -1.0, 0.0, -4.0], [1.0, 1.0, 0.0, -4.0, 7.0], [-4.0, 0.0, -5.0, 
-6.0, 4.0]], [[-4.0, 2.0, 1.0, 4.0, 6.0], [-7.0, 4.0, -3.0, 5.0, -5.0], [5.0, -2.0, 3.0, -6.0, 4.0], [3.0, 5.0, -5.0, -3.0, 
-4.0]]], [[[3.0, 6.0, -1.0, -2.0, -6.0], [-5.0, -3.0, 4.0, -3.0, 0.0], [-1.0, -4.0, 0.0, 3.0, 0.0], [3.0, 7.0, 5.0, 1.0, 3.0]], 
-[[3.0, -1.0, -6.0, 7.0, 0.0], [2.0, 7.0, 3.0, 0.0, 3.0], [0.0, 2.0, -3.0, 2.0, 4.0], [6.0, 3.0, -3.0, -3.0, -7.0]], [[-7.0, 
-7.0, 0.0, 3.0, 4.0], [-3.0, 6.0, 0.0, 4.0, -2.0], [2.0, 3.0, 6.0, 3.0, -3.0], [-3.0, 6.0, -2.0, -2.0, -7.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[[-66.0, 67.0, 52.0, 65.0, 23.0], [-99.0, 7.0, 3.0, 14.0, 4.0], [15.0, -18.0, 15.0, 9.0, -26.0], [54.0, 
-49.0, 15.0, -56.0, -8.0]], [[-32.0, -7.0, 7.0, 1.0, 34.0], [-23.0, 8.0, 5.0, -9.0, -3.0], [1.0, 36.0, 15.0, 21.0, 2.0], [5.0, 
-42.0, -26.0, -6.0, -34.0]], [[-45.0, 20.0, 38.0, -78.0, 31.0], [-74.0, -49.0, -11.0, -10.0, -58.0], [15.0, 5.0, 57.0, -4.0, 
--1.0], [-35.0, 81.0, -11.0, 32.0, 55.0]], [[-61.0, 53.0, 49.0, 19.0, -10.0], [-2.0, -12.0, 13.0, -9.0, 43.0], [-29.0, 27.0, 
-15.0, 71.0, -93.0], [-30.0, -25.0, 51.0, -21.0, -79.0]], [[-67.0, -37.0, -17.0, -7.0, 127.0], [-7.0, 77.0, -56.0, 69.0, -83.0], 
-[60.0, 57.0, 72.0, -61.0, 53.0], [-52.0, 49.0, -125.0, 6.0, -11.0]]], [[[-1.0, -15.0, 32.0, -9.0, -12.0], [-16.0, -45.0, 6.0, 
--31.0, 21.0], [-18.0, -3.0, -21.0, 12.0, -15.0], [19.0, -15.0, 24.0, -3.0, 14.0]], [[12.0, -67.0, -10.0, 37.0, 26.0], [48.0, 
-24.0, -15.0, 5.0, 24.0], [-2.0, 23.0, -36.0, -21.0, 21.0], [19.0, -61.0, -34.0, -17.0, -25.0]], [[-14.0, -8.0, -12.0, 82.0, 
-35.0], [37.0, 73.0, -32.0, 61.0, 6.0], [25.0, -3.0, -9.0, -44.0, 7.0], [7.0, -66.0, -33.0, -41.0, -29.0]], [[23.0, -135.0, 
--4.0, -47.0, 41.0], [49.0, -34.0, -10.0, -48.0, 11.0], [-19.0, 62.0, -36.0, -8.0, 44.0], [2.0, -31.0, -57.0, 28.0, -3.0]], 
-[[75.0, 18.0, -6.0, -20.0, -91.0], [15.0, -52.0, 16.0, -22.0, 19.0], [-19.0, -74.0, -42.0, -13.0, -4.0], [18.0, -46.0, 74.0, 
-17.0, 75.0]]], [[[-41.0, 42.0, 8.0, 2.0, 16.0], [-76.0, 1.0, 36.0, -29.0, -1.0], [-4.0, 31.0, 27.0, 59.0, -5.0], [31.0, 116.0, 
--5.0, -12.0, -46.0]], [[38.0, -81.0, 24.0, -57.0, -23.0], [56.0, -74.0, -13.0, -41.0, 23.0], [-31.0, 2.0, -42.0, -12.0, -8.0], 
-[-22.0, -92.0, 21.0, 33.0, 43.0]], [[2.0, -26.0, 57.0, -82.0, -18.0], [-57.0, -112.0, 8.0, -66.0, -5.0], [-23.0, -11.0, -9.0, 
-10.0, -7.0], [10.0, 25.0, 34.0, 31.0, 77.0]], [[33.0, -26.0, -48.0, 106.0, 20.0], [40.0, 91.0, -22.0, 59.0, 9.0], [32.0, -25.0, 
--39.0, -67.0, 55.0], [55.0, -56.0, -45.0, -48.0, -8.0]], [[-8.0, 60.0, -1.0, 44.0, -2.0], [-28.0, 37.0, -21.0, 58.0, -28.0], 
-[35.0, -56.0, 18.0, -49.0, 4.0], [7.0, -4.0, 7.0, -24.0, 41.0]]], [[[144.0, -88.0, -103.0, -32.0, -76.0], [142.0, 9.0, 23.0, 
--30.0, 32.0], [-29.0, -8.0, -72.0, -11.0, 60.0], [-3.0, -76.0, 1.0, 50.0, 7.0]], [[-27.0, 36.0, 13.0, 18.0, -5.0], [20.0, 16.0, 
--6.0, 22.0, 12.0], [-4.0, 3.0, 15.0, 17.0, -47.0], [-34.0, -35.0, 22.0, -10.0, -36.0]], [[92.0, 11.0, -97.0, -7.0, -52.0], 
-[38.0, 45.0, 27.0, 8.0, -18.0], [11.0, -34.0, -12.0, -16.0, 66.0], [15.0, 41.0, -8.0, 27.0, 21.0]], [[45.0, -21.0, 35.0, -19.0, 
--79.0], [53.0, -79.0, 10.0, -45.0, 63.0], [-50.0, -31.0, -60.0, 21.0, -55.0], [-4.0, -117.0, 87.0, 10.0, 23.0]], [[24.0, -22.0, 
--53.0, -14.0, 31.0], [-46.0, 29.0, 17.0, -10.0, -43.0], [26.0, 13.0, 12.0, -16.0, 89.0], [46.0, 121.0, -66.0, 12.0, 19.0]]]])
+   def test_transposed_tensor_mult_array_rank4_array_rank4(self):
+      arg0=numpy.array([[[[3.0, 6.0, -5.0, 0.0, -4.0], [-2.0, 3.0, 0.0, 2.0, 1.0], [4.0, 1.0, -1.0, 7.0, 2.0], [5.0, -3.0, 
+-5.0, 0.0, -1.0]], [[5.0, 0.0, -2.0, -2.0, 3.0], [5.0, 7.0, 2.0, 1.0, 7.0], [4.0, -7.0, -2.0, 4.0, -7.0], [5.0, 0.0, 5.0, 5.0, 
+0.0]], [[0.0, -4.0, 0.0, 0.0, -7.0], [-2.0, 6.0, -3.0, 1.0, 3.0], [-2.0, 5.0, -2.0, 2.0, 2.0], [4.0, -3.0, -3.0, -6.0, -4.0]]], 
+[[[-3.0, -5.0, -1.0, 0.0, -7.0], [-4.0, 0.0, 1.0, -1.0, 4.0], [3.0, 2.0, 7.0, 2.0, 6.0], [-4.0, 4.0, 3.0, 7.0, 4.0]], [[-7.0, 
+-3.0, 2.0, -3.0, 0.0], [-5.0, 5.0, 1.0, 6.0, -1.0], [3.0, 1.0, 5.0, -6.0, 0.0], [2.0, 0.0, 2.0, 6.0, 0.0]], [[5.0, 4.0, 0.0, 
+-7.0, -6.0], [0.0, 3.0, 5.0, -2.0, -4.0], [4.0, -3.0, 1.0, 4.0, -2.0], [-6.0, -6.0, -6.0, 3.0, -7.0]]]])
+      arg1=numpy.array([[[[2.0, 0.0, 4.0, -2.0, -3.0], [4.0, -1.0, 0.0, 2.0, -4.0], [-6.0, -4.0, 3.0, 5.0, 5.0], [-2.0, 0.0, 
+4.0, -4.0, 3.0]], [[0.0, 4.0, 1.0, -5.0, 4.0], [1.0, -2.0, 7.0, 6.0, 1.0], [7.0, -3.0, 1.0, 2.0, -5.0], [-2.0, -3.0, 0.0, -2.0, 
+-3.0]], [[5.0, 1.0, 5.0, 4.0, -3.0], [-3.0, 0.0, -1.0, -7.0, 7.0], [-1.0, -5.0, 4.0, 5.0, -4.0], [3.0, 0.0, -4.0, -6.0, 0.0]]], 
+[[[-2.0, 5.0, -3.0, 0.0, 5.0], [-7.0, 3.0, 3.0, 3.0, -3.0], [-3.0, 3.0, -2.0, -7.0, 7.0], [-2.0, -1.0, 0.0, 0.0, -7.0]], [[3.0, 
+4.0, -7.0, -3.0, 0.0], [7.0, -4.0, -2.0, 4.0, 2.0], [-7.0, -5.0, -6.0, -4.0, -3.0], [3.0, 0.0, 1.0, 0.0, 2.0]], [[5.0, -3.0, 
+-7.0, -7.0, -3.0], [6.0, -4.0, -1.0, -5.0, 7.0], [3.0, -4.0, -6.0, -4.0, -4.0], [-5.0, -5.0, 1.0, 5.0, 1.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=numpy.array([[[[16.0, -38.0, 40.0, -45.0, -19.0], [19.0, -14.0, 35.0, -26.0, 23.0], [90.0, -21.0, 32.0, 54.0, -30.0], 
+[-56.0, -37.0, 10.0, 3.0, 6.0]], [[13.0, -53.0, 12.0, -47.0, -43.0], [74.0, -25.0, -9.0, -7.0, -15.0], [16.0, -20.0, 6.0, 41.0, 
+4.0], [-43.0, -15.0, 41.0, 20.0, 51.0]], [[-2.0, -5.0, -33.0, 14.0, 2.0], [-1.0, -2.0, -21.0, -17.0, 25.0], [5.0, 13.0, -27.0, 
+-30.0, -28.0], [22.0, 7.0, -18.0, 24.0, 2.0]], [[-44.0, 1.0, 68.0, 68.0, 13.0], [-65.0, 44.0, -1.0, 11.0, -57.0], [-14.0, 49.0, 
+58.0, 36.0, 47.0], [30.0, 41.0, -10.0, -31.0, -7.0]], [[-59.0, -12.0, 15.0, 7.0, 28.0], [21.0, 1.0, 13.0, 68.0, -51.0], [55.0, 
+45.0, 13.0, 24.0, -32.0], [25.0, 28.0, 6.0, 22.0, 22.0]]], [[[-21.0, -22.0, 34.0, -14.0, 12.0], [-4.0, 0.0, 35.0, 8.0, 1.0], 
+[96.0, 16.0, 29.0, 38.0, -40.0], [-19.0, -11.0, -5.0, 10.0, -3.0]], [[66.0, 45.0, -7.0, -53.0, -8.0], [54.0, -49.0, 30.0, 11.0, 
+68.0], [-1.0, -100.0, -8.0, 27.0, -71.0], [-2.0, -36.0, -4.0, -47.0, 1.0]], [[11.0, -1.0, -58.0, -60.0, 7.0], [41.0, -25.0, 
+13.0, 15.0, 15.0], [22.0, -13.0, -48.0, -42.0, -14.0], [-37.0, -32.0, 18.0, 39.0, -6.0]], [[19.0, 30.0, -11.0, -9.0, -4.0], 
+[43.0, -23.0, -7.0, 34.0, 1.0], [-51.0, -41.0, -11.0, 8.0, -16.0], [27.0, 8.0, 8.0, -26.0, 20.0]], [[-14.0, 59.0, 49.0, 6.0, 
+48.0], [-57.0, 17.0, 64.0, 51.0, -18.0], [23.0, -7.0, 44.0, 26.0, 5.0], [2.0, -5.0, -13.0, -56.0, -52.0]]], [[[21.0, 29.0, 
+-48.0, -73.0, 13.0], [50.0, -31.0, 29.0, 47.0, -1.0], [-12.0, -40.0, -40.0, -31.0, 4.0], [-39.0, -35.0, 31.0, 8.0, -11.0]], 
+[[11.0, 0.0, 30.0, 71.0, -27.0], [-43.0, 27.0, -47.0, -50.0, -1.0], [-82.0, 5.0, 24.0, 10.0, 43.0], [41.0, 34.0, -18.0, -35.0, 
+9.0]], [[-6.0, 42.0, -79.0, -18.0, 33.0], [-8.0, 2.0, -2.0, 36.0, -16.0], [-59.0, 12.0, -63.0, -92.0, 43.0], [-4.0, -6.0, 10.0, 
+25.0, -35.0]], [[22.0, -8.0, 50.0, -36.0, -13.0], [-6.0, -1.0, 40.0, -14.0, 0.0], [32.0, -30.0, 41.0, 47.0, 23.0], [-58.0, 
+-34.0, 18.0, -28.0, -13.0]], [[-8.0, 10.0, 7.0, 53.0, -4.0], [-59.0, 38.0, -31.0, -24.0, -33.0], [-87.0, 29.0, 7.0, -28.0, 
+87.0], [14.0, 25.0, -2.0, -16.0, -17.0]]], [[[14.0, 30.0, 85.0, 17.0, -9.0], [19.0, -11.0, 21.0, 38.0, -13.0], [-19.0, -53.0, 
+68.0, 99.0, -26.0], [36.0, 19.0, 0.0, -84.0, 26.0]], [[-59.0, 35.0, 3.0, 36.0, 56.0], [-67.0, 39.0, 21.0, 57.0, -63.0], [-9.0, 
+63.0, 7.0, -34.0, 49.0], [19.0, 26.0, -6.0, 0.0, -43.0]], [[-55.0, 58.0, -11.0, 9.0, 77.0], [-49.0, 20.0, 49.0, 88.0, -43.0], 
+[27.0, 43.0, -4.0, -35.0, 1.0], [21.0, 12.0, -12.0, -2.0, -53.0]], [[-11.0, 64.0, -109.0, -88.0, 64.0], [34.0, -25.0, 47.0, 
+102.0, -25.0], [-13.0, -6.0, -87.0, -105.0, 18.0], [-39.0, -37.0, 33.0, 41.0, -49.0]], [[-65.0, 37.0, 13.0, 35.0, 56.0], 
+[-62.0, 41.0, 23.0, 73.0, -85.0], [-23.0, 64.0, 15.0, -25.0, 67.0], [17.0, 31.0, 5.0, -7.0, -38.0]]]])
       self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
       self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank0_offset0(self):
-      arg0=numpy.array([[-7.0, 6.0, 1.0, 0.0, -6.0], [1.0, 3.0, -4.0, 5.0, -3.0], [-2.0, -7.0, -2.0, 0.0, -6.0], [6.0, -1.0, 
-3.0, -2.0, 1.0]])
-      arg1=Data(-6.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[42.0, -36.0, -6.0, -0.0, 36.0], [-6.0, -18.0, 24.0, -30.0, 18.0], [12.0, 42.0, 12.0, -0.0, 36.0], 
-[-36.0, 6.0, -18.0, 12.0, -6.0]]),self.functionspace)
+   def test_transposed_tensor_mult_array_rank4_constData_rank2(self):
+      arg0=numpy.array([[[[0.0, 0.0, 3.0, 2.0, 0.0], [1.0, -6.0, -2.0, 0.0, 1.0], [-5.0, -6.0, -3.0, 1.0, -6.0], [-2.0, 2.0, 
+6.0, 6.0, 5.0]], [[2.0, -1.0, -5.0, 0.0, 1.0], [0.0, 6.0, 0.0, 7.0, 0.0], [1.0, 7.0, 1.0, 0.0, -1.0], [2.0, 1.0, -3.0, 3.0, 
+0.0]], [[1.0, 6.0, 6.0, 0.0, -7.0], [-7.0, 0.0, 3.0, 4.0, -1.0], [-6.0, 2.0, -4.0, 3.0, 0.0], [-5.0, 1.0, 3.0, 7.0, 0.0]]], 
+[[[-7.0, -2.0, 2.0, 3.0, -5.0], [5.0, -6.0, 3.0, -7.0, -6.0], [2.0, 0.0, 3.0, 0.0, 2.0], [-1.0, -5.0, -7.0, 6.0, 2.0]], [[2.0, 
+-2.0, -4.0, -3.0, 3.0], [5.0, 3.0, 0.0, -2.0, -6.0], [0.0, -5.0, -6.0, -5.0, -6.0], [-7.0, -1.0, 1.0, 1.0, -7.0]], [[2.0, -3.0, 
+-4.0, 5.0, -6.0], [6.0, -7.0, -6.0, -3.0, 4.0], [0.0, -7.0, 5.0, 5.0, 0.0], [1.0, -1.0, 0.0, 2.0, 0.0]]]])
+      arg1=Data(numpy.array([[6.0, 4.0, -3.0], [-6.0, 2.0, -1.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[49.0, -11.0, -36.0, -17.0, 67.0], [1.0, 37.0, -33.0, 57.0, 29.0], [-20.0, -17.0, -37.0, -18.0, 
+-64.0], [2.0, 42.0, 59.0, -9.0, 4.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank1_offset1(self):
-      arg0=numpy.array([[[-7.0, 7.0, -5.0], [-3.0, 0.0, -6.0], [7.0, -6.0, -4.0], [3.0, -6.0, -4.0], [-4.0, -3.0, -7.0]], 
-[[7.0, 4.0, 6.0], [0.0, 5.0, -3.0], [6.0, -3.0, -2.0], [-7.0, 3.0, 4.0], [5.0, 4.0, 5.0]], [[-3.0, 3.0, 1.0], [-1.0, -7.0, 
-6.0], [-5.0, -2.0, 7.0], [3.0, 3.0, 4.0], [4.0, 4.0, -6.0]], [[1.0, 0.0, -1.0], [-7.0, 0.0, 0.0], [4.0, -7.0, -5.0], [-4.0, 
--4.0, 3.0], [-7.0, -1.0, -4.0]]])
-      arg1=Data(numpy.array([1.0, 2.0, -6.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[37.0, 33.0, 19.0, 15.0, 32.0], [-21.0, 28.0, 12.0, -25.0, -17.0], [-3.0, -51.0, -51.0, -15.0, 
-48.0], [7.0, -7.0, 20.0, -30.0, 15.0]]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=transposed_tensor_mult(arg0,arg1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank2_offset2(self):
-      arg0=numpy.array([[[[0.0, -6.0, 5.0], [-3.0, 1.0, 2.0]], [[-3.0, -7.0, 2.0], [-5.0, 1.0, -1.0]], [[5.0, 0.0, -7.0], [0.0, 
-0.0, -4.0]], [[4.0, 1.0, -2.0], [0.0, 2.0, 6.0]], [[7.0, 4.0, -7.0], [4.0, 7.0, 1.0]]], [[[0.0, -7.0, -4.0], [-4.0, 0.0, 
--6.0]], [[4.0, 2.0, 1.0], [1.0, 2.0, -4.0]], [[-3.0, 1.0, 6.0], [0.0, -6.0, 3.0]], [[0.0, -1.0, -2.0], [-2.0, -2.0, 0.0]], 
-[[3.0, 1.0, -1.0], [7.0, 0.0, -4.0]]], [[[-6.0, 2.0, 3.0], [-7.0, -2.0, -5.0]], [[-5.0, 3.0, 1.0], [2.0, -4.0, 2.0]], [[-1.0, 
--3.0, -7.0], [3.0, 6.0, 0.0]], [[-2.0, -6.0, -4.0], [-5.0, 1.0, 1.0]], [[-7.0, 3.0, -6.0], [-4.0, -2.0, 5.0]]], [[[3.0, -4.0, 
-4.0], [-7.0, 1.0, 2.0]], [[-6.0, 6.0, 6.0], [-1.0, -3.0, 7.0]], [[-1.0, -5.0, -7.0], [0.0, 7.0, 7.0]], [[-2.0, -7.0, 0.0], 
-[-2.0, 1.0, 0.0]], [[6.0, -1.0, -2.0], [5.0, -7.0, 6.0]]]])
-      arg1=Data(numpy.array([[-4.0, 4.0, -4.0], [2.0, -2.0, -5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-62.0, -31.0, 28.0, -38.0, 5.0], [10.0, 6.0, -11.0, 4.0, 30.0], [35.0, 30.0, 14.0, -17.0, 35.0], 
-[-70.0, -7.0, -37.0, -26.0, -26.0]]),self.functionspace)
+   def test_transposed_tensor_mult_array_rank4_constData_rank3(self):
+      arg0=numpy.array([[[[-1.0, 3.0, 4.0, -3.0, 0.0], [7.0, 2.0, 6.0, -6.0, -4.0], [-5.0, -2.0, 4.0, 5.0, -7.0], [0.0, -4.0, 
+-3.0, 4.0, 3.0]], [[1.0, 0.0, -3.0, -2.0, -5.0], [5.0, 0.0, 4.0, -5.0, -6.0], [0.0, 1.0, -6.0, 1.0, 0.0], [7.0, 5.0, -5.0, 5.0, 
+5.0]], [[-3.0, -2.0, 0.0, -6.0, -1.0], [3.0, -2.0, 2.0, -4.0, 6.0], [-7.0, -4.0, 1.0, 5.0, -1.0], [7.0, 0.0, -3.0, -2.0, 
+-2.0]]], [[[6.0, -7.0, -4.0, -2.0, 2.0], [-2.0, -7.0, -3.0, -1.0, 6.0], [3.0, 2.0, -1.0, -3.0, 0.0], [-6.0, 0.0, -3.0, 3.0, 
+-6.0]], [[-4.0, -2.0, 2.0, 6.0, 3.0], [1.0, 0.0, 5.0, 3.0, -1.0], [-3.0, -3.0, 0.0, -7.0, 0.0], [7.0, -4.0, -7.0, 6.0, -4.0]], 
+[[-6.0, -6.0, -5.0, 0.0, 2.0], [-6.0, 2.0, -5.0, 0.0, 2.0], [6.0, 5.0, -2.0, 3.0, 2.0], [-4.0, 0.0, 1.0, 2.0, 0.0]]]])
+      arg1=Data(numpy.array([[[-6.0, 7.0], [0.0, 5.0], [-4.0, 0.0]], [[1.0, -3.0], [0.0, 4.0], [-2.0, 
+-4.0]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[36.0, -12.0], [-5.0, 58.0], [-18.0, 53.0], [40.0, -1.0], [2.0, -27.0]], [[-44.0, 108.0], [-15.0, 
+27.0], [-37.0, 111.0], [51.0, -52.0], [2.0, -88.0]], [[49.0, -80.0], [20.0, -47.0], [-25.0, 9.0], [-59.0, 9.0], [42.0, -57.0]], 
+[[-26.0, 97.0], [24.0, -19.0], [25.0, -69.0], [-17.0, 60.0], [-16.0, 48.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank1_offset0(self):
-      arg0=numpy.array([[-2.0, 4.0, 2.0, -7.0, -2.0], [-3.0, -1.0, -4.0, -5.0, 0.0], [-7.0, 1.0, -3.0, -5.0, 3.0], [-5.0, -5.0, 
-0.0, -1.0, -3.0]])
-      arg1=Data(numpy.array([2.0, 0.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-4.0, 0.0], [8.0, 0.0], [4.0, 0.0], [-14.0, 0.0], [-4.0, 0.0]], [[-6.0, 0.0], [-2.0, 0.0], [-8.0, 
-0.0], [-10.0, 0.0], [0.0, 0.0]], [[-14.0, 0.0], [2.0, 0.0], [-6.0, 0.0], [-10.0, 0.0], [6.0, 0.0]], [[-10.0, 0.0], [-10.0, 
-0.0], [0.0, 0.0], [-2.0, 0.0], [-6.0, 0.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank2_offset1(self):
-      arg0=numpy.array([[[-7.0, -5.0, 0.0], [5.0, -6.0, 6.0], [0.0, -3.0, -7.0], [2.0, -2.0, 5.0], [2.0, 1.0, 3.0]], [[-1.0, 
--4.0, -4.0], [0.0, -5.0, 4.0], [-2.0, -7.0, -3.0], [-6.0, -4.0, -5.0], [0.0, -4.0, -3.0]], [[-2.0, 2.0, 3.0], [-6.0, 5.0, 5.0], 
-[3.0, -6.0, 3.0], [-1.0, 0.0, 3.0], [6.0, -1.0, 6.0]], [[-7.0, 1.0, -7.0], [7.0, -2.0, 5.0], [0.0, 5.0, -5.0], [7.0, 4.0, 3.0], 
-[-3.0, 4.0, 3.0]]])
-      arg1=Data(numpy.array([[-7.0, -3.0], [1.0, 6.0], [5.0, -4.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[44.0, -9.0], [-11.0, -75.0], [-38.0, 10.0], [9.0, -38.0], [2.0, -12.0]], [[-17.0, -5.0], [15.0, 
--46.0], [-8.0, -24.0], [13.0, 14.0], [-19.0, -12.0]], [[31.0, 6.0], [72.0, 28.0], [-12.0, -57.0], [22.0, -9.0], [-13.0, 
--48.0]], [[15.0, 55.0], [-26.0, -53.0], [-20.0, 50.0], [-30.0, -9.0], [40.0, 21.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank3_offset2(self):
-      arg0=numpy.array([[[[1.0, 5.0, -7.0], [2.0, -1.0, -6.0]], [[6.0, 0.0, 7.0], [-1.0, -7.0, -6.0]], [[2.0, 0.0, 2.0], [7.0, 
-7.0, -2.0]], [[4.0, 0.0, 2.0], [5.0, 0.0, 0.0]], [[-3.0, 0.0, 2.0], [0.0, -3.0, -6.0]]], [[[0.0, -6.0, -4.0], [-6.0, 6.0, 
-6.0]], [[-1.0, 3.0, -4.0], [-5.0, 3.0, 4.0]], [[3.0, -3.0, -1.0], [0.0, 5.0, -2.0]], [[-5.0, -7.0, -1.0], [0.0, -3.0, 1.0]], 
-[[-4.0, 4.0, -5.0], [-2.0, 4.0, 5.0]]], [[[0.0, -1.0, -7.0], [7.0, 5.0, -5.0]], [[1.0, -6.0, 7.0], [6.0, -6.0, 1.0]], [[2.0, 
-3.0, 1.0], [0.0, 5.0, 4.0]], [[-6.0, 4.0, -4.0], [0.0, 4.0, 6.0]], [[1.0, -4.0, 2.0], [2.0, 0.0, -3.0]]], [[[-4.0, -7.0, -7.0], 
-[0.0, 5.0, 6.0]], [[-4.0, 0.0, 3.0], [-3.0, -2.0, 7.0]], [[-5.0, 4.0, -6.0], [-1.0, 0.0, 0.0]], [[-2.0, 1.0, 0.0], [0.0, 0.0, 
--5.0]], [[6.0, 0.0, -3.0], [2.0, 5.0, -3.0]]]])
-      arg1=Data(numpy.array([[[-5.0, 6.0], [0.0, -5.0], [-2.0, -5.0]], [[3.0, -4.0], [0.0, 3.0], [1.0, 
-4.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[9.0, -19.0], [-53.0, -40.0], [5.0, -13.0], [-9.0, -6.0], [5.0, -61.0]], [[-4.0, 116.0], [2.0, 
-44.0], [-15.0, 45.0], [28.0, 5.0], [29.0, 21.0]], [[30.0, 7.0], [0.0, -37.0], [-8.0, 23.0], [44.0, 0.0], [-6.0, -4.0]], [[40.0, 
-85.0], [12.0, -5.0], [34.0, -16.0], [5.0, -37.0], [-21.0, 46.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_constData_rank2_offset0(self):
-      arg0=numpy.array([[0.0, -6.0, 0.0, 0.0, 0.0], [0.0, 7.0, -3.0, 6.0, -1.0], [-3.0, -3.0, -3.0, -1.0, 3.0], [-2.0, -3.0, 
-1.0, -2.0, 6.0]])
-      arg1=Data(numpy.array([[5.0, 0.0, -3.0, -5.0, -1.0], [-2.0, -2.0, 0.0, -4.0, 6.0], [-2.0, 5.0, 5.0, 0.0, -1.0], [3.0, 
--6.0, 3.0, -7.0, 7.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[-30.0, 0.0, 18.0, 30.0, 6.0], [12.0, 12.0, 0.0, 24.0, -36.0], [12.0, -30.0, -30.0, 0.0, 6.0], [-18.0, 36.0, 
--18.0, 42.0, -42.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[35.0, 0.0, -21.0, -35.0, -7.0], 
-[-14.0, -14.0, 0.0, -28.0, 42.0], [-14.0, 35.0, 35.0, 0.0, -7.0], [21.0, -42.0, 21.0, -49.0, 49.0]], [[-15.0, 0.0, 9.0, 15.0, 
-3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[30.0, 0.0, -18.0, -30.0, 
--6.0], [-12.0, -12.0, 0.0, -24.0, 36.0], [-12.0, 30.0, 30.0, 0.0, -6.0], [18.0, -36.0, 18.0, -42.0, 42.0]], [[-5.0, 0.0, 3.0, 
-5.0, 1.0], [2.0, 2.0, 0.0, 4.0, -6.0], [2.0, -5.0, -5.0, 0.0, 1.0], [-3.0, 6.0, -3.0, 7.0, -7.0]]], [[[-15.0, 0.0, 9.0, 15.0, 
-3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[-15.0, 0.0, 9.0, 15.0, 
-3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[-15.0, 0.0, 9.0, 15.0, 
-3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[-5.0, 0.0, 3.0, 5.0, 
-1.0], [2.0, 2.0, 0.0, 4.0, -6.0], [2.0, -5.0, -5.0, 0.0, 1.0], [-3.0, 6.0, -3.0, 7.0, -7.0]], [[15.0, 0.0, -9.0, -15.0, -3.0], 
-[-6.0, -6.0, 0.0, -12.0, 18.0], [-6.0, 15.0, 15.0, 0.0, -3.0], [9.0, -18.0, 9.0, -21.0, 21.0]]], [[[-10.0, 0.0, 6.0, 10.0, 
-2.0], [4.0, 4.0, 0.0, 8.0, -12.0], [4.0, -10.0, -10.0, 0.0, 2.0], [-6.0, 12.0, -6.0, 14.0, -14.0]], [[-15.0, 0.0, 9.0, 15.0, 
-3.0], [6.0, 6.0, 0.0, 12.0, -18.0], [6.0, -15.0, -15.0, 0.0, 3.0], [-9.0, 18.0, -9.0, 21.0, -21.0]], [[5.0, 0.0, -3.0, -5.0, 
--1.0], [-2.0, -2.0, 0.0, -4.0, 6.0], [-2.0, 5.0, 5.0, 0.0, -1.0], [3.0, -6.0, 3.0, -7.0, 7.0]], [[-10.0, 0.0, 6.0, 10.0, 2.0], 
-[4.0, 4.0, 0.0, 8.0, -12.0], [4.0, -10.0, -10.0, 0.0, 2.0], [-6.0, 12.0, -6.0, 14.0, -14.0]], [[30.0, 0.0, -18.0, -30.0, -6.0], 
-[-12.0, -12.0, 0.0, -24.0, 36.0], [-12.0, 30.0, 30.0, 0.0, -6.0], [18.0, -36.0, 18.0, -42.0, 42.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank3_offset1(self):
-      arg0=numpy.array([[[-2.0, -7.0, 6.0], [0.0, -6.0, 0.0], [2.0, 1.0, -1.0], [4.0, 5.0, -3.0], [1.0, 7.0, -5.0]], [[1.0, 
-0.0, 6.0], [7.0, -1.0, -6.0], [0.0, 3.0, 4.0], [-2.0, 7.0, 0.0], [2.0, 2.0, -1.0]], [[-6.0, 5.0, -1.0], [-7.0, -4.0, -4.0], 
-[-5.0, -4.0, 0.0], [1.0, 4.0, 6.0], [0.0, 0.0, -7.0]], [[-3.0, -4.0, -7.0], [3.0, -4.0, -1.0], [3.0, 5.0, 4.0], [0.0, 3.0, 
-0.0], [-4.0, -5.0, 7.0]]])
-      arg1=Data(numpy.array([[[0.0, 5.0, -7.0, -2.0, -6.0], [5.0, 0.0, 5.0, -3.0, -3.0], [-3.0, -3.0, -4.0, -6.0, 0.0], [-7.0, 
--2.0, 7.0, -5.0, 7.0]], [[0.0, -7.0, 0.0, 4.0, 2.0], [0.0, 0.0, 6.0, 5.0, 2.0], [-1.0, 4.0, -3.0, -7.0, -7.0], [0.0, 0.0, -6.0, 
--5.0, 4.0]], [[0.0, 6.0, 2.0, -5.0, 0.0], [7.0, -1.0, 7.0, -3.0, 6.0], [0.0, 1.0, -2.0, -3.0, 3.0], [-7.0, 0.0, 0.0, 2.0, 
-4.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[0.0, 75.0, 26.0, -54.0, -2.0], [32.0, -6.0, -10.0, -47.0, 28.0], [13.0, -16.0, 17.0, 43.0, 
-67.0], [-28.0, 4.0, 28.0, 57.0, -18.0]], [[0.0, 42.0, 0.0, -24.0, -12.0], [0.0, 0.0, -36.0, -30.0, -12.0], [6.0, -24.0, 18.0, 
-42.0, 42.0], [0.0, 0.0, 36.0, 30.0, -24.0]], [[0.0, -3.0, -16.0, 5.0, -10.0], [3.0, 1.0, 9.0, 2.0, -10.0], [-7.0, -3.0, -9.0, 
--16.0, -10.0], [-7.0, -4.0, 8.0, -17.0, 14.0]], [[0.0, -33.0, -34.0, 27.0, -14.0], [-1.0, 3.0, 29.0, 22.0, -20.0], [-17.0, 5.0, 
--25.0, -50.0, -44.0], [-7.0, -8.0, -2.0, -51.0, 36.0]], [[0.0, -74.0, -17.0, 51.0, 8.0], [-30.0, 5.0, 12.0, 47.0, -19.0], 
-[-10.0, 20.0, -15.0, -40.0, -64.0], [28.0, -2.0, -35.0, -50.0, 15.0]]], [[[0.0, 41.0, 5.0, -32.0, -6.0], [47.0, -6.0, 47.0, 
--21.0, 33.0], [-3.0, 3.0, -16.0, -24.0, 18.0], [-49.0, -2.0, 7.0, 7.0, 31.0]], [[0.0, 6.0, -61.0, 12.0, -44.0], [-7.0, 6.0, 
--13.0, -8.0, -59.0], [-20.0, -31.0, -13.0, -17.0, -11.0], [-7.0, -14.0, 55.0, -42.0, 21.0]], [[0.0, 3.0, 8.0, -8.0, 6.0], 
-[28.0, -4.0, 46.0, 3.0, 30.0], [-3.0, 16.0, -17.0, -33.0, -9.0], [-28.0, 0.0, -18.0, -7.0, 28.0]], [[0.0, -59.0, 14.0, 32.0, 
-26.0], [-10.0, 0.0, 32.0, 41.0, 20.0], [-1.0, 34.0, -13.0, -37.0, -49.0], [14.0, 4.0, -56.0, -25.0, 14.0]], [[0.0, -10.0, 
--16.0, 9.0, -8.0], [3.0, 1.0, 15.0, 7.0, -8.0], [-8.0, 1.0, -12.0, -23.0, -17.0], [-7.0, -4.0, 2.0, -22.0, 18.0]]], [[[0.0, 
--71.0, 40.0, 37.0, 46.0], [-37.0, 1.0, -7.0, 46.0, 22.0], [13.0, 37.0, 11.0, 4.0, -38.0], [49.0, 12.0, -72.0, 3.0, -26.0]], 
-[[0.0, -31.0, 41.0, 18.0, 34.0], [-63.0, 4.0, -87.0, 13.0, -11.0], [25.0, 1.0, 48.0, 82.0, 16.0], [77.0, 14.0, -25.0, 47.0, 
--81.0]], [[0.0, 3.0, 35.0, -6.0, 22.0], [-25.0, 0.0, -49.0, -5.0, 7.0], [19.0, -1.0, 32.0, 58.0, 28.0], [35.0, 10.0, -11.0, 
-45.0, -51.0]], [[0.0, 13.0, 5.0, -16.0, 2.0], [47.0, -6.0, 71.0, -1.0, 41.0], [-7.0, 19.0, -28.0, -52.0, -10.0], [-49.0, -2.0, 
--17.0, -13.0, 47.0]], [[0.0, -42.0, -14.0, 35.0, 0.0], [-49.0, 7.0, -49.0, 21.0, -42.0], [0.0, -7.0, 14.0, 21.0, -21.0], [49.0, 
-0.0, 0.0, -14.0, -28.0]]], [[[0.0, -29.0, 7.0, 25.0, 10.0], [-64.0, 7.0, -88.0, 10.0, -41.0], [13.0, -14.0, 38.0, 67.0, 7.0], 
-[70.0, 6.0, 3.0, 21.0, -65.0]], [[0.0, 37.0, -23.0, -17.0, -26.0], [8.0, 1.0, -16.0, -26.0, -23.0], [-5.0, -26.0, 2.0, 13.0, 
-25.0], [-14.0, -6.0, 45.0, 3.0, 1.0]], [[0.0, 4.0, -13.0, -6.0, -8.0], [43.0, -4.0, 73.0, 4.0, 25.0], [-14.0, 15.0, -35.0, 
--65.0, -23.0], [-49.0, -6.0, -9.0, -32.0, 57.0]], [[0.0, -21.0, 0.0, 12.0, 6.0], [0.0, 0.0, 18.0, 15.0, 6.0], [-3.0, 12.0, 
--9.0, -21.0, -21.0], [0.0, 0.0, -18.0, -15.0, 12.0]], [[0.0, 57.0, 42.0, -47.0, 14.0], [29.0, -7.0, -1.0, -34.0, 44.0], [17.0, 
--1.0, 17.0, 38.0, 56.0], [-21.0, 8.0, 2.0, 59.0, -20.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank4_offset2(self):
-      arg0=numpy.array([[[[-7.0, -7.0, 1.0], [0.0, 0.0, -6.0]], [[1.0, 4.0, 1.0], [-5.0, 3.0, -6.0]], [[7.0, 6.0, -6.0], [0.0, 
--5.0, 4.0]], [[-1.0, -5.0, 5.0], [6.0, 0.0, 5.0]], [[0.0, -3.0, 3.0], [-4.0, 0.0, 7.0]]], [[[5.0, -6.0, -6.0], [0.0, -1.0, 
--3.0]], [[3.0, 0.0, 6.0], [-1.0, -2.0, 4.0]], [[1.0, -7.0, 5.0], [-4.0, 0.0, -2.0]], [[0.0, -7.0, 2.0], [1.0, 6.0, 0.0]], 
-[[1.0, 3.0, -3.0], [-5.0, -5.0, 5.0]]], [[[-1.0, -5.0, -5.0], [7.0, 3.0, -2.0]], [[-1.0, 0.0, 7.0], [-3.0, 0.0, -7.0]], [[-2.0, 
-7.0, -6.0], [-3.0, -5.0, -2.0]], [[7.0, 6.0, 4.0], [-3.0, -1.0, 6.0]], [[-5.0, 7.0, 2.0], [5.0, 2.0, -3.0]]], [[[6.0, -2.0, 
--6.0], [-6.0, 1.0, 5.0]], [[-2.0, -7.0, 3.0], [6.0, 0.0, 3.0]], [[-3.0, 0.0, -7.0], [-5.0, -6.0, -4.0]], [[7.0, -2.0, 5.0], 
-[-4.0, 3.0, 4.0]], [[-4.0, -6.0, -6.0], [2.0, 4.0, 7.0]]]])
-      arg1=Data(numpy.array([[[[1.0, 5.0, -3.0, -3.0, 1.0], [0.0, 7.0, -1.0, 0.0, 4.0], [6.0, 2.0, 0.0, -4.0, -3.0], [3.0, 0.0, 
-2.0, 6.0, -4.0]], [[0.0, 0.0, -1.0, 3.0, 0.0], [-1.0, 3.0, -6.0, 4.0, -1.0], [0.0, 5.0, -5.0, -4.0, 2.0], [-4.0, -2.0, 0.0, 
-0.0, 5.0]], [[-6.0, 0.0, -2.0, 4.0, 4.0], [-6.0, -2.0, 3.0, 2.0, -3.0], [5.0, -5.0, -2.0, 3.0, 3.0], [-4.0, -1.0, -2.0, -4.0, 
--2.0]]], [[[3.0, -5.0, 5.0, 0.0, -7.0], [1.0, 6.0, 5.0, 0.0, 0.0], [-7.0, 6.0, 1.0, -2.0, 3.0], [-6.0, 0.0, 6.0, 0.0, -7.0]], 
-[[6.0, 0.0, -3.0, 2.0, 4.0], [4.0, 7.0, 0.0, 3.0, 2.0], [-4.0, -2.0, 4.0, -3.0, -1.0], [7.0, -7.0, 0.0, 5.0, 2.0]], [[6.0, 
--1.0, 0.0, -6.0, -3.0], [0.0, -7.0, -6.0, 7.0, -3.0], [4.0, -1.0, 6.0, 1.0, -5.0], [-2.0, -2.0, -2.0, 4.0, 
--1.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[-49.0, -29.0, 26.0, 40.0, 15.0], [1.0, -30.0, 88.0, -68.0, -6.0], [-61.0, -48.0, -3.0, 53.0, 
-40.0], [15.0, 25.0, -4.0, -70.0, -3.0]], [[-38.0, 36.0, -43.0, 55.0, 70.0], [-3.0, 50.0, -11.0, -15.0, 21.0], [10.0, -13.0, 
--51.0, -22.0, 20.0], [46.0, -18.0, -18.0, -7.0, 61.0]], [[37.0, 31.0, 0.0, -61.0, -49.0], [10.0, 16.0, -85.0, 25.0, 18.0], 
-[48.0, 80.0, -14.0, -51.0, -42.0], [-22.0, 21.0, 18.0, 57.0, 0.0]], [[17.0, -40.0, 28.0, -22.0, -38.0], [-19.0, -31.0, 46.0, 
-25.0, -29.0], [-3.0, -21.0, 51.0, 32.0, 1.0], [-49.0, -5.0, 14.0, -6.0, -78.0]], [[12.0, 13.0, -23.0, -39.0, 19.0], [-19.0, 
--88.0, -35.0, 43.0, -27.0], [71.0, -61.0, 47.0, 36.0, -44.0], [10.0, -11.0, -44.0, 16.0, 0.0]]], [[[17.0, 28.0, 6.0, -41.0, 
--14.0], [38.0, 43.0, 31.0, -60.0, 51.0], [-8.0, 15.0, 20.0, -14.0, -29.0], [62.0, 31.0, 28.0, 37.0, -37.0]], [[-24.0, 16.0, 
--20.0, -13.0, 14.0], [-45.0, -39.0, -14.0, 34.0, -22.0], [79.0, -30.0, 3.0, 18.0, -12.0], [-31.0, 0.0, -20.0, 0.0, -25.0]], 
-[[-53.0, 27.0, -26.0, 8.0, 55.0], [-27.0, -34.0, 48.0, -32.0, 2.0], [51.0, -80.0, 9.0, 45.0, -4.0], [39.0, 13.0, -28.0, -22.0, 
--19.0]], [[27.0, -5.0, -10.0, -1.0, 25.0], [20.0, 23.0, 53.0, -6.0, 13.0], [-21.0, -51.0, 56.0, 14.0, -11.0], [56.0, -30.0, 
-2.0, 22.0, -34.0]], [[4.0, 25.0, -10.0, -46.0, -11.0], [-10.0, -78.0, -83.0, 26.0, -15.0], [66.0, 7.0, -4.0, 5.0, -41.0], 
-[-12.0, 22.0, -32.0, 13.0, 37.0]]], [[[56.0, -38.0, 44.0, -14.0, -52.0], [54.0, 65.0, 63.0, -35.0, 28.0], [-100.0, 36.0, 42.0, 
--16.0, 6.0], [20.0, -2.0, 54.0, 21.0, -52.0]], [[-94.0, 17.0, -26.0, 73.0, 69.0], [-45.0, 10.0, 49.0, -35.0, -4.0], [22.0, 
--48.0, -59.0, 24.0, 50.0], [1.0, 7.0, -20.0, -62.0, 18.0]], [[-17.0, 7.0, 11.0, 5.0, -19.0], [6.0, -20.0, -61.0, -13.0, -1.0], 
-[-9.0, 55.0, -58.0, -19.0, 8.0], [-23.0, 31.0, -6.0, -21.0, 68.0]], [[4.0, 44.0, -47.0, -25.0, 22.0], [-37.0, -8.0, -82.0, 
-71.0, -10.0], [111.0, 2.0, -9.0, -25.0, -35.0], [-20.0, -21.0, -24.0, 45.0, 7.0]], [[-8.0, -47.0, 23.0, 66.0, -15.0], [-6.0, 
-47.0, 12.0, 17.0, -20.0], [-75.0, 44.0, -44.0, -21.0, 63.0], [-61.0, -24.0, 22.0, -40.0, 23.0]]], [[[60.0, 55.0, -37.0, -76.0, 
-13.0], [36.0, -16.0, -72.0, 18.0, 31.0], [64.0, -11.0, 50.0, -20.0, -84.0], [83.0, -7.0, -22.0, 85.0, 17.0]], [[16.0, -43.0, 
-37.0, -21.0, -41.0], [-5.0, -26.0, 65.0, -1.0, -19.0], [-27.0, -21.0, 53.0, 36.0, 4.0], [-32.0, 5.0, 20.0, -12.0, -78.0]], 
-[[-36.0, 14.0, 16.0, -7.0, -8.0], [13.0, -51.0, -19.0, -60.0, 9.0], [-10.0, 15.0, -39.0, 15.0, -1.0], [15.0, 57.0, -14.0, 
--36.0, 53.0]], [[7.0, 51.0, -58.0, -25.0, 55.0], [-20.0, 2.0, -24.0, 39.0, 9.0], [99.0, -55.0, 32.0, -2.0, -45.0], [46.0, 
--30.0, -28.0, 53.0, -18.0]], [[104.0, -37.0, 28.0, -64.0, -47.0], [60.0, -43.0, -10.0, 25.0, -5.0], [-56.0, -11.0, 102.0, 13.0, 
--51.0], [38.0, -24.0, 2.0, 48.0, -15.0]]]]),self.functionspace)
+   def test_transposed_tensor_mult_array_rank4_constData_rank4(self):
+      arg0=numpy.array([[[[7.0, 2.0, -1.0, 0.0, 2.0], [6.0, 0.0, 5.0, -1.0, 0.0], [-7.0, -3.0, 6.0, 0.0, 4.0], [-4.0, -1.0, 
+4.0, 6.0, -7.0]], [[-4.0, -5.0, 4.0, -7.0, -1.0], [6.0, -2.0, -5.0, 3.0, -2.0], [-7.0, 0.0, 3.0, 6.0, -3.0], [-3.0, -4.0, 0.0, 
+2.0, -1.0]], [[-3.0, -3.0, 7.0, 2.0, 1.0], [-2.0, 1.0, 2.0, 0.0, -4.0], [-6.0, 0.0, -6.0, -1.0, -6.0], [6.0, -1.0, 0.0, 1.0, 
+-4.0]]], [[[3.0, 5.0, 0.0, -1.0, -5.0], [7.0, 4.0, -2.0, -5.0, 0.0], [-2.0, -4.0, 1.0, -4.0, 2.0], [0.0, 6.0, -3.0, 0.0, 
+-4.0]], [[1.0, 0.0, 4.0, 3.0, 3.0], [-2.0, 6.0, 4.0, 5.0, 0.0], [0.0, 0.0, 0.0, 7.0, -4.0], [4.0, 7.0, 5.0, 5.0, 5.0]], [[-3.0, 
+-3.0, 3.0, 2.0, 3.0], [-4.0, 4.0, 7.0, 4.0, 3.0], [-2.0, -1.0, 4.0, 2.0, -7.0], [-2.0, -5.0, -3.0, 5.0, -2.0]]]])
+      arg1=Data(numpy.array([[[[-3.0, 5.0, -6.0, -5.0, 0.0], [0.0, 3.0, 4.0, 7.0, -1.0], [-3.0, 5.0, -7.0, 4.0, 0.0], [-1.0, 
+-1.0, 2.0, -7.0, 3.0]], [[-2.0, -2.0, 1.0, -7.0, 2.0], [5.0, 2.0, -3.0, 6.0, -1.0], [2.0, -7.0, -3.0, -2.0, 4.0], [5.0, 1.0, 
+4.0, 6.0, 0.0]], [[-2.0, 2.0, 7.0, -7.0, -7.0], [4.0, -6.0, -2.0, 6.0, -4.0], [-3.0, 1.0, -4.0, -6.0, -5.0], [1.0, 0.0, 3.0, 
+-1.0, -5.0]]], [[[-5.0, 0.0, -1.0, 0.0, 7.0], [5.0, 3.0, -2.0, -3.0, 2.0], [-5.0, 7.0, 1.0, 0.0, -1.0], [7.0, 2.0, 6.0, 1.0, 
+2.0]], [[-4.0, -1.0, -3.0, -4.0, -4.0], [-6.0, -1.0, 4.0, 0.0, -4.0], [4.0, -2.0, -3.0, 0.0, -1.0], [7.0, 1.0, -2.0, 6.0, 
+1.0]], [[-7.0, 1.0, -5.0, 5.0, -5.0], [0.0, -2.0, -2.0, 4.0, 6.0], [-7.0, 1.0, 1.0, 6.0, 4.0], [1.0, -4.0, 1.0, -5.0, 
+-5.0]]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-5.0, 33.0, -58.0, -5.0, 45.0], [-23.0, 45.0, 50.0, -14.0, -7.0], [-10.0, 76.0, -28.0, 36.0, 
+-17.0], [-5.0, 8.0, 2.0, -46.0, 58.0]], [[6.0, 11.0, -28.0, 31.0, 61.0], [-12.0, 35.0, 25.0, -61.0, 7.0], [-11.0, 74.0, 15.0, 
+18.0, -22.0], [2.0, 15.0, 2.0, -21.0, 46.0]], [[-56.0, 0.0, 32.0, -73.0, -72.0], [24.0, -47.0, -20.0, 71.0, -29.0], [-15.0, 
+-31.0, -42.0, -36.0, -11.0], [59.0, -3.0, 30.0, 33.0, -49.0]], [[-11.0, 17.0, -11.0, 33.0, -57.0], [-50.0, -36.0, 27.0, -19.0, 
+-3.0], [-17.0, 40.0, 5.0, 14.0, -32.0], [-17.0, -14.0, -32.0, -37.0, -19.0]], [[-14.0, 14.0, -25.0, -7.0, -71.0], [-44.0, 
+-26.0, 25.0, 41.0, -9.0], [5.0, -20.0, -26.0, 22.0, 5.0], [-17.0, -22.0, -30.0, -23.0, -21.0]]], [[[-25.0, 12.0, -25.0, -70.0, 
+103.0], [69.0, 73.0, -4.0, 29.0, -6.0], [-15.0, 35.0, -43.0, 0.0, 13.0], [53.0, 28.0, 72.0, 11.0, 60.0]], [[-70.0, 4.0, -37.0, 
+3.0, -27.0], [-22.0, -12.0, 12.0, -2.0, 6.0], [-31.0, 35.0, -8.0, 22.0, -7.0], [65.0, -4.0, 11.0, 7.0, -11.0]], [[-64.0, 42.0, 
+-66.0, 15.0, -89.0], [-51.0, -31.0, 37.0, 51.0, 14.0], [-54.0, 47.0, -35.0, 60.0, -4.0], [-7.0, -38.0, -17.0, -80.0, -30.0]], 
+[[-26.0, -12.0, -21.0, -16.0, -69.0], [-40.0, -25.0, 9.0, 42.0, -8.0], [26.0, -67.0, -18.0, 14.0, 28.0], [20.0, -17.0, -26.0, 
+30.0, -28.0]], [[-9.0, -1.0, -45.0, 57.0, 9.0], [-26.0, 14.0, 8.0, -24.0, 36.0], [-13.0, 13.0, 25.0, 46.0, 24.0], [-11.0, 
+-14.0, -17.0, -23.0, 5.0]]], [[[71.0, -35.0, 5.0, 116.0, 24.0], [-69.0, -1.0, 13.0, -129.0, 22.0], [49.0, -8.0, 90.0, 10.0, 
+-4.0], [-50.0, 4.0, -74.0, 21.0, 15.0]], [[36.0, -16.0, 27.0, 10.0, -23.0], [-20.0, -19.0, -2.0, -13.0, -11.0], [36.0, -44.0, 
+16.0, -18.0, 0.0], [-26.0, -1.0, -31.0, 22.0, -12.0]], [[-45.0, 16.0, -96.0, 11.0, 35.0], [-4.0, 55.0, 17.0, 37.0, 41.0], 
+[-27.0, 14.0, -22.0, 78.0, 57.0], [14.0, -17.0, 16.0, -37.0, 30.0]], [[-32.0, -19.0, -28.0, -53.0, -47.0], [-36.0, -5.0, 16.0, 
+50.0, -26.0], [49.0, -83.0, -37.0, 6.0, 34.0], [52.0, -3.0, -15.0, 65.0, -6.0]], [[61.0, 11.0, -24.0, 24.0, 101.0], [-5.0, 
+66.0, 31.0, -60.0, 1.0], [23.0, 50.0, 12.0, 16.0, -8.0], [-46.0, 21.0, -9.0, -27.0, 77.0]]], [[[4.0, -8.0, 61.0, -27.0, -54.0], 
+[-15.0, -54.0, 1.0, -18.0, -45.0], [18.0, -3.0, -1.0, -58.0, -54.0], [21.0, 13.0, -12.0, 38.0, -28.0]], [[-10.0, -11.0, -7.0, 
+-13.0, 38.0], [-36.0, 16.0, 36.0, -75.0, -37.0], [31.0, 45.0, 3.0, -20.0, -44.0], [66.0, 36.0, -4.0, 57.0, 46.0]], [[4.0, 12.0, 
+-21.0, -55.0, -26.0], [-45.0, 4.0, 48.0, 25.0, -48.0], [44.0, -14.0, -49.0, -2.0, -14.0], [7.0, 7.0, -23.0, 14.0, 26.0]], 
+[[-79.0, 28.0, -67.0, -46.0, -48.0], [-16.0, 1.0, 26.0, 80.0, -2.0], [-32.0, 12.0, -62.0, 44.0, 18.0], [45.0, -19.0, 18.0, 
+-26.0, -7.0]], [[45.0, -48.0, 12.0, 40.0, -12.0], [-71.0, -12.0, 15.0, -75.0, -16.0], [85.0, -72.0, 47.0, -14.0, 7.0], [3.0, 
+11.0, -66.0, 83.0, 6.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[-5.0, 3.0, 3.0, 0.0, -1.0], [-7.0, 0.0, 0.0, 0.0, -3.0], [2.0, -5.0, -1.0, 1.0, -6.0], [-6.0, -3.0, 
-0.0, 1.0, 0.0]])
+   def test_transposed_tensor_mult_array_rank4_expandedData_rank2(self):
+      arg0=numpy.array([[[[1.0, -1.0, 5.0, 5.0, 0.0], [-2.0, -4.0, 6.0, 3.0, -4.0], [-1.0, 2.0, -5.0, -5.0, 4.0], [1.0, -3.0, 
+-6.0, 4.0, -7.0]], [[-6.0, 0.0, 2.0, 4.0, 1.0], [-2.0, 0.0, 7.0, 4.0, -3.0], [2.0, 6.0, 2.0, 0.0, 7.0], [-4.0, -5.0, 7.0, 6.0, 
+2.0]], [[-6.0, 4.0, -2.0, 4.0, -5.0], [-5.0, -1.0, 7.0, 4.0, 7.0], [-1.0, -7.0, 0.0, 1.0, -6.0], [-7.0, -4.0, -5.0, 0.0, 
+-3.0]]], [[[-2.0, -1.0, 4.0, 0.0, 1.0], [7.0, -1.0, 0.0, -3.0, -4.0], [6.0, 7.0, -4.0, -6.0, 0.0], [6.0, 5.0, 0.0, 7.0, 7.0]], 
+[[-2.0, 0.0, 0.0, -2.0, -7.0], [-5.0, 0.0, -4.0, 6.0, -2.0], [6.0, 0.0, -1.0, -6.0, -1.0], [4.0, -7.0, -2.0, 5.0, 4.0]], [[4.0, 
+0.0, -3.0, 7.0, 1.0], [5.0, 6.0, -2.0, 3.0, 1.0], [5.0, 3.0, 4.0, 0.0, -3.0], [-5.0, 1.0, 6.0, -7.0, -6.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-2.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[3.0, -1.0, 0.0], [-5.0, 5.0, 6.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 0.0, -3.0], [-2.0, 
+-1.0, 3.0]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[15.0, -9.0, -9.0, -0.0, 3.0], [21.0, -0.0, -0.0, -0.0, 9.0], [-6.0, 15.0, 3.0, -3.0, 18.0], 
-[18.0, 9.0, -0.0, -3.0, -0.0]])+(1.-msk_ref)*numpy.array([[10.0, -6.0, -6.0, -0.0, 2.0], [14.0, -0.0, -0.0, -0.0, 6.0], [-4.0, 
-10.0, 2.0, -2.0, 12.0], [12.0, 6.0, -0.0, -2.0, -0.0]])
+      ref=msk_ref*numpy.array([[33.0, 2.0, -25.0, 43.0, -35.0], [-34.0, 29.0, -21.0, 68.0, 7.0], [25.0, -17.0, 22.0, -15.0, 
+-18.0], [-33.0, -58.0, 1.0, -46.0, -74.0]])+(1.-msk_ref)*numpy.array([[32.0, -6.0, -31.0, -9.0, 23.0], [29.0, 39.0, -47.0, 
+-15.0, 8.0], [4.0, 8.0, 41.0, 35.0, -6.0], [-14.0, 24.0, 59.0, -56.0, 1.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[[-1.0, 6.0, -2.0], [5.0, 6.0, 1.0], [-1.0, 0.0, -3.0], [-1.0, -5.0, -6.0], [-6.0, -1.0, -7.0]], [[3.0, 
--1.0, 6.0], [-2.0, -2.0, -4.0], [2.0, -1.0, 7.0], [4.0, 1.0, 3.0], [-4.0, 1.0, 5.0]], [[-7.0, 2.0, 2.0], [2.0, 2.0, -3.0], 
-[-5.0, -6.0, -1.0], [-6.0, 6.0, 5.0], [2.0, 4.0, -3.0]], [[1.0, 0.0, 2.0], [7.0, 6.0, -6.0], [-1.0, -5.0, -6.0], [0.0, -1.0, 
--5.0], [-5.0, -1.0, 5.0]]])
+   def test_transposed_tensor_mult_array_rank4_expandedData_rank3(self):
+      arg0=numpy.array([[[[-1.0, 3.0, 2.0, 2.0, -5.0], [-6.0, -7.0, 0.0, 0.0, -7.0], [2.0, -2.0, 7.0, 0.0, 6.0], [0.0, 5.0, 
+4.0, 6.0, 2.0]], [[5.0, -5.0, 0.0, -2.0, 0.0], [-6.0, -6.0, -7.0, 0.0, -1.0], [6.0, -5.0, 1.0, -5.0, 5.0], [1.0, 1.0, -7.0, 
+-3.0, 1.0]], [[-6.0, 0.0, 5.0, 0.0, -4.0], [-3.0, 4.0, -7.0, 6.0, 1.0], [0.0, -7.0, -4.0, 1.0, -4.0], [0.0, 2.0, 1.0, -2.0, 
+3.0]]], [[[-7.0, 3.0, 7.0, 7.0, 1.0], [-7.0, -3.0, -4.0, 6.0, -2.0], [0.0, -7.0, 7.0, -3.0, -7.0], [7.0, -7.0, -1.0, 0.0, 
+5.0]], [[0.0, 3.0, 5.0, 4.0, -1.0], [-1.0, 7.0, 2.0, 4.0, -5.0], [-2.0, 3.0, 4.0, 1.0, -2.0], [-2.0, -3.0, 0.0, 6.0, 3.0]], 
+[[-5.0, -5.0, -7.0, 5.0, 2.0], [-6.0, 2.0, 6.0, 2.0, -5.0], [0.0, 1.0, 4.0, -3.0, -2.0], [-7.0, -6.0, 0.0, 1.0, 7.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-2.0, -2.0, 2.0])+(1.-msk_arg1)*numpy.array([0.0, 0.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[[3.0, -4.0], [-7.0, -7.0], [-2.0, -5.0]], [[-6.0, 0.0], [-7.0, 1.0], [-6.0, 
+0.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, -4.0], [0.0, -5.0], [6.0, 0.0]], [[-1.0, -5.0], [-7.0, -7.0], [-1.0, 0.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-14.0, -20.0, -4.0, 0.0, 0.0], [8.0, 0.0, 12.0, -4.0, 16.0], [14.0, -14.0, 20.0, 10.0, -18.0], 
-[2.0, -38.0, 0.0, -8.0, 22.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]])
+      ref=msk_ref*numpy.array([[[46.0, -1.0], [35.0, 26.0], [-39.0, -28.0], [-80.0, 10.0], [-18.0, 39.0]], [[115.0, 80.0], 
+[-30.0, 57.0], [37.0, 86.0], [-88.0, -26.0], [61.0, 25.0]], [[-22.0, -52.0], [58.0, 81.0], [-72.0, -11.0], [62.0, 31.0], [59.0, 
+-41.0]], [[7.0, -9.0], [103.0, -40.0], [65.0, 28.0], [-5.0, 13.0], [-100.0, -27.0]]])+(1.-msk_ref)*numpy.array([[[-27.0, 14.0], 
+[-10.0, -23.0], [1.0, -78.0], [-34.0, -61.0], [-35.0, 22.0]], [[-16.0, 96.0], [-45.0, 24.0], [-58.0, 41.0], [0.0, -58.0], 
+[27.0, 78.0]], [[20.0, -24.0], [-63.0, 47.0], [-42.0, -96.0], [5.0, 33.0], [17.0, 0.0]], [[14.0, -26.0], [61.0, 31.0], [19.0, 
+24.0], [-37.0, -51.0], [-9.0, -59.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[[[5.0, -3.0, 1.0], [1.0, -2.0, 1.0]], [[-7.0, 5.0, 1.0], [3.0, 2.0, -2.0]], [[-6.0, 2.0, -4.0], [-6.0, 
-1.0, -5.0]], [[5.0, -1.0, 0.0], [-3.0, 1.0, 2.0]], [[-1.0, 4.0, 0.0], [0.0, 4.0, -4.0]]], [[[3.0, 4.0, 3.0], [-5.0, -2.0, 
-5.0]], [[3.0, -2.0, -5.0], [0.0, -4.0, 0.0]], [[5.0, 5.0, -7.0], [-6.0, 2.0, -2.0]], [[3.0, -3.0, 0.0], [-2.0, 3.0, -6.0]], 
-[[-3.0, 1.0, 2.0], [6.0, 5.0, -3.0]]], [[[4.0, 0.0, 0.0], [-1.0, 2.0, -1.0]], [[-4.0, 1.0, 1.0], [6.0, 4.0, -4.0]], [[-1.0, 
--2.0, -4.0], [-6.0, 3.0, -7.0]], [[0.0, -3.0, 0.0], [6.0, -1.0, -3.0]], [[-6.0, 0.0, 3.0], [1.0, 7.0, -7.0]]], [[[0.0, 0.0, 
--4.0], [-4.0, 1.0, -6.0]], [[-1.0, 2.0, 3.0], [-1.0, 5.0, -5.0]], [[5.0, 3.0, 3.0], [4.0, -2.0, 1.0]], [[1.0, -4.0, 0.0], [5.0, 
-3.0, 5.0]], [[5.0, 6.0, -3.0], [1.0, 5.0, 5.0]]]])
+   def test_transposed_tensor_mult_array_rank4_expandedData_rank4(self):
+      arg0=numpy.array([[[[0.0, 5.0, 1.0, -4.0, -7.0], [7.0, 4.0, -3.0, -2.0, 4.0], [3.0, -2.0, 6.0, 7.0, -4.0], [-7.0, 3.0, 
+-1.0, 4.0, -5.0]], [[-5.0, 0.0, -5.0, 4.0, -6.0], [-6.0, 7.0, 3.0, -5.0, -5.0], [-1.0, 6.0, 1.0, -6.0, -2.0], [0.0, -7.0, -1.0, 
+5.0, 4.0]], [[-3.0, -1.0, 0.0, 4.0, 5.0], [0.0, -3.0, 1.0, 3.0, 4.0], [3.0, -6.0, 4.0, 6.0, -4.0], [5.0, 0.0, -5.0, -7.0, 
+0.0]]], [[[0.0, -6.0, -5.0, 4.0, 6.0], [0.0, 0.0, -5.0, 4.0, 6.0], [-6.0, -4.0, -5.0, 6.0, -5.0], [6.0, -2.0, 2.0, 6.0, 0.0]], 
+[[5.0, 0.0, -2.0, 4.0, 5.0], [7.0, 4.0, -3.0, -2.0, -6.0], [-6.0, 2.0, -4.0, -1.0, 5.0], [-5.0, -1.0, -4.0, 4.0, 6.0]], [[0.0, 
+-2.0, -3.0, 5.0, -7.0], [5.0, -2.0, -7.0, 3.0, 0.0], [-5.0, 4.0, -4.0, -5.0, 3.0], [0.0, 6.0, -2.0, 1.0, 4.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-1.0, 1.0, 1.0], [6.0, -7.0, -7.0]])+(1.-msk_arg1)*numpy.array([[3.0, 6.0, -7.0], [7.0, 6.0, 
-4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[6.0, 31.0, -4.0, -45.0, 5.0], [-47.0, 18.0, -43.0, 3.0, 28.0], [-17.0, 42.0, -13.0, 61.0, 
-15.0], [7.0, 0.0, 32.0, -31.0, -66.0]])+(1.-msk_ref)*numpy.array([[-11.0, 27.0, -34.0, 2.0, 29.0], [-15.0, 8.0, 56.0, -29.0, 
-43.0], [13.0, 37.0, -39.0, 6.0, -18.0], [-18.0, -9.0, 32.0, 52.0, 129.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank1_offset0(self):
-      arg0=numpy.array([[7.0, -2.0, 0.0, -1.0, 5.0], [-4.0, 7.0, 1.0, -2.0, -1.0], [-1.0, 2.0, -7.0, -5.0, 6.0], [0.0, -7.0, 
--5.0, 3.0, -5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, -5.0])+(1.-msk_arg1)*numpy.array([0.0, -7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[2.0, 3.0, 2.0, -7.0, -6.0], [7.0, -6.0, 1.0, 5.0, 4.0], [0.0, -4.0, 2.0, -3.0, -5.0], 
+[-1.0, -1.0, 5.0, -3.0, -3.0]], [[5.0, -5.0, 3.0, -7.0, -5.0], [0.0, 4.0, 2.0, 5.0, -2.0], [5.0, -6.0, -4.0, 1.0, 0.0], [3.0, 
+3.0, 6.0, 2.0, 7.0]], [[0.0, -2.0, 6.0, 1.0, 5.0], [3.0, 5.0, 6.0, 0.0, 3.0], [6.0, -7.0, -4.0, -2.0, -4.0], [5.0, 0.0, -5.0, 
+2.0, 5.0]]], [[[5.0, -2.0, -3.0, 6.0, -2.0], [3.0, -1.0, -5.0, 5.0, -2.0], [5.0, 3.0, -5.0, 6.0, 2.0], [-2.0, 2.0, -3.0, 3.0, 
+-3.0]], [[-2.0, 0.0, 3.0, 5.0, -3.0], [2.0, 0.0, 6.0, -7.0, -4.0], [7.0, 6.0, -1.0, -6.0, -1.0], [1.0, 1.0, -5.0, -4.0, 5.0]], 
+[[6.0, 5.0, 6.0, -2.0, 4.0], [-2.0, 7.0, 5.0, 6.0, -4.0], [4.0, 1.0, 0.0, -5.0, 1.0], [-7.0, -5.0, 0.0, 0.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, -5.0, 1.0, -1.0, -3.0], [2.0, -7.0, 4.0, -6.0, -6.0], [-3.0, -4.0, 0.0, 7.0, 1.0], 
+[0.0, -6.0, 7.0, 0.0, 1.0]], [[1.0, 0.0, -6.0, 5.0, 6.0], [-6.0, -7.0, 3.0, -4.0, 5.0], [-4.0, -2.0, -7.0, 3.0, 1.0], [-4.0, 
+-7.0, -7.0, 0.0, -4.0]], [[0.0, -5.0, -4.0, -1.0, 6.0], [0.0, -7.0, 4.0, 5.0, 3.0], [7.0, -7.0, 3.0, -7.0, -4.0], [-7.0, 2.0, 
+-5.0, 3.0, 7.0]]], [[[6.0, 5.0, -4.0, 0.0, 3.0], [2.0, -6.0, 1.0, -1.0, -3.0], [-1.0, -5.0, 3.0, -4.0, 0.0], [1.0, -5.0, -7.0, 
+0.0, -4.0]], [[-6.0, -2.0, 2.0, -4.0, 0.0], [-3.0, -4.0, -6.0, -6.0, 5.0], [5.0, -4.0, 4.0, 1.0, 5.0], [2.0, -2.0, -3.0, 6.0, 
+0.0]], [[-2.0, 0.0, 6.0, 7.0, -1.0], [2.0, 7.0, 0.0, -1.0, 4.0], [-2.0, 1.0, 2.0, 2.0, -2.0], [0.0, -7.0, -6.0, 2.0, 5.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-35.0, -35.0], [10.0, 10.0], [0.0, 0.0], [5.0, 5.0], [-25.0, -25.0]], [[20.0, 20.0], [-35.0, 
--35.0], [-5.0, -5.0], [10.0, 10.0], [5.0, 5.0]], [[5.0, 5.0], [-10.0, -10.0], [35.0, 35.0], [25.0, 25.0], [-30.0, -30.0]], 
-[[0.0, 0.0], [35.0, 35.0], [25.0, 25.0], [-15.0, -15.0], [25.0, 25.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -49.0], [0.0, 14.0], 
-[0.0, 0.0], [0.0, 7.0], [0.0, -35.0]], [[0.0, 28.0], [0.0, -49.0], [0.0, -7.0], [0.0, 14.0], [0.0, 7.0]], [[0.0, 7.0], [0.0, 
--14.0], [0.0, 49.0], [0.0, 35.0], [0.0, -42.0]], [[0.0, 0.0], [0.0, 49.0], [0.0, 35.0], [0.0, -21.0], [0.0, 35.0]]])
+      ref=msk_ref*numpy.array([[[[-35.0, 31.0, -18.0, 57.0, -5.0], [1.0, -35.0, 2.0, -60.0, -19.0], [-8.0, 81.0, 27.0, -29.0, 
+7.0], [-25.0, -10.0, -40.0, -36.0, -25.0]], [[-32.0, 19.0, 10.0, -68.0, -31.0], [18.0, -43.0, 19.0, -17.0, 37.0], [-44.0, 
+-33.0, 44.0, -39.0, -35.0], [16.0, -7.0, 48.0, -35.0, -2.0]], [[-62.0, 23.0, -22.0, -6.0, 23.0], [-6.0, -42.0, -11.0, -49.0, 
+44.0], [-76.0, -4.0, 49.0, -11.0, -16.0], [13.0, -13.0, 0.0, -20.0, -33.0]], [[54.0, -23.0, 58.0, 38.0, 24.0], [-6.0, 91.0, 
+57.0, 22.0, -56.0], [112.0, 5.0, -64.0, -17.0, 13.0], [-3.0, 3.0, -48.0, 24.0, 68.0]], [[-66.0, -48.0, -47.0, 171.0, 42.0], 
+[8.0, -12.0, -24.0, -112.0, -5.0], [37.0, 70.0, -45.0, 46.0, 15.0], [56.0, 41.0, -139.0, 17.0, 11.0]]], [[[0.0, 76.0, 47.0, 
+18.0, -13.0], [53.0, -31.0, 62.0, -14.0, -8.0], [39.0, 55.0, 31.0, -94.0, -37.0], [-53.0, -43.0, -36.0, -61.0, -28.0]], [[23.0, 
+-27.0, 11.0, -56.0, -94.0], [31.0, -25.0, 14.0, 15.0, -15.0], [37.0, -15.0, -12.0, -13.0, -14.0], [20.0, 31.0, 57.0, -20.0, 
+42.0]], [[-52.0, -51.0, -27.0, -30.0, -1.0], [-25.0, -9.0, -19.0, -46.0, 35.0], [-53.0, -53.0, 6.0, 33.0, -3.0], [73.0, 34.0, 
+28.0, 14.0, 35.0]], [[13.0, 20.0, -1.0, 60.0, 62.0], [-3.0, 24.0, -11.0, 17.0, -1.0], [11.0, 20.0, -14.0, 16.0, 11.0], [-29.0, 
+-22.0, -57.0, 22.0, -36.0]], [[25.0, 17.0, -19.0, 17.0, 27.0], [46.0, -30.0, -48.0, 67.0, 50.0], [-13.0, -32.0, -12.0, 47.0, 
+-18.0], [-17.0, -13.0, -18.0, 28.0, -75.0]]], [[[-47.0, -5.0, -9.0, -67.0, 12.0], [10.0, -36.0, -12.0, -8.0, 79.0], [-79.0, 
+-86.0, 34.0, 9.0, -38.0], [50.0, 1.0, 42.0, 1.0, -13.0]], [[26.0, 4.0, 20.0, -56.0, -30.0], [-48.0, 38.0, 26.0, 10.0, -54.0], 
+[4.0, 18.0, 14.0, -32.0, 28.0], [-28.0, -6.0, 58.0, -14.0, 40.0]], [[-24.0, -5.0, 18.0, -87.0, -15.0], [39.0, -35.0, 13.0, 
+14.0, 76.0], [-40.0, -101.0, 21.0, -11.0, -56.0], [51.0, 3.0, 51.0, -7.0, 4.0]], [[-14.0, 2.0, -19.0, 40.0, -11.0], [93.0, 
+-77.0, -30.0, 12.0, 70.0], [9.0, -27.0, -15.0, 28.0, -51.0], [27.0, 11.0, -44.0, 1.0, -56.0]], [[-35.0, 31.0, 10.0, 27.0, 
+21.0], [-51.0, 22.0, 38.0, -72.0, -46.0], [-12.0, 74.0, 36.0, -57.0, 24.0], [-28.0, -22.0, -22.0, -35.0, 18.0]]], [[[26.0, 
+-43.0, -17.0, 65.0, 70.0], [-26.0, 61.0, -37.0, 30.0, -5.0], [25.0, -19.0, -59.0, 77.0, 32.0], [15.0, 14.0, -53.0, 69.0, 3.0]], 
+[[-1.0, 78.0, 24.0, -1.0, 48.0], [1.0, -2.0, 23.0, 13.0, 10.0], [-28.0, 24.0, 45.0, -52.0, -12.0], [-63.0, -59.0, -16.0, -25.0, 
+-57.0]], [[-1.0, -2.0, -65.0, 5.0, -14.0], [-20.0, -39.0, -77.0, 16.0, 3.0], [-61.0, 25.0, 16.0, 58.0, 31.0], [-21.0, 8.0, 
+28.0, 13.0, -55.0]], [[61.0, -6.0, -19.0, -16.0, -104.0], [31.0, -38.0, -29.0, 53.0, -47.0], [45.0, 46.0, -18.0, 14.0, 17.0], 
+[-39.0, 22.0, 47.0, -14.0, -10.0]], [[22.0, -15.0, 44.0, 29.0, 8.0], [-31.0, 74.0, 59.0, -23.0, -68.0], [78.0, 36.0, -32.0, 
+-37.0, 23.0], [-5.0, 3.0, -31.0, -1.0, 73.0]]]])+(1.-msk_ref)*numpy.array([[[[-35.0, 5.0, 52.0, -42.0, -48.0], [15.0, 36.0, 
+-57.0, -25.0, -9.0], [24.0, 11.0, 46.0, 11.0, 32.0], [51.0, 19.0, 35.0, 21.0, -1.0]], [[3.0, -50.0, 21.0, -18.0, -37.0], [-6.0, 
+-6.0, 10.0, -27.0, -23.0], [-12.0, 15.0, -25.0, 62.0, 13.0], [1.0, 12.0, 94.0, -7.0, 12.0]], [[-10.0, -26.0, 29.0, -39.0, 
+-45.0], [22.0, 45.0, -4.0, 34.0, -38.0], [18.0, 36.0, 6.0, 4.0, -8.0], [11.0, 79.0, 101.0, -18.0, 26.0]], [[-34.0, 12.0, -22.0, 
+39.0, 67.0], [-26.0, -33.0, -8.0, -5.0, 84.0], [30.0, -51.0, 22.0, -46.0, -6.0], [-32.0, -59.0, -146.0, 46.0, 17.0]], [[-35.0, 
+30.0, -47.0, -97.0, 40.0], [5.0, -49.0, -50.0, 62.0, 6.0], [113.0, -52.0, 81.0, -135.0, 6.0], [5.0, 103.0, -47.0, 31.0, 
+-7.0]]], [[[-9.0, -49.0, 87.0, -30.0, -62.0], [39.0, 0.0, -32.0, -65.0, -17.0], [28.0, -39.0, 80.0, 48.0, 26.0], [38.0, -49.0, 
+40.0, 52.0, 56.0]], [[15.0, -13.0, -30.0, 4.0, 14.0], [-50.0, -86.0, 1.0, -89.0, 14.0], [-37.0, -27.0, -46.0, 70.0, 47.0], 
+[1.0, -73.0, -6.0, 11.0, -55.0]], [[-16.0, -9.0, -53.0, -20.0, 25.0], [-39.0, -14.0, 14.0, 41.0, 8.0], [8.0, 29.0, -59.0, 
+-16.0, -5.0], [-30.0, 79.0, 39.0, -29.0, -23.0]], [[11.0, 19.0, 14.0, 3.0, 3.0], [46.0, 33.0, 5.0, 52.0, -14.0], [27.0, -12.0, 
+54.0, -62.0, -35.0], [-1.0, 16.0, -34.0, 3.0, 38.0]], [[95.0, 2.0, -18.0, -9.0, 0.0], [68.0, -33.0, 59.0, 46.0, -85.0], [0.0, 
+-40.0, 41.0, -45.0, -47.0], [-14.0, 1.0, 19.0, -24.0, 28.0]]], [[[30.0, -48.0, -21.0, -22.0, -10.0], [8.0, -10.0, 51.0, 48.0, 
+-46.0], [2.0, 18.0, -36.0, 5.0, -30.0], [-35.0, 72.0, 103.0, -37.0, 27.0]], [[-52.0, 16.0, 30.0, 58.0, -10.0], [-46.0, 58.0, 
+-30.0, -54.0, 62.0], [-54.0, 54.0, -56.0, 72.0, 30.0], [18.0, -54.0, -28.0, 2.0, -32.0]], [[45.0, -67.0, -28.0, -17.0, 1.0], 
+[0.0, -59.0, 62.0, 13.0, -40.0], [-1.0, -17.0, -34.0, 25.0, -21.0], [-45.0, 26.0, 86.0, -20.0, 30.0]], [[95.0, -33.0, -37.0, 
+-74.0, 2.0], [55.0, -116.0, 46.0, 17.0, -97.0], [44.0, -89.0, 64.0, -46.0, -18.0], [-14.0, 19.0, 52.0, 2.0, 24.0]], [[-96.0, 
+5.0, 72.0, -1.0, -42.0], [-15.0, 101.0, -73.0, -16.0, 54.0], [16.0, 56.0, 13.0, 25.0, 29.0], [41.0, 24.0, 8.0, 24.0, 11.0]]], 
+[[[17.0, 50.0, -61.0, 22.0, 69.0], [13.0, -2.0, 28.0, 91.0, 14.0], [25.0, -17.0, 13.0, -113.0, -52.0], [-39.0, 32.0, -101.0, 
+-15.0, 4.0]], [[-4.0, -23.0, 87.0, 8.0, -63.0], [59.0, 86.0, -5.0, 12.0, -28.0], [4.0, 22.0, 51.0, 19.0, -21.0], [24.0, 1.0, 
+51.0, 6.0, 69.0]], [[32.0, 48.0, -3.0, 3.0, -25.0], [16.0, 39.0, -1.0, 9.0, -48.0], [-46.0, 45.0, -22.0, 9.0, 2.0], [33.0, 
+15.0, 35.0, -43.0, -50.0]], [[43.0, 37.0, -8.0, 19.0, -7.0], [-20.0, -59.0, -15.0, -110.0, -14.0], [-69.0, -22.0, -20.0, 74.0, 
+55.0], [43.0, -118.0, -32.0, 5.0, -84.0]], [[-75.0, 13.0, 7.0, 29.0, 35.0], [-44.0, 11.0, -44.0, -26.0, 96.0], [21.0, -8.0, 
+4.0, -9.0, 21.0], [-4.0, -38.0, -105.0, 44.0, -1.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=transposed_tensor_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[[-6.0, -2.0, -7.0], [5.0, -2.0, 3.0], [7.0, -7.0, -3.0], [5.0, -7.0, -1.0], [6.0, 0.0, 3.0]], [[-6.0, 
--3.0, -5.0], [6.0, 5.0, 5.0], [-2.0, 5.0, -4.0], [5.0, 0.0, 1.0], [-6.0, -6.0, 6.0]], [[-7.0, 7.0, -1.0], [2.0, -3.0, -4.0], 
-[-1.0, 2.0, 7.0], [5.0, -5.0, -4.0], [-2.0, 6.0, -7.0]], [[5.0, 1.0, 6.0], [-1.0, -1.0, -5.0], [-5.0, -3.0, 5.0], [6.0, -6.0, 
--6.0], [0.0, 0.0, -5.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 7.0], [3.0, -3.0], [-2.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 4.0], [-4.0, -6.0], 
-[-4.0, -2.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[8.0, -64.0], [-12.0, 53.0], [-15.0, 58.0], [-19.0, 52.0], [-6.0, 54.0]], [[1.0, -53.0], [5.0, 
-47.0], [23.0, -45.0], [-2.0, 39.0], [-30.0, 0.0]], [[23.0, -74.0], [-1.0, 7.0], [-8.0, 15.0], [-7.0, 34.0], [32.0, -60.0]], 
-[[-9.0, 56.0], [7.0, -24.0], [-19.0, -6.0], [-6.0, 36.0], [10.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[18.0, 2.0], [11.0, 
-26.0], [61.0, 76.0], [47.0, 64.0], [6.0, 18.0]], [[14.0, 4.0], [-22.0, -16.0], [-10.0, -30.0], [11.0, 18.0], [-18.0, 0.0]], 
-[[-45.0, -68.0], [34.0, 34.0], [-39.0, -30.0], [51.0, 58.0], [-2.0, -30.0]], [[-13.0, 2.0], [21.0, 12.0], [-23.0, -12.0], 
-[66.0, 72.0], [20.0, 10.0]]])
+   def test_transposed_tensor_mult_constData_rank2_array_rank1(self):
+      arg0=Data(numpy.array([[3.0, -4.0], [-2.0, 5.0], [0.0, -7.0]]),self.functionspace)
+      arg1=numpy.array([-1.0, 6.0, -3.0])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([-15.0, 55.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=transposed_tensor_mult(arg0,arg1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")    
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[[[-4.0, 1.0, 0.0], [0.0, -5.0, 1.0]], [[6.0, -4.0, -2.0], [-2.0, 3.0, -1.0]], [[2.0, 7.0, 0.0], [5.0, 
--2.0, 0.0]], [[7.0, 7.0, 3.0], [3.0, -1.0, -4.0]], [[-2.0, -1.0, -5.0], [0.0, 1.0, -3.0]]], [[[0.0, -5.0, -6.0], [6.0, 0.0, 
--1.0]], [[-2.0, -5.0, -1.0], [-7.0, -3.0, -4.0]], [[7.0, -7.0, -3.0], [-5.0, -2.0, 3.0]], [[-2.0, 4.0, -5.0], [4.0, 7.0, 
--7.0]], [[3.0, 0.0, 2.0], [7.0, -2.0, -1.0]]], [[[-3.0, -7.0, 5.0], [-4.0, -2.0, -4.0]], [[6.0, -6.0, 6.0], [0.0, 5.0, -7.0]], 
-[[0.0, 3.0, -1.0], [-5.0, -6.0, 1.0]], [[1.0, -1.0, 0.0], [5.0, 7.0, 1.0]], [[4.0, 5.0, -3.0], [-7.0, 0.0, 0.0]]], [[[1.0, 
--6.0, -4.0], [1.0, 1.0, 1.0]], [[-3.0, -1.0, 4.0], [1.0, -6.0, 6.0]], [[6.0, 7.0, -7.0], [-6.0, 0.0, 2.0]], [[1.0, 4.0, -7.0], 
-[6.0, -6.0, 6.0]], [[-3.0, 4.0, 0.0], [-3.0, -7.0, -7.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, 7.0], [-1.0, 5.0], [6.0, 6.0]], [[6.0, 7.0], [-4.0, -2.0], [7.0, 
-3.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, -2.0], [2.0, -2.0], [4.0, 2.0]], [[-4.0, -7.0], [4.0, 4.0], [-7.0, -6.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[14.0, -10.0], [-21.0, -13.0], [37.0, 88.0], [26.0, 113.0], [-60.0, -60.0]], [[-2.0, -22.0], 
-[-65.0, -100.0], [9.0, -26.0], [-93.0, -31.0], [64.0, 83.0]], [[-16.0, -62.0], [-9.0, 17.0], [-8.0, -11.0], [13.0, 26.0], 
-[-53.0, -14.0]], [[-6.0, -39.0], [88.0, 35.0], [-53.0, -1.0], [59.0, 57.0], [-52.0, -29.0]]])+(1.-msk_ref)*numpy.array([[[-1.0, 
--20.0], [-25.0, 24.0], [-26.0, -61.0], [-4.0, -23.0], [15.0, 18.0]], [[-51.0, -38.0], [42.0, 73.0], [-77.0, 3.0], [61.0, 28.0], 
-[-39.0, -53.0]], [[60.0, 74.0], [45.0, 74.0], [-9.0, -3.0], [-7.0, -13.0], [2.0, 25.0]], [[-41.0, -7.0], [-38.0, -51.0], 
-[-40.0, -10.0], [-116.0, -126.0], [59.0, 33.0]]])
+   def test_transposed_tensor_mult_constData_rank2_array_rank2(self):
+      arg0=Data(numpy.array([[3.0, -3.0], [0.0, -6.0], [-2.0, 2.0]]),self.functionspace)
+      arg1=numpy.array([[5.0, -1.0], [2.0, 0.0], [7.0, 6.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[1.0, -15.0], [-13.0, 15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank2_expandedData_rank2_offset0(self):
-      arg0=numpy.array([[6.0, 7.0, -6.0, 5.0, 0.0], [2.0, -4.0, -1.0, 0.0, 0.0], [6.0, 2.0, -2.0, 5.0, -1.0], [5.0, -4.0, 5.0, 
-1.0, 3.0]])
+   def test_transposed_tensor_mult_constData_rank2_constData_rank1(self):
+      arg0=Data(numpy.array([[0.0, -4.0], [3.0, -2.0], [7.0, -7.0]]),self.functionspace)
+      arg1=Data(numpy.array([-3.0, -1.0, 5.0]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([32.0, -21.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_constData_rank2_constData_rank2(self):
+      arg0=Data(numpy.array([[6.0, 3.0], [1.0, 4.0], [2.0, 5.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-6.0, 0.0], [4.0, 0.0], [1.0, -3.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[-30.0, -6.0], [3.0, -15.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_constData_rank2_expandedData_rank1(self):
+      arg0=Data(numpy.array([[5.0, -3.0], [0.0, -6.0], [4.0, -4.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 5.0, 0.0, -2.0, 6.0], [-3.0, -7.0, -2.0, -3.0, 0.0], [0.0, -6.0, 6.0, 0.0, -6.0], 
-[-3.0, -6.0, 6.0, -3.0, -3.0]])+(1.-msk_arg1)*numpy.array([[4.0, 0.0, 6.0, -4.0, 5.0], [-7.0, 0.0, 3.0, -2.0, 1.0], [0.0, 3.0, 
--7.0, 4.0, -5.0], [-4.0, -5.0, 6.0, 1.0, -4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([4.0, 4.0, 6.0])+(1.-msk_arg1)*numpy.array([-4.0, 7.0, -7.0])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-24.0, 30.0, 0.0, -12.0, 36.0], [-18.0, -42.0, -12.0, -18.0, 0.0], [0.0, -36.0, 36.0, 0.0, 
--36.0], [-18.0, -36.0, 36.0, -18.0, -18.0]], [[-28.0, 35.0, 0.0, -14.0, 42.0], [-21.0, -49.0, -14.0, -21.0, 0.0], [0.0, -42.0, 
-42.0, 0.0, -42.0], [-21.0, -42.0, 42.0, -21.0, -21.0]], [[24.0, -30.0, 0.0, 12.0, -36.0], [18.0, 42.0, 12.0, 18.0, 0.0], [0.0, 
-36.0, -36.0, 0.0, 36.0], [18.0, 36.0, -36.0, 18.0, 18.0]], [[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], 
-[0.0, -30.0, 30.0, 0.0, -30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-8.0, 10.0, 0.0, -4.0, 12.0], [-6.0, -14.0, -4.0, -6.0, 0.0], [0.0, 
--12.0, 12.0, 0.0, -12.0], [-6.0, -12.0, 12.0, -6.0, -6.0]], [[16.0, -20.0, 0.0, 8.0, -24.0], [12.0, 28.0, 8.0, 12.0, 0.0], 
-[0.0, 24.0, -24.0, 0.0, 24.0], [12.0, 24.0, -24.0, 12.0, 12.0]], [[4.0, -5.0, 0.0, 2.0, -6.0], [3.0, 7.0, 2.0, 3.0, 0.0], [0.0, 
-6.0, -6.0, 0.0, 6.0], [3.0, 6.0, -6.0, 3.0, 3.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]]], [[[-24.0, 30.0, 0.0, -12.0, 36.0], [-18.0, -42.0, -12.0, -18.0, 0.0], [0.0, -36.0, 36.0, 0.0, -36.0], [-18.0, 
--36.0, 36.0, -18.0, -18.0]], [[-8.0, 10.0, 0.0, -4.0, 12.0], [-6.0, -14.0, -4.0, -6.0, 0.0], [0.0, -12.0, 12.0, 0.0, -12.0], 
-[-6.0, -12.0, 12.0, -6.0, -6.0]], [[8.0, -10.0, 0.0, 4.0, -12.0], [6.0, 14.0, 4.0, 6.0, 0.0], [0.0, 12.0, -12.0, 0.0, 12.0], 
-[6.0, 12.0, -12.0, 6.0, 6.0]], [[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], [0.0, -30.0, 30.0, 0.0, 
--30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[4.0, -5.0, 0.0, 2.0, -6.0], [3.0, 7.0, 2.0, 3.0, 0.0], [0.0, 6.0, -6.0, 0.0, 
-6.0], [3.0, 6.0, -6.0, 3.0, 3.0]]], [[[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], [0.0, -30.0, 30.0, 
-0.0, -30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[16.0, -20.0, 0.0, 8.0, -24.0], [12.0, 28.0, 8.0, 12.0, 0.0], [0.0, 24.0, 
--24.0, 0.0, 24.0], [12.0, 24.0, -24.0, 12.0, 12.0]], [[-20.0, 25.0, 0.0, -10.0, 30.0], [-15.0, -35.0, -10.0, -15.0, 0.0], [0.0, 
--30.0, 30.0, 0.0, -30.0], [-15.0, -30.0, 30.0, -15.0, -15.0]], [[-4.0, 5.0, 0.0, -2.0, 6.0], [-3.0, -7.0, -2.0, -3.0, 0.0], 
-[0.0, -6.0, 6.0, 0.0, -6.0], [-3.0, -6.0, 6.0, -3.0, -3.0]], [[-12.0, 15.0, 0.0, -6.0, 18.0], [-9.0, -21.0, -6.0, -9.0, 0.0], 
-[0.0, -18.0, 18.0, 0.0, -18.0], [-9.0, -18.0, 18.0, -9.0, -9.0]]]])+(1.-msk_ref)*numpy.array([[[[24.0, 0.0, 36.0, -24.0, 30.0], 
-[-42.0, 0.0, 18.0, -12.0, 6.0], [0.0, 18.0, -42.0, 24.0, -30.0], [-24.0, -30.0, 36.0, 6.0, -24.0]], [[28.0, 0.0, 42.0, -28.0, 
-35.0], [-49.0, 0.0, 21.0, -14.0, 7.0], [0.0, 21.0, -49.0, 28.0, -35.0], [-28.0, -35.0, 42.0, 7.0, -28.0]], [[-24.0, 0.0, -36.0, 
-24.0, -30.0], [42.0, 0.0, -18.0, 12.0, -6.0], [0.0, -18.0, 42.0, -24.0, 30.0], [24.0, 30.0, -36.0, -6.0, 24.0]], [[20.0, 0.0, 
-30.0, -20.0, 25.0], [-35.0, 0.0, 15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[8.0, 0.0, 12.0, 
--8.0, 10.0], [-14.0, 0.0, 6.0, -4.0, 2.0], [0.0, 6.0, -14.0, 8.0, -10.0], [-8.0, -10.0, 12.0, 2.0, -8.0]], [[-16.0, 0.0, -24.0, 
-16.0, -20.0], [28.0, 0.0, -12.0, 8.0, -4.0], [0.0, -12.0, 28.0, -16.0, 20.0], [16.0, 20.0, -24.0, -4.0, 16.0]], [[-4.0, 0.0, 
--6.0, 4.0, -5.0], [7.0, 0.0, -3.0, 2.0, -1.0], [0.0, -3.0, 7.0, -4.0, 5.0], [4.0, 5.0, -6.0, -1.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[24.0, 0.0, 36.0, -24.0, 30.0], [-42.0, 0.0, 18.0, 
--12.0, 6.0], [0.0, 18.0, -42.0, 24.0, -30.0], [-24.0, -30.0, 36.0, 6.0, -24.0]], [[8.0, 0.0, 12.0, -8.0, 10.0], [-14.0, 0.0, 
-6.0, -4.0, 2.0], [0.0, 6.0, -14.0, 8.0, -10.0], [-8.0, -10.0, 12.0, 2.0, -8.0]], [[-8.0, 0.0, -12.0, 8.0, -10.0], [14.0, 0.0, 
--6.0, 4.0, -2.0], [0.0, -6.0, 14.0, -8.0, 10.0], [8.0, 10.0, -12.0, -2.0, 8.0]], [[20.0, 0.0, 30.0, -20.0, 25.0], [-35.0, 0.0, 
-15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[-4.0, 0.0, -6.0, 4.0, -5.0], [7.0, 
-0.0, -3.0, 2.0, -1.0], [0.0, -3.0, 7.0, -4.0, 5.0], [4.0, 5.0, -6.0, -1.0, 4.0]]], [[[20.0, 0.0, 30.0, -20.0, 25.0], [-35.0, 
-0.0, 15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[-16.0, 0.0, -24.0, 16.0, -20.0], 
-[28.0, 0.0, -12.0, 8.0, -4.0], [0.0, -12.0, 28.0, -16.0, 20.0], [16.0, 20.0, -24.0, -4.0, 16.0]], [[20.0, 0.0, 30.0, -20.0, 
-25.0], [-35.0, 0.0, 15.0, -10.0, 5.0], [0.0, 15.0, -35.0, 20.0, -25.0], [-20.0, -25.0, 30.0, 5.0, -20.0]], [[4.0, 0.0, 6.0, 
--4.0, 5.0], [-7.0, 0.0, 3.0, -2.0, 1.0], [0.0, 3.0, -7.0, 4.0, -5.0], [-4.0, -5.0, 6.0, 1.0, -4.0]], [[12.0, 0.0, 18.0, -12.0, 
-15.0], [-21.0, 0.0, 9.0, -6.0, 3.0], [0.0, 9.0, -21.0, 12.0, -15.0], [-12.0, -15.0, 18.0, 3.0, -12.0]]]])
+      ref=msk_ref*numpy.array([44.0, -60.0])+(1.-msk_ref)*numpy.array([-48.0, -2.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       if not arg1.isLazy():
         arg0=arg0*1j
         arg1=arg1*1j
         ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=0)
+        res=transposed_tensor_mult(arg0,arg1)
         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank3_offset1(self):
-      arg0=numpy.array([[[-4.0, 7.0, -5.0], [-6.0, -3.0, 0.0], [1.0, -1.0, -5.0], [-4.0, 5.0, 7.0], [5.0, 7.0, -7.0]], [[1.0, 
-0.0, 0.0], [-1.0, -2.0, 2.0], [-4.0, 6.0, 6.0], [0.0, 1.0, 6.0], [2.0, 2.0, -7.0]], [[3.0, 6.0, 0.0], [2.0, -4.0, -1.0], [3.0, 
-6.0, -4.0], [7.0, -5.0, -6.0], [-6.0, 7.0, -2.0]], [[4.0, -7.0, 3.0], [-3.0, -7.0, 2.0], [7.0, 5.0, -4.0], [4.0, -3.0, 0.0], 
-[-7.0, 6.0, 3.0]]])
+   def test_transposed_tensor_mult_constData_rank2_expandedData_rank2(self):
+      arg0=Data(numpy.array([[7.0, 6.0], [4.0, -5.0], [7.0, -4.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, -3.0, -3.0, -4.0, -5.0], [-6.0, 2.0, 6.0, -6.0, 7.0], [5.0, -4.0, 2.0, 5.0, -5.0], 
-[1.0, 0.0, 7.0, -3.0, -2.0]], [[5.0, -7.0, 2.0, 5.0, -7.0], [6.0, -6.0, 3.0, 2.0, 0.0], [2.0, -1.0, 3.0, 2.0, 0.0], [0.0, 0.0, 
--4.0, -7.0, -5.0]], [[2.0, -5.0, -5.0, -4.0, 1.0], [3.0, 0.0, -7.0, 6.0, -4.0], [-1.0, -7.0, 0.0, 1.0, 0.0], [0.0, -2.0, -2.0, 
-6.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, -4.0, 5.0, 0.0, 4.0], [-6.0, 0.0, 2.0, 0.0, 0.0], [0.0, 7.0, 2.0, 1.0, 2.0], 
-[-5.0, 2.0, 4.0, 2.0, 0.0]], [[-5.0, -2.0, 7.0, 7.0, 3.0], [3.0, 4.0, 5.0, 0.0, -6.0], [-5.0, -3.0, 7.0, 0.0, -7.0], [-5.0, 
--6.0, 0.0, 3.0, 0.0]], [[6.0, 0.0, 4.0, 2.0, 0.0], [6.0, 0.0, 1.0, 1.0, -5.0], [1.0, 5.0, -4.0, -6.0, 0.0], [-7.0, -7.0, -6.0, 
-4.0, -4.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[1.0, 4.0], [-4.0, -5.0], [2.0, 7.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 6.0], [-5.0, 1.0], 
+[-5.0, 2.0]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[49.0, -12.0, 51.0, 71.0, -34.0], [51.0, -50.0, 32.0, 8.0, -8.0], [-1.0, 44.0, 13.0, -11.0, 
-20.0], [-4.0, 10.0, -46.0, -67.0, -12.0]], [[21.0, 39.0, 12.0, 9.0, 51.0], [18.0, 6.0, -45.0, 30.0, -42.0], [-36.0, 27.0, 
--21.0, -36.0, 30.0], [-6.0, 0.0, -30.0, 39.0, 27.0]], [[-21.0, 29.0, 20.0, 11.0, -3.0], [-27.0, 8.0, 38.0, -38.0, 27.0], [8.0, 
-32.0, -1.0, -2.0, -5.0], [1.0, 10.0, 21.0, -26.0, 18.0]], [[63.0, -58.0, -13.0, 13.0, -8.0], [75.0, -38.0, -58.0, 76.0, -56.0], 
-[-17.0, -38.0, 7.0, -3.0, 20.0], [-4.0, -14.0, -62.0, 19.0, -38.0]], [[-9.0, -29.0, 34.0, 43.0, -81.0], [-9.0, -32.0, 100.0, 
--58.0, 63.0], [46.0, 22.0, 31.0, 32.0, -25.0], [5.0, 14.0, 21.0, -106.0, -24.0]]], [[[-6.0, -3.0, -3.0, -4.0, -5.0], [-6.0, 
-2.0, 6.0, -6.0, 7.0], [5.0, -4.0, 2.0, 5.0, -5.0], [1.0, 0.0, 7.0, -3.0, -2.0]], [[0.0, 7.0, -11.0, -14.0, 21.0], [0.0, 10.0, 
--26.0, 14.0, -15.0], [-11.0, -8.0, -8.0, -7.0, 5.0], [-1.0, -4.0, -3.0, 29.0, 6.0]], [[66.0, -60.0, -6.0, 22.0, -16.0], [78.0, 
--44.0, -48.0, 72.0, -52.0], [-14.0, -32.0, 10.0, -2.0, 20.0], [-4.0, -12.0, -64.0, 6.0, -40.0]], [[17.0, -37.0, -28.0, -19.0, 
--1.0], [24.0, -6.0, -39.0, 38.0, -24.0], [-4.0, -43.0, 3.0, 8.0, 0.0], [0.0, -12.0, -16.0, 29.0, -23.0]], [[-16.0, 15.0, 33.0, 
-30.0, -31.0], [-21.0, -8.0, 67.0, -50.0, 42.0], [21.0, 39.0, 10.0, 7.0, -10.0], [2.0, 14.0, 20.0, -62.0, 7.0]]], [[[12.0, 
--51.0, 3.0, 18.0, -57.0], [18.0, -30.0, 36.0, -6.0, 21.0], [27.0, -18.0, 24.0, 27.0, -15.0], [3.0, 0.0, -3.0, -51.0, -36.0]], 
-[[-34.0, 27.0, -9.0, -24.0, 17.0], [-39.0, 28.0, 7.0, -26.0, 18.0], [3.0, 3.0, -8.0, 1.0, -10.0], [2.0, 2.0, 32.0, 16.0, 
-19.0]], [[4.0, -31.0, 23.0, 34.0, -61.0], [6.0, -30.0, 64.0, -30.0, 37.0], [31.0, 10.0, 24.0, 23.0, -15.0], [3.0, 8.0, 5.0, 
--75.0, -24.0]], [[-79.0, 44.0, -1.0, -29.0, -6.0], [-90.0, 44.0, 69.0, -88.0, 73.0], [31.0, 19.0, -1.0, 19.0, -35.0], [7.0, 
-12.0, 81.0, -22.0, 29.0]], [[67.0, -21.0, 42.0, 67.0, -21.0], [72.0, -54.0, -1.0, 38.0, -34.0], [-14.0, 31.0, 9.0, -18.0, 
-30.0], [-6.0, 4.0, -66.0, -43.0, -17.0]]], [[[-53.0, 22.0, -41.0, -63.0, 32.0], [-57.0, 50.0, -18.0, -20.0, 16.0], [3.0, -30.0, 
--13.0, 9.0, -20.0], [4.0, -6.0, 50.0, 55.0, 18.0]], [[-13.0, 48.0, -15.0, -31.0, 66.0], [-18.0, 36.0, -53.0, 16.0, -29.0], 
-[-31.0, 5.0, -27.0, -27.0, 15.0], [-3.0, -4.0, 3.0, 70.0, 35.0]], [[-25.0, -36.0, 9.0, 13.0, -74.0], [-24.0, -16.0, 85.0, 
--56.0, 65.0], [49.0, -5.0, 29.0, 41.0, -35.0], [7.0, 8.0, 37.0, -80.0, -27.0]], [[-39.0, 9.0, -18.0, -31.0, 1.0], [-42.0, 26.0, 
-15.0, -30.0, 28.0], [14.0, -13.0, -1.0, 14.0, -20.0], [4.0, 0.0, 40.0, 9.0, 7.0]], [[78.0, -36.0, 18.0, 46.0, -4.0], [87.0, 
--50.0, -45.0, 72.0, -61.0], [-26.0, 1.0, 4.0, -20.0, 35.0], [-7.0, -6.0, -79.0, -3.0, 
--25.0]]]])+(1.-msk_ref)*numpy.array([[[[-89.0, 2.0, 9.0, 39.0, 5.0], [15.0, 28.0, 22.0, -5.0, -17.0], [-40.0, -74.0, 61.0, 
-26.0, -57.0], [20.0, -15.0, 14.0, -7.0, 20.0]], [[-21.0, 30.0, -51.0, -21.0, -33.0], [27.0, -12.0, -27.0, 0.0, 18.0], [15.0, 
--33.0, -33.0, -6.0, 9.0], [45.0, 6.0, -24.0, -21.0, 0.0]], [[-19.0, -2.0, -22.0, -17.0, 1.0], [-39.0, -4.0, -8.0, -5.0, 31.0], 
-[0.0, -15.0, 15.0, 31.0, 9.0], [35.0, 43.0, 34.0, -21.0, 20.0]], [[-7.0, 6.0, 43.0, 49.0, -1.0], [81.0, 20.0, 24.0, 7.0, 
--65.0], [-18.0, -8.0, -1.0, -46.0, -43.0], [-54.0, -87.0, -58.0, 35.0, -28.0]], [[-47.0, -34.0, 46.0, 35.0, 41.0], [-51.0, 
-28.0, 38.0, -7.0, -7.0], [-42.0, -21.0, 87.0, 47.0, -39.0], [-11.0, 17.0, 62.0, 3.0, 28.0]]], [[[6.0, -4.0, 5.0, 0.0, 4.0], 
-[-6.0, 0.0, 2.0, 0.0, 0.0], [0.0, 7.0, 2.0, 1.0, 2.0], [-5.0, 2.0, 4.0, 2.0, 0.0]], [[16.0, 8.0, -11.0, -10.0, -10.0], [12.0, 
--8.0, -10.0, 2.0, 2.0], [12.0, 9.0, -24.0, -13.0, 12.0], [1.0, -4.0, -16.0, 0.0, -8.0]], [[-18.0, 4.0, 46.0, 54.0, 2.0], [78.0, 
-24.0, 28.0, 6.0, -66.0], [-24.0, -16.0, 10.0, -40.0, -50.0], [-52.0, -86.0, -52.0, 34.0, -24.0]], [[31.0, -2.0, 31.0, 19.0, 
-3.0], [39.0, 4.0, 11.0, 6.0, -36.0], [1.0, 27.0, -17.0, -36.0, -7.0], [-47.0, -48.0, -36.0, 27.0, -24.0]], [[-40.0, -12.0, 
--4.0, 0.0, 14.0], [-48.0, 8.0, 7.0, -7.0, 23.0], [-17.0, -27.0, 46.0, 44.0, -10.0], [29.0, 41.0, 50.0, -18.0, 28.0]]], 
-[[[-12.0, -24.0, 57.0, 42.0, 30.0], [0.0, 24.0, 36.0, 0.0, -36.0], [-30.0, 3.0, 48.0, 3.0, -36.0], [-45.0, -30.0, 12.0, 24.0, 
-0.0]], [[26.0, 0.0, -22.0, -30.0, -4.0], [-30.0, -16.0, -17.0, -1.0, 29.0], [19.0, 21.0, -20.0, 8.0, 32.0], [17.0, 35.0, 14.0, 
--12.0, 4.0]], [[-36.0, -24.0, 41.0, 34.0, 30.0], [-24.0, 24.0, 32.0, -4.0, -16.0], [-34.0, -17.0, 64.0, 27.0, -36.0], [-17.0, 
--2.0, 36.0, 8.0, 16.0]], [[31.0, -18.0, -24.0, -47.0, 13.0], [-93.0, -20.0, -17.0, -6.0, 60.0], [19.0, 34.0, 3.0, 43.0, 49.0], 
-[32.0, 86.0, 64.0, -25.0, 24.0]], [[-83.0, 10.0, 11.0, 45.0, -3.0], [45.0, 28.0, 21.0, -2.0, -32.0], [-37.0, -73.0, 45.0, 6.0, 
--61.0], [9.0, -40.0, -12.0, 1.0, 8.0]]], [[[77.0, -2.0, -17.0, -43.0, -5.0], [-27.0, -28.0, -24.0, 3.0, 27.0], [38.0, 64.0, 
--53.0, -14.0, 57.0], [-6.0, 29.0, -2.0, -1.0, -12.0]], [[29.0, 26.0, -56.0, -45.0, -33.0], [9.0, -28.0, -39.0, 2.0, 32.0], 
-[37.0, 10.0, -63.0, -15.0, 43.0], [36.0, 22.0, -24.0, -19.0, -8.0]], [[-7.0, -38.0, 54.0, 27.0, 43.0], [-51.0, 20.0, 35.0, 
--4.0, -10.0], [-29.0, 14.0, 65.0, 31.0, -21.0], [-32.0, 12.0, 52.0, 13.0, 16.0]], [[39.0, -10.0, -1.0, -21.0, 7.0], [-33.0, 
--12.0, -7.0, 0.0, 18.0], [15.0, 37.0, -13.0, 4.0, 29.0], [-5.0, 26.0, 16.0, -1.0, 0.0]], [[-54.0, 16.0, 19.0, 48.0, -10.0], 
-[78.0, 24.0, 19.0, 3.0, -51.0], [-27.0, -52.0, 16.0, -25.0, -56.0], [-16.0, -71.0, -46.0, 16.0, -12.0]]]])
+      ref=msk_ref*numpy.array([[5.0, 57.0], [18.0, 21.0]])+(1.-msk_ref)*numpy.array([[-76.0, 60.0], [27.0, 23.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[[[-6.0, 7.0, -2.0], [-2.0, -5.0, 4.0]], [[-2.0, -3.0, 3.0], [-3.0, 2.0, -6.0]], [[1.0, 7.0, -7.0], 
-[-5.0, 5.0, -5.0]], [[4.0, 5.0, -5.0], [6.0, -6.0, -6.0]], [[4.0, -7.0, -1.0], [4.0, 1.0, -5.0]]], [[[-6.0, 7.0, 6.0], [-1.0, 
-7.0, -2.0]], [[0.0, -6.0, -3.0], [3.0, 2.0, -7.0]], [[0.0, 2.0, 1.0], [-1.0, 0.0, 3.0]], [[-2.0, -1.0, -4.0], [-5.0, -3.0, 
--2.0]], [[4.0, 7.0, 4.0], [4.0, 2.0, -2.0]]], [[[4.0, -1.0, 0.0], [4.0, 0.0, 2.0]], [[-5.0, 3.0, 4.0], [-7.0, -6.0, -3.0]], 
-[[1.0, 7.0, -6.0], [7.0, 2.0, -2.0]], [[0.0, 0.0, 3.0], [5.0, -5.0, 2.0]], [[-3.0, -7.0, 0.0], [-7.0, -5.0, -7.0]]], [[[0.0, 
-5.0, 7.0], [3.0, -7.0, -2.0]], [[3.0, -5.0, 7.0], [5.0, -7.0, 0.0]], [[-6.0, 3.0, 5.0], [-4.0, 5.0, 2.0]], [[7.0, 0.0, -3.0], 
-[1.0, 6.0, 0.0]], [[-1.0, 4.0, 5.0], [-2.0, -2.0, -4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-7.0, 2.0, -2.0, 4.0, -4.0], [1.0, 1.0, 3.0, 4.0, 2.0], [5.0, -5.0, -3.0, 2.0, -1.0], 
-[-3.0, 6.0, -3.0, -1.0, -7.0]], [[0.0, -4.0, -4.0, -4.0, 2.0], [6.0, 7.0, -7.0, -7.0, 4.0], [0.0, 4.0, -5.0, 1.0, -3.0], [-7.0, 
-2.0, -5.0, -6.0, 5.0]], [[-7.0, -7.0, -4.0, -3.0, -1.0], [1.0, -3.0, -4.0, -1.0, -6.0], [7.0, 2.0, -6.0, 0.0, 0.0], [-3.0, 
--5.0, -3.0, -6.0, -7.0]]], [[[0.0, 0.0, -4.0, 5.0, 7.0], [-1.0, -3.0, -3.0, 0.0, 0.0], [2.0, -3.0, 5.0, -3.0, 7.0], [0.0, -6.0, 
--2.0, 6.0, 2.0]], [[5.0, 7.0, 7.0, 3.0, 7.0], [0.0, 5.0, 3.0, 4.0, -7.0], [5.0, -5.0, 7.0, -1.0, -4.0], [-4.0, 1.0, 1.0, -3.0, 
--4.0]], [[-1.0, 2.0, -1.0, 0.0, -1.0], [0.0, -3.0, 5.0, -7.0, 6.0], [-1.0, -7.0, -3.0, -6.0, -3.0], [-1.0, 6.0, -6.0, 6.0, 
-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, -5.0, 3.0, 3.0, 7.0], [-6.0, -7.0, -4.0, 7.0, -7.0], [3.0, 3.0, 0.0, -1.0, 3.0], 
-[3.0, -7.0, -2.0, -4.0, -3.0]], [[-5.0, -4.0, -1.0, -5.0, 4.0], [-1.0, 6.0, -7.0, 6.0, 5.0], [6.0, -5.0, -1.0, 0.0, -4.0], 
-[-7.0, 1.0, -6.0, -3.0, 7.0]], [[6.0, 0.0, -3.0, 1.0, -2.0], [1.0, 4.0, -4.0, 5.0, 6.0], [-1.0, 4.0, -4.0, 5.0, -2.0], [1.0, 
-0.0, 0.0, 1.0, -7.0]]], [[[-5.0, 4.0, -2.0, 2.0, -4.0], [7.0, -5.0, 0.0, 2.0, 7.0], [-3.0, -7.0, 2.0, -1.0, 1.0], [6.0, -1.0, 
-4.0, -4.0, -4.0]], [[2.0, -2.0, 4.0, 7.0, 0.0], [3.0, -5.0, 4.0, -5.0, 6.0], [0.0, -7.0, 0.0, -2.0, -2.0], [-4.0, -2.0, 7.0, 
--6.0, -3.0]], [[-2.0, -2.0, -6.0, -4.0, -3.0], [5.0, 0.0, 5.0, 2.0, -4.0], [-4.0, -6.0, 1.0, -6.0, -1.0], [2.0, 0.0, 4.0, 6.0, 
--1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[27.0, -53.0, -39.0, -71.0, -13.0], [36.0, 18.0, -48.0, -119.0, 87.0], [-77.0, 57.0, -62.0, 
--18.0, -21.0], [-9.0, 19.0, -36.0, 3.0, 131.0]], [[9.0, -11.0, 36.0, -14.0, -2.0], [-14.0, 5.0, -12.0, 60.0, -84.0], [21.0, 
-45.0, 20.0, 36.0, 0.0], [16.0, -49.0, 56.0, -58.0, -72.0]], [[72.0, 48.0, 58.0, -13.0, 22.0], [41.0, 126.0, -13.0, 17.0, 7.0], 
-[-24.0, 34.0, 29.0, 49.0, -62.0], [-46.0, 60.0, 28.0, -76.0, 17.0]], [[-17.0, -31.0, -68.0, 23.0, 5.0], [23.0, 24.0, -69.0, 
-4.0, 64.0], [-27.0, 44.0, -1.0, 37.0, 65.0], [-2.0, -19.0, -4.0, 14.0, 32.0]], [[-11.0, 40.0, 20.0, 70.0, 11.0], [-43.0, -34.0, 
-31.0, 105.0, -51.0], [31.0, -32.0, 71.0, 18.0, 56.0], [41.0, -38.0, 49.0, 35.0, -82.0]]], [[[37.0, -37.0, 15.0, -54.0, 76.0], 
-[43.0, 69.0, -77.0, -37.0, -81.0], [47.0, 52.0, -3.0, 3.0, -44.0], [-75.0, -51.0, -14.0, -111.0, -7.0]], [[38.0, 45.0, 45.0, 
-54.0, 33.0], [-42.0, -11.0, 16.0, 102.0, -62.0], [2.0, 0.0, 98.0, 25.0, 52.0], [50.0, -55.0, 77.0, 24.0, -53.0]], [[-10.0, 
--9.0, -11.0, -16.0, -7.0], [14.0, 5.0, 0.0, -36.0, 20.0], [2.0, -8.0, -30.0, -13.0, -22.0], [-20.0, 23.0, -29.0, -6.0, 19.0]], 
-[[29.0, 3.0, 25.0, -26.0, -44.0], [-7.0, 9.0, 13.0, 5.0, 25.0], [-61.0, 42.0, -5.0, 25.0, -12.0], [39.0, 21.0, 42.0, -1.0, 
-27.0]], [[-44.0, -38.0, -52.0, 2.0, 38.0], [46.0, 45.0, -69.0, -15.0, -14.0], [68.0, 8.0, -31.0, 13.0, 1.0], [-79.0, -16.0, 
--53.0, -64.0, -33.0]]], [[[-30.0, 16.0, -22.0, 40.0, 8.0], [-6.0, -21.0, 17.0, 9.0, 16.0], [26.0, -50.0, 7.0, -17.0, 21.0], 
-[-7.0, 10.0, -27.0, 38.0, -13.0]], [[-20.0, -98.0, -29.0, -97.0, -66.0], [24.0, 4.0, -64.0, -48.0, 2.0], [-38.0, 117.0, -92.0, 
-38.0, -20.0], [9.0, -26.0, 14.0, -79.0, 14.0]], [[47.0, 26.0, -18.0, 35.0, 81.0], [30.0, 63.0, -47.0, -17.0, 40.0], [-11.0, 
--6.0, 53.0, -2.0, 25.0], [-40.0, -2.0, -20.0, 17.0, 64.0]], [[-48.0, -52.0, -69.0, 1.0, -5.0], [-2.0, -55.0, -32.0, -37.0, 
-29.0], [4.0, 2.0, -34.0, -22.0, 49.0], [9.0, -38.0, -36.0, 39.0, 21.0]], [[3.0, -27.0, 34.0, -34.0, -79.0], [-38.0, -35.0, 
-11.0, 66.0, -41.0], [-47.0, 82.0, -5.0, 55.0, 16.0], [85.0, -37.0, 95.0, -24.0, -50.0]]], [[[-82.0, -122.0, -107.0, -47.0, 
--23.0], [34.0, -24.0, -103.0, -56.0, 15.0], [22.0, 74.0, -95.0, 15.0, 40.0], [-26.0, -62.0, -47.0, -45.0, -2.0]], [[-105.0, 
--72.0, -83.0, 15.0, -43.0], [-25.0, -103.0, -20.0, 12.0, -7.0], [39.0, -1.0, -50.0, -7.0, 75.0], [33.0, -64.0, -22.0, 36.0, 
--57.0]], [[30.0, -20.0, 29.0, -56.0, 30.0], [21.0, 31.0, -22.0, -44.0, -53.0], [20.0, 25.0, -18.0, -14.0, -57.0], [-40.0, 
--14.0, -11.0, -69.0, 6.0]], [[2.0, 77.0, 36.0, 60.0, 24.0], [3.0, 43.0, 48.0, 55.0, -10.0], [46.0, -74.0, 44.0, 5.0, -24.0], 
-[-36.0, 57.0, -8.0, -1.0, -50.0]], [[-34.0, -75.0, -36.0, -51.0, -17.0], [30.0, 20.0, -71.0, -17.0, -26.0], [20.0, 75.0, -59.0, 
-34.0, -5.0], [-28.0, -37.0, -6.0, -83.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[-67.0, -4.0, -59.0, -110.0, -14.0], [18.0, 
-111.0, -17.0, 19.0, 5.0], [16.0, -36.0, 1.0, -16.0, -38.0], [-53.0, 61.0, -57.0, 63.0, 100.0]], [[60.0, 18.0, 38.0, 44.0, 
--2.0], [-27.0, 13.0, -5.0, -45.0, 32.0], [6.0, 64.0, -21.0, 52.0, -1.0], [-20.0, 10.0, 0.0, -16.0, -24.0]], [[-30.0, -53.0, 
-77.0, 6.0, 84.0], [-65.0, 7.0, -30.0, -31.0, 1.0], [87.0, -30.0, 6.0, -11.0, -21.0], [-113.0, -5.0, -49.0, -72.0, 105.0]], 
-[[-77.0, 8.0, 22.0, -24.0, 52.0], [-40.0, -18.0, -85.0, 63.0, -3.0], [53.0, 3.0, 21.0, 13.0, 26.0], [20.0, -17.0, -80.0, -60.0, 
-58.0]], [[29.0, 32.0, 48.0, 81.0, 1.0], [-12.0, -99.0, 16.0, -26.0, -15.0], [-21.0, 38.0, 14.0, 15.0, 49.0], [70.0, -41.0, 
-37.0, -48.0, -68.0]]], [[[12.0, -12.0, -1.0, 8.0, -16.0], [39.0, 78.0, -31.0, -11.0, 156.0], [29.0, -59.0, -35.0, 35.0, -71.0], 
-[-99.0, 36.0, 7.0, -41.0, 10.0]], [[15.0, 46.0, 59.0, 75.0, -9.0], [-5.0, -73.0, 27.0, -69.0, 13.0], [-14.0, 25.0, 17.0, 20.0, 
-36.0], [35.0, -13.0, 34.0, -51.0, -32.0]], [[-5.0, -18.0, -21.0, -23.0, 1.0], [7.0, 21.0, -3.0, 21.0, -3.0], [2.0, -17.0, -5.0, 
--12.0, -14.0], [-13.0, 3.0, -4.0, 17.0, 8.0]], [[0.0, 4.0, 17.0, -28.0, 16.0], [-45.0, 32.0, 9.0, -39.0, -60.0], [15.0, 51.0, 
-5.0, 5.0, 9.0], [-25.0, 24.0, -39.0, 33.0, 58.0]], [[-15.0, -32.0, 5.0, 11.0, 38.0], [-3.0, 0.0, -83.0, 84.0, 79.0], [46.0, 
--37.0, -17.0, 20.0, -22.0], [-21.0, -29.0, -28.0, -73.0, -11.0]]], [[[-11.0, -4.0, -7.0, 17.0, 2.0], [15.0, -54.0, 1.0, 34.0, 
--13.0], [-14.0, -23.0, 11.0, -20.0, 18.0], [47.0, -33.0, 22.0, -17.0, -37.0]], [[28.0, 3.0, -22.0, -70.0, 6.0], [-51.0, 134.0, 
--56.0, 13.0, 1.0], [32.0, 95.0, -36.0, 62.0, -27.0], [-56.0, 57.0, -90.0, 61.0, 57.0]], [[-96.0, -5.0, 20.0, -2.0, 25.0], 
-[26.0, -34.0, -31.0, 19.0, 61.0], [38.0, -107.0, 29.0, -30.0, -8.0], [-22.0, -11.0, -10.0, -83.0, 56.0]], [[-21.0, 26.0, -51.0, 
--30.0, -32.0], [33.0, 12.0, -22.0, 54.0, 15.0], [-26.0, 0.0, 0.0, 8.0, 7.0], [57.0, 5.0, -7.0, 25.0, -28.0]], [[68.0, 39.0, 
-34.0, 5.0, 0.0], [-74.0, 39.0, 6.0, -66.0, -65.0], [-2.0, 152.0, -14.0, 62.0, 29.0], [4.0, 31.0, -43.0, 49.0, 10.0]]], [[[-8.0, 
-10.0, -48.0, -53.0, 0.0], [-8.0, 78.0, -101.0, 102.0, 54.0], [22.0, 43.0, -29.0, 58.0, -15.0], [14.0, 16.0, -75.0, 10.0, 
--3.0]], [[34.0, 39.0, -45.0, 2.0, -33.0], [8.0, -13.0, -33.0, 71.0, -11.0], [-43.0, 76.0, -13.0, 41.0, 34.0], [109.0, -17.0, 
--5.0, 32.0, -92.0]], [[29.0, -12.0, -20.0, -9.0, -30.0], [35.0, 75.0, 13.0, -28.0, 81.0], [-1.0, -32.0, -29.0, 13.0, -56.0], 
-[-74.0, 39.0, 21.0, 18.0, 3.0]], [[3.0, -43.0, 52.0, 62.0, 51.0], [-20.0, -96.0, 8.0, 6.0, -24.0], [21.0, -40.0, 14.0, -35.0, 
-16.0], [0.0, -62.0, 32.0, -71.0, -22.0]], [[22.0, -7.0, -2.0, -20.0, 19.0], [-33.0, 71.0, -72.0, 40.0, 47.0], [38.0, 49.0, 
--32.0, 56.0, -23.0], [-38.0, 17.0, -60.0, -7.0, 14.0]]]])
+   def test_transposed_tensor_mult_constData_rank4_array_rank2(self):
+      arg0=Data(numpy.array([[[[7.0, 2.0, 4.0, 6.0, -4.0], [3.0, -4.0, 2.0, 7.0, 6.0], [7.0, 0.0, -5.0, 0.0, 6.0], [7.0, -4.0, 
+6.0, -1.0, 5.0]], [[1.0, -5.0, -3.0, 0.0, 0.0], [-7.0, -7.0, 0.0, 5.0, 0.0], [-5.0, 7.0, -1.0, 6.0, -6.0], [1.0, 3.0, -5.0, 
+7.0, 0.0]], [[0.0, 4.0, -1.0, 1.0, 6.0], [-7.0, 7.0, 7.0, 4.0, -2.0], [-7.0, -3.0, 0.0, 4.0, -4.0], [6.0, 1.0, 6.0, 2.0, 
+-4.0]]], [[[-4.0, -4.0, -4.0, 6.0, -7.0], [-4.0, 2.0, -6.0, -6.0, -4.0], [-2.0, -7.0, 4.0, -1.0, 7.0], [0.0, -1.0, 2.0, -4.0, 
+4.0]], [[-5.0, 2.0, -7.0, 1.0, 5.0], [1.0, -2.0, 0.0, -2.0, 5.0], [-6.0, 0.0, -6.0, -2.0, 2.0], [-2.0, 1.0, 0.0, 1.0, 2.0]], 
+[[3.0, -6.0, 0.0, 0.0, 7.0], [-5.0, 3.0, 1.0, 4.0, 0.0], [-3.0, -1.0, -4.0, 7.0, 1.0], [7.0, -3.0, 2.0, 6.0, 
+1.0]]]]),self.functionspace)
+      arg1=numpy.array([[-1.0, 4.0, 0.0], [-1.0, 6.0, -4.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[-41.0, 18.0, -54.0, -6.0, 13.0], [-1.0, -50.0, 0.0, -9.0, 28.0], [-49.0, 39.0, -23.0, -15.0, 
+-29.0], [-43.0, 35.0, -36.0, 15.0, -1.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_float_rank0_offset0(self):
-      arg0=numpy.array([[[-4.0, -1.0], [-5.0, 6.0]], [[6.0, 4.0], [-3.0, -2.0]], [[4.0, -2.0], [-2.0, -6.0]], [[-5.0, -6.0], 
-[0.0, 2.0]], [[-5.0, -1.0], [-6.0, 2.0]], [[6.0, -7.0], [3.0, -7.0]]])
-      arg1=2.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-8.0, -2.0], [-10.0, 12.0]], [[12.0, 8.0], [-6.0, -4.0]], [[8.0, -4.0], [-4.0, -12.0]], [[-10.0, 
--12.0], [0.0, 4.0]], [[-10.0, -2.0], [-12.0, 4.0]], [[12.0, -14.0], [6.0, -14.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank0_offset0(self):
-      arg0=numpy.array([[[5.0, -2.0], [-7.0, 1.0]], [[-4.0, -5.0], [0.0, 6.0]], [[2.0, -4.0], [-2.0, 7.0]], [[-7.0, -7.0], 
-[6.0, -7.0]], [[1.0, 3.0], [6.0, 0.0]], [[6.0, -7.0], [1.0, -2.0]]])
-      arg1=numpy.array(4.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[20.0, -8.0], [-28.0, 4.0]], [[-16.0, -20.0], [0.0, 24.0]], [[8.0, -16.0], [-8.0, 28.0]], [[-28.0, 
--28.0], [24.0, -28.0]], [[4.0, 12.0], [24.0, 0.0]], [[24.0, -28.0], [4.0, -8.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_transposed_tensor_mult_constData_rank4_array_rank3(self):
+      arg0=Data(numpy.array([[[[1.0, -5.0, -2.0, 0.0, -3.0], [-5.0, 0.0, 3.0, 0.0, 2.0], [-5.0, -4.0, 4.0, 0.0, 5.0], [4.0, 
+5.0, -1.0, 0.0, 5.0]], [[-7.0, 7.0, 7.0, 4.0, -2.0], [4.0, -7.0, -6.0, -6.0, -4.0], [-2.0, 3.0, 2.0, -4.0, -6.0], [5.0, 0.0, 
+-4.0, 4.0, -5.0]], [[-6.0, -1.0, -1.0, -7.0, 0.0], [-7.0, 3.0, -7.0, 6.0, 5.0], [6.0, -7.0, 0.0, -4.0, 4.0], [-1.0, -2.0, 1.0, 
+1.0, -5.0]]], [[[0.0, 3.0, 0.0, 7.0, -4.0], [-1.0, 0.0, 5.0, 3.0, -6.0], [-5.0, -3.0, 0.0, 6.0, 0.0], [-4.0, -4.0, 5.0, 6.0, 
+0.0]], [[-1.0, -2.0, 4.0, -6.0, -2.0], [6.0, -5.0, 6.0, 3.0, 2.0], [5.0, 4.0, 7.0, -1.0, -1.0], [-5.0, 0.0, -5.0, -6.0, -5.0]], 
+[[2.0, -7.0, 0.0, -2.0, -4.0], [7.0, 3.0, 3.0, 0.0, 0.0], [-3.0, 6.0, -7.0, 1.0, -1.0], [1.0, -4.0, -3.0, 0.0, 
+-4.0]]]]),self.functionspace)
+      arg1=numpy.array([[[-5.0, -2.0], [2.0, 7.0], [-2.0, 1.0]], [[2.0, -4.0], [-1.0, 7.0], [-5.0, -2.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[-16.0, -68.0], [84.0, 46.0], [22.0, 80.0], [52.0, -45.0], [25.0, 2.0]], [[4.0, 63.0], [-30.0, 
+-87.0], [-24.0, -39.0], [-21.0, -27.0], [-42.0, 11.0]], [[9.0, 63.0], [0.0, 50.0], [12.0, 69.0], [8.0, -65.0], [-39.0, -53.0]], 
+[[-16.0, 5.0], [-9.0, 12.0], [25.0, -74.0], [24.0, -37.0], [0.0, -77.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank1_offset1(self):
-      arg0=numpy.array([[[[5.0, -2.0, 7.0], [0.0, -3.0, 6.0]], [[4.0, 4.0, -5.0], [0.0, -1.0, -2.0]]], [[[-4.0, 5.0, 0.0], 
-[5.0, 6.0, -6.0]], [[4.0, -5.0, 0.0], [5.0, -3.0, 4.0]]], [[[3.0, 0.0, 5.0], [7.0, -4.0, 6.0]], [[0.0, 6.0, 0.0], [-4.0, -3.0, 
--3.0]]], [[[6.0, 2.0, 0.0], [-3.0, -6.0, -2.0]], [[0.0, 1.0, 0.0], [-2.0, 4.0, -5.0]]], [[[5.0, 3.0, 0.0], [2.0, -3.0, -5.0]], 
-[[6.0, 1.0, 3.0], [-1.0, 2.0, 0.0]]], [[[1.0, -4.0, 1.0], [6.0, -6.0, -3.0]], [[0.0, 0.0, 7.0], [2.0, 3.0, -6.0]]]])
-      arg1=numpy.array([6.0, -4.0, -2.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[24.0, 0.0], [18.0, 8.0]], [[-44.0, 18.0], [44.0, 34.0]], [[8.0, 46.0], [-24.0, -6.0]], [[28.0, 10.0], 
-[-4.0, -18.0]], [[18.0, 34.0], [26.0, -14.0]], [[20.0, 66.0], [-14.0, 12.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_transposed_tensor_mult_constData_rank4_array_rank4(self):
+      arg0=Data(numpy.array([[[[4.0, 3.0, -4.0, -2.0, 6.0], [-4.0, -7.0, 0.0, -4.0, 2.0], [-6.0, 7.0, 0.0, -7.0, -7.0], [2.0, 
+1.0, -6.0, -4.0, -4.0]], [[-2.0, -6.0, 1.0, 4.0, 0.0], [0.0, 3.0, 7.0, 0.0, 5.0], [-4.0, 3.0, 6.0, -7.0, 1.0], [-6.0, 6.0, 4.0, 
+0.0, -6.0]], [[-1.0, 6.0, 2.0, 4.0, 2.0], [-1.0, -3.0, 1.0, 0.0, 1.0], [-7.0, -2.0, -6.0, 0.0, 3.0], [7.0, 3.0, -6.0, -7.0, 
+5.0]]], [[[-4.0, -6.0, -3.0, 0.0, -3.0], [-5.0, -3.0, -3.0, -7.0, 6.0], [0.0, 6.0, -3.0, -7.0, 0.0], [-1.0, -6.0, 0.0, 5.0, 
+7.0]], [[-6.0, 0.0, 3.0, 5.0, 2.0], [1.0, 0.0, -3.0, 3.0, -2.0], [-6.0, 3.0, 4.0, 5.0, -1.0], [5.0, -7.0, 6.0, 5.0, -7.0]], 
+[[-3.0, 6.0, -2.0, 0.0, -1.0], [-1.0, 0.0, -6.0, -4.0, -2.0], [2.0, 7.0, 4.0, 2.0, 7.0], [2.0, 2.0, 2.0, 6.0, 
+-2.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[-6.0, 6.0, -5.0, 0.0, -6.0], [6.0, 7.0, -5.0, 5.0, -7.0], [-1.0, 3.0, -5.0, 0.0, 2.0], [2.0, -6.0, 
+-6.0, 5.0, 2.0]], [[2.0, -1.0, 2.0, -4.0, 5.0], [-3.0, -3.0, 6.0, 0.0, -5.0], [-1.0, -2.0, 2.0, 3.0, 0.0], [-2.0, 2.0, 0.0, 
+3.0, -6.0]], [[-3.0, -5.0, 3.0, 5.0, 2.0], [-5.0, 3.0, 1.0, -2.0, 5.0], [0.0, -3.0, -5.0, 7.0, 4.0], [6.0, -1.0, -1.0, 2.0, 
+5.0]]], [[[-7.0, -1.0, -3.0, -2.0, 1.0], [2.0, 0.0, 0.0, 3.0, -2.0], [7.0, -1.0, 6.0, 6.0, -3.0], [0.0, -2.0, 0.0, 6.0, 7.0]], 
+[[0.0, 6.0, 5.0, 4.0, 1.0], [-6.0, -4.0, -2.0, 0.0, -1.0], [-4.0, -6.0, -4.0, 4.0, -2.0], [7.0, 4.0, -2.0, -6.0, -5.0]], [[6.0, 
+-1.0, 7.0, 1.0, 7.0], [-4.0, 6.0, -7.0, -3.0, 3.0], [-6.0, -1.0, -3.0, 0.0, 7.0], [-4.0, -3.0, -6.0, 3.0, -6.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-15.0, 2.0, -66.0, -16.0, -67.0], [75.0, 37.0, 0.0, 19.0, -18.0], [12.0, 62.0, -10.0, -61.0, 
+7.0], [-24.0, -34.0, 7.0, 15.0, 35.0]], [[30.0, -6.0, 51.0, 72.0, 0.0], [-30.0, 93.0, -87.0, -33.0, 69.0], [-75.0, 3.0, -111.0, 
+-12.0, 90.0], [30.0, -42.0, -60.0, -9.0, -6.0]], [[29.0, -12.0, 38.0, 22.0, 19.0], [-53.0, -49.0, 36.0, -27.0, 30.0], [-18.0, 
+-33.0, -12.0, 11.0, -11.0], [31.0, 48.0, 28.0, -55.0, -28.0]], [[8.0, -6.0, 55.0, 24.0, 45.0], [-74.0, -34.0, 28.0, -18.0, 
+9.0], [-22.0, -56.0, -22.0, 60.0, 2.0], [47.0, 36.0, -2.0, -20.0, -33.0]], [[-27.0, 42.0, -12.0, 23.0, -40.0], [12.0, 34.0, 
+-25.0, 20.0, -31.0], [-29.0, 4.0, -63.0, 4.0, 18.0], [42.0, -21.0, -36.0, 1.0, -3.0]]], [[[56.0, -7.0, 30.0, 8.0, 11.0], 
+[-31.0, -41.0, 24.0, -30.0, 29.0], [-29.0, -9.0, -6.0, -33.0, -6.0], [-3.0, 42.0, 29.0, -61.0, -47.0]], [[78.0, -27.0, 41.0, 
+-21.0, 48.0], [-42.0, -67.0, 50.0, -38.0, 25.0], [-17.0, -15.0, 38.0, -30.0, -17.0], [-38.0, 57.0, 45.0, -50.0, -68.0]], 
+[[-4.0, -21.0, -31.0, -35.0, -11.0], [10.0, -42.0, 91.0, 7.0, -39.0], [20.0, 10.0, 21.0, -2.0, -23.0], [-5.0, 25.0, 41.0, 5.0, 
+-7.0]], [[49.0, 5.0, 28.0, 22.0, -8.0], [-40.0, -64.0, 42.0, -29.0, 27.0], [-33.0, -19.0, -22.0, -30.0, -21.0], [29.0, 62.0, 
+42.0, -92.0, -48.0]], [[-59.0, -14.0, -39.0, -37.0, 5.0], [24.0, -2.0, 39.0, 32.0, -50.0], [55.0, 1.0, 45.0, 50.0, -20.0], 
+[-6.0, -17.0, 3.0, 69.0, 43.0]]], [[[61.0, -35.0, -15.0, -41.0, 10.0], [39.0, -15.0, -3.0, -22.0, 39.0], [22.0, 45.0, 75.0, 
+-85.0, -14.0], [-96.0, 5.0, 43.0, -14.0, -5.0]], [[-30.0, 54.0, 11.0, -15.0, 27.0], [9.0, 64.0, -74.0, 36.0, -68.0], [-22.0, 
+-10.0, -16.0, 43.0, 31.0], [-11.0, -55.0, -88.0, 79.0, -29.0]], [[75.0, 47.0, 51.0, -28.0, 47.0], [-34.0, -28.0, -6.0, -9.0, 
+-46.0], [-67.0, -19.0, -4.0, -26.0, 5.0], [-36.0, 28.0, -26.0, -24.0, -131.0]], [[89.0, 0.0, 81.0, 64.0, 19.0], [-73.0, -36.0, 
+-31.0, -62.0, 99.0], [-67.0, -32.0, -47.0, -43.0, 11.0], [27.0, 56.0, 20.0, -122.0, -58.0]], [[77.0, -71.0, 90.0, 14.0, 101.0], 
+[-82.0, 3.0, -3.0, -62.0, 81.0], [-32.0, -33.0, 5.0, 20.0, 49.0], [-33.0, 16.0, -1.0, 1.0, -42.0]]], [[[-26.0, 12.0, 41.0, 
+83.0, -10.0], [-45.0, 45.0, -63.0, -13.0, 54.0], [-35.0, -34.0, -89.0, 45.0, 39.0], [85.0, -15.0, -41.0, -24.0, 31.0]], [[51.0, 
+-53.0, 13.0, -23.0, 31.0], [-5.0, 38.0, 34.0, -25.0, 3.0], [-33.0, 28.0, -22.0, -25.0, 60.0], [-49.0, -19.0, -7.0, 41.0, 
+-38.0]], [[74.0, 24.0, 64.0, -20.0, 64.0], [-62.0, -84.0, 22.0, -24.0, -8.0], [-34.0, -46.0, 38.0, -6.0, -34.0], [-22.0, 68.0, 
+18.0, -60.0, -108.0]], [[46.0, 30.0, 51.0, -19.0, 62.0], [-33.0, -33.0, -39.0, -9.0, -4.0], [-17.0, -32.0, 47.0, 1.0, -19.0], 
+[-39.0, 23.0, -15.0, -16.0, -69.0]], [[-64.0, -90.0, -47.0, 5.0, -10.0], [33.0, 21.0, 17.0, -3.0, 70.0], [99.0, 22.0, 59.0, 
+31.0, -9.0], [-7.0, -29.0, 45.0, 50.0, 149.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_array_rank1_offset0(self):
-      arg0=numpy.array([[[2.0, -5.0], [-1.0, -2.0]], [[-1.0, 7.0], [-3.0, -4.0]], [[-2.0, -7.0], [0.0, 6.0]], [[-1.0, 3.0], 
-[5.0, 5.0]], [[6.0, -3.0], [3.0, 0.0]], [[-7.0, 0.0], [-4.0, 0.0]]])
-      arg1=numpy.array([1.0, 4.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[2.0, 8.0], [-5.0, -20.0]], [[-1.0, -4.0], [-2.0, -8.0]]], [[[-1.0, -4.0], [7.0, 28.0]], [[-3.0, 
--12.0], [-4.0, -16.0]]], [[[-2.0, -8.0], [-7.0, -28.0]], [[0.0, 0.0], [6.0, 24.0]]], [[[-1.0, -4.0], [3.0, 12.0]], [[5.0, 
-20.0], [5.0, 20.0]]], [[[6.0, 24.0], [-3.0, -12.0]], [[3.0, 12.0], [0.0, 0.0]]], [[[-7.0, -28.0], [0.0, 0.0]], [[-4.0, -16.0], 
-[0.0, 0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+   def test_transposed_tensor_mult_constData_rank4_constData_rank2(self):
+      arg0=Data(numpy.array([[[[-3.0, 0.0, -6.0, 5.0, 4.0], [-7.0, -4.0, 0.0, -7.0, -4.0], [0.0, 6.0, -6.0, -3.0, 4.0], [-1.0, 
+5.0, -7.0, 6.0, -5.0]], [[-6.0, 3.0, 5.0, 3.0, 1.0], [0.0, 3.0, 6.0, 0.0, -4.0], [0.0, 0.0, -7.0, 1.0, 1.0], [-5.0, -6.0, 6.0, 
+0.0, -2.0]], [[-6.0, 7.0, 7.0, 0.0, 6.0], [-1.0, -3.0, 4.0, 2.0, 0.0], [0.0, -4.0, 6.0, 1.0, -7.0], [0.0, 5.0, 7.0, -5.0, 
+-7.0]]], [[[2.0, 2.0, -7.0, 7.0, 5.0], [-4.0, -4.0, -2.0, 3.0, 4.0], [-4.0, -3.0, 7.0, -6.0, -7.0], [-4.0, 0.0, -4.0, -2.0, 
+7.0]], [[-3.0, -1.0, 0.0, 6.0, -5.0], [-2.0, -1.0, 4.0, 5.0, -3.0], [-7.0, -3.0, -5.0, -6.0, -2.0], [-5.0, 3.0, 4.0, 5.0, 
+-1.0]], [[-4.0, -6.0, -4.0, 4.0, -4.0], [4.0, 6.0, -3.0, 3.0, 4.0], [-6.0, -2.0, 1.0, 7.0, 6.0], [3.0, -6.0, 5.0, 5.0, 
+-3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[4.0, 3.0, 3.0], [4.0, -6.0, -7.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[6.0, 86.0, 12.0, -7.0, 115.0], [-63.0, -68.0, 19.0, -61.0, -22.0], [68.0, 32.0, 24.0, -43.0, 
+-60.0], [-26.0, 41.0, -64.0, -64.0, 8.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank2_offset1(self):
-      arg0=numpy.array([[[[4.0, -3.0, -4.0], [4.0, -2.0, 0.0]], [[-4.0, -3.0, -4.0], [2.0, 0.0, 7.0]]], [[[0.0, -6.0, 2.0], 
-[6.0, -1.0, -7.0]], [[-1.0, -5.0, -2.0], [6.0, -6.0, -4.0]]], [[[2.0, 0.0, 4.0], [-2.0, -3.0, 1.0]], [[0.0, 0.0, -5.0], [7.0, 
-7.0, -6.0]]], [[[7.0, -5.0, 2.0], [-3.0, -3.0, 6.0]], [[6.0, 1.0, -3.0], [-2.0, -2.0, 1.0]]], [[[-6.0, 4.0, 2.0], [-3.0, -6.0, 
-0.0]], [[2.0, -2.0, -7.0], [7.0, 4.0, 4.0]]], [[[6.0, 2.0, 6.0], [4.0, -7.0, 4.0]], [[6.0, 7.0, -2.0], [-1.0, -5.0, 2.0]]]])
-      arg1=numpy.array([[-1.0, -3.0], [-3.0, -6.0], [-3.0, 6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[17.0, -18.0], [2.0, 0.0]], [[25.0, 6.0], [-23.0, 36.0]]], [[[12.0, 48.0], [18.0, -54.0]], [[22.0, 
-21.0], [24.0, -6.0]]], [[[-14.0, 18.0], [8.0, 30.0]], [[15.0, -30.0], [-10.0, -99.0]]], [[[2.0, 21.0], [-6.0, 63.0]], [[0.0, 
--42.0], [5.0, 24.0]]], [[[-12.0, 6.0], [21.0, 45.0]], [[25.0, -36.0], [-31.0, -21.0]]], [[[-30.0, 6.0], [5.0, 54.0]], [[-21.0, 
--72.0], [10.0, 45.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+   def test_transposed_tensor_mult_constData_rank4_constData_rank3(self):
+      arg0=Data(numpy.array([[[[-7.0, 0.0, -4.0, 1.0, 6.0], [3.0, -3.0, 3.0, 1.0, 0.0], [-3.0, 3.0, 5.0, 0.0, 6.0], [5.0, -7.0, 
+1.0, 0.0, -6.0]], [[1.0, -3.0, -7.0, 6.0, -5.0], [-3.0, -5.0, -5.0, -3.0, 3.0], [7.0, -7.0, -5.0, -7.0, 0.0], [5.0, 0.0, 1.0, 
+6.0, 2.0]], [[3.0, -7.0, -3.0, 0.0, 6.0], [7.0, 2.0, -1.0, 5.0, -1.0], [-1.0, 7.0, -1.0, 0.0, 0.0], [-2.0, -5.0, 4.0, 0.0, 
+-3.0]]], [[[4.0, -2.0, -2.0, -7.0, -6.0], [6.0, -6.0, 7.0, -6.0, 5.0], [-4.0, 7.0, 3.0, 6.0, 0.0], [7.0, 7.0, 3.0, -5.0, 2.0]], 
+[[-3.0, -1.0, 5.0, 6.0, 2.0], [-6.0, 7.0, -1.0, -4.0, 2.0], [-6.0, -1.0, 0.0, 6.0, -2.0], [6.0, -4.0, 7.0, -2.0, 1.0]], [[2.0, 
+-5.0, -6.0, 3.0, 2.0], [3.0, -4.0, -5.0, 2.0, -5.0], [2.0, -6.0, -1.0, -1.0, 3.0], [2.0, -2.0, -2.0, -2.0, 
+-4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[0.0, 7.0], [3.0, -2.0], [1.0, -3.0]], [[0.0, 7.0], [-2.0, -6.0], [2.0, 
+0.0]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[16.0, -14.0], [-24.0, 19.0], [-46.0, -49.0], [12.0, -90.0], [-9.0, -20.0]], [[16.0, 84.0], 
+[-35.0, -101.0], [-24.0, 89.0], [8.0, -20.0], [-6.0, 20.0]], [[36.0, -24.0], [-24.0, 69.0], [-18.0, 69.0], [-35.0, 20.0], 
+[10.0, 54.0]], [[5.0, 44.0], [-1.0, 39.0], [-11.0, -28.0], [18.0, -35.0], [-7.0, -29.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank0_offset0(self):
-      arg0=numpy.array([[[-5.0, 4.0], [-3.0, -4.0]], [[4.0, 0.0], [2.0, 7.0]], [[1.0, 1.0], [3.0, -6.0]], [[4.0, 2.0], [2.0, 
--2.0]], [[6.0, -3.0], [0.0, 0.0]], [[0.0, -6.0], [-1.0, -4.0]]])
-      arg1=Data(2.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-10.0, 8.0], [-6.0, -8.0]], [[8.0, 0.0], [4.0, 14.0]], [[2.0, 2.0], [6.0, -12.0]], [[8.0, 4.0], 
-[4.0, -4.0]], [[12.0, -6.0], [0.0, 0.0]], [[0.0, -12.0], [-2.0, -8.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank1_offset1(self):
-      arg0=numpy.array([[[[-2.0, -3.0, -1.0], [7.0, -4.0, -1.0]], [[-4.0, 0.0, 6.0], [-3.0, 1.0, 4.0]]], [[[7.0, -2.0, -4.0], 
-[1.0, 0.0, -3.0]], [[-6.0, -2.0, -2.0], [0.0, 6.0, 2.0]]], [[[-6.0, 7.0, -4.0], [3.0, 5.0, 5.0]], [[3.0, 5.0, -4.0], [-1.0, 
-0.0, 7.0]]], [[[1.0, -1.0, 4.0], [0.0, -3.0, 0.0]], [[3.0, -4.0, 0.0], [-3.0, 7.0, -1.0]]], [[[-4.0, -4.0, 2.0], [0.0, -4.0, 
--1.0]], [[4.0, 6.0, -5.0], [0.0, 2.0, -7.0]]], [[[-7.0, 3.0, 5.0], [-4.0, -7.0, -5.0]], [[-1.0, -4.0, 0.0], [-1.0, 1.0, 
--6.0]]]])
-      arg1=Data(numpy.array([-5.0, 0.0, -3.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[13.0, -32.0], [2.0, 3.0]], [[-23.0, 4.0], [36.0, -6.0]], [[42.0, -30.0], [-3.0, -16.0]], [[-17.0, 
-0.0], [-15.0, 18.0]], [[14.0, 3.0], [-5.0, 21.0]], [[20.0, 35.0], [5.0, 23.0]]]),self.functionspace)
+   def test_transposed_tensor_mult_constData_rank4_constData_rank4(self):
+      arg0=Data(numpy.array([[[[-2.0, -2.0, -4.0, -1.0, -5.0], [5.0, -5.0, -1.0, 1.0, 7.0], [-3.0, 7.0, 0.0, 4.0, 0.0], [5.0, 
+-5.0, 2.0, 3.0, -4.0]], [[-5.0, 2.0, 7.0, 6.0, -2.0], [-2.0, -3.0, -7.0, 3.0, 3.0], [-5.0, -7.0, -1.0, -2.0, 1.0], [-7.0, -1.0, 
+3.0, -7.0, 0.0]], [[6.0, -5.0, -2.0, -5.0, 5.0], [0.0, -6.0, -7.0, 0.0, -2.0], [-6.0, 7.0, -1.0, 1.0, -1.0], [7.0, 6.0, 1.0, 
+2.0, -5.0]]], [[[-6.0, 4.0, 0.0, 1.0, -6.0], [1.0, -3.0, -3.0, 4.0, 6.0], [-3.0, 1.0, -1.0, -2.0, -5.0], [-3.0, -5.0, 3.0, 
+-5.0, -4.0]], [[0.0, -2.0, -6.0, 6.0, 5.0], [0.0, 1.0, 2.0, 4.0, 2.0], [-1.0, -7.0, -2.0, -3.0, 6.0], [2.0, -6.0, 5.0, -3.0, 
+-1.0]], [[0.0, 2.0, -3.0, 2.0, 6.0], [3.0, -2.0, -3.0, -5.0, 7.0], [-1.0, -3.0, -4.0, 2.0, 0.0], [5.0, 7.0, 1.0, 0.0, 
+-4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-6.0, 1.0, 7.0, -7.0, 6.0], [5.0, -7.0, -4.0, -2.0, 0.0], [-4.0, -4.0, -1.0, 0.0, -1.0], [5.0, 
+0.0, -7.0, -4.0, 4.0]], [[6.0, 6.0, 1.0, -4.0, -6.0], [2.0, -3.0, -2.0, 6.0, 0.0], [3.0, 5.0, -3.0, -6.0, 2.0], [0.0, -7.0, 
+-2.0, -5.0, -4.0]], [[-3.0, -2.0, 7.0, 2.0, -3.0], [-4.0, 0.0, 7.0, 0.0, 7.0], [7.0, -2.0, -4.0, 6.0, -6.0], [7.0, -6.0, 7.0, 
+-3.0, -4.0]]], [[[3.0, -1.0, -7.0, -4.0, 7.0], [0.0, 6.0, -3.0, 0.0, -5.0], [-1.0, 7.0, -4.0, 0.0, 0.0], [-4.0, 3.0, -7.0, 4.0, 
+-3.0]], [[-6.0, -7.0, 0.0, -7.0, 2.0], [-2.0, 0.0, -5.0, -1.0, 6.0], [-2.0, 7.0, 0.0, 7.0, -1.0], [2.0, -4.0, 3.0, 2.0, -4.0]], 
+[[-4.0, -4.0, 3.0, 5.0, -5.0], [-4.0, -1.0, 7.0, 4.0, -4.0], [-1.0, 1.0, 1.0, -3.0, 1.0], [4.0, -5.0, 6.0, 1.0, 
+6.0]]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-54.0, -38.0, 65.0, 70.0, -42.0], [-44.0, -7.0, 78.0, -26.0, 72.0], [41.0, -71.0, 17.0, 66.0, 
+-44.0], [56.0, -19.0, 108.0, -9.0, 6.0]], [[55.0, 22.0, -69.0, 4.0, 5.0], [10.0, 30.0, -19.0, 26.0, -75.0], [-23.0, 44.0, 2.0, 
+-62.0, 40.0], [-57.0, 26.0, -47.0, 27.0, 12.0]], [[120.0, 96.0, -44.0, 23.0, -57.0], [26.0, 10.0, -3.0, 44.0, -38.0], [38.0, 
+10.0, -12.0, -87.0, 33.0], [-58.0, 2.0, -36.0, -28.0, -30.0]], [[16.0, -6.0, -37.0, -63.0, -18.0], [7.0, -7.0, -62.0, 40.0, 
+-12.0], [-28.0, 95.0, 1.0, -30.0, 39.0], [-24.0, -43.0, -17.0, 7.0, -23.0]], [[-69.0, -80.0, 58.0, 72.0, -95.0], [-83.0, -1.0, 
+94.0, 17.0, 71.0], [39.0, -1.0, 21.0, 59.0, -28.0], [68.0, -84.0, 167.0, 7.0, 2.0]]], [[[-51.0, -20.0, 35.0, -16.0, 34.0], 
+[9.0, -26.0, 2.0, -10.0, -17.0], [-30.0, -20.0, 0.0, 3.0, -6.0], [33.0, 2.0, -20.0, -3.0, 43.0]], [[23.0, -7.0, -65.0, 30.0, 
+-3.0], [-1.0, 28.0, -26.0, -17.0, -13.0], [-28.0, 1.0, 48.0, -5.0, 32.0], [-61.0, 54.0, 11.0, 41.0, 9.0]], [[-24.0, -28.0, 
+-51.0, 4.0, 55.0], [17.0, 13.0, -53.0, -54.0, -10.0], [-64.0, -27.0, 59.0, 23.0, 24.0], [-50.0, 89.0, -19.0, 49.0, 35.0]], 
+[[20.0, 7.0, -33.0, -88.0, 49.0], [23.0, 13.0, -77.0, -8.0, 24.0], [-2.0, 62.0, -31.0, 25.0, -4.0], [-23.0, 0.0, -59.0, 0.0, 
+-66.0]], [[-40.0, -19.0, 17.0, -68.0, 41.0], [17.0, -29.0, -27.0, 30.0, -60.0], [-50.0, 54.0, -25.0, -37.0, 16.0], [29.0, 
+-34.0, -63.0, -2.0, 40.0]]], [[[7.0, -7.0, -50.0, 43.0, 12.0], [5.0, 19.0, -13.0, -27.0, -29.0], [-39.0, -30.0, 53.0, -10.0, 
+29.0], [-51.0, 71.0, 1.0, 40.0, 39.0]], [[-48.0, 11.0, 75.0, 23.0, 71.0], [19.0, -19.0, 46.0, -61.0, 14.0], [16.0, -122.0, 
+-21.0, 44.0, -59.0], [54.0, 53.0, -32.0, -27.0, 35.0]], [[22.0, 27.0, -13.0, 0.0, 18.0], [22.0, 1.0, -20.0, -20.0, 2.0], [-1.0, 
+-28.0, 7.0, -2.0, 2.0], [-23.0, 38.0, -28.0, -4.0, -5.0]], [[-35.0, 5.0, 53.0, 21.0, 3.0], [10.0, -36.0, 30.0, -9.0, -9.0], 
+[-9.0, -61.0, 8.0, -9.0, -9.0], [37.0, 4.0, 0.0, -21.0, 50.0]], [[-42.0, -29.0, 29.0, -28.0, -26.0], [-6.0, -33.0, -24.0, 0.0, 
+54.0], [-11.0, 14.0, 21.0, 30.0, 2.0], [25.0, -40.0, 44.0, -10.0, -9.0]]], [[[-134.0, -82.0, 113.0, 30.0, 9.0], [-41.0, -37.0, 
+77.0, -34.0, 56.0], [2.0, -71.0, 5.0, 83.0, -58.0], [110.0, -35.0, 85.0, -9.0, 51.0]], [[-1.0, -4.0, 62.0, 148.0, -124.0], 
+[-67.0, 1.0, 158.0, 38.0, 3.0], [69.0, -67.0, 11.0, -21.0, -20.0], [53.0, -55.0, 138.0, -18.0, 41.0]], [[-22.0, -24.0, 6.0, 
+-66.0, 17.0], [-2.0, -6.0, -34.0, 13.0, 18.0], [-6.0, 62.0, -26.0, 20.0, -6.0], [19.0, -43.0, -13.0, -3.0, -31.0]], [[-63.0, 
+-17.0, 63.0, 52.0, 13.0], [-1.0, -30.0, 46.0, -45.0, 21.0], [-8.0, -107.0, 30.0, 33.0, -26.0], [43.0, 34.0, 33.0, -9.0, 59.0]], 
+[[49.0, 33.0, -47.0, 21.0, -19.0], [18.0, 8.0, -30.0, -7.0, -5.0], [-9.0, -13.0, 36.0, -25.0, 31.0], [-57.0, 42.0, -6.0, 9.0, 
+-4.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_constData_rank1_offset0(self):
-      arg0=numpy.array([[[-4.0, 6.0], [-6.0, -1.0]], [[-1.0, 4.0], [-3.0, 3.0]], [[-6.0, -6.0], [-3.0, 4.0]], [[-2.0, 4.0], 
-[-2.0, 0.0]], [[5.0, 5.0], [3.0, 7.0]], [[3.0, 0.0], [0.0, 0.0]]])
-      arg1=Data(numpy.array([-2.0, -4.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[8.0, 16.0], [-12.0, -24.0]], [[12.0, 24.0], [2.0, 4.0]]], [[[2.0, 4.0], [-8.0, -16.0]], [[6.0, 
-12.0], [-6.0, -12.0]]], [[[12.0, 24.0], [12.0, 24.0]], [[6.0, 12.0], [-8.0, -16.0]]], [[[4.0, 8.0], [-8.0, -16.0]], [[4.0, 
-8.0], [0.0, 0.0]]], [[[-10.0, -20.0], [-10.0, -20.0]], [[-6.0, -12.0], [-14.0, -28.0]]], [[[-6.0, -12.0], [0.0, 0.0]], [[0.0, 
-0.0], [0.0, 0.0]]]]),self.functionspace)
+   def test_transposed_tensor_mult_constData_rank4_expandedData_rank2(self):
+      arg0=Data(numpy.array([[[[0.0, 6.0, 3.0, -6.0, 2.0], [-4.0, -3.0, -7.0, -7.0, -2.0], [-4.0, 1.0, 5.0, -3.0, 6.0], [0.0, 
+3.0, 0.0, -2.0, 3.0]], [[7.0, 4.0, 5.0, -4.0, 1.0], [-7.0, -7.0, -3.0, 4.0, -1.0], [-2.0, 0.0, -6.0, -7.0, -7.0], [6.0, -1.0, 
+7.0, -4.0, 4.0]], [[-1.0, 7.0, -7.0, 2.0, -5.0], [7.0, -4.0, 7.0, 0.0, -7.0], [0.0, -6.0, -4.0, -4.0, 5.0], [3.0, -2.0, 0.0, 
+-3.0, 0.0]]], [[[1.0, -2.0, -3.0, -6.0, 1.0], [1.0, 7.0, 3.0, 7.0, -4.0], [0.0, 6.0, 4.0, 0.0, -5.0], [6.0, -4.0, 3.0, 3.0, 
+6.0]], [[-5.0, 5.0, 0.0, 5.0, 4.0], [6.0, -5.0, 0.0, 3.0, 4.0], [-7.0, 2.0, -1.0, 0.0, -6.0], [-4.0, 4.0, 1.0, 4.0, 1.0]], 
+[[7.0, -2.0, 5.0, 6.0, 4.0], [-7.0, -6.0, 1.0, 0.0, -2.0], [7.0, 3.0, 3.0, 4.0, 2.0], [-2.0, 1.0, 7.0, -3.0, 
+-2.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, -2.0, 2.0], [-4.0, 0.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -3.0, 1.0], [-2.0, 
+-3.0, 3.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-48.0, 22.0, -32.0, 12.0, -32.0], [52.0, 2.0, 4.0, -36.0, 12.0], [-24.0, -48.0, -24.0, -10.0, 
+36.0], [-22.0, 10.0, -54.0, 2.0, -24.0]])+(1.-msk_ref)*numpy.array([[12.0, -46.0, -13.0, 53.0, -18.0], [3.0, 12.0, 41.0, -7.0, 
+-6.0], [64.0, -19.0, -2.0, 41.0, 36.0], [-21.0, -12.0, -9.0, -10.0, -45.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank2_offset1(self):
-      arg0=numpy.array([[[[3.0, 3.0, 0.0], [4.0, 0.0, 3.0]], [[5.0, 1.0, -4.0], [-2.0, -5.0, 7.0]]], [[[-7.0, -6.0, 1.0], 
-[-6.0, -5.0, -4.0]], [[2.0, 0.0, -2.0], [6.0, -7.0, 6.0]]], [[[-2.0, 3.0, 0.0], [0.0, -6.0, -1.0]], [[-1.0, -6.0, -4.0], [-4.0, 
-0.0, -2.0]]], [[[4.0, 0.0, 6.0], [-5.0, -1.0, 5.0]], [[7.0, -4.0, -2.0], [6.0, 5.0, -3.0]]], [[[1.0, -1.0, 3.0], [3.0, -1.0, 
-3.0]], [[-6.0, 0.0, -3.0], [-5.0, -3.0, -6.0]]], [[[2.0, 0.0, -3.0], [2.0, -3.0, 2.0]], [[0.0, 7.0, 7.0], [0.0, -1.0, -5.0]]]])
-      arg1=Data(numpy.array([[-1.0, 4.0], [0.0, 3.0], [-1.0, 5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-3.0, 21.0], [-7.0, 31.0]], [[-1.0, 3.0], [-5.0, 12.0]]], [[[6.0, -41.0], [10.0, -59.0]], [[0.0, 
--2.0], [-12.0, 33.0]]], [[[2.0, 1.0], [1.0, -23.0]], [[5.0, -42.0], [6.0, -26.0]]], [[[-10.0, 46.0], [0.0, 2.0]], [[-5.0, 6.0], 
-[-3.0, 24.0]]], [[[-4.0, 16.0], [-6.0, 24.0]], [[9.0, -39.0], [11.0, -59.0]]], [[[1.0, -7.0], [-4.0, 9.0]], [[-7.0, 56.0], 
-[5.0, -28.0]]]]),self.functionspace)
+   def test_transposed_tensor_mult_constData_rank4_expandedData_rank3(self):
+      arg0=Data(numpy.array([[[[3.0, -5.0, -6.0, -6.0, -5.0], [-4.0, -3.0, -5.0, -1.0, 6.0], [-6.0, -1.0, 1.0, -3.0, 2.0], 
+[3.0, 3.0, -7.0, -7.0, 2.0]], [[-2.0, 2.0, 4.0, 0.0, 6.0], [-5.0, 7.0, 5.0, 4.0, 3.0], [-3.0, 6.0, -5.0, 4.0, -5.0], [1.0, 7.0, 
+0.0, 6.0, -3.0]], [[-1.0, -2.0, 3.0, 3.0, 1.0], [0.0, -1.0, -1.0, -3.0, -2.0], [-6.0, 0.0, 0.0, -7.0, 5.0], [1.0, 7.0, 6.0, 
+2.0, -6.0]]], [[[-2.0, -2.0, -1.0, 2.0, 7.0], [-2.0, -1.0, 0.0, -4.0, -6.0], [3.0, 6.0, -4.0, 1.0, 1.0], [3.0, -3.0, -4.0, 1.0, 
+-6.0]], [[-1.0, 1.0, -4.0, -3.0, -1.0], [2.0, -4.0, -5.0, -6.0, -1.0], [2.0, 3.0, -7.0, -7.0, 1.0], [4.0, -1.0, -5.0, 7.0, 
+2.0]], [[-6.0, 1.0, -5.0, 5.0, 4.0], [4.0, 3.0, 1.0, 7.0, 4.0], [2.0, 0.0, 1.0, 0.0, 1.0], [-5.0, 6.0, -7.0, -6.0, 
+6.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, 2.0], [-4.0, 6.0], [6.0, 2.0]], [[3.0, 3.0], [0.0, -3.0], [-2.0, 
+-3.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 0.0], [-2.0, -4.0], [0.0, 0.0]], [[-1.0, 3.0], [-5.0, -5.0], [0.0, 0.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[8.0, 7.0], [-28.0, -14.0], [9.0, 42.0], [14.0, -6.0], [-5.0, 40.0]], [[6.0, -62.0], [-43.0, 
+34.0], [-28.0, 30.0], [-60.0, 1.0], [-50.0, -1.0]], [[-19.0, -45.0], [-6.0, 43.0], [6.0, -22.0], [-55.0, 28.0], [51.0, -19.0]], 
+[[21.0, 26.0], [-7.0, 38.0], [38.0, 22.0], [3.0, 26.0], [-54.0, -68.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 7.0], [-22.0, 
+-19.0], [-5.0, 1.0], [-5.0, 21.0], [-29.0, 2.0]], [[-10.0, 4.0], [-2.0, -11.0], [0.0, 5.0], [23.0, 2.0], [23.0, -25.0]], 
+[[-25.0, 11.0], [-36.0, -21.0], [52.0, 43.0], [17.0, 22.0], [10.0, 18.0]], [[-16.0, -15.0], [3.0, -32.0], [8.0, 13.0], [-69.0, 
+-56.0], [8.0, -16.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[[-1.0, 3.0], [-1.0, 0.0]], [[-1.0, -2.0], [1.0, 0.0]], [[-5.0, 2.0], [-3.0, 0.0]], [[5.0, -2.0], 
-[-4.0, 0.0]], [[-5.0, 6.0], [6.0, -6.0]], [[5.0, 3.0], [-7.0, 4.0]]])
+   def test_transposed_tensor_mult_constData_rank4_expandedData_rank4(self):
+      arg0=Data(numpy.array([[[[-1.0, -3.0, 1.0, 2.0, 3.0], [4.0, 3.0, -3.0, 3.0, -2.0], [7.0, -5.0, 5.0, -7.0, -5.0], [0.0, 
+0.0, 3.0, 2.0, -6.0]], [[-7.0, 7.0, -1.0, -2.0, -6.0], [0.0, -3.0, -2.0, -1.0, 3.0], [4.0, 0.0, 3.0, -6.0, -5.0], [-3.0, 3.0, 
+-3.0, 0.0, -1.0]], [[-1.0, 3.0, 6.0, -5.0, 5.0], [-7.0, -4.0, -2.0, 3.0, -7.0], [7.0, -2.0, 3.0, -2.0, 0.0], [-4.0, 0.0, -3.0, 
+-4.0, 3.0]]], [[[1.0, -2.0, -5.0, 0.0, 5.0], [0.0, -4.0, 1.0, 1.0, -6.0], [5.0, 0.0, 1.0, 2.0, -6.0], [0.0, 0.0, 7.0, -6.0, 
+1.0]], [[-2.0, -7.0, 4.0, 4.0, -7.0], [1.0, -1.0, -4.0, 6.0, 1.0], [0.0, 4.0, 6.0, 0.0, -2.0], [4.0, 5.0, 5.0, 3.0, 1.0]], 
+[[-6.0, 4.0, 5.0, 0.0, -4.0], [1.0, -2.0, -6.0, -4.0, 0.0], [-6.0, 6.0, 1.0, 0.0, -4.0], [7.0, 6.0, 2.0, -3.0, 
+5.0]]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-7.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[4.0, -4.0, 3.0, 2.0, 3.0], [-6.0, 3.0, 0.0, 0.0, 1.0], [0.0, 4.0, -5.0, -5.0, 0.0], [-4.0, 
+4.0, -6.0, -5.0, -7.0]], [[-5.0, 4.0, 0.0, 6.0, -6.0], [-3.0, -2.0, 1.0, -2.0, 7.0], [7.0, -1.0, 2.0, 4.0, 0.0], [-6.0, 3.0, 
+5.0, -6.0, 5.0]], [[0.0, -5.0, -1.0, 7.0, -4.0], [-6.0, -7.0, -7.0, 4.0, 0.0], [0.0, 7.0, 2.0, 6.0, -6.0], [6.0, 0.0, 6.0, 
+-4.0, -1.0]]], [[[3.0, 1.0, 2.0, 5.0, 0.0], [1.0, 4.0, -3.0, -5.0, -4.0], [-5.0, 4.0, -3.0, 1.0, -1.0], [4.0, -4.0, 3.0, -1.0, 
+-6.0]], [[0.0, 6.0, -6.0, 1.0, 2.0], [-5.0, -4.0, -1.0, 0.0, 1.0], [-7.0, -6.0, 2.0, 0.0, -7.0], [-2.0, 0.0, -7.0, -5.0, 
+-4.0]], [[-1.0, 6.0, 6.0, -5.0, 2.0], [0.0, 1.0, 6.0, -7.0, -5.0], [7.0, -4.0, 6.0, 1.0, -7.0], [5.0, 6.0, 3.0, 4.0, 
+4.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -5.0, -1.0, 2.0, 3.0], [-6.0, 5.0, -1.0, 3.0, 7.0], [-6.0, 0.0, 0.0, -6.0, 3.0], 
+[-7.0, -3.0, 6.0, 6.0, -4.0]], [[-1.0, 0.0, -3.0, -5.0, 0.0], [2.0, -4.0, 2.0, 0.0, -3.0], [5.0, 5.0, -6.0, -3.0, 6.0], [3.0, 
+-7.0, 2.0, -5.0, 5.0]], [[1.0, -1.0, 6.0, 3.0, -1.0], [7.0, 6.0, 5.0, 3.0, -4.0], [6.0, -2.0, 0.0, -6.0, 7.0], [3.0, 0.0, 1.0, 
+-2.0, -2.0]]], [[[7.0, 6.0, 2.0, 4.0, 4.0], [-7.0, -7.0, 6.0, 2.0, 7.0], [5.0, -3.0, -1.0, -3.0, 2.0], [-1.0, -4.0, 3.0, 5.0, 
+6.0]], [[5.0, 7.0, -2.0, -3.0, 3.0], [-5.0, 2.0, 1.0, 6.0, 2.0], [6.0, 4.0, 2.0, 0.0, 0.0], [-4.0, 0.0, -7.0, 1.0, 0.0]], 
+[[5.0, 0.0, 0.0, -4.0, -6.0], [-3.0, -6.0, 0.0, 0.0, -2.0], [1.0, 4.0, -4.0, 5.0, 1.0], [3.0, -6.0, 0.0, 4.0, -5.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[3.0, -9.0], [3.0, -0.0]], [[3.0, 6.0], [-3.0, -0.0]], [[15.0, -6.0], [9.0, -0.0]], [[-15.0, 
-6.0], [12.0, -0.0]], [[15.0, -18.0], [-18.0, 18.0]], [[-15.0, -9.0], [21.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[7.0, -21.0], 
-[7.0, -0.0]], [[7.0, 14.0], [-7.0, -0.0]], [[35.0, -14.0], [21.0, -0.0]], [[-35.0, 14.0], [28.0, -0.0]], [[35.0, -42.0], 
-[-42.0, 42.0]], [[-35.0, -21.0], [49.0, -28.0]]])
+      ref=msk_ref*numpy.array([[[[40.0, -66.0, -24.0, -18.0, 27.0], [44.0, 24.0, -37.0, 47.0, -26.0], [-82.0, 36.0, -54.0, 
+-34.0, 61.0], [18.0, -65.0, -36.0, 36.0, -49.0]], [[-57.0, 5.0, 50.0, 20.0, -69.0], [12.0, -20.0, 23.0, -20.0, 27.0], [136.0, 
+20.0, 51.0, 63.0, 5.0], [14.0, 41.0, 126.0, 14.0, 109.0]], [[-11.0, 11.0, -7.0, -8.0, 3.0], [-64.0, -68.0, -2.0, 16.0, -7.0], 
+[25.0, -17.0, 58.0, 27.0, -94.0], [35.0, 51.0, -3.0, -18.0, 16.0]], [[18.0, 33.0, -13.0, -39.0, 46.0], [4.0, 29.0, 29.0, -16.0, 
+-8.0], [-42.0, -49.0, -16.0, -48.0, 2.0], [-34.0, 2.0, -80.0, 2.0, -35.0]], [[61.0, -122.0, 32.0, 43.0, 3.0], [10.0, 30.0, 
+-73.0, 35.0, -46.0], [-46.0, 131.0, -70.0, -8.0, 42.0], [68.0, -50.0, 34.0, 15.0, -74.0]]], [[[15.0, 31.0, 19.0, -45.0, 44.0], 
+[13.0, 58.0, 54.0, -35.0, 0.0], [0.0, -43.0, -26.0, -61.0, 28.0], [-55.0, 22.0, -70.0, 7.0, -21.0]], [[17.0, -26.0, -1.0, 
+-51.0, 37.0], [16.0, 29.0, 26.0, 24.0, 7.0], [-8.0, -15.0, -31.0, -57.0, 49.0], [-42.0, 7.0, -68.0, 20.0, -12.0]], [[7.0, 
+-45.0, -17.0, -1.0, -9.0], [57.0, 23.0, -23.0, 33.0, 5.0], [-33.0, 28.0, -40.0, -10.0, 81.0], [-6.0, -58.0, 9.0, 30.0, -1.0]], 
+[[24.0, -18.0, -52.0, 52.0, 7.0], [-62.0, -34.0, -55.0, 37.0, 18.0], [-82.0, 18.0, -26.0, -4.0, -33.0], [-16.0, -19.0, -56.0, 
+-68.0, -75.0]], [[-41.0, 55.0, -17.0, -64.0, 6.0], [34.0, 9.0, 69.0, -4.0, 44.0], [44.0, -90.0, 22.0, -26.0, 41.0], [-78.0, 
+25.0, -40.0, 21.0, 68.0]]], [[[29.0, -78.0, -12.0, 142.0, -43.0], [-91.0, -22.0, -96.0, 37.0, 45.0], [-39.0, 117.0, -64.0, 
+22.0, -5.0], [-20.0, -16.0, 17.0, -116.0, -90.0]], [[-26.0, 90.0, -1.0, -50.0, 13.0], [22.0, -11.0, 46.0, -50.0, -31.0], [14.0, 
+-82.0, 65.0, 19.0, -58.0], [30.0, 16.0, 8.0, 37.0, 45.0]], [[7.0, 20.0, -16.0, 55.0, -1.0], [-86.0, -31.0, -21.0, -6.0, 23.0], 
+[-19.0, 2.0, 2.0, 7.0, -68.0], [-23.0, 31.0, -33.0, -82.0, -49.0]], [[8.0, 16.0, -15.0, -54.0, 23.0], [74.0, 13.0, 2.0, -6.0, 
+-57.0], [-52.0, -28.0, 13.0, 1.0, 10.0], [60.0, -54.0, 6.0, 77.0, 9.0]], [[-9.0, -42.0, -39.0, -52.0, 3.0], [49.0, -25.0, -9.0, 
+68.0, 2.0], [-19.0, -11.0, 5.0, -5.0, 48.0], [10.0, -35.0, -11.0, 55.0, 38.0]]], [[[8.0, 74.0, 22.0, -77.0, 56.0], [13.0, 25.0, 
+63.0, -59.0, -52.0], [0.0, -77.0, 36.0, -29.0, -53.0], [21.0, 33.0, -46.0, 42.0, 1.0]], [[-21.0, 78.0, 6.0, -7.0, 4.0], [-34.0, 
+-20.0, 34.0, -48.0, -4.0], [28.0, -57.0, 52.0, 18.0, -77.0], [2.0, 45.0, -2.0, -19.0, 19.0]], [[46.0, 40.0, 8.0, -3.0, 53.0], 
+[-9.0, 46.0, 4.0, -55.0, -51.0], [-77.0, -16.0, -26.0, -36.0, -38.0], [16.0, -13.0, -59.0, -9.0, -87.0]], [[-7.0, 6.0, -38.0, 
+-36.0, 22.0], [-9.0, -5.0, 25.0, 35.0, 44.0], [-12.0, -50.0, -12.0, -43.0, 30.0], [-77.0, 14.0, -84.0, -15.0, 2.0]], [[-21.0, 
+42.0, 5.0, -16.0, -12.0], [17.0, -32.0, 4.0, -26.0, -41.0], [16.0, -24.0, 63.0, 50.0, -61.0], [75.0, -1.0, 60.0, 38.0, 
+44.0]]]])+(1.-msk_ref)*numpy.array([[[[-33.0, -2.0, 22.0, 64.0, 32.0], [6.0, 42.0, -14.0, -16.0, 33.0], [-48.0, -68.0, 61.0, 
+0.0, -56.0], [-28.0, 84.0, -4.0, 10.0, 7.0]], [[-51.0, -49.0, 10.0, -35.0, -65.0], [90.0, -49.0, 13.0, -46.0, -90.0], [23.0, 
+23.0, -70.0, 5.0, 54.0], [93.0, -56.0, 42.0, -60.0, 9.0]], [[23.0, -13.0, 20.0, -27.0, -41.0], [34.0, 58.0, 1.0, 35.0, -51.0], 
+[29.0, 34.0, -1.0, 1.0, 34.0], [12.0, -6.0, -33.0, -2.0, -76.0]], [[29.0, 23.0, -34.0, -13.0, 23.0], [-71.0, -4.0, -27.0, 15.0, 
+48.0], [-28.0, 16.0, 20.0, 24.0, -41.0], [-51.0, 8.0, -25.0, 36.0, -8.0]], [[9.0, -39.0, 69.0, 108.0, 27.0], [17.0, 44.0, 33.0, 
+-8.0, 48.0], [-39.0, -99.0, 33.0, -65.0, 14.0], [-13.0, 37.0, 75.0, 40.0, -2.0]]], [[[27.0, -6.0, -48.0, -20.0, 16.0], [-81.0, 
+-26.0, -38.0, -3.0, 56.0], [-59.0, 22.0, -2.0, 23.0, -36.0], [-50.0, -18.0, 10.0, 43.0, -7.0]], [[-26.0, -42.0, -24.0, 4.0, 
+6.0], [-13.0, 41.0, -54.0, -17.0, 20.0], [-85.0, -7.0, 28.0, 17.0, -47.0], [-40.0, 40.0, 3.0, 12.0, -33.0]], [[-61.0, -5.0, 
+7.0, 38.0, 21.0], [31.0, 2.0, -9.0, -37.0, 4.0], [-29.0, -49.0, 27.0, 3.0, -39.0], [6.0, 55.0, 7.0, -27.0, 42.0]], [[39.0, 
+30.0, 8.0, 22.0, 52.0], [-24.0, 66.0, 22.0, 56.0, 39.0], [32.0, -6.0, 33.0, -56.0, 22.0], [-52.0, 18.0, -20.0, 12.0, 3.0]], 
+[[-59.0, -12.0, -63.0, -67.0, -20.0], [6.0, -20.0, -62.0, -33.0, -35.0], [-39.0, 51.0, -10.0, 63.0, -49.0], [4.0, 9.0, -38.0, 
+-42.0, 1.0]]], [[[50.0, -12.0, 33.0, 59.0, 70.0], [-2.0, 62.0, 66.0, 52.0, 56.0], [39.0, -33.0, -5.0, -141.0, 98.0], [-39.0, 
+-33.0, 72.0, 9.0, 38.0]], [[18.0, 55.0, -15.0, -52.0, -37.0], [-22.0, -65.0, -1.0, 3.0, -31.0], [48.0, 44.0, -16.0, 72.0, 
+-23.0], [31.0, -21.0, -60.0, 2.0, -6.0]], [[72.0, 20.0, -6.0, -14.0, 28.0], [-43.0, 30.0, 28.0, 62.0, 31.0], [45.0, 34.0, 
+-11.0, -55.0, 57.0], [-39.0, -46.0, 0.0, 24.0, -10.0]], [[-24.0, 49.0, 17.0, 18.0, -11.0], [2.0, -37.0, -3.0, -23.0, -9.0], 
+[10.0, -32.0, 34.0, 66.0, -67.0], [23.0, 55.0, -50.0, 2.0, 14.0]], [[-97.0, -25.0, 12.0, 13.0, -21.0], [84.0, 57.0, -43.0, 
+-39.0, -58.0], [-41.0, -31.0, 48.0, 43.0, -61.0], [22.0, 98.0, -44.0, -53.0, -21.0]]], [[[54.0, 32.0, -23.0, -37.0, -26.0], 
+[-75.0, -46.0, -22.0, 12.0, 19.0], [-8.0, 37.0, -2.0, 68.0, -39.0], [-16.0, -21.0, -38.0, 55.0, -42.0]], [[52.0, 35.0, -19.0, 
+-54.0, -21.0], [-37.0, -38.0, 11.0, 30.0, -11.0], [51.0, 59.0, -32.0, 21.0, 24.0], [7.0, -57.0, -29.0, 14.0, -15.0]], [[102.0, 
+65.0, -8.0, 17.0, 43.0], [-125.0, -42.0, 23.0, 44.0, 97.0], [16.0, -2.0, 13.0, -2.0, -14.0], [-60.0, -28.0, -5.0, 87.0, 11.0]], 
+[[-34.0, -21.0, -44.0, -29.0, 13.0], [-4.0, 52.0, -55.0, 0.0, 0.0], [-51.0, 26.0, 24.0, 15.0, -37.0], [-41.0, 36.0, -31.0, 
+-19.0, -21.0]], [[5.0, 40.0, 27.0, -17.0, -44.0], [28.0, -43.0, 26.0, -1.0, -52.0], [65.0, 10.0, -13.0, 43.0, 4.0], [58.0, 
+-9.0, -39.0, -11.0, -6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-         arg0=arg0*1j
-         arg1=arg1*1j
-         ref=-ref
-         res=generalTensorProduct(arg0,arg1,axis_offset=0)
-         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-         self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-         self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")         
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[[[-5.0, 0.0, 6.0], [-2.0, 7.0, -1.0]], [[-3.0, -3.0, -1.0], [4.0, 6.0, 0.0]]], [[[-6.0, 3.0, 7.0], 
-[-3.0, -1.0, 0.0]], [[2.0, -2.0, -5.0], [-4.0, 7.0, 6.0]]], [[[0.0, -1.0, 1.0], [5.0, 7.0, -1.0]], [[-6.0, -4.0, 0.0], [-7.0, 
-1.0, -1.0]]], [[[7.0, -4.0, -5.0], [1.0, -6.0, -4.0]], [[1.0, 4.0, -7.0], [-1.0, -1.0, 5.0]]], [[[4.0, -1.0, 0.0], [3.0, -2.0, 
-6.0]], [[4.0, -3.0, 4.0], [3.0, 1.0, 4.0]]], [[[-5.0, 4.0, -6.0], [0.0, 0.0, 2.0]], [[-1.0, 0.0, 7.0], [-4.0, 1.0, 2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-3.0, -3.0, -4.0])+(1.-msk_arg1)*numpy.array([3.0, -2.0, 6.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_transposed_tensor_mult_expandedData_rank2_array_rank1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[1.0, 0.0], [-1.0, -7.0], [1.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 7.0], [5.0, -7.0], 
+[-1.0, 4.0]])
+      arg1=numpy.array([-5.0, 1.0, -4.0])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-9.0, -11.0], [22.0, -30.0]], [[-19.0, 12.0], [20.0, -33.0]], [[-1.0, -32.0], [30.0, 22.0]], 
-[[11.0, 31.0], [13.0, -14.0]], [[-9.0, -27.0], [-19.0, -28.0]], [[27.0, -8.0], [-25.0, 
-1.0]]])+(1.-msk_ref)*numpy.array([[[21.0, -26.0], [-9.0, 0.0]], [[18.0, -7.0], [-20.0, 10.0]], [[8.0, -5.0], [-10.0, -29.0]], 
-[[-1.0, -9.0], [-47.0, 29.0]], [[14.0, 49.0], [42.0, 31.0]], [[-59.0, 12.0], [39.0, -2.0]]])
+      ref=msk_ref*numpy.array([-10.0, -35.0])+(1.-msk_ref)*numpy.array([39.0, -58.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=transposed_tensor_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank3_expandedData_rank1_offset0(self):
-      arg0=numpy.array([[[-1.0, 3.0], [-5.0, 5.0]], [[0.0, -1.0], [-2.0, 4.0]], [[-5.0, 5.0], [-7.0, 3.0]], [[-5.0, -4.0], 
-[4.0, -5.0]], [[5.0, -3.0], [1.0, 2.0]], [[-2.0, -6.0], [6.0, 4.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([3.0, 1.0])+(1.-msk_arg1)*numpy.array([5.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_transposed_tensor_mult_expandedData_rank2_array_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-1.0, 1.0], [-2.0, 7.0], [6.0, 0.0]])+(1.-msk_arg0)*numpy.array([[5.0, -7.0], [-3.0, 6.0], 
+[1.0, 0.0]])
+      arg1=numpy.array([[-3.0, -6.0], [-7.0, 5.0], [-1.0, 3.0]])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-3.0, -1.0], [9.0, 3.0]], [[-15.0, -5.0], [15.0, 5.0]]], [[[0.0, 0.0], [-3.0, -1.0]], [[-6.0, 
--2.0], [12.0, 4.0]]], [[[-15.0, -5.0], [15.0, 5.0]], [[-21.0, -7.0], [9.0, 3.0]]], [[[-15.0, -5.0], [-12.0, -4.0]], [[12.0, 
-4.0], [-15.0, -5.0]]], [[[15.0, 5.0], [-9.0, -3.0]], [[3.0, 1.0], [6.0, 2.0]]], [[[-6.0, -2.0], [-18.0, -6.0]], [[18.0, 6.0], 
-[12.0, 4.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, 0.0], [15.0, 0.0]], [[-25.0, 0.0], [25.0, 0.0]]], [[[0.0, 0.0], [-5.0, 
-0.0]], [[-10.0, 0.0], [20.0, 0.0]]], [[[-25.0, 0.0], [25.0, 0.0]], [[-35.0, 0.0], [15.0, 0.0]]], [[[-25.0, 0.0], [-20.0, 0.0]], 
-[[20.0, 0.0], [-25.0, 0.0]]], [[[25.0, 0.0], [-15.0, 0.0]], [[5.0, 0.0], [10.0, 0.0]]], [[[-10.0, 0.0], [-30.0, 0.0]], [[30.0, 
-0.0], [20.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[11.0, 14.0], [-52.0, 29.0]])+(1.-msk_ref)*numpy.array([[5.0, -42.0], [-21.0, 72.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[[[6.0, 3.0, 4.0], [-7.0, 2.0, 7.0]], [[5.0, 3.0, -4.0], [7.0, -6.0, 6.0]]], [[[-4.0, 6.0, 0.0], [0.0, 
--2.0, 0.0]], [[3.0, 3.0, 7.0], [-1.0, -5.0, 5.0]]], [[[6.0, 7.0, -1.0], [2.0, 5.0, 6.0]], [[0.0, -4.0, -5.0], [-5.0, 3.0, 
--3.0]]], [[[7.0, 5.0, -6.0], [0.0, -4.0, 3.0]], [[0.0, 3.0, 2.0], [7.0, 0.0, 6.0]]], [[[4.0, 0.0, 0.0], [-7.0, -5.0, -4.0]], 
-[[-2.0, 2.0, -7.0], [2.0, 5.0, 0.0]]], [[[2.0, 5.0, 3.0], [5.0, -5.0, 1.0]], [[-4.0, -1.0, 4.0], [5.0, -2.0, -2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, -2.0], [7.0, -4.0], [0.0, 2.0]])+(1.-msk_arg1)*numpy.array([[2.0, 7.0], [-4.0, -2.0], 
-[-3.0, -4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_transposed_tensor_mult_expandedData_rank2_constData_rank1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-1.0, 4.0], [0.0, 0.0], [-5.0, -2.0]])+(1.-msk_arg0)*numpy.array([[2.0, -3.0], [-5.0, -5.0], 
+[-4.0, 5.0]])
+      arg1=Data(numpy.array([0.0, 4.0, -4.0]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-21.0, -16.0], [63.0, 20.0]], [[-14.0, -30.0], [-91.0, 22.0]]], [[[70.0, -16.0], [-14.0, 
-8.0]], [[0.0, -4.0], [-28.0, 32.0]]], [[[7.0, -42.0], [21.0, -12.0]], [[-28.0, 6.0], [56.0, -8.0]]], [[[-14.0, -46.0], [-28.0, 
-22.0]], [[21.0, -8.0], [-49.0, -2.0]]], [[[-28.0, -8.0], [14.0, 26.0]], [[28.0, -18.0], [21.0, -24.0]]], [[[21.0, -18.0], 
-[-70.0, 12.0]], [[21.0, 20.0], [-49.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 20.0], [-43.0, -81.0]], [[10.0, 45.0], 
-[20.0, 37.0]]], [[[-32.0, -40.0], [8.0, 4.0]], [[-27.0, -13.0], [3.0, -17.0]]], [[[-13.0, 32.0], [-34.0, -20.0]], [[31.0, 
-28.0], [-13.0, -29.0]]], [[[12.0, 63.0], [7.0, -4.0]], [[-18.0, -14.0], [-4.0, 25.0]]], [[[8.0, 28.0], [18.0, -23.0]], [[9.0, 
-10.0], [-16.0, 4.0]]], [[[-25.0, -8.0], [27.0, 41.0]], [[-16.0, -42.0], [24.0, 47.0]]]])
+      ref=msk_ref*numpy.array([20.0, 8.0])+(1.-msk_ref)*numpy.array([-4.0, -40.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_float_rank0_offset0(self):
-      arg0=numpy.array([[[[5.0, 0.0, 3.0, -6.0], [-1.0, 7.0, 0.0, -6.0], [-1.0, 0.0, 0.0, 6.0]], [[5.0, -1.0, 7.0, -4.0], [2.0, 
-5.0, 0.0, 1.0], [0.0, 1.0, -1.0, -5.0]]], [[[2.0, 0.0, 3.0, 6.0], [-7.0, -1.0, 0.0, -6.0], [-3.0, 5.0, -4.0, 3.0]], [[-5.0, 
--2.0, 7.0, 4.0], [0.0, 1.0, -1.0, -1.0], [6.0, -2.0, 0.0, 3.0]]], [[[-4.0, 2.0, -2.0, 7.0], [-7.0, 6.0, -5.0, -4.0], [3.0, 1.0, 
--7.0, 0.0]], [[6.0, 0.0, -4.0, 1.0], [6.0, 0.0, -2.0, -2.0], [-5.0, 5.0, -4.0, 5.0]]]])
-      arg1=6.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[30.0, 0.0, 18.0, -36.0], [-6.0, 42.0, 0.0, -36.0], [-6.0, 0.0, 0.0, 36.0]], [[30.0, -6.0, 42.0, 
--24.0], [12.0, 30.0, 0.0, 6.0], [0.0, 6.0, -6.0, -30.0]]], [[[12.0, 0.0, 18.0, 36.0], [-42.0, -6.0, 0.0, -36.0], [-18.0, 30.0, 
--24.0, 18.0]], [[-30.0, -12.0, 42.0, 24.0], [0.0, 6.0, -6.0, -6.0], [36.0, -12.0, 0.0, 18.0]]], [[[-24.0, 12.0, -12.0, 42.0], 
-[-42.0, 36.0, -30.0, -24.0], [18.0, 6.0, -42.0, 0.0]], [[36.0, 0.0, -24.0, 6.0], [36.0, 0.0, -12.0, -12.0], [-30.0, 30.0, 
--24.0, 30.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_array_rank0_offset0(self):
-      arg0=numpy.array([[[[-6.0, 0.0, -7.0, -5.0], [-6.0, 0.0, 0.0, 6.0], [-7.0, 0.0, 3.0, 7.0]], [[-7.0, -1.0, 2.0, 5.0], 
-[-3.0, 6.0, 4.0, -4.0], [0.0, 3.0, -2.0, -3.0]]], [[[-6.0, 6.0, 6.0, 1.0], [4.0, 3.0, 2.0, 3.0], [6.0, 7.0, -7.0, -3.0]], 
-[[-5.0, 4.0, -5.0, 0.0], [-2.0, 6.0, -1.0, -2.0], [-1.0, 4.0, 5.0, -6.0]]], [[[-3.0, -1.0, -5.0, -7.0], [5.0, 5.0, 0.0, -3.0], 
-[-1.0, 6.0, -6.0, -2.0]], [[1.0, -1.0, 5.0, 2.0], [-5.0, 6.0, 1.0, -2.0], [6.0, -6.0, 3.0, -3.0]]]])
-      arg1=numpy.array(-1.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[6.0, -0.0, 7.0, 5.0], [6.0, -0.0, -0.0, -6.0], [7.0, -0.0, -3.0, -7.0]], [[7.0, 1.0, -2.0, -5.0], 
-[3.0, -6.0, -4.0, 4.0], [-0.0, -3.0, 2.0, 3.0]]], [[[6.0, -6.0, -6.0, -1.0], [-4.0, -3.0, -2.0, -3.0], [-6.0, -7.0, 7.0, 3.0]], 
-[[5.0, -4.0, 5.0, -0.0], [2.0, -6.0, 1.0, 2.0], [1.0, -4.0, -5.0, 6.0]]], [[[3.0, 1.0, 5.0, 7.0], [-5.0, -5.0, -0.0, 3.0], 
-[1.0, -6.0, 6.0, 2.0]], [[-1.0, 1.0, -5.0, -2.0], [5.0, -6.0, -1.0, 2.0], [-6.0, 6.0, -3.0, 3.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_constData_rank0_offset0(self):
-      arg0=numpy.array([[[[1.0, 1.0, -5.0, 6.0], [1.0, 6.0, 7.0, 0.0], [2.0, -6.0, -5.0, 5.0]], [[0.0, -2.0, 0.0, 2.0], [3.0, 
--3.0, -6.0, -4.0], [-2.0, 0.0, -4.0, 2.0]]], [[[0.0, 1.0, 4.0, -4.0], [-6.0, -3.0, -6.0, 3.0], [0.0, -1.0, -2.0, 5.0]], [[6.0, 
--1.0, 6.0, 4.0], [0.0, 3.0, 0.0, 7.0], [-1.0, 6.0, -1.0, 5.0]]], [[[-2.0, -4.0, -3.0, -7.0], [0.0, -2.0, -3.0, 5.0], [3.0, 
--2.0, 1.0, 0.0]], [[-2.0, 7.0, -5.0, -6.0], [1.0, -5.0, -7.0, -6.0], [-1.0, 5.0, -2.0, 3.0]]]])
-      arg1=Data(6.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[6.0, 6.0, -30.0, 36.0], [6.0, 36.0, 42.0, 0.0], [12.0, -36.0, -30.0, 30.0]], [[0.0, -12.0, 0.0, 
-12.0], [18.0, -18.0, -36.0, -24.0], [-12.0, 0.0, -24.0, 12.0]]], [[[0.0, 6.0, 24.0, -24.0], [-36.0, -18.0, -36.0, 18.0], [0.0, 
--6.0, -12.0, 30.0]], [[36.0, -6.0, 36.0, 24.0], [0.0, 18.0, 0.0, 42.0], [-6.0, 36.0, -6.0, 30.0]]], [[[-12.0, -24.0, -18.0, 
--42.0], [0.0, -12.0, -18.0, 30.0], [18.0, -12.0, 6.0, 0.0]], [[-12.0, 42.0, -30.0, -36.0], [6.0, -30.0, -42.0, -36.0], [-6.0, 
-30.0, -12.0, 18.0]]]]),self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank2_constData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, 2.0], [4.0, -6.0], [4.0, 1.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0], [2.0, 4.0], 
+[2.0, -7.0]])
+      arg1=Data(numpy.array([[7.0, -2.0], [4.0, 2.0], [7.0, -7.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[2.0, -8.0], [-3.0, -23.0]])+(1.-msk_ref)*numpy.array([[22.0, -10.0], [9.0, 45.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_array_rank4_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[[[-1.0, 2.0, 0.0, -7.0], [3.0, 1.0, 3.0, 7.0], [2.0, 4.0, 0.0, -2.0]], [[2.0, 0.0, 7.0, -5.0], [-1.0, 
-0.0, -3.0, -3.0], [0.0, -1.0, -7.0, 2.0]]], [[[0.0, 4.0, -2.0, 4.0], [-1.0, 6.0, -7.0, 2.0], [0.0, -1.0, 5.0, 0.0]], [[-3.0, 
-3.0, 1.0, 5.0], [3.0, -5.0, -1.0, 0.0], [5.0, 0.0, 5.0, 0.0]]], [[[-6.0, -3.0, -4.0, -3.0], [0.0, -7.0, -3.0, -7.0], [3.0, 0.0, 
-0.0, 3.0]], [[-2.0, 3.0, 7.0, -4.0], [0.0, 3.0, 4.0, -1.0], [3.0, 2.0, 4.0, 4.0]]]])
+   def test_transposed_tensor_mult_expandedData_rank2_expandedData_rank1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 2.0], [0.0, 2.0], [6.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -4.0], [-6.0, 3.0], 
+[-3.0, 2.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(0.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([1.0, -2.0, 7.0])+(1.-msk_arg1)*numpy.array([0.0, 5.0, 1.0])
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, 0.0, 0.0, -0.0], 
-[-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]], 
-[[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, -0.0, -0.0], 
-[0.0, 0.0, 0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, 0.0, 0.0, 
--0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 
-0.0]], [[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 
--0.0], [0.0, 0.0, 0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0]]]])
+      ref=msk_ref*numpy.array([46.0, -37.0])+(1.-msk_ref)*numpy.array([-33.0, 17.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_float_rank0_offset0(self):
-      arg0=Data(2.0,self.functionspace)
-      arg1=4.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(8.0,self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank2_expandedData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, 0.0], [-4.0, 4.0], [-7.0, 1.0]])+(1.-msk_arg0)*numpy.array([[1.0, 3.0], [-6.0, 6.0], 
+[-7.0, -1.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-4.0, 1.0], [-3.0, 0.0], [2.0, 0.0]])+(1.-msk_arg1)*numpy.array([[4.0, -3.0], [-3.0, -3.0], 
+[2.0, 0.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-14.0, 3.0], [-10.0, 0.0]])+(1.-msk_ref)*numpy.array([[8.0, 15.0], [-8.0, -27.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_array_rank0_offset0(self):
-      arg0=Data(5.0,self.functionspace)
-      arg1=numpy.array(6.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(30.0,self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_array_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[3.0, 1.0, -6.0, 0.0, -3.0], [5.0, -5.0, 5.0, -7.0, 0.0], [2.0, 5.0, -6.0, -1.0, 7.0], 
+[-3.0, 0.0, 0.0, 4.0, -1.0]], [[0.0, -5.0, -7.0, -2.0, -7.0], [5.0, 0.0, 0.0, -2.0, -4.0], [-6.0, 6.0, 3.0, 0.0, 0.0], [2.0, 
+2.0, 6.0, 0.0, -7.0]], [[-3.0, 7.0, 2.0, 0.0, -3.0], [-5.0, -3.0, -1.0, -4.0, 5.0], [4.0, -3.0, -3.0, -3.0, 1.0], [-7.0, 3.0, 
+0.0, -1.0, 1.0]]], [[[5.0, -1.0, 6.0, -3.0, 1.0], [1.0, 3.0, -5.0, 6.0, 5.0], [1.0, 0.0, -2.0, -3.0, 0.0], [-1.0, 5.0, 6.0, 
+2.0, 4.0]], [[7.0, 5.0, -3.0, -5.0, 6.0], [-4.0, 5.0, 6.0, -4.0, 0.0], [-5.0, -5.0, -3.0, -1.0, -2.0], [0.0, 7.0, -4.0, -4.0, 
+0.0]], [[-7.0, 7.0, -4.0, 0.0, 0.0], [-2.0, -3.0, 3.0, 3.0, -1.0], [-2.0, 1.0, 6.0, 5.0, -2.0], [-3.0, 2.0, -6.0, 6.0, 
+4.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, 4.0, 0.0, -3.0, 6.0], [6.0, 2.0, 3.0, -2.0, -2.0], [-3.0, -1.0, 3.0, -4.0, -3.0], 
+[3.0, -4.0, -7.0, -5.0, 6.0]], [[-5.0, -6.0, 4.0, -7.0, -2.0], [-4.0, 4.0, 1.0, 7.0, 2.0], [7.0, -3.0, -4.0, -1.0, -5.0], [1.0, 
+4.0, -2.0, -6.0, 4.0]], [[-4.0, 2.0, 4.0, 0.0, -1.0], [-1.0, 3.0, 0.0, -3.0, -7.0], [-2.0, -1.0, 6.0, -7.0, -4.0], [-2.0, 5.0, 
+7.0, -5.0, -4.0]]], [[[7.0, -1.0, 4.0, -4.0, -1.0], [2.0, -1.0, -5.0, 7.0, 0.0], [5.0, 0.0, -7.0, 3.0, 3.0], [4.0, -2.0, 4.0, 
+-3.0, 2.0]], [[6.0, 0.0, -3.0, -7.0, 1.0], [-4.0, -6.0, -7.0, 6.0, -3.0], [-3.0, -3.0, -3.0, 1.0, 5.0], [-3.0, 7.0, -3.0, -4.0, 
+-3.0]], [[6.0, 0.0, 6.0, -6.0, -5.0], [4.0, 7.0, 1.0, -3.0, 5.0], [4.0, -7.0, 0.0, 1.0, 0.0], [-4.0, 5.0, 4.0, -3.0, 2.0]]]])
+      arg1=numpy.array([[-1.0, -3.0, -7.0], [7.0, 5.0, -3.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[109.0, -38.0, 52.0, -40.0, 82.0], [8.0, 81.0, -12.0, 54.0, 15.0], [-24.0, -30.0, -29.0, -19.0, 
+-18.0], [48.0, 37.0, 22.0, -21.0, 31.0]])+(1.-msk_ref)*numpy.array([[98.0, -7.0, -45.0, -21.0, 20.0], [-5.0, -93.0, -79.0, 
+90.0, 15.0], [4.0, 23.0, -97.0, 79.0, 92.0], [33.0, -37.0, -35.0, 26.0, 3.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank1_offset1(self):
-      arg0=Data(numpy.array([-7.0, -7.0, 5.0]),self.functionspace)
-      arg1=numpy.array([-6.0, -1.0, 7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(84.0,self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_array_rank3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[3.0, -3.0, 6.0, -2.0, -1.0], [7.0, 3.0, 3.0, -1.0, 0.0], [0.0, 0.0, -7.0, 0.0, 3.0], [-5.0, 
+2.0, 6.0, 5.0, -7.0]], [[0.0, -4.0, 3.0, 1.0, 3.0], [0.0, 5.0, 0.0, 0.0, 2.0], [-4.0, -5.0, -3.0, 0.0, 4.0], [-5.0, 7.0, 1.0, 
+-7.0, 0.0]], [[-4.0, -7.0, -3.0, -4.0, 5.0], [-6.0, -3.0, -3.0, -4.0, 0.0], [-2.0, 6.0, 0.0, -6.0, 6.0], [0.0, 0.0, -6.0, -6.0, 
+3.0]]], [[[4.0, 0.0, 0.0, 2.0, 3.0], [4.0, -2.0, -2.0, -4.0, 1.0], [0.0, -1.0, -3.0, 6.0, 3.0], [-3.0, -3.0, 2.0, -5.0, -1.0]], 
+[[5.0, -2.0, 0.0, 1.0, 2.0], [-1.0, 3.0, 4.0, -2.0, -7.0], [4.0, -4.0, -1.0, -6.0, 2.0], [-2.0, 4.0, -2.0, 3.0, 7.0]], [[5.0, 
+-5.0, -3.0, 7.0, -3.0], [-5.0, -4.0, -4.0, 7.0, 7.0], [3.0, 1.0, 0.0, 2.0, 4.0], [0.0, -4.0, 4.0, -1.0, 
+3.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 1.0, 1.0, -5.0, -6.0], [-5.0, 1.0, -3.0, -2.0, 0.0], [-1.0, -1.0, 0.0, 5.0, 4.0], 
+[1.0, 0.0, 2.0, -6.0, -7.0]], [[7.0, 6.0, -7.0, 4.0, -2.0], [-6.0, 5.0, -4.0, -3.0, -6.0], [0.0, -3.0, -7.0, -2.0, -2.0], [7.0, 
+4.0, 5.0, 0.0, 4.0]], [[3.0, 5.0, 7.0, -7.0, -4.0], [1.0, 2.0, 3.0, 6.0, -3.0], [2.0, 5.0, -5.0, 5.0, 7.0], [-7.0, 3.0, 0.0, 
+1.0, -6.0]]], [[[5.0, 7.0, 4.0, 7.0, -1.0], [-7.0, 1.0, 4.0, 0.0, -2.0], [1.0, 2.0, 2.0, 0.0, -2.0], [-7.0, -1.0, 0.0, -2.0, 
+-4.0]], [[6.0, -4.0, -7.0, 7.0, 6.0], [-5.0, -1.0, 0.0, -3.0, 4.0], [3.0, -3.0, 0.0, 4.0, -1.0], [-6.0, -1.0, 0.0, 2.0, -1.0]], 
+[[-3.0, 7.0, 2.0, 3.0, -7.0], [6.0, 7.0, 4.0, 3.0, 5.0], [-3.0, 5.0, 5.0, -7.0, -1.0], [-6.0, 3.0, -4.0, -7.0, 1.0]]]])
+      arg1=numpy.array([[[-2.0, 1.0], [0.0, -2.0], [-6.0, -7.0]], [[4.0, 4.0], [-6.0, 6.0], [-7.0, -4.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-31.0, 57.0], [95.0, 62.0], [27.0, 33.0], [-19.0, 10.0], [-7.0, -6.0]], [[79.0, 79.0], [14.0, 
+40.0], [8.0, 56.0], [-27.0, -29.0], [-3.0, -70.0]], [[-33.0, 34.0], [-23.0, -64.0], [8.0, -19.0], [82.0, 22.0], [-70.0, 
+-39.0]], [[10.0, -19.0], [-12.0, 16.0], [16.0, 26.0], [-5.0, 63.0], [-71.0, -2.0]]])+(1.-msk_ref)*numpy.array([[[-13.0, 33.0], 
+[-29.0, -70.0], [0.0, -68.0], [17.0, 94.0], [45.0, 86.0]], [[-36.0, -82.0], [-53.0, -53.0], [-24.0, -16.0], [-35.0, -68.0], 
+[-49.0, 29.0]], [[-3.0, 19.0], [-37.0, -60.0], [3.0, 37.0], [-15.0, 26.0], [-45.0, -51.0]], [[90.0, -4.0], [-37.0, -51.0], 
+[24.0, 8.0], [35.0, 19.0], [33.0, 1.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=transposed_tensor_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[1.0, -3.0, 5.0], [-1.0, 0.0, -2.0]]),self.functionspace)
-      arg1=numpy.array([[-5.0, -3.0, 3.0], [5.0, -7.0, -2.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(18.0,self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_array_rank4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-6.0, 4.0, -4.0, 7.0, -7.0], [-4.0, -6.0, 7.0, 0.0, -5.0], [6.0, 3.0, -7.0, 0.0, 6.0], 
+[3.0, 7.0, 2.0, -5.0, -4.0]], [[-6.0, 0.0, 1.0, -3.0, -2.0], [0.0, 7.0, 1.0, 5.0, 7.0], [1.0, 7.0, 1.0, 2.0, 4.0], [-1.0, 2.0, 
+-5.0, -5.0, 3.0]], [[1.0, 3.0, 0.0, 1.0, -3.0], [6.0, -4.0, 2.0, 0.0, 7.0], [6.0, 2.0, 0.0, -5.0, -4.0], [5.0, -4.0, 2.0, -5.0, 
+0.0]]], [[[5.0, 4.0, 2.0, -2.0, 2.0], [-6.0, -3.0, -6.0, 7.0, -5.0], [6.0, -7.0, 4.0, -7.0, -3.0], [-2.0, 6.0, 5.0, -5.0, 
+-3.0]], [[6.0, -4.0, -7.0, 1.0, 0.0], [-3.0, 0.0, 7.0, 0.0, 5.0], [2.0, 4.0, -2.0, 7.0, 2.0], [1.0, -4.0, 5.0, 0.0, -2.0]], 
+[[2.0, -7.0, 5.0, 0.0, 5.0], [-5.0, 3.0, -6.0, -2.0, 0.0], [0.0, 7.0, -5.0, -2.0, 0.0], [0.0, -6.0, -5.0, -1.0, 
+5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 7.0, 6.0, 6.0, -3.0], [7.0, 7.0, -6.0, -1.0, -1.0], [-5.0, -4.0, 6.0, 1.0, -3.0], 
+[-4.0, -7.0, -3.0, 1.0, -4.0]], [[-7.0, 7.0, 0.0, -1.0, -5.0], [-7.0, 2.0, -2.0, 0.0, -5.0], [5.0, -1.0, 6.0, 0.0, 1.0], [-1.0, 
+6.0, 1.0, -5.0, 5.0]], [[5.0, -1.0, -2.0, 0.0, 5.0], [-1.0, -4.0, -4.0, -7.0, 0.0], [0.0, 5.0, 1.0, -1.0, 1.0], [0.0, 0.0, 5.0, 
+6.0, 3.0]]], [[[-7.0, -2.0, -7.0, -7.0, -2.0], [-6.0, 1.0, -1.0, -4.0, -2.0], [1.0, -7.0, -4.0, 6.0, -5.0], [-2.0, -5.0, -3.0, 
+0.0, -6.0]], [[7.0, 5.0, 4.0, 3.0, 2.0], [-4.0, -1.0, 4.0, 5.0, -2.0], [-4.0, -2.0, 6.0, -7.0, -2.0], [7.0, 2.0, -6.0, 4.0, 
+-2.0]], [[5.0, 6.0, -2.0, 0.0, -4.0], [-1.0, 6.0, 1.0, 3.0, -5.0], [-4.0, -7.0, -7.0, 3.0, 3.0], [-1.0, -7.0, 2.0, -6.0, 
+3.0]]]])
+      arg1=numpy.array([[[[-6.0, -4.0, -6.0, 0.0, -4.0], [2.0, 0.0, 6.0, 4.0, -4.0], [0.0, 4.0, -7.0, -6.0, 1.0], [1.0, 3.0, 
+-6.0, -3.0, 5.0]], [[0.0, -1.0, -4.0, -2.0, 5.0], [-4.0, -5.0, 5.0, 0.0, -4.0], [-1.0, 0.0, -1.0, 5.0, -1.0], [4.0, -6.0, 7.0, 
+4.0, 2.0]], [[-7.0, 0.0, 0.0, -4.0, 4.0], [4.0, 2.0, -6.0, 5.0, 0.0], [-6.0, -7.0, -1.0, 0.0, 5.0], [0.0, 0.0, 5.0, 7.0, 
+-3.0]]], [[[-3.0, -3.0, 0.0, 3.0, 3.0], [-1.0, 7.0, -5.0, -1.0, -4.0], [1.0, 4.0, 1.0, 3.0, 1.0], [7.0, 7.0, 0.0, -3.0, 6.0]], 
+[[-2.0, 2.0, -6.0, 7.0, -3.0], [0.0, -2.0, 1.0, -7.0, 4.0], [-2.0, -4.0, 0.0, -2.0, -6.0], [3.0, 2.0, -2.0, 5.0, -2.0]], 
+[[-1.0, 5.0, -1.0, 4.0, 3.0], [4.0, 0.0, 4.0, -1.0, -3.0], [-4.0, 0.0, 6.0, -4.0, -7.0], [-5.0, -3.0, -7.0, 4.0, 0.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 37.0, 22.0, 73.0, 1.0], [19.0, 55.0, -83.0, -68.0, 46.0], [-15.0, -35.0, 64.0, 1.0, 
+-40.0], [13.0, 59.0, -27.0, 24.0, -27.0]], [[-42.0, -71.0, 7.0, -56.0, -1.0], [-12.0, 42.0, -46.0, 62.0, -27.0], [22.0, 27.0, 
+-69.0, 24.0, 96.0], [55.0, 53.0, 48.0, -51.0, 43.0]], [[27.0, 20.0, 57.0, -25.0, 63.0], [6.0, 23.0, -16.0, 26.0, -39.0], [-5.0, 
+20.0, 59.0, 29.0, 4.0], [-32.0, -33.0, 10.0, -5.0, 8.0]], [[-45.0, -17.0, -36.0, 3.0, -48.0], [32.0, 1.0, 32.0, 28.0, -4.0], 
+[-7.0, 9.0, -49.0, -65.0, 7.0], [-16.0, 27.0, -60.0, -15.0, 12.0]], [[52.0, 49.0, 45.0, 42.0, 27.0], [0.0, 18.0, -24.0, -50.0, 
+13.0], [2.0, 1.0, 86.0, 18.0, -53.0], [-26.0, -10.0, -22.0, 6.0, -18.0]]], [[[11.0, 3.0, 47.0, -83.0, 16.0], [2.0, -24.0, 
+-53.0, 46.0, 43.0], [-16.0, -70.0, -14.0, 32.0, 73.0], [-30.0, -45.0, 95.0, 37.0, -68.0]], [[70.0, 41.0, 5.0, 5.0, 43.0], 
+[-41.0, -64.0, 50.0, -44.0, -1.0], [2.0, -8.0, 54.0, 50.0, -57.0], [-14.0, -90.0, 44.0, 39.0, -22.0]], [[-46.0, -27.0, -82.0, 
+-3.0, -72.0], [0.0, -57.0, 48.0, 1.0, 38.0], [-9.0, -38.0, -94.0, -45.0, 10.0], [20.0, 5.0, 3.0, 26.0, -19.0]], [[-19.0, -36.0, 
+-18.0, 3.0, 40.0], [-35.0, 24.0, -18.0, -5.0, -42.0], [10.0, 28.0, -10.0, 54.0, 16.0], [79.0, 25.0, 49.0, -9.0, 52.0]], 
+[[-14.0, 38.0, -28.0, -22.0, 53.0], [-5.0, -66.0, -7.0, -15.0, 32.0], [-64.0, -109.0, 16.0, 40.0, -12.0], [3.0, -82.0, 104.0, 
+132.0, -72.0]]], [[[-100.0, -39.0, -52.0, 6.0, 17.0], [26.0, 45.0, -23.0, 34.0, -44.0], [-35.0, -2.0, -43.0, -17.0, 29.0], 
+[58.0, 58.0, -3.0, 20.0, 46.0]], [[-26.0, 45.0, -77.0, 13.0, 19.0], [21.0, -88.0, 108.0, -6.0, -17.0], [-62.0, -46.0, 5.0, 
+-40.0, -74.0], [-41.0, -95.0, -16.0, 102.0, -27.0]], [[39.0, -14.0, 55.0, -24.0, 36.0], [-42.0, 27.0, -79.0, -13.0, 15.0], 
+[27.0, -4.0, 22.0, 83.0, 43.0], [44.0, 12.0, 88.0, -17.0, -5.0]], [[44.0, 23.0, -48.0, 36.0, -58.0], [-29.0, -83.0, 74.0, 
+-65.0, 54.0], [15.0, -21.0, -16.0, -17.0, -62.0], [-10.0, -41.0, -11.0, 21.0, -37.0]], [[-3.0, -15.0, -64.0, 13.0, -35.0], 
+[-17.0, -53.0, 97.0, -7.0, -20.0], [13.0, 32.0, -45.0, -29.0, -33.0], [7.0, -23.0, -32.0, -11.0, 28.0]]], [[[-49.0, -3.0, 
+-20.0, -17.0, -6.0], [32.0, -1.0, -6.0, 32.0, 4.0], [-33.0, -35.0, -27.0, -31.0, 21.0], [-12.0, 3.0, -2.0, 33.0, -16.0]], 
+[[-18.0, -86.0, -20.0, -22.0, -22.0], [-40.0, 32.0, 18.0, 36.0, -58.0], [60.0, 96.0, -77.0, 18.0, 57.0], [75.0, 61.0, 2.0, 
+-103.0, 95.0]], [[-46.0, -33.0, -17.0, 32.0, -40.0], [7.0, 54.0, -65.0, -17.0, 27.0], [8.0, -6.0, -36.0, -12.0, 27.0], [57.0, 
+96.0, -12.0, -22.0, 14.0]], [[81.0, 35.0, 51.0, 11.0, -43.0], [-9.0, -20.0, -4.0, -39.0, 63.0], [34.0, -5.0, 34.0, -6.0, 
+-23.0], [-55.0, -17.0, -23.0, -29.0, -50.0]], [[32.0, 43.0, 19.0, -9.0, 43.0], [3.0, -32.0, 24.0, -4.0, -7.0], [-22.0, -20.0, 
+52.0, 14.0, -33.0], [-44.0, -70.0, 14.0, 43.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[-15.0, 79.0, -1.0, 42.0, -30.0], [69.0, 
+-18.0, -21.0, -34.0, 81.0], [-64.0, -103.0, 46.0, -72.0, -55.0], [-84.0, -17.0, -55.0, 92.0, -100.0]], [[-45.0, 11.0, -106.0, 
+43.0, 0.0], [8.0, -61.0, 122.0, -16.0, -46.0], [-37.0, 7.0, -21.0, -47.0, -79.0], [6.0, -43.0, -50.0, 55.0, 30.0]], [[-7.0, 
+-5.0, -58.0, 7.0, -71.0], [3.0, -61.0, 79.0, -5.0, 26.0], [5.0, -6.0, -59.0, -57.0, -21.0], [-21.0, -17.0, -40.0, 1.0, -14.0]], 
+[[-21.0, 4.0, -50.0, 2.0, -59.0], [23.0, -50.0, 69.0, 10.0, 20.0], [-12.0, -16.0, -48.0, -68.0, -18.0], [-38.0, -19.0, -49.0, 
+14.0, -20.0]], [[-11.0, 7.0, 30.0, -18.0, -17.0], [20.0, 17.0, -77.0, 5.0, 60.0], [-15.0, -63.0, -5.0, -1.0, 41.0], [-11.0, 
+23.0, 32.0, 24.0, -56.0]]], [[[-8.0, -16.0, 11.0, -32.0, -76.0], [40.0, -1.0, 35.0, 58.0, 11.0], [19.0, 27.0, -53.0, -83.0, 
+34.0], [-70.0, 16.0, -81.0, -62.0, -4.0]], [[-21.0, -5.0, -50.0, 32.0, -10.0], [13.0, -9.0, 94.0, 8.0, -62.0], [1.0, 64.0, 
+-10.0, -51.0, -50.0], [-11.0, -4.0, -88.0, -25.0, 59.0]], [[58.0, 42.0, 19.0, 49.0, -14.0], [-15.0, -13.0, -9.0, -72.0, 49.0], 
+[13.0, -16.0, 53.0, 11.0, -56.0], [-14.0, -8.0, -13.0, 9.0, -36.0]], [[54.0, 41.0, -27.0, 63.0, -42.0], [-14.0, -52.0, 73.0, 
+-73.0, 31.0], [16.0, 9.0, 28.0, -28.0, -91.0], [-29.0, -30.0, -60.0, 3.0, -18.0]], [[21.0, -14.0, 43.0, -30.0, -36.0], [0.0, 
+15.0, -43.0, 17.0, 39.0], [27.0, -4.0, -20.0, -1.0, 49.0], [-16.0, 24.0, 10.0, -41.0, -23.0]]], [[[39.0, -16.0, 38.0, -51.0, 
+48.0], [-47.0, -10.0, -30.0, 11.0, -8.0], [20.0, 0.0, 7.0, 82.0, 43.0], [30.0, -34.0, 101.0, -4.0, -1.0]], [[21.0, -1.0, 47.0, 
+-81.0, -5.0], [-5.0, -30.0, -54.0, 37.0, 61.0], [-4.0, -71.0, -25.0, 30.0, 76.0], [-28.0, -38.0, 95.0, 26.0, -75.0]], [[-36.0, 
+-41.0, -89.0, -14.0, -41.0], [-32.0, -68.0, 58.0, -2.0, 13.0], [0.0, -23.0, -95.0, -2.0, 14.0], [55.0, -13.0, 48.0, 27.0, 
+3.0]], [[-6.0, -21.0, 33.0, -15.0, 40.0], [4.0, 54.0, -13.0, 39.0, -65.0], [14.0, 63.0, 18.0, 14.0, 23.0], [7.0, 22.0, -18.0, 
+-51.0, 58.0]], [[27.0, 37.0, 23.0, -23.0, 21.0], [11.0, -34.0, 16.0, 9.0, 11.0], [-20.0, -31.0, 32.0, 0.0, -13.0], [-55.0, 
+-63.0, 13.0, 37.0, -42.0]]], [[[17.0, 32.0, -13.0, 41.0, -19.0], [-6.0, -23.0, -16.0, -62.0, 59.0], [-11.0, -52.0, 21.0, 3.0, 
+-40.0], [4.0, -3.0, 10.0, 45.0, -48.0]], [[60.0, 6.0, 13.0, -41.0, 16.0], [-61.0, -69.0, -13.0, -30.0, 53.0], [13.0, -56.0, 
+-4.0, 81.0, 19.0], [23.0, -67.0, 129.0, 42.0, -57.0]], [[2.0, 18.0, 48.0, -65.0, 52.0], [21.0, -4.0, -26.0, 56.0, -10.0], 
+[-30.0, -35.0, 24.0, 18.0, 40.0], [-48.0, -54.0, 48.0, 35.0, -34.0]], [[-50.0, -21.0, -4.0, -10.0, -35.0], [22.0, 29.0, -75.0, 
+12.0, 50.0], [-15.0, -54.0, -44.0, -15.0, 54.0], [23.0, 59.0, 23.0, 15.0, -31.0]], [[22.0, 40.0, 13.0, -42.0, 50.0], [2.0, 
+-57.0, 23.0, 16.0, 3.0], [-37.0, -53.0, 32.0, 23.0, -9.0], [-47.0, -97.0, 57.0, 73.0, -51.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank3_offset3(self):
-      arg0=Data(numpy.array([[[6.0, -2.0, 2.0], [-5.0, -5.0, -3.0], [-7.0, 2.0, 3.0], [-5.0, 2.0, 3.0]], [[7.0, 6.0, 3.0], 
-[0.0, 1.0, 7.0], [2.0, 1.0, 2.0], [3.0, 4.0, 0.0]]]),self.functionspace)
-      arg1=numpy.array([[[-4.0, -1.0, 5.0], [-2.0, 3.0, -2.0], [0.0, 6.0, 3.0], [-6.0, -1.0, -3.0]], [[7.0, 0.0, 3.0], [-4.0, 
--5.0, 5.0], [-4.0, -4.0, 0.0], [3.0, 5.0, -4.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(134.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[2.0, 5.0], [-7.0, 6.0], [-3.0, 0.0]], [[3.0, -2.0], [0.0, 7.0], [-3.0, -6.0]]], [[[2.0, -7.0], 
-[-6.0, -1.0], [-2.0, 3.0]], [[-6.0, -4.0], [0.0, -7.0], [0.0, 1.0]]], [[[-2.0, -6.0], [-6.0, 1.0], [2.0, 1.0]], [[3.0, 0.0], 
-[-1.0, -1.0], [3.0, -3.0]]], [[[0.0, -5.0], [-2.0, -2.0], [5.0, 4.0]], [[-5.0, 4.0], [-2.0, 0.0], [-1.0, 
--1.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[2.0, 1.0], [4.0, 7.0], [-5.0, 0.0]], [[0.0, 0.0], [-5.0, 2.0], [-6.0, 1.0]]], [[[-7.0, 6.0], [-4.0, 
--6.0], [-5.0, 2.0]], [[7.0, -2.0], [-5.0, -6.0], [5.0, 0.0]]], [[[2.0, 6.0], [5.0, -7.0], [0.0, 1.0]], [[2.0, 1.0], [2.0, 
--3.0], [4.0, 7.0]]], [[[-6.0, -1.0], [4.0, 5.0], [-3.0, 7.0]], [[-4.0, -1.0], [5.0, -7.0], [-4.0, 0.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      ref=Data(-6.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_array_rank1_offset0(self):
-      arg0=Data(-6.0,self.functionspace)
-      arg1=numpy.array([-5.0, 4.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([30.0, -24.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank2_offset1(self):
-      arg0=Data(numpy.array([7.0, -5.0, 3.0]),self.functionspace)
-      arg1=numpy.array([[-7.0, 6.0], [3.0, 7.0], [3.0, 3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-55.0, 16.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=1j*arg0
-      arg1=1j*arg1
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_transposed_tensor_mult_expandedData_rank4_constData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-3.0, -4.0, -4.0, -2.0, -3.0], [3.0, 4.0, -3.0, 0.0, -7.0], [0.0, 3.0, -4.0, -1.0, 3.0], 
+[0.0, 4.0, 0.0, 0.0, 6.0]], [[-1.0, 4.0, -5.0, 5.0, 6.0], [3.0, -3.0, -6.0, 0.0, 7.0], [-6.0, 0.0, -4.0, -1.0, -6.0], [1.0, 
+-2.0, 0.0, -1.0, 4.0]], [[5.0, 5.0, 3.0, -3.0, 1.0], [7.0, 4.0, 4.0, 5.0, -4.0], [4.0, -5.0, -1.0, -1.0, -6.0], [5.0, 0.0, 
+-6.0, -2.0, -7.0]]], [[[1.0, 0.0, -4.0, -3.0, -3.0], [0.0, -3.0, -2.0, 0.0, -4.0], [2.0, -2.0, -5.0, -5.0, 5.0], [4.0, -6.0, 
+-1.0, 0.0, -4.0]], [[5.0, -6.0, -7.0, -4.0, 2.0], [0.0, -5.0, 2.0, 5.0, 0.0], [4.0, 0.0, 6.0, 5.0, 2.0], [-1.0, 0.0, 0.0, 3.0, 
+-1.0]], [[5.0, -4.0, 5.0, -2.0, -6.0], [5.0, 4.0, 0.0, 0.0, -7.0], [-7.0, 4.0, -7.0, 1.0, -1.0], [-7.0, -3.0, 7.0, 0.0, 
+6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, -5.0, 0.0, 4.0, 2.0], [0.0, -6.0, -3.0, 2.0, 7.0], [6.0, -2.0, -3.0, 5.0, 3.0], 
+[0.0, -4.0, 7.0, 2.0, 4.0]], [[-7.0, -7.0, 2.0, 4.0, 7.0], [0.0, -4.0, -2.0, 7.0, 6.0], [7.0, 2.0, -4.0, 2.0, 3.0], [4.0, 7.0, 
+-6.0, 4.0, 4.0]], [[1.0, -2.0, 2.0, -7.0, 5.0], [6.0, -5.0, -7.0, 0.0, -1.0], [7.0, -4.0, 6.0, -1.0, 0.0], [-5.0, 0.0, 6.0, 
+-1.0, 1.0]]], [[[-2.0, 6.0, -1.0, -5.0, 4.0], [-1.0, 1.0, 3.0, -6.0, -3.0], [-6.0, 6.0, 3.0, 2.0, -2.0], [5.0, -7.0, 4.0, -2.0, 
+0.0]], [[-6.0, 5.0, 2.0, -5.0, 7.0], [4.0, -4.0, -4.0, -2.0, 5.0], [4.0, -6.0, 2.0, -6.0, 4.0], [-2.0, 1.0, 2.0, -2.0, -6.0]], 
+[[-6.0, -2.0, 0.0, 4.0, -4.0], [-7.0, -5.0, -3.0, -1.0, 1.0], [-3.0, -2.0, -4.0, 6.0, 3.0], [1.0, 0.0, -2.0, 3.0, 4.0]]]])
+      arg1=Data(numpy.array([[-2.0, 5.0, -2.0], [-7.0, 0.0, 7.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[19.0, -10.0, 40.0, 42.0, 13.0], [30.0, 18.0, -18.0, -10.0, 36.0], [-101.0, 46.0, -24.0, 41.0, 
+-66.0], [-82.0, 3.0, 68.0, -1.0, 92.0]])+(1.-msk_ref)*numpy.array([[-63.0, -77.0, 13.0, 89.0, -35.0], [-54.0, -40.0, -32.0, 
+66.0, 46.0], [30.0, -34.0, -75.0, 30.0, 44.0], [2.0, 92.0, -98.0, 53.0, 38.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[-2.0, 4.0, 5.0], [0.0, -3.0, 0.0]]),self.functionspace)
-      arg1=numpy.array([[[4.0, -1.0], [1.0, 6.0], [-2.0, -1.0]], [[7.0, 5.0], [-7.0, 0.0], [7.0, -5.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([7.0, 21.0]),self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_constData_rank3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[2.0, -2.0, 5.0, -3.0, -5.0], [-4.0, 7.0, 0.0, 4.0, 0.0], [-6.0, -4.0, 6.0, -5.0, -3.0], 
+[-1.0, 7.0, 4.0, -3.0, 4.0]], [[-6.0, -4.0, -6.0, 6.0, -1.0], [1.0, 7.0, -6.0, 5.0, -2.0], [-5.0, -1.0, 0.0, 4.0, 0.0], [-7.0, 
+-2.0, 3.0, -2.0, -2.0]], [[1.0, -2.0, 4.0, 4.0, -2.0], [1.0, 0.0, -7.0, 3.0, -7.0], [5.0, -4.0, -1.0, 3.0, -3.0], [-7.0, -1.0, 
+-2.0, -1.0, -3.0]]], [[[0.0, 5.0, 3.0, 0.0, -2.0], [5.0, -6.0, 1.0, -3.0, -6.0], [0.0, 3.0, 7.0, 0.0, -7.0], [-6.0, -2.0, 7.0, 
+-2.0, -5.0]], [[6.0, -5.0, -2.0, 4.0, 3.0], [3.0, 5.0, 2.0, -2.0, 4.0], [0.0, 7.0, -6.0, 4.0, 0.0], [0.0, 6.0, 0.0, -7.0, 
+1.0]], [[2.0, 3.0, -7.0, -2.0, 0.0], [7.0, 6.0, 7.0, -1.0, 6.0], [7.0, -1.0, -4.0, 3.0, 0.0], [1.0, 3.0, 3.0, 7.0, 
+-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 3.0, 3.0, 0.0, 7.0], [6.0, 7.0, -1.0, 2.0, -6.0], [5.0, -4.0, 0.0, -2.0, 4.0], 
+[-7.0, 6.0, -5.0, 2.0, -7.0]], [[-4.0, -6.0, 4.0, -1.0, 7.0], [0.0, -4.0, 2.0, -6.0, -3.0], [3.0, 0.0, 3.0, -6.0, -1.0], [-6.0, 
+6.0, 5.0, -3.0, -4.0]], [[-7.0, 6.0, 6.0, 5.0, 2.0], [-6.0, 5.0, 3.0, -5.0, 0.0], [-5.0, -4.0, 2.0, -7.0, 3.0], [4.0, 2.0, 4.0, 
+4.0, -4.0]]], [[[0.0, -4.0, -4.0, -2.0, 0.0], [-2.0, -6.0, -2.0, 5.0, -3.0], [4.0, 3.0, -3.0, -2.0, 3.0], [6.0, -2.0, -6.0, 
+0.0, 3.0]], [[6.0, -7.0, 0.0, 6.0, -7.0], [4.0, 2.0, 0.0, 6.0, -5.0], [-5.0, 3.0, -3.0, 5.0, 0.0], [-1.0, 0.0, 6.0, 5.0, 
+-2.0]], [[-6.0, -3.0, 0.0, -1.0, -5.0], [0.0, -7.0, -3.0, 4.0, -5.0], [0.0, 5.0, 5.0, -3.0, -2.0], [-1.0, -3.0, -1.0, -1.0, 
+-7.0]]]])
+      arg1=Data(numpy.array([[[-4.0, -7.0], [3.0, 5.0], [0.0, -1.0]], [[-1.0, 4.0], [-6.0, -4.0], [2.0, 
+-6.0]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-58.0, -81.0], [27.0, 18.0], [-43.0, -7.0], [2.0, 43.0], [1.0, 12.0]], [[10.0, -2.0], [-19.0, 
+-94.0], [-17.0, -69.0], [12.0, -4.0], [-12.0, -79.0]], [[23.0, -30.0], [-34.0, 17.0], [-3.0, 35.0], [14.0, 18.0], [19.0, 
+-4.0]], [[-9.0, -51.0], [-62.0, -108.0], [-8.0, -1.0], [64.0, -10.0], [-31.0, -35.0]]])+(1.-msk_ref)*numpy.array([[[-44.0, 
+27.0], [10.0, -27.0], [4.0, -23.0], [-39.0, -36.0], [25.0, 42.0]], [[-46.0, -60.0], [-60.0, -64.0], [6.0, 24.0], [-59.0, 
+-67.0], [38.0, 65.0]], [[15.0, 21.0], [5.0, 2.0], [40.0, -17.0], [-44.0, -19.0], [-26.0, -12.0]], [[8.0, 49.0], [-10.0, -4.0], 
+[3.0, 14.0], [-49.0, -47.0], [11.0, 95.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank4_offset3(self):
-      arg0=Data(numpy.array([[[0.0, 6.0, 2.0], [-2.0, 3.0, -2.0], [3.0, -7.0, -4.0], [2.0, 1.0, -5.0]], [[-1.0, 1.0, -1.0], 
-[-7.0, 0.0, -3.0], [-4.0, -4.0, 0.0], [3.0, 2.0, 0.0]]]),self.functionspace)
-      arg1=numpy.array([[[[0.0, -4.0], [4.0, -7.0], [-2.0, -1.0]], [[-2.0, -2.0], [5.0, 0.0], [-5.0, -7.0]], [[-5.0, -3.0], 
-[0.0, 6.0], [-4.0, 7.0]], [[2.0, 1.0], [0.0, 6.0], [-3.0, -3.0]]], [[[-7.0, 0.0], [5.0, -3.0], [-2.0, -1.0]], [[-3.0, 4.0], 
-[2.0, -6.0], [-6.0, 4.0]], [[-4.0, -1.0], [-1.0, 2.0], [1.0, -7.0]], [[7.0, 3.0], [4.0, 5.0], [0.0, 5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([171.0, -109.0]),self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_constData_rank4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-1.0, 0.0, 2.0, 3.0, 7.0], [4.0, 0.0, 3.0, 0.0, -4.0], [2.0, -7.0, 3.0, 0.0, 7.0], [5.0, 
+1.0, -4.0, 5.0, 2.0]], [[5.0, -3.0, -2.0, 3.0, -4.0], [7.0, -1.0, 5.0, -2.0, 0.0], [4.0, 7.0, -5.0, -5.0, -4.0], [-3.0, -6.0, 
+6.0, -4.0, -6.0]], [[-1.0, -1.0, 0.0, 6.0, 2.0], [-2.0, 2.0, -5.0, 0.0, -7.0], [-1.0, -4.0, -1.0, -3.0, 4.0], [-7.0, -3.0, 7.0, 
+-1.0, 3.0]]], [[[1.0, -4.0, 2.0, -5.0, -5.0], [7.0, -7.0, -2.0, 7.0, -5.0], [-7.0, 2.0, -5.0, 2.0, -6.0], [-4.0, 6.0, 3.0, 1.0, 
+-7.0]], [[1.0, 1.0, -6.0, 2.0, -5.0], [3.0, 2.0, -2.0, 4.0, 6.0], [-7.0, -2.0, -4.0, 1.0, 2.0], [7.0, -3.0, 0.0, 1.0, -5.0]], 
+[[6.0, 5.0, 0.0, -1.0, 1.0], [-7.0, 1.0, 2.0, -5.0, 5.0], [-3.0, 0.0, -7.0, -3.0, -7.0], [4.0, 6.0, 5.0, -6.0, 
+-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -4.0, 5.0, -7.0, -4.0], [2.0, -5.0, 7.0, -3.0, -6.0], [5.0, 3.0, -1.0, 2.0, -2.0], 
+[-6.0, -1.0, 3.0, -2.0, 2.0]], [[-6.0, -3.0, -7.0, 2.0, -7.0], [-5.0, 7.0, 7.0, 7.0, -3.0], [-1.0, 1.0, 0.0, -6.0, -5.0], [7.0, 
+4.0, -7.0, 3.0, -4.0]], [[5.0, 5.0, 6.0, 6.0, 6.0], [-4.0, -7.0, -7.0, -1.0, -2.0], [4.0, -4.0, 1.0, 7.0, -7.0], [4.0, -4.0, 
+-1.0, 0.0, 0.0]]], [[[0.0, 5.0, 7.0, -4.0, 1.0], [-1.0, -1.0, -7.0, 4.0, 0.0], [7.0, 2.0, -1.0, 1.0, -2.0], [-4.0, -4.0, -3.0, 
+0.0, -3.0]], [[-7.0, -3.0, 3.0, 5.0, 4.0], [2.0, -7.0, -6.0, 6.0, 5.0], [0.0, 4.0, -7.0, -1.0, 4.0], [-1.0, 0.0, -6.0, 0.0, 
+7.0]], [[-7.0, -1.0, -5.0, -1.0, -7.0], [6.0, 5.0, 6.0, 2.0, 2.0], [1.0, -4.0, -1.0, 1.0, 2.0], [6.0, -3.0, 2.0, -3.0, 2.0]]]])
+      arg1=Data(numpy.array([[[[-3.0, -3.0, -6.0, -5.0, 0.0], [4.0, 6.0, -6.0, 0.0, 1.0], [-5.0, 5.0, -4.0, 3.0, -6.0], [5.0, 
+-3.0, 6.0, -6.0, -4.0]], [[6.0, 2.0, -4.0, 0.0, 7.0], [4.0, -4.0, 3.0, 4.0, -4.0], [-2.0, 4.0, 0.0, 2.0, 7.0], [1.0, -6.0, 7.0, 
+-6.0, 3.0]], [[3.0, 3.0, 3.0, 3.0, -3.0], [-3.0, 0.0, 7.0, 6.0, 0.0], [6.0, 5.0, -2.0, 0.0, -2.0], [-1.0, -1.0, 5.0, -6.0, 
+6.0]]], [[[5.0, -5.0, 4.0, 7.0, -1.0], [4.0, -6.0, -2.0, -3.0, -6.0], [6.0, 7.0, -2.0, 1.0, 6.0], [-6.0, -7.0, 0.0, 4.0, 1.0]], 
+[[5.0, 3.0, -6.0, 0.0, 4.0], [3.0, -4.0, 7.0, 5.0, -1.0], [6.0, 0.0, -4.0, 6.0, 6.0], [-6.0, -4.0, 0.0, -5.0, 5.0]], [[1.0, 
+4.0, -3.0, 4.0, 6.0], [2.0, -1.0, 4.0, 4.0, 4.0], [-7.0, 0.0, -4.0, 0.0, -1.0], [6.0, -1.0, 3.0, -6.0, 
+5.0]]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[46.0, 32.0, -37.0, 33.0, 77.0], [38.0, -42.0, 43.0, 40.0, -4.0], [-41.0, 17.0, -24.0, 14.0, 
+49.0], [25.0, -43.0, 42.0, -55.0, 49.0]], [[-31.0, 34.0, -28.0, -11.0, 20.0], [-12.0, 27.0, 19.0, 19.0, 55.0], [-53.0, -45.0, 
+-14.0, -4.0, -42.0], [46.0, 38.0, -11.0, -27.0, 11.0]], [[-38.0, -38.0, 40.0, 4.0, -40.0], [-10.0, 32.0, -64.0, -44.0, 4.0], 
+[-30.0, 16.0, 12.0, -32.0, -50.0], [32.0, 16.0, -2.0, 38.0, -42.0]], [[11.0, 42.0, -41.0, -36.0, 10.0], [-10.0, 29.0, 53.0, 
+69.0, 15.0], [4.0, 22.0, -18.0, 22.0, -26.0], [24.0, -5.0, 66.0, -96.0, 33.0]], [[-88.0, -9.0, -13.0, -60.0, -43.0], [-27.0, 
+107.0, -61.0, -10.0, 62.0], [-82.0, -6.0, -6.0, -22.0, -135.0], [95.0, 55.0, 27.0, -31.0, -53.0]]], [[[67.0, -58.0, -27.0, 
+-5.0, 18.0], [73.0, -51.0, -38.0, -18.0, -97.0], [63.0, 87.0, -10.0, 51.0, 96.0], [-73.0, -106.0, 42.0, 1.0, -20.0]], [[-24.0, 
+49.0, -33.0, -39.0, 8.0], [-30.0, 37.0, 43.0, 43.0, 48.0], [-23.0, -43.0, -2.0, 3.0, -42.0], [33.0, 44.0, 6.0, -50.0, 17.0]], 
+[[-12.0, -2.0, -55.0, -36.0, 56.0], [37.0, 16.0, -40.0, -6.0, 5.0], [-93.0, -4.0, 2.0, 5.0, 1.0], [61.0, -14.0, 34.0, -28.0, 
+-29.0]], [[38.0, -47.0, 27.0, 29.0, -35.0], [22.0, -45.0, -12.0, -29.0, -58.0], [105.0, 41.0, -10.0, 27.0, 57.0], [-98.0, 
+-48.0, -29.0, 50.0, -4.0]], [[1.0, 54.0, -68.0, -16.0, 80.0], [13.0, -23.0, 47.0, 23.0, 40.0], [-51.0, -90.0, -4.0, 19.0, 
+39.0], [11.0, 25.0, -44.0, -14.0, 24.0]]], [[[-58.0, 1.0, -8.0, -74.0, -8.0], [-28.0, 69.0, -54.0, -16.0, 23.0], [-87.0, -28.0, 
+48.0, -35.0, -63.0], [81.0, 51.0, 26.0, -5.0, -59.0]], [[51.0, 7.0, 22.0, 37.0, 51.0], [14.0, -74.0, 17.0, -12.0, -45.0], 
+[-3.0, -13.0, 40.0, -17.0, 99.0], [-24.0, -23.0, -13.0, 42.0, 17.0]], [[-94.0, -37.0, 24.0, -81.0, -85.0], [-51.0, 91.0, -86.0, 
+-59.0, 29.0], [-16.0, -45.0, 44.0, -30.0, -98.0], [23.0, 80.0, -43.0, 60.0, -93.0]], [[-27.0, -38.0, 22.0, -7.0, -42.0], [-6.0, 
+7.0, -45.0, -51.0, -5.0], [31.0, -21.0, 10.0, -2.0, -8.0], [-38.0, 18.0, -59.0, 69.0, -41.0]], [[-60.0, -9.0, -29.0, -93.0, 
+-68.0], [-32.0, 93.0, -28.0, 8.0, 29.0], [22.0, -3.0, -4.0, 19.0, -95.0], [9.0, 40.0, 13.0, -34.0, -47.0]]], [[[-35.0, 15.0, 
+-109.0, -58.0, 56.0], [42.0, 34.0, -15.0, 9.0, 50.0], [-71.0, -50.0, -42.0, 47.0, -23.0], [35.0, 6.0, -14.0, -45.0, -20.0]], 
+[[-27.0, -39.0, 33.0, 52.0, -15.0], [16.0, 0.0, -54.0, -51.0, 16.0], [-35.0, 8.0, -22.0, -21.0, -30.0], [20.0, 0.0, -33.0, 
+51.0, -19.0]], [[89.0, 50.0, 18.0, 82.0, 48.0], [9.0, -71.0, 105.0, 77.0, -26.0], [33.0, 60.0, -24.0, 3.0, 65.0], [-9.0, -57.0, 
+68.0, -72.0, 104.0]], [[-38.0, -52.0, -1.0, -45.0, -58.0], [2.0, 42.0, -68.0, -44.0, -10.0], [31.0, 11.0, 0.0, 14.0, -38.0], 
+[-26.0, 5.0, -21.0, 35.0, -62.0]], [[-98.0, -9.0, 38.0, -70.0, -94.0], [-78.0, 103.0, -50.0, -30.0, 53.0], [-17.0, -48.0, 40.0, 
+-43.0, -127.0], [43.0, 101.0, -30.0, 33.0, -65.0]]]])+(1.-msk_ref)*numpy.array([[[[-66.0, -49.0, 96.0, -18.0, -127.0], [-70.0, 
+65.0, -66.0, -57.0, 4.0], [44.0, 6.0, 42.0, -51.0, -93.0], [-6.0, 63.0, -32.0, 77.0, -62.0]], [[18.0, -17.0, 92.0, 66.0, 
+-59.0], [-34.0, -29.0, 15.0, -16.0, -23.0], [75.0, 28.0, 12.0, -31.0, 6.0], [-46.0, 3.0, -23.0, 53.0, 22.0]], [[6.0, -57.0, 
+41.0, 22.0, -92.0], [1.0, 9.0, -22.0, -18.0, -32.0], [120.0, 76.0, -38.0, 26.0, -26.0], [-78.0, -35.0, -4.0, 19.0, -8.0]], 
+[[55.0, 74.0, 9.0, 21.0, 14.0], [-41.0, -45.0, 129.0, 77.0, 0.0], [80.0, -25.0, 8.0, 9.0, 51.0], [-51.0, 12.0, -1.0, -41.0, 
+86.0]], [[6.0, -5.0, 71.0, 17.0, -94.0], [-60.0, -11.0, 43.0, -3.0, -14.0], [149.0, -11.0, 14.0, -1.0, 0.0], [-105.0, 32.0, 
+-64.0, 56.0, 17.0]]], [[[-37.0, 7.0, -38.0, -5.0, 22.0], [14.0, 24.0, -15.0, -7.0, 50.0], [-60.0, -37.0, -30.0, 7.0, -39.0], 
+[39.0, 21.0, -25.0, -8.0, -8.0]], [[1.0, 12.0, 4.0, 17.0, 73.0], [14.0, -29.0, -25.0, -26.0, 0.0], [-114.0, -39.0, 44.0, -44.0, 
+40.0], [67.0, 10.0, -1.0, 31.0, -12.0]], [[-59.0, 13.0, -101.0, -81.0, 89.0], [43.0, 74.0, -74.0, 1.0, 51.0], [-211.0, -21.0, 
+0.0, -8.0, -63.0], [163.0, 11.0, 74.0, -76.0, -56.0]], [[100.0, 26.0, -39.0, 48.0, 84.0], [57.0, -96.0, 74.0, 48.0, -53.0], 
+[41.0, 36.0, -26.0, 45.0, 127.0], [-55.0, -86.0, 32.0, -44.0, 71.0]], [[21.0, 29.0, 6.0, 32.0, 17.0], [-11.0, -46.0, 56.0, 9.0, 
+9.0], [40.0, -52.0, 0.0, 6.0, 47.0], [-49.0, 16.0, -61.0, 29.0, 38.0]]], [[[27.0, -36.0, 11.0, 40.0, -20.0], [34.0, -9.0, 
+-15.0, 3.0, -29.0], [36.0, 90.0, -46.0, 20.0, -4.0], [-16.0, -63.0, 46.0, -26.0, 13.0]], [[11.0, -33.0, -38.0, -29.0, 9.0], 
+[40.0, -10.0, -35.0, -22.0, -33.0], [23.0, 13.0, -8.0, 37.0, 37.0], [-40.0, -37.0, -7.0, 12.0, -31.0]], [[-35.0, -14.0, 50.0, 
+-3.0, -36.0], [-34.0, 29.0, -38.0, -30.0, 8.0], [-30.0, -7.0, 36.0, -46.0, -43.0], [36.0, 38.0, -4.0, 37.0, -31.0]], [[-20.0, 
+-1.0, 40.0, 22.0, -62.0], [-34.0, 33.0, 14.0, 14.0, 25.0], [37.0, 28.0, -24.0, -11.0, -69.0], [3.0, 19.0, 8.0, -15.0, 17.0]], 
+[[-33.0, 5.0, -27.0, -17.0, 16.0], [1.0, 2.0, -12.0, -28.0, 34.0], [-24.0, -79.0, 2.0, 6.0, 1.0], [-8.0, 39.0, -76.0, 44.0, 
+-21.0]]], [[[53.0, 85.0, -8.0, 38.0, 73.0], [-15.0, -42.0, 110.0, 83.0, 15.0], [-32.0, -10.0, 4.0, -14.0, 41.0], [39.0, -2.0, 
+51.0, -77.0, 90.0]], [[-8.0, 7.0, -29.0, -47.0, 26.0], [2.0, 5.0, -14.0, -8.0, -5.0], [-30.0, -37.0, 32.0, 1.0, 21.0], [9.0, 
+14.0, -7.0, 8.0, -27.0]], [[-97.0, -21.0, 25.0, -31.0, -55.0], [-39.0, 86.0, -74.0, -47.0, 63.0], [-75.0, -39.0, 12.0, -44.0, 
+-121.0], [75.0, 77.0, -30.0, 36.0, -62.0]], [[21.0, 0.0, 9.0, -2.0, 3.0], [-2.0, -21.0, 9.0, 0.0, -26.0], [25.0, 2.0, 20.0, 
+0.0, 36.0], [-25.0, -9.0, 0.0, 12.0, 2.0]], [[-8.0, 30.0, -56.0, -23.0, 15.0], [5.0, 16.0, 39.0, 36.0, 37.0], [8.0, -27.0, 
+-38.0, 37.0, -18.0], [-6.0, 9.0, -10.0, -47.0, 22.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_array_rank2_offset0(self):
-      arg0=Data(0.0,self.functionspace)
-      arg1=numpy.array([[5.0, -3.0, 1.0, 0.0, 6.0], [-5.0, -6.0, -7.0, -2.0, -2.0], [-6.0, -6.0, -6.0, 6.0, -6.0], [-4.0, 7.0, 
--5.0, -5.0, -3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[0.0, -0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 0.0, -0.0], [-0.0, 
-0.0, -0.0, -0.0, -0.0]]),self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_expandedData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, 1.0, 4.0, 2.0, 0.0], [5.0, -7.0, 5.0, -6.0, 3.0], [0.0, 3.0, 4.0, 3.0, 0.0], [5.0, 
+6.0, 2.0, 1.0, 5.0]], [[6.0, -6.0, 0.0, -4.0, 1.0], [3.0, -6.0, 0.0, 2.0, 5.0], [0.0, 2.0, 6.0, 0.0, -4.0], [0.0, -2.0, -7.0, 
+-5.0, 1.0]], [[0.0, 6.0, -4.0, 0.0, -2.0], [-6.0, 2.0, -3.0, 7.0, 0.0], [-3.0, 7.0, -2.0, 5.0, 0.0], [0.0, 6.0, -4.0, 0.0, 
+-7.0]]], [[[-6.0, 5.0, 5.0, -3.0, 0.0], [0.0, 1.0, -3.0, 7.0, -1.0], [-1.0, 0.0, 1.0, 7.0, 6.0], [-7.0, -2.0, 6.0, 1.0, 7.0]], 
+[[-3.0, 0.0, -2.0, 6.0, 4.0], [-6.0, -4.0, -5.0, -6.0, -1.0], [-2.0, 2.0, -4.0, 4.0, -2.0], [6.0, -4.0, 5.0, -2.0, -3.0]], 
+[[-4.0, 1.0, -7.0, -4.0, -6.0], [-1.0, 1.0, 3.0, -3.0, -7.0], [6.0, 3.0, 7.0, -5.0, -6.0], [0.0, -2.0, 0.0, -6.0, 
+-6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, -6.0, -6.0, 0.0, 6.0], [5.0, 5.0, -7.0, -6.0, 6.0], [-4.0, -3.0, -5.0, 7.0, 6.0], 
+[5.0, 3.0, 7.0, -1.0, -6.0]], [[-4.0, 7.0, 6.0, -1.0, 7.0], [5.0, -1.0, 3.0, 3.0, -3.0], [0.0, 0.0, 7.0, 7.0, 1.0], [3.0, -2.0, 
+0.0, -7.0, 4.0]], [[1.0, 3.0, 0.0, 4.0, 7.0], [-3.0, 0.0, 1.0, -5.0, -6.0], [7.0, -7.0, 4.0, 7.0, -1.0], [-1.0, 0.0, -4.0, 
+-7.0, 5.0]]], [[[-5.0, 7.0, 0.0, -6.0, 0.0], [4.0, -5.0, -2.0, -6.0, 0.0], [1.0, -2.0, 7.0, 4.0, 5.0], [-6.0, -6.0, -7.0, -3.0, 
+-4.0]], [[-1.0, -2.0, 0.0, -5.0, 0.0], [-3.0, 0.0, 0.0, 2.0, 1.0], [-4.0, 0.0, 3.0, 0.0, 2.0], [-5.0, -3.0, 3.0, 0.0, -5.0]], 
+[[4.0, -7.0, -3.0, 2.0, -5.0], [2.0, 3.0, -2.0, 3.0, -4.0], [-3.0, 4.0, -4.0, -4.0, -3.0], [7.0, 2.0, -5.0, 0.0, -2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, -1.0, 5.0], [-5.0, 4.0, 0.0]])+(1.-msk_arg1)*numpy.array([[5.0, 2.0, -7.0], [5.0, 7.0, 
+6.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[61.0, 4.0, -81.0, 29.0, 5.0], [-92.0, 44.0, -55.0, 16.0, -25.0], [-18.0, 20.0, -65.0, -15.0, 
+-34.0], [24.0, -16.0, -37.0, -15.0, -118.0]])+(1.-msk_ref)*numpy.array([[-38.0, -58.0, -36.0, -83.0, -35.0], [67.0, 16.0, 
+-58.0, 13.0, 49.0], [-110.0, 48.0, -7.0, -4.0, 60.0], [15.0, -28.0, 19.0, 15.0, -124.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank3_offset1(self):
-      arg0=Data(numpy.array([3.0, -2.0, -3.0]),self.functionspace)
-      arg1=numpy.array([[[-6.0, -2.0, -3.0, 5.0, -4.0], [-5.0, 6.0, 6.0, 0.0, -1.0], [0.0, -5.0, 6.0, -5.0, 0.0], [1.0, -2.0, 
--4.0, 7.0, 4.0]], [[-6.0, -2.0, -6.0, -3.0, -7.0], [-5.0, 2.0, -2.0, 0.0, 4.0], [4.0, -3.0, 0.0, -1.0, -6.0], [7.0, 0.0, -3.0, 
-6.0, 0.0]], [[0.0, -6.0, -1.0, 5.0, -4.0], [0.0, 3.0, 2.0, 2.0, 0.0], [3.0, -6.0, 1.0, 0.0, 6.0], [1.0, 0.0, -1.0, -3.0, 
--5.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-6.0, 16.0, 6.0, 6.0, 14.0], [-5.0, 5.0, 16.0, -6.0, -11.0], [-17.0, 9.0, 15.0, -13.0, -6.0], 
-[-14.0, -6.0, -3.0, 18.0, 27.0]]),self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_expandedData_rank3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, 2.0, -4.0, -4.0, 0.0], [4.0, 3.0, 0.0, -3.0, -5.0], [-7.0, 5.0, 4.0, 3.0, -2.0], 
+[-3.0, -3.0, -4.0, -5.0, 6.0]], [[6.0, 7.0, -7.0, 2.0, 6.0], [-4.0, 6.0, 1.0, 6.0, -5.0], [-3.0, 4.0, 0.0, 4.0, 3.0], [-5.0, 
+2.0, 1.0, -5.0, -7.0]], [[-5.0, -7.0, -2.0, -4.0, 3.0], [2.0, 3.0, 0.0, -4.0, 4.0], [-4.0, -6.0, -3.0, -3.0, 7.0], [1.0, -4.0, 
+6.0, -5.0, -6.0]]], [[[-7.0, 0.0, 7.0, -1.0, -6.0], [-3.0, -7.0, -6.0, 0.0, -2.0], [1.0, -1.0, -3.0, 1.0, 1.0], [4.0, 3.0, 0.0, 
+-6.0, -1.0]], [[7.0, -3.0, 0.0, -5.0, -4.0], [5.0, -3.0, -5.0, -7.0, -5.0], [6.0, 1.0, -5.0, 0.0, 3.0], [3.0, 3.0, 0.0, 2.0, 
+-4.0]], [[4.0, 4.0, -5.0, -2.0, 6.0], [6.0, 7.0, 0.0, 3.0, -6.0], [5.0, 1.0, 3.0, -1.0, -2.0], [-2.0, -3.0, 3.0, -4.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, -4.0, -7.0, -6.0, 2.0], [-1.0, 1.0, 3.0, -2.0, -5.0], [-3.0, -3.0, -3.0, 3.0, 0.0], 
+[-6.0, -1.0, -2.0, 7.0, 3.0]], [[5.0, -7.0, 3.0, -6.0, 4.0], [3.0, 7.0, 0.0, 0.0, -2.0], [3.0, -5.0, 5.0, -4.0, 2.0], [1.0, 
+4.0, -2.0, -6.0, 0.0]], [[1.0, 0.0, -5.0, -6.0, 7.0], [4.0, 4.0, -1.0, 5.0, 1.0], [0.0, -3.0, 6.0, -3.0, -3.0], [4.0, -1.0, 
+3.0, 0.0, 5.0]]], [[[-6.0, -6.0, 1.0, -1.0, 5.0], [-7.0, 2.0, -1.0, -2.0, -2.0], [-7.0, 1.0, -6.0, -4.0, 5.0], [2.0, -5.0, 
+-3.0, 0.0, -7.0]], [[4.0, 1.0, 1.0, 0.0, 6.0], [-6.0, 4.0, 0.0, 3.0, -5.0], [4.0, -1.0, 5.0, -2.0, -1.0], [4.0, -7.0, 2.0, 1.0, 
+4.0]], [[7.0, 5.0, 5.0, 5.0, -7.0], [-2.0, 5.0, -6.0, -5.0, -7.0], [-3.0, -4.0, -3.0, 3.0, 4.0], [6.0, 2.0, 2.0, -6.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[2.0, 4.0], [-6.0, 5.0], [2.0, 1.0]], [[6.0, 0.0], [2.0, -4.0], [0.0, 
+-4.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 6.0], [6.0, -4.0], [2.0, 5.0]], [[-4.0, 7.0], [-3.0, -7.0], [-5.0, -7.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-60.0, 9.0], [-58.0, 32.0], [72.0, -33.0], [-44.0, 18.0], [-74.0, 25.0]], [[28.0, -46.0], 
+[-72.0, 29.0], [-52.0, 25.0], [-64.0, 30.0], [6.0, 3.0]], [[14.0, -91.0], [-30.0, 26.0], [-26.0, 21.0], [-18.0, 33.0], [4.0, 
+10.0]], [[56.0, -40.0], [-2.0, -6.0], [-2.0, -17.0], [-22.0, -42.0], [28.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[9.0, -104.0], 
+[-46.0, -80.0], [-24.0, -114.0], [-69.0, -84.0], [35.0, 73.0]], [[82.0, 9.0], [5.0, -51.0], [32.0, 48.0], [34.0, 13.0], [48.0, 
+53.0]], [[49.0, -86.0], [-17.0, 29.0], [66.0, -64.0], [-23.0, -16.0], [-31.0, -9.0]], [[-36.0, -76.0], [53.0, -27.0], [-10.0, 
+-38.0], [-9.0, 101.0], [1.0, -69.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[0.0, -2.0, -1.0], [-3.0, 6.0, 7.0]]),self.functionspace)
-      arg1=numpy.array([[[[1.0, -3.0, 7.0, 0.0, -7.0], [2.0, 4.0, -4.0, -7.0, 1.0], [6.0, 6.0, 2.0, 1.0, 0.0], [7.0, -2.0, 4.0, 
-0.0, -7.0]], [[6.0, -7.0, 4.0, 4.0, 3.0], [-3.0, 2.0, -6.0, 0.0, -5.0], [3.0, 1.0, 1.0, 1.0, -6.0], [7.0, 5.0, -6.0, 2.0, 
--5.0]], [[0.0, -4.0, 0.0, 0.0, -5.0], [7.0, 0.0, -4.0, -6.0, -6.0], [-4.0, -2.0, 3.0, 2.0, -3.0], [-4.0, 0.0, 5.0, -2.0, 
--6.0]]], [[[-1.0, 7.0, -5.0, 7.0, 7.0], [5.0, -3.0, 5.0, -4.0, 2.0], [-2.0, 4.0, 5.0, 5.0, 7.0], [-3.0, 3.0, 7.0, -2.0, -3.0]], 
-[[-7.0, -4.0, 5.0, 5.0, -3.0], [-3.0, 2.0, -6.0, -5.0, 5.0], [-6.0, -2.0, 0.0, -1.0, -6.0], [7.0, -1.0, 0.0, 1.0, 2.0]], [[1.0, 
-4.0, 0.0, -7.0, 3.0], [-1.0, 0.0, 0.0, 1.0, -2.0], [-3.0, 2.0, 0.0, 2.0, -1.0], [5.0, -7.0, -4.0, 0.0, 0.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-44.0, 1.0, 37.0, -48.0, -19.0], [-41.0, 17.0, -35.0, -5.0, 26.0], [-53.0, -10.0, -20.0, -11.0, 
--49.0], [76.0, -74.0, -42.0, 10.0, 37.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_array_rank3_offset0(self):
-      arg0=Data(6.0,self.functionspace)
-      arg1=numpy.array([[[-6.0, -2.0], [0.0, 7.0]], [[-3.0, 7.0], [-5.0, 3.0]], [[-6.0, -3.0], [0.0, 3.0]], [[-7.0, 0.0], [2.0, 
--1.0]], [[6.0, 1.0], [5.0, 4.0]], [[7.0, -7.0], [-4.0, 1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-36.0, -12.0], [0.0, 42.0]], [[-18.0, 42.0], [-30.0, 18.0]], [[-36.0, -18.0], [0.0, 18.0]], 
-[[-42.0, 0.0], [12.0, -6.0]], [[36.0, 6.0], [30.0, 24.0]], [[42.0, -42.0], [-24.0, 6.0]]]),self.functionspace)
+   def test_transposed_tensor_mult_expandedData_rank4_expandedData_rank4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, 0.0, 3.0, 2.0, -2.0], [0.0, 7.0, 7.0, -1.0, -4.0], [2.0, 3.0, 0.0, 7.0, 4.0], [-5.0, 
+4.0, 0.0, 7.0, 2.0]], [[-3.0, -4.0, -7.0, 0.0, -4.0], [3.0, -1.0, -7.0, 4.0, 1.0], [1.0, 0.0, -5.0, 0.0, 5.0], [0.0, 2.0, 7.0, 
+6.0, -3.0]], [[6.0, 5.0, -2.0, 5.0, 0.0], [0.0, -3.0, 3.0, -4.0, 0.0], [-4.0, 2.0, -4.0, -4.0, -6.0], [4.0, 3.0, -2.0, -1.0, 
+3.0]]], [[[-3.0, -6.0, 2.0, 5.0, 1.0], [1.0, 0.0, -7.0, 4.0, 5.0], [-5.0, 4.0, 5.0, -3.0, -4.0], [-1.0, 5.0, 2.0, -5.0, -4.0]], 
+[[1.0, 6.0, -4.0, 5.0, 2.0], [-2.0, 3.0, 6.0, 0.0, -7.0], [-4.0, -5.0, 6.0, 1.0, -5.0], [-7.0, 1.0, -4.0, -5.0, 0.0]], [[6.0, 
+4.0, -6.0, -4.0, -4.0], [-6.0, 6.0, -3.0, 3.0, 6.0], [2.0, 4.0, -2.0, 7.0, -5.0], [-4.0, 7.0, -2.0, -1.0, 
+4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 7.0, 5.0, 3.0, -3.0], [5.0, 3.0, -2.0, 6.0, 0.0], [5.0, 0.0, -1.0, -4.0, -5.0], 
+[2.0, -6.0, -5.0, -3.0, 7.0]], [[-2.0, -4.0, 3.0, 7.0, 0.0], [7.0, 0.0, 4.0, 0.0, 1.0], [1.0, 0.0, -3.0, -4.0, 5.0], [-6.0, 
+6.0, 3.0, -5.0, -5.0]], [[4.0, 6.0, -7.0, -3.0, 3.0], [-2.0, -2.0, 2.0, -5.0, 2.0], [4.0, 0.0, 4.0, -7.0, -4.0], [-2.0, -4.0, 
+4.0, -4.0, -3.0]]], [[[-3.0, 3.0, -6.0, 1.0, -2.0], [-4.0, 6.0, -3.0, -5.0, 1.0], [2.0, -2.0, 0.0, -7.0, -4.0], [5.0, 6.0, 5.0, 
+-2.0, -6.0]], [[-4.0, 0.0, 2.0, -2.0, -5.0], [4.0, 6.0, 6.0, -6.0, -7.0], [-7.0, 5.0, 2.0, -6.0, -4.0], [4.0, 6.0, -4.0, -1.0, 
+3.0]], [[1.0, 2.0, 4.0, 7.0, 0.0], [-6.0, 0.0, 6.0, -7.0, -3.0], [-4.0, 5.0, 1.0, -4.0, 5.0], [3.0, 1.0, -4.0, -4.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[7.0, 2.0, -4.0, -2.0, 0.0], [-1.0, 0.0, -2.0, 5.0, -6.0], [1.0, 4.0, 6.0, -4.0, 0.0], [7.0, 
+6.0, -6.0, 3.0, 6.0]], [[-1.0, 7.0, -2.0, 7.0, 2.0], [-6.0, 6.0, -6.0, 2.0, -3.0], [1.0, -6.0, 4.0, -2.0, 0.0], [-5.0, 0.0, 
+0.0, 7.0, -6.0]], [[0.0, -4.0, -1.0, 5.0, 0.0], [-4.0, 2.0, 2.0, -3.0, 0.0], [5.0, -7.0, 0.0, -7.0, -7.0], [7.0, 3.0, -7.0, 
+-6.0, -1.0]]], [[[-1.0, -5.0, -5.0, -5.0, 1.0], [4.0, -3.0, 1.0, -4.0, -5.0], [0.0, -7.0, 0.0, 3.0, 2.0], [-2.0, -1.0, 0.0, 
+-5.0, -3.0]], [[-1.0, 1.0, 3.0, -4.0, -5.0], [-4.0, 5.0, -3.0, 0.0, 5.0], [7.0, -2.0, -2.0, -1.0, -7.0], [-5.0, -2.0, -2.0, 
+0.0, 6.0]], [[-4.0, 5.0, -3.0, -1.0, -2.0], [2.0, -4.0, -4.0, 5.0, 2.0], [5.0, 3.0, -2.0, 4.0, -3.0], [-7.0, -2.0, 5.0, -4.0, 
+6.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, -6.0, 0.0, 2.0, -7.0], [-4.0, -6.0, -2.0, 5.0, -7.0], [0.0, -7.0, -6.0, -7.0, 1.0], 
+[0.0, 2.0, 0.0, -1.0, 5.0]], [[1.0, 7.0, 2.0, 5.0, 3.0], [6.0, 2.0, -2.0, 0.0, -2.0], [4.0, 0.0, 5.0, 4.0, 6.0], [-4.0, 4.0, 
+5.0, 5.0, -2.0]], [[-2.0, 2.0, 5.0, -5.0, 4.0], [4.0, 1.0, -7.0, -6.0, -6.0], [2.0, 4.0, -5.0, 7.0, 7.0], [-2.0, -4.0, -2.0, 
+-4.0, 2.0]]], [[[0.0, -6.0, 1.0, 5.0, 1.0], [-2.0, 0.0, -1.0, 6.0, 3.0], [4.0, 3.0, 6.0, 0.0, 0.0], [7.0, 2.0, 2.0, -7.0, 
+-6.0]], [[-5.0, -1.0, 0.0, -2.0, -2.0], [-3.0, 4.0, -6.0, -3.0, 2.0], [6.0, 6.0, 3.0, -5.0, 7.0], [-3.0, -1.0, 0.0, -6.0, 
+-6.0]], [[0.0, 0.0, -4.0, 3.0, 5.0], [3.0, -1.0, 2.0, 7.0, 6.0], [4.0, -5.0, 3.0, 6.0, 0.0], [4.0, 6.0, -4.0, 7.0, 2.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[30.0, 15.0, -28.0, 0.0, -26.0], [-17.0, -16.0, -14.0, 53.0, -1.0], [71.0, 41.0, 16.0, -50.0, 
+-73.0], [65.0, 49.0, -56.0, -45.0, 105.0]], [[-12.0, 8.0, 39.0, -1.0, -52.0], [-36.0, 18.0, -6.0, 21.0, 80.0], [83.0, 31.0, 
+-36.0, -35.0, -101.0], [9.0, 1.0, -27.0, -44.0, 97.0]], [[54.0, -79.0, 0.0, -53.0, 20.0], [59.0, -48.0, 70.0, -31.0, -39.0], 
+[-72.0, 44.0, 10.0, 2.0, 64.0], [100.0, 30.0, -26.0, -14.0, -4.0]], [[20.0, -56.0, -11.0, -20.0, -12.0], [-30.0, 36.0, 12.0, 
+-45.0, -20.0], [42.0, -84.0, 10.0, -49.0, -48.0], [42.0, 20.0, -77.0, -33.0, -2.0]], [[3.0, -55.0, 29.0, -33.0, -9.0], [14.0, 
+-1.0, 39.0, -42.0, 21.0], [-12.0, -7.0, -24.0, 1.0, 0.0], [22.0, -9.0, -12.0, -23.0, -3.0]]], [[[22.0, -16.0, 1.0, 30.0, 29.0], 
+[-18.0, 29.0, 13.0, -28.0, -36.0], [-41.0, -39.0, 28.0, -25.0, 34.0], [35.0, 15.0, -26.0, 40.0, -69.0]], [[23.0, 52.0, -32.0, 
+-54.0, -29.0], [11.0, -21.0, -47.0, 72.0, -12.0], [42.0, 67.0, 20.0, 16.0, -18.0], [-24.0, 15.0, 3.0, 8.0, 105.0]], [[69.0, 
+-21.0, 45.0, -34.0, -45.0], [-35.0, 27.0, 21.0, 25.0, 38.0], [42.0, 77.0, 8.0, -74.0, -68.0], [110.0, 52.0, -90.0, 1.0, 
+120.0]], [[-27.0, 37.0, -29.0, -13.0, 6.0], [15.0, -8.0, -38.0, 14.0, -20.0], [-2.0, -19.0, 4.0, 48.0, 27.0], [-84.0, -28.0, 
+49.0, 17.0, -20.0]], [[-51.0, -3.0, -50.0, 12.0, 30.0], [58.0, -68.0, 4.0, -8.0, -27.0], [-22.0, -25.0, -18.0, 60.0, 41.0], 
+[-50.0, -27.0, 68.0, -54.0, -51.0]]], [[[14.0, 58.0, 1.0, 22.0, 13.0], [8.0, -15.0, -19.0, 54.0, -6.0], [-35.0, 79.0, 20.0, 
+15.0, 40.0], [-3.0, 9.0, 34.0, 54.0, 13.0]], [[6.0, -7.0, -61.0, 0.0, 21.0], [33.0, -49.0, 1.0, 13.0, -55.0], [-2.0, -8.0, 
+20.0, 7.0, 17.0], [24.0, 22.0, -2.0, -39.0, -2.0]], [[2.0, -48.0, 13.0, -102.0, -31.0], [38.0, -15.0, 17.0, -28.0, 16.0], [7.0, 
+5.0, -28.0, 39.0, 2.0], [-29.0, -25.0, 6.0, -28.0, 43.0]], [[23.0, 81.0, -27.0, -30.0, -22.0], [7.0, -22.0, -56.0, 94.0, -8.0], 
+[29.0, 96.0, 26.0, 18.0, -6.0], [-27.0, 17.0, 19.0, 32.0, 103.0]], [[52.0, 57.0, 0.0, 42.0, 41.0], [-16.0, 25.0, -19.0, 39.0, 
+-54.0], [-81.0, 51.0, 64.0, -11.0, 84.0], [29.0, 30.0, 3.0, 123.0, -48.0]]], [[[-11.0, -48.0, 12.0, 67.0, 42.0], [5.0, -8.0, 
+54.0, -53.0, -8.0], [-54.0, -39.0, -8.0, -20.0, 31.0], [58.0, 5.0, -4.0, -18.0, -97.0]], [[-8.0, 21.0, -66.0, -15.0, -10.0], 
+[2.0, -20.0, -40.0, 30.0, -36.0], [63.0, -33.0, 16.0, 1.0, -39.0], [-25.0, 12.0, -12.0, -45.0, 42.0]], [[3.0, 33.0, -28.0, 
+47.0, 40.0], [-14.0, 20.0, -24.0, 2.0, -55.0], [-41.0, -40.0, 40.0, 2.0, 52.0], [-19.0, 4.0, 12.0, 59.0, -82.0]], [[57.0, 75.0, 
+-26.0, 69.0, 34.0], [-41.0, 28.0, -38.0, 65.0, -62.0], [-32.0, 41.0, 78.0, -47.0, 35.0], [54.0, 56.0, -30.0, 98.0, -14.0]], 
+[[5.0, 11.0, 3.0, 6.0, -18.0], [-4.0, -16.0, 0.0, 31.0, 25.0], [34.0, 45.0, -8.0, -19.0, -41.0], [30.0, 17.0, -13.0, -29.0, 
+63.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 58.0, 9.0, -48.0, 69.0], [53.0, 25.0, 19.0, -58.0, 18.0], [-32.0, 27.0, -15.0, 
+95.0, -19.0], [-5.0, -34.0, -28.0, 33.0, 21.0]], [[-2.0, -76.0, 17.0, -15.0, -24.0], [-28.0, -46.0, -47.0, 31.0, -56.0], [16.0, 
+-26.0, -68.0, -11.0, 25.0], [33.0, -8.0, -34.0, -58.0, 41.0]], [[17.0, 11.0, -51.0, 38.0, -44.0], [-12.0, -27.0, 35.0, 53.0, 
+11.0], [2.0, -89.0, 2.0, -58.0, -12.0], [-30.0, 60.0, 1.0, 96.0, 37.0]], [[29.0, 21.0, -28.0, 86.0, 28.0], [43.0, -22.0, 26.0, 
+94.0, 24.0], [42.0, -77.0, 53.0, 38.0, 10.0], [19.0, 92.0, 15.0, 98.0, 15.0]], [[13.0, 41.0, 13.0, -21.0, 41.0], [43.0, 1.0, 
+17.0, -30.0, -13.0], [-32.0, -3.0, -24.0, 67.0, -17.0], [-5.0, -17.0, -10.0, 35.0, 33.0]]], [[[1.0, 35.0, 24.0, 9.0, -64.0], 
+[-8.0, 4.0, -42.0, -41.0, -77.0], [8.0, -1.0, -15.0, -77.0, 61.0], [-88.0, -2.0, 55.0, 0.0, -5.0]], [[-20.0, -64.0, -4.0, 34.0, 
+-35.0], [-50.0, 4.0, -34.0, 45.0, 21.0], [56.0, 25.0, 46.0, -65.0, 31.0], [28.0, 20.0, 16.0, -73.0, -61.0]], [[-34.0, 56.0, 
+-9.0, -3.0, 49.0], [46.0, 40.0, -39.0, -16.0, 33.0], [68.0, 19.0, 40.0, 50.0, 78.0], [-35.0, 28.0, -14.0, 41.0, -20.0]], 
+[[52.0, -10.0, -2.0, 3.0, -90.0], [-37.0, -58.0, 50.0, -1.0, -81.0], [-94.0, -78.0, -80.0, -89.0, -71.0], [-35.0, -14.0, 28.0, 
+36.0, 72.0]], [[32.0, 12.0, 25.0, 5.0, 11.0], [24.0, -21.0, 19.0, -6.0, -43.0], [-42.0, -16.0, -29.0, 35.0, -29.0], [8.0, 
+-13.0, 15.0, 11.0, 32.0]]], [[[38.0, -20.0, 40.0, 7.0, -20.0], [7.0, -48.0, -8.0, 6.0, -93.0], [-38.0, -35.0, -66.0, 8.0, 
+-10.0], [7.0, -15.0, 17.0, -16.0, 53.0]], [[-25.0, 7.0, -22.0, -5.0, 13.0], [4.0, 15.0, -18.0, 8.0, 34.0], [42.0, -1.0, 18.0, 
+5.0, 35.0], [-9.0, 21.0, -24.0, 19.0, -8.0]], [[-23.0, -9.0, 10.0, -38.0, 15.0], [-1.0, 11.0, -30.0, -28.0, -1.0], [12.0, 30.0, 
+-20.0, 19.0, 23.0], [2.0, -26.0, -27.0, -35.0, -1.0]], [[32.0, 30.0, -34.0, -28.0, -27.0], [-16.0, -11.0, 100.0, -30.0, 21.0], 
+[-110.0, -37.0, -33.0, -31.0, -119.0], [-17.0, -28.0, -4.0, 69.0, 44.0]], [[23.0, 85.0, -34.0, 38.0, 63.0], [69.0, 15.0, 66.0, 
+22.0, 59.0], [-8.0, -42.0, 54.0, 77.0, -31.0], [-8.0, 52.0, 5.0, 133.0, 15.0]]], [[[-18.0, -92.0, -29.0, 10.0, -28.0], [-65.0, 
+-13.0, -1.0, 61.0, 51.0], [28.0, 2.0, 19.0, -54.0, -20.0], [63.0, 12.0, -28.0, -62.0, -30.0]], [[-28.0, 28.0, -6.0, 59.0, 
+43.0], [17.0, 67.0, -12.0, 19.0, 90.0], [80.0, 75.0, 143.0, 14.0, 44.0], [12.0, 40.0, 46.0, -19.0, -120.0]], [[5.0, 33.0, 47.0, 
+6.0, 53.0], [44.0, 28.0, -13.0, -35.0, -12.0], [0.0, 62.0, 31.0, 71.0, 13.0], [11.0, -24.0, 33.0, -35.0, -37.0]], [[2.0, -12.0, 
+-16.0, -31.0, -30.0], [-39.0, 4.0, 44.0, -28.0, 23.0], [-58.0, 13.0, -14.0, -46.0, -68.0], [1.0, -37.0, -5.0, -14.0, -3.0]], 
+[[0.0, -50.0, -27.0, -35.0, -93.0], [-70.0, -42.0, 3.0, 1.0, -39.0], [-36.0, -56.0, -82.0, -111.0, -23.0], [-29.0, -15.0, 
+-27.0, -3.0, 55.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=transposed_tensor_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
+        
+        
+        
+        
+        
+        
+        
+        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank4_offset1(self):
-      arg0=Data(numpy.array([-1.0, -5.0, 3.0]),self.functionspace)
-      arg1=numpy.array([[[[1.0, -2.0], [3.0, 3.0]], [[-6.0, 5.0], [7.0, 7.0]], [[-4.0, 6.0], [-5.0, 5.0]], [[-1.0, 4.0], [-3.0, 
-2.0]], [[5.0, -1.0], [-2.0, 3.0]], [[-4.0, 2.0], [-5.0, -2.0]]], [[[-2.0, 4.0], [1.0, -6.0]], [[-1.0, 0.0], [-5.0, 0.0]], 
-[[1.0, -5.0], [-7.0, 0.0]], [[3.0, -2.0], [1.0, 4.0]], [[-7.0, -4.0], [-3.0, -2.0]], [[6.0, 4.0], [1.0, -5.0]]], [[[7.0, 7.0], 
-[2.0, -2.0]], [[6.0, -2.0], [-7.0, 3.0]], [[0.0, -5.0], [-4.0, 6.0]], [[-2.0, -2.0], [5.0, -3.0]], [[-4.0, -4.0], [1.0, -3.0]], 
-[[3.0, -3.0], [-5.0, 0.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[30.0, 3.0], [-2.0, 21.0]], [[29.0, -11.0], [-3.0, 2.0]], [[-1.0, 4.0], [28.0, 13.0]], [[-20.0, 
-0.0], [13.0, -31.0]], [[18.0, 9.0], [20.0, -2.0]], [[-17.0, -31.0], [-15.0, 27.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_float_rank0_float_rank0_offset0(self):
+      arg0=-3.0
+      arg1=1.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=-3.0
+      self.assertTrue(isinstance(res,float),"wrong type of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,complex),"wrong type of result. Got "+str(type(res)))
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_array_rank4_offset0(self):
-      arg0=Data(-7.0,self.functionspace)
-      arg1=numpy.array([[[[5.0, -7.0, 6.0, -7.0], [6.0, 3.0, -6.0, -5.0], [0.0, -7.0, 6.0, 6.0]], [[6.0, 3.0, 0.0, -1.0], [6.0, 
-0.0, 0.0, -3.0], [-5.0, -3.0, 7.0, 0.0]]], [[[-7.0, -2.0, 0.0, 0.0], [7.0, -2.0, 6.0, 2.0], [-3.0, -7.0, 1.0, -1.0]], [[2.0, 
--7.0, 7.0, -3.0], [-5.0, -1.0, 2.0, -2.0], [-2.0, -4.0, -7.0, 2.0]]], [[[3.0, 6.0, -6.0, 7.0], [5.0, 0.0, 5.0, -5.0], [-7.0, 
-6.0, -2.0, -6.0]], [[6.0, -2.0, 3.0, 2.0], [4.0, 1.0, 1.0, -4.0], [-4.0, 3.0, -7.0, -1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-35.0, 49.0, -42.0, 49.0], [-42.0, -21.0, 42.0, 35.0], [-0.0, 49.0, -42.0, -42.0]], [[-42.0, 
--21.0, -0.0, 7.0], [-42.0, -0.0, -0.0, 21.0], [35.0, 21.0, -49.0, -0.0]]], [[[49.0, 14.0, -0.0, -0.0], [-49.0, 14.0, -42.0, 
--14.0], [21.0, 49.0, -7.0, 7.0]], [[-14.0, 49.0, -49.0, 21.0], [35.0, 7.0, -14.0, 14.0], [14.0, 28.0, 49.0, -14.0]]], [[[-21.0, 
--42.0, 42.0, -49.0], [-35.0, -0.0, -35.0, 35.0], [49.0, -42.0, 14.0, 42.0]], [[-42.0, 14.0, -21.0, -14.0], [-28.0, -7.0, -7.0, 
-28.0], [28.0, -21.0, 49.0, 7.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_float_rank0_array_rank0_offset0(self):
+      arg0=-3.0
+      arg1=numpy.array(-2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(6.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_constData_rank0_offset0(self):
-      arg0=Data(-4.0,self.functionspace)
-      arg1=Data(4.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-16.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_float_rank0_array_rank1_offset0(self):
+      arg0=4.0
+      arg1=numpy.array([-1.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([-4.0, 0.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([7.0, 5.0, -4.0]),self.functionspace)
-      arg1=Data(numpy.array([7.0, -2.0, 0.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(39.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_float_rank0_array_rank2_offset0(self):
+      arg0=-6.0
+      arg1=numpy.array([[-3.0, 3.0, 0.0, -4.0, 4.0], [-7.0, 6.0, -5.0, -1.0, -1.0], [1.0, 0.0, 0.0, -2.0, 5.0], [-7.0, 6.0, 
+3.0, -1.0, 1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[18.0, -18.0, -0.0, 24.0, -24.0], [42.0, -36.0, 30.0, 6.0, 6.0], [-6.0, -0.0, -0.0, 12.0, -30.0], [42.0, 
+-36.0, -18.0, 6.0, -6.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[0.0, 5.0, 7.0], [-5.0, 2.0, -6.0]]),self.functionspace)
-      arg1=Data(numpy.array([[0.0, -1.0, -5.0], [-7.0, -7.0, 4.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-43.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_float_rank0_array_rank3_offset0(self):
+      arg0=0.0
+      arg1=numpy.array([[[-4.0, 6.0], [6.0, -4.0]], [[0.0, 7.0], [6.0, -3.0]], [[3.0, -7.0], [-3.0, -2.0]], [[-6.0, -6.0], 
+[-7.0, 5.0]], [[-5.0, -4.0], [-6.0, 2.0]], [[0.0, 7.0], [2.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [0.0, -0.0]], [[0.0, -0.0], [-0.0, -0.0]], [[-0.0, -0.0], 
+[-0.0, 0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[4.0, -2.0, 4.0], [-3.0, -7.0, -6.0], [5.0, -2.0, 0.0], [-3.0, -3.0, -3.0]], [[-3.0, -1.0, 7.0], 
-[2.0, 7.0, 6.0], [3.0, 7.0, 4.0], [0.0, -3.0, 3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[5.0, -3.0, 6.0], [-6.0, -3.0, -3.0], [3.0, -5.0, 0.0], [7.0, -4.0, -5.0]], [[2.0, 7.0, -4.0], 
-[4.0, -4.0, -2.0], [-4.0, 3.0, -5.0], [4.0, -3.0, 3.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(72.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_float_rank0_array_rank4_offset0(self):
+      arg0=-6.0
+      arg1=numpy.array([[[[-1.0, 3.0, 7.0, -6.0], [-4.0, 5.0, -4.0, -7.0], [2.0, -4.0, 3.0, 5.0]], [[-1.0, 6.0, -4.0, 5.0], 
+[-3.0, 0.0, -3.0, -1.0], [-1.0, -4.0, -1.0, 7.0]]], [[[6.0, -2.0, 0.0, -7.0], [-2.0, -4.0, -2.0, 7.0], [-4.0, -2.0, 5.0, 
+-5.0]], [[2.0, 4.0, 7.0, 0.0], [6.0, 0.0, 3.0, 7.0], [-6.0, -6.0, -7.0, -4.0]]], [[[-3.0, 5.0, 1.0, 4.0], [-1.0, 0.0, -6.0, 
+-5.0], [-5.0, 6.0, 6.0, 0.0]], [[6.0, 3.0, -7.0, -3.0], [3.0, -5.0, -6.0, -2.0], [7.0, -5.0, 7.0, 5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[6.0, -18.0, -42.0, 36.0], [24.0, -30.0, 24.0, 42.0], [-12.0, 24.0, -18.0, -30.0]], [[6.0, -36.0, 
+24.0, -30.0], [18.0, -0.0, 18.0, 6.0], [6.0, 24.0, 6.0, -42.0]]], [[[-36.0, 12.0, -0.0, 42.0], [12.0, 24.0, 12.0, -42.0], 
+[24.0, 12.0, -30.0, 30.0]], [[-12.0, -24.0, -42.0, -0.0], [-36.0, -0.0, -18.0, -42.0], [36.0, 36.0, 42.0, 24.0]]], [[[18.0, 
+-30.0, -6.0, -24.0], [6.0, -0.0, 36.0, 30.0], [30.0, -36.0, -36.0, -0.0]], [[-36.0, -18.0, 42.0, 18.0], [-18.0, 30.0, 36.0, 
+12.0], [-42.0, 30.0, -42.0, -30.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[3.0, -3.0], [-1.0, -4.0], [5.0, -7.0]], [[7.0, -1.0], [7.0, -3.0], [5.0, -4.0]]], [[[6.0, 
--3.0], [7.0, -7.0], [3.0, 0.0]], [[-2.0, -4.0], [0.0, -1.0], [-1.0, 5.0]]], [[[7.0, -1.0], [5.0, -4.0], [6.0, 6.0]], [[6.0, 
-1.0], [-2.0, 0.0], [1.0, -2.0]]], [[[2.0, 7.0], [-4.0, -2.0], [4.0, -2.0]], [[-6.0, -7.0], [4.0, -5.0], [3.0, 
-4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[1.0, -7.0], [-7.0, -4.0], [0.0, 0.0]], [[2.0, 1.0], [-6.0, 0.0], [-4.0, 6.0]]], [[[-6.0, -6.0], 
-[-5.0, 0.0], [5.0, 5.0]], [[6.0, -3.0], [7.0, -4.0], [0.0, 2.0]]], [[[-2.0, 4.0], [4.0, 0.0], [6.0, -2.0]], [[3.0, 2.0], [-7.0, 
-2.0], [-4.0, 4.0]]], [[[1.0, -6.0], [-6.0, -5.0], [7.0, -2.0]], [[-5.0, 2.0], [-2.0, 0.0], [2.0, -7.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      ref=Data(10.0,self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_constData_rank0_offset0(self):
+      arg0=6.0
+      arg1=Data(-3.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-18.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_constData_rank1_offset0(self):
-      arg0=Data(0.0,self.functionspace)
-      arg1=Data(numpy.array([-2.0, 4.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-0.0, 0.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_constData_rank1_offset0(self):
+      arg0=-7.0
+      arg1=Data(numpy.array([-3.0, -3.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([21.0, 21.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([6.0, -5.0, 0.0]),self.functionspace)
-      arg1=Data(numpy.array([[-3.0, -2.0], [7.0, 4.0], [2.0, -5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-53.0, -32.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_constData_rank2_offset0(self):
+      arg0=-2.0
+      arg1=Data(numpy.array([[-2.0, -7.0, 2.0, 5.0, 0.0], [0.0, -3.0, -7.0, -2.0, -3.0], [-6.0, -3.0, -1.0, 3.0, 4.0], [0.0, 
+7.0, 0.0, 7.0, 4.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[4.0, 14.0, -4.0, -10.0, -0.0], [-0.0, 6.0, 14.0, 4.0, 6.0], [12.0, 6.0, 2.0, -6.0, -8.0], [-0.0, 
+-14.0, -0.0, -14.0, -8.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[0.0, -6.0, 7.0], [0.0, -5.0, 4.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[-2.0, 3.0], [7.0, -1.0], [0.0, 1.0]], [[-4.0, -3.0], [0.0, 2.0], [3.0, 
-1.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-30.0, 7.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[4.0, -6.0, -5.0], [3.0, 2.0, 6.0], [-7.0, -3.0, 2.0], [7.0, 1.0, 5.0]], [[-5.0, -6.0, -3.0], 
-[6.0, 0.0, 1.0], [4.0, 7.0, 4.0], [-5.0, -3.0, -5.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[1.0, -3.0], [4.0, 3.0], [-3.0, 7.0]], [[6.0, 6.0], [-3.0, -7.0], [6.0, 0.0]], [[-2.0, -3.0], 
-[-7.0, -7.0], [3.0, -6.0]], [[-1.0, 3.0], [3.0, 7.0], [7.0, 3.0]]], [[[-3.0, 3.0], [0.0, -1.0], [-1.0, 6.0]], [[0.0, 2.0], 
-[2.0, -4.0], [-5.0, -5.0]], [[0.0, 1.0], [0.0, 4.0], [-3.0, 7.0]], [[7.0, 2.0], [6.0, -2.0], [0.0, 1.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([63.0, 43.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       ref=-ref
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_constData_rank2_offset0(self):
-      arg0=Data(-1.0,self.functionspace)
-      arg1=Data(numpy.array([[0.0, -7.0, -1.0, 7.0, 6.0], [0.0, 7.0, -4.0, -4.0, -5.0], [-5.0, 2.0, -2.0, -6.0, -6.0], [2.0, 
--3.0, 0.0, 3.0, 4.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-0.0, 7.0, 1.0, -7.0, -6.0], [-0.0, -7.0, 4.0, 4.0, 5.0], [5.0, -2.0, 2.0, 6.0, 6.0], [-2.0, 3.0, 
--0.0, -3.0, -4.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([0.0, -2.0, 0.0]),self.functionspace)
-      arg1=Data(numpy.array([[[3.0, 0.0, -2.0, -4.0, -2.0], [2.0, -3.0, -3.0, -7.0, 0.0], [7.0, -3.0, -3.0, 6.0, -1.0], [0.0, 
-3.0, -3.0, -5.0, 3.0]], [[0.0, -1.0, 0.0, 1.0, -3.0], [4.0, -4.0, 5.0, -4.0, 0.0], [-1.0, -7.0, -2.0, 2.0, 0.0], [3.0, -4.0, 
-4.0, 0.0, 6.0]], [[-3.0, -5.0, -5.0, -4.0, 4.0], [-3.0, 0.0, 2.0, -7.0, 5.0], [-1.0, -5.0, 4.0, -4.0, -4.0], [0.0, -1.0, 6.0, 
-1.0, 0.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[0.0, 2.0, 0.0, -2.0, 6.0], [-8.0, 8.0, -10.0, 8.0, 0.0], [2.0, 14.0, 4.0, -4.0, 0.0], [-6.0, 8.0, 
--8.0, 0.0, -12.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[3.0, -5.0, 5.0], [0.0, 5.0, -7.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[[0.0, 5.0, -4.0, 1.0, 6.0], [7.0, 0.0, -6.0, 7.0, -1.0], [-6.0, -5.0, 0.0, 2.0, 6.0], [-5.0, 
-5.0, 7.0, 6.0, -2.0]], [[-4.0, -7.0, 0.0, -6.0, 0.0], [-4.0, 5.0, 5.0, -2.0, -1.0], [5.0, -1.0, 1.0, -6.0, -2.0], [1.0, -2.0, 
-3.0, -4.0, -7.0]], [[4.0, 3.0, -7.0, 1.0, -3.0], [-5.0, 1.0, 3.0, 6.0, 4.0], [0.0, -5.0, 1.0, -2.0, 4.0], [0.0, -3.0, -6.0, 
-0.0, -4.0]]], [[[5.0, 0.0, 0.0, -1.0, -4.0], [7.0, 5.0, 1.0, -6.0, 1.0], [-5.0, -5.0, -3.0, 4.0, -2.0], [-5.0, 3.0, 2.0, 4.0, 
-5.0]], [[2.0, 7.0, 2.0, -2.0, -6.0], [6.0, 0.0, 6.0, -6.0, 4.0], [-4.0, 0.0, 4.0, 5.0, -3.0], [3.0, 1.0, 2.0, -4.0, 0.0]], 
-[[-4.0, 2.0, 6.0, 1.0, -6.0], [-2.0, -2.0, -7.0, 6.0, 3.0], [-5.0, 7.0, 0.0, -6.0, -4.0], [-6.0, -1.0, -2.0, 0.0, 
--1.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[78.0, 86.0, -79.0, 21.0, 15.0], [60.0, -6.0, 51.0, -11.0, 21.0], [-28.0, -84.0, 20.0, 93.0, 61.0], 
-[37.0, 22.0, 0.0, 18.0, 16.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_constData_rank3_offset0(self):
-      arg0=Data(6.0,self.functionspace)
-      arg1=Data(numpy.array([[[-2.0, 5.0], [-4.0, 3.0]], [[-4.0, 2.0], [5.0, 7.0]], [[0.0, -6.0], [-7.0, 0.0]], [[-2.0, -3.0], 
-[-5.0, -4.0]], [[-2.0, 5.0], [4.0, -3.0]], [[4.0, 1.0], [-7.0, -1.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-12.0, 30.0], [-24.0, 18.0]], [[-24.0, 12.0], [30.0, 42.0]], [[0.0, -36.0], [-42.0, 0.0]], 
-[[-12.0, -18.0], [-30.0, -24.0]], [[-12.0, 30.0], [24.0, -18.0]], [[24.0, 6.0], [-42.0, -6.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank4_offset1(self):
-      arg0=Data(numpy.array([0.0, -7.0, 7.0]),self.functionspace)
-      arg1=Data(numpy.array([[[[-7.0, 6.0], [3.0, -5.0]], [[2.0, 3.0], [-2.0, 1.0]], [[-2.0, 4.0], [6.0, -1.0]], [[5.0, 5.0], 
-[4.0, 4.0]], [[4.0, 0.0], [5.0, 7.0]], [[-1.0, 6.0], [-2.0, -7.0]]], [[[3.0, -2.0], [3.0, -6.0]], [[0.0, -1.0], [-6.0, 0.0]], 
-[[-3.0, 6.0], [5.0, 6.0]], [[4.0, 3.0], [-6.0, -3.0]], [[-5.0, 0.0], [-7.0, 0.0]], [[0.0, -4.0], [-3.0, 7.0]]], [[[-1.0, 6.0], 
-[0.0, -1.0]], [[1.0, -6.0], [-4.0, -1.0]], [[5.0, 2.0], [-1.0, -6.0]], [[1.0, 3.0], [1.0, -6.0]], [[-7.0, -1.0], [2.0, 7.0]], 
-[[2.0, -6.0], [5.0, -4.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-28.0, 56.0], [-21.0, 35.0]], [[7.0, -35.0], [14.0, -7.0]], [[56.0, -28.0], [-42.0, -84.0]], 
-[[-21.0, 0.0], [49.0, -21.0]], [[-14.0, -7.0], [63.0, 49.0]], [[14.0, -14.0], [56.0, -77.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_float_rank0_constData_rank3_offset0(self):
+      arg0=2.0
+      arg1=Data(numpy.array([[[-7.0, -2.0], [5.0, -6.0]], [[7.0, -4.0], [6.0, 1.0]], [[7.0, -7.0], [1.0, 4.0]], [[-7.0, -2.0], 
+[0.0, 1.0]], [[-1.0, 7.0], [-1.0, -7.0]], [[1.0, 0.0], [-6.0, -6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-14.0, -4.0], [10.0, -12.0]], [[14.0, -8.0], [12.0, 2.0]], [[14.0, -14.0], [2.0, 8.0]], [[-14.0, 
+-4.0], [0.0, 2.0]], [[-2.0, 14.0], [-2.0, -14.0]], [[2.0, 0.0], [-12.0, -12.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_constData_rank4_offset0(self):
-      arg0=Data(-5.0,self.functionspace)
-      arg1=Data(numpy.array([[[[5.0, 0.0, -2.0, -5.0], [-3.0, -5.0, -4.0, 6.0], [5.0, -4.0, -1.0, 3.0]], [[-6.0, 0.0, 6.0, 
-2.0], [6.0, -3.0, 4.0, 6.0], [-3.0, 2.0, 1.0, 3.0]]], [[[0.0, 4.0, 4.0, 4.0], [-4.0, -6.0, -6.0, 0.0], [6.0, 7.0, 7.0, -2.0]], 
-[[-2.0, -5.0, 2.0, 3.0], [4.0, 2.0, -7.0, 6.0], [-7.0, 3.0, 5.0, 2.0]]], [[[-4.0, -1.0, -3.0, 6.0], [2.0, 7.0, 5.0, 2.0], 
-[-6.0, -7.0, 0.0, -6.0]], [[-5.0, -1.0, 4.0, 4.0], [-4.0, 4.0, -6.0, 0.0], [-5.0, 3.0, -5.0, -2.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-25.0, -0.0, 10.0, 25.0], [15.0, 25.0, 20.0, -30.0], [-25.0, 20.0, 5.0, -15.0]], [[30.0, -0.0, 
--30.0, -10.0], [-30.0, 15.0, -20.0, -30.0], [15.0, -10.0, -5.0, -15.0]]], [[[-0.0, -20.0, -20.0, -20.0], [20.0, 30.0, 30.0, 
--0.0], [-30.0, -35.0, -35.0, 10.0]], [[10.0, 25.0, -10.0, -15.0], [-20.0, -10.0, 35.0, -30.0], [35.0, -15.0, -25.0, -10.0]]], 
-[[[20.0, 5.0, 15.0, -30.0], [-10.0, -35.0, -25.0, -10.0], [30.0, 35.0, -0.0, 30.0]], [[25.0, 5.0, -20.0, -20.0], [20.0, -20.0, 
-30.0, -0.0], [25.0, -15.0, 25.0, 10.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_constData_rank4_offset0(self):
+      arg0=2.0
+      arg1=Data(numpy.array([[[[-4.0, -6.0, -6.0, 5.0], [5.0, -6.0, 1.0, 0.0], [2.0, -7.0, -6.0, 3.0]], [[5.0, -5.0, 6.0, 
+-1.0], [-1.0, 4.0, -1.0, 3.0], [7.0, 3.0, 2.0, 0.0]]], [[[-4.0, 1.0, 5.0, 3.0], [-5.0, 1.0, -4.0, -4.0], [-5.0, -3.0, 0.0, 
+-2.0]], [[4.0, 3.0, -5.0, 2.0], [-2.0, -6.0, 4.0, -1.0], [0.0, -5.0, -6.0, -4.0]]], [[[5.0, -3.0, 4.0, -6.0], [1.0, 0.0, -4.0, 
+-1.0], [-4.0, -7.0, 1.0, -1.0]], [[-6.0, -3.0, 0.0, -2.0], [-1.0, 0.0, 1.0, -6.0], [-2.0, 4.0, -6.0, 
+-1.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-8.0, -12.0, -12.0, 10.0], [10.0, -12.0, 2.0, 0.0], [4.0, -14.0, -12.0, 6.0]], [[10.0, -10.0, 
+12.0, -2.0], [-2.0, 8.0, -2.0, 6.0], [14.0, 6.0, 4.0, 0.0]]], [[[-8.0, 2.0, 10.0, 6.0], [-10.0, 2.0, -8.0, -8.0], [-10.0, -6.0, 
+0.0, -4.0]], [[8.0, 6.0, -10.0, 4.0], [-4.0, -12.0, 8.0, -2.0], [0.0, -10.0, -12.0, -8.0]]], [[[10.0, -6.0, 8.0, -12.0], [2.0, 
+0.0, -8.0, -2.0], [-8.0, -14.0, 2.0, -2.0]], [[-12.0, -6.0, 0.0, -4.0], [-2.0, 0.0, 2.0, -12.0], [-4.0, 8.0, -12.0, 
+-2.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_expandedData_rank0_offset0(self):
-      arg0=Data(-7.0,self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank0_offset0(self):
+      arg0=-2.0
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-5.0)+(1-msk_arg1)*(0.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*(6.0)+(1-msk_arg1)*(2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(-0.0)
+      ref=msk_ref*numpy.array(-12.0)+(1.-msk_ref)*numpy.array(-4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([-6.0, -1.0, -3.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank1_offset0(self):
+      arg0=4.0
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-3.0, -4.0, 3.0])+(1.-msk_arg1)*numpy.array([4.0, 4.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([3.0, -2.0])+(1.-msk_arg1)*numpy.array([-4.0, 1.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(13.0)+(1.-msk_ref)*numpy.array(-28.0)
+      ref=msk_ref*numpy.array([12.0, -8.0])+(1.-msk_ref)*numpy.array([-16.0, 4.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[5.0, 0.0, -1.0], [3.0, 6.0, 1.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank2_offset0(self):
+      arg0=-7.0
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 7.0, 0.0], [6.0, 6.0, -5.0]])+(1.-msk_arg1)*numpy.array([[0.0, 6.0, -4.0], [-4.0, -1.0, 
-3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[7.0, 6.0, -6.0, 3.0, 5.0], [6.0, -7.0, -4.0, -6.0, 6.0], [-2.0, 5.0, -7.0, -5.0, 3.0], [3.0, 
+0.0, 1.0, 5.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-6.0, -6.0, 3.0, 2.0, -1.0], [-4.0, -6.0, -1.0, 0.0, 6.0], [-7.0, 6.0, -6.0, 
+7.0, 0.0], [4.0, -6.0, 5.0, 1.0, 4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(49.0)+(1.-msk_ref)*numpy.array(-11.0)
+      ref=msk_ref*numpy.array([[-49.0, -42.0, 42.0, -21.0, -35.0], [-42.0, 49.0, 28.0, 42.0, -42.0], [14.0, -35.0, 49.0, 35.0, 
+-21.0], [-21.0, -0.0, -7.0, -35.0, -35.0]])+(1.-msk_ref)*numpy.array([[42.0, 42.0, -21.0, -14.0, 7.0], [28.0, 42.0, 7.0, -0.0, 
+-42.0], [49.0, -42.0, 42.0, -49.0, -0.0], [-28.0, 42.0, -35.0, -7.0, -28.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[1.0, -6.0, -6.0], [7.0, 0.0, 5.0], [1.0, 5.0, 0.0], [6.0, -5.0, -3.0]], [[7.0, -5.0, 6.0], 
-[-5.0, -2.0, 1.0], [7.0, 5.0, 7.0], [4.0, -4.0, -2.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank3_offset0(self):
+      arg0=1.0
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, 5.0, 1.0], [5.0, 4.0, -2.0], [5.0, 4.0, 3.0], [-2.0, 3.0, 0.0]], [[2.0, 2.0, 0.0], 
-[-7.0, 7.0, -6.0], [1.0, 1.0, -1.0], [1.0, -4.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 3.0, 0.0], [5.0, 2.0, 4.0], [-5.0, 
--1.0, 2.0], [-7.0, -1.0, 0.0]], [[-5.0, -7.0, 7.0], [0.0, 1.0, -5.0], [-6.0, -6.0, 4.0], [4.0, 1.0, -2.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      arg1=msk_arg1*numpy.array([[[0.0, -4.0], [1.0, 2.0]], [[1.0, -6.0], [-6.0, -7.0]], [[-5.0, 5.0], [0.0, -6.0]], [[-5.0, 
+-2.0], [-7.0, 7.0]], [[0.0, 6.0], [2.0, -6.0]], [[6.0, -5.0], [-3.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, -1.0], [-1.0, 
+-7.0]], [[-6.0, 1.0], [6.0, 0.0]], [[-3.0, -7.0], [-4.0, -7.0]], [[-5.0, -4.0], [6.0, -2.0]], [[-3.0, -3.0], [-7.0, 0.0]], 
+[[4.0, 5.0], [0.0, 4.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(40.0)+(1.-msk_ref)*numpy.array(-2.0)
+      ref=msk_ref*numpy.array([[[0.0, -4.0], [1.0, 2.0]], [[1.0, -6.0], [-6.0, -7.0]], [[-5.0, 5.0], [0.0, -6.0]], [[-5.0, 
+-2.0], [-7.0, 7.0]], [[0.0, 6.0], [2.0, -6.0]], [[6.0, -5.0], [-3.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, -1.0], [-1.0, 
+-7.0]], [[-6.0, 1.0], [6.0, 0.0]], [[-3.0, -7.0], [-4.0, -7.0]], [[-5.0, -4.0], [6.0, -2.0]], [[-3.0, -3.0], [-7.0, 0.0]], 
+[[4.0, 5.0], [0.0, 4.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[-5.0, 7.0], [-2.0, 7.0], [3.0, 7.0]], [[5.0, -4.0], [0.0, 0.0], [2.0, 5.0]]], [[[4.0, 6.0], 
-[4.0, -4.0], [-7.0, 1.0]], [[0.0, -6.0], [-6.0, 2.0], [2.0, 3.0]]], [[[-5.0, 6.0], [-6.0, 0.0], [-6.0, 4.0]], [[-2.0, 3.0], 
-[7.0, -6.0], [0.0, 6.0]]], [[[-5.0, -4.0], [0.0, -3.0], [-7.0, 4.0]], [[-3.0, 6.0], [0.0, 0.0], [5.0, 
-2.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank4_offset0(self):
+      arg0=-5.0
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[7.0, 5.0], [0.0, -5.0], [-4.0, -5.0]], [[0.0, -3.0], [4.0, 5.0], [6.0, -6.0]]], [[[-4.0, 
--3.0], [-6.0, 3.0], [-1.0, 0.0]], [[5.0, 1.0], [0.0, -6.0], [2.0, 5.0]]], [[[6.0, 7.0], [3.0, -1.0], [5.0, 6.0]], [[3.0, 1.0], 
-[-7.0, 0.0], [5.0, -5.0]]], [[[7.0, -4.0], [0.0, 5.0], [6.0, -6.0]], [[0.0, -4.0], [-2.0, 1.0], [-2.0, 
-2.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 4.0], [-5.0, 4.0], [0.0, -5.0]], [[-4.0, 0.0], [0.0, 3.0], [-5.0, -3.0]]], [[[1.0, 
--1.0], [-2.0, -4.0], [4.0, 3.0]], [[-5.0, 2.0], [0.0, -4.0], [4.0, 0.0]]], [[[-1.0, 0.0], [0.0, 4.0], [7.0, 0.0]], [[-4.0, 
--6.0], [-7.0, 2.0], [-4.0, 4.0]]], [[[3.0, 5.0], [-4.0, -6.0], [0.0, 2.0]], [[4.0, 0.0], [-2.0, 0.0], [-4.0, 0.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      arg1=msk_arg1*numpy.array([[[[4.0, -6.0, 7.0, 4.0], [4.0, 2.0, 3.0, -2.0], [4.0, 7.0, 4.0, 0.0]], [[1.0, -4.0, 6.0, 
+-6.0], [-7.0, -2.0, 3.0, -4.0], [6.0, -4.0, -6.0, 2.0]]], [[[-6.0, -7.0, 5.0, -3.0], [0.0, -1.0, -2.0, 3.0], [5.0, 5.0, 7.0, 
+-6.0]], [[-1.0, 0.0, -2.0, -4.0], [-3.0, -1.0, 3.0, -3.0], [-1.0, 1.0, 1.0, 2.0]]], [[[2.0, -7.0, 0.0, 0.0], [1.0, 4.0, 3.0, 
+-4.0], [-3.0, 7.0, 6.0, -4.0]], [[0.0, 6.0, -5.0, 0.0], [4.0, 3.0, 4.0, -1.0], [-7.0, -2.0, 3.0, 
+-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-3.0, -4.0, 3.0, -6.0], [-7.0, -2.0, -2.0, 3.0], [7.0, 1.0, 2.0, -7.0]], [[0.0, -2.0, 
+-4.0, 6.0], [-5.0, 6.0, 1.0, 3.0], [3.0, 7.0, -2.0, -1.0]]], [[[4.0, -7.0, 6.0, 2.0], [-4.0, -7.0, 5.0, 1.0], [2.0, 5.0, 3.0, 
+0.0]], [[-5.0, 4.0, -1.0, 0.0], [3.0, -3.0, 0.0, 1.0], [1.0, 2.0, 1.0, -3.0]]], [[[-1.0, -5.0, 5.0, 0.0], [5.0, 7.0, -3.0, 
+5.0], [0.0, -4.0, -4.0, -7.0]], [[-4.0, 1.0, 3.0, -2.0], [-7.0, 3.0, 6.0, 0.0], [3.0, -5.0, -6.0, -4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-374.0)+(1.-msk_ref)*numpy.array(-145.0)
+      ref=msk_ref*numpy.array([[[[-20.0, 30.0, -35.0, -20.0], [-20.0, -10.0, -15.0, 10.0], [-20.0, -35.0, -20.0, -0.0]], 
+[[-5.0, 20.0, -30.0, 30.0], [35.0, 10.0, -15.0, 20.0], [-30.0, 20.0, 30.0, -10.0]]], [[[30.0, 35.0, -25.0, 15.0], [-0.0, 5.0, 
+10.0, -15.0], [-25.0, -25.0, -35.0, 30.0]], [[5.0, -0.0, 10.0, 20.0], [15.0, 5.0, -15.0, 15.0], [5.0, -5.0, -5.0, -10.0]]], 
+[[[-10.0, 35.0, -0.0, -0.0], [-5.0, -20.0, -15.0, 20.0], [15.0, -35.0, -30.0, 20.0]], [[-0.0, -30.0, 25.0, -0.0], [-20.0, 
+-15.0, -20.0, 5.0], [35.0, 10.0, -15.0, 25.0]]]])+(1.-msk_ref)*numpy.array([[[[15.0, 20.0, -15.0, 30.0], [35.0, 10.0, 10.0, 
+-15.0], [-35.0, -5.0, -10.0, 35.0]], [[-0.0, 10.0, 20.0, -30.0], [25.0, -30.0, -5.0, -15.0], [-15.0, -35.0, 10.0, 5.0]]], 
+[[[-20.0, 35.0, -30.0, -10.0], [20.0, 35.0, -25.0, -5.0], [-10.0, -25.0, -15.0, -0.0]], [[25.0, -20.0, 5.0, -0.0], [-15.0, 
+15.0, -0.0, -5.0], [-5.0, -10.0, -5.0, 15.0]]], [[[5.0, 25.0, -25.0, -0.0], [-25.0, -35.0, 15.0, -25.0], [-0.0, 20.0, 20.0, 
+35.0]], [[20.0, -5.0, -15.0, 10.0], [35.0, -15.0, -30.0, -0.0], [-15.0, 25.0, 30.0, 20.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_expandedData_rank1_offset0(self):
-      arg0=Data(1.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, -3.0])+(1.-msk_arg1)*numpy.array([0.0, 5.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([1.0, -3.0])+(1.-msk_ref)*numpy.array([0.0, 5.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank0_float_rank0_offset0(self):
+      arg0=numpy.array(-1.0)
+      arg1=5.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(-5.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([7.0, 3.0, -1.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, -2.0], [4.0, -7.0], [6.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 7.0], [0.0, 6.0], 
-[-6.0, -7.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-29.0, -40.0])+(1.-msk_ref)*numpy.array([-43.0, 74.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank0_array_rank0_offset0(self):
+      arg0=numpy.array(-1.0)
+      arg1=numpy.array(1.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(-1.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[-6.0, -5.0, 4.0], [-6.0, -2.0, 1.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, 6.0], [-3.0, 5.0], [5.0, -3.0]], [[-3.0, -5.0], [-5.0, -2.0], [-5.0, 
--5.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 1.0], [5.0, 1.0], [-3.0, 6.0]], [[-4.0, -4.0], [0.0, -7.0], [-3.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([34.0, -44.0])+(1.-msk_ref)*numpy.array([-34.0, 48.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=1j*arg0
-        arg1=1j*arg1
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[-1.0, 4.0, 3.0], [4.0, 0.0, 3.0], [3.0, -4.0, -6.0], [7.0, 5.0, -4.0]], [[1.0, 4.0, -1.0], [5.0, 
--3.0, -5.0], [2.0, -5.0, 3.0], [-5.0, -2.0, 1.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-1.0, -1.0], [-4.0, -7.0], [0.0, 6.0]], [[-3.0, 6.0], [5.0, 7.0], [-1.0, -5.0]], [[3.0, 
--1.0], [-6.0, -2.0], [-3.0, 6.0]], [[5.0, 0.0], [2.0, -2.0], [0.0, 0.0]]], [[[-4.0, 5.0], [6.0, -3.0], [7.0, -6.0]], [[-4.0, 
-2.0], [2.0, -6.0], [1.0, -5.0]], [[3.0, 0.0], [1.0, -7.0], [-3.0, 0.0]], [[7.0, -6.0], [-4.0, 7.0], [-5.0, 
-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 0.0], [0.0, -4.0], [0.0, -1.0]], [[2.0, 5.0], [-4.0, 0.0], [-5.0, 5.0]], [[-7.0, 
-3.0], [-4.0, -3.0], [7.0, -5.0]], [[-3.0, -7.0], [-3.0, -3.0], [1.0, 1.0]]], [[[-4.0, 1.0], [-3.0, 7.0], [0.0, -6.0]], [[6.0, 
-5.0], [-4.0, -5.0], [3.0, -1.0]], [[-2.0, 6.0], [-7.0, 4.0], [-3.0, -5.0]], [[0.0, -2.0], [-1.0, -4.0], [1.0, -3.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([8.0, 67.0])+(1.-msk_ref)*numpy.array([-65.0, 71.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank1_array_rank1_offset1(self):
+      arg0=numpy.array([-7.0, 1.0, 3.0])
+      arg1=numpy.array([-1.0, -3.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array(4.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_expandedData_rank2_offset0(self):
-      arg0=Data(-2.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 2.0, -5.0, -7.0, 0.0], [-7.0, -2.0, -2.0, -3.0, -5.0], [-7.0, -2.0, -2.0, 0.0, 0.0], 
-[7.0, 2.0, 2.0, -6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 2.0, 0.0, -1.0, 0.0], [-1.0, 4.0, 1.0, -2.0, -1.0], [-7.0, 
--2.0, -7.0, 1.0, 3.0], [4.0, 6.0, 4.0, -7.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-2.0, -4.0, 10.0, 14.0, -0.0], [14.0, 4.0, 4.0, 6.0, 10.0], [14.0, 4.0, 4.0, -0.0, -0.0], 
-[-14.0, -4.0, -4.0, 12.0, 4.0]])+(1.-msk_ref)*numpy.array([[4.0, -4.0, -0.0, 2.0, -0.0], [2.0, -8.0, -2.0, 4.0, 2.0], [14.0, 
-4.0, 14.0, -2.0, -6.0], [-8.0, -12.0, -8.0, 14.0, -0.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank2_offset2(self):
+      arg0=numpy.array([[5.0, 0.0, 0.0], [3.0, 0.0, -5.0]])
+      arg1=numpy.array([[-4.0, 0.0, 6.0], [4.0, 2.0, 3.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array(-23.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([-3.0, -7.0, -3.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, 7.0, 6.0, 7.0, 1.0], [5.0, -5.0, 4.0, 1.0, 1.0], [-1.0, 2.0, -2.0, -7.0, 5.0], [-4.0, 
-0.0, -5.0, 0.0, -6.0]], [[-2.0, 1.0, -4.0, -1.0, 3.0], [4.0, 4.0, 4.0, 3.0, -4.0], [3.0, -2.0, -1.0, -6.0, 0.0], [-5.0, -6.0, 
--6.0, -4.0, -7.0]], [[3.0, -1.0, -5.0, 4.0, -2.0], [-5.0, 4.0, 5.0, 6.0, -3.0], [-5.0, 3.0, 1.0, 0.0, 0.0], [2.0, 7.0, 6.0, 
-4.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -4.0, 3.0, -3.0, -6.0], [-2.0, -4.0, -1.0, 6.0, -1.0], [6.0, 0.0, 0.0, 0.0, 
-5.0], [-4.0, -4.0, 5.0, -7.0, 0.0]], [[-2.0, 1.0, 1.0, -3.0, -3.0], [1.0, 6.0, -6.0, -2.0, 7.0], [2.0, 3.0, 0.0, 5.0, -5.0], 
-[4.0, 0.0, -4.0, -1.0, 2.0]], [[-3.0, 7.0, -5.0, -5.0, 5.0], [4.0, 4.0, -7.0, -7.0, -3.0], [7.0, -5.0, 6.0, -5.0, 0.0], [2.0, 
-7.0, 3.0, -3.0, 7.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-7.0, -25.0, 25.0, -26.0, -18.0], [-28.0, -25.0, -55.0, -42.0, 34.0], [-3.0, -1.0, 10.0, 63.0, 
--15.0], [41.0, 21.0, 39.0, 16.0, 88.0]])+(1.-msk_ref)*numpy.array([[26.0, -16.0, -1.0, 45.0, 24.0], [-13.0, -42.0, 66.0, 17.0, 
--37.0], [-53.0, -6.0, -18.0, -20.0, 20.0], [-22.0, -9.0, 4.0, 37.0, -35.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank3_offset3(self):
+      arg0=numpy.array([[[4.0, -6.0, 1.0], [-1.0, -5.0, 7.0], [-4.0, 0.0, 4.0], [-2.0, 4.0, 7.0]], [[5.0, 4.0, 5.0], [-6.0, 
+-7.0, -5.0], [-7.0, 3.0, -3.0], [2.0, 0.0, 0.0]]])
+      arg1=numpy.array([[[-4.0, 1.0, -6.0], [-5.0, -3.0, -4.0], [3.0, -5.0, 0.0], [4.0, -5.0, 4.0]], [[5.0, 7.0, 6.0], [0.0, 
+2.0, -7.0], [0.0, 3.0, 7.0], [-1.0, 3.0, 5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array(42.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[-2.0, -1.0, 3.0], [3.0, 2.0, 3.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-4.0, 4.0, 0.0, -3.0, 6.0], [5.0, -4.0, 4.0, 4.0, 2.0], [-7.0, -2.0, -3.0, -3.0, 5.0], 
-[-5.0, -4.0, -4.0, 1.0, -3.0]], [[-5.0, 7.0, -6.0, 1.0, 2.0], [-5.0, 4.0, 4.0, 6.0, -6.0], [7.0, 6.0, 6.0, 3.0, -3.0], [7.0, 
-4.0, 7.0, -6.0, -3.0]], [[2.0, -3.0, -3.0, -5.0, -6.0], [2.0, -4.0, 5.0, -4.0, -1.0], [1.0, -3.0, 1.0, -3.0, -2.0], [3.0, 7.0, 
-1.0, 0.0, -1.0]]], [[[4.0, -4.0, 0.0, 5.0, 2.0], [1.0, -3.0, 0.0, 0.0, -5.0], [-7.0, -5.0, -5.0, 0.0, -1.0], [6.0, -3.0, 7.0, 
-1.0, -3.0]], [[5.0, 4.0, 0.0, -4.0, 1.0], [1.0, 7.0, -7.0, 3.0, 5.0], [0.0, 4.0, 3.0, 7.0, -4.0], [-1.0, 4.0, -3.0, 4.0, 5.0]], 
-[[-6.0, 1.0, 5.0, -2.0, 2.0], [1.0, 6.0, -4.0, 1.0, -6.0], [-3.0, -6.0, 2.0, -7.0, 0.0], [3.0, 6.0, -5.0, -5.0, 
--1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, -4.0, 7.0, -4.0, 2.0], [5.0, -7.0, -5.0, -3.0, 4.0], [0.0, 6.0, -7.0, -2.0, 
--7.0], [-6.0, 7.0, -5.0, 4.0, -2.0]], [[6.0, 5.0, 6.0, -3.0, 0.0], [0.0, -7.0, 6.0, -5.0, -3.0], [-3.0, 1.0, 6.0, 5.0, -4.0], 
-[3.0, 0.0, 2.0, -5.0, 4.0]], [[-3.0, -3.0, 5.0, -5.0, 6.0], [3.0, -6.0, 7.0, 1.0, -5.0], [2.0, 5.0, 5.0, 5.0, 1.0], [1.0, -4.0, 
-3.0, 5.0, -6.0]]], [[[3.0, -7.0, 2.0, 6.0, 0.0], [1.0, 6.0, -4.0, -1.0, -7.0], [2.0, 4.0, -2.0, -7.0, 4.0], [6.0, 0.0, 1.0, 
-0.0, 4.0]], [[1.0, 1.0, 5.0, -1.0, 3.0], [5.0, 5.0, 6.0, 4.0, -5.0], [-3.0, 1.0, -3.0, -2.0, 0.0], [2.0, 1.0, -2.0, -5.0, 
--4.0]], [[-5.0, 7.0, -1.0, -5.0, -6.0], [-3.0, 3.0, 6.0, 7.0, -1.0], [-6.0, -6.0, 4.0, 1.0, -7.0], [-2.0, -6.0, -1.0, 2.0, 
--5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[23.0, -25.0, 12.0, -9.0, -18.0], [9.0, 15.0, -23.0, -17.0, -24.0], [-20.0, -36.0, 0.0, -13.0, 
--24.0], [37.0, 42.0, 4.0, 0.0, 4.0]])+(1.-msk_ref)*numpy.array([[-9.0, -4.0, 8.0, -3.0, 2.0], [3.0, 40.0, 43.0, 40.0, -54.0], 
-[-9.0, -2.0, 23.0, -8.0, 12.0], [28.0, -42.0, 13.0, 8.0, -29.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_array_rank4_offset4(self):
+      arg0=numpy.array([[[[-7.0, -2.0], [1.0, -7.0], [3.0, -2.0]], [[4.0, -3.0], [1.0, -6.0], [-5.0, 2.0]]], [[[-1.0, 1.0], 
+[5.0, 5.0], [0.0, 4.0]], [[7.0, 4.0], [-6.0, 2.0], [2.0, 4.0]]], [[[7.0, 4.0], [0.0, 2.0], [-3.0, 5.0]], [[-1.0, 1.0], [-3.0, 
+1.0], [4.0, -4.0]]], [[[3.0, 0.0], [-3.0, 5.0], [-7.0, -1.0]], [[-1.0, 3.0], [0.0, -6.0], [1.0, -4.0]]]])
+      arg1=numpy.array([[[[-7.0, 4.0], [6.0, 3.0], [0.0, 6.0]], [[6.0, 3.0], [-5.0, 1.0], [-7.0, 6.0]]], [[[7.0, 5.0], [-6.0, 
+5.0], [4.0, 5.0]], [[6.0, 6.0], [5.0, 4.0], [5.0, -1.0]]], [[[4.0, -6.0], [5.0, 6.0], [6.0, -6.0]], [[-2.0, 7.0], [-4.0, 7.0], 
+[-2.0, 0.0]]], [[[0.0, 1.0], [-2.0, 4.0], [0.0, -2.0]], [[2.0, -2.0], [-2.0, -6.0], [7.0, 5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=numpy.array(159.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_expandedData_rank3_offset0(self):
-      arg0=Data(4.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, 0.0], [-5.0, 4.0]], [[-4.0, 6.0], [0.0, 0.0]], [[-3.0, 0.0], [2.0, -4.0]], [[6.0, 
-7.0], [2.0, -2.0]], [[3.0, 2.0], [-6.0, 3.0]], [[5.0, 0.0], [6.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 0.0], [-6.0, 
-5.0]], [[2.0, 3.0], [7.0, -2.0]], [[1.0, 7.0], [0.0, 0.0]], [[-7.0, -7.0], [0.0, -7.0]], [[6.0, -7.0], [3.0, 0.0]], [[0.0, 
-5.0], [6.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-16.0, 0.0], [-20.0, 16.0]], [[-16.0, 24.0], [0.0, 0.0]], [[-12.0, 0.0], [8.0, -16.0]], 
-[[24.0, 28.0], [8.0, -8.0]], [[12.0, 8.0], [-24.0, 12.0]], [[20.0, 0.0], [24.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, 
-0.0], [-24.0, 20.0]], [[8.0, 12.0], [28.0, -8.0]], [[4.0, 28.0], [0.0, 0.0]], [[-28.0, -28.0], [0.0, -28.0]], [[24.0, -28.0], 
-[12.0, 0.0]], [[0.0, 20.0], [24.0, -12.0]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank0_array_rank1_offset0(self):
+      arg0=numpy.array(-3.0)
+      arg1=numpy.array([-4.0, 6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([12.0, -18.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank4_offset1(self):
-      arg0=Data(numpy.array([-6.0, -1.0, -4.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-4.0, 0.0], [-7.0, 7.0]], [[2.0, 3.0], [-4.0, 5.0]], [[-7.0, -1.0], [4.0, 4.0]], [[-4.0, 
--4.0], [0.0, -6.0]], [[4.0, -3.0], [-2.0, -2.0]], [[-5.0, 3.0], [-5.0, -6.0]]], [[[-7.0, 3.0], [-1.0, -6.0]], [[0.0, -1.0], 
-[-2.0, -3.0]], [[0.0, 5.0], [7.0, 3.0]], [[-6.0, 5.0], [-5.0, 0.0]], [[-2.0, 6.0], [2.0, 1.0]], [[4.0, -4.0], [-7.0, 5.0]]], 
-[[[-4.0, 3.0], [-5.0, -7.0]], [[-7.0, 6.0], [-6.0, 3.0]], [[5.0, 3.0], [4.0, 2.0]], [[-1.0, 7.0], [4.0, -5.0]], [[6.0, -6.0], 
-[3.0, 2.0]], [[-2.0, 3.0], [-3.0, 7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, -3.0], [7.0, 5.0]], [[-5.0, 3.0], [7.0, 4.0]], 
-[[7.0, -2.0], [0.0, 0.0]], [[2.0, -4.0], [7.0, 2.0]], [[-3.0, 6.0], [4.0, -2.0]], [[-4.0, -2.0], [0.0, 0.0]]], [[[1.0, 7.0], 
-[-5.0, -5.0]], [[5.0, 3.0], [7.0, 0.0]], [[-3.0, 0.0], [-5.0, -4.0]], [[1.0, 0.0], [5.0, -4.0]], [[0.0, -1.0], [0.0, 2.0]], 
-[[-5.0, 6.0], [4.0, 3.0]]], [[[7.0, -6.0], [-4.0, 6.0]], [[5.0, -1.0], [7.0, -4.0]], [[3.0, -6.0], [5.0, 2.0]], [[-6.0, 2.0], 
-[5.0, -5.0]], [[0.0, 7.0], [-7.0, 0.0]], [[5.0, 0.0], [-6.0, -2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[47.0, -15.0], [63.0, -8.0]], [[16.0, -41.0], [50.0, -39.0]], [[22.0, -11.0], [-47.0, -35.0]], 
-[[34.0, -9.0], [-11.0, 56.0]], [[-46.0, 36.0], [-2.0, 3.0]], [[34.0, -26.0], [49.0, 3.0]]])+(1.-msk_ref)*numpy.array([[[13.0, 
-35.0], [-21.0, -49.0]], [[5.0, -17.0], [-77.0, -8.0]], [[-51.0, 36.0], [-15.0, -4.0]], [[11.0, 16.0], [-67.0, 12.0]], [[18.0, 
--63.0], [4.0, 10.0]], [[9.0, 6.0], [20.0, 5.0]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank1_array_rank2_offset1(self):
+      arg0=numpy.array([-7.0, 6.0, 2.0])
+      arg1=numpy.array([[6.0, 1.0], [-1.0, -7.0], [3.0, -4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([-42.0, -57.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank0_expandedData_rank4_offset0(self):
-      arg0=Data(4.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[2.0, 3.0, 1.0, 0.0], [7.0, -4.0, -4.0, 0.0], [-4.0, 0.0, 4.0, -6.0]], [[-7.0, -7.0, -5.0, 
--5.0], [-6.0, -1.0, 3.0, -1.0], [2.0, 3.0, 4.0, -3.0]]], [[[7.0, 1.0, -1.0, 1.0], [7.0, -3.0, 7.0, 3.0], [-3.0, -3.0, -5.0, 
-0.0]], [[-6.0, 5.0, -5.0, 0.0], [-6.0, -6.0, 0.0, -6.0], [-2.0, -2.0, -3.0, 7.0]]], [[[-7.0, -5.0, 4.0, -4.0], [-2.0, 2.0, 
--2.0, -5.0], [-6.0, -3.0, -2.0, 2.0]], [[-5.0, 0.0, 1.0, -6.0], [-7.0, 2.0, 6.0, 0.0], [3.0, 1.0, 0.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, 5.0, 4.0, -6.0], [-4.0, 0.0, -2.0, -4.0], [-6.0, 0.0, 5.0, -4.0]], [[-3.0, 0.0, 
-1.0, -5.0], [-3.0, -5.0, 3.0, -7.0], [0.0, -6.0, -1.0, -7.0]]], [[[2.0, 7.0, 1.0, 2.0], [-2.0, -1.0, 4.0, -7.0], [4.0, -3.0, 
--6.0, 2.0]], [[-4.0, 6.0, -7.0, -3.0], [0.0, 2.0, 6.0, -5.0], [1.0, -2.0, -7.0, 7.0]]], [[[-2.0, -1.0, 3.0, -3.0], [-5.0, -6.0, 
-5.0, -1.0], [6.0, 1.0, -5.0, -7.0]], [[0.0, 1.0, 3.0, -2.0], [-3.0, -6.0, 4.0, 1.0], [-6.0, -6.0, -1.0, -7.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[8.0, 12.0, 4.0, 0.0], [28.0, -16.0, -16.0, 0.0], [-16.0, 0.0, 16.0, -24.0]], [[-28.0, -28.0, 
--20.0, -20.0], [-24.0, -4.0, 12.0, -4.0], [8.0, 12.0, 16.0, -12.0]]], [[[28.0, 4.0, -4.0, 4.0], [28.0, -12.0, 28.0, 12.0], 
-[-12.0, -12.0, -20.0, 0.0]], [[-24.0, 20.0, -20.0, 0.0], [-24.0, -24.0, 0.0, -24.0], [-8.0, -8.0, -12.0, 28.0]]], [[[-28.0, 
--20.0, 16.0, -16.0], [-8.0, 8.0, -8.0, -20.0], [-24.0, -12.0, -8.0, 8.0]], [[-20.0, 0.0, 4.0, -24.0], [-28.0, 8.0, 24.0, 0.0], 
-[12.0, 4.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[8.0, 20.0, 16.0, -24.0], [-16.0, 0.0, -8.0, -16.0], [-24.0, 0.0, 20.0, 
--16.0]], [[-12.0, 0.0, 4.0, -20.0], [-12.0, -20.0, 12.0, -28.0], [0.0, -24.0, -4.0, -28.0]]], [[[8.0, 28.0, 4.0, 8.0], [-8.0, 
--4.0, 16.0, -28.0], [16.0, -12.0, -24.0, 8.0]], [[-16.0, 24.0, -28.0, -12.0], [0.0, 8.0, 24.0, -20.0], [4.0, -8.0, -28.0, 
-28.0]]], [[[-8.0, -4.0, 12.0, -12.0], [-20.0, -24.0, 20.0, -4.0], [24.0, 4.0, -20.0, -28.0]], [[0.0, 4.0, 12.0, -8.0], [-12.0, 
--24.0, 16.0, 4.0], [-24.0, -24.0, -4.0, -28.0]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank3_offset2(self):
+      arg0=numpy.array([[6.0, 0.0, -6.0], [2.0, -2.0, -6.0]])
+      arg1=numpy.array([[[-1.0, 4.0], [6.0, -1.0], [1.0, -3.0]], [[-5.0, 7.0], [0.0, -7.0], [-2.0, 4.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([-10.0, 46.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=0)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_float_rank0_offset0(self):
-      arg0=Data(numpy.array([3.0, -7.0]),self.functionspace)
-      arg1=2.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([6.0, -14.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank4_offset3(self):
+      arg0=numpy.array([[[1.0, -2.0, 0.0], [7.0, 7.0, -6.0], [-7.0, -1.0, 0.0], [-3.0, 0.0, -4.0]], [[-1.0, -5.0, 1.0], [6.0, 
+7.0, 5.0], [6.0, -1.0, -7.0], [5.0, 7.0, 3.0]]])
+      arg1=numpy.array([[[[1.0, -4.0], [2.0, -2.0], [-1.0, 4.0]], [[-5.0, -7.0], [-6.0, 4.0], [0.0, 1.0]], [[-4.0, -1.0], [0.0, 
+7.0], [5.0, 1.0]], [[-5.0, -5.0], [-6.0, 7.0], [-3.0, 6.0]]], [[[7.0, -1.0], [-2.0, 1.0], [3.0, -6.0]], [[6.0, -5.0], [2.0, 
+2.0], [1.0, 2.0]], [[-2.0, 7.0], [-7.0, -5.0], [7.0, -4.0]], [[7.0, -4.0], [-4.0, 2.0], [-2.0, -3.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([-17.0, 8.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank0_offset0(self):
-      arg0=Data(numpy.array([-2.0, 2.0]),self.functionspace)
-      arg1=numpy.array(5.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-10.0, 10.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank0_array_rank2_offset0(self):
+      arg0=numpy.array(1.0)
+      arg1=numpy.array([[7.0, 4.0, -6.0, -7.0, 6.0], [-1.0, 4.0, -3.0, -7.0, 1.0], [-5.0, -4.0, -4.0, 7.0, -4.0], [0.0, 5.0, 
+7.0, 0.0, -1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[7.0, 4.0, -6.0, -7.0, 6.0], [-1.0, 4.0, -3.0, -7.0, 1.0], [-5.0, -4.0, -4.0, 7.0, -4.0], [0.0, 5.0, 
+7.0, 0.0, -1.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[7.0, -5.0, -1.0], [-7.0, 0.0, -4.0]]),self.functionspace)
-      arg1=numpy.array([-4.0, -7.0, -3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([10.0, 40.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank1_array_rank3_offset1(self):
+      arg0=numpy.array([2.0, 0.0, 4.0])
+      arg1=numpy.array([[[-7.0, 5.0, -6.0, -5.0, -2.0], [1.0, 1.0, 4.0, 0.0, 0.0], [-6.0, 1.0, 1.0, -7.0, 5.0], [0.0, 4.0, 7.0, 
+0.0, -5.0]], [[-3.0, -2.0, 5.0, 0.0, -5.0], [0.0, 1.0, 7.0, 7.0, 6.0], [-5.0, -5.0, -4.0, -6.0, -3.0], [4.0, 0.0, 7.0, -1.0, 
+-4.0]], [[3.0, 0.0, -5.0, -6.0, -7.0], [5.0, 6.0, -4.0, 5.0, -7.0], [-6.0, -2.0, 4.0, 0.0, -4.0], [0.0, -7.0, 2.0, -2.0, 
+-5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[-2.0, 10.0, -32.0, -34.0, -32.0], [22.0, 26.0, -8.0, 20.0, -28.0], [-36.0, -6.0, 18.0, -14.0, -6.0], 
+[0.0, -20.0, 22.0, -8.0, -30.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[[0.0, 5.0, 2.0], [1.0, 0.0, 6.0]], [[-4.0, 7.0, 0.0], [7.0, -5.0, 1.0]]]),self.functionspace)
-      arg1=numpy.array([[3.0, 5.0, 1.0], [0.0, -4.0, 6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([63.0, 49.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank4_offset2(self):
+      arg0=numpy.array([[-3.0, 5.0, -7.0], [-1.0, -6.0, -1.0]])
+      arg1=numpy.array([[[[-4.0, 4.0, 3.0, -7.0, 0.0], [-1.0, -7.0, 0.0, 4.0, -1.0], [0.0, -6.0, 3.0, 3.0, 1.0], [-3.0, -5.0, 
+-1.0, 3.0, -3.0]], [[-5.0, 6.0, 0.0, 5.0, 6.0], [0.0, 0.0, 3.0, 4.0, -3.0], [-7.0, 7.0, -7.0, -7.0, -3.0], [-3.0, 0.0, -1.0, 
+-6.0, -4.0]], [[-7.0, 3.0, 1.0, -2.0, 5.0], [-2.0, -2.0, -2.0, -4.0, -7.0], [3.0, 4.0, 5.0, 4.0, -6.0], [5.0, 0.0, 6.0, 2.0, 
+-1.0]]], [[[-3.0, 4.0, -2.0, 0.0, -1.0], [2.0, 0.0, -5.0, 7.0, -3.0], [2.0, -1.0, -1.0, 5.0, -6.0], [-7.0, 1.0, 2.0, -7.0, 
+-6.0]], [[4.0, -2.0, 6.0, 7.0, -2.0], [0.0, 2.0, -2.0, -4.0, -2.0], [-3.0, 0.0, 0.0, -2.0, -3.0], [-7.0, -1.0, -1.0, 5.0, 
+0.0]], [[3.0, 7.0, -6.0, 4.0, 5.0], [-1.0, -7.0, -7.0, -4.0, 2.0], [5.0, 1.0, -3.0, -5.0, -3.0], [5.0, -1.0, 0.0, 1.0, -1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[12.0, -2.0, -44.0, 14.0, 3.0], [16.0, 30.0, 53.0, 57.0, 50.0], [-45.0, 25.0, -75.0, -60.0, 51.0], [3.0, 
+21.0, -40.0, -77.0, 3.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[6.0, -6.0, -4.0], [4.0, 0.0, 4.0], [5.0, 7.0, 5.0], [0.0, 2.0, 0.0]], [[5.0, -5.0, -6.0], [0.0, 
-1.0, 4.0], [-6.0, -7.0, -5.0], [7.0, -1.0, 0.0]]], [[[3.0, 2.0, 4.0], [-7.0, -7.0, -6.0], [-6.0, 0.0, -5.0], [-5.0, 0.0, 
--5.0]], [[6.0, -6.0, 0.0], [-1.0, -3.0, -7.0], [-7.0, 3.0, 3.0], [7.0, 5.0, -2.0]]]]),self.functionspace)
-      arg1=numpy.array([[[-4.0, 0.0, -1.0], [2.0, 3.0, -2.0], [-3.0, -4.0, 6.0], [-3.0, 0.0, 4.0]], [[-4.0, 3.0, 4.0], [-4.0, 
--1.0, 4.0], [-3.0, 6.0, -5.0], [0.0, 6.0, -7.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([-82.0, -51.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank0_array_rank3_offset0(self):
+      arg0=numpy.array(0.0)
+      arg1=numpy.array([[[-1.0, -1.0], [-1.0, 4.0]], [[-3.0, -5.0], [4.0, 5.0]], [[-1.0, -4.0], [0.0, -2.0]], [[-5.0, 3.0], 
+[2.0, -4.0]], [[-2.0, 0.0], [3.0, 0.0]], [[0.0, -4.0], [-5.0, 3.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-0.0, -0.0], [-0.0, 0.0]], [[-0.0, -0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], 
+[0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [-0.0, 0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank1_offset0(self):
-      arg0=Data(numpy.array([3.0, -3.0]),self.functionspace)
-      arg1=numpy.array([-3.0, 7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-9.0, 21.0], [9.0, -21.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank1_array_rank4_offset1(self):
+      arg0=numpy.array([2.0, -4.0, 5.0])
+      arg1=numpy.array([[[[-7.0, 7.0], [2.0, 4.0]], [[4.0, -1.0], [3.0, 6.0]], [[-3.0, -3.0], [3.0, 6.0]], [[2.0, -4.0], [-1.0, 
+0.0]], [[-2.0, 7.0], [4.0, 6.0]], [[-4.0, 2.0], [4.0, -5.0]]], [[[5.0, 3.0], [0.0, 5.0]], [[-4.0, -5.0], [-2.0, -2.0]], [[-6.0, 
+-7.0], [1.0, -5.0]], [[0.0, -3.0], [-6.0, -1.0]], [[-1.0, 5.0], [5.0, -5.0]], [[3.0, 4.0], [-3.0, -2.0]]], [[[-6.0, 6.0], [6.0, 
+-3.0]], [[-2.0, -2.0], [-3.0, 0.0]], [[4.0, 7.0], [-2.0, 5.0]], [[-2.0, 3.0], [0.0, 1.0]], [[-1.0, 0.0], [6.0, 6.0]], [[2.0, 
+-3.0], [-5.0, -5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-64.0, 32.0], [34.0, -27.0]], [[14.0, 8.0], [-1.0, 20.0]], [[38.0, 57.0], [-8.0, 57.0]], [[-6.0, 
+19.0], [22.0, 9.0]], [[-5.0, -6.0], [18.0, 62.0]], [[-10.0, -27.0], [-5.0, -27.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[1.0, 0.0, 2.0], [5.0, 3.0, 1.0]]),self.functionspace)
-      arg1=numpy.array([[3.0, -1.0], [-4.0, -2.0], [1.0, -4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[5.0, -9.0], [4.0, -15.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank0_array_rank4_offset0(self):
+      arg0=numpy.array(6.0)
+      arg1=numpy.array([[[[-6.0, 6.0, 0.0, -7.0], [-3.0, 1.0, 0.0, 3.0], [3.0, -2.0, -2.0, -3.0]], [[0.0, 2.0, -7.0, -1.0], 
+[-1.0, -7.0, -3.0, 5.0], [2.0, 6.0, -1.0, 7.0]]], [[[-6.0, -5.0, 5.0, 1.0], [6.0, 7.0, 6.0, 4.0], [6.0, 0.0, 5.0, 0.0]], 
+[[-5.0, -3.0, -2.0, -5.0], [0.0, 4.0, -7.0, 0.0], [-7.0, -7.0, 2.0, -2.0]]], [[[-5.0, -3.0, 6.0, -3.0], [0.0, 2.0, -5.0, 3.0], 
+[0.0, -6.0, 3.0, 4.0]], [[1.0, 1.0, -4.0, 0.0], [6.0, -1.0, -6.0, -6.0], [-6.0, 1.0, 1.0, -5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-36.0, 36.0, 0.0, -42.0], [-18.0, 6.0, 0.0, 18.0], [18.0, -12.0, -12.0, -18.0]], [[0.0, 12.0, -42.0, 
+-6.0], [-6.0, -42.0, -18.0, 30.0], [12.0, 36.0, -6.0, 42.0]]], [[[-36.0, -30.0, 30.0, 6.0], [36.0, 42.0, 36.0, 24.0], [36.0, 
+0.0, 30.0, 0.0]], [[-30.0, -18.0, -12.0, -30.0], [0.0, 24.0, -42.0, 0.0], [-42.0, -42.0, 12.0, -12.0]]], [[[-30.0, -18.0, 36.0, 
+-18.0], [0.0, 12.0, -30.0, 18.0], [0.0, -36.0, 18.0, 24.0]], [[6.0, 6.0, -24.0, 0.0], [36.0, -6.0, -36.0, -36.0], [-36.0, 6.0, 
+6.0, -30.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[[-7.0, -7.0, 0.0], [6.0, 5.0, 7.0]], [[2.0, -7.0, 3.0], [2.0, 3.0, -2.0]]]),self.functionspace)
-      arg1=numpy.array([[[-3.0, 0.0], [3.0, 6.0], [-6.0, 7.0]], [[0.0, 6.0], [3.0, 5.0], [-3.0, -5.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-6.0, -16.0], [-30.0, 16.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[5.0, -7.0, -3.0], [3.0, -2.0, -6.0], [2.0, -2.0, -3.0], [1.0, -4.0, 4.0]], [[0.0, -4.0, 6.0], 
-[4.0, -4.0, 0.0], [0.0, -7.0, -2.0], [3.0, 4.0, 5.0]]], [[[0.0, 2.0, 0.0], [-1.0, 7.0, 5.0], [5.0, -5.0, 6.0], [6.0, 5.0, 
--7.0]], [[0.0, -3.0, -1.0], [-3.0, -6.0, 1.0], [0.0, 3.0, -3.0], [2.0, 7.0, 0.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[-6.0, -1.0], [-5.0, 4.0], [-6.0, 0.0]], [[-6.0, 0.0], [7.0, 7.0], [-2.0, 2.0]], [[-5.0, -1.0], 
-[-2.0, -3.0], [-5.0, 4.0]], [[7.0, -1.0], [6.0, 0.0], [6.0, -2.0]]], [[[6.0, 4.0], [4.0, -2.0], [0.0, 1.0]], [[6.0, -7.0], 
-[7.0, -2.0], [0.0, 0.0]], [[0.0, 5.0], [4.0, 0.0], [0.0, 0.0]], [[-6.0, 2.0], [-4.0, 0.0], [-4.0, -5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[-83.0, -101.0], [-80.0, 151.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_constData_rank0_offset0(self):
+      arg0=numpy.array(4.0)
+      arg1=Data(7.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(28.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank2_offset0(self):
-      arg0=Data(numpy.array([1.0, -2.0]),self.functionspace)
-      arg1=numpy.array([[-1.0, -3.0, 0.0, -4.0, 1.0], [1.0, -7.0, 0.0, -3.0, -1.0], [0.0, -3.0, 3.0, 4.0, 2.0], [1.0, -1.0, 
--1.0, -2.0, 1.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-1.0, -3.0, 0.0, -4.0, 1.0], [1.0, -7.0, 0.0, -3.0, -1.0], [0.0, -3.0, 3.0, 4.0, 2.0], [1.0, 
--1.0, -1.0, -2.0, 1.0]], [[2.0, 6.0, 0.0, 8.0, -2.0], [-2.0, 14.0, 0.0, 6.0, 2.0], [0.0, 6.0, -6.0, -8.0, -4.0], [-2.0, 2.0, 
-2.0, 4.0, -2.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank1_offset1(self):
+      arg0=numpy.array([-5.0, -6.0, -5.0])
+      arg1=Data(numpy.array([1.0, -1.0, 7.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-34.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank3_offset1(self):
-      arg0=Data(numpy.array([[3.0, -6.0, 2.0], [0.0, 5.0, 4.0]]),self.functionspace)
-      arg1=numpy.array([[[1.0, 6.0, 0.0, 6.0, 1.0], [0.0, 5.0, 6.0, 5.0, 1.0], [6.0, 0.0, -3.0, 0.0, -5.0], [-6.0, 6.0, -6.0, 
-0.0, -7.0]], [[-2.0, 4.0, -2.0, -2.0, 2.0], [6.0, -4.0, -2.0, 1.0, 1.0], [0.0, 5.0, 6.0, 0.0, -2.0], [6.0, -1.0, 7.0, 7.0, 
-0.0]], [[-3.0, 0.0, -2.0, 1.0, -1.0], [6.0, 4.0, 4.0, -6.0, 0.0], [2.0, -7.0, -5.0, 7.0, 2.0], [-5.0, 5.0, -7.0, 1.0, 1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[9.0, -6.0, 8.0, 32.0, -11.0], [-24.0, 47.0, 38.0, -3.0, -3.0], [22.0, -44.0, -55.0, 14.0, 1.0], 
-[-64.0, 34.0, -74.0, -40.0, -19.0]], [[-22.0, 20.0, -18.0, -6.0, 6.0], [54.0, -4.0, 6.0, -19.0, 5.0], [8.0, -3.0, 10.0, 28.0, 
--2.0], [10.0, 15.0, 7.0, 39.0, 4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank2_offset2(self):
+      arg0=numpy.array([[6.0, 0.0, 1.0], [-6.0, 6.0, -5.0]])
+      arg1=Data(numpy.array([[7.0, 0.0, 4.0], [6.0, -1.0, 4.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-16.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[[-2.0, 2.0, -7.0], [-2.0, 2.0, -5.0]], [[5.0, 5.0, -1.0], [6.0, 0.0, -3.0]]]),self.functionspace)
-      arg1=numpy.array([[[[4.0, 0.0, 7.0, -6.0, -3.0], [6.0, 0.0, -2.0, 5.0, -3.0], [7.0, 7.0, 5.0, -5.0, -3.0], [4.0, 6.0, 
--5.0, 0.0, 1.0]], [[-5.0, -4.0, 6.0, 3.0, 5.0], [5.0, 2.0, 7.0, -5.0, -4.0], [-4.0, 3.0, 0.0, 1.0, 2.0], [-2.0, 1.0, 3.0, -7.0, 
-5.0]], [[6.0, -7.0, -1.0, -6.0, 0.0], [-3.0, 5.0, 7.0, 5.0, 3.0], [6.0, -6.0, 5.0, -2.0, -3.0], [-3.0, -7.0, 6.0, 5.0, 4.0]]], 
-[[[5.0, -3.0, 5.0, 3.0, -3.0], [3.0, -7.0, 0.0, 0.0, 0.0], [4.0, 2.0, 6.0, -7.0, -2.0], [-1.0, 0.0, 4.0, 0.0, -2.0]], [[7.0, 
--6.0, -2.0, -7.0, 0.0], [-6.0, -2.0, -3.0, -4.0, -5.0], [0.0, -4.0, 2.0, -5.0, -2.0], [6.0, 3.0, -1.0, 1.0, -2.0]], [[3.0, 6.0, 
-4.0, 2.0, -2.0], [3.0, 0.0, 4.0, 0.0, 4.0], [-1.0, 0.0, 0.0, 5.0, 6.0], [-7.0, -2.0, -3.0, 4.0, 4.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-71.0, 5.0, -29.0, 30.0, 32.0], [-14.0, -21.0, -57.0, -63.0, -53.0], [-67.0, 22.0, -53.0, 5.0, 
-1.0], [58.0, 55.0, -21.0, -67.0, -40.0]], [[10.0, -49.0, 84.0, 3.0, -2.0], [67.0, -37.0, 6.0, -5.0, -50.0], [36.0, 68.0, 56.0, 
--75.0, -32.0], [28.0, 48.0, 17.0, -52.0, 2.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank3_offset3(self):
+      arg0=numpy.array([[[0.0, -7.0, 7.0], [-1.0, -3.0, -6.0], [0.0, -5.0, 2.0], [-5.0, 0.0, 5.0]], [[-2.0, -7.0, -4.0], [4.0, 
+-1.0, 5.0], [2.0, 0.0, 5.0], [7.0, 7.0, 0.0]]])
+      arg1=Data(numpy.array([[[4.0, -2.0, 5.0], [-2.0, 7.0, 7.0], [7.0, -7.0, 4.0], [2.0, 0.0, 6.0]], [[-1.0, 1.0, 4.0], [7.0, 
+3.0, -1.0], [3.0, -1.0, -1.0], [-3.0, -7.0, -6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-19.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_array_rank3_offset0(self):
-      arg0=Data(numpy.array([-4.0, 0.0]),self.functionspace)
-      arg1=numpy.array([[[4.0, -5.0], [6.0, 4.0]], [[7.0, -4.0], [7.0, 5.0]], [[-1.0, -6.0], [4.0, -1.0]], [[-5.0, -2.0], 
-[-6.0, -1.0]], [[6.0, -3.0], [0.0, -1.0]], [[-2.0, 1.0], [1.0, -1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-16.0, 20.0], [-24.0, -16.0]], [[-28.0, 16.0], [-28.0, -20.0]], [[4.0, 24.0], [-16.0, 4.0]], 
-[[20.0, 8.0], [24.0, 4.0]], [[-24.0, 12.0], [0.0, 4.0]], [[8.0, -4.0], [-4.0, 4.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
-0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank4_offset4(self):
+      arg0=numpy.array([[[[1.0, -7.0], [-1.0, 3.0], [6.0, -1.0]], [[-6.0, 4.0], [0.0, 3.0], [-2.0, 2.0]]], [[[-3.0, -2.0], 
+[-4.0, 6.0], [-3.0, 6.0]], [[0.0, 2.0], [-7.0, 0.0], [-7.0, 2.0]]], [[[2.0, 4.0], [7.0, 4.0], [1.0, 0.0]], [[6.0, 6.0], [-3.0, 
+-7.0], [-4.0, 7.0]]], [[[6.0, 2.0], [-3.0, 0.0], [-3.0, -5.0]], [[-3.0, 0.0], [0.0, 7.0], [-4.0, -1.0]]]])
+      arg1=Data(numpy.array([[[[5.0, 3.0], [3.0, 1.0], [-2.0, 5.0]], [[-7.0, 0.0], [-5.0, -1.0], [7.0, 0.0]]], [[[3.0, -1.0], 
+[6.0, -1.0], [7.0, -2.0]], [[2.0, 5.0], [4.0, -6.0], [0.0, -5.0]]], [[[7.0, -1.0], [-3.0, 3.0], [-1.0, 7.0]], [[-2.0, -6.0], 
+[-7.0, 2.0], [2.0, 5.0]]], [[[-7.0, 0.0], [5.0, 1.0], [-6.0, 6.0]], [[-6.0, 0.0], [-7.0, 0.0], [-5.0, 
+-1.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-150.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank4_offset1(self):
-      arg0=Data(numpy.array([[-2.0, 3.0, -5.0], [6.0, 3.0, -1.0]]),self.functionspace)
-      arg1=numpy.array([[[[1.0, -1.0], [-3.0, -3.0]], [[-1.0, -3.0], [1.0, 5.0]], [[-7.0, 2.0], [-2.0, -3.0]], [[1.0, -1.0], 
-[-1.0, 0.0]], [[-2.0, -3.0], [-7.0, 0.0]], [[-7.0, 0.0], [-4.0, 5.0]]], [[[-5.0, 6.0], [2.0, 6.0]], [[-1.0, 6.0], [2.0, 0.0]], 
-[[3.0, 5.0], [-2.0, -4.0]], [[-7.0, 5.0], [-1.0, -3.0]], [[5.0, 0.0], [2.0, -1.0]], [[-7.0, 1.0], [-6.0, -2.0]]], [[[-3.0, 
-0.0], [-3.0, 6.0]], [[5.0, -7.0], [2.0, -2.0]], [[-1.0, 5.0], [4.0, -2.0]], [[2.0, 4.0], [4.0, -5.0]], [[-4.0, 7.0], [2.0, 
-1.0]], [[-2.0, -1.0], [-7.0, 2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-2.0, 20.0], [27.0, -6.0]], [[-26.0, 59.0], [-6.0, 0.0]], [[28.0, -14.0], [-22.0, 4.0]], 
-[[-33.0, -3.0], [-21.0, 16.0]], [[39.0, -29.0], [10.0, -8.0]], [[3.0, 8.0], [25.0, -26.0]]], [[[-6.0, 12.0], [-9.0, -6.0]], 
-[[-14.0, 7.0], [10.0, 32.0]], [[-32.0, 22.0], [-22.0, -28.0]], [[-17.0, 5.0], [-13.0, -4.0]], [[7.0, -25.0], [-38.0, -4.0]], 
-[[-61.0, 4.0], [-35.0, 22.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_constData_rank1_offset0(self):
+      arg0=numpy.array(5.0)
+      arg1=Data(numpy.array([-5.0, -6.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-25.0, -30.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([2.0, 0.0]),self.functionspace)
-      arg1=Data(3.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([6.0, 0.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank2_offset1(self):
+      arg0=numpy.array([-6.0, 7.0, 6.0])
+      arg1=Data(numpy.array([[6.0, -6.0], [-6.0, 6.0], [-4.0, -6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-102.0, 42.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[2.0, 0.0, 6.0], [5.0, 7.0, 2.0]]),self.functionspace)
-      arg1=Data(numpy.array([6.0, 4.0, -4.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-12.0, 50.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank3_offset2(self):
+      arg0=numpy.array([[7.0, -6.0, 6.0], [5.0, 0.0, -6.0]])
+      arg1=Data(numpy.array([[[-7.0, -1.0], [4.0, 4.0], [3.0, -2.0]], [[-7.0, 3.0], [-6.0, -1.0], [-6.0, 
+4.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-54.0, -52.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[0.0, 3.0, -5.0], [1.0, 2.0, 1.0]], [[-3.0, 7.0, 1.0], [-1.0, 5.0, -4.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[4.0, -6.0, 2.0], [7.0, -7.0, 5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-30.0, -114.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank4_offset3(self):
+      arg0=numpy.array([[[-3.0, 1.0, 3.0], [2.0, 5.0, -4.0], [7.0, -3.0, 2.0], [-3.0, -6.0, -4.0]], [[-5.0, 0.0, 4.0], [-6.0, 
+3.0, 1.0], [1.0, 0.0, -2.0], [-5.0, -4.0, 4.0]]])
+      arg1=Data(numpy.array([[[[-4.0, 3.0], [3.0, -6.0], [-4.0, 4.0]], [[-1.0, -4.0], [3.0, -2.0], [6.0, -3.0]], [[0.0, -1.0], 
+[7.0, 0.0], [-4.0, 0.0]], [[-2.0, -5.0], [3.0, -3.0], [-6.0, 2.0]]], [[[4.0, 0.0], [0.0, -4.0], [-3.0, 5.0]], [[-3.0, 0.0], 
+[6.0, -5.0], [-5.0, -2.0]], [[2.0, 2.0], [3.0, 0.0], [0.0, 3.0]], [[1.0, -7.0], [3.0, -3.0], [4.0, -1.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-25.0, 51.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[7.0, -3.0, 6.0], [0.0, 2.0, -2.0], [2.0, -6.0, -2.0], [2.0, -5.0, 7.0]], [[0.0, -5.0, 6.0], 
-[6.0, -1.0, 2.0], [-7.0, 3.0, -7.0], [4.0, -7.0, 7.0]]], [[[-1.0, -3.0, 0.0], [-6.0, 7.0, -6.0], [-2.0, 5.0, 0.0], [-6.0, 0.0, 
--5.0]], [[5.0, -3.0, 5.0], [-7.0, -2.0, -2.0], [5.0, -6.0, -7.0], [-6.0, 3.0, 2.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-2.0, 4.0, 3.0], [-2.0, -3.0, -3.0], [6.0, -6.0, -5.0], [7.0, -3.0, 7.0]], [[5.0, -2.0, 4.0], 
-[5.0, 0.0, -7.0], [7.0, -4.0, -6.0], [0.0, -3.0, 6.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([222.0, 14.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_constData_rank2_offset0(self):
+      arg0=numpy.array(-3.0)
+      arg1=Data(numpy.array([[-6.0, 0.0, 2.0, -5.0, -6.0], [2.0, 2.0, 7.0, 4.0, 0.0], [-7.0, 4.0, 1.0, 6.0, -1.0], [7.0, 1.0, 
+-5.0, -7.0, 2.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[18.0, -0.0, -6.0, 15.0, 18.0], [-6.0, -6.0, -21.0, -12.0, -0.0], [21.0, -12.0, -3.0, -18.0, 3.0], 
+[-21.0, -3.0, 15.0, 21.0, -6.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([6.0, -5.0]),self.functionspace)
-      arg1=Data(numpy.array([2.0, -6.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[12.0, -36.0], [-10.0, 30.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank3_offset1(self):
+      arg0=numpy.array([2.0, 7.0, 1.0])
+      arg1=Data(numpy.array([[[-5.0, 3.0, -4.0, 1.0, 1.0], [7.0, -6.0, 2.0, 4.0, 2.0], [5.0, -1.0, 1.0, 2.0, 0.0], [6.0, 7.0, 
+3.0, -4.0, 5.0]], [[1.0, 0.0, -2.0, -6.0, -3.0], [0.0, 0.0, 1.0, -5.0, -7.0], [1.0, -2.0, -6.0, 6.0, 6.0], [-3.0, -4.0, 3.0, 
+-6.0, -7.0]], [[-3.0, -1.0, -4.0, 7.0, 2.0], [0.0, 5.0, 2.0, -5.0, 6.0], [-4.0, 7.0, 0.0, 0.0, -6.0], [-6.0, 0.0, -2.0, 6.0, 
+3.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-6.0, 5.0, -26.0, -33.0, -17.0], [14.0, -7.0, 13.0, -32.0, -39.0], [13.0, -9.0, -40.0, 46.0, 
+36.0], [-15.0, -14.0, 25.0, -44.0, -36.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[7.0, 5.0, 3.0], [-4.0, -5.0, -6.0]]),self.functionspace)
-      arg1=Data(numpy.array([[0.0, -3.0], [-6.0, -3.0], [6.0, -7.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-12.0, -57.0], [-6.0, 69.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank4_offset2(self):
+      arg0=numpy.array([[-6.0, -3.0, -4.0], [-7.0, -1.0, 2.0]])
+      arg1=Data(numpy.array([[[[-5.0, 4.0, -1.0, 1.0, -6.0], [1.0, 0.0, -4.0, -2.0, 3.0], [-5.0, -3.0, 7.0, 4.0, 0.0], [-2.0, 
+4.0, -2.0, 1.0, 6.0]], [[-1.0, -4.0, 7.0, 5.0, -4.0], [-4.0, 7.0, 2.0, 5.0, -3.0], [5.0, -5.0, -6.0, 1.0, 3.0], [0.0, -5.0, 
+0.0, 2.0, 1.0]], [[-6.0, 1.0, 0.0, 6.0, 0.0], [-6.0, 0.0, 2.0, 0.0, 6.0], [2.0, -3.0, 4.0, -4.0, 2.0], [0.0, 3.0, -7.0, 5.0, 
+0.0]]], [[[-7.0, -7.0, -2.0, 3.0, 5.0], [-1.0, 0.0, -1.0, 7.0, -6.0], [-1.0, 3.0, 5.0, 3.0, -1.0], [2.0, 7.0, -4.0, 6.0, 7.0]], 
+[[-1.0, 7.0, 5.0, -7.0, 7.0], [0.0, -1.0, 2.0, -4.0, 6.0], [-4.0, -4.0, 4.0, -7.0, -5.0], [5.0, -2.0, -5.0, -3.0, 0.0]], 
+[[-2.0, 4.0, 7.0, -6.0, 3.0], [7.0, 2.0, -2.0, 4.0, -1.0], [-3.0, 5.0, 1.0, 4.0, -6.0], [3.0, -3.0, 7.0, 3.0, 
+4.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[103.0, 34.0, 8.0, -71.0, 12.0], [51.0, -16.0, 11.0, -40.0, 1.0], [12.0, 38.0, -77.0, -17.0, 
+-17.0], [-1.0, -74.0, 87.0, -65.0, -80.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[-7.0, -6.0, 4.0], [4.0, -6.0, 6.0]], [[4.0, 2.0, -3.0], [-3.0, 0.0, -3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[0.0, -1.0], [-7.0, -1.0], [0.0, 5.0]], [[3.0, 5.0], [-5.0, 4.0], [-6.0, 
-0.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[48.0, 29.0], [-5.0, -36.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_constData_rank3_offset0(self):
+      arg0=numpy.array(1.0)
+      arg1=Data(numpy.array([[[-2.0, 0.0], [-4.0, -7.0]], [[-6.0, -2.0], [3.0, 4.0]], [[0.0, 4.0], [-6.0, 0.0]], [[0.0, -6.0], 
+[5.0, -1.0]], [[-4.0, 1.0], [-7.0, 5.0]], [[2.0, -5.0], [4.0, -4.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-2.0, 0.0], [-4.0, -7.0]], [[-6.0, -2.0], [3.0, 4.0]], [[0.0, 4.0], [-6.0, 0.0]], [[0.0, -6.0], 
+[5.0, -1.0]], [[-4.0, 1.0], [-7.0, 5.0]], [[2.0, -5.0], [4.0, -4.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[0.0, 5.0, -5.0], [5.0, 6.0, 4.0], [3.0, -2.0, 0.0], [-3.0, 4.0, 4.0]], [[1.0, 7.0, -1.0], [0.0, 
--1.0, -5.0], [-2.0, 2.0, -1.0], [-1.0, -3.0, -6.0]]], [[[6.0, -6.0, -6.0], [-5.0, -6.0, 5.0], [-5.0, 3.0, 2.0], [5.0, 1.0, 
-6.0]], [[1.0, -3.0, 0.0], [-3.0, -1.0, 0.0], [-4.0, 0.0, -3.0], [7.0, -4.0, 2.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-7.0, -2.0], [-7.0, -3.0], [1.0, 4.0]], [[5.0, -4.0], [5.0, 5.0], [7.0, 1.0]], [[-7.0, 5.0], 
-[-1.0, 3.0], [-1.0, 5.0]], [[2.0, 7.0], [5.0, 5.0], [4.0, -3.0]]], [[[3.0, -4.0], [5.0, -6.0], [-6.0, 4.0]], [[-3.0, 7.0], 
-[-3.0, -2.0], [-6.0, 7.0]], [[1.0, 0.0], [5.0, 0.0], [-1.0, -6.0]], [[5.0, -5.0], [3.0, 0.0], [-3.0, 
--6.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[144.0, -61.0], [59.0, -41.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank4_offset1(self):
+      arg0=numpy.array([-5.0, -6.0, 2.0])
+      arg1=Data(numpy.array([[[[0.0, 4.0], [0.0, 7.0]], [[7.0, -6.0], [-1.0, -4.0]], [[-3.0, -6.0], [-1.0, 5.0]], [[7.0, 4.0], 
+[-6.0, 0.0]], [[3.0, -3.0], [-4.0, -3.0]], [[0.0, -6.0], [1.0, 6.0]]], [[[-1.0, 0.0], [0.0, -4.0]], [[7.0, -4.0], [1.0, 2.0]], 
+[[-1.0, 0.0], [-6.0, -5.0]], [[1.0, -1.0], [2.0, -4.0]], [[-3.0, -3.0], [3.0, -3.0]], [[-1.0, -5.0], [-1.0, -2.0]]], [[[-6.0, 
+1.0], [-7.0, 6.0]], [[-7.0, -5.0], [7.0, 4.0]], [[-4.0, -5.0], [-6.0, 0.0]], [[4.0, 2.0], [-6.0, -6.0]], [[3.0, 7.0], [-4.0, 
+1.0]], [[-2.0, 0.0], [6.0, 7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-6.0, -18.0], [-14.0, 1.0]], [[-91.0, 44.0], [13.0, 16.0]], [[13.0, 20.0], [29.0, 5.0]], [[-33.0, 
+-10.0], [6.0, 12.0]], [[9.0, 47.0], [-6.0, 35.0]], [[2.0, 60.0], [13.0, -4.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank2_offset0(self):
-      arg0=Data(numpy.array([5.0, -2.0]),self.functionspace)
-      arg1=Data(numpy.array([[0.0, -2.0, 3.0, -7.0, 1.0], [0.0, 1.0, 0.0, -7.0, -7.0], [-1.0, -1.0, 7.0, 0.0, 3.0], [-5.0, 1.0, 
-3.0, 6.0, -4.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, -10.0, 15.0, -35.0, 5.0], [0.0, 5.0, 0.0, -35.0, -35.0], [-5.0, -5.0, 35.0, 0.0, 15.0], 
-[-25.0, 5.0, 15.0, 30.0, -20.0]], [[0.0, 4.0, -6.0, 14.0, -2.0], [0.0, -2.0, 0.0, 14.0, 14.0], [2.0, 2.0, -14.0, 0.0, -6.0], 
-[10.0, -2.0, -6.0, -12.0, 8.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_constData_rank4_offset0(self):
+      arg0=numpy.array(-3.0)
+      arg1=Data(numpy.array([[[[1.0, 0.0, -6.0, 0.0], [4.0, -2.0, -5.0, -5.0], [3.0, 7.0, 5.0, -4.0]], [[4.0, 0.0, 4.0, 4.0], 
+[6.0, 0.0, -1.0, 7.0], [7.0, -2.0, -5.0, -1.0]]], [[[-4.0, 0.0, 2.0, 6.0], [0.0, 0.0, 3.0, 0.0], [-2.0, 5.0, -3.0, 4.0]], 
+[[-5.0, -1.0, -7.0, 0.0], [1.0, 4.0, 4.0, 3.0], [0.0, -5.0, -5.0, -7.0]]], [[[-1.0, 5.0, -5.0, 0.0], [5.0, -3.0, -4.0, -3.0], 
+[-4.0, 1.0, 0.0, -5.0]], [[3.0, -6.0, 1.0, 4.0], [-6.0, -4.0, 3.0, -7.0], [0.0, -3.0, -4.0, -1.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-3.0, -0.0, 18.0, -0.0], [-12.0, 6.0, 15.0, 15.0], [-9.0, -21.0, -15.0, 12.0]], [[-12.0, -0.0, 
+-12.0, -12.0], [-18.0, -0.0, 3.0, -21.0], [-21.0, 6.0, 15.0, 3.0]]], [[[12.0, -0.0, -6.0, -18.0], [-0.0, -0.0, -9.0, -0.0], 
+[6.0, -15.0, 9.0, -12.0]], [[15.0, 3.0, 21.0, -0.0], [-3.0, -12.0, -12.0, -9.0], [-0.0, 15.0, 15.0, 21.0]]], [[[3.0, -15.0, 
+15.0, -0.0], [-15.0, 9.0, 12.0, 9.0], [12.0, -3.0, -0.0, 15.0]], [[-9.0, 18.0, -3.0, -12.0], [18.0, 12.0, -9.0, 21.0], [-0.0, 
+9.0, 12.0, 3.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([[0.0, 6.0, -4.0], [-6.0, -6.0, -3.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[-1.0, -2.0, -1.0, 3.0, 3.0], [0.0, 0.0, 5.0, -2.0, 3.0], [3.0, -6.0, 3.0, 3.0, 6.0], [-2.0, 
--6.0, 7.0, 5.0, 2.0]], [[0.0, -5.0, -6.0, -7.0, 3.0], [5.0, 5.0, 5.0, -5.0, 4.0], [3.0, 4.0, 2.0, -6.0, -5.0], [1.0, 0.0, -1.0, 
-5.0, -2.0]], [[5.0, 2.0, 6.0, -7.0, -2.0], [0.0, -2.0, -6.0, -5.0, 5.0], [0.0, 0.0, 0.0, -4.0, -5.0], [3.0, 0.0, -4.0, 4.0, 
-3.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-20.0, -38.0, -60.0, -14.0, 26.0], [30.0, 38.0, 54.0, -10.0, 4.0], [18.0, 24.0, 12.0, -20.0, 
--10.0], [-6.0, 0.0, 10.0, 14.0, -24.0]], [[-9.0, 36.0, 24.0, 45.0, -30.0], [-30.0, -24.0, -42.0, 57.0, -57.0], [-36.0, 12.0, 
--30.0, 30.0, 9.0], [-3.0, 36.0, -24.0, -72.0, -9.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank0_offset0(self):
+      arg0=numpy.array(-4.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-0.0)+(1.-msk_ref)*numpy.array(20.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[-3.0, 4.0, -1.0], [1.0, -7.0, -7.0]], [[2.0, 5.0, 1.0], [0.0, -1.0, -6.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-1.0, -1.0, 0.0, 6.0, 3.0], [-3.0, 4.0, -6.0, 7.0, 3.0], [7.0, -3.0, -4.0, 3.0, 6.0], [0.0, 
-2.0, 0.0, 7.0, -1.0]], [[4.0, -4.0, 2.0, -2.0, -7.0], [1.0, 7.0, 2.0, -6.0, -7.0], [-1.0, 5.0, -1.0, 5.0, -2.0], [-6.0, -6.0, 
--5.0, -5.0, -2.0]], [[0.0, 7.0, -7.0, 2.0, 7.0], [-3.0, 4.0, 6.0, -5.0, 1.0], [5.0, 6.0, 7.0, -5.0, 5.0], [-3.0, 0.0, 2.0, 
--3.0, -5.0]]], [[[-6.0, -7.0, 2.0, 6.0, 1.0], [0.0, -1.0, -6.0, -4.0, -2.0], [5.0, -1.0, 6.0, 5.0, -4.0], [-2.0, -1.0, 4.0, 
--3.0, 0.0]], [[7.0, -1.0, -3.0, 0.0, -4.0], [0.0, -6.0, -6.0, 7.0, 5.0], [1.0, 3.0, 1.0, -2.0, -1.0], [1.0, 6.0, 0.0, 7.0, 
-7.0]], [[-3.0, 6.0, 1.0, -4.0, -7.0], [-6.0, -3.0, 6.0, 7.0, 0.0], [2.0, -3.0, -1.0, -3.0, 4.0], [-7.0, -4.0, -5.0, -6.0, 
-6.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-15.0, -62.0, 31.0, 6.0, 34.0], [58.0, 74.0, 14.0, -142.0, -75.0], [-46.0, 22.0, 7.0, 56.0, 
--56.0], [19.0, -45.0, 17.0, -48.0, -91.0]], [[29.0, -50.0, 0.0, 28.0, 24.0], [32.0, 71.0, -26.0, -70.0, -33.0], [1.0, 40.0, 
--1.0, 46.0, -16.0], [8.0, -8.0, 7.0, 15.0, -60.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank1_offset1(self):
+      arg0=numpy.array([7.0, 4.0, -1.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, 1.0, 0.0])+(1.-msk_arg1)*numpy.array([-5.0, -7.0, -2.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(32.0)+(1.-msk_ref)*numpy.array(-61.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_constData_rank3_offset0(self):
-      arg0=Data(numpy.array([6.0, 3.0]),self.functionspace)
-      arg1=Data(numpy.array([[[2.0, 0.0], [0.0, 2.0]], [[4.0, 4.0], [-1.0, 4.0]], [[0.0, 7.0], [3.0, -5.0]], [[-5.0, -7.0], 
-[-6.0, -1.0]], [[5.0, 2.0], [-6.0, 7.0]], [[4.0, 7.0], [0.0, -4.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[12.0, 0.0], [0.0, 12.0]], [[24.0, 24.0], [-6.0, 24.0]], [[0.0, 42.0], [18.0, -30.0]], [[-30.0, 
--42.0], [-36.0, -6.0]], [[30.0, 12.0], [-36.0, 42.0]], [[24.0, 42.0], [0.0, -24.0]]], [[[6.0, 0.0], [0.0, 6.0]], [[12.0, 12.0], 
-[-3.0, 12.0]], [[0.0, 21.0], [9.0, -15.0]], [[-15.0, -21.0], [-18.0, -3.0]], [[15.0, 6.0], [-18.0, 21.0]], [[12.0, 21.0], [0.0, 
--12.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[-5.0, 4.0, -2.0], [6.0, 4.0, 7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[2.0, 1.0, 0.0], [5.0, -6.0, 1.0]])+(1.-msk_arg1)*numpy.array([[1.0, -4.0, -7.0], [-5.0, 3.0, 
+6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(7.0)+(1.-msk_ref)*numpy.array(17.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank4_offset1(self):
-      arg0=Data(numpy.array([[3.0, -3.0, 0.0], [-6.0, -7.0, 6.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-2.0, 7.0], [-6.0, -3.0]], [[4.0, -4.0], [3.0, 4.0]], [[4.0, -6.0], [5.0, 4.0]], [[-7.0, 3.0], 
-[2.0, 6.0]], [[-3.0, 3.0], [0.0, -2.0]], [[-7.0, -7.0], [4.0, 2.0]]], [[[4.0, 7.0], [-3.0, -1.0]], [[-1.0, -5.0], [0.0, 6.0]], 
-[[2.0, 5.0], [4.0, 6.0]], [[0.0, 2.0], [-3.0, -1.0]], [[4.0, -1.0], [-6.0, -3.0]], [[-6.0, -7.0], [-3.0, 1.0]]], [[[0.0, 5.0], 
-[4.0, 1.0]], [[0.0, -3.0], [1.0, 7.0]], [[3.0, 4.0], [-1.0, 4.0]], [[4.0, 7.0], [2.0, 4.0]], [[4.0, 1.0], [-7.0, -7.0]], 
-[[-6.0, -1.0], [-2.0, 0.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-18.0, 0.0], [-9.0, -6.0]], [[15.0, 3.0], [9.0, -6.0]], [[6.0, -33.0], [3.0, -6.0]], [[-21.0, 
-3.0], [15.0, 21.0]], [[-21.0, 12.0], [18.0, 3.0]], [[-3.0, 0.0], [21.0, 3.0]]], [[[-16.0, -61.0], [81.0, 31.0]], [[-17.0, 
-41.0], [-12.0, -24.0]], [[-20.0, 25.0], [-64.0, -42.0]], [[66.0, 10.0], [21.0, -5.0]], [[14.0, -5.0], [0.0, -9.0]], [[48.0, 
-85.0], [-15.0, -19.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank3_offset3(self):
+      arg0=numpy.array([[[5.0, -7.0, 1.0], [0.0, 1.0, 1.0], [-5.0, -2.0, -5.0], [-2.0, 1.0, 6.0]], [[-1.0, -5.0, 7.0], [-3.0, 
+6.0, -4.0], [2.0, -7.0, 7.0], [-7.0, 1.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-6.0, 3.0, -5.0], [-3.0, 4.0, 1.0], [-5.0, 2.0, 6.0], [-7.0, -4.0, 3.0]], [[0.0, 2.0, -3.0], 
+[6.0, -7.0, -1.0], [0.0, 2.0, 3.0], [4.0, 0.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 6.0, -5.0], [-5.0, -6.0, -4.0], [3.0, 
+3.0, -6.0], [0.0, -4.0, -4.0]], [[3.0, 2.0, 2.0], [3.0, 6.0, 5.0], [0.0, -1.0, 7.0], [5.0, 6.0, 4.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-176.0)+(1.-msk_ref)*numpy.array(-50.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([2.0, 1.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank4_offset4(self):
+      arg0=numpy.array([[[[-1.0, 6.0], [0.0, 0.0], [-4.0, -5.0]], [[-7.0, 0.0], [-6.0, -2.0], [3.0, 4.0]]], [[[2.0, 0.0], [5.0, 
+-3.0], [-1.0, 7.0]], [[4.0, 1.0], [6.0, 0.0], [7.0, 7.0]]], [[[4.0, 2.0], [1.0, 2.0], [-7.0, -3.0]], [[-1.0, 0.0], [7.0, 0.0], 
+[-5.0, 3.0]]], [[[0.0, -3.0], [2.0, 6.0], [0.0, 1.0]], [[5.0, -4.0], [5.0, -6.0], [-1.0, -5.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(7.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[-6.0, 5.0], [3.0, 2.0], [7.0, 7.0]], [[-2.0, 7.0], [-1.0, -7.0], [0.0, -6.0]]], [[[-7.0, 
+1.0], [5.0, 1.0], [-4.0, 5.0]], [[-6.0, 7.0], [1.0, -1.0], [1.0, -3.0]]], [[[6.0, -4.0], [-6.0, 6.0], [0.0, -4.0]], [[-6.0, 
+-5.0], [7.0, 0.0], [-1.0, 0.0]]], [[[6.0, 6.0], [-2.0, -3.0], [-6.0, -2.0]], [[-2.0, 2.0], [-5.0, -4.0], [6.0, 
+-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 1.0], [2.0, -2.0], [-4.0, 7.0]], [[0.0, -2.0], [-5.0, -2.0], [-1.0, -5.0]]], 
+[[[5.0, 2.0], [-1.0, -3.0], [-1.0, 0.0]], [[1.0, -3.0], [0.0, -7.0], [-5.0, -2.0]]], [[[-6.0, -4.0], [-6.0, 5.0], [4.0, -1.0]], 
+[[-1.0, 6.0], [-7.0, 1.0], [0.0, 3.0]]], [[[1.0, -2.0], [-3.0, 0.0], [3.0, 2.0]], [[1.0, 1.0], [-2.0, -5.0], [-2.0, -1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-6.0, -3.0])+(1.-msk_ref)*numpy.array([14.0, 7.0])
+      ref=msk_ref*numpy.array(67.0)+(1.-msk_ref)*numpy.array(-100.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[6.0, -6.0, 1.0], [-3.0, 2.0, -2.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank1_offset0(self):
+      arg0=numpy.array(3.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, 5.0, -3.0])+(1.-msk_arg1)*numpy.array([5.0, 6.0, -4.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([4.0, 0.0])+(1.-msk_arg1)*numpy.array([2.0, 6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-27.0, 13.0])+(1.-msk_ref)*numpy.array([-10.0, 5.0])
+      ref=msk_ref*numpy.array([12.0, 0.0])+(1.-msk_ref)*numpy.array([6.0, 18.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[7.0, 0.0, -7.0], [7.0, 0.0, -3.0]], [[4.0, 6.0, 3.0], [0.0, 0.0, -7.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank2_offset1(self):
+      arg0=numpy.array([0.0, 1.0, -7.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, 6.0, -4.0], [0.0, 4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 2.0, -1.0], [4.0, -1.0, 
--3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[-5.0, 2.0], [-2.0, 0.0], [6.0, 2.0]])+(1.-msk_arg1)*numpy.array([[0.0, -5.0], [0.0, -7.0], 
+[-5.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-5.0, -16.0])+(1.-msk_ref)*numpy.array([16.0, 14.0])
+      ref=msk_ref*numpy.array([-44.0, -14.0])+(1.-msk_ref)*numpy.array([35.0, -7.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[5.0, -2.0, 4.0], [-1.0, 2.0, 3.0], [-5.0, 4.0, 6.0], [-2.0, 1.0, 4.0]], [[-5.0, 1.0, -4.0], 
-[-2.0, -7.0, 1.0], [7.0, 0.0, -7.0], [6.0, 0.0, 0.0]]], [[[-3.0, 0.0, 6.0], [0.0, -4.0, 5.0], [2.0, 1.0, 5.0], [0.0, 1.0, 
-3.0]], [[-7.0, -4.0, -4.0], [7.0, -3.0, -3.0], [-2.0, -3.0, 0.0], [-1.0, -6.0, -3.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[-7.0, -6.0, -4.0], [-6.0, 0.0, 5.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, 4.0, 6.0], [-3.0, 2.0, -4.0], [-3.0, 6.0, 1.0], [-7.0, -6.0, 3.0]], [[-5.0, 7.0, 
--6.0], [-5.0, 3.0, -6.0], [-2.0, 5.0, -5.0], [0.0, -3.0, -2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -2.0, -2.0], [1.0, 3.0, 
-6.0], [-7.0, -3.0, 0.0], [0.0, 7.0, 1.0]], [[3.0, 2.0, 3.0], [-5.0, 4.0, -7.0], [0.0, -4.0, -7.0], [-5.0, -5.0, 7.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      arg1=msk_arg1*numpy.array([[[7.0, 2.0], [0.0, -4.0], [0.0, -2.0]], [[0.0, -5.0], [5.0, -7.0], [7.0, 
+2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 5.0], [-3.0, 0.0], [-1.0, -3.0]], [[-4.0, 0.0], [3.0, -1.0], [-7.0, -6.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([116.0, 46.0])+(1.-msk_ref)*numpy.array([27.0, -45.0])
+      ref=msk_ref*numpy.array([-14.0, 58.0])+(1.-msk_ref)*numpy.array([4.0, -53.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([-7.0, -3.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank4_offset3(self):
+      arg0=numpy.array([[[-2.0, 5.0, 1.0], [0.0, 4.0, 1.0], [0.0, 2.0, -1.0], [-4.0, 3.0, -4.0]], [[-7.0, -3.0, -5.0], [-6.0, 
+-5.0, -5.0], [5.0, -3.0, 5.0], [5.0, -7.0, 0.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-3.0, -5.0])+(1.-msk_arg1)*numpy.array([-2.0, -3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[1.0, 4.0], [0.0, -5.0], [-5.0, -7.0]], [[6.0, 5.0], [-5.0, 1.0], [4.0, -2.0]], [[0.0, 
+-5.0], [2.0, 0.0], [-1.0, -6.0]], [[7.0, -1.0], [1.0, -7.0], [7.0, 4.0]]], [[[0.0, -1.0], [-4.0, -6.0], [-3.0, -5.0]], [[6.0, 
+3.0], [1.0, 2.0], [3.0, -5.0]], [[2.0, 2.0], [-5.0, 0.0], [1.0, -1.0]], [[0.0, 2.0], [-5.0, -1.0], [5.0, 
+-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, 4.0], [4.0, 1.0], [0.0, 1.0]], [[-2.0, 7.0], [-7.0, 3.0], [-4.0, 7.0]], [[-4.0, 
+2.0], [-6.0, -4.0], [5.0, -1.0]], [[-3.0, 1.0], [2.0, -4.0], [-1.0, 5.0]]], [[[4.0, -2.0], [5.0, 0.0], [6.0, 3.0]], [[-5.0, 
+-2.0], [0.0, 4.0], [6.0, -1.0]], [[-1.0, 0.0], [3.0, 7.0], [1.0, -2.0]], [[-2.0, 0.0], [0.0, -7.0], [6.0, 0.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[21.0, 35.0], [9.0, 15.0]])+(1.-msk_ref)*numpy.array([[14.0, 21.0], [6.0, 9.0]])
+      ref=msk_ref*numpy.array([-35.0, 4.0])+(1.-msk_ref)*numpy.array([-111.0, -12.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[0.0, 3.0, 4.0], [-5.0, -6.0, 1.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank2_offset0(self):
+      arg0=numpy.array(1.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, 0.0], [6.0, 1.0], [-3.0, 0.0]])+(1.-msk_arg1)*numpy.array([[6.0, 3.0], [6.0, -6.0], 
-[-5.0, 6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[6.0, 3.0], [-4.0, -6.0]])+(1.-msk_ref)*numpy.array([[-2.0, 6.0], [-71.0, 27.0]])
+      arg1=msk_arg1*numpy.array([[4.0, 0.0, 6.0, -5.0, 5.0], [-6.0, 2.0, -1.0, -1.0, 1.0], [1.0, 2.0, 2.0, -7.0, 1.0], [3.0, 
+7.0, 0.0, -7.0, 7.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -1.0, 2.0, -6.0, 0.0], [-7.0, -3.0, -6.0, -6.0, 0.0], [-4.0, 6.0, 2.0, 
+7.0, 6.0], [0.0, 4.0, 1.0, 4.0, -2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[4.0, 0.0, 6.0, -5.0, 5.0], [-6.0, 2.0, -1.0, -1.0, 1.0], [1.0, 2.0, 2.0, -7.0, 1.0], [3.0, 7.0, 
+0.0, -7.0, 7.0]])+(1.-msk_ref)*numpy.array([[-7.0, -1.0, 2.0, -6.0, 0.0], [-7.0, -3.0, -6.0, -6.0, 0.0], [-4.0, 6.0, 2.0, 7.0, 
+6.0], [0.0, 4.0, 1.0, 4.0, -2.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[6.0, 3.0, 2.0], [-7.0, -2.0, 7.0]], [[-6.0, -4.0, -7.0], [3.0, 6.0, 2.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank3_offset1(self):
+      arg0=numpy.array([-4.0, -6.0, 1.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -3.0], [1.0, 2.0], [7.0, 5.0]], [[0.0, -1.0], [-7.0, 4.0], [-4.0, 
-5.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -5.0], [1.0, 0.0], [2.0, 4.0]], [[-5.0, 6.0], [-6.0, -5.0], [0.0, -4.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[[-7.0, -4.0, 0.0, -5.0, 3.0], [-2.0, -6.0, -1.0, -5.0, 0.0], [-1.0, 6.0, 5.0, 0.0, -3.0], 
+[7.0, 5.0, 1.0, -3.0, -7.0]], [[6.0, -6.0, -3.0, -7.0, 5.0], [-5.0, 3.0, 1.0, -1.0, 1.0], [1.0, -3.0, -6.0, 3.0, 0.0], [6.0, 
+-1.0, -5.0, -3.0, -6.0]], [[-2.0, -3.0, 6.0, -2.0, 0.0], [-1.0, 1.0, -6.0, -5.0, 4.0], [6.0, -7.0, -4.0, 2.0, -1.0], [-3.0, 
+-2.0, -5.0, -4.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 1.0, 0.0, 0.0, 1.0], [-2.0, 4.0, 6.0, 5.0, 0.0], [-2.0, 5.0, 0.0, 
+2.0, 0.0], [3.0, -7.0, -1.0, 5.0, -2.0]], [[-1.0, -7.0, -4.0, -3.0, -2.0], [4.0, 4.0, -6.0, 4.0, 0.0], [0.0, 2.0, -2.0, -2.0, 
+7.0], [7.0, -5.0, -1.0, 3.0, -7.0]], [[-5.0, -2.0, 0.0, -3.0, -7.0], [6.0, 3.0, 4.0, -5.0, -3.0], [-2.0, -7.0, -6.0, 3.0, 0.0], 
+[2.0, -5.0, 7.0, 1.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[3.0, 32.0], [-103.0, 6.0]])+(1.-msk_ref)*numpy.array([[48.0, -82.0], [-63.0, -18.0]])
+      ref=msk_ref*numpy.array([[-10.0, 49.0, 24.0, 60.0, -42.0], [37.0, 7.0, -8.0, 21.0, -2.0], [4.0, -13.0, 12.0, -16.0, 
+11.0], [-67.0, -16.0, 21.0, 26.0, 57.0]])+(1.-msk_ref)*numpy.array([[1.0, 36.0, 24.0, 15.0, 1.0], [-10.0, -37.0, 16.0, -49.0, 
+-3.0], [6.0, -39.0, 6.0, 7.0, -42.0], [-52.0, 53.0, 17.0, -37.0, 52.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[-7.0, 6.0, -7.0], [0.0, 2.0, 6.0], [0.0, -2.0, 0.0], [6.0, 6.0, 7.0]], [[-4.0, 6.0, -4.0], 
-[6.0, 0.0, -2.0], [7.0, -2.0, 0.0], [0.0, 7.0, -3.0]]], [[[3.0, -2.0, 5.0], [-6.0, -7.0, -5.0], [-6.0, -6.0, 7.0], [6.0, 4.0, 
--5.0]], [[-3.0, -7.0, 0.0], [6.0, -5.0, -7.0], [1.0, 2.0, 1.0], [4.0, 0.0, -7.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[-1.0, -7.0, -5.0], [1.0, 0.0, 1.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, 0.0], [6.0, 4.0], [-7.0, -2.0]], [[6.0, 2.0], [5.0, -2.0], [-3.0, -5.0]], [[-6.0, 
-2.0], [-4.0, -6.0], [5.0, -2.0]], [[2.0, -4.0], [3.0, 6.0], [0.0, 5.0]]], [[[6.0, -2.0], [1.0, 1.0], [-3.0, -3.0]], [[3.0, 
--4.0], [3.0, 4.0], [-2.0, -3.0]], [[-5.0, 2.0], [-2.0, 3.0], [-5.0, 7.0]], [[4.0, 2.0], [2.0, -2.0], [-7.0, 
-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -5.0], [3.0, 0.0], [-3.0, -7.0]], [[-3.0, 7.0], [1.0, -6.0], [1.0, 1.0]], [[-4.0, 
-3.0], [0.0, 1.0], [5.0, -3.0]], [[-1.0, 3.0], [-4.0, 2.0], [-7.0, 1.0]]], [[[3.0, 0.0], [0.0, -3.0], [-6.0, 7.0]], [[-1.0, 
-3.0], [-3.0, 7.0], [-3.0, -2.0]], [[7.0, -2.0], [0.0, 4.0], [6.0, -5.0]], [[-1.0, -5.0], [0.0, -7.0], [2.0, -5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      arg1=msk_arg1*numpy.array([[[[6.0, 5.0, -5.0, -3.0, 5.0], [6.0, -7.0, 4.0, -6.0, 3.0], [-2.0, -6.0, 4.0, 2.0, -4.0], 
+[-6.0, -5.0, 2.0, 7.0, -7.0]], [[-1.0, -3.0, -1.0, -6.0, -2.0], [-1.0, 1.0, 6.0, -2.0, -4.0], [5.0, 0.0, 7.0, -6.0, -7.0], 
+[7.0, 0.0, -2.0, 1.0, 5.0]], [[-6.0, -5.0, 0.0, 0.0, -6.0], [-7.0, 5.0, 4.0, -1.0, 6.0], [-4.0, 0.0, 0.0, 0.0, -6.0], [-5.0, 
+-5.0, 4.0, -2.0, 4.0]]], [[[4.0, -6.0, -4.0, 4.0, 6.0], [-1.0, 2.0, 0.0, 5.0, 0.0], [7.0, 7.0, -6.0, 5.0, -5.0], [0.0, -2.0, 
+2.0, -5.0, -3.0]], [[-7.0, 0.0, 3.0, 5.0, 3.0], [1.0, -5.0, -2.0, -3.0, 5.0], [4.0, -1.0, -6.0, 4.0, 1.0], [-3.0, 0.0, -4.0, 
+7.0, 3.0]], [[-1.0, 7.0, -3.0, -5.0, -3.0], [5.0, -3.0, -2.0, 7.0, 0.0], [3.0, -3.0, -5.0, 1.0, -7.0], [3.0, 1.0, 4.0, -4.0, 
+-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -7.0, 0.0, 5.0, -5.0], [2.0, 1.0, 5.0, 7.0, 4.0], [2.0, -7.0, -4.0, -1.0, -2.0], 
+[5.0, 2.0, -3.0, -3.0, -6.0]], [[-2.0, 0.0, 0.0, -5.0, -2.0], [7.0, 5.0, 0.0, 0.0, 3.0], [0.0, 7.0, 5.0, 5.0, -1.0], [4.0, 4.0, 
+-7.0, 0.0, 1.0]], [[1.0, -4.0, 3.0, 3.0, 5.0], [-7.0, -4.0, 1.0, 2.0, -3.0], [-4.0, -5.0, 6.0, -2.0, -7.0], [-7.0, 3.0, -6.0, 
+5.0, -5.0]]], [[[-6.0, -4.0, 6.0, -3.0, 4.0], [6.0, 5.0, 0.0, 3.0, 1.0], [-1.0, -2.0, -4.0, 6.0, 1.0], [-4.0, -4.0, 5.0, 1.0, 
+0.0]], [[-3.0, 2.0, 0.0, 7.0, -4.0], [3.0, 3.0, -1.0, 1.0, -5.0], [4.0, 0.0, -3.0, 2.0, -6.0], [3.0, 5.0, 2.0, 0.0, 5.0]], 
+[[3.0, -7.0, -1.0, 2.0, 6.0], [-2.0, -1.0, -5.0, 3.0, -2.0], [0.0, -1.0, 0.0, -7.0, 1.0], [7.0, 2.0, 0.0, 4.0, 3.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[149.0, 47.0], [53.0, -49.0]])+(1.-msk_ref)*numpy.array([[-19.0, 33.0], [91.0, -45.0]])
+      ref=msk_ref*numpy.array([[34.0, 42.0, 5.0, 44.0, 42.0], [40.0, -26.0, -68.0, 37.0, -5.0], [-3.0, 10.0, -64.0, 46.0, 
+71.0], [-15.0, 29.0, -2.0, -13.0, -58.0]])+(1.-msk_ref)*numpy.array([[0.0, 16.0, -10.0, 14.0, 4.0], [-12.0, -12.0, -15.0, 
+-11.0, -11.0], [17.0, -20.0, -65.0, -25.0, 46.0], [5.0, -47.0, 87.0, -17.0, 27.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank2_offset0(self):
-      arg0=Data(numpy.array([2.0, 5.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank3_offset0(self):
+      arg0=numpy.array(3.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[4.0, 3.0, 3.0, 4.0, -1.0], [5.0, -3.0, 1.0, -3.0, -2.0], [0.0, -7.0, -7.0, 2.0, -4.0], [-1.0, 
--3.0, -2.0, -3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-5.0, 0.0, -1.0, 6.0, 0.0], [1.0, 3.0, -4.0, 3.0, 4.0], [0.0, 6.0, -1.0, 
-6.0, 5.0], [-2.0, -4.0, 0.0, 2.0, 4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[1.0, 5.0], [-5.0, 4.0]], [[0.0, 4.0], [3.0, 4.0]], [[-2.0, 0.0], [3.0, -1.0]], [[-1.0, 5.0], 
+[-5.0, 0.0]], [[-7.0, 5.0], [-7.0, -2.0]], [[-1.0, 3.0], [-3.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, -3.0], [5.0, -2.0]], 
+[[-2.0, -2.0], [0.0, -1.0]], [[-7.0, -4.0], [-4.0, -2.0]], [[-3.0, -7.0], [6.0, -6.0]], [[1.0, -7.0], [-1.0, -5.0]], [[7.0, 
+-6.0], [6.0, 1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[8.0, 6.0, 6.0, 8.0, -2.0], [10.0, -6.0, 2.0, -6.0, -4.0], [0.0, -14.0, -14.0, 4.0, -8.0], 
-[-2.0, -6.0, -4.0, -6.0, -8.0]], [[20.0, 15.0, 15.0, 20.0, -5.0], [25.0, -15.0, 5.0, -15.0, -10.0], [0.0, -35.0, -35.0, 10.0, 
--20.0], [-5.0, -15.0, -10.0, -15.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 0.0, -2.0, 12.0, 0.0], [2.0, 6.0, -8.0, 6.0, 
-8.0], [0.0, 12.0, -2.0, 12.0, 10.0], [-4.0, -8.0, 0.0, 4.0, 8.0]], [[-25.0, 0.0, -5.0, 30.0, 0.0], [5.0, 15.0, -20.0, 15.0, 
-20.0], [0.0, 30.0, -5.0, 30.0, 25.0], [-10.0, -20.0, 0.0, 10.0, 20.0]]])
+      ref=msk_ref*numpy.array([[[3.0, 15.0], [-15.0, 12.0]], [[0.0, 12.0], [9.0, 12.0]], [[-6.0, 0.0], [9.0, -3.0]], [[-3.0, 
+15.0], [-15.0, 0.0]], [[-21.0, 15.0], [-21.0, -6.0]], [[-3.0, 9.0], [-9.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -9.0], 
+[15.0, -6.0]], [[-6.0, -6.0], [0.0, -3.0]], [[-21.0, -12.0], [-12.0, -6.0]], [[-9.0, -21.0], [18.0, -18.0]], [[3.0, -21.0], 
+[-3.0, -15.0]], [[21.0, -18.0], [18.0, 3.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([[2.0, 2.0, -6.0], [2.0, -5.0, 0.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank4_offset1(self):
+      arg0=numpy.array([3.0, 7.0, -6.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, -4.0, 6.0, 5.0, 5.0], [4.0, -1.0, 3.0, -4.0, 3.0], [-4.0, 2.0, -7.0, -5.0, -7.0], [3.0, 
--3.0, 1.0, 3.0, 0.0]], [[7.0, -1.0, 6.0, 1.0, 4.0], [4.0, 7.0, -5.0, -1.0, 3.0], [4.0, -7.0, -6.0, 7.0, -1.0], [-2.0, -3.0, 
-4.0, 2.0, 0.0]], [[-4.0, 4.0, 2.0, -4.0, 0.0], [7.0, 7.0, -7.0, -7.0, -2.0], [0.0, 5.0, -6.0, 2.0, -3.0], [-7.0, -6.0, -2.0, 
--1.0, -5.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, -4.0, 6.0, 3.0, 3.0], [-3.0, 1.0, 6.0, -5.0, 5.0], [-4.0, 5.0, -1.0, 2.0, 
-7.0], [-5.0, 2.0, 3.0, 0.0, 0.0]], [[-6.0, 0.0, -5.0, -2.0, 5.0], [3.0, -1.0, -3.0, 6.0, -2.0], [0.0, 1.0, -1.0, 3.0, 7.0], 
-[-2.0, -4.0, 7.0, -7.0, 2.0]], [[-4.0, 3.0, -5.0, 3.0, 6.0], [-3.0, -7.0, 2.0, -1.0, 1.0], [2.0, -5.0, -2.0, 0.0, -5.0], [-5.0, 
--6.0, 6.0, 2.0, -1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[[[0.0, -5.0], [2.0, -4.0]], [[3.0, 1.0], [7.0, -6.0]], [[-5.0, -3.0], [-6.0, 6.0]], [[-3.0, 
+-5.0], [-6.0, -2.0]], [[4.0, 7.0], [7.0, 0.0]], [[0.0, 0.0], [7.0, 7.0]]], [[[7.0, 3.0], [-3.0, 6.0]], [[-1.0, 7.0], [-1.0, 
+-6.0]], [[6.0, 6.0], [-2.0, -2.0]], [[-3.0, -7.0], [5.0, 7.0]], [[6.0, 0.0], [4.0, 4.0]], [[3.0, 6.0], [1.0, 0.0]]], [[[-5.0, 
+-6.0], [-2.0, 0.0]], [[1.0, -3.0], [2.0, -6.0]], [[-6.0, -6.0], [3.0, 1.0]], [[-6.0, 4.0], [-7.0, 2.0]], [[5.0, -2.0], [0.0, 
+-7.0]], [[-2.0, 1.0], [-1.0, 5.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, -2.0], [6.0, 6.0]], [[-6.0, -4.0], [-2.0, -7.0]], 
+[[2.0, 3.0], [-2.0, 1.0]], [[4.0, 0.0], [-7.0, 0.0]], [[0.0, -7.0], [0.0, 5.0]], [[-1.0, 2.0], [-5.0, 6.0]]], [[[-2.0, 7.0], 
+[-2.0, 7.0]], [[-1.0, -5.0], [-5.0, 0.0]], [[-6.0, 6.0], [4.0, 3.0]], [[5.0, 7.0], [5.0, -3.0]], [[5.0, 5.0], [7.0, -6.0]], 
+[[1.0, 5.0], [-6.0, -6.0]]], [[[2.0, -4.0], [5.0, 0.0]], [[-1.0, 0.0], [-4.0, 0.0]], [[-5.0, 6.0], [5.0, 0.0]], [[1.0, -1.0], 
+[-2.0, 0.0]], [[-6.0, -5.0], [-5.0, 7.0]], [[1.0, 4.0], [3.0, 0.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[46.0, -34.0, 12.0, 36.0, 18.0], [-26.0, -30.0, 38.0, 32.0, 24.0], [0.0, -40.0, 10.0, -8.0, 
-2.0], [44.0, 24.0, 22.0, 16.0, 30.0]], [[-27.0, -3.0, -18.0, 5.0, -10.0], [-12.0, -37.0, 31.0, -3.0, -9.0], [-28.0, 39.0, 16.0, 
--45.0, -9.0], [16.0, 9.0, -18.0, -4.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[4.0, -26.0, 32.0, -16.0, -20.0], [18.0, 42.0, -6.0, 
-8.0, 0.0], [-20.0, 42.0, 8.0, 10.0, 58.0], [16.0, 32.0, -16.0, -26.0, 10.0]], [[22.0, -8.0, 37.0, 16.0, -19.0], [-21.0, 7.0, 
-27.0, -40.0, 20.0], [-8.0, 5.0, 3.0, -11.0, -21.0], [0.0, 24.0, -29.0, 35.0, -10.0]]])
+      ref=msk_ref*numpy.array([[[79.0, 42.0], [-3.0, 30.0]], [[-4.0, 70.0], [2.0, -24.0]], [[63.0, 69.0], [-50.0, -2.0]], 
+[[6.0, -88.0], [59.0, 31.0]], [[24.0, 33.0], [49.0, 70.0]], [[33.0, 36.0], [34.0, -9.0]]])+(1.-msk_ref)*numpy.array([[[-23.0, 
+67.0], [-26.0, 67.0]], [[-19.0, -47.0], [-17.0, -21.0]], [[-6.0, 15.0], [-8.0, 24.0]], [[41.0, 55.0], [26.0, -21.0]], [[71.0, 
+44.0], [79.0, -69.0]], [[-2.0, 17.0], [-75.0, -24.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[-7.0, 0.0, -6.0], [-5.0, 1.0, 3.0]], [[6.0, 6.0, -4.0], [5.0, 5.0, 3.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank4_offset0(self):
+      arg0=numpy.array(7.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[6.0, -7.0, 2.0, 0.0, 1.0], [0.0, 2.0, 7.0, -2.0, -3.0], [4.0, -4.0, 5.0, 7.0, 5.0], [1.0, 
-0.0, 4.0, -5.0, -1.0]], [[3.0, -3.0, -2.0, 2.0, 4.0], [7.0, -2.0, 6.0, -2.0, -5.0], [4.0, 6.0, -7.0, 6.0, -4.0], [4.0, -6.0, 
--2.0, -6.0, 5.0]], [[6.0, -5.0, 6.0, -4.0, -5.0], [-6.0, -6.0, -4.0, 3.0, 4.0], [2.0, -6.0, 6.0, -3.0, -2.0], [-3.0, -3.0, 0.0, 
-3.0, 5.0]]], [[[-1.0, 0.0, -3.0, -5.0, 7.0], [3.0, -1.0, -2.0, -2.0, 7.0], [2.0, -3.0, -1.0, 5.0, -7.0], [-7.0, -4.0, -4.0, 
-2.0, 6.0]], [[0.0, 2.0, -3.0, -2.0, -2.0], [-4.0, -4.0, -2.0, -4.0, -1.0], [7.0, 7.0, -2.0, 4.0, 3.0], [1.0, -4.0, 7.0, -7.0, 
-2.0]], [[6.0, 6.0, -6.0, -5.0, 0.0], [5.0, 1.0, -4.0, 3.0, 1.0], [-7.0, 0.0, 4.0, 0.0, -5.0], [5.0, -4.0, 5.0, -4.0, 
-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, -5.0, -2.0, -1.0, 0.0], [-5.0, -2.0, -3.0, 4.0, -2.0], [7.0, 0.0, 3.0, -2.0, 5.0], 
-[-2.0, 1.0, 3.0, 0.0, 1.0]], [[6.0, 7.0, 6.0, -7.0, 0.0], [3.0, -1.0, 7.0, 0.0, -1.0], [2.0, 6.0, 5.0, 3.0, 1.0], [4.0, -3.0, 
--4.0, -3.0, -4.0]], [[-5.0, 4.0, 7.0, 0.0, -2.0], [-7.0, 0.0, 5.0, 3.0, 6.0], [0.0, 0.0, -5.0, 2.0, 4.0], [0.0, 5.0, 0.0, 1.0, 
--4.0]]], [[[4.0, 3.0, 6.0, 0.0, 6.0], [-7.0, -4.0, 1.0, -4.0, 4.0], [-5.0, -1.0, -5.0, 1.0, 2.0], [0.0, -1.0, -2.0, -3.0, 
--5.0]], [[0.0, 7.0, 5.0, -7.0, -6.0], [-7.0, -4.0, 0.0, -4.0, -1.0], [-3.0, -1.0, 0.0, 0.0, 7.0], [-4.0, -7.0, 7.0, -7.0, 
-5.0]], [[-7.0, -1.0, -3.0, -3.0, 0.0], [5.0, 1.0, 6.0, 7.0, -3.0], [-5.0, -5.0, -1.0, -4.0, 1.0], [5.0, 3.0, -6.0, 0.0, 
--6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[[[1.0, 1.0, -7.0, 4.0], [-6.0, 4.0, 2.0, 4.0], [-6.0, 4.0, -4.0, -3.0]], [[-4.0, -5.0, 0.0, 
+0.0], [-6.0, -5.0, 7.0, 2.0], [-6.0, 6.0, -4.0, 1.0]]], [[[6.0, 2.0, 4.0, 6.0], [-4.0, 3.0, -3.0, 5.0], [7.0, 0.0, 3.0, 6.0]], 
+[[2.0, 7.0, -7.0, -2.0], [-6.0, -2.0, 0.0, 3.0], [-4.0, 6.0, 0.0, -6.0]]], [[[6.0, -1.0, -2.0, 5.0], [1.0, -5.0, -6.0, 1.0], 
+[6.0, -4.0, 0.0, -5.0]], [[-1.0, 4.0, -3.0, 3.0], [4.0, -6.0, -3.0, -3.0], [4.0, -2.0, 1.0, 
+4.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 7.0, -1.0, -5.0], [4.0, -6.0, 5.0, 7.0], [5.0, -1.0, -5.0, 6.0]], [[7.0, 4.0, 5.0, 
+2.0], [7.0, -3.0, 0.0, 5.0], [4.0, 3.0, 1.0, 5.0]]], [[[4.0, -7.0, -6.0, 2.0], [1.0, 0.0, 5.0, 4.0], [2.0, -4.0, 0.0, 1.0]], 
+[[-4.0, -5.0, 0.0, 7.0], [5.0, -1.0, -5.0, 0.0], [7.0, 7.0, 0.0, -7.0]]], [[[-3.0, 5.0, 0.0, -7.0], [7.0, 7.0, -2.0, 7.0], 
+[-3.0, -3.0, -1.0, 5.0]], [[-5.0, -4.0, -1.0, 1.0], [5.0, -2.0, 4.0, -4.0], [0.0, 7.0, 5.0, 2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-55.0, 99.0, -56.0, 32.0, -14.0], [32.0, 26.0, -29.0, 11.0, -36.0], [-64.0, 86.0, -56.0, 
--52.0, 0.0], [62.0, 22.0, 14.0, -12.0, -33.0]], [[43.0, -12.0, -72.0, -22.0, 75.0], [76.0, 2.0, 62.0, -57.0, -31.0], [64.0, 
-56.0, -39.0, 135.0, -21.0], [27.0, -76.0, 42.0, -115.0, 62.0]]])+(1.-msk_ref)*numpy.array([[[-60.0, 0.0, -62.0, -9.0, -24.0], 
-[120.0, 33.0, 4.0, -9.0, -52.0], [-42.0, -11.0, 31.0, -15.0, -59.0], [25.0, -30.0, -22.0, 2.0, 29.0]], [[97.0, 43.0, 42.0, 
--92.0, 8.0], [-39.0, -55.0, 27.0, -7.0, -36.0], [-1.0, 11.0, 40.0, -9.0, 68.0], [7.0, -63.0, 1.0, -72.0, -20.0]]])
+      ref=msk_ref*numpy.array([[[[7.0, 7.0, -49.0, 28.0], [-42.0, 28.0, 14.0, 28.0], [-42.0, 28.0, -28.0, -21.0]], [[-28.0, 
+-35.0, 0.0, 0.0], [-42.0, -35.0, 49.0, 14.0], [-42.0, 42.0, -28.0, 7.0]]], [[[42.0, 14.0, 28.0, 42.0], [-28.0, 21.0, -21.0, 
+35.0], [49.0, 0.0, 21.0, 42.0]], [[14.0, 49.0, -49.0, -14.0], [-42.0, -14.0, 0.0, 21.0], [-28.0, 42.0, 0.0, -42.0]]], [[[42.0, 
+-7.0, -14.0, 35.0], [7.0, -35.0, -42.0, 7.0], [42.0, -28.0, 0.0, -35.0]], [[-7.0, 28.0, -21.0, 21.0], [28.0, -42.0, -21.0, 
+-21.0], [28.0, -14.0, 7.0, 28.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, 49.0, -7.0, -35.0], [28.0, -42.0, 35.0, 49.0], [35.0, 
+-7.0, -35.0, 42.0]], [[49.0, 28.0, 35.0, 14.0], [49.0, -21.0, 0.0, 35.0], [28.0, 21.0, 7.0, 35.0]]], [[[28.0, -49.0, -42.0, 
+14.0], [7.0, 0.0, 35.0, 28.0], [14.0, -28.0, 0.0, 7.0]], [[-28.0, -35.0, 0.0, 49.0], [35.0, -7.0, -35.0, 0.0], [49.0, 49.0, 
+0.0, -49.0]]], [[[-21.0, 35.0, 0.0, -49.0], [49.0, 49.0, -14.0, 49.0], [-21.0, -21.0, -7.0, 35.0]], [[-35.0, -28.0, -7.0, 7.0], 
+[35.0, -14.0, 28.0, -28.0], [0.0, 49.0, 35.0, 14.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank1_expandedData_rank3_offset0(self):
-      arg0=Data(numpy.array([7.0, 7.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, -6.0], [-2.0, -2.0]], [[4.0, 6.0], [-1.0, -3.0]], [[-3.0, -1.0], [1.0, 6.0]], [[0.0, 
-3.0], [7.0, 5.0]], [[-7.0, -7.0], [4.0, 4.0]], [[-5.0, -3.0], [7.0, 5.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -6.0], [4.0, 
-5.0]], [[-5.0, 3.0], [-2.0, 0.0]], [[0.0, -7.0], [-7.0, 3.0]], [[0.0, 3.0], [-5.0, -4.0]], [[-6.0, 6.0], [2.0, 0.0]], [[-6.0, 
-3.0], [-2.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[21.0, -42.0], [-14.0, -14.0]], [[28.0, 42.0], [-7.0, -21.0]], [[-21.0, -7.0], [7.0, 42.0]], 
-[[0.0, 21.0], [49.0, 35.0]], [[-49.0, -49.0], [28.0, 28.0]], [[-35.0, -21.0], [49.0, 35.0]]], [[[21.0, -42.0], [-14.0, -14.0]], 
-[[28.0, 42.0], [-7.0, -21.0]], [[-21.0, -7.0], [7.0, 42.0]], [[0.0, 21.0], [49.0, 35.0]], [[-49.0, -49.0], [28.0, 28.0]], 
-[[-35.0, -21.0], [49.0, 35.0]]]])+(1.-msk_ref)*numpy.array([[[[-35.0, -42.0], [28.0, 35.0]], [[-35.0, 21.0], [-14.0, 0.0]], 
-[[0.0, -49.0], [-49.0, 21.0]], [[0.0, 21.0], [-35.0, -28.0]], [[-42.0, 42.0], [14.0, 0.0]], [[-42.0, 21.0], [-14.0, 0.0]]], 
-[[[-35.0, -42.0], [28.0, 35.0]], [[-35.0, 21.0], [-14.0, 0.0]], [[0.0, -49.0], [-49.0, 21.0]], [[0.0, 21.0], [-35.0, -28.0]], 
-[[-42.0, 42.0], [14.0, 0.0]], [[-42.0, 21.0], [-14.0, 0.0]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank1_float_rank0_offset0(self):
+      arg0=numpy.array([-5.0, -3.0])
+      arg1=-5.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([25.0, 15.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank4_offset1(self):
-      arg0=Data(numpy.array([[-1.0, 7.0, -2.0], [-4.0, -2.0, -5.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -2.0], [3.0, 6.0]], [[5.0, 2.0], [3.0, -4.0]], [[6.0, -1.0], [-5.0, -4.0]], [[6.0, 
-0.0], [0.0, 0.0]], [[-4.0, 0.0], [4.0, 5.0]], [[0.0, -1.0], [-4.0, 0.0]]], [[[4.0, 6.0], [6.0, 1.0]], [[-4.0, 2.0], [-5.0, 
-2.0]], [[-3.0, 6.0], [0.0, 0.0]], [[-1.0, -2.0], [-5.0, -4.0]], [[-1.0, -3.0], [5.0, 0.0]], [[-7.0, -4.0], [5.0, -1.0]]], 
-[[[-1.0, 6.0], [-2.0, -6.0]], [[-2.0, 0.0], [-4.0, -3.0]], [[6.0, -2.0], [2.0, -3.0]], [[6.0, 1.0], [-5.0, -3.0]], [[6.0, 0.0], 
-[0.0, 2.0]], [[6.0, -2.0], [0.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -6.0], [6.0, 7.0]], [[5.0, -3.0], [-7.0, -2.0]], 
-[[0.0, -1.0], [-5.0, -2.0]], [[-5.0, 0.0], [-3.0, -5.0]], [[7.0, -3.0], [3.0, 1.0]], [[2.0, 5.0], [2.0, 3.0]]], [[[2.0, -3.0], 
-[-6.0, 5.0]], [[7.0, -4.0], [6.0, -4.0]], [[6.0, -5.0], [4.0, 0.0]], [[6.0, 3.0], [-2.0, -1.0]], [[6.0, 5.0], [-4.0, -6.0]], 
-[[7.0, 2.0], [-6.0, -2.0]]], [[[5.0, -3.0], [0.0, 4.0]], [[-7.0, 0.0], [1.0, 2.0]], [[-4.0, -6.0], [-3.0, 0.0]], [[5.0, -5.0], 
-[2.0, 7.0]], [[-2.0, 7.0], [5.0, -7.0]], [[-6.0, -7.0], [-4.0, 1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[32.0, 32.0], [43.0, 13.0]], [[-29.0, 12.0], [-30.0, 24.0]], [[-39.0, 47.0], [1.0, 10.0]], 
-[[-25.0, -16.0], [-25.0, -22.0]], [[-15.0, -21.0], [31.0, -9.0]], [[-61.0, -23.0], [39.0, -7.0]]], [[[5.0, -34.0], [-14.0, 
-4.0]], [[-2.0, -12.0], [18.0, 27.0]], [[-48.0, 2.0], [10.0, 31.0]], [[-52.0, -1.0], [35.0, 23.0]], [[-12.0, 6.0], [-26.0, 
--30.0]], [[-16.0, 22.0], [6.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, -9.0], [-48.0, 20.0]], [[58.0, -25.0], [47.0, 
--30.0]], [[50.0, -22.0], [39.0, 2.0]], [[37.0, 31.0], [-15.0, -16.0]], [[39.0, 24.0], [-41.0, -29.0]], [[59.0, 23.0], [-36.0, 
--19.0]]], [[[-29.0, 45.0], [-12.0, -58.0]], [[1.0, 20.0], [11.0, 6.0]], [[8.0, 44.0], [27.0, 8.0]], [[-17.0, 19.0], [6.0, 
--13.0]], [[-30.0, -33.0], [-29.0, 43.0]], [[8.0, 11.0], [24.0, -13.0]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank1_array_rank0_offset0(self):
+      arg0=numpy.array([6.0, -7.0])
+      arg1=numpy.array(-3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([-18.0, 21.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[4.0, -1.0, 6.0, -6.0, 0.0], [-1.0, -2.0, -1.0, 7.0, -1.0], [0.0, 4.0, 1.0, 6.0, -7.0], [0.0, 5.0, 
--2.0, 6.0, -1.0]]),self.functionspace)
-      arg1=-3.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-12.0, 3.0, -18.0, 18.0, -0.0], [3.0, 6.0, 3.0, -21.0, 3.0], [-0.0, -12.0, -3.0, -18.0, 21.0], 
-[-0.0, -15.0, 6.0, -18.0, 3.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank1_offset1(self):
+      arg0=numpy.array([[-4.0, -6.0], [-4.0, -6.0], [-7.0, -7.0]])
+      arg1=numpy.array([4.0, -1.0, 4.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([-40.0, -46.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[-7.0, -5.0, 6.0, -5.0, 4.0], [-4.0, 3.0, -4.0, 1.0, -5.0], [4.0, -2.0, -3.0, 0.0, -5.0], [2.0, 
--5.0, -2.0, 4.0, 4.0]]),self.functionspace)
-      arg1=numpy.array(-4.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[28.0, 20.0, -24.0, 20.0, -16.0], [16.0, -12.0, 16.0, -4.0, 20.0], [-16.0, 8.0, 12.0, -0.0, 20.0], 
-[-8.0, 20.0, 8.0, -16.0, -16.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank2_offset2(self):
+      arg0=numpy.array([[[3.0, 4.0], [0.0, 7.0], [-4.0, -6.0]], [[3.0, 0.0], [5.0, 0.0], [6.0, 5.0]]])
+      arg1=numpy.array([[-4.0, 1.0, 3.0], [-3.0, 4.0, 7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([29.0, 8.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[[0.0, 3.0, 5.0], [6.0, -5.0, -2.0], [4.0, 3.0, 7.0], [-2.0, -2.0, -7.0], [3.0, 4.0, 6.0]], 
-[[-1.0, 7.0, 5.0], [7.0, 7.0, 0.0], [4.0, 5.0, 0.0], [2.0, -1.0, 2.0], [3.0, -2.0, -5.0]], [[3.0, -5.0, -6.0], [2.0, -6.0, 
--2.0], [4.0, 7.0, 0.0], [0.0, 7.0, -5.0], [6.0, -1.0, 7.0]], [[7.0, 1.0, -6.0], [0.0, -1.0, -3.0], [-5.0, 3.0, 3.0], [7.0, 
--1.0, 7.0], [-3.0, -4.0, 6.0]]]),self.functionspace)
-      arg1=numpy.array([5.0, 2.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[6.0, 20.0, 26.0, -14.0, 23.0], [9.0, 49.0, 30.0, 8.0, 11.0], [5.0, -2.0, 34.0, 14.0, 28.0], [37.0, 
--2.0, -19.0, 33.0, -23.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_array_rank3_offset3(self):
+      arg0=numpy.array([[[[0.0, -1.0], [-7.0, -5.0], [-5.0, 2.0]], [[0.0, -1.0], [4.0, 4.0], [1.0, 4.0]], [[0.0, 2.0], [-4.0, 
+-2.0], [5.0, -1.0]], [[5.0, 2.0], [-7.0, -4.0], [-6.0, 6.0]]], [[[7.0, 3.0], [0.0, -3.0], [4.0, 4.0]], [[1.0, 0.0], [6.0, 
+-4.0], [0.0, -6.0]], [[4.0, -6.0], [1.0, -6.0], [5.0, 0.0]], [[-3.0, 0.0], [-4.0, 4.0], [5.0, -1.0]]]])
+      arg1=numpy.array([[[2.0, 4.0, 0.0], [-5.0, -2.0, 0.0], [7.0, -7.0, -3.0], [4.0, 4.0, 0.0]], [[0.0, 1.0, 6.0], [7.0, 4.0, 
+-6.0], [2.0, 7.0, 4.0], [2.0, 7.0, 6.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([55.0, 7.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_array_rank1_offset0(self):
+      arg0=numpy.array([-3.0, -6.0])
+      arg1=numpy.array([5.0, 1.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-15.0, -3.0], [-30.0, -6.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_array_rank2_offset1(self):
+      arg0=numpy.array([[-4.0, -5.0], [-7.0, 5.0], [-3.0, -1.0]])
+      arg1=numpy.array([[3.0, -4.0], [-6.0, -3.0], [0.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[30.0, 37.0], [-45.0, 5.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_array_rank3_offset2(self):
+      arg0=numpy.array([[[3.0, -5.0], [0.0, -4.0], [-6.0, -7.0]], [[-7.0, -6.0], [2.0, 1.0], [3.0, -2.0]]])
+      arg1=numpy.array([[[-2.0, 4.0], [-6.0, -5.0], [6.0, 5.0]], [[3.0, -6.0], [-6.0, -3.0], [-6.0, -2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[-93.0, 12.0], [-20.0, 2.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank4_array_rank4_offset3(self):
+      arg0=numpy.array([[[[-1.0, 6.0], [-6.0, 0.0], [-1.0, -7.0]], [[1.0, 0.0], [5.0, -1.0], [-4.0, -7.0]], [[-6.0, -7.0], 
+[-4.0, -7.0], [-7.0, 0.0]], [[-6.0, 0.0], [-1.0, 1.0], [6.0, 6.0]]], [[[3.0, 0.0], [4.0, -1.0], [-7.0, 0.0]], [[6.0, 1.0], 
+[0.0, -6.0], [3.0, -3.0]], [[-7.0, 2.0], [4.0, 5.0], [6.0, 4.0]], [[-3.0, 2.0], [4.0, 6.0], [2.0, -2.0]]]])
+      arg1=numpy.array([[[[1.0, 0.0], [0.0, 7.0], [1.0, 1.0]], [[5.0, -1.0], [-6.0, 0.0], [0.0, 6.0]], [[0.0, -3.0], [-1.0, 
+5.0], [7.0, -3.0]], [[-2.0, 1.0], [0.0, -2.0], [0.0, 0.0]]], [[[-1.0, -4.0], [-2.0, 1.0], [-5.0, -7.0]], [[2.0, 4.0], [4.0, 
+-5.0], [4.0, 1.0]], [[4.0, 4.0], [2.0, 1.0], [2.0, 2.0]], [[-3.0, 6.0], [-5.0, 6.0], [-3.0, 1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([[-37.0, 11.0], [-24.0, 32.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_array_rank2_offset0(self):
+      arg0=numpy.array([3.0, -5.0])
+      arg1=numpy.array([[3.0, 6.0, -3.0, -4.0, 2.0], [-6.0, -1.0, 3.0, 0.0, 2.0], [4.0, 0.0, 4.0, 6.0, -3.0], [0.0, 3.0, -4.0, 
+-2.0, -6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[9.0, 18.0, -9.0, -12.0, 6.0], [-18.0, -3.0, 9.0, 0.0, 6.0], [12.0, 0.0, 12.0, 18.0, -9.0], [0.0, 9.0, 
+-12.0, -6.0, -18.0]], [[-15.0, -30.0, 15.0, 20.0, -10.0], [30.0, 5.0, -15.0, 0.0, -10.0], [-20.0, 0.0, -20.0, -30.0, 15.0], 
+[0.0, -15.0, 20.0, 10.0, 30.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_array_rank3_offset1(self):
+      arg0=numpy.array([[3.0, -7.0], [-2.0, -1.0], [-4.0, -1.0]])
+      arg1=numpy.array([[[-7.0, -4.0, 5.0, 7.0, 3.0], [0.0, -4.0, 6.0, 5.0, 6.0], [1.0, 5.0, 5.0, 2.0, 3.0], [-6.0, 4.0, 4.0, 
+2.0, -1.0]], [[-7.0, 1.0, 2.0, -4.0, -2.0], [7.0, -4.0, 0.0, 0.0, 2.0], [5.0, -7.0, -6.0, 7.0, 0.0], [-1.0, -2.0, 4.0, -7.0, 
+-3.0]], [[-1.0, -4.0, 5.0, -6.0, 1.0], [3.0, 5.0, 3.0, 2.0, 3.0], [-2.0, -5.0, -5.0, 0.0, -1.0], [0.0, 0.0, 1.0, 1.0, -7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-3.0, 2.0, -9.0, 53.0, 9.0], [-26.0, -24.0, 6.0, 7.0, 2.0], [1.0, 49.0, 47.0, -8.0, 13.0], [-16.0, 
+16.0, 0.0, 16.0, 31.0]], [[57.0, 31.0, -42.0, -39.0, -20.0], [-10.0, 27.0, -45.0, -37.0, -47.0], [-10.0, -23.0, -24.0, -21.0, 
+-20.0], [43.0, -26.0, -33.0, -8.0, 17.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_array_rank4_offset2(self):
+      arg0=numpy.array([[[0.0, 7.0], [0.0, 3.0], [-5.0, 3.0]], [[3.0, -2.0], [0.0, 5.0], [0.0, -1.0]]])
+      arg1=numpy.array([[[[0.0, 2.0, -2.0, 7.0, 5.0], [6.0, 2.0, 3.0, 0.0, 0.0], [4.0, 5.0, -1.0, 0.0, -4.0], [2.0, -6.0, 7.0, 
+3.0, 0.0]], [[-6.0, 0.0, -7.0, -4.0, 6.0], [6.0, 3.0, 1.0, 2.0, 7.0], [-6.0, 6.0, 3.0, -6.0, 1.0], [-7.0, -6.0, 7.0, -3.0, 
+-1.0]], [[2.0, -7.0, 6.0, -2.0, -3.0], [5.0, -6.0, -5.0, -2.0, 5.0], [0.0, 3.0, 6.0, 5.0, 1.0], [-7.0, -3.0, 5.0, 7.0, 3.0]]], 
+[[[3.0, -7.0, -5.0, 0.0, 6.0], [0.0, -6.0, -1.0, 6.0, 2.0], [-4.0, -3.0, 2.0, 0.0, -5.0], [1.0, 5.0, 1.0, 4.0, -5.0]], [[3.0, 
+5.0, 0.0, 0.0, 3.0], [0.0, 7.0, -1.0, 0.0, 4.0], [-4.0, 6.0, 1.0, -2.0, 7.0], [1.0, 1.0, -1.0, 0.0, 5.0]], [[-7.0, 2.0, -4.0, 
+4.0, 1.0], [5.0, -3.0, 6.0, 1.0, -3.0], [0.0, 4.0, 5.0, 3.0, 4.0], [7.0, 0.0, -3.0, 4.0, -3.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[-1.0, 14.0, -45.0, 10.0, 33.0], [-25.0, 12.0, 22.0, 28.0, -19.0], [-12.0, -24.0, -24.0, -25.0, -20.0], 
+[38.0, 30.0, -22.0, -23.0, -30.0]], [[4.0, 30.0, -3.0, 27.0, 46.0], [70.0, 55.0, 0.0, -13.0, 55.0], [-2.0, 94.0, 16.0, -16.0, 
+19.0], [-32.0, -74.0, 81.0, 21.0, 44.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_array_rank3_offset0(self):
+      arg0=numpy.array([-3.0, 5.0])
+      arg1=numpy.array([[[-6.0, 0.0], [-5.0, 5.0]], [[6.0, 4.0], [0.0, 1.0]], [[-1.0, -7.0], [-1.0, 7.0]], [[-4.0, -6.0], [6.0, 
+0.0]], [[-1.0, 0.0], [2.0, -4.0]], [[-6.0, -3.0], [7.0, 1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[18.0, 0.0], [15.0, -15.0]], [[-18.0, -12.0], [0.0, -3.0]], [[3.0, 21.0], [3.0, -21.0]], [[12.0, 
+18.0], [-18.0, 0.0]], [[3.0, 0.0], [-6.0, 12.0]], [[18.0, 9.0], [-21.0, -3.0]]], [[[-30.0, 0.0], [-25.0, 25.0]], [[30.0, 20.0], 
+[0.0, 5.0]], [[-5.0, -35.0], [-5.0, 35.0]], [[-20.0, -30.0], [30.0, 0.0]], [[-5.0, 0.0], [10.0, -20.0]], [[-30.0, -15.0], 
+[35.0, 5.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_array_rank4_offset1(self):
+      arg0=numpy.array([[1.0, -1.0], [-5.0, 0.0], [1.0, -7.0]])
+      arg1=numpy.array([[[[2.0, -2.0], [1.0, -6.0]], [[0.0, -7.0], [-3.0, -3.0]], [[-2.0, 7.0], [2.0, 4.0]], [[-6.0, 3.0], 
+[4.0, 4.0]], [[0.0, 4.0], [3.0, -7.0]], [[-6.0, 2.0], [3.0, -3.0]]], [[[0.0, -2.0], [-3.0, 5.0]], [[-6.0, 1.0], [2.0, -3.0]], 
+[[-6.0, -5.0], [0.0, -2.0]], [[0.0, -4.0], [3.0, -4.0]], [[7.0, -1.0], [-7.0, 0.0]], [[-4.0, -5.0], [-2.0, 0.0]]], [[[-2.0, 
+-2.0], [-6.0, -2.0]], [[7.0, 7.0], [-6.0, -4.0]], [[-5.0, 0.0], [-2.0, 4.0]], [[-2.0, 7.0], [-2.0, 7.0]], [[-5.0, -2.0], [1.0, 
+-7.0]], [[-3.0, -5.0], [-5.0, 6.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[0.0, 6.0], [10.0, -33.0]], [[37.0, -5.0], [-19.0, 8.0]], [[23.0, 32.0], [0.0, 18.0]], [[-8.0, 30.0], 
+[-13.0, 31.0]], [[-40.0, 7.0], [39.0, -14.0]], [[11.0, 22.0], [8.0, 3.0]]], [[[12.0, 16.0], [41.0, 20.0]], [[-49.0, -42.0], 
+[45.0, 31.0]], [[37.0, -7.0], [12.0, -32.0]], [[20.0, -52.0], [10.0, -53.0]], [[35.0, 10.0], [-10.0, 56.0]], [[27.0, 33.0], 
+[32.0, -39.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank0_offset0(self):
+      arg0=numpy.array([-1.0, 3.0])
+      arg1=Data(0.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, 0.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[-3.0, -2.0, 0.0], [3.0, 1.0, 5.0]], [[5.0, 4.0, -6.0], [4.0, -6.0, 2.0]], [[0.0, 0.0, 1.0], 
-[6.0, -6.0, 7.0]], [[-2.0, -7.0, -5.0], [-1.0, 0.0, -3.0]], [[-5.0, -3.0, -2.0], [4.0, -1.0, 7.0]]], [[[-1.0, 6.0, 0.0], [-3.0, 
--2.0, 5.0]], [[4.0, 2.0, -4.0], [1.0, -6.0, 7.0]], [[3.0, -1.0, -5.0], [2.0, -7.0, 0.0]], [[1.0, 0.0, -1.0], [-2.0, 0.0, 
--5.0]], [[-5.0, -1.0, -2.0], [0.0, -6.0, -1.0]]], [[[1.0, 0.0, 7.0], [-1.0, 3.0, -6.0]], [[-7.0, -3.0, 3.0], [6.0, -1.0, 2.0]], 
-[[0.0, -1.0, 7.0], [-7.0, -3.0, 4.0]], [[-6.0, 5.0, 1.0], [-5.0, 1.0, 2.0]], [[6.0, 3.0, 0.0], [-4.0, 6.0, -1.0]]], [[[-5.0, 
-0.0, -3.0], [-6.0, -1.0, -6.0]], [[-7.0, 0.0, 5.0], [4.0, 6.0, -3.0]], [[6.0, -2.0, 1.0], [3.0, 0.0, 0.0]], [[-3.0, 5.0, 4.0], 
-[-2.0, 4.0, -4.0]], [[-2.0, -3.0, -2.0], [7.0, -6.0, -7.0]]]]),self.functionspace)
-      arg1=numpy.array([[0.0, 1.0, -5.0], [-4.0, 0.0, 4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[6.0, 26.0, -1.0, 10.0, 19.0], [38.0, 46.0, 16.0, -7.0, 5.0], [-55.0, -34.0, 8.0, 28.0, 15.0], 
-[15.0, -53.0, -19.0, -23.0, -49.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank1_offset1(self):
+      arg0=numpy.array([[1.0, 3.0], [1.0, -2.0], [5.0, 0.0]])
+      arg1=Data(numpy.array([2.0, -1.0, 4.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([21.0, 8.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank1_offset0(self):
-      arg0=Data(numpy.array([[-5.0, -4.0, 6.0, -2.0, 3.0], [7.0, 0.0, 6.0, -2.0, 3.0], [-6.0, -6.0, -2.0, -2.0, 0.0], [-6.0, 
--5.0, 7.0, 6.0, -5.0]]),self.functionspace)
-      arg1=numpy.array([-5.0, -3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[25.0, 15.0], [20.0, 12.0], [-30.0, -18.0], [10.0, 6.0], [-15.0, -9.0]], [[-35.0, -21.0], [0.0, 
-0.0], [-30.0, -18.0], [10.0, 6.0], [-15.0, -9.0]], [[30.0, 18.0], [30.0, 18.0], [10.0, 6.0], [10.0, 6.0], [0.0, 0.0]], [[30.0, 
-18.0], [25.0, 15.0], [-35.0, -21.0], [-30.0, -18.0], [25.0, 15.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank2_offset2(self):
+      arg0=numpy.array([[[-2.0, 0.0], [-5.0, -1.0], [-3.0, -4.0]], [[5.0, -5.0], [7.0, 7.0], [4.0, -6.0]]])
+      arg1=Data(numpy.array([[-7.0, -3.0, -5.0], [-4.0, -5.0, -5.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-31.0, 38.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[[-3.0, -3.0, -6.0], [-5.0, 1.0, 0.0], [-7.0, 3.0, 0.0], [7.0, -6.0, 7.0], [-4.0, -1.0, -5.0]], 
-[[4.0, -1.0, 0.0], [3.0, 0.0, 6.0], [0.0, -3.0, -7.0], [4.0, -1.0, 6.0], [-1.0, 7.0, -3.0]], [[-6.0, 1.0, 0.0], [-4.0, -6.0, 
-4.0], [0.0, 0.0, 0.0], [3.0, -3.0, 1.0], [-1.0, 0.0, -4.0]], [[3.0, -1.0, -7.0], [7.0, -6.0, 7.0], [6.0, 0.0, -1.0], [3.0, 4.0, 
-3.0], [-2.0, -6.0, -3.0]]]),self.functionspace)
-      arg1=numpy.array([[0.0, -1.0], [0.0, -4.0], [4.0, -6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-24.0, 51.0], [0.0, 1.0], [0.0, -5.0], [28.0, -25.0], [-20.0, 38.0]], [[0.0, 0.0], [24.0, -39.0], 
-[-28.0, 54.0], [24.0, -36.0], [-12.0, -9.0]], [[0.0, 2.0], [16.0, 4.0], [0.0, 0.0], [4.0, 3.0], [-16.0, 25.0]], [[-28.0, 43.0], 
-[28.0, -25.0], [-4.0, 0.0], [12.0, -37.0], [-12.0, 44.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank3_offset3(self):
+      arg0=numpy.array([[[[-7.0, 2.0], [5.0, -2.0], [6.0, -6.0]], [[-7.0, -2.0], [-6.0, 7.0], [5.0, 7.0]], [[1.0, 4.0], [4.0, 
+-3.0], [-7.0, -2.0]], [[-3.0, 1.0], [-7.0, 3.0], [4.0, -5.0]]], [[[4.0, -1.0], [2.0, -5.0], [1.0, -7.0]], [[-6.0, 0.0], [-3.0, 
+4.0], [7.0, -4.0]], [[7.0, -3.0], [-7.0, -1.0], [7.0, 1.0]], [[0.0, -3.0], [5.0, -5.0], [-1.0, 3.0]]]])
+      arg1=Data(numpy.array([[[2.0, 7.0, -6.0], [-2.0, -3.0, 6.0], [0.0, -2.0, -4.0], [-2.0, 7.0, 6.0]], [[-5.0, -2.0, -7.0], 
+[-3.0, 0.0, 5.0], [-1.0, 1.0, -1.0], [-2.0, -3.0, 0.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([34.0, 120.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[5.0, 0.0, -6.0], [-7.0, 2.0, -6.0]], [[-7.0, 4.0, 0.0], [4.0, 0.0, 1.0]], [[3.0, -5.0, 0.0], 
-[-6.0, -4.0, -6.0]], [[-2.0, -6.0, 6.0], [-3.0, 2.0, 2.0]], [[6.0, -6.0, 1.0], [1.0, -4.0, -3.0]]], [[[0.0, 0.0, 4.0], [-3.0, 
-6.0, -6.0]], [[-6.0, -5.0, 4.0], [6.0, -6.0, -6.0]], [[7.0, -2.0, 0.0], [0.0, -6.0, -1.0]], [[-7.0, -4.0, -2.0], [-5.0, -3.0, 
-6.0]], [[-5.0, 2.0, 0.0], [-6.0, 2.0, 2.0]]], [[[-2.0, -4.0, 2.0], [3.0, 6.0, -6.0]], [[6.0, 0.0, -5.0], [-6.0, 0.0, 4.0]], 
-[[0.0, 0.0, -5.0], [4.0, 2.0, -2.0]], [[2.0, -1.0, 4.0], [0.0, -5.0, -3.0]], [[4.0, -3.0, -1.0], [7.0, 7.0, -2.0]]], [[[-6.0, 
-6.0, -3.0], [6.0, -2.0, 3.0]], [[1.0, -1.0, 2.0], [3.0, -3.0, -3.0]], [[2.0, -6.0, 2.0], [-7.0, 7.0, -7.0]], [[1.0, -3.0, 1.0], 
-[-6.0, -6.0, -2.0]], [[6.0, -3.0, -2.0], [-7.0, 5.0, 0.0]]]]),self.functionspace)
-      arg1=numpy.array([[[4.0, 6.0], [0.0, 4.0], [-1.0, 4.0]], [[-4.0, 4.0], [4.0, 7.0], [-2.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[74.0, 10.0], [-46.0, -13.0], [32.0, -36.0], [2.0, -16.0], [9.0, 1.0]], [[44.0, 64.0], [-64.0, 
--40.0], [6.0, -5.0], [-30.0, -125.0], [8.0, -38.0]], [[14.0, 52.0], [45.0, -20.0], [1.0, 16.0], [-10.0, -2.0], [21.0, 91.0]], 
-[[-59.0, -23.0], [-16.0, 10.0], [76.0, 38.0], [7.0, -62.0], [74.0, 23.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank1_offset0(self):
+      arg0=numpy.array([-4.0, -4.0])
+      arg1=Data(numpy.array([-6.0, 2.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[24.0, -8.0], [24.0, -8.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_array_rank2_offset0(self):
-      arg0=Data(numpy.array([[1.0, 4.0, 6.0, 1.0, 3.0], [-1.0, 2.0, 0.0, -3.0, -3.0], [7.0, 4.0, -6.0, -3.0, 4.0], [-7.0, -6.0, 
-4.0, 0.0, 4.0]]),self.functionspace)
-      arg1=numpy.array([[-7.0, 6.0, 7.0, 5.0, -1.0], [-3.0, -1.0, 6.0, -7.0, 3.0], [-1.0, -1.0, 3.0, 6.0, 7.0], [-4.0, 7.0, 
-0.0, 6.0, -7.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-7.0, 6.0, 7.0, 5.0, -1.0], [-3.0, -1.0, 6.0, -7.0, 3.0], [-1.0, -1.0, 3.0, 6.0, 7.0], [-4.0, 
-7.0, 0.0, 6.0, -7.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], [-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], 
-[-16.0, 28.0, 0.0, 24.0, -28.0]], [[-42.0, 36.0, 42.0, 30.0, -6.0], [-18.0, -6.0, 36.0, -42.0, 18.0], [-6.0, -6.0, 18.0, 36.0, 
-42.0], [-24.0, 42.0, 0.0, 36.0, -42.0]], [[-7.0, 6.0, 7.0, 5.0, -1.0], [-3.0, -1.0, 6.0, -7.0, 3.0], [-1.0, -1.0, 3.0, 6.0, 
-7.0], [-4.0, 7.0, 0.0, 6.0, -7.0]], [[-21.0, 18.0, 21.0, 15.0, -3.0], [-9.0, -3.0, 18.0, -21.0, 9.0], [-3.0, -3.0, 9.0, 18.0, 
-21.0], [-12.0, 21.0, 0.0, 18.0, -21.0]]], [[[7.0, -6.0, -7.0, -5.0, 1.0], [3.0, 1.0, -6.0, 7.0, -3.0], [1.0, 1.0, -3.0, -6.0, 
--7.0], [4.0, -7.0, 0.0, -6.0, 7.0]], [[-14.0, 12.0, 14.0, 10.0, -2.0], [-6.0, -2.0, 12.0, -14.0, 6.0], [-2.0, -2.0, 6.0, 12.0, 
-14.0], [-8.0, 14.0, 0.0, 12.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[21.0, -18.0, -21.0, -15.0, 3.0], [9.0, 3.0, -18.0, 21.0, -9.0], [3.0, 3.0, -9.0, -18.0, -21.0], [12.0, 
--21.0, 0.0, -18.0, 21.0]], [[21.0, -18.0, -21.0, -15.0, 3.0], [9.0, 3.0, -18.0, 21.0, -9.0], [3.0, 3.0, -9.0, -18.0, -21.0], 
-[12.0, -21.0, 0.0, -18.0, 21.0]]], [[[-49.0, 42.0, 49.0, 35.0, -7.0], [-21.0, -7.0, 42.0, -49.0, 21.0], [-7.0, -7.0, 21.0, 
-42.0, 49.0], [-28.0, 49.0, 0.0, 42.0, -49.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], [-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 
-12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]], [[42.0, -36.0, -42.0, -30.0, 6.0], [18.0, 6.0, -36.0, 42.0, -18.0], [6.0, 
-6.0, -18.0, -36.0, -42.0], [24.0, -42.0, 0.0, -36.0, 42.0]], [[21.0, -18.0, -21.0, -15.0, 3.0], [9.0, 3.0, -18.0, 21.0, -9.0], 
-[3.0, 3.0, -9.0, -18.0, -21.0], [12.0, -21.0, 0.0, -18.0, 21.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], [-12.0, -4.0, 24.0, -28.0, 
-12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]]], [[[49.0, -42.0, -49.0, -35.0, 7.0], [21.0, 7.0, 
--42.0, 49.0, -21.0], [7.0, 7.0, -21.0, -42.0, -49.0], [28.0, -49.0, 0.0, -42.0, 49.0]], [[42.0, -36.0, -42.0, -30.0, 6.0], 
-[18.0, 6.0, -36.0, 42.0, -18.0], [6.0, 6.0, -18.0, -36.0, -42.0], [24.0, -42.0, 0.0, -36.0, 42.0]], [[-28.0, 24.0, 28.0, 20.0, 
--4.0], [-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]], [[0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-28.0, 24.0, 28.0, 20.0, -4.0], 
-[-12.0, -4.0, 24.0, -28.0, 12.0], [-4.0, -4.0, 12.0, 24.0, 28.0], [-16.0, 28.0, 0.0, 24.0, -28.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank2_offset1(self):
+      arg0=numpy.array([[-6.0, 1.0], [0.0, -2.0], [-7.0, -5.0]])
+      arg1=Data(numpy.array([[-7.0, -2.0], [-6.0, 1.0], [-7.0, 0.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[91.0, 12.0], [40.0, -4.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank3_offset1(self):
-      arg0=Data(numpy.array([[[0.0, -5.0, 0.0], [-5.0, -3.0, 7.0], [5.0, 6.0, -4.0], [3.0, -4.0, 7.0], [0.0, -1.0, -4.0]], 
-[[4.0, -5.0, -6.0], [-7.0, 2.0, -6.0], [3.0, -6.0, -5.0], [1.0, 6.0, 2.0], [5.0, -3.0, 2.0]], [[0.0, 2.0, -5.0], [5.0, 4.0, 
--3.0], [-6.0, 7.0, 2.0], [0.0, -4.0, -7.0], [1.0, 1.0, -4.0]], [[2.0, -5.0, 5.0], [6.0, 7.0, -5.0], [0.0, 6.0, 4.0], [1.0, 0.0, 
-4.0], [0.0, -7.0, 3.0]]]),self.functionspace)
-      arg1=numpy.array([[[-7.0, -2.0, 7.0, 0.0, -4.0], [-6.0, -2.0, 5.0, 6.0, -3.0], [0.0, -2.0, 6.0, -1.0, -3.0], [0.0, -5.0, 
-2.0, -7.0, 0.0]], [[-1.0, 7.0, 3.0, 3.0, 3.0], [-2.0, -7.0, -2.0, 2.0, 4.0], [-6.0, 2.0, 3.0, -2.0, -3.0], [-4.0, 5.0, -1.0, 
-3.0, 1.0]], [[6.0, -1.0, -7.0, -2.0, -4.0], [-1.0, -3.0, 2.0, -1.0, -1.0], [-5.0, -3.0, 1.0, -3.0, -7.0], [-4.0, -2.0, 4.0, 
-0.0, 1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[5.0, -35.0, -15.0, -15.0, -15.0], [10.0, 35.0, 10.0, -10.0, -20.0], [30.0, -10.0, -15.0, 10.0, 
-15.0], [20.0, -25.0, 5.0, -15.0, -5.0]], [[80.0, -18.0, -93.0, -23.0, -17.0], [29.0, 10.0, -5.0, -43.0, -4.0], [-17.0, -17.0, 
--32.0, -10.0, -25.0], [-16.0, -4.0, 21.0, 26.0, 4.0]], [[-65.0, 36.0, 81.0, 26.0, 14.0], [-38.0, -40.0, 5.0, 46.0, 13.0], 
-[-16.0, 14.0, 44.0, -5.0, -5.0], [-8.0, 13.0, -12.0, -17.0, 2.0]], [[25.0, -41.0, -40.0, -26.0, -52.0], [-17.0, 1.0, 37.0, 3.0, 
--32.0], [-11.0, -35.0, 13.0, -16.0, -46.0], [-12.0, -49.0, 38.0, -33.0, 3.0]], [[-23.0, -3.0, 25.0, 5.0, 13.0], [6.0, 19.0, 
--6.0, 2.0, 0.0], [26.0, 10.0, -7.0, 14.0, 31.0], [20.0, 3.0, -15.0, -3.0, -5.0]]], [[[-59.0, -37.0, 55.0, -3.0, -7.0], [-8.0, 
-45.0, 18.0, 20.0, -26.0], [60.0, 0.0, 3.0, 24.0, 45.0], [44.0, -33.0, -11.0, -43.0, -11.0]], [[11.0, 34.0, -1.0, 18.0, 58.0], 
-[44.0, 18.0, -51.0, -32.0, 35.0], [18.0, 36.0, -42.0, 21.0, 57.0], [16.0, 57.0, -40.0, 55.0, -4.0]], [[-45.0, -43.0, 38.0, 
--8.0, -10.0], [-1.0, 51.0, 17.0, 11.0, -28.0], [61.0, -3.0, -5.0, 24.0, 44.0], [44.0, -35.0, -8.0, -39.0, -11.0]], [[-1.0, 
-38.0, 11.0, 14.0, 6.0], [-20.0, -50.0, -3.0, 16.0, 19.0], [-46.0, 4.0, 26.0, -19.0, -35.0], [-32.0, 21.0, 4.0, 11.0, 8.0]], 
-[[-20.0, -33.0, 12.0, -13.0, -37.0], [-26.0, 5.0, 35.0, 22.0, -29.0], [8.0, -22.0, 23.0, -5.0, -20.0], [4.0, -44.0, 21.0, 
--44.0, -1.0]]], [[[-32.0, 19.0, 41.0, 16.0, 26.0], [1.0, 1.0, -14.0, 9.0, 13.0], [13.0, 19.0, 1.0, 11.0, 29.0], [12.0, 20.0, 
--22.0, 6.0, -3.0]], [[-57.0, 21.0, 68.0, 18.0, 4.0], [-35.0, -29.0, 11.0, 41.0, 4.0], [-9.0, 7.0, 39.0, -4.0, -6.0], [-4.0, 
-1.0, -6.0, -23.0, 1.0]], [[47.0, 59.0, -35.0, 17.0, 37.0], [20.0, -43.0, -40.0, -24.0, 44.0], [-52.0, 20.0, -13.0, -14.0, 
--17.0], [-36.0, 61.0, -11.0, 63.0, 9.0]], [[-38.0, -21.0, 37.0, 2.0, 16.0], [15.0, 49.0, -6.0, -1.0, -9.0], [59.0, 13.0, -19.0, 
-29.0, 61.0], [44.0, -6.0, -24.0, -12.0, -11.0]], [[-32.0, 9.0, 38.0, 11.0, 15.0], [-4.0, 3.0, -5.0, 12.0, 5.0], [14.0, 12.0, 
-5.0, 9.0, 22.0], [12.0, 8.0, -15.0, -4.0, -3.0]]], [[[21.0, -44.0, -36.0, -25.0, -43.0], [-7.0, 16.0, 30.0, -3.0, -31.0], [5.0, 
--29.0, 2.0, -7.0, -26.0], [0.0, -45.0, 29.0, -29.0, 0.0]], [[-79.0, 42.0, 98.0, 31.0, 17.0], [-45.0, -46.0, 6.0, 55.0, 15.0], 
-[-17.0, 17.0, 52.0, -5.0, -4.0], [-8.0, 15.0, -15.0, -21.0, 2.0]], [[18.0, 38.0, -10.0, 10.0, 2.0], [-16.0, -54.0, -4.0, 8.0, 
-20.0], [-56.0, 0.0, 22.0, -24.0, -46.0], [-40.0, 22.0, 10.0, 18.0, 10.0]], [[17.0, -6.0, -21.0, -8.0, -20.0], [-10.0, -14.0, 
-13.0, 2.0, -7.0], [-20.0, -14.0, 10.0, -13.0, -31.0], [-16.0, -13.0, 18.0, -7.0, 4.0]], [[25.0, -52.0, -42.0, -27.0, -33.0], 
-[11.0, 40.0, 20.0, -17.0, -31.0], [27.0, -23.0, -18.0, 5.0, 0.0], [16.0, -41.0, 19.0, -21.0, -4.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank3_offset2(self):
+      arg0=numpy.array([[[0.0, 2.0], [2.0, 5.0], [3.0, 1.0]], [[-2.0, -3.0], [-3.0, 0.0], [-2.0, -1.0]]])
+      arg1=Data(numpy.array([[[1.0, 6.0], [-7.0, -3.0], [-7.0, 2.0]], [[-1.0, 7.0], [1.0, -2.0], [7.0, 
+-6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-50.0, 4.0], [-44.0, -16.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[-6.0, 7.0, 1.0], [0.0, 0.0, -5.0]], [[-4.0, 7.0, -5.0], [2.0, 0.0, -7.0]], [[3.0, -1.0, 4.0], 
-[-1.0, 1.0, -5.0]], [[6.0, 2.0, 2.0], [-6.0, 1.0, 7.0]], [[7.0, 7.0, 7.0], [4.0, -2.0, 7.0]]], [[[-6.0, 0.0, -6.0], [-4.0, 
--7.0, 1.0]], [[0.0, -7.0, -7.0], [-4.0, 3.0, -3.0]], [[-3.0, 4.0, 0.0], [5.0, 0.0, 3.0]], [[-4.0, -7.0, -5.0], [1.0, 4.0, 
--4.0]], [[7.0, 7.0, 7.0], [-1.0, 1.0, 3.0]]], [[[-4.0, -2.0, 4.0], [2.0, 5.0, 7.0]], [[1.0, 0.0, -7.0], [0.0, -3.0, -1.0]], 
-[[4.0, 0.0, -3.0], [-7.0, 5.0, -7.0]], [[-5.0, -1.0, 0.0], [-7.0, 3.0, 0.0]], [[0.0, -1.0, -7.0], [7.0, 5.0, -5.0]]], [[[-1.0, 
-7.0, -6.0], [-3.0, 5.0, 5.0]], [[4.0, 0.0, 4.0], [5.0, -7.0, 3.0]], [[4.0, -6.0, 5.0], [6.0, 5.0, 1.0]], [[-7.0, -1.0, -7.0], 
-[0.0, -5.0, -7.0]], [[6.0, 0.0, 4.0], [4.0, 4.0, -6.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[1.0, 0.0, 2.0, -6.0, -4.0], [2.0, 6.0, 1.0, 0.0, 3.0], [-4.0, 4.0, -5.0, 3.0, -1.0], [-6.0, -7.0, 
-3.0, -7.0, -1.0]], [[5.0, 1.0, -7.0, 2.0, -5.0], [4.0, 5.0, 0.0, 7.0, -1.0], [0.0, 4.0, -6.0, 0.0, -3.0], [0.0, -7.0, -4.0, 
-7.0, -2.0]], [[-1.0, 3.0, -7.0, -3.0, -2.0], [6.0, -2.0, -4.0, 1.0, -5.0], [4.0, -3.0, 4.0, 0.0, 1.0], [0.0, 5.0, 0.0, 0.0, 
--6.0]]], [[[1.0, 1.0, -6.0, 6.0, -3.0], [-7.0, -1.0, -3.0, -7.0, 7.0], [7.0, 6.0, -2.0, 5.0, -4.0], [-4.0, 5.0, 4.0, -5.0, 
-0.0]], [[-1.0, 6.0, 0.0, -5.0, 4.0], [7.0, 7.0, -2.0, -7.0, -6.0], [-2.0, 0.0, -5.0, 0.0, 2.0], [-1.0, -4.0, 7.0, 4.0, -5.0]], 
-[[4.0, 7.0, -7.0, 6.0, -3.0], [-2.0, 7.0, -3.0, 0.0, 4.0], [6.0, 0.0, -7.0, 5.0, -2.0], [3.0, 0.0, -3.0, 0.0, 3.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[8.0, -25.0, -33.0, 17.0, 2.0], [32.0, -38.0, 5.0, 50.0, -50.0], [-2.0, 1.0, 27.0, -43.0, -4.0], 
-[21.0, -2.0, -31.0, 91.0, -29.0]], [[10.0, -55.0, 15.0, 23.0, 6.0], [-10.0, -30.0, 31.0, 30.0, -8.0], [-32.0, 39.0, 3.0, -37.0, 
--16.0], [-5.0, -36.0, -11.0, 67.0, -1.0]], [[-28.0, -19.0, 26.0, -73.0, 7.0], [50.0, -22.0, 3.0, -3.0, -43.0], [-35.0, -10.0, 
-39.0, -21.0, 20.0], [-30.0, -3.0, 31.0, -19.0, -45.0]], [[35.0, 57.0, -29.0, -37.0, -37.0], [67.0, 104.0, -7.0, 51.0, -14.0], 
-[-18.0, -10.0, -76.0, 23.0, 2.0], [8.0, -80.0, -28.0, 6.0, -6.0]], [[69.0, 69.0, -157.0, 27.0, -118.0], [28.0, 94.0, -50.0, 
-42.0, 47.0], [74.0, 59.0, -96.0, 76.0, -55.0], [-35.0, -35.0, -26.0, -28.0, -32.0]]], [[[7.0, -57.0, 47.0, 71.0, 17.0], [-71.0, 
--62.0, 41.0, 71.0, 30.0], [-8.0, -30.0, 42.0, -33.0, 0.0], [62.0, 20.0, -86.0, 34.0, 80.0]], [[-47.0, -35.0, 143.0, -50.0, 
-82.0], [-15.0, -17.0, 43.0, -49.0, -16.0], [-80.0, -31.0, 28.0, -35.0, 42.0], [4.0, -18.0, 42.0, -17.0, 32.0]], [[34.0, 30.0, 
--85.0, 74.0, -32.0], [-31.0, 18.0, -27.0, -7.0, 34.0], [65.0, 34.0, -40.0, 31.0, -35.0], [7.0, 18.0, -14.0, 24.0, 4.0]], 
-[[-53.0, -25.0, 98.0, -13.0, 86.0], [-37.0, -50.0, 17.0, -89.0, -13.0], [-29.0, -23.0, 48.0, -27.0, 32.0], [4.0, 41.0, 60.0, 
--10.0, 16.0]], [[45.0, 54.0, -99.0, -42.0, -79.0], [92.0, 92.0, -29.0, 56.0, -22.0], [9.0, 29.0, -73.0, 31.0, -21.0], [-30.0, 
--72.0, -13.0, 9.0, -59.0]]], [[[7.0, 91.0, -83.0, 37.0, 11.0], [15.0, 40.0, -57.0, -59.0, -18.0], [78.0, -24.0, -30.0, 33.0, 
-2.0], [32.0, 52.0, 18.0, 24.0, -20.0]], [[7.0, -46.0, 58.0, 24.0, 1.0], [-59.0, -8.0, 38.0, 14.0, 52.0], [-32.0, 25.0, -11.0, 
--2.0, -12.0], [-6.0, -30.0, -15.0, -19.0, 53.0]], [[-33.0, -35.0, 120.0, -124.0, 52.0], [88.0, 23.0, 48.0, 11.0, -80.0], 
-[-129.0, -17.0, 6.0, -58.0, 45.0], [-22.0, -98.0, 40.0, 27.0, -32.0]], [[-20.0, 10.0, 39.0, -29.0, 58.0], [56.0, -7.0, 10.0, 
-21.0, -81.0], [-35.0, -66.0, 30.0, -50.0, 42.0], [55.0, -5.0, -18.0, 75.0, -8.0]], [[-16.0, -20.0, 49.0, 6.0, 33.0], [-50.0, 
-2.0, 12.0, -98.0, 35.0], [-19.0, 59.0, -26.0, 10.0, -12.0], [-48.0, -13.0, 82.0, -22.0, 4.0]]], [[[52.0, 51.0, -26.0, 25.0, 
--5.0], [36.0, 114.0, 7.0, 29.0, -11.0], [-21.0, 24.0, -115.0, 7.0, -14.0], [28.0, -107.0, -23.0, 91.0, 13.0]], [[24.0, -4.0, 
--71.0, 47.0, -76.0], [-58.0, -17.0, -22.0, 18.0, 81.0], [67.0, 34.0, 0.0, 52.0, -40.0], [-28.0, 45.0, -26.0, -81.0, 16.0]], 
-[[-26.0, 52.0, -28.0, -34.0, 3.0], [5.0, 20.0, -47.0, -114.0, 9.0], [42.0, 13.0, -8.0, 47.0, 3.0], [-50.0, 49.0, 92.0, -80.0, 
--44.0]], [[-28.0, -101.0, 91.0, 44.0, 48.0], [-81.0, -117.0, 52.0, 21.0, 17.0], [-32.0, -11.0, 87.0, -56.0, 7.0], [26.0, 41.0, 
--31.0, 22.0, 55.0]], [[-22.0, -2.0, 2.0, -80.0, -10.0], [48.0, 10.0, -12.0, -52.0, -22.0], [-24.0, 36.0, 0.0, 8.0, 2.0], 
-[-74.0, -18.0, 80.0, -46.0, -68.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank4_offset3(self):
+      arg0=numpy.array([[[[0.0, -1.0], [-6.0, 1.0], [0.0, 2.0]], [[-5.0, 0.0], [-2.0, 5.0], [2.0, -2.0]], [[-4.0, -1.0], [-3.0, 
+1.0], [6.0, 1.0]], [[-1.0, 3.0], [2.0, 0.0], [0.0, 5.0]]], [[[0.0, 6.0], [-3.0, -1.0], [-7.0, -7.0]], [[-3.0, 0.0], [-1.0, 
+-6.0], [2.0, -6.0]], [[-5.0, 3.0], [-4.0, -3.0], [-2.0, -2.0]], [[3.0, 0.0], [4.0, -1.0], [-3.0, 0.0]]]])
+      arg1=Data(numpy.array([[[[3.0, 7.0], [-2.0, 2.0], [2.0, -1.0]], [[0.0, 1.0], [4.0, 5.0], [-6.0, -5.0]], [[1.0, -2.0], 
+[3.0, -6.0], [-2.0, 6.0]], [[7.0, -1.0], [7.0, 1.0], [-3.0, -3.0]]], [[[3.0, -1.0], [2.0, -3.0], [2.0, -4.0]], [[5.0, 3.0], 
+[0.0, -5.0], [-4.0, -6.0]], [[0.0, 0.0], [-5.0, -5.0], [4.0, 1.0]], [[-4.0, -2.0], [-2.0, -2.0], [-2.0, 
+0.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-71.0, 53.0], [72.0, 118.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[7.0, -4.0, -1.0, 0.0, -1.0], [-5.0, 2.0, -5.0, -2.0, 2.0], [-2.0, -7.0, 5.0, -3.0, -1.0], [-7.0, 
-0.0, 4.0, 3.0, 1.0]]),self.functionspace)
-      arg1=Data(-5.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-35.0, 20.0, 5.0, -0.0, 5.0], [25.0, -10.0, 25.0, 10.0, -10.0], [10.0, 35.0, -25.0, 15.0, 5.0], 
-[35.0, -0.0, -20.0, -15.0, -5.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank2_offset0(self):
+      arg0=numpy.array([5.0, -6.0])
+      arg1=Data(numpy.array([[0.0, 6.0, -4.0, -6.0, -5.0], [4.0, 2.0, 7.0, 0.0, 0.0], [-1.0, -1.0, -6.0, -1.0, 1.0], [1.0, 
+-7.0, 6.0, -1.0, -3.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 30.0, -20.0, -30.0, -25.0], [20.0, 10.0, 35.0, 0.0, 0.0], [-5.0, -5.0, -30.0, -5.0, 5.0], 
+[5.0, -35.0, 30.0, -5.0, -15.0]], [[0.0, -36.0, 24.0, 36.0, 30.0], [-24.0, -12.0, -42.0, 0.0, 0.0], [6.0, 6.0, 36.0, 6.0, 
+-6.0], [-6.0, 42.0, -36.0, 6.0, 18.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[0.0, -4.0, 3.0], [2.0, 5.0, 1.0], [-6.0, -7.0, 7.0], [6.0, -7.0, 5.0], [-2.0, 1.0, 4.0]], [[7.0, 
--6.0, 0.0], [3.0, 3.0, -5.0], [4.0, -2.0, 0.0], [4.0, -4.0, -4.0], [5.0, 7.0, 4.0]], [[-5.0, -4.0, 7.0], [-1.0, -1.0, -6.0], 
-[7.0, -4.0, 6.0], [3.0, -6.0, 1.0], [4.0, 0.0, 6.0]], [[3.0, 1.0, 6.0], [5.0, -7.0, 1.0], [-3.0, -3.0, -2.0], [-6.0, 3.0, 6.0], 
-[0.0, 4.0, 4.0]]]),self.functionspace)
-      arg1=Data(numpy.array([-6.0, 5.0, 2.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-14.0, 15.0, 15.0, -61.0, 25.0], [-72.0, -13.0, -34.0, -52.0, 13.0], [24.0, -11.0, -50.0, -46.0, 
--12.0], [-1.0, -63.0, -1.0, 63.0, 28.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank3_offset1(self):
+      arg0=numpy.array([[-6.0, 7.0], [3.0, 4.0], [-7.0, -3.0]])
+      arg1=Data(numpy.array([[[5.0, 3.0, 4.0, 3.0, 4.0], [4.0, 3.0, -4.0, -5.0, -6.0], [2.0, -6.0, -6.0, 2.0, -1.0], [0.0, 
+-6.0, 1.0, -1.0, -1.0]], [[0.0, -3.0, 0.0, -1.0, 6.0], [7.0, -3.0, -2.0, -3.0, 2.0], [-1.0, 1.0, 7.0, -5.0, -5.0], [-1.0, 6.0, 
+6.0, 2.0, -5.0]], [[1.0, 4.0, -3.0, 6.0, -1.0], [5.0, -2.0, -6.0, 1.0, 2.0], [-5.0, 1.0, -7.0, 7.0, -3.0], [5.0, 1.0, 5.0, 7.0, 
+-4.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-37.0, -55.0, -3.0, -63.0, 1.0], [-38.0, -13.0, 60.0, 14.0, 28.0], [20.0, 32.0, 106.0, -76.0, 
+12.0], [-38.0, 47.0, -23.0, -37.0, 19.0]], [[32.0, -3.0, 37.0, -1.0, 55.0], [41.0, 15.0, -18.0, -50.0, -40.0], [25.0, -41.0, 
+7.0, -27.0, -18.0], [-19.0, -21.0, 16.0, -20.0, -15.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[7.0, 4.0, 0.0], [2.0, 5.0, 7.0]], [[-1.0, 0.0, 3.0], [6.0, 0.0, -2.0]], [[2.0, 5.0, -7.0], 
-[-3.0, 0.0, 7.0]], [[-5.0, 7.0, 2.0], [-4.0, 7.0, 7.0]], [[3.0, -1.0, 0.0], [4.0, -5.0, 5.0]]], [[[-4.0, -1.0, 2.0], [1.0, 2.0, 
-2.0]], [[0.0, 0.0, -5.0], [-4.0, 7.0, -6.0]], [[-1.0, 6.0, 1.0], [7.0, 0.0, 7.0]], [[0.0, 6.0, -7.0], [-7.0, 5.0, -1.0]], 
-[[7.0, 4.0, -2.0], [5.0, 6.0, -1.0]]], [[[-3.0, -2.0, 3.0], [-4.0, 3.0, 0.0]], [[7.0, -7.0, 4.0], [7.0, 0.0, -7.0]], [[0.0, 
-3.0, -7.0], [-7.0, -1.0, 3.0]], [[0.0, 0.0, -7.0], [0.0, 1.0, 5.0]], [[-4.0, 0.0, 5.0], [4.0, -5.0, 2.0]]], [[[0.0, 2.0, -5.0], 
-[7.0, 0.0, 2.0]], [[1.0, 0.0, 6.0], [-1.0, 0.0, -5.0]], [[2.0, 0.0, 5.0], [-1.0, -5.0, 1.0]], [[-2.0, -2.0, -6.0], [-5.0, 4.0, 
--3.0]], [[2.0, 0.0, 0.0], [0.0, -7.0, -4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[-5.0, 0.0, -2.0], [0.0, 0.0, -6.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-77.0, 11.0, -38.0, -21.0, -45.0], [4.0, 46.0, -39.0, 20.0, -25.0], [9.0, -1.0, -4.0, -16.0, 
--2.0], [-2.0, 13.0, -26.0, 40.0, 14.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank4_offset2(self):
+      arg0=numpy.array([[[4.0, -3.0], [-3.0, 6.0], [-4.0, 5.0]], [[1.0, 4.0], [1.0, -1.0], [6.0, -7.0]]])
+      arg1=Data(numpy.array([[[[7.0, 1.0, -4.0, -6.0, -7.0], [0.0, -2.0, -4.0, -2.0, 1.0], [-3.0, 1.0, -6.0, -3.0, -7.0], 
+[-2.0, 7.0, 6.0, 7.0, 5.0]], [[7.0, -3.0, -4.0, 3.0, 0.0], [-4.0, 4.0, 0.0, 0.0, 4.0], [1.0, -3.0, 3.0, -6.0, -2.0], [-4.0, 
+4.0, 5.0, -2.0, -2.0]], [[-3.0, -2.0, 5.0, 7.0, -4.0], [2.0, -5.0, 1.0, -1.0, 1.0], [-3.0, 2.0, -6.0, 0.0, -1.0], [0.0, -1.0, 
+-5.0, -2.0, 4.0]]], [[[5.0, 4.0, 5.0, 0.0, -5.0], [1.0, 5.0, -2.0, 5.0, 5.0], [1.0, 1.0, -4.0, -1.0, 5.0], [4.0, -6.0, 6.0, 
+-6.0, 3.0]], [[0.0, 0.0, 2.0, 7.0, 6.0], [3.0, -4.0, 7.0, -6.0, -4.0], [-5.0, 0.0, 3.0, -3.0, -7.0], [1.0, -6.0, -2.0, 1.0, 
+3.0]], [[7.0, 6.0, 0.0, 0.0, -2.0], [0.0, -3.0, -1.0, -5.0, -6.0], [0.0, -4.0, 6.0, -7.0, -5.0], [5.0, 6.0, -3.0, -4.0, 
+7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[66.0, 61.0, -17.0, -54.0, -23.0], [8.0, -17.0, -21.0, -35.0, -47.0], [-7.0, -18.0, 26.0, -40.0, 
+-50.0], [39.0, 44.0, 15.0, 13.0, 58.0]], [[-23.0, -57.0, 31.0, 64.0, -11.0], [-13.0, 50.0, 9.0, 62.0, 92.0], [9.0, 21.0, -55.0, 
+21.0, 66.0], [-38.0, -62.0, 34.0, -40.0, -47.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([[-4.0, 7.0, 6.0, 4.0, 6.0], [0.0, -3.0, -6.0, 3.0, -7.0], [5.0, 4.0, -5.0, -4.0, -5.0], [6.0, 
--3.0, -4.0, -6.0, 5.0]]),self.functionspace)
-      arg1=Data(numpy.array([2.0, -6.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-8.0, 24.0], [14.0, -42.0], [12.0, -36.0], [8.0, -24.0], [12.0, -36.0]], [[0.0, 0.0], [-6.0, 
-18.0], [-12.0, 36.0], [6.0, -18.0], [-14.0, 42.0]], [[10.0, -30.0], [8.0, -24.0], [-10.0, 30.0], [-8.0, 24.0], [-10.0, 30.0]], 
-[[12.0, -36.0], [-6.0, 18.0], [-8.0, 24.0], [-12.0, 36.0], [10.0, -30.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_constData_rank3_offset0(self):
+      arg0=numpy.array([-1.0, 6.0])
+      arg1=Data(numpy.array([[[2.0, -6.0], [7.0, -5.0]], [[2.0, 7.0], [-6.0, -1.0]], [[6.0, 4.0], [-2.0, 2.0]], [[-4.0, 0.0], 
+[2.0, 0.0]], [[4.0, -5.0], [-1.0, 6.0]], [[0.0, -1.0], [-1.0, -7.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-2.0, 6.0], [-7.0, 5.0]], [[-2.0, -7.0], [6.0, 1.0]], [[-6.0, -4.0], [2.0, -2.0]], [[4.0, 0.0], 
+[-2.0, 0.0]], [[-4.0, 5.0], [1.0, -6.0]], [[0.0, 1.0], [1.0, 7.0]]], [[[12.0, -36.0], [42.0, -30.0]], [[12.0, 42.0], [-36.0, 
+-6.0]], [[36.0, 24.0], [-12.0, 12.0]], [[-24.0, 0.0], [12.0, 0.0]], [[24.0, -30.0], [-6.0, 36.0]], [[0.0, -6.0], [-6.0, 
+-42.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[3.0, 0.0, -5.0], [-7.0, -7.0, 3.0], [-4.0, -4.0, -4.0], [-4.0, -2.0, -7.0], [5.0, -7.0, 0.0]], 
-[[-4.0, 3.0, -6.0], [6.0, 6.0, -2.0], [-7.0, 3.0, 3.0], [0.0, -5.0, -6.0], [-2.0, -3.0, -3.0]], [[5.0, 1.0, 4.0], [-6.0, 1.0, 
-7.0], [0.0, -2.0, 4.0], [6.0, -1.0, -6.0], [-2.0, -2.0, 6.0]], [[-5.0, 2.0, -2.0], [-7.0, 3.0, -6.0], [7.0, 1.0, -3.0], [-4.0, 
--1.0, 7.0], [-5.0, -6.0, -4.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[1.0, -7.0], [6.0, -5.0], [3.0, 5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-12.0, -46.0], [-40.0, 99.0], [-40.0, 28.0], [-37.0, 3.0], [-37.0, 0.0]], [[-4.0, -17.0], [36.0, 
--82.0], [20.0, 49.0], [-48.0, -5.0], [-29.0, 14.0]], [[23.0, -20.0], [21.0, 72.0], [0.0, 30.0], [-18.0, -67.0], [4.0, 54.0]], 
-[[1.0, 15.0], [-7.0, 4.0], [4.0, -69.0], [11.0, 68.0], [-53.0, 45.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank4_offset1(self):
+      arg0=numpy.array([[-3.0, -2.0], [4.0, 1.0], [6.0, 0.0]])
+      arg1=Data(numpy.array([[[[-3.0, -7.0], [7.0, -6.0]], [[-5.0, -5.0], [6.0, -2.0]], [[7.0, 0.0], [-2.0, -1.0]], [[-1.0, 
+-4.0], [1.0, -3.0]], [[3.0, 7.0], [-7.0, -1.0]], [[-6.0, 0.0], [5.0, 2.0]]], [[[-6.0, 3.0], [5.0, -3.0]], [[1.0, 1.0], [-4.0, 
+-7.0]], [[2.0, -6.0], [3.0, 7.0]], [[2.0, 1.0], [-3.0, -1.0]], [[6.0, 7.0], [-4.0, 6.0]], [[-1.0, -5.0], [-4.0, -7.0]]], 
+[[[-2.0, -5.0], [1.0, -1.0]], [[-2.0, 3.0], [3.0, -7.0]], [[5.0, 1.0], [0.0, -1.0]], [[-4.0, -3.0], [-7.0, -4.0]], [[-7.0, 
+6.0], [7.0, 3.0]], [[3.0, -6.0], [5.0, 0.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-27.0, 3.0], [5.0, 0.0]], [[7.0, 37.0], [-16.0, -64.0]], [[17.0, -18.0], [18.0, 25.0]], [[-13.0, 
+-2.0], [-57.0, -19.0]], [[-27.0, 43.0], [47.0, 45.0]], [[32.0, -56.0], [-1.0, -34.0]]], [[[0.0, 17.0], [-9.0, 9.0]], [[11.0, 
+11.0], [-16.0, -3.0]], [[-12.0, -6.0], [7.0, 9.0]], [[4.0, 9.0], [-5.0, 5.0]], [[0.0, -7.0], [10.0, 8.0]], [[11.0, -5.0], 
+[-14.0, -11.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[-2.0, -1.0, 6.0], [3.0, 0.0, -1.0]], [[-4.0, -3.0, -4.0], [0.0, 2.0, -4.0]], [[-6.0, 2.0, 3.0], 
-[7.0, -1.0, 0.0]], [[-4.0, 3.0, 4.0], [0.0, 0.0, 4.0]], [[5.0, 1.0, -5.0], [5.0, 0.0, 6.0]]], [[[2.0, 1.0, 1.0], [-5.0, 7.0, 
-6.0]], [[-7.0, 1.0, 4.0], [0.0, 6.0, 1.0]], [[-3.0, -2.0, 3.0], [2.0, 7.0, 0.0]], [[-4.0, -7.0, -5.0], [-7.0, -6.0, 0.0]], 
-[[-1.0, 2.0, 6.0], [4.0, 4.0, 6.0]]], [[[6.0, 0.0, 1.0], [0.0, 0.0, 3.0]], [[-4.0, -5.0, 0.0], [7.0, 0.0, 4.0]], [[-1.0, 7.0, 
-0.0], [0.0, -4.0, 4.0]], [[-2.0, -3.0, -1.0], [-4.0, 0.0, 2.0]], [[-2.0, 7.0, 6.0], [-4.0, 3.0, 2.0]]], [[[7.0, -3.0, 4.0], 
-[7.0, -7.0, -2.0]], [[-1.0, -3.0, -2.0], [2.0, 3.0, 1.0]], [[-7.0, 3.0, -5.0], [-3.0, -5.0, -3.0]], [[7.0, -3.0, 6.0], [-5.0, 
-1.0, -6.0]], [[6.0, -4.0, 7.0], [4.0, 0.0, -2.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-7.0, -5.0], [6.0, -3.0], [-2.0, 6.0]], [[0.0, -1.0], [0.0, -6.0], [-5.0, 
-7.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[1.0, 39.0], [38.0, -35.0], [48.0, 41.0], [18.0, 63.0], [-49.0, -21.0]], [[-40.0, -2.0], [42.0, 
-27.0], [3.0, -5.0], [-4.0, 54.0], [-23.0, 49.0]], [[-59.0, -3.0], [-22.0, 56.0], [29.0, 36.0], [-12.0, 31.0], [34.0, 25.0]], 
-[[-65.0, 19.0], [-12.0, -11.0], [92.0, 8.0], [-49.0, -33.0], [-70.0, 6.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank0_offset0(self):
+      arg0=numpy.array([6.0, 5.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-2.0)+(1-msk_arg1)*(-2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-12.0, -10.0])+(1.-msk_ref)*numpy.array([-12.0, -10.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_constData_rank2_offset0(self):
-      arg0=Data(numpy.array([[-4.0, 5.0, -4.0, 3.0, 2.0], [7.0, 5.0, 7.0, -2.0, 3.0], [1.0, 5.0, -2.0, 0.0, -4.0], [3.0, -7.0, 
-3.0, -6.0, -5.0]]),self.functionspace)
-      arg1=Data(numpy.array([[-4.0, -1.0, 3.0, -5.0, 5.0], [6.0, 1.0, 3.0, 0.0, -2.0], [4.0, 3.0, 0.0, 0.0, -4.0], [-5.0, -5.0, 
-5.0, 5.0, -7.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[16.0, 4.0, -12.0, 20.0, -20.0], [-24.0, -4.0, -12.0, 0.0, 8.0], [-16.0, -12.0, 0.0, 0.0, 16.0], 
-[20.0, 20.0, -20.0, -20.0, 28.0]], [[-20.0, -5.0, 15.0, -25.0, 25.0], [30.0, 5.0, 15.0, 0.0, -10.0], [20.0, 15.0, 0.0, 0.0, 
--20.0], [-25.0, -25.0, 25.0, 25.0, -35.0]], [[16.0, 4.0, -12.0, 20.0, -20.0], [-24.0, -4.0, -12.0, 0.0, 8.0], [-16.0, -12.0, 
-0.0, 0.0, 16.0], [20.0, 20.0, -20.0, -20.0, 28.0]], [[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 3.0, 9.0, 0.0, -6.0], [12.0, 9.0, 
-0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]], [[-8.0, -2.0, 6.0, -10.0, 10.0], [12.0, 2.0, 6.0, 0.0, -4.0], [8.0, 6.0, 
-0.0, 0.0, -8.0], [-10.0, -10.0, 10.0, 10.0, -14.0]]], [[[-28.0, -7.0, 21.0, -35.0, 35.0], [42.0, 7.0, 21.0, 0.0, -14.0], [28.0, 
-21.0, 0.0, 0.0, -28.0], [-35.0, -35.0, 35.0, 35.0, -49.0]], [[-20.0, -5.0, 15.0, -25.0, 25.0], [30.0, 5.0, 15.0, 0.0, -10.0], 
-[20.0, 15.0, 0.0, 0.0, -20.0], [-25.0, -25.0, 25.0, 25.0, -35.0]], [[-28.0, -7.0, 21.0, -35.0, 35.0], [42.0, 7.0, 21.0, 0.0, 
--14.0], [28.0, 21.0, 0.0, 0.0, -28.0], [-35.0, -35.0, 35.0, 35.0, -49.0]], [[8.0, 2.0, -6.0, 10.0, -10.0], [-12.0, -2.0, -6.0, 
-0.0, 4.0], [-8.0, -6.0, 0.0, 0.0, 8.0], [10.0, 10.0, -10.0, -10.0, 14.0]], [[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 3.0, 9.0, 
-0.0, -6.0], [12.0, 9.0, 0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]]], [[[-4.0, -1.0, 3.0, -5.0, 5.0], [6.0, 1.0, 3.0, 
-0.0, -2.0], [4.0, 3.0, 0.0, 0.0, -4.0], [-5.0, -5.0, 5.0, 5.0, -7.0]], [[-20.0, -5.0, 15.0, -25.0, 25.0], [30.0, 5.0, 15.0, 
-0.0, -10.0], [20.0, 15.0, 0.0, 0.0, -20.0], [-25.0, -25.0, 25.0, 25.0, -35.0]], [[8.0, 2.0, -6.0, 10.0, -10.0], [-12.0, -2.0, 
--6.0, 0.0, 4.0], [-8.0, -6.0, 0.0, 0.0, 8.0], [10.0, 10.0, -10.0, -10.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[16.0, 4.0, -12.0, 20.0, -20.0], [-24.0, -4.0, -12.0, 0.0, 
-8.0], [-16.0, -12.0, 0.0, 0.0, 16.0], [20.0, 20.0, -20.0, -20.0, 28.0]]], [[[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 3.0, 9.0, 
-0.0, -6.0], [12.0, 9.0, 0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]], [[28.0, 7.0, -21.0, 35.0, -35.0], [-42.0, -7.0, 
--21.0, 0.0, 14.0], [-28.0, -21.0, 0.0, 0.0, 28.0], [35.0, 35.0, -35.0, -35.0, 49.0]], [[-12.0, -3.0, 9.0, -15.0, 15.0], [18.0, 
-3.0, 9.0, 0.0, -6.0], [12.0, 9.0, 0.0, 0.0, -12.0], [-15.0, -15.0, 15.0, 15.0, -21.0]], [[24.0, 6.0, -18.0, 30.0, -30.0], 
-[-36.0, -6.0, -18.0, 0.0, 12.0], [-24.0, -18.0, 0.0, 0.0, 24.0], [30.0, 30.0, -30.0, -30.0, 42.0]], [[20.0, 5.0, -15.0, 25.0, 
--25.0], [-30.0, -5.0, -15.0, 0.0, 10.0], [-20.0, -15.0, 0.0, 0.0, 20.0], [25.0, 25.0, -25.0, -25.0, 
-35.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[-2.0, 0.0], [7.0, 6.0], [3.0, 3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, -7.0, 1.0])+(1.-msk_arg1)*numpy.array([0.0, 6.0, -3.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-54.0, -39.0])+(1.-msk_ref)*numpy.array([33.0, 27.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([[[-1.0, 4.0, 0.0], [-3.0, 6.0, -1.0], [2.0, 7.0, 6.0], [-3.0, 7.0, 0.0], [6.0, 7.0, 0.0]], [[-1.0, 
-0.0, 2.0], [-4.0, -1.0, -7.0], [-2.0, 1.0, -5.0], [-1.0, -4.0, -1.0], [-4.0, 1.0, -5.0]], [[1.0, -4.0, -7.0], [-2.0, -3.0, 
--7.0], [3.0, 7.0, 3.0], [1.0, 0.0, -4.0], [-2.0, 6.0, -1.0]], [[6.0, 4.0, 0.0], [-7.0, 0.0, 0.0], [5.0, -4.0, -6.0], [1.0, 7.0, 
--5.0], [6.0, -7.0, -3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-6.0, 3.0, 0.0, -7.0, 0.0], [5.0, -2.0, -5.0, -5.0, -5.0], [2.0, -1.0, 5.0, -2.0, -2.0], [0.0, 
--7.0, -3.0, 5.0, 6.0]], [[2.0, -6.0, 0.0, -3.0, 6.0], [6.0, -1.0, 6.0, 6.0, 2.0], [-2.0, 7.0, 1.0, -7.0, 3.0], [-7.0, 7.0, 
--6.0, -4.0, 4.0]], [[-3.0, -2.0, -1.0, 0.0, -7.0], [-6.0, 7.0, -1.0, -3.0, 7.0], [-4.0, 1.0, -4.0, -7.0, 6.0], [5.0, 7.0, -3.0, 
--1.0, -3.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[14.0, -27.0, 0.0, -5.0, 24.0], [19.0, -2.0, 29.0, 29.0, 13.0], [-10.0, 29.0, -1.0, -26.0, 14.0], 
-[-28.0, 35.0, -21.0, -21.0, 10.0]], [[33.0, -43.0, 1.0, 3.0, 43.0], [27.0, -7.0, 52.0, 54.0, 20.0], [-14.0, 44.0, -5.0, -29.0, 
-18.0], [-47.0, 56.0, -24.0, -38.0, 9.0]], [[-16.0, -48.0, -6.0, -35.0, 0.0], [16.0, 31.0, 26.0, 14.0, 46.0], [-34.0, 53.0, 
--7.0, -95.0, 53.0], [-19.0, 77.0, -66.0, -24.0, 22.0]], [[32.0, -51.0, 0.0, 0.0, 42.0], [27.0, -1.0, 57.0, 57.0, 29.0], [-20.0, 
-52.0, -8.0, -43.0, 27.0], [-49.0, 70.0, -33.0, -43.0, 10.0]], [[-22.0, -24.0, 0.0, -63.0, 42.0], [72.0, -19.0, 12.0, 12.0, 
--16.0], [-2.0, 43.0, 37.0, -61.0, 9.0], [-49.0, 7.0, -60.0, 2.0, 64.0]]], [[[0.0, -7.0, -2.0, 7.0, -14.0], [-17.0, 16.0, 3.0, 
--1.0, 19.0], [-10.0, 3.0, -13.0, -12.0, 14.0], [10.0, 21.0, -3.0, -7.0, -12.0]], [[43.0, 8.0, 7.0, 31.0, 43.0], [16.0, -40.0, 
-21.0, 35.0, -31.0], [22.0, -10.0, 7.0, 64.0, -37.0], [-28.0, -28.0, 39.0, -9.0, -7.0]], [[29.0, -2.0, 5.0, 11.0, 41.0], [26.0, 
--32.0, 21.0, 31.0, -23.0], [14.0, 4.0, 11.0, 32.0, -23.0], [-32.0, -14.0, 15.0, -9.0, 7.0]], [[1.0, 23.0, 1.0, 19.0, -17.0], 
-[-23.0, -1.0, -18.0, -16.0, -10.0], [10.0, -28.0, -5.0, 37.0, -16.0], [23.0, -28.0, 30.0, 12.0, -19.0]], [[41.0, -8.0, 5.0, 
-25.0, 41.0], [16.0, -28.0, 31.0, 41.0, -13.0], [10.0, 6.0, 1.0, 36.0, -19.0], [-32.0, 0.0, 21.0, -19.0, -5.0]]], [[[7.0, 41.0, 
-7.0, 5.0, 25.0], [23.0, -47.0, -22.0, -8.0, -62.0], [38.0, -36.0, 29.0, 75.0, -56.0], [-7.0, -84.0, 42.0, 28.0, 11.0]], [[27.0, 
-26.0, 7.0, 23.0, 31.0], [14.0, -42.0, -1.0, 13.0, -45.0], [30.0, -26.0, 15.0, 74.0, -47.0], [-14.0, -56.0, 45.0, 9.0, -3.0]], 
-[[-13.0, -39.0, -3.0, -42.0, 21.0], [39.0, 8.0, 24.0, 18.0, 20.0], [-20.0, 49.0, 10.0, -76.0, 33.0], [-34.0, 49.0, -60.0, 
--16.0, 37.0]], [[6.0, 11.0, 4.0, -7.0, 28.0], [29.0, -30.0, -1.0, 7.0, -33.0], [18.0, -5.0, 21.0, 26.0, -26.0], [-20.0, -35.0, 
-9.0, 9.0, 18.0]], [[27.0, -40.0, 1.0, -4.0, 43.0], [32.0, -9.0, 47.0, 49.0, 15.0], [-12.0, 43.0, 0.0, -31.0, 16.0], [-47.0, 
-49.0, -27.0, -33.0, 15.0]]], [[[-28.0, -6.0, 0.0, -54.0, 24.0], [54.0, -16.0, -6.0, -6.0, -22.0], [4.0, 22.0, 34.0, -40.0, 
-0.0], [-28.0, -14.0, -42.0, 14.0, 52.0]], [[42.0, -21.0, 0.0, 49.0, 0.0], [-35.0, 14.0, 35.0, 35.0, 35.0], [-14.0, 7.0, -35.0, 
-14.0, 14.0], [0.0, 49.0, 21.0, -35.0, -42.0]], [[-20.0, 51.0, 6.0, -23.0, 18.0], [37.0, -48.0, -43.0, -31.0, -75.0], [42.0, 
--39.0, 45.0, 60.0, -58.0], [-2.0, -105.0, 27.0, 47.0, 32.0]], [[23.0, -29.0, 5.0, -28.0, 77.0], [77.0, -44.0, 42.0, 52.0, 
--26.0], [8.0, 43.0, 32.0, -16.0, -11.0], [-74.0, 7.0, -30.0, -18.0, 49.0]], [[-41.0, 66.0, 3.0, -21.0, -21.0], [6.0, -26.0, 
--69.0, -63.0, -65.0], [38.0, -58.0, 35.0, 58.0, -51.0], [34.0, -112.0, 33.0, 61.0, 17.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[[5.0, 1.0], [0.0, 0.0], [-4.0, -6.0]], [[7.0, -4.0], [-3.0, -7.0], [6.0, 3.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[6.0, -5.0, -4.0], [-5.0, 3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[5.0, 0.0, 0.0], [6.0, 7.0, 
+-2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-22.0, 17.0])+(1.-msk_ref)*numpy.array([34.0, -74.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[-7.0, 0.0, -7.0], [6.0, 6.0, -3.0]], [[-7.0, 7.0, -1.0], [6.0, 5.0, -2.0]], [[0.0, -2.0, -6.0], 
-[-6.0, -1.0, -5.0]], [[-4.0, 2.0, -5.0], [1.0, 5.0, -2.0]], [[-7.0, -1.0, -1.0], [-7.0, 2.0, 1.0]]], [[[-5.0, 7.0, 2.0], [7.0, 
-5.0, 2.0]], [[5.0, 2.0, -5.0], [4.0, 6.0, -3.0]], [[3.0, 0.0, 1.0], [-6.0, -2.0, -1.0]], [[6.0, -6.0, -6.0], [4.0, 4.0, -1.0]], 
-[[-2.0, -7.0, 6.0], [4.0, 7.0, -4.0]]], [[[7.0, 0.0, 7.0], [-6.0, -6.0, 4.0]], [[-7.0, -2.0, -2.0], [-1.0, -4.0, -5.0]], [[5.0, 
-3.0, -3.0], [7.0, 0.0, -4.0]], [[5.0, -3.0, 5.0], [0.0, -4.0, -7.0]], [[0.0, -4.0, 6.0], [2.0, -7.0, 7.0]]], [[[2.0, 7.0, 
--2.0], [6.0, -2.0, 5.0]], [[-3.0, -5.0, 2.0], [-6.0, 2.0, -5.0]], [[-1.0, 7.0, -2.0], [3.0, 7.0, 5.0]], [[-3.0, -5.0, -4.0], 
-[-2.0, -3.0, 0.0]], [[-3.0, 0.0, 7.0], [-5.0, -1.0, 6.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-3.0, 4.0, -2.0, 4.0, -7.0], [-5.0, -3.0, -6.0, -4.0, -4.0], [7.0, -5.0, 4.0, -6.0, 2.0], 
-[-6.0, 3.0, -4.0, -7.0, 3.0]], [[7.0, -5.0, 5.0, 6.0, 7.0], [-2.0, 2.0, -3.0, 1.0, -6.0], [-7.0, -5.0, 7.0, 5.0, 3.0], [0.0, 
-2.0, -4.0, -4.0, -4.0]], [[-2.0, 4.0, 5.0, -4.0, -6.0], [-5.0, 3.0, -6.0, -4.0, 3.0], [0.0, -3.0, -4.0, -2.0, 6.0], [-3.0, 
--5.0, -3.0, -5.0, -6.0]]], [[[1.0, -2.0, -1.0, -4.0, 4.0], [1.0, 7.0, -2.0, 3.0, 1.0], [0.0, 0.0, 6.0, 2.0, 0.0], [-2.0, 0.0, 
-2.0, 0.0, -4.0]], [[0.0, -4.0, 3.0, -5.0, 2.0], [5.0, -7.0, -1.0, -3.0, 0.0], [5.0, 2.0, 4.0, -2.0, 5.0], [-6.0, -3.0, -1.0, 
-0.0, 6.0]], [[-1.0, 3.0, 0.0, 7.0, 2.0], [-3.0, 0.0, -4.0, 5.0, 0.0], [2.0, 5.0, 3.0, -5.0, -1.0], [-5.0, 3.0, 3.0, 5.0, 
--4.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[44.0, -101.0, -9.0, -75.0, 121.0], [115.0, 0.0, 78.0, 41.0, 13.0], [-25.0, 53.0, 51.0, 71.0, 
--23.0], [30.0, -13.0, 46.0, 69.0, 45.0]], [[80.0, -105.0, 53.0, -45.0, 134.0], [63.0, 39.0, 18.0, 32.0, -11.0], [-77.0, 3.0, 
-75.0, 91.0, 28.0], [13.0, -23.0, 4.0, 16.0, -29.0]], [[-3.0, -13.0, -37.0, 6.0, -14.0], [38.0, -57.0, 75.0, -18.0, -12.0], 
-[-1.0, 1.0, -45.0, 17.0, -42.0], [61.0, 14.0, 0.0, 13.0, 82.0]], [[39.0, -74.0, 7.0, -27.0, 82.0], [73.0, -27.0, 49.0, 16.0, 
--10.0], [-21.0, 25.0, 38.0, 46.0, -5.0], [17.0, -4.0, 14.0, 35.0, 44.0]], [[8.0, -18.0, 17.0, -5.0, 26.0], [42.0, -47.0, 59.0, 
-9.0, 24.0], [-30.0, 52.0, -62.0, 16.0, -14.0], [42.0, -21.0, 22.0, 63.0, 25.0]]], [[[65.0, -75.0, 63.0, -25.0, 114.0], [27.0, 
-49.0, -30.0, 35.0, -9.0], [-55.0, 4.0, 89.0, 55.0, 46.0], [-30.0, -20.0, 1.0, 7.0, -61.0]], [[16.0, -51.0, -11.0, -15.0, 31.0], 
-[39.0, -40.0, -8.0, -19.0, -43.0], [45.0, -23.0, 93.0, 1.0, 19.0], [-44.0, 17.0, -20.0, -33.0, 69.0]], [[-16.0, 33.0, -1.0, 
-35.0, -57.0], [-33.0, -34.0, -6.0, -33.0, -15.0], [9.0, -27.0, -39.0, -23.0, 3.0], [8.0, 7.0, -28.0, -31.0, 19.0]], [[-43.0, 
-3.0, -64.0, -31.0, -26.0], [39.0, -48.0, 10.0, -11.0, -2.0], [102.0, 21.0, 43.0, -49.0, -21.0], [-45.0, 21.0, 19.0, 7.0, 
-90.0]], [[-47.0, 3.0, 16.0, -153.0, -49.0], [45.0, -11.0, -2.0, -52.0, 72.0], [62.0, 21.0, -41.0, -21.0, 50.0], [-36.0, -83.0, 
-7.0, -8.0, 28.0]]], [[[-45.0, 104.0, 9.0, 82.0, -119.0], [-118.0, 0.0, -82.0, -36.0, -13.0], [27.0, -48.0, -48.0, -76.0, 22.0], 
-[-35.0, 16.0, -43.0, -64.0, -49.0]], [[15.0, -23.0, -17.0, -43.0, 25.0], [43.0, 32.0, 86.0, 18.0, 33.0], [-65.0, 18.0, -71.0, 
-67.0, -47.0], [99.0, -18.0, 29.0, 42.0, -1.0]], [[23.0, -33.0, -17.0, -6.0, 24.0], [3.0, 31.0, -19.0, -4.0, -40.0], [6.0, 
--51.0, 83.0, 25.0, 5.0], [-15.0, 24.0, -21.0, -52.0, 9.0]], [[-39.0, 50.0, -12.0, -47.0, -108.0], [-43.0, 22.0, -19.0, -66.0, 
-13.0], [22.0, -68.0, -58.0, -12.0, 18.0], [14.0, -25.0, -40.0, -83.0, 1.0]], [[-45.0, 89.0, -13.0, 28.0, -56.0], [-76.0, 73.0, 
--49.0, 34.0, 44.0], [7.0, 23.0, -47.0, -49.0, -18.0], [-15.0, 4.0, 30.0, 21.0, -98.0]]], [[[48.0, -24.0, 9.0, 79.0, 77.0], 
-[-33.0, 58.0, -51.0, 56.0, -50.0], [-35.0, -18.0, 108.0, 18.0, -2.0], [-31.0, 51.0, -1.0, -7.0, -66.0]], [[-31.0, 10.0, 3.0, 
--71.0, -56.0], [34.0, -51.0, 51.0, -50.0, 42.0], [14.0, 13.0, -98.0, -2.0, 6.0], [37.0, -50.0, -3.0, 6.0, 55.0]], [[54.0, 
--66.0, 45.0, 34.0, 104.0], [24.0, -17.0, -36.0, 32.0, -41.0], [-11.0, 15.0, 114.0, 12.0, 37.0], [-61.0, 15.0, -4.0, 14.0, 
--9.0]], [[-20.0, 13.0, -46.0, -3.0, -4.0], [28.0, -6.0, 64.0, 26.0, 28.0], [-1.0, 46.0, -55.0, 3.0, -60.0], [52.0, 10.0, 43.0, 
-61.0, 25.0]], [[-16.0, 48.0, 43.0, 27.0, -31.0], [-48.0, 2.0, -37.0, 2.0, 28.0], [-14.0, 22.0, -56.0, -34.0, 25.0], [-17.0, 
--23.0, 0.0, 16.0, -61.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank3_offset3(self):
+      arg0=numpy.array([[[[-5.0, -1.0], [-3.0, 1.0], [-5.0, 4.0]], [[2.0, -6.0], [4.0, 6.0], [3.0, -1.0]], [[3.0, -4.0], [1.0, 
+7.0], [-3.0, -5.0]], [[-3.0, -6.0], [4.0, -6.0], [-5.0, 1.0]]], [[[0.0, 0.0], [1.0, 1.0], [-3.0, 6.0]], [[7.0, -1.0], [0.0, 
+-4.0], [4.0, 2.0]], [[4.0, 6.0], [3.0, 5.0], [-7.0, -2.0]], [[1.0, 1.0], [0.0, -6.0], [3.0, -3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, 5.0, 1.0], [3.0, 0.0, -2.0], [0.0, 1.0, -7.0], [3.0, -3.0, -3.0]], [[5.0, 6.0, 0.0], 
+[6.0, -4.0, -6.0], [5.0, 3.0, -3.0], [-1.0, -6.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, -5.0, 0.0], [-7.0, 7.0, 7.0], 
+[-2.0, -4.0, 1.0], [0.0, 3.0, -1.0]], [[7.0, 3.0, 2.0], [4.0, 4.0, -6.0], [7.0, -7.0, -1.0], [-1.0, 0.0, -7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([72.0, 101.0])+(1.-msk_ref)*numpy.array([22.0, 35.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[1.0, 6.0, 0.0, 3.0, -2.0], [6.0, 3.0, 2.0, -7.0, 5.0], [2.0, 7.0, 1.0, 2.0, -4.0], [5.0, 4.0, 
--3.0, -1.0, 7.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank1_offset0(self):
+      arg0=numpy.array([0.0, -3.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(-4.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([7.0, 4.0])+(1.-msk_arg1)*numpy.array([0.0, 4.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-4.0, -24.0, -0.0, -12.0, 8.0], [-24.0, -12.0, -8.0, 28.0, -20.0], [-8.0, -28.0, -4.0, -8.0, 
-16.0], [-20.0, -16.0, 12.0, 4.0, -28.0]])+(1.-msk_ref)*numpy.array([[-4.0, -24.0, -0.0, -12.0, 8.0], [-24.0, -12.0, -8.0, 28.0, 
--20.0], [-8.0, -28.0, -4.0, -8.0, 16.0], [-20.0, -16.0, 12.0, 4.0, -28.0]])
+      ref=msk_ref*numpy.array([[0.0, 0.0], [-21.0, -12.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0], [0.0, -12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[-4.0, -6.0, 3.0], [3.0, 5.0, -4.0], [1.0, 1.0, 6.0], [-7.0, -2.0, -7.0], [-7.0, -2.0, -6.0]], 
-[[-4.0, -5.0, 7.0], [-7.0, 0.0, 2.0], [2.0, -6.0, -6.0], [7.0, 5.0, 3.0], [-5.0, -4.0, 3.0]], [[4.0, 7.0, -7.0], [-4.0, -1.0, 
-6.0], [-6.0, -1.0, -7.0], [7.0, -1.0, -1.0], [0.0, 5.0, -2.0]], [[-7.0, -3.0, 7.0], [-5.0, -7.0, 2.0], [-2.0, 0.0, 0.0], [-6.0, 
--3.0, 2.0], [7.0, -2.0, -4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[3.0, -7.0], [0.0, -6.0], [2.0, -2.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-4.0, -5.0, 2.0])+(1.-msk_arg1)*numpy.array([1.0, -3.0, -4.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[-4.0, -3.0], [-2.0, 0.0], [-6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -7.0], [-5.0, 
+4.0], [5.0, -2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[52.0, -45.0, 3.0, 24.0, 26.0], [55.0, 32.0, 10.0, -47.0, 46.0], [-65.0, 33.0, 15.0, -25.0, 
--29.0], [57.0, 59.0, 8.0, 43.0, -26.0]])+(1.-msk_ref)*numpy.array([[2.0, 4.0, -26.0, 27.0, 23.0], [-17.0, -15.0, 44.0, -20.0, 
--5.0], [11.0, -25.0, 25.0, 14.0, -7.0], [-26.0, 8.0, -2.0, -5.0, 29.0]])
+      ref=msk_ref*numpy.array([[-24.0, -13.0], [52.0, 25.0]])+(1.-msk_ref)*numpy.array([[1.0, -25.0], [41.0, 29.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[-3.0, -7.0, -3.0], [-4.0, 3.0, -4.0]], [[-7.0, -2.0, -5.0], [0.0, -2.0, 7.0]], [[2.0, -4.0, 
-3.0], [-1.0, -1.0, 4.0]], [[1.0, 1.0, 7.0], [-1.0, 0.0, -2.0]], [[-2.0, 1.0, -2.0], [-5.0, 0.0, 6.0]]], [[[-3.0, -5.0, 0.0], 
-[-1.0, -1.0, 1.0]], [[-7.0, -4.0, -6.0], [1.0, 7.0, -2.0]], [[1.0, -2.0, -4.0], [4.0, -2.0, 0.0]], [[0.0, 1.0, -5.0], [-1.0, 
--7.0, -7.0]], [[-5.0, 0.0, 2.0], [0.0, 0.0, 1.0]]], [[[0.0, -6.0, 2.0], [0.0, -1.0, -4.0]], [[-7.0, -1.0, 7.0], [3.0, -7.0, 
--4.0]], [[4.0, 1.0, -3.0], [7.0, -5.0, 4.0]], [[0.0, 2.0, -4.0], [7.0, 0.0, 0.0]], [[4.0, -3.0, -5.0], [1.0, -1.0, -6.0]]], 
-[[[6.0, -2.0, -4.0], [-7.0, 3.0, -2.0]], [[-1.0, 3.0, 1.0], [4.0, 0.0, 7.0]], [[6.0, 1.0, -1.0], [-3.0, -1.0, -7.0]], [[-2.0, 
--6.0, -1.0], [-7.0, -4.0, -3.0]], [[-6.0, -5.0, -1.0], [-4.0, -4.0, 4.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[[3.0, 3.0], [6.0, 0.0], [0.0, -6.0]], [[-6.0, 2.0], [6.0, -4.0], [7.0, -6.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[2.0, -5.0, 5.0], [-4.0, -1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[0.0, -2.0, 0.0], [1.0, 6.0, 
-5.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[[-4.0, -7.0], [-4.0, -5.0], [-1.0, 6.0]], [[6.0, -2.0], [5.0, -4.0], [-5.0, 
+0.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 1.0], [7.0, 5.0], [-5.0, -2.0]], [[2.0, -4.0], [4.0, 0.0], [0.0, 7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[27.0, -27.0, 44.0, 36.0, 1.0], [24.0, -35.0, -22.0, -19.0, 0.0], [41.0, 21.0, -35.0, -58.0, 
--5.0], [27.0, -28.0, 15.0, 53.0, 28.0]])+(1.-msk_ref)*numpy.array([[8.0, 27.0, 21.0, -13.0, 23.0], [8.0, 41.0, -4.0, -80.0, 
-5.0], [-14.0, -57.0, -5.0, 3.0, -29.0], [5.0, 33.0, -46.0, -34.0, 2.0]])
+      ref=msk_ref*numpy.array([[-77.0, -63.0], [16.0, -45.0]])+(1.-msk_ref)*numpy.array([[45.0, 106.0], [9.0, -35.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([[2.0, 5.0, 1.0, -7.0, -5.0], [7.0, 2.0, 2.0, -5.0, 0.0], [-6.0, 0.0, 5.0, -5.0, 0.0], [6.0, 5.0, 
--5.0, 1.0, 1.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank4_offset3(self):
+      arg0=numpy.array([[[[5.0, -7.0], [7.0, 5.0], [7.0, 7.0]], [[-5.0, -1.0], [-5.0, -4.0], [-3.0, -7.0]], [[-6.0, 3.0], [1.0, 
+-3.0], [5.0, 3.0]], [[3.0, 7.0], [-6.0, 2.0], [-5.0, 5.0]]], [[[0.0, 0.0], [-6.0, 3.0], [-3.0, 1.0]], [[0.0, -7.0], [5.0, 
+-3.0], [0.0, 3.0]], [[0.0, 2.0], [-3.0, 0.0], [-7.0, 1.0]], [[2.0, 0.0], [-2.0, 3.0], [-6.0, 4.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([7.0, -2.0])+(1.-msk_arg1)*numpy.array([0.0, 4.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[-6.0, 6.0], [-6.0, 0.0], [1.0, 0.0]], [[3.0, -4.0], [-4.0, 7.0], [0.0, 1.0]], [[-1.0, 3.0], 
+[7.0, -5.0], [3.0, 6.0]], [[2.0, -4.0], [-5.0, -3.0], [0.0, 1.0]]], [[[-2.0, 2.0], [0.0, -6.0], [0.0, -4.0]], [[5.0, 6.0], 
+[-5.0, -4.0], [0.0, -2.0]], [[-1.0, -1.0], [3.0, -6.0], [7.0, -5.0]], [[1.0, -6.0], [4.0, 3.0], [-5.0, 
+7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 1.0], [-5.0, 4.0], [6.0, -6.0]], [[1.0, 1.0], [0.0, -3.0], [1.0, 7.0]], [[-7.0, 
+0.0], [3.0, 2.0], [-1.0, 3.0]], [[1.0, 5.0], [4.0, 6.0], [7.0, 6.0]]], [[[5.0, -4.0], [-4.0, 1.0], [-4.0, 6.0]], [[-1.0, -5.0], 
+[-6.0, 2.0], [7.0, -2.0]], [[-5.0, -4.0], [2.0, -4.0], [-6.0, 4.0]], [[-5.0, -2.0], [-3.0, 1.0], [6.0, -1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[14.0, -4.0], [35.0, -10.0], [7.0, -2.0], [-49.0, 14.0], [-35.0, 10.0]], [[49.0, -14.0], [14.0, 
--4.0], [14.0, -4.0], [-35.0, 10.0], [0.0, 0.0]], [[-42.0, 12.0], [0.0, 0.0], [35.0, -10.0], [-35.0, 10.0], [0.0, 0.0]], [[42.0, 
--12.0], [35.0, -10.0], [-35.0, 10.0], [7.0, -2.0], [7.0, -2.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 8.0], [0.0, 20.0], [0.0, 
-4.0], [0.0, -28.0], [0.0, -20.0]], [[0.0, 28.0], [0.0, 8.0], [0.0, 8.0], [0.0, -20.0], [0.0, 0.0]], [[0.0, -24.0], [0.0, 0.0], 
-[0.0, 20.0], [0.0, -20.0], [0.0, 0.0]], [[0.0, 24.0], [0.0, 20.0], [0.0, -20.0], [0.0, 4.0], [0.0, 4.0]]])
+      ref=msk_ref*numpy.array([[-55.0, 41.0], [-2.0, -88.0]])+(1.-msk_ref)*numpy.array([[-25.0, -84.0], [69.0, 40.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[4.0, 1.0, -3.0], [-3.0, -6.0, 3.0], [-1.0, -4.0, 1.0], [-3.0, 6.0, -7.0], [-5.0, -1.0, -4.0]], 
-[[1.0, 7.0, -2.0], [7.0, 4.0, -5.0], [-3.0, -6.0, 1.0], [-6.0, 0.0, -7.0], [-3.0, -3.0, -5.0]], [[7.0, 6.0, 4.0], [5.0, 5.0, 
--6.0], [7.0, -3.0, 2.0], [4.0, -5.0, -4.0], [-1.0, 7.0, 1.0]], [[-5.0, -1.0, 0.0], [-2.0, -4.0, 6.0], [-1.0, 5.0, 0.0], [6.0, 
-0.0, -6.0], [-6.0, 0.0, -4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank2_offset0(self):
+      arg0=numpy.array([-4.0, -3.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, 0.0], [-6.0, -4.0], [-6.0, 4.0]])+(1.-msk_arg1)*numpy.array([[4.0, -6.0], [-3.0, 4.0], 
-[-3.0, -3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[-4.0, 3.0, -3.0, -7.0, 4.0], [6.0, 0.0, -4.0, -2.0, -2.0], [-6.0, 2.0, 2.0, 7.0, -5.0], 
+[-3.0, 2.0, 0.0, 1.0, -7.0]])+(1.-msk_arg1)*numpy.array([[0.0, 5.0, 2.0, -6.0, 7.0], [-2.0, -5.0, 7.0, -2.0, 6.0], [-4.0, 3.0, 
+7.0, -7.0, -7.0], [-5.0, -5.0, 0.0, -2.0, 4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, -16.0], [36.0, 36.0], [24.0, 20.0], [24.0, -52.0], [60.0, -12.0]], [[-36.0, -36.0], 
-[-36.0, -36.0], [48.0, 28.0], [78.0, -28.0], [66.0, -8.0]], [[-102.0, -8.0], [-24.0, -44.0], [-36.0, 20.0], [30.0, 4.0], 
-[-42.0, -24.0]], [[36.0, 4.0], [0.0, 40.0], [-24.0, -20.0], [0.0, -24.0], [60.0, -16.0]]])+(1.-msk_ref)*numpy.array([[[22.0, 
--11.0], [-3.0, -15.0], [5.0, -13.0], [-9.0, 63.0], [-5.0, 38.0]], [[-11.0, 28.0], [31.0, -11.0], [3.0, -9.0], [-3.0, 57.0], 
-[12.0, 21.0]], [[-2.0, -30.0], [23.0, 8.0], [31.0, -60.0], [43.0, -32.0], [-28.0, 31.0]], [[-17.0, 26.0], [-14.0, -22.0], 
-[-19.0, 26.0], [42.0, -18.0], [-12.0, 48.0]]])
+      ref=msk_ref*numpy.array([[[16.0, -12.0, 12.0, 28.0, -16.0], [-24.0, 0.0, 16.0, 8.0, 8.0], [24.0, -8.0, -8.0, -28.0, 
+20.0], [12.0, -8.0, 0.0, -4.0, 28.0]], [[12.0, -9.0, 9.0, 21.0, -12.0], [-18.0, 0.0, 12.0, 6.0, 6.0], [18.0, -6.0, -6.0, -21.0, 
+15.0], [9.0, -6.0, 0.0, -3.0, 21.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -20.0, -8.0, 24.0, -28.0], [8.0, 20.0, -28.0, 8.0, 
+-24.0], [16.0, -12.0, -28.0, 28.0, 28.0], [20.0, 20.0, 0.0, 8.0, -16.0]], [[0.0, -15.0, -6.0, 18.0, -21.0], [6.0, 15.0, -21.0, 
+6.0, -18.0], [12.0, -9.0, -21.0, 21.0, 21.0], [15.0, 15.0, 0.0, 6.0, -12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[-1.0, 7.0, -2.0], [2.0, -2.0, 6.0]], [[-3.0, 5.0, 0.0], [-7.0, 0.0, -6.0]], [[0.0, 0.0, 1.0], 
-[4.0, 2.0, 3.0]], [[7.0, -5.0, 0.0], [2.0, 0.0, -5.0]], [[0.0, -4.0, 1.0], [7.0, -6.0, -3.0]]], [[[0.0, 0.0, -1.0], [-6.0, 1.0, 
--2.0]], [[0.0, 3.0, 5.0], [-3.0, -3.0, 0.0]], [[-2.0, 7.0, -2.0], [6.0, -3.0, -6.0]], [[-6.0, -3.0, 6.0], [5.0, 7.0, 2.0]], 
-[[-5.0, -5.0, 0.0], [-6.0, -1.0, -7.0]]], [[[-5.0, -7.0, -5.0], [5.0, -7.0, -3.0]], [[-3.0, 2.0, 4.0], [-1.0, -1.0, 1.0]], 
-[[-1.0, 6.0, -3.0], [0.0, -3.0, -4.0]], [[6.0, 3.0, 7.0], [-6.0, -1.0, 0.0]], [[7.0, 1.0, -3.0], [-1.0, -3.0, 5.0]]], [[[5.0, 
--6.0, -7.0], [6.0, -6.0, 4.0]], [[7.0, -6.0, -5.0], [-3.0, -5.0, 7.0]], [[1.0, -2.0, -2.0], [0.0, 1.0, 0.0]], [[-2.0, -7.0, 
-7.0], [-3.0, 4.0, 0.0]], [[3.0, -2.0, 3.0], [-2.0, -4.0, -1.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank3_offset1(self):
+      arg0=numpy.array([[-1.0, 4.0], [-4.0, 1.0], [-6.0, -1.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-1.0, 0.0], [4.0, -6.0], [-6.0, -2.0]], [[-3.0, 2.0], [-1.0, -2.0], [2.0, 
--3.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 4.0], [2.0, -3.0], [-4.0, -1.0]], [[5.0, -2.0], [1.0, 0.0], [6.0, -6.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[[-6.0, -2.0, 3.0, -7.0, 1.0], [4.0, -6.0, 4.0, -1.0, -1.0], [2.0, -7.0, -3.0, -3.0, -4.0], 
+[7.0, 1.0, 3.0, 0.0, 4.0]], [[0.0, 6.0, -5.0, 6.0, -3.0], [1.0, -6.0, -1.0, -6.0, 4.0], [-5.0, 4.0, 1.0, 7.0, 4.0], [-2.0, 
+-5.0, 1.0, 3.0, 0.0]], [[3.0, 3.0, 0.0, 3.0, 4.0], [-6.0, 0.0, 6.0, 4.0, -5.0], [-3.0, -1.0, -1.0, -3.0, 2.0], [4.0, 6.0, -6.0, 
+-2.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 7.0, 6.0, 6.0, -1.0], [2.0, -5.0, -1.0, -3.0, -1.0], [1.0, 1.0, -7.0, -5.0, 
+5.0], [1.0, -1.0, 4.0, 6.0, -4.0]], [[0.0, -6.0, -5.0, -2.0, -3.0], [-6.0, 6.0, 0.0, 7.0, -6.0], [1.0, 0.0, -5.0, 5.0, 1.0], 
+[-3.0, -1.0, 2.0, -6.0, 7.0]], [[6.0, 2.0, -4.0, -6.0, 1.0], [7.0, -1.0, -6.0, -5.0, -7.0], [-1.0, 0.0, 7.0, 3.0, -1.0], [-2.0, 
+-2.0, 0.0, 2.0, 3.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[49.0, -48.0], [32.0, -26.0], [-14.0, -7.0], [-43.0, 49.0], [-43.0, 57.0]], [[19.0, -6.0], 
-[-6.0, -28.0], [15.0, -2.0], [-60.0, -4.0], [-10.0, 41.0]], [[-7.0, 85.0], [-7.0, -23.0], [38.0, -12.0], [-17.0, -42.0], [31.0, 
--11.0]], [[9.0, 62.0], [27.0, 29.0], [2.0, 14.0], [-63.0, 14.0], [-21.0, 13.0]]])+(1.-msk_ref)*numpy.array([[[72.0, -63.0], 
-[-43.0, 23.0], [36.0, -27.0], [-72.0, 69.0], [-1.0, 15.0]], [[-37.0, 25.0], [-32.0, -8.0], [25.0, -3.0], [50.0, -43.0], [-53.0, 
-49.0]], [[36.0, 14.0], [6.0, -26.0], [3.0, 5.0], [-89.0, 20.0], [-6.0, 0.0]], [[34.0, 9.0], [-12.0, 15.0], [-1.0, 12.0], 
-[-41.0, 12.0], [-54.0, 25.0]]])
+      ref=msk_ref*numpy.array([[[-12.0, -40.0, 17.0, -35.0, -13.0], [28.0, 30.0, -36.0, 1.0, 15.0], [36.0, -3.0, 5.0, -7.0, 
+-24.0], [-23.0, -17.0, 29.0, 0.0, -46.0]], [[-27.0, -5.0, 7.0, -25.0, -3.0], [23.0, -30.0, 9.0, -14.0, 5.0], [6.0, -23.0, 
+-10.0, -2.0, -14.0], [22.0, -7.0, 19.0, 5.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 5.0, 38.0, 38.0, 7.0], [-20.0, -13.0, 
+37.0, 5.0, 67.0], [1.0, -1.0, -15.0, -33.0, -3.0], [23.0, 17.0, -12.0, 6.0, -42.0]], [[-30.0, 20.0, 23.0, 28.0, -8.0], [-5.0, 
+-13.0, 2.0, 0.0, -3.0], [6.0, 4.0, -40.0, -18.0, 22.0], [3.0, -3.0, 18.0, 16.0, -12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank2_expandedData_rank2_offset0(self):
-      arg0=Data(numpy.array([[2.0, -1.0, 0.0, -2.0, -1.0], [-5.0, 3.0, -4.0, -7.0, 7.0], [-1.0, 7.0, -5.0, -1.0, -4.0], [7.0, 
--3.0, 2.0, 2.0, 0.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[[-7.0, -1.0], [-7.0, 0.0], [-1.0, 2.0]], [[-1.0, -3.0], [6.0, 0.0], [1.0, -5.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, 4.0, 1.0, -2.0, -4.0], [7.0, 5.0, -5.0, 0.0, -4.0], [4.0, 4.0, 1.0, 5.0, -3.0], [-3.0, 
--4.0, 0.0, -5.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-2.0, -1.0, 4.0, 4.0, 4.0], [-4.0, 2.0, 3.0, 3.0, 7.0], [3.0, -4.0, -1.0, 
-2.0, -7.0], [-4.0, -7.0, -3.0, -7.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[-2.0, 2.0, -1.0, -5.0, -1.0], [-7.0, -3.0, -5.0, 3.0, 5.0], [-2.0, -3.0, -4.0, 0.0, 1.0], 
+[-5.0, 0.0, 3.0, 1.0, 3.0]], [[2.0, 3.0, 7.0, -4.0, -4.0], [-7.0, 2.0, 1.0, -7.0, 2.0], [3.0, -2.0, 7.0, 6.0, -1.0], [-2.0, 
+1.0, 5.0, -5.0, -1.0]], [[0.0, -5.0, -7.0, -6.0, 6.0], [-1.0, 0.0, -3.0, -4.0, 0.0], [0.0, -4.0, -3.0, 4.0, -3.0], [-2.0, -1.0, 
+-5.0, 1.0, 5.0]]], [[[4.0, -3.0, -6.0, 5.0, 0.0], [7.0, -2.0, -6.0, -5.0, 0.0], [-2.0, -7.0, 1.0, -7.0, -4.0], [-7.0, 7.0, 2.0, 
+-4.0, -3.0]], [[0.0, -4.0, 0.0, -4.0, 7.0], [7.0, 4.0, -1.0, 0.0, -7.0], [4.0, 7.0, 7.0, 1.0, -3.0], [1.0, 5.0, 5.0, -6.0, 
+-2.0]], [[-5.0, 2.0, 3.0, -7.0, 2.0], [-6.0, 2.0, 1.0, -1.0, 5.0], [0.0, -5.0, 1.0, -7.0, -5.0], [6.0, 6.0, -2.0, -1.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, 0.0, -7.0, 4.0, -4.0], [0.0, -5.0, 0.0, -1.0, 0.0], [-3.0, -3.0, 0.0, 7.0, -6.0], 
+[-2.0, 1.0, -1.0, -3.0, -5.0]], [[-3.0, -1.0, -1.0, 0.0, 0.0], [-5.0, -5.0, 4.0, -7.0, 0.0], [4.0, 5.0, -4.0, -7.0, -6.0], 
+[5.0, 7.0, -1.0, 7.0, 3.0]], [[0.0, -1.0, -2.0, -1.0, 2.0], [6.0, -3.0, -5.0, -4.0, -1.0], [3.0, 0.0, -2.0, -4.0, -4.0], [0.0, 
+-6.0, 0.0, 3.0, 3.0]]], [[[-2.0, 3.0, -4.0, -4.0, 6.0], [-2.0, 5.0, 2.0, 7.0, 5.0], [-4.0, 6.0, 3.0, -2.0, 7.0], [-3.0, -7.0, 
+-7.0, -3.0, -7.0]], [[-4.0, -3.0, -3.0, 7.0, 0.0], [1.0, 4.0, -2.0, -6.0, -4.0], [1.0, -5.0, -7.0, -6.0, 7.0], [-2.0, 2.0, 
+-4.0, -3.0, 6.0]], [[5.0, -3.0, -5.0, -3.0, 0.0], [3.0, -2.0, -6.0, 0.0, -3.0], [3.0, -7.0, 5.0, 6.0, 0.0], [-7.0, 7.0, 0.0, 
+-1.0, -5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 8.0, 2.0, -4.0, -8.0], [14.0, 10.0, -10.0, 0.0, -8.0], [8.0, 8.0, 2.0, 10.0, -6.0], 
-[-6.0, -8.0, 0.0, -10.0, -12.0]], [[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 4.0], [-4.0, -4.0, -1.0, -5.0, 3.0], 
-[3.0, 4.0, 0.0, 5.0, 6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[-10.0, -8.0, -2.0, 4.0, 8.0], [-14.0, -10.0, 10.0, 0.0, 8.0], [-8.0, -8.0, -2.0, -10.0, 6.0], [6.0, 8.0, 0.0, 
-10.0, 12.0]], [[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 4.0], [-4.0, -4.0, -1.0, -5.0, 3.0], [3.0, 4.0, 0.0, 5.0, 
-6.0]]], [[[-25.0, -20.0, -5.0, 10.0, 20.0], [-35.0, -25.0, 25.0, 0.0, 20.0], [-20.0, -20.0, -5.0, -25.0, 15.0], [15.0, 20.0, 
-0.0, 25.0, 30.0]], [[15.0, 12.0, 3.0, -6.0, -12.0], [21.0, 15.0, -15.0, 0.0, -12.0], [12.0, 12.0, 3.0, 15.0, -9.0], [-9.0, 
--12.0, 0.0, -15.0, -18.0]], [[-20.0, -16.0, -4.0, 8.0, 16.0], [-28.0, -20.0, 20.0, 0.0, 16.0], [-16.0, -16.0, -4.0, -20.0, 
-12.0], [12.0, 16.0, 0.0, 20.0, 24.0]], [[-35.0, -28.0, -7.0, 14.0, 28.0], [-49.0, -35.0, 35.0, 0.0, 28.0], [-28.0, -28.0, -7.0, 
--35.0, 21.0], [21.0, 28.0, 0.0, 35.0, 42.0]], [[35.0, 28.0, 7.0, -14.0, -28.0], [49.0, 35.0, -35.0, 0.0, -28.0], [28.0, 28.0, 
-7.0, 35.0, -21.0], [-21.0, -28.0, 0.0, -35.0, -42.0]]], [[[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 4.0], [-4.0, 
--4.0, -1.0, -5.0, 3.0], [3.0, 4.0, 0.0, 5.0, 6.0]], [[35.0, 28.0, 7.0, -14.0, -28.0], [49.0, 35.0, -35.0, 0.0, -28.0], [28.0, 
-28.0, 7.0, 35.0, -21.0], [-21.0, -28.0, 0.0, -35.0, -42.0]], [[-25.0, -20.0, -5.0, 10.0, 20.0], [-35.0, -25.0, 25.0, 0.0, 
-20.0], [-20.0, -20.0, -5.0, -25.0, 15.0], [15.0, 20.0, 0.0, 25.0, 30.0]], [[-5.0, -4.0, -1.0, 2.0, 4.0], [-7.0, -5.0, 5.0, 0.0, 
-4.0], [-4.0, -4.0, -1.0, -5.0, 3.0], [3.0, 4.0, 0.0, 5.0, 6.0]], [[-20.0, -16.0, -4.0, 8.0, 16.0], [-28.0, -20.0, 20.0, 0.0, 
-16.0], [-16.0, -16.0, -4.0, -20.0, 12.0], [12.0, 16.0, 0.0, 20.0, 24.0]]], [[[35.0, 28.0, 7.0, -14.0, -28.0], [49.0, 35.0, 
--35.0, 0.0, -28.0], [28.0, 28.0, 7.0, 35.0, -21.0], [-21.0, -28.0, 0.0, -35.0, -42.0]], [[-15.0, -12.0, -3.0, 6.0, 12.0], 
-[-21.0, -15.0, 15.0, 0.0, 12.0], [-12.0, -12.0, -3.0, -15.0, 9.0], [9.0, 12.0, 0.0, 15.0, 18.0]], [[10.0, 8.0, 2.0, -4.0, 
--8.0], [14.0, 10.0, -10.0, 0.0, -8.0], [8.0, 8.0, 2.0, 10.0, -6.0], [-6.0, -8.0, 0.0, -10.0, -12.0]], [[10.0, 8.0, 2.0, -4.0, 
--8.0], [14.0, 10.0, -10.0, 0.0, -8.0], [8.0, 8.0, 2.0, 10.0, -6.0], [-6.0, -8.0, 0.0, -10.0, -12.0]], [[0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 
--2.0, 8.0, 8.0, 8.0], [-8.0, 4.0, 6.0, 6.0, 14.0], [6.0, -8.0, -2.0, 4.0, -14.0], [-8.0, -14.0, -6.0, -14.0, 0.0]], [[2.0, 1.0, 
--4.0, -4.0, -4.0], [4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], [4.0, 7.0, 3.0, 7.0, 0.0]], [[0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[4.0, 2.0, -8.0, -8.0, -8.0], 
-[8.0, -4.0, -6.0, -6.0, -14.0], [-6.0, 8.0, 2.0, -4.0, 14.0], [8.0, 14.0, 6.0, 14.0, 0.0]], [[2.0, 1.0, -4.0, -4.0, -4.0], 
-[4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], [4.0, 7.0, 3.0, 7.0, 0.0]]], [[[10.0, 5.0, -20.0, -20.0, -20.0], 
-[20.0, -10.0, -15.0, -15.0, -35.0], [-15.0, 20.0, 5.0, -10.0, 35.0], [20.0, 35.0, 15.0, 35.0, 0.0]], [[-6.0, -3.0, 12.0, 12.0, 
-12.0], [-12.0, 6.0, 9.0, 9.0, 21.0], [9.0, -12.0, -3.0, 6.0, -21.0], [-12.0, -21.0, -9.0, -21.0, 0.0]], [[8.0, 4.0, -16.0, 
--16.0, -16.0], [16.0, -8.0, -12.0, -12.0, -28.0], [-12.0, 16.0, 4.0, -8.0, 28.0], [16.0, 28.0, 12.0, 28.0, 0.0]], [[14.0, 7.0, 
--28.0, -28.0, -28.0], [28.0, -14.0, -21.0, -21.0, -49.0], [-21.0, 28.0, 7.0, -14.0, 49.0], [28.0, 49.0, 21.0, 49.0, 0.0]], 
-[[-14.0, -7.0, 28.0, 28.0, 28.0], [-28.0, 14.0, 21.0, 21.0, 49.0], [21.0, -28.0, -7.0, 14.0, -49.0], [-28.0, -49.0, -21.0, 
--49.0, 0.0]]], [[[2.0, 1.0, -4.0, -4.0, -4.0], [4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], [4.0, 7.0, 3.0, 7.0, 
-0.0]], [[-14.0, -7.0, 28.0, 28.0, 28.0], [-28.0, 14.0, 21.0, 21.0, 49.0], [21.0, -28.0, -7.0, 14.0, -49.0], [-28.0, -49.0, 
--21.0, -49.0, 0.0]], [[10.0, 5.0, -20.0, -20.0, -20.0], [20.0, -10.0, -15.0, -15.0, -35.0], [-15.0, 20.0, 5.0, -10.0, 35.0], 
-[20.0, 35.0, 15.0, 35.0, 0.0]], [[2.0, 1.0, -4.0, -4.0, -4.0], [4.0, -2.0, -3.0, -3.0, -7.0], [-3.0, 4.0, 1.0, -2.0, 7.0], 
-[4.0, 7.0, 3.0, 7.0, 0.0]], [[8.0, 4.0, -16.0, -16.0, -16.0], [16.0, -8.0, -12.0, -12.0, -28.0], [-12.0, 16.0, 4.0, -8.0, 
-28.0], [16.0, 28.0, 12.0, 28.0, 0.0]]], [[[-14.0, -7.0, 28.0, 28.0, 28.0], [-28.0, 14.0, 21.0, 21.0, 49.0], [21.0, -28.0, -7.0, 
-14.0, -49.0], [-28.0, -49.0, -21.0, -49.0, 0.0]], [[6.0, 3.0, -12.0, -12.0, -12.0], [12.0, -6.0, -9.0, -9.0, -21.0], [-9.0, 
-12.0, 3.0, -6.0, 21.0], [12.0, 21.0, 9.0, 21.0, 0.0]], [[-4.0, -2.0, 8.0, 8.0, 8.0], [-8.0, 4.0, 6.0, 6.0, 14.0], [6.0, -8.0, 
--2.0, 4.0, -14.0], [-8.0, -14.0, -6.0, -14.0, 0.0]], [[-4.0, -2.0, 8.0, 8.0, 8.0], [-8.0, 4.0, 6.0, 6.0, 14.0], [6.0, -8.0, 
--2.0, 4.0, -14.0], [-8.0, -14.0, -6.0, -14.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[[-9.0, -49.0, -26.0, 33.0, 73.0], [128.0, 35.0, 32.0, 36.0, -86.0], [19.0, 83.0, 24.0, -40.0, 
+-16.0], [70.0, 23.0, -25.0, -6.0, -28.0]], [[15.0, -13.0, -10.0, 13.0, 3.0], [14.0, -1.0, 12.0, 9.0, -30.0], [8.0, 41.0, -10.0, 
+64.0, 30.0], [-8.0, -53.0, -9.0, 18.0, 16.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, -16.0, 39.0, 16.0, 20.0], [40.0, 90.0, 
+-43.0, 17.0, -31.0], [3.0, -57.0, -10.0, -24.0, 123.0], [-37.0, -24.0, -3.0, -47.0, 49.0]], [[-23.0, 4.0, 40.0, 21.0, -10.0], 
+[3.0, -6.0, 14.0, -28.0, -2.0], [6.0, 20.0, -38.0, -39.0, -23.0], [46.0, -27.0, 22.0, 23.0, 57.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([[[5.0, -7.0, 0.0], [2.0, 0.0, -3.0], [-1.0, -5.0, 3.0], [-2.0, -4.0, -4.0], [2.0, -1.0, 5.0]], 
-[[-6.0, -7.0, -4.0], [7.0, 2.0, 5.0], [5.0, 0.0, 4.0], [4.0, -2.0, -2.0], [-1.0, -5.0, -3.0]], [[0.0, 4.0, 7.0], [3.0, 1.0, 
-2.0], [3.0, 3.0, 5.0], [0.0, 7.0, 5.0], [-1.0, 2.0, -7.0]], [[-5.0, 0.0, 0.0], [1.0, 5.0, 0.0], [-7.0, 5.0, -4.0], [-3.0, 5.0, 
-5.0], [-6.0, -5.0, 6.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank3_offset0(self):
+      arg0=numpy.array([0.0, -3.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-1.0, 1.0, -5.0, -5.0, -2.0], [5.0, 7.0, -7.0, -5.0, -3.0], [3.0, 5.0, 4.0, 0.0, 2.0], 
-[-2.0, 0.0, -3.0, -5.0, 6.0]], [[3.0, 4.0, 6.0, -4.0, -7.0], [-3.0, 6.0, 3.0, 5.0, 1.0], [7.0, 4.0, -4.0, -4.0, -3.0], [3.0, 
--2.0, -1.0, 6.0, -3.0]], [[5.0, -3.0, -1.0, 1.0, 0.0], [1.0, 7.0, -3.0, -4.0, 7.0], [-6.0, -6.0, 6.0, -5.0, -4.0], [-3.0, -1.0, 
--5.0, 7.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, 4.0, -4.0, -7.0, 6.0], [-7.0, 2.0, 4.0, 4.0, -1.0], [4.0, -1.0, 6.0, 6.0, 
--5.0], [1.0, -7.0, 7.0, -5.0, 3.0]], [[-2.0, 3.0, 1.0, -1.0, -2.0], [-6.0, -5.0, 6.0, 4.0, 7.0], [-1.0, -1.0, 7.0, -7.0, -4.0], 
-[-6.0, 0.0, -6.0, -5.0, 0.0]], [[5.0, 5.0, 1.0, 2.0, 5.0], [7.0, -6.0, -1.0, 1.0, 0.0], [7.0, -2.0, -1.0, -2.0, -1.0], [2.0, 
--3.0, 1.0, 7.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[[6.0, 0.0], [0.0, 5.0]], [[7.0, -3.0], [5.0, -5.0]], [[-6.0, 0.0], [-6.0, 0.0]], [[-1.0, 
+1.0], [-5.0, 6.0]], [[-6.0, -4.0], [6.0, 6.0]], [[3.0, 6.0], [2.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -5.0], [-5.0, 
+-7.0]], [[5.0, 0.0], [6.0, -3.0]], [[0.0, 5.0], [2.0, -5.0]], [[5.0, -6.0], [0.0, -3.0]], [[-3.0, 7.0], [6.0, -6.0]], [[4.0, 
+3.0], [-6.0, -7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-26.0, -23.0, -67.0, 3.0, 39.0], [46.0, -7.0, -56.0, -60.0, -22.0], [-34.0, -3.0, 48.0, 28.0, 
-31.0], [-31.0, 14.0, -8.0, -67.0, 51.0]], [[-17.0, 11.0, -7.0, -13.0, -4.0], [7.0, -7.0, -5.0, 2.0, -27.0], [24.0, 28.0, -10.0, 
-15.0, 16.0], [5.0, 3.0, 9.0, -31.0, 6.0]], [[1.0, -30.0, -28.0, 28.0, 37.0], [13.0, -16.0, -17.0, -32.0, 19.0], [-56.0, -43.0, 
-34.0, 5.0, 1.0], [-22.0, 7.0, -7.0, -4.0, 15.0]], [[-30.0, -6.0, -10.0, 22.0, 32.0], [-2.0, -66.0, 14.0, 6.0, -26.0], [-10.0, 
--2.0, -16.0, 36.0, 24.0], [4.0, 12.0, 30.0, -42.0, -8.0]], [[20.0, -17.0, -21.0, -1.0, 3.0], [18.0, 43.0, -32.0, -35.0, 28.0], 
-[-31.0, -24.0, 42.0, -21.0, -13.0], [-22.0, -3.0, -30.0, 19.0, 25.0]]], [[[-35.0, -22.0, -8.0, 54.0, 61.0], [-13.0, -112.0, 
-33.0, 11.0, -17.0], [-43.0, -34.0, -20.0, 48.0, 25.0], [3.0, 18.0, 45.0, -40.0, -23.0]], [[24.0, 0.0, -28.0, -38.0, -28.0], 
-[34.0, 96.0, -58.0, -45.0, 16.0], [5.0, 13.0, 50.0, -33.0, -12.0], [-23.0, -9.0, -48.0, 12.0, 46.0]], [[15.0, -7.0, -29.0, 
--21.0, -10.0], [29.0, 63.0, -47.0, -41.0, 13.0], [-9.0, 1.0, 44.0, -20.0, -6.0], [-22.0, -4.0, -35.0, 3.0, 38.0]], [[-20.0, 
-2.0, -30.0, -14.0, 6.0], [24.0, 2.0, -28.0, -22.0, -28.0], [10.0, 24.0, 12.0, 18.0, 22.0], [-8.0, 6.0, 0.0, -46.0, 26.0]], 
-[[-29.0, -12.0, -22.0, 22.0, 37.0], [7.0, -58.0, 1.0, -8.0, -23.0], [-20.0, -7.0, -2.0, 35.0, 25.0], [-4.0, 13.0, 23.0, -46.0, 
-3.0]]], [[[47.0, -5.0, 17.0, -9.0, -28.0], [-5.0, 73.0, -9.0, -8.0, 53.0], [-14.0, -26.0, 26.0, -51.0, -40.0], [-9.0, -15.0, 
--39.0, 73.0, 2.0]], [[10.0, 1.0, -11.0, -17.0, -13.0], [14.0, 41.0, -24.0, -18.0, 6.0], [4.0, 7.0, 20.0, -14.0, -5.0], [-9.0, 
--4.0, -20.0, 5.0, 19.0]], [[31.0, 0.0, -2.0, -22.0, -27.0], [11.0, 74.0, -27.0, -20.0, 29.0], [0.0, -3.0, 30.0, -37.0, -23.0], 
-[-12.0, -11.0, -37.0, 38.0, 19.0]], [[46.0, 13.0, 37.0, -23.0, -49.0], [-16.0, 77.0, 6.0, 15.0, 42.0], [19.0, -2.0, 2.0, -53.0, 
--41.0], [6.0, -19.0, -32.0, 77.0, -11.0]], [[-28.0, 28.0, 24.0, -10.0, -12.0], [-18.0, -44.0, 34.0, 43.0, -44.0], [53.0, 45.0, 
--54.0, 27.0, 20.0], [29.0, 3.0, 36.0, -32.0, -26.0]]], [[[5.0, -5.0, 25.0, 25.0, 10.0], [-25.0, -35.0, 35.0, 25.0, 15.0], 
-[-15.0, -25.0, -20.0, 0.0, -10.0], [10.0, 0.0, 15.0, 25.0, -30.0]], [[14.0, 21.0, 25.0, -25.0, -37.0], [-10.0, 37.0, 8.0, 20.0, 
-2.0], [38.0, 25.0, -16.0, -20.0, -13.0], [13.0, -10.0, -8.0, 25.0, -9.0]], [[2.0, 25.0, 69.0, 11.0, -21.0], [-54.0, -47.0, 
-76.0, 76.0, -2.0], [38.0, 9.0, -72.0, 0.0, -13.0], [41.0, -6.0, 36.0, 37.0, -65.0]], [[43.0, 2.0, 40.0, 0.0, -29.0], [-25.0, 
-44.0, 21.0, 20.0, 49.0], [-4.0, -25.0, -2.0, -45.0, -41.0], [6.0, -15.0, -21.0, 80.0, -23.0]], [[21.0, -44.0, -6.0, 56.0, 
-47.0], [-9.0, -30.0, 9.0, -19.0, 55.0], [-89.0, -86.0, 32.0, -10.0, -21.0], [-21.0, 4.0, -7.0, 42.0, 
--9.0]]]])+(1.-msk_ref)*numpy.array([[[[44.0, -1.0, -27.0, -28.0, 44.0], [7.0, 45.0, -22.0, -8.0, -54.0], [27.0, 2.0, -19.0, 
-79.0, 3.0], [47.0, -35.0, 77.0, 10.0, 15.0]], [[-3.0, -7.0, -11.0, -20.0, -3.0], [-35.0, 22.0, 11.0, 5.0, -2.0], [-13.0, 4.0, 
-15.0, 18.0, -7.0], [-4.0, -5.0, 11.0, -31.0, 6.0]], [[19.0, -4.0, 2.0, 18.0, 19.0], [58.0, 5.0, -37.0, -21.0, -34.0], [22.0, 
-0.0, -44.0, 23.0, 22.0], [35.0, -2.0, 26.0, 51.0, -3.0]], [[-24.0, -40.0, 0.0, 10.0, -24.0], [10.0, 40.0, -28.0, -28.0, -26.0], 
-[-32.0, 14.0, -36.0, 24.0, 30.0], [14.0, 26.0, 6.0, 2.0, -6.0]], [[39.0, 30.0, -4.0, -3.0, 39.0], [27.0, -21.0, -3.0, 9.0, 
--9.0], [44.0, -11.0, 0.0, 9.0, -11.0], [18.0, -29.0, 25.0, 30.0, 6.0]]], [[[-42.0, -65.0, 13.0, 41.0, -42.0], [56.0, 47.0, 
--62.0, -56.0, -43.0], [-45.0, 21.0, -81.0, 21.0, 62.0], [28.0, 54.0, -4.0, 37.0, -18.0]], [[63.0, 59.0, -21.0, -41.0, 63.0], 
-[-26.0, -26.0, 35.0, 41.0, 7.0], [61.0, -19.0, 51.0, 18.0, -48.0], [5.0, -64.0, 42.0, -10.0, 21.0]], [[50.0, 40.0, -16.0, 
--27.0, 50.0], [-7.0, -14.0, 16.0, 24.0, -5.0], [48.0, -13.0, 26.0, 22.0, -29.0], [13.0, -47.0, 39.0, 3.0, 15.0]], [[18.0, 0.0, 
--20.0, -30.0, 18.0], [-30.0, 30.0, 6.0, 6.0, -18.0], [4.0, 2.0, 12.0, 42.0, -10.0], [12.0, -22.0, 38.0, -24.0, 12.0]], [[-11.0, 
--34.0, -4.0, 6.0, -11.0], [16.0, 41.0, -31.0, -27.0, -34.0], [-20.0, 12.0, -38.0, 35.0, 28.0], [23.0, 16.0, 20.0, 9.0, -3.0]]], 
-[[[27.0, 47.0, 11.0, 10.0, 27.0], [25.0, -62.0, 17.0, 23.0, 28.0], [45.0, -18.0, 21.0, -42.0, -23.0], [-10.0, -21.0, -17.0, 
-29.0, 0.0]], [[26.0, 25.0, -9.0, -18.0, 26.0], [-13.0, -11.0, 16.0, 18.0, 4.0], [25.0, -8.0, 23.0, 7.0, -21.0], [1.0, -27.0, 
-17.0, -6.0, 9.0]], [[37.0, 46.0, -4.0, -14.0, 37.0], [-4.0, -39.0, 25.0, 29.0, 18.0], [44.0, -16.0, 34.0, -13.0, -32.0], [-5.0, 
--36.0, 8.0, 5.0, 9.0]], [[11.0, 46.0, 12.0, 3.0, 11.0], [-7.0, -65.0, 37.0, 33.0, 49.0], [28.0, -17.0, 44.0, -59.0, -33.0], 
-[-32.0, -15.0, -37.0, 0.0, 0.0]], [[-45.0, -33.0, -1.0, -9.0, -45.0], [-54.0, 30.0, 15.0, -3.0, 15.0], [-55.0, 13.0, 15.0, 
--6.0, 4.0], [-27.0, 28.0, -26.0, -54.0, -3.0]]], [[[-30.0, -20.0, 20.0, 35.0, -30.0], [35.0, -10.0, -20.0, -20.0, 5.0], [-20.0, 
-5.0, -30.0, -30.0, 25.0], [-5.0, 35.0, -35.0, 25.0, -15.0]], [[-4.0, 19.0, 1.0, -12.0, -4.0], [-37.0, -23.0, 34.0, 24.0, 34.0], 
-[-1.0, -6.0, 41.0, -29.0, -25.0], [-29.0, -7.0, -23.0, -30.0, 3.0]], [[-72.0, -33.0, 29.0, 36.0, -72.0], [-9.0, -15.0, 6.0, 
--12.0, 42.0], [-61.0, 10.0, -3.0, -69.0, 19.0], [-45.0, 61.0, -83.0, -18.0, -21.0]], [[-3.0, 28.0, 22.0, 26.0, -3.0], [26.0, 
--61.0, 13.0, 13.0, 38.0], [18.0, -12.0, 12.0, -63.0, -10.0], [-23.0, 6.0, -46.0, 25.0, -9.0]], [[4.0, -9.0, 25.0, 59.0, 4.0], 
-[114.0, -23.0, -60.0, -38.0, -29.0], [23.0, -1.0, -77.0, -13.0, 44.0], [36.0, 24.0, -6.0, 97.0, -18.0]]]])
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-18.0, 0.0], [0.0, -15.0]], [[-21.0, 9.0], [-15.0, 15.0]], 
+[[18.0, 0.0], [18.0, 0.0]], [[3.0, -3.0], [15.0, -18.0]], [[18.0, 12.0], [-18.0, -18.0]], [[-9.0, -18.0], [-6.0, 
+21.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-3.0, 15.0], [15.0, 21.0]], [[-15.0, 0.0], [-18.0, 9.0]], 
+[[0.0, -15.0], [-6.0, 15.0]], [[-15.0, 18.0], [0.0, 9.0]], [[9.0, -21.0], [-18.0, 18.0]], [[-12.0, -9.0], [18.0, 21.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[-5.0, -3.0, -5.0], [0.0, 0.0, 0.0]], [[6.0, 3.0, 0.0], [0.0, -7.0, -2.0]], [[4.0, -6.0, 4.0], 
-[2.0, 2.0, 7.0]], [[3.0, 3.0, 4.0], [1.0, -6.0, 4.0]], [[4.0, 6.0, -1.0], [-6.0, 6.0, 7.0]]], [[[1.0, -2.0, 2.0], [5.0, 7.0, 
--5.0]], [[-3.0, -3.0, 0.0], [6.0, -5.0, -4.0]], [[5.0, 0.0, -3.0], [-3.0, -7.0, 4.0]], [[-5.0, 1.0, 0.0], [-2.0, 0.0, 0.0]], 
-[[5.0, -3.0, -1.0], [1.0, -6.0, 7.0]]], [[[4.0, -3.0, 4.0], [3.0, 0.0, 7.0]], [[-3.0, 7.0, -6.0], [1.0, 1.0, -4.0]], [[2.0, 
--2.0, -3.0], [7.0, -2.0, -1.0]], [[-2.0, 7.0, 2.0], [-7.0, -4.0, -3.0]], [[-3.0, -5.0, -1.0], [-4.0, -3.0, 3.0]]], [[[7.0, 
--7.0, 3.0], [0.0, 0.0, -2.0]], [[-5.0, -7.0, -3.0], [-3.0, 6.0, 0.0]], [[-3.0, -4.0, 2.0], [6.0, -4.0, -4.0]], [[5.0, 2.0, 
--4.0], [3.0, -3.0, 0.0]], [[7.0, 2.0, 0.0], [5.0, -1.0, 0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank4_offset1(self):
+      arg0=numpy.array([[-1.0, 3.0], [-2.0, 4.0], [-4.0, -3.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-3.0, 3.0, 0.0, -1.0, 0.0], [-6.0, -1.0, -2.0, -2.0, -4.0], [6.0, 2.0, 3.0, -6.0, -4.0], 
-[-4.0, 1.0, -2.0, -7.0, -6.0]], [[6.0, -7.0, -3.0, 3.0, 0.0], [7.0, -4.0, 4.0, 1.0, 6.0], [4.0, 4.0, 4.0, -2.0, -1.0], [-2.0, 
-4.0, -3.0, -4.0, 5.0]], [[4.0, -5.0, -6.0, 1.0, 0.0], [3.0, -6.0, -6.0, 1.0, 4.0], [-2.0, 7.0, -3.0, -5.0, -4.0], [0.0, 5.0, 
--1.0, -7.0, 0.0]]], [[[-3.0, -4.0, -2.0, 2.0, 2.0], [6.0, 1.0, -2.0, -5.0, -1.0], [6.0, 1.0, -6.0, 0.0, 5.0], [0.0, -3.0, 5.0, 
--5.0, 6.0]], [[1.0, -1.0, -1.0, -3.0, 1.0], [6.0, 0.0, 3.0, 0.0, 3.0], [2.0, -2.0, 1.0, -7.0, 6.0], [-7.0, 7.0, -6.0, 6.0, 
-1.0]], [[-2.0, -6.0, -2.0, -4.0, 0.0], [-3.0, -2.0, -4.0, 4.0, -2.0], [1.0, -5.0, 6.0, 0.0, 6.0], [4.0, 5.0, 5.0, 6.0, 
-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, 1.0, -3.0, -3.0, -7.0], [4.0, 3.0, 4.0, 1.0, -1.0], [0.0, -5.0, 2.0, -4.0, -7.0], 
-[-1.0, -2.0, 1.0, -4.0, 6.0]], [[-7.0, 6.0, -2.0, -4.0, 1.0], [1.0, 6.0, 5.0, 4.0, 1.0], [-1.0, 2.0, -5.0, -2.0, 7.0], [0.0, 
-0.0, 4.0, -1.0, -5.0]], [[7.0, -1.0, 0.0, 7.0, -5.0], [-1.0, -7.0, -7.0, -2.0, 4.0], [-4.0, -5.0, -2.0, 5.0, -6.0], [0.0, -4.0, 
-5.0, -1.0, -3.0]]], [[[2.0, 0.0, 2.0, 4.0, 4.0], [-6.0, 5.0, 2.0, 0.0, -5.0], [-7.0, 0.0, 7.0, 2.0, 2.0], [6.0, 0.0, -3.0, 
--1.0, -7.0]], [[-5.0, 1.0, 0.0, -3.0, 7.0], [7.0, 3.0, -6.0, 0.0, 5.0], [-2.0, 0.0, 0.0, -6.0, 0.0], [1.0, -7.0, -7.0, 7.0, 
--3.0]], [[7.0, -2.0, 4.0, -5.0, -5.0], [-4.0, -4.0, -1.0, 7.0, 7.0], [-5.0, -1.0, 1.0, 0.0, -7.0], [-7.0, -1.0, 0.0, 4.0, 
--6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[[[-2.0, -3.0], [7.0, 1.0]], [[3.0, -7.0], [-3.0, 1.0]], [[2.0, 7.0], [1.0, -1.0]], [[-4.0, 
+4.0], [0.0, -2.0]], [[3.0, 0.0], [6.0, -7.0]], [[-4.0, -4.0], [0.0, 4.0]]], [[[-3.0, 2.0], [3.0, 5.0]], [[1.0, -3.0], [0.0, 
+-1.0]], [[-1.0, -1.0], [5.0, 6.0]], [[0.0, 1.0], [-1.0, 5.0]], [[-7.0, -7.0], [0.0, -6.0]], [[7.0, -5.0], [4.0, 2.0]]], [[[0.0, 
+7.0], [3.0, -4.0]], [[0.0, 4.0], [5.0, 7.0]], [[-2.0, -3.0], [-1.0, 4.0]], [[-6.0, 0.0], [0.0, -4.0]], [[7.0, -5.0], [-1.0, 
+-6.0]], [[-7.0, -4.0], [0.0, -3.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 6.0], [3.0, 5.0]], [[7.0, 6.0], [-4.0, 5.0]], [[-4.0, 
+0.0], [-2.0, -1.0]], [[1.0, -1.0], [-2.0, 3.0]], [[1.0, 0.0], [-6.0, -5.0]], [[2.0, 2.0], [-6.0, -6.0]]], [[[-1.0, -4.0], [2.0, 
+5.0]], [[-6.0, 2.0], [0.0, 2.0]], [[-7.0, 1.0], [-6.0, -3.0]], [[6.0, -3.0], [7.0, -5.0]], [[-3.0, 0.0], [-3.0, -5.0]], [[0.0, 
+-4.0], [0.0, 2.0]]], [[[2.0, 0.0], [0.0, 4.0]], [[-4.0, -3.0], [0.0, 5.0]], [[3.0, -2.0], [7.0, 0.0]], [[-3.0, -2.0], [-3.0, 
+5.0]], [[-2.0, 4.0], [-3.0, 0.0]], [[1.0, 2.0], [5.0, 0.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-23.0, 31.0, 39.0, -9.0, 0.0], [-6.0, 47.0, 28.0, 2.0, -18.0], [-32.0, -57.0, -12.0, 61.0, 
-43.0], [26.0, -42.0, 24.0, 82.0, 15.0]], [[-3.0, 16.0, 2.0, 32.0, -7.0], [-51.0, -14.0, -13.0, -17.0, -23.0], [32.0, 48.0, 
-11.0, 7.0, -81.0], [11.0, -41.0, 11.0, -108.0, -34.0]], [[-50.0, -18.0, -26.0, -48.0, 6.0], [-51.0, -16.0, -82.0, 8.0, -46.0], 
-[15.0, -25.0, 8.0, -46.0, 38.0], [10.0, 43.0, 39.0, 12.0, -19.0]], [[8.0, -54.0, -37.0, 14.0, -4.0], [-27.0, -46.0, -54.0, 
-12.0, -5.0], [20.0, 39.0, 21.0, -2.0, -38.0], [40.0, 10.0, 42.0, -78.0, 9.0]], [[30.0, -49.0, -20.0, -45.0, -6.0], [-6.0, 
--42.0, 24.0, 55.0, 26.0], [33.0, -28.0, 123.0, -73.0, 30.0], [-42.0, 118.0, -56.0, 63.0, -3.0]]], [[[-5.0, 10.0, -13.0, 4.0, 
-17.0], [73.0, 10.0, 9.0, -47.0, 18.0], [33.0, 24.0, -64.0, -61.0, 27.0], [-69.0, 12.0, -40.0, -26.0, 6.0]], [[-24.0, 17.0, 
-10.0, 37.0, 7.0], [15.0, 29.0, -17.0, -43.0, -19.0], [-8.0, 18.0, -86.0, 59.0, -9.0], [37.0, -88.0, 55.0, -51.0, 22.0]], 
-[[-33.0, 25.0, 23.0, -9.0, -13.0], [-111.0, 2.0, -23.0, 18.0, -58.0], [8.0, -20.0, 59.0, 34.0, -41.0], [45.0, -30.0, 40.0, 
--17.0, -43.0]], [[27.0, -14.0, 1.0, 4.0, -4.0], [25.0, -1.0, 18.0, 21.0, 28.0], [-38.0, -8.0, 1.0, 28.0, 9.0], [18.0, 5.0, 
--3.0, 41.0, 23.0]], [[-60.0, 1.0, 5.0, -23.0, -4.0], [-105.0, 0.0, -64.0, 9.0, -75.0], [21.0, -31.0, 36.0, 23.0, -2.0], [56.0, 
--22.0, 76.0, -15.0, -24.0]]], [[[-37.0, -41.0, -35.0, -31.0, 6.0], [-36.0, -27.0, -78.0, 6.0, -35.0], [29.0, -8.0, 12.0, -38.0, 
-28.0], [18.0, 38.0, 47.0, -17.0, 0.0]], [[33.0, -9.0, 20.0, 33.0, 3.0], [73.0, 20.0, 87.0, -14.0, 40.0], [26.0, -1.0, 8.0, 
-27.0, 16.0], [-25.0, -21.0, -30.0, 12.0, 48.0]], [[-51.0, 15.0, 14.0, 13.0, 12.0], [-2.0, 33.0, -10.0, -48.0, -43.0], [47.0, 
--9.0, -43.0, 21.0, 23.0], [6.0, -61.0, 47.0, -38.0, 15.0]], [[79.0, -15.0, -9.0, 35.0, -18.0], [10.0, -39.0, 34.0, 36.0, 59.0], 
-[-41.0, 54.0, 36.0, 16.0, -84.0], [10.0, 14.0, -45.0, -35.0, -8.0]], [[-22.0, 32.0, 26.0, -24.0, -11.0], [-71.0, 19.0, -21.0, 
-32.0, -33.0], [-63.0, -46.0, 13.0, 54.0, 1.0], [55.0, -22.0, 35.0, 68.0, -25.0]]], [[[-47.0, 67.0, 7.0, -17.0, 0.0], [-76.0, 
-7.0, -52.0, -26.0, -54.0], [6.0, 17.0, -28.0, -43.0, -45.0], [-22.0, -16.0, -6.0, -54.0, -83.0]], [[-24.0, 55.0, 39.0, -43.0, 
-0.0], [-10.0, 48.0, 24.0, 15.0, -13.0], [-58.0, -74.0, -10.0, 17.0, 60.0], [-8.0, 3.0, -17.0, 135.0, -17.0]], [[-21.0, 13.0, 
-0.0, 33.0, 8.0], [20.0, 21.0, -30.0, -42.0, -14.0], [-14.0, 26.0, -95.0, 44.0, -10.0], [32.0, -75.0, 50.0, -55.0, 18.0]], 
-[[-31.0, 12.0, 15.0, 12.0, 3.0], [-28.0, 14.0, 7.0, -27.0, -36.0], [58.0, -1.0, 14.0, 7.0, -9.0], [-3.0, -37.0, 21.0, -48.0, 
--5.0]], [[-25.0, -12.0, -15.0, 12.0, 9.0], [-4.0, -10.0, -19.0, -37.0, -24.0], [78.0, 29.0, -2.0, -39.0, -11.0], [-25.0, -7.0, 
-11.0, -88.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[-44.0, -18.0, 21.0, -8.0, 57.0], [-18.0, 2.0, 0.0, -7.0, -18.0], [23.0, 
-44.0, 15.0, 1.0, 44.0], [5.0, 30.0, -42.0, 28.0, 0.0]], [[36.0, 21.0, -32.0, 1.0, -78.0], [-14.0, 23.0, 83.0, 4.0, -52.0], 
-[21.0, -22.0, -5.0, 12.0, -7.0], [1.0, 39.0, 67.0, -84.0, 54.0]], [[137.0, -48.0, 32.0, 7.0, -67.0], [-20.0, -64.0, -57.0, 
-21.0, 55.0], [-63.0, -59.0, 51.0, 8.0, -139.0], [-39.0, -45.0, -20.0, 26.0, -20.0]], [[85.0, 3.0, 3.0, 9.0, -96.0], [-53.0, 
--30.0, 33.0, 35.0, 9.0], [-34.0, -33.0, -6.0, 40.0, -50.0], [-31.0, 16.0, 74.0, -46.0, -22.0]], [[-18.0, 33.0, -8.0, -120.0, 
--34.0], [73.0, 15.0, -2.0, 79.0, 107.0], [-7.0, -10.0, -55.0, -81.0, -41.0], [-83.0, -53.0, -1.0, 55.0, -21.0]]], [[[-26.0, 
-4.0, -9.0, 43.0, 75.0], [39.0, 43.0, -47.0, -46.0, -20.0], [-30.0, -14.0, 38.0, -22.0, 12.0], [71.0, -54.0, -61.0, 20.0, 
--16.0]], [[12.0, -18.0, 11.0, 80.0, 27.0], [-70.0, 4.0, 19.0, -43.0, -83.0], [-9.0, 13.0, 47.0, 60.0, 40.0], [62.0, 45.0, 2.0, 
--42.0, -6.0]], [[66.0, -7.0, -5.0, -47.0, -101.0], [-24.0, -16.0, 73.0, 39.0, -9.0], [27.0, -14.0, -1.0, 1.0, -51.0], [-58.0, 
-47.0, 48.0, -47.0, 57.0]], [[-41.0, 1.0, 9.0, 3.0, 28.0], [-7.0, -19.0, -19.0, -1.0, 16.0], [13.0, 27.0, -29.0, 14.0, 38.0], 
-[-7.0, 10.0, 5.0, 21.0, -21.0]], [[125.0, -32.0, 21.0, -23.0, -106.0], [-58.0, -37.0, 43.0, 44.0, 2.0], [-23.0, -33.0, 41.0, 
-19.0, -97.0], [-54.0, 29.0, 27.0, -31.0, 17.0]]], [[[128.0, -32.0, 28.0, 5.0, -74.0], [-37.0, -47.0, -28.0, 33.0, 43.0], 
-[-69.0, -53.0, 43.0, 16.0, -116.0], [-35.0, -31.0, 3.0, 8.0, -36.0]], [[-140.0, 54.0, -19.0, -40.0, 89.0], [18.0, 99.0, 65.0, 
-9.0, -42.0], [28.0, 63.0, -26.0, -36.0, 136.0], [38.0, 27.0, -15.0, 1.0, -21.0]], [[22.0, -7.0, 8.0, 20.0, 18.0], [-43.0, 48.0, 
-46.0, -7.0, -68.0], [-26.0, 2.0, 68.0, 7.0, 11.0], [45.0, 23.0, -28.0, -28.0, -6.0]], [[-62.0, 40.0, -34.0, -9.0, -30.0], 
-[23.0, -13.0, 26.0, 1.0, 11.0], [57.0, 17.0, -95.0, 14.0, 58.0], [-23.0, 27.0, 85.0, -34.0, 26.0]], [[38.0, -41.0, 23.0, 0.0, 
--31.0], [-25.0, -73.0, -23.0, 0.0, 20.0], [28.0, 7.0, -4.0, 27.0, -37.0], [-45.0, 28.0, 5.0, 13.0, 29.0]]], [[[98.0, -34.0, 
--15.0, 38.0, -61.0], [26.0, -34.0, -26.0, -41.0, -16.0], [5.0, -62.0, 41.0, 1.0, -102.0], [7.0, -24.0, -6.0, -32.0, 80.0]], 
-[[-38.0, -38.0, 23.0, -8.0, 73.0], [36.0, -33.0, -76.0, -27.0, 31.0], [28.0, 26.0, 10.0, -23.0, -2.0], [-7.0, -20.0, -81.0, 
-75.0, 17.0]], [[28.0, -25.0, 13.0, 95.0, 23.0], [-66.0, -13.0, -6.0, -51.0, -71.0], [-18.0, 1.0, 48.0, 66.0, 21.0], [63.0, 
-30.0, 1.0, -36.0, -10.0]], [[9.0, 18.0, -13.0, -30.0, -22.0], [-13.0, 61.0, 82.0, 21.0, -49.0], [-1.0, -1.0, 29.0, -20.0, 9.0], 
-[10.0, 27.0, 5.0, -42.0, 20.0]], [[43.0, 18.0, -15.0, -6.0, -34.0], [-7.0, 55.0, 54.0, 15.0, -35.0], [-35.0, -31.0, 39.0, 
--16.0, -25.0], [22.0, -7.0, 7.0, -42.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[[[8.0, -29.0], [-25.0, 5.0]], [[-5.0, -3.0], [-17.0, -27.0]], [[8.0, 7.0], [-7.0, -27.0]], 
+[[28.0, -6.0], [2.0, 8.0]], [[-17.0, 34.0], [-2.0, 43.0]], [[18.0, 30.0], [-8.0, 4.0]]], [[[-18.0, -22.0], [24.0, 35.0]], 
+[[13.0, -45.0], [-24.0, -22.0]], [[8.0, 26.0], [26.0, 9.0]], [[6.0, 16.0], [-4.0, 26.0]], [[-40.0, -13.0], [21.0, -27.0]], 
+[[37.0, -20.0], [16.0, 29.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, 2.0], [-7.0, -31.0]], [[21.0, 2.0], [4.0, -29.0]], [[6.0, 
+6.0], [-14.0, 7.0]], [[-1.0, 15.0], [0.0, -13.0]], [[13.0, -16.0], [24.0, 15.0]], [[-6.0, -2.0], [-14.0, 2.0]]], [[[-10.0, 
+2.0], [17.0, 23.0]], [[9.0, 35.0], [-12.0, 8.0]], [[-49.0, 10.0], [-51.0, -15.0]], [[36.0, -9.0], [31.0, -26.0]], [[-3.0, 
+-12.0], [-21.0, -35.0]], [[3.0, -16.0], [-33.0, -10.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[[4.0, 2.0], [-1.0, 6.0]], [[3.0, 3.0], [7.0, 2.0]], [[-2.0, -4.0], [1.0, -6.0]], [[-6.0, -5.0], 
-[-6.0, 1.0]], [[6.0, 4.0], [-1.0, 5.0]], [[-3.0, 5.0], [0.0, 5.0]]]),self.functionspace)
-      arg1=-5.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-20.0, -10.0], [5.0, -30.0]], [[-15.0, -15.0], [-35.0, -10.0]], [[10.0, 20.0], [-5.0, 30.0]], 
-[[30.0, 25.0], [30.0, -5.0]], [[-30.0, -20.0], [5.0, -25.0]], [[15.0, -25.0], [-0.0, -25.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_float_rank0_offset0(self):
+      arg0=numpy.array([[-2.0, -5.0, 1.0, -3.0, -2.0], [3.0, 1.0, -5.0, 4.0, -5.0], [-1.0, -2.0, -7.0, 4.0, 3.0], [0.0, 5.0, 
+3.0, 3.0, 5.0]])
+      arg1=0.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-0.0, -0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[[-4.0, -3.0], [3.0, 0.0]], [[3.0, -6.0], [5.0, -4.0]], [[-7.0, -3.0], [4.0, -6.0]], [[-3.0, 0.0], 
-[-4.0, -6.0]], [[7.0, -2.0], [0.0, -1.0]], [[-4.0, -1.0], [0.0, 0.0]]]),self.functionspace)
-      arg1=numpy.array(-4.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[16.0, 12.0], [-12.0, -0.0]], [[-12.0, 24.0], [-20.0, 16.0]], [[28.0, 12.0], [-16.0, 24.0]], 
-[[12.0, -0.0], [16.0, 24.0]], [[-28.0, 8.0], [-0.0, 4.0]], [[16.0, 4.0], [-0.0, -0.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank0_offset0(self):
+      arg0=numpy.array([[4.0, 0.0, -1.0, -6.0, -4.0], [-7.0, 0.0, -4.0, -4.0, 4.0], [-5.0, 0.0, 3.0, -6.0, 2.0], [1.0, 7.0, 
+-2.0, 6.0, 4.0]])
+      arg1=numpy.array(-5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-20.0, -0.0, 5.0, 30.0, 20.0], [35.0, -0.0, 20.0, 20.0, -20.0], [25.0, -0.0, -15.0, 30.0, -10.0], 
+[-5.0, -35.0, 10.0, -30.0, -20.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[2.0, 6.0, -1.0], [4.0, -1.0, 3.0]], [[-5.0, 7.0, -6.0], [-2.0, 0.0, -7.0]]], [[[6.0, -2.0, 
-2.0], [3.0, 1.0, 6.0]], [[2.0, -3.0, 0.0], [2.0, 7.0, 7.0]]], [[[0.0, -3.0, -5.0], [-4.0, 3.0, 2.0]], [[-1.0, 1.0, 6.0], [-2.0, 
--1.0, 3.0]]], [[[2.0, 0.0, 5.0], [-5.0, 7.0, 3.0]], [[-1.0, -5.0, -5.0], [-2.0, 5.0, -1.0]]], [[[-5.0, -3.0, -4.0], [6.0, 3.0, 
-4.0]], [[-3.0, 7.0, -4.0], [-5.0, 2.0, 5.0]]], [[[6.0, 0.0, -5.0], [-6.0, -5.0, 0.0]], [[-7.0, -3.0, 0.0], [0.0, 3.0, 
-0.0]]]]),self.functionspace)
-      arg1=numpy.array([-7.0, -6.0, -5.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-45.0, -37.0], [23.0, 49.0]], [[-40.0, -57.0], [4.0, -91.0]], [[43.0, 0.0], [-29.0, 5.0]], 
-[[-39.0, -22.0], [62.0, -11.0]], [[73.0, -80.0], [-1.0, -2.0]], [[-17.0, 72.0], [67.0, -18.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank1_offset1(self):
+      arg0=numpy.array([[[-4.0, -6.0, 0.0, 0.0, -5.0], [2.0, 5.0, 7.0, -2.0, 7.0], [-1.0, 7.0, 1.0, -5.0, -4.0], [-2.0, 4.0, 
+5.0, -3.0, 5.0]], [[2.0, 0.0, -6.0, -7.0, -2.0], [-6.0, 5.0, 4.0, -2.0, 4.0], [-1.0, 6.0, -3.0, -2.0, 6.0], [-1.0, 2.0, 6.0, 
+1.0, 1.0]], [[7.0, -6.0, -3.0, 5.0, -6.0], [-5.0, 6.0, -7.0, -6.0, 4.0], [-1.0, 7.0, -7.0, -4.0, 4.0], [-7.0, -3.0, 0.0, 6.0, 
+0.0]]])
+      arg1=numpy.array([-7.0, 0.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[28.0, 42.0, 0.0, 0.0, 35.0], [-14.0, -35.0, -49.0, 14.0, -49.0], [7.0, -49.0, -7.0, 35.0, 28.0], [14.0, 
+-28.0, -35.0, 21.0, -35.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_array_rank1_offset0(self):
-      arg0=Data(numpy.array([[[0.0, -2.0], [-4.0, -2.0]], [[2.0, -4.0], [0.0, 5.0]], [[7.0, 3.0], [5.0, -4.0]], [[-3.0, 6.0], 
-[2.0, 5.0]], [[-1.0, 0.0], [2.0, 2.0]], [[-6.0, 1.0], [4.0, 4.0]]]),self.functionspace)
-      arg1=numpy.array([-3.0, -7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 0.0], [6.0, 14.0]], [[12.0, 28.0], [6.0, 14.0]]], [[[-6.0, -14.0], [12.0, 28.0]], [[0.0, 
-0.0], [-15.0, -35.0]]], [[[-21.0, -49.0], [-9.0, -21.0]], [[-15.0, -35.0], [12.0, 28.0]]], [[[9.0, 21.0], [-18.0, -42.0]], 
-[[-6.0, -14.0], [-15.0, -35.0]]], [[[3.0, 7.0], [0.0, 0.0]], [[-6.0, -14.0], [-6.0, -14.0]]], [[[18.0, 42.0], [-3.0, -7.0]], 
-[[-12.0, -28.0], [-12.0, -28.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_array_rank2_offset2(self):
+      arg0=numpy.array([[[[-7.0, 3.0, 3.0, -2.0, -5.0], [0.0, 7.0, -6.0, 0.0, 4.0], [-2.0, -3.0, -7.0, 0.0, 2.0], [-3.0, -2.0, 
+6.0, 4.0, -1.0]], [[-5.0, -5.0, -2.0, -1.0, 3.0], [1.0, 4.0, 0.0, -7.0, -4.0], [0.0, -5.0, 7.0, 0.0, -4.0], [-1.0, 4.0, 0.0, 
+-2.0, -3.0]], [[-4.0, 5.0, -2.0, 6.0, 0.0], [-2.0, 1.0, 7.0, -5.0, -6.0], [4.0, 0.0, 3.0, 0.0, -5.0], [5.0, -7.0, -5.0, 5.0, 
+0.0]]], [[[-7.0, 6.0, -5.0, -1.0, -5.0], [2.0, -6.0, 7.0, -2.0, 3.0], [-3.0, 1.0, -2.0, -2.0, 6.0], [-6.0, 6.0, -5.0, 5.0, 
+-7.0]], [[7.0, 5.0, -7.0, 0.0, -7.0], [-7.0, 0.0, 4.0, -7.0, 0.0], [-3.0, 1.0, -5.0, -3.0, -6.0], [6.0, 2.0, 1.0, 5.0, -5.0]], 
+[[-1.0, 2.0, 7.0, -4.0, 0.0], [3.0, 5.0, -4.0, -2.0, -4.0], [-2.0, 0.0, 0.0, 0.0, 0.0], [0.0, -2.0, -1.0, 2.0, 5.0]]]])
+      arg1=numpy.array([[-1.0, 6.0, -5.0], [-1.0, -5.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[-31.0, -89.0, 35.0, -33.0, 63.0], [49.0, 18.0, -56.0, 20.0, -1.0], [0.0, -33.0, 61.0, 17.0, 23.0], 
+[-52.0, 45.0, 19.0, -71.0, 15.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[-6.0, -4.0, 3.0], [3.0, 6.0, -4.0]], [[6.0, 5.0, 6.0], [-3.0, -4.0, 5.0]]], [[[0.0, 5.0, 0.0], 
-[0.0, 5.0, 0.0]], [[5.0, -5.0, 7.0], [-3.0, 4.0, 1.0]]], [[[4.0, -6.0, 0.0], [-6.0, 0.0, -7.0]], [[7.0, -1.0, -1.0], [6.0, 5.0, 
--3.0]]], [[[4.0, 6.0, 5.0], [0.0, 0.0, -5.0]], [[1.0, 3.0, -5.0], [-1.0, -6.0, 4.0]]], [[[0.0, 6.0, -1.0], [-7.0, -2.0, -5.0]], 
-[[-6.0, -7.0, 5.0], [-6.0, 7.0, -6.0]]], [[[3.0, 3.0, 2.0], [0.0, 7.0, -4.0]], [[-1.0, -3.0, -1.0], [-6.0, -6.0, 
-0.0]]]]),self.functionspace)
-      arg1=numpy.array([[4.0, -5.0], [-4.0, 1.0], [5.0, 6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[7.0, 44.0], [-32.0, -33.0]], [[34.0, 11.0], [29.0, 41.0]]], [[[-20.0, 5.0], [-20.0, 5.0]], 
-[[75.0, 12.0], [-23.0, 25.0]]], [[[40.0, -26.0], [-59.0, -12.0]], [[27.0, -42.0], [-11.0, -43.0]]], [[[17.0, 16.0], [-25.0, 
--30.0]], [[-33.0, -32.0], [40.0, 23.0]]], [[[-29.0, 0.0], [-45.0, 3.0]], [[29.0, 53.0], [-82.0, 1.0]]], [[[10.0, 0.0], [-48.0, 
--17.0]], [[3.0, -4.0], [0.0, 24.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank1_offset0(self):
+      arg0=numpy.array([[3.0, -5.0, -2.0, 1.0, -6.0], [3.0, 0.0, 4.0, 6.0, -2.0], [1.0, -5.0, -4.0, 0.0, 5.0], [7.0, 0.0, -2.0, 
+-2.0, 0.0]])
+      arg1=numpy.array([-2.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-6.0, 0.0], [10.0, 0.0], [4.0, 0.0], [-2.0, 0.0], [12.0, 0.0]], [[-6.0, 0.0], [0.0, 0.0], [-8.0, 0.0], 
+[-12.0, 0.0], [4.0, 0.0]], [[-2.0, 0.0], [10.0, 0.0], [8.0, 0.0], [0.0, 0.0], [-10.0, 0.0]], [[-14.0, 0.0], [0.0, 0.0], [4.0, 
+0.0], [4.0, 0.0], [0.0, 0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[1.0, -7.0], [0.0, 2.0]], [[-2.0, 3.0], [-4.0, -6.0]], [[-2.0, -4.0], [7.0, 4.0]], [[5.0, -2.0], 
-[6.0, -2.0]], [[-4.0, 7.0], [3.0, -3.0]], [[-1.0, 1.0], [0.0, -5.0]]]),self.functionspace)
-      arg1=Data(-6.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-6.0, 42.0], [-0.0, -12.0]], [[12.0, -18.0], [24.0, 36.0]], [[12.0, 24.0], [-42.0, -24.0]], 
-[[-30.0, 12.0], [-36.0, 12.0]], [[24.0, -42.0], [-18.0, 18.0]], [[6.0, -6.0], [-0.0, 30.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank2_offset1(self):
+      arg0=numpy.array([[[-3.0, -5.0, 0.0, 5.0, 4.0], [2.0, 4.0, -3.0, -6.0, 0.0], [-1.0, -4.0, 3.0, 3.0, 4.0], [5.0, 4.0, 
+-3.0, 5.0, -2.0]], [[6.0, -5.0, 5.0, -3.0, 2.0], [4.0, 6.0, 0.0, 4.0, -1.0], [-4.0, 6.0, 3.0, 3.0, -2.0], [1.0, -4.0, -2.0, 
+6.0, -6.0]], [[-5.0, 7.0, -7.0, 2.0, 0.0], [-7.0, -7.0, -3.0, -4.0, 4.0], [5.0, -7.0, -2.0, -5.0, 0.0], [-1.0, 7.0, 0.0, 5.0, 
+-3.0]]])
+      arg1=numpy.array([[3.0, 2.0], [2.0, 0.0], [1.0, -3.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-2.0, 9.0], [-18.0, -31.0], [3.0, 21.0], [11.0, 4.0], [16.0, 8.0]], [[7.0, 25.0], [17.0, 29.0], 
+[-12.0, 3.0], [-14.0, 0.0], [2.0, -12.0]], [[-6.0, -17.0], [-7.0, 13.0], [13.0, 12.0], [10.0, 21.0], [8.0, 8.0]], [[16.0, 
+13.0], [11.0, -13.0], [-13.0, -6.0], [32.0, -5.0], [-21.0, 5.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[-1.0, -2.0, -2.0], [-2.0, 6.0, -2.0]], [[-2.0, 1.0, -2.0], [-1.0, 4.0, 1.0]]], [[[-2.0, 0.0, 
-0.0], [-3.0, 4.0, 2.0]], [[0.0, 3.0, 4.0], [6.0, -7.0, 5.0]]], [[[-5.0, 0.0, 2.0], [0.0, 1.0, -7.0]], [[-5.0, -7.0, -7.0], 
-[7.0, 7.0, 5.0]]], [[[0.0, -7.0, 3.0], [-1.0, 7.0, -4.0]], [[0.0, 7.0, 0.0], [4.0, 2.0, -6.0]]], [[[0.0, -3.0, -2.0], [-4.0, 
--1.0, 6.0]], [[-5.0, -1.0, -3.0], [7.0, 0.0, 4.0]]], [[[0.0, -5.0, 3.0], [-7.0, 1.0, -2.0]], [[-5.0, 3.0, 5.0], [-6.0, 1.0, 
-6.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([-3.0, 5.0, -2.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-3.0, 40.0], [15.0, 21.0]], [[6.0, 25.0], [7.0, -63.0]], [[11.0, 19.0], [-6.0, 4.0]], [[-41.0, 
-46.0], [35.0, 10.0]], [[-11.0, -5.0], [16.0, -29.0]], [[-31.0, 30.0], [20.0, 11.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_array_rank3_offset2(self):
+      arg0=numpy.array([[[[2.0, -4.0, 2.0, -6.0, 4.0], [-6.0, 4.0, 7.0, 0.0, 1.0], [-6.0, 3.0, 2.0, -2.0, 2.0], [5.0, 1.0, 1.0, 
+0.0, 7.0]], [[3.0, 0.0, -4.0, -3.0, -3.0], [0.0, 0.0, 5.0, 0.0, -5.0], [-6.0, 1.0, 7.0, -2.0, 2.0], [-3.0, -3.0, 0.0, 2.0, 
+-3.0]], [[4.0, 0.0, 3.0, 2.0, -4.0], [-1.0, -3.0, 5.0, -5.0, -4.0], [6.0, 6.0, -7.0, -4.0, 7.0], [-4.0, 5.0, 3.0, -1.0, 5.0]]], 
+[[[-1.0, 7.0, 2.0, -7.0, 0.0], [2.0, -4.0, -2.0, 1.0, -3.0], [-4.0, 6.0, 3.0, 6.0, 0.0], [-1.0, -7.0, -3.0, 2.0, 6.0]], [[5.0, 
+7.0, -3.0, 0.0, 4.0], [-1.0, 3.0, -1.0, 2.0, -7.0], [-5.0, 4.0, 4.0, -2.0, 6.0], [5.0, -4.0, 4.0, 0.0, -4.0]], [[-6.0, 3.0, 
+4.0, -2.0, 0.0], [-2.0, 4.0, -2.0, 7.0, 2.0], [-3.0, 0.0, 0.0, 0.0, -2.0], [3.0, -2.0, 0.0, 0.0, -7.0]]]])
+      arg1=numpy.array([[[1.0, 6.0], [-3.0, -2.0], [3.0, 7.0]], [[-7.0, 0.0], [1.0, -1.0], [-5.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[47.0, 17.0], [-61.0, -25.0], [-14.0, 52.0], [68.0, -20.0], [5.0, -2.0]], [[-14.0, -46.0], [6.0, 8.0], 
+[30.0, 64.0], [-55.0, -23.0], [8.0, -1.0]], [[68.0, 17.0], [-20.0, 54.0], [-57.0, -55.0], [-52.0, -34.0], [33.0, 47.0]], 
+[[-1.0, 9.0], [80.0, 47.0], [35.0, 23.0], [-23.0, -11.0], [20.0, 73.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([[[6.0, 4.0], [0.0, 5.0]], [[7.0, -2.0], [-6.0, 0.0]], [[4.0, -4.0], [5.0, 4.0]], [[1.0, -5.0], 
-[-3.0, -5.0]], [[6.0, 3.0], [5.0, 5.0]], [[1.0, 0.0], [-5.0, -7.0]]]),self.functionspace)
-      arg1=Data(numpy.array([3.0, 0.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[18.0, 0.0], [12.0, 0.0]], [[0.0, 0.0], [15.0, 0.0]]], [[[21.0, 0.0], [-6.0, 0.0]], [[-18.0, 
-0.0], [0.0, 0.0]]], [[[12.0, 0.0], [-12.0, 0.0]], [[15.0, 0.0], [12.0, 0.0]]], [[[3.0, 0.0], [-15.0, 0.0]], [[-9.0, 0.0], 
-[-15.0, 0.0]]], [[[18.0, 0.0], [9.0, 0.0]], [[15.0, 0.0], [15.0, 0.0]]], [[[3.0, 0.0], [0.0, 0.0]], [[-15.0, 0.0], [-21.0, 
-0.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank2_array_rank2_offset0(self):
+      arg0=numpy.array([[4.0, -6.0, -1.0, -2.0, -5.0], [-2.0, -3.0, -7.0, 7.0, -5.0], [0.0, -5.0, -1.0, 2.0, 5.0], [4.0, 0.0, 
+-3.0, -1.0, 6.0]])
+      arg1=numpy.array([[0.0, 0.0, -4.0, -5.0, -5.0], [-5.0, 1.0, 1.0, -4.0, 3.0], [-4.0, -7.0, -1.0, -3.0, 5.0], [6.0, -3.0, 
+-2.0, 6.0, 1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[0.0, 0.0, -16.0, -20.0, -20.0], [-20.0, 4.0, 4.0, -16.0, 12.0], [-16.0, -28.0, -4.0, -12.0, 20.0], 
+[24.0, -12.0, -8.0, 24.0, 4.0]], [[0.0, 0.0, 24.0, 30.0, 30.0], [30.0, -6.0, -6.0, 24.0, -18.0], [24.0, 42.0, 6.0, 18.0, 
+-30.0], [-36.0, 18.0, 12.0, -36.0, -6.0]], [[0.0, 0.0, 4.0, 5.0, 5.0], [5.0, -1.0, -1.0, 4.0, -3.0], [4.0, 7.0, 1.0, 3.0, 
+-5.0], [-6.0, 3.0, 2.0, -6.0, -1.0]], [[0.0, 0.0, 8.0, 10.0, 10.0], [10.0, -2.0, -2.0, 8.0, -6.0], [8.0, 14.0, 2.0, 6.0, 
+-10.0], [-12.0, 6.0, 4.0, -12.0, -2.0]], [[0.0, 0.0, 20.0, 25.0, 25.0], [25.0, -5.0, -5.0, 20.0, -15.0], [20.0, 35.0, 5.0, 
+15.0, -25.0], [-30.0, 15.0, 10.0, -30.0, -5.0]]], [[[0.0, 0.0, 8.0, 10.0, 10.0], [10.0, -2.0, -2.0, 8.0, -6.0], [8.0, 14.0, 
+2.0, 6.0, -10.0], [-12.0, 6.0, 4.0, -12.0, -2.0]], [[0.0, 0.0, 12.0, 15.0, 15.0], [15.0, -3.0, -3.0, 12.0, -9.0], [12.0, 21.0, 
+3.0, 9.0, -15.0], [-18.0, 9.0, 6.0, -18.0, -3.0]], [[0.0, 0.0, 28.0, 35.0, 35.0], [35.0, -7.0, -7.0, 28.0, -21.0], [28.0, 49.0, 
+7.0, 21.0, -35.0], [-42.0, 21.0, 14.0, -42.0, -7.0]], [[0.0, 0.0, -28.0, -35.0, -35.0], [-35.0, 7.0, 7.0, -28.0, 21.0], [-28.0, 
+-49.0, -7.0, -21.0, 35.0], [42.0, -21.0, -14.0, 42.0, 7.0]], [[0.0, 0.0, 20.0, 25.0, 25.0], [25.0, -5.0, -5.0, 20.0, -15.0], 
+[20.0, 35.0, 5.0, 15.0, -25.0], [-30.0, 15.0, 10.0, -30.0, -5.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 20.0, 25.0, 25.0], [25.0, -5.0, -5.0, 20.0, -15.0], [20.0, 
+35.0, 5.0, 15.0, -25.0], [-30.0, 15.0, 10.0, -30.0, -5.0]], [[0.0, 0.0, 4.0, 5.0, 5.0], [5.0, -1.0, -1.0, 4.0, -3.0], [4.0, 
+7.0, 1.0, 3.0, -5.0], [-6.0, 3.0, 2.0, -6.0, -1.0]], [[0.0, 0.0, -8.0, -10.0, -10.0], [-10.0, 2.0, 2.0, -8.0, 6.0], [-8.0, 
+-14.0, -2.0, -6.0, 10.0], [12.0, -6.0, -4.0, 12.0, 2.0]], [[0.0, 0.0, -20.0, -25.0, -25.0], [-25.0, 5.0, 5.0, -20.0, 15.0], 
+[-20.0, -35.0, -5.0, -15.0, 25.0], [30.0, -15.0, -10.0, 30.0, 5.0]]], [[[0.0, 0.0, -16.0, -20.0, -20.0], [-20.0, 4.0, 4.0, 
+-16.0, 12.0], [-16.0, -28.0, -4.0, -12.0, 20.0], [24.0, -12.0, -8.0, 24.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 12.0, 15.0, 15.0], [15.0, -3.0, -3.0, 12.0, 
+-9.0], [12.0, 21.0, 3.0, 9.0, -15.0], [-18.0, 9.0, 6.0, -18.0, -3.0]], [[0.0, 0.0, 4.0, 5.0, 5.0], [5.0, -1.0, -1.0, 4.0, 
+-3.0], [4.0, 7.0, 1.0, 3.0, -5.0], [-6.0, 3.0, 2.0, -6.0, -1.0]], [[0.0, 0.0, -24.0, -30.0, -30.0], [-30.0, 6.0, 6.0, -24.0, 
+18.0], [-24.0, -42.0, -6.0, -18.0, 30.0], [36.0, -18.0, -12.0, 36.0, 6.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[0.0, 3.0, 6.0], [2.0, -6.0, -4.0]], [[0.0, 2.0, 4.0], [-3.0, 7.0, 5.0]]], [[[2.0, 0.0, 0.0], 
-[-2.0, 3.0, -6.0]], [[-7.0, 6.0, -3.0], [7.0, -3.0, 6.0]]], [[[0.0, 1.0, -7.0], [-2.0, 7.0, -2.0]], [[-6.0, -1.0, 2.0], [2.0, 
--7.0, 5.0]]], [[[-3.0, 7.0, 5.0], [2.0, -2.0, 3.0]], [[7.0, -3.0, -4.0], [1.0, -1.0, 6.0]]], [[[1.0, -3.0, 0.0], [6.0, 7.0, 
-4.0]], [[-7.0, -3.0, 7.0], [-3.0, -7.0, -4.0]]], [[[0.0, -5.0, -4.0], [-2.0, 0.0, -1.0]], [[0.0, -7.0, 3.0], [-6.0, -5.0, 
-0.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[-1.0, 3.0], [2.0, 0.0], [-7.0, -2.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-36.0, -12.0], [14.0, 14.0]], [[-24.0, -8.0], [-18.0, -19.0]]], [[[-2.0, 6.0], [50.0, 6.0]], 
-[[40.0, -15.0], [-55.0, 9.0]]], [[[51.0, 14.0], [30.0, -2.0]], [[-10.0, -22.0], [-51.0, -4.0]]], [[[-18.0, -19.0], [-27.0, 
-0.0]], [[15.0, 29.0], [-45.0, -9.0]]], [[[-7.0, 3.0], [-20.0, 10.0]], [[-48.0, -35.0], [17.0, -1.0]]], [[[18.0, 8.0], [9.0, 
--4.0]], [[-35.0, -6.0], [-4.0, -18.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_array_rank3_offset1(self):
+      arg0=numpy.array([[[7.0, -2.0, -2.0, -4.0, 7.0], [-7.0, 0.0, -7.0, 5.0, 3.0], [-5.0, -6.0, -4.0, -3.0, 4.0], [-4.0, -6.0, 
+-7.0, 0.0, 0.0]], [[2.0, -7.0, -2.0, 0.0, 5.0], [-3.0, 7.0, -2.0, 7.0, 1.0], [3.0, 7.0, -2.0, 5.0, -7.0], [0.0, 5.0, 0.0, -1.0, 
+-5.0]], [[2.0, 1.0, -1.0, -5.0, -7.0], [4.0, 6.0, 4.0, 1.0, 2.0], [2.0, -6.0, -1.0, 4.0, -7.0], [6.0, -6.0, -2.0, -3.0, 3.0]]])
+      arg1=numpy.array([[[2.0, 5.0, -7.0, -6.0, -2.0], [4.0, 1.0, -1.0, 4.0, 3.0], [7.0, -3.0, -5.0, -5.0, 5.0], [-3.0, 5.0, 
+2.0, -5.0, -7.0]], [[0.0, 5.0, -3.0, -7.0, 6.0], [0.0, 4.0, 6.0, -6.0, 0.0], [6.0, 4.0, 0.0, -2.0, -6.0], [5.0, 2.0, 0.0, -3.0, 
+4.0]], [[-3.0, -7.0, -6.0, 6.0, 4.0], [-1.0, -6.0, 7.0, -5.0, 1.0], [-1.0, 0.0, 1.0, 0.0, 0.0], [2.0, 5.0, 4.0, 7.0, 3.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[8.0, 31.0, -67.0, -44.0, 6.0], [26.0, 3.0, 19.0, 6.0, 23.0], [59.0, -13.0, -33.0, -39.0, 23.0], 
+[-7.0, 49.0, 22.0, -27.0, -35.0]], [[-7.0, -52.0, 29.0, 67.0, -34.0], [-9.0, -36.0, -33.0, 29.0, -5.0], [-57.0, -22.0, 11.0, 
+24.0, 32.0], [-27.0, -19.0, 0.0, 38.0, -11.0]], [[-1.0, -13.0, 26.0, 20.0, -12.0], [-7.0, -4.0, -17.0, 9.0, -7.0], [-25.0, 
+-2.0, 9.0, 14.0, 2.0], [-6.0, -19.0, -8.0, 9.0, 3.0]], [[7.0, 15.0, 58.0, -6.0, -12.0], [-11.0, 26.0, -31.0, 9.0, -17.0], 
+[-23.0, 12.0, 15.0, 20.0, -20.0], [2.0, -45.0, -28.0, -15.0, 13.0]], [[35.0, 109.0, -22.0, -119.0, -12.0], [35.0, 69.0, -26.0, 
+33.0, 14.0], [86.0, -1.0, -42.0, -45.0, 5.0], [-10.0, 10.0, -14.0, -99.0, -50.0]]], [[[-26.0, -78.0, 34.0, 87.0, 12.0], [-32.0, 
+-43.0, 17.0, -30.0, -17.0], [-71.0, 9.0, 39.0, 41.0, -17.0], [14.0, -21.0, 2.0, 72.0, 49.0]], [[-18.0, -7.0, -57.0, -13.0, 
+66.0], [-6.0, -8.0, 84.0, -72.0, 6.0], [36.0, 28.0, 6.0, -14.0, -42.0], [47.0, 44.0, 24.0, 21.0, 46.0]], [[-26.0, -73.0, 31.0, 
+80.0, 18.0], [-32.0, -39.0, 23.0, -36.0, -17.0], [-65.0, 13.0, 39.0, 39.0, -23.0], [19.0, -19.0, 2.0, 69.0, 53.0]], [[7.0, 
+53.0, -62.0, -73.0, 36.0], [19.0, 27.0, 44.0, -27.0, 16.0], [76.0, 13.0, -24.0, -39.0, -17.0], [22.0, 44.0, 14.0, -39.0, 
+-4.0]], [[0.0, 6.0, -36.0, -13.0, 8.0], [10.0, -5.0, 17.0, -4.0, 11.0], [25.0, -5.0, -13.0, -17.0, 9.0], [0.0, 27.0, 14.0, 
+-4.0, -11.0]]], [[[-16.0, -24.0, 14.0, 21.0, 36.0], [-22.0, -5.0, 37.0, -48.0, -13.0], [-19.0, 27.0, 27.0, 19.0, -43.0], [34.0, 
+-9.0, -2.0, 30.0, 53.0]], [[6.0, 47.0, 57.0, -49.0, 30.0], [-18.0, 58.0, 6.0, -36.0, -24.0], [6.0, 46.0, 24.0, 16.0, -72.0], 
+[41.0, -46.0, -36.0, -33.0, 52.0]], [[-5.0, -23.0, 40.0, 32.0, -8.0], [-15.0, -6.0, -15.0, 1.0, -13.0], [-39.0, 4.0, 19.0, 
+24.0, -8.0], [0.0, -29.0, -12.0, 19.0, 17.0]], [[-18.0, -18.0, -18.0, 7.0, 52.0], [-16.0, -7.0, 61.0, -62.0, -5.0], [5.0, 29.0, 
+19.0, 5.0, -45.0], [42.0, 15.0, 10.0, 28.0, 53.0]], [[29.0, 34.0, 35.0, -17.0, -78.0], [23.0, 18.0, -95.0, 93.0, 5.0], [-7.0, 
+-40.0, -27.0, -6.0, 62.0], [-61.0, -29.0, -20.0, -48.0, -77.0]]], [[[-26.0, -62.0, -8.0, 60.0, 32.0], [-22.0, -40.0, 46.0, 
+-46.0, -6.0], [-34.0, 12.0, 26.0, 20.0, -20.0], [24.0, 10.0, 16.0, 62.0, 46.0]], [[6.0, 37.0, 63.0, -35.0, 18.0], [-18.0, 50.0, 
+-6.0, -24.0, -24.0], [-6.0, 38.0, 24.0, 20.0, -60.0], [31.0, -50.0, -36.0, -27.0, 44.0]], [[-8.0, -21.0, 61.0, 30.0, 6.0], 
+[-26.0, 5.0, -7.0, -18.0, -23.0], [-47.0, 21.0, 33.0, 35.0, -35.0], [17.0, -45.0, -22.0, 21.0, 43.0]], [[9.0, 16.0, 21.0, 
+-11.0, -18.0], [3.0, 14.0, -27.0, 21.0, -3.0], [-3.0, -4.0, -3.0, 2.0, 6.0], [-11.0, -17.0, -12.0, -18.0, -13.0]], [[-9.0, 
+-46.0, -3.0, 53.0, -18.0], [-3.0, -38.0, -9.0, 15.0, 3.0], [-33.0, -20.0, 3.0, 10.0, 30.0], [-19.0, 5.0, 12.0, 36.0, -11.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank4_array_rank4_offset2(self):
+      arg0=numpy.array([[[[0.0, 7.0, 2.0, 4.0, 5.0], [-6.0, 6.0, 5.0, -3.0, -7.0], [7.0, 0.0, -4.0, -4.0, 7.0], [3.0, -6.0, 
+7.0, 0.0, -5.0]], [[5.0, 0.0, 3.0, -5.0, 1.0], [2.0, 3.0, 7.0, 0.0, 7.0], [-5.0, 5.0, 7.0, 5.0, 0.0], [6.0, -6.0, 4.0, -6.0, 
+-3.0]], [[-3.0, 3.0, -3.0, 0.0, 5.0], [0.0, -5.0, -2.0, 4.0, -4.0], [-1.0, -4.0, 7.0, -7.0, -6.0], [-1.0, 6.0, 7.0, 2.0, 
+0.0]]], [[[4.0, 5.0, 5.0, -5.0, 2.0], [-3.0, -4.0, 0.0, -7.0, 0.0], [-7.0, 6.0, -4.0, -6.0, -7.0], [6.0, 3.0, -5.0, 7.0, 4.0]], 
+[[-7.0, 7.0, -3.0, -5.0, -5.0], [4.0, 5.0, 6.0, 4.0, -2.0], [5.0, -6.0, -3.0, -7.0, -4.0], [-4.0, -2.0, -3.0, 1.0, 3.0]], 
+[[-6.0, 1.0, 4.0, 0.0, -3.0], [-1.0, 2.0, -6.0, 2.0, -5.0], [-5.0, -7.0, 5.0, 4.0, 7.0], [3.0, 2.0, -2.0, -7.0, 0.0]]]])
+      arg1=numpy.array([[[[7.0, 1.0, -2.0, -6.0, -5.0], [0.0, 0.0, -6.0, -5.0, -5.0], [5.0, -4.0, 0.0, 7.0, -6.0], [-2.0, 7.0, 
+-1.0, 0.0, -1.0]], [[-4.0, -1.0, -5.0, 0.0, 0.0], [-2.0, 0.0, 1.0, 3.0, 2.0], [-3.0, -7.0, -1.0, 7.0, -1.0], [-7.0, 3.0, 5.0, 
+-5.0, 7.0]], [[4.0, 5.0, -1.0, -5.0, 0.0], [-4.0, 5.0, 0.0, 3.0, -1.0], [5.0, 0.0, 0.0, 3.0, 2.0], [-4.0, 3.0, 0.0, 2.0, 
+3.0]]], [[[-1.0, 3.0, -2.0, -4.0, 5.0], [-6.0, -3.0, 3.0, 4.0, -6.0], [2.0, 3.0, -6.0, -1.0, -6.0], [5.0, 5.0, -4.0, -5.0, 
+-6.0]], [[-2.0, -6.0, -7.0, -2.0, 5.0], [4.0, -4.0, -4.0, -5.0, -1.0], [-5.0, 0.0, -7.0, 2.0, 6.0], [0.0, 0.0, 0.0, -4.0, 
+-2.0]], [[2.0, -7.0, 0.0, -3.0, 4.0], [-7.0, -6.0, -6.0, -6.0, 4.0], [6.0, -5.0, 0.0, 2.0, 7.0], [-4.0, 4.0, 0.0, -5.0, 
+-7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[[-34.0, 76.0, 19.0, 31.0, -39.0], [-8.0, 37.0, 81.0, 93.0, -28.0], [-23.0, 7.0, 20.0, -4.0, -119.0], 
+[21.0, 2.0, 9.0, 7.0, 58.0]], [[44.0, -12.0, -76.0, -94.0, 29.0], [-21.0, -34.0, -61.0, -47.0, -71.0], [31.0, -18.0, -79.0, 
+69.0, -17.0], [-5.0, 87.0, -27.0, -52.0, -49.0]], [[-1.0, -11.0, -5.0, -23.0, 16.0], [-64.0, -42.0, -6.0, 1.0, -12.0], [35.0, 
+-34.0, -12.0, 23.0, -41.0], [-4.0, 55.0, -7.0, -54.0, -42.0]], [[63.0, 24.0, 62.0, 6.0, -70.0], [20.0, 35.0, -24.0, -30.0, 
+5.0], [50.0, 4.0, 70.0, -12.0, -19.0], [2.0, -12.0, -9.0, 70.0, 1.0]], [[53.0, 86.0, 11.0, -44.0, -52.0], [-33.0, 57.0, 15.0, 
+44.0, -47.0], [58.0, -6.0, 22.0, 39.0, -84.0], [-15.0, 51.0, -8.0, 30.0, 36.0]]], [[[-57.0, -34.0, -20.0, 43.0, 31.0], [37.0, 
+-1.0, 19.0, 10.0, 44.0], [-68.0, 6.0, -12.0, -19.0, 69.0], [-13.0, -55.0, 28.0, -6.0, 37.0]], [[8.0, -78.0, -49.0, -11.0, 
+-17.0], [44.0, -45.0, -77.0, -89.0, 8.0], [-25.0, -67.0, -14.0, 66.0, 19.0], [-41.0, 24.0, 25.0, -35.0, 0.0]], [[-25.0, -6.0, 
+-85.0, -14.0, -19.0], [60.0, 2.0, -11.0, -4.0, -39.0], [-72.0, -39.0, -49.0, 78.0, -47.0], [-27.0, 26.0, 30.0, -33.0, 68.0]], 
+[[-2.0, -42.0, -12.0, 12.0, 8.0], [28.0, 13.0, -31.0, -33.0, 57.0], [-17.0, -19.0, 14.0, 10.0, 106.0], [-53.0, -36.0, 31.0, 
+17.0, 35.0]], [[-99.0, 13.0, -3.0, 81.0, 5.0], [29.0, 18.0, 87.0, 84.0, 35.0], [-96.0, 4.0, 7.0, -26.0, -20.0], [1.0, -60.0, 
+42.0, -10.0, 83.0]]], [[[52.0, -9.0, -9.0, -4.0, -65.0], [111.0, 26.0, -58.0, -76.0, -27.0], [-24.0, 11.0, 12.0, 18.0, -2.0], 
+[10.0, -24.0, -4.0, 63.0, 22.0]], [[-44.0, 78.0, 9.0, 29.0, -28.0], [-5.0, 28.0, 89.0, 99.0, -44.0], [-35.0, 18.0, 1.0, -9.0, 
+-134.0], [39.0, 5.0, 1.0, -4.0, 48.0]], [[-8.0, -5.0, -5.0, -4.0, 5.0], [-65.0, 29.0, 1.0, 31.0, 74.0], [31.0, -70.0, 38.0, 
+50.0, 72.0], [-109.0, 14.0, 55.0, -14.0, 69.0]], [[-48.0, -48.0, 51.0, 85.0, -29.0], [-2.0, -13.0, 15.0, 1.0, 96.0], [-23.0, 
+-57.0, 80.0, -14.0, 27.0], [-45.0, -48.0, 53.0, -1.0, 40.0]], [[54.0, -69.0, 34.0, 3.0, -62.0], [1.0, -35.0, -89.0, -103.0, 
+45.0], [53.0, -84.0, 70.0, 44.0, 13.0], [-53.0, 24.0, 21.0, 4.0, -24.0]]], [[[1.0, 13.0, -19.0, -38.0, 7.0], [-81.0, -25.0, 
+4.0, 26.0, -22.0], [42.0, -51.0, -14.0, 52.0, -65.0], [-26.0, 78.0, 3.0, -61.0, -13.0]], [[11.0, 37.0, 44.0, -8.0, 43.0], 
+[-52.0, 17.0, 35.0, 40.0, 4.0], [46.0, 65.0, 2.0, -69.0, 38.0], [37.0, -19.0, -36.0, 25.0, -46.0]], [[68.0, 55.0, -10.0, -45.0, 
+-83.0], [-4.0, 74.0, -29.0, 5.0, -9.0], [51.0, -61.0, 47.0, 93.0, -34.0], [-87.0, 49.0, 33.0, 41.0, 92.0]], [[9.0, 80.0, 7.0, 
+-19.0, 12.0], [15.0, 27.0, 53.0, 53.0, -85.0], [-5.0, 98.0, -43.0, -55.0, -75.0], [97.0, -5.0, -58.0, 30.0, -31.0]], [[-33.0, 
+-8.0, -4.0, 8.0, 60.0], [-6.0, -24.0, 27.0, 17.0, -8.0], [-23.0, 53.0, -42.0, -54.0, 27.0], [51.0, -24.0, -26.0, -17.0, 
+-46.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank0_offset0(self):
+      arg0=numpy.array([[7.0, 6.0, 5.0, -5.0, 2.0], [-2.0, -7.0, 6.0, -4.0, 3.0], [-4.0, -2.0, -3.0, 0.0, 0.0], [-7.0, -6.0, 
+3.0, 5.0, 0.0]])
+      arg1=Data(1.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[7.0, 6.0, 5.0, -5.0, 2.0], [-2.0, -7.0, 6.0, -4.0, 3.0], [-4.0, -2.0, -3.0, 0.0, 0.0], [-7.0, 
+-6.0, 3.0, 5.0, 0.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[4.0, 0.0], [-7.0, 7.0]], [[-1.0, -6.0], [-3.0, -1.0]], [[1.0, -2.0], [6.0, -5.0]], [[0.0, 3.0], 
-[-5.0, 6.0]], [[-4.0, 1.0], [0.0, 6.0]], [[0.0, 4.0], [-4.0, 4.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-7.0)+(1-msk_arg1)*(-1.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-28.0, -0.0], [49.0, -49.0]], [[7.0, 42.0], [21.0, 7.0]], [[-7.0, 14.0], [-42.0, 35.0]], 
-[[-0.0, -21.0], [35.0, -42.0]], [[28.0, -7.0], [-0.0, -42.0]], [[-0.0, -28.0], [28.0, 
--28.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, -0.0], [7.0, -7.0]], [[1.0, 6.0], [3.0, 1.0]], [[-1.0, 2.0], [-6.0, 5.0]], [[-0.0, 
--3.0], [5.0, -6.0]], [[4.0, -1.0], [-0.0, -6.0]], [[-0.0, -4.0], [4.0, -4.0]]])
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank1_offset1(self):
+      arg0=numpy.array([[[-4.0, 7.0, 3.0, 3.0, 0.0], [5.0, 0.0, -1.0, 5.0, 5.0], [-3.0, 7.0, 5.0, -2.0, -2.0], [-3.0, 4.0, 5.0, 
+6.0, 1.0]], [[0.0, 2.0, -6.0, 1.0, 3.0], [3.0, -7.0, -7.0, -2.0, -6.0], [0.0, -6.0, -1.0, -1.0, 6.0], [-5.0, -4.0, 1.0, -6.0, 
+0.0]], [[5.0, -4.0, -6.0, -6.0, -5.0], [4.0, -6.0, -2.0, -1.0, 6.0], [3.0, -7.0, 1.0, 0.0, -4.0], [-6.0, -3.0, -1.0, -4.0, 
+0.0]]])
+      arg1=Data(numpy.array([-6.0, 7.0, 7.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[59.0, -56.0, -102.0, -53.0, -14.0], [19.0, -91.0, -57.0, -51.0, -30.0], [39.0, -133.0, -30.0, 5.0, 
+26.0], [-59.0, -73.0, -30.0, -106.0, -6.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[-1.0, -2.0, -4.0], [0.0, 6.0, 7.0]], [[0.0, 4.0, -1.0], [-5.0, 0.0, -7.0]]], [[[6.0, -6.0, 
--7.0], [-3.0, -6.0, 3.0]], [[-4.0, -2.0, 1.0], [-4.0, -6.0, 5.0]]], [[[4.0, 1.0, -1.0], [1.0, -1.0, 3.0]], [[4.0, 0.0, 4.0], 
-[2.0, -5.0, -6.0]]], [[[5.0, -1.0, 1.0], [3.0, 4.0, -6.0]], [[-7.0, 6.0, 0.0], [2.0, -1.0, 4.0]]], [[[2.0, 6.0, 5.0], [7.0, 
--5.0, 2.0]], [[-1.0, -5.0, 0.0], [-7.0, 3.0, 5.0]]], [[[1.0, 1.0, 6.0], [6.0, -3.0, 7.0]], [[-6.0, 2.0, 0.0], [7.0, 0.0, 
--5.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, -2.0, -3.0])+(1.-msk_arg1)*numpy.array([-3.0, -2.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[22.0, -33.0], [-5.0, 51.0]], [[-3.0, 21.0], [25.0, 21.0]], [[-23.0, -13.0], [-36.0, 16.0]], 
-[[-31.0, -8.0], [30.0, -22.0]], [[-39.0, -38.0], [16.0, 21.0]], [[-26.0, -51.0], [32.0, 
--27.0]]])+(1.-msk_ref)*numpy.array([[[7.0, -12.0], [-8.0, 15.0]], [[-6.0, 21.0], [16.0, 24.0]], [[-14.0, -1.0], [-12.0, 4.0]], 
-[[-13.0, -17.0], [9.0, -4.0]], [[-18.0, -11.0], [13.0, 15.0]], [[-5.0, -12.0], [14.0, -21.0]]])
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank2_offset2(self):
+      arg0=numpy.array([[[[3.0, -7.0, 7.0, -6.0, 1.0], [0.0, 4.0, 6.0, 0.0, -7.0], [-7.0, -1.0, 2.0, -7.0, 6.0], [-7.0, 1.0, 
+2.0, 0.0, -1.0]], [[2.0, 3.0, 2.0, -2.0, -3.0], [6.0, -1.0, 0.0, -6.0, 6.0], [-5.0, -1.0, -1.0, -3.0, -4.0], [-6.0, 1.0, -5.0, 
+-1.0, -5.0]], [[4.0, -4.0, -5.0, 3.0, 7.0], [2.0, -4.0, -1.0, -7.0, -4.0], [-5.0, 0.0, -3.0, -5.0, 0.0], [-4.0, 4.0, 6.0, 3.0, 
+0.0]]], [[[5.0, -4.0, 6.0, 4.0, 0.0], [-3.0, 1.0, -6.0, -3.0, -6.0], [-2.0, 7.0, 0.0, -6.0, 4.0], [4.0, -5.0, 0.0, 2.0, -1.0]], 
+[[0.0, -3.0, 6.0, -3.0, 1.0], [-4.0, 6.0, 1.0, 3.0, 1.0], [-4.0, 4.0, 6.0, 0.0, 2.0], [7.0, -5.0, -3.0, 0.0, 4.0]], [[4.0, 2.0, 
+6.0, -7.0, -1.0], [6.0, 0.0, 2.0, 4.0, 2.0], [-1.0, 0.0, 2.0, -1.0, 5.0], [-3.0, 0.0, -1.0, -3.0, 3.0]]]])
+      arg1=Data(numpy.array([[6.0, 0.0, 6.0], [-7.0, 4.0, 4.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[23.0, -42.0, 18.0, -86.0, 48.0], [41.0, 17.0, 84.0, 7.0, -12.0], [-78.0, -39.0, 26.0, -34.0, 
+36.0], [-78.0, 45.0, 32.0, -8.0, 29.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank3_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([[[0.0, -2.0], [-7.0, -4.0]], [[-3.0, 3.0], [-2.0, -3.0]], [[4.0, -3.0], [-5.0, -2.0]], [[1.0, 
-0.0], [0.0, -5.0]], [[3.0, 5.0], [6.0, 0.0]], [[6.0, -7.0], [2.0, 1.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, 2.0])+(1.-msk_arg1)*numpy.array([6.0, -1.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [-2.0, -4.0]], [[-7.0, -14.0], [-4.0, -8.0]]], [[[-3.0, -6.0], [3.0, 6.0]], 
-[[-2.0, -4.0], [-3.0, -6.0]]], [[[4.0, 8.0], [-3.0, -6.0]], [[-5.0, -10.0], [-2.0, -4.0]]], [[[1.0, 2.0], [0.0, 0.0]], [[0.0, 
-0.0], [-5.0, -10.0]]], [[[3.0, 6.0], [5.0, 10.0]], [[6.0, 12.0], [0.0, 0.0]]], [[[6.0, 12.0], [-7.0, -14.0]], [[2.0, 4.0], 
-[1.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [-12.0, 2.0]], [[-42.0, 7.0], [-24.0, 4.0]]], [[[-18.0, 3.0], [18.0, 
--3.0]], [[-12.0, 2.0], [-18.0, 3.0]]], [[[24.0, -4.0], [-18.0, 3.0]], [[-30.0, 5.0], [-12.0, 2.0]]], [[[6.0, -1.0], [0.0, 
-0.0]], [[0.0, 0.0], [-30.0, 5.0]]], [[[18.0, -3.0], [30.0, -5.0]], [[36.0, -6.0], [0.0, 0.0]]], [[[36.0, -6.0], [-42.0, 7.0]], 
-[[12.0, -2.0], [6.0, -1.0]]]])
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank1_offset0(self):
+      arg0=numpy.array([[0.0, 7.0, 2.0, 7.0, 5.0], [6.0, -5.0, -4.0, -1.0, 3.0], [0.0, 7.0, -2.0, 2.0, 6.0], [-1.0, -4.0, 4.0, 
+1.0, 7.0]])
+      arg1=Data(numpy.array([5.0, 5.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0], [35.0, 35.0], [10.0, 10.0], [35.0, 35.0], [25.0, 25.0]], [[30.0, 30.0], [-25.0, 
+-25.0], [-20.0, -20.0], [-5.0, -5.0], [15.0, 15.0]], [[0.0, 0.0], [35.0, 35.0], [-10.0, -10.0], [10.0, 10.0], [30.0, 30.0]], 
+[[-5.0, -5.0], [-20.0, -20.0], [20.0, 20.0], [5.0, 5.0], [35.0, 35.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[-2.0, 0.0, 1.0], [1.0, -4.0, 1.0]], [[-4.0, -6.0, -1.0], [5.0, 1.0, 0.0]]], [[[-5.0, 6.0, 
--4.0], [-6.0, 3.0, 5.0]], [[0.0, 4.0, 6.0], [-1.0, 2.0, -6.0]]], [[[6.0, 4.0, 2.0], [7.0, 1.0, -5.0]], [[6.0, -1.0, 5.0], 
-[-3.0, -7.0, 4.0]]], [[[1.0, 0.0, -7.0], [7.0, 0.0, -3.0]], [[-4.0, -7.0, -5.0], [-1.0, 4.0, -2.0]]], [[[7.0, 6.0, 5.0], [4.0, 
--2.0, -4.0]], [[5.0, 7.0, 6.0], [-5.0, 2.0, 0.0]]], [[[6.0, -7.0, -1.0], [-2.0, 0.0, -2.0]], [[6.0, 0.0, -7.0], [-5.0, -7.0, 
-0.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, -1.0], [-1.0, -7.0], [6.0, -3.0]])+(1.-msk_arg1)*numpy.array([[0.0, 5.0], [-1.0, 3.0], 
-[0.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[16.0, -1.0], [5.0, 24.0]], [[20.0, 49.0], [-26.0, -12.0]]], [[[-5.0, -25.0], [57.0, -30.0]], 
-[[32.0, -46.0], [-33.0, 5.0]]], [[[-22.0, -40.0], [-66.0, 1.0]], [[1.0, -14.0], [46.0, 40.0]]], [[[-47.0, 20.0], [-53.0, 2.0]], 
-[[-3.0, 68.0], [-11.0, -21.0]]], [[[-11.0, -64.0], [-42.0, 22.0]], [[4.0, -72.0], [23.0, -9.0]]], [[[-29.0, 46.0], [-2.0, 
-8.0]], [[-72.0, 15.0], [32.0, 54.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -10.0], [4.0, -7.0]], [[6.0, -38.0], [-1.0, 28.0]]], 
-[[[-6.0, -7.0], [-3.0, -21.0]], [[-4.0, 12.0], [-2.0, 1.0]]], [[[-4.0, 42.0], [-1.0, 38.0]], [[1.0, 27.0], [7.0, -36.0]]], 
-[[[0.0, 5.0], [0.0, 35.0]], [[7.0, -41.0], [-4.0, 7.0]]], [[[-6.0, 53.0], [2.0, 14.0]], [[-7.0, 46.0], [-2.0, -19.0]]], [[[7.0, 
-9.0], [0.0, -10.0]], [[0.0, 30.0], [7.0, -46.0]]]])
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank2_offset1(self):
+      arg0=numpy.array([[[-6.0, 3.0, -4.0, 0.0, 1.0], [2.0, -7.0, 1.0, -4.0, 0.0], [7.0, -1.0, -3.0, 3.0, 2.0], [4.0, 2.0, 0.0, 
+0.0, -4.0]], [[0.0, 3.0, 0.0, 5.0, -4.0], [-1.0, -4.0, -5.0, 3.0, -2.0], [0.0, 6.0, -6.0, 1.0, -7.0], [-1.0, 1.0, 3.0, 0.0, 
+-1.0]], [[-5.0, -4.0, 0.0, 3.0, 4.0], [5.0, -2.0, 0.0, -1.0, 3.0], [-6.0, 7.0, 7.0, -2.0, -1.0], [-5.0, 4.0, -3.0, -3.0, 
+-5.0]]])
+      arg1=Data(numpy.array([[0.0, 5.0], [0.0, 1.0], [4.0, 0.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-20.0, -30.0], [-16.0, 18.0], [0.0, -20.0], [12.0, 5.0], [16.0, 1.0]], [[20.0, 9.0], [-8.0, 
+-39.0], [0.0, 0.0], [-4.0, -17.0], [12.0, -2.0]], [[-24.0, 35.0], [28.0, 1.0], [28.0, -21.0], [-8.0, 16.0], [-4.0, 3.0]], 
+[[-20.0, 19.0], [16.0, 11.0], [-12.0, 3.0], [-12.0, 0.0], [-20.0, -21.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[-3.0, 4.0, 5.0, -5.0], [4.0, 1.0, -1.0, 2.0], [7.0, -3.0, 2.0, 3.0]], [[-7.0, 1.0, 5.0, 7.0], 
-[-7.0, 0.0, -4.0, 5.0], [-6.0, 6.0, -6.0, 5.0]]], [[[-2.0, -7.0, 0.0, -1.0], [-1.0, 0.0, -6.0, -1.0], [0.0, 2.0, 6.0, -5.0]], 
-[[6.0, -4.0, 0.0, 7.0], [3.0, 4.0, 2.0, -7.0], [5.0, -7.0, -6.0, -3.0]]], [[[-1.0, 3.0, -5.0, -2.0], [-7.0, -7.0, 0.0, -7.0], 
-[-7.0, 7.0, 6.0, 1.0]], [[7.0, -7.0, -5.0, -6.0], [-7.0, 7.0, 7.0, 0.0], [7.0, -5.0, -4.0, 3.0]]]]),self.functionspace)
-      arg1=-3.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[9.0, -12.0, -15.0, 15.0], [-12.0, -3.0, 3.0, -6.0], [-21.0, 9.0, -6.0, -9.0]], [[21.0, -3.0, 
--15.0, -21.0], [21.0, -0.0, 12.0, -15.0], [18.0, -18.0, 18.0, -15.0]]], [[[6.0, 21.0, -0.0, 3.0], [3.0, -0.0, 18.0, 3.0], 
-[-0.0, -6.0, -18.0, 15.0]], [[-18.0, 12.0, -0.0, -21.0], [-9.0, -12.0, -6.0, 21.0], [-15.0, 21.0, 18.0, 9.0]]], [[[3.0, -9.0, 
-15.0, 6.0], [21.0, 21.0, -0.0, 21.0], [21.0, -21.0, -18.0, -3.0]], [[-21.0, 21.0, 15.0, 18.0], [21.0, -21.0, -21.0, -0.0], 
-[-21.0, 15.0, 12.0, -9.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank3_offset2(self):
+      arg0=numpy.array([[[[0.0, 4.0, -6.0, 5.0, -4.0], [-6.0, -3.0, 2.0, -4.0, -3.0], [-3.0, -7.0, -3.0, 0.0, -6.0], [6.0, 
+-5.0, 1.0, -4.0, 1.0]], [[2.0, -5.0, -3.0, 5.0, 3.0], [1.0, -6.0, 0.0, 4.0, -6.0], [-2.0, 4.0, -6.0, -5.0, -4.0], [-2.0, 3.0, 
+5.0, 0.0, -3.0]], [[-7.0, -1.0, -1.0, -7.0, 2.0], [-2.0, 5.0, -3.0, 1.0, 7.0], [-3.0, -2.0, 2.0, -4.0, -7.0], [0.0, 3.0, -2.0, 
+4.0, 1.0]]], [[[-7.0, 7.0, 6.0, -3.0, 0.0], [2.0, -7.0, 1.0, -5.0, -5.0], [-2.0, 5.0, 1.0, 3.0, -2.0], [-4.0, 6.0, 4.0, -2.0, 
+-5.0]], [[-2.0, -7.0, 1.0, -1.0, 7.0], [2.0, -2.0, -4.0, -6.0, -6.0], [-1.0, 6.0, 3.0, 2.0, 7.0], [-7.0, -5.0, -7.0, -3.0, 
+-6.0]], [[-6.0, 5.0, -6.0, -7.0, 4.0], [-6.0, -4.0, 7.0, -3.0, 0.0], [7.0, 4.0, 7.0, 2.0, -4.0], [0.0, -1.0, 2.0, -6.0, 1.0]]]])
+      arg1=Data(numpy.array([[[-5.0, 1.0], [-2.0, 7.0], [6.0, 0.0]], [[-6.0, -6.0], [-4.0, -3.0], [3.0, 
+-1.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-14.0, 68.0], [-15.0, -57.0], [-28.0, -60.0], [-76.0, 68.0], [10.0, -8.0]], [[-22.0, -11.0], 
+[95.0, 7.0], [3.0, 1.0], [63.0, 75.0], [123.0, 3.0]], [[38.0, -9.0], [-27.0, -31.0], [42.0, -67.0], [-34.0, -61.0], [-32.0, 
+-39.0]], [[26.0, 37.0], [18.0, -4.0], [-17.0, 31.0], [50.0, 23.0], [64.0, 27.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[4.0, 0.0, -5.0, 6.0], [7.0, -1.0, -5.0, -5.0], [2.0, -1.0, -7.0, -3.0]], [[2.0, -3.0, 4.0, 
-6.0], [6.0, 2.0, 3.0, 6.0], [5.0, -1.0, 0.0, 0.0]]], [[[2.0, 7.0, 3.0, 2.0], [0.0, -1.0, -2.0, -3.0], [-7.0, 7.0, -3.0, -6.0]], 
-[[2.0, 2.0, 6.0, -6.0], [6.0, 4.0, -3.0, 0.0], [-4.0, -1.0, 2.0, 6.0]]], [[[7.0, 2.0, 3.0, -1.0], [0.0, -4.0, -7.0, -7.0], 
-[2.0, 1.0, -2.0, -6.0]], [[-7.0, -6.0, 0.0, 6.0], [4.0, -6.0, -4.0, 1.0], [5.0, 1.0, 7.0, 0.0]]]]),self.functionspace)
-      arg1=numpy.array(7.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[28.0, 0.0, -35.0, 42.0], [49.0, -7.0, -35.0, -35.0], [14.0, -7.0, -49.0, -21.0]], [[14.0, -21.0, 
-28.0, 42.0], [42.0, 14.0, 21.0, 42.0], [35.0, -7.0, 0.0, 0.0]]], [[[14.0, 49.0, 21.0, 14.0], [0.0, -7.0, -14.0, -21.0], [-49.0, 
-49.0, -21.0, -42.0]], [[14.0, 14.0, 42.0, -42.0], [42.0, 28.0, -21.0, 0.0], [-28.0, -7.0, 14.0, 42.0]]], [[[49.0, 14.0, 21.0, 
--7.0], [0.0, -28.0, -49.0, -49.0], [14.0, 7.0, -14.0, -42.0]], [[-49.0, -42.0, 0.0, 42.0], [28.0, -42.0, -28.0, 7.0], [35.0, 
-7.0, 49.0, 0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_constData_rank2_offset0(self):
+      arg0=numpy.array([[6.0, -7.0, -5.0, -3.0, -3.0], [7.0, -6.0, -7.0, 6.0, -7.0], [3.0, 5.0, 1.0, -5.0, -3.0], [-3.0, -1.0, 
+2.0, 2.0, -2.0]])
+      arg1=Data(numpy.array([[2.0, -1.0, -6.0, -7.0, 3.0], [-5.0, 7.0, -2.0, -2.0, 0.0], [-7.0, 7.0, 5.0, 3.0, 4.0], [-5.0, 
+4.0, -5.0, 2.0, 1.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[12.0, -6.0, -36.0, -42.0, 18.0], [-30.0, 42.0, -12.0, -12.0, 0.0], [-42.0, 42.0, 30.0, 18.0, 
+24.0], [-30.0, 24.0, -30.0, 12.0, 6.0]], [[-14.0, 7.0, 42.0, 49.0, -21.0], [35.0, -49.0, 14.0, 14.0, 0.0], [49.0, -49.0, -35.0, 
+-21.0, -28.0], [35.0, -28.0, 35.0, -14.0, -7.0]], [[-10.0, 5.0, 30.0, 35.0, -15.0], [25.0, -35.0, 10.0, 10.0, 0.0], [35.0, 
+-35.0, -25.0, -15.0, -20.0], [25.0, -20.0, 25.0, -10.0, -5.0]], [[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 0.0], 
+[21.0, -21.0, -15.0, -9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]], [[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 
+0.0], [21.0, -21.0, -15.0, -9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]]], [[[14.0, -7.0, -42.0, -49.0, 21.0], [-35.0, 49.0, 
+-14.0, -14.0, 0.0], [-49.0, 49.0, 35.0, 21.0, 28.0], [-35.0, 28.0, -35.0, 14.0, 7.0]], [[-12.0, 6.0, 36.0, 42.0, -18.0], [30.0, 
+-42.0, 12.0, 12.0, 0.0], [42.0, -42.0, -30.0, -18.0, -24.0], [30.0, -24.0, 30.0, -12.0, -6.0]], [[-14.0, 7.0, 42.0, 49.0, 
+-21.0], [35.0, -49.0, 14.0, 14.0, 0.0], [49.0, -49.0, -35.0, -21.0, -28.0], [35.0, -28.0, 35.0, -14.0, -7.0]], [[12.0, -6.0, 
+-36.0, -42.0, 18.0], [-30.0, 42.0, -12.0, -12.0, 0.0], [-42.0, 42.0, 30.0, 18.0, 24.0], [-30.0, 24.0, -30.0, 12.0, 6.0]], 
+[[-14.0, 7.0, 42.0, 49.0, -21.0], [35.0, -49.0, 14.0, 14.0, 0.0], [49.0, -49.0, -35.0, -21.0, -28.0], [35.0, -28.0, 35.0, 
+-14.0, -7.0]]], [[[6.0, -3.0, -18.0, -21.0, 9.0], [-15.0, 21.0, -6.0, -6.0, 0.0], [-21.0, 21.0, 15.0, 9.0, 12.0], [-15.0, 12.0, 
+-15.0, 6.0, 3.0]], [[10.0, -5.0, -30.0, -35.0, 15.0], [-25.0, 35.0, -10.0, -10.0, 0.0], [-35.0, 35.0, 25.0, 15.0, 20.0], 
+[-25.0, 20.0, -25.0, 10.0, 5.0]], [[2.0, -1.0, -6.0, -7.0, 3.0], [-5.0, 7.0, -2.0, -2.0, 0.0], [-7.0, 7.0, 5.0, 3.0, 4.0], 
+[-5.0, 4.0, -5.0, 2.0, 1.0]], [[-10.0, 5.0, 30.0, 35.0, -15.0], [25.0, -35.0, 10.0, 10.0, 0.0], [35.0, -35.0, -25.0, -15.0, 
+-20.0], [25.0, -20.0, 25.0, -10.0, -5.0]], [[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 0.0], [21.0, -21.0, -15.0, 
+-9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]]], [[[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 0.0], [21.0, -21.0, 
+-15.0, -9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]], [[-2.0, 1.0, 6.0, 7.0, -3.0], [5.0, -7.0, 2.0, 2.0, 0.0], [7.0, -7.0, 
+-5.0, -3.0, -4.0], [5.0, -4.0, 5.0, -2.0, -1.0]], [[4.0, -2.0, -12.0, -14.0, 6.0], [-10.0, 14.0, -4.0, -4.0, 0.0], [-14.0, 
+14.0, 10.0, 6.0, 8.0], [-10.0, 8.0, -10.0, 4.0, 2.0]], [[4.0, -2.0, -12.0, -14.0, 6.0], [-10.0, 14.0, -4.0, -4.0, 0.0], [-14.0, 
+14.0, 10.0, 6.0, 8.0], [-10.0, 8.0, -10.0, 4.0, 2.0]], [[-4.0, 2.0, 12.0, 14.0, -6.0], [10.0, -14.0, 4.0, 4.0, 0.0], [14.0, 
+-14.0, -10.0, -6.0, -8.0], [10.0, -8.0, 10.0, -4.0, -2.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[7.0, 2.0, 5.0, -3.0], [-6.0, -6.0, 1.0, -2.0], [-5.0, 4.0, 7.0, -1.0]], [[-1.0, -7.0, -2.0, 
--1.0], [4.0, 6.0, 0.0, 4.0], [7.0, 6.0, -7.0, -1.0]]], [[[-7.0, 7.0, 0.0, 7.0], [6.0, 0.0, -1.0, 0.0], [0.0, -3.0, -5.0, 
--6.0]], [[3.0, 1.0, 4.0, -6.0], [1.0, 2.0, -3.0, -4.0], [-3.0, 6.0, 2.0, -6.0]]], [[[4.0, 1.0, -7.0, -2.0], [-7.0, 2.0, 4.0, 
-3.0], [5.0, 6.0, 1.0, 1.0]], [[-5.0, -4.0, 5.0, 1.0], [6.0, -5.0, -6.0, 6.0], [6.0, -1.0, 7.0, -2.0]]]]),self.functionspace)
-      arg1=Data(-6.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-42.0, -12.0, -30.0, 18.0], [36.0, 36.0, -6.0, 12.0], [30.0, -24.0, -42.0, 6.0]], [[6.0, 42.0, 
-12.0, 6.0], [-24.0, -36.0, -0.0, -24.0], [-42.0, -36.0, 42.0, 6.0]]], [[[42.0, -42.0, -0.0, -42.0], [-36.0, -0.0, 6.0, -0.0], 
-[-0.0, 18.0, 30.0, 36.0]], [[-18.0, -6.0, -24.0, 36.0], [-6.0, -12.0, 18.0, 24.0], [18.0, -36.0, -12.0, 36.0]]], [[[-24.0, 
--6.0, 42.0, 12.0], [42.0, -12.0, -24.0, -18.0], [-30.0, -36.0, -6.0, -6.0]], [[30.0, 24.0, -30.0, -6.0], [-36.0, 30.0, 36.0, 
--36.0], [-36.0, 6.0, -42.0, 12.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank3_offset1(self):
+      arg0=numpy.array([[[6.0, -3.0, -7.0, 4.0, 5.0], [2.0, -7.0, -2.0, 5.0, 5.0], [-2.0, 6.0, -6.0, -6.0, -1.0], [-5.0, 0.0, 
+4.0, -7.0, -3.0]], [[4.0, 1.0, 2.0, -6.0, -4.0], [-7.0, 1.0, -1.0, -1.0, -7.0], [-6.0, 6.0, -3.0, -6.0, 6.0], [-1.0, 0.0, -5.0, 
+-5.0, 7.0]], [[-3.0, 4.0, -7.0, -7.0, 4.0], [3.0, -4.0, 4.0, -5.0, -1.0], [6.0, 5.0, 3.0, 0.0, -2.0], [-3.0, 7.0, 4.0, 3.0, 
+0.0]]])
+      arg1=Data(numpy.array([[[5.0, 4.0, 7.0, -3.0, 7.0], [4.0, -7.0, 1.0, 6.0, -3.0], [0.0, -4.0, -6.0, -7.0, -5.0], [-4.0, 
+-1.0, 2.0, 6.0, 6.0]], [[0.0, -4.0, 5.0, -1.0, 4.0], [-7.0, 0.0, -2.0, -6.0, 7.0], [-3.0, 1.0, 4.0, -3.0, 5.0], [0.0, -5.0, 
+5.0, 0.0, 4.0]], [[6.0, 5.0, -5.0, -2.0, 2.0], [-6.0, -2.0, 0.0, 7.0, -5.0], [-4.0, 1.0, -7.0, 4.0, -5.0], [-2.0, -2.0, 5.0, 
+3.0, 3.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[12.0, -7.0, 77.0, -16.0, 52.0], [14.0, -36.0, -2.0, -9.0, 25.0], [0.0, -23.0, 1.0, -66.0, 5.0], 
+[-18.0, -20.0, 17.0, 27.0, 43.0]], [[9.0, 4.0, -36.0, 0.0, -9.0], [-43.0, 13.0, -5.0, 4.0, -4.0], [-19.0, 17.0, -6.0, 34.0, 
+0.0], [4.0, -10.0, 19.0, -6.0, -2.0]], [[-77.0, -71.0, -4.0, 33.0, -55.0], [0.0, 63.0, -11.0, -103.0, 70.0], [22.0, 23.0, 99.0, 
+15.0, 80.0], [42.0, 11.0, -39.0, -63.0, -55.0]], [[-22.0, 5.0, 33.0, 8.0, -10.0], [100.0, -14.0, 16.0, 11.0, -19.0], [46.0, 
+-29.0, 1.0, -38.0, -15.0], [-2.0, 40.0, -57.0, 3.0, -21.0]], [[49.0, 56.0, -5.0, -19.0, 27.0], [24.0, -43.0, 13.0, 82.0, 
+-63.0], [-4.0, -20.0, -74.0, -7.0, -65.0], [-28.0, 7.0, 10.0, 42.0, 26.0]]], [[[28.0, 51.0, -36.0, -5.0, -8.0], [39.0, -20.0, 
+16.0, 75.0, -70.0], [9.0, -12.0, -61.0, 19.0, -60.0], [-14.0, 27.0, -16.0, 21.0, -7.0]], [[-59.0, -52.0, -24.0, 28.0, -53.0], 
+[-11.0, 57.0, -9.0, -76.0, 48.0], [13.0, 25.0, 74.0, 30.0, 60.0], [36.0, 10.0, -29.0, -54.0, -50.0]], [[14.0, 16.0, -39.0, 
+-1.0, -10.0], [-25.0, 6.0, 0.0, 22.0, -21.0], [-13.0, 11.0, -20.0, 33.0, -15.0], [0.0, -1.0, 11.0, 0.0, -4.0]], [[-5.0, -1.0, 
+55.0, -4.0, 21.0], [57.0, -25.0, 7.0, 1.0, 3.0], [23.0, -26.0, 1.0, -52.0, -5.0], [-10.0, 10.0, -20.0, 15.0, 11.0]], [[19.0, 
+43.0, 5.0, -6.0, 5.0], [75.0, -33.0, 19.0, 65.0, -59.0], [25.0, -28.0, -51.0, -18.0, -55.0], [-18.0, 32.0, -30.0, 27.0, 
+-1.0]]], [[[26.0, 46.0, -74.0, 0.0, -26.0], [-2.0, 2.0, 10.0, 66.0, -66.0], [-6.0, 8.0, -54.0, 56.0, -50.0], [-4.0, 20.0, -4.0, 
+6.0, -18.0]], [[60.0, 25.0, 47.0, -34.0, 76.0], [-48.0, -52.0, -6.0, 35.0, -1.0], [-38.0, -13.0, -47.0, -40.0, -25.0], [-34.0, 
+-46.0, 67.0, 51.0, 75.0]], [[-12.0, 3.0, -72.0, 15.0, -48.0], [-21.0, 36.0, 0.0, 3.0, -18.0], [-3.0, 24.0, 3.0, 63.0, 0.0], 
+[18.0, 15.0, -12.0, -27.0, -39.0]], [[-30.0, 0.0, -72.0, 24.0, -66.0], [18.0, 42.0, 6.0, 0.0, -24.0], [18.0, 18.0, 12.0, 60.0, 
+0.0], [24.0, 36.0, -42.0, -36.0, -60.0]], [[-17.0, -38.0, 33.0, 1.0, 13.0], [-34.0, 11.0, -13.0, -56.0, 55.0], [-10.0, 8.0, 
+44.0, -19.0, 45.0], [8.0, -25.0, 18.0, -12.0, 12.0]]], [[[-43.0, -31.0, -25.0, 22.0, -45.0], [5.0, 41.0, -3.0, -45.0, 23.0], 
+[15.0, 16.0, 47.0, 26.0, 35.0], [26.0, 16.0, -30.0, -39.0, -43.0]], [[42.0, 35.0, -35.0, -14.0, 14.0], [-42.0, -14.0, 0.0, 
+49.0, -35.0], [-28.0, 7.0, -49.0, 28.0, -35.0], [-14.0, -14.0, 35.0, 21.0, 21.0]], [[44.0, 56.0, -17.0, -15.0, 16.0], [27.0, 
+-36.0, 14.0, 82.0, -67.0], [-1.0, -17.0, -72.0, 3.0, -65.0], [-24.0, 13.0, 3.0, 36.0, 16.0]], [[-17.0, 7.0, -89.0, 20.0, 
+-63.0], [-11.0, 43.0, 3.0, 9.0, -29.0], [3.0, 26.0, 1.0, 76.0, -5.0], [22.0, 26.0, -24.0, -33.0, -53.0]], [[-15.0, -40.0, 14.0, 
+2.0, 7.0], [-61.0, 21.0, -17.0, -60.0, 58.0], [-21.0, 19.0, 46.0, 0.0, 50.0], [12.0, -32.0, 29.0, -18.0, 
+10.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_constData_rank4_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[-4.0, 7.0, -3.0, -5.0], [6.0, -3.0, -6.0, -2.0], [0.0, 0.0, -5.0, 4.0]], [[-1.0, 3.0, -5.0, 
-0.0], [3.0, 0.0, -5.0, -2.0], [-6.0, 1.0, 0.0, 1.0]]], [[[3.0, 5.0, -1.0, -2.0], [-6.0, -6.0, -3.0, -5.0], [-3.0, -2.0, -3.0, 
--5.0]], [[0.0, -1.0, -3.0, -7.0], [-2.0, 4.0, -7.0, 3.0], [-5.0, -6.0, 6.0, -5.0]]], [[[7.0, -2.0, -4.0, -3.0], [-2.0, 3.0, 
-1.0, 7.0], [-5.0, -1.0, 5.0, -6.0]], [[-5.0, 2.0, 5.0, 3.0], [0.0, 7.0, 5.0, -5.0], [-6.0, -5.0, -5.0, 
--3.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-7.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[12.0, -21.0, 9.0, 15.0], [-18.0, 9.0, 18.0, 6.0], [-0.0, -0.0, 15.0, -12.0]], [[3.0, -9.0, 
-15.0, -0.0], [-9.0, -0.0, 15.0, 6.0], [18.0, -3.0, -0.0, -3.0]]], [[[-9.0, -15.0, 3.0, 6.0], [18.0, 18.0, 9.0, 15.0], [9.0, 
-6.0, 9.0, 15.0]], [[-0.0, 3.0, 9.0, 21.0], [6.0, -12.0, 21.0, -9.0], [15.0, 18.0, -18.0, 15.0]]], [[[-21.0, 6.0, 12.0, 9.0], 
-[6.0, -9.0, -3.0, -21.0], [15.0, 3.0, -15.0, 18.0]], [[15.0, -6.0, -15.0, -9.0], [-0.0, -21.0, -15.0, 15.0], [18.0, 15.0, 15.0, 
-9.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, -49.0, 21.0, 35.0], [-42.0, 21.0, 42.0, 14.0], [-0.0, -0.0, 35.0, -28.0]], [[7.0, 
--21.0, 35.0, -0.0], [-21.0, -0.0, 35.0, 14.0], [42.0, -7.0, -0.0, -7.0]]], [[[-21.0, -35.0, 7.0, 14.0], [42.0, 42.0, 21.0, 
-35.0], [21.0, 14.0, 21.0, 35.0]], [[-0.0, 7.0, 21.0, 49.0], [14.0, -28.0, 49.0, -21.0], [35.0, 42.0, -42.0, 35.0]]], [[[-49.0, 
-14.0, 28.0, 21.0], [14.0, -21.0, -7.0, -49.0], [35.0, 7.0, -35.0, 42.0]], [[35.0, -14.0, -35.0, -21.0], [-0.0, -49.0, -35.0, 
-35.0], [42.0, 35.0, 35.0, 21.0]]]])
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(-3.0)
-      arg1=5.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-30.0)+(1.-msk_ref)*numpy.array(-15.0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-3.0)+(1-msk_arg0)*(4.0)
-      arg1=numpy.array(-5.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(15.0)+(1.-msk_ref)*numpy.array(-20.0)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank4_offset2(self):
+      arg0=numpy.array([[[[5.0, -6.0, -4.0, 6.0, 2.0], [4.0, -3.0, -3.0, 1.0, 3.0], [2.0, 7.0, 3.0, 7.0, 3.0], [6.0, 7.0, -1.0, 
+-2.0, 0.0]], [[-5.0, 4.0, -2.0, 3.0, 2.0], [5.0, -1.0, -4.0, 2.0, -1.0], [6.0, -2.0, 4.0, -5.0, 5.0], [0.0, 7.0, -4.0, 4.0, 
+0.0]], [[0.0, -5.0, 0.0, 1.0, 7.0], [1.0, 0.0, 6.0, -2.0, -2.0], [2.0, 0.0, 0.0, 7.0, 4.0], [-5.0, 3.0, 3.0, 5.0, 5.0]]], 
+[[[5.0, 5.0, -5.0, -7.0, -2.0], [-3.0, -7.0, -1.0, -1.0, -1.0], [0.0, -2.0, 5.0, 6.0, -3.0], [6.0, -6.0, -3.0, 1.0, 1.0]], 
+[[1.0, 4.0, -6.0, 4.0, 6.0], [2.0, 1.0, 5.0, -6.0, 2.0], [-4.0, -3.0, -4.0, -3.0, -7.0], [-7.0, 0.0, 1.0, 3.0, 7.0]], [[0.0, 
+2.0, 7.0, 2.0, -5.0], [-6.0, -2.0, 6.0, 0.0, 0.0], [-1.0, 0.0, -6.0, 4.0, 4.0], [0.0, -3.0, 6.0, 2.0, -2.0]]]])
+      arg1=Data(numpy.array([[[[0.0, -6.0, 6.0, 4.0, -3.0], [3.0, 2.0, 4.0, 5.0, -5.0], [5.0, -4.0, -4.0, 0.0, -5.0], [3.0, 
+0.0, 0.0, -1.0, -2.0]], [[3.0, -4.0, 0.0, 7.0, 0.0], [0.0, 2.0, 4.0, 0.0, 4.0], [-6.0, 0.0, -3.0, 1.0, 3.0], [0.0, 1.0, 0.0, 
+6.0, 3.0]], [[-7.0, -3.0, -1.0, 5.0, 0.0], [0.0, -1.0, -4.0, 0.0, -6.0], [1.0, -4.0, -1.0, -4.0, 7.0], [-2.0, -3.0, 5.0, 0.0, 
+5.0]]], [[[0.0, 2.0, -2.0, -6.0, 6.0], [-2.0, 0.0, 1.0, 6.0, -6.0], [3.0, 0.0, 0.0, 5.0, 6.0], [2.0, 1.0, 3.0, -7.0, 3.0]], 
+[[7.0, 4.0, -1.0, 4.0, 0.0], [-1.0, 1.0, -4.0, 0.0, 5.0], [6.0, -4.0, 5.0, 1.0, 5.0], [0.0, 0.0, 6.0, 4.0, 1.0]], [[0.0, 4.0, 
+-1.0, 3.0, -7.0], [4.0, -5.0, 7.0, 7.0, 1.0], [0.0, -4.0, 0.0, -2.0, 3.0], [-5.0, -6.0, 5.0, 5.0, -3.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-8.0, 4.0, 19.0, -41.0, 15.0], [4.0, 1.0, 1.0, 55.0, -70.0], [76.0, -24.0, 0.0, 21.0, -5.0], 
+[25.0, 0.0, 21.0, -66.0, -9.0]], [[75.0, 69.0, -47.0, -29.0, 34.0], [-24.0, -5.0, 15.0, 14.0, 68.0], [-20.0, 20.0, 37.0, 49.0, 
+63.0], [-8.0, 12.0, 24.0, 21.0, 12.0]], [[-48.0, 26.0, -15.0, -3.0, -67.0], [32.0, -53.0, 44.0, -1.0, 19.0], [-59.0, 12.0, 
+-8.0, -47.0, -25.0], [-57.0, -49.0, -16.0, 38.0, -40.0]], [[30.0, -41.0, 43.0, 114.0, -74.0], [36.0, 11.0, 23.0, 2.0, 40.0], 
+[16.0, -52.0, -14.0, -36.0, -30.0], [-8.0, -19.0, 18.0, 87.0, -21.0]], [[-1.0, -41.0, 8.0, 78.0, 17.0], [-16.0, 32.0, -73.0, 
+-37.0, -7.0], [35.0, -40.0, 9.0, -20.0, 48.0], [13.0, 9.0, 40.0, 23.0, 52.0]]], [[[22.0, -69.0, 33.0, 64.0, 12.0], [-8.0, 49.0, 
+-21.0, -40.0, 16.0], [-6.0, -4.0, -22.0, 0.0, -24.0], [34.0, 35.0, -22.0, 25.0, 23.0]], [[4.0, 4.0, -3.0, 21.0, -19.0], [-4.0, 
+3.0, -41.0, -71.0, 56.0], [-24.0, 16.0, 20.0, -31.0, -31.0], [-13.0, 4.0, -25.0, 40.0, -11.0]], [[-19.0, 58.0, -33.0, 34.0, 
+-39.0], [12.0, -45.0, -31.0, 21.0, 0.0], [42.0, -56.0, 43.0, -40.0, 82.0], [-53.0, -59.0, 87.0, 36.0, 8.0]], [[-22.0, -34.0, 
+16.0, -10.0, -9.0], [11.0, 2.0, 43.0, -1.0, -9.0], [-48.0, 28.0, -38.0, -1.0, -49.0], [5.0, 7.0, -49.0, -6.0, -15.0]], [[25.0, 
+-2.0, 20.0, 9.0, -15.0], [9.0, 8.0, 7.0, 9.0, 9.0], [28.0, -12.0, 3.0, 4.0, -28.0], [11.0, 4.0, -1.0, 6.0, -20.0]]], [[[-24.0, 
+-62.0, 15.0, 41.0, 1.0], [6.0, 15.0, 33.0, 3.0, -19.0], [-48.0, 4.0, -48.0, -4.0, -1.0], [7.0, 6.0, -19.0, 13.0, 23.0]], 
+[[-27.0, -50.0, 49.0, 14.0, -33.0], [28.0, 7.0, 30.0, 23.0, -46.0], [23.0, -16.0, -37.0, -15.0, -68.0], [17.0, -4.0, -24.0, 
+-17.0, -29.0]], [[-16.0, -64.0, 18.0, -24.0, 63.0], [-21.0, 40.0, 7.0, 3.0, -55.0], [-18.0, 28.0, -44.0, 37.0, -11.0], [49.0, 
+45.0, -39.0, -60.0, 35.0]], [[-85.0, -27.0, 22.0, -8.0, -13.0], [28.0, -26.0, 26.0, 99.0, -144.0], [72.0, -60.0, -35.0, -14.0, 
+32.0], [-1.0, -44.0, 55.0, -71.0, 9.0]], [[-62.0, -68.0, 23.0, 69.0, -55.0], [38.0, -15.0, 69.0, 25.0, -32.0], [-62.0, -16.0, 
+-66.0, -41.0, -13.0], [-25.0, -34.0, -11.0, 40.0, 1.0]]], [[[-14.0, -37.0, 36.0, -65.0, 18.0], [13.0, 10.0, 78.0, 66.0, -71.0], 
+[1.0, 24.0, -54.0, 43.0, -64.0], [40.0, 21.0, -49.0, -76.0, -26.0]], [[0.0, -103.0, 54.0, 119.0, -36.0], [21.0, 40.0, 17.0, 
+-22.0, 8.0], [-22.0, -28.0, -52.0, -29.0, -38.0], [18.0, 10.0, -18.0, 62.0, 13.0]], [[-26.0, 35.0, -10.0, 23.0, -57.0], [26.0, 
+-42.0, 3.0, 19.0, 0.0], [19.0, -36.0, 18.0, -42.0, 19.0], [-45.0, -52.0, 42.0, 32.0, -21.0]], [[-2.0, 3.0, -24.0, 57.0, -2.0], 
+[-3.0, -8.0, -9.0, 10.0, 7.0], [-8.0, -32.0, 6.0, -12.0, 84.0], [-24.0, -22.0, 56.0, 41.0, 41.0]], [[14.0, 7.0, -12.0, 41.0, 
+20.0], [-17.0, 12.0, -61.0, -8.0, -3.0], [50.0, -40.0, 30.0, -4.0, 70.0], [2.0, -2.0, 60.0, 11.0, 41.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-3.0, -2.0, -6.0])+(1.-msk_arg0)*numpy.array([0.0, 2.0, 3.0])
-      arg1=numpy.array([-4.0, -6.0, -1.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[7.0, -2.0, 1.0, -3.0, 1.0], [-2.0, 0.0, 1.0, 4.0, 2.0], [1.0, -4.0, -5.0, -5.0, 5.0], [5.0, -6.0, 6.0, 
+-2.0, -7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(30.0)+(1.-msk_ref)*numpy.array(-15.0)
+      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, -0.0, 0.0], [0.0, 
+-0.0, 0.0, -0.0, -0.0]])+(1.-msk_ref)*numpy.array([[-28.0, 8.0, -4.0, 12.0, -4.0], [8.0, -0.0, -4.0, -16.0, -8.0], [-4.0, 16.0, 
+20.0, 20.0, -20.0], [-20.0, 24.0, -24.0, 8.0, 28.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, -7.0, 0.0], [3.0, -4.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -4.0, -7.0], [-1.0, 
--6.0, 5.0]])
-      arg1=numpy.array([[0.0, -7.0, 6.0], [-5.0, 7.0, -6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[[6.0, -5.0, -5.0, 2.0, -1.0], [1.0, 0.0, 7.0, -1.0, -4.0], [7.0, 6.0, -7.0, -2.0, 7.0], [2.0, -5.0, 
+1.0, -1.0, 2.0]], [[0.0, 2.0, -6.0, 0.0, -2.0], [-6.0, 3.0, 3.0, 3.0, -1.0], [-2.0, 4.0, 4.0, 7.0, 0.0], [-3.0, 7.0, 1.0, 7.0, 
+0.0]], [[1.0, -2.0, 5.0, 4.0, -3.0], [7.0, -4.0, 5.0, 5.0, -4.0], [0.0, 7.0, 6.0, -4.0, 4.0], [-2.0, 0.0, -3.0, 3.0, -7.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-5.0, -3.0, 2.0])+(1.-msk_arg1)*numpy.array([2.0, 1.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(42.0)+(1.-msk_ref)*numpy.array(-81.0)
+      ref=msk_ref*numpy.array([[-28.0, 15.0, 53.0, -2.0, 5.0], [27.0, -17.0, -34.0, 6.0, 15.0], [-29.0, -28.0, 35.0, -19.0, 
+-27.0], [-5.0, 4.0, -14.0, -10.0, -24.0]])+(1.-msk_ref)*numpy.array([[12.0, -8.0, -16.0, 4.0, -4.0], [-4.0, 3.0, 17.0, 1.0, 
+-9.0], [12.0, 16.0, -10.0, 3.0, 14.0], [1.0, -3.0, 3.0, 5.0, 4.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-3.0, -5.0, 5.0], [0.0, -3.0, -3.0], [-6.0, -3.0, -3.0], [-2.0, -6.0, 2.0]], [[7.0, -4.0, 
--7.0], [6.0, 0.0, 0.0], [-3.0, 4.0, -3.0], [-4.0, -2.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -2.0, 2.0], [0.0, 7.0, 
--3.0], [-7.0, 1.0, -2.0], [0.0, 4.0, 5.0]], [[-5.0, -3.0, 0.0], [-4.0, 5.0, 3.0], [-1.0, -7.0, 3.0], [6.0, 0.0, 7.0]]])
-      arg1=numpy.array([[[4.0, 4.0, 0.0], [5.0, -7.0, -6.0], [3.0, -7.0, -4.0], [7.0, 3.0, 0.0]], [[-5.0, 6.0, -6.0], [-5.0, 
-2.0, 5.0], [5.0, 5.0, -1.0], [1.0, -4.0, 5.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[[[-2.0, 3.0, 7.0, -4.0, -2.0], [0.0, -2.0, 0.0, -4.0, 0.0], [3.0, 0.0, -1.0, 6.0, -1.0], [6.0, 1.0, 
+7.0, 7.0, -1.0]], [[-1.0, 4.0, -6.0, 5.0, 7.0], [4.0, 0.0, -5.0, -4.0, -5.0], [6.0, 6.0, -1.0, 1.0, 2.0], [-7.0, 5.0, -6.0, 
+7.0, -7.0]], [[7.0, 0.0, 4.0, 6.0, 0.0], [-1.0, -3.0, 5.0, 7.0, 6.0], [1.0, -3.0, 6.0, 5.0, 0.0], [-2.0, -4.0, 0.0, 7.0, 
+0.0]]], [[[1.0, 4.0, 0.0, 5.0, 5.0], [0.0, 6.0, 3.0, 5.0, -6.0], [-7.0, -4.0, -5.0, 0.0, 1.0], [5.0, -7.0, -4.0, 1.0, 1.0]], 
+[[3.0, 1.0, -5.0, -7.0, -6.0], [4.0, -2.0, 0.0, -3.0, 3.0], [-5.0, 0.0, 1.0, 0.0, 2.0], [-2.0, -7.0, -2.0, 0.0, 3.0]], [[-5.0, 
+3.0, 0.0, -1.0, 4.0], [4.0, 3.0, 3.0, -5.0, 0.0], [6.0, 5.0, 2.0, 0.0, 0.0], [-7.0, 1.0, -1.0, 2.0, -4.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, -1.0, 7.0], [1.0, -6.0, -7.0]])+(1.-msk_arg1)*numpy.array([[0.0, -5.0, 0.0], [-3.0, 0.0, 
+0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-10.0)+(1.-msk_ref)*numpy.array(-13.0)
+      ref=msk_ref*numpy.array([[66.0, -24.0, 71.0, 87.0, 4.0], [-63.0, -26.0, 22.0, 107.0, 23.0], [-15.0, -66.0, 17.0, 40.0, 
+-14.0], [65.0, -4.0, 28.0, 36.0, 17.0]])+(1.-msk_ref)*numpy.array([[2.0, -32.0, 30.0, -40.0, -50.0], [-20.0, -18.0, 16.0, 5.0, 
+43.0], [-9.0, -18.0, 20.0, -5.0, -13.0], [20.0, -4.0, 42.0, -38.0, 32.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, -5.0], [-1.0, 0.0], [-4.0, -2.0]], [[5.0, 0.0], [3.0, 3.0], [-3.0, 0.0]]], [[[7.0, 
--6.0], [-5.0, 4.0], [-3.0, -2.0]], [[-6.0, -3.0], [5.0, -5.0], [0.0, 4.0]]], [[[1.0, -6.0], [6.0, -5.0], [-1.0, -5.0]], [[-5.0, 
--5.0], [0.0, 2.0], [-4.0, -5.0]]], [[[3.0, 0.0], [4.0, -4.0], [6.0, 4.0]], [[3.0, -2.0], [0.0, 0.0], [-1.0, 
--3.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -2.0], [6.0, -1.0], [5.0, -7.0]], [[3.0, 3.0], [7.0, -5.0], [-2.0, -3.0]]], 
-[[[0.0, -5.0], [5.0, 1.0], [-1.0, 5.0]], [[2.0, 0.0], [-3.0, 1.0], [-1.0, 5.0]]], [[[-2.0, 1.0], [-5.0, 5.0], [1.0, -7.0]], 
-[[0.0, 0.0], [2.0, -1.0], [-5.0, 2.0]]], [[[-1.0, 0.0], [0.0, 0.0], [5.0, -4.0]], [[2.0, 6.0], [1.0, -5.0], [0.0, 6.0]]]])
-      arg1=numpy.array([[[[0.0, 3.0], [-2.0, -2.0], [1.0, 1.0]], [[0.0, -1.0], [-2.0, 4.0], [-2.0, -3.0]]], [[[-7.0, -2.0], 
-[-2.0, -3.0], [3.0, 7.0]], [[1.0, 7.0], [5.0, -5.0], [0.0, 2.0]]], [[[1.0, -3.0], [4.0, 3.0], [2.0, -5.0]], [[7.0, -4.0], [6.0, 
-4.0], [-1.0, -2.0]]], [[[3.0, 3.0], [7.0, -2.0], [-7.0, 6.0]], [[6.0, -7.0], [-5.0, -7.0], [-4.0, -4.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank1_offset0(self):
+      arg0=numpy.array([[-4.0, -3.0, 5.0, 0.0, 7.0], [-5.0, 5.0, 0.0, 2.0, -6.0], [-7.0, 7.0, -6.0, -4.0, -4.0], [-3.0, 0.0, 
+0.0, 5.0, 2.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([6.0, -2.0])+(1.-msk_arg1)*numpy.array([-3.0, 3.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(95.0)+(1.-msk_ref)*numpy.array(-71.0)
+      ref=msk_ref*numpy.array([[[-24.0, 8.0], [-18.0, 6.0], [30.0, -10.0], [0.0, 0.0], [42.0, -14.0]], [[-30.0, 10.0], [30.0, 
+-10.0], [0.0, 0.0], [12.0, -4.0], [-36.0, 12.0]], [[-42.0, 14.0], [42.0, -14.0], [-36.0, 12.0], [-24.0, 8.0], [-24.0, 8.0]], 
+[[-18.0, 6.0], [0.0, 0.0], [0.0, 0.0], [30.0, -10.0], [12.0, -4.0]]])+(1.-msk_ref)*numpy.array([[[12.0, -12.0], [9.0, -9.0], 
+[-15.0, 15.0], [0.0, 0.0], [-21.0, 21.0]], [[15.0, -15.0], [-15.0, 15.0], [0.0, 0.0], [-6.0, 6.0], [18.0, -18.0]], [[21.0, 
+-21.0], [-21.0, 21.0], [18.0, -18.0], [12.0, -12.0], [12.0, -12.0]], [[9.0, -9.0], [0.0, 0.0], [0.0, 0.0], [-15.0, 15.0], 
+[-6.0, 6.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-2.0)+(1-msk_arg0)*(-4.0)
-      arg1=numpy.array([-1.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[[-3.0, -7.0, 6.0, -7.0, 6.0], [6.0, -7.0, 7.0, 3.0, 0.0], [-4.0, 0.0, -7.0, -6.0, -5.0], [0.0, 5.0, 
+-6.0, -3.0, 0.0]], [[6.0, 0.0, -6.0, 6.0, -6.0], [-2.0, -3.0, -5.0, -3.0, 0.0], [-5.0, -3.0, -6.0, 6.0, 6.0], [2.0, -6.0, 0.0, 
+1.0, 0.0]], [[0.0, -2.0, 5.0, -5.0, 6.0], [3.0, 5.0, -5.0, 0.0, -3.0], [7.0, 6.0, -5.0, 5.0, -5.0], [4.0, -6.0, -1.0, 3.0, 
+-6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, -6.0], [-3.0, -7.0], [4.0, -7.0]])+(1.-msk_arg1)*numpy.array([[7.0, 1.0], [5.0, 0.0], 
+[0.0, 1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([2.0, -0.0])+(1.-msk_ref)*numpy.array([4.0, -0.0])
+      ref=msk_ref*numpy.array([[[-3.0, -24.0], [27.0, 56.0], [8.0, -29.0], [-3.0, 35.0], [12.0, -36.0]], [[-12.0, -43.0], 
+[64.0, 28.0], [-40.0, 28.0], [-6.0, 3.0], [-12.0, 21.0]], [[63.0, 10.0], [33.0, -21.0], [33.0, 119.0], [32.0, -41.0], [-13.0, 
+23.0]], [[10.0, -42.0], [-31.0, 54.0], [26.0, 43.0], [24.0, -10.0], [-24.0, 42.0]]])+(1.-msk_ref)*numpy.array([[[9.0, -3.0], 
+[-49.0, -9.0], [12.0, 11.0], [-19.0, -12.0], [12.0, 12.0]], [[32.0, 9.0], [-64.0, -2.0], [24.0, 2.0], [6.0, 3.0], [0.0, -3.0]], 
+[[-53.0, 3.0], [-15.0, 6.0], [-79.0, -12.0], [-12.0, -1.0], [-5.0, -10.0]], [[10.0, 4.0], [5.0, -1.0], [-42.0, -7.0], [-16.0, 
+0.0], [0.0, -6.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([3.0, 5.0, 2.0])+(1.-msk_arg0)*numpy.array([5.0, 2.0, -2.0])
-      arg1=numpy.array([[-5.0, -2.0], [6.0, -7.0], [-2.0, 5.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[[[-3.0, -3.0, 4.0, -6.0, 3.0], [1.0, 3.0, -1.0, 2.0, -5.0], [-2.0, -7.0, 7.0, -1.0, -6.0], [5.0, 6.0, 
+-2.0, 6.0, -2.0]], [[4.0, 3.0, 2.0, -6.0, -3.0], [-2.0, -5.0, -1.0, 2.0, 0.0], [4.0, -2.0, 0.0, 3.0, -7.0], [6.0, 1.0, -2.0, 
+0.0, 6.0]], [[4.0, 6.0, -4.0, -4.0, -5.0], [-5.0, -6.0, 7.0, -7.0, 6.0], [-4.0, 1.0, -7.0, 4.0, -3.0], [6.0, 0.0, 1.0, 3.0, 
+-4.0]]], [[[-2.0, -6.0, 1.0, -7.0, 7.0], [1.0, -4.0, -5.0, 6.0, -5.0], [0.0, -5.0, -4.0, -6.0, 1.0], [-6.0, 7.0, 7.0, 2.0, 
+2.0]], [[1.0, -1.0, -5.0, -6.0, 1.0], [-2.0, 6.0, -4.0, 0.0, 5.0], [5.0, -1.0, 5.0, -1.0, -1.0], [-7.0, -5.0, -4.0, -5.0, 
+2.0]], [[-6.0, 7.0, -7.0, -7.0, -5.0], [2.0, 3.0, 0.0, -3.0, 7.0], [-4.0, 3.0, -7.0, -3.0, -1.0], [0.0, -4.0, 5.0, -4.0, 
+-2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[5.0, -3.0], [2.0, -1.0], [2.0, -7.0]], [[-2.0, 2.0], [7.0, -4.0], [-7.0, 
+3.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 2.0], [0.0, -1.0], [0.0, -5.0]], [[1.0, -6.0], [3.0, -3.0], [3.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([11.0, -31.0])+(1.-msk_ref)*numpy.array([-9.0, -34.0])
+      ref=msk_ref*numpy.array([[[54.0, -49.0], [-41.0, -23.0], [28.0, 15.0], [-29.0, 41.0], [27.0, 24.0]], [[-39.0, 50.0], 
+[22.0, 15.0], [-11.0, -39.0], [9.0, 44.0], [-17.0, -36.0]], [[53.0, -2.0], [-55.0, 19.0], [113.0, -21.0], [35.0, -45.0], 
+[-52.0, 49.0]], [[12.0, -47.0], [11.0, 3.0], [-89.0, 46.0], [25.0, -27.0], [18.0, 18.0]]])+(1.-msk_ref)*numpy.array([[[-8.0, 
+-21.0], [21.0, 0.0], [-47.0, 35.0], [-28.0, 74.0], [-14.0, -11.0]], [[-2.0, 29.0], [14.0, 47.0], [-14.0, 6.0], [-9.0, 1.0], 
+[46.0, -25.0]], [[9.0, -3.0], [22.0, 16.0], [-31.0, 58.0], [-15.0, 14.0], [13.0, 7.0]], [[-42.0, 31.0], [-38.0, -16.0], [16.0, 
+-37.0], [-43.0, 0.0], [8.0, -8.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, 5.0, -2.0], [-4.0, 2.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-7.0, -5.0, 2.0], [-2.0, 2.0, 
-2.0]])
-      arg1=numpy.array([[[2.0, 7.0], [1.0, -1.0], [-6.0, -4.0]], [[-1.0, 0.0], [-6.0, 6.0], [7.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank2_offset0(self):
+      arg0=numpy.array([[4.0, 0.0, 0.0, 3.0, 6.0], [-1.0, 3.0, 3.0, 5.0, 2.0], [5.0, 7.0, 6.0, -6.0, 0.0], [-7.0, 4.0, -5.0, 
+-6.0, 1.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, -6.0, 0.0, 1.0, 2.0], [5.0, 7.0, 3.0, -4.0, 2.0], [0.0, -7.0, 4.0, -1.0, -7.0], [5.0, 
+4.0, 5.0, -6.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 0.0, -5.0, -6.0, 5.0], [-4.0, 4.0, 0.0, 0.0, 2.0], [2.0, -6.0, 2.0, 
+7.0, -2.0], [7.0, -2.0, 0.0, -3.0, 1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([15.0, 36.0])+(1.-msk_ref)*numpy.array([-27.0, -40.0])
+      ref=msk_ref*numpy.array([[[[-20.0, -24.0, 0.0, 4.0, 8.0], [20.0, 28.0, 12.0, -16.0, 8.0], [0.0, -28.0, 16.0, -4.0, 
+-28.0], [20.0, 16.0, 20.0, -24.0, -16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[-15.0, -18.0, 0.0, 3.0, 6.0], [15.0, 21.0, 9.0, -12.0, 6.0], [0.0, -21.0, 12.0, -3.0, -21.0], [15.0, 12.0, 15.0, 
+-18.0, -12.0]], [[-30.0, -36.0, 0.0, 6.0, 12.0], [30.0, 42.0, 18.0, -24.0, 12.0], [0.0, -42.0, 24.0, -6.0, -42.0], [30.0, 24.0, 
+30.0, -36.0, -24.0]]], [[[5.0, 6.0, 0.0, -1.0, -2.0], [-5.0, -7.0, -3.0, 4.0, -2.0], [0.0, 7.0, -4.0, 1.0, 7.0], [-5.0, -4.0, 
+-5.0, 6.0, 4.0]], [[-15.0, -18.0, 0.0, 3.0, 6.0], [15.0, 21.0, 9.0, -12.0, 6.0], [0.0, -21.0, 12.0, -3.0, -21.0], [15.0, 12.0, 
+15.0, -18.0, -12.0]], [[-15.0, -18.0, 0.0, 3.0, 6.0], [15.0, 21.0, 9.0, -12.0, 6.0], [0.0, -21.0, 12.0, -3.0, -21.0], [15.0, 
+12.0, 15.0, -18.0, -12.0]], [[-25.0, -30.0, 0.0, 5.0, 10.0], [25.0, 35.0, 15.0, -20.0, 10.0], [0.0, -35.0, 20.0, -5.0, -35.0], 
+[25.0, 20.0, 25.0, -30.0, -20.0]], [[-10.0, -12.0, 0.0, 2.0, 4.0], [10.0, 14.0, 6.0, -8.0, 4.0], [0.0, -14.0, 8.0, -2.0, 
+-14.0], [10.0, 8.0, 10.0, -12.0, -8.0]]], [[[-25.0, -30.0, 0.0, 5.0, 10.0], [25.0, 35.0, 15.0, -20.0, 10.0], [0.0, -35.0, 20.0, 
+-5.0, -35.0], [25.0, 20.0, 25.0, -30.0, -20.0]], [[-35.0, -42.0, 0.0, 7.0, 14.0], [35.0, 49.0, 21.0, -28.0, 14.0], [0.0, -49.0, 
+28.0, -7.0, -49.0], [35.0, 28.0, 35.0, -42.0, -28.0]], [[-30.0, -36.0, 0.0, 6.0, 12.0], [30.0, 42.0, 18.0, -24.0, 12.0], [0.0, 
+-42.0, 24.0, -6.0, -42.0], [30.0, 24.0, 30.0, -36.0, -24.0]], [[30.0, 36.0, 0.0, -6.0, -12.0], [-30.0, -42.0, -18.0, 24.0, 
+-12.0], [0.0, 42.0, -24.0, 6.0, 42.0], [-30.0, -24.0, -30.0, 36.0, 24.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[35.0, 42.0, 0.0, -7.0, -14.0], [-35.0, -49.0, -21.0, 28.0, 
+-14.0], [0.0, 49.0, -28.0, 7.0, 49.0], [-35.0, -28.0, -35.0, 42.0, 28.0]], [[-20.0, -24.0, 0.0, 4.0, 8.0], [20.0, 28.0, 12.0, 
+-16.0, 8.0], [0.0, -28.0, 16.0, -4.0, -28.0], [20.0, 16.0, 20.0, -24.0, -16.0]], [[25.0, 30.0, 0.0, -5.0, -10.0], [-25.0, 
+-35.0, -15.0, 20.0, -10.0], [0.0, 35.0, -20.0, 5.0, 35.0], [-25.0, -20.0, -25.0, 30.0, 20.0]], [[30.0, 36.0, 0.0, -6.0, -12.0], 
+[-30.0, -42.0, -18.0, 24.0, -12.0], [0.0, 42.0, -24.0, 6.0, 42.0], [-30.0, -24.0, -30.0, 36.0, 24.0]], [[-5.0, -6.0, 0.0, 1.0, 
+2.0], [5.0, 7.0, 3.0, -4.0, 2.0], [0.0, -7.0, 4.0, -1.0, -7.0], [5.0, 4.0, 5.0, -6.0, 
+-4.0]]]])+(1.-msk_ref)*numpy.array([[[[-28.0, 0.0, -20.0, -24.0, 20.0], [-16.0, 16.0, 0.0, 0.0, 8.0], [8.0, -24.0, 8.0, 28.0, 
+-8.0], [28.0, -8.0, 0.0, -12.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[-21.0, 0.0, -15.0, -18.0, 15.0], [-12.0, 12.0, 0.0, 0.0, 6.0], [6.0, -18.0, 6.0, 21.0, -6.0], [21.0, -6.0, 0.0, -9.0, 
+3.0]], [[-42.0, 0.0, -30.0, -36.0, 30.0], [-24.0, 24.0, 0.0, 0.0, 12.0], [12.0, -36.0, 12.0, 42.0, -12.0], [42.0, -12.0, 0.0, 
+-18.0, 6.0]]], [[[7.0, 0.0, 5.0, 6.0, -5.0], [4.0, -4.0, 0.0, 0.0, -2.0], [-2.0, 6.0, -2.0, -7.0, 2.0], [-7.0, 2.0, 0.0, 3.0, 
+-1.0]], [[-21.0, 0.0, -15.0, -18.0, 15.0], [-12.0, 12.0, 0.0, 0.0, 6.0], [6.0, -18.0, 6.0, 21.0, -6.0], [21.0, -6.0, 0.0, -9.0, 
+3.0]], [[-21.0, 0.0, -15.0, -18.0, 15.0], [-12.0, 12.0, 0.0, 0.0, 6.0], [6.0, -18.0, 6.0, 21.0, -6.0], [21.0, -6.0, 0.0, -9.0, 
+3.0]], [[-35.0, 0.0, -25.0, -30.0, 25.0], [-20.0, 20.0, 0.0, 0.0, 10.0], [10.0, -30.0, 10.0, 35.0, -10.0], [35.0, -10.0, 0.0, 
+-15.0, 5.0]], [[-14.0, 0.0, -10.0, -12.0, 10.0], [-8.0, 8.0, 0.0, 0.0, 4.0], [4.0, -12.0, 4.0, 14.0, -4.0], [14.0, -4.0, 0.0, 
+-6.0, 2.0]]], [[[-35.0, 0.0, -25.0, -30.0, 25.0], [-20.0, 20.0, 0.0, 0.0, 10.0], [10.0, -30.0, 10.0, 35.0, -10.0], [35.0, 
+-10.0, 0.0, -15.0, 5.0]], [[-49.0, 0.0, -35.0, -42.0, 35.0], [-28.0, 28.0, 0.0, 0.0, 14.0], [14.0, -42.0, 14.0, 49.0, -14.0], 
+[49.0, -14.0, 0.0, -21.0, 7.0]], [[-42.0, 0.0, -30.0, -36.0, 30.0], [-24.0, 24.0, 0.0, 0.0, 12.0], [12.0, -36.0, 12.0, 42.0, 
+-12.0], [42.0, -12.0, 0.0, -18.0, 6.0]], [[42.0, 0.0, 30.0, 36.0, -30.0], [24.0, -24.0, 0.0, 0.0, -12.0], [-12.0, 36.0, -12.0, 
+-42.0, 12.0], [-42.0, 12.0, 0.0, 18.0, -6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[49.0, 0.0, 35.0, 42.0, -35.0], [28.0, -28.0, 0.0, 0.0, -14.0], [-14.0, 42.0, -14.0, 
+-49.0, 14.0], [-49.0, 14.0, 0.0, 21.0, -7.0]], [[-28.0, 0.0, -20.0, -24.0, 20.0], [-16.0, 16.0, 0.0, 0.0, 8.0], [8.0, -24.0, 
+8.0, 28.0, -8.0], [28.0, -8.0, 0.0, -12.0, 4.0]], [[35.0, 0.0, 25.0, 30.0, -25.0], [20.0, -20.0, 0.0, 0.0, -10.0], [-10.0, 
+30.0, -10.0, -35.0, 10.0], [-35.0, 10.0, 0.0, 15.0, -5.0]], [[42.0, 0.0, 30.0, 36.0, -30.0], [24.0, -24.0, 0.0, 0.0, -12.0], 
+[-12.0, 36.0, -12.0, -42.0, 12.0], [-42.0, 12.0, 0.0, 18.0, -6.0]], [[-7.0, 0.0, -5.0, -6.0, 5.0], [-4.0, 4.0, 0.0, 0.0, 2.0], 
+[2.0, -6.0, 2.0, 7.0, -2.0], [7.0, -2.0, 0.0, -3.0, 1.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[6.0, 2.0, -3.0], [3.0, -7.0, -2.0], [6.0, -5.0, -2.0], [-1.0, -5.0, -1.0]], [[-7.0, -2.0, 
--4.0], [5.0, -5.0, -2.0], [4.0, -3.0, 2.0], [2.0, 0.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -5.0, 7.0], [5.0, 0.0, -6.0], 
-[-1.0, 2.0, -5.0], [-5.0, 1.0, 0.0]], [[-3.0, 0.0, -2.0], [-3.0, 5.0, 0.0], [5.0, -2.0, 0.0], [0.0, 5.0, 2.0]]])
-      arg1=numpy.array([[[[-2.0, 7.0], [4.0, -1.0], [-7.0, 1.0]], [[-3.0, 0.0], [-2.0, -2.0], [-4.0, -1.0]], [[6.0, 6.0], 
-[-6.0, -4.0], [-2.0, 6.0]], [[0.0, 7.0], [4.0, -2.0], [7.0, 1.0]]], [[[-3.0, -1.0], [-6.0, -6.0], [4.0, 6.0]], [[0.0, -1.0], 
-[0.0, -1.0], [5.0, 0.0]], [[1.0, -4.0], [1.0, 2.0], [-4.0, 5.0]], [[1.0, -3.0], [7.0, 0.0], [0.0, 4.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank3_offset1(self):
+      arg0=numpy.array([[[3.0, -6.0, 2.0, -3.0, -5.0], [-6.0, 4.0, 0.0, 1.0, 6.0], [-3.0, -4.0, 3.0, 5.0, 0.0], [-6.0, 4.0, 
+-4.0, 0.0, -5.0]], [[-4.0, -5.0, 1.0, 1.0, 4.0], [2.0, 0.0, 3.0, 4.0, 0.0], [-3.0, -5.0, 1.0, 6.0, 0.0], [7.0, 1.0, 2.0, -6.0, 
+-1.0]], [[-7.0, -3.0, 0.0, -1.0, 0.0], [4.0, 1.0, 1.0, 0.0, -6.0], [4.0, -1.0, 0.0, -6.0, -4.0], [2.0, -6.0, -6.0, -2.0, 
+-6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[2.0, 4.0, 6.0, 6.0, -6.0], [-6.0, -2.0, -7.0, 7.0, -1.0], [-1.0, 0.0, 2.0, -7.0, 3.0], [4.0, 
+1.0, -7.0, 2.0, -6.0]], [[-6.0, -5.0, 7.0, -3.0, -4.0], [7.0, -5.0, 3.0, 4.0, -6.0], [5.0, -2.0, -6.0, 7.0, -3.0], [7.0, 6.0, 
+1.0, -2.0, 5.0]], [[-1.0, 2.0, 3.0, 6.0, -4.0], [4.0, -5.0, 2.0, -4.0, -1.0], [7.0, 6.0, -1.0, 4.0, 2.0], [5.0, -2.0, -1.0, 
+4.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 7.0, -5.0, -2.0, 3.0], [1.0, 0.0, 0.0, 2.0, 0.0], [6.0, 7.0, 2.0, -6.0, 0.0], 
+[7.0, 7.0, -3.0, -1.0, -3.0]], [[1.0, -4.0, -4.0, 1.0, -4.0], [5.0, -1.0, 7.0, -5.0, -7.0], [5.0, 3.0, -1.0, -2.0, -2.0], [1.0, 
+6.0, -5.0, 3.0, 1.0]], [[-4.0, -7.0, -5.0, 0.0, 4.0], [2.0, -2.0, 5.0, -1.0, 5.0], [-6.0, 1.0, 7.0, -4.0, -3.0], [-1.0, -7.0, 
+0.0, 1.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([75.0, 100.0])+(1.-msk_ref)*numpy.array([-29.0, -76.0])
+      ref=msk_ref*numpy.array([[[[37.0, 18.0, -31.0, -12.0, 26.0], [-74.0, 49.0, -47.0, 33.0, 28.0], [-72.0, -34.0, 37.0, 
+-77.0, 7.0], [-51.0, -7.0, -18.0, -14.0, -87.0]], [[21.0, -5.0, -80.0, -39.0, 68.0], [-11.0, 52.0, 21.0, -50.0, 39.0], [-40.0, 
+-8.0, 21.0, -5.0, -9.0], [-74.0, -30.0, 40.0, -14.0, -10.0]], [[-2.0, 3.0, 19.0, 9.0, -16.0], [-5.0, -9.0, -11.0, 18.0, -8.0], 
+[3.0, -2.0, -2.0, -7.0, 3.0], [15.0, 8.0, -13.0, 2.0, -7.0]], [[-11.0, -19.0, -14.0, -27.0, 18.0], [21.0, 6.0, 22.0, -13.0, 
+-2.0], [1.0, -8.0, -11.0, 24.0, -14.0], [-10.0, 5.0, 23.0, -12.0, 16.0]], [[-34.0, -40.0, -2.0, -42.0, 14.0], [58.0, -10.0, 
+47.0, -19.0, -19.0], [25.0, -8.0, -34.0, 63.0, -27.0], [8.0, 19.0, 39.0, -18.0, 50.0]]], [[[-28.0, -26.0, -10.0, -18.0, 12.0], 
+[66.0, -18.0, 56.0, -50.0, -10.0], [44.0, 20.0, -28.0, 72.0, -16.0], [10.0, -2.0, 40.0, 0.0, 74.0]], [[7.0, 18.0, 27.0, 30.0, 
+-28.0], [-20.0, -13.0, -26.0, 24.0, -5.0], [3.0, 6.0, 7.0, -24.0, 14.0], [21.0, 2.0, -29.0, 12.0, -17.0]], [[-19.0, -13.0, 
+24.0, -3.0, -16.0], [25.0, -20.0, 11.0, 8.0, -19.0], [22.0, 0.0, -19.0, 25.0, -7.0], [26.0, 16.0, 2.0, -2.0, 22.0]], [[-22.0, 
+-16.0, 34.0, -6.0, -22.0], [22.0, -22.0, 5.0, 23.0, -25.0], [19.0, -8.0, -22.0, 21.0, -9.0], [32.0, 25.0, -3.0, -6.0, 14.0]], 
+[[18.0, 12.0, 18.0, 0.0, -12.0], [-60.0, 18.0, -54.0, 66.0, 0.0], [-48.0, -36.0, 18.0, -66.0, 6.0], [-6.0, 18.0, -36.0, -12.0, 
+-78.0]]], [[[8.0, 11.0, -27.0, 15.0, 14.0], [13.0, 1.0, 20.0, -49.0, 17.0], [16.0, 30.0, 8.0, 16.0, 8.0], [-13.0, -29.0, 14.0, 
+16.0, 31.0]], [[23.0, 7.0, -62.0, -15.0, 48.0], [-15.0, 38.0, 11.0, -44.0, 35.0], [-28.0, 4.0, 23.0, -11.0, 1.0], [-56.0, 
+-32.0, 24.0, -2.0, -8.0]], [[0.0, 7.0, 25.0, 15.0, -22.0], [-11.0, -11.0, -18.0, 25.0, -9.0], [2.0, -2.0, 0.0, -14.0, 6.0], 
+[19.0, 9.0, -20.0, 4.0, -13.0]], [[-20.0, -22.0, 54.0, -24.0, -30.0], [-12.0, -10.0, -29.0, 83.0, -35.0], [-17.0, -48.0, -20.0, 
+-17.0, -15.0], [32.0, 53.0, -23.0, -26.0, -42.0]], [[4.0, -8.0, -12.0, -24.0, 16.0], [-16.0, 20.0, -8.0, 16.0, 4.0], [-28.0, 
+-24.0, 4.0, -16.0, -8.0], [-20.0, 8.0, 4.0, -16.0, -28.0]]], [[[-56.0, -55.0, 19.0, -45.0, 0.0], [93.0, -33.0, 67.0, -22.0, 
+-38.0], [55.0, -2.0, -56.0, 99.0, -35.0], [35.0, 32.0, 47.0, -18.0, 85.0]], [[8.0, -1.0, 13.0, -15.0, -4.0], [-41.0, 17.0, 
+-37.0, 56.0, -4.0], [-41.0, -38.0, 8.0, -45.0, -3.0], [-7.0, 22.0, -21.0, -18.0, -61.0]], [[-14.0, -38.0, -28.0, -66.0, 40.0], 
+[14.0, 28.0, 22.0, 4.0, -2.0], [-28.0, -40.0, -14.0, 18.0, -30.0], [-32.0, 20.0, 36.0, -36.0, -8.0]], [[38.0, 26.0, -48.0, 6.0, 
+32.0], [-50.0, 40.0, -22.0, -16.0, 38.0], [-44.0, 0.0, 38.0, -50.0, 14.0], [-52.0, -32.0, -4.0, 4.0, -44.0]], [[2.0, -27.0, 
+-55.0, -63.0, 58.0], [-1.0, 45.0, 20.0, -15.0, 17.0], [-42.0, -34.0, 2.0, 4.0, -24.0], [-57.0, 1.0, 40.0, -32.0, 
+-17.0]]]])+(1.-msk_ref)*numpy.array([[[[45.0, 86.0, 36.0, -10.0, -3.0], [-31.0, 18.0, -63.0, 33.0, -7.0], [40.0, 2.0, -39.0, 
+18.0, 29.0], [24.0, 46.0, 11.0, -22.0, -13.0]], [[-35.0, -1.0, 65.0, 7.0, -10.0], [-37.0, 11.0, -50.0, 16.0, 20.0], [-43.0, 
+-60.0, -28.0, 58.0, 19.0], [-44.0, -51.0, 43.0, -12.0, 13.0]], [[15.0, 10.0, -14.0, -3.0, 2.0], [7.0, -1.0, 7.0, -1.0, -7.0], 
+[17.0, 17.0, 3.0, -14.0, -2.0], [15.0, 20.0, -11.0, 1.0, -5.0]], [[-16.0, -18.0, 16.0, 7.0, -17.0], [0.0, 1.0, 2.0, -10.0, 
+-12.0], [-7.0, -19.0, -14.0, 20.0, 1.0], [-19.0, -8.0, 4.0, 5.0, 10.0]], [[-31.0, -51.0, 9.0, 14.0, -31.0], [15.0, -4.0, 28.0, 
+-30.0, -28.0], [-10.0, -23.0, -14.0, 22.0, -8.0], [-31.0, -11.0, -5.0, 17.0, 19.0]]], [[[-56.0, -78.0, 2.0, 14.0, -10.0], 
+[12.0, -10.0, 34.0, -26.0, 6.0], [-50.0, -32.0, 14.0, 16.0, -16.0], [-44.0, -58.0, 8.0, 16.0, 20.0]], [[24.0, 21.0, -25.0, 
+-8.0, 16.0], [6.0, -2.0, 5.0, 7.0, 5.0], [18.0, 29.0, 15.0, -28.0, -3.0], [27.0, 21.0, -12.0, -3.0, -12.0]], [[-1.0, -19.0, 
+-17.0, 3.0, -8.0], [17.0, -5.0, 26.0, -16.0, -16.0], [9.0, 10.0, 4.0, -10.0, -9.0], [2.0, 11.0, -15.0, 10.0, 3.0]], [[11.0, 
+-9.0, -21.0, 2.0, -13.0], [21.0, -4.0, 28.0, -18.0, -28.0], [26.0, 19.0, -2.0, -14.0, -8.0], [11.0, 31.0, -23.0, 11.0, 1.0]], 
+[[66.0, 84.0, 0.0, -12.0, -6.0], [-6.0, 12.0, -30.0, 18.0, -30.0], [72.0, 36.0, -30.0, -12.0, 18.0], [48.0, 84.0, -18.0, -12.0, 
+-18.0]]], [[[-40.0, -37.0, 7.0, 3.0, 19.0], [-10.0, -5.0, -1.0, 5.0, 41.0], [-57.0, -26.0, 25.0, 8.0, -6.0], [-28.0, -67.0, 
+24.0, -2.0, 6.0]], [[-29.0, -1.0, 45.0, 3.0, 4.0], [-31.0, 7.0, -40.0, 18.0, 30.0], [-43.0, -44.0, -10.0, 38.0, 13.0], [-32.0, 
+-51.0, 37.0, -12.0, 7.0]], [[22.0, 17.0, -19.0, -5.0, 5.0], [8.0, -1.0, 7.0, 1.0, -7.0], [23.0, 24.0, 5.0, -20.0, -2.0], [22.0, 
+27.0, -14.0, 0.0, -8.0]], [[65.0, 53.0, -19.0, -4.0, -33.0], [23.0, 6.0, 12.0, -14.0, -72.0], [96.0, 47.0, -38.0, -18.0, 6.0], 
+[47.0, 113.0, -45.0, 7.0, -9.0]], [[16.0, 28.0, 20.0, 0.0, -16.0], [-8.0, 8.0, -20.0, 4.0, -20.0], [24.0, -4.0, -28.0, 16.0, 
+12.0], [4.0, 28.0, 0.0, -4.0, 0.0]]], [[[-43.0, -84.0, -8.0, 19.0, -38.0], [33.0, -11.0, 59.0, -49.0, -39.0], [-13.0, -19.0, 
+-5.0, 14.0, -20.0], [-37.0, -14.0, -17.0, 29.0, 25.0]], [[53.0, 66.0, 6.0, -7.0, -16.0], [-3.0, 11.0, -23.0, 9.0, -37.0], 
+[65.0, 25.0, -35.0, -2.0, 16.0], [35.0, 76.0, -17.0, -7.0, -11.0]], [[-2.0, 6.0, 42.0, 10.0, -44.0], [-6.0, 10.0, -16.0, -12.0, 
+-44.0], [22.0, -28.0, -52.0, 44.0, 14.0], [-20.0, 26.0, 2.0, 4.0, 14.0]], [[2.0, 38.0, 34.0, -6.0, 16.0], [-34.0, 10.0, -52.0, 
+32.0, 32.0], [-18.0, -20.0, -8.0, 20.0, 18.0], [-4.0, -22.0, 30.0, -20.0, -6.0]], [[-12.0, 11.0, 59.0, 9.0, -35.0], [-22.0, 
+13.0, -37.0, 1.0, -23.0], [1.0, -44.0, -51.0, 56.0, 20.0], [-30.0, 1.0, 20.0, -4.0, 14.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-5.0)
-      arg1=numpy.array([[3.0, -3.0, 2.0, 1.0, -7.0], [2.0, 0.0, -1.0, 5.0, 6.0], [-6.0, 6.0, 7.0, 0.0, -3.0], [-5.0, 7.0, -6.0, 
-2.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[[[-6.0, -1.0, -3.0, -2.0, -7.0], [-1.0, -3.0, -6.0, 1.0, 3.0], [0.0, -1.0, -2.0, -5.0, 3.0], [-4.0, 
+-5.0, 0.0, 1.0, -7.0]], [[-6.0, 2.0, 5.0, 3.0, -4.0], [-3.0, -3.0, -1.0, 1.0, 3.0], [-4.0, -3.0, -7.0, -5.0, -6.0], [-3.0, 
+-7.0, 3.0, 1.0, -5.0]], [[0.0, -1.0, 2.0, 1.0, -5.0], [4.0, -7.0, 6.0, 4.0, -4.0], [-1.0, 1.0, -1.0, 6.0, -4.0], [-6.0, -1.0, 
+0.0, 5.0, 6.0]]], [[[0.0, -4.0, 0.0, 4.0, -5.0], [-2.0, -4.0, 0.0, 3.0, 4.0], [2.0, 0.0, 6.0, -3.0, 3.0], [0.0, 2.0, -3.0, 
+-3.0, -2.0]], [[1.0, 2.0, 3.0, 6.0, -4.0], [0.0, 3.0, -1.0, 7.0, -4.0], [-2.0, -3.0, -6.0, 6.0, 2.0], [-2.0, 1.0, -5.0, -3.0, 
+-5.0]], [[7.0, -1.0, 0.0, 2.0, -7.0], [-2.0, 2.0, -7.0, -5.0, 3.0], [5.0, 6.0, 0.0, 4.0, 5.0], [4.0, 6.0, -5.0, 2.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-5.0, -3.0, 7.0, 4.0, -5.0], [7.0, -4.0, -1.0, 0.0, -6.0], [-3.0, -7.0, 2.0, -1.0, -5.0], 
+[3.0, -2.0, -2.0, 5.0, 4.0]], [[-7.0, 7.0, 1.0, -3.0, 6.0], [2.0, -7.0, 0.0, 4.0, -5.0], [6.0, 0.0, 2.0, 0.0, 0.0], [-4.0, 
+-1.0, 2.0, -6.0, 0.0]], [[-4.0, -3.0, 0.0, -5.0, -6.0], [2.0, 0.0, -7.0, -3.0, 3.0], [-2.0, -6.0, 3.0, 3.0, -3.0], [4.0, 0.0, 
+-6.0, 1.0, 4.0]]], [[[3.0, 1.0, 6.0, -7.0, 0.0], [-7.0, 0.0, -7.0, 0.0, -7.0], [-7.0, 6.0, 4.0, -2.0, -6.0], [-5.0, -3.0, 6.0, 
+-2.0, 7.0]], [[0.0, -3.0, -3.0, -4.0, 5.0], [-5.0, 5.0, -3.0, -6.0, 0.0], [-3.0, 1.0, 0.0, 0.0, -2.0], [-3.0, 7.0, 4.0, -7.0, 
+-3.0]], [[-1.0, 2.0, -4.0, 6.0, -4.0], [5.0, 0.0, 0.0, -7.0, 0.0], [-1.0, -6.0, 2.0, 0.0, -3.0], [7.0, -1.0, -1.0, -1.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, -1.0, -2.0, 1.0, 5.0], [7.0, 0.0, 0.0, -1.0, 0.0], [-6.0, -6.0, 5.0, -7.0, 0.0], 
+[4.0, 1.0, 7.0, 5.0, 5.0]], [[0.0, 6.0, -2.0, 0.0, 3.0], [-2.0, 3.0, -2.0, -2.0, -5.0], [0.0, 0.0, -6.0, 4.0, 0.0], [-4.0, 0.0, 
+2.0, 4.0, 4.0]], [[3.0, 5.0, 0.0, -3.0, 7.0], [4.0, 1.0, -1.0, -6.0, -1.0], [-6.0, 3.0, -5.0, -2.0, -7.0], [5.0, 0.0, -6.0, 
+-4.0, -1.0]]], [[[-6.0, 0.0, 6.0, 1.0, 5.0], [0.0, -1.0, -6.0, -3.0, -5.0], [0.0, -5.0, -2.0, -7.0, 6.0], [3.0, -3.0, 2.0, 
+-5.0, 3.0]], [[-6.0, 3.0, 2.0, 4.0, 0.0], [7.0, 2.0, 4.0, -4.0, 0.0], [4.0, 0.0, 5.0, -7.0, -7.0], [-7.0, -6.0, 0.0, 4.0, 
+7.0]], [[7.0, 0.0, 3.0, -4.0, 4.0], [-5.0, 5.0, 0.0, -4.0, -2.0], [-5.0, -3.0, 6.0, -1.0, -6.0], [1.0, 5.0, 5.0, 1.0, -5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 
-0.0, -0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-15.0, 15.0, -10.0, -5.0, 35.0], [-10.0, -0.0, 5.0, -25.0, -30.0], [30.0, 
--30.0, -35.0, -0.0, 15.0], [25.0, -35.0, 30.0, -10.0, -0.0]])
+      ref=msk_ref*numpy.array([[[[65.0, -13.0, -79.0, 32.0, -29.0], [-24.0, 71.0, 3.0, -79.0, 66.0], [-28.0, 1.0, -10.0, 6.0, 
+7.0], [52.0, 18.0, -3.0, -8.0, -69.0]], [[-16.0, 8.0, -31.0, 9.0, 37.0], [8.0, 0.0, 30.0, 6.0, 21.0], [40.0, -3.0, -19.0, 6.0, 
+31.0], [-8.0, 27.0, -3.0, -23.0, -36.0]], [[-28.0, 29.0, -25.0, -49.0, 48.0], [-22.0, -8.0, -20.0, -4.0, -1.0], [26.0, 12.0, 
+10.0, 9.0, 3.0], [-30.0, 22.0, 16.0, -64.0, -13.0]], [[-5.0, 14.0, -13.0, -62.0, 44.0], [-54.0, 17.0, -51.0, -41.0, -28.0], 
+[-26.0, 26.0, 25.0, -3.0, -35.0], [-38.0, 29.0, 50.0, -79.0, -6.0]], [[75.0, 1.0, -43.0, 18.0, 49.0], [-47.0, 36.0, 89.0, 72.0, 
+82.0], [61.0, 87.0, -71.0, 2.0, 109.0], [-37.0, 12.0, -3.0, 29.0, -29.0]]], [[[6.0, -36.0, -14.0, -13.0, -29.0], [-1.0, 25.0, 
+-13.0, -10.0, 47.0], [-7.0, -17.0, -8.0, 17.0, 11.0], [21.0, 13.0, -38.0, 23.0, 10.0]], [[50.0, 0.0, -65.0, 60.0, 46.0], 
+[-18.0, 48.0, 71.0, -23.0, 40.0], [22.0, 30.0, -45.0, -10.0, 48.0], [0.0, 40.0, 28.0, -19.0, -89.0]], [[20.0, -18.0, -12.0, 
+-89.0, 11.0], [-62.0, 26.0, -33.0, 33.0, 59.0], [10.0, 47.0, -10.0, 24.0, 35.0], [-36.0, 13.0, -23.0, -4.0, 45.0]], [[-14.0, 
+-36.0, 25.0, -98.0, 32.0], [-64.0, 24.0, -71.0, -15.0, -20.0], [-42.0, 24.0, 18.0, 5.0, -34.0], [-56.0, 42.0, 27.0, -47.0, 
+50.0]], [[-11.0, 46.0, 48.0, 29.0, -5.0], [26.0, -53.0, 9.0, 27.0, -73.0], [-2.0, 5.0, 22.0, -23.0, -28.0], [-6.0, -52.0, 29.0, 
+10.0, 18.0]]], [[[33.0, -7.0, -6.0, 41.0, -48.0], [11.0, 18.0, -1.0, -36.0, 3.0], [-35.0, -14.0, 7.0, -7.0, -20.0], [43.0, 
+-21.0, -3.0, 28.0, -14.0]], [[16.0, 0.0, -25.0, 48.0, -58.0], [34.0, 10.0, 3.0, -39.0, 24.0], [-14.0, -38.0, 7.0, 4.0, -10.0], 
+[64.0, -22.0, -28.0, 29.0, -27.0]], [[81.0, -16.0, 33.0, 0.0, -56.0], [-42.0, 27.0, -15.0, 11.0, 2.0], [-58.0, 50.0, 3.0, 
+-13.0, -11.0], [6.0, -49.0, 8.0, 61.0, 48.0]], [[23.0, -51.0, -92.0, -14.0, -27.0], [-22.0, 85.0, -34.0, -102.0, 94.0], [-28.0, 
+-37.0, -6.0, 29.0, 1.0], [54.0, 62.0, -34.0, -29.0, -59.0]], [[47.0, -32.0, 7.0, 51.0, -37.0], [-5.0, 40.0, -2.0, -59.0, 
+-21.0], [-69.0, -7.0, 4.0, -21.0, -40.0], [31.0, 0.0, 27.0, 22.0, -19.0]]], [[[61.0, 23.0, -41.0, 55.0, 12.0], [-16.0, 27.0, 
+52.0, -10.0, 21.0], [8.0, 38.0, -24.0, -14.0, 30.0], [10.0, -7.0, 26.0, 2.0, -58.0]], [[78.0, -20.0, -57.0, 24.0, -30.0], 
+[-40.0, 74.0, -5.0, -73.0, 48.0], [-48.0, 18.0, -7.0, -2.0, -4.0], [38.0, 12.0, 12.0, -1.0, -49.0]], [[-25.0, 23.0, 20.0, 2.0, 
+13.0], [27.0, -46.0, 36.0, 77.0, 6.0], [59.0, 7.0, -16.0, 6.0, 43.0], [-17.0, -24.0, -27.0, 28.0, 24.0]], [[-43.0, -1.0, -9.0, 
+21.0, -52.0], [65.0, -26.0, -6.0, -7.0, 25.0], [21.0, -70.0, 11.0, 20.0, -2.0], [57.0, -17.0, -62.0, 29.0, 0.0]], [[41.0, 
+-21.0, -47.0, -15.0, -52.0], [-13.0, 38.0, -6.0, -1.0, 99.0], [9.0, 2.0, -16.0, 29.0, 42.0], [41.0, -9.0, -63.0, 41.0, 
+3.0]]]])+(1.-msk_ref)*numpy.array([[[[73.0, -27.0, 47.0, -30.0, -20.0], [-58.0, 19.0, 16.0, -14.0, 16.0], [5.0, 15.0, 53.0, 
+4.0, -49.0], [0.0, 23.0, -19.0, -43.0, -82.0]], [[7.0, 14.0, -25.0, 10.0, -30.0], [4.0, 8.0, 29.0, 11.0, 13.0], [25.0, 26.0, 
+0.0, 32.0, -25.0], [-44.0, -6.0, -10.0, 34.0, 11.0]], [[3.0, 52.0, 2.0, 3.0, 14.0], [-2.0, 23.0, 0.0, -31.0, -27.0], [18.0, 
+24.0, -40.0, 16.0, -35.0], [-43.0, -21.0, -23.0, 9.0, 24.0]], [[-33.0, 43.0, 40.0, 15.0, 34.0], [16.0, 28.0, -7.0, -54.0, 
+-40.0], [20.0, -11.0, 1.0, -48.0, -37.0], [-43.0, -40.0, 4.0, 4.0, 45.0]], [[25.0, -54.0, -37.0, 15.0, -135.0], [-54.0, -55.0, 
+27.0, 104.0, 64.0], [91.0, 73.0, -38.0, 113.0, 75.0], [-31.0, -3.0, -72.0, -29.0, -54.0]]], [[[15.0, 3.0, -10.0, -7.0, -4.0], 
+[25.0, -13.0, 14.0, -3.0, 25.0], [-8.0, 34.0, -15.0, 3.0, -28.0], [20.0, -5.0, -51.0, -25.0, -17.0]], [[14.0, -41.0, 0.0, 18.0, 
+-85.0], [-32.0, 4.0, 49.0, 43.0, 38.0], [62.0, 11.0, 73.0, 28.0, -8.0], [-66.0, 1.0, 17.0, 35.0, -21.0]], [[5.0, 27.0, -9.0, 
+0.0, -19.0], [12.0, -34.0, -8.0, 4.0, 13.0], [31.0, 75.0, -101.0, 40.0, 7.0], [10.0, -35.0, -115.0, -69.0, -12.0]], [[-88.0, 
+46.0, 13.0, 40.0, 31.0], [95.0, -7.0, 4.0, -44.0, -14.0], [23.0, 6.0, -22.0, -76.0, -29.0], [-25.0, -75.0, -34.0, 1.0, 88.0]], 
+[[-6.0, -17.0, 13.0, -9.0, 28.0], [-44.0, 8.0, -42.0, 7.0, -37.0], [-25.0, -59.0, 7.0, -4.0, 62.0], [23.0, 30.0, 74.0, 10.0, 
+0.0]]], [[[32.0, -35.0, 31.0, -23.0, 11.0], [-35.0, 6.0, -11.0, -4.0, 1.0], [-27.0, -28.0, 45.0, -19.0, 3.0], [36.0, 31.0, 
+27.0, -25.0, -48.0]], [[68.0, -21.0, 20.0, -40.0, 17.0], [-48.0, 16.0, -7.0, -11.0, 2.0], [-42.0, -9.0, 29.0, 8.0, -22.0], 
+[40.0, 47.0, 11.0, -27.0, -69.0]], [[7.0, -63.0, 42.0, -17.0, -8.0], [-46.0, -40.0, -45.0, 28.0, 6.0], [-6.0, -21.0, -5.0, 
+-12.0, 85.0], [75.0, 16.0, -10.0, -88.0, -61.0]], [[53.0, 23.0, 26.0, -18.0, 3.0], [21.0, 26.0, 46.0, -52.0, 26.0], [-2.0, 
+51.0, 35.0, -22.0, -126.0], [-17.0, -12.0, -67.0, -26.0, -38.0]], [[-22.0, -53.0, 43.0, 6.0, 4.0], [6.0, 4.0, 6.0, -4.0, 9.0], 
+[-11.0, -60.0, 105.0, -77.0, 2.0], [16.0, 7.0, 64.0, 5.0, -7.0]]], [[[42.0, -50.0, 22.0, -10.0, -55.0], [-80.0, 1.0, 4.0, 38.0, 
+13.0], [32.0, -6.0, 42.0, 38.0, 32.0], [-16.0, 28.0, 22.0, -12.0, -60.0]], [[46.0, -39.0, 56.0, -20.0, -19.0], [-48.0, 8.0, 
+7.0, -9.0, 14.0], [10.0, -1.0, 59.0, -18.0, -24.0], [8.0, 13.0, -9.0, -49.0, -69.0]], [[13.0, 3.0, -49.0, -3.0, -26.0], [-16.0, 
+-23.0, -8.0, 43.0, 10.0], [5.0, 30.0, -67.0, 73.0, 47.0], [9.0, 14.0, -25.0, 2.0, -7.0]], [[60.0, 21.0, -22.0, -37.0, 36.0], 
+[-6.0, 15.0, -1.0, -20.0, 1.0], [-58.0, 18.0, -23.0, 27.0, -44.0], [39.0, 38.0, -17.0, -6.0, -36.0]], [[88.0, -8.0, -1.0, 
+-43.0, -22.0], [-45.0, -22.0, -4.0, 11.0, 31.0], [-9.0, 73.0, -62.0, 67.0, -13.0], [50.0, 24.0, -104.0, -90.0, -97.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-4.0, 0.0, 5.0])+(1.-msk_arg0)*numpy.array([3.0, 3.0, 0.0])
-      arg1=numpy.array([[[7.0, 5.0, -7.0, -6.0, -1.0], [-6.0, 4.0, -5.0, 3.0, -2.0], [-5.0, 2.0, -2.0, -7.0, 3.0], [5.0, -1.0, 
-5.0, -2.0, 3.0]], [[7.0, -6.0, 7.0, -4.0, -7.0], [-6.0, 6.0, 6.0, 3.0, 4.0], [-4.0, -7.0, 4.0, 3.0, -1.0], [4.0, -2.0, -4.0, 
-6.0, 3.0]], [[3.0, -5.0, -7.0, 3.0, -5.0], [0.0, 5.0, 7.0, 2.0, -1.0], [-5.0, 4.0, -2.0, 0.0, -6.0], [-6.0, 4.0, 3.0, -1.0, 
-4.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-13.0, -45.0, -7.0, 39.0, -21.0], [24.0, 9.0, 55.0, -2.0, 3.0], [-5.0, 12.0, -2.0, 28.0, 
--42.0], [-50.0, 24.0, -5.0, 3.0, 8.0]])+(1.-msk_ref)*numpy.array([[42.0, -3.0, 0.0, -30.0, -24.0], [-36.0, 30.0, 3.0, 18.0, 
-6.0], [-27.0, -15.0, 6.0, -12.0, 6.0], [27.0, -9.0, 3.0, 12.0, 18.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_float_rank0_offset0(self):
+      arg0=numpy.array([[[-6.0, -7.0], [-7.0, -1.0]], [[1.0, -3.0], [7.0, -6.0]], [[-2.0, 7.0], [6.0, 7.0]], [[-3.0, -3.0], 
+[-2.0, 4.0]], [[-3.0, 5.0], [-3.0, -7.0]], [[-7.0, -1.0], [3.0, 2.0]]])
+      arg1=0.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-0.0, -0.0], [-0.0, -0.0]], [[0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], 
+[-0.0, 0.0]], [[-0.0, 0.0], [-0.0, -0.0]], [[-0.0, -0.0], [0.0, 0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, 3.0, -7.0], [-3.0, 4.0, -4.0]])+(1.-msk_arg0)*numpy.array([[-4.0, -4.0, -3.0], [4.0, 
-1.0, 2.0]])
-      arg1=numpy.array([[[[-3.0, -6.0, -6.0, 0.0, 4.0], [-4.0, 1.0, 7.0, 2.0, 4.0], [0.0, 3.0, -3.0, -6.0, -4.0], [1.0, 0.0, 
-0.0, 4.0, 0.0]], [[0.0, -5.0, -6.0, -4.0, 1.0], [0.0, 0.0, -7.0, -2.0, -6.0], [-6.0, -6.0, -2.0, -4.0, 4.0], [1.0, 3.0, -6.0, 
-0.0, -2.0]], [[6.0, -5.0, -7.0, -5.0, 5.0], [-7.0, -1.0, 3.0, 2.0, 5.0], [-7.0, -2.0, -2.0, -6.0, 6.0], [5.0, 4.0, 7.0, -5.0, 
--5.0]]], [[[5.0, 0.0, -1.0, -1.0, 5.0], [6.0, -3.0, -7.0, -7.0, -4.0], [-4.0, -1.0, 1.0, -6.0, -2.0], [-1.0, -5.0, 3.0, 3.0, 
--6.0]], [[-3.0, 2.0, -6.0, 7.0, 1.0], [1.0, -7.0, 6.0, 5.0, 7.0], [-2.0, -3.0, -6.0, 6.0, -6.0], [-3.0, 6.0, -7.0, 1.0, 1.0]], 
-[[1.0, 0.0, 0.0, -3.0, -2.0], [-1.0, -6.0, 2.0, -3.0, -7.0], [0.0, 5.0, -3.0, -4.0, 6.0], [0.0, 6.0, 6.0, 4.0, -6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-64.0, 46.0, 28.0, 66.0, -47.0], [51.0, 9.0, -26.0, 27.0, 3.0], [35.0, -42.0, 2.0, 106.0, 
--60.0], [-44.0, -4.0, -128.0, 2.0, 75.0]])+(1.-msk_ref)*numpy.array([[13.0, 61.0, 59.0, 28.0, -18.0], [60.0, -32.0, -27.0, 
--35.0, -30.0], [27.0, 21.0, 18.0, 32.0, -20.0], [-30.0, -26.0, 20.0, 20.0, -12.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank0_offset0(self):
+      arg0=numpy.array([[[3.0, -4.0], [-1.0, 6.0]], [[-4.0, -4.0], [-5.0, 7.0]], [[2.0, 4.0], [0.0, 0.0]], [[-4.0, -1.0], [6.0, 
+7.0]], [[6.0, 5.0], [1.0, 0.0]], [[2.0, -1.0], [6.0, 4.0]]])
+      arg1=numpy.array(0.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[0.0, -0.0], [-0.0, 0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_array_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(7.0)+(1-msk_arg0)*(6.0)
-      arg1=numpy.array([[[-5.0, 5.0], [3.0, 0.0]], [[-2.0, -2.0], [6.0, 3.0]], [[0.0, 1.0], [4.0, -4.0]], [[1.0, -4.0], [7.0, 
-0.0]], [[5.0, 4.0], [-2.0, -6.0]], [[6.0, 2.0], [2.0, 3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-35.0, 35.0], [21.0, 0.0]], [[-14.0, -14.0], [42.0, 21.0]], [[0.0, 7.0], [28.0, -28.0]], 
-[[7.0, -28.0], [49.0, 0.0]], [[35.0, 28.0], [-14.0, -42.0]], [[42.0, 14.0], [14.0, 21.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 
-30.0], [18.0, 0.0]], [[-12.0, -12.0], [36.0, 18.0]], [[0.0, 6.0], [24.0, -24.0]], [[6.0, -24.0], [42.0, 0.0]], [[30.0, 24.0], 
-[-12.0, -36.0]], [[36.0, 12.0], [12.0, 18.0]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_array_rank1_offset1(self):
+      arg0=numpy.array([[[[6.0, -6.0], [-1.0, -5.0]], [[0.0, 4.0], [3.0, 5.0]], [[5.0, -3.0], [6.0, 6.0]], [[7.0, -5.0], [-1.0, 
+4.0]], [[0.0, -4.0], [2.0, 0.0]], [[6.0, -2.0], [2.0, -4.0]]], [[[6.0, -4.0], [-5.0, 0.0]], [[-2.0, 0.0], [6.0, 4.0]], [[5.0, 
+-5.0], [-6.0, 0.0]], [[4.0, -1.0], [5.0, 3.0]], [[7.0, 1.0], [3.0, -6.0]], [[-7.0, -6.0], [-1.0, -4.0]]], [[[5.0, 3.0], [-2.0, 
+6.0]], [[-2.0, 3.0], [-7.0, 7.0]], [[2.0, 7.0], [2.0, 3.0]], [[-6.0, 7.0], [3.0, -6.0]], [[0.0, 2.0], [0.0, -3.0]], [[-3.0, 
+3.0], [0.0, -4.0]]]])
+      arg1=numpy.array([-7.0, 6.0, -7.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-41.0, -3.0], [-9.0, -7.0]], [[2.0, -49.0], [64.0, -60.0]], [[-19.0, -58.0], [-92.0, -63.0]], [[17.0, 
+-20.0], [16.0, 32.0]], [[42.0, 20.0], [4.0, -15.0]], [[-63.0, -43.0], [-20.0, 32.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-3.0, 2.0, -1.0])+(1.-msk_arg0)*numpy.array([6.0, 6.0, 7.0])
-      arg1=numpy.array([[[[-3.0, 2.0], [3.0, -6.0]], [[-5.0, 6.0], [2.0, 7.0]], [[-6.0, 1.0], [1.0, -5.0]], [[-3.0, -3.0], 
-[7.0, -4.0]], [[-1.0, -5.0], [-3.0, 1.0]], [[-3.0, -7.0], [7.0, 0.0]]], [[[5.0, 7.0], [4.0, -2.0]], [[-4.0, 7.0], [0.0, 6.0]], 
-[[1.0, 3.0], [0.0, -2.0]], [[6.0, -5.0], [-4.0, 0.0]], [[-1.0, -7.0], [0.0, 2.0]], [[6.0, -4.0], [-1.0, -5.0]]], [[[2.0, 7.0], 
-[7.0, 1.0]], [[-1.0, -5.0], [4.0, 6.0]], [[5.0, -7.0], [-5.0, 7.0]], [[4.0, -2.0], [-1.0, 0.0]], [[7.0, -6.0], [2.0, -4.0]], 
-[[-5.0, -7.0], [0.0, 2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[17.0, 1.0], [-8.0, 13.0]], [[8.0, 1.0], [-10.0, -15.0]], [[15.0, 10.0], [2.0, 4.0]], [[17.0, 
-1.0], [-28.0, 12.0]], [[-6.0, 7.0], [7.0, 5.0]], [[26.0, 20.0], [-23.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[26.0, 103.0], 
-[91.0, -41.0]], [[-61.0, 43.0], [40.0, 120.0]], [[5.0, -25.0], [-29.0, 7.0]], [[46.0, -62.0], [11.0, -24.0]], [[37.0, -114.0], 
-[-4.0, -10.0]], [[-17.0, -115.0], [36.0, -16.0]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank3_array_rank1_offset0(self):
+      arg0=numpy.array([[[-7.0, 1.0], [5.0, -6.0]], [[1.0, -6.0], [2.0, 7.0]], [[1.0, 7.0], [-3.0, -4.0]], [[2.0, 1.0], [-3.0, 
+0.0]], [[1.0, 2.0], [-1.0, 0.0]], [[-3.0, 1.0], [0.0, 0.0]]])
+      arg1=numpy.array([4.0, 5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-28.0, -35.0], [4.0, 5.0]], [[20.0, 25.0], [-24.0, -30.0]]], [[[4.0, 5.0], [-24.0, -30.0]], [[8.0, 
+10.0], [28.0, 35.0]]], [[[4.0, 5.0], [28.0, 35.0]], [[-12.0, -15.0], [-16.0, -20.0]]], [[[8.0, 10.0], [4.0, 5.0]], [[-12.0, 
+-15.0], [0.0, 0.0]]], [[[4.0, 5.0], [8.0, 10.0]], [[-4.0, -5.0], [0.0, 0.0]]], [[[-12.0, -15.0], [4.0, 5.0]], [[0.0, 0.0], 
+[0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_array_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(0.0)
-      arg1=numpy.array([[[[-2.0, -1.0, -2.0, -6.0], [4.0, -1.0, 6.0, -1.0], [-4.0, -2.0, -5.0, 4.0]], [[-1.0, -1.0, -2.0, 6.0], 
-[5.0, 4.0, -6.0, -3.0], [-2.0, -1.0, 4.0, -7.0]]], [[[0.0, 3.0, -2.0, 2.0], [-6.0, 0.0, 1.0, -4.0], [-7.0, -7.0, -5.0, 2.0]], 
-[[6.0, -3.0, 5.0, 6.0], [-5.0, -3.0, 0.0, -2.0], [-3.0, -5.0, 0.0, 0.0]]], [[[-6.0, 3.0, -5.0, 5.0], [7.0, 6.0, 5.0, 4.0], 
-[0.0, -5.0, -1.0, 0.0]], [[-6.0, 5.0, 3.0, -7.0], [-5.0, -2.0, 0.0, 2.0], [-1.0, 6.0, -1.0, -5.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 5.0, 10.0, 30.0], [-20.0, 5.0, -30.0, 5.0], [20.0, 10.0, 25.0, -20.0]], [[5.0, 5.0, 
-10.0, -30.0], [-25.0, -20.0, 30.0, 15.0], [10.0, 5.0, -20.0, 35.0]]], [[[-0.0, -15.0, 10.0, -10.0], [30.0, -0.0, -5.0, 20.0], 
-[35.0, 35.0, 25.0, -10.0]], [[-30.0, 15.0, -25.0, -30.0], [25.0, 15.0, -0.0, 10.0], [15.0, 25.0, -0.0, -0.0]]], [[[30.0, -15.0, 
-25.0, -25.0], [-35.0, -30.0, -25.0, -20.0], [-0.0, 25.0, 5.0, -0.0]], [[30.0, -25.0, -15.0, 35.0], [25.0, 10.0, -0.0, -10.0], 
-[5.0, -30.0, 5.0, 25.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 
-0.0]], [[-0.0, -0.0, -0.0, 0.0], [0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, -0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 
--0.0], [-0.0, -0.0, -0.0, 0.0]], [[0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 
--0.0]]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_array_rank2_offset1(self):
+      arg0=numpy.array([[[[-6.0, -6.0], [-6.0, 7.0]], [[5.0, 7.0], [5.0, 4.0]], [[-7.0, 5.0], [-1.0, -2.0]], [[2.0, -2.0], 
+[-7.0, -5.0]], [[4.0, 5.0], [4.0, -7.0]], [[4.0, -2.0], [7.0, -1.0]]], [[[4.0, -4.0], [7.0, 4.0]], [[6.0, 0.0], [-1.0, -2.0]], 
+[[6.0, 4.0], [7.0, -5.0]], [[2.0, -4.0], [3.0, -7.0]], [[-7.0, 0.0], [-3.0, 1.0]], [[-6.0, 0.0], [-4.0, 7.0]]], [[[-5.0, -7.0], 
+[-5.0, -6.0]], [[4.0, 6.0], [0.0, -6.0]], [[5.0, -1.0], [-7.0, -3.0]], [[-1.0, 0.0], [1.0, 0.0]], [[3.0, 1.0], [1.0, -7.0]], 
+[[6.0, 6.0], [7.0, 0.0]]]])
+      arg1=numpy.array([[0.0, -3.0], [-1.0, -7.0], [1.0, -4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[-9.0, 10.0], [-3.0, 74.0]], [[-12.0, -11.0], [-10.0, -25.0]]], [[[-2.0, -73.0], [6.0, -45.0]], [[1.0, 
+-8.0], [-4.0, 26.0]]], [[[-1.0, -41.0], [-5.0, -39.0]], [[-14.0, -18.0], [2.0, 53.0]]], [[[-3.0, -16.0], [4.0, 34.0]], [[-2.0, 
+-4.0], [7.0, 64.0]]], [[[10.0, 25.0], [1.0, -19.0]], [[4.0, 5.0], [-8.0, 42.0]]], [[[12.0, 6.0], [6.0, -18.0]], [[11.0, -21.0], 
+[-7.0, -46.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(-5.0)
-      arg1=Data(-7.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(35.0)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank0_offset0(self):
+      arg0=numpy.array([[[-6.0, 7.0], [-1.0, -1.0]], [[-4.0, 3.0], [0.0, 3.0]], [[-4.0, 0.0], [1.0, 6.0]], [[0.0, 4.0], [4.0, 
+0.0]], [[5.0, -7.0], [4.0, 5.0]], [[-4.0, -2.0], [-4.0, 5.0]]])
+      arg1=Data(5.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-30.0, 35.0], [-5.0, -5.0]], [[-20.0, 15.0], [0.0, 15.0]], [[-20.0, 0.0], [5.0, 30.0]], [[0.0, 
+20.0], [20.0, 0.0]], [[25.0, -35.0], [20.0, 25.0]], [[-20.0, -10.0], [-20.0, 25.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-1.0, 3.0, 2.0])+(1.-msk_arg0)*numpy.array([1.0, -4.0, -5.0])
-      arg1=Data(numpy.array([3.0, 3.0, -3.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(6.0)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank1_offset1(self):
+      arg0=numpy.array([[[[2.0, -4.0], [4.0, 2.0]], [[5.0, 0.0], [5.0, 5.0]], [[-4.0, 4.0], [-1.0, -4.0]], [[-1.0, 2.0], [6.0, 
+7.0]], [[-4.0, -5.0], [3.0, -4.0]], [[6.0, 1.0], [-3.0, 7.0]]], [[[-1.0, 1.0], [-2.0, -1.0]], [[3.0, 5.0], [-7.0, 0.0]], 
+[[-5.0, -6.0], [-6.0, 5.0]], [[2.0, -1.0], [7.0, 0.0]], [[1.0, 3.0], [-4.0, -1.0]], [[-3.0, -7.0], [7.0, -5.0]]], [[[3.0, 0.0], 
+[-4.0, 6.0]], [[0.0, -1.0], [-3.0, 4.0]], [[6.0, 5.0], [5.0, 2.0]], [[5.0, 5.0], [0.0, -5.0]], [[7.0, -2.0], [6.0, 0.0]], 
+[[-1.0, -6.0], [4.0, 2.0]]]])
+      arg1=Data(numpy.array([7.0, -3.0, 3.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[26.0, -31.0], [22.0, 35.0]], [[26.0, -18.0], [47.0, 47.0]], [[5.0, 61.0], [26.0, -37.0]], [[2.0, 
+32.0], [21.0, 34.0]], [[-10.0, -50.0], [51.0, -25.0]], [[48.0, 10.0], [-30.0, 70.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, -5.0, -3.0], [3.0, 5.0, 5.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -1.0, 0.0], [0.0, 1.0, 
-0.0]])
-      arg1=Data(numpy.array([[-3.0, -3.0, 3.0], [0.0, 6.0, -2.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(24.0)
+   def test_generalTransposedTensorProduct_array_rank3_constData_rank1_offset0(self):
+      arg0=numpy.array([[[1.0, -2.0], [-4.0, 2.0]], [[6.0, 2.0], [-5.0, 7.0]], [[5.0, 6.0], [4.0, 2.0]], [[5.0, -7.0], [-7.0, 
+-1.0]], [[1.0, 6.0], [7.0, -6.0]], [[-6.0, 0.0], [7.0, 0.0]]])
+      arg1=Data(numpy.array([2.0, -5.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[2.0, -5.0], [-4.0, 10.0]], [[-8.0, 20.0], [4.0, -10.0]]], [[[12.0, -30.0], [4.0, -10.0]], 
+[[-10.0, 25.0], [14.0, -35.0]]], [[[10.0, -25.0], [12.0, -30.0]], [[8.0, -20.0], [4.0, -10.0]]], [[[10.0, -25.0], [-14.0, 
+35.0]], [[-14.0, 35.0], [-2.0, 5.0]]], [[[2.0, -5.0], [12.0, -30.0]], [[14.0, -35.0], [-12.0, 30.0]]], [[[-12.0, 30.0], [0.0, 
+0.0]], [[14.0, -35.0], [0.0, 0.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, 7.0, 0.0], [-6.0, 4.0, 5.0], [3.0, -3.0, 3.0], [6.0, -7.0, 7.0]], [[-3.0, 4.0, 2.0], 
-[-5.0, -3.0, -2.0], [3.0, -6.0, -7.0], [4.0, 2.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, 4.0, 4.0], [-4.0, 1.0, 0.0], [6.0, 
-0.0, -6.0], [5.0, -4.0, -7.0]], [[-1.0, 4.0, 3.0], [-1.0, -5.0, 4.0], [1.0, 1.0, -6.0], [-7.0, 6.0, 6.0]]])
-      arg1=Data(numpy.array([[[-6.0, 0.0, 5.0], [3.0, -4.0, -6.0], [6.0, 0.0, -3.0], [5.0, 2.0, 7.0]], [[-5.0, 0.0, -3.0], 
-[5.0, 0.0, 3.0], [2.0, 4.0, 7.0], [-7.0, -1.0, -3.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-103.0)+(1.-msk_ref)*numpy.array(-18.0)
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank2_offset1(self):
+      arg0=numpy.array([[[[-6.0, 4.0], [5.0, -5.0]], [[-3.0, 5.0], [3.0, 1.0]], [[3.0, 4.0], [-7.0, 3.0]], [[-2.0, -1.0], [3.0, 
+4.0]], [[7.0, 1.0], [-7.0, 1.0]], [[-4.0, 3.0], [-2.0, -3.0]]], [[[-5.0, 5.0], [0.0, 4.0]], [[-2.0, 0.0], [-2.0, 7.0]], [[-6.0, 
+1.0], [-3.0, -3.0]], [[5.0, -3.0], [0.0, -4.0]], [[-2.0, 7.0], [3.0, -6.0]], [[2.0, -6.0], [-7.0, 1.0]]], [[[7.0, -1.0], [0.0, 
+1.0]], [[0.0, 5.0], [2.0, -5.0]], [[2.0, 0.0], [0.0, 0.0]], [[-7.0, 2.0], [2.0, 0.0]], [[-4.0, -1.0], [-2.0, -6.0]], [[3.0, 
+-5.0], [1.0, -5.0]]]])
+      arg1=Data(numpy.array([[-2.0, 5.0], [-1.0, 3.0], [-5.0, -4.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-18.0, -73.0], [-8.0, 39.0]], [[-10.0, 25.0], [1.0, -17.0]]], [[[8.0, -21.0], [-35.0, 5.0]], 
+[[-14.0, 1.0], [16.0, 46.0]]], [[[-10.0, -11.0], [-9.0, 23.0]], [[17.0, -44.0], [-3.0, 6.0]]], [[[34.0, 33.0], [-5.0, -22.0]], 
+[[-16.0, 7.0], [-4.0, 8.0]]], [[[8.0, 45.0], [-4.0, 30.0]], [[21.0, -18.0], [34.0, 11.0]]], [[[-9.0, -26.0], [25.0, 17.0]], 
+[[6.0, -35.0], [30.0, 8.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -7.0], [0.0, -7.0], [-7.0, 0.0]], [[-5.0, 5.0], [2.0, -5.0], [0.0, 1.0]]], [[[4.0, 
-6.0], [-2.0, 0.0], [-5.0, 5.0]], [[5.0, -5.0], [3.0, -2.0], [-7.0, 1.0]]], [[[1.0, 7.0], [-7.0, 6.0], [0.0, 0.0]], [[4.0, 
--4.0], [-2.0, 2.0], [-3.0, -7.0]]], [[[5.0, -5.0], [-1.0, -1.0], [0.0, 4.0]], [[1.0, 5.0], [7.0, 0.0], [5.0, 
--1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 3.0], [-4.0, 2.0], [-1.0, -6.0]], [[6.0, 4.0], [5.0, 7.0], [0.0, -5.0]]], [[[7.0, 
--2.0], [-2.0, 0.0], [-6.0, -7.0]], [[-2.0, 0.0], [7.0, 4.0], [3.0, 0.0]]], [[[0.0, -5.0], [-5.0, 0.0], [5.0, 4.0]], [[-3.0, 
-6.0], [0.0, 0.0], [-7.0, 5.0]]], [[[-2.0, 3.0], [0.0, 6.0], [-4.0, -4.0]], [[-5.0, 0.0], [-7.0, -3.0], [-5.0, 1.0]]]])
-      arg1=Data(numpy.array([[[[-7.0, 6.0], [-4.0, 1.0], [-4.0, 0.0]], [[-4.0, 3.0], [0.0, -6.0], [-1.0, -5.0]]], [[[2.0, 
--6.0], [-7.0, -6.0], [1.0, -6.0]], [[-1.0, 2.0], [6.0, -1.0], [-1.0, 1.0]]], [[[-6.0, -5.0], [-5.0, -1.0], [-7.0, 6.0]], [[0.0, 
-0.0], [-6.0, -2.0], [6.0, -2.0]]], [[[-5.0, -4.0], [7.0, 0.0], [-3.0, 3.0]], [[6.0, 7.0], [5.0, -4.0], [6.0, 
--3.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(62.0)+(1.-msk_ref)*numpy.array(51.0)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(1.0)
-      arg1=Data(numpy.array([0.0, -5.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[[0.0, -3.0], [1.0, 4.0]], [[-7.0, -2.0], [2.0, 1.0]], [[0.0, 0.0], [3.0, 5.0]], [[2.0, 1.0], [-4.0, 
+3.0]], [[0.0, 5.0], [-6.0, -1.0]], [[1.0, -2.0], [-3.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(7.0)+(1-msk_arg1)*(-3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-0.0, 30.0])+(1.-msk_ref)*numpy.array([0.0, -5.0])
+      ref=msk_ref*numpy.array([[[0.0, -21.0], [7.0, 28.0]], [[-49.0, -14.0], [14.0, 7.0]], [[0.0, 0.0], [21.0, 35.0]], [[14.0, 
+7.0], [-28.0, 21.0]], [[0.0, 35.0], [-42.0, -7.0]], [[7.0, -14.0], [-21.0, -42.0]]])+(1.-msk_ref)*numpy.array([[[-0.0, 9.0], 
+[-3.0, -12.0]], [[21.0, 6.0], [-6.0, -3.0]], [[-0.0, -0.0], [-9.0, -15.0]], [[-6.0, -3.0], [12.0, -9.0]], [[-0.0, -15.0], 
+[18.0, 3.0]], [[-3.0, 6.0], [9.0, 18.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-1.0, 6.0, -1.0])+(1.-msk_arg0)*numpy.array([4.0, -5.0, -2.0])
-      arg1=Data(numpy.array([[0.0, -3.0], [0.0, 1.0], [6.0, -5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[[[5.0, 1.0], [0.0, 3.0]], [[0.0, 7.0], [2.0, -3.0]], [[0.0, 5.0], [-3.0, 1.0]], [[-2.0, 1.0], [-7.0, 
+-5.0]], [[6.0, -2.0], [-7.0, 2.0]], [[2.0, -4.0], [-3.0, -7.0]]], [[[-3.0, -4.0], [-5.0, -5.0]], [[-4.0, -2.0], [-6.0, 1.0]], 
+[[-6.0, -3.0], [0.0, 7.0]], [[3.0, 2.0], [3.0, -4.0]], [[1.0, 2.0], [-4.0, 7.0]], [[0.0, -2.0], [-3.0, -3.0]]], [[[1.0, 6.0], 
+[-6.0, 0.0]], [[-2.0, -5.0], [-7.0, -6.0]], [[0.0, -7.0], [-2.0, -2.0]], [[-5.0, 1.0], [0.0, 6.0]], [[-4.0, -7.0], [-1.0, 
+3.0]], [[-2.0, -3.0], [-5.0, -2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-1.0, -5.0, 1.0])+(1.-msk_arg1)*numpy.array([-2.0, -4.0, 7.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-6.0, 14.0])+(1.-msk_ref)*numpy.array([-12.0, -7.0])
+      ref=msk_ref*numpy.array([[[11.0, 25.0], [19.0, 22.0]], [[18.0, -2.0], [21.0, -8.0]], [[30.0, 3.0], [1.0, -38.0]], 
+[[-18.0, -10.0], [-8.0, 31.0]], [[-15.0, -15.0], [26.0, -34.0]], [[-4.0, 11.0], [13.0, 
+20.0]]])+(1.-msk_ref)*numpy.array([[[9.0, 56.0], [-22.0, 14.0]], [[2.0, -41.0], [-29.0, -40.0]], [[24.0, -47.0], [-8.0, 
+-44.0]], [[-43.0, -3.0], [2.0, 68.0]], [[-44.0, -53.0], [23.0, -11.0]], [[-18.0, -5.0], [-17.0, 12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-2.0, 1.0, 7.0], [-2.0, 0.0, -3.0]])+(1.-msk_arg0)*numpy.array([[1.0, 3.0, 1.0], [7.0, 6.0, 
--2.0]])
-      arg1=Data(numpy.array([[[-2.0, -6.0], [-5.0, -3.0], [2.0, 1.0]], [[-6.0, -3.0], [3.0, -3.0], [-5.0, 
--7.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank1_offset0(self):
+      arg0=numpy.array([[[1.0, 0.0], [5.0, 0.0]], [[-6.0, -5.0], [4.0, 1.0]], [[5.0, -7.0], [-7.0, -2.0]], [[-7.0, -6.0], [7.0, 
+-7.0]], [[6.0, -1.0], [-4.0, -1.0]], [[-5.0, -6.0], [-3.0, 3.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, -2.0])+(1.-msk_arg1)*numpy.array([-3.0, 2.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([40.0, 43.0])+(1.-msk_ref)*numpy.array([-29.0, -39.0])
+      ref=msk_ref*numpy.array([[[[0.0, -2.0], [0.0, 0.0]], [[0.0, -10.0], [0.0, 0.0]]], [[[0.0, 12.0], [0.0, 10.0]], [[0.0, 
+-8.0], [0.0, -2.0]]], [[[0.0, -10.0], [0.0, 14.0]], [[0.0, 14.0], [0.0, 4.0]]], [[[0.0, 14.0], [0.0, 12.0]], [[0.0, -14.0], 
+[0.0, 14.0]]], [[[0.0, -12.0], [0.0, 2.0]], [[0.0, 8.0], [0.0, 2.0]]], [[[0.0, 10.0], [0.0, 12.0]], [[0.0, 6.0], [0.0, 
+-6.0]]]])+(1.-msk_ref)*numpy.array([[[[-3.0, 2.0], [0.0, 0.0]], [[-15.0, 10.0], [0.0, 0.0]]], [[[18.0, -12.0], [15.0, -10.0]], 
+[[-12.0, 8.0], [-3.0, 2.0]]], [[[-15.0, 10.0], [21.0, -14.0]], [[21.0, -14.0], [6.0, -4.0]]], [[[21.0, -14.0], [18.0, -12.0]], 
+[[-21.0, 14.0], [21.0, -14.0]]], [[[-18.0, 12.0], [3.0, -2.0]], [[12.0, -8.0], [3.0, -2.0]]], [[[15.0, -10.0], [18.0, -12.0]], 
+[[9.0, -6.0], [-9.0, 6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[6.0, -5.0, -3.0], [5.0, 0.0, -7.0], [4.0, 5.0, 0.0], [-2.0, 6.0, 0.0]], [[-4.0, -1.0, -2.0], 
-[-3.0, 2.0, -5.0], [3.0, -6.0, 1.0], [6.0, -3.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[5.0, -2.0, 0.0], [7.0, 3.0, -3.0], 
-[-5.0, -4.0, 2.0], [6.0, -3.0, -5.0]], [[5.0, -5.0, -4.0], [-5.0, -4.0, 5.0], [5.0, 4.0, 1.0], [0.0, 4.0, 4.0]]])
-      arg1=Data(numpy.array([[[[3.0, -3.0], [0.0, -1.0], [-2.0, 6.0]], [[-7.0, 7.0], [-6.0, -3.0], [-2.0, 5.0]], [[-6.0, -7.0], 
-[-3.0, -5.0], [-7.0, 2.0]], [[6.0, -1.0], [0.0, -4.0], [1.0, 1.0]]], [[[-5.0, -4.0], [0.0, 5.0], [0.0, 0.0]], [[0.0, -6.0], 
-[4.0, 4.0], [1.0, 5.0]], [[3.0, 4.0], [-1.0, 2.0], [1.0, 4.0]], [[-3.0, 2.0], [2.0, 7.0], [6.0, 0.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[[[-5.0, -1.0], [-6.0, 5.0]], [[5.0, 5.0], [7.0, -2.0]], [[4.0, -2.0], [-3.0, 0.0]], [[-6.0, 3.0], 
+[5.0, 1.0]], [[-3.0, 3.0], [0.0, 1.0]], [[6.0, 3.0], [-2.0, -6.0]]], [[[3.0, -1.0], [2.0, 1.0]], [[4.0, 1.0], [7.0, 5.0]], 
+[[7.0, 3.0], [0.0, 0.0]], [[7.0, -2.0], [-5.0, -1.0]], [[0.0, 7.0], [-3.0, 7.0]], [[6.0, 2.0], [-6.0, 1.0]]], [[[6.0, 6.0], 
+[-6.0, -3.0]], [[2.0, 2.0], [-6.0, -3.0]], [[0.0, 7.0], [-5.0, 4.0]], [[4.0, -4.0], [7.0, 6.0]], [[-6.0, -3.0], [3.0, 0.0]], 
+[[4.0, -4.0], [-7.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, 0.0], [-3.0, 0.0], [-7.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 1.0], [-7.0, -7.0], 
+[-6.0, -4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-39.0, -99.0])+(1.-msk_ref)*numpy.array([21.0, 126.0])
+      ref=msk_ref*numpy.array([[[[-16.0, 6.0], [-32.0, 6.0]], [[78.0, -6.0], [-17.0, -3.0]]], [[[-61.0, 2.0], [-52.0, 2.0]], 
+[[-28.0, -6.0], [20.0, -3.0]]], [[[-49.0, 0.0], [-44.0, 7.0]], [[56.0, -5.0], [-28.0, 4.0]]], [[[-7.0, 4.0], [13.0, -4.0]], 
+[[-69.0, 7.0], [-46.0, 6.0]]], [[[63.0, -6.0], [-21.0, -3.0]], [[-12.0, 3.0], [-28.0, 0.0]]], [[[-88.0, 4.0], [1.0, -4.0]], 
+[[81.0, -7.0], [4.0, 5.0]]]])+(1.-msk_ref)*numpy.array([[[[-37.0, -50.0], [-25.0, -18.0]], [[46.0, 4.0], [-9.0, 10.0]]], 
+[[[-60.0, -31.0], [-39.0, -10.0]], [[-41.0, -18.0], [-9.0, -25.0]]], [[[-65.0, -45.0], [-55.0, -51.0]], [[42.0, 17.0], [-24.0, 
+-16.0]]], [[[-49.0, -71.0], [26.0, 33.0]], [[-27.0, 12.0], [-33.0, -16.0]]], [[[48.0, 21.0], [-43.0, -34.0]], [[3.0, 9.0], 
+[-53.0, -48.0]]], [[[-90.0, -52.0], [-2.0, 5.0]], [[92.0, 68.0], [-13.0, -33.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-6.0)
-      arg1=Data(numpy.array([[6.0, 6.0, -5.0, -1.0, -2.0], [-4.0, 5.0, 0.0, -6.0, 6.0], [2.0, 7.0, 4.0, -5.0, 2.0], [1.0, 4.0, 
--4.0, 0.0, 5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, 0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0, 0.0], [0.0, 
-0.0, -0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-36.0, -36.0, 30.0, 6.0, 12.0], [24.0, -30.0, -0.0, 36.0, -36.0], [-12.0, 
--42.0, -24.0, 30.0, -12.0], [-6.0, -24.0, 24.0, -0.0, -30.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_float_rank0_offset0(self):
+      arg0=numpy.array([[[[5.0, 6.0, 3.0, 5.0], [0.0, 2.0, 3.0, -4.0], [-1.0, 6.0, 6.0, -7.0]], [[-7.0, 0.0, 7.0, -7.0], [4.0, 
+7.0, -5.0, 0.0], [-4.0, -6.0, -2.0, -3.0]]], [[[-6.0, -3.0, -4.0, 5.0], [1.0, 0.0, -7.0, 6.0], [2.0, -1.0, -1.0, 7.0]], [[2.0, 
+0.0, 4.0, 3.0], [-4.0, -6.0, 0.0, 0.0], [-2.0, 7.0, -2.0, -3.0]]], [[[-3.0, -5.0, -6.0, -1.0], [-1.0, 0.0, -6.0, 1.0], [5.0, 
+-3.0, 0.0, -6.0]], [[-1.0, 1.0, 7.0, -7.0], [-6.0, 7.0, 5.0, 5.0], [3.0, 7.0, 3.0, -7.0]]]])
+      arg1=7.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[35.0, 42.0, 21.0, 35.0], [0.0, 14.0, 21.0, -28.0], [-7.0, 42.0, 42.0, -49.0]], [[-49.0, 0.0, 49.0, 
+-49.0], [28.0, 49.0, -35.0, 0.0], [-28.0, -42.0, -14.0, -21.0]]], [[[-42.0, -21.0, -28.0, 35.0], [7.0, 0.0, -49.0, 42.0], 
+[14.0, -7.0, -7.0, 49.0]], [[14.0, 0.0, 28.0, 21.0], [-28.0, -42.0, 0.0, 0.0], [-14.0, 49.0, -14.0, -21.0]]], [[[-21.0, -35.0, 
+-42.0, -7.0], [-7.0, 0.0, -42.0, 7.0], [35.0, -21.0, 0.0, -42.0]], [[-7.0, 7.0, 49.0, -49.0], [-42.0, 49.0, 35.0, 35.0], [21.0, 
+49.0, 21.0, -49.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, 2.0, 5.0])+(1.-msk_arg0)*numpy.array([-7.0, 3.0, 5.0])
-      arg1=Data(numpy.array([[[5.0, 5.0, 0.0, 3.0, 1.0], [6.0, -5.0, -7.0, -5.0, -5.0], [-1.0, -2.0, 5.0, 6.0, -6.0], [1.0, 
--7.0, 4.0, -1.0, 2.0]], [[3.0, 1.0, 7.0, -2.0, 1.0], [6.0, 3.0, 0.0, -1.0, 2.0], [0.0, -1.0, -3.0, -3.0, 5.0], [5.0, -4.0, 
--2.0, 5.0, -5.0]], [[2.0, -1.0, -6.0, 6.0, -4.0], [3.0, 0.0, -7.0, -2.0, 4.0], [-1.0, 3.0, 4.0, -3.0, -7.0], [-7.0, -3.0, -1.0, 
-2.0, 5.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[51.0, 32.0, -16.0, 47.0, -11.0], [69.0, -29.0, -84.0, -47.0, -11.0], [-12.0, -1.0, 49.0, 21.0, 
--67.0], [-18.0, -72.0, 19.0, 13.0, 29.0]])+(1.-msk_ref)*numpy.array([[-16.0, -37.0, -9.0, 3.0, -24.0], [-9.0, 44.0, 14.0, 22.0, 
-61.0], [2.0, 26.0, -24.0, -66.0, 22.0], [-27.0, 22.0, -39.0, 32.0, -4.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_array_rank4_array_rank0_offset0(self):
+      arg0=numpy.array([[[[4.0, -5.0, -7.0, 5.0], [0.0, -1.0, 0.0, 2.0], [2.0, -4.0, 0.0, 2.0]], [[-1.0, 3.0, -4.0, -4.0], 
+[0.0, 6.0, -7.0, 5.0], [0.0, 7.0, -1.0, -4.0]]], [[[5.0, 5.0, 7.0, -7.0], [0.0, 7.0, 0.0, -4.0], [0.0, 2.0, 6.0, 5.0]], [[0.0, 
+1.0, -4.0, 6.0], [0.0, -3.0, -6.0, 4.0], [-4.0, 6.0, -4.0, 2.0]]], [[[-6.0, 1.0, 0.0, -3.0], [1.0, -7.0, 6.0, -4.0], [1.0, 
+-1.0, -1.0, 0.0]], [[-7.0, 6.0, 0.0, 4.0], [-7.0, -2.0, -4.0, -6.0], [-3.0, 4.0, 2.0, -6.0]]]])
+      arg1=numpy.array(-4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-16.0, 20.0, 28.0, -20.0], [-0.0, 4.0, -0.0, -8.0], [-8.0, 16.0, -0.0, -8.0]], [[4.0, -12.0, 16.0, 
+16.0], [-0.0, -24.0, 28.0, -20.0], [-0.0, -28.0, 4.0, 16.0]]], [[[-20.0, -20.0, -28.0, 28.0], [-0.0, -28.0, -0.0, 16.0], [-0.0, 
+-8.0, -24.0, -20.0]], [[-0.0, -4.0, 16.0, -24.0], [-0.0, 12.0, 24.0, -16.0], [16.0, -24.0, 16.0, -8.0]]], [[[24.0, -4.0, -0.0, 
+12.0], [-4.0, 28.0, -24.0, 16.0], [-4.0, 4.0, 4.0, -0.0]], [[28.0, -24.0, -0.0, -16.0], [28.0, 8.0, 16.0, 24.0], [12.0, -16.0, 
+-8.0, 24.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[2.0, 5.0, 7.0], [-5.0, -7.0, -1.0]])+(1.-msk_arg0)*numpy.array([[7.0, -4.0, 1.0], [-1.0, 
--4.0, -1.0]])
-      arg1=Data(numpy.array([[[[-2.0, 0.0, 1.0, 3.0, -4.0], [0.0, -7.0, -5.0, -1.0, -5.0], [-6.0, -2.0, -1.0, 7.0, 1.0], [2.0, 
--5.0, 7.0, 4.0, 6.0]], [[6.0, 3.0, 4.0, -6.0, 4.0], [-4.0, 1.0, -6.0, -6.0, -1.0], [-6.0, 1.0, 0.0, 2.0, 0.0], [0.0, -3.0, 0.0, 
-7.0, 3.0]], [[-4.0, -6.0, 3.0, -2.0, 4.0], [2.0, 4.0, 3.0, -3.0, -1.0], [-1.0, -2.0, 7.0, -7.0, 2.0], [0.0, -5.0, -6.0, -6.0, 
--1.0]]], [[[0.0, 0.0, 7.0, -5.0, 7.0], [3.0, -1.0, -4.0, 0.0, -5.0], [7.0, -7.0, -6.0, 2.0, 7.0], [-1.0, 7.0, -7.0, 2.0, 
--4.0]], [[7.0, -2.0, 2.0, 5.0, -7.0], [-7.0, -1.0, -1.0, 2.0, 3.0], [-6.0, 4.0, -2.0, 1.0, 2.0], [-2.0, -7.0, 7.0, 1.0, -1.0]], 
-[[-7.0, 0.0, -4.0, -4.0, 1.0], [-3.0, -7.0, -6.0, -5.0, -1.0], [-7.0, 0.0, -4.0, 7.0, 7.0], [7.0, 4.0, 5.0, -4.0, 
--5.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-44.0, -13.0, -2.0, -44.0, 53.0], [31.0, 38.0, 14.0, -62.0, -17.0], [-35.0, -6.0, 95.0, -49.0, 
--40.0], [16.0, -50.0, -47.0, -12.0, 52.0]])+(1.-msk_ref)*numpy.array([[-63.0, -10.0, -17.0, 32.0, -20.0], [46.0, -37.0, 6.0, 
-11.0, -38.0], [5.0, -29.0, 18.0, 21.0, -13.0], [16.0, -11.0, 17.0, -8.0, 42.0]])
+   def test_generalTransposedTensorProduct_array_rank4_constData_rank0_offset0(self):
+      arg0=numpy.array([[[[-4.0, -6.0, 1.0, 3.0], [0.0, -7.0, -3.0, 6.0], [-5.0, 2.0, 1.0, 6.0]], [[-7.0, -7.0, 4.0, 2.0], 
+[3.0, 1.0, 3.0, 1.0], [0.0, 0.0, 5.0, -2.0]]], [[[-1.0, 1.0, -1.0, -1.0], [7.0, 0.0, -4.0, -1.0], [5.0, 0.0, 7.0, -5.0]], 
+[[4.0, 3.0, -7.0, 7.0], [2.0, 0.0, 4.0, 3.0], [-1.0, 3.0, -2.0, -5.0]]], [[[-5.0, 3.0, -5.0, -3.0], [0.0, -1.0, 3.0, 6.0], 
+[-5.0, -3.0, -5.0, 1.0]], [[-1.0, 0.0, 1.0, -5.0], [1.0, -4.0, -5.0, -4.0], [-5.0, 4.0, 0.0, 3.0]]]])
+      arg1=Data(7.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-28.0, -42.0, 7.0, 21.0], [0.0, -49.0, -21.0, 42.0], [-35.0, 14.0, 7.0, 42.0]], [[-49.0, -49.0, 
+28.0, 14.0], [21.0, 7.0, 21.0, 7.0], [0.0, 0.0, 35.0, -14.0]]], [[[-7.0, 7.0, -7.0, -7.0], [49.0, 0.0, -28.0, -7.0], [35.0, 
+0.0, 49.0, -35.0]], [[28.0, 21.0, -49.0, 49.0], [14.0, 0.0, 28.0, 21.0], [-7.0, 21.0, -14.0, -35.0]]], [[[-35.0, 21.0, -35.0, 
+-21.0], [0.0, -7.0, 21.0, 42.0], [-35.0, -21.0, -35.0, 7.0]], [[-7.0, 0.0, 7.0, -35.0], [7.0, -28.0, -35.0, -28.0], [-35.0, 
+28.0, 0.0, 21.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_constData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(3.0)
-      arg1=Data(numpy.array([[[-6.0, -3.0], [2.0, -2.0]], [[1.0, 6.0], [4.0, 0.0]], [[-7.0, 7.0], [1.0, 4.0]], [[-3.0, 1.0], 
-[-2.0, -3.0]], [[7.0, -6.0], [-6.0, 2.0]], [[5.0, 0.0], [-3.0, 0.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[[[3.0, 5.0, 6.0, 1.0], [3.0, 0.0, 6.0, -5.0], [4.0, 6.0, 0.0, -4.0]], [[-7.0, 0.0, 0.0, -5.0], [6.0, 
+5.0, -7.0, -2.0], [-5.0, -6.0, -5.0, -6.0]]], [[[0.0, 6.0, 0.0, 3.0], [-4.0, 2.0, 3.0, 0.0], [-4.0, -3.0, 3.0, 5.0]], [[4.0, 
+7.0, -1.0, -5.0], [0.0, 7.0, -5.0, -5.0], [-3.0, -1.0, 6.0, 6.0]]], [[[-7.0, 4.0, -2.0, 2.0], [3.0, 5.0, 7.0, -4.0], [5.0, 3.0, 
+-5.0, -2.0]], [[4.0, -2.0, 3.0, 0.0], [-1.0, -5.0, -3.0, -4.0], [-6.0, 4.0, 7.0, -5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(2.0)+(1-msk_arg1)*(-5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-36.0, -18.0], [12.0, -12.0]], [[6.0, 36.0], [24.0, 0.0]], [[-42.0, 42.0], [6.0, 24.0]], 
-[[-18.0, 6.0], [-12.0, -18.0]], [[42.0, -36.0], [-36.0, 12.0]], [[30.0, 0.0], [-18.0, 
-0.0]]])+(1.-msk_ref)*numpy.array([[[-18.0, -9.0], [6.0, -6.0]], [[3.0, 18.0], [12.0, 0.0]], [[-21.0, 21.0], [3.0, 12.0]], 
-[[-9.0, 3.0], [-6.0, -9.0]], [[21.0, -18.0], [-18.0, 6.0]], [[15.0, 0.0], [-9.0, 0.0]]])
+      ref=msk_ref*numpy.array([[[[6.0, 10.0, 12.0, 2.0], [6.0, 0.0, 12.0, -10.0], [8.0, 12.0, 0.0, -8.0]], [[-14.0, 0.0, 0.0, 
+-10.0], [12.0, 10.0, -14.0, -4.0], [-10.0, -12.0, -10.0, -12.0]]], [[[0.0, 12.0, 0.0, 6.0], [-8.0, 4.0, 6.0, 0.0], [-8.0, -6.0, 
+6.0, 10.0]], [[8.0, 14.0, -2.0, -10.0], [0.0, 14.0, -10.0, -10.0], [-6.0, -2.0, 12.0, 12.0]]], [[[-14.0, 8.0, -4.0, 4.0], [6.0, 
+10.0, 14.0, -8.0], [10.0, 6.0, -10.0, -4.0]], [[8.0, -4.0, 6.0, 0.0], [-2.0, -10.0, -6.0, -8.0], [-12.0, 8.0, 14.0, 
+-10.0]]]])+(1.-msk_ref)*numpy.array([[[[-15.0, -25.0, -30.0, -5.0], [-15.0, -0.0, -30.0, 25.0], [-20.0, -30.0, -0.0, 20.0]], 
+[[35.0, -0.0, -0.0, 25.0], [-30.0, -25.0, 35.0, 10.0], [25.0, 30.0, 25.0, 30.0]]], [[[-0.0, -30.0, -0.0, -15.0], [20.0, -10.0, 
+-15.0, -0.0], [20.0, 15.0, -15.0, -25.0]], [[-20.0, -35.0, 5.0, 25.0], [-0.0, -35.0, 25.0, 25.0], [15.0, 5.0, -30.0, -30.0]]], 
+[[[35.0, -20.0, 10.0, -10.0], [-15.0, -25.0, -35.0, 20.0], [-25.0, -15.0, 25.0, 10.0]], [[-20.0, 10.0, -15.0, -0.0], [5.0, 
+25.0, 15.0, 20.0], [30.0, -20.0, -35.0, 25.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([4.0, -5.0, -5.0])+(1.-msk_arg0)*numpy.array([-5.0, -7.0, 0.0])
-      arg1=Data(numpy.array([[[[1.0, -1.0], [-7.0, -4.0]], [[-6.0, 6.0], [4.0, 2.0]], [[-5.0, -1.0], [6.0, -5.0]], [[0.0, 
--5.0], [-2.0, -3.0]], [[-6.0, 0.0], [5.0, 6.0]], [[-1.0, -7.0], [7.0, -2.0]]], [[[-4.0, 0.0], [2.0, -6.0]], [[5.0, -2.0], [1.0, 
-7.0]], [[3.0, -7.0], [3.0, 2.0]], [[-2.0, 0.0], [3.0, -6.0]], [[7.0, 3.0], [-7.0, 5.0]], [[-7.0, -6.0], [-4.0, 3.0]]], [[[-4.0, 
-7.0], [0.0, -7.0]], [[-6.0, -4.0], [-2.0, -2.0]], [[0.0, 5.0], [-4.0, 6.0]], [[6.0, 1.0], [-7.0, 3.0]], [[3.0, 3.0], [-4.0, 
--2.0]], [[-5.0, 6.0], [-5.0, -5.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[44.0, -39.0], [-38.0, 49.0]], [[-19.0, 54.0], [21.0, -17.0]], [[-35.0, 6.0], [29.0, -60.0]], 
-[[-20.0, -25.0], [12.0, 3.0]], [[-74.0, -30.0], [75.0, 9.0]], [[56.0, -28.0], [73.0, 2.0]]])+(1.-msk_ref)*numpy.array([[[23.0, 
-5.0], [21.0, 62.0]], [[-5.0, -16.0], [-27.0, -59.0]], [[4.0, 54.0], [-51.0, 11.0]], [[14.0, 25.0], [-11.0, 57.0]], [[-19.0, 
--21.0], [24.0, -65.0]], [[54.0, 77.0], [-7.0, -11.0]]])
+   def test_generalTransposedTensorProduct_constData_rank0_float_rank0_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg1=5.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-5.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_constData_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(2.0)+(1-msk_arg0)*(3.0)
-      arg1=Data(numpy.array([[[[5.0, 1.0, -5.0, -7.0], [7.0, 4.0, 7.0, 2.0], [-4.0, 5.0, -3.0, 2.0]], [[5.0, 1.0, -6.0, -1.0], 
-[-4.0, -6.0, -5.0, 0.0], [4.0, 2.0, 7.0, 0.0]]], [[[-6.0, 6.0, 0.0, 0.0], [5.0, 7.0, 6.0, -3.0], [-3.0, -6.0, 3.0, -1.0]], 
-[[-2.0, 6.0, 7.0, -5.0], [-2.0, -7.0, 1.0, 5.0], [-5.0, 6.0, 3.0, 0.0]]], [[[1.0, 2.0, -6.0, 7.0], [2.0, 6.0, -5.0, -4.0], 
-[-2.0, -7.0, 7.0, 5.0]], [[-2.0, -2.0, 3.0, 3.0], [4.0, 5.0, -4.0, -3.0], [2.0, -3.0, 5.0, -6.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 2.0, -10.0, -14.0], [14.0, 8.0, 14.0, 4.0], [-8.0, 10.0, -6.0, 4.0]], [[10.0, 2.0, 
--12.0, -2.0], [-8.0, -12.0, -10.0, 0.0], [8.0, 4.0, 14.0, 0.0]]], [[[-12.0, 12.0, 0.0, 0.0], [10.0, 14.0, 12.0, -6.0], [-6.0, 
--12.0, 6.0, -2.0]], [[-4.0, 12.0, 14.0, -10.0], [-4.0, -14.0, 2.0, 10.0], [-10.0, 12.0, 6.0, 0.0]]], [[[2.0, 4.0, -12.0, 14.0], 
-[4.0, 12.0, -10.0, -8.0], [-4.0, -14.0, 14.0, 10.0]], [[-4.0, -4.0, 6.0, 6.0], [8.0, 10.0, -8.0, -6.0], [4.0, -6.0, 10.0, 
--12.0]]]])+(1.-msk_ref)*numpy.array([[[[15.0, 3.0, -15.0, -21.0], [21.0, 12.0, 21.0, 6.0], [-12.0, 15.0, -9.0, 6.0]], [[15.0, 
-3.0, -18.0, -3.0], [-12.0, -18.0, -15.0, 0.0], [12.0, 6.0, 21.0, 0.0]]], [[[-18.0, 18.0, 0.0, 0.0], [15.0, 21.0, 18.0, -9.0], 
-[-9.0, -18.0, 9.0, -3.0]], [[-6.0, 18.0, 21.0, -15.0], [-6.0, -21.0, 3.0, 15.0], [-15.0, 18.0, 9.0, 0.0]]], [[[3.0, 6.0, -18.0, 
-21.0], [6.0, 18.0, -15.0, -12.0], [-6.0, -21.0, 21.0, 15.0]], [[-6.0, -6.0, 9.0, 9.0], [12.0, 15.0, -12.0, -9.0], [6.0, -9.0, 
-15.0, -18.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank0_array_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg1=numpy.array(-4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-8.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-3.0)+(1-msk_arg0)*(2.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(5.0)+(1-msk_arg1)*(2.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-15.0)+(1.-msk_ref)*numpy.array(4.0)
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank1_offset1(self):
+      arg0=Data(numpy.array([3.0, -2.0, 6.0]),self.functionspace)
+      arg1=numpy.array([-3.0, -7.0, -2.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-7.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, 7.0, 0.0])+(1.-msk_arg0)*numpy.array([-5.0, -6.0, 6.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([5.0, 0.0, -6.0])+(1.-msk_arg1)*numpy.array([-2.0, -2.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-25.0)+(1.-msk_ref)*numpy.array(22.0)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, -6.0, 6.0], [0.0, 7.0, -5.0]])+(1.-msk_arg0)*numpy.array([[0.0, -7.0, 2.0], [-1.0, 5.0, 
--2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, -3.0, -1.0], [-7.0, 0.0, 0.0]])+(1.-msk_arg1)*numpy.array([[6.0, 3.0, 6.0], [1.0, 5.0, 
-1.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(47.0)+(1.-msk_ref)*numpy.array(13.0)
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[-7.0, -2.0, 0.0], [-5.0, 0.0, -3.0]]),self.functionspace)
+      arg1=numpy.array([[5.0, -5.0, 0.0], [-1.0, 0.0, -1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-17.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 4.0, 1.0], [0.0, 0.0, 2.0], [0.0, -4.0, 2.0], [1.0, -2.0, -4.0]], [[-7.0, 6.0, 7.0], 
-[-7.0, -3.0, 6.0], [1.0, 5.0, -4.0], [-4.0, 5.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, -7.0, -3.0], [4.0, 5.0, 0.0], [-2.0, 
--1.0, 7.0], [2.0, 5.0, 5.0]], [[7.0, 4.0, 2.0], [-3.0, -7.0, -4.0], [-5.0, -2.0, 4.0], [2.0, 3.0, 2.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, -2.0, -2.0], [2.0, 3.0, 1.0], [2.0, -7.0, 3.0], [-1.0, 3.0, -7.0]], [[-1.0, 0.0, -5.0], 
-[5.0, -3.0, 5.0], [-6.0, -6.0, -3.0], [-4.0, -3.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 0.0, -3.0], [6.0, 0.0, -7.0], 
-[-2.0, 1.0, 2.0], [-3.0, -7.0, 0.0]], [[-1.0, 5.0, 5.0], [3.0, -3.0, -4.0], [-2.0, 4.0, 0.0], [-5.0, -7.0, 2.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-17.0)+(1.-msk_ref)*numpy.array(32.0)
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-3.0, 4.0, -1.0], [-3.0, 7.0, 1.0], [-6.0, 6.0, -7.0], [6.0, 7.0, -5.0]], [[-6.0, 7.0, 1.0], 
+[3.0, -7.0, -1.0], [6.0, 4.0, -1.0], [-4.0, 7.0, 6.0]]]),self.functionspace)
+      arg1=numpy.array([[[-5.0, -4.0, -5.0], [7.0, 0.0, -5.0], [-6.0, -3.0, -5.0], [-7.0, -3.0, 4.0]], [[-4.0, 1.0, 4.0], [3.0, 
+3.0, -5.0], [2.0, 0.0, 6.0], [-4.0, 5.0, -6.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-3.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[1.0, -7.0], [-7.0, 3.0], [3.0, -2.0]], [[-7.0, 4.0], [1.0, -3.0], [6.0, -7.0]]], [[[-4.0, 
-0.0], [-4.0, 5.0], [-4.0, -4.0]], [[0.0, 6.0], [5.0, 2.0], [1.0, 0.0]]], [[[0.0, 2.0], [-5.0, -7.0], [-5.0, 0.0]], [[-2.0, 
--4.0], [0.0, 1.0], [0.0, -7.0]]], [[[-6.0, 0.0], [-4.0, -3.0], [7.0, 3.0]], [[-5.0, -3.0], [-3.0, 2.0], [-3.0, 
-7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 5.0], [-4.0, -1.0], [4.0, 0.0]], [[-2.0, 7.0], [-4.0, -5.0], [-5.0, 7.0]]], 
-[[[-5.0, 3.0], [-7.0, -6.0], [-6.0, -4.0]], [[6.0, -3.0], [1.0, -2.0], [1.0, 2.0]]], [[[-1.0, -4.0], [6.0, -2.0], [1.0, 4.0]], 
-[[0.0, 0.0], [-2.0, -6.0], [4.0, -7.0]]], [[[-3.0, -7.0], [0.0, -2.0], [-6.0, -1.0]], [[0.0, -3.0], [4.0, 1.0], [-1.0, 0.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[3.0, -5.0], [-7.0, 1.0], [-4.0, -6.0]], [[-6.0, -3.0], [-2.0, -2.0], [5.0, -7.0]]], [[[0.0, 
-0.0], [0.0, 0.0], [2.0, 2.0]], [[4.0, -6.0], [-1.0, -7.0], [4.0, -7.0]]], [[[3.0, -1.0], [5.0, -3.0], [-7.0, -3.0]], [[-4.0, 
--4.0], [0.0, 2.0], [-5.0, 0.0]]], [[[2.0, 1.0], [-1.0, -6.0], [0.0, 3.0]], [[6.0, 0.0], [-4.0, -4.0], [-3.0, 
-2.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, 0.0], [-1.0, 0.0], [-5.0, 3.0]], [[-5.0, -2.0], [1.0, 6.0], [2.0, 6.0]]], [[[-5.0, 
--5.0], [6.0, 6.0], [3.0, -4.0]], [[6.0, 6.0], [3.0, 6.0], [-7.0, -2.0]]], [[[5.0, -7.0], [-3.0, 7.0], [-2.0, 7.0]], [[-7.0, 
-7.0], [7.0, 2.0], [7.0, 4.0]]], [[[-5.0, 5.0], [-4.0, -2.0], [0.0, -5.0]], [[3.0, 7.0], [5.0, -4.0], [-3.0, 2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(207.0)+(1.-msk_ref)*numpy.array(-110.0)
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-7.0, -5.0], [-3.0, -4.0], [-1.0, 3.0]], [[0.0, -7.0], [-1.0, 0.0], [-5.0, 0.0]]], [[[0.0, 
+5.0], [5.0, 1.0], [-5.0, 7.0]], [[3.0, -7.0], [-7.0, 5.0], [-6.0, 0.0]]], [[[-6.0, -3.0], [-4.0, 2.0], [5.0, 0.0]], [[-1.0, 
+-5.0], [-2.0, 6.0], [6.0, 6.0]]], [[[-5.0, 5.0], [5.0, -2.0], [3.0, -7.0]], [[-4.0, -7.0], [1.0, 5.0], [0.0, 
+-4.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[4.0, 6.0], [-1.0, 0.0], [-6.0, -5.0]], [[5.0, 6.0], [5.0, 6.0], [4.0, -7.0]]], [[[-2.0, -6.0], 
+[-2.0, 6.0], [-1.0, -3.0]], [[-4.0, 4.0], [3.0, 0.0], [1.0, 0.0]]], [[[-5.0, 0.0], [7.0, 1.0], [-7.0, 0.0]], [[-7.0, -3.0], 
+[-2.0, 0.0], [6.0, -4.0]]], [[[2.0, -6.0], [-3.0, -7.0], [7.0, -5.0]], [[4.0, -7.0], [6.0, 0.0], [4.0, -7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-159.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(0.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-3.0, 1.0])+(1.-msk_arg1)*numpy.array([1.0, 3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-18.0, 6.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
+   def test_generalTransposedTensorProduct_constData_rank0_array_rank1_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg1=numpy.array([-7.0, -6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([7.0, 6.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([3.0, -7.0, -1.0])+(1.-msk_arg0)*numpy.array([2.0, 3.0, 6.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 1.0], [-5.0, 2.0], [-4.0, 0.0]])+(1.-msk_arg1)*numpy.array([[5.0, 2.0], [0.0, -7.0], 
-[-4.0, -6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([24.0, -11.0])+(1.-msk_ref)*numpy.array([-14.0, -53.0])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank2_offset1(self):
+      arg0=Data(numpy.array([-3.0, 3.0, 7.0]),self.functionspace)
+      arg1=numpy.array([[0.0, -1.0], [-7.0, 7.0], [-6.0, 6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-63.0, 66.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 1.0, 0.0], [-2.0, 4.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -1.0, -1.0], [-3.0, 
-3.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, 5.0], [-7.0, 1.0], [-4.0, 0.0]], [[1.0, -3.0], [2.0, 4.0], [2.0, 
--5.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 7.0], [0.0, 2.0], [5.0, 7.0]], [[1.0, -7.0], [-4.0, 3.0], [-1.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([9.0, 73.0])+(1.-msk_ref)*numpy.array([13.0, -14.0])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[-5.0, 6.0, 6.0], [0.0, 0.0, -4.0]]),self.functionspace)
+      arg1=numpy.array([[[-2.0, 0.0], [7.0, 6.0], [6.0, -1.0]], [[-2.0, 2.0], [-3.0, -3.0], [-2.0, -2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([96.0, 38.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-6.0, -4.0, 6.0], [1.0, -2.0, -5.0], [4.0, 4.0, 7.0], [2.0, -6.0, -5.0]], [[2.0, -1.0, 
--2.0], [2.0, 3.0, 3.0], [7.0, 2.0, -6.0], [5.0, -2.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 3.0, 5.0], [3.0, 6.0, -5.0], 
-[-4.0, -2.0, -5.0], [-1.0, 0.0, 6.0]], [[-2.0, 5.0, 5.0], [-4.0, 3.0, 5.0], [-6.0, 0.0, 7.0], [5.0, 3.0, 6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, -7.0], [6.0, -1.0], [-1.0, -5.0]], [[5.0, 1.0], [4.0, 6.0], [-5.0, 4.0]], [[-1.0, 
-0.0], [2.0, -7.0], [0.0, 1.0]], [[5.0, 0.0], [0.0, -3.0], [-7.0, 1.0]]], [[[2.0, 0.0], [-5.0, 3.0], [3.0, 0.0]], [[2.0, -1.0], 
-[-5.0, 6.0], [-4.0, 0.0]], [[-2.0, -3.0], [-4.0, -7.0], [0.0, -4.0]], [[0.0, 0.0], [2.0, 2.0], [-1.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 5.0], [5.0, 0.0], [-2.0, 0.0]], [[-4.0, -4.0], [0.0, -1.0], [-6.0, 5.0]], [[6.0, 
-7.0], [-7.0, 2.0], [7.0, 0.0]], [[7.0, -3.0], [-5.0, -3.0], [3.0, -3.0]]], [[[-6.0, -3.0], [5.0, -6.0], [3.0, -7.0]], [[3.0, 
--6.0], [-2.0, -2.0], [-4.0, 5.0]], [[4.0, -6.0], [1.0, -3.0], [6.0, 0.0]], [[-2.0, 6.0], [-6.0, -7.0], [-7.0, 7.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([22.0, -43.0])+(1.-msk_ref)*numpy.array([-42.0, -14.0])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[1.0, -5.0, 6.0], [-3.0, -3.0, 5.0], [-1.0, -1.0, -4.0], [7.0, -4.0, 3.0]], [[-7.0, 0.0, 0.0], 
+[7.0, 5.0, 3.0], [1.0, -6.0, -5.0], [6.0, -3.0, -3.0]]]),self.functionspace)
+      arg1=numpy.array([[[[4.0, 0.0], [-3.0, -5.0], [-3.0, -5.0]], [[5.0, 0.0], [3.0, -3.0], [6.0, -7.0]], [[2.0, 0.0], [-5.0, 
+6.0], [0.0, -5.0]], [[0.0, 2.0], [-5.0, 4.0], [1.0, 7.0]]], [[[1.0, 0.0], [0.0, 0.0], [-6.0, 6.0]], [[6.0, 0.0], [6.0, 6.0], 
+[-2.0, 7.0]], [[6.0, -4.0], [0.0, 3.0], [-2.0, 1.0]], [[-2.0, -3.0], [1.0, -6.0], [6.0, 2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([75.0, 20.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=3)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(7.0)+(1-msk_arg0)*(4.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, -5.0, 0.0, 2.0, 3.0], [-7.0, -2.0, 5.0, -1.0, 5.0], [-4.0, 2.0, 6.0, 2.0, 2.0], [0.0, 
--7.0, 0.0, -2.0, -7.0]])+(1.-msk_arg1)*numpy.array([[5.0, 0.0, 0.0, -4.0, -4.0], [0.0, 6.0, -7.0, 6.0, 1.0], [0.0, 0.0, -4.0, 
--4.0, -6.0], [0.0, -7.0, 5.0, -1.0, -3.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-14.0, -35.0, 0.0, 14.0, 21.0], [-49.0, -14.0, 35.0, -7.0, 35.0], [-28.0, 14.0, 42.0, 14.0, 
-14.0], [0.0, -49.0, 0.0, -14.0, -49.0]])+(1.-msk_ref)*numpy.array([[20.0, 0.0, 0.0, -16.0, -16.0], [0.0, 24.0, -28.0, 24.0, 
-4.0], [0.0, 0.0, -16.0, -16.0, -24.0], [0.0, -28.0, 20.0, -4.0, -12.0]])
+   def test_generalTransposedTensorProduct_constData_rank0_array_rank2_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg1=numpy.array([[-4.0, -1.0, 2.0, 6.0, 2.0], [-5.0, 4.0, 1.0, -4.0, 6.0], [7.0, 6.0, 7.0, -3.0, -2.0], [-6.0, 0.0, 6.0, 
+3.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-20.0, -5.0, 10.0, 30.0, 10.0], [-25.0, 20.0, 5.0, -20.0, 30.0], [35.0, 30.0, 35.0, -15.0, -10.0], 
+[-30.0, 0.0, 30.0, 15.0, 0.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-6.0, 0.0, 7.0])+(1.-msk_arg0)*numpy.array([5.0, -5.0, -5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, 3.0, 7.0, 1.0, -7.0], [-5.0, -2.0, 2.0, -5.0, 0.0], [-1.0, 5.0, -1.0, 2.0, 2.0], [0.0, 
--4.0, 5.0, -5.0, -6.0]], [[-2.0, -6.0, 0.0, -2.0, -1.0], [0.0, 3.0, 3.0, 2.0, -5.0], [5.0, -1.0, -6.0, 1.0, -1.0], [-2.0, -5.0, 
-1.0, -7.0, 4.0]], [[0.0, -7.0, 2.0, 0.0, 2.0], [-1.0, -3.0, -2.0, 0.0, 2.0], [-5.0, -4.0, 5.0, -4.0, -5.0], [7.0, -1.0, 4.0, 
--2.0, 5.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 2.0, -5.0, -5.0, 7.0], [5.0, 0.0, 0.0, 2.0, -2.0], [3.0, -1.0, 7.0, -4.0, 2.0], 
-[1.0, -1.0, 5.0, 0.0, -2.0]], [[0.0, 0.0, 5.0, -3.0, 7.0], [-4.0, -7.0, -3.0, 1.0, 5.0], [1.0, 6.0, -4.0, 0.0, -2.0], [-5.0, 
-0.0, 7.0, 0.0, 0.0]], [[1.0, -7.0, -1.0, 2.0, 3.0], [-1.0, 1.0, -4.0, 5.0, 4.0], [5.0, -7.0, 0.0, -6.0, 0.0], [-2.0, -6.0, 
--4.0, -3.0, 2.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[30.0, -67.0, -28.0, -6.0, 56.0], [23.0, -9.0, -26.0, 30.0, 14.0], [-29.0, -58.0, 41.0, -40.0, 
--47.0], [49.0, 17.0, -2.0, 16.0, 71.0]])+(1.-msk_ref)*numpy.array([[10.0, 45.0, -45.0, -20.0, -15.0], [50.0, 30.0, 35.0, -20.0, 
--55.0], [-15.0, 0.0, 55.0, 10.0, 20.0], [40.0, 25.0, 10.0, 15.0, -20.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank3_offset1(self):
+      arg0=Data(numpy.array([1.0, -4.0, 4.0]),self.functionspace)
+      arg1=numpy.array([[[-7.0, -7.0, -3.0, 3.0, 0.0], [4.0, 2.0, -2.0, -3.0, -1.0], [-5.0, 4.0, -2.0, 7.0, 5.0], [0.0, -2.0, 
+-1.0, -1.0, 1.0]], [[-7.0, 3.0, 0.0, -3.0, 7.0], [0.0, 2.0, 0.0, -3.0, -6.0], [4.0, 1.0, 6.0, -2.0, -4.0], [-3.0, -7.0, -4.0, 
+-1.0, 1.0]], [[-2.0, 0.0, -5.0, 4.0, -1.0], [-7.0, 2.0, 0.0, -2.0, 7.0], [-2.0, 4.0, 5.0, 6.0, 5.0], [-7.0, 0.0, 4.0, 0.0, 
+-3.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[13.0, -19.0, -23.0, 31.0, -32.0], [-24.0, 2.0, -2.0, 1.0, 51.0], [-29.0, 16.0, -6.0, 39.0, 41.0], 
+[-16.0, 26.0, 31.0, 3.0, -15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[7.0, 2.0, 5.0], [-7.0, -6.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 3.0, -1.0], [2.0, 2.0, 
-4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 2.0, -3.0, 4.0, -1.0], [-7.0, -7.0, -5.0, 3.0, 4.0], [7.0, -6.0, -2.0, -2.0, -3.0], 
-[1.0, 6.0, -7.0, -6.0, -6.0]], [[-6.0, -7.0, -7.0, 6.0, 0.0], [0.0, 2.0, 1.0, -4.0, -1.0], [3.0, -5.0, -6.0, 3.0, 7.0], [-3.0, 
--7.0, -7.0, 1.0, -7.0]], [[-4.0, 5.0, 6.0, 4.0, -7.0], [3.0, 6.0, 5.0, -6.0, 0.0], [0.0, 0.0, -1.0, 7.0, 2.0], [-6.0, 7.0, 
--6.0, 2.0, 6.0]]], [[[1.0, -1.0, -5.0, -4.0, -3.0], [0.0, 1.0, -7.0, 7.0, 7.0], [-7.0, 5.0, -1.0, -6.0, -1.0], [6.0, -6.0, 
--7.0, -1.0, 7.0]], [[-4.0, 3.0, 5.0, -3.0, 0.0], [-5.0, 2.0, 0.0, -4.0, -6.0], [-7.0, -1.0, 0.0, 0.0, 0.0], [4.0, 6.0, 4.0, 
-0.0, -7.0]], [[7.0, 5.0, -3.0, -6.0, 1.0], [-5.0, -5.0, -6.0, 4.0, 0.0], [-3.0, 3.0, 4.0, 1.0, 1.0], [2.0, -1.0, 5.0, 4.0, 
--5.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, 5.0, -7.0, -5.0, 2.0], [2.0, 3.0, -5.0, -2.0, 5.0], [4.0, -4.0, 2.0, 0.0, 7.0], 
-[-2.0, 6.0, -3.0, -3.0, 4.0]], [[5.0, -2.0, -1.0, -4.0, 3.0], [0.0, -1.0, 6.0, -2.0, -6.0], [3.0, 4.0, 5.0, 0.0, 1.0], [-2.0, 
-3.0, 4.0, -5.0, -1.0]], [[0.0, 5.0, -6.0, -6.0, -4.0], [2.0, 7.0, -1.0, 1.0, 5.0], [-1.0, -3.0, -3.0, -6.0, 4.0], [2.0, 5.0, 
-0.0, 5.0, 0.0]]], [[[2.0, 0.0, 3.0, -3.0, -5.0], [-5.0, 0.0, 1.0, -3.0, -6.0], [6.0, 0.0, -3.0, 2.0, 0.0], [-7.0, 4.0, 0.0, 
--4.0, -1.0]], [[1.0, 7.0, -2.0, 1.0, -4.0], [0.0, -3.0, -2.0, -4.0, -5.0], [-2.0, 1.0, 4.0, 0.0, 6.0], [-6.0, -7.0, -3.0, 0.0, 
--6.0]], [[3.0, -6.0, 6.0, -1.0, -5.0], [0.0, 0.0, 7.0, 1.0, 7.0], [-2.0, 1.0, 7.0, 0.0, 0.0], [0.0, 1.0, 2.0, -6.0, 0.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-15.0, 14.0, 0.0, 106.0, -21.0], [-4.0, -34.0, 41.0, -42.0, 13.0], [146.0, -81.0, -24.0, 69.0, 
-10.0], [-95.0, 69.0, -68.0, -23.0, -33.0]])+(1.-msk_ref)*numpy.array([[13.0, -46.0, 64.0, 11.0, -35.0], [-22.0, -31.0, 70.0, 
--7.0, -42.0], [-10.0, 41.0, 38.0, 10.0, -24.0], [-24.0, -28.0, 29.0, -37.0, -37.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[-2.0, 5.0, -2.0], [1.0, 6.0, 0.0]]),self.functionspace)
+      arg1=numpy.array([[[[2.0, 0.0, 2.0, -5.0, -2.0], [4.0, 0.0, -2.0, 1.0, 6.0], [-5.0, 7.0, -5.0, -3.0, -7.0], [-7.0, 3.0, 
+6.0, 3.0, -3.0]], [[0.0, -4.0, -3.0, -5.0, -5.0], [6.0, 3.0, 1.0, 6.0, 5.0], [-3.0, -2.0, 1.0, -3.0, 0.0], [3.0, 3.0, 4.0, 
+-4.0, 2.0]], [[-1.0, -1.0, -6.0, 4.0, -5.0], [-1.0, 1.0, 3.0, -4.0, -1.0], [0.0, -3.0, -4.0, 6.0, 7.0], [-5.0, 1.0, -4.0, -3.0, 
+7.0]]], [[[-5.0, 7.0, -3.0, -2.0, -7.0], [-7.0, 3.0, -7.0, 4.0, -1.0], [4.0, 0.0, 7.0, 4.0, -4.0], [6.0, 4.0, -5.0, 7.0, 
+-6.0]], [[3.0, -2.0, -3.0, 0.0, -5.0], [0.0, 3.0, 7.0, -1.0, -7.0], [0.0, -6.0, -5.0, -5.0, -2.0], [5.0, 3.0, 4.0, 1.0, 0.0]], 
+[[1.0, 1.0, 0.0, 7.0, 7.0], [-1.0, 2.0, 5.0, 2.0, -3.0], [2.0, 3.0, -1.0, -7.0, 2.0], [7.0, -7.0, 7.0, 0.0, 6.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[11.0, -23.0, -28.0, -25.0, -48.0], [17.0, 34.0, 38.0, 34.0, -28.0], [-1.0, -54.0, 0.0, -47.0, 
+-16.0], [75.0, 29.0, 35.0, -7.0, -4.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_expandedData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(7.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, 3.0], [3.0, 1.0]], [[7.0, -2.0], [-7.0, 4.0]], [[3.0, 6.0], [3.0, -1.0]], [[-2.0, 
-7.0], [2.0, -4.0]], [[-7.0, 1.0], [-3.0, -3.0]], [[6.0, -3.0], [1.0, -6.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, -4.0], [0.0, 
-6.0]], [[1.0, 4.0], [-5.0, -7.0]], [[4.0, 5.0], [0.0, -7.0]], [[5.0, -2.0], [-1.0, -2.0]], [[2.0, 5.0], [-1.0, 7.0]], [[2.0, 
--7.0], [4.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[25.0, -15.0], [-15.0, -5.0]], [[-35.0, 10.0], [35.0, -20.0]], [[-15.0, -30.0], [-15.0, 5.0]], 
-[[10.0, -35.0], [-10.0, 20.0]], [[35.0, -5.0], [15.0, 15.0]], [[-30.0, 15.0], [-5.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[14.0, 
--28.0], [0.0, 42.0]], [[7.0, 28.0], [-35.0, -49.0]], [[28.0, 35.0], [0.0, -49.0]], [[35.0, -14.0], [-7.0, -14.0]], [[14.0, 
-35.0], [-7.0, 49.0]], [[14.0, -49.0], [28.0, 0.0]]])
+   def test_generalTransposedTensorProduct_constData_rank0_array_rank3_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      arg1=numpy.array([[[5.0, 0.0], [3.0, 5.0]], [[-5.0, 0.0], [-2.0, 7.0]], [[7.0, -4.0], [0.0, 0.0]], [[-1.0, 0.0], [-1.0, 
+-4.0]], [[1.0, -4.0], [1.0, 1.0]], [[4.0, 5.0], [-1.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[30.0, 0.0], [18.0, 30.0]], [[-30.0, 0.0], [-12.0, 42.0]], [[42.0, -24.0], [0.0, 0.0]], [[-6.0, 
+0.0], [-6.0, -24.0]], [[6.0, -24.0], [6.0, 6.0]], [[24.0, 30.0], [-6.0, 12.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-6.0, -1.0, -7.0])+(1.-msk_arg0)*numpy.array([-6.0, -4.0, 4.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[3.0, 6.0], [-1.0, 3.0]], [[-5.0, -2.0], [6.0, 2.0]], [[-5.0, -7.0], [-1.0, 2.0]], [[3.0, 
-7.0], [4.0, 4.0]], [[-5.0, 0.0], [-5.0, -6.0]], [[3.0, 6.0], [-6.0, -7.0]]], [[[0.0, 1.0], [-2.0, 1.0]], [[-1.0, -4.0], [-5.0, 
--7.0]], [[5.0, 5.0], [0.0, -4.0]], [[4.0, 7.0], [-6.0, 3.0]], [[0.0, 6.0], [7.0, 5.0]], [[-3.0, 4.0], [-6.0, -6.0]]], [[[0.0, 
--1.0], [1.0, -6.0]], [[6.0, 2.0], [-6.0, 6.0]], [[1.0, 7.0], [-1.0, 4.0]], [[2.0, 7.0], [1.0, -2.0]], [[-5.0, -5.0], [-6.0, 
-3.0]], [[0.0, -2.0], [0.0, 6.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, -2.0], [7.0, 3.0]], [[2.0, 0.0], [0.0, 4.0]], [[4.0, 
-3.0], [0.0, -6.0]], [[-7.0, 5.0], [0.0, 0.0]], [[-4.0, 7.0], [4.0, -6.0]], [[7.0, 5.0], [7.0, -3.0]]], [[[-3.0, 7.0], [7.0, 
-4.0]], [[4.0, -4.0], [-3.0, -3.0]], [[-1.0, 4.0], [-6.0, 3.0]], [[6.0, 7.0], [5.0, 3.0]], [[6.0, -6.0], [0.0, -5.0]], [[-7.0, 
--6.0], [5.0, 5.0]]], [[[0.0, 2.0], [-7.0, 5.0]], [[5.0, -4.0], [0.0, 7.0]], [[3.0, 5.0], [7.0, -4.0]], [[-5.0, -5.0], [-4.0, 
-7.0]], [[-1.0, 0.0], [-1.0, -4.0]], [[-4.0, 2.0], [5.0, 4.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-18.0, -30.0], [1.0, 23.0]], [[-11.0, 2.0], [11.0, -47.0]], [[18.0, -12.0], [13.0, -36.0]], 
-[[-36.0, -98.0], [-25.0, -13.0]], [[65.0, 29.0], [65.0, 10.0]], [[-15.0, -26.0], [42.0, 
-6.0]]])+(1.-msk_ref)*numpy.array([[[54.0, -8.0], [-98.0, -14.0]], [[-8.0, 0.0], [12.0, 16.0]], [[-8.0, -14.0], [52.0, 8.0]], 
-[[-2.0, -78.0], [-36.0, 16.0]], [[-4.0, -18.0], [-28.0, 40.0]], [[-30.0, 2.0], [-42.0, 14.0]]])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank4_offset1(self):
+      arg0=Data(numpy.array([3.0, 1.0, 0.0]),self.functionspace)
+      arg1=numpy.array([[[[-4.0, 3.0], [-5.0, -6.0]], [[5.0, 5.0], [0.0, -7.0]], [[-2.0, -4.0], [0.0, 6.0]], [[0.0, 6.0], [1.0, 
+-7.0]], [[-4.0, 0.0], [3.0, 0.0]], [[0.0, -6.0], [6.0, 3.0]]], [[[7.0, 2.0], [2.0, 1.0]], [[-6.0, 2.0], [6.0, 2.0]], [[3.0, 
+5.0], [0.0, -3.0]], [[4.0, -2.0], [-3.0, -5.0]], [[4.0, 0.0], [1.0, 5.0]], [[0.0, 3.0], [3.0, -5.0]]], [[[-6.0, 4.0], [-6.0, 
+5.0]], [[-5.0, -6.0], [7.0, 3.0]], [[-4.0, -5.0], [2.0, -2.0]], [[6.0, 6.0], [-5.0, -7.0]], [[-4.0, -4.0], [3.0, 1.0]], [[0.0, 
+-3.0], [3.0, -7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-5.0, 11.0], [-13.0, -17.0]], [[9.0, 17.0], [6.0, -19.0]], [[-3.0, -7.0], [0.0, 15.0]], [[4.0, 
+16.0], [0.0, -26.0]], [[-8.0, 0.0], [10.0, 5.0]], [[0.0, -15.0], [21.0, 4.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank0_expandedData_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(-7.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[2.0, -5.0, 3.0, 5.0], [-3.0, 3.0, 1.0, 7.0], [-3.0, -6.0, 0.0, -2.0]], [[-3.0, 3.0, 0.0, 
--5.0], [3.0, -1.0, 0.0, 3.0], [-7.0, -4.0, -5.0, -7.0]]], [[[1.0, 3.0, -4.0, 0.0], [-4.0, -7.0, -5.0, -2.0], [-3.0, -5.0, -4.0, 
-5.0]], [[5.0, 0.0, 2.0, -5.0], [-4.0, 4.0, -1.0, -4.0], [-5.0, 3.0, -3.0, -5.0]]], [[[-3.0, 7.0, -6.0, -1.0], [-5.0, 7.0, -3.0, 
-1.0], [-1.0, -2.0, 1.0, -1.0]], [[-6.0, -7.0, 3.0, -4.0], [3.0, 6.0, 0.0, 2.0], [6.0, -3.0, 1.0, 
-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 2.0, 6.0, -7.0], [3.0, 0.0, 4.0, -5.0], [-4.0, 1.0, 4.0, 2.0]], [[-4.0, -1.0, 6.0, 
-2.0], [-2.0, -5.0, -2.0, -2.0], [-3.0, -1.0, -7.0, 0.0]]], [[[4.0, -7.0, -5.0, -4.0], [-4.0, 5.0, 7.0, 3.0], [4.0, -7.0, 7.0, 
--5.0]], [[4.0, 2.0, 4.0, 0.0], [0.0, 5.0, 3.0, 0.0], [-7.0, 5.0, 2.0, 7.0]]], [[[1.0, -2.0, 4.0, 6.0], [0.0, 2.0, 0.0, 3.0], 
-[6.0, -5.0, 0.0, -5.0]], [[-2.0, 4.0, -5.0, 0.0], [-4.0, 0.0, 5.0, 0.0], [1.0, -5.0, -1.0, 0.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-12.0, 30.0, -18.0, -30.0], [18.0, -18.0, -6.0, -42.0], [18.0, 36.0, -0.0, 12.0]], [[18.0, 
--18.0, -0.0, 30.0], [-18.0, 6.0, -0.0, -18.0], [42.0, 24.0, 30.0, 42.0]]], [[[-6.0, -18.0, 24.0, -0.0], [24.0, 42.0, 30.0, 
-12.0], [18.0, 30.0, 24.0, -30.0]], [[-30.0, -0.0, -12.0, 30.0], [24.0, -24.0, 6.0, 24.0], [30.0, -18.0, 18.0, 30.0]]], [[[18.0, 
--42.0, 36.0, 6.0], [30.0, -42.0, 18.0, -6.0], [6.0, 12.0, -6.0, 6.0]], [[36.0, 42.0, -18.0, 24.0], [-18.0, -36.0, -0.0, -12.0], 
-[-36.0, 18.0, -6.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -14.0, -42.0, 49.0], [-21.0, -0.0, -28.0, 35.0], [28.0, 
--7.0, -28.0, -14.0]], [[28.0, 7.0, -42.0, -14.0], [14.0, 35.0, 14.0, 14.0], [21.0, 7.0, 49.0, -0.0]]], [[[-28.0, 49.0, 35.0, 
-28.0], [28.0, -35.0, -49.0, -21.0], [-28.0, 49.0, -49.0, 35.0]], [[-28.0, -14.0, -28.0, -0.0], [-0.0, -35.0, -21.0, -0.0], 
-[49.0, -35.0, -14.0, -49.0]]], [[[-7.0, 14.0, -28.0, -42.0], [-0.0, -14.0, -0.0, -21.0], [-42.0, 35.0, -0.0, 35.0]], [[14.0, 
--28.0, 35.0, -0.0], [28.0, -0.0, -35.0, -0.0], [-7.0, 35.0, 7.0, -0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank0_array_rank4_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg1=numpy.array([[[[-7.0, 1.0, 0.0, -6.0], [0.0, 2.0, 4.0, 4.0], [-7.0, -1.0, -1.0, 0.0]], [[1.0, -2.0, 2.0, 0.0], [2.0, 
+4.0, -1.0, 5.0], [0.0, 2.0, 6.0, -1.0]]], [[[-1.0, 5.0, 1.0, -5.0], [-7.0, 7.0, -1.0, -6.0], [-2.0, -6.0, -6.0, -4.0]], [[5.0, 
+1.0, 2.0, 4.0], [-2.0, -4.0, -2.0, -3.0], [1.0, 3.0, 4.0, -1.0]]], [[[6.0, -3.0, 1.0, -4.0], [5.0, 6.0, -5.0, -3.0], [4.0, 4.0, 
+2.0, -3.0]], [[-7.0, 3.0, -5.0, 3.0], [-4.0, 7.0, -3.0, -7.0], [-3.0, -3.0, 4.0, 3.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, 0.0]], [[0.0, -0.0, 0.0, 0.0], 
+[0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0]]], [[[-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]], 
+[[0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]]], [[[0.0, -0.0, 0.0, -0.0], [0.0, 0.0, -0.0, -0.0], 
+[0.0, 0.0, 0.0, -0.0]], [[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, -3.0])+(1.-msk_arg0)*numpy.array([-7.0, 7.0])
-      arg1=-6.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-42.0, 18.0])+(1.-msk_ref)*numpy.array([42.0, -42.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-1.0, 0.0])+(1.-msk_arg0)*numpy.array([-2.0, -3.0])
-      arg1=numpy.array(-2.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([2.0, -0.0])+(1.-msk_ref)*numpy.array([4.0, 6.0])
+   def test_generalTransposedTensorProduct_constData_rank0_constData_rank0_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg1=Data(1.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(5.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, 2.0, 3.0], [-5.0, 5.0, -7.0]])+(1.-msk_arg0)*numpy.array([[6.0, -6.0, -7.0], [-2.0, 0.0, 
-7.0]])
-      arg1=numpy.array([6.0, -1.0, 3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([25.0, -56.0])+(1.-msk_ref)*numpy.array([21.0, 9.0])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([4.0, -2.0, 4.0]),self.functionspace)
+      arg1=Data(numpy.array([5.0, 6.0, 6.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(32.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, -6.0, -1.0], [-4.0, -4.0, 0.0]], [[0.0, -6.0, 3.0], [2.0, 0.0, 
--3.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 2.0, -3.0], [5.0, 2.0, -7.0]], [[1.0, -3.0, -3.0], [2.0, -7.0, -5.0]]])
-      arg1=numpy.array([[6.0, -2.0, -3.0], [4.0, -4.0, 2.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([21.0, 5.0])+(1.-msk_ref)*numpy.array([21.0, 47.0])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-1.0, 2.0, -7.0], [0.0, 6.0, -6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[4.0, 4.0, 4.0], [-4.0, 7.0, 7.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-24.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, 1.0, 0.0], [-5.0, 4.0, 1.0], [-1.0, 0.0, -7.0], [-3.0, 6.0, -3.0]], [[-6.0, -2.0, 
-2.0], [-5.0, -5.0, 5.0], [-7.0, 5.0, -4.0], [6.0, 0.0, 6.0]]], [[[7.0, -6.0, 7.0], [0.0, -2.0, 6.0], [3.0, 5.0, 7.0], [-4.0, 
-3.0, 2.0]], [[7.0, 7.0, -1.0], [0.0, 0.0, -5.0], [1.0, 3.0, -4.0], [-1.0, 1.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 
-0.0, 2.0], [0.0, 0.0, 3.0], [-7.0, -2.0, 4.0], [-5.0, 4.0, 0.0]], [[0.0, 1.0, 6.0], [1.0, 1.0, 0.0], [3.0, 0.0, -2.0], [2.0, 
-2.0, 5.0]]], [[[2.0, 0.0, -1.0], [1.0, 1.0, -6.0], [0.0, 4.0, -5.0], [2.0, -3.0, 3.0]], [[6.0, -6.0, 4.0], [-6.0, 0.0, -7.0], 
-[0.0, 0.0, 3.0], [4.0, -2.0, -6.0]]]])
-      arg1=numpy.array([[[1.0, -5.0, 7.0], [-7.0, -4.0, -1.0], [-2.0, 1.0, 7.0], [-7.0, 0.0, -5.0]], [[6.0, 0.0, 0.0], [-4.0, 
--6.0, 0.0], [-2.0, -6.0, -7.0], [6.0, -2.0, 7.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([100.0, 245.0])+(1.-msk_ref)*numpy.array([124.0, -45.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-2.0, -1.0])+(1.-msk_arg0)*numpy.array([-7.0, -6.0])
-      arg1=numpy.array([-4.0, 7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[8.0, -14.0], [4.0, -7.0]])+(1.-msk_ref)*numpy.array([[28.0, -49.0], [24.0, -42.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[5.0, 6.0, -4.0], [6.0, 1.0, 0.0], [0.0, -2.0, -6.0], [-5.0, -3.0, -1.0]], [[0.0, -2.0, 0.0], 
+[6.0, 3.0, 0.0], [-3.0, -2.0, 1.0], [0.0, 6.0, -7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, 6.0, 6.0], [-7.0, -4.0, -2.0], [0.0, 6.0, -6.0], [4.0, -3.0, 6.0]], [[3.0, -6.0, 2.0], 
+[1.0, -4.0, 7.0], [-4.0, -6.0, 0.0], [-2.0, 0.0, -1.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-10.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, 4.0, 0.0], [-2.0, 0.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 6.0, 6.0], [-1.0, 6.0, 
--7.0]])
-      arg1=numpy.array([[0.0, 7.0], [1.0, -3.0], [7.0, 2.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[4.0, -33.0], [0.0, -14.0]])+(1.-msk_ref)*numpy.array([[48.0, -41.0], [-43.0, -39.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[5.0, -1.0], [7.0, -7.0], [3.0, -2.0]], [[1.0, -3.0], [-1.0, -3.0], [3.0, 2.0]]], [[[0.0, -3.0], 
+[1.0, -7.0], [-5.0, -7.0]], [[7.0, 5.0], [3.0, 6.0], [0.0, 2.0]]], [[[-2.0, 5.0], [-5.0, -5.0], [-6.0, -2.0]], [[6.0, 0.0], 
+[-7.0, 7.0], [7.0, -4.0]]], [[[4.0, -1.0], [2.0, 5.0], [2.0, 5.0]], [[3.0, -5.0], [3.0, -5.0], [-7.0, 
+7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[6.0, 3.0], [2.0, 0.0], [-5.0, 6.0]], [[-1.0, -3.0], [5.0, -1.0], [5.0, 0.0]]], [[[-5.0, 4.0], 
+[2.0, -7.0], [4.0, 0.0]], [[2.0, -1.0], [-5.0, 0.0], [2.0, -1.0]]], [[[-4.0, 7.0], [-3.0, 7.0], [-6.0, 0.0]], [[2.0, 3.0], 
+[2.0, -6.0], [4.0, 7.0]]], [[[6.0, -7.0], [-5.0, 7.0], [7.0, 0.0]], [[-7.0, 7.0], [2.0, -3.0], [-6.0, 
+-2.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(124.0,self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[5.0, 3.0, 1.0], [-6.0, 0.0, -6.0]], [[-3.0, 0.0, 5.0], [-5.0, 3.0, 
--4.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 7.0, 1.0], [2.0, 7.0, -6.0]], [[-6.0, -2.0, -5.0], [-4.0, 3.0, 2.0]]])
-      arg1=numpy.array([[[6.0, -4.0], [-6.0, -7.0], [-2.0, 6.0]], [[-6.0, 6.0], [5.0, 2.0], [-2.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[58.0, -53.0], [25.0, 30.0]])+(1.-msk_ref)*numpy.array([[-3.0, -3.0], [21.0, -16.0]])
+   def test_generalTransposedTensorProduct_constData_rank0_constData_rank1_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg1=Data(numpy.array([4.0, -3.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-8.0, 6.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, -1.0, 3.0], [-5.0, -7.0, 0.0], [5.0, -5.0, -7.0], [-3.0, 7.0, -5.0]], [[1.0, -5.0, 
-0.0], [-1.0, -6.0, -7.0], [-2.0, -2.0, 0.0], [4.0, 1.0, -2.0]]], [[[7.0, -5.0, 2.0], [4.0, -6.0, 0.0], [-5.0, 2.0, 3.0], [-1.0, 
-6.0, 2.0]], [[0.0, 5.0, -4.0], [-7.0, -4.0, 3.0], [1.0, -2.0, 0.0], [-4.0, -4.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 
-1.0, 1.0], [2.0, 2.0, 0.0], [7.0, 0.0, 0.0], [-6.0, 4.0, -3.0]], [[1.0, -2.0, -1.0], [0.0, 3.0, -1.0], [0.0, 5.0, 2.0], [-4.0, 
--5.0, -3.0]]], [[[-6.0, 0.0, -3.0], [0.0, 1.0, 4.0], [2.0, -3.0, -3.0], [4.0, 7.0, 6.0]], [[-6.0, -5.0, -6.0], [0.0, 3.0, 5.0], 
-[2.0, -7.0, 6.0], [3.0, -2.0, 1.0]]]])
-      arg1=numpy.array([[[[0.0, -2.0], [-2.0, 5.0], [4.0, 1.0]], [[3.0, 7.0], [1.0, -2.0], [-1.0, 1.0]], [[1.0, -1.0], [0.0, 
--4.0], [-6.0, -3.0]], [[-3.0, 1.0], [1.0, 6.0], [5.0, -3.0]]], [[[7.0, 7.0], [-6.0, 7.0], [0.0, 5.0]], [[4.0, -4.0], [-2.0, 
--7.0], [1.0, 2.0]], [[-6.0, 7.0], [-1.0, -6.0], [-4.0, 3.0]], [[6.0, 3.0], [-7.0, 4.0], [6.0, -2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[87.0, 83.0], [-51.0, 96.0]])+(1.-msk_ref)*numpy.array([[16.0, -43.0], [26.0, 13.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([0.0, -1.0, -3.0]),self.functionspace)
+      arg1=Data(numpy.array([[0.0, 0.0], [4.0, 5.0], [6.0, 1.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-22.0, -8.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-6.0, 2.0])+(1.-msk_arg0)*numpy.array([-5.0, 3.0])
-      arg1=numpy.array([[2.0, 2.0, -7.0, 1.0, -6.0], [-5.0, 5.0, 1.0, -6.0, -3.0], [5.0, 7.0, 1.0, -5.0, 6.0], [-2.0, -1.0, 
-4.0, 5.0, -2.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, -12.0, 42.0, -6.0, 36.0], [30.0, -30.0, -6.0, 36.0, 18.0], [-30.0, -42.0, -6.0, 30.0, 
--36.0], [12.0, 6.0, -24.0, -30.0, 12.0]], [[4.0, 4.0, -14.0, 2.0, -12.0], [-10.0, 10.0, 2.0, -12.0, -6.0], [10.0, 14.0, 2.0, 
--10.0, 12.0], [-4.0, -2.0, 8.0, 10.0, -4.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -10.0, 35.0, -5.0, 30.0], [25.0, -25.0, -5.0, 
-30.0, 15.0], [-25.0, -35.0, -5.0, 25.0, -30.0], [10.0, 5.0, -20.0, -25.0, 10.0]], [[6.0, 6.0, -21.0, 3.0, -18.0], [-15.0, 15.0, 
-3.0, -18.0, -9.0], [15.0, 21.0, 3.0, -15.0, 18.0], [-6.0, -3.0, 12.0, 15.0, -6.0]]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[0.0, -1.0, -5.0], [-3.0, 4.0, 3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-1.0, 4.0], [6.0, -5.0], [4.0, -4.0]], [[3.0, -1.0], [6.0, 3.0], [0.0, 
+1.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-11.0, 43.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, -3.0, 0.0], [-7.0, -2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 1.0, -4.0], [-1.0, 
--7.0, -6.0]])
-      arg1=numpy.array([[[0.0, 2.0, 3.0, 7.0, -5.0], [3.0, -5.0, -1.0, -5.0, -6.0], [7.0, 3.0, 5.0, -3.0, -3.0], [1.0, -4.0, 
--2.0, 7.0, 0.0]], [[3.0, -7.0, -2.0, 0.0, -3.0], [7.0, 3.0, 3.0, 7.0, -7.0], [-6.0, 6.0, 5.0, -4.0, -2.0], [6.0, 7.0, 0.0, 1.0, 
-5.0]], [[-2.0, -5.0, 0.0, 0.0, 0.0], [1.0, 0.0, -1.0, 6.0, 6.0], [-2.0, -3.0, -7.0, 0.0, -5.0], [4.0, -3.0, 7.0, 3.0, 7.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-9.0, 15.0, -3.0, -21.0, 24.0], [-30.0, 6.0, -6.0, -6.0, 39.0], [-3.0, -27.0, -30.0, 21.0, 
-15.0], [-21.0, -9.0, 6.0, -24.0, -15.0]], [[-20.0, -35.0, -17.0, -49.0, 41.0], [-28.0, 29.0, -6.0, 63.0, 98.0], [-51.0, -54.0, 
--94.0, 29.0, -10.0], [9.0, -7.0, 63.0, -30.0, 39.0]]])+(1.-msk_ref)*numpy.array([[[11.0, 9.0, -8.0, -14.0, 7.0], [-3.0, 13.0, 
-9.0, -7.0, -19.0], [-12.0, 12.0, 23.0, 2.0, 24.0], [-12.0, 27.0, -24.0, -25.0, -23.0]], [[-9.0, 77.0, 11.0, -7.0, 26.0], 
-[-58.0, -16.0, -14.0, -80.0, 19.0], [47.0, -27.0, 2.0, 31.0, 47.0], [-67.0, -27.0, -40.0, -32.0, -77.0]]])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-1.0, 5.0, 3.0], [-1.0, 0.0, 6.0], [-5.0, 1.0, 3.0], [7.0, -5.0, 2.0]], [[-6.0, -5.0, -3.0], 
+[4.0, 2.0, -6.0], [0.0, 2.0, 6.0], [-4.0, 2.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-2.0, 4.0], [-6.0, 3.0], [0.0, 4.0]], [[4.0, 2.0], [1.0, 0.0], [-3.0, -4.0]], [[1.0, 5.0], 
+[4.0, 1.0], [0.0, -6.0]], [[1.0, -3.0], [-6.0, -1.0], [-4.0, 2.0]]], [[[1.0, 1.0], [0.0, -4.0], [-4.0, 0.0]], [[-5.0, -5.0], 
+[2.0, -1.0], [3.0, -5.0]], [[-2.0, 5.0], [-6.0, -7.0], [-6.0, 3.0]], [[4.0, 1.0], [-6.0, -1.0], [6.0, 
+-7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-108.0, -58.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -1.0, -3.0], [3.0, 5.0, 0.0]], [[1.0, 2.0, -5.0], [5.0, -5.0, 
--3.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, 0.0, -6.0], [2.0, -6.0, 5.0]], [[-4.0, -7.0, -1.0], [-5.0, 5.0, -3.0]]])
-      arg1=numpy.array([[[[-5.0, -2.0, -4.0, -1.0, 4.0], [6.0, -4.0, -6.0, 5.0, -7.0], [0.0, 1.0, -2.0, -1.0, 0.0], [4.0, 5.0, 
--3.0, 2.0, -4.0]], [[-6.0, -3.0, -1.0, 2.0, -2.0], [0.0, -4.0, 0.0, 0.0, 4.0], [-3.0, 0.0, 4.0, -2.0, 6.0], [0.0, 5.0, 0.0, 
-3.0, -7.0]], [[-7.0, 3.0, 1.0, -2.0, 2.0], [7.0, -2.0, -2.0, 7.0, -6.0], [-6.0, -7.0, -3.0, 4.0, -5.0], [-5.0, 0.0, 5.0, 3.0, 
-2.0]]], [[[7.0, 0.0, 7.0, 3.0, 2.0], [0.0, 6.0, 5.0, -2.0, 0.0], [-1.0, 2.0, 1.0, -1.0, -2.0], [3.0, 4.0, 7.0, 6.0, 3.0]], 
-[[-3.0, 0.0, -7.0, -2.0, 0.0], [3.0, -2.0, 2.0, 7.0, -2.0], [-2.0, -4.0, 0.0, -2.0, 7.0], [-7.0, 0.0, -1.0, 0.0, 4.0]], [[5.0, 
--7.0, 0.0, 6.0, 0.0], [-2.0, -7.0, -2.0, 3.0, 7.0], [-5.0, 3.0, 1.0, -3.0, -7.0], [0.0, -1.0, 4.0, -4.0, 6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[33.0, -6.0, -16.0, 3.0, 2.0], [-6.0, 18.0, 31.0, 8.0, 4.0], [8.0, 7.0, 8.0, -23.0, 38.0], 
-[-11.0, 7.0, 1.0, 6.0, 30.0]], [[53.0, -2.0, 59.0, 20.0, 0.0], [-38.0, 59.0, 25.0, -84.0, 20.0], [44.0, 57.0, 23.0, -11.0, 
-13.0], [79.0, 38.0, 0.0, 35.0, -51.0]]])+(1.-msk_ref)*numpy.array([[[124.0, -43.0, 70.0, 65.0, -28.0], [-100.0, 21.0, 30.0, 
--98.0, 118.0], [21.0, 80.0, 35.0, -24.0, -51.0], [58.0, -22.0, 25.0, -36.0, 20.0]], [[4.0, 47.0, -48.0, -51.0, -14.0], [-10.0, 
-27.0, 17.0, 9.0, -25.0], [37.0, -36.0, -25.0, 18.0, 29.0], [-61.0, -72.0, -45.0, -50.0, 50.0]]])
+   def test_generalTransposedTensorProduct_constData_rank0_constData_rank2_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg1=Data(numpy.array([[3.0, -5.0, 7.0, 1.0, -2.0], [1.0, -7.0, 4.0, 3.0, -4.0], [-7.0, 7.0, -3.0, -1.0, 0.0], [-1.0, 
+2.0, 5.0, -3.0, -1.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-15.0, 25.0, -35.0, -5.0, 10.0], [-5.0, 35.0, -20.0, -15.0, 20.0], [35.0, -35.0, 15.0, 5.0, -0.0], 
+[5.0, -10.0, -25.0, 15.0, 5.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_array_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, 6.0])+(1.-msk_arg0)*numpy.array([2.0, 0.0])
-      arg1=numpy.array([[[-5.0, 3.0], [4.0, 7.0]], [[1.0, 1.0], [5.0, 7.0]], [[-4.0, 4.0], [-3.0, 0.0]], [[-7.0, 1.0], [5.0, 
--2.0]], [[6.0, 5.0], [0.0, 5.0]], [[5.0, 5.0], [-6.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-35.0, 21.0], [28.0, 49.0]], [[7.0, 7.0], [35.0, 49.0]], [[-28.0, 28.0], [-21.0, 0.0]], 
-[[-49.0, 7.0], [35.0, -14.0]], [[42.0, 35.0], [0.0, 35.0]], [[35.0, 35.0], [-42.0, 0.0]]], [[[-30.0, 18.0], [24.0, 42.0]], 
-[[6.0, 6.0], [30.0, 42.0]], [[-24.0, 24.0], [-18.0, 0.0]], [[-42.0, 6.0], [30.0, -12.0]], [[36.0, 30.0], [0.0, 30.0]], [[30.0, 
-30.0], [-36.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-10.0, 6.0], [8.0, 14.0]], [[2.0, 2.0], [10.0, 14.0]], [[-8.0, 8.0], 
-[-6.0, 0.0]], [[-14.0, 2.0], [10.0, -4.0]], [[12.0, 10.0], [0.0, 10.0]], [[10.0, 10.0], [-12.0, 0.0]]], [[[0.0, 0.0], [0.0, 
-0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([-5.0, -2.0, -1.0]),self.functionspace)
+      arg1=Data(numpy.array([[[3.0, 7.0, 0.0, -1.0, -6.0], [5.0, -7.0, -3.0, -1.0, 3.0], [-7.0, 7.0, 0.0, -5.0, 3.0], [4.0, 
+-2.0, 0.0, 2.0, -7.0]], [[-2.0, 1.0, 4.0, 4.0, 4.0], [4.0, 1.0, -7.0, -4.0, -1.0], [-3.0, -4.0, -5.0, 6.0, 4.0], [-1.0, 2.0, 
+4.0, -7.0, 7.0]], [[4.0, 5.0, -3.0, -6.0, -5.0], [-4.0, 4.0, 1.0, 6.0, -2.0], [-1.0, 3.0, -4.0, 0.0, -6.0], [-2.0, -6.0, -1.0, 
+-4.0, 0.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-15.0, -42.0, -5.0, 3.0, 27.0], [-29.0, 29.0, 28.0, 7.0, -11.0], [42.0, -30.0, 14.0, 13.0, -17.0], 
+[-16.0, 12.0, -7.0, 8.0, 21.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-7.0, 4.0, 2.0], [-2.0, -1.0, 0.0]])+(1.-msk_arg0)*numpy.array([[6.0, 7.0, -7.0], [7.0, 6.0, 
--7.0]])
-      arg1=numpy.array([[[[3.0, -5.0], [0.0, 1.0]], [[-7.0, -2.0], [-3.0, -3.0]], [[-6.0, -3.0], [0.0, 6.0]], [[-4.0, -6.0], 
-[-1.0, 7.0]], [[0.0, 5.0], [6.0, 0.0]], [[4.0, -5.0], [-7.0, -7.0]]], [[[6.0, -6.0], [4.0, -2.0]], [[1.0, -5.0], [-4.0, 6.0]], 
-[[-3.0, -3.0], [-4.0, -7.0]], [[-1.0, 0.0], [3.0, -6.0]], [[7.0, 4.0], [3.0, 7.0]], [[3.0, -3.0], [-6.0, -4.0]]], [[[2.0, 7.0], 
-[0.0, -2.0]], [[7.0, 7.0], [-6.0, -3.0]], [[-4.0, 3.0], [-5.0, 6.0]], [[-6.0, 0.0], [-3.0, 1.0]], [[-7.0, -6.0], [6.0, 0.0]], 
-[[-4.0, 5.0], [-2.0, -2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[7.0, 25.0], [16.0, -19.0]], [[67.0, 8.0], [-7.0, 39.0]], [[22.0, 15.0], [-26.0, -58.0]], 
-[[12.0, 42.0], [13.0, -71.0]], [[14.0, -31.0], [-18.0, 28.0]], [[-24.0, 33.0], [21.0, 29.0]]], [[[-12.0, 16.0], [-4.0, 0.0]], 
-[[13.0, 9.0], [10.0, 0.0]], [[15.0, 9.0], [4.0, -5.0]], [[9.0, 12.0], [-1.0, -8.0]], [[-7.0, -14.0], [-15.0, -7.0]], [[-11.0, 
-13.0], [20.0, 18.0]]]])+(1.-msk_ref)*numpy.array([[[[46.0, -121.0], [28.0, 6.0]], [[-84.0, -96.0], [-4.0, 45.0]], [[-29.0, 
--60.0], [7.0, -55.0]], [[11.0, -36.0], [36.0, -7.0]], [[98.0, 100.0], [15.0, 49.0]], [[73.0, -86.0], [-70.0, -56.0]]], [[[43.0, 
--120.0], [24.0, 9.0]], [[-92.0, -93.0], [-3.0, 36.0]], [[-32.0, -60.0], [11.0, -42.0]], [[8.0, -42.0], [32.0, 6.0]], [[91.0, 
-101.0], [18.0, 42.0]], [[74.0, -88.0], [-71.0, -59.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[0.0, -4.0, -5.0], [-2.0, 4.0, 1.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-5.0, -7.0, 7.0, 5.0, 7.0], [-1.0, 7.0, 3.0, 6.0, 4.0], [-4.0, -4.0, -3.0, 0.0, -2.0], [4.0, 
+5.0, 3.0, -4.0, 7.0]], [[6.0, 0.0, -2.0, -7.0, 0.0], [4.0, -4.0, -4.0, -6.0, 1.0], [7.0, 3.0, -3.0, 2.0, 2.0], [-7.0, 3.0, 
+-1.0, 0.0, 2.0]], [[3.0, -2.0, 0.0, -4.0, 4.0], [0.0, 4.0, -1.0, 3.0, 5.0], [0.0, -7.0, 2.0, -7.0, -4.0], [0.0, -1.0, 4.0, 
+-5.0, 0.0]]], [[[-1.0, 2.0, -7.0, 7.0, 5.0], [-6.0, 5.0, 2.0, 0.0, -5.0], [-3.0, 5.0, -1.0, 3.0, 2.0], [-1.0, 0.0, -5.0, 4.0, 
+0.0]], [[3.0, 4.0, 2.0, -6.0, -2.0], [3.0, -2.0, -3.0, 0.0, 4.0], [2.0, -7.0, 2.0, 7.0, -1.0], [-6.0, 2.0, 3.0, 3.0, -3.0]], 
+[[5.0, -6.0, 0.0, 2.0, 4.0], [-2.0, 4.0, 0.0, 7.0, 2.0], [4.0, 0.0, 4.0, -2.0, 6.0], [-2.0, 0.0, 5.0, -6.0, 
+5.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-20.0, 16.0, 30.0, 12.0, -34.0], [6.0, -18.0, 5.0, 16.0, -1.0], [-10.0, -15.0, 16.0, 47.0, 10.0], 
+[4.0, 1.0, 11.0, 23.0, -15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-7.0, 5.0])+(1.-msk_arg0)*numpy.array([0.0, -5.0])
-      arg1=Data(7.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-49.0, 35.0])+(1.-msk_ref)*numpy.array([0.0, -35.0])
+   def test_generalTransposedTensorProduct_constData_rank0_constData_rank3_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg1=Data(numpy.array([[[3.0, -7.0], [-7.0, -2.0]], [[-4.0, 4.0], [6.0, -5.0]], [[6.0, 6.0], [-3.0, -4.0]], [[-3.0, 
+-6.0], [-6.0, -3.0]], [[3.0, 1.0], [5.0, 1.0]], [[1.0, -3.0], [5.0, -6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[15.0, -35.0], [-35.0, -10.0]], [[-20.0, 20.0], [30.0, -25.0]], [[30.0, 30.0], [-15.0, -20.0]], 
+[[-15.0, -30.0], [-30.0, -15.0]], [[15.0, 5.0], [25.0, 5.0]], [[5.0, -15.0], [25.0, -30.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 3.0, -4.0], [-2.0, 4.0, -4.0]])+(1.-msk_arg0)*numpy.array([[5.0, 5.0, -5.0], [4.0, 7.0, 
--6.0]])
-      arg1=Data(numpy.array([6.0, -3.0, -1.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([25.0, -20.0])+(1.-msk_ref)*numpy.array([20.0, 9.0])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([4.0, 4.0, -5.0]),self.functionspace)
+      arg1=Data(numpy.array([[[[5.0, -5.0], [2.0, -1.0]], [[-1.0, 2.0], [-1.0, 5.0]], [[-6.0, 0.0], [6.0, 0.0]], [[2.0, -1.0], 
+[1.0, 1.0]], [[4.0, -7.0], [5.0, 0.0]], [[-6.0, -5.0], [4.0, 2.0]]], [[[1.0, -1.0], [-5.0, 5.0]], [[4.0, 3.0], [-1.0, 3.0]], 
+[[7.0, 2.0], [-2.0, -3.0]], [[6.0, 3.0], [-2.0, 0.0]], [[2.0, -7.0], [0.0, -6.0]], [[-4.0, 2.0], [-2.0, -5.0]]], [[[-5.0, 0.0], 
+[2.0, 5.0]], [[6.0, 5.0], [-6.0, 3.0]], [[-1.0, 4.0], [-6.0, -6.0]], [[4.0, 4.0], [-3.0, -6.0]], [[-1.0, 0.0], [1.0, 4.0]], 
+[[-7.0, 7.0], [2.0, 0.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[49.0, -24.0], [-22.0, -9.0]], [[-18.0, -5.0], [22.0, 17.0]], [[9.0, -12.0], [46.0, 18.0]], 
+[[12.0, -12.0], [11.0, 34.0]], [[29.0, -56.0], [15.0, -44.0]], [[-5.0, -47.0], [-2.0, -12.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, 3.0, -5.0], [3.0, 5.0, 7.0]], [[0.0, -4.0, 6.0], [0.0, 1.0, 
-3.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -2.0, -4.0], [1.0, 0.0, -2.0]], [[2.0, -6.0, -4.0], [-5.0, 5.0, -1.0]]])
-      arg1=Data(numpy.array([[2.0, 7.0, 0.0], [1.0, 6.0, -5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([21.0, -37.0])+(1.-msk_ref)*numpy.array([1.0, -8.0])
+   def test_generalTransposedTensorProduct_constData_rank0_constData_rank4_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg1=Data(numpy.array([[[[3.0, 3.0, 2.0, 1.0], [-1.0, 7.0, -2.0, 0.0], [4.0, 1.0, 7.0, -5.0]], [[-4.0, -7.0, -6.0, -6.0], 
+[3.0, -2.0, -7.0, 2.0], [2.0, 4.0, -7.0, -2.0]]], [[[1.0, 2.0, 3.0, 4.0], [7.0, 1.0, -1.0, 4.0], [5.0, -7.0, -1.0, -3.0]], 
+[[-2.0, -2.0, -5.0, 4.0], [0.0, -6.0, -7.0, -6.0], [-2.0, -3.0, 3.0, -5.0]]], [[[0.0, -1.0, 0.0, -6.0], [-5.0, 7.0, 4.0, -2.0], 
+[-6.0, -3.0, 7.0, 6.0]], [[0.0, 2.0, 7.0, -7.0], [-1.0, -1.0, 1.0, -6.0], [-4.0, -5.0, 7.0, -6.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[9.0, 9.0, 6.0, 3.0], [-3.0, 21.0, -6.0, 0.0], [12.0, 3.0, 21.0, -15.0]], [[-12.0, -21.0, -18.0, 
+-18.0], [9.0, -6.0, -21.0, 6.0], [6.0, 12.0, -21.0, -6.0]]], [[[3.0, 6.0, 9.0, 12.0], [21.0, 3.0, -3.0, 12.0], [15.0, -21.0, 
+-3.0, -9.0]], [[-6.0, -6.0, -15.0, 12.0], [0.0, -18.0, -21.0, -18.0], [-6.0, -9.0, 9.0, -15.0]]], [[[0.0, -3.0, 0.0, -18.0], 
+[-15.0, 21.0, 12.0, -6.0], [-18.0, -9.0, 21.0, 18.0]], [[0.0, 6.0, 21.0, -21.0], [-3.0, -3.0, 3.0, -18.0], [-12.0, -15.0, 21.0, 
+-18.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, 0.0, -6.0], [-2.0, -2.0, 4.0], [-4.0, 7.0, -5.0], [1.0, -5.0, -7.0]], [[5.0, 6.0, 
--3.0], [7.0, -5.0, -5.0], [7.0, 2.0, -6.0], [3.0, 0.0, 7.0]]], [[[5.0, 1.0, -4.0], [0.0, -5.0, 4.0], [4.0, -2.0, 6.0], [-2.0, 
--4.0, 0.0]], [[-1.0, -3.0, -2.0], [0.0, -3.0, 5.0], [1.0, 5.0, 6.0], [0.0, 7.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 
--2.0, 0.0], [-5.0, -6.0, 7.0], [-2.0, -3.0, 4.0], [-3.0, -2.0, -1.0]], [[-6.0, 2.0, -5.0], [5.0, 3.0, 0.0], [3.0, 1.0, -7.0], 
-[2.0, -2.0, 5.0]]], [[[6.0, 0.0, -4.0], [-6.0, -5.0, 1.0], [-3.0, 7.0, 7.0], [0.0, -5.0, -4.0]], [[2.0, 5.0, -6.0], [1.0, -3.0, 
-5.0], [-6.0, 1.0, 6.0], [7.0, 7.0, 6.0]]]])
-      arg1=Data(numpy.array([[[-5.0, 3.0, -6.0], [-7.0, 6.0, 0.0], [0.0, 4.0, 7.0], [-4.0, -3.0, -6.0]], [[2.0, 3.0, 5.0], 
-[4.0, -7.0, 1.0], [5.0, 2.0, -3.0], [7.0, 6.0, -1.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank0_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(0.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([206.0, 67.0])+(1.-msk_ref)*numpy.array([41.0, 180.0])
+      ref=msk_ref*numpy.array(-16.0)+(1.-msk_ref)*numpy.array(0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-7.0, 6.0])+(1.-msk_arg0)*numpy.array([-5.0, -2.0])
-      arg1=Data(numpy.array([-2.0, -3.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([7.0, 2.0, 7.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([1.0, 7.0, 2.0])+(1.-msk_arg1)*numpy.array([-2.0, 2.0, -5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[14.0, 21.0], [-12.0, -18.0]])+(1.-msk_ref)*numpy.array([[10.0, 15.0], [4.0, 6.0]])
+      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(-45.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, 0.0, 5.0], [-3.0, -5.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 0.0, 7.0], [0.0, 
--1.0, -2.0]])
-      arg1=Data(numpy.array([[1.0, -5.0], [0.0, 0.0], [-3.0, 5.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-6.0, 7.0, 0.0], [4.0, -4.0, 2.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, -3.0, 0.0], [1.0, 0.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -2.0, -4.0], [6.0, 0.0, 
+5.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-21.0, 55.0], [3.0, 5.0]])+(1.-msk_ref)*numpy.array([[-27.0, 65.0], [6.0, -10.0]])
+      ref=msk_ref*numpy.array(-35.0)+(1.-msk_ref)*numpy.array(62.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -5.0, -1.0], [0.0, -2.0, 3.0]], [[2.0, -6.0, 1.0], [0.0, -4.0, 
-2.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, -5.0, 0.0], [0.0, -4.0, -1.0]], [[-6.0, -7.0, -3.0], [-1.0, 0.0, -6.0]]])
-      arg1=Data(numpy.array([[[-5.0, -7.0], [5.0, 0.0], [-1.0, 0.0]], [[-4.0, -1.0], [-6.0, 1.0], [-4.0, 
--4.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[2.0, -4.0, 0.0], [7.0, -2.0, 5.0], [0.0, -6.0, 7.0], [0.0, 0.0, -1.0]], [[-4.0, 2.0, 4.0], [1.0, 
+2.0, 3.0], [-4.0, 4.0, -4.0], [-3.0, -3.0, -5.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-1.0, 7.0, 0.0], [5.0, 3.0, -3.0], [7.0, -4.0, -5.0], [-5.0, -5.0, 7.0]], [[2.0, -5.0, 0.0], 
+[1.0, -3.0, 5.0], [0.0, -2.0, 2.0], [6.0, 7.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, 1.0, 0.0], [1.0, -3.0, 5.0], [-3.0, 
+-7.0, -4.0], [-2.0, -6.0, -4.0]], [[0.0, 2.0, -1.0], [3.0, 3.0, 0.0], [-4.0, -1.0, 3.0], [-3.0, 1.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, -14.0], [-25.0, -26.0]])+(1.-msk_ref)*numpy.array([[-32.0, -49.0], [26.0, 67.0]])
+      ref=msk_ref*numpy.array(-97.0)+(1.-msk_ref)*numpy.array(79.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 3.0, -2.0], [-3.0, -6.0, 6.0], [1.0, 3.0, 6.0], [-2.0, -7.0, -2.0]], [[-7.0, -3.0, 
--3.0], [-1.0, 2.0, -6.0], [2.0, -5.0, 4.0], [3.0, -5.0, 0.0]]], [[[-6.0, -2.0, 5.0], [7.0, 4.0, 3.0], [7.0, 2.0, 3.0], [2.0, 
-0.0, 2.0]], [[5.0, -1.0, 0.0], [-6.0, 0.0, 7.0], [0.0, 4.0, -2.0], [-5.0, 6.0, -3.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, 
--6.0, -4.0], [4.0, 7.0, 3.0], [0.0, -2.0, 6.0], [2.0, 5.0, -4.0]], [[6.0, 0.0, 4.0], [-5.0, 2.0, 1.0], [-2.0, 3.0, -6.0], 
-[-6.0, -5.0, -3.0]]], [[[0.0, -5.0, 7.0], [1.0, 6.0, 5.0], [5.0, 2.0, -1.0], [-1.0, -3.0, 5.0]], [[-1.0, 4.0, -2.0], [3.0, 5.0, 
--7.0], [2.0, 0.0, 3.0], [-2.0, 0.0, 0.0]]]])
-      arg1=Data(numpy.array([[[[-2.0, 3.0], [1.0, 2.0], [2.0, 3.0]], [[3.0, -7.0], [-2.0, 1.0], [0.0, -1.0]], [[-6.0, 7.0], 
-[0.0, -5.0], [0.0, 2.0]], [[-7.0, -2.0], [0.0, -1.0], [1.0, 0.0]]], [[[6.0, 5.0], [-2.0, -5.0], [-6.0, 5.0]], [[-2.0, 5.0], 
-[-2.0, 1.0], [-7.0, -5.0]], [[-5.0, -2.0], [-1.0, -3.0], [-7.0, -1.0]], [[1.0, -1.0], [7.0, -5.0], [2.0, 
--1.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-2.0, 5.0], [-5.0, -3.0], [-6.0, 7.0]], [[-2.0, 6.0], [0.0, 2.0], [7.0, 0.0]]], [[[-3.0, 1.0], 
+[-2.0, -6.0], [-1.0, 1.0]], [[3.0, 6.0], [-3.0, 3.0], [3.0, 4.0]]], [[[3.0, -7.0], [-1.0, 1.0], [0.0, 2.0]], [[1.0, -4.0], 
+[1.0, -4.0], [-5.0, 1.0]]], [[[-6.0, 0.0], [6.0, 0.0], [-1.0, -4.0]], [[1.0, -3.0], [6.0, -7.0], [0.0, 
+0.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[1.0, -7.0], [2.0, 2.0], [4.0, 0.0]], [[-1.0, -7.0], [0.0, 7.0], [-1.0, 5.0]]], [[[-4.0, 
+-1.0], [4.0, 0.0], [2.0, -5.0]], [[4.0, -4.0], [-6.0, -5.0], [2.0, 4.0]]], [[[0.0, -4.0], [-1.0, 2.0], [-6.0, 2.0]], [[-5.0, 
+3.0], [4.0, 0.0], [-4.0, -7.0]]], [[[4.0, -2.0], [1.0, -3.0], [1.0, -1.0]], [[5.0, -5.0], [0.0, -5.0], [0.0, 
+5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, 6.0], [-6.0, 7.0], [0.0, 0.0]], [[-4.0, 1.0], [3.0, -2.0], [6.0, 7.0]]], [[[7.0, 
+0.0], [0.0, -7.0], [-1.0, -5.0]], [[-2.0, 5.0], [-7.0, 7.0], [3.0, 7.0]]], [[[7.0, 5.0], [2.0, -2.0], [4.0, -3.0]], [[0.0, 
+3.0], [5.0, 7.0], [-1.0, 6.0]]], [[[3.0, 4.0], [-1.0, -6.0], [0.0, 0.0]], [[6.0, -4.0], [2.0, 0.0], [1.0, -6.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-45.0, 60.0], [15.0, -81.0]])+(1.-msk_ref)*numpy.array([[-35.0, 43.0], [-20.0, 48.0]])
+      ref=msk_ref*numpy.array(-26.0)+(1.-msk_ref)*numpy.array(177.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([4.0, 0.0])+(1.-msk_arg0)*numpy.array([0.0, -5.0])
-      arg1=Data(numpy.array([[6.0, 1.0, -6.0, 6.0, 0.0], [-2.0, -3.0, 1.0, 2.0, 0.0], [4.0, 1.0, 4.0, 7.0, -6.0], [6.0, 0.0, 
-5.0, -5.0, 0.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank1_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, 6.0])+(1.-msk_arg1)*numpy.array([-6.0, -3.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[24.0, 4.0, -24.0, 24.0, 0.0], [-8.0, -12.0, 4.0, 8.0, 0.0], [16.0, 4.0, 16.0, 28.0, -24.0], 
-[24.0, 0.0, 20.0, -20.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, -5.0, 30.0, -30.0, 0.0], [10.0, 15.0, -5.0, -10.0, 0.0], [-20.0, -5.0, -20.0, -35.0, 
-30.0], [-30.0, 0.0, -25.0, 25.0, 0.0]]])
+      ref=msk_ref*numpy.array([0.0, 36.0])+(1.-msk_ref)*numpy.array([-36.0, -18.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, 1.0, 7.0], [1.0, 0.0, 1.0]])+(1.-msk_arg0)*numpy.array([[3.0, 4.0, -5.0], [-1.0, 3.0, 
-6.0]])
-      arg1=Data(numpy.array([[[7.0, -3.0, 2.0, 4.0, 6.0], [-2.0, 5.0, -7.0, -6.0, 1.0], [3.0, -1.0, -5.0, -7.0, 6.0], [-3.0, 
--1.0, -4.0, -6.0, 1.0]], [[-1.0, 1.0, -6.0, -5.0, -4.0], [5.0, -3.0, -2.0, -7.0, 0.0], [-7.0, 0.0, 4.0, 5.0, 6.0], [-5.0, 4.0, 
-4.0, -3.0, -6.0]], [[-6.0, 1.0, 6.0, 6.0, 0.0], [5.0, 7.0, -3.0, -3.0, 7.0], [-4.0, -2.0, 3.0, -3.0, -7.0], [3.0, 2.0, -1.0, 
--4.0, -2.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-2.0, -7.0, -1.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[3.0, 2.0], [0.0, 2.0], [-2.0, 3.0]])+(1.-msk_arg1)*numpy.array([[7.0, 3.0], [2.0, 5.0], 
+[-3.0, 5.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-85.0, 26.0, 24.0, 13.0, -40.0], [52.0, 16.0, 19.0, 8.0, 43.0], [-53.0, -8.0, 55.0, 26.0, 
--79.0], [34.0, 24.0, 21.0, 5.0, -26.0]], [[1.0, -2.0, 8.0, 10.0, 6.0], [3.0, 12.0, -10.0, -9.0, 8.0], [-1.0, -3.0, -2.0, -10.0, 
--1.0], [0.0, 1.0, -5.0, -10.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[47.0, -10.0, -48.0, -38.0, 2.0], [-11.0, -32.0, -14.0, 
--31.0, -32.0], [1.0, 7.0, -14.0, 14.0, 77.0], [-44.0, 3.0, 9.0, -10.0, -11.0]], [[-46.0, 12.0, 16.0, 17.0, -18.0], [47.0, 28.0, 
--17.0, -33.0, 41.0], [-48.0, -11.0, 35.0, 4.0, -30.0], [6.0, 25.0, 10.0, -27.0, -31.0]]])
+      ref=msk_ref*numpy.array([-4.0, -21.0])+(1.-msk_ref)*numpy.array([-25.0, -46.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -2.0, -7.0], [-5.0, -3.0, -4.0]], [[6.0, -4.0, -1.0], [-5.0, 2.0, 
-0.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, 4.0, 3.0], [-1.0, 5.0, -7.0]], [[-2.0, 1.0, -7.0], [2.0, 0.0, 0.0]]])
-      arg1=Data(numpy.array([[[[0.0, 4.0, -4.0, 0.0, -4.0], [6.0, -5.0, -3.0, 5.0, 0.0], [1.0, 0.0, -5.0, 3.0, 4.0], [-6.0, 
-6.0, -2.0, -2.0, -2.0]], [[2.0, 5.0, 5.0, -1.0, 0.0], [-5.0, -5.0, 4.0, -3.0, -1.0], [0.0, -5.0, 5.0, 0.0, -2.0], [0.0, 0.0, 
-7.0, 3.0, -1.0]], [[-5.0, 1.0, -6.0, -6.0, -3.0], [-1.0, 4.0, -5.0, -3.0, -4.0], [-1.0, 4.0, 6.0, 3.0, 3.0], [2.0, -1.0, 0.0, 
-7.0, 5.0]]], [[[4.0, 1.0, 1.0, -6.0, 0.0], [-5.0, 1.0, 1.0, 1.0, 6.0], [-7.0, 6.0, -1.0, 0.0, -7.0], [-6.0, 0.0, -2.0, 4.0, 
-0.0]], [[1.0, -2.0, 2.0, -4.0, -2.0], [5.0, -6.0, 7.0, -2.0, -7.0], [0.0, 6.0, 7.0, 4.0, 6.0], [6.0, 6.0, 4.0, -7.0, -7.0]], 
-[[6.0, 4.0, -2.0, -1.0, -1.0], [7.0, 4.0, 3.0, -2.0, 5.0], [0.0, 0.0, -4.0, -4.0, 4.0], [0.0, -5.0, -3.0, -4.0, 
-3.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[2.0, 7.0, 0.0], [4.0, 5.0, 0.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -4.0], [2.0, 2.0], [-6.0, 4.0]], [[-2.0, -2.0], [2.0, 3.0], [-2.0, 
+1.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 1.0], [6.0, 4.0], [-6.0, 2.0]], [[0.0, 7.0], [3.0, 0.0], [-1.0, 5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-16.0, -32.0, 29.0, 90.0, 31.0], [-1.0, -21.0, -11.0, 36.0, 1.0], [42.0, -66.0, -52.0, -17.0, 
--16.0], [-2.0, 9.0, -4.0, -38.0, -24.0]], [[-21.0, -6.0, -39.0, 32.0, -25.0], [92.0, -31.0, -20.0, 36.0, -36.0], [42.0, -2.0, 
--37.0, 23.0, 76.0], [4.0, 49.0, -22.0, -65.0, -27.0]]])+(1.-msk_ref)*numpy.array([[[-48.0, -24.0, 33.0, -29.0, -4.0], [-54.0, 
--57.0, 20.0, -28.0, -92.0], [2.0, 16.0, 112.0, 51.0, 2.0], [54.0, 50.0, 75.0, 26.0, -41.0]], [[45.0, -8.0, 57.0, 29.0, 29.0], 
-[-20.0, -21.0, 47.0, 10.0, 39.0], [-9.0, -21.0, -29.0, -27.0, -45.0], [-14.0, -5.0, 7.0, -34.0, -32.0]]])
+      ref=msk_ref*numpy.array([16.0, 13.0])+(1.-msk_ref)*numpy.array([63.0, 58.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_constData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([0.0, 3.0])+(1.-msk_arg0)*numpy.array([6.0, -1.0])
-      arg1=Data(numpy.array([[[5.0, 2.0], [2.0, 5.0]], [[-7.0, -4.0], [-4.0, 4.0]], [[4.0, -1.0], [2.0, -5.0]], [[-5.0, -1.0], 
-[0.0, 2.0]], [[-5.0, 4.0], [-7.0, -2.0]], [[2.0, -2.0], [7.0, -4.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-7.0, 3.0, -3.0], [3.0, 5.0, 0.0], [2.0, -1.0, -4.0], [7.0, 3.0, 6.0]], [[3.0, 6.0, 7.0], [-1.0, 
+0.0, 6.0], [4.0, 0.0, 4.0], [0.0, 0.0, -7.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-6.0, 6.0], [3.0, -4.0], [-7.0, 4.0]], [[-7.0, -5.0], [3.0, 3.0], [3.0, 3.0]], [[-3.0, 
+-7.0], [-4.0, -4.0], [2.0, -3.0]], [[7.0, 5.0], [-7.0, 2.0], [-5.0, -1.0]]], [[[2.0, 3.0], [-1.0, -7.0], [5.0, -3.0]], [[0.0, 
+2.0], [4.0, 0.0], [5.0, 3.0]], [[1.0, -4.0], [-1.0, -3.0], [5.0, 1.0]], [[0.0, 0.0], [-2.0, -1.0], [-2.0, 
+-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 7.0], [2.0, -5.0], [-2.0, 7.0]], [[2.0, 1.0], [3.0, 2.0], [-7.0, 5.0]], [[6.0, 
+1.0], [-3.0, 1.0], [1.0, -7.0]], [[-5.0, 0.0], [0.0, 0.0], [-6.0, 0.0]]], [[[-4.0, 1.0], [1.0, -5.0], [0.0, 7.0]], [[-1.0, 
+4.0], [-1.0, 0.0], [-4.0, 3.0]], [[-5.0, -6.0], [3.0, -2.0], [3.0, 4.0]], [[6.0, 3.0], [6.0, -5.0], [-7.0, 5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[15.0, 6.0], [6.0, 15.0]], [[-21.0, -12.0], [-12.0, 12.0]], 
-[[12.0, -3.0], [6.0, -15.0]], [[-15.0, -3.0], [0.0, 6.0]], [[-15.0, 12.0], [-21.0, -6.0]], [[6.0, -6.0], [21.0, 
--12.0]]]])+(1.-msk_ref)*numpy.array([[[[30.0, 12.0], [12.0, 30.0]], [[-42.0, -24.0], [-24.0, 24.0]], [[24.0, -6.0], [12.0, 
--30.0]], [[-30.0, -6.0], [0.0, 12.0]], [[-30.0, 24.0], [-42.0, -12.0]], [[12.0, -12.0], [42.0, -24.0]]], [[[-5.0, -2.0], [-2.0, 
--5.0]], [[7.0, 4.0], [4.0, -4.0]], [[-4.0, 1.0], [-2.0, 5.0]], [[5.0, 1.0], [0.0, -2.0]], [[5.0, -4.0], [7.0, 2.0]], [[-2.0, 
-2.0], [-7.0, 4.0]]]])
+      ref=msk_ref*numpy.array([157.0, -44.0])+(1.-msk_ref)*numpy.array([-36.0, -50.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 6.0, -6.0], [-3.0, 5.0, 2.0]])+(1.-msk_arg0)*numpy.array([[5.0, 3.0, 6.0], [3.0, 6.0, 
-3.0]])
-      arg1=Data(numpy.array([[[[4.0, 6.0], [6.0, 1.0]], [[1.0, 2.0], [-4.0, 0.0]], [[6.0, -2.0], [-5.0, -5.0]], [[-4.0, 2.0], 
-[3.0, -1.0]], [[2.0, -1.0], [2.0, -1.0]], [[0.0, 0.0], [0.0, 4.0]]], [[[-3.0, 3.0], [-1.0, -5.0]], [[-3.0, 0.0], [-4.0, 2.0]], 
-[[3.0, -6.0], [1.0, -6.0]], [[7.0, 5.0], [2.0, -7.0]], [[6.0, -1.0], [-2.0, 4.0]], [[3.0, -7.0], [-5.0, -2.0]]], [[[-3.0, 
--7.0], [2.0, -5.0]], [[3.0, 2.0], [-7.0, 4.0]], [[6.0, 1.0], [-6.0, 4.0]], [[-1.0, -5.0], [4.0, -3.0]], [[0.0, -7.0], [-1.0, 
--6.0]], [[1.0, -5.0], [0.0, 4.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank2_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, 6.0, 6.0, 2.0, 1.0], [4.0, 7.0, 7.0, 2.0, 6.0], [-5.0, 4.0, 3.0, -5.0, -7.0], [5.0, 
+-6.0, 4.0, 3.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -2.0, 7.0, 1.0, -5.0], [-2.0, 2.0, -5.0, 2.0, 7.0], [-5.0, 3.0, -2.0, 
+-7.0, 5.0], [4.0, 5.0, 3.0, 6.0, 2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[16.0, 84.0], [6.0, 4.0]], [[-32.0, -4.0], [2.0, -12.0]], [[6.0, -50.0], [22.0, -80.0]], 
-[[32.0, 68.0], [0.0, -28.0]], [[44.0, 32.0], [2.0, 56.0]], [[12.0, -12.0], [-30.0, -20.0]]], [[[-33.0, -17.0], [-19.0, -38.0]], 
-[[-12.0, -2.0], [-22.0, 18.0]], [[9.0, -22.0], [8.0, -7.0]], [[45.0, 9.0], [9.0, -38.0]], [[24.0, -16.0], [-18.0, 11.0]], 
-[[17.0, -45.0], [-25.0, -14.0]]]])+(1.-msk_ref)*numpy.array([[[[-7.0, -3.0], [39.0, -40.0]], [[14.0, 22.0], [-74.0, 30.0]], 
-[[75.0, -22.0], [-58.0, -19.0]], [[-5.0, -5.0], [45.0, -44.0]], [[28.0, -50.0], [-2.0, -29.0]], [[15.0, -51.0], [-15.0, 
-38.0]]], [[[-15.0, 15.0], [18.0, -42.0]], [[-6.0, 12.0], [-57.0, 24.0]], [[54.0, -39.0], [-27.0, -39.0]], [[27.0, 21.0], [33.0, 
--54.0]], [[42.0, -30.0], [-9.0, 3.0]], [[21.0, -57.0], [-30.0, 12.0]]]])
+      ref=msk_ref*numpy.array([[6.0, -6.0, -6.0, -2.0, -1.0], [-4.0, -7.0, -7.0, -2.0, -6.0], [5.0, -4.0, -3.0, 5.0, 7.0], 
+[-5.0, 6.0, -4.0, -3.0, 1.0]])+(1.-msk_ref)*numpy.array([[4.0, 2.0, -7.0, -1.0, 5.0], [2.0, -2.0, 5.0, -2.0, -7.0], [5.0, -3.0, 
+2.0, 7.0, -5.0], [-4.0, -5.0, -3.0, -6.0, -2.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([4.0, 0.0])+(1.-msk_arg0)*numpy.array([1.0, 1.0])
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-5.0, 6.0, -1.0]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-2.0)+(1-msk_arg1)*(0.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[-3.0, -5.0, 3.0, -3.0, 2.0], [-3.0, 2.0, -3.0, -1.0, 5.0], [2.0, 0.0, 5.0, 4.0, 4.0], [-5.0, 
+-5.0, 1.0, 4.0, 4.0]], [[4.0, 0.0, 5.0, -5.0, 2.0], [5.0, 3.0, -3.0, 0.0, 4.0], [4.0, 2.0, -5.0, 0.0, 1.0], [3.0, 4.0, 7.0, 
+5.0, 1.0]], [[2.0, -6.0, 5.0, -7.0, 2.0], [-3.0, -5.0, 7.0, 5.0, -6.0], [-5.0, 5.0, 1.0, -6.0, 7.0], [0.0, -4.0, 6.0, 6.0, 
+7.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 3.0, 5.0, -5.0, 0.0], [-7.0, 3.0, 0.0, -4.0, 3.0], [3.0, 1.0, 2.0, 7.0, 0.0], [-3.0, 
+5.0, -6.0, -1.0, 1.0]], [[6.0, 6.0, 0.0, 1.0, 0.0], [-1.0, 2.0, 4.0, -7.0, 2.0], [1.0, 1.0, 4.0, -5.0, 0.0], [0.0, -6.0, -4.0, 
+0.0, -7.0]], [[-7.0, 4.0, -5.0, -3.0, -4.0], [0.0, 7.0, -7.0, -5.0, -2.0], [4.0, 0.0, -5.0, -5.0, 0.0], [5.0, 6.0, 4.0, -5.0, 
+1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-8.0, -0.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
+      ref=msk_ref*numpy.array([[37.0, 31.0, 10.0, -8.0, 0.0], [48.0, 13.0, -10.0, 0.0, 5.0], [19.0, 7.0, -56.0, -14.0, -21.0], 
+[43.0, 53.0, 31.0, 4.0, -21.0]])+(1.-msk_ref)*numpy.array([[73.0, 17.0, -20.0, 34.0, 4.0], [29.0, -10.0, 31.0, -17.0, -1.0], 
+[-13.0, 1.0, 19.0, -60.0, 0.0], [10.0, -67.0, 2.0, 10.0, -48.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, 4.0, -5.0], [-3.0, -5.0, 6.0]])+(1.-msk_arg0)*numpy.array([[2.0, 5.0, -4.0], [3.0, 
--3.0, 2.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[0.0, 7.0, 6.0], [1.0, -1.0, 7.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-7.0, -3.0, 3.0])+(1.-msk_arg1)*numpy.array([-7.0, 1.0, -3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[[[-7.0, -2.0, -2.0, -6.0, 2.0], [2.0, 5.0, -3.0, -3.0, 5.0], [3.0, 5.0, 1.0, 0.0, 7.0], 
+[-5.0, -3.0, 0.0, -4.0, 4.0]], [[-6.0, -5.0, 6.0, 5.0, 1.0], [7.0, -5.0, -6.0, -7.0, 0.0], [-3.0, -3.0, 4.0, 3.0, -1.0], [2.0, 
+5.0, -3.0, -4.0, 0.0]], [[6.0, -7.0, -7.0, 5.0, -7.0], [-5.0, -4.0, -4.0, 5.0, -6.0], [6.0, 2.0, 0.0, 4.0, 5.0], [5.0, -2.0, 
+-6.0, 7.0, -3.0]]], [[[2.0, 7.0, 0.0, -5.0, -2.0], [-2.0, -3.0, 7.0, -7.0, 1.0], [-3.0, -5.0, -2.0, 6.0, -7.0], [-3.0, 5.0, 
+0.0, 0.0, 1.0]], [[2.0, -6.0, 4.0, 0.0, -7.0], [2.0, 5.0, -7.0, -4.0, 6.0], [-5.0, 0.0, -6.0, 3.0, -1.0], [-5.0, -6.0, 2.0, 
+1.0, -4.0]], [[-2.0, -7.0, -5.0, -5.0, -6.0], [-7.0, 4.0, 3.0, 5.0, 0.0], [0.0, -6.0, 7.0, 4.0, 3.0], [-6.0, 5.0, 1.0, 5.0, 
+5.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -1.0, -1.0, 5.0, 7.0], [-1.0, -4.0, -5.0, 5.0, 1.0], [2.0, -1.0, 1.0, 3.0, 2.0], 
+[7.0, 7.0, 0.0, 1.0, 0.0]], [[-7.0, 1.0, 2.0, -3.0, 0.0], [1.0, -5.0, -7.0, -3.0, -3.0], [-6.0, 4.0, -2.0, 3.0, 5.0], [-4.0, 
+-3.0, -2.0, 0.0, 3.0]], [[2.0, 3.0, 6.0, 5.0, 6.0], [4.0, -5.0, -7.0, 1.0, -5.0], [7.0, 5.0, 0.0, 0.0, 1.0], [-7.0, 5.0, 3.0, 
+3.0, -6.0]]], [[[-3.0, 0.0, 7.0, -1.0, 1.0], [4.0, -1.0, -1.0, 6.0, 1.0], [-4.0, 0.0, 2.0, 0.0, -6.0], [3.0, -4.0, 0.0, -4.0, 
+0.0]], [[-3.0, 4.0, 5.0, 0.0, -2.0], [0.0, 0.0, -3.0, 0.0, -4.0], [-2.0, -3.0, -7.0, 2.0, -1.0], [-7.0, 0.0, -3.0, 1.0, 4.0]], 
+[[-1.0, 7.0, 3.0, 5.0, 0.0], [1.0, 6.0, 0.0, 0.0, -5.0], [2.0, 2.0, -6.0, 3.0, 5.0], [-4.0, 6.0, -6.0, 0.0, -4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([15.0, 54.0])+(1.-msk_ref)*numpy.array([3.0, -30.0])
+      ref=msk_ref*numpy.array([[-20.0, -113.0, -39.0, 25.0, -72.0], [-34.0, -39.0, -31.0, 13.0, -41.0], [17.0, -56.0, 81.0, 
+76.0, 38.0], [4.0, 69.0, -52.0, 48.0, 22.0]])+(1.-msk_ref)*numpy.array([[-44.0, 70.0, 73.0, 43.0, 39.0], [42.0, -24.0, -89.0, 
+-9.0, -81.0], [12.0, 75.0, -47.0, 40.0, 71.0], [-88.0, 47.0, -35.0, 13.0, -47.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-2.0, 1.0, -7.0], [5.0, -4.0, 4.0]], [[3.0, 7.0, 2.0], [-1.0, 5.0, 
-1.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, 5.0, -5.0], [5.0, -1.0, 0.0]], [[-4.0, 6.0, 1.0], [-2.0, 3.0, -1.0]]])
+   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank3_offset0(self):
+      arg0=Data(0.0,self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 2.0, 1.0], [2.0, -4.0, 6.0]])+(1.-msk_arg1)*numpy.array([[7.0, -1.0, 3.0], [-6.0, -2.0, 
-4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[[2.0, -5.0], [-6.0, -2.0]], [[-2.0, 3.0], [1.0, 2.0]], [[-7.0, -6.0], [3.0, -7.0]], [[0.0, 
+-5.0], [-5.0, 1.0]], [[3.0, 6.0], [-1.0, 5.0]], [[0.0, 7.0], [6.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, 2.0], [3.0, 0.0]], 
+[[7.0, -2.0], [-3.0, -1.0]], [[-3.0, -6.0], [-5.0, 3.0]], [[1.0, -7.0], [-2.0, 0.0]], [[1.0, -2.0], [5.0, 1.0]], [[1.0, 6.0], 
+[-1.0, 1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([43.0, 3.0])+(1.-msk_ref)*numpy.array([-55.0, -29.0])
+      ref=msk_ref*numpy.array([[[0.0, -0.0], [-0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, -0.0]], [[0.0, 
+-0.0], [-0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [0.0, 0.0]], 
+[[0.0, -0.0], [-0.0, -0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[0.0, -0.0], [-0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[-0.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, 6.0, -7.0], [7.0, 2.0, -7.0], [0.0, 1.0, 1.0], [-5.0, -3.0, 5.0]], [[0.0, 3.0, -7.0], 
-[-2.0, -3.0, 4.0], [6.0, -6.0, 0.0], [-6.0, 4.0, 6.0]]], [[[0.0, -4.0, 4.0], [7.0, 0.0, 0.0], [7.0, 4.0, 3.0], [-5.0, -4.0, 
-3.0]], [[-5.0, -3.0, -2.0], [6.0, 0.0, -6.0], [7.0, 3.0, -2.0], [6.0, 0.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, 4.0, 
-3.0], [-3.0, 4.0, -1.0], [5.0, -2.0, -7.0], [6.0, -7.0, 0.0]], [[0.0, 6.0, -6.0], [-6.0, -1.0, 0.0], [-4.0, -4.0, 2.0], [3.0, 
--2.0, 6.0]]], [[[-7.0, -5.0, 5.0], [-6.0, -2.0, 5.0], [-3.0, -3.0, 6.0], [3.0, -7.0, -3.0]], [[-2.0, 6.0, -5.0], [-7.0, -3.0, 
-6.0], [-7.0, 7.0, 7.0], [1.0, -3.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([-1.0, 5.0, 1.0]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, 0.0, 6.0], [2.0, 3.0, -6.0], [-6.0, 5.0, 7.0], [5.0, -5.0, -5.0]], [[0.0, 6.0, -3.0], 
-[4.0, -5.0, 1.0], [-5.0, -6.0, -6.0], [5.0, 4.0, 1.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 3.0, 0.0], [-2.0, 1.0, 0.0], [-6.0, 
-0.0, 0.0], [7.0, 3.0, -2.0]], [[1.0, -4.0, -4.0], [6.0, 5.0, 5.0], [0.0, -4.0, 0.0], [7.0, -5.0, 4.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      arg1=msk_arg1*numpy.array([[[[-4.0, 3.0], [0.0, -7.0]], [[0.0, 5.0], [6.0, -3.0]], [[0.0, 0.0], [-1.0, 2.0]], [[-5.0, 
+-2.0], [2.0, 4.0]], [[7.0, -3.0], [2.0, 0.0]], [[7.0, 6.0], [1.0, -7.0]]], [[[1.0, 2.0], [6.0, 7.0]], [[5.0, -2.0], [1.0, 
+-5.0]], [[2.0, 2.0], [2.0, 4.0]], [[-5.0, 2.0], [-5.0, 0.0]], [[6.0, -2.0], [3.0, 7.0]], [[5.0, -2.0], [-1.0, 4.0]]], [[[-6.0, 
+5.0], [-6.0, 0.0]], [[7.0, -3.0], [0.0, 0.0]], [[0.0, 7.0], [-4.0, -7.0]], [[-2.0, -6.0], [-4.0, 4.0]], [[4.0, 0.0], [-3.0, 
+-6.0]], [[-3.0, -1.0], [-2.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -7.0], [-3.0, -6.0]], [[3.0, -2.0], [5.0, 1.0]], 
+[[-5.0, -2.0], [4.0, -7.0]], [[2.0, 1.0], [-5.0, -6.0]], [[4.0, -6.0], [7.0, 5.0]], [[0.0, -4.0], [4.0, 7.0]]], [[[-1.0, -5.0], 
+[-6.0, -3.0]], [[0.0, 7.0], [4.0, 0.0]], [[-2.0, 0.0], [4.0, 0.0]], [[5.0, 7.0], [0.0, 6.0]], [[3.0, 3.0], [-4.0, -7.0]], 
+[[4.0, 5.0], [0.0, -4.0]]], [[[7.0, 0.0], [0.0, -1.0]], [[0.0, -1.0], [-6.0, 4.0]], [[-2.0, 1.0], [-2.0, 0.0]], [[-3.0, -1.0], 
+[-1.0, -5.0]], [[-1.0, 1.0], [-5.0, -6.0]], [[-4.0, -1.0], [-3.0, -6.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([17.0, 12.0])+(1.-msk_ref)*numpy.array([61.0, -41.0])
+      ref=msk_ref*numpy.array([[[3.0, 12.0], [24.0, 42.0]], [[32.0, -18.0], [-1.0, -22.0]], [[10.0, 17.0], [7.0, 11.0]], 
+[[-22.0, 6.0], [-31.0, 0.0]], [[27.0, -7.0], [10.0, 29.0]], [[15.0, -17.0], [-8.0, 22.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, 
+-18.0], [-27.0, -10.0]], [[-3.0, 36.0], [9.0, 3.0]], [[-7.0, 3.0], [14.0, 7.0]], [[20.0, 33.0], [4.0, 31.0]], [[10.0, 22.0], 
+[-32.0, -46.0]], [[16.0, 28.0], [-7.0, -33.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, -3.0])+(1.-msk_arg0)*numpy.array([1.0, 7.0])
+   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank4_offset0(self):
+      arg0=Data(5.0,self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, -4.0])+(1.-msk_arg1)*numpy.array([1.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[-5.0, -5.0, 2.0, 5.0], [-4.0, -5.0, 0.0, 1.0], [6.0, 4.0, -2.0, 7.0]], [[-2.0, -2.0, 6.0, 
+-2.0], [0.0, -5.0, 7.0, -4.0], [0.0, 1.0, 7.0, 1.0]]], [[[-7.0, -7.0, 6.0, 1.0], [1.0, -4.0, 1.0, 3.0], [3.0, -3.0, -6.0, 
+-4.0]], [[-7.0, 7.0, 5.0, -3.0], [-7.0, 2.0, 4.0, 3.0], [3.0, 0.0, 0.0, -7.0]]], [[[0.0, 3.0, 5.0, -6.0], [5.0, 6.0, -3.0, 
+-3.0], [-1.0, -1.0, 1.0, 0.0]], [[-3.0, -6.0, -2.0, -1.0], [-5.0, -4.0, 6.0, 3.0], [-1.0, 1.0, -7.0, 
+-2.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -6.0, 0.0, 0.0], [-2.0, 0.0, 1.0, 2.0], [-6.0, -6.0, -5.0, 5.0]], [[-2.0, -7.0, 
+5.0, -7.0], [-3.0, 0.0, -5.0, -7.0], [3.0, -5.0, -5.0, -2.0]]], [[[-2.0, 0.0, 5.0, -7.0], [2.0, 3.0, 3.0, -5.0], [-5.0, 7.0, 
+-1.0, -5.0]], [[6.0, -3.0, -4.0, 2.0], [-5.0, -4.0, 7.0, -7.0], [-7.0, -1.0, 4.0, 5.0]]], [[[-7.0, 3.0, 5.0, 1.0], [1.0, 5.0, 
+-6.0, -5.0], [4.0, -4.0, 0.0, -5.0]], [[5.0, -2.0, -1.0, 0.0], [-6.0, 5.0, -3.0, 0.0], [-2.0, 3.0, -5.0, 2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[42.0, -28.0], [-18.0, 12.0]])+(1.-msk_ref)*numpy.array([[1.0, 0.0], [7.0, 0.0]])
+      ref=msk_ref*numpy.array([[[[-25.0, -25.0, 10.0, 25.0], [-20.0, -25.0, 0.0, 5.0], [30.0, 20.0, -10.0, 35.0]], [[-10.0, 
+-10.0, 30.0, -10.0], [0.0, -25.0, 35.0, -20.0], [0.0, 5.0, 35.0, 5.0]]], [[[-35.0, -35.0, 30.0, 5.0], [5.0, -20.0, 5.0, 15.0], 
+[15.0, -15.0, -30.0, -20.0]], [[-35.0, 35.0, 25.0, -15.0], [-35.0, 10.0, 20.0, 15.0], [15.0, 0.0, 0.0, -35.0]]], [[[0.0, 15.0, 
+25.0, -30.0], [25.0, 30.0, -15.0, -15.0], [-5.0, -5.0, 5.0, 0.0]], [[-15.0, -30.0, -10.0, -5.0], [-25.0, -20.0, 30.0, 15.0], 
+[-5.0, 5.0, -35.0, -10.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -30.0, 0.0, 0.0], [-10.0, 0.0, 5.0, 10.0], [-30.0, -30.0, 
+-25.0, 25.0]], [[-10.0, -35.0, 25.0, -35.0], [-15.0, 0.0, -25.0, -35.0], [15.0, -25.0, -25.0, -10.0]]], [[[-10.0, 0.0, 25.0, 
+-35.0], [10.0, 15.0, 15.0, -25.0], [-25.0, 35.0, -5.0, -25.0]], [[30.0, -15.0, -20.0, 10.0], [-25.0, -20.0, 35.0, -35.0], 
+[-35.0, -5.0, 20.0, 25.0]]], [[[-35.0, 15.0, 25.0, 5.0], [5.0, 25.0, -30.0, -25.0], [20.0, -20.0, 0.0, -25.0]], [[25.0, -10.0, 
+-5.0, 0.0], [-30.0, 25.0, -15.0, 0.0], [-10.0, 15.0, -25.0, 10.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-1.0, 0.0, -5.0], [6.0, -2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0, -5.0], [3.0, -2.0, 
-4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, -1.0], [4.0, 7.0], [2.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -4.0], [2.0, 5.0], 
-[0.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-8.0, 31.0], [-6.0, -62.0]])+(1.-msk_ref)*numpy.array([[12.0, 30.0], [-13.0, -22.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_float_rank0_offset0(self):
+      arg0=Data(numpy.array([2.0, 2.0]),self.functionspace)
+      arg1=0.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([0.0, 0.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[6.0, -1.0, 7.0], [2.0, 1.0, 3.0]], [[0.0, 0.0, -1.0], [2.0, 0.0, 
-5.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 3.0, 4.0], [-4.0, 4.0, 0.0]], [[-3.0, 3.0, 4.0], [-1.0, -3.0, 0.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, -3.0], [2.0, 0.0], [7.0, -3.0]], [[6.0, 1.0], [-1.0, -6.0], [-5.0, 
-1.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, -4.0], [-3.0, 1.0], [4.0, 5.0]], [[-4.0, -5.0], [7.0, -5.0], [0.0, -6.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[7.0, -40.0], [-20.0, 10.0]])+(1.-msk_ref)*numpy.array([[51.0, 51.0], [-10.0, 55.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank0_offset0(self):
+      arg0=Data(numpy.array([0.0, -1.0]),self.functionspace)
+      arg1=numpy.array(4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([0.0, -4.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, -5.0, -5.0], [-1.0, 2.0, 1.0], [4.0, -6.0, 1.0], [-5.0, 0.0, -2.0]], [[-1.0, 6.0, 
--1.0], [-4.0, 0.0, -3.0], [2.0, 4.0, 6.0], [-3.0, 4.0, -1.0]]], [[[0.0, 1.0, 6.0], [-1.0, -3.0, 2.0], [6.0, 4.0, 5.0], [1.0, 
-6.0, 0.0]], [[0.0, 2.0, 0.0], [-4.0, 0.0, 1.0], [7.0, -6.0, -6.0], [1.0, 7.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 
-2.0, 7.0], [-5.0, 0.0, -4.0], [4.0, -1.0, 1.0], [3.0, -5.0, 3.0]], [[-7.0, 0.0, -3.0], [-4.0, -5.0, -6.0], [0.0, -4.0, 1.0], 
-[-3.0, -5.0, -1.0]]], [[[-4.0, -2.0, 6.0], [2.0, -5.0, 0.0], [4.0, -5.0, 4.0], [5.0, -1.0, 0.0]], [[-6.0, 0.0, -2.0], [-7.0, 
-3.0, -4.0], [-1.0, -1.0, -6.0], [4.0, 2.0, 5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-3.0, -3.0], [-5.0, 6.0], [-2.0, -1.0]], [[-3.0, 1.0], [-5.0, -5.0], [-1.0, 5.0]], [[-5.0, 
-6.0], [3.0, -3.0], [-6.0, -7.0]], [[6.0, 2.0], [-4.0, -6.0], [3.0, -7.0]]], [[[-5.0, 0.0], [0.0, -5.0], [-2.0, -3.0]], [[0.0, 
-5.0], [1.0, -5.0], [7.0, -4.0]], [[2.0, 0.0], [2.0, -1.0], [-7.0, -5.0]], [[-3.0, -7.0], [-1.0, 5.0], [2.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -5.0], [7.0, 7.0], [5.0, 7.0]], [[-6.0, 0.0], [6.0, 4.0], [-5.0, -4.0]], [[-1.0, 
--1.0], [0.0, -7.0], [0.0, 6.0]], [[2.0, 0.0], [2.0, 0.0], [-5.0, -6.0]]], [[[-2.0, 3.0], [-2.0, -1.0], [-2.0, 0.0]], [[0.0, 
--1.0], [2.0, 4.0], [-3.0, -6.0]], [[-1.0, -1.0], [-5.0, 1.0], [2.0, -7.0]], [[4.0, 2.0], [3.0, 0.0], [-1.0, 1.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-115.0, -35.0], [-36.0, 39.0]])+(1.-msk_ref)*numpy.array([[76.0, 81.0], [7.0, 163.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[-4.0, 1.0], [-4.0, 7.0], [5.0, 0.0]]),self.functionspace)
+      arg1=numpy.array([-2.0, 0.0, 5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([33.0, -2.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-7.0, -4.0])+(1.-msk_arg0)*numpy.array([1.0, 6.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, 6.0, -1.0, -7.0, 0.0], [6.0, -2.0, 0.0, 5.0, 5.0], [-3.0, 4.0, -6.0, -7.0, 0.0], [-4.0, 
--3.0, 5.0, -2.0, 3.0]])+(1.-msk_arg1)*numpy.array([[1.0, 2.0, -5.0, -7.0, -3.0], [0.0, -3.0, 1.0, 3.0, -1.0], [-5.0, 7.0, -1.0, 
-7.0, -5.0], [6.0, 5.0, 6.0, -1.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[21.0, -42.0, 7.0, 49.0, 0.0], [-42.0, 14.0, 0.0, -35.0, -35.0], [21.0, -28.0, 42.0, 49.0, 
-0.0], [28.0, 21.0, -35.0, 14.0, -21.0]], [[12.0, -24.0, 4.0, 28.0, 0.0], [-24.0, 8.0, 0.0, -20.0, -20.0], [12.0, -16.0, 24.0, 
-28.0, 0.0], [16.0, 12.0, -20.0, 8.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[1.0, 2.0, -5.0, -7.0, -3.0], [0.0, -3.0, 1.0, 3.0, 
--1.0], [-5.0, 7.0, -1.0, 7.0, -5.0], [6.0, 5.0, 6.0, -1.0, 0.0]], [[6.0, 12.0, -30.0, -42.0, -18.0], [0.0, -18.0, 6.0, 18.0, 
--6.0], [-30.0, 42.0, -6.0, 42.0, -30.0], [36.0, 30.0, 36.0, -6.0, 0.0]]])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[1.0, 6.0], [3.0, -3.0], [3.0, 5.0]], [[-1.0, 0.0], [2.0, -3.0], [-2.0, 
+-1.0]]]),self.functionspace)
+      arg1=numpy.array([[6.0, 5.0, -6.0], [-6.0, 4.0, -7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([31.0, -14.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, 1.0, -4.0], [-1.0, 5.0, -4.0]])+(1.-msk_arg0)*numpy.array([[5.0, -4.0, 3.0], [-4.0, 
--3.0, -5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, 3.0, 0.0, -4.0, -3.0], [7.0, -4.0, 0.0, 0.0, -5.0], [-7.0, 7.0, 1.0, 7.0, 5.0], [-6.0, 
-5.0, 1.0, -6.0, 0.0]], [[1.0, -7.0, 3.0, -4.0, -7.0], [-4.0, -5.0, 4.0, 1.0, 2.0], [6.0, -1.0, -4.0, -1.0, 2.0], [1.0, -3.0, 
-5.0, -7.0, 2.0]], [[3.0, -7.0, 0.0, -4.0, -1.0], [-4.0, -6.0, 7.0, 2.0, -7.0], [-3.0, 5.0, -7.0, 7.0, 0.0], [0.0, 3.0, -2.0, 
--2.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, -1.0, 2.0, 4.0, 4.0], [0.0, 2.0, 2.0, 6.0, -2.0], [-3.0, 6.0, 3.0, -3.0, 
--6.0], [7.0, -2.0, -4.0, 4.0, 1.0]], [[0.0, -7.0, 4.0, 2.0, -5.0], [7.0, -5.0, -5.0, -1.0, -4.0], [-1.0, 7.0, -1.0, 6.0, 7.0], 
-[-7.0, 5.0, -2.0, -2.0, 6.0]], [[-3.0, 7.0, 4.0, 1.0, -1.0], [6.0, -6.0, -7.0, 0.0, -4.0], [5.0, 3.0, -3.0, -2.0, 5.0], [1.0, 
-7.0, -7.0, -6.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-11.0, 9.0, 3.0, 28.0, 9.0], [-16.0, 35.0, -24.0, -7.0, 50.0], [46.0, -49.0, 20.0, -57.0, 
--18.0], [25.0, -35.0, 9.0, 25.0, -22.0]], [[-7.0, -10.0, 15.0, 0.0, -28.0], [-11.0, 3.0, -8.0, -3.0, 43.0], [49.0, -32.0, 7.0, 
--40.0, 5.0], [11.0, -32.0, 32.0, -21.0, -14.0]]])+(1.-msk_ref)*numpy.array([[[-19.0, 44.0, 6.0, 15.0, 37.0], [-10.0, 12.0, 9.0, 
-34.0, -6.0], [4.0, 11.0, 10.0, -45.0, -43.0], [66.0, -9.0, -33.0, 10.0, -19.0]], [[23.0, -10.0, -40.0, -27.0, 4.0], [-51.0, 
-37.0, 42.0, -21.0, 40.0], [-10.0, -60.0, 6.0, 4.0, -22.0], [-12.0, -42.0, 57.0, 20.0, -22.0]]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[3.0, -6.0], [0.0, -5.0], [-3.0, -5.0]], [[0.0, 4.0], [-3.0, 1.0], [-6.0, -7.0]], [[0.0, 5.0], 
+[-4.0, 0.0], [-1.0, -4.0]], [[4.0, -3.0], [7.0, 1.0], [0.0, -7.0]]], [[[-3.0, 0.0], [6.0, -5.0], [0.0, -4.0]], [[6.0, -1.0], 
+[6.0, 2.0], [7.0, -2.0]], [[0.0, -6.0], [5.0, 6.0], [2.0, -6.0]], [[-2.0, -1.0], [-5.0, 0.0], [-4.0, 
+1.0]]]]),self.functionspace)
+      arg1=numpy.array([[[-7.0, 5.0, -7.0], [7.0, 0.0, 0.0], [3.0, 0.0, 0.0], [-4.0, 0.0, -4.0]], [[6.0, 4.0, 0.0], [0.0, -3.0, 
+3.0], [-2.0, 7.0, 1.0], [5.0, 0.0, 1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([16.0, 147.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-3.0, 4.0, -3.0], [-6.0, 3.0, -1.0]], [[0.0, -3.0, -5.0], [-1.0, -6.0, 
--3.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, 1.0, 6.0], [-6.0, -6.0, -1.0]], [[-2.0, 6.0, -7.0], [-3.0, -6.0, -2.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[7.0, -6.0, -5.0, -7.0, 5.0], [2.0, -6.0, 4.0, -5.0, 5.0], [-1.0, -5.0, -5.0, 5.0, -1.0], 
-[0.0, 4.0, -2.0, -3.0, -4.0]], [[-1.0, -2.0, -7.0, -1.0, -3.0], [6.0, -5.0, 0.0, -3.0, 3.0], [-4.0, 0.0, 3.0, 0.0, 5.0], [-7.0, 
--1.0, -6.0, 5.0, -2.0]], [[-2.0, 3.0, 0.0, -6.0, 4.0], [-3.0, -5.0, 0.0, 5.0, -4.0], [0.0, 5.0, 4.0, -7.0, 5.0], [7.0, -6.0, 
-0.0, -7.0, -4.0]]], [[[3.0, 7.0, 0.0, 1.0, 6.0], [2.0, 6.0, -4.0, 2.0, -5.0], [6.0, -4.0, 0.0, -2.0, 1.0], [-3.0, 2.0, -7.0, 
--3.0, 6.0]], [[6.0, 1.0, -6.0, 7.0, -5.0], [2.0, -5.0, 0.0, 3.0, 4.0], [2.0, 1.0, -5.0, 0.0, 5.0], [4.0, 0.0, -3.0, 2.0, 2.0]], 
-[[5.0, -4.0, -3.0, 7.0, 4.0], [-4.0, -6.0, 4.0, 3.0, 4.0], [6.0, 5.0, 5.0, 3.0, -5.0], [0.0, 3.0, 6.0, 6.0, 
--1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -5.0, 7.0, 7.0, -4.0], [0.0, -3.0, 0.0, -2.0, 1.0], [-5.0, -5.0, -7.0, 2.0, 1.0], 
-[3.0, 0.0, -5.0, -1.0, -2.0]], [[-4.0, 5.0, -4.0, 1.0, 3.0], [6.0, 5.0, -6.0, -2.0, -3.0], [5.0, 0.0, -7.0, 3.0, 0.0], [0.0, 
--6.0, -5.0, 4.0, 0.0]], [[-2.0, -7.0, 6.0, -5.0, -2.0], [-3.0, 2.0, 5.0, 2.0, -5.0], [2.0, -3.0, 1.0, 1.0, 3.0], [-3.0, 5.0, 
--5.0, -5.0, -2.0]]], [[[1.0, 4.0, -6.0, 0.0, -7.0], [-7.0, 5.0, -7.0, 1.0, 2.0], [0.0, 0.0, 5.0, -3.0, -1.0], [5.0, 4.0, 0.0, 
--4.0, 0.0]], [[3.0, 0.0, 6.0, 5.0, 4.0], [-1.0, 7.0, 0.0, 2.0, -7.0], [5.0, -2.0, 6.0, 5.0, -4.0], [6.0, -1.0, -2.0, 4.0, 
-2.0]], [[-7.0, 0.0, -3.0, -1.0, -5.0], [2.0, 0.0, -5.0, -7.0, -4.0], [7.0, 7.0, -6.0, -6.0, 7.0], [1.0, 3.0, -4.0, 0.0, 2.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-24.0, -34.0, -28.0, 43.0, -94.0], [25.0, -32.0, 8.0, -18.0, 47.0], [-49.0, 22.0, -5.0, 15.0, 
-22.0], [-19.0, -13.0, 9.0, 68.0, -13.0]], [[-41.0, -10.0, 66.0, -31.0, 1.0], [-5.0, 82.0, -8.0, -45.0, -20.0], [-24.0, -42.0, 
--14.0, 28.0, -56.0], [-35.0, 22.0, 25.0, -7.0, 11.0]]])+(1.-msk_ref)*numpy.array([[[-25.0, -51.0, 21.0, -72.0, 22.0], [34.0, 
--49.0, 71.0, 3.0, -1.0], [-10.0, -3.0, -47.0, -1.0, 39.0], [-91.0, 3.0, -9.0, -24.0, -22.0]], [[-9.0, 77.0, -92.0, -1.0, 47.0], 
-[80.0, -35.0, -40.0, -23.0, 59.0], [-18.0, 29.0, -74.0, -2.0, -10.0], [-38.0, -83.0, 35.0, 49.0, 2.0]]])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank1_offset0(self):
+      arg0=Data(numpy.array([-7.0, -3.0]),self.functionspace)
+      arg1=numpy.array([6.0, 1.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-42.0, -7.0], [-18.0, -3.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank1_expandedData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([6.0, -2.0])+(1.-msk_arg0)*numpy.array([-3.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, 4.0], [3.0, 6.0]], [[-1.0, 3.0], [6.0, -7.0]], [[-7.0, 5.0], [-5.0, -6.0]], [[-6.0, 
-4.0], [5.0, 2.0]], [[-7.0, 0.0], [-2.0, -5.0]], [[-2.0, 5.0], [0.0, 3.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -6.0], [-7.0, 
-2.0]], [[3.0, 6.0], [2.0, 0.0]], [[-4.0, 4.0], [6.0, 1.0]], [[-3.0, -4.0], [-4.0, -4.0]], [[6.0, 7.0], [0.0, -4.0]], [[7.0, 
-0.0], [-1.0, -1.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, 24.0], [18.0, 36.0]], [[-6.0, 18.0], [36.0, -42.0]], [[-42.0, 30.0], [-30.0, -36.0]], 
-[[-36.0, 24.0], [30.0, 12.0]], [[-42.0, 0.0], [-12.0, -30.0]], [[-12.0, 30.0], [0.0, 18.0]]], [[[-8.0, -8.0], [-6.0, -12.0]], 
-[[2.0, -6.0], [-12.0, 14.0]], [[14.0, -10.0], [10.0, 12.0]], [[12.0, -8.0], [-10.0, -4.0]], [[14.0, 0.0], [4.0, 10.0]], [[4.0, 
--10.0], [0.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[21.0, 18.0], [21.0, -6.0]], [[-9.0, -18.0], [-6.0, 0.0]], [[12.0, -12.0], 
-[-18.0, -3.0]], [[9.0, 12.0], [12.0, 12.0]], [[-18.0, -21.0], [0.0, 12.0]], [[-21.0, 0.0], [3.0, 3.0]]], [[[0.0, 0.0], [0.0, 
-0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[5.0, 6.0], [-6.0, 5.0], [0.0, 1.0]]),self.functionspace)
+      arg1=numpy.array([[3.0, -7.0], [4.0, 6.0], [1.0, -3.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-9.0, -71.0], [39.0, -15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 2.0, 0.0], [-5.0, -1.0, 4.0]])+(1.-msk_arg0)*numpy.array([[1.0, 0.0, -1.0], [-6.0, -3.0, 
-0.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-6.0, -7.0], [-1.0, 7.0]], [[0.0, 0.0], [4.0, -4.0]], [[-4.0, -6.0], [-5.0, 4.0]], [[-1.0, 
--6.0], [-3.0, 1.0]], [[0.0, -3.0], [-4.0, 0.0]], [[-5.0, 6.0], [6.0, -4.0]]], [[[-7.0, 5.0], [0.0, 5.0]], [[3.0, -1.0], [7.0, 
--3.0]], [[-6.0, 5.0], [5.0, 0.0]], [[-4.0, 1.0], [-2.0, 5.0]], [[-5.0, 2.0], [-5.0, -3.0]], [[3.0, 7.0], [-3.0, -2.0]]], 
-[[[6.0, -3.0], [6.0, -6.0]], [[-1.0, 4.0], [4.0, -2.0]], [[4.0, 5.0], [-2.0, -3.0]], [[0.0, -3.0], [3.0, 3.0]], [[-6.0, -2.0], 
-[-4.0, -3.0]], [[5.0, 0.0], [2.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 7.0], [-2.0, -2.0]], [[-2.0, 4.0], [0.0, 
--5.0]], [[5.0, 5.0], [5.0, -7.0]], [[-3.0, 0.0], [0.0, 0.0]], [[-3.0, -4.0], [-6.0, -5.0]], [[0.0, -5.0], [0.0, 7.0]]], [[[6.0, 
--7.0], [4.0, -5.0]], [[0.0, 1.0], [-2.0, 0.0]], [[-3.0, -2.0], [-1.0, -1.0]], [[-4.0, 1.0], [0.0, -4.0]], [[-7.0, -2.0], [-7.0, 
-1.0]], [[-2.0, 6.0], [-3.0, -4.0]]], [[[6.0, 0.0], [0.0, 2.0]], [[3.0, 6.0], [-2.0, -7.0]], [[-3.0, 1.0], [-3.0, 2.0]], [[0.0, 
-4.0], [-4.0, -5.0]], [[0.0, 4.0], [3.0, 7.0]], [[2.0, 4.0], [0.0, 6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-14.0, 10.0], [0.0, 10.0]], [[6.0, -2.0], [14.0, -6.0]], [[-12.0, 10.0], [10.0, 0.0]], 
-[[-8.0, 2.0], [-4.0, 10.0]], [[-10.0, 4.0], [-10.0, -6.0]], [[6.0, 14.0], [-6.0, -4.0]]], [[[61.0, 18.0], [29.0, -64.0]], 
-[[-7.0, 17.0], [-11.0, 15.0]], [[42.0, 45.0], [12.0, -32.0]], [[9.0, 17.0], [29.0, 2.0]], [[-19.0, 5.0], [9.0, -9.0]], [[42.0, 
--37.0], [-19.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[-11.0, 7.0], [-2.0, -4.0]], [[-5.0, -2.0], [2.0, 2.0]], [[8.0, 4.0], 
-[8.0, -9.0]], [[-3.0, -4.0], [4.0, 5.0]], [[-3.0, -8.0], [-9.0, -12.0]], [[-2.0, -9.0], [0.0, 1.0]]], [[[12.0, -21.0], [0.0, 
-27.0]], [[12.0, -27.0], [6.0, 30.0]], [[-21.0, -24.0], [-27.0, 45.0]], [[30.0, -3.0], [0.0, 12.0]], [[39.0, 30.0], [57.0, 
-27.0]], [[6.0, 12.0], [9.0, -30.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-4.0, 4.0], [-6.0, -2.0], [-7.0, 0.0]], [[-7.0, 0.0], [-4.0, -4.0], [2.0, 
+2.0]]]),self.functionspace)
+      arg1=numpy.array([[[7.0, 1.0], [-6.0, 7.0], [-6.0, 5.0]], [[0.0, 5.0], [-4.0, -4.0], [-1.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[64.0, -96.0], [54.0, 10.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -3.0, -5.0, 5.0, 0.0], [-1.0, 3.0, 0.0, -3.0, 7.0], [0.0, 7.0, 0.0, -2.0, -3.0], [-5.0, 
-2.0, 5.0, 6.0, 5.0]])+(1.-msk_arg0)*numpy.array([[-7.0, 2.0, -1.0, 0.0, 2.0], [-6.0, -4.0, -2.0, 3.0, -5.0], [0.0, -1.0, 6.0, 
-0.0, -1.0], [-5.0, -2.0, -7.0, -3.0, 7.0]])
-      arg1=-7.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-21.0, 21.0, 35.0, -35.0, -0.0], [7.0, -21.0, -0.0, 21.0, -49.0], [-0.0, -49.0, -0.0, 14.0, 
-21.0], [35.0, -14.0, -35.0, -42.0, -35.0]])+(1.-msk_ref)*numpy.array([[49.0, -14.0, 7.0, -0.0, -14.0], [42.0, 28.0, 14.0, 
--21.0, 35.0], [-0.0, 7.0, -42.0, -0.0, 7.0], [35.0, 14.0, 49.0, 21.0, -49.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-5.0, -4.0], [-2.0, -1.0], [2.0, 3.0]], [[4.0, -7.0], [0.0, 7.0], [-3.0, -4.0]], [[0.0, -3.0], 
+[-4.0, -6.0], [6.0, 0.0]], [[-1.0, 4.0], [0.0, 3.0], [-4.0, -5.0]]], [[[5.0, -4.0], [-3.0, 4.0], [6.0, 0.0]], [[2.0, 7.0], 
+[-4.0, -6.0], [7.0, -2.0]], [[-7.0, -1.0], [6.0, 4.0], [-3.0, 0.0]], [[6.0, 1.0], [-6.0, -2.0], [2.0, 
+5.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[-4.0, 2.0], [-3.0, -7.0], [7.0, -7.0]], [[-2.0, 6.0], [-3.0, 5.0], [3.0, 7.0]], [[7.0, 0.0], [-1.0, 
+-3.0], [0.0, 7.0]], [[-6.0, -4.0], [0.0, -3.0], [-5.0, 7.0]]], [[[7.0, -2.0], [7.0, 7.0], [-7.0, -4.0]], [[-4.0, -5.0], [0.0, 
+4.0], [5.0, -1.0]], [[1.0, -1.0], [-7.0, 3.0], [-4.0, 2.0]], [[-2.0, -3.0], [-4.0, 5.0], [-5.0, 2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[17.0, -90.0], [-79.0, -110.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, -5.0, 7.0, 2.0, 7.0], [6.0, 1.0, 6.0, -7.0, -6.0], [-4.0, 4.0, -6.0, -7.0, -3.0], [7.0, 
--2.0, 4.0, 0.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 3.0, 1.0, 5.0, -4.0], [-4.0, 6.0, -5.0, -5.0, -1.0], [-4.0, 6.0, 0.0, 
--2.0, 0.0], [0.0, -3.0, 6.0, 1.0, 7.0]])
-      arg1=numpy.array(0.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, -0.0, -0.0], [0.0, 
--0.0, 0.0, 0.0, -0.0]])+(1.-msk_ref)*numpy.array([[-0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, 0.0, 
--0.0, 0.0], [0.0, -0.0, 0.0, 0.0, 0.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank2_offset0(self):
+      arg0=Data(numpy.array([-3.0, -7.0]),self.functionspace)
+      arg1=numpy.array([[2.0, 7.0, -1.0, 6.0, 5.0], [6.0, -5.0, -2.0, 3.0, 5.0], [0.0, 3.0, -1.0, -2.0, 1.0], [-3.0, -2.0, 
+-1.0, 6.0, 6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-6.0, -21.0, 3.0, -18.0, -15.0], [-18.0, 15.0, 6.0, -9.0, -15.0], [0.0, -9.0, 3.0, 6.0, -3.0], 
+[9.0, 6.0, 3.0, -18.0, -18.0]], [[-14.0, -49.0, 7.0, -42.0, -35.0], [-42.0, 35.0, 14.0, -21.0, -35.0], [0.0, -21.0, 7.0, 14.0, 
+-7.0], [21.0, 14.0, 7.0, -42.0, -42.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-2.0, 1.0, -5.0], [0.0, 5.0, 4.0], [0.0, -5.0, -3.0], [6.0, 7.0, 5.0], [0.0, -7.0, 5.0]], 
-[[2.0, 0.0, -6.0], [-3.0, 2.0, 5.0], [0.0, 2.0, 5.0], [4.0, -6.0, 0.0], [-6.0, 0.0, 0.0]], [[-3.0, 2.0, -2.0], [-7.0, -4.0, 
--2.0], [5.0, 0.0, -1.0], [-3.0, -3.0, 6.0], [5.0, 7.0, 2.0]], [[-3.0, 0.0, -5.0], [0.0, 0.0, 4.0], [6.0, 2.0, -6.0], [0.0, 
--7.0, -3.0], [5.0, -3.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 5.0, -7.0], [-6.0, -1.0, 2.0], [-4.0, -6.0, 1.0], [-4.0, 
--3.0, 2.0], [-4.0, -3.0, -1.0]], [[-4.0, -5.0, 7.0], [2.0, -2.0, 0.0], [2.0, 3.0, -1.0], [-5.0, 5.0, -5.0], [0.0, 0.0, 1.0]], 
-[[-4.0, -7.0, -1.0], [7.0, -5.0, 3.0], [0.0, 0.0, -5.0], [-1.0, 7.0, 6.0], [0.0, -6.0, -1.0]], [[3.0, 5.0, 0.0], [1.0, -5.0, 
-7.0], [-3.0, -6.0, 6.0], [0.0, -1.0, -1.0], [-4.0, 3.0, 2.0]]])
-      arg1=numpy.array([0.0, 6.0, -7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[41.0, 2.0, -9.0, 7.0, -77.0], [42.0, -23.0, -23.0, -36.0, 0.0], [26.0, -10.0, 7.0, -60.0, 
-28.0], [35.0, -28.0, 54.0, -21.0, 17.0]])+(1.-msk_ref)*numpy.array([[79.0, -20.0, -43.0, -32.0, -11.0], [-79.0, -12.0, 25.0, 
-65.0, -7.0], [-35.0, -51.0, 35.0, 0.0, -29.0], [30.0, -79.0, -78.0, 1.0, 4.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[-6.0, 5.0], [-3.0, -4.0], [-5.0, 3.0]]),self.functionspace)
+      arg1=numpy.array([[[-4.0, 1.0, 2.0, 2.0, 1.0], [-7.0, 2.0, -2.0, 7.0, -6.0], [3.0, 0.0, -2.0, 0.0, 0.0], [3.0, -2.0, 7.0, 
+1.0, -3.0]], [[-5.0, 0.0, 7.0, 2.0, 2.0], [-7.0, 7.0, -1.0, 3.0, 0.0], [3.0, -2.0, 2.0, -4.0, 7.0], [2.0, 7.0, -4.0, 4.0, 
+-4.0]], [[2.0, -1.0, -3.0, -1.0, 5.0], [3.0, -7.0, -6.0, -7.0, 3.0], [-7.0, 0.0, -5.0, -1.0, 2.0], [4.0, 1.0, -2.0, -1.0, 
+3.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[29.0, -1.0, -18.0, -13.0, -37.0], [48.0, 2.0, 45.0, -16.0, 21.0], [8.0, 6.0, 31.0, 17.0, -31.0], 
+[-44.0, -14.0, -20.0, -13.0, 15.0]], [[6.0, 2.0, -27.0, -1.0, 12.0], [2.0, -39.0, -24.0, 2.0, -21.0], [-18.0, 8.0, -33.0, 13.0, 
+-22.0], [19.0, -35.0, 45.0, -14.0, 10.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 1.0, 3.0], [2.0, -3.0, 4.0]], [[-6.0, 7.0, -4.0], [-4.0, 3.0, 5.0]], [[-3.0, -5.0, 
-3.0], [-3.0, 2.0, 3.0]], [[-6.0, 6.0, 3.0], [4.0, 3.0, 2.0]], [[-5.0, 6.0, 5.0], [0.0, -5.0, 6.0]]], [[[-4.0, 6.0, -4.0], 
-[-2.0, -4.0, 0.0]], [[4.0, -1.0, -4.0], [7.0, -5.0, -3.0]], [[-1.0, 3.0, -6.0], [-3.0, -2.0, 4.0]], [[5.0, -3.0, -1.0], [-3.0, 
-2.0, -1.0]], [[0.0, -6.0, 1.0], [3.0, 5.0, 2.0]]], [[[-5.0, -3.0, -4.0], [4.0, 3.0, 0.0]], [[4.0, -1.0, -2.0], [-3.0, -1.0, 
-6.0]], [[2.0, -3.0, 5.0], [-4.0, 4.0, -4.0]], [[4.0, -6.0, 3.0], [-2.0, 4.0, -1.0]], [[-1.0, -6.0, 1.0], [-5.0, -6.0, 0.0]]], 
-[[[-5.0, 3.0, 6.0], [2.0, 7.0, 2.0]], [[5.0, -2.0, 0.0], [0.0, -6.0, 5.0]], [[4.0, 3.0, 0.0], [5.0, 0.0, 2.0]], [[5.0, -4.0, 
--5.0], [-1.0, -4.0, 2.0]], [[1.0, -6.0, -4.0], [5.0, -4.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -5.0, -1.0], [5.0, 
--6.0, 6.0]], [[-4.0, 0.0, -7.0], [-7.0, 0.0, -1.0]], [[0.0, 5.0, 2.0], [-2.0, 5.0, 2.0]], [[-2.0, -5.0, 5.0], [-1.0, 7.0, 
--2.0]], [[4.0, 3.0, -7.0], [-6.0, 0.0, 3.0]]], [[[-4.0, -4.0, -3.0], [-4.0, -5.0, -7.0]], [[1.0, 2.0, 6.0], [1.0, 3.0, -5.0]], 
-[[5.0, 0.0, 0.0], [5.0, 3.0, -4.0]], [[6.0, -7.0, -4.0], [-4.0, 7.0, 7.0]], [[6.0, 4.0, 7.0], [-2.0, 6.0, 4.0]]], [[[2.0, 3.0, 
-1.0], [0.0, 7.0, -6.0]], [[-1.0, 6.0, -6.0], [0.0, -5.0, 0.0]], [[6.0, -2.0, -3.0], [1.0, -2.0, -5.0]], [[4.0, 4.0, 7.0], [7.0, 
--5.0, -7.0]], [[4.0, 2.0, 0.0], [-1.0, -3.0, -2.0]]], [[[3.0, -4.0, 4.0], [0.0, 5.0, -2.0]], [[-5.0, 0.0, -5.0], [-5.0, 6.0, 
--5.0]], [[6.0, -3.0, 3.0], [-7.0, -6.0, 3.0]], [[-4.0, 2.0, 6.0], [-6.0, -2.0, -7.0]], [[-2.0, 5.0, -5.0], [-4.0, 0.0, -3.0]]]])
-      arg1=numpy.array([[5.0, -6.0, -3.0], [-3.0, 5.0, 0.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-36.0, -33.0, 25.0, -72.0, -101.0], [-58.0, -8.0, -6.0, 65.0, 49.0], [8.0, 36.0, 45.0, 73.0, 
-13.0], [-32.0, 7.0, -13.0, 47.0, 18.0]])+(1.-msk_ref)*numpy.array([[-12.0, 22.0, -5.0, 43.0, 41.0], [0.0, -13.0, 25.0, 131.0, 
-21.0], [24.0, -48.0, 38.0, -71.0, -4.0], [52.0, 35.0, 30.0, -42.0, -13.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[5.0, -7.0], [-2.0, -3.0], [7.0, 2.0]], [[-4.0, 5.0], [-3.0, -6.0], [5.0, 
+-1.0]]]),self.functionspace)
+      arg1=numpy.array([[[[-7.0, 4.0, 0.0, 4.0, 2.0], [-1.0, -5.0, -6.0, -3.0, 1.0], [3.0, -5.0, -6.0, 0.0, 1.0], [4.0, -5.0, 
+1.0, 3.0, -7.0]], [[1.0, 0.0, -5.0, 3.0, -5.0], [4.0, 0.0, 3.0, 4.0, 0.0], [2.0, -2.0, 5.0, 6.0, -7.0], [6.0, -3.0, 1.0, 3.0, 
+-7.0]], [[1.0, -3.0, -1.0, 6.0, -3.0], [-1.0, 7.0, 6.0, 4.0, 6.0], [3.0, 0.0, -5.0, 5.0, -2.0], [5.0, 1.0, 6.0, 6.0, 3.0]]], 
+[[[-4.0, -2.0, -6.0, -1.0, -4.0], [3.0, 1.0, -5.0, 6.0, 4.0], [3.0, 7.0, 7.0, -5.0, 1.0], [-4.0, -6.0, 0.0, 0.0, 0.0]], [[2.0, 
+-1.0, -6.0, 0.0, 5.0], [7.0, 6.0, -3.0, 3.0, 0.0], [-7.0, 3.0, 0.0, -3.0, -2.0], [1.0, -7.0, 1.0, -4.0, -1.0]], [[-3.0, -5.0, 
+-5.0, 2.0, -7.0], [4.0, 5.0, 3.0, -5.0, 6.0], [-3.0, 2.0, 0.0, -1.0, 6.0], [-1.0, -3.0, 0.0, 3.0, 2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-35.0, -15.0, 20.0, 70.0, -35.0], [-33.0, 27.0, 50.0, -53.0, 61.0], [26.0, -48.0, -103.0, 47.0, 
+37.0], [51.0, 18.0, 42.0, 78.0, 13.0]], [[19.0, -33.0, 24.0, -32.0, -48.0], [-38.0, 13.0, 35.0, 34.0, 19.0], [39.0, 56.0, 52.0, 
+-14.0, 21.0], [-61.0, 61.0, -4.0, 3.0, 80.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[6.0, 1.0, 5.0, 7.0, 2.0], [0.0, 5.0, 5.0, 3.0, 2.0], [7.0, 0.0, 3.0, 0.0, 4.0], [-1.0, 5.0, 
--3.0, -6.0, -4.0]])+(1.-msk_arg0)*numpy.array([[2.0, 4.0, 3.0, -3.0, -1.0], [1.0, 6.0, 6.0, -2.0, -3.0], [-2.0, -4.0, 2.0, 0.0, 
-7.0], [-4.0, 5.0, -6.0, -6.0, 0.0]])
-      arg1=numpy.array([6.0, -3.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[36.0, -18.0], [6.0, -3.0], [30.0, -15.0], [42.0, -21.0], [12.0, -6.0]], [[0.0, 0.0], [30.0, 
--15.0], [30.0, -15.0], [18.0, -9.0], [12.0, -6.0]], [[42.0, -21.0], [0.0, 0.0], [18.0, -9.0], [0.0, 0.0], [24.0, -12.0]], 
-[[-6.0, 3.0], [30.0, -15.0], [-18.0, 9.0], [-36.0, 18.0], [-24.0, 12.0]]])+(1.-msk_ref)*numpy.array([[[12.0, -6.0], [24.0, 
--12.0], [18.0, -9.0], [-18.0, 9.0], [-6.0, 3.0]], [[6.0, -3.0], [36.0, -18.0], [36.0, -18.0], [-12.0, 6.0], [-18.0, 9.0]], 
-[[-12.0, 6.0], [-24.0, 12.0], [12.0, -6.0], [0.0, 0.0], [42.0, -21.0]], [[-24.0, 12.0], [30.0, -15.0], [-36.0, 18.0], [-36.0, 
-18.0], [0.0, 0.0]]])
+   def test_generalTransposedTensorProduct_constData_rank1_array_rank3_offset0(self):
+      arg0=Data(numpy.array([7.0, 1.0]),self.functionspace)
+      arg1=numpy.array([[[1.0, 0.0], [5.0, 0.0]], [[0.0, 6.0], [-2.0, -1.0]], [[1.0, 2.0], [-6.0, -2.0]], [[-6.0, -5.0], [-5.0, 
+5.0]], [[0.0, 1.0], [3.0, 6.0]], [[2.0, 2.0], [7.0, 7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[7.0, 0.0], [35.0, 0.0]], [[0.0, 42.0], [-14.0, -7.0]], [[7.0, 14.0], [-42.0, -14.0]], [[-42.0, 
+-35.0], [-35.0, 35.0]], [[0.0, 7.0], [21.0, 42.0]], [[14.0, 14.0], [49.0, 49.0]]], [[[1.0, 0.0], [5.0, 0.0]], [[0.0, 6.0], 
+[-2.0, -1.0]], [[1.0, 2.0], [-6.0, -2.0]], [[-6.0, -5.0], [-5.0, 5.0]], [[0.0, 1.0], [3.0, 6.0]], [[2.0, 2.0], [7.0, 
+7.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 1.0, -3.0], [-6.0, -3.0, -3.0], [-4.0, 4.0, -1.0], [-5.0, 3.0, -5.0], [-3.0, 1.0, 
-5.0]], [[-6.0, -3.0, 4.0], [2.0, -6.0, -1.0], [6.0, 5.0, 0.0], [-1.0, -2.0, 7.0], [1.0, -3.0, -3.0]], [[-5.0, -5.0, -1.0], 
-[-3.0, 7.0, -7.0], [0.0, 1.0, 0.0], [-7.0, 4.0, 1.0], [-1.0, 7.0, -6.0]], [[-5.0, 1.0, -2.0], [-2.0, -7.0, -2.0], [7.0, 6.0, 
--6.0], [-4.0, 0.0, 3.0], [-6.0, -1.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, -4.0, 0.0], [-1.0, -5.0, -5.0], [-4.0, -1.0, 
-6.0], [3.0, -7.0, -7.0], [-6.0, 7.0, -2.0]], [[1.0, -3.0, -4.0], [1.0, -4.0, 1.0], [-5.0, 5.0, 7.0], [6.0, -7.0, -7.0], [-1.0, 
-2.0, 7.0]], [[7.0, -7.0, -4.0], [-5.0, -1.0, 3.0], [-7.0, 7.0, 3.0], [-6.0, -7.0, 6.0], [3.0, 0.0, 7.0]], [[-7.0, 0.0, -7.0], 
-[0.0, -5.0, 0.0], [6.0, 6.0, 7.0], [5.0, 6.0, -5.0], [7.0, 5.0, -7.0]]])
-      arg1=numpy.array([[-3.0, 5.0], [4.0, -1.0], [2.0, -7.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[13.0, -5.0], [0.0, -6.0], [26.0, -17.0], [17.0, 7.0], [23.0, -51.0]], [[14.0, -55.0], [-32.0, 
-23.0], [2.0, 25.0], [9.0, -52.0], [-21.0, 29.0]], [[-7.0, -13.0], [23.0, 27.0], [4.0, -1.0], [39.0, -46.0], [19.0, 30.0]], 
-[[15.0, -12.0], [-26.0, 11.0], [-9.0, 71.0], [18.0, -41.0], [16.0, -36.0]]])+(1.-msk_ref)*numpy.array([[[-25.0, 19.0], [-27.0, 
-35.0], [20.0, -61.0], [-51.0, 71.0], [42.0, -23.0]], [[-23.0, 36.0], [-17.0, 2.0], [49.0, -79.0], [-60.0, 86.0], [25.0, 
--56.0]], [[-57.0, 70.0], [17.0, -45.0], [55.0, -63.0], [2.0, -65.0], [5.0, -34.0]], [[7.0, 14.0], [-20.0, 5.0], [20.0, -25.0], 
-[-1.0, 54.0], [-15.0, 79.0]]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank4_offset1(self):
+      arg0=Data(numpy.array([[5.0, -7.0], [0.0, -4.0], [5.0, -1.0]]),self.functionspace)
+      arg1=numpy.array([[[[2.0, 2.0], [-6.0, 0.0]], [[-6.0, -5.0], [-1.0, 6.0]], [[2.0, -2.0], [-3.0, 1.0]], [[-1.0, 6.0], 
+[1.0, -7.0]], [[0.0, 0.0], [-5.0, -6.0]], [[3.0, -3.0], [3.0, -7.0]]], [[[-2.0, 5.0], [2.0, -6.0]], [[1.0, 0.0], [-4.0, -4.0]], 
+[[-7.0, -5.0], [1.0, -2.0]], [[-1.0, 3.0], [-6.0, -1.0]], [[0.0, -1.0], [3.0, 5.0]], [[-2.0, 6.0], [-2.0, -7.0]]], [[[-1.0, 
+6.0], [-2.0, 0.0]], [[-2.0, 7.0], [1.0, 3.0]], [[3.0, 6.0], [1.0, -6.0]], [[0.0, -5.0], [-6.0, 7.0]], [[0.0, -5.0], [1.0, 
+5.0]], [[0.0, -5.0], [-7.0, -4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[5.0, 40.0], [-40.0, 0.0]], [[-40.0, 10.0], [0.0, 45.0]], [[25.0, 20.0], [-10.0, -25.0]], [[-5.0, 
+5.0], [-25.0, 0.0]], [[0.0, -25.0], [-20.0, -5.0]], [[15.0, -40.0], [-20.0, -55.0]]], [[[-5.0, -40.0], [36.0, 24.0]], [[40.0, 
+28.0], [22.0, -29.0]], [[11.0, 28.0], [16.0, 7.0]], [[11.0, -49.0], [23.0, 46.0]], [[0.0, 9.0], [22.0, 17.0]], [[-13.0, 2.0], 
+[-6.0, 81.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, -4.0, 0.0], [-1.0, 5.0, -3.0]], [[-2.0, 2.0, 7.0], [6.0, 0.0, 7.0]], [[-3.0, 6.0, 
-0.0], [-3.0, 4.0, 0.0]], [[0.0, 0.0, -5.0], [-7.0, 6.0, 4.0]], [[-2.0, 5.0, 5.0], [4.0, -6.0, 6.0]]], [[[5.0, 1.0, 0.0], [-5.0, 
-7.0, -3.0]], [[5.0, 0.0, 5.0], [-3.0, 7.0, 6.0]], [[-3.0, -1.0, 1.0], [-5.0, 1.0, -4.0]], [[2.0, 6.0, -2.0], [-3.0, -6.0, 
--5.0]], [[5.0, 2.0, 2.0], [-6.0, 1.0, 3.0]]], [[[-2.0, 5.0, 0.0], [-7.0, 4.0, 0.0]], [[2.0, -6.0, 3.0], [4.0, 2.0, -1.0]], 
-[[0.0, -4.0, 7.0], [4.0, -3.0, -3.0]], [[4.0, 4.0, -2.0], [1.0, -2.0, -7.0]], [[5.0, 1.0, 7.0], [0.0, 7.0, -7.0]]], [[[-4.0, 
-7.0, 6.0], [0.0, 2.0, 5.0]], [[3.0, -1.0, -5.0], [-7.0, 7.0, -3.0]], [[-5.0, 2.0, -5.0], [5.0, 7.0, 3.0]], [[-5.0, -4.0, 1.0], 
-[-4.0, -1.0, -6.0]], [[3.0, -1.0, 2.0], [0.0, 3.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 0.0, -1.0], [6.0, 1.0, -1.0]], 
-[[0.0, 1.0, 7.0], [5.0, 7.0, 0.0]], [[-1.0, 6.0, 6.0], [1.0, -6.0, 5.0]], [[-2.0, 0.0, 2.0], [0.0, -4.0, -7.0]], [[0.0, -6.0, 
-4.0], [7.0, 0.0, 2.0]]], [[[0.0, 7.0, -7.0], [6.0, -1.0, -5.0]], [[4.0, 1.0, 7.0], [0.0, 1.0, 2.0]], [[-4.0, 7.0, -6.0], [-7.0, 
--3.0, 3.0]], [[1.0, 6.0, 2.0], [5.0, -5.0, 2.0]], [[-3.0, 7.0, -2.0], [0.0, 5.0, -5.0]]], [[[1.0, -4.0, 4.0], [-1.0, -6.0, 
-7.0]], [[-1.0, 0.0, -5.0], [3.0, -1.0, 6.0]], [[-6.0, 2.0, -2.0], [7.0, 7.0, 0.0]], [[5.0, -6.0, -1.0], [-4.0, 0.0, 3.0]], 
-[[4.0, -1.0, 0.0], [-3.0, 5.0, -4.0]]], [[[1.0, -1.0, -7.0], [0.0, -1.0, 7.0]], [[6.0, 3.0, 0.0], [-7.0, -2.0, -2.0]], [[0.0, 
--1.0, -5.0], [-5.0, -7.0, -1.0]], [[-5.0, 4.0, -1.0], [-7.0, 4.0, 0.0]], [[-6.0, 1.0, 6.0], [3.0, 4.0, 3.0]]]])
-      arg1=numpy.array([[[3.0, 6.0], [2.0, 6.0], [2.0, 0.0]], [[-3.0, 4.0], [-5.0, -4.0], [1.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-21.0, -15.0], [1.0, 3.0], [-8.0, -10.0], [-15.0, -64.0], [38.0, 40.0]], [[-6.0, -3.0], [5.0, 
--28.0], [-3.0, -36.0], [48.0, 75.0], [39.0, 5.0]], [[5.0, -26.0], [-23.0, -13.0], [6.0, 13.0], [16.0, 81.0], [-11.0, 29.0]], 
-[[9.0, -5.0], [-20.0, -35.0], [-68.0, -35.0], [-10.0, -48.0], [-1.0, -9.0]]])+(1.-msk_ref)*numpy.array([[[-47.0, -19.0], 
-[-34.0, -2.0], [53.0, 43.0], [11.0, 25.0], [-23.0, -14.0]], [[-18.0, 85.0], [25.0, 20.0], [29.0, -7.0], [31.0, 76.0], [-29.0, 
-19.0]], [[43.0, -19.0], [-11.0, -8.0], [-74.0, -24.0], [16.0, -31.0], [-10.0, -2.0]], [[-1.0, -17.0], [53.0, 40.0], [37.0, 
-5.0], [-8.0, -50.0], [-30.0, -43.0]]])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([6.0, 3.0]),self.functionspace)
+      arg1=Data(-3.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-18.0, -9.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -4.0, -7.0, -6.0, -2.0], [0.0, 6.0, -2.0, 7.0, 7.0], [-2.0, 4.0, 1.0, 0.0, 2.0], [-7.0, 
--4.0, -5.0, 2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[7.0, -3.0, 5.0, -3.0, -2.0], [2.0, -1.0, -3.0, -5.0, 3.0], [5.0, 5.0, 7.0, 
-1.0, 7.0], [5.0, 7.0, -2.0, -5.0, -1.0]])
-      arg1=numpy.array([[0.0, 1.0, 5.0, -6.0, -1.0], [-6.0, 0.0, 1.0, 5.0, 0.0], [-4.0, 1.0, 0.0, -2.0, 7.0], [0.0, -3.0, 7.0, 
-3.0, -4.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 3.0, 15.0, -18.0, -3.0], [-18.0, 0.0, 3.0, 15.0, 0.0], [-12.0, 3.0, 0.0, -6.0, 21.0], 
-[0.0, -9.0, 21.0, 9.0, -12.0]], [[0.0, -4.0, -20.0, 24.0, 4.0], [24.0, 0.0, -4.0, -20.0, 0.0], [16.0, -4.0, 0.0, 8.0, -28.0], 
-[0.0, 12.0, -28.0, -12.0, 16.0]], [[0.0, -7.0, -35.0, 42.0, 7.0], [42.0, 0.0, -7.0, -35.0, 0.0], [28.0, -7.0, 0.0, 14.0, 
--49.0], [0.0, 21.0, -49.0, -21.0, 28.0]], [[0.0, -6.0, -30.0, 36.0, 6.0], [36.0, 0.0, -6.0, -30.0, 0.0], [24.0, -6.0, 0.0, 
-12.0, -42.0], [0.0, 18.0, -42.0, -18.0, 24.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 0.0, 
-4.0, -14.0], [0.0, 6.0, -14.0, -6.0, 8.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 6.0, 30.0, -36.0, -6.0], [-36.0, 0.0, 6.0, 30.0, 0.0], [-24.0, 6.0, 0.0, -12.0, 42.0], [0.0, 
--18.0, 42.0, 18.0, -24.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 0.0, 4.0, -14.0], [0.0, 
-6.0, -14.0, -6.0, 8.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, -14.0, 49.0], [0.0, 
--21.0, 49.0, 21.0, -28.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, -14.0, 49.0], [0.0, 
--21.0, 49.0, 21.0, -28.0]]], [[[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 0.0, 4.0, -14.0], 
-[0.0, 6.0, -14.0, -6.0, 8.0]], [[0.0, 4.0, 20.0, -24.0, -4.0], [-24.0, 0.0, 4.0, 20.0, 0.0], [-16.0, 4.0, 0.0, -8.0, 28.0], 
-[0.0, -12.0, 28.0, 12.0, -16.0]], [[0.0, 1.0, 5.0, -6.0, -1.0], [-6.0, 0.0, 1.0, 5.0, 0.0], [-4.0, 1.0, 0.0, -2.0, 7.0], [0.0, 
--3.0, 7.0, 3.0, -4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]], [[0.0, 2.0, 10.0, -12.0, -2.0], [-12.0, 0.0, 2.0, 10.0, 0.0], [-8.0, 2.0, 0.0, -4.0, 14.0], [0.0, -6.0, 14.0, 6.0, 
--8.0]]], [[[0.0, -7.0, -35.0, 42.0, 7.0], [42.0, 0.0, -7.0, -35.0, 0.0], [28.0, -7.0, 0.0, 14.0, -49.0], [0.0, 21.0, -49.0, 
--21.0, 28.0]], [[0.0, -4.0, -20.0, 24.0, 4.0], [24.0, 0.0, -4.0, -20.0, 0.0], [16.0, -4.0, 0.0, 8.0, -28.0], [0.0, 12.0, -28.0, 
--12.0, 16.0]], [[0.0, -5.0, -25.0, 30.0, 5.0], [30.0, 0.0, -5.0, -25.0, 0.0], [20.0, -5.0, 0.0, 10.0, -35.0], [0.0, 15.0, 
--35.0, -15.0, 20.0]], [[0.0, 2.0, 10.0, -12.0, -2.0], [-12.0, 0.0, 2.0, 10.0, 0.0], [-8.0, 2.0, 0.0, -4.0, 14.0], [0.0, -6.0, 
-14.0, 6.0, -8.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, -14.0, 49.0], [0.0, -21.0, 
-49.0, 21.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 
-0.0, -14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]], [[0.0, -3.0, -15.0, 18.0, 3.0], [18.0, 0.0, -3.0, -15.0, 0.0], [12.0, 
--3.0, 0.0, 6.0, -21.0], [0.0, 9.0, -21.0, -9.0, 12.0]], [[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 
-5.0, 0.0, -10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, -3.0, -15.0, 18.0, 3.0], [18.0, 0.0, -3.0, -15.0, 0.0], [12.0, 
--3.0, 0.0, 6.0, -21.0], [0.0, 9.0, -21.0, -9.0, 12.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, 
--2.0, 0.0, 4.0, -14.0], [0.0, 6.0, -14.0, -6.0, 8.0]]], [[[0.0, 2.0, 10.0, -12.0, -2.0], [-12.0, 0.0, 2.0, 10.0, 0.0], [-8.0, 
-2.0, 0.0, -4.0, 14.0], [0.0, -6.0, 14.0, 6.0, -8.0]], [[0.0, -1.0, -5.0, 6.0, 1.0], [6.0, 0.0, -1.0, -5.0, 0.0], [4.0, -1.0, 
-0.0, 2.0, -7.0], [0.0, 3.0, -7.0, -3.0, 4.0]], [[0.0, -3.0, -15.0, 18.0, 3.0], [18.0, 0.0, -3.0, -15.0, 0.0], [12.0, -3.0, 0.0, 
-6.0, -21.0], [0.0, 9.0, -21.0, -9.0, 12.0]], [[0.0, -5.0, -25.0, 30.0, 5.0], [30.0, 0.0, -5.0, -25.0, 0.0], [20.0, -5.0, 0.0, 
-10.0, -35.0], [0.0, 15.0, -35.0, -15.0, 20.0]], [[0.0, 3.0, 15.0, -18.0, -3.0], [-18.0, 0.0, 3.0, 15.0, 0.0], [-12.0, 3.0, 0.0, 
--6.0, 21.0], [0.0, -9.0, 21.0, 9.0, -12.0]]], [[[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 5.0, 0.0, 
--10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 5.0, 0.0, 
--10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, 
--14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]], [[0.0, 1.0, 5.0, -6.0, -1.0], [-6.0, 0.0, 1.0, 5.0, 0.0], [-4.0, 1.0, 0.0, 
--2.0, 7.0], [0.0, -3.0, 7.0, 3.0, -4.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 0.0, 
--14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]]], [[[0.0, 5.0, 25.0, -30.0, -5.0], [-30.0, 0.0, 5.0, 25.0, 0.0], [-20.0, 5.0, 
-0.0, -10.0, 35.0], [0.0, -15.0, 35.0, 15.0, -20.0]], [[0.0, 7.0, 35.0, -42.0, -7.0], [-42.0, 0.0, 7.0, 35.0, 0.0], [-28.0, 7.0, 
-0.0, -14.0, 49.0], [0.0, -21.0, 49.0, 21.0, -28.0]], [[0.0, -2.0, -10.0, 12.0, 2.0], [12.0, 0.0, -2.0, -10.0, 0.0], [8.0, -2.0, 
-0.0, 4.0, -14.0], [0.0, 6.0, -14.0, -6.0, 8.0]], [[0.0, -5.0, -25.0, 30.0, 5.0], [30.0, 0.0, -5.0, -25.0, 0.0], [20.0, -5.0, 
-0.0, 10.0, -35.0], [0.0, 15.0, -35.0, -15.0, 20.0]], [[0.0, -1.0, -5.0, 6.0, 1.0], [6.0, 0.0, -1.0, -5.0, 0.0], [4.0, -1.0, 
-0.0, 2.0, -7.0], [0.0, 3.0, -7.0, -3.0, 4.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[1.0, 1.0], [3.0, -1.0], [-4.0, -2.0]]),self.functionspace)
+      arg1=Data(numpy.array([7.0, 0.0, -1.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([11.0, 9.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, -5.0, 2.0], [-2.0, 2.0, -3.0], [1.0, 0.0, -5.0], [-3.0, 4.0, -7.0], [-5.0, 0.0, -3.0]], 
-[[0.0, -6.0, -5.0], [4.0, 3.0, -4.0], [-1.0, 7.0, 0.0], [-2.0, 1.0, 7.0], [-3.0, 4.0, -4.0]], [[-3.0, -5.0, -5.0], [0.0, -1.0, 
--5.0], [-7.0, 7.0, -7.0], [-5.0, -4.0, -6.0], [6.0, 1.0, 3.0]], [[4.0, 7.0, -6.0], [3.0, 3.0, 1.0], [1.0, 3.0, 1.0], [7.0, 4.0, 
-4.0], [0.0, -7.0, -6.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 5.0, -5.0], [-6.0, -6.0, 3.0], [7.0, -7.0, -4.0], [3.0, -1.0, 
--3.0], [-4.0, -1.0, 1.0]], [[3.0, -5.0, 0.0], [-4.0, -6.0, 7.0], [5.0, 3.0, -7.0], [3.0, 6.0, 6.0], [4.0, -7.0, -1.0]], [[-6.0, 
--3.0, -3.0], [-3.0, 2.0, -4.0], [5.0, -3.0, -3.0], [-2.0, 2.0, -3.0], [-7.0, 0.0, 1.0]], [[0.0, 2.0, 2.0], [-4.0, -4.0, 2.0], 
-[-7.0, 5.0, 5.0], [-1.0, 5.0, 0.0], [0.0, -3.0, -6.0]]])
-      arg1=numpy.array([[[-5.0, 3.0, 0.0, -1.0, -7.0], [7.0, -7.0, -5.0, 2.0, 2.0], [-6.0, -5.0, -1.0, -2.0, 7.0], [-4.0, -4.0, 
-7.0, 0.0, -5.0]], [[2.0, 0.0, -2.0, 0.0, -1.0], [2.0, 4.0, 3.0, 2.0, -2.0], [-6.0, -1.0, 3.0, 3.0, 4.0], [2.0, -7.0, 4.0, 1.0, 
--1.0]], [[0.0, -4.0, -5.0, 5.0, -5.0], [-3.0, -2.0, 0.0, 5.0, -1.0], [0.0, 1.0, -5.0, 4.0, 0.0], [-6.0, 5.0, 3.0, 3.0, 6.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-30.0, 4.0, 0.0, 6.0, -33.0], [12.0, -52.0, -35.0, 8.0, 16.0], [6.0, -13.0, -29.0, -15.0, 
-8.0], [-38.0, 29.0, 14.0, 1.0, -3.0]], [[14.0, 6.0, 11.0, -13.0, 27.0], [-1.0, 28.0, 16.0, -15.0, -5.0], [0.0, 5.0, 23.0, -2.0, 
--6.0], [30.0, -21.0, -15.0, -7.0, -10.0]], [[-5.0, 23.0, 25.0, -26.0, 18.0], [22.0, 3.0, -5.0, -23.0, 7.0], [-6.0, -10.0, 24.0, 
--22.0, 7.0], [26.0, -29.0, -8.0, -15.0, -35.0]], [[23.0, 19.0, 27.0, -32.0, 52.0], [8.0, 51.0, 27.0, -33.0, -7.0], [-6.0, 4.0, 
-50.0, -10.0, -5.0], [62.0, -51.0, -26.0, -17.0, -31.0]], [[25.0, -3.0, 15.0, -10.0, 50.0], [-26.0, 41.0, 25.0, -25.0, -7.0], 
-[30.0, 22.0, 20.0, -2.0, -35.0], [38.0, 5.0, -44.0, -9.0, 7.0]]], [[[-12.0, 20.0, 37.0, -25.0, 31.0], [3.0, -14.0, -18.0, 
--37.0, 17.0], [36.0, 1.0, 7.0, -38.0, -24.0], [18.0, 17.0, -39.0, -21.0, -24.0]], [[-14.0, 28.0, 14.0, -24.0, -11.0], [46.0, 
--8.0, -11.0, -6.0, 6.0], [-42.0, -27.0, 25.0, -15.0, 40.0], [14.0, -57.0, 28.0, -9.0, -47.0]], [[19.0, -3.0, -14.0, 1.0, 0.0], 
-[7.0, 35.0, 26.0, 12.0, -16.0], [-36.0, -2.0, 22.0, 23.0, 21.0], [18.0, -45.0, 21.0, 7.0, -2.0]], [[12.0, -34.0, -37.0, 37.0, 
--22.0], [-33.0, 4.0, 13.0, 33.0, -13.0], [6.0, 16.0, -30.0, 35.0, -10.0], [-32.0, 36.0, 11.0, 22.0, 51.0]], [[23.0, 7.0, 12.0, 
--17.0, 37.0], [-1.0, 45.0, 27.0, -18.0, -10.0], [-6.0, 7.0, 35.0, 2.0, -5.0], [44.0, -36.0, -17.0, -8.0, -13.0]]], [[[5.0, 
-11.0, 35.0, -22.0, 51.0], [-16.0, 11.0, 0.0, -41.0, 9.0], [48.0, 15.0, 13.0, -29.0, -41.0], [32.0, 22.0, -56.0, -20.0, -10.0]], 
-[[-2.0, 20.0, 27.0, -25.0, 26.0], [13.0, 6.0, -3.0, -27.0, 7.0], [6.0, -4.0, 22.0, -23.0, -4.0], [28.0, -18.0, -19.0, -16.0, 
--29.0]], [[49.0, 7.0, 21.0, -28.0, 77.0], [-14.0, 91.0, 56.0, -35.0, -21.0], [0.0, 21.0, 63.0, 7.0, -21.0], [84.0, -56.0, 
--42.0, -14.0, -14.0]], [[17.0, 9.0, 38.0, -25.0, 69.0], [-25.0, 31.0, 13.0, -48.0, 4.0], [54.0, 23.0, 23.0, -26.0, -51.0], 
-[48.0, 18.0, -69.0, -22.0, -7.0]], [[-28.0, 6.0, -17.0, 9.0, -58.0], [35.0, -44.0, -27.0, 29.0, 7.0], [-42.0, -28.0, -18.0, 
-3.0, 46.0], [-40.0, -16.0, 55.0, 10.0, -13.0]]], [[[-6.0, 36.0, 16.0, -34.0, -5.0], [60.0, 12.0, 1.0, -8.0, 0.0], [-66.0, 
--33.0, 47.0, -11.0, 56.0], [34.0, -95.0, 38.0, -11.0, -63.0]], [[-9.0, 5.0, -11.0, 2.0, -29.0], [24.0, -11.0, -6.0, 17.0, 
--1.0], [-36.0, -17.0, 1.0, 7.0, 33.0], [-12.0, -28.0, 36.0, 6.0, -12.0]], [[1.0, -1.0, -11.0, 4.0, -15.0], [10.0, 3.0, 4.0, 
-13.0, -5.0], [-24.0, -7.0, 3.0, 11.0, 19.0], [-4.0, -20.0, 22.0, 6.0, -2.0]], [[-27.0, 5.0, -28.0, 13.0, -73.0], [45.0, -41.0, 
--23.0, 42.0, 2.0], [-66.0, -35.0, -15.0, 14.0, 65.0], [-44.0, -36.0, 77.0, 16.0, -15.0]], [[-14.0, 24.0, 44.0, -30.0, 37.0], 
-[4.0, -16.0, -21.0, -44.0, 20.0], [42.0, 1.0, 9.0, -45.0, -28.0], [22.0, 19.0, -46.0, -25.0, 
--29.0]]]])+(1.-msk_ref)*numpy.array([[[[-25.0, 41.0, 15.0, -32.0, -29.0], [74.0, -19.0, -20.0, -1.0, 9.0], [-72.0, -45.0, 33.0, 
--19.0, 69.0], [12.0, -88.0, 54.0, -10.0, -70.0]], [[18.0, -30.0, -3.0, 21.0, 33.0], [-63.0, 12.0, 12.0, -9.0, -3.0], [72.0, 
-39.0, -27.0, 6.0, -66.0], [-6.0, 81.0, -57.0, 3.0, 54.0]], [[-49.0, 37.0, 34.0, -27.0, -22.0], [47.0, -69.0, -56.0, -20.0, 
-32.0], [0.0, -32.0, -8.0, -51.0, 21.0], [-18.0, 1.0, 9.0, -19.0, -52.0]], [[-17.0, 21.0, 17.0, -18.0, -5.0], [28.0, -19.0, 
--18.0, -11.0, 11.0], [-12.0, -17.0, 9.0, -21.0, 17.0], [4.0, -20.0, 8.0, -10.0, -32.0]], [[18.0, -16.0, -3.0, 9.0, 24.0], 
-[-33.0, 22.0, 17.0, -5.0, -7.0], [30.0, 22.0, -4.0, 9.0, -32.0], [8.0, 28.0, -29.0, 2.0, 27.0]]], [[[-25.0, 9.0, 10.0, -3.0, 
--16.0], [11.0, -41.0, -30.0, -4.0, 16.0], [12.0, -10.0, -18.0, -21.0, 1.0], [-22.0, 23.0, 1.0, -5.0, -10.0]], [[8.0, -40.0, 
--23.0, 39.0, -1.0], [-61.0, -10.0, 2.0, 15.0, -3.0], [60.0, 33.0, -49.0, 18.0, -52.0], [-38.0, 93.0, -31.0, 15.0, 68.0]], 
-[[-19.0, 43.0, 29.0, -40.0, -3.0], [62.0, -9.0, -16.0, -19.0, 11.0], [-48.0, -35.0, 39.0, -29.0, 47.0], [28.0, -76.0, 26.0, 
--18.0, -70.0]], [[-3.0, -15.0, -42.0, 27.0, -57.0], [15.0, -9.0, 3.0, 48.0, -12.0], [-54.0, -15.0, -15.0, 36.0, 45.0], [-36.0, 
--24.0, 63.0, 24.0, 15.0]], [[-34.0, 16.0, 19.0, -9.0, -16.0], [17.0, -54.0, -41.0, -11.0, 23.0], [18.0, -14.0, -20.0, -33.0, 
-0.0], [-24.0, 28.0, -3.0, -10.0, -19.0]]], [[[24.0, -6.0, 21.0, -9.0, 60.0], [-39.0, 36.0, 21.0, -33.0, -3.0], [54.0, 30.0, 
-12.0, -9.0, -54.0], [36.0, 30.0, -63.0, -12.0, 15.0]], [[19.0, 7.0, 16.0, -17.0, 39.0], [-5.0, 37.0, 21.0, -22.0, -6.0], [6.0, 
-9.0, 29.0, -4.0, -13.0], [40.0, -22.0, -25.0, -10.0, -11.0]], [[-31.0, 27.0, 21.0, -20.0, -17.0], [38.0, -41.0, -34.0, -11.0, 
-19.0], [-12.0, -25.0, 1.0, -31.0, 23.0], [-8.0, -14.0, 14.0, -12.0, -40.0]], [[14.0, 6.0, 11.0, -13.0, 27.0], [-1.0, 28.0, 
-16.0, -15.0, -5.0], [0.0, 5.0, 23.0, -2.0, -6.0], [30.0, -21.0, -15.0, -7.0, -10.0]], [[35.0, -25.0, -5.0, 12.0, 44.0], [-52.0, 
-47.0, 35.0, -9.0, -15.0], [42.0, 36.0, 2.0, 18.0, -49.0], [22.0, 33.0, -46.0, 3.0, 41.0]]], [[[4.0, -8.0, -14.0, 10.0, -12.0], 
-[-2.0, 4.0, 6.0, 14.0, -6.0], [-12.0, 0.0, -4.0, 14.0, 8.0], [-8.0, -4.0, 14.0, 8.0, 10.0]], [[12.0, -20.0, -2.0, 14.0, 22.0], 
-[-42.0, 8.0, 8.0, -6.0, -2.0], [48.0, 26.0, -18.0, 4.0, -44.0], [-4.0, 54.0, -38.0, 2.0, 36.0]], [[45.0, -41.0, -35.0, 32.0, 
-19.0], [-54.0, 59.0, 50.0, 21.0, -29.0], [12.0, 35.0, -3.0, 49.0, -29.0], [8.0, 18.0, -14.0, 20.0, 60.0]], [[15.0, -3.0, -10.0, 
-1.0, 2.0], [3.0, 27.0, 20.0, 8.0, -12.0], [-24.0, 0.0, 16.0, 17.0, 13.0], [14.0, -31.0, 13.0, 5.0, 0.0]], [[-6.0, 24.0, 36.0, 
--30.0, 33.0], [12.0, 0.0, -9.0, -36.0, 12.0], [18.0, -3.0, 21.0, -33.0, -12.0], [30.0, -9.0, -30.0, -21.0, -33.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[1.0, 7.0], [3.0, 0.0], [7.0, -5.0]], [[1.0, -1.0], [-2.0, -1.0], [-6.0, 
+7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 0.0, 6.0], [0.0, -5.0, -5.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([81.0, -67.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[1.0, -7.0, 6.0], [-3.0, -3.0, -2.0]], [[-3.0, -5.0, 0.0], [1.0, 5.0, 4.0]], [[-6.0, 7.0, 
--7.0], [0.0, 4.0, -7.0]], [[1.0, 0.0, 0.0], [6.0, 3.0, 5.0]], [[6.0, 0.0, -4.0], [6.0, -1.0, -6.0]]], [[[-5.0, 6.0, -5.0], 
-[1.0, -6.0, 2.0]], [[-5.0, -2.0, -6.0], [-2.0, 2.0, -1.0]], [[-7.0, -4.0, -1.0], [4.0, -1.0, 3.0]], [[6.0, -2.0, 0.0], [5.0, 
-0.0, 3.0]], [[-1.0, 7.0, 0.0], [0.0, 0.0, 4.0]]], [[[-4.0, 4.0, -6.0], [-6.0, -7.0, 0.0]], [[1.0, 3.0, 1.0], [4.0, -6.0, 
--3.0]], [[3.0, 0.0, 7.0], [0.0, 2.0, -3.0]], [[-2.0, 1.0, 6.0], [-6.0, 3.0, 0.0]], [[-3.0, 4.0, 4.0], [0.0, 3.0, 7.0]]], 
-[[[0.0, 2.0, -7.0], [-2.0, 6.0, 5.0]], [[6.0, 3.0, -6.0], [2.0, -7.0, 6.0]], [[6.0, 4.0, -7.0], [-7.0, -1.0, -2.0]], [[-2.0, 
-7.0, 6.0], [-2.0, 1.0, 0.0]], [[7.0, 7.0, 2.0], [-1.0, 1.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, 6.0, 0.0], [-5.0, 0.0, 
-5.0]], [[-5.0, -4.0, 3.0], [1.0, -4.0, -5.0]], [[4.0, 2.0, 3.0], [2.0, 3.0, 6.0]], [[5.0, -6.0, -7.0], [0.0, -4.0, 0.0]], 
-[[-5.0, 0.0, 4.0], [7.0, 5.0, 4.0]]], [[[-2.0, -2.0, 3.0], [3.0, -5.0, -2.0]], [[-1.0, 5.0, 0.0], [1.0, 0.0, 4.0]], [[1.0, 7.0, 
-1.0], [0.0, 2.0, 4.0]], [[0.0, -4.0, -6.0], [2.0, -6.0, 4.0]], [[-2.0, -3.0, 6.0], [-4.0, -4.0, 0.0]]], [[[-2.0, -6.0, -4.0], 
-[2.0, -6.0, -4.0]], [[-6.0, -3.0, -3.0], [0.0, 0.0, -7.0]], [[-5.0, -3.0, 4.0], [-1.0, 4.0, -1.0]], [[-5.0, -5.0, 0.0], [1.0, 
--1.0, -1.0]], [[0.0, -3.0, -6.0], [5.0, -4.0, -5.0]]], [[[7.0, 5.0, 0.0], [1.0, -4.0, 6.0]], [[0.0, -5.0, -4.0], [4.0, -6.0, 
--5.0]], [[-7.0, 1.0, 0.0], [7.0, 2.0, 6.0]], [[4.0, 0.0, 6.0], [-3.0, 3.0, 6.0]], [[0.0, 1.0, -2.0], [2.0, 4.0, 5.0]]]])
-      arg1=numpy.array([[[[4.0, -6.0, -7.0, 2.0, 4.0], [6.0, 7.0, 0.0, 1.0, 0.0], [-3.0, -6.0, -5.0, 0.0, -6.0], [4.0, -1.0, 
-3.0, 6.0, -2.0]], [[4.0, 2.0, -3.0, 5.0, 7.0], [0.0, -2.0, -6.0, 4.0, 5.0], [5.0, -1.0, -4.0, 5.0, -6.0], [4.0, -3.0, -7.0, 
-3.0, -7.0]], [[3.0, -3.0, -1.0, 0.0, -7.0], [-1.0, -1.0, 1.0, 5.0, 2.0], [-2.0, -7.0, 7.0, 2.0, 2.0], [7.0, -7.0, 5.0, -5.0, 
-7.0]]], [[[2.0, 5.0, 7.0, -4.0, 1.0], [7.0, -7.0, -6.0, 6.0, -1.0], [4.0, 2.0, -3.0, 5.0, -3.0], [2.0, 2.0, 7.0, -5.0, -1.0]], 
-[[-1.0, 2.0, 3.0, -1.0, -6.0], [0.0, 7.0, -3.0, 5.0, 0.0], [5.0, 7.0, 0.0, -6.0, 2.0], [-7.0, 4.0, -1.0, 6.0, -2.0]], [[-2.0, 
-7.0, 6.0, 4.0, -5.0], [6.0, 6.0, -6.0, -5.0, -6.0], [-5.0, 6.0, -4.0, -7.0, -2.0], [0.0, -1.0, 0.0, 1.0, 4.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-5.0, -73.0, -34.0, -26.0, -62.0], [-33.0, 3.0, 87.0, -20.0, -8.0], [-67.0, -80.0, 82.0, 
--6.0, 55.0], [33.0, -38.0, 64.0, -50.0, 90.0]], [[-43.0, 51.0, 82.0, -24.0, -96.0], [13.0, 41.0, -15.0, -12.0, -50.0], [-7.0, 
-84.0, 16.0, -78.0, 47.0], [-65.0, 36.0, 28.0, -4.0, 46.0]], [[-7.0, 30.0, -2.0, -9.0, 85.0], [-71.0, -63.0, -19.0, 42.0, 63.0], 
-[122.0, 64.0, -19.0, 46.0, 2.0], [-73.0, 57.0, -106.0, 37.0, -122.0]], [[3.0, 65.0, 74.0, -5.0, -33.0], [78.0, 16.0, -75.0, 
-27.0, -36.0], [11.0, 57.0, -43.0, -23.0, -28.0], [-5.0, 18.0, 42.0, -1.0, 6.0]], [[37.0, -38.0, -35.0, -35.0, 94.0], [46.0, 
--39.0, -1.0, 47.0, 22.0], [39.0, -39.0, -52.0, 70.0, -52.0], [15.0, 36.0, 41.0, 14.0, -68.0]]], [[[-7.0, 64.0, 23.0, 30.0, 
-84.0], [-6.0, -79.0, -41.0, -40.0, 7.0], [19.0, 31.0, -45.0, 47.0, -35.0], [13.0, -2.0, -69.0, -26.0, -48.0]], [[-50.0, 31.0, 
-33.0, -18.0, -1.0], [-44.0, -3.0, 18.0, -40.0, -14.0], [24.0, 78.0, 1.0, -37.0, 42.0], [-88.0, 58.0, -47.0, 15.0, -24.0]], 
-[[-44.0, 76.0, 105.0, -37.0, -54.0], [5.0, -57.0, -16.0, -24.0, -44.0], [-1.0, 72.0, 20.0, -17.0, 44.0], [-36.0, 27.0, 31.0, 
--72.0, 45.0]], [[20.0, 6.0, 17.0, -6.0, 0.0], [89.0, 29.0, -36.0, 13.0, -33.0], [-23.0, -6.0, -49.0, -6.0, -45.0], [26.0, 7.0, 
-67.0, 8.0, 9.0]], [[16.0, 48.0, 10.0, 49.0, 25.0], [18.0, 3.0, -66.0, 7.0, 11.0], [18.0, 23.0, -39.0, 7.0, -44.0], [24.0, 
--24.0, -52.0, 19.0, -31.0]]], [[[-23.0, 6.0, -41.0, 43.0, 90.0], [-60.0, -37.0, 27.0, -89.0, 14.0], [-15.0, 1.0, -20.0, 20.0, 
--8.0], [-5.0, -6.0, -105.0, 6.0, -42.0]], [[39.0, -16.0, -25.0, -5.0, 73.0], [15.0, -88.0, -5.0, 27.0, 31.0], [11.0, -68.0, 
--10.0, 94.0, -40.0], [73.0, -30.0, 21.0, -49.0, -20.0]], [[37.0, -56.0, -40.0, -8.0, -34.0], [-7.0, 10.0, 19.0, 63.0, 32.0], 
-[2.0, -71.0, 46.0, 23.0, 6.0], [47.0, -41.0, 42.0, -8.0, 27.0]], [[-1.0, -28.0, -28.0, 22.0, -67.0], [-60.0, 41.0, 27.0, 11.0, 
-23.0], [-10.0, -22.0, 66.0, -31.0, 42.0], [5.0, -43.0, -28.0, 9.0, 39.0]], [[-1.0, 69.0, 56.0, 39.0, -65.0], [20.0, 30.0, 
--71.0, 13.0, -14.0], [1.0, 49.0, -1.0, -39.0, -6.0], [11.0, -32.0, -20.0, -1.0, 28.0]]], [[[-33.0, 62.0, 35.0, 32.0, 0.0], 
-[23.0, 89.0, -55.0, -34.0, -32.0], [21.0, 115.0, -71.0, -85.0, -18.0], [-87.0, 58.0, -69.0, 92.0, -53.0]], [[17.0, 26.0, -16.0, 
-50.0, 101.0], [92.0, 15.0, -51.0, -65.0, -35.0], [-48.0, -6.0, -114.0, 13.0, -98.0], [47.0, -3.0, -12.0, 29.0, -39.0]], [[10.0, 
--58.0, -111.0, 53.0, 110.0], [-18.0, 71.0, 26.0, -50.0, 25.0], [-7.0, -24.0, -66.0, -9.0, -51.0], [-16.0, 15.0, -93.0, 110.0, 
--88.0]], [[33.0, 0.0, -24.0, 38.0, -9.0], [-32.0, -13.0, -27.0, 49.0, 49.0], [26.0, -34.0, 30.0, 31.0, -10.0], [51.0, -61.0, 
--40.0, -5.0, -3.0]], [[67.0, -65.0, -100.0, 36.0, 76.0], [9.0, 23.0, -13.0, 64.0, 64.0], [31.0, -82.0, -30.0, 56.0, -67.0], 
-[61.0, -36.0, -26.0, 60.0, -66.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, -14.0, -65.0, 82.0, 36.0], [31.0, 95.0, -36.0, -25.0, 
-5.0], [-33.0, -22.0, -59.0, -30.0, -67.0], [38.0, -39.0, -59.0, 84.0, -29.0]], [[-11.0, -25.0, 9.0, -50.0, -19.0], [-56.0, 
--95.0, 63.0, 5.0, 15.0], [-2.0, -43.0, 79.0, 50.0, 59.0], [15.0, -13.0, 39.0, -91.0, 46.0]], [[22.0, 29.0, 22.0, 31.0, -37.0], 
-[71.0, 64.0, -66.0, 24.0, -22.0], [-15.0, 14.0, -37.0, -34.0, -42.0], [28.0, -21.0, 24.0, 29.0, 15.0]], [[-21.0, -29.0, -22.0, 
--16.0, 51.0], [37.0, 26.0, 41.0, -74.0, -44.0], [-51.0, -3.0, -50.0, -20.0, -16.0], [-25.0, 46.0, 26.0, 23.0, -9.0]], [[-7.0, 
-91.0, 119.0, -27.0, -91.0], [39.0, -29.0, -77.0, 62.0, -23.0], [40.0, 75.0, 16.0, -15.0, 19.0], [-13.0, 7.0, 49.0, -51.0, 
-37.0]]], [[[8.0, -10.0, 11.0, -29.0, 0.0], [-6.0, -81.0, 24.0, 8.0, 5.0], [-13.0, -48.0, 38.0, 55.0, 15.0], [46.0, -25.0, 49.0, 
--80.0, 38.0]], [[10.0, 49.0, 23.0, 35.0, 12.0], [25.0, 0.0, -60.0, 5.0, 0.0], [12.0, 27.0, -34.0, 2.0, -35.0], [18.0, -16.0, 
--31.0, 8.0, -18.0]], [[25.0, 37.0, 1.0, 51.0, 14.0], [29.0, 30.0, -71.0, 24.0, 13.0], [20.0, 18.0, -42.0, -3.0, -50.0], [25.0, 
--25.0, -43.0, 38.0, -32.0]], [[-32.0, 36.0, 38.0, -6.0, 32.0], [44.0, -18.0, 0.0, -84.0, -58.0], [-50.0, 32.0, -48.0, -14.0, 
--14.0], [-12.0, 30.0, 18.0, -24.0, 12.0]], [[-6.0, -40.0, -23.0, 1.0, -51.0], [-46.0, -14.0, 60.0, -28.0, 1.0], [-57.0, -63.0, 
-76.0, 1.0, 46.0], [42.0, -55.0, 21.0, -55.0, 79.0]]], [[[-26.0, -18.0, 8.0, -52.0, 36.0], [-18.0, -78.0, 62.0, -44.0, -16.0], 
-[-18.0, -16.0, 16.0, 36.0, 30.0], [-14.0, 32.0, 36.0, -60.0, 12.0]], [[-31.0, -10.0, 12.0, -55.0, 11.0], [-75.0, -75.0, 57.0, 
-2.0, 21.0], [44.0, 18.0, 49.0, 28.0, 62.0], [-57.0, 43.0, -12.0, -37.0, -16.0]], [[-24.0, 8.0, 39.0, -29.0, -89.0], [-47.0, 
--4.0, 22.0, 22.0, 0.0], [13.0, 25.0, 72.0, -29.0, 69.0], [-34.0, 1.0, 15.0, -31.0, 48.0]], [[-35.0, 16.0, 48.0, -42.0, -43.0], 
-[-29.0, -45.0, 33.0, -19.0, -20.0], [-6.0, 24.0, 46.0, -7.0, 57.0], [-31.0, 19.0, 28.0, -57.0, 42.0]], [[-6.0, -6.0, 8.0, 
--51.0, 75.0], [11.0, -81.0, 24.0, -7.0, -2.0], [22.0, -3.0, -25.0, 57.0, -7.0], [-16.0, 50.0, 30.0, -33.0, -38.0]]], [[[42.0, 
-7.0, -33.0, 63.0, 58.0], [85.0, 40.0, -60.0, -17.0, -12.0], [-42.0, -37.0, -82.0, 12.0, -95.0], [78.0, -42.0, -3.0, 34.0, 
--18.0]], [[-8.0, -25.0, -1.0, -55.0, 58.0], [2.0, -86.0, 50.0, -21.0, -7.0], [-6.0, -31.0, 0.0, 58.0, 8.0], [2.0, 32.0, 49.0, 
--56.0, -5.0]], [[-24.0, 125.0, 137.0, -15.0, -56.0], [43.0, -50.0, -90.0, 19.0, -38.0], [34.0, 105.0, -14.0, -14.0, 7.0], 
-[-24.0, 20.0, 19.0, -56.0, 20.0]], [[13.0, -9.0, -10.0, 41.0, -77.0], [33.0, 100.0, -21.0, 1.0, -21.0], [-51.0, -15.0, 7.0, 
--63.0, -9.0], [31.0, -46.0, 18.0, 33.0, 55.0]], [[-12.0, 61.0, 55.0, 13.0, -26.0], [46.0, 44.0, -62.0, 1.0, -31.0], [12.0, 
-75.0, -44.0, -48.0, -18.0], [-34.0, 26.0, -7.0, 32.0, -11.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[7.0, 1.0], [-5.0, -7.0], [3.0, -2.0]], [[7.0, 0.0], [-3.0, 0.0], [5.0, -1.0]], [[6.0, 0.0], 
+[0.0, 5.0], [1.0, 7.0]], [[5.0, 1.0], [7.0, 2.0], [-1.0, 7.0]]], [[[-1.0, 2.0], [5.0, -2.0], [4.0, -1.0]], [[4.0, -3.0], [-1.0, 
+7.0], [-5.0, -7.0]], [[-1.0, 0.0], [-4.0, 6.0], [-2.0, 5.0]], [[1.0, -1.0], [-4.0, -1.0], [-6.0, 7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[1.0, 6.0, -3.0], [4.0, 0.0, -2.0], [5.0, 7.0, 0.0], [1.0, -3.0, -3.0]], [[4.0, 4.0, -1.0], [0.0, 
+-1.0, -2.0], [-7.0, -1.0, -5.0], [-7.0, 0.0, -7.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([82.0, -89.0]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 7.0, 6.0, 0.0, -1.0], [-7.0, -6.0, -5.0, 7.0, -3.0], [3.0, 7.0, 1.0, 0.0, 0.0], [4.0, 
-2.0, -3.0, 4.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -1.0, 1.0, 4.0, 1.0], [0.0, 2.0, 0.0, 3.0, 1.0], [5.0, 2.0, 1.0, 4.0, 
--5.0], [0.0, -6.0, 2.0, 7.0, 3.0]])
-      arg1=Data(-7.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-0.0, -49.0, -42.0, -0.0, 7.0], [49.0, 42.0, 35.0, -49.0, 21.0], [-21.0, -49.0, -7.0, -0.0, 
--0.0], [-28.0, -14.0, 21.0, -28.0, 14.0]])+(1.-msk_ref)*numpy.array([[35.0, 7.0, -7.0, -28.0, -7.0], [-0.0, -14.0, -0.0, -21.0, 
--7.0], [-35.0, -14.0, -7.0, -28.0, 35.0], [-0.0, 42.0, -14.0, -49.0, -21.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([0.0, 5.0]),self.functionspace)
+      arg1=Data(numpy.array([-3.0, 6.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 0.0], [-15.0, 30.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=0)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[5.0, 3.0, 3.0], [-4.0, -1.0, 6.0], [5.0, 1.0, 2.0], [-2.0, -5.0, -2.0], [0.0, 2.0, 5.0]], 
-[[-3.0, -1.0, -4.0], [5.0, 2.0, 2.0], [0.0, 4.0, -7.0], [-2.0, 5.0, -2.0], [1.0, 4.0, 1.0]], [[0.0, -5.0, -1.0], [-7.0, 1.0, 
-3.0], [-3.0, 6.0, 6.0], [0.0, -1.0, -2.0], [1.0, 0.0, -5.0]], [[2.0, -7.0, 2.0], [-7.0, 0.0, -6.0], [-6.0, -7.0, -5.0], [-3.0, 
--4.0, -3.0], [1.0, 0.0, -6.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -5.0, 5.0], [0.0, -6.0, 2.0], [7.0, 4.0, -3.0], [2.0, 4.0, 
-7.0], [4.0, 5.0, 1.0]], [[-7.0, 6.0, 0.0], [0.0, -5.0, 1.0], [-3.0, 6.0, 0.0], [0.0, -5.0, 7.0], [-5.0, 1.0, 0.0]], [[7.0, 
--1.0, -4.0], [4.0, 3.0, 1.0], [-2.0, 0.0, 7.0], [-5.0, 6.0, 6.0], [7.0, 4.0, 4.0]], [[7.0, 7.0, 7.0], [3.0, -5.0, 0.0], [0.0, 
--2.0, 5.0], [0.0, -3.0, 0.0], [3.0, 2.0, -1.0]]])
-      arg1=Data(numpy.array([-1.0, -6.0, 4.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-11.0, 34.0, -3.0, 24.0, 8.0], [-7.0, -9.0, -52.0, -36.0, -21.0], [26.0, 13.0, -9.0, -2.0, 
--21.0], [48.0, -17.0, 28.0, 15.0, -25.0]])+(1.-msk_ref)*numpy.array([[54.0, 44.0, -43.0, 2.0, -30.0], [-29.0, 34.0, -33.0, 
-58.0, -1.0], [-17.0, -18.0, 30.0, -7.0, -15.0], [-21.0, 27.0, 32.0, 18.0, -19.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[7.0, 4.0], [6.0, -1.0], [-5.0, -4.0]]),self.functionspace)
+      arg1=Data(numpy.array([[3.0, -7.0], [-7.0, 1.0], [6.0, -1.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-51.0, -38.0], [-5.0, -25.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, 0.0, -6.0], [7.0, 2.0, -3.0]], [[0.0, -3.0, -1.0], [7.0, 7.0, -3.0]], [[7.0, -3.0, 
--2.0], [6.0, 3.0, -3.0]], [[3.0, -6.0, 2.0], [-2.0, -3.0, -1.0]], [[-4.0, 0.0, -1.0], [-2.0, -7.0, 1.0]]], [[[4.0, -5.0, 2.0], 
-[-4.0, 3.0, 4.0]], [[4.0, -7.0, 3.0], [0.0, 6.0, -3.0]], [[4.0, 3.0, -5.0], [6.0, -1.0, 6.0]], [[-1.0, -5.0, 3.0], [-1.0, -2.0, 
--2.0]], [[-1.0, 7.0, -5.0], [1.0, -5.0, 6.0]]], [[[-7.0, -5.0, 1.0], [0.0, 0.0, 0.0]], [[7.0, 4.0, 0.0], [2.0, 0.0, 4.0]], 
-[[7.0, -3.0, -4.0], [-7.0, -5.0, -4.0]], [[-7.0, 6.0, 6.0], [-5.0, -1.0, 3.0]], [[-5.0, 5.0, -7.0], [5.0, 4.0, -5.0]]], [[[1.0, 
--5.0, -5.0], [4.0, 2.0, -6.0]], [[0.0, 1.0, -7.0], [-5.0, 7.0, -7.0]], [[2.0, 0.0, 1.0], [-3.0, -5.0, 0.0]], [[7.0, 2.0, 2.0], 
-[3.0, 3.0, 6.0]], [[7.0, 6.0, 4.0], [4.0, -7.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -7.0, -4.0], [-3.0, 2.0, 3.0]], 
-[[-7.0, -6.0, 0.0], [-3.0, -6.0, 1.0]], [[2.0, -7.0, 6.0], [-3.0, -5.0, 0.0]], [[-2.0, 6.0, -3.0], [-7.0, 2.0, -6.0]], [[5.0, 
--6.0, 6.0], [4.0, 1.0, -1.0]]], [[[-6.0, -6.0, 2.0], [-2.0, 7.0, 4.0]], [[-1.0, 3.0, 2.0], [-1.0, 4.0, -5.0]], [[2.0, -1.0, 
--1.0], [-4.0, -4.0, 4.0]], [[5.0, 0.0, -5.0], [-2.0, -5.0, -1.0]], [[5.0, -1.0, 5.0], [-3.0, -6.0, 3.0]]], [[[-3.0, 0.0, 1.0], 
-[-6.0, -4.0, 1.0]], [[6.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[-4.0, 7.0, 6.0], [-7.0, -4.0, -2.0]], [[0.0, 4.0, -4.0], [-6.0, -6.0, 
-4.0]], [[4.0, -1.0, 5.0], [6.0, 7.0, 0.0]]], [[[-4.0, 0.0, -2.0], [0.0, -1.0, 3.0]], [[7.0, -3.0, -4.0], [4.0, 7.0, -5.0]], 
-[[3.0, 7.0, 2.0], [-5.0, 4.0, 2.0]], [[5.0, 0.0, 3.0], [-2.0, 3.0, -1.0]], [[-2.0, -2.0, -2.0], [6.0, 2.0, -3.0]]]])
-      arg1=Data(numpy.array([[2.0, -5.0, 0.0], [-3.0, -3.0, 7.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-62.0, -48.0, -19.0, 44.0, 26.0], [64.0, 4.0, 20.0, 18.0, 17.0], [11.0, 16.0, 37.0, -5.0, 
--97.0], [-33.0, -60.0, 28.0, 28.0, 14.0]])+(1.-msk_ref)*numpy.array([[63.0, 50.0, 63.0, -61.0, 18.0], [31.0, -61.0, 61.0, 24.0, 
-63.0], [31.0, 12.0, -24.0, 44.0, -26.0], [16.0, -39.0, -12.0, 0.0, -39.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[5.0, 4.0], [-4.0, 7.0], [-4.0, -7.0]], [[0.0, 6.0], [3.0, -3.0], [-5.0, 
+0.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 7.0], [2.0, 5.0], [7.0, -7.0]], [[-4.0, -4.0], [6.0, -6.0], [-2.0, 
+-2.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-18.0, 35.0], [-85.0, 106.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[6.0, 0.0, 3.0, 0.0, 6.0], [-6.0, -7.0, -5.0, -4.0, -7.0], [3.0, 7.0, 4.0, 1.0, -1.0], [-3.0, 
-2.0, 5.0, 3.0, 6.0]])+(1.-msk_arg0)*numpy.array([[-7.0, -2.0, -1.0, 6.0, 6.0], [2.0, 3.0, 7.0, 7.0, -4.0], [7.0, 0.0, 1.0, 2.0, 
--5.0], [-7.0, -5.0, 5.0, 6.0, -4.0]])
-      arg1=Data(numpy.array([5.0, 0.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[30.0, 0.0], [0.0, 0.0], [15.0, 0.0], [0.0, 0.0], [30.0, 0.0]], [[-30.0, 0.0], [-35.0, 0.0], 
-[-25.0, 0.0], [-20.0, 0.0], [-35.0, 0.0]], [[15.0, 0.0], [35.0, 0.0], [20.0, 0.0], [5.0, 0.0], [-5.0, 0.0]], [[-15.0, 0.0], 
-[10.0, 0.0], [25.0, 0.0], [15.0, 0.0], [30.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, 0.0], [-10.0, 0.0], [-5.0, 0.0], 
-[30.0, 0.0], [30.0, 0.0]], [[10.0, 0.0], [15.0, 0.0], [35.0, 0.0], [35.0, 0.0], [-20.0, 0.0]], [[35.0, 0.0], [0.0, 0.0], [5.0, 
-0.0], [10.0, 0.0], [-25.0, 0.0]], [[-35.0, 0.0], [-25.0, 0.0], [25.0, 0.0], [30.0, 0.0], [-20.0, 0.0]]])
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[7.0, 1.0], [-4.0, 2.0], [-5.0, 0.0]], [[-4.0, -7.0], [5.0, 4.0], [2.0, -2.0]], [[7.0, 7.0], 
+[5.0, 0.0], [-1.0, 5.0]], [[-5.0, 7.0], [3.0, 0.0], [4.0, 0.0]]], [[[3.0, -2.0], [7.0, 0.0], [-3.0, 4.0]], [[4.0, -5.0], [-6.0, 
+-5.0], [-6.0, 6.0]], [[5.0, 5.0], [-1.0, -7.0], [-6.0, 3.0]], [[-4.0, 0.0], [-3.0, 3.0], [3.0, 7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[3.0, 1.0], [5.0, 7.0], [-5.0, 3.0]], [[6.0, 5.0], [7.0, 2.0], [-5.0, 5.0]], [[-5.0, 0.0], 
+[-4.0, -7.0], [-1.0, 2.0]], [[-7.0, 2.0], [-3.0, -6.0], [1.0, 5.0]]], [[[4.0, -3.0], [-7.0, -6.0], [5.0, -2.0]], [[7.0, -5.0], 
+[2.0, 4.0], [6.0, 0.0]], [[-3.0, 5.0], [-7.0, 3.0], [-2.0, 0.0]], [[0.0, 7.0], [-5.0, 6.0], [1.0, -2.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-47.0, -200.0], [-57.0, 13.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, 3.0, -5.0], [-4.0, 5.0, 0.0], [-3.0, 1.0, 0.0], [-3.0, -5.0, 5.0], [6.0, -6.0, 4.0]], 
-[[-4.0, 5.0, 6.0], [-2.0, 0.0, 0.0], [-2.0, -1.0, -2.0], [-2.0, -5.0, -3.0], [4.0, 4.0, 4.0]], [[-7.0, 1.0, -6.0], [5.0, -4.0, 
-2.0], [-2.0, 2.0, 4.0], [-2.0, -7.0, 6.0], [2.0, -4.0, -7.0]], [[3.0, 0.0, -4.0], [-6.0, -3.0, 5.0], [-3.0, -1.0, -4.0], [-1.0, 
-2.0, 5.0], [0.0, 0.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, 7.0, 3.0], [0.0, -5.0, 0.0], [0.0, -7.0, 7.0], [5.0, 4.0, 
-3.0], [3.0, 7.0, 4.0]], [[-2.0, -6.0, 7.0], [-4.0, -5.0, 2.0], [4.0, -1.0, 1.0], [3.0, 6.0, 2.0], [-6.0, -7.0, -3.0]], [[6.0, 
--7.0, 2.0], [0.0, 3.0, 2.0], [6.0, -7.0, 7.0], [1.0, 3.0, 1.0], [-1.0, 0.0, -6.0]], [[-3.0, -2.0, 1.0], [-6.0, -1.0, -6.0], 
-[-3.0, 1.0, -1.0], [-1.0, -4.0, 6.0], [7.0, -2.0, -6.0]]])
-      arg1=Data(numpy.array([[3.0, 6.0], [7.0, 7.0], [7.0, 7.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-2.0, 10.0], [23.0, 11.0], [-2.0, -11.0], [-9.0, -18.0], [4.0, 22.0]], [[65.0, 53.0], [-6.0, 
--12.0], [-27.0, -33.0], [-62.0, -68.0], [68.0, 80.0]], [[-56.0, -77.0], [1.0, 16.0], [36.0, 30.0], [-13.0, -19.0], [-71.0, 
--65.0]], [[-19.0, -10.0], [-4.0, -22.0], [-44.0, -53.0], [46.0, 43.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[55.0, 40.0], 
-[-35.0, -35.0], [0.0, 0.0], [64.0, 79.0], [86.0, 95.0]], [[1.0, -5.0], [-33.0, -45.0], [12.0, 24.0], [65.0, 74.0], [-88.0, 
--106.0]], [[-17.0, 1.0], [35.0, 35.0], [18.0, 36.0], [31.0, 34.0], [-45.0, -48.0]], [[-16.0, -25.0], [-67.0, -85.0], [-9.0, 
--18.0], [11.0, 8.0], [-35.0, -14.0]]])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([0.0, -3.0]),self.functionspace)
+      arg1=Data(numpy.array([[3.0, -2.0, 2.0, -7.0, 1.0], [-7.0, 2.0, 2.0, -4.0, -4.0], [3.0, -7.0, -3.0, 1.0, 0.0], [-3.0, 
+6.0, 3.0, 2.0, 6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[-9.0, 6.0, -6.0, 21.0, -3.0], [21.0, -6.0, -6.0, 12.0, 12.0], [-9.0, 21.0, 9.0, -3.0, 0.0], [9.0, -18.0, -9.0, 
+-6.0, -18.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[1.0, -3.0, 7.0], [-3.0, 0.0, 6.0]], [[-1.0, 7.0, -3.0], [-7.0, -7.0, 2.0]], [[2.0, -6.0, 
-1.0], [-6.0, -2.0, 6.0]], [[0.0, 7.0, 4.0], [3.0, 7.0, 7.0]], [[-4.0, 4.0, -5.0], [-4.0, -3.0, -5.0]]], [[[-3.0, 0.0, -5.0], 
-[6.0, 4.0, 1.0]], [[7.0, 1.0, -4.0], [0.0, 1.0, 0.0]], [[-7.0, 4.0, 4.0], [5.0, -3.0, 5.0]], [[6.0, -4.0, -4.0], [7.0, 0.0, 
--5.0]], [[0.0, 4.0, 1.0], [7.0, 3.0, 6.0]]], [[[7.0, 1.0, 0.0], [-6.0, -5.0, -7.0]], [[-7.0, -4.0, -2.0], [5.0, 5.0, 1.0]], 
-[[0.0, -7.0, 7.0], [-5.0, -7.0, 4.0]], [[0.0, 0.0, 6.0], [-2.0, 3.0, 1.0]], [[7.0, 7.0, 0.0], [-7.0, -2.0, 0.0]]], [[[-1.0, 
-0.0, -4.0], [0.0, -7.0, 5.0]], [[6.0, -2.0, -4.0], [-1.0, -7.0, -1.0]], [[1.0, 7.0, -6.0], [2.0, -4.0, -1.0]], [[0.0, 2.0, 
--2.0], [3.0, 3.0, 4.0]], [[-2.0, -2.0, 7.0], [-5.0, -7.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 1.0, 0.0], [6.0, -5.0, 
-0.0]], [[1.0, -6.0, 5.0], [-7.0, 1.0, -7.0]], [[3.0, 5.0, -1.0], [-7.0, 3.0, 4.0]], [[4.0, -5.0, 3.0], [-6.0, -7.0, -2.0]], 
-[[1.0, -4.0, 5.0], [4.0, -2.0, 3.0]]], [[[3.0, -3.0, -4.0], [2.0, -4.0, -1.0]], [[5.0, 2.0, 4.0], [2.0, 5.0, 0.0]], [[-3.0, 
-1.0, 3.0], [-6.0, -4.0, 5.0]], [[-4.0, 0.0, 1.0], [-1.0, 4.0, -5.0]], [[-1.0, -3.0, -2.0], [0.0, 4.0, 7.0]]], [[[-5.0, -2.0, 
-6.0], [-6.0, -5.0, -7.0]], [[4.0, -1.0, -1.0], [-2.0, -6.0, -3.0]], [[-6.0, -4.0, 7.0], [0.0, -7.0, -5.0]], [[2.0, -2.0, 0.0], 
-[1.0, -1.0, 5.0]], [[7.0, -7.0, -4.0], [-6.0, 5.0, 3.0]]], [[[-7.0, 0.0, 1.0], [-5.0, -6.0, 4.0]], [[-4.0, -1.0, -2.0], [6.0, 
--3.0, 2.0]], [[0.0, 5.0, -5.0], [-2.0, 3.0, 5.0]], [[-2.0, 6.0, -5.0], [-6.0, -4.0, 0.0]], [[4.0, -7.0, 1.0], [-6.0, 4.0, 
-0.0]]]])
-      arg1=Data(numpy.array([[[-5.0, 5.0], [-4.0, -6.0], [-2.0, -4.0]], [[-3.0, 1.0], [-7.0, -3.0], [1.0, 
--3.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[8.0, -26.0], [55.0, -27.0], [50.0, 24.0], [-87.0, -97.0], [42.0, -4.0]], [[-20.0, -4.0], 
-[-38.0, 42.0], [22.0, -76.0], [-32.0, 92.0], [-54.0, -48.0]], [[7.0, 59.0], [6.0, -16.0], [82.0, 18.0], [-26.0, -38.0], [-28.0, 
--8.0]], [[67.0, 17.0], [37.0, 81.0], [0.0, 4.0], [-30.0, -22.0], [71.0, -19.0]]])+(1.-msk_ref)*numpy.array([[[33.0, -5.0], 
-[16.0, 32.0], [-29.0, -39.0], [59.0, 59.0], [6.0, 10.0]], [[26.0, 66.0], [-82.0, -16.0], [56.0, -42.0], [-12.0, -22.0], [0.0, 
--12.0]], [[67.0, -7.0], [31.0, 55.0], [76.0, 2.0], [7.0, 11.0], [-13.0, 63.0]], [[94.0, -38.0], [33.0, 3.0], [-20.0, -36.0], 
-[42.0, -20.0], [-4.0, 40.0]]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-5.0, -4.0], [0.0, -2.0], [4.0, -4.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[2.0, -6.0, 6.0, -4.0, 0.0], [6.0, 3.0, -4.0, 2.0, -2.0], [-1.0, 5.0, 4.0, 0.0, -7.0], [3.0, 
+-5.0, -1.0, -3.0, -4.0]], [[-5.0, -3.0, 2.0, -4.0, -3.0], [-5.0, 0.0, 1.0, -6.0, -6.0], [-5.0, 4.0, -5.0, -4.0, 5.0], [-7.0, 
+1.0, -5.0, -4.0, 0.0]], [[2.0, 0.0, -5.0, -2.0, 6.0], [3.0, 0.0, 2.0, 2.0, 6.0], [-1.0, 6.0, 5.0, 1.0, 0.0], [-1.0, 6.0, -1.0, 
+0.0, -2.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-2.0, 30.0, -50.0, 12.0, 24.0], [-18.0, -15.0, 28.0, -2.0, 34.0], [1.0, -1.0, 0.0, 4.0, 35.0], 
+[-19.0, 49.0, 1.0, 15.0, 12.0]], [[-6.0, 30.0, -8.0, 32.0, -18.0], [-26.0, -12.0, 6.0, -4.0, -4.0], [18.0, -52.0, -26.0, 4.0, 
+18.0], [6.0, -6.0, 18.0, 20.0, 24.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[1.0, -1.0, 6.0, 6.0, -7.0], [6.0, 1.0, 5.0, 2.0, -4.0], [0.0, -6.0, 2.0, -2.0, 0.0], [-5.0, 
--7.0, 0.0, 0.0, -3.0]])+(1.-msk_arg0)*numpy.array([[-2.0, -5.0, 5.0, 0.0, 7.0], [0.0, 0.0, 6.0, 6.0, 4.0], [1.0, -6.0, -7.0, 
--6.0, 6.0], [3.0, -4.0, 5.0, -3.0, 0.0]])
-      arg1=Data(numpy.array([[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 2.0], [0.0, 3.0, -3.0, 1.0, -7.0], [3.0, -2.0, 
--7.0, -2.0, 0.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 2.0], [0.0, 3.0, -3.0, 1.0, -7.0], [3.0, 
--2.0, -7.0, -2.0, 0.0]], [[5.0, -5.0, 4.0, -6.0, 7.0], [5.0, -2.0, 0.0, -6.0, -2.0], [0.0, -3.0, 3.0, -1.0, 7.0], [-3.0, 2.0, 
-7.0, 2.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, -18.0, 6.0, -42.0], [18.0, 
--12.0, -42.0, -12.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, -18.0, 6.0, -42.0], 
-[18.0, -12.0, -42.0, -12.0, 0.0]], [[35.0, -35.0, 28.0, -42.0, 49.0], [35.0, -14.0, 0.0, -42.0, -14.0], [0.0, -21.0, 21.0, 
--7.0, 49.0], [-21.0, 14.0, 49.0, 14.0, 0.0]]], [[[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, 
--18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]], [[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 2.0], [0.0, 3.0, 
--3.0, 1.0, -7.0], [3.0, -2.0, -7.0, -2.0, 0.0]], [[-25.0, 25.0, -20.0, 30.0, -35.0], [-25.0, 10.0, 0.0, 30.0, 10.0], [0.0, 
-15.0, -15.0, 5.0, -35.0], [15.0, -10.0, -35.0, -10.0, 0.0]], [[-10.0, 10.0, -8.0, 12.0, -14.0], [-10.0, 4.0, 0.0, 12.0, 4.0], 
-[0.0, 6.0, -6.0, 2.0, -14.0], [6.0, -4.0, -14.0, -4.0, 0.0]], [[20.0, -20.0, 16.0, -24.0, 28.0], [20.0, -8.0, 0.0, -24.0, 
--8.0], [0.0, -12.0, 12.0, -4.0, 28.0], [-12.0, 8.0, 28.0, 8.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[30.0, -30.0, 24.0, -36.0, 42.0], [30.0, -12.0, 0.0, -36.0, -12.0], 
-[0.0, -18.0, 18.0, -6.0, 42.0], [-18.0, 12.0, 42.0, 12.0, 0.0]], [[-10.0, 10.0, -8.0, 12.0, -14.0], [-10.0, 4.0, 0.0, 12.0, 
-4.0], [0.0, 6.0, -6.0, 2.0, -14.0], [6.0, -4.0, -14.0, -4.0, 0.0]], [[10.0, -10.0, 8.0, -12.0, 14.0], [10.0, -4.0, 0.0, -12.0, 
--4.0], [0.0, -6.0, 6.0, -2.0, 14.0], [-6.0, 4.0, 14.0, 4.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[25.0, -25.0, 20.0, -30.0, 35.0], [25.0, -10.0, 0.0, -30.0, -10.0], [0.0, 
--15.0, 15.0, -5.0, 35.0], [-15.0, 10.0, 35.0, 10.0, 0.0]], [[35.0, -35.0, 28.0, -42.0, 49.0], [35.0, -14.0, 0.0, -42.0, -14.0], 
-[0.0, -21.0, 21.0, -7.0, 49.0], [-21.0, 14.0, 49.0, 14.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[15.0, -15.0, 12.0, -18.0, 21.0], [15.0, -6.0, 0.0, -18.0, -6.0], [0.0, -9.0, 9.0, -3.0, 
-21.0], [-9.0, 6.0, 21.0, 6.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, -10.0, 8.0, -12.0, 14.0], [10.0, -4.0, 0.0, -12.0, 
--4.0], [0.0, -6.0, 6.0, -2.0, 14.0], [-6.0, 4.0, 14.0, 4.0, 0.0]], [[25.0, -25.0, 20.0, -30.0, 35.0], [25.0, -10.0, 0.0, -30.0, 
--10.0], [0.0, -15.0, 15.0, -5.0, 35.0], [-15.0, 10.0, 35.0, 10.0, 0.0]], [[-25.0, 25.0, -20.0, 30.0, -35.0], [-25.0, 10.0, 0.0, 
-30.0, 10.0], [0.0, 15.0, -15.0, 5.0, -35.0], [15.0, -10.0, -35.0, -10.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-35.0, 35.0, -28.0, 42.0, -49.0], [-35.0, 14.0, 0.0, 42.0, 
-14.0], [0.0, 21.0, -21.0, 7.0, -49.0], [21.0, -14.0, -49.0, -14.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, 
--18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], [-30.0, 12.0, 0.0, 36.0, 12.0], 
-[0.0, 18.0, -18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]], [[-20.0, 20.0, -16.0, 24.0, -28.0], [-20.0, 8.0, 0.0, 24.0, 
-8.0], [0.0, 12.0, -12.0, 4.0, -28.0], [12.0, -8.0, -28.0, -8.0, 0.0]]], [[[-5.0, 5.0, -4.0, 6.0, -7.0], [-5.0, 2.0, 0.0, 6.0, 
-2.0], [0.0, 3.0, -3.0, 1.0, -7.0], [3.0, -2.0, -7.0, -2.0, 0.0]], [[30.0, -30.0, 24.0, -36.0, 42.0], [30.0, -12.0, 0.0, -36.0, 
--12.0], [0.0, -18.0, 18.0, -6.0, 42.0], [-18.0, 12.0, 42.0, 12.0, 0.0]], [[35.0, -35.0, 28.0, -42.0, 49.0], [35.0, -14.0, 0.0, 
--42.0, -14.0], [0.0, -21.0, 21.0, -7.0, 49.0], [-21.0, 14.0, 49.0, 14.0, 0.0]], [[30.0, -30.0, 24.0, -36.0, 42.0], [30.0, 
--12.0, 0.0, -36.0, -12.0], [0.0, -18.0, 18.0, -6.0, 42.0], [-18.0, 12.0, 42.0, 12.0, 0.0]], [[-30.0, 30.0, -24.0, 36.0, -42.0], 
-[-30.0, 12.0, 0.0, 36.0, 12.0], [0.0, 18.0, -18.0, 6.0, -42.0], [18.0, -12.0, -42.0, -12.0, 0.0]]], [[[-15.0, 15.0, -12.0, 
-18.0, -21.0], [-15.0, 6.0, 0.0, 18.0, 6.0], [0.0, 9.0, -9.0, 3.0, -21.0], [9.0, -6.0, -21.0, -6.0, 0.0]], [[20.0, -20.0, 16.0, 
--24.0, 28.0], [20.0, -8.0, 0.0, -24.0, -8.0], [0.0, -12.0, 12.0, -4.0, 28.0], [-12.0, 8.0, 28.0, 8.0, 0.0]], [[-25.0, 25.0, 
--20.0, 30.0, -35.0], [-25.0, 10.0, 0.0, 30.0, 10.0], [0.0, 15.0, -15.0, 5.0, -35.0], [15.0, -10.0, -35.0, -10.0, 0.0]], [[15.0, 
--15.0, 12.0, -18.0, 21.0], [15.0, -6.0, 0.0, -18.0, -6.0], [0.0, -9.0, 9.0, -3.0, 21.0], [-9.0, 6.0, 21.0, 6.0, 0.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[5.0, 3.0], [3.0, 5.0], [0.0, 5.0]], [[-4.0, 7.0], [3.0, 3.0], [4.0, 1.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-4.0, -5.0, -3.0, 1.0, -1.0], [-6.0, 0.0, -5.0, -7.0, -4.0], [7.0, -2.0, -5.0, -6.0, 4.0], 
+[7.0, -4.0, 4.0, 7.0, 1.0]], [[-7.0, 5.0, 3.0, 2.0, 2.0], [-7.0, -2.0, -4.0, -6.0, -7.0], [0.0, -3.0, 3.0, 3.0, -6.0], [0.0, 
+-6.0, 0.0, -7.0, 0.0]], [[-7.0, -1.0, 4.0, 5.0, 7.0], [2.0, -6.0, -3.0, 5.0, -6.0], [7.0, -6.0, 0.0, 1.0, -6.0], [-1.0, 1.0, 
+5.0, -5.0, 6.0]]], [[[0.0, 7.0, 6.0, -1.0, 3.0], [3.0, 2.0, 2.0, 1.0, 1.0], [7.0, 0.0, 0.0, -1.0, 2.0], [-3.0, 4.0, -5.0, 6.0, 
+4.0]], [[7.0, 7.0, 5.0, 0.0, 0.0], [7.0, 0.0, 3.0, 6.0, 0.0], [0.0, 2.0, 5.0, 7.0, -6.0], [6.0, -3.0, 7.0, 0.0, -6.0]], [[0.0, 
+-1.0, -6.0, -3.0, 4.0], [5.0, -3.0, -7.0, 6.0, -3.0], [-3.0, 4.0, 2.0, 4.0, -4.0], [-7.0, -7.0, -5.0, 6.0, 
+-6.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-20.0, -21.0, -39.0, 3.0, 5.0], [-22.0, -26.0, -64.0, -15.0, -57.0], [-5.0, 3.0, 7.0, 20.0, 
+-40.0], [37.0, -91.0, 41.0, 14.0, -53.0]], [[-61.0, 74.0, 77.0, 28.0, 67.0], [4.0, -29.0, -34.0, 5.0, -73.0], [102.0, -41.0, 
+17.0, 20.0, -56.0], [6.0, -25.0, 18.0, 9.0, 37.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[5.0, -1.0, 0.0], [0.0, -2.0, 5.0], [-1.0, -6.0, -5.0], [-1.0, -6.0, 3.0], [-1.0, -3.0, 
-1.0]], [[6.0, 0.0, 5.0], [3.0, 0.0, -7.0], [-1.0, 3.0, 4.0], [5.0, -6.0, -1.0], [-3.0, 5.0, -6.0]], [[1.0, -4.0, -3.0], [-3.0, 
-4.0, 1.0], [5.0, 5.0, 1.0], [-3.0, -6.0, -4.0], [-2.0, 0.0, 6.0]], [[2.0, -4.0, -1.0], [5.0, -4.0, 0.0], [5.0, -7.0, 3.0], 
-[1.0, 7.0, -1.0], [0.0, -7.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, 0.0, -6.0], [4.0, -2.0, -4.0], [4.0, 5.0, 4.0], [5.0, 
--1.0, 0.0], [4.0, -2.0, -2.0]], [[6.0, 0.0, -1.0], [3.0, 3.0, 2.0], [7.0, 2.0, -5.0], [4.0, -2.0, 5.0], [0.0, 5.0, -6.0]], 
-[[-4.0, -1.0, -1.0], [7.0, -7.0, 7.0], [3.0, 0.0, 5.0], [-2.0, -6.0, 3.0], [7.0, 1.0, -7.0]], [[-7.0, 4.0, 2.0], [6.0, -2.0, 
-5.0], [5.0, -4.0, 0.0], [4.0, 0.0, -6.0], [5.0, 7.0, 5.0]]])
-      arg1=Data(numpy.array([[[-6.0, -7.0, 1.0, -5.0, -5.0], [0.0, -5.0, 2.0, -1.0, 6.0], [0.0, 0.0, -3.0, 1.0, -6.0], [0.0, 
-3.0, -4.0, 4.0, 0.0]], [[-1.0, 2.0, -2.0, -3.0, -3.0], [2.0, 4.0, 2.0, 6.0, -1.0], [3.0, -2.0, -1.0, 2.0, 6.0], [3.0, 4.0, 
--6.0, 2.0, 2.0]], [[-5.0, -1.0, 3.0, 4.0, 6.0], [1.0, 4.0, 3.0, -1.0, -7.0], [-5.0, -3.0, 1.0, 1.0, 4.0], [-6.0, -3.0, -1.0, 
--6.0, 0.0]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-29.0, -37.0, 7.0, -22.0, -22.0], [-2.0, -29.0, 8.0, -11.0, 31.0], [-3.0, 2.0, -14.0, 3.0, 
--36.0], [-3.0, 11.0, -14.0, 18.0, -2.0]], [[-23.0, -9.0, 19.0, 26.0, 36.0], [1.0, 12.0, 11.0, -17.0, -33.0], [-31.0, -11.0, 
-7.0, 1.0, 8.0], [-36.0, -23.0, 7.0, -34.0, -4.0]], [[37.0, 0.0, -4.0, 3.0, -7.0], [-17.0, -39.0, -29.0, -30.0, 35.0], [7.0, 
-27.0, 4.0, -18.0, -50.0], [12.0, -12.0, 45.0, 14.0, -12.0]], [[-3.0, -8.0, 20.0, 35.0, 41.0], [-9.0, -7.0, -5.0, -38.0, -21.0], 
-[-33.0, 3.0, 12.0, -10.0, -18.0], [-36.0, -36.0, 37.0, -34.0, -12.0]], [[4.0, 0.0, 8.0, 18.0, 20.0], [-5.0, -3.0, -5.0, -18.0, 
--10.0], [-14.0, 3.0, 7.0, -6.0, -8.0], [-15.0, -18.0, 21.0, -16.0, -6.0]]], [[[-61.0, -47.0, 21.0, -10.0, 0.0], [5.0, -10.0, 
-27.0, -11.0, 1.0], [-25.0, -15.0, -13.0, 11.0, -16.0], [-30.0, 3.0, -29.0, -6.0, 0.0]], [[17.0, -14.0, -18.0, -43.0, -57.0], 
-[-7.0, -43.0, -15.0, 4.0, 67.0], [35.0, 21.0, -16.0, -4.0, -46.0], [42.0, 30.0, -5.0, 54.0, 0.0]], [[-17.0, 9.0, 5.0, 12.0, 
-20.0], [10.0, 33.0, 16.0, 15.0, -37.0], [-11.0, -18.0, 4.0, 9.0, 40.0], [-15.0, -3.0, -18.0, -22.0, 6.0]], [[-19.0, -46.0, 
-14.0, -11.0, -13.0], [-13.0, -53.0, -5.0, -40.0, 43.0], [-13.0, 15.0, -10.0, -8.0, -70.0], [-12.0, -6.0, 17.0, 14.0, -12.0]], 
-[[43.0, 37.0, -31.0, -24.0, -36.0], [4.0, 11.0, -14.0, 39.0, 19.0], [45.0, 8.0, -2.0, 1.0, 24.0], [51.0, 29.0, -12.0, 34.0, 
-10.0]]], [[[13.0, -12.0, 0.0, -5.0, -11.0], [-11.0, -33.0, -15.0, -22.0, 31.0], [3.0, 17.0, -2.0, -10.0, -42.0], [6.0, -4.0, 
-23.0, 14.0, -8.0]], [[9.0, 28.0, -8.0, 7.0, 9.0], [9.0, 35.0, 5.0, 26.0, -29.0], [7.0, -11.0, 6.0, 6.0, 46.0], [6.0, 4.0, 
--13.0, -10.0, 8.0]], [[-40.0, -26.0, -2.0, -36.0, -34.0], [11.0, -1.0, 23.0, 24.0, 18.0], [10.0, -13.0, -19.0, 16.0, 4.0], 
-[9.0, 32.0, -51.0, 24.0, 10.0]], [[44.0, 13.0, -3.0, 17.0, 9.0], [-16.0, -25.0, -30.0, -29.0, 16.0], [2.0, 24.0, 11.0, -19.0, 
--34.0], [6.0, -21.0, 52.0, 0.0, -12.0]], [[-18.0, 8.0, 16.0, 34.0, 46.0], [6.0, 34.0, 14.0, -4.0, -54.0], [-30.0, -18.0, 12.0, 
-4.0, 36.0], [-36.0, -24.0, 2.0, -44.0, 0.0]]], [[[-3.0, -21.0, 7.0, -2.0, -4.0], [-9.0, -30.0, -7.0, -25.0, 23.0], [-7.0, 11.0, 
--3.0, -7.0, -40.0], [-6.0, -7.0, 17.0, 6.0, -8.0]], [[-26.0, -43.0, 13.0, -13.0, -13.0], [-8.0, -41.0, 2.0, -29.0, 34.0], 
-[-12.0, 8.0, -11.0, -3.0, -54.0], [-12.0, -1.0, 4.0, 12.0, -8.0]], [[-38.0, -52.0, 28.0, 8.0, 14.0], [-11.0, -41.0, 5.0, -50.0, 
-16.0], [-36.0, 5.0, -5.0, -6.0, -60.0], [-39.0, -22.0, 19.0, -12.0, -14.0]], [[-8.0, 8.0, -16.0, -30.0, -32.0], [13.0, 19.0, 
-13.0, 42.0, 6.0], [26.0, -11.0, -11.0, 14.0, 32.0], [27.0, 34.0, -45.0, 24.0, 14.0]], [[22.0, -11.0, 5.0, 9.0, 3.0], [-17.0, 
--40.0, -23.0, -39.0, 28.0], [-6.0, 23.0, 4.0, -17.0, -54.0], [-3.0, -19.0, 45.0, 4.0, 
--14.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -36.0, -12.0, -54.0, -66.0], [-6.0, -54.0, -6.0, 0.0, 78.0], [30.0, 18.0, -24.0, 
-0.0, -60.0], [36.0, 36.0, -18.0, 60.0, 0.0]], [[-2.0, -28.0, -4.0, -30.0, -38.0], [-8.0, -44.0, -8.0, -12.0, 54.0], [14.0, 
-16.0, -14.0, -4.0, -52.0], [18.0, 16.0, 0.0, 36.0, -4.0]], [[-49.0, -22.0, 6.0, -19.0, -11.0], [14.0, 16.0, 30.0, 22.0, -9.0], 
-[-5.0, -22.0, -13.0, 18.0, 22.0], [-9.0, 20.0, -50.0, 2.0, 10.0]], [[-29.0, -37.0, 7.0, -22.0, -22.0], [-2.0, -29.0, 8.0, 
--11.0, 31.0], [-3.0, 2.0, -14.0, 3.0, -36.0], [-3.0, 11.0, -14.0, 18.0, -2.0]], [[-12.0, -30.0, 2.0, -22.0, -26.0], [-6.0, 
--36.0, -2.0, -14.0, 40.0], [4.0, 10.0, -12.0, -2.0, -44.0], [6.0, 10.0, -2.0, 24.0, -4.0]]], [[[-31.0, -41.0, 3.0, -34.0, 
--36.0], [-1.0, -34.0, 9.0, -5.0, 43.0], [5.0, 3.0, -19.0, 5.0, -40.0], [6.0, 21.0, -23.0, 30.0, 0.0]], [[-31.0, -17.0, 3.0, 
--16.0, -12.0], [8.0, 5.0, 18.0, 13.0, 1.0], [-1.0, -12.0, -10.0, 11.0, 8.0], [-3.0, 15.0, -32.0, 6.0, 6.0]], [[-19.0, -40.0, 
--12.0, -61.0, -71.0], [-1.0, -47.0, 3.0, 10.0, 75.0], [31.0, 11.0, -28.0, 6.0, -50.0], [36.0, 44.0, -35.0, 62.0, 4.0]], 
-[[-47.0, -37.0, 23.0, 6.0, 16.0], [1.0, -8.0, 19.0, -21.0, -9.0], [-31.0, -11.0, -5.0, 5.0, -16.0], [-36.0, -11.0, -9.0, -18.0, 
--4.0]], [[25.0, 16.0, -28.0, -39.0, -51.0], [4.0, -4.0, -8.0, 36.0, 37.0], [45.0, 8.0, -11.0, 4.0, 6.0], [51.0, 38.0, -24.0, 
-46.0, 10.0]]], [[[30.0, 27.0, -5.0, 19.0, 17.0], [-3.0, 12.0, -13.0, -1.0, -16.0], [2.0, 5.0, 12.0, -7.0, 14.0], [3.0, -13.0, 
-23.0, -12.0, -2.0]], [[-70.0, -70.0, 42.0, 14.0, 28.0], [-7.0, -35.0, 21.0, -56.0, 0.0], [-56.0, -7.0, -7.0, 0.0, -56.0], 
-[-63.0, -28.0, 7.0, -28.0, -14.0]], [[-43.0, -26.0, 18.0, 5.0, 15.0], [5.0, 5.0, 21.0, -8.0, -17.0], [-25.0, -15.0, -4.0, 8.0, 
-2.0], [-30.0, -6.0, -17.0, -18.0, 0.0]], [[3.0, -1.0, 19.0, 40.0, 46.0], [-9.0, -2.0, -7.0, -37.0, -27.0], [-33.0, 3.0, 15.0, 
--11.0, -12.0], [-36.0, -39.0, 41.0, -38.0, -12.0]], [[-8.0, -40.0, -16.0, -66.0, -80.0], [-5.0, -59.0, -5.0, 6.0, 90.0], [38.0, 
-19.0, -29.0, 2.0, -64.0], [45.0, 46.0, -27.0, 72.0, 2.0]]], [[[28.0, 55.0, -9.0, 31.0, 35.0], [10.0, 59.0, 0.0, 29.0, -60.0], 
-[2.0, -14.0, 19.0, 3.0, 74.0], [0.0, -11.0, 2.0, -32.0, 8.0]], [[-59.0, -51.0, 25.0, -4.0, 6.0], [1.0, -18.0, 23.0, -23.0, 
-3.0], [-31.0, -11.0, -11.0, 7.0, -28.0], [-36.0, -5.0, -17.0, -10.0, -4.0]], [[-26.0, -43.0, 13.0, -13.0, -13.0], [-8.0, -41.0, 
-2.0, -29.0, 34.0], [-12.0, 8.0, -11.0, -3.0, -54.0], [-12.0, -1.0, 4.0, 12.0, -8.0]], [[6.0, -22.0, -14.0, -44.0, -56.0], 
-[-6.0, -44.0, -10.0, 2.0, 66.0], [30.0, 18.0, -18.0, -2.0, -48.0], [36.0, 30.0, -10.0, 52.0, 0.0]], [[-62.0, -26.0, 6.0, -26.0, 
--16.0], [19.0, 23.0, 39.0, 32.0, -12.0], [-4.0, -29.0, -17.0, 24.0, 32.0], [-9.0, 28.0, -67.0, 4.0, 14.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank1_constData_rank3_offset0(self):
+      arg0=Data(numpy.array([2.0, -6.0]),self.functionspace)
+      arg1=Data(numpy.array([[[3.0, -2.0], [-6.0, -2.0]], [[-5.0, 6.0], [7.0, 5.0]], [[0.0, -4.0], [-1.0, 7.0]], [[7.0, -4.0], 
+[-7.0, 4.0]], [[0.0, -5.0], [7.0, -5.0]], [[7.0, -4.0], [-4.0, 6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[6.0, -4.0], [-12.0, -4.0]], [[-10.0, 12.0], [14.0, 10.0]], [[0.0, -8.0], [-2.0, 14.0]], [[14.0, 
+-8.0], [-14.0, 8.0]], [[0.0, -10.0], [14.0, -10.0]], [[14.0, -8.0], [-8.0, 12.0]]], [[[-18.0, 12.0], [36.0, 12.0]], [[30.0, 
+-36.0], [-42.0, -30.0]], [[0.0, 24.0], [6.0, -42.0]], [[-42.0, 24.0], [42.0, -24.0]], [[0.0, 30.0], [-42.0, 30.0]], [[-42.0, 
+24.0], [24.0, -36.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -1.0, 5.0], [-5.0, 0.0, 5.0]], [[4.0, 6.0, 0.0], [0.0, -5.0, -2.0]], [[-1.0, -4.0, 
-1.0], [6.0, 0.0, 0.0]], [[-6.0, 6.0, 7.0], [7.0, 7.0, 2.0]], [[7.0, 1.0, 7.0], [5.0, -6.0, 2.0]]], [[[-3.0, 2.0, 4.0], [-5.0, 
-5.0, 0.0]], [[0.0, 3.0, 1.0], [7.0, 7.0, 6.0]], [[-3.0, -1.0, 3.0], [2.0, 6.0, -7.0]], [[3.0, 2.0, 1.0], [4.0, 7.0, -2.0]], 
-[[-2.0, -6.0, -7.0], [0.0, -6.0, -7.0]]], [[[-1.0, -5.0, -5.0], [-4.0, 7.0, 0.0]], [[3.0, -4.0, 1.0], [1.0, -1.0, -7.0]], 
-[[3.0, 6.0, 5.0], [5.0, 4.0, 0.0]], [[0.0, 1.0, 2.0], [3.0, 4.0, -4.0]], [[-6.0, -6.0, 5.0], [-7.0, 0.0, 7.0]]], [[[-2.0, 0.0, 
-7.0], [0.0, -7.0, -2.0]], [[-1.0, 0.0, -2.0], [-1.0, 4.0, 1.0]], [[-5.0, -7.0, -1.0], [-7.0, -3.0, -1.0]], [[-6.0, 0.0, -4.0], 
-[-5.0, 0.0, -7.0]], [[4.0, 3.0, 1.0], [-2.0, 0.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, 7.0, 2.0], [5.0, -5.0, 1.0]], 
-[[2.0, 4.0, 1.0], [-6.0, -6.0, -7.0]], [[0.0, -5.0, 5.0], [-7.0, -5.0, 0.0]], [[4.0, 2.0, -5.0], [5.0, 2.0, 0.0]], [[-6.0, 
--4.0, -4.0], [6.0, 3.0, 1.0]]], [[[-4.0, -1.0, -4.0], [-5.0, 1.0, 1.0]], [[-1.0, -1.0, 1.0], [0.0, -1.0, 4.0]], [[-6.0, 4.0, 
-5.0], [-4.0, 1.0, 1.0]], [[-7.0, -1.0, -3.0], [0.0, 0.0, 1.0]], [[4.0, 1.0, 0.0], [6.0, 0.0, -4.0]]], [[[-4.0, -2.0, -6.0], 
-[-3.0, 6.0, -3.0]], [[2.0, -2.0, -4.0], [-1.0, -5.0, 4.0]], [[3.0, 0.0, -3.0], [7.0, 7.0, -3.0]], [[-1.0, 1.0, -5.0], [4.0, 
--6.0, 6.0]], [[-7.0, 7.0, 1.0], [4.0, -3.0, -6.0]]], [[[3.0, -4.0, -7.0], [5.0, 6.0, -2.0]], [[-6.0, 0.0, -1.0], [-2.0, -2.0, 
--3.0]], [[6.0, 7.0, 7.0], [0.0, 0.0, -7.0]], [[2.0, 3.0, -6.0], [-6.0, 7.0, 3.0]], [[2.0, 0.0, -3.0], [5.0, -5.0, 6.0]]]])
-      arg1=Data(numpy.array([[[[-4.0, -3.0, -1.0, -6.0, -3.0], [2.0, 4.0, 5.0, -3.0, -5.0], [0.0, -5.0, 3.0, -1.0, 6.0], [1.0, 
--2.0, 7.0, -5.0, -3.0]], [[7.0, -3.0, -1.0, 0.0, -6.0], [-2.0, -1.0, 6.0, -6.0, -7.0], [5.0, -1.0, 0.0, -2.0, -3.0], [-7.0, 
-0.0, -5.0, 2.0, 7.0]], [[3.0, 0.0, 0.0, 2.0, 2.0], [6.0, 3.0, 2.0, 5.0, 0.0], [7.0, -3.0, 4.0, 1.0, 5.0], [4.0, 7.0, 6.0, -3.0, 
-6.0]]], [[[-3.0, -4.0, 0.0, 0.0, -1.0], [1.0, 1.0, -1.0, -1.0, -6.0], [0.0, 0.0, 7.0, 7.0, 4.0], [-5.0, -6.0, 3.0, -7.0, 
--4.0]], [[-4.0, 5.0, 6.0, 7.0, 3.0], [6.0, 0.0, 4.0, -2.0, -2.0], [0.0, 4.0, -4.0, -7.0, 2.0], [-2.0, 6.0, -5.0, -5.0, -6.0]], 
-[[5.0, 4.0, -6.0, 4.0, -7.0], [-6.0, -3.0, -5.0, 3.0, 4.0], [-7.0, 2.0, -4.0, -6.0, 4.0], [-7.0, -1.0, 5.0, -6.0, 
--5.0]]]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, 25.0, -35.0, -6.0, -32.0], [9.0, 20.0, 14.0, 33.0, 27.0], [-5.0, -34.0, -17.0, -64.0, 
-64.0], [23.0, 48.0, 87.0, -42.0, 0.0]], [[36.0, -63.0, -28.0, -67.0, -49.0], [-22.0, 16.0, 46.0, -44.0, -60.0], [44.0, -50.0, 
-40.0, 31.0, -12.0], [-14.0, -36.0, 13.0, 29.0, 70.0]], [[-39.0, -9.0, 5.0, 8.0, 23.0], [18.0, 9.0, -33.0, 26.0, -3.0], [-13.0, 
-6.0, 43.0, 52.0, 35.0], [1.0, -27.0, 37.0, -48.0, -43.0]], [[48.0, 15.0, 30.0, 107.0, -4.0], [55.0, -8.0, 31.0, 2.0, -60.0], 
-[65.0, 35.0, 23.0, -11.0, 31.0], [-83.0, 59.0, -34.0, -75.0, 22.0]], [[19.0, -66.0, -56.0, -62.0, -50.0], [11.0, 47.0, 16.0, 
-21.0, -52.0], [40.0, -77.0, 100.0, 63.0, 90.0], [1.0, -33.0, 141.0, -71.0, 34.0]]], [[[33.0, 48.0, 31.0, 61.0, 25.0], [39.0, 
--7.0, 30.0, 12.0, 21.0], [38.0, 21.0, -48.0, -67.0, -14.0], [14.0, 94.0, -47.0, 17.0, 37.0]], [[5.0, 22.0, 3.0, 75.0, -44.0], 
-[13.0, -11.0, 11.0, -16.0, -53.0], [-20.0, 34.0, 1.0, -41.0, 62.0], [-108.0, 1.0, 7.0, -117.0, -73.0]], [[-51.0, 6.0, 82.0, 
-38.0, 86.0], [94.0, 21.0, 42.0, -5.0, -30.0], [65.0, 17.0, 21.0, 22.0, -8.0], [43.0, 58.0, -57.0, 2.0, 11.0]], [[-45.0, -4.0, 
-49.0, 25.0, 12.0], [66.0, 23.0, 63.0, -40.0, -75.0], [31.0, 4.0, 21.0, -15.0, 39.0], [-27.0, 21.0, -16.0, -65.0, -37.0]], 
-[[-66.0, -34.0, 14.0, -72.0, 59.0], [-28.0, -2.0, -49.0, -2.0, 36.0], [-30.0, -1.0, 18.0, 91.0, -69.0], [73.0, -74.0, -31.0, 
-91.0, -7.0]]], [[[-62.0, 69.0, 48.0, 45.0, 48.0], [16.0, -18.0, -13.0, -2.0, 50.0], [-60.0, 53.0, -79.0, -71.0, -18.0], [20.0, 
-33.0, -59.0, 3.0, -88.0]], [[-71.0, -34.0, 37.0, -51.0, 62.0], [57.0, 41.0, 23.0, 0.0, -19.0], [36.0, -32.0, 52.0, 62.0, 9.0], 
-[81.0, -4.0, 20.0, 14.0, 6.0]], [[14.0, -27.0, 15.0, 20.0, -28.0], [53.0, 26.0, 72.0, -33.0, -95.0], [65.0, -20.0, 48.0, -3.0, 
-53.0], [-52.0, 23.0, 16.0, -73.0, 19.0]], [[-32.0, -11.0, 47.0, 16.0, 35.0], [61.0, 20.0, 43.0, -19.0, -49.0], [47.0, 1.0, 
-29.0, 17.0, 11.0], [6.0, 24.0, -24.0, -21.0, 3.0]], [[53.0, 92.0, -30.0, 74.0, 22.0], [-19.0, -31.0, -84.0, 107.0, 142.0], 
-[-44.0, 35.0, -75.0, -68.0, 7.0], [42.0, 82.0, 32.0, 10.0, -1.0]]], [[[47.0, -37.0, -28.0, -31.0, 13.0], [8.0, 19.0, -14.0, 
-49.0, 16.0], [63.0, -43.0, 58.0, 70.0, 1.0], [54.0, 13.0, 53.0, 36.0, 100.0]], [[-10.0, 31.0, 19.0, 34.0, 5.0], [3.0, -14.0, 
-3.0, -11.0, 7.0], [-21.0, 29.0, -38.0, -42.0, -8.0], [-19.0, 17.0, -37.0, -8.0, -34.0]], [[-4.0, 45.0, 0.0, 3.0, 60.0], [-21.0, 
--20.0, -69.0, 62.0, 118.0], [-35.0, 21.0, -52.0, -4.0, -52.0], [88.0, 28.0, -17.0, 84.0, 11.0]], [[-8.0, 10.0, 48.0, 0.0, 
-64.0], [1.0, -20.0, 2.0, -18.0, 32.0], [21.0, 28.0, -41.0, 9.0, -104.0], [52.0, 21.0, -116.0, 119.0, 49.0]], [[-21.0, -41.0, 
-35.0, -50.0, 23.0], [48.0, 35.0, 77.0, -44.0, -57.0], [71.0, -40.0, 30.0, 19.0, -16.0], [46.0, 18.0, -22.0, 39.0, 
-58.0]]]])+(1.-msk_ref)*numpy.array([[[[37.0, -83.0, -50.0, -69.0, -86.0], [-19.0, 29.0, 51.0, -45.0, -100.0], [42.0, -66.0, 
-80.0, 45.0, 45.0], [-56.0, -61.0, 71.0, -43.0, 45.0]], [[30.0, -52.0, 0.0, -80.0, 9.0], [2.0, 22.0, 53.0, -28.0, -18.0], [76.0, 
--55.0, 20.0, 33.0, -59.0], [69.0, 10.0, -23.0, 109.0, 123.0]], [[21.0, 18.0, -25.0, -25.0, 32.0], [3.0, 13.0, -33.0, 72.0, 
-87.0], [10.0, -30.0, -9.0, 1.0, 2.0], [100.0, 47.0, 59.0, 49.0, 53.0]], [[-40.0, -28.0, 6.0, -20.0, -33.0], [-9.0, 4.0, 25.0, 
--58.0, -68.0], [-25.0, 1.0, 19.0, 8.0, 17.0], [-59.0, -61.0, -7.0, -46.0, -60.0]], [[-41.0, 25.0, 22.0, 53.0, 30.0], [-10.0, 
--29.0, -61.0, 13.0, 20.0], [-55.0, 60.0, -8.0, 25.0, -10.0], [-37.0, -35.0, -38.0, -29.0, -81.0]]], [[[13.0, 44.0, 5.0, 27.0, 
-11.0], [-35.0, -35.0, -30.0, 4.0, 59.0], [-40.0, 39.0, -71.0, -46.0, -55.0], [3.0, 15.0, -62.0, 54.0, -10.0]], [[24.0, 17.0, 
--28.0, 17.0, -20.0], [-24.0, -12.0, -33.0, 28.0, 30.0], [-26.0, 7.0, -11.0, -13.0, 16.0], [-16.0, -1.0, 29.0, -19.0, -12.0]], 
-[[80.0, 31.0, 2.0, 57.0, 4.0], [6.0, -20.0, 7.0, 24.0, 28.0], [48.0, 17.0, -34.0, -38.0, -33.0], [-3.0, 76.0, -44.0, 40.0, 
-81.0]], [[17.0, 28.0, 2.0, 40.0, 14.0], [-36.0, -39.0, -52.0, 15.0, 46.0], [-33.0, 47.0, -37.0, 0.0, -50.0], [-19.0, -8.0, 
--57.0, 36.0, -9.0]], [[-47.0, -55.0, 19.0, -40.0, 4.0], [36.0, 33.0, 40.0, -36.0, -79.0], [33.0, -29.0, 70.0, 60.0, 29.0], 
-[-5.0, -40.0, 21.0, -36.0, -9.0]]], [[[-46.0, 48.0, 60.0, 42.0, 54.0], [11.0, -26.0, -2.0, -24.0, 28.0], [-31.0, 58.0, -69.0, 
--43.0, -60.0], [10.0, 23.0, -108.0, 43.0, -47.0]], [[9.0, -5.0, -54.0, -39.0, -44.0], [-71.0, -15.0, -49.0, 9.0, 36.0], [-66.0, 
--8.0, -13.0, 2.0, 0.0], [-13.0, -60.0, 42.0, 6.0, -30.0]], [[-85.0, -14.0, 57.0, 13.0, 20.0], [55.0, 19.0, 45.0, -54.0, -83.0], 
-[0.0, 16.0, 30.0, 12.0, 33.0], [-37.0, -24.0, -26.0, -72.0, -82.0]], [[38.0, -22.0, -72.0, -22.0, -77.0], [-102.0, -34.0, 
--67.0, -2.0, 10.0], [-72.0, 7.0, 5.0, 28.0, -6.0], [-78.0, -99.0, 30.0, -12.0, -30.0]], [[50.0, -55.0, 18.0, -1.0, 10.0], [0.0, 
--10.0, 23.0, -32.0, -56.0], [84.0, 1.0, 47.0, 79.0, -72.0], [-24.0, -15.0, -81.0, 69.0, 108.0]]], [[[-110.0, 5.0, 49.0, 2.0, 
-28.0], [25.0, 6.0, 6.0, -43.0, -37.0], [-55.0, 30.0, 0.0, 3.0, 19.0], [-20.0, -47.0, -26.0, -55.0, -125.0]], [[20.0, 4.0, 12.0, 
-8.0, 33.0], [-14.0, -20.0, -23.0, 10.0, 34.0], [14.0, 19.0, -16.0, 23.0, -65.0], [25.0, 8.0, -59.0, 75.0, 47.0]], [[11.0, 
--67.0, 29.0, -50.0, 3.0], [82.0, 59.0, 121.0, -46.0, -107.0], [133.0, -72.0, 74.0, 29.0, 22.0], [34.0, 44.0, 14.0, 5.0, 
-108.0]], [[0.0, 56.0, 19.0, 37.0, -30.0], [-20.0, -28.0, 35.0, -53.0, 3.0], [-48.0, 39.0, -100.0, -123.0, -25.0], [-48.0, 29.0, 
--75.0, 3.0, -54.0]], [[18.0, -27.0, -68.0, -29.0, -74.0], [-75.0, -14.0, -51.0, 2.0, -6.0], [-63.0, -9.0, 25.0, 29.0, 31.0], 
-[-67.0, -91.0, 66.0, -47.0, -44.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([[4.0, 2.0], [5.0, -2.0], [-4.0, -7.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[3.0, 6.0], [-1.0, -6.0]], [[3.0, -6.0], [-4.0, 3.0]], [[2.0, 0.0], [3.0, -6.0]], [[-5.0, 4.0], 
+[-2.0, -2.0]], [[7.0, -6.0], [-3.0, -2.0]], [[-5.0, 6.0], [4.0, 4.0]]], [[[-7.0, 2.0], [5.0, 3.0]], [[4.0, -6.0], [-6.0, 4.0]], 
+[[1.0, -3.0], [4.0, 5.0]], [[5.0, -3.0], [5.0, -1.0]], [[7.0, 4.0], [-4.0, 3.0]], [[4.0, 4.0], [-1.0, 7.0]]], [[[1.0, 7.0], 
+[2.0, -6.0]], [[-4.0, -6.0], [1.0, 3.0]], [[3.0, -4.0], [-7.0, -4.0]], [[-6.0, 7.0], [0.0, -6.0]], [[-6.0, 0.0], [-1.0, 5.0]], 
+[[0.0, -3.0], [-2.0, 4.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-27.0, 6.0], [13.0, 15.0]], [[48.0, -30.0], [-50.0, 20.0]], [[1.0, 1.0], [60.0, 17.0]], [[29.0, 
+-27.0], [17.0, 11.0]], [[87.0, -4.0], [-28.0, -13.0]], [[0.0, 56.0], [19.0, 35.0]]], [[[13.0, -41.0], [-26.0, 24.0]], [[26.0, 
+42.0], [-3.0, -23.0]], [[-19.0, 34.0], [47.0, 6.0]], [[22.0, -35.0], [-14.0, 40.0]], [[42.0, -20.0], [9.0, -45.0]], [[-18.0, 
+25.0], [24.0, -34.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, -7.0, 2.0, 6.0, -6.0], [-3.0, 4.0, -6.0, -2.0, -3.0], [-2.0, 0.0, 0.0, -5.0, 6.0], 
-[2.0, -3.0, 3.0, -3.0, 6.0]])+(1.-msk_arg0)*numpy.array([[0.0, -3.0, -7.0, -6.0, -2.0], [-7.0, 0.0, 6.0, 2.0, -4.0], [0.0, 
--1.0, 5.0, 7.0, 2.0], [7.0, 5.0, 2.0, -6.0, -3.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([0.0, 4.0]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-7.0)+(1-msk_arg1)*(-6.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*(3.0)+(1-msk_arg1)*(-3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[28.0, 49.0, -14.0, -42.0, 42.0], [21.0, -28.0, 42.0, 14.0, 21.0], [14.0, -0.0, -0.0, 35.0, 
--42.0], [-14.0, 21.0, -21.0, 21.0, -42.0]])+(1.-msk_ref)*numpy.array([[-0.0, 18.0, 42.0, 36.0, 12.0], [42.0, -0.0, -36.0, 
--12.0, 24.0], [-0.0, 6.0, -30.0, -42.0, -12.0], [-42.0, -30.0, -12.0, 36.0, 18.0]])
+      ref=msk_ref*numpy.array([0.0, 12.0])+(1.-msk_ref)*numpy.array([-0.0, -12.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, 0.0, -4.0], [4.0, 3.0, -7.0], [4.0, 0.0, -2.0], [-7.0, 4.0, 5.0], [-7.0, -1.0, -3.0]], 
-[[0.0, 4.0, 2.0], [-7.0, 4.0, 2.0], [0.0, -5.0, 0.0], [0.0, 6.0, -5.0], [5.0, -4.0, -5.0]], [[-5.0, 1.0, -3.0], [-6.0, 3.0, 
-2.0], [0.0, -2.0, -7.0], [-2.0, -5.0, -6.0], [-2.0, -5.0, -1.0]], [[-3.0, -1.0, 4.0], [0.0, 6.0, -5.0], [-3.0, -6.0, 5.0], 
-[3.0, -5.0, -4.0], [-2.0, 4.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 0.0, 7.0], [-7.0, 1.0, 0.0], [7.0, -7.0, 4.0], [0.0, 
-0.0, 2.0], [-4.0, 4.0, -7.0]], [[3.0, 2.0, 4.0], [0.0, -3.0, -4.0], [-6.0, -7.0, -4.0], [6.0, -4.0, -3.0], [6.0, -2.0, 0.0]], 
-[[-5.0, 5.0, 7.0], [3.0, 5.0, 0.0], [3.0, -7.0, 3.0], [6.0, 2.0, -3.0], [0.0, -3.0, 1.0]], [[-1.0, -1.0, 6.0], [4.0, 7.0, 6.0], 
-[3.0, -7.0, 4.0], [2.0, 7.0, 0.0], [7.0, 3.0, -3.0]]])
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[-2.0, -3.0], [1.0, 0.0], [0.0, 0.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, 4.0, -3.0])+(1.-msk_arg1)*numpy.array([-2.0, 7.0, 2.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([1.0, -4.0, -5.0])+(1.-msk_arg1)*numpy.array([-3.0, -1.0, 1.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[28.0, 49.0, 22.0, -27.0, -23.0], [10.0, -18.0, -20.0, 39.0, 19.0], [-7.0, -18.0, 13.0, -10.0, 
--25.0], [-28.0, 39.0, -51.0, 4.0, 23.0]])+(1.-msk_ref)*numpy.array([[22.0, 21.0, -55.0, 4.0, 22.0], [16.0, -29.0, -45.0, -46.0, 
--26.0], [59.0, 29.0, -49.0, -4.0, -19.0], [7.0, 53.0, -47.0, 45.0, 1.0]])
+      ref=msk_ref*numpy.array([-6.0, -3.0])+(1.-msk_ref)*numpy.array([5.0, 9.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-4.0, 2.0, -6.0], [2.0, -4.0, -6.0]], [[2.0, -3.0, 1.0], [3.0, 1.0, -3.0]], [[0.0, 0.0, 
-4.0], [0.0, 5.0, 0.0]], [[0.0, 0.0, 7.0], [5.0, -4.0, 5.0]], [[-4.0, -5.0, -2.0], [4.0, -4.0, -1.0]]], [[[-1.0, -4.0, 0.0], 
-[5.0, 0.0, -2.0]], [[3.0, 4.0, 2.0], [-7.0, 3.0, -2.0]], [[-2.0, 0.0, -4.0], [6.0, 3.0, -7.0]], [[0.0, 7.0, -1.0], [0.0, 2.0, 
-2.0]], [[-5.0, 5.0, 6.0], [6.0, -4.0, 2.0]]], [[[-2.0, 4.0, -5.0], [2.0, 4.0, 4.0]], [[5.0, 3.0, 4.0], [-6.0, -7.0, -7.0]], 
-[[-7.0, -1.0, 4.0], [0.0, -2.0, -3.0]], [[-2.0, -7.0, -3.0], [0.0, -2.0, -1.0]], [[6.0, 6.0, -5.0], [3.0, -7.0, -1.0]]], 
-[[[-2.0, 4.0, -6.0], [6.0, 6.0, 2.0]], [[7.0, 2.0, 6.0], [2.0, 5.0, -4.0]], [[0.0, 5.0, 0.0], [6.0, 4.0, 7.0]], [[2.0, -4.0, 
--2.0], [5.0, 2.0, -4.0]], [[5.0, 0.0, -5.0], [-3.0, 2.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, -5.0, -5.0], [0.0, 3.0, 
--2.0]], [[1.0, -2.0, -1.0], [-6.0, 7.0, 2.0]], [[7.0, -3.0, 1.0], [7.0, -6.0, 1.0]], [[4.0, 4.0, -5.0], [-7.0, -7.0, -1.0]], 
-[[0.0, -5.0, 2.0], [7.0, 1.0, 0.0]]], [[[4.0, -6.0, 2.0], [-4.0, -5.0, -7.0]], [[2.0, 1.0, 2.0], [-5.0, 6.0, -1.0]], [[-2.0, 
-1.0, 0.0], [-4.0, -5.0, -6.0]], [[7.0, 3.0, -6.0], [2.0, 0.0, -6.0]], [[4.0, 2.0, -4.0], [-1.0, 3.0, -2.0]]], [[[7.0, 0.0, 
-7.0], [4.0, 2.0, 1.0]], [[-6.0, 3.0, -3.0], [-7.0, -2.0, 0.0]], [[-5.0, -3.0, 1.0], [-2.0, -3.0, 1.0]], [[6.0, -5.0, 6.0], 
-[0.0, 4.0, -2.0]], [[-3.0, 1.0, -4.0], [0.0, 6.0, -6.0]]], [[[-1.0, -2.0, -4.0], [-7.0, -7.0, -7.0]], [[-6.0, -2.0, 5.0], [0.0, 
--3.0, -3.0]], [[0.0, 6.0, 7.0], [2.0, -5.0, 7.0]], [[1.0, 6.0, 4.0], [-4.0, -6.0, -1.0]], [[-1.0, 7.0, 0.0], [6.0, -7.0, 
--3.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-4.0, 0.0], [2.0, 6.0], [-6.0, -5.0]], [[-5.0, 0.0], [-5.0, 2.0], [-4.0, 
+-7.0]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, 3.0, 0.0], [-4.0, -2.0, 5.0]])+(1.-msk_arg1)*numpy.array([[0.0, -1.0, -7.0], [-7.0, 
-7.0, 7.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[5.0, -2.0, -2.0], [0.0, 5.0, 6.0]])+(1.-msk_arg1)*numpy.array([[1.0, -2.0, 1.0], [3.0, 0.0, 
+3.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-12.0, -44.0, -10.0, 13.0, -16.0], [-39.0, 15.0, -59.0, 27.0, 24.0], [22.0, -3.0, 7.0, -16.0, 
--3.0], [-8.0, -53.0, 18.0, -62.0, -7.0]])+(1.-msk_ref)*numpy.array([[47.0, 114.0, -88.0, 24.0, -51.0], [-64.0, 55.0, -50.0, 
--17.0, 40.0], [-56.0, 53.0, -4.0, -23.0, 27.0], [-19.0, -75.0, -55.0, -55.0, -119.0]])
+      ref=msk_ref*numpy.array([-61.0, -34.0])+(1.-msk_ref)*numpy.array([-41.0, -38.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, 6.0, 7.0, 7.0, 1.0], [1.0, -7.0, -3.0, 6.0, 0.0], [-5.0, -6.0, 1.0, -3.0, -7.0], [4.0, 
-3.0, 1.0, 0.0, -1.0]])+(1.-msk_arg0)*numpy.array([[1.0, -2.0, 4.0, 6.0, 7.0], [0.0, -5.0, 4.0, -7.0, 0.0], [-2.0, -1.0, 4.0, 
--3.0, -6.0], [3.0, 1.0, 3.0, 4.0, 4.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-4.0, -4.0], [0.0, 5.0], [6.0, -2.0]], [[0.0, 0.0], [1.0, 3.0], [7.0, -4.0]], [[-4.0, -2.0], 
+[-3.0, 6.0], [-7.0, -5.0]], [[6.0, -5.0], [7.0, 3.0], [-6.0, 7.0]]], [[[-6.0, 4.0], [7.0, 4.0], [0.0, 0.0]], [[7.0, 1.0], [0.0, 
+1.0], [3.0, 2.0]], [[-1.0, 7.0], [-4.0, 7.0], [4.0, 1.0]], [[4.0, 2.0], [0.0, 1.0], [5.0, 3.0]]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, -7.0])+(1.-msk_arg1)*numpy.array([3.0, -7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[7.0, 4.0, 4.0], [-4.0, 7.0, -5.0], [-4.0, -4.0, 6.0], [-4.0, 0.0, -7.0]], [[-4.0, 7.0, 
+-1.0], [-1.0, 5.0, -4.0], [-2.0, 1.0, -6.0], [-3.0, 0.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 5.0, -1.0], [-3.0, 0.0, 
+-6.0], [7.0, -1.0, 2.0], [-5.0, 7.0, 5.0]], [[4.0, -4.0, 4.0], [3.0, 1.0, 0.0], [-4.0, 3.0, 3.0], [-2.0, 2.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-24.0, 42.0], [24.0, -42.0], [28.0, -49.0], [28.0, -49.0], [4.0, -7.0]], [[4.0, -7.0], [-28.0, 
-49.0], [-12.0, 21.0], [24.0, -42.0], [0.0, 0.0]], [[-20.0, 35.0], [-24.0, 42.0], [4.0, -7.0], [-12.0, 21.0], [-28.0, 49.0]], 
-[[16.0, -28.0], [12.0, -21.0], [4.0, -7.0], [0.0, 0.0], [-4.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[3.0, -7.0], [-6.0, 14.0], 
-[12.0, -28.0], [18.0, -42.0], [21.0, -49.0]], [[0.0, 0.0], [-15.0, 35.0], [12.0, -28.0], [-21.0, 49.0], [0.0, 0.0]], [[-6.0, 
-14.0], [-3.0, 7.0], [12.0, -28.0], [-9.0, 21.0], [-18.0, 42.0]], [[9.0, -21.0], [3.0, -7.0], [9.0, -21.0], [12.0, -28.0], 
-[12.0, -28.0]]])
+      ref=msk_ref*numpy.array([23.0, -40.0])+(1.-msk_ref)*numpy.array([-115.0, 114.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, 0.0, -1.0], [-2.0, -4.0, 5.0], [1.0, 6.0, 6.0], [-7.0, -6.0, 0.0], [-6.0, 7.0, 3.0]], 
-[[3.0, -2.0, 5.0], [-1.0, 2.0, -5.0], [7.0, 0.0, 5.0], [-1.0, 2.0, 4.0], [-2.0, 3.0, -1.0]], [[-6.0, 6.0, 3.0], [-2.0, 6.0, 
--7.0], [-5.0, 3.0, -4.0], [-3.0, 0.0, -6.0], [3.0, 4.0, 2.0]], [[-4.0, 3.0, 6.0], [-7.0, -6.0, -3.0], [5.0, 5.0, 0.0], [7.0, 
-5.0, 3.0], [0.0, 3.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 5.0, -3.0], [-1.0, -3.0, 6.0], [5.0, -3.0, 7.0], [7.0, 2.0, 
-3.0], [7.0, -1.0, 3.0]], [[-5.0, -4.0, 4.0], [3.0, 6.0, -4.0], [-2.0, 0.0, 0.0], [7.0, 1.0, 2.0], [-5.0, 5.0, 5.0]], [[1.0, 
-6.0, 2.0], [3.0, 3.0, -5.0], [4.0, -2.0, -3.0], [-3.0, 0.0, 5.0], [1.0, 5.0, -2.0]], [[7.0, 6.0, 3.0], [-1.0, -1.0, 2.0], [2.0, 
-5.0, 4.0], [-6.0, 0.0, 0.0], [-5.0, 2.0, 6.0]]])
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([1.0, 3.0]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, -3.0], [6.0, 3.0], [-7.0, -1.0]])+(1.-msk_arg1)*numpy.array([[0.0, 2.0], [4.0, 3.0], 
-[-7.0, 6.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([0.0, -1.0])+(1.-msk_arg1)*numpy.array([-7.0, -6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[4.0, -2.0], [-53.0, -11.0], [-9.0, 9.0], [-15.0, 3.0], [39.0, 36.0]], [[-56.0, -20.0], [50.0, 
-14.0], [-56.0, -26.0], [-13.0, 5.0], [31.0, 16.0]], [[33.0, 33.0], [91.0, 31.0], [61.0, 28.0], [51.0, 15.0], [1.0, 1.0]], 
-[[-12.0, 15.0], [6.0, 6.0], [15.0, 0.0], [-12.0, -9.0], [53.0, 14.0]]])+(1.-msk_ref)*numpy.array([[[41.0, -1.0], [-54.0, 25.0], 
-[-61.0, 43.0], [-13.0, 38.0], [-25.0, 29.0]], [[-44.0, 2.0], [52.0, 0.0], [0.0, -4.0], [-10.0, 29.0], [-15.0, 35.0]], [[10.0, 
-32.0], [47.0, -15.0], [13.0, -16.0], [-35.0, 24.0], [34.0, 5.0]], [[3.0, 50.0], [-18.0, 7.0], [-8.0, 43.0], [0.0, -12.0], 
-[-34.0, 32.0]]])
+      ref=msk_ref*numpy.array([[0.0, -1.0], [0.0, -3.0]])+(1.-msk_ref)*numpy.array([[-7.0, -6.0], [-21.0, -18.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 3.0, -4.0], [-6.0, -2.0, 2.0]], [[2.0, -3.0, 1.0], [5.0, -1.0, -5.0]], [[4.0, -2.0, 
-3.0], [-2.0, 4.0, -2.0]], [[-3.0, -4.0, -2.0], [1.0, -7.0, 0.0]], [[3.0, -3.0, -2.0], [-6.0, 0.0, 1.0]]], [[[0.0, -5.0, -2.0], 
-[0.0, 1.0, 3.0]], [[0.0, 5.0, 3.0], [4.0, 3.0, -6.0]], [[4.0, -7.0, 3.0], [2.0, 0.0, 7.0]], [[2.0, -7.0, 7.0], [-5.0, 2.0, 
--2.0]], [[7.0, 0.0, -5.0], [0.0, 0.0, -4.0]]], [[[1.0, 3.0, 6.0], [4.0, 1.0, 2.0]], [[-2.0, 4.0, 2.0], [0.0, -5.0, 6.0]], 
-[[-1.0, -1.0, -2.0], [1.0, -6.0, -2.0]], [[0.0, 5.0, -2.0], [-3.0, -4.0, 0.0]], [[-6.0, 1.0, -1.0], [0.0, -1.0, -6.0]]], 
-[[[5.0, -6.0, -5.0], [7.0, -4.0, 0.0]], [[5.0, -6.0, 4.0], [-7.0, 7.0, 4.0]], [[-7.0, 0.0, -3.0], [3.0, -1.0, -6.0]], [[6.0, 
--6.0, -7.0], [-6.0, -4.0, 4.0]], [[0.0, -5.0, -2.0], [4.0, -1.0, -2.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -6.0, 6.0], [0.0, 
-2.0, 5.0]], [[0.0, 3.0, 7.0], [-7.0, -4.0, -1.0]], [[2.0, 2.0, 0.0], [3.0, 0.0, -1.0]], [[-1.0, -3.0, 3.0], [-2.0, 3.0, 0.0]], 
-[[-2.0, -6.0, 0.0], [-3.0, -6.0, 2.0]]], [[[-4.0, 7.0, -5.0], [-1.0, 7.0, 4.0]], [[3.0, 0.0, 2.0], [0.0, 4.0, 6.0]], [[-2.0, 
--2.0, 0.0], [3.0, -3.0, -5.0]], [[5.0, -4.0, 1.0], [-5.0, -3.0, 5.0]], [[6.0, 0.0, 7.0], [0.0, -6.0, 5.0]]], [[[7.0, 2.0, 7.0], 
-[6.0, 0.0, 7.0]], [[3.0, 5.0, -2.0], [-3.0, 0.0, -7.0]], [[3.0, -5.0, 3.0], [-6.0, -2.0, 0.0]], [[6.0, -5.0, -3.0], [0.0, 1.0, 
-0.0]], [[1.0, -4.0, -6.0], [3.0, 6.0, -5.0]]], [[[-1.0, -3.0, -6.0], [3.0, 6.0, -4.0]], [[3.0, 0.0, 3.0], [0.0, -4.0, 7.0]], 
-[[0.0, 1.0, -5.0], [-5.0, -6.0, 4.0]], [[4.0, -5.0, -5.0], [-4.0, -5.0, 7.0]], [[6.0, -3.0, -4.0], [6.0, 6.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-4.0, -7.0], [4.0, 3.0], [5.0, 1.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, 3.0], [6.0, 0.0], [6.0, 6.0]], [[-3.0, 2.0], [7.0, 4.0], [3.0, 
--3.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 6.0], [-2.0, -3.0], [-4.0, 5.0]], [[-4.0, 3.0], [-5.0, -6.0], [1.0, -3.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[3.0, 1.0], [6.0, -5.0], [-3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[6.0, -3.0], [0.0, -3.0], 
+[5.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[4.0, -50.0], [-47.0, 33.0], [38.0, 48.0], [-91.0, -47.0], [-6.0, -18.0]], [[-26.0, -17.0], 
-[39.0, 56.0], [-5.0, 13.0], [25.0, 52.0], [-35.0, 3.0]], [[56.0, 45.0], [17.0, -32.0], [-70.0, -31.0], [-1.0, -34.0], [-31.0, 
--10.0]], [[-110.0, -17.0], [75.0, 41.0], [-59.0, -19.0], [-70.0, -64.0], [-67.0, -2.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 
-27.0], [13.0, 32.0], [-3.0, 18.0], [-20.0, -6.0], [42.0, 27.0]], [[-49.0, -127.0], [-1.0, -14.0], [-12.0, 36.0], [79.0, 35.0], 
-[49.0, 92.0]], [[0.0, 68.0], [24.0, 5.0], [53.0, 42.0], [59.0, 30.0], [-8.0, -24.0]], [[-23.0, -42.0], [36.0, 36.0], [72.0, 
--19.0], [106.0, 11.0], [10.0, 7.0]]])
+      ref=msk_ref*numpy.array([[-3.0, -44.0], [-6.0, -26.0]])+(1.-msk_ref)*numpy.array([[1.0, 0.0], [-37.0, 12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank2_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 0.0, -7.0, -4.0, 1.0], [2.0, -5.0, -7.0, -1.0, 2.0], [0.0, -4.0, 5.0, -7.0, 1.0], [-1.0, 
--7.0, -6.0, -1.0, 5.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -1.0, -1.0, -5.0, 3.0], [3.0, -2.0, -5.0, 6.0, 3.0], [6.0, 3.0, 
--3.0, 2.0, -6.0], [4.0, 3.0, 6.0, 2.0, 5.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[7.0, 1.0], [-2.0, 0.0], [-1.0, -4.0]], [[6.0, 4.0], [0.0, -1.0], [-4.0, 
+0.0]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, 6.0, 6.0, 0.0, 1.0], [-1.0, 4.0, -5.0, -3.0, -6.0], [-1.0, 2.0, 5.0, 4.0, 0.0], [-4.0, 
-6.0, 6.0, -1.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-6.0, -7.0, -4.0, -1.0, 7.0], [0.0, 7.0, -5.0, 0.0, 0.0], [-2.0, 0.0, 4.0, 
--1.0, -3.0], [-7.0, 7.0, 2.0, 0.0, -1.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[0.0, -5.0], [-3.0, 6.0], [4.0, 6.0]], [[-3.0, -3.0], [2.0, -1.0], [2.0, 
+-5.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 3.0], [4.0, -3.0], [0.0, -6.0]], [[1.0, 0.0], [-4.0, 0.0], [-5.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[25.0, 30.0, 30.0, 0.0, 5.0], [-5.0, 20.0, -25.0, -15.0, -30.0], [-5.0, 10.0, 25.0, 20.0, 
-0.0], [-20.0, 30.0, 30.0, -5.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, -35.0, -28.0, 0.0], 
-[28.0, -42.0, -42.0, 7.0, 42.0]], [[-20.0, -24.0, -24.0, 0.0, -4.0], [4.0, -16.0, 20.0, 12.0, 24.0], [4.0, -8.0, -20.0, -16.0, 
-0.0], [16.0, -24.0, -24.0, 4.0, 24.0]], [[5.0, 6.0, 6.0, 0.0, 1.0], [-1.0, 4.0, -5.0, -3.0, -6.0], [-1.0, 2.0, 5.0, 4.0, 0.0], 
-[-4.0, 6.0, 6.0, -1.0, -6.0]]], [[[10.0, 12.0, 12.0, 0.0, 2.0], [-2.0, 8.0, -10.0, -6.0, -12.0], [-2.0, 4.0, 10.0, 8.0, 0.0], 
-[-8.0, 12.0, 12.0, -2.0, -12.0]], [[-25.0, -30.0, -30.0, 0.0, -5.0], [5.0, -20.0, 25.0, 15.0, 30.0], [5.0, -10.0, -25.0, -20.0, 
-0.0], [20.0, -30.0, -30.0, 5.0, 30.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, -35.0, 
--28.0, 0.0], [28.0, -42.0, -42.0, 7.0, 42.0]], [[-5.0, -6.0, -6.0, 0.0, -1.0], [1.0, -4.0, 5.0, 3.0, 6.0], [1.0, -2.0, -5.0, 
--4.0, 0.0], [4.0, -6.0, -6.0, 1.0, 6.0]], [[10.0, 12.0, 12.0, 0.0, 2.0], [-2.0, 8.0, -10.0, -6.0, -12.0], [-2.0, 4.0, 10.0, 
-8.0, 0.0], [-8.0, 12.0, 12.0, -2.0, -12.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-20.0, -24.0, -24.0, 0.0, -4.0], [4.0, -16.0, 20.0, 12.0, 24.0], [4.0, -8.0, -20.0, -16.0, 
-0.0], [16.0, -24.0, -24.0, 4.0, 24.0]], [[25.0, 30.0, 30.0, 0.0, 5.0], [-5.0, 20.0, -25.0, -15.0, -30.0], [-5.0, 10.0, 25.0, 
-20.0, 0.0], [-20.0, 30.0, 30.0, -5.0, -30.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, 
--35.0, -28.0, 0.0], [28.0, -42.0, -42.0, 7.0, 42.0]], [[5.0, 6.0, 6.0, 0.0, 1.0], [-1.0, 4.0, -5.0, -3.0, -6.0], [-1.0, 2.0, 
-5.0, 4.0, 0.0], [-4.0, 6.0, 6.0, -1.0, -6.0]]], [[[-5.0, -6.0, -6.0, 0.0, -1.0], [1.0, -4.0, 5.0, 3.0, 6.0], [1.0, -2.0, -5.0, 
--4.0, 0.0], [4.0, -6.0, -6.0, 1.0, 6.0]], [[-35.0, -42.0, -42.0, 0.0, -7.0], [7.0, -28.0, 35.0, 21.0, 42.0], [7.0, -14.0, 
--35.0, -28.0, 0.0], [28.0, -42.0, -42.0, 7.0, 42.0]], [[-30.0, -36.0, -36.0, 0.0, -6.0], [6.0, -24.0, 30.0, 18.0, 36.0], [6.0, 
--12.0, -30.0, -24.0, 0.0], [24.0, -36.0, -36.0, 6.0, 36.0]], [[-5.0, -6.0, -6.0, 0.0, -1.0], [1.0, -4.0, 5.0, 3.0, 6.0], [1.0, 
--2.0, -5.0, -4.0, 0.0], [4.0, -6.0, -6.0, 1.0, 6.0]], [[25.0, 30.0, 30.0, 0.0, 5.0], [-5.0, 20.0, -25.0, -15.0, -30.0], [-5.0, 
-10.0, 25.0, 20.0, 0.0], [-20.0, 30.0, 30.0, -5.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[18.0, 21.0, 12.0, 3.0, -21.0], [0.0, 
--21.0, 15.0, 0.0, 0.0], [6.0, 0.0, -12.0, 3.0, 9.0], [21.0, -21.0, -6.0, 0.0, 3.0]], [[6.0, 7.0, 4.0, 1.0, -7.0], [0.0, -7.0, 
-5.0, 0.0, 0.0], [2.0, 0.0, -4.0, 1.0, 3.0], [7.0, -7.0, -2.0, 0.0, 1.0]], [[6.0, 7.0, 4.0, 1.0, -7.0], [0.0, -7.0, 5.0, 0.0, 
-0.0], [2.0, 0.0, -4.0, 1.0, 3.0], [7.0, -7.0, -2.0, 0.0, 1.0]], [[30.0, 35.0, 20.0, 5.0, -35.0], [0.0, -35.0, 25.0, 0.0, 0.0], 
-[10.0, 0.0, -20.0, 5.0, 15.0], [35.0, -35.0, -10.0, 0.0, 5.0]], [[-18.0, -21.0, -12.0, -3.0, 21.0], [0.0, 21.0, -15.0, 0.0, 
-0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]]], [[[-18.0, -21.0, -12.0, -3.0, 21.0], [0.0, 21.0, -15.0, 
-0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]], [[12.0, 14.0, 8.0, 2.0, -14.0], [0.0, -14.0, 10.0, 
-0.0, 0.0], [4.0, 0.0, -8.0, 2.0, 6.0], [14.0, -14.0, -4.0, 0.0, 2.0]], [[30.0, 35.0, 20.0, 5.0, -35.0], [0.0, -35.0, 25.0, 0.0, 
-0.0], [10.0, 0.0, -20.0, 5.0, 15.0], [35.0, -35.0, -10.0, 0.0, 5.0]], [[-36.0, -42.0, -24.0, -6.0, 42.0], [0.0, 42.0, -30.0, 
-0.0, 0.0], [-12.0, 0.0, 24.0, -6.0, -18.0], [-42.0, 42.0, 12.0, 0.0, -6.0]], [[-18.0, -21.0, -12.0, -3.0, 21.0], [0.0, 21.0, 
--15.0, 0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]]], [[[-36.0, -42.0, -24.0, -6.0, 42.0], [0.0, 
-42.0, -30.0, 0.0, 0.0], [-12.0, 0.0, 24.0, -6.0, -18.0], [-42.0, 42.0, 12.0, 0.0, -6.0]], [[-18.0, -21.0, -12.0, -3.0, 21.0], 
-[0.0, 21.0, -15.0, 0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]], [[18.0, 21.0, 12.0, 3.0, -21.0], 
-[0.0, -21.0, 15.0, 0.0, 0.0], [6.0, 0.0, -12.0, 3.0, 9.0], [21.0, -21.0, -6.0, 0.0, 3.0]], [[-12.0, -14.0, -8.0, -2.0, 14.0], 
-[0.0, 14.0, -10.0, 0.0, 0.0], [-4.0, 0.0, 8.0, -2.0, -6.0], [-14.0, 14.0, 4.0, 0.0, -2.0]], [[36.0, 42.0, 24.0, 6.0, -42.0], 
-[0.0, -42.0, 30.0, 0.0, 0.0], [12.0, 0.0, -24.0, 6.0, 18.0], [42.0, -42.0, -12.0, 0.0, 6.0]]], [[[-24.0, -28.0, -16.0, -4.0, 
-28.0], [0.0, 28.0, -20.0, 0.0, 0.0], [-8.0, 0.0, 16.0, -4.0, -12.0], [-28.0, 28.0, 8.0, 0.0, -4.0]], [[-18.0, -21.0, -12.0, 
--3.0, 21.0], [0.0, 21.0, -15.0, 0.0, 0.0], [-6.0, 0.0, 12.0, -3.0, -9.0], [-21.0, 21.0, 6.0, 0.0, -3.0]], [[-36.0, -42.0, 
--24.0, -6.0, 42.0], [0.0, 42.0, -30.0, 0.0, 0.0], [-12.0, 0.0, 24.0, -6.0, -18.0], [-42.0, 42.0, 12.0, 0.0, -6.0]], [[-12.0, 
--14.0, -8.0, -2.0, 14.0], [0.0, 14.0, -10.0, 0.0, 0.0], [-4.0, 0.0, 8.0, -2.0, -6.0], [-14.0, 14.0, 4.0, 0.0, -2.0]], [[-30.0, 
--35.0, -20.0, -5.0, 35.0], [0.0, 35.0, -25.0, 0.0, 0.0], [-10.0, 0.0, 20.0, -5.0, -15.0], [-35.0, 35.0, 10.0, 0.0, -5.0]]]])
+      ref=msk_ref*numpy.array([[-24.0, -51.0], [-30.0, -40.0]])+(1.-msk_ref)*numpy.array([[39.0, 33.0], [11.0, 27.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, 7.0, 4.0], [0.0, 5.0, -3.0], [-2.0, 7.0, -3.0], [0.0, -4.0, 0.0], [0.0, -2.0, 2.0]], 
-[[-5.0, -1.0, 4.0], [-6.0, 4.0, -3.0], [-3.0, 7.0, -1.0], [-1.0, 3.0, 5.0], [-4.0, -3.0, 6.0]], [[-6.0, -3.0, 7.0], [7.0, 6.0, 
-2.0], [2.0, 5.0, -6.0], [6.0, -7.0, -5.0], [-4.0, 0.0, -2.0]], [[4.0, -1.0, -3.0], [-7.0, 7.0, -1.0], [-6.0, -4.0, 7.0], [-7.0, 
--3.0, 0.0], [1.0, 5.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 0.0, -1.0], [-7.0, -7.0, 6.0], [-5.0, 5.0, -5.0], [-1.0, 
--5.0, -2.0], [-5.0, -3.0, 5.0]], [[-5.0, 7.0, 3.0], [1.0, -1.0, 4.0], [1.0, 2.0, 2.0], [2.0, -2.0, -7.0], [-1.0, 6.0, 1.0]], 
-[[7.0, -1.0, -3.0], [-4.0, 2.0, 6.0], [-3.0, 0.0, -7.0], [-2.0, -1.0, -6.0], [-7.0, 0.0, -4.0]], [[-3.0, -1.0, 2.0], [-7.0, 
-0.0, -6.0], [6.0, -1.0, 5.0], [0.0, -3.0, -2.0], [0.0, 5.0, 7.0]]])
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-4.0, 3.0], [-5.0, 3.0], [2.0, -3.0]], [[0.0, 0.0], [0.0, 4.0], [3.0, -5.0]], [[-5.0, 2.0], 
+[-7.0, -7.0], [-6.0, 2.0]], [[0.0, 1.0], [5.0, 5.0], [-3.0, -1.0]]], [[[0.0, -6.0], [6.0, 4.0], [-5.0, 5.0]], [[7.0, 5.0], 
+[-5.0, 7.0], [7.0, 5.0]], [[1.0, 1.0], [1.0, 2.0], [-3.0, 6.0]], [[6.0, -6.0], [0.0, -6.0], [-3.0, -5.0]]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-2.0, -1.0, -6.0, 0.0, -6.0], [-1.0, -7.0, -5.0, 5.0, -6.0], [1.0, -5.0, -7.0, 6.0, -5.0], 
-[4.0, -1.0, -1.0, -1.0, 0.0]], [[-4.0, 7.0, -7.0, 1.0, 2.0], [1.0, -7.0, -1.0, -5.0, -6.0], [0.0, 2.0, 5.0, 7.0, -1.0], [7.0, 
-4.0, -2.0, -3.0, 5.0]], [[-4.0, 0.0, 0.0, 4.0, 7.0], [-3.0, 0.0, -5.0, -4.0, -3.0], [-1.0, 7.0, -2.0, -3.0, 6.0], [0.0, 2.0, 
-7.0, 5.0, 1.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -4.0, -5.0, -7.0, 4.0], [1.0, 2.0, 2.0, -3.0, -3.0], [0.0, -6.0, 5.0, 2.0, 
--6.0], [0.0, -4.0, 1.0, -7.0, 0.0]], [[-7.0, -7.0, -2.0, 7.0, -6.0], [-1.0, 2.0, -7.0, 3.0, -4.0], [6.0, -6.0, -3.0, 7.0, 4.0], 
-[7.0, 0.0, -5.0, -6.0, -5.0]], [[-6.0, 5.0, -4.0, 6.0, -1.0], [-1.0, -3.0, 7.0, 5.0, 0.0], [-7.0, 5.0, 2.0, -1.0, -4.0], [-6.0, 
--1.0, -2.0, 4.0, 0.0]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([[[[0.0, -5.0], [-7.0, 2.0], [2.0, -7.0]], [[0.0, -6.0], [4.0, -1.0], [-2.0, -6.0]], [[4.0, 
+0.0], [-7.0, 2.0], [7.0, -2.0]], [[5.0, 3.0], [-6.0, 0.0], [-6.0, -3.0]]], [[[4.0, 2.0], [2.0, 5.0], [7.0, 6.0]], [[2.0, 7.0], 
+[1.0, -3.0], [3.0, -5.0]], [[7.0, -1.0], [3.0, 7.0], [3.0, 6.0]], [[7.0, 0.0], [-4.0, 3.0], [-6.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, 4.0], [3.0, 2.0], [2.0, -3.0]], [[3.0, 2.0], [4.0, -2.0], [5.0, 3.0]], [[1.0, 
+-6.0], [-2.0, 0.0], [-2.0, -7.0]], [[-2.0, -6.0], [3.0, -1.0], [-3.0, 7.0]]], [[[-7.0, 6.0], [5.0, 2.0], [-1.0, -3.0]], [[6.0, 
+0.0], [0.0, -7.0], [4.0, 0.0]], [[-1.0, 3.0], [-2.0, -5.0], [0.0, -6.0]], [[2.0, 6.0], [6.0, -4.0], [-1.0, 5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-30.0, 56.0, -7.0, 23.0, 84.0], [2.0, 0.0, 8.0, -86.0, -12.0], [-11.0, 77.0, 76.0, -5.0, 
-52.0], [21.0, 43.0, 21.0, 6.0, 39.0]], [[-8.0, 35.0, -35.0, -7.0, -11.0], [14.0, -35.0, 10.0, -13.0, -21.0], [3.0, -11.0, 31.0, 
-44.0, -23.0], [35.0, 14.0, -31.0, -30.0, 22.0]], [[-12.0, 51.0, -37.0, -5.0, 5.0], [18.0, -35.0, 18.0, -33.0, -21.0], [1.0, 
-3.0, 55.0, 46.0, -15.0], [41.0, 24.0, -33.0, -34.0, 32.0]], [[16.0, -28.0, 28.0, -4.0, -8.0], [-4.0, 28.0, 4.0, 20.0, 24.0], 
-[0.0, -8.0, -20.0, -28.0, 4.0], [-28.0, -16.0, 8.0, 12.0, -20.0]], [[0.0, -14.0, 14.0, 6.0, 10.0], [-8.0, 14.0, -8.0, 2.0, 
-6.0], [-2.0, 10.0, -14.0, -20.0, 14.0], [-14.0, -4.0, 18.0, 16.0, -8.0]]], [[[-2.0, -2.0, 37.0, 15.0, 56.0], [-8.0, 42.0, 6.0, 
--36.0, 24.0], [-9.0, 51.0, 22.0, -49.0, 50.0], [-27.0, 9.0, 35.0, 28.0, -1.0]], [[8.0, 34.0, 8.0, -8.0, 23.0], [19.0, 14.0, 
-41.0, -38.0, 21.0], [-3.0, 17.0, 68.0, 1.0, 8.0], [4.0, 16.0, -23.0, -21.0, 17.0]], [[-18.0, 52.0, -31.0, 3.0, 25.0], [13.0, 
--28.0, 13.0, -46.0, -21.0], [-2.0, 22.0, 58.0, 34.0, 2.0], [37.0, 29.0, -18.0, -23.0, 34.0]], [[-30.0, 22.0, -15.0, 23.0, 
-47.0], [-11.0, -14.0, -23.0, -40.0, -27.0], [-6.0, 46.0, 12.0, 0.0, 32.0], [17.0, 23.0, 30.0, 17.0, 20.0]], [[-4.0, -17.0, 
-45.0, 21.0, 60.0], [-17.0, 49.0, -7.0, -29.0, 24.0], [-10.0, 56.0, 1.0, -63.0, 59.0], [-37.0, 4.0, 52.0, 43.0, -9.0]]], 
-[[[-4.0, -15.0, 57.0, 25.0, 79.0], [-18.0, 63.0, -2.0, -43.0, 33.0], [-13.0, 73.0, 13.0, -78.0, 75.0], [-45.0, 8.0, 61.0, 50.0, 
--8.0]], [[-46.0, 35.0, -84.0, 14.0, -16.0], [-7.0, -91.0, -51.0, -3.0, -84.0], [5.0, -9.0, -23.0, 78.0, -29.0], [70.0, 21.0, 
--5.0, -15.0, 32.0]], [[0.0, 33.0, -47.0, -19.0, -44.0], [21.0, -49.0, 15.0, 9.0, -24.0], [8.0, -42.0, 23.0, 65.0, -51.0], 
-[43.0, 6.0, -54.0, -47.0, 19.0]], [[36.0, -55.0, 13.0, -27.0, -85.0], [2.0, 7.0, 2.0, 85.0, 21.0], [11.0, -79.0, -67.0, 2.0, 
--53.0], [-25.0, -44.0, -27.0, -10.0, -40.0]], [[16.0, 4.0, 24.0, -8.0, 10.0], [10.0, 28.0, 30.0, -12.0, 30.0], [-2.0, 6.0, 
-32.0, -18.0, 8.0], [-16.0, 0.0, -10.0, -6.0, -2.0]]], [[[8.0, -11.0, -17.0, -13.0, -47.0], [4.0, -21.0, -4.0, 37.0, -9.0], 
-[7.0, -43.0, -27.0, 26.0, -37.0], [9.0, -14.0, -23.0, -16.0, -8.0]], [[-10.0, 56.0, -7.0, 3.0, 49.0], [17.0, 0.0, 33.0, -66.0, 
-3.0], [-6.0, 42.0, 86.0, 10.0, 22.0], [21.0, 33.0, -14.0, -19.0, 34.0]], [[0.0, -22.0, 64.0, 24.0, 77.0], [-19.0, 70.0, -1.0, 
--38.0, 39.0], [-13.0, 71.0, 8.0, -85.0, 76.0], [-52.0, 4.0, 63.0, 53.0, -13.0]], [[26.0, -14.0, 63.0, -3.0, 36.0], [4.0, 70.0, 
-38.0, -20.0, 60.0], [-7.0, 29.0, 34.0, -63.0, 38.0], [-49.0, -5.0, 13.0, 16.0, -15.0]], [[-50.0, 34.0, -41.0, 33.0, 53.0], 
-[-17.0, -42.0, -45.0, -48.0, -57.0], [-6.0, 54.0, 4.0, 20.0, 32.0], [39.0, 33.0, 38.0, 19.0, 
-32.0]]]])+(1.-msk_ref)*numpy.array([[[[13.0, 23.0, 39.0, 43.0, -27.0], [-6.0, -11.0, -21.0, 16.0, 21.0], [7.0, 37.0, -37.0, 
--13.0, 46.0], [6.0, 29.0, -5.0, 45.0, 0.0]], [[20.0, 107.0, 25.0, 36.0, 8.0], [-6.0, -46.0, 77.0, 30.0, 49.0], [-84.0, 114.0, 
--2.0, -69.0, -10.0], [-85.0, 22.0, 16.0, 115.0, 35.0]], [[0.0, -40.0, 35.0, 40.0, -45.0], [-5.0, 15.0, -80.0, 5.0, -5.0], 
-[65.0, -25.0, -50.0, 30.0, 70.0], [65.0, 25.0, -20.0, -15.0, -25.0]], [[48.0, 29.0, 23.0, -40.0, 28.0], [6.0, -6.0, 19.0, 
--22.0, 23.0], [-16.0, 26.0, 6.0, -35.0, -6.0], [-23.0, 6.0, 28.0, 29.0, 25.0]], [[-4.0, 66.0, 11.0, 44.0, -7.0], [-7.0, -31.0, 
-46.0, 31.0, 27.0], [-53.0, 73.0, -6.0, -36.0, -2.0], [-51.0, 15.0, 0.0, 73.0, 15.0]]], [[[-62.0, -14.0, -1.0, 102.0, -65.0], 
-[-15.0, -5.0, -38.0, 51.0, -13.0], [21.0, 3.0, -40.0, 36.0, 46.0], [31.0, 17.0, -46.0, 5.0, -35.0]], [[-18.0, 23.0, -19.0, 
-10.0, 6.0], [-2.0, -12.0, 37.0, 14.0, 1.0], [-34.0, 20.0, 16.0, -9.0, -26.0], [-31.0, -8.0, -2.0, 15.0, 5.0]], [[-27.0, -8.0, 
--17.0, 19.0, -10.0], [-3.0, 0.0, 2.0, 13.0, -11.0], [-2.0, -8.0, 3.0, 14.0, -6.0], [2.0, -6.0, -13.0, -11.0, -10.0]], [[54.0, 
--29.0, 22.0, -70.0, 27.0], [11.0, 21.0, -31.0, -47.0, 2.0], [37.0, -35.0, 2.0, -3.0, 8.0], [28.0, -1.0, 26.0, -30.0, 10.0]], 
-[[-47.0, -33.0, -11.0, 55.0, -41.0], [-8.0, 7.0, -37.0, 26.0, -21.0], [29.0, -25.0, -21.0, 39.0, 26.0], [36.0, 3.0, -33.0, 
--25.0, -30.0]]], [[[18.0, -36.0, -21.0, -74.0, 37.0], [11.0, 21.0, 0.0, -39.0, -17.0], [15.0, -51.0, 32.0, 10.0, -34.0], [11.0, 
--25.0, 18.0, -55.0, 5.0]], [[-46.0, 32.0, -8.0, 78.0, -34.0], [-12.0, -22.0, 20.0, 48.0, 4.0], [-30.0, 42.0, -14.0, 0.0, 8.0], 
-[-22.0, 10.0, -26.0, 40.0, -10.0]], [[45.0, -23.0, 43.0, -21.0, -5.0], [4.0, 15.0, -55.0, -26.0, 9.0], [49.0, -17.0, -29.0, 
-1.0, 46.0], [42.0, 19.0, 11.0, -7.0, 0.0]], [[45.0, -15.0, 36.0, -29.0, 4.0], [5.0, 12.0, -39.0, -27.0, 10.0], [36.0, -12.0, 
--19.0, -5.0, 32.0], [29.0, 14.0, 15.0, -4.0, 5.0]], [[31.0, 8.0, 51.0, 25.0, -24.0], [-3.0, -2.0, -42.0, 1.0, 21.0], [28.0, 
-22.0, -43.0, -10.0, 58.0], [24.0, 32.0, 1.0, 33.0, 0.0]]], [[[-2.0, 29.0, 9.0, 26.0, -8.0], [-4.0, -14.0, 15.0, 16.0, 13.0], 
-[-20.0, 34.0, -8.0, -15.0, 6.0], [-19.0, 10.0, -2.0, 35.0, 5.0]], [[43.0, -2.0, 59.0, 13.0, -22.0], [-1.0, 4.0, -56.0, -9.0, 
-21.0], [42.0, 12.0, -47.0, -8.0, 66.0], [36.0, 34.0, 5.0, 25.0, 0.0]], [[-29.0, 8.0, -48.0, -19.0, 25.0], [2.0, -5.0, 54.0, 
-4.0, -14.0], [-41.0, -5.0, 43.0, 0.0, -60.0], [-37.0, -29.0, 1.0, -16.0, 5.0]], [[33.0, 11.0, 14.0, -33.0, 20.0], [5.0, 0.0, 
-7.0, -19.0, 12.0], [-4.0, 8.0, 5.0, -19.0, -4.0], [-9.0, 2.0, 19.0, 10.0, 15.0]], [[-77.0, 0.0, -38.0, 77.0, -37.0], [-12.0, 
--11.0, 14.0, 50.0, -20.0], [-19.0, 5.0, -1.0, 28.0, -8.0], [-7.0, -7.0, -39.0, -2.0, -25.0]]]])
+      ref=msk_ref*numpy.array([[76.0, 2.0], [145.0, 84.0]])+(1.-msk_ref)*numpy.array([[190.0, 122.0], [63.0, -212.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -3.0, -7.0], [7.0, 1.0, 0.0]], [[3.0, -4.0, 7.0], [7.0, 1.0, 3.0]], [[6.0, 0.0, 2.0], 
-[0.0, -1.0, 3.0]], [[-3.0, 5.0, 1.0], [-6.0, -7.0, 0.0]], [[-7.0, 2.0, -6.0], [0.0, 7.0, -1.0]]], [[[4.0, 5.0, -4.0], [5.0, 
--7.0, -6.0]], [[6.0, -1.0, -7.0], [-6.0, 4.0, -7.0]], [[-7.0, -6.0, -5.0], [6.0, -4.0, 1.0]], [[3.0, -6.0, -6.0], [0.0, -1.0, 
--4.0]], [[-2.0, 0.0, 3.0], [0.0, 4.0, -6.0]]], [[[3.0, -6.0, -2.0], [5.0, 0.0, -5.0]], [[-1.0, 4.0, 7.0], [5.0, -7.0, -5.0]], 
-[[-1.0, 4.0, -2.0], [-3.0, 2.0, 7.0]], [[7.0, 6.0, -2.0], [-6.0, 0.0, 0.0]], [[-3.0, 5.0, 3.0], [3.0, 0.0, -5.0]]], [[[-4.0, 
--7.0, 7.0], [5.0, -3.0, -2.0]], [[0.0, 3.0, 0.0], [-7.0, 4.0, -5.0]], [[1.0, -6.0, 5.0], [6.0, 1.0, 1.0]], [[7.0, 2.0, 4.0], 
-[4.0, -5.0, 2.0]], [[3.0, -4.0, 5.0], [4.0, 5.0, -2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -5.0, -5.0], [6.0, 0.0, 5.0]], 
-[[6.0, 5.0, 4.0], [-6.0, 4.0, -5.0]], [[4.0, -7.0, -5.0], [2.0, 7.0, -1.0]], [[-2.0, -5.0, 0.0], [7.0, -7.0, 6.0]], [[7.0, 
--4.0, 2.0], [-2.0, 0.0, -4.0]]], [[[-1.0, -1.0, 5.0], [7.0, 5.0, -5.0]], [[2.0, 4.0, 0.0], [2.0, -4.0, 4.0]], [[-7.0, 0.0, 
--4.0], [5.0, 1.0, -1.0]], [[-5.0, 1.0, -7.0], [-7.0, -3.0, 4.0]], [[2.0, -6.0, 6.0], [-6.0, 3.0, 0.0]]], [[[-1.0, -2.0, 5.0], 
-[-1.0, 5.0, -5.0]], [[-4.0, 0.0, -3.0], [-7.0, 4.0, 0.0]], [[5.0, -1.0, 0.0], [6.0, 6.0, -1.0]], [[2.0, -6.0, -6.0], [6.0, 4.0, 
-4.0]], [[2.0, -2.0, -6.0], [4.0, 5.0, 4.0]]], [[[1.0, -2.0, -7.0], [2.0, 0.0, -1.0]], [[0.0, 4.0, 5.0], [7.0, -2.0, 7.0]], 
-[[5.0, 7.0, 1.0], [3.0, -7.0, -5.0]], [[-7.0, -2.0, 2.0], [0.0, -3.0, -5.0]], [[-2.0, 7.0, 6.0], [-7.0, -6.0, -3.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([1.0, 0.0]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-6.0, 1.0, -6.0, -2.0, -1.0], [0.0, 0.0, 3.0, 0.0, -5.0], [-5.0, -7.0, -2.0, -6.0, 6.0], 
-[2.0, -4.0, -2.0, -2.0, 0.0]], [[3.0, -6.0, 2.0, -4.0, 2.0], [5.0, 2.0, 4.0, -3.0, 1.0], [-6.0, 2.0, 2.0, 7.0, 0.0], [3.0, 7.0, 
--1.0, -2.0, 4.0]], [[7.0, 4.0, 0.0, -3.0, 0.0], [1.0, -4.0, 4.0, -1.0, -4.0], [0.0, 0.0, 5.0, -1.0, -4.0], [-1.0, 6.0, 4.0, 
--3.0, -6.0]]], [[[0.0, -4.0, 1.0, 6.0, 0.0], [0.0, 4.0, -7.0, 5.0, 6.0], [-7.0, 0.0, -6.0, -3.0, 0.0], [7.0, -6.0, 0.0, -3.0, 
--7.0]], [[0.0, 0.0, 3.0, 3.0, -4.0], [4.0, -5.0, -5.0, 6.0, 2.0], [0.0, -2.0, 3.0, -7.0, 2.0], [0.0, -3.0, 0.0, 1.0, 5.0]], 
-[[-4.0, 2.0, 0.0, 2.0, -7.0], [7.0, -5.0, -4.0, -7.0, 6.0], [-7.0, 0.0, 1.0, -5.0, 0.0], [1.0, 6.0, 7.0, 5.0, 
-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, 7.0, -2.0, -4.0, 0.0], [-4.0, 6.0, 3.0, 0.0, 7.0], [6.0, 2.0, 1.0, 1.0, 5.0], 
-[-1.0, -5.0, -5.0, -7.0, -4.0]], [[2.0, 6.0, -3.0, 0.0, 6.0], [7.0, -6.0, -1.0, 0.0, 0.0], [5.0, 4.0, 6.0, 4.0, -4.0], [5.0, 
-1.0, -6.0, 1.0, -4.0]], [[2.0, -7.0, 0.0, 2.0, 3.0], [0.0, -1.0, 4.0, -3.0, -1.0], [4.0, 2.0, -6.0, 0.0, 7.0], [-2.0, -5.0, 
--3.0, 0.0, 0.0]]], [[[-6.0, 3.0, 0.0, -3.0, -3.0], [0.0, 2.0, 3.0, -5.0, -2.0], [7.0, 6.0, 2.0, 1.0, -5.0], [1.0, -2.0, -7.0, 
-3.0, 6.0]], [[5.0, 2.0, -1.0, 0.0, 0.0], [-3.0, 7.0, -3.0, 3.0, 0.0], [-7.0, 7.0, -2.0, 2.0, 7.0], [6.0, 3.0, -2.0, -2.0, 
--6.0]], [[7.0, -1.0, 6.0, -6.0, -5.0], [0.0, 4.0, 0.0, 2.0, 1.0], [-2.0, -7.0, 6.0, 0.0, -2.0], [-7.0, 4.0, -4.0, 5.0, -6.0]]]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      arg1=msk_arg1*numpy.array([[-7.0, 2.0, -5.0, 6.0, 5.0], [-1.0, 7.0, 4.0, 6.0, 5.0], [-3.0, 1.0, -4.0, 3.0, 0.0], [7.0, 
+3.0, -6.0, -7.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -3.0, 5.0, -6.0, 6.0], [5.0, -4.0, -6.0, -7.0, 3.0], [6.0, 3.0, 
+-7.0, 7.0, -3.0], [-2.0, -1.0, -7.0, 1.0, 6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-94.0, -32.0, -32.0, 66.0, -16.0], [-18.0, 45.0, -76.0, 57.0, 39.0], [-61.0, -50.0, -92.0, 
--78.0, 66.0], [59.0, -132.0, -37.0, -5.0, -14.0]], [[7.0, 33.0, -16.0, 40.0, -36.0], [12.0, -28.0, -45.0, 25.0, 15.0], [-61.0, 
--31.0, -15.0, -96.0, -8.0], [39.0, -25.0, 47.0, -24.0, -93.0]], [[-34.0, 20.0, -39.0, -15.0, -23.0], [19.0, -18.0, 19.0, -29.0, 
--22.0], [-51.0, -40.0, -2.0, -46.0, 26.0], [13.0, 9.0, 17.0, -4.0, -8.0]], [[40.0, -5.0, 1.0, -74.0, 41.0], [-2.0, 17.0, 92.0, 
--88.0, -34.0], [27.0, 45.0, 36.0, 119.0, -36.0], [-34.0, 110.0, 5.0, 4.0, 21.0]], [[10.0, -45.0, 67.0, 43.0, -10.0], [25.0, 
--2.0, -68.0, 49.0, 69.0], [30.0, 39.0, 8.0, 18.0, -4.0], [-3.0, -21.0, -19.0, 30.0, 76.0]]], [[[-13.0, -74.0, -30.0, -19.0, 
-76.0], [-49.0, 111.0, 40.0, 14.0, -19.0], [-43.0, -4.0, -75.0, 79.0, 26.0], [56.0, -50.0, -71.0, -58.0, -44.0]], [[-60.0, -6.0, 
--32.0, -25.0, 25.0], [-45.0, 17.0, 36.0, 53.0, -73.0], [67.0, -52.0, -8.0, -11.0, 72.0], [-33.0, -91.0, -88.0, -2.0, 79.0]], 
-[[-15.0, -13.0, 24.0, 79.0, 4.0], [-44.0, 47.0, -91.0, 22.0, 83.0], [22.0, 45.0, -70.0, 10.0, -30.0], [16.0, -62.0, 7.0, 24.0, 
--53.0]], [[-62.0, 7.0, -33.0, 25.0, 17.0], [-68.0, 37.0, -18.0, 46.0, -23.0], [49.0, -31.0, -55.0, -27.0, 40.0], [-10.0, 
--111.0, -52.0, 3.0, -5.0]], [[57.0, -2.0, 24.0, -5.0, 28.0], [-23.0, -2.0, 10.0, 63.0, -30.0], [52.0, 6.0, 25.0, 11.0, -16.0], 
-[-13.0, -22.0, -26.0, -31.0, -16.0]]], [[[-30.0, 1.0, -25.0, 44.0, 20.0], [-67.0, 41.0, -38.0, 80.0, -13.0], [21.0, -33.0, 
--63.0, -48.0, 26.0], [20.0, -126.0, -43.0, -28.0, -62.0]], [[87.0, -27.0, -2.0, -36.0, 72.0], [-36.0, 60.0, 61.0, -1.0, -33.0], 
-[-19.0, 29.0, -11.0, 86.0, -48.0], [33.0, 35.0, -9.0, -74.0, -111.0]], [[-24.0, -7.0, 17.0, -6.0, -48.0], [75.0, -41.0, -12.0, 
--62.0, 45.0], [-47.0, 11.0, 31.0, -4.0, 6.0], [-2.0, 74.0, 39.0, 46.0, 80.0]], [[-38.0, -13.0, -36.0, -68.0, 5.0], [28.0, -4.0, 
-79.0, -46.0, -57.0], [-29.0, -37.0, 24.0, 20.0, 50.0], [-8.0, 38.0, -28.0, -2.0, 78.0]], [[74.0, -43.0, 31.0, -15.0, 48.0], 
-[-7.0, 35.0, 22.0, 32.0, -4.0], [-1.0, 31.0, 8.0, 66.0, -30.0], [22.0, 17.0, -22.0, -47.0, -34.0]]], [[[60.0, 42.0, 6.0, 32.0, 
-16.0], [-54.0, 3.0, -24.0, 35.0, -3.0], [41.0, 20.0, -12.0, -16.0, -58.0], [-3.0, -24.0, 29.0, -27.0, -126.0]], [[29.0, 0.0, 
-11.0, -52.0, 25.0], [-4.0, -17.0, 61.0, 15.0, -61.0], [66.0, -2.0, 55.0, 39.0, 8.0], [-45.0, 21.0, -38.0, -6.0, 66.0]], [[7.0, 
-35.0, -9.0, 48.0, -24.0], [-14.0, -18.0, -52.0, 42.0, 13.0], [-18.0, -21.0, -21.0, -83.0, -12.0], [22.0, -49.0, 31.0, -17.0, 
--88.0]], [[-16.0, -1.0, -49.0, -21.0, 3.0], [8.0, 19.0, 34.0, -34.0, -23.0], [-89.0, -35.0, -27.0, -19.0, 16.0], [46.0, 13.0, 
-14.0, -37.0, -63.0]], [[13.0, 27.0, -7.0, 30.0, -17.0], [-9.0, -27.0, -32.0, 71.0, -17.0], [-5.0, -39.0, 0.0, -88.0, 8.0], 
-[15.0, -61.0, 4.0, -30.0, -55.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, 18.0, 45.0, -58.0, -88.0], [-35.0, 67.0, 3.0, -5.0, 
--2.0], [-13.0, -29.0, 42.0, -14.0, -55.0], [-44.0, 28.0, -17.0, 38.0, 26.0]], [[69.0, 39.0, -61.0, 32.0, 85.0], [-1.0, -2.0, 
--1.0, 20.0, 45.0], [17.0, 67.0, -38.0, 28.0, 106.0], [64.0, -41.0, -18.0, -88.0, -74.0]], [[12.0, 42.0, 0.0, -26.0, -58.0], 
-[-86.0, 120.0, -16.0, 24.0, 28.0], [-64.0, 38.0, -24.0, -8.0, 54.0], [22.0, 11.0, 13.0, -48.0, -12.0]], [[-55.0, -43.0, 62.0, 
--49.0, -81.0], [-6.0, 7.0, 41.0, -44.0, -22.0], [49.0, -73.0, 32.0, -29.0, -86.0], [-100.0, -6.0, -19.0, 74.0, 76.0]], [[15.0, 
-9.0, -26.0, 6.0, 8.0], [-56.0, 44.0, 27.0, -4.0, 47.0], [24.0, 18.0, -57.0, -11.0, 83.0], [-5.0, -61.0, 13.0, -79.0, 0.0]]], 
-[[[-49.0, -12.0, -30.0, 23.0, 13.0], [-18.0, 24.0, 24.0, -45.0, -31.0], [33.0, 116.0, -63.0, 12.0, 44.0], [58.0, -40.0, -43.0, 
--8.0, 50.0]], [[14.0, 32.0, 12.0, -38.0, -2.0], [32.0, -20.0, 20.0, -14.0, 14.0], [66.0, -24.0, 62.0, 12.0, -52.0], [-32.0, 
--6.0, -56.0, 24.0, -12.0]], [[-75.0, -3.0, 7.0, 11.0, -22.0], [25.0, -25.0, -25.0, -12.0, -56.0], [-28.0, 22.0, 19.0, 0.0, 
--79.0], [33.0, 44.0, 14.0, 57.0, 58.0]], [[18.0, -11.0, 34.0, 3.0, -14.0], [36.0, -48.0, -56.0, 55.0, -10.0], [-89.0, -111.0, 
-59.0, -14.0, -72.0], [-29.0, 82.0, 79.0, 41.0, -32.0]], [[61.0, -76.0, 11.0, 22.0, 0.0], [-59.0, 51.0, 9.0, 21.0, 20.0], 
-[-57.0, -23.0, -88.0, -22.0, 127.0], [-32.0, -25.0, 44.0, -44.0, -38.0]]], [[[-3.0, -42.0, -27.0, 47.0, 31.0], [-25.0, 14.0, 
-1.0, -5.0, -15.0], [-28.0, 64.0, -85.0, 0.0, 88.0], [45.0, -25.0, 19.0, -33.0, 6.0]], [[36.0, -20.0, 4.0, 31.0, 12.0], [4.0, 
--7.0, -57.0, 56.0, -11.0], [-113.0, -28.0, -8.0, -3.0, 22.0], [27.0, 61.0, 70.0, -1.0, -50.0]], [[10.0, 60.0, -19.0, -32.0, 
--19.0], [-45.0, 86.0, 16.0, -14.0, 22.0], [27.0, 91.0, -7.0, 19.0, 43.0], [39.0, -24.0, -69.0, -35.0, -10.0]], [[-2.0, 42.0, 
-34.0, -62.0, -92.0], [-62.0, 110.0, -6.0, 8.0, 12.0], [-36.0, 4.0, 30.0, -8.0, -18.0], [-18.0, 30.0, -22.0, 10.0, 4.0]], 
-[[23.0, 62.0, 21.0, -56.0, -62.0], [-37.0, 89.0, -19.0, 21.0, 16.0], [-37.0, 15.0, 48.0, 8.0, -17.0], [6.0, 41.0, -34.0, 6.0, 
--30.0]]], [[[-32.0, 51.0, -2.0, -18.0, -34.0], [-18.0, 25.0, -17.0, 9.0, 9.0], [-16.0, -1.0, 29.0, -5.0, -44.0], [12.0, 20.0, 
-18.0, -8.0, 22.0]], [[15.0, -1.0, 32.0, -53.0, -17.0], [34.0, -1.0, 43.0, -42.0, -12.0], [89.0, 5.0, 54.0, 19.0, -44.0], 
-[-44.0, -13.0, -112.0, 64.0, -4.0]], [[-47.0, 70.0, -54.0, 3.0, 61.0], [50.0, -76.0, 42.0, -49.0, 23.0], [149.0, 44.0, 31.0, 
-22.0, -50.0], [24.0, -70.0, -57.0, -30.0, 42.0]], [[-85.0, -76.0, -7.0, 62.0, 19.0], [23.0, -73.0, -2.0, -25.0, -56.0], [-13.0, 
--4.0, -55.0, -21.0, -24.0], [10.0, -6.0, 67.0, 28.0, 84.0]], [[7.0, -44.0, -29.0, 59.0, 96.0], [75.0, -128.0, 8.0, -7.0, -9.0], 
-[46.0, -27.0, -16.0, 7.0, 3.0], [3.0, -29.0, 23.0, -3.0, -8.0]]]])
+      ref=msk_ref*numpy.array([[[-7.0, 2.0, -5.0, 6.0, 5.0], [-1.0, 7.0, 4.0, 6.0, 5.0], [-3.0, 1.0, -4.0, 3.0, 0.0], [7.0, 
+3.0, -6.0, -7.0, -6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, -3.0, 5.0, -6.0, 6.0], [5.0, -4.0, -6.0, -7.0, 3.0], [6.0, 3.0, -7.0, 7.0, -3.0], 
+[-2.0, -1.0, -7.0, 1.0, 6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[7.0, 7.0], [-1.0, -5.0]], [[-6.0, -6.0], [4.0, -3.0]], [[-4.0, -6.0], [-4.0, 7.0]], [[-3.0, 
--7.0], [-6.0, 0.0]], [[-4.0, 6.0], [0.0, -2.0]], [[-4.0, 1.0], [-5.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, 5.0], [7.0, 
--1.0]], [[6.0, 7.0], [-2.0, 5.0]], [[3.0, 5.0], [0.0, -2.0]], [[5.0, 0.0], [-1.0, -6.0]], [[6.0, 4.0], [5.0, 0.0]], [[-3.0, 
-0.0], [7.0, 7.0]]])
-      arg1=-5.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-5.0, 6.0], [1.0, -5.0], [0.0, 2.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, 0.0, -7.0, 0.0, -7.0], [7.0, -2.0, -2.0, -2.0, 0.0], [6.0, -1.0, 0.0, -6.0, 4.0], 
+[-5.0, 6.0, 2.0, -5.0, 2.0]], [[-6.0, -1.0, -5.0, -5.0, 0.0], [0.0, -3.0, 4.0, -3.0, 2.0], [-3.0, -5.0, 6.0, -4.0, 5.0], [6.0, 
+-4.0, -4.0, -7.0, 1.0]], [[2.0, -4.0, -4.0, -2.0, 0.0], [2.0, 0.0, -5.0, 0.0, 7.0], [4.0, 2.0, 7.0, -2.0, -4.0], [6.0, 7.0, 
+7.0, 1.0, -1.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, 1.0, -7.0, 0.0, -7.0], [0.0, -1.0, -3.0, -3.0, 6.0], [2.0, 6.0, 0.0, 0.0, 
+7.0], [7.0, 0.0, 0.0, 5.0, 0.0]], [[-4.0, -4.0, 5.0, -4.0, -7.0], [3.0, 7.0, -7.0, 0.0, 5.0], [-2.0, 4.0, -4.0, -6.0, 5.0], 
+[-6.0, -3.0, 3.0, 0.0, 0.0]], [[-4.0, -5.0, 5.0, 5.0, -6.0], [-7.0, 1.0, 0.0, -6.0, 7.0], [-5.0, -1.0, 5.0, -7.0, 5.0], [-4.0, 
+6.0, -5.0, -7.0, -5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-35.0, -35.0], [5.0, 25.0]], [[30.0, 30.0], [-20.0, 15.0]], [[20.0, 30.0], [20.0, -35.0]], 
-[[15.0, 35.0], [30.0, -0.0]], [[20.0, -30.0], [-0.0, 10.0]], [[20.0, -5.0], [25.0, -25.0]]])+(1.-msk_ref)*numpy.array([[[-5.0, 
--25.0], [-35.0, 5.0]], [[-30.0, -35.0], [10.0, -25.0]], [[-15.0, -25.0], [-0.0, 10.0]], [[-25.0, -0.0], [5.0, 30.0]], [[-30.0, 
--20.0], [-25.0, -0.0]], [[15.0, -0.0], [-35.0, -35.0]]])
+      ref=msk_ref*numpy.array([[[-6.0, -1.0, 30.0, -5.0, 35.0], [-35.0, 7.0, 14.0, 7.0, 2.0], [-33.0, 0.0, 6.0, 26.0, -15.0], 
+[31.0, -34.0, -14.0, 18.0, -9.0]], [[34.0, -3.0, -25.0, 21.0, -42.0], [46.0, 3.0, -42.0, 3.0, 4.0], [59.0, 23.0, -16.0, -20.0, 
+-9.0], [-48.0, 70.0, 46.0, 7.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[16.0, -9.0, 40.0, -4.0, 28.0], [3.0, 12.0, 8.0, 15.0, 
+-25.0], [-12.0, -26.0, -4.0, -6.0, -30.0], [-41.0, -3.0, 3.0, -25.0, 0.0]], [[-12.0, 16.0, -57.0, 30.0, -19.0], [-29.0, -39.0, 
+17.0, -30.0, 25.0], [12.0, 14.0, 30.0, 16.0, 27.0], [64.0, 27.0, -25.0, 16.0, -10.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, -1.0], [-4.0, 5.0]], [[-3.0, 5.0], [6.0, 2.0]], [[0.0, -2.0], [2.0, 3.0]], [[6.0, 
-7.0], [2.0, 5.0]], [[0.0, 4.0], [1.0, 3.0]], [[-5.0, 0.0], [-6.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -6.0], [-6.0, 
--4.0]], [[-2.0, -2.0], [7.0, -5.0]], [[5.0, 3.0], [2.0, 1.0]], [[1.0, 0.0], [0.0, 2.0]], [[-5.0, -7.0], [4.0, 7.0]], [[3.0, 
--4.0], [5.0, -2.0]]])
-      arg1=numpy.array(6.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[0.0, -6.0], [0.0, -7.0], [4.0, 3.0]], [[-2.0, -5.0], [-3.0, 1.0], [-6.0, 
+0.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, -1.0, -6.0, 1.0], [-5.0, 0.0, -7.0, -2.0, -4.0], [6.0, 5.0, 0.0, 0.0, -6.0], 
+[-4.0, -3.0, 6.0, 0.0, -4.0]], [[-6.0, 2.0, -7.0, 2.0, 0.0], [6.0, -5.0, -1.0, 3.0, -2.0], [6.0, 6.0, -5.0, -4.0, -3.0], [6.0, 
+-5.0, 0.0, 3.0, 5.0]], [[3.0, -6.0, -3.0, 0.0, -1.0], [-2.0, -3.0, 5.0, -7.0, 2.0], [5.0, -4.0, 1.0, 0.0, -1.0], [5.0, -4.0, 
+5.0, 3.0, -2.0]]], [[[6.0, -5.0, -5.0, -6.0, 0.0], [-6.0, 3.0, 6.0, -5.0, 6.0], [-5.0, 7.0, 2.0, 5.0, -2.0], [1.0, -3.0, -2.0, 
+4.0, -7.0]], [[7.0, 5.0, 1.0, -4.0, -3.0], [-5.0, 5.0, 0.0, -6.0, 0.0], [0.0, 0.0, -6.0, -6.0, 2.0], [-2.0, -5.0, -5.0, 1.0, 
+2.0]], [[2.0, -6.0, -6.0, 1.0, 6.0], [7.0, 3.0, -4.0, -4.0, -1.0], [-6.0, -4.0, 4.0, -2.0, -7.0], [-1.0, 1.0, 3.0, -5.0, 
+-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 3.0, 3.0, 1.0, -4.0], [3.0, 6.0, 5.0, 0.0, 2.0], [2.0, -4.0, -3.0, -6.0, -2.0], 
+[-1.0, 4.0, -4.0, 0.0, 0.0]], [[3.0, 7.0, 0.0, 4.0, 0.0], [6.0, -1.0, -3.0, -6.0, 7.0], [1.0, 0.0, -6.0, -7.0, 4.0], [5.0, 5.0, 
+3.0, -5.0, -5.0]], [[3.0, 1.0, 1.0, 2.0, -7.0], [6.0, 1.0, -5.0, 5.0, 4.0], [6.0, -5.0, -4.0, 3.0, -4.0], [5.0, 3.0, -1.0, 1.0, 
+0.0]]], [[[-2.0, -6.0, 2.0, 2.0, 5.0], [-2.0, 0.0, 0.0, -4.0, 5.0], [5.0, -7.0, 6.0, -3.0, -2.0], [3.0, 4.0, 3.0, 2.0, 7.0]], 
+[[-7.0, -6.0, 3.0, 4.0, -3.0], [-6.0, 3.0, -5.0, 6.0, 4.0], [6.0, -1.0, 3.0, 0.0, -2.0], [-6.0, 0.0, 6.0, 6.0, 6.0]], [[4.0, 
+-4.0, -7.0, 3.0, 0.0], [-1.0, -6.0, -7.0, 5.0, 6.0], [-7.0, 4.0, 0.0, 4.0, -6.0], [-1.0, -5.0, -7.0, 3.0, -7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, -6.0], [-24.0, 30.0]], [[-18.0, 30.0], [36.0, 12.0]], [[0.0, -12.0], [12.0, 18.0]], 
-[[36.0, 42.0], [12.0, 30.0]], [[0.0, 24.0], [6.0, 18.0]], [[-30.0, 0.0], [-36.0, 6.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 
--36.0], [-36.0, -24.0]], [[-12.0, -12.0], [42.0, -30.0]], [[30.0, 18.0], [12.0, 6.0]], [[6.0, 0.0], [0.0, 12.0]], [[-30.0, 
--42.0], [24.0, 42.0]], [[18.0, -24.0], [30.0, -12.0]]])
+      ref=msk_ref*numpy.array([[[-33.0, 7.0, 31.0, 18.0, -31.0], [-23.0, -51.0, 32.0, 24.0, 2.0], [66.0, -6.0, -6.0, 20.0, 
+36.0], [30.0, -1.0, 21.0, 31.0, 30.0]], [[28.0, -2.0, 72.0, 48.0, -12.0], [7.0, 16.0, 34.0, -11.0, 14.0], [-38.0, -119.0, 22.0, 
+-3.0, 66.0], [-10.0, 51.0, -16.0, -31.0, 20.0]]])+(1.-msk_ref)*numpy.array([[[13.0, 58.0, 33.0, -26.0, -29.0], [52.0, 31.0, 
+37.0, -20.0, -42.0], [38.0, -27.0, -37.0, -6.0, 30.0], [38.0, 34.0, 14.0, -36.0, 10.0]], [[21.0, -40.0, -22.0, -34.0, -25.0], 
+[-38.0, -23.0, -29.0, 83.0, -70.0], [-20.0, 43.0, 21.0, 109.0, -20.0], [-35.0, -70.0, -9.0, 34.0, 6.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, -7.0, 2.0], [-2.0, -4.0, 1.0]], [[3.0, -4.0, 3.0], [5.0, 5.0, -2.0]]], [[[7.0, -7.0, 
--6.0], [3.0, -2.0, 0.0]], [[-3.0, -3.0, -4.0], [6.0, 2.0, -2.0]]], [[[1.0, -6.0, -3.0], [6.0, -1.0, -7.0]], [[-7.0, 6.0, -5.0], 
-[-7.0, 6.0, 2.0]]], [[[-4.0, 5.0, 7.0], [2.0, 1.0, -3.0]], [[2.0, 0.0, -4.0], [7.0, -4.0, -2.0]]], [[[4.0, -1.0, -4.0], [-6.0, 
--5.0, 4.0]], [[-6.0, 0.0, -7.0], [-5.0, 7.0, 0.0]]], [[[2.0, 0.0, 1.0], [7.0, -7.0, 6.0]], [[0.0, -3.0, 7.0], [3.0, 4.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, -5.0, -3.0], [-1.0, 0.0, 7.0]], [[1.0, 1.0, 3.0], [2.0, -1.0, -6.0]]], [[[-6.0, 
-6.0, 3.0], [-4.0, 7.0, 0.0]], [[-1.0, 7.0, -3.0], [4.0, 7.0, -6.0]]], [[[0.0, -2.0, -7.0], [-5.0, 1.0, 5.0]], [[4.0, -2.0, 
-0.0], [5.0, 6.0, -6.0]]], [[[4.0, 7.0, 7.0], [0.0, 0.0, 3.0]], [[-7.0, -2.0, -5.0], [6.0, -5.0, 7.0]]], [[[-1.0, 0.0, -2.0], 
-[-2.0, 7.0, 2.0]], [[0.0, 5.0, -2.0], [-4.0, 5.0, 1.0]]], [[[3.0, -3.0, -4.0], [-3.0, 0.0, 1.0]], [[2.0, 3.0, -7.0], [0.0, 
--5.0, 3.0]]]])
-      arg1=numpy.array([-1.0, 0.0, -7.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank3_offset0(self):
+      arg0=Data(numpy.array([0.0, -6.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-5.0, -4.0], [-1.0, -2.0]], [[6.0, 0.0], [0.0, 4.0]], [[-2.0, -6.0], [-1.0, -5.0]], [[-4.0, 
+3.0], [0.0, 7.0]], [[3.0, 1.0], [0.0, 0.0]], [[-7.0, -2.0], [7.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 4.0], [5.0, 
+-7.0]], [[1.0, -7.0], [4.0, -7.0]], [[-3.0, -1.0], [-5.0, -2.0]], [[-4.0, 6.0], [-2.0, 4.0]], [[0.0, 2.0], [-2.0, 1.0]], [[7.0, 
+5.0], [-7.0, 4.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-14.0, -5.0], [-24.0, 9.0]], [[35.0, -3.0], [31.0, 8.0]], [[20.0, 43.0], [42.0, -7.0]], 
-[[-45.0, 19.0], [26.0, 7.0]], [[24.0, -22.0], [55.0, 5.0]], [[-9.0, -49.0], [-49.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[28.0, 
--48.0], [-22.0, 40.0]], [[-15.0, 4.0], [22.0, 38.0]], [[49.0, -30.0], [-4.0, 37.0]], [[-53.0, -21.0], [42.0, -55.0]], [[15.0, 
--12.0], [14.0, -3.0]], [[25.0, -4.0], [47.0, -21.0]]])
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[30.0, 24.0], [6.0, 12.0]], [[-36.0, 0.0], [0.0, -24.0]], 
+[[12.0, 36.0], [6.0, 30.0]], [[24.0, -18.0], [0.0, -42.0]], [[-18.0, -6.0], [0.0, 0.0]], [[42.0, 12.0], [-42.0, 
+-12.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[42.0, -24.0], [-30.0, 42.0]], [[-6.0, 42.0], [-24.0, 
+42.0]], [[18.0, 6.0], [30.0, 12.0]], [[24.0, -36.0], [12.0, -24.0]], [[0.0, -12.0], [12.0, -6.0]], [[-42.0, -30.0], [42.0, 
+-24.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, 0.0], [-5.0, 1.0]], [[6.0, 5.0], [6.0, -6.0]], [[1.0, -6.0], [7.0, -7.0]], [[0.0, 
--5.0], [-5.0, -1.0]], [[-6.0, 6.0], [0.0, -2.0]], [[3.0, -4.0], [0.0, 2.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, -5.0], [-2.0, 
-4.0]], [[0.0, 6.0], [6.0, 6.0]], [[1.0, 1.0], [6.0, -2.0]], [[-3.0, -7.0], [6.0, -5.0]], [[2.0, 6.0], [-7.0, -3.0]], [[7.0, 
-2.0], [-6.0, 1.0]]])
-      arg1=numpy.array([6.0, -6.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[0.0, 3.0], [-7.0, 7.0], [0.0, 4.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[6.0, 6.0], [2.0, 1.0]], [[-5.0, 4.0], [0.0, -7.0]], [[-2.0, 3.0], [-6.0, 2.0]], [[-1.0, 
+-5.0], [6.0, 6.0]], [[1.0, 1.0], [-2.0, -3.0]], [[-7.0, -5.0], [-6.0, -6.0]]], [[[1.0, 3.0], [-2.0, 2.0]], [[-6.0, 0.0], [-1.0, 
+-1.0]], [[-5.0, -4.0], [-2.0, 3.0]], [[-6.0, 4.0], [5.0, -7.0]], [[-4.0, 5.0], [-4.0, 5.0]], [[-6.0, -6.0], [-3.0, -1.0]]], 
+[[[-2.0, -5.0], [7.0, 2.0]], [[4.0, 0.0], [0.0, 5.0]], [[4.0, 7.0], [-3.0, 1.0]], [[5.0, -3.0], [-3.0, -6.0]], [[6.0, 5.0], 
+[4.0, 5.0]], [[4.0, -7.0], [-1.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 1.0], [-7.0, 5.0]], [[7.0, 0.0], [-7.0, 4.0]], 
+[[1.0, 4.0], [0.0, 7.0]], [[1.0, -6.0], [1.0, -6.0]], [[0.0, -7.0], [-5.0, 1.0]], [[-2.0, -1.0], [-6.0, 1.0]]], [[[-5.0, 5.0], 
+[2.0, 7.0]], [[2.0, 1.0], [4.0, -1.0]], [[-1.0, 5.0], [0.0, 7.0]], [[-3.0, -1.0], [4.0, 0.0]], [[7.0, -6.0], [-7.0, 7.0]], 
+[[2.0, 1.0], [3.0, -2.0]]], [[[-7.0, 4.0], [7.0, 5.0]], [[-7.0, -3.0], [-2.0, -6.0]], [[0.0, 2.0], [-3.0, -6.0]], [[7.0, 5.0], 
+[0.0, 5.0]], [[3.0, 1.0], [4.0, -4.0]], [[4.0, -2.0], [-4.0, 1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-6.0, 6.0], [0.0, 0.0]], [[-30.0, 30.0], [6.0, -6.0]]], [[[36.0, -36.0], [30.0, -30.0]], 
-[[36.0, -36.0], [-36.0, 36.0]]], [[[6.0, -6.0], [-36.0, 36.0]], [[42.0, -42.0], [-42.0, 42.0]]], [[[0.0, 0.0], [-30.0, 30.0]], 
-[[-30.0, 30.0], [-6.0, 6.0]]], [[[-36.0, 36.0], [36.0, -36.0]], [[0.0, 0.0], [-12.0, 12.0]]], [[[18.0, -18.0], [-24.0, 24.0]], 
-[[0.0, 0.0], [12.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[36.0, -36.0], [-30.0, 30.0]], [[-12.0, 12.0], [24.0, -24.0]]], 
-[[[0.0, 0.0], [36.0, -36.0]], [[36.0, -36.0], [36.0, -36.0]]], [[[6.0, -6.0], [6.0, -6.0]], [[36.0, -36.0], [-12.0, 12.0]]], 
-[[[-18.0, 18.0], [-42.0, 42.0]], [[36.0, -36.0], [-30.0, 30.0]]], [[[12.0, -12.0], [36.0, -36.0]], [[-42.0, 42.0], [-18.0, 
-18.0]]], [[[42.0, -42.0], [12.0, -12.0]], [[-36.0, 36.0], [6.0, -6.0]]]])
+      ref=msk_ref*numpy.array([[[[-7.0, -21.0], [14.0, -14.0]], [[42.0, 0.0], [7.0, 7.0]], [[35.0, 28.0], [14.0, -21.0]], 
+[[42.0, -28.0], [-35.0, 49.0]], [[28.0, -35.0], [28.0, -35.0]], [[42.0, 42.0], [21.0, 7.0]]], [[[17.0, 19.0], [20.0, 25.0]], 
+[[-41.0, 12.0], [-7.0, -8.0]], [[-25.0, 9.0], [-44.0, 31.0]], [[-25.0, 1.0], [41.0, -55.0]], [[-1.0, 58.0], [-18.0, 46.0]], 
+[[-47.0, -85.0], [-43.0, -25.0]]]])+(1.-msk_ref)*numpy.array([[[[35.0, -35.0], [-14.0, -49.0]], [[-14.0, -7.0], [-28.0, 7.0]], 
+[[7.0, -35.0], [0.0, -49.0]], [[21.0, 7.0], [-28.0, 0.0]], [[-49.0, 42.0], [49.0, -49.0]], [[-14.0, -7.0], [-21.0, 14.0]]], 
+[[[-54.0, 54.0], [21.0, 84.0]], [[7.0, -5.0], [-1.0, -19.0]], [[-4.0, 55.0], [-12.0, 46.0]], [[10.0, -5.0], [31.0, 2.0]], 
+[[61.0, -59.0], [-48.0, 36.0]], [[24.0, -4.0], [-13.0, -7.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -7.0, 4.0], [-6.0, -1.0, -5.0]], [[-1.0, 6.0, 1.0], [6.0, -3.0, 3.0]]], [[[-7.0, 7.0, 
--6.0], [-1.0, -2.0, 5.0]], [[7.0, -6.0, -4.0], [0.0, -6.0, 3.0]]], [[[-1.0, 3.0, 0.0], [-3.0, 3.0, 3.0]], [[0.0, 7.0, 5.0], 
-[5.0, 5.0, 2.0]]], [[[5.0, -3.0, -1.0], [5.0, 4.0, -6.0]], [[-2.0, -5.0, 6.0], [6.0, 7.0, -2.0]]], [[[-6.0, 4.0, 1.0], [3.0, 
--3.0, 7.0]], [[2.0, -5.0, 0.0], [0.0, 0.0, -1.0]]], [[[0.0, 3.0, 1.0], [3.0, 5.0, 6.0]], [[-5.0, -2.0, -6.0], [4.0, 0.0, 
--6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 6.0, 7.0], [0.0, 0.0, 4.0]], [[-2.0, -5.0, 5.0], [1.0, -7.0, 4.0]]], [[[-5.0, 
-5.0, -1.0], [7.0, 0.0, 2.0]], [[2.0, 0.0, -2.0], [-3.0, 5.0, -1.0]]], [[[5.0, 3.0, -7.0], [-1.0, 0.0, 0.0]], [[-7.0, 3.0, 
--5.0], [7.0, -1.0, 0.0]]], [[[0.0, 4.0, 2.0], [2.0, 1.0, -2.0]], [[7.0, 2.0, -6.0], [-2.0, -4.0, 3.0]]], [[[3.0, -2.0, 0.0], 
-[7.0, -4.0, -2.0]], [[-1.0, -1.0, -4.0], [-3.0, 1.0, 0.0]]], [[[-4.0, 4.0, -3.0], [-1.0, -3.0, -2.0]], [[-7.0, -2.0, 7.0], 
-[-6.0, -5.0, 3.0]]]])
-      arg1=numpy.array([[0.0, -1.0], [5.0, -3.0], [-7.0, -5.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-63.0, -5.0], [30.0, 34.0]], [[23.0, -22.0], [-36.0, -12.0]]], [[[77.0, 16.0], [-45.0, 
--18.0]], [[-2.0, 31.0], [-51.0, 3.0]]], [[[15.0, -8.0], [-6.0, -21.0]], [[0.0, -46.0], [11.0, -30.0]]], [[[-8.0, 9.0], [62.0, 
-13.0]], [[-67.0, -13.0], [49.0, -17.0]]], [[[13.0, -11.0], [-64.0, -29.0]], [[-25.0, 13.0], [7.0, 5.0]]], [[[8.0, -14.0], 
-[-17.0, -48.0]], [[32.0, 41.0], [42.0, 26.0]]]])+(1.-msk_ref)*numpy.array([[[[-19.0, -47.0], [-28.0, -20.0]], [[-60.0, -8.0], 
-[-63.0, 0.0]]], [[[32.0, -5.0], [-14.0, -17.0]], [[14.0, 8.0], [32.0, -7.0]]], [[[64.0, 21.0], [0.0, 1.0]], [[50.0, 23.0], 
-[-5.0, -4.0]]], [[[6.0, -22.0], [19.0, 5.0]], [[52.0, 17.0], [-41.0, -1.0]]], [[[-10.0, 3.0], [-6.0, 15.0]], [[23.0, 24.0], 
-[5.0, 0.0]]], [[[41.0, 7.0], [-1.0, 20.0]], [[-59.0, -22.0], [-46.0, 6.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[-3.0, 7.0, 6.0, 6.0, 2.0], [2.0, -6.0, -6.0, -3.0, 2.0], [7.0, -7.0, 4.0, 3.0, 5.0], [4.0, -5.0, 
+0.0, 6.0, 0.0]]),self.functionspace)
+      arg1=0.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, 0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 
+0.0, 0.0, 0.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, -4.0], [-2.0, 2.0]], [[-1.0, -2.0], [-2.0, 2.0]], [[-5.0, 4.0], [5.0, 7.0]], [[0.0, 
-0.0], [7.0, 4.0]], [[3.0, 3.0], [6.0, 0.0]], [[5.0, 3.0], [0.0, -7.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 0.0], [7.0, -6.0]], 
-[[7.0, 0.0], [4.0, 2.0]], [[-6.0, -7.0], [-2.0, 7.0]], [[6.0, -7.0], [2.0, 7.0]], [[1.0, 6.0], [-2.0, 4.0]], [[0.0, 2.0], 
-[-3.0, -5.0]]])
-      arg1=Data(-1.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-1.0, 4.0], [2.0, -2.0]], [[1.0, 2.0], [2.0, -2.0]], [[5.0, -4.0], [-5.0, -7.0]], [[-0.0, 
--0.0], [-7.0, -4.0]], [[-3.0, -3.0], [-6.0, -0.0]], [[-5.0, -3.0], [-0.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, -0.0], 
-[-7.0, 6.0]], [[-7.0, -0.0], [-4.0, -2.0]], [[6.0, 7.0], [2.0, -7.0]], [[-6.0, 7.0], [-2.0, -7.0]], [[-1.0, -6.0], [2.0, 
--4.0]], [[-0.0, -2.0], [3.0, 5.0]]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -5.0, 2.0, -4.0, -7.0], [-4.0, 6.0, -2.0, 7.0, 0.0], [6.0, 1.0, 7.0, 3.0, 7.0], [2.0, -2.0, 
+1.0, 3.0, -3.0]]),self.functionspace)
+      arg1=numpy.array(5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-35.0, -25.0, 10.0, -20.0, -35.0], [-20.0, 30.0, -10.0, 35.0, 0.0], [30.0, 5.0, 35.0, 15.0, 35.0], 
+[10.0, -10.0, 5.0, 15.0, -15.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorProduct(arg0,arg1,axis_offset=0)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, 0.0, 5.0], [3.0, -3.0, 4.0]], [[7.0, 5.0, -1.0], [-6.0, -2.0, 7.0]]], [[[7.0, 5.0, 
-4.0], [-6.0, 3.0, -4.0]], [[4.0, 0.0, 2.0], [1.0, -3.0, 0.0]]], [[[-6.0, 5.0, 5.0], [6.0, -3.0, 5.0]], [[5.0, -4.0, -2.0], 
-[4.0, 5.0, 2.0]]], [[[-6.0, 5.0, -7.0], [0.0, 2.0, -4.0]], [[1.0, -5.0, -1.0], [5.0, 7.0, -4.0]]], [[[6.0, -6.0, 6.0], [4.0, 
-4.0, 6.0]], [[-5.0, 7.0, 7.0], [0.0, -6.0, 2.0]]], [[[0.0, 7.0, 2.0], [0.0, -7.0, 0.0]], [[-1.0, 2.0, -4.0], [-6.0, 3.0, 
-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -5.0, -2.0], [1.0, 7.0, -6.0]], [[5.0, 6.0, 7.0], [0.0, -6.0, -4.0]]], [[[3.0, 
--6.0, -7.0], [0.0, 6.0, 0.0]], [[-5.0, 6.0, -1.0], [-4.0, 0.0, -2.0]]], [[[2.0, 3.0, -5.0], [3.0, 3.0, -4.0]], [[0.0, 7.0, 
--5.0], [-5.0, -7.0, 0.0]]], [[[4.0, 7.0, 4.0], [-2.0, 2.0, -3.0]], [[-2.0, -2.0, 0.0], [-2.0, 5.0, -2.0]]], [[[1.0, 3.0, 0.0], 
-[7.0, 4.0, 2.0]], [[6.0, 1.0, -2.0], [5.0, 3.0, -5.0]]], [[[2.0, 0.0, 0.0], [3.0, -1.0, -4.0]], [[-4.0, -2.0, 0.0], [0.0, -5.0, 
-2.0]]]])
-      arg1=Data(numpy.array([-4.0, 2.0, -6.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-58.0, -42.0], [-12.0, -22.0]], [[-42.0, 54.0], [-28.0, -10.0]], [[4.0, -60.0], [-16.0, 
--18.0]], [[76.0, 28.0], [-8.0, 18.0]], [[-72.0, -44.0], [-8.0, -24.0]], [[2.0, -14.0], [32.0, 
-6.0]]])+(1.-msk_ref)*numpy.array([[[-6.0, 46.0], [-50.0, 12.0]], [[18.0, 12.0], [38.0, 28.0]], [[28.0, 18.0], [44.0, 6.0]], 
-[[-26.0, 30.0], [4.0, 30.0]], [[2.0, -32.0], [-10.0, 16.0]], [[-8.0, 10.0], [12.0, -22.0]]])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-2.0, 4.0, -4.0, 7.0, 2.0], [-2.0, 0.0, 3.0, 2.0, -7.0], [4.0, 6.0, 6.0, 0.0, -1.0], [5.0, -7.0, 
+7.0, 6.0, 0.0]], [[-7.0, 0.0, 0.0, 6.0, -2.0], [0.0, -7.0, 4.0, 0.0, -7.0], [3.0, -2.0, 0.0, 1.0, 3.0], [7.0, -1.0, 1.0, -2.0, 
+0.0]], [[4.0, 3.0, 3.0, -1.0, 3.0], [2.0, 0.0, 2.0, 1.0, 0.0], [-2.0, 6.0, -4.0, 5.0, 1.0], [3.0, 0.0, 3.0, -5.0, 
+-1.0]]]),self.functionspace)
+      arg1=numpy.array([-3.0, 2.0, 1.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-4.0, -9.0, 15.0, -10.0, -7.0], [8.0, -14.0, 1.0, -5.0, 7.0], [-8.0, -16.0, -22.0, 7.0, 10.0], 
+[2.0, 19.0, -16.0, -27.0, -1.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -5.0], [-7.0, -5.0]], [[2.0, -6.0], [-3.0, 5.0]], [[-6.0, -2.0], [1.0, -3.0]], [[-7.0, 
-3.0], [0.0, -4.0]], [[-4.0, 3.0], [-3.0, 3.0]], [[2.0, -6.0], [-3.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -4.0], [-2.0, 
-7.0]], [[5.0, 0.0], [3.0, -6.0]], [[-1.0, -5.0], [4.0, -1.0]], [[-2.0, 6.0], [7.0, 5.0]], [[-5.0, -1.0], [4.0, -7.0]], [[6.0, 
--3.0], [0.0, -3.0]]])
-      arg1=Data(numpy.array([2.0, -4.0]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [-10.0, 20.0]], [[-14.0, 28.0], [-10.0, 20.0]]], [[[4.0, -8.0], [-12.0, 24.0]], 
-[[-6.0, 12.0], [10.0, -20.0]]], [[[-12.0, 24.0], [-4.0, 8.0]], [[2.0, -4.0], [-6.0, 12.0]]], [[[-14.0, 28.0], [6.0, -12.0]], 
-[[0.0, 0.0], [-8.0, 16.0]]], [[[-8.0, 16.0], [6.0, -12.0]], [[-6.0, 12.0], [6.0, -12.0]]], [[[4.0, -8.0], [-12.0, 24.0]], 
-[[-6.0, 12.0], [0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [-8.0, 16.0]], [[-4.0, 8.0], [14.0, -28.0]]], [[[10.0, 
--20.0], [0.0, 0.0]], [[6.0, -12.0], [-12.0, 24.0]]], [[[-2.0, 4.0], [-10.0, 20.0]], [[8.0, -16.0], [-2.0, 4.0]]], [[[-4.0, 
-8.0], [12.0, -24.0]], [[14.0, -28.0], [10.0, -20.0]]], [[[-10.0, 20.0], [-2.0, 4.0]], [[8.0, -16.0], [-14.0, 28.0]]], [[[12.0, 
--24.0], [-6.0, 12.0]], [[0.0, 0.0], [-6.0, 12.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-3.0, 7.0, -6.0, 5.0, 3.0], [-2.0, -2.0, 6.0, 3.0, 7.0], [4.0, -5.0, 4.0, 3.0, 0.0], [-6.0, 
+0.0, -5.0, 4.0, -6.0]], [[0.0, 2.0, -5.0, 3.0, 6.0], [-5.0, -2.0, -6.0, -6.0, 5.0], [4.0, -6.0, 5.0, -1.0, 1.0], [7.0, -1.0, 
+1.0, -3.0, 5.0]], [[-4.0, -1.0, -7.0, 4.0, 0.0], [-6.0, -5.0, -4.0, -3.0, -6.0], [-6.0, 0.0, -1.0, -3.0, -3.0], [5.0, -4.0, 
+4.0, 2.0, -4.0]]], [[[-6.0, 5.0, 6.0, 1.0, -2.0], [4.0, -3.0, -2.0, 2.0, -5.0], [-2.0, 1.0, -6.0, -4.0, -2.0], [-1.0, 7.0, 3.0, 
+0.0, 5.0]], [[4.0, 3.0, 7.0, 7.0, 6.0], [-6.0, -5.0, -5.0, -3.0, -2.0], [0.0, -1.0, 6.0, -5.0, 7.0], [0.0, 2.0, -7.0, -6.0, 
+2.0]], [[-1.0, -6.0, 7.0, 6.0, 6.0], [0.0, -3.0, 0.0, 6.0, -2.0], [-5.0, -2.0, 7.0, -1.0, 1.0], [-1.0, 0.0, -7.0, -7.0, 
+-6.0]]]]),self.functionspace)
+      arg1=numpy.array([[0.0, -5.0, 6.0], [3.0, -3.0, -4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-50.0, 14.0, -48.0, -33.0, -78.0], [19.0, -2.0, 15.0, 3.0, -62.0], [-42.0, 44.0, -95.0, -6.0, 
+-54.0], [-4.0, -4.0, 77.0, 73.0, -16.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, -6.0, 0.0], [4.0, -4.0, 7.0]], [[-7.0, -3.0, 5.0], [1.0, -2.0, 1.0]]], [[[2.0, 0.0, 
--3.0], [0.0, 0.0, 7.0]], [[5.0, 7.0, -4.0], [2.0, -1.0, 0.0]]], [[[1.0, 2.0, 6.0], [-2.0, 5.0, 7.0]], [[-3.0, -2.0, 3.0], 
-[-7.0, 4.0, -6.0]]], [[[-2.0, 7.0, 5.0], [4.0, -2.0, -6.0]], [[5.0, -4.0, -4.0], [5.0, -6.0, 2.0]]], [[[-4.0, 0.0, 7.0], [-3.0, 
-0.0, -3.0]], [[-4.0, -7.0, -7.0], [-1.0, 0.0, -6.0]]], [[[5.0, 1.0, -6.0], [0.0, 4.0, 1.0]], [[1.0, 4.0, -3.0], [3.0, 0.0, 
--3.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, -2.0, 7.0], [0.0, 2.0, -4.0]], [[-4.0, 0.0, 2.0], [0.0, 4.0, 5.0]]], [[[-1.0, 6.0, 
--3.0], [0.0, -1.0, -1.0]], [[-3.0, 5.0, 6.0], [-1.0, 7.0, 3.0]]], [[[-6.0, 1.0, -3.0], [0.0, -4.0, -7.0]], [[1.0, -4.0, -7.0], 
-[4.0, 7.0, -4.0]]], [[[1.0, 0.0, -7.0], [3.0, 0.0, 6.0]], [[-2.0, -1.0, 0.0], [-4.0, 0.0, 2.0]]], [[[7.0, 4.0, -5.0], [0.0, 
--5.0, 2.0]], [[-3.0, 1.0, -5.0], [-6.0, 7.0, 2.0]]], [[[7.0, 3.0, 7.0], [-3.0, 0.0, 1.0]], [[0.0, 2.0, 0.0], [-3.0, -6.0, 
-4.0]]]])
-      arg1=Data(numpy.array([[4.0, -4.0], [-6.0, 1.0], [5.0, -7.0]]),self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[8.0, 22.0], [75.0, -69.0]], [[15.0, -10.0], [21.0, -13.0]]], [[[-7.0, 13.0], [35.0, -49.0]], 
-[[-42.0, 15.0], [14.0, -9.0]]], [[[22.0, -44.0], [-3.0, -36.0]], [[15.0, -11.0], [-82.0, 74.0]]], [[[-25.0, -20.0], [-2.0, 
-24.0]], [[24.0, 4.0], [66.0, -40.0]]], [[[19.0, -33.0], [-27.0, 33.0]], [[-9.0, 58.0], [-34.0, 46.0]]], [[[-16.0, 23.0], 
-[-19.0, -3.0]], [[-35.0, 21.0], [-3.0, 9.0]]]])+(1.-msk_ref)*numpy.array([[[[59.0, -63.0], [-32.0, 30.0]], [[-6.0, 2.0], [1.0, 
--31.0]]], [[[-55.0, 31.0], [1.0, 6.0]], [[-12.0, -25.0], [-31.0, -10.0]]], [[[-45.0, 46.0], [-11.0, 45.0]], [[-7.0, 41.0], 
-[-46.0, 19.0]]], [[[-31.0, 45.0], [42.0, -54.0]], [[-2.0, 7.0], [-6.0, 2.0]]], [[[-21.0, 11.0], [40.0, -19.0]], [[-43.0, 48.0], 
-[-56.0, 17.0]]], [[[45.0, -74.0], [-7.0, 5.0]], [[-12.0, 2.0], [44.0, -22.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[-5.0, -2.0, 3.0, 1.0, -6.0], [-6.0, 0.0, 4.0, 3.0, 0.0], [-4.0, 5.0, 3.0, 7.0, 1.0], [-7.0, -5.0, 
+0.0, -5.0, -6.0]]),self.functionspace)
+      arg1=numpy.array([-7.0, -5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[35.0, 25.0], [14.0, 10.0], [-21.0, -15.0], [-7.0, -5.0], [42.0, 30.0]], [[42.0, 30.0], [0.0, 
+0.0], [-28.0, -20.0], [-21.0, -15.0], [0.0, 0.0]], [[28.0, 20.0], [-35.0, -25.0], [-21.0, -15.0], [-49.0, -35.0], [-7.0, 
+-5.0]], [[49.0, 35.0], [35.0, 25.0], [0.0, 0.0], [35.0, 25.0], [42.0, 30.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[7.0, 6.0], [5.0, 1.0]], [[-6.0, -1.0], [-6.0, -2.0]], [[2.0, -4.0], [0.0, 4.0]], [[6.0, 
-3.0], [7.0, 6.0]], [[-5.0, 4.0], [-2.0, -6.0]], [[-5.0, -5.0], [6.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 0.0], [1.0, 
-3.0]], [[4.0, -7.0], [-4.0, 7.0]], [[-2.0, 0.0], [-5.0, -5.0]], [[2.0, -2.0], [-3.0, 0.0]], [[4.0, -5.0], [6.0, 5.0]], [[1.0, 
-1.0], [3.0, -1.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(2.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[7.0, 6.0], [5.0, 1.0]], [[-6.0, -1.0], [-6.0, -2.0]], [[2.0, -4.0], [0.0, 4.0]], [[6.0, 3.0], 
-[7.0, 6.0]], [[-5.0, 4.0], [-2.0, -6.0]], [[-5.0, -5.0], [6.0, -5.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [2.0, 6.0]], 
-[[8.0, -14.0], [-8.0, 14.0]], [[-4.0, 0.0], [-10.0, -10.0]], [[4.0, -4.0], [-6.0, 0.0]], [[8.0, -10.0], [12.0, 10.0]], [[2.0, 
-2.0], [6.0, -2.0]]])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, 6.0, 4.0, 5.0, 2.0], [6.0, 4.0, 0.0, -4.0, 3.0], [-7.0, 6.0, -5.0, 6.0, -7.0], [7.0, -5.0, 
+4.0, -3.0, -4.0]], [[1.0, 7.0, -7.0, -2.0, 1.0], [0.0, -5.0, -1.0, -1.0, -3.0], [-6.0, -3.0, 0.0, -2.0, 0.0], [3.0, -6.0, 0.0, 
+-3.0, 1.0]], [[0.0, 0.0, -7.0, 0.0, 6.0], [4.0, 2.0, -3.0, 6.0, -2.0], [0.0, -7.0, 0.0, 2.0, 0.0], [5.0, -1.0, 3.0, 7.0, 
+6.0]]]),self.functionspace)
+      arg1=numpy.array([[5.0, 3.0], [-6.0, 5.0], [-7.0, 1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-6.0, 5.0], [-12.0, 53.0], [111.0, -30.0], [37.0, 5.0], [-38.0, 17.0]], [[2.0, 22.0], [36.0, 
+-11.0], [27.0, -8.0], [-56.0, -11.0], [47.0, -8.0]], [[1.0, -51.0], [97.0, -4.0], [-25.0, -15.0], [28.0, 10.0], [-35.0, 
+-21.0]], [[-18.0, 41.0], [18.0, -46.0], [-1.0, 15.0], [-46.0, -17.0], [-68.0, -1.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, -5.0, 3.0], [1.0, 0.0, -3.0]], [[6.0, -6.0, 0.0], [1.0, -4.0, 3.0]]], [[[-5.0, -6.0, 
--4.0], [-4.0, -3.0, -5.0]], [[-4.0, -5.0, -1.0], [-7.0, -6.0, -3.0]]], [[[-3.0, -7.0, -6.0], [6.0, -3.0, -5.0]], [[-3.0, -1.0, 
-1.0], [5.0, -1.0, -5.0]]], [[[0.0, 6.0, 4.0], [6.0, -3.0, 0.0]], [[-1.0, -3.0, -2.0], [6.0, 4.0, -6.0]]], [[[4.0, 7.0, -5.0], 
-[-4.0, 4.0, 4.0]], [[5.0, -5.0, -2.0], [-2.0, 2.0, 7.0]]], [[[7.0, -4.0, 1.0], [0.0, 5.0, 5.0]], [[-2.0, -3.0, -3.0], [7.0, 
--2.0, -3.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 6.0, 2.0], [-6.0, -1.0, -6.0]], [[1.0, 2.0, -2.0], [0.0, 0.0, -1.0]]], 
-[[[-4.0, 0.0, -7.0], [2.0, 1.0, -2.0]], [[-6.0, 1.0, 6.0], [7.0, -5.0, 4.0]]], [[[5.0, 7.0, -1.0], [-1.0, 5.0, -4.0]], [[4.0, 
--1.0, 0.0], [2.0, -2.0, 5.0]]], [[[-7.0, -7.0, -2.0], [1.0, -4.0, -3.0]], [[3.0, -4.0, 3.0], [-3.0, -2.0, 1.0]]], [[[-1.0, 7.0, 
-2.0], [0.0, -6.0, 7.0]], [[-3.0, -7.0, 0.0], [3.0, 7.0, 5.0]]], [[[0.0, 1.0, 3.0], [5.0, 4.0, 2.0]], [[-4.0, -6.0, 4.0], [-4.0, 
-1.0, -2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([5.0, 4.0, -5.0])+(1.-msk_arg1)*numpy.array([7.0, -4.0, 2.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-40.0, 20.0], [6.0, -26.0]], [[-29.0, -7.0], [-35.0, -44.0]], [[-13.0, 43.0], [-24.0, 46.0]], 
-[[4.0, 18.0], [-7.0, 76.0]], [[73.0, -24.0], [15.0, -37.0]], [[14.0, -5.0], [-7.0, 42.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 
--50.0], [-5.0, -2.0]], [[-42.0, 6.0], [-34.0, 77.0]], [[5.0, -35.0], [32.0, 32.0]], [[-25.0, 17.0], [43.0, -11.0]], [[-31.0, 
-38.0], [7.0, 3.0]], [[2.0, 23.0], [4.0, -36.0]]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank3_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, 0.0], [3.0, 6.0]], [[1.0, 0.0], [-5.0, 2.0]], [[-2.0, -7.0], [2.0, -1.0]], [[7.0, 
--3.0], [4.0, -4.0]], [[-5.0, -5.0], [-1.0, 1.0]], [[-2.0, -3.0], [-5.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, 3.0], [-4.0, 
-0.0]], [[-4.0, 5.0], [-3.0, -2.0]], [[7.0, 7.0], [-6.0, 1.0]], [[4.0, 0.0], [3.0, -3.0]], [[-3.0, 5.0], [0.0, 7.0]], [[-6.0, 
--3.0], [6.0, 5.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-3.0, -6.0])+(1.-msk_arg1)*numpy.array([-5.0, 0.0])
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-3.0, -6.0], [0.0, 0.0]], [[-9.0, -18.0], [-18.0, -36.0]]], [[[-3.0, -6.0], [0.0, 0.0]], 
-[[15.0, 30.0], [-6.0, -12.0]]], [[[6.0, 12.0], [21.0, 42.0]], [[-6.0, -12.0], [3.0, 6.0]]], [[[-21.0, -42.0], [9.0, 18.0]], 
-[[-12.0, -24.0], [12.0, 24.0]]], [[[15.0, 30.0], [15.0, 30.0]], [[3.0, 6.0], [-3.0, -6.0]]], [[[6.0, 12.0], [9.0, 18.0]], 
-[[15.0, 30.0], [0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, 0.0], [-15.0, 0.0]], [[20.0, 0.0], [0.0, 0.0]]], [[[20.0, 0.0], 
-[-25.0, 0.0]], [[15.0, 0.0], [10.0, 0.0]]], [[[-35.0, 0.0], [-35.0, 0.0]], [[30.0, 0.0], [-5.0, 0.0]]], [[[-20.0, 0.0], [0.0, 
-0.0]], [[-15.0, 0.0], [15.0, 0.0]]], [[[15.0, 0.0], [-25.0, 0.0]], [[0.0, 0.0], [-35.0, 0.0]]], [[[30.0, 0.0], [15.0, 0.0]], 
-[[-30.0, 0.0], [-25.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[3.0, 6.0, 4.0, 0.0, 6.0], [1.0, -4.0, 0.0, 0.0, 3.0], [0.0, 1.0, 7.0, -5.0, 0.0], [7.0, 7.0, 
+-4.0, 7.0, 6.0]], [[-6.0, -1.0, 7.0, -1.0, -4.0], [-1.0, -4.0, 4.0, -4.0, 1.0], [7.0, 0.0, -6.0, -7.0, -2.0], [-5.0, -3.0, 1.0, 
+0.0, -1.0]], [[-3.0, -1.0, 2.0, 2.0, -6.0], [2.0, 4.0, 1.0, 6.0, 6.0], [-2.0, -7.0, 5.0, -1.0, -4.0], [-5.0, 3.0, -3.0, -6.0, 
+1.0]]], [[[5.0, 5.0, 5.0, 3.0, 0.0], [-1.0, 6.0, 0.0, 0.0, 1.0], [4.0, 0.0, 4.0, -3.0, 5.0], [6.0, 0.0, 4.0, 5.0, -7.0]], 
+[[0.0, 7.0, -6.0, 4.0, -6.0], [-1.0, 6.0, 3.0, 6.0, 5.0], [-6.0, 0.0, -7.0, 7.0, -7.0], [3.0, 1.0, 1.0, -5.0, 6.0]], [[4.0, 
+-6.0, -6.0, 0.0, -4.0], [2.0, -2.0, 5.0, -5.0, -1.0], [6.0, 4.0, -4.0, -7.0, 6.0], [3.0, 2.0, -2.0, 5.0, 
+0.0]]]]),self.functionspace)
+      arg1=numpy.array([[[0.0, 0.0], [7.0, 5.0], [7.0, -5.0]], [[0.0, -6.0], [4.0, -7.0], [2.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-55.0, -45.0], [2.0, -79.0], [27.0, 37.0], [23.0, -61.0], [-102.0, 52.0]], [[7.0, -2.0], [20.0, 
+-118.0], [57.0, -6.0], [28.0, -92.0], [67.0, -66.0]], [[23.0, 63.0], [-41.0, 35.0], [-43.0, -30.0], [-42.0, -61.0], [-58.0, 
+29.0]], [[-52.0, -57.0], [8.0, -37.0], [-14.0, -11.0], [-52.0, 35.0], [24.0, -10.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, -2.0, 6.0], [-6.0, -3.0, -5.0]], [[-1.0, 4.0, 0.0], [-4.0, -4.0, 3.0]]], [[[-7.0, 
-5.0, 3.0], [-1.0, 7.0, 0.0]], [[0.0, -3.0, -2.0], [-7.0, 1.0, 2.0]]], [[[-4.0, 2.0, -1.0], [1.0, 1.0, -4.0]], [[-5.0, -4.0, 
-3.0], [0.0, -4.0, -2.0]]], [[[0.0, 0.0, -3.0], [1.0, -1.0, 4.0]], [[7.0, 0.0, -5.0], [5.0, 2.0, -4.0]]], [[[5.0, -4.0, 2.0], 
-[3.0, -1.0, 7.0]], [[-2.0, 6.0, -4.0], [-3.0, 4.0, 1.0]]], [[[-6.0, -2.0, -3.0], [-6.0, -3.0, 2.0]], [[-1.0, 0.0, 6.0], [3.0, 
-4.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, 2.0, -6.0], [-1.0, 3.0, 5.0]], [[-6.0, -4.0, -4.0], [0.0, 0.0, -1.0]]], 
-[[[-4.0, 4.0, 7.0], [0.0, 1.0, -6.0]], [[-5.0, 0.0, 1.0], [3.0, 3.0, -5.0]]], [[[-5.0, 0.0, 1.0], [0.0, 0.0, 1.0]], [[4.0, 6.0, 
-5.0], [1.0, -2.0, 0.0]]], [[[2.0, 5.0, -5.0], [4.0, 3.0, -6.0]], [[0.0, 0.0, -6.0], [-2.0, 4.0, -1.0]]], [[[-6.0, 2.0, -4.0], 
-[-3.0, 6.0, -3.0]], [[-5.0, 6.0, 1.0], [-1.0, 2.0, -4.0]]], [[[-5.0, -4.0, -2.0], [1.0, 4.0, -3.0]], [[-5.0, 2.0, -2.0], [-6.0, 
--2.0, 2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 4.0], [5.0, -1.0], [6.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 1.0], [4.0, -6.0], 
-[-4.0, 5.0]])
-      res=generalTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[54.0, -2.0], [-21.0, -41.0]], [[24.0, -8.0], [14.0, 0.0]]], [[[71.0, -21.0], [39.0, -11.0]], 
-[[-27.0, -5.0], [45.0, -21.0]]], [[[20.0, -22.0], [-23.0, -13.0]], [[18.0, -4.0], [-32.0, -4.0]]], [[[-18.0, -12.0], [15.0, 
-21.0]], [[-58.0, 8.0], [-34.0, 2.0]]], [[[-28.0, 32.0], [25.0, 41.0]], [[14.0, -30.0], [38.0, -12.0]]], [[[-4.0, -34.0], [21.0, 
--13.0]], [[40.0, 20.0], [8.0, 8.0]]]])+(1.-msk_ref)*numpy.array([[[[41.0, -39.0], [-11.0, 6.0]], [[-18.0, -2.0], [4.0, -5.0]]], 
-[[[-24.0, 7.0], [28.0, -36.0]], [[-19.0, 0.0], [41.0, -40.0]]], [[[-19.0, 0.0], [-4.0, 5.0]], [[16.0, -7.0], [-5.0, 13.0]]], 
-[[[46.0, -53.0], [48.0, -44.0]], [[24.0, -30.0], [14.0, -31.0]]], [[[6.0, -38.0], [27.0, -54.0]], [[5.0, -36.0], [21.0, 
--33.0]]], [[[-23.0, 9.0], [31.0, -38.0]], [[1.0, -27.0], [-34.0, 16.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_array_rank2_offset0(self):
+      arg0=Data(numpy.array([[0.0, -2.0, 1.0, -2.0, 6.0], [-3.0, -4.0, 2.0, 0.0, -6.0], [7.0, -1.0, -7.0, 2.0, 1.0], [-3.0, 
+0.0, -4.0, -5.0, -7.0]]),self.functionspace)
+      arg1=numpy.array([[0.0, 5.0, -5.0, -2.0, -2.0], [3.0, -7.0, 0.0, 5.0, -4.0], [5.0, 0.0, 4.0, 1.0, 3.0], [3.0, 2.0, 5.0, 
+4.0, -7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[0.0, -10.0, 10.0, 4.0, 4.0], [-6.0, 14.0, 0.0, -10.0, 8.0], [-10.0, 0.0, -8.0, -2.0, -6.0], [-6.0, -4.0, -10.0, 
+-8.0, 14.0]], [[0.0, 5.0, -5.0, -2.0, -2.0], [3.0, -7.0, 0.0, 5.0, -4.0], [5.0, 0.0, 4.0, 1.0, 3.0], [3.0, 2.0, 5.0, 4.0, 
+-7.0]], [[0.0, -10.0, 10.0, 4.0, 4.0], [-6.0, 14.0, 0.0, -10.0, 8.0], [-10.0, 0.0, -8.0, -2.0, -6.0], [-6.0, -4.0, -10.0, -8.0, 
+14.0]], [[0.0, 30.0, -30.0, -12.0, -12.0], [18.0, -42.0, 0.0, 30.0, -24.0], [30.0, 0.0, 24.0, 6.0, 18.0], [18.0, 12.0, 30.0, 
+24.0, -42.0]]], [[[0.0, -15.0, 15.0, 6.0, 6.0], [-9.0, 21.0, 0.0, -15.0, 12.0], [-15.0, 0.0, -12.0, -3.0, -9.0], [-9.0, -6.0, 
+-15.0, -12.0, 21.0]], [[0.0, -20.0, 20.0, 8.0, 8.0], [-12.0, 28.0, 0.0, -20.0, 16.0], [-20.0, 0.0, -16.0, -4.0, -12.0], [-12.0, 
+-8.0, -20.0, -16.0, 28.0]], [[0.0, 10.0, -10.0, -4.0, -4.0], [6.0, -14.0, 0.0, 10.0, -8.0], [10.0, 0.0, 8.0, 2.0, 6.0], [6.0, 
+4.0, 10.0, 8.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[0.0, -30.0, 30.0, 12.0, 12.0], [-18.0, 42.0, 0.0, -30.0, 24.0], [-30.0, 0.0, -24.0, -6.0, -18.0], [-18.0, -12.0, 
+-30.0, -24.0, 42.0]]], [[[0.0, 35.0, -35.0, -14.0, -14.0], [21.0, -49.0, 0.0, 35.0, -28.0], [35.0, 0.0, 28.0, 7.0, 21.0], 
+[21.0, 14.0, 35.0, 28.0, -49.0]], [[0.0, -5.0, 5.0, 2.0, 2.0], [-3.0, 7.0, 0.0, -5.0, 4.0], [-5.0, 0.0, -4.0, -1.0, -3.0], 
+[-3.0, -2.0, -5.0, -4.0, 7.0]], [[0.0, -35.0, 35.0, 14.0, 14.0], [-21.0, 49.0, 0.0, -35.0, 28.0], [-35.0, 0.0, -28.0, -7.0, 
+-21.0], [-21.0, -14.0, -35.0, -28.0, 49.0]], [[0.0, 10.0, -10.0, -4.0, -4.0], [6.0, -14.0, 0.0, 10.0, -8.0], [10.0, 0.0, 8.0, 
+2.0, 6.0], [6.0, 4.0, 10.0, 8.0, -14.0]], [[0.0, 5.0, -5.0, -2.0, -2.0], [3.0, -7.0, 0.0, 5.0, -4.0], [5.0, 0.0, 4.0, 1.0, 
+3.0], [3.0, 2.0, 5.0, 4.0, -7.0]]], [[[0.0, -15.0, 15.0, 6.0, 6.0], [-9.0, 21.0, 0.0, -15.0, 12.0], [-15.0, 0.0, -12.0, -3.0, 
+-9.0], [-9.0, -6.0, -15.0, -12.0, 21.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -20.0, 20.0, 8.0, 8.0], [-12.0, 28.0, 0.0, -20.0, 16.0], [-20.0, 0.0, -16.0, -4.0, -12.0], 
+[-12.0, -8.0, -20.0, -16.0, 28.0]], [[0.0, -25.0, 25.0, 10.0, 10.0], [-15.0, 35.0, 0.0, -25.0, 20.0], [-25.0, 0.0, -20.0, -5.0, 
+-15.0], [-15.0, -10.0, -25.0, -20.0, 35.0]], [[0.0, -35.0, 35.0, 14.0, 14.0], [-21.0, 49.0, 0.0, -35.0, 28.0], [-35.0, 0.0, 
+-28.0, -7.0, -21.0], [-21.0, -14.0, -35.0, -28.0, 49.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, 4.0, -7.0, 3.0], [1.0, 5.0, -6.0, 3.0], [7.0, -1.0, -3.0, -2.0]], [[4.0, -3.0, -3.0, 
-5.0], [-5.0, 3.0, 4.0, -7.0], [1.0, -4.0, -6.0, -3.0]]], [[[5.0, 6.0, -3.0, 2.0], [-2.0, 0.0, 6.0, 6.0], [-7.0, 4.0, -2.0, 
-7.0]], [[-2.0, -7.0, 1.0, -5.0], [-7.0, 4.0, -1.0, -6.0], [-6.0, -4.0, -4.0, 3.0]]], [[[6.0, -7.0, 3.0, -6.0], [4.0, -3.0, 4.0, 
--3.0], [0.0, 1.0, 7.0, 0.0]], [[3.0, 5.0, -7.0, 2.0], [2.0, 2.0, 6.0, -5.0], [-4.0, 4.0, -1.0, 
--1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, -2.0, 6.0, -4.0], [-2.0, 2.0, 0.0, -7.0], [0.0, 4.0, 0.0, 0.0]], [[-3.0, -6.0, 
--3.0, -2.0], [-7.0, 1.0, -7.0, 5.0], [1.0, 2.0, 3.0, 5.0]]], [[[-3.0, 6.0, 1.0, -2.0], [0.0, 0.0, -1.0, -6.0], [1.0, 7.0, 4.0, 
-3.0]], [[-5.0, 1.0, 4.0, 4.0], [-2.0, 2.0, -4.0, 7.0], [0.0, 4.0, -2.0, 7.0]]], [[[-5.0, -4.0, 0.0, 2.0], [-2.0, -7.0, -1.0, 
-4.0], [-6.0, -5.0, 6.0, 1.0]], [[2.0, 2.0, 6.0, 5.0], [1.0, 1.0, -3.0, 2.0], [0.0, 1.0, -4.0, -1.0]]]])
-      arg1=-7.0
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-21.0, -28.0, 49.0, -21.0], [-7.0, -35.0, 42.0, -21.0], [-49.0, 7.0, 21.0, 14.0]], [[-28.0, 
-21.0, 21.0, -35.0], [35.0, -21.0, -28.0, 49.0], [-7.0, 28.0, 42.0, 21.0]]], [[[-35.0, -42.0, 21.0, -14.0], [14.0, -0.0, -42.0, 
--42.0], [49.0, -28.0, 14.0, -49.0]], [[14.0, 49.0, -7.0, 35.0], [49.0, -28.0, 7.0, 42.0], [42.0, 28.0, 28.0, -21.0]]], 
-[[[-42.0, 49.0, -21.0, 42.0], [-28.0, 21.0, -28.0, 21.0], [-0.0, -7.0, -49.0, -0.0]], [[-21.0, -35.0, 49.0, -14.0], [-14.0, 
--14.0, -42.0, 35.0], [28.0, -28.0, 7.0, 7.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, 14.0, -42.0, 28.0], [14.0, -14.0, -0.0, 
-49.0], [-0.0, -28.0, -0.0, -0.0]], [[21.0, 42.0, 21.0, 14.0], [49.0, -7.0, 49.0, -35.0], [-7.0, -14.0, -21.0, -35.0]]], 
-[[[21.0, -42.0, -7.0, 14.0], [-0.0, -0.0, 7.0, 42.0], [-7.0, -49.0, -28.0, -21.0]], [[35.0, -7.0, -28.0, -28.0], [14.0, -14.0, 
-28.0, -49.0], [-0.0, -28.0, 14.0, -49.0]]], [[[35.0, 28.0, -0.0, -14.0], [14.0, 49.0, 7.0, -28.0], [42.0, 35.0, -42.0, -7.0]], 
-[[-14.0, -14.0, -42.0, -35.0], [-7.0, -7.0, 21.0, -14.0], [-0.0, -7.0, 28.0, 7.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[[5.0, 5.0, 4.0, -7.0, 6.0], [-3.0, -5.0, -4.0, 0.0, 7.0], [7.0, 3.0, 6.0, 4.0, 1.0], [2.0, -3.0, 
+-5.0, -7.0, -1.0]], [[6.0, -3.0, -4.0, 1.0, -7.0], [-1.0, 1.0, -7.0, -2.0, 5.0], [-6.0, -1.0, 4.0, -4.0, 7.0], [0.0, -2.0, 5.0, 
+-3.0, 4.0]], [[5.0, -7.0, -5.0, 3.0, 6.0], [-2.0, -6.0, -1.0, 1.0, -7.0], [4.0, -3.0, -3.0, 2.0, 1.0], [-6.0, -3.0, 7.0, 0.0, 
+3.0]]]),self.functionspace)
+      arg1=numpy.array([[[-6.0, -1.0, 0.0, 7.0, -4.0], [0.0, 2.0, -4.0, -1.0, -1.0], [1.0, -1.0, 7.0, 0.0, 3.0], [-2.0, -5.0, 
+-2.0, 0.0, 4.0]], [[3.0, -2.0, 1.0, -3.0, 2.0], [6.0, -6.0, 2.0, -5.0, 5.0], [2.0, 1.0, 7.0, 2.0, 3.0], [7.0, -6.0, -6.0, 6.0, 
+0.0]], [[-3.0, -4.0, 0.0, 6.0, 6.0], [-7.0, 5.0, 0.0, -3.0, -5.0], [-6.0, 5.0, -6.0, 4.0, 5.0], [-5.0, 0.0, 0.0, -4.0, -5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-27.0, -37.0, 6.0, 47.0, 22.0], [1.0, -1.0, -8.0, -50.0, 0.0], [-13.0, 26.0, 47.0, 32.0, 58.0], 
+[7.0, -61.0, -46.0, 16.0, -5.0]], [[-18.0, 29.0, -3.0, 2.0, -68.0], [31.0, -7.0, -26.0, 31.0, 15.0], [41.0, -43.0, 56.0, -34.0, 
+-29.0], [4.0, -7.0, 8.0, 10.0, 55.0]], [[-21.0, 24.0, -4.0, 10.0, -54.0], [11.0, 7.0, -24.0, 31.0, 1.0], [26.0, -33.0, 30.0, 
+-28.0, -25.0], [-11.0, 4.0, 16.0, -4.0, 41.0]], [[36.0, -7.0, 1.0, -34.0, 48.0], [-15.0, -5.0, 30.0, -7.0, -3.0], [-23.0, 23.0, 
+-60.0, 14.0, -3.0], [6.0, 29.0, 8.0, -6.0, -43.0]], [[-75.0, -16.0, -7.0, 99.0, -2.0], [-84.0, 84.0, -38.0, 11.0, -71.0], 
+[-44.0, 17.0, -43.0, 10.0, 27.0], [-91.0, 12.0, 30.0, -66.0, -6.0]]], [[[21.0, 13.0, -1.0, -30.0, -2.0], [8.0, -10.0, 10.0, 
+14.0, 8.0], [7.0, -8.0, -16.0, -10.0, -22.0], [9.0, 21.0, 12.0, 2.0, -2.0]], [[51.0, 27.0, 1.0, -74.0, -14.0], [48.0, -46.0, 
+22.0, 18.0, 40.0], [33.0, -24.0, 8.0, -22.0, -42.0], [47.0, 19.0, 4.0, 30.0, 10.0]], [[6.0, 22.0, -7.0, -13.0, -4.0], [-35.0, 
+29.0, 2.0, 42.0, -26.0], [-12.0, -8.0, -71.0, -18.0, -38.0], [-36.0, 62.0, 50.0, -38.0, -11.0]], [[-9.0, 0.0, -2.0, 12.0, 2.0], 
+[-19.0, 17.0, -4.0, 7.0, -15.0], [-10.0, 3.0, -20.0, 0.0, -1.0], [-19.0, 12.0, 12.0, -16.0, -5.0]], [[-6.0, 11.0, 5.0, -8.0, 
+-60.0], [79.0, -51.0, -18.0, -11.0, 53.0], [59.0, -37.0, 126.0, -18.0, 1.0], [56.0, -65.0, -44.0, 58.0, 63.0]]], [[[-72.0, 
+-11.0, -6.0, 91.0, -16.0], [-64.0, 70.0, -40.0, 11.0, -57.0], [-29.0, 7.0, -17.0, 4.0, 23.0], [-76.0, 1.0, 22.0, -52.0, 8.0]], 
+[[-12.0, 11.0, -1.0, 6.0, -32.0], [15.0, -3.0, -14.0, 11.0, 7.0], [19.0, -19.0, 32.0, -14.0, -9.0], [2.0, -9.0, 0.0, 6.0, 
+27.0]], [[-15.0, -2.0, 4.0, 12.0, -34.0], [45.0, -27.0, -16.0, -17.0, 29.0], [32.0, -17.0, 88.0, -4.0, 15.0], [31.0, -54.0, 
+-36.0, 36.0, 39.0]], [[-42.0, -4.0, -4.0, 52.0, -12.0], [-38.0, 42.0, -24.0, 10.0, -34.0], [-16.0, 2.0, -12.0, 0.0, 10.0], 
+[-46.0, 4.0, 16.0, -32.0, 6.0]], [[12.0, -19.0, 7.0, -8.0, 16.0], [35.0, -35.0, 10.0, -39.0, 29.0], [9.0, 11.0, 50.0, 18.0, 
+29.0], [42.0, -47.0, -44.0, 38.0, -1.0]]], [[[6.0, 22.0, 0.0, -22.0, -44.0], [42.0, -26.0, -8.0, 16.0, 28.0], [38.0, -32.0, 
+50.0, -24.0, -24.0], [26.0, -10.0, -4.0, 24.0, 38.0]], [[21.0, 19.0, -2.0, -33.0, -10.0], [9.0, -9.0, 8.0, 22.0, 8.0], [11.0, 
+-14.0, -17.0, -16.0, -30.0], [7.0, 27.0, 18.0, 0.0, 3.0]], [[24.0, -33.0, 5.0, -8.0, 72.0], [-19.0, -5.0, 30.0, -41.0, -5.0], 
+[-37.0, 45.0, -42.0, 38.0, 35.0], [10.0, -5.0, -20.0, 2.0, -55.0]], [[33.0, 13.0, -3.0, -40.0, 22.0], [-18.0, 4.0, 22.0, 22.0, 
+-8.0], [-13.0, 4.0, -70.0, -6.0, -30.0], [-7.0, 53.0, 32.0, -18.0, -28.0]], [[9.0, -19.0, 4.0, -1.0, 30.0], [3.0, -11.0, 12.0, 
+-28.0, 6.0], [-11.0, 20.0, 3.0, 20.0, 24.0], [15.0, -19.0, -22.0, 12.0, -19.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, -2.0, 1.0, 0.0], [3.0, 1.0, 0.0, -4.0], [1.0, 0.0, -1.0, -7.0]], [[2.0, 0.0, -1.0, 
--3.0], [1.0, 2.0, -6.0, 3.0], [-1.0, 1.0, -6.0, -1.0]]], [[[3.0, 0.0, -6.0, 0.0], [-4.0, 0.0, 3.0, 1.0], [-2.0, 1.0, 0.0, 
--1.0]], [[0.0, 3.0, -6.0, 2.0], [-7.0, 3.0, -4.0, -2.0], [6.0, 0.0, -6.0, -4.0]]], [[[4.0, -5.0, 3.0, 7.0], [2.0, 7.0, -3.0, 
-3.0], [4.0, 5.0, -2.0, -5.0]], [[-2.0, -7.0, 3.0, -1.0], [1.0, 1.0, -1.0, -7.0], [-6.0, -5.0, -5.0, 
-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 5.0, -5.0, 1.0], [-3.0, 5.0, 6.0, 1.0], [4.0, 0.0, -1.0, 6.0]], [[-4.0, 0.0, 2.0, 
-1.0], [7.0, 6.0, -1.0, -1.0], [4.0, 7.0, -3.0, -7.0]]], [[[1.0, -2.0, 6.0, 5.0], [2.0, 5.0, 7.0, 6.0], [-1.0, 0.0, -2.0, 
--6.0]], [[5.0, -1.0, -2.0, 4.0], [5.0, 4.0, 1.0, 3.0], [-2.0, 7.0, -1.0, -1.0]]], [[[0.0, -7.0, 6.0, -4.0], [-6.0, 3.0, -5.0, 
-0.0], [0.0, 0.0, 4.0, -3.0]], [[-3.0, -6.0, 4.0, 0.0], [-5.0, -4.0, -3.0, 5.0], [5.0, -2.0, 1.0, 6.0]]]])
-      arg1=numpy.array(0.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, -0.0]], [[0.0, 0.0, -0.0, 
--0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 
--0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 
-0.0], [0.0, 0.0, -0.0, -0.0]], [[-0.0, -0.0, 0.0, -0.0], [0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 
--0.0]], [[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 
-0.0], [0.0, 0.0, 0.0, -0.0]], [[-0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[7.0, -6.0, -4.0, 2.0, -6.0], [-5.0, 5.0, 2.0, -1.0, -2.0], [0.0, 6.0, 3.0, -1.0, 7.0], [7.0, 
+4.0, -1.0, 3.0, -3.0]], [[0.0, 5.0, -7.0, -3.0, -1.0], [6.0, 7.0, 0.0, 2.0, -3.0], [-4.0, -3.0, -6.0, 0.0, 1.0], [6.0, -7.0, 
+-7.0, 5.0, -3.0]], [[7.0, -2.0, 0.0, 4.0, 3.0], [6.0, 2.0, 4.0, 3.0, 5.0], [0.0, -3.0, 0.0, -7.0, -1.0], [-4.0, 4.0, -5.0, 
+-4.0, -3.0]]], [[[-5.0, 5.0, -5.0, 1.0, -7.0], [-6.0, 0.0, 1.0, -2.0, 4.0], [2.0, -4.0, 6.0, 5.0, -7.0], [1.0, 0.0, -7.0, -4.0, 
+1.0]], [[0.0, 0.0, 1.0, 7.0, 6.0], [-2.0, 0.0, -1.0, -4.0, -6.0], [2.0, 5.0, 6.0, 2.0, 6.0], [-3.0, 6.0, -3.0, 0.0, -7.0]], 
+[[-7.0, 7.0, -2.0, 1.0, 7.0], [-1.0, 2.0, 4.0, 2.0, 4.0], [6.0, 5.0, 0.0, -6.0, -2.0], [-1.0, 7.0, 4.0, -6.0, 
+-7.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[3.0, -6.0, -6.0, -6.0, 4.0], [-5.0, -6.0, -2.0, 1.0, 5.0], [6.0, 6.0, 0.0, -5.0, 4.0], [-5.0, 0.0, 
+-7.0, -2.0, 6.0]], [[-3.0, 7.0, 3.0, -1.0, -5.0], [6.0, 0.0, 0.0, -1.0, -3.0], [-3.0, 0.0, -2.0, -7.0, -4.0], [4.0, 6.0, -4.0, 
+-6.0, 5.0]], [[5.0, -7.0, -3.0, 6.0, 7.0], [-5.0, 5.0, 0.0, 3.0, -2.0], [0.0, 7.0, 1.0, 1.0, -2.0], [-5.0, -4.0, 3.0, -4.0, 
+6.0]]], [[[-5.0, 0.0, 4.0, 0.0, -4.0], [-4.0, 5.0, 2.0, -5.0, -4.0], [-4.0, 7.0, 4.0, 0.0, -5.0], [3.0, 2.0, -1.0, 7.0, -5.0]], 
+[[3.0, 4.0, -1.0, -4.0, 5.0], [-3.0, 5.0, 4.0, 2.0, -6.0], [6.0, -4.0, -4.0, 7.0, 2.0], [6.0, 5.0, -7.0, -3.0, -1.0]], [[5.0, 
+-5.0, 6.0, 6.0, 6.0], [5.0, 4.0, -2.0, 6.0, 1.0], [4.0, 7.0, -2.0, 0.0, 4.0], [3.0, 7.0, -3.0, -4.0, 6.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[46.0, -56.0, -125.0, -42.0, 55.0], [-85.0, -60.0, -10.0, 11.0, 34.0], [34.0, 7.0, 1.0, -28.0, 
+11.0], [-106.0, -87.0, -2.0, -49.0, 67.0]], [[-33.0, 50.0, 119.0, 61.0, -41.0], [85.0, 79.0, 8.0, 0.0, -54.0], [-43.0, 34.0, 
+-6.0, -7.0, -37.0], [96.0, 97.0, -10.0, -3.0, -6.0]], [[27.0, -11.0, -30.0, 15.0, 32.0], [-15.0, -4.0, 6.0, 18.0, 13.0], [15.0, 
+-77.0, -6.0, 76.0, 31.0], [-23.0, -61.0, 60.0, 20.0, -47.0]], [[56.0, -38.0, -30.0, -7.0, 88.0], [-68.0, 52.0, 24.0, 32.0, 
+-34.0], [63.0, 26.0, -16.0, 64.0, 25.0], [6.0, 10.0, -43.0, -20.0, 15.0]], [[88.0, -3.0, 32.0, 73.0, 102.0], [54.0, 74.0, 8.0, 
+93.0, -34.0], [59.0, -39.0, -61.0, 82.0, 49.0], [47.0, 47.0, -1.0, -89.0, 48.0]]], [[[16.0, 27.0, 2.0, 62.0, 0.0], [56.0, 16.0, 
+-8.0, 27.0, -20.0], [-40.0, -29.0, -20.0, -25.0, -34.0], [-14.0, -17.0, 52.0, -82.0, 62.0]], [[14.0, -5.0, -3.0, -13.0, 11.0], 
+[17.0, -12.0, -14.0, 16.0, 2.0], [17.0, 58.0, -16.0, -72.0, -4.0], [-1.0, 48.0, -63.0, -68.0, 89.0]], [[38.0, -64.0, 5.0, 40.0, 
+51.0], [-11.0, 24.0, -14.0, 31.0, 8.0], [18.0, 79.0, 4.0, -13.0, 9.0], [-21.0, 9.0, -8.0, -26.0, 56.0]], [[14.0, -27.0, 11.0, 
+50.0, 7.0], [32.0, -1.0, -22.0, 20.0, 17.0], [-20.0, 31.0, 3.0, -34.0, -8.0], [-26.0, -10.0, 32.0, -32.0, 48.0]], [[10.0, 
+-88.0, 34.0, 93.0, 20.0], [-11.0, 43.0, -20.0, 8.0, 13.0], [-39.0, 103.0, 43.0, -6.0, -22.0], [-39.0, -32.0, 67.0, 32.0, 
+13.0]]], [[[38.0, -50.0, 30.0, 32.0, 58.0], [-8.0, 44.0, 0.0, 34.0, -2.0], [40.0, 48.0, -4.0, 42.0, 34.0], [20.0, 32.0, -18.0, 
+8.0, 4.0]], [[72.0, -41.0, -27.0, -41.0, 89.0], [-7.0, -26.0, -10.0, 60.0, 36.0], [111.0, 2.0, -43.0, 23.0, 92.0], [6.0, 46.0, 
+-85.0, -45.0, 48.0]], [[15.0, -36.0, -18.0, -36.0, 48.0], [-93.0, 42.0, 30.0, -9.0, -27.0], [48.0, 36.0, 12.0, 69.0, 18.0], 
+[15.0, 6.0, -45.0, 54.0, -48.0]], [[-87.0, 93.0, 9.0, -80.0, -99.0], [-16.0, -18.0, 32.0, -79.0, -29.0], [-38.0, -70.0, 17.0, 
+12.0, -35.0], [49.0, 6.0, -15.0, 83.0, -111.0]], [[56.0, 6.0, -82.0, -85.0, 62.0], [-24.0, -60.0, 0.0, 38.0, 24.0], [95.0, 
+-52.0, -51.0, -1.0, 65.0], [-17.0, 12.0, -85.0, -75.0, 58.0]]], [[[-36.0, 21.0, -11.0, -66.0, -55.0], [21.0, -76.0, -22.0, 
+-28.0, 38.0], [-2.0, 26.0, 2.0, -102.0, -3.0], [-9.0, 32.0, -62.0, -14.0, 40.0]], [[106.0, -112.0, -21.0, 25.0, 151.0], [-65.0, 
+54.0, 2.0, 77.0, 4.0], [109.0, 77.0, -20.0, 75.0, 76.0], [-11.0, 21.0, -51.0, -28.0, 49.0]], [[39.0, -40.0, -1.0, 19.0, 33.0], 
+[45.0, -53.0, -32.0, 44.0, 76.0], [41.0, -50.0, -15.0, 28.0, 79.0], [-25.0, -23.0, 36.0, 8.0, -9.0]], [[-36.0, 75.0, -43.0, 
+-83.0, -61.0], [21.0, -82.0, -2.0, -30.0, 18.0], [-5.0, -80.0, -18.0, -54.0, -4.0], [-5.0, -4.0, -31.0, -24.0, 3.0]], [[-76.0, 
+25.0, -13.0, -11.0, -99.0], [-6.0, -55.0, -6.0, -70.0, 31.0], [-83.0, -53.0, 49.0, -16.0, -41.0], [-42.0, -88.0, 93.0, 92.0, 
+-91.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, 1.0, 4.0, -7.0], [0.0, -6.0, 2.0, 1.0], [-6.0, 4.0, -6.0, 3.0]], [[-4.0, 7.0, 5.0, 
--5.0], [-2.0, -7.0, 4.0, 0.0], [5.0, 5.0, -6.0, 0.0]]], [[[-7.0, 4.0, 7.0, -6.0], [0.0, 0.0, 5.0, -5.0], [-1.0, -3.0, 3.0, 
--3.0]], [[4.0, 4.0, 0.0, -5.0], [-1.0, 0.0, -4.0, -5.0], [1.0, -5.0, 1.0, 4.0]]], [[[5.0, 4.0, 1.0, -3.0], [0.0, 7.0, -1.0, 
-3.0], [1.0, -6.0, -5.0, -5.0]], [[-4.0, -1.0, 1.0, 6.0], [-3.0, 0.0, -2.0, 0.0], [-6.0, -3.0, 0.0, 
-1.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, -3.0, -3.0, 0.0], [-3.0, -4.0, -4.0, 6.0], [0.0, -6.0, -5.0, 5.0]], [[6.0, 1.0, 
-2.0, 7.0], [0.0, 7.0, 1.0, 5.0], [-2.0, -4.0, 6.0, 5.0]]], [[[-3.0, -1.0, 5.0, -5.0], [3.0, 6.0, 6.0, 0.0], [6.0, 1.0, 1.0, 
-5.0]], [[7.0, -7.0, -6.0, 7.0], [-3.0, 6.0, 6.0, -2.0], [-2.0, 1.0, -2.0, 5.0]]], [[[-6.0, 4.0, -6.0, 0.0], [-1.0, -7.0, 0.0, 
-0.0], [4.0, -7.0, -4.0, -2.0]], [[3.0, -3.0, 6.0, -2.0], [5.0, -5.0, 3.0, -2.0], [0.0, -4.0, 4.0, 6.0]]]])
-      arg1=Data(0.0,self.functionspace)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, 
--0.0], [-0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0]]], [[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 
--0.0]], [[0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 
-0.0], [0.0, -0.0, -0.0, -0.0]], [[-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]]], [[[-0.0, -0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], 
-[[0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], 
-[0.0, -0.0, -0.0, -0.0]], [[0.0, -0.0, 0.0, -0.0], [0.0, -0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[0.0, 6.0, -2.0, 5.0, -4.0], [5.0, -5.0, 3.0, 7.0, -3.0], [-6.0, -5.0, -5.0, 0.0, -4.0], [4.0, 
+6.0, -3.0, 4.0, 3.0]]),self.functionspace)
+      arg1=Data(1.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 6.0, -2.0, 5.0, -4.0], [5.0, -5.0, 3.0, 7.0, -3.0], [-6.0, -5.0, -5.0, 0.0, -4.0], [4.0, 6.0, 
+-3.0, 4.0, 3.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorProduct_expandedData_rank4_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, 0.0, -2.0, 6.0], [7.0, -4.0, 1.0, -5.0], [5.0, 4.0, -6.0, -4.0]], [[7.0, -7.0, -4.0, 
-6.0], [2.0, -3.0, 0.0, -2.0], [-6.0, 4.0, -2.0, 1.0]]], [[[1.0, 3.0, -7.0, 2.0], [-7.0, -6.0, -4.0, 1.0], [0.0, -3.0, 0.0, 
--4.0]], [[-3.0, -3.0, -1.0, -7.0], [-3.0, 6.0, 7.0, 2.0], [5.0, 2.0, -7.0, -7.0]]], [[[7.0, -6.0, 7.0, -6.0], [7.0, 1.0, -3.0, 
--3.0], [-1.0, -1.0, -3.0, -1.0]], [[4.0, -1.0, -3.0, 0.0], [-4.0, -2.0, -4.0, -4.0], [-6.0, 6.0, -7.0, 
-7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 7.0, -2.0, 7.0], [-6.0, -1.0, 3.0, -4.0], [0.0, 6.0, -2.0, 1.0]], [[3.0, 2.0, 
--2.0, 5.0], [-3.0, 7.0, 7.0, 5.0], [6.0, -2.0, -5.0, 0.0]]], [[[2.0, 6.0, -4.0, 6.0], [4.0, 2.0, 4.0, -2.0], [1.0, 3.0, 4.0, 
--7.0]], [[4.0, 0.0, -5.0, -2.0], [3.0, -5.0, 4.0, -2.0], [-3.0, 3.0, 2.0, -3.0]]], [[[-2.0, -6.0, 0.0, 3.0], [7.0, -2.0, -3.0, 
--3.0], [-7.0, 6.0, -3.0, 2.0]], [[6.0, -3.0, -1.0, 5.0], [-3.0, -1.0, -2.0, 3.0], [0.0, -4.0, 0.0, -4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(6.0)+(1-msk_arg1)*(1.0)
-      res=generalTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, 0.0, -12.0, 36.0], [42.0, -24.0, 6.0, -30.0], [30.0, 24.0, -36.0, -24.0]], [[42.0, 
--42.0, -24.0, 36.0], [12.0, -18.0, 0.0, -12.0], [-36.0, 24.0, -12.0, 6.0]]], [[[6.0, 18.0, -42.0, 12.0], [-42.0, -36.0, -24.0, 
-6.0], [0.0, -18.0, 0.0, -24.0]], [[-18.0, -18.0, -6.0, -42.0], [-18.0, 36.0, 42.0, 12.0], [30.0, 12.0, -42.0, -42.0]]], 
-[[[42.0, -36.0, 42.0, -36.0], [42.0, 6.0, -18.0, -18.0], [-6.0, -6.0, -18.0, -6.0]], [[24.0, -6.0, -18.0, 0.0], [-24.0, -12.0, 
--24.0, -24.0], [-36.0, 36.0, -42.0, 42.0]]]])+(1.-msk_ref)*numpy.array([[[[-7.0, 7.0, -2.0, 7.0], [-6.0, -1.0, 3.0, -4.0], 
-[0.0, 6.0, -2.0, 1.0]], [[3.0, 2.0, -2.0, 5.0], [-3.0, 7.0, 7.0, 5.0], [6.0, -2.0, -5.0, 0.0]]], [[[2.0, 6.0, -4.0, 6.0], [4.0, 
-2.0, 4.0, -2.0], [1.0, 3.0, 4.0, -7.0]], [[4.0, 0.0, -5.0, -2.0], [3.0, -5.0, 4.0, -2.0], [-3.0, 3.0, 2.0, -3.0]]], [[[-2.0, 
--6.0, 0.0, 3.0], [7.0, -2.0, -3.0, -3.0], [-7.0, 6.0, -3.0, 2.0]], [[6.0, -3.0, -1.0, 5.0], [-3.0, -1.0, -2.0, 3.0], [0.0, 
--4.0, 0.0, -4.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[2.0, 4.0, 6.0, -7.0, -5.0], [-6.0, -6.0, -1.0, -5.0, 0.0], [3.0, 7.0, 3.0, -5.0, -3.0], [-7.0, 
+7.0, 2.0, 7.0, -7.0]], [[0.0, 1.0, -4.0, 1.0, 5.0], [-4.0, 6.0, 4.0, -1.0, 4.0], [0.0, 6.0, 7.0, -6.0, 5.0], [0.0, 2.0, 5.0, 
+7.0, -6.0]], [[0.0, -4.0, -6.0, 0.0, -3.0], [4.0, 0.0, -6.0, 4.0, 5.0], [5.0, -3.0, -1.0, -4.0, -6.0], [-4.0, -2.0, 3.0, -2.0, 
+2.0]]]),self.functionspace)
+      arg1=Data(numpy.array([1.0, 6.0, 1.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[2.0, 6.0, -24.0, -1.0, 22.0], [-26.0, 30.0, 17.0, -7.0, 29.0], [8.0, 40.0, 44.0, -45.0, 21.0], 
+[-11.0, 17.0, 35.0, 47.0, -41.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_array_rank2_array_rank1(self):
-      arg0=numpy.array([[0.0, 7.0, 0.0], [6.0, 6.0, 4.0]])
-      arg1=numpy.array([7.0, -2.0, 0.0])
-      res=matrix_mult(arg0,arg1)
-      ref=numpy.array([-14.0, 30.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=matrix_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_array_rank2_array_rank2(self):
-      arg0=numpy.array([[6.0, 3.0, 3.0], [7.0, 3.0, 6.0]])
-      arg1=numpy.array([[-6.0, -6.0], [-5.0, -1.0], [-1.0, 7.0]])
-      res=matrix_mult(arg0,arg1)
-      ref=numpy.array([[-54.0, -18.0], [-63.0, -3.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_array_rank2_constData_rank1(self):
-      arg0=numpy.array([[-4.0, -7.0, 7.0], [-2.0, 4.0, 1.0]])
-      arg1=Data(numpy.array([3.0, 4.0, 7.0]),self.functionspace)
-      res=matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([9.0, 17.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[1.0, -4.0, -7.0, 5.0, 6.0], [2.0, 3.0, -3.0, -4.0, 0.0], [0.0, -1.0, 0.0, -3.0, -5.0], [-7.0, 
+7.0, -7.0, -1.0, 5.0]], [[-3.0, 0.0, 4.0, -2.0, -6.0], [5.0, -3.0, 5.0, 0.0, 4.0], [-4.0, 3.0, 5.0, 7.0, -6.0], [0.0, 4.0, 3.0, 
+7.0, -2.0]], [[2.0, -2.0, -7.0, 0.0, 0.0], [-3.0, 5.0, 6.0, -5.0, -1.0], [-4.0, 7.0, -6.0, 3.0, 5.0], [3.0, -5.0, -1.0, -4.0, 
+-3.0]]], [[[3.0, 1.0, 7.0, 7.0, 0.0], [0.0, -2.0, 2.0, 7.0, -3.0], [-4.0, 0.0, 7.0, -4.0, 6.0], [3.0, -6.0, -3.0, 4.0, -1.0]], 
+[[-3.0, 6.0, -4.0, -5.0, -7.0], [-6.0, -3.0, 6.0, 2.0, -4.0], [0.0, -6.0, 0.0, -5.0, 1.0], [-1.0, 3.0, 0.0, 1.0, -1.0]], [[3.0, 
+2.0, 1.0, -2.0, 2.0], [7.0, -5.0, 1.0, 2.0, -7.0], [5.0, 2.0, -4.0, 4.0, 0.0], [4.0, -4.0, -7.0, -3.0, 
+0.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 5.0, -4.0], [1.0, 6.0, -6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-57.0, 37.0, 32.0, -26.0, -90.0], [-43.0, -28.0, 36.0, 31.0, 39.0], [-38.0, -60.0, 80.0, -32.0, 
+-33.0], [-32.0, 69.0, 65.0, 80.0, -10.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[5.0, -3.0, 2.0], [-6.0, -3.0, -3.0]])
-      arg1=Data(numpy.array([[0.0, 0.0], [3.0, 6.0], [-7.0, -6.0]]),self.functionspace)
-      res=matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([[-23.0, -30.0], [12.0, 0.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[4.0, -2.0, 1.0, 3.0, -5.0], [0.0, 7.0, -1.0, 0.0, 6.0], [1.0, -5.0, 5.0, 2.0, 7.0], [1.0, -2.0, 
+-6.0, 7.0, 1.0]]),self.functionspace)
+      arg1=Data(numpy.array([-2.0, 1.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-8.0, 4.0], [4.0, -2.0], [-2.0, 1.0], [-6.0, 3.0], [10.0, -5.0]], [[0.0, 0.0], [-14.0, 7.0], 
+[2.0, -1.0], [0.0, 0.0], [-12.0, 6.0]], [[-2.0, 1.0], [10.0, -5.0], [-10.0, 5.0], [-4.0, 2.0], [-14.0, 7.0]], [[-2.0, 1.0], 
+[4.0, -2.0], [12.0, -6.0], [-14.0, 7.0], [-2.0, 1.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_array_rank2_expandedData_rank1(self):
-      arg0=numpy.array([[1.0, 4.0, 7.0], [-3.0, -6.0, -2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([5.0, -1.0, 1.0])+(1.-msk_arg1)*numpy.array([-4.0, 0.0, -3.0])
-      res=matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([8.0, -11.0])+(1.-msk_ref)*numpy.array([-25.0, 18.0])
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[6.0, 3.0, 3.0, 7.0, 6.0], [-7.0, 6.0, -4.0, 4.0, -7.0], [7.0, 7.0, 1.0, 6.0, 5.0], [-1.0, 1.0, 
+-6.0, -5.0, -2.0]], [[-7.0, 3.0, 0.0, -3.0, 2.0], [1.0, 4.0, -7.0, 5.0, -5.0], [-7.0, 2.0, 0.0, 0.0, 1.0], [6.0, 0.0, -1.0, 
+-1.0, 0.0]], [[0.0, -5.0, 4.0, 4.0, 4.0], [6.0, 0.0, 3.0, -1.0, -5.0], [-1.0, 4.0, 7.0, 3.0, -5.0], [-2.0, -5.0, -1.0, 2.0, 
+3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-3.0, 0.0], [5.0, 6.0], [0.0, -7.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-53.0, -42.0], [6.0, 53.0], [-9.0, -28.0], [-36.0, -46.0], [-8.0, -16.0]], [[26.0, -36.0], [2.0, 
+24.0], [-23.0, -63.0], [13.0, 37.0], [-4.0, 5.0]], [[-56.0, -35.0], [-11.0, -16.0], [-3.0, -49.0], [-18.0, -21.0], [-10.0, 
+41.0]], [[33.0, 50.0], [-3.0, 35.0], [13.0, 1.0], [10.0, -20.0], [6.0, -21.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[-7.0, -5.0, -4.0], [1.0, 4.0, 3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[6.0, 1.0], [-1.0, 0.0], [-4.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 4.0], [7.0, 3.0], 
-[-1.0, -5.0]])
-      res=matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-21.0, 9.0], [-10.0, -11.0]])+(1.-msk_ref)*numpy.array([[11.0, -23.0], [19.0, 1.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[3.0, 7.0, 7.0, 1.0, 6.0], [-4.0, 6.0, -2.0, 1.0, -2.0], [7.0, 2.0, 7.0, 1.0, -6.0], [-1.0, 6.0, 
+4.0, -7.0, -6.0]], [[4.0, -2.0, 1.0, 2.0, 7.0], [3.0, -2.0, 5.0, -3.0, 4.0], [-1.0, 1.0, 2.0, 4.0, -4.0], [7.0, -2.0, 0.0, 0.0, 
+-6.0]], [[3.0, 7.0, 2.0, 2.0, -2.0], [-7.0, 6.0, 4.0, -1.0, -3.0], [-4.0, 0.0, 7.0, 7.0, 5.0], [-4.0, -1.0, -1.0, 6.0, -5.0]]], 
+[[[5.0, 7.0, -1.0, -1.0, 0.0], [-6.0, 0.0, 3.0, 5.0, -7.0], [3.0, -4.0, 1.0, -5.0, -5.0], [-4.0, -5.0, 5.0, 7.0, 4.0]], [[2.0, 
+-7.0, 1.0, 7.0, 4.0], [5.0, -7.0, -5.0, 0.0, 6.0], [3.0, 0.0, 4.0, -6.0, 0.0], [-5.0, -7.0, 1.0, -6.0, 1.0]], [[7.0, 3.0, 0.0, 
+7.0, -3.0], [-7.0, -1.0, -2.0, 5.0, 6.0], [-2.0, -3.0, 7.0, -2.0, 3.0], [-1.0, -2.0, -7.0, -7.0, -3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, 0.0], [4.0, -3.0], [3.0, 0.0]], [[7.0, 1.0], [-3.0, -2.0], [5.0, 
+1.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[71.0, -4.0], [56.0, 30.0], [-42.0, -6.0], [15.0, -14.0], [-41.0, -32.0]], [[-77.0, -32.0], 
+[-10.0, 19.0], [70.0, -4.0], [39.0, 19.0], [-18.0, -25.0]], [[-56.0, -2.0], [-51.0, -10.0], [17.0, -6.0], [4.0, -7.0], [15.0, 
+10.0]], [[4.0, -16.0], [-71.0, 13.0], [-30.0, -4.0], [92.0, 12.0], [7.0, 17.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        res=matrix_mult(arg0,arg1)
-        ref=-ref
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_constData_rank2_array_rank1(self):
-      arg0=Data(numpy.array([[-7.0, -3.0, -3.0], [-1.0, 7.0, -7.0]]),self.functionspace)
-      arg1=numpy.array([2.0, -6.0, -7.0])
-      res=matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([25.0, 5.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-5.0, 1.0, 6.0, -7.0, -6.0], [5.0, 7.0, 5.0, -6.0, -4.0], [-5.0, -7.0, 0.0, 5.0, -4.0], [-3.0, 
+6.0, 0.0, 7.0, 7.0]]),self.functionspace)
+      arg1=Data(numpy.array([[4.0, 2.0, -6.0, -2.0, 0.0], [0.0, -7.0, 0.0, -7.0, -4.0], [5.0, -7.0, 2.0, -5.0, 7.0], [0.0, 5.0, 
+2.0, -5.0, -6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-20.0, -10.0, 30.0, 10.0, 0.0], [0.0, 35.0, 0.0, 35.0, 20.0], [-25.0, 35.0, -10.0, 25.0, -35.0], 
+[0.0, -25.0, -10.0, 25.0, 30.0]], [[4.0, 2.0, -6.0, -2.0, 0.0], [0.0, -7.0, 0.0, -7.0, -4.0], [5.0, -7.0, 2.0, -5.0, 7.0], 
+[0.0, 5.0, 2.0, -5.0, -6.0]], [[24.0, 12.0, -36.0, -12.0, 0.0], [0.0, -42.0, 0.0, -42.0, -24.0], [30.0, -42.0, 12.0, -30.0, 
+42.0], [0.0, 30.0, 12.0, -30.0, -36.0]], [[-28.0, -14.0, 42.0, 14.0, 0.0], [0.0, 49.0, 0.0, 49.0, 28.0], [-35.0, 49.0, -14.0, 
+35.0, -49.0], [0.0, -35.0, -14.0, 35.0, 42.0]], [[-24.0, -12.0, 36.0, 12.0, 0.0], [0.0, 42.0, 0.0, 42.0, 24.0], [-30.0, 42.0, 
+-12.0, 30.0, -42.0], [0.0, -30.0, -12.0, 30.0, 36.0]]], [[[20.0, 10.0, -30.0, -10.0, 0.0], [0.0, -35.0, 0.0, -35.0, -20.0], 
+[25.0, -35.0, 10.0, -25.0, 35.0], [0.0, 25.0, 10.0, -25.0, -30.0]], [[28.0, 14.0, -42.0, -14.0, 0.0], [0.0, -49.0, 0.0, -49.0, 
+-28.0], [35.0, -49.0, 14.0, -35.0, 49.0], [0.0, 35.0, 14.0, -35.0, -42.0]], [[20.0, 10.0, -30.0, -10.0, 0.0], [0.0, -35.0, 0.0, 
+-35.0, -20.0], [25.0, -35.0, 10.0, -25.0, 35.0], [0.0, 25.0, 10.0, -25.0, -30.0]], [[-24.0, -12.0, 36.0, 12.0, 0.0], [0.0, 
+42.0, 0.0, 42.0, 24.0], [-30.0, 42.0, -12.0, 30.0, -42.0], [0.0, -30.0, -12.0, 30.0, 36.0]], [[-16.0, -8.0, 24.0, 8.0, 0.0], 
+[0.0, 28.0, 0.0, 28.0, 16.0], [-20.0, 28.0, -8.0, 20.0, -28.0], [0.0, -20.0, -8.0, 20.0, 24.0]]], [[[-20.0, -10.0, 30.0, 10.0, 
+0.0], [0.0, 35.0, 0.0, 35.0, 20.0], [-25.0, 35.0, -10.0, 25.0, -35.0], [0.0, -25.0, -10.0, 25.0, 30.0]], [[-28.0, -14.0, 42.0, 
+14.0, 0.0], [0.0, 49.0, 0.0, 49.0, 28.0], [-35.0, 49.0, -14.0, 35.0, -49.0], [0.0, -35.0, -14.0, 35.0, 42.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[20.0, 10.0, -30.0, -10.0, 0.0], 
+[0.0, -35.0, 0.0, -35.0, -20.0], [25.0, -35.0, 10.0, -25.0, 35.0], [0.0, 25.0, 10.0, -25.0, -30.0]], [[-16.0, -8.0, 24.0, 8.0, 
+0.0], [0.0, 28.0, 0.0, 28.0, 16.0], [-20.0, 28.0, -8.0, 20.0, -28.0], [0.0, -20.0, -8.0, 20.0, 24.0]]], [[[-12.0, -6.0, 18.0, 
+6.0, 0.0], [0.0, 21.0, 0.0, 21.0, 12.0], [-15.0, 21.0, -6.0, 15.0, -21.0], [0.0, -15.0, -6.0, 15.0, 18.0]], [[24.0, 12.0, 
+-36.0, -12.0, 0.0], [0.0, -42.0, 0.0, -42.0, -24.0], [30.0, -42.0, 12.0, -30.0, 42.0], [0.0, 30.0, 12.0, -30.0, -36.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[28.0, 14.0, -42.0, 
+-14.0, 0.0], [0.0, -49.0, 0.0, -49.0, -28.0], [35.0, -49.0, 14.0, -35.0, 49.0], [0.0, 35.0, 14.0, -35.0, -42.0]], [[28.0, 14.0, 
+-42.0, -14.0, 0.0], [0.0, -49.0, 0.0, -49.0, -28.0], [35.0, -49.0, 14.0, -35.0, 49.0], [0.0, 35.0, 14.0, -35.0, 
+-42.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[-1.0, -3.0, 2.0], [-2.0, 7.0, 0.0]]),self.functionspace)
-      arg1=numpy.array([[0.0, -1.0], [5.0, -1.0], [-1.0, -4.0]])
-      res=matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([[-17.0, -4.0], [35.0, -5.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-4.0, -6.0, 5.0, -3.0, 0.0], [5.0, 5.0, 4.0, 0.0, 2.0], [-2.0, 1.0, -3.0, 5.0, 7.0], [-4.0, 5.0, 
+2.0, 3.0, -2.0]], [[-2.0, -5.0, 5.0, -1.0, -1.0], [-3.0, 0.0, -2.0, 1.0, 5.0], [0.0, 0.0, 2.0, 7.0, -4.0], [2.0, 0.0, 4.0, 7.0, 
+1.0]], [[5.0, 1.0, 2.0, 0.0, 4.0], [-5.0, 2.0, -5.0, -1.0, 0.0], [0.0, -2.0, 6.0, -3.0, 0.0], [-6.0, -5.0, 2.0, 2.0, 
+0.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[5.0, -5.0, 3.0, 1.0, -1.0], [2.0, -1.0, -2.0, 6.0, 4.0], [7.0, 4.0, -2.0, -4.0, 4.0], [7.0, 4.0, 
+-2.0, -1.0, -6.0]], [[0.0, 6.0, -7.0, 6.0, 3.0], [7.0, -3.0, -2.0, 6.0, 6.0], [0.0, -7.0, 6.0, -6.0, -6.0], [-7.0, 4.0, 5.0, 
+0.0, 7.0]], [[7.0, -3.0, 7.0, 5.0, 4.0], [-1.0, 2.0, -1.0, 6.0, -2.0], [-1.0, 0.0, -2.0, 5.0, -2.0], [-2.0, -4.0, 5.0, 4.0, 
+5.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[15.0, -7.0, 37.0, 9.0, 18.0], [-27.0, 20.0, 7.0, -6.0, -38.0], [-33.0, -2.0, -14.0, 53.0, 
+-14.0], [-24.0, -44.0, 23.0, 24.0, 35.0]], [[-23.0, -3.0, 24.0, -31.0, -5.0], [-48.0, 23.0, 21.0, -60.0, -56.0], [-43.0, 11.0, 
+-20.0, 59.0, 4.0], [-9.0, -48.0, -8.0, 10.0, 6.0]], [[39.0, -1.0, -6.0, 45.0, 18.0], [43.0, -16.0, -22.0, 72.0, 46.0], [33.0, 
+-15.0, 16.0, -40.0, -14.0], [-4.0, 32.0, 25.0, 3.0, 15.0]], [[-15.0, 9.0, -2.0, -9.0, 0.0], [-13.0, 6.0, 8.0, -24.0, -18.0], 
+[-21.0, -5.0, 0.0, 18.0, -6.0], [-14.0, -16.0, 1.0, 3.0, 11.0]], [[28.0, -18.0, 35.0, 14.0, 13.0], [-11.0, 11.0, -2.0, 18.0, 
+-14.0], [-4.0, 7.0, -14.0, 26.0, -2.0], [-1.0, -20.0, 15.0, 16.0, 13.0]]], [[[-10.0, -28.0, 1.0, -38.0, -34.0], [-6.0, -6.0, 
+1.0, -18.0, 12.0], [40.0, 41.0, -18.0, -27.0, 48.0], [66.0, 28.0, -50.0, -25.0, -76.0]], [[39.0, -31.0, 29.0, 15.0, 3.0], [8.0, 
+-1.0, -12.0, 42.0, 16.0], [33.0, 20.0, -14.0, -10.0, 16.0], [31.0, 12.0, 0.0, 3.0, -20.0]], [[-15.0, -17.0, -9.0, -33.0, 
+-30.0], [-1.0, -8.0, 1.0, -18.0, 14.0], [33.0, 30.0, -10.0, -29.0, 38.0], [52.0, 28.0, -43.0, -24.0, -63.0]], [[-7.0, 9.0, 
+-14.0, 1.0, -1.0], [8.0, -5.0, -1.0, 0.0, 8.0], [1.0, -7.0, 8.0, -11.0, -4.0], [-5.0, 8.0, 0.0, -4.0, 2.0]], [[10.0, 20.0, 
+-29.0, 32.0, 13.0], [39.0, -17.0, -14.0, 42.0, 38.0], [14.0, -27.0, 26.0, -38.0, -22.0], [-21.0, 28.0, 21.0, -2.0, 23.0]]], 
+[[[-10.0, 10.0, -6.0, -2.0, 2.0], [-4.0, 2.0, 4.0, -12.0, -8.0], [-14.0, -8.0, 4.0, 8.0, -8.0], [-14.0, -8.0, 4.0, 2.0, 12.0]], 
+[[-9.0, 1.0, -11.0, -9.0, -9.0], [4.0, -5.0, 0.0, -6.0, 8.0], [9.0, 4.0, 2.0, -14.0, 8.0], [11.0, 12.0, -12.0, -9.0, -16.0]], 
+[[27.0, 9.0, 19.0, 39.0, 33.0], [2.0, 9.0, -4.0, 30.0, -12.0], [-27.0, -26.0, 6.0, 30.0, -36.0], [-47.0, -28.0, 46.0, 27.0, 
+62.0]], [[4.0, 26.0, -55.0, 32.0, 4.0], [62.0, -32.0, -21.0, 54.0, 68.0], [38.0, -29.0, 38.0, -77.0, -16.0], [-8.0, 60.0, 10.0, 
+-17.0, 4.0]], [[35.0, -59.0, 49.0, -17.0, -19.0], [-14.0, 5.0, -6.0, 18.0, 4.0], [49.0, 56.0, -38.0, -4.0, 52.0], [77.0, 12.0, 
+-34.0, -7.0, -70.0]]], [[[-62.0, 50.0, -68.0, -22.0, -14.0], [12.0, -14.0, 10.0, -48.0, 8.0], [-22.0, -30.0, 32.0, -26.0, 
+-16.0], [-30.0, 16.0, -12.0, -20.0, 8.0]], [[-10.0, -10.0, -20.0, -20.0, -25.0], [15.0, -15.0, -5.0, 0.0, 30.0], [40.0, 20.0, 
+0.0, -45.0, 30.0], [45.0, 40.0, -35.0, -25.0, -55.0]], [[24.0, 8.0, -8.0, 36.0, 18.0], [30.0, -10.0, -14.0, 48.0, 28.0], [12.0, 
+-20.0, 16.0, -22.0, -20.0], [-18.0, 16.0, 26.0, 6.0, 26.0]], [[29.0, 21.0, -26.0, 55.0, 26.0], [53.0, -20.0, -22.0, 72.0, 
+50.0], [19.0, -37.0, 32.0, -44.0, -34.0], [-32.0, 32.0, 39.0, 5.0, 41.0]], [[-10.0, 16.0, -13.0, 4.0, 5.0], [3.0, -1.0, 2.0, 
+-6.0, -2.0], [-14.0, -15.0, 10.0, 2.0, -14.0], [-21.0, -4.0, 9.0, 2.0, 19.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_constData_rank2_constData_rank1(self):
-      arg0=Data(numpy.array([[0.0, -2.0, 3.0], [-6.0, -7.0, -1.0]]),self.functionspace)
-      arg1=Data(numpy.array([0.0, -3.0, -4.0]),self.functionspace)
-      res=matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([-6.0, 25.0]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[-5.0, 5.0, -2.0], [3.0, 5.0, -5.0]]),self.functionspace)
-      arg1=Data(numpy.array([[5.0, -4.0], [-6.0, 6.0], [-4.0, -2.0]]),self.functionspace)
-      res=matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([[-47.0, 54.0], [5.0, 28.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-2.0, 3.0, -3.0, 5.0, -2.0], [7.0, 5.0, 1.0, 6.0, -6.0], [2.0, -7.0, 7.0, -6.0, 7.0], [7.0, 
+1.0, -1.0, -1.0, -1.0]], [[0.0, -7.0, 5.0, 5.0, -1.0], [4.0, 4.0, 6.0, -7.0, -4.0], [0.0, 0.0, 0.0, -3.0, 2.0], [4.0, -3.0, 
+5.0, 5.0, 0.0]], [[7.0, -3.0, 1.0, 5.0, -5.0], [-7.0, -5.0, -3.0, 1.0, 5.0], [-1.0, -3.0, 3.0, 7.0, -7.0], [-2.0, 0.0, 7.0, 
+-6.0, 5.0]]], [[[3.0, 0.0, -7.0, -4.0, 7.0], [4.0, 7.0, -2.0, 2.0, -3.0], [-4.0, 6.0, -2.0, 0.0, 4.0], [-5.0, -6.0, 6.0, -6.0, 
+-4.0]], [[-4.0, -4.0, -3.0, -1.0, 5.0], [-4.0, -6.0, 2.0, -5.0, 4.0], [4.0, -2.0, 2.0, 5.0, 3.0], [-7.0, 0.0, 5.0, 0.0, -5.0]], 
+[[0.0, -5.0, 0.0, -3.0, -2.0], [-1.0, -2.0, -6.0, -5.0, -4.0], [4.0, -3.0, -1.0, 4.0, 3.0], [-6.0, 3.0, -5.0, 3.0, 
+5.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-7.0, -7.0, -5.0, -3.0, 0.0], [-2.0, 3.0, 1.0, -2.0, 7.0], [1.0, 4.0, -1.0, 4.0, -6.0], [7.0, 
+3.0, 5.0, -1.0, 5.0]], [[0.0, 0.0, -5.0, 1.0, 6.0], [2.0, -5.0, -4.0, -2.0, 5.0], [-3.0, 0.0, -2.0, 2.0, -5.0], [5.0, 5.0, 2.0, 
+-4.0, 0.0]], [[0.0, -2.0, 4.0, -5.0, -6.0], [-7.0, 3.0, 0.0, 3.0, 4.0], [2.0, 3.0, -1.0, 6.0, -5.0], [-6.0, 1.0, -6.0, -1.0, 
+-6.0]]], [[[-7.0, -1.0, 1.0, 6.0, -2.0], [5.0, 0.0, -2.0, 1.0, -2.0], [-6.0, -6.0, 0.0, -3.0, 7.0], [0.0, -6.0, 1.0, -2.0, 
+-2.0]], [[6.0, -1.0, -5.0, 2.0, 0.0], [-3.0, 6.0, 5.0, 0.0, 7.0], [-1.0, -7.0, 6.0, 0.0, -5.0], [3.0, -4.0, -6.0, -4.0, 5.0]], 
+[[6.0, 1.0, -4.0, -5.0, -2.0], [-6.0, 4.0, 3.0, -4.0, -7.0], [6.0, 0.0, 7.0, 3.0, -5.0], [-1.0, 2.0, -1.0, -5.0, 
+-3.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-31.0, 1.0, 61.0, -19.0, -48.0], [-18.0, -9.0, -28.0, 28.0, -20.0], [-2.0, 23.0, -29.0, 25.0, 
+18.0], [-68.0, -1.0, -25.0, 5.0, -78.0]], [[-75.0, -16.0, 48.0, 16.0, -14.0], [43.0, -9.0, -4.0, 19.0, -19.0], [-8.0, 31.0, 
+-45.0, -35.0, 77.0], [-3.0, -23.0, 48.0, 69.0, 28.0]], [[52.0, 29.0, 2.0, -39.0, 38.0], [-17.0, -49.0, -24.0, -8.0, 1.0], 
+[29.0, 54.0, -26.0, 25.0, -46.0], [-11.0, 71.0, 0.0, 8.0, -22.0]], [[-31.0, -43.0, -17.0, -46.0, 14.0], [-34.0, -13.0, -21.0, 
+3.0, 102.0], [7.0, 66.0, -47.0, 63.0, -88.0], [30.0, 67.0, 10.0, -3.0, 7.0]], [[-17.0, 10.0, -15.0, 92.0, 14.0], [69.0, 6.0, 
+7.0, 6.0, -4.0], [-68.0, -100.0, 25.0, -67.0, 76.0], [28.0, -82.0, -3.0, -13.0, 37.0]]], [[[-107.0, -36.0, -55.0, 39.0, 60.0], 
+[81.0, -48.0, -40.0, -35.0, 12.0], [-45.0, 11.0, -39.0, -21.0, 26.0], [100.0, 24.0, 114.0, -3.0, 52.0]], [[-132.0, -28.0, 
+-20.0, 54.0, 44.0], [98.0, -64.0, -61.0, -18.0, -7.0], [-65.0, 5.0, -58.0, -29.0, 64.0], [69.0, 8.0, 108.0, 4.0, 17.0]], 
+[[-17.0, -7.0, -35.0, 40.0, 70.0], [51.0, -48.0, -27.0, -1.0, 85.0], [-49.0, -7.0, -40.0, -14.0, -15.0], [67.0, 22.0, 27.0, 
+4.0, 55.0]], [[-116.0, -46.0, 56.0, -3.0, -42.0], [22.0, 6.0, -10.0, 27.0, 7.0], [-8.0, 50.0, -58.0, -5.0, 58.0], [-9.0, -18.0, 
+47.0, 62.0, 10.0]], [[63.0, 27.0, 63.0, -1.0, -40.0], [-34.0, 25.0, 24.0, 48.0, 20.0], [6.0, -19.0, 5.0, -5.0, 10.0], [-76.0, 
+-39.0, -91.0, 27.0, -22.0]]], [[[62.0, -8.0, -54.0, -37.0, 6.0], [-53.0, 43.0, 42.0, -27.0, 18.0], [44.0, 1.0, 51.0, 26.0, 
+-75.0], [28.0, 21.0, -16.0, -29.0, 32.0]], [[-23.0, 48.0, 51.0, 83.0, 12.0], [89.0, -54.0, -38.0, 23.0, -66.0], [-65.0, -59.0, 
+-23.0, -73.0, 124.0], [-34.0, -58.0, 4.0, 21.0, -30.0]], [[-29.0, -56.0, -31.0, -39.0, -12.0], [-45.0, 38.0, 18.0, -3.0, 86.0], 
+[17.0, 35.0, -5.0, 49.0, -76.0], [38.0, 26.0, 4.0, -9.0, 34.0]], [[96.0, 27.0, 32.0, -30.0, -68.0], [-82.0, 64.0, 43.0, 23.0, 
+-22.0], [36.0, -38.0, 63.0, 24.0, -29.0], [-88.0, -38.0, -112.0, -29.0, -59.0]], [[-41.0, -39.0, -96.0, 31.0, 40.0], [32.0, 
+20.0, 15.0, -47.0, 23.0], [-22.0, -38.0, 35.0, -13.0, -19.0], [107.0, -6.0, 64.0, -43.0, 75.0]]], [[[-92.0, -39.0, -9.0, -21.0, 
+58.0], [40.0, -71.0, -52.0, -9.0, 64.0], [-8.0, 101.0, -97.0, 21.0, -22.0], [66.0, 85.0, 98.0, 47.0, 40.0]], [[53.0, 2.0, -8.0, 
+-57.0, -12.0], [-56.0, 30.0, 34.0, -14.0, -17.0], [64.0, 40.0, 26.0, 25.0, -48.0], [-11.0, 30.0, -10.0, 8.0, 8.0]], [[-35.0, 
+-23.0, 9.0, 44.0, -14.0], [8.0, 3.0, -23.0, 39.0, 104.0], [-73.0, -54.0, -21.0, 15.0, -12.0], [-4.0, -37.0, -56.0, -33.0, 
+-19.0]], [[67.0, 28.0, -62.0, -13.0, 72.0], [6.0, -34.0, 0.0, -44.0, -15.0], [26.0, 14.0, 18.0, -3.0, -46.0], [51.0, 58.0, 
+32.0, -16.0, 34.0]], [[35.0, 11.0, 26.0, -81.0, -32.0], [-68.0, 2.0, -3.0, -7.0, -49.0], [68.0, 70.0, 1.0, 53.0, -47.0], 
+[-57.0, 56.0, -14.0, -1.0, -67.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_constData_rank2_expandedData_rank1(self):
-      arg0=Data(numpy.array([[-7.0, 2.0, 2.0], [4.0, -5.0, 2.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-3.0, 4.0, -7.0, 1.0, 2.0], [4.0, 4.0, 4.0, 4.0, 3.0], [-2.0, 1.0, 0.0, -1.0, 1.0], [2.0, 3.0, 
+-3.0, -4.0, 4.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([3.0, 5.0, 4.0])+(1.-msk_arg1)*numpy.array([-4.0, 0.0, -4.0])
-      res=matrix_mult(arg0,arg1)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-3.0, -5.0])+(1.-msk_ref)*numpy.array([20.0, -24.0])
+      ref=msk_ref*numpy.array([[-0.0, 0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 
+-0.0, -0.0, 0.0]])+(1.-msk_ref)*numpy.array([[6.0, -8.0, 14.0, -2.0, -4.0], [-8.0, -8.0, -8.0, -8.0, -6.0], [4.0, -2.0, -0.0, 
+2.0, -2.0], [-4.0, -6.0, 6.0, 8.0, -8.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[2.0, -3.0, 3.0], [6.0, -1.0, 6.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-6.0, 1.0, -4.0, -7.0, 7.0], [1.0, 2.0, 3.0, -3.0, 1.0], [7.0, 0.0, 0.0, 4.0, -5.0], [2.0, 6.0, 
+-4.0, 1.0, -2.0]], [[4.0, 3.0, -6.0, 3.0, -3.0], [4.0, 7.0, -1.0, 7.0, 0.0], [-5.0, 3.0, 7.0, 0.0, 5.0], [0.0, 6.0, -1.0, 1.0, 
+-1.0]], [[4.0, 6.0, -2.0, -5.0, -1.0], [6.0, -1.0, 2.0, -4.0, 2.0], [3.0, -7.0, 0.0, 2.0, -5.0], [1.0, 3.0, 6.0, 2.0, 
+6.0]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[4.0, 0.0], [0.0, 7.0], [1.0, -3.0]])+(1.-msk_arg1)*numpy.array([[6.0, 3.0], [5.0, 5.0], 
-[-3.0, -4.0]])
-      res=matrix_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([2.0, 7.0, -7.0])+(1.-msk_arg1)*numpy.array([0.0, -5.0, 7.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[11.0, -30.0], [30.0, -25.0]])+(1.-msk_ref)*numpy.array([[-12.0, -21.0], [13.0, -11.0]])
+      ref=msk_ref*numpy.array([[-12.0, -19.0, -36.0, 42.0, 0.0], [-12.0, 60.0, -15.0, 71.0, -12.0], [-42.0, 70.0, 49.0, -6.0, 
+60.0], [-3.0, 33.0, -57.0, -5.0, -53.0]])+(1.-msk_ref)*numpy.array([[8.0, 27.0, 16.0, -50.0, 8.0], [22.0, -42.0, 19.0, -63.0, 
+14.0], [46.0, -64.0, -35.0, 14.0, -60.0], [7.0, -9.0, 47.0, 9.0, 47.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_expandedData_rank2_array_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-2.0, 5.0, 0.0], [-7.0, -1.0, 2.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 0.0, 6.0], [-7.0, 
--3.0, 7.0]])
-      arg1=numpy.array([-4.0, 6.0, 6.0])
-      res=matrix_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[2.0, 1.0, -1.0, 5.0, 7.0], [-6.0, -3.0, 6.0, -3.0, -2.0], [5.0, -2.0, -2.0, -7.0, -7.0], [-3.0, 
+-5.0, -7.0, 6.0, 3.0]], [[1.0, 4.0, 7.0, -4.0, -5.0], [-6.0, -2.0, -3.0, -1.0, -6.0], [6.0, 7.0, 6.0, -4.0, 6.0], [-7.0, 6.0, 
+5.0, -6.0, 2.0]], [[-2.0, -3.0, -4.0, 3.0, -5.0], [-7.0, -2.0, 1.0, -4.0, -2.0], [4.0, 1.0, 3.0, -2.0, 0.0], [-6.0, -1.0, 6.0, 
+2.0, -1.0]]], [[[7.0, 1.0, -3.0, 0.0, 6.0], [-2.0, 3.0, -1.0, 5.0, 7.0], [2.0, 0.0, 5.0, -3.0, 6.0], [3.0, 6.0, 2.0, -1.0, 
+3.0]], [[-5.0, 1.0, 6.0, 2.0, 4.0], [-6.0, -7.0, 1.0, -1.0, 0.0], [-2.0, 2.0, 1.0, -2.0, -7.0], [3.0, 4.0, 3.0, 3.0, -3.0]], 
+[[-1.0, 4.0, -7.0, 6.0, -3.0], [6.0, -7.0, 0.0, 4.0, -2.0], [-2.0, -1.0, -1.0, 3.0, -1.0], [-1.0, 1.0, -2.0, -1.0, 
+0.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, 0.0, 0.0], [-5.0, 2.0, 3.0]])+(1.-msk_arg1)*numpy.array([[3.0, -7.0, 5.0], [-1.0, -1.0, 
+-1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([38.0, 34.0])+(1.-msk_ref)*numpy.array([56.0, 52.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_expandedData_rank2_array_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, -1.0, -6.0], [2.0, -7.0, 2.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 0.0, 0.0], [3.0, 2.0, 
--7.0]])
-      arg1=numpy.array([[3.0, 5.0], [-7.0, -2.0], [7.0, 6.0]])
-      res=matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-44.0, -49.0], [69.0, 36.0]])+(1.-msk_ref)*numpy.array([[-15.0, -25.0], [-54.0, -31.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=matrix_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_expandedData_rank2_constData_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[1.0, -2.0, 4.0], [-6.0, 2.0, -7.0]])+(1.-msk_arg0)*numpy.array([[4.0, -3.0, -1.0], [7.0, 3.0, 
-0.0]])
-      arg1=Data(numpy.array([0.0, -1.0, -1.0]),self.functionspace)
-      res=matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-2.0, 5.0])+(1.-msk_ref)*numpy.array([4.0, -3.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_expandedData_rank2_constData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, 6.0, -1.0], [3.0, 3.0, 5.0]])+(1.-msk_arg0)*numpy.array([[0.0, -2.0, 0.0], [4.0, -3.0, 
--3.0]])
-      arg1=Data(numpy.array([[-6.0, 0.0], [6.0, 4.0], [-4.0, 4.0]]),self.functionspace)
-      res=matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[70.0, 20.0], [-20.0, 32.0]])+(1.-msk_ref)*numpy.array([[-12.0, -8.0], [-30.0, -24.0]])
+      ref=msk_ref*numpy.array([[-46.0, 10.0, 5.0, 27.0, -24.0], [10.0, -53.0, 13.0, -18.0, -43.0], [-15.0, -1.0, -28.0, 13.0, 
+-54.0], [-15.0, -24.0, -17.0, 14.0, -18.0]])+(1.-msk_ref)*numpy.array([[-12.0, -46.0, -68.0, 50.0, 24.0], [-9.0, 6.0, 44.0, 
+-30.0, 21.0], [-5.0, -51.0, -38.0, -1.0, -61.0], [5.0, -73.0, -29.0, 69.0, -10.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_expandedData_rank2_expandedData_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, -6.0, -6.0], [0.0, -3.0, -7.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 0.0, -2.0], [3.0, 
-0.0, 1.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[5.0, -6.0, -1.0, -6.0, -1.0], [-7.0, 2.0, 7.0, -7.0, 5.0], [-3.0, -7.0, -2.0, -3.0, 0.0], [2.0, 
+-4.0, -3.0, -4.0, -5.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, -5.0, -1.0])+(1.-msk_arg1)*numpy.array([-1.0, 0.0, 4.0])
-      res=matrix_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([-5.0, 3.0])+(1.-msk_arg1)*numpy.array([6.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([36.0, 22.0])+(1.-msk_ref)*numpy.array([-4.0, 1.0])
+      ref=msk_ref*numpy.array([[[-25.0, 15.0], [30.0, -18.0], [5.0, -3.0], [30.0, -18.0], [5.0, -3.0]], [[35.0, -21.0], [-10.0, 
+6.0], [-35.0, 21.0], [35.0, -21.0], [-25.0, 15.0]], [[15.0, -9.0], [35.0, -21.0], [10.0, -6.0], [15.0, -9.0], [0.0, 0.0]], 
+[[-10.0, 6.0], [20.0, -12.0], [15.0, -9.0], [20.0, -12.0], [25.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[30.0, 0.0], [-36.0, 
+0.0], [-6.0, 0.0], [-36.0, 0.0], [-6.0, 0.0]], [[-42.0, 0.0], [12.0, 0.0], [42.0, 0.0], [-42.0, 0.0], [30.0, 0.0]], [[-18.0, 
+0.0], [-42.0, 0.0], [-12.0, 0.0], [-18.0, 0.0], [0.0, 0.0]], [[12.0, 0.0], [-24.0, 0.0], [-18.0, 0.0], [-24.0, 0.0], [-30.0, 
+0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=matrix_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_mult_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 0.0, 0.0], [-1.0, -7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 0.0, 7.0], [3.0, 5.0, 
--7.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-6.0, -4.0, 5.0, 6.0, -1.0], [-4.0, 6.0, 3.0, -7.0, 6.0], [-1.0, 0.0, -4.0, 2.0, 6.0], [5.0, 
+6.0, -3.0, -6.0, 3.0]], [[7.0, -4.0, 3.0, 0.0, 0.0], [5.0, 0.0, -6.0, -5.0, 3.0], [-1.0, -1.0, 0.0, -7.0, -2.0], [-5.0, -3.0, 
+7.0, 5.0, -2.0]], [[1.0, -1.0, 3.0, 1.0, -7.0], [2.0, -5.0, 4.0, -4.0, 7.0], [5.0, 3.0, 4.0, 0.0, 4.0], [-4.0, -3.0, 7.0, 1.0, 
+2.0]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[2.0, 0.0], [-1.0, 7.0], [1.0, -4.0]])+(1.-msk_arg1)*numpy.array([[0.0, 4.0], [0.0, -4.0], 
-[-7.0, -4.0]])
-      res=matrix_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[-2.0, 3.0], [-6.0, 5.0], [4.0, 5.0]])+(1.-msk_arg1)*numpy.array([[1.0, -6.0], [-5.0, 5.0], 
+[-1.0, -7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, 0.0], [5.0, -49.0]])+(1.-msk_ref)*numpy.array([[-49.0, -36.0], [49.0, 20.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_array_rank2_array_rank1(self):
-      arg0=numpy.array([[7.0, 5.0], [-5.0, -5.0], [-1.0, 6.0]])
-      arg1=numpy.array([0.0, 4.0, 3.0])
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=numpy.array([-23.0, -2.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_array_rank2_array_rank2(self):
-      arg0=numpy.array([[-1.0, 3.0], [-7.0, 0.0], [3.0, 0.0]])
-      arg1=numpy.array([[0.0, 2.0], [-3.0, 7.0], [1.0, 5.0]])
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=numpy.array([[24.0, -36.0], [0.0, 6.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_array_rank2_constData_rank1(self):
-      arg0=numpy.array([[0.0, -4.0], [5.0, -6.0], [-4.0, 0.0]])
-      arg1=Data(numpy.array([3.0, -4.0, -2.0]),self.functionspace)
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([-12.0, 12.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[-1.0, -5.0], [-4.0, 2.0], [7.0, -6.0]])
-      arg1=Data(numpy.array([[7.0, -7.0], [0.0, 2.0], [2.0, 0.0]]),self.functionspace)
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([[7.0, -1.0], [-47.0, 39.0]]),self.functionspace)
+      ref=msk_ref*numpy.array([[[-26.0, 22.0], [28.0, -37.0], [-16.0, 45.0], [-8.0, 23.0], [-26.0, -38.0]], [[-14.0, 23.0], 
+[-32.0, -7.0], [46.0, -1.0], [28.0, -66.0], [-2.0, 68.0]], [[28.0, 17.0], [18.0, 10.0], [24.0, 8.0], [38.0, -29.0], [16.0, 
+28.0]], [[4.0, -30.0], [-6.0, -12.0], [-8.0, 61.0], [-14.0, 12.0], [14.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[-42.0, 64.0], 
+[17.0, 11.0], [-13.0, -36.0], [5.0, -43.0], [6.0, 55.0]], [[-31.0, 35.0], [11.0, -1.0], [29.0, -76.0], [22.0, 45.0], [-16.0, 
+-70.0]], [[-1.0, -34.0], [2.0, -26.0], [-8.0, -4.0], [37.0, -47.0], [12.0, -74.0]], [[34.0, -27.0], [24.0, -30.0], [-45.0, 
+4.0], [-32.0, 54.0], [11.0, -42.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_array_rank2_expandedData_rank1(self):
-      arg0=numpy.array([[6.0, 3.0], [-5.0, -2.0], [5.0, 7.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 3.0, -2.0, 0.0, 7.0], [2.0, 0.0, -5.0, -6.0, 5.0], [-4.0, -1.0, -2.0, -7.0, 0.0], [5.0, 
+0.0, -4.0, 7.0, 0.0]], [[5.0, 4.0, 6.0, 3.0, 7.0], [7.0, 7.0, -3.0, -4.0, 0.0], [6.0, -4.0, 4.0, -3.0, 6.0], [-4.0, -6.0, -3.0, 
+-4.0, 6.0]], [[-5.0, 6.0, 2.0, 0.0, 2.0], [3.0, 0.0, 2.0, -5.0, -4.0], [-6.0, 5.0, -7.0, 1.0, 5.0], [-6.0, 2.0, -3.0, -6.0, 
+-3.0]]], [[[0.0, -6.0, -2.0, -7.0, -6.0], [0.0, -5.0, -2.0, -5.0, 2.0], [6.0, 3.0, 3.0, 6.0, -2.0], [6.0, -6.0, -5.0, -6.0, 
+0.0]], [[0.0, -5.0, 4.0, 1.0, -5.0], [-4.0, 6.0, -4.0, 0.0, -1.0], [3.0, 0.0, -1.0, 7.0, -3.0], [2.0, -3.0, -4.0, 5.0, 3.0]], 
+[[5.0, -5.0, 4.0, -6.0, 3.0], [1.0, 4.0, 6.0, 7.0, 7.0], [-7.0, -3.0, 5.0, 3.0, -2.0], [2.0, 0.0, 3.0, 0.0, 
+0.0]]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 0.0, 4.0])+(1.-msk_arg1)*numpy.array([2.0, -4.0, 3.0])
-      res=transposed_matrix_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[[0.0, -6.0], [-3.0, 5.0], [0.0, 0.0]], [[6.0, 2.0], [4.0, 7.0], [-6.0, 
+-1.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 1.0], [7.0, 7.0], [-7.0, 3.0]], [[4.0, -7.0], [1.0, -7.0], [4.0, -5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([20.0, 28.0])+(1.-msk_ref)*numpy.array([47.0, 35.0])
+      ref=msk_ref*numpy.array([[[-45.0, -10.0], [-38.0, -40.0], [-38.0, 62.0], [-11.0, 14.0], [-95.0, -57.0]], [[-43.0, -6.0], 
+[-51.0, 63.0], [-55.0, -23.0], [-60.0, -1.0], [-34.0, -40.0]], [[72.0, 94.0], [48.0, -5.0], [-28.0, 26.0], [55.0, 85.0], 
+[-30.0, 7.0]], [[44.0, -26.0], [-30.0, -63.0], [-55.0, -32.0], [-4.0, -39.0], [-6.0, 51.0]]])+(1.-msk_ref)*numpy.array([[[75.0, 
+0.0], [-72.0, 151.0], [46.0, 12.0], [-30.0, 93.0], [-3.0, 124.0]], [[22.0, 83.0], [51.0, 22.0], [-8.0, -8.0], [33.0, -49.0], 
+[48.0, -49.0]], [[95.0, -8.0], [-60.0, -20.0], [114.0, -34.0], [36.0, -131.0], [-12.0, 102.0]], [[33.0, -107.0], [-83.0, 27.0], 
+[0.0, 14.0], [-26.0, -32.0], [66.0, 12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[-2.0, -3.0], [5.0, 7.0], [-2.0, -7.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[0.0, 3.0, 7.0, 4.0, 6.0], [0.0, -6.0, -4.0, -3.0, -4.0], [-2.0, 1.0, 1.0, -3.0, -6.0], [1.0, 0.0, 
+-3.0, 1.0, 3.0]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 3.0], [-2.0, 2.0], [6.0, -5.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 3.0], [6.0, 3.0], 
-[5.0, -3.0]])
-      res=transposed_matrix_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], [-6.0, -5.0, 0.0, -5.0, 6.0], 
+[-6.0, 0.0, -1.0, -6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, 
+-2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 5.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, 14.0], [-59.0, 40.0]])+(1.-msk_ref)*numpy.array([[34.0, 15.0], [28.0, 33.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_matrix_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_constData_rank2_array_rank1(self):
-      arg0=Data(numpy.array([[-7.0, 1.0], [5.0, 0.0], [3.0, -3.0]]),self.functionspace)
-      arg1=numpy.array([-2.0, 0.0, 7.0])
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([35.0, -23.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[1.0, -7.0], [7.0, 0.0], [-2.0, 4.0]]),self.functionspace)
-      arg1=numpy.array([[3.0, -1.0], [2.0, 7.0], [1.0, -4.0]])
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([[15.0, 56.0], [-17.0, -9.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=transposed_matrix_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_constData_rank2_constData_rank1(self):
-      arg0=Data(numpy.array([[-7.0, 5.0], [1.0, -7.0], [2.0, 1.0]]),self.functionspace)
-      arg1=Data(numpy.array([-2.0, 5.0, -3.0]),self.functionspace)
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([13.0, -48.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[5.0, 1.0], [-7.0, 4.0], [6.0, 7.0]]),self.functionspace)
-      arg1=Data(numpy.array([[-7.0, 1.0], [-5.0, 0.0], [-6.0, -2.0]]),self.functionspace)
-      res=transposed_matrix_mult(arg0,arg1)
-      ref=Data(numpy.array([[-36.0, -7.0], [-69.0, -13.0]]),self.functionspace)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[-15.0, 0.0, 6.0, -9.0, 15.0], [-6.0, 15.0, -15.0, -9.0, -21.0], [-18.0, -15.0, 0.0, -15.0, 18.0], [-18.0, 
+0.0, -3.0, -18.0, -6.0]], [[-35.0, 0.0, 14.0, -21.0, 35.0], [-14.0, 35.0, -35.0, -21.0, -49.0], [-42.0, -35.0, 0.0, -35.0, 
+42.0], [-42.0, 0.0, -7.0, -42.0, -14.0]], [[-20.0, 0.0, 8.0, -12.0, 20.0], [-8.0, 20.0, -20.0, -12.0, -28.0], [-24.0, -20.0, 
+0.0, -20.0, 24.0], [-24.0, 0.0, -4.0, -24.0, -8.0]], [[-30.0, 0.0, 12.0, -18.0, 30.0], [-12.0, 30.0, -30.0, -18.0, -42.0], 
+[-36.0, -30.0, 0.0, -30.0, 36.0], [-36.0, 0.0, -6.0, -36.0, -12.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[30.0, 0.0, -12.0, 18.0, -30.0], [12.0, -30.0, 30.0, 18.0, 42.0], 
+[36.0, 30.0, 0.0, 30.0, -36.0], [36.0, 0.0, 6.0, 36.0, 12.0]], [[20.0, 0.0, -8.0, 12.0, -20.0], [8.0, -20.0, 20.0, 12.0, 28.0], 
+[24.0, 20.0, 0.0, 20.0, -24.0], [24.0, 0.0, 4.0, 24.0, 8.0]], [[15.0, 0.0, -6.0, 9.0, -15.0], [6.0, -15.0, 15.0, 9.0, 21.0], 
+[18.0, 15.0, 0.0, 15.0, -18.0], [18.0, 0.0, 3.0, 18.0, 6.0]], [[20.0, 0.0, -8.0, 12.0, -20.0], [8.0, -20.0, 20.0, 12.0, 28.0], 
+[24.0, 20.0, 0.0, 20.0, -24.0], [24.0, 0.0, 4.0, 24.0, 8.0]]], [[[10.0, 0.0, -4.0, 6.0, -10.0], [4.0, -10.0, 10.0, 6.0, 14.0], 
+[12.0, 10.0, 0.0, 10.0, -12.0], [12.0, 0.0, 2.0, 12.0, 4.0]], [[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], 
+[-6.0, -5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], 
+[-6.0, -5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[15.0, 0.0, -6.0, 9.0, -15.0], [6.0, -15.0, 15.0, 9.0, 21.0], 
+[18.0, 15.0, 0.0, 15.0, -18.0], [18.0, 0.0, 3.0, 18.0, 6.0]], [[30.0, 0.0, -12.0, 18.0, -30.0], [12.0, -30.0, 30.0, 18.0, 
+42.0], [36.0, 30.0, 0.0, 30.0, -36.0], [36.0, 0.0, 6.0, 36.0, 12.0]]], [[[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, 
+-7.0], [-6.0, -5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[15.0, 0.0, -6.0, 9.0, -15.0], [6.0, -15.0, 15.0, 9.0, 21.0], [18.0, 
+15.0, 0.0, 15.0, -18.0], [18.0, 0.0, 3.0, 18.0, 6.0]], [[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], [-6.0, 
+-5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[-15.0, 0.0, 6.0, -9.0, 15.0], [-6.0, 15.0, -15.0, -9.0, -21.0], 
+[-18.0, -15.0, 0.0, -15.0, 18.0], [-18.0, 0.0, -3.0, -18.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[21.0, -21.0, 21.0, -15.0, -3.0], [-21.0, 
+-15.0, 6.0, -18.0, 12.0], [18.0, -6.0, 3.0, 6.0, 0.0], [0.0, 15.0, -12.0, 18.0, 15.0]], [[49.0, -49.0, 49.0, -35.0, -7.0], 
+[-49.0, -35.0, 14.0, -42.0, 28.0], [42.0, -14.0, 7.0, 14.0, 0.0], [0.0, 35.0, -28.0, 42.0, 35.0]], [[28.0, -28.0, 28.0, -20.0, 
+-4.0], [-28.0, -20.0, 8.0, -24.0, 16.0], [24.0, -8.0, 4.0, 8.0, 0.0], [0.0, 20.0, -16.0, 24.0, 20.0]], [[42.0, -42.0, 42.0, 
+-30.0, -6.0], [-42.0, -30.0, 12.0, -36.0, 24.0], [36.0, -12.0, 6.0, 12.0, 0.0], [0.0, 30.0, -24.0, 36.0, 30.0]]], [[[0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-42.0, 42.0, -42.0, 30.0, 
+6.0], [42.0, 30.0, -12.0, 36.0, -24.0], [-36.0, 12.0, -6.0, -12.0, 0.0], [0.0, -30.0, 24.0, -36.0, -30.0]], [[-28.0, 28.0, 
+-28.0, 20.0, 4.0], [28.0, 20.0, -8.0, 24.0, -16.0], [-24.0, 8.0, -4.0, -8.0, 0.0], [0.0, -20.0, 16.0, -24.0, -20.0]], [[-21.0, 
+21.0, -21.0, 15.0, 3.0], [21.0, 15.0, -6.0, 18.0, -12.0], [-18.0, 6.0, -3.0, -6.0, 0.0], [0.0, -15.0, 12.0, -18.0, -15.0]], 
+[[-28.0, 28.0, -28.0, 20.0, 4.0], [28.0, 20.0, -8.0, 24.0, -16.0], [-24.0, 8.0, -4.0, -8.0, 0.0], [0.0, -20.0, 16.0, -24.0, 
+-20.0]]], [[[-14.0, 14.0, -14.0, 10.0, 2.0], [14.0, 10.0, -4.0, 12.0, -8.0], [-12.0, 4.0, -2.0, -4.0, 0.0], [0.0, -10.0, 8.0, 
+-12.0, -10.0]], [[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 
+5.0]], [[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 5.0]], 
+[[-21.0, 21.0, -21.0, 15.0, 3.0], [21.0, 15.0, -6.0, 18.0, -12.0], [-18.0, 6.0, -3.0, -6.0, 0.0], [0.0, -15.0, 12.0, -18.0, 
+-15.0]], [[-42.0, 42.0, -42.0, 30.0, 6.0], [42.0, 30.0, -12.0, 36.0, -24.0], [-36.0, 12.0, -6.0, -12.0, 0.0], [0.0, -30.0, 
+24.0, -36.0, -30.0]]], [[[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, 
+-4.0, 6.0, 5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
+[[-21.0, 21.0, -21.0, 15.0, 3.0], [21.0, 15.0, -6.0, 18.0, -12.0], [-18.0, 6.0, -3.0, -6.0, 0.0], [0.0, -15.0, 12.0, -18.0, 
+-15.0]], [[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 5.0]], 
+[[21.0, -21.0, 21.0, -15.0, -3.0], [-21.0, -15.0, 6.0, -18.0, 12.0], [18.0, -6.0, 3.0, 6.0, 0.0], [0.0, 15.0, -12.0, 18.0, 
+15.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_constData_rank2_expandedData_rank1(self):
-      arg0=Data(numpy.array([[5.0, -7.0], [0.0, 0.0], [5.0, -7.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[5.0, -6.0, 2.0, 4.0, -4.0], [-5.0, -3.0, 2.0, -5.0, 4.0], [0.0, -7.0, 4.0, -2.0, 7.0], [1.0, 
+-7.0, -6.0, 5.0, -3.0]], [[6.0, -4.0, -6.0, 4.0, 5.0], [-2.0, 4.0, 6.0, 1.0, 7.0], [2.0, 7.0, 3.0, -6.0, 4.0], [3.0, -6.0, 0.0, 
+5.0, -1.0]], [[-3.0, -3.0, 7.0, 2.0, 0.0], [1.0, 0.0, -3.0, 1.0, 3.0], [-7.0, -5.0, -2.0, 3.0, 7.0], [6.0, 3.0, 3.0, 3.0, 
+2.0]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, -3.0, -2.0])+(1.-msk_arg1)*numpy.array([-5.0, -6.0, 4.0])
-      res=transposed_matrix_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[[4.0, -2.0, -2.0, 3.0, 6.0], [-2.0, -1.0, -4.0, 4.0, 1.0], [-2.0, 7.0, -4.0, 4.0, -1.0], 
+[5.0, 4.0, 0.0, 4.0, -6.0]], [[-2.0, 4.0, 1.0, -3.0, 0.0], [4.0, -7.0, 1.0, 3.0, 2.0], [-1.0, 0.0, -4.0, -7.0, 0.0], [-6.0, 
+1.0, 3.0, 3.0, 0.0]], [[-6.0, 0.0, -5.0, 0.0, 5.0], [-3.0, 5.0, 1.0, 4.0, -7.0], [-7.0, -1.0, 7.0, -4.0, -6.0], [4.0, 0.0, 0.0, 
+-6.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, -3.0, 5.0, -5.0, -7.0], [0.0, -4.0, 2.0, -1.0, 3.0], [-5.0, -3.0, 3.0, -4.0, 
+7.0], [-1.0, 5.0, 1.0, 5.0, 0.0]], [[5.0, 0.0, 0.0, 7.0, -2.0], [-5.0, 7.0, 5.0, 7.0, -1.0], [1.0, -6.0, -1.0, -3.0, -6.0], 
+[0.0, -4.0, 2.0, 5.0, 4.0]], [[3.0, -5.0, 1.0, -3.0, -1.0], [-5.0, -4.0, -3.0, 6.0, 3.0], [-4.0, 4.0, -4.0, -1.0, 1.0], [6.0, 
+0.0, -3.0, -5.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([20.0, -28.0])+(1.-msk_ref)*numpy.array([-5.0, 7.0])
+      ref=msk_ref*numpy.array([[[[26.0, 14.0, 11.0, -3.0, 15.0], [23.0, -62.0, -17.0, 26.0, 38.0], [5.0, 38.0, -65.0, -10.0, 
+13.0], [-23.0, 26.0, 18.0, 56.0, -18.0]], [[2.0, -4.0, 23.0, -6.0, -51.0], [5.0, 19.0, 17.0, -48.0, 7.0], [37.0, -39.0, 19.0, 
+16.0, 24.0], [-18.0, -28.0, -12.0, -18.0, 48.0]], [[-22.0, -28.0, -45.0, 24.0, 47.0], [-49.0, 75.0, -7.0, 18.0, -59.0], [-47.0, 
+7.0, 65.0, 22.0, -44.0], [74.0, 2.0, -18.0, -52.0, -40.0]], [[-4.0, 8.0, -14.0, 0.0, 34.0], [2.0, -22.0, -10.0, 36.0, -2.0], 
+[-26.0, 26.0, -18.0, -20.0, -16.0], [4.0, 20.0, 12.0, 16.0, -32.0]], [[-26.0, 28.0, 13.0, -27.0, -24.0], [28.0, -31.0, 21.0, 
+-1.0, 6.0], [3.0, -28.0, -4.0, -51.0, 4.0], [-50.0, -11.0, 15.0, -1.0, 24.0]]], [[[-22.0, 2.0, 3.0, -9.0, -25.0], [-1.0, 24.0, 
+19.0, -22.0, -16.0], [5.0, -36.0, 35.0, -10.0, -1.0], [-9.0, -22.0, -6.0, -32.0, 26.0]], [[-20.0, 22.0, 10.0, -21.0, -18.0], 
+[22.0, -25.0, 16.0, 0.0, 5.0], [2.0, -21.0, -4.0, -40.0, 3.0], [-39.0, -8.0, 12.0, 0.0, 18.0]], [[14.0, 20.0, 17.0, -12.0, 
+-3.0], [29.0, -59.0, -5.0, 14.0, 35.0], [11.0, 17.0, -53.0, -22.0, 16.0], [-38.0, 14.0, 18.0, 44.0, 0.0]], [[-28.0, 14.0, 6.0, 
+-18.0, -25.0], [11.0, 3.0, 22.0, -13.0, -10.0], [2.0, -36.0, 23.0, -31.0, -1.0], [-27.0, -19.0, 3.0, -23.0, 26.0]], [[-16.0, 
+20.0, -16.0, -9.0, 39.0], [11.0, -38.0, -6.0, 49.0, -3.0], [-36.0, 25.0, -23.0, -45.0, -22.0], [-10.0, 23.0, 21.0, 19.0, 
+-36.0]]], [[[38.0, 8.0, 37.0, -6.0, -35.0], [29.0, -49.0, -5.0, -22.0, 53.0], [47.0, 7.0, -57.0, 14.0, 42.0], [-40.0, 2.0, 6.0, 
+48.0, 28.0]], [[-12.0, 42.0, 46.0, -42.0, -67.0], [57.0, -67.0, 30.0, -27.0, 42.0], [42.0, -44.0, -35.0, -57.0, 37.0], [-97.0, 
+-21.0, 21.0, 23.0, 62.0]], [[22.0, 4.0, 5.0, 3.0, 14.0], [10.0, -35.0, -15.0, 17.0, 24.0], [3.0, 30.0, -42.0, 3.0, 8.0], [-6.0, 
+19.0, 9.0, 37.0, -16.0]], [[-14.0, -20.0, -17.0, 12.0, 3.0], [-29.0, 59.0, 5.0, -14.0, -35.0], [-11.0, -17.0, 53.0, 22.0, 
+-16.0], [38.0, -14.0, -18.0, -44.0, 0.0]], [[-22.0, 2.0, -45.0, 9.0, 77.0], [-19.0, 0.0, -17.0, 68.0, -34.0], [-67.0, 42.0, 
+5.0, -28.0, -49.0], [39.0, 32.0, 12.0, -2.0, -70.0]]], [[[-38.0, 10.0, -29.0, -6.0, 36.0], [-8.0, 8.0, 5.0, 37.0, -35.0], 
+[-47.0, 1.0, 26.0, -41.0, -37.0], [11.0, 7.0, 9.0, -23.0, -30.0]], [[-34.0, -10.0, -7.0, -3.0, -27.0], [-19.0, 64.0, 25.0, 
+-34.0, -40.0], [-1.0, -52.0, 73.0, 2.0, -11.0], [13.0, -34.0, -18.0, -64.0, 30.0]], [[-42.0, 12.0, -3.0, -18.0, -21.0], [3.0, 
+21.0, 27.0, -12.0, -27.0], [-9.0, -45.0, 45.0, -36.0, -12.0], [-18.0, -24.0, 0.0, -42.0, 24.0]], [[-8.0, 10.0, -20.0, 0.0, 
+45.0], [1.0, -25.0, -12.0, 47.0, -6.0], [-36.0, 32.0, -19.0, -27.0, -23.0], [7.0, 25.0, 15.0, 17.0, -42.0]], [[-22.0, 2.0, 
+-5.0, -6.0, -8.0], [-4.0, 20.0, 13.0, -7.0, -19.0], [-7.0, -23.0, 30.0, -13.0, -9.0], [-1.0, -13.0, -3.0, -27.0, 
+10.0]]]])+(1.-msk_ref)*numpy.array([[[[51.0, 0.0, 22.0, 26.0, -44.0], [-15.0, 34.0, 49.0, 19.0, 0.0], [-7.0, -63.0, 21.0, 
+-35.0, -4.0], [-23.0, 1.0, 26.0, 70.0, 18.0]], [[-65.0, 33.0, -33.0, 11.0, 53.0], [35.0, 8.0, -23.0, -40.0, -23.0], [38.0, 
+30.0, -2.0, 39.0, -21.0], [-12.0, -14.0, -5.0, -35.0, -22.0]], [[3.0, -41.0, 17.0, -73.0, -9.0], [-5.0, -78.0, -47.0, -2.0, 
+33.0], [-44.0, 58.0, -16.0, 3.0, 57.0], [40.0, 34.0, -31.0, -55.0, -10.0]], [[50.0, -22.0, 22.0, 2.0, -38.0], [-30.0, 4.0, 
+22.0, 36.0, 14.0], [-24.0, -28.0, 0.0, -30.0, 6.0], [8.0, 4.0, 6.0, 30.0, 20.0]], [[1.0, 12.0, -20.0, 55.0, 18.0], [-25.0, 
+51.0, 17.0, 39.0, -17.0], [25.0, -18.0, -17.0, 1.0, -58.0], [4.0, -40.0, 6.0, 5.0, 20.0]]], [[[-37.0, 10.0, -24.0, 8.0, 38.0], 
+[5.0, 2.0, -23.0, -3.0, -10.0], [19.0, 31.0, -17.0, 25.0, -22.0], [11.0, -17.0, -12.0, -40.0, -6.0]], [[2.0, 9.0, -15.0, 43.0, 
+13.0], [-20.0, 40.0, 14.0, 31.0, -13.0], [19.0, -15.0, -13.0, 0.0, -45.0], [3.0, -31.0, 5.0, 5.0, 16.0]], [[33.0, 9.0, 7.0, 
+41.0, -23.0], [-15.0, 46.0, 43.0, 22.0, -9.0], [8.0, -54.0, 12.0, -23.0, -25.0], [-20.0, -14.0, 23.0, 55.0, 18.0]], [[-22.0, 
+10.0, -24.0, 29.0, 32.0], [-10.0, 23.0, -8.0, 18.0, -13.0], [22.0, 13.0, -20.0, 16.0, -40.0], [11.0, -29.0, -6.0, -25.0, 6.0]], 
+[[68.0, -27.0, 23.0, 20.0, -45.0], [-50.0, 21.0, 34.0, 63.0, 14.0], [-25.0, -42.0, -7.0, -40.0, -11.0], [14.0, -8.0, 9.0, 40.0, 
+34.0]]], [[[-11.0, 35.0, -7.0, 35.0, 3.0], [25.0, 42.0, 31.0, -28.0, -23.0], [30.0, -40.0, 26.0, 1.0, -19.0], [-42.0, -8.0, 
+25.0, 45.0, -6.0]], [[-22.0, 46.0, -40.0, 99.0, 40.0], [-10.0, 97.0, 36.0, 26.0, -43.0], [62.0, -41.0, -8.0, 12.0, -96.0], 
+[-23.0, -63.0, 22.0, 25.0, 18.0]], [[33.0, -2.0, 18.0, 7.0, -32.0], [-5.0, 13.0, 29.0, 5.0, 3.0], [-9.0, -38.0, 17.0, -23.0, 
+8.0], [-16.0, 8.0, 16.0, 45.0, 8.0]], [[-33.0, -9.0, -7.0, -41.0, 23.0], [15.0, -46.0, -43.0, -22.0, 9.0], [-8.0, 54.0, -12.0, 
+23.0, 25.0], [20.0, 14.0, -23.0, -55.0, -18.0]], [[83.0, -56.0, 42.0, -28.0, -64.0], [-55.0, -28.0, 13.0, 63.0, 38.0], [-59.0, 
+-17.0, -11.0, -47.0, 32.0], [35.0, 19.0, -6.0, 20.0, 30.0]]], [[[39.0, -33.0, 11.0, -2.0, -19.0], [-45.0, -7.0, -1.0, 56.0, 
+18.0], [-26.0, 3.0, -24.0, -19.0, -5.0], [35.0, -7.0, -11.0, -10.0, 24.0]], [[-63.0, 6.0, -32.0, -16.0, 58.0], [15.0, -26.0, 
+-53.0, -17.0, -6.0], [17.0, 69.0, -27.0, 43.0, -10.0], [25.0, -11.0, -28.0, -80.0, -18.0]], [[-27.0, 3.0, -27.0, 21.0, 39.0], 
+[-15.0, 12.0, -21.0, 24.0, -9.0], [18.0, 30.0, -30.0, 21.0, -39.0], [24.0, -30.0, -15.0, -45.0, 6.0]], [[64.0, -30.0, 28.0, 
+1.0, -48.0], [-40.0, 3.0, 26.0, 48.0, 19.0], [-32.0, -33.0, -2.0, -38.0, 8.0], [13.0, 5.0, 6.0, 35.0, 26.0]], [[-17.0, -1.0, 
+-13.0, 2.0, 21.0], [-5.0, -3.0, -17.0, 8.0, -2.0], [6.0, 23.0, -16.0, 13.0, -13.0], [15.0, -11.0, -11.0, -30.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_matrix_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[-3.0, 1.0], [0.0, 0.0], [-2.0, 4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, -1.0], [7.0, 2.0], [3.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -1.0], [0.0, -1.0], 
-[-6.0, 4.0]])
-      res=transposed_matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[12.0, 15.0], [6.0, -25.0]])+(1.-msk_ref)*numpy.array([[24.0, -5.0], [-28.0, 15.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_expandedData_rank2_array_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-1.0, -3.0], [6.0, -4.0], [6.0, 5.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0], [1.0, -3.0], 
-[-2.0, -3.0]])
-      arg1=numpy.array([1.0, 1.0, 3.0])
-      res=transposed_matrix_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[6.0, -3.0, 3.0, -4.0, 6.0], [-2.0, -1.0, -7.0, 1.0, -2.0], [-5.0, 3.0, 3.0, 4.0, 7.0], [-2.0, 
+4.0, -3.0, -5.0, 6.0]], [[-5.0, 4.0, -2.0, 3.0, 3.0], [-6.0, 5.0, 6.0, -1.0, 5.0], [-1.0, -1.0, -3.0, -7.0, 0.0], [-5.0, 2.0, 
+0.0, 2.0, -6.0]], [[-1.0, -1.0, 1.0, -1.0, 1.0], [-6.0, 7.0, 6.0, 4.0, 6.0], [-1.0, -5.0, -3.0, -6.0, 2.0], [2.0, -3.0, 0.0, 
+-7.0, -4.0]]], [[[-5.0, 0.0, 3.0, -1.0, -1.0], [-5.0, -3.0, -6.0, -6.0, 2.0], [5.0, 7.0, 1.0, 0.0, 0.0], [-3.0, 7.0, -4.0, 0.0, 
+0.0]], [[1.0, 2.0, 6.0, 6.0, 1.0], [5.0, 0.0, -3.0, 0.0, 3.0], [0.0, 3.0, 2.0, -6.0, 0.0], [-1.0, 0.0, -2.0, -3.0, 2.0]], 
+[[7.0, -2.0, 0.0, -3.0, 4.0], [-2.0, 4.0, 6.0, 5.0, 1.0], [0.0, -3.0, -6.0, 1.0, -5.0], [2.0, -5.0, 0.0, 7.0, 
+-4.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[1.0, -2.0, -4.0, 3.0, -6.0], [-3.0, -1.0, -1.0, -1.0, -4.0], [7.0, -7.0, 3.0, 4.0, 0.0], 
+[0.0, -4.0, -1.0, -6.0, 0.0]], [[-2.0, 2.0, 2.0, 0.0, -3.0], [3.0, -2.0, -7.0, -3.0, -6.0], [5.0, 1.0, 4.0, 7.0, 0.0], [-3.0, 
+3.0, -3.0, 5.0, -6.0]], [[1.0, 1.0, 0.0, -5.0, -1.0], [1.0, -3.0, -4.0, 0.0, 3.0], [3.0, -7.0, 0.0, -7.0, -6.0], [-6.0, -2.0, 
+2.0, 0.0, -3.0]]], [[[-5.0, -3.0, -6.0, -6.0, 0.0], [-4.0, -6.0, -7.0, 2.0, -1.0], [-5.0, 7.0, -7.0, 5.0, -7.0], [4.0, 6.0, 
+-4.0, 4.0, 6.0]], [[3.0, -1.0, 0.0, 4.0, -6.0], [3.0, 0.0, -7.0, 5.0, 0.0], [-1.0, -5.0, 6.0, -1.0, -6.0], [-4.0, -1.0, -6.0, 
+1.0, 2.0]], [[3.0, 6.0, -3.0, 2.0, -6.0], [6.0, -2.0, -4.0, -3.0, -7.0], [-3.0, 7.0, 3.0, -3.0, -4.0], [4.0, -3.0, 1.0, 2.0, 
+5.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, -5.0, -5.0, -5.0, 3.0], [-7.0, 0.0, 2.0, -3.0, -2.0], [3.0, -7.0, 2.0, 3.0, 5.0], 
+[3.0, -2.0, -2.0, -1.0, -3.0]], [[5.0, 0.0, -7.0, 1.0, -3.0], [-7.0, 0.0, 6.0, -1.0, 4.0], [6.0, 6.0, -2.0, -6.0, -3.0], [-7.0, 
+-3.0, 6.0, 0.0, 3.0]], [[6.0, 6.0, -2.0, 7.0, 7.0], [-1.0, -4.0, 4.0, 3.0, -4.0], [0.0, 3.0, -3.0, -6.0, -5.0], [-6.0, 4.0, 
+-4.0, -7.0, -3.0]]], [[[-6.0, 2.0, -5.0, -6.0, -5.0], [0.0, 3.0, -1.0, 7.0, -7.0], [-6.0, 3.0, -4.0, 7.0, -1.0], [0.0, 7.0, 
+7.0, 7.0, -1.0]], [[4.0, 2.0, -1.0, -2.0, -1.0], [-1.0, -6.0, 4.0, 7.0, -1.0], [1.0, -1.0, -7.0, 1.0, 4.0], [-1.0, 1.0, 3.0, 
+-5.0, -6.0]], [[-2.0, 6.0, 6.0, 1.0, 4.0], [1.0, -5.0, -6.0, -4.0, -4.0], [-2.0, -4.0, 1.0, 7.0, -4.0], [1.0, -7.0, 2.0, -1.0, 
+7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([23.0, 8.0])+(1.-msk_ref)*numpy.array([-5.0, -11.0])
+      ref=msk_ref*numpy.array([[[[64.0, 33.0, -25.0, 71.0, -68.0], [31.0, 23.0, 33.0, -17.0, -41.0], [17.0, -31.0, 60.0, -51.0, 
+7.0], [25.0, -89.0, 28.0, -66.0, 40.0]], [[-12.0, -1.0, 26.0, 0.0, 7.0], [14.0, 2.0, -27.0, 7.0, -1.0], [0.0, 8.0, 13.0, 27.0, 
+2.0], [-22.0, 30.0, -25.0, 36.0, -27.0]], [[11.0, -24.0, -34.0, 10.0, -49.0], [-8.0, -20.0, -56.0, 39.0, 0.0], [-7.0, -39.0, 
+16.0, 0.0, -63.0], [-12.0, -8.0, -43.0, -10.0, 39.0]], [[3.0, -8.0, 37.0, 17.0, -2.0], [24.0, 13.0, -36.0, 32.0, 17.0], [-8.0, 
+-20.0, 34.0, 10.0, -11.0], [-43.0, 24.0, -42.0, 35.0, -24.0]], [[21.0, 21.0, -24.0, 31.0, -76.0], [23.0, -17.0, -47.0, -24.0, 
+-66.0], [52.0, -30.0, 55.0, 20.0, -21.0], [-7.0, -36.0, -11.0, -16.0, -5.0]]], [[[38.0, -16.0, 32.0, 70.0, 18.0], [5.0, 66.0, 
+76.0, 41.0, 45.0], [-36.0, -24.0, 29.0, -32.0, 49.0], [6.0, -27.0, -4.0, -37.0, 24.0]], [[23.0, 52.0, 20.0, -12.0, -40.0], 
+[61.0, -20.0, -57.0, -32.0, -30.0], [42.0, -30.0, 50.0, -45.0, -37.0], [-53.0, -25.0, 16.0, 27.0, -49.0]], [[26.0, 89.0, 58.0, 
+-15.0, 0.0], [96.0, 1.0, -20.0, -56.0, -26.0], [14.0, 28.0, 45.0, -73.0, 0.0], [-42.0, -17.0, 49.0, 57.0, -66.0]], [[52.0, 
+48.0, 15.0, 29.0, -37.0], [52.0, 15.0, 12.0, -25.0, -15.0], [29.0, -43.0, 56.0, -76.0, -2.0], [-25.0, -66.0, 39.0, -25.0, 
+-17.0]], [[-4.0, 17.0, 3.0, -34.0, -33.0], [34.0, -40.0, -96.0, 3.0, -13.0], [13.0, -17.0, 21.0, -11.0, -72.0], [-51.0, 17.0, 
+-26.0, 50.0, -25.0]]], [[[-29.0, -8.0, -12.0, -40.0, 34.0], [-9.0, -20.0, -19.0, 18.0, 18.0], [-68.0, 76.0, -54.0, 5.0, -29.0], 
+[29.0, 49.0, -14.0, 45.0, 39.0]], [[-35.0, -55.0, -47.0, -2.0, -10.0], [-54.0, -22.0, -34.0, 38.0, -7.0], [-28.0, 26.0, -35.0, 
+81.0, -25.0], [37.0, 43.0, -59.0, 2.0, 54.0]], [[-11.0, -56.0, -6.0, 14.0, 18.0], [-55.0, 18.0, 33.0, 36.0, 38.0], [8.0, -48.0, 
+-16.0, 33.0, 23.0], [-1.0, 7.0, -22.0, -39.0, 7.0]], [[-3.0, -16.0, -33.0, 20.0, 33.0], [-51.0, 26.0, 107.0, -16.0, 1.0], 
+[-22.0, 44.0, -49.0, 12.0, 68.0], [85.0, -22.0, 42.0, -63.0, 53.0]], [[-6.0, -42.0, -13.0, 1.0, -14.0], [-49.0, -3.0, 5.0, 8.0, 
+13.0], [70.0, -98.0, 6.0, 29.0, 8.0], [-32.0, -17.0, -8.0, -52.0, -31.0]]], [[[28.0, 18.0, 10.0, 2.0, 19.0], [14.0, 20.0, 49.0, 
+0.0, 33.0], [-23.0, -7.0, -5.0, -77.0, 7.0], [3.0, -34.0, 41.0, -22.0, 14.0]], [[-53.0, -58.0, -39.0, -25.0, 3.0], [-67.0, 
+-31.0, -35.0, 19.0, -9.0], [9.0, 9.0, -44.0, 101.0, -11.0], [20.0, 53.0, -49.0, 4.0, 14.0]], [[11.0, 20.0, 36.0, 7.0, 30.0], 
+[19.0, 27.0, 45.0, -15.0, 16.0], [1.0, 3.0, 7.0, -30.0, 40.0], [-8.0, -10.0, 31.0, 0.0, -28.0]], [[-4.0, 52.0, 3.0, 22.0, 7.0], 
+[47.0, 8.0, 12.0, -37.0, -62.0], [-64.0, 150.0, -4.0, 25.0, 32.0], [76.0, 22.0, 10.0, 51.0, 38.0]], [[8.0, -54.0, -24.0, 38.0, 
+-2.0], [-58.0, 26.0, 54.0, 34.0, 28.0], [10.0, -58.0, -6.0, 20.0, 28.0], [18.0, -24.0, -12.0, -72.0, 
+32.0]]]])+(1.-msk_ref)*numpy.array([[[[19.0, -2.0, 73.0, -7.0, 78.0], [0.0, -52.0, -55.0, -72.0, -22.0], [5.0, -119.0, 45.0, 
+69.0, 31.0], [65.0, -84.0, -56.0, -46.0, 18.0]], [[11.0, 1.0, -25.0, 6.0, -38.0], [-10.0, 2.0, 34.0, 24.0, 32.0], [21.0, 48.0, 
+-27.0, -39.0, -6.0], [-35.0, 6.0, 36.0, 2.0, -2.0]], [[17.0, 9.0, -24.0, -40.0, 1.0], [-14.0, -31.0, 19.0, 59.0, -45.0], 
+[-15.0, -27.0, -47.0, 42.0, 37.0], [11.0, 31.0, 17.0, -19.0, -57.0]], [[25.0, 6.0, -18.0, 7.0, -41.0], [-1.0, -20.0, 49.0, 
+53.0, 37.0], [24.0, 46.0, -52.0, -46.0, 13.0], [-36.0, 15.0, 35.0, -23.0, -32.0]], [[53.0, 0.0, -25.0, -12.0, 36.0], [-61.0, 
+-33.0, 15.0, -34.0, -14.0], [35.0, -41.0, 4.0, 16.0, 5.0], [-6.0, -51.0, 6.0, -29.0, 11.0]]], [[[-22.0, -38.0, 72.0, -20.0, 
+-18.0], [55.0, -11.0, -27.0, 2.0, 42.0], [-3.0, -52.0, 9.0, 22.0, 71.0], [65.0, -18.0, -32.0, -14.0, -33.0]], [[72.0, 65.0, 
+-5.0, 81.0, 62.0], [-31.0, -57.0, 35.0, -18.0, -1.0], [37.0, 33.0, -17.0, -68.0, -68.0], [-76.0, -34.0, -9.0, -73.0, 28.0]], 
+[[43.0, 89.0, 50.0, 131.0, 60.0], [10.0, -54.0, 4.0, -54.0, 35.0], [36.0, 64.0, 7.0, -96.0, -113.0], [-90.0, -67.0, -13.0, 
+-68.0, 87.0]], [[50.0, 37.0, 54.0, 63.0, 84.0], [1.0, -59.0, -12.0, -52.0, 0.0], [23.0, -39.0, 21.0, -22.0, -26.0], [-9.0, 
+-60.0, -56.0, -76.0, 23.0]], [[49.0, 62.0, -44.0, 40.0, 12.0], [-29.0, -41.0, 54.0, 50.0, -21.0], [13.0, 61.0, -60.0, -48.0, 
+-49.0], [-79.0, 23.0, 35.0, -42.0, -10.0]]], [[[-66.0, 29.0, 9.0, -13.0, -44.0], [43.0, 19.0, -25.0, 48.0, -25.0], [-51.0, 
+41.0, -25.0, 32.0, -22.0], [-2.0, 44.0, 43.0, 47.0, 10.0]], [[-44.0, -43.0, -54.0, -102.0, -73.0], [-15.0, 38.0, 3.0, 59.0, 
+-30.0], [-30.0, -12.0, -29.0, 76.0, 60.0], [40.0, 50.0, 60.0, 69.0, -43.0]], [[-4.0, -63.0, -31.0, -55.0, -34.0], [-5.0, 33.0, 
+19.0, 30.0, 9.0], [-1.0, -23.0, -3.0, 12.0, 70.0], [40.0, 42.0, -11.0, 21.0, -64.0]], [[-77.0, -62.0, 53.0, -56.0, 1.0], [34.0, 
+55.0, -88.0, -69.0, -10.0], [-38.0, -86.0, 83.0, 91.0, 43.0], [104.0, -24.0, -42.0, 67.0, 28.0]], [[57.0, -53.0, -69.0, -26.0, 
+15.0], [-56.0, 17.0, 52.0, 5.0, -2.0], [31.0, -23.0, 3.0, -26.0, 45.0], [4.0, 29.0, -32.0, -16.0, -62.0]]], [[[-13.0, 26.0, 
+69.0, 41.0, 47.0], [50.0, -21.0, -39.0, -19.0, -10.0], [-23.0, -26.0, 21.0, 4.0, -14.0], [20.0, -9.0, -54.0, -30.0, 8.0]], 
+[[-20.0, -54.0, -93.0, -86.0, -70.0], [-44.0, 58.0, 31.0, 46.0, -17.0], [-8.0, 16.0, -20.0, 32.0, 42.0], [11.0, 58.0, 55.0, 
+71.0, -39.0]], [[1.0, 3.0, 37.0, 43.0, 13.0], [23.0, 0.0, -10.0, -33.0, 36.0], [13.0, 11.0, 24.0, -39.0, -19.0], [-7.0, -24.0, 
+-28.0, -15.0, 25.0]], [[-83.0, 19.0, 70.0, -9.0, -39.0], [38.0, 11.0, -80.0, -57.0, 21.0], [-20.0, 1.0, 35.0, 61.0, -36.0], 
+[23.0, -76.0, 55.0, 62.0, 109.0]], [[-8.0, -74.0, -6.0, -72.0, -10.0], [-2.0, 24.0, -8.0, 6.0, -6.0], [-8.0, -76.0, 18.0, 52.0, 
+92.0], [78.0, 20.0, -34.0, 16.0, -64.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_expandedData_rank2_array_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, -2.0], [4.0, -5.0], [-2.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 7.0], [-4.0, 6.0], 
-[6.0, -5.0]])
-      arg1=numpy.array([[-3.0, 3.0], [2.0, 3.0], [5.0, -2.0]])
-      res=transposed_matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-2.0, 16.0], [-29.0, -11.0]])+(1.-msk_ref)*numpy.array([[28.0, -30.0], [-34.0, 49.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[1.0, -3.0], [7.0, 5.0]], [[-2.0, -1.0], [0.0, 7.0]], [[4.0, 1.0], [3.0, 7.0]], [[-6.0, 7.0], 
+[6.0, 2.0]], [[6.0, -2.0], [-6.0, 2.0]], [[1.0, 6.0], [4.0, -3.0]]]),self.functionspace)
+      arg1=6.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[6.0, -18.0], [42.0, 30.0]], [[-12.0, -6.0], [0.0, 42.0]], [[24.0, 6.0], [18.0, 42.0]], [[-36.0, 
+42.0], [36.0, 12.0]], [[36.0, -12.0], [-36.0, 12.0]], [[6.0, 36.0], [24.0, -18.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_expandedData_rank2_constData_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 2.0], [0.0, 3.0], [3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 1.0], [5.0, -1.0], 
-[-6.0, 6.0]])
-      arg1=Data(numpy.array([6.0, 4.0, -5.0]),self.functionspace)
-      res=transposed_matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-15.0, 24.0])+(1.-msk_ref)*numpy.array([44.0, -28.0])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[7.0, 2.0], [7.0, -7.0]], [[-2.0, 6.0], [5.0, 5.0]], [[5.0, 4.0], [0.0, 5.0]], [[7.0, -2.0], 
+[4.0, 5.0]], [[2.0, -3.0], [-3.0, 3.0]], [[6.0, -2.0], [0.0, 0.0]]]),self.functionspace)
+      arg1=numpy.array(5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[35.0, 10.0], [35.0, -35.0]], [[-10.0, 30.0], [25.0, 25.0]], [[25.0, 20.0], [0.0, 25.0]], [[35.0, 
+-10.0], [20.0, 25.0]], [[10.0, -15.0], [-15.0, 15.0]], [[30.0, -10.0], [0.0, 0.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_expandedData_rank2_constData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[1.0, 4.0], [0.0, -7.0], [5.0, 0.0]])+(1.-msk_arg0)*numpy.array([[0.0, -5.0], [1.0, 2.0], 
-[1.0, 7.0]])
-      arg1=Data(numpy.array([[-3.0, 6.0], [-1.0, 0.0], [0.0, 1.0]]),self.functionspace)
-      res=transposed_matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-3.0, 11.0], [-5.0, 24.0]])+(1.-msk_ref)*numpy.array([[-1.0, 1.0], [13.0, -23.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-2.0, 0.0], [-6.0, -6.0]], [[5.0, -2.0], [-2.0, -6.0]], [[6.0, -1.0], [2.0, -3.0]], [[5.0, 
+-3.0], [-3.0, -3.0]], [[4.0, -2.0], [7.0, 2.0]], [[1.0, 4.0], [0.0, 2.0]]], [[[0.0, -1.0], [7.0, -5.0]], [[-2.0, 1.0], [-3.0, 
+-3.0]], [[-4.0, -1.0], [-5.0, 0.0]], [[2.0, -2.0], [4.0, 5.0]], [[4.0, 6.0], [7.0, -6.0]], [[1.0, 4.0], [-4.0, 5.0]]], [[[-3.0, 
+1.0], [1.0, 1.0]], [[-2.0, -3.0], [1.0, 2.0]], [[-2.0, 3.0], [4.0, -6.0]], [[-6.0, -5.0], [0.0, -6.0]], [[1.0, 6.0], [-1.0, 
+1.0]], [[-3.0, -5.0], [0.0, -6.0]]]]),self.functionspace)
+      arg1=numpy.array([0.0, -3.0, 2.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-6.0, 5.0], [-19.0, 17.0]], [[2.0, -9.0], [11.0, 13.0]], [[8.0, 9.0], [23.0, -12.0]], [[-18.0, 
+-4.0], [-12.0, -27.0]], [[-10.0, -6.0], [-23.0, 20.0]], [[-9.0, -22.0], [12.0, -27.0]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_expandedData_rank2_expandedData_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[7.0, 7.0], [2.0, -5.0], [-6.0, 0.0]])+(1.-msk_arg0)*numpy.array([[0.0, 7.0], [0.0, -3.0], 
-[6.0, -3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, 6.0, 7.0])+(1.-msk_arg1)*numpy.array([5.0, -2.0, 7.0])
-      res=transposed_matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-65.0, -65.0])+(1.-msk_ref)*numpy.array([42.0, 20.0])
+   def test_generalTransposedTensorProduct_constData_rank3_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-4.0, -3.0], [-5.0, 5.0]], [[3.0, 0.0], [-3.0, -5.0]], [[-6.0, -7.0], [1.0, 2.0]], [[5.0, -7.0], 
+[3.0, -6.0]], [[-6.0, -1.0], [5.0, 3.0]], [[1.0, 7.0], [7.0, 6.0]]]),self.functionspace)
+      arg1=numpy.array([6.0, -5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-24.0, 20.0], [-18.0, 15.0]], [[-30.0, 25.0], [30.0, -25.0]]], [[[18.0, -15.0], [0.0, 0.0]], 
+[[-18.0, 15.0], [-30.0, 25.0]]], [[[-36.0, 30.0], [-42.0, 35.0]], [[6.0, -5.0], [12.0, -10.0]]], [[[30.0, -25.0], [-42.0, 
+35.0]], [[18.0, -15.0], [-36.0, 30.0]]], [[[-36.0, 30.0], [-6.0, 5.0]], [[30.0, -25.0], [18.0, -15.0]]], [[[6.0, -5.0], [42.0, 
+-35.0]], [[42.0, -35.0], [36.0, -30.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_matrix_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_matrix_mult_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-7.0, -4.0], [-3.0, -5.0], [-5.0, 6.0]])+(1.-msk_arg0)*numpy.array([[2.0, 1.0], [2.0, -5.0], 
-[-5.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, -3.0], [-4.0, 7.0], [0.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 1.0], [5.0, 6.0], 
-[0.0, 2.0]])
-      res=transposed_matrix_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[40.0, 0.0], [36.0, -23.0]])+(1.-msk_ref)*numpy.array([[6.0, 4.0], [-27.0, -25.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[4.0, 7.0], [7.0, -4.0]], [[0.0, 3.0], [-5.0, -5.0]], [[2.0, 6.0], [-6.0, -7.0]], [[4.0, -4.0], 
+[2.0, 0.0]], [[-6.0, -7.0], [0.0, 5.0]], [[4.0, 6.0], [-2.0, 5.0]]], [[[-3.0, 3.0], [-4.0, 6.0]], [[4.0, 0.0], [-5.0, 1.0]], 
+[[-3.0, 5.0], [1.0, -1.0]], [[-7.0, 2.0], [2.0, 7.0]], [[5.0, -5.0], [0.0, 2.0]], [[-6.0, 6.0], [7.0, -7.0]]], [[[-5.0, 0.0], 
+[2.0, 5.0]], [[6.0, 3.0], [-7.0, -7.0]], [[-5.0, -1.0], [1.0, -6.0]], [[4.0, 5.0], [0.0, -7.0]], [[0.0, 5.0], [0.0, 0.0]], 
+[[-4.0, -4.0], [4.0, 0.0]]]]),self.functionspace)
+      arg1=numpy.array([[-2.0, -3.0], [-3.0, 5.0], [4.0, 6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-19.0, -57.0], [-23.0, -6.0]], [[6.0, -29.0], [10.0, 72.0]]], [[[12.0, 56.0], [6.0, 9.0]], 
+[[-3.0, -52.0], [-21.0, -22.0]]], [[[-15.0, -51.0], [-31.0, 1.0]], [[13.0, 29.0], [-7.0, -20.0]]], [[[29.0, -23.0], [22.0, 
+52.0]], [[-10.0, 4.0], [-49.0, -7.0]]], [[[-3.0, 43.0], [49.0, 26.0]], [[0.0, 0.0], [-16.0, -5.0]]], [[[-6.0, -66.0], [-46.0, 
+-12.0]], [[-1.0, 65.0], [11.0, -50.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank2_array_rank1(self):
-      arg0=numpy.array([[-5.0, 6.0], [-1.0, -1.0], [1.0, -7.0]])
-      arg1=numpy.array([-7.0, 0.0, -2.0])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=numpy.array([33.0, -28.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[5.0, 3.0], [4.0, 6.0]], [[-2.0, 6.0], [-6.0, -1.0]], [[6.0, -2.0], [-4.0, 4.0]], [[0.0, 3.0], 
+[5.0, 6.0]], [[0.0, 0.0], [-6.0, 0.0]], [[-3.0, -5.0], [-7.0, 2.0]]]),self.functionspace)
+      arg1=Data(-2.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-10.0, -6.0], [-8.0, -12.0]], [[4.0, -12.0], [12.0, 2.0]], [[-12.0, 4.0], [8.0, -8.0]], [[-0.0, 
+-6.0], [-10.0, -12.0]], [[-0.0, -0.0], [12.0, -0.0]], [[6.0, 10.0], [14.0, -4.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank2_array_rank2(self):
-      arg0=numpy.array([[7.0, 5.0], [3.0, -7.0], [1.0, 2.0]])
-      arg1=numpy.array([[-2.0, 5.0], [0.0, -1.0], [0.0, 3.0]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=numpy.array([[-14.0, 35.0], [-10.0, 38.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 7.0], [-1.0, -4.0]], [[-7.0, -5.0], [-7.0, 6.0]], [[0.0, -7.0], [-2.0, -7.0]], [[-1.0, 
+5.0], [-7.0, 4.0]], [[4.0, 0.0], [7.0, -4.0]], [[-2.0, -2.0], [-3.0, 2.0]]], [[[0.0, -6.0], [-2.0, -2.0]], [[-7.0, 5.0], [4.0, 
+6.0]], [[-6.0, -6.0], [0.0, -6.0]], [[6.0, 0.0], [4.0, 7.0]], [[-2.0, -2.0], [-3.0, 0.0]], [[-6.0, -1.0], [5.0, -1.0]]], 
+[[[7.0, 7.0], [5.0, 4.0]], [[5.0, -2.0], [3.0, 5.0]], [[4.0, -2.0], [0.0, -2.0]], [[-5.0, -1.0], [-7.0, 0.0]], [[4.0, -5.0], 
+[5.0, -6.0]], [[2.0, 7.0], [0.0, -6.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([7.0, 0.0, 0.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[0.0, 49.0], [-7.0, -28.0]], [[-49.0, -35.0], [-49.0, 42.0]], [[0.0, -49.0], [-14.0, -49.0]], 
+[[-7.0, 35.0], [-49.0, 28.0]], [[28.0, 0.0], [49.0, -28.0]], [[-14.0, -14.0], [-21.0, 14.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank2_constData_rank1(self):
-      arg0=numpy.array([[-4.0, -2.0], [-1.0, -7.0], [-7.0, 0.0]])
-      arg1=Data(numpy.array([-6.0, 7.0, 1.0]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([10.0, -37.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[3.0, 5.0], [0.0, 4.0]], [[0.0, -6.0], [-5.0, -1.0]], [[-3.0, 2.0], [-1.0, 4.0]], [[-5.0, 7.0], 
+[3.0, 1.0]], [[4.0, -4.0], [-2.0, 5.0]], [[-5.0, 2.0], [1.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-1.0, -4.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-3.0, -12.0], [-5.0, -20.0]], [[0.0, 0.0], [-4.0, -16.0]]], [[[0.0, 0.0], [6.0, 24.0]], [[5.0, 
+20.0], [1.0, 4.0]]], [[[3.0, 12.0], [-2.0, -8.0]], [[1.0, 4.0], [-4.0, -16.0]]], [[[5.0, 20.0], [-7.0, -28.0]], [[-3.0, -12.0], 
+[-1.0, -4.0]]], [[[-4.0, -16.0], [4.0, 16.0]], [[2.0, 8.0], [-5.0, -20.0]]], [[[5.0, 20.0], [-2.0, -8.0]], [[-1.0, -4.0], 
+[-3.0, -12.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[-1.0, 0.0], [2.0, -6.0], [-2.0, 0.0]])
-      arg1=Data(numpy.array([[5.0, 0.0], [7.0, -4.0], [-7.0, -5.0]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[23.0, 2.0], [-42.0, 24.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-5.0, 1.0], [3.0, -1.0]], [[2.0, -3.0], [6.0, 7.0]], [[0.0, -1.0], [-2.0, -3.0]], [[2.0, -2.0], 
+[-5.0, -3.0]], [[7.0, 4.0], [-1.0, -2.0]], [[-3.0, -5.0], [4.0, -7.0]]], [[[1.0, -3.0], [1.0, 2.0]], [[-5.0, -3.0], [-2.0, 
+-1.0]], [[0.0, -4.0], [-7.0, 3.0]], [[-4.0, -7.0], [-3.0, -5.0]], [[-7.0, 7.0], [0.0, 2.0]], [[-5.0, 4.0], [7.0, -7.0]]], 
+[[[0.0, 1.0], [4.0, -2.0]], [[6.0, 6.0], [-4.0, -6.0]], [[-6.0, -6.0], [-3.0, 3.0]], [[-7.0, -4.0], [-3.0, 0.0]], [[4.0, -2.0], 
+[-5.0, 3.0]], [[-4.0, 4.0], [-3.0, 4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[6.0, 0.0], [1.0, 0.0], [2.0, -6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-29.0, 0.0], [5.0, -6.0]], [[27.0, -24.0], [-8.0, 12.0]]], [[[19.0, -36.0], [-9.0, -36.0]], 
+[[26.0, 24.0], [29.0, 36.0]]], [[[-12.0, 36.0], [-22.0, 36.0]], [[-25.0, 18.0], [-9.0, -18.0]]], [[[-6.0, 42.0], [-27.0, 
+24.0]], [[-39.0, 18.0], [-23.0, 0.0]]], [[[43.0, -24.0], [27.0, 12.0]], [[-16.0, 30.0], [-4.0, -18.0]]], [[[-31.0, 24.0], 
+[-18.0, -24.0]], [[25.0, 18.0], [-41.0, -24.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank2_expandedData_rank1(self):
-      arg0=numpy.array([[7.0, 0.0], [-3.0, 4.0], [2.0, 7.0]])
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-3.0, 2.0], [-5.0, -1.0]], [[3.0, 3.0], [5.0, 0.0]], [[3.0, -5.0], [-1.0, 6.0]], [[0.0, 0.0], 
+[2.0, 7.0]], [[2.0, 1.0], [7.0, 6.0]], [[-6.0, -7.0], [-7.0, 4.0]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([2.0, -7.0, -6.0])+(1.-msk_arg1)*numpy.array([0.0, -7.0, -6.0])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([23.0, -70.0])+(1.-msk_ref)*numpy.array([9.0, -70.0])
+      ref=msk_ref*numpy.array([[[9.0, -6.0], [15.0, 3.0]], [[-9.0, -9.0], [-15.0, -0.0]], [[-9.0, 15.0], [3.0, -18.0]], [[-0.0, 
+-0.0], [-6.0, -21.0]], [[-6.0, -3.0], [-21.0, -18.0]], [[18.0, 21.0], [21.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -4.0], 
+[10.0, 2.0]], [[-6.0, -6.0], [-10.0, -0.0]], [[-6.0, 10.0], [2.0, -12.0]], [[-0.0, -0.0], [-4.0, -14.0]], [[-4.0, -2.0], 
+[-14.0, -12.0]], [[12.0, 14.0], [14.0, -8.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[-4.0, -2.0], [4.0, -4.0], [1.0, 4.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 1.0], [-5.0, -5.0]], [[-7.0, 5.0], [-3.0, 7.0]], [[0.0, -6.0], [6.0, 2.0]], [[-6.0, 3.0], 
+[-7.0, 4.0]], [[-3.0, 3.0], [-5.0, 6.0]], [[-5.0, 2.0], [2.0, -5.0]]], [[[0.0, 1.0], [0.0, -1.0]], [[-2.0, 2.0], [-7.0, 5.0]], 
+[[-2.0, 4.0], [0.0, 2.0]], [[-4.0, 0.0], [1.0, 4.0]], [[3.0, -7.0], [4.0, 3.0]], [[7.0, -4.0], [-3.0, -2.0]]], [[[0.0, -2.0], 
+[-2.0, 3.0]], [[0.0, 0.0], [1.0, -2.0]], [[6.0, 1.0], [-2.0, 7.0]], [[0.0, 0.0], [3.0, -5.0]], [[-3.0, 1.0], [-2.0, -2.0]], 
+[[4.0, 2.0], [-1.0, 1.0]]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[6.0, -7.0], [6.0, -1.0], [7.0, 4.0]])+(1.-msk_arg1)*numpy.array([[7.0, -3.0], [-3.0, -6.0], 
-[-3.0, 0.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([-6.0, 1.0, -3.0])+(1.-msk_arg1)*numpy.array([-3.0, -5.0, -4.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[7.0, 28.0], [-8.0, 34.0]])+(1.-msk_ref)*numpy.array([[-43.0, -12.0], [-14.0, 30.0]])
+      ref=msk_ref*numpy.array([[[0.0, 1.0], [36.0, 20.0]], [[40.0, -28.0], [8.0, -31.0]], [[-20.0, 37.0], [-30.0, -31.0]], 
+[[32.0, -18.0], [34.0, -5.0]], [[30.0, -28.0], [40.0, -27.0]], [[25.0, -22.0], [-12.0, 
+25.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [23.0, 8.0]], [[31.0, -25.0], [40.0, -38.0]], [[-14.0, -6.0], [-10.0, -44.0]], 
+[[38.0, -9.0], [4.0, -12.0]], [[6.0, 22.0], [3.0, -25.0]], [[-36.0, 6.0], [13.0, 21.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_array_rank2(self):
-      arg0=numpy.array([[[[-1.0, -6.0, 4.0, 4.0, -2.0], [5.0, 0.0, -2.0, -2.0, -4.0], [-1.0, -2.0, -7.0, -6.0, 3.0], [3.0, 
--2.0, 4.0, -1.0, 5.0]], [[6.0, 3.0, 6.0, 4.0, 7.0], [6.0, 7.0, 4.0, 5.0, -2.0], [-5.0, 6.0, 0.0, -7.0, 7.0], [1.0, -1.0, -2.0, 
-0.0, 7.0]], [[-5.0, 7.0, -4.0, 2.0, -1.0], [-1.0, 0.0, 0.0, 7.0, -7.0], [-2.0, 3.0, -4.0, 5.0, 4.0], [-3.0, -2.0, 2.0, 0.0, 
-6.0]]], [[[-5.0, -3.0, 2.0, -3.0, 3.0], [6.0, 1.0, 0.0, -7.0, -3.0], [-1.0, -7.0, 2.0, 5.0, 0.0], [1.0, -4.0, 5.0, 2.0, 7.0]], 
-[[1.0, -3.0, -7.0, 7.0, -6.0], [6.0, -4.0, 2.0, 3.0, 7.0], [2.0, -1.0, 2.0, 1.0, 1.0], [-7.0, 3.0, -3.0, 7.0, 2.0]], [[6.0, 
--4.0, 3.0, 3.0, 5.0], [-3.0, -6.0, -7.0, 5.0, 0.0], [-7.0, 0.0, -3.0, -4.0, -6.0], [4.0, 4.0, 1.0, -2.0, -4.0]]]])
-      arg1=numpy.array([[-7.0, -5.0, -5.0], [6.0, -6.0, -6.0]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=numpy.array([[-70.0, 16.0, -2.0, -136.0, 8.0], [-42.0, 31.0, 24.0, -136.0, 13.0], [66.0, -67.0, 87.0, 100.0, -46.0], 
-[13.0, -37.0, 14.0, -11.0, -46.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_array_rank3(self):
-      arg0=numpy.array([[[[-1.0, 4.0, 6.0, 6.0, 0.0], [0.0, -1.0, -4.0, -3.0, -3.0], [-1.0, 3.0, -3.0, -1.0, -6.0], [-7.0, 0.0, 
--3.0, 5.0, 2.0]], [[5.0, 0.0, -2.0, 0.0, 1.0], [7.0, -2.0, 0.0, -7.0, 3.0], [5.0, -7.0, 0.0, 6.0, -1.0], [-4.0, 3.0, -2.0, 
--1.0, 0.0]], [[5.0, 4.0, 3.0, 5.0, -7.0], [3.0, -7.0, 6.0, -3.0, 3.0], [7.0, -2.0, -7.0, 0.0, 0.0], [-6.0, 7.0, -6.0, 0.0, 
-0.0]]], [[[6.0, -6.0, 4.0, 2.0, 7.0], [4.0, 6.0, -7.0, 6.0, 5.0], [-1.0, 6.0, -5.0, -2.0, 6.0], [5.0, 4.0, 6.0, 6.0, -1.0]], 
-[[7.0, 3.0, 0.0, 2.0, -7.0], [0.0, 4.0, 3.0, -2.0, -6.0], [-7.0, 3.0, 5.0, -6.0, -6.0], [5.0, 5.0, 0.0, -2.0, 7.0]], [[6.0, 
--3.0, -2.0, 7.0, 7.0], [-3.0, -6.0, -2.0, -7.0, 3.0], [7.0, 4.0, -2.0, 5.0, 2.0], [-3.0, -6.0, -7.0, 0.0, -3.0]]]])
-      arg1=numpy.array([[[3.0, 5.0], [-5.0, 1.0], [0.0, 0.0]], [[5.0, 3.0], [-5.0, 3.0], [-4.0, 6.0]]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=numpy.array([[[-57.0, 75.0], [-21.0, -7.0], [56.0, 28.0], [-10.0, 84.0], [37.0, 43.0]], [[-3.0, 1.0], [41.0, -13.0], 
-[-54.0, -44.0], [94.0, -52.0], [19.0, 3.0]], [[-26.0, 18.0], [43.0, 59.0], [-51.0, -27.0], [-33.0, 7.0], [39.0, -19.0]], 
-[[11.0, -27.0], [4.0, -6.0], [59.0, -41.0], [60.0, 36.0], [-22.0, 10.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[2.0, -5.0], [-2.0, 4.0]], [[3.0, -7.0], [-4.0, -7.0]], [[-7.0, -5.0], [3.0, 3.0]], [[0.0, -6.0], 
+[4.0, 4.0]], [[-6.0, 3.0], [-1.0, -4.0]], [[5.0, -6.0], [3.0, 4.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([2.0, 4.0])+(1.-msk_arg1)*numpy.array([2.0, 6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[4.0, 8.0], [-10.0, -20.0]], [[-4.0, -8.0], [8.0, 16.0]]], [[[6.0, 12.0], [-14.0, -28.0]], 
+[[-8.0, -16.0], [-14.0, -28.0]]], [[[-14.0, -28.0], [-10.0, -20.0]], [[6.0, 12.0], [6.0, 12.0]]], [[[0.0, 0.0], [-12.0, 
+-24.0]], [[8.0, 16.0], [8.0, 16.0]]], [[[-12.0, -24.0], [6.0, 12.0]], [[-2.0, -4.0], [-8.0, -16.0]]], [[[10.0, 20.0], [-12.0, 
+-24.0]], [[6.0, 12.0], [8.0, 16.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 12.0], [-10.0, -30.0]], [[-4.0, -12.0], [8.0, 24.0]]], 
+[[[6.0, 18.0], [-14.0, -42.0]], [[-8.0, -24.0], [-14.0, -42.0]]], [[[-14.0, -42.0], [-10.0, -30.0]], [[6.0, 18.0], [6.0, 
+18.0]]], [[[0.0, 0.0], [-12.0, -36.0]], [[8.0, 24.0], [8.0, 24.0]]], [[[-12.0, -36.0], [6.0, 18.0]], [[-2.0, -6.0], [-8.0, 
+-24.0]]], [[[10.0, 30.0], [-12.0, -36.0]], [[6.0, 18.0], [8.0, 24.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_array_rank4(self):
-      arg0=numpy.array([[[[3.0, 6.0, -5.0, 0.0, -4.0], [-2.0, 3.0, 0.0, 2.0, 1.0], [4.0, 1.0, -1.0, 7.0, 2.0], [5.0, -3.0, 
--5.0, 0.0, -1.0]], [[5.0, 0.0, -2.0, -2.0, 3.0], [5.0, 7.0, 2.0, 1.0, 7.0], [4.0, -7.0, -2.0, 4.0, -7.0], [5.0, 0.0, 5.0, 5.0, 
-0.0]], [[0.0, -4.0, 0.0, 0.0, -7.0], [-2.0, 6.0, -3.0, 1.0, 3.0], [-2.0, 5.0, -2.0, 2.0, 2.0], [4.0, -3.0, -3.0, -6.0, -4.0]]], 
-[[[-3.0, -5.0, -1.0, 0.0, -7.0], [-4.0, 0.0, 1.0, -1.0, 4.0], [3.0, 2.0, 7.0, 2.0, 6.0], [-4.0, 4.0, 3.0, 7.0, 4.0]], [[-7.0, 
--3.0, 2.0, -3.0, 0.0], [-5.0, 5.0, 1.0, 6.0, -1.0], [3.0, 1.0, 5.0, -6.0, 0.0], [2.0, 0.0, 2.0, 6.0, 0.0]], [[5.0, 4.0, 0.0, 
--7.0, -6.0], [0.0, 3.0, 5.0, -2.0, -4.0], [4.0, -3.0, 1.0, 4.0, -2.0], [-6.0, -6.0, -6.0, 3.0, -7.0]]]])
-      arg1=numpy.array([[[[2.0, 0.0, 4.0, -2.0, -3.0], [4.0, -1.0, 0.0, 2.0, -4.0], [-6.0, -4.0, 3.0, 5.0, 5.0], [-2.0, 0.0, 
-4.0, -4.0, 3.0]], [[0.0, 4.0, 1.0, -5.0, 4.0], [1.0, -2.0, 7.0, 6.0, 1.0], [7.0, -3.0, 1.0, 2.0, -5.0], [-2.0, -3.0, 0.0, -2.0, 
--3.0]], [[5.0, 1.0, 5.0, 4.0, -3.0], [-3.0, 0.0, -1.0, -7.0, 7.0], [-1.0, -5.0, 4.0, 5.0, -4.0], [3.0, 0.0, -4.0, -6.0, 0.0]]], 
-[[[-2.0, 5.0, -3.0, 0.0, 5.0], [-7.0, 3.0, 3.0, 3.0, -3.0], [-3.0, 3.0, -2.0, -7.0, 7.0], [-2.0, -1.0, 0.0, 0.0, -7.0]], [[3.0, 
-4.0, -7.0, -3.0, 0.0], [7.0, -4.0, -2.0, 4.0, 2.0], [-7.0, -5.0, -6.0, -4.0, -3.0], [3.0, 0.0, 1.0, 0.0, 2.0]], [[5.0, -3.0, 
--7.0, -7.0, -3.0], [6.0, -4.0, -1.0, -5.0, 7.0], [3.0, -4.0, -6.0, -4.0, -4.0], [-5.0, -5.0, 1.0, 5.0, 1.0]]]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=numpy.array([[[[16.0, -38.0, 40.0, -45.0, -19.0], [19.0, -14.0, 35.0, -26.0, 23.0], [90.0, -21.0, 32.0, 54.0, -30.0], 
-[-56.0, -37.0, 10.0, 3.0, 6.0]], [[13.0, -53.0, 12.0, -47.0, -43.0], [74.0, -25.0, -9.0, -7.0, -15.0], [16.0, -20.0, 6.0, 41.0, 
-4.0], [-43.0, -15.0, 41.0, 20.0, 51.0]], [[-2.0, -5.0, -33.0, 14.0, 2.0], [-1.0, -2.0, -21.0, -17.0, 25.0], [5.0, 13.0, -27.0, 
--30.0, -28.0], [22.0, 7.0, -18.0, 24.0, 2.0]], [[-44.0, 1.0, 68.0, 68.0, 13.0], [-65.0, 44.0, -1.0, 11.0, -57.0], [-14.0, 49.0, 
-58.0, 36.0, 47.0], [30.0, 41.0, -10.0, -31.0, -7.0]], [[-59.0, -12.0, 15.0, 7.0, 28.0], [21.0, 1.0, 13.0, 68.0, -51.0], [55.0, 
-45.0, 13.0, 24.0, -32.0], [25.0, 28.0, 6.0, 22.0, 22.0]]], [[[-21.0, -22.0, 34.0, -14.0, 12.0], [-4.0, 0.0, 35.0, 8.0, 1.0], 
-[96.0, 16.0, 29.0, 38.0, -40.0], [-19.0, -11.0, -5.0, 10.0, -3.0]], [[66.0, 45.0, -7.0, -53.0, -8.0], [54.0, -49.0, 30.0, 11.0, 
-68.0], [-1.0, -100.0, -8.0, 27.0, -71.0], [-2.0, -36.0, -4.0, -47.0, 1.0]], [[11.0, -1.0, -58.0, -60.0, 7.0], [41.0, -25.0, 
-13.0, 15.0, 15.0], [22.0, -13.0, -48.0, -42.0, -14.0], [-37.0, -32.0, 18.0, 39.0, -6.0]], [[19.0, 30.0, -11.0, -9.0, -4.0], 
-[43.0, -23.0, -7.0, 34.0, 1.0], [-51.0, -41.0, -11.0, 8.0, -16.0], [27.0, 8.0, 8.0, -26.0, 20.0]], [[-14.0, 59.0, 49.0, 6.0, 
-48.0], [-57.0, 17.0, 64.0, 51.0, -18.0], [23.0, -7.0, 44.0, 26.0, 5.0], [2.0, -5.0, -13.0, -56.0, -52.0]]], [[[21.0, 29.0, 
--48.0, -73.0, 13.0], [50.0, -31.0, 29.0, 47.0, -1.0], [-12.0, -40.0, -40.0, -31.0, 4.0], [-39.0, -35.0, 31.0, 8.0, -11.0]], 
-[[11.0, 0.0, 30.0, 71.0, -27.0], [-43.0, 27.0, -47.0, -50.0, -1.0], [-82.0, 5.0, 24.0, 10.0, 43.0], [41.0, 34.0, -18.0, -35.0, 
-9.0]], [[-6.0, 42.0, -79.0, -18.0, 33.0], [-8.0, 2.0, -2.0, 36.0, -16.0], [-59.0, 12.0, -63.0, -92.0, 43.0], [-4.0, -6.0, 10.0, 
-25.0, -35.0]], [[22.0, -8.0, 50.0, -36.0, -13.0], [-6.0, -1.0, 40.0, -14.0, 0.0], [32.0, -30.0, 41.0, 47.0, 23.0], [-58.0, 
--34.0, 18.0, -28.0, -13.0]], [[-8.0, 10.0, 7.0, 53.0, -4.0], [-59.0, 38.0, -31.0, -24.0, -33.0], [-87.0, 29.0, 7.0, -28.0, 
-87.0], [14.0, 25.0, -2.0, -16.0, -17.0]]], [[[14.0, 30.0, 85.0, 17.0, -9.0], [19.0, -11.0, 21.0, 38.0, -13.0], [-19.0, -53.0, 
-68.0, 99.0, -26.0], [36.0, 19.0, 0.0, -84.0, 26.0]], [[-59.0, 35.0, 3.0, 36.0, 56.0], [-67.0, 39.0, 21.0, 57.0, -63.0], [-9.0, 
-63.0, 7.0, -34.0, 49.0], [19.0, 26.0, -6.0, 0.0, -43.0]], [[-55.0, 58.0, -11.0, 9.0, 77.0], [-49.0, 20.0, 49.0, 88.0, -43.0], 
-[27.0, 43.0, -4.0, -35.0, 1.0], [21.0, 12.0, -12.0, -2.0, -53.0]], [[-11.0, 64.0, -109.0, -88.0, 64.0], [34.0, -25.0, 47.0, 
-102.0, -25.0], [-13.0, -6.0, -87.0, -105.0, 18.0], [-39.0, -37.0, 33.0, 41.0, -49.0]], [[-65.0, 37.0, 13.0, 35.0, 56.0], 
-[-62.0, 41.0, 23.0, 73.0, -85.0], [-23.0, 64.0, 15.0, -25.0, 67.0], [17.0, 31.0, 5.0, -7.0, -38.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-2.0, -1.0], [4.0, 3.0]], [[3.0, 6.0], [0.0, -7.0]], [[-4.0, -3.0], [-5.0, 5.0]], [[6.0, -4.0], 
+[0.0, -5.0]], [[-1.0, -6.0], [5.0, -7.0]], [[0.0, -3.0], [2.0, 7.0]]], [[[-2.0, 6.0], [1.0, -5.0]], [[-1.0, 3.0], [2.0, 0.0]], 
+[[-4.0, -3.0], [-3.0, -3.0]], [[4.0, 0.0], [7.0, -2.0]], [[4.0, 7.0], [7.0, -6.0]], [[1.0, -2.0], [1.0, -4.0]]], [[[-1.0, 
+-4.0], [6.0, 1.0]], [[2.0, -5.0], [3.0, -1.0]], [[0.0, -2.0], [0.0, 0.0]], [[-2.0, 1.0], [3.0, 0.0]], [[0.0, 2.0], [-2.0, 
+2.0]], [[-1.0, 5.0], [-4.0, 1.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 1.0], [-1.0, 4.0], [-4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 4.0], [-1.0, 5.0], 
+[-4.0, 4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[6.0, -14.0], [10.0, 7.0]], [[-25.0, 32.0], [1.0, -13.0]]], [[[-7.0, 7.0], [17.0, -2.0]], 
+[[-14.0, 20.0], [4.0, -11.0]]], [[[4.0, -20.0], [11.0, -23.0]], [[3.0, -17.0], [3.0, -7.0]]], [[[4.0, 14.0], [-4.0, 0.0]], 
+[[-19.0, 40.0], [2.0, -13.0]]], [[[-4.0, 15.0], [-15.0, 30.0]], [[1.0, 25.0], [-2.0, -23.0]]], [[[3.0, 0.0], [-18.0, 9.0]], 
+[[15.0, -10.0], [0.0, -5.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -22.0], [7.0, 10.0]], [[-13.0, 45.0], [10.0, -9.0]]], [[[2.0, 
+15.0], [35.0, 19.0]], [[-14.0, 22.0], [-17.0, -32.0]]], [[[-8.0, -36.0], [2.0, -35.0]], [[-12.0, -35.0], [18.0, 5.0]]], 
+[[[22.0, 36.0], [-16.0, -12.0]], [[-19.0, 47.0], [-13.0, -30.0]]], [[[-7.0, 16.0], [-33.0, 19.0]], [[16.0, 47.0], [-23.0, 
+-50.0]]], [[[3.0, 1.0], [-27.0, -2.0]], [[21.0, -3.0], [21.0, 12.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_constData_rank2(self):
-      arg0=numpy.array([[[[0.0, 0.0, 3.0, 2.0, 0.0], [1.0, -6.0, -2.0, 0.0, 1.0], [-5.0, -6.0, -3.0, 1.0, -6.0], [-2.0, 2.0, 
-6.0, 6.0, 5.0]], [[2.0, -1.0, -5.0, 0.0, 1.0], [0.0, 6.0, 0.0, 7.0, 0.0], [1.0, 7.0, 1.0, 0.0, -1.0], [2.0, 1.0, -3.0, 3.0, 
-0.0]], [[1.0, 6.0, 6.0, 0.0, -7.0], [-7.0, 0.0, 3.0, 4.0, -1.0], [-6.0, 2.0, -4.0, 3.0, 0.0], [-5.0, 1.0, 3.0, 7.0, 0.0]]], 
-[[[-7.0, -2.0, 2.0, 3.0, -5.0], [5.0, -6.0, 3.0, -7.0, -6.0], [2.0, 0.0, 3.0, 0.0, 2.0], [-1.0, -5.0, -7.0, 6.0, 2.0]], [[2.0, 
--2.0, -4.0, -3.0, 3.0], [5.0, 3.0, 0.0, -2.0, -6.0], [0.0, -5.0, -6.0, -5.0, -6.0], [-7.0, -1.0, 1.0, 1.0, -7.0]], [[2.0, -3.0, 
--4.0, 5.0, -6.0], [6.0, -7.0, -6.0, -3.0, 4.0], [0.0, -7.0, 5.0, 5.0, 0.0], [1.0, -1.0, 0.0, 2.0, 0.0]]]])
-      arg1=Data(numpy.array([[6.0, 4.0, -3.0], [-6.0, 2.0, -1.0]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[49.0, -11.0, -36.0, -17.0, 67.0], [1.0, 37.0, -33.0, 57.0, 29.0], [-20.0, -17.0, -37.0, -18.0, 
--64.0], [2.0, 42.0, 59.0, -9.0, 4.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-3.0, 2.0, 5.0, -6.0], [5.0, -2.0, 7.0, -2.0], [4.0, -4.0, 4.0, 0.0]], [[4.0, -1.0, 2.0, -3.0], 
+[-6.0, 2.0, 0.0, 5.0], [-7.0, 1.0, 3.0, -1.0]]], [[[-1.0, 7.0, 0.0, 5.0], [1.0, 6.0, 3.0, 0.0], [5.0, 0.0, -5.0, -4.0]], [[7.0, 
+-5.0, -3.0, 0.0], [3.0, -2.0, 0.0, 7.0], [-6.0, 2.0, -2.0, 1.0]]], [[[0.0, -2.0, 0.0, -5.0], [-2.0, 1.0, 4.0, -5.0], [0.0, 4.0, 
+-5.0, 0.0]], [[0.0, 0.0, 6.0, 2.0], [-6.0, -5.0, 3.0, 2.0], [3.0, 6.0, 4.0, -4.0]]]]),self.functionspace)
+      arg1=-4.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[12.0, -8.0, -20.0, 24.0], [-20.0, 8.0, -28.0, 8.0], [-16.0, 16.0, -16.0, -0.0]], [[-16.0, 4.0, 
+-8.0, 12.0], [24.0, -8.0, -0.0, -20.0], [28.0, -4.0, -12.0, 4.0]]], [[[4.0, -28.0, -0.0, -20.0], [-4.0, -24.0, -12.0, -0.0], 
+[-20.0, -0.0, 20.0, 16.0]], [[-28.0, 20.0, 12.0, -0.0], [-12.0, 8.0, -0.0, -28.0], [24.0, -8.0, 8.0, -4.0]]], [[[-0.0, 8.0, 
+-0.0, 20.0], [8.0, -4.0, -16.0, 20.0], [-0.0, -16.0, 20.0, -0.0]], [[-0.0, -0.0, -24.0, -8.0], [24.0, 20.0, -12.0, -8.0], 
+[-12.0, -24.0, -16.0, 16.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=transposed_tensor_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_constData_rank3(self):
-      arg0=numpy.array([[[[-1.0, 3.0, 4.0, -3.0, 0.0], [7.0, 2.0, 6.0, -6.0, -4.0], [-5.0, -2.0, 4.0, 5.0, -7.0], [0.0, -4.0, 
--3.0, 4.0, 3.0]], [[1.0, 0.0, -3.0, -2.0, -5.0], [5.0, 0.0, 4.0, -5.0, -6.0], [0.0, 1.0, -6.0, 1.0, 0.0], [7.0, 5.0, -5.0, 5.0, 
-5.0]], [[-3.0, -2.0, 0.0, -6.0, -1.0], [3.0, -2.0, 2.0, -4.0, 6.0], [-7.0, -4.0, 1.0, 5.0, -1.0], [7.0, 0.0, -3.0, -2.0, 
--2.0]]], [[[6.0, -7.0, -4.0, -2.0, 2.0], [-2.0, -7.0, -3.0, -1.0, 6.0], [3.0, 2.0, -1.0, -3.0, 0.0], [-6.0, 0.0, -3.0, 3.0, 
--6.0]], [[-4.0, -2.0, 2.0, 6.0, 3.0], [1.0, 0.0, 5.0, 3.0, -1.0], [-3.0, -3.0, 0.0, -7.0, 0.0], [7.0, -4.0, -7.0, 6.0, -4.0]], 
-[[-6.0, -6.0, -5.0, 0.0, 2.0], [-6.0, 2.0, -5.0, 0.0, 2.0], [6.0, 5.0, -2.0, 3.0, 2.0], [-4.0, 0.0, 1.0, 2.0, 0.0]]]])
-      arg1=Data(numpy.array([[[-6.0, 7.0], [0.0, 5.0], [-4.0, 0.0]], [[1.0, -3.0], [0.0, 4.0], [-2.0, 
--4.0]]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[36.0, -12.0], [-5.0, 58.0], [-18.0, 53.0], [40.0, -1.0], [2.0, -27.0]], [[-44.0, 108.0], [-15.0, 
-27.0], [-37.0, 111.0], [51.0, -52.0], [2.0, -88.0]], [[49.0, -80.0], [20.0, -47.0], [-25.0, 9.0], [-59.0, 9.0], [42.0, -57.0]], 
-[[-26.0, 97.0], [24.0, -19.0], [25.0, -69.0], [-17.0, 60.0], [-16.0, 48.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[7.0, 0.0, 2.0, 4.0], [-4.0, 6.0, -3.0, -7.0], [1.0, 0.0, -6.0, -2.0]], [[-6.0, 1.0, 7.0, 4.0], 
+[4.0, -7.0, -2.0, -7.0], [0.0, 2.0, 6.0, -3.0]]], [[[1.0, 7.0, 7.0, -6.0], [6.0, -4.0, 2.0, 4.0], [-7.0, -3.0, -6.0, -7.0]], 
+[[2.0, 5.0, -5.0, 0.0], [3.0, 7.0, 0.0, 1.0], [-5.0, 1.0, 4.0, 6.0]]], [[[-1.0, 4.0, 1.0, 3.0], [-6.0, -1.0, -4.0, 0.0], [7.0, 
+-3.0, 4.0, -4.0]], [[6.0, 7.0, 0.0, 4.0], [-4.0, 7.0, 6.0, -3.0], [-1.0, -2.0, -2.0, -7.0]]]]),self.functionspace)
+      arg1=numpy.array(-4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-28.0, -0.0, -8.0, -16.0], [16.0, -24.0, 12.0, 28.0], [-4.0, -0.0, 24.0, 8.0]], [[24.0, -4.0, 
+-28.0, -16.0], [-16.0, 28.0, 8.0, 28.0], [-0.0, -8.0, -24.0, 12.0]]], [[[-4.0, -28.0, -28.0, 24.0], [-24.0, 16.0, -8.0, -16.0], 
+[28.0, 12.0, 24.0, 28.0]], [[-8.0, -20.0, 20.0, -0.0], [-12.0, -28.0, -0.0, -4.0], [20.0, -4.0, -16.0, -24.0]]], [[[4.0, -16.0, 
+-4.0, -12.0], [24.0, 4.0, 16.0, -0.0], [-28.0, 12.0, -16.0, 16.0]], [[-24.0, -28.0, -0.0, -16.0], [16.0, -28.0, -24.0, 12.0], 
+[4.0, 8.0, 8.0, 28.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_constData_rank4(self):
-      arg0=numpy.array([[[[7.0, 2.0, -1.0, 0.0, 2.0], [6.0, 0.0, 5.0, -1.0, 0.0], [-7.0, -3.0, 6.0, 0.0, 4.0], [-4.0, -1.0, 
-4.0, 6.0, -7.0]], [[-4.0, -5.0, 4.0, -7.0, -1.0], [6.0, -2.0, -5.0, 3.0, -2.0], [-7.0, 0.0, 3.0, 6.0, -3.0], [-3.0, -4.0, 0.0, 
-2.0, -1.0]], [[-3.0, -3.0, 7.0, 2.0, 1.0], [-2.0, 1.0, 2.0, 0.0, -4.0], [-6.0, 0.0, -6.0, -1.0, -6.0], [6.0, -1.0, 0.0, 1.0, 
--4.0]]], [[[3.0, 5.0, 0.0, -1.0, -5.0], [7.0, 4.0, -2.0, -5.0, 0.0], [-2.0, -4.0, 1.0, -4.0, 2.0], [0.0, 6.0, -3.0, 0.0, 
--4.0]], [[1.0, 0.0, 4.0, 3.0, 3.0], [-2.0, 6.0, 4.0, 5.0, 0.0], [0.0, 0.0, 0.0, 7.0, -4.0], [4.0, 7.0, 5.0, 5.0, 5.0]], [[-3.0, 
--3.0, 3.0, 2.0, 3.0], [-4.0, 4.0, 7.0, 4.0, 3.0], [-2.0, -1.0, 4.0, 2.0, -7.0], [-2.0, -5.0, -3.0, 5.0, -2.0]]]])
-      arg1=Data(numpy.array([[[[-3.0, 5.0, -6.0, -5.0, 0.0], [0.0, 3.0, 4.0, 7.0, -1.0], [-3.0, 5.0, -7.0, 4.0, 0.0], [-1.0, 
--1.0, 2.0, -7.0, 3.0]], [[-2.0, -2.0, 1.0, -7.0, 2.0], [5.0, 2.0, -3.0, 6.0, -1.0], [2.0, -7.0, -3.0, -2.0, 4.0], [5.0, 1.0, 
-4.0, 6.0, 0.0]], [[-2.0, 2.0, 7.0, -7.0, -7.0], [4.0, -6.0, -2.0, 6.0, -4.0], [-3.0, 1.0, -4.0, -6.0, -5.0], [1.0, 0.0, 3.0, 
--1.0, -5.0]]], [[[-5.0, 0.0, -1.0, 0.0, 7.0], [5.0, 3.0, -2.0, -3.0, 2.0], [-5.0, 7.0, 1.0, 0.0, -1.0], [7.0, 2.0, 6.0, 1.0, 
-2.0]], [[-4.0, -1.0, -3.0, -4.0, -4.0], [-6.0, -1.0, 4.0, 0.0, -4.0], [4.0, -2.0, -3.0, 0.0, -1.0], [7.0, 1.0, -2.0, 6.0, 
-1.0]], [[-7.0, 1.0, -5.0, 5.0, -5.0], [0.0, -2.0, -2.0, 4.0, 6.0], [-7.0, 1.0, 1.0, 6.0, 4.0], [1.0, -4.0, 1.0, -5.0, 
--5.0]]]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-5.0, 33.0, -58.0, -5.0, 45.0], [-23.0, 45.0, 50.0, -14.0, -7.0], [-10.0, 76.0, -28.0, 36.0, 
--17.0], [-5.0, 8.0, 2.0, -46.0, 58.0]], [[6.0, 11.0, -28.0, 31.0, 61.0], [-12.0, 35.0, 25.0, -61.0, 7.0], [-11.0, 74.0, 15.0, 
-18.0, -22.0], [2.0, 15.0, 2.0, -21.0, 46.0]], [[-56.0, 0.0, 32.0, -73.0, -72.0], [24.0, -47.0, -20.0, 71.0, -29.0], [-15.0, 
--31.0, -42.0, -36.0, -11.0], [59.0, -3.0, 30.0, 33.0, -49.0]], [[-11.0, 17.0, -11.0, 33.0, -57.0], [-50.0, -36.0, 27.0, -19.0, 
--3.0], [-17.0, 40.0, 5.0, 14.0, -32.0], [-17.0, -14.0, -32.0, -37.0, -19.0]], [[-14.0, 14.0, -25.0, -7.0, -71.0], [-44.0, 
--26.0, 25.0, 41.0, -9.0], [5.0, -20.0, -26.0, 22.0, 5.0], [-17.0, -22.0, -30.0, -23.0, -21.0]]], [[[-25.0, 12.0, -25.0, -70.0, 
-103.0], [69.0, 73.0, -4.0, 29.0, -6.0], [-15.0, 35.0, -43.0, 0.0, 13.0], [53.0, 28.0, 72.0, 11.0, 60.0]], [[-70.0, 4.0, -37.0, 
-3.0, -27.0], [-22.0, -12.0, 12.0, -2.0, 6.0], [-31.0, 35.0, -8.0, 22.0, -7.0], [65.0, -4.0, 11.0, 7.0, -11.0]], [[-64.0, 42.0, 
--66.0, 15.0, -89.0], [-51.0, -31.0, 37.0, 51.0, 14.0], [-54.0, 47.0, -35.0, 60.0, -4.0], [-7.0, -38.0, -17.0, -80.0, -30.0]], 
-[[-26.0, -12.0, -21.0, -16.0, -69.0], [-40.0, -25.0, 9.0, 42.0, -8.0], [26.0, -67.0, -18.0, 14.0, 28.0], [20.0, -17.0, -26.0, 
-30.0, -28.0]], [[-9.0, -1.0, -45.0, 57.0, 9.0], [-26.0, 14.0, 8.0, -24.0, 36.0], [-13.0, 13.0, 25.0, 46.0, 24.0], [-11.0, 
--14.0, -17.0, -23.0, 5.0]]], [[[71.0, -35.0, 5.0, 116.0, 24.0], [-69.0, -1.0, 13.0, -129.0, 22.0], [49.0, -8.0, 90.0, 10.0, 
--4.0], [-50.0, 4.0, -74.0, 21.0, 15.0]], [[36.0, -16.0, 27.0, 10.0, -23.0], [-20.0, -19.0, -2.0, -13.0, -11.0], [36.0, -44.0, 
-16.0, -18.0, 0.0], [-26.0, -1.0, -31.0, 22.0, -12.0]], [[-45.0, 16.0, -96.0, 11.0, 35.0], [-4.0, 55.0, 17.0, 37.0, 41.0], 
-[-27.0, 14.0, -22.0, 78.0, 57.0], [14.0, -17.0, 16.0, -37.0, 30.0]], [[-32.0, -19.0, -28.0, -53.0, -47.0], [-36.0, -5.0, 16.0, 
-50.0, -26.0], [49.0, -83.0, -37.0, 6.0, 34.0], [52.0, -3.0, -15.0, 65.0, -6.0]], [[61.0, 11.0, -24.0, 24.0, 101.0], [-5.0, 
-66.0, 31.0, -60.0, 1.0], [23.0, 50.0, 12.0, 16.0, -8.0], [-46.0, 21.0, -9.0, -27.0, 77.0]]], [[[4.0, -8.0, 61.0, -27.0, -54.0], 
-[-15.0, -54.0, 1.0, -18.0, -45.0], [18.0, -3.0, -1.0, -58.0, -54.0], [21.0, 13.0, -12.0, 38.0, -28.0]], [[-10.0, -11.0, -7.0, 
--13.0, 38.0], [-36.0, 16.0, 36.0, -75.0, -37.0], [31.0, 45.0, 3.0, -20.0, -44.0], [66.0, 36.0, -4.0, 57.0, 46.0]], [[4.0, 12.0, 
--21.0, -55.0, -26.0], [-45.0, 4.0, 48.0, 25.0, -48.0], [44.0, -14.0, -49.0, -2.0, -14.0], [7.0, 7.0, -23.0, 14.0, 26.0]], 
-[[-79.0, 28.0, -67.0, -46.0, -48.0], [-16.0, 1.0, 26.0, 80.0, -2.0], [-32.0, 12.0, -62.0, 44.0, 18.0], [45.0, -19.0, 18.0, 
--26.0, -7.0]], [[45.0, -48.0, 12.0, 40.0, -12.0], [-71.0, -12.0, 15.0, -75.0, -16.0], [85.0, -72.0, 47.0, -14.0, 7.0], [3.0, 
-11.0, -66.0, 83.0, 6.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[7.0, -7.0, 7.0, 4.0], [-2.0, 7.0, -3.0, -7.0], [3.0, 4.0, 7.0, -4.0]], [[7.0, -1.0, 4.0, -4.0], 
+[-3.0, -2.0, 4.0, -7.0], [-6.0, -7.0, -5.0, -1.0]]], [[[6.0, 7.0, -2.0, -6.0], [0.0, 6.0, -6.0, 3.0], [5.0, 1.0, 3.0, -2.0]], 
+[[-2.0, 3.0, 6.0, 0.0], [7.0, -6.0, -6.0, 4.0], [-5.0, 4.0, -5.0, 7.0]]], [[[-2.0, 2.0, -6.0, 4.0], [0.0, -6.0, 0.0, 0.0], 
+[0.0, -7.0, 1.0, 0.0]], [[1.0, 3.0, -6.0, -2.0], [-3.0, -1.0, 6.0, -4.0], [-6.0, -3.0, 0.0, 4.0]]]]),self.functionspace)
+      arg1=Data(0.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, -0.0], 
+[-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], 
+[[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0], 
+[0.0, -0.0, 0.0, 0.0]], [[0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]]]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_expandedData_rank2(self):
-      arg0=numpy.array([[[[1.0, -1.0, 5.0, 5.0, 0.0], [-2.0, -4.0, 6.0, 3.0, -4.0], [-1.0, 2.0, -5.0, -5.0, 4.0], [1.0, -3.0, 
--6.0, 4.0, -7.0]], [[-6.0, 0.0, 2.0, 4.0, 1.0], [-2.0, 0.0, 7.0, 4.0, -3.0], [2.0, 6.0, 2.0, 0.0, 7.0], [-4.0, -5.0, 7.0, 6.0, 
-2.0]], [[-6.0, 4.0, -2.0, 4.0, -5.0], [-5.0, -1.0, 7.0, 4.0, 7.0], [-1.0, -7.0, 0.0, 1.0, -6.0], [-7.0, -4.0, -5.0, 0.0, 
--3.0]]], [[[-2.0, -1.0, 4.0, 0.0, 1.0], [7.0, -1.0, 0.0, -3.0, -4.0], [6.0, 7.0, -4.0, -6.0, 0.0], [6.0, 5.0, 0.0, 7.0, 7.0]], 
-[[-2.0, 0.0, 0.0, -2.0, -7.0], [-5.0, 0.0, -4.0, 6.0, -2.0], [6.0, 0.0, -1.0, -6.0, -1.0], [4.0, -7.0, -2.0, 5.0, 4.0]], [[4.0, 
-0.0, -3.0, 7.0, 1.0], [5.0, 6.0, -2.0, 3.0, 1.0], [5.0, 3.0, 4.0, 0.0, -3.0], [-5.0, 1.0, 6.0, -7.0, -6.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-6.0, -1.0, -7.0, 0.0], [-3.0, -6.0, -1.0, -2.0], [-3.0, -6.0, 0.0, 0.0]], [[-2.0, -7.0, 4.0, 
+-4.0], [-6.0, 0.0, 0.0, 6.0], [4.0, -5.0, 1.0, -7.0]]], [[[-2.0, -6.0, -4.0, 0.0], [-4.0, -3.0, -5.0, 2.0], [-1.0, -1.0, 0.0, 
+-2.0]], [[2.0, -1.0, -7.0, 3.0], [0.0, 5.0, -2.0, 0.0], [3.0, 1.0, 2.0, -1.0]]], [[[5.0, 2.0, -3.0, 6.0], [0.0, 1.0, 2.0, 5.0], 
+[-3.0, -7.0, -2.0, -6.0]], [[7.0, -4.0, -6.0, 3.0], [3.0, 3.0, 5.0, 5.0], [1.0, -5.0, -5.0, 3.0]]]]),self.functionspace)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, -1.0, 0.0], [-5.0, 5.0, 6.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 0.0, -3.0], [-2.0, 
--1.0, 3.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[33.0, 2.0, -25.0, 43.0, -35.0], [-34.0, 29.0, -21.0, 68.0, 7.0], [25.0, -17.0, 22.0, -15.0, 
--18.0], [-33.0, -58.0, 1.0, -46.0, -74.0]])+(1.-msk_ref)*numpy.array([[32.0, -6.0, -31.0, -9.0, 23.0], [29.0, 39.0, -47.0, 
--15.0, 8.0], [4.0, 8.0, 41.0, 35.0, -6.0], [-14.0, 24.0, 59.0, -56.0, 1.0]])
+      ref=msk_ref*numpy.array([[[[24.0, 4.0, 28.0, -0.0], [12.0, 24.0, 4.0, 8.0], [12.0, 24.0, -0.0, -0.0]], [[8.0, 28.0, 
+-16.0, 16.0], [24.0, -0.0, -0.0, -24.0], [-16.0, 20.0, -4.0, 28.0]]], [[[8.0, 24.0, 16.0, -0.0], [16.0, 12.0, 20.0, -8.0], 
+[4.0, 4.0, -0.0, 8.0]], [[-8.0, 4.0, 28.0, -12.0], [-0.0, -20.0, 8.0, -0.0], [-12.0, -4.0, -8.0, 4.0]]], [[[-20.0, -8.0, 12.0, 
+-24.0], [-0.0, -4.0, -8.0, -20.0], [12.0, 28.0, 8.0, 24.0]], [[-28.0, 16.0, 24.0, -12.0], [-12.0, -12.0, -20.0, -20.0], [-4.0, 
+20.0, 20.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, -7.0, -49.0, 0.0], [-21.0, -42.0, -7.0, -14.0], [-21.0, -42.0, 0.0, 
+0.0]], [[-14.0, -49.0, 28.0, -28.0], [-42.0, 0.0, 0.0, 42.0], [28.0, -35.0, 7.0, -49.0]]], [[[-14.0, -42.0, -28.0, 0.0], 
+[-28.0, -21.0, -35.0, 14.0], [-7.0, -7.0, 0.0, -14.0]], [[14.0, -7.0, -49.0, 21.0], [0.0, 35.0, -14.0, 0.0], [21.0, 7.0, 14.0, 
+-7.0]]], [[[35.0, 14.0, -21.0, 42.0], [0.0, 7.0, 14.0, 35.0], [-21.0, -49.0, -14.0, -42.0]], [[49.0, -28.0, -42.0, 21.0], 
+[21.0, 21.0, 35.0, 35.0], [7.0, -35.0, -35.0, 21.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_expandedData_rank3(self):
-      arg0=numpy.array([[[[-1.0, 3.0, 2.0, 2.0, -5.0], [-6.0, -7.0, 0.0, 0.0, -7.0], [2.0, -2.0, 7.0, 0.0, 6.0], [0.0, 5.0, 
-4.0, 6.0, 2.0]], [[5.0, -5.0, 0.0, -2.0, 0.0], [-6.0, -6.0, -7.0, 0.0, -1.0], [6.0, -5.0, 1.0, -5.0, 5.0], [1.0, 1.0, -7.0, 
--3.0, 1.0]], [[-6.0, 0.0, 5.0, 0.0, -4.0], [-3.0, 4.0, -7.0, 6.0, 1.0], [0.0, -7.0, -4.0, 1.0, -4.0], [0.0, 2.0, 1.0, -2.0, 
-3.0]]], [[[-7.0, 3.0, 7.0, 7.0, 1.0], [-7.0, -3.0, -4.0, 6.0, -2.0], [0.0, -7.0, 7.0, -3.0, -7.0], [7.0, -7.0, -1.0, 0.0, 
-5.0]], [[0.0, 3.0, 5.0, 4.0, -1.0], [-1.0, 7.0, 2.0, 4.0, -5.0], [-2.0, 3.0, 4.0, 1.0, -2.0], [-2.0, -3.0, 0.0, 6.0, 3.0]], 
-[[-5.0, -5.0, -7.0, 5.0, 2.0], [-6.0, 2.0, 6.0, 2.0, -5.0], [0.0, 1.0, 4.0, -3.0, -2.0], [-7.0, -6.0, 0.0, 1.0, 7.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, -4.0], [-7.0, -7.0], [-2.0, -5.0]], [[-6.0, 0.0], [-7.0, 1.0], [-6.0, 
-0.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, -4.0], [0.0, -5.0], [6.0, 0.0]], [[-1.0, -5.0], [-7.0, -7.0], [-1.0, 0.0]]])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank0_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(6.0)
+      arg1=6.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[46.0, -1.0], [35.0, 26.0], [-39.0, -28.0], [-80.0, 10.0], [-18.0, 39.0]], [[115.0, 80.0], 
-[-30.0, 57.0], [37.0, 86.0], [-88.0, -26.0], [61.0, 25.0]], [[-22.0, -52.0], [58.0, 81.0], [-72.0, -11.0], [62.0, 31.0], [59.0, 
--41.0]], [[7.0, -9.0], [103.0, -40.0], [65.0, 28.0], [-5.0, 13.0], [-100.0, -27.0]]])+(1.-msk_ref)*numpy.array([[[-27.0, 14.0], 
-[-10.0, -23.0], [1.0, -78.0], [-34.0, -61.0], [-35.0, 22.0]], [[-16.0, 96.0], [-45.0, 24.0], [-58.0, 41.0], [0.0, -58.0], 
-[27.0, 78.0]], [[20.0, -24.0], [-63.0, 47.0], [-42.0, -96.0], [5.0, 33.0], [17.0, 0.0]], [[14.0, -26.0], [61.0, 31.0], [19.0, 
-24.0], [-37.0, -51.0], [-9.0, -59.0]]])
+      ref=msk_ref*numpy.array(36.0)+(1.-msk_ref)*numpy.array(36.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_array_rank4_expandedData_rank4(self):
-      arg0=numpy.array([[[[0.0, 5.0, 1.0, -4.0, -7.0], [7.0, 4.0, -3.0, -2.0, 4.0], [3.0, -2.0, 6.0, 7.0, -4.0], [-7.0, 3.0, 
--1.0, 4.0, -5.0]], [[-5.0, 0.0, -5.0, 4.0, -6.0], [-6.0, 7.0, 3.0, -5.0, -5.0], [-1.0, 6.0, 1.0, -6.0, -2.0], [0.0, -7.0, -1.0, 
-5.0, 4.0]], [[-3.0, -1.0, 0.0, 4.0, 5.0], [0.0, -3.0, 1.0, 3.0, 4.0], [3.0, -6.0, 4.0, 6.0, -4.0], [5.0, 0.0, -5.0, -7.0, 
-0.0]]], [[[0.0, -6.0, -5.0, 4.0, 6.0], [0.0, 0.0, -5.0, 4.0, 6.0], [-6.0, -4.0, -5.0, 6.0, -5.0], [6.0, -2.0, 2.0, 6.0, 0.0]], 
-[[5.0, 0.0, -2.0, 4.0, 5.0], [7.0, 4.0, -3.0, -2.0, -6.0], [-6.0, 2.0, -4.0, -1.0, 5.0], [-5.0, -1.0, -4.0, 4.0, 6.0]], [[0.0, 
--2.0, -3.0, 5.0, -7.0], [5.0, -2.0, -7.0, 3.0, 0.0], [-5.0, 4.0, -4.0, -5.0, 3.0], [0.0, 6.0, -2.0, 1.0, 4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[2.0, 3.0, 2.0, -7.0, -6.0], [7.0, -6.0, 1.0, 5.0, 4.0], [0.0, -4.0, 2.0, -3.0, -5.0], 
-[-1.0, -1.0, 5.0, -3.0, -3.0]], [[5.0, -5.0, 3.0, -7.0, -5.0], [0.0, 4.0, 2.0, 5.0, -2.0], [5.0, -6.0, -4.0, 1.0, 0.0], [3.0, 
-3.0, 6.0, 2.0, 7.0]], [[0.0, -2.0, 6.0, 1.0, 5.0], [3.0, 5.0, 6.0, 0.0, 3.0], [6.0, -7.0, -4.0, -2.0, -4.0], [5.0, 0.0, -5.0, 
-2.0, 5.0]]], [[[5.0, -2.0, -3.0, 6.0, -2.0], [3.0, -1.0, -5.0, 5.0, -2.0], [5.0, 3.0, -5.0, 6.0, 2.0], [-2.0, 2.0, -3.0, 3.0, 
--3.0]], [[-2.0, 0.0, 3.0, 5.0, -3.0], [2.0, 0.0, 6.0, -7.0, -4.0], [7.0, 6.0, -1.0, -6.0, -1.0], [1.0, 1.0, -5.0, -4.0, 5.0]], 
-[[6.0, 5.0, 6.0, -2.0, 4.0], [-2.0, 7.0, 5.0, 6.0, -4.0], [4.0, 1.0, 0.0, -5.0, 1.0], [-7.0, -5.0, 0.0, 0.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, -5.0, 1.0, -1.0, -3.0], [2.0, -7.0, 4.0, -6.0, -6.0], [-3.0, -4.0, 0.0, 7.0, 1.0], 
-[0.0, -6.0, 7.0, 0.0, 1.0]], [[1.0, 0.0, -6.0, 5.0, 6.0], [-6.0, -7.0, 3.0, -4.0, 5.0], [-4.0, -2.0, -7.0, 3.0, 1.0], [-4.0, 
--7.0, -7.0, 0.0, -4.0]], [[0.0, -5.0, -4.0, -1.0, 6.0], [0.0, -7.0, 4.0, 5.0, 3.0], [7.0, -7.0, 3.0, -7.0, -4.0], [-7.0, 2.0, 
--5.0, 3.0, 7.0]]], [[[6.0, 5.0, -4.0, 0.0, 3.0], [2.0, -6.0, 1.0, -1.0, -3.0], [-1.0, -5.0, 3.0, -4.0, 0.0], [1.0, -5.0, -7.0, 
-0.0, -4.0]], [[-6.0, -2.0, 2.0, -4.0, 0.0], [-3.0, -4.0, -6.0, -6.0, 5.0], [5.0, -4.0, 4.0, 1.0, 5.0], [2.0, -2.0, -3.0, 6.0, 
-0.0]], [[-2.0, 0.0, 6.0, 7.0, -1.0], [2.0, 7.0, 0.0, -1.0, 4.0], [-2.0, 1.0, 2.0, 2.0, -2.0], [0.0, -7.0, -6.0, 2.0, 5.0]]]])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(2.0)
+      arg1=numpy.array(-7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-35.0, 31.0, -18.0, 57.0, -5.0], [1.0, -35.0, 2.0, -60.0, -19.0], [-8.0, 81.0, 27.0, -29.0, 
-7.0], [-25.0, -10.0, -40.0, -36.0, -25.0]], [[-32.0, 19.0, 10.0, -68.0, -31.0], [18.0, -43.0, 19.0, -17.0, 37.0], [-44.0, 
--33.0, 44.0, -39.0, -35.0], [16.0, -7.0, 48.0, -35.0, -2.0]], [[-62.0, 23.0, -22.0, -6.0, 23.0], [-6.0, -42.0, -11.0, -49.0, 
-44.0], [-76.0, -4.0, 49.0, -11.0, -16.0], [13.0, -13.0, 0.0, -20.0, -33.0]], [[54.0, -23.0, 58.0, 38.0, 24.0], [-6.0, 91.0, 
-57.0, 22.0, -56.0], [112.0, 5.0, -64.0, -17.0, 13.0], [-3.0, 3.0, -48.0, 24.0, 68.0]], [[-66.0, -48.0, -47.0, 171.0, 42.0], 
-[8.0, -12.0, -24.0, -112.0, -5.0], [37.0, 70.0, -45.0, 46.0, 15.0], [56.0, 41.0, -139.0, 17.0, 11.0]]], [[[0.0, 76.0, 47.0, 
-18.0, -13.0], [53.0, -31.0, 62.0, -14.0, -8.0], [39.0, 55.0, 31.0, -94.0, -37.0], [-53.0, -43.0, -36.0, -61.0, -28.0]], [[23.0, 
--27.0, 11.0, -56.0, -94.0], [31.0, -25.0, 14.0, 15.0, -15.0], [37.0, -15.0, -12.0, -13.0, -14.0], [20.0, 31.0, 57.0, -20.0, 
-42.0]], [[-52.0, -51.0, -27.0, -30.0, -1.0], [-25.0, -9.0, -19.0, -46.0, 35.0], [-53.0, -53.0, 6.0, 33.0, -3.0], [73.0, 34.0, 
-28.0, 14.0, 35.0]], [[13.0, 20.0, -1.0, 60.0, 62.0], [-3.0, 24.0, -11.0, 17.0, -1.0], [11.0, 20.0, -14.0, 16.0, 11.0], [-29.0, 
--22.0, -57.0, 22.0, -36.0]], [[25.0, 17.0, -19.0, 17.0, 27.0], [46.0, -30.0, -48.0, 67.0, 50.0], [-13.0, -32.0, -12.0, 47.0, 
--18.0], [-17.0, -13.0, -18.0, 28.0, -75.0]]], [[[-47.0, -5.0, -9.0, -67.0, 12.0], [10.0, -36.0, -12.0, -8.0, 79.0], [-79.0, 
--86.0, 34.0, 9.0, -38.0], [50.0, 1.0, 42.0, 1.0, -13.0]], [[26.0, 4.0, 20.0, -56.0, -30.0], [-48.0, 38.0, 26.0, 10.0, -54.0], 
-[4.0, 18.0, 14.0, -32.0, 28.0], [-28.0, -6.0, 58.0, -14.0, 40.0]], [[-24.0, -5.0, 18.0, -87.0, -15.0], [39.0, -35.0, 13.0, 
-14.0, 76.0], [-40.0, -101.0, 21.0, -11.0, -56.0], [51.0, 3.0, 51.0, -7.0, 4.0]], [[-14.0, 2.0, -19.0, 40.0, -11.0], [93.0, 
--77.0, -30.0, 12.0, 70.0], [9.0, -27.0, -15.0, 28.0, -51.0], [27.0, 11.0, -44.0, 1.0, -56.0]], [[-35.0, 31.0, 10.0, 27.0, 
-21.0], [-51.0, 22.0, 38.0, -72.0, -46.0], [-12.0, 74.0, 36.0, -57.0, 24.0], [-28.0, -22.0, -22.0, -35.0, 18.0]]], [[[26.0, 
--43.0, -17.0, 65.0, 70.0], [-26.0, 61.0, -37.0, 30.0, -5.0], [25.0, -19.0, -59.0, 77.0, 32.0], [15.0, 14.0, -53.0, 69.0, 3.0]], 
-[[-1.0, 78.0, 24.0, -1.0, 48.0], [1.0, -2.0, 23.0, 13.0, 10.0], [-28.0, 24.0, 45.0, -52.0, -12.0], [-63.0, -59.0, -16.0, -25.0, 
--57.0]], [[-1.0, -2.0, -65.0, 5.0, -14.0], [-20.0, -39.0, -77.0, 16.0, 3.0], [-61.0, 25.0, 16.0, 58.0, 31.0], [-21.0, 8.0, 
-28.0, 13.0, -55.0]], [[61.0, -6.0, -19.0, -16.0, -104.0], [31.0, -38.0, -29.0, 53.0, -47.0], [45.0, 46.0, -18.0, 14.0, 17.0], 
-[-39.0, 22.0, 47.0, -14.0, -10.0]], [[22.0, -15.0, 44.0, 29.0, 8.0], [-31.0, 74.0, 59.0, -23.0, -68.0], [78.0, 36.0, -32.0, 
--37.0, 23.0], [-5.0, 3.0, -31.0, -1.0, 73.0]]]])+(1.-msk_ref)*numpy.array([[[[-35.0, 5.0, 52.0, -42.0, -48.0], [15.0, 36.0, 
--57.0, -25.0, -9.0], [24.0, 11.0, 46.0, 11.0, 32.0], [51.0, 19.0, 35.0, 21.0, -1.0]], [[3.0, -50.0, 21.0, -18.0, -37.0], [-6.0, 
--6.0, 10.0, -27.0, -23.0], [-12.0, 15.0, -25.0, 62.0, 13.0], [1.0, 12.0, 94.0, -7.0, 12.0]], [[-10.0, -26.0, 29.0, -39.0, 
--45.0], [22.0, 45.0, -4.0, 34.0, -38.0], [18.0, 36.0, 6.0, 4.0, -8.0], [11.0, 79.0, 101.0, -18.0, 26.0]], [[-34.0, 12.0, -22.0, 
-39.0, 67.0], [-26.0, -33.0, -8.0, -5.0, 84.0], [30.0, -51.0, 22.0, -46.0, -6.0], [-32.0, -59.0, -146.0, 46.0, 17.0]], [[-35.0, 
-30.0, -47.0, -97.0, 40.0], [5.0, -49.0, -50.0, 62.0, 6.0], [113.0, -52.0, 81.0, -135.0, 6.0], [5.0, 103.0, -47.0, 31.0, 
--7.0]]], [[[-9.0, -49.0, 87.0, -30.0, -62.0], [39.0, 0.0, -32.0, -65.0, -17.0], [28.0, -39.0, 80.0, 48.0, 26.0], [38.0, -49.0, 
-40.0, 52.0, 56.0]], [[15.0, -13.0, -30.0, 4.0, 14.0], [-50.0, -86.0, 1.0, -89.0, 14.0], [-37.0, -27.0, -46.0, 70.0, 47.0], 
-[1.0, -73.0, -6.0, 11.0, -55.0]], [[-16.0, -9.0, -53.0, -20.0, 25.0], [-39.0, -14.0, 14.0, 41.0, 8.0], [8.0, 29.0, -59.0, 
--16.0, -5.0], [-30.0, 79.0, 39.0, -29.0, -23.0]], [[11.0, 19.0, 14.0, 3.0, 3.0], [46.0, 33.0, 5.0, 52.0, -14.0], [27.0, -12.0, 
-54.0, -62.0, -35.0], [-1.0, 16.0, -34.0, 3.0, 38.0]], [[95.0, 2.0, -18.0, -9.0, 0.0], [68.0, -33.0, 59.0, 46.0, -85.0], [0.0, 
--40.0, 41.0, -45.0, -47.0], [-14.0, 1.0, 19.0, -24.0, 28.0]]], [[[30.0, -48.0, -21.0, -22.0, -10.0], [8.0, -10.0, 51.0, 48.0, 
--46.0], [2.0, 18.0, -36.0, 5.0, -30.0], [-35.0, 72.0, 103.0, -37.0, 27.0]], [[-52.0, 16.0, 30.0, 58.0, -10.0], [-46.0, 58.0, 
--30.0, -54.0, 62.0], [-54.0, 54.0, -56.0, 72.0, 30.0], [18.0, -54.0, -28.0, 2.0, -32.0]], [[45.0, -67.0, -28.0, -17.0, 1.0], 
-[0.0, -59.0, 62.0, 13.0, -40.0], [-1.0, -17.0, -34.0, 25.0, -21.0], [-45.0, 26.0, 86.0, -20.0, 30.0]], [[95.0, -33.0, -37.0, 
--74.0, 2.0], [55.0, -116.0, 46.0, 17.0, -97.0], [44.0, -89.0, 64.0, -46.0, -18.0], [-14.0, 19.0, 52.0, 2.0, 24.0]], [[-96.0, 
-5.0, 72.0, -1.0, -42.0], [-15.0, 101.0, -73.0, -16.0, 54.0], [16.0, 56.0, 13.0, 25.0, 29.0], [41.0, 24.0, 8.0, 24.0, 11.0]]], 
-[[[17.0, 50.0, -61.0, 22.0, 69.0], [13.0, -2.0, 28.0, 91.0, 14.0], [25.0, -17.0, 13.0, -113.0, -52.0], [-39.0, 32.0, -101.0, 
--15.0, 4.0]], [[-4.0, -23.0, 87.0, 8.0, -63.0], [59.0, 86.0, -5.0, 12.0, -28.0], [4.0, 22.0, 51.0, 19.0, -21.0], [24.0, 1.0, 
-51.0, 6.0, 69.0]], [[32.0, 48.0, -3.0, 3.0, -25.0], [16.0, 39.0, -1.0, 9.0, -48.0], [-46.0, 45.0, -22.0, 9.0, 2.0], [33.0, 
-15.0, 35.0, -43.0, -50.0]], [[43.0, 37.0, -8.0, 19.0, -7.0], [-20.0, -59.0, -15.0, -110.0, -14.0], [-69.0, -22.0, -20.0, 74.0, 
-55.0], [43.0, -118.0, -32.0, 5.0, -84.0]], [[-75.0, 13.0, 7.0, 29.0, 35.0], [-44.0, 11.0, -44.0, -26.0, 96.0], [21.0, -8.0, 
-4.0, -9.0, 21.0], [-4.0, -38.0, -105.0, 44.0, -1.0]]]])
+      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(-14.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank2_array_rank1(self):
-      arg0=Data(numpy.array([[3.0, -4.0], [-2.0, 5.0], [0.0, -7.0]]),self.functionspace)
-      arg1=numpy.array([-1.0, 6.0, -3.0])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([-15.0, 55.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-7.0, 4.0, -1.0])+(1.-msk_arg0)*numpy.array([-1.0, -3.0, -3.0])
+      arg1=numpy.array([7.0, 1.0, 6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-51.0)+(1.-msk_ref)*numpy.array(-28.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=transposed_tensor_mult(arg0,arg1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[7.0, -7.0, 7.0], [-4.0, -2.0, 3.0]])+(1.-msk_arg0)*numpy.array([[6.0, 4.0, 4.0], [-4.0, 4.0, 
+-4.0]])
+      arg1=numpy.array([[5.0, -3.0, 2.0], [-6.0, -3.0, 7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(121.0)+(1.-msk_ref)*numpy.array(10.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")    
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[3.0, -3.0], [0.0, -6.0], [-2.0, 2.0]]),self.functionspace)
-      arg1=numpy.array([[5.0, -1.0], [2.0, 0.0], [7.0, 6.0]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[1.0, -15.0], [-13.0, 15.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 6.0, 0.0], [-5.0, -7.0, 5.0], [0.0, 6.0, 5.0], [6.0, 0.0, -7.0]], [[5.0, 1.0, 0.0], 
+[-3.0, 1.0, -5.0], [6.0, -2.0, 6.0], [4.0, 0.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 5.0, -6.0], [0.0, 1.0, -3.0], [7.0, 
+2.0, 7.0], [-5.0, -7.0, 7.0]], [[1.0, -6.0, -5.0], [-4.0, -4.0, -4.0], [-4.0, 7.0, 7.0], [7.0, -7.0, -4.0]]])
+      arg1=numpy.array([[[-7.0, 1.0, -6.0], [-4.0, -2.0, 5.0], [1.0, -7.0, 0.0], [-1.0, -5.0, 0.0]], [[-5.0, 4.0, -6.0], [7.0, 
+-2.0, 4.0], [-2.0, 6.0, -5.0], [1.0, -1.0, -7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-97.0)+(1.-msk_ref)*numpy.array(65.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank2_constData_rank1(self):
-      arg0=Data(numpy.array([[0.0, -4.0], [3.0, -2.0], [7.0, -7.0]]),self.functionspace)
-      arg1=Data(numpy.array([-3.0, -1.0, 5.0]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([32.0, -21.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, -6.0], [7.0, -6.0], [0.0, -2.0]], [[-5.0, -3.0], [7.0, 3.0], [-4.0, 2.0]]], [[[-5.0, 
+6.0], [-3.0, 5.0], [1.0, -3.0]], [[-1.0, -5.0], [6.0, 0.0], [2.0, -4.0]]], [[[-5.0, 3.0], [-1.0, 1.0], [3.0, 2.0]], [[7.0, 
+4.0], [2.0, -6.0], [4.0, 1.0]]], [[[2.0, -7.0], [-3.0, -6.0], [-1.0, -5.0]], [[6.0, -3.0], [-1.0, -7.0], [3.0, 
+3.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, -1.0], [-7.0, 3.0], [4.0, 4.0]], [[6.0, 6.0], [3.0, 0.0], [5.0, 0.0]]], [[[5.0, 
+-5.0], [-3.0, 1.0], [3.0, -6.0]], [[4.0, 2.0], [-2.0, 7.0], [7.0, 7.0]]], [[[-7.0, 2.0], [6.0, -3.0], [0.0, -7.0]], [[0.0, 
+4.0], [1.0, -7.0], [-4.0, -7.0]]], [[[7.0, -3.0], [-5.0, -2.0], [-2.0, -4.0]], [[1.0, 0.0], [0.0, -4.0], [0.0, 4.0]]]])
+      arg1=numpy.array([[[[3.0, 3.0], [3.0, -6.0], [0.0, -7.0]], [[-4.0, -3.0], [-3.0, 2.0], [-1.0, 0.0]]], [[[1.0, 0.0], [3.0, 
+2.0], [-5.0, 1.0]], [[2.0, 0.0], [3.0, -6.0], [4.0, -5.0]]], [[[5.0, 0.0], [6.0, 2.0], [-7.0, 0.0]], [[-6.0, 6.0], [-5.0, 0.0], 
+[3.0, -7.0]]], [[[-2.0, 5.0], [3.0, -4.0], [0.0, -3.0]], [[7.0, 3.0], [3.0, -1.0], [-2.0, 4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(79.0)+(1.-msk_ref)*numpy.array(-130.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(-5.0)
+      arg1=numpy.array([3.0, 4.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-12.0, -16.0])+(1.-msk_ref)*numpy.array([-15.0, -20.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[6.0, 3.0], [1.0, 4.0], [2.0, 5.0]]),self.functionspace)
-      arg1=Data(numpy.array([[-6.0, 0.0], [4.0, 0.0], [1.0, -3.0]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[-30.0, -6.0], [3.0, -15.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, 2.0, 0.0])+(1.-msk_arg0)*numpy.array([7.0, -5.0, -1.0])
+      arg1=numpy.array([[2.0, 4.0], [-2.0, 0.0], [-4.0, -1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-14.0, -20.0])+(1.-msk_ref)*numpy.array([28.0, 29.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank2_expandedData_rank1(self):
-      arg0=Data(numpy.array([[5.0, -3.0], [0.0, -6.0], [4.0, -4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, 4.0, 6.0])+(1.-msk_arg1)*numpy.array([-4.0, 7.0, -7.0])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -6.0, -3.0], [7.0, -6.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-6.0, -2.0, -4.0], [7.0, 
+0.0, 6.0]])
+      arg1=numpy.array([[[5.0, -6.0], [-7.0, 5.0], [3.0, -1.0]], [[-1.0, -3.0], [7.0, -5.0], [0.0, 7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([44.0, -60.0])+(1.-msk_ref)*numpy.array([-48.0, -2.0])
+      ref=msk_ref*numpy.array([-1.0, -78.0])+(1.-msk_ref)*numpy.array([-35.0, 51.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[7.0, 6.0], [4.0, -5.0], [7.0, -4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 4.0], [-4.0, -5.0], [2.0, 7.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 6.0], [-5.0, 1.0], 
-[-5.0, 2.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-6.0, -7.0, -3.0], [-3.0, 3.0, 6.0], [1.0, 5.0, -2.0], [6.0, -7.0, -7.0]], [[6.0, -2.0, 
+4.0], [2.0, 7.0, -2.0], [6.0, 4.0, 6.0], [3.0, 2.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-6.0, 2.0, 7.0], [-3.0, 7.0, 5.0], 
+[2.0, 0.0, 6.0], [5.0, 5.0, -6.0]], [[4.0, -5.0, 7.0], [4.0, -3.0, 2.0], [2.0, 5.0, 0.0], [2.0, 1.0, 6.0]]])
+      arg1=numpy.array([[[[7.0, 5.0], [-7.0, 2.0], [-3.0, -6.0]], [[-1.0, 7.0], [-3.0, 3.0], [7.0, 6.0]], [[0.0, -2.0], [-7.0, 
+3.0], [6.0, 0.0]], [[0.0, -3.0], [-3.0, 3.0], [0.0, 0.0]]], [[[-3.0, -6.0], [-5.0, 0.0], [-1.0, -3.0]], [[2.0, 0.0], [6.0, 
+5.0], [3.0, -2.0]], [[-2.0, 5.0], [-2.0, 3.0], [-5.0, -6.0]], [[-2.0, 7.0], [0.0, 6.0], [-2.0, -1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[5.0, 57.0], [18.0, 21.0]])+(1.-msk_ref)*numpy.array([[-76.0, 60.0], [27.0, 23.0]])
+      ref=msk_ref*numpy.array([-16.0, -5.0])+(1.-msk_ref)*numpy.array([-67.0, -67.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_array_rank2(self):
-      arg0=Data(numpy.array([[[[7.0, 2.0, 4.0, 6.0, -4.0], [3.0, -4.0, 2.0, 7.0, 6.0], [7.0, 0.0, -5.0, 0.0, 6.0], [7.0, -4.0, 
-6.0, -1.0, 5.0]], [[1.0, -5.0, -3.0, 0.0, 0.0], [-7.0, -7.0, 0.0, 5.0, 0.0], [-5.0, 7.0, -1.0, 6.0, -6.0], [1.0, 3.0, -5.0, 
-7.0, 0.0]], [[0.0, 4.0, -1.0, 1.0, 6.0], [-7.0, 7.0, 7.0, 4.0, -2.0], [-7.0, -3.0, 0.0, 4.0, -4.0], [6.0, 1.0, 6.0, 2.0, 
--4.0]]], [[[-4.0, -4.0, -4.0, 6.0, -7.0], [-4.0, 2.0, -6.0, -6.0, -4.0], [-2.0, -7.0, 4.0, -1.0, 7.0], [0.0, -1.0, 2.0, -4.0, 
-4.0]], [[-5.0, 2.0, -7.0, 1.0, 5.0], [1.0, -2.0, 0.0, -2.0, 5.0], [-6.0, 0.0, -6.0, -2.0, 2.0], [-2.0, 1.0, 0.0, 1.0, 2.0]], 
-[[3.0, -6.0, 0.0, 0.0, 7.0], [-5.0, 3.0, 1.0, 4.0, 0.0], [-3.0, -1.0, -4.0, 7.0, 1.0], [7.0, -3.0, 2.0, 6.0, 
-1.0]]]]),self.functionspace)
-      arg1=numpy.array([[-1.0, 4.0, 0.0], [-1.0, 6.0, -4.0]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[-41.0, 18.0, -54.0, -6.0, 13.0], [-1.0, -50.0, 0.0, -9.0, 28.0], [-49.0, 39.0, -23.0, -15.0, 
--29.0], [-43.0, 35.0, -36.0, 15.0, -1.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(5.0)
+      arg1=numpy.array([[-5.0, -4.0, 0.0, -1.0, 0.0], [0.0, 1.0, 7.0, 6.0, 5.0], [2.0, -3.0, 4.0, 4.0, 5.0], [0.0, -5.0, 3.0, 
+4.0, -5.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[25.0, 20.0, -0.0, 5.0, -0.0], [-0.0, -5.0, -35.0, -30.0, -25.0], [-10.0, 15.0, -20.0, -20.0, 
+-25.0], [-0.0, 25.0, -15.0, -20.0, 25.0]])+(1.-msk_ref)*numpy.array([[-25.0, -20.0, 0.0, -5.0, 0.0], [0.0, 5.0, 35.0, 30.0, 
+25.0], [10.0, -15.0, 20.0, 20.0, 25.0], [0.0, -25.0, 15.0, 20.0, -25.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_array_rank3(self):
-      arg0=Data(numpy.array([[[[1.0, -5.0, -2.0, 0.0, -3.0], [-5.0, 0.0, 3.0, 0.0, 2.0], [-5.0, -4.0, 4.0, 0.0, 5.0], [4.0, 
-5.0, -1.0, 0.0, 5.0]], [[-7.0, 7.0, 7.0, 4.0, -2.0], [4.0, -7.0, -6.0, -6.0, -4.0], [-2.0, 3.0, 2.0, -4.0, -6.0], [5.0, 0.0, 
--4.0, 4.0, -5.0]], [[-6.0, -1.0, -1.0, -7.0, 0.0], [-7.0, 3.0, -7.0, 6.0, 5.0], [6.0, -7.0, 0.0, -4.0, 4.0], [-1.0, -2.0, 1.0, 
-1.0, -5.0]]], [[[0.0, 3.0, 0.0, 7.0, -4.0], [-1.0, 0.0, 5.0, 3.0, -6.0], [-5.0, -3.0, 0.0, 6.0, 0.0], [-4.0, -4.0, 5.0, 6.0, 
-0.0]], [[-1.0, -2.0, 4.0, -6.0, -2.0], [6.0, -5.0, 6.0, 3.0, 2.0], [5.0, 4.0, 7.0, -1.0, -1.0], [-5.0, 0.0, -5.0, -6.0, -5.0]], 
-[[2.0, -7.0, 0.0, -2.0, -4.0], [7.0, 3.0, 3.0, 0.0, 0.0], [-3.0, 6.0, -7.0, 1.0, -1.0], [1.0, -4.0, -3.0, 0.0, 
--4.0]]]]),self.functionspace)
-      arg1=numpy.array([[[-5.0, -2.0], [2.0, 7.0], [-2.0, 1.0]], [[2.0, -4.0], [-1.0, 7.0], [-5.0, -2.0]]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[-16.0, -68.0], [84.0, 46.0], [22.0, 80.0], [52.0, -45.0], [25.0, 2.0]], [[4.0, 63.0], [-30.0, 
--87.0], [-24.0, -39.0], [-21.0, -27.0], [-42.0, 11.0]], [[9.0, 63.0], [0.0, 50.0], [12.0, 69.0], [8.0, -65.0], [-39.0, -53.0]], 
-[[-16.0, 5.0], [-9.0, 12.0], [25.0, -74.0], [24.0, -37.0], [0.0, -77.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, 5.0, -1.0])+(1.-msk_arg0)*numpy.array([-6.0, -2.0, -1.0])
+      arg1=numpy.array([[[-7.0, 3.0, 1.0, 3.0, 0.0], [-1.0, -7.0, 4.0, -3.0, 0.0], [0.0, 0.0, 0.0, 6.0, -7.0], [5.0, -2.0, 
+-5.0, 1.0, -7.0]], [[-3.0, -6.0, -7.0, -5.0, -2.0], [0.0, 7.0, -2.0, -2.0, -2.0], [0.0, 4.0, 4.0, 6.0, -1.0], [3.0, 4.0, -3.0, 
+7.0, 7.0]], [[-6.0, 4.0, -2.0, -1.0, 7.0], [2.0, -1.0, 0.0, -2.0, -6.0], [2.0, -7.0, 4.0, 0.0, 2.0], [6.0, -5.0, 4.0, 3.0, 
+-5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[26.0, -49.0, -38.0, -39.0, -17.0], [3.0, 71.0, -30.0, 7.0, -4.0], [-2.0, 27.0, 16.0, 0.0, 
+28.0], [-16.0, 35.0, 6.0, 27.0, 75.0]])+(1.-msk_ref)*numpy.array([[54.0, -10.0, 10.0, -7.0, -3.0], [4.0, 29.0, -20.0, 24.0, 
+10.0], [-2.0, -1.0, -12.0, -48.0, 42.0], [-42.0, 9.0, 32.0, -23.0, 33.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_array_rank4(self):
-      arg0=Data(numpy.array([[[[4.0, 3.0, -4.0, -2.0, 6.0], [-4.0, -7.0, 0.0, -4.0, 2.0], [-6.0, 7.0, 0.0, -7.0, -7.0], [2.0, 
-1.0, -6.0, -4.0, -4.0]], [[-2.0, -6.0, 1.0, 4.0, 0.0], [0.0, 3.0, 7.0, 0.0, 5.0], [-4.0, 3.0, 6.0, -7.0, 1.0], [-6.0, 6.0, 4.0, 
-0.0, -6.0]], [[-1.0, 6.0, 2.0, 4.0, 2.0], [-1.0, -3.0, 1.0, 0.0, 1.0], [-7.0, -2.0, -6.0, 0.0, 3.0], [7.0, 3.0, -6.0, -7.0, 
-5.0]]], [[[-4.0, -6.0, -3.0, 0.0, -3.0], [-5.0, -3.0, -3.0, -7.0, 6.0], [0.0, 6.0, -3.0, -7.0, 0.0], [-1.0, -6.0, 0.0, 5.0, 
-7.0]], [[-6.0, 0.0, 3.0, 5.0, 2.0], [1.0, 0.0, -3.0, 3.0, -2.0], [-6.0, 3.0, 4.0, 5.0, -1.0], [5.0, -7.0, 6.0, 5.0, -7.0]], 
-[[-3.0, 6.0, -2.0, 0.0, -1.0], [-1.0, 0.0, -6.0, -4.0, -2.0], [2.0, 7.0, 4.0, 2.0, 7.0], [2.0, 2.0, 2.0, 6.0, 
--2.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[-6.0, 6.0, -5.0, 0.0, -6.0], [6.0, 7.0, -5.0, 5.0, -7.0], [-1.0, 3.0, -5.0, 0.0, 2.0], [2.0, -6.0, 
--6.0, 5.0, 2.0]], [[2.0, -1.0, 2.0, -4.0, 5.0], [-3.0, -3.0, 6.0, 0.0, -5.0], [-1.0, -2.0, 2.0, 3.0, 0.0], [-2.0, 2.0, 0.0, 
-3.0, -6.0]], [[-3.0, -5.0, 3.0, 5.0, 2.0], [-5.0, 3.0, 1.0, -2.0, 5.0], [0.0, -3.0, -5.0, 7.0, 4.0], [6.0, -1.0, -1.0, 2.0, 
-5.0]]], [[[-7.0, -1.0, -3.0, -2.0, 1.0], [2.0, 0.0, 0.0, 3.0, -2.0], [7.0, -1.0, 6.0, 6.0, -3.0], [0.0, -2.0, 0.0, 6.0, 7.0]], 
-[[0.0, 6.0, 5.0, 4.0, 1.0], [-6.0, -4.0, -2.0, 0.0, -1.0], [-4.0, -6.0, -4.0, 4.0, -2.0], [7.0, 4.0, -2.0, -6.0, -5.0]], [[6.0, 
--1.0, 7.0, 1.0, 7.0], [-4.0, 6.0, -7.0, -3.0, 3.0], [-6.0, -1.0, -3.0, 0.0, 7.0], [-4.0, -3.0, -6.0, 3.0, -6.0]]]])
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-15.0, 2.0, -66.0, -16.0, -67.0], [75.0, 37.0, 0.0, 19.0, -18.0], [12.0, 62.0, -10.0, -61.0, 
-7.0], [-24.0, -34.0, 7.0, 15.0, 35.0]], [[30.0, -6.0, 51.0, 72.0, 0.0], [-30.0, 93.0, -87.0, -33.0, 69.0], [-75.0, 3.0, -111.0, 
--12.0, 90.0], [30.0, -42.0, -60.0, -9.0, -6.0]], [[29.0, -12.0, 38.0, 22.0, 19.0], [-53.0, -49.0, 36.0, -27.0, 30.0], [-18.0, 
--33.0, -12.0, 11.0, -11.0], [31.0, 48.0, 28.0, -55.0, -28.0]], [[8.0, -6.0, 55.0, 24.0, 45.0], [-74.0, -34.0, 28.0, -18.0, 
-9.0], [-22.0, -56.0, -22.0, 60.0, 2.0], [47.0, 36.0, -2.0, -20.0, -33.0]], [[-27.0, 42.0, -12.0, 23.0, -40.0], [12.0, 34.0, 
--25.0, 20.0, -31.0], [-29.0, 4.0, -63.0, 4.0, 18.0], [42.0, -21.0, -36.0, 1.0, -3.0]]], [[[56.0, -7.0, 30.0, 8.0, 11.0], 
-[-31.0, -41.0, 24.0, -30.0, 29.0], [-29.0, -9.0, -6.0, -33.0, -6.0], [-3.0, 42.0, 29.0, -61.0, -47.0]], [[78.0, -27.0, 41.0, 
--21.0, 48.0], [-42.0, -67.0, 50.0, -38.0, 25.0], [-17.0, -15.0, 38.0, -30.0, -17.0], [-38.0, 57.0, 45.0, -50.0, -68.0]], 
-[[-4.0, -21.0, -31.0, -35.0, -11.0], [10.0, -42.0, 91.0, 7.0, -39.0], [20.0, 10.0, 21.0, -2.0, -23.0], [-5.0, 25.0, 41.0, 5.0, 
--7.0]], [[49.0, 5.0, 28.0, 22.0, -8.0], [-40.0, -64.0, 42.0, -29.0, 27.0], [-33.0, -19.0, -22.0, -30.0, -21.0], [29.0, 62.0, 
-42.0, -92.0, -48.0]], [[-59.0, -14.0, -39.0, -37.0, 5.0], [24.0, -2.0, 39.0, 32.0, -50.0], [55.0, 1.0, 45.0, 50.0, -20.0], 
-[-6.0, -17.0, 3.0, 69.0, 43.0]]], [[[61.0, -35.0, -15.0, -41.0, 10.0], [39.0, -15.0, -3.0, -22.0, 39.0], [22.0, 45.0, 75.0, 
--85.0, -14.0], [-96.0, 5.0, 43.0, -14.0, -5.0]], [[-30.0, 54.0, 11.0, -15.0, 27.0], [9.0, 64.0, -74.0, 36.0, -68.0], [-22.0, 
--10.0, -16.0, 43.0, 31.0], [-11.0, -55.0, -88.0, 79.0, -29.0]], [[75.0, 47.0, 51.0, -28.0, 47.0], [-34.0, -28.0, -6.0, -9.0, 
--46.0], [-67.0, -19.0, -4.0, -26.0, 5.0], [-36.0, 28.0, -26.0, -24.0, -131.0]], [[89.0, 0.0, 81.0, 64.0, 19.0], [-73.0, -36.0, 
--31.0, -62.0, 99.0], [-67.0, -32.0, -47.0, -43.0, 11.0], [27.0, 56.0, 20.0, -122.0, -58.0]], [[77.0, -71.0, 90.0, 14.0, 101.0], 
-[-82.0, 3.0, -3.0, -62.0, 81.0], [-32.0, -33.0, 5.0, 20.0, 49.0], [-33.0, 16.0, -1.0, 1.0, -42.0]]], [[[-26.0, 12.0, 41.0, 
-83.0, -10.0], [-45.0, 45.0, -63.0, -13.0, 54.0], [-35.0, -34.0, -89.0, 45.0, 39.0], [85.0, -15.0, -41.0, -24.0, 31.0]], [[51.0, 
--53.0, 13.0, -23.0, 31.0], [-5.0, 38.0, 34.0, -25.0, 3.0], [-33.0, 28.0, -22.0, -25.0, 60.0], [-49.0, -19.0, -7.0, 41.0, 
--38.0]], [[74.0, 24.0, 64.0, -20.0, 64.0], [-62.0, -84.0, 22.0, -24.0, -8.0], [-34.0, -46.0, 38.0, -6.0, -34.0], [-22.0, 68.0, 
-18.0, -60.0, -108.0]], [[46.0, 30.0, 51.0, -19.0, 62.0], [-33.0, -33.0, -39.0, -9.0, -4.0], [-17.0, -32.0, 47.0, 1.0, -19.0], 
-[-39.0, 23.0, -15.0, -16.0, -69.0]], [[-64.0, -90.0, -47.0, 5.0, -10.0], [33.0, 21.0, 17.0, -3.0, 70.0], [99.0, 22.0, 59.0, 
-31.0, -9.0], [-7.0, -29.0, 45.0, 50.0, 149.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[2.0, 2.0, -6.0], [6.0, -3.0, 3.0]])+(1.-msk_arg0)*numpy.array([[6.0, 1.0, 7.0], [-5.0, 2.0, 
+-4.0]])
+      arg1=numpy.array([[[[5.0, -6.0, -4.0, -6.0, -5.0], [-7.0, -5.0, -1.0, -1.0, 6.0], [-2.0, 6.0, -5.0, -2.0, 7.0], [-6.0, 
+-4.0, 5.0, 7.0, -5.0]], [[2.0, -4.0, -5.0, -4.0, 7.0], [1.0, 1.0, -4.0, 1.0, 1.0], [-7.0, 0.0, -3.0, -6.0, 3.0], [2.0, -6.0, 
+-6.0, 1.0, 0.0]], [[2.0, 1.0, 0.0, 4.0, -3.0], [6.0, 7.0, -1.0, -2.0, 3.0], [-5.0, -5.0, -2.0, -5.0, -2.0], [3.0, -2.0, 0.0, 
+2.0, 5.0]]], [[[-7.0, 6.0, 4.0, 7.0, 7.0], [-5.0, 0.0, -2.0, -1.0, 3.0], [-1.0, 0.0, 1.0, 1.0, 6.0], [5.0, -2.0, 5.0, -6.0, 
+1.0]], [[-3.0, 3.0, -6.0, -5.0, 5.0], [4.0, -7.0, 6.0, -3.0, 4.0], [6.0, 3.0, -4.0, 0.0, 7.0], [-6.0, 5.0, 4.0, 7.0, -3.0]], 
+[[-5.0, -5.0, 2.0, -1.0, 7.0], [4.0, -3.0, 3.0, 3.0, 7.0], [5.0, 2.0, -6.0, -4.0, 4.0], [7.0, 5.0, 7.0, -6.0, 0.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-46.0, -14.0, 30.0, 10.0, 70.0], [-78.0, -38.0, -25.0, 24.0, 23.0], [3.0, 39.0, -4.0, 8.0, 
+59.0], [43.0, -20.0, 37.0, -71.0, -25.0]])+(1.-msk_ref)*numpy.array([[95.0, -37.0, -69.0, -53.0, -97.0], [18.0, 18.0, -7.0, 
+-32.0, 23.0], [-57.0, -1.0, -36.0, -42.0, -1.0], [-78.0, -44.0, -21.0, 125.0, -6.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_constData_rank2(self):
-      arg0=Data(numpy.array([[[[-3.0, 0.0, -6.0, 5.0, 4.0], [-7.0, -4.0, 0.0, -7.0, -4.0], [0.0, 6.0, -6.0, -3.0, 4.0], [-1.0, 
-5.0, -7.0, 6.0, -5.0]], [[-6.0, 3.0, 5.0, 3.0, 1.0], [0.0, 3.0, 6.0, 0.0, -4.0], [0.0, 0.0, -7.0, 1.0, 1.0], [-5.0, -6.0, 6.0, 
-0.0, -2.0]], [[-6.0, 7.0, 7.0, 0.0, 6.0], [-1.0, -3.0, 4.0, 2.0, 0.0], [0.0, -4.0, 6.0, 1.0, -7.0], [0.0, 5.0, 7.0, -5.0, 
--7.0]]], [[[2.0, 2.0, -7.0, 7.0, 5.0], [-4.0, -4.0, -2.0, 3.0, 4.0], [-4.0, -3.0, 7.0, -6.0, -7.0], [-4.0, 0.0, -4.0, -2.0, 
-7.0]], [[-3.0, -1.0, 0.0, 6.0, -5.0], [-2.0, -1.0, 4.0, 5.0, -3.0], [-7.0, -3.0, -5.0, -6.0, -2.0], [-5.0, 3.0, 4.0, 5.0, 
--1.0]], [[-4.0, -6.0, -4.0, 4.0, -4.0], [4.0, 6.0, -3.0, 3.0, 4.0], [-6.0, -2.0, 1.0, 7.0, 6.0], [3.0, -6.0, 5.0, 5.0, 
--3.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[4.0, 3.0, 3.0], [4.0, -6.0, -7.0]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[6.0, 86.0, 12.0, -7.0, 115.0], [-63.0, -68.0, 19.0, -61.0, -22.0], [68.0, 32.0, 24.0, -43.0, 
--60.0], [-26.0, 41.0, -64.0, -64.0, 8.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-2.0)+(1-msk_arg0)*(-6.0)
+      arg1=numpy.array([[[6.0, 7.0], [0.0, 4.0]], [[0.0, -5.0], [5.0, -6.0]], [[-7.0, -5.0], [6.0, -5.0]], [[7.0, -7.0], [5.0, 
+-5.0]], [[0.0, -5.0], [0.0, -3.0]], [[-6.0, 3.0], [1.0, 5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-12.0, -14.0], [-0.0, -8.0]], [[-0.0, 10.0], [-10.0, 12.0]], [[14.0, 10.0], [-12.0, 10.0]], 
+[[-14.0, 14.0], [-10.0, 10.0]], [[-0.0, 10.0], [-0.0, 6.0]], [[12.0, -6.0], [-2.0, -10.0]]])+(1.-msk_ref)*numpy.array([[[-36.0, 
+-42.0], [-0.0, -24.0]], [[-0.0, 30.0], [-30.0, 36.0]], [[42.0, 30.0], [-36.0, 30.0]], [[-42.0, 42.0], [-30.0, 30.0]], [[-0.0, 
+30.0], [-0.0, 18.0]], [[36.0, -18.0], [-6.0, -30.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_constData_rank3(self):
-      arg0=Data(numpy.array([[[[-7.0, 0.0, -4.0, 1.0, 6.0], [3.0, -3.0, 3.0, 1.0, 0.0], [-3.0, 3.0, 5.0, 0.0, 6.0], [5.0, -7.0, 
-1.0, 0.0, -6.0]], [[1.0, -3.0, -7.0, 6.0, -5.0], [-3.0, -5.0, -5.0, -3.0, 3.0], [7.0, -7.0, -5.0, -7.0, 0.0], [5.0, 0.0, 1.0, 
-6.0, 2.0]], [[3.0, -7.0, -3.0, 0.0, 6.0], [7.0, 2.0, -1.0, 5.0, -1.0], [-1.0, 7.0, -1.0, 0.0, 0.0], [-2.0, -5.0, 4.0, 0.0, 
--3.0]]], [[[4.0, -2.0, -2.0, -7.0, -6.0], [6.0, -6.0, 7.0, -6.0, 5.0], [-4.0, 7.0, 3.0, 6.0, 0.0], [7.0, 7.0, 3.0, -5.0, 2.0]], 
-[[-3.0, -1.0, 5.0, 6.0, 2.0], [-6.0, 7.0, -1.0, -4.0, 2.0], [-6.0, -1.0, 0.0, 6.0, -2.0], [6.0, -4.0, 7.0, -2.0, 1.0]], [[2.0, 
--5.0, -6.0, 3.0, 2.0], [3.0, -4.0, -5.0, 2.0, -5.0], [2.0, -6.0, -1.0, -1.0, 3.0], [2.0, -2.0, -2.0, -2.0, 
--4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[0.0, 7.0], [3.0, -2.0], [1.0, -3.0]], [[0.0, 7.0], [-2.0, -6.0], [2.0, 
-0.0]]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[16.0, -14.0], [-24.0, 19.0], [-46.0, -49.0], [12.0, -90.0], [-9.0, -20.0]], [[16.0, 84.0], 
-[-35.0, -101.0], [-24.0, 89.0], [8.0, -20.0], [-6.0, 20.0]], [[36.0, -24.0], [-24.0, 69.0], [-18.0, 69.0], [-35.0, 20.0], 
-[10.0, 54.0]], [[5.0, 44.0], [-1.0, 39.0], [-11.0, -28.0], [18.0, -35.0], [-7.0, -29.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, -4.0, -1.0])+(1.-msk_arg0)*numpy.array([7.0, 5.0, 6.0])
+      arg1=numpy.array([[[[2.0, 1.0], [3.0, -3.0]], [[2.0, -6.0], [-7.0, 6.0]], [[0.0, 6.0], [1.0, -4.0]], [[7.0, -7.0], [7.0, 
+4.0]], [[3.0, 0.0], [7.0, 7.0]], [[6.0, -7.0], [0.0, 7.0]]], [[[5.0, 6.0], [2.0, -5.0]], [[1.0, -6.0], [0.0, 5.0]], [[1.0, 
+-6.0], [-6.0, -5.0]], [[-3.0, 2.0], [-5.0, -3.0]], [[-3.0, 2.0], [1.0, 6.0]], [[-5.0, -5.0], [2.0, -7.0]]], [[[-5.0, -7.0], 
+[-2.0, 7.0]], [[-2.0, 0.0], [2.0, 5.0]], [[-2.0, -5.0], [5.0, -7.0]], [[6.0, -5.0], [-4.0, -4.0]], [[0.0, -6.0], [-6.0, -3.0]], 
+[[-5.0, -3.0], [-6.0, 4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-25.0, -22.0], [-21.0, 28.0]], [[-12.0, 54.0], [33.0, -55.0]], [[-2.0, -1.0], [14.0, 47.0]], 
+[[-29.0, 32.0], [-11.0, -4.0]], [[-3.0, -2.0], [-33.0, -56.0]], [[-5.0, 58.0], [-2.0, 
+-11.0]]])+(1.-msk_ref)*numpy.array([[[9.0, -5.0], [19.0, -4.0]], [[7.0, -72.0], [-37.0, 97.0]], [[-7.0, -18.0], [7.0, -95.0]], 
+[[70.0, -69.0], [0.0, -11.0]], [[6.0, -26.0], [18.0, 61.0]], [[-13.0, -92.0], [-26.0, 38.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_constData_rank4(self):
-      arg0=Data(numpy.array([[[[-2.0, -2.0, -4.0, -1.0, -5.0], [5.0, -5.0, -1.0, 1.0, 7.0], [-3.0, 7.0, 0.0, 4.0, 0.0], [5.0, 
--5.0, 2.0, 3.0, -4.0]], [[-5.0, 2.0, 7.0, 6.0, -2.0], [-2.0, -3.0, -7.0, 3.0, 3.0], [-5.0, -7.0, -1.0, -2.0, 1.0], [-7.0, -1.0, 
-3.0, -7.0, 0.0]], [[6.0, -5.0, -2.0, -5.0, 5.0], [0.0, -6.0, -7.0, 0.0, -2.0], [-6.0, 7.0, -1.0, 1.0, -1.0], [7.0, 6.0, 1.0, 
-2.0, -5.0]]], [[[-6.0, 4.0, 0.0, 1.0, -6.0], [1.0, -3.0, -3.0, 4.0, 6.0], [-3.0, 1.0, -1.0, -2.0, -5.0], [-3.0, -5.0, 3.0, 
--5.0, -4.0]], [[0.0, -2.0, -6.0, 6.0, 5.0], [0.0, 1.0, 2.0, 4.0, 2.0], [-1.0, -7.0, -2.0, -3.0, 6.0], [2.0, -6.0, 5.0, -3.0, 
--1.0]], [[0.0, 2.0, -3.0, 2.0, 6.0], [3.0, -2.0, -3.0, -5.0, 7.0], [-1.0, -3.0, -4.0, 2.0, 0.0], [5.0, 7.0, 1.0, 0.0, 
--4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-6.0, 1.0, 7.0, -7.0, 6.0], [5.0, -7.0, -4.0, -2.0, 0.0], [-4.0, -4.0, -1.0, 0.0, -1.0], [5.0, 
-0.0, -7.0, -4.0, 4.0]], [[6.0, 6.0, 1.0, -4.0, -6.0], [2.0, -3.0, -2.0, 6.0, 0.0], [3.0, 5.0, -3.0, -6.0, 2.0], [0.0, -7.0, 
--2.0, -5.0, -4.0]], [[-3.0, -2.0, 7.0, 2.0, -3.0], [-4.0, 0.0, 7.0, 0.0, 7.0], [7.0, -2.0, -4.0, 6.0, -6.0], [7.0, -6.0, 7.0, 
--3.0, -4.0]]], [[[3.0, -1.0, -7.0, -4.0, 7.0], [0.0, 6.0, -3.0, 0.0, -5.0], [-1.0, 7.0, -4.0, 0.0, 0.0], [-4.0, 3.0, -7.0, 4.0, 
--3.0]], [[-6.0, -7.0, 0.0, -7.0, 2.0], [-2.0, 0.0, -5.0, -1.0, 6.0], [-2.0, 7.0, 0.0, 7.0, -1.0], [2.0, -4.0, 3.0, 2.0, -4.0]], 
-[[-4.0, -4.0, 3.0, 5.0, -5.0], [-4.0, -1.0, 7.0, 4.0, -4.0], [-1.0, 1.0, 1.0, -3.0, 1.0], [4.0, -5.0, 6.0, 1.0, 
-6.0]]]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-54.0, -38.0, 65.0, 70.0, -42.0], [-44.0, -7.0, 78.0, -26.0, 72.0], [41.0, -71.0, 17.0, 66.0, 
--44.0], [56.0, -19.0, 108.0, -9.0, 6.0]], [[55.0, 22.0, -69.0, 4.0, 5.0], [10.0, 30.0, -19.0, 26.0, -75.0], [-23.0, 44.0, 2.0, 
--62.0, 40.0], [-57.0, 26.0, -47.0, 27.0, 12.0]], [[120.0, 96.0, -44.0, 23.0, -57.0], [26.0, 10.0, -3.0, 44.0, -38.0], [38.0, 
-10.0, -12.0, -87.0, 33.0], [-58.0, 2.0, -36.0, -28.0, -30.0]], [[16.0, -6.0, -37.0, -63.0, -18.0], [7.0, -7.0, -62.0, 40.0, 
--12.0], [-28.0, 95.0, 1.0, -30.0, 39.0], [-24.0, -43.0, -17.0, 7.0, -23.0]], [[-69.0, -80.0, 58.0, 72.0, -95.0], [-83.0, -1.0, 
-94.0, 17.0, 71.0], [39.0, -1.0, 21.0, 59.0, -28.0], [68.0, -84.0, 167.0, 7.0, 2.0]]], [[[-51.0, -20.0, 35.0, -16.0, 34.0], 
-[9.0, -26.0, 2.0, -10.0, -17.0], [-30.0, -20.0, 0.0, 3.0, -6.0], [33.0, 2.0, -20.0, -3.0, 43.0]], [[23.0, -7.0, -65.0, 30.0, 
--3.0], [-1.0, 28.0, -26.0, -17.0, -13.0], [-28.0, 1.0, 48.0, -5.0, 32.0], [-61.0, 54.0, 11.0, 41.0, 9.0]], [[-24.0, -28.0, 
--51.0, 4.0, 55.0], [17.0, 13.0, -53.0, -54.0, -10.0], [-64.0, -27.0, 59.0, 23.0, 24.0], [-50.0, 89.0, -19.0, 49.0, 35.0]], 
-[[20.0, 7.0, -33.0, -88.0, 49.0], [23.0, 13.0, -77.0, -8.0, 24.0], [-2.0, 62.0, -31.0, 25.0, -4.0], [-23.0, 0.0, -59.0, 0.0, 
--66.0]], [[-40.0, -19.0, 17.0, -68.0, 41.0], [17.0, -29.0, -27.0, 30.0, -60.0], [-50.0, 54.0, -25.0, -37.0, 16.0], [29.0, 
--34.0, -63.0, -2.0, 40.0]]], [[[7.0, -7.0, -50.0, 43.0, 12.0], [5.0, 19.0, -13.0, -27.0, -29.0], [-39.0, -30.0, 53.0, -10.0, 
-29.0], [-51.0, 71.0, 1.0, 40.0, 39.0]], [[-48.0, 11.0, 75.0, 23.0, 71.0], [19.0, -19.0, 46.0, -61.0, 14.0], [16.0, -122.0, 
--21.0, 44.0, -59.0], [54.0, 53.0, -32.0, -27.0, 35.0]], [[22.0, 27.0, -13.0, 0.0, 18.0], [22.0, 1.0, -20.0, -20.0, 2.0], [-1.0, 
--28.0, 7.0, -2.0, 2.0], [-23.0, 38.0, -28.0, -4.0, -5.0]], [[-35.0, 5.0, 53.0, 21.0, 3.0], [10.0, -36.0, 30.0, -9.0, -9.0], 
-[-9.0, -61.0, 8.0, -9.0, -9.0], [37.0, 4.0, 0.0, -21.0, 50.0]], [[-42.0, -29.0, 29.0, -28.0, -26.0], [-6.0, -33.0, -24.0, 0.0, 
-54.0], [-11.0, 14.0, 21.0, 30.0, 2.0], [25.0, -40.0, 44.0, -10.0, -9.0]]], [[[-134.0, -82.0, 113.0, 30.0, 9.0], [-41.0, -37.0, 
-77.0, -34.0, 56.0], [2.0, -71.0, 5.0, 83.0, -58.0], [110.0, -35.0, 85.0, -9.0, 51.0]], [[-1.0, -4.0, 62.0, 148.0, -124.0], 
-[-67.0, 1.0, 158.0, 38.0, 3.0], [69.0, -67.0, 11.0, -21.0, -20.0], [53.0, -55.0, 138.0, -18.0, 41.0]], [[-22.0, -24.0, 6.0, 
--66.0, 17.0], [-2.0, -6.0, -34.0, 13.0, 18.0], [-6.0, 62.0, -26.0, 20.0, -6.0], [19.0, -43.0, -13.0, -3.0, -31.0]], [[-63.0, 
--17.0, 63.0, 52.0, 13.0], [-1.0, -30.0, 46.0, -45.0, 21.0], [-8.0, -107.0, 30.0, 33.0, -26.0], [43.0, 34.0, 33.0, -9.0, 59.0]], 
-[[49.0, 33.0, -47.0, 21.0, -19.0], [18.0, 8.0, -30.0, -7.0, -5.0], [-9.0, -13.0, 36.0, -25.0, 31.0], [-57.0, 42.0, -6.0, 9.0, 
--4.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(-7.0)
+      arg1=numpy.array([[[[-1.0, 2.0, -3.0, 4.0], [2.0, -7.0, -3.0, 5.0], [3.0, -6.0, 2.0, -3.0]], [[-3.0, -6.0, 0.0, -4.0], 
+[2.0, -4.0, 3.0, 5.0], [5.0, 4.0, 1.0, 2.0]]], [[[-4.0, -5.0, -3.0, 6.0], [2.0, -3.0, -3.0, -7.0], [-3.0, -3.0, -2.0, -5.0]], 
+[[1.0, -4.0, -7.0, -7.0], [-7.0, -3.0, 2.0, -7.0], [-2.0, 1.0, 3.0, -3.0]]], [[[2.0, -2.0, 4.0, 4.0], [6.0, 4.0, 4.0, 1.0], 
+[-3.0, 5.0, 7.0, 3.0]], [[1.0, -4.0, -6.0, 2.0], [-7.0, -6.0, -2.0, 1.0], [-5.0, -5.0, -5.0, 7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-6.0, 12.0, -18.0, 24.0], [12.0, -42.0, -18.0, 30.0], [18.0, -36.0, 12.0, -18.0]], [[-18.0, 
+-36.0, 0.0, -24.0], [12.0, -24.0, 18.0, 30.0], [30.0, 24.0, 6.0, 12.0]]], [[[-24.0, -30.0, -18.0, 36.0], [12.0, -18.0, -18.0, 
+-42.0], [-18.0, -18.0, -12.0, -30.0]], [[6.0, -24.0, -42.0, -42.0], [-42.0, -18.0, 12.0, -42.0], [-12.0, 6.0, 18.0, -18.0]]], 
+[[[12.0, -12.0, 24.0, 24.0], [36.0, 24.0, 24.0, 6.0], [-18.0, 30.0, 42.0, 18.0]], [[6.0, -24.0, -36.0, 12.0], [-42.0, -36.0, 
+-12.0, 6.0], [-30.0, -30.0, -30.0, 42.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -14.0, 21.0, -28.0], [-14.0, 49.0, 21.0, -35.0], 
+[-21.0, 42.0, -14.0, 21.0]], [[21.0, 42.0, -0.0, 28.0], [-14.0, 28.0, -21.0, -35.0], [-35.0, -28.0, -7.0, -14.0]]], [[[28.0, 
+35.0, 21.0, -42.0], [-14.0, 21.0, 21.0, 49.0], [21.0, 21.0, 14.0, 35.0]], [[-7.0, 28.0, 49.0, 49.0], [49.0, 21.0, -14.0, 49.0], 
+[14.0, -7.0, -21.0, 21.0]]], [[[-14.0, 14.0, -28.0, -28.0], [-42.0, -28.0, -28.0, -7.0], [21.0, -35.0, -49.0, -21.0]], [[-7.0, 
+28.0, 42.0, -14.0], [49.0, 42.0, 14.0, -7.0], [35.0, 35.0, 35.0, -49.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_expandedData_rank2(self):
-      arg0=Data(numpy.array([[[[0.0, 6.0, 3.0, -6.0, 2.0], [-4.0, -3.0, -7.0, -7.0, -2.0], [-4.0, 1.0, 5.0, -3.0, 6.0], [0.0, 
-3.0, 0.0, -2.0, 3.0]], [[7.0, 4.0, 5.0, -4.0, 1.0], [-7.0, -7.0, -3.0, 4.0, -1.0], [-2.0, 0.0, -6.0, -7.0, -7.0], [6.0, -1.0, 
-7.0, -4.0, 4.0]], [[-1.0, 7.0, -7.0, 2.0, -5.0], [7.0, -4.0, 7.0, 0.0, -7.0], [0.0, -6.0, -4.0, -4.0, 5.0], [3.0, -2.0, 0.0, 
--3.0, 0.0]]], [[[1.0, -2.0, -3.0, -6.0, 1.0], [1.0, 7.0, 3.0, 7.0, -4.0], [0.0, 6.0, 4.0, 0.0, -5.0], [6.0, -4.0, 3.0, 3.0, 
-6.0]], [[-5.0, 5.0, 0.0, 5.0, 4.0], [6.0, -5.0, 0.0, 3.0, 4.0], [-7.0, 2.0, -1.0, 0.0, -6.0], [-4.0, 4.0, 1.0, 4.0, 1.0]], 
-[[7.0, -2.0, 5.0, 6.0, 4.0], [-7.0, -6.0, 1.0, 0.0, -2.0], [7.0, 3.0, 3.0, 4.0, 2.0], [-2.0, 1.0, 7.0, -3.0, 
--2.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, -2.0, 2.0], [-4.0, 0.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -3.0, 1.0], [-2.0, 
--3.0, 3.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(2.0)
+      arg1=Data(-1.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-48.0, 22.0, -32.0, 12.0, -32.0], [52.0, 2.0, 4.0, -36.0, 12.0], [-24.0, -48.0, -24.0, -10.0, 
-36.0], [-22.0, 10.0, -54.0, 2.0, -24.0]])+(1.-msk_ref)*numpy.array([[12.0, -46.0, -13.0, 53.0, -18.0], [3.0, 12.0, 41.0, -7.0, 
--6.0], [64.0, -19.0, -2.0, 41.0, 36.0], [-21.0, -12.0, -9.0, -10.0, -45.0]])
+      ref=msk_ref*numpy.array(4.0)+(1.-msk_ref)*numpy.array(-2.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_expandedData_rank3(self):
-      arg0=Data(numpy.array([[[[3.0, -5.0, -6.0, -6.0, -5.0], [-4.0, -3.0, -5.0, -1.0, 6.0], [-6.0, -1.0, 1.0, -3.0, 2.0], 
-[3.0, 3.0, -7.0, -7.0, 2.0]], [[-2.0, 2.0, 4.0, 0.0, 6.0], [-5.0, 7.0, 5.0, 4.0, 3.0], [-3.0, 6.0, -5.0, 4.0, -5.0], [1.0, 7.0, 
-0.0, 6.0, -3.0]], [[-1.0, -2.0, 3.0, 3.0, 1.0], [0.0, -1.0, -1.0, -3.0, -2.0], [-6.0, 0.0, 0.0, -7.0, 5.0], [1.0, 7.0, 6.0, 
-2.0, -6.0]]], [[[-2.0, -2.0, -1.0, 2.0, 7.0], [-2.0, -1.0, 0.0, -4.0, -6.0], [3.0, 6.0, -4.0, 1.0, 1.0], [3.0, -3.0, -4.0, 1.0, 
--6.0]], [[-1.0, 1.0, -4.0, -3.0, -1.0], [2.0, -4.0, -5.0, -6.0, -1.0], [2.0, 3.0, -7.0, -7.0, 1.0], [4.0, -1.0, -5.0, 7.0, 
-2.0]], [[-6.0, 1.0, -5.0, 5.0, 4.0], [4.0, 3.0, 1.0, 7.0, 4.0], [2.0, 0.0, 1.0, 0.0, 1.0], [-5.0, 6.0, -7.0, -6.0, 
-6.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, 2.0], [-4.0, 6.0], [6.0, 2.0]], [[3.0, 3.0], [0.0, -3.0], [-2.0, 
--3.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 0.0], [-2.0, -4.0], [0.0, 0.0]], [[-1.0, 3.0], [-5.0, -5.0], [0.0, 0.0]]])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-2.0, 3.0, -7.0])+(1.-msk_arg0)*numpy.array([7.0, -7.0, 7.0])
+      arg1=Data(numpy.array([-3.0, -1.0, 4.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[8.0, 7.0], [-28.0, -14.0], [9.0, 42.0], [14.0, -6.0], [-5.0, 40.0]], [[6.0, -62.0], [-43.0, 
-34.0], [-28.0, 30.0], [-60.0, 1.0], [-50.0, -1.0]], [[-19.0, -45.0], [-6.0, 43.0], [6.0, -22.0], [-55.0, 28.0], [51.0, -19.0]], 
-[[21.0, 26.0], [-7.0, 38.0], [38.0, 22.0], [3.0, 26.0], [-54.0, -68.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 7.0], [-22.0, 
--19.0], [-5.0, 1.0], [-5.0, 21.0], [-29.0, 2.0]], [[-10.0, 4.0], [-2.0, -11.0], [0.0, 5.0], [23.0, 2.0], [23.0, -25.0]], 
-[[-25.0, 11.0], [-36.0, -21.0], [52.0, 43.0], [17.0, 22.0], [10.0, 18.0]], [[-16.0, -15.0], [3.0, -32.0], [8.0, 13.0], [-69.0, 
--56.0], [8.0, -16.0]]])
+      ref=msk_ref*numpy.array(-25.0)+(1.-msk_ref)*numpy.array(14.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_constData_rank4_expandedData_rank4(self):
-      arg0=Data(numpy.array([[[[-1.0, -3.0, 1.0, 2.0, 3.0], [4.0, 3.0, -3.0, 3.0, -2.0], [7.0, -5.0, 5.0, -7.0, -5.0], [0.0, 
-0.0, 3.0, 2.0, -6.0]], [[-7.0, 7.0, -1.0, -2.0, -6.0], [0.0, -3.0, -2.0, -1.0, 3.0], [4.0, 0.0, 3.0, -6.0, -5.0], [-3.0, 3.0, 
--3.0, 0.0, -1.0]], [[-1.0, 3.0, 6.0, -5.0, 5.0], [-7.0, -4.0, -2.0, 3.0, -7.0], [7.0, -2.0, 3.0, -2.0, 0.0], [-4.0, 0.0, -3.0, 
--4.0, 3.0]]], [[[1.0, -2.0, -5.0, 0.0, 5.0], [0.0, -4.0, 1.0, 1.0, -6.0], [5.0, 0.0, 1.0, 2.0, -6.0], [0.0, 0.0, 7.0, -6.0, 
-1.0]], [[-2.0, -7.0, 4.0, 4.0, -7.0], [1.0, -1.0, -4.0, 6.0, 1.0], [0.0, 4.0, 6.0, 0.0, -2.0], [4.0, 5.0, 5.0, 3.0, 1.0]], 
-[[-6.0, 4.0, 5.0, 0.0, -4.0], [1.0, -2.0, -6.0, -4.0, 0.0], [-6.0, 6.0, 1.0, 0.0, -4.0], [7.0, 6.0, 2.0, -3.0, 
-5.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[4.0, -4.0, 3.0, 2.0, 3.0], [-6.0, 3.0, 0.0, 0.0, 1.0], [0.0, 4.0, -5.0, -5.0, 0.0], [-4.0, 
-4.0, -6.0, -5.0, -7.0]], [[-5.0, 4.0, 0.0, 6.0, -6.0], [-3.0, -2.0, 1.0, -2.0, 7.0], [7.0, -1.0, 2.0, 4.0, 0.0], [-6.0, 3.0, 
-5.0, -6.0, 5.0]], [[0.0, -5.0, -1.0, 7.0, -4.0], [-6.0, -7.0, -7.0, 4.0, 0.0], [0.0, 7.0, 2.0, 6.0, -6.0], [6.0, 0.0, 6.0, 
--4.0, -1.0]]], [[[3.0, 1.0, 2.0, 5.0, 0.0], [1.0, 4.0, -3.0, -5.0, -4.0], [-5.0, 4.0, -3.0, 1.0, -1.0], [4.0, -4.0, 3.0, -1.0, 
--6.0]], [[0.0, 6.0, -6.0, 1.0, 2.0], [-5.0, -4.0, -1.0, 0.0, 1.0], [-7.0, -6.0, 2.0, 0.0, -7.0], [-2.0, 0.0, -7.0, -5.0, 
--4.0]], [[-1.0, 6.0, 6.0, -5.0, 2.0], [0.0, 1.0, 6.0, -7.0, -5.0], [7.0, -4.0, 6.0, 1.0, -7.0], [5.0, 6.0, 3.0, 4.0, 
-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -5.0, -1.0, 2.0, 3.0], [-6.0, 5.0, -1.0, 3.0, 7.0], [-6.0, 0.0, 0.0, -6.0, 3.0], 
-[-7.0, -3.0, 6.0, 6.0, -4.0]], [[-1.0, 0.0, -3.0, -5.0, 0.0], [2.0, -4.0, 2.0, 0.0, -3.0], [5.0, 5.0, -6.0, -3.0, 6.0], [3.0, 
--7.0, 2.0, -5.0, 5.0]], [[1.0, -1.0, 6.0, 3.0, -1.0], [7.0, 6.0, 5.0, 3.0, -4.0], [6.0, -2.0, 0.0, -6.0, 7.0], [3.0, 0.0, 1.0, 
--2.0, -2.0]]], [[[7.0, 6.0, 2.0, 4.0, 4.0], [-7.0, -7.0, 6.0, 2.0, 7.0], [5.0, -3.0, -1.0, -3.0, 2.0], [-1.0, -4.0, 3.0, 5.0, 
-6.0]], [[5.0, 7.0, -2.0, -3.0, 3.0], [-5.0, 2.0, 1.0, 6.0, 2.0], [6.0, 4.0, 2.0, 0.0, 0.0], [-4.0, 0.0, -7.0, 1.0, 0.0]], 
-[[5.0, 0.0, 0.0, -4.0, -6.0], [-3.0, -6.0, 0.0, 0.0, -2.0], [1.0, 4.0, -4.0, 5.0, 1.0], [3.0, -6.0, 0.0, 4.0, -5.0]]]])
-      res=transposed_tensor_mult(arg0,arg1)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-2.0, 7.0, 0.0], [5.0, -1.0, -7.0]])+(1.-msk_arg0)*numpy.array([[7.0, 3.0, 2.0], [-6.0, -5.0, 
+7.0]])
+      arg1=Data(numpy.array([[-7.0, -5.0, 1.0], [5.0, 7.0, -1.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[40.0, -66.0, -24.0, -18.0, 27.0], [44.0, 24.0, -37.0, 47.0, -26.0], [-82.0, 36.0, -54.0, 
--34.0, 61.0], [18.0, -65.0, -36.0, 36.0, -49.0]], [[-57.0, 5.0, 50.0, 20.0, -69.0], [12.0, -20.0, 23.0, -20.0, 27.0], [136.0, 
-20.0, 51.0, 63.0, 5.0], [14.0, 41.0, 126.0, 14.0, 109.0]], [[-11.0, 11.0, -7.0, -8.0, 3.0], [-64.0, -68.0, -2.0, 16.0, -7.0], 
-[25.0, -17.0, 58.0, 27.0, -94.0], [35.0, 51.0, -3.0, -18.0, 16.0]], [[18.0, 33.0, -13.0, -39.0, 46.0], [4.0, 29.0, 29.0, -16.0, 
--8.0], [-42.0, -49.0, -16.0, -48.0, 2.0], [-34.0, 2.0, -80.0, 2.0, -35.0]], [[61.0, -122.0, 32.0, 43.0, 3.0], [10.0, 30.0, 
--73.0, 35.0, -46.0], [-46.0, 131.0, -70.0, -8.0, 42.0], [68.0, -50.0, 34.0, 15.0, -74.0]]], [[[15.0, 31.0, 19.0, -45.0, 44.0], 
-[13.0, 58.0, 54.0, -35.0, 0.0], [0.0, -43.0, -26.0, -61.0, 28.0], [-55.0, 22.0, -70.0, 7.0, -21.0]], [[17.0, -26.0, -1.0, 
--51.0, 37.0], [16.0, 29.0, 26.0, 24.0, 7.0], [-8.0, -15.0, -31.0, -57.0, 49.0], [-42.0, 7.0, -68.0, 20.0, -12.0]], [[7.0, 
--45.0, -17.0, -1.0, -9.0], [57.0, 23.0, -23.0, 33.0, 5.0], [-33.0, 28.0, -40.0, -10.0, 81.0], [-6.0, -58.0, 9.0, 30.0, -1.0]], 
-[[24.0, -18.0, -52.0, 52.0, 7.0], [-62.0, -34.0, -55.0, 37.0, 18.0], [-82.0, 18.0, -26.0, -4.0, -33.0], [-16.0, -19.0, -56.0, 
--68.0, -75.0]], [[-41.0, 55.0, -17.0, -64.0, 6.0], [34.0, 9.0, 69.0, -4.0, 44.0], [44.0, -90.0, 22.0, -26.0, 41.0], [-78.0, 
-25.0, -40.0, 21.0, 68.0]]], [[[29.0, -78.0, -12.0, 142.0, -43.0], [-91.0, -22.0, -96.0, 37.0, 45.0], [-39.0, 117.0, -64.0, 
-22.0, -5.0], [-20.0, -16.0, 17.0, -116.0, -90.0]], [[-26.0, 90.0, -1.0, -50.0, 13.0], [22.0, -11.0, 46.0, -50.0, -31.0], [14.0, 
--82.0, 65.0, 19.0, -58.0], [30.0, 16.0, 8.0, 37.0, 45.0]], [[7.0, 20.0, -16.0, 55.0, -1.0], [-86.0, -31.0, -21.0, -6.0, 23.0], 
-[-19.0, 2.0, 2.0, 7.0, -68.0], [-23.0, 31.0, -33.0, -82.0, -49.0]], [[8.0, 16.0, -15.0, -54.0, 23.0], [74.0, 13.0, 2.0, -6.0, 
--57.0], [-52.0, -28.0, 13.0, 1.0, 10.0], [60.0, -54.0, 6.0, 77.0, 9.0]], [[-9.0, -42.0, -39.0, -52.0, 3.0], [49.0, -25.0, -9.0, 
-68.0, 2.0], [-19.0, -11.0, 5.0, -5.0, 48.0], [10.0, -35.0, -11.0, 55.0, 38.0]]], [[[8.0, 74.0, 22.0, -77.0, 56.0], [13.0, 25.0, 
-63.0, -59.0, -52.0], [0.0, -77.0, 36.0, -29.0, -53.0], [21.0, 33.0, -46.0, 42.0, 1.0]], [[-21.0, 78.0, 6.0, -7.0, 4.0], [-34.0, 
--20.0, 34.0, -48.0, -4.0], [28.0, -57.0, 52.0, 18.0, -77.0], [2.0, 45.0, -2.0, -19.0, 19.0]], [[46.0, 40.0, 8.0, -3.0, 53.0], 
-[-9.0, 46.0, 4.0, -55.0, -51.0], [-77.0, -16.0, -26.0, -36.0, -38.0], [16.0, -13.0, -59.0, -9.0, -87.0]], [[-7.0, 6.0, -38.0, 
--36.0, 22.0], [-9.0, -5.0, 25.0, 35.0, 44.0], [-12.0, -50.0, -12.0, -43.0, 30.0], [-77.0, 14.0, -84.0, -15.0, 2.0]], [[-21.0, 
-42.0, 5.0, -16.0, -12.0], [17.0, -32.0, 4.0, -26.0, -41.0], [16.0, -24.0, 63.0, 50.0, -61.0], [75.0, -1.0, 60.0, 38.0, 
-44.0]]]])+(1.-msk_ref)*numpy.array([[[[-33.0, -2.0, 22.0, 64.0, 32.0], [6.0, 42.0, -14.0, -16.0, 33.0], [-48.0, -68.0, 61.0, 
-0.0, -56.0], [-28.0, 84.0, -4.0, 10.0, 7.0]], [[-51.0, -49.0, 10.0, -35.0, -65.0], [90.0, -49.0, 13.0, -46.0, -90.0], [23.0, 
-23.0, -70.0, 5.0, 54.0], [93.0, -56.0, 42.0, -60.0, 9.0]], [[23.0, -13.0, 20.0, -27.0, -41.0], [34.0, 58.0, 1.0, 35.0, -51.0], 
-[29.0, 34.0, -1.0, 1.0, 34.0], [12.0, -6.0, -33.0, -2.0, -76.0]], [[29.0, 23.0, -34.0, -13.0, 23.0], [-71.0, -4.0, -27.0, 15.0, 
-48.0], [-28.0, 16.0, 20.0, 24.0, -41.0], [-51.0, 8.0, -25.0, 36.0, -8.0]], [[9.0, -39.0, 69.0, 108.0, 27.0], [17.0, 44.0, 33.0, 
--8.0, 48.0], [-39.0, -99.0, 33.0, -65.0, 14.0], [-13.0, 37.0, 75.0, 40.0, -2.0]]], [[[27.0, -6.0, -48.0, -20.0, 16.0], [-81.0, 
--26.0, -38.0, -3.0, 56.0], [-59.0, 22.0, -2.0, 23.0, -36.0], [-50.0, -18.0, 10.0, 43.0, -7.0]], [[-26.0, -42.0, -24.0, 4.0, 
-6.0], [-13.0, 41.0, -54.0, -17.0, 20.0], [-85.0, -7.0, 28.0, 17.0, -47.0], [-40.0, 40.0, 3.0, 12.0, -33.0]], [[-61.0, -5.0, 
-7.0, 38.0, 21.0], [31.0, 2.0, -9.0, -37.0, 4.0], [-29.0, -49.0, 27.0, 3.0, -39.0], [6.0, 55.0, 7.0, -27.0, 42.0]], [[39.0, 
-30.0, 8.0, 22.0, 52.0], [-24.0, 66.0, 22.0, 56.0, 39.0], [32.0, -6.0, 33.0, -56.0, 22.0], [-52.0, 18.0, -20.0, 12.0, 3.0]], 
-[[-59.0, -12.0, -63.0, -67.0, -20.0], [6.0, -20.0, -62.0, -33.0, -35.0], [-39.0, 51.0, -10.0, 63.0, -49.0], [4.0, 9.0, -38.0, 
--42.0, 1.0]]], [[[50.0, -12.0, 33.0, 59.0, 70.0], [-2.0, 62.0, 66.0, 52.0, 56.0], [39.0, -33.0, -5.0, -141.0, 98.0], [-39.0, 
--33.0, 72.0, 9.0, 38.0]], [[18.0, 55.0, -15.0, -52.0, -37.0], [-22.0, -65.0, -1.0, 3.0, -31.0], [48.0, 44.0, -16.0, 72.0, 
--23.0], [31.0, -21.0, -60.0, 2.0, -6.0]], [[72.0, 20.0, -6.0, -14.0, 28.0], [-43.0, 30.0, 28.0, 62.0, 31.0], [45.0, 34.0, 
--11.0, -55.0, 57.0], [-39.0, -46.0, 0.0, 24.0, -10.0]], [[-24.0, 49.0, 17.0, 18.0, -11.0], [2.0, -37.0, -3.0, -23.0, -9.0], 
-[10.0, -32.0, 34.0, 66.0, -67.0], [23.0, 55.0, -50.0, 2.0, 14.0]], [[-97.0, -25.0, 12.0, 13.0, -21.0], [84.0, 57.0, -43.0, 
--39.0, -58.0], [-41.0, -31.0, 48.0, 43.0, -61.0], [22.0, 98.0, -44.0, -53.0, -21.0]]], [[[54.0, 32.0, -23.0, -37.0, -26.0], 
-[-75.0, -46.0, -22.0, 12.0, 19.0], [-8.0, 37.0, -2.0, 68.0, -39.0], [-16.0, -21.0, -38.0, 55.0, -42.0]], [[52.0, 35.0, -19.0, 
--54.0, -21.0], [-37.0, -38.0, 11.0, 30.0, -11.0], [51.0, 59.0, -32.0, 21.0, 24.0], [7.0, -57.0, -29.0, 14.0, -15.0]], [[102.0, 
-65.0, -8.0, 17.0, 43.0], [-125.0, -42.0, 23.0, 44.0, 97.0], [16.0, -2.0, 13.0, -2.0, -14.0], [-60.0, -28.0, -5.0, 87.0, 11.0]], 
-[[-34.0, -21.0, -44.0, -29.0, 13.0], [-4.0, 52.0, -55.0, 0.0, 0.0], [-51.0, 26.0, 24.0, 15.0, -37.0], [-41.0, 36.0, -31.0, 
--19.0, -21.0]], [[5.0, 40.0, 27.0, -17.0, -44.0], [28.0, -43.0, 26.0, -1.0, -52.0], [65.0, 10.0, -13.0, 43.0, 4.0], [58.0, 
--9.0, -39.0, -11.0, -6.0]]]])
+      ref=msk_ref*numpy.array(4.0)+(1.-msk_ref)*numpy.array(-134.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank2_array_rank1(self):
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank3_offset3(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[1.0, 0.0], [-1.0, -7.0], [1.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 7.0], [5.0, -7.0], 
-[-1.0, 4.0]])
-      arg1=numpy.array([-5.0, 1.0, -4.0])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[[3.0, 5.0, -7.0], [7.0, 2.0, 5.0], [-2.0, -6.0, 3.0], [-1.0, -5.0, -2.0]], [[-2.0, 1.0, 
+-3.0], [-1.0, -5.0, 6.0], [-4.0, -2.0, 0.0], [-4.0, 0.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, -1.0, -4.0], [4.0, -4.0, 
+-1.0], [-5.0, 3.0, 1.0], [-1.0, 0.0, -4.0]], [[6.0, -4.0, 0.0], [-7.0, 5.0, 0.0], [-6.0, -4.0, -6.0], [7.0, -2.0, 1.0]]])
+      arg1=Data(numpy.array([[[6.0, 7.0, 3.0], [7.0, -2.0, -6.0], [-7.0, 4.0, -3.0], [0.0, -7.0, 3.0]], [[-1.0, -5.0, -4.0], 
+[7.0, 2.0, 0.0], [5.0, -2.0, 5.0], [0.0, 0.0, -2.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-10.0, -35.0])+(1.-msk_ref)*numpy.array([39.0, -58.0])
+      ref=msk_ref*numpy.array(23.0)+(1.-msk_ref)*numpy.array(-30.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank2_array_rank2(self):
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank4_offset4(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-1.0, 1.0], [-2.0, 7.0], [6.0, 0.0]])+(1.-msk_arg0)*numpy.array([[5.0, -7.0], [-3.0, 6.0], 
-[1.0, 0.0]])
-      arg1=numpy.array([[-3.0, -6.0], [-7.0, 5.0], [-1.0, 3.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[[[1.0, -4.0], [-5.0, 2.0], [7.0, 1.0]], [[-6.0, 3.0], [-7.0, 0.0], [-3.0, -6.0]]], [[[5.0, 
+4.0], [6.0, -3.0], [7.0, 3.0]], [[2.0, -7.0], [7.0, 5.0], [-5.0, -5.0]]], [[[-4.0, -2.0], [-1.0, 0.0], [4.0, -6.0]], [[1.0, 
+-1.0], [4.0, 3.0], [3.0, 0.0]]], [[[2.0, -4.0], [2.0, -7.0], [-1.0, 3.0]], [[0.0, -2.0], [-3.0, -1.0], [-5.0, 
+6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, -7.0], [-3.0, -4.0], [0.0, 2.0]], [[-2.0, -3.0], [5.0, -7.0], [5.0, -7.0]]], 
+[[[4.0, 0.0], [-6.0, -5.0], [3.0, -5.0]], [[-7.0, -7.0], [-4.0, 7.0], [0.0, 3.0]]], [[[6.0, -7.0], [-2.0, 3.0], [0.0, -2.0]], 
+[[-2.0, 4.0], [-6.0, 6.0], [6.0, 6.0]]], [[[5.0, -2.0], [-7.0, 4.0], [5.0, 1.0]], [[3.0, -6.0], [7.0, 1.0], [7.0, -6.0]]]])
+      arg1=Data(numpy.array([[[[-1.0, -1.0], [-4.0, -7.0], [5.0, -1.0]], [[4.0, 5.0], [5.0, 6.0], [-7.0, 0.0]]], [[[2.0, -2.0], 
+[0.0, 3.0], [-1.0, 5.0]], [[-6.0, 0.0], [4.0, 6.0], [0.0, 5.0]]], [[[6.0, -5.0], [7.0, -4.0], [6.0, -7.0]], [[-4.0, 0.0], 
+[-5.0, -1.0], [-4.0, 5.0]]], [[[7.0, 0.0], [3.0, 2.0], [-5.0, 3.0]], [[5.0, -6.0], [0.0, -2.0], [2.0, 
+6.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[11.0, 14.0], [-52.0, 29.0]])+(1.-msk_ref)*numpy.array([[5.0, -42.0], [-21.0, 72.0]])
+      ref=msk_ref*numpy.array(108.0)+(1.-msk_ref)*numpy.array(149.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank2_constData_rank1(self):
+   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank1_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-1.0, 4.0], [0.0, 0.0], [-5.0, -2.0]])+(1.-msk_arg0)*numpy.array([[2.0, -3.0], [-5.0, -5.0], 
-[-4.0, 5.0]])
-      arg1=Data(numpy.array([0.0, 4.0, -4.0]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(-5.0)
+      arg1=Data(numpy.array([-3.0, 4.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([20.0, 8.0])+(1.-msk_ref)*numpy.array([-4.0, -40.0])
+      ref=msk_ref*numpy.array([12.0, -16.0])+(1.-msk_ref)*numpy.array([15.0, -20.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank2_constData_rank2(self):
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank2_offset1(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, 2.0], [4.0, -6.0], [4.0, 1.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0], [2.0, 4.0], 
-[2.0, -7.0]])
-      arg1=Data(numpy.array([[7.0, -2.0], [4.0, 2.0], [7.0, -7.0]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([-7.0, 2.0, -2.0])+(1.-msk_arg0)*numpy.array([-7.0, 3.0, -5.0])
+      arg1=Data(numpy.array([[2.0, 0.0], [3.0, 2.0], [1.0, 3.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[2.0, -8.0], [-3.0, -23.0]])+(1.-msk_ref)*numpy.array([[22.0, -10.0], [9.0, 45.0]])
+      ref=msk_ref*numpy.array([-10.0, -2.0])+(1.-msk_ref)*numpy.array([-10.0, -9.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank2_expandedData_rank1(self):
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank3_offset2(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 2.0], [0.0, 2.0], [6.0, -5.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -4.0], [-6.0, 3.0], 
-[-3.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, -2.0, 7.0])+(1.-msk_arg1)*numpy.array([0.0, 5.0, 1.0])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[5.0, 5.0, -6.0], [2.0, -1.0, 1.0]])+(1.-msk_arg0)*numpy.array([[-3.0, 6.0, -1.0], [4.0, -1.0, 
+5.0]])
+      arg1=Data(numpy.array([[[3.0, -7.0], [-5.0, 0.0], [4.0, 5.0]], [[-4.0, -2.0], [-3.0, 7.0], [2.0, 
+7.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([46.0, -37.0])+(1.-msk_ref)*numpy.array([-33.0, 17.0])
+      ref=msk_ref*numpy.array([-37.0, -69.0])+(1.-msk_ref)*numpy.array([-46.0, 36.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank2_expandedData_rank2(self):
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank4_offset3(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, 0.0], [-4.0, 4.0], [-7.0, 1.0]])+(1.-msk_arg0)*numpy.array([[1.0, 3.0], [-6.0, 6.0], 
-[-7.0, -1.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 1.0], [-3.0, 0.0], [2.0, 0.0]])+(1.-msk_arg1)*numpy.array([[4.0, -3.0], [-3.0, -3.0], 
-[2.0, 0.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[[-2.0, 2.0, 4.0], [7.0, -5.0, 2.0], [0.0, 4.0, 1.0], [4.0, 7.0, 4.0]], [[6.0, 0.0, 2.0], 
+[-1.0, 0.0, -6.0], [-5.0, 1.0, 6.0], [3.0, -6.0, -2.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 2.0, 3.0], [0.0, -2.0, -6.0], 
+[-4.0, -5.0, 2.0], [7.0, -6.0, -5.0]], [[4.0, -7.0, -5.0], [-4.0, 2.0, -2.0], [0.0, -7.0, 2.0], [2.0, 0.0, -1.0]]])
+      arg1=Data(numpy.array([[[[2.0, 6.0], [0.0, 3.0], [-3.0, 3.0]], [[-1.0, 2.0], [-4.0, -5.0], [2.0, -2.0]], [[-7.0, -2.0], 
+[3.0, -2.0], [0.0, -7.0]], [[-4.0, -3.0], [-3.0, -1.0], [-5.0, -6.0]]], [[[6.0, 0.0], [5.0, 4.0], [-2.0, -6.0]], [[1.0, 1.0], 
+[0.0, 2.0], [-2.0, 0.0]], [[0.0, 0.0], [2.0, 5.0], [-1.0, -3.0]], [[-1.0, -7.0], [-5.0, 3.0], [3.0, 0.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-14.0, 3.0], [-10.0, 0.0]])+(1.-msk_ref)*numpy.array([[8.0, 15.0], [-8.0, -27.0]])
+      ref=msk_ref*numpy.array([16.0, -82.0])+(1.-msk_ref)*numpy.array([-7.0, 3.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_array_rank2(self):
+   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank2_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, 1.0, -6.0, 0.0, -3.0], [5.0, -5.0, 5.0, -7.0, 0.0], [2.0, 5.0, -6.0, -1.0, 7.0], 
-[-3.0, 0.0, 0.0, 4.0, -1.0]], [[0.0, -5.0, -7.0, -2.0, -7.0], [5.0, 0.0, 0.0, -2.0, -4.0], [-6.0, 6.0, 3.0, 0.0, 0.0], [2.0, 
-2.0, 6.0, 0.0, -7.0]], [[-3.0, 7.0, 2.0, 0.0, -3.0], [-5.0, -3.0, -1.0, -4.0, 5.0], [4.0, -3.0, -3.0, -3.0, 1.0], [-7.0, 3.0, 
-0.0, -1.0, 1.0]]], [[[5.0, -1.0, 6.0, -3.0, 1.0], [1.0, 3.0, -5.0, 6.0, 5.0], [1.0, 0.0, -2.0, -3.0, 0.0], [-1.0, 5.0, 6.0, 
-2.0, 4.0]], [[7.0, 5.0, -3.0, -5.0, 6.0], [-4.0, 5.0, 6.0, -4.0, 0.0], [-5.0, -5.0, -3.0, -1.0, -2.0], [0.0, 7.0, -4.0, -4.0, 
-0.0]], [[-7.0, 7.0, -4.0, 0.0, 0.0], [-2.0, -3.0, 3.0, 3.0, -1.0], [-2.0, 1.0, 6.0, 5.0, -2.0], [-3.0, 2.0, -6.0, 6.0, 
-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, 4.0, 0.0, -3.0, 6.0], [6.0, 2.0, 3.0, -2.0, -2.0], [-3.0, -1.0, 3.0, -4.0, -3.0], 
-[3.0, -4.0, -7.0, -5.0, 6.0]], [[-5.0, -6.0, 4.0, -7.0, -2.0], [-4.0, 4.0, 1.0, 7.0, 2.0], [7.0, -3.0, -4.0, -1.0, -5.0], [1.0, 
-4.0, -2.0, -6.0, 4.0]], [[-4.0, 2.0, 4.0, 0.0, -1.0], [-1.0, 3.0, 0.0, -3.0, -7.0], [-2.0, -1.0, 6.0, -7.0, -4.0], [-2.0, 5.0, 
-7.0, -5.0, -4.0]]], [[[7.0, -1.0, 4.0, -4.0, -1.0], [2.0, -1.0, -5.0, 7.0, 0.0], [5.0, 0.0, -7.0, 3.0, 3.0], [4.0, -2.0, 4.0, 
--3.0, 2.0]], [[6.0, 0.0, -3.0, -7.0, 1.0], [-4.0, -6.0, -7.0, 6.0, -3.0], [-3.0, -3.0, -3.0, 1.0, 5.0], [-3.0, 7.0, -3.0, -4.0, 
--3.0]], [[6.0, 0.0, 6.0, -6.0, -5.0], [4.0, 7.0, 1.0, -3.0, 5.0], [4.0, -7.0, 0.0, 1.0, 0.0], [-4.0, 5.0, 4.0, -3.0, 2.0]]]])
-      arg1=numpy.array([[-1.0, -3.0, -7.0], [7.0, 5.0, -3.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*(5.0)+(1-msk_arg0)*(5.0)
+      arg1=Data(numpy.array([[6.0, -1.0, 4.0, 5.0, 4.0], [2.0, 4.0, 3.0, 0.0, -1.0], [5.0, 0.0, -3.0, 1.0, -3.0], [6.0, -4.0, 
+-5.0, 6.0, 3.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[109.0, -38.0, 52.0, -40.0, 82.0], [8.0, 81.0, -12.0, 54.0, 15.0], [-24.0, -30.0, -29.0, -19.0, 
--18.0], [48.0, 37.0, 22.0, -21.0, 31.0]])+(1.-msk_ref)*numpy.array([[98.0, -7.0, -45.0, -21.0, 20.0], [-5.0, -93.0, -79.0, 
-90.0, 15.0], [4.0, 23.0, -97.0, 79.0, 92.0], [33.0, -37.0, -35.0, 26.0, 3.0]])
+      ref=msk_ref*numpy.array([[30.0, -5.0, 20.0, 25.0, 20.0], [10.0, 20.0, 15.0, 0.0, -5.0], [25.0, 0.0, -15.0, 5.0, -15.0], 
+[30.0, -20.0, -25.0, 30.0, 15.0]])+(1.-msk_ref)*numpy.array([[30.0, -5.0, 20.0, 25.0, 20.0], [10.0, 20.0, 15.0, 0.0, -5.0], 
+[25.0, 0.0, -15.0, 5.0, -15.0], [30.0, -20.0, -25.0, 30.0, 15.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_array_rank3(self):
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank3_offset1(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, -3.0, 6.0, -2.0, -1.0], [7.0, 3.0, 3.0, -1.0, 0.0], [0.0, 0.0, -7.0, 0.0, 3.0], [-5.0, 
-2.0, 6.0, 5.0, -7.0]], [[0.0, -4.0, 3.0, 1.0, 3.0], [0.0, 5.0, 0.0, 0.0, 2.0], [-4.0, -5.0, -3.0, 0.0, 4.0], [-5.0, 7.0, 1.0, 
--7.0, 0.0]], [[-4.0, -7.0, -3.0, -4.0, 5.0], [-6.0, -3.0, -3.0, -4.0, 0.0], [-2.0, 6.0, 0.0, -6.0, 6.0], [0.0, 0.0, -6.0, -6.0, 
-3.0]]], [[[4.0, 0.0, 0.0, 2.0, 3.0], [4.0, -2.0, -2.0, -4.0, 1.0], [0.0, -1.0, -3.0, 6.0, 3.0], [-3.0, -3.0, 2.0, -5.0, -1.0]], 
-[[5.0, -2.0, 0.0, 1.0, 2.0], [-1.0, 3.0, 4.0, -2.0, -7.0], [4.0, -4.0, -1.0, -6.0, 2.0], [-2.0, 4.0, -2.0, 3.0, 7.0]], [[5.0, 
--5.0, -3.0, 7.0, -3.0], [-5.0, -4.0, -4.0, 7.0, 7.0], [3.0, 1.0, 0.0, 2.0, 4.0], [0.0, -4.0, 4.0, -1.0, 
-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 1.0, 1.0, -5.0, -6.0], [-5.0, 1.0, -3.0, -2.0, 0.0], [-1.0, -1.0, 0.0, 5.0, 4.0], 
-[1.0, 0.0, 2.0, -6.0, -7.0]], [[7.0, 6.0, -7.0, 4.0, -2.0], [-6.0, 5.0, -4.0, -3.0, -6.0], [0.0, -3.0, -7.0, -2.0, -2.0], [7.0, 
-4.0, 5.0, 0.0, 4.0]], [[3.0, 5.0, 7.0, -7.0, -4.0], [1.0, 2.0, 3.0, 6.0, -3.0], [2.0, 5.0, -5.0, 5.0, 7.0], [-7.0, 3.0, 0.0, 
-1.0, -6.0]]], [[[5.0, 7.0, 4.0, 7.0, -1.0], [-7.0, 1.0, 4.0, 0.0, -2.0], [1.0, 2.0, 2.0, 0.0, -2.0], [-7.0, -1.0, 0.0, -2.0, 
--4.0]], [[6.0, -4.0, -7.0, 7.0, 6.0], [-5.0, -1.0, 0.0, -3.0, 4.0], [3.0, -3.0, 0.0, 4.0, -1.0], [-6.0, -1.0, 0.0, 2.0, -1.0]], 
-[[-3.0, 7.0, 2.0, 3.0, -7.0], [6.0, 7.0, 4.0, 3.0, 5.0], [-3.0, 5.0, 5.0, -7.0, -1.0], [-6.0, 3.0, -4.0, -7.0, 1.0]]]])
-      arg1=numpy.array([[[-2.0, 1.0], [0.0, -2.0], [-6.0, -7.0]], [[4.0, 4.0], [-6.0, 6.0], [-7.0, -4.0]]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([1.0, 7.0, -6.0])+(1.-msk_arg0)*numpy.array([-5.0, -6.0, 0.0])
+      arg1=Data(numpy.array([[[-7.0, -3.0, 1.0, 7.0, 7.0], [1.0, 2.0, 2.0, -7.0, 3.0], [2.0, -2.0, 5.0, 5.0, -7.0], [3.0, 7.0, 
+6.0, 2.0, 2.0]], [[5.0, -5.0, -2.0, 7.0, 7.0], [-5.0, 6.0, 4.0, 4.0, -7.0], [-6.0, 4.0, -7.0, -3.0, -2.0], [4.0, 0.0, 5.0, 
+-2.0, 0.0]], [[-5.0, -3.0, -7.0, 6.0, 0.0], [6.0, 0.0, 2.0, 2.0, 5.0], [0.0, 4.0, -5.0, -6.0, 1.0], [-3.0, 0.0, -1.0, -7.0, 
+-3.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-31.0, 57.0], [95.0, 62.0], [27.0, 33.0], [-19.0, 10.0], [-7.0, -6.0]], [[79.0, 79.0], [14.0, 
-40.0], [8.0, 56.0], [-27.0, -29.0], [-3.0, -70.0]], [[-33.0, 34.0], [-23.0, -64.0], [8.0, -19.0], [82.0, 22.0], [-70.0, 
--39.0]], [[10.0, -19.0], [-12.0, 16.0], [16.0, 26.0], [-5.0, 63.0], [-71.0, -2.0]]])+(1.-msk_ref)*numpy.array([[[-13.0, 33.0], 
-[-29.0, -70.0], [0.0, -68.0], [17.0, 94.0], [45.0, 86.0]], [[-36.0, -82.0], [-53.0, -53.0], [-24.0, -16.0], [-35.0, -68.0], 
-[-49.0, 29.0]], [[-3.0, 19.0], [-37.0, -60.0], [3.0, 37.0], [-15.0, 26.0], [-45.0, -51.0]], [[90.0, -4.0], [-37.0, -51.0], 
-[24.0, 8.0], [35.0, 19.0], [33.0, 1.0]]])
+      ref=msk_ref*numpy.array([[58.0, -20.0, 29.0, 20.0, 56.0], [-70.0, 44.0, 18.0, 9.0, -76.0], [-40.0, 2.0, -14.0, 20.0, 
+-27.0], [49.0, 7.0, 47.0, 30.0, 20.0]])+(1.-msk_ref)*numpy.array([[5.0, 45.0, 7.0, -77.0, -77.0], [25.0, -46.0, -34.0, 11.0, 
+27.0], [26.0, -14.0, 17.0, -7.0, 47.0], [-39.0, -35.0, -60.0, 2.0, -10.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_array_rank4(self):
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank4_offset2(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, 4.0, -4.0, 7.0, -7.0], [-4.0, -6.0, 7.0, 0.0, -5.0], [6.0, 3.0, -7.0, 0.0, 6.0], 
-[3.0, 7.0, 2.0, -5.0, -4.0]], [[-6.0, 0.0, 1.0, -3.0, -2.0], [0.0, 7.0, 1.0, 5.0, 7.0], [1.0, 7.0, 1.0, 2.0, 4.0], [-1.0, 2.0, 
--5.0, -5.0, 3.0]], [[1.0, 3.0, 0.0, 1.0, -3.0], [6.0, -4.0, 2.0, 0.0, 7.0], [6.0, 2.0, 0.0, -5.0, -4.0], [5.0, -4.0, 2.0, -5.0, 
-0.0]]], [[[5.0, 4.0, 2.0, -2.0, 2.0], [-6.0, -3.0, -6.0, 7.0, -5.0], [6.0, -7.0, 4.0, -7.0, -3.0], [-2.0, 6.0, 5.0, -5.0, 
--3.0]], [[6.0, -4.0, -7.0, 1.0, 0.0], [-3.0, 0.0, 7.0, 0.0, 5.0], [2.0, 4.0, -2.0, 7.0, 2.0], [1.0, -4.0, 5.0, 0.0, -2.0]], 
-[[2.0, -7.0, 5.0, 0.0, 5.0], [-5.0, 3.0, -6.0, -2.0, 0.0], [0.0, 7.0, -5.0, -2.0, 0.0], [0.0, -6.0, -5.0, -1.0, 
-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 7.0, 6.0, 6.0, -3.0], [7.0, 7.0, -6.0, -1.0, -1.0], [-5.0, -4.0, 6.0, 1.0, -3.0], 
-[-4.0, -7.0, -3.0, 1.0, -4.0]], [[-7.0, 7.0, 0.0, -1.0, -5.0], [-7.0, 2.0, -2.0, 0.0, -5.0], [5.0, -1.0, 6.0, 0.0, 1.0], [-1.0, 
-6.0, 1.0, -5.0, 5.0]], [[5.0, -1.0, -2.0, 0.0, 5.0], [-1.0, -4.0, -4.0, -7.0, 0.0], [0.0, 5.0, 1.0, -1.0, 1.0], [0.0, 0.0, 5.0, 
-6.0, 3.0]]], [[[-7.0, -2.0, -7.0, -7.0, -2.0], [-6.0, 1.0, -1.0, -4.0, -2.0], [1.0, -7.0, -4.0, 6.0, -5.0], [-2.0, -5.0, -3.0, 
-0.0, -6.0]], [[7.0, 5.0, 4.0, 3.0, 2.0], [-4.0, -1.0, 4.0, 5.0, -2.0], [-4.0, -2.0, 6.0, -7.0, -2.0], [7.0, 2.0, -6.0, 4.0, 
--2.0]], [[5.0, 6.0, -2.0, 0.0, -4.0], [-1.0, 6.0, 1.0, 3.0, -5.0], [-4.0, -7.0, -7.0, 3.0, 3.0], [-1.0, -7.0, 2.0, -6.0, 
-3.0]]]])
-      arg1=numpy.array([[[[-6.0, -4.0, -6.0, 0.0, -4.0], [2.0, 0.0, 6.0, 4.0, -4.0], [0.0, 4.0, -7.0, -6.0, 1.0], [1.0, 3.0, 
--6.0, -3.0, 5.0]], [[0.0, -1.0, -4.0, -2.0, 5.0], [-4.0, -5.0, 5.0, 0.0, -4.0], [-1.0, 0.0, -1.0, 5.0, -1.0], [4.0, -6.0, 7.0, 
-4.0, 2.0]], [[-7.0, 0.0, 0.0, -4.0, 4.0], [4.0, 2.0, -6.0, 5.0, 0.0], [-6.0, -7.0, -1.0, 0.0, 5.0], [0.0, 0.0, 5.0, 7.0, 
--3.0]]], [[[-3.0, -3.0, 0.0, 3.0, 3.0], [-1.0, 7.0, -5.0, -1.0, -4.0], [1.0, 4.0, 1.0, 3.0, 1.0], [7.0, 7.0, 0.0, -3.0, 6.0]], 
-[[-2.0, 2.0, -6.0, 7.0, -3.0], [0.0, -2.0, 1.0, -7.0, 4.0], [-2.0, -4.0, 0.0, -2.0, -6.0], [3.0, 2.0, -2.0, 5.0, -2.0]], 
-[[-1.0, 5.0, -1.0, 4.0, 3.0], [4.0, 0.0, 4.0, -1.0, -3.0], [-4.0, 0.0, 6.0, -4.0, -7.0], [-5.0, -3.0, -7.0, 4.0, 0.0]]]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([[4.0, -7.0, -3.0], [-7.0, 0.0, 7.0]])+(1.-msk_arg0)*numpy.array([[6.0, 1.0, 2.0], [0.0, -4.0, 
+4.0]])
+      arg1=Data(numpy.array([[[[-4.0, -1.0, -2.0, -3.0, 0.0], [-6.0, 1.0, 5.0, 1.0, 3.0], [2.0, -3.0, 0.0, -1.0, 4.0], [6.0, 
+6.0, 5.0, -3.0, -7.0]], [[3.0, -3.0, -1.0, 6.0, 1.0], [5.0, -5.0, 4.0, -2.0, 6.0], [5.0, 4.0, -7.0, 0.0, 0.0], [-6.0, -1.0, 
+7.0, 5.0, 7.0]], [[0.0, -5.0, -2.0, -1.0, 6.0], [6.0, -3.0, 1.0, -7.0, -5.0], [2.0, -2.0, 0.0, 0.0, 5.0], [4.0, 1.0, 4.0, -4.0, 
+0.0]]], [[[-5.0, -4.0, -2.0, 4.0, 0.0], [-2.0, 3.0, -3.0, 2.0, -2.0], [4.0, 2.0, -1.0, 1.0, 7.0], [-6.0, -2.0, 1.0, -7.0, 
+-4.0]], [[4.0, -7.0, -5.0, -7.0, 0.0], [-1.0, -5.0, -4.0, 4.0, -5.0], [0.0, -4.0, -7.0, 0.0, -7.0], [6.0, 4.0, -5.0, 3.0, 
+-3.0]], [[1.0, -7.0, -2.0, -3.0, 5.0], [-7.0, 0.0, 5.0, -4.0, -3.0], [6.0, 7.0, 2.0, -6.0, 0.0], [-4.0, 0.0, -3.0, -5.0, 
+7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 37.0, 22.0, 73.0, 1.0], [19.0, 55.0, -83.0, -68.0, 46.0], [-15.0, -35.0, 64.0, 1.0, 
--40.0], [13.0, 59.0, -27.0, 24.0, -27.0]], [[-42.0, -71.0, 7.0, -56.0, -1.0], [-12.0, 42.0, -46.0, 62.0, -27.0], [22.0, 27.0, 
--69.0, 24.0, 96.0], [55.0, 53.0, 48.0, -51.0, 43.0]], [[27.0, 20.0, 57.0, -25.0, 63.0], [6.0, 23.0, -16.0, 26.0, -39.0], [-5.0, 
-20.0, 59.0, 29.0, 4.0], [-32.0, -33.0, 10.0, -5.0, 8.0]], [[-45.0, -17.0, -36.0, 3.0, -48.0], [32.0, 1.0, 32.0, 28.0, -4.0], 
-[-7.0, 9.0, -49.0, -65.0, 7.0], [-16.0, 27.0, -60.0, -15.0, 12.0]], [[52.0, 49.0, 45.0, 42.0, 27.0], [0.0, 18.0, -24.0, -50.0, 
-13.0], [2.0, 1.0, 86.0, 18.0, -53.0], [-26.0, -10.0, -22.0, 6.0, -18.0]]], [[[11.0, 3.0, 47.0, -83.0, 16.0], [2.0, -24.0, 
--53.0, 46.0, 43.0], [-16.0, -70.0, -14.0, 32.0, 73.0], [-30.0, -45.0, 95.0, 37.0, -68.0]], [[70.0, 41.0, 5.0, 5.0, 43.0], 
-[-41.0, -64.0, 50.0, -44.0, -1.0], [2.0, -8.0, 54.0, 50.0, -57.0], [-14.0, -90.0, 44.0, 39.0, -22.0]], [[-46.0, -27.0, -82.0, 
--3.0, -72.0], [0.0, -57.0, 48.0, 1.0, 38.0], [-9.0, -38.0, -94.0, -45.0, 10.0], [20.0, 5.0, 3.0, 26.0, -19.0]], [[-19.0, -36.0, 
--18.0, 3.0, 40.0], [-35.0, 24.0, -18.0, -5.0, -42.0], [10.0, 28.0, -10.0, 54.0, 16.0], [79.0, 25.0, 49.0, -9.0, 52.0]], 
-[[-14.0, 38.0, -28.0, -22.0, 53.0], [-5.0, -66.0, -7.0, -15.0, 32.0], [-64.0, -109.0, 16.0, 40.0, -12.0], [3.0, -82.0, 104.0, 
-132.0, -72.0]]], [[[-100.0, -39.0, -52.0, 6.0, 17.0], [26.0, 45.0, -23.0, 34.0, -44.0], [-35.0, -2.0, -43.0, -17.0, 29.0], 
-[58.0, 58.0, -3.0, 20.0, 46.0]], [[-26.0, 45.0, -77.0, 13.0, 19.0], [21.0, -88.0, 108.0, -6.0, -17.0], [-62.0, -46.0, 5.0, 
--40.0, -74.0], [-41.0, -95.0, -16.0, 102.0, -27.0]], [[39.0, -14.0, 55.0, -24.0, 36.0], [-42.0, 27.0, -79.0, -13.0, 15.0], 
-[27.0, -4.0, 22.0, 83.0, 43.0], [44.0, 12.0, 88.0, -17.0, -5.0]], [[44.0, 23.0, -48.0, 36.0, -58.0], [-29.0, -83.0, 74.0, 
--65.0, 54.0], [15.0, -21.0, -16.0, -17.0, -62.0], [-10.0, -41.0, -11.0, 21.0, -37.0]], [[-3.0, -15.0, -64.0, 13.0, -35.0], 
-[-17.0, -53.0, 97.0, -7.0, -20.0], [13.0, 32.0, -45.0, -29.0, -33.0], [7.0, -23.0, -32.0, -11.0, 28.0]]], [[[-49.0, -3.0, 
--20.0, -17.0, -6.0], [32.0, -1.0, -6.0, 32.0, 4.0], [-33.0, -35.0, -27.0, -31.0, 21.0], [-12.0, 3.0, -2.0, 33.0, -16.0]], 
-[[-18.0, -86.0, -20.0, -22.0, -22.0], [-40.0, 32.0, 18.0, 36.0, -58.0], [60.0, 96.0, -77.0, 18.0, 57.0], [75.0, 61.0, 2.0, 
--103.0, 95.0]], [[-46.0, -33.0, -17.0, 32.0, -40.0], [7.0, 54.0, -65.0, -17.0, 27.0], [8.0, -6.0, -36.0, -12.0, 27.0], [57.0, 
-96.0, -12.0, -22.0, 14.0]], [[81.0, 35.0, 51.0, 11.0, -43.0], [-9.0, -20.0, -4.0, -39.0, 63.0], [34.0, -5.0, 34.0, -6.0, 
--23.0], [-55.0, -17.0, -23.0, -29.0, -50.0]], [[32.0, 43.0, 19.0, -9.0, 43.0], [3.0, -32.0, 24.0, -4.0, -7.0], [-22.0, -20.0, 
-52.0, 14.0, -33.0], [-44.0, -70.0, 14.0, 43.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[-15.0, 79.0, -1.0, 42.0, -30.0], [69.0, 
--18.0, -21.0, -34.0, 81.0], [-64.0, -103.0, 46.0, -72.0, -55.0], [-84.0, -17.0, -55.0, 92.0, -100.0]], [[-45.0, 11.0, -106.0, 
-43.0, 0.0], [8.0, -61.0, 122.0, -16.0, -46.0], [-37.0, 7.0, -21.0, -47.0, -79.0], [6.0, -43.0, -50.0, 55.0, 30.0]], [[-7.0, 
--5.0, -58.0, 7.0, -71.0], [3.0, -61.0, 79.0, -5.0, 26.0], [5.0, -6.0, -59.0, -57.0, -21.0], [-21.0, -17.0, -40.0, 1.0, -14.0]], 
-[[-21.0, 4.0, -50.0, 2.0, -59.0], [23.0, -50.0, 69.0, 10.0, 20.0], [-12.0, -16.0, -48.0, -68.0, -18.0], [-38.0, -19.0, -49.0, 
-14.0, -20.0]], [[-11.0, 7.0, 30.0, -18.0, -17.0], [20.0, 17.0, -77.0, 5.0, 60.0], [-15.0, -63.0, -5.0, -1.0, 41.0], [-11.0, 
-23.0, 32.0, 24.0, -56.0]]], [[[-8.0, -16.0, 11.0, -32.0, -76.0], [40.0, -1.0, 35.0, 58.0, 11.0], [19.0, 27.0, -53.0, -83.0, 
-34.0], [-70.0, 16.0, -81.0, -62.0, -4.0]], [[-21.0, -5.0, -50.0, 32.0, -10.0], [13.0, -9.0, 94.0, 8.0, -62.0], [1.0, 64.0, 
--10.0, -51.0, -50.0], [-11.0, -4.0, -88.0, -25.0, 59.0]], [[58.0, 42.0, 19.0, 49.0, -14.0], [-15.0, -13.0, -9.0, -72.0, 49.0], 
-[13.0, -16.0, 53.0, 11.0, -56.0], [-14.0, -8.0, -13.0, 9.0, -36.0]], [[54.0, 41.0, -27.0, 63.0, -42.0], [-14.0, -52.0, 73.0, 
--73.0, 31.0], [16.0, 9.0, 28.0, -28.0, -91.0], [-29.0, -30.0, -60.0, 3.0, -18.0]], [[21.0, -14.0, 43.0, -30.0, -36.0], [0.0, 
-15.0, -43.0, 17.0, 39.0], [27.0, -4.0, -20.0, -1.0, 49.0], [-16.0, 24.0, 10.0, -41.0, -23.0]]], [[[39.0, -16.0, 38.0, -51.0, 
-48.0], [-47.0, -10.0, -30.0, 11.0, -8.0], [20.0, 0.0, 7.0, 82.0, 43.0], [30.0, -34.0, 101.0, -4.0, -1.0]], [[21.0, -1.0, 47.0, 
--81.0, -5.0], [-5.0, -30.0, -54.0, 37.0, 61.0], [-4.0, -71.0, -25.0, 30.0, 76.0], [-28.0, -38.0, 95.0, 26.0, -75.0]], [[-36.0, 
--41.0, -89.0, -14.0, -41.0], [-32.0, -68.0, 58.0, -2.0, 13.0], [0.0, -23.0, -95.0, -2.0, 14.0], [55.0, -13.0, 48.0, 27.0, 
-3.0]], [[-6.0, -21.0, 33.0, -15.0, 40.0], [4.0, 54.0, -13.0, 39.0, -65.0], [14.0, 63.0, 18.0, 14.0, 23.0], [7.0, 22.0, -18.0, 
--51.0, 58.0]], [[27.0, 37.0, 23.0, -23.0, 21.0], [11.0, -34.0, 16.0, 9.0, 11.0], [-20.0, -31.0, 32.0, 0.0, -13.0], [-55.0, 
--63.0, 13.0, 37.0, -42.0]]], [[[17.0, 32.0, -13.0, 41.0, -19.0], [-6.0, -23.0, -16.0, -62.0, 59.0], [-11.0, -52.0, 21.0, 3.0, 
--40.0], [4.0, -3.0, 10.0, 45.0, -48.0]], [[60.0, 6.0, 13.0, -41.0, 16.0], [-61.0, -69.0, -13.0, -30.0, 53.0], [13.0, -56.0, 
--4.0, 81.0, 19.0], [23.0, -67.0, 129.0, 42.0, -57.0]], [[2.0, 18.0, 48.0, -65.0, 52.0], [21.0, -4.0, -26.0, 56.0, -10.0], 
-[-30.0, -35.0, 24.0, 18.0, 40.0], [-48.0, -54.0, 48.0, 35.0, -34.0]], [[-50.0, -21.0, -4.0, -10.0, -35.0], [22.0, 29.0, -75.0, 
-12.0, 50.0], [-15.0, -54.0, -44.0, -15.0, 54.0], [23.0, 59.0, 23.0, 15.0, -31.0]], [[22.0, 40.0, 13.0, -42.0, 50.0], [2.0, 
--57.0, 23.0, 16.0, 3.0], [-37.0, -53.0, 32.0, 23.0, -9.0], [-47.0, -97.0, 57.0, 73.0, -51.0]]]])
+      ref=msk_ref*numpy.array([[5.0, 11.0, 5.0, -100.0, 10.0], [-112.0, 27.0, 45.0, -3.0, -22.0], [-19.0, 1.0, 70.0, -53.0, 
+-48.0], [68.0, 42.0, -69.0, -21.0, 0.0]])+(1.-msk_ref)*numpy.array([[-33.0, -19.0, -5.0, 2.0, 33.0], [-43.0, 15.0, 72.0, -42.0, 
+22.0], [45.0, 26.0, 29.0, -30.0, 62.0], [-2.0, 21.0, 53.0, -53.0, 5.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_constData_rank2(self):
+   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank3_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-3.0, -4.0, -4.0, -2.0, -3.0], [3.0, 4.0, -3.0, 0.0, -7.0], [0.0, 3.0, -4.0, -1.0, 3.0], 
-[0.0, 4.0, 0.0, 0.0, 6.0]], [[-1.0, 4.0, -5.0, 5.0, 6.0], [3.0, -3.0, -6.0, 0.0, 7.0], [-6.0, 0.0, -4.0, -1.0, -6.0], [1.0, 
--2.0, 0.0, -1.0, 4.0]], [[5.0, 5.0, 3.0, -3.0, 1.0], [7.0, 4.0, 4.0, 5.0, -4.0], [4.0, -5.0, -1.0, -1.0, -6.0], [5.0, 0.0, 
--6.0, -2.0, -7.0]]], [[[1.0, 0.0, -4.0, -3.0, -3.0], [0.0, -3.0, -2.0, 0.0, -4.0], [2.0, -2.0, -5.0, -5.0, 5.0], [4.0, -6.0, 
--1.0, 0.0, -4.0]], [[5.0, -6.0, -7.0, -4.0, 2.0], [0.0, -5.0, 2.0, 5.0, 0.0], [4.0, 0.0, 6.0, 5.0, 2.0], [-1.0, 0.0, 0.0, 3.0, 
--1.0]], [[5.0, -4.0, 5.0, -2.0, -6.0], [5.0, 4.0, 0.0, 0.0, -7.0], [-7.0, 4.0, -7.0, 1.0, -1.0], [-7.0, -3.0, 7.0, 0.0, 
-6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, -5.0, 0.0, 4.0, 2.0], [0.0, -6.0, -3.0, 2.0, 7.0], [6.0, -2.0, -3.0, 5.0, 3.0], 
-[0.0, -4.0, 7.0, 2.0, 4.0]], [[-7.0, -7.0, 2.0, 4.0, 7.0], [0.0, -4.0, -2.0, 7.0, 6.0], [7.0, 2.0, -4.0, 2.0, 3.0], [4.0, 7.0, 
--6.0, 4.0, 4.0]], [[1.0, -2.0, 2.0, -7.0, 5.0], [6.0, -5.0, -7.0, 0.0, -1.0], [7.0, -4.0, 6.0, -1.0, 0.0], [-5.0, 0.0, 6.0, 
--1.0, 1.0]]], [[[-2.0, 6.0, -1.0, -5.0, 4.0], [-1.0, 1.0, 3.0, -6.0, -3.0], [-6.0, 6.0, 3.0, 2.0, -2.0], [5.0, -7.0, 4.0, -2.0, 
-0.0]], [[-6.0, 5.0, 2.0, -5.0, 7.0], [4.0, -4.0, -4.0, -2.0, 5.0], [4.0, -6.0, 2.0, -6.0, 4.0], [-2.0, 1.0, 2.0, -2.0, -6.0]], 
-[[-6.0, -2.0, 0.0, 4.0, -4.0], [-7.0, -5.0, -3.0, -1.0, 1.0], [-3.0, -2.0, -4.0, 6.0, 3.0], [1.0, 0.0, -2.0, 3.0, 4.0]]]])
-      arg1=Data(numpy.array([[-2.0, 5.0, -2.0], [-7.0, 0.0, 7.0]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(2.0)
+      arg1=Data(numpy.array([[[6.0, 5.0], [5.0, 3.0]], [[2.0, 1.0], [-4.0, 7.0]], [[1.0, 3.0], [5.0, -6.0]], [[-2.0, 6.0], 
+[2.0, -2.0]], [[-1.0, 2.0], [2.0, 3.0]], [[0.0, 4.0], [-5.0, 0.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[19.0, -10.0, 40.0, 42.0, 13.0], [30.0, 18.0, -18.0, -10.0, 36.0], [-101.0, 46.0, -24.0, 41.0, 
--66.0], [-82.0, 3.0, 68.0, -1.0, 92.0]])+(1.-msk_ref)*numpy.array([[-63.0, -77.0, 13.0, 89.0, -35.0], [-54.0, -40.0, -32.0, 
-66.0, 46.0], [30.0, -34.0, -75.0, 30.0, 44.0], [2.0, 92.0, -98.0, 53.0, 38.0]])
+      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], 
+[0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 10.0], [10.0, 6.0]], 
+[[4.0, 2.0], [-8.0, 14.0]], [[2.0, 6.0], [10.0, -12.0]], [[-4.0, 12.0], [4.0, -4.0]], [[-2.0, 4.0], [4.0, 6.0]], [[0.0, 8.0], 
+[-10.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_constData_rank3(self):
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank4_offset1(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, -2.0, 5.0, -3.0, -5.0], [-4.0, 7.0, 0.0, 4.0, 0.0], [-6.0, -4.0, 6.0, -5.0, -3.0], 
-[-1.0, 7.0, 4.0, -3.0, 4.0]], [[-6.0, -4.0, -6.0, 6.0, -1.0], [1.0, 7.0, -6.0, 5.0, -2.0], [-5.0, -1.0, 0.0, 4.0, 0.0], [-7.0, 
--2.0, 3.0, -2.0, -2.0]], [[1.0, -2.0, 4.0, 4.0, -2.0], [1.0, 0.0, -7.0, 3.0, -7.0], [5.0, -4.0, -1.0, 3.0, -3.0], [-7.0, -1.0, 
--2.0, -1.0, -3.0]]], [[[0.0, 5.0, 3.0, 0.0, -2.0], [5.0, -6.0, 1.0, -3.0, -6.0], [0.0, 3.0, 7.0, 0.0, -7.0], [-6.0, -2.0, 7.0, 
--2.0, -5.0]], [[6.0, -5.0, -2.0, 4.0, 3.0], [3.0, 5.0, 2.0, -2.0, 4.0], [0.0, 7.0, -6.0, 4.0, 0.0], [0.0, 6.0, 0.0, -7.0, 
-1.0]], [[2.0, 3.0, -7.0, -2.0, 0.0], [7.0, 6.0, 7.0, -1.0, 6.0], [7.0, -1.0, -4.0, 3.0, 0.0], [1.0, 3.0, 3.0, 7.0, 
--4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 3.0, 3.0, 0.0, 7.0], [6.0, 7.0, -1.0, 2.0, -6.0], [5.0, -4.0, 0.0, -2.0, 4.0], 
-[-7.0, 6.0, -5.0, 2.0, -7.0]], [[-4.0, -6.0, 4.0, -1.0, 7.0], [0.0, -4.0, 2.0, -6.0, -3.0], [3.0, 0.0, 3.0, -6.0, -1.0], [-6.0, 
-6.0, 5.0, -3.0, -4.0]], [[-7.0, 6.0, 6.0, 5.0, 2.0], [-6.0, 5.0, 3.0, -5.0, 0.0], [-5.0, -4.0, 2.0, -7.0, 3.0], [4.0, 2.0, 4.0, 
-4.0, -4.0]]], [[[0.0, -4.0, -4.0, -2.0, 0.0], [-2.0, -6.0, -2.0, 5.0, -3.0], [4.0, 3.0, -3.0, -2.0, 3.0], [6.0, -2.0, -6.0, 
-0.0, 3.0]], [[6.0, -7.0, 0.0, 6.0, -7.0], [4.0, 2.0, 0.0, 6.0, -5.0], [-5.0, 3.0, -3.0, 5.0, 0.0], [-1.0, 0.0, 6.0, 5.0, 
--2.0]], [[-6.0, -3.0, 0.0, -1.0, -5.0], [0.0, -7.0, -3.0, 4.0, -5.0], [0.0, 5.0, 5.0, -3.0, -2.0], [-1.0, -3.0, -1.0, -1.0, 
--7.0]]]])
-      arg1=Data(numpy.array([[[-4.0, -7.0], [3.0, 5.0], [0.0, -1.0]], [[-1.0, 4.0], [-6.0, -4.0], [2.0, 
--6.0]]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*numpy.array([0.0, -3.0, 3.0])+(1.-msk_arg0)*numpy.array([6.0, 0.0, -7.0])
+      arg1=Data(numpy.array([[[[0.0, 5.0], [6.0, -6.0]], [[-1.0, 6.0], [-1.0, -6.0]], [[4.0, -4.0], [-1.0, -7.0]], [[-1.0, 
+1.0], [3.0, 4.0]], [[-6.0, 1.0], [5.0, -5.0]], [[-4.0, -3.0], [0.0, -3.0]]], [[[-2.0, -4.0], [4.0, -1.0]], [[0.0, 0.0], [0.0, 
+2.0]], [[1.0, -6.0], [3.0, -7.0]], [[3.0, 1.0], [4.0, -2.0]], [[0.0, 2.0], [0.0, 4.0]], [[0.0, 0.0], [-4.0, 0.0]]], [[[4.0, 
+-7.0], [-4.0, -5.0]], [[6.0, -3.0], [-2.0, -2.0]], [[2.0, -4.0], [-6.0, -5.0]], [[0.0, -5.0], [0.0, 4.0]], [[-7.0, -2.0], [5.0, 
+0.0]], [[2.0, 4.0], [-7.0, 5.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-58.0, -81.0], [27.0, 18.0], [-43.0, -7.0], [2.0, 43.0], [1.0, 12.0]], [[10.0, -2.0], [-19.0, 
--94.0], [-17.0, -69.0], [12.0, -4.0], [-12.0, -79.0]], [[23.0, -30.0], [-34.0, 17.0], [-3.0, 35.0], [14.0, 18.0], [19.0, 
--4.0]], [[-9.0, -51.0], [-62.0, -108.0], [-8.0, -1.0], [64.0, -10.0], [-31.0, -35.0]]])+(1.-msk_ref)*numpy.array([[[-44.0, 
-27.0], [10.0, -27.0], [4.0, -23.0], [-39.0, -36.0], [25.0, 42.0]], [[-46.0, -60.0], [-60.0, -64.0], [6.0, 24.0], [-59.0, 
--67.0], [38.0, 65.0]], [[15.0, 21.0], [5.0, 2.0], [40.0, -17.0], [-44.0, -19.0], [-26.0, -12.0]], [[8.0, 49.0], [-10.0, -4.0], 
-[3.0, 14.0], [-49.0, -47.0], [11.0, 95.0]]])
+      ref=msk_ref*numpy.array([[[18.0, -9.0], [-24.0, -12.0]], [[18.0, -9.0], [-6.0, -12.0]], [[3.0, 6.0], [-27.0, 6.0]], 
+[[-9.0, -18.0], [-12.0, 18.0]], [[-21.0, -12.0], [15.0, -12.0]], [[6.0, 12.0], [-9.0, 
+15.0]]])+(1.-msk_ref)*numpy.array([[[-28.0, 79.0], [64.0, -1.0]], [[-48.0, 57.0], [8.0, -22.0]], [[10.0, 4.0], [36.0, -7.0]], 
+[[-6.0, 41.0], [18.0, -4.0]], [[13.0, 20.0], [-5.0, -30.0]], [[-38.0, -46.0], [49.0, -53.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_constData_rank4(self):
+   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank4_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, 0.0, 2.0, 3.0, 7.0], [4.0, 0.0, 3.0, 0.0, -4.0], [2.0, -7.0, 3.0, 0.0, 7.0], [5.0, 
-1.0, -4.0, 5.0, 2.0]], [[5.0, -3.0, -2.0, 3.0, -4.0], [7.0, -1.0, 5.0, -2.0, 0.0], [4.0, 7.0, -5.0, -5.0, -4.0], [-3.0, -6.0, 
-6.0, -4.0, -6.0]], [[-1.0, -1.0, 0.0, 6.0, 2.0], [-2.0, 2.0, -5.0, 0.0, -7.0], [-1.0, -4.0, -1.0, -3.0, 4.0], [-7.0, -3.0, 7.0, 
--1.0, 3.0]]], [[[1.0, -4.0, 2.0, -5.0, -5.0], [7.0, -7.0, -2.0, 7.0, -5.0], [-7.0, 2.0, -5.0, 2.0, -6.0], [-4.0, 6.0, 3.0, 1.0, 
--7.0]], [[1.0, 1.0, -6.0, 2.0, -5.0], [3.0, 2.0, -2.0, 4.0, 6.0], [-7.0, -2.0, -4.0, 1.0, 2.0], [7.0, -3.0, 0.0, 1.0, -5.0]], 
-[[6.0, 5.0, 0.0, -1.0, 1.0], [-7.0, 1.0, 2.0, -5.0, 5.0], [-3.0, 0.0, -7.0, -3.0, -7.0], [4.0, 6.0, 5.0, -6.0, 
--5.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -4.0, 5.0, -7.0, -4.0], [2.0, -5.0, 7.0, -3.0, -6.0], [5.0, 3.0, -1.0, 2.0, -2.0], 
-[-6.0, -1.0, 3.0, -2.0, 2.0]], [[-6.0, -3.0, -7.0, 2.0, -7.0], [-5.0, 7.0, 7.0, 7.0, -3.0], [-1.0, 1.0, 0.0, -6.0, -5.0], [7.0, 
-4.0, -7.0, 3.0, -4.0]], [[5.0, 5.0, 6.0, 6.0, 6.0], [-4.0, -7.0, -7.0, -1.0, -2.0], [4.0, -4.0, 1.0, 7.0, -7.0], [4.0, -4.0, 
--1.0, 0.0, 0.0]]], [[[0.0, 5.0, 7.0, -4.0, 1.0], [-1.0, -1.0, -7.0, 4.0, 0.0], [7.0, 2.0, -1.0, 1.0, -2.0], [-4.0, -4.0, -3.0, 
-0.0, -3.0]], [[-7.0, -3.0, 3.0, 5.0, 4.0], [2.0, -7.0, -6.0, 6.0, 5.0], [0.0, 4.0, -7.0, -1.0, 4.0], [-1.0, 0.0, -6.0, 0.0, 
-7.0]], [[-7.0, -1.0, -5.0, -1.0, -7.0], [6.0, 5.0, 6.0, 2.0, 2.0], [1.0, -4.0, -1.0, 1.0, 2.0], [6.0, -3.0, 2.0, -3.0, 2.0]]]])
-      arg1=Data(numpy.array([[[[-3.0, -3.0, -6.0, -5.0, 0.0], [4.0, 6.0, -6.0, 0.0, 1.0], [-5.0, 5.0, -4.0, 3.0, -6.0], [5.0, 
--3.0, 6.0, -6.0, -4.0]], [[6.0, 2.0, -4.0, 0.0, 7.0], [4.0, -4.0, 3.0, 4.0, -4.0], [-2.0, 4.0, 0.0, 2.0, 7.0], [1.0, -6.0, 7.0, 
--6.0, 3.0]], [[3.0, 3.0, 3.0, 3.0, -3.0], [-3.0, 0.0, 7.0, 6.0, 0.0], [6.0, 5.0, -2.0, 0.0, -2.0], [-1.0, -1.0, 5.0, -6.0, 
-6.0]]], [[[5.0, -5.0, 4.0, 7.0, -1.0], [4.0, -6.0, -2.0, -3.0, -6.0], [6.0, 7.0, -2.0, 1.0, 6.0], [-6.0, -7.0, 0.0, 4.0, 1.0]], 
-[[5.0, 3.0, -6.0, 0.0, 4.0], [3.0, -4.0, 7.0, 5.0, -1.0], [6.0, 0.0, -4.0, 6.0, 6.0], [-6.0, -4.0, 0.0, -5.0, 5.0]], [[1.0, 
-4.0, -3.0, 4.0, 6.0], [2.0, -1.0, 4.0, 4.0, 4.0], [-7.0, 0.0, -4.0, 0.0, -1.0], [6.0, -1.0, 3.0, -6.0, 
-5.0]]]]),self.functionspace)
-      res=transposed_tensor_mult(arg0,arg1)
+      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(-5.0)
+      arg1=Data(numpy.array([[[[-2.0, -4.0, -2.0, -3.0], [2.0, 4.0, -2.0, 0.0], [2.0, 4.0, -1.0, 0.0]], [[4.0, 3.0, 0.0, 5.0], 
+[-2.0, -1.0, -2.0, 4.0], [-3.0, 0.0, -5.0, -7.0]]], [[[-7.0, 1.0, 4.0, 0.0], [0.0, -6.0, 1.0, -4.0], [0.0, -5.0, 6.0, -2.0]], 
+[[-1.0, -5.0, 6.0, -7.0], [4.0, 1.0, -7.0, 0.0], [7.0, 6.0, 5.0, -5.0]]], [[[-1.0, 3.0, -5.0, 1.0], [-3.0, 1.0, 3.0, 7.0], 
+[-1.0, -3.0, 6.0, -3.0]], [[7.0, -7.0, 0.0, -7.0], [1.0, -6.0, -6.0, 7.0], [2.0, -1.0, -1.0, 4.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[46.0, 32.0, -37.0, 33.0, 77.0], [38.0, -42.0, 43.0, 40.0, -4.0], [-41.0, 17.0, -24.0, 14.0, 
-49.0], [25.0, -43.0, 42.0, -55.0, 49.0]], [[-31.0, 34.0, -28.0, -11.0, 20.0], [-12.0, 27.0, 19.0, 19.0, 55.0], [-53.0, -45.0, 
--14.0, -4.0, -42.0], [46.0, 38.0, -11.0, -27.0, 11.0]], [[-38.0, -38.0, 40.0, 4.0, -40.0], [-10.0, 32.0, -64.0, -44.0, 4.0], 
-[-30.0, 16.0, 12.0, -32.0, -50.0], [32.0, 16.0, -2.0, 38.0, -42.0]], [[11.0, 42.0, -41.0, -36.0, 10.0], [-10.0, 29.0, 53.0, 
-69.0, 15.0], [4.0, 22.0, -18.0, 22.0, -26.0], [24.0, -5.0, 66.0, -96.0, 33.0]], [[-88.0, -9.0, -13.0, -60.0, -43.0], [-27.0, 
-107.0, -61.0, -10.0, 62.0], [-82.0, -6.0, -6.0, -22.0, -135.0], [95.0, 55.0, 27.0, -31.0, -53.0]]], [[[67.0, -58.0, -27.0, 
--5.0, 18.0], [73.0, -51.0, -38.0, -18.0, -97.0], [63.0, 87.0, -10.0, 51.0, 96.0], [-73.0, -106.0, 42.0, 1.0, -20.0]], [[-24.0, 
-49.0, -33.0, -39.0, 8.0], [-30.0, 37.0, 43.0, 43.0, 48.0], [-23.0, -43.0, -2.0, 3.0, -42.0], [33.0, 44.0, 6.0, -50.0, 17.0]], 
-[[-12.0, -2.0, -55.0, -36.0, 56.0], [37.0, 16.0, -40.0, -6.0, 5.0], [-93.0, -4.0, 2.0, 5.0, 1.0], [61.0, -14.0, 34.0, -28.0, 
--29.0]], [[38.0, -47.0, 27.0, 29.0, -35.0], [22.0, -45.0, -12.0, -29.0, -58.0], [105.0, 41.0, -10.0, 27.0, 57.0], [-98.0, 
--48.0, -29.0, 50.0, -4.0]], [[1.0, 54.0, -68.0, -16.0, 80.0], [13.0, -23.0, 47.0, 23.0, 40.0], [-51.0, -90.0, -4.0, 19.0, 
-39.0], [11.0, 25.0, -44.0, -14.0, 24.0]]], [[[-58.0, 1.0, -8.0, -74.0, -8.0], [-28.0, 69.0, -54.0, -16.0, 23.0], [-87.0, -28.0, 
-48.0, -35.0, -63.0], [81.0, 51.0, 26.0, -5.0, -59.0]], [[51.0, 7.0, 22.0, 37.0, 51.0], [14.0, -74.0, 17.0, -12.0, -45.0], 
-[-3.0, -13.0, 40.0, -17.0, 99.0], [-24.0, -23.0, -13.0, 42.0, 17.0]], [[-94.0, -37.0, 24.0, -81.0, -85.0], [-51.0, 91.0, -86.0, 
--59.0, 29.0], [-16.0, -45.0, 44.0, -30.0, -98.0], [23.0, 80.0, -43.0, 60.0, -93.0]], [[-27.0, -38.0, 22.0, -7.0, -42.0], [-6.0, 
-7.0, -45.0, -51.0, -5.0], [31.0, -21.0, 10.0, -2.0, -8.0], [-38.0, 18.0, -59.0, 69.0, -41.0]], [[-60.0, -9.0, -29.0, -93.0, 
--68.0], [-32.0, 93.0, -28.0, 8.0, 29.0], [22.0, -3.0, -4.0, 19.0, -95.0], [9.0, 40.0, 13.0, -34.0, -47.0]]], [[[-35.0, 15.0, 
--109.0, -58.0, 56.0], [42.0, 34.0, -15.0, 9.0, 50.0], [-71.0, -50.0, -42.0, 47.0, -23.0], [35.0, 6.0, -14.0, -45.0, -20.0]], 
-[[-27.0, -39.0, 33.0, 52.0, -15.0], [16.0, 0.0, -54.0, -51.0, 16.0], [-35.0, 8.0, -22.0, -21.0, -30.0], [20.0, 0.0, -33.0, 
-51.0, -19.0]], [[89.0, 50.0, 18.0, 82.0, 48.0], [9.0, -71.0, 105.0, 77.0, -26.0], [33.0, 60.0, -24.0, 3.0, 65.0], [-9.0, -57.0, 
-68.0, -72.0, 104.0]], [[-38.0, -52.0, -1.0, -45.0, -58.0], [2.0, 42.0, -68.0, -44.0, -10.0], [31.0, 11.0, 0.0, 14.0, -38.0], 
-[-26.0, 5.0, -21.0, 35.0, -62.0]], [[-98.0, -9.0, 38.0, -70.0, -94.0], [-78.0, 103.0, -50.0, -30.0, 53.0], [-17.0, -48.0, 40.0, 
--43.0, -127.0], [43.0, 101.0, -30.0, 33.0, -65.0]]]])+(1.-msk_ref)*numpy.array([[[[-66.0, -49.0, 96.0, -18.0, -127.0], [-70.0, 
-65.0, -66.0, -57.0, 4.0], [44.0, 6.0, 42.0, -51.0, -93.0], [-6.0, 63.0, -32.0, 77.0, -62.0]], [[18.0, -17.0, 92.0, 66.0, 
--59.0], [-34.0, -29.0, 15.0, -16.0, -23.0], [75.0, 28.0, 12.0, -31.0, 6.0], [-46.0, 3.0, -23.0, 53.0, 22.0]], [[6.0, -57.0, 
-41.0, 22.0, -92.0], [1.0, 9.0, -22.0, -18.0, -32.0], [120.0, 76.0, -38.0, 26.0, -26.0], [-78.0, -35.0, -4.0, 19.0, -8.0]], 
-[[55.0, 74.0, 9.0, 21.0, 14.0], [-41.0, -45.0, 129.0, 77.0, 0.0], [80.0, -25.0, 8.0, 9.0, 51.0], [-51.0, 12.0, -1.0, -41.0, 
-86.0]], [[6.0, -5.0, 71.0, 17.0, -94.0], [-60.0, -11.0, 43.0, -3.0, -14.0], [149.0, -11.0, 14.0, -1.0, 0.0], [-105.0, 32.0, 
--64.0, 56.0, 17.0]]], [[[-37.0, 7.0, -38.0, -5.0, 22.0], [14.0, 24.0, -15.0, -7.0, 50.0], [-60.0, -37.0, -30.0, 7.0, -39.0], 
-[39.0, 21.0, -25.0, -8.0, -8.0]], [[1.0, 12.0, 4.0, 17.0, 73.0], [14.0, -29.0, -25.0, -26.0, 0.0], [-114.0, -39.0, 44.0, -44.0, 
-40.0], [67.0, 10.0, -1.0, 31.0, -12.0]], [[-59.0, 13.0, -101.0, -81.0, 89.0], [43.0, 74.0, -74.0, 1.0, 51.0], [-211.0, -21.0, 
-0.0, -8.0, -63.0], [163.0, 11.0, 74.0, -76.0, -56.0]], [[100.0, 26.0, -39.0, 48.0, 84.0], [57.0, -96.0, 74.0, 48.0, -53.0], 
-[41.0, 36.0, -26.0, 45.0, 127.0], [-55.0, -86.0, 32.0, -44.0, 71.0]], [[21.0, 29.0, 6.0, 32.0, 17.0], [-11.0, -46.0, 56.0, 9.0, 
-9.0], [40.0, -52.0, 0.0, 6.0, 47.0], [-49.0, 16.0, -61.0, 29.0, 38.0]]], [[[27.0, -36.0, 11.0, 40.0, -20.0], [34.0, -9.0, 
--15.0, 3.0, -29.0], [36.0, 90.0, -46.0, 20.0, -4.0], [-16.0, -63.0, 46.0, -26.0, 13.0]], [[11.0, -33.0, -38.0, -29.0, 9.0], 
-[40.0, -10.0, -35.0, -22.0, -33.0], [23.0, 13.0, -8.0, 37.0, 37.0], [-40.0, -37.0, -7.0, 12.0, -31.0]], [[-35.0, -14.0, 50.0, 
--3.0, -36.0], [-34.0, 29.0, -38.0, -30.0, 8.0], [-30.0, -7.0, 36.0, -46.0, -43.0], [36.0, 38.0, -4.0, 37.0, -31.0]], [[-20.0, 
--1.0, 40.0, 22.0, -62.0], [-34.0, 33.0, 14.0, 14.0, 25.0], [37.0, 28.0, -24.0, -11.0, -69.0], [3.0, 19.0, 8.0, -15.0, 17.0]], 
-[[-33.0, 5.0, -27.0, -17.0, 16.0], [1.0, 2.0, -12.0, -28.0, 34.0], [-24.0, -79.0, 2.0, 6.0, 1.0], [-8.0, 39.0, -76.0, 44.0, 
--21.0]]], [[[53.0, 85.0, -8.0, 38.0, 73.0], [-15.0, -42.0, 110.0, 83.0, 15.0], [-32.0, -10.0, 4.0, -14.0, 41.0], [39.0, -2.0, 
-51.0, -77.0, 90.0]], [[-8.0, 7.0, -29.0, -47.0, 26.0], [2.0, 5.0, -14.0, -8.0, -5.0], [-30.0, -37.0, 32.0, 1.0, 21.0], [9.0, 
-14.0, -7.0, 8.0, -27.0]], [[-97.0, -21.0, 25.0, -31.0, -55.0], [-39.0, 86.0, -74.0, -47.0, 63.0], [-75.0, -39.0, 12.0, -44.0, 
--121.0], [75.0, 77.0, -30.0, 36.0, -62.0]], [[21.0, 0.0, 9.0, -2.0, 3.0], [-2.0, -21.0, 9.0, 0.0, -26.0], [25.0, 2.0, 20.0, 
-0.0, 36.0], [-25.0, -9.0, 0.0, 12.0, 2.0]], [[-8.0, 30.0, -56.0, -23.0, 15.0], [5.0, 16.0, 39.0, 36.0, 37.0], [8.0, -27.0, 
--38.0, 37.0, -18.0], [-6.0, 9.0, -10.0, -47.0, 22.0]]]])
+      ref=msk_ref*numpy.array([[[[12.0, 24.0, 12.0, 18.0], [-12.0, -24.0, 12.0, -0.0], [-12.0, -24.0, 6.0, -0.0]], [[-24.0, 
+-18.0, -0.0, -30.0], [12.0, 6.0, 12.0, -24.0], [18.0, -0.0, 30.0, 42.0]]], [[[42.0, -6.0, -24.0, -0.0], [-0.0, 36.0, -6.0, 
+24.0], [-0.0, 30.0, -36.0, 12.0]], [[6.0, 30.0, -36.0, 42.0], [-24.0, -6.0, 42.0, -0.0], [-42.0, -36.0, -30.0, 30.0]]], [[[6.0, 
+-18.0, 30.0, -6.0], [18.0, -6.0, -18.0, -42.0], [6.0, 18.0, -36.0, 18.0]], [[-42.0, 42.0, -0.0, 42.0], [-6.0, 36.0, 36.0, 
+-42.0], [-12.0, 6.0, 6.0, -24.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, 20.0, 10.0, 15.0], [-10.0, -20.0, 10.0, -0.0], [-10.0, 
+-20.0, 5.0, -0.0]], [[-20.0, -15.0, -0.0, -25.0], [10.0, 5.0, 10.0, -20.0], [15.0, -0.0, 25.0, 35.0]]], [[[35.0, -5.0, -20.0, 
+-0.0], [-0.0, 30.0, -5.0, 20.0], [-0.0, 25.0, -30.0, 10.0]], [[5.0, 25.0, -30.0, 35.0], [-20.0, -5.0, 35.0, -0.0], [-35.0, 
+-30.0, -25.0, 25.0]]], [[[5.0, -15.0, 25.0, -5.0], [15.0, -5.0, -15.0, -35.0], [5.0, 15.0, -30.0, 15.0]], [[-35.0, 35.0, -0.0, 
+35.0], [-5.0, 30.0, 30.0, -35.0], [-10.0, 5.0, 5.0, -20.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_expandedData_rank2(self):
+   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank0_offset0(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, 1.0, 4.0, 2.0, 0.0], [5.0, -7.0, 5.0, -6.0, 3.0], [0.0, 3.0, 4.0, 3.0, 0.0], [5.0, 
-6.0, 2.0, 1.0, 5.0]], [[6.0, -6.0, 0.0, -4.0, 1.0], [3.0, -6.0, 0.0, 2.0, 5.0], [0.0, 2.0, 6.0, 0.0, -4.0], [0.0, -2.0, -7.0, 
--5.0, 1.0]], [[0.0, 6.0, -4.0, 0.0, -2.0], [-6.0, 2.0, -3.0, 7.0, 0.0], [-3.0, 7.0, -2.0, 5.0, 0.0], [0.0, 6.0, -4.0, 0.0, 
--7.0]]], [[[-6.0, 5.0, 5.0, -3.0, 0.0], [0.0, 1.0, -3.0, 7.0, -1.0], [-1.0, 0.0, 1.0, 7.0, 6.0], [-7.0, -2.0, 6.0, 1.0, 7.0]], 
-[[-3.0, 0.0, -2.0, 6.0, 4.0], [-6.0, -4.0, -5.0, -6.0, -1.0], [-2.0, 2.0, -4.0, 4.0, -2.0], [6.0, -4.0, 5.0, -2.0, -3.0]], 
-[[-4.0, 1.0, -7.0, -4.0, -6.0], [-1.0, 1.0, 3.0, -3.0, -7.0], [6.0, 3.0, 7.0, -5.0, -6.0], [0.0, -2.0, 0.0, -6.0, 
--6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, -6.0, -6.0, 0.0, 6.0], [5.0, 5.0, -7.0, -6.0, 6.0], [-4.0, -3.0, -5.0, 7.0, 6.0], 
-[5.0, 3.0, 7.0, -1.0, -6.0]], [[-4.0, 7.0, 6.0, -1.0, 7.0], [5.0, -1.0, 3.0, 3.0, -3.0], [0.0, 0.0, 7.0, 7.0, 1.0], [3.0, -2.0, 
-0.0, -7.0, 4.0]], [[1.0, 3.0, 0.0, 4.0, 7.0], [-3.0, 0.0, 1.0, -5.0, -6.0], [7.0, -7.0, 4.0, 7.0, -1.0], [-1.0, 0.0, -4.0, 
--7.0, 5.0]]], [[[-5.0, 7.0, 0.0, -6.0, 0.0], [4.0, -5.0, -2.0, -6.0, 0.0], [1.0, -2.0, 7.0, 4.0, 5.0], [-6.0, -6.0, -7.0, -3.0, 
--4.0]], [[-1.0, -2.0, 0.0, -5.0, 0.0], [-3.0, 0.0, 0.0, 2.0, 1.0], [-4.0, 0.0, 3.0, 0.0, 2.0], [-5.0, -3.0, 3.0, 0.0, -5.0]], 
-[[4.0, -7.0, -3.0, 2.0, -5.0], [2.0, 3.0, -2.0, 3.0, -4.0], [-3.0, 4.0, -4.0, -4.0, -3.0], [7.0, 2.0, -5.0, 0.0, -2.0]]]])
+      arg0=msk_arg0*(4.0)+(1-msk_arg0)*(2.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, -1.0, 5.0], [-5.0, 4.0, 0.0]])+(1.-msk_arg1)*numpy.array([[5.0, 2.0, -7.0], [5.0, 7.0, 
-6.0]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg1=msk_arg1*(-5.0)+(1-msk_arg1)*(2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[61.0, 4.0, -81.0, 29.0, 5.0], [-92.0, 44.0, -55.0, 16.0, -25.0], [-18.0, 20.0, -65.0, -15.0, 
--34.0], [24.0, -16.0, -37.0, -15.0, -118.0]])+(1.-msk_ref)*numpy.array([[-38.0, -58.0, -36.0, -83.0, -35.0], [67.0, 16.0, 
--58.0, 13.0, 49.0], [-110.0, 48.0, -7.0, -4.0, 60.0], [15.0, -28.0, 19.0, 15.0, -124.0]])
+      ref=msk_ref*numpy.array(-20.0)+(1.-msk_ref)*numpy.array(4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_expandedData_rank3(self):
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank1_offset1(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, 2.0, -4.0, -4.0, 0.0], [4.0, 3.0, 0.0, -3.0, -5.0], [-7.0, 5.0, 4.0, 3.0, -2.0], 
-[-3.0, -3.0, -4.0, -5.0, 6.0]], [[6.0, 7.0, -7.0, 2.0, 6.0], [-4.0, 6.0, 1.0, 6.0, -5.0], [-3.0, 4.0, 0.0, 4.0, 3.0], [-5.0, 
-2.0, 1.0, -5.0, -7.0]], [[-5.0, -7.0, -2.0, -4.0, 3.0], [2.0, 3.0, 0.0, -4.0, 4.0], [-4.0, -6.0, -3.0, -3.0, 7.0], [1.0, -4.0, 
-6.0, -5.0, -6.0]]], [[[-7.0, 0.0, 7.0, -1.0, -6.0], [-3.0, -7.0, -6.0, 0.0, -2.0], [1.0, -1.0, -3.0, 1.0, 1.0], [4.0, 3.0, 0.0, 
--6.0, -1.0]], [[7.0, -3.0, 0.0, -5.0, -4.0], [5.0, -3.0, -5.0, -7.0, -5.0], [6.0, 1.0, -5.0, 0.0, 3.0], [3.0, 3.0, 0.0, 2.0, 
--4.0]], [[4.0, 4.0, -5.0, -2.0, 6.0], [6.0, 7.0, 0.0, 3.0, -6.0], [5.0, 1.0, 3.0, -1.0, -2.0], [-2.0, -3.0, 3.0, -4.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, -4.0, -7.0, -6.0, 2.0], [-1.0, 1.0, 3.0, -2.0, -5.0], [-3.0, -3.0, -3.0, 3.0, 0.0], 
-[-6.0, -1.0, -2.0, 7.0, 3.0]], [[5.0, -7.0, 3.0, -6.0, 4.0], [3.0, 7.0, 0.0, 0.0, -2.0], [3.0, -5.0, 5.0, -4.0, 2.0], [1.0, 
-4.0, -2.0, -6.0, 0.0]], [[1.0, 0.0, -5.0, -6.0, 7.0], [4.0, 4.0, -1.0, 5.0, 1.0], [0.0, -3.0, 6.0, -3.0, -3.0], [4.0, -1.0, 
-3.0, 0.0, 5.0]]], [[[-6.0, -6.0, 1.0, -1.0, 5.0], [-7.0, 2.0, -1.0, -2.0, -2.0], [-7.0, 1.0, -6.0, -4.0, 5.0], [2.0, -5.0, 
--3.0, 0.0, -7.0]], [[4.0, 1.0, 1.0, 0.0, 6.0], [-6.0, 4.0, 0.0, 3.0, -5.0], [4.0, -1.0, 5.0, -2.0, -1.0], [4.0, -7.0, 2.0, 1.0, 
-4.0]], [[7.0, 5.0, 5.0, 5.0, -7.0], [-2.0, 5.0, -6.0, -5.0, -7.0], [-3.0, -4.0, -3.0, 3.0, 4.0], [6.0, 2.0, 2.0, -6.0, 5.0]]]])
+      arg0=msk_arg0*numpy.array([7.0, 5.0, -6.0])+(1.-msk_arg0)*numpy.array([-3.0, -6.0, 0.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, 4.0], [-6.0, 5.0], [2.0, 1.0]], [[6.0, 0.0], [2.0, -4.0], [0.0, 
--4.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 6.0], [6.0, -4.0], [2.0, 5.0]], [[-4.0, 7.0], [-3.0, -7.0], [-5.0, -7.0]]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([0.0, -7.0, 6.0])+(1.-msk_arg1)*numpy.array([1.0, -3.0, 3.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-60.0, 9.0], [-58.0, 32.0], [72.0, -33.0], [-44.0, 18.0], [-74.0, 25.0]], [[28.0, -46.0], 
-[-72.0, 29.0], [-52.0, 25.0], [-64.0, 30.0], [6.0, 3.0]], [[14.0, -91.0], [-30.0, 26.0], [-26.0, 21.0], [-18.0, 33.0], [4.0, 
-10.0]], [[56.0, -40.0], [-2.0, -6.0], [-2.0, -17.0], [-22.0, -42.0], [28.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[9.0, -104.0], 
-[-46.0, -80.0], [-24.0, -114.0], [-69.0, -84.0], [35.0, 73.0]], [[82.0, 9.0], [5.0, -51.0], [32.0, 48.0], [34.0, 13.0], [48.0, 
-53.0]], [[49.0, -86.0], [-17.0, 29.0], [66.0, -64.0], [-23.0, -16.0], [-31.0, -9.0]], [[-36.0, -76.0], [53.0, -27.0], [-10.0, 
--38.0], [-9.0, 101.0], [1.0, -69.0]]])
+      ref=msk_ref*numpy.array(-71.0)+(1.-msk_ref)*numpy.array(15.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_transposed_tensor_mult_expandedData_rank4_expandedData_rank4(self):
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank2_offset2(self):
       msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, 0.0, 3.0, 2.0, -2.0], [0.0, 7.0, 7.0, -1.0, -4.0], [2.0, 3.0, 0.0, 7.0, 4.0], [-5.0, 
-4.0, 0.0, 7.0, 2.0]], [[-3.0, -4.0, -7.0, 0.0, -4.0], [3.0, -1.0, -7.0, 4.0, 1.0], [1.0, 0.0, -5.0, 0.0, 5.0], [0.0, 2.0, 7.0, 
-6.0, -3.0]], [[6.0, 5.0, -2.0, 5.0, 0.0], [0.0, -3.0, 3.0, -4.0, 0.0], [-4.0, 2.0, -4.0, -4.0, -6.0], [4.0, 3.0, -2.0, -1.0, 
-3.0]]], [[[-3.0, -6.0, 2.0, 5.0, 1.0], [1.0, 0.0, -7.0, 4.0, 5.0], [-5.0, 4.0, 5.0, -3.0, -4.0], [-1.0, 5.0, 2.0, -5.0, -4.0]], 
-[[1.0, 6.0, -4.0, 5.0, 2.0], [-2.0, 3.0, 6.0, 0.0, -7.0], [-4.0, -5.0, 6.0, 1.0, -5.0], [-7.0, 1.0, -4.0, -5.0, 0.0]], [[6.0, 
-4.0, -6.0, -4.0, -4.0], [-6.0, 6.0, -3.0, 3.0, 6.0], [2.0, 4.0, -2.0, 7.0, -5.0], [-4.0, 7.0, -2.0, -1.0, 
-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 7.0, 5.0, 3.0, -3.0], [5.0, 3.0, -2.0, 6.0, 0.0], [5.0, 0.0, -1.0, -4.0, -5.0], 
-[2.0, -6.0, -5.0, -3.0, 7.0]], [[-2.0, -4.0, 3.0, 7.0, 0.0], [7.0, 0.0, 4.0, 0.0, 1.0], [1.0, 0.0, -3.0, -4.0, 5.0], [-6.0, 
-6.0, 3.0, -5.0, -5.0]], [[4.0, 6.0, -7.0, -3.0, 3.0], [-2.0, -2.0, 2.0, -5.0, 2.0], [4.0, 0.0, 4.0, -7.0, -4.0], [-2.0, -4.0, 
-4.0, -4.0, -3.0]]], [[[-3.0, 3.0, -6.0, 1.0, -2.0], [-4.0, 6.0, -3.0, -5.0, 1.0], [2.0, -2.0, 0.0, -7.0, -4.0], [5.0, 6.0, 5.0, 
--2.0, -6.0]], [[-4.0, 0.0, 2.0, -2.0, -5.0], [4.0, 6.0, 6.0, -6.0, -7.0], [-7.0, 5.0, 2.0, -6.0, -4.0], [4.0, 6.0, -4.0, -1.0, 
-3.0]], [[1.0, 2.0, 4.0, 7.0, 0.0], [-6.0, 0.0, 6.0, -7.0, -3.0], [-4.0, 5.0, 1.0, -4.0, 5.0], [3.0, 1.0, -4.0, -4.0, -1.0]]]])
+      arg0=msk_arg0*numpy.array([[4.0, 3.0, 4.0], [2.0, 7.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-4.0, -3.0, 2.0], [0.0, 5.0, 
+-6.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[7.0, 2.0, -4.0, -2.0, 0.0], [-1.0, 0.0, -2.0, 5.0, -6.0], [1.0, 4.0, 6.0, -4.0, 0.0], [7.0, 
-6.0, -6.0, 3.0, 6.0]], [[-1.0, 7.0, -2.0, 7.0, 2.0], [-6.0, 6.0, -6.0, 2.0, -3.0], [1.0, -6.0, 4.0, -2.0, 0.0], [-5.0, 0.0, 
-0.0, 7.0, -6.0]], [[0.0, -4.0, -1.0, 5.0, 0.0], [-4.0, 2.0, 2.0, -3.0, 0.0], [5.0, -7.0, 0.0, -7.0, -7.0], [7.0, 3.0, -7.0, 
--6.0, -1.0]]], [[[-1.0, -5.0, -5.0, -5.0, 1.0], [4.0, -3.0, 1.0, -4.0, -5.0], [0.0, -7.0, 0.0, 3.0, 2.0], [-2.0, -1.0, 0.0, 
--5.0, -3.0]], [[-1.0, 1.0, 3.0, -4.0, -5.0], [-4.0, 5.0, -3.0, 0.0, 5.0], [7.0, -2.0, -2.0, -1.0, -7.0], [-5.0, -2.0, -2.0, 
-0.0, 6.0]], [[-4.0, 5.0, -3.0, -1.0, -2.0], [2.0, -4.0, -4.0, 5.0, 2.0], [5.0, 3.0, -2.0, 4.0, -3.0], [-7.0, -2.0, 5.0, -4.0, 
-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, -6.0, 0.0, 2.0, -7.0], [-4.0, -6.0, -2.0, 5.0, -7.0], [0.0, -7.0, -6.0, -7.0, 1.0], 
-[0.0, 2.0, 0.0, -1.0, 5.0]], [[1.0, 7.0, 2.0, 5.0, 3.0], [6.0, 2.0, -2.0, 0.0, -2.0], [4.0, 0.0, 5.0, 4.0, 6.0], [-4.0, 4.0, 
-5.0, 5.0, -2.0]], [[-2.0, 2.0, 5.0, -5.0, 4.0], [4.0, 1.0, -7.0, -6.0, -6.0], [2.0, 4.0, -5.0, 7.0, 7.0], [-2.0, -4.0, -2.0, 
--4.0, 2.0]]], [[[0.0, -6.0, 1.0, 5.0, 1.0], [-2.0, 0.0, -1.0, 6.0, 3.0], [4.0, 3.0, 6.0, 0.0, 0.0], [7.0, 2.0, 2.0, -7.0, 
--6.0]], [[-5.0, -1.0, 0.0, -2.0, -2.0], [-3.0, 4.0, -6.0, -3.0, 2.0], [6.0, 6.0, 3.0, -5.0, 7.0], [-3.0, -1.0, 0.0, -6.0, 
--6.0]], [[0.0, 0.0, -4.0, 3.0, 5.0], [3.0, -1.0, 2.0, 7.0, 6.0], [4.0, -5.0, 3.0, 6.0, 0.0], [4.0, 6.0, -4.0, 7.0, 2.0]]]])
-      res=transposed_tensor_mult(arg0,arg1)
+      arg1=msk_arg1*numpy.array([[-6.0, -6.0, -1.0], [-2.0, -5.0, -5.0]])+(1.-msk_arg1)*numpy.array([[6.0, 6.0, 4.0], [-3.0, 
+4.0, -7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[30.0, 15.0, -28.0, 0.0, -26.0], [-17.0, -16.0, -14.0, 53.0, -1.0], [71.0, 41.0, 16.0, -50.0, 
--73.0], [65.0, 49.0, -56.0, -45.0, 105.0]], [[-12.0, 8.0, 39.0, -1.0, -52.0], [-36.0, 18.0, -6.0, 21.0, 80.0], [83.0, 31.0, 
--36.0, -35.0, -101.0], [9.0, 1.0, -27.0, -44.0, 97.0]], [[54.0, -79.0, 0.0, -53.0, 20.0], [59.0, -48.0, 70.0, -31.0, -39.0], 
-[-72.0, 44.0, 10.0, 2.0, 64.0], [100.0, 30.0, -26.0, -14.0, -4.0]], [[20.0, -56.0, -11.0, -20.0, -12.0], [-30.0, 36.0, 12.0, 
--45.0, -20.0], [42.0, -84.0, 10.0, -49.0, -48.0], [42.0, 20.0, -77.0, -33.0, -2.0]], [[3.0, -55.0, 29.0, -33.0, -9.0], [14.0, 
--1.0, 39.0, -42.0, 21.0], [-12.0, -7.0, -24.0, 1.0, 0.0], [22.0, -9.0, -12.0, -23.0, -3.0]]], [[[22.0, -16.0, 1.0, 30.0, 29.0], 
-[-18.0, 29.0, 13.0, -28.0, -36.0], [-41.0, -39.0, 28.0, -25.0, 34.0], [35.0, 15.0, -26.0, 40.0, -69.0]], [[23.0, 52.0, -32.0, 
--54.0, -29.0], [11.0, -21.0, -47.0, 72.0, -12.0], [42.0, 67.0, 20.0, 16.0, -18.0], [-24.0, 15.0, 3.0, 8.0, 105.0]], [[69.0, 
--21.0, 45.0, -34.0, -45.0], [-35.0, 27.0, 21.0, 25.0, 38.0], [42.0, 77.0, 8.0, -74.0, -68.0], [110.0, 52.0, -90.0, 1.0, 
-120.0]], [[-27.0, 37.0, -29.0, -13.0, 6.0], [15.0, -8.0, -38.0, 14.0, -20.0], [-2.0, -19.0, 4.0, 48.0, 27.0], [-84.0, -28.0, 
-49.0, 17.0, -20.0]], [[-51.0, -3.0, -50.0, 12.0, 30.0], [58.0, -68.0, 4.0, -8.0, -27.0], [-22.0, -25.0, -18.0, 60.0, 41.0], 
-[-50.0, -27.0, 68.0, -54.0, -51.0]]], [[[14.0, 58.0, 1.0, 22.0, 13.0], [8.0, -15.0, -19.0, 54.0, -6.0], [-35.0, 79.0, 20.0, 
-15.0, 40.0], [-3.0, 9.0, 34.0, 54.0, 13.0]], [[6.0, -7.0, -61.0, 0.0, 21.0], [33.0, -49.0, 1.0, 13.0, -55.0], [-2.0, -8.0, 
-20.0, 7.0, 17.0], [24.0, 22.0, -2.0, -39.0, -2.0]], [[2.0, -48.0, 13.0, -102.0, -31.0], [38.0, -15.0, 17.0, -28.0, 16.0], [7.0, 
-5.0, -28.0, 39.0, 2.0], [-29.0, -25.0, 6.0, -28.0, 43.0]], [[23.0, 81.0, -27.0, -30.0, -22.0], [7.0, -22.0, -56.0, 94.0, -8.0], 
-[29.0, 96.0, 26.0, 18.0, -6.0], [-27.0, 17.0, 19.0, 32.0, 103.0]], [[52.0, 57.0, 0.0, 42.0, 41.0], [-16.0, 25.0, -19.0, 39.0, 
--54.0], [-81.0, 51.0, 64.0, -11.0, 84.0], [29.0, 30.0, 3.0, 123.0, -48.0]]], [[[-11.0, -48.0, 12.0, 67.0, 42.0], [5.0, -8.0, 
-54.0, -53.0, -8.0], [-54.0, -39.0, -8.0, -20.0, 31.0], [58.0, 5.0, -4.0, -18.0, -97.0]], [[-8.0, 21.0, -66.0, -15.0, -10.0], 
-[2.0, -20.0, -40.0, 30.0, -36.0], [63.0, -33.0, 16.0, 1.0, -39.0], [-25.0, 12.0, -12.0, -45.0, 42.0]], [[3.0, 33.0, -28.0, 
-47.0, 40.0], [-14.0, 20.0, -24.0, 2.0, -55.0], [-41.0, -40.0, 40.0, 2.0, 52.0], [-19.0, 4.0, 12.0, 59.0, -82.0]], [[57.0, 75.0, 
--26.0, 69.0, 34.0], [-41.0, 28.0, -38.0, 65.0, -62.0], [-32.0, 41.0, 78.0, -47.0, 35.0], [54.0, 56.0, -30.0, 98.0, -14.0]], 
-[[5.0, 11.0, 3.0, 6.0, -18.0], [-4.0, -16.0, 0.0, 31.0, 25.0], [34.0, 45.0, -8.0, -19.0, -41.0], [30.0, 17.0, -13.0, -29.0, 
-63.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 58.0, 9.0, -48.0, 69.0], [53.0, 25.0, 19.0, -58.0, 18.0], [-32.0, 27.0, -15.0, 
-95.0, -19.0], [-5.0, -34.0, -28.0, 33.0, 21.0]], [[-2.0, -76.0, 17.0, -15.0, -24.0], [-28.0, -46.0, -47.0, 31.0, -56.0], [16.0, 
--26.0, -68.0, -11.0, 25.0], [33.0, -8.0, -34.0, -58.0, 41.0]], [[17.0, 11.0, -51.0, 38.0, -44.0], [-12.0, -27.0, 35.0, 53.0, 
-11.0], [2.0, -89.0, 2.0, -58.0, -12.0], [-30.0, 60.0, 1.0, 96.0, 37.0]], [[29.0, 21.0, -28.0, 86.0, 28.0], [43.0, -22.0, 26.0, 
-94.0, 24.0], [42.0, -77.0, 53.0, 38.0, 10.0], [19.0, 92.0, 15.0, 98.0, 15.0]], [[13.0, 41.0, 13.0, -21.0, 41.0], [43.0, 1.0, 
-17.0, -30.0, -13.0], [-32.0, -3.0, -24.0, 67.0, -17.0], [-5.0, -17.0, -10.0, 35.0, 33.0]]], [[[1.0, 35.0, 24.0, 9.0, -64.0], 
-[-8.0, 4.0, -42.0, -41.0, -77.0], [8.0, -1.0, -15.0, -77.0, 61.0], [-88.0, -2.0, 55.0, 0.0, -5.0]], [[-20.0, -64.0, -4.0, 34.0, 
--35.0], [-50.0, 4.0, -34.0, 45.0, 21.0], [56.0, 25.0, 46.0, -65.0, 31.0], [28.0, 20.0, 16.0, -73.0, -61.0]], [[-34.0, 56.0, 
--9.0, -3.0, 49.0], [46.0, 40.0, -39.0, -16.0, 33.0], [68.0, 19.0, 40.0, 50.0, 78.0], [-35.0, 28.0, -14.0, 41.0, -20.0]], 
-[[52.0, -10.0, -2.0, 3.0, -90.0], [-37.0, -58.0, 50.0, -1.0, -81.0], [-94.0, -78.0, -80.0, -89.0, -71.0], [-35.0, -14.0, 28.0, 
-36.0, 72.0]], [[32.0, 12.0, 25.0, 5.0, 11.0], [24.0, -21.0, 19.0, -6.0, -43.0], [-42.0, -16.0, -29.0, 35.0, -29.0], [8.0, 
--13.0, 15.0, 11.0, 32.0]]], [[[38.0, -20.0, 40.0, 7.0, -20.0], [7.0, -48.0, -8.0, 6.0, -93.0], [-38.0, -35.0, -66.0, 8.0, 
--10.0], [7.0, -15.0, 17.0, -16.0, 53.0]], [[-25.0, 7.0, -22.0, -5.0, 13.0], [4.0, 15.0, -18.0, 8.0, 34.0], [42.0, -1.0, 18.0, 
-5.0, 35.0], [-9.0, 21.0, -24.0, 19.0, -8.0]], [[-23.0, -9.0, 10.0, -38.0, 15.0], [-1.0, 11.0, -30.0, -28.0, -1.0], [12.0, 30.0, 
--20.0, 19.0, 23.0], [2.0, -26.0, -27.0, -35.0, -1.0]], [[32.0, 30.0, -34.0, -28.0, -27.0], [-16.0, -11.0, 100.0, -30.0, 21.0], 
-[-110.0, -37.0, -33.0, -31.0, -119.0], [-17.0, -28.0, -4.0, 69.0, 44.0]], [[23.0, 85.0, -34.0, 38.0, 63.0], [69.0, 15.0, 66.0, 
-22.0, 59.0], [-8.0, -42.0, 54.0, 77.0, -31.0], [-8.0, 52.0, 5.0, 133.0, 15.0]]], [[[-18.0, -92.0, -29.0, 10.0, -28.0], [-65.0, 
--13.0, -1.0, 61.0, 51.0], [28.0, 2.0, 19.0, -54.0, -20.0], [63.0, 12.0, -28.0, -62.0, -30.0]], [[-28.0, 28.0, -6.0, 59.0, 
-43.0], [17.0, 67.0, -12.0, 19.0, 90.0], [80.0, 75.0, 143.0, 14.0, 44.0], [12.0, 40.0, 46.0, -19.0, -120.0]], [[5.0, 33.0, 47.0, 
-6.0, 53.0], [44.0, 28.0, -13.0, -35.0, -12.0], [0.0, 62.0, 31.0, 71.0, 13.0], [11.0, -24.0, 33.0, -35.0, -37.0]], [[2.0, -12.0, 
--16.0, -31.0, -30.0], [-39.0, 4.0, 44.0, -28.0, 23.0], [-58.0, 13.0, -14.0, -46.0, -68.0], [1.0, -37.0, -5.0, -14.0, -3.0]], 
-[[0.0, -50.0, -27.0, -35.0, -93.0], [-70.0, -42.0, 3.0, 1.0, -39.0], [-36.0, -56.0, -82.0, -111.0, -23.0], [-29.0, -15.0, 
--27.0, -3.0, 55.0]]]])
+      ref=msk_ref*numpy.array(-75.0)+(1.-msk_ref)*numpy.array(28.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=transposed_tensor_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_float_rank0_offset0(self):
-      arg0=-3.0
-      arg1=1.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=-3.0
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      self.assertTrue(isinstance(res,complex),"wrong type of result. Got "+str(type(res)))
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_array_rank0_offset0(self):
-      arg0=-3.0
-      arg1=numpy.array(-2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(6.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_array_rank1_offset0(self):
-      arg0=4.0
-      arg1=numpy.array([-1.0, 0.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([-4.0, 0.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 1.0, 4.0], [1.0, -1.0, -5.0], [1.0, 0.0, -4.0], [4.0, 6.0, 1.0]], [[-6.0, -7.0, 0.0], 
+[-3.0, -7.0, 2.0], [6.0, -5.0, 6.0], [1.0, 7.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, 3.0, 1.0], [-1.0, -4.0, -6.0], [-5.0, 
+1.0, 1.0], [-7.0, -2.0, -1.0]], [[-4.0, -5.0, 5.0], [1.0, 7.0, 6.0], [-2.0, -2.0, 6.0], [4.0, 2.0, 1.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[6.0, 3.0, -7.0], [2.0, 3.0, 0.0], [-7.0, -3.0, 5.0], [4.0, -3.0, 1.0]], [[5.0, 4.0, 5.0], 
+[-3.0, -7.0, -1.0], [-4.0, 4.0, 2.0], [5.0, -6.0, -2.0]]])+(1.-msk_arg1)*numpy.array([[[4.0, -3.0, 4.0], [2.0, -3.0, -5.0], 
+[5.0, -1.0, 7.0], [-6.0, 0.0, -3.0]], [[3.0, -7.0, -7.0], [0.0, 2.0, -7.0], [2.0, 0.0, -6.0], [-7.0, 0.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-137.0)+(1.-msk_ref)*numpy.array(-21.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_array_rank2_offset0(self):
-      arg0=-6.0
-      arg1=numpy.array([[-3.0, 3.0, 0.0, -4.0, 4.0], [-7.0, 6.0, -5.0, -1.0, -1.0], [1.0, 0.0, 0.0, -2.0, 5.0], [-7.0, 6.0, 
-3.0, -1.0, 1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[18.0, -18.0, -0.0, 24.0, -24.0], [42.0, -36.0, 30.0, 6.0, 6.0], [-6.0, -0.0, -0.0, 12.0, -30.0], [42.0, 
--36.0, -18.0, 6.0, -6.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-6.0, -4.0], [4.0, 1.0], [7.0, -6.0]], [[0.0, 6.0], [3.0, 6.0], [3.0, 5.0]]], [[[-2.0, 
+-4.0], [6.0, 0.0], [-7.0, 4.0]], [[2.0, 0.0], [1.0, -6.0], [-2.0, 4.0]]], [[[4.0, -2.0], [7.0, 5.0], [2.0, -7.0]], [[-4.0, 
+5.0], [-1.0, 0.0], [-6.0, -7.0]]], [[[-6.0, 4.0], [7.0, 7.0], [-6.0, -5.0]], [[-7.0, -6.0], [4.0, -5.0], [-1.0, 
+-6.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, 0.0], [-3.0, 5.0], [-4.0, 3.0]], [[-7.0, 7.0], [1.0, 5.0], [-1.0, 1.0]]], [[[0.0, 
+3.0], [-7.0, -5.0], [-7.0, 5.0]], [[3.0, -5.0], [-6.0, 3.0], [3.0, -5.0]]], [[[-3.0, 6.0], [-1.0, 2.0], [-2.0, 4.0]], [[5.0, 
+0.0], [-2.0, 7.0], [0.0, -4.0]]], [[[5.0, -3.0], [0.0, 6.0], [-2.0, 5.0]], [[2.0, -1.0], [-3.0, -6.0], [3.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, -1.0], [-7.0, 4.0], [1.0, -1.0]], [[-6.0, 0.0], [-7.0, 6.0], [-3.0, 5.0]]], [[[-1.0, 
+-4.0], [-5.0, -1.0], [-1.0, -1.0]], [[5.0, -5.0], [3.0, -3.0], [-5.0, 4.0]]], [[[-1.0, -4.0], [0.0, -1.0], [0.0, 6.0]], [[0.0, 
+3.0], [-4.0, -1.0], [7.0, -2.0]]], [[[-2.0, -3.0], [-2.0, 0.0], [-5.0, -6.0]], [[0.0, -4.0], [4.0, 0.0], [-7.0, 
+7.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -4.0], [6.0, 0.0], [7.0, 1.0]], [[2.0, -3.0], [5.0, -1.0], [-6.0, 0.0]]], [[[3.0, 
+4.0], [-5.0, 4.0], [4.0, 4.0]], [[2.0, -6.0], [2.0, -4.0], [2.0, 1.0]]], [[[2.0, 4.0], [0.0, 6.0], [0.0, 1.0]], [[5.0, -7.0], 
+[7.0, 2.0], [-6.0, 7.0]]], [[[6.0, 6.0], [-2.0, 2.0], [3.0, 7.0]], [[0.0, 1.0], [7.0, 0.0], [7.0, 7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(71.0)+(1.-msk_ref)*numpy.array(78.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_array_rank3_offset0(self):
-      arg0=0.0
-      arg1=numpy.array([[[-4.0, 6.0], [6.0, -4.0]], [[0.0, 7.0], [6.0, -3.0]], [[3.0, -7.0], [-3.0, -2.0]], [[-6.0, -6.0], 
-[-7.0, 5.0]], [[-5.0, -4.0], [-6.0, 2.0]], [[0.0, 7.0], [2.0, 0.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(5.0)+(1-msk_arg0)*(-4.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-7.0, 2.0])+(1.-msk_arg1)*numpy.array([-2.0, 1.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [0.0, -0.0]], [[0.0, -0.0], [-0.0, -0.0]], [[-0.0, -0.0], 
-[-0.0, 0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-35.0, 10.0])+(1.-msk_ref)*numpy.array([8.0, -4.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_array_rank4_offset0(self):
-      arg0=-6.0
-      arg1=numpy.array([[[[-1.0, 3.0, 7.0, -6.0], [-4.0, 5.0, -4.0, -7.0], [2.0, -4.0, 3.0, 5.0]], [[-1.0, 6.0, -4.0, 5.0], 
-[-3.0, 0.0, -3.0, -1.0], [-1.0, -4.0, -1.0, 7.0]]], [[[6.0, -2.0, 0.0, -7.0], [-2.0, -4.0, -2.0, 7.0], [-4.0, -2.0, 5.0, 
--5.0]], [[2.0, 4.0, 7.0, 0.0], [6.0, 0.0, 3.0, 7.0], [-6.0, -6.0, -7.0, -4.0]]], [[[-3.0, 5.0, 1.0, 4.0], [-1.0, 0.0, -6.0, 
--5.0], [-5.0, 6.0, 6.0, 0.0]], [[6.0, 3.0, -7.0, -3.0], [3.0, -5.0, -6.0, -2.0], [7.0, -5.0, 7.0, 5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[6.0, -18.0, -42.0, 36.0], [24.0, -30.0, 24.0, 42.0], [-12.0, 24.0, -18.0, -30.0]], [[6.0, -36.0, 
-24.0, -30.0], [18.0, -0.0, 18.0, 6.0], [6.0, 24.0, 6.0, -42.0]]], [[[-36.0, 12.0, -0.0, 42.0], [12.0, 24.0, 12.0, -42.0], 
-[24.0, 12.0, -30.0, 30.0]], [[-12.0, -24.0, -42.0, -0.0], [-36.0, -0.0, -18.0, -42.0], [36.0, 36.0, 42.0, 24.0]]], [[[18.0, 
--30.0, -6.0, -24.0], [6.0, -0.0, 36.0, 30.0], [30.0, -36.0, -36.0, -0.0]], [[-36.0, -18.0, 42.0, 18.0], [-18.0, 30.0, 36.0, 
-12.0], [-42.0, 30.0, -42.0, -30.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-1.0, -6.0, 1.0])+(1.-msk_arg0)*numpy.array([6.0, 6.0, -4.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 0.0], [0.0, -3.0], [1.0, -7.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 1.0], [-5.0, 1.0], 
+[6.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([1.0, 11.0])+(1.-msk_ref)*numpy.array([-72.0, 12.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_constData_rank0_offset0(self):
-      arg0=6.0
-      arg1=Data(-3.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-18.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[1.0, -4.0, 0.0], [0.0, -4.0, -2.0]])+(1.-msk_arg0)*numpy.array([[2.0, 6.0, -5.0], [-1.0, 5.0, 
+3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[6.0, 5.0], [-5.0, 0.0], [0.0, -6.0]], [[-5.0, -4.0], [-1.0, -4.0], [0.0, 
+0.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 4.0], [3.0, -7.0], [-7.0, -1.0]], [[6.0, 3.0], [-3.0, 6.0], [0.0, 7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([30.0, 21.0])+(1.-msk_ref)*numpy.array([34.0, 19.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_constData_rank1_offset0(self):
-      arg0=-7.0
-      arg1=Data(numpy.array([-3.0, -3.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([21.0, 21.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 0.0, -6.0], [1.0, 4.0, -1.0], [3.0, -7.0, 3.0], [-4.0, 3.0, -2.0]], [[-3.0, -4.0, 
+-4.0], [4.0, 6.0, -4.0], [-3.0, 0.0, -3.0], [-2.0, 0.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 2.0, 2.0], [3.0, -5.0, 
+-1.0], [1.0, 2.0, -5.0], [-6.0, -5.0, 0.0]], [[7.0, -7.0, -7.0], [0.0, -7.0, -2.0], [0.0, 6.0, 4.0], [-2.0, -4.0, -4.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, 1.0], [4.0, -4.0], [2.0, -1.0]], [[4.0, 1.0], [1.0, -6.0], [2.0, 2.0]], [[5.0, 3.0], 
+[-3.0, -2.0], [-3.0, -5.0]], [[3.0, 2.0], [4.0, 5.0], [-2.0, 0.0]]], [[[7.0, 5.0], [-1.0, 2.0], [6.0, 0.0]], [[-5.0, 7.0], 
+[2.0, 0.0], [2.0, -3.0]], [[1.0, -6.0], [3.0, 5.0], [-7.0, 7.0]], [[4.0, 5.0], [-7.0, -3.0], [-7.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 1.0], [4.0, -5.0], [5.0, 5.0]], [[5.0, -3.0], [7.0, 7.0], [5.0, 7.0]], [[2.0, 
+0.0], [-7.0, -1.0], [4.0, -6.0]], [[-1.0, 2.0], [0.0, 1.0], [-5.0, 0.0]]], [[[-6.0, 0.0], [0.0, 1.0], [0.0, -4.0]], [[-4.0, 
+0.0], [-5.0, 2.0], [0.0, 6.0]], [[-5.0, -1.0], [7.0, 4.0], [-3.0, -3.0]], [[-4.0, -3.0], [-5.0, -4.0], [0.0, 6.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([6.0, 24.0])+(1.-msk_ref)*numpy.array([18.0, -38.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_constData_rank2_offset0(self):
-      arg0=-2.0
-      arg1=Data(numpy.array([[-2.0, -7.0, 2.0, 5.0, 0.0], [0.0, -3.0, -7.0, -2.0, -3.0], [-6.0, -3.0, -1.0, 3.0, 4.0], [0.0, 
-7.0, 0.0, 7.0, 4.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[4.0, 14.0, -4.0, -10.0, -0.0], [-0.0, 6.0, 14.0, 4.0, 6.0], [12.0, 6.0, 2.0, -6.0, -8.0], [-0.0, 
--14.0, -0.0, -14.0, -8.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
+   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(4.0)+(1-msk_arg0)*(-7.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, -2.0, 1.0, 0.0, -4.0], [4.0, -4.0, 3.0, 1.0, 2.0], [6.0, -5.0, -1.0, 7.0, -7.0], [0.0, 
+6.0, 0.0, -3.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -7.0, -4.0, 3.0, -2.0], [-3.0, -4.0, -7.0, 0.0, 4.0], [0.0, -4.0, 
+-7.0, 0.0, -2.0], [-6.0, -5.0, 0.0, 5.0, 4.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[4.0, -8.0, 4.0, 0.0, -16.0], [16.0, -16.0, 12.0, 4.0, 8.0], [24.0, -20.0, -4.0, 28.0, -28.0], 
+[0.0, 24.0, 0.0, -12.0, -4.0]])+(1.-msk_ref)*numpy.array([[49.0, 49.0, 28.0, -21.0, 14.0], [21.0, 28.0, 49.0, -0.0, -28.0], 
+[-0.0, 28.0, 49.0, -0.0, 14.0], [42.0, 35.0, -0.0, -35.0, -28.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_constData_rank3_offset0(self):
-      arg0=2.0
-      arg1=Data(numpy.array([[[-7.0, -2.0], [5.0, -6.0]], [[7.0, -4.0], [6.0, 1.0]], [[7.0, -7.0], [1.0, 4.0]], [[-7.0, -2.0], 
-[0.0, 1.0]], [[-1.0, 7.0], [-1.0, -7.0]], [[1.0, 0.0], [-6.0, -6.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-14.0, -4.0], [10.0, -12.0]], [[14.0, -8.0], [12.0, 2.0]], [[14.0, -14.0], [2.0, 8.0]], [[-14.0, 
--4.0], [0.0, 2.0]], [[-2.0, 14.0], [-2.0, -14.0]], [[2.0, 0.0], [-12.0, -12.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_constData_rank4_offset0(self):
-      arg0=2.0
-      arg1=Data(numpy.array([[[[-4.0, -6.0, -6.0, 5.0], [5.0, -6.0, 1.0, 0.0], [2.0, -7.0, -6.0, 3.0]], [[5.0, -5.0, 6.0, 
--1.0], [-1.0, 4.0, -1.0, 3.0], [7.0, 3.0, 2.0, 0.0]]], [[[-4.0, 1.0, 5.0, 3.0], [-5.0, 1.0, -4.0, -4.0], [-5.0, -3.0, 0.0, 
--2.0]], [[4.0, 3.0, -5.0, 2.0], [-2.0, -6.0, 4.0, -1.0], [0.0, -5.0, -6.0, -4.0]]], [[[5.0, -3.0, 4.0, -6.0], [1.0, 0.0, -4.0, 
--1.0], [-4.0, -7.0, 1.0, -1.0]], [[-6.0, -3.0, 0.0, -2.0], [-1.0, 0.0, 1.0, -6.0], [-2.0, 4.0, -6.0, 
--1.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-8.0, -12.0, -12.0, 10.0], [10.0, -12.0, 2.0, 0.0], [4.0, -14.0, -12.0, 6.0]], [[10.0, -10.0, 
-12.0, -2.0], [-2.0, 8.0, -2.0, 6.0], [14.0, 6.0, 4.0, 0.0]]], [[[-8.0, 2.0, 10.0, 6.0], [-10.0, 2.0, -8.0, -8.0], [-10.0, -6.0, 
-0.0, -4.0]], [[8.0, 6.0, -10.0, 4.0], [-4.0, -12.0, 8.0, -2.0], [0.0, -10.0, -12.0, -8.0]]], [[[10.0, -6.0, 8.0, -12.0], [2.0, 
-0.0, -8.0, -2.0], [-8.0, -14.0, 2.0, -2.0]], [[-12.0, -6.0, 0.0, -4.0], [-2.0, 0.0, 2.0, -12.0], [-4.0, 8.0, -12.0, 
--2.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank0_offset0(self):
-      arg0=-2.0
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([1.0, -7.0, 5.0])+(1.-msk_arg0)*numpy.array([0.0, -5.0, 0.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(6.0)+(1-msk_arg1)*(2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[-4.0, 0.0, -2.0, 2.0, -4.0], [-3.0, -4.0, -5.0, -1.0, 0.0], [0.0, -2.0, -3.0, -4.0, 4.0], 
+[-1.0, -2.0, -7.0, -7.0, 7.0]], [[6.0, -5.0, 4.0, -5.0, 4.0], [7.0, 3.0, -2.0, -3.0, 7.0], [-6.0, 0.0, -4.0, -3.0, -7.0], [0.0, 
+3.0, -4.0, -2.0, -1.0]], [[0.0, -5.0, 5.0, 5.0, 2.0], [-6.0, 2.0, 7.0, 4.0, -2.0], [4.0, 1.0, -7.0, 0.0, -7.0], [6.0, 5.0, 0.0, 
+-2.0, -5.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, -1.0, -7.0, 0.0, -5.0], [-5.0, -6.0, 6.0, -3.0, 0.0], [4.0, -4.0, -1.0, 6.0, 
+0.0], [7.0, 5.0, -2.0, 6.0, 4.0]], [[-4.0, -3.0, -2.0, -4.0, -5.0], [-7.0, -4.0, -2.0, 5.0, -1.0], [0.0, -5.0, -7.0, -4.0, 
+-1.0], [2.0, 1.0, -1.0, 7.0, -4.0]], [[7.0, 5.0, 0.0, -4.0, -2.0], [-1.0, -3.0, 6.0, 2.0, 0.0], [0.0, 0.0, 4.0, 0.0, 0.0], 
+[0.0, 5.0, -5.0, -2.0, -5.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-12.0)+(1.-msk_ref)*numpy.array(-4.0)
+      ref=msk_ref*numpy.array([[-46.0, 10.0, -5.0, 62.0, -22.0], [-82.0, -15.0, 44.0, 40.0, -59.0], [62.0, 3.0, -10.0, 17.0, 
+18.0], [29.0, 2.0, 21.0, -3.0, -11.0]])+(1.-msk_ref)*numpy.array([[20.0, 15.0, 10.0, 20.0, 25.0], [35.0, 20.0, 10.0, -25.0, 
+5.0], [0.0, 25.0, 35.0, 20.0, 5.0], [-10.0, -5.0, 5.0, -35.0, 20.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank1_offset0(self):
-      arg0=4.0
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, -7.0, 4.0], [-4.0, 4.0, -1.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0, -6.0], [3.0, 6.0, 
+7.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([3.0, -2.0])+(1.-msk_arg1)*numpy.array([-4.0, 1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[-4.0, -2.0, -2.0, 0.0, -6.0], [6.0, 6.0, 2.0, -3.0, -1.0], [-1.0, 0.0, 2.0, -6.0, -4.0], 
+[-1.0, 0.0, -1.0, -3.0, -3.0]], [[-7.0, -1.0, 2.0, -6.0, 4.0], [-3.0, 1.0, 4.0, 3.0, 2.0], [7.0, 3.0, 7.0, 5.0, 1.0], [-6.0, 
+0.0, 5.0, 5.0, -4.0]], [[0.0, -3.0, 2.0, 5.0, 4.0], [-7.0, 0.0, 7.0, 6.0, 4.0], [-1.0, 6.0, -3.0, -4.0, 7.0], [5.0, -3.0, -6.0, 
+-2.0, 6.0]]], [[[-4.0, 7.0, -1.0, -3.0, -3.0], [6.0, 2.0, -7.0, -6.0, -6.0], [1.0, -7.0, -2.0, 0.0, 3.0], [-2.0, 5.0, 6.0, 3.0, 
+6.0]], [[3.0, -2.0, 0.0, -2.0, -1.0], [6.0, 7.0, 5.0, 1.0, -7.0], [0.0, -4.0, -1.0, 6.0, -2.0], [2.0, 2.0, -6.0, -1.0, -7.0]], 
+[[4.0, -4.0, -3.0, 3.0, -6.0], [4.0, -7.0, -2.0, -3.0, 4.0], [-1.0, -4.0, -6.0, 1.0, -1.0], [3.0, -5.0, -3.0, 4.0, 
+4.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -4.0, -1.0, -1.0, -1.0], [-6.0, -4.0, -5.0, -6.0, 0.0], [4.0, -3.0, 2.0, 0.0, 
+-3.0], [-5.0, 2.0, -1.0, -4.0, -4.0]], [[-1.0, 0.0, 6.0, 6.0, -2.0], [-4.0, 7.0, 2.0, 7.0, 0.0], [3.0, 0.0, -2.0, 0.0, 4.0], 
+[-3.0, 1.0, 1.0, -6.0, 7.0]], [[3.0, 1.0, 0.0, 5.0, 4.0], [-4.0, 4.0, 3.0, -3.0, 2.0], [3.0, 6.0, -2.0, 6.0, -1.0], [-6.0, 4.0, 
+0.0, 6.0, -3.0]]], [[[0.0, -2.0, 7.0, -6.0, -4.0], [4.0, -6.0, -1.0, -6.0, 0.0], [7.0, 1.0, 0.0, -7.0, 7.0], [-4.0, 7.0, -3.0, 
+-5.0, 6.0]], [[5.0, -6.0, -3.0, 1.0, 3.0], [2.0, 2.0, -5.0, -3.0, -7.0], [-2.0, 6.0, 2.0, 6.0, -5.0], [-1.0, -4.0, 6.0, -4.0, 
+-7.0]], [[6.0, 1.0, -4.0, -4.0, 6.0], [-1.0, 7.0, 6.0, 1.0, 0.0], [0.0, -4.0, -2.0, 5.0, -5.0], [0.0, 0.0, 7.0, 2.0, -5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([12.0, -8.0])+(1.-msk_ref)*numpy.array([-16.0, 4.0])
+      ref=msk_ref*numpy.array([[97.0, -25.0, 13.0, 63.0, 38.0], [-47.0, -16.0, 38.0, 52.0, 0.0], [-50.0, 19.0, -63.0, 8.0, 
+26.0], [81.0, -19.0, -98.0, -45.0, 14.0]])+(1.-msk_ref)*numpy.array([[53.0, -41.0, -19.0, -64.0, 22.0], [37.0, 26.0, -7.0, 
+-4.0, -54.0], [-6.0, -25.0, 8.0, 14.0, -34.0], [15.0, -26.0, 77.0, -67.0, -34.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank2_offset0(self):
-      arg0=-7.0
+   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(2.0)+(1-msk_arg0)*(3.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[7.0, 6.0, -6.0, 3.0, 5.0], [6.0, -7.0, -4.0, -6.0, 6.0], [-2.0, 5.0, -7.0, -5.0, 3.0], [3.0, 
-0.0, 1.0, 5.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-6.0, -6.0, 3.0, 2.0, -1.0], [-4.0, -6.0, -1.0, 0.0, 6.0], [-7.0, 6.0, -6.0, 
-7.0, 0.0], [4.0, -6.0, 5.0, 1.0, 4.0]])
+      arg1=msk_arg1*numpy.array([[[4.0, -4.0], [-2.0, -4.0]], [[2.0, 6.0], [-6.0, -2.0]], [[-7.0, 1.0], [3.0, -3.0]], [[-7.0, 
+-3.0], [-5.0, -5.0]], [[-4.0, -4.0], [-7.0, 1.0]], [[-6.0, -7.0], [0.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, 1.0], [4.0, 
+4.0]], [[0.0, 3.0], [5.0, -3.0]], [[1.0, -2.0], [-5.0, 0.0]], [[-2.0, 1.0], [4.0, -3.0]], [[3.0, -4.0], [0.0, -6.0]], [[-1.0, 
+3.0], [-4.0, 3.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-49.0, -42.0, 42.0, -21.0, -35.0], [-42.0, 49.0, 28.0, 42.0, -42.0], [14.0, -35.0, 49.0, 35.0, 
--21.0], [-21.0, -0.0, -7.0, -35.0, -35.0]])+(1.-msk_ref)*numpy.array([[42.0, 42.0, -21.0, -14.0, 7.0], [28.0, 42.0, 7.0, -0.0, 
--42.0], [49.0, -42.0, 42.0, -49.0, -0.0], [-28.0, 42.0, -35.0, -7.0, -28.0]])
+      ref=msk_ref*numpy.array([[[8.0, -8.0], [-4.0, -8.0]], [[4.0, 12.0], [-12.0, -4.0]], [[-14.0, 2.0], [6.0, -6.0]], [[-14.0, 
+-6.0], [-10.0, -10.0]], [[-8.0, -8.0], [-14.0, 2.0]], [[-12.0, -14.0], [0.0, -14.0]]])+(1.-msk_ref)*numpy.array([[[18.0, 3.0], 
+[12.0, 12.0]], [[0.0, 9.0], [15.0, -9.0]], [[3.0, -6.0], [-15.0, 0.0]], [[-6.0, 3.0], [12.0, -9.0]], [[9.0, -12.0], [0.0, 
+-18.0]], [[-3.0, 9.0], [-12.0, 9.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank3_offset0(self):
-      arg0=1.0
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([4.0, 3.0, 2.0])+(1.-msk_arg0)*numpy.array([5.0, 0.0, 0.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -4.0], [1.0, 2.0]], [[1.0, -6.0], [-6.0, -7.0]], [[-5.0, 5.0], [0.0, -6.0]], [[-5.0, 
--2.0], [-7.0, 7.0]], [[0.0, 6.0], [2.0, -6.0]], [[6.0, -5.0], [-3.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, -1.0], [-1.0, 
--7.0]], [[-6.0, 1.0], [6.0, 0.0]], [[-3.0, -7.0], [-4.0, -7.0]], [[-5.0, -4.0], [6.0, -2.0]], [[-3.0, -3.0], [-7.0, 0.0]], 
-[[4.0, 5.0], [0.0, 4.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*numpy.array([[[[0.0, -5.0], [7.0, 3.0]], [[-3.0, 0.0], [-3.0, 6.0]], [[4.0, -2.0], [2.0, 5.0]], [[0.0, 
+-7.0], [-1.0, 2.0]], [[3.0, 0.0], [-3.0, 0.0]], [[6.0, -7.0], [7.0, 0.0]]], [[[-3.0, 6.0], [2.0, -4.0]], [[3.0, 6.0], [0.0, 
+3.0]], [[-4.0, -5.0], [7.0, 6.0]], [[-1.0, -5.0], [6.0, -7.0]], [[-2.0, 1.0], [2.0, -4.0]], [[7.0, 1.0], [7.0, -4.0]]], 
+[[[-3.0, 5.0], [2.0, 0.0]], [[-3.0, 0.0], [4.0, 3.0]], [[-4.0, -6.0], [-2.0, -5.0]], [[-7.0, -4.0], [-2.0, -1.0]], [[4.0, 
+-1.0], [-2.0, -4.0]], [[-2.0, 4.0], [6.0, -6.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -6.0], [2.0, 2.0]], [[-2.0, 3.0], [-3.0, 
+5.0]], [[6.0, -4.0], [0.0, 2.0]], [[2.0, -3.0], [5.0, 5.0]], [[-7.0, 6.0], [5.0, 4.0]], [[0.0, -7.0], [1.0, -5.0]]], [[[1.0, 
+0.0], [-1.0, -1.0]], [[1.0, 0.0], [-1.0, 7.0]], [[-5.0, 0.0], [0.0, -5.0]], [[3.0, 6.0], [0.0, -1.0]], [[5.0, 4.0], [-1.0, 
+6.0]], [[-7.0, 3.0], [5.0, -6.0]]], [[[7.0, 5.0], [-3.0, -6.0]], [[-3.0, 0.0], [2.0, -2.0]], [[5.0, 6.0], [4.0, -4.0]], [[0.0, 
+4.0], [1.0, -5.0]], [[-2.0, -6.0], [-2.0, -6.0]], [[1.0, -3.0], [7.0, 4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -4.0], [1.0, 2.0]], [[1.0, -6.0], [-6.0, -7.0]], [[-5.0, 5.0], [0.0, -6.0]], [[-5.0, 
--2.0], [-7.0, 7.0]], [[0.0, 6.0], [2.0, -6.0]], [[6.0, -5.0], [-3.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, -1.0], [-1.0, 
--7.0]], [[-6.0, 1.0], [6.0, 0.0]], [[-3.0, -7.0], [-4.0, -7.0]], [[-5.0, -4.0], [6.0, -2.0]], [[-3.0, -3.0], [-7.0, 0.0]], 
-[[4.0, 5.0], [0.0, 4.0]]])
+      ref=msk_ref*numpy.array([[[-15.0, 8.0], [38.0, 0.0]], [[-9.0, 18.0], [-4.0, 39.0]], [[-4.0, -35.0], [25.0, 28.0]], 
+[[-17.0, -51.0], [10.0, -15.0]], [[14.0, 1.0], [-10.0, -20.0]], [[41.0, -17.0], [61.0, 
+-24.0]]])+(1.-msk_ref)*numpy.array([[[20.0, -30.0], [10.0, 10.0]], [[-10.0, 15.0], [-15.0, 25.0]], [[30.0, -20.0], [0.0, 
+10.0]], [[10.0, -15.0], [25.0, 25.0]], [[-35.0, 30.0], [25.0, 20.0]], [[0.0, -35.0], [5.0, -25.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_float_rank0_expandedData_rank4_offset0(self):
-      arg0=-5.0
+   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-2.0)
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[4.0, -6.0, 7.0, 4.0], [4.0, 2.0, 3.0, -2.0], [4.0, 7.0, 4.0, 0.0]], [[1.0, -4.0, 6.0, 
--6.0], [-7.0, -2.0, 3.0, -4.0], [6.0, -4.0, -6.0, 2.0]]], [[[-6.0, -7.0, 5.0, -3.0], [0.0, -1.0, -2.0, 3.0], [5.0, 5.0, 7.0, 
--6.0]], [[-1.0, 0.0, -2.0, -4.0], [-3.0, -1.0, 3.0, -3.0], [-1.0, 1.0, 1.0, 2.0]]], [[[2.0, -7.0, 0.0, 0.0], [1.0, 4.0, 3.0, 
--4.0], [-3.0, 7.0, 6.0, -4.0]], [[0.0, 6.0, -5.0, 0.0], [4.0, 3.0, 4.0, -1.0], [-7.0, -2.0, 3.0, 
--5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-3.0, -4.0, 3.0, -6.0], [-7.0, -2.0, -2.0, 3.0], [7.0, 1.0, 2.0, -7.0]], [[0.0, -2.0, 
--4.0, 6.0], [-5.0, 6.0, 1.0, 3.0], [3.0, 7.0, -2.0, -1.0]]], [[[4.0, -7.0, 6.0, 2.0], [-4.0, -7.0, 5.0, 1.0], [2.0, 5.0, 3.0, 
-0.0]], [[-5.0, 4.0, -1.0, 0.0], [3.0, -3.0, 0.0, 1.0], [1.0, 2.0, 1.0, -3.0]]], [[[-1.0, -5.0, 5.0, 0.0], [5.0, 7.0, -3.0, 
-5.0], [0.0, -4.0, -4.0, -7.0]], [[-4.0, 1.0, 3.0, -2.0], [-7.0, 3.0, 6.0, 0.0], [3.0, -5.0, -6.0, -4.0]]]])
+      arg1=msk_arg1*numpy.array([[[[7.0, -5.0, -3.0, -5.0], [-7.0, -5.0, 0.0, 2.0], [-1.0, -5.0, -4.0, -1.0]], [[0.0, -2.0, 
+0.0, 2.0], [-7.0, 1.0, -1.0, 0.0], [-6.0, 1.0, 2.0, 1.0]]], [[[7.0, 4.0, 5.0, -1.0], [-7.0, 6.0, 3.0, 2.0], [0.0, -1.0, 1.0, 
+0.0]], [[-5.0, 3.0, 1.0, -4.0], [1.0, 6.0, -6.0, 5.0], [6.0, -5.0, 3.0, 0.0]]], [[[-1.0, 0.0, 3.0, 6.0], [1.0, 7.0, 4.0, -2.0], 
+[2.0, -1.0, 4.0, 5.0]], [[5.0, -6.0, 0.0, 6.0], [3.0, 4.0, 0.0, 7.0], [4.0, 2.0, -1.0, 
+4.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 3.0, -5.0, 5.0], [-6.0, -1.0, 7.0, 2.0], [0.0, -6.0, 2.0, -5.0]], [[0.0, -3.0, 7.0, 
+-6.0], [1.0, 3.0, -2.0, -1.0], [6.0, 3.0, 0.0, -7.0]]], [[[-2.0, -2.0, 3.0, -1.0], [-2.0, 5.0, -3.0, -2.0], [0.0, -6.0, -4.0, 
+-3.0]], [[4.0, -3.0, 1.0, 6.0], [3.0, 4.0, 5.0, -3.0], [-3.0, -4.0, 4.0, 4.0]]], [[[0.0, -1.0, 2.0, 2.0], [1.0, -2.0, 6.0, 
+3.0], [0.0, 7.0, 1.0, 4.0]], [[7.0, 7.0, 2.0, -5.0], [-2.0, 3.0, -5.0, -2.0], [-7.0, 3.0, 2.0, 0.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-20.0, 30.0, -35.0, -20.0], [-20.0, -10.0, -15.0, 10.0], [-20.0, -35.0, -20.0, -0.0]], 
-[[-5.0, 20.0, -30.0, 30.0], [35.0, 10.0, -15.0, 20.0], [-30.0, 20.0, 30.0, -10.0]]], [[[30.0, 35.0, -25.0, 15.0], [-0.0, 5.0, 
-10.0, -15.0], [-25.0, -25.0, -35.0, 30.0]], [[5.0, -0.0, 10.0, 20.0], [15.0, 5.0, -15.0, 15.0], [5.0, -5.0, -5.0, -10.0]]], 
-[[[-10.0, 35.0, -0.0, -0.0], [-5.0, -20.0, -15.0, 20.0], [15.0, -35.0, -30.0, 20.0]], [[-0.0, -30.0, 25.0, -0.0], [-20.0, 
--15.0, -20.0, 5.0], [35.0, 10.0, -15.0, 25.0]]]])+(1.-msk_ref)*numpy.array([[[[15.0, 20.0, -15.0, 30.0], [35.0, 10.0, 10.0, 
--15.0], [-35.0, -5.0, -10.0, 35.0]], [[-0.0, 10.0, 20.0, -30.0], [25.0, -30.0, -5.0, -15.0], [-15.0, -35.0, 10.0, 5.0]]], 
-[[[-20.0, 35.0, -30.0, -10.0], [20.0, 35.0, -25.0, -5.0], [-10.0, -25.0, -15.0, -0.0]], [[25.0, -20.0, 5.0, -0.0], [-15.0, 
-15.0, -0.0, -5.0], [-5.0, -10.0, -5.0, 15.0]]], [[[5.0, 25.0, -25.0, -0.0], [-25.0, -35.0, 15.0, -25.0], [-0.0, 20.0, 20.0, 
-35.0]], [[20.0, -5.0, -15.0, 10.0], [35.0, -15.0, -30.0, -0.0], [-15.0, 25.0, 30.0, 20.0]]]])
+      ref=msk_ref*numpy.array([[[[0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0]], [[0.0, -0.0, 0.0, 
+0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 0.0, 0.0]], 
+[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]]], [[[-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 
+-0.0, 0.0, 0.0]], [[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-2.0, 
+-6.0, 10.0, -10.0], [12.0, 2.0, -14.0, -4.0], [-0.0, 12.0, -4.0, 10.0]], [[-0.0, 6.0, -14.0, 12.0], [-2.0, -6.0, 4.0, 2.0], 
+[-12.0, -6.0, -0.0, 14.0]]], [[[4.0, 4.0, -6.0, 2.0], [4.0, -10.0, 6.0, 4.0], [-0.0, 12.0, 8.0, 6.0]], [[-8.0, 6.0, -2.0, 
+-12.0], [-6.0, -8.0, -10.0, 6.0], [6.0, 8.0, -8.0, -8.0]]], [[[-0.0, 2.0, -4.0, -4.0], [-2.0, 4.0, -12.0, -6.0], [-0.0, -14.0, 
+-2.0, -8.0]], [[-14.0, -14.0, -4.0, 10.0], [4.0, -6.0, 10.0, 4.0], [14.0, -6.0, -4.0, -0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_float_rank0_offset0(self):
-      arg0=numpy.array(-1.0)
-      arg1=5.0
+   def test_generalTransposedTensorProduct_expandedData_rank1_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([4.0, 4.0])+(1.-msk_arg0)*numpy.array([2.0, -4.0])
+      arg1=0.0
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(-5.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, -0.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_array_rank0_offset0(self):
-      arg0=numpy.array(-1.0)
-      arg1=numpy.array(1.0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-3.0, 6.0])+(1.-msk_arg0)*numpy.array([-4.0, 0.0])
+      arg1=numpy.array(-3.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(-1.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([9.0, -18.0])+(1.-msk_ref)*numpy.array([12.0, -0.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank1_offset1(self):
-      arg0=numpy.array([-7.0, 1.0, 3.0])
-      arg1=numpy.array([-1.0, -3.0, 0.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, -6.0], [7.0, -2.0], [-5.0, -1.0]])+(1.-msk_arg0)*numpy.array([[6.0, 2.0], [-5.0, -4.0], 
+[4.0, 2.0]])
+      arg1=numpy.array([3.0, 6.0, 7.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array(4.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([22.0, -37.0])+(1.-msk_ref)*numpy.array([16.0, -4.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank2_offset2(self):
-      arg0=numpy.array([[5.0, 0.0, 0.0], [3.0, 0.0, -5.0]])
-      arg1=numpy.array([[-4.0, 0.0, 6.0], [4.0, 2.0, 3.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, -3.0], [5.0, -3.0], [-4.0, -5.0]], [[3.0, -3.0], [-3.0, -2.0], [0.0, 
+-3.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -3.0], [0.0, -1.0], [-4.0, -2.0]], [[-5.0, 5.0], [-4.0, 0.0], [4.0, -3.0]]])
+      arg1=numpy.array([[1.0, -3.0, 0.0], [6.0, -6.0, -3.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array(-23.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank3_offset3(self):
-      arg0=numpy.array([[[4.0, -6.0, 1.0], [-1.0, -5.0, 7.0], [-4.0, 0.0, 4.0], [-2.0, 4.0, 7.0]], [[5.0, 4.0, 5.0], [-6.0, 
--7.0, -5.0], [-7.0, 3.0, -3.0], [2.0, 0.0, 0.0]]])
-      arg1=numpy.array([[[-4.0, 1.0, -6.0], [-5.0, -3.0, -4.0], [3.0, -5.0, 0.0], [4.0, -5.0, 4.0]], [[5.0, 7.0, 6.0], [0.0, 
-2.0, -7.0], [0.0, 3.0, 7.0], [-1.0, 3.0, 5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array(42.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([23.0, 9.0])+(1.-msk_ref)*numpy.array([-22.0, 39.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank4_offset4(self):
-      arg0=numpy.array([[[[-7.0, -2.0], [1.0, -7.0], [3.0, -2.0]], [[4.0, -3.0], [1.0, -6.0], [-5.0, 2.0]]], [[[-1.0, 1.0], 
-[5.0, 5.0], [0.0, 4.0]], [[7.0, 4.0], [-6.0, 2.0], [2.0, 4.0]]], [[[7.0, 4.0], [0.0, 2.0], [-3.0, 5.0]], [[-1.0, 1.0], [-3.0, 
-1.0], [4.0, -4.0]]], [[[3.0, 0.0], [-3.0, 5.0], [-7.0, -1.0]], [[-1.0, 3.0], [0.0, -6.0], [1.0, -4.0]]]])
-      arg1=numpy.array([[[[-7.0, 4.0], [6.0, 3.0], [0.0, 6.0]], [[6.0, 3.0], [-5.0, 1.0], [-7.0, 6.0]]], [[[7.0, 5.0], [-6.0, 
-5.0], [4.0, 5.0]], [[6.0, 6.0], [5.0, 4.0], [5.0, -1.0]]], [[[4.0, -6.0], [5.0, 6.0], [6.0, -6.0]], [[-2.0, 7.0], [-4.0, 7.0], 
-[-2.0, 0.0]]], [[[0.0, 1.0], [-2.0, 4.0], [0.0, -2.0]], [[2.0, -2.0], [-2.0, -6.0], [7.0, 5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      ref=numpy.array(159.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 6.0], [0.0, -1.0], [6.0, -3.0]], [[4.0, 5.0], [6.0, -4.0], [4.0, 1.0]], [[6.0, 4.0], 
+[0.0, 6.0], [0.0, 0.0]], [[0.0, 1.0], [2.0, -4.0], [-2.0, 0.0]]], [[[-4.0, -3.0], [-3.0, 3.0], [-3.0, -4.0]], [[7.0, 3.0], 
+[1.0, 0.0], [-7.0, -5.0]], [[-1.0, 4.0], [-6.0, -5.0], [3.0, -2.0]], [[-7.0, -2.0], [0.0, -7.0], [7.0, 
+-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-2.0, 5.0], [-7.0, -4.0], [2.0, 0.0]], [[-4.0, 6.0], [-2.0, -6.0], [7.0, 0.0]], [[-1.0, 
+0.0], [7.0, -4.0], [-4.0, 0.0]], [[-5.0, -3.0], [-7.0, -5.0], [3.0, 3.0]]], [[[6.0, 5.0], [2.0, 7.0], [0.0, 7.0]], [[-3.0, 
+2.0], [0.0, 2.0], [-3.0, 2.0]], [[6.0, -5.0], [0.0, 4.0], [-6.0, -5.0]], [[6.0, 7.0], [2.0, 6.0], [1.0, 4.0]]]])
+      arg1=numpy.array([[[-5.0, 6.0, -7.0], [7.0, 4.0, 7.0], [-1.0, -5.0, 1.0], [1.0, 2.0, 4.0]], [[7.0, 0.0, 5.0], [-2.0, 6.0, 
+0.0], [5.0, -1.0, -7.0], [-4.0, 4.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-1.0, -68.0])+(1.-msk_ref)*numpy.array([28.0, 76.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_array_rank1_offset0(self):
-      arg0=numpy.array(-3.0)
-      arg1=numpy.array([-4.0, 6.0])
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([7.0, -5.0])+(1.-msk_arg0)*numpy.array([3.0, -7.0])
+      arg1=numpy.array([2.0, -4.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([12.0, -18.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[14.0, -28.0], [-10.0, 20.0]])+(1.-msk_ref)*numpy.array([[6.0, -12.0], [-14.0, 28.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank2_offset1(self):
-      arg0=numpy.array([-7.0, 6.0, 2.0])
-      arg1=numpy.array([[6.0, 1.0], [-1.0, -7.0], [3.0, -4.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[1.0, 6.0], [6.0, 6.0], [0.0, 4.0]])+(1.-msk_arg0)*numpy.array([[5.0, 6.0], [3.0, 3.0], [7.0, 
+-7.0]])
+      arg1=numpy.array([[7.0, -4.0], [7.0, -6.0], [1.0, 6.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([-42.0, -57.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[49.0, -40.0], [88.0, -36.0]])+(1.-msk_ref)*numpy.array([[63.0, 4.0], [56.0, -84.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank3_offset2(self):
-      arg0=numpy.array([[6.0, 0.0, -6.0], [2.0, -2.0, -6.0]])
-      arg1=numpy.array([[[-1.0, 4.0], [6.0, -1.0], [1.0, -3.0]], [[-5.0, 7.0], [0.0, -7.0], [-2.0, 4.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, 3.0], [2.0, 6.0], [-5.0, -6.0]], [[5.0, -1.0], [2.0, 7.0], [0.0, 
+-3.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 0.0], [-4.0, -6.0], [1.0, 0.0]], [[-5.0, -6.0], [4.0, 0.0], [-5.0, 1.0]]])
+      arg1=numpy.array([[[1.0, 5.0], [3.0, 2.0], [-4.0, -2.0]], [[7.0, -4.0], [-2.0, -7.0], [2.0, -5.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([-10.0, 46.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[58.0, -15.0], [18.0, 9.0]])+(1.-msk_ref)*numpy.array([[-69.0, 7.0], [-58.0, 7.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank4_offset3(self):
-      arg0=numpy.array([[[1.0, -2.0, 0.0], [7.0, 7.0, -6.0], [-7.0, -1.0, 0.0], [-3.0, 0.0, -4.0]], [[-1.0, -5.0, 1.0], [6.0, 
-7.0, 5.0], [6.0, -1.0, -7.0], [5.0, 7.0, 3.0]]])
-      arg1=numpy.array([[[[1.0, -4.0], [2.0, -2.0], [-1.0, 4.0]], [[-5.0, -7.0], [-6.0, 4.0], [0.0, 1.0]], [[-4.0, -1.0], [0.0, 
-7.0], [5.0, 1.0]], [[-5.0, -5.0], [-6.0, 7.0], [-3.0, 6.0]]], [[[7.0, -1.0], [-2.0, 1.0], [3.0, -6.0]], [[6.0, -5.0], [2.0, 
-2.0], [1.0, 2.0]], [[-2.0, 7.0], [-7.0, -5.0], [7.0, -4.0]], [[7.0, -4.0], [-4.0, 2.0], [-2.0, -3.0]]]])
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 6.0], [5.0, 5.0], [0.0, 3.0]], [[1.0, 6.0], [-5.0, 0.0], [-5.0, -1.0]], [[-4.0, 0.0], 
+[0.0, 6.0], [7.0, 4.0]], [[-5.0, 4.0], [5.0, -7.0], [-6.0, -1.0]]], [[[1.0, 0.0], [-4.0, -6.0], [2.0, -6.0]], [[5.0, -2.0], 
+[3.0, -1.0], [-3.0, -2.0]], [[0.0, -3.0], [0.0, 2.0], [0.0, 0.0]], [[-2.0, 1.0], [1.0, -5.0], [-4.0, 
+-1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 3.0], [6.0, 1.0], [5.0, 2.0]], [[-5.0, 2.0], [-3.0, 7.0], [0.0, 0.0]], [[-7.0, 
+2.0], [-5.0, 0.0], [1.0, -2.0]], [[3.0, 2.0], [0.0, -6.0], [-3.0, -3.0]]], [[[-6.0, -5.0], [5.0, 0.0], [-1.0, 1.0]], [[-3.0, 
+-7.0], [6.0, -7.0], [0.0, -6.0]], [[5.0, 4.0], [-2.0, -5.0], [-4.0, 0.0]], [[0.0, 6.0], [1.0, 3.0], [0.0, -6.0]]]])
+      arg1=numpy.array([[[[0.0, -5.0], [-5.0, -5.0], [-4.0, 0.0]], [[0.0, 0.0], [4.0, -2.0], [-2.0, 6.0]], [[-7.0, -7.0], [7.0, 
+-2.0], [-3.0, 3.0]], [[1.0, 0.0], [3.0, 5.0], [-5.0, 3.0]]], [[[-3.0, 6.0], [-7.0, 3.0], [7.0, 6.0]], [[4.0, -5.0], [4.0, 
+-2.0], [0.0, 3.0]], [[-3.0, -6.0], [0.0, -7.0], [-4.0, 0.0]], [[-7.0, 7.0], [0.0, 1.0], [3.0, -6.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([-17.0, 8.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[85.0, -12.0], [-30.0, -135.0]])+(1.-msk_ref)*numpy.array([[-44.0, 20.0], [-100.0, 6.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_array_rank2_offset0(self):
-      arg0=numpy.array(1.0)
-      arg1=numpy.array([[7.0, 4.0, -6.0, -7.0, 6.0], [-1.0, 4.0, -3.0, -7.0, 1.0], [-5.0, -4.0, -4.0, 7.0, -4.0], [0.0, 5.0, 
-7.0, 0.0, -1.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([3.0, 7.0])+(1.-msk_arg0)*numpy.array([4.0, -2.0])
+      arg1=numpy.array([[-3.0, -3.0, 0.0, -5.0, -7.0], [5.0, -7.0, 3.0, -5.0, 3.0], [3.0, 5.0, 6.0, 5.0, -5.0], [3.0, -4.0, 
+-3.0, 7.0, 7.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[7.0, 4.0, -6.0, -7.0, 6.0], [-1.0, 4.0, -3.0, -7.0, 1.0], [-5.0, -4.0, -4.0, 7.0, -4.0], [0.0, 5.0, 
-7.0, 0.0, -1.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-9.0, -9.0, 0.0, -15.0, -21.0], [15.0, -21.0, 9.0, -15.0, 9.0], [9.0, 15.0, 18.0, 15.0, 
+-15.0], [9.0, -12.0, -9.0, 21.0, 21.0]], [[-21.0, -21.0, 0.0, -35.0, -49.0], [35.0, -49.0, 21.0, -35.0, 21.0], [21.0, 35.0, 
+42.0, 35.0, -35.0], [21.0, -28.0, -21.0, 49.0, 49.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, -12.0, 0.0, -20.0, -28.0], [20.0, 
+-28.0, 12.0, -20.0, 12.0], [12.0, 20.0, 24.0, 20.0, -20.0], [12.0, -16.0, -12.0, 28.0, 28.0]], [[6.0, 6.0, 0.0, 10.0, 14.0], 
+[-10.0, 14.0, -6.0, 10.0, -6.0], [-6.0, -10.0, -12.0, -10.0, 10.0], [-6.0, 8.0, 6.0, -14.0, -14.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank3_offset1(self):
-      arg0=numpy.array([2.0, 0.0, 4.0])
-      arg1=numpy.array([[[-7.0, 5.0, -6.0, -5.0, -2.0], [1.0, 1.0, 4.0, 0.0, 0.0], [-6.0, 1.0, 1.0, -7.0, 5.0], [0.0, 4.0, 7.0, 
-0.0, -5.0]], [[-3.0, -2.0, 5.0, 0.0, -5.0], [0.0, 1.0, 7.0, 7.0, 6.0], [-5.0, -5.0, -4.0, -6.0, -3.0], [4.0, 0.0, 7.0, -1.0, 
--4.0]], [[3.0, 0.0, -5.0, -6.0, -7.0], [5.0, 6.0, -4.0, 5.0, -7.0], [-6.0, -2.0, 4.0, 0.0, -4.0], [0.0, -7.0, 2.0, -2.0, 
--5.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -1.0], [-7.0, 6.0], [5.0, -4.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 3.0], [3.0, 3.0], 
+[4.0, -7.0]])
+      arg1=numpy.array([[[-1.0, -7.0, 0.0, -6.0, 2.0], [-1.0, -1.0, 5.0, 3.0, -7.0], [-4.0, 2.0, -7.0, -3.0, -6.0], [-4.0, 7.0, 
+-6.0, -5.0, -7.0]], [[-5.0, 0.0, 0.0, 6.0, -2.0], [-6.0, -4.0, -5.0, 0.0, 0.0], [7.0, -7.0, 1.0, 1.0, 2.0], [-7.0, 0.0, -1.0, 
+-4.0, -3.0]], [[-6.0, -2.0, -6.0, 0.0, 5.0], [6.0, -7.0, 0.0, 2.0, -7.0], [7.0, 4.0, -1.0, -4.0, -6.0], [-3.0, -7.0, -5.0, 3.0, 
+-4.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[-2.0, 10.0, -32.0, -34.0, -32.0], [22.0, 26.0, -8.0, 20.0, -28.0], [-36.0, -6.0, 18.0, -14.0, -6.0], 
-[0.0, -20.0, 22.0, -8.0, -30.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[2.0, -31.0, -30.0, -60.0, 45.0], [69.0, -10.0, 50.0, 19.0, -56.0], [-26.0, 75.0, -33.0, -36.0, 
+-62.0], [22.0, -14.0, -36.0, 28.0, -20.0]], [[-5.0, 15.0, 24.0, 42.0, -34.0], [-59.0, 5.0, -35.0, -11.0, 35.0], [18.0, -60.0, 
+17.0, 25.0, 42.0], [-26.0, 21.0, 20.0, -31.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, 20.0, -24.0, 42.0, 6.0], [10.0, -36.0, 
+-35.0, -4.0, 0.0], [65.0, -13.0, 27.0, -1.0, 6.0], [-17.0, -56.0, 1.0, 20.0, 3.0]], [[24.0, -7.0, 42.0, 0.0, -35.0], [-63.0, 
+34.0, 0.0, -5.0, 28.0], [-40.0, -43.0, -11.0, 22.0, 30.0], [-12.0, 70.0, 14.0, -48.0, -2.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank4_offset2(self):
-      arg0=numpy.array([[-3.0, 5.0, -7.0], [-1.0, -6.0, -1.0]])
-      arg1=numpy.array([[[[-4.0, 4.0, 3.0, -7.0, 0.0], [-1.0, -7.0, 0.0, 4.0, -1.0], [0.0, -6.0, 3.0, 3.0, 1.0], [-3.0, -5.0, 
--1.0, 3.0, -3.0]], [[-5.0, 6.0, 0.0, 5.0, 6.0], [0.0, 0.0, 3.0, 4.0, -3.0], [-7.0, 7.0, -7.0, -7.0, -3.0], [-3.0, 0.0, -1.0, 
--6.0, -4.0]], [[-7.0, 3.0, 1.0, -2.0, 5.0], [-2.0, -2.0, -2.0, -4.0, -7.0], [3.0, 4.0, 5.0, 4.0, -6.0], [5.0, 0.0, 6.0, 2.0, 
--1.0]]], [[[-3.0, 4.0, -2.0, 0.0, -1.0], [2.0, 0.0, -5.0, 7.0, -3.0], [2.0, -1.0, -1.0, 5.0, -6.0], [-7.0, 1.0, 2.0, -7.0, 
--6.0]], [[4.0, -2.0, 6.0, 7.0, -2.0], [0.0, 2.0, -2.0, -4.0, -2.0], [-3.0, 0.0, 0.0, -2.0, -3.0], [-7.0, -1.0, -1.0, 5.0, 
-0.0]], [[3.0, 7.0, -6.0, 4.0, 5.0], [-1.0, -7.0, -7.0, -4.0, 2.0], [5.0, 1.0, -3.0, -5.0, -3.0], [5.0, -1.0, 0.0, 1.0, -1.0]]]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[3.0, 5.0], [3.0, -6.0], [7.0, -5.0]], [[5.0, 6.0], [-6.0, 2.0], [7.0, 
+-3.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -5.0], [0.0, 7.0], [3.0, -1.0]], [[0.0, -6.0], [-4.0, 4.0], [-1.0, -3.0]]])
+      arg1=numpy.array([[[[2.0, -5.0, 3.0, 4.0, 0.0], [-1.0, 4.0, 4.0, 0.0, -3.0], [7.0, 6.0, 7.0, 3.0, 0.0], [0.0, 3.0, 0.0, 
+-4.0, -6.0]], [[-3.0, -5.0, 2.0, 4.0, -7.0], [-7.0, -7.0, -2.0, 5.0, 0.0], [-5.0, 0.0, 4.0, 3.0, -5.0], [1.0, 6.0, -1.0, 5.0, 
+-5.0]], [[-6.0, -2.0, -3.0, -6.0, -4.0], [-5.0, 4.0, 6.0, -2.0, 5.0], [0.0, -3.0, 7.0, -4.0, 0.0], [3.0, 3.0, 1.0, 7.0, 0.0]]], 
+[[[-7.0, -6.0, 6.0, 0.0, -2.0], [1.0, -5.0, -2.0, -4.0, -5.0], [3.0, -7.0, -6.0, -5.0, 5.0], [-3.0, -5.0, 3.0, 0.0, 6.0]], 
+[[3.0, 2.0, -2.0, -6.0, -1.0], [-5.0, -5.0, -1.0, 4.0, 0.0], [0.0, -2.0, 3.0, 5.0, 5.0], [-4.0, -4.0, 0.0, -2.0, 0.0]], [[-6.0, 
+0.0, -4.0, -7.0, 2.0], [0.0, 4.0, 0.0, 5.0, -7.0], [-3.0, 0.0, -7.0, -2.0, -5.0], [5.0, 7.0, 3.0, 5.0, 6.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[12.0, -2.0, -44.0, 14.0, 3.0], [16.0, 30.0, 53.0, 57.0, 50.0], [-45.0, 25.0, -75.0, -60.0, 51.0], [3.0, 
-21.0, -40.0, -77.0, 3.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-140.0, -86.0, 8.0, -31.0, -39.0], [-24.0, 52.0, 44.0, -8.0, -48.0], [0.0, -26.0, -15.0, 
+-79.0, -55.0], [68.0, 96.0, 40.0, 99.0, 39.0]], [[40.0, -17.0, 62.0, 35.0, 42.0], [58.0, -10.0, -12.0, -51.0, -49.0], [92.0, 
+-1.0, -33.0, 3.0, 85.0], [-62.0, -95.0, 10.0, -104.0, 18.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, -14.0, 3.0, 13.0, -10.0], 
+[5.0, 28.0, 22.0, -27.0, 22.0], [3.0, -1.0, 16.0, -30.0, -15.0], [20.0, 18.0, 0.0, 24.0, -6.0]], [[47.0, 36.0, -30.0, 11.0, 
+-43.0], [-65.0, -75.0, -32.0, 62.0, 61.0], [-79.0, 7.0, 55.0, 66.0, -30.0], [-9.0, 17.0, -35.0, 25.0, -59.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_array_rank3_offset0(self):
-      arg0=numpy.array(0.0)
-      arg1=numpy.array([[[-1.0, -1.0], [-1.0, 4.0]], [[-3.0, -5.0], [4.0, 5.0]], [[-1.0, -4.0], [0.0, -2.0]], [[-5.0, 3.0], 
-[2.0, -4.0]], [[-2.0, 0.0], [3.0, 0.0]], [[0.0, -4.0], [-5.0, 3.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-6.0, 7.0])+(1.-msk_arg0)*numpy.array([2.0, 5.0])
+      arg1=numpy.array([[[2.0, 0.0], [-3.0, 7.0]], [[-3.0, 1.0], [2.0, 3.0]], [[-4.0, 0.0], [3.0, -7.0]], [[-2.0, 0.0], [-3.0, 
+6.0]], [[-3.0, -2.0], [5.0, -5.0]], [[0.0, -3.0], [3.0, 0.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-0.0, -0.0], [-0.0, 0.0]], [[-0.0, -0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], 
-[0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [-0.0, 0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-12.0, 0.0], [18.0, -42.0]], [[18.0, -6.0], [-12.0, -18.0]], [[24.0, 0.0], [-18.0, 42.0]], 
+[[12.0, 0.0], [18.0, -36.0]], [[18.0, 12.0], [-30.0, 30.0]], [[0.0, 18.0], [-18.0, 0.0]]], [[[14.0, 0.0], [-21.0, 49.0]], 
+[[-21.0, 7.0], [14.0, 21.0]], [[-28.0, 0.0], [21.0, -49.0]], [[-14.0, 0.0], [-21.0, 42.0]], [[-21.0, -14.0], [35.0, -35.0]], 
+[[0.0, -21.0], [21.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 0.0], [-6.0, 14.0]], [[-6.0, 2.0], [4.0, 6.0]], [[-8.0, 0.0], 
+[6.0, -14.0]], [[-4.0, 0.0], [-6.0, 12.0]], [[-6.0, -4.0], [10.0, -10.0]], [[0.0, -6.0], [6.0, 0.0]]], [[[10.0, 0.0], [-15.0, 
+35.0]], [[-15.0, 5.0], [10.0, 15.0]], [[-20.0, 0.0], [15.0, -35.0]], [[-10.0, 0.0], [-15.0, 30.0]], [[-15.0, -10.0], [25.0, 
+-25.0]], [[0.0, -15.0], [15.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank4_offset1(self):
-      arg0=numpy.array([2.0, -4.0, 5.0])
-      arg1=numpy.array([[[[-7.0, 7.0], [2.0, 4.0]], [[4.0, -1.0], [3.0, 6.0]], [[-3.0, -3.0], [3.0, 6.0]], [[2.0, -4.0], [-1.0, 
-0.0]], [[-2.0, 7.0], [4.0, 6.0]], [[-4.0, 2.0], [4.0, -5.0]]], [[[5.0, 3.0], [0.0, 5.0]], [[-4.0, -5.0], [-2.0, -2.0]], [[-6.0, 
--7.0], [1.0, -5.0]], [[0.0, -3.0], [-6.0, -1.0]], [[-1.0, 5.0], [5.0, -5.0]], [[3.0, 4.0], [-3.0, -2.0]]], [[[-6.0, 6.0], [6.0, 
--3.0]], [[-2.0, -2.0], [-3.0, 0.0]], [[4.0, 7.0], [-2.0, 5.0]], [[-2.0, 3.0], [0.0, 1.0]], [[-1.0, 0.0], [6.0, 6.0]], [[2.0, 
--3.0], [-5.0, -5.0]]]])
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, -1.0], [2.0, 6.0], [-6.0, -3.0]])+(1.-msk_arg0)*numpy.array([[-6.0, -7.0], [6.0, -1.0], 
+[-3.0, -1.0]])
+      arg1=numpy.array([[[[-4.0, -7.0], [4.0, -6.0]], [[-2.0, -4.0], [1.0, -6.0]], [[-7.0, -3.0], [-1.0, 3.0]], [[0.0, -7.0], 
+[-7.0, 1.0]], [[-1.0, 3.0], [-6.0, 0.0]], [[2.0, 5.0], [-6.0, -4.0]]], [[[-6.0, -2.0], [2.0, -1.0]], [[-4.0, 0.0], [-1.0, 
+3.0]], [[4.0, 1.0], [-6.0, 3.0]], [[-3.0, 6.0], [-1.0, 7.0]], [[0.0, -4.0], [7.0, 4.0]], [[-1.0, 4.0], [7.0, -6.0]]], [[[0.0, 
+2.0], [4.0, 4.0]], [[7.0, 4.0], [-7.0, -5.0]], [[4.0, -3.0], [2.0, 6.0]], [[-4.0, 6.0], [2.0, 7.0]], [[-2.0, -3.0], [-7.0, 
+1.0]], [[0.0, 0.0], [4.0, 4.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-64.0, 32.0], [34.0, -27.0]], [[14.0, 8.0], [-1.0, 20.0]], [[38.0, 57.0], [-8.0, 57.0]], [[-6.0, 
-19.0], [22.0, 9.0]], [[-5.0, -6.0], [18.0, 62.0]], [[-10.0, -27.0], [-5.0, -27.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_array_rank4_offset0(self):
-      arg0=numpy.array(6.0)
-      arg1=numpy.array([[[[-6.0, 6.0, 0.0, -7.0], [-3.0, 1.0, 0.0, 3.0], [3.0, -2.0, -2.0, -3.0]], [[0.0, 2.0, -7.0, -1.0], 
-[-1.0, -7.0, -3.0, 5.0], [2.0, 6.0, -1.0, 7.0]]], [[[-6.0, -5.0, 5.0, 1.0], [6.0, 7.0, 6.0, 4.0], [6.0, 0.0, 5.0, 0.0]], 
-[[-5.0, -3.0, -2.0, -5.0], [0.0, 4.0, -7.0, 0.0], [-7.0, -7.0, 2.0, -2.0]]], [[[-5.0, -3.0, 6.0, -3.0], [0.0, 2.0, -5.0, 3.0], 
-[0.0, -6.0, 3.0, 4.0]], [[1.0, 1.0, -4.0, 0.0], [6.0, -1.0, -6.0, -6.0], [-6.0, 1.0, 1.0, -5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-36.0, 36.0, 0.0, -42.0], [-18.0, 6.0, 0.0, 18.0], [18.0, -12.0, -12.0, -18.0]], [[0.0, 12.0, -42.0, 
--6.0], [-6.0, -42.0, -18.0, 30.0], [12.0, 36.0, -6.0, 42.0]]], [[[-36.0, -30.0, 30.0, 6.0], [36.0, 42.0, 36.0, 24.0], [36.0, 
-0.0, 30.0, 0.0]], [[-30.0, -18.0, -12.0, -30.0], [0.0, 24.0, -42.0, 0.0], [-42.0, -42.0, 12.0, -12.0]]], [[[-30.0, -18.0, 36.0, 
--18.0], [0.0, 12.0, -30.0, 18.0], [0.0, -36.0, 18.0, 24.0]], [[6.0, 6.0, -24.0, 0.0], [36.0, -6.0, -36.0, -36.0], [-36.0, 6.0, 
-6.0, -30.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-28.0, -44.0], [-4.0, -50.0]], [[-58.0, -40.0], [44.0, 12.0]], [[-44.0, 8.0], [-28.0, 
+-18.0]], [[18.0, -52.0], [-42.0, -24.0]], [[8.0, 22.0], [32.0, 2.0]], [[6.0, 28.0], [-34.0, -52.0]]], [[[-32.0, -11.0], [-4.0, 
+-12.0]], [[-43.0, -8.0], [14.0, 39.0]], [[19.0, 18.0], [-41.0, -3.0]], [[-6.0, 25.0], [-5.0, 20.0]], [[7.0, -18.0], [69.0, 
+21.0]], [[-8.0, 19.0], [36.0, -44.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 24.0], [-24.0, 18.0]], [[-33.0, 12.0], [9.0, 
+69.0]], [[54.0, 33.0], [-36.0, -18.0]], [[-6.0, 60.0], [30.0, 15.0]], [[12.0, -33.0], [99.0, 21.0]], [[-18.0, -6.0], [66.0, 
+-24.0]]], [[[34.0, 49.0], [-34.0, 39.0]], [[11.0, 24.0], [1.0, 44.0]], [[41.0, 23.0], [11.0, -30.0]], [[7.0, 37.0], [48.0, 
+-21.0]], [[9.0, -14.0], [42.0, -5.0]], [[-13.0, -39.0], [31.0, 30.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=-ref
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_constData_rank0_offset0(self):
-      arg0=numpy.array(4.0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([2.0, 1.0])+(1.-msk_arg0)*numpy.array([1.0, 6.0])
       arg1=Data(7.0,self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(28.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([14.0, 7.0])+(1.-msk_ref)*numpy.array([7.0, 42.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank1_offset1(self):
-      arg0=numpy.array([-5.0, -6.0, -5.0])
-      arg1=Data(numpy.array([1.0, -1.0, 7.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, 7.0], [-1.0, 7.0], [-7.0, 1.0]])+(1.-msk_arg0)*numpy.array([[-7.0, 4.0], [6.0, -1.0], 
+[4.0, 7.0]])
+      arg1=Data(numpy.array([-2.0, 2.0, 2.0]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(-34.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-22.0, 2.0])+(1.-msk_ref)*numpy.array([34.0, 4.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank2_offset2(self):
-      arg0=numpy.array([[6.0, 0.0, 1.0], [-6.0, 6.0, -5.0]])
-      arg1=Data(numpy.array([[7.0, 0.0, 4.0], [6.0, -1.0, 4.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -6.0], [7.0, 5.0], [5.0, 1.0]], [[0.0, 3.0], [4.0, -2.0], [1.0, 
+0.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 2.0], [5.0, -6.0], [-7.0, 4.0]], [[7.0, -2.0], [-1.0, 0.0], [-7.0, 7.0]]])
+      arg1=Data(numpy.array([[-5.0, -5.0, -2.0], [0.0, 0.0, 3.0]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-16.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-42.0, 3.0])+(1.-msk_ref)*numpy.array([-12.0, 33.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank3_offset3(self):
-      arg0=numpy.array([[[0.0, -7.0, 7.0], [-1.0, -3.0, -6.0], [0.0, -5.0, 2.0], [-5.0, 0.0, 5.0]], [[-2.0, -7.0, -4.0], [4.0, 
--1.0, 5.0], [2.0, 0.0, 5.0], [7.0, 7.0, 0.0]]])
-      arg1=Data(numpy.array([[[4.0, -2.0, 5.0], [-2.0, 7.0, 7.0], [7.0, -7.0, 4.0], [2.0, 0.0, 6.0]], [[-1.0, 1.0, 4.0], [7.0, 
-3.0, -1.0], [3.0, -1.0, -1.0], [-3.0, -7.0, -6.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, -5.0], [4.0, -1.0], [4.0, -5.0]], [[0.0, -7.0], [5.0, 0.0], [0.0, -5.0]], [[2.0, 2.0], 
+[-7.0, 7.0], [-4.0, -4.0]], [[0.0, 4.0], [0.0, 5.0], [0.0, -2.0]]], [[[1.0, -6.0], [-4.0, -1.0], [5.0, -7.0]], [[-7.0, 4.0], 
+[2.0, 0.0], [-3.0, 3.0]], [[0.0, 0.0], [-5.0, 4.0], [7.0, 6.0]], [[-4.0, -2.0], [4.0, -2.0], [5.0, 
+5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, -2.0], [-3.0, -2.0], [-4.0, 0.0]], [[-5.0, 5.0], [2.0, -4.0], [3.0, -7.0]], [[3.0, 
+5.0], [-5.0, -2.0], [-5.0, -2.0]], [[-6.0, 3.0], [5.0, 5.0], [-2.0, -1.0]]], [[[-1.0, -1.0], [0.0, -4.0], [-3.0, 5.0]], [[-2.0, 
+1.0], [6.0, -7.0], [-2.0, 2.0]], [[2.0, 7.0], [0.0, 0.0], [-1.0, -3.0]], [[0.0, 0.0], [5.0, 1.0], [2.0, -4.0]]]])
+      arg1=Data(numpy.array([[[0.0, 2.0, -4.0], [7.0, -2.0, 4.0], [-7.0, 6.0, 2.0], [1.0, 3.0, -5.0]], [[-1.0, 4.0, 4.0], [4.0, 
+-5.0, -3.0], [2.0, -4.0, -3.0], [3.0, -2.0, -6.0]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(-19.0,self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank4_offset4(self):
-      arg0=numpy.array([[[[1.0, -7.0], [-1.0, 3.0], [6.0, -1.0]], [[-6.0, 4.0], [0.0, 3.0], [-2.0, 2.0]]], [[[-3.0, -2.0], 
-[-4.0, 6.0], [-3.0, 6.0]], [[0.0, 2.0], [-7.0, 0.0], [-7.0, 2.0]]], [[[2.0, 4.0], [7.0, 4.0], [1.0, 0.0]], [[6.0, 6.0], [-3.0, 
--7.0], [-4.0, 7.0]]], [[[6.0, 2.0], [-3.0, 0.0], [-3.0, -5.0]], [[-3.0, 0.0], [0.0, 7.0], [-4.0, -1.0]]]])
-      arg1=Data(numpy.array([[[[5.0, 3.0], [3.0, 1.0], [-2.0, 5.0]], [[-7.0, 0.0], [-5.0, -1.0], [7.0, 0.0]]], [[[3.0, -1.0], 
-[6.0, -1.0], [7.0, -2.0]], [[2.0, 5.0], [4.0, -6.0], [0.0, -5.0]]], [[[7.0, -1.0], [-3.0, 3.0], [-1.0, 7.0]], [[-2.0, -6.0], 
-[-7.0, 2.0], [2.0, 5.0]]], [[[-7.0, 0.0], [5.0, 1.0], [-6.0, 6.0]], [[-6.0, 0.0], [-7.0, 0.0], [-5.0, 
--1.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      ref=Data(-150.0,self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-159.0, -87.0])+(1.-msk_ref)*numpy.array([-117.0, 66.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_constData_rank1_offset0(self):
-      arg0=numpy.array(5.0)
-      arg1=Data(numpy.array([-5.0, -6.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([2.0, -4.0])+(1.-msk_arg0)*numpy.array([2.0, -3.0])
+      arg1=Data(numpy.array([2.0, 0.0]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-25.0, -30.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[4.0, 0.0], [-8.0, 0.0]])+(1.-msk_ref)*numpy.array([[4.0, 0.0], [-6.0, 0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank2_offset1(self):
-      arg0=numpy.array([-6.0, 7.0, 6.0])
-      arg1=Data(numpy.array([[6.0, -6.0], [-6.0, 6.0], [-4.0, -6.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[6.0, -2.0], [6.0, 0.0], [3.0, 4.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 4.0], [-3.0, -7.0], 
+[0.0, -6.0]])
+      arg1=Data(numpy.array([[-7.0, 6.0], [4.0, 6.0], [0.0, 0.0]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-102.0, 42.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-18.0, 72.0], [14.0, -12.0]])+(1.-msk_ref)*numpy.array([[2.0, -30.0], [-56.0, -18.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank3_offset2(self):
-      arg0=numpy.array([[7.0, -6.0, 6.0], [5.0, 0.0, -6.0]])
-      arg1=Data(numpy.array([[[-7.0, -1.0], [4.0, 4.0], [3.0, -2.0]], [[-7.0, 3.0], [-6.0, -1.0], [-6.0, 
-4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 0.0], [2.0, 7.0], [-7.0, -4.0]], [[0.0, 2.0], [6.0, 7.0], [0.0, 
+2.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -7.0], [-5.0, 0.0], [1.0, 4.0]], [[6.0, 7.0], [3.0, -1.0], [-7.0, -2.0]]])
+      arg1=Data(numpy.array([[[1.0, 2.0], [4.0, 2.0], [-3.0, -1.0]], [[5.0, 6.0], [-6.0, 7.0], [4.0, 0.0]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-54.0, -52.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-12.0, 43.0], [16.0, 79.0]])+(1.-msk_ref)*numpy.array([[-37.0, 50.0], [14.0, 17.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank4_offset3(self):
-      arg0=numpy.array([[[-3.0, 1.0, 3.0], [2.0, 5.0, -4.0], [7.0, -3.0, 2.0], [-3.0, -6.0, -4.0]], [[-5.0, 0.0, 4.0], [-6.0, 
-3.0, 1.0], [1.0, 0.0, -2.0], [-5.0, -4.0, 4.0]]])
-      arg1=Data(numpy.array([[[[-4.0, 3.0], [3.0, -6.0], [-4.0, 4.0]], [[-1.0, -4.0], [3.0, -2.0], [6.0, -3.0]], [[0.0, -1.0], 
-[7.0, 0.0], [-4.0, 0.0]], [[-2.0, -5.0], [3.0, -3.0], [-6.0, 2.0]]], [[[4.0, 0.0], [0.0, -4.0], [-3.0, 5.0]], [[-3.0, 0.0], 
-[6.0, -5.0], [-5.0, -2.0]], [[2.0, 2.0], [3.0, 0.0], [0.0, 3.0]], [[1.0, -7.0], [3.0, -3.0], [4.0, -1.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 7.0], [4.0, 2.0], [-1.0, 4.0]], [[-5.0, 0.0], [5.0, -3.0], [7.0, -4.0]], [[2.0, -7.0], 
+[-5.0, -2.0], [-4.0, -1.0]], [[-1.0, 2.0], [-5.0, 7.0], [2.0, -5.0]]], [[[-7.0, 0.0], [-7.0, -4.0], [-2.0, 5.0]], [[1.0, 1.0], 
+[-6.0, -4.0], [-3.0, 1.0]], [[2.0, -6.0], [0.0, -3.0], [-7.0, -2.0]], [[2.0, -1.0], [4.0, 2.0], [-6.0, 
+2.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 5.0], [-4.0, -6.0], [4.0, 2.0]], [[-5.0, -3.0], [-1.0, 1.0], [5.0, 5.0]], [[-7.0, 
+-1.0], [5.0, -7.0], [-7.0, 7.0]], [[6.0, -2.0], [-6.0, -5.0], [5.0, 7.0]]], [[[4.0, -1.0], [6.0, 0.0], [5.0, 7.0]], [[-4.0, 
+-7.0], [0.0, -1.0], [0.0, -1.0]], [[-1.0, 5.0], [0.0, 3.0], [7.0, 7.0]], [[6.0, -5.0], [-1.0, 7.0], [2.0, -3.0]]]])
+      arg1=Data(numpy.array([[[[5.0, 0.0], [5.0, -2.0], [3.0, 3.0]], [[5.0, 5.0], [4.0, 0.0], [-7.0, -3.0]], [[-3.0, -4.0], 
+[6.0, 3.0], [-4.0, -3.0]], [[-6.0, 4.0], [-5.0, -3.0], [7.0, 7.0]]], [[[7.0, 4.0], [3.0, 6.0], [1.0, 1.0]], [[1.0, 0.0], [-4.0, 
+-6.0], [1.0, -6.0]], [[-3.0, 6.0], [6.0, -2.0], [2.0, 3.0]], [[3.0, 2.0], [-6.0, -2.0], [3.0, 7.0]]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([-25.0, 51.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-118.0, -116.0], [2.0, -32.0]])+(1.-msk_ref)*numpy.array([[110.0, 221.0], [-79.0, 21.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_constData_rank2_offset0(self):
-      arg0=numpy.array(-3.0)
-      arg1=Data(numpy.array([[-6.0, 0.0, 2.0, -5.0, -6.0], [2.0, 2.0, 7.0, 4.0, 0.0], [-7.0, 4.0, 1.0, 6.0, -1.0], [7.0, 1.0, 
--5.0, -7.0, 2.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-3.0, 5.0])+(1.-msk_arg0)*numpy.array([6.0, 4.0])
+      arg1=Data(numpy.array([[-3.0, 6.0, 2.0, -7.0, -3.0], [-4.0, 2.0, -5.0, 5.0, 0.0], [3.0, -4.0, 4.0, 7.0, -3.0], [0.0, 2.0, 
+2.0, 7.0, -5.0]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[18.0, -0.0, -6.0, 15.0, 18.0], [-6.0, -6.0, -21.0, -12.0, -0.0], [21.0, -12.0, -3.0, -18.0, 3.0], 
-[-21.0, -3.0, 15.0, 21.0, -6.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[9.0, -18.0, -6.0, 21.0, 9.0], [12.0, -6.0, 15.0, -15.0, 0.0], [-9.0, 12.0, -12.0, -21.0, 9.0], 
+[0.0, -6.0, -6.0, -21.0, 15.0]], [[-15.0, 30.0, 10.0, -35.0, -15.0], [-20.0, 10.0, -25.0, 25.0, 0.0], [15.0, -20.0, 20.0, 35.0, 
+-15.0], [0.0, 10.0, 10.0, 35.0, -25.0]]])+(1.-msk_ref)*numpy.array([[[-18.0, 36.0, 12.0, -42.0, -18.0], [-24.0, 12.0, -30.0, 
+30.0, 0.0], [18.0, -24.0, 24.0, 42.0, -18.0], [0.0, 12.0, 12.0, 42.0, -30.0]], [[-12.0, 24.0, 8.0, -28.0, -12.0], [-16.0, 8.0, 
+-20.0, 20.0, 0.0], [12.0, -16.0, 16.0, 28.0, -12.0], [0.0, 8.0, 8.0, 28.0, -20.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank3_offset1(self):
-      arg0=numpy.array([2.0, 7.0, 1.0])
-      arg1=Data(numpy.array([[[-5.0, 3.0, -4.0, 1.0, 1.0], [7.0, -6.0, 2.0, 4.0, 2.0], [5.0, -1.0, 1.0, 2.0, 0.0], [6.0, 7.0, 
-3.0, -4.0, 5.0]], [[1.0, 0.0, -2.0, -6.0, -3.0], [0.0, 0.0, 1.0, -5.0, -7.0], [1.0, -2.0, -6.0, 6.0, 6.0], [-3.0, -4.0, 3.0, 
--6.0, -7.0]], [[-3.0, -1.0, -4.0, 7.0, 2.0], [0.0, 5.0, 2.0, -5.0, 6.0], [-4.0, 7.0, 0.0, 0.0, -6.0], [-6.0, 0.0, -2.0, 6.0, 
-3.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -4.0], [2.0, 3.0], [-3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 1.0], [0.0, -6.0], 
+[-7.0, 0.0]])
+      arg1=Data(numpy.array([[[1.0, 0.0, 0.0, 2.0, -1.0], [6.0, -3.0, 0.0, 3.0, -3.0], [-4.0, 3.0, -7.0, -4.0, -5.0], [0.0, 
+2.0, 5.0, -5.0, -7.0]], [[0.0, 4.0, 2.0, -1.0, 4.0], [-7.0, -5.0, 3.0, -6.0, 3.0], [7.0, -5.0, -5.0, -6.0, 4.0], [-2.0, -6.0, 
+-4.0, 2.0, 1.0]], [[-7.0, 6.0, -2.0, 7.0, -3.0], [4.0, -3.0, -3.0, 3.0, 7.0], [7.0, 0.0, 2.0, 6.0, 6.0], [-6.0, -6.0, 0.0, 
+-4.0, 1.0]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-6.0, 5.0, -26.0, -33.0, -17.0], [14.0, -7.0, 13.0, -32.0, -39.0], [13.0, -9.0, -40.0, 46.0, 
-36.0], [-15.0, -14.0, 25.0, -44.0, -36.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[24.0, -10.0, 10.0, -17.0, 14.0], [-8.0, -10.0, 15.0, -12.0, -24.0], [-19.0, -1.0, -37.0, 
+-42.0, -25.0], [14.0, 12.0, 7.0, 1.0, -22.0]], [[-4.0, 12.0, 6.0, -11.0, 16.0], [-45.0, -3.0, 9.0, -30.0, 21.0], [37.0, -27.0, 
+13.0, -2.0, 32.0], [-6.0, -26.0, -32.0, 26.0, 31.0]]])+(1.-msk_ref)*numpy.array([[[48.0, -42.0, 14.0, -51.0, 22.0], [-34.0, 
+24.0, 21.0, -24.0, -46.0], [-45.0, -3.0, -7.0, -38.0, -37.0], [42.0, 40.0, -5.0, 33.0, 0.0]], [[1.0, -24.0, -12.0, 8.0, -25.0], 
+[48.0, 27.0, -18.0, 39.0, -21.0], [-46.0, 33.0, 23.0, 32.0, -29.0], [12.0, 38.0, 29.0, -17.0, -13.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank4_offset2(self):
-      arg0=numpy.array([[-6.0, -3.0, -4.0], [-7.0, -1.0, 2.0]])
-      arg1=Data(numpy.array([[[[-5.0, 4.0, -1.0, 1.0, -6.0], [1.0, 0.0, -4.0, -2.0, 3.0], [-5.0, -3.0, 7.0, 4.0, 0.0], [-2.0, 
-4.0, -2.0, 1.0, 6.0]], [[-1.0, -4.0, 7.0, 5.0, -4.0], [-4.0, 7.0, 2.0, 5.0, -3.0], [5.0, -5.0, -6.0, 1.0, 3.0], [0.0, -5.0, 
-0.0, 2.0, 1.0]], [[-6.0, 1.0, 0.0, 6.0, 0.0], [-6.0, 0.0, 2.0, 0.0, 6.0], [2.0, -3.0, 4.0, -4.0, 2.0], [0.0, 3.0, -7.0, 5.0, 
-0.0]]], [[[-7.0, -7.0, -2.0, 3.0, 5.0], [-1.0, 0.0, -1.0, 7.0, -6.0], [-1.0, 3.0, 5.0, 3.0, -1.0], [2.0, 7.0, -4.0, 6.0, 7.0]], 
-[[-1.0, 7.0, 5.0, -7.0, 7.0], [0.0, -1.0, 2.0, -4.0, 6.0], [-4.0, -4.0, 4.0, -7.0, -5.0], [5.0, -2.0, -5.0, -3.0, 0.0]], 
-[[-2.0, 4.0, 7.0, -6.0, 3.0], [7.0, 2.0, -2.0, 4.0, -1.0], [-3.0, 5.0, 1.0, 4.0, -6.0], [3.0, -3.0, 7.0, 3.0, 
-4.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, -2.0], [5.0, 3.0], [4.0, 4.0]], [[0.0, -4.0], [-6.0, 5.0], [-2.0, 
+3.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 1.0], [0.0, 5.0], [7.0, -3.0]], [[-3.0, -4.0], [6.0, 5.0], [0.0, 1.0]]])
+      arg1=Data(numpy.array([[[[-5.0, 2.0, 2.0, 6.0, 5.0], [5.0, -4.0, 5.0, -7.0, 6.0], [5.0, -5.0, 5.0, -1.0, 2.0], [1.0, 4.0, 
+6.0, 4.0, -5.0]], [[-2.0, -2.0, -1.0, 4.0, 0.0], [-4.0, 6.0, 2.0, 7.0, -4.0], [4.0, 6.0, 1.0, -3.0, 3.0], [2.0, -4.0, 3.0, 
+-6.0, -5.0]], [[5.0, -5.0, -6.0, 0.0, 0.0], [-2.0, -1.0, 7.0, 7.0, 7.0], [-4.0, 6.0, 1.0, -3.0, -5.0], [-1.0, -6.0, -5.0, 1.0, 
+2.0]]], [[[-7.0, 5.0, -3.0, 6.0, 7.0], [5.0, -1.0, -7.0, 0.0, 1.0], [2.0, -5.0, 3.0, 1.0, -1.0], [5.0, 2.0, 3.0, -5.0, 7.0]], 
+[[-3.0, -5.0, 2.0, -4.0, -6.0], [0.0, 5.0, 4.0, 3.0, 4.0], [-2.0, 6.0, -6.0, -5.0, -3.0], [2.0, 5.0, 4.0, 5.0, -1.0]], [[4.0, 
+3.0, -2.0, -3.0, 0.0], [6.0, -7.0, 0.0, 1.0, 4.0], [-4.0, 6.0, 6.0, 2.0, -7.0], [-5.0, -2.0, -1.0, 2.0, 
+-6.0]]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[103.0, 34.0, 8.0, -71.0, 12.0], [51.0, -16.0, 11.0, -40.0, 1.0], [12.0, 38.0, -77.0, -17.0, 
--17.0], [-1.0, -74.0, 87.0, -65.0, -80.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[25.0, -8.0, -39.0, 44.0, 31.0], [-45.0, 14.0, 9.0, 50.0, -30.0], [19.0, 11.0, 28.0, 0.0, 
+25.0], [3.0, -74.0, -33.0, -64.0, 6.0]], [[49.0, -66.0, -15.0, -53.0, -68.0], [-32.0, 30.0, 72.0, 81.0, 32.0], [-44.0, 120.0, 
+-27.0, -42.0, -47.0], [-25.0, -33.0, -18.0, 29.0, -48.0]]])+(1.-msk_ref)*numpy.array([[[23.0, -74.0, -15.0, -24.0, -42.0], 
+[-14.0, 14.0, 109.0, 46.0, 88.0], [-31.0, 78.0, -23.0, -57.0, -44.0], [-7.0, -6.0, -2.0, 64.0, -28.0]], [[-13.0, -35.0, 35.0, 
+-21.0, -53.0], [-23.0, 51.0, 42.0, 23.0, -15.0], [15.0, 63.0, -29.0, -34.0, 14.0], [-1.0, 17.0, 43.0, 18.0, -75.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_constData_rank3_offset0(self):
-      arg0=numpy.array(1.0)
-      arg1=Data(numpy.array([[[-2.0, 0.0], [-4.0, -7.0]], [[-6.0, -2.0], [3.0, 4.0]], [[0.0, 4.0], [-6.0, 0.0]], [[0.0, -6.0], 
-[5.0, -1.0]], [[-4.0, 1.0], [-7.0, 5.0]], [[2.0, -5.0], [4.0, -4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([5.0, -6.0])+(1.-msk_arg0)*numpy.array([-7.0, 5.0])
+      arg1=Data(numpy.array([[[-1.0, 6.0], [-4.0, 7.0]], [[6.0, -6.0], [-6.0, 4.0]], [[5.0, 3.0], [3.0, 1.0]], [[-4.0, 4.0], 
+[-3.0, -1.0]], [[-2.0, 2.0], [2.0, 6.0]], [[7.0, -1.0], [-1.0, -3.0]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-2.0, 0.0], [-4.0, -7.0]], [[-6.0, -2.0], [3.0, 4.0]], [[0.0, 4.0], [-6.0, 0.0]], [[0.0, -6.0], 
-[5.0, -1.0]], [[-4.0, 1.0], [-7.0, 5.0]], [[2.0, -5.0], [4.0, -4.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-5.0, 30.0], [-20.0, 35.0]], [[30.0, -30.0], [-30.0, 20.0]], [[25.0, 15.0], [15.0, 5.0]], 
+[[-20.0, 20.0], [-15.0, -5.0]], [[-10.0, 10.0], [10.0, 30.0]], [[35.0, -5.0], [-5.0, -15.0]]], [[[6.0, -36.0], [24.0, -42.0]], 
+[[-36.0, 36.0], [36.0, -24.0]], [[-30.0, -18.0], [-18.0, -6.0]], [[24.0, -24.0], [18.0, 6.0]], [[12.0, -12.0], [-12.0, -36.0]], 
+[[-42.0, 6.0], [6.0, 18.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -42.0], [28.0, -49.0]], [[-42.0, 42.0], [42.0, -28.0]], 
+[[-35.0, -21.0], [-21.0, -7.0]], [[28.0, -28.0], [21.0, 7.0]], [[14.0, -14.0], [-14.0, -42.0]], [[-49.0, 7.0], [7.0, 21.0]]], 
+[[[-5.0, 30.0], [-20.0, 35.0]], [[30.0, -30.0], [-30.0, 20.0]], [[25.0, 15.0], [15.0, 5.0]], [[-20.0, 20.0], [-15.0, -5.0]], 
+[[-10.0, 10.0], [10.0, 30.0]], [[35.0, -5.0], [-5.0, -15.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank4_offset1(self):
-      arg0=numpy.array([-5.0, -6.0, 2.0])
-      arg1=Data(numpy.array([[[[0.0, 4.0], [0.0, 7.0]], [[7.0, -6.0], [-1.0, -4.0]], [[-3.0, -6.0], [-1.0, 5.0]], [[7.0, 4.0], 
-[-6.0, 0.0]], [[3.0, -3.0], [-4.0, -3.0]], [[0.0, -6.0], [1.0, 6.0]]], [[[-1.0, 0.0], [0.0, -4.0]], [[7.0, -4.0], [1.0, 2.0]], 
-[[-1.0, 0.0], [-6.0, -5.0]], [[1.0, -1.0], [2.0, -4.0]], [[-3.0, -3.0], [3.0, -3.0]], [[-1.0, -5.0], [-1.0, -2.0]]], [[[-6.0, 
-1.0], [-7.0, 6.0]], [[-7.0, -5.0], [7.0, 4.0]], [[-4.0, -5.0], [-6.0, 0.0]], [[4.0, 2.0], [-6.0, -6.0]], [[3.0, 7.0], [-4.0, 
-1.0]], [[-2.0, 0.0], [6.0, 7.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, -3.0], [2.0, 0.0], [-5.0, 2.0]])+(1.-msk_arg0)*numpy.array([[1.0, -2.0], [-4.0, 7.0], 
+[1.0, 0.0]])
+      arg1=Data(numpy.array([[[[1.0, 3.0], [-3.0, 0.0]], [[0.0, 6.0], [0.0, 0.0]], [[-2.0, -3.0], [-5.0, -3.0]], [[-1.0, 7.0], 
+[1.0, -5.0]], [[-6.0, -3.0], [-1.0, 0.0]], [[-2.0, 0.0], [-3.0, 6.0]]], [[[0.0, -6.0], [-7.0, 4.0]], [[2.0, 1.0], [-1.0, 
+-7.0]], [[1.0, -2.0], [-5.0, 5.0]], [[2.0, 0.0], [-1.0, 1.0]], [[7.0, 3.0], [3.0, 4.0]], [[-4.0, -2.0], [-2.0, -7.0]]], [[[6.0, 
+1.0], [-7.0, -2.0]], [[6.0, 0.0], [-7.0, -7.0]], [[6.0, -3.0], [-6.0, -3.0]], [[-4.0, -2.0], [6.0, -2.0]], [[7.0, -4.0], [7.0, 
+-7.0]], [[7.0, 0.0], [6.0, 3.0]]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-6.0, -18.0], [-14.0, 1.0]], [[-91.0, 44.0], [13.0, 16.0]], [[13.0, 20.0], [29.0, 5.0]], [[-33.0, 
--10.0], [6.0, 12.0]], [[9.0, 47.0], [-6.0, 35.0]], [[2.0, 60.0], [13.0, -4.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-36.0, -35.0], [39.0, 18.0]], [[-26.0, -34.0], [33.0, 21.0]], [[-16.0, 29.0], [50.0, 43.0]], 
+[[30.0, -32.0], [-38.0, 42.0]], [[15.0, 44.0], [-23.0, 43.0]], [[-31.0, -4.0], [-16.0, -65.0]]], [[[9.0, -7.0], [-5.0, -4.0]], 
+[[12.0, -18.0], [-14.0, -14.0]], [[18.0, 3.0], [3.0, 3.0]], [[-5.0, -25.0], [9.0, 11.0]], [[32.0, 1.0], [17.0, -14.0]], [[20.0, 
+0.0], [21.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, 28.0], [18.0, -18.0]], [[-2.0, 2.0], [-3.0, 21.0]], [[0.0, 2.0], 
+[9.0, -26.0]], [[-13.0, 5.0], [11.0, -11.0]], [[-27.0, -19.0], [-6.0, -23.0]], [[21.0, 8.0], [11.0, 37.0]]], [[[-2.0, -48.0], 
+[-43.0, 28.0]], [[14.0, -5.0], [-7.0, -49.0]], [[11.0, -8.0], [-25.0, 41.0]], [[16.0, -14.0], [-9.0, 17.0]], [[61.0, 27.0], 
+[23.0, 28.0]], [[-24.0, -14.0], [-8.0, -61.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_constData_rank4_offset0(self):
-      arg0=numpy.array(-3.0)
-      arg1=Data(numpy.array([[[[1.0, 0.0, -6.0, 0.0], [4.0, -2.0, -5.0, -5.0], [3.0, 7.0, 5.0, -4.0]], [[4.0, 0.0, 4.0, 4.0], 
-[6.0, 0.0, -1.0, 7.0], [7.0, -2.0, -5.0, -1.0]]], [[[-4.0, 0.0, 2.0, 6.0], [0.0, 0.0, 3.0, 0.0], [-2.0, 5.0, -3.0, 4.0]], 
-[[-5.0, -1.0, -7.0, 0.0], [1.0, 4.0, 4.0, 3.0], [0.0, -5.0, -5.0, -7.0]]], [[[-1.0, 5.0, -5.0, 0.0], [5.0, -3.0, -4.0, -3.0], 
-[-4.0, 1.0, 0.0, -5.0]], [[3.0, -6.0, 1.0, 4.0], [-6.0, -4.0, 3.0, -7.0], [0.0, -3.0, -4.0, -1.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-3.0, -0.0, 18.0, -0.0], [-12.0, 6.0, 15.0, 15.0], [-9.0, -21.0, -15.0, 12.0]], [[-12.0, -0.0, 
--12.0, -12.0], [-18.0, -0.0, 3.0, -21.0], [-21.0, 6.0, 15.0, 3.0]]], [[[12.0, -0.0, -6.0, -18.0], [-0.0, -0.0, -9.0, -0.0], 
-[6.0, -15.0, 9.0, -12.0]], [[15.0, 3.0, 21.0, -0.0], [-3.0, -12.0, -12.0, -9.0], [-0.0, 15.0, 15.0, 21.0]]], [[[3.0, -15.0, 
-15.0, -0.0], [-15.0, 9.0, 12.0, 9.0], [12.0, -3.0, -0.0, 15.0]], [[-9.0, 18.0, -3.0, -12.0], [18.0, 12.0, -9.0, 21.0], [-0.0, 
-9.0, 12.0, 3.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank0_offset0(self):
-      arg0=numpy.array(-4.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-5.0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([3.0, -5.0])+(1.-msk_arg0)*numpy.array([-2.0, -2.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(6.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-0.0)+(1.-msk_ref)*numpy.array(20.0)
+      ref=msk_ref*numpy.array([0.0, -0.0])+(1.-msk_ref)*numpy.array([-12.0, -12.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank1_offset1(self):
-      arg0=numpy.array([7.0, 4.0, -1.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-5.0, 4.0], [0.0, -5.0], [-7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 6.0], [-4.0, 3.0], 
+[-6.0, 2.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, 1.0, 0.0])+(1.-msk_arg1)*numpy.array([-5.0, -7.0, -2.0])
+      arg1=msk_arg1*numpy.array([-6.0, 1.0, 3.0])+(1.-msk_arg1)*numpy.array([1.0, 1.0, 5.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(32.0)+(1.-msk_ref)*numpy.array(-61.0)
+      ref=msk_ref*numpy.array([9.0, -29.0])+(1.-msk_ref)*numpy.array([-39.0, 19.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[-5.0, 4.0, -2.0], [6.0, 4.0, 7.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, -2.0], [-6.0, 1.0], [-2.0, -5.0]], [[4.0, 4.0], [-4.0, 0.0], [2.0, 
+2.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 7.0], [2.0, 6.0], [3.0, -6.0]], [[2.0, 7.0], [-7.0, 0.0], [7.0, -1.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[2.0, 1.0, 0.0], [5.0, -6.0, 1.0]])+(1.-msk_arg1)*numpy.array([[1.0, -4.0, -7.0], [-5.0, 3.0, 
-6.0]])
+      arg1=msk_arg1*numpy.array([[5.0, -1.0, 3.0], [1.0, 6.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -5.0, 0.0], [5.0, -2.0, 
+0.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(7.0)+(1.-msk_ref)*numpy.array(17.0)
+      ref=msk_ref*numpy.array([-35.0, -12.0])+(1.-msk_ref)*numpy.array([42.0, -23.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank3_offset3(self):
-      arg0=numpy.array([[[5.0, -7.0, 1.0], [0.0, 1.0, 1.0], [-5.0, -2.0, -5.0], [-2.0, 1.0, 6.0]], [[-1.0, -5.0, 7.0], [-3.0, 
-6.0, -4.0], [2.0, -7.0, 7.0], [-7.0, 1.0, -6.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, 3.0], [-7.0, 4.0], [-6.0, 6.0]], [[-7.0, -4.0], [5.0, -7.0], [-1.0, -5.0]], [[-5.0, 
+0.0], [-7.0, -4.0], [-5.0, 3.0]], [[-2.0, 5.0], [-1.0, 6.0], [0.0, 0.0]]], [[[6.0, -7.0], [-5.0, -4.0], [-6.0, -1.0]], [[1.0, 
+2.0], [-5.0, -6.0], [4.0, 4.0]], [[0.0, -2.0], [0.0, 2.0], [-2.0, -6.0]], [[-4.0, 2.0], [4.0, 0.0], [-4.0, 
+3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 5.0], [5.0, 7.0], [-6.0, -2.0]], [[1.0, 1.0], [0.0, 2.0], [2.0, 5.0]], [[1.0, 
+4.0], [-1.0, -2.0], [2.0, 2.0]], [[3.0, 4.0], [2.0, -5.0], [-6.0, 0.0]]], [[[5.0, 2.0], [-2.0, 0.0], [0.0, -6.0]], [[6.0, 
+-2.0], [0.0, 6.0], [6.0, 5.0]], [[-2.0, -1.0], [-1.0, 6.0], [-6.0, 2.0]], [[2.0, -7.0], [-3.0, 4.0], [4.0, 6.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, 3.0, -5.0], [-3.0, 4.0, 1.0], [-5.0, 2.0, 6.0], [-7.0, -4.0, 3.0]], [[0.0, 2.0, -3.0], 
-[6.0, -7.0, -1.0], [0.0, 2.0, 3.0], [4.0, 0.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 6.0, -5.0], [-5.0, -6.0, -4.0], [3.0, 
-3.0, -6.0], [0.0, -4.0, -4.0]], [[3.0, 2.0, 2.0], [3.0, 6.0, 5.0], [0.0, -1.0, 7.0], [5.0, 6.0, 4.0]]])
+      arg1=msk_arg1*numpy.array([[[3.0, -6.0, 0.0], [3.0, -3.0, 6.0], [3.0, 6.0, 0.0], [-5.0, -7.0, -1.0]], [[4.0, -1.0, 0.0], 
+[4.0, 6.0, -4.0], [-1.0, -1.0, 3.0], [2.0, -3.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 0.0, -5.0], [-7.0, 0.0, 0.0], [-1.0, 
+-1.0, 6.0], [-2.0, -1.0, -3.0]], [[2.0, -6.0, 0.0], [7.0, 4.0, -5.0], [-4.0, 3.0, 1.0], [7.0, 6.0, 4.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-176.0)+(1.-msk_ref)*numpy.array(-50.0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank4_offset4(self):
-      arg0=numpy.array([[[[-1.0, 6.0], [0.0, 0.0], [-4.0, -5.0]], [[-7.0, 0.0], [-6.0, -2.0], [3.0, 4.0]]], [[[2.0, 0.0], [5.0, 
--3.0], [-1.0, 7.0]], [[4.0, 1.0], [6.0, 0.0], [7.0, 7.0]]], [[[4.0, 2.0], [1.0, 2.0], [-7.0, -3.0]], [[-1.0, 0.0], [7.0, 0.0], 
-[-5.0, 3.0]]], [[[0.0, -3.0], [2.0, 6.0], [0.0, 1.0]], [[5.0, -4.0], [5.0, -6.0], [-1.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-6.0, 5.0], [3.0, 2.0], [7.0, 7.0]], [[-2.0, 7.0], [-1.0, -7.0], [0.0, -6.0]]], [[[-7.0, 
-1.0], [5.0, 1.0], [-4.0, 5.0]], [[-6.0, 7.0], [1.0, -1.0], [1.0, -3.0]]], [[[6.0, -4.0], [-6.0, 6.0], [0.0, -4.0]], [[-6.0, 
--5.0], [7.0, 0.0], [-1.0, 0.0]]], [[[6.0, 6.0], [-2.0, -3.0], [-6.0, -2.0]], [[-2.0, 2.0], [-5.0, -4.0], [6.0, 
--7.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 1.0], [2.0, -2.0], [-4.0, 7.0]], [[0.0, -2.0], [-5.0, -2.0], [-1.0, -5.0]]], 
-[[[5.0, 2.0], [-1.0, -3.0], [-1.0, 0.0]], [[1.0, -3.0], [0.0, -7.0], [-5.0, -2.0]]], [[[-6.0, -4.0], [-6.0, 5.0], [4.0, -1.0]], 
-[[-1.0, 6.0], [-7.0, 1.0], [0.0, 3.0]]], [[[1.0, -2.0], [-3.0, 0.0], [3.0, 2.0]], [[1.0, 1.0], [-2.0, -5.0], [-2.0, -1.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(67.0)+(1.-msk_ref)*numpy.array(-100.0)
+      ref=msk_ref*numpy.array([-100.0, -209.0])+(1.-msk_ref)*numpy.array([83.0, 27.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank1_offset0(self):
-      arg0=numpy.array(3.0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-6.0, 3.0])+(1.-msk_arg0)*numpy.array([4.0, -6.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, 0.0])+(1.-msk_arg1)*numpy.array([2.0, 6.0])
+      arg1=msk_arg1*numpy.array([-7.0, -2.0])+(1.-msk_arg1)*numpy.array([-6.0, -1.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([12.0, 0.0])+(1.-msk_ref)*numpy.array([6.0, 18.0])
+      ref=msk_ref*numpy.array([[42.0, 12.0], [-21.0, -6.0]])+(1.-msk_ref)*numpy.array([[-24.0, -4.0], [36.0, 6.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank2_offset1(self):
-      arg0=numpy.array([0.0, 1.0, -7.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-1.0, 2.0], [-5.0, -1.0], [-2.0, 6.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 4.0], [3.0, 5.0], 
+[-2.0, -5.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 2.0], [-2.0, 0.0], [6.0, 2.0]])+(1.-msk_arg1)*numpy.array([[0.0, -5.0], [0.0, -7.0], 
-[-5.0, 0.0]])
+      arg1=msk_arg1*numpy.array([[6.0, 0.0], [6.0, 6.0], [-2.0, 7.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 3.0], [0.0, -2.0], 
+[-2.0, -1.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-44.0, -14.0])+(1.-msk_ref)*numpy.array([35.0, -7.0])
+      ref=msk_ref*numpy.array([[-32.0, -44.0], [-6.0, 36.0]])+(1.-msk_ref)*numpy.array([[8.0, -10.0], [2.0, 7.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[-7.0, -6.0, -4.0], [-6.0, 0.0, 5.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -5.0], [-6.0, -7.0], [0.0, -4.0]], [[1.0, 2.0], [6.0, 6.0], [-4.0, 
+-4.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 1.0], [-6.0, 4.0], [-3.0, 7.0]], [[-2.0, 6.0], [4.0, 7.0], [7.0, -4.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, 2.0], [0.0, -4.0], [0.0, -2.0]], [[0.0, -5.0], [5.0, -7.0], [7.0, 
-2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 5.0], [-3.0, 0.0], [-1.0, -3.0]], [[-4.0, 0.0], [3.0, -1.0], [-7.0, -6.0]]])
+      arg1=msk_arg1*numpy.array([[[1.0, -6.0], [-6.0, 5.0], [0.0, 4.0]], [[-4.0, -4.0], [-3.0, 7.0], [-4.0, 
+-7.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -3.0], [-6.0, 6.0], [0.0, 0.0]], [[-5.0, 0.0], [0.0, 0.0], [0.0, 0.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-14.0, 58.0])+(1.-msk_ref)*numpy.array([4.0, -53.0])
+      ref=msk_ref*numpy.array([[30.0, 36.0], [27.0, 41.0]])+(1.-msk_ref)*numpy.array([[18.0, -48.0], [-61.0, 21.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank4_offset3(self):
-      arg0=numpy.array([[[-2.0, 5.0, 1.0], [0.0, 4.0, 1.0], [0.0, 2.0, -1.0], [-4.0, 3.0, -4.0]], [[-7.0, -3.0, -5.0], [-6.0, 
--5.0, -5.0], [5.0, -3.0, 5.0], [5.0, -7.0, 0.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-1.0, 5.0], [-3.0, -3.0], [-4.0, 5.0]], [[7.0, -4.0], [-1.0, 1.0], [-7.0, -6.0]], [[-6.0, 
+-4.0], [-3.0, -7.0], [0.0, 5.0]], [[-1.0, -5.0], [-4.0, 5.0], [0.0, -3.0]]], [[[1.0, -2.0], [-4.0, -1.0], [-4.0, 0.0]], [[-1.0, 
+2.0], [-4.0, -6.0], [1.0, -1.0]], [[0.0, 2.0], [-7.0, -5.0], [1.0, -4.0]], [[7.0, 6.0], [1.0, 0.0], [-6.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -6.0], [-2.0, 0.0], [0.0, 4.0]], [[6.0, 2.0], [4.0, -6.0], [4.0, 1.0]], [[6.0, 
+5.0], [0.0, 6.0], [-6.0, 0.0]], [[-6.0, 0.0], [4.0, 1.0], [-4.0, 0.0]]], [[[4.0, -7.0], [-7.0, 0.0], [2.0, -4.0]], [[4.0, 6.0], 
+[1.0, 7.0], [3.0, 7.0]], [[-2.0, -6.0], [-2.0, -2.0], [-6.0, 7.0]], [[1.0, 7.0], [1.0, 7.0], [-7.0, 2.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, 4.0], [0.0, -5.0], [-5.0, -7.0]], [[6.0, 5.0], [-5.0, 1.0], [4.0, -2.0]], [[0.0, 
--5.0], [2.0, 0.0], [-1.0, -6.0]], [[7.0, -1.0], [1.0, -7.0], [7.0, 4.0]]], [[[0.0, -1.0], [-4.0, -6.0], [-3.0, -5.0]], [[6.0, 
-3.0], [1.0, 2.0], [3.0, -5.0]], [[2.0, 2.0], [-5.0, 0.0], [1.0, -1.0]], [[0.0, 2.0], [-5.0, -1.0], [5.0, 
--4.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, 4.0], [4.0, 1.0], [0.0, 1.0]], [[-2.0, 7.0], [-7.0, 3.0], [-4.0, 7.0]], [[-4.0, 
-2.0], [-6.0, -4.0], [5.0, -1.0]], [[-3.0, 1.0], [2.0, -4.0], [-1.0, 5.0]]], [[[4.0, -2.0], [5.0, 0.0], [6.0, 3.0]], [[-5.0, 
--2.0], [0.0, 4.0], [6.0, -1.0]], [[-1.0, 0.0], [3.0, 7.0], [1.0, -2.0]], [[-2.0, 0.0], [0.0, -7.0], [6.0, 0.0]]]])
+      arg1=msk_arg1*numpy.array([[[[1.0, 0.0], [6.0, 5.0], [-6.0, 7.0]], [[6.0, -1.0], [1.0, -6.0], [6.0, -3.0]], [[7.0, -3.0], 
+[-5.0, -1.0], [4.0, -5.0]], [[-5.0, -1.0], [0.0, 5.0], [1.0, 6.0]]], [[[4.0, 7.0], [-4.0, 2.0], [-1.0, -1.0]], [[0.0, -6.0], 
+[5.0, 6.0], [7.0, 0.0]], [[5.0, 5.0], [6.0, -6.0], [2.0, 0.0]], [[-7.0, 2.0], [-3.0, -1.0], [-2.0, 
+1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, 5.0], [-2.0, 3.0], [-7.0, 0.0]], [[-5.0, 5.0], [-3.0, 4.0], [-4.0, -3.0]], [[1.0, 
+-4.0], [-6.0, 6.0], [6.0, 4.0]], [[3.0, 6.0], [0.0, -2.0], [4.0, 2.0]]], [[[-6.0, -4.0], [1.0, 0.0], [0.0, -7.0]], [[-6.0, 
+-6.0], [-7.0, 4.0], [0.0, 0.0]], [[0.0, 1.0], [-5.0, -7.0], [-1.0, -2.0]], [[-6.0, 1.0], [0.0, 6.0], [0.0, 2.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-35.0, 4.0])+(1.-msk_ref)*numpy.array([-111.0, -12.0])
+      ref=msk_ref*numpy.array([[-87.0, 13.0], [-164.0, 30.0]])+(1.-msk_ref)*numpy.array([[-172.0, -95.0], [-131.0, 62.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank2_offset0(self):
-      arg0=numpy.array(1.0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([1.0, -2.0])+(1.-msk_arg0)*numpy.array([4.0, 5.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[4.0, 0.0, 6.0, -5.0, 5.0], [-6.0, 2.0, -1.0, -1.0, 1.0], [1.0, 2.0, 2.0, -7.0, 1.0], [3.0, 
-7.0, 0.0, -7.0, 7.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -1.0, 2.0, -6.0, 0.0], [-7.0, -3.0, -6.0, -6.0, 0.0], [-4.0, 6.0, 2.0, 
-7.0, 6.0], [0.0, 4.0, 1.0, 4.0, -2.0]])
+      arg1=msk_arg1*numpy.array([[-3.0, 0.0, 5.0, -7.0, 5.0], [1.0, 2.0, 3.0, 3.0, 7.0], [4.0, 1.0, 0.0, 7.0, -2.0], [-6.0, 
+-1.0, -4.0, 4.0, 2.0]])+(1.-msk_arg1)*numpy.array([[5.0, 0.0, 0.0, -1.0, -6.0], [0.0, 0.0, -6.0, 1.0, 0.0], [1.0, -6.0, -4.0, 
+0.0, -3.0], [1.0, -7.0, 0.0, -2.0, -4.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[4.0, 0.0, 6.0, -5.0, 5.0], [-6.0, 2.0, -1.0, -1.0, 1.0], [1.0, 2.0, 2.0, -7.0, 1.0], [3.0, 7.0, 
-0.0, -7.0, 7.0]])+(1.-msk_ref)*numpy.array([[-7.0, -1.0, 2.0, -6.0, 0.0], [-7.0, -3.0, -6.0, -6.0, 0.0], [-4.0, 6.0, 2.0, 7.0, 
-6.0], [0.0, 4.0, 1.0, 4.0, -2.0]])
+      ref=msk_ref*numpy.array([[[-3.0, 0.0, 5.0, -7.0, 5.0], [1.0, 2.0, 3.0, 3.0, 7.0], [4.0, 1.0, 0.0, 7.0, -2.0], [-6.0, 
+-1.0, -4.0, 4.0, 2.0]], [[6.0, 0.0, -10.0, 14.0, -10.0], [-2.0, -4.0, -6.0, -6.0, -14.0], [-8.0, -2.0, 0.0, -14.0, 4.0], [12.0, 
+2.0, 8.0, -8.0, -4.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 0.0, 0.0, -4.0, -24.0], [0.0, 0.0, -24.0, 4.0, 0.0], [4.0, -24.0, 
+-16.0, 0.0, -12.0], [4.0, -28.0, 0.0, -8.0, -16.0]], [[25.0, 0.0, 0.0, -5.0, -30.0], [0.0, 0.0, -30.0, 5.0, 0.0], [5.0, -30.0, 
+-20.0, 0.0, -15.0], [5.0, -35.0, 0.0, -10.0, -20.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank3_offset1(self):
-      arg0=numpy.array([-4.0, -6.0, 1.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, -2.0], [1.0, -4.0], [1.0, -3.0]])+(1.-msk_arg0)*numpy.array([[4.0, -5.0], [0.0, 3.0], 
+[-5.0, -7.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-7.0, -4.0, 0.0, -5.0, 3.0], [-2.0, -6.0, -1.0, -5.0, 0.0], [-1.0, 6.0, 5.0, 0.0, -3.0], 
-[7.0, 5.0, 1.0, -3.0, -7.0]], [[6.0, -6.0, -3.0, -7.0, 5.0], [-5.0, 3.0, 1.0, -1.0, 1.0], [1.0, -3.0, -6.0, 3.0, 0.0], [6.0, 
--1.0, -5.0, -3.0, -6.0]], [[-2.0, -3.0, 6.0, -2.0, 0.0], [-1.0, 1.0, -6.0, -5.0, 4.0], [6.0, -7.0, -4.0, 2.0, -1.0], [-3.0, 
--2.0, -5.0, -4.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 1.0, 0.0, 0.0, 1.0], [-2.0, 4.0, 6.0, 5.0, 0.0], [-2.0, 5.0, 0.0, 
-2.0, 0.0], [3.0, -7.0, -1.0, 5.0, -2.0]], [[-1.0, -7.0, -4.0, -3.0, -2.0], [4.0, 4.0, -6.0, 4.0, 0.0], [0.0, 2.0, -2.0, -2.0, 
-7.0], [7.0, -5.0, -1.0, 3.0, -7.0]], [[-5.0, -2.0, 0.0, -3.0, -7.0], [6.0, 3.0, 4.0, -5.0, -3.0], [-2.0, -7.0, -6.0, 3.0, 0.0], 
-[2.0, -5.0, 7.0, 1.0, 2.0]]])
+      arg1=msk_arg1*numpy.array([[[0.0, -5.0, 0.0, -1.0, 0.0], [-5.0, 0.0, 0.0, 5.0, -3.0], [-7.0, 2.0, 5.0, 6.0, -1.0], [-5.0, 
+7.0, -4.0, 5.0, 6.0]], [[-7.0, 1.0, -6.0, 6.0, 1.0], [-2.0, -4.0, -4.0, 2.0, -5.0], [-1.0, -4.0, -5.0, -4.0, 7.0], [-1.0, 0.0, 
+-1.0, 6.0, -1.0]], [[-4.0, 6.0, 7.0, -2.0, 2.0], [1.0, 1.0, -4.0, 1.0, -2.0], [1.0, -4.0, -5.0, 3.0, 7.0], [-1.0, 2.0, -3.0, 
+7.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, 6.0, -4.0, -4.0, -1.0], [0.0, 6.0, -1.0, 0.0, -4.0], [7.0, 2.0, 3.0, 0.0, 3.0], 
+[3.0, -2.0, 0.0, 1.0, -6.0]], [[4.0, -1.0, -6.0, 0.0, 0.0], [5.0, -6.0, 4.0, -4.0, -2.0], [5.0, 1.0, -4.0, -2.0, 1.0], [4.0, 
+-6.0, 3.0, 2.0, -3.0]], [[6.0, -1.0, 2.0, 7.0, -2.0], [-6.0, 0.0, 4.0, -5.0, -5.0], [6.0, 0.0, 5.0, 0.0, 0.0], [7.0, -5.0, 7.0, 
+0.0, 7.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-10.0, 49.0, 24.0, 60.0, -42.0], [37.0, 7.0, -8.0, 21.0, -2.0], [4.0, -13.0, 12.0, -16.0, 
-11.0], [-67.0, -16.0, 21.0, 26.0, 57.0]])+(1.-msk_ref)*numpy.array([[1.0, 36.0, 24.0, 15.0, 1.0], [-10.0, -37.0, 16.0, -49.0, 
--3.0], [6.0, -39.0, 6.0, 7.0, -42.0], [-52.0, 53.0, 17.0, -37.0, 52.0]])
+      ref=msk_ref*numpy.array([[[-11.0, 7.0, 1.0, 4.0, 3.0], [-1.0, -3.0, -8.0, 3.0, -7.0], [0.0, -8.0, -10.0, -1.0, 14.0], 
+[-2.0, 2.0, -4.0, 13.0, 5.0]], [[40.0, -12.0, 3.0, -16.0, -10.0], [15.0, 13.0, 28.0, -21.0, 32.0], [15.0, 24.0, 25.0, -5.0, 
+-47.0], [17.0, -20.0, 21.0, -55.0, -26.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 29.0, -26.0, -51.0, 6.0], [30.0, 24.0, -24.0, 
+25.0, 9.0], [-2.0, 8.0, -13.0, 0.0, 12.0], [-23.0, 17.0, -35.0, 4.0, -59.0]], [[-55.0, -26.0, -12.0, -29.0, 19.0], [57.0, 
+-48.0, -11.0, 23.0, 49.0], [-62.0, -7.0, -62.0, -6.0, -12.0], [-52.0, 27.0, -40.0, 1.0, -28.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[-1.0, -7.0, -5.0], [1.0, 0.0, 1.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, -4.0], [6.0, 0.0], [0.0, -6.0]], [[4.0, 4.0], [3.0, 5.0], [-6.0, 
+-4.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 7.0], [-3.0, 2.0], [-7.0, -4.0]], [[5.0, -5.0], [-5.0, -5.0], [-1.0, 4.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[6.0, 5.0, -5.0, -3.0, 5.0], [6.0, -7.0, 4.0, -6.0, 3.0], [-2.0, -6.0, 4.0, 2.0, -4.0], 
-[-6.0, -5.0, 2.0, 7.0, -7.0]], [[-1.0, -3.0, -1.0, -6.0, -2.0], [-1.0, 1.0, 6.0, -2.0, -4.0], [5.0, 0.0, 7.0, -6.0, -7.0], 
-[7.0, 0.0, -2.0, 1.0, 5.0]], [[-6.0, -5.0, 0.0, 0.0, -6.0], [-7.0, 5.0, 4.0, -1.0, 6.0], [-4.0, 0.0, 0.0, 0.0, -6.0], [-5.0, 
--5.0, 4.0, -2.0, 4.0]]], [[[4.0, -6.0, -4.0, 4.0, 6.0], [-1.0, 2.0, 0.0, 5.0, 0.0], [7.0, 7.0, -6.0, 5.0, -5.0], [0.0, -2.0, 
-2.0, -5.0, -3.0]], [[-7.0, 0.0, 3.0, 5.0, 3.0], [1.0, -5.0, -2.0, -3.0, 5.0], [4.0, -1.0, -6.0, 4.0, 1.0], [-3.0, 0.0, -4.0, 
-7.0, 3.0]], [[-1.0, 7.0, -3.0, -5.0, -3.0], [5.0, -3.0, -2.0, 7.0, 0.0], [3.0, -3.0, -5.0, 1.0, -7.0], [3.0, 1.0, 4.0, -4.0, 
--7.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -7.0, 0.0, 5.0, -5.0], [2.0, 1.0, 5.0, 7.0, 4.0], [2.0, -7.0, -4.0, -1.0, -2.0], 
-[5.0, 2.0, -3.0, -3.0, -6.0]], [[-2.0, 0.0, 0.0, -5.0, -2.0], [7.0, 5.0, 0.0, 0.0, 3.0], [0.0, 7.0, 5.0, 5.0, -1.0], [4.0, 4.0, 
--7.0, 0.0, 1.0]], [[1.0, -4.0, 3.0, 3.0, 5.0], [-7.0, -4.0, 1.0, 2.0, -3.0], [-4.0, -5.0, 6.0, -2.0, -7.0], [-7.0, 3.0, -6.0, 
-5.0, -5.0]]], [[[-6.0, -4.0, 6.0, -3.0, 4.0], [6.0, 5.0, 0.0, 3.0, 1.0], [-1.0, -2.0, -4.0, 6.0, 1.0], [-4.0, -4.0, 5.0, 1.0, 
-0.0]], [[-3.0, 2.0, 0.0, 7.0, -4.0], [3.0, 3.0, -1.0, 1.0, -5.0], [4.0, 0.0, -3.0, 2.0, -6.0], [3.0, 5.0, 2.0, 0.0, 5.0]], 
-[[3.0, -7.0, -1.0, 2.0, 6.0], [-2.0, -1.0, -5.0, 3.0, -2.0], [0.0, -1.0, 0.0, -7.0, 1.0], [7.0, 2.0, 0.0, 4.0, 3.0]]]])
+      arg1=msk_arg1*numpy.array([[[[-5.0, -3.0, -1.0, -5.0, -6.0], [5.0, 1.0, -6.0, 0.0, 3.0], [-2.0, -6.0, -3.0, 3.0, 5.0], 
+[3.0, 4.0, 3.0, 0.0, 7.0]], [[-5.0, 3.0, 1.0, 1.0, -5.0], [4.0, 2.0, -7.0, 5.0, 5.0], [0.0, -6.0, -7.0, -5.0, 7.0], [-5.0, 
+-6.0, 2.0, -7.0, 0.0]], [[-2.0, 3.0, -6.0, -4.0, -3.0], [2.0, -3.0, -7.0, -5.0, 2.0], [1.0, 3.0, 5.0, -6.0, 0.0], [4.0, 7.0, 
+5.0, -1.0, -3.0]]], [[[-7.0, 5.0, -5.0, -2.0, 4.0], [6.0, -5.0, 3.0, 5.0, 4.0], [2.0, -2.0, -6.0, -4.0, -4.0], [1.0, 0.0, -1.0, 
+-3.0, 4.0]], [[-6.0, 6.0, -3.0, 0.0, -1.0], [0.0, 4.0, -1.0, -6.0, -3.0], [-7.0, -3.0, -4.0, -6.0, 0.0], [-4.0, 0.0, 0.0, -2.0, 
+0.0]], [[0.0, -7.0, -2.0, 5.0, -7.0], [0.0, 7.0, 2.0, 4.0, 0.0], [4.0, -7.0, 6.0, -6.0, -2.0], [5.0, 7.0, -3.0, 6.0, 
+-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 3.0, -4.0, -5.0, 0.0], [0.0, -5.0, 0.0, -6.0, 7.0], [3.0, -5.0, -6.0, -1.0, 0.0], 
+[-4.0, 2.0, -1.0, -1.0, 0.0]], [[-2.0, 1.0, -2.0, -7.0, -4.0], [1.0, -2.0, 0.0, 3.0, 1.0], [2.0, 6.0, 1.0, 7.0, 7.0], [0.0, 
+5.0, 0.0, -5.0, 0.0]], [[2.0, 6.0, 2.0, -4.0, 0.0], [2.0, -2.0, -2.0, -5.0, 2.0], [0.0, -3.0, -5.0, 1.0, 5.0], [-7.0, -5.0, 
+-6.0, 1.0, -3.0]]], [[[4.0, 7.0, -5.0, 7.0, 0.0], [0.0, 2.0, 5.0, -2.0, 0.0], [1.0, 4.0, -6.0, -2.0, 0.0], [4.0, 0.0, 5.0, 5.0, 
+0.0]], [[2.0, 1.0, 1.0, 1.0, -6.0], [4.0, -6.0, -3.0, 1.0, 1.0], [-7.0, -4.0, 6.0, -4.0, 4.0], [-5.0, 6.0, 7.0, -3.0, 1.0]], 
+[[-5.0, 6.0, -7.0, 5.0, -3.0], [0.0, -2.0, -4.0, -7.0, 5.0], [-1.0, -5.0, -5.0, 0.0, -1.0], [0.0, 1.0, 7.0, -2.0, -7.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[34.0, 42.0, 5.0, 44.0, 42.0], [40.0, -26.0, -68.0, 37.0, -5.0], [-3.0, 10.0, -64.0, 46.0, 
-71.0], [-15.0, 29.0, -2.0, -13.0, -58.0]])+(1.-msk_ref)*numpy.array([[0.0, 16.0, -10.0, 14.0, 4.0], [-12.0, -12.0, -15.0, 
--11.0, -11.0], [17.0, -20.0, -65.0, -25.0, 46.0], [5.0, -47.0, 87.0, -17.0, 27.0]])
+      ref=msk_ref*numpy.array([[[-86.0, 92.0, -13.0, -42.0, 13.0], [58.0, -36.0, -57.0, 8.0, 43.0], [-41.0, -23.0, -120.0, 
+-22.0, 48.0], [-62.0, -70.0, 32.0, -96.0, 72.0]], [[-26.0, 72.0, 13.0, 16.0, 81.0], [-8.0, -14.0, 65.0, 4.0, -23.0], [-41.0, 
+11.0, -86.0, 2.0, -28.0], [-72.0, -86.0, -34.0, -40.0, 34.0]]])+(1.-msk_ref)*numpy.array([[[-7.0, -15.0, -39.0, 64.0, 45.0], 
+[-37.0, 52.0, 58.0, 6.0, -13.0], [41.0, 38.0, -35.0, -20.0, -75.0], [86.0, -7.0, 23.0, 48.0, 23.0]], [[-111.0, -17.0, -48.0, 
+-53.0, 10.0], [-26.0, -19.0, -18.0, -39.0, 58.0], [51.0, -31.0, -40.0, 33.0, -30.0], [5.0, 18.0, -15.0, -39.0, -21.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank3_offset0(self):
-      arg0=numpy.array(3.0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([2.0, -7.0])+(1.-msk_arg0)*numpy.array([7.0, 6.0])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, 5.0], [-5.0, 4.0]], [[0.0, 4.0], [3.0, 4.0]], [[-2.0, 0.0], [3.0, -1.0]], [[-1.0, 5.0], 
-[-5.0, 0.0]], [[-7.0, 5.0], [-7.0, -2.0]], [[-1.0, 3.0], [-3.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, -3.0], [5.0, -2.0]], 
-[[-2.0, -2.0], [0.0, -1.0]], [[-7.0, -4.0], [-4.0, -2.0]], [[-3.0, -7.0], [6.0, -6.0]], [[1.0, -7.0], [-1.0, -5.0]], [[7.0, 
--6.0], [6.0, 1.0]]])
+      arg1=msk_arg1*numpy.array([[[0.0, 1.0], [-1.0, 2.0]], [[3.0, 6.0], [1.0, 3.0]], [[5.0, -3.0], [2.0, -7.0]], [[0.0, -4.0], 
+[-5.0, 1.0]], [[0.0, 7.0], [-5.0, -4.0]], [[-2.0, -6.0], [-3.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 3.0], [-1.0, 2.0]], 
+[[0.0, -2.0], [3.0, -7.0]], [[-7.0, -4.0], [4.0, -7.0]], [[1.0, -5.0], [0.0, -1.0]], [[6.0, 6.0], [-1.0, -4.0]], [[-7.0, 3.0], 
+[-1.0, -6.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[3.0, 15.0], [-15.0, 12.0]], [[0.0, 12.0], [9.0, 12.0]], [[-6.0, 0.0], [9.0, -3.0]], [[-3.0, 
-15.0], [-15.0, 0.0]], [[-21.0, 15.0], [-21.0, -6.0]], [[-3.0, 9.0], [-9.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -9.0], 
-[15.0, -6.0]], [[-6.0, -6.0], [0.0, -3.0]], [[-21.0, -12.0], [-12.0, -6.0]], [[-9.0, -21.0], [18.0, -18.0]], [[3.0, -21.0], 
-[-3.0, -15.0]], [[21.0, -18.0], [18.0, 3.0]]])
+      ref=msk_ref*numpy.array([[[[0.0, 2.0], [-2.0, 4.0]], [[6.0, 12.0], [2.0, 6.0]], [[10.0, -6.0], [4.0, -14.0]], [[0.0, 
+-8.0], [-10.0, 2.0]], [[0.0, 14.0], [-10.0, -8.0]], [[-4.0, -12.0], [-6.0, 14.0]]], [[[0.0, -7.0], [7.0, -14.0]], [[-21.0, 
+-42.0], [-7.0, -21.0]], [[-35.0, 21.0], [-14.0, 49.0]], [[0.0, 28.0], [35.0, -7.0]], [[0.0, -49.0], [35.0, 28.0]], [[14.0, 
+42.0], [21.0, -49.0]]]])+(1.-msk_ref)*numpy.array([[[[-14.0, 21.0], [-7.0, 14.0]], [[0.0, -14.0], [21.0, -49.0]], [[-49.0, 
+-28.0], [28.0, -49.0]], [[7.0, -35.0], [0.0, -7.0]], [[42.0, 42.0], [-7.0, -28.0]], [[-49.0, 21.0], [-7.0, -42.0]]], [[[-12.0, 
+18.0], [-6.0, 12.0]], [[0.0, -12.0], [18.0, -42.0]], [[-42.0, -24.0], [24.0, -42.0]], [[6.0, -30.0], [0.0, -6.0]], [[36.0, 
+36.0], [-6.0, -24.0]], [[-42.0, 18.0], [-6.0, -36.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank4_offset1(self):
-      arg0=numpy.array([3.0, 7.0, -6.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-5.0, 5.0], [-7.0, 4.0], [0.0, -1.0]])+(1.-msk_arg0)*numpy.array([[0.0, -6.0], [7.0, -7.0], 
+[-2.0, 6.0]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -5.0], [2.0, -4.0]], [[3.0, 1.0], [7.0, -6.0]], [[-5.0, -3.0], [-6.0, 6.0]], [[-3.0, 
--5.0], [-6.0, -2.0]], [[4.0, 7.0], [7.0, 0.0]], [[0.0, 0.0], [7.0, 7.0]]], [[[7.0, 3.0], [-3.0, 6.0]], [[-1.0, 7.0], [-1.0, 
--6.0]], [[6.0, 6.0], [-2.0, -2.0]], [[-3.0, -7.0], [5.0, 7.0]], [[6.0, 0.0], [4.0, 4.0]], [[3.0, 6.0], [1.0, 0.0]]], [[[-5.0, 
--6.0], [-2.0, 0.0]], [[1.0, -3.0], [2.0, -6.0]], [[-6.0, -6.0], [3.0, 1.0]], [[-6.0, 4.0], [-7.0, 2.0]], [[5.0, -2.0], [0.0, 
--7.0]], [[-2.0, 1.0], [-1.0, 5.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, -2.0], [6.0, 6.0]], [[-6.0, -4.0], [-2.0, -7.0]], 
-[[2.0, 3.0], [-2.0, 1.0]], [[4.0, 0.0], [-7.0, 0.0]], [[0.0, -7.0], [0.0, 5.0]], [[-1.0, 2.0], [-5.0, 6.0]]], [[[-2.0, 7.0], 
-[-2.0, 7.0]], [[-1.0, -5.0], [-5.0, 0.0]], [[-6.0, 6.0], [4.0, 3.0]], [[5.0, 7.0], [5.0, -3.0]], [[5.0, 5.0], [7.0, -6.0]], 
-[[1.0, 5.0], [-6.0, -6.0]]], [[[2.0, -4.0], [5.0, 0.0]], [[-1.0, 0.0], [-4.0, 0.0]], [[-5.0, 6.0], [5.0, 0.0]], [[1.0, -1.0], 
-[-2.0, 0.0]], [[-6.0, -5.0], [-5.0, 7.0]], [[1.0, 4.0], [3.0, 0.0]]]])
+      arg1=msk_arg1*numpy.array([[[[-2.0, -7.0], [3.0, 2.0]], [[3.0, -6.0], [7.0, 6.0]], [[-3.0, 1.0], [-6.0, -5.0]], [[3.0, 
+-2.0], [7.0, 3.0]], [[-3.0, -6.0], [4.0, -5.0]], [[4.0, 0.0], [3.0, 3.0]]], [[[3.0, 0.0], [7.0, 2.0]], [[-3.0, 2.0], [-4.0, 
+5.0]], [[1.0, 3.0], [-7.0, -3.0]], [[5.0, 2.0], [-2.0, -4.0]], [[3.0, 1.0], [0.0, 3.0]], [[-3.0, 3.0], [5.0, -6.0]]], [[[-1.0, 
+4.0], [4.0, 2.0]], [[3.0, -4.0], [3.0, -5.0]], [[-1.0, 5.0], [5.0, 0.0]], [[1.0, -6.0], [2.0, -3.0]], [[-7.0, -6.0], [5.0, 
+-7.0]], [[-7.0, -3.0], [-6.0, 7.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, -2.0], [-5.0, 4.0]], [[-5.0, 3.0], [0.0, 2.0]], 
+[[0.0, 0.0], [-4.0, 4.0]], [[4.0, 0.0], [-4.0, 3.0]], [[6.0, -3.0], [7.0, -7.0]], [[7.0, -1.0], [-7.0, 3.0]]], [[[5.0, 0.0], 
+[-2.0, -5.0]], [[-4.0, -5.0], [7.0, 6.0]], [[7.0, 0.0], [-5.0, 4.0]], [[0.0, -7.0], [6.0, 3.0]], [[-5.0, -5.0], [2.0, -6.0]], 
+[[1.0, -7.0], [0.0, 0.0]]], [[[-5.0, -4.0], [2.0, 5.0]], [[7.0, 3.0], [-2.0, -2.0]], [[1.0, 6.0], [0.0, -7.0]], [[7.0, 5.0], 
+[0.0, 2.0]], [[-7.0, 7.0], [7.0, -6.0]], [[5.0, -7.0], [-5.0, 3.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[79.0, 42.0], [-3.0, 30.0]], [[-4.0, 70.0], [2.0, -24.0]], [[63.0, 69.0], [-50.0, -2.0]], 
-[[6.0, -88.0], [59.0, 31.0]], [[24.0, 33.0], [49.0, 70.0]], [[33.0, 36.0], [34.0, -9.0]]])+(1.-msk_ref)*numpy.array([[[-23.0, 
-67.0], [-26.0, 67.0]], [[-19.0, -47.0], [-17.0, -21.0]], [[-6.0, 15.0], [-8.0, 24.0]], [[41.0, 55.0], [26.0, -21.0]], [[71.0, 
-44.0], [79.0, -69.0]], [[-2.0, 17.0], [-75.0, -24.0]]])
+      ref=msk_ref*numpy.array([[[[-11.0, 35.0], [-64.0, -24.0]], [[6.0, 16.0], [-7.0, -65.0]], [[8.0, -26.0], [79.0, 46.0]], 
+[[-50.0, -4.0], [-21.0, 13.0]], [[-6.0, 23.0], [-20.0, 4.0]], [[1.0, -21.0], [-50.0, 27.0]]], [[[3.0, -39.0], [39.0, 16.0]], 
+[[0.0, -18.0], [16.0, 55.0]], [[-10.0, 12.0], [-63.0, -37.0]], [[34.0, 4.0], [25.0, 2.0]], [[4.0, -20.0], [15.0, -6.0]], 
+[[15.0, 15.0], [41.0, -16.0]]]])+(1.-msk_ref)*numpy.array([[[[45.0, 8.0], [-18.0, -45.0]], [[-42.0, -41.0], [53.0, 46.0]], 
+[[47.0, -12.0], [-35.0, 42.0]], [[-14.0, -59.0], [42.0, 17.0]], [[-21.0, -49.0], [0.0, -30.0]], [[-3.0, -35.0], [10.0, -6.0]]], 
+[[[-95.0, -12.0], [56.0, 41.0]], [[100.0, 35.0], [-61.0, -66.0]], [[-43.0, 36.0], [59.0, -94.0]], [[18.0, 79.0], [-18.0, 
+-27.0]], [[-43.0, 95.0], [-14.0, 48.0]], [[-19.0, 13.0], [12.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank0_expandedData_rank4_offset0(self):
-      arg0=numpy.array(7.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, 1.0, -7.0, 4.0], [-6.0, 4.0, 2.0, 4.0], [-6.0, 4.0, -4.0, -3.0]], [[-4.0, -5.0, 0.0, 
-0.0], [-6.0, -5.0, 7.0, 2.0], [-6.0, 6.0, -4.0, 1.0]]], [[[6.0, 2.0, 4.0, 6.0], [-4.0, 3.0, -3.0, 5.0], [7.0, 0.0, 3.0, 6.0]], 
-[[2.0, 7.0, -7.0, -2.0], [-6.0, -2.0, 0.0, 3.0], [-4.0, 6.0, 0.0, -6.0]]], [[[6.0, -1.0, -2.0, 5.0], [1.0, -5.0, -6.0, 1.0], 
-[6.0, -4.0, 0.0, -5.0]], [[-1.0, 4.0, -3.0, 3.0], [4.0, -6.0, -3.0, -3.0], [4.0, -2.0, 1.0, 
-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 7.0, -1.0, -5.0], [4.0, -6.0, 5.0, 7.0], [5.0, -1.0, -5.0, 6.0]], [[7.0, 4.0, 5.0, 
-2.0], [7.0, -3.0, 0.0, 5.0], [4.0, 3.0, 1.0, 5.0]]], [[[4.0, -7.0, -6.0, 2.0], [1.0, 0.0, 5.0, 4.0], [2.0, -4.0, 0.0, 1.0]], 
-[[-4.0, -5.0, 0.0, 7.0], [5.0, -1.0, -5.0, 0.0], [7.0, 7.0, 0.0, -7.0]]], [[[-3.0, 5.0, 0.0, -7.0], [7.0, 7.0, -2.0, 7.0], 
-[-3.0, -3.0, -1.0, 5.0]], [[-5.0, -4.0, -1.0, 1.0], [5.0, -2.0, 4.0, -4.0], [0.0, 7.0, 5.0, 2.0]]]])
+   def test_generalTransposedTensorProduct_expandedData_rank2_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, -2.0, -1.0, -5.0, -2.0], [-5.0, 0.0, -5.0, -5.0, 7.0], [-6.0, -5.0, 7.0, -2.0, 4.0], 
+[-3.0, 7.0, -2.0, 0.0, -6.0]])+(1.-msk_arg0)*numpy.array([[0.0, 4.0, -1.0, 6.0, -4.0], [-5.0, -3.0, 4.0, -5.0, 2.0], [-1.0, 
+-1.0, -5.0, -2.0, 6.0], [-5.0, -5.0, -4.0, 5.0, 4.0]])
+      arg1=6.0
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[7.0, 7.0, -49.0, 28.0], [-42.0, 28.0, 14.0, 28.0], [-42.0, 28.0, -28.0, -21.0]], [[-28.0, 
--35.0, 0.0, 0.0], [-42.0, -35.0, 49.0, 14.0], [-42.0, 42.0, -28.0, 7.0]]], [[[42.0, 14.0, 28.0, 42.0], [-28.0, 21.0, -21.0, 
-35.0], [49.0, 0.0, 21.0, 42.0]], [[14.0, 49.0, -49.0, -14.0], [-42.0, -14.0, 0.0, 21.0], [-28.0, 42.0, 0.0, -42.0]]], [[[42.0, 
--7.0, -14.0, 35.0], [7.0, -35.0, -42.0, 7.0], [42.0, -28.0, 0.0, -35.0]], [[-7.0, 28.0, -21.0, 21.0], [28.0, -42.0, -21.0, 
--21.0], [28.0, -14.0, 7.0, 28.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, 49.0, -7.0, -35.0], [28.0, -42.0, 35.0, 49.0], [35.0, 
--7.0, -35.0, 42.0]], [[49.0, 28.0, 35.0, 14.0], [49.0, -21.0, 0.0, 35.0], [28.0, 21.0, 7.0, 35.0]]], [[[28.0, -49.0, -42.0, 
-14.0], [7.0, 0.0, 35.0, 28.0], [14.0, -28.0, 0.0, 7.0]], [[-28.0, -35.0, 0.0, 49.0], [35.0, -7.0, -35.0, 0.0], [49.0, 49.0, 
-0.0, -49.0]]], [[[-21.0, 35.0, 0.0, -49.0], [49.0, 49.0, -14.0, 49.0], [-21.0, -21.0, -7.0, 35.0]], [[-35.0, -28.0, -7.0, 7.0], 
-[35.0, -14.0, 28.0, -28.0], [0.0, 49.0, 35.0, 14.0]]]])
+      ref=msk_ref*numpy.array([[30.0, -12.0, -6.0, -30.0, -12.0], [-30.0, 0.0, -30.0, -30.0, 42.0], [-36.0, -30.0, 42.0, -12.0, 
+24.0], [-18.0, 42.0, -12.0, 0.0, -36.0]])+(1.-msk_ref)*numpy.array([[0.0, 24.0, -6.0, 36.0, -24.0], [-30.0, -18.0, 24.0, -30.0, 
+12.0], [-6.0, -6.0, -30.0, -12.0, 36.0], [-30.0, -30.0, -24.0, 30.0, 24.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_float_rank0_offset0(self):
-      arg0=numpy.array([-5.0, -3.0])
-      arg1=-5.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([25.0, 15.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank0_offset0(self):
-      arg0=numpy.array([6.0, -7.0])
-      arg1=numpy.array(-3.0)
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[2.0, 4.0, -6.0, -2.0, -6.0], [1.0, 1.0, -4.0, 2.0, 1.0], [-4.0, -7.0, -5.0, -7.0, -6.0], 
+[6.0, -7.0, 6.0, 3.0, -2.0]])+(1.-msk_arg0)*numpy.array([[0.0, -3.0, 6.0, 6.0, 5.0], [0.0, -3.0, 5.0, 6.0, -4.0], [0.0, -4.0, 
+6.0, 6.0, 6.0], [4.0, -4.0, -3.0, 4.0, 6.0]])
+      arg1=numpy.array(2.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([-18.0, 21.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[4.0, 8.0, -12.0, -4.0, -12.0], [2.0, 2.0, -8.0, 4.0, 2.0], [-8.0, -14.0, -10.0, -14.0, -12.0], 
+[12.0, -14.0, 12.0, 6.0, -4.0]])+(1.-msk_ref)*numpy.array([[0.0, -6.0, 12.0, 12.0, 10.0], [0.0, -6.0, 10.0, 12.0, -8.0], [0.0, 
+-8.0, 12.0, 12.0, 12.0], [8.0, -8.0, -6.0, 8.0, 12.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank1_offset1(self):
-      arg0=numpy.array([[-4.0, -6.0], [-4.0, -6.0], [-7.0, -7.0]])
-      arg1=numpy.array([4.0, -1.0, 4.0])
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[5.0, 2.0, 4.0, -5.0, 3.0], [-4.0, 4.0, 6.0, 5.0, 7.0], [5.0, -2.0, 4.0, 7.0, 4.0], [-7.0, 
+5.0, -2.0, -1.0, -7.0]], [[5.0, 3.0, 2.0, 0.0, 1.0], [1.0, -7.0, 4.0, -1.0, 1.0], [3.0, 1.0, -4.0, 1.0, 6.0], [0.0, 4.0, -2.0, 
+4.0, -3.0]], [[-1.0, -5.0, -5.0, -2.0, 0.0], [-3.0, -3.0, 1.0, -6.0, 7.0], [-3.0, -6.0, -6.0, -2.0, 0.0], [4.0, -5.0, 1.0, 1.0, 
+2.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, 3.0, 0.0, 2.0, 0.0], [3.0, -7.0, 6.0, 2.0, -1.0], [1.0, -2.0, -4.0, 2.0, 2.0], 
+[-1.0, 3.0, 0.0, -6.0, 0.0]], [[5.0, 3.0, -3.0, 7.0, 7.0], [5.0, -2.0, -7.0, 0.0, -2.0], [2.0, 1.0, 6.0, 4.0, 0.0], [-7.0, 1.0, 
+-4.0, -3.0, 1.0]], [[-4.0, -2.0, 5.0, 6.0, -2.0], [-6.0, 0.0, -2.0, -2.0, 6.0], [0.0, 0.0, 0.0, 2.0, 4.0], [2.0, 5.0, -6.0, 
+3.0, 5.0]]])
+      arg1=numpy.array([4.0, -5.0, 3.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([-40.0, -46.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-8.0, -22.0, -9.0, -26.0, 7.0], [-30.0, 42.0, 7.0, 7.0, 44.0], [-4.0, -31.0, 18.0, 17.0, 
+-14.0], [-16.0, -15.0, 5.0, -21.0, -7.0]])+(1.-msk_ref)*numpy.array([[-57.0, -9.0, 30.0, -9.0, -41.0], [-31.0, -18.0, 53.0, 
+2.0, 24.0], [-6.0, -13.0, -46.0, -6.0, 20.0], [37.0, 22.0, 2.0, 0.0, 10.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank2_offset2(self):
-      arg0=numpy.array([[[3.0, 4.0], [0.0, 7.0], [-4.0, -6.0]], [[3.0, 0.0], [5.0, 0.0], [6.0, 5.0]]])
-      arg1=numpy.array([[-4.0, 1.0, 3.0], [-3.0, 4.0, 7.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-4.0, -5.0, 5.0, -5.0, 5.0], [6.0, -3.0, 5.0, 0.0, -7.0], [0.0, -2.0, 3.0, 4.0, 6.0], [0.0, 
+1.0, -2.0, -6.0, -3.0]], [[3.0, 1.0, 1.0, 4.0, -3.0], [-7.0, -2.0, -7.0, -5.0, -2.0], [0.0, -4.0, 1.0, 5.0, 5.0], [-7.0, -6.0, 
+-5.0, 2.0, 4.0]], [[0.0, -3.0, 7.0, 1.0, -5.0], [0.0, -6.0, -6.0, -6.0, 0.0], [7.0, -5.0, -1.0, 2.0, -1.0], [6.0, 0.0, 4.0, 
+1.0, -1.0]]], [[[4.0, 4.0, 4.0, -1.0, -7.0], [0.0, 0.0, -4.0, -4.0, 3.0], [7.0, -2.0, 6.0, 4.0, 0.0], [-6.0, -2.0, -1.0, -7.0, 
+7.0]], [[1.0, 5.0, -5.0, 3.0, 0.0], [0.0, -4.0, 1.0, 0.0, -4.0], [-2.0, 6.0, -6.0, 4.0, -3.0], [-1.0, -7.0, 7.0, 5.0, -3.0]], 
+[[-2.0, -1.0, -7.0, 4.0, -6.0], [-3.0, 2.0, 0.0, 0.0, 0.0], [6.0, 7.0, 5.0, 7.0, -3.0], [-6.0, -1.0, -3.0, -1.0, 
+-2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -2.0, 5.0, -4.0, 3.0], [0.0, 2.0, 3.0, 4.0, 2.0], [-1.0, 3.0, 3.0, 6.0, 6.0], 
+[-1.0, -5.0, 5.0, 6.0, 0.0]], [[1.0, 7.0, 2.0, -3.0, 1.0], [0.0, -5.0, -6.0, 7.0, 0.0], [0.0, -2.0, -1.0, 7.0, 1.0], [-7.0, 
+0.0, -2.0, 2.0, 2.0]], [[-5.0, -1.0, -1.0, 6.0, 2.0], [1.0, 6.0, 0.0, -7.0, -4.0], [6.0, -5.0, -1.0, -1.0, 1.0], [-6.0, 2.0, 
+-3.0, 0.0, -2.0]]], [[[1.0, 2.0, 7.0, 2.0, 0.0], [-5.0, 6.0, -1.0, 2.0, -5.0], [1.0, 0.0, -7.0, 2.0, -5.0], [2.0, -2.0, 5.0, 
+5.0, -3.0]], [[-5.0, -6.0, 1.0, 1.0, 7.0], [3.0, 0.0, -4.0, 6.0, 4.0], [7.0, -4.0, -2.0, 7.0, -1.0], [0.0, 5.0, 6.0, -4.0, 
+7.0]], [[0.0, 4.0, -4.0, 6.0, -4.0], [-6.0, 2.0, 5.0, 0.0, -7.0], [0.0, -2.0, 0.0, 5.0, 0.0], [-7.0, -3.0, -2.0, 2.0, 5.0]]]])
+      arg1=numpy.array([[7.0, 3.0, -3.0], [-7.0, -3.0, -5.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([29.0, 8.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank3_offset3(self):
-      arg0=numpy.array([[[[0.0, -1.0], [-7.0, -5.0], [-5.0, 2.0]], [[0.0, -1.0], [4.0, 4.0], [1.0, 4.0]], [[0.0, 2.0], [-4.0, 
--2.0], [5.0, -1.0]], [[5.0, 2.0], [-7.0, -4.0], [-6.0, 6.0]]], [[[7.0, 3.0], [0.0, -3.0], [4.0, 4.0]], [[1.0, 0.0], [6.0, 
--4.0], [0.0, -6.0]], [[4.0, -6.0], [1.0, -6.0], [5.0, 0.0]], [[-3.0, 0.0], [-4.0, 4.0], [5.0, -1.0]]]])
-      arg1=numpy.array([[[2.0, 4.0, 0.0], [-5.0, -2.0, 0.0], [7.0, -7.0, -3.0], [4.0, 4.0, 0.0]], [[0.0, 1.0, 6.0], [7.0, 4.0, 
--6.0], [2.0, 7.0, 4.0], [2.0, 7.0, 6.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([55.0, 7.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-40.0, -61.0, 39.0, -48.0, 120.0], [36.0, -7.0, 57.0, 31.0, -64.0], [-94.0, -50.0, -22.0, 
+-38.0, 84.0], [36.0, 29.0, -40.0, 0.0, -36.0]])+(1.-msk_ref)*numpy.array([[26.0, -6.0, 12.0, -102.0, 17.0], [53.0, -71.0, -3.0, 
+38.0, 84.0], [-53.0, 52.0, 76.0, 6.0, 80.0], [11.0, -27.0, -5.0, 15.0, -13.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank1_offset0(self):
-      arg0=numpy.array([-3.0, -6.0])
-      arg1=numpy.array([5.0, 1.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-5.0, -6.0, -5.0, 3.0, -7.0], [3.0, -3.0, 1.0, 6.0, -1.0], [4.0, 0.0, -3.0, -5.0, -5.0], 
+[0.0, -4.0, -6.0, 7.0, 4.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 5.0, 4.0, 0.0, -1.0], [2.0, 0.0, 0.0, 2.0, 3.0], [-3.0, 7.0, 
+-2.0, -2.0, -4.0], [7.0, -7.0, 2.0, 5.0, 0.0]])
+      arg1=numpy.array([-1.0, -2.0])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-15.0, -3.0], [-30.0, -6.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[5.0, 10.0], [6.0, 12.0], [5.0, 10.0], [-3.0, -6.0], [7.0, 14.0]], [[-3.0, -6.0], [3.0, 6.0], 
+[-1.0, -2.0], [-6.0, -12.0], [1.0, 2.0]], [[-4.0, -8.0], [0.0, 0.0], [3.0, 6.0], [5.0, 10.0], [5.0, 10.0]], [[0.0, 0.0], [4.0, 
+8.0], [6.0, 12.0], [-7.0, -14.0], [-4.0, -8.0]]])+(1.-msk_ref)*numpy.array([[[4.0, 8.0], [-5.0, -10.0], [-4.0, -8.0], [0.0, 
+0.0], [1.0, 2.0]], [[-2.0, -4.0], [0.0, 0.0], [0.0, 0.0], [-2.0, -4.0], [-3.0, -6.0]], [[3.0, 6.0], [-7.0, -14.0], [2.0, 4.0], 
+[2.0, 4.0], [4.0, 8.0]], [[-7.0, -14.0], [7.0, 14.0], [-2.0, -4.0], [-5.0, -10.0], [0.0, 0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank2_offset1(self):
-      arg0=numpy.array([[-4.0, -5.0], [-7.0, 5.0], [-3.0, -1.0]])
-      arg1=numpy.array([[3.0, -4.0], [-6.0, -3.0], [0.0, 0.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, -3.0, 0.0, -7.0, -6.0], [-3.0, 6.0, -3.0, -1.0, 3.0], [-5.0, 6.0, -6.0, 6.0, 2.0], 
+[3.0, 2.0, -5.0, 4.0, 4.0]], [[-6.0, 7.0, 4.0, 0.0, -3.0], [6.0, -7.0, 3.0, -5.0, 6.0], [-1.0, 3.0, 6.0, 3.0, -6.0], [-2.0, 
+2.0, -7.0, 3.0, -4.0]], [[4.0, -6.0, 0.0, 6.0, 2.0], [-7.0, 7.0, -4.0, 0.0, 5.0], [-1.0, -6.0, 0.0, 4.0, 4.0], [6.0, -4.0, 0.0, 
+-3.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 4.0, 0.0, 0.0, -5.0], [4.0, 2.0, 0.0, 2.0, -3.0], [5.0, -7.0, 0.0, -5.0, 2.0], 
+[0.0, 0.0, 3.0, 5.0, -2.0]], [[1.0, -5.0, 1.0, 0.0, 5.0], [-1.0, -1.0, -5.0, -5.0, 2.0], [2.0, -2.0, -3.0, 0.0, -2.0], [-7.0, 
+3.0, 7.0, 0.0, 0.0]], [[0.0, -2.0, 0.0, 6.0, -5.0], [2.0, 4.0, -1.0, 3.0, 4.0], [7.0, -1.0, -6.0, 4.0, 2.0], [3.0, 5.0, -2.0, 
+0.0, 6.0]]])
+      arg1=numpy.array([[7.0, 0.0], [1.0, -2.0], [7.0, 3.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[30.0, 37.0], [-45.0, 5.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[29.0, 24.0], [-56.0, -32.0], [4.0, -8.0], [-7.0, 18.0], [-31.0, 12.0]], [[-64.0, -33.0], 
+[84.0, 35.0], [-46.0, -18.0], [-12.0, 10.0], [62.0, 3.0]], [[-43.0, -1.0], [3.0, -24.0], [-36.0, -12.0], [73.0, 6.0], [36.0, 
+24.0]], [[61.0, 22.0], [-12.0, -16.0], [-42.0, 14.0], [10.0, -15.0], [17.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[22.0, -2.0], 
+[9.0, 4.0], [1.0, -2.0], [42.0, 18.0], [-65.0, -25.0]], [[41.0, 8.0], [41.0, 14.0], [-12.0, 7.0], [30.0, 19.0], [9.0, 8.0]], 
+[[86.0, 17.0], [-58.0, 1.0], [-45.0, -12.0], [-7.0, 12.0], [26.0, 10.0]], [[14.0, 23.0], [38.0, 9.0], [14.0, -20.0], [35.0, 
+0.0], [28.0, 18.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank3_offset2(self):
-      arg0=numpy.array([[[3.0, -5.0], [0.0, -4.0], [-6.0, -7.0]], [[-7.0, -6.0], [2.0, 1.0], [3.0, -2.0]]])
-      arg1=numpy.array([[[-2.0, 4.0], [-6.0, -5.0], [6.0, 5.0]], [[3.0, -6.0], [-6.0, -3.0], [-6.0, -2.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 7.0, -4.0, -1.0, -4.0], [-1.0, -2.0, 7.0, 0.0, -5.0], [-5.0, -7.0, 0.0, 4.0, -6.0], 
+[0.0, 3.0, -5.0, 7.0, -7.0]], [[-5.0, 6.0, 5.0, -5.0, 4.0], [-2.0, -5.0, 6.0, -4.0, -2.0], [-1.0, 5.0, -1.0, -7.0, -4.0], 
+[-5.0, 7.0, -5.0, 7.0, -5.0]], [[-1.0, -2.0, 6.0, -2.0, 1.0], [-1.0, -1.0, 7.0, -6.0, 0.0], [-3.0, -5.0, -4.0, 0.0, -3.0], 
+[-7.0, -4.0, 0.0, 7.0, 4.0]]], [[[-5.0, -6.0, 3.0, 7.0, -2.0], [6.0, 0.0, -3.0, -2.0, -1.0], [0.0, 6.0, -3.0, 0.0, 1.0], [-7.0, 
+2.0, 6.0, -6.0, -5.0]], [[3.0, 6.0, 4.0, 2.0, 0.0], [4.0, 6.0, -6.0, 7.0, 2.0], [-1.0, 2.0, -2.0, -4.0, 7.0], [-2.0, -1.0, 
+-5.0, -5.0, -5.0]], [[-3.0, 1.0, 7.0, -7.0, 0.0], [0.0, 0.0, -1.0, 6.0, 6.0], [6.0, 7.0, 2.0, 4.0, -3.0], [7.0, 1.0, -1.0, 
+-7.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 6.0, 7.0, -1.0, 1.0], [3.0, -6.0, -3.0, 1.0, 2.0], [-3.0, -3.0, -6.0, -2.0, 
+5.0], [1.0, 0.0, 2.0, -6.0, 0.0]], [[-1.0, -7.0, 5.0, 1.0, -7.0], [7.0, 3.0, 0.0, 6.0, 0.0], [-6.0, 5.0, -6.0, 2.0, 1.0], 
+[-4.0, 0.0, -6.0, 1.0, 1.0]], [[-3.0, 5.0, 0.0, 1.0, -3.0], [-7.0, 2.0, -2.0, -6.0, 2.0], [-3.0, -3.0, -3.0, -6.0, -6.0], 
+[-4.0, 4.0, 6.0, -4.0, -1.0]]], [[[-2.0, -2.0, -4.0, 1.0, 0.0], [0.0, -7.0, -7.0, 2.0, 2.0], [6.0, -4.0, -7.0, -7.0, 2.0], 
+[3.0, -4.0, -1.0, -3.0, 2.0]], [[7.0, 2.0, 1.0, 2.0, -3.0], [-6.0, -7.0, -2.0, 3.0, 1.0], [-6.0, -5.0, -4.0, 3.0, 0.0], [-6.0, 
+-4.0, 4.0, 0.0, -7.0]], [[-2.0, 0.0, 5.0, 3.0, 5.0], [0.0, -6.0, -7.0, 6.0, 7.0], [3.0, -3.0, 3.0, 7.0, 2.0], [-4.0, -3.0, 4.0, 
+-2.0, 0.0]]]])
+      arg1=numpy.array([[[3.0, 1.0], [7.0, -1.0], [-1.0, -2.0]], [[3.0, 6.0], [-3.0, 0.0], [-4.0, -5.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[-93.0, 12.0], [-20.0, 2.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank4_offset3(self):
-      arg0=numpy.array([[[[-1.0, 6.0], [-6.0, 0.0], [-1.0, -7.0]], [[1.0, 0.0], [5.0, -1.0], [-4.0, -7.0]], [[-6.0, -7.0], 
-[-4.0, -7.0], [-7.0, 0.0]], [[-6.0, 0.0], [-1.0, 1.0], [6.0, 6.0]]], [[[3.0, 0.0], [4.0, -1.0], [-7.0, 0.0]], [[6.0, 1.0], 
-[0.0, -6.0], [3.0, -3.0]], [[-7.0, 2.0], [4.0, 5.0], [6.0, 4.0]], [[-3.0, 2.0], [4.0, 6.0], [2.0, -2.0]]]])
-      arg1=numpy.array([[[[1.0, 0.0], [0.0, 7.0], [1.0, 1.0]], [[5.0, -1.0], [-6.0, 0.0], [0.0, 6.0]], [[0.0, -3.0], [-1.0, 
-5.0], [7.0, -3.0]], [[-2.0, 1.0], [0.0, -2.0], [0.0, 0.0]]], [[[-1.0, -4.0], [-2.0, 1.0], [-5.0, -7.0]], [[2.0, 4.0], [4.0, 
--5.0], [4.0, 1.0]], [[4.0, 4.0], [2.0, 1.0], [2.0, 2.0]], [[-3.0, 6.0], [-5.0, 6.0], [-3.0, 1.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([[-37.0, 11.0], [-24.0, 32.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-31.0, -3.0], [25.0, -36.0], [-14.0, -38.0], [7.0, 85.0], [9.0, -22.0]], [[-10.0, 39.0], 
+[-58.0, 5.0], [69.0, -26.0], [-73.0, -26.0], [-62.0, -39.0]], [[-40.0, -28.0], [3.0, -1.0], [-14.0, -19.0], [-41.0, -9.0], 
+[-49.0, 25.0]], [[-71.0, -58.0], [67.0, 11.0], [-13.0, 41.0], [88.0, -15.0], [-60.0, 
+-40.0]]])+(1.-msk_ref)*numpy.array([[[-26.0, 4.0], [-48.0, -9.0], [21.0, -47.0], [-12.0, -13.0], [-54.0, -11.0]], [[83.0, 
+10.0], [25.0, -25.0], [6.0, -6.0], [24.0, -11.0], [-21.0, -25.0]], [[-24.0, 30.0], [44.0, -11.0], [-78.0, -51.0], [-44.0, 
+-69.0], [26.0, 18.0]], [[22.0, 51.0], [8.0, -17.0], [-73.0, -30.0], [-8.0, -7.0], [35.0, 13.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank2_offset0(self):
-      arg0=numpy.array([3.0, -5.0])
-      arg1=numpy.array([[3.0, 6.0, -3.0, -4.0, 2.0], [-6.0, -1.0, 3.0, 0.0, 2.0], [4.0, 0.0, 4.0, 6.0, -3.0], [0.0, 3.0, -4.0, 
--2.0, -6.0]])
+   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -7.0, -3.0, -2.0, 3.0], [2.0, 3.0, -2.0, 5.0, 3.0], [-3.0, 7.0, 1.0, 1.0, 1.0], [0.0, 
+6.0, -2.0, 6.0, -3.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0, -6.0, 1.0, 0.0], [4.0, -3.0, -4.0, -3.0, -3.0], [6.0, 4.0, 3.0, 
+-3.0, -5.0], [7.0, -7.0, -2.0, 3.0, 3.0]])
+      arg1=numpy.array([[5.0, -3.0, -7.0, 3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 
+6.0, 0.0, 4.0]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[9.0, 18.0, -9.0, -12.0, 6.0], [-18.0, -3.0, 9.0, 0.0, 6.0], [12.0, 0.0, 12.0, 18.0, -9.0], [0.0, 9.0, 
--12.0, -6.0, -18.0]], [[-15.0, -30.0, 15.0, 20.0, -10.0], [30.0, 5.0, -15.0, 0.0, -10.0], [-20.0, 0.0, -20.0, -30.0, 15.0], 
-[0.0, -15.0, 20.0, 10.0, 30.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 
+21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], [[-35.0, 21.0, 49.0, -21.0, 35.0], [-7.0, 28.0, -42.0, 0.0, 14.0], [-49.0, 42.0, -21.0, 
+28.0, -49.0], [-21.0, 35.0, -42.0, 0.0, -28.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, 
+-9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]], [[-10.0, 6.0, 14.0, -6.0, 10.0], [-2.0, 8.0, -12.0, 0.0, 4.0], [-14.0, 
+12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], 
+[21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]]], [[[10.0, -6.0, -14.0, 6.0, -10.0], [2.0, -8.0, 12.0, 0.0, 
+-4.0], [14.0, -12.0, 6.0, -8.0, 14.0], [6.0, -10.0, 12.0, 0.0, 8.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, 
+-6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], [[-10.0, 6.0, 14.0, -6.0, 10.0], [-2.0, 8.0, -12.0, 
+0.0, 4.0], [-14.0, 12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[25.0, -15.0, -35.0, 15.0, -25.0], [5.0, -20.0, 
+30.0, 0.0, -10.0], [35.0, -30.0, 15.0, -20.0, 35.0], [15.0, -25.0, 30.0, 0.0, 20.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, 
+-12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]]], [[[-15.0, 9.0, 21.0, -9.0, 15.0], 
+[-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]], [[35.0, -21.0, -49.0, 21.0, 
+-35.0], [7.0, -28.0, 42.0, 0.0, -14.0], [49.0, -42.0, 21.0, -28.0, 49.0], [21.0, -35.0, 42.0, 0.0, 28.0]], [[5.0, -3.0, -7.0, 
+3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 0.0, 4.0]], [[5.0, -3.0, -7.0, 3.0, 
+-5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 0.0, 4.0]], [[5.0, -3.0, -7.0, 3.0, -5.0], 
+[1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 0.0, 4.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[30.0, -18.0, -42.0, 18.0, -30.0], [6.0, -24.0, 36.0, 
+0.0, -12.0], [42.0, -36.0, 18.0, -24.0, 42.0], [18.0, -30.0, 36.0, 0.0, 24.0]], [[-10.0, 6.0, 14.0, -6.0, 10.0], [-2.0, 8.0, 
+-12.0, 0.0, 4.0], [-14.0, 12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[30.0, -18.0, -42.0, 18.0, -30.0], [6.0, 
+-24.0, 36.0, 0.0, -12.0], [42.0, -36.0, 18.0, -24.0, 42.0], [18.0, -30.0, 36.0, 0.0, 24.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], 
+[-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, 
+-12.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[5.0, -3.0, -7.0, 3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 
+0.0, 4.0]], [[-30.0, 18.0, 42.0, -18.0, 30.0], [-6.0, 24.0, -36.0, 0.0, 12.0], [-42.0, 36.0, -18.0, 24.0, -42.0], [-18.0, 30.0, 
+-36.0, 0.0, -24.0]], [[5.0, -3.0, -7.0, 3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 
+0.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
+[[[20.0, -12.0, -28.0, 12.0, -20.0], [4.0, -16.0, 24.0, 0.0, -8.0], [28.0, -24.0, 12.0, -16.0, 28.0], [12.0, -20.0, 24.0, 0.0, 
+16.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 
+0.0, -12.0]], [[-20.0, 12.0, 28.0, -12.0, 20.0], [-4.0, 16.0, -24.0, 0.0, 8.0], [-28.0, 24.0, -12.0, 16.0, -28.0], [-12.0, 
+20.0, -24.0, 0.0, -16.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], 
+[-9.0, 15.0, -18.0, 0.0, -12.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, 
+-21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]]], [[[30.0, -18.0, -42.0, 18.0, -30.0], [6.0, -24.0, 36.0, 0.0, -12.0], [42.0, -36.0, 
+18.0, -24.0, 42.0], [18.0, -30.0, 36.0, 0.0, 24.0]], [[20.0, -12.0, -28.0, 12.0, -20.0], [4.0, -16.0, 24.0, 0.0, -8.0], [28.0, 
+-24.0, 12.0, -16.0, 28.0], [12.0, -20.0, 24.0, 0.0, 16.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], 
+[21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 
+6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]], [[-25.0, 15.0, 35.0, -15.0, 25.0], [-5.0, 20.0, 
+-30.0, 0.0, 10.0], [-35.0, 30.0, -15.0, 20.0, -35.0], [-15.0, 25.0, -30.0, 0.0, -20.0]]], [[[35.0, -21.0, -49.0, 21.0, -35.0], 
+[7.0, -28.0, 42.0, 0.0, -14.0], [49.0, -42.0, 21.0, -28.0, 49.0], [21.0, -35.0, 42.0, 0.0, 28.0]], [[-35.0, 21.0, 49.0, -21.0, 
+35.0], [-7.0, 28.0, -42.0, 0.0, 14.0], [-49.0, 42.0, -21.0, 28.0, -49.0], [-21.0, 35.0, -42.0, 0.0, -28.0]], [[-10.0, 6.0, 
+14.0, -6.0, 10.0], [-2.0, 8.0, -12.0, 0.0, 4.0], [-14.0, 12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[15.0, 
+-9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], 
+[[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 
+12.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank3_offset1(self):
-      arg0=numpy.array([[3.0, -7.0], [-2.0, -1.0], [-4.0, -1.0]])
-      arg1=numpy.array([[[-7.0, -4.0, 5.0, 7.0, 3.0], [0.0, -4.0, 6.0, 5.0, 6.0], [1.0, 5.0, 5.0, 2.0, 3.0], [-6.0, 4.0, 4.0, 
-2.0, -1.0]], [[-7.0, 1.0, 2.0, -4.0, -2.0], [7.0, -4.0, 0.0, 0.0, 2.0], [5.0, -7.0, -6.0, 7.0, 0.0], [-1.0, -2.0, 4.0, -7.0, 
--3.0]], [[-1.0, -4.0, 5.0, -6.0, 1.0], [3.0, 5.0, 3.0, 2.0, 3.0], [-2.0, -5.0, -5.0, 0.0, -1.0], [0.0, 0.0, 1.0, 1.0, -7.0]]])
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, -3.0, -2.0, -5.0, -6.0], [7.0, 4.0, 6.0, 1.0, -7.0], [1.0, 0.0, 4.0, 0.0, -5.0], 
+[-6.0, -7.0, 7.0, 2.0, 2.0]], [[-3.0, -6.0, -1.0, -5.0, 3.0], [6.0, -3.0, 0.0, 0.0, 7.0], [-7.0, -6.0, 0.0, -2.0, 2.0], [0.0, 
+-4.0, 6.0, 6.0, -6.0]], [[-1.0, -4.0, 2.0, -6.0, 5.0], [6.0, -5.0, -2.0, 6.0, 5.0], [4.0, 0.0, 4.0, 6.0, -7.0], [5.0, 6.0, 1.0, 
+2.0, 4.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, -7.0, -1.0, 0.0, 7.0], [-6.0, 3.0, 7.0, -6.0, -2.0], [2.0, 4.0, -2.0, -3.0, 
+-2.0], [-6.0, -7.0, 4.0, -2.0, -2.0]], [[-5.0, -2.0, -1.0, 3.0, 7.0], [7.0, 0.0, -4.0, 4.0, -5.0], [-4.0, -3.0, -2.0, 5.0, 
+5.0], [7.0, -7.0, -3.0, -6.0, 3.0]], [[6.0, 4.0, 5.0, 0.0, 1.0], [0.0, 0.0, -6.0, 7.0, 5.0], [-3.0, 7.0, -4.0, -3.0, -3.0], 
+[2.0, -4.0, 7.0, -1.0, 5.0]]])
+      arg1=numpy.array([[[-4.0, -6.0, 7.0, 5.0, 5.0], [6.0, -5.0, 1.0, -7.0, 5.0], [6.0, -4.0, 6.0, -3.0, 4.0], [6.0, 0.0, 
+-5.0, 1.0, 2.0]], [[-2.0, 4.0, 3.0, 2.0, 6.0], [0.0, -6.0, -3.0, -4.0, -7.0], [5.0, 0.0, 1.0, -5.0, 7.0], [-7.0, -4.0, 6.0, 
+0.0, 7.0]], [[2.0, 5.0, -1.0, 6.0, 4.0], [4.0, -4.0, -4.0, -7.0, 7.0], [4.0, 1.0, -6.0, 4.0, -2.0], [5.0, 7.0, 1.0, 0.0, 1.0]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-3.0, 2.0, -9.0, 53.0, 9.0], [-26.0, -24.0, 6.0, 7.0, 2.0], [1.0, 49.0, 47.0, -8.0, 13.0], [-16.0, 
-16.0, 0.0, 16.0, 31.0]], [[57.0, 31.0, -42.0, -39.0, -20.0], [-10.0, 27.0, -45.0, -37.0, -47.0], [-10.0, -23.0, -24.0, -21.0, 
--20.0], [43.0, -26.0, -33.0, -8.0, 17.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[32.0, 25.0, -57.0, -47.0, -57.0], [-46.0, 57.0, 6.0, 68.0, -21.0], [-61.0, 27.0, -39.0, 32.0, 
+-47.0], [-26.0, 5.0, 16.0, -7.0, -36.0]], [[16.0, -26.0, -35.0, -51.0, -67.0], [-34.0, 67.0, 31.0, 73.0, -1.0], [-64.0, 8.0, 
+0.0, 23.0, -46.0], [4.0, -4.0, -25.0, -3.0, -52.0]], [[14.0, 18.0, -19.0, 0.0, -8.0], [-4.0, 8.0, -7.0, 4.0, 11.0], [-9.0, 
+10.0, -25.0, 19.0, -19.0], [5.0, 18.0, 6.0, -2.0, -9.0]], [[18.0, -20.0, -44.0, -71.0, -79.0], [-54.0, 79.0, 34.0, 97.0, 
+-32.0], [-79.0, 14.0, 1.0, 16.0, -43.0], [-25.0, -22.0, -11.0, -5.0, -51.0]], [[28.0, 73.0, -38.0, 6.0, 8.0], [-16.0, -8.0, 
+-35.0, -5.0, -16.0], [-1.0, 29.0, -63.0, 23.0, -13.0], [-32.0, 23.0, 53.0, -6.0, 14.0]]], [[[-28.0, 12.0, 61.0, 83.0, 95.0], 
+[66.0, -95.0, -35.0, -115.0, 35.0], [96.0, -22.0, 12.0, -27.0, 58.0], [30.0, 18.0, 7.0, 7.0, 62.0]], [[-20.0, -61.0, 24.0, 
+-16.0, -18.0], [4.0, 18.0, 33.0, 19.0, 6.0], [-11.0, -21.0, 51.0, -17.0, 5.0], [20.0, -23.0, -43.0, 4.0, -18.0]], [[-28.0, 
+-46.0, 44.0, 18.0, 22.0], [28.0, -22.0, 14.0, -28.0, 16.0], [28.0, -26.0, 48.0, -26.0, 28.0], [26.0, -14.0, -32.0, 6.0, 10.0]], 
+[[8.0, 24.0, 1.0, 41.0, 29.0], [30.0, -29.0, -23.0, -49.0, 47.0], [30.0, 2.0, -30.0, 21.0, -8.0], [36.0, 42.0, 1.0, 1.0, 8.0]], 
+[[24.0, 95.0, -33.0, 9.0, 27.0], [-22.0, -27.0, -48.0, -14.0, -49.0], [13.0, 33.0, -65.0, 6.0, 11.0], [-66.0, 7.0, 82.0, -7.0, 
+40.0]]], [[[18.0, -14.0, -18.0, 15.0, -21.0], [22.0, 21.0, 6.0, -7.0, 82.0], [-13.0, 0.0, -25.0, 48.0, -53.0], [75.0, 56.0, 
+-43.0, 1.0, -43.0]], [[12.0, -24.0, -18.0, -12.0, -36.0], [0.0, 36.0, 18.0, 24.0, 42.0], [-30.0, 0.0, -6.0, 30.0, -42.0], 
+[42.0, 24.0, -36.0, 0.0, -42.0]], [[-8.0, -4.0, 24.0, 44.0, 36.0], [40.0, -36.0, -12.0, -56.0, 48.0], [40.0, -12.0, 0.0, 4.0, 
+8.0], [44.0, 28.0, -16.0, 4.0, 12.0]], [[16.0, 22.0, -12.0, 32.0, 12.0], [24.0, -12.0, -18.0, -34.0, 56.0], [14.0, 6.0, -38.0, 
+34.0, -26.0], [44.0, 50.0, -6.0, 0.0, -8.0]], [[2.0, 3.0, -22.0, -63.0, -41.0], [-58.0, 41.0, 17.0, 76.0, -88.0], [-48.0, 13.0, 
+14.0, -23.0, 8.0], [-79.0, -57.0, 30.0, -5.0, -3.0]]], [[[34.0, 61.0, -47.0, 0.0, -10.0], [-16.0, 10.0, -26.0, 7.0, 5.0], 
+[-16.0, 29.0, -66.0, 38.0, -34.0], [-11.0, 35.0, 35.0, -6.0, -7.0]], [[48.0, 56.0, -67.0, -7.0, -35.0], [-18.0, 35.0, -19.0, 
+23.0, 35.0], [-38.0, 34.0, -82.0, 65.0, -68.0], [16.0, 58.0, 17.0, -7.0, -36.0]], [[-38.0, -13.0, 66.0, 53.0, 75.0], [46.0, 
+-75.0, -15.0, -80.0, 0.0], [76.0, -27.0, 42.0, -47.0, 68.0], [5.0, -17.0, 2.0, 7.0, 57.0]], [[-16.0, 22.0, 30.0, 34.0, 54.0], 
+[20.0, -54.0, -24.0, -52.0, -18.0], [50.0, -6.0, 6.0, -28.0, 46.0], [-20.0, -10.0, 28.0, 2.0, 48.0]], [[12.0, -16.0, -8.0, 
+22.0, -10.0], [28.0, 10.0, 4.0, -18.0, 80.0], [-2.0, -4.0, -18.0, 40.0, -42.0], [74.0, 52.0, -42.0, 2.0, 
+-34.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -32.0, 28.0, 61.0, 29.0], [66.0, -29.0, -2.0, -71.0, 112.0], [41.0, -22.0, 1.0, 
+28.0, -19.0], [107.0, 62.0, -59.0, 7.0, -15.0]], [[40.0, 54.0, -59.0, -15.0, -31.0], [-26.0, 31.0, -17.0, 29.0, 7.0], [-36.0, 
+32.0, -68.0, 47.0, -50.0], [-8.0, 36.0, 27.0, -7.0, -24.0]], [[16.0, 27.0, -15.0, 23.0, 9.0], [14.0, -9.0, -18.0, -24.0, 37.0], 
+[9.0, 9.0, -37.0, 28.0, -21.0], [26.0, 39.0, 4.0, -1.0, -4.0]], [[-6.0, 12.0, 9.0, 6.0, 18.0], [0.0, -18.0, -9.0, -12.0, 
+-21.0], [15.0, 0.0, 3.0, -15.0, 21.0], [-21.0, -12.0, 18.0, 0.0, 21.0]], [[-40.0, -9.0, 69.0, 55.0, 81.0], [46.0, -81.0, -18.0, 
+-84.0, -7.0], [81.0, -27.0, 43.0, -52.0, 75.0], [-2.0, -21.0, 8.0, 7.0, 64.0]]], [[[10.0, 64.0, -21.0, -16.0, 12.0], [-36.0, 
+-12.0, -27.0, 14.0, -79.0], [-1.0, 24.0, -29.0, -17.0, 25.0], [-85.0, -28.0, 72.0, -6.0, 37.0]], [[-12.0, -18.0, 21.0, 15.0, 
+15.0], [18.0, -15.0, 3.0, -21.0, 15.0], [18.0, -12.0, 18.0, -9.0, 12.0], [18.0, 0.0, -15.0, 3.0, 6.0]], [[-32.0, -88.0, 43.0, 
+-9.0, -13.0], [18.0, 13.0, 43.0, 9.0, 21.0], [-2.0, -34.0, 74.0, -25.0, 12.0], [40.0, -26.0, -65.0, 7.0, -20.0]], [[30.0, 87.0, 
+-37.0, 20.0, 22.0], [-8.0, -22.0, -46.0, -23.0, -9.0], [12.0, 31.0, -74.0, 26.0, -10.0], [-29.0, 33.0, 61.0, -6.0, 23.0]], 
+[[28.0, 17.0, -34.0, 10.0, -20.0], [8.0, 20.0, -7.0, -1.0, 60.0], [-17.0, 13.0, -47.0, 51.0, -53.0], [48.0, 55.0, -15.0, -2.0, 
+-34.0]]], [[[-6.0, -43.0, 5.0, -16.0, -26.0], [0.0, 26.0, 26.0, 23.0, 17.0], [-20.0, -11.0, 26.0, 2.0, -14.0], [25.0, -5.0, 
+-37.0, 2.0, -27.0]], [[4.0, -1.0, 12.0, 56.0, 30.0], [52.0, -30.0, -15.0, -65.0, 90.0], [37.0, -9.0, -21.0, 31.0, -19.0], 
+[80.0, 61.0, -31.0, 4.0, -6.0]], [[4.0, -16.0, -16.0, -38.0, -38.0], [-28.0, 38.0, 20.0, 50.0, -24.0], [-38.0, 4.0, 10.0, 0.0, 
+-14.0], [-18.0, -20.0, -6.0, -2.0, -22.0]], [[-4.0, 23.0, -3.0, -23.0, 3.0], [-30.0, -3.0, -6.0, 22.0, -71.0], [-5.0, 9.0, 5.0, 
+-28.0, 29.0], [-68.0, -41.0, 42.0, -3.0, 26.0]], [[-8.0, 17.0, 4.0, -18.0, 8.0], [-24.0, -8.0, -5.0, 15.0, -66.0], [1.0, 5.0, 
+11.0, -31.0, 33.0], [-62.0, -41.0, 37.0, -2.0, 28.0]]], [[[14.0, 74.0, -23.0, -4.0, 20.0], [-28.0, -20.0, -35.0, 0.0, -65.0], 
+[7.0, 26.0, -41.0, -9.0, 21.0], [-75.0, -14.0, 74.0, -6.0, 39.0]], [[34.0, -6.0, -66.0, -73.0, -93.0], [-58.0, 93.0, 30.0, 
+105.0, -14.0], [-93.0, 24.0, -25.0, 40.0, -69.0], [-13.0, 0.0, -11.0, -7.0, -67.0]], [[4.0, -1.0, 12.0, 56.0, 30.0], [52.0, 
+-30.0, -15.0, -65.0, 90.0], [37.0, -9.0, -21.0, 31.0, -19.0], [80.0, 61.0, -31.0, 4.0, -6.0]], [[18.0, -17.0, -31.0, -28.0, 
+-50.0], [-16.0, 50.0, 20.0, 45.0, 25.0], [-46.0, 7.0, -12.0, 32.0, -48.0], [25.0, 17.0, -27.0, -2.0, -47.0]], [[12.0, 49.0, 
+-10.0, 26.0, 28.0], [8.0, -28.0, -31.0, -33.0, 4.0], [23.0, 13.0, -39.0, 11.0, 3.0], [-8.0, 23.0, 33.0, -2.0, 22.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank4_offset2(self):
-      arg0=numpy.array([[[0.0, 7.0], [0.0, 3.0], [-5.0, 3.0]], [[3.0, -2.0], [0.0, 5.0], [0.0, -1.0]]])
-      arg1=numpy.array([[[[0.0, 2.0, -2.0, 7.0, 5.0], [6.0, 2.0, 3.0, 0.0, 0.0], [4.0, 5.0, -1.0, 0.0, -4.0], [2.0, -6.0, 7.0, 
-3.0, 0.0]], [[-6.0, 0.0, -7.0, -4.0, 6.0], [6.0, 3.0, 1.0, 2.0, 7.0], [-6.0, 6.0, 3.0, -6.0, 1.0], [-7.0, -6.0, 7.0, -3.0, 
--1.0]], [[2.0, -7.0, 6.0, -2.0, -3.0], [5.0, -6.0, -5.0, -2.0, 5.0], [0.0, 3.0, 6.0, 5.0, 1.0], [-7.0, -3.0, 5.0, 7.0, 3.0]]], 
-[[[3.0, -7.0, -5.0, 0.0, 6.0], [0.0, -6.0, -1.0, 6.0, 2.0], [-4.0, -3.0, 2.0, 0.0, -5.0], [1.0, 5.0, 1.0, 4.0, -5.0]], [[3.0, 
-5.0, 0.0, 0.0, 3.0], [0.0, 7.0, -1.0, 0.0, 4.0], [-4.0, 6.0, 1.0, -2.0, 7.0], [1.0, 1.0, -1.0, 0.0, 5.0]], [[-7.0, 2.0, -4.0, 
-4.0, 1.0], [5.0, -3.0, 6.0, 1.0, -3.0], [0.0, 4.0, 5.0, 3.0, 4.0], [7.0, 0.0, -3.0, 4.0, -3.0]]]])
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 3.0, -2.0, 1.0, 0.0], [6.0, 6.0, -1.0, 3.0, -3.0], [-4.0, -1.0, 0.0, -4.0, 7.0], 
+[-2.0, 6.0, -3.0, 5.0, 0.0]], [[-2.0, -5.0, -1.0, 7.0, -6.0], [0.0, 1.0, 0.0, -5.0, 5.0], [5.0, -2.0, -5.0, -1.0, -6.0], [-7.0, 
+-1.0, -6.0, 6.0, 4.0]], [[-4.0, 7.0, 0.0, 5.0, 7.0], [4.0, 2.0, -6.0, 4.0, 5.0], [-2.0, -1.0, -1.0, 1.0, 7.0], [-3.0, 2.0, 1.0, 
+6.0, 1.0]]], [[[-3.0, -3.0, -6.0, 0.0, 6.0], [2.0, 0.0, 3.0, -1.0, -7.0], [-2.0, -4.0, 0.0, -4.0, 3.0], [5.0, 0.0, 0.0, 0.0, 
+3.0]], [[-6.0, -7.0, 6.0, 0.0, 2.0], [0.0, 3.0, 6.0, -7.0, 4.0], [7.0, 5.0, -1.0, 6.0, -3.0], [5.0, 1.0, -2.0, -5.0, 1.0]], 
+[[-3.0, 4.0, -5.0, 3.0, -3.0], [3.0, 6.0, 7.0, 7.0, 2.0], [-4.0, -1.0, -5.0, -5.0, -3.0], [1.0, -4.0, 0.0, 0.0, 
+-2.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 4.0, 1.0, 5.0, 4.0], [-1.0, 1.0, 2.0, -5.0, 0.0], [-6.0, 5.0, 0.0, 0.0, -1.0], 
+[-3.0, -3.0, -6.0, -1.0, 0.0]], [[-1.0, -1.0, 2.0, -3.0, 0.0], [-6.0, 1.0, 7.0, -3.0, 2.0], [-4.0, 0.0, 0.0, 2.0, -7.0], [1.0, 
+-2.0, -2.0, 1.0, 0.0]], [[-3.0, -4.0, 7.0, -4.0, -4.0], [5.0, 7.0, 5.0, -7.0, 4.0], [-2.0, 0.0, 3.0, 4.0, -2.0], [-1.0, -4.0, 
+7.0, 1.0, -2.0]]], [[[-4.0, -5.0, 2.0, 1.0, 6.0], [0.0, 5.0, 2.0, -5.0, 0.0], [0.0, -7.0, -1.0, 4.0, -2.0], [2.0, 1.0, 1.0, 
+2.0, 6.0]], [[-7.0, -5.0, -3.0, 6.0, 4.0], [7.0, 6.0, 3.0, -5.0, -4.0], [0.0, -6.0, -6.0, -4.0, -7.0], [5.0, 2.0, -1.0, -4.0, 
+-3.0]], [[4.0, 1.0, 2.0, 5.0, 0.0], [-7.0, -6.0, 4.0, 0.0, 4.0], [-5.0, -1.0, 0.0, 2.0, 2.0], [5.0, 4.0, -1.0, -3.0, 4.0]]]])
+      arg1=numpy.array([[[[3.0, -6.0, 5.0, -5.0, -5.0], [-4.0, -7.0, -1.0, 2.0, -4.0], [-1.0, 1.0, -4.0, 0.0, 1.0], [-7.0, 
+-6.0, -4.0, -1.0, -1.0]], [[1.0, 3.0, -4.0, -4.0, 4.0], [6.0, -7.0, -1.0, 0.0, -7.0], [-4.0, 4.0, -7.0, -3.0, 4.0], [6.0, -4.0, 
+0.0, 7.0, -2.0]], [[-2.0, 0.0, 1.0, 6.0, 0.0], [-3.0, -3.0, -6.0, 4.0, 7.0], [6.0, 6.0, 2.0, 4.0, 0.0], [2.0, -1.0, 0.0, -3.0, 
+-5.0]]], [[[0.0, 7.0, -5.0, 2.0, 0.0], [1.0, 3.0, 0.0, -6.0, 6.0], [4.0, -6.0, 6.0, 0.0, -2.0], [-1.0, -3.0, -1.0, -3.0, 2.0]], 
+[[1.0, 3.0, 5.0, 3.0, 2.0], [6.0, 7.0, 7.0, 1.0, 6.0], [2.0, 0.0, 3.0, -2.0, 7.0], [6.0, 1.0, -2.0, 6.0, 2.0]], [[4.0, 2.0, 
+1.0, 0.0, 7.0], [-3.0, 6.0, 3.0, -3.0, 7.0], [-7.0, 4.0, -2.0, -4.0, 3.0], [7.0, 4.0, 4.0, -4.0, -1.0]]]])
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[-1.0, 14.0, -45.0, 10.0, 33.0], [-25.0, 12.0, 22.0, 28.0, -19.0], [-12.0, -24.0, -24.0, -25.0, -20.0], 
-[38.0, 30.0, -22.0, -23.0, -30.0]], [[4.0, 30.0, -3.0, 27.0, 46.0], [70.0, 55.0, 0.0, -13.0, 55.0], [-2.0, 94.0, 16.0, -16.0, 
-19.0], [-32.0, -74.0, 81.0, 21.0, 44.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_array_rank3_offset0(self):
-      arg0=numpy.array([-3.0, 5.0])
-      arg1=numpy.array([[[-6.0, 0.0], [-5.0, 5.0]], [[6.0, 4.0], [0.0, 1.0]], [[-1.0, -7.0], [-1.0, 7.0]], [[-4.0, -6.0], [6.0, 
-0.0]], [[-1.0, 0.0], [2.0, -4.0]], [[-6.0, -3.0], [7.0, 1.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[18.0, 0.0], [15.0, -15.0]], [[-18.0, -12.0], [0.0, -3.0]], [[3.0, 21.0], [3.0, -21.0]], [[12.0, 
-18.0], [-18.0, 0.0]], [[3.0, 0.0], [-6.0, 12.0]], [[18.0, 9.0], [-21.0, -3.0]]], [[[-30.0, 0.0], [-25.0, 25.0]], [[30.0, 20.0], 
-[0.0, 5.0]], [[-5.0, -35.0], [-5.0, 35.0]], [[-20.0, -30.0], [30.0, 0.0]], [[-5.0, 0.0], [10.0, -20.0]], [[-30.0, -15.0], 
-[35.0, 5.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank4_offset1(self):
-      arg0=numpy.array([[1.0, -1.0], [-5.0, 0.0], [1.0, -7.0]])
-      arg1=numpy.array([[[[2.0, -2.0], [1.0, -6.0]], [[0.0, -7.0], [-3.0, -3.0]], [[-2.0, 7.0], [2.0, 4.0]], [[-6.0, 3.0], 
-[4.0, 4.0]], [[0.0, 4.0], [3.0, -7.0]], [[-6.0, 2.0], [3.0, -3.0]]], [[[0.0, -2.0], [-3.0, 5.0]], [[-6.0, 1.0], [2.0, -3.0]], 
-[[-6.0, -5.0], [0.0, -2.0]], [[0.0, -4.0], [3.0, -4.0]], [[7.0, -1.0], [-7.0, 0.0]], [[-4.0, -5.0], [-2.0, 0.0]]], [[[-2.0, 
--2.0], [-6.0, -2.0]], [[7.0, 7.0], [-6.0, -4.0]], [[-5.0, 0.0], [-2.0, 4.0]], [[-2.0, 7.0], [-2.0, 7.0]], [[-5.0, -2.0], [1.0, 
--7.0]], [[-3.0, -5.0], [-5.0, 6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[0.0, 6.0], [10.0, -33.0]], [[37.0, -5.0], [-19.0, 8.0]], [[23.0, 32.0], [0.0, 18.0]], [[-8.0, 30.0], 
-[-13.0, 31.0]], [[-40.0, 7.0], [39.0, -14.0]], [[11.0, 22.0], [8.0, 3.0]]], [[[12.0, 16.0], [41.0, 20.0]], [[-49.0, -42.0], 
-[45.0, 31.0]], [[37.0, -7.0], [12.0, -32.0]], [[20.0, -52.0], [10.0, -53.0]], [[35.0, 10.0], [-10.0, 56.0]], [[27.0, 33.0], 
-[32.0, -39.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[3.0, -81.0, 11.0, -65.0, -66.0], [-50.0, -78.0, -30.0, 15.0, -109.0], [-24.0, -21.0, -44.0, 
+14.0, -48.0], [-109.0, -27.0, -17.0, -22.0, 4.0]], [[-1.0, -67.0, 26.0, 20.0, -21.0], [-120.0, -41.0, -77.0, 33.0, 40.0], [5.0, 
+59.0, -10.0, 41.0, -48.0], [-48.0, 13.0, 21.0, -108.0, -52.0]], [[-21.0, -25.0, 49.0, 20.0, -17.0], [47.0, 15.0, 30.0, 53.0, 
+-20.0], [29.0, 10.0, 7.0, 11.0, 33.0], [15.0, 20.0, -18.0, 69.0, 9.0]], [[12.0, 21.0, -15.0, -3.0, 44.0], [14.0, -53.0, -29.0, 
+13.0, 3.0], [-20.0, 71.0, -49.0, -13.0, 38.0], [66.0, -27.0, 8.0, 21.0, -43.0]], [[-30.0, 24.0, 8.0, 84.0, -41.0], [-30.0, 
+35.0, -31.0, 3.0, 118.0], [115.0, -30.0, 104.0, 54.0, -31.0], [-37.0, -11.0, -22.0, -57.0, -4.0]]], [[[22.0, -16.0, 27.0, -2.0, 
+-9.0], [-43.0, -30.0, -21.0, 7.0, 37.0], [5.0, 30.0, -10.0, 4.0, 11.0], [-15.0, -34.0, -14.0, -36.0, -25.0]], [[42.0, -12.0, 
+49.0, -13.0, 22.0], [-24.0, 2.0, 20.0, 5.0, 43.0], [-34.0, 46.0, -30.0, -25.0, 49.0], [28.0, -15.0, -6.0, -11.0, -18.0]], 
+[[43.0, 59.0, 11.0, -7.0, 66.0], [40.0, 118.0, 100.0, -59.0, 65.0], [-60.0, -27.0, 14.0, -64.0, 56.0], [77.0, 37.0, 17.0, 18.0, 
+42.0]], [[17.0, -47.0, 16.0, 6.0, 0.0], [-118.0, -8.0, -50.0, 0.0, 52.0], [-26.0, 41.0, -10.0, 17.0, -43.0], [-35.0, 22.0, 
+31.0, -117.0, -36.0]], [[-2.0, 0.0, 27.0, 23.0, 57.0], [38.0, -10.0, 2.0, 54.0, 8.0], [-21.0, 97.0, -47.0, -11.0, 65.0], 
+[106.0, 26.0, 19.0, 60.0, -40.0]]], [[[-12.0, 38.0, -1.0, 5.0, 26.0], [104.0, 18.0, 48.0, 15.0, -31.0], [6.0, 0.0, -6.0, -21.0, 
+57.0], [70.0, 3.0, -12.0, 109.0, 18.0]], [[-2.0, -15.0, 46.0, 14.0, 0.0], [24.0, 41.0, 41.0, 26.0, 10.0], [4.0, 5.0, 9.0, -4.0, 
+31.0], [20.0, 28.0, -6.0, 36.0, 13.0]], [[-24.0, -28.0, 9.0, 11.0, -57.0], [-18.0, 1.0, -11.0, 10.0, -13.0], [47.0, -46.0, 
+40.0, 33.0, -42.0], [-73.0, 0.0, -18.0, -18.0, 18.0]], [[-29.0, 1.0, 30.0, 40.0, -7.0], [54.0, 32.0, 26.0, 41.0, 7.0], [45.0, 
+2.0, 29.0, 15.0, 27.0], [29.0, 25.0, -12.0, 62.0, 10.0]], [[-14.0, -54.0, 33.0, 28.0, -86.0], [-91.0, -58.0, -73.0, 30.0, 
+42.0], [86.0, -5.0, 43.0, 64.0, -53.0], [-113.0, -49.0, -37.0, -85.0, -27.0]]], [[[2.0, 43.0, 16.0, 45.0, -1.0], [7.0, 128.0, 
+65.0, -44.0, 103.0], [35.0, -74.0, 94.0, -5.0, -2.0], [-2.0, 37.0, -3.0, -27.0, 50.0]], [[-2.0, -44.0, 37.0, -11.0, -60.0], 
+[-18.0, -58.0, -22.0, 33.0, -25.0], [40.0, -2.0, -2.0, 25.0, -3.0], [-66.0, -49.0, -42.0, 3.0, -8.0]], [[-19.0, -6.0, 0.0, 
+39.0, -13.0], [-39.0, 46.0, -11.0, -4.0, 49.0], [29.0, -21.0, 50.0, 26.0, -41.0], [-25.0, 39.0, 16.0, -54.0, 6.0]], [[4.0, 
+-27.0, -18.0, -28.0, -11.0], [-32.0, -130.0, -82.0, 29.0, -50.0], [-3.0, 65.0, -65.0, 16.0, -6.0], [-17.0, -65.0, -10.0, -11.0, 
+-57.0]], [[-5.0, 32.0, -27.0, -1.0, 4.0], [36.0, -27.0, -9.0, -7.0, -11.0], [18.0, -4.0, -1.0, -2.0, 11.0], [15.0, -33.0, 
+-13.0, 30.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[26.0, -68.0, 10.0, -63.0, -10.0], [-71.0, -49.0, -22.0, 1.0, -68.0], 
+[-76.0, 22.0, -68.0, -11.0, -29.0], [-50.0, 4.0, 18.0, -48.0, -13.0]], [[18.0, -75.0, 21.0, -65.0, -27.0], [-48.0, -53.0, 
+-11.0, 14.0, -90.0], [-61.0, 10.0, -64.0, -7.0, -22.0], [-60.0, -2.0, 3.0, -18.0, -3.0]], [[-4.0, 9.0, -19.0, 24.0, 11.0], 
+[-35.0, -45.0, -60.0, 9.0, 39.0], [21.0, 47.0, -5.0, 20.0, -10.0], [13.0, -22.0, 8.0, -40.0, -44.0]], [[46.0, -4.0, 63.0, 
+-17.0, 10.0], [-4.0, 73.0, 79.0, -21.0, 50.0], [-36.0, -17.0, 7.0, -39.0, 48.0], [9.0, 9.0, -13.0, -1.0, 30.0]], [[24.0, 30.0, 
+6.0, -20.0, -12.0], [26.0, 30.0, 48.0, -40.0, 16.0], [4.0, -56.0, 24.0, -24.0, 20.0], [-18.0, -34.0, -30.0, 14.0, 36.0]]], 
+[[[-40.0, -5.0, 52.0, 80.0, -54.0], [16.0, 41.0, 5.0, 46.0, 74.0], [118.0, -23.0, 91.0, 52.0, 3.0], [-26.0, 4.0, -38.0, 14.0, 
+9.0]], [[-28.0, 38.0, 7.0, 61.0, -31.0], [40.0, -14.0, -20.0, 24.0, 62.0], [111.0, -7.0, 63.0, 37.0, 19.0], [2.0, -50.0, -45.0, 
+30.0, -10.0]], [[22.0, 40.0, -4.0, 5.0, 52.0], [27.0, -27.0, -6.0, 3.0, 36.0], [-14.0, 64.0, -34.0, -23.0, 59.0], [82.0, -32.0, 
+0.0, 28.0, -35.0]], [[-9.0, -29.0, -20.0, -30.0, 3.0], [-12.0, 27.0, 15.0, -13.0, -68.0], [-55.0, -29.0, -18.0, -9.0, -42.0], 
+[-22.0, 59.0, 35.0, -10.0, 26.0]], [[6.0, 2.0, -20.0, 4.0, 28.0], [-36.0, -30.0, -42.0, 0.0, 18.0], [-20.0, 48.0, -26.0, 2.0, 
+-8.0], [24.0, 0.0, 24.0, -38.0, -36.0]]], [[[-38.0, 14.0, -21.0, 34.0, -21.0], [21.0, 46.0, 7.0, -5.0, 3.0], [45.0, -54.0, 
+58.0, 24.0, -37.0], [-21.0, 34.0, 4.0, 4.0, 29.0]], [[5.0, -99.0, 29.0, -57.0, -44.0], [-60.0, -104.0, -50.0, 49.0, -105.0], 
+[-38.0, 43.0, -78.0, 16.0, -26.0], [-71.0, -19.0, -5.0, -16.0, -30.0]], [[-12.0, -25.0, -22.0, -2.0, -12.0], [-46.0, -54.0, 
+-60.0, 12.0, -21.0], [2.0, 24.0, -18.0, 24.0, -40.0], [-29.0, -6.0, 13.0, -42.0, -29.0]], [[-2.0, 26.0, -42.0, 12.0, 14.0], 
+[-26.0, -30.0, -48.0, -18.0, 28.0], [10.0, 16.0, 2.0, 10.0, -22.0], [6.0, -20.0, 12.0, -42.0, -26.0]], [[-5.0, -46.0, -2.0, 
+-4.0, -23.0], [-82.0, 19.0, -23.0, -11.0, -1.0], [-19.0, -21.0, 12.0, 19.0, -68.0], [-65.0, 43.0, 28.0, -86.0, 5.0]]], [[[19.0, 
+60.0, 0.0, 24.0, 64.0], [38.0, 88.0, 58.0, -32.0, 75.0], [-24.0, 3.0, 20.0, -37.0, 47.0], [88.0, 34.0, 20.0, 17.0, 15.0]], 
+[[15.0, 33.0, -2.0, 7.0, 39.0], [13.0, 88.0, 55.0, -38.0, 44.0], [-33.0, -25.0, 22.0, -30.0, 13.0], [40.0, 45.0, 23.0, -6.0, 
+29.0]], [[-39.0, 32.0, -26.0, 79.0, 13.0], [-11.0, 25.0, -44.0, 12.0, 80.0], [65.0, 18.0, 57.0, 40.0, -26.0], [30.0, 29.0, 
+21.0, -34.0, -24.0]], [[-20.0, 5.0, -41.0, -1.0, -20.0], [-6.0, -43.0, -43.0, -5.0, -29.0], [24.0, -15.0, 5.0, 21.0, -38.0], 
+[-32.0, -21.0, -2.0, -13.0, -7.0]], [[17.0, 41.0, -43.0, -9.0, 22.0], [-18.0, 27.0, 3.0, -59.0, 32.0], [-22.0, -32.0, 15.0, 
+-18.0, -21.0], [0.0, -3.0, 16.0, -46.0, 12.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank0_offset0(self):
-      arg0=numpy.array([-1.0, 3.0])
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[6.0, 0.0, 7.0, 4.0, -6.0], [5.0, -5.0, 7.0, 3.0, 3.0], [0.0, 4.0, -4.0, 1.0, 1.0], [-3.0, 
+7.0, -3.0, -3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[4.0, 0.0, 3.0, 4.0, -1.0], [-7.0, 7.0, -7.0, 5.0, 6.0], [-4.0, -1.0, -1.0, 
+-1.0, 7.0], [0.0, -7.0, -2.0, 1.0, -1.0]])
       arg1=Data(0.0,self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-0.0, 0.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, 
+-0.0, -0.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0, 
+0.0], [0.0, -0.0, -0.0, 0.0, -0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank1_offset1(self):
-      arg0=numpy.array([[1.0, 3.0], [1.0, -2.0], [5.0, 0.0]])
-      arg1=Data(numpy.array([2.0, -1.0, 4.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, 5.0, -2.0, -3.0, 3.0], [1.0, 4.0, -2.0, 0.0, 4.0], [5.0, 1.0, -2.0, 0.0, 5.0], [7.0, 
+-7.0, -3.0, -4.0, -3.0]], [[4.0, 1.0, -2.0, 5.0, -4.0], [7.0, 6.0, -1.0, -7.0, -6.0], [-2.0, 5.0, 5.0, 6.0, 6.0], [0.0, 6.0, 
+-6.0, 7.0, 3.0]], [[-5.0, -5.0, -2.0, -3.0, 2.0], [-6.0, -5.0, -1.0, -3.0, -1.0], [-6.0, 6.0, 4.0, 0.0, -1.0], [-7.0, -4.0, 
+0.0, 3.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 1.0, -5.0, 7.0, 2.0], [6.0, 1.0, 1.0, -6.0, 0.0], [-6.0, 1.0, 5.0, 6.0, 
+0.0], [-4.0, 7.0, 5.0, -6.0, 7.0]], [[0.0, -1.0, -5.0, 0.0, 1.0], [4.0, -3.0, 1.0, 0.0, -5.0], [6.0, 0.0, 3.0, -6.0, 0.0], 
+[3.0, 7.0, -7.0, -5.0, 2.0]], [[6.0, 4.0, 0.0, 4.0, 3.0], [3.0, -5.0, 5.0, -7.0, 5.0], [-1.0, 4.0, -7.0, 6.0, -5.0], [2.0, 0.0, 
+0.0, 6.0, 0.0]]])
+      arg1=Data(numpy.array([0.0, -6.0, -6.0]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([21.0, 8.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[6.0, 24.0, 24.0, -12.0, 12.0], [-6.0, -6.0, 12.0, 60.0, 42.0], [48.0, -66.0, -54.0, -36.0, 
+-30.0], [42.0, -12.0, 36.0, -60.0, 12.0]])+(1.-msk_ref)*numpy.array([[-36.0, -18.0, 30.0, -24.0, -24.0], [-42.0, 48.0, -36.0, 
+42.0, 0.0], [-30.0, -24.0, 24.0, 0.0, 30.0], [-30.0, -42.0, 42.0, -6.0, -12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank2_offset2(self):
-      arg0=numpy.array([[[-2.0, 0.0], [-5.0, -1.0], [-3.0, -4.0]], [[5.0, -5.0], [7.0, 7.0], [4.0, -6.0]]])
-      arg1=Data(numpy.array([[-7.0, -3.0, -5.0], [-4.0, -5.0, -5.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-3.0, 7.0, -5.0, -3.0, 3.0], [-2.0, -7.0, 0.0, -5.0, 0.0], [-6.0, 5.0, 6.0, 0.0, 0.0], 
+[1.0, 0.0, -1.0, 3.0, 1.0]], [[0.0, 5.0, -3.0, 1.0, 5.0], [-3.0, -2.0, 2.0, -4.0, -2.0], [0.0, -7.0, 4.0, 5.0, 6.0], [5.0, 1.0, 
+0.0, 0.0, 1.0]], [[4.0, 7.0, -4.0, -3.0, 2.0], [-2.0, 6.0, 5.0, -7.0, 3.0], [6.0, 4.0, -4.0, -6.0, 4.0], [-7.0, -2.0, -4.0, 
+-6.0, -5.0]]], [[[-3.0, -4.0, -6.0, -6.0, 4.0], [-6.0, -2.0, -1.0, 1.0, -6.0], [-1.0, 0.0, 7.0, 2.0, 2.0], [-6.0, -7.0, -7.0, 
+6.0, 0.0]], [[0.0, -5.0, -7.0, -4.0, -4.0], [-2.0, 3.0, -7.0, 5.0, -4.0], [3.0, 2.0, 2.0, 5.0, -3.0], [-4.0, 5.0, -2.0, 3.0, 
+-4.0]], [[-2.0, 3.0, -2.0, -5.0, 7.0], [3.0, 6.0, -5.0, -3.0, -2.0], [-5.0, 7.0, -5.0, 3.0, 3.0], [2.0, 7.0, -6.0, -6.0, 
+7.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 7.0, -5.0, 6.0, -1.0], [-5.0, -4.0, -4.0, 5.0, -1.0], [-4.0, -4.0, 1.0, 6.0, 0.0], 
+[-5.0, 4.0, 5.0, 1.0, -7.0]], [[7.0, 3.0, 1.0, 0.0, -1.0], [-3.0, 0.0, -6.0, 4.0, 0.0], [0.0, -4.0, -4.0, 5.0, -6.0], [-5.0, 
+-3.0, 5.0, 4.0, -7.0]], [[5.0, 0.0, 4.0, -6.0, -1.0], [2.0, 6.0, 0.0, 1.0, -2.0], [-3.0, -4.0, -7.0, -6.0, -1.0], [-4.0, -1.0, 
+-5.0, -5.0, 5.0]]], [[[1.0, 5.0, -6.0, -7.0, -4.0], [-2.0, -2.0, 0.0, -7.0, 5.0], [-2.0, -3.0, -1.0, 6.0, -3.0], [0.0, 0.0, 
+-4.0, -2.0, 6.0]], [[7.0, 2.0, 2.0, -2.0, -3.0], [1.0, 0.0, -3.0, -6.0, -5.0], [4.0, -2.0, 1.0, 7.0, 0.0], [2.0, -2.0, 0.0, 
+3.0, 3.0]], [[4.0, 6.0, 6.0, 0.0, 4.0], [7.0, 4.0, -4.0, 3.0, 0.0], [4.0, 3.0, 1.0, 4.0, -4.0], [2.0, -2.0, 1.0, 7.0, -2.0]]]])
+      arg1=Data(numpy.array([[-6.0, -4.0, 3.0], [0.0, 4.0, -6.0]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-31.0, 38.0]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank3_offset3(self):
-      arg0=numpy.array([[[[-7.0, 2.0], [5.0, -2.0], [6.0, -6.0]], [[-7.0, -2.0], [-6.0, 7.0], [5.0, 7.0]], [[1.0, 4.0], [4.0, 
--3.0], [-7.0, -2.0]], [[-3.0, 1.0], [-7.0, 3.0], [4.0, -5.0]]], [[[4.0, -1.0], [2.0, -5.0], [1.0, -7.0]], [[-6.0, 0.0], [-3.0, 
-4.0], [7.0, -4.0]], [[7.0, -3.0], [-7.0, -1.0], [7.0, 1.0]], [[0.0, -3.0], [5.0, -5.0], [-1.0, 3.0]]]])
-      arg1=Data(numpy.array([[[2.0, 7.0, -6.0], [-2.0, -3.0, 6.0], [0.0, -2.0, -4.0], [-2.0, 7.0, 6.0]], [[-5.0, -2.0, -7.0], 
-[-3.0, 0.0, 5.0], [-1.0, 1.0, -1.0], [-2.0, -3.0, 0.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([34.0, 120.0]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[42.0, -79.0, 14.0, 19.0, -90.0], [-8.0, 44.0, 9.0, 63.0, 13.0], [96.0, -24.0, -26.0, -36.0, 
+-42.0], [-75.0, -32.0, 22.0, 12.0, -83.0]])+(1.-msk_ref)*numpy.array([[-33.0, -82.0, 10.0, -62.0, -29.0], [10.0, 18.0, 60.0, 
+-85.0, -20.0], [7.0, 2.0, -13.0, -70.0, 45.0], [34.0, -11.0, -71.0, -67.0, 109.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank1_offset0(self):
-      arg0=numpy.array([-4.0, -4.0])
-      arg1=Data(numpy.array([-6.0, 2.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 0.0, 5.0, -3.0, 3.0], [3.0, -4.0, -3.0, -6.0, -4.0], [0.0, 1.0, 5.0, -4.0, -1.0], [3.0, 
+0.0, -7.0, -4.0, -2.0]])+(1.-msk_arg0)*numpy.array([[5.0, 6.0, 3.0, 1.0, 4.0], [-7.0, 1.0, 0.0, 0.0, 5.0], [1.0, 4.0, 0.0, 
+-4.0, -4.0], [-5.0, -4.0, 7.0, -7.0, 1.0]])
+      arg1=Data(numpy.array([3.0, -7.0]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[24.0, -8.0], [24.0, -8.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0], [15.0, -35.0], [-9.0, 21.0], [9.0, -21.0]], [[9.0, -21.0], [-12.0, 
+28.0], [-9.0, 21.0], [-18.0, 42.0], [-12.0, 28.0]], [[0.0, 0.0], [3.0, -7.0], [15.0, -35.0], [-12.0, 28.0], [-3.0, 7.0]], 
+[[9.0, -21.0], [0.0, 0.0], [-21.0, 49.0], [-12.0, 28.0], [-6.0, 14.0]]])+(1.-msk_ref)*numpy.array([[[15.0, -35.0], [18.0, 
+-42.0], [9.0, -21.0], [3.0, -7.0], [12.0, -28.0]], [[-21.0, 49.0], [3.0, -7.0], [0.0, 0.0], [0.0, 0.0], [15.0, -35.0]], [[3.0, 
+-7.0], [12.0, -28.0], [0.0, 0.0], [-12.0, 28.0], [-12.0, 28.0]], [[-15.0, 35.0], [-12.0, 28.0], [21.0, -49.0], [-21.0, 49.0], 
+[3.0, -7.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank2_offset1(self):
-      arg0=numpy.array([[-6.0, 1.0], [0.0, -2.0], [-7.0, -5.0]])
-      arg1=Data(numpy.array([[-7.0, -2.0], [-6.0, 1.0], [-7.0, 0.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, -2.0, 6.0, 0.0, 2.0], [3.0, -2.0, -4.0, -5.0, 7.0], [-4.0, -5.0, -7.0, 0.0, 6.0], [0.0, 
+1.0, 7.0, 0.0, 5.0]], [[0.0, 7.0, -6.0, 1.0, 4.0], [-5.0, -1.0, 0.0, 4.0, 5.0], [6.0, 3.0, -3.0, -1.0, -2.0], [-2.0, -6.0, 3.0, 
+-1.0, 1.0]], [[-1.0, 3.0, 3.0, 0.0, -3.0], [-6.0, -2.0, -2.0, -5.0, 2.0], [-7.0, 4.0, 5.0, 5.0, -7.0], [-3.0, -4.0, 1.0, -7.0, 
+0.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -1.0, -4.0, 3.0, -4.0], [-4.0, 0.0, 0.0, 6.0, 3.0], [-1.0, 7.0, -5.0, 6.0, -6.0], 
+[3.0, -4.0, 0.0, 2.0, 1.0]], [[5.0, -7.0, 2.0, -2.0, 2.0], [4.0, 1.0, 1.0, 0.0, 5.0], [-4.0, -6.0, -4.0, 2.0, 0.0], [6.0, -1.0, 
+2.0, -7.0, -2.0]], [[2.0, 0.0, 4.0, -7.0, 4.0], [1.0, 7.0, 1.0, -1.0, 0.0], [0.0, 0.0, 3.0, -7.0, -2.0], [-6.0, 0.0, 2.0, -3.0, 
+-4.0]]])
+      arg1=Data(numpy.array([[6.0, 0.0], [1.0, 7.0], [-7.0, 5.0]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[91.0, 12.0], [40.0, -4.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[31.0, -5.0], [-26.0, 64.0], [9.0, -27.0], [1.0, 7.0], [37.0, 13.0]], [[55.0, -65.0], [1.0, 
+-17.0], [-10.0, -10.0], [9.0, 3.0], [33.0, 45.0]], [[31.0, 7.0], [-55.0, 41.0], [-80.0, 4.0], [-36.0, 18.0], [83.0, -49.0]], 
+[[19.0, -29.0], [28.0, -62.0], [38.0, 26.0], [48.0, -42.0], [31.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[3.0, 45.0], [-13.0, 
+-49.0], [-50.0, 34.0], [65.0, -49.0], [-50.0, 34.0]], [[-27.0, 33.0], [-48.0, 42.0], [-6.0, 12.0], [43.0, -5.0], [23.0, 35.0]], 
+[[-10.0, -28.0], [36.0, -42.0], [-55.0, -13.0], [87.0, -21.0], [-22.0, -10.0]], [[66.0, 12.0], [-25.0, -7.0], [-12.0, 24.0], 
+[26.0, -64.0], [32.0, -34.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank3_offset2(self):
-      arg0=numpy.array([[[0.0, 2.0], [2.0, 5.0], [3.0, 1.0]], [[-2.0, -3.0], [-3.0, 0.0], [-2.0, -1.0]]])
-      arg1=Data(numpy.array([[[1.0, 6.0], [-7.0, -3.0], [-7.0, 2.0]], [[-1.0, 7.0], [1.0, -2.0], [7.0, 
--6.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[1.0, 3.0, 1.0, -6.0, -3.0], [1.0, -6.0, -3.0, -3.0, -4.0], [2.0, -7.0, 2.0, 0.0, 6.0], 
+[0.0, 4.0, -6.0, -6.0, 6.0]], [[-7.0, 0.0, -4.0, -2.0, 0.0], [2.0, 7.0, 1.0, -2.0, 3.0], [0.0, 7.0, 6.0, 4.0, -3.0], [0.0, 3.0, 
+-3.0, 0.0, -5.0]], [[-1.0, -5.0, -4.0, -1.0, 6.0], [-2.0, -5.0, -2.0, 5.0, 0.0], [-7.0, -2.0, 6.0, -5.0, -2.0], [0.0, -6.0, 
+0.0, 0.0, -2.0]]], [[[-4.0, -3.0, -4.0, -7.0, 4.0], [-6.0, 6.0, 5.0, -4.0, -3.0], [-6.0, 6.0, 1.0, 5.0, -1.0], [-7.0, 1.0, 7.0, 
+4.0, 2.0]], [[7.0, -2.0, -1.0, -5.0, -4.0], [4.0, 4.0, -4.0, 5.0, 7.0], [5.0, -4.0, -2.0, 6.0, 6.0], [-2.0, -5.0, 2.0, 6.0, 
+7.0]], [[-2.0, 1.0, -3.0, 0.0, 0.0], [-1.0, -6.0, 0.0, 3.0, -1.0], [7.0, 4.0, 5.0, 6.0, 5.0], [-2.0, 1.0, 0.0, 2.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-2.0, 5.0, 0.0, 6.0, -6.0], [3.0, 5.0, 0.0, -6.0, -3.0], [-5.0, 0.0, -6.0, 7.0, -6.0], 
+[7.0, -3.0, -6.0, -1.0, 4.0]], [[-7.0, 3.0, 2.0, -6.0, 5.0], [1.0, 0.0, 4.0, 5.0, -1.0], [-6.0, 3.0, -3.0, 5.0, 0.0], [-4.0, 
+-5.0, 7.0, 0.0, -5.0]], [[-4.0, -7.0, 1.0, 5.0, -4.0], [0.0, 0.0, 3.0, 2.0, 2.0], [4.0, -3.0, 1.0, 5.0, 1.0], [7.0, -7.0, 1.0, 
+2.0, 0.0]]], [[[4.0, 7.0, -7.0, 0.0, -7.0], [6.0, -2.0, -4.0, 0.0, -6.0], [6.0, 5.0, 0.0, -6.0, 3.0], [7.0, -2.0, 2.0, 5.0, 
+-7.0]], [[2.0, -6.0, 5.0, 6.0, -7.0], [0.0, 7.0, -1.0, 2.0, -5.0], [-2.0, -7.0, -1.0, 2.0, 1.0], [-6.0, -4.0, -1.0, -1.0, 
+-6.0]], [[-5.0, 4.0, -1.0, 5.0, -6.0], [7.0, -7.0, -6.0, -7.0, -1.0], [5.0, 0.0, 2.0, 3.0, 0.0], [0.0, 0.0, 2.0, 1.0, 5.0]]]])
+      arg1=Data(numpy.array([[[3.0, -3.0], [0.0, 6.0], [-1.0, 4.0]], [[6.0, 3.0], [-6.0, 5.0], [4.0, 1.0]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-50.0, 4.0], [-44.0, -16.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank4_offset3(self):
-      arg0=numpy.array([[[[0.0, -1.0], [-6.0, 1.0], [0.0, 2.0]], [[-5.0, 0.0], [-2.0, 5.0], [2.0, -2.0]], [[-4.0, -1.0], [-3.0, 
-1.0], [6.0, 1.0]], [[-1.0, 3.0], [2.0, 0.0], [0.0, 5.0]]], [[[0.0, 6.0], [-3.0, -1.0], [-7.0, -7.0]], [[-3.0, 0.0], [-1.0, 
--6.0], [2.0, -6.0]], [[-5.0, 3.0], [-4.0, -3.0], [-2.0, -2.0]], [[3.0, 0.0], [4.0, -1.0], [-3.0, 0.0]]]])
-      arg1=Data(numpy.array([[[[3.0, 7.0], [-2.0, 2.0], [2.0, -1.0]], [[0.0, 1.0], [4.0, 5.0], [-6.0, -5.0]], [[1.0, -2.0], 
-[3.0, -6.0], [-2.0, 6.0]], [[7.0, -1.0], [7.0, 1.0], [-3.0, -3.0]]], [[[3.0, -1.0], [2.0, -3.0], [2.0, -4.0]], [[5.0, 3.0], 
-[0.0, -5.0], [-4.0, -6.0]], [[0.0, 0.0], [-5.0, -5.0], [4.0, 1.0]], [[-4.0, -2.0], [-2.0, -2.0], [-2.0, 
-0.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[-71.0, 53.0], [72.0, 118.0]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-70.0, -28.0], [12.0, -47.0], [-23.0, -63.0], [-29.0, -44.0], [33.0, 25.0]], [[-59.0, 2.0], 
+[-25.0, 72.0], [47.0, 2.0], [-56.0, 33.0], [-76.0, 55.0]], [[-25.0, -20.0], [57.0, 57.0], [38.0, 52.0], [23.0, 55.0], [-2.0, 
+-12.0]], [[-38.0, -33.0], [58.0, -39.0], [12.0, 31.0], [-22.0, 62.0], [-10.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 
+-35.0], [116.0, -30.0], [-77.0, 19.0], [-3.0, 1.0], [-38.0, -30.0]], [[73.0, 22.0], [-67.0, 7.0], [-45.0, 13.0], [-60.0, 59.0], 
+[-21.0, -33.0]], [[49.0, 8.0], [75.0, -14.0], [-5.0, 1.0], [-20.0, 24.0], [-7.0, 36.0]], [[92.0, -26.0], [10.0, -75.0], [7.0, 
+67.0], [35.0, 22.0], [26.0, -88.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank2_offset0(self):
-      arg0=numpy.array([5.0, -6.0])
-      arg1=Data(numpy.array([[0.0, 6.0, -4.0, -6.0, -5.0], [4.0, 2.0, 7.0, 0.0, 0.0], [-1.0, -1.0, -6.0, -1.0, 1.0], [1.0, 
--7.0, 6.0, -1.0, -3.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 4.0, -6.0, 7.0, -3.0], [3.0, -6.0, 0.0, -6.0, 0.0], [1.0, 2.0, -3.0, -1.0, 6.0], [2.0, 
+-3.0, 7.0, 7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[2.0, 7.0, 7.0, 6.0, -6.0], [-3.0, 6.0, 0.0, -2.0, 1.0], [5.0, 6.0, 0.0, 4.0, 
+-6.0], [-5.0, 5.0, 2.0, 3.0, 2.0]])
+      arg1=Data(numpy.array([[-2.0, 4.0, 2.0, 3.0, -7.0], [3.0, 6.0, -2.0, -2.0, -3.0], [-6.0, -1.0, -3.0, 6.0, -4.0], [-2.0, 
+-5.0, -5.0, 4.0, -3.0]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, 30.0, -20.0, -30.0, -25.0], [20.0, 10.0, 35.0, 0.0, 0.0], [-5.0, -5.0, -30.0, -5.0, 5.0], 
-[5.0, -35.0, 30.0, -5.0, -15.0]], [[0.0, -36.0, 24.0, 36.0, 30.0], [-24.0, -12.0, -42.0, 0.0, 0.0], [6.0, 6.0, 36.0, 6.0, 
--6.0], [-6.0, 42.0, -36.0, 6.0, 18.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-8.0, 16.0, 8.0, 12.0, -28.0], [12.0, 24.0, -8.0, -8.0, -12.0], [-24.0, -4.0, -12.0, 24.0, 
+-16.0], [-8.0, -20.0, -20.0, 16.0, -12.0]], [[-8.0, 16.0, 8.0, 12.0, -28.0], [12.0, 24.0, -8.0, -8.0, -12.0], [-24.0, -4.0, 
+-12.0, 24.0, -16.0], [-8.0, -20.0, -20.0, 16.0, -12.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], [-18.0, -36.0, 12.0, 12.0, 18.0], 
+[36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], [21.0, 42.0, -14.0, -14.0, 
+-21.0], [-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[6.0, -12.0, -6.0, -9.0, 21.0], [-9.0, -18.0, 
+6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]]], [[[-6.0, 12.0, 6.0, 9.0, -21.0], [9.0, 18.0, 
+-6.0, -6.0, -9.0], [-18.0, -3.0, -9.0, 18.0, -12.0], [-6.0, -15.0, -15.0, 12.0, -9.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], 
+[-18.0, -36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], [-18.0, 
+-36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-2.0, 4.0, 2.0, 3.0, -7.0], [3.0, 6.0, -2.0, 
+-2.0, -3.0], [-6.0, -1.0, -3.0, 6.0, -4.0], [-2.0, -5.0, -5.0, 4.0, -3.0]], [[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, 
+-4.0, -6.0], [-12.0, -2.0, -6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[6.0, -12.0, -6.0, -9.0, 21.0], [-9.0, -18.0, 
+6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]], [[2.0, -4.0, -2.0, -3.0, 7.0], [-3.0, -6.0, 2.0, 
+2.0, 3.0], [6.0, 1.0, 3.0, -6.0, 4.0], [2.0, 5.0, 5.0, -4.0, 3.0]], [[-12.0, 24.0, 12.0, 18.0, -42.0], [18.0, 36.0, -12.0, 
+-12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, -18.0]]], [[[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 
+12.0, -4.0, -4.0, -6.0], [-12.0, -2.0, -6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[6.0, -12.0, -6.0, -9.0, 21.0], 
+[-9.0, -18.0, 6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], 
+[21.0, 42.0, -14.0, -14.0, -21.0], [-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[-14.0, 28.0, 14.0, 
+21.0, -49.0], [21.0, 42.0, -14.0, -14.0, -21.0], [-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, -4.0, -6.0], [-12.0, -2.0, -6.0, 12.0, 
+-8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], [21.0, 42.0, -14.0, -14.0, -21.0], [-42.0, -7.0, 
+-21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], [21.0, 42.0, -14.0, -14.0, -21.0], 
+[-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[-12.0, 24.0, 12.0, 18.0, -42.0], [18.0, 36.0, -12.0, 
+-12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, -18.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], 
+[-18.0, -36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]]], [[[6.0, -12.0, -6.0, -9.0, 
+21.0], [-9.0, -18.0, 6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]], [[-12.0, 24.0, 12.0, 18.0, 
+-42.0], [18.0, 36.0, -12.0, -12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, -18.0]], [[0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[4.0, -8.0, -4.0, -6.0, 
+14.0], [-6.0, -12.0, 4.0, 4.0, 6.0], [12.0, 2.0, 6.0, -12.0, 8.0], [4.0, 10.0, 10.0, -8.0, 6.0]], [[-2.0, 4.0, 2.0, 3.0, -7.0], 
+[3.0, 6.0, -2.0, -2.0, -3.0], [-6.0, -1.0, -3.0, 6.0, -4.0], [-2.0, -5.0, -5.0, 4.0, -3.0]]], [[[-10.0, 20.0, 10.0, 15.0, 
+-35.0], [15.0, 30.0, -10.0, -10.0, -15.0], [-30.0, -5.0, -15.0, 30.0, -20.0], [-10.0, -25.0, -25.0, 20.0, -15.0]], [[-12.0, 
+24.0, 12.0, 18.0, -42.0], [18.0, 36.0, -12.0, -12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, 
+-18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-8.0, 
+16.0, 8.0, 12.0, -28.0], [12.0, 24.0, -8.0, -8.0, -12.0], [-24.0, -4.0, -12.0, 24.0, -16.0], [-8.0, -20.0, -20.0, 16.0, 
+-12.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], [-18.0, -36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 
+30.0, -24.0, 18.0]]], [[[10.0, -20.0, -10.0, -15.0, 35.0], [-15.0, -30.0, 10.0, 10.0, 15.0], [30.0, 5.0, 15.0, -30.0, 20.0], 
+[10.0, 25.0, 25.0, -20.0, 15.0]], [[-10.0, 20.0, 10.0, 15.0, -35.0], [15.0, 30.0, -10.0, -10.0, -15.0], [-30.0, -5.0, -15.0, 
+30.0, -20.0], [-10.0, -25.0, -25.0, 20.0, -15.0]], [[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, -4.0, -6.0], [-12.0, -2.0, 
+-6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[-6.0, 12.0, 6.0, 9.0, -21.0], [9.0, 18.0, -6.0, -6.0, -9.0], [-18.0, 
+-3.0, -9.0, 18.0, -12.0], [-6.0, -15.0, -15.0, 12.0, -9.0]], [[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, -4.0, -6.0], 
+[-12.0, -2.0, -6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank3_offset1(self):
-      arg0=numpy.array([[-6.0, 7.0], [3.0, 4.0], [-7.0, -3.0]])
-      arg1=Data(numpy.array([[[5.0, 3.0, 4.0, 3.0, 4.0], [4.0, 3.0, -4.0, -5.0, -6.0], [2.0, -6.0, -6.0, 2.0, -1.0], [0.0, 
--6.0, 1.0, -1.0, -1.0]], [[0.0, -3.0, 0.0, -1.0, 6.0], [7.0, -3.0, -2.0, -3.0, 2.0], [-1.0, 1.0, 7.0, -5.0, -5.0], [-1.0, 6.0, 
-6.0, 2.0, -5.0]], [[1.0, 4.0, -3.0, 6.0, -1.0], [5.0, -2.0, -6.0, 1.0, 2.0], [-5.0, 1.0, -7.0, 7.0, -3.0], [5.0, 1.0, 5.0, 7.0, 
--4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-2.0, 0.0, 1.0, -5.0, -2.0], [-6.0, -4.0, -4.0, -1.0, 0.0], [6.0, 4.0, -5.0, 0.0, 0.0], 
+[-6.0, -6.0, -1.0, -5.0, -3.0]], [[5.0, 4.0, 6.0, 6.0, -3.0], [7.0, -1.0, 2.0, -7.0, -6.0], [-2.0, 0.0, -2.0, 3.0, -4.0], [6.0, 
+-1.0, -2.0, -4.0, 6.0]], [[2.0, -4.0, -5.0, 2.0, -2.0], [0.0, 2.0, -7.0, -5.0, -6.0], [-5.0, -2.0, 1.0, 7.0, 4.0], [-3.0, 4.0, 
+-2.0, -5.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 7.0, 1.0, 3.0, -7.0], [2.0, -7.0, -4.0, -5.0, -6.0], [-2.0, -1.0, 5.0, 
+5.0, -1.0], [-7.0, -6.0, -1.0, -7.0, -7.0]], [[-6.0, -3.0, 1.0, 3.0, 1.0], [6.0, -7.0, 6.0, 6.0, 0.0], [-6.0, -3.0, -7.0, -2.0, 
+0.0], [0.0, -6.0, 1.0, 0.0, -3.0]], [[4.0, 5.0, -2.0, -4.0, -3.0], [6.0, 1.0, 1.0, 7.0, -3.0], [-1.0, -5.0, 1.0, 4.0, -3.0], 
+[1.0, 4.0, -7.0, 1.0, -1.0]]])
+      arg1=Data(numpy.array([[[0.0, -7.0, 3.0, -5.0, 1.0], [0.0, 2.0, 0.0, 4.0, -7.0], [-4.0, 3.0, -4.0, 0.0, 4.0], [-5.0, 6.0, 
+3.0, 2.0, 3.0]], [[-4.0, -4.0, -5.0, -7.0, 0.0], [6.0, 1.0, 4.0, 2.0, -1.0], [-2.0, -6.0, -5.0, -2.0, -6.0], [-3.0, -6.0, 2.0, 
+0.0, -6.0]], [[3.0, 7.0, 2.0, 7.0, -1.0], [-7.0, -6.0, 7.0, -2.0, -7.0], [-2.0, -2.0, -4.0, -2.0, -1.0], [-2.0, -6.0, 7.0, 
+-7.0, 4.0]]]),self.functionspace)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-37.0, -55.0, -3.0, -63.0, 1.0], [-38.0, -13.0, 60.0, 14.0, 28.0], [20.0, 32.0, 106.0, -76.0, 
-12.0], [-38.0, 47.0, -23.0, -37.0, 19.0]], [[32.0, -3.0, 37.0, -1.0, 55.0], [41.0, 15.0, -18.0, -50.0, -40.0], [25.0, -41.0, 
-7.0, -27.0, -18.0], [-19.0, -21.0, 16.0, -20.0, -15.0]]]),self.functionspace)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-14.0, 8.0, -27.0, -11.0, -4.0], [16.0, -11.0, 34.0, -2.0, -5.0], [-6.0, -40.0, -25.0, -14.0, 
+-40.0], [-9.0, -54.0, 18.0, -18.0, -28.0]], [[-28.0, -44.0, -28.0, -56.0, 4.0], [52.0, 28.0, -12.0, 16.0, 24.0], [0.0, -16.0, 
+-4.0, 0.0, -20.0], [-4.0, 0.0, -20.0, 28.0, -40.0]], [[-39.0, -66.0, -37.0, -82.0, 6.0], [71.0, 38.0, -11.0, 26.0, 22.0], 
+[-6.0, -23.0, -14.0, -2.0, -27.0], [-13.0, 0.0, -20.0, 37.0, -53.0]], [[-18.0, 25.0, -41.0, -3.0, -7.0], [22.0, -16.0, 38.0, 
+-12.0, 15.0], [4.0, -55.0, -18.0, -16.0, -58.0], [3.0, -78.0, 11.0, -24.0, -43.0]], [[6.0, 12.0, 5.0, 17.0, 0.0], [-4.0, 5.0, 
+-26.0, -10.0, 31.0], [18.0, 16.0, 31.0, 10.0, 12.0], [23.0, 18.0, -26.0, 10.0, 4.0]]], [[[-28.0, 14.0, -53.0, -19.0, -6.0], 
+[42.0, -5.0, 28.0, -10.0, 35.0], [10.0, -60.0, -11.0, -14.0, -66.0], [9.0, -78.0, -4.0, -12.0, -60.0]], [[10.0, 46.0, -3.0, 
+41.0, -6.0], [-20.0, -21.0, 10.0, -22.0, 15.0], [14.0, -10.0, 13.0, -2.0, -12.0], [19.0, -30.0, 0.0, -22.0, 2.0]], [[-29.0, 
+-29.0, -36.0, -43.0, 3.0], [61.0, 36.0, -41.0, 2.0, 75.0], [26.0, -10.0, 34.0, 10.0, -21.0], [28.0, 6.0, -57.0, 41.0, -52.0]], 
+[[13.0, 0.0, 22.0, 19.0, 4.0], [-7.0, 21.0, -63.0, -8.0, 49.0], [28.0, 49.0, 59.0, 24.0, 43.0], [36.0, 66.0, -52.0, 33.0, 
+19.0]], [[6.0, -18.0, 18.0, 0.0, 6.0], [6.0, 30.0, -66.0, 0.0, 48.0], [24.0, 48.0, 54.0, 24.0, 42.0], [30.0, 72.0, -54.0, 42.0, 
+12.0]]], [[[-7.0, -69.0, 18.0, -51.0, 11.0], [23.0, 40.0, -43.0, 30.0, -5.0], [-10.0, 40.0, 6.0, 14.0, 41.0], [-14.0, 78.0, 
+-21.0, 47.0, 10.0]], [[-6.0, -42.0, 8.0, -34.0, 6.0], [14.0, 20.0, -14.0, 20.0, -14.0], [-12.0, 16.0, -8.0, 4.0, 18.0], [-16.0, 
+36.0, -2.0, 22.0, 4.0]], [[11.0, 50.0, -3.0, 46.0, -6.0], [-19.0, -18.0, -1.0, -26.0, 30.0], [22.0, -5.0, 26.0, 2.0, -9.0], 
+[29.0, -24.0, -12.0, -17.0, 1.0]], [[9.0, 37.0, -1.0, 28.0, -7.0], [-31.0, -39.0, 61.0, -8.0, -52.0], [-20.0, -32.0, -43.0, 
+-20.0, -25.0], [-23.0, -60.0, 55.0, -49.0, 10.0]], [[28.0, 44.0, 28.0, 56.0, -4.0], [-52.0, -28.0, 12.0, -16.0, -24.0], [0.0, 
+16.0, 4.0, 0.0, 20.0], [4.0, 0.0, 20.0, -28.0, 40.0]]], [[[-33.0, -3.0, -54.0, -33.0, -3.0], [57.0, 12.0, 3.0, -6.0, 57.0], 
+[18.0, -48.0, 6.0, -6.0, -57.0], [18.0, -54.0, -27.0, 9.0, -66.0]], [[16.0, 74.0, -5.0, 65.0, -10.0], [-34.0, -37.0, 24.0, 
+-34.0, 15.0], [18.0, -20.0, 13.0, -6.0, -22.0], [25.0, -54.0, 8.0, -40.0, 4.0]], [[2.0, 1.0, 3.0, 5.0, 1.0], [2.0, 8.0, -22.0, 
+-4.0, 23.0], [12.0, 13.0, 22.0, 8.0, 10.0], [15.0, 18.0, -21.0, 12.0, 1.0]], [[1.0, 16.0, -5.0, 18.0, 0.0], [11.0, 16.0, -51.0, 
+-18.0, 74.0], [38.0, 19.0, 60.0, 18.0, 9.0], [47.0, 24.0, -58.0, 25.0, -11.0]], [[-33.0, -24.0, -45.0, -48.0, 0.0], [57.0, 
+18.0, 3.0, 6.0, 36.0], [6.0, -39.0, -6.0, -6.0, -45.0], [3.0, -36.0, -18.0, 15.0, -57.0]]]])+(1.-msk_ref)*numpy.array([[[[36.0, 
+24.0, 50.0, 50.0, 0.0], [-64.0, -22.0, 4.0, -4.0, -50.0], [-12.0, 40.0, -2.0, 4.0, 48.0], [-10.0, 36.0, 28.0, -20.0, 64.0]], 
+[[27.0, -2.0, 46.0, 21.0, 2.0], [-53.0, -19.0, 23.0, 12.0, -81.0], [-32.0, 29.0, -33.0, -4.0, 41.0], [-36.0, 30.0, 50.0, -21.0, 
+59.0]], [[-10.0, -25.0, -6.0, -26.0, 3.0], [20.0, 15.0, -10.0, 10.0, 6.0], [-2.0, 1.0, -1.0, 2.0, 0.0], [-4.0, 12.0, -9.0, 
+16.0, -11.0]], [[-24.0, -61.0, -14.0, -64.0, 7.0], [46.0, 33.0, -16.0, 26.0, 4.0], [-10.0, -1.0, -11.0, 2.0, -2.0], [-16.0, 
+24.0, -13.0, 34.0, -25.0]], [[-13.0, 24.0, -32.0, 7.0, -4.0], [27.0, 5.0, -17.0, -20.0, 69.0], [32.0, -21.0, 35.0, 4.0, -31.0], 
+[38.0, -30.0, -40.0, 7.0, -39.0]]], [[[-6.0, 4.0, -12.0, -10.0, -4.0], [-6.0, -26.0, 66.0, 8.0, -62.0], [-32.0, -42.0, -62.0, 
+-24.0, -34.0], [-40.0, -60.0, 60.0, -38.0, -6.0]], [[31.0, 84.0, 16.0, 91.0, -8.0], [-49.0, -27.0, -21.0, -44.0, 49.0], [40.0, 
+19.0, 59.0, 12.0, 13.0], [54.0, -6.0, -28.0, -21.0, 25.0]], [[-21.0, 11.0, -40.0, -15.0, -5.0], [29.0, -8.0, 31.0, -6.0, 15.0], 
+[2.0, -50.0, -18.0, -14.0, -53.0], [0.0, -66.0, 7.0, -15.0, -44.0]], [[-3.0, 60.0, -31.0, 32.0, -12.0], [-13.0, -46.0, 73.0, 
+-22.0, -20.0], [-6.0, -65.0, -38.0, -26.0, -63.0], [-7.0, -108.0, 46.0, -59.0, -23.0]], [[-9.0, 21.0, -24.0, 9.0, -3.0], [21.0, 
+6.0, -21.0, -18.0, 63.0], [30.0, -12.0, 36.0, 6.0, -21.0], [36.0, -18.0, -39.0, 9.0, -30.0]]], [[[21.0, 31.0, 22.0, 45.0, 
+-1.0], [-29.0, -4.0, -31.0, -18.0, 27.0], [22.0, 32.0, 42.0, 14.0, 29.0], [30.0, 30.0, -25.0, 3.0, 26.0]], [[-3.0, -16.0, 2.0, 
+-9.0, 4.0], [17.0, 25.0, -47.0, 0.0, 45.0], [20.0, 25.0, 39.0, 16.0, 19.0], [24.0, 42.0, -44.0, 33.0, -5.0]], [[31.0, 0.0, 
+52.0, 31.0, 4.0], [-49.0, -3.0, -21.0, 4.0, -35.0], [-8.0, 55.0, 11.0, 12.0, 61.0], [-6.0, 66.0, 8.0, 3.0, 61.0]], [[20.0, 1.0, 
+33.0, 17.0, 1.0], [-40.0, -16.0, 20.0, 8.0, -61.0], [-24.0, 19.0, -26.0, -4.0, 28.0], [-27.0, 18.0, 39.0, -18.0, 43.0]], 
+[[-9.0, -14.0, -9.0, -16.0, 2.0], [21.0, 16.0, -21.0, 2.0, 28.0], [10.0, 3.0, 16.0, 6.0, -1.0], [11.0, 12.0, -24.0, 19.0, 
+-15.0]]], [[[3.0, 56.0, -19.0, 42.0, -8.0], [-7.0, -20.0, 7.0, -30.0, 42.0], [26.0, -23.0, 24.0, -2.0, -29.0], [33.0, -48.0, 
+-14.0, -21.0, -17.0]], [[36.0, 94.0, 20.0, 100.0, -10.0], [-64.0, -42.0, 4.0, -44.0, 20.0], [28.0, 10.0, 38.0, 4.0, 8.0], 
+[40.0, -24.0, -2.0, -40.0, 34.0]], [[-25.0, -46.0, -22.0, -51.0, 6.0], [55.0, 41.0, -45.0, 12.0, 55.0], [16.0, 5.0, 27.0, 12.0, 
+-3.0], [16.0, 30.0, -50.0, 47.0, -37.0]], [[3.0, 56.0, -19.0, 42.0, -8.0], [-7.0, -20.0, 7.0, -30.0, 42.0], [26.0, -23.0, 24.0, 
+-2.0, -29.0], [33.0, -48.0, -14.0, -21.0, -17.0]], [[9.0, 54.0, -8.0, 49.0, -6.0], [-11.0, -11.0, -19.0, -32.0, 59.0], [36.0, 
+-1.0, 47.0, 8.0, -9.0], [46.0, -18.0, -34.0, -7.0, -7.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 0.0, -1.0, -7.0, -2.0], [5.0, 0.0, -2.0, -7.0, 0.0], [2.0, 0.0, 0.0, -5.0, -2.0], 
+[5.0, -6.0, 1.0, -7.0, -5.0]], [[-3.0, 4.0, 0.0, 7.0, -1.0], [7.0, -2.0, 1.0, 7.0, 0.0], [-3.0, 6.0, 2.0, 1.0, -5.0], [5.0, 
+2.0, -4.0, -7.0, 1.0]], [[-3.0, -7.0, 0.0, -5.0, -7.0], [5.0, -2.0, -2.0, -1.0, -2.0], [1.0, -5.0, 0.0, 4.0, 7.0], [-5.0, 0.0, 
+-6.0, 1.0, -7.0]]], [[[3.0, 7.0, -6.0, -6.0, 1.0], [1.0, 3.0, 7.0, -1.0, 7.0], [-1.0, 6.0, 7.0, 1.0, 3.0], [-1.0, -5.0, -3.0, 
+0.0, 2.0]], [[0.0, 0.0, 7.0, 3.0, -5.0], [-7.0, -6.0, -3.0, 3.0, 7.0], [2.0, 3.0, 1.0, 0.0, -3.0], [-5.0, 0.0, 5.0, -6.0, 
+-5.0]], [[0.0, -3.0, -7.0, 3.0, 0.0], [5.0, 0.0, 1.0, 7.0, 1.0], [-3.0, 7.0, 2.0, 4.0, -7.0], [-5.0, 1.0, 2.0, 3.0, 
+-7.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, -1.0, 2.0, 0.0, -4.0], [-5.0, 4.0, 7.0, 5.0, 7.0], [1.0, 6.0, 2.0, -5.0, -5.0], 
+[1.0, 3.0, 6.0, 2.0, 0.0]], [[7.0, 6.0, -7.0, -1.0, -1.0], [2.0, 1.0, 2.0, 1.0, 1.0], [-2.0, 4.0, 0.0, 2.0, -7.0], [-4.0, -7.0, 
+-3.0, -6.0, 3.0]], [[-4.0, -1.0, -5.0, -2.0, -1.0], [-7.0, 2.0, 6.0, -7.0, -7.0], [2.0, -1.0, -6.0, 6.0, -5.0], [4.0, 0.0, 
+-2.0, 0.0, -1.0]]], [[[1.0, 4.0, 6.0, -2.0, -6.0], [7.0, 3.0, 0.0, 0.0, 0.0], [0.0, -1.0, -1.0, -1.0, -2.0], [-7.0, 2.0, -2.0, 
+-3.0, 5.0]], [[-2.0, 1.0, 6.0, -7.0, 1.0], [5.0, -4.0, -4.0, 0.0, 7.0], [-2.0, 0.0, -6.0, 5.0, -5.0], [5.0, 1.0, -4.0, -1.0, 
+-3.0]], [[7.0, -5.0, 4.0, 4.0, 0.0], [-3.0, -1.0, -6.0, 5.0, -2.0], [-1.0, 0.0, 3.0, 0.0, -2.0], [2.0, 1.0, 6.0, 3.0, 2.0]]]])
+      arg1=Data(numpy.array([[[[4.0, 3.0, 7.0, 7.0, 5.0], [-1.0, -7.0, -1.0, 5.0, 7.0], [-6.0, -2.0, 5.0, 5.0, -1.0], [6.0, 
+-4.0, -6.0, -4.0, 6.0]], [[5.0, -4.0, -1.0, 4.0, -2.0], [-6.0, 7.0, 7.0, -5.0, 0.0], [5.0, 3.0, -5.0, 5.0, -5.0], [2.0, 7.0, 
+-2.0, 2.0, 4.0]], [[4.0, 4.0, -4.0, 0.0, -7.0], [-4.0, 3.0, 4.0, 1.0, 2.0], [1.0, -5.0, -6.0, 1.0, 4.0], [4.0, -3.0, -5.0, 
+-7.0, 1.0]]], [[[0.0, -3.0, -3.0, 0.0, 2.0], [0.0, 0.0, -4.0, 5.0, 5.0], [7.0, 2.0, 4.0, 0.0, -7.0], [-6.0, -5.0, 1.0, 6.0, 
+-3.0]], [[7.0, -1.0, 0.0, -5.0, 6.0], [2.0, 3.0, 0.0, -3.0, 4.0], [4.0, 5.0, 1.0, 7.0, 5.0], [-4.0, 1.0, -7.0, -7.0, 0.0]], 
+[[0.0, 0.0, -1.0, -3.0, 1.0], [-6.0, 0.0, -4.0, 1.0, -5.0], [6.0, -3.0, 2.0, -5.0, 0.0], [0.0, 0.0, 0.0, -7.0, 
+-7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-7.0, 6.0, 41.0, 23.0, 58.0], [25.0, -65.0, -50.0, 52.0, 44.0], [-27.0, 2.0, 70.0, 7.0, 
+-23.0], [-6.0, -47.0, -6.0, 13.0, 6.0]], [[-8.0, -65.0, 6.0, 25.0, 52.0], [22.0, 7.0, -16.0, 5.0, 36.0], [44.0, 70.0, 44.0, 
+28.0, -97.0], [-62.0, 14.0, 34.0, 120.0, 9.0]], [[45.0, 8.0, 18.0, -21.0, 18.0], [57.0, 28.0, 53.0, -63.0, 26.0], [-50.0, 46.0, 
+-36.0, 79.0, 78.0], [2.0, 41.0, -49.0, -32.0, 61.0]], [[8.0, -54.0, -21.0, -45.0, -5.0], [-27.0, 92.0, 48.0, -111.0, -92.0], 
+[60.0, 54.0, -55.0, 1.0, 9.0], [-24.0, 125.0, 26.0, -1.0, -22.0]], [[-76.0, -28.0, 12.0, 7.0, 13.0], [26.0, -29.0, -37.0, 8.0, 
+-43.0], [-13.0, 13.0, 36.0, -57.0, -53.0], [-28.0, 12.0, 85.0, 96.0, -26.0]]], [[[26.0, 11.0, 0.0, 83.0, -59.0], [-111.0, 8.0, 
+40.0, 26.0, -3.0], [19.0, -62.0, -33.0, -9.0, -62.0], [86.0, 2.0, -19.0, -21.0, 25.0]], [[-60.0, -3.0, 1.0, 22.0, -12.0], [8.0, 
+-38.0, -34.0, 41.0, -13.0], [-15.0, -20.0, 28.0, -54.0, -49.0], [-6.0, -29.0, 59.0, 70.0, -19.0]], [[-32.0, -36.0, -29.0, 2.0, 
+-1.0], [-8.0, 6.0, -31.0, 28.0, 0.0], [58.0, 13.0, 24.0, -33.0, -75.0], [-48.0, -17.0, 48.0, 80.0, -38.0]], [[24.0, -53.0, 
+-56.0, -57.0, -19.0], [-67.0, 104.0, 28.0, -78.0, -79.0], [123.0, 32.0, -51.0, -15.0, -10.0], [-38.0, 88.0, 11.0, -27.0, 
+-61.0]], [[41.0, -36.0, -14.0, -38.0, 71.0], [16.0, 15.0, -40.0, 13.0, 54.0], [81.0, 56.0, 49.0, 42.0, -22.0], [-78.0, -22.0, 
+-32.0, 0.0, -30.0]]], [[[11.0, 23.0, 19.0, 1.0, 16.0], [34.0, -26.0, -3.0, 12.0, 34.0], [-43.0, -1.0, 11.0, 25.0, 34.0], [8.0, 
+-25.0, -26.0, -20.0, 25.0]], [[31.0, -65.0, -11.0, -12.0, 60.0], [-52.0, 36.0, -30.0, -7.0, -3.0], [121.0, 49.0, 41.0, 11.0, 
+-77.0], [-56.0, 30.0, -2.0, 13.0, -48.0]], [[17.0, -30.0, -25.0, -3.0, 18.0], [-22.0, 17.0, -22.0, 24.0, 29.0], [75.0, 19.0, 
+23.0, 7.0, -54.0], [-42.0, -20.0, -4.0, 25.0, -27.0]], [[1.0, -6.0, -59.0, -43.0, -49.0], [-41.0, 54.0, 8.0, -17.0, -42.0], 
+[70.0, -17.0, -42.0, -36.0, 9.0], [-18.0, 10.0, 9.0, -28.0, -53.0]], [[-26.0, 36.0, -39.0, 2.0, -68.0], [40.0, -9.0, 11.0, 
+39.0, 38.0], [-39.0, -34.0, -32.0, -14.0, 19.0], [0.0, -66.0, 11.0, 37.0, 15.0]]], [[[-10.0, -17.0, 58.0, 95.0, 13.0], [5.0, 
+-30.0, 34.0, 0.0, 25.0], [-67.0, 18.0, 11.0, 35.0, -68.0], [46.0, 30.0, 19.0, 89.0, 83.0]], [[-14.0, -11.0, -30.0, -37.0, 
+-43.0], [-12.0, 56.0, 36.0, -64.0, -72.0], [17.0, 5.0, -58.0, -25.0, 31.0], [-2.0, 63.0, 27.0, -9.0, -20.0]], [[-5.0, -1.0, 
+42.0, -40.0, 81.0], [45.0, -38.0, -49.0, -9.0, -10.0], [-21.0, 29.0, 58.0, 4.0, 41.0], [-28.0, 6.0, -6.0, -37.0, -21.0]], 
+[[-101.0, 17.0, -49.0, -56.0, -61.0], [15.0, -15.0, -50.0, 22.0, -86.0], [2.0, -51.0, -6.0, -126.0, 16.0], [-28.0, -30.0, 93.0, 
+28.0, -90.0]], [[-78.0, -48.0, -7.0, 15.0, -11.0], [59.0, 6.0, 4.0, -19.0, -24.0], [-20.0, 48.0, 1.0, -27.0, -67.0], [-48.0, 
+33.0, 100.0, 167.0, 10.0]]]])+(1.-msk_ref)*numpy.array([[[[33.0, -24.0, 48.0, 66.0, 46.0], [-79.0, -18.0, -6.0, 14.0, 3.0], 
+[30.0, -2.0, 40.0, 17.0, -75.0], [42.0, 26.0, -21.0, -15.0, 14.0]], [[29.0, -44.0, -16.0, 27.0, -1.0], [1.0, 49.0, 43.0, -24.0, 
+40.0], [37.0, 53.0, -22.0, 56.0, -56.0], [-26.0, 30.0, -4.0, 75.0, 40.0]], [[-5.0, -10.0, 19.0, -56.0, 111.0], [48.0, -60.0, 
+-111.0, 56.0, 38.0], [38.0, 30.0, 113.0, -8.0, 1.0], [-82.0, -66.0, -9.0, -21.0, -67.0]], [[-62.0, 9.0, 11.0, 19.0, -26.0], 
+[-24.0, -34.0, -23.0, 18.0, -62.0], [-25.0, -44.0, 10.0, -76.0, -24.0], [30.0, 2.0, 59.0, 21.0, -28.0]], [[-18.0, 5.0, -5.0, 
+-37.0, -17.0], [16.0, 21.0, 17.0, -49.0, -56.0], [-20.0, 3.0, -32.0, -19.0, 52.0], [2.0, 43.0, 18.0, -22.0, -11.0]]], [[[-3.0, 
+-77.0, -27.0, -43.0, 61.0], [49.0, 43.0, -25.0, -25.0, 21.0], [84.0, 99.0, 34.0, 28.0, -57.0], [-116.0, 25.0, 33.0, 101.0, 
+-29.0]], [[1.0, 11.0, 11.0, 55.0, -15.0], [-20.0, -27.0, 3.0, 43.0, 36.0], [-18.0, -26.0, 9.0, 4.0, -42.0], [32.0, -34.0, -5.0, 
+25.0, 28.0]], [[34.0, 41.0, 29.0, 95.0, -41.0], [-15.0, -29.0, 55.0, 37.0, 75.0], [-78.0, -40.0, -27.0, 53.0, -13.0], [86.0, 
+-36.0, -48.0, 4.0, 98.0]], [[-3.0, -17.0, 57.0, 24.0, 77.0], [-13.0, -49.0, -46.0, 18.0, -4.0], [-2.0, 13.0, 72.0, -2.0, 
+-38.0], [4.0, 8.0, 3.0, -4.0, -8.0]], [[54.0, -18.0, 78.0, 24.0, 122.0], [41.0, -42.0, -20.0, 0.0, 73.0], [-28.0, 65.0, 75.0, 
+92.0, -5.0], [-12.0, 7.0, -58.0, -12.0, 53.0]]], [[[-12.0, 21.0, 2.0, 12.0, -18.0], [5.0, -21.0, -3.0, 22.0, 8.0], [-28.0, 
+-25.0, -1.0, -12.0, 7.0], [18.0, -26.0, 2.0, -1.0, 7.0]], [[40.0, 1.0, 45.0, 58.0, 27.0], [-26.0, -17.0, 22.0, 4.0, 35.0], 
+[-24.0, 3.0, 12.0, 49.0, -23.0], [46.0, 12.0, -40.0, -15.0, 54.0]], [[-58.0, -9.0, 38.0, 35.0, 17.0], [-8.0, -50.0, -34.0, 
+20.0, -42.0], [-31.0, -15.0, 42.0, -53.0, -49.0], [18.0, 9.0, 59.0, 49.0, -12.0]], [[49.0, -1.0, -58.0, -52.0, -43.0], [-21.0, 
+82.0, 47.0, -49.0, -8.0], [59.0, 9.0, -70.0, 26.0, 51.0], [-16.0, 26.0, -40.0, -59.0, -13.0]], [[-110.0, 4.0, 0.0, -32.0, 
+-12.0], [69.0, -44.0, -48.0, 8.0, -65.0], [-56.0, -9.0, 23.0, -90.0, 9.0], [-32.0, -9.0, 102.0, 78.0, -43.0]]], [[[35.0, 51.0, 
+14.0, -40.0, 3.0], [5.0, -8.0, 7.0, -19.0, -10.0], [-39.0, -29.0, -18.0, 14.0, 109.0], [36.0, -4.0, -60.0, -131.0, 1.0]], 
+[[-16.0, 30.0, 21.0, -15.0, 40.0], [35.0, -67.0, -64.0, 58.0, 30.0], [-29.0, -21.0, 61.0, -18.0, 23.0], [-12.0, -70.0, -9.0, 
+-28.0, -23.0]], [[-27.0, 32.0, 53.0, 32.0, 28.0], [-24.0, -81.0, -51.0, 51.0, -18.0], [-47.0, -53.0, 57.0, -45.0, -5.0], [50.0, 
+-33.0, 6.0, -42.0, -14.0]], [[-29.0, 40.0, 26.0, -14.0, 13.0], [14.0, -59.0, -44.0, 31.0, -20.0], [-49.0, -42.0, 33.0, -42.0, 
+44.0], [22.0, -36.0, 4.0, -52.0, -24.0]], [[-10.0, -28.0, -16.0, 21.0, -5.0], [-32.0, 9.0, -11.0, 20.0, 1.0], [49.0, 3.0, 12.0, 
+-17.0, -69.0], [-16.0, -4.0, 25.0, 50.0, -18.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 7.0, 0.0, 5.0, -3.0], [4.0, 6.0, 5.0, 2.0, 0.0], [-6.0, 2.0, 0.0, 4.0, 3.0], [0.0, 0.0, 
+5.0, 3.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -4.0, 0.0, 0.0, -7.0], [-6.0, 2.0, 2.0, 0.0, -7.0], [-7.0, 0.0, 0.0, -7.0, 
+1.0], [2.0, 0.0, -5.0, -3.0, 6.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(-6.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-16.0, -28.0, -0.0, -20.0, 12.0], [-16.0, -24.0, -20.0, -8.0, -0.0], [24.0, -8.0, -0.0, -16.0, 
+-12.0], [-0.0, -0.0, -20.0, -12.0, 24.0]])+(1.-msk_ref)*numpy.array([[18.0, 24.0, -0.0, -0.0, 42.0], [36.0, -12.0, -12.0, -0.0, 
+42.0], [42.0, -0.0, -0.0, 42.0, -6.0], [-12.0, -0.0, 30.0, 18.0, -36.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-3.0, 6.0, 3.0, 7.0, 3.0], [-1.0, -5.0, -1.0, -7.0, 7.0], [-6.0, -6.0, 6.0, 7.0, 7.0], 
+[-1.0, 2.0, -6.0, 7.0, 2.0]], [[5.0, 6.0, -1.0, 7.0, -6.0], [7.0, 2.0, 7.0, -7.0, 5.0], [-2.0, 0.0, -6.0, 7.0, -2.0], [-5.0, 
+-7.0, 7.0, -3.0, 3.0]], [[-6.0, -5.0, -6.0, 3.0, -7.0], [-5.0, 0.0, -6.0, 7.0, -2.0], [-2.0, 7.0, 3.0, 1.0, 2.0], [-2.0, 0.0, 
+3.0, 0.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, -3.0, -1.0, -6.0, 1.0], [1.0, -7.0, -1.0, -2.0, 7.0], [-3.0, 4.0, 0.0, 
+-4.0, -6.0], [3.0, -6.0, -1.0, -1.0, 2.0]], [[-3.0, -3.0, -4.0, -6.0, 0.0], [-5.0, -7.0, -3.0, 0.0, -5.0], [-2.0, 7.0, 5.0, 
+0.0, 7.0], [0.0, 0.0, -1.0, -5.0, -7.0]], [[6.0, 2.0, 0.0, 2.0, -2.0], [6.0, 0.0, 2.0, -6.0, 4.0], [0.0, -1.0, 3.0, 4.0, -3.0], 
+[-1.0, 3.0, 2.0, -4.0, -7.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, -6.0, 1.0])+(1.-msk_arg1)*numpy.array([3.0, -7.0, -5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-36.0, -41.0, 0.0, -39.0, 29.0], [-47.0, -12.0, -48.0, 49.0, -32.0], [10.0, 7.0, 39.0, -41.0, 
+14.0], [28.0, 42.0, -39.0, 18.0, -17.0]])+(1.-msk_ref)*numpy.array([[0.0, 2.0, 25.0, 14.0, 13.0], [8.0, 28.0, 8.0, 24.0, 36.0], 
+[5.0, -32.0, -50.0, -32.0, -52.0], [14.0, -33.0, -6.0, 52.0, 90.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 0.0, -3.0, 5.0, 1.0], [-1.0, 5.0, -3.0, 3.0, 0.0], [4.0, -1.0, -3.0, 0.0, -2.0], 
+[-7.0, -7.0, 6.0, 3.0, 0.0]], [[5.0, 0.0, -1.0, 7.0, 4.0], [5.0, -4.0, 7.0, 1.0, -5.0], [0.0, 4.0, 0.0, 3.0, -2.0], [3.0, 3.0, 
+-2.0, 1.0, 7.0]], [[3.0, 6.0, 5.0, -1.0, 6.0], [-5.0, 0.0, 2.0, -1.0, 0.0], [-7.0, 1.0, -3.0, -2.0, -5.0], [0.0, 0.0, 0.0, 0.0, 
+-1.0]]], [[[-3.0, -2.0, 0.0, 6.0, -3.0], [4.0, 2.0, 3.0, -1.0, -1.0], [1.0, 3.0, -4.0, 6.0, 0.0], [-5.0, 5.0, -1.0, -6.0, 
+-2.0]], [[-1.0, -7.0, -1.0, 1.0, 0.0], [-4.0, 5.0, 0.0, 5.0, -4.0], [-1.0, -4.0, -5.0, -7.0, -5.0], [3.0, 6.0, 3.0, 0.0, 6.0]], 
+[[1.0, 0.0, 3.0, 4.0, -1.0], [0.0, 0.0, -1.0, -3.0, -5.0], [2.0, 1.0, -7.0, 5.0, -7.0], [-4.0, 0.0, -5.0, -4.0, 
+4.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 2.0, 6.0, -1.0, 0.0], [6.0, -1.0, 1.0, 6.0, -3.0], [-3.0, -1.0, -4.0, 5.0, 2.0], 
+[-2.0, 1.0, -6.0, 0.0, 5.0]], [[1.0, -6.0, -4.0, 6.0, 5.0], [-5.0, 1.0, 4.0, -6.0, 5.0], [6.0, -6.0, -4.0, 2.0, -5.0], [-4.0, 
+0.0, -4.0, -5.0, -1.0]], [[-7.0, -7.0, -2.0, -3.0, -1.0], [-4.0, -3.0, 0.0, -3.0, -5.0], [2.0, -2.0, 1.0, -5.0, 7.0], [-5.0, 
+3.0, 0.0, 0.0, -7.0]]], [[[-6.0, -3.0, -3.0, -3.0, -1.0], [-6.0, -2.0, 3.0, -1.0, -1.0], [5.0, -3.0, 1.0, 2.0, 1.0], [7.0, 1.0, 
+3.0, 5.0, 3.0]], [[0.0, -1.0, -3.0, 2.0, 4.0], [-3.0, -6.0, -7.0, -1.0, 7.0], [0.0, 3.0, -5.0, -2.0, 6.0], [2.0, 2.0, -7.0, 
+1.0, -4.0]], [[-2.0, 0.0, 2.0, -5.0, -1.0], [2.0, -6.0, -4.0, 1.0, 7.0], [-7.0, 0.0, 0.0, -7.0, 7.0], [-1.0, -3.0, 4.0, -7.0, 
+-6.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-3.0, 5.0, 3.0], [3.0, 7.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 2.0, 3.0], [5.0, 1.0, 
+6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[22.0, -37.0, 24.0, 58.0, 22.0], [-3.0, 6.0, 55.0, 13.0, -76.0], [-29.0, 11.0, -75.0, -2.0, 
+-82.0], [26.0, 93.0, -30.0, -38.0, 84.0]])+(1.-msk_ref)*numpy.array([[-61.0, -57.0, -44.0, -36.0, 0.0], [-67.0, -55.0, -12.0, 
+-45.0, 51.0], [13.0, -26.0, 11.0, -65.0, 56.0], [16.0, -6.0, 48.0, -26.0, -68.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-7.0, -2.0, 3.0, 5.0, -5.0], [-7.0, 4.0, -6.0, 2.0, 3.0], [-6.0, -6.0, -1.0, -3.0, 2.0], 
+[-3.0, -5.0, 4.0, -2.0, 2.0]])+(1.-msk_arg0)*numpy.array([[7.0, -6.0, -5.0, -2.0, 0.0], [-6.0, -5.0, 0.0, -7.0, 0.0], [-4.0, 
+-5.0, -2.0, 6.0, 0.0], [3.0, 7.0, 7.0, 3.0, -7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-5.0, -3.0])+(1.-msk_arg1)*numpy.array([0.0, 1.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[35.0, 21.0], [10.0, 6.0], [-15.0, -9.0], [-25.0, -15.0], [25.0, 15.0]], [[35.0, 21.0], [-20.0, 
+-12.0], [30.0, 18.0], [-10.0, -6.0], [-15.0, -9.0]], [[30.0, 18.0], [30.0, 18.0], [5.0, 3.0], [15.0, 9.0], [-10.0, -6.0]], 
+[[15.0, 9.0], [25.0, 15.0], [-20.0, -12.0], [10.0, 6.0], [-10.0, -6.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 7.0], [0.0, -6.0], 
+[0.0, -5.0], [0.0, -2.0], [0.0, 0.0]], [[0.0, -6.0], [0.0, -5.0], [0.0, 0.0], [0.0, -7.0], [0.0, 0.0]], [[0.0, -4.0], [0.0, 
+-5.0], [0.0, -2.0], [0.0, 6.0], [0.0, 0.0]], [[0.0, 3.0], [0.0, 7.0], [0.0, 7.0], [0.0, 3.0], [0.0, -7.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, -6.0, 0.0, 3.0, 6.0], [4.0, 0.0, 0.0, -5.0, 1.0], [2.0, 7.0, 3.0, 4.0, 0.0], [-4.0, 
+-5.0, -6.0, 4.0, -4.0]], [[-1.0, -5.0, 4.0, 7.0, -5.0], [-2.0, 0.0, 4.0, 1.0, 7.0], [3.0, 7.0, 4.0, 7.0, -7.0], [0.0, 7.0, 
+-6.0, 3.0, 6.0]], [[4.0, 7.0, -4.0, -3.0, -6.0], [-4.0, -2.0, -3.0, -5.0, -3.0], [1.0, 5.0, 1.0, 4.0, 3.0], [-7.0, 7.0, 6.0, 
+-5.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, 0.0, -7.0, -3.0, -2.0], [-1.0, 0.0, -6.0, -4.0, -1.0], [4.0, 2.0, -5.0, 0.0, 
+-4.0], [-4.0, 2.0, 1.0, 7.0, 0.0]], [[-5.0, 3.0, 4.0, -5.0, 3.0], [3.0, -3.0, -1.0, -6.0, 1.0], [-6.0, -5.0, 6.0, 2.0, 1.0], 
+[-4.0, 5.0, 6.0, 6.0, -4.0]], [[-1.0, -4.0, -1.0, 0.0, -1.0], [-7.0, 2.0, -1.0, -6.0, 0.0], [1.0, 3.0, -1.0, -1.0, -3.0], 
+[-6.0, 5.0, 4.0, -5.0, -7.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-1.0, -2.0], [3.0, 5.0], [5.0, 2.0]])+(1.-msk_arg1)*numpy.array([[7.0, 1.0], [3.0, 5.0], 
+[-5.0, -4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[15.0, -1.0], [26.0, 1.0], [-8.0, 12.0], [3.0, 23.0], [-51.0, -49.0]], [[-30.0, -26.0], [-10.0, 
+-4.0], [-3.0, 14.0], [-17.0, 5.0], [5.0, 27.0]], [[12.0, 13.0], [39.0, 31.0], [14.0, 16.0], [37.0, 35.0], [-6.0, -29.0]], 
+[[-31.0, -6.0], [61.0, 59.0], [18.0, -6.0], [-20.0, -3.0], [2.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[-17.0, -22.0], [29.0, 
+31.0], [-32.0, 17.0], [-36.0, -28.0], [0.0, 17.0]], [[37.0, 42.0], [-19.0, -23.0], [-40.0, -7.0], [-16.0, -10.0], [-4.0, 4.0]], 
+[[5.0, -30.0], [-16.0, -35.0], [-12.0, 29.0], [11.0, 14.0], [-10.0, 13.0]], [[-10.0, 0.0], [4.0, 7.0], [5.0, 15.0], [92.0, 
+57.0], [23.0, 8.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-5.0, 0.0, -5.0, 1.0, 1.0], [7.0, 0.0, -5.0, 1.0, 3.0], [0.0, -5.0, 4.0, 0.0, 4.0], [2.0, 
+1.0, 2.0, -4.0, 5.0]], [[-3.0, -7.0, 0.0, 2.0, 0.0], [-7.0, 0.0, -1.0, -2.0, -7.0], [6.0, -3.0, -6.0, 0.0, 1.0], [5.0, 0.0, 
+1.0, 2.0, -2.0]], [[5.0, 2.0, -1.0, 1.0, 4.0], [5.0, 3.0, 2.0, -5.0, 3.0], [1.0, 7.0, 4.0, 4.0, -5.0], [-6.0, -5.0, 0.0, -3.0, 
+-7.0]]], [[[1.0, -4.0, 1.0, -3.0, 0.0], [-2.0, 2.0, 1.0, -6.0, 4.0], [3.0, 6.0, 4.0, -4.0, 7.0], [3.0, -3.0, 3.0, 5.0, 4.0]], 
+[[7.0, -7.0, -7.0, 5.0, -2.0], [-5.0, 2.0, -5.0, 5.0, 0.0], [1.0, -5.0, -6.0, 7.0, -4.0], [-7.0, 6.0, -2.0, -7.0, 7.0]], [[2.0, 
+6.0, 7.0, -1.0, 7.0], [-2.0, 1.0, -1.0, 5.0, 6.0], [0.0, 6.0, -7.0, -6.0, 2.0], [3.0, 3.0, 4.0, 3.0, 
+-1.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, -4.0, 4.0, -3.0, 4.0], [1.0, -1.0, -2.0, -3.0, 0.0], [-7.0, 1.0, 2.0, -5.0, 1.0], 
+[7.0, 6.0, 3.0, 1.0, 7.0]], [[-1.0, -2.0, -4.0, 2.0, -3.0], [-5.0, -5.0, -6.0, 4.0, 0.0], [0.0, 6.0, 7.0, -3.0, -3.0], [1.0, 
+7.0, 5.0, 7.0, -5.0]], [[-3.0, -5.0, 7.0, -7.0, -4.0], [-3.0, -6.0, 0.0, 6.0, 0.0], [1.0, 0.0, 1.0, -7.0, 4.0], [-1.0, 2.0, 
+-2.0, 4.0, -6.0]]], [[[7.0, -5.0, -1.0, 0.0, 3.0], [-5.0, -2.0, 3.0, 0.0, -3.0], [-1.0, 0.0, 3.0, 0.0, 2.0], [5.0, 7.0, 4.0, 
+-3.0, 4.0]], [[-7.0, 5.0, 0.0, 0.0, 7.0], [-2.0, -3.0, 1.0, -2.0, -6.0], [-4.0, -4.0, -3.0, -7.0, 0.0], [3.0, 5.0, 6.0, 0.0, 
+-7.0]], [[-2.0, 4.0, 0.0, -4.0, 0.0], [5.0, 1.0, 4.0, 1.0, 4.0], [-7.0, -1.0, -6.0, -5.0, -6.0], [3.0, 7.0, 6.0, 3.0, 0.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, 0.0], [-7.0, -1.0], [-5.0, 2.0]], [[3.0, -3.0], [4.0, -2.0], [-3.0, 
+0.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -7.0], [-2.0, -2.0], [-1.0, -2.0]], [[3.0, 4.0], [4.0, -5.0], [7.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[6.0, -4.0], [-19.0, 37.0], [-56.0, 9.0], [-2.0, -1.0], [-46.0, 12.0]], [[25.0, 33.0], [-4.0, 
+-4.0], [-32.0, 12.0], [29.0, 0.0], [37.0, 1.0]], [[-34.0, -15.0], [-49.0, 9.0], [43.0, 14.0], [14.0, 6.0], [29.0, -24.0]], 
+[[-27.0, -12.0], [34.0, -13.0], [-12.0, -6.0], [-33.0, -9.0], [107.0, -38.0]]])+(1.-msk_ref)*numpy.array([[[-21.0, 36.0], 
+[46.0, -3.0], [-6.0, -38.0], [-22.0, 31.0], [43.0, -37.0]], [[24.0, -1.0], [6.0, 36.0], [55.0, 33.0], [-12.0, 11.0], [-5.0, 
+18.0]], [[-62.0, 63.0], [-36.0, 1.0], [-62.0, -3.0], [-45.0, 90.0], [-35.0, -1.0]], [[40.0, -44.0], [68.0, -57.0], [67.0, 
+-41.0], [-7.0, -41.0], [-7.0, 24.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-6.0, 4.0, -6.0, -5.0, 0.0], [0.0, -2.0, 0.0, 0.0, -7.0], [0.0, -2.0, -5.0, 0.0, -4.0], [0.0, 
+-4.0, 5.0, 1.0, -5.0]])+(1.-msk_arg0)*numpy.array([[5.0, 5.0, 6.0, 4.0, 2.0], [7.0, 3.0, -3.0, 7.0, 1.0], [4.0, 1.0, 2.0, 1.0, 
+4.0], [-6.0, -1.0, 4.0, -5.0, 7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[3.0, -1.0, 4.0, 5.0, 5.0], [4.0, -4.0, -2.0, 1.0, -3.0], [-3.0, 0.0, 4.0, -4.0, 0.0], [2.0, 
+-3.0, 0.0, 4.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, 
+-3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-18.0, 6.0, -24.0, -30.0, -30.0], [-24.0, 24.0, 12.0, -6.0, 18.0], [18.0, 0.0, -24.0, 24.0, 
+0.0], [-12.0, 18.0, 0.0, -24.0, 36.0]], [[12.0, -4.0, 16.0, 20.0, 20.0], [16.0, -16.0, -8.0, 4.0, -12.0], [-12.0, 0.0, 16.0, 
+-16.0, 0.0], [8.0, -12.0, 0.0, 16.0, -24.0]], [[-18.0, 6.0, -24.0, -30.0, -30.0], [-24.0, 24.0, 12.0, -6.0, 18.0], [18.0, 0.0, 
+-24.0, 24.0, 0.0], [-12.0, 18.0, 0.0, -24.0, 36.0]], [[-15.0, 5.0, -20.0, -25.0, -25.0], [-20.0, 20.0, 10.0, -5.0, 15.0], 
+[15.0, 0.0, -20.0, 20.0, 0.0], [-10.0, 15.0, 0.0, -20.0, 30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 2.0, -8.0, -10.0, -10.0], [-8.0, 8.0, 4.0, -2.0, 6.0], [6.0, 0.0, -8.0, 8.0, 0.0], 
+[-4.0, 6.0, 0.0, -8.0, 12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
+[[-21.0, 7.0, -28.0, -35.0, -35.0], [-28.0, 28.0, 14.0, -7.0, 21.0], [21.0, 0.0, -28.0, 28.0, 0.0], [-14.0, 21.0, 0.0, -28.0, 
+42.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 
+2.0, -8.0, -10.0, -10.0], [-8.0, 8.0, 4.0, -2.0, 6.0], [6.0, 0.0, -8.0, 8.0, 0.0], [-4.0, 6.0, 0.0, -8.0, 12.0]], [[-15.0, 5.0, 
+-20.0, -25.0, -25.0], [-20.0, 20.0, 10.0, -5.0, 15.0], [15.0, 0.0, -20.0, 20.0, 0.0], [-10.0, 15.0, 0.0, -20.0, 30.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, 4.0, -16.0, 
+-20.0, -20.0], [-16.0, 16.0, 8.0, -4.0, 12.0], [12.0, 0.0, -16.0, 16.0, 0.0], [-8.0, 12.0, 0.0, -16.0, 24.0]]], [[[0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, 4.0, -16.0, -20.0, 
+-20.0], [-16.0, 16.0, 8.0, -4.0, 12.0], [12.0, 0.0, -16.0, 16.0, 0.0], [-8.0, 12.0, 0.0, -16.0, 24.0]], [[15.0, -5.0, 20.0, 
+25.0, 25.0], [20.0, -20.0, -10.0, 5.0, -15.0], [-15.0, 0.0, 20.0, -20.0, 0.0], [10.0, -15.0, 0.0, 20.0, -30.0]], [[3.0, -1.0, 
+4.0, 5.0, 5.0], [4.0, -4.0, -2.0, 1.0, -3.0], [-3.0, 0.0, 4.0, -4.0, 0.0], [2.0, -3.0, 0.0, 4.0, -6.0]], [[-15.0, 5.0, -20.0, 
+-25.0, -25.0], [-20.0, 20.0, 10.0, -5.0, 15.0], [15.0, 0.0, -20.0, 20.0, 0.0], [-10.0, 15.0, 0.0, -20.0, 
+30.0]]]])+(1.-msk_ref)*numpy.array([[[[-35.0, -25.0, 0.0, 0.0, -15.0], [0.0, 10.0, -20.0, -5.0, -25.0], [-5.0, -5.0, -15.0, 
+-20.0, -5.0], [-20.0, 25.0, 5.0, 10.0, 5.0]], [[-35.0, -25.0, 0.0, 0.0, -15.0], [0.0, 10.0, -20.0, -5.0, -25.0], [-5.0, -5.0, 
+-15.0, -20.0, -5.0], [-20.0, 25.0, 5.0, 10.0, 5.0]], [[-42.0, -30.0, 0.0, 0.0, -18.0], [0.0, 12.0, -24.0, -6.0, -30.0], [-6.0, 
+-6.0, -18.0, -24.0, -6.0], [-24.0, 30.0, 6.0, 12.0, 6.0]], [[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 8.0, -16.0, -4.0, -20.0], 
+[-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]], [[-14.0, -10.0, 0.0, 0.0, -6.0], [0.0, 4.0, -8.0, -2.0, 
+-10.0], [-2.0, -2.0, -6.0, -8.0, -2.0], [-8.0, 10.0, 2.0, 4.0, 2.0]]], [[[-49.0, -35.0, 0.0, 0.0, -21.0], [0.0, 14.0, -28.0, 
+-7.0, -35.0], [-7.0, -7.0, -21.0, -28.0, -7.0], [-28.0, 35.0, 7.0, 14.0, 7.0]], [[-21.0, -15.0, 0.0, 0.0, -9.0], [0.0, 6.0, 
+-12.0, -3.0, -15.0], [-3.0, -3.0, -9.0, -12.0, -3.0], [-12.0, 15.0, 3.0, 6.0, 3.0]], [[21.0, 15.0, 0.0, 0.0, 9.0], [0.0, -6.0, 
+12.0, 3.0, 15.0], [3.0, 3.0, 9.0, 12.0, 3.0], [12.0, -15.0, -3.0, -6.0, -3.0]], [[-49.0, -35.0, 0.0, 0.0, -21.0], [0.0, 14.0, 
+-28.0, -7.0, -35.0], [-7.0, -7.0, -21.0, -28.0, -7.0], [-28.0, 35.0, 7.0, 14.0, 7.0]], [[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 
+2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, -3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]]], [[[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 
+8.0, -16.0, -4.0, -20.0], [-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]], [[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 
+2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, -3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]], [[-14.0, -10.0, 0.0, 0.0, -6.0], [0.0, 
+4.0, -8.0, -2.0, -10.0], [-2.0, -2.0, -6.0, -8.0, -2.0], [-8.0, 10.0, 2.0, 4.0, 2.0]], [[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 
+2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, -3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]], [[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 
+8.0, -16.0, -4.0, -20.0], [-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]]], [[[42.0, 30.0, 0.0, 0.0, 18.0], 
+[0.0, -12.0, 24.0, 6.0, 30.0], [6.0, 6.0, 18.0, 24.0, 6.0], [24.0, -30.0, -6.0, -12.0, -6.0]], [[7.0, 5.0, 0.0, 0.0, 3.0], 
+[0.0, -2.0, 4.0, 1.0, 5.0], [1.0, 1.0, 3.0, 4.0, 1.0], [4.0, -5.0, -1.0, -2.0, -1.0]], [[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 
+8.0, -16.0, -4.0, -20.0], [-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]], [[35.0, 25.0, 0.0, 0.0, 15.0], [0.0, 
+-10.0, 20.0, 5.0, 25.0], [5.0, 5.0, 15.0, 20.0, 5.0], [20.0, -25.0, -5.0, -10.0, -5.0]], [[-49.0, -35.0, 0.0, 0.0, -21.0], 
+[0.0, 14.0, -28.0, -7.0, -35.0], [-7.0, -7.0, -21.0, -28.0, -7.0], [-28.0, 35.0, 7.0, 14.0, 7.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, 7.0, 2.0, 7.0, 1.0], [-3.0, 2.0, -4.0, -5.0, -5.0], [5.0, 7.0, -5.0, -5.0, 0.0], [3.0, 
+6.0, 0.0, 7.0, -6.0]], [[2.0, -5.0, 0.0, -5.0, 6.0], [6.0, 0.0, -3.0, -4.0, 0.0], [-7.0, 0.0, 5.0, -2.0, 7.0], [-2.0, 7.0, 3.0, 
+3.0, 4.0]], [[-2.0, -5.0, 6.0, 7.0, 4.0], [-4.0, 5.0, 4.0, -1.0, 7.0], [2.0, 4.0, 1.0, 2.0, -5.0], [3.0, 2.0, -2.0, 4.0, 
+0.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 1.0, -6.0, 0.0, 4.0], [0.0, 6.0, -4.0, -1.0, 1.0], [3.0, 2.0, -7.0, 3.0, 0.0], [6.0, 
+-4.0, 6.0, -2.0, 4.0]], [[0.0, 6.0, 5.0, 0.0, -1.0], [5.0, 6.0, 6.0, 2.0, 2.0], [-4.0, -4.0, -2.0, 3.0, 7.0], [6.0, -5.0, 0.0, 
+-7.0, -4.0]], [[-6.0, -4.0, -2.0, -1.0, -1.0], [7.0, 0.0, -5.0, 1.0, -3.0], [2.0, 0.0, -5.0, -3.0, 0.0], [6.0, 1.0, 4.0, -7.0, 
+-4.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-4.0, -1.0, 1.0, -1.0, -3.0], [-1.0, -7.0, 5.0, -6.0, 1.0], [3.0, 2.0, 4.0, 0.0, -4.0], 
+[4.0, -1.0, 0.0, 7.0, 3.0]], [[2.0, 5.0, 1.0, -3.0, -7.0], [-4.0, -5.0, 3.0, -2.0, 7.0], [-2.0, 0.0, 2.0, 1.0, -1.0], [-6.0, 
+1.0, -7.0, -7.0, -4.0]], [[1.0, 3.0, 5.0, 6.0, -7.0], [-7.0, -6.0, 4.0, 0.0, -5.0], [0.0, -3.0, 6.0, -5.0, -5.0], [-7.0, -6.0, 
+-5.0, -5.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, -7.0, -2.0, 0.0, -5.0], [-4.0, -2.0, 6.0, 0.0, 1.0], [1.0, -4.0, 7.0, 
+5.0, 4.0], [-1.0, 2.0, 3.0, 2.0, 4.0]], [[6.0, 0.0, -1.0, -2.0, 1.0], [0.0, 7.0, 4.0, -4.0, 1.0], [5.0, 6.0, 2.0, -6.0, 6.0], 
+[-6.0, 1.0, 1.0, -3.0, -3.0]], [[3.0, 7.0, 5.0, 3.0, 3.0], [7.0, 7.0, -6.0, 6.0, -6.0], [-2.0, 0.0, -5.0, 6.0, 4.0], [-1.0, 
+0.0, 7.0, -4.0, -2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-14.0, 0.0, -4.0, -22.0, -12.0], [2.0, -26.0, 18.0, -28.0, 28.0], [8.0, 14.0, 8.0, 12.0, 
+-8.0], [18.0, 10.0, -4.0, 24.0, -8.0]], [[-43.0, -47.0, -23.0, -22.0, 49.0], [48.0, 6.0, 0.0, -32.0, -3.0], [31.0, 29.0, -12.0, 
+20.0, 2.0], [93.0, 18.0, 60.0, 109.0, 11.0]], [[-2.0, 16.0, 32.0, 34.0, -48.0], [-44.0, -50.0, 34.0, -12.0, -28.0], [6.0, 
+-14.0, 44.0, -30.0, -38.0], [-34.0, -38.0, -30.0, -16.0, 42.0]], [[-31.0, -11.0, 37.0, 50.0, -35.0], [-36.0, -66.0, 48.0, 
+-32.0, -63.0], [31.0, -7.0, 60.0, -40.0, -58.0], [9.0, -54.0, 0.0, 49.0, 83.0]], [[12.0, 41.0, 27.0, 5.0, -73.0], [-53.0, 
+-61.0, 39.0, -18.0, 23.0], [-9.0, -10.0, 40.0, -14.0, -30.0], [-60.0, -19.0, -62.0, -55.0, 3.0]]], [[[20.0, 21.0, -17.0, -39.0, 
+-5.0], [7.0, 15.0, -13.0, 6.0, 59.0], [-21.0, 6.0, -24.0, 26.0, 26.0], [-20.0, 33.0, -22.0, -43.0, -57.0]], [[-3.0, 13.0, 27.0, 
+28.0, -41.0], [-37.0, -44.0, 30.0, -12.0, -23.0], [6.0, -11.0, 38.0, -25.0, -33.0], [-27.0, -32.0, -25.0, -11.0, 36.0]], 
+[[14.0, 1.0, 13.0, 37.0, 5.0], [-12.0, 19.0, -13.0, 30.0, -45.0], [-6.0, -20.0, 2.0, -23.0, -1.0], [-26.0, -23.0, 1.0, -27.0, 
+24.0]], [[11.0, -18.0, -14.0, 11.0, 50.0], [28.0, 61.0, -41.0, 38.0, -28.0], [-7.0, -7.0, -34.0, 1.0, 29.0], [11.0, 7.0, 33.0, 
+-2.0, -5.0]], [[27.0, 26.0, 30.0, 47.0, -34.0], [-44.0, -7.0, 3.0, 30.0, -40.0], [-15.0, -31.0, 22.0, -35.0, -15.0], [-69.0, 
+-37.0, -35.0, -70.0, 27.0]]], [[[-32.0, -34.0, 8.0, 28.0, 20.0], [9.0, -12.0, 12.0, -16.0, -54.0], [29.0, 4.0, 18.0, -17.0, 
+-23.0], [48.0, -24.0, 39.0, 74.0, 55.0]], [[-24.0, 5.0, 27.0, 17.0, -49.0], [-35.0, -73.0, 51.0, -42.0, -13.0], [21.0, 2.0, 
+52.0, -20.0, -48.0], [0.0, -31.0, -20.0, 29.0, 45.0]], [[31.0, 33.0, 5.0, -4.0, -27.0], [-22.0, 4.0, -6.0, 20.0, 25.0], [-25.0, 
+-13.0, -4.0, 0.0, 10.0], [-57.0, 4.0, -40.0, -75.0, -29.0]], [[18.0, 1.0, 3.0, 23.0, 15.0], [-1.0, 33.0, -23.0, 34.0, -29.0], 
+[-11.0, -16.0, -12.0, -12.0, 12.0], [-22.0, -9.0, 4.0, -31.0, 5.0]], [[9.0, 20.0, -18.0, -51.0, -14.0], [7.0, -5.0, 1.0, -14.0, 
+74.0], [-14.0, 15.0, -16.0, 32.0, 18.0], [-7.0, 37.0, -24.0, -24.0, -58.0]]], [[[-13.0, -4.0, 16.0, 21.0, -16.0], [-16.0, 
+-29.0, 21.0, -14.0, -26.0], [13.0, -3.0, 26.0, -17.0, -25.0], [3.0, -23.0, -1.0, 20.0, 35.0]], [[-8.0, 35.0, 23.0, -15.0, 
+-81.0], [-48.0, -89.0, 59.0, -50.0, 45.0], [4.0, 6.0, 50.0, -3.0, -41.0], [-32.0, -11.0, -59.0, -17.0, 2.0]], [[4.0, 9.0, -7.0, 
+-21.0, -7.0], [2.0, -3.0, 1.0, -6.0, 31.0], [-6.0, 6.0, -6.0, 13.0, 7.0], [-4.0, 15.0, -11.0, -11.0, -24.0]], [[-18.0, 20.0, 
+30.0, 8.0, -70.0], [-47.0, -88.0, 60.0, -48.0, 8.0], [15.0, 2.0, 58.0, -17.0, -51.0], [-18.0, -28.0, -41.0, 8.0, 33.0]], 
+[[32.0, 26.0, -2.0, -6.0, -10.0], [-10.0, 22.0, -18.0, 28.0, 22.0], [-26.0, -12.0, -16.0, 4.0, 20.0], [-48.0, 10.0, -28.0, 
+-70.0, -34.0]]]])+(1.-msk_ref)*numpy.array([[[[-39.0, -91.0, -44.0, -18.0, -53.0], [-70.0, -56.0, 78.0, -36.0, 43.0], [19.0, 
+-28.0, 79.0, -1.0, 4.0], [-1.0, 14.0, -21.0, 38.0, 40.0]], [[21.0, -35.0, -28.0, -24.0, -11.0], [-32.0, 12.0, 54.0, -48.0, 
+31.0], [39.0, 32.0, 39.0, -55.0, 24.0], [-33.0, 8.0, -19.0, 0.0, -6.0]], [[42.0, 28.0, -3.0, -16.0, 29.0], [10.0, 33.0, -4.0, 
+-32.0, 11.0], [23.0, 54.0, -22.0, -72.0, -2.0], [-22.0, -7.0, -27.0, -19.0, -35.0]], [[-3.0, -7.0, -5.0, -3.0, -3.0], [-7.0, 
+-7.0, 6.0, -6.0, 6.0], [2.0, 0.0, 5.0, -6.0, -4.0], [1.0, 0.0, -7.0, 4.0, 2.0]], [[-21.0, -35.0, -12.0, -1.0, -24.0], [-23.0, 
+-22.0, 26.0, -2.0, 9.0], [1.0, -22.0, 31.0, 20.0, 6.0], [3.0, 7.0, 4.0, 15.0, 21.0]]], [[[51.0, 49.0, 30.0, 11.0, 26.0], [49.0, 
+84.0, -22.0, 22.0, -37.0], [11.0, 30.0, -25.0, 12.0, 58.0], [-37.0, 5.0, 54.0, -43.0, -29.0]], [[18.0, -42.0, -18.0, -12.0, 
+-24.0], [-24.0, 30.0, 60.0, -24.0, 12.0], [36.0, 12.0, 54.0, -6.0, 60.0], [-42.0, 18.0, 24.0, -6.0, 6.0]], [[33.0, -7.0, -23.0, 
+-27.0, 11.0], [-19.0, 15.0, 30.0, -54.0, 32.0], [36.0, 52.0, 9.0, -86.0, 0.0], [-27.0, -2.0, -41.0, -6.0, -24.0]], [[18.0, 
+14.0, 5.0, -1.0, 10.0], [11.0, 23.0, -4.0, -2.0, -5.0], [7.0, 16.0, -8.0, -11.0, 12.0], [-12.0, 0.0, 6.0, -12.0, -12.0]], 
+[[0.0, -28.0, -19.0, -13.0, -12.0], [-25.0, -9.0, 32.0, -26.0, 21.0], [17.0, 8.0, 26.0, -25.0, 4.0], [-10.0, 4.0, -16.0, 8.0, 
+4.0]]], [[[-27.0, -7.0, 8.0, 14.0, -13.0], [2.0, -20.0, -10.0, 28.0, -13.0], [-21.0, -36.0, 3.0, 51.0, -4.0], [19.0, 2.0, 19.0, 
+10.0, 20.0]], [[-30.0, -14.0, 0.0, 8.0, -14.0], [-8.0, -32.0, -4.0, 16.0, -2.0], [-18.0, -32.0, 6.0, 34.0, -16.0], [22.0, 0.0, 
+2.0, 16.0, 20.0]], [[-6.0, 14.0, -9.0, -11.0, 18.0], [-7.0, -35.0, -20.0, -22.0, 21.0], [-7.0, 16.0, -28.0, -53.0, -60.0], 
+[24.0, -16.0, -58.0, 12.0, -12.0]], [[0.0, -42.0, -24.0, -15.0, -21.0], [-33.0, -6.0, 48.0, -30.0, 24.0], [24.0, 6.0, 42.0, 
+-21.0, 18.0], [-18.0, 9.0, -9.0, 9.0, 9.0]], [[42.0, 0.0, -7.0, -14.0, 7.0], [0.0, 49.0, 28.0, -28.0, 7.0], [35.0, 42.0, 14.0, 
+-42.0, 42.0], [-42.0, 7.0, 7.0, -21.0, -21.0]]], [[[36.0, 0.0, 12.0, 6.0, -6.0], [18.0, 72.0, 24.0, 12.0, -24.0], [24.0, 12.0, 
+24.0, 30.0, 84.0], [-48.0, 18.0, 66.0, -30.0, -6.0]], [[-15.0, 35.0, 18.0, 13.0, 18.0], [23.0, -20.0, -50.0, 26.0, -15.0], 
+[-31.0, -14.0, -43.0, 16.0, -42.0], [33.0, -13.0, -10.0, 3.0, -3.0]], [[-6.0, -14.0, 8.0, 12.0, -18.0], [4.0, 16.0, 12.0, 24.0, 
+-18.0], [-2.0, -24.0, 22.0, 54.0, 40.0], [-10.0, 12.0, 46.0, -4.0, 16.0]], [[-57.0, -35.0, -24.0, -7.0, -18.0], [-41.0, -94.0, 
+2.0, -14.0, 33.0], [-23.0, -34.0, 7.0, -10.0, -78.0], [51.0, -11.0, -62.0, 45.0, 27.0]], [[-48.0, -56.0, -24.0, -4.0, -36.0], 
+[-44.0, -64.0, 32.0, -8.0, 24.0], [-8.0, -40.0, 40.0, 20.0, -24.0], [24.0, 4.0, -20.0, 36.0, 36.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[2.0, -6.0, -6.0, 0.0, 2.0], [2.0, -4.0, -4.0, 1.0, -7.0], [-6.0, -5.0, -4.0, 5.0, -3.0], 
+[6.0, 4.0, -5.0, 6.0, -6.0]], [[-1.0, -7.0, 0.0, 3.0, 0.0], [3.0, -2.0, 2.0, 7.0, 7.0], [1.0, 7.0, -5.0, -3.0, -2.0], [-3.0, 
+4.0, 6.0, -2.0, -2.0]], [[-7.0, -3.0, -6.0, 2.0, -1.0], [3.0, 0.0, 3.0, 2.0, 0.0], [-6.0, -5.0, 0.0, -5.0, 2.0], [4.0, -7.0, 
+-3.0, 1.0, 4.0]]], [[[0.0, -1.0, 3.0, 0.0, 6.0], [0.0, 2.0, -6.0, 5.0, 0.0], [7.0, 6.0, -2.0, -5.0, 0.0], [1.0, 3.0, 5.0, 0.0, 
+0.0]], [[-4.0, -4.0, -1.0, -4.0, 7.0], [5.0, -2.0, 0.0, 3.0, 0.0], [2.0, -2.0, -6.0, -5.0, -2.0], [4.0, 7.0, -4.0, -4.0, 0.0]], 
+[[1.0, -2.0, 7.0, -2.0, -4.0], [5.0, 0.0, 1.0, 0.0, 3.0], [-6.0, 4.0, 4.0, 7.0, 1.0], [-1.0, 1.0, -3.0, -3.0, 
+7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 4.0, 5.0, -2.0, 0.0], [-1.0, -5.0, -7.0, 4.0, 0.0], [0.0, -7.0, -2.0, -4.0, -7.0], 
+[6.0, 6.0, -1.0, 5.0, -2.0]], [[0.0, -5.0, 2.0, 4.0, -4.0], [-7.0, 6.0, 3.0, -4.0, 5.0], [0.0, -4.0, -7.0, 7.0, -4.0], [7.0, 
+3.0, -6.0, 0.0, 5.0]], [[-7.0, -7.0, -4.0, 0.0, 5.0], [7.0, -4.0, 6.0, -6.0, 7.0], [0.0, 7.0, -6.0, -6.0, 4.0], [-1.0, 5.0, 
+0.0, 5.0, -6.0]]], [[[-1.0, 0.0, -5.0, 0.0, 6.0], [-1.0, 5.0, 4.0, 0.0, 1.0], [4.0, -4.0, 0.0, -4.0, -3.0], [2.0, 5.0, 0.0, 
+2.0, -1.0]], [[5.0, -4.0, -6.0, 5.0, 3.0], [3.0, -7.0, -7.0, 5.0, 0.0], [-4.0, -6.0, -7.0, 3.0, -3.0], [5.0, 3.0, 4.0, 4.0, 
+3.0]], [[0.0, -6.0, -2.0, -3.0, -7.0], [-4.0, -3.0, -7.0, 0.0, 0.0], [5.0, -4.0, 3.0, -3.0, 3.0], [2.0, 2.0, 0.0, 3.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, 4.0, -7.0, -3.0, 2.0], [2.0, -1.0, 2.0, 2.0, -4.0], [-5.0, 0.0, 1.0, -5.0, -1.0], 
+[5.0, 7.0, 1.0, -4.0, 7.0]], [[0.0, 5.0, -2.0, 0.0, 3.0], [-2.0, -3.0, 3.0, 7.0, -3.0], [5.0, 6.0, 5.0, -4.0, 1.0], [-7.0, 2.0, 
+7.0, 4.0, -3.0]], [[-2.0, -1.0, -4.0, -1.0, 0.0], [-2.0, -2.0, -7.0, 7.0, 4.0], [-5.0, -5.0, -1.0, 3.0, 3.0], [0.0, 3.0, 0.0, 
+-3.0, -3.0]]], [[[2.0, 0.0, -7.0, -6.0, -3.0], [6.0, 3.0, -2.0, -2.0, -3.0], [6.0, 2.0, 2.0, -1.0, 0.0], [7.0, -1.0, 2.0, -4.0, 
+-7.0]], [[5.0, 5.0, -7.0, -5.0, -6.0], [5.0, -6.0, -6.0, -1.0, 1.0], [5.0, 2.0, 4.0, 2.0, 0.0], [-5.0, -3.0, -5.0, 0.0, -5.0]], 
+[[-1.0, -6.0, -2.0, 1.0, 0.0], [4.0, 5.0, -7.0, -1.0, -2.0], [-2.0, 7.0, -5.0, 1.0, 0.0], [1.0, -2.0, -2.0, 1.0, 
+1.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, -1.0, -1.0, 4.0, 6.0], [6.0, -1.0, -7.0, 3.0, 0.0], [1.0, 0.0, -6.0, 7.0, -2.0], 
+[6.0, -2.0, 5.0, -6.0, -1.0]], [[-3.0, 7.0, -5.0, -4.0, -1.0], [2.0, 1.0, 2.0, 0.0, 7.0], [-2.0, 3.0, -5.0, -5.0, -2.0], [-3.0, 
+-3.0, -5.0, 6.0, 1.0]], [[5.0, -5.0, -2.0, -2.0, -6.0], [0.0, 0.0, 7.0, 2.0, -4.0], [3.0, -5.0, 4.0, -7.0, 1.0], [2.0, 1.0, 
+-6.0, -7.0, -2.0]]], [[[3.0, -3.0, -5.0, -1.0, -6.0], [-2.0, -5.0, 6.0, -3.0, -6.0], [-2.0, 0.0, -2.0, 0.0, 5.0], [3.0, -3.0, 
+0.0, -5.0, -2.0]], [[-4.0, 0.0, -3.0, 0.0, 5.0], [3.0, 1.0, 0.0, -4.0, 0.0], [1.0, 1.0, 3.0, -6.0, 5.0], [3.0, -5.0, 0.0, 2.0, 
+-5.0]], [[3.0, -3.0, -7.0, 5.0, 3.0], [7.0, -4.0, -3.0, 7.0, -7.0], [6.0, 4.0, -7.0, 5.0, 2.0], [0.0, -5.0, 2.0, 0.0, 4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-7.0, -16.0, 42.0, 22.0, 25.0], [4.0, 44.0, 67.0, -49.0, -39.0], [-2.0, 28.0, -17.0, -34.0, 
+-24.0], [38.0, 1.0, 13.0, 10.0, 59.0]], [[-14.0, -64.0, 107.0, 45.0, -6.0], [-26.0, 44.0, 28.0, -74.0, 36.0], [-12.0, -51.0, 
+-46.0, 40.0, -10.0], [30.0, -48.0, -33.0, 7.0, 13.0]], [[6.0, -65.0, 38.0, 18.0, -15.0], [41.0, 68.0, -19.0, -66.0, -24.0], 
+[59.0, 83.0, -33.0, 14.0, -12.0], [3.0, -74.0, -9.0, 37.0, -33.0]], [[-22.0, 5.0, 18.0, 16.0, 33.0], [-38.0, 1.0, 33.0, 41.0, 
+-1.0], [-11.0, -14.0, 7.0, -16.0, 9.0], [-3.0, 28.0, 45.0, 4.0, 3.0]], [[53.0, 68.0, -93.0, -80.0, -56.0], [61.0, -44.0, -15.0, 
+-18.0, -15.0], [74.0, 3.0, 63.0, -9.0, -5.0], [13.0, -8.0, -13.0, -33.0, -64.0]]], [[[14.0, 15.0, -77.0, -29.0, -17.0], [37.0, 
+-22.0, -73.0, 36.0, -10.0], [5.0, 48.0, 9.0, 2.0, 10.0], [-31.0, 4.0, -12.0, 0.0, -24.0]], [[-6.0, -36.0, 32.0, 10.0, -8.0], 
+[-2.0, 28.0, -6.0, -24.0, 14.0], [12.0, -12.0, -18.0, 22.0, 2.0], [18.0, -28.0, -4.0, 0.0, -26.0]], [[-19.0, -15.0, 52.0, 46.0, 
+16.0], [-50.0, -21.0, -18.0, 38.0, 38.0], [-23.0, -8.0, -14.0, 28.0, 15.0], [-75.0, -11.0, -4.0, 40.0, 0.0]], [[21.0, 52.0, 
+-85.0, -50.0, -10.0], [29.0, -29.0, -19.0, 52.0, -29.0], [65.0, 48.0, 56.0, -26.0, 12.0], [-24.0, 13.0, 45.0, -2.0, -70.0]], 
+[[-3.0, -11.0, 29.0, 24.0, 7.0], [-16.0, 1.0, -14.0, 32.0, 1.0], [64.0, 63.0, 13.0, 10.0, 14.0], [-81.0, -41.0, 36.0, 59.0, 
+-67.0]]], [[[42.0, 33.0, 13.0, -34.0, -42.0], [26.0, -6.0, 49.0, -57.0, -10.0], [129.0, 12.0, 57.0, -1.0, -11.0], [-4.0, -59.0, 
+17.0, 12.0, -92.0]], [[8.0, -14.0, 5.0, -2.0, 5.0], [28.0, 44.0, 18.0, -10.0, -49.0], [103.0, 103.0, 19.0, -24.0, -3.0], 
+[-18.0, -44.0, 58.0, 43.0, -69.0]], [[-38.0, -95.0, 86.0, 58.0, 19.0], [-24.0, 69.0, -11.0, -37.0, 23.0], [-55.0, -18.0, -77.0, 
+34.0, -1.0], [35.0, -26.0, -21.0, 8.0, 35.0]], [[-32.0, -57.0, 47.0, 52.0, 46.0], [-1.0, 64.0, 27.0, -38.0, -35.0], [-84.0, 
+36.0, -70.0, -26.0, -23.0], [43.0, 20.0, -15.0, 10.0, 126.0]], [[-15.0, -40.0, 29.0, 18.0, 0.0], [-12.0, 22.0, -21.0, -5.0, 
+22.0], [-17.0, -19.0, -28.0, 26.0, 7.0], [10.0, -15.0, -9.0, -1.0, -10.0]]], [[[15.0, 31.0, -85.0, -49.0, -24.0], [32.0, -31.0, 
+-44.0, 14.0, 4.0], [-37.0, -35.0, 10.0, 0.0, 3.0], [37.0, 37.0, -31.0, -53.0, 11.0]], [[54.0, 72.0, -80.0, -57.0, -31.0], 
+[71.0, -30.0, 14.0, -27.0, -60.0], [86.0, 86.0, 60.0, -45.0, -21.0], [-21.0, -11.0, 1.0, 10.0, -18.0]], [[-1.0, 11.0, 34.0, 
+5.0, 17.0], [-18.0, 17.0, 64.0, 8.0, -23.0], [86.0, 32.0, 37.0, -24.0, 2.0], [-15.0, -19.0, 73.0, 30.0, -62.0]], [[-19.0, 11.0, 
+-8.0, -2.0, 30.0], [-18.0, 7.0, 44.0, 12.0, -12.0], [-59.0, -46.0, -6.0, -30.0, -5.0], [61.0, 59.0, 18.0, -38.0, 62.0]], 
+[[-15.0, -80.0, 16.0, 21.0, -18.0], [12.0, 39.0, -95.0, -5.0, 32.0], [-14.0, 17.0, -55.0, 57.0, 16.0], [-9.0, -48.0, -34.0, 
+11.0, -41.0]]]])+(1.-msk_ref)*numpy.array([[[[-57.0, 37.0, 3.0, 19.0, 79.0], [23.0, 9.0, -62.0, -28.0, 34.0], [-13.0, 40.0, 
+-17.0, 26.0, 11.0], [4.0, -31.0, 47.0, 58.0, -10.0]], [[-18.0, 14.0, 89.0, 20.0, 33.0], [-40.0, 11.0, -69.0, -28.0, 35.0], 
+[-47.0, -8.0, 3.0, 96.0, -37.0], [13.0, 50.0, 75.0, -13.0, 1.0]], [[-18.0, 50.0, 50.0, 15.0, 46.0], [12.0, 24.0, -83.0, 32.0, 
+74.0], [-19.0, 12.0, -50.0, 79.0, -77.0], [-17.0, 35.0, 35.0, 23.0, 37.0]], [[-43.0, 39.0, -12.0, -39.0, 0.0], [-10.0, 23.0, 
+31.0, -47.0, 49.0], [-23.0, 5.0, 28.0, -79.0, 15.0], [-9.0, -18.0, -36.0, 46.0, -31.0]], [[22.0, -50.0, 20.0, -35.0, -68.0], 
+[-60.0, -3.0, 84.0, -69.0, -35.0], [-28.0, -62.0, 86.0, -68.0, 44.0], [49.0, 19.0, -24.0, -83.0, -69.0]]], [[[28.0, -68.0, 
+46.0, -9.0, -32.0], [-37.0, 18.0, 48.0, -26.0, -43.0], [15.0, -69.0, 108.0, -59.0, 25.0], [35.0, 38.0, -20.0, -74.0, -49.0]], 
+[[-9.0, 61.0, 0.0, -56.0, -86.0], [-70.0, -9.0, 58.0, -31.0, 49.0], [-64.0, 19.0, -26.0, -10.0, -22.0], [-62.0, 23.0, -37.0, 
+55.0, 32.0]], [[33.0, 7.0, 30.0, -91.0, -161.0], [-114.0, 11.0, 142.0, -42.0, 22.0], [-52.0, -56.0, 71.0, -99.0, -15.0], 
+[-48.0, 69.0, -100.0, -16.0, -3.0]], [[-34.0, -2.0, 13.0, 44.0, 89.0], [31.0, -3.0, -78.0, -20.0, -4.0], [-1.0, 23.0, -13.0, 
+60.0, 19.0], [39.0, -27.0, 76.0, 4.0, -21.0]], [[23.0, -3.0, -44.0, -35.0, -53.0], [8.0, 0.0, 65.0, 11.0, 1.0], [9.0, -20.0, 
+1.0, -74.0, 2.0], [2.0, -11.0, -67.0, -24.0, -11.0]]], [[[43.0, -27.0, -43.0, 21.0, -29.0], [15.0, -44.0, 9.0, 39.0, -59.0], 
+[18.0, 16.0, -55.0, 49.0, 10.0], [0.0, -17.0, 10.0, -28.0, 32.0]], [[40.0, -32.0, 79.0, -42.0, -98.0], [-88.0, 33.0, 78.0, 1.0, 
+-4.0], [0.0, -69.0, 108.0, -62.0, -29.0], [-46.0, 95.0, -65.0, -23.0, 11.0]], [[26.0, -26.0, 49.0, 47.0, 5.0], [-26.0, -24.0, 
+-51.0, 31.0, -46.0], [5.0, 14.0, -19.0, 120.0, -17.0], [-24.0, 39.0, 67.0, -2.0, 54.0]], [[-88.0, 104.0, 13.0, -43.0, 35.0], 
+[-14.0, 46.0, -15.0, -45.0, 118.0], [-43.0, 42.0, 3.0, -54.0, -23.0], [-60.0, -7.0, -25.0, 134.0, 4.0]], [[37.0, -41.0, 22.0, 
+-2.0, -50.0], [-32.0, 3.0, 42.0, 29.0, -47.0], [34.0, -23.0, 54.0, -24.0, 2.0], [-40.0, 39.0, -33.0, -1.0, 28.0]]], [[[-28.0, 
+36.0, -78.0, 6.0, 54.0], [75.0, -12.0, -29.0, 4.0, 27.0], [2.0, 39.0, -78.0, -6.0, 12.0], [34.0, -75.0, 5.0, 13.0, -18.0]], 
+[[31.0, -31.0, -79.0, 7.0, -6.0], [55.0, -33.0, 23.0, 15.0, -43.0], [20.0, -5.0, -46.0, -16.0, 31.0], [61.0, -56.0, -11.0, 
+-72.0, -30.0]], [[1.0, -41.0, 19.0, 20.0, 20.0], [-6.0, -1.0, -5.0, -19.0, -42.0], [15.0, -14.0, 48.0, -1.0, 34.0], [24.0, 0.0, 
+25.0, -22.0, -25.0]], [[29.0, -45.0, -58.0, 23.0, 17.0], [59.0, -23.0, 3.0, 24.0, -53.0], [38.0, -9.0, -23.0, -9.0, 31.0], 
+[58.0, -46.0, 1.0, -67.0, -27.0]], [[-65.0, 73.0, -8.0, -20.0, 37.0], [2.0, 19.0, -21.0, -34.0, 72.0], [-31.0, 44.0, -19.0, 
+-20.0, -4.0], [-33.0, -24.0, -1.0, 95.0, 2.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-2.0, 3.0], [-3.0, 4.0]], [[4.0, 1.0], [1.0, 4.0]], [[-4.0, 3.0], [6.0, -6.0]], [[-4.0, 
+4.0], [3.0, -6.0]], [[0.0, 4.0], [7.0, 6.0]], [[7.0, 1.0], [-7.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, -2.0], [2.0, 
+1.0]], [[0.0, -4.0], [-1.0, -1.0]], [[-4.0, 2.0], [4.0, -6.0]], [[-1.0, 6.0], [-5.0, 5.0]], [[-6.0, 0.0], [0.0, -7.0]], [[2.0, 
+-1.0], [-1.0, 4.0]]])
+      arg1=0.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], 
+[0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-0.0, -0.0], [0.0, 0.0]], 
+[[0.0, -0.0], [-0.0, -0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[0.0, -0.0], 
+[-0.0, 0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[1.0, 6.0], [-4.0, -5.0]], [[-1.0, 0.0], [-7.0, 0.0]], [[7.0, 5.0], [-3.0, 5.0]], [[-2.0, 
+-6.0], [1.0, 3.0]], [[-6.0, -6.0], [-5.0, 1.0]], [[-7.0, 0.0], [5.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 7.0], [3.0, 
+-4.0]], [[-1.0, 3.0], [6.0, 0.0]], [[-3.0, -2.0], [2.0, 7.0]], [[-2.0, 0.0], [3.0, -4.0]], [[-1.0, -5.0], [-7.0, 1.0]], [[1.0, 
+2.0], [4.0, -7.0]]])
+      arg1=numpy.array(-5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-5.0, -30.0], [20.0, 25.0]], [[5.0, -0.0], [35.0, -0.0]], [[-35.0, -25.0], [15.0, -25.0]], 
+[[10.0, 30.0], [-5.0, -15.0]], [[30.0, 30.0], [25.0, -5.0]], [[35.0, -0.0], [-25.0, 
+-25.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, -35.0], [-15.0, 20.0]], [[5.0, -15.0], [-30.0, -0.0]], [[15.0, 10.0], [-10.0, 
+-35.0]], [[10.0, -0.0], [-15.0, 20.0]], [[5.0, 25.0], [35.0, -5.0]], [[-5.0, -10.0], [-20.0, 35.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 2.0], [-2.0, -3.0]], [[0.0, -5.0], [-5.0, 4.0]], [[3.0, -5.0], [4.0, -2.0]], [[7.0, 
+0.0], [-6.0, 2.0]], [[-5.0, -5.0], [3.0, -1.0]], [[-5.0, 5.0], [-6.0, -5.0]]], [[[-1.0, 4.0], [-1.0, -4.0]], [[-3.0, 0.0], 
+[5.0, 6.0]], [[1.0, 4.0], [-5.0, -7.0]], [[1.0, 6.0], [-2.0, 4.0]], [[-3.0, 7.0], [4.0, -5.0]], [[1.0, 1.0], [0.0, -2.0]]], 
+[[[-2.0, 0.0], [6.0, 1.0]], [[-5.0, 1.0], [3.0, 2.0]], [[-4.0, 5.0], [3.0, 1.0]], [[6.0, -6.0], [3.0, 1.0]], [[-6.0, 7.0], 
+[-3.0, 0.0]], [[-7.0, 2.0], [-4.0, -6.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -7.0], [-2.0, 4.0]], [[0.0, -1.0], [-6.0, 
+5.0]], [[0.0, -2.0], [-4.0, 0.0]], [[-3.0, 4.0], [-7.0, -1.0]], [[-7.0, 7.0], [-1.0, 0.0]], [[0.0, 0.0], [3.0, 0.0]]], [[[-1.0, 
+3.0], [4.0, 3.0]], [[-2.0, 0.0], [-1.0, 2.0]], [[-6.0, -1.0], [-4.0, -4.0]], [[2.0, 1.0], [-5.0, 6.0]], [[0.0, -4.0], [-6.0, 
+4.0]], [[-6.0, -4.0], [4.0, -3.0]]], [[[-3.0, 7.0], [3.0, -2.0]], [[7.0, -3.0], [0.0, 6.0]], [[-6.0, 4.0], [4.0, -5.0]], 
+[[-6.0, 0.0], [-5.0, 2.0]], [[-3.0, -5.0], [-3.0, -7.0]], [[-1.0, 7.0], [7.0, 7.0]]]])
+      arg1=numpy.array([-1.0, 2.0, -3.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[4.0, 6.0], [-18.0, -8.0]], [[9.0, 2.0], [6.0, 2.0]], [[11.0, -2.0], [-23.0, -15.0]], [[-23.0, 
+30.0], [-7.0, 3.0]], [[17.0, -2.0], [14.0, -9.0]], [[28.0, -9.0], [18.0, 19.0]]])+(1.-msk_ref)*numpy.array([[[7.0, -8.0], [1.0, 
+8.0]], [[-25.0, 10.0], [4.0, -19.0]], [[6.0, -12.0], [-16.0, 7.0]], [[25.0, -2.0], [12.0, 7.0]], [[16.0, 0.0], [-2.0, 29.0]], 
+[[-9.0, -29.0], [-16.0, -27.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, 2.0], [6.0, -3.0]], [[3.0, 6.0], [-3.0, 7.0]], [[0.0, -4.0], [1.0, -1.0]], [[-2.0, 
+-1.0], [1.0, 6.0]], [[-2.0, -1.0], [-4.0, -7.0]], [[3.0, 2.0], [3.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 7.0], [1.0, 
+2.0]], [[0.0, 6.0], [-5.0, -5.0]], [[-3.0, -2.0], [-6.0, 2.0]], [[-4.0, -2.0], [7.0, 0.0]], [[-4.0, -3.0], [3.0, -3.0]], [[3.0, 
+-6.0], [5.0, -6.0]]])
+      arg1=numpy.array([-3.0, -7.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[3.0, 7.0], [-6.0, -14.0]], [[-18.0, -42.0], [9.0, 21.0]]], [[[-9.0, -21.0], [-18.0, -42.0]], 
+[[9.0, 21.0], [-21.0, -49.0]]], [[[0.0, 0.0], [12.0, 28.0]], [[-3.0, -7.0], [3.0, 7.0]]], [[[6.0, 14.0], [3.0, 7.0]], [[-3.0, 
+-7.0], [-18.0, -42.0]]], [[[6.0, 14.0], [3.0, 7.0]], [[12.0, 28.0], [21.0, 49.0]]], [[[-9.0, -21.0], [-6.0, -14.0]], [[-9.0, 
+-21.0], [12.0, 28.0]]]])+(1.-msk_ref)*numpy.array([[[[-9.0, -21.0], [-21.0, -49.0]], [[-3.0, -7.0], [-6.0, -14.0]]], [[[0.0, 
+0.0], [-18.0, -42.0]], [[15.0, 35.0], [15.0, 35.0]]], [[[9.0, 21.0], [6.0, 14.0]], [[18.0, 42.0], [-6.0, -14.0]]], [[[12.0, 
+28.0], [6.0, 14.0]], [[-21.0, -49.0], [0.0, 0.0]]], [[[12.0, 28.0], [9.0, 21.0]], [[-9.0, -21.0], [9.0, 21.0]]], [[[-9.0, 
+-21.0], [18.0, 42.0]], [[-15.0, -35.0], [18.0, 42.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 0.0], [-4.0, -7.0]], [[-1.0, 5.0], [1.0, -7.0]], [[-2.0, 5.0], [-5.0, 2.0]], [[7.0, 
+-2.0], [-2.0, 4.0]], [[2.0, -7.0], [3.0, 4.0]], [[1.0, 2.0], [0.0, 7.0]]], [[[3.0, 0.0], [5.0, -7.0]], [[1.0, 6.0], [0.0, 
+-6.0]], [[-4.0, -4.0], [1.0, 5.0]], [[-5.0, -1.0], [1.0, 2.0]], [[4.0, 6.0], [-6.0, 0.0]], [[6.0, -6.0], [-4.0, -4.0]]], 
+[[[-4.0, 6.0], [-1.0, -7.0]], [[-2.0, -3.0], [2.0, -3.0]], [[-1.0, -6.0], [-2.0, 0.0]], [[0.0, 0.0], [5.0, 1.0]], [[-6.0, 
+-4.0], [3.0, -3.0]], [[7.0, 6.0], [-2.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -7.0], [4.0, -7.0]], [[-7.0, -6.0], 
+[-7.0, 4.0]], [[-4.0, -5.0], [6.0, -5.0]], [[1.0, -6.0], [1.0, -2.0]], [[6.0, -7.0], [0.0, -5.0]], [[4.0, -2.0], [-4.0, 
+-4.0]]], [[[-4.0, 1.0], [1.0, -2.0]], [[1.0, -7.0], [-2.0, -1.0]], [[-5.0, -7.0], [-5.0, 3.0]], [[1.0, -4.0], [-5.0, 6.0]], 
+[[-2.0, 7.0], [-1.0, -1.0]], [[5.0, -5.0], [-6.0, -5.0]]], [[[6.0, 0.0], [6.0, 0.0]], [[3.0, -5.0], [6.0, -5.0]], [[-2.0, 
+-7.0], [4.0, 0.0]], [[-7.0, 2.0], [-6.0, 5.0]], [[1.0, -4.0], [-1.0, 1.0]], [[1.0, 0.0], [-4.0, 0.0]]]])
+      arg1=numpy.array([[6.0, 4.0], [-1.0, -3.0], [5.0, -2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-23.0, -1.0], [30.0, -12.0]], [[-34.0, -29.0], [-70.0, 7.0]]], [[[-17.0, -3.0], [9.0, 8.0]], 
+[[16.0, 0.0], [-51.0, -4.0]]], [[[-13.0, 6.0], [4.0, 44.0]], [[-41.0, -19.0], [7.0, -7.0]]], [[[47.0, 43.0], [-11.0, -5.0]], 
+[[12.0, -21.0], [27.0, 8.0]]], [[[-22.0, 8.0], [-68.0, -38.0]], [[39.0, 24.0], [9.0, 22.0]]], [[[35.0, -28.0], [48.0, 14.0]], 
+[[-6.0, 16.0], [26.0, 48.0]]]])+(1.-msk_ref)*numpy.array([[[[34.0, 0.0], [-43.0, -31.0]], [[53.0, 1.0], [-40.0, -22.0]]], 
+[[[-28.0, -37.0], [-54.0, 7.0]], [[-10.0, -34.0], [0.0, 29.0]]], [[[-29.0, 3.0], [-58.0, 15.0]], [[61.0, 31.0], [-33.0, 
+-29.0]]], [[[-30.0, 15.0], [-22.0, -16.0]], [[-19.0, 31.0], [7.0, -36.0]]], [[[43.0, 28.0], [-69.0, -41.0]], [[-4.0, 5.0], 
+[-24.0, -19.0]]], [[[24.0, -1.0], [-7.0, 7.0]], [[-38.0, 10.0], [-19.0, -1.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-4.0, -5.0], [0.0, -5.0]], [[-2.0, 0.0], [2.0, 0.0]], [[-5.0, 0.0], [4.0, -4.0]], [[-5.0, 
+6.0], [6.0, -6.0]], [[-1.0, 5.0], [4.0, 0.0]], [[6.0, -1.0], [-5.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 4.0], [4.0, 
+6.0]], [[4.0, -6.0], [-6.0, -3.0]], [[3.0, 3.0], [-7.0, -4.0]], [[4.0, -1.0], [-4.0, -6.0]], [[-5.0, -1.0], [2.0, -3.0]], 
+[[-3.0, 7.0], [-2.0, -4.0]]])
+      arg1=Data(1.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-4.0, -5.0], [0.0, -5.0]], [[-2.0, 0.0], [2.0, 0.0]], [[-5.0, 0.0], [4.0, -4.0]], [[-5.0, 
+6.0], [6.0, -6.0]], [[-1.0, 5.0], [4.0, 0.0]], [[6.0, -1.0], [-5.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[3.0, 4.0], [4.0, 
+6.0]], [[4.0, -6.0], [-6.0, -3.0]], [[3.0, 3.0], [-7.0, -4.0]], [[4.0, -1.0], [-4.0, -6.0]], [[-5.0, -1.0], [2.0, -3.0]], 
+[[-3.0, 7.0], [-2.0, -4.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-3.0, 0.0], [-4.0, 0.0]], [[-1.0, 0.0], [0.0, -5.0]], [[-6.0, -7.0], [-1.0, 0.0]], [[0.0, 
+-4.0], [0.0, 4.0]], [[-5.0, 5.0], [7.0, -3.0]], [[-6.0, -6.0], [6.0, 3.0]]], [[[-7.0, -1.0], [0.0, 7.0]], [[2.0, 4.0], [6.0, 
+4.0]], [[-2.0, 0.0], [-3.0, 0.0]], [[5.0, -5.0], [-1.0, -5.0]], [[-5.0, 6.0], [0.0, 0.0]], [[0.0, -4.0], [6.0, -3.0]]], 
+[[[-5.0, -6.0], [4.0, -7.0]], [[-4.0, -6.0], [0.0, -6.0]], [[-3.0, -1.0], [7.0, -6.0]], [[1.0, -5.0], [-4.0, -7.0]], [[0.0, 
+-3.0], [-3.0, -2.0]], [[4.0, -6.0], [-4.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 5.0], [0.0, 3.0]], [[6.0, 0.0], [-3.0, 
+0.0]], [[-3.0, -7.0], [-1.0, -5.0]], [[-3.0, -6.0], [5.0, -7.0]], [[1.0, 0.0], [-1.0, -7.0]], [[1.0, 6.0], [2.0, 3.0]]], 
+[[[-5.0, -1.0], [1.0, 7.0]], [[6.0, 2.0], [1.0, -2.0]], [[-3.0, -2.0], [-4.0, -1.0]], [[-4.0, -3.0], [6.0, 1.0]], [[-4.0, 
+-1.0], [3.0, -6.0]], [[2.0, 7.0], [-6.0, -5.0]]], [[[-4.0, -5.0], [6.0, 5.0]], [[-1.0, -6.0], [7.0, -3.0]], [[-3.0, -7.0], 
+[-4.0, 6.0]], [[5.0, 4.0], [7.0, -5.0]], [[-3.0, -1.0], [-6.0, 4.0]], [[4.0, 0.0], [-6.0, 4.0]]]])
+      arg1=Data(numpy.array([2.0, 6.0, 2.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-58.0, -18.0], [0.0, 28.0]], [[2.0, 12.0], [36.0, 2.0]], [[-30.0, -16.0], [-6.0, -12.0]], 
+[[32.0, -48.0], [-14.0, -36.0]], [[-40.0, 40.0], [8.0, -10.0]], [[-4.0, -48.0], [40.0, 
+-12.0]]])+(1.-msk_ref)*numpy.array([[[-46.0, -6.0], [18.0, 58.0]], [[46.0, 0.0], [14.0, -18.0]], [[-30.0, -40.0], [-34.0, 
+-4.0]], [[-20.0, -22.0], [60.0, -18.0]], [[-28.0, -8.0], [4.0, -42.0]], [[22.0, 54.0], [-44.0, -16.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-6.0, 3.0], [-3.0, -3.0]], [[1.0, 6.0], [0.0, -4.0]], [[7.0, 4.0], [2.0, 6.0]], [[4.0, 2.0], 
+[-1.0, -4.0]], [[-4.0, 0.0], [4.0, -2.0]], [[4.0, -5.0], [6.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[5.0, -2.0], [-4.0, 5.0]], 
+[[7.0, -2.0], [3.0, 1.0]], [[-4.0, 0.0], [0.0, -1.0]], [[6.0, 5.0], [2.0, 1.0]], [[-2.0, 5.0], [-2.0, -5.0]], [[0.0, 5.0], 
+[1.0, -1.0]]])
+      arg1=Data(numpy.array([6.0, -1.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-36.0, 6.0], [18.0, -3.0]], [[-18.0, 3.0], [-18.0, 3.0]]], [[[6.0, -1.0], [36.0, -6.0]], 
+[[0.0, 0.0], [-24.0, 4.0]]], [[[42.0, -7.0], [24.0, -4.0]], [[12.0, -2.0], [36.0, -6.0]]], [[[24.0, -4.0], [12.0, -2.0]], 
+[[-6.0, 1.0], [-24.0, 4.0]]], [[[-24.0, 4.0], [0.0, 0.0]], [[24.0, -4.0], [-12.0, 2.0]]], [[[24.0, -4.0], [-30.0, 5.0]], 
+[[36.0, -6.0], [18.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[30.0, -5.0], [-12.0, 2.0]], [[-24.0, 4.0], [30.0, -5.0]]], 
+[[[42.0, -7.0], [-12.0, 2.0]], [[18.0, -3.0], [6.0, -1.0]]], [[[-24.0, 4.0], [0.0, 0.0]], [[0.0, 0.0], [-6.0, 1.0]]], [[[36.0, 
+-6.0], [30.0, -5.0]], [[12.0, -2.0], [6.0, -1.0]]], [[[-12.0, 2.0], [30.0, -5.0]], [[-12.0, 2.0], [-30.0, 5.0]]], [[[0.0, 0.0], 
+[30.0, -5.0]], [[6.0, -1.0], [-6.0, 1.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -2.0], [4.0, -5.0]], [[-3.0, -2.0], [0.0, 0.0]], [[5.0, -2.0], [0.0, 2.0]], [[5.0, 
+2.0], [0.0, -4.0]], [[6.0, -1.0], [1.0, 7.0]], [[-5.0, -4.0], [7.0, 0.0]]], [[[6.0, -2.0], [2.0, -3.0]], [[6.0, -4.0], [-3.0, 
+-3.0]], [[-1.0, 7.0], [2.0, 4.0]], [[6.0, -4.0], [-4.0, 6.0]], [[-4.0, -5.0], [-6.0, 1.0]], [[-2.0, -5.0], [4.0, 6.0]]], 
+[[[0.0, 5.0], [4.0, -3.0]], [[7.0, -4.0], [1.0, 4.0]], [[0.0, 2.0], [-7.0, -4.0]], [[7.0, 1.0], [3.0, -4.0]], [[-5.0, 5.0], 
+[4.0, 0.0]], [[4.0, 7.0], [-6.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, -4.0], [-1.0, 0.0]], [[4.0, -5.0], [7.0, 0.0]], 
+[[-1.0, 3.0], [-1.0, -2.0]], [[4.0, -2.0], [3.0, 5.0]], [[7.0, -2.0], [7.0, 0.0]], [[-7.0, -7.0], [7.0, 4.0]]], [[[-5.0, 4.0], 
+[0.0, 5.0]], [[0.0, 0.0], [-7.0, -7.0]], [[-4.0, -6.0], [0.0, 3.0]], [[-5.0, 6.0], [-6.0, 4.0]], [[5.0, 3.0], [-2.0, 2.0]], 
+[[-1.0, 2.0], [0.0, -2.0]]], [[[1.0, -3.0], [0.0, 0.0]], [[1.0, -3.0], [6.0, 4.0]], [[-5.0, 6.0], [5.0, 4.0]], [[6.0, 0.0], 
+[-7.0, -3.0]], [[-1.0, -3.0], [-2.0, -5.0]], [[-5.0, -1.0], [-2.0, -4.0]]]])
+      arg1=Data(numpy.array([[-3.0, 5.0], [6.0, -5.0], [7.0, -1.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[18.0, 0.0], [29.0, -5.0]], [[28.0, 6.0], [-24.0, -7.0]]], [[[94.0, -52.0], [-46.0, 14.0]], 
+[[-11.0, 14.0], [10.0, 11.0]]], [[[-21.0, 30.0], [62.0, -47.0]], [[-37.0, -3.0], [-10.0, -6.0]]], [[[70.0, -12.0], [-23.0, 
+29.0]], [[-3.0, 17.0], [20.0, -46.0]]], [[[-77.0, 55.0], [8.0, 15.0]], [[-11.0, 31.0], [-15.0, 30.0]]], [[[31.0, -19.0], [31.0, 
+-2.0]], [[-39.0, 21.0], [71.0, -35.0]]]])+(1.-msk_ref)*numpy.array([[[[-44.0, 59.0], [15.0, -37.0]], [[3.0, -5.0], [30.0, 
+-25.0]]], [[[-5.0, 19.0], [-6.0, -22.0]], [[-21.0, 64.0], [-14.0, 31.0]]], [[[-56.0, 20.0], [-3.0, 39.0]], [[38.0, -10.0], 
+[52.0, -29.0]]], [[[0.0, 39.0], [42.0, -40.0]], [[-94.0, 52.0], [-12.0, 8.0]]], [[[2.0, 11.0], [3.0, -22.0]], [[-47.0, 47.0], 
+[-23.0, -5.0]]], [[[-20.0, -25.0], [26.0, -44.0]], [[-35.0, 37.0], [-52.0, 34.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[6.0, -6.0], [2.0, -7.0]], [[4.0, 4.0], [7.0, -7.0]], [[-3.0, 7.0], [6.0, -1.0]], [[5.0, 
+-7.0], [7.0, -7.0]], [[5.0, -7.0], [-3.0, -6.0]], [[4.0, -5.0], [-6.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[5.0, -6.0], [0.0, 
+-2.0]], [[0.0, -1.0], [3.0, -3.0]], [[3.0, -4.0], [4.0, 7.0]], [[0.0, 0.0], [7.0, 4.0]], [[-7.0, 4.0], [3.0, 0.0]], [[1.0, 
+-4.0], [-2.0, 7.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(5.0)+(1-msk_arg1)*(1.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[30.0, -30.0], [10.0, -35.0]], [[20.0, 20.0], [35.0, -35.0]], [[-15.0, 35.0], [30.0, -5.0]], 
+[[25.0, -35.0], [35.0, -35.0]], [[25.0, -35.0], [-15.0, -30.0]], [[20.0, -25.0], [-30.0, 
+-15.0]]])+(1.-msk_ref)*numpy.array([[[5.0, -6.0], [0.0, -2.0]], [[0.0, -1.0], [3.0, -3.0]], [[3.0, -4.0], [4.0, 7.0]], [[0.0, 
+0.0], [7.0, 4.0]], [[-7.0, 4.0], [3.0, 0.0]], [[1.0, -4.0], [-2.0, 7.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-2.0, -6.0], [7.0, 0.0]], [[-1.0, 3.0], [2.0, 3.0]], [[-1.0, -1.0], [4.0, -1.0]], [[-7.0, 
+-3.0], [4.0, 3.0]], [[2.0, -6.0], [7.0, 0.0]], [[-3.0, 3.0], [-2.0, -3.0]]], [[[-3.0, 3.0], [4.0, 4.0]], [[2.0, 0.0], [-7.0, 
+-2.0]], [[-1.0, -2.0], [-2.0, -6.0]], [[-1.0, 1.0], [-4.0, 3.0]], [[-3.0, 0.0], [-5.0, 0.0]], [[-6.0, -1.0], [7.0, 7.0]]], 
+[[[-7.0, 1.0], [-7.0, 2.0]], [[1.0, 4.0], [-5.0, 0.0]], [[5.0, -7.0], [-2.0, -3.0]], [[-7.0, -1.0], [3.0, -6.0]], [[-1.0, 0.0], 
+[4.0, -5.0]], [[-1.0, 5.0], [-5.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 0.0], [6.0, -6.0]], [[-6.0, -7.0], [6.0, 
+-1.0]], [[-1.0, -6.0], [0.0, -3.0]], [[-7.0, -1.0], [-7.0, -5.0]], [[4.0, -3.0], [4.0, -6.0]], [[-1.0, -1.0], [2.0, 0.0]]], 
+[[[-6.0, -3.0], [-1.0, 3.0]], [[-1.0, 1.0], [6.0, 4.0]], [[5.0, -5.0], [-4.0, 6.0]], [[-6.0, 5.0], [1.0, -7.0]], [[7.0, 0.0], 
+[2.0, -6.0]], [[1.0, -6.0], [0.0, -4.0]]], [[[2.0, -1.0], [-7.0, -1.0]], [[-4.0, 2.0], [7.0, -5.0]], [[-7.0, 2.0], [-2.0, 
+-4.0]], [[6.0, -7.0], [-3.0, -5.0]], [[-3.0, -1.0], [-1.0, -6.0]], [[6.0, 4.0], [6.0, -7.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-4.0, 3.0, -6.0])+(1.-msk_arg1)*numpy.array([-2.0, 5.0, 6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[41.0, 27.0], [26.0, 0.0]], [[4.0, -36.0], [1.0, -18.0]], [[-29.0, 40.0], [-10.0, 4.0]], 
+[[67.0, 21.0], [-46.0, 33.0]], [[-11.0, 24.0], [-67.0, 30.0]], [[0.0, -45.0], [59.0, 
+63.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -21.0], [-59.0, 21.0]], [[-17.0, 31.0], [60.0, -8.0]], [[-15.0, -1.0], [-32.0, 
+12.0]], [[20.0, -15.0], [1.0, -55.0]], [[9.0, 0.0], [-4.0, -54.0]], [[43.0, -4.0], [32.0, -62.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-4.0, -2.0], [0.0, 0.0]], [[1.0, 0.0], [6.0, 4.0]], [[-1.0, 2.0], [0.0, -3.0]], [[-1.0, 
+6.0], [6.0, 0.0]], [[0.0, -5.0], [-6.0, -5.0]], [[1.0, 0.0], [0.0, -6.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, -2.0], [-4.0, 
+6.0]], [[-5.0, -5.0], [1.0, 5.0]], [[7.0, 5.0], [2.0, 3.0]], [[-4.0, 0.0], [-6.0, 3.0]], [[2.0, -2.0], [-4.0, -7.0]], [[3.0, 
+0.0], [-2.0, 0.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, 1.0])+(1.-msk_arg1)*numpy.array([3.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-16.0, -4.0], [-8.0, -2.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[4.0, 1.0], [0.0, 0.0]], [[24.0, 
+6.0], [16.0, 4.0]]], [[[-4.0, -1.0], [8.0, 2.0]], [[0.0, 0.0], [-12.0, -3.0]]], [[[-4.0, -1.0], [24.0, 6.0]], [[24.0, 6.0], 
+[0.0, 0.0]]], [[[0.0, 0.0], [-20.0, -5.0]], [[-24.0, -6.0], [-20.0, -5.0]]], [[[4.0, 1.0], [0.0, 0.0]], [[0.0, 0.0], [-24.0, 
+-6.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 0.0], [-6.0, 0.0]], [[-12.0, 0.0], [18.0, 0.0]]], [[[-15.0, 0.0], [-15.0, 0.0]], 
+[[3.0, 0.0], [15.0, 0.0]]], [[[21.0, 0.0], [15.0, 0.0]], [[6.0, 0.0], [9.0, 0.0]]], [[[-12.0, 0.0], [0.0, 0.0]], [[-18.0, 0.0], 
+[9.0, 0.0]]], [[[6.0, 0.0], [-6.0, 0.0]], [[-12.0, 0.0], [-21.0, 0.0]]], [[[9.0, 0.0], [0.0, 0.0]], [[-6.0, 0.0], [0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-5.0, -3.0], [6.0, 1.0]], [[6.0, 5.0], [1.0, 0.0]], [[6.0, 6.0], [1.0, -2.0]], [[7.0, 6.0], 
+[-4.0, 2.0]], [[7.0, 5.0], [7.0, -1.0]], [[1.0, 4.0], [3.0, -3.0]]], [[[6.0, -7.0], [-6.0, -5.0]], [[0.0, 7.0], [-4.0, 1.0]], 
+[[-4.0, 5.0], [-6.0, -4.0]], [[-3.0, 5.0], [0.0, 7.0]], [[1.0, -5.0], [4.0, -2.0]], [[-3.0, 7.0], [3.0, 4.0]]], [[[-4.0, -7.0], 
+[6.0, -2.0]], [[7.0, 4.0], [-4.0, -1.0]], [[-3.0, 1.0], [4.0, 3.0]], [[5.0, 0.0], [-5.0, 3.0]], [[7.0, 1.0], [-4.0, 7.0]], 
+[[0.0, -5.0], [3.0, 1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 4.0], [-1.0, 3.0]], [[6.0, -3.0], [-6.0, -5.0]], [[-6.0, 1.0], 
+[7.0, -5.0]], [[2.0, 1.0], [-3.0, 7.0]], [[-7.0, -3.0], [3.0, 2.0]], [[7.0, 6.0], [-7.0, 4.0]]], [[[-2.0, -7.0], [4.0, 3.0]], 
+[[2.0, 0.0], [0.0, 7.0]], [[0.0, -6.0], [2.0, -3.0]], [[0.0, 7.0], [-5.0, -3.0]], [[-3.0, 6.0], [0.0, -4.0]], [[-5.0, -3.0], 
+[0.0, 0.0]]], [[[0.0, 4.0], [0.0, 7.0]], [[-5.0, -6.0], [-3.0, 0.0]], [[-2.0, 6.0], [-1.0, -6.0]], [[2.0, -6.0], [-7.0, -7.0]], 
+[[-7.0, 5.0], [-6.0, 0.0]], [[5.0, -6.0], [0.0, 0.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, 2.0], [7.0, -7.0], [1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 6.0], [1.0, -3.0], 
+[2.0, 7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[63.0, -52.0], [-41.0, 43.0]], [[-66.0, 54.0], [-42.0, 37.0]]], [[[-23.0, 12.0], [28.0, 
+-39.0]], [[-37.0, 30.0], [6.0, -7.0]]], [[[-61.0, 40.0], [6.0, -23.0]], [[-43.0, 44.0], [-15.0, 24.0]]], [[[-51.0, 35.0], [5.0, 
+-23.0]], [[15.0, -8.0], [42.0, -45.0]]], [[[-21.0, 7.0], [-59.0, 45.0]], [[-11.0, -14.0], [-2.0, 12.0]]], [[[-26.0, 23.0], 
+[24.0, -41.0]], [[9.0, -15.0], [44.0, -34.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, -18.0], [-11.0, 73.0]], [[7.0, -18.0], 
+[8.0, 58.0]]], [[[-26.0, -5.0], [-3.0, -60.0]], [[12.0, -57.0], [22.0, -51.0]]], [[[14.0, -50.0], [3.0, 66.0]], [[-21.0, 29.0], 
+[0.0, -63.0]]], [[[-2.0, 26.0], [-8.0, -57.0]], [[-10.0, -52.0], [-38.0, 2.0]]], [[[4.0, -82.0], [25.0, -1.0]], [[-21.0, 
+-24.0], [-10.0, 24.0]]], [[[-16.0, 92.0], [-33.0, 3.0]], [[21.0, -42.0], [-12.0, 24.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, 3.0, -2.0, -4.0], [-5.0, -6.0, 1.0, -5.0], [-2.0, 7.0, 4.0, 1.0]], [[0.0, 0.0, 4.0, 
+0.0], [1.0, -1.0, -3.0, 7.0], [5.0, -4.0, 6.0, -5.0]]], [[[-5.0, 0.0, 2.0, -5.0], [-5.0, -4.0, -2.0, 6.0], [-5.0, 3.0, -4.0, 
+-2.0]], [[3.0, 0.0, 1.0, 2.0], [5.0, 3.0, 2.0, -2.0], [-1.0, -4.0, -3.0, -6.0]]], [[[1.0, 6.0, 5.0, 7.0], [-1.0, -1.0, 0.0, 
+6.0], [-3.0, 0.0, 0.0, -1.0]], [[-4.0, 5.0, 2.0, 7.0], [1.0, -6.0, 5.0, 3.0], [-3.0, 7.0, 6.0, 
+-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -2.0, -5.0, 5.0], [0.0, 3.0, 2.0, 2.0], [-6.0, 1.0, -3.0, 6.0]], [[-4.0, 3.0, 3.0, 
+-4.0], [5.0, -4.0, 0.0, 0.0], [-5.0, -2.0, -5.0, -2.0]]], [[[-3.0, 0.0, -1.0, -5.0], [4.0, -6.0, -3.0, 3.0], [1.0, -7.0, 4.0, 
+0.0]], [[6.0, 0.0, -7.0, 0.0], [-7.0, 7.0, 0.0, 6.0], [2.0, 4.0, 0.0, 1.0]]], [[[0.0, 6.0, -6.0, 6.0], [6.0, 4.0, 5.0, -7.0], 
+[0.0, 0.0, 0.0, 4.0]], [[-1.0, 4.0, -2.0, -1.0], [1.0, -1.0, 0.0, -1.0], [0.0, -3.0, -4.0, -7.0]]]])
+      arg1=4.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[24.0, 12.0, -8.0, -16.0], [-20.0, -24.0, 4.0, -20.0], [-8.0, 28.0, 16.0, 4.0]], [[0.0, 0.0, 
+16.0, 0.0], [4.0, -4.0, -12.0, 28.0], [20.0, -16.0, 24.0, -20.0]]], [[[-20.0, 0.0, 8.0, -20.0], [-20.0, -16.0, -8.0, 24.0], 
+[-20.0, 12.0, -16.0, -8.0]], [[12.0, 0.0, 4.0, 8.0], [20.0, 12.0, 8.0, -8.0], [-4.0, -16.0, -12.0, -24.0]]], [[[4.0, 24.0, 
+20.0, 28.0], [-4.0, -4.0, 0.0, 24.0], [-12.0, 0.0, 0.0, -4.0]], [[-16.0, 20.0, 8.0, 28.0], [4.0, -24.0, 20.0, 12.0], [-12.0, 
+28.0, 24.0, -20.0]]]])+(1.-msk_ref)*numpy.array([[[[8.0, -8.0, -20.0, 20.0], [0.0, 12.0, 8.0, 8.0], [-24.0, 4.0, -12.0, 24.0]], 
+[[-16.0, 12.0, 12.0, -16.0], [20.0, -16.0, 0.0, 0.0], [-20.0, -8.0, -20.0, -8.0]]], [[[-12.0, 0.0, -4.0, -20.0], [16.0, -24.0, 
+-12.0, 12.0], [4.0, -28.0, 16.0, 0.0]], [[24.0, 0.0, -28.0, 0.0], [-28.0, 28.0, 0.0, 24.0], [8.0, 16.0, 0.0, 4.0]]], [[[0.0, 
+24.0, -24.0, 24.0], [24.0, 16.0, 20.0, -28.0], [0.0, 0.0, 0.0, 16.0]], [[-4.0, 16.0, -8.0, -4.0], [4.0, -4.0, 0.0, -4.0], [0.0, 
+-12.0, -16.0, -28.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[3.0, -6.0, 6.0, 0.0], [1.0, 1.0, -6.0, -7.0], [6.0, -3.0, 4.0, -7.0]], [[-2.0, 0.0, 2.0, 
+-5.0], [4.0, -5.0, 5.0, -3.0], [-7.0, -6.0, 4.0, -7.0]]], [[[1.0, -5.0, 6.0, -2.0], [-1.0, -1.0, -5.0, -3.0], [0.0, -4.0, -1.0, 
+-3.0]], [[0.0, 2.0, 5.0, 1.0], [-3.0, 6.0, 7.0, 3.0], [3.0, 4.0, 6.0, -6.0]]], [[[6.0, -2.0, -1.0, -3.0], [0.0, -2.0, 4.0, 
+0.0], [0.0, -5.0, 4.0, -4.0]], [[-2.0, 2.0, 5.0, -6.0], [-5.0, 7.0, 4.0, 0.0], [6.0, 5.0, 7.0, 
+-1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 0.0, -7.0, -2.0], [5.0, 1.0, 1.0, -4.0], [0.0, -4.0, -6.0, -4.0]], [[1.0, 4.0, 
+-3.0, 0.0], [-7.0, -7.0, 4.0, -5.0], [-6.0, 7.0, 7.0, 2.0]]], [[[3.0, 2.0, -7.0, -2.0], [-4.0, -3.0, 0.0, 4.0], [1.0, -6.0, 
+-2.0, 6.0]], [[1.0, 1.0, 3.0, 0.0], [0.0, 4.0, 4.0, 7.0], [7.0, 1.0, 4.0, 0.0]]], [[[6.0, -5.0, -6.0, 1.0], [2.0, 0.0, -1.0, 
+-5.0], [-1.0, -1.0, 0.0, 0.0]], [[5.0, 1.0, 6.0, 0.0], [-7.0, 7.0, -2.0, 0.0], [7.0, 7.0, -7.0, 1.0]]]])
+      arg1=numpy.array(7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[21.0, -42.0, 42.0, 0.0], [7.0, 7.0, -42.0, -49.0], [42.0, -21.0, 28.0, -49.0]], [[-14.0, 0.0, 
+14.0, -35.0], [28.0, -35.0, 35.0, -21.0], [-49.0, -42.0, 28.0, -49.0]]], [[[7.0, -35.0, 42.0, -14.0], [-7.0, -7.0, -35.0, 
+-21.0], [0.0, -28.0, -7.0, -21.0]], [[0.0, 14.0, 35.0, 7.0], [-21.0, 42.0, 49.0, 21.0], [21.0, 28.0, 42.0, -42.0]]], [[[42.0, 
+-14.0, -7.0, -21.0], [0.0, -14.0, 28.0, 0.0], [0.0, -35.0, 28.0, -28.0]], [[-14.0, 14.0, 35.0, -42.0], [-35.0, 49.0, 28.0, 
+0.0], [42.0, 35.0, 49.0, -7.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, 0.0, -49.0, -14.0], [35.0, 7.0, 7.0, -28.0], [0.0, 
+-28.0, -42.0, -28.0]], [[7.0, 28.0, -21.0, 0.0], [-49.0, -49.0, 28.0, -35.0], [-42.0, 49.0, 49.0, 14.0]]], [[[21.0, 14.0, 
+-49.0, -14.0], [-28.0, -21.0, 0.0, 28.0], [7.0, -42.0, -14.0, 42.0]], [[7.0, 7.0, 21.0, 0.0], [0.0, 28.0, 28.0, 49.0], [49.0, 
+7.0, 28.0, 0.0]]], [[[42.0, -35.0, -42.0, 7.0], [14.0, 0.0, -7.0, -35.0], [-7.0, -7.0, 0.0, 0.0]], [[35.0, 7.0, 42.0, 0.0], 
+[-49.0, 49.0, -14.0, 0.0], [49.0, 49.0, -49.0, 7.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 0.0, 1.0, 0.0], [2.0, -5.0, 4.0, 7.0], [7.0, 2.0, 1.0, 0.0]], [[-3.0, 6.0, 0.0, 7.0], 
+[0.0, 1.0, 0.0, 4.0], [1.0, 7.0, -2.0, 7.0]]], [[[0.0, -5.0, -3.0, 7.0], [-4.0, 6.0, -4.0, 0.0], [1.0, 7.0, -6.0, 0.0]], [[7.0, 
+2.0, -3.0, 1.0], [7.0, 2.0, -4.0, -1.0], [0.0, 1.0, -6.0, -3.0]]], [[[1.0, 1.0, 4.0, -3.0], [-4.0, 0.0, -3.0, -3.0], [-5.0, 
+3.0, 6.0, 0.0]], [[7.0, -4.0, 3.0, -2.0], [-4.0, -5.0, -3.0, 4.0], [-4.0, -7.0, -4.0, 
+-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -2.0, 0.0, -2.0], [-4.0, -6.0, -1.0, -7.0], [3.0, 2.0, 7.0, 1.0]], [[2.0, -6.0, 
+-1.0, 7.0], [0.0, 2.0, -1.0, 4.0], [-2.0, -7.0, -7.0, 6.0]]], [[[-6.0, -1.0, -4.0, 7.0], [1.0, 7.0, -5.0, -2.0], [3.0, 7.0, 
+3.0, 2.0]], [[-4.0, 7.0, 6.0, 1.0], [3.0, -4.0, 6.0, -4.0], [5.0, -3.0, -1.0, -2.0]]], [[[2.0, 6.0, 7.0, 3.0], [4.0, -1.0, 
+-1.0, 1.0], [4.0, 0.0, 7.0, -2.0]], [[0.0, 0.0, 4.0, -7.0], [1.0, 7.0, 6.0, 6.0], [5.0, 6.0, 1.0, -6.0]]]])
+      arg1=Data(-2.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-0.0, -0.0, -2.0, -0.0], [-4.0, 10.0, -8.0, -14.0], [-14.0, -4.0, -2.0, -0.0]], [[6.0, -12.0, 
+-0.0, -14.0], [-0.0, -2.0, -0.0, -8.0], [-2.0, -14.0, 4.0, -14.0]]], [[[-0.0, 10.0, 6.0, -14.0], [8.0, -12.0, 8.0, -0.0], 
+[-2.0, -14.0, 12.0, -0.0]], [[-14.0, -4.0, 6.0, -2.0], [-14.0, -4.0, 8.0, 2.0], [-0.0, -2.0, 12.0, 6.0]]], [[[-2.0, -2.0, -8.0, 
+6.0], [8.0, -0.0, 6.0, 6.0], [10.0, -6.0, -12.0, -0.0]], [[-14.0, 8.0, -6.0, 4.0], [8.0, 10.0, 6.0, -8.0], [8.0, 14.0, 8.0, 
+10.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 4.0, -0.0, 4.0], [8.0, 12.0, 2.0, 14.0], [-6.0, -4.0, -14.0, -2.0]], [[-4.0, 
+12.0, 2.0, -14.0], [-0.0, -4.0, 2.0, -8.0], [4.0, 14.0, 14.0, -12.0]]], [[[12.0, 2.0, 8.0, -14.0], [-2.0, -14.0, 10.0, 4.0], 
+[-6.0, -14.0, -6.0, -4.0]], [[8.0, -14.0, -12.0, -2.0], [-6.0, 8.0, -12.0, 8.0], [-10.0, 6.0, 2.0, 4.0]]], [[[-4.0, -12.0, 
+-14.0, -6.0], [-8.0, 2.0, 2.0, -2.0], [-8.0, -0.0, -14.0, 4.0]], [[-0.0, -0.0, -8.0, 14.0], [-2.0, -14.0, -12.0, -12.0], 
+[-10.0, -12.0, -2.0, 12.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, -7.0, -1.0, -1.0], [5.0, 5.0, -4.0, 7.0], [6.0, 0.0, -1.0, 6.0]], [[-5.0, -2.0, -7.0, 
+-5.0], [6.0, 5.0, 1.0, -6.0], [-5.0, 0.0, -4.0, -4.0]]], [[[-2.0, -6.0, -7.0, 2.0], [-5.0, -3.0, 0.0, 4.0], [6.0, 5.0, 3.0, 
+6.0]], [[1.0, 0.0, 0.0, -2.0], [6.0, 6.0, -3.0, 7.0], [-3.0, 3.0, 4.0, -7.0]]], [[[3.0, 5.0, -1.0, -6.0], [-3.0, 6.0, 5.0, 
+-4.0], [-6.0, -6.0, -1.0, 5.0]], [[-1.0, 2.0, 0.0, -1.0], [2.0, 0.0, -6.0, -3.0], [-5.0, -7.0, -7.0, 
+-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -6.0, -5.0, -6.0], [-7.0, -7.0, 1.0, 5.0], [0.0, 6.0, 1.0, 6.0]], [[3.0, 6.0, 7.0, 
+6.0], [7.0, 0.0, -3.0, -5.0], [4.0, -3.0, 5.0, -4.0]]], [[[-7.0, 4.0, 0.0, 1.0], [-6.0, 1.0, 6.0, 4.0], [4.0, -1.0, -7.0, 
+5.0]], [[-5.0, -3.0, 0.0, 1.0], [4.0, 0.0, 0.0, 4.0], [-3.0, 2.0, 2.0, 0.0]]], [[[-1.0, 2.0, -3.0, 0.0], [-4.0, -4.0, 4.0, 
+-3.0], [0.0, 0.0, -7.0, 7.0]], [[-6.0, 3.0, 6.0, 0.0], [3.0, -4.0, 3.0, 1.0], [-1.0, -3.0, 0.0, -5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-0.0, 21.0, 3.0, 3.0], [-15.0, -15.0, 12.0, -21.0], [-18.0, -0.0, 3.0, -18.0]], [[15.0, 6.0, 
+21.0, 15.0], [-18.0, -15.0, -3.0, 18.0], [15.0, -0.0, 12.0, 12.0]]], [[[6.0, 18.0, 21.0, -6.0], [15.0, 9.0, -0.0, -12.0], 
+[-18.0, -15.0, -9.0, -18.0]], [[-3.0, -0.0, -0.0, 6.0], [-18.0, -18.0, 9.0, -21.0], [9.0, -9.0, -12.0, 21.0]]], [[[-9.0, -15.0, 
+3.0, 18.0], [9.0, -18.0, -15.0, 12.0], [18.0, 18.0, 3.0, -15.0]], [[3.0, -6.0, -0.0, 3.0], [-6.0, -0.0, 18.0, 9.0], [15.0, 
+21.0, 21.0, 9.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -42.0, -35.0, -42.0], [-49.0, -49.0, 7.0, 35.0], [0.0, 42.0, 7.0, 
+42.0]], [[21.0, 42.0, 49.0, 42.0], [49.0, 0.0, -21.0, -35.0], [28.0, -21.0, 35.0, -28.0]]], [[[-49.0, 28.0, 0.0, 7.0], [-42.0, 
+7.0, 42.0, 28.0], [28.0, -7.0, -49.0, 35.0]], [[-35.0, -21.0, 0.0, 7.0], [28.0, 0.0, 0.0, 28.0], [-21.0, 14.0, 14.0, 0.0]]], 
+[[[-7.0, 14.0, -21.0, 0.0], [-28.0, -28.0, 28.0, -21.0], [0.0, 0.0, -49.0, 49.0]], [[-42.0, 21.0, 42.0, 0.0], [21.0, -28.0, 
+21.0, 7.0], [-7.0, -21.0, 0.0, -35.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")    
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
+ 
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_array_rank1(self):
+      arg0=numpy.array([[-5.0, -7.0, -5.0], [0.0, -6.0, 3.0]])
+      arg1=numpy.array([-3.0, 0.0, 2.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=numpy.array([5.0, 6.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=tensor_transposed_mult(arg0,arg1)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_array_rank2(self):
+      arg0=numpy.array([[1.0, -6.0, -3.0], [-5.0, 0.0, -1.0]])
+      arg1=numpy.array([[7.0, 3.0, -7.0], [-7.0, -6.0, 3.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=numpy.array([[10.0, 20.0], [-28.0, 32.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_constData_rank1(self):
+      arg0=numpy.array([[-7.0, 5.0, -6.0], [0.0, -6.0, -7.0]])
+      arg1=Data(numpy.array([-3.0, -6.0, -6.0]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([27.0, 78.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_constData_rank2(self):
+      arg0=numpy.array([[-4.0, 5.0, 7.0], [3.0, 1.0, -6.0]])
+      arg1=Data(numpy.array([[0.0, 1.0, -1.0], [7.0, 0.0, -3.0]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[-2.0, -49.0], [7.0, 39.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_expandedData_rank1(self):
+      arg0=numpy.array([[-5.0, -1.0, -6.0], [-5.0, -2.0, 2.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-5.0, 6.0, -1.0])+(1.-msk_arg1)*numpy.array([4.0, 2.0, -6.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([25.0, 11.0])+(1.-msk_ref)*numpy.array([14.0, -36.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=tensor_transposed_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_expandedData_rank2(self):
+      arg0=numpy.array([[0.0, 4.0, 6.0], [-4.0, -5.0, -5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, -7.0, 1.0], [3.0, 5.0, -6.0]])+(1.-msk_arg1)*numpy.array([[6.0, 7.0, -3.0], [7.0, 0.0, 
+-6.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-22.0, -16.0], [26.0, -7.0]])+(1.-msk_ref)*numpy.array([[10.0, -36.0], [-44.0, 2.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_array_rank2(self):
+      arg0=numpy.array([[[[-3.0, -3.0, -7.0], [2.0, 0.0, 6.0]], [[7.0, 2.0, -4.0], [7.0, 6.0, -1.0]], [[-3.0, 3.0, 6.0], [7.0, 
+1.0, 1.0]], [[-4.0, -6.0, 1.0], [-5.0, -7.0, -2.0]], [[3.0, 6.0, -3.0], [4.0, -2.0, 0.0]]], [[[-4.0, 4.0, 4.0], [-6.0, -4.0, 
+0.0]], [[-6.0, 6.0, -5.0], [-6.0, 7.0, -3.0]], [[-1.0, -2.0, 7.0], [6.0, 0.0, 0.0]], [[4.0, -3.0, 1.0], [-2.0, 0.0, 0.0]], 
+[[6.0, -3.0, -6.0], [2.0, 6.0, -6.0]]], [[[-3.0, 0.0, -7.0], [0.0, -7.0, -6.0]], [[-1.0, -7.0, -7.0], [5.0, 6.0, -1.0]], 
+[[-7.0, 0.0, 2.0], [-1.0, 4.0, -2.0]], [[2.0, -7.0, 2.0], [-7.0, -6.0, 6.0]], [[-7.0, -4.0, 6.0], [3.0, -6.0, 3.0]]], [[[-5.0, 
+-7.0, 0.0], [4.0, -4.0, 4.0]], [[0.0, 7.0, 7.0], [-6.0, -3.0, 0.0]], [[4.0, -4.0, -5.0], [4.0, -7.0, 2.0]], [[-5.0, 2.0, 4.0], 
+[-4.0, 2.0, -6.0]], [[0.0, 2.0, 7.0], [4.0, 0.0, -4.0]]]])
+      arg1=numpy.array([[ 1., -4.], [ 1.,  5.], [ 6.,  5.]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=numpy.array([[-26.0, -18.0, 18.0, -29.0, -35.0], [28.0, 14.0, 15.0, 15.0, -41.0], [-110.0, -45.0, 19.0, 35.0, -2.0], 
+[-28.0, 58.0, -71.0, 17.0, 8.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_array_rank3(self):
+      arg0=numpy.array([[[[3.0, 0.0, 7.0], [-3.0, -5.0, -3.0]], [[6.0, 5.0, 2.0], [2.0, 7.0, 2.0]], [[-6.0, 4.0, 1.0], [-5.0, 
+1.0, 6.0]], [[-5.0, -5.0, -3.0], [2.0, 1.0, 5.0]], [[1.0, 4.0, 0.0], [5.0, -1.0, 5.0]]], [[[-3.0, -5.0, -3.0], [-5.0, 3.0, 
+-2.0]], [[-7.0, -1.0, 6.0], [7.0, -1.0, 3.0]], [[-6.0, 5.0, 6.0], [-7.0, 6.0, -4.0]], [[-1.0, 0.0, 0.0], [0.0, 4.0, -2.0]], 
+[[-2.0, -1.0, 6.0], [-7.0, -5.0, 7.0]]], [[[7.0, 0.0, -7.0], [0.0, -4.0, -2.0]], [[4.0, 5.0, -5.0], [-1.0, -3.0, -5.0]], [[5.0, 
+6.0, 0.0], [7.0, 0.0, 2.0]], [[5.0, 5.0, -4.0], [4.0, 0.0, 2.0]], [[1.0, -1.0, 2.0], [-1.0, 0.0, 4.0]]], [[[0.0, -3.0, 4.0], 
+[-5.0, 3.0, -5.0]], [[5.0, 1.0, -3.0], [-7.0, 1.0, 3.0]], [[4.0, 1.0, -1.0], [-3.0, -6.0, 7.0]], [[-7.0, -1.0, -5.0], [6.0, 
+0.0, 7.0]], [[-7.0, 5.0, 2.0], [0.0, 0.0, 2.0]]]])
+      arg1=numpy.array([[[-7.0, 1.0, -5.0], [-2.0, 7.0, 6.0]], [[5.0, 3.0, 4.0], [-1.0, 4.0, 4.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=numpy.array([[[-103.0, 14.0], [10.0, 87.0], [94.0, 19.0], [78.0, -30.0], [10.0, 28.0]], [[50.0, -33.0], [15.0, 
+-13.0], [49.0, 24.0], [23.0, 3.0], [4.0, 26.0]], [[-54.0, -17.0], [-47.0, -16.0], [-31.0, 44.0], [-6.0, 28.0], [8.0, 27.0]], 
+[[-22.0, 4.0], [20.0, 39.0], [-16.0, 26.0], [103.0, -36.0], [56.0, -4.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_array_rank4(self):
+      arg0=numpy.array([[[[2.0, -6.0, -5.0], [-1.0, 4.0, 3.0]], [[3.0, 1.0, 4.0], [0.0, -5.0, -3.0]], [[-1.0, 2.0, 3.0], [-1.0, 
+7.0, 5.0]], [[7.0, -7.0, -3.0], [0.0, 4.0, 6.0]], [[5.0, -5.0, -1.0], [1.0, -5.0, -7.0]]], [[[0.0, 5.0, 4.0], [-2.0, 6.0, 
+3.0]], [[2.0, 6.0, 3.0], [0.0, 0.0, 6.0]], [[0.0, 5.0, 0.0], [-7.0, 0.0, 0.0]], [[0.0, -6.0, 0.0], [0.0, -4.0, -7.0]], [[-4.0, 
+6.0, 7.0], [-4.0, -7.0, 5.0]]], [[[0.0, 0.0, -7.0], [5.0, 0.0, 0.0]], [[-5.0, 0.0, -3.0], [5.0, 4.0, -3.0]], [[2.0, -4.0, 7.0], 
+[2.0, -1.0, 5.0]], [[-7.0, -1.0, -6.0], [7.0, -7.0, 7.0]], [[-6.0, 6.0, 5.0], [-5.0, 5.0, -6.0]]], [[[-6.0, -3.0, 6.0], [3.0, 
+1.0, 1.0]], [[0.0, 5.0, -2.0], [-5.0, -1.0, -2.0]], [[4.0, -1.0, -3.0], [7.0, -7.0, 5.0]], [[-6.0, 6.0, -4.0], [3.0, 0.0, 
+-5.0]], [[-1.0, 7.0, 1.0], [-1.0, -4.0, -4.0]]]])
+      arg1=numpy.array([[[[0.0, -2.0, 5.0], [0.0, 7.0, -3.0]], [[-4.0, 4.0, 4.0], [3.0, 0.0, 3.0]], [[5.0, 7.0, 7.0], [3.0, 
+-1.0, -7.0]], [[4.0, -5.0, 3.0], [-5.0, -6.0, 2.0]], [[0.0, 1.0, -4.0], [-3.0, 7.0, 4.0]]], [[[7.0, -1.0, 3.0], [-1.0, -2.0, 
+-4.0]], [[7.0, -7.0, -4.0], [-4.0, -4.0, 1.0]], [[7.0, -5.0, 7.0], [6.0, 4.0, 0.0]], [[-5.0, 4.0, -4.0], [-5.0, -1.0, 6.0]], 
+[[0.0, -7.0, 1.0], [2.0, -5.0, 6.0]]], [[[-4.0, 0.0, 1.0], [6.0, -2.0, 5.0]], [[-5.0, -7.0, 7.0], [2.0, -7.0, -5.0]], [[5.0, 
+2.0, 0.0], [1.0, -2.0, 0.0]], [[7.0, 0.0, 2.0], [4.0, 0.0, 4.0]], [[-3.0, 5.0, -4.0], [0.0, 4.0, -2.0]]], [[[1.0, 0.0, 3.0], 
+[5.0, 3.0, 1.0]], [[0.0, 1.0, 2.0], [6.0, 2.0, -2.0]], [[0.0, -5.0, -6.0], [3.0, -5.0, -5.0]], [[6.0, 0.0, -2.0], [-2.0, 4.0, 
+6.0]], [[3.0, 0.0, -3.0], [5.0, -4.0, 0.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=numpy.array([[[[6.0, -46.0, -95.0, 10.0, 57.0], [-14.0, 67.0, 19.0, 5.0, 33.0], [-12.0, -48.0, -11.0, 12.0, -6.0], 
+[-3.0, -20.0, 22.0, 58.0, 0.0]], [[-8.0, -1.0, 76.0, 43.0, -62.0], [54.0, 15.0, 24.0, -40.0, 4.0], [-13.0, 56.0, 27.0, 17.0, 
+-34.0], [-3.0, 5.0, 11.0, -28.0, 17.0]], [[45.0, 36.0, -15.0, -32.0, 62.0], [-33.0, -52.0, 26.0, 29.0, -18.0], [12.0, -64.0, 
+-16.0, 15.0, 19.0], [29.0, 6.0, -91.0, 48.0, -45.0]], [[9.0, -50.0, -81.0, 42.0, 57.0], [15.0, 100.0, 79.0, -19.0, 62.0], 
+[-9.0, -65.0, 13.0, 67.0, -40.0], [16.0, -17.0, 3.0, 100.0, 14.0]], [[-9.0, -62.0, 40.0, 53.0, -67.0], [74.0, 83.0, 39.0, 
+-83.0, 19.0], [-40.0, 75.0, 26.0, 9.0, -42.0], [-15.0, 3.0, 94.0, -32.0, 43.0]]], [[[43.0, 39.0, 30.0, -33.0, 49.0], [-15.0, 
+-64.0, 15.0, 26.0, -47.0], [-5.0, -68.0, -4.0, 12.0, 27.0], [23.0, 7.0, -100.0, 38.0, -46.0]], [[-15.0, 46.0, 31.0, -1.0, 
+18.0], [-7.0, -34.0, 5.0, 38.0, -3.0], [25.0, -61.0, 22.0, 44.0, 0.0], [17.0, 0.0, -78.0, 42.0, -3.0]], [[-10.0, -1.0, 14.0, 
+10.0, 26.0], [2.0, -7.0, -67.0, 55.0, -49.0], [-42.0, -49.0, 3.0, -28.0, 25.0], [-35.0, -37.0, -46.0, 14.0, -35.0]], [[5.0, 
+-45.0, 11.0, 40.0, -62.0], [42.0, 51.0, 14.0, -62.0, 20.0], [-27.0, 105.0, -4.0, -28.0, -32.0], [-19.0, 0.0, 85.0, -58.0, 
+16.0]], [[-41.0, 71.0, 31.0, 47.0, -39.0], [-15.0, -49.0, -61.0, 73.0, 22.0], [38.0, 43.0, 2.0, -10.0, -24.0], [-19.0, -28.0, 
+-74.0, -28.0, -25.0]]], [[[-35.0, -13.0, -34.0, -46.0, 13.0], [-26.0, 8.0, -19.0, 3.0, 3.0], [23.0, -39.0, 5.0, 6.0, 28.0], 
+[4.0, 16.0, 57.0, 4.0, 46.0]], [[22.0, 14.0, -14.0, -84.0, 13.0], [-45.0, -62.0, -10.0, -10.0, -31.0], [24.0, 1.0, -28.0, 
+-33.0, 49.0], [20.0, 38.0, 28.0, -36.0, 3.0]], [[21.0, 25.0, 3.0, 55.0, -25.0], [19.0, 15.0, 91.0, -33.0, 74.0], [38.0, 53.0, 
+6.0, 56.0, -68.0], [35.0, 10.0, -36.0, 20.0, -1.0]], [[-98.0, 42.0, -105.0, -20.0, -19.0], [-87.0, -11.0, -72.0, 69.0, 92.0], 
+[113.0, 28.0, -16.0, -5.0, -2.0], [-4.0, 1.0, 62.0, -30.0, 60.0]], [[66.0, 35.0, 69.0, -56.0, 12.0], [-14.0, -110.0, -47.0, 
+18.0, -108.0], [-41.0, 8.0, -33.0, -76.0, 60.0], [-7.0, 8.0, -70.0, -52.0, -78.0]]], [[[40.0, 48.0, -8.0, -10.0, -25.0], 
+[-30.0, -60.0, 37.0, -16.0, 34.0], [51.0, 87.0, -35.0, -14.0, -19.0], [31.0, 27.0, -22.0, -44.0, -25.0]], [[-21.0, -9.0, 21.0, 
+-4.0, 13.0], [4.0, -5.0, -73.0, 42.0, -54.0], [-40.0, -42.0, 7.0, -32.0, 33.0], [-36.0, -27.0, -13.0, -2.0, -15.0]], [[-77.0, 
+4.0, -15.0, 29.0, -39.0], [7.0, 52.0, 26.0, -10.0, 83.0], [62.0, 4.0, 39.0, 70.0, -43.0], [14.0, 11.0, 54.0, 18.0, 84.0]], 
+[[-17.0, 26.0, 28.0, -91.0, -7.0], [-43.0, -85.0, -82.0, 25.0, -70.0], [13.0, -9.0, -15.0, -58.0, 74.0], [-8.0, 26.0, 28.0, 
+-64.0, 9.0]], [[-25.0, 21.0, 80.0, -15.0, -38.0], [14.0, -44.0, -57.0, 14.0, -54.0], [-13.0, 9.0, 16.0, -25.0, 26.0], [-19.0, 
+3.0, -4.0, -46.0, 5.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_constData_rank2(self):
+      arg0=numpy.array([[[[4.0, -4.0, 1.0], [-3.0, -5.0, 7.0]], [[-6.0, 7.0, 0.0], [7.0, -4.0, 6.0]], [[5.0, -7.0, 5.0], [6.0, 
+-1.0, 6.0]], [[5.0, 0.0, 0.0], [-5.0, -2.0, 7.0]], [[-6.0, 6.0, -4.0], [-5.0, -7.0, -5.0]]], [[[1.0, 4.0, 6.0], [0.0, 0.0, 
+4.0]], [[-3.0, -2.0, 3.0], [-6.0, 2.0, 5.0]], [[5.0, -5.0, -2.0], [4.0, 6.0, 5.0]], [[2.0, 7.0, -3.0], [2.0, 4.0, 0.0]], [[4.0, 
+4.0, -3.0], [3.0, 0.0, 0.0]]], [[[3.0, 5.0, -3.0], [-2.0, -7.0, 1.0]], [[6.0, -7.0, 2.0], [-5.0, -1.0, -3.0]], [[3.0, -2.0, 
+1.0], [7.0, 4.0, 3.0]], [[-2.0, 0.0, -7.0], [5.0, 1.0, -1.0]], [[-6.0, -1.0, 1.0], [-6.0, -7.0, 4.0]]], [[[6.0, -5.0, 3.0], 
+[-1.0, -6.0, 6.0]], [[-2.0, -1.0, -6.0], [0.0, 7.0, 1.0]], [[-7.0, 4.0, 2.0], [-3.0, 6.0, 3.0]], [[-6.0, -1.0, -1.0], [-3.0, 
+5.0, -3.0]], [[4.0, -6.0, 2.0], [5.0, 6.0, -7.0]]]])
+      #arg1=Data(numpy.array([[1.0, 5.0, 3.0], [-6.0, -6.0, 3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[ 1., -6.], [ 5., -6.], [ 3.,  3.]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[56.0, 29.0, -27.0, 68.0, 69.0], [51.0, 35.0, -71.0, -8.0, -3.0], [76.0, 4.0, -61.0, -62.0, 82.0], 
+[50.0, -64.0, 10.0, -35.0, -107.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_constData_rank3(self):
+      arg0=numpy.array([[[[3.0, -1.0, -2.0], [1.0, 0.0, 5.0]], [[7.0, -6.0, 4.0], [-3.0, -5.0, 4.0]], [[3.0, 0.0, 6.0], [7.0, 
+-3.0, 2.0]], [[2.0, -5.0, 6.0], [2.0, 2.0, -4.0]], [[0.0, 6.0, 7.0], [3.0, 5.0, -5.0]]], [[[0.0, 6.0, -6.0], [3.0, 7.0, -3.0]], 
+[[-4.0, 6.0, 5.0], [-3.0, 5.0, -6.0]], [[5.0, 5.0, 2.0], [7.0, -5.0, -2.0]], [[0.0, -5.0, -6.0], [-2.0, 0.0, -3.0]], [[1.0, 
+-3.0, -5.0], [2.0, 5.0, 3.0]]], [[[5.0, 1.0, -1.0], [2.0, 1.0, 4.0]], [[-7.0, 5.0, 1.0], [0.0, 6.0, 1.0]], [[-2.0, 0.0, -2.0], 
+[1.0, 2.0, -6.0]], [[1.0, 7.0, 5.0], [3.0, 1.0, 6.0]], [[-7.0, 6.0, -1.0], [6.0, 7.0, -3.0]]], [[[5.0, 0.0, -1.0], [-2.0, 1.0, 
+6.0]], [[1.0, 0.0, 0.0], [5.0, -3.0, 2.0]], [[7.0, -3.0, 4.0], [5.0, -2.0, 6.0]], [[5.0, 1.0, 7.0], [2.0, 2.0, 0.0]], [[2.0, 
+1.0, -1.0], [-2.0, 0.0, 0.0]]]])
+      arg1=Data(numpy.array([[[1.0, -3.0, -2.0], [0.0, -6.0, 4.0]], [[4.0, 0.0, 7.0], [5.0, 0.0, -5.0]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[30.0, -22.0], [63.0, 21.0], [17.0, 79.0], [-23.0, 80.0], [-82.0, 89.0]], [[-60.0, -12.0], [-86.0, 
+34.0], [8.0, 79.0], [15.0, -37.0], [2.0, -36.0]], [[14.0, 3.0], [-56.0, -26.0], [-34.0, 13.0], [-12.0, 24.0], [-77.0, 10.0]], 
+[[25.0, -27.0], [27.0, 19.0], [44.0, 51.0], [-24.0, 79.0], [1.0, -9.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_constData_rank4(self):
+      arg0=numpy.array([[[[0.0, 4.0, -1.0], [6.0, 6.0, 6.0]], [[3.0, 2.0, -3.0], [4.0, 1.0, 6.0]], [[-1.0, -3.0, 5.0], [7.0, 
+-5.0, 1.0]], [[4.0, 4.0, -7.0], [-3.0, 7.0, 4.0]], [[3.0, 6.0, -3.0], [0.0, -3.0, 1.0]]], [[[-3.0, -7.0, -5.0], [2.0, -7.0, 
+1.0]], [[-4.0, 0.0, 5.0], [-2.0, 0.0, 6.0]], [[-3.0, -4.0, 1.0], [4.0, 5.0, -6.0]], [[3.0, 4.0, 0.0], [-5.0, 0.0, -4.0]], 
+[[4.0, 1.0, -4.0], [0.0, 1.0, 5.0]]], [[[7.0, -4.0, 3.0], [7.0, 5.0, -3.0]], [[-3.0, 1.0, 7.0], [0.0, 3.0, 7.0]], [[6.0, 7.0, 
+7.0], [5.0, -3.0, 7.0]], [[-2.0, -6.0, 1.0], [-6.0, 3.0, -1.0]], [[-7.0, 2.0, 6.0], [6.0, -6.0, 4.0]]], [[[0.0, 3.0, -7.0], 
+[-3.0, 7.0, 7.0]], [[-5.0, -5.0, -1.0], [-4.0, -6.0, 0.0]], [[6.0, 1.0, 7.0], [-4.0, 5.0, 6.0]], [[3.0, -4.0, -2.0], [1.0, 7.0, 
+7.0]], [[0.0, 4.0, -7.0], [-2.0, 0.0, -7.0]]]])
+      arg1=Data(numpy.array([[[[4.0, 0.0, -6.0], [-4.0, -6.0, 1.0]], [[3.0, -2.0, 1.0], [-3.0, 4.0, 3.0]], [[0.0, -1.0, -7.0], 
+[-7.0, -6.0, 0.0]], [[-3.0, -2.0, 5.0], [5.0, 7.0, -6.0]], [[-4.0, -5.0, 0.0], [-4.0, -1.0, -4.0]]], [[[-4.0, 3.0, -2.0], 
+[-7.0, 0.0, 0.0]], [[-7.0, 1.0, 4.0], [6.0, 7.0, 0.0]], [[-5.0, 6.0, 6.0], [-2.0, -4.0, 5.0]], [[-5.0, 3.0, 0.0], [-3.0, 1.0, 
+6.0]], [[-4.0, 0.0, 0.0], [-5.0, -3.0, 2.0]]], [[[-4.0, 1.0, 0.0], [4.0, 2.0, 4.0]], [[7.0, 0.0, -6.0], [4.0, -1.0, 3.0]], 
+[[2.0, 3.0, -4.0], [-2.0, -2.0, 2.0]], [[0.0, 4.0, -3.0], [4.0, -2.0, 3.0]], [[6.0, 1.0, 2.0], [2.0, -3.0, -3.0]]], [[[2.0, 
+-6.0, -5.0], [6.0, -4.0, -3.0]], [[1.0, 4.0, 0.0], [-3.0, 4.0, 7.0]], [[0.0, 7.0, 0.0], [-2.0, 2.0, -1.0]], [[-7.0, 0.0, -1.0], 
+[-1.0, 1.0, 3.0]], [[4.0, -1.0, 6.0], [4.0, 2.0, 1.0]]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-48.0, 15.0, -75.0, 23.0, -74.0], [-28.0, 78.0, 12.0, 36.0, -36.0], [64.0, 42.0, 4.0, 49.0, 
+-22.0], [-25.0, 64.0, 22.0, 19.0, 32.0]], [[14.0, 12.0, -15.0, -37.0, -63.0], [-28.0, 0.0, -3.0, 16.0, -23.0], [32.0, 72.0, 
+26.0, 49.0, 1.0], [11.0, 45.0, 2.0, -3.0, 16.0]], [[-31.0, -30.0, -51.0, 28.0, -8.0], [-64.0, 31.0, 28.0, -24.0, -14.0], [23.0, 
+-1.0, -33.0, 14.0, 27.0], [50.0, -47.0, -46.0, -7.0, 48.0]], [[32.0, 46.0, 24.0, -45.0, -47.0], [31.0, -21.0, -40.0, 32.0, 
+-14.0], [6.0, 63.0, 48.0, 23.0, -25.0], [-39.0, 85.0, 44.0, 1.0, -24.0]], [[49.0, -15.0, 33.0, -63.0, -43.0], [12.0, -48.0, 
+20.0, 6.0, -1.0], [-8.0, 45.0, 44.0, 42.0, 24.0], [-6.0, 22.0, 35.0, -18.0, -17.0]]], [[[53.0, -31.0, 70.0, -47.0, 42.0], 
+[-13.0, -43.0, -28.0, -13.0, 25.0], [3.0, 27.0, 5.0, 12.0, -13.0], [98.0, -58.0, -68.0, 20.0, -40.0]], [[-32.0, 17.0, -21.0, 
+-9.0, 0.0], [20.0, 36.0, 84.0, 62.0, 38.0], [32.0, -48.0, -12.0, -5.0, -36.0], [-63.0, 44.0, -2.0, 43.0, 12.0]], [[-70.0, 
+-10.0, -61.0, 113.0, 35.0], [-30.0, 80.0, -61.0, -40.0, -35.0], [10.0, -34.0, -52.0, -31.0, -9.0], [35.0, -53.0, -20.0, 3.0, 
+18.0]], [[28.0, 4.0, 31.0, -18.0, 4.0], [35.0, -47.0, -1.0, -12.0, 5.0], [-44.0, -11.0, 20.0, -16.0, 24.0], [-36.0, 6.0, 42.0, 
+-28.0, -16.0]], [[39.0, 25.0, 21.0, -57.0, -42.0], [-5.0, -36.0, -17.0, 14.0, -9.0], [7.0, 66.0, 35.0, 29.0, -1.0], [3.0, 47.0, 
+4.0, -8.0, -2.0]]], [[[-51.0, 22.0, -96.0, 90.0, -29.0], [-95.0, 36.0, -90.0, -81.0, -84.0], [-6.0, 45.0, -40.0, -16.0, 52.0], 
+[54.0, -31.0, -29.0, -63.0, 85.0]], [[-65.0, 29.0, -68.0, 21.0, -24.0], [1.0, 71.0, 86.0, 63.0, 17.0], [47.0, -45.0, -23.0, 
+-2.0, -33.0], [-80.0, 62.0, 6.0, 38.0, 42.0]], [[-13.0, 5.0, -73.0, -35.0, -104.0], [-52.0, 2.0, 91.0, 15.0, -26.0], [25.0, 
+44.0, 15.0, 54.0, 55.0], [-44.0, 56.0, 26.0, -36.0, 80.0]], [[-9.0, 34.0, 23.0, 20.0, 63.0], [30.0, -3.0, -25.0, 7.0, 27.0], 
+[-20.0, -50.0, -22.0, -60.0, -34.0], [-18.0, -3.0, -23.0, 19.0, -15.0]], [[-48.0, -49.0, -50.0, 11.0, -16.0], [-20.0, 69.0, 
+115.0, 41.0, 24.0], [58.0, -43.0, -24.0, 38.0, -10.0], [-8.0, -13.0, -14.0, 43.0, 22.0]]], [[[19.0, 45.0, 25.0, -49.0, -38.0], 
+[44.0, 6.0, -11.0, 67.0, 8.0], [33.0, 44.0, 43.0, 28.0, -59.0], [-50.0, 98.0, 34.0, 38.0, -36.0]], [[38.0, -18.0, 76.0, -42.0, 
+67.0], [35.0, -40.0, 21.0, 16.0, 58.0], [-13.0, -39.0, -1.0, -21.0, -27.0], [25.0, -37.0, -39.0, 34.0, -49.0]], [[-26.0, 73.0, 
+-52.0, -6.0, -42.0], [-7.0, -2.0, 36.0, 26.0, -7.0], [-5.0, -3.0, -3.0, -25.0, 10.0], [-91.0, 84.0, 19.0, -22.0, 65.0]], 
+[[-15.0, 61.0, -31.0, 1.0, -31.0], [-27.0, 22.0, -46.0, 19.0, -24.0], [30.0, 51.0, 0.0, 1.0, -30.0], [-3.0, 61.0, -23.0, 8.0, 
+29.0]], [[43.0, -30.0, 59.0, -11.0, 16.0], [40.0, -36.0, -49.0, -24.0, -4.0], [-32.0, 13.0, 30.0, 8.0, 7.0], [20.0, -27.0, 
+39.0, -12.0, -61.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=tensor_transposed_mult(arg0,arg1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_expandedData_rank2(self):
+      arg0=numpy.array([[[[-7.0, -7.0, 0.0], [1.0, 7.0, -7.0]], [[-1.0, -5.0, 6.0], [-3.0, -1.0, 6.0]], [[4.0, 3.0, -3.0], 
+[-4.0, 3.0, -2.0]], [[3.0, 4.0, -5.0], [5.0, -3.0, 0.0]], [[7.0, -3.0, -3.0], [3.0, -4.0, -7.0]]], [[[-6.0, 2.0, 4.0], [-6.0, 
+4.0, 0.0]], [[5.0, 2.0, 0.0], [1.0, 4.0, 7.0]], [[-5.0, -6.0, 2.0], [4.0, -7.0, 3.0]], [[0.0, -6.0, 7.0], [2.0, 7.0, -4.0]], 
+[[-3.0, 3.0, 0.0], [-5.0, -1.0, -2.0]]], [[[4.0, 2.0, -7.0], [1.0, -5.0, 0.0]], [[4.0, 5.0, 7.0], [7.0, -5.0, -3.0]], [[5.0, 
+6.0, 6.0], [-6.0, 0.0, -7.0]], [[4.0, -3.0, -3.0], [2.0, 5.0, 1.0]], [[-2.0, 6.0, -2.0], [-6.0, -5.0, -3.0]]], [[[2.0, 2.0, 
+0.0], [0.0, 2.0, -1.0]], [[1.0, 2.0, -4.0], [-3.0, -7.0, -4.0]], [[-2.0, 2.0, 4.0], [-3.0, -1.0, 4.0]], [[4.0, -5.0, -2.0], 
+[-4.0, -4.0, -6.0]], [[0.0, 0.0, -7.0], [-7.0, 6.0, -3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-3.0, -6.0, -6.0], [-5.0, 0.0, -5.0]])+(1.-msk_arg1)*numpy.array([[4.0, 5.0, -1.0], [3.0, 
+0.0, 2.0]])
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[93.0, -18.0, 18.0, -28.0, 35.0], [12.0, -67.0, 4.0, 4.0, 26.0], [13.0, -104.0, -22.0, 9.0, 
+27.0], [-13.0, 44.0, -35.0, 80.0, 92.0]])+(1.-msk_ref)*numpy.array([[-74.0, -32.0, 18.0, 52.0, 11.0], [-36.0, 47.0, -34.0, 
+-39.0, -16.0], [36.0, 49.0, 12.0, 12.0, 0.0], [16.0, 1.0, -3.0, -31.0, -20.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_expandedData_rank3(self):
+      arg0=numpy.array([[[[7.0, 3.0, -1.0], [6.0, -6.0, -4.0]], [[6.0, -7.0, 5.0], [0.0, 0.0, -7.0]], [[1.0, -5.0, 2.0], [-7.0, 
+4.0, 1.0]], [[-5.0, 2.0, 6.0], [-1.0, -7.0, 5.0]], [[-5.0, -5.0, -6.0], [2.0, -2.0, -6.0]]], [[[5.0, 5.0, -2.0], [-6.0, 1.0, 
+-2.0]], [[2.0, -1.0, 0.0], [-4.0, 0.0, 6.0]], [[-7.0, -5.0, -3.0], [-5.0, -5.0, 2.0]], [[5.0, -2.0, 2.0], [0.0, 4.0, -4.0]], 
+[[7.0, -7.0, 4.0], [-4.0, -2.0, 2.0]]], [[[4.0, -2.0, 4.0], [2.0, 0.0, -1.0]], [[3.0, 6.0, -4.0], [-4.0, 7.0, 3.0]], [[-2.0, 
+2.0, -3.0], [0.0, 2.0, -1.0]], [[0.0, 3.0, -1.0], [-6.0, -3.0, 4.0]], [[2.0, -6.0, -3.0], [-1.0, 1.0, 3.0]]], [[[-1.0, -1.0, 
+-1.0], [6.0, 7.0, 4.0]], [[-2.0, 4.0, 0.0], [7.0, 1.0, 0.0]], [[-2.0, 0.0, -1.0], [-6.0, -6.0, -2.0]], [[0.0, 0.0, -3.0], [6.0, 
+-5.0, -1.0]], [[-1.0, -2.0, 4.0], [6.0, 0.0, -2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-7.0, -4.0, -7.0], [-1.0, 4.0, -5.0]], [[-6.0, 5.0, 2.0], [-1.0, 0.0, 
+-3.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 0.0, 6.0], [1.0, -6.0, 0.0]], [[-6.0, -2.0, 3.0], [-1.0, 3.0, -5.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-64.0, -23.0], [-14.0, -40.0], [17.0, -23.0], [-67.0, 38.0], [117.0, 9.0]], [[-21.0, 3.0], 
+[-36.0, -31.0], [65.0, 10.0], [-5.0, -24.0], [-63.0, -71.0]], [[-45.0, -25.0], [0.0, -1.0], [40.0, 19.0], [-31.0, 7.0], [21.0, 
+-56.0]], [[20.0, -19.0], [-5.0, 25.0], [13.0, 22.0], [0.0, -9.0], [-9.0, 4.0]]])+(1.-msk_ref)*numpy.array([[[57.0, -55.0], 
+[48.0, 28.0], [-16.0, 24.0], [62.0, -1.0], [-37.0, 44.0]], [[-9.0, -27.0], [2.0, -36.0], [-14.0, 23.0], [3.0, 12.0], [53.0, 
+-28.0]], [[38.0, -5.0], [-61.0, -32.0], [-36.0, 10.0], [6.0, -32.0], [-19.0, -20.0]], [[-45.0, 0.0], [-5.0, 0.0], [18.0, 7.0], 
+[18.0, -25.0], [27.0, 26.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank4_expandedData_rank4(self):
+      arg0=numpy.array([[[[6.0, -1.0, 6.0], [-5.0, -6.0, 0.0]], [[6.0, -2.0, 0.0], [3.0, -6.0, -7.0]], [[3.0, -4.0, -4.0], 
+[-6.0, -5.0, 6.0]], [[-4.0, -1.0, 3.0], [-4.0, 0.0, -7.0]], [[-6.0, 1.0, -6.0], [4.0, -1.0, -2.0]]], [[[1.0, 2.0, -7.0], [6.0, 
+-4.0, -1.0]], [[-6.0, 0.0, 4.0], [0.0, -4.0, 3.0]], [[0.0, 3.0, 6.0], [5.0, -1.0, -3.0]], [[-7.0, -5.0, 2.0], [-4.0, 6.0, 
+-4.0]], [[-3.0, 3.0, -7.0], [0.0, 6.0, 6.0]]], [[[0.0, -1.0, -6.0], [7.0, 2.0, -4.0]], [[6.0, 0.0, 3.0], [-6.0, 2.0, -3.0]], 
+[[-1.0, 7.0, 0.0], [-2.0, -6.0, 0.0]], [[1.0, 1.0, 3.0], [-1.0, 2.0, 7.0]], [[1.0, 0.0, 0.0], [-5.0, 0.0, 7.0]]], [[[4.0, 3.0, 
+-7.0], [5.0, -6.0, -7.0]], [[-3.0, -2.0, 4.0], [0.0, 7.0, 7.0]], [[7.0, 1.0, 1.0], [7.0, 3.0, 2.0]], [[-3.0, -1.0, -6.0], 
+[-4.0, -5.0, 4.0]], [[-1.0, -5.0, 1.0], [-2.0, -6.0, 1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[3.0, -3.0, 6.0], [3.0, 3.0, -6.0]], [[-7.0, 2.0, 0.0], [0.0, -2.0, 7.0]], [[5.0, 0.0, 4.0], 
+[-7.0, 5.0, -6.0]], [[4.0, 4.0, -1.0], [0.0, -3.0, 7.0]], [[-2.0, 3.0, 7.0], [5.0, 0.0, 2.0]]], [[[5.0, 0.0, 7.0], [4.0, 5.0, 
+5.0]], [[3.0, -4.0, 3.0], [-4.0, 6.0, 0.0]], [[0.0, 6.0, -6.0], [-6.0, -7.0, 0.0]], [[2.0, -1.0, -5.0], [-3.0, 0.0, 2.0]], 
+[[7.0, -5.0, -5.0], [1.0, 0.0, -6.0]]], [[[-1.0, 6.0, -2.0], [-6.0, 0.0, 1.0]], [[-4.0, -7.0, -5.0], [4.0, 4.0, -5.0]], [[5.0, 
+0.0, -3.0], [1.0, -4.0, 0.0]], [[-1.0, -1.0, -4.0], [4.0, 1.0, -3.0]], [[-1.0, -3.0, 7.0], [7.0, -3.0, 3.0]]], [[[7.0, -2.0, 
+1.0], [-7.0, -7.0, 0.0]], [[0.0, -1.0, -7.0], [6.0, -5.0, -4.0]], [[-2.0, 4.0, -6.0], [4.0, -4.0, 0.0]], [[3.0, -6.0, -4.0], 
+[-4.0, 7.0, 3.0]], [[-7.0, 6.0, 5.0], [-5.0, -3.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 6.0, -5.0], [6.0, 6.0, 6.0]], 
+[[3.0, 3.0, 1.0], [3.0, -5.0, -3.0]], [[2.0, 6.0, -2.0], [-6.0, -4.0, -2.0]], [[0.0, -5.0, 6.0], [0.0, 5.0, 0.0]], [[5.0, -5.0, 
+-6.0], [-5.0, 0.0, -4.0]]], [[[0.0, 4.0, -1.0], [2.0, -6.0, 6.0]], [[-6.0, 7.0, 4.0], [0.0, 1.0, 1.0]], [[7.0, -3.0, 6.0], 
+[3.0, -1.0, -5.0]], [[4.0, -3.0, -1.0], [5.0, 4.0, 2.0]], [[2.0, -3.0, -3.0], [-2.0, 0.0, -5.0]]], [[[-2.0, 2.0, -5.0], [-7.0, 
+0.0, -7.0]], [[-3.0, 3.0, -7.0], [-1.0, 7.0, -7.0]], [[-7.0, 5.0, 0.0], [6.0, 4.0, 0.0]], [[-2.0, -4.0, 7.0], [-5.0, -1.0, 
+-1.0]], [[-1.0, -2.0, -6.0], [4.0, 7.0, 2.0]]], [[[2.0, -7.0, 6.0], [7.0, -2.0, 4.0]], [[7.0, 3.0, -1.0], [4.0, -6.0, -1.0]], 
+[[4.0, -7.0, -2.0], [1.0, -5.0, 1.0]], [[0.0, 7.0, 5.0], [3.0, 0.0, 5.0]], [[4.0, 3.0, 6.0], [-3.0, -5.0, -6.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[24.0, -32.0, 59.0, 32.0, 2.0], [22.0, 24.0, 30.0, -2.0, 12.0], [6.0, -91.0, 31.0, -55.0, 
+22.0], [127.0, -41.0, -48.0, -22.0, 25.0]], [[57.0, -83.0, 21.0, -15.0, -17.0], [-23.0, -22.0, 12.0, -9.0, 97.0], [-43.0, 13.0, 
+57.0, 23.0, 18.0], [67.0, 78.0, 16.0, -45.0, -72.0]], [[-72.0, 23.0, -20.0, 57.0, -64.0], [-32.0, 7.0, 71.0, 60.0, 19.0], 
+[23.0, -38.0, 41.0, -30.0, -28.0], [102.0, -3.0, -2.0, 56.0, -2.0]], [[39.0, -23.0, 62.0, -72.0, -8.0], [-50.0, 17.0, 0.0, 
+-24.0, 0.0], [9.0, 27.0, -33.0, -2.0, -21.0], [5.0, -16.0, -30.0, -23.0, 36.0]], [[-36.0, 32.0, -75.0, -25.0, -11.0], [-71.0, 
+-62.0, 25.0, 1.0, -1.0], [-2.0, 69.0, -4.0, 50.0, -14.0], [-71.0, 78.0, 72.0, -29.0, -5.0]]], [[[-33.0, -2.0, -79.0, 24.0, 
+-17.0], [-45.0, -74.0, 46.0, 15.0, 44.0], [-12.0, 30.0, 48.0, 48.0, -5.0], [-18.0, 107.0, 88.0, -36.0, -51.0]], [[-24.0, 71.0, 
+-52.0, 5.0, 46.0], [-7.0, -30.0, 4.0, -26.0, -80.0], [1.0, -27.0, -26.0, -23.0, 55.0], [-10.0, -20.0, 4.0, -53.0, 83.0]], 
+[[57.0, -13.0, 2.0, -12.0, 70.0], [42.0, -20.0, -41.0, -54.0, -22.0], [-27.0, -20.0, -9.0, 1.0, 62.0], [-28.0, 2.0, 0.0, -78.0, 
+17.0]], [[36.0, -1.0, 55.0, -96.0, -15.0], [-27.0, 57.0, -60.0, -15.0, -14.0], [-7.0, 81.0, -69.0, 6.0, -22.0], [-51.0, -47.0, 
+-58.0, 47.0, 19.0]], [[-78.0, 57.0, -49.0, 31.0, -22.0], [-4.0, -6.0, 18.0, 38.0, -37.0], [41.0, 20.0, -18.0, 16.0, -55.0], 
+[-76.0, -8.0, 36.0, 61.0, 4.0]]], [[[18.0, -34.0, -39.0, -32.0, -18.0], [-24.0, -30.0, -26.0, 2.0, 66.0], [-40.0, 93.0, 17.0, 
+67.0, -8.0], [-67.0, 91.0, 52.0, 4.0, -89.0]], [[42.0, -67.0, 112.0, -6.0, -27.0], [22.0, 63.0, 4.0, 9.0, 39.0], [21.0, -40.0, 
+7.0, -31.0, -42.0], [73.0, -55.0, -62.0, 35.0, -12.0]], [[-48.0, 33.0, -21.0, 42.0, 13.0], [-43.0, -59.0, 96.0, -3.0, -44.0], 
+[55.0, -77.0, 17.0, -20.0, -16.0], [35.0, 11.0, 46.0, -79.0, 77.0]], [[-21.0, 40.0, -8.0, 48.0, 31.0], [67.0, 24.0, -20.0, 3.0, 
+-56.0], [12.0, -57.0, -13.0, -37.0, 25.0], [1.0, -66.0, -28.0, 24.0, 34.0]], [[-54.0, 42.0, -2.0, 53.0, -13.0], [20.0, 23.0, 
+30.0, 31.0, -40.0], [36.0, -59.0, 0.0, -42.0, -15.0], [42.0, -58.0, -22.0, 44.0, 39.0]]], [[[0.0, -59.0, -31.0, 4.0, -37.0], 
+[-74.0, -77.0, 72.0, 11.0, 95.0], [-9.0, 29.0, 70.0, 56.0, -30.0], [22.0, 134.0, 90.0, -61.0, -73.0]], [[0.0, 52.0, -6.0, 4.0, 
+42.0], [83.0, 53.0, -85.0, -10.0, -73.0], [-10.0, -1.0, -55.0, -25.0, 37.0], [-62.0, -89.0, -54.0, 57.0, 29.0]], [[42.0, -39.0, 
+-7.0, 36.0, 35.0], [95.0, 10.0, -63.0, -9.0, 34.0], [-43.0, -10.0, 27.0, 13.0, 43.0], [-22.0, 11.0, 0.0, 10.0, -76.0]], 
+[[-93.0, 57.0, -60.0, 33.0, -51.0], [-78.0, -37.0, 89.0, 45.0, -14.0], [37.0, -7.0, 19.0, -5.0, -37.0], [38.0, 28.0, 42.0, 
+14.0, 32.0]], [[-12.0, 16.0, -23.0, 0.0, -14.0], [-31.0, -8.0, 18.0, 6.0, 5.0], [-18.0, -3.0, 14.0, -15.0, 30.0], [60.0, 12.0, 
+-8.0, -8.0, 13.0]]]])+(1.-msk_ref)*numpy.array([[[[-132.0, 36.0, 48.0, 11.0, 24.0], [16.0, -25.0, 72.0, -28.0, 7.0], [-9.0, 
+-100.0, -101.0, 65.0, -102.0], [32.0, 49.0, 44.0, 8.0, 102.0]], [[-102.0, 72.0, 20.0, -20.0, 53.0], [-8.0, -63.0, 98.0, 7.0, 
+47.0], [12.0, -20.0, -58.0, -6.0, -46.0], [31.0, 91.0, 64.0, -40.0, 81.0]], [[-49.0, -18.0, 34.0, -29.0, 65.0], [42.0, -61.0, 
+-34.0, -10.0, 12.0], [6.0, -64.0, -97.0, 11.0, -18.0], [2.0, 13.0, 73.0, -36.0, -17.0]], [[-67.0, -3.0, 18.0, 23.0, 15.0], 
+[-57.0, 22.0, 16.0, -50.0, 29.0], [68.0, 41.0, -1.0, 60.0, -42.0], [-39.0, -43.0, -26.0, -39.0, 53.0]], [[72.0, 2.0, -10.0, 
+-46.0, -11.0], [12.0, 16.0, -58.0, -9.0, 5.0], [30.0, 66.0, 67.0, -51.0, 45.0], [-33.0, -9.0, -12.0, -21.0, -52.0]]], [[[48.0, 
+43.0, 10.0, -72.0, 11.0], [45.0, -25.0, -14.0, 17.0, 10.0], [2.0, 25.0, 23.0, -84.0, 31.0], [-8.0, 69.0, 29.0, -8.0, -24.0]], 
+[[4.0, -3.0, -10.0, 4.0, -66.0], [38.0, 51.0, -29.0, -38.0, -39.0], [-29.0, -59.0, 26.0, 41.0, -40.0], [32.0, -25.0, -9.0, 
+35.0, 2.0]], [[-6.0, 44.0, -14.0, 16.0, -64.0], [4.0, 41.0, 58.0, 0.0, -22.0], [-38.0, -24.0, 41.0, 9.0, -35.0], [40.0, 32.0, 
+-26.0, 51.0, 53.0]], [[-17.0, -64.0, -40.0, 67.0, 14.0], [-90.0, 17.0, -20.0, -19.0, 23.0], [50.0, 66.0, 24.0, 66.0, 23.0], 
+[-23.0, -114.0, -35.0, -57.0, -25.0]], [[140.0, -55.0, -10.0, -27.0, -12.0], [19.0, 23.0, -108.0, 22.0, -24.0], [5.0, 67.0, 
+60.0, -67.0, 93.0], [-57.0, -47.0, -43.0, 16.0, -111.0]]], [[[54.0, 14.0, -36.0, -21.0, 22.0], [-20.0, -33.0, 6.0, 44.0, 27.0], 
+[7.0, 74.0, 45.0, -71.0, 72.0], [0.0, 23.0, 12.0, -36.0, -46.0]], [[-87.0, 2.0, 40.0, 28.0, 54.0], [-45.0, -25.0, 55.0, -7.0, 
+30.0], [36.0, 2.0, -70.0, 40.0, -40.0], [-28.0, 6.0, -1.0, -18.0, 68.0]], [[-1.0, 42.0, 76.0, -65.0, -30.0], [60.0, 49.0, 
+-28.0, -59.0, -19.0], [30.0, -16.0, 6.0, -10.0, -63.0], [-53.0, 42.0, -25.0, 43.0, 53.0]], [[34.0, -25.0, -14.0, 23.0, -41.0], 
+[29.0, 22.0, -18.0, 15.0, -43.0], [-57.0, -55.0, 0.0, 11.0, 3.0], [30.0, -16.0, -13.0, 54.0, -24.0]], [[7.0, -33.0, 18.0, 0.0, 
+2.0], [32.0, 1.0, -43.0, -7.0, -23.0], [-16.0, -47.0, -37.0, 16.0, -7.0], [-5.0, -20.0, 6.0, 20.0, -23.0]]], [[[-15.0, 80.0, 
+48.0, -87.0, 50.0], [23.0, -44.0, 33.0, 1.0, 45.0], [47.0, 48.0, -7.0, -81.0, -4.0], [-36.0, 107.0, 37.0, -34.0, 40.0]], 
+[[67.0, -67.0, -68.0, 69.0, -57.0], [-12.0, 34.0, -33.0, 32.0, -47.0], [-67.0, -25.0, 39.0, 28.0, 46.0], [46.0, -80.0, -34.0, 
+41.0, -71.0]], [[38.0, 25.0, -40.0, 16.0, -19.0], [11.0, -26.0, 60.0, 75.0, -16.0], [-80.0, -25.0, 10.0, -51.0, 38.0], [64.0, 
+59.0, 13.0, 43.0, -11.0]], [[9.0, -17.0, 36.0, -56.0, 30.0], [48.0, -14.0, -81.0, -35.0, 3.0], [34.0, -11.0, -28.0, -11.0, 
+-2.0], [-37.0, -8.0, 32.0, -29.0, -38.0]], [[-72.0, 4.0, 0.0, 1.0, 20.0], [17.0, -30.0, 9.0, -22.0, 9.0], [-6.0, -66.0, -54.0, 
+44.0, -43.0], [41.0, 4.0, 58.0, -31.0, 17.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank2_array_rank1(self):
+      arg0=Data(numpy.array([[1.0, 5.0, 6.0], [6.0, 6.0, -3.0]]),self.functionspace)
+      arg1=numpy.array([4.0, 3.0, -4.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([-5.0, 54.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank2_array_rank2(self):
+      arg0=Data(numpy.array([[5.0, 3.0, 4.0], [-7.0, 6.0, 7.0]]),self.functionspace)
+      arg1=numpy.array([[5.0, 0.0, 2.0], [-6.0, 7.0, 7.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[33.0, 19.0], [-21.0, 133.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank2_constData_rank1(self):
+      arg0=Data(numpy.array([[-7.0, 4.0, -4.0], [-7.0, -6.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([-5.0, 5.0, 0.0]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([55.0, 5.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank2_constData_rank2(self):
+      arg0=Data(numpy.array([[3.0, 6.0, -7.0], [-1.0, 0.0, -1.0]]),self.functionspace)
+      arg1=Data(numpy.array([[5.0, -1.0, 0.0], [-7.0, -6.0, 0.0]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[9.0, -57.0], [-5.0, 7.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank2_expandedData_rank1(self):
+      arg0=Data(numpy.array([[0.0, 7.0, -7.0], [2.0, -4.0, -5.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, 6.0, 2.0])+(1.-msk_arg1)*numpy.array([1.0, 7.0, 0.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([28.0, -34.0])+(1.-msk_ref)*numpy.array([49.0, -26.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank2_expandedData_rank2(self):
+      arg0=Data(numpy.array([[-3.0, 5.0, 0.0], [-5.0, -1.0, -6.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[2.0, -4.0, -1.0], [-6.0, 0.0, 4.0]])+(1.-msk_arg1)*numpy.array([[2.0, -6.0, -6.0], [3.0, 
+-3.0, 6.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-26.0, 18.0], [0.0, 6.0]])+(1.-msk_ref)*numpy.array([[-36.0, -24.0], [32.0, -48.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_array_rank2(self):
+      arg0=Data(numpy.array([[[[-6.0, -7.0, 6.0], [1.0, 5.0, 6.0]], [[0.0, -3.0, 4.0], [0.0, 1.0, 1.0]], [[3.0, 7.0, -6.0], 
+[-7.0, -4.0, -5.0]], [[-1.0, -4.0, 7.0], [5.0, -3.0, -5.0]], [[-1.0, -4.0, 0.0], [-5.0, 2.0, -4.0]]], [[[2.0, 4.0, 1.0], [0.0, 
+-1.0, -2.0]], [[2.0, -1.0, 1.0], [7.0, 6.0, 5.0]], [[3.0, 6.0, 6.0], [0.0, -5.0, -3.0]], [[3.0, -1.0, 4.0], [-7.0, 0.0, 4.0]], 
+[[0.0, 0.0, -1.0], [7.0, 6.0, 2.0]]], [[[1.0, 4.0, -3.0], [0.0, -3.0, 2.0]], [[3.0, -6.0, 5.0], [7.0, -1.0, 1.0]], [[-3.0, 
+-3.0, 0.0], [-1.0, 0.0, 0.0]], [[-2.0, 1.0, 6.0], [6.0, 7.0, 0.0]], [[2.0, 5.0, 7.0], [-3.0, -3.0, 3.0]]], [[[4.0, -5.0, 0.0], 
+[-1.0, 1.0, 4.0]], [[1.0, 5.0, -6.0], [-4.0, 2.0, -3.0]], [[-3.0, -1.0, 0.0], [-2.0, 0.0, 1.0]], [[-6.0, 2.0, 4.0], [0.0, -6.0, 
+0.0]], [[-1.0, 1.0, -6.0], [7.0, 7.0, -1.0]]]]),self.functionspace)
+      arg1=numpy.array([[-5.0, -1.0, -7.0], [1.0, -5.0, -7.0]])
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[-71.0, -37.0, 68.0, 15.0, 22.0], [-2.0, -74.0, -17.0, -77.0, -30.0], [13.0, -39.0, 17.0, -62.0, 
+-73.0], [-49.0, 39.0, 7.0, 30.0, 25.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_array_rank3(self):
+      arg0=Data(numpy.array([[[[0.0, -5.0, 0.0], [-5.0, -1.0, 5.0]], [[-7.0, -5.0, 1.0], [-6.0, 3.0, -6.0]], [[7.0, -3.0, 0.0], 
+[-6.0, 1.0, -4.0]], [[5.0, 0.0, 0.0], [5.0, 1.0, 7.0]], [[-2.0, -4.0, 1.0], [0.0, 2.0, -4.0]]], [[[2.0, 1.0, 7.0], [-6.0, 0.0, 
+6.0]], [[-4.0, 7.0, 3.0], [-7.0, 5.0, 6.0]], [[6.0, 0.0, -5.0], [0.0, -1.0, 0.0]], [[-6.0, 7.0, -6.0], [4.0, -5.0, -3.0]], 
+[[0.0, 0.0, -2.0], [0.0, -1.0, 6.0]]], [[[-6.0, 0.0, -5.0], [-3.0, -1.0, 5.0]], [[-7.0, -4.0, -5.0], [0.0, -2.0, -3.0]], [[1.0, 
+3.0, 2.0], [0.0, 3.0, 1.0]], [[3.0, 6.0, 0.0], [1.0, 6.0, 3.0]], [[-4.0, -4.0, -6.0], [6.0, 2.0, -5.0]]], [[[-6.0, 6.0, -5.0], 
+[5.0, -2.0, -7.0]], [[-1.0, -4.0, 1.0], [0.0, -5.0, 0.0]], [[-5.0, -6.0, -5.0], [-6.0, 5.0, -3.0]], [[0.0, -3.0, -5.0], [7.0, 
+5.0, -7.0]], [[-4.0, 5.0, 6.0], [4.0, 4.0, 2.0]]]]),self.functionspace)
+      arg1=numpy.array([[[1.0, 7.0, 1.0], [0.0, -1.0, 2.0]], [[4.0, -6.0, -3.0], [-7.0, 3.0, -7.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[-24.0, 27.0], [-56.0, 92.0], [-23.0, 119.0], [18.0, -61.0], [-39.0, 47.0]], [[28.0, -19.0], 
+[55.0, -45.0], [2.0, 36.0], [36.0, -70.0], [11.0, -39.0]], [[0.0, -26.0], [-44.0, 26.0], [23.0, -18.0], [45.0, -34.0], [-50.0, 
+25.0]], [[19.0, -37.0], [-23.0, 2.0], [-63.0, 109.0], [-45.0, 48.0], [37.0, -94.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_array_rank4(self):
+      arg0=Data(numpy.array([[[[-6.0, 2.0, 0.0], [-5.0, -1.0, 5.0]], [[7.0, 7.0, 4.0], [0.0, 6.0, 6.0]], [[2.0, 4.0, -1.0], 
+[-6.0, 0.0, -3.0]], [[-1.0, -2.0, 3.0], [1.0, 6.0, -1.0]], [[6.0, 0.0, -5.0], [-5.0, -4.0, 1.0]]], [[[5.0, 7.0, 7.0], [5.0, 
+-5.0, -7.0]], [[3.0, 3.0, 5.0], [-3.0, -5.0, -4.0]], [[6.0, 0.0, 0.0], [-3.0, 3.0, 7.0]], [[7.0, -4.0, -7.0], [-1.0, 0.0, 
+2.0]], [[2.0, 0.0, -3.0], [4.0, 0.0, 5.0]]], [[[6.0, 2.0, -1.0], [-2.0, 7.0, 4.0]], [[3.0, 0.0, -5.0], [-6.0, -3.0, 1.0]], 
+[[-1.0, -6.0, -2.0], [-3.0, 2.0, -6.0]], [[-7.0, -2.0, -6.0], [-1.0, 3.0, 0.0]], [[6.0, -2.0, -2.0], [4.0, -1.0, -2.0]]], 
+[[[-2.0, -5.0, -6.0], [-7.0, 7.0, -5.0]], [[5.0, -5.0, 1.0], [-2.0, -4.0, 3.0]], [[2.0, -1.0, -4.0], [0.0, -2.0, -4.0]], [[0.0, 
+2.0, 4.0], [-6.0, -3.0, 6.0]], [[4.0, -4.0, 5.0], [7.0, 3.0, -3.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[-2.0, -4.0, 4.0], [7.0, 4.0, 3.0]], [[0.0, -6.0, 2.0], [-2.0, 0.0, -2.0]], [[3.0, 1.0, -4.0], [4.0, 
+-3.0, -6.0]], [[-4.0, -5.0, 3.0], [5.0, -5.0, 5.0]], [[0.0, 0.0, 0.0], [-2.0, 4.0, -5.0]]], [[[2.0, -1.0, 6.0], [-6.0, -4.0, 
+-1.0]], [[-5.0, 4.0, 3.0], [-6.0, -4.0, 4.0]], [[-6.0, 0.0, 4.0], [-5.0, 2.0, 2.0]], [[1.0, 0.0, 6.0], [-1.0, 1.0, -3.0]], 
+[[-5.0, 6.0, -3.0], [5.0, 1.0, 5.0]]], [[[7.0, 0.0, 2.0], [3.0, 6.0, -4.0]], [[4.0, 0.0, -3.0], [3.0, 0.0, -5.0]], [[-1.0, 
+-7.0, -3.0], [1.0, -5.0, 1.0]], [[5.0, 4.0, 0.0], [3.0, -6.0, -2.0]], [[0.0, -1.0, 6.0], [0.0, 3.0, 4.0]]], [[[4.0, 4.0, -5.0], 
+[-3.0, 2.0, -6.0]], [[-2.0, 1.0, 3.0], [-7.0, -7.0, 4.0]], [[-5.0, 7.0, -4.0], [-2.0, -5.0, 0.0]], [[7.0, -4.0, -2.0], [-2.0, 
+5.0, -1.0]], [[-4.0, 5.0, 0.0], [-3.0, 5.0, -3.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-20.0, -12.0, -63.0, 19.0, -19.0], [15.0, 92.0, 69.0, -17.0, 41.0], [-83.0, -64.0, -3.0, -41.0, 
+15.0], [-33.0, 76.0, 59.0, -50.0, 29.0]], [[16.0, -46.0, -42.0, -51.0, -6.0], [1.0, 5.0, -2.0, 19.0, 31.0], [69.0, -14.0, 
+-92.0, 15.0, 59.0], [12.0, -13.0, -32.0, 37.0, 19.0]], [[-75.0, -8.0, 8.0, -76.0, 27.0], [33.0, 27.0, 8.0, 11.0, -28.0], [6.0, 
+8.0, -36.0, 14.0, -22.0], [65.0, 27.0, 34.0, 15.0, 39.0]], [[50.0, 18.0, -25.0, -7.0, 27.0], [-11.0, -28.0, 23.0, 25.0, -10.0], 
+[42.0, -5.0, -24.0, -44.0, 34.0], [-12.0, -44.0, -53.0, 24.0, 24.0]], [[-80.0, -2.0, 24.0, -39.0, -11.0], [27.0, 5.0, -37.0, 
+-26.0, -39.0], [-11.0, 19.0, 25.0, 37.0, -38.0], [50.0, 40.0, 20.0, 41.0, -32.0]]], [[[-16.0, -24.0, 71.0, -19.0, 5.0], [42.0, 
+-14.0, -51.0, 58.0, -19.0], [62.0, 49.0, -52.0, 112.0, -8.0], [30.0, -10.0, 11.0, -35.0, -4.0]], [[-51.0, 6.0, 19.0, -22.0, 
+6.0], [75.0, 34.0, -1.0, 43.0, -52.0], [8.0, 8.0, -21.0, 56.0, -4.0], [22.0, 52.0, 17.0, -16.0, -1.0]], [[0.0, -8.0, -45.0, 
+-19.0, -17.0], [11.0, 4.0, -1.0, -9.0, -7.0], [23.0, -20.0, -17.0, -11.0, 37.0], [-3.0, 16.0, -39.0, 56.0, -21.0]], [[-27.0, 
+8.0, 29.0, -24.0, -8.0], [-20.0, -58.0, -61.0, -40.0, -33.0], [24.0, 36.0, 43.0, 12.0, -30.0], [38.0, -24.0, -33.0, 79.0, 
+-51.0]], [[27.0, -24.0, 4.0, 28.0, -33.0], [-43.0, -23.0, -34.0, -35.0, 44.0], [0.0, 4.0, 16.0, 12.0, 2.0], [-19.0, -21.0, 
+-6.0, 7.0, -35.0]]], [[[2.0, -18.0, -29.0, -62.0, 12.0], [-16.0, -25.0, -8.0, -3.0, 2.0], [60.0, 1.0, -50.0, -18.0, 29.0], 
+[33.0, -32.0, -43.0, 71.0, 15.0]], [[-77.0, 0.0, 8.0, -37.0, -5.0], [23.0, 22.0, -12.0, -27.0, -28.0], [-29.0, 4.0, 22.0, 13.0, 
+-35.0], [43.0, 46.0, 32.0, 27.0, -12.0]], [[-13.0, 50.0, 17.0, -27.0, 44.0], [8.0, -39.0, 5.0, 10.0, -68.0], [16.0, 23.0, 30.0, 
+-38.0, -24.0], [31.0, -27.0, -33.0, 43.0, 11.0]], [[3.0, 2.0, -12.0, 0.0, 14.0], [-54.0, 3.0, 29.0, -39.0, 39.0], [-46.0, 
+-13.0, 23.0, -64.0, -25.0], [3.0, -20.0, 32.0, -12.0, 36.0]], [[6.0, 4.0, 55.0, -5.0, -2.0], [-16.0, -72.0, -70.0, -5.0, 
+-27.0], [52.0, 52.0, 21.0, 44.0, -21.0], [24.0, -49.0, -39.0, 43.0, -45.0]]], [[[-36.0, 42.0, -6.0, -80.0, 67.0], [-16.0, 
+-34.0, 27.0, -9.0, -55.0], [15.0, 14.0, 8.0, -83.0, -30.0], [67.0, -39.0, -22.0, 72.0, 54.0]], [[-7.0, 30.0, -8.0, 33.0, 
+-27.0], [46.0, -2.0, -18.0, 0.0, -57.0], [-5.0, -4.0, 48.0, 17.0, 11.0], [-25.0, 42.0, -40.0, 34.0, -68.0]], [[-36.0, 6.0, 
+51.0, -25.0, 12.0], [-7.0, -34.0, -40.0, -12.0, -26.0], [10.0, 40.0, 23.0, 26.0, -45.0], [44.0, -19.0, 9.0, 20.0, -11.0]], 
+[[-28.0, -4.0, -65.0, 17.0, -30.0], [64.0, 92.0, 52.0, 9.0, -3.0], [-52.0, -60.0, -11.0, -4.0, 37.0], [-36.0, 101.0, 25.0, 
+-25.0, -5.0]], [[80.0, 26.0, 25.0, 24.0, 13.0], [-9.0, -87.0, -39.0, 39.0, -36.0], [89.0, 37.0, -2.0, 13.0, 31.0], [-22.0, 
+-79.0, -97.0, 38.0, -33.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_constData_rank2(self):
+      arg0=Data(numpy.array([[[[1.0, 4.0, 1.0], [-3.0, -3.0, 6.0]], [[-2.0, 6.0, 1.0], [-1.0, -1.0, 0.0]], [[-7.0, -6.0, 6.0], 
+[-1.0, 2.0, -7.0]], [[5.0, 3.0, 0.0], [1.0, 3.0, -4.0]], [[6.0, -3.0, -5.0], [3.0, -1.0, -3.0]]], [[[-1.0, 5.0, 5.0], [5.0, 
+2.0, 1.0]], [[0.0, 2.0, 1.0], [1.0, 4.0, 3.0]], [[-6.0, 2.0, 1.0], [-3.0, -4.0, -3.0]], [[3.0, -7.0, 0.0], [4.0, 7.0, -4.0]], 
+[[-1.0, 3.0, -2.0], [7.0, -5.0, 2.0]]], [[[5.0, -1.0, -5.0], [4.0, 6.0, 0.0]], [[-1.0, -2.0, -6.0], [1.0, 0.0, 0.0]], [[-6.0, 
+-3.0, 4.0], [0.0, 0.0, 2.0]], [[-7.0, -5.0, 5.0], [6.0, -7.0, 0.0]], [[-5.0, 0.0, 4.0], [-4.0, -1.0, -3.0]]], [[[3.0, -2.0, 
+1.0], [-1.0, -7.0, 7.0]], [[-6.0, 4.0, 6.0], [-6.0, 0.0, 4.0]], [[4.0, 0.0, 3.0], [6.0, 7.0, -1.0]], [[-5.0, 0.0, 3.0], [4.0, 
+-3.0, 1.0]], [[6.0, -1.0, 5.0], [-7.0, 5.0, 3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[3.0, 6.0, 6.0], [-5.0, 3.0, -1.0]]),self.functionspace)
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[33.0, 38.0, -3.0, 41.0, -45.0], [37.0, 22.0, 6.0, -28.0, -49.0], [-23.0, -56.0, -14.0, -72.0, 
+29.0], [-20.0, 68.0, 22.0, -27.0, 89.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_constData_rank3(self):
+      arg0=Data(numpy.array([[[[-7.0, -5.0, -3.0], [-5.0, 3.0, -5.0]], [[7.0, 6.0, 1.0], [-3.0, 3.0, -5.0]], [[2.0, -6.0, 5.0], 
+[-1.0, 1.0, -2.0]], [[5.0, -7.0, -1.0], [2.0, -4.0, 1.0]], [[-5.0, -1.0, 7.0], [2.0, 7.0, -5.0]]], [[[-5.0, 4.0, 0.0], [4.0, 
+4.0, 7.0]], [[0.0, 1.0, -5.0], [0.0, 4.0, -7.0]], [[7.0, 6.0, -2.0], [-1.0, 0.0, 6.0]], [[1.0, -6.0, -4.0], [-1.0, 3.0, -7.0]], 
+[[-1.0, -2.0, -5.0], [-6.0, -2.0, 1.0]]], [[[7.0, 0.0, -5.0], [5.0, 0.0, 0.0]], [[0.0, -6.0, -7.0], [0.0, -2.0, 2.0]], [[-5.0, 
+0.0, -3.0], [-2.0, 6.0, 6.0]], [[2.0, 1.0, -3.0], [-6.0, 5.0, 3.0]], [[0.0, 0.0, -1.0], [-3.0, 7.0, -7.0]]], [[[-4.0, 6.0, 
+7.0], [-7.0, 0.0, 7.0]], [[0.0, 2.0, -2.0], [7.0, 6.0, -5.0]], [[0.0, -4.0, -5.0], [7.0, 4.0, 0.0]], [[5.0, 2.0, 7.0], [-1.0, 
+-2.0, -7.0]], [[7.0, 4.0, -6.0], [3.0, 6.0, 3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-3.0, -7.0, 2.0], [1.0, 4.0, 3.0]], [[-5.0, -1.0, 0.0], [5.0, 2.0, 3.0]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[42.0, 6.0], [-67.0, -65.0], [43.0, -13.0], [21.0, -13.0], [51.0, 35.0]], [[28.0, 70.0], [-22.0, 
+-14.0], [-50.0, -28.0], [21.0, -19.0], [-4.0, -24.0]], [[-26.0, -10.0], [26.0, 8.0], [49.0, 45.0], [4.0, -22.0], [2.0, -22.0]], 
+[[-2.0, 0.0], [-2.0, 30.0], [41.0, 47.0], [-45.0, -57.0], [-25.0, -3.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_constData_rank4(self):
+      arg0=Data(numpy.array([[[[-2.0, 0.0, -2.0], [-5.0, 3.0, -2.0]], [[4.0, 2.0, 0.0], [-7.0, -2.0, -7.0]], [[-7.0, 0.0, 
+-2.0], [2.0, -4.0, 1.0]], [[2.0, -3.0, -7.0], [-1.0, -4.0, -3.0]], [[-3.0, 5.0, 2.0], [7.0, 0.0, 7.0]]], [[[-4.0, 4.0, 0.0], 
+[-5.0, 4.0, 7.0]], [[-5.0, 7.0, -7.0], [-2.0, -4.0, -5.0]], [[-6.0, -3.0, 0.0], [7.0, -1.0, -6.0]], [[3.0, -7.0, 4.0], [-1.0, 
+2.0, -3.0]], [[4.0, -2.0, -2.0], [0.0, -1.0, 0.0]]], [[[-7.0, -6.0, 0.0], [-1.0, 1.0, 0.0]], [[7.0, -2.0, -6.0], [-3.0, 3.0, 
+0.0]], [[3.0, 6.0, 2.0], [7.0, -3.0, 4.0]], [[-2.0, 7.0, -4.0], [-4.0, -5.0, -4.0]], [[-1.0, 1.0, 5.0], [-7.0, 2.0, -7.0]]], 
+[[[1.0, -2.0, 6.0], [-1.0, 5.0, -4.0]], [[0.0, 0.0, -5.0], [-5.0, -7.0, 5.0]], [[0.0, -5.0, 7.0], [3.0, 7.0, 2.0]], [[3.0, 7.0, 
+6.0], [-3.0, -5.0, 0.0]], [[7.0, -3.0, -7.0], [-3.0, 0.0, -4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[2.0, -6.0, -3.0], [7.0, 0.0, 4.0]], [[4.0, -5.0, 3.0], [-1.0, -1.0, 0.0]], [[-7.0, 1.0, 0.0], 
+[4.0, 0.0, 6.0]], [[-3.0, -3.0, -4.0], [-6.0, 4.0, 0.0]], [[6.0, 1.0, -7.0], [-6.0, -1.0, 6.0]]], [[[6.0, 2.0, 7.0], [5.0, 1.0, 
+1.0]], [[4.0, 3.0, 4.0], [3.0, 5.0, -1.0]], [[-3.0, 3.0, -5.0], [-7.0, -4.0, 6.0]], [[-2.0, 7.0, 3.0], [4.0, 5.0, -7.0]], 
+[[-6.0, 0.0, -4.0], [-5.0, 2.0, 6.0]]], [[[3.0, 4.0, 5.0], [-4.0, -7.0, -7.0]], [[-3.0, -1.0, -5.0], [0.0, -6.0, 4.0]], [[-3.0, 
+3.0, 0.0], [-4.0, 4.0, 1.0]], [[4.0, 2.0, -4.0], [-7.0, -6.0, 4.0]], [[-6.0, 0.0, 0.0], [7.0, -5.0, 1.0]]], [[[0.0, 5.0, -7.0], 
+[3.0, 5.0, -7.0]], [[4.0, 3.0, -6.0], [-5.0, 0.0, 2.0]], [[-5.0, 6.0, -4.0], [-4.0, 0.0, 7.0]], [[-3.0, -4.0, 4.0], [0.0, 6.0, 
+2.0]], [[3.0, 6.0, -5.0], [6.0, 1.0, 0.0]]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-41.0, -12.0, -18.0, 56.0, 17.0], [-50.0, -14.0, 27.0, 7.0, 39.0], [-3.0, -10.0, 36.0, 9.0, 
+-40.0], [28.0, 25.0, 24.0, 12.0, -23.0]], [[-81.0, 15.0, -96.0, 16.0, 28.0], [-16.0, -2.0, 9.0, 17.0, -35.0], [111.0, -30.0, 
+7.0, 53.0, -70.0], [28.0, 43.0, -29.0, -46.0, -20.0]], [[10.0, -32.0, 63.0, 1.0, -30.0], [-49.0, -51.0, 39.0, -11.0, 38.0], 
+[-18.0, 59.0, -2.0, -6.0, 77.0], [-7.0, -24.0, 42.0, -9.0, -3.0]], [[24.0, 7.0, -39.0, 21.0, 50.0], [-55.0, -49.0, 25.0, -49.0, 
+-5.0], [12.0, 44.0, -30.0, 49.0, -2.0], [32.0, 40.0, -17.0, -52.0, 13.0]], [[35.0, -38.0, 96.0, -56.0, -27.0], [48.0, 25.0, 
+7.0, 26.0, 17.0], [-56.0, 22.0, 3.0, -31.0, 74.0], [-17.0, -30.0, 58.0, 11.0, 53.0]]], [[[-39.0, -35.0, 54.0, 46.0, 48.0], 
+[-30.0, -6.0, 85.0, -13.0, 99.0], [-53.0, 12.0, 67.0, 31.0, -24.0], [-24.0, 35.0, 113.0, 34.0, -14.0]], [[-65.0, -70.0, 4.0, 
+18.0, 12.0], [-84.0, -48.0, 71.0, 45.0, 30.0], [49.0, 47.0, 23.0, 40.0, 31.0], [93.0, 43.0, 68.0, -75.0, 46.0]], [[31.0, -15.0, 
+31.0, -19.0, -116.0], [-14.0, -11.0, -72.0, 56.0, -37.0], [-9.0, 3.0, -29.0, -97.0, 84.0], [43.0, -80.0, -58.0, 12.0, 5.0]], 
+[[17.0, 58.0, -50.0, 10.0, -31.0], [26.0, 17.0, -69.0, -16.0, -43.0], [12.0, -46.0, -21.0, -35.0, -38.0], [-35.0, -34.0, -90.0, 
+41.0, -57.0]], [[26.0, 21.0, -30.0, -2.0, 37.0], [5.0, -3.0, -4.0, -33.0, -18.0], [1.0, 6.0, -22.0, 26.0, -19.0], [-1.0, 22.0, 
+-24.0, -18.0, 9.0]]], [[[15.0, 2.0, 39.0, 49.0, -43.0], [-58.0, -44.0, 6.0, -27.0, 49.0], [-48.0, 21.0, 11.0, -39.0, 30.0], 
+[-28.0, -41.0, 3.0, 51.0, -62.0]], [[23.0, 20.0, -63.0, 39.0, 97.0], [-16.0, 4.0, 12.0, -43.0, 3.0], [-26.0, -7.0, -3.0, 51.0, 
+-78.0], [38.0, 73.0, -11.0, -19.0, 24.0]], [[29.0, -16.0, 37.0, -89.0, -5.0], [80.0, 40.0, -14.0, 27.0, -43.0], [8.0, 9.0, 
+-27.0, 1.0, 50.0], [-6.0, -9.0, 13.0, -35.0, 74.0]], [[-78.0, -46.0, -19.0, 5.0, 28.0], [-55.0, -36.0, 71.0, 28.0, 14.0], 
+[81.0, 33.0, 19.0, 64.0, 5.0], [54.0, 49.0, 56.0, -76.0, 27.0]], [[-100.0, 11.0, -62.0, 30.0, -42.0], [-9.0, 15.0, -20.0, 55.0, 
+-17.0], [89.0, -63.0, 35.0, -13.0, -60.0], [8.0, -10.0, -30.0, 17.0, -62.0]]], [[[-27.0, 28.0, -37.0, 5.0, -61.0], [40.0, 48.0, 
+-76.0, 51.0, -39.0], [22.0, -77.0, 11.0, -63.0, -42.0], [-2.0, -41.0, -65.0, 51.0, -40.0]], [[0.0, -3.0, 10.0, 22.0, 102.0], 
+[-62.0, -75.0, 118.0, -105.0, 61.0], [9.0, 87.0, -3.0, 117.0, 5.0], [-50.0, 65.0, 75.0, -52.0, -12.0]], [[38.0, 36.0, 19.0, 
+-3.0, -67.0], [63.0, 55.0, -87.0, 19.0, -17.0], [-60.0, -64.0, 3.0, -93.0, -12.0], [-44.0, -68.0, -56.0, 94.0, -40.0]], 
+[[-75.0, 3.0, -26.0, -56.0, 6.0], [54.0, 23.0, 23.0, 24.0, -37.0], [114.0, -16.0, 4.0, 53.0, -14.0], [-41.0, 12.0, 15.0, -43.0, 
+-2.0]], [[16.0, 25.0, -88.0, 34.0, 82.0], [-32.0, -14.0, 2.0, -40.0, -23.0], [14.0, 1.0, -22.0, 55.0, -67.0], [53.0, 68.0, 
+-41.0, -45.0, 20.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_expandedData_rank2(self):
+      arg0=Data(numpy.array([[[[-4.0, -2.0, -1.0], [-1.0, 1.0, -4.0]], [[6.0, -2.0, 4.0], [1.0, 1.0, 0.0]], [[5.0, -1.0, 6.0], 
+[5.0, 1.0, 6.0]], [[4.0, -3.0, -1.0], [-6.0, -5.0, -2.0]], [[7.0, -6.0, -5.0], [4.0, -3.0, 1.0]]], [[[6.0, 3.0, -3.0], [3.0, 
+6.0, 5.0]], [[-4.0, 1.0, 5.0], [7.0, 7.0, 5.0]], [[4.0, 1.0, 1.0], [6.0, 6.0, 6.0]], [[1.0, -4.0, -7.0], [6.0, 3.0, 0.0]], 
+[[-7.0, 0.0, 6.0], [1.0, 3.0, -3.0]]], [[[7.0, 2.0, -5.0], [2.0, -1.0, 4.0]], [[1.0, 1.0, -3.0], [1.0, -3.0, 1.0]], [[-7.0, 
+2.0, -6.0], [3.0, -7.0, -4.0]], [[7.0, 3.0, 7.0], [-1.0, -7.0, 4.0]], [[-5.0, -6.0, -4.0], [0.0, 5.0, 5.0]]], [[[-7.0, -5.0, 
+4.0], [2.0, -2.0, -3.0]], [[2.0, -2.0, -2.0], [4.0, 3.0, 0.0]], [[-6.0, 4.0, -7.0], [-6.0, -4.0, -5.0]], [[5.0, 0.0, -4.0], 
+[5.0, -4.0, 1.0]], [[0.0, -5.0, 3.0], [-1.0, -1.0, -6.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, -1.0, -4.0], [2.0, 6.0, -6.0]])+(1.-msk_arg1)*numpy.array([[6.0, 5.0, 6.0], [-7.0, 7.0, 
+6.0]])
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[58.0, -42.0, -73.0, -47.0, -32.0], [-15.0, 29.0, -17.0, 56.0, 56.0], [-50.0, -17.0, 52.0, 
+-141.0, 52.0], [41.0, 24.0, 54.0, -34.0, 21.0]])+(1.-msk_ref)*numpy.array([[-50.0, 50.0, 69.0, -2.0, -61.0], [84.0, 41.0, 71.0, 
+-77.0, -10.0], [25.0, -29.0, -162.0, 81.0, -19.0], [-89.0, -17.0, -74.0, -51.0, -43.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_expandedData_rank3(self):
+      arg0=Data(numpy.array([[[[-4.0, 5.0, 7.0], [-2.0, -5.0, 4.0]], [[-3.0, -1.0, -3.0], [-6.0, 3.0, 6.0]], [[3.0, -3.0, 3.0], 
+[-2.0, -1.0, -6.0]], [[3.0, -6.0, -1.0], [0.0, -7.0, 1.0]], [[1.0, 6.0, -3.0], [-4.0, 0.0, -7.0]]], [[[-1.0, 5.0, 3.0], [-7.0, 
+-7.0, -5.0]], [[-6.0, 3.0, -4.0], [-6.0, 1.0, -3.0]], [[-4.0, 3.0, 1.0], [5.0, -4.0, -7.0]], [[4.0, 4.0, 1.0], [4.0, 0.0, 
+7.0]], [[5.0, -2.0, 4.0], [4.0, 4.0, 4.0]]], [[[7.0, 0.0, -6.0], [0.0, 5.0, 6.0]], [[-7.0, 7.0, 1.0], [-6.0, 0.0, -5.0]], 
+[[-4.0, 4.0, -1.0], [-3.0, -5.0, -6.0]], [[-5.0, 3.0, -2.0], [0.0, 6.0, 7.0]], [[-3.0, -6.0, 7.0], [-6.0, 0.0, -6.0]]], [[[2.0, 
+-6.0, 1.0], [-5.0, 1.0, -2.0]], [[-7.0, 3.0, 6.0], [-2.0, 1.0, -1.0]], [[4.0, 6.0, 3.0], [-4.0, -1.0, 6.0]], [[2.0, 3.0, 5.0], 
+[-3.0, -6.0, 7.0]], [[1.0, 6.0, 3.0], [-3.0, 0.0, 2.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[2.0, -5.0, -7.0], [-4.0, -3.0, 4.0]], [[7.0, -5.0, 5.0], [7.0, 3.0, 
+-6.0]]])+(1.-msk_arg1)*numpy.array([[[4.0, -3.0, 5.0], [7.0, 6.0, 3.0]], [[-6.0, -4.0, -3.0], [-5.0, 1.0, 1.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-43.0, -71.0], [59.0, -100.0], [-13.0, 70.0], [68.0, 19.0], [-19.0, -24.0]], [[-19.0, -57.0], 
+[10.0, -98.0], [-66.0, 27.0], [-7.0, -1.0], [-20.0, 81.0]], [[65.0, -2.0], [-52.0, -91.0], [-18.0, -53.0], [-1.0, -84.0], 
+[-25.0, 38.0]], [[36.0, 29.0], [-70.0, -39.0], [0.0, -54.0], [12.0, -57.0], [-29.0, 
+-41.0]]])+(1.-msk_ref)*numpy.array([[[-28.0, -8.0], [-30.0, 70.0], [-2.0, -12.0], [-14.0, 3.0], [-78.0, -8.0]], [[-110.0, 0.0], 
+[-98.0, 64.0], [-30.0, -27.0], [58.0, -56.0], [110.0, -46.0]], [[46.0, -13.0], [-101.0, 36.0], [-102.0, 15.0], [18.0, 37.0], 
+[-19.0, 45.0]], [[-4.0, 33.0], [-18.0, 22.0], [-3.0, -32.0], [-12.0, -23.0], [-14.0, -22.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_constData_rank4_expandedData_rank4(self):
+      arg0=Data(numpy.array([[[[-6.0, 6.0, -1.0], [-1.0, 4.0, 4.0]], [[-3.0, -1.0, -6.0], [1.0, -1.0, -4.0]], [[-7.0, -4.0, 
+-7.0], [-6.0, 0.0, 0.0]], [[1.0, 3.0, 3.0], [-4.0, 7.0, -5.0]], [[-5.0, 2.0, 0.0], [-1.0, 7.0, -5.0]]], [[[1.0, 0.0, 5.0], 
+[-4.0, 1.0, 3.0]], [[1.0, 1.0, -1.0], [-3.0, -6.0, -1.0]], [[0.0, 6.0, 7.0], [-7.0, -7.0, 3.0]], [[4.0, -1.0, -1.0], [2.0, 5.0, 
+0.0]], [[-6.0, 3.0, 0.0], [-2.0, -1.0, 5.0]]], [[[4.0, 4.0, 2.0], [0.0, 5.0, 0.0]], [[-7.0, -6.0, -7.0], [4.0, 0.0, -4.0]], 
+[[0.0, -3.0, -7.0], [0.0, 6.0, 1.0]], [[0.0, -1.0, 2.0], [-7.0, -7.0, 2.0]], [[3.0, -4.0, 3.0], [-4.0, -1.0, -7.0]]], [[[6.0, 
+-5.0, 5.0], [4.0, -6.0, -3.0]], [[-2.0, -2.0, -1.0], [7.0, -1.0, 6.0]], [[-4.0, -4.0, 6.0], [1.0, 6.0, -4.0]], [[5.0, -1.0, 
+5.0], [0.0, -2.0, 4.0]], [[-3.0, -5.0, 1.0], [0.0, -1.0, 0.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-3.0, -6.0, 2.0], [6.0, -1.0, -5.0]], [[-3.0, -4.0, 0.0], [-6.0, -1.0, 7.0]], [[-7.0, 0.0, 
+-5.0], [-3.0, 1.0, 0.0]], [[-5.0, 3.0, 0.0], [-3.0, 1.0, -2.0]], [[-5.0, -6.0, 5.0], [-4.0, -6.0, 3.0]]], [[[7.0, -3.0, 0.0], 
+[6.0, 1.0, 7.0]], [[-3.0, 7.0, -3.0], [2.0, -2.0, 5.0]], [[-6.0, 4.0, 1.0], [1.0, 0.0, -4.0]], [[-7.0, 0.0, 4.0], [2.0, -5.0, 
+-1.0]], [[0.0, -5.0, 0.0], [-1.0, -6.0, -2.0]]], [[[-3.0, 0.0, -7.0], [6.0, 5.0, -1.0]], [[2.0, 4.0, -5.0], [6.0, 3.0, 4.0]], 
+[[4.0, -5.0, 4.0], [-4.0, 3.0, 0.0]], [[7.0, 5.0, 0.0], [2.0, 0.0, -3.0]], [[-4.0, 1.0, -5.0], [0.0, -3.0, -3.0]]], [[[1.0, 
+-4.0, 4.0], [2.0, 0.0, 0.0]], [[-4.0, -3.0, 3.0], [5.0, 2.0, 0.0]], [[-7.0, 5.0, -2.0], [0.0, -2.0, -5.0]], [[-2.0, -4.0, 3.0], 
+[-1.0, 6.0, 4.0]], [[-6.0, 6.0, 7.0], [7.0, -6.0, -7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 3.0, 3.0], [2.0, -7.0, -3.0]], 
+[[6.0, 6.0, 5.0], [4.0, 1.0, -1.0]], [[-7.0, 6.0, 2.0], [-7.0, -6.0, -1.0]], [[4.0, 2.0, 3.0], [4.0, 5.0, 3.0]], [[4.0, -3.0, 
+-7.0], [-6.0, -1.0, -6.0]]], [[[-3.0, -2.0, 7.0], [-4.0, -7.0, 0.0]], [[-2.0, 5.0, -7.0], [4.0, 5.0, 0.0]], [[0.0, -6.0, 4.0], 
+[0.0, -6.0, -5.0]], [[2.0, 7.0, 5.0], [-5.0, -4.0, -2.0]], [[6.0, -7.0, 4.0], [4.0, 0.0, 6.0]]], [[[6.0, 3.0, -5.0], [7.0, 2.0, 
+0.0]], [[3.0, 4.0, 4.0], [0.0, 5.0, 0.0]], [[-7.0, 3.0, -1.0], [0.0, -3.0, -6.0]], [[3.0, 7.0, 1.0], [3.0, -4.0, -3.0]], [[3.0, 
+7.0, 2.0], [-7.0, 7.0, -2.0]]], [[[7.0, 5.0, 7.0], [-5.0, 6.0, 5.0]], [[7.0, -3.0, 0.0], [6.0, 5.0, 0.0]], [[-7.0, 5.0, -5.0], 
+[-1.0, -1.0, -6.0]], [[2.0, -2.0, 3.0], [7.0, 5.0, -1.0]], [[-4.0, 0.0, -2.0], [7.0, 1.0, 1.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-50.0, 24.0, 54.0, 47.0, -19.0], [-34.0, 73.0, 42.0, 12.0, -61.0], [35.0, 39.0, -42.0, -26.0, 
+11.0], [-36.0, 6.0, 46.0, 26.0, 6.0]], [[30.0, -20.0, 47.0, 16.0, -19.0], [-41.0, 4.0, 25.0, 8.0, 18.0], [56.0, 7.0, -38.0, 
+-12.0, 56.0], [-21.0, 0.0, 50.0, -31.0, 11.0]], [[-5.0, 73.0, 102.0, 41.0, 48.0], [-73.0, 2.0, 13.0, 9.0, 26.0], [34.0, -31.0, 
+-12.0, -81.0, 59.0], [-31.0, -11.0, 43.0, 15.0, -73.0]], [[-21.0, -33.0, -3.0, 33.0, -49.0], [-54.0, -38.0, 25.0, -33.0, 
+-43.0], [-8.0, -24.0, 38.0, 29.0, -22.0], [-7.0, -10.0, 13.0, 21.0, -2.0]], [[15.0, -29.0, 45.0, 51.0, -40.0], [-75.0, -12.0, 
+57.0, 3.0, -41.0], [49.0, -7.0, -5.0, -12.0, 16.0], [-15.0, 23.0, 56.0, 25.0, 28.0]]], [[[-33.0, 41.0, -19.0, 2.0, 39.0], [5.0, 
+-13.0, -17.0, -3.0, -8.0], [-60.0, -32.0, 43.0, -10.0, -41.0], [13.0, -7.0, -34.0, 35.0, -26.0]], [[-18.0, 10.0, 1.0, 3.0, 
+29.0], [-27.0, 8.0, -2.0, 14.0, 36.0], [-43.0, -29.0, -11.0, 9.0, 23.0], [-13.0, -37.0, 17.0, -46.0, 15.0]], [[-72.0, 46.0, 
+-21.0, 26.0, 78.0], [-46.0, 36.0, 12.0, 46.0, 13.0], [-129.0, -62.0, 5.0, 7.0, -17.0], [-10.0, -46.0, 15.0, -26.0, 57.0]], 
+[[-1.0, -25.0, -24.0, -24.0, -57.0], [48.0, -22.0, -27.0, -53.0, -27.0], [32.0, 36.0, 24.0, 27.0, -27.0], [8.0, 4.0, -41.0, 
+21.0, -53.0]], [[-36.0, 54.0, 47.0, 34.0, 41.0], [-29.0, 62.0, 26.0, 38.0, -17.0], [-4.0, 5.0, -34.0, -46.0, 15.0], [-22.0, 
+3.0, 34.0, 16.0, 11.0]]], [[[-37.0, -33.0, -33.0, -3.0, -64.0], [21.0, 0.0, -6.0, -45.0, -50.0], [-1.0, 29.0, 19.0, 48.0, 
+-37.0], [-4.0, -12.0, -22.0, 12.0, -16.0]], [[87.0, -7.0, 72.0, 13.0, 8.0], [-35.0, -12.0, 31.0, 33.0, 34.0], [98.0, 5.0, 
+-42.0, -59.0, 69.0], [-3.0, 45.0, 53.0, -3.0, 13.0]], [[-7.0, 13.0, 41.0, -5.0, -50.0], [22.0, -7.0, -23.0, -59.0, -23.0], 
+[78.0, 45.0, 5.0, -18.0, 11.0], [-16.0, 0.0, -18.0, 31.0, -110.0]], [[-35.0, 67.0, 4.0, 7.0, 92.0], [-32.0, -3.0, -17.0, 27.0, 
+50.0], [-93.0, -69.0, 20.0, -25.0, 4.0], [-2.0, -40.0, -5.0, -17.0, -13.0]], [[33.0, -17.0, -25.0, -2.0, 25.0], [-41.0, -87.0, 
+-7.0, -5.0, 44.0], [-52.0, -80.0, 57.0, 14.0, -7.0], [23.0, -13.0, -10.0, -11.0, 6.0]]], [[[67.0, -37.0, -85.0, -57.0, 36.0], 
+[54.0, -63.0, -35.0, 19.0, 63.0], [-56.0, -39.0, 35.0, 34.0, -27.0], [54.0, 14.0, -50.0, -29.0, 54.0]], [[29.0, 15.0, -3.0, 
+-30.0, 13.0], [75.0, 41.0, -14.0, 23.0, -3.0], [44.0, 56.0, -33.0, -28.0, -4.0], [16.0, 44.0, -22.0, 20.0, 6.0]], [[68.0, 
+-12.0, 1.0, 19.0, 22.0], [-32.0, -64.0, 31.0, 28.0, -9.0], [10.0, -46.0, 42.0, -34.0, -24.0], [38.0, 63.0, 4.0, 61.0, 41.0]], 
+[[-17.0, 19.0, -62.0, -38.0, 30.0], [64.0, -13.0, -45.0, -9.0, 9.0], [-64.0, -9.0, 39.0, 18.0, -52.0], [29.0, -6.0, -66.0, 
+13.0, -17.0]], [[42.0, 30.0, 15.0, -1.0, 56.0], [-7.0, -27.0, -1.0, 30.0, 31.0], [-3.0, -34.0, 14.0, -46.0, 5.0], [21.0, 28.0, 
+-4.0, 23.0, 1.0]]]])+(1.-msk_ref)*numpy.array([[[[15.0, -9.0, 55.0, 13.0, -57.0], [-25.0, 65.0, -84.0, 6.0, -62.0], [-12.0, 
+22.0, 25.0, -8.0, 49.0], [30.0, -46.0, 50.0, -18.0, 27.0]], [[21.0, -47.0, 6.0, -45.0, 52.0], [-28.0, 42.0, 8.0, -36.0, -55.0], 
+[14.0, -42.0, 51.0, -3.0, -34.0], [-99.0, -17.0, 70.0, -16.0, 26.0]], [[4.0, -125.0, 53.0, -81.0, 69.0], [4.0, 19.0, -4.0, 
+-47.0, -66.0], [-61.0, -65.0, 44.0, -74.0, -21.0], [-88.0, -73.0, 70.0, -69.0, 0.0]], [[-31.0, 35.0, 8.0, 23.0, 21.0], [-21.0, 
+11.0, -23.0, 40.0, -49.0], [-14.0, 62.0, 8.0, 2.0, 117.0], [80.0, 9.0, 20.0, 17.0, -36.0]], [[5.0, -10.0, 17.0, 0.0, 3.0], 
+[-34.0, 51.0, -29.0, -9.0, -78.0], [-17.0, 28.0, 50.0, -17.0, 65.0], [-3.0, -12.0, 69.0, 19.0, 15.0]]], [[[-16.0, 13.0, 22.0, 
+17.0, -26.0], [41.0, -48.0, -1.0, 37.0, 28.0], [-45.0, 28.0, -33.0, -17.0, 42.0], [83.0, -12.0, -47.0, -9.0, -38.0]], [[32.0, 
+-10.0, 55.0, -42.0, 38.0], [42.0, -32.0, 31.0, 45.0, -23.0], [-19.0, -27.0, 21.0, 27.0, -11.0], [-21.0, -44.0, 18.0, -53.0, 
+-30.0]], [[65.0, 33.0, 138.0, -21.0, -36.0], [114.0, -82.0, 19.0, 134.0, -24.0], [-80.0, 17.0, 14.0, 47.0, 50.0], [87.0, -95.0, 
+-9.0, -78.0, -67.0]], [[-65.0, 26.0, -80.0, 44.0, 9.0], [-60.0, 27.0, -28.0, -34.0, 35.0], [50.0, 29.0, -45.0, -10.0, 24.0], 
+[36.0, 68.0, -35.0, 46.0, 5.0]], [[39.0, -32.0, 75.0, -16.0, -50.0], [27.0, 14.0, -37.0, 13.0, -35.0], [-43.0, -11.0, 24.0, 
+-14.0, 0.0], [2.0, -68.0, 30.0, -42.0, 14.0]]], [[[-45.0, 63.0, -30.0, 55.0, -15.0], [-41.0, 23.0, -46.0, 26.0, 4.0], [36.0, 
+61.0, -33.0, 22.0, 79.0], [92.0, 41.0, -23.0, 31.0, -15.0]], [[30.0, -93.0, -25.0, -57.0, 39.0], [-32.0, 49.0, 28.0, -103.0, 
+-36.0], [3.0, -73.0, 62.0, -46.0, -97.0], [-168.0, -7.0, 74.0, 9.0, 66.0]], [[-75.0, -48.0, -69.0, 6.0, 46.0], [-85.0, 64.0, 
+-51.0, -82.0, -1.0], [38.0, -10.0, -26.0, -55.0, 5.0], [-23.0, 39.0, 8.0, 14.0, 21.0]], [[32.0, -33.0, 87.0, -53.0, 26.0], 
+[93.0, -82.0, 46.0, 62.0, -1.0], [-76.0, -31.0, 4.0, -4.0, -7.0], [12.0, -74.0, -13.0, -78.0, -58.0]], [[-4.0, -1.0, 2.0, 
+-29.0, 70.0], [43.0, -68.0, 77.0, 31.0, 0.0], [-39.0, 0.0, 9.0, -3.0, 22.0], [1.0, 4.0, -9.0, -3.0, -54.0]]], [[[17.0, 44.0, 
+-51.0, 6.0, 4.0], [53.0, -86.0, 101.0, 12.0, 89.0], [12.0, -12.0, -26.0, 33.0, -71.0], [-19.0, 51.0, -72.0, 38.0, -15.0]], 
+[[8.0, -8.0, -49.0, 26.0, -72.0], [-18.0, 24.0, -16.0, -66.0, 62.0], [34.0, -23.0, -24.0, -14.0, -90.0], [-42.0, 29.0, -33.0, 
+35.0, 64.0]], [[6.0, -4.0, -23.0, 16.0, -34.0], [16.0, -20.0, 32.0, -27.0, 8.0], [-47.0, 26.0, 16.0, -43.0, 15.0], [5.0, 20.0, 
+-5.0, 59.0, 13.0]], [[-21.0, 43.0, -23.0, 35.0, -34.0], [36.0, -60.0, 18.0, 28.0, 81.0], [-2.0, 21.0, -61.0, 9.0, -4.0], [73.0, 
+28.0, -87.0, 13.0, -28.0]], [[16.0, -44.0, -1.0, -24.0, -3.0], [33.0, -31.0, 40.0, -32.0, 21.0], [-40.0, -30.0, 8.0, -39.0, 
+-49.0], [-45.0, -11.0, -8.0, 2.0, 9.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=tensor_transposed_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank2_array_rank1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-5.0, -6.0, -4.0], [-4.0, -3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[6.0, 6.0, 1.0], [-2.0, 
+3.0, -5.0]])
+      arg1=numpy.array([0.0, 7.0, 4.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-58.0, -21.0])+(1.-msk_ref)*numpy.array([46.0, 1.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank2_array_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[2.0, 5.0, 0.0], [-1.0, 5.0, -6.0]])+(1.-msk_arg0)*numpy.array([[5.0, -2.0, -6.0], [0.0, 2.0, 
+-6.0]])
+      arg1=numpy.array([[1.0, -2.0, 0.0], [-4.0, 5.0, -2.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-8.0, 17.0], [-11.0, 41.0]])+(1.-msk_ref)*numpy.array([[9.0, -18.0], [-4.0, 22.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank2_constData_rank1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, 4.0, -3.0], [4.0, -1.0, -6.0]])+(1.-msk_arg0)*numpy.array([[1.0, 7.0, 3.0], [-1.0, -6.0, 
+-2.0]])
+      arg1=Data(numpy.array([6.0, 7.0, 6.0]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([40.0, -19.0])+(1.-msk_ref)*numpy.array([73.0, -60.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank2_constData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 7.0, 0.0], [0.0, -6.0, -6.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0, -7.0], [4.0, -5.0, 
+-5.0]])
+      arg1=Data(numpy.array([[-5.0, 5.0, 1.0], [3.0, -1.0, 0.0]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[15.0, 5.0], [-36.0, 6.0]])+(1.-msk_ref)*numpy.array([[23.0, -6.0], [-50.0, 17.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank2_expandedData_rank1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 0.0, 7.0], [0.0, 2.0, 2.0]])+(1.-msk_arg0)*numpy.array([[1.0, -7.0, -1.0], [-2.0, 4.0, 
+1.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([4.0, -2.0, 1.0])+(1.-msk_arg1)*numpy.array([3.0, -1.0, 1.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([23.0, -2.0])+(1.-msk_ref)*numpy.array([9.0, -9.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank2_expandedData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-3.0, 1.0, 4.0], [0.0, 0.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 0.0, -6.0], [0.0, 6.0, 
+5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, 1.0, 4.0], [-7.0, 1.0, 4.0]])+(1.-msk_arg1)*numpy.array([[2.0, 0.0, -2.0], [-3.0, 6.0, 
+-1.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[32.0, 38.0], [28.0, 28.0]])+(1.-msk_ref)*numpy.array([[0.0, 24.0], [-10.0, 31.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_array_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-1.0, -7.0, 7.0], [5.0, 6.0, -3.0]], [[-6.0, 2.0, 2.0], [1.0, -4.0, 6.0]], [[0.0, 5.0, 
+0.0], [6.0, 5.0, -2.0]], [[2.0, -4.0, -7.0], [7.0, 1.0, 7.0]], [[-4.0, -1.0, 2.0], [5.0, 1.0, -3.0]]], [[[-6.0, -3.0, 4.0], 
+[7.0, 5.0, 5.0]], [[-7.0, 7.0, 3.0], [5.0, 4.0, 1.0]], [[-6.0, -7.0, 0.0], [-1.0, -5.0, -3.0]], [[-2.0, -4.0, 2.0], [3.0, 1.0, 
+6.0]], [[-1.0, -6.0, -7.0], [3.0, 3.0, 0.0]]], [[[-2.0, -2.0, 3.0], [-2.0, 0.0, -5.0]], [[-3.0, -6.0, 6.0], [1.0, -5.0, 3.0]], 
+[[0.0, 0.0, -7.0], [-3.0, 2.0, -5.0]], [[-1.0, 2.0, 7.0], [4.0, -5.0, 6.0]], [[6.0, -3.0, -3.0], [4.0, -4.0, 7.0]]], [[[-1.0, 
+4.0, 7.0], [6.0, -7.0, -6.0]], [[0.0, 4.0, -1.0], [3.0, 1.0, -6.0]], [[-1.0, 5.0, 2.0], [-5.0, 0.0, 3.0]], [[-7.0, 2.0, -1.0], 
+[-6.0, 1.0, -5.0]], [[-2.0, -2.0, -2.0], [-2.0, -1.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 0.0, 0.0], [1.0, -3.0, 
+4.0]], [[3.0, -2.0, 5.0], [7.0, 0.0, -2.0]], [[6.0, -6.0, 5.0], [5.0, -6.0, -4.0]], [[6.0, -7.0, -5.0], [-1.0, -1.0, 0.0]], 
+[[-3.0, 5.0, -6.0], [-7.0, 1.0, -3.0]]], [[[-2.0, 0.0, -5.0], [5.0, 5.0, -4.0]], [[4.0, -3.0, -7.0], [1.0, -2.0, -5.0]], [[4.0, 
+-3.0, -7.0], [4.0, 6.0, 5.0]], [[0.0, -2.0, -2.0], [-4.0, 5.0, -4.0]], [[4.0, 3.0, -5.0], [-2.0, 4.0, 0.0]]], [[[-2.0, -6.0, 
+7.0], [-5.0, 6.0, -1.0]], [[-6.0, 5.0, -5.0], [3.0, -6.0, 3.0]], [[3.0, -2.0, 0.0], [-2.0, -5.0, 5.0]], [[3.0, 0.0, -2.0], 
+[0.0, -1.0, -6.0]], [[4.0, -4.0, 7.0], [3.0, -3.0, 0.0]]], [[[-3.0, -6.0, -6.0], [7.0, -1.0, 6.0]], [[3.0, 4.0, -1.0], [-1.0, 
+-4.0, -7.0]], [[7.0, 6.0, -1.0], [3.0, 3.0, 6.0]], [[1.0, -2.0, 6.0], [-5.0, 0.0, 7.0]], [[-4.0, -4.0, -6.0], [-4.0, 6.0, 
+6.0]]]])
+      arg1=numpy.array([[0.0, -7.0, -2.0], [-4.0, -3.0, 7.0]])
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-24.0, 32.0, -88.0, 60.0, -41.0], [5.0, -80.0, 47.0, 51.0, 35.0], [-19.0, 62.0, -15.0, 13.0, 
+72.0], [-87.0, -83.0, 2.0, -26.0, -6.0]])+(1.-msk_ref)*numpy.array([[33.0, -38.0, 2.0, 66.0, -19.0], [-53.0, 2.0, 36.0, -9.0, 
+-15.0], [23.0, 2.0, 72.0, -35.0, 11.0], [71.0, -59.0, -19.0, 71.0, 80.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_array_rank3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, 5.0, -3.0], [-1.0, 0.0, -2.0]], [[2.0, 5.0, -2.0], [3.0, -6.0, -2.0]], [[3.0, -7.0, 
+-2.0], [-3.0, 2.0, -3.0]], [[-2.0, -3.0, -5.0], [-1.0, 5.0, 3.0]], [[6.0, 3.0, 2.0], [-7.0, 1.0, 5.0]]], [[[-2.0, 0.0, 6.0], 
+[5.0, 7.0, 5.0]], [[0.0, 0.0, -2.0], [4.0, 2.0, 1.0]], [[-4.0, -2.0, -6.0], [-4.0, -7.0, 4.0]], [[2.0, 3.0, -1.0], [6.0, 5.0, 
+-6.0]], [[0.0, 3.0, -2.0], [0.0, 3.0, 0.0]]], [[[7.0, 4.0, 6.0], [2.0, 3.0, -6.0]], [[-1.0, -2.0, 0.0], [0.0, -5.0, 3.0]], 
+[[-6.0, -3.0, -5.0], [-2.0, 0.0, 6.0]], [[-5.0, 0.0, 0.0], [5.0, -4.0, -3.0]], [[-4.0, 5.0, 2.0], [3.0, 0.0, 0.0]]], [[[0.0, 
+-2.0, -4.0], [7.0, 5.0, -3.0]], [[-6.0, 3.0, -6.0], [-4.0, -4.0, 7.0]], [[3.0, -5.0, -6.0], [1.0, -5.0, 7.0]], [[-3.0, -6.0, 
+6.0], [-1.0, -5.0, -2.0]], [[-2.0, -5.0, -2.0], [-6.0, 6.0, 2.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -4.0, 7.0], [-2.0, 6.0, 
+4.0]], [[4.0, -5.0, 0.0], [0.0, 2.0, 0.0]], [[-5.0, 5.0, -6.0], [3.0, 0.0, 6.0]], [[4.0, -7.0, 6.0], [2.0, -5.0, -3.0]], 
+[[-4.0, 6.0, 2.0], [-2.0, 2.0, 6.0]]], [[[-4.0, 1.0, -4.0], [2.0, 0.0, -3.0]], [[0.0, -7.0, -2.0], [6.0, 0.0, -2.0]], [[0.0, 
+0.0, -6.0], [-3.0, 7.0, 0.0]], [[-6.0, -2.0, -2.0], [-3.0, -5.0, 7.0]], [[-4.0, 5.0, -2.0], [-6.0, 0.0, -6.0]]], [[[0.0, -5.0, 
+-4.0], [4.0, 0.0, 3.0]], [[0.0, 0.0, -2.0], [0.0, -1.0, 0.0]], [[5.0, 5.0, -6.0], [-3.0, 4.0, -3.0]], [[1.0, 0.0, -4.0], [4.0, 
+2.0, -3.0]], [[2.0, 1.0, -4.0], [1.0, -1.0, 0.0]]], [[[0.0, -3.0, 5.0], [-3.0, -6.0, -2.0]], [[-1.0, -6.0, 6.0], [5.0, -1.0, 
+5.0]], [[4.0, 1.0, 2.0], [3.0, 4.0, 0.0]], [[5.0, -3.0, 0.0], [1.0, 1.0, -4.0]], [[-5.0, -1.0, 0.0], [4.0, 1.0, 0.0]]]])
+      arg1=numpy.array([[[-1.0, 1.0, -1.0], [-5.0, 0.0, -2.0]], [[7.0, -2.0, 1.0], [-5.0, 6.0, 1.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[11.0, 32.0], [-6.0, -51.0], [13.0, 57.0], [3.0, 25.0], [20.0, 84.0]], [[-39.0, 14.0], [-20.0, 
+-9.0], [20.0, -48.0], [-16.0, 1.0], [5.0, 10.0]], [[-7.0, 49.0], [-7.0, -30.0], [6.0, -25.0], [-14.0, -87.0], [-8.0, -51.0]], 
+[[-27.0, -8.0], [21.0, -51.0], [-21.0, -3.0], [0.0, -30.0], [25.0, 62.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 72.0], [-9.0, 
+50.0], [-11.0, -60.0], [-21.0, 5.0], [6.0, -10.0]], [[5.0, -47.0], [-31.0, -20.0], [21.0, 51.0], [7.0, -48.0], [53.0, -16.0]], 
+[[-27.0, -11.0], [2.0, -8.0], [27.0, 55.0], [-11.0, -8.0], [-2.0, -3.0]], [[11.0, -12.0], [-46.0, -15.0], [-20.0, 37.0], [-5.0, 
+38.0], [-16.0, -47.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_array_rank4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-1.0, -5.0, -1.0], [-3.0, 4.0, -6.0]], [[-5.0, -4.0, -5.0], [3.0, -6.0, -2.0]], [[3.0, 2.0, 
+-2.0], [3.0, 3.0, -1.0]], [[-6.0, -5.0, 0.0], [-3.0, 4.0, -5.0]], [[1.0, 5.0, -6.0], [5.0, -6.0, 6.0]]], [[[-7.0, -2.0, 6.0], 
+[6.0, 3.0, -1.0]], [[-3.0, 5.0, 0.0], [-6.0, -5.0, -3.0]], [[-7.0, 6.0, 6.0], [0.0, -6.0, 1.0]], [[-1.0, 0.0, 7.0], [1.0, -3.0, 
+0.0]], [[5.0, 0.0, 1.0], [1.0, -7.0, 7.0]]], [[[0.0, 5.0, 3.0], [0.0, 7.0, 1.0]], [[-4.0, 2.0, 0.0], [-3.0, -3.0, -2.0]], 
+[[-7.0, -4.0, -3.0], [-3.0, 1.0, 6.0]], [[-2.0, -6.0, -5.0], [-6.0, -2.0, -4.0]], [[-5.0, -2.0, 5.0], [-6.0, -7.0, -3.0]]], 
+[[[0.0, -4.0, -7.0], [0.0, 2.0, -1.0]], [[0.0, 5.0, 1.0], [-4.0, 1.0, -4.0]], [[2.0, 0.0, -2.0], [0.0, -4.0, -2.0]], [[1.0, 
+-2.0, 7.0], [6.0, -2.0, 6.0]], [[-2.0, 5.0, -6.0], [0.0, 5.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 1.0, 1.0], [-2.0, 
+5.0, 4.0]], [[1.0, -1.0, 3.0], [-2.0, -7.0, 1.0]], [[6.0, -2.0, -7.0], [-2.0, 4.0, 0.0]], [[5.0, -3.0, -3.0], [-2.0, 6.0, 
+-7.0]], [[3.0, 4.0, -6.0], [-7.0, 6.0, -6.0]]], [[[7.0, -3.0, 0.0], [-1.0, 1.0, 4.0]], [[3.0, 1.0, -4.0], [7.0, 4.0, 1.0]], 
+[[0.0, 2.0, 0.0], [6.0, 3.0, 1.0]], [[-7.0, -6.0, 4.0], [-2.0, -7.0, 2.0]], [[-4.0, 7.0, -5.0], [0.0, -7.0, -6.0]]], [[[6.0, 
+7.0, -5.0], [0.0, -5.0, -3.0]], [[-3.0, 7.0, 7.0], [1.0, 3.0, 6.0]], [[-2.0, 4.0, -3.0], [-2.0, -1.0, -7.0]], [[-6.0, 7.0, 
+3.0], [5.0, -5.0, -3.0]], [[6.0, 3.0, 1.0], [-1.0, -7.0, 6.0]]], [[[-6.0, 5.0, -6.0], [4.0, -4.0, 1.0]], [[7.0, 0.0, -6.0], 
+[-2.0, 1.0, 3.0]], [[3.0, -1.0, -1.0], [-3.0, 6.0, -2.0]], [[3.0, -6.0, 2.0], [0.0, 0.0, -1.0]], [[4.0, 5.0, -6.0], [3.0, -5.0, 
+-4.0]]]])
+      arg1=numpy.array([[[[-3.0, 0.0, 7.0], [-6.0, 6.0, 7.0]], [[7.0, 0.0, -6.0], [0.0, 0.0, 0.0]], [[6.0, 1.0, -3.0], [0.0, 
+-4.0, -1.0]], [[-5.0, 7.0, -4.0], [2.0, -7.0, 4.0]], [[-7.0, 3.0, -1.0], [0.0, -2.0, 4.0]]], [[[1.0, 0.0, 3.0], [6.0, -4.0, 
+-3.0]], [[7.0, 3.0, -6.0], [-6.0, 7.0, 5.0]], [[-6.0, -1.0, 7.0], [-5.0, 2.0, 3.0]], [[6.0, 5.0, -3.0], [5.0, -7.0, -3.0]], 
+[[5.0, 0.0, 4.0], [0.0, -1.0, 4.0]]], [[[2.0, -7.0, -2.0], [5.0, -4.0, -1.0]], [[-7.0, 0.0, 1.0], [6.0, 2.0, 4.0]], [[-6.0, 
+5.0, -4.0], [4.0, 5.0, -3.0]], [[1.0, 6.0, -5.0], [3.0, -1.0, 2.0]], [[-3.0, -1.0, 7.0], [-6.0, 2.0, -2.0]]], [[[6.0, 5.0, 
+-2.0], [-1.0, 5.0, 5.0]], [[6.0, -1.0, 2.0], [2.0, 7.0, -7.0]], [[4.0, 0.0, 1.0], [0.0, 3.0, 7.0]], [[-2.0, -2.0, -5.0], [5.0, 
+-5.0, 0.0]], [[6.0, 6.0, -3.0], [-6.0, -3.0, -4.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-4.0, -1.0, -18.0, -84.0, -39.0], [-20.0, 0.0, 9.0, -53.0, -37.0], [10.0, -28.0, 11.0, -51.0, 
+39.0], [-36.0, 61.0, -35.0, -18.0, -3.0]], [[-88.0, -5.0, 7.0, 57.0, 32.0], [28.0, -87.0, -34.0, 28.0, -47.0], [69.0, 28.0, 
+18.0, 7.0, -42.0], [-83.0, -58.0, -57.0, 88.0, -31.0]], [[-30.0, 33.0, 15.0, -12.0, -23.0], [6.0, 37.0, -46.0, 31.0, 0.0], 
+[0.0, -3.0, 30.0, 29.0, -35.0], [39.0, 46.0, 12.0, 0.0, 13.0]], [[25.0, -42.0, -52.0, -59.0, -1.0], [-25.0, -36.0, 49.0, -89.0, 
+-54.0], [-3.0, 12.0, 34.0, -59.0, 59.0], [-63.0, 26.0, -47.0, -13.0, -40.0]], [[-69.0, 43.0, 47.0, 130.0, 50.0], [19.0, 16.0, 
+-72.0, 98.0, 11.0], [22.0, 29.0, 15.0, 94.0, -104.0], [38.0, -85.0, 22.0, 73.0, 18.0]]], [[[38.0, -85.0, -73.0, -16.0, 27.0], 
+[38.0, -111.0, 59.0, -58.0, -18.0], [7.0, 93.0, 50.0, -36.0, 37.0], [-60.0, 12.0, -20.0, 3.0, -113.0]], [[-6.0, -21.0, 10.0, 
+61.0, 34.0], [-10.0, -20.0, 24.0, 21.0, -22.0], [-48.0, -37.0, 3.0, 8.0, 36.0], [-27.0, -49.0, -48.0, -9.0, 75.0]], [[34.0, 
+-85.0, -31.0, 99.0, 77.0], [32.0, -104.0, 69.0, 9.0, -1.0], [-45.0, 47.0, 15.0, 7.0, 43.0], [-49.0, -85.0, -33.0, 2.0, -10.0]], 
+[[28.0, -49.0, -15.0, 0.0, 6.0], [38.0, -76.0, 44.0, -1.0, 26.0], [1.0, 14.0, -33.0, -30.0, 40.0], [-36.0, -11.0, -6.0, -13.0, 
+-24.0]], [[-7.0, 29.0, 48.0, 50.0, 6.0], [21.0, 9.0, -21.0, 60.0, 64.0], [34.0, -14.0, -86.0, 24.0, -42.0], [27.0, -64.0, 49.0, 
+25.0, 14.0]]], [[[70.0, -18.0, -33.0, -22.0, 2.0], [-22.0, 51.0, 33.0, -36.0, 9.0], [-70.0, 21.0, 45.0, 10.0, 28.0], [59.0, 
+43.0, 31.0, -60.0, -4.0]], [[-2.0, -28.0, -8.0, 41.0, 32.0], [-4.0, -35.0, 25.0, -2.0, -25.0], [-23.0, -4.0, 13.0, -2.0, 26.0], 
+[-36.0, -39.0, -39.0, 4.0, 23.0]], [[66.0, -31.0, -47.0, 30.0, 62.0], [-56.0, 12.0, 60.0, -93.0, -24.0], [-5.0, 54.0, 9.0, 
+-14.0, 12.0], [-18.0, -85.0, 14.0, 17.0, -66.0]], [[-33.0, 16.0, 9.0, -26.0, -11.0], [-33.0, 0.0, -3.0, -31.0, -44.0], [30.0, 
+-47.0, -20.0, -37.0, 17.0], [-56.0, -14.0, -47.0, 21.0, 25.0]], [[23.0, -65.0, -16.0, 16.0, 26.0], [11.0, -99.0, 74.0, -27.0, 
+-10.0], [-5.0, -22.0, -50.0, -59.0, 80.0], [-94.0, -58.0, -57.0, -6.0, 12.0]]], [[[-44.0, 42.0, 10.0, -18.0, -13.0], [-26.0, 
+39.0, -44.0, -10.0, -34.0], [35.0, -7.0, 21.0, 7.0, -39.0], [-1.0, 11.0, -8.0, 33.0, -5.0]], [[9.0, -6.0, 2.0, 0.0, -4.0], 
+[-13.0, 20.0, 12.0, 7.0, -13.0], [-57.0, -37.0, 22.0, 4.0, 36.0], [12.0, 24.0, -24.0, -40.0, 64.0]], [[-58.0, 26.0, 36.0, 18.0, 
+-12.0], [18.0, -12.0, -40.0, 52.0, -2.0], [26.0, -32.0, -18.0, 12.0, -24.0], [-14.0, -6.0, -20.0, 26.0, 38.0]], [[40.0, -35.0, 
+-15.0, 3.0, 8.0], [48.0, -61.0, 29.0, 1.0, 59.0], [34.0, 56.0, -48.0, -14.0, -4.0], [-4.0, -22.0, 47.0, 7.0, -81.0]], [[-41.0, 
+22.0, -4.0, 14.0, 5.0], [-25.0, 47.0, -40.0, 11.0, -59.0], [-42.0, -2.0, 101.0, 43.0, -21.0], [25.0, 41.0, -34.0, -1.0, 
+41.0]]]])+(1.-msk_ref)*numpy.array([[[[65.0, 22.0, -2.0, -40.0, -20.0], [-37.0, 92.0, 14.0, -31.0, 35.0], [-35.0, -13.0, -18.0, 
+2.0, 8.0], [74.0, 28.0, 60.0, -50.0, 8.0]], [[-5.0, -11.0, 23.0, 25.0, 5.0], [23.0, -46.0, 15.0, 28.0, 28.0], [20.0, -26.0, 
+-69.0, -17.0, 15.0], [-33.0, -47.0, -7.0, 10.0, 20.0]], [[-31.0, 84.0, 39.0, -48.0, -49.0], [-43.0, 118.0, -65.0, 9.0, -2.0], 
+[14.0, -53.0, -6.0, 19.0, -45.0], [62.0, 48.0, 29.0, -3.0, 45.0]], [[-37.0, 53.0, 19.0, -108.0, -81.0], [-19.0, 63.0, -47.0, 
+-7.0, -21.0], [10.0, -66.0, 10.0, -24.0, 5.0], [18.0, 114.0, -14.0, -29.0, 43.0]], [[-15.0, 57.0, 22.0, -43.0, -39.0], [-63.0, 
+123.0, -35.0, -3.0, -39.0], [-63.0, -81.0, 46.0, 18.0, 11.0], [57.0, 72.0, -18.0, -49.0, 108.0]]], [[[19.0, 49.0, 31.0, -49.0, 
+-44.0], [-15.0, 73.0, -20.0, 3.0, 50.0], [22.0, -37.0, -68.0, -7.0, -18.0], [53.0, 22.0, 59.0, -18.0, 11.0]], [[-48.0, 45.0, 
+14.0, -2.0, -18.0], [14.0, 39.0, -71.0, 39.0, -1.0], [25.0, 29.0, 48.0, 48.0, -74.0], [49.0, 44.0, 27.0, 27.0, -22.0]], 
+[[-11.0, 0.0, -11.0, 9.0, 4.0], [21.0, -4.0, -23.0, 16.0, 1.0], [3.0, 46.0, 46.0, 29.0, -34.0], [24.0, 24.0, 16.0, 11.0, 
+-37.0]], [[33.0, -73.0, -34.0, 30.0, 49.0], [15.0, -118.0, 78.0, -51.0, -4.0], [36.0, 35.0, -53.0, -58.0, 49.0], [-103.0, 
+-95.0, -31.0, 31.0, -65.0]], [[-107.0, 2.0, 32.0, 114.0, 44.0], [27.0, -56.0, -50.0, 93.0, -57.0], [-13.0, -15.0, 62.0, 58.0, 
+-32.0], [-44.0, -48.0, -84.0, 54.0, 78.0]]], [[[-104.0, 72.0, 81.0, 62.0, -18.0], [20.0, 43.0, -97.0, 130.0, 3.0], [-4.0, 
+-69.0, 3.0, 72.0, -64.0], [41.0, 5.0, -17.0, 24.0, 120.0]], [[112.0, -63.0, -50.0, 41.0, 53.0], [-6.0, 3.0, 79.0, -38.0, 34.0], 
+[-82.0, 64.0, 26.0, 16.0, 39.0], [47.0, -30.0, 46.0, -53.0, -36.0]], [[-58.0, 4.0, 12.0, 25.0, 3.0], [2.0, -14.0, -26.0, 35.0, 
+-49.0], [-25.0, -31.0, 52.0, 18.0, 5.0], [-24.0, 16.0, -63.0, 6.0, 64.0]], [[-42.0, -60.0, -15.0, 100.0, 58.0], [62.0, -119.0, 
+6.0, 59.0, -25.0], [-19.0, 53.0, 63.0, 35.0, -2.0], [-52.0, -41.0, -57.0, 33.0, -6.0]], [[-5.0, 36.0, 58.0, 58.0, 4.0], [13.0, 
+32.0, -23.0, 74.0, 65.0], [6.0, -37.0, -82.0, 35.0, -34.0], [45.0, -58.0, 46.0, 7.0, 54.0]]], [[[-65.0, -6.0, 2.0, 129.0, 
+75.0], [13.0, -38.0, -36.0, 52.0, -46.0], [0.0, 56.0, 78.0, 72.0, -63.0], [-18.0, -80.0, -35.0, 72.0, -4.0]], [[-24.0, 85.0, 
+53.0, -10.0, -33.0], [-36.0, 119.0, -63.0, 34.0, 22.0], [9.0, -53.0, -30.0, 36.0, -55.0], [76.0, 12.0, 46.0, 1.0, 57.0]], 
+[[24.0, 27.0, -2.0, -74.0, -43.0], [-36.0, 74.0, -3.0, -35.0, -3.0], [-22.0, -36.0, 5.0, -17.0, 19.0], [38.0, 67.0, 15.0, 
+-44.0, 23.0]], [[-2.0, 9.0, 7.0, -69.0, -45.0], [12.0, -14.0, -1.0, -15.0, 19.0], [45.0, -23.0, -53.0, -45.0, 13.0], [-21.0, 
+35.0, 7.0, -4.0, -20.0]], [[-130.0, 64.0, 71.0, 64.0, -13.0], [36.0, 6.0, -108.0, 129.0, -15.0], [24.0, -42.0, 24.0, 70.0, 
+-79.0], [13.0, 6.0, -33.0, 52.0, 85.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_constData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, -5.0, 1.0], [3.0, -6.0, -2.0]], [[-3.0, -2.0, 7.0], [-4.0, -3.0, 1.0]], [[3.0, -7.0, 
+-2.0], [7.0, 4.0, 5.0]], [[0.0, 3.0, -7.0], [-2.0, 5.0, -1.0]], [[-2.0, 3.0, 7.0], [4.0, 7.0, -1.0]]], [[[-3.0, -4.0, 4.0], 
+[-6.0, 0.0, 3.0]], [[-4.0, 0.0, 3.0], [-4.0, -5.0, -3.0]], [[-2.0, 0.0, -3.0], [-6.0, -4.0, 1.0]], [[0.0, 0.0, 3.0], [6.0, 7.0, 
+5.0]], [[7.0, -4.0, -6.0], [-5.0, 0.0, 5.0]]], [[[-2.0, -5.0, 1.0], [0.0, 3.0, 4.0]], [[-3.0, 7.0, -4.0], [0.0, 4.0, 0.0]], 
+[[2.0, 0.0, 0.0], [-4.0, 6.0, 4.0]], [[0.0, 3.0, 0.0], [3.0, -2.0, 7.0]], [[-3.0, -6.0, -1.0], [-4.0, 2.0, 6.0]]], [[[-2.0, 
+7.0, -6.0], [7.0, 3.0, 3.0]], [[-2.0, -2.0, 5.0], [2.0, -4.0, 5.0]], [[1.0, 3.0, -5.0], [1.0, -4.0, -1.0]], [[4.0, -4.0, 4.0], 
+[4.0, 2.0, -3.0]], [[1.0, -3.0, 7.0], [2.0, -6.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -7.0, 1.0], [6.0, -3.0, 6.0]], 
+[[1.0, -6.0, 6.0], [-5.0, 7.0, 3.0]], [[-6.0, 6.0, 4.0], [-4.0, 7.0, 6.0]], [[-3.0, -5.0, 2.0], [-6.0, -3.0, -6.0]], [[1.0, 
+-6.0, 7.0], [5.0, 0.0, -6.0]]], [[[2.0, 6.0, 3.0], [-1.0, 5.0, 5.0]], [[3.0, 2.0, 4.0], [-7.0, 6.0, -3.0]], [[-3.0, 6.0, 6.0], 
+[0.0, -3.0, -3.0]], [[-2.0, 4.0, -2.0], [-3.0, -7.0, 3.0]], [[6.0, -2.0, 6.0], [3.0, 3.0, -6.0]]], [[[-1.0, -5.0, 6.0], [0.0, 
+4.0, 1.0]], [[-3.0, -3.0, -3.0], [7.0, -5.0, -3.0]], [[3.0, 1.0, -5.0], [1.0, -5.0, -2.0]], [[1.0, 7.0, 7.0], [-7.0, 3.0, 
+2.0]], [[-3.0, 6.0, 1.0], [-3.0, 4.0, 7.0]]], [[[4.0, -4.0, 7.0], [5.0, -5.0, -5.0]], [[3.0, 0.0, -6.0], [-6.0, 2.0, 7.0]], 
+[[-2.0, -4.0, 5.0], [6.0, -5.0, -6.0]], [[-1.0, -1.0, 7.0], [4.0, -3.0, 3.0]], [[7.0, 0.0, 7.0], [0.0, -6.0, 6.0]]]])
+      arg1=Data(numpy.array([[-2.0, 5.0, 4.0], [7.0, -7.0, 0.0]]),self.functionspace)
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[28.0, 17.0, -28.0, -62.0, 26.0], [-40.0, 27.0, -22.0, 5.0, -93.0], [-38.0, -3.0, -74.0, 50.0, 
+-70.0], [43.0, 56.0, 28.0, 2.0, 67.0]])+(1.-msk_ref)*numpy.array([[20.0, -92.0, -19.0, -32.0, 31.0], [-4.0, -71.0, 81.0, 44.0, 
+2.0], [-27.0, 63.0, 21.0, -9.0, -9.0], [70.0, -86.0, 81.0, 74.0, 56.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_constData_rank3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-6.0, -2.0, 0.0], [7.0, -4.0, -2.0]], [[2.0, -2.0, -1.0], [4.0, -5.0, 2.0]], [[0.0, 0.0, 
+5.0], [-2.0, 1.0, 0.0]], [[7.0, 6.0, 3.0], [-7.0, 5.0, 7.0]], [[-2.0, 7.0, -2.0], [-5.0, -2.0, 6.0]]], [[[6.0, -7.0, -5.0], 
+[6.0, -7.0, 0.0]], [[2.0, 2.0, 1.0], [7.0, 0.0, -7.0]], [[-7.0, 0.0, -6.0], [0.0, 0.0, -4.0]], [[5.0, 6.0, -4.0], [-5.0, -6.0, 
+5.0]], [[4.0, -4.0, 1.0], [0.0, -3.0, 0.0]]], [[[5.0, 4.0, -3.0], [3.0, -5.0, -2.0]], [[1.0, 1.0, -1.0], [-5.0, 1.0, 2.0]], 
+[[5.0, -7.0, 6.0], [3.0, -6.0, 1.0]], [[-3.0, 1.0, 2.0], [-6.0, 0.0, 3.0]], [[3.0, -5.0, -3.0], [-7.0, 7.0, 6.0]]], [[[-1.0, 
+0.0, -4.0], [1.0, 2.0, 1.0]], [[0.0, -7.0, 3.0], [0.0, 0.0, -7.0]], [[0.0, 7.0, -3.0], [-3.0, 2.0, -2.0]], [[-2.0, -5.0, 0.0], 
+[5.0, 6.0, 5.0]], [[7.0, 4.0, 1.0], [1.0, 0.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -3.0, 5.0], [-1.0, 3.0, -3.0]], 
+[[4.0, 0.0, -6.0], [-4.0, 4.0, -1.0]], [[-6.0, 6.0, 6.0], [1.0, 5.0, 5.0]], [[-1.0, 0.0, 0.0], [-2.0, 0.0, 6.0]], [[-1.0, 3.0, 
+1.0], [-2.0, -3.0, -5.0]]], [[[0.0, -2.0, 7.0], [2.0, 2.0, 2.0]], [[-2.0, -6.0, 0.0], [-1.0, 1.0, -1.0]], [[0.0, -2.0, 0.0], 
+[-6.0, 4.0, -2.0]], [[4.0, 7.0, -4.0], [0.0, -3.0, -6.0]], [[3.0, 0.0, -7.0], [7.0, -7.0, 1.0]]], [[[3.0, -2.0, -5.0], [-2.0, 
+4.0, -5.0]], [[-7.0, -3.0, 5.0], [-3.0, -3.0, -6.0]], [[5.0, -4.0, -6.0], [0.0, 4.0, 1.0]], [[5.0, -5.0, 3.0], [-7.0, 4.0, 
+-4.0]], [[-3.0, 5.0, -3.0], [6.0, -7.0, 4.0]]], [[[6.0, 2.0, -7.0], [-3.0, -7.0, 3.0]], [[6.0, -7.0, -3.0], [-3.0, 0.0, -1.0]], 
+[[6.0, -2.0, -1.0], [-2.0, 2.0, -3.0]], [[-2.0, -6.0, 6.0], [1.0, 6.0, 4.0]], [[4.0, -2.0, -2.0], [3.0, 2.0, -1.0]]]])
+      arg1=Data(numpy.array([[[-5.0, 4.0, 4.0], [3.0, 1.0, 4.0]], [[-3.0, -7.0, -1.0], [-3.0, -1.0, 5.0]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[31.0, 5.0], [-7.0, 12.0], [15.0, 0.0], [13.0, -15.0], [37.0, 6.0]], [[-67.0, 25.0], [-5.0, 
+-77.0], [-5.0, 7.0], [-18.0, -7.0], [-35.0, 18.0]], [[-25.0, -54.0], [-11.0, 15.0], [-22.0, 30.0], [21.0, 33.0], [-37.0, 
+73.0]], [[-2.0, 7.0], [-44.0, 11.0], [1.0, -49.0], [31.0, 45.0], [16.0, -18.0]]])+(1.-msk_ref)*numpy.array([[[-34.0, -17.0], 
+[-56.0, -3.0], [106.0, -13.0], [23.0, 39.0], [-8.0, -35.0]], [[36.0, 9.0], [-20.0, 45.0], [-30.0, 18.0], [-35.0, -84.0], 
+[-25.0, -11.0]], [[-65.0, -13.0], [7.0, 19.0], [-57.0, 20.0], [-66.0, 14.0], [50.0, -14.0]], [[-54.0, 6.0], [-83.0, 38.0], 
+[-58.0, -14.0], [35.0, 53.0], [-29.0, -12.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_constData_rank4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -1.0, 2.0], [-3.0, 3.0, -5.0]], [[3.0, 1.0, 6.0], [-6.0, 6.0, -1.0]], [[-2.0, 0.0, 
+-1.0], [-5.0, -1.0, 4.0]], [[0.0, 4.0, 5.0], [4.0, 0.0, -3.0]], [[-2.0, 0.0, -1.0], [6.0, -5.0, 0.0]]], [[[6.0, 0.0, 5.0], 
+[-2.0, 3.0, 0.0]], [[0.0, -2.0, 6.0], [-3.0, -3.0, -7.0]], [[-4.0, -1.0, -1.0], [5.0, 5.0, 1.0]], [[1.0, -7.0, -3.0], [-4.0, 
+3.0, 3.0]], [[6.0, 0.0, -3.0], [-5.0, 1.0, -3.0]]], [[[-5.0, 3.0, 7.0], [-6.0, 1.0, -3.0]], [[-7.0, -5.0, 0.0], [-6.0, 6.0, 
+-6.0]], [[5.0, 5.0, -1.0], [0.0, 5.0, 3.0]], [[-4.0, -1.0, -4.0], [-3.0, 3.0, 7.0]], [[0.0, 7.0, -1.0], [0.0, -6.0, -3.0]]], 
+[[[4.0, 3.0, 5.0], [-6.0, -2.0, -3.0]], [[6.0, 0.0, -7.0], [2.0, 0.0, 4.0]], [[-4.0, 4.0, 6.0], [0.0, 4.0, 5.0]], [[4.0, 0.0, 
+5.0], [4.0, -4.0, 1.0]], [[-2.0, -1.0, -3.0], [-3.0, 0.0, 6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-2.0, -6.0, 4.0], [-7.0, -5.0, 
+-3.0]], [[4.0, 2.0, 2.0], [-7.0, -5.0, -6.0]], [[-5.0, -2.0, 3.0], [7.0, 3.0, 7.0]], [[-7.0, 6.0, -1.0], [1.0, 6.0, -5.0]], 
+[[1.0, -3.0, 3.0], [-1.0, -4.0, -3.0]]], [[[-5.0, -6.0, 5.0], [5.0, -2.0, 5.0]], [[-4.0, 6.0, -1.0], [4.0, 4.0, 0.0]], [[-3.0, 
+-5.0, 0.0], [-6.0, -4.0, -5.0]], [[-1.0, 3.0, -2.0], [0.0, 0.0, -7.0]], [[2.0, 0.0, 1.0], [-1.0, -1.0, -1.0]]], [[[7.0, 4.0, 
+2.0], [1.0, 4.0, -2.0]], [[6.0, -5.0, 0.0], [0.0, 7.0, 7.0]], [[-1.0, 4.0, -5.0], [-4.0, -6.0, -6.0]], [[-3.0, 0.0, -5.0], 
+[-4.0, 5.0, -1.0]], [[5.0, -2.0, -3.0], [0.0, 0.0, 0.0]]], [[[-7.0, -2.0, -2.0], [5.0, -7.0, 6.0]], [[5.0, -7.0, -4.0], [4.0, 
+6.0, 3.0]], [[3.0, 1.0, -6.0], [-7.0, 2.0, 0.0]], [[6.0, 2.0, -4.0], [7.0, -5.0, 2.0]], [[3.0, -7.0, -6.0], [-6.0, 6.0, 
+-5.0]]]])
+      arg1=Data(numpy.array([[[[6.0, 0.0, 3.0], [3.0, -1.0, 3.0]], [[-3.0, -4.0, 7.0], [-7.0, -4.0, 0.0]], [[-1.0, -1.0, 0.0], 
+[-1.0, 0.0, -4.0]], [[-6.0, -1.0, -4.0], [0.0, 4.0, 0.0]], [[1.0, 7.0, -4.0], [-1.0, -5.0, 1.0]]], [[[4.0, -4.0, -7.0], [-5.0, 
+5.0, -6.0]], [[6.0, 4.0, 0.0], [-5.0, 4.0, 3.0]], [[-6.0, -2.0, -7.0], [-6.0, 4.0, 0.0]], [[3.0, 2.0, -6.0], [7.0, 0.0, 1.0]], 
+[[6.0, -6.0, 0.0], [2.0, 5.0, 2.0]]], [[[-4.0, 0.0, 5.0], [-5.0, 3.0, 3.0]], [[0.0, 7.0, 0.0], [0.0, 4.0, 3.0]], [[-6.0, 0.0, 
+0.0], [6.0, 2.0, 2.0]], [[7.0, 0.0, -5.0], [-3.0, 7.0, 7.0]], [[-2.0, 0.0, -7.0], [-3.0, -3.0, -4.0]]], [[[3.0, 0.0, 1.0], 
+[5.0, 5.0, 6.0]], [[-7.0, -6.0, 7.0], [2.0, 1.0, -3.0]], [[0.0, 0.0, -2.0], [-4.0, 0.0, 4.0]], [[-6.0, -6.0, 7.0], [1.0, 5.0, 
+-5.0]], [[-4.0, 0.0, 6.0], [-6.0, -3.0, 5.0]]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[15.0, 9.0, 18.0, -31.0, -26.0], [74.0, 44.0, -18.0, -22.0, 41.0], [-5.0, -10.0, -58.0, 27.0, 
+-6.0], [-10.0, -10.0, -12.0, 21.0, -28.0]], [[9.0, 47.0, 6.0, -19.0, -39.0], [32.0, 73.0, -2.0, -68.0, 28.0], [63.0, 28.0, 
+-44.0, 44.0, -44.0], [9.0, 12.0, 8.0, 47.0, 37.0]], [[-17.0, 38.0, -9.0, 12.0, 16.0], [-5.0, 21.0, 45.0, -31.0, -19.0], [37.0, 
+8.0, -12.0, 27.0, 13.0], [-13.0, -16.0, 38.0, -25.0, 55.0]], [[18.0, -9.0, 4.0, -24.0, 1.0], [-53.0, -13.0, -67.0, 3.0, -22.0], 
+[-4.0, 19.0, 18.0, -58.0, -35.0], [7.0, 28.0, -38.0, 30.0, -9.0]], [[8.0, -23.0, -4.0, -4.0, 21.0], [-56.0, -62.0, -37.0, 42.0, 
+-25.0], [-42.0, -20.0, 38.0, -62.0, 8.0], [-2.0, 14.0, -22.0, -14.0, -19.0]]], [[[42.0, 19.0, -4.0, -44.0, -27.0], [14.0, 58.0, 
+-47.0, -26.0, 47.0], [20.0, 12.0, -42.0, 44.0, -50.0], [28.0, -8.0, -2.0, 12.0, 9.0]], [[-9.0, 83.0, 33.0, -34.0, -27.0], [8.0, 
+-26.0, -32.0, -68.0, -23.0], [15.0, -47.0, -38.0, -91.0, 4.0], [-66.0, 66.0, -28.0, 71.0, 28.0]], [[-14.0, -46.0, -4.0, 49.0, 
+-36.0], [-11.0, -30.0, 23.0, 28.0, 19.0], [4.0, 16.0, 66.0, 4.0, -19.0], [43.0, 39.0, -14.0, 48.0, -30.0]], [[-9.0, 20.0, -2.0, 
+25.0, -44.0], [70.0, 19.0, 65.0, -18.0, 61.0], [19.0, -28.0, -18.0, 76.0, 10.0], [13.0, 0.0, 34.0, 11.0, 8.0]], [[2.0, -8.0, 
+11.0, -20.0, 15.0], [93.0, 56.0, 19.0, -2.0, 25.0], [-20.0, -5.0, -70.0, 58.0, 33.0], [-23.0, -63.0, 14.0, -42.0, -30.0]]], 
+[[[-37.0, 90.0, 20.0, 3.0, -14.0], [-28.0, 7.0, 15.0, -96.0, -61.0], [79.0, 16.0, -10.0, -66.0, -12.0], [-51.0, 64.0, -2.0, 
+75.0, 80.0]], [[-84.0, 59.0, 42.0, 71.0, -72.0], [88.0, -26.0, 112.0, -79.0, -6.0], [58.0, -29.0, 6.0, -31.0, 38.0], [-57.0, 
+91.0, 0.0, 126.0, 16.0]], [[31.0, -62.0, -22.0, -11.0, 22.0], [14.0, 79.0, -13.0, 34.0, 31.0], [-1.0, 64.0, -14.0, 96.0, 
+-30.0], [57.0, -76.0, 14.0, -57.0, -26.0]], [[-27.0, -3.0, -20.0, 53.0, 0.0], [4.0, 20.0, 84.0, -4.0, 5.0], [41.0, 26.0, 26.0, 
+71.0, 8.0], [26.0, -18.0, 48.0, -21.0, 36.0]], [[-6.0, -11.0, 5.0, -27.0, 80.0], [-33.0, -5.0, -31.0, 17.0, -78.0], [-32.0, 
+16.0, -18.0, -58.0, 37.0], [-49.0, -46.0, -10.0, -64.0, -3.0]]], [[[14.0, 61.0, 11.0, -55.0, 18.0], [7.0, 49.0, -37.0, -57.0, 
+-22.0], [24.0, 4.0, -70.0, -14.0, -7.0], [-41.0, -16.0, 2.0, -8.0, 41.0]], [[33.0, -81.0, -24.0, -8.0, 36.0], [39.0, 38.0, 1.0, 
+78.0, 48.0], [-57.0, 12.0, -16.0, 99.0, 15.0], [45.0, -99.0, 22.0, -103.0, -58.0]], [[5.0, 22.0, -20.0, 12.0, -15.0], [-84.0, 
+23.0, -10.0, -35.0, -18.0], [73.0, 59.0, 42.0, 5.0, -66.0], [44.0, 35.0, 8.0, 37.0, 65.0]], [[58.0, 11.0, -12.0, -60.0, 1.0], 
+[-65.0, -9.0, -99.0, 11.0, 14.0], [-20.0, -13.0, -6.0, -30.0, -47.0], [23.0, 8.0, -22.0, -10.0, 7.0]], [[-12.0, 10.0, -18.0, 
+25.0, 12.0], [-4.0, 17.0, 53.0, -5.0, 0.0], [26.0, 11.0, 6.0, 52.0, 10.0], [12.0, -25.0, 42.0, -36.0, 
+38.0]]]])+(1.-msk_ref)*numpy.array([[[[-25.0, 127.0, 27.0, -18.0, -31.0], [16.0, -30.0, 18.0, -94.0, -21.0], [39.0, -71.0, 
+-46.0, -69.0, 24.0], [-80.0, 68.0, 8.0, 59.0, 74.0]], [[-4.0, 63.0, 25.0, -54.0, 36.0], [40.0, 29.0, -20.0, -51.0, -39.0], 
+[-4.0, -24.0, -88.0, -38.0, 38.0], [-82.0, -27.0, 0.0, -24.0, 23.0]], [[18.0, -17.0, -28.0, 32.0, -46.0], [-95.0, -40.0, -17.0, 
+19.0, 25.0], [30.0, 19.0, 92.0, -1.0, -69.0], [80.0, 64.0, -6.0, 50.0, 22.0]], [[-63.0, -41.0, 20.0, 64.0, 3.0], [10.0, -14.0, 
+55.0, -1.0, -56.0], [21.0, 51.0, 50.0, -40.0, 20.0], [-17.0, 29.0, -22.0, 55.0, -27.0]], [[7.0, 53.0, 15.0, -31.0, -14.0], 
+[-2.0, -26.0, -31.0, -31.0, -4.0], [-5.0, -46.0, -26.0, -54.0, 4.0], [-37.0, 35.0, -14.0, 27.0, 17.0]]], [[[17.0, 47.0, -14.0, 
+8.0, -57.0], [-96.0, -72.0, -31.0, -17.0, 16.0], [29.0, -35.0, 66.0, -54.0, -54.0], [35.0, 99.0, -10.0, 71.0, 51.0]], [[-19.0, 
+-63.0, -6.0, 38.0, 18.0], [-33.0, -4.0, 11.0, 34.0, -32.0], [3.0, 58.0, 56.0, -7.0, -9.0], [27.0, -3.0, -14.0, 5.0, -26.0]], 
+[[-47.0, 87.0, 34.0, 7.0, -17.0], [48.0, -39.0, 48.0, -66.0, -30.0], [15.0, -66.0, -36.0, -66.0, 56.0], [-89.0, 50.0, 4.0, 
+47.0, 35.0]], [[-33.0, -23.0, 26.0, 11.0, 21.0], [40.0, -15.0, 14.0, 8.0, -38.0], [-27.0, 0.0, -8.0, -46.0, 44.0], [-47.0, 
+-4.0, -24.0, 9.0, -43.0]], [[10.0, 12.0, 3.0, -20.0, 3.0], [7.0, 10.0, -17.0, -8.0, 3.0], [-4.0, -7.0, -22.0, -2.0, -1.0], 
+[-9.0, -7.0, -2.0, -6.0, 2.0]]], [[[41.0, -46.0, -4.0, -38.0, 4.0], [25.0, 63.0, -54.0, 22.0, 36.0], [-17.0, 38.0, -32.0, 50.0, 
+-35.0], [36.0, -47.0, -16.0, -21.0, -44.0]], [[50.0, -26.0, -29.0, -3.0, -57.0], [37.0, 65.0, 2.0, 15.0, 115.0], [18.0, 14.0, 
+-8.0, 140.0, -61.0], [95.0, -26.0, 28.0, -6.0, -10.0]], [[-45.0, 4.0, 25.0, -2.0, 75.0], [41.0, -12.0, 33.0, 1.0, -80.0], 
+[-37.0, -14.0, -42.0, -54.0, 91.0], [-94.0, -48.0, 2.0, -57.0, -14.0]], [[-53.0, -18.0, 11.0, 58.0, -5.0], [74.0, 19.0, 97.0, 
+-8.0, -3.0], [19.0, 17.0, 2.0, 44.0, 42.0], [-15.0, -14.0, 22.0, 9.0, -14.0]], [[21.0, -28.0, -3.0, -16.0, 3.0], [49.0, 22.0, 
+-5.0, 29.0, 42.0], [-35.0, -14.0, -30.0, 50.0, 11.0], [12.0, -44.0, 6.0, -39.0, -38.0]]], [[[-8.0, 8.0, -20.0, 24.0, 23.0], 
+[-102.0, -85.0, 2.0, 28.0, -43.0], [-10.0, -24.0, 70.0, -61.0, 10.0], [3.0, 32.0, 8.0, -20.0, 37.0]], [[33.0, -67.0, -14.0, 
+17.0, -59.0], [68.0, 15.0, 12.0, 56.0, 116.0], [-33.0, -16.0, 12.0, 106.0, -24.0], [79.0, -16.0, 4.0, 3.0, -71.0]], [[-23.0, 
+-14.0, 3.0, 13.0, 31.0], [95.0, 65.0, 72.0, -2.0, 8.0], [-1.0, 15.0, -56.0, 86.0, 51.0], [-22.0, -81.0, 40.0, -63.0, -12.0]], 
+[[56.0, -83.0, -23.0, -42.0, 56.0], [-28.0, -5.0, -74.0, 97.0, 17.0], [-88.0, 0.0, 0.0, 20.0, 2.0], [36.0, -79.0, -12.0, 
+-104.0, -65.0]], [[-39.0, -5.0, 30.0, 37.0, -51.0], [172.0, 29.0, 98.0, -16.0, 68.0], [-9.0, -40.0, -52.0, 76.0, 56.0], [-27.0, 
+-12.0, 16.0, 31.0, -55.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_expandedData_rank2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-2.0, 0.0, 1.0], [2.0, 3.0, 3.0]], [[6.0, -4.0, 4.0], [2.0, 3.0, -6.0]], [[-5.0, 5.0, 
+-2.0], [0.0, -2.0, 0.0]], [[-5.0, 1.0, -1.0], [2.0, 5.0, -7.0]], [[0.0, 5.0, -2.0], [7.0, -3.0, -6.0]]], [[[3.0, 4.0, 1.0], 
+[-1.0, 1.0, 3.0]], [[4.0, 0.0, -1.0], [5.0, 0.0, 0.0]], [[3.0, 0.0, 0.0], [6.0, 5.0, 4.0]], [[7.0, -7.0, 4.0], [6.0, -3.0, 
+-2.0]], [[-3.0, -6.0, 4.0], [-3.0, 4.0, 1.0]]], [[[0.0, 7.0, 6.0], [7.0, 5.0, 3.0]], [[-4.0, -5.0, 5.0], [-1.0, 4.0, -4.0]], 
+[[6.0, -5.0, -7.0], [7.0, -4.0, -6.0]], [[-7.0, 7.0, -7.0], [-2.0, 6.0, 3.0]], [[-6.0, -2.0, 3.0], [-6.0, -3.0, 7.0]]], 
+[[[-1.0, 4.0, 6.0], [-6.0, 4.0, 2.0]], [[1.0, 3.0, 2.0], [-5.0, -6.0, 3.0]], [[0.0, 0.0, 4.0], [-6.0, -2.0, 5.0]], [[2.0, -5.0, 
+0.0], [1.0, -3.0, -1.0]], [[3.0, 1.0, -7.0], [0.0, -5.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, 5.0, -5.0], [-1.0, -6.0, 
+0.0]], [[-6.0, 3.0, 7.0], [5.0, -2.0, 0.0]], [[-4.0, 4.0, 2.0], [4.0, -4.0, -1.0]], [[3.0, 0.0, -4.0], [5.0, 6.0, 2.0]], [[6.0, 
+-7.0, -4.0], [-7.0, -1.0, 5.0]]], [[[1.0, -4.0, 3.0], [-5.0, -1.0, 0.0]], [[-5.0, 2.0, -1.0], [2.0, 5.0, -6.0]], [[-4.0, -6.0, 
+2.0], [0.0, 2.0, -7.0]], [[-5.0, 6.0, 2.0], [7.0, -6.0, 0.0]], [[-3.0, -3.0, -5.0], [-3.0, 4.0, -7.0]]], [[[6.0, 2.0, -2.0], 
+[6.0, -5.0, -6.0]], [[6.0, -2.0, 6.0], [-4.0, -2.0, -4.0]], [[2.0, 6.0, -5.0], [-4.0, -2.0, 2.0]], [[4.0, 2.0, -3.0], [1.0, 
+6.0, 0.0]], [[2.0, -7.0, -3.0], [6.0, 3.0, 0.0]]], [[[-2.0, 7.0, -5.0], [-5.0, 1.0, -4.0]], [[7.0, -2.0, 3.0], [7.0, 6.0, 
+-1.0]], [[0.0, -4.0, 7.0], [6.0, -3.0, 0.0]], [[-7.0, -1.0, 6.0], [-4.0, 0.0, 5.0]], [[-6.0, 4.0, 5.0], [4.0, 4.0, -5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, 6.0, 0.0], [3.0, -6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[2.0, 7.0, -5.0], [1.0, -1.0, 
+2.0]])
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-8.0, -54.0, 67.0, 21.0, 81.0], [-6.0, -5.0, -35.0, -37.0, -56.0], [27.0, -29.0, -3.0, 29.0, 
+4.0], [-17.0, 28.0, -16.0, -17.0, 21.0]])+(1.-msk_ref)*numpy.array([[69.0, -19.0, 16.0, 29.0, -13.0], [-45.0, -6.0, -76.0, 
+35.0, -23.0], [35.0, -42.0, 73.0, 32.0, -27.0], [56.0, -16.0, -54.0, -45.0, -19.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_expandedData_rank3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 5.0, -3.0], [2.0, 6.0, -3.0]], [[6.0, 0.0, 5.0], [0.0, 2.0, 1.0]], [[-3.0, 2.0, 4.0], 
+[0.0, 7.0, 0.0]], [[-7.0, -6.0, 5.0], [2.0, 7.0, 5.0]], [[0.0, 2.0, -5.0], [-7.0, 5.0, -5.0]]], [[[-2.0, -5.0, -4.0], [-3.0, 
+2.0, -3.0]], [[0.0, -2.0, 7.0], [-3.0, -1.0, 3.0]], [[2.0, 5.0, 3.0], [3.0, -5.0, -5.0]], [[7.0, -3.0, -2.0], [0.0, -1.0, 
+-4.0]], [[-3.0, 3.0, 7.0], [-3.0, -5.0, -5.0]]], [[[5.0, 3.0, -6.0], [3.0, -4.0, 0.0]], [[-6.0, -6.0, 6.0], [6.0, 0.0, 5.0]], 
+[[2.0, 2.0, 7.0], [3.0, -6.0, -4.0]], [[5.0, -2.0, 0.0], [1.0, 4.0, 0.0]], [[-6.0, -2.0, -5.0], [-3.0, -1.0, -3.0]]], [[[-6.0, 
+0.0, 5.0], [-3.0, 4.0, -5.0]], [[5.0, 0.0, -2.0], [5.0, 2.0, 1.0]], [[-2.0, 0.0, -7.0], [-7.0, -7.0, -4.0]], [[-1.0, 3.0, 0.0], 
+[2.0, -5.0, 0.0]], [[4.0, 2.0, -7.0], [5.0, -2.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 3.0, 5.0], [0.0, 2.0, -2.0]], 
+[[-4.0, 0.0, -2.0], [-6.0, -3.0, -2.0]], [[5.0, 5.0, 1.0], [2.0, -7.0, 2.0]], [[0.0, -3.0, -2.0], [-4.0, 1.0, -5.0]], [[7.0, 
+-6.0, -5.0], [4.0, -7.0, 0.0]]], [[[6.0, 1.0, 1.0], [1.0, -7.0, -1.0]], [[5.0, -3.0, 5.0], [-1.0, 2.0, 1.0]], [[3.0, 6.0, 
+-5.0], [6.0, 5.0, 0.0]], [[-3.0, -2.0, -7.0], [-6.0, -1.0, 2.0]], [[1.0, -6.0, 0.0], [-5.0, -3.0, 4.0]]], [[[-7.0, -7.0, -2.0], 
+[0.0, -4.0, 3.0]], [[7.0, 4.0, -6.0], [3.0, 2.0, 7.0]], [[6.0, -3.0, -7.0], [-4.0, -1.0, -6.0]], [[-1.0, 3.0, -4.0], [-7.0, 
+2.0, -5.0]], [[-1.0, 1.0, -7.0], [-6.0, 7.0, -5.0]]], [[[6.0, 5.0, 0.0], [-3.0, 7.0, 3.0]], [[-1.0, 7.0, 0.0], [-2.0, 2.0, 
+-4.0]], [[-2.0, 7.0, 7.0], [0.0, 3.0, -2.0]], [[5.0, -1.0, 2.0], [6.0, 6.0, -2.0]], [[4.0, -3.0, 1.0], [-4.0, -6.0, -2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, 0.0, -5.0], [3.0, -7.0, -5.0]], [[7.0, 2.0, 0.0], [-1.0, 5.0, 
+7.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 4.0, -5.0], [1.0, -1.0, -6.0]], [[0.0, 0.0, 1.0], [3.0, -5.0, -2.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-6.0, 17.0], [-26.0, 59.0], [-78.0, 18.0], [-114.0, 7.0], [-6.0, 1.0]], [[6.0, -32.0], [-52.0, 
+15.0], [60.0, -39.0], [58.0, 10.0], [7.0, -72.0]], [[82.0, 18.0], [-55.0, -25.0], [42.0, -43.0], [-10.0, 50.0], [20.0, -69.0]], 
+[[-55.0, -54.0], [21.0, 47.0], [77.0, -70.0], [38.0, -28.0], [51.0, 52.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -1.0], [47.0, 
+-1.0], [-23.0, 38.0], [23.0, -9.0], [-37.0, 42.0]], [[-29.0, 41.0], [-81.0, -10.0], [29.0, -12.0], [31.0, -24.0], [-57.0, 
+-8.0]], [[17.0, 12.0], [-44.0, -21.0], [14.0, -2.0], [60.0, -25.0], [63.0, -50.0]], [[-50.0, -50.0], [55.0, -8.0], [16.0, 
+-4.0], [-37.0, -6.0], [-31.0, 23.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_expandedData_rank4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 4.0, 5.0], [6.0, 3.0, -1.0]], [[0.0, 7.0, -3.0], [0.0, 5.0, -2.0]], [[-2.0, 4.0, 
+-5.0], [4.0, 2.0, 4.0]], [[3.0, 5.0, 0.0], [-2.0, -7.0, 3.0]], [[1.0, 6.0, -6.0], [-3.0, 7.0, -5.0]]], [[[-5.0, 4.0, 5.0], 
+[6.0, -6.0, 0.0]], [[-7.0, -4.0, -7.0], [7.0, -6.0, -2.0]], [[-5.0, -6.0, 0.0], [-6.0, -1.0, 0.0]], [[-5.0, 1.0, 0.0], [0.0, 
+-5.0, -2.0]], [[4.0, 1.0, -1.0], [0.0, -7.0, 4.0]]], [[[4.0, -4.0, -5.0], [-6.0, 5.0, 1.0]], [[1.0, -1.0, -6.0], [-3.0, 0.0, 
+6.0]], [[-1.0, 3.0, 4.0], [2.0, 1.0, 2.0]], [[-5.0, 1.0, 7.0], [-5.0, -5.0, -5.0]], [[-2.0, 6.0, 1.0], [-5.0, -4.0, -5.0]]], 
+[[[0.0, -3.0, 0.0], [-3.0, 5.0, 3.0]], [[-6.0, 6.0, -1.0], [-4.0, -7.0, -3.0]], [[4.0, -3.0, -3.0], [4.0, 3.0, -4.0]], [[4.0, 
+-1.0, -4.0], [6.0, 5.0, -3.0]], [[2.0, 0.0, 7.0], [-5.0, -7.0, -1.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 5.0, 4.0], [3.0, 
+-5.0, 7.0]], [[3.0, -1.0, 0.0], [6.0, 3.0, -6.0]], [[3.0, -5.0, 7.0], [-4.0, 3.0, 0.0]], [[0.0, 0.0, -7.0], [-6.0, 2.0, 4.0]], 
+[[-7.0, -2.0, 7.0], [-2.0, 3.0, 5.0]]], [[[0.0, -3.0, -4.0], [2.0, 7.0, -3.0]], [[1.0, 1.0, 0.0], [0.0, 7.0, 5.0]], [[-3.0, 
+3.0, 0.0], [6.0, -6.0, 7.0]], [[1.0, 2.0, -5.0], [-6.0, 2.0, -6.0]], [[0.0, -1.0, 2.0], [7.0, -3.0, 1.0]]], [[[-5.0, -1.0, 
+7.0], [5.0, -1.0, -5.0]], [[3.0, 1.0, 3.0], [-3.0, 6.0, -4.0]], [[0.0, 0.0, -3.0], [3.0, -7.0, 5.0]], [[-5.0, 5.0, 7.0], [0.0, 
+3.0, -4.0]], [[-1.0, -7.0, -2.0], [-2.0, 7.0, 4.0]]], [[[0.0, 2.0, 0.0], [2.0, -1.0, -7.0]], [[1.0, 2.0, 0.0], [-6.0, -2.0, 
+-3.0]], [[0.0, -4.0, 1.0], [7.0, -6.0, 2.0]], [[6.0, -1.0, -4.0], [7.0, -2.0, 1.0]], [[-1.0, -7.0, -4.0], [-1.0, 5.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-7.0, -4.0, -1.0], [7.0, -3.0, -1.0]], [[-4.0, -4.0, -5.0], [0.0, -2.0, -4.0]], [[-3.0, 
+6.0, -4.0], [-6.0, 1.0, 0.0]], [[-2.0, 1.0, 1.0], [-6.0, -6.0, 3.0]], [[2.0, -6.0, 6.0], [2.0, -6.0, 5.0]]], [[[-3.0, -3.0, 
+-6.0], [0.0, -3.0, -3.0]], [[0.0, -6.0, 7.0], [-1.0, -5.0, -7.0]], [[1.0, -2.0, 0.0], [-4.0, -1.0, 3.0]], [[4.0, -1.0, 4.0], 
+[3.0, 4.0, -6.0]], [[1.0, 1.0, 7.0], [0.0, -6.0, -2.0]]], [[[-4.0, 7.0, -3.0], [-1.0, 0.0, 7.0]], [[-7.0, 4.0, -3.0], [-7.0, 
+0.0, 2.0]], [[0.0, 7.0, -1.0], [-3.0, -7.0, -1.0]], [[1.0, 4.0, 5.0], [0.0, 3.0, 0.0]], [[7.0, -6.0, 6.0], [7.0, -3.0, 5.0]]], 
+[[[-6.0, -3.0, -7.0], [1.0, 7.0, -4.0]], [[2.0, 3.0, 5.0], [0.0, -3.0, 5.0]], [[0.0, 7.0, -7.0], [-6.0, 6.0, 2.0]], [[3.0, 
+-7.0, 3.0], [6.0, 5.0, -3.0]], [[5.0, -4.0, -6.0], [3.0, 2.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, 7.0, 0.0], [-5.0, 
+0.0, -3.0]], [[-5.0, -7.0, -2.0], [6.0, -1.0, -7.0]], [[-6.0, 1.0, 0.0], [5.0, -7.0, -2.0]], [[-1.0, -3.0, -6.0], [0.0, -4.0, 
+7.0]], [[4.0, -6.0, -1.0], [-2.0, -5.0, 7.0]]], [[[3.0, -4.0, 5.0], [-7.0, 6.0, -3.0]], [[0.0, 1.0, -6.0], [-5.0, 6.0, -2.0]], 
+[[2.0, 0.0, -5.0], [-1.0, -2.0, 5.0]], [[-1.0, 6.0, 6.0], [2.0, 7.0, 1.0]], [[2.0, 4.0, 5.0], [0.0, 7.0, -1.0]]], [[[-6.0, 
+-3.0, -7.0], [2.0, 1.0, -5.0]], [[-6.0, -5.0, 0.0], [6.0, -6.0, 6.0]], [[-1.0, 5.0, -4.0], [-6.0, 7.0, 6.0]], [[3.0, -7.0, 
+6.0], [-4.0, 1.0, 5.0]], [[-1.0, -1.0, -3.0], [-3.0, 3.0, 5.0]]], [[[0.0, -4.0, -3.0], [-4.0, 1.0, -7.0]], [[-1.0, 5.0, -4.0], 
+[-4.0, -4.0, 1.0]], [[0.0, -1.0, 3.0], [4.0, 2.0, 3.0]], [[-7.0, 0.0, 3.0], [4.0, -1.0, -1.0]], [[-7.0, 0.0, 0.0], [3.0, 3.0, 
+3.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-22.0, -63.0, -44.0, -58.0, 5.0], [-63.0, -3.0, -33.0, 72.0, 28.0], [-20.0, -78.0, -15.0, 
+55.0, 69.0], [-46.0, 33.0, -27.0, 56.0, 3.0]], [[-38.0, -15.0, 59.0, -32.0, -100.0], [-12.0, -74.0, -25.0, 13.0, -40.0], [44.0, 
+33.0, 19.0, 28.0, -85.0], [43.0, -19.0, 96.0, -27.0, 0.0]], [[21.0, -3.0, 28.0, -21.0, -42.0], [6.0, -101.0, -16.0, -36.0, 
+-53.0], [75.0, 25.0, 3.0, -5.0, -26.0], [37.0, -3.0, 59.0, -27.0, 20.0]], [[-37.0, -30.0, 26.0, 62.0, 29.0], [-12.0, -14.0, 
+17.0, -45.0, 44.0], [46.0, 19.0, 87.0, 2.0, 13.0], [-96.0, 57.0, 11.0, -82.0, -25.0]], [[-62.0, 8.0, 82.0, -41.0, -143.0], 
+[9.0, -75.0, -21.0, 23.0, -67.0], [24.0, 46.0, 13.0, 16.0, -132.0], [84.0, -56.0, 134.0, -25.0, 22.0]]], [[[74.0, -9.0, -23.0, 
+19.0, 44.0], [-9.0, 35.0, -31.0, -10.0, 70.0], [27.0, -6.0, 47.0, 18.0, 31.0], [-53.0, 45.0, -79.0, -22.0, -65.0]], [[141.0, 
+99.0, -23.0, -9.0, 8.0], [99.0, 12.0, -27.0, -43.0, -20.0], [0.0, 1.0, 2.0, -76.0, -10.0], [76.0, -53.0, -61.0, 4.0, 32.0]], 
+[[20.0, 46.0, 14.0, 46.0, 20.0], [36.0, 47.0, 32.0, -36.0, -5.0], [-16.0, 53.0, -17.0, -32.0, -38.0], [35.0, -25.0, -12.0, 
+-14.0, -21.0]], [[48.0, 34.0, 16.0, 35.0, 4.0], [33.0, 33.0, -8.0, -29.0, 30.0], [13.0, 35.0, 44.0, -16.0, -36.0], [0.0, -2.0, 
+-27.0, -41.0, -39.0]], [[-14.0, -17.0, -9.0, 46.0, 58.0], [0.0, -6.0, 21.0, -41.0, 32.0], [22.0, -13.0, 53.0, -18.0, 57.0], 
+[-85.0, 47.0, -20.0, -45.0, 8.0]]], [[[-65.0, 11.0, 25.0, -8.0, -35.0], [12.0, -37.0, 34.0, -4.0, -67.0], [-16.0, 15.0, -41.0, 
+-22.0, -30.0], [48.0, -39.0, 75.0, 11.0, 58.0]], [[-24.0, 6.0, 33.0, 27.0, -4.0], [18.0, -75.0, 33.0, -64.0, -54.0], [52.0, 
+40.0, 2.0, -33.0, -14.0], [12.0, -1.0, 65.0, -44.0, 36.0]], [[0.0, -38.0, -6.0, -3.0, 12.0], [-39.0, -11.0, -10.0, 7.0, 20.0], 
+[25.0, -3.0, 2.0, 34.0, 20.0], [-30.0, 34.0, -9.0, -1.0, -33.0]], [[9.0, 11.0, 18.0, 63.0, 21.0], [0.0, 108.0, 3.0, 2.0, 85.0], 
+[-24.0, 43.0, 55.0, 19.0, -44.0], [-42.0, 18.0, -52.0, -41.0, -96.0]], [[-29.0, 7.0, 64.0, 50.0, -45.0], [9.0, 31.0, -5.0, 
+-11.0, 45.0], [17.0, 60.0, 89.0, 15.0, -92.0], [-26.0, 6.0, 31.0, -80.0, -63.0]]], [[[-27.0, -10.0, 5.0, -6.0, -3.0], [-15.0, 
+-25.0, 22.0, -4.0, -39.0], [3.0, 15.0, -50.0, 3.0, -3.0], [29.0, -9.0, 33.0, 19.0, 13.0]], [[15.0, 31.0, 75.0, 74.0, -35.0], 
+[36.0, 17.0, -4.0, -56.0, 41.0], [52.0, 91.0, 107.0, -8.0, -106.0], [-16.0, 7.0, 25.0, -113.0, -74.0]], [[10.0, 21.0, -39.0, 
+-68.0, -22.0], [18.0, 6.0, -21.0, 55.0, -30.0], [-60.0, -67.0, -47.0, -14.0, 27.0], [47.0, -45.0, -14.0, 75.0, 68.0]], [[10.0, 
+10.0, -33.0, -88.0, -43.0], [9.0, -32.0, -32.0, 57.0, -49.0], [-38.0, -68.0, -53.0, -5.0, 22.0], [60.0, -45.0, 9.0, 77.0, 
+76.0]], [[-34.0, -25.0, -11.0, 72.0, 73.0], [-24.0, 96.0, 26.0, -1.0, 95.0], [-31.0, -2.0, 58.0, 16.0, 37.0], [-111.0, 55.0, 
+-63.0, -35.0, -61.0]]]])+(1.-msk_ref)*numpy.array([[[[-1.0, -69.0, 41.0, 30.0, 34.0], [-72.0, -78.0, 22.0, 32.0, -2.0], [-77.0, 
+65.0, -2.0, 7.0, -6.0], [-98.0, 24.0, 30.0, 22.0, 15.0]], [[-37.0, 67.0, 2.0, -54.0, -51.0], [7.0, -1.0, -36.0, 18.0, 29.0], 
+[30.0, -31.0, -59.0, -35.0, -41.0], [25.0, -50.0, 13.0, 6.0, -12.0]], [[-33.0, -21.0, -64.0, -42.0, 28.0], [110.0, -9.0, -31.0, 
+22.0, 42.0], [-57.0, -35.0, -11.0, 105.0, 2.0], [18.0, -52.0, 16.0, -19.0, -24.0]], [[18.0, -52.0, -52.0, 62.0, 37.0], [7.0, 
+76.0, 57.0, -36.0, -25.0], [19.0, -24.0, 102.0, 4.0, 65.0], [19.0, 48.0, -29.0, -51.0, 0.0]], [[23.0, -15.0, -1.0, -6.0, 1.0], 
+[39.0, -26.0, -28.0, 59.0, 29.0], [-27.0, 52.0, 32.0, 71.0, 28.0], [-37.0, -30.0, 36.0, 54.0, 67.0]]], [[[-22.0, 55.0, -36.0, 
+-16.0, -38.0], [29.0, 59.0, -11.0, 8.0, 20.0], [63.0, -33.0, 20.0, -19.0, 15.0], [44.0, -38.0, 4.0, -8.0, 18.0]], [[-14.0, 
+-54.0, -64.0, 3.0, -2.0], [26.0, 33.0, 13.0, 59.0, 50.0], [-27.0, -23.0, 83.0, 28.0, 44.0], [-32.0, -19.0, 28.0, -19.0, 29.0]], 
+[[-12.0, -13.0, 79.0, 67.0, 37.0], [-120.0, -77.0, 35.0, -2.0, -43.0], [-20.0, 117.0, -18.0, -25.0, -1.0], [-91.0, 25.0, 30.0, 
+44.0, 42.0]], [[56.0, -5.0, -36.0, -27.0, -43.0], [42.0, 86.0, -1.0, -23.0, 5.0], [43.0, -100.0, 43.0, -45.0, 6.0], [75.0, 
+39.0, -55.0, -42.0, -37.0]], [[-45.0, 41.0, 53.0, 10.0, 12.0], [-56.0, -68.0, -6.0, 0.0, -16.0], [-5.0, 71.0, -70.0, -7.0, 
+-30.0], [-40.0, -28.0, 32.0, 36.0, 15.0]]], [[[13.0, 84.0, 71.0, -65.0, -61.0], [-2.0, -64.0, -73.0, 39.0, 19.0], [18.0, 41.0, 
+-95.0, -12.0, -58.0], [-3.0, -49.0, 25.0, 82.0, 32.0]], [[16.0, -24.0, -66.0, -76.0, -49.0], [89.0, 42.0, -38.0, 53.0, 71.0], 
+[-22.0, -101.0, 26.0, 18.0, -6.0], [33.0, -26.0, -4.0, -26.0, -24.0]], [[-30.0, -4.0, 54.0, 81.0, 67.0], [-93.0, -49.0, 51.0, 
+-56.0, -69.0], [-5.0, 90.0, -25.0, -12.0, 4.0], [-45.0, 33.0, 4.0, 5.0, 3.0]], [[77.0, 1.0, 22.0, -92.0, -100.0], [30.0, -11.0, 
+-71.0, 94.0, 70.0], [-11.0, -37.0, -1.0, -25.0, -32.0], [-10.0, -14.0, 10.0, 57.0, 32.0]], [[-45.0, 11.0, -68.0, 34.0, 37.0], 
+[59.0, 49.0, 16.0, -4.0, 5.0], [24.0, 11.0, 59.0, 69.0, 61.0], [21.0, -42.0, 19.0, -18.0, 34.0]]], [[[25.0, 48.0, 33.0, -51.0, 
+-60.0], [-7.0, 0.0, -35.0, 2.0, 8.0], [32.0, -34.0, -51.0, -58.0, -46.0], [32.0, -1.0, -17.0, 16.0, -18.0]], [[47.0, -32.0, 
+-14.0, -20.0, -7.0], [34.0, 26.0, -3.0, -18.0, -1.0], [-11.0, -58.0, 13.0, -4.0, -6.0], [35.0, 38.0, -39.0, -26.0, -40.0]], 
+[[-69.0, 60.0, 69.0, 44.0, 53.0], [-70.0, -85.0, 10.0, -44.0, -55.0], [3.0, 110.0, -96.0, 10.0, -28.0], [-35.0, -26.0, 29.0, 
+35.0, 9.0]], [[-81.0, 22.0, 10.0, 36.0, 37.0], [-62.0, -26.0, 34.0, -35.0, -27.0], [2.0, 29.0, -45.0, -24.0, -15.0], [-21.0, 
+-14.0, 16.0, -25.0, -24.0]], [[-35.0, 58.0, -39.0, 19.0, 12.0], [45.0, 54.0, 4.0, -33.0, -14.0], [63.0, -1.0, 17.0, 26.0, 
+33.0], [56.0, -35.0, -2.0, -13.0, 16.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      
+      
+      
+      
+      
+      
+      
+      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_float_rank0_offset0(self):
+      arg0=-5.0
+      arg1=7.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=-35.0
+      self.assertTrue(isinstance(res,float),"wrong type of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_array_rank0_offset0(self):
+      arg0=0.0
+      arg1=numpy.array(-7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(-0.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result."+str(type(res)))
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=numpy.array(arg1*1j)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=-ref
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result."+str(type(res)))
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_array_rank1_offset0(self):
+      arg0=4.0
+      arg1=numpy.array([-2.0, 3.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([-8.0, 12.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_array_rank2_offset0(self):
+      arg0=0.0
+      arg1=numpy.array([[1.0, 0.0, 7.0, 4.0, 5.0], [6.0, -3.0, 5.0, 0.0, 2.0], [2.0, 6.0, -6.0, -1.0, 7.0], [0.0, -3.0, 6.0, 
+1.0, 4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 
+0.0, 0.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_array_rank3_offset0(self):
+      arg0=-6.0
+      arg1=numpy.array([[[3.0, 6.0], [1.0, -6.0]], [[-3.0, -3.0], [-4.0, -2.0]], [[4.0, -4.0], [4.0, -2.0]], [[5.0, 1.0], [6.0, 
+4.0]], [[0.0, 0.0], [2.0, 7.0]], [[-3.0, -1.0], [6.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-18.0, -36.0], [-6.0, 36.0]], [[18.0, 18.0], [24.0, 12.0]], [[-24.0, 24.0], [-24.0, 12.0]], [[-30.0, 
+-6.0], [-36.0, -24.0]], [[-0.0, -0.0], [-12.0, -42.0]], [[18.0, 6.0], [-36.0, -0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_array_rank4_offset0(self):
+      arg0=-4.0
+      arg1=numpy.array([[[[-1.0, -5.0, -2.0, 2.0], [1.0, 3.0, -3.0, 4.0], [-6.0, 2.0, 4.0, 7.0]], [[4.0, 7.0, -3.0, 0.0], [3.0, 
+-7.0, 1.0, -5.0], [0.0, 2.0, -4.0, 2.0]]], [[[0.0, 0.0, -3.0, 3.0], [0.0, 4.0, 7.0, -4.0], [6.0, 7.0, 0.0, -6.0]], [[1.0, -6.0, 
+-4.0, 4.0], [4.0, 7.0, -5.0, 6.0], [1.0, 3.0, 0.0, -5.0]]], [[[0.0, 7.0, -3.0, 0.0], [1.0, 0.0, 1.0, -4.0], [7.0, 1.0, -4.0, 
+4.0]], [[-2.0, 5.0, -4.0, -5.0], [-4.0, 2.0, -3.0, 7.0], [-2.0, 1.0, 6.0, -3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[4.0, 20.0, 8.0, -8.0], [-4.0, -12.0, 12.0, -16.0], [24.0, -8.0, -16.0, -28.0]], [[-16.0, -28.0, 12.0, 
+-0.0], [-12.0, 28.0, -4.0, 20.0], [-0.0, -8.0, 16.0, -8.0]]], [[[-0.0, -0.0, 12.0, -12.0], [-0.0, -16.0, -28.0, 16.0], [-24.0, 
+-28.0, -0.0, 24.0]], [[-4.0, 24.0, 16.0, -16.0], [-16.0, -28.0, 20.0, -24.0], [-4.0, -12.0, -0.0, 20.0]]], [[[-0.0, -28.0, 
+12.0, -0.0], [-4.0, -0.0, -4.0, 16.0], [-28.0, -4.0, 16.0, -16.0]], [[8.0, -20.0, 16.0, 20.0], [16.0, -8.0, 12.0, -28.0], [8.0, 
+-4.0, -24.0, 12.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_constData_rank0_offset0(self):
+      arg0=6.0
+      arg1=Data(-1.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-6.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_constData_rank1_offset0(self):
+      arg0=0.0
+      arg1=Data(numpy.array([-4.0, 6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, 0.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_constData_rank2_offset0(self):
+      arg0=0.0
+      arg1=Data(numpy.array([[-1.0, 0.0, 2.0, 1.0, 3.0], [-3.0, 3.0, 1.0, -4.0, 0.0], [-5.0, 7.0, -6.0, -5.0, 7.0], [6.0, 6.0, 
+-2.0, 7.0, 5.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 
+-0.0, 0.0, 0.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_constData_rank3_offset0(self):
+      arg0=2.0
+      arg1=Data(numpy.array([[[1.0, -6.0], [0.0, 0.0]], [[1.0, 0.0], [-5.0, 2.0]], [[4.0, 2.0], [-5.0, 7.0]], [[3.0, 0.0], 
+[-6.0, 0.0]], [[2.0, 2.0], [-2.0, -2.0]], [[4.0, -6.0], [0.0, -1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[2.0, -12.0], [0.0, 0.0]], [[2.0, 0.0], [-10.0, 4.0]], [[8.0, 4.0], [-10.0, 14.0]], [[6.0, 0.0], 
+[-12.0, 0.0]], [[4.0, 4.0], [-4.0, -4.0]], [[8.0, -12.0], [0.0, -2.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_constData_rank4_offset0(self):
+      arg0=6.0
+      arg1=Data(numpy.array([[[[7.0, 4.0, -1.0, -6.0], [1.0, -4.0, 3.0, -6.0], [6.0, -7.0, -6.0, 3.0]], [[-1.0, -2.0, -1.0, 
+-1.0], [4.0, 5.0, 4.0, -4.0], [-2.0, -6.0, 2.0, 5.0]]], [[[3.0, -4.0, 7.0, -4.0], [0.0, -6.0, 1.0, 6.0], [5.0, 4.0, -4.0, 
+-1.0]], [[0.0, 7.0, 0.0, 4.0], [5.0, 5.0, -3.0, 1.0], [4.0, 2.0, -7.0, -1.0]]], [[[-2.0, 1.0, 7.0, -2.0], [-7.0, 6.0, -4.0, 
+1.0], [-1.0, -6.0, -3.0, 0.0]], [[-7.0, 5.0, 4.0, 5.0], [7.0, -6.0, 7.0, 0.0], [0.0, 0.0, -3.0, 0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[42.0, 24.0, -6.0, -36.0], [6.0, -24.0, 18.0, -36.0], [36.0, -42.0, -36.0, 18.0]], [[-6.0, -12.0, 
+-6.0, -6.0], [24.0, 30.0, 24.0, -24.0], [-12.0, -36.0, 12.0, 30.0]]], [[[18.0, -24.0, 42.0, -24.0], [0.0, -36.0, 6.0, 36.0], 
+[30.0, 24.0, -24.0, -6.0]], [[0.0, 42.0, 0.0, 24.0], [30.0, 30.0, -18.0, 6.0], [24.0, 12.0, -42.0, -6.0]]], [[[-12.0, 6.0, 
+42.0, -12.0], [-42.0, 36.0, -24.0, 6.0], [-6.0, -36.0, -18.0, 0.0]], [[-42.0, 30.0, 24.0, 30.0], [42.0, -36.0, 42.0, 0.0], 
+[0.0, 0.0, -18.0, 0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank0_offset0(self):
+      arg0=6.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-6.0)+(1-msk_arg1)*(2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-36.0)+(1.-msk_ref)*numpy.array(12.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank1_offset0(self):
+      arg0=1.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-1.0, 4.0])+(1.-msk_arg1)*numpy.array([3.0, 3.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-1.0, 4.0])+(1.-msk_ref)*numpy.array([3.0, 3.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank2_offset0(self):
+      arg0=7.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, 3.0, -7.0, -2.0, -7.0], [-7.0, 0.0, 3.0, -7.0, 3.0], [7.0, 3.0, -6.0, -6.0, 7.0], [0.0, 
+0.0, 2.0, -2.0, -1.0]])+(1.-msk_arg1)*numpy.array([[0.0, -7.0, 3.0, 1.0, -2.0], [6.0, 4.0, 0.0, -2.0, 7.0], [0.0, 1.0, -7.0, 
+5.0, 4.0], [2.0, 2.0, -4.0, 6.0, -1.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-42.0, 21.0, -49.0, -14.0, -49.0], [-49.0, 0.0, 21.0, -49.0, 21.0], [49.0, 21.0, -42.0, -42.0, 
+49.0], [0.0, 0.0, 14.0, -14.0, -7.0]])+(1.-msk_ref)*numpy.array([[0.0, -49.0, 21.0, 7.0, -14.0], [42.0, 28.0, 0.0, -14.0, 
+49.0], [0.0, 7.0, -49.0, 35.0, 28.0], [14.0, 14.0, -28.0, 42.0, -7.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank3_offset0(self):
+      arg0=0.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[5.0, -4.0], [2.0, -2.0]], [[0.0, 0.0], [6.0, 5.0]], [[-6.0, 4.0], [-3.0, 0.0]], [[2.0, 
+-3.0], [0.0, -5.0]], [[4.0, 3.0], [0.0, 3.0]], [[7.0, 6.0], [2.0, 4.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, -2.0], [0.0, 3.0]], 
+[[-6.0, -4.0], [-5.0, 5.0]], [[-4.0, 7.0], [1.0, -7.0]], [[4.0, 5.0], [-3.0, 7.0]], [[-4.0, 4.0], [-1.0, -2.0]], [[5.0, -2.0], 
+[-6.0, 5.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, -0.0], [0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[0.0, -0.0], 
+[0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -0.0], [0.0, 0.0]], [[-0.0, 
+-0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [-0.0, -0.0]], [[0.0, -0.0], [-0.0, 
+0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank4_offset0(self):
+      arg0=3.0
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, -2.0, 6.0], [-5.0, 6.0, 0.0, -3.0], [-6.0, -7.0, -4.0, -6.0]], [[-3.0, -2.0, 1.0, 
+5.0], [5.0, -2.0, 6.0, -3.0], [0.0, -5.0, 1.0, -2.0]]], [[[-4.0, -6.0, 4.0, 0.0], [2.0, 2.0, -5.0, -6.0], [7.0, 1.0, 5.0, 
+3.0]], [[-6.0, 1.0, 0.0, -4.0], [-3.0, 3.0, 4.0, -1.0], [7.0, 6.0, 0.0, 6.0]]], [[[4.0, -6.0, 1.0, -5.0], [0.0, -1.0, 4.0, 
+-4.0], [1.0, -4.0, 0.0, 0.0]], [[2.0, -5.0, 6.0, 4.0], [6.0, 5.0, -1.0, 0.0], [7.0, 1.0, 4.0, 
+3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, -4.0, 7.0, -4.0], [3.0, -4.0, 1.0, 0.0], [-2.0, 3.0, 7.0, 6.0]], [[-5.0, -3.0, 
+4.0, -7.0], [0.0, 0.0, 4.0, 0.0], [-6.0, -6.0, 0.0, -4.0]]], [[[-1.0, -6.0, -6.0, 0.0], [0.0, 2.0, 7.0, -7.0], [3.0, 3.0, 2.0, 
+-5.0]], [[7.0, 5.0, 7.0, 5.0], [4.0, 4.0, -4.0, 6.0], [0.0, -5.0, 6.0, -7.0]]], [[[0.0, 7.0, -3.0, 2.0], [6.0, -6.0, 7.0, 4.0], 
+[-6.0, -6.0, 6.0, -6.0]], [[0.0, 4.0, 3.0, 4.0], [-7.0, -2.0, 7.0, -3.0], [-5.0, 5.0, -4.0, -4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0, -6.0, 18.0], [-15.0, 18.0, 0.0, -9.0], [-18.0, -21.0, -12.0, -18.0]], [[-9.0, -6.0, 
+3.0, 15.0], [15.0, -6.0, 18.0, -9.0], [0.0, -15.0, 3.0, -6.0]]], [[[-12.0, -18.0, 12.0, 0.0], [6.0, 6.0, -15.0, -18.0], [21.0, 
+3.0, 15.0, 9.0]], [[-18.0, 3.0, 0.0, -12.0], [-9.0, 9.0, 12.0, -3.0], [21.0, 18.0, 0.0, 18.0]]], [[[12.0, -18.0, 3.0, -15.0], 
+[0.0, -3.0, 12.0, -12.0], [3.0, -12.0, 0.0, 0.0]], [[6.0, -15.0, 18.0, 12.0], [18.0, 15.0, -3.0, 0.0], [21.0, 3.0, 12.0, 
+9.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -12.0, 21.0, -12.0], [9.0, -12.0, 3.0, 0.0], [-6.0, 9.0, 21.0, 18.0]], [[-15.0, 
+-9.0, 12.0, -21.0], [0.0, 0.0, 12.0, 0.0], [-18.0, -18.0, 0.0, -12.0]]], [[[-3.0, -18.0, -18.0, 0.0], [0.0, 6.0, 21.0, -21.0], 
+[9.0, 9.0, 6.0, -15.0]], [[21.0, 15.0, 21.0, 15.0], [12.0, 12.0, -12.0, 18.0], [0.0, -15.0, 18.0, -21.0]]], [[[0.0, 21.0, -9.0, 
+6.0], [18.0, -18.0, 21.0, 12.0], [-18.0, -18.0, 18.0, -18.0]], [[0.0, 12.0, 9.0, 12.0], [-21.0, -6.0, 21.0, -9.0], [-15.0, 
+15.0, -12.0, -12.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_float_rank0_offset0(self):
+      arg0=numpy.array(4.0)
+      arg1=-4.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(-16.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_array_rank0_offset0(self):
+      arg0=numpy.array(0.0)
+      arg1=numpy.array(7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array(0.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank1_offset1(self):
+      arg0=numpy.array([6.0, -2.0, 3.0])
+      arg1=numpy.array([3.0, -1.0, 3.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array(29.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank2_offset2(self):
+      arg0=numpy.array([[5.0, 1.0, 0.0], [-3.0, -7.0, 4.0]])
+      arg1=numpy.array([[-5.0, 1.0, 3.0], [-6.0, -4.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array(22.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank3_offset3(self):
+      arg0=numpy.array([[[-1.0, 3.0, -1.0], [0.0, 0.0, -6.0], [-5.0, 7.0, 7.0], [1.0, 7.0, -6.0]], [[5.0, -2.0, -3.0], [6.0, 
+5.0, -3.0], [-2.0, 4.0, 6.0], [-1.0, 2.0, -6.0]]])
+      arg1=numpy.array([[[-5.0, -2.0, 6.0], [4.0, 1.0, 6.0], [-3.0, 1.0, 6.0], [-3.0, 4.0, 0.0]], [[0.0, -2.0, -1.0], [0.0, 
+1.0, 5.0], [-7.0, 0.0, 0.0], [7.0, -5.0, 4.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array(16.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank4_offset4(self):
+      arg0=numpy.array([[[[5.0, -7.0], [-1.0, 1.0], [-4.0, 4.0]], [[-4.0, -4.0], [-3.0, 0.0], [7.0, 3.0]]], [[[0.0, 0.0], [5.0, 
+7.0], [-5.0, -4.0]], [[1.0, 4.0], [3.0, -2.0], [0.0, -6.0]]], [[[2.0, -3.0], [-3.0, -3.0], [-1.0, 7.0]], [[7.0, -1.0], [-1.0, 
+-7.0], [-7.0, -6.0]]], [[[1.0, -6.0], [0.0, 0.0], [-1.0, 2.0]], [[5.0, 4.0], [-4.0, 6.0], [-6.0, -4.0]]]])
+      arg1=numpy.array([[[[-4.0, 7.0], [2.0, 4.0], [-1.0, -4.0]], [[2.0, 2.0], [-4.0, -7.0], [-2.0, 4.0]]], [[[0.0, 0.0], 
+[-5.0, -6.0], [0.0, -1.0]], [[0.0, 3.0], [6.0, -1.0], [-3.0, 5.0]]], [[[5.0, 0.0], [-1.0, -4.0], [-1.0, 3.0]], [[0.0, 1.0], 
+[-6.0, -6.0], [-6.0, -2.0]]], [[[-4.0, 6.0], [7.0, 4.0], [7.0, 7.0]], [[5.0, -6.0], [-6.0, 4.0], [5.0, -1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=numpy.array(-8.0)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_array_rank1_offset0(self):
+      arg0=numpy.array(4.0)
+      arg1=numpy.array([-3.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([-12.0, 28.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank2_offset1(self):
+      arg0=numpy.array([-3.0, -4.0, -2.0])
+      arg1=numpy.array([[6.0, 4.0, 7.0], [-7.0, 7.0, -2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([-48.0, -3.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank3_offset2(self):
+      arg0=numpy.array([[7.0, 1.0, 2.0], [3.0, 3.0, 1.0]])
+      arg1=numpy.array([[[5.0, 2.0, -7.0], [-3.0, 5.0, 2.0]], [[-2.0, -3.0, 3.0], [3.0, 1.0, -3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([31.0, -2.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank4_offset3(self):
+      arg0=numpy.array([[[-6.0, 1.0, -3.0], [3.0, 5.0, -6.0], [3.0, -3.0, -2.0], [1.0, 5.0, 2.0]], [[3.0, 0.0, 3.0], [7.0, 
+-7.0, 7.0], [-6.0, -6.0, 0.0], [-1.0, 0.0, -3.0]]])
+      arg1=numpy.array([[[[3.0, -6.0, 1.0], [-1.0, 0.0, 7.0], [3.0, -6.0, 1.0], [1.0, -2.0, 6.0]], [[-2.0, 5.0, -6.0], [3.0, 
+-7.0, -4.0], [-7.0, 2.0, -4.0], [-7.0, 2.0, -6.0]]], [[[6.0, 4.0, 6.0], [-6.0, -3.0, -1.0], [-3.0, 0.0, -7.0], [6.0, 3.0, 
+-1.0]], [[3.0, -5.0, -3.0], [7.0, 0.0, 1.0], [6.0, -1.0, 0.0], [-7.0, 5.0, -4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([29.0, -8.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_array_rank2_offset0(self):
+      arg0=numpy.array(-2.0)
+      arg1=numpy.array([[3.0, 4.0, -5.0, 3.0, 1.0], [3.0, -4.0, -4.0, 2.0, -2.0], [1.0, 5.0, 4.0, -3.0, 6.0], [-2.0, 0.0, -3.0, 
+2.0, 6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-6.0, -8.0, 10.0, -6.0, -2.0], [-6.0, 8.0, 8.0, -4.0, 4.0], [-2.0, -10.0, -8.0, 6.0, -12.0], [4.0, 
+-0.0, 6.0, -4.0, -12.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank3_offset1(self):
+      arg0=numpy.array([5.0, -6.0, 7.0])
+      arg1=numpy.array([[[7.0, 3.0, -1.0], [6.0, -6.0, 6.0], [-7.0, -5.0, -1.0], [5.0, -5.0, -4.0], [4.0, -3.0, 1.0]], [[-3.0, 
+0.0, 5.0], [4.0, 4.0, -4.0], [2.0, 7.0, 7.0], [-1.0, -4.0, 1.0], [4.0, 4.0, 0.0]], [[2.0, -4.0, -1.0], [-2.0, 0.0, 2.0], [0.0, 
+0.0, 1.0], [7.0, 5.0, 0.0], [0.0, 2.0, -3.0]], [[0.0, -4.0, 2.0], [1.0, -5.0, -7.0], [-6.0, -1.0, -4.0], [-2.0, -7.0, -7.0], 
+[-6.0, 5.0, -7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[10.0, 108.0, -12.0, 27.0, 45.0], [20.0, -32.0, 17.0, 26.0, -4.0], [27.0, 4.0, 7.0, 5.0, -33.0], [38.0, 
+-14.0, -52.0, -17.0, -109.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank4_offset2(self):
+      arg0=numpy.array([[6.0, -2.0, 1.0], [0.0, -2.0, -3.0]])
+      arg1=numpy.array([[[[6.0, -7.0, -5.0], [0.0, 5.0, -6.0]], [[-5.0, -3.0, 0.0], [0.0, 2.0, 1.0]], [[3.0, -4.0, 7.0], [-6.0, 
+5.0, 5.0]], [[2.0, -7.0, -1.0], [-6.0, -4.0, -2.0]], [[-1.0, -4.0, 7.0], [6.0, 2.0, 0.0]]], [[[-5.0, -5.0, 7.0], [1.0, 7.0, 
+7.0]], [[1.0, 7.0, 2.0], [5.0, -4.0, -6.0]], [[0.0, -5.0, 2.0], [6.0, -3.0, 3.0]], [[2.0, 7.0, -3.0], [3.0, -2.0, -4.0]], 
+[[-7.0, 7.0, -7.0], [3.0, -5.0, 7.0]]], [[[-2.0, 7.0, -5.0], [4.0, 5.0, 0.0]], [[4.0, 6.0, 0.0], [2.0, 1.0, 3.0]], [[-4.0, 
+-4.0, 4.0], [-6.0, 0.0, -7.0]], [[0.0, -1.0, -2.0], [0.0, 6.0, 0.0]], [[-2.0, 2.0, -3.0], [2.0, -3.0, 3.0]]], [[[-3.0, -5.0, 
+-1.0], [-2.0, 5.0, -2.0]], [[1.0, 1.0, 3.0], [-6.0, 0.0, 1.0]], [[6.0, 2.0, -1.0], [-4.0, 2.0, 3.0]], [[4.0, -6.0, -4.0], [2.0, 
+5.0, 0.0]], [[-6.0, -7.0, 5.0], [7.0, -5.0, -7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[53.0, -31.0, 8.0, 39.0, 5.0], [-48.0, 20.0, 9.0, 11.0, -74.0], [-41.0, 1.0, 9.0, -12.0, -22.0], [-13.0, 
+4.0, 18.0, 22.0, 14.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_array_rank3_offset0(self):
+      arg0=numpy.array(-7.0)
+      arg1=numpy.array([[[2.0, -3.0], [-2.0, 0.0]], [[-6.0, -4.0], [2.0, -6.0]], [[1.0, -4.0], [0.0, 1.0]], [[1.0, 5.0], [-7.0, 
+-4.0]], [[-3.0, 3.0], [-4.0, 0.0]], [[5.0, -5.0], [0.0, 7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-14.0, 21.0], [14.0, -0.0]], [[42.0, 28.0], [-14.0, 42.0]], [[-7.0, 28.0], [-0.0, -7.0]], [[-7.0, 
+-35.0], [49.0, 28.0]], [[21.0, -21.0], [28.0, -0.0]], [[-35.0, 35.0], [-0.0, -49.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank4_offset1(self):
+      arg0=numpy.array([-2.0, -6.0, -2.0])
+      arg1=numpy.array([[[[4.0, 5.0, 2.0], [1.0, 0.0, 2.0]], [[5.0, -1.0, 5.0], [-1.0, -1.0, 7.0]]], [[[4.0, 0.0, 0.0], [-4.0, 
+-1.0, -5.0]], [[4.0, 0.0, -3.0], [-7.0, 2.0, 4.0]]], [[[4.0, 2.0, 0.0], [-1.0, 7.0, 0.0]], [[-5.0, -1.0, 6.0], [5.0, -2.0, 
+6.0]]], [[[4.0, 0.0, -7.0], [7.0, 2.0, -6.0]], [[4.0, -3.0, -7.0], [-6.0, 4.0, 5.0]]], [[[-3.0, 1.0, 7.0], [1.0, 2.0, 6.0]], 
+[[0.0, -1.0, 6.0], [-5.0, 5.0, 3.0]]], [[[7.0, -3.0, -3.0], [2.0, 4.0, 0.0]], [[4.0, -6.0, -3.0], [-5.0, -5.0, -5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-42.0, -6.0], [-14.0, -6.0]], [[-8.0, 24.0], [-2.0, -6.0]], [[-20.0, -40.0], [4.0, -10.0]], [[6.0, 
+-14.0], [24.0, -22.0]], [[-14.0, -26.0], [-6.0, -26.0]], [[10.0, -28.0], [34.0, 50.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_array_rank4_offset0(self):
+      arg0=numpy.array(-2.0)
+      arg1=numpy.array([[[[-2.0, 4.0, -2.0, -5.0], [3.0, -3.0, -4.0, 7.0], [6.0, 0.0, -7.0, -3.0]], [[1.0, 2.0, -4.0, 7.0], 
+[4.0, 5.0, 3.0, 5.0], [3.0, 4.0, 7.0, 6.0]]], [[[-6.0, -2.0, -5.0, 1.0], [7.0, 4.0, -6.0, -7.0], [5.0, 0.0, 3.0, 4.0]], [[7.0, 
+0.0, -1.0, 2.0], [1.0, -6.0, 0.0, 0.0], [4.0, -1.0, -2.0, -6.0]]], [[[-3.0, 4.0, 6.0, 7.0], [2.0, -6.0, 3.0, -3.0], [-3.0, 0.0, 
+-3.0, 4.0]], [[7.0, 0.0, -1.0, 0.0], [0.0, -1.0, 6.0, 1.0], [-5.0, 0.0, 5.0, 0.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[4.0, -8.0, 4.0, 10.0], [-6.0, 6.0, 8.0, -14.0], [-12.0, -0.0, 14.0, 6.0]], [[-2.0, -4.0, 8.0, -14.0], 
+[-8.0, -10.0, -6.0, -10.0], [-6.0, -8.0, -14.0, -12.0]]], [[[12.0, 4.0, 10.0, -2.0], [-14.0, -8.0, 12.0, 14.0], [-10.0, -0.0, 
+-6.0, -8.0]], [[-14.0, -0.0, 2.0, -4.0], [-2.0, 12.0, -0.0, -0.0], [-8.0, 2.0, 4.0, 12.0]]], [[[6.0, -8.0, -12.0, -14.0], 
+[-4.0, 12.0, -6.0, 6.0], [6.0, -0.0, 6.0, -8.0]], [[-14.0, -0.0, 2.0, -0.0], [-0.0, 2.0, -12.0, -2.0], [10.0, -0.0, -10.0, 
+-0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_constData_rank0_offset0(self):
+      arg0=numpy.array(6.0)
+      arg1=Data(-1.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-6.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank1_offset1(self):
+      arg0=numpy.array([7.0, 4.0, 4.0])
+      arg1=Data(numpy.array([1.0, -2.0, -6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-25.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank2_offset2(self):
+      arg0=numpy.array([[-1.0, 3.0, 5.0], [5.0, -6.0, 2.0]])
+      arg1=Data(numpy.array([[7.0, -4.0, -5.0], [0.0, 1.0, -7.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-64.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank3_offset3(self):
+      arg0=numpy.array([[[6.0, 2.0, -5.0], [0.0, 4.0, 6.0], [-7.0, 2.0, 4.0], [5.0, -2.0, -7.0]], [[1.0, 3.0, 4.0], [-1.0, 
+-1.0, -5.0], [-5.0, 6.0, 3.0], [5.0, 0.0, -5.0]]])
+      arg1=Data(numpy.array([[[-3.0, -7.0, 6.0], [7.0, 0.0, -4.0], [-2.0, -2.0, 2.0], [-7.0, -3.0, 3.0]], [[-4.0, -7.0, -5.0], 
+[0.0, 4.0, 4.0], [0.0, 5.0, 4.0], [4.0, -3.0, 3.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-140.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank4_offset4(self):
+      arg0=numpy.array([[[[0.0, -7.0], [3.0, -7.0], [3.0, -7.0]], [[7.0, -5.0], [4.0, 1.0], [1.0, -2.0]]], [[[4.0, -6.0], 
+[-6.0, -5.0], [1.0, 5.0]], [[-5.0, -2.0], [7.0, -5.0], [0.0, 3.0]]], [[[1.0, -2.0], [0.0, 5.0], [2.0, -3.0]], [[-3.0, -7.0], 
+[-3.0, -4.0], [-3.0, -7.0]]], [[[1.0, 0.0], [0.0, 6.0], [-1.0, -7.0]], [[-5.0, -7.0], [5.0, 6.0], [6.0, 7.0]]]])
+      arg1=Data(numpy.array([[[[4.0, 1.0], [-1.0, 0.0], [0.0, 0.0]], [[-3.0, 2.0], [4.0, -3.0], [-3.0, -3.0]]], [[[2.0, -5.0], 
+[6.0, -5.0], [0.0, -6.0]], [[2.0, 0.0], [6.0, 4.0], [-2.0, 6.0]]], [[[-6.0, -3.0], [-3.0, -2.0], [1.0, 6.0]], [[-2.0, -1.0], 
+[7.0, -3.0], [-3.0, -1.0]]], [[[-1.0, 0.0], [0.0, -6.0], [-6.0, 4.0]], [[6.0, -6.0], [6.0, 2.0], [-5.0, 
+7.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=Data(10.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_constData_rank1_offset0(self):
+      arg0=numpy.array(-7.0)
+      arg1=Data(numpy.array([-5.0, 3.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([35.0, -21.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank2_offset1(self):
+      arg0=numpy.array([7.0, 4.0, 7.0])
+      arg1=Data(numpy.array([[-3.0, 6.0, 3.0], [0.0, -6.0, 0.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([24.0, -24.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank3_offset2(self):
+      arg0=numpy.array([[2.0, -4.0, -5.0], [3.0, 5.0, -4.0]])
+      arg1=Data(numpy.array([[[0.0, -2.0, 3.0], [-6.0, 4.0, -6.0]], [[2.0, -5.0, 4.0], [-5.0, -6.0, -3.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([19.0, -29.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank4_offset3(self):
+      arg0=numpy.array([[[7.0, 6.0, 7.0], [0.0, 4.0, -4.0], [-2.0, -6.0, 0.0], [-2.0, -6.0, 0.0]], [[0.0, 7.0, 3.0], [2.0, 
+-4.0, 7.0], [-3.0, 3.0, -7.0], [4.0, -5.0, -2.0]]])
+      arg1=Data(numpy.array([[[[-4.0, -6.0, 0.0], [0.0, -4.0, -2.0], [4.0, -5.0, 7.0], [1.0, -6.0, -4.0]], [[-4.0, -2.0, 7.0], 
+[-3.0, -1.0, 6.0], [0.0, -2.0, 5.0], [2.0, -3.0, -2.0]]], [[[6.0, 3.0, -3.0], [2.0, 5.0, 0.0], [3.0, 3.0, 3.0], [-7.0, 6.0, 
+-1.0]], [[0.0, -2.0, -3.0], [-3.0, 5.0, 2.0], [6.0, 0.0, 1.0], [2.0, -1.0, 0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([17.0, -34.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_constData_rank2_offset0(self):
+      arg0=numpy.array(-5.0)
+      arg1=Data(numpy.array([[-2.0, 4.0, 2.0, -3.0, -5.0], [4.0, 5.0, 0.0, 5.0, 1.0], [-6.0, -2.0, -7.0, -1.0, 0.0], [1.0, 2.0, 
+2.0, 6.0, 2.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[10.0, -20.0, -10.0, 15.0, 25.0], [-20.0, -25.0, -0.0, -25.0, -5.0], [30.0, 10.0, 35.0, 5.0, -0.0], 
+[-5.0, -10.0, -10.0, -30.0, -10.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank3_offset1(self):
+      arg0=numpy.array([-3.0, 0.0, 2.0])
+      arg1=Data(numpy.array([[[7.0, -3.0, -4.0], [1.0, 6.0, -5.0], [0.0, 7.0, 1.0], [1.0, 2.0, 6.0], [1.0, -5.0, 4.0]], [[-4.0, 
+0.0, -3.0], [-1.0, 7.0, -4.0], [7.0, -3.0, -5.0], [2.0, -6.0, 0.0], [-5.0, 2.0, -3.0]], [[6.0, 6.0, 5.0], [6.0, -2.0, -2.0], 
+[-2.0, 3.0, 1.0], [3.0, 0.0, -4.0], [4.0, 0.0, 6.0]], [[-6.0, 0.0, 3.0], [-7.0, 3.0, 3.0], [6.0, 6.0, -1.0], [4.0, -5.0, 0.0], 
+[7.0, -1.0, -2.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-29.0, -13.0, 2.0, 9.0, 5.0], [6.0, -5.0, -31.0, -6.0, 9.0], [-8.0, -22.0, 8.0, -17.0, 0.0], 
+[24.0, 27.0, -20.0, -12.0, -25.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank4_offset2(self):
+      arg0=numpy.array([[-5.0, 5.0, 3.0], [-5.0, -4.0, -3.0]])
+      arg1=Data(numpy.array([[[[0.0, -2.0, -3.0], [6.0, -2.0, 2.0]], [[-6.0, 6.0, -3.0], [2.0, 4.0, -4.0]], [[1.0, -3.0, 6.0], 
+[-3.0, -3.0, -3.0]], [[1.0, 7.0, -1.0], [0.0, 1.0, 5.0]], [[-7.0, -7.0, 0.0], [-5.0, -3.0, -6.0]]], [[[7.0, -5.0, -1.0], [4.0, 
+-2.0, 6.0]], [[7.0, -4.0, 0.0], [-1.0, -7.0, -6.0]], [[-5.0, 7.0, 5.0], [4.0, 0.0, -7.0]], [[0.0, -4.0, -6.0], [-3.0, 7.0, 
+0.0]], [[-4.0, 0.0, 4.0], [0.0, 3.0, -1.0]]], [[[-7.0, -7.0, 7.0], [-2.0, -2.0, -1.0]], [[-3.0, -5.0, 4.0], [6.0, -2.0, 3.0]], 
+[[-3.0, 3.0, -1.0], [-3.0, -2.0, 4.0]], [[0.0, -6.0, -7.0], [-1.0, -4.0, 1.0]], [[0.0, 5.0, -4.0], [3.0, 5.0, -1.0]]], [[[7.0, 
+6.0, 6.0], [6.0, -1.0, -2.0]], [[-7.0, 5.0, 4.0], [-2.0, -7.0, 0.0]], [[0.0, 3.0, -6.0], [4.0, -2.0, 6.0]], [[-4.0, 6.0, -4.0], 
+[0.0, 2.0, -2.0]], [[1.0, 4.0, 6.0], [-7.0, -3.0, 0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-47.0, 37.0, 34.0, 8.0, 55.0], [-93.0, -4.0, 76.0, -51.0, 23.0], [42.0, -29.0, 38.0, -33.0, 
+-19.0], [-7.0, 110.0, -33.0, 36.0, 80.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_constData_rank3_offset0(self):
+      arg0=numpy.array(3.0)
+      arg1=Data(numpy.array([[[6.0, -2.0], [5.0, -1.0]], [[5.0, 7.0], [0.0, 7.0]], [[-5.0, 5.0], [-1.0, -4.0]], [[-7.0, -6.0], 
+[0.0, -1.0]], [[3.0, 2.0], [0.0, -3.0]], [[-4.0, 0.0], [5.0, 0.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[18.0, -6.0], [15.0, -3.0]], [[15.0, 21.0], [0.0, 21.0]], [[-15.0, 15.0], [-3.0, -12.0]], [[-21.0, 
+-18.0], [0.0, -3.0]], [[9.0, 6.0], [0.0, -9.0]], [[-12.0, 0.0], [15.0, 0.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank4_offset1(self):
+      arg0=numpy.array([-3.0, -7.0, 4.0])
+      arg1=Data(numpy.array([[[[-2.0, -4.0, 2.0], [1.0, 7.0, 4.0]], [[3.0, -4.0, -6.0], [0.0, -1.0, 0.0]]], [[[-6.0, 7.0, 1.0], 
+[-1.0, -1.0, 5.0]], [[6.0, 6.0, -7.0], [7.0, 6.0, -5.0]]], [[[0.0, -1.0, 0.0], [7.0, -5.0, 6.0]], [[2.0, 3.0, 2.0], [-3.0, 4.0, 
+5.0]]], [[[0.0, -3.0, -1.0], [2.0, 1.0, 6.0]], [[-5.0, -2.0, 6.0], [7.0, -2.0, 1.0]]], [[[-3.0, -7.0, 2.0], [2.0, 2.0, 2.0]], 
+[[0.0, 6.0, -3.0], [2.0, -6.0, 0.0]]], [[[4.0, 6.0, 5.0], [0.0, 6.0, -3.0]], [[-2.0, -7.0, -7.0], [3.0, -2.0, 
+2.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[42.0, -36.0], [-5.0, 7.0]], [[-27.0, 30.0], [-88.0, -83.0]], [[7.0, 38.0], [-19.0, 1.0]], [[17.0, 
+11.0], [53.0, -3.0]], [[66.0, -12.0], [-54.0, 36.0]], [[-34.0, -54.0], [27.0, 13.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_constData_rank4_offset0(self):
+      arg0=numpy.array(-2.0)
+      arg1=Data(numpy.array([[[[0.0, 4.0, -5.0, -2.0], [5.0, -5.0, 6.0, 4.0], [0.0, 0.0, -1.0, -3.0]], [[2.0, -6.0, 6.0, -6.0], 
+[0.0, -4.0, 7.0, -1.0], [2.0, 5.0, 0.0, 5.0]]], [[[-2.0, -3.0, 7.0, 0.0], [-5.0, -6.0, -3.0, 3.0], [6.0, -2.0, 1.0, 4.0]], 
+[[-1.0, -3.0, 0.0, 0.0], [0.0, -6.0, 7.0, -6.0], [0.0, 0.0, 0.0, 4.0]]], [[[7.0, -3.0, 0.0, -5.0], [7.0, -6.0, -2.0, -2.0], 
+[-3.0, -3.0, 7.0, 6.0]], [[-7.0, 0.0, -5.0, 7.0], [-2.0, -7.0, -3.0, 3.0], [3.0, 5.0, 6.0, 0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-0.0, -8.0, 10.0, 4.0], [-10.0, 10.0, -12.0, -8.0], [-0.0, -0.0, 2.0, 6.0]], [[-4.0, 12.0, 
+-12.0, 12.0], [-0.0, 8.0, -14.0, 2.0], [-4.0, -10.0, -0.0, -10.0]]], [[[4.0, 6.0, -14.0, -0.0], [10.0, 12.0, 6.0, -6.0], 
+[-12.0, 4.0, -2.0, -8.0]], [[2.0, 6.0, -0.0, -0.0], [-0.0, 12.0, -14.0, 12.0], [-0.0, -0.0, -0.0, -8.0]]], [[[-14.0, 6.0, -0.0, 
+10.0], [-14.0, 12.0, 4.0, 4.0], [6.0, 6.0, -14.0, -12.0]], [[14.0, -0.0, 10.0, -14.0], [4.0, 14.0, 6.0, -6.0], [-6.0, -10.0, 
+-12.0, -0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank0_offset0(self):
+      arg0=numpy.array(3.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(4.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-12.0)+(1.-msk_ref)*numpy.array(12.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank1_offset1(self):
+      arg0=numpy.array([-5.0, 0.0, 0.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([3.0, -1.0, -6.0])+(1.-msk_arg1)*numpy.array([5.0, -1.0, 6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-15.0)+(1.-msk_ref)*numpy.array(-25.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[-2.0, -6.0, -7.0], [-4.0, 3.0, -6.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, -3.0, -6.0], [-1.0, 1.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 3.0, 4.0], [0.0, -2.0, 
+2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(61.0)+(1.-msk_ref)*numpy.array(-50.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank3_offset3(self):
+      arg0=numpy.array([[[-6.0, -6.0, 4.0], [-4.0, 2.0, 6.0], [-1.0, 0.0, 3.0], [4.0, 0.0, -4.0]], [[-7.0, 6.0, 3.0], [5.0, 
+7.0, 7.0], [1.0, -7.0, 0.0], [1.0, -7.0, -5.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, -6.0, -7.0], [5.0, 3.0, 6.0], [-4.0, 5.0, -4.0], [-1.0, -2.0, 3.0]], [[-1.0, 5.0, 3.0], 
+[1.0, -1.0, -2.0], [0.0, 7.0, -3.0], [0.0, -1.0, 3.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 2.0, -5.0], [-7.0, -5.0, -1.0], 
+[-4.0, 0.0, 5.0], [-1.0, 0.0, -2.0]], [[5.0, -7.0, 1.0], [-2.0, -7.0, -4.0], [1.0, -1.0, -3.0], [5.0, 3.0, 4.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-39.0)+(1.-msk_ref)*numpy.array(-186.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank4_offset4(self):
+      arg0=numpy.array([[[[5.0, 0.0], [0.0, 2.0], [6.0, 7.0]], [[-5.0, 0.0], [5.0, -1.0], [1.0, 0.0]]], [[[0.0, -7.0], [-1.0, 
+-3.0], [-7.0, 0.0]], [[-6.0, 0.0], [-2.0, -4.0], [6.0, -7.0]]], [[[3.0, 0.0], [-2.0, 4.0], [0.0, -6.0]], [[5.0, -2.0], [-1.0, 
+-3.0], [0.0, 2.0]]], [[[-7.0, 0.0], [6.0, -2.0], [0.0, 3.0]], [[-2.0, -7.0], [0.0, 3.0], [-1.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-7.0, -2.0], [3.0, -7.0], [-3.0, -1.0]], [[-7.0, -3.0], [-4.0, 0.0], [4.0, -5.0]]], [[[3.0, 
+3.0], [-6.0, -6.0], [-3.0, -5.0]], [[5.0, 1.0], [0.0, -6.0], [-5.0, 3.0]]], [[[-2.0, -2.0], [7.0, 4.0], [-2.0, -5.0]], [[6.0, 
+2.0], [2.0, -5.0], [-6.0, 0.0]]], [[[2.0, -6.0], [4.0, 6.0], [0.0, 4.0]], [[0.0, 0.0], [-3.0, 5.0], [5.0, 
+-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, -2.0], [3.0, -7.0], [4.0, 5.0]], [[0.0, -5.0], [7.0, -3.0], [-4.0, -3.0]]], 
+[[[4.0, 0.0], [0.0, -7.0], [2.0, -2.0]], [[1.0, 5.0], [4.0, -7.0], [-1.0, 3.0]]], [[[5.0, 0.0], [3.0, -7.0], [0.0, 5.0]], 
+[[4.0, -2.0], [7.0, -6.0], [-2.0, 0.0]]], [[[3.0, -6.0], [-4.0, 0.0], [5.0, -4.0]], [[1.0, -1.0], [7.0, 1.0], [-5.0, 3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(-18.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank1_offset0(self):
+      arg0=numpy.array(-2.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([5.0, -4.0])+(1.-msk_arg1)*numpy.array([3.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-10.0, 8.0])+(1.-msk_ref)*numpy.array([-6.0, -14.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank2_offset1(self):
+      arg0=numpy.array([0.0, 3.0, 0.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[3.0, 1.0, 7.0], [6.0, 3.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 2.0, -3.0], [6.0, -4.0, 
+-6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([3.0, 9.0])+(1.-msk_ref)*numpy.array([6.0, -12.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[3.0, -7.0, 4.0], [3.0, -1.0, 3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[5.0, -1.0, -3.0], [4.0, -7.0, 0.0]], [[4.0, 3.0, -4.0], [0.0, 7.0, 
+-5.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -1.0, 1.0], [0.0, -2.0, 3.0]], [[6.0, 2.0, -7.0], [-1.0, -3.0, -1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([29.0, -47.0])+(1.-msk_ref)*numpy.array([1.0, -27.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank4_offset3(self):
+      arg0=numpy.array([[[-1.0, 1.0, -6.0], [-1.0, 0.0, -1.0], [7.0, -6.0, 2.0], [-6.0, -2.0, -2.0]], [[2.0, 6.0, 0.0], [-7.0, 
+-7.0, -6.0], [-7.0, 7.0, 2.0], [0.0, -6.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, -1.0, -7.0], [-5.0, -5.0, 4.0], [6.0, 3.0, 0.0], [0.0, 3.0, 0.0]], [[3.0, -3.0, 4.0], 
+[-4.0, 7.0, 0.0], [-5.0, -5.0, -6.0], [-3.0, 7.0, 2.0]]], [[[6.0, 1.0, 0.0], [4.0, -5.0, -5.0], [5.0, 0.0, 5.0], [-3.0, 4.0, 
+-5.0]], [[4.0, -7.0, -5.0], [-2.0, 0.0, 7.0], [-5.0, -2.0, -6.0], [5.0, 2.0, -4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, 6.0, 
+4.0], [2.0, 7.0, 6.0], [0.0, -2.0, 0.0], [1.0, 0.0, -3.0]], [[0.0, 2.0, 4.0], [-7.0, 4.0, -6.0], [-5.0, 2.0, 3.0], [4.0, 4.0, 
+-6.0]]], [[[7.0, 1.0, -7.0], [6.0, -6.0, 6.0], [-7.0, 5.0, -7.0], [-1.0, 2.0, -4.0]], [[-5.0, 3.0, 0.0], [-1.0, 1.0, 6.0], 
+[5.0, 0.0, -7.0], [7.0, -3.0, 5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-39.0, 20.0])+(1.-msk_ref)*numpy.array([123.0, -148.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank2_offset0(self):
+      arg0=numpy.array(-1.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, 5.0, -4.0, 5.0, 0.0], [2.0, 1.0, -3.0, -5.0, 0.0], [0.0, -3.0, -6.0, 0.0, -6.0], [-7.0, 
+-1.0, 4.0, -1.0, -4.0]])+(1.-msk_arg1)*numpy.array([[2.0, 0.0, 0.0, -2.0, -5.0], [-6.0, -4.0, 0.0, 2.0, 5.0], [-3.0, -5.0, 
+-7.0, 6.0, 0.0], [-1.0, 1.0, -6.0, 2.0, -7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-1.0, -5.0, 4.0, -5.0, -0.0], [-2.0, -1.0, 3.0, 5.0, -0.0], [-0.0, 3.0, 6.0, -0.0, 6.0], [7.0, 
+1.0, -4.0, 1.0, 4.0]])+(1.-msk_ref)*numpy.array([[-2.0, -0.0, -0.0, 2.0, 5.0], [6.0, 4.0, -0.0, -2.0, -5.0], [3.0, 5.0, 7.0, 
+-6.0, -0.0], [1.0, -1.0, 6.0, -2.0, 7.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank3_offset1(self):
+      arg0=numpy.array([-4.0, -4.0, -5.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -3.0, -2.0], [5.0, 4.0, -6.0], [0.0, -2.0, -4.0], [-5.0, 4.0, 0.0], [3.0, -2.0, -1.0]], 
+[[-6.0, 7.0, 0.0], [0.0, -3.0, -4.0], [2.0, 4.0, 0.0], [0.0, -3.0, 2.0], [3.0, -6.0, 5.0]], [[6.0, -5.0, -1.0], [0.0, -3.0, 
+7.0], [-2.0, -2.0, 2.0], [4.0, -3.0, -1.0], [0.0, -6.0, -1.0]], [[0.0, 4.0, -7.0], [7.0, 4.0, 5.0], [2.0, -2.0, 3.0], [3.0, 
+6.0, 6.0], [6.0, -4.0, 4.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 1.0, 2.0], [0.0, 6.0, 1.0], [-5.0, -7.0, -6.0], [-1.0, 7.0, 
+6.0], [-3.0, 0.0, -2.0]], [[4.0, -3.0, -2.0], [4.0, 6.0, 1.0], [-6.0, 4.0, 0.0], [-3.0, 1.0, 5.0], [-3.0, -7.0, -2.0]], [[-1.0, 
+5.0, 0.0], [-4.0, 1.0, 0.0], [-5.0, 6.0, 2.0], [0.0, -4.0, 2.0], [4.0, 0.0, -1.0]], [[-7.0, 7.0, 1.0], [2.0, -1.0, -5.0], 
+[-3.0, -3.0, -4.0], [7.0, 0.0, 6.0], [-2.0, 0.0, 6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[22.0, -6.0, 28.0, 4.0, 1.0], [-4.0, 32.0, -24.0, 2.0, -13.0], [1.0, -23.0, 6.0, 1.0, 29.0], 
+[19.0, -69.0, -15.0, -66.0, -28.0]])+(1.-msk_ref)*numpy.array([[-14.0, -29.0, 78.0, -54.0, 22.0], [6.0, -45.0, 8.0, -17.0, 
+50.0], [-16.0, 12.0, -14.0, 6.0, -11.0], [-5.0, 21.0, 44.0, -58.0, -22.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[2.0, -3.0, 4.0], [-3.0, 3.0, -5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-2.0, -6.0, -2.0], [0.0, -4.0, 5.0]], [[2.0, 1.0, 0.0], [-5.0, 6.0, -4.0]], [[4.0, 4.0, 
+-5.0], [2.0, 4.0, 6.0]], [[-6.0, 7.0, 0.0], [-1.0, -7.0, 2.0]], [[-1.0, 0.0, 2.0], [7.0, -4.0, -4.0]]], [[[-7.0, 0.0, -5.0], 
+[-1.0, -6.0, -2.0]], [[1.0, -6.0, 6.0], [4.0, 5.0, -1.0]], [[-3.0, 1.0, -5.0], [2.0, 1.0, 1.0]], [[2.0, -4.0, 1.0], [-7.0, 
+-1.0, 3.0]], [[5.0, 0.0, 3.0], [5.0, -6.0, 1.0]]], [[[5.0, -6.0, -2.0], [-2.0, -2.0, -7.0]], [[3.0, -1.0, -2.0], [-7.0, -2.0, 
+3.0]], [[-6.0, 5.0, 4.0], [6.0, 0.0, 0.0]], [[0.0, 5.0, -3.0], [4.0, 5.0, 0.0]], [[0.0, 3.0, 5.0], [-1.0, -5.0, 2.0]]], [[[6.0, 
+-7.0, 0.0], [-4.0, 7.0, 0.0]], [[1.0, 7.0, 4.0], [0.0, 6.0, -3.0]], [[0.0, -7.0, 3.0], [3.0, 7.0, -2.0]], [[-6.0, -6.0, 7.0], 
+[1.0, 2.0, 7.0]], [[7.0, 1.0, 0.0], [6.0, 4.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 4.0, 7.0], [2.0, -5.0, -3.0]], 
+[[0.0, -5.0, 0.0], [6.0, -2.0, 6.0]], [[-2.0, -4.0, -1.0], [6.0, -4.0, -4.0]], [[-6.0, 1.0, -4.0], [-1.0, 6.0, 0.0]], [[3.0, 
+-1.0, 1.0], [6.0, 0.0, -6.0]]], [[[1.0, 0.0, 0.0], [0.0, -5.0, -4.0]], [[-2.0, -2.0, 3.0], [-2.0, 7.0, 5.0]], [[0.0, 1.0, 3.0], 
+[2.0, -3.0, 1.0]], [[3.0, 5.0, -4.0], [0.0, 5.0, 2.0]], [[4.0, 7.0, 4.0], [6.0, 0.0, 5.0]]], [[[0.0, -2.0, 2.0], [-1.0, 6.0, 
+3.0]], [[-1.0, 5.0, 6.0], [-5.0, -6.0, -3.0]], [[0.0, 7.0, 4.0], [6.0, -4.0, -6.0]], [[-3.0, -3.0, 5.0], [-6.0, 3.0, -3.0]], 
+[[0.0, 3.0, 6.0], [-7.0, 7.0, 1.0]]], [[[-2.0, 2.0, -7.0], [-6.0, -3.0, -4.0]], [[-6.0, 5.0, -5.0], [0.0, 1.0, 5.0]], [[3.0, 
+-2.0, -1.0], [-7.0, 2.0, 1.0]], [[6.0, 5.0, 2.0], [-5.0, 4.0, 6.0]], [[-5.0, 1.0, 7.0], [0.0, 7.0, 1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-31.0, 54.0, -48.0, -61.0, -7.0], [-39.0, 52.0, -37.0, 23.0, -16.0], [55.0, 1.0, -29.0, -24.0, 
+-11.0], [66.0, 30.0, 55.0, 2.0, -15.0]])+(1.-msk_ref)*numpy.array([[6.0, -39.0, -6.0, -10.0, 25.0], [7.0, 16.0, -11.0, -20.0, 
+-40.0], [20.0, 19.0, -5.0, 65.0, 52.0], [-9.0, -69.0, 30.0, 2.0, 31.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank3_offset0(self):
+      arg0=numpy.array(5.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -7.0], [-1.0, 7.0]], [[-1.0, -3.0], [4.0, 0.0]], [[-6.0, 0.0], [4.0, -7.0]], [[6.0, 
+-1.0], [-6.0, 5.0]], [[-5.0, -5.0], [-1.0, 2.0]], [[-1.0, 3.0], [0.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, -1.0], [5.0, 
+3.0]], [[-1.0, -7.0], [0.0, 2.0]], [[-2.0, 5.0], [1.0, -1.0]], [[-1.0, -5.0], [4.0, 4.0]], [[-7.0, -2.0], [-3.0, -7.0]], 
+[[-5.0, -3.0], [3.0, 3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, -35.0], [-5.0, 35.0]], [[-5.0, -15.0], [20.0, 0.0]], [[-30.0, 0.0], [20.0, -35.0]], 
+[[30.0, -5.0], [-30.0, 25.0]], [[-25.0, -25.0], [-5.0, 10.0]], [[-5.0, 15.0], [0.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 
+-5.0], [25.0, 15.0]], [[-5.0, -35.0], [0.0, 10.0]], [[-10.0, 25.0], [5.0, -5.0]], [[-5.0, -25.0], [20.0, 20.0]], [[-35.0, 
+-10.0], [-15.0, -35.0]], [[-25.0, -15.0], [15.0, 15.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank4_offset1(self):
+      arg0=numpy.array([-1.0, 3.0, 0.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[6.0, -2.0, -3.0], [5.0, 5.0, 7.0]], [[4.0, 0.0, 2.0], [-4.0, 0.0, 2.0]]], [[[-6.0, -2.0, 
+0.0], [5.0, 5.0, -2.0]], [[-7.0, 7.0, -1.0], [5.0, 5.0, -4.0]]], [[[-2.0, -4.0, 4.0], [5.0, 6.0, 3.0]], [[-7.0, -1.0, 5.0], 
+[-2.0, 5.0, -4.0]]], [[[-1.0, 4.0, 6.0], [5.0, 4.0, -3.0]], [[2.0, 1.0, 2.0], [-3.0, 0.0, -4.0]]], [[[6.0, 6.0, 0.0], [-7.0, 
+3.0, -2.0]], [[7.0, 5.0, -3.0], [-6.0, -4.0, 4.0]]], [[[2.0, 6.0, 2.0], [-1.0, -5.0, -3.0]], [[4.0, -6.0, 4.0], [-4.0, 1.0, 
+-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, -1.0, -5.0], [-7.0, -7.0, 0.0]], [[-7.0, -7.0, -3.0], [7.0, -4.0, -2.0]]], 
+[[[-7.0, 3.0, 6.0], [-2.0, 7.0, -5.0]], [[-7.0, -2.0, 2.0], [0.0, -4.0, 1.0]]], [[[3.0, 5.0, 2.0], [-2.0, 0.0, -3.0]], [[-4.0, 
+-4.0, 7.0], [4.0, -2.0, -4.0]]], [[[7.0, -2.0, -2.0], [1.0, 2.0, 0.0]], [[2.0, -2.0, -2.0], [7.0, -7.0, 0.0]]], [[[-6.0, 0.0, 
+6.0], [-1.0, -3.0, 5.0]], [[-7.0, 2.0, -2.0], [2.0, 4.0, 7.0]]], [[[2.0, 5.0, -7.0], [-1.0, 4.0, -5.0]], [[7.0, -6.0, 4.0], 
+[-3.0, 0.0, -1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-12.0, 10.0], [-4.0, 4.0]], [[0.0, 10.0], [28.0, 10.0]], [[-10.0, 13.0], [4.0, 17.0]], [[13.0, 
+7.0], [1.0, 3.0]], [[12.0, 16.0], [8.0, -6.0]], [[16.0, -14.0], [-22.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, -14.0], 
+[-14.0, -19.0]], [[16.0, 23.0], [1.0, -12.0]], [[12.0, 2.0], [-8.0, -10.0]], [[-13.0, 5.0], [-8.0, -28.0]], [[6.0, -8.0], 
+[13.0, 10.0]], [[13.0, 13.0], [-25.0, 3.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank4_offset0(self):
+      arg0=numpy.array(-5.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-6.0, 5.0, -3.0, -5.0], [0.0, 3.0, -2.0, 6.0], [7.0, -3.0, 3.0, 0.0]], [[2.0, 0.0, -4.0, 
+5.0], [-1.0, -4.0, 1.0, 2.0], [2.0, -1.0, 6.0, 5.0]]], [[[2.0, 0.0, 1.0, -4.0], [2.0, 0.0, -6.0, 5.0], [-5.0, 0.0, -1.0, 2.0]], 
+[[-1.0, -4.0, 1.0, 6.0], [1.0, 7.0, 7.0, -6.0], [6.0, -6.0, -2.0, 2.0]]], [[[5.0, 0.0, 3.0, -6.0], [7.0, 7.0, 0.0, -5.0], [0.0, 
+6.0, 7.0, 2.0]], [[5.0, -7.0, -3.0, 0.0], [0.0, 5.0, -4.0, 7.0], [7.0, -5.0, -2.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 
+7.0, 2.0, -6.0], [-4.0, -1.0, -3.0, -7.0], [4.0, -1.0, -5.0, 5.0]], [[6.0, 1.0, -6.0, 7.0], [0.0, 5.0, 6.0, -1.0], [3.0, -2.0, 
+-3.0, -4.0]]], [[[1.0, -5.0, -4.0, 5.0], [6.0, 2.0, -7.0, 2.0], [-4.0, 0.0, 5.0, 0.0]], [[-4.0, -7.0, -3.0, -2.0], [1.0, -1.0, 
+-3.0, -5.0], [1.0, -2.0, 3.0, 6.0]]], [[[0.0, 0.0, -7.0, 7.0], [-6.0, 7.0, -6.0, 7.0], [3.0, 0.0, -2.0, -2.0]], [[-2.0, -2.0, 
+3.0, -5.0], [5.0, -4.0, 5.0, 4.0], [2.0, -5.0, 0.0, 0.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[30.0, -25.0, 15.0, 25.0], [-0.0, -15.0, 10.0, -30.0], [-35.0, 15.0, -15.0, -0.0]], [[-10.0, 
+-0.0, 20.0, -25.0], [5.0, 20.0, -5.0, -10.0], [-10.0, 5.0, -30.0, -25.0]]], [[[-10.0, -0.0, -5.0, 20.0], [-10.0, -0.0, 30.0, 
+-25.0], [25.0, -0.0, 5.0, -10.0]], [[5.0, 20.0, -5.0, -30.0], [-5.0, -35.0, -35.0, 30.0], [-30.0, 30.0, 10.0, -10.0]]], 
+[[[-25.0, -0.0, -15.0, 30.0], [-35.0, -35.0, -0.0, 25.0], [-0.0, -30.0, -35.0, -10.0]], [[-25.0, 35.0, 15.0, -0.0], [-0.0, 
+-25.0, 20.0, -35.0], [-35.0, 25.0, 10.0, 25.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, -35.0, -10.0, 30.0], [20.0, 5.0, 15.0, 
+35.0], [-20.0, 5.0, 25.0, -25.0]], [[-30.0, -5.0, 30.0, -35.0], [-0.0, -25.0, -30.0, 5.0], [-15.0, 10.0, 15.0, 20.0]]], 
+[[[-5.0, 25.0, 20.0, -25.0], [-30.0, -10.0, 35.0, -10.0], [20.0, -0.0, -25.0, -0.0]], [[20.0, 35.0, 15.0, 10.0], [-5.0, 5.0, 
+15.0, 25.0], [-5.0, 10.0, -15.0, -30.0]]], [[[-0.0, -0.0, 35.0, -35.0], [30.0, -35.0, 30.0, -35.0], [-15.0, -0.0, 10.0, 10.0]], 
+[[10.0, 10.0, -15.0, 25.0], [-25.0, 20.0, -25.0, -20.0], [-10.0, 25.0, -0.0, -0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_float_rank0_offset0(self):
+      arg0=numpy.array([-1.0, -1.0])
+      arg1=-3.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([3.0, 3.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank0_offset0(self):
+      arg0=numpy.array([4.0, 1.0])
+      arg1=numpy.array(-1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([-4.0, -1.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank1_offset1(self):
+      arg0=numpy.array([[-2.0, -1.0, -2.0], [1.0, 0.0, 7.0]])
+      arg1=numpy.array([3.0, 5.0, -2.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([-7.0, -11.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank2_offset2(self):
+      arg0=numpy.array([[[-3.0, -3.0, 3.0], [7.0, -7.0, -3.0]], [[-4.0, 0.0, -3.0], [1.0, -6.0, -2.0]]])
+      arg1=numpy.array([[4.0, 2.0, 3.0], [0.0, 7.0, 6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([-76.0, -79.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank3_offset3(self):
+      arg0=numpy.array([[[[2.0, -6.0, 5.0], [7.0, -4.0, 6.0], [-6.0, -4.0, 3.0], [-4.0, -3.0, -4.0]], [[0.0, -3.0, -5.0], [7.0, 
+-1.0, -1.0], [0.0, 0.0, -5.0], [-7.0, -3.0, -2.0]]], [[[3.0, 0.0, 6.0], [-2.0, -6.0, 3.0], [1.0, 0.0, 0.0], [3.0, 0.0, 7.0]], 
+[[-4.0, 7.0, 6.0], [2.0, 6.0, -3.0], [5.0, 1.0, -5.0], [-6.0, 3.0, 6.0]]]])
+      arg1=numpy.array([[[6.0, -3.0, -1.0], [3.0, 2.0, -5.0], [1.0, 5.0, 6.0], [4.0, -4.0, 6.0]], [[0.0, 2.0, 6.0], [7.0, 3.0, 
+-4.0], [0.0, 2.0, -7.0], [-6.0, -1.0, -1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([68.0, 192.0])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank1_offset0(self):
+      arg0=numpy.array([-3.0, 6.0])
+      arg1=numpy.array([-1.0, 6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[3.0, -18.0], [-6.0, 36.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank2_offset1(self):
+      arg0=numpy.array([[-4.0, -2.0, -4.0], [1.0, -4.0, -5.0]])
+      arg1=numpy.array([[-3.0, 2.0, -7.0], [-2.0, 0.0, 7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[36.0, -20.0], [24.0, -37.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank3_offset2(self):
+      arg0=numpy.array([[[5.0, 7.0, -6.0], [7.0, 3.0, 0.0]], [[-2.0, 6.0, 5.0], [0.0, 6.0, 4.0]]])
+      arg1=numpy.array([[[3.0, 7.0, -2.0], [1.0, 7.0, 0.0]], [[0.0, -1.0, -1.0], [-2.0, 2.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[104.0, -9.0], [68.0, 1.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank4_offset3(self):
+      arg0=numpy.array([[[[0.0, -2.0, 1.0], [-7.0, 3.0, -2.0], [3.0, 4.0, 7.0], [4.0, 7.0, 4.0]], [[5.0, 0.0, -2.0], [-1.0, 
+1.0, 5.0], [5.0, 0.0, 3.0], [6.0, -3.0, 3.0]]], [[[0.0, -6.0, 4.0], [-4.0, -5.0, -3.0], [-6.0, -1.0, 0.0], [2.0, -7.0, -6.0]], 
+[[-2.0, -1.0, 0.0], [-5.0, -4.0, -6.0], [-2.0, 3.0, 5.0], [0.0, 3.0, -4.0]]]])
+      arg1=numpy.array([[[[3.0, 6.0, -1.0], [2.0, -6.0, -3.0], [-3.0, 5.0, -6.0], [0.0, -6.0, 0.0]], [[-7.0, -4.0, 5.0], [-5.0, 
+-7.0, -6.0], [4.0, 0.0, -7.0], [0.0, -6.0, -7.0]]], [[[-6.0, 4.0, -5.0], [4.0, -1.0, 3.0], [-2.0, -1.0, -2.0], [2.0, -2.0, 
+-1.0]], [[0.0, 3.0, 7.0], [6.0, -2.0, 5.0], [-7.0, -1.0, 3.0], [7.0, -2.0, -7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=numpy.array([[-193.0, -80.0], [120.0, -34.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank2_offset0(self):
+      arg0=numpy.array([-6.0, -5.0])
+      arg1=numpy.array([[-5.0, 2.0, 5.0, 1.0, 3.0], [-1.0, -4.0, 5.0, -1.0, 0.0], [4.0, -4.0, -1.0, 4.0, -6.0], [2.0, 0.0, 
+-6.0, 0.0, -2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[30.0, -12.0, -30.0, -6.0, -18.0], [6.0, 24.0, -30.0, 6.0, 0.0], [-24.0, 24.0, 6.0, -24.0, 36.0], 
+[-12.0, 0.0, 36.0, 0.0, 12.0]], [[25.0, -10.0, -25.0, -5.0, -15.0], [5.0, 20.0, -25.0, 5.0, 0.0], [-20.0, 20.0, 5.0, -20.0, 
+30.0], [-10.0, 0.0, 30.0, 0.0, 10.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank3_offset1(self):
+      arg0=numpy.array([[6.0, -3.0, 0.0], [0.0, 1.0, -2.0]])
+      arg1=numpy.array([[[-1.0, 7.0, -2.0], [7.0, 1.0, 1.0], [7.0, 6.0, -6.0], [-2.0, 7.0, 0.0], [-3.0, -3.0, 1.0]], [[0.0, 
+7.0, -5.0], [3.0, 2.0, -6.0], [0.0, -2.0, 4.0], [6.0, 5.0, -1.0], [-6.0, 2.0, -3.0]], [[-3.0, 0.0, 0.0], [1.0, 7.0, -1.0], 
+[-1.0, 4.0, -5.0], [6.0, -3.0, -7.0], [-2.0, 5.0, 6.0]], [[-3.0, 2.0, -3.0], [5.0, 1.0, 6.0], [-5.0, -7.0, 6.0], [6.0, -1.0, 
+-6.0], [3.0, 5.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[-27.0, 39.0, 24.0, -33.0, -9.0], [-21.0, 12.0, 6.0, 21.0, -42.0], [-18.0, -15.0, -18.0, 45.0, -27.0], 
+[-24.0, 27.0, -9.0, 39.0, 3.0]], [[11.0, -1.0, 18.0, 7.0, -5.0], [17.0, 14.0, -10.0, 7.0, 8.0], [0.0, 9.0, 14.0, 11.0, -7.0], 
+[8.0, -11.0, -19.0, 11.0, 5.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank4_offset2(self):
+      arg0=numpy.array([[[-2.0, -6.0, -5.0], [5.0, -2.0, 0.0]], [[-1.0, -2.0, 1.0], [4.0, -1.0, 5.0]]])
+      arg1=numpy.array([[[[5.0, 1.0, -3.0], [-7.0, -2.0, 0.0]], [[2.0, -7.0, 1.0], [-7.0, 0.0, -6.0]], [[-5.0, 1.0, -1.0], 
+[-6.0, 2.0, 3.0]], [[-6.0, -1.0, -4.0], [-5.0, 6.0, 6.0]], [[-7.0, -6.0, 4.0], [-5.0, -1.0, 5.0]]], [[[3.0, -2.0, 7.0], [3.0, 
+0.0, 2.0]], [[4.0, 6.0, -6.0], [7.0, 4.0, 0.0]], [[-5.0, -3.0, -6.0], [6.0, -3.0, 3.0]], [[2.0, 4.0, 2.0], [0.0, 0.0, -4.0]], 
+[[1.0, -3.0, 1.0], [0.0, -3.0, -2.0]]], [[[3.0, -2.0, -5.0], [7.0, -3.0, -6.0]], [[7.0, 0.0, 0.0], [3.0, -1.0, 0.0]], [[-1.0, 
+-1.0, 7.0], [5.0, -6.0, -7.0]], [[-5.0, 5.0, -2.0], [3.0, 0.0, -3.0]], [[3.0, 1.0, 4.0], [-2.0, -6.0, -3.0]]], [[[4.0, 5.0, 
+-5.0], [3.0, 1.0, 0.0]], [[4.0, -7.0, -7.0], [-6.0, -5.0, 1.0]], [[-2.0, 1.0, 7.0], [3.0, 0.0, 0.0]], [[-4.0, 5.0, 2.0], [4.0, 
+4.0, -3.0]], [[-5.0, 0.0, 7.0], [0.0, -7.0, -7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[-32.0, -2.0, -25.0, 1.0, 7.0], [-14.0, 13.0, 94.0, -38.0, 17.0], [72.0, 3.0, 10.0, 5.0, -30.0], [0.0, 
+49.0, -22.0, -20.0, -11.0]], [[-36.0, -45.0, -9.0, 8.0, 29.0], [30.0, 2.0, 47.0, -28.0, -1.0], [-3.0, 6.0, 1.0, -10.0, -18.0], 
+[-8.0, -11.0, 19.0, -7.0, -16.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_array_rank3_offset0(self):
+      arg0=numpy.array([2.0, 7.0])
+      arg1=numpy.array([[[-3.0, -2.0], [-5.0, -1.0]], [[4.0, 0.0], [7.0, 2.0]], [[5.0, 4.0], [-1.0, 3.0]], [[-2.0, -2.0], [5.0, 
+5.0]], [[-7.0, -6.0], [6.0, 7.0]], [[-4.0, 0.0], [4.0, -3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-6.0, -4.0], [-10.0, -2.0]], [[8.0, 0.0], [14.0, 4.0]], [[10.0, 8.0], [-2.0, 6.0]], [[-4.0, -4.0], 
+[10.0, 10.0]], [[-14.0, -12.0], [12.0, 14.0]], [[-8.0, 0.0], [8.0, -6.0]]], [[[-21.0, -14.0], [-35.0, -7.0]], [[28.0, 0.0], 
+[49.0, 14.0]], [[35.0, 28.0], [-7.0, 21.0]], [[-14.0, -14.0], [35.0, 35.0]], [[-49.0, -42.0], [42.0, 49.0]], [[-28.0, 0.0], 
+[28.0, -21.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank4_offset1(self):
+      arg0=numpy.array([[1.0, 2.0, 1.0], [2.0, -4.0, 3.0]])
+      arg1=numpy.array([[[[-5.0, 0.0, 7.0], [7.0, -3.0, 0.0]], [[2.0, 2.0, -3.0], [-6.0, 2.0, 7.0]]], [[[-2.0, -2.0, 3.0], 
+[-7.0, 6.0, -7.0]], [[-1.0, -6.0, -4.0], [-4.0, -1.0, -1.0]]], [[[-3.0, -2.0, -4.0], [-4.0, 0.0, -4.0]], [[5.0, 0.0, 7.0], 
+[1.0, 0.0, -7.0]]], [[[-7.0, -5.0, -3.0], [1.0, -7.0, -2.0]], [[-3.0, -4.0, -4.0], [7.0, 4.0, -1.0]]], [[[0.0, 4.0, -1.0], 
+[-5.0, 5.0, 6.0]], [[-2.0, -4.0, -4.0], [0.0, 0.0, -5.0]]], [[[-7.0, 7.0, -3.0], [-2.0, 7.0, -7.0]], [[-6.0, 2.0, 1.0], [-5.0, 
+-4.0, 6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[2.0, 1.0], [3.0, 5.0]], [[-3.0, -2.0], [-17.0, -7.0]], [[-11.0, -8.0], [12.0, -6.0]], [[-20.0, 
+-15.0], [-15.0, 14.0]], [[7.0, 11.0], [-14.0, -5.0]], [[4.0, 5.0], [-1.0, -7.0]]], [[[11.0, 26.0], [-13.0, 1.0]], [[13.0, 
+-59.0], [10.0, -7.0]], [[-10.0, -20.0], [31.0, -19.0]], [[-3.0, 24.0], [-2.0, -5.0]], [[-19.0, -12.0], [0.0, -15.0]], [[-51.0, 
+-53.0], [-17.0, 24.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank0_offset0(self):
+      arg0=numpy.array([4.0, 3.0])
+      arg1=Data(-4.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-16.0, -12.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank1_offset1(self):
+      arg0=numpy.array([[-5.0, 0.0, -1.0], [-7.0, -3.0, -5.0]])
+      arg1=Data(numpy.array([1.0, 0.0, 2.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-7.0, -17.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank2_offset2(self):
+      arg0=numpy.array([[[-3.0, 0.0, 7.0], [4.0, -3.0, -3.0]], [[1.0, -5.0, -3.0], [6.0, 6.0, 4.0]]])
+      arg1=Data(numpy.array([[5.0, 0.0, 3.0], [1.0, 5.0, 2.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-11.0, 40.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank3_offset3(self):
+      arg0=numpy.array([[[[2.0, 4.0, 2.0], [-2.0, -2.0, 0.0], [-7.0, -1.0, -5.0], [4.0, -7.0, -5.0]], [[6.0, 7.0, -7.0], [-4.0, 
+4.0, 3.0], [0.0, -4.0, -3.0], [-2.0, 1.0, -7.0]]], [[[2.0, 2.0, -7.0], [4.0, 5.0, -3.0], [-2.0, 6.0, -6.0], [1.0, -1.0, -2.0]], 
+[[-6.0, -1.0, 6.0], [-3.0, -7.0, 5.0], [4.0, -7.0, -7.0], [-4.0, 4.0, -5.0]]]])
+      arg1=Data(numpy.array([[[0.0, 0.0, -3.0], [0.0, 1.0, -4.0], [0.0, 7.0, 5.0], [5.0, 5.0, -2.0]], [[-4.0, 0.0, -2.0], 
+[-3.0, -2.0, 0.0], [1.0, -3.0, 7.0], [-3.0, 1.0, 1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-60.0, 76.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank1_offset0(self):
+      arg0=numpy.array([4.0, 2.0])
+      arg1=Data(numpy.array([6.0, -7.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[24.0, -28.0], [12.0, -14.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank2_offset1(self):
+      arg0=numpy.array([[7.0, -7.0, 3.0], [3.0, -4.0, 6.0]])
+      arg1=Data(numpy.array([[-6.0, 3.0, -2.0], [-1.0, 0.0, 6.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-69.0, 11.0], [-42.0, 33.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank3_offset2(self):
+      arg0=numpy.array([[[4.0, -3.0, 2.0], [0.0, -1.0, -1.0]], [[-1.0, -7.0, -2.0], [-2.0, 0.0, -4.0]]])
+      arg1=Data(numpy.array([[[-1.0, 4.0, 3.0], [3.0, 4.0, 0.0]], [[0.0, -2.0, -7.0], [2.0, -6.0, -2.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-14.0, 0.0], [-39.0, 32.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank4_offset3(self):
+      arg0=numpy.array([[[[1.0, -7.0, 2.0], [-3.0, 1.0, 1.0], [6.0, -3.0, 1.0], [1.0, -5.0, 6.0]], [[0.0, 1.0, -3.0], [-3.0, 
+2.0, 6.0], [3.0, -4.0, -5.0], [0.0, -1.0, -4.0]]], [[[7.0, 1.0, 0.0], [-1.0, 7.0, 6.0], [0.0, 3.0, -3.0], [4.0, -3.0, 6.0]], 
+[[-5.0, 4.0, -2.0], [-2.0, 5.0, -7.0], [4.0, 6.0, 1.0], [4.0, 7.0, -1.0]]]])
+      arg1=Data(numpy.array([[[[7.0, 5.0, -1.0], [7.0, 5.0, -1.0], [-6.0, -6.0, 7.0], [-2.0, -2.0, 6.0]], [[-3.0, 4.0, -4.0], 
+[3.0, 6.0, 5.0], [7.0, 7.0, 7.0], [2.0, 0.0, 6.0]]], [[[-4.0, 0.0, 2.0], [-3.0, -5.0, -5.0], [-1.0, 3.0, -6.0], [7.0, -1.0, 
+0.0]], [[-3.0, 0.0, -3.0], [-4.0, -2.0, -4.0], [-5.0, 4.0, 4.0], [-5.0, 5.0, 0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-31.0, -73.0], [178.0, 38.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank2_offset0(self):
+      arg0=numpy.array([0.0, -6.0])
+      arg1=Data(numpy.array([[1.0, 4.0, 0.0, 0.0, -6.0], [-4.0, -3.0, -3.0, -1.0, 5.0], [3.0, -1.0, 0.0, 0.0, -5.0], [0.0, 
+-5.0, -2.0, -2.0, 3.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[-6.0, -24.0, 0.0, 0.0, 36.0], [24.0, 18.0, 18.0, 6.0, -30.0], [-18.0, 6.0, 0.0, 0.0, 30.0], [0.0, 30.0, 12.0, 
+12.0, -18.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank3_offset1(self):
+      arg0=numpy.array([[0.0, -3.0, 6.0], [-1.0, -4.0, 1.0]])
+      arg1=Data(numpy.array([[[-5.0, -4.0, 1.0], [-7.0, -5.0, 5.0], [6.0, 1.0, -6.0], [0.0, -6.0, 6.0], [2.0, 1.0, 6.0]], 
+[[4.0, 6.0, 6.0], [-5.0, -6.0, 7.0], [-2.0, -3.0, -1.0], [0.0, -3.0, 0.0], [3.0, -4.0, -4.0]], [[6.0, 0.0, 3.0], [-3.0, -1.0, 
+-4.0], [0.0, 2.0, -2.0], [5.0, -5.0, 1.0], [6.0, 4.0, 0.0]], [[-4.0, 1.0, 2.0], [-6.0, 0.0, 6.0], [6.0, -7.0, -5.0], [0.0, 3.0, 
+2.0], [5.0, 1.0, 6.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[18.0, 45.0, -39.0, 54.0, 33.0], [18.0, 60.0, 3.0, 9.0, -12.0], [18.0, -21.0, -18.0, 21.0, -12.0], 
+[9.0, 36.0, -9.0, 3.0, 33.0]], [[22.0, 32.0, -16.0, 30.0, 0.0], [-22.0, 36.0, 13.0, 12.0, 9.0], [-3.0, 3.0, -10.0, 16.0, 
+-22.0], [2.0, 12.0, 17.0, -10.0, -3.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank4_offset2(self):
+      arg0=numpy.array([[[-7.0, 7.0, -6.0], [-7.0, -6.0, -4.0]], [[4.0, 6.0, -7.0], [1.0, 2.0, -6.0]]])
+      arg1=Data(numpy.array([[[[3.0, -3.0, -1.0], [0.0, -7.0, 0.0]], [[6.0, 0.0, 7.0], [-4.0, 1.0, -7.0]], [[-2.0, 5.0, 0.0], 
+[3.0, 4.0, -1.0]], [[-2.0, 0.0, -5.0], [-5.0, 3.0, 5.0]], [[-7.0, -6.0, 2.0], [-5.0, 2.0, -4.0]]], [[[2.0, -7.0, -3.0], [-3.0, 
+-7.0, 0.0]], [[4.0, 5.0, 7.0], [-5.0, 3.0, 0.0]], [[3.0, -7.0, -7.0], [-3.0, -1.0, -6.0]], [[2.0, 0.0, 3.0], [-5.0, 2.0, 1.0]], 
+[[7.0, -5.0, -3.0], [-4.0, 0.0, -6.0]]], [[[-7.0, -5.0, 3.0], [-6.0, 0.0, -6.0]], [[-1.0, 2.0, 4.0], [-1.0, 7.0, 0.0]], [[1.0, 
+5.0, 1.0], [5.0, -1.0, -1.0]], [[-4.0, 3.0, -2.0], [2.0, 1.0, 3.0]], [[1.0, -3.0, 0.0], [1.0, -5.0, 5.0]]], [[[-6.0, -3.0, 
+1.0], [-2.0, -1.0, 0.0]], [[-2.0, -1.0, 1.0], [-2.0, 6.0, 0.0]], [[2.0, -7.0, 2.0], [-3.0, 2.0, -3.0]], [[-7.0, -4.0, 1.0], 
+[-5.0, 1.0, 4.0]], [[7.0, 5.0, -4.0], [6.0, -4.0, 3.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[6.0, -34.0, 8.0, 41.0, 34.0], [18.0, -18.0, 23.0, -13.0, -14.0], [62.0, -38.0, -3.0, 29.0, 
+-25.0], [35.0, -21.0, -54.0, 28.0, -20.0]], [[-13.0, 15.0, 39.0, -2.0, -55.0], [-30.0, -2.0, 50.0, -20.0, 51.0], [-49.0, -7.0, 
+36.0, 2.0, -53.0], [-53.0, -11.0, -29.0, -86.0, 66.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_constData_rank3_offset0(self):
+      arg0=numpy.array([3.0, 1.0])
+      arg1=Data(numpy.array([[[2.0, 2.0], [6.0, 4.0]], [[5.0, -2.0], [-4.0, -5.0]], [[-4.0, -3.0], [1.0, 0.0]], [[-6.0, 1.0], 
+[-6.0, -2.0]], [[2.0, 7.0], [4.0, 0.0]], [[-3.0, 7.0], [2.0, 0.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[6.0, 6.0], [18.0, 12.0]], [[15.0, -6.0], [-12.0, -15.0]], [[-12.0, -9.0], [3.0, 0.0]], [[-18.0, 
+3.0], [-18.0, -6.0]], [[6.0, 21.0], [12.0, 0.0]], [[-9.0, 21.0], [6.0, 0.0]]], [[[2.0, 2.0], [6.0, 4.0]], [[5.0, -2.0], [-4.0, 
+-5.0]], [[-4.0, -3.0], [1.0, 0.0]], [[-6.0, 1.0], [-6.0, -2.0]], [[2.0, 7.0], [4.0, 0.0]], [[-3.0, 7.0], [2.0, 
+0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank4_offset1(self):
+      arg0=numpy.array([[-7.0, -2.0, 0.0], [5.0, 7.0, 1.0]])
+      arg1=Data(numpy.array([[[[1.0, 4.0, 3.0], [1.0, 2.0, -2.0]], [[6.0, -3.0, -3.0], [0.0, 6.0, -7.0]]], [[[3.0, -2.0, 2.0], 
+[2.0, -1.0, -1.0]], [[-7.0, 7.0, -7.0], [0.0, -4.0, -1.0]]], [[[-1.0, 4.0, -7.0], [7.0, 2.0, -1.0]], [[-7.0, 5.0, -4.0], [1.0, 
+-5.0, 0.0]]], [[[7.0, -2.0, -7.0], [6.0, 6.0, 7.0]], [[-7.0, -7.0, 0.0], [6.0, -3.0, 0.0]]], [[[0.0, 6.0, 3.0], [2.0, -1.0, 
+0.0]], [[-7.0, -6.0, 0.0], [1.0, 0.0, 2.0]]], [[[6.0, 0.0, 4.0], [1.0, 3.0, -3.0]], [[-3.0, 2.0, -7.0], [-3.0, 5.0, 
+0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-15.0, -11.0], [-36.0, -12.0]], [[-17.0, -12.0], [35.0, 8.0]], [[-1.0, -53.0], [39.0, 3.0]], 
+[[-45.0, -54.0], [63.0, -36.0]], [[-12.0, -12.0], [61.0, -7.0]], [[-42.0, -13.0], [17.0, 11.0]]], [[[36.0, 17.0], [6.0, 35.0]], 
+[[3.0, 2.0], [7.0, -29.0]], [[16.0, 48.0], [-4.0, -30.0]], [[14.0, 79.0], [-84.0, 9.0]], [[45.0, 3.0], [-77.0, 7.0]], [[34.0, 
+23.0], [-8.0, 20.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank0_offset0(self):
+      arg0=numpy.array([3.0, 0.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(2.0)+(1-msk_arg1)*(0.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([6.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[0.0, 5.0, 5.0], [7.0, -7.0, 6.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-6.0, -2.0, -5.0])+(1.-msk_arg1)*numpy.array([-2.0, 7.0, -7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-35.0, -58.0])+(1.-msk_ref)*numpy.array([0.0, -105.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[[-1.0, -1.0, -3.0], [5.0, -1.0, -7.0]], [[-5.0, -6.0, 4.0], [-5.0, -1.0, 0.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, -7.0, 0.0], [-5.0, 2.0, -5.0]])+(1.-msk_arg1)*numpy.array([[7.0, -1.0, 6.0], [4.0, 0.0, 
+-3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([15.0, 65.0])+(1.-msk_ref)*numpy.array([17.0, -25.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank3_offset3(self):
+      arg0=numpy.array([[[[-2.0, 7.0, -1.0], [-5.0, -5.0, 7.0], [3.0, 6.0, 0.0], [-3.0, 0.0, 7.0]], [[-1.0, -6.0, -6.0], [-4.0, 
+0.0, -4.0], [-3.0, 3.0, -6.0], [-4.0, 1.0, -6.0]]], [[[0.0, 2.0, 1.0], [1.0, -2.0, -4.0], [0.0, -3.0, 0.0], [5.0, 2.0, -1.0]], 
+[[-7.0, 0.0, 6.0], [-1.0, -2.0, 3.0], [1.0, 0.0, -4.0], [0.0, -2.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[2.0, 4.0, -6.0], [-5.0, -1.0, 5.0], [4.0, -1.0, 5.0], [-2.0, 2.0, 6.0]], [[0.0, 1.0, 0.0], 
+[-2.0, 0.0, 5.0], [0.0, -7.0, -5.0], [5.0, -7.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 0.0, 4.0], [0.0, -5.0, 2.0], [5.0, 
+-1.0, 2.0], [-4.0, -3.0, 6.0]], [[2.0, 0.0, -3.0], [0.0, -3.0, 1.0], [3.0, 0.0, 5.0], [7.0, -1.0, -7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([77.0, 51.0])+(1.-msk_ref)*numpy.array([78.0, -96.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank1_offset0(self):
+      arg0=numpy.array([-3.0, 4.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, 4.0])+(1.-msk_arg1)*numpy.array([0.0, -6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, -12.0], [0.0, 16.0]])+(1.-msk_ref)*numpy.array([[0.0, 18.0], [0.0, -24.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[-5.0, -1.0, -1.0], [-5.0, 4.0, 4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[5.0, 2.0, 6.0], [-6.0, -3.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 3.0, -1.0], [6.0, 
+-6.0, -3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-33.0, 34.0], [7.0, 14.0]])+(1.-msk_ref)*numpy.array([[8.0, -21.0], [18.0, -66.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[[-5.0, -2.0, -2.0], [0.0, -1.0, 0.0]], [[6.0, -7.0, -5.0], [2.0, 4.0, 6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -1.0, -6.0], [-1.0, 1.0, 3.0]], [[-2.0, 6.0, 2.0], [6.0, 0.0, 
+-3.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 3.0, 3.0], [-2.0, -4.0, 6.0]], [[1.0, 7.0, -6.0], [3.0, -7.0, 3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[13.0, -6.0], [57.0, -70.0]])+(1.-msk_ref)*numpy.array([[-43.0, 0.0], [22.0, -17.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank4_offset3(self):
+      arg0=numpy.array([[[[4.0, -2.0, 7.0], [4.0, 4.0, -2.0], [3.0, -1.0, 7.0], [6.0, -2.0, 0.0]], [[-7.0, 4.0, 6.0], [1.0, 
+5.0, 0.0], [-4.0, -4.0, -2.0], [2.0, -3.0, -1.0]]], [[[5.0, -6.0, 5.0], [0.0, 6.0, 0.0], [-2.0, -1.0, -3.0], [2.0, -4.0, 
+-1.0]], [[2.0, -2.0, 3.0], [2.0, -5.0, -2.0], [0.0, -7.0, -5.0], [0.0, -6.0, 3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[5.0, 6.0, -2.0], [-6.0, -5.0, -4.0], [-2.0, -6.0, 1.0], [-3.0, 0.0, -7.0]], [[-7.0, -6.0, 
+-5.0], [1.0, 7.0, -4.0], [6.0, -5.0, 0.0], [2.0, -6.0, 2.0]]], [[[5.0, 0.0, -3.0], [4.0, 7.0, -3.0], [1.0, 1.0, 1.0], [2.0, 
+2.0, 0.0]], [[-7.0, -3.0, 1.0], [0.0, -5.0, 2.0], [2.0, -6.0, -1.0], [3.0, -2.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 
+-3.0, -5.0], [1.0, -5.0, -4.0], [0.0, 1.0, 6.0], [0.0, -2.0, 3.0]], [[-2.0, -6.0, -7.0], [0.0, -2.0, -3.0], [5.0, -4.0, 5.0], 
+[0.0, -7.0, 5.0]]], [[[2.0, 3.0, -2.0], [1.0, 4.0, -1.0], [3.0, 5.0, 7.0], [6.0, 2.0, 4.0]], [[-5.0, 2.0, -2.0], [1.0, -3.0, 
+-5.0], [7.0, 3.0, -3.0], [4.0, 2.0, 4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-6.0, 110.0], [-8.0, 129.0]])+(1.-msk_ref)*numpy.array([[-40.0, 76.0], [27.0, -25.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank2_offset0(self):
+      arg0=numpy.array([6.0, 3.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-2.0, -4.0, -6.0, -6.0, -2.0], [-1.0, 3.0, 7.0, 6.0, 1.0], [5.0, 2.0, 5.0, 3.0, 4.0], [4.0, 
+-7.0, -3.0, 0.0, 3.0]])+(1.-msk_arg1)*numpy.array([[1.0, -1.0, 5.0, -2.0, 1.0], [6.0, -2.0, 0.0, -3.0, 4.0], [0.0, -7.0, 2.0, 
+-3.0, 3.0], [-5.0, -5.0, -2.0, -2.0, -2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-12.0, -24.0, -36.0, -36.0, -12.0], [-6.0, 18.0, 42.0, 36.0, 6.0], [30.0, 12.0, 30.0, 18.0, 
+24.0], [24.0, -42.0, -18.0, 0.0, 18.0]], [[-6.0, -12.0, -18.0, -18.0, -6.0], [-3.0, 9.0, 21.0, 18.0, 3.0], [15.0, 6.0, 15.0, 
+9.0, 12.0], [12.0, -21.0, -9.0, 0.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -6.0, 30.0, -12.0, 6.0], [36.0, -12.0, 0.0, 
+-18.0, 24.0], [0.0, -42.0, 12.0, -18.0, 18.0], [-30.0, -30.0, -12.0, -12.0, -12.0]], [[3.0, -3.0, 15.0, -6.0, 3.0], [18.0, 
+-6.0, 0.0, -9.0, 12.0], [0.0, -21.0, 6.0, -9.0, 9.0], [-15.0, -15.0, -6.0, -6.0, -6.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank3_offset1(self):
+      arg0=numpy.array([[3.0, -4.0, 4.0], [6.0, -7.0, 6.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-3.0, 2.0, -4.0], [-7.0, 3.0, 0.0], [-3.0, 1.0, -3.0], [0.0, -5.0, -1.0], [3.0, 7.0, -7.0]], 
+[[-2.0, 1.0, 1.0], [-4.0, -1.0, -1.0], [-7.0, -6.0, 5.0], [4.0, 3.0, 7.0], [7.0, -1.0, -7.0]], [[7.0, 4.0, -1.0], [7.0, -7.0, 
+-3.0], [4.0, 5.0, 1.0], [-3.0, -4.0, 0.0], [3.0, -3.0, 4.0]], [[2.0, 3.0, -7.0], [0.0, 5.0, 1.0], [0.0, -5.0, 7.0], [7.0, -5.0, 
+3.0], [1.0, -7.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -2.0, 3.0], [-1.0, -5.0, 0.0], [-3.0, 1.0, -5.0], [7.0, -5.0, 
+-3.0], [4.0, 2.0, 0.0]], [[6.0, -3.0, 1.0], [5.0, 1.0, -3.0], [5.0, -7.0, 6.0], [-2.0, -6.0, 7.0], [4.0, -6.0, -7.0]], [[-6.0, 
+3.0, -5.0], [3.0, 0.0, 4.0], [-7.0, 1.0, -7.0], [-3.0, -1.0, 6.0], [-3.0, -2.0, 4.0]], [[-3.0, -4.0, -4.0], [-3.0, 5.0, -3.0], 
+[-2.0, -1.0, -3.0], [-4.0, -4.0, 6.0], [4.0, -2.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-33.0, -33.0, -25.0, 16.0, -47.0], [-6.0, -12.0, 23.0, 28.0, -3.0], [1.0, 37.0, -4.0, 7.0, 
+37.0], [-34.0, -16.0, 48.0, 53.0, 19.0]], [[-56.0, -63.0, -43.0, 29.0, -73.0], [-13.0, -23.0, 30.0, 45.0, 7.0], [8.0, 73.0, 
+-5.0, 10.0, 63.0], [-51.0, -29.0, 77.0, 95.0, 37.0]]])+(1.-msk_ref)*numpy.array([[[5.0, 17.0, -33.0, 29.0, 4.0], [34.0, -1.0, 
+67.0, 46.0, 8.0], [-50.0, 25.0, -53.0, 19.0, 15.0], [-9.0, -41.0, -14.0, 28.0, 28.0]], [[2.0, 29.0, -55.0, 59.0, 10.0], [63.0, 
+5.0, 115.0, 72.0, 24.0], [-87.0, 42.0, -91.0, 25.0, 20.0], [-14.0, -71.0, -23.0, 40.0, 50.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[[-7.0, 0.0, 0.0], [-3.0, 0.0, 7.0]], [[-3.0, 7.0, 2.0], [4.0, 1.0, -2.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[1.0, -2.0, 2.0], [-6.0, 2.0, 5.0]], [[3.0, -3.0, -7.0], [-3.0, 3.0, 4.0]], [[-4.0, -4.0, 
+-4.0], [1.0, -7.0, -5.0]], [[0.0, -2.0, 4.0], [7.0, -7.0, 1.0]], [[0.0, 6.0, 3.0], [-4.0, -5.0, 7.0]]], [[[7.0, -4.0, -2.0], 
+[-7.0, 0.0, -4.0]], [[-2.0, -5.0, -1.0], [0.0, -3.0, -4.0]], [[-4.0, -7.0, -1.0], [-3.0, 6.0, -4.0]], [[1.0, -4.0, 6.0], [3.0, 
+1.0, 1.0]], [[-5.0, -4.0, 7.0], [2.0, -6.0, -3.0]]], [[[6.0, 1.0, -7.0], [-4.0, -2.0, 4.0]], [[1.0, 0.0, 2.0], [2.0, -5.0, 
+-7.0]], [[6.0, 4.0, 5.0], [7.0, 0.0, -4.0]], [[7.0, -2.0, -7.0], [-1.0, 0.0, 7.0]], [[4.0, -3.0, 1.0], [-3.0, 6.0, 7.0]]], 
+[[[-4.0, -2.0, -4.0], [-4.0, 1.0, 6.0]], [[4.0, -3.0, -6.0], [-3.0, 4.0, -5.0]], [[-4.0, 0.0, 5.0], [4.0, -4.0, 0.0]], [[-2.0, 
+7.0, 7.0], [-1.0, 4.0, 7.0]], [[-5.0, 1.0, 5.0], [1.0, 2.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, 4.0, -1.0], [7.0, 1.0, 
+-1.0]], [[-5.0, -3.0, 4.0], [2.0, 1.0, 2.0]], [[4.0, 5.0, 1.0], [-7.0, 7.0, 6.0]], [[-7.0, 6.0, 4.0], [3.0, 2.0, 3.0]], [[0.0, 
+0.0, 6.0], [-6.0, 2.0, -5.0]]], [[[6.0, -1.0, -4.0], [-6.0, -7.0, 6.0]], [[-2.0, 5.0, 0.0], [3.0, 3.0, 4.0]], [[2.0, -3.0, 
+3.0], [0.0, 7.0, 7.0]], [[3.0, -1.0, 3.0], [7.0, 0.0, 2.0]], [[-2.0, 6.0, -2.0], [-1.0, -2.0, 7.0]]], [[[4.0, -2.0, -5.0], 
+[4.0, -5.0, -6.0]], [[4.0, 0.0, -4.0], [1.0, 2.0, 6.0]], [[-3.0, -4.0, -2.0], [0.0, 4.0, 7.0]], [[-1.0, -1.0, -6.0], [1.0, 4.0, 
+-7.0]], [[-1.0, 7.0, 5.0], [-2.0, 1.0, 3.0]]], [[[2.0, -3.0, 0.0], [5.0, 5.0, -5.0]], [[-4.0, 0.0, 6.0], [0.0, 5.0, 0.0]], 
+[[-7.0, -5.0, -6.0], [0.0, 1.0, -3.0]], [[1.0, 7.0, 0.0], [6.0, -1.0, -5.0]], [[0.0, -2.0, -3.0], [7.0, 4.0, -7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[46.0, 16.0, -10.0, -14.0, 61.0], [-56.0, -14.0, 9.0, -9.0, 8.0], [-2.0, -62.0, -91.0, 3.0, 
+30.0], [82.0, -54.0, 16.0, 66.0, 53.0]], [[-45.0, -61.0, -17.0, 13.0, 13.0], [-73.0, -26.0, -37.0, -8.0, 9.0], [-51.0, 18.0, 
+56.0, -67.0, -51.0], [-37.0, -43.0, 34.0, 55.0, 32.0]]])+(1.-msk_ref)*numpy.array([[[-56.0, 43.0, 35.0, 61.0, -17.0], [18.0, 
+33.0, 35.0, -28.0, 66.0], [-82.0, 11.0, 70.0, -45.0, 34.0], [-64.0, 28.0, 28.0, -60.0, -70.0]], [[45.0, 7.0, -8.0, 79.0, 0.0], 
+[-76.0, 48.0, -28.0, 14.0, 24.0], [-13.0, -26.0, -33.0, 6.0, 49.0], [8.0, 29.0, -19.0, 79.0, 26.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank3_offset0(self):
+      arg0=numpy.array([-4.0, -5.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[7.0, 5.0], [0.0, 7.0]], [[0.0, -2.0], [-3.0, -2.0]], [[-3.0, -5.0], [7.0, -4.0]], [[2.0, 
+7.0], [7.0, 0.0]], [[1.0, 1.0], [-7.0, -3.0]], [[-6.0, -6.0], [5.0, 1.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 7.0], [6.0, 
+-1.0]], [[-5.0, 0.0], [0.0, 4.0]], [[-1.0, 2.0], [5.0, -2.0]], [[4.0, 6.0], [4.0, 2.0]], [[0.0, -1.0], [7.0, 0.0]], [[0.0, 
+4.0], [-2.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-28.0, -20.0], [0.0, -28.0]], [[0.0, 8.0], [12.0, 8.0]], [[12.0, 20.0], [-28.0, 16.0]], 
+[[-8.0, -28.0], [-28.0, 0.0]], [[-4.0, -4.0], [28.0, 12.0]], [[24.0, 24.0], [-20.0, -4.0]]], [[[-35.0, -25.0], [0.0, -35.0]], 
+[[0.0, 10.0], [15.0, 10.0]], [[15.0, 25.0], [-35.0, 20.0]], [[-10.0, -35.0], [-35.0, 0.0]], [[-5.0, -5.0], [35.0, 15.0]], 
+[[30.0, 30.0], [-25.0, -5.0]]]])+(1.-msk_ref)*numpy.array([[[[12.0, -28.0], [-24.0, 4.0]], [[20.0, 0.0], [0.0, -16.0]], [[4.0, 
+-8.0], [-20.0, 8.0]], [[-16.0, -24.0], [-16.0, -8.0]], [[0.0, 4.0], [-28.0, 0.0]], [[0.0, -16.0], [8.0, 24.0]]], [[[15.0, 
+-35.0], [-30.0, 5.0]], [[25.0, 0.0], [0.0, -20.0]], [[5.0, -10.0], [-25.0, 10.0]], [[-20.0, -30.0], [-20.0, -10.0]], [[0.0, 
+5.0], [-35.0, 0.0]], [[0.0, -20.0], [10.0, 30.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank4_offset1(self):
+      arg0=numpy.array([[-2.0, 6.0, 3.0], [7.0, -6.0, 2.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-7.0, 3.0, -4.0], [3.0, -3.0, 3.0]], [[-3.0, 0.0, 5.0], [-3.0, 1.0, 3.0]]], [[[-6.0, 6.0, 
+3.0], [4.0, -2.0, -5.0]], [[7.0, -1.0, 0.0], [-2.0, 1.0, -6.0]]], [[[1.0, 4.0, 0.0], [-1.0, 3.0, -5.0]], [[2.0, 0.0, 0.0], 
+[-4.0, 2.0, 0.0]]], [[[0.0, -4.0, 7.0], [-6.0, -1.0, 0.0]], [[3.0, 0.0, -7.0], [-2.0, 1.0, -1.0]]], [[[3.0, 6.0, 1.0], [5.0, 
+3.0, -7.0]], [[-2.0, 2.0, 7.0], [0.0, -1.0, 0.0]]], [[[-6.0, -7.0, 0.0], [-5.0, 5.0, -2.0]], [[-6.0, 1.0, 1.0], [-5.0, 4.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -3.0, -1.0], [5.0, -1.0, 0.0]], [[-3.0, 6.0, -1.0], [-7.0, 6.0, 4.0]]], [[[7.0, 
+-3.0, 3.0], [-6.0, 0.0, 6.0]], [[-5.0, 0.0, -7.0], [0.0, -5.0, 5.0]]], [[[7.0, 1.0, -7.0], [-1.0, 5.0, 4.0]], [[3.0, -7.0, 
+-3.0], [0.0, -1.0, -4.0]]], [[[-4.0, 6.0, -6.0], [-7.0, -4.0, 4.0]], [[-2.0, 2.0, 4.0], [6.0, 5.0, -4.0]]], [[[-1.0, -2.0, 
+0.0], [-7.0, -2.0, -1.0]], [[1.0, -3.0, -6.0], [-2.0, 5.0, 7.0]]], [[[0.0, -5.0, 5.0], [3.0, -2.0, -3.0]], [[-1.0, 4.0, 0.0], 
+[7.0, 0.0, 7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[20.0, -15.0], [21.0, 21.0]], [[57.0, -35.0], [-20.0, -8.0]], [[22.0, 5.0], [-4.0, 20.0]], 
+[[-3.0, 6.0], [-27.0, 7.0]], [[33.0, -13.0], [37.0, -6.0]], [[-30.0, 34.0], [21.0, 16.0]]], [[[-75.0, 45.0], [-11.0, -21.0]], 
+[[-72.0, 30.0], [55.0, -32.0]], [[-17.0, -35.0], [14.0, -40.0]], [[38.0, -36.0], [7.0, -22.0]], [[-13.0, 3.0], [-12.0, 6.0]], 
+[[0.0, -69.0], [-46.0, -71.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -16.0], [39.0, 62.0]], [[-23.0, 30.0], [-11.0, -15.0]], 
+[[-29.0, 44.0], [-57.0, -18.0]], [[26.0, 2.0], [28.0, 6.0]], [[-10.0, -1.0], [-38.0, 55.0]], [[-15.0, -27.0], [26.0, 7.0]]], 
+[[[16.0, 41.0], [-59.0, -77.0]], [[73.0, -30.0], [-49.0, 40.0]], [[29.0, -29.0], [57.0, -2.0]], [[-76.0, -17.0], [-18.0, 4.0]], 
+[[5.0, -39.0], [13.0, -30.0]], [[40.0, 27.0], [-31.0, 63.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_float_rank0_offset0(self):
+      arg0=numpy.array([[-4.0, 7.0, -2.0, 2.0, -5.0], [-4.0, 4.0, 0.0, -1.0, -2.0], [-7.0, 6.0, 0.0, 6.0, 4.0], [-7.0, -4.0, 
+-1.0, -7.0, 7.0]])
+      arg1=-4.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[16.0, -28.0, 8.0, -8.0, 20.0], [16.0, -16.0, -0.0, 4.0, 8.0], [28.0, -24.0, -0.0, -24.0, -16.0], [28.0, 
+16.0, 4.0, 28.0, -28.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank0_offset0(self):
+      arg0=numpy.array([[7.0, 5.0, -3.0, -1.0, 6.0], [3.0, -7.0, 3.0, 6.0, -3.0], [0.0, 3.0, -2.0, -4.0, -6.0], [-3.0, -3.0, 
+3.0, -7.0, -5.0]])
+      arg1=numpy.array(-3.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[-21.0, -15.0, 9.0, 3.0, -18.0], [-9.0, 21.0, -9.0, -18.0, 9.0], [-0.0, -9.0, 6.0, 12.0, 18.0], [9.0, 
+9.0, -9.0, 21.0, 15.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank1_offset1(self):
+      arg0=numpy.array([[[5.0, 7.0, 4.0], [0.0, 6.0, -7.0], [-5.0, -3.0, 0.0], [-5.0, 0.0, -6.0], [-2.0, 3.0, 0.0]], [[-1.0, 
+-5.0, 4.0], [0.0, -6.0, 5.0], [-5.0, 3.0, 4.0], [4.0, -3.0, 1.0], [5.0, -3.0, 0.0]], [[3.0, 0.0, -4.0], [4.0, 4.0, -5.0], [6.0, 
+-4.0, 0.0], [4.0, 6.0, -3.0], [-2.0, 1.0, -6.0]], [[-3.0, -2.0, 3.0], [7.0, -2.0, 3.0], [7.0, -2.0, 0.0], [5.0, -6.0, -3.0], 
+[-7.0, 1.0, -6.0]]])
+      arg1=numpy.array([5.0, 0.0, -6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[1.0, 42.0, -25.0, 11.0, -10.0], [-29.0, -30.0, -49.0, 14.0, 25.0], [39.0, 50.0, 30.0, 38.0, 26.0], 
+[-33.0, 17.0, 35.0, 43.0, 1.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank2_offset2(self):
+      arg0=numpy.array([[[[0.0, -2.0, 7.0], [5.0, -1.0, 0.0]], [[-1.0, -3.0, -7.0], [-7.0, -2.0, 0.0]], [[-6.0, 0.0, -7.0], 
+[-2.0, 6.0, 2.0]], [[1.0, 0.0, -4.0], [-2.0, 5.0, -5.0]], [[6.0, 6.0, 4.0], [7.0, 4.0, 2.0]]], [[[-7.0, 6.0, 1.0], [-2.0, -7.0, 
+-6.0]], [[-3.0, 7.0, 5.0], [-3.0, -4.0, 3.0]], [[5.0, -2.0, -6.0], [3.0, -3.0, 0.0]], [[-4.0, 1.0, 7.0], [6.0, -4.0, 0.0]], 
+[[-5.0, 2.0, 3.0], [-7.0, 3.0, 4.0]]], [[[2.0, 7.0, 2.0], [0.0, -3.0, 2.0]], [[2.0, -1.0, 3.0], [2.0, 7.0, 0.0]], [[2.0, 5.0, 
+-5.0], [0.0, 3.0, -6.0]], [[4.0, 3.0, 4.0], [-5.0, -2.0, 2.0]], [[-5.0, 2.0, 7.0], [-2.0, 6.0, -5.0]]], [[[2.0, 6.0, -5.0], 
+[5.0, -7.0, 1.0]], [[0.0, -6.0, 5.0], [7.0, 0.0, -5.0]], [[2.0, 1.0, -1.0], [0.0, 6.0, -3.0]], [[0.0, 0.0, 0.0], [-1.0, -5.0, 
+5.0]], [[-2.0, 0.0, -6.0], [3.0, 7.0, -2.0]]]])
+      arg1=numpy.array([[0.0, 2.0, -1.0], [-5.0, 4.0, 3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[-40.0, 28.0, 47.0, 19.0, -5.0], [-25.0, 17.0, -25.0, -51.0, 60.0], [6.0, 13.0, 9.0, 25.0, 16.0], 
+[-33.0, -67.0, 18.0, 0.0, 13.0]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank1_offset0(self):
+      arg0=numpy.array([[-6.0, -2.0, -2.0, 4.0, -2.0], [-7.0, 1.0, -5.0, -5.0, 1.0], [2.0, 6.0, 6.0, 0.0, 5.0], [6.0, -4.0, 
+6.0, 5.0, -5.0]])
+      arg1=numpy.array([6.0, -6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-36.0, 36.0], [-12.0, 12.0], [-12.0, 12.0], [24.0, -24.0], [-12.0, 12.0]], [[-42.0, 42.0], [6.0, 
+-6.0], [-30.0, 30.0], [-30.0, 30.0], [6.0, -6.0]], [[12.0, -12.0], [36.0, -36.0], [36.0, -36.0], [0.0, 0.0], [30.0, -30.0]], 
+[[36.0, -36.0], [-24.0, 24.0], [36.0, -36.0], [30.0, -30.0], [-30.0, 30.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank2_offset1(self):
+      arg0=numpy.array([[[1.0, -1.0, -2.0], [-4.0, -4.0, -2.0], [-4.0, 3.0, 5.0], [5.0, 3.0, 0.0], [-7.0, 0.0, -2.0]], [[-5.0, 
+4.0, 1.0], [-4.0, 6.0, -2.0], [-7.0, 2.0, -6.0], [7.0, -3.0, -5.0], [7.0, 6.0, -1.0]], [[4.0, 5.0, 4.0], [5.0, 0.0, 6.0], [2.0, 
+-5.0, 7.0], [2.0, 0.0, 6.0], [-3.0, 4.0, -1.0]], [[-6.0, -3.0, 3.0], [6.0, 5.0, -3.0], [0.0, -2.0, 1.0], [0.0, -1.0, 5.0], 
+[-5.0, 3.0, -5.0]]])
+      arg1=numpy.array([[-5.0, 2.0, -5.0], [4.0, -3.0, -5.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[3.0, 17.0], [22.0, 6.0], [1.0, -50.0], [-19.0, 11.0], [45.0, -18.0]], [[28.0, -37.0], [42.0, -24.0], 
+[69.0, -4.0], [-16.0, 62.0], [-18.0, 15.0]], [[-30.0, -19.0], [-55.0, -10.0], [-55.0, -12.0], [-40.0, -22.0], [28.0, -19.0]], 
+[[9.0, -30.0], [-5.0, 24.0], [-9.0, 1.0], [-27.0, -22.0], [56.0, -4.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank3_offset2(self):
+      arg0=numpy.array([[[[6.0, 0.0, -1.0], [-3.0, -6.0, -2.0]], [[0.0, -7.0, 3.0], [4.0, -3.0, 7.0]], [[-1.0, -5.0, -2.0], 
+[3.0, 5.0, -5.0]], [[0.0, -3.0, -3.0], [-7.0, 2.0, 1.0]], [[-1.0, -7.0, 5.0], [1.0, 7.0, 3.0]]], [[[-4.0, -4.0, 0.0], [3.0, 
+2.0, 3.0]], [[-1.0, -5.0, 0.0], [2.0, 6.0, 7.0]], [[-2.0, 4.0, 4.0], [7.0, 1.0, 4.0]], [[3.0, 7.0, -4.0], [5.0, 0.0, -4.0]], 
+[[6.0, -2.0, 4.0], [0.0, 4.0, -1.0]]], [[[6.0, -7.0, -7.0], [-4.0, -5.0, -1.0]], [[-4.0, -3.0, -1.0], [-1.0, 0.0, 4.0]], 
+[[-6.0, 3.0, 0.0], [-7.0, -2.0, -6.0]], [[-7.0, 1.0, 7.0], [5.0, 1.0, 1.0]], [[1.0, 0.0, 2.0], [-3.0, -2.0, -7.0]]], [[[0.0, 
+2.0, 4.0], [-6.0, 1.0, -7.0]], [[2.0, -1.0, -2.0], [5.0, 4.0, 6.0]], [[5.0, 1.0, -1.0], [0.0, 4.0, 0.0]], [[3.0, -7.0, -2.0], 
+[5.0, 6.0, 4.0]], [[5.0, -5.0, 4.0], [0.0, -7.0, 7.0]]]])
+      arg1=numpy.array([[[0.0, -3.0, 1.0], [0.0, 5.0, -3.0]], [[0.0, 5.0, -2.0], [0.0, -7.0, -4.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[-25.0, 52.0], [-12.0, -48.0], [53.0, -36.0], [13.0, -27.0], [52.0, -106.0]], [[13.0, -46.0], [24.0, 
+-95.0], [-15.0, -11.0], [-13.0, 59.0], [33.0, -42.0]], [[-8.0, 18.0], [-4.0, -29.0], [-1.0, 53.0], [6.0, -20.0], [13.0, 38.0]], 
+[[24.0, 23.0], [3.0, -53.0], [16.0, -21.0], [37.0, -89.0], [-37.0, -12.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_array_rank2_offset0(self):
+      arg0=numpy.array([[4.0, 0.0, -5.0, -3.0, 2.0], [-2.0, 3.0, -1.0, 0.0, -5.0], [-4.0, -7.0, -6.0, 2.0, 5.0], [-3.0, 1.0, 
+-3.0, -5.0, 5.0]])
+      arg1=numpy.array([[-5.0, 5.0, 0.0, -5.0, -1.0], [-4.0, -2.0, -4.0, -6.0, 6.0], [-1.0, 7.0, 0.0, 7.0, 7.0], [7.0, 0.0, 
+-5.0, 3.0, -5.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-20.0, 20.0, 0.0, -20.0, -4.0], [-16.0, -8.0, -16.0, -24.0, 24.0], [-4.0, 28.0, 0.0, 28.0, 28.0], 
+[28.0, 0.0, -20.0, 12.0, -20.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[25.0, -25.0, 0.0, 25.0, 5.0], [20.0, 10.0, 20.0, 30.0, -30.0], [5.0, -35.0, 0.0, -35.0, -35.0], [-35.0, 0.0, 
+25.0, -15.0, 25.0]], [[15.0, -15.0, 0.0, 15.0, 3.0], [12.0, 6.0, 12.0, 18.0, -18.0], [3.0, -21.0, 0.0, -21.0, -21.0], [-21.0, 
+0.0, 15.0, -9.0, 15.0]], [[-10.0, 10.0, 0.0, -10.0, -2.0], [-8.0, -4.0, -8.0, -12.0, 12.0], [-2.0, 14.0, 0.0, 14.0, 14.0], 
+[14.0, 0.0, -10.0, 6.0, -10.0]]], [[[10.0, -10.0, 0.0, 10.0, 2.0], [8.0, 4.0, 8.0, 12.0, -12.0], [2.0, -14.0, 0.0, -14.0, 
+-14.0], [-14.0, 0.0, 10.0, -6.0, 10.0]], [[-15.0, 15.0, 0.0, -15.0, -3.0], [-12.0, -6.0, -12.0, -18.0, 18.0], [-3.0, 21.0, 0.0, 
+21.0, 21.0], [21.0, 0.0, -15.0, 9.0, -15.0]], [[5.0, -5.0, 0.0, 5.0, 1.0], [4.0, 2.0, 4.0, 6.0, -6.0], [1.0, -7.0, 0.0, -7.0, 
+-7.0], [-7.0, 0.0, 5.0, -3.0, 5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[25.0, -25.0, 0.0, 25.0, 5.0], [20.0, 10.0, 20.0, 30.0, -30.0], [5.0, -35.0, 0.0, -35.0, -35.0], [-35.0, 
+0.0, 25.0, -15.0, 25.0]]], [[[20.0, -20.0, 0.0, 20.0, 4.0], [16.0, 8.0, 16.0, 24.0, -24.0], [4.0, -28.0, 0.0, -28.0, -28.0], 
+[-28.0, 0.0, 20.0, -12.0, 20.0]], [[35.0, -35.0, 0.0, 35.0, 7.0], [28.0, 14.0, 28.0, 42.0, -42.0], [7.0, -49.0, 0.0, -49.0, 
+-49.0], [-49.0, 0.0, 35.0, -21.0, 35.0]], [[30.0, -30.0, 0.0, 30.0, 6.0], [24.0, 12.0, 24.0, 36.0, -36.0], [6.0, -42.0, 0.0, 
+-42.0, -42.0], [-42.0, 0.0, 30.0, -18.0, 30.0]], [[-10.0, 10.0, 0.0, -10.0, -2.0], [-8.0, -4.0, -8.0, -12.0, 12.0], [-2.0, 
+14.0, 0.0, 14.0, 14.0], [14.0, 0.0, -10.0, 6.0, -10.0]], [[-25.0, 25.0, 0.0, -25.0, -5.0], [-20.0, -10.0, -20.0, -30.0, 30.0], 
+[-5.0, 35.0, 0.0, 35.0, 35.0], [35.0, 0.0, -25.0, 15.0, -25.0]]], [[[15.0, -15.0, 0.0, 15.0, 3.0], [12.0, 6.0, 12.0, 18.0, 
+-18.0], [3.0, -21.0, 0.0, -21.0, -21.0], [-21.0, 0.0, 15.0, -9.0, 15.0]], [[-5.0, 5.0, 0.0, -5.0, -1.0], [-4.0, -2.0, -4.0, 
+-6.0, 6.0], [-1.0, 7.0, 0.0, 7.0, 7.0], [7.0, 0.0, -5.0, 3.0, -5.0]], [[15.0, -15.0, 0.0, 15.0, 3.0], [12.0, 6.0, 12.0, 18.0, 
+-18.0], [3.0, -21.0, 0.0, -21.0, -21.0], [-21.0, 0.0, 15.0, -9.0, 15.0]], [[25.0, -25.0, 0.0, 25.0, 5.0], [20.0, 10.0, 20.0, 
+30.0, -30.0], [5.0, -35.0, 0.0, -35.0, -35.0], [-35.0, 0.0, 25.0, -15.0, 25.0]], [[-25.0, 25.0, 0.0, -25.0, -5.0], [-20.0, 
+-10.0, -20.0, -30.0, 30.0], [-5.0, 35.0, 0.0, 35.0, 35.0], [35.0, 0.0, -25.0, 15.0, -25.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank3_offset1(self):
+      arg0=numpy.array([[[-6.0, -4.0, 4.0], [6.0, -2.0, -7.0], [4.0, -4.0, -6.0], [7.0, 1.0, -7.0], [5.0, -4.0, -3.0]], [[4.0, 
+-1.0, 6.0], [-1.0, 6.0, 0.0], [6.0, -2.0, 3.0], [7.0, 6.0, -7.0], [2.0, -3.0, -1.0]], [[0.0, -5.0, 3.0], [-7.0, -5.0, -3.0], 
+[7.0, -7.0, 7.0], [-3.0, 0.0, 0.0], [5.0, 2.0, 7.0]], [[-1.0, -6.0, 7.0], [0.0, 4.0, 2.0], [7.0, -4.0, 6.0], [-4.0, -4.0, 
+-6.0], [-6.0, 7.0, -3.0]]])
+      arg1=numpy.array([[[-6.0, -3.0, -5.0], [-7.0, 5.0, 6.0], [-4.0, 2.0, 0.0], [-7.0, 7.0, 4.0], [7.0, -5.0, 6.0]], [[3.0, 
+2.0, -2.0], [0.0, 1.0, -6.0], [-4.0, 2.0, 5.0], [-2.0, 0.0, 0.0], [-3.0, -5.0, 6.0]], [[3.0, 0.0, 0.0], [0.0, 4.0, 1.0], [-2.0, 
+5.0, -1.0], [2.0, 2.0, -7.0], [-2.0, 7.0, -6.0]], [[-5.0, -4.0, 4.0], [3.0, 7.0, -5.0], [5.0, -3.0, 6.0], [-3.0, 6.0, 6.0], 
+[-1.0, 0.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[28.0, 46.0, 16.0, 30.0, 2.0], [-34.0, -28.0, 36.0, 12.0, 62.0], [-18.0, -12.0, -12.0, -48.0, -40.0], 
+[62.0, -66.0, 6.0, 18.0, 14.0]], [[5.0, -94.0, -28.0, -84.0, 10.0], [28.0, 40.0, -63.0, -12.0, -50.0], [18.0, -15.0, -15.0, 
+57.0, 16.0], [-50.0, 39.0, -6.0, -72.0, -20.0]], [[18.0, -84.0, -24.0, -80.0, 12.0], [16.0, 32.0, -54.0, -8.0, -28.0], [12.0, 
+-22.0, -22.0, 42.0, 0.0], [-28.0, 14.0, -4.0, -72.0, -16.0]], [[-10.0, -86.0, -26.0, -70.0, 2.0], [37.0, 43.0, -61.0, -14.0, 
+-68.0], [21.0, -3.0, -2.0, 65.0, 35.0], [-67.0, 63.0, -10.0, -57.0, -21.0]], [[-3.0, -73.0, -28.0, -75.0, 37.0], [13.0, 14.0, 
+-43.0, -10.0, -13.0], [15.0, -19.0, -27.0, 23.0, -20.0], [-21.0, 2.0, 19.0, -57.0, -11.0]]], [[[-51.0, 3.0, -18.0, -11.0, 
+69.0], [-2.0, -37.0, 12.0, -8.0, 29.0], [12.0, 2.0, -19.0, -36.0, -51.0], [8.0, -25.0, 59.0, 18.0, 8.0]], [[-12.0, 37.0, 16.0, 
+49.0, -37.0], [9.0, 6.0, 16.0, 2.0, -27.0], [-3.0, 24.0, 32.0, 10.0, 44.0], [-19.0, 39.0, -23.0, 39.0, 1.0]], [[-45.0, -34.0, 
+-28.0, -44.0, 70.0], [8.0, -20.0, -13.0, -12.0, 10.0], [18.0, -5.0, -25.0, -13.0, -44.0], [-10.0, -11.0, 54.0, -12.0, 0.0]], 
+[[-25.0, -61.0, -16.0, -35.0, -23.0], [47.0, 48.0, -51.0, -14.0, -93.0], [21.0, 17.0, 23.0, 75.0, 70.0], [-87.0, 98.0, -25.0, 
+-27.0, -21.0]], [[2.0, -35.0, -14.0, -39.0, 23.0], [2.0, 3.0, -19.0, -4.0, 3.0], [6.0, -13.0, -18.0, 5.0, -19.0], [-2.0, -10.0, 
+13.0, -30.0, -4.0]]], [[[0.0, -7.0, -10.0, -23.0, 43.0], [-16.0, -23.0, 5.0, 0.0, 43.0], [0.0, -17.0, -28.0, -31.0, -53.0], 
+[32.0, -50.0, 33.0, -12.0, 6.0]], [[72.0, 6.0, 18.0, 2.0, -42.0], [-25.0, 13.0, 3.0, 14.0, 28.0], [-21.0, -23.0, -8.0, -3.0, 
+-3.0], [43.0, -41.0, -38.0, -27.0, 1.0]], [[-56.0, -42.0, -42.0, -70.0, 126.0], [-7.0, -49.0, -7.0, -14.0, 56.0], [21.0, -21.0, 
+-56.0, -49.0, -105.0], [21.0, -63.0, 98.0, -21.0, 7.0]], [[18.0, 21.0, 12.0, 21.0, -21.0], [-9.0, 0.0, 12.0, 6.0, 9.0], [-9.0, 
+0.0, 6.0, -6.0, 6.0], [15.0, -9.0, -15.0, 9.0, 3.0]], [[-71.0, 17.0, -16.0, 7.0, 67.0], [5.0, -40.0, 19.0, -10.0, 17.0], [15.0, 
+15.0, -7.0, -35.0, -38.0], [-5.0, -6.0, 61.0, 39.0, 9.0]]], [[[-11.0, 19.0, -8.0, -7.0, 65.0], [-29.0, -48.0, 27.0, 2.0, 75.0], 
+[-3.0, -17.0, -35.0, -63.0, -82.0], [57.0, -80.0, 55.0, 9.0, 15.0]], [[-22.0, 32.0, 8.0, 36.0, -8.0], [4.0, -8.0, 18.0, 0.0, 
+-8.0], [0.0, 18.0, 18.0, -6.0, 16.0], [-8.0, 18.0, 0.0, 36.0, 4.0]], [[-60.0, -33.0, -36.0, -53.0, 105.0], [1.0, -40.0, -6.0, 
+-14.0, 35.0], [21.0, -10.0, -40.0, -36.0, -78.0], [5.0, -37.0, 83.0, -9.0, 5.0]], [[66.0, -28.0, 8.0, -24.0, -44.0], [-8.0, 
+32.0, -22.0, 8.0, -4.0], [-12.0, -22.0, -6.0, 26.0, 16.0], [12.0, -10.0, -44.0, -48.0, -8.0]], [[30.0, 59.0, 38.0, 79.0, 
+-95.0], [2.0, 25.0, 23.0, 12.0, -35.0], [-18.0, 25.0, 50.0, 23.0, 79.0], [-10.0, 46.0, -69.0, 42.0, 0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank4_offset2(self):
+      arg0=numpy.array([[[[-2.0, 5.0, 7.0], [5.0, -7.0, 2.0]], [[-3.0, -1.0, 6.0], [-3.0, 4.0, -5.0]], [[3.0, -3.0, -7.0], 
+[-6.0, -2.0, -1.0]], [[7.0, -2.0, 3.0], [0.0, 0.0, 5.0]], [[6.0, 4.0, -1.0], [-2.0, -2.0, -5.0]]], [[[6.0, -2.0, 3.0], [0.0, 
+1.0, -5.0]], [[-3.0, -2.0, 7.0], [-6.0, -1.0, -7.0]], [[-6.0, -1.0, -5.0], [7.0, -6.0, 6.0]], [[0.0, 7.0, -5.0], [5.0, -4.0, 
+4.0]], [[-4.0, -6.0, -5.0], [-3.0, 6.0, -5.0]]], [[[5.0, 6.0, -4.0], [-3.0, 0.0, 0.0]], [[0.0, 3.0, -3.0], [-1.0, 3.0, 0.0]], 
+[[-4.0, -3.0, 5.0], [-7.0, -7.0, -1.0]], [[7.0, -1.0, 1.0], [2.0, -7.0, -3.0]], [[0.0, 5.0, -7.0], [-1.0, -1.0, 0.0]]], 
+[[[-1.0, 7.0, 6.0], [0.0, 1.0, -1.0]], [[-3.0, 7.0, 3.0], [0.0, 7.0, 0.0]], [[6.0, 2.0, 0.0], [0.0, 3.0, -1.0]], [[5.0, 7.0, 
+-3.0], [-2.0, -6.0, -2.0]], [[7.0, 0.0, -3.0], [-4.0, 4.0, -2.0]]]])
+      arg1=numpy.array([[[[-2.0, 0.0, -2.0], [-6.0, 7.0, 1.0]], [[-7.0, 6.0, 0.0], [7.0, 0.0, 0.0]], [[-2.0, -7.0, -5.0], 
+[-5.0, -7.0, -3.0]], [[0.0, 5.0, -7.0], [-6.0, -6.0, 6.0]], [[5.0, 0.0, -6.0], [4.0, 6.0, 6.0]]], [[[-1.0, 0.0, -5.0], [-6.0, 
+4.0, -2.0]], [[-1.0, 2.0, 1.0], [5.0, 7.0, -7.0]], [[6.0, -4.0, 4.0], [-7.0, 3.0, 2.0]], [[0.0, -6.0, 6.0], [0.0, -7.0, -5.0]], 
+[[-2.0, 4.0, -5.0], [-6.0, 5.0, 2.0]]], [[[5.0, -2.0, -4.0], [3.0, 6.0, 0.0]], [[-1.0, -5.0, 0.0], [-4.0, -3.0, 0.0]], [[-5.0, 
+-3.0, -7.0], [-1.0, -3.0, 4.0]], [[0.0, 1.0, 1.0], [-6.0, 1.0, 3.0]], [[-2.0, 7.0, -7.0], [6.0, 3.0, 6.0]]], [[[-5.0, -4.0, 
+0.0], [-3.0, -6.0, 1.0]], [[4.0, 0.0, 7.0], [-2.0, 7.0, -7.0]], [[-4.0, 1.0, 0.0], [-6.0, 7.0, 7.0]], [[4.0, 0.0, -4.0], [3.0, 
+-1.0, 2.0]], [[0.0, 6.0, 6.0], [-4.0, -1.0, 2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=numpy.array([[[[-87.0, 79.0, -48.0, 0.0, -62.0], [-95.0, -19.0, -56.0, 51.0, -72.0], [-75.0, -22.0, -30.0, -19.0, 
+11.0], [19.0, -32.0, -52.0, -10.0, 63.0]], [[35.0, -6.0, -15.0, -83.0, -69.0], [17.0, 55.0, 33.0, 39.0, 0.0], [-22.0, 8.0, 
+-53.0, 12.0, -79.0], [-1.0, 99.0, 22.0, -59.0, 28.0]], [[29.0, -81.0, 97.0, 76.0, 15.0], [62.0, -53.0, 36.0, -5.0, 41.0], 
+[19.0, 42.0, 51.0, 21.0, -26.0], [26.0, -32.0, 0.0, 22.0, -36.0]], [[-15.0, -61.0, -30.0, -1.0, 47.0], [-32.0, -43.0, 72.0, 
+5.0, -27.0], [27.0, 3.0, -30.0, 16.0, -19.0], [-22.0, 14.0, 5.0, 26.0, 16.0]], [[-17.0, -32.0, 4.0, 21.0, -14.0], [13.0, 12.0, 
+14.0, 9.0, 1.0], [8.0, -12.0, -47.0, -2.0, -25.0], [-33.0, 42.0, -57.0, 14.0, 18.0]]], [[[-16.0, -54.0, -5.0, -67.0, -12.0], 
+[-7.0, 35.0, 49.0, 48.0, -40.0], [28.0, 1.0, -68.0, -13.0, -74.0], [-33.0, 87.0, -54.0, 1.0, -5.0]], [[14.0, -33.0, 43.0, 
+-59.0, -129.0], [14.0, 18.0, 43.0, 96.0, -20.0], [-63.0, 40.0, -47.0, 19.0, -138.0], [40.0, 91.0, -10.0, -71.0, 41.0]], 
+[[-56.0, 85.0, 33.0, 60.0, 28.0], [-47.0, -50.0, -107.0, -12.0, -27.0], [-23.0, 1.0, 103.0, -36.0, 100.0], [55.0, -157.0, 
+-19.0, 35.0, -46.0]], [[-44.0, 77.0, -33.0, 88.0, 50.0], [-29.0, -22.0, -87.0, -64.0, 11.0], [-3.0, -43.0, 37.0, -20.0, 126.0], 
+[-15.0, -101.0, -23.0, 47.0, 4.0]], [[73.0, -29.0, 63.0, -43.0, 4.0], [81.0, 49.0, 9.0, -11.0, 47.0], [39.0, 28.0, 38.0, -2.0, 
+-29.0], [12.0, 32.0, 35.0, -21.0, -70.0]]], [[[16.0, -20.0, -17.0, 76.0, 37.0], [33.0, -12.0, 11.0, -60.0, 52.0], [20.0, -23.0, 
+-12.0, 20.0, 42.0], [-40.0, -2.0, 4.0, 27.0, 24.0]], [[33.0, 11.0, -22.0, 24.0, 32.0], [33.0, 19.0, -8.0, -57.0, 48.0], [21.0, 
+-20.0, 4.0, 9.0, 45.0], [-27.0, 2.0, 30.0, 6.0, 1.0]], [[-10.0, -39.0, 91.0, 28.0, -126.0], [-5.0, -74.0, 34.0, 102.0, -24.0], 
+[-97.0, 68.0, 18.0, 34.0, -117.0], [94.0, -9.0, -1.0, -52.0, 45.0]], [[-80.0, -41.0, 36.0, 0.0, -23.0], [-46.0, -26.0, 9.0, 
+76.0, -76.0], [-3.0, 11.0, -32.0, -28.0, -55.0], [2.0, 3.0, -111.0, 31.0, -7.0]], [[13.0, 23.0, 12.0, 86.0, 32.0], [37.0, -9.0, 
+-44.0, -65.0, 56.0], [9.0, -18.0, 38.0, 3.0, 75.0], [-11.0, -54.0, 4.0, 26.0, -7.0]]], [[[-4.0, 49.0, -81.0, -19.0, -41.0], 
+[-23.0, 35.0, -9.0, -8.0, 3.0], [-37.0, -37.0, -65.0, 11.0, 6.0], [-30.0, 52.0, 11.0, -31.0, 75.0]], [[49.0, 63.0, -107.0, 
+-28.0, 9.0], [16.0, 69.0, -13.0, -73.0, 54.0], [1.0, -53.0, -48.0, 17.0, 55.0], [-55.0, 58.0, 68.0, -31.0, 53.0]], [[8.0, 
+-30.0, -44.0, -14.0, 42.0], [8.0, 26.0, 35.0, -28.0, 9.0], [44.0, -25.0, -49.0, 2.0, 5.0], [-57.0, 52.0, -8.0, 19.0, 7.0]], 
+[[-36.0, -7.0, 14.0, 92.0, -13.0], [2.0, -32.0, -18.0, -8.0, 11.0], [-19.0, -14.0, -13.0, 4.0, 18.0], [-13.0, -25.0, -57.0, 
+28.0, 34.0]], [[42.0, -77.0, -1.0, 9.0, 49.0], [52.0, 12.0, 66.0, -36.0, 41.0], [59.0, -3.0, -30.0, 19.0, -17.0], [-49.0, 57.0, 
+10.0, 20.0, -10.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank0_offset0(self):
+      arg0=numpy.array([[-3.0, 3.0, -5.0, 0.0, -2.0], [0.0, 7.0, -6.0, 3.0, -5.0], [-4.0, 2.0, 5.0, 0.0, 3.0], [7.0, -3.0, 0.0, 
+7.0, 2.0]])
+      arg1=Data(-7.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[21.0, -21.0, 35.0, -0.0, 14.0], [-0.0, -49.0, 42.0, -21.0, 35.0], [28.0, -14.0, -35.0, -0.0, 
+-21.0], [-49.0, 21.0, -0.0, -49.0, -14.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank1_offset1(self):
+      arg0=numpy.array([[[-3.0, -3.0, 0.0], [-3.0, -3.0, -1.0], [-4.0, -3.0, 2.0], [5.0, -1.0, 0.0], [0.0, -5.0, -6.0]], 
+[[-7.0, 0.0, 1.0], [-1.0, 6.0, -7.0], [-6.0, -6.0, -7.0], [0.0, 7.0, -6.0], [-4.0, 4.0, 6.0]], [[-7.0, 1.0, 4.0], [5.0, -1.0, 
+5.0], [-2.0, 3.0, 0.0], [-1.0, 3.0, -2.0], [-5.0, -7.0, 5.0]], [[1.0, -5.0, -1.0], [0.0, 0.0, 0.0], [1.0, 0.0, -5.0], [-6.0, 
+7.0, 5.0], [0.0, 4.0, -5.0]]])
+      arg1=Data(numpy.array([3.0, 5.0, -7.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-24.0, -17.0, -41.0, 10.0, 17.0], [-28.0, 76.0, 1.0, 77.0, -34.0], [-44.0, -25.0, 9.0, 26.0, 
+-85.0], [-15.0, 0.0, 38.0, -18.0, 55.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank2_offset2(self):
+      arg0=numpy.array([[[[-6.0, -7.0, -5.0], [3.0, 0.0, 3.0]], [[5.0, 4.0, 6.0], [-3.0, 2.0, -5.0]], [[0.0, 7.0, -3.0], [-6.0, 
+-5.0, 4.0]], [[2.0, -1.0, 4.0], [-4.0, 3.0, -1.0]], [[-2.0, 2.0, 5.0], [2.0, -7.0, 5.0]]], [[[1.0, -7.0, -3.0], [-4.0, 4.0, 
+-7.0]], [[-7.0, -5.0, 2.0], [0.0, -7.0, -5.0]], [[0.0, 0.0, -7.0], [-3.0, 7.0, 5.0]], [[0.0, -2.0, 6.0], [7.0, 2.0, 1.0]], 
+[[4.0, 0.0, 1.0], [-5.0, -7.0, 0.0]]], [[[0.0, -3.0, -1.0], [5.0, 4.0, 6.0]], [[-4.0, 6.0, 0.0], [-5.0, 1.0, 0.0]], [[-6.0, 
+-1.0, 7.0], [5.0, -4.0, 0.0]], [[4.0, -1.0, -6.0], [5.0, -4.0, 6.0]], [[1.0, -3.0, -4.0], [0.0, 3.0, 4.0]]], [[[-6.0, 3.0, 
+-1.0], [-3.0, -3.0, 1.0]], [[0.0, -3.0, -5.0], [1.0, 0.0, -3.0]], [[-2.0, 0.0, -6.0], [-6.0, 2.0, 4.0]], [[4.0, 2.0, 5.0], 
+[-1.0, 7.0, -6.0]], [[-2.0, -4.0, -7.0], [5.0, 7.0, 6.0]]]])
+      arg1=Data(numpy.array([[-2.0, -7.0, 4.0], [-1.0, 1.0, 6.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[56.0, -39.0, -36.0, 20.0, 31.0], [1.0, 20.0, 12.0, 39.0, -6.0], [52.0, -28.0, 38.0, 2.0, 30.0], 
+[-7.0, -18.0, 12.0, -30.0, 42.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank1_offset0(self):
+      arg0=numpy.array([[-2.0, 4.0, 0.0, -3.0, -2.0], [0.0, -6.0, 7.0, -1.0, 3.0], [0.0, 5.0, -3.0, -2.0, 7.0], [3.0, -2.0, 
+1.0, 2.0, 2.0]])
+      arg1=Data(numpy.array([7.0, 6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-14.0, -12.0], [28.0, 24.0], [0.0, 0.0], [-21.0, -18.0], [-14.0, -12.0]], [[0.0, 0.0], [-42.0, 
+-36.0], [49.0, 42.0], [-7.0, -6.0], [21.0, 18.0]], [[0.0, 0.0], [35.0, 30.0], [-21.0, -18.0], [-14.0, -12.0], [49.0, 42.0]], 
+[[21.0, 18.0], [-14.0, -12.0], [7.0, 6.0], [14.0, 12.0], [14.0, 12.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank2_offset1(self):
+      arg0=numpy.array([[[2.0, 7.0, 6.0], [5.0, 2.0, -5.0], [1.0, -5.0, 4.0], [5.0, 6.0, 1.0], [-2.0, 5.0, 3.0]], [[-5.0, -6.0, 
+2.0], [5.0, 3.0, 7.0], [-1.0, 0.0, -4.0], [5.0, 3.0, -6.0], [-7.0, 0.0, 3.0]], [[6.0, -1.0, -3.0], [-4.0, 0.0, -4.0], [-4.0, 
+2.0, 1.0], [-2.0, -4.0, -2.0], [6.0, 6.0, 4.0]], [[5.0, 6.0, -6.0], [7.0, -5.0, 6.0], [2.0, 6.0, 6.0], [6.0, 6.0, -7.0], [2.0, 
+6.0, 6.0]]])
+      arg1=Data(numpy.array([[3.0, -6.0, -7.0], [0.0, -6.0, -2.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-78.0, -54.0], [38.0, -2.0], [5.0, 22.0], [-28.0, -38.0], [-57.0, -36.0]], [[7.0, 32.0], [-52.0, 
+-32.0], [25.0, 8.0], [39.0, -6.0], [-42.0, -6.0]], [[45.0, 12.0], [16.0, 8.0], [-31.0, -14.0], [32.0, 28.0], [-46.0, -44.0]], 
+[[21.0, -24.0], [9.0, 18.0], [-72.0, -48.0], [31.0, -22.0], [-72.0, -48.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank3_offset2(self):
+      arg0=numpy.array([[[[-1.0, -4.0, -2.0], [7.0, 6.0, -5.0]], [[1.0, -5.0, 4.0], [5.0, -7.0, -7.0]], [[4.0, 7.0, -4.0], 
+[-1.0, -3.0, -2.0]], [[0.0, -3.0, -2.0], [4.0, -3.0, 1.0]], [[-4.0, 1.0, -7.0], [-5.0, 6.0, -1.0]]], [[[2.0, 2.0, -5.0], [-2.0, 
+-5.0, -4.0]], [[3.0, 3.0, -1.0], [-2.0, 0.0, -7.0]], [[4.0, -1.0, 2.0], [0.0, 2.0, -2.0]], [[4.0, 1.0, 4.0], [2.0, -5.0, 5.0]], 
+[[-2.0, -3.0, -7.0], [3.0, 6.0, 0.0]]], [[[-5.0, -3.0, -3.0], [-3.0, -1.0, -1.0]], [[5.0, -2.0, 1.0], [-7.0, -5.0, -6.0]], 
+[[-4.0, 3.0, 6.0], [-2.0, 1.0, 6.0]], [[0.0, -4.0, 6.0], [6.0, 6.0, 0.0]], [[-7.0, 0.0, -2.0], [0.0, 7.0, 1.0]]], [[[-6.0, 0.0, 
+1.0], [7.0, -2.0, 2.0]], [[-1.0, -1.0, 0.0], [6.0, 1.0, -6.0]], [[1.0, 6.0, 3.0], [-5.0, -6.0, 3.0]], [[-7.0, 1.0, 5.0], [0.0, 
+3.0, 1.0]], [[4.0, -2.0, 5.0], [0.0, -2.0, 2.0]]]])
+      arg1=Data(numpy.array([[[4.0, 1.0, -2.0], [-7.0, 6.0, 5.0]], [[-4.0, -3.0, -3.0], [-1.0, 0.0, 0.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-42.0, 15.0], [-121.0, -6.0], [10.0, -24.0], [-40.0, 11.0], [65.0, 39.0]], [[-16.0, 3.0], [-4.0, 
+-16.0], [13.0, -19.0], [-10.0, -33.0], [18.0, 35.0]], [[-7.0, 41.0], [5.0, -10.0], [25.0, -9.0], [-22.0, -12.0], [23.0, 34.0]], 
+[[-77.0, 14.0], [-71.0, 1.0], [18.0, -26.0], [-14.0, 10.0], [2.0, -25.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_constData_rank2_offset0(self):
+      arg0=numpy.array([[-5.0, 2.0, -7.0, 3.0, -3.0], [0.0, -1.0, 7.0, -7.0, -6.0], [-4.0, 6.0, -2.0, 6.0, 5.0], [5.0, 0.0, 
+5.0, -6.0, 0.0]])
+      arg1=Data(numpy.array([[-4.0, -2.0, 0.0, 0.0, 0.0], [1.0, 7.0, 1.0, 2.0, 5.0], [4.0, -5.0, -1.0, 4.0, 6.0], [4.0, 1.0, 
+-6.0, 4.0, -1.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[20.0, 10.0, 0.0, 0.0, 0.0], [-5.0, -35.0, -5.0, -10.0, -25.0], [-20.0, 25.0, 5.0, -20.0, -30.0], 
+[-20.0, -5.0, 30.0, -20.0, 5.0]], [[-8.0, -4.0, 0.0, 0.0, 0.0], [2.0, 14.0, 2.0, 4.0, 10.0], [8.0, -10.0, -2.0, 8.0, 12.0], 
+[8.0, 2.0, -12.0, 8.0, -2.0]], [[28.0, 14.0, 0.0, 0.0, 0.0], [-7.0, -49.0, -7.0, -14.0, -35.0], [-28.0, 35.0, 7.0, -28.0, 
+-42.0], [-28.0, -7.0, 42.0, -28.0, 7.0]], [[-12.0, -6.0, 0.0, 0.0, 0.0], [3.0, 21.0, 3.0, 6.0, 15.0], [12.0, -15.0, -3.0, 12.0, 
+18.0], [12.0, 3.0, -18.0, 12.0, -3.0]], [[12.0, 6.0, 0.0, 0.0, 0.0], [-3.0, -21.0, -3.0, -6.0, -15.0], [-12.0, 15.0, 3.0, 
+-12.0, -18.0], [-12.0, -3.0, 18.0, -12.0, 3.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[4.0, 2.0, 0.0, 0.0, 0.0], [-1.0, -7.0, -1.0, -2.0, -5.0], [-4.0, 5.0, 1.0, -4.0, -6.0], 
+[-4.0, -1.0, 6.0, -4.0, 1.0]], [[-28.0, -14.0, 0.0, 0.0, 0.0], [7.0, 49.0, 7.0, 14.0, 35.0], [28.0, -35.0, -7.0, 28.0, 42.0], 
+[28.0, 7.0, -42.0, 28.0, -7.0]], [[28.0, 14.0, 0.0, 0.0, 0.0], [-7.0, -49.0, -7.0, -14.0, -35.0], [-28.0, 35.0, 7.0, -28.0, 
+-42.0], [-28.0, -7.0, 42.0, -28.0, 7.0]], [[24.0, 12.0, 0.0, 0.0, 0.0], [-6.0, -42.0, -6.0, -12.0, -30.0], [-24.0, 30.0, 6.0, 
+-24.0, -36.0], [-24.0, -6.0, 36.0, -24.0, 6.0]]], [[[16.0, 8.0, 0.0, 0.0, 0.0], [-4.0, -28.0, -4.0, -8.0, -20.0], [-16.0, 20.0, 
+4.0, -16.0, -24.0], [-16.0, -4.0, 24.0, -16.0, 4.0]], [[-24.0, -12.0, 0.0, 0.0, 0.0], [6.0, 42.0, 6.0, 12.0, 30.0], [24.0, 
+-30.0, -6.0, 24.0, 36.0], [24.0, 6.0, -36.0, 24.0, -6.0]], [[8.0, 4.0, 0.0, 0.0, 0.0], [-2.0, -14.0, -2.0, -4.0, -10.0], [-8.0, 
+10.0, 2.0, -8.0, -12.0], [-8.0, -2.0, 12.0, -8.0, 2.0]], [[-24.0, -12.0, 0.0, 0.0, 0.0], [6.0, 42.0, 6.0, 12.0, 30.0], [24.0, 
+-30.0, -6.0, 24.0, 36.0], [24.0, 6.0, -36.0, 24.0, -6.0]], [[-20.0, -10.0, 0.0, 0.0, 0.0], [5.0, 35.0, 5.0, 10.0, 25.0], [20.0, 
+-25.0, -5.0, 20.0, 30.0], [20.0, 5.0, -30.0, 20.0, -5.0]]], [[[-20.0, -10.0, 0.0, 0.0, 0.0], [5.0, 35.0, 5.0, 10.0, 25.0], 
+[20.0, -25.0, -5.0, 20.0, 30.0], [20.0, 5.0, -30.0, 20.0, -5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-20.0, -10.0, 0.0, 0.0, 0.0], [5.0, 35.0, 5.0, 10.0, 25.0], [20.0, -25.0, 
+-5.0, 20.0, 30.0], [20.0, 5.0, -30.0, 20.0, -5.0]], [[24.0, 12.0, 0.0, 0.0, 0.0], [-6.0, -42.0, -6.0, -12.0, -30.0], [-24.0, 
+30.0, 6.0, -24.0, -36.0], [-24.0, -6.0, 36.0, -24.0, 6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank3_offset1(self):
+      arg0=numpy.array([[[-7.0, 6.0, 6.0], [6.0, 7.0, 3.0], [3.0, 7.0, 6.0], [7.0, 3.0, -5.0], [-3.0, 0.0, 0.0]], [[5.0, 3.0, 
+-2.0], [1.0, 2.0, 6.0], [2.0, 4.0, -3.0], [0.0, -2.0, 3.0], [-4.0, 0.0, -5.0]], [[4.0, 0.0, 6.0], [0.0, -3.0, 0.0], [0.0, -2.0, 
+0.0], [4.0, -7.0, -6.0], [-1.0, -4.0, 4.0]], [[6.0, -4.0, 5.0], [2.0, -1.0, 2.0], [1.0, 2.0, -3.0], [-1.0, 1.0, 0.0], [5.0, 
+-2.0, -6.0]]])
+      arg1=Data(numpy.array([[[3.0, -5.0, 1.0], [0.0, 0.0, 0.0], [-2.0, 4.0, 6.0], [0.0, 2.0, 2.0], [4.0, -5.0, -5.0]], [[3.0, 
+-2.0, -6.0], [0.0, 3.0, 4.0], [-5.0, 0.0, -4.0], [-3.0, -3.0, -2.0], [-2.0, 1.0, -2.0]], [[-4.0, -3.0, 2.0], [0.0, -3.0, -2.0], 
+[7.0, -5.0, -3.0], [2.0, 6.0, 7.0], [-2.0, 2.0, 5.0]], [[1.0, 2.0, 1.0], [5.0, -5.0, -4.0], [-3.0, -7.0, 0.0], [4.0, 7.0, 3.0], 
+[1.0, 3.0, 0.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-45.0, 0.0, 74.0, 24.0, -88.0], [-69.0, 42.0, 11.0, -9.0, 8.0], [22.0, -30.0, -97.0, 64.0, 
+56.0], [11.0, -89.0, -21.0, 32.0, 11.0]], [[-14.0, 0.0, 34.0, 20.0, -26.0], [-14.0, 33.0, -42.0, -45.0, -11.0], [-39.0, -27.0, 
+-2.0, 75.0, 17.0], [23.0, -17.0, -67.0, 82.0, 27.0]], [[-20.0, 0.0, 58.0, 26.0, -53.0], [-41.0, 45.0, -39.0, -42.0, -11.0], 
+[-21.0, -33.0, -32.0, 90.0, 38.0], [23.0, -44.0, -58.0, 79.0, 24.0]], [[1.0, 0.0, -32.0, -4.0, 38.0], [45.0, -11.0, -15.0, 
+-20.0, -1.0], [-47.0, 1.0, 49.0, -3.0, -33.0], [8.0, 40.0, -42.0, 34.0, 16.0]], [[-9.0, 0.0, 6.0, 0.0, -12.0], [-9.0, 0.0, 
+15.0, 9.0, 6.0], [12.0, 0.0, -21.0, -6.0, 6.0], [-3.0, -15.0, 9.0, -12.0, -3.0]]], [[[-2.0, 0.0, -10.0, 2.0, 15.0], [21.0, 1.0, 
+-17.0, -20.0, -3.0], [-33.0, -5.0, 26.0, 14.0, -14.0], [9.0, 18.0, -36.0, 35.0, 14.0]], [[-1.0, 0.0, 42.0, 16.0, -36.0], 
+[-37.0, 30.0, -29.0, -21.0, -12.0], [2.0, -18.0, -21.0, 56.0, 32.0], [11.0, -29.0, -17.0, 36.0, 7.0]], [[-17.0, 0.0, -6.0, 2.0, 
+3.0], [16.0, 0.0, 2.0, -12.0, 6.0], [-26.0, -6.0, 3.0, 7.0, -11.0], [7.0, 2.0, -34.0, 27.0, 14.0]], [[13.0, 0.0, 10.0, 2.0, 
+-5.0], [-14.0, 6.0, -12.0, 0.0, -8.0], [12.0, 0.0, 1.0, 9.0, 11.0], [-1.0, -2.0, 14.0, -5.0, -6.0]], [[-17.0, 0.0, -22.0, 
+-10.0, 9.0], [18.0, -20.0, 40.0, 22.0, 18.0], [6.0, 10.0, -13.0, -43.0, -17.0], [-9.0, 0.0, 12.0, -31.0, -4.0]]], [[[18.0, 0.0, 
+28.0, 12.0, -14.0], [-24.0, 24.0, -44.0, -24.0, -20.0], [-4.0, -12.0, 10.0, 50.0, 22.0], [10.0, -4.0, -12.0, 34.0, 4.0]], 
+[[15.0, 0.0, -12.0, -6.0, 15.0], [6.0, -9.0, 0.0, 9.0, -3.0], [9.0, 9.0, 15.0, -18.0, -6.0], [-6.0, 15.0, 21.0, -21.0, -9.0]], 
+[[10.0, 0.0, -8.0, -4.0, 10.0], [4.0, -6.0, 0.0, 6.0, -2.0], [6.0, 6.0, 10.0, -12.0, -4.0], [-4.0, 10.0, 14.0, -14.0, -6.0]], 
+[[41.0, 0.0, -72.0, -26.0, 81.0], [62.0, -45.0, 4.0, 21.0, -3.0], [-7.0, 33.0, 81.0, -76.0, -52.0], [-16.0, 79.0, 37.0, -51.0, 
+-17.0]], [[21.0, 0.0, 10.0, 0.0, -4.0], [-19.0, 4.0, -11.0, 7.0, -10.0], [24.0, 4.0, 1.0, 2.0, 14.0], [-5.0, -1.0, 31.0, -20.0, 
+-13.0]]], [[[43.0, 0.0, 2.0, 2.0, 19.0], [-4.0, 8.0, -50.0, -16.0, -26.0], [-2.0, 2.0, 47.0, 23.0, 5.0], [3.0, 30.0, 10.0, 
+11.0, -6.0]], [[13.0, 0.0, 4.0, 2.0, 3.0], [-4.0, 5.0, -18.0, -7.0, -9.0], [-1.0, -1.0, 13.0, 12.0, 4.0], [2.0, 7.0, 1.0, 7.0, 
+-1.0]], [[-10.0, 0.0, -12.0, -2.0, 9.0], [17.0, -6.0, 7.0, -3.0, 6.0], [-16.0, 0.0, 6.0, -7.0, -13.0], [2.0, 7.0, -17.0, 9.0, 
+7.0]], [[-8.0, 0.0, 6.0, 2.0, -9.0], [-5.0, 3.0, 5.0, 0.0, 3.0], [1.0, -3.0, -12.0, 4.0, 4.0], [1.0, -10.0, -4.0, 3.0, 2.0]], 
+[[19.0, 0.0, -54.0, -16.0, 60.0], [55.0, -30.0, -1.0, 3.0, 0.0], [-26.0, 18.0, 63.0, -44.0, -44.0], [-5.0, 59.0, -1.0, -12.0, 
+-1.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank4_offset2(self):
+      arg0=numpy.array([[[[-3.0, -2.0, 3.0], [6.0, 5.0, 4.0]], [[1.0, -6.0, 3.0], [-1.0, 0.0, 7.0]], [[4.0, 0.0, -5.0], [-1.0, 
+7.0, 0.0]], [[-2.0, -1.0, 4.0], [-6.0, 0.0, 5.0]], [[-3.0, 2.0, 2.0], [3.0, -7.0, -2.0]]], [[[-6.0, -2.0, -3.0], [0.0, 4.0, 
+0.0]], [[7.0, 3.0, 5.0], [4.0, -5.0, -1.0]], [[1.0, 5.0, -1.0], [-7.0, 4.0, 2.0]], [[-1.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[0.0, 
+5.0, -5.0], [0.0, 3.0, -3.0]]], [[[7.0, -5.0, -7.0], [6.0, 2.0, -6.0]], [[-6.0, 6.0, -2.0], [-4.0, -7.0, 6.0]], [[5.0, 0.0, 
+0.0], [-5.0, 4.0, 0.0]], [[-2.0, 3.0, 0.0], [-7.0, -7.0, -2.0]], [[-6.0, -4.0, 1.0], [-3.0, -3.0, 6.0]]], [[[0.0, 1.0, -4.0], 
+[0.0, -2.0, 0.0]], [[6.0, 2.0, -6.0], [0.0, 5.0, 5.0]], [[7.0, -3.0, -6.0], [7.0, -2.0, 0.0]], [[1.0, -6.0, -6.0], [-1.0, 5.0, 
+-2.0]], [[-5.0, 4.0, 3.0], [7.0, -6.0, 3.0]]]])
+      arg1=Data(numpy.array([[[[4.0, 3.0, -1.0], [6.0, -2.0, -3.0]], [[3.0, 4.0, -3.0], [-5.0, 4.0, -7.0]], [[-4.0, -7.0, 3.0], 
+[-5.0, 0.0, -2.0]], [[6.0, -5.0, 0.0], [3.0, -5.0, -1.0]], [[6.0, 1.0, 1.0], [4.0, -3.0, 3.0]]], [[[-4.0, -3.0, -4.0], [7.0, 
+1.0, 4.0]], [[3.0, -3.0, -3.0], [0.0, 5.0, 1.0]], [[5.0, 4.0, -2.0], [-2.0, 2.0, 1.0]], [[4.0, -4.0, 6.0], [-6.0, 0.0, -7.0]], 
+[[-3.0, 6.0, 6.0], [7.0, -7.0, -5.0]]], [[[4.0, -4.0, -7.0], [-5.0, -4.0, 6.0]], [[0.0, -5.0, -4.0], [1.0, 0.0, 1.0]], [[2.0, 
+-4.0, -6.0], [0.0, -6.0, 0.0]], [[7.0, 1.0, -5.0], [-3.0, 0.0, -5.0]], [[5.0, 1.0, -2.0], [4.0, 3.0, -6.0]]], [[[-2.0, -1.0, 
+3.0], [3.0, 2.0, -2.0]], [[2.0, 6.0, 5.0], [0.0, -7.0, -6.0]], [[-7.0, -1.0, 5.0], [-5.0, 2.0, -6.0]], [[-3.0, 5.0, -7.0], 
+[-4.0, 0.0, 7.0]], [[-2.0, 6.0, 6.0], [0.0, -5.0, -7.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-7.0, -64.0, -3.0, -19.0, 4.0], [69.0, 17.0, -27.0, -50.0, 2.0], [-51.0, 8.0, -46.0, -76.0, 
+-8.0], [37.0, -62.0, -6.0, -18.0, -41.0]], [[-44.0, -74.0, 38.0, 26.0, 20.0], [23.0, 19.0, -16.0, 3.0, -63.0], [54.0, 24.0, 
+8.0, -46.0, -53.0], [-4.0, -61.0, -23.0, -1.0, -69.0]], [[1.0, 60.0, -26.0, -14.0, -6.0], [4.0, 62.0, 46.0, -8.0, -98.0], 
+[28.0, 19.0, -4.0, 56.0, 47.0], [-12.0, -66.0, -34.0, 27.0, -73.0]], [[-66.0, -27.0, 47.0, -30.0, -18.0], [-27.0, -10.0, -5.0, 
+21.0, -43.0], [28.0, -12.0, -24.0, -42.0, -73.0], [-11.0, -20.0, 35.0, 32.0, -13.0]], [[30.0, -36.0, -7.0, 18.0, 13.0], [4.0, 
+-58.0, -33.0, -12.0, 113.0], [-33.0, -17.0, 16.0, -28.0, -14.0], [9.0, 77.0, 12.0, -21.0, 79.0]]], [[[-35.0, -1.0, 29.0, -46.0, 
+-53.0], [46.0, 17.0, -24.0, -34.0, -40.0], [-11.0, 22.0, -10.0, -29.0, -14.0], [13.0, -67.0, 37.0, 29.0, -38.0]], [[69.0, 
+-15.0, -52.0, 65.0, 78.0], [-38.0, -29.0, 18.0, 29.0, 95.0], [-25.0, -32.0, 2.0, 20.0, 35.0], [2.0, 98.0, -51.0, -64.0, 66.0]], 
+[[-36.0, 63.0, -11.0, -62.0, -24.0], [-52.0, 13.0, 51.0, 6.0, -66.0], [22.0, -26.0, -36.0, 28.0, -16.0], [-27.0, -13.0, 14.0, 
+71.0, -12.0]], [[-4.0, -3.0, 4.0, -6.0, -6.0], [4.0, -3.0, -5.0, -4.0, 3.0], [-4.0, 0.0, -2.0, -7.0, -5.0], [2.0, -2.0, 7.0, 
+3.0, 2.0]], [[23.0, 68.0, -44.0, -37.0, -18.0], [-4.0, 12.0, 33.0, -29.0, -6.0], [-15.0, -8.0, -8.0, 45.0, 42.0], [-8.0, 2.0, 
+-6.0, 39.0, 6.0]]], [[[70.0, 42.0, -32.0, 81.0, 30.0], [35.0, 61.0, 15.0, 12.0, -35.0], [23.0, 53.0, 64.0, 91.0, 110.0], [4.0, 
+-29.0, -69.0, -63.0, -54.0]], [[-32.0, -38.0, -16.0, -49.0, -9.0], [3.0, -59.0, -2.0, -78.0, 33.0], [50.0, -20.0, 18.0, -44.0, 
+-93.0], [-38.0, 27.0, -4.0, 120.0, 29.0]], [[-18.0, 56.0, 5.0, -5.0, -2.0], [-51.0, 35.0, 43.0, 50.0, -78.0], [29.0, -5.0, 
+-14.0, 50.0, 17.0], [-17.0, -18.0, -2.0, 5.0, -30.0]], [[-21.0, 27.0, 26.0, -11.0, -22.0], [-65.0, -52.0, 0.0, 36.0, 34.0], 
+[31.0, -24.0, 26.0, 20.0, -44.0], [-30.0, 75.0, 44.0, 35.0, 71.0]], [[-67.0, -76.0, 58.0, -16.0, -24.0], [32.0, -18.0, -42.0, 
+-26.0, -30.0], [48.0, 19.0, 16.0, -72.0, -93.0], [-8.0, -46.0, 24.0, 45.0, -33.0]]], [[[11.0, 8.0, -19.0, 5.0, 3.0], [11.0, 
+-1.0, 8.0, -28.0, -4.0], [32.0, 11.0, 32.0, 21.0, 3.0], [-17.0, 0.0, -25.0, 33.0, -8.0]], [[11.0, 29.0, -66.0, -4.0, 32.0], 
+[19.0, 60.0, 65.0, -55.0, -102.0], [68.0, 19.0, 10.0, 49.0, 29.0], [-32.0, -71.0, -94.0, 69.0, -96.0]], [[71.0, -16.0, -60.0, 
+88.0, 67.0], [52.0, 38.0, 17.0, -38.0, -12.0], [55.0, 46.0, 74.0, 55.0, 66.0], [-12.0, -20.0, -115.0, -22.0, -58.0]], [[-18.0, 
+36.0, 29.0, 10.0, -31.0], [28.0, 62.0, 3.0, 12.0, -107.0], [43.0, 51.0, 32.0, 44.0, 34.0], [-3.0, -87.0, -4.0, -1.0, -85.0]], 
+[[34.0, -88.0, -40.0, -2.0, 32.0], [51.0, -63.0, -38.0, -81.0, 133.0], [-50.0, -22.0, -8.0, -82.0, -35.0], [18.0, 53.0, -19.0, 
+7.0, 61.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[-2.0, 3.0, -7.0, 3.0, -2.0], [-4.0, -1.0, -2.0, 7.0, 3.0], [3.0, -6.0, -5.0, 0.0, 4.0], [0.0, 0.0, 
+-5.0, -4.0, 5.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-2.0)+(1-msk_arg1)*(7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[4.0, -6.0, 14.0, -6.0, 4.0], [8.0, 2.0, 4.0, -14.0, -6.0], [-6.0, 12.0, 10.0, -0.0, -8.0], 
+[-0.0, -0.0, 10.0, 8.0, -10.0]])+(1.-msk_ref)*numpy.array([[-14.0, 21.0, -49.0, 21.0, -14.0], [-28.0, -7.0, -14.0, 49.0, 21.0], 
+[21.0, -42.0, -35.0, 0.0, 28.0], [0.0, 0.0, -35.0, -28.0, 35.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[[-5.0, 5.0, 0.0], [4.0, -6.0, 7.0], [3.0, -7.0, 0.0], [-2.0, -5.0, 0.0], [3.0, 2.0, 6.0]], [[6.0, 
+-6.0, 0.0], [2.0, -2.0, -5.0], [2.0, 4.0, 2.0], [-3.0, -4.0, 4.0], [2.0, -5.0, 4.0]], [[6.0, 5.0, 6.0], [4.0, 4.0, -6.0], [7.0, 
+3.0, 1.0], [4.0, -7.0, 7.0], [1.0, 0.0, 1.0]], [[0.0, 0.0, 4.0], [6.0, 3.0, -5.0], [6.0, 7.0, 3.0], [4.0, -4.0, 6.0], [5.0, 
+-2.0, 4.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([2.0, 7.0, -5.0])+(1.-msk_arg1)*numpy.array([-6.0, 7.0, -2.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[25.0, -69.0, -43.0, -39.0, -10.0], [-30.0, 15.0, 22.0, -54.0, -51.0], [17.0, 66.0, 30.0, -76.0, 
+-3.0], [-20.0, 58.0, 46.0, -50.0, -24.0]])+(1.-msk_ref)*numpy.array([[65.0, -80.0, -67.0, -23.0, -16.0], [-78.0, -16.0, 12.0, 
+-18.0, -55.0], [-13.0, 16.0, -23.0, -87.0, -8.0], [-8.0, -5.0, 7.0, -64.0, -52.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank2_offset2(self):
+      arg0=numpy.array([[[[-6.0, -5.0, -2.0], [2.0, -2.0, 4.0]], [[6.0, -1.0, -5.0], [0.0, -3.0, 0.0]], [[7.0, 2.0, 4.0], [5.0, 
+-3.0, -2.0]], [[6.0, -4.0, 5.0], [-2.0, 0.0, 3.0]], [[-5.0, 3.0, 2.0], [2.0, 6.0, -4.0]]], [[[1.0, 7.0, -4.0], [5.0, -4.0, 
+-3.0]], [[1.0, 1.0, 4.0], [-6.0, -4.0, 0.0]], [[0.0, -5.0, -3.0], [-7.0, -3.0, 0.0]], [[-6.0, 5.0, -5.0], [0.0, -4.0, -7.0]], 
+[[0.0, -7.0, 5.0], [-1.0, 6.0, 2.0]]], [[[-3.0, 0.0, 0.0], [2.0, -5.0, 0.0]], [[-4.0, -6.0, -6.0], [-2.0, 0.0, 4.0]], [[-7.0, 
+-2.0, 1.0], [5.0, 6.0, 0.0]], [[0.0, -4.0, -5.0], [0.0, -3.0, -7.0]], [[1.0, 1.0, 7.0], [6.0, 5.0, 4.0]]], [[[0.0, -5.0, 3.0], 
+[1.0, -2.0, 4.0]], [[-7.0, 2.0, -3.0], [-3.0, 0.0, 2.0]], [[2.0, -7.0, 0.0], [-7.0, 2.0, 0.0]], [[-7.0, -4.0, 4.0], [7.0, 2.0, 
+5.0]], [[4.0, -1.0, -1.0], [-4.0, 6.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, 4.0, 0.0], [3.0, 1.0, 6.0]])+(1.-msk_arg1)*numpy.array([[0.0, 1.0, 0.0], [1.0, 5.0, 
+-3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[44.0, -43.0, -34.0, -40.0, 30.0], [15.0, -24.0, -44.0, 10.0, -13.0], [19.0, 18.0, 55.0, -61.0, 
+45.0], [5.0, 53.0, -59.0, 79.0, -40.0]])+(1.-msk_ref)*numpy.array([[-25.0, -16.0, -2.0, -15.0, 47.0], [1.0, -25.0, -27.0, 6.0, 
+16.0], [-23.0, -20.0, 33.0, 2.0, 20.0], [-26.0, -7.0, -4.0, -2.0, 28.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank1_offset0(self):
+      arg0=numpy.array([[4.0, 1.0, 2.0, 3.0, 6.0], [-6.0, 6.0, 3.0, 3.0, 5.0], [-2.0, 3.0, 1.0, -3.0, 6.0], [7.0, 3.0, 5.0, 
+4.0, -4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, 4.0])+(1.-msk_arg1)*numpy.array([-5.0, 4.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, 16.0], [0.0, 4.0], [0.0, 8.0], [0.0, 12.0], [0.0, 24.0]], [[0.0, -24.0], [0.0, 24.0], 
+[0.0, 12.0], [0.0, 12.0], [0.0, 20.0]], [[0.0, -8.0], [0.0, 12.0], [0.0, 4.0], [0.0, -12.0], [0.0, 24.0]], [[0.0, 28.0], [0.0, 
+12.0], [0.0, 20.0], [0.0, 16.0], [0.0, -16.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 16.0], [-5.0, 4.0], [-10.0, 8.0], [-15.0, 
+12.0], [-30.0, 24.0]], [[30.0, -24.0], [-30.0, 24.0], [-15.0, 12.0], [-15.0, 12.0], [-25.0, 20.0]], [[10.0, -8.0], [-15.0, 
+12.0], [-5.0, 4.0], [15.0, -12.0], [-30.0, 24.0]], [[-35.0, 28.0], [-15.0, 12.0], [-25.0, 20.0], [-20.0, 16.0], [20.0, -16.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[[7.0, -2.0, -5.0], [-4.0, -6.0, -4.0], [3.0, 7.0, 5.0], [7.0, 3.0, -4.0], [1.0, 0.0, -5.0]], [[-6.0, 
+-4.0, 1.0], [-4.0, 6.0, -3.0], [0.0, -3.0, -4.0], [-7.0, 6.0, -7.0], [-2.0, -7.0, 2.0]], [[1.0, 2.0, 1.0], [3.0, 6.0, -4.0], 
+[-7.0, 0.0, 3.0], [-7.0, 1.0, 7.0], [-2.0, -1.0, 6.0]], [[4.0, -3.0, 0.0], [-6.0, -7.0, 4.0], [-5.0, -7.0, 6.0], [2.0, -3.0, 
+-5.0], [-4.0, -3.0, -2.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[3.0, 2.0, -2.0], [-4.0, -7.0, -5.0]])+(1.-msk_arg1)*numpy.array([[1.0, 7.0, 0.0], [0.0, -7.0, 
+4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[27.0, 11.0], [-16.0, 78.0], [13.0, -86.0], [35.0, -29.0], [13.0, 21.0]], [[-28.0, 47.0], [6.0, 
+-11.0], [2.0, 41.0], [5.0, 21.0], [-24.0, 47.0]], [[5.0, -23.0], [29.0, -34.0], [-27.0, 13.0], [-33.0, -14.0], [-20.0, -15.0]], 
+[[6.0, 5.0], [-40.0, 53.0], [-41.0, 39.0], [10.0, 38.0], [-14.0, 47.0]]])+(1.-msk_ref)*numpy.array([[[-7.0, -6.0], [-46.0, 
+26.0], [52.0, -29.0], [28.0, -37.0], [1.0, -20.0]], [[-34.0, 32.0], [38.0, -54.0], [-21.0, 5.0], [35.0, -70.0], [-51.0, 57.0]], 
+[[15.0, -10.0], [45.0, -58.0], [-7.0, 12.0], [0.0, 21.0], [-9.0, 31.0]], [[-17.0, 21.0], [-55.0, 65.0], [-54.0, 73.0], [-19.0, 
+1.0], [-25.0, 13.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank3_offset2(self):
+      arg0=numpy.array([[[[7.0, -1.0, -1.0], [7.0, -3.0, -7.0]], [[4.0, 3.0, 0.0], [3.0, -2.0, -7.0]], [[6.0, 0.0, -4.0], 
+[-1.0, 2.0, 7.0]], [[-7.0, 3.0, 0.0], [7.0, 0.0, 0.0]], [[1.0, -7.0, 2.0], [-5.0, 5.0, -1.0]]], [[[-2.0, 0.0, 5.0], [-3.0, 4.0, 
+-5.0]], [[-7.0, 7.0, 3.0], [6.0, 3.0, -5.0]], [[1.0, -6.0, 4.0], [-3.0, 0.0, -6.0]], [[6.0, -5.0, 6.0], [-2.0, 4.0, 7.0]], 
+[[7.0, 2.0, -4.0], [6.0, -5.0, 1.0]]], [[[-5.0, -2.0, 1.0], [-3.0, 5.0, 7.0]], [[0.0, -7.0, 4.0], [3.0, -2.0, -3.0]], [[7.0, 
+6.0, 1.0], [6.0, -4.0, 1.0]], [[-3.0, -6.0, 5.0], [0.0, -3.0, 2.0]], [[-1.0, -3.0, -7.0], [1.0, 7.0, -3.0]]], [[[2.0, 5.0, 
+0.0], [-2.0, -7.0, 4.0]], [[-7.0, 7.0, 0.0], [-1.0, -3.0, -2.0]], [[-3.0, -5.0, -3.0], [7.0, 4.0, 0.0]], [[-5.0, 3.0, -1.0], 
+[0.0, 2.0, -2.0]], [[2.0, 2.0, 0.0], [-2.0, 0.0, -3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[7.0, -7.0, -1.0], [-5.0, 2.0, 2.0]], [[-4.0, 3.0, -7.0], [-3.0, 1.0, 
+-2.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 7.0, 2.0], [0.0, 7.0, -7.0]], [[-4.0, -5.0, 5.0], [-3.0, 0.0, 7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[2.0, -34.0], [-26.0, -4.0], [69.0, -5.0], [-105.0, 16.0], [87.0, -17.0]], [[-6.0, -4.0], 
+[-135.0, 23.0], [48.0, -29.0], [103.0, -85.0], [1.0, -19.0]], [[17.0, 7.0], [20.0, -54.0], [-30.0, -41.0], [14.0, -48.0], 
+[24.0, 54.0]], [[-17.0, -2.0], [-103.0, 53.0], [-10.0, 1.0], [-55.0, 42.0], [4.0, 10.0]]])+(1.-msk_ref)*numpy.array([[[5.0, 
+-98.0], [48.0, -89.0], [-55.0, 8.0], [35.0, -8.0], [-5.0, 49.0]], [[77.0, 7.0], [125.0, -45.0], [6.0, 13.0], [-56.0, 86.0], 
+[-50.0, -69.0]], [[-16.0, 93.0], [-34.0, 25.0], [-5.0, -64.0], [-61.0, 81.0], [37.0, -40.0]], [[-46.0, 1.0], [56.0, -18.0], 
+[-7.0, 1.0], [57.0, -14.0], [31.0, -33.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank2_offset0(self):
+      arg0=numpy.array([[-5.0, 0.0, -4.0, 1.0, -2.0], [-1.0, 2.0, 5.0, -3.0, -3.0], [-1.0, 7.0, 6.0, 2.0, -2.0], [-3.0, 3.0, 
+-3.0, -4.0, -4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[5.0, 0.0, 3.0, 6.0, -7.0], [-4.0, 0.0, 0.0, 4.0, 0.0], [6.0, 3.0, 4.0, 0.0, -7.0], [-3.0, 
+-1.0, 6.0, -3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-6.0, -7.0, 7.0, -1.0, -4.0], [0.0, 1.0, -1.0, 0.0, -1.0], [-4.0, 0.0, 
+0.0, -1.0, 0.0], [-1.0, -3.0, 5.0, -7.0, 1.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-25.0, 0.0, -15.0, -30.0, 35.0], [20.0, 0.0, 0.0, -20.0, 0.0], [-30.0, -15.0, -20.0, 0.0, 
+35.0], [15.0, 5.0, -30.0, 15.0, 20.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[-20.0, 0.0, -12.0, -24.0, 28.0], [16.0, 0.0, 0.0, -16.0, 0.0], [-24.0, -12.0, -16.0, 0.0, 28.0], [12.0, 
+4.0, -24.0, 12.0, 16.0]], [[5.0, 0.0, 3.0, 6.0, -7.0], [-4.0, 0.0, 0.0, 4.0, 0.0], [6.0, 3.0, 4.0, 0.0, -7.0], [-3.0, -1.0, 
+6.0, -3.0, -4.0]], [[-10.0, 0.0, -6.0, -12.0, 14.0], [8.0, 0.0, 0.0, -8.0, 0.0], [-12.0, -6.0, -8.0, 0.0, 14.0], [6.0, 2.0, 
+-12.0, 6.0, 8.0]]], [[[-5.0, 0.0, -3.0, -6.0, 7.0], [4.0, 0.0, 0.0, -4.0, 0.0], [-6.0, -3.0, -4.0, 0.0, 7.0], [3.0, 1.0, -6.0, 
+3.0, 4.0]], [[10.0, 0.0, 6.0, 12.0, -14.0], [-8.0, 0.0, 0.0, 8.0, 0.0], [12.0, 6.0, 8.0, 0.0, -14.0], [-6.0, -2.0, 12.0, -6.0, 
+-8.0]], [[25.0, 0.0, 15.0, 30.0, -35.0], [-20.0, 0.0, 0.0, 20.0, 0.0], [30.0, 15.0, 20.0, 0.0, -35.0], [-15.0, -5.0, 30.0, 
+-15.0, -20.0]], [[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], [9.0, 3.0, 
+-18.0, 9.0, 12.0]], [[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], [9.0, 3.0, 
+-18.0, 9.0, 12.0]]], [[[-5.0, 0.0, -3.0, -6.0, 7.0], [4.0, 0.0, 0.0, -4.0, 0.0], [-6.0, -3.0, -4.0, 0.0, 7.0], [3.0, 1.0, -6.0, 
+3.0, 4.0]], [[35.0, 0.0, 21.0, 42.0, -49.0], [-28.0, 0.0, 0.0, 28.0, 0.0], [42.0, 21.0, 28.0, 0.0, -49.0], [-21.0, -7.0, 42.0, 
+-21.0, -28.0]], [[30.0, 0.0, 18.0, 36.0, -42.0], [-24.0, 0.0, 0.0, 24.0, 0.0], [36.0, 18.0, 24.0, 0.0, -42.0], [-18.0, -6.0, 
+36.0, -18.0, -24.0]], [[10.0, 0.0, 6.0, 12.0, -14.0], [-8.0, 0.0, 0.0, 8.0, 0.0], [12.0, 6.0, 8.0, 0.0, -14.0], [-6.0, -2.0, 
+12.0, -6.0, -8.0]], [[-10.0, 0.0, -6.0, -12.0, 14.0], [8.0, 0.0, 0.0, -8.0, 0.0], [-12.0, -6.0, -8.0, 0.0, 14.0], [6.0, 2.0, 
+-12.0, 6.0, 8.0]]], [[[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], [9.0, 
+3.0, -18.0, 9.0, 12.0]], [[15.0, 0.0, 9.0, 18.0, -21.0], [-12.0, 0.0, 0.0, 12.0, 0.0], [18.0, 9.0, 12.0, 0.0, -21.0], [-9.0, 
+-3.0, 18.0, -9.0, -12.0]], [[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], 
+[9.0, 3.0, -18.0, 9.0, 12.0]], [[-20.0, 0.0, -12.0, -24.0, 28.0], [16.0, 0.0, 0.0, -16.0, 0.0], [-24.0, -12.0, -16.0, 0.0, 
+28.0], [12.0, 4.0, -24.0, 12.0, 16.0]], [[-20.0, 0.0, -12.0, -24.0, 28.0], [16.0, 0.0, 0.0, -16.0, 0.0], [-24.0, -12.0, -16.0, 
+0.0, 28.0], [12.0, 4.0, -24.0, 12.0, 16.0]]]])+(1.-msk_ref)*numpy.array([[[[30.0, 35.0, -35.0, 5.0, 20.0], [0.0, -5.0, 5.0, 
+0.0, 5.0], [20.0, 0.0, 0.0, 5.0, 0.0], [5.0, 15.0, -25.0, 35.0, -5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[24.0, 28.0, -28.0, 4.0, 16.0], [0.0, -4.0, 4.0, 0.0, 4.0], [16.0, 0.0, 
+0.0, 4.0, 0.0], [4.0, 12.0, -20.0, 28.0, -4.0]], [[-6.0, -7.0, 7.0, -1.0, -4.0], [0.0, 1.0, -1.0, 0.0, -1.0], [-4.0, 0.0, 0.0, 
+-1.0, 0.0], [-1.0, -3.0, 5.0, -7.0, 1.0]], [[12.0, 14.0, -14.0, 2.0, 8.0], [0.0, -2.0, 2.0, 0.0, 2.0], [8.0, 0.0, 0.0, 2.0, 
+0.0], [2.0, 6.0, -10.0, 14.0, -2.0]]], [[[6.0, 7.0, -7.0, 1.0, 4.0], [0.0, -1.0, 1.0, 0.0, 1.0], [4.0, 0.0, 0.0, 1.0, 0.0], 
+[1.0, 3.0, -5.0, 7.0, -1.0]], [[-12.0, -14.0, 14.0, -2.0, -8.0], [0.0, 2.0, -2.0, 0.0, -2.0], [-8.0, 0.0, 0.0, -2.0, 0.0], 
+[-2.0, -6.0, 10.0, -14.0, 2.0]], [[-30.0, -35.0, 35.0, -5.0, -20.0], [0.0, 5.0, -5.0, 0.0, -5.0], [-20.0, 0.0, 0.0, -5.0, 0.0], 
+[-5.0, -15.0, 25.0, -35.0, 5.0]], [[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], 
+[3.0, 9.0, -15.0, 21.0, -3.0]], [[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], [3.0, 
+9.0, -15.0, 21.0, -3.0]]], [[[6.0, 7.0, -7.0, 1.0, 4.0], [0.0, -1.0, 1.0, 0.0, 1.0], [4.0, 0.0, 0.0, 1.0, 0.0], [1.0, 3.0, 
+-5.0, 7.0, -1.0]], [[-42.0, -49.0, 49.0, -7.0, -28.0], [0.0, 7.0, -7.0, 0.0, -7.0], [-28.0, 0.0, 0.0, -7.0, 0.0], [-7.0, -21.0, 
+35.0, -49.0, 7.0]], [[-36.0, -42.0, 42.0, -6.0, -24.0], [0.0, 6.0, -6.0, 0.0, -6.0], [-24.0, 0.0, 0.0, -6.0, 0.0], [-6.0, 
+-18.0, 30.0, -42.0, 6.0]], [[-12.0, -14.0, 14.0, -2.0, -8.0], [0.0, 2.0, -2.0, 0.0, -2.0], [-8.0, 0.0, 0.0, -2.0, 0.0], [-2.0, 
+-6.0, 10.0, -14.0, 2.0]], [[12.0, 14.0, -14.0, 2.0, 8.0], [0.0, -2.0, 2.0, 0.0, 2.0], [8.0, 0.0, 0.0, 2.0, 0.0], [2.0, 6.0, 
+-10.0, 14.0, -2.0]]], [[[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], [3.0, 9.0, 
+-15.0, 21.0, -3.0]], [[-18.0, -21.0, 21.0, -3.0, -12.0], [0.0, 3.0, -3.0, 0.0, -3.0], [-12.0, 0.0, 0.0, -3.0, 0.0], [-3.0, 
+-9.0, 15.0, -21.0, 3.0]], [[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], [3.0, 9.0, 
+-15.0, 21.0, -3.0]], [[24.0, 28.0, -28.0, 4.0, 16.0], [0.0, -4.0, 4.0, 0.0, 4.0], [16.0, 0.0, 0.0, 4.0, 0.0], [4.0, 12.0, 
+-20.0, 28.0, -4.0]], [[24.0, 28.0, -28.0, 4.0, 16.0], [0.0, -4.0, 4.0, 0.0, 4.0], [16.0, 0.0, 0.0, 4.0, 0.0], [4.0, 12.0, 
+-20.0, 28.0, -4.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank3_offset1(self):
+      arg0=numpy.array([[[-3.0, -2.0, -1.0], [-5.0, 0.0, -2.0], [2.0, 3.0, 4.0], [-2.0, 2.0, 1.0], [4.0, 5.0, -1.0]], [[-3.0, 
+5.0, 6.0], [7.0, -3.0, -4.0], [-7.0, 4.0, 1.0], [3.0, -4.0, -1.0], [-7.0, 3.0, -3.0]], [[6.0, 4.0, -2.0], [-6.0, 5.0, 7.0], 
+[2.0, 6.0, 4.0], [3.0, 1.0, 0.0], [5.0, 5.0, -6.0]], [[1.0, 5.0, -5.0], [-1.0, -2.0, 4.0], [-6.0, 4.0, 6.0], [4.0, 7.0, 5.0], 
+[7.0, -4.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[4.0, -1.0, -7.0], [2.0, 1.0, -3.0], [6.0, -2.0, 2.0], [1.0, 3.0, -1.0], [1.0, 4.0, 0.0]], 
+[[-1.0, -6.0, 3.0], [5.0, -6.0, 1.0], [-2.0, 2.0, 5.0], [3.0, -6.0, 0.0], [-6.0, 7.0, 0.0]], [[5.0, -1.0, 6.0], [0.0, -2.0, 
+-3.0], [3.0, -1.0, 1.0], [4.0, 4.0, -2.0], [-2.0, 2.0, -4.0]], [[-2.0, 7.0, -6.0], [6.0, -2.0, -4.0], [-5.0, -2.0, -1.0], 
+[-4.0, -5.0, 4.0], [-1.0, -5.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 5.0, 1.0], [5.0, 6.0, 4.0], [-1.0, 5.0, 4.0], 
+[-5.0, 1.0, 0.0], [-2.0, 0.0, -7.0]], [[-2.0, 3.0, -7.0], [2.0, 7.0, 2.0], [7.0, 2.0, -1.0], [-5.0, 0.0, 1.0], [3.0, 2.0, 
+3.0]], [[0.0, -1.0, 5.0], [6.0, 7.0, 3.0], [2.0, 1.0, -1.0], [3.0, -7.0, -5.0], [-3.0, 6.0, 3.0]], [[-7.0, 7.0, 0.0], [-1.0, 
+0.0, -3.0], [3.0, 0.0, -3.0], [7.0, -1.0, -4.0], [-1.0, -2.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-3.0, -5.0, -16.0, -8.0, -11.0], [12.0, -4.0, -3.0, 3.0, 4.0], [-19.0, 7.0, -8.0, -18.0, 
+6.0], [-2.0, -10.0, 20.0, 18.0, 20.0]], [[-6.0, -4.0, -34.0, -3.0, -5.0], [-1.0, -27.0, 0.0, -15.0, 30.0], [-37.0, 6.0, -17.0, 
+-16.0, 18.0], [22.0, -22.0, 27.0, 12.0, 19.0]], [[-23.0, -5.0, 14.0, 7.0, 14.0], [-8.0, -4.0, 22.0, -12.0, 9.0], [31.0, -18.0, 
+7.0, 12.0, -14.0], [-7.0, -10.0, -20.0, -7.0, -45.0]], [[-17.0, -5.0, -14.0, 3.0, 6.0], [-7.0, -21.0, 13.0, -18.0, 26.0], 
+[-6.0, -7.0, -7.0, -2.0, 4.0], [12.0, -20.0, 5.0, 2.0, -15.0]], [[18.0, 16.0, 12.0, 20.0, 24.0], [-37.0, -11.0, -3.0, -18.0, 
+11.0], [9.0, -7.0, 6.0, 38.0, 6.0], [33.0, 18.0, -29.0, -45.0, -22.0]]], [[[-59.0, -19.0, -16.0, 6.0, 17.0], [-9.0, -39.0, 
+46.0, -39.0, 53.0], [16.0, -28.0, -8.0, -4.0, -8.0], [5.0, -52.0, -1.0, 11.0, -64.0]], [[59.0, 23.0, 40.0, 2.0, -5.0], [-1.0, 
+49.0, -40.0, 39.0, -63.0], [14.0, 18.0, 20.0, 24.0, -4.0], [-11.0, 64.0, -25.0, -29.0, 36.0]], [[-39.0, -13.0, -48.0, 4.0, 
+9.0], [-14.0, -58.0, 27.0, -45.0, 70.0], [-33.0, -11.0, -24.0, -14.0, 18.0], [36.0, -54.0, 26.0, 12.0, -20.0]], [[23.0, 5.0, 
+24.0, -8.0, -13.0], [18.0, 38.0, -19.0, 33.0, -46.0], [13.0, 11.0, 12.0, -2.0, -10.0], [-28.0, 30.0, -6.0, 4.0, 24.0]], 
+[[-10.0, -2.0, -54.0, 5.0, 5.0], [-20.0, -56.0, 5.0, -39.0, 63.0], [-56.0, 3.0, -27.0, -10.0, 32.0], [53.0, -36.0, 32.0, 1.0, 
+13.0]]], [[[34.0, 22.0, 24.0, 20.0, 22.0], [-36.0, 4.0, -14.0, -6.0, -8.0], [14.0, -2.0, 12.0, 44.0, 4.0], [28.0, 36.0, -36.0, 
+-52.0, -12.0]], [[-78.0, -28.0, -32.0, 2.0, 14.0], [-3.0, -53.0, 57.0, -48.0, 71.0], [7.0, -31.0, -16.0, -18.0, -6.0], [5.0, 
+-74.0, 13.0, 27.0, -68.0]], [[-26.0, -2.0, 8.0, 16.0, 26.0], [-26.0, -22.0, 28.0, -30.0, 30.0], [28.0, -24.0, 4.0, 24.0, -8.0], 
+[14.0, -16.0, -26.0, -22.0, -60.0]], [[11.0, 7.0, 16.0, 6.0, 7.0], [-9.0, 9.0, -4.0, 3.0, -11.0], [14.0, -2.0, 8.0, 16.0, 
+-4.0], [1.0, 16.0, -17.0, -17.0, -8.0]], [[57.0, 33.0, 8.0, 26.0, 25.0], [-53.0, -11.0, -30.0, -15.0, 5.0], [-16.0, 8.0, 4.0, 
+52.0, 24.0], [61.0, 44.0, -29.0, -69.0, 12.0]]], [[[34.0, 22.0, -14.0, 21.0, 21.0], [-46.0, -30.0, -17.0, -27.0, 29.0], [-30.0, 
+5.0, -7.0, 34.0, 28.0], [63.0, 16.0, -10.0, -49.0, 9.0]], [[-30.0, -16.0, 6.0, -11.0, -9.0], [25.0, 11.0, 18.0, 9.0, -8.0], 
+[21.0, -8.0, 3.0, -20.0, -18.0], [-36.0, -18.0, 5.0, 30.0, -17.0]], [[-70.0, -26.0, -32.0, 0.0, 10.0], [0.0, -48.0, 50.0, 
+-42.0, 64.0], [2.0, -26.0, -16.0, -20.0, -4.0], [4.0, -68.0, 16.0, 28.0, -56.0]], [[-26.0, 0.0, 20.0, 20.0, 32.0], [-31.0, 
+-17.0, 31.0, -30.0, 25.0], [43.0, -29.0, 10.0, 34.0, -14.0], [11.0, -10.0, -39.0, -31.0, -74.0]], [[74.0, 28.0, 38.0, 1.0, 
+-9.0], [-1.0, 53.0, -52.0, 45.0, -70.0], [3.0, 26.0, 19.0, 24.0, 2.0], [-6.0, 74.0, -21.0, -32.0, 
+55.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -31.0, -11.0, 13.0, 13.0], [7.0, -22.0, -24.0, 14.0, -16.0], [-3.0, -35.0, -7.0, 
+10.0, -6.0], [7.0, 6.0, -6.0, -15.0, 13.0]], [[28.0, -33.0, -3.0, 25.0, 24.0], [24.0, -14.0, -33.0, 23.0, -21.0], [-10.0, 
+-36.0, -8.0, -5.0, 9.0], [35.0, 11.0, -9.0, -27.0, 17.0]], [[7.0, 44.0, 29.0, -7.0, -32.0], [-23.0, 33.0, 16.0, -6.0, 24.0], 
+[17.0, 45.0, 3.0, -35.0, 24.0], [7.0, -14.0, -6.0, -5.0, -32.0]], [[23.0, 6.0, 16.0, 12.0, -3.0], [3.0, 12.0, -11.0, 11.0, 
+1.0], [3.0, 5.0, -3.0, -25.0, 21.0], [28.0, -1.0, -9.0, -20.0, -8.0]], [[0.0, 46.0, 17.0, -15.0, -1.0], [14.0, 41.0, 39.0, 
+-21.0, 19.0], [-10.0, 56.0, 14.0, -18.0, 15.0], [7.0, -1.0, 15.0, 27.0, -8.0]]], [[[49.0, 39.0, 52.0, 20.0, -36.0], [-21.0, 
+41.0, -17.0, 21.0, 19.0], [25.0, 35.0, -7.0, -74.0, 57.0], [56.0, -15.0, -27.0, -50.0, -43.0]], [[-61.0, 1.0, -38.0, -38.0, 
+14.0], [5.0, -15.0, 47.0, -39.0, 3.0], [-17.0, 9.0, 15.0, 62.0, -51.0], [-70.0, 5.0, 33.0, 68.0, 23.0]], [[63.0, -7.0, 31.0, 
+39.0, 7.0], [19.0, 16.0, -42.0, 36.0, -10.0], [1.0, -11.0, -11.0, -54.0, 48.0], [77.0, 4.0, -24.0, -57.0, -7.0]], [[-39.0, 
+-13.0, -27.0, -19.0, 1.0], [-11.0, -24.0, 14.0, -16.0, -2.0], [-1.0, -13.0, 3.0, 42.0, -36.0], [-49.0, 0.0, 12.0, 29.0, 11.0]], 
+[[54.0, -29.0, 10.0, 38.0, 35.0], [44.0, 1.0, -40.0, 32.0, -24.0], [-18.0, -30.0, -8.0, -27.0, 30.0], [70.0, 16.0, -12.0, 
+-40.0, 19.0]]], [[[-18.0, 46.0, 6.0, -26.0, 2.0], [14.0, 36.0, 52.0, -32.0, 20.0], [-14.0, 58.0, 18.0, 0.0, 0.0], [-14.0, 0.0, 
+24.0, 46.0, -2.0]], [[68.0, 28.0, 59.0, 35.0, -37.0], [-22.0, 37.0, -39.0, 37.0, 13.0], [30.0, 20.0, -14.0, -88.0, 69.0], 
+[77.0, -15.0, -39.0, -75.0, -46.0]], [[22.0, 62.0, 44.0, -4.0, -32.0], [-14.0, 54.0, 22.0, -6.0, 30.0], [14.0, 66.0, 6.0, 
+-56.0, 42.0], [28.0, -14.0, -6.0, -8.0, -38.0]], [[-13.0, 21.0, 2.0, -14.0, -6.0], [-3.0, 13.0, 23.0, -15.0, 11.0], [-1.0, 
+25.0, 7.0, 2.0, -3.0], [-14.0, -3.0, 9.0, 20.0, -5.0]], [[-11.0, 31.0, -4.0, -20.0, 32.0], [47.0, 33.0, 51.0, -31.0, 7.0], 
+[-35.0, 47.0, 21.0, 10.0, -3.0], [0.0, 13.0, 33.0, 54.0, 21.0]]], [[[14.0, 15.0, 4.0, 0.0, 33.0], [48.0, 27.0, 22.0, -10.0, 
+-2.0], [-30.0, 26.0, 12.0, -7.0, 12.0], [28.0, 14.0, 18.0, 22.0, 19.0]], [[0.0, -1.0, 7.0, 3.0, -26.0], [-32.0, -8.0, -15.0, 
+9.0, 5.0], [22.0, -8.0, -8.0, -9.0, 3.0], [-7.0, -11.0, -15.0, -21.0, -19.0]], [[62.0, 18.0, 50.0, 34.0, -30.0], [-18.0, 28.0, 
+-40.0, 36.0, 8.0], [26.0, 10.0, -14.0, -76.0, 60.0], [70.0, -12.0, -36.0, -70.0, -38.0]], [[16.0, 82.0, 51.0, -13.0, -43.0], 
+[-22.0, 67.0, 37.0, -15.0, 41.0], [18.0, 88.0, 10.0, -62.0, 45.0], [21.0, -19.0, -3.0, 1.0, -48.0]], [[-68.0, -13.0, -51.0, 
+-39.0, 28.0], [16.0, -26.0, 47.0, -41.0, -5.0], [-26.0, -4.0, 16.0, 79.0, -63.0], [-77.0, 11.0, 39.0, 77.0, 37.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank4_offset2(self):
+      arg0=numpy.array([[[[4.0, 6.0, 0.0], [5.0, -7.0, 3.0]], [[0.0, 1.0, 6.0], [-3.0, 0.0, 4.0]], [[-6.0, -3.0, 5.0], [-4.0, 
+-6.0, -4.0]], [[-7.0, -6.0, -7.0], [-2.0, 5.0, -5.0]], [[-3.0, 4.0, 1.0], [6.0, -2.0, 7.0]]], [[[-1.0, -6.0, 5.0], [-2.0, 3.0, 
+0.0]], [[-6.0, 0.0, 3.0], [-5.0, -4.0, -3.0]], [[0.0, -2.0, 2.0], [-4.0, 1.0, -1.0]], [[3.0, 5.0, -1.0], [2.0, 1.0, -2.0]], 
+[[-5.0, -3.0, 7.0], [6.0, 3.0, 0.0]]], [[[6.0, 3.0, 1.0], [7.0, -3.0, -7.0]], [[6.0, -7.0, 1.0], [0.0, -5.0, -4.0]], [[0.0, 
+-1.0, 6.0], [5.0, 1.0, 2.0]], [[2.0, 5.0, 0.0], [-7.0, -3.0, -1.0]], [[3.0, 3.0, 1.0], [2.0, 0.0, -1.0]]], [[[3.0, -5.0, 5.0], 
+[7.0, -5.0, 7.0]], [[1.0, 3.0, 1.0], [0.0, 5.0, 0.0]], [[5.0, -4.0, 1.0], [5.0, 0.0, 1.0]], [[1.0, 7.0, -4.0], [4.0, 3.0, 
+-3.0]], [[-6.0, 0.0, -1.0], [-7.0, 2.0, -1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-5.0, -5.0, 2.0], [-1.0, 0.0, -5.0]], [[-6.0, -1.0, 6.0], [-5.0, 0.0, 4.0]], [[7.0, 5.0, 
+6.0], [0.0, 3.0, -5.0]], [[-1.0, -1.0, 2.0], [0.0, 0.0, -3.0]], [[2.0, -6.0, -4.0], [-6.0, 1.0, 2.0]]], [[[1.0, -3.0, -1.0], 
+[4.0, -3.0, 2.0]], [[3.0, -5.0, 1.0], [2.0, 1.0, 7.0]], [[-2.0, 0.0, -2.0], [0.0, 5.0, 6.0]], [[1.0, 0.0, -7.0], [0.0, -6.0, 
+3.0]], [[-6.0, -5.0, -1.0], [-4.0, 3.0, 2.0]]], [[[7.0, 7.0, 1.0], [0.0, 1.0, 6.0]], [[-3.0, -2.0, 0.0], [6.0, 4.0, -4.0]], 
+[[5.0, -7.0, -1.0], [7.0, 0.0, 1.0]], [[-3.0, 5.0, -4.0], [-7.0, -7.0, 1.0]], [[-6.0, 7.0, 0.0], [-7.0, 6.0, -1.0]]], [[[7.0, 
+-1.0, 1.0], [2.0, 7.0, 5.0]], [[2.0, 1.0, -7.0], [-3.0, 4.0, -2.0]], [[3.0, 6.0, 0.0], [0.0, 0.0, -3.0]], [[7.0, -3.0, 6.0], 
+[0.0, -1.0, -1.0]], [[3.0, 1.0, 7.0], [5.0, -4.0, -6.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, 0.0, 7.0], [-5.0, 2.0, 4.0]], 
+[[-1.0, -4.0, 4.0], [7.0, 3.0, 0.0]], [[-5.0, -2.0, -3.0], [-5.0, -1.0, -1.0]], [[6.0, -5.0, -7.0], [4.0, 3.0, -2.0]], [[3.0, 
+-6.0, -5.0], [0.0, -3.0, 3.0]]], [[[-3.0, 2.0, 7.0], [-5.0, 4.0, 0.0]], [[-1.0, -4.0, -2.0], [4.0, -3.0, -6.0]], [[-1.0, 0.0, 
+6.0], [-7.0, 3.0, 5.0]], [[-3.0, 0.0, -6.0], [6.0, -2.0, 4.0]], [[0.0, -7.0, 0.0], [5.0, 2.0, -2.0]]], [[[-2.0, 2.0, 3.0], 
+[7.0, -2.0, 2.0]], [[-4.0, 1.0, 5.0], [4.0, -2.0, 7.0]], [[-4.0, 0.0, 6.0], [-6.0, 3.0, 0.0]], [[-1.0, 0.0, 7.0], [2.0, -4.0, 
+-6.0]], [[0.0, -4.0, 4.0], [4.0, 4.0, -6.0]]], [[[3.0, -1.0, 3.0], [7.0, 3.0, -2.0]], [[5.0, -6.0, 2.0], [5.0, 7.0, -3.0]], 
+[[-7.0, -6.0, -1.0], [3.0, -1.0, -6.0]], [[-4.0, 0.0, 7.0], [-4.0, 0.0, 5.0]], [[2.0, -4.0, -1.0], [6.0, -7.0, 3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-70.0, -43.0, 22.0, -19.0, -59.0], [33.0, 6.0, -25.0, 55.0, -89.0], [81.0, -34.0, 16.0, 35.0, 
+-62.0], [-2.0, -35.0, 39.0, 14.0, 53.0]], [[-10.0, 66.0, 21.0, -1.0, -4.0], [-13.0, 23.0, 12.0, -30.0, 9.0], [37.0, -36.0, 
+-30.0, 6.0, 24.0], [19.0, -40.0, -6.0, 29.0, 4.0]], [[79.0, 73.0, -25.0, 31.0, -4.0], [-8.0, -40.0, -52.0, -17.0, 36.0], 
+[-88.0, -8.0, -46.0, 49.0, 11.0], [-104.0, -54.0, -24.0, 7.0, 42.0]], [[78.0, -4.0, -81.0, 14.0, 57.0], [-15.0, -32.0, 23.0, 
+-3.0, 92.0], [-123.0, 61.0, -5.0, -7.0, 49.0], [-44.0, 65.0, -42.0, -73.0, -76.0]], [[-44.0, 18.0, -36.0, -20.0, -58.0], [28.0, 
+31.0, 36.0, 23.0, -19.0], [48.0, 1.0, 5.0, 4.0, -15.0], [9.0, -49.0, -6.0, -32.0, -2.0]]], [[[47.0, 52.0, 2.0, 17.0, 29.0], 
+[-5.0, 31.0, 7.0, -54.0, 48.0], [-41.0, 15.0, 18.0, -54.0, -4.0], [21.0, -25.0, -39.0, 38.0, 4.0]], [[56.0, 67.0, -21.0, 21.0, 
+-4.0], [-23.0, -50.0, -32.0, -12.0, 35.0], [-61.0, -16.0, -71.0, 66.0, 50.0], [-92.0, -28.0, -9.0, -17.0, 12.0]], [[23.0, 30.0, 
+10.0, 9.0, 27.0], [-17.0, -2.0, -5.0, -23.0, 25.0], [-17.0, -12.0, -17.0, 2.0, 21.0], [-2.0, 2.0, -9.0, 18.0, -6.0]], [[-34.0, 
+-47.0, 53.0, -4.0, -35.0], [-10.0, -26.0, -11.0, -2.0, -51.0], [44.0, 5.0, -7.0, -3.0, 11.0], [16.0, 20.0, 45.0, 1.0, 25.0]], 
+[[48.0, 45.0, 1.0, 22.0, -53.0], [12.0, 22.0, 11.0, -72.0, 23.0], [-46.0, 69.0, 31.0, -91.0, -15.0], [8.0, -68.0, -33.0, 13.0, 
+49.0]]], [[[-15.0, -96.0, 89.0, 14.0, -69.0], [19.0, -34.0, -71.0, -4.0, -103.0], [19.0, 34.0, 50.0, -42.0, -75.0], [-2.0, 
+-11.0, 57.0, 49.0, 117.0]], [[27.0, -39.0, 18.0, 15.0, 37.0], [33.0, 21.0, -63.0, 17.0, -25.0], [-35.0, -8.0, 74.0, -26.0, 
+-111.0], [-5.0, -14.0, -12.0, 78.0, 62.0]], [[2.0, 20.0, 24.0, 7.0, -43.0], [18.0, 36.0, 5.0, -42.0, -14.0], [12.0, 28.0, 38.0, 
+-69.0, -38.0], [34.0, -58.0, -12.0, 36.0, 50.0]], [[-23.0, 14.0, 35.0, -4.0, 11.0], [-34.0, -43.0, -25.0, 17.0, -20.0], [40.0, 
+-66.0, -75.0, 88.0, 55.0], [-31.0, 20.0, 39.0, 3.0, -6.0]], [[-25.0, -29.0, 47.0, -1.0, -30.0], [-1.0, -8.0, -14.0, -7.0, 
+-44.0], [37.0, 1.0, 6.0, -13.0, -10.0], [18.0, -2.0, 30.0, 19.0, 35.0]]], [[[-22.0, 10.0, -24.0, -9.0, -17.0], [70.0, 97.0, 
+1.0, 19.0, -27.0], [28.0, -5.0, 101.0, -61.0, -139.0], [45.0, -89.0, -42.0, 64.0, 52.0]], [[-18.0, -3.0, 43.0, -2.0, -15.0], 
+[-24.0, -6.0, 21.0, -36.0, -7.0], [34.0, 11.0, -17.0, -27.0, 45.0], [40.0, 18.0, 21.0, -1.0, -7.0]], [[-13.0, -41.0, 16.0, 
+-2.0, 2.0], [38.0, 53.0, -6.0, 1.0, -29.0], [14.0, 19.0, 88.0, -73.0, -94.0], [55.0, -18.0, -12.0, 52.0, 37.0]], [[-37.0, 
+-69.0, 42.0, -7.0, -51.0], [-15.0, -46.0, 3.0, 2.0, -50.0], [37.0, 31.0, -15.0, -4.0, 36.0], [10.0, 43.0, 54.0, -38.0, 8.0]], 
+[[40.0, 61.0, -37.0, 7.0, 34.0], [-41.0, -38.0, 18.0, -14.0, 69.0], [-47.0, -12.0, -79.0, 56.0, 98.0], [-48.0, 26.0, -15.0, 
+-49.0, -62.0]]]])+(1.-msk_ref)*numpy.array([[[[-19.0, -14.0, -53.0, -13.0, 6.0], [-53.0, -5.0, -45.0, 44.0, -37.0], [59.0, 
+45.0, -67.0, 16.0, -50.0], [14.0, -49.0, -60.0, -21.0, 72.0]], [[73.0, -1.0, -9.0, -67.0, -24.0], [59.0, -52.0, 77.0, -38.0, 
+-30.0], [7.0, 47.0, 54.0, 12.0, -16.0], [-12.0, -21.0, -45.0, 74.0, -16.0]], [[15.0, -8.0, 51.0, -82.0, -19.0], [43.0, 34.0, 
+26.0, -40.0, -3.0], [-3.0, 14.0, 60.0, 81.0, 16.0], [-38.0, -52.0, 73.0, 55.0, 1.0]], [[-63.0, 4.0, 78.0, 54.0, 20.0], [-10.0, 
+52.0, -31.0, 21.0, 52.0], [-53.0, -66.0, 13.0, -36.0, 38.0], [-25.0, 27.0, 111.0, -38.0, -45.0]], [[-5.0, 27.0, -31.0, -41.0, 
+-11.0], [-14.0, -27.0, -4.0, 71.0, -16.0], [77.0, 98.0, -24.0, -12.0, -38.0], [12.0, -42.0, -26.0, 30.0, 48.0]]], [[[49.0, 
+40.0, 9.0, -10.0, -1.0], [48.0, -2.0, 54.0, -45.0, 38.0], [-15.0, 9.0, 55.0, 20.0, 48.0], [13.0, 52.0, 29.0, 47.0, -16.0]], 
+[[14.0, -29.0, 53.0, -83.0, -30.0], [48.0, 10.0, 32.0, -34.0, -27.0], [-12.0, 6.0, 60.0, 51.0, -6.0], [-50.0, -68.0, 46.0, 
+50.0, -26.0]], [[32.0, -9.0, 18.0, -15.0, -4.0], [34.0, -9.0, 38.0, -42.0, -2.0], [-30.0, -17.0, 39.0, 8.0, 10.0], [-15.0, 6.0, 
+3.0, 25.0, -28.0]], [[-17.0, -10.0, -31.0, 15.0, -25.0], [-12.0, -4.0, -30.0, -1.0, -19.0], [9.0, -20.0, -27.0, 2.0, 0.0], 
+[22.0, 6.0, -33.0, -37.0, -14.0]], [[15.0, 96.0, -23.0, -31.0, -41.0], [40.0, 18.0, 14.0, 3.0, 57.0], [61.0, 70.0, 35.0, 54.0, 
+76.0], [60.0, 58.0, 61.0, 45.0, 10.0]]], [[[-50.0, 26.0, -64.0, 47.0, -17.0], [-52.0, 59.0, -93.0, -4.0, 22.0], [38.0, -31.0, 
+-69.0, 69.0, 50.0], [72.0, 49.0, 5.0, -80.0, 41.0]], [[-7.0, 11.0, -10.0, 57.0, 58.0], [-45.0, 59.0, -35.0, -30.0, 47.0], 
+[-21.0, -44.0, -33.0, 45.0, 36.0], [21.0, 51.0, 28.0, -37.0, 62.0]], [[27.0, 66.0, -44.0, -18.0, -21.0], [19.0, -3.0, 14.0, 
+0.0, 30.0], [53.0, 61.0, 9.0, 36.0, 40.0], [53.0, 44.0, 2.0, 32.0, 27.0]], [[29.0, -80.0, 19.0, -48.0, -18.0], [27.0, -35.0, 
+33.0, -46.0, -74.0], [-39.0, -32.0, 25.0, 2.0, -54.0], [-55.0, -73.0, -56.0, 15.0, -40.0]], [[-1.0, 3.0, -33.0, 6.0, -17.0], 
+[-6.0, -3.0, -16.0, -7.0, -9.0], [15.0, -3.0, -18.0, 14.0, 6.0], [25.0, 12.0, -28.0, -18.0, 2.0]]], [[[24.0, 71.0, -57.0, 7.0, 
+50.0], [-39.0, 8.0, -2.0, 41.0, 46.0], [72.0, 95.0, -39.0, 24.0, 6.0], [49.0, 34.0, -12.0, 30.0, 119.0]], [[19.0, 6.0, -19.0, 
+-1.0, -35.0], [30.0, -30.0, 20.0, -19.0, -11.0], [-3.0, -6.0, 17.0, -14.0, 12.0], [18.0, 24.0, -31.0, 3.0, -46.0]], [[-4.0, 
+50.0, -46.0, 61.0, 37.0], [-41.0, 23.0, -29.0, 13.0, 51.0], [22.0, 8.0, -44.0, 6.0, 34.0], [55.0, 73.0, -3.0, -28.0, 58.0]], 
+[[-52.0, -8.0, -27.0, 30.0, -37.0], [-25.0, 4.0, -59.0, 27.0, -17.0], [16.0, -28.0, -43.0, -15.0, 2.0], [27.0, 5.0, -18.0, 
+-63.0, -28.0]], [[16.0, -41.0, 67.0, -49.0, -22.0], [54.0, -20.0, 50.0, -26.0, -29.0], [-46.0, -20.0, 66.0, -17.0, -18.0], 
+[-62.0, -50.0, 26.0, 40.0, -70.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_float_rank0_offset0(self):
+      arg0=numpy.array([[[7.0, 0.0], [3.0, -3.0]], [[-1.0, -2.0], [7.0, 7.0]], [[4.0, 6.0], [-5.0, -1.0]], [[-2.0, 0.0], [7.0, 
+-5.0]], [[0.0, 0.0], [-4.0, 7.0]], [[0.0, 2.0], [-2.0, 6.0]]])
+      arg1=1.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[7.0, 0.0], [3.0, -3.0]], [[-1.0, -2.0], [7.0, 7.0]], [[4.0, 6.0], [-5.0, -1.0]], [[-2.0, 0.0], [7.0, 
+-5.0]], [[0.0, 0.0], [-4.0, 7.0]], [[0.0, 2.0], [-2.0, 6.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank0_offset0(self):
+      arg0=numpy.array([[[-3.0, 3.0], [0.0, 1.0]], [[1.0, 1.0], [-5.0, -5.0]], [[2.0, -7.0], [6.0, 5.0]], [[5.0, 3.0], [-6.0, 
+-2.0]], [[6.0, -2.0], [6.0, 5.0]], [[0.0, 3.0], [4.0, 0.0]]])
+      arg1=numpy.array(4.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[-12.0, 12.0], [0.0, 4.0]], [[4.0, 4.0], [-20.0, -20.0]], [[8.0, -28.0], [24.0, 20.0]], [[20.0, 12.0], 
+[-24.0, -8.0]], [[24.0, -8.0], [24.0, 20.0]], [[0.0, 12.0], [16.0, 0.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank1_offset1(self):
+      arg0=numpy.array([[[[-2.0, 3.0, -3.0], [4.0, 5.0, 5.0]], [[2.0, 3.0, 6.0], [-3.0, -1.0, -3.0]]], [[[6.0, -7.0, -3.0], 
+[4.0, -1.0, -6.0]], [[-1.0, 4.0, 0.0], [0.0, -2.0, 2.0]]], [[[6.0, -4.0, -3.0], [0.0, -2.0, 5.0]], [[5.0, -1.0, 6.0], [0.0, 
+6.0, 6.0]]], [[[2.0, -2.0, -6.0], [-6.0, 6.0, -2.0]], [[2.0, 6.0, 6.0], [-3.0, -7.0, -3.0]]], [[[2.0, -4.0, -6.0], [-5.0, 3.0, 
+-7.0]], [[6.0, 3.0, 1.0], [0.0, 0.0, 3.0]]], [[[-5.0, -3.0, -7.0], [2.0, 0.0, -3.0]], [[3.0, 3.0, -3.0], [-3.0, -5.0, 3.0]]]])
+      arg1=numpy.array([-1.0, 6.0, 6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[2.0, 56.0], [52.0, -21.0]], [[-66.0, -46.0], [25.0, 0.0]], [[-48.0, 18.0], [25.0, 72.0]], [[-50.0, 
+30.0], [70.0, -57.0]], [[-62.0, -19.0], [18.0, 18.0]], [[-55.0, -20.0], [-3.0, -9.0]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_array_rank1_offset0(self):
+      arg0=numpy.array([[[-1.0, -1.0], [-6.0, 7.0]], [[2.0, 2.0], [1.0, 0.0]], [[-3.0, 2.0], [3.0, -5.0]], [[-7.0, -2.0], 
+[-5.0, 5.0]], [[-7.0, 0.0], [3.0, -6.0]], [[-4.0, 1.0], [-5.0, -3.0]]])
+      arg1=numpy.array([2.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[-2.0, -7.0], [-2.0, -7.0]], [[-12.0, -42.0], [14.0, 49.0]]], [[[4.0, 14.0], [4.0, 14.0]], [[2.0, 
+7.0], [0.0, 0.0]]], [[[-6.0, -21.0], [4.0, 14.0]], [[6.0, 21.0], [-10.0, -35.0]]], [[[-14.0, -49.0], [-4.0, -14.0]], [[-10.0, 
+-35.0], [10.0, 35.0]]], [[[-14.0, -49.0], [0.0, 0.0]], [[6.0, 21.0], [-12.0, -42.0]]], [[[-8.0, -28.0], [2.0, 7.0]], [[-10.0, 
+-35.0], [-6.0, -21.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank2_offset1(self):
+      arg0=numpy.array([[[[4.0, -6.0, -1.0], [4.0, 6.0, 0.0]], [[-4.0, -3.0, 3.0], [0.0, -2.0, -2.0]]], [[[-2.0, -7.0, 4.0], 
+[-1.0, 3.0, -5.0]], [[7.0, -7.0, -6.0], [0.0, 2.0, -3.0]]], [[[-2.0, -7.0, 0.0], [-1.0, 0.0, 1.0]], [[4.0, -1.0, 2.0], [7.0, 
+-5.0, 4.0]]], [[[-2.0, -6.0, -1.0], [6.0, 2.0, 5.0]], [[-6.0, -4.0, -3.0], [2.0, -5.0, 0.0]]], [[[-6.0, -2.0, -3.0], [0.0, 
+-1.0, 2.0]], [[5.0, 7.0, -1.0], [-7.0, 4.0, 0.0]]], [[[7.0, -1.0, 7.0], [3.0, -3.0, -2.0]], [[-5.0, 3.0, 6.0], [-5.0, -7.0, 
+1.0]]]])
+      arg1=numpy.array([[-5.0, -6.0, -7.0], [-4.0, -1.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=numpy.array([[[[23.0, -10.0], [-56.0, -22.0]], [[17.0, 19.0], [26.0, 2.0]]], [[[24.0, 15.0], [22.0, 1.0]], [[49.0, 
+-21.0], [9.0, -2.0]]], [[[52.0, 15.0], [-2.0, 4.0]], [[-28.0, -15.0], [-33.0, -23.0]]], [[[53.0, 14.0], [-77.0, -26.0]], 
+[[75.0, 28.0], [20.0, -3.0]]], [[[63.0, 26.0], [-8.0, 1.0]], [[-60.0, -27.0], [11.0, 24.0]]], [[[-78.0, -27.0], [17.0, -9.0]], 
+[[-35.0, 17.0], [60.0, 27.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank0_offset0(self):
+      arg0=numpy.array([[[-4.0, -7.0], [-1.0, -4.0]], [[0.0, -7.0], [0.0, 1.0]], [[-7.0, -2.0], [2.0, 3.0]], [[-3.0, -2.0], 
+[4.0, 1.0]], [[-3.0, 1.0], [-2.0, -4.0]], [[1.0, -4.0], [-4.0, 4.0]]])
+      arg1=Data(-5.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[20.0, 35.0], [5.0, 20.0]], [[-0.0, 35.0], [-0.0, -5.0]], [[35.0, 10.0], [-10.0, -15.0]], [[15.0, 
+10.0], [-20.0, -5.0]], [[15.0, -5.0], [10.0, 20.0]], [[-5.0, 20.0], [20.0, -20.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank1_offset1(self):
+      arg0=numpy.array([[[[-3.0, -3.0, 5.0], [6.0, -1.0, 3.0]], [[-6.0, -5.0, -3.0], [3.0, -7.0, -7.0]]], [[[-5.0, 1.0, -5.0], 
+[-7.0, -1.0, -7.0]], [[-6.0, -1.0, 0.0], [1.0, -7.0, 3.0]]], [[[7.0, -3.0, 1.0], [-6.0, -4.0, 0.0]], [[0.0, -6.0, 1.0], [-2.0, 
+-1.0, 4.0]]], [[[5.0, -6.0, 2.0], [-2.0, 5.0, 1.0]], [[-1.0, 6.0, -5.0], [-5.0, -3.0, -3.0]]], [[[5.0, -7.0, 6.0], [-3.0, -3.0, 
+7.0]], [[3.0, 2.0, 2.0], [-4.0, 7.0, -2.0]]], [[[-5.0, 0.0, -4.0], [0.0, 7.0, -5.0]], [[2.0, -7.0, -2.0], [3.0, 1.0, -4.0]]]])
+      arg1=Data(numpy.array([-1.0, -7.0, 6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[54.0, 19.0], [23.0, 4.0]], [[-32.0, -28.0], [13.0, 66.0]], [[20.0, 34.0], [48.0, 33.0]], [[49.0, 
+-27.0], [-71.0, 8.0]], [[80.0, 66.0], [-5.0, -57.0]], [[-19.0, -79.0], [35.0, -34.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_constData_rank1_offset0(self):
+      arg0=numpy.array([[[-5.0, -5.0], [3.0, 2.0]], [[2.0, -7.0], [-2.0, 4.0]], [[2.0, -2.0], [-2.0, -5.0]], [[-6.0, 7.0], 
+[-5.0, -7.0]], [[-5.0, 2.0], [3.0, 4.0]], [[-4.0, 5.0], [0.0, 0.0]]])
+      arg1=Data(numpy.array([0.0, 0.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank2_offset1(self):
+      arg0=numpy.array([[[[-4.0, -6.0, 3.0], [4.0, 2.0, 6.0]], [[0.0, 5.0, -3.0], [7.0, -7.0, 0.0]]], [[[-3.0, 5.0, -7.0], 
+[7.0, 1.0, -5.0]], [[-3.0, -6.0, 1.0], [1.0, 0.0, -5.0]]], [[[-7.0, -1.0, 3.0], [2.0, 4.0, -3.0]], [[2.0, 3.0, -3.0], [5.0, 
+3.0, 3.0]]], [[[-6.0, 4.0, 4.0], [5.0, -4.0, -1.0]], [[2.0, -2.0, -1.0], [5.0, 0.0, -4.0]]], [[[-5.0, -4.0, 2.0], [-2.0, -6.0, 
+-6.0]], [[-7.0, -7.0, 3.0], [1.0, -1.0, -4.0]]], [[[-1.0, 0.0, -4.0], [1.0, -5.0, 5.0]], [[6.0, -1.0, 3.0], [6.0, 4.0, -6.0]]]])
+      arg1=Data(numpy.array([[-3.0, 1.0, -2.0], [-6.0, -1.0, -5.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[0.0, 15.0], [-22.0, -56.0]], [[11.0, 10.0], [-28.0, -35.0]]], [[[28.0, 48.0], [-10.0, -18.0]], 
+[[1.0, 19.0], [7.0, 19.0]]], [[[14.0, 28.0], [4.0, -1.0]], [[3.0, 0.0], [-18.0, -48.0]]], [[[14.0, 12.0], [-17.0, -21.0]], 
+[[-6.0, -5.0], [-7.0, -10.0]]], [[[7.0, 24.0], [12.0, 48.0]], [[8.0, 34.0], [4.0, 15.0]]], [[[11.0, 26.0], [-18.0, -26.0]], 
+[[-25.0, -50.0], [-2.0, -10.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[[2.0, -5.0], [5.0, 4.0]], [[-1.0, 3.0], [-4.0, 4.0]], [[2.0, -1.0], [-4.0, 1.0]], [[0.0, 7.0], [0.0, 
+1.0]], [[0.0, 7.0], [4.0, 4.0]], [[-2.0, -3.0], [-2.0, -1.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[2.0, -5.0], [5.0, 4.0]], [[-1.0, 3.0], [-4.0, 4.0]], [[2.0, -1.0], [-4.0, 1.0]], [[0.0, 7.0], 
+[0.0, 1.0]], [[0.0, 7.0], [4.0, 4.0]], [[-2.0, -3.0], [-2.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[14.0, -35.0], [35.0, 28.0]], 
+[[-7.0, 21.0], [-28.0, 28.0]], [[14.0, -7.0], [-28.0, 7.0]], [[0.0, 49.0], [0.0, 7.0]], [[0.0, 49.0], [28.0, 28.0]], [[-14.0, 
+-21.0], [-14.0, -7.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank1_offset1(self):
+      arg0=numpy.array([[[[-2.0, -2.0, -5.0], [-7.0, 5.0, 6.0]], [[2.0, -3.0, 0.0], [0.0, -7.0, 1.0]]], [[[2.0, 3.0, 3.0], 
+[-4.0, -7.0, -1.0]], [[6.0, 1.0, 1.0], [0.0, 0.0, -4.0]]], [[[2.0, -4.0, 0.0], [-6.0, 3.0, 7.0]], [[-2.0, 0.0, 4.0], [7.0, 1.0, 
+-1.0]]], [[[-6.0, -2.0, -5.0], [2.0, -4.0, -4.0]], [[0.0, -3.0, 0.0], [-2.0, 7.0, 2.0]]], [[[-5.0, -1.0, -5.0], [-1.0, 1.0, 
+-4.0]], [[-1.0, -5.0, -2.0], [2.0, -1.0, 5.0]]], [[[6.0, 6.0, -5.0], [-2.0, 2.0, -4.0]], [[-2.0, 4.0, 5.0], [4.0, 3.0, 7.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-1.0, 0.0, 3.0])+(1.-msk_arg1)*numpy.array([-2.0, 7.0, -6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-13.0, 25.0], [-2.0, 3.0]], [[7.0, 1.0], [-3.0, -12.0]], [[-2.0, 27.0], [14.0, -10.0]], 
+[[-9.0, -14.0], [0.0, 8.0]], [[-10.0, -11.0], [-5.0, 13.0]], [[-21.0, -10.0], [17.0, 17.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 
+13.0], [-25.0, -55.0]], [[-1.0, -35.0], [-11.0, 24.0]], [[-32.0, -9.0], [-20.0, -1.0]], [[28.0, -8.0], [-21.0, 41.0]], [[33.0, 
+33.0], [-21.0, -41.0]], [[60.0, 42.0], [2.0, -29.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank1_offset0(self):
+      arg0=numpy.array([[[-1.0, -7.0], [5.0, 2.0]], [[3.0, -3.0], [-4.0, -2.0]], [[7.0, 2.0], [-5.0, 0.0]], [[2.0, -5.0], [3.0, 
+7.0]], [[1.0, 4.0], [-1.0, -7.0]], [[4.0, -5.0], [7.0, 5.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-3.0, -6.0])+(1.-msk_arg1)*numpy.array([0.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[3.0, 6.0], [21.0, 42.0]], [[-15.0, -30.0], [-6.0, -12.0]]], [[[-9.0, -18.0], [9.0, 18.0]], 
+[[12.0, 24.0], [6.0, 12.0]]], [[[-21.0, -42.0], [-6.0, -12.0]], [[15.0, 30.0], [0.0, 0.0]]], [[[-6.0, -12.0], [15.0, 30.0]], 
+[[-9.0, -18.0], [-21.0, -42.0]]], [[[-3.0, -6.0], [-12.0, -24.0]], [[3.0, 6.0], [21.0, 42.0]]], [[[-12.0, -24.0], [15.0, 
+30.0]], [[-21.0, -42.0], [-15.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], 
+[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank2_offset1(self):
+      arg0=numpy.array([[[[-6.0, 0.0, -2.0], [-4.0, -5.0, -1.0]], [[-7.0, -4.0, 3.0], [0.0, 6.0, -4.0]]], [[[4.0, -4.0, -4.0], 
+[3.0, -2.0, -2.0]], [[-7.0, -3.0, 1.0], [-7.0, 5.0, 0.0]]], [[[5.0, 0.0, -1.0], [6.0, -2.0, 0.0]], [[7.0, -7.0, -1.0], [4.0, 
+7.0, 2.0]]], [[[-1.0, 4.0, -2.0], [2.0, 3.0, 2.0]], [[-5.0, 2.0, -1.0], [-7.0, 0.0, 7.0]]], [[[-7.0, -1.0, -2.0], [0.0, -1.0, 
+-7.0]], [[6.0, 6.0, 5.0], [-4.0, 6.0, -5.0]]], [[[2.0, 0.0, 4.0], [1.0, -2.0, 4.0]], [[-2.0, 7.0, -2.0], [-6.0, 0.0, 5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-4.0, 7.0, 6.0], [-4.0, -1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[2.0, 3.0, 7.0], [-2.0, -4.0, 
+4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[12.0, 24.0], [-25.0, 21.0]], [[18.0, 32.0], [18.0, -6.0]]], [[[-68.0, -12.0], [-38.0, 
+-10.0]], [[13.0, 31.0], [63.0, 23.0]]], [[[-26.0, -20.0], [-38.0, -22.0]], [[-83.0, -21.0], [45.0, -23.0]]], [[[20.0, 0.0], 
+[25.0, -11.0]], [[28.0, 18.0], [70.0, 28.0]]], [[[9.0, 29.0], [-49.0, 1.0]], [[48.0, -30.0], [28.0, 10.0]]], [[[16.0, -8.0], 
+[6.0, -2.0]], [[45.0, 1.0], [54.0, 24.0]]]])+(1.-msk_ref)*numpy.array([[[[-26.0, 4.0], [-30.0, 24.0]], [[-5.0, 42.0], [-10.0, 
+-40.0]]], [[[-32.0, -8.0], [-14.0, -6.0]], [[-16.0, 30.0], [1.0, -6.0]]], [[[3.0, -14.0], [6.0, -4.0]], [[-14.0, 10.0], [43.0, 
+-28.0]]], [[[-4.0, -22.0], [27.0, -8.0]], [[-11.0, -2.0], [35.0, 42.0]]], [[[-31.0, 10.0], [-52.0, -24.0]], [[65.0, -16.0], 
+[-25.0, -36.0]]], [[[32.0, 12.0], [24.0, 22.0]], [[3.0, -32.0], [23.0, 32.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_float_rank0_offset0(self):
+      arg0=numpy.array([[[[5.0, -1.0, -1.0, 1.0], [-1.0, 3.0, 5.0, 7.0], [-2.0, 0.0, -6.0, 3.0]], [[-3.0, -4.0, 0.0, -6.0], 
+[-5.0, 0.0, -7.0, -1.0], [7.0, 7.0, 1.0, 2.0]]], [[[5.0, -7.0, -2.0, -4.0], [7.0, -1.0, -4.0, 7.0], [-7.0, 3.0, -5.0, 0.0]], 
+[[-4.0, 6.0, 1.0, -2.0], [2.0, 4.0, -2.0, -6.0], [6.0, 1.0, 7.0, 7.0]]], [[[3.0, -7.0, 7.0, -1.0], [-1.0, 7.0, -3.0, 2.0], 
+[-2.0, 0.0, 0.0, 2.0]], [[2.0, -5.0, 0.0, 1.0], [7.0, -4.0, 0.0, -4.0], [5.0, -5.0, 1.0, 0.0]]]])
+      arg1=1.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[5.0, -1.0, -1.0, 1.0], [-1.0, 3.0, 5.0, 7.0], [-2.0, 0.0, -6.0, 3.0]], [[-3.0, -4.0, 0.0, -6.0], 
+[-5.0, 0.0, -7.0, -1.0], [7.0, 7.0, 1.0, 2.0]]], [[[5.0, -7.0, -2.0, -4.0], [7.0, -1.0, -4.0, 7.0], [-7.0, 3.0, -5.0, 0.0]], 
+[[-4.0, 6.0, 1.0, -2.0], [2.0, 4.0, -2.0, -6.0], [6.0, 1.0, 7.0, 7.0]]], [[[3.0, -7.0, 7.0, -1.0], [-1.0, 7.0, -3.0, 2.0], 
+[-2.0, 0.0, 0.0, 2.0]], [[2.0, -5.0, 0.0, 1.0], [7.0, -4.0, 0.0, -4.0], [5.0, -5.0, 1.0, 0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_array_rank0_offset0(self):
+      arg0=numpy.array([[[[-1.0, 2.0, -4.0, -5.0], [3.0, 1.0, -7.0, -2.0], [-1.0, 0.0, 2.0, 5.0]], [[0.0, 7.0, -6.0, 3.0], 
+[-4.0, 7.0, -5.0, 3.0], [-6.0, 0.0, -6.0, 2.0]]], [[[-5.0, 0.0, -7.0, -1.0], [-2.0, -6.0, -3.0, 7.0], [-1.0, -6.0, -7.0, 1.0]], 
+[[5.0, 3.0, 4.0, 1.0], [-6.0, 5.0, 0.0, 0.0], [-2.0, 1.0, 6.0, -2.0]]], [[[4.0, -7.0, 4.0, -7.0], [3.0, -2.0, 2.0, -2.0], [4.0, 
+-6.0, 6.0, 5.0]], [[4.0, 1.0, -2.0, 1.0], [0.0, 6.0, 6.0, 3.0], [0.0, -7.0, -4.0, 0.0]]]])
+      arg1=numpy.array(-5.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=numpy.array([[[[5.0, -10.0, 20.0, 25.0], [-15.0, -5.0, 35.0, 10.0], [5.0, -0.0, -10.0, -25.0]], [[-0.0, -35.0, 30.0, 
+-15.0], [20.0, -35.0, 25.0, -15.0], [30.0, -0.0, 30.0, -10.0]]], [[[25.0, -0.0, 35.0, 5.0], [10.0, 30.0, 15.0, -35.0], [5.0, 
+30.0, 35.0, -5.0]], [[-25.0, -15.0, -20.0, -5.0], [30.0, -25.0, -0.0, -0.0], [10.0, -5.0, -30.0, 10.0]]], [[[-20.0, 35.0, 
+-20.0, 35.0], [-15.0, 10.0, -10.0, 10.0], [-20.0, 30.0, -30.0, -25.0]], [[-20.0, -5.0, 10.0, -5.0], [-0.0, -30.0, -30.0, 
+-15.0], [-0.0, 35.0, 20.0, -0.0]]]])
+      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
+      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_constData_rank0_offset0(self):
+      arg0=numpy.array([[[[-4.0, -6.0, -1.0, 4.0], [-7.0, 1.0, 5.0, 2.0], [-4.0, 1.0, 6.0, 0.0]], [[5.0, 2.0, -4.0, -6.0], 
+[0.0, -6.0, 2.0, -6.0], [2.0, -2.0, -6.0, 0.0]]], [[[5.0, 4.0, -6.0, -7.0], [-7.0, 3.0, -1.0, 6.0], [-1.0, -4.0, 2.0, -5.0]], 
+[[5.0, -2.0, -1.0, 3.0], [2.0, 2.0, 4.0, 6.0], [6.0, 0.0, -6.0, -5.0]]], [[[-3.0, 5.0, -3.0, 6.0], [-5.0, -2.0, 6.0, 7.0], 
+[-3.0, 1.0, -1.0, -7.0]], [[5.0, 3.0, -1.0, 0.0], [-4.0, -7.0, -5.0, 6.0], [-2.0, -7.0, 6.0, 2.0]]]])
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, -0.0, -0.0], 
+[0.0, -0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0]], 
+[[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], 
+[-0.0, 0.0, -0.0, -0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank0_offset0(self):
+      arg0=numpy.array([[[[0.0, -5.0, -5.0, 3.0], [2.0, -1.0, -1.0, -7.0], [-2.0, 6.0, -2.0, -7.0]], [[2.0, -1.0, 3.0, -6.0], 
+[5.0, -4.0, 2.0, 0.0], [3.0, -5.0, -5.0, 3.0]]], [[[-4.0, -4.0, 7.0, 6.0], [-3.0, 0.0, -1.0, 3.0], [-1.0, -5.0, -7.0, 0.0]], 
+[[-6.0, -5.0, -7.0, -6.0], [-4.0, -7.0, 0.0, 7.0], [6.0, -1.0, -6.0, -3.0]]], [[[-3.0, 3.0, 0.0, -4.0], [2.0, -7.0, -7.0, 4.0], 
+[-1.0, -3.0, -5.0, -4.0]], [[-6.0, -2.0, 0.0, 4.0], [7.0, 0.0, -7.0, -7.0], [5.0, 0.0, 4.0, -7.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(-1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-0.0, 20.0, 20.0, -12.0], [-8.0, 4.0, 4.0, 28.0], [8.0, -24.0, 8.0, 28.0]], [[-8.0, 4.0, 
+-12.0, 24.0], [-20.0, 16.0, -8.0, -0.0], [-12.0, 20.0, 20.0, -12.0]]], [[[16.0, 16.0, -28.0, -24.0], [12.0, -0.0, 4.0, -12.0], 
+[4.0, 20.0, 28.0, -0.0]], [[24.0, 20.0, 28.0, 24.0], [16.0, 28.0, -0.0, -28.0], [-24.0, 4.0, 24.0, 12.0]]], [[[12.0, -12.0, 
+-0.0, 16.0], [-8.0, 28.0, 28.0, -16.0], [4.0, 12.0, 20.0, 16.0]], [[24.0, 8.0, -0.0, -16.0], [-28.0, -0.0, 28.0, 28.0], [-20.0, 
+-0.0, -16.0, 28.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 5.0, 5.0, -3.0], [-2.0, 1.0, 1.0, 7.0], [2.0, -6.0, 2.0, 7.0]], 
+[[-2.0, 1.0, -3.0, 6.0], [-5.0, 4.0, -2.0, -0.0], [-3.0, 5.0, 5.0, -3.0]]], [[[4.0, 4.0, -7.0, -6.0], [3.0, -0.0, 1.0, -3.0], 
+[1.0, 5.0, 7.0, -0.0]], [[6.0, 5.0, 7.0, 6.0], [4.0, 7.0, -0.0, -7.0], [-6.0, 1.0, 6.0, 3.0]]], [[[3.0, -3.0, -0.0, 4.0], 
+[-2.0, 7.0, 7.0, -4.0], [1.0, 3.0, 5.0, 4.0]], [[6.0, 2.0, -0.0, -4.0], [-7.0, -0.0, 7.0, 7.0], [-5.0, -0.0, -4.0, 7.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_float_rank0_offset0(self):
+      arg0=Data(-6.0,self.functionspace)
+      arg1=-4.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(24.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_array_rank0_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      arg1=numpy.array(5.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(20.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank1_offset1(self):
+      arg0=Data(numpy.array([5.0, -5.0, 7.0]),self.functionspace)
+      arg1=numpy.array([5.0, -1.0, 5.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(65.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[-5.0, -7.0, 4.0], [-1.0, 6.0, -7.0]]),self.functionspace)
+      arg1=numpy.array([[5.0, 7.0, 0.0], [-1.0, -5.0, -7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-54.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-6.0, 6.0, -6.0], [-5.0, 2.0, -2.0], [-5.0, -6.0, 0.0], [-5.0, -4.0, 5.0]], [[-3.0, -2.0, -5.0], 
+[-2.0, -4.0, 3.0], [-1.0, -5.0, 4.0], [-1.0, -2.0, 1.0]]]),self.functionspace)
+      arg1=numpy.array([[[-7.0, 3.0, -6.0], [4.0, -3.0, -7.0], [3.0, -4.0, -4.0], [5.0, 1.0, 7.0]], [[-2.0, -7.0, 1.0], [3.0, 
+3.0, -3.0], [6.0, 0.0, -6.0], [4.0, 0.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(53.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-5.0, -4.0], [3.0, -1.0], [-7.0, 3.0]], [[7.0, 6.0], [3.0, 0.0], [2.0, -4.0]]], [[[-1.0, 6.0], 
+[0.0, 3.0], [-3.0, -2.0]], [[1.0, 6.0], [-7.0, -4.0], [-2.0, -5.0]]], [[[5.0, -4.0], [-1.0, -4.0], [-7.0, 7.0]], [[-5.0, -3.0], 
+[2.0, 4.0], [-6.0, -5.0]]], [[[6.0, 4.0], [-5.0, 4.0], [2.0, 3.0]], [[5.0, -2.0], [2.0, -2.0], [-5.0, 
+5.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[1.0, 5.0], [4.0, -3.0], [7.0, -1.0]], [[-7.0, -2.0], [-2.0, 2.0], [6.0, 1.0]]], [[[-6.0, 3.0], 
+[-7.0, 3.0], [5.0, 0.0]], [[2.0, 5.0], [-6.0, 4.0], [3.0, 5.0]]], [[[3.0, 0.0], [6.0, 0.0], [-2.0, -5.0]], [[1.0, 7.0], [-3.0, 
+7.0], [1.0, -5.0]]], [[[4.0, -3.0], [2.0, -4.0], [-6.0, 0.0]], [[-2.0, -7.0], [7.0, 3.0], [-5.0, 7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-27.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_array_rank1_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      arg1=numpy.array([7.0, 1.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([28.0, 4.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank2_offset1(self):
+      arg0=Data(numpy.array([-2.0, 3.0, 0.0]),self.functionspace)
+      arg1=numpy.array([[-7.0, -3.0, -2.0], [-2.0, -2.0, 4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([5.0, -2.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[-6.0, 0.0, -1.0], [1.0, -3.0, 5.0]]),self.functionspace)
+      arg1=numpy.array([[[-5.0, 2.0, 3.0], [0.0, 7.0, 4.0]], [[6.0, -4.0, 3.0], [0.0, 5.0, -5.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([26.0, -79.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-5.0, -3.0, -5.0], [-7.0, -6.0, 2.0], [-1.0, 5.0, 3.0], [6.0, -2.0, -3.0]], [[-5.0, 6.0, 2.0], 
+[-7.0, -6.0, -5.0], [-2.0, 5.0, -2.0], [-1.0, 5.0, 4.0]]]),self.functionspace)
+      arg1=numpy.array([[[[-4.0, 6.0, -3.0], [2.0, 3.0, -7.0], [-5.0, 3.0, -4.0], [-7.0, -2.0, 3.0]], [[-2.0, 7.0, 7.0], [4.0, 
+-2.0, -5.0], [-2.0, 2.0, -5.0], [-1.0, 5.0, -5.0]]], [[[-4.0, -2.0, -4.0], [-4.0, -5.0, 6.0], [3.0, -6.0, -3.0], [4.0, -4.0, 
+-5.0]], [[-2.0, 0.0, -6.0], [-6.0, -4.0, 0.0], [5.0, 0.0, -7.0], [1.0, -7.0, -5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([37.0, 133.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_array_rank2_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg1=numpy.array([[-2.0, 7.0, -3.0, -6.0, 4.0], [6.0, -7.0, 3.0, -4.0, -6.0], [0.0, -2.0, -2.0, -5.0, -4.0], [-5.0, -7.0, 
+0.0, 4.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[4.0, -14.0, 6.0, 12.0, -8.0], [-12.0, 14.0, -6.0, 8.0, 12.0], [-0.0, 4.0, 4.0, 10.0, 8.0], [10.0, 
+14.0, -0.0, -8.0, -0.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank3_offset1(self):
+      arg0=Data(numpy.array([3.0, 5.0, 1.0]),self.functionspace)
+      arg1=numpy.array([[[6.0, 0.0, 5.0], [5.0, -7.0, 0.0], [3.0, -4.0, 2.0], [3.0, 6.0, 2.0], [-7.0, -2.0, -7.0]], [[2.0, 
+-5.0, 0.0], [-5.0, 7.0, -3.0], [-1.0, 0.0, 4.0], [2.0, 7.0, -2.0], [-1.0, 0.0, 7.0]], [[-4.0, 1.0, -6.0], [2.0, 5.0, -1.0], 
+[-7.0, 6.0, 4.0], [0.0, -2.0, -2.0], [-6.0, -7.0, 1.0]], [[-5.0, 0.0, 0.0], [7.0, -1.0, 2.0], [6.0, -7.0, 5.0], [3.0, 0.0, 
+-2.0], [0.0, 0.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[23.0, -20.0, -9.0, 41.0, -38.0], [-19.0, 17.0, 1.0, 39.0, 4.0], [-13.0, 30.0, 13.0, -12.0, -52.0], 
+[-15.0, 18.0, -12.0, 7.0, -6.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[3.0, 4.0, 0.0], [4.0, -7.0, -2.0]]),self.functionspace)
+      arg1=numpy.array([[[[4.0, -2.0, -6.0], [-7.0, -5.0, -6.0]], [[-6.0, -6.0, 0.0], [-1.0, 0.0, 3.0]], [[6.0, 1.0, 0.0], 
+[7.0, -6.0, 3.0]], [[-2.0, 0.0, -3.0], [0.0, 0.0, 6.0]], [[-7.0, -3.0, 4.0], [-4.0, 3.0, 6.0]]], [[[0.0, -4.0, -7.0], [1.0, 
+-5.0, 4.0]], [[-6.0, -6.0, 4.0], [7.0, 6.0, 5.0]], [[1.0, 3.0, -4.0], [-5.0, -6.0, 7.0]], [[1.0, -2.0, 7.0], [-6.0, 4.0, 7.0]], 
+[[-4.0, 6.0, 5.0], [0.0, -5.0, -6.0]]], [[[3.0, 4.0, 0.0], [7.0, -3.0, -6.0]], [[3.0, 4.0, 2.0], [-5.0, -7.0, 0.0]], [[-4.0, 
+-4.0, 1.0], [2.0, 1.0, -6.0]], [[4.0, -1.0, -6.0], [3.0, 5.0, -5.0]], [[-7.0, 2.0, -6.0], [6.0, 5.0, -4.0]]], [[[-1.0, 6.0, 
+-7.0], [-2.0, 0.0, -1.0]], [[4.0, -6.0, -7.0], [-5.0, -6.0, -3.0]], [[2.0, -6.0, -3.0], [0.0, 7.0, -4.0]], [[-3.0, 0.0, 7.0], 
+[-7.0, -4.0, 3.0]], [[3.0, -5.0, -3.0], [6.0, 0.0, 4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[23.0, -52.0, 86.0, -18.0, -82.0], [15.0, -66.0, 23.0, -71.0, 59.0], [86.0, 54.0, -15.0, -5.0, 
+-16.0], [15.0, 16.0, -59.0, -15.0, 5.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_array_rank3_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg1=numpy.array([[[3.0, -6.0], [0.0, 3.0]], [[6.0, -7.0], [-2.0, -6.0]], [[-4.0, -2.0], [-4.0, -4.0]], [[-4.0, 0.0], 
+[6.0, 4.0]], [[3.0, 7.0], [0.0, 0.0]], [[1.0, -3.0], [3.0, 4.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-12.0, 24.0], [-0.0, -12.0]], [[-24.0, 28.0], [8.0, 24.0]], [[16.0, 8.0], [16.0, 16.0]], [[16.0, 
+-0.0], [-24.0, -16.0]], [[-12.0, -28.0], [-0.0, -0.0]], [[-4.0, 12.0], [-12.0, -16.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank4_offset1(self):
+      arg0=Data(numpy.array([4.0, -6.0, 0.0]),self.functionspace)
+      arg1=numpy.array([[[[5.0, -3.0, -2.0], [5.0, -2.0, -2.0]], [[-2.0, -2.0, -6.0], [-2.0, 4.0, 6.0]]], [[[-3.0, -1.0, -4.0], 
+[-1.0, 4.0, 5.0]], [[-1.0, -6.0, -7.0], [6.0, -1.0, 0.0]]], [[[-7.0, -4.0, -2.0], [0.0, -1.0, -6.0]], [[1.0, -5.0, 2.0], [-1.0, 
+-6.0, -3.0]]], [[[6.0, 5.0, 4.0], [-6.0, 0.0, 3.0]], [[-3.0, 7.0, -3.0], [2.0, 0.0, 3.0]]], [[[-2.0, -3.0, -3.0], [-3.0, -1.0, 
+5.0]], [[-7.0, -3.0, -2.0], [-3.0, -7.0, -3.0]]], [[[0.0, 4.0, 5.0], [5.0, -2.0, 0.0]], [[7.0, -1.0, 7.0], [-3.0, -6.0, 
+-1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[38.0, 32.0], [4.0, -32.0]], [[-6.0, -28.0], [32.0, 30.0]], [[-4.0, 6.0], [34.0, 32.0]], [[-6.0, 
+-24.0], [-54.0, 8.0]], [[10.0, -6.0], [-10.0, 30.0]], [[-24.0, 32.0], [34.0, 24.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_array_rank4_offset0(self):
+      arg0=Data(-6.0,self.functionspace)
+      arg1=numpy.array([[[[-1.0, 3.0, -3.0, 4.0], [-7.0, 6.0, 0.0, 7.0], [-4.0, -5.0, -7.0, 1.0]], [[4.0, -5.0, 6.0, 2.0], 
+[1.0, -1.0, 6.0, 6.0], [-3.0, -3.0, 0.0, 6.0]]], [[[-2.0, -3.0, 1.0, 3.0], [-1.0, 0.0, -3.0, 0.0], [4.0, -3.0, 6.0, -1.0]], 
+[[6.0, 0.0, -2.0, -1.0], [-4.0, 6.0, 3.0, -6.0], [-7.0, 7.0, 3.0, 3.0]]], [[[6.0, 1.0, 5.0, -4.0], [-4.0, 0.0, 7.0, 2.0], 
+[-6.0, 2.0, -1.0, 1.0]], [[7.0, 0.0, -1.0, -2.0], [-4.0, 7.0, -4.0, 0.0], [6.0, -4.0, 6.0, -2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[6.0, -18.0, 18.0, -24.0], [42.0, -36.0, -0.0, -42.0], [24.0, 30.0, 42.0, -6.0]], [[-24.0, 30.0, 
+-36.0, -12.0], [-6.0, 6.0, -36.0, -36.0], [18.0, 18.0, -0.0, -36.0]]], [[[12.0, 18.0, -6.0, -18.0], [6.0, -0.0, 18.0, -0.0], 
+[-24.0, 18.0, -36.0, 6.0]], [[-36.0, -0.0, 12.0, 6.0], [24.0, -36.0, -18.0, 36.0], [42.0, -42.0, -18.0, -18.0]]], [[[-36.0, 
+-6.0, -30.0, 24.0], [24.0, -0.0, -42.0, -12.0], [36.0, -12.0, 6.0, -6.0]], [[-42.0, -0.0, 6.0, 12.0], [24.0, -42.0, 24.0, 
+-0.0], [-36.0, 24.0, -36.0, 12.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_constData_rank0_offset0(self):
+      arg0=Data(-7.0,self.functionspace)
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-0.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([0.0, 6.0, -7.0]),self.functionspace)
+      arg1=Data(numpy.array([-6.0, 6.0, 0.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(36.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[0.0, -6.0, 3.0], [0.0, 0.0, 2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-3.0, 7.0, -5.0], [-4.0, 4.0, 6.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-45.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[4.0, 7.0, 0.0], [-7.0, 7.0, -5.0], [-5.0, 0.0, -5.0], [3.0, 6.0, 2.0]], [[5.0, -6.0, 5.0], 
+[-1.0, 6.0, 2.0], [-4.0, 5.0, 6.0], [0.0, 4.0, 6.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[4.0, -5.0, 1.0], [4.0, 4.0, -2.0], [-4.0, -6.0, 6.0], [-3.0, 4.0, 4.0]], [[4.0, 5.0, 0.0], [5.0, 
+4.0, 2.0], [-3.0, -2.0, 7.0], [6.0, 5.0, -1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(75.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[3.0, -7.0], [-3.0, -3.0], [1.0, -5.0]], [[2.0, 6.0], [7.0, -5.0], [-3.0, -5.0]]], [[[-6.0, 
+-2.0], [-2.0, -1.0], [-7.0, 1.0]], [[4.0, 0.0], [2.0, 0.0], [-7.0, -3.0]]], [[[-2.0, 0.0], [-2.0, 3.0], [0.0, 7.0]], [[-4.0, 
+5.0], [6.0, -3.0], [-6.0, 4.0]]], [[[3.0, 0.0], [-2.0, -7.0], [4.0, -2.0]], [[0.0, 7.0], [-7.0, 6.0], [2.0, 
+7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-2.0, 1.0], [-2.0, 6.0], [-3.0, 6.0]], [[-2.0, 4.0], [4.0, -4.0], [3.0, 3.0]]], [[[-4.0, -7.0], 
+[-2.0, 5.0], [7.0, 0.0]], [[1.0, -3.0], [7.0, -4.0], [3.0, 6.0]]], [[[-7.0, -7.0], [-6.0, 5.0], [0.0, 6.0]], [[-2.0, 0.0], 
+[0.0, -5.0], [0.0, 0.0]]], [[[-1.0, -5.0], [1.0, -6.0], [-6.0, -5.0]], [[7.0, 3.0], [7.0, 4.0], [1.0, 
+4.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=Data(108.0,self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_constData_rank1_offset0(self):
+      arg0=Data(-7.0,self.functionspace)
+      arg1=Data(numpy.array([2.0, 2.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-14.0, -14.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([3.0, -2.0, 4.0]),self.functionspace)
+      arg1=Data(numpy.array([[-3.0, -2.0, 1.0], [-6.0, -5.0, -1.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-1.0, -12.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[1.0, -7.0, 0.0], [-2.0, -5.0, 4.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-7.0, 3.0, 1.0], [-2.0, 2.0, -4.0]], [[-5.0, 6.0, 4.0], [0.0, 4.0, -5.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-50.0, -87.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[2.0, -4.0, -7.0], [6.0, -3.0, 2.0], [-4.0, 1.0, -7.0], [1.0, 0.0, 1.0]], [[1.0, 0.0, 6.0], 
+[-5.0, -5.0, -5.0], [0.0, -3.0, 3.0], [5.0, -3.0, 4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[1.0, 0.0, 7.0], [6.0, -7.0, -6.0], [-2.0, -3.0, -2.0], [-2.0, -5.0, 0.0]], [[6.0, -1.0, 5.0], 
+[-2.0, -7.0, 0.0], [-1.0, 5.0, -4.0], [5.0, -3.0, 2.0]]], [[[-6.0, -6.0, -2.0], [6.0, 1.0, -1.0], [0.0, -5.0, 4.0], [6.0, -7.0, 
+0.0]], [[-4.0, 6.0, -7.0], [6.0, -5.0, 2.0], [5.0, -2.0, -5.0], [4.0, -2.0, 4.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([111.0, 2.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_constData_rank2_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg1=Data(numpy.array([[7.0, -7.0, 5.0, -6.0, 0.0], [4.0, 0.0, -6.0, 7.0, 0.0], [-1.0, 0.0, 6.0, -5.0, 0.0], [1.0, -1.0, 
+5.0, -2.0, 0.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-35.0, 35.0, -25.0, 30.0, -0.0], [-20.0, -0.0, 30.0, -35.0, -0.0], [5.0, -0.0, -30.0, 25.0, -0.0], 
+[-5.0, 5.0, -25.0, 10.0, -0.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([7.0, -7.0, 2.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 2.0, -2.0], [-7.0, 5.0, 0.0], [-2.0, 4.0, -7.0], [1.0, 7.0, 1.0], [1.0, 0.0, 0.0]], [[5.0, 
+-5.0, 3.0], [4.0, 3.0, 1.0], [-6.0, -3.0, -5.0], [-2.0, -1.0, 3.0], [-7.0, 0.0, 2.0]], [[0.0, -1.0, -3.0], [6.0, -4.0, 2.0], 
+[6.0, -5.0, 6.0], [-5.0, 4.0, 0.0], [-3.0, 3.0, 4.0]], [[-3.0, 1.0, 2.0], [2.0, -2.0, -3.0], [-3.0, -4.0, 5.0], [-4.0, -2.0, 
+4.0], [-2.0, 1.0, -1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-32.0, -84.0, -56.0, -40.0, 7.0], [76.0, 9.0, -31.0, -1.0, -45.0], [1.0, 74.0, 89.0, -63.0, 
+-34.0], [-24.0, 22.0, 17.0, -6.0, -23.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[6.0, -1.0, -5.0], [0.0, 3.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-4.0, -4.0, -4.0], [-5.0, 0.0, 6.0]], [[5.0, 6.0, -3.0], [-2.0, -3.0, 0.0]], [[-1.0, -3.0, 
+-1.0], [0.0, -5.0, -2.0]], [[4.0, -4.0, 6.0], [7.0, 4.0, 6.0]], [[-2.0, 0.0, -4.0], [0.0, -6.0, 7.0]]], [[[-7.0, 2.0, 7.0], 
+[6.0, -5.0, -6.0]], [[3.0, 0.0, 0.0], [-2.0, 2.0, -1.0]], [[-5.0, -3.0, -4.0], [6.0, -4.0, -5.0]], [[0.0, -4.0, 7.0], [7.0, 
+1.0, 0.0]], [[7.0, 6.0, 6.0], [1.0, -4.0, 0.0]]], [[[-5.0, -5.0, -5.0], [0.0, 5.0, -1.0]], [[1.0, -1.0, 2.0], [2.0, -2.0, 
+3.0]], [[2.0, 2.0, 4.0], [6.0, 2.0, 5.0]], [[-3.0, -6.0, 0.0], [-2.0, -4.0, 4.0]], [[0.0, 0.0, 6.0], [5.0, -5.0, 2.0]]], 
+[[[0.0, 3.0, -4.0], [-1.0, 7.0, 0.0]], [[4.0, -5.0, 5.0], [6.0, -2.0, 3.0]], [[3.0, -4.0, 6.0], [4.0, -1.0, 4.0]], [[-2.0, 
+-7.0, 5.0], [-1.0, -1.0, 0.0]], [[4.0, -5.0, -1.0], [3.0, -3.0, -5.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[0.0, 30.0, -13.0, 10.0, -10.0], [-94.0, 24.0, -19.0, -28.0, -6.0], [15.0, -9.0, -4.0, -24.0, 
+-45.0], [38.0, -2.0, -11.0, -33.0, 25.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_constData_rank3_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, 1.0], [0.0, 0.0]], [[-5.0, -6.0], [5.0, 6.0]], [[-2.0, 7.0], [-2.0, 1.0]], [[1.0, -7.0], 
+[0.0, -4.0]], [[0.0, -1.0], [5.0, 1.0]], [[0.0, -6.0], [-5.0, 3.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[4.0, -1.0], [-0.0, -0.0]], [[5.0, 6.0], [-5.0, -6.0]], [[2.0, -7.0], [2.0, -1.0]], [[-1.0, 7.0], 
+[-0.0, 4.0]], [[-0.0, 1.0], [-5.0, -1.0]], [[-0.0, 6.0], [5.0, -3.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([-6.0, 7.0, 0.0]),self.functionspace)
+      arg1=Data(numpy.array([[[[3.0, -2.0, -3.0], [-4.0, -2.0, -5.0]], [[3.0, 6.0, 6.0], [-7.0, 4.0, -5.0]]], [[[1.0, 6.0, 
+0.0], [-4.0, 0.0, -5.0]], [[-5.0, -1.0, -7.0], [5.0, -5.0, -1.0]]], [[[7.0, 1.0, 4.0], [0.0, -4.0, 3.0]], [[-7.0, -2.0, -2.0], 
+[-7.0, -2.0, -7.0]]], [[[0.0, -3.0, 7.0], [6.0, -1.0, 3.0]], [[7.0, -7.0, -3.0], [-6.0, 1.0, 6.0]]], [[[7.0, 2.0, 6.0], [3.0, 
+2.0, -3.0]], [[5.0, 7.0, -5.0], [7.0, -2.0, -4.0]]], [[[6.0, 2.0, 3.0], [6.0, 2.0, 3.0]], [[6.0, 1.0, 4.0], [-6.0, 0.0, 
+5.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-32.0, 10.0], [24.0, 70.0]], [[36.0, 24.0], [23.0, -65.0]], [[-35.0, -28.0], [28.0, 28.0]], 
+[[-21.0, -43.0], [-91.0, 43.0]], [[-28.0, -4.0], [19.0, -56.0]], [[-22.0, -22.0], [-29.0, 36.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_constData_rank4_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg1=Data(numpy.array([[[[-6.0, 0.0, -5.0, 3.0], [-1.0, 0.0, 5.0, 2.0], [-1.0, -2.0, 5.0, 1.0]], [[0.0, -4.0, -2.0, 2.0], 
+[-5.0, -1.0, 6.0, 0.0], [0.0, -4.0, 5.0, 4.0]]], [[[2.0, 1.0, -3.0, -6.0], [7.0, 1.0, -5.0, 7.0], [4.0, 7.0, 1.0, 4.0]], [[6.0, 
+-3.0, 0.0, -3.0], [5.0, -3.0, 0.0, 0.0], [-7.0, 7.0, -5.0, 2.0]]], [[[0.0, 0.0, 1.0, -1.0], [-3.0, 7.0, 5.0, -3.0], [0.0, 1.0, 
+-2.0, 3.0]], [[-6.0, 6.0, -4.0, -6.0], [-1.0, -1.0, -1.0, -4.0], [-2.0, -7.0, -4.0, -2.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[24.0, -0.0, 20.0, -12.0], [4.0, -0.0, -20.0, -8.0], [4.0, 8.0, -20.0, -4.0]], [[-0.0, 16.0, 8.0, 
+-8.0], [20.0, 4.0, -24.0, -0.0], [-0.0, 16.0, -20.0, -16.0]]], [[[-8.0, -4.0, 12.0, 24.0], [-28.0, -4.0, 20.0, -28.0], [-16.0, 
+-28.0, -4.0, -16.0]], [[-24.0, 12.0, -0.0, 12.0], [-20.0, 12.0, -0.0, -0.0], [28.0, -28.0, 20.0, -8.0]]], [[[-0.0, -0.0, -4.0, 
+4.0], [12.0, -28.0, -20.0, 12.0], [-0.0, -4.0, 8.0, -12.0]], [[24.0, -24.0, 16.0, 24.0], [4.0, 4.0, 4.0, 16.0], [8.0, 28.0, 
+16.0, 8.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank0_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-6.0)+(1-msk_arg1)*(-5.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-30.0)+(1.-msk_ref)*numpy.array(-25.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([4.0, 6.0, 4.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([7.0, 5.0, 2.0])+(1.-msk_arg1)*numpy.array([1.0, -3.0, 1.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(66.0)+(1.-msk_ref)*numpy.array(-10.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-4.0, 0.0, -4.0], [7.0, 2.0, -5.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, 2.0, 5.0], [0.0, 3.0, 3.0]])+(1.-msk_arg1)*numpy.array([[5.0, -5.0, -2.0], [7.0, -3.0, 
+-6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-9.0)+(1.-msk_ref)*numpy.array(61.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[4.0, 7.0, -6.0], [-1.0, -5.0, 0.0], [0.0, 1.0, 1.0], [0.0, 4.0, 4.0]], [[-5.0, 0.0, -5.0], [1.0, 
+4.0, 5.0], [-4.0, 0.0, 4.0], [-3.0, 5.0, 0.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-6.0, -3.0, -3.0], [-3.0, 4.0, 0.0], [4.0, 3.0, 5.0], [-3.0, 1.0, -4.0]], [[-1.0, 0.0, 
+-7.0], [-6.0, -3.0, -3.0], [-4.0, -5.0, 3.0], [6.0, 1.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 6.0, 6.0], [-1.0, 3.0, 2.0], 
+[3.0, 0.0, 2.0], [0.0, -4.0, 4.0]], [[4.0, -4.0, 6.0], [-7.0, -7.0, 5.0], [-2.0, 5.0, 7.0], [7.0, -4.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-26.0)+(1.-msk_ref)*numpy.array(-71.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[0.0, 1.0], [0.0, 1.0], [-6.0, 6.0]], [[1.0, -3.0], [3.0, -1.0], [6.0, -5.0]]], [[[4.0, 6.0], 
+[3.0, -3.0], [5.0, -3.0]], [[3.0, 0.0], [1.0, 1.0], [-1.0, 0.0]]], [[[-7.0, -3.0], [4.0, -4.0], [7.0, 0.0]], [[0.0, -3.0], 
+[-6.0, -1.0], [2.0, -4.0]]], [[[7.0, -5.0], [6.0, -4.0], [-1.0, 0.0]], [[-7.0, -7.0], [-3.0, 4.0], [3.0, 
+-3.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[1.0, -2.0], [1.0, 7.0], [0.0, 5.0]], [[0.0, -2.0], [3.0, 6.0], [2.0, -3.0]]], [[[-2.0, 
+1.0], [7.0, -7.0], [-7.0, 4.0]], [[6.0, 2.0], [-1.0, -1.0], [2.0, -7.0]]], [[[3.0, 6.0], [-2.0, -7.0], [5.0, 0.0]], [[0.0, 
+4.0], [4.0, 7.0], [-1.0, -3.0]]], [[[5.0, 2.0], [2.0, 1.0], [4.0, -7.0]], [[-7.0, -4.0], [6.0, 5.0], [-1.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 4.0], [-2.0, -2.0], [0.0, 6.0]], [[-5.0, 0.0], [7.0, -6.0], [2.0, 5.0]]], [[[-6.0, 
+1.0], [-7.0, -3.0], [-7.0, -1.0]], [[6.0, 0.0], [6.0, -4.0], [-5.0, 3.0]]], [[[-3.0, 4.0], [5.0, 5.0], [1.0, 0.0]], [[1.0, 
+-7.0], [-5.0, -4.0], [-3.0, -2.0]]], [[[-6.0, -6.0], [-2.0, 0.0], [-7.0, -1.0]], [[-7.0, -3.0], [-7.0, -7.0], [5.0, -7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(166.0)+(1.-msk_ref)*numpy.array(165.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank1_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-5.0, 1.0])+(1.-msk_arg1)*numpy.array([-6.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([15.0, -3.0])+(1.-msk_ref)*numpy.array([18.0, -0.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-3.0, -1.0, 4.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 5.0, 4.0], [-2.0, -5.0, 4.0]])+(1.-msk_arg1)*numpy.array([[7.0, 0.0, -4.0], [2.0, -5.0, 
+-6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([11.0, 27.0])+(1.-msk_ref)*numpy.array([-37.0, -25.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-5.0, -1.0, -4.0], [-6.0, -6.0, -1.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, -5.0, 6.0], [5.0, 6.0, -7.0]], [[3.0, 4.0, 7.0], [-3.0, 3.0, 
+7.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, -2.0, -3.0], [3.0, -1.0, -4.0]], [[-2.0, -4.0, 2.0], [7.0, 1.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-78.0, -54.0])+(1.-msk_ref)*numpy.array([-4.0, -42.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[1.0, 0.0, 5.0], [3.0, 1.0, -1.0], [-7.0, -4.0, -3.0], [4.0, -4.0, 3.0]], [[-5.0, 5.0, 5.0], 
+[-2.0, 0.0, -1.0], [-5.0, -7.0, -7.0], [-7.0, -7.0, 1.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-5.0, -2.0, -2.0], [7.0, 0.0, -6.0], [5.0, -4.0, -2.0], [-2.0, 2.0, -5.0]], [[-2.0, 4.0, 
+5.0], [7.0, 0.0, -3.0], [0.0, -6.0, 0.0], [-2.0, 0.0, 3.0]]], [[[4.0, 0.0, -6.0], [-1.0, 3.0, 0.0], [-2.0, -5.0, 0.0], [-3.0, 
+-3.0, 0.0]], [[3.0, 0.0, -7.0], [-7.0, -2.0, -7.0], [-6.0, -3.0, 2.0], [-5.0, 5.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 
+-4.0, -4.0], [4.0, -3.0, 5.0], [7.0, 3.0, -6.0], [-7.0, 5.0, 5.0]], [[6.0, 1.0, 3.0], [1.0, -4.0, 7.0], [3.0, 0.0, -6.0], [4.0, 
+-5.0, 4.0]]], [[[-4.0, 7.0, -6.0], [6.0, 4.0, -1.0], [-4.0, 1.0, 4.0], [4.0, 7.0, 5.0]], [[5.0, 0.0, -5.0], [-3.0, 7.0, -5.0], 
+[4.0, 6.0, -2.0], [0.0, 6.0, -4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([71.0, 16.0])+(1.-msk_ref)*numpy.array([-73.0, -129.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank2_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, -1.0, 0.0, -5.0, -3.0], [-2.0, 0.0, 4.0, -5.0, -7.0], [5.0, -3.0, 0.0, 4.0, -3.0], 
+[0.0, -1.0, -3.0, -7.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, -7.0, 3.0, -6.0, -4.0], [2.0, -6.0, 5.0, -1.0, 0.0], [-1.0, 
+0.0, -1.0, -5.0, -6.0], [-2.0, -1.0, -1.0, -5.0, 1.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-7.0, -1.0, 0.0, -5.0, -3.0], [-2.0, 0.0, 4.0, -5.0, -7.0], [5.0, -3.0, 0.0, 4.0, -3.0], [0.0, 
+-1.0, -3.0, -7.0, 4.0]])+(1.-msk_ref)*numpy.array([[3.0, -7.0, 3.0, -6.0, -4.0], [2.0, -6.0, 5.0, -1.0, 0.0], [-1.0, 0.0, -1.0, 
+-5.0, -6.0], [-2.0, -1.0, -1.0, -5.0, 1.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([3.0, -1.0, 5.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[6.0, 3.0, 2.0], [2.0, -1.0, 0.0], [2.0, -5.0, -4.0], [0.0, -2.0, -4.0], [2.0, -6.0, 0.0]], 
+[[-6.0, -5.0, -1.0], [-2.0, -3.0, -7.0], [5.0, 0.0, 0.0], [3.0, 7.0, 2.0], [5.0, -1.0, 5.0]], [[-1.0, 3.0, -2.0], [2.0, 0.0, 
+-6.0], [-1.0, -5.0, 1.0], [6.0, 7.0, -3.0], [6.0, -6.0, 6.0]], [[4.0, 5.0, 3.0], [1.0, -2.0, 4.0], [-4.0, -2.0, 6.0], [4.0, 
+1.0, 1.0], [3.0, -3.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 4.0, 0.0], [7.0, -1.0, -3.0], [3.0, -4.0, -7.0], [-5.0, 2.0, 
+6.0], [4.0, -3.0, -6.0]], [[1.0, -7.0, 0.0], [4.0, 2.0, 0.0], [4.0, -3.0, 5.0], [7.0, -7.0, 2.0], [4.0, -4.0, -7.0]], [[-6.0, 
+7.0, 6.0], [4.0, 0.0, -6.0], [0.0, -5.0, -7.0], [-5.0, 0.0, 5.0], [1.0, 6.0, -2.0]], [[-4.0, 5.0, -1.0], [-6.0, 6.0, 4.0], 
+[-7.0, 4.0, -5.0], [0.0, 6.0, 7.0], [0.0, -7.0, -7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[25.0, 7.0, -9.0, -18.0, 12.0], [-18.0, -38.0, 15.0, 12.0, 41.0], [-16.0, -24.0, 7.0, -4.0, 
+54.0], [22.0, 25.0, 20.0, 16.0, -8.0]])+(1.-msk_ref)*numpy.array([[5.0, 7.0, -22.0, 13.0, -15.0], [10.0, 10.0, 40.0, 38.0, 
+-19.0], [5.0, -18.0, -30.0, 10.0, -13.0], [-22.0, -4.0, -50.0, 29.0, -28.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[3.0, 5.0, -7.0], [-3.0, -4.0, 0.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[5.0, -4.0, -1.0], [-7.0, -6.0, -6.0]], [[0.0, 5.0, -7.0], [5.0, 2.0, 1.0]], [[-1.0, 1.0, 
+-3.0], [-1.0, 7.0, -4.0]], [[-6.0, 6.0, -4.0], [-7.0, 0.0, 4.0]], [[3.0, 3.0, 0.0], [-4.0, 0.0, -4.0]]], [[[-2.0, 0.0, 5.0], 
+[0.0, 7.0, 2.0]], [[-4.0, -3.0, 0.0], [-6.0, 0.0, -6.0]], [[-4.0, 7.0, 7.0], [7.0, -5.0, -4.0]], [[-5.0, 5.0, 7.0], [-2.0, 
+-1.0, -1.0]], [[6.0, 4.0, -6.0], [0.0, 7.0, -2.0]]], [[[0.0, -5.0, 5.0], [-2.0, 0.0, 6.0]], [[2.0, -2.0, -2.0], [2.0, 2.0, 
+0.0]], [[-4.0, 7.0, 0.0], [-3.0, -2.0, 0.0]], [[5.0, 2.0, -2.0], [-6.0, -3.0, 5.0]], [[-4.0, -7.0, 2.0], [3.0, 6.0, 3.0]]], 
+[[[0.0, 1.0, 2.0], [1.0, -2.0, -2.0]], [[1.0, -1.0, -5.0], [-1.0, 5.0, -3.0]], [[3.0, 0.0, 0.0], [5.0, 2.0, -2.0]], [[1.0, 4.0, 
+0.0], [7.0, 2.0, -6.0]], [[3.0, -4.0, -5.0], [-4.0, 7.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 5.0, -6.0], [7.0, -3.0, 
+3.0]], [[6.0, -6.0, -3.0], [0.0, 3.0, -3.0]], [[-1.0, -3.0, -1.0], [-7.0, -6.0, 7.0]], [[-4.0, -1.0, -3.0], [0.0, -2.0, -4.0]], 
+[[5.0, -5.0, 2.0], [2.0, -5.0, -3.0]]], [[[-2.0, 3.0, -2.0], [6.0, 4.0, -3.0]], [[4.0, 3.0, 1.0], [6.0, -3.0, 2.0]], [[7.0, 
+-3.0, 7.0], [-1.0, 0.0, -5.0]], [[-6.0, -6.0, -3.0], [4.0, -2.0, 6.0]], [[1.0, -2.0, 2.0], [5.0, -1.0, 0.0]]], [[[-3.0, 1.0, 
+0.0], [-5.0, 0.0, 6.0]], [[6.0, 0.0, 1.0], [-2.0, 5.0, 5.0]], [[7.0, -1.0, 7.0], [-1.0, 5.0, 2.0]], [[5.0, 6.0, -3.0], [-4.0, 
+-5.0, 0.0]], [[-4.0, 3.0, -2.0], [-6.0, 1.0, -7.0]]], [[[0.0, 5.0, 7.0], [0.0, 6.0, 2.0]], [[1.0, -4.0, 5.0], [3.0, -1.0, 
+0.0]], [[2.0, 3.0, 2.0], [-2.0, 0.0, 6.0]], [[5.0, 0.0, 5.0], [3.0, -3.0, 0.0]], [[4.0, 0.0, 5.0], [1.0, 5.0, -5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[47.0, 51.0, -2.0, 61.0, 36.0], [-69.0, -9.0, -27.0, -29.0, 52.0], [-54.0, -4.0, 40.0, 69.0, 
+-94.0], [-4.0, 16.0, -14.0, -6.0, 8.0]])+(1.-msk_ref)*numpy.array([[67.0, -3.0, 34.0, 12.0, -10.0], [-11.0, 14.0, -40.0, -31.0, 
+-32.0], [11.0, -3.0, -50.0, 98.0, 31.0], [-48.0, -57.0, 13.0, -17.0, -46.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank3_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-4.0, -1.0], [0.0, 7.0]], [[-2.0, 0.0], [-7.0, 3.0]], [[5.0, -3.0], [2.0, -3.0]], [[0.0, 
+2.0], [0.0, 6.0]], [[6.0, 0.0], [7.0, 1.0]], [[-3.0, -7.0], [-4.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, 6.0], [-4.0, 
+-7.0]], [[0.0, -3.0], [6.0, 5.0]], [[-3.0, -7.0], [-4.0, -5.0]], [[0.0, 6.0], [4.0, 3.0]], [[6.0, 6.0], [-7.0, 3.0]], [[7.0, 
+-6.0], [-2.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-4.0, -1.0], [0.0, 7.0]], [[-2.0, 0.0], [-7.0, 3.0]], [[5.0, -3.0], [2.0, -3.0]], [[0.0, 2.0], 
+[0.0, 6.0]], [[6.0, 0.0], [7.0, 1.0]], [[-3.0, -7.0], [-4.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[-5.0, 6.0], [-4.0, -7.0]], 
+[[0.0, -3.0], [6.0, 5.0]], [[-3.0, -7.0], [-4.0, -5.0]], [[0.0, 6.0], [4.0, 3.0]], [[6.0, 6.0], [-7.0, 3.0]], [[7.0, -6.0], 
+[-2.0, 0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([0.0, 2.0, -6.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[5.0, -4.0, 0.0], [-2.0, 7.0, 0.0]], [[4.0, -2.0, -4.0], [-4.0, 1.0, -7.0]]], [[[5.0, -4.0, 
+-1.0], [-6.0, -4.0, -4.0]], [[-1.0, 5.0, -5.0], [-7.0, 7.0, -3.0]]], [[[6.0, -4.0, 0.0], [-1.0, 1.0, 7.0]], [[-3.0, -2.0, 6.0], 
+[2.0, 5.0, -2.0]]], [[[0.0, -6.0, 5.0], [-3.0, 0.0, 0.0]], [[2.0, 3.0, 6.0], [0.0, 5.0, 3.0]]], [[[5.0, 4.0, 0.0], [-2.0, -2.0, 
+-6.0]], [[0.0, 1.0, -7.0], [2.0, -3.0, -5.0]]], [[[0.0, -6.0, 5.0], [-6.0, 1.0, 7.0]], [[1.0, -4.0, 6.0], [3.0, -2.0, 
+-6.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 0.0, -7.0], [0.0, 7.0, 2.0]], [[-2.0, 6.0, 3.0], [6.0, 0.0, 0.0]]], [[[3.0, 1.0, 
+0.0], [-2.0, 0.0, 6.0]], [[6.0, 1.0, -3.0], [4.0, 3.0, -4.0]]], [[[-2.0, -3.0, 2.0], [-7.0, 7.0, 0.0]], [[5.0, 1.0, -6.0], 
+[1.0, 7.0, 4.0]]], [[[4.0, -6.0, -1.0], [-7.0, 0.0, 3.0]], [[-7.0, -6.0, 1.0], [6.0, -4.0, -5.0]]], [[[1.0, 6.0, 1.0], [-2.0, 
+-1.0, -7.0]], [[-2.0, -7.0, -7.0], [-5.0, -1.0, -7.0]]], [[[-5.0, 7.0, 2.0], [4.0, -4.0, 4.0]], [[-7.0, 2.0, -5.0], [5.0, -2.0, 
+-2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-8.0, 14.0], [20.0, 44.0]], [[-2.0, 16.0], [40.0, 32.0]], [[-8.0, -40.0], [-40.0, 22.0]], 
+[[-42.0, 0.0], [-30.0, -8.0]], [[8.0, 32.0], [44.0, 24.0]], [[-42.0, -40.0], [-44.0, 32.0]]])+(1.-msk_ref)*numpy.array([[[42.0, 
+2.0], [-6.0, 0.0]], [[2.0, -36.0], [20.0, 30.0]], [[-18.0, 14.0], [38.0, -10.0]], [[-6.0, -18.0], [-18.0, 22.0]], [[6.0, 40.0], 
+[28.0, 40.0]], [[2.0, -32.0], [34.0, 8.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank4_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-5.0, 3.0, 5.0, 3.0], [1.0, 2.0, -2.0, 7.0], [1.0, -2.0, 0.0, 3.0]], [[-5.0, -2.0, -7.0, 
+-7.0], [6.0, -4.0, 5.0, 2.0], [7.0, 5.0, 6.0, 1.0]]], [[[-6.0, -2.0, 7.0, 3.0], [2.0, 5.0, 0.0, 1.0], [4.0, -7.0, 5.0, 4.0]], 
+[[0.0, 6.0, 7.0, 0.0], [-3.0, -5.0, -1.0, -5.0], [-4.0, -3.0, 2.0, -4.0]]], [[[4.0, -3.0, 6.0, 0.0], [-3.0, 2.0, -6.0, 0.0], 
+[1.0, 1.0, 5.0, -2.0]], [[7.0, 2.0, 5.0, -2.0], [-5.0, -2.0, -7.0, 2.0], [-4.0, 0.0, 3.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 0.0, 0.0, 7.0], [-6.0, -4.0, 3.0, 4.0], [-5.0, 4.0, -6.0, 7.0]], [[5.0, -6.0, 
+-2.0, 6.0], [-4.0, -1.0, -6.0, 2.0], [4.0, 6.0, 1.0, -3.0]]], [[[-5.0, 3.0, 5.0, 2.0], [-1.0, -4.0, 5.0, 5.0], [-7.0, 3.0, 
+-4.0, 0.0]], [[-7.0, 1.0, -7.0, -5.0], [-4.0, 7.0, -2.0, 0.0], [5.0, 0.0, -5.0, -2.0]]], [[[-3.0, 2.0, -6.0, -2.0], [4.0, -3.0, 
+0.0, 7.0], [-4.0, 4.0, 5.0, -2.0]], [[0.0, -4.0, 7.0, 0.0], [3.0, 7.0, 5.0, 2.0], [6.0, -6.0, 6.0, 6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-30.0, 18.0, 30.0, 18.0], [6.0, 12.0, -12.0, 42.0], [6.0, -12.0, 0.0, 18.0]], [[-30.0, -12.0, 
+-42.0, -42.0], [36.0, -24.0, 30.0, 12.0], [42.0, 30.0, 36.0, 6.0]]], [[[-36.0, -12.0, 42.0, 18.0], [12.0, 30.0, 0.0, 6.0], 
+[24.0, -42.0, 30.0, 24.0]], [[0.0, 36.0, 42.0, 0.0], [-18.0, -30.0, -6.0, -30.0], [-24.0, -18.0, 12.0, -24.0]]], [[[24.0, 
+-18.0, 36.0, 0.0], [-18.0, 12.0, -36.0, 0.0], [6.0, 6.0, 30.0, -12.0]], [[42.0, 12.0, 30.0, -12.0], [-30.0, -12.0, -42.0, 
+12.0], [-24.0, 0.0, 18.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-30.0, 0.0, 0.0, 42.0], [-36.0, -24.0, 18.0, 24.0], [-30.0, 
+24.0, -36.0, 42.0]], [[30.0, -36.0, -12.0, 36.0], [-24.0, -6.0, -36.0, 12.0], [24.0, 36.0, 6.0, -18.0]]], [[[-30.0, 18.0, 30.0, 
+12.0], [-6.0, -24.0, 30.0, 30.0], [-42.0, 18.0, -24.0, 0.0]], [[-42.0, 6.0, -42.0, -30.0], [-24.0, 42.0, -12.0, 0.0], [30.0, 
+0.0, -30.0, -12.0]]], [[[-18.0, 12.0, -36.0, -12.0], [24.0, -18.0, 0.0, 42.0], [-24.0, 24.0, 30.0, -12.0]], [[0.0, -24.0, 42.0, 
+0.0], [18.0, 42.0, 30.0, 12.0], [36.0, -36.0, 36.0, 36.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_float_rank0_offset0(self):
+      arg0=Data(numpy.array([5.0, -3.0]),self.functionspace)
+      arg1=-6.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-30.0, 18.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank0_offset0(self):
+      arg0=Data(numpy.array([-4.0, 3.0]),self.functionspace)
+      arg1=numpy.array(-1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([4.0, -3.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[-3.0, 0.0, -2.0], [6.0, 5.0, 4.0]]),self.functionspace)
+      arg1=numpy.array([6.0, -4.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-18.0, 16.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[2.0, 2.0, 6.0], [3.0, 4.0, 5.0]], [[-3.0, 3.0, 1.0], [-6.0, 3.0, 6.0]]]),self.functionspace)
+      arg1=numpy.array([[0.0, -3.0, -4.0], [-7.0, 3.0, -7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-74.0, -4.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[6.0, -6.0, -5.0], [0.0, -5.0, -4.0], [6.0, -2.0, 5.0], [-7.0, -3.0, -5.0]], [[0.0, -1.0, 0.0], 
+[-2.0, 3.0, -5.0], [4.0, -5.0, 0.0], [2.0, 4.0, 0.0]]], [[[5.0, -6.0, -5.0], [2.0, -3.0, 2.0], [6.0, -3.0, -7.0], [0.0, -2.0, 
+-6.0]], [[2.0, 2.0, 0.0], [-7.0, 2.0, 6.0], [-4.0, 5.0, 4.0], [-3.0, 7.0, 3.0]]]]),self.functionspace)
+      arg1=numpy.array([[[-4.0, -1.0, -5.0], [-2.0, 7.0, 4.0], [7.0, -6.0, 0.0], [-2.0, 0.0, 6.0]], [[5.0, 7.0, -2.0], [7.0, 
+7.0, 2.0], [-3.0, 3.0, -5.0], [5.0, -5.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-53.0, -24.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank1_offset0(self):
+      arg0=Data(numpy.array([-4.0, 0.0]),self.functionspace)
+      arg1=numpy.array([4.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-16.0, 0.0], [0.0, 0.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[4.0, -5.0, 6.0], [2.0, -2.0, 6.0]]),self.functionspace)
+      arg1=numpy.array([[1.0, -3.0, -7.0], [0.0, -3.0, 7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-23.0, 57.0], [-34.0, 48.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, 3.0, 5.0], [-2.0, -7.0, 0.0]], [[4.0, 0.0, 4.0], [0.0, -5.0, -1.0]]]),self.functionspace)
+      arg1=numpy.array([[[-5.0, -1.0, 0.0], [1.0, -1.0, -3.0]], [[4.0, -3.0, 2.0], [-3.0, -6.0, 4.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[37.0, 21.0], [-12.0, 50.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[0.0, 7.0, 2.0], [3.0, 7.0, -5.0], [-7.0, 1.0, 0.0], [-7.0, 5.0, 5.0]], [[3.0, 5.0, -4.0], 
+[-6.0, 5.0, 0.0], [0.0, 0.0, 3.0], [-1.0, 5.0, -4.0]]], [[[1.0, 1.0, 4.0], [5.0, -3.0, -5.0], [-1.0, 6.0, -4.0], [0.0, 5.0, 
+3.0]], [[4.0, 0.0, -7.0], [3.0, 6.0, -7.0], [-3.0, -7.0, 1.0], [5.0, -1.0, -3.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[5.0, 0.0, 6.0], [-6.0, -2.0, -6.0], [2.0, 1.0, 2.0], [-5.0, -4.0, 7.0]], [[2.0, -5.0, -2.0], [3.0, 
+0.0, -7.0], [-7.0, 2.0, -7.0], [2.0, 5.0, -6.0]]], [[[7.0, -3.0, -1.0], [5.0, 3.0, 7.0], [-1.0, 3.0, 1.0], [6.0, -4.0, -4.0]], 
+[[7.0, 5.0, -1.0], [2.0, -3.0, 4.0], [-7.0, -2.0, -6.0], [-4.0, 2.0, 4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[44.0, -91.0], [135.0, -46.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank2_offset0(self):
+      arg0=Data(numpy.array([-5.0, -2.0]),self.functionspace)
+      arg1=numpy.array([[-2.0, -2.0, 0.0, 3.0, 6.0], [-3.0, 3.0, 4.0, -4.0, -3.0], [-2.0, -4.0, 0.0, -2.0, 5.0], [-3.0, 4.0, 
+-4.0, 2.0, -3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[10.0, 10.0, 0.0, -15.0, -30.0], [15.0, -15.0, -20.0, 20.0, 15.0], [10.0, 20.0, 0.0, 10.0, -25.0], 
+[15.0, -20.0, 20.0, -10.0, 15.0]], [[4.0, 4.0, 0.0, -6.0, -12.0], [6.0, -6.0, -8.0, 8.0, 6.0], [4.0, 8.0, 0.0, 4.0, -10.0], 
+[6.0, -8.0, 8.0, -4.0, 6.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[2.0, -3.0, 6.0], [0.0, -6.0, -2.0]]),self.functionspace)
+      arg1=numpy.array([[[-1.0, -2.0, 5.0], [6.0, 4.0, 7.0], [-5.0, 5.0, -1.0], [-6.0, 1.0, 3.0], [1.0, -1.0, 5.0]], [[0.0, 
+-5.0, -4.0], [-3.0, 0.0, -3.0], [-3.0, -2.0, 5.0], [2.0, 3.0, 2.0], [3.0, -3.0, 1.0]], [[0.0, -1.0, 3.0], [7.0, -6.0, 3.0], 
+[-7.0, 1.0, 1.0], [-7.0, 7.0, 4.0], [-1.0, 6.0, -6.0]], [[-4.0, -7.0, 0.0], [-3.0, 1.0, -2.0], [-1.0, 6.0, -1.0], [0.0, 2.0, 
+-7.0], [-5.0, 6.0, 3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[34.0, 42.0, -31.0, 3.0, 35.0], [-9.0, -24.0, 30.0, 7.0, 21.0], [21.0, 50.0, -11.0, -11.0, -56.0], 
+[13.0, -21.0, -26.0, -48.0, -10.0]], [[2.0, -38.0, -28.0, -12.0, -4.0], [38.0, 6.0, 2.0, -22.0, 16.0], [0.0, 30.0, -8.0, -50.0, 
+-24.0], [42.0, -2.0, -34.0, 2.0, -42.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[2.0, -2.0, -4.0], [7.0, 0.0, 1.0]], [[-6.0, 2.0, 3.0], [-2.0, 4.0, 0.0]]]),self.functionspace)
+      arg1=numpy.array([[[[2.0, 0.0, 3.0], [0.0, 0.0, -7.0]], [[7.0, -3.0, 5.0], [3.0, 2.0, -6.0]], [[3.0, 1.0, -7.0], [4.0, 
+-3.0, -1.0]], [[-3.0, -5.0, -7.0], [4.0, -7.0, -7.0]], [[-2.0, 3.0, 0.0], [6.0, -4.0, 3.0]]], [[[0.0, 1.0, -2.0], [-7.0, -5.0, 
+3.0]], [[7.0, -6.0, 6.0], [5.0, -7.0, 6.0]], [[-5.0, -1.0, 1.0], [-2.0, 3.0, 7.0]], [[-7.0, -5.0, 0.0], [-2.0, -4.0, 7.0]], 
+[[2.0, 0.0, 7.0], [-3.0, 0.0, 5.0]]], [[[-5.0, 0.0, 1.0], [2.0, 6.0, -2.0]], [[5.0, 4.0, 1.0], [6.0, 4.0, 5.0]], [[-6.0, 0.0, 
+0.0], [0.0, 7.0, -6.0]], [[-1.0, 5.0, 0.0], [-3.0, 3.0, -5.0]], [[-4.0, -6.0, 4.0], [1.0, 6.0, 2.0]]], [[[3.0, 1.0, 7.0], [0.0, 
+-2.0, 1.0]], [[1.0, 2.0, 4.0], [3.0, 1.0, -3.0]], [[-2.0, 5.0, 5.0], [-7.0, -2.0, 6.0]], [[4.0, 0.0, -5.0], [0.0, -6.0, 2.0]], 
+[[-1.0, -7.0, -4.0], [-4.0, -1.0, -6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-15.0, 15.0, 59.0, 53.0, 35.0], [-40.0, 43.0, -19.0, -11.0, -40.0], [-2.0, 45.0, -18.0, -38.0, 
+-3.0], [-23.0, 0.0, -77.0, 30.0, -6.0]], [[-3.0, -31.0, -57.0, -49.0, -10.0], [-10.0, -74.0, 47.0, 20.0, 15.0], [53.0, -15.0, 
+64.0, 34.0, 46.0], [-3.0, 8.0, 43.0, -63.0, -16.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_array_rank3_offset0(self):
+      arg0=Data(numpy.array([-3.0, 1.0]),self.functionspace)
+      arg1=numpy.array([[[5.0, 0.0], [4.0, 2.0]], [[-3.0, 6.0], [-2.0, 3.0]], [[4.0, 2.0], [-2.0, 3.0]], [[1.0, 3.0], [7.0, 
+-5.0]], [[6.0, 0.0], [4.0, -2.0]], [[4.0, -2.0], [0.0, -7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-15.0, 0.0], [-12.0, -6.0]], [[9.0, -18.0], [6.0, -9.0]], [[-12.0, -6.0], [6.0, -9.0]], [[-3.0, 
+-9.0], [-21.0, 15.0]], [[-18.0, 0.0], [-12.0, 6.0]], [[-12.0, 6.0], [0.0, 21.0]]], [[[5.0, 0.0], [4.0, 2.0]], [[-3.0, 6.0], 
+[-2.0, 3.0]], [[4.0, 2.0], [-2.0, 3.0]], [[1.0, 3.0], [7.0, -5.0]], [[6.0, 0.0], [4.0, -2.0]], [[4.0, -2.0], [0.0, 
+-7.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank4_offset1(self):
+      arg0=Data(numpy.array([[-1.0, 0.0, 2.0], [-6.0, -3.0, 5.0]]),self.functionspace)
+      arg1=numpy.array([[[[-5.0, 6.0, -1.0], [-6.0, 1.0, 4.0]], [[2.0, 3.0, -5.0], [2.0, -1.0, 0.0]]], [[[-5.0, 4.0, 5.0], 
+[0.0, -4.0, 3.0]], [[-2.0, 0.0, -6.0], [6.0, 0.0, 5.0]]], [[[2.0, 0.0, 7.0], [-6.0, 4.0, -3.0]], [[0.0, 3.0, -3.0], [-5.0, 0.0, 
+7.0]]], [[[-1.0, -6.0, -4.0], [0.0, 0.0, -2.0]], [[5.0, -5.0, 3.0], [0.0, -2.0, 0.0]]], [[[-1.0, -6.0, 7.0], [7.0, 3.0, -6.0]], 
+[[4.0, 4.0, 5.0], [7.0, 3.0, 3.0]]], [[[-2.0, 6.0, 0.0], [0.0, -6.0, 3.0]], [[1.0, -1.0, 7.0], [7.0, 2.0, -3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[3.0, 14.0], [-12.0, -2.0]], [[15.0, 6.0], [-10.0, 4.0]], [[12.0, 0.0], [-6.0, 19.0]], [[-7.0, 
+-4.0], [1.0, 0.0]], [[15.0, -19.0], [6.0, -1.0]], [[2.0, 6.0], [13.0, -13.0]]], [[[7.0, 53.0], [-46.0, -9.0]], [[43.0, 27.0], 
+[-18.0, -11.0]], [[23.0, 9.0], [-24.0, 65.0]], [[4.0, -10.0], [0.0, 6.0]], [[59.0, -81.0], [-11.0, -36.0]], [[-6.0, 33.0], 
+[32.0, -63.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([5.0, -5.0]),self.functionspace)
+      arg1=Data(-7.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-35.0, 35.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[-1.0, -3.0, -6.0], [0.0, -7.0, -5.0]]),self.functionspace)
+      arg1=Data(numpy.array([6.0, -1.0, 1.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-9.0, 2.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, -1.0, 3.0], [4.0, 0.0, 1.0]], [[-7.0, 5.0, -3.0], [-3.0, -5.0, 0.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[7.0, 2.0, -5.0], [2.0, 5.0, -4.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-13.0, -55.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, 0.0, -1.0], [5.0, -5.0, 0.0], [5.0, -7.0, -4.0], [-6.0, -6.0, 0.0]], [[4.0, 5.0, -1.0], 
+[1.0, -2.0, -3.0], [-7.0, -2.0, -3.0], [1.0, 0.0, -5.0]]], [[[-6.0, -2.0, 7.0], [6.0, -6.0, -1.0], [5.0, 7.0, -5.0], [6.0, 6.0, 
+1.0]], [[4.0, 4.0, -4.0], [0.0, 4.0, 0.0], [3.0, -7.0, -5.0], [3.0, 6.0, -7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[4.0, 6.0, -3.0], [7.0, 7.0, -5.0], [-1.0, 3.0, 2.0], [-7.0, -7.0, 7.0]], [[3.0, -6.0, -6.0], 
+[0.0, -5.0, 0.0], [-4.0, -3.0, 0.0], [-5.0, -1.0, 1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([91.0, -150.0]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([0.0, 1.0]),self.functionspace)
+      arg1=Data(numpy.array([5.0, -6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 0.0], [5.0, -6.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-6.0, -1.0, 4.0], [0.0, -3.0, -2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[3.0, -6.0, 7.0], [2.0, 1.0, 0.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[16.0, -13.0], [4.0, -3.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[2.0, 0.0, 2.0], [0.0, 0.0, 5.0]], [[1.0, 4.0, 0.0], [-7.0, 2.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 0.0, 0.0], [0.0, 3.0, -5.0]], [[2.0, -3.0, 3.0], [-5.0, 1.0, 4.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-29.0, 30.0], [-11.0, 39.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[0.0, -1.0, 7.0], [4.0, 0.0, 2.0], [7.0, 0.0, 7.0], [6.0, -3.0, -4.0]], [[-7.0, 0.0, 1.0], 
+[-2.0, -3.0, -6.0], [-4.0, 7.0, 5.0], [6.0, 5.0, 0.0]]], [[[7.0, -6.0, 2.0], [7.0, 5.0, 4.0], [4.0, 2.0, 0.0], [-7.0, 7.0, 
+0.0]], [[7.0, 6.0, 5.0], [7.0, -5.0, 6.0], [6.0, -7.0, -7.0], [-2.0, -2.0, -4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-6.0, -5.0, -7.0], [5.0, 2.0, 4.0], [5.0, 0.0, 0.0], [0.0, 5.0, -3.0]], [[0.0, 0.0, -2.0], 
+[-5.0, -1.0, -3.0], [2.0, 5.0, 3.0], [6.0, -6.0, -6.0]]], [[[7.0, -7.0, 5.0], [-5.0, -7.0, -5.0], [6.0, -1.0, 0.0], [6.0, -5.0, 
+-7.0]], [[-1.0, 7.0, 0.0], [7.0, -2.0, 6.0], [2.0, -3.0, 4.0], [0.0, -5.0, -3.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[93.0, 62.0], [12.0, 113.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([1.0, -7.0]),self.functionspace)
+      arg1=Data(numpy.array([[7.0, -4.0, 1.0, 4.0, 7.0], [4.0, 1.0, -2.0, 5.0, -4.0], [2.0, -3.0, 2.0, 5.0, 6.0], [-7.0, -4.0, 
+0.0, -1.0, 0.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[7.0, -4.0, 1.0, 4.0, 7.0], [4.0, 1.0, -2.0, 5.0, -4.0], [2.0, -3.0, 2.0, 5.0, 6.0], [-7.0, -4.0, 
+0.0, -1.0, 0.0]], [[-49.0, 28.0, -7.0, -28.0, -49.0], [-28.0, -7.0, 14.0, -35.0, 28.0], [-14.0, 21.0, -14.0, -35.0, -42.0], 
+[49.0, 28.0, 0.0, 7.0, 0.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[7.0, 5.0, 3.0], [0.0, 2.0, -3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[6.0, 5.0, -2.0], [6.0, 6.0, 2.0], [0.0, -2.0, -2.0], [-6.0, -4.0, 7.0], [4.0, 2.0, 2.0]], [[0.0, 
+-6.0, -4.0], [-2.0, -5.0, 2.0], [4.0, -7.0, -4.0], [-6.0, 3.0, -2.0], [-2.0, -3.0, 1.0]], [[-1.0, 5.0, 0.0], [-4.0, -6.0, 
+-3.0], [-1.0, -3.0, 2.0], [-5.0, 3.0, 1.0], [3.0, -5.0, -5.0]], [[-5.0, 0.0, 7.0], [0.0, -5.0, -5.0], [3.0, 0.0, 4.0], [0.0, 
+-3.0, 7.0], [-4.0, 7.0, 1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[61.0, 78.0, -16.0, -41.0, 44.0], [-42.0, -33.0, -19.0, -33.0, -26.0], [18.0, -67.0, -16.0, -17.0, 
+-19.0], [-14.0, -40.0, 33.0, 6.0, 10.0]], [[16.0, 6.0, 2.0, -29.0, -2.0], [0.0, -16.0, -2.0, 12.0, -9.0], [10.0, -3.0, -12.0, 
+3.0, 5.0], [-21.0, 5.0, -12.0, -27.0, 11.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 1.0, 3.0], [-5.0, -1.0, -3.0]], [[-3.0, 1.0, -3.0], [-6.0, -5.0, 2.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[7.0, 0.0, -2.0], [0.0, -3.0, 1.0]], [[1.0, 4.0, 5.0], [6.0, -2.0, 1.0]], [[-1.0, -7.0, -2.0], 
+[-1.0, 1.0, 6.0]], [[-2.0, 1.0, -1.0], [-7.0, 2.0, 0.0]], [[-4.0, 1.0, 6.0], [3.0, -7.0, -6.0]]], [[[-5.0, -5.0, 4.0], [-1.0, 
+5.0, 1.0]], [[-4.0, -6.0, 4.0], [-7.0, -4.0, 1.0]], [[-3.0, 3.0, -7.0], [5.0, 0.0, 5.0]], [[1.0, -2.0, -4.0], [0.0, 0.0, 
+-3.0]], [[-2.0, 4.0, 4.0], [7.0, -6.0, 0.0]]], [[[2.0, 5.0, -4.0], [4.0, -2.0, -5.0]], [[-7.0, 2.0, -7.0], [-3.0, 0.0, 1.0]], 
+[[0.0, -1.0, -5.0], [-1.0, -1.0, 0.0]], [[0.0, 6.0, -3.0], [4.0, -7.0, 4.0]], [[0.0, 1.0, -6.0], [0.0, -6.0, -1.0]]], [[[-7.0, 
+-1.0, 5.0], [-6.0, -2.0, 2.0]], [[0.0, 3.0, -4.0], [2.0, 2.0, 6.0]], [[-2.0, 4.0, -3.0], [4.0, 4.0, 1.0]], [[3.0, -6.0, 6.0], 
+[3.0, -1.0, -4.0]], [[7.0, -4.0, 7.0], [2.0, 3.0, -6.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-6.0, -12.0, -27.0, 31.0, 29.0], [4.0, 42.0, -58.0, -5.0, -13.0], [-10.0, -7.0, -10.0, -28.0, 
+-8.0], [40.0, -39.0, -32.0, 10.0, 22.0]], [[2.0, -38.0, 15.0, 42.0, 0.0], [-19.0, 58.0, 13.0, 1.0, -14.0], [-13.0, 64.0, 25.0, 
+34.0, 47.0], [55.0, 5.0, -23.0, -54.0, -85.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_constData_rank3_offset0(self):
+      arg0=Data(numpy.array([0.0, 2.0]),self.functionspace)
+      arg1=Data(numpy.array([[[0.0, 0.0], [5.0, 0.0]], [[5.0, -4.0], [-4.0, 7.0]], [[-5.0, -2.0], [2.0, 0.0]], [[-6.0, -6.0], 
+[1.0, -4.0]], [[5.0, 1.0], [-1.0, -4.0]], [[-2.0, -2.0], [6.0, -5.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [10.0, 0.0]], [[10.0, -8.0], [-8.0, 14.0]], [[-10.0, 
+-4.0], [4.0, 0.0]], [[-12.0, -12.0], [2.0, -8.0]], [[10.0, 2.0], [-2.0, -8.0]], [[-4.0, -4.0], [12.0, 
+-10.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([[-4.0, -4.0, -2.0], [1.0, -6.0, -2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[3.0, -7.0, 4.0], [2.0, 2.0, 2.0]], [[0.0, -6.0, -1.0], [-5.0, -5.0, 2.0]]], [[[-2.0, -3.0, 
+-2.0], [4.0, 0.0, 4.0]], [[-1.0, -1.0, -3.0], [-1.0, -6.0, 3.0]]], [[[5.0, -6.0, -3.0], [4.0, 2.0, -4.0]], [[-7.0, 7.0, -7.0], 
+[-2.0, 7.0, 1.0]]], [[[6.0, 2.0, 4.0], [-3.0, 5.0, 1.0]], [[-3.0, -1.0, 6.0], [-5.0, 0.0, 0.0]]], [[[-7.0, 0.0, 0.0], [0.0, 
+-7.0, -6.0]], [[-4.0, -2.0, 0.0], [-6.0, 7.0, -5.0]]], [[[5.0, 4.0, 0.0], [-7.0, -1.0, -7.0]], [[0.0, 2.0, -5.0], [-3.0, 3.0, 
+5.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[8.0, -20.0], [26.0, 36.0]], [[24.0, -24.0], [14.0, 22.0]], [[10.0, -16.0], [14.0, -22.0]], 
+[[-40.0, -10.0], [4.0, 20.0]], [[28.0, 40.0], [24.0, 6.0]], [[-36.0, 46.0], [2.0, -10.0]]], [[[37.0, -14.0], [38.0, 21.0]], 
+[[20.0, -4.0], [11.0, 29.0]], [[47.0, 0.0], [-35.0, -46.0]], [[-14.0, -35.0], [-9.0, -5.0]], [[-7.0, 54.0], [8.0, -38.0]], 
+[[-19.0, 13.0], [-2.0, -31.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([0.0, 5.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-0.0, -15.0])+(1.-msk_ref)*numpy.array([-0.0, -5.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[4.0, -5.0, -3.0], [0.0, -4.0, -2.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([0.0, 0.0, -7.0])+(1.-msk_arg1)*numpy.array([-6.0, 6.0, 4.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([21.0, 14.0])+(1.-msk_ref)*numpy.array([-66.0, -32.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[4.0, -6.0, 1.0], [6.0, -7.0, -4.0]], [[-1.0, 0.0, -2.0], [-3.0, 0.0, -7.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[0.0, 6.0, 3.0], [0.0, -5.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -7.0, 7.0], [6.0, -7.0, 
+6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([18.0, 22.0])+(1.-msk_ref)*numpy.array([82.0, -67.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-1.0, -3.0, 7.0], [-7.0, -6.0, -3.0], [0.0, 1.0, 0.0], [7.0, 7.0, 3.0]], [[2.0, -4.0, 6.0], 
+[3.0, -2.0, 0.0], [5.0, 7.0, 4.0], [-1.0, -1.0, 7.0]]], [[[-3.0, 0.0, 0.0], [3.0, 0.0, -6.0], [0.0, 4.0, -6.0], [-4.0, 1.0, 
+-1.0]], [[0.0, 2.0, 6.0], [0.0, 3.0, 2.0], [4.0, -6.0, -5.0], [-6.0, -7.0, 5.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[7.0, 2.0, 6.0], [6.0, -5.0, 0.0], [-1.0, -4.0, 5.0], [7.0, 0.0, -5.0]], [[-7.0, -3.0, -3.0], 
+[-4.0, 0.0, -3.0], [0.0, 3.0, 6.0], [-1.0, 0.0, -5.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 2.0, -6.0], [-4.0, 6.0, -4.0], 
+[6.0, 2.0, -4.0], [3.0, 7.0, 7.0]], [[5.0, -7.0, -3.0], [-2.0, -7.0, 2.0], [7.0, 6.0, 0.0], [-1.0, -1.0, 1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([26.0, -169.0])+(1.-msk_ref)*numpy.array([170.0, 14.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([2.0, 1.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([6.0, 4.0])+(1.-msk_arg1)*numpy.array([2.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[12.0, 8.0], [6.0, 4.0]])+(1.-msk_ref)*numpy.array([[4.0, 14.0], [2.0, 7.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-1.0, -4.0, -3.0], [4.0, -2.0, 4.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-4.0, 2.0, -5.0], [3.0, 4.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-5.0, -6.0, 4.0], [3.0, 6.0, 
+6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[11.0, -19.0], [-40.0, 4.0]])+(1.-msk_ref)*numpy.array([[17.0, -45.0], [8.0, 24.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-3.0, -7.0, 4.0], [6.0, 3.0, -5.0]], [[3.0, -6.0, -1.0], [-2.0, -5.0, 
+-1.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-5.0, 6.0, -6.0], [4.0, 7.0, -3.0]], [[1.0, 2.0, 1.0], [2.0, 0.0, 
+-7.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, 2.0, -1.0], [1.0, -4.0, -1.0]], [[-5.0, 2.0, 4.0], [-6.0, 3.0, 3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[9.0, 34.0], [-85.0, -7.0]])+(1.-msk_ref)*numpy.array([[-16.0, -25.0], [5.0, -37.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[0.0, 5.0, -3.0], [-4.0, 7.0, 4.0], [0.0, 5.0, 7.0], [-7.0, 0.0, -4.0]], [[-4.0, -6.0, -5.0], 
+[5.0, 3.0, -6.0], [0.0, 7.0, -3.0], [-1.0, 7.0, -7.0]]], [[[5.0, 5.0, -5.0], [-1.0, 7.0, -5.0], [-7.0, 7.0, -7.0], [3.0, -6.0, 
+7.0]], [[1.0, -7.0, -5.0], [5.0, 5.0, -6.0], [0.0, 5.0, 7.0], [-6.0, 6.0, 4.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[2.0, -4.0, 2.0], [6.0, -2.0, 4.0], [6.0, -6.0, -6.0], [-5.0, -1.0, 2.0]], [[6.0, 5.0, 
+-6.0], [-6.0, 2.0, 4.0], [2.0, 4.0, 0.0], [3.0, 1.0, 2.0]]], [[[1.0, 1.0, 6.0], [-4.0, 4.0, 1.0], [-4.0, 6.0, -4.0], [6.0, 
+-3.0, -3.0]], [[-4.0, 7.0, 7.0], [0.0, -3.0, 5.0], [-1.0, 7.0, -7.0], [-5.0, 6.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 
+-3.0, -1.0], [2.0, 7.0, -1.0], [-3.0, 4.0, -2.0], [-5.0, 4.0, 6.0]], [[-7.0, -4.0, -2.0], [4.0, -3.0, -1.0], [1.0, 0.0, -5.0], 
+[-6.0, -3.0, 7.0]]], [[[-4.0, -2.0, 3.0], [4.0, 0.0, 3.0], [0.0, 0.0, 6.0], [-6.0, -4.0, -2.0]], [[-3.0, 2.0, 0.0], [-6.0, 
+-1.0, -5.0], [-4.0, -5.0, 5.0], [-1.0, -7.0, 5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-147.0, 3.0], [-124.0, 51.0]])+(1.-msk_ref)*numpy.array([[72.0, -67.0], [161.0, -142.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([-5.0, -4.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, 3.0, -2.0, -5.0, -5.0], [5.0, -7.0, 3.0, -1.0, -1.0], [7.0, -7.0, -4.0, -1.0, 3.0], 
+[1.0, 3.0, 4.0, -5.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 4.0, -5.0, -5.0, 0.0], [2.0, 4.0, 0.0, 5.0, 3.0], [-7.0, 1.0, 
+5.0, 0.0, 6.0], [-2.0, 0.0, 5.0, 1.0, 7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[30.0, -15.0, 10.0, 25.0, 25.0], [-25.0, 35.0, -15.0, 5.0, 5.0], [-35.0, 35.0, 20.0, 5.0, 
+-15.0], [-5.0, -15.0, -20.0, 25.0, 0.0]], [[24.0, -12.0, 8.0, 20.0, 20.0], [-20.0, 28.0, -12.0, 4.0, 4.0], [-28.0, 28.0, 16.0, 
+4.0, -12.0], [-4.0, -12.0, -16.0, 20.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[15.0, -20.0, 25.0, 25.0, 0.0], [-10.0, -20.0, 0.0, 
+-25.0, -15.0], [35.0, -5.0, -25.0, 0.0, -30.0], [10.0, 0.0, -25.0, -5.0, -35.0]], [[12.0, -16.0, 20.0, 20.0, 0.0], [-8.0, 
+-16.0, 0.0, -20.0, -12.0], [28.0, -4.0, -20.0, 0.0, -24.0], [8.0, 0.0, -20.0, -4.0, -28.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-5.0, -1.0, 5.0], [-1.0, 6.0, -4.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[2.0, -2.0, -3.0], [-7.0, -4.0, -6.0], [5.0, 0.0, 4.0], [-5.0, 2.0, 2.0], [1.0, -7.0, 4.0]], 
+[[-4.0, 7.0, -1.0], [-4.0, -2.0, 2.0], [-1.0, -5.0, -6.0], [0.0, -3.0, 7.0], [2.0, 3.0, -7.0]], [[0.0, -7.0, -2.0], [2.0, 0.0, 
+-7.0], [4.0, 5.0, -4.0], [7.0, 4.0, -2.0], [4.0, -3.0, -2.0]], [[0.0, 1.0, 2.0], [0.0, 1.0, 2.0], [-5.0, 4.0, 4.0], [3.0, 6.0, 
+1.0], [6.0, -7.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -6.0, 4.0], [-7.0, 6.0, -2.0], [-4.0, -6.0, -7.0], [2.0, -2.0, 
+2.0], [-4.0, -6.0, -3.0]], [[-3.0, 0.0, -7.0], [-5.0, 0.0, 5.0], [-5.0, 6.0, 3.0], [-3.0, 3.0, -1.0], [7.0, 4.0, 2.0]], [[-2.0, 
+6.0, -5.0], [6.0, 7.0, -3.0], [-6.0, -1.0, -5.0], [6.0, 6.0, -4.0], [3.0, 1.0, 2.0]], [[7.0, 2.0, 5.0], [-3.0, -3.0, 4.0], 
+[-7.0, 3.0, 0.0], [-2.0, -5.0, -2.0], [0.0, -2.0, 1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-23.0, 9.0, -5.0, 33.0, 22.0], [8.0, 32.0, -20.0, 38.0, -48.0], [-3.0, -45.0, -45.0, -49.0, 
+-27.0], [9.0, 9.0, 41.0, -16.0, -23.0]], [[-2.0, 7.0, -21.0, 9.0, -59.0], [50.0, -16.0, -5.0, -46.0, 44.0], [-34.0, 26.0, 42.0, 
+25.0, -14.0], [-2.0, -2.0, 13.0, 29.0, -48.0]]])+(1.-msk_ref)*numpy.array([[[21.0, 19.0, -9.0, 2.0, 11.0], [-20.0, 50.0, 34.0, 
+7.0, -29.0], [-21.0, -52.0, 6.0, -56.0, -6.0], [-12.0, 38.0, 32.0, 5.0, 7.0]], [[-53.0, 51.0, -4.0, -22.0, -20.0], [31.0, 
+-15.0, 29.0, 25.0, 9.0], [58.0, 48.0, 20.0, 46.0, -5.0], [-15.0, -31.0, 25.0, -20.0, -16.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg1.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-5.0, 6.0, 1.0], [-5.0, 6.0, 5.0]], [[-4.0, 5.0, 3.0], [4.0, -6.0, 0.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-2.0, -6.0, 5.0], [-4.0, -1.0, 2.0]], [[0.0, 2.0, 5.0], [-3.0, 6.0, -1.0]], [[0.0, 0.0, 
+-7.0], [-1.0, -7.0, 2.0]], [[0.0, -6.0, 0.0], [-7.0, -2.0, 6.0]], [[-7.0, -4.0, -5.0], [2.0, 6.0, 0.0]]], [[[-4.0, 4.0, -4.0], 
+[-2.0, -2.0, 0.0]], [[-4.0, -7.0, 0.0], [-3.0, 0.0, 0.0]], [[4.0, -4.0, 7.0], [4.0, 4.0, 5.0]], [[4.0, 7.0, 6.0], [-6.0, 1.0, 
+3.0]], [[1.0, -2.0, 3.0], [-7.0, 2.0, -3.0]]], [[[-5.0, -5.0, -5.0], [5.0, 5.0, 6.0]], [[1.0, -3.0, -3.0], [0.0, -2.0, 0.0]], 
+[[6.0, 6.0, -2.0], [0.0, -4.0, -6.0]], [[4.0, -7.0, 5.0], [3.0, 7.0, -5.0]], [[-7.0, 4.0, -4.0], [-3.0, 2.0, -6.0]]], [[[0.0, 
+5.0, 7.0], [0.0, -3.0, 2.0]], [[2.0, 0.0, -2.0], [-5.0, 0.0, 5.0]], [[3.0, -3.0, 6.0], [0.0, 0.0, 7.0]], [[-1.0, -2.0, -1.0], 
+[0.0, 7.0, -6.0]], [[6.0, -3.0, 2.0], [3.0, -7.0, -7.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -5.0, 5.0], [6.0, 7.0, 0.0]], 
+[[0.0, -2.0, -2.0], [-4.0, -2.0, -3.0]], [[6.0, 0.0, 1.0], [-7.0, 6.0, -2.0]], [[7.0, -7.0, 6.0], [3.0, 5.0, -7.0]], [[-5.0, 
+0.0, 4.0], [-5.0, -3.0, 6.0]]], [[[6.0, 3.0, 1.0], [7.0, 6.0, 6.0]], [[1.0, 0.0, 5.0], [-3.0, 3.0, -4.0]], [[-2.0, -5.0, 2.0], 
+[-7.0, 5.0, -4.0]], [[0.0, 5.0, -3.0], [4.0, 0.0, 7.0]], [[-2.0, 4.0, -3.0], [0.0, -1.0, -5.0]]], [[[5.0, 5.0, 3.0], [-6.0, 
+1.0, 4.0]], [[6.0, -5.0, 1.0], [-4.0, -1.0, 0.0]], [[2.0, 2.0, -2.0], [-4.0, -2.0, 5.0]], [[0.0, 1.0, 7.0], [-4.0, 4.0, -5.0]], 
+[[-7.0, -7.0, -7.0], [4.0, 7.0, 0.0]]], [[[1.0, 7.0, -1.0], [0.0, 2.0, 1.0]], [[6.0, 2.0, -2.0], [3.0, 0.0, 6.0]], [[3.0, -6.0, 
+1.0], [-4.0, -1.0, 5.0]], [[6.0, -4.0, -5.0], [-3.0, 5.0, 3.0]], [[7.0, 7.0, 0.0], [0.0, 3.0, -2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[3.0, 63.0, -34.0, 17.0, 32.0], [38.0, -7.0, -8.0, 79.0, 18.0], [25.0, -38.0, -50.0, -55.0, 
+52.0], [29.0, 38.0, 8.0, 4.0, -138.0]], [[-17.0, -23.0, 17.0, -46.0, -35.0], [28.0, -31.0, -23.0, 7.0, -45.0], [-30.0, -16.0, 
+24.0, -66.0, 12.0], [64.0, -34.0, -9.0, -51.0, 21.0]]])+(1.-msk_ref)*numpy.array([[[-13.0, -21.0, 32.0, -91.0, 66.0], [20.0, 
+13.0, 27.0, 42.0, 0.0], [64.0, -45.0, 33.0, 32.0, 8.0], [53.0, -5.0, -11.0, 1.0, 15.0]], [[-28.0, -20.0, -85.0, -63.0, 30.0], 
+[-14.0, -19.0, -69.0, 32.0, 25.0], [-16.0, -56.0, -8.0, -14.0, -54.0], [16.0, -8.0, -49.0, -101.0, -11.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-5.0, 1.0]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-2.0, 0.0], [1.0, 4.0]], [[-3.0, -1.0], [-7.0, 3.0]], [[-2.0, 6.0], [7.0, -3.0]], [[0.0, 
+-2.0], [0.0, -6.0]], [[2.0, -3.0], [5.0, 0.0]], [[1.0, 0.0], [1.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 2.0], [1.0, 
+-5.0]], [[6.0, 7.0], [7.0, 3.0]], [[2.0, -2.0], [3.0, -5.0]], [[-2.0, 0.0], [-1.0, -5.0]], [[-7.0, -4.0], [-5.0, 3.0]], [[0.0, 
+4.0], [2.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[10.0, 0.0], [-5.0, -20.0]], [[15.0, 5.0], [35.0, -15.0]], [[10.0, -30.0], [-35.0, 15.0]], 
+[[0.0, 10.0], [0.0, 30.0]], [[-10.0, 15.0], [-25.0, 0.0]], [[-5.0, 0.0], [-5.0, -10.0]]], [[[-2.0, 0.0], [1.0, 4.0]], [[-3.0, 
+-1.0], [-7.0, 3.0]], [[-2.0, 6.0], [7.0, -3.0]], [[0.0, -2.0], [0.0, -6.0]], [[2.0, -3.0], [5.0, 0.0]], [[1.0, 0.0], [1.0, 
+2.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, -10.0], [-5.0, 25.0]], [[-30.0, -35.0], [-35.0, -15.0]], [[-10.0, 10.0], [-15.0, 
+25.0]], [[10.0, 0.0], [5.0, 25.0]], [[35.0, 20.0], [25.0, -15.0]], [[0.0, -20.0], [-10.0, -10.0]]], [[[1.0, 2.0], [1.0, -5.0]], 
+[[6.0, 7.0], [7.0, 3.0]], [[2.0, -2.0], [3.0, -5.0]], [[-2.0, 0.0], [-1.0, -5.0]], [[-7.0, -4.0], [-5.0, 3.0]], [[0.0, 4.0], 
+[2.0, 2.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[5.0, -5.0, -4.0], [2.0, 1.0, 0.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-1.0, 7.0, -5.0], [-3.0, 1.0, 1.0]], [[-1.0, 1.0, 7.0], [2.0, 4.0, -1.0]]], [[[0.0, -7.0, 
+-6.0], [-1.0, 1.0, 6.0]], [[-7.0, 6.0, 4.0], [3.0, -4.0, -1.0]]], [[[-4.0, -1.0, 6.0], [-4.0, -2.0, 4.0]], [[7.0, -6.0, -6.0], 
+[0.0, -4.0, -1.0]]], [[[-5.0, 4.0, 4.0], [0.0, 5.0, -3.0]], [[-1.0, -7.0, 7.0], [-6.0, 3.0, 4.0]]], [[[-6.0, 4.0, -3.0], [-5.0, 
+-6.0, 0.0]], [[3.0, 0.0, 4.0], [-2.0, 5.0, 6.0]]], [[[-3.0, -3.0, 2.0], [0.0, 0.0, -6.0]], [[7.0, -1.0, -4.0], [-6.0, 5.0, 
+7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -7.0, 1.0], [2.0, 6.0, -3.0]], [[4.0, 5.0, -6.0], [0.0, 1.0, -3.0]]], [[[-3.0, 
+-7.0, 2.0], [-3.0, -6.0, 6.0]], [[1.0, 1.0, 5.0], [7.0, -6.0, 1.0]]], [[[7.0, 1.0, -6.0], [4.0, 5.0, -3.0]], [[1.0, -4.0, 1.0], 
+[-2.0, 5.0, 5.0]]], [[[-5.0, 3.0, -5.0], [0.0, 7.0, 3.0]], [[7.0, 2.0, -7.0], [-2.0, 2.0, 3.0]]], [[[1.0, -6.0, -3.0], [-1.0, 
+-7.0, 1.0]], [[-6.0, 5.0, 0.0], [7.0, 1.0, 5.0]]], [[[-6.0, 1.0, -6.0], [-3.0, 0.0, 1.0]], [[-4.0, 2.0, -3.0], [-2.0, 0.0, 
+4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-20.0, -24.0], [-38.0, -6.0]], [[59.0, -34.0], [-81.0, 39.0]], [[-39.0, -26.0], [89.0, 
+24.0]], [[-61.0, -13.0], [2.0, -61.0]], [[-38.0, 5.0], [-1.0, -59.0]], [[-8.0, 24.0], [56.0, -83.0]]], [[[5.0, -5.0], [-1.0, 
+8.0]], [[-7.0, -1.0], [-8.0, 2.0]], [[-9.0, -10.0], [8.0, -4.0]], [[-6.0, 5.0], [-9.0, -9.0]], [[-8.0, -16.0], [6.0, 1.0]], 
+[[-9.0, 0.0], [13.0, -7.0]]]])+(1.-msk_ref)*numpy.array([[[[11.0, -8.0], [19.0, 7.0]], [[12.0, -9.0], [-20.0, 61.0]], [[54.0, 
+7.0], [21.0, -55.0]], [[-20.0, -47.0], [53.0, -32.0]], [[47.0, 26.0], [-55.0, 10.0]], [[-11.0, -19.0], [-18.0, -26.0]]], 
+[[[-15.0, 10.0], [13.0, 1.0]], [[-13.0, -12.0], [3.0, 8.0]], [[15.0, 13.0], [-2.0, 1.0]], [[-7.0, 7.0], [16.0, -2.0]], [[-4.0, 
+-9.0], [-7.0, 15.0]], [[-11.0, -6.0], [-6.0, -4.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[0.0, 5.0, -1.0, -1.0, -2.0], [7.0, -7.0, 3.0, -4.0, -5.0], [5.0, -6.0, 1.0, 7.0, -1.0], [7.0, 
+-1.0, -5.0, -2.0, -6.0]]),self.functionspace)
+      arg1=1.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 5.0, -1.0, -1.0, -2.0], [7.0, -7.0, 3.0, -4.0, -5.0], [5.0, -6.0, 1.0, 7.0, -1.0], [7.0, 
+-1.0, -5.0, -2.0, -6.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[1.0, -2.0, 5.0, 7.0, 7.0], [2.0, 2.0, 0.0, -2.0, -7.0], [-2.0, -7.0, 3.0, 4.0, -7.0], [0.0, -3.0, 
+2.0, -3.0, -7.0]]),self.functionspace)
+      arg1=numpy.array(-2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-2.0, 4.0, -10.0, -14.0, -14.0], [-4.0, -4.0, -0.0, 4.0, 14.0], [4.0, 14.0, -6.0, -8.0, 14.0], 
+[-0.0, 6.0, -4.0, 6.0, 14.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-3.0, -3.0, 7.0], [-3.0, 0.0, 3.0], [4.0, 5.0, 7.0], [3.0, 3.0, 0.0], [2.0, 5.0, 3.0]], [[-3.0, 
+2.0, -5.0], [-4.0, 1.0, 0.0], [1.0, -5.0, -5.0], [1.0, -7.0, 2.0], [4.0, 7.0, 3.0]], [[7.0, 0.0, 7.0], [-1.0, -3.0, -5.0], 
+[-3.0, -6.0, 7.0], [-4.0, 7.0, -7.0], [2.0, 7.0, 4.0]], [[-4.0, 0.0, -3.0], [7.0, 6.0, -2.0], [7.0, -4.0, 0.0], [2.0, 3.0, 
+-1.0], [3.0, -2.0, -2.0]]]),self.functionspace)
+      arg1=numpy.array([-2.0, 6.0, -3.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-33.0, -3.0, 1.0, 12.0, 17.0], [33.0, 14.0, -17.0, -50.0, 25.0], [-35.0, -1.0, -51.0, 71.0, 26.0], 
+[17.0, 28.0, -38.0, 17.0, -12.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, 2.0, -5.0], [0.0, 5.0, 0.0]], [[-1.0, 3.0, 7.0], [-1.0, 6.0, 2.0]], [[5.0, -2.0, 6.0], 
+[3.0, 3.0, -5.0]], [[-7.0, -1.0, 4.0], [6.0, 0.0, -6.0]], [[-5.0, -5.0, -2.0], [4.0, -2.0, 1.0]]], [[[-3.0, -3.0, -1.0], [-5.0, 
+-3.0, 6.0]], [[-4.0, -2.0, 0.0], [5.0, -6.0, 0.0]], [[6.0, -7.0, -5.0], [0.0, -5.0, -7.0]], [[-7.0, 4.0, 2.0], [2.0, -5.0, 
+-1.0]], [[0.0, 5.0, -5.0], [-6.0, -3.0, -3.0]]], [[[0.0, 0.0, 5.0], [0.0, 0.0, 0.0]], [[-7.0, 2.0, -4.0], [5.0, 6.0, -6.0]], 
+[[4.0, 6.0, -1.0], [0.0, -6.0, -7.0]], [[-2.0, 3.0, -4.0], [5.0, 4.0, -4.0]], [[-1.0, 0.0, -7.0], [-5.0, 2.0, -5.0]]], [[[4.0, 
+4.0, -5.0], [1.0, -2.0, -7.0]], [[6.0, 5.0, -4.0], [7.0, 7.0, -2.0]], [[7.0, 0.0, -7.0], [-5.0, -7.0, 0.0]], [[-3.0, 4.0, 0.0], 
+[0.0, 5.0, 2.0]], [[7.0, -4.0, -1.0], [-2.0, -1.0, -1.0]]]]),self.functionspace)
+      arg1=numpy.array([[-7.0, -5.0, -6.0], [-6.0, 3.0, -2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[7.0, -30.0, -60.0, 6.0, 40.0], [51.0, -10.0, 22.0, -8.0, 38.0], [-30.0, 63.0, -56.0, 13.0, 95.0], 
+[-16.0, -60.0, 2.0, 12.0, -12.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[-1.0, 3.0, -6.0, -5.0, -7.0], [7.0, 0.0, -2.0, -5.0, -1.0], [3.0, 5.0, 7.0, 6.0, 3.0], [2.0, 3.0, 
+-3.0, 0.0, 5.0]]),self.functionspace)
+      arg1=numpy.array([0.0, -2.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 2.0], [0.0, -6.0], [0.0, 12.0], [0.0, 10.0], [0.0, 14.0]], [[0.0, -14.0], [0.0, 0.0], [0.0, 
+4.0], [0.0, 10.0], [0.0, 2.0]], [[0.0, -6.0], [0.0, -10.0], [0.0, -14.0], [0.0, -12.0], [0.0, -6.0]], [[0.0, -4.0], [0.0, 
+-6.0], [0.0, 6.0], [0.0, 0.0], [0.0, -10.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[4.0, -1.0, -4.0], [-5.0, -1.0, 5.0], [5.0, 0.0, 3.0], [7.0, 1.0, 1.0], [-2.0, 0.0, 5.0]], 
+[[-3.0, -2.0, 1.0], [6.0, 2.0, -5.0], [-1.0, -1.0, 2.0], [0.0, 4.0, -4.0], [-6.0, 5.0, 6.0]], [[3.0, -7.0, -4.0], [-7.0, -2.0, 
+-5.0], [1.0, -6.0, 0.0], [4.0, 4.0, -7.0], [-3.0, 7.0, -3.0]], [[-2.0, -7.0, 7.0], [-6.0, -4.0, 6.0], [-7.0, -1.0, -3.0], [5.0, 
+-3.0, 5.0], [3.0, 2.0, 2.0]]]),self.functionspace)
+      arg1=numpy.array([[7.0, -6.0, -7.0], [-7.0, 0.0, 2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[62.0, -36.0], [-64.0, 45.0], [14.0, -29.0], [36.0, -47.0], [-49.0, 24.0]], [[-16.0, 23.0], [65.0, 
+-52.0], [-15.0, 11.0], [4.0, -8.0], [-114.0, 54.0]], [[91.0, -29.0], [-2.0, 39.0], [43.0, -7.0], [53.0, -42.0], [-42.0, 15.0]], 
+[[-21.0, 28.0], [-60.0, 54.0], [-22.0, 43.0], [18.0, -25.0], [-5.0, -17.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[1.0, 2.0, 4.0], [0.0, -2.0, -1.0]], [[4.0, -2.0, 0.0], [4.0, -4.0, 4.0]], [[1.0, 1.0, -2.0], 
+[3.0, 6.0, 6.0]], [[5.0, -5.0, -1.0], [4.0, -6.0, 4.0]], [[-7.0, 0.0, 0.0], [-3.0, -6.0, -2.0]]], [[[0.0, 7.0, -3.0], [-1.0, 
+-4.0, 0.0]], [[2.0, 1.0, 2.0], [7.0, 0.0, 3.0]], [[3.0, 1.0, 0.0], [-6.0, 0.0, 7.0]], [[-4.0, -7.0, -4.0], [-2.0, 0.0, -7.0]], 
+[[-6.0, -4.0, 5.0], [3.0, 6.0, -5.0]]], [[[-6.0, 5.0, 5.0], [0.0, 7.0, -3.0]], [[7.0, -1.0, 6.0], [7.0, 7.0, 7.0]], [[5.0, 5.0, 
+1.0], [0.0, 1.0, 6.0]], [[7.0, 4.0, 0.0], [2.0, 6.0, 5.0]], [[-1.0, -6.0, -1.0], [6.0, -3.0, -1.0]]], [[[-7.0, -7.0, -5.0], 
+[-2.0, -3.0, 6.0]], [[4.0, 0.0, -6.0], [4.0, 0.0, 0.0]], [[3.0, 0.0, 5.0], [0.0, 0.0, 4.0]], [[6.0, -3.0, 3.0], [-6.0, 0.0, 
+-7.0]], [[1.0, -4.0, -1.0], [7.0, -6.0, -3.0]]]]),self.functionspace)
+      arg1=numpy.array([[[6.0, 0.0, -2.0], [6.0, 5.0, 5.0]], [[0.0, 5.0, 6.0], [0.0, 7.0, 6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-17.0, 14.0], [48.0, -14.0], [88.0, 71.0], [46.0, -49.0], [-100.0, -54.0]], [[-20.0, -11.0], 
+[65.0, 35.0], [17.0, 47.0], [-63.0, -101.0], [-23.0, 22.0]], [[-26.0, 86.0], [142.0, 122.0], [63.0, 74.0], [109.0, 92.0], 
+[12.0, -63.0]], [[-29.0, -50.0], [60.0, -36.0], [28.0, 54.0], [-41.0, -39.0], [5.0, -86.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_array_rank2_offset0(self):
+      arg0=Data(numpy.array([[-4.0, -1.0, -3.0, 3.0, 6.0], [5.0, 1.0, -2.0, 0.0, -6.0], [-1.0, -6.0, 0.0, -3.0, 0.0], [5.0, 
+-7.0, 4.0, 3.0, 0.0]]),self.functionspace)
+      arg1=numpy.array([[0.0, -2.0, 5.0, 0.0, 3.0], [1.0, -3.0, -4.0, -2.0, 2.0], [4.0, 6.0, -4.0, 7.0, -1.0], [5.0, -7.0, 
+-1.0, 4.0, 4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 8.0, -20.0, 0.0, -12.0], [-4.0, 12.0, 16.0, 8.0, -8.0], [-16.0, -24.0, 16.0, -28.0, 4.0], 
+[-20.0, 28.0, 4.0, -16.0, -16.0]], [[0.0, 2.0, -5.0, 0.0, -3.0], [-1.0, 3.0, 4.0, 2.0, -2.0], [-4.0, -6.0, 4.0, -7.0, 1.0], 
+[-5.0, 7.0, 1.0, -4.0, -4.0]], [[0.0, 6.0, -15.0, 0.0, -9.0], [-3.0, 9.0, 12.0, 6.0, -6.0], [-12.0, -18.0, 12.0, -21.0, 3.0], 
+[-15.0, 21.0, 3.0, -12.0, -12.0]], [[0.0, -6.0, 15.0, 0.0, 9.0], [3.0, -9.0, -12.0, -6.0, 6.0], [12.0, 18.0, -12.0, 21.0, 
+-3.0], [15.0, -21.0, -3.0, 12.0, 12.0]], [[0.0, -12.0, 30.0, 0.0, 18.0], [6.0, -18.0, -24.0, -12.0, 12.0], [24.0, 36.0, -24.0, 
+42.0, -6.0], [30.0, -42.0, -6.0, 24.0, 24.0]]], [[[0.0, -10.0, 25.0, 0.0, 15.0], [5.0, -15.0, -20.0, -10.0, 10.0], [20.0, 30.0, 
+-20.0, 35.0, -5.0], [25.0, -35.0, -5.0, 20.0, 20.0]], [[0.0, -2.0, 5.0, 0.0, 3.0], [1.0, -3.0, -4.0, -2.0, 2.0], [4.0, 6.0, 
+-4.0, 7.0, -1.0], [5.0, -7.0, -1.0, 4.0, 4.0]], [[0.0, 4.0, -10.0, 0.0, -6.0], [-2.0, 6.0, 8.0, 4.0, -4.0], [-8.0, -12.0, 8.0, 
+-14.0, 2.0], [-10.0, 14.0, 2.0, -8.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 12.0, -30.0, 0.0, -18.0], [-6.0, 18.0, 24.0, 12.0, -12.0], [-24.0, -36.0, 24.0, -42.0, 6.0], 
+[-30.0, 42.0, 6.0, -24.0, -24.0]]], [[[0.0, 2.0, -5.0, 0.0, -3.0], [-1.0, 3.0, 4.0, 2.0, -2.0], [-4.0, -6.0, 4.0, -7.0, 1.0], 
+[-5.0, 7.0, 1.0, -4.0, -4.0]], [[0.0, 12.0, -30.0, 0.0, -18.0], [-6.0, 18.0, 24.0, 12.0, -12.0], [-24.0, -36.0, 24.0, -42.0, 
+6.0], [-30.0, 42.0, 6.0, -24.0, -24.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 6.0, -15.0, 0.0, -9.0], [-3.0, 9.0, 12.0, 6.0, -6.0], [-12.0, -18.0, 12.0, -21.0, 3.0], 
+[-15.0, 21.0, 3.0, -12.0, -12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]], [[[0.0, -10.0, 25.0, 0.0, 15.0], [5.0, -15.0, -20.0, -10.0, 10.0], [20.0, 30.0, -20.0, 35.0, -5.0], [25.0, 
+-35.0, -5.0, 20.0, 20.0]], [[0.0, 14.0, -35.0, 0.0, -21.0], [-7.0, 21.0, 28.0, 14.0, -14.0], [-28.0, -42.0, 28.0, -49.0, 7.0], 
+[-35.0, 49.0, 7.0, -28.0, -28.0]], [[0.0, -8.0, 20.0, 0.0, 12.0], [4.0, -12.0, -16.0, -8.0, 8.0], [16.0, 24.0, -16.0, 28.0, 
+-4.0], [20.0, -28.0, -4.0, 16.0, 16.0]], [[0.0, -6.0, 15.0, 0.0, 9.0], [3.0, -9.0, -12.0, -6.0, 6.0], [12.0, 18.0, -12.0, 21.0, 
+-3.0], [15.0, -21.0, -3.0, 12.0, 12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[[0.0, 1.0, -3.0], [5.0, -1.0, 0.0], [-2.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 6.0, 7.0]], [[0.0, 
+5.0, 0.0], [3.0, 4.0, -6.0], [-3.0, 5.0, 6.0], [-7.0, 0.0, -6.0], [-3.0, -2.0, 3.0]], [[2.0, -3.0, 1.0], [-4.0, 7.0, -4.0], 
+[-5.0, 6.0, 1.0], [-1.0, 3.0, -1.0], [-7.0, 2.0, -3.0]], [[0.0, 5.0, 4.0], [1.0, 1.0, 0.0], [4.0, 1.0, 6.0], [0.0, -4.0, -6.0], 
+[6.0, -7.0, -4.0]]]),self.functionspace)
+      arg1=numpy.array([[[6.0, 0.0, 4.0], [5.0, -4.0, 4.0], [-5.0, -7.0, 5.0], [-6.0, 3.0, -4.0], [-5.0, 4.0, 2.0]], [[6.0, 
+4.0, 1.0], [6.0, -7.0, 0.0], [-5.0, -1.0, -4.0], [4.0, -5.0, -6.0], [1.0, 7.0, 0.0]], [[-3.0, -5.0, 5.0], [5.0, -4.0, -2.0], 
+[2.0, 6.0, -2.0], [-2.0, -6.0, 3.0], [-5.0, 5.0, -2.0]], [[-1.0, 1.0, 4.0], [0.0, -6.0, 5.0], [-4.0, -6.0, 5.0], [0.0, 5.0, 
+2.0], [-2.0, -1.0, -1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-12.0, -16.0, -22.0, 15.0, -2.0], [1.0, -7.0, 11.0, 13.0, 7.0], [-20.0, 2.0, 12.0, -15.0, 11.0], 
+[-11.0, -21.0, -21.0, -1.0, 2.0]], [[30.0, 29.0, -18.0, -33.0, -29.0], [26.0, 37.0, -24.0, 25.0, -2.0], [-10.0, 29.0, 4.0, 
+-4.0, -30.0], [-6.0, 6.0, -14.0, -5.0, -9.0]], [[-12.0, -10.0, 10.0, 12.0, 10.0], [-12.0, -12.0, 10.0, -8.0, -2.0], [6.0, 
+-10.0, -4.0, 4.0, 10.0], [2.0, 0.0, 8.0, 0.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[28.0, 4.0, -7.0, -10.0, 38.0], [31.0, -42.0, -34.0, -72.0, 42.0], [5.0, -38.0, 22.0, 
+-15.0, 16.0], [34.0, -1.0, -1.0, 44.0, -13.0]]], [[[0.0, -20.0, -35.0, 15.0, 20.0], [20.0, -35.0, -5.0, -25.0, 35.0], [-25.0, 
+-20.0, 30.0, -30.0, 25.0], [5.0, -30.0, -30.0, 25.0, -5.0]], [[-6.0, -25.0, -73.0, 18.0, -11.0], [28.0, -10.0, 5.0, 28.0, 
+31.0], [-59.0, 11.0, 42.0, -48.0, 17.0], [-23.0, -54.0, -66.0, 8.0, -4.0]], [[6.0, -11.0, 10.0, 9.0, 47.0], [8.0, -53.0, -14.0, 
+-73.0, 32.0], [14.0, -47.0, 12.0, -6.0, 28.0], [32.0, 0.0, 12.0, 37.0, -5.0]], [[-66.0, -59.0, 5.0, 66.0, 23.0], [-48.0, -42.0, 
+59.0, 8.0, -7.0], [-9.0, -23.0, -2.0, -4.0, 47.0], [-17.0, -30.0, -2.0, -12.0, 20.0]], [[-6.0, 5.0, 44.0, 0.0, 13.0], [-23.0, 
+-4.0, 5.0, -20.0, -17.0], [34.0, -13.0, -24.0, 27.0, -1.0], [13.0, 27.0, 39.0, -4.0, 5.0]]], [[[16.0, 26.0, 16.0, -25.0, 
+-20.0], [1.0, 33.0, -11.0, 17.0, -19.0], [14.0, 20.0, -16.0, 17.0, -27.0], [-1.0, 23.0, 15.0, -13.0, -2.0]], [[-40.0, -64.0, 
+-49.0, 61.0, 40.0], [0.0, -73.0, 29.0, -27.0, 45.0], [-43.0, -40.0, 42.0, -46.0, 63.0], [-5.0, -62.0, -46.0, 27.0, 5.0]], 
+[[-26.0, -45.0, -12.0, 44.0, 51.0], [-5.0, -72.0, 15.0, -56.0, 37.0], [-10.0, -51.0, 24.0, -23.0, 53.0], [15.0, -31.0, -11.0, 
+32.0, 3.0]], [[-10.0, -21.0, -21.0, 19.0, 15.0], [5.0, -27.0, 6.0, -13.0, 20.0], [-17.0, -15.0, 18.0, -19.0, 22.0], [0.0, 
+-23.0, -19.0, 13.0, 0.0]], [[-54.0, -55.0, 6.0, 60.0, 37.0], [-37.0, -56.0, 45.0, -20.0, 7.0], [-4.0, -37.0, 4.0, -7.0, 51.0], 
+[-3.0, -27.0, 1.0, 4.0, 15.0]]], [[[16.0, -4.0, -15.0, -1.0, 28.0], [24.0, -35.0, -21.0, -49.0, 35.0], [-5.0, -28.0, 22.0, 
+-18.0, 17.0], [21.0, -10.0, -10.0, 33.0, -9.0]], [[6.0, 1.0, -12.0, -3.0, -1.0], [10.0, -1.0, -6.0, -1.0, 8.0], [-8.0, 1.0, 
+8.0, -8.0, 0.0], [0.0, -6.0, -10.0, 5.0, -3.0]], [[48.0, 40.0, 3.0, -45.0, -4.0], [34.0, 17.0, -45.0, -25.0, 11.0], [13.0, 4.0, 
+2.0, 4.0, -27.0], [21.0, 24.0, 8.0, 17.0, -15.0]], [[-24.0, -8.0, -2.0, 12.0, -28.0], [-22.0, 28.0, 28.0, 56.0, -28.0], [-10.0, 
+28.0, -12.0, 6.0, -8.0], [-28.0, -6.0, -6.0, -32.0, 10.0]], [[20.0, 42.0, -1.0, -41.0, -66.0], [4.0, 85.0, -7.0, 83.0, -43.0], 
+[-3.0, 66.0, -22.0, 18.0, -57.0], [-29.0, 22.0, -2.0, -43.0, -1.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-2.0, 6.0, 1.0], [6.0, 1.0, 5.0]], [[-5.0, 3.0, 0.0], [4.0, 3.0, 7.0]], [[-7.0, -7.0, 1.0], 
+[7.0, 0.0, -7.0]], [[-1.0, 6.0, -5.0], [-5.0, 3.0, -7.0]], [[-3.0, -1.0, 7.0], [-5.0, -4.0, 0.0]]], [[[-1.0, -2.0, -1.0], [3.0, 
+5.0, 3.0]], [[-6.0, -2.0, 6.0], [2.0, -7.0, 7.0]], [[0.0, 6.0, -4.0], [3.0, -5.0, 1.0]], [[3.0, -5.0, 7.0], [-4.0, 7.0, -2.0]], 
+[[-6.0, 5.0, -1.0], [-4.0, 4.0, 3.0]]], [[[4.0, 0.0, -5.0], [4.0, 7.0, 4.0]], [[-6.0, 3.0, 5.0], [0.0, 4.0, -5.0]], [[-7.0, 
+4.0, -3.0], [-5.0, 4.0, -3.0]], [[-7.0, -7.0, -6.0], [7.0, 6.0, 0.0]], [[-6.0, 4.0, 4.0], [2.0, -5.0, -7.0]]], [[[7.0, 0.0, 
+4.0], [-3.0, 0.0, 3.0]], [[-2.0, -5.0, 3.0], [0.0, -3.0, -6.0]], [[-6.0, 7.0, -1.0], [-7.0, -2.0, 2.0]], [[1.0, 5.0, 4.0], 
+[7.0, 6.0, -3.0]], [[0.0, 3.0, -3.0], [0.0, -6.0, -3.0]]]]),self.functionspace)
+      arg1=numpy.array([[[[0.0, -2.0, -1.0], [-2.0, 0.0, -2.0]], [[1.0, -3.0, -1.0], [3.0, -7.0, -3.0]], [[-1.0, -7.0, 0.0], 
+[2.0, -2.0, 1.0]], [[-2.0, 4.0, 2.0], [-3.0, 7.0, 7.0]], [[3.0, 1.0, -6.0], [-3.0, 0.0, 1.0]]], [[[4.0, 5.0, -4.0], [-3.0, 
+-2.0, 0.0]], [[-4.0, 3.0, -7.0], [-6.0, -4.0, 6.0]], [[-4.0, 3.0, -4.0], [2.0, 0.0, 7.0]], [[5.0, -3.0, 6.0], [-3.0, -5.0, 
+1.0]], [[0.0, 7.0, -4.0], [5.0, 5.0, 5.0]]], [[[-3.0, 0.0, 0.0], [4.0, 3.0, -2.0]], [[0.0, 4.0, 3.0], [-1.0, -2.0, 1.0]], 
+[[6.0, -5.0, -2.0], [-5.0, 0.0, 6.0]], [[0.0, 3.0, 6.0], [-5.0, -5.0, -6.0]], [[-2.0, -1.0, -1.0], [4.0, 6.0, 2.0]]], [[[4.0, 
+-3.0, 7.0], [-1.0, 5.0, 3.0]], [[-4.0, 4.0, -3.0], [4.0, -5.0, 0.0]], [[-6.0, 2.0, -7.0], [5.0, 7.0, 6.0]], [[5.0, -6.0, -7.0], 
+[3.0, 4.0, -2.0]], [[-7.0, 5.0, 5.0], [7.0, -3.0, 1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-35.0, -25.0, -25.0, 54.0, -19.0], [-2.0, 9.0, 69.0, -40.0, 98.0], [23.0, 24.0, -44.0, -41.0, 
+37.0], [-5.0, 48.0, 84.0, -41.0, 93.0]], [[-28.0, -44.0, -7.0, 80.0, -17.0], [-23.0, 35.0, 86.0, -54.0, 91.0], [26.0, 9.0, 
+-23.0, -68.0, 55.0], [3.0, 33.0, 119.0, -33.0, 76.0]], [[13.0, 55.0, 63.0, -82.0, -62.0], [-88.0, -84.0, -32.0, -36.0, -53.0], 
+[63.0, -39.0, -86.0, -8.0, 34.0], [-28.0, 25.0, 14.0, 35.0, 61.0]], [[17.0, -29.0, -64.0, 3.0, 41.0], [55.0, 33.0, -17.0, 
+-60.0, 17.0], [6.0, 1.0, -43.0, 40.0, -15.0], [-58.0, 8.0, 7.0, 5.0, -39.0]], [[5.0, 6.0, 8.0, 3.0, -37.0], [-22.0, 6.0, -29.0, 
+65.0, -80.0], [-23.0, 30.0, -2.0, 84.0, -44.0], [25.0, -13.0, -86.0, -89.0, 28.0]]], [[[-7.0, -29.0, 14.0, 39.0, -5.0], [-29.0, 
+-15.0, 29.0, -36.0, 45.0], [24.0, -21.0, 9.0, -70.0, 53.0], [26.0, -14.0, 77.0, 37.0, 1.0]], [[-20.0, 28.0, 45.0, 10.0, -55.0], 
+[-50.0, 34.0, 47.0, 48.0, -28.0], [-9.0, 29.0, -6.0, 13.0, -12.0], [8.0, 41.0, -7.0, -96.0, 104.0]], [[-16.0, 27.0, -25.0, 
+-21.0, 22.0], [47.0, 54.0, 47.0, -25.0, 53.0], [-5.0, 20.0, -31.0, -2.0, -18.0], [-71.0, 73.0, 26.0, -21.0, 47.0]], [[15.0, 
+-44.0, 8.0, 35.0, -28.0], [-43.0, -92.0, -77.0, 47.0, -58.0], [0.0, -11.0, 37.0, 24.0, 14.0], [109.0, -104.0, -60.0, 16.0, 
+-62.0]], [[-7.0, -69.0, -42.0, 91.0, 8.0], [9.0, 72.0, 56.0, -56.0, 54.0], [8.0, 16.0, -21.0, -9.0, 22.0], [-13.0, 11.0, 79.0, 
+-55.0, 25.0]]], [[[-11.0, -40.0, -6.0, 47.0, 34.0], [10.0, -9.0, 40.0, -53.0, 95.0], [17.0, -29.0, 38.0, -109.0, 63.0], [24.0, 
+-20.0, 104.0, 87.0, -42.0]], [[-1.0, -33.0, -28.0, 27.0, -50.0], [-37.0, -48.0, -22.0, -34.0, -4.0], [40.0, 14.0, -91.0, 49.0, 
+18.0], [7.0, 1.0, 5.0, -57.0, 65.0]], [[11.0, -50.0, -42.0, 46.0, 13.0], [11.0, 57.0, 21.0, -73.0, 20.0], [19.0, 1.0, -49.0, 
+17.0, 11.0], [-45.0, 13.0, 56.0, -31.0, 4.0]], [[6.0, -1.0, 58.0, -5.0, -13.0], [-72.0, -17.0, 45.0, -101.0, 40.0], [67.0, 
+-65.0, -30.0, -122.0, 91.0], [-26.0, 16.0, 147.0, 94.0, 15.0]], [[-2.0, 40.0, -15.0, -54.0, -51.0], [-16.0, -26.0, -25.0, -6.0, 
+-38.0], [25.0, 29.0, -116.0, 93.0, -32.0], [-56.0, 61.0, -51.0, -82.0, 104.0]]], [[[-4.0, -15.0, -10.0, 24.0, 9.0], [21.0, 
+-20.0, -29.0, 71.0, -16.0], [-39.0, 18.0, 67.0, 21.0, -24.0], [68.0, -52.0, -67.0, -8.0, -47.0]], [[19.0, 49.0, 37.0, -73.0, 
+-35.0], [-39.0, -52.0, -61.0, 32.0, -92.0], [9.0, -11.0, -29.0, 54.0, -24.0], [-5.0, -6.0, -76.0, -1.0, 7.0]], [[-3.0, -39.0, 
+-51.0, 59.0, 18.0], [40.0, 114.0, 49.0, -24.0, 18.0], [-20.0, 38.0, -22.0, 48.0, -30.0], [-49.0, 37.0, 20.0, -98.0, 31.0]], 
+[[-22.0, -30.0, -37.0, 26.0, -40.0], [-20.0, -101.0, -12.0, -40.0, 69.0], [49.0, 10.0, -80.0, -8.0, 47.0], [31.0, 2.0, 35.0, 
+-2.0, 66.0]], [[3.0, 45.0, -12.0, -57.0, 18.0], [39.0, 36.0, 0.0, 0.0, -12.0], [-12.0, 12.0, -27.0, 39.0, -42.0], [-69.0, 51.0, 
+-33.0, -15.0, 15.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[7.0, 7.0, -3.0, -6.0, -4.0], [2.0, 1.0, 5.0, 1.0, -3.0], [3.0, 0.0, 1.0, -2.0, -7.0], [6.0, -1.0, 
+3.0, 4.0, 1.0]]),self.functionspace)
+      arg1=Data(3.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[21.0, 21.0, -9.0, -18.0, -12.0], [6.0, 3.0, 15.0, 3.0, -9.0], [9.0, 0.0, 3.0, -6.0, -21.0], [18.0, 
+-3.0, 9.0, 12.0, 3.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-4.0, 0.0, -3.0], [-3.0, 3.0, 7.0], [3.0, -2.0, -5.0], [7.0, -2.0, -4.0], [-7.0, -5.0, 5.0]], 
+[[-1.0, 0.0, -7.0], [5.0, 2.0, 2.0], [-4.0, 5.0, 3.0], [-5.0, 6.0, 7.0], [2.0, 2.0, 3.0]], [[-5.0, -6.0, -2.0], [-7.0, 0.0, 
+6.0], [-7.0, 0.0, -4.0], [-5.0, 1.0, 1.0], [0.0, -1.0, -1.0]], [[-7.0, 4.0, 4.0], [-4.0, 5.0, 3.0], [0.0, 3.0, 7.0], [-1.0, 
+-4.0, 5.0], [0.0, -2.0, -3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-6.0, 3.0, -5.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[39.0, -8.0, 1.0, -28.0, 2.0], [41.0, -34.0, 24.0, 13.0, -21.0], [22.0, 12.0, 62.0, 28.0, 2.0], 
+[34.0, 24.0, -26.0, -31.0, 9.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[1.0, 4.0, -6.0], [-3.0, 2.0, 1.0]], [[-3.0, 1.0, -5.0], [-3.0, -2.0, 0.0]], [[0.0, 7.0, -6.0], 
+[-3.0, 0.0, -7.0]], [[-6.0, 7.0, -3.0], [6.0, 4.0, 1.0]], [[3.0, 2.0, -2.0], [0.0, 7.0, -1.0]]], [[[-1.0, -2.0, 0.0], [7.0, 
+4.0, -6.0]], [[1.0, -6.0, 5.0], [7.0, 6.0, 1.0]], [[0.0, 2.0, 4.0], [3.0, 3.0, -1.0]], [[-3.0, 0.0, 4.0], [1.0, -2.0, 3.0]], 
+[[-3.0, -3.0, -4.0], [-7.0, 7.0, 2.0]]], [[[-7.0, 3.0, 2.0], [-4.0, 4.0, 4.0]], [[-3.0, -6.0, 3.0], [7.0, -4.0, 3.0]], [[5.0, 
+1.0, 0.0], [-6.0, -3.0, -6.0]], [[-6.0, -1.0, -2.0], [-5.0, 6.0, 3.0]], [[5.0, -6.0, -5.0], [-1.0, 5.0, -5.0]]], [[[3.0, 4.0, 
+-6.0], [6.0, 2.0, -3.0]], [[3.0, 6.0, 5.0], [3.0, 0.0, -7.0]], [[0.0, -3.0, -7.0], [-6.0, -4.0, 4.0]], [[1.0, 4.0, 2.0], [-3.0, 
+7.0, -7.0]], [[6.0, 0.0, 4.0], [5.0, 0.0, -1.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[6.0, -5.0, -7.0], [3.0, 6.0, -6.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[25.0, -9.0, 40.0, -14.0, 70.0], [85.0, 52.0, -5.0, -73.0, 34.0], [-83.0, -30.0, 25.0, -14.0, 
+152.0], [88.0, 4.0, -2.0, 47.0, 29.0]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[0.0, -7.0, -5.0, -3.0, 0.0], [5.0, -3.0, 3.0, -6.0, 0.0], [-3.0, -4.0, 6.0, 7.0, 6.0], [2.0, 
+-2.0, -4.0, -5.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([-7.0, -2.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0], [49.0, 14.0], [35.0, 10.0], [21.0, 6.0], [0.0, 0.0]], [[-35.0, -10.0], [21.0, 6.0], 
+[-21.0, -6.0], [42.0, 12.0], [0.0, 0.0]], [[21.0, 6.0], [28.0, 8.0], [-42.0, -12.0], [-49.0, -14.0], [-42.0, -12.0]], [[-14.0, 
+-4.0], [14.0, 4.0], [28.0, 8.0], [35.0, 10.0], [0.0, 0.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -4.0, -3.0], [1.0, 0.0, 5.0], [5.0, -7.0, -6.0], [3.0, -6.0, 4.0], [1.0, 0.0, -7.0]], 
+[[-2.0, -2.0, 3.0], [-7.0, 0.0, 0.0], [5.0, 0.0, 0.0], [7.0, 6.0, -5.0], [-6.0, -4.0, 0.0]], [[0.0, 5.0, -2.0], [6.0, -1.0, 
+-7.0], [2.0, 7.0, -3.0], [0.0, 1.0, 2.0], [6.0, 7.0, -7.0]], [[-4.0, -5.0, 1.0], [-4.0, 4.0, 1.0], [-5.0, -5.0, 0.0], [6.0, 
+-7.0, 0.0], [2.0, 0.0, -1.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[4.0, -4.0, -5.0], [-4.0, 2.0, -4.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[31.0, 4.0], [-21.0, -24.0], [78.0, -10.0], [16.0, -40.0], [39.0, 24.0]], [[-15.0, -8.0], [-28.0, 
+28.0], [20.0, -20.0], [29.0, 4.0], [-8.0, 16.0]], [[-10.0, 18.0], [63.0, 2.0], [-5.0, 18.0], [-14.0, -6.0], [31.0, 18.0]], 
+[[-1.0, 2.0], [-37.0, 20.0], [0.0, 10.0], [52.0, -38.0], [13.0, -4.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-3.0, -6.0, 4.0], [5.0, 7.0, -5.0]], [[4.0, 1.0, -4.0], [3.0, -5.0, 6.0]], [[0.0, -6.0, 4.0], 
+[0.0, 0.0, -3.0]], [[7.0, -2.0, -7.0], [-5.0, 2.0, -3.0]], [[-3.0, -1.0, -5.0], [1.0, 3.0, 4.0]]], [[[1.0, -4.0, 2.0], [-3.0, 
+3.0, -2.0]], [[-7.0, 2.0, 0.0], [-2.0, 5.0, 7.0]], [[7.0, 0.0, -5.0], [4.0, -2.0, -6.0]], [[0.0, -7.0, -4.0], [3.0, -3.0, 
+-4.0]], [[0.0, -6.0, 4.0], [-2.0, 0.0, -5.0]]], [[[7.0, 5.0, -5.0], [6.0, 5.0, 4.0]], [[5.0, -1.0, 3.0], [7.0, 5.0, 3.0]], 
+[[0.0, 1.0, -5.0], [-1.0, -1.0, 0.0]], [[-3.0, -1.0, -2.0], [5.0, -2.0, 4.0]], [[-4.0, 3.0, 4.0], [-4.0, -1.0, 2.0]]], [[[5.0, 
+0.0, 0.0], [-5.0, 5.0, 5.0]], [[-7.0, -7.0, -6.0], [2.0, -3.0, 7.0]], [[-3.0, -1.0, 2.0], [-2.0, -7.0, 2.0]], [[-5.0, -7.0, 
+0.0], [-1.0, -4.0, 2.0]], [[-2.0, 0.0, 0.0], [-4.0, 0.0, -7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[5.0, -6.0, 3.0], [-4.0, -3.0, 3.0]], [[7.0, 1.0, 5.0], [7.0, 7.0, 6.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-23.0, 47.0], [23.0, 31.0], [39.0, -4.0], [31.0, -27.0], [-25.0, 5.0]], [[32.0, 1.0], [-33.0, 
+16.0], [-8.0, 2.0], [15.0, -51.0], [41.0, -30.0]], [[-37.0, 130.0], [6.0, 151.0], [-14.0, -38.0], [-17.0, 13.0], [-1.0, 
+-28.0]], [[45.0, 65.0], [11.0, -51.0], [32.0, -63.0], [39.0, -65.0], [-15.0, -84.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([[4.0, 0.0, 4.0, -2.0, -5.0], [-6.0, -7.0, 0.0, 0.0, 2.0], [-4.0, 5.0, 7.0, -7.0, 0.0], [0.0, 0.0, 
+-1.0, 0.0, -6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[5.0, 1.0, -6.0, -4.0, 1.0], [-3.0, -1.0, 0.0, -4.0, -5.0], [2.0, 4.0, 1.0, 4.0, 4.0], [-2.0, 4.0, 
+6.0, -4.0, -2.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[20.0, 4.0, -24.0, -16.0, 4.0], [-12.0, -4.0, 0.0, -16.0, -20.0], [8.0, 16.0, 4.0, 16.0, 16.0], 
+[-8.0, 16.0, 24.0, -16.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[20.0, 4.0, -24.0, -16.0, 4.0], [-12.0, -4.0, 0.0, -16.0, -20.0], [8.0, 16.0, 4.0, 16.0, 16.0], [-8.0, 16.0, 
+24.0, -16.0, -8.0]], [[-10.0, -2.0, 12.0, 8.0, -2.0], [6.0, 2.0, 0.0, 8.0, 10.0], [-4.0, -8.0, -2.0, -8.0, -8.0], [4.0, -8.0, 
+-12.0, 8.0, 4.0]], [[-25.0, -5.0, 30.0, 20.0, -5.0], [15.0, 5.0, 0.0, 20.0, 25.0], [-10.0, -20.0, -5.0, -20.0, -20.0], [10.0, 
+-20.0, -30.0, 20.0, 10.0]]], [[[-30.0, -6.0, 36.0, 24.0, -6.0], [18.0, 6.0, 0.0, 24.0, 30.0], [-12.0, -24.0, -6.0, -24.0, 
+-24.0], [12.0, -24.0, -36.0, 24.0, 12.0]], [[-35.0, -7.0, 42.0, 28.0, -7.0], [21.0, 7.0, 0.0, 28.0, 35.0], [-14.0, -28.0, -7.0, 
+-28.0, -28.0], [14.0, -28.0, -42.0, 28.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[10.0, 2.0, -12.0, -8.0, 2.0], [-6.0, -2.0, 0.0, -8.0, -10.0], [4.0, 8.0, 2.0, 8.0, 8.0], [-4.0, 8.0, 12.0, 
+-8.0, -4.0]]], [[[-20.0, -4.0, 24.0, 16.0, -4.0], [12.0, 4.0, 0.0, 16.0, 20.0], [-8.0, -16.0, -4.0, -16.0, -16.0], [8.0, -16.0, 
+-24.0, 16.0, 8.0]], [[25.0, 5.0, -30.0, -20.0, 5.0], [-15.0, -5.0, 0.0, -20.0, -25.0], [10.0, 20.0, 5.0, 20.0, 20.0], [-10.0, 
+20.0, 30.0, -20.0, -10.0]], [[35.0, 7.0, -42.0, -28.0, 7.0], [-21.0, -7.0, 0.0, -28.0, -35.0], [14.0, 28.0, 7.0, 28.0, 28.0], 
+[-14.0, 28.0, 42.0, -28.0, -14.0]], [[-35.0, -7.0, 42.0, 28.0, -7.0], [21.0, 7.0, 0.0, 28.0, 35.0], [-14.0, -28.0, -7.0, -28.0, 
+-28.0], [14.0, -28.0, -42.0, 28.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
+[[-5.0, -1.0, 6.0, 4.0, -1.0], [3.0, 1.0, 0.0, 4.0, 5.0], [-2.0, -4.0, -1.0, -4.0, -4.0], [2.0, -4.0, -6.0, 4.0, 2.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, -6.0, 36.0, 
+24.0, -6.0], [18.0, 6.0, 0.0, 24.0, 30.0], [-12.0, -24.0, -6.0, -24.0, -24.0], [12.0, -24.0, -36.0, 24.0, 
+12.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-1.0, 3.0, 1.0], [-3.0, 6.0, 2.0], [3.0, -4.0, -6.0], [3.0, -3.0, 4.0], [-1.0, -4.0, -1.0]], 
+[[3.0, 0.0, 6.0], [5.0, 2.0, -4.0], [5.0, 4.0, 0.0], [1.0, 7.0, -6.0], [5.0, 0.0, -1.0]], [[-1.0, -7.0, 0.0], [-3.0, 7.0, 
+-2.0], [-4.0, 0.0, 0.0], [-3.0, -4.0, 3.0], [2.0, -1.0, -3.0]], [[0.0, -4.0, -3.0], [0.0, 0.0, -6.0], [2.0, -1.0, -2.0], [-4.0, 
+7.0, 5.0], [0.0, 0.0, 2.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[3.0, -5.0, 0.0], [6.0, -2.0, -5.0], [-3.0, -7.0, 4.0], [-2.0, 7.0, 0.0], [0.0, -5.0, 7.0]], 
+[[-4.0, -5.0, 0.0], [3.0, -4.0, 1.0], [4.0, 7.0, 4.0], [-2.0, -4.0, -5.0], [5.0, 0.0, 4.0]], [[-6.0, 5.0, -1.0], [4.0, -7.0, 
+-2.0], [2.0, -7.0, 1.0], [0.0, 0.0, 5.0], [-7.0, 7.0, 0.0]], [[6.0, 6.0, 2.0], [-5.0, -1.0, 6.0], [-7.0, -4.0, -3.0], [-7.0, 
+-6.0, -6.0], [-2.0, 6.0, 1.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-18.0, -17.0, -14.0, 23.0, -8.0], [-11.0, -14.0, 21.0, -15.0, -1.0], [20.0, -27.0, -22.0, 5.0, 
+28.0], [14.0, 8.0, -8.0, -17.0, 21.0]], [[-39.0, -40.0, -25.0, 48.0, -16.0], [-18.0, -31.0, 38.0, -28.0, -7.0], [46.0, -58.0, 
+-46.0, 10.0, 63.0], [22.0, 21.0, -9.0, -27.0, 44.0]], [[29.0, 56.0, -5.0, -34.0, -22.0], [8.0, 19.0, -40.0, 40.0, -9.0], 
+[-32.0, 52.0, 28.0, -30.0, -49.0], [-18.0, -47.0, 13.0, 39.0, -36.0]], [[24.0, 4.0, 28.0, -27.0, 43.0], [3.0, 25.0, 7.0, -14.0, 
+31.0], [-37.0, 25.0, 31.0, 20.0, -42.0], [8.0, 12.0, -21.0, -27.0, -20.0]], [[17.0, 7.0, 27.0, -26.0, 13.0], [24.0, 12.0, 
+-36.0, 23.0, -9.0], [-13.0, 26.0, 25.0, -5.0, -21.0], [-32.0, 3.0, 26.0, 37.0, -23.0]]], [[[9.0, -12.0, 15.0, -6.0, 42.0], 
+[-12.0, 15.0, 36.0, -36.0, 39.0], [-24.0, 0.0, 12.0, 30.0, -21.0], [30.0, 21.0, -39.0, -57.0, 0.0]], [[5.0, 46.0, -45.0, 4.0, 
+-38.0], [-30.0, 3.0, 18.0, 2.0, 9.0], [-16.0, 14.0, -8.0, -20.0, -21.0], [34.0, -51.0, -31.0, -23.0, -2.0]], [[-5.0, 22.0, 
+-43.0, 18.0, -20.0], [-40.0, -1.0, 48.0, -26.0, 25.0], [-10.0, -8.0, -18.0, 0.0, -7.0], [54.0, -29.0, -51.0, -59.0, 14.0]], 
+[[-32.0, 22.0, -76.0, 47.0, -77.0], [-39.0, -31.0, 29.0, 0.0, -19.0], [35.0, -33.0, -53.0, -30.0, 42.0], [36.0, -48.0, -17.0, 
+-13.0, 34.0]], [[15.0, 35.0, -19.0, -10.0, -7.0], [-20.0, 14.0, 16.0, -5.0, 21.0], [-29.0, 22.0, 9.0, -5.0, -35.0], [28.0, 
+-31.0, -32.0, -29.0, -11.0]]], [[[32.0, 8.0, 52.0, -47.0, 35.0], [39.0, 25.0, -53.0, 30.0, -5.0], [-29.0, 45.0, 47.0, 0.0, 
+-42.0], [-48.0, 12.0, 35.0, 49.0, -40.0]], [[-44.0, -22.0, -48.0, 55.0, -49.0], [-23.0, -39.0, 29.0, -12.0, -23.0], [55.0, 
+-57.0, -57.0, -10.0, 70.0], [20.0, -4.0, -1.0, -9.0, 46.0]], [[-12.0, -24.0, 12.0, 8.0, 0.0], [16.0, -12.0, -16.0, 8.0, -20.0], 
+[24.0, -16.0, -8.0, 0.0, 28.0], [-24.0, 20.0, 28.0, 28.0, 8.0]], [[11.0, -25.0, 49.0, -22.0, 41.0], [32.0, 10.0, -28.0, 7.0, 
+-3.0], [-5.0, 10.0, 25.0, 15.0, -7.0], [-36.0, 37.0, 28.0, 27.0, -15.0]], [[11.0, 29.0, -11.0, -11.0, -16.0], [-3.0, 7.0, 
+-11.0, 15.0, -2.0], [-14.0, 21.0, 8.0, -15.0, -21.0], [0.0, -27.0, -1.0, 10.0, -13.0]]], [[[20.0, 23.0, 16.0, -28.0, -1.0], 
+[20.0, 13.0, -40.0, 31.0, -12.0], [-17.0, 34.0, 25.0, -15.0, -28.0], [-30.0, -14.0, 25.0, 42.0, -27.0]], [[0.0, 30.0, -24.0, 
+0.0, -42.0], [0.0, -6.0, -24.0, 30.0, -24.0], [6.0, 12.0, -6.0, -30.0, 0.0], [-12.0, -36.0, 18.0, 36.0, -6.0]], [[11.0, 24.0, 
+-7.0, -11.0, -9.0], [-3.0, 8.0, -7.0, 10.0, 2.0], [-15.0, 19.0, 9.0, -10.0, -21.0], [2.0, -21.0, -4.0, 4.0, -12.0]], [[-47.0, 
+-63.0, -17.0, 57.0, 0.0], [-19.0, -35.0, 53.0, -45.0, 0.0], [54.0, -75.0, -52.0, 25.0, 77.0], [28.0, 43.0, -15.0, -44.0, 
+55.0]], [[0.0, -10.0, 8.0, 0.0, 14.0], [0.0, 2.0, 8.0, -10.0, 8.0], [-2.0, -4.0, 2.0, 10.0, 0.0], [4.0, 12.0, -6.0, -12.0, 
+2.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[1.0, -3.0, 4.0], [1.0, 0.0, -4.0]], [[-4.0, 0.0, 1.0], [1.0, -3.0, 1.0]], [[6.0, 5.0, -4.0], 
+[6.0, -1.0, -2.0]], [[-7.0, 1.0, 6.0], [0.0, 1.0, -1.0]], [[6.0, 3.0, 7.0], [0.0, 4.0, -7.0]]], [[[5.0, 3.0, 5.0], [5.0, -7.0, 
+7.0]], [[0.0, -2.0, -4.0], [6.0, -3.0, 3.0]], [[6.0, -5.0, -1.0], [-7.0, -1.0, -5.0]], [[6.0, 1.0, -3.0], [5.0, -3.0, -1.0]], 
+[[-3.0, -1.0, -4.0], [1.0, -7.0, 0.0]]], [[[7.0, 2.0, -1.0], [1.0, 7.0, -5.0]], [[5.0, -2.0, -3.0], [-3.0, 1.0, 5.0]], [[0.0, 
+-7.0, 2.0], [2.0, 5.0, -2.0]], [[7.0, -6.0, -6.0], [-3.0, 0.0, 2.0]], [[-3.0, -5.0, -7.0], [0.0, -5.0, -2.0]]], [[[0.0, -1.0, 
+-6.0], [0.0, -1.0, 1.0]], [[-2.0, -1.0, -5.0], [4.0, 0.0, 4.0]], [[-1.0, 6.0, -3.0], [1.0, -1.0, 4.0]], [[-7.0, 2.0, 2.0], 
+[-3.0, -6.0, 7.0]], [[0.0, 3.0, -5.0], [4.0, -6.0, 0.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, 0.0, 4.0], [3.0, 2.0, 5.0]], [[-1.0, -5.0, -3.0], [6.0, -7.0, 1.0]], [[2.0, -4.0, -2.0], 
+[-4.0, 0.0, 4.0]], [[4.0, -2.0, 5.0], [5.0, 1.0, 5.0]], [[0.0, -6.0, -5.0], [5.0, 0.0, -3.0]]], [[[3.0, 7.0, 5.0], [7.0, 5.0, 
+-5.0]], [[6.0, -5.0, -3.0], [-4.0, -4.0, -3.0]], [[-5.0, -5.0, 0.0], [-7.0, -1.0, -2.0]], [[4.0, 1.0, 1.0], [0.0, 7.0, 5.0]], 
+[[0.0, 0.0, -6.0], [0.0, -4.0, -4.0]]], [[[4.0, 6.0, -3.0], [6.0, -4.0, -2.0]], [[-5.0, 2.0, 5.0], [6.0, -6.0, 7.0]], [[0.0, 
+5.0, -5.0], [-1.0, 4.0, 2.0]], [[-5.0, -7.0, -6.0], [4.0, 0.0, 4.0]], [[-3.0, -2.0, 6.0], [-1.0, -7.0, -4.0]]], [[[0.0, 6.0, 
+5.0], [1.0, 1.0, 7.0]], [[-1.0, 4.0, -5.0], [-3.0, 0.0, 7.0]], [[-4.0, -4.0, 5.0], [3.0, -3.0, -3.0]], [[-7.0, 2.0, -4.0], 
+[-4.0, 0.0, -1.0]], [[-5.0, 2.0, -2.0], [-3.0, -1.0, -5.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-1.0, 4.0, -14.0, 15.0, 15.0], [29.0, 17.0, 11.0, -15.0, -8.0], [-12.0, -13.0, -44.0, -20.0, 
+42.0], [-25.0, -64.0, 43.0, -29.0, -2.0]], [[6.0, 29.0, -10.0, -4.0, -3.0], [-20.0, -22.0, 14.0, -31.0, 2.0], [-3.0, 56.0, 
+-16.0, 22.0, 34.0], [10.0, 3.0, 30.0, 19.0, 13.0]], [[-10.0, 22.0, -32.0, 13.0, 26.0], [80.0, 9.0, -92.0, 8.0, 36.0], [110.0, 
+-12.0, 31.0, -25.0, -43.0], [1.0, 2.0, -37.0, -38.0, -19.0]], [[21.0, -24.0, -34.0, -4.0, -33.0], [26.0, -66.0, 31.0, -19.0, 
+-36.0], [-42.0, 54.0, -23.0, -12.0, 52.0], [30.0, -26.0, 54.0, 28.0, 29.0]], [[1.0, -77.0, -42.0, 22.0, -32.0], [129.0, 5.0, 
+-35.0, 27.0, -30.0], [19.0, -62.0, -18.0, -121.0, 18.0], [8.0, -78.0, 8.0, -57.0, -7.0]]], [[[56.0, 51.0, -4.0, 92.0, -39.0], 
+[26.0, -13.0, -82.0, 14.0, -30.0], [67.0, 127.0, -29.0, -28.0, 25.0], [90.0, 16.0, 8.0, -76.0, -72.0]], [[11.0, 82.0, 4.0, 
+26.0, 53.0], [-22.0, 1.0, -35.0, -12.0, 24.0], [42.0, 51.0, -2.0, 74.0, -17.0], [-8.0, 15.0, 6.0, -15.0, -26.0]], [[-52.0, 
+-18.0, 42.0, -32.0, 15.0], [-51.0, 111.0, 55.0, -14.0, 30.0], [-31.0, -116.0, -27.0, -37.0, 20.0], [-78.0, -35.0, -12.0, -15.0, 
+9.0]], [[-8.0, 48.0, -10.0, 24.0, 37.0], [35.0, 35.0, -65.0, -4.0, 34.0], [83.0, -2.0, 1.0, -3.0, -18.0], [-14.0, -9.0, -16.0, 
+-47.0, -29.0]], [[-27.0, 75.0, 2.0, -32.0, 31.0], [-64.0, 23.0, 20.0, -66.0, 52.0], [28.0, 41.0, -14.0, 50.0, 35.0], [-32.0, 
+16.0, 20.0, 31.0, 25.0]]], [[[-12.0, -62.0, -16.0, 6.0, 13.0], [97.0, 18.0, -49.0, 53.0, -2.0], [31.0, -107.0, 32.0, -59.0, 
+-61.0], [-20.0, -32.0, -44.0, -40.0, -14.0]], [[6.0, -6.0, 56.0, 20.0, -3.0], [-55.0, 42.0, -5.0, 47.0, -6.0], [-15.0, -33.0, 
+22.0, 15.0, -53.0], [6.0, 46.0, -54.0, -20.0, -40.0]], [[14.0, 4.0, 8.0, 29.0, 48.0], [10.0, 7.0, 20.0, 20.0, -24.0], [-52.0, 
+-36.0, -31.0, 37.0, -3.0], [-39.0, -58.0, 35.0, -28.0, -19.0]], [[-23.0, 25.0, 70.0, 5.0, 45.0], [-82.0, 96.0, 12.0, 26.0, 
+28.0], [-12.0, -81.0, 7.0, 39.0, -50.0], [-55.0, 22.0, -49.0, -27.0, -36.0]], [[-48.0, 82.0, 20.0, -52.0, 71.0], [-94.0, 54.0, 
+49.0, -69.0, 70.0], [3.0, -14.0, -14.0, 84.0, 20.0], [-84.0, 4.0, 18.0, 41.0, 34.0]]], [[[-21.0, 31.0, 20.0, -24.0, 33.0], 
+[-47.0, 24.0, 4.0, -9.0, 36.0], [14.0, -19.0, 23.0, 47.0, -31.0], [-30.0, 33.0, -26.0, 21.0, 6.0]], [[12.0, 50.0, 10.0, 9.0, 
+39.0], [-30.0, -20.0, -21.0, 6.0, 14.0], [17.0, 35.0, 24.0, 79.0, -42.0], [1.0, 39.0, -13.0, 12.0, -14.0]], [[9.0, -3.0, -8.0, 
+-7.0, -28.0], [6.0, -39.0, -39.0, 12.0, 6.0], [43.0, 42.0, 48.0, 1.0, -37.0], [49.0, 65.0, -41.0, 23.0, 1.0]], [[22.0, 22.0, 
+14.0, -8.0, -58.0], [-83.0, -43.0, 38.0, -31.0, -16.0], [-30.0, 116.0, -7.0, 25.0, 46.0], [62.0, 63.0, 18.0, 50.0, 15.0]], 
+[[-20.0, 66.0, -18.0, -17.0, 27.0], [-6.0, 8.0, -37.0, -44.0, 54.0], [81.0, 41.0, 12.0, 25.0, 2.0], [-9.0, 25.0, -7.0, 10.0, 
+10.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -2.0, -2.0, -6.0, -1.0], [-6.0, 1.0, -6.0, 0.0, 3.0], [-2.0, 1.0, -3.0, -7.0, 1.0], [1.0, 
+-6.0, -6.0, 6.0, -4.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(7.0)+(1-msk_arg1)*(2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-49.0, -14.0, -14.0, -42.0, -7.0], [-42.0, 7.0, -42.0, 0.0, 21.0], [-14.0, 7.0, -21.0, -49.0, 
+7.0], [7.0, -42.0, -42.0, 42.0, -28.0]])+(1.-msk_ref)*numpy.array([[-14.0, -4.0, -4.0, -12.0, -2.0], [-12.0, 2.0, -12.0, 0.0, 
+6.0], [-4.0, 2.0, -6.0, -14.0, 2.0], [2.0, -12.0, -12.0, 12.0, -8.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[3.0, -3.0, 5.0], [-1.0, -7.0, -3.0], [1.0, -3.0, 1.0], [0.0, 0.0, 6.0], [0.0, 7.0, 7.0]], [[5.0, 
+3.0, -1.0], [1.0, 2.0, 1.0], [-5.0, -7.0, -2.0], [0.0, -6.0, -3.0], [0.0, 3.0, 6.0]], [[-1.0, 3.0, 0.0], [6.0, 0.0, -5.0], 
+[7.0, -6.0, 0.0], [-2.0, 0.0, 0.0], [-4.0, -4.0, -3.0]], [[-3.0, 7.0, -7.0], [6.0, -1.0, 7.0], [-1.0, -6.0, -2.0], [-6.0, 4.0, 
+-2.0], [1.0, -2.0, -3.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([6.0, -1.0, -4.0])+(1.-msk_arg1)*numpy.array([7.0, -6.0, 5.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[1.0, 13.0, 5.0, -24.0, -35.0], [31.0, 0.0, -15.0, 18.0, -27.0], [-9.0, 56.0, 48.0, -12.0, 
+-8.0], [3.0, 9.0, 8.0, -32.0, 20.0]])+(1.-msk_ref)*numpy.array([[64.0, 20.0, 30.0, 30.0, -7.0], [12.0, 0.0, -3.0, 21.0, 12.0], 
+[-25.0, 17.0, 85.0, -14.0, -19.0], [-98.0, 83.0, 19.0, -76.0, 4.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, 4.0, 1.0], [-1.0, -7.0, 6.0]], [[-5.0, -2.0, -5.0], [0.0, -1.0, 6.0]], [[-4.0, -4.0, 3.0], 
+[-5.0, -6.0, 4.0]], [[7.0, -7.0, 0.0], [0.0, 4.0, -6.0]], [[-3.0, 7.0, -5.0], [0.0, 2.0, 0.0]]], [[[-2.0, -4.0, 0.0], [2.0, 
+2.0, -6.0]], [[6.0, 3.0, 3.0], [2.0, 7.0, 2.0]], [[-7.0, -1.0, -6.0], [-3.0, -4.0, 3.0]], [[7.0, 0.0, -4.0], [3.0, -6.0, 3.0]], 
+[[-5.0, -6.0, -4.0], [4.0, -7.0, -7.0]]], [[[-6.0, -1.0, 0.0], [1.0, 3.0, -1.0]], [[-4.0, 2.0, 0.0], [-1.0, -5.0, 0.0]], [[5.0, 
+0.0, -4.0], [3.0, -5.0, 0.0]], [[-4.0, 0.0, 5.0], [4.0, -1.0, -3.0]], [[6.0, -7.0, 5.0], [-5.0, 7.0, -7.0]]], [[[-5.0, 1.0, 
+0.0], [3.0, -1.0, 0.0]], [[1.0, -4.0, 1.0], [6.0, 1.0, 7.0]], [[-7.0, -5.0, -5.0], [6.0, 0.0, 0.0]], [[2.0, -4.0, 0.0], [2.0, 
+7.0, -3.0]], [[-2.0, -1.0, 5.0], [-7.0, 1.0, 3.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-5.0, 0.0, 0.0], [0.0, 4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-1.0, -7.0, -3.0], [-3.0, 
+-2.0, 3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-24.0, 45.0, 12.0, -43.0, 23.0], [-6.0, 6.0, 31.0, -47.0, -31.0], [38.0, 0.0, -45.0, 4.0, 
+-30.0], [21.0, 27.0, 35.0, 6.0, 26.0]])+(1.-msk_ref)*numpy.array([[0.0, 54.0, 62.0, 16.0, -35.0], [2.0, -50.0, 58.0, 17.0, 
+40.0], [1.0, 3.0, 8.0, -30.0, 8.0], [-9.0, 25.0, 39.0, -3.0, 22.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-3.0, 0.0, 0.0, -3.0, -6.0], [1.0, -7.0, 0.0, 0.0, 3.0], [-1.0, -1.0, 5.0, -4.0, 0.0], [-5.0, 
+0.0, -7.0, 6.0, -3.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([6.0, -4.0])+(1.-msk_arg1)*numpy.array([7.0, 5.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-18.0, 12.0], [0.0, 0.0], [0.0, 0.0], [-18.0, 12.0], [-36.0, 24.0]], [[6.0, -4.0], [-42.0, 
+28.0], [0.0, 0.0], [0.0, 0.0], [18.0, -12.0]], [[-6.0, 4.0], [-6.0, 4.0], [30.0, -20.0], [-24.0, 16.0], [0.0, 0.0]], [[-30.0, 
+20.0], [0.0, 0.0], [-42.0, 28.0], [36.0, -24.0], [-18.0, 12.0]]])+(1.-msk_ref)*numpy.array([[[-21.0, -15.0], [0.0, 0.0], [0.0, 
+0.0], [-21.0, -15.0], [-42.0, -30.0]], [[7.0, 5.0], [-49.0, -35.0], [0.0, 0.0], [0.0, 0.0], [21.0, 15.0]], [[-7.0, -5.0], 
+[-7.0, -5.0], [35.0, 25.0], [-28.0, -20.0], [0.0, 0.0]], [[-35.0, -25.0], [0.0, 0.0], [-49.0, -35.0], [42.0, 30.0], [-21.0, 
+-15.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-2.0, 7.0, -4.0], [6.0, -2.0, -5.0], [-5.0, 2.0, 7.0], [4.0, 5.0, -7.0], [-2.0, 3.0, 2.0]], 
+[[4.0, 3.0, -3.0], [7.0, -5.0, 2.0], [-5.0, 5.0, -6.0], [1.0, -5.0, -4.0], [-5.0, -3.0, 5.0]], [[-5.0, 6.0, -1.0], [4.0, 4.0, 
+6.0], [-6.0, 0.0, -2.0], [-5.0, -4.0, -1.0], [0.0, 6.0, -1.0]], [[-5.0, 4.0, 5.0], [3.0, -2.0, 4.0], [5.0, 0.0, -5.0], [5.0, 
+-4.0, -6.0], [0.0, 6.0, 5.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-7.0, 3.0, 7.0], [3.0, 7.0, 2.0]])+(1.-msk_arg1)*numpy.array([[1.0, 7.0, -4.0], [3.0, -6.0, 
+-4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[7.0, 35.0], [-83.0, -6.0], [90.0, 13.0], [-62.0, 33.0], [37.0, 19.0]], [[-40.0, 27.0], [-50.0, 
+-10.0], [8.0, 8.0], [-50.0, -40.0], [61.0, -26.0]], [[46.0, 25.0], [26.0, 52.0], [28.0, -22.0], [16.0, -45.0], [11.0, 40.0]], 
+[[82.0, 23.0], [1.0, 3.0], [-70.0, 5.0], [-89.0, -25.0], [53.0, 52.0]]])+(1.-msk_ref)*numpy.array([[[63.0, -32.0], [12.0, 
+50.0], [-19.0, -55.0], [67.0, 10.0], [11.0, -32.0]], [[37.0, 6.0], [-36.0, 43.0], [54.0, -21.0], [-18.0, 49.0], [-46.0, 
+-17.0]], [[41.0, -47.0], [8.0, -36.0], [2.0, -10.0], [-29.0, 13.0], [46.0, -32.0]], [[3.0, -59.0], [-27.0, 5.0], [25.0, 35.0], 
+[1.0, 63.0], [22.0, -56.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-4.0, 7.0, 3.0], [-1.0, -1.0, 0.0]], [[3.0, 1.0, -5.0], [-4.0, 0.0, 2.0]], [[6.0, 2.0, 3.0], 
+[2.0, 0.0, 7.0]], [[0.0, 5.0, 3.0], [7.0, 5.0, -4.0]], [[2.0, -3.0, -1.0], [-2.0, -3.0, 1.0]]], [[[1.0, 0.0, 4.0], [4.0, 3.0, 
+2.0]], [[3.0, 0.0, 6.0], [5.0, 0.0, -2.0]], [[-2.0, -7.0, 6.0], [3.0, 1.0, 0.0]], [[-5.0, 2.0, -1.0], [-5.0, -4.0, -2.0]], 
+[[-4.0, -1.0, -2.0], [-5.0, 3.0, 4.0]]], [[[4.0, 7.0, -1.0], [-7.0, 3.0, 0.0]], [[4.0, -4.0, -4.0], [-6.0, 1.0, 7.0]], [[-1.0, 
+4.0, -1.0], [-2.0, 2.0, 2.0]], [[-1.0, 2.0, 3.0], [-5.0, 2.0, 7.0]], [[-6.0, 4.0, -5.0], [1.0, 0.0, 6.0]]], [[[-5.0, 0.0, 
+-2.0], [-1.0, 2.0, 6.0]], [[-4.0, 4.0, 5.0], [-2.0, -4.0, 1.0]], [[4.0, 5.0, -7.0], [4.0, 7.0, -2.0]], [[-1.0, 2.0, 0.0], [3.0, 
+6.0, 7.0]], [[7.0, 2.0, 6.0], [2.0, -5.0, 6.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[7.0, 0.0, -3.0], [3.0, 4.0, -5.0]], [[0.0, 4.0, -7.0], [6.0, 6.0, 
+4.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -1.0, -3.0], [-6.0, 6.0, 7.0]], [[-2.0, 0.0, -7.0], [-6.0, 4.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-44.0, -5.0], [14.0, 23.0], [4.0, 27.0], [52.0, 55.0], [-6.0, -31.0]], [[9.0, 22.0], [28.0, 
+-20.0], [-19.0, -46.0], [-53.0, -47.0], [-45.0, 14.0]], [[22.0, 11.0], [-9.0, 10.0], [-12.0, 31.0], [-58.0, -3.0], [-54.0, 
+81.0]], [[-54.0, 44.0], [-70.0, -51.0], [99.0, 127.0], [-9.0, 90.0], [-13.0, -28.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 
+-11.0], [31.0, 41.0], [-16.0, -87.0], [-54.0, -19.0], [-7.0, -3.0]], [[-11.0, -54.0], [-83.0, -66.0], [-9.0, -52.0], [28.0, 
+43.0], [111.0, 40.0]], [[28.0, 53.0], [79.0, 18.0], [44.0, 17.0], [87.0, -23.0], [89.0, 5.0]], [[101.0, 2.0], [4.0, -37.0], 
+[-8.0, 57.0], [72.0, -34.0], [-69.0, -124.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-1.0, 6.0, 2.0, 5.0, 3.0], [6.0, -7.0, 0.0, -6.0, 6.0], [5.0, -4.0, 7.0, 0.0, 2.0], [0.0, 3.0, 
+0.0, 0.0, -2.0]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[4.0, 4.0, -7.0, -7.0, -6.0], [-1.0, -7.0, 2.0, 0.0, -2.0], [5.0, 0.0, -2.0, 1.0, -7.0], [4.0, 
+1.0, 0.0, 1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-1.0, 6.0, 5.0, 0.0, -1.0], [-7.0, -7.0, 2.0, -3.0, 2.0], [5.0, -2.0, 4.0, 
+1.0, -2.0], [3.0, 3.0, 1.0, 7.0, -3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-4.0, -4.0, 7.0, 7.0, 6.0], [1.0, 7.0, -2.0, 0.0, 2.0], [-5.0, 0.0, 2.0, -1.0, 7.0], [-4.0, 
+-1.0, 0.0, -1.0, 0.0]], [[24.0, 24.0, -42.0, -42.0, -36.0], [-6.0, -42.0, 12.0, 0.0, -12.0], [30.0, 0.0, -12.0, 6.0, -42.0], 
+[24.0, 6.0, 0.0, 6.0, 0.0]], [[8.0, 8.0, -14.0, -14.0, -12.0], [-2.0, -14.0, 4.0, 0.0, -4.0], [10.0, 0.0, -4.0, 2.0, -14.0], 
+[8.0, 2.0, 0.0, 2.0, 0.0]], [[20.0, 20.0, -35.0, -35.0, -30.0], [-5.0, -35.0, 10.0, 0.0, -10.0], [25.0, 0.0, -10.0, 5.0, 
+-35.0], [20.0, 5.0, 0.0, 5.0, 0.0]], [[12.0, 12.0, -21.0, -21.0, -18.0], [-3.0, -21.0, 6.0, 0.0, -6.0], [15.0, 0.0, -6.0, 3.0, 
+-21.0], [12.0, 3.0, 0.0, 3.0, 0.0]]], [[[24.0, 24.0, -42.0, -42.0, -36.0], [-6.0, -42.0, 12.0, 0.0, -12.0], [30.0, 0.0, -12.0, 
+6.0, -42.0], [24.0, 6.0, 0.0, 6.0, 0.0]], [[-28.0, -28.0, 49.0, 49.0, 42.0], [7.0, 49.0, -14.0, 0.0, 14.0], [-35.0, 0.0, 14.0, 
+-7.0, 49.0], [-28.0, -7.0, 0.0, -7.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-24.0, -24.0, 42.0, 42.0, 36.0], [6.0, 42.0, -12.0, 0.0, 12.0], [-30.0, 0.0, 12.0, -6.0, 42.0], 
+[-24.0, -6.0, 0.0, -6.0, 0.0]], [[24.0, 24.0, -42.0, -42.0, -36.0], [-6.0, -42.0, 12.0, 0.0, -12.0], [30.0, 0.0, -12.0, 6.0, 
+-42.0], [24.0, 6.0, 0.0, 6.0, 0.0]]], [[[20.0, 20.0, -35.0, -35.0, -30.0], [-5.0, -35.0, 10.0, 0.0, -10.0], [25.0, 0.0, -10.0, 
+5.0, -35.0], [20.0, 5.0, 0.0, 5.0, 0.0]], [[-16.0, -16.0, 28.0, 28.0, 24.0], [4.0, 28.0, -8.0, 0.0, 8.0], [-20.0, 0.0, 8.0, 
+-4.0, 28.0], [-16.0, -4.0, 0.0, -4.0, 0.0]], [[28.0, 28.0, -49.0, -49.0, -42.0], [-7.0, -49.0, 14.0, 0.0, -14.0], [35.0, 0.0, 
+-14.0, 7.0, -49.0], [28.0, 7.0, 0.0, 7.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[8.0, 8.0, -14.0, -14.0, -12.0], [-2.0, -14.0, 4.0, 0.0, -4.0], [10.0, 0.0, -4.0, 2.0, 
+-14.0], [8.0, 2.0, 0.0, 2.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[12.0, 12.0, -21.0, -21.0, -18.0], [-3.0, -21.0, 6.0, 0.0, -6.0], [15.0, 0.0, -6.0, 3.0, -21.0], [12.0, 
+3.0, 0.0, 3.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-8.0, 
+-8.0, 14.0, 14.0, 12.0], [2.0, 14.0, -4.0, 0.0, 4.0], [-10.0, 0.0, 4.0, -2.0, 14.0], [-8.0, -2.0, 0.0, -2.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, -6.0, -5.0, 0.0, 1.0], [7.0, 7.0, -2.0, 3.0, -2.0], [-5.0, 2.0, -4.0, -1.0, 2.0], 
+[-3.0, -3.0, -1.0, -7.0, 3.0]], [[-6.0, 36.0, 30.0, 0.0, -6.0], [-42.0, -42.0, 12.0, -18.0, 12.0], [30.0, -12.0, 24.0, 6.0, 
+-12.0], [18.0, 18.0, 6.0, 42.0, -18.0]], [[-2.0, 12.0, 10.0, 0.0, -2.0], [-14.0, -14.0, 4.0, -6.0, 4.0], [10.0, -4.0, 8.0, 2.0, 
+-4.0], [6.0, 6.0, 2.0, 14.0, -6.0]], [[-5.0, 30.0, 25.0, 0.0, -5.0], [-35.0, -35.0, 10.0, -15.0, 10.0], [25.0, -10.0, 20.0, 
+5.0, -10.0], [15.0, 15.0, 5.0, 35.0, -15.0]], [[-3.0, 18.0, 15.0, 0.0, -3.0], [-21.0, -21.0, 6.0, -9.0, 6.0], [15.0, -6.0, 
+12.0, 3.0, -6.0], [9.0, 9.0, 3.0, 21.0, -9.0]]], [[[-6.0, 36.0, 30.0, 0.0, -6.0], [-42.0, -42.0, 12.0, -18.0, 12.0], [30.0, 
+-12.0, 24.0, 6.0, -12.0], [18.0, 18.0, 6.0, 42.0, -18.0]], [[7.0, -42.0, -35.0, 0.0, 7.0], [49.0, 49.0, -14.0, 21.0, -14.0], 
+[-35.0, 14.0, -28.0, -7.0, 14.0], [-21.0, -21.0, -7.0, -49.0, 21.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[6.0, -36.0, -30.0, 0.0, 6.0], [42.0, 42.0, -12.0, 18.0, -12.0], 
+[-30.0, 12.0, -24.0, -6.0, 12.0], [-18.0, -18.0, -6.0, -42.0, 18.0]], [[-6.0, 36.0, 30.0, 0.0, -6.0], [-42.0, -42.0, 12.0, 
+-18.0, 12.0], [30.0, -12.0, 24.0, 6.0, -12.0], [18.0, 18.0, 6.0, 42.0, -18.0]]], [[[-5.0, 30.0, 25.0, 0.0, -5.0], [-35.0, 
+-35.0, 10.0, -15.0, 10.0], [25.0, -10.0, 20.0, 5.0, -10.0], [15.0, 15.0, 5.0, 35.0, -15.0]], [[4.0, -24.0, -20.0, 0.0, 4.0], 
+[28.0, 28.0, -8.0, 12.0, -8.0], [-20.0, 8.0, -16.0, -4.0, 8.0], [-12.0, -12.0, -4.0, -28.0, 12.0]], [[-7.0, 42.0, 35.0, 0.0, 
+-7.0], [-49.0, -49.0, 14.0, -21.0, 14.0], [35.0, -14.0, 28.0, 7.0, -14.0], [21.0, 21.0, 7.0, 49.0, -21.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-2.0, 12.0, 10.0, 0.0, -2.0], 
+[-14.0, -14.0, 4.0, -6.0, 4.0], [10.0, -4.0, 8.0, 2.0, -4.0], [6.0, 6.0, 2.0, 14.0, -6.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-3.0, 18.0, 15.0, 0.0, -3.0], [-21.0, -21.0, 6.0, 
+-9.0, 6.0], [15.0, -6.0, 12.0, 3.0, -6.0], [9.0, 9.0, 3.0, 21.0, -9.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[2.0, -12.0, -10.0, 0.0, 2.0], [14.0, 14.0, -4.0, 6.0, -4.0], [-10.0, 4.0, -8.0, -2.0, 
+4.0], [-6.0, -6.0, -2.0, -14.0, 6.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[5.0, -7.0, 1.0], [7.0, -1.0, -4.0], [-5.0, 5.0, 0.0], [-7.0, 0.0, 6.0], [-7.0, -1.0, -2.0]], 
+[[1.0, 1.0, 1.0], [-2.0, 0.0, 1.0], [0.0, -1.0, 7.0], [4.0, 3.0, 0.0], [-1.0, 5.0, -3.0]], [[1.0, 3.0, -3.0], [6.0, -1.0, 5.0], 
+[-3.0, 5.0, 4.0], [4.0, -5.0, 1.0], [-2.0, -5.0, 6.0]], [[4.0, -7.0, 0.0], [-1.0, -6.0, 0.0], [0.0, 7.0, 0.0], [7.0, -6.0, 
+0.0], [6.0, 0.0, 0.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[4.0, 3.0, -3.0], [5.0, 0.0, -5.0], [-2.0, -1.0, 7.0], [7.0, 1.0, -6.0], [-6.0, -1.0, -3.0]], 
+[[-4.0, 6.0, 5.0], [6.0, -6.0, 7.0], [5.0, 4.0, -5.0], [1.0, 0.0, 2.0], [0.0, 0.0, -1.0]], [[1.0, -5.0, -6.0], [0.0, 0.0, 0.0], 
+[1.0, 0.0, 2.0], [-6.0, 4.0, 1.0], [3.0, 4.0, -1.0]], [[-2.0, 3.0, -5.0], [2.0, -2.0, -3.0], [-1.0, -6.0, 7.0], [4.0, 0.0, 
+-7.0], [3.0, 0.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, 0.0, -7.0], [-2.0, -5.0, 3.0], [2.0, 7.0, 2.0], [2.0, 3.0, 2.0], 
+[6.0, -2.0, -6.0]], [[0.0, -1.0, -1.0], [5.0, -2.0, 1.0], [6.0, -5.0, 1.0], [-3.0, 1.0, 2.0], [0.0, -3.0, 5.0]], [[-5.0, 2.0, 
+-7.0], [-6.0, 0.0, 0.0], [1.0, -6.0, -4.0], [2.0, -6.0, -2.0], [-2.0, 0.0, -2.0]], [[3.0, 3.0, -2.0], [-1.0, -4.0, 4.0], [-4.0, 
+-1.0, 1.0], [0.0, -5.0, 1.0], [-5.0, -5.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-4.0, 20.0, 4.0, 22.0, -26.0], [-57.0, 79.0, -8.0, 7.0, -1.0], [34.0, 0.0, 7.0, -57.0, 
+-14.0], [-36.0, 21.0, 44.0, 13.0, 22.0]], [[37.0, 55.0, -41.0, 72.0, -29.0], [-54.0, 20.0, 51.0, -1.0, 4.0], [36.0, 0.0, -1.0, 
+-50.0, 21.0], [3.0, 28.0, -29.0, 56.0, -7.0]], [[-5.0, -25.0, 5.0, -30.0, 25.0], [50.0, -60.0, -5.0, -5.0, 0.0], [-30.0, 0.0, 
+-5.0, 50.0, 5.0], [25.0, -20.0, -25.0, -20.0, -15.0]], [[-46.0, -65.0, 56.0, -85.0, 24.0], [58.0, 0.0, -65.0, 5.0, -6.0], 
+[-43.0, 0.0, 5.0, 48.0, -27.0], [-16.0, -32.0, 49.0, -70.0, 21.0]], [[-25.0, -25.0, 1.0, -38.0, 49.0], [12.0, -50.0, -29.0, 
+-11.0, 2.0], [10.0, 0.0, -11.0, 36.0, -23.0], [21.0, -6.0, -1.0, -14.0, -35.0]]], [[[4.0, 0.0, 4.0, 2.0, -10.0], [7.0, 7.0, 
+4.0, 3.0, -1.0], [-10.0, 0.0, 3.0, -1.0, 6.0], [-4.0, -3.0, 0.0, -3.0, 10.0]], [[-11.0, -15.0, 11.0, -20.0, 9.0], [13.0, -5.0, 
+-15.0, 0.0, -1.0], [-8.0, 0.0, 0.0, 13.0, -7.0], [-1.0, -7.0, 9.0, -15.0, 1.0]], [[-24.0, -35.0, 50.0, -43.0, -20.0], [29.0, 
+55.0, -39.0, 14.0, -7.0], [-37.0, 0.0, 14.0, 3.0, -11.0], [-38.0, -19.0, 55.0, -49.0, 49.0]], [[25.0, 20.0, -11.0, 31.0, 
+-27.0], [2.0, 6.0, 32.0, 4.0, 0.0], [-11.0, 0.0, 4.0, -12.0, 24.0], [1.0, 2.0, -22.0, 16.0, 12.0]], [[20.0, 10.0, -24.0, 16.0, 
+10.0], [19.0, -57.0, 30.0, -7.0, 3.0], [-8.0, 0.0, -7.0, 23.0, 20.0], [32.0, -3.0, -50.0, 17.0, -24.0]]], [[[22.0, 20.0, -26.0, 
+28.0, 0.0], [-1.0, -33.0, 32.0, -5.0, 3.0], [4.0, 0.0, -5.0, 3.0, 18.0], [22.0, 5.0, -40.0, 25.0, -18.0]], [[6.0, 5.0, 24.0, 
+11.0, -50.0], [-5.0, 77.0, 1.0, 16.0, -5.0], [-19.0, 0.0, 16.0, -35.0, 9.0], [-40.0, -1.0, 35.0, -11.0, 53.0]], [[-9.0, -35.0, 
+29.0, -40.0, 1.0], [62.0, -20.0, -15.0, 5.0, -4.0], [-52.0, 0.0, 5.0, 42.0, 7.0], [1.0, -28.0, 1.0, -40.0, 19.0]], [[-2.0, 
+15.0, 4.0, 17.0, -22.0], [-41.0, 61.0, -5.0, 6.0, -1.0], [23.0, 0.0, 6.0, -43.0, -9.0], [-28.0, 15.0, 33.0, 9.0, 19.0]], 
+[[-41.0, -40.0, 51.0, -55.0, -1.0], [8.0, 60.0, -60.0, 10.0, -6.0], [-13.0, 0.0, 10.0, -2.0, -32.0], [-41.0, -12.0, 74.0, 
+-50.0, 36.0]]], [[[-5.0, 20.0, -1.0, 21.0, -17.0], [-58.0, 66.0, -8.0, 4.0, 0.0], [39.0, 0.0, 4.0, -52.0, -16.0], [-29.0, 22.0, 
+38.0, 16.0, 12.0]], [[-22.0, -5.0, 8.0, -13.0, 12.0], [-32.0, 30.0, -29.0, -1.0, 0.0], [29.0, 0.0, -1.0, -18.0, -27.0], [-16.0, 
+10.0, 37.0, -4.0, -3.0]], [[21.0, 0.0, -7.0, 7.0, -7.0], [42.0, -42.0, 28.0, 0.0, 0.0], [-35.0, 0.0, 0.0, 28.0, 28.0], [21.0, 
+-14.0, -42.0, 0.0, 0.0]], [[10.0, 35.0, -8.0, 43.0, -36.0], [-64.0, 78.0, 11.0, 7.0, 0.0], [37.0, 0.0, 7.0, -66.0, -3.0], 
+[-32.0, 26.0, 29.0, 28.0, 21.0]], [[24.0, 30.0, -12.0, 42.0, -36.0], [-24.0, 36.0, 30.0, 6.0, 0.0], [6.0, 0.0, 6.0, -36.0, 
+18.0], [-12.0, 12.0, -6.0, 24.0, 18.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 28.0, -37.0, -9.0, 38.0], [6.0, 40.0, 66.0, -20.0, 
+26.0], [-46.0, -30.0, 43.0, 50.0, -12.0], [-8.0, 27.0, -12.0, 36.0, 12.0]], [[42.0, -21.0, -1.0, 3.0, 68.0], [5.0, 33.0, 43.0, 
+-30.0, -17.0], [-9.0, -42.0, 29.0, 28.0, -6.0], [26.0, -19.0, -31.0, 1.0, -38.0]], [[-10.0, -15.0, 25.0, 5.0, -40.0], [-5.0, 
+-35.0, -55.0, 20.0, -15.0], [35.0, 30.0, -35.0, -40.0, 10.0], [0.0, -15.0, 15.0, -25.0, 0.0]], [[-56.0, 32.0, -2.0, -2.0, 
+-78.0], [-6.0, -29.0, -36.0, 33.0, 30.0], [-7.0, 42.0, -31.0, -26.0, 2.0], [-33.0, 31.0, 34.0, 6.0, 47.0]], [[0.0, 13.0, -25.0, 
+-21.0, -28.0], [3.0, -35.0, -39.0, 16.0, -7.0], [47.0, 42.0, 7.0, -4.0, 18.0], [-20.0, 3.0, 27.0, 3.0, 36.0]]], [[[-5.0, -4.0, 
+11.0, 7.0, -2.0], [-2.0, 4.0, 2.0, 0.0, 2.0], [-10.0, -6.0, -9.0, -6.0, -4.0], [4.0, -1.0, -4.0, -4.0, -8.0]], [[-11.0, 7.0, 
+-2.0, -2.0, -18.0], [-1.0, -9.0, -11.0, 8.0, 5.0], [3.0, 12.0, -6.0, -6.0, 2.0], [-8.0, 6.0, 9.0, 1.0, 12.0]], [[-49.0, 26.0, 
+7.0, 11.0, -40.0], [-6.0, 9.0, 12.0, 13.0, 38.0], [-51.0, 0.0, -22.0, -8.0, -14.0], [-17.0, 32.0, 8.0, 12.0, 19.0]], [[8.0, 
+-23.0, 29.0, 17.0, 18.0], [-3.0, 14.0, 9.0, -9.0, -9.0], [-14.0, -24.0, -14.0, -10.0, -8.0], [21.0, -16.0, -19.0, -15.0, 
+-35.0]], [[19.0, -32.0, 27.0, 7.0, 2.0], [-2.0, -18.0, -34.0, 2.0, -30.0], [36.0, 6.0, -19.0, -26.0, 8.0], [18.0, -31.0, -4.0, 
+-28.0, -26.0]]], [[[23.0, -26.0, 17.0, 5.0, 18.0], [0.0, -4.0, -12.0, -6.0, -24.0], [22.0, -6.0, -5.0, -10.0, 4.0], [18.0, 
+-25.0, -10.0, -18.0, -26.0]], [[-23.0, 8.0, 15.0, 19.0, 8.0], [-4.0, 37.0, 46.0, -9.0, 28.0], [-67.0, -36.0, -8.0, 8.0, -22.0], 
+[5.0, 18.0, -18.0, 10.0, -15.0]], [[-34.0, -7.0, 37.0, 17.0, -52.0], [-9.0, -21.0, -39.0, 22.0, 5.0], [-3.0, 18.0, -49.0, 
+-44.0, -2.0], [-2.0, -1.0, 11.0, -21.0, -2.0]], [[1.0, 20.0, -25.0, -5.0, 28.0], [4.0, 31.0, 50.0, -15.0, 20.0], [-37.0, -24.0, 
+30.0, 36.0, -10.0], [-5.0, 20.0, -10.0, 26.0, 7.0]], [[-46.0, 47.0, -27.0, -7.0, -38.0], [-1.0, 6.0, 19.0, 13.0, 45.0], [-42.0, 
+12.0, 4.0, 14.0, -8.0], [-33.0, 46.0, 19.0, 31.0, 47.0]]], [[[8.0, 27.0, -41.0, -13.0, 38.0], [7.0, 34.0, 59.0, -19.0, 21.0], 
+[-34.0, -24.0, 46.0, 50.0, -8.0], [-9.0, 24.0, -9.0, 35.0, 15.0]], [[-2.0, 32.0, -44.0, -20.0, 6.0], [6.0, 7.0, 24.0, -3.0, 
+18.0], [-7.0, 6.0, 35.0, 34.0, 2.0], [-21.0, 25.0, 10.0, 30.0, 35.0]], [[0.0, -35.0, 49.0, 21.0, -14.0], [-7.0, -14.0, -35.0, 
+7.0, -21.0], [14.0, 0.0, -42.0, -42.0, 0.0], [21.0, -28.0, -7.0, -35.0, -35.0]], [[14.0, 16.0, -28.0, -4.0, 54.0], [6.0, 47.0, 
+72.0, -27.0, 18.0], [-47.0, -42.0, 43.0, 50.0, -14.0], [3.0, 17.0, -22.0, 30.0, -5.0]], [[12.0, -12.0, 12.0, 12.0, 36.0], [0.0, 
+30.0, 36.0, -18.0, 0.0], [-30.0, -36.0, 6.0, 12.0, -12.0], [18.0, -6.0, -24.0, 0.0, -30.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, -1.0, 4.0], [5.0, 0.0, -7.0]], [[2.0, -6.0, -4.0], [0.0, 4.0, -7.0]], [[6.0, -6.0, 7.0], 
+[-3.0, 7.0, 1.0]], [[2.0, -4.0, 6.0], [5.0, 4.0, 2.0]], [[4.0, 5.0, 0.0], [7.0, -6.0, -3.0]]], [[[-2.0, -1.0, -6.0], [3.0, 
+-2.0, 3.0]], [[-6.0, -2.0, 6.0], [0.0, -1.0, 0.0]], [[6.0, -2.0, 4.0], [4.0, 7.0, -4.0]], [[-5.0, -3.0, -2.0], [1.0, 6.0, 
+-3.0]], [[-2.0, 0.0, 2.0], [-2.0, -2.0, 3.0]]], [[[7.0, 6.0, -5.0], [-5.0, 7.0, -6.0]], [[1.0, 2.0, -6.0], [-7.0, -5.0, -7.0]], 
+[[4.0, 4.0, -5.0], [-5.0, 6.0, 7.0]], [[-5.0, 4.0, -1.0], [0.0, 3.0, 1.0]], [[-3.0, 1.0, -5.0], [6.0, 3.0, 2.0]]], [[[-6.0, 
+1.0, -4.0], [2.0, 2.0, 4.0]], [[2.0, 4.0, -5.0], [-3.0, -4.0, -5.0]], [[3.0, 0.0, -6.0], [5.0, -6.0, 5.0]], [[-3.0, 6.0, -4.0], 
+[-5.0, 6.0, 5.0]], [[6.0, -1.0, -1.0], [-3.0, 3.0, -1.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, -6.0, -7.0], [-3.0, 2.0, 7.0]], [[-4.0, 7.0, -1.0], [4.0, 4.0, 4.0]], [[-4.0, -3.0, 
+6.0], [1.0, 2.0, 4.0]], [[0.0, -6.0, -2.0], [-3.0, 4.0, -4.0]], [[-4.0, -1.0, 1.0], [2.0, 2.0, 0.0]]], [[[2.0, -2.0, 3.0], 
+[0.0, 5.0, 4.0]], [[0.0, 0.0, -2.0], [-1.0, -5.0, -6.0]], [[0.0, -3.0, 2.0], [4.0, -5.0, -5.0]], [[0.0, 3.0, -3.0], [2.0, -7.0, 
+-5.0]], [[-1.0, 0.0, 7.0], [-1.0, -3.0, -2.0]]], [[[-2.0, -1.0, 3.0], [-2.0, 3.0, 0.0]], [[-3.0, -1.0, 2.0], [2.0, -5.0, 7.0]], 
+[[-4.0, 4.0, 3.0], [-4.0, 0.0, 0.0]], [[-3.0, 5.0, 3.0], [7.0, 4.0, 2.0]], [[0.0, -3.0, -2.0], [-1.0, -6.0, -3.0]]], [[[0.0, 
+-6.0, 1.0], [-3.0, 3.0, 0.0]], [[0.0, -7.0, 7.0], [6.0, -7.0, 3.0]], [[-1.0, 2.0, -2.0], [3.0, -4.0, -6.0]], [[-7.0, 5.0, 
+-3.0], [-6.0, 4.0, 3.0]], [[6.0, -5.0, -5.0], [1.0, -3.0, -4.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 4.0, 0.0], [1.0, -5.0, 
+0.0]], [[-6.0, -4.0, 4.0], [-7.0, 2.0, 7.0]], [[0.0, -5.0, -4.0], [4.0, 7.0, 0.0]], [[-7.0, -7.0, 0.0], [5.0, 0.0, -3.0]], 
+[[-7.0, -7.0, 7.0], [3.0, 1.0, 4.0]]], [[[1.0, 0.0, -5.0], [-3.0, -4.0, -1.0]], [[-1.0, 0.0, -1.0], [4.0, 0.0, 0.0]], [[-3.0, 
+0.0, 6.0], [-2.0, 3.0, 3.0]], [[-6.0, 0.0, 7.0], [-5.0, 1.0, 0.0]], [[4.0, 7.0, 0.0], [5.0, 7.0, -4.0]]], [[[-5.0, -6.0, 7.0], 
+[-7.0, -7.0, -2.0]], [[5.0, -4.0, -7.0], [-4.0, -4.0, -7.0]], [[0.0, 0.0, 6.0], [-4.0, -2.0, -6.0]], [[-7.0, 2.0, -6.0], [5.0, 
+2.0, -2.0]], [[3.0, 6.0, -7.0], [-1.0, -6.0, 6.0]]], [[[-4.0, -7.0, 7.0], [-1.0, 6.0, -7.0]], [[4.0, 6.0, 0.0], [7.0, -2.0, 
+-1.0]], [[7.0, -7.0, -3.0], [3.0, 4.0, 1.0]], [[2.0, 6.0, 6.0], [-7.0, 5.0, -6.0]], [[-2.0, 0.0, -6.0], [0.0, -1.0, 0.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-86.0, -19.0, 4.0, 11.0, 15.0], [-14.0, 29.0, 66.0, 30.0, 37.0], [3.0, -30.0, -12.0, 28.0, 
+11.0], [-5.0, 44.0, 47.0, -68.0, 18.0]], [[23.0, -58.0, -34.0, 88.0, 2.0], [-4.0, 30.0, 25.0, 1.0, -28.0], [2.0, -77.0, -44.0, 
+-46.0, 23.0], [44.0, -35.0, 20.0, -37.0, 78.0]], [[17.0, -53.0, 51.0, 55.0, -3.0], [84.0, -52.0, -20.0, -99.0, 23.0], [42.0, 
+-32.0, -15.0, -18.0, -38.0], [73.0, 27.0, -75.0, -44.0, 3.0]], [[-11.0, 2.0, 61.0, 5.0, 20.0], [58.0, -49.0, 14.0, -58.0, 
+19.0], [20.0, 14.0, -26.0, 47.0, -35.0], [27.0, 78.0, -35.0, -60.0, -13.0]], [[-84.0, 11.0, -48.0, -63.0, -19.0], [-44.0, 41.0, 
+58.0, 86.0, 13.0], [-45.0, 6.0, -24.0, 32.0, 23.0], [-69.0, 40.0, 69.0, -78.0, 36.0]]], [[[56.0, 23.0, -14.0, -11.0, 5.0], 
+[-18.0, 1.0, -2.0, 20.0, -43.0], [-25.0, 32.0, -26.0, 2.0, 15.0], [-15.0, 6.0, 11.0, 10.0, 20.0]], [[-32.0, 0.0, 64.0, -4.0, 
+30.0], [5.0, -7.0, 23.0, -17.0, 51.0], [29.0, 37.0, 34.0, 22.0, 0.0], [15.0, 63.0, -6.0, 10.0, -53.0]], [[-42.0, -14.0, 8.0, 
+36.0, 4.0], [47.0, -23.0, 15.0, -39.0, 5.0], [15.0, -63.0, -36.0, 32.0, -36.0], [25.0, 5.0, -10.0, -72.0, 25.0]], [[20.0, 17.0, 
+18.0, 55.0, 35.0], [8.0, -9.0, -6.0, -28.0, -22.0], [23.0, -35.0, -2.0, 19.0, -15.0], [31.0, -38.0, 0.0, 35.0, -10.0]], [[9.0, 
+2.0, 26.0, -18.0, 2.0], [4.0, -10.0, -9.0, -11.0, 18.0], [8.0, 37.0, 22.0, -4.0, 1.0], [2.0, 25.0, -18.0, 21.0, -30.0]]], 
+[[[-14.0, 3.0, -91.0, 41.0, -35.0], [-2.0, 16.0, -53.0, 4.0, -46.0], [-4.0, -124.0, 1.0, -25.0, -27.0], [-5.0, -174.0, 8.0, 
+36.0, 35.0]], [[-8.0, -60.0, -91.0, 29.0, -36.0], [-73.0, 86.0, 14.0, 80.0, -7.0], [-23.0, -55.0, 14.0, -94.0, 64.0], [-12.0, 
+-84.0, 56.0, 22.0, 62.0]], [[87.0, 49.0, -23.0, -3.0, -23.0], [43.0, -57.0, -107.0, -60.0, -66.0], [1.0, -17.0, 5.0, -4.0, 
+-54.0], [4.0, -114.0, -67.0, 82.0, -22.0]], [[-4.0, 65.0, 12.0, -14.0, 21.0], [-2.0, -19.0, -34.0, -11.0, -13.0], [12.0, 1.0, 
+33.0, 46.0, -31.0], [-16.0, -53.0, -3.0, 73.0, -58.0]], [[31.0, 68.0, -1.0, -10.0, 24.0], [0.0, -23.0, -14.0, -1.0, -51.0], 
+[-13.0, 9.0, -23.0, 57.0, -23.0], [-20.0, -21.0, 9.0, 23.0, -9.0]]], [[[48.0, 67.0, 19.0, -12.0, 27.0], [0.0, -28.0, -33.0, 
+-15.0, -38.0], [1.0, 31.0, 8.0, 41.0, -21.0], [-10.0, -25.0, -10.0, 67.0, -41.0]], [[-23.0, -23.0, -81.0, -1.0, -31.0], [-59.0, 
+63.0, 11.0, 74.0, -12.0], [-29.0, -41.0, 5.0, -48.0, 40.0], [-32.0, -68.0, 53.0, 8.0, 46.0]], [[50.0, 10.0, -35.0, -47.0, 
+-20.0], [-22.0, 7.0, 13.0, 45.0, -42.0], [-52.0, 54.0, -50.0, -6.0, 28.0], [-39.0, 45.0, 18.0, -42.0, 51.0]], [[54.0, 82.0, 
+-3.0, -9.0, 4.0], [20.0, -47.0, -101.0, -47.0, -48.0], [16.0, -10.0, 44.0, 26.0, -56.0], [-7.0, -127.0, -46.0, 132.0, -71.0]], 
+[[21.0, -34.0, -28.0, 33.0, -24.0], [22.0, -4.0, -21.0, -22.0, -17.0], [1.0, -47.0, -19.0, -37.0, -7.0], [23.0, -42.0, -21.0, 
+-17.0, 38.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, -64.0, 9.0, 53.0, 22.0], [-28.0, 16.0, -7.0, 3.0, 46.0], [13.0, 5.0, 46.0, 
+13.0, -81.0], [79.0, 36.0, 3.0, 25.0, -24.0]], [[-44.0, -45.0, 74.0, 49.0, -24.0], [13.0, 2.0, -39.0, -36.0, 22.0], [-16.0, 
+95.0, 10.0, 20.0, -68.0], [79.0, -29.0, 77.0, 6.0, 16.0]], [[-62.0, 58.0, 39.0, -18.0, 51.0], [-49.0, -25.0, 54.0, 35.0, 12.0], 
+[25.0, -18.0, 34.0, -99.0, -100.0], [105.0, -48.0, 83.0, 68.0, -61.0]], [[-31.0, 15.0, 44.0, 33.0, 83.0], [-61.0, 12.0, 38.0, 
+9.0, 25.0], [-11.0, -66.0, -4.0, -29.0, -77.0], [67.0, 9.0, 57.0, -11.0, -44.0]], [[57.0, -126.0, -39.0, -19.0, -60.0], [10.0, 
+24.0, -53.0, -65.0, 56.0], [-51.0, 17.0, 2.0, 11.0, 53.0], [-73.0, 110.0, -13.0, -23.0, -2.0]]], [[[9.0, -12.0, 27.0, 27.0, 
+-2.0], [24.0, 20.0, -33.0, -47.0, -26.0], [-39.0, 11.0, -62.0, 53.0, 57.0], [-63.0, 8.0, 15.0, -95.0, 42.0]], [[-3.0, 66.0, 
+-21.0, 56.0, 97.0], [-32.0, 0.0, 51.0, 77.0, -45.0], [91.0, -60.0, 38.0, 0.0, -66.0], [74.0, -34.0, -50.0, 7.0, -23.0]], 
+[[-39.0, -54.0, 59.0, 4.0, 3.0], [-50.0, 6.0, 7.0, -21.0, 95.0], [-59.0, -6.0, 18.0, -28.0, -92.0], [84.0, 30.0, 80.0, 55.0, 
+-43.0]], [[-41.0, 18.0, 69.0, 70.0, 39.0], [-19.0, 11.0, 10.0, 17.0, 18.0], [-14.0, -6.0, -10.0, 64.0, -74.0], [83.0, -40.0, 
+16.0, 1.0, 16.0]], [[8.0, 51.0, -30.0, -5.0, 32.0], [-1.0, -8.0, 25.0, 34.0, -44.0], [46.0, -29.0, 6.0, -18.0, 12.0], [-9.0, 
+-21.0, -31.0, -6.0, -6.0]]], [[[-16.0, -79.0, 19.0, -98.0, -158.0], [25.0, -22.0, -38.0, -45.0, 118.0], [-108.0, 80.0, 12.0, 
+-6.0, 19.0], [-16.0, 21.0, 29.0, 126.0, 9.0]], [[26.0, -48.0, -49.0, -35.0, -117.0], [79.0, -23.0, -61.0, -18.0, -24.0], [39.0, 
+136.0, 44.0, 2.0, 52.0], [-34.0, -16.0, -37.0, 44.0, 39.0]], [[-19.0, 36.0, 22.0, -102.0, -72.0], [13.0, -19.0, 7.0, -28.0, 
+33.0], [-100.0, -14.0, -64.0, -17.0, 82.0], [-87.0, -14.0, 31.0, 25.0, 16.0]], [[1.0, 23.0, 5.0, 4.0, 7.0], [-13.0, 6.0, 21.0, 
+26.0, 25.0], [-29.0, -53.0, -18.0, 53.0, 4.0], [-4.0, -3.0, -47.0, 17.0, 13.0]], [[-5.0, -28.0, 60.0, 38.0, 8.0], [-10.0, 32.0, 
+-18.0, -44.0, 38.0], [-93.0, -34.0, -72.0, 85.0, 20.0], [-32.0, 28.0, 19.0, -69.0, 33.0]]], [[[-4.0, 34.0, 33.0, 33.0, 31.0], 
+[-4.0, 18.0, 8.0, 0.0, -9.0], [-40.0, -50.0, -60.0, 74.0, 26.0], [-29.0, -12.0, -19.0, -58.0, 34.0]], [[33.0, -70.0, -40.0, 
+-42.0, -110.0], [57.0, -9.0, -57.0, -36.0, 13.0], [-10.0, 92.0, 20.0, 11.0, 62.0], [-57.0, 24.0, -29.0, 29.0, 30.0]], [[35.0, 
+-54.0, 2.0, -11.0, -34.0], [37.0, 23.0, -58.0, -91.0, -25.0], [-60.0, 26.0, -74.0, 18.0, 112.0], [-130.0, 54.0, 35.0, -125.0, 
+36.0]], [[-11.0, 60.0, 8.0, -61.0, -38.0], [3.0, -13.0, 28.0, 21.0, 27.0], [-66.0, -50.0, -46.0, 34.0, 54.0], [-52.0, -28.0, 
+-37.0, 41.0, 24.0]], [[-22.0, -16.0, 18.0, -47.0, -52.0], [9.0, -17.0, -12.0, -25.0, 27.0], [-29.0, 48.0, 6.0, -45.0, -2.0], 
+[4.0, -8.0, 54.0, 42.0, -9.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[0.0, -6.0], [0.0, 5.0]], [[7.0, 3.0], [-1.0, 7.0]], [[5.0, -5.0], [2.0, -5.0]], [[7.0, 0.0], 
+[3.0, 0.0]], [[0.0, 2.0], [4.0, -4.0]], [[0.0, 5.0], [6.0, 5.0]]]),self.functionspace)
+      arg1=-2.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-0.0, 12.0], [-0.0, -10.0]], [[-14.0, -6.0], [2.0, -14.0]], [[-10.0, 10.0], [-4.0, 10.0]], 
+[[-14.0, -0.0], [-6.0, -0.0]], [[-0.0, -4.0], [-8.0, 8.0]], [[-0.0, -10.0], [-12.0, -10.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-5.0, -7.0], [7.0, 5.0]], [[-7.0, -1.0], [0.0, -3.0]], [[0.0, 7.0], [-4.0, -7.0]], [[0.0, 4.0], 
+[3.0, -2.0]], [[-2.0, 6.0], [-2.0, -6.0]], [[7.0, 1.0], [-2.0, 6.0]]]),self.functionspace)
+      arg1=numpy.array(-6.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[30.0, 42.0], [-42.0, -30.0]], [[42.0, 6.0], [-0.0, 18.0]], [[-0.0, -42.0], [24.0, 42.0]], [[-0.0, 
+-24.0], [-18.0, 12.0]], [[12.0, -36.0], [12.0, 36.0]], [[-42.0, -6.0], [12.0, -36.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[1.0, -5.0, -6.0], [6.0, 1.0, -5.0]], [[1.0, -6.0, 3.0], [-1.0, 6.0, 3.0]]], [[[-5.0, 7.0, 
+-6.0], [1.0, 5.0, 2.0]], [[-5.0, 0.0, 5.0], [-2.0, 3.0, 5.0]]], [[[3.0, -1.0, -3.0], [-6.0, 0.0, 2.0]], [[4.0, 2.0, -7.0], 
+[7.0, 1.0, -2.0]]], [[[-2.0, 0.0, 0.0], [2.0, -1.0, 6.0]], [[5.0, -3.0, -3.0], [-7.0, -1.0, -3.0]]], [[[-7.0, -2.0, -1.0], 
+[2.0, 3.0, 5.0]], [[4.0, 3.0, -1.0], [2.0, -5.0, 6.0]]], [[[2.0, -5.0, -3.0], [-5.0, -7.0, 5.0]], [[-3.0, 3.0, 0.0], [7.0, 4.0, 
+-2.0]]]]),self.functionspace)
+      arg1=numpy.array([3.0, 0.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-39.0, -17.0], [24.0, 18.0]], [[-57.0, 17.0], [20.0, 29.0]], [[-12.0, -4.0], [-37.0, 7.0]], 
+[[-6.0, 48.0], [-6.0, -42.0]], [[-28.0, 41.0], [5.0, 48.0]], [[-15.0, 20.0], [-9.0, 7.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-6.0, -7.0], [4.0, 4.0]], [[0.0, 7.0], [-5.0, 2.0]], [[2.0, -7.0], [-1.0, 0.0]], [[3.0, -1.0], 
+[-6.0, -7.0]], [[-5.0, -4.0], [-7.0, -7.0]], [[1.0, -4.0], [6.0, -5.0]]]),self.functionspace)
+      arg1=numpy.array([0.0, -7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 42.0], [0.0, 49.0]], [[0.0, -28.0], [0.0, -28.0]]], [[[0.0, 0.0], [0.0, -49.0]], [[0.0, 
+35.0], [0.0, -14.0]]], [[[0.0, -14.0], [0.0, 49.0]], [[0.0, 7.0], [0.0, 0.0]]], [[[0.0, -21.0], [0.0, 7.0]], [[0.0, 42.0], 
+[0.0, 49.0]]], [[[0.0, 35.0], [0.0, 28.0]], [[0.0, 49.0], [0.0, 49.0]]], [[[0.0, -7.0], [0.0, 28.0]], [[0.0, -42.0], [0.0, 
+35.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[2.0, 1.0, 3.0], [-5.0, 6.0, 3.0]], [[-3.0, 4.0, -3.0], [0.0, -4.0, -7.0]]], [[[2.0, 6.0, 0.0], 
+[6.0, 2.0, 5.0]], [[0.0, 3.0, 0.0], [-7.0, 0.0, 7.0]]], [[[3.0, -3.0, 4.0], [5.0, 4.0, -6.0]], [[5.0, -2.0, -1.0], [-2.0, -3.0, 
+1.0]]], [[[0.0, -6.0, 5.0], [4.0, 5.0, 5.0]], [[7.0, 2.0, -5.0], [0.0, 1.0, 7.0]]], [[[-2.0, 0.0, 0.0], [-6.0, 3.0, 0.0]], 
+[[-6.0, 5.0, -2.0], [2.0, 6.0, 0.0]]], [[[0.0, -4.0, -2.0], [6.0, 2.0, 6.0]], [[1.0, 1.0, -6.0], [2.0, -2.0, 
+5.0]]]]),self.functionspace)
+      arg1=numpy.array([[0.0, -3.0, 0.0], [-7.0, 3.0, -4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-3.0, -23.0], [-18.0, 41.0]], [[-12.0, 45.0], [12.0, 16.0]]], [[[-18.0, 4.0], [-6.0, -56.0]], 
+[[-9.0, 9.0], [0.0, 21.0]]], [[[9.0, -46.0], [-12.0, 1.0]], [[6.0, -37.0], [9.0, 1.0]]], [[[18.0, -38.0], [-15.0, -33.0]], 
+[[-6.0, -23.0], [-3.0, -25.0]]], [[[0.0, 14.0], [-9.0, 51.0]], [[-15.0, 65.0], [-18.0, 4.0]]], [[[12.0, -4.0], [-6.0, -60.0]], 
+[[-3.0, 20.0], [6.0, -40.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[2.0, 5.0], [-7.0, -4.0]], [[4.0, 2.0], [0.0, -4.0]], [[3.0, -1.0], [1.0, 1.0]], [[-7.0, -5.0], 
+[-6.0, 1.0]], [[3.0, -7.0], [-1.0, -2.0]], [[2.0, -5.0], [0.0, 5.0]]]),self.functionspace)
+      arg1=Data(-4.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-8.0, -20.0], [28.0, 16.0]], [[-16.0, -8.0], [-0.0, 16.0]], [[-12.0, 4.0], [-4.0, -4.0]], [[28.0, 
+20.0], [24.0, -4.0]], [[-12.0, 28.0], [4.0, 8.0]], [[-8.0, 20.0], [-0.0, -20.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-7.0, 2.0, 0.0], [3.0, 1.0, 3.0]], [[-5.0, -6.0, -4.0], [-1.0, 3.0, 0.0]]], [[[0.0, 4.0, 2.0], 
+[7.0, -2.0, 7.0]], [[3.0, 6.0, -6.0], [2.0, 4.0, -5.0]]], [[[0.0, -7.0, -6.0], [2.0, -6.0, -1.0]], [[7.0, 5.0, 2.0], [0.0, 2.0, 
+7.0]]], [[[-7.0, -6.0, 4.0], [-7.0, 2.0, 1.0]], [[5.0, 2.0, 2.0], [1.0, -5.0, -5.0]]], [[[0.0, 6.0, -2.0], [-5.0, 0.0, -3.0]], 
+[[6.0, 3.0, -5.0], [-5.0, -1.0, -6.0]]], [[[1.0, -7.0, -5.0], [2.0, 6.0, 7.0]], [[7.0, -5.0, 0.0], [-3.0, 3.0, 
+-3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([1.0, 2.0, 0.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-3.0, 5.0], [-17.0, 5.0]], [[8.0, 3.0], [15.0, 10.0]], [[-14.0, -10.0], [17.0, 4.0]], [[-19.0, 
+-3.0], [9.0, -9.0]], [[12.0, -5.0], [12.0, -7.0]], [[-13.0, 14.0], [-3.0, 3.0]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[4.0, 3.0], [-7.0, 3.0]], [[2.0, 0.0], [5.0, 5.0]], [[7.0, 0.0], [6.0, -7.0]], [[-6.0, -1.0], 
+[7.0, -6.0]], [[4.0, -5.0], [1.0, 1.0]], [[-6.0, 0.0], [-6.0, 0.0]]]),self.functionspace)
+      arg1=Data(numpy.array([0.0, -7.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, -28.0], [0.0, -21.0]], [[0.0, 49.0], [0.0, -21.0]]], [[[0.0, -14.0], [0.0, 0.0]], [[0.0, 
+-35.0], [0.0, -35.0]]], [[[0.0, -49.0], [0.0, 0.0]], [[0.0, -42.0], [0.0, 49.0]]], [[[0.0, 42.0], [0.0, 7.0]], [[0.0, -49.0], 
+[0.0, 42.0]]], [[[0.0, -28.0], [0.0, 35.0]], [[0.0, -7.0], [0.0, -7.0]]], [[[0.0, 42.0], [0.0, 0.0]], [[0.0, 42.0], [0.0, 
+0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[7.0, -7.0, 6.0], [-1.0, -1.0, -2.0]], [[7.0, 1.0, -1.0], [2.0, -1.0, -3.0]]], [[[3.0, 7.0, 
+-5.0], [-1.0, -7.0, 2.0]], [[7.0, -7.0, 0.0], [-2.0, 0.0, -1.0]]], [[[7.0, 0.0, 0.0], [-5.0, -3.0, 4.0]], [[-6.0, -1.0, 4.0], 
+[2.0, 0.0, -2.0]]], [[[-2.0, -2.0, 6.0], [4.0, -6.0, 3.0]], [[0.0, -7.0, -6.0], [7.0, 3.0, -4.0]]], [[[6.0, 3.0, -1.0], [6.0, 
+0.0, 7.0]], [[2.0, -6.0, -7.0], [0.0, -6.0, 6.0]]], [[[-3.0, -5.0, 0.0], [3.0, 3.0, 5.0]], [[-4.0, -7.0, 1.0], [-7.0, 7.0, 
+4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-6.0, 5.0, 7.0], [-5.0, 3.0, 0.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-35.0, -56.0], [-13.0, 2.0]], [[-44.0, -32.0], [-38.0, -13.0]]], [[[-18.0, 6.0], [-15.0, 
+-16.0]], [[-77.0, -56.0], [5.0, 10.0]]], [[[-42.0, -35.0], [43.0, 16.0]], [[59.0, 27.0], [-26.0, -10.0]]], [[[44.0, 4.0], 
+[-33.0, -38.0]], [[-77.0, -21.0], [-55.0, -26.0]]], [[[-28.0, -21.0], [13.0, -30.0]], [[-91.0, -28.0], [12.0, -18.0]]], 
+[[[-7.0, 0.0], [32.0, -6.0]], [[-4.0, -1.0], [105.0, 56.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[5.0, 1.0], [4.0, -1.0]], [[6.0, -3.0], [1.0, 3.0]], [[-2.0, -6.0], [2.0, 1.0]], [[-5.0, 5.0], 
+[2.0, -1.0]], [[0.0, 4.0], [1.0, -1.0]], [[6.0, 0.0], [-1.0, 1.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(3.0)+(1-msk_arg1)*(-4.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[15.0, 3.0], [12.0, -3.0]], [[18.0, -9.0], [3.0, 9.0]], [[-6.0, -18.0], [6.0, 3.0]], [[-15.0, 
+15.0], [6.0, -3.0]], [[0.0, 12.0], [3.0, -3.0]], [[18.0, 0.0], [-3.0, 3.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, -4.0], [-16.0, 
+4.0]], [[-24.0, 12.0], [-4.0, -12.0]], [[8.0, 24.0], [-8.0, -4.0]], [[20.0, -20.0], [-8.0, 4.0]], [[-0.0, -16.0], [-4.0, 4.0]], 
+[[-24.0, -0.0], [4.0, -4.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, -1.0, 0.0], [3.0, 6.0, 1.0]], [[0.0, -3.0, 5.0], [-4.0, -4.0, -4.0]]], [[[-4.0, 4.0, 5.0], 
+[-4.0, -4.0, 5.0]], [[-5.0, 3.0, -6.0], [-4.0, 0.0, 2.0]]], [[[-1.0, -2.0, 5.0], [2.0, 7.0, -4.0]], [[-6.0, -2.0, 1.0], [-7.0, 
+5.0, -4.0]]], [[[-5.0, 3.0, 2.0], [-2.0, -4.0, 5.0]], [[6.0, 7.0, -7.0], [4.0, 1.0, -6.0]]], [[[2.0, 0.0, 7.0], [6.0, -2.0, 
+3.0]], [[-6.0, 7.0, 0.0], [6.0, -5.0, -4.0]]], [[[4.0, -4.0, -5.0], [2.0, 0.0, 5.0]], [[1.0, 2.0, 2.0], [6.0, -2.0, 
+1.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-6.0, 4.0, -6.0])+(1.-msk_arg1)*numpy.array([0.0, 6.0, -4.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-4.0, 0.0], [-42.0, 32.0]], [[10.0, -22.0], [78.0, 12.0]], [[-32.0, 40.0], [22.0, 86.0]], 
+[[30.0, -34.0], [34.0, 16.0]], [[-54.0, -62.0], [64.0, -32.0]], [[-10.0, -42.0], [-10.0, 
+-50.0]]])+(1.-msk_ref)*numpy.array([[[-6.0, 32.0], [-38.0, -8.0]], [[4.0, -44.0], [42.0, -8.0]], [[-32.0, 58.0], [-16.0, 
+46.0]], [[10.0, -44.0], [70.0, 30.0]], [[-28.0, -24.0], [42.0, -14.0]], [[-4.0, -20.0], [4.0, -16.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, 7.0], [-6.0, 0.0]], [[-5.0, 2.0], [5.0, 7.0]], [[-3.0, 5.0], [0.0, 7.0]], [[4.0, 3.0], 
+[0.0, 1.0]], [[7.0, -5.0], [6.0, -1.0]], [[-5.0, -7.0], [-1.0, -6.0]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([7.0, 7.0])+(1.-msk_arg1)*numpy.array([5.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [49.0, 49.0]], [[-42.0, -42.0], [0.0, 0.0]]], [[[-35.0, -35.0], [14.0, 14.0]], 
+[[35.0, 35.0], [49.0, 49.0]]], [[[-21.0, -21.0], [35.0, 35.0]], [[0.0, 0.0], [49.0, 49.0]]], [[[28.0, 28.0], [21.0, 21.0]], 
+[[0.0, 0.0], [7.0, 7.0]]], [[[49.0, 49.0], [-35.0, -35.0]], [[42.0, 42.0], [-7.0, -7.0]]], [[[-35.0, -35.0], [-49.0, -49.0]], 
+[[-7.0, -7.0], [-42.0, -42.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [35.0, 0.0]], [[-30.0, 0.0], [0.0, 0.0]]], [[[-25.0, 
+0.0], [10.0, 0.0]], [[25.0, 0.0], [35.0, 0.0]]], [[[-15.0, 0.0], [25.0, 0.0]], [[0.0, 0.0], [35.0, 0.0]]], [[[20.0, 0.0], 
+[15.0, 0.0]], [[0.0, 0.0], [5.0, 0.0]]], [[[35.0, 0.0], [-25.0, 0.0]], [[30.0, 0.0], [-5.0, 0.0]]], [[[-25.0, 0.0], [-35.0, 
+0.0]], [[-5.0, 0.0], [-30.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[3.0, -6.0, -6.0], [6.0, -4.0, -2.0]], [[4.0, -4.0, 5.0], [-5.0, -5.0, 1.0]]], [[[3.0, -2.0, 
+3.0], [-3.0, -5.0, -3.0]], [[0.0, 4.0, -1.0], [-7.0, 2.0, 7.0]]], [[[4.0, -1.0, 4.0], [1.0, -4.0, 1.0]], [[-6.0, 4.0, 1.0], 
+[2.0, 0.0, -4.0]]], [[[5.0, 6.0, 5.0], [0.0, -6.0, -1.0]], [[2.0, 7.0, -2.0], [4.0, 7.0, -1.0]]], [[[6.0, 2.0, 0.0], [7.0, 6.0, 
+1.0]], [[1.0, -6.0, 5.0], [4.0, -4.0, -3.0]]], [[[0.0, 5.0, 0.0], [-4.0, -3.0, 0.0]], [[3.0, -5.0, 5.0], [4.0, 0.0, 
+-1.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[2.0, -4.0, 7.0], [-1.0, 7.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 0.0, -2.0], [0.0, 7.0, 
+1.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-12.0, -39.0], [14.0, -32.0]], [[59.0, -37.0], [17.0, -31.0]]], [[[35.0, -20.0], [-7.0, 
+-29.0]], [[-23.0, 29.0], [27.0, 14.0]]], [[[40.0, -15.0], [25.0, -30.0]], [[-21.0, 33.0], [-24.0, 2.0]]], [[[21.0, 32.0], 
+[17.0, -41.0]], [[-38.0, 49.0], [-27.0, 46.0]]], [[[4.0, 8.0], [-3.0, 34.0]], [[61.0, -48.0], [3.0, -29.0]]], [[[-20.0, 35.0], 
+[4.0, -17.0]], [[61.0, -43.0], [1.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -48.0], [-32.0, -30.0]], [[-34.0, -23.0], 
+[28.0, -34.0]]], [[[-24.0, -11.0], [24.0, -38.0]], [[2.0, 27.0], [28.0, 21.0]]], [[[-32.0, -3.0], [-8.0, -27.0]], [[34.0, 
+29.0], [-4.0, -4.0]]], [[[-40.0, 47.0], [2.0, -43.0]], [[-8.0, 47.0], [-22.0, 48.0]]], [[[-36.0, 14.0], [-44.0, 43.0]], 
+[[-16.0, -37.0], [-18.0, -31.0]]], [[[0.0, 35.0], [24.0, -21.0]], [[-28.0, -30.0], [-22.0, -1.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[7.0, 7.0, -6.0, 7.0], [5.0, 7.0, 4.0, 6.0], [0.0, 5.0, -3.0, -4.0]], [[5.0, 2.0, 6.0, 0.0], 
+[0.0, 6.0, -6.0, -3.0], [-3.0, 6.0, 4.0, 4.0]]], [[[4.0, 1.0, 5.0, -3.0], [2.0, 3.0, 2.0, 5.0], [5.0, 0.0, 7.0, 0.0]], [[7.0, 
+-6.0, -3.0, 3.0], [-3.0, 0.0, 2.0, -5.0], [-5.0, 5.0, -7.0, -1.0]]], [[[3.0, 3.0, 4.0, -6.0], [2.0, -6.0, 5.0, 6.0], [3.0, 
+-4.0, 5.0, 0.0]], [[-3.0, -6.0, 4.0, 6.0], [6.0, -2.0, -3.0, -7.0], [5.0, 3.0, 7.0, 2.0]]]]),self.functionspace)
+      arg1=4.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[28.0, 28.0, -24.0, 28.0], [20.0, 28.0, 16.0, 24.0], [0.0, 20.0, -12.0, -16.0]], [[20.0, 8.0, 
+24.0, 0.0], [0.0, 24.0, -24.0, -12.0], [-12.0, 24.0, 16.0, 16.0]]], [[[16.0, 4.0, 20.0, -12.0], [8.0, 12.0, 8.0, 20.0], [20.0, 
+0.0, 28.0, 0.0]], [[28.0, -24.0, -12.0, 12.0], [-12.0, 0.0, 8.0, -20.0], [-20.0, 20.0, -28.0, -4.0]]], [[[12.0, 12.0, 16.0, 
+-24.0], [8.0, -24.0, 20.0, 24.0], [12.0, -16.0, 20.0, 0.0]], [[-12.0, -24.0, 16.0, 24.0], [24.0, -8.0, -12.0, -28.0], [20.0, 
+12.0, 28.0, 8.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[2.0, 7.0, -1.0, 1.0], [5.0, 6.0, -6.0, -7.0], [7.0, -6.0, -6.0, 0.0]], [[-2.0, 5.0, 0.0, 1.0], 
+[3.0, 0.0, 0.0, -1.0], [-3.0, -6.0, 1.0, -5.0]]], [[[-1.0, 0.0, -6.0, 2.0], [2.0, 1.0, -7.0, -6.0], [-7.0, -1.0, -3.0, 4.0]], 
+[[1.0, -5.0, 4.0, 4.0], [-4.0, 5.0, 1.0, 2.0], [-7.0, 1.0, 0.0, 1.0]]], [[[4.0, -1.0, -6.0, 7.0], [0.0, 7.0, 2.0, -6.0], [1.0, 
+-5.0, -3.0, 0.0]], [[5.0, 4.0, -7.0, 2.0], [2.0, -4.0, 0.0, 0.0], [-6.0, -7.0, 1.0, -6.0]]]]),self.functionspace)
+      arg1=numpy.array(2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[4.0, 14.0, -2.0, 2.0], [10.0, 12.0, -12.0, -14.0], [14.0, -12.0, -12.0, 0.0]], [[-4.0, 10.0, 
+0.0, 2.0], [6.0, 0.0, 0.0, -2.0], [-6.0, -12.0, 2.0, -10.0]]], [[[-2.0, 0.0, -12.0, 4.0], [4.0, 2.0, -14.0, -12.0], [-14.0, 
+-2.0, -6.0, 8.0]], [[2.0, -10.0, 8.0, 8.0], [-8.0, 10.0, 2.0, 4.0], [-14.0, 2.0, 0.0, 2.0]]], [[[8.0, -2.0, -12.0, 14.0], [0.0, 
+14.0, 4.0, -12.0], [2.0, -10.0, -6.0, 0.0]], [[10.0, 8.0, -14.0, 4.0], [4.0, -8.0, 0.0, 0.0], [-12.0, -14.0, 2.0, 
+-12.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[5.0, -4.0, 0.0, -4.0], [-6.0, -1.0, -6.0, 4.0], [-7.0, -3.0, 4.0, 3.0]], [[-5.0, -3.0, 5.0, 
+-2.0], [7.0, 7.0, -7.0, -6.0], [-4.0, 0.0, -6.0, 0.0]]], [[[1.0, -3.0, -4.0, 6.0], [1.0, 2.0, 2.0, -6.0], [4.0, -3.0, -5.0, 
+-1.0]], [[3.0, 0.0, 6.0, -3.0], [0.0, 0.0, 4.0, -5.0], [0.0, -2.0, 4.0, -6.0]]], [[[-7.0, -3.0, -7.0, 4.0], [3.0, -3.0, -6.0, 
+6.0], [7.0, -3.0, -5.0, 2.0]], [[-4.0, 3.0, 0.0, -7.0], [-3.0, 3.0, -4.0, 0.0], [6.0, 5.0, -6.0, -3.0]]]]),self.functionspace)
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]], [[-0.0, -0.0, 0.0, 
+-0.0], [0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 
+-0.0]], [[0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, -0.0]]], [[[-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, 
+0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]]]),self.functionspace)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[1.0, 3.0, -7.0, -4.0], [-2.0, -3.0, 6.0, -6.0], [-7.0, -4.0, -1.0, 3.0]], [[-1.0, 0.0, 0.0, 
+1.0], [-1.0, -7.0, 3.0, 5.0], [-3.0, 2.0, 1.0, 5.0]]], [[[-1.0, 1.0, -4.0, 6.0], [0.0, 2.0, -6.0, -5.0], [-2.0, -5.0, -3.0, 
+0.0]], [[-4.0, -3.0, 0.0, -5.0], [-2.0, -1.0, 6.0, 0.0], [0.0, 7.0, 5.0, 0.0]]], [[[3.0, -5.0, -6.0, -4.0], [-7.0, 0.0, -4.0, 
+4.0], [-4.0, 3.0, -1.0, 7.0]], [[4.0, 7.0, 5.0, -2.0], [-4.0, -1.0, 7.0, 6.0], [-7.0, 1.0, -4.0, -6.0]]]]),self.functionspace)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(-6.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[1.0, 3.0, -7.0, -4.0], [-2.0, -3.0, 6.0, -6.0], [-7.0, -4.0, -1.0, 3.0]], [[-1.0, 0.0, 0.0, 
+1.0], [-1.0, -7.0, 3.0, 5.0], [-3.0, 2.0, 1.0, 5.0]]], [[[-1.0, 1.0, -4.0, 6.0], [0.0, 2.0, -6.0, -5.0], [-2.0, -5.0, -3.0, 
+0.0]], [[-4.0, -3.0, 0.0, -5.0], [-2.0, -1.0, 6.0, 0.0], [0.0, 7.0, 5.0, 0.0]]], [[[3.0, -5.0, -6.0, -4.0], [-7.0, 0.0, -4.0, 
+4.0], [-4.0, 3.0, -1.0, 7.0]], [[4.0, 7.0, 5.0, -2.0], [-4.0, -1.0, 7.0, 6.0], [-7.0, 1.0, -4.0, 
+-6.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -18.0, 42.0, 24.0], [12.0, 18.0, -36.0, 36.0], [42.0, 24.0, 6.0, -18.0]], [[6.0, 
+-0.0, -0.0, -6.0], [6.0, 42.0, -18.0, -30.0], [18.0, -12.0, -6.0, -30.0]]], [[[6.0, -6.0, 24.0, -36.0], [-0.0, -12.0, 36.0, 
+30.0], [12.0, 30.0, 18.0, -0.0]], [[24.0, 18.0, -0.0, 30.0], [12.0, 6.0, -36.0, -0.0], [-0.0, -42.0, -30.0, -0.0]]], [[[-18.0, 
+30.0, 36.0, 24.0], [42.0, -0.0, 24.0, -24.0], [24.0, -18.0, 6.0, -42.0]], [[-24.0, -42.0, -30.0, 12.0], [24.0, 6.0, -42.0, 
+-36.0], [42.0, -6.0, 24.0, 36.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-7.0)+(1-msk_arg0)*(7.0)
+      arg1=-2.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(14.0)+(1.-msk_ref)*numpy.array(-14.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(0.0)
+      arg1=numpy.array(1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(6.0)+(1.-msk_ref)*numpy.array(0.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([3.0, 0.0, 4.0])+(1.-msk_arg0)*numpy.array([1.0, 4.0, 1.0])
+      arg1=numpy.array([3.0, 7.0, -7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-19.0)+(1.-msk_ref)*numpy.array(24.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, 6.0, 5.0], [3.0, 6.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-7.0, -4.0, -2.0], [-3.0, 5.0, 
+0.0]])
+      arg1=numpy.array([[-5.0, 4.0, -2.0], [-2.0, -1.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-13.0)+(1.-msk_ref)*numpy.array(24.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 5.0, -3.0], [-2.0, 4.0, 0.0], [-5.0, -3.0, 6.0], [-4.0, 0.0, -5.0]], [[-4.0, -1.0, 
+-1.0], [-4.0, 4.0, 4.0], [-3.0, 0.0, -2.0], [-6.0, -5.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 2.0, 0.0], [-6.0, -6.0, 
+-3.0], [0.0, 6.0, -1.0], [7.0, 5.0, -7.0]], [[7.0, 5.0, 6.0], [-4.0, -1.0, -1.0], [0.0, 0.0, 0.0], [6.0, -4.0, -5.0]]])
+      arg1=numpy.array([[[5.0, -6.0, 2.0], [3.0, 2.0, 2.0], [2.0, 5.0, 2.0], [-2.0, -6.0, -1.0]], [[-4.0, 0.0, 1.0], [1.0, 3.0, 
+3.0], [-4.0, -1.0, -3.0], [-1.0, 2.0, -3.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(15.0)+(1.-msk_ref)*numpy.array(-88.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-6.0, 6.0], [3.0, 0.0], [2.0, 1.0]], [[-1.0, -2.0], [1.0, -5.0], [-1.0, -3.0]]], [[[0.0, 
+-3.0], [-3.0, 1.0], [5.0, 7.0]], [[6.0, 2.0], [-2.0, 6.0], [1.0, 1.0]]], [[[0.0, -6.0], [-4.0, 3.0], [2.0, 1.0]], [[-5.0, 
+-2.0], [-2.0, 1.0], [2.0, -1.0]]], [[[6.0, -3.0], [0.0, -1.0], [0.0, 5.0]], [[6.0, -6.0], [-5.0, 1.0], [0.0, 
+-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, -6.0], [-5.0, 3.0], [-2.0, 4.0]], [[6.0, 5.0], [2.0, 1.0], [6.0, -4.0]]], [[[-3.0, 
+-3.0], [-5.0, -5.0], [0.0, -4.0]], [[3.0, -3.0], [0.0, -3.0], [-1.0, -2.0]]], [[[3.0, 3.0], [6.0, 4.0], [0.0, 3.0]], [[7.0, 
+-2.0], [5.0, 0.0], [6.0, 7.0]]], [[[1.0, 2.0], [3.0, 0.0], [7.0, -1.0]], [[4.0, 4.0], [4.0, -1.0], [-5.0, 6.0]]]])
+      arg1=numpy.array([[[[-5.0, -7.0], [7.0, 4.0], [-7.0, 5.0]], [[0.0, 3.0], [0.0, 4.0], [-7.0, 6.0]]], [[[2.0, 0.0], [-2.0, 
+2.0], [2.0, -3.0]], [[-4.0, -3.0], [6.0, 6.0], [0.0, 0.0]]], [[[-6.0, 7.0], [-6.0, 7.0], [0.0, 7.0]], [[2.0, 0.0], [4.0, 6.0], 
+[-4.0, 0.0]]], [[[0.0, 0.0], [1.0, -1.0], [-2.0, 4.0]], [[-2.0, 0.0], [1.0, 2.0], [-7.0, 6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-74.0)+(1.-msk_ref)*numpy.array(47.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-1.0)+(1-msk_arg0)*(-4.0)
+      arg1=numpy.array([-3.0, -2.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([3.0, 2.0])+(1.-msk_ref)*numpy.array([12.0, 8.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([5.0, -5.0, -6.0])+(1.-msk_arg0)*numpy.array([-5.0, 1.0, 6.0])
+      arg1=numpy.array([[4.0, 3.0, 5.0], [5.0, 4.0, -4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-25.0, 29.0])+(1.-msk_ref)*numpy.array([13.0, -45.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 6.0, -5.0], [-6.0, -4.0, -3.0]])+(1.-msk_arg0)*numpy.array([[3.0, 0.0, 4.0], [7.0, 4.0, 
+-1.0]])
+      arg1=numpy.array([[[-4.0, 1.0, 3.0], [0.0, 4.0, 0.0]], [[1.0, -7.0, -3.0], [0.0, -6.0, -1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-25.0, 0.0])+(1.-msk_ref)*numpy.array([16.0, -32.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -5.0, -4.0], [5.0, -3.0, 0.0], [-1.0, 0.0, -6.0], [6.0, 0.0, 2.0]], [[6.0, -7.0, -1.0], 
+[-3.0, 4.0, 5.0], [4.0, 4.0, -2.0], [4.0, -7.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -3.0, -1.0], [-7.0, -1.0, 1.0], 
+[6.0, 4.0, 3.0], [-5.0, -5.0, 0.0]], [[5.0, 3.0, 3.0], [-3.0, 5.0, -4.0], [-5.0, 0.0, 4.0], [2.0, 7.0, 5.0]]])
+      arg1=numpy.array([[[[5.0, -4.0, -4.0], [-4.0, 5.0, -5.0], [6.0, -4.0, -5.0], [3.0, 1.0, -4.0]], [[-7.0, -1.0, -7.0], 
+[3.0, -2.0, -4.0], [-5.0, 5.0, 0.0], [6.0, -6.0, -2.0]]], [[[-5.0, 3.0, 1.0], [1.0, 7.0, 1.0], [6.0, -5.0, 0.0], [-4.0, 1.0, 
+-5.0]], [[0.0, -7.0, -7.0], [-1.0, 0.0, 4.0], [0.0, 3.0, -4.0], [1.0, -7.0, 2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([44.0, 69.0])+(1.-msk_ref)*numpy.array([-78.0, -80.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(6.0)
+      arg1=numpy.array([[-6.0, 4.0, -2.0, -2.0, -5.0], [-7.0, -5.0, -4.0, -7.0, 7.0], [-1.0, -7.0, -2.0, 4.0, 1.0], [-7.0, 0.0, 
+0.0, 1.0, -5.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[30.0, -20.0, 10.0, 10.0, 25.0], [35.0, 25.0, 20.0, 35.0, -35.0], [5.0, 35.0, 10.0, -20.0, 
+-5.0], [35.0, -0.0, -0.0, -5.0, 25.0]])+(1.-msk_ref)*numpy.array([[-36.0, 24.0, -12.0, -12.0, -30.0], [-42.0, -30.0, -24.0, 
+-42.0, 42.0], [-6.0, -42.0, -12.0, 24.0, 6.0], [-42.0, 0.0, 0.0, 6.0, -30.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([0.0, 3.0, 4.0])+(1.-msk_arg0)*numpy.array([-7.0, 0.0, -4.0])
+      arg1=numpy.array([[[-6.0, 5.0, -7.0], [2.0, 5.0, 3.0], [1.0, -2.0, -7.0], [0.0, 6.0, -7.0], [-7.0, -7.0, -4.0]], [[-5.0, 
+7.0, 7.0], [-1.0, -7.0, -2.0], [2.0, 5.0, -7.0], [-2.0, -1.0, 4.0], [3.0, -7.0, -3.0]], [[7.0, 5.0, 2.0], [2.0, -7.0, -6.0], 
+[-1.0, 4.0, -1.0], [4.0, -1.0, 7.0], [2.0, -3.0, -4.0]], [[7.0, -2.0, 4.0], [-2.0, 6.0, 1.0], [0.0, 3.0, 0.0], [-3.0, 5.0, 
+3.0], [-2.0, 2.0, 1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-13.0, 27.0, -34.0, -10.0, -37.0], [49.0, -29.0, -13.0, 13.0, -33.0], [23.0, -45.0, 8.0, 25.0, 
+-25.0], [10.0, 22.0, 9.0, 27.0, 10.0]])+(1.-msk_ref)*numpy.array([[70.0, -26.0, 21.0, 28.0, 65.0], [7.0, 15.0, 14.0, -2.0, 
+-9.0], [-57.0, 10.0, 11.0, -56.0, 2.0], [-65.0, 10.0, 0.0, 9.0, 10.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-4.0, 7.0, 6.0], [1.0, 4.0, -3.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -2.0, -6.0], [-6.0, 
+7.0, 3.0]])
+      arg1=numpy.array([[[[5.0, 2.0, 4.0], [0.0, -1.0, 2.0]], [[1.0, 7.0, -4.0], [6.0, 0.0, 1.0]], [[3.0, 6.0, -5.0], [2.0, 
+5.0, 7.0]], [[0.0, 5.0, -3.0], [0.0, -4.0, -3.0]], [[4.0, -4.0, -2.0], [-6.0, 0.0, -2.0]]], [[[-5.0, 7.0, -4.0], [0.0, 3.0, 
+-7.0]], [[-4.0, 6.0, 0.0], [2.0, -6.0, -6.0]], [[-7.0, -1.0, -7.0], [7.0, 0.0, 6.0]], [[-1.0, -7.0, -1.0], [-5.0, 7.0, -3.0]], 
+[[-6.0, -4.0, 5.0], [-6.0, -4.0, 0.0]]], [[[-1.0, 3.0, -2.0], [-7.0, -4.0, 0.0]], [[-2.0, 6.0, 1.0], [-7.0, 5.0, -4.0]], [[5.0, 
+5.0, -6.0], [1.0, -6.0, 7.0]], [[-2.0, 4.0, 0.0], [3.0, -3.0, -6.0]], [[-2.0, 2.0, -1.0], [0.0, -5.0, 4.0]]], [[[-5.0, 5.0, 
+4.0], [7.0, -3.0, -7.0]], [[3.0, 5.0, -2.0], [-1.0, -4.0, 1.0]], [[4.0, -2.0, -2.0], [7.0, -7.0, 2.0]], [[2.0, -2.0, -6.0], 
+[4.0, -4.0, -4.0]], [[-5.0, 4.0, -2.0], [4.0, 0.0, 0.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[8.0, 24.0, 1.0, 10.0, -56.0], [78.0, 54.0, -32.0, -19.0, 4.0], [-10.0, 81.0, -65.0, 45.0, 
+-16.0], [95.0, -9.0, -69.0, -58.0, 40.0]])+(1.-msk_ref)*numpy.array([[-54.0, -28.0, 47.0, -29.0, 30.0], [35.0, -64.0, 55.0, 
+95.0, 16.0], [25.0, 57.0, -26.0, -55.0, -11.0], [-93.0, -32.0, -89.0, -34.0, 5.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(-7.0)
+      arg1=numpy.array([[[-4.0, -1.0], [-7.0, 2.0]], [[-1.0, 7.0], [7.0, 6.0]], [[5.0, 0.0], [-3.0, -5.0]], [[-2.0, 6.0], 
+[-6.0, 3.0]], [[-2.0, -4.0], [4.0, 6.0]], [[-7.0, -6.0], [3.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[16.0, 4.0], [28.0, -8.0]], [[4.0, -28.0], [-28.0, -24.0]], [[-20.0, -0.0], [12.0, 20.0]], 
+[[8.0, -24.0], [24.0, -12.0]], [[8.0, 16.0], [-16.0, -24.0]], [[28.0, 24.0], [-12.0, -0.0]]])+(1.-msk_ref)*numpy.array([[[28.0, 
+7.0], [49.0, -14.0]], [[7.0, -49.0], [-49.0, -42.0]], [[-35.0, -0.0], [21.0, 35.0]], [[14.0, -42.0], [42.0, -21.0]], [[14.0, 
+28.0], [-28.0, -42.0]], [[49.0, 42.0], [-21.0, -0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-4.0, -3.0, 7.0])+(1.-msk_arg0)*numpy.array([-1.0, 5.0, 5.0])
+      arg1=numpy.array([[[[2.0, 1.0, -5.0], [-1.0, -1.0, -7.0]], [[3.0, -7.0, -6.0], [-3.0, 0.0, -5.0]]], [[[7.0, 7.0, -4.0], 
+[1.0, 5.0, -4.0]], [[-5.0, 7.0, 3.0], [0.0, 3.0, 7.0]]], [[[-4.0, -6.0, 7.0], [7.0, 4.0, 2.0]], [[-2.0, 1.0, 3.0], [-2.0, 4.0, 
+3.0]]], [[[7.0, 4.0, 2.0], [6.0, -6.0, -5.0]], [[6.0, -1.0, 2.0], [-2.0, -6.0, -7.0]]], [[[-1.0, 7.0, 3.0], [4.0, 0.0, 2.0]], 
+[[7.0, -1.0, -1.0], [1.0, -2.0, 2.0]]], [[[-2.0, 4.0, 3.0], [3.0, 6.0, 1.0]], [[1.0, -1.0, -4.0], [4.0, 2.0, 1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-46.0, -42.0], [-33.0, -23.0]], [[-77.0, -47.0], [20.0, 40.0]], [[83.0, -26.0], [26.0, 17.0]], 
+[[-26.0, -41.0], [-7.0, -23.0]], [[4.0, -2.0], [-32.0, 16.0]], [[17.0, -23.0], [-29.0, 
+-15.0]]])+(1.-msk_ref)*numpy.array([[[-22.0, -39.0], [-68.0, -22.0]], [[8.0, 4.0], [55.0, 50.0]], [[9.0, 23.0], [22.0, 37.0]], 
+[[23.0, -61.0], [-1.0, -63.0]], [[51.0, 6.0], [-17.0, -1.0]], [[37.0, 32.0], [-26.0, 11.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(1.0)
+      arg1=numpy.array([[[[-2.0, -2.0, -5.0, 5.0], [-2.0, -5.0, 6.0, -6.0], [-2.0, -4.0, 2.0, 7.0]], [[5.0, -7.0, 0.0, -2.0], 
+[-7.0, -4.0, 7.0, 3.0], [0.0, 4.0, -3.0, 7.0]]], [[[2.0, 1.0, -4.0, -1.0], [-4.0, 0.0, 2.0, 4.0], [7.0, 5.0, 2.0, -7.0]], 
+[[-2.0, -1.0, 0.0, -4.0], [3.0, 2.0, 3.0, -5.0], [4.0, 5.0, 0.0, -1.0]]], [[[-6.0, 7.0, -7.0, -1.0], [3.0, 6.0, -1.0, 7.0], 
+[-2.0, 2.0, -2.0, -3.0]], [[4.0, 6.0, 7.0, -5.0], [7.0, -4.0, -3.0, -7.0], [-7.0, -6.0, -4.0, -4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[10.0, 10.0, 25.0, -25.0], [10.0, 25.0, -30.0, 30.0], [10.0, 20.0, -10.0, -35.0]], [[-25.0, 
+35.0, -0.0, 10.0], [35.0, 20.0, -35.0, -15.0], [-0.0, -20.0, 15.0, -35.0]]], [[[-10.0, -5.0, 20.0, 5.0], [20.0, -0.0, -10.0, 
+-20.0], [-35.0, -25.0, -10.0, 35.0]], [[10.0, 5.0, -0.0, 20.0], [-15.0, -10.0, -15.0, 25.0], [-20.0, -25.0, -0.0, 5.0]]], 
+[[[30.0, -35.0, 35.0, 5.0], [-15.0, -30.0, 5.0, -35.0], [10.0, -10.0, 10.0, 15.0]], [[-20.0, -30.0, -35.0, 25.0], [-35.0, 20.0, 
+15.0, 35.0], [35.0, 30.0, 20.0, 20.0]]]])+(1.-msk_ref)*numpy.array([[[[-2.0, -2.0, -5.0, 5.0], [-2.0, -5.0, 6.0, -6.0], [-2.0, 
+-4.0, 2.0, 7.0]], [[5.0, -7.0, 0.0, -2.0], [-7.0, -4.0, 7.0, 3.0], [0.0, 4.0, -3.0, 7.0]]], [[[2.0, 1.0, -4.0, -1.0], [-4.0, 
+0.0, 2.0, 4.0], [7.0, 5.0, 2.0, -7.0]], [[-2.0, -1.0, 0.0, -4.0], [3.0, 2.0, 3.0, -5.0], [4.0, 5.0, 0.0, -1.0]]], [[[-6.0, 7.0, 
+-7.0, -1.0], [3.0, 6.0, -1.0, 7.0], [-2.0, 2.0, -2.0, -3.0]], [[4.0, 6.0, 7.0, -5.0], [7.0, -4.0, -3.0, -7.0], [-7.0, -6.0, 
+-4.0, -4.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-7.0)+(1-msk_arg0)*(7.0)
+      arg1=Data(-2.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(14.0)+(1.-msk_ref)*numpy.array(-14.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-3.0, -1.0, 4.0])+(1.-msk_arg0)*numpy.array([1.0, 6.0, 5.0])
+      arg1=Data(numpy.array([-6.0, 5.0, -5.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-7.0)+(1.-msk_ref)*numpy.array(-1.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 1.0, -4.0], [0.0, 7.0, 6.0]])+(1.-msk_arg0)*numpy.array([[0.0, -3.0, -7.0], [6.0, 2.0, 
+0.0]])
+      arg1=Data(numpy.array([[-4.0, 7.0, -7.0], [1.0, 6.0, -7.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(19.0)+(1.-msk_ref)*numpy.array(46.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[3.0, 7.0, -3.0], [2.0, 3.0, 2.0], [1.0, 1.0, 7.0], [7.0, -7.0, 0.0]], [[-1.0, 1.0, -4.0], 
+[6.0, -4.0, 4.0], [-6.0, -3.0, 0.0], [3.0, 1.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, -2.0, -7.0], [0.0, 3.0, -7.0], 
+[-3.0, -6.0, 5.0], [5.0, 5.0, 0.0]], [[0.0, -2.0, -7.0], [0.0, 4.0, 0.0], [5.0, -1.0, -6.0], [-3.0, 0.0, -7.0]]])
+      arg1=Data(numpy.array([[[3.0, -7.0, -2.0], [-7.0, 6.0, 6.0], [0.0, 7.0, -3.0], [-4.0, 5.0, -2.0]], [[4.0, 0.0, 0.0], 
+[2.0, -6.0, 0.0], [-1.0, -3.0, 0.0], [0.0, 0.0, -6.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-66.0)+(1.-msk_ref)*numpy.array(-53.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, -1.0], [-4.0, 1.0], [0.0, -2.0]], [[2.0, 6.0], [7.0, -2.0], [1.0, -3.0]]], [[[-5.0, 
+-1.0], [1.0, 0.0], [1.0, -3.0]], [[-6.0, -7.0], [-2.0, 3.0], [5.0, -7.0]]], [[[-4.0, 5.0], [-6.0, -4.0], [1.0, 6.0]], [[-7.0, 
+6.0], [-3.0, 6.0], [-1.0, -1.0]]], [[[7.0, -5.0], [-4.0, -2.0], [-3.0, 0.0]], [[3.0, 3.0], [1.0, 6.0], [1.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, 2.0], [7.0, -6.0], [-1.0, 2.0]], [[-3.0, 1.0], [6.0, 0.0], [-7.0, 5.0]]], [[[-2.0, 
+1.0], [3.0, -5.0], [-5.0, 5.0]], [[-3.0, 0.0], [-3.0, 3.0], [4.0, 4.0]]], [[[3.0, -6.0], [4.0, -2.0], [7.0, 0.0]], [[-6.0, 
+7.0], [3.0, -6.0], [6.0, 1.0]]], [[[-6.0, 0.0], [0.0, 5.0], [6.0, 3.0]], [[0.0, -5.0], [-7.0, -3.0], [-4.0, -5.0]]]])
+      arg1=Data(numpy.array([[[[-7.0, 5.0], [2.0, -4.0], [2.0, -2.0]], [[6.0, 2.0], [7.0, 0.0], [5.0, 7.0]]], [[[-3.0, 2.0], 
+[-5.0, 1.0], [-5.0, 4.0]], [[5.0, -4.0], [-7.0, -5.0], [6.0, -7.0]]], [[[7.0, 7.0], [5.0, 1.0], [6.0, 4.0]], [[3.0, 6.0], [5.0, 
+3.0], [5.0, -5.0]]], [[[7.0, -3.0], [-7.0, -3.0], [-1.0, 6.0]], [[6.0, 7.0], [6.0, -5.0], [-4.0, 0.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(195.0)+(1.-msk_ref)*numpy.array(117.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(4.0)+(1-msk_arg0)*(-6.0)
+      arg1=Data(numpy.array([3.0, 7.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([12.0, 28.0])+(1.-msk_ref)*numpy.array([-18.0, -42.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-2.0, 0.0, -7.0])+(1.-msk_arg0)*numpy.array([-1.0, 5.0, -1.0])
+      arg1=Data(numpy.array([[-5.0, -5.0, 3.0], [-5.0, 4.0, -3.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-11.0, 31.0])+(1.-msk_ref)*numpy.array([-23.0, 28.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, 7.0, 7.0], [7.0, -5.0, 4.0]])+(1.-msk_arg0)*numpy.array([[1.0, -5.0, -6.0], [0.0, -1.0, 
+6.0]])
+      arg1=Data(numpy.array([[[-4.0, -7.0, 6.0], [-7.0, 4.0, -5.0]], [[6.0, 0.0, 3.0], [-5.0, 0.0, -5.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-108.0, -16.0])+(1.-msk_ref)*numpy.array([-39.0, -42.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[3.0, 1.0, 7.0], [-1.0, 6.0, -1.0], [5.0, -1.0, -7.0], [5.0, -6.0, 7.0]], [[-5.0, 3.0, 6.0], 
+[-4.0, 3.0, -4.0], [2.0, 7.0, 1.0], [-7.0, -3.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[-6.0, 0.0, 0.0], [4.0, -3.0, -6.0], [6.0, 
+-3.0, -4.0], [2.0, 3.0, 3.0]], [[-6.0, 1.0, -7.0], [-6.0, 0.0, 2.0], [-6.0, 1.0, 1.0], [-4.0, 0.0, 2.0]]])
+      arg1=Data(numpy.array([[[[2.0, 4.0, -5.0], [6.0, -2.0, -1.0], [6.0, 6.0, -3.0], [-2.0, 7.0, -7.0]], [[6.0, 7.0, 4.0], 
+[-6.0, -1.0, -6.0], [-5.0, -7.0, -7.0], [1.0, 0.0, -7.0]]], [[[-5.0, -6.0, -6.0], [0.0, -7.0, 7.0], [2.0, 5.0, 6.0], [3.0, 2.0, 
+0.0]], [[-6.0, 2.0, 5.0], [-5.0, -1.0, 0.0], [-5.0, 4.0, -2.0], [-1.0, 1.0, 6.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-153.0, -7.0])+(1.-msk_ref)*numpy.array([15.0, 75.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-1.0)+(1-msk_arg0)*(-5.0)
+      arg1=Data(numpy.array([[-3.0, -2.0, 0.0, -6.0, -6.0], [-1.0, 6.0, -5.0, -1.0, 6.0], [6.0, 0.0, 3.0, -6.0, -4.0], [-4.0, 
+0.0, 6.0, 4.0, -5.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[3.0, 2.0, -0.0, 6.0, 6.0], [1.0, -6.0, 5.0, 1.0, -6.0], [-6.0, -0.0, -3.0, 6.0, 4.0], [4.0, 
+-0.0, -6.0, -4.0, 5.0]])+(1.-msk_ref)*numpy.array([[15.0, 10.0, -0.0, 30.0, 30.0], [5.0, -30.0, 25.0, 5.0, -30.0], [-30.0, 
+-0.0, -15.0, 30.0, 20.0], [20.0, -0.0, -30.0, -20.0, 25.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, -2.0, -4.0])+(1.-msk_arg0)*numpy.array([-2.0, -3.0, -6.0])
+      arg1=Data(numpy.array([[[-1.0, 0.0, -5.0], [6.0, 3.0, 3.0], [0.0, -5.0, 7.0], [3.0, 3.0, 3.0], [2.0, -7.0, 0.0]], [[2.0, 
+6.0, -2.0], [0.0, 6.0, -4.0], [-3.0, -4.0, 0.0], [-4.0, -7.0, -3.0], [-4.0, 4.0, 0.0]], [[1.0, -1.0, -2.0], [5.0, 3.0, -3.0], 
+[-6.0, 3.0, 3.0], [2.0, 2.0, 6.0], [-5.0, -6.0, 6.0]], [[-7.0, -1.0, -1.0], [7.0, 4.0, 0.0], [6.0, -3.0, 3.0], [-4.0, 2.0, 
+4.0], [-4.0, -2.0, 4.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[25.0, -48.0, -18.0, -33.0, 4.0], [-14.0, 4.0, 23.0, 46.0, 12.0], [5.0, -19.0, 12.0, -38.0, 
+13.0], [41.0, -43.0, -36.0, 0.0, 8.0]])+(1.-msk_ref)*numpy.array([[32.0, -39.0, -27.0, -33.0, 17.0], [-10.0, 6.0, 18.0, 47.0, 
+-4.0], [13.0, -1.0, -15.0, -46.0, -8.0], [23.0, -26.0, -21.0, -22.0, -10.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[3.0, -7.0, -7.0], [-1.0, 6.0, 5.0]])+(1.-msk_arg0)*numpy.array([[4.0, 0.0, 0.0], [-3.0, 1.0, 
+2.0]])
+      arg1=Data(numpy.array([[[[-5.0, 2.0, 5.0], [3.0, -1.0, 3.0]], [[6.0, -4.0, -1.0], [-1.0, -3.0, -2.0]], [[4.0, 0.0, -1.0], 
+[-7.0, -2.0, 6.0]], [[-5.0, 5.0, -5.0], [-7.0, 3.0, 6.0]], [[4.0, 7.0, -7.0], [-6.0, 1.0, 7.0]]], [[[-4.0, 5.0, -6.0], [-7.0, 
+2.0, 0.0]], [[1.0, -7.0, -5.0], [-1.0, 3.0, -7.0]], [[2.0, 4.0, 7.0], [-7.0, 7.0, -7.0]], [[0.0, 6.0, -6.0], [7.0, 6.0, 1.0]], 
+[[4.0, -1.0, -2.0], [5.0, 7.0, -1.0]]], [[[-4.0, 7.0, -1.0], [-2.0, 3.0, -6.0]], [[-6.0, 5.0, -2.0], [-7.0, 3.0, -4.0]], 
+[[-2.0, -7.0, -4.0], [0.0, -2.0, 3.0]], [[-6.0, 5.0, -2.0], [-2.0, -3.0, -2.0]], [[5.0, 0.0, 4.0], [0.0, 3.0, -2.0]]], [[[6.0, 
+6.0, 3.0], [-5.0, 4.0, 0.0]], [[-3.0, 5.0, 0.0], [6.0, 6.0, -7.0]], [[7.0, -1.0, 2.0], [0.0, -3.0, 3.0]], [[-7.0, 5.0, -6.0], 
+[7.0, -6.0, 1.0]], [[7.0, 5.0, 0.0], [4.0, 5.0, -5.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-58.0, 26.0, 44.0, 40.0, 59.0], [14.0, 71.0, -57.0, 34.0, 65.0], [-64.0, -34.0, 74.0, -65.0, 
+-5.0], [-16.0, -49.0, 11.0, -52.0, -13.0]])+(1.-msk_ref)*numpy.array([[-24.0, 20.0, 47.0, 16.0, 49.0], [7.0, -4.0, 22.0, -13.0, 
+6.0], [-19.0, -8.0, -4.0, -25.0, 19.0], [43.0, -38.0, 31.0, -53.0, 11.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(3.0)+(1-msk_arg0)*(2.0)
+      arg1=Data(numpy.array([[[-3.0, -1.0], [-4.0, -6.0]], [[4.0, 7.0], [-7.0, 3.0]], [[1.0, -6.0], [0.0, 3.0]], [[-5.0, 5.0], 
+[0.0, -6.0]], [[3.0, 2.0], [-7.0, 6.0]], [[5.0, -3.0], [4.0, -5.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-9.0, -3.0], [-12.0, -18.0]], [[12.0, 21.0], [-21.0, 9.0]], [[3.0, -18.0], [0.0, 9.0]], 
+[[-15.0, 15.0], [0.0, -18.0]], [[9.0, 6.0], [-21.0, 18.0]], [[15.0, -9.0], [12.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[-6.0, 
+-2.0], [-8.0, -12.0]], [[8.0, 14.0], [-14.0, 6.0]], [[2.0, -12.0], [0.0, 6.0]], [[-10.0, 10.0], [0.0, -12.0]], [[6.0, 4.0], 
+[-14.0, 12.0]], [[10.0, -6.0], [8.0, -10.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-2.0, 4.0, 0.0])+(1.-msk_arg0)*numpy.array([-3.0, 0.0, -4.0])
+      arg1=Data(numpy.array([[[[1.0, -5.0, 5.0], [2.0, -2.0, -7.0]], [[3.0, -2.0, -7.0], [5.0, 0.0, -5.0]]], [[[6.0, 4.0, 
+-6.0], [0.0, 1.0, 5.0]], [[-7.0, 3.0, -2.0], [5.0, -4.0, 3.0]]], [[[7.0, 1.0, -5.0], [-3.0, 2.0, -5.0]], [[-5.0, -6.0, 0.0], 
+[-4.0, -5.0, 6.0]]], [[[-6.0, -7.0, 2.0], [-1.0, 4.0, -7.0]], [[7.0, -7.0, 6.0], [-3.0, 5.0, -4.0]]], [[[1.0, 0.0, -1.0], 
+[-6.0, 2.0, 7.0]], [[2.0, 6.0, -4.0], [-6.0, 7.0, -1.0]]], [[[0.0, 3.0, 5.0], [0.0, 5.0, -7.0]], [[-4.0, 6.0, -3.0], [-5.0, 
+7.0, -2.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-22.0, -12.0], [-14.0, -10.0]], [[4.0, 4.0], [26.0, -26.0]], [[-10.0, 14.0], [-14.0, -12.0]], 
+[[-16.0, 18.0], [-42.0, 26.0]], [[-2.0, 20.0], [20.0, 40.0]], [[12.0, 20.0], [32.0, 38.0]]])+(1.-msk_ref)*numpy.array([[[-23.0, 
+22.0], [19.0, 5.0]], [[6.0, -20.0], [29.0, -27.0]], [[-1.0, 29.0], [15.0, -12.0]], [[10.0, 31.0], [-45.0, 25.0]], [[1.0, 
+-10.0], [10.0, 22.0]], [[-20.0, 28.0], [24.0, 23.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-2.0)+(1-msk_arg0)*(6.0)
+      arg1=Data(numpy.array([[[[-1.0, 4.0, 5.0, -5.0], [6.0, 5.0, 6.0, 2.0], [-5.0, 4.0, -4.0, -1.0]], [[-1.0, 0.0, 1.0, -2.0], 
+[-3.0, 5.0, -2.0, 4.0], [7.0, 4.0, 5.0, -7.0]]], [[[-5.0, -6.0, -2.0, 0.0], [7.0, 2.0, 5.0, 2.0], [-2.0, 1.0, -4.0, -6.0]], 
+[[7.0, -7.0, 2.0, 7.0], [-4.0, -7.0, -4.0, 3.0], [2.0, 6.0, 3.0, 0.0]]], [[[0.0, -4.0, -2.0, 2.0], [-1.0, 3.0, 4.0, 0.0], 
+[-6.0, -5.0, 3.0, -1.0]], [[7.0, -3.0, -1.0, -4.0], [0.0, 1.0, -4.0, 1.0], [5.0, 7.0, -3.0, 4.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[2.0, -8.0, -10.0, 10.0], [-12.0, -10.0, -12.0, -4.0], [10.0, -8.0, 8.0, 2.0]], [[2.0, -0.0, 
+-2.0, 4.0], [6.0, -10.0, 4.0, -8.0], [-14.0, -8.0, -10.0, 14.0]]], [[[10.0, 12.0, 4.0, -0.0], [-14.0, -4.0, -10.0, -4.0], [4.0, 
+-2.0, 8.0, 12.0]], [[-14.0, 14.0, -4.0, -14.0], [8.0, 14.0, 8.0, -6.0], [-4.0, -12.0, -6.0, -0.0]]], [[[-0.0, 8.0, 4.0, -4.0], 
+[2.0, -6.0, -8.0, -0.0], [12.0, 10.0, -6.0, 2.0]], [[-14.0, 6.0, 2.0, 8.0], [-0.0, -2.0, 8.0, -2.0], [-10.0, -14.0, 6.0, 
+-8.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, 24.0, 30.0, -30.0], [36.0, 30.0, 36.0, 12.0], [-30.0, 24.0, -24.0, -6.0]], [[-6.0, 
+0.0, 6.0, -12.0], [-18.0, 30.0, -12.0, 24.0], [42.0, 24.0, 30.0, -42.0]]], [[[-30.0, -36.0, -12.0, 0.0], [42.0, 12.0, 30.0, 
+12.0], [-12.0, 6.0, -24.0, -36.0]], [[42.0, -42.0, 12.0, 42.0], [-24.0, -42.0, -24.0, 18.0], [12.0, 36.0, 18.0, 0.0]]], [[[0.0, 
+-24.0, -12.0, 12.0], [-6.0, 18.0, 24.0, 0.0], [-36.0, -30.0, 18.0, -6.0]], [[42.0, -18.0, -6.0, -24.0], [0.0, 6.0, -24.0, 6.0], 
+[30.0, 42.0, -18.0, 24.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(1.0)+(1-msk_arg0)*(0.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-6.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(-0.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-4.0, 0.0, -5.0])+(1.-msk_arg0)*numpy.array([2.0, 0.0, 1.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-6.0, 6.0, -5.0])+(1.-msk_arg1)*numpy.array([0.0, 7.0, -6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(49.0)+(1.-msk_ref)*numpy.array(-6.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 2.0, -4.0], [0.0, 7.0, -7.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 4.0, 7.0], [-4.0, -4.0, 
+3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[5.0, -3.0, -3.0], [0.0, -3.0, -6.0]])+(1.-msk_arg1)*numpy.array([[4.0, 3.0, 0.0], [-3.0, 
+-7.0, -5.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(47.0)+(1.-msk_ref)*numpy.array(33.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, 0.0, 7.0], [-6.0, -3.0, -7.0], [-5.0, 4.0, -1.0], [-3.0, -3.0, -5.0]], [[-2.0, 3.0, 
+-7.0], [-6.0, 6.0, -2.0], [0.0, -4.0, 7.0], [2.0, 5.0, -7.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -2.0, -7.0], [4.0, 5.0, 3.0], 
+[0.0, -5.0, -5.0], [1.0, 0.0, 4.0]], [[1.0, -6.0, 6.0], [2.0, 7.0, 2.0], [-7.0, 5.0, 4.0], [0.0, 6.0, 0.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[1.0, 0.0, 1.0], [-5.0, -2.0, -4.0], [6.0, 0.0, 4.0], [3.0, -6.0, -6.0]], [[2.0, -7.0, 6.0], 
+[5.0, -4.0, -1.0], [6.0, 6.0, 0.0], [-4.0, -4.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -4.0, 5.0], [1.0, 7.0, 3.0], [0.0, 
+-7.0, 4.0], [-7.0, -3.0, -7.0]], [[0.0, -5.0, 0.0], [3.0, -7.0, -7.0], [-1.0, -1.0, 7.0], [4.0, -4.0, 6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-96.0)+(1.-msk_ref)*numpy.array(-20.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank4_offset4(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-5.0, -5.0], [-4.0, -6.0], [-5.0, -7.0]], [[0.0, 1.0], [-7.0, -4.0], [6.0, 0.0]]], [[[-3.0, 
+-2.0], [2.0, 5.0], [2.0, 7.0]], [[-5.0, 0.0], [-3.0, 3.0], [0.0, -3.0]]], [[[1.0, -1.0], [-2.0, -6.0], [0.0, 4.0]], [[-6.0, 
+0.0], [5.0, -2.0], [3.0, 3.0]]], [[[0.0, -2.0], [-3.0, -1.0], [1.0, 7.0]], [[-1.0, 2.0], [5.0, -3.0], [2.0, 
+5.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, 0.0], [5.0, 7.0], [0.0, 6.0]], [[3.0, -3.0], [3.0, -5.0], [5.0, 2.0]]], [[[0.0, 
+5.0], [-6.0, -6.0], [7.0, -4.0]], [[7.0, 7.0], [1.0, -1.0], [0.0, 4.0]]], [[[6.0, 4.0], [-6.0, -4.0], [3.0, -7.0]], [[7.0, 
+-4.0], [-2.0, 0.0], [-4.0, 5.0]]], [[[0.0, 2.0], [7.0, -1.0], [-7.0, 3.0]], [[-7.0, 0.0], [-3.0, 7.0], [0.0, 1.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[5.0, 6.0], [6.0, 4.0], [-7.0, 2.0]], [[3.0, -3.0], [4.0, -1.0], [-2.0, 2.0]]], [[[-7.0, 
+0.0], [-7.0, 1.0], [-4.0, -5.0]], [[1.0, 0.0], [-5.0, 3.0], [-2.0, 2.0]]], [[[-2.0, 5.0], [4.0, 7.0], [-5.0, -1.0]], [[7.0, 
+6.0], [-5.0, -5.0], [1.0, -5.0]]], [[[0.0, -2.0], [7.0, -4.0], [7.0, 3.0]], [[-5.0, 1.0], [3.0, 0.0], [-6.0, 
+3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, -5.0], [5.0, 3.0], [1.0, 5.0]], [[-1.0, 0.0], [2.0, 6.0], [4.0, 1.0]]], [[[-1.0, 
+-2.0], [1.0, 1.0], [-3.0, 6.0]], [[3.0, -3.0], [-4.0, -2.0], [-4.0, 4.0]]], [[[-6.0, 1.0], [5.0, 0.0], [-1.0, -7.0]], [[0.0, 
+-1.0], [-2.0, 0.0], [-5.0, -6.0]]], [[[3.0, 4.0], [1.0, 3.0], [-6.0, -6.0]], [[0.0, -3.0], [-3.0, -6.0], [0.0, 3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-229.0)+(1.-msk_ref)*numpy.array(1.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(3.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-4.0, 4.0])+(1.-msk_arg1)*numpy.array([5.0, -7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-0.0, 0.0])+(1.-msk_ref)*numpy.array([15.0, -21.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([0.0, 7.0, 4.0])+(1.-msk_arg0)*numpy.array([-3.0, 3.0, 3.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[7.0, 0.0, -3.0], [-5.0, 6.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 1.0, 3.0], [-2.0, 6.0, 
+3.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-12.0, 62.0])+(1.-msk_ref)*numpy.array([30.0, 33.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[6.0, 5.0, 2.0], [-1.0, 5.0, -2.0]])+(1.-msk_arg0)*numpy.array([[5.0, -6.0, -6.0], [4.0, 0.0, 
+-7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-1.0, 4.0, -3.0], [-2.0, 4.0, 2.0]], [[-2.0, 3.0, -5.0], [-2.0, 4.0, 
+0.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 5.0, -2.0], [0.0, -1.0, -4.0]], [[-1.0, -1.0, 4.0], [-7.0, -1.0, 6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([26.0, 15.0])+(1.-msk_ref)*numpy.array([25.0, -93.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-3.0, -6.0, -4.0], [0.0, 1.0, 7.0], [6.0, 3.0, 1.0], [0.0, -6.0, 5.0]], [[5.0, 0.0, -6.0], 
+[4.0, 0.0, 0.0], [7.0, -5.0, 0.0], [-5.0, 6.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, -3.0, 3.0], [-7.0, 6.0, -3.0], [-4.0, 
+5.0, 7.0], [-2.0, 6.0, 3.0]], [[2.0, -2.0, -6.0], [4.0, 4.0, 0.0], [0.0, 2.0, 2.0], [-5.0, 0.0, 1.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-4.0, -6.0, -1.0], [-1.0, -3.0, 6.0], [-4.0, -2.0, -4.0], [-6.0, 2.0, 5.0]], [[-7.0, -6.0, 
+-4.0], [-6.0, -1.0, 2.0], [-7.0, -1.0, -5.0], [1.0, 6.0, 5.0]]], [[[5.0, 5.0, -7.0], [3.0, 7.0, -5.0], [-4.0, -7.0, 4.0], [1.0, 
+4.0, -3.0]], [[2.0, -6.0, 7.0], [0.0, 6.0, 2.0], [2.0, 0.0, 7.0], [-5.0, -5.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 
+0.0, 4.0], [-5.0, 3.0, -3.0], [-4.0, 5.0, -6.0], [-4.0, -2.0, 1.0]], [[1.0, 0.0, -1.0], [-7.0, 4.0, 3.0], [0.0, -5.0, 4.0], 
+[-3.0, -4.0, -2.0]]], [[[1.0, -3.0, 2.0], [-1.0, -1.0, -7.0], [-1.0, 7.0, -6.0], [0.0, -2.0, 1.0]], [[-5.0, 0.0, 7.0], [5.0, 
+5.0, -1.0], [-5.0, -5.0, -6.0], [0.0, -6.0, 4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([27.0, -144.0])+(1.-msk_ref)*numpy.array([65.0, 2.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(-7.0)+(1-msk_arg0)*(-1.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-2.0, 0.0, -6.0, 1.0, -6.0], [0.0, -5.0, 0.0, -3.0, -2.0], [-6.0, 1.0, 4.0, 7.0, 7.0], [0.0, 
+1.0, -1.0, 0.0, 4.0]])+(1.-msk_arg1)*numpy.array([[4.0, -4.0, 0.0, 0.0, -3.0], [2.0, 7.0, -6.0, 0.0, -6.0], [1.0, 3.0, 7.0, 
+-7.0, -3.0], [4.0, 7.0, 3.0, -5.0, -4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[14.0, -0.0, 42.0, -7.0, 42.0], [-0.0, 35.0, -0.0, 21.0, 14.0], [42.0, -7.0, -28.0, -49.0, 
+-49.0], [-0.0, -7.0, 7.0, -0.0, -28.0]])+(1.-msk_ref)*numpy.array([[-4.0, 4.0, -0.0, -0.0, 3.0], [-2.0, -7.0, 6.0, -0.0, 6.0], 
+[-1.0, -3.0, -7.0, 7.0, 3.0], [-4.0, -7.0, -3.0, 5.0, 4.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([7.0, -4.0, -6.0])+(1.-msk_arg0)*numpy.array([-5.0, 1.0, -1.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[6.0, -4.0, 7.0], [-2.0, 1.0, -5.0], [4.0, -4.0, 1.0], [-1.0, -4.0, -1.0], [4.0, 6.0, -5.0]], 
+[[-2.0, -5.0, 1.0], [6.0, -6.0, 7.0], [-2.0, 3.0, 7.0], [7.0, 6.0, -2.0], [-5.0, 2.0, -4.0]], [[6.0, -1.0, 1.0], [-3.0, 7.0, 
+-1.0], [-1.0, 0.0, 2.0], [5.0, -7.0, -2.0], [-1.0, -5.0, 0.0]], [[0.0, 1.0, -3.0], [-6.0, 0.0, -6.0], [4.0, -5.0, 6.0], [4.0, 
+-6.0, -7.0], [-3.0, -3.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 0.0, 0.0], [5.0, -3.0, -3.0], [-3.0, -3.0, 6.0], [1.0, 
+7.0, -7.0], [-1.0, -5.0, 7.0]], [[2.0, 0.0, 0.0], [0.0, -6.0, 0.0], [-5.0, -3.0, -5.0], [6.0, -3.0, 1.0], [2.0, 4.0, -6.0]], 
+[[-4.0, 7.0, -4.0], [5.0, 0.0, 0.0], [6.0, 2.0, -4.0], [5.0, -6.0, 5.0], [1.0, 0.0, 5.0]], [[6.0, 4.0, 7.0], [3.0, -2.0, 1.0], 
+[0.0, -3.0, -7.0], [-6.0, 5.0, -4.0], [-3.0, 0.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[16.0, 12.0, 38.0, 15.0, 34.0], [0.0, 24.0, -68.0, 37.0, -19.0], [40.0, -43.0, -19.0, 75.0, 
+13.0], [14.0, -6.0, 12.0, 94.0, -51.0]])+(1.-msk_ref)*numpy.array([[15.0, -25.0, 6.0, 9.0, -7.0], [-10.0, -6.0, 27.0, -34.0, 
+0.0], [31.0, -25.0, -24.0, -36.0, -10.0], [-33.0, -18.0, 4.0, 39.0, 21.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-2.0, -4.0, 5.0], [-7.0, 0.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 5.0, 1.0], [1.0, 
+-1.0, 2.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[3.0, 5.0, -6.0], [0.0, -1.0, 0.0]], [[3.0, -2.0, 7.0], [-7.0, -3.0, 0.0]], [[-3.0, 4.0, 
+-5.0], [6.0, 0.0, -2.0]], [[2.0, 0.0, -6.0], [-4.0, -1.0, -5.0]], [[-7.0, 1.0, -5.0], [-1.0, 0.0, 6.0]]], [[[-3.0, 0.0, 1.0], 
+[0.0, 6.0, -3.0]], [[-7.0, -6.0, 7.0], [4.0, 4.0, -4.0]], [[4.0, 4.0, 4.0], [0.0, -6.0, 0.0]], [[-5.0, 0.0, -2.0], [-1.0, -1.0, 
+7.0]], [[-3.0, -2.0, 2.0], [0.0, -4.0, 2.0]]], [[[-4.0, 3.0, -4.0], [3.0, -5.0, -1.0]], [[3.0, 4.0, 5.0], [-1.0, 2.0, 7.0]], 
+[[6.0, 6.0, -1.0], [0.0, -2.0, -5.0]], [[5.0, 0.0, 2.0], [-7.0, 2.0, 3.0]], [[-4.0, 4.0, 2.0], [-1.0, -6.0, 2.0]]], [[[3.0, 
+-4.0, 1.0], [6.0, 7.0, 5.0]], [[-5.0, 6.0, 1.0], [1.0, 4.0, 4.0]], [[-3.0, 2.0, -5.0], [0.0, -7.0, -7.0]], [[-2.0, -6.0, -1.0], 
+[-2.0, -2.0, 6.0]], [[1.0, 1.0, -7.0], [1.0, -3.0, 7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, -6.0, -1.0], [-7.0, -1.0, 
+-5.0]], [[7.0, 0.0, -2.0], [-2.0, -6.0, 6.0]], [[-5.0, 5.0, -4.0], [3.0, 2.0, 3.0]], [[1.0, -4.0, 0.0], [-1.0, -2.0, -6.0]], 
+[[-2.0, -1.0, -3.0], [4.0, -4.0, -6.0]]], [[[6.0, 7.0, -7.0], [-6.0, 0.0, -7.0]], [[-5.0, -3.0, -1.0], [1.0, 7.0, -3.0]], 
+[[-6.0, 4.0, 0.0], [6.0, 7.0, 1.0]], [[6.0, -2.0, 0.0], [7.0, 4.0, -7.0]], [[-5.0, -3.0, -3.0], [1.0, 4.0, 0.0]]], [[[-4.0, 
+1.0, 7.0], [-4.0, 4.0, -5.0]], [[-2.0, 0.0, -5.0], [-4.0, -1.0, -1.0]], [[-3.0, -3.0, 6.0], [-5.0, -7.0, -3.0]], [[-5.0, 0.0, 
+-3.0], [0.0, -5.0, 6.0]], [[6.0, 6.0, -1.0], [0.0, 3.0, 0.0]]], [[[7.0, 1.0, 0.0], [-4.0, 0.0, 1.0]], [[3.0, -3.0, -7.0], 
+[-4.0, 1.0, -6.0]], [[6.0, 6.0, -5.0], [4.0, 6.0, -5.0]], [[2.0, -3.0, 1.0], [-2.0, 2.0, 0.0]], [[0.0, 2.0, -7.0], [7.0, 1.0, 
+6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-56.0, 86.0, -65.0, 24.0, -44.0], [29.0, 69.0, -4.0, -35.0, 12.0], [-39.0, -32.0, -11.0, 31.0, 
+-3.0], [-57.0, -40.0, 15.0, 1.0, -90.0]])+(1.-msk_ref)*numpy.array([[-41.0, -28.0, 58.0, -37.0, 0.0], [-28.0, 2.0, 57.0, -57.0, 
+9.0], [18.0, 2.0, 5.0, 44.0, -10.0], [-39.0, -57.0, -23.0, -30.0, 21.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-5.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[0.0, 7.0], [0.0, -2.0]], [[-5.0, 2.0], [-7.0, 2.0]], [[3.0, -7.0], [0.0, 1.0]], [[5.0, 7.0], 
+[7.0, 2.0]], [[0.0, -1.0], [3.0, 4.0]], [[-7.0, 0.0], [5.0, -6.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 7.0], [-7.0, 1.0]], 
+[[2.0, 0.0], [5.0, 3.0]], [[6.0, -5.0], [-4.0, -5.0]], [[0.0, 7.0], [-7.0, -4.0]], [[7.0, -6.0], [-7.0, 1.0]], [[0.0, -7.0], 
+[7.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]]])+(1.-msk_ref)*numpy.array([[[15.0, -35.0], [35.0, -5.0]], 
+[[-10.0, -0.0], [-25.0, -15.0]], [[-30.0, 25.0], [20.0, 25.0]], [[-0.0, -35.0], [35.0, 20.0]], [[-35.0, 30.0], [35.0, -5.0]], 
+[[-0.0, 35.0], [-35.0, 30.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-4.0, 3.0, -3.0])+(1.-msk_arg0)*numpy.array([6.0, 1.0, 7.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, -2.0], [4.0, -2.0, 1.0]], [[-3.0, 0.0, 7.0], [4.0, 0.0, -1.0]]], [[[5.0, 6.0, 
+7.0], [1.0, -4.0, -7.0]], [[-5.0, 4.0, 4.0], [0.0, 1.0, -1.0]]], [[[-7.0, 2.0, -5.0], [-3.0, -6.0, -4.0]], [[-7.0, 4.0, 6.0], 
+[5.0, -2.0, -2.0]]], [[[6.0, 6.0, -7.0], [4.0, 1.0, -7.0]], [[-7.0, 2.0, 2.0], [1.0, -2.0, 7.0]]], [[[-6.0, 2.0, -6.0], [0.0, 
+-3.0, -5.0]], [[-2.0, 0.0, -6.0], [-6.0, -6.0, 0.0]]], [[[7.0, 0.0, 0.0], [0.0, 0.0, 7.0]], [[-1.0, -2.0, -1.0], [-2.0, 0.0, 
+-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 6.0, -2.0], [-1.0, 5.0, 7.0]], [[-4.0, -5.0, 7.0], [-1.0, 1.0, 1.0]]], [[[-3.0, 
+-2.0, 2.0], [-3.0, -3.0, -2.0]], [[-3.0, -1.0, 1.0], [6.0, 2.0, 1.0]]], [[[0.0, -7.0, -7.0], [0.0, 6.0, 3.0]], [[5.0, -2.0, 
+7.0], [5.0, 0.0, 7.0]]], [[[4.0, 3.0, 1.0], [-5.0, 0.0, 5.0]], [[5.0, -1.0, 2.0], [-6.0, -3.0, -4.0]]], [[[3.0, -3.0, -5.0], 
+[0.0, -4.0, 2.0]], [[-6.0, -1.0, -5.0], [-2.0, 7.0, -4.0]]], [[[-2.0, 3.0, 1.0], [-2.0, 6.0, 5.0]], [[3.0, 0.0, 3.0], [5.0, 
+3.0, -5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[6.0, -25.0], [-9.0, -13.0]], [[-23.0, 5.0], [20.0, 6.0]], [[49.0, 6.0], [22.0, -20.0]], 
+[[15.0, 8.0], [28.0, -31.0]], [[48.0, 6.0], [26.0, 6.0]], [[-28.0, -21.0], [1.0, 20.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, 
+48.0], [20.0, 2.0]], [[-6.0, -35.0], [-12.0, 45.0]], [[-56.0, 27.0], [77.0, 79.0]], [[34.0, 5.0], [43.0, -67.0]], [[-20.0, 
+10.0], [-72.0, -33.0]], [[-2.0, 29.0], [39.0, -2.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank4_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*(1.0)+(1-msk_arg0)*(-3.0)
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, 2.0, 5.0], [-1.0, -5.0, 3.0, -3.0], [-4.0, 7.0, 6.0, -3.0]], [[-2.0, 3.0, 3.0, 
+2.0], [6.0, -4.0, 6.0, -5.0], [7.0, 3.0, -6.0, 3.0]]], [[[-4.0, 5.0, 2.0, 0.0], [6.0, -4.0, 0.0, 6.0], [-5.0, -2.0, 7.0, 
+-5.0]], [[1.0, 0.0, 5.0, -4.0], [5.0, -3.0, 7.0, -7.0], [0.0, 6.0, 0.0, 0.0]]], [[[-1.0, -6.0, 0.0, -2.0], [3.0, -7.0, 6.0, 
+-6.0], [0.0, -7.0, -7.0, -2.0]], [[-7.0, -7.0, 6.0, 6.0], [0.0, -3.0, 1.0, 0.0], [0.0, 0.0, -2.0, 
+7.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 0.0, 6.0, 7.0], [0.0, -6.0, 1.0, 3.0], [7.0, -6.0, -5.0, 5.0]], [[-1.0, 0.0, 4.0, 
+-6.0], [2.0, -6.0, -5.0, 0.0], [5.0, 2.0, 1.0, 3.0]]], [[[1.0, -5.0, 7.0, -2.0], [4.0, -6.0, -5.0, 7.0], [-3.0, -7.0, 5.0, 
+1.0]], [[-3.0, 0.0, 0.0, -4.0], [1.0, 0.0, -5.0, 2.0], [6.0, -3.0, 7.0, -3.0]]], [[[0.0, 2.0, -2.0, 2.0], [-5.0, 3.0, 2.0, 
+-2.0], [3.0, 3.0, -4.0, -2.0]], [[-3.0, -4.0, 5.0, -4.0], [0.0, -6.0, -2.0, -7.0], [-1.0, 1.0, 1.0, 2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0, 2.0, 5.0], [-1.0, -5.0, 3.0, -3.0], [-4.0, 7.0, 6.0, -3.0]], [[-2.0, 3.0, 3.0, 
+2.0], [6.0, -4.0, 6.0, -5.0], [7.0, 3.0, -6.0, 3.0]]], [[[-4.0, 5.0, 2.0, 0.0], [6.0, -4.0, 0.0, 6.0], [-5.0, -2.0, 7.0, 
+-5.0]], [[1.0, 0.0, 5.0, -4.0], [5.0, -3.0, 7.0, -7.0], [0.0, 6.0, 0.0, 0.0]]], [[[-1.0, -6.0, 0.0, -2.0], [3.0, -7.0, 6.0, 
+-6.0], [0.0, -7.0, -7.0, -2.0]], [[-7.0, -7.0, 6.0, 6.0], [0.0, -3.0, 1.0, 0.0], [0.0, 0.0, -2.0, 
+7.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -0.0, -18.0, -21.0], [-0.0, 18.0, -3.0, -9.0], [-21.0, 18.0, 15.0, -15.0]], [[3.0, 
+-0.0, -12.0, 18.0], [-6.0, 18.0, 15.0, -0.0], [-15.0, -6.0, -3.0, -9.0]]], [[[-3.0, 15.0, -21.0, 6.0], [-12.0, 18.0, 15.0, 
+-21.0], [9.0, 21.0, -15.0, -3.0]], [[9.0, -0.0, -0.0, 12.0], [-3.0, -0.0, 15.0, -6.0], [-18.0, 9.0, -21.0, 9.0]]], [[[-0.0, 
+-6.0, 6.0, -6.0], [15.0, -9.0, -6.0, 6.0], [-9.0, -9.0, 12.0, 6.0]], [[9.0, 12.0, -15.0, 12.0], [-0.0, 18.0, 6.0, 21.0], [3.0, 
+-3.0, -3.0, -6.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([5.0, 2.0])+(1.-msk_arg0)*numpy.array([1.0, 5.0])
+      arg1=3.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([15.0, 6.0])+(1.-msk_ref)*numpy.array([3.0, 15.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, -7.0])+(1.-msk_arg0)*numpy.array([6.0, -7.0])
+      arg1=numpy.array(2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-10.0, -14.0])+(1.-msk_ref)*numpy.array([12.0, -14.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-5.0, -6.0, -6.0], [1.0, -5.0, 0.0]])+(1.-msk_arg0)*numpy.array([[4.0, 6.0, -6.0], [-6.0, 
+-5.0, 6.0]])
+      arg1=numpy.array([-2.0, -1.0, 1.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([10.0, 3.0])+(1.-msk_ref)*numpy.array([-20.0, 23.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, 3.0, 1.0], [3.0, 2.0, 4.0]], [[3.0, -1.0, -5.0], [-7.0, 0.0, 
+6.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 5.0, -1.0], [-5.0, -6.0, -2.0]], [[-3.0, -3.0, 4.0], [5.0, 0.0, 3.0]]])
+      arg1=numpy.array([[1.0, -7.0, -7.0], [-5.0, 0.0, 1.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-35.0, 86.0])+(1.-msk_ref)*numpy.array([-5.0, -32.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-3.0, 0.0, 6.0], [7.0, 4.0, 3.0], [-2.0, 4.0, -4.0], [-3.0, -6.0, 7.0]], [[-2.0, 1.0, 
+-4.0], [3.0, -5.0, -1.0], [-3.0, -3.0, 6.0], [0.0, 3.0, 4.0]]], [[[-3.0, -4.0, 2.0], [-7.0, -5.0, -6.0], [6.0, 2.0, 4.0], 
+[-7.0, 7.0, -1.0]], [[5.0, -6.0, 0.0], [0.0, -5.0, -4.0], [2.0, 0.0, 1.0], [-3.0, 7.0, 
+6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 3.0, 4.0], [5.0, -3.0, 3.0], [-7.0, 4.0, -5.0], [-7.0, -6.0, 2.0]], [[-5.0, 6.0, 
+5.0], [4.0, 3.0, -3.0], [0.0, -3.0, -3.0], [7.0, -3.0, 1.0]]], [[[3.0, 0.0, 7.0], [-7.0, 4.0, 6.0], [0.0, 4.0, 2.0], [-5.0, 
+-3.0, 0.0]], [[-6.0, -5.0, -6.0], [2.0, 6.0, 3.0], [0.0, -6.0, -3.0], [2.0, 2.0, 0.0]]]])
+      arg1=numpy.array([[[-2.0, 6.0, -2.0], [3.0, -7.0, 0.0], [-7.0, 4.0, 4.0], [0.0, -2.0, -5.0]], [[-4.0, 0.0, 3.0], [0.0, 
+-7.0, 1.0], [7.0, -6.0, -5.0], [-1.0, 4.0, -1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-17.0, 10.0])+(1.-msk_ref)*numpy.array([129.0, -15.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-7.0, -2.0])+(1.-msk_arg0)*numpy.array([7.0, 4.0])
+      arg1=numpy.array([-1.0, 1.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[7.0, -7.0], [2.0, -2.0]])+(1.-msk_ref)*numpy.array([[-7.0, 7.0], [-4.0, 4.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[7.0, -5.0, -2.0], [-1.0, 0.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-7.0, 0.0, -4.0], [-7.0, 
+-4.0, 6.0]])
+      arg1=numpy.array([[-3.0, -3.0, 1.0], [6.0, 2.0, 6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-8.0, 20.0], [3.0, -6.0]])+(1.-msk_ref)*numpy.array([[17.0, -66.0], [39.0, -14.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 6.0, 0.0], [1.0, -4.0, -2.0]], [[-4.0, 6.0, -6.0], [5.0, 0.0, 
+5.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 5.0, 3.0], [0.0, -5.0, 5.0]], [[1.0, -5.0, 4.0], [-4.0, 7.0, -5.0]]])
+      arg1=numpy.array([[[4.0, -5.0, -3.0], [-5.0, -3.0, 6.0]], [[3.0, 7.0, -1.0], [0.0, -3.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-55.0, 39.0], [-23.0, 36.0]])+(1.-msk_ref)*numpy.array([[-17.0, 26.0], [-14.0, -57.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, -3.0, -2.0], [-3.0, 2.0, -7.0], [0.0, 2.0, 6.0], [-2.0, 2.0, -1.0]], [[-7.0, -4.0, 
+3.0], [0.0, -3.0, -1.0], [-1.0, 5.0, 0.0], [-4.0, 6.0, -1.0]]], [[[2.0, 0.0, 6.0], [5.0, 3.0, -1.0], [-6.0, 5.0, -1.0], [3.0, 
+-2.0, -5.0]], [[-2.0, 0.0, -5.0], [-4.0, 6.0, 6.0], [-5.0, 1.0, -5.0], [0.0, 6.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 
+7.0, 0.0], [0.0, -4.0, 5.0], [-7.0, -2.0, 0.0], [2.0, 4.0, 2.0]], [[5.0, -5.0, -2.0], [1.0, -7.0, -7.0], [-1.0, -7.0, 7.0], 
+[-3.0, 0.0, -6.0]]], [[[-7.0, -4.0, 1.0], [0.0, -6.0, -6.0], [0.0, 2.0, 6.0], [5.0, -2.0, -2.0]], [[5.0, -4.0, -1.0], [-3.0, 
+-3.0, 0.0], [0.0, 1.0, 2.0], [1.0, 5.0, -4.0]]]])
+      arg1=numpy.array([[[[-3.0, 0.0, 1.0], [-7.0, 0.0, 0.0], [5.0, 3.0, -4.0], [7.0, 2.0, 0.0]], [[3.0, -2.0, 5.0], [4.0, 7.0, 
+5.0], [0.0, 5.0, -5.0], [6.0, -1.0, -7.0]]], [[[7.0, -5.0, 4.0], [0.0, 6.0, 5.0], [3.0, 0.0, -7.0], [0.0, 0.0, 7.0]], [[-6.0, 
+5.0, 1.0], [-2.0, -4.0, -1.0], [-2.0, -7.0, -4.0], [-5.0, 0.0, -2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-31.0, -38.0], [-29.0, -1.0]])+(1.-msk_ref)*numpy.array([[-142.0, 13.0], [44.0, -192.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-4.0, -6.0])+(1.-msk_arg0)*numpy.array([5.0, 0.0])
+      arg1=numpy.array([[4.0, -5.0, 5.0, -3.0, 0.0], [0.0, -5.0, 3.0, -3.0, -4.0], [4.0, -6.0, -6.0, 7.0, 1.0], [-6.0, 1.0, 
+7.0, 4.0, -6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-16.0, 20.0, -20.0, 12.0, 0.0], [0.0, 20.0, -12.0, 12.0, 16.0], [-16.0, 24.0, 24.0, -28.0, 
+-4.0], [24.0, -4.0, -28.0, -16.0, 24.0]], [[-24.0, 30.0, -30.0, 18.0, 0.0], [0.0, 30.0, -18.0, 18.0, 24.0], [-24.0, 36.0, 36.0, 
+-42.0, -6.0], [36.0, -6.0, -42.0, -24.0, 36.0]]])+(1.-msk_ref)*numpy.array([[[20.0, -25.0, 25.0, -15.0, 0.0], [0.0, -25.0, 
+15.0, -15.0, -20.0], [20.0, -30.0, -30.0, 35.0, 5.0], [-30.0, 5.0, 35.0, 20.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 5.0, 5.0], [1.0, 6.0, -1.0]])+(1.-msk_arg0)*numpy.array([[2.0, 3.0, 5.0], [-4.0, -6.0, 
+-2.0]])
+      arg1=numpy.array([[[1.0, 7.0, -7.0], [7.0, -4.0, 1.0], [5.0, -5.0, 2.0], [5.0, -5.0, -7.0], [5.0, -4.0, -4.0]], [[-6.0, 
+-1.0, -4.0], [4.0, -5.0, 7.0], [0.0, 4.0, 2.0], [2.0, -2.0, -2.0], [6.0, 4.0, 3.0]], [[-7.0, -7.0, 2.0], [-4.0, -5.0, 0.0], 
+[-7.0, 0.0, -6.0], [-6.0, 0.0, 7.0], [3.0, -6.0, 7.0]], [[-1.0, 1.0, 7.0], [-2.0, -2.0, 1.0], [-4.0, -3.0, 3.0], [3.0, 3.0, 
+1.0], [3.0, -6.0, -7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, -15.0, -15.0, -60.0, -40.0], [-25.0, 10.0, 30.0, -20.0, 35.0], [-25.0, -25.0, -30.0, 
+35.0, 5.0], [40.0, -5.0, 0.0, 20.0, -65.0]], [[50.0, -18.0, -27.0, -18.0, -15.0], [-8.0, -33.0, 22.0, -8.0, 27.0], [-51.0, 
+-34.0, -1.0, -13.0, -40.0], [-2.0, -15.0, -25.0, 20.0, -26.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, 7.0, 5.0, -40.0, -22.0], 
+[-35.0, 28.0, 22.0, -12.0, 39.0], [-25.0, -23.0, -44.0, 23.0, 23.0], [36.0, -5.0, -2.0, 20.0, -47.0]], [[-32.0, -6.0, 6.0, 
+24.0, 12.0], [38.0, 0.0, -28.0, 8.0, -54.0], [66.0, 46.0, 40.0, 10.0, 10.0], [-16.0, 18.0, 28.0, -32.0, 38.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, 7.0, 0.0], [2.0, -6.0, 7.0]], [[0.0, 2.0, 1.0], [3.0, 5.0, 
+0.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 5.0, -6.0], [2.0, 4.0, 0.0]], [[-3.0, 0.0, -2.0], [7.0, 6.0, 2.0]]])
+      arg1=numpy.array([[[[-6.0, 0.0, -5.0], [2.0, -2.0, -2.0]], [[-2.0, 1.0, 5.0], [-1.0, 0.0, 4.0]], [[6.0, 7.0, -3.0], 
+[-1.0, -6.0, -4.0]], [[-7.0, 2.0, 1.0], [-6.0, -7.0, 2.0]], [[-2.0, 7.0, -3.0], [-4.0, 0.0, -6.0]]], [[[3.0, -3.0, -4.0], 
+[-3.0, 2.0, -6.0]], [[0.0, 7.0, -1.0], [-6.0, 0.0, 2.0]], [[-5.0, -5.0, 1.0], [3.0, -6.0, 6.0]], [[-2.0, 1.0, -5.0], [-6.0, 
+-6.0, 1.0]], [[-5.0, 1.0, 0.0], [-5.0, 3.0, 5.0]]], [[[4.0, 2.0, -3.0], [1.0, 3.0, 6.0]], [[0.0, 7.0, 4.0], [0.0, 5.0, -3.0]], 
+[[-6.0, -5.0, 0.0], [4.0, 0.0, -2.0]], [[7.0, 1.0, 5.0], [6.0, 0.0, -6.0]], [[-6.0, 0.0, 6.0], [-2.0, 6.0, 1.0]]], [[[-7.0, 
+0.0, -2.0], [-5.0, -1.0, -4.0]], [[4.0, -5.0, -3.0], [5.0, -5.0, 0.0]], [[0.0, 4.0, 6.0], [2.0, 0.0, -4.0]], [[0.0, 7.0, -6.0], 
+[6.0, -7.0, -2.0]], [[-6.0, -1.0, 7.0], [4.0, 4.0, -1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[44.0, 47.0, 13.0, 107.0, 13.0], [-102.0, 51.0, 84.0, 52.0, 49.0], [12.0, -2.0, 1.0, -72.0, 
+9.0], [17.0, -23.0, 4.0, 89.0, 12.0]], [[-9.0, 4.0, -22.0, -48.0, -1.0], [-9.0, -5.0, -30.0, -51.0, 2.0], [19.0, 43.0, 2.0, 
+25.0, 30.0], [-22.0, -23.0, 20.0, -9.0, 37.0]]])+(1.-msk_ref)*numpy.array([[[-16.0, -41.0, 69.0, -85.0, 31.0], [32.0, 29.0, 
+-84.0, -15.0, -28.0], [70.0, 31.0, -59.0, 36.0, -58.0], [-51.0, 11.0, -12.0, 55.0, -65.0]], [[26.0, -3.0, -63.0, -61.0, -28.0], 
+[-22.0, -36.0, 10.0, -60.0, 8.0], [31.0, 16.0, 42.0, -1.0, 30.0], [-24.0, -1.0, -6.0, 8.0, 54.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-5.0, 5.0])+(1.-msk_arg0)*numpy.array([-5.0, 7.0])
+      arg1=numpy.array([[[-2.0, 0.0], [7.0, 7.0]], [[6.0, 4.0], [0.0, -5.0]], [[0.0, -6.0], [-5.0, -3.0]], [[-1.0, 1.0], [4.0, 
+4.0]], [[5.0, -1.0], [5.0, -6.0]], [[-6.0, -7.0], [-5.0, -2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[10.0, 0.0], [-35.0, -35.0]], [[-30.0, -20.0], [0.0, 25.0]], [[0.0, 30.0], [25.0, 15.0]], 
+[[5.0, -5.0], [-20.0, -20.0]], [[-25.0, 5.0], [-25.0, 30.0]], [[30.0, 35.0], [25.0, 10.0]]], [[[-10.0, 0.0], [35.0, 35.0]], 
+[[30.0, 20.0], [0.0, -25.0]], [[0.0, -30.0], [-25.0, -15.0]], [[-5.0, 5.0], [20.0, 20.0]], [[25.0, -5.0], [25.0, -30.0]], 
+[[-30.0, -35.0], [-25.0, -10.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, 0.0], [-35.0, -35.0]], [[-30.0, -20.0], [0.0, 25.0]], 
+[[0.0, 30.0], [25.0, 15.0]], [[5.0, -5.0], [-20.0, -20.0]], [[-25.0, 5.0], [-25.0, 30.0]], [[30.0, 35.0], [25.0, 10.0]]], 
+[[[-14.0, 0.0], [49.0, 49.0]], [[42.0, 28.0], [0.0, -35.0]], [[0.0, -42.0], [-35.0, -21.0]], [[-7.0, 7.0], [28.0, 28.0]], 
+[[35.0, -7.0], [35.0, -42.0]], [[-42.0, -49.0], [-35.0, -14.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[2.0, 6.0, -7.0], [0.0, 4.0, 3.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -2.0, 7.0], [7.0, 3.0, 
+-1.0]])
+      arg1=numpy.array([[[[-5.0, -2.0, -6.0], [3.0, 6.0, -4.0]], [[0.0, -2.0, 5.0], [-5.0, -6.0, -5.0]]], [[[5.0, 1.0, -3.0], 
+[7.0, 2.0, 2.0]], [[-2.0, 4.0, 0.0], [-6.0, 2.0, 2.0]]], [[[5.0, -2.0, 0.0], [-1.0, 1.0, -7.0]], [[-3.0, -7.0, 6.0], [-4.0, 
+-7.0, 7.0]]], [[[0.0, -4.0, 4.0], [-3.0, 1.0, -4.0]], [[4.0, -1.0, -4.0], [-6.0, 0.0, 1.0]]], [[[-4.0, 1.0, 7.0], [6.0, -5.0, 
+-3.0]], [[-7.0, 0.0, 0.0], [0.0, -3.0, -1.0]]], [[[3.0, -4.0, 2.0], [3.0, -5.0, 4.0]], [[3.0, 0.0, 2.0], [-1.0, 7.0, -4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[20.0, 70.0], [-47.0, -11.0]], [[37.0, 12.0], [20.0, -14.0]], [[-2.0, 53.0], [-90.0, -99.0]], 
+[[-52.0, 28.0], [30.0, -19.0]], [[-51.0, 3.0], [-14.0, -11.0]], [[-32.0, -52.0], [-8.0, 68.0]]], [[[-26.0, 12.0], [7.0, 
+-39.0]], [[-5.0, 14.0], [16.0, 14.0]], [[-8.0, -17.0], [-10.0, -7.0]], [[-4.0, -8.0], [-16.0, 3.0]], [[25.0, -29.0], [0.0, 
+-15.0]], [[-10.0, -8.0], [6.0, 16.0]]]])+(1.-msk_ref)*numpy.array([[[[-23.0, -49.0], [39.0, -8.0]], [[-38.0, -11.0], [-2.0, 
+28.0]], [[-11.0, -48.0], [65.0, 75.0]], [[36.0, -21.0], [-38.0, 25.0]], [[59.0, -29.0], [21.0, -1.0]], [[13.0, 29.0], [5.0, 
+-39.0]]], [[[-35.0, 43.0], [-11.0, -48.0]], [[41.0, 53.0], [-2.0, -38.0]], [[29.0, 3.0], [-48.0, -56.0]], [[-16.0, -14.0], 
+[29.0, -43.0]], [[-32.0, 30.0], [-49.0, -8.0]], [[7.0, 2.0], [19.0, 18.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([0.0, 2.0])+(1.-msk_arg0)*numpy.array([3.0, 1.0])
+      arg1=Data(-7.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-0.0, -14.0])+(1.-msk_ref)*numpy.array([-21.0, -7.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-4.0, 2.0, 7.0], [5.0, -7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[3.0, -5.0, 4.0], [-2.0, -5.0, 
+-6.0]])
+      arg1=Data(numpy.array([-2.0, -7.0, 0.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-6.0, 39.0])+(1.-msk_ref)*numpy.array([29.0, 39.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, 4.0, 6.0], [0.0, -7.0, 4.0]], [[-3.0, 1.0, -3.0], [1.0, 4.0, 
+-1.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 7.0, -3.0], [-1.0, 6.0, -4.0]], [[-3.0, 0.0, -1.0], [3.0, 2.0, 1.0]]])
+      arg1=Data(numpy.array([[-2.0, 1.0, 1.0], [-4.0, -6.0, -4.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([32.0, -20.0])+(1.-msk_ref)*numpy.array([-4.0, -23.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, 7.0, -2.0], [6.0, 3.0, 5.0], [7.0, 4.0, -6.0], [-7.0, -7.0, 5.0]], [[-1.0, -5.0, 0.0], 
+[-7.0, -3.0, 0.0], [0.0, 2.0, -6.0], [-5.0, 4.0, 7.0]]], [[[4.0, 2.0, -4.0], [6.0, 7.0, -3.0], [7.0, -7.0, 1.0], [-1.0, 7.0, 
+3.0]], [[-4.0, 1.0, 5.0], [7.0, 3.0, -6.0], [6.0, 3.0, -2.0], [-7.0, 7.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, 0.0, 
+4.0], [-3.0, 7.0, -1.0], [4.0, 7.0, -4.0], [2.0, -7.0, 5.0]], [[7.0, -1.0, -2.0], [-5.0, 4.0, 3.0], [-2.0, -6.0, -5.0], [-4.0, 
+-4.0, 2.0]]], [[[-4.0, -6.0, 0.0], [-6.0, -3.0, -7.0], [3.0, -7.0, -3.0], [6.0, 7.0, 0.0]], [[1.0, -4.0, 0.0], [7.0, 1.0, 
+-6.0], [-4.0, 3.0, 1.0], [1.0, 2.0, -2.0]]]])
+      arg1=Data(numpy.array([[[-5.0, -3.0, -4.0], [-3.0, -2.0, -1.0], [7.0, 6.0, 6.0], [4.0, 4.0, -4.0]], [[-3.0, 1.0, -3.0], 
+[-4.0, -7.0, 4.0], [0.0, 2.0, 7.0], [6.0, -6.0, -7.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-195.0, -132.0])+(1.-msk_ref)*numpy.array([-102.0, 37.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-1.0, 3.0])+(1.-msk_arg0)*numpy.array([-7.0, -1.0])
+      arg1=Data(numpy.array([-6.0, 6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[6.0, -6.0], [-18.0, 18.0]])+(1.-msk_ref)*numpy.array([[42.0, -42.0], [6.0, -6.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-1.0, -5.0, -1.0], [3.0, 5.0, 4.0]])+(1.-msk_arg0)*numpy.array([[3.0, 0.0, -6.0], [1.0, 0.0, 
+-7.0]])
+      arg1=Data(numpy.array([[-3.0, 1.0, -7.0], [3.0, -1.0, 0.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[5.0, 2.0], [-32.0, 4.0]])+(1.-msk_ref)*numpy.array([[33.0, 9.0], [46.0, 3.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 1.0, 0.0], [-2.0, 3.0, -4.0]], [[0.0, 3.0, -3.0], [0.0, 1.0, 
+7.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 3.0, -2.0], [0.0, 7.0, -1.0]], [[3.0, -1.0, -7.0], [-3.0, -6.0, -1.0]]])
+      arg1=Data(numpy.array([[[6.0, 1.0, -2.0], [3.0, 1.0, -2.0]], [[-5.0, 5.0, -4.0], [6.0, 3.0, -4.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-24.0, 43.0], [-4.0, 2.0]])+(1.-msk_ref)*numpy.array([[28.0, 38.0], [18.0, -24.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 5.0, -4.0], [7.0, 0.0, 0.0], [0.0, -1.0, 4.0], [6.0, 3.0, -1.0]], [[7.0, -6.0, 2.0], 
+[0.0, -4.0, 3.0], [-3.0, 0.0, 3.0], [4.0, 0.0, -5.0]]], [[[-4.0, -6.0, -6.0], [-5.0, -3.0, 3.0], [-1.0, -2.0, 3.0], [7.0, -4.0, 
+4.0]], [[1.0, -4.0, 2.0], [7.0, 0.0, -6.0], [4.0, -3.0, 0.0], [-5.0, 6.0, -1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, -6.0, 
+0.0], [7.0, -2.0, -2.0], [3.0, 3.0, -7.0], [3.0, 2.0, -7.0]], [[3.0, -6.0, -1.0], [0.0, -1.0, 4.0], [1.0, -1.0, 2.0], [-4.0, 
+5.0, 2.0]]], [[[-7.0, 4.0, 1.0], [0.0, -5.0, -1.0], [-4.0, -2.0, 4.0], [2.0, -3.0, 2.0]], [[1.0, 6.0, 7.0], [6.0, -3.0, 2.0], 
+[-1.0, -4.0, -7.0], [-5.0, -2.0, 2.0]]]])
+      arg1=Data(numpy.array([[[[-6.0, 1.0, 6.0], [4.0, 7.0, -7.0], [-5.0, 5.0, -1.0], [4.0, -1.0, -1.0]], [[1.0, -5.0, 7.0], 
+[0.0, -3.0, 2.0], [-1.0, -1.0, -6.0], [0.0, -6.0, -4.0]]], [[[-6.0, 3.0, -6.0], [-7.0, -6.0, 4.0], [0.0, -2.0, 6.0], [0.0, 0.0, 
+1.0]], [[1.0, 0.0, 5.0], [-7.0, 5.0, 0.0], [-2.0, 2.0, 2.0], [-2.0, -4.0, 3.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[66.0, -29.0], [-70.0, 64.0]])+(1.-msk_ref)*numpy.array([[57.0, -107.0], [123.0, 87.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-2.0, 0.0])+(1.-msk_arg0)*numpy.array([-1.0, -4.0])
+      arg1=Data(numpy.array([[3.0, 0.0, 3.0, -3.0, 4.0], [1.0, 1.0, -3.0, 3.0, 0.0], [4.0, 0.0, -7.0, -1.0, 1.0], [-5.0, 0.0, 
+5.0, -4.0, -5.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-6.0, 0.0, -6.0, 6.0, -8.0], [-2.0, -2.0, 6.0, -6.0, 0.0], [-8.0, 0.0, 14.0, 2.0, -2.0], 
+[10.0, 0.0, -10.0, 8.0, 10.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, 0.0, -3.0, 3.0, -4.0], [-1.0, -1.0, 3.0, -3.0, 0.0], [-4.0, 0.0, 7.0, 1.0, 
+-1.0], [5.0, 0.0, -5.0, 4.0, 5.0]], [[-12.0, 0.0, -12.0, 12.0, -16.0], [-4.0, -4.0, 12.0, -12.0, 0.0], [-16.0, 0.0, 28.0, 4.0, 
+-4.0], [20.0, 0.0, -20.0, 16.0, 20.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-7.0, 2.0, -5.0], [6.0, -5.0, 0.0]])+(1.-msk_arg0)*numpy.array([[0.0, 0.0, -4.0], [7.0, 0.0, 
+-4.0]])
+      arg1=Data(numpy.array([[[-5.0, 7.0, -3.0], [0.0, -1.0, -1.0], [7.0, 4.0, -6.0], [4.0, -7.0, -2.0], [-7.0, 1.0, 5.0]], 
+[[-5.0, -5.0, 5.0], [-6.0, 5.0, 0.0], [4.0, 5.0, -1.0], [6.0, 6.0, 3.0], [4.0, 7.0, -7.0]], [[1.0, -7.0, 2.0], [3.0, 6.0, 
+-5.0], [0.0, 2.0, -6.0], [0.0, 0.0, 5.0], [2.0, 0.0, -1.0]], [[4.0, -4.0, 1.0], [0.0, 2.0, 4.0], [5.0, 1.0, -6.0], [-3.0, -7.0, 
+7.0], [1.0, 1.0, -6.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[64.0, 3.0, -11.0, -32.0, 26.0], [0.0, 52.0, -13.0, -45.0, 21.0], [-31.0, 16.0, 34.0, -25.0, 
+-9.0], [-41.0, -16.0, -3.0, -28.0, 25.0]], [[-65.0, 5.0, 22.0, 59.0, -47.0], [-5.0, -61.0, -1.0, 6.0, -11.0], [41.0, -12.0, 
+-10.0, 0.0, 12.0], [44.0, -10.0, 25.0, 17.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 4.0, 24.0, 8.0, -20.0], [-20.0, 0.0, 
+4.0, -12.0, 28.0], [-8.0, 20.0, 24.0, -20.0, 4.0], [-4.0, -16.0, 24.0, -28.0, 24.0]], [[-23.0, 4.0, 73.0, 36.0, -69.0], [-55.0, 
+-42.0, 32.0, 30.0, 56.0], [-1.0, 41.0, 24.0, -20.0, 18.0], [24.0, -16.0, 59.0, -49.0, 31.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 7.0, 0.0], [-1.0, -6.0, -7.0]], [[3.0, -3.0, 1.0], [-5.0, -6.0, 
+4.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 2.0, -7.0], [-2.0, 2.0, 7.0]], [[2.0, 3.0, -3.0], [7.0, -5.0, 3.0]]])
+      arg1=Data(numpy.array([[[[-2.0, 3.0, -2.0], [-5.0, -6.0, 0.0]], [[-3.0, -2.0, -6.0], [-6.0, -7.0, -2.0]], [[-6.0, -2.0, 
+-6.0], [-7.0, -5.0, 7.0]], [[-1.0, 6.0, 2.0], [-2.0, -3.0, -7.0]], [[-2.0, -1.0, 5.0], [-7.0, 2.0, -7.0]]], [[[4.0, 0.0, 5.0], 
+[-2.0, 5.0, -2.0]], [[-7.0, 0.0, 5.0], [5.0, -5.0, -4.0]], [[3.0, -7.0, 0.0], [-1.0, 7.0, -2.0]], [[0.0, -6.0, 0.0], [4.0, 2.0, 
+-5.0]], [[0.0, -5.0, -3.0], [-7.0, 4.0, 6.0]]], [[[-6.0, 0.0, 4.0], [-7.0, 6.0, 0.0]], [[-1.0, 1.0, 0.0], [4.0, -7.0, 2.0]], 
+[[-6.0, 5.0, 4.0], [4.0, -4.0, -6.0]], [[-1.0, -1.0, -4.0], [4.0, 6.0, -5.0]], [[5.0, -2.0, 1.0], [2.0, -7.0, 1.0]]], [[[2.0, 
+0.0, 4.0], [-1.0, 5.0, -4.0]], [[-3.0, 3.0, 6.0], [0.0, -7.0, 2.0]], [[-7.0, -7.0, -3.0], [3.0, -5.0, 2.0]], [[1.0, 1.0, -5.0], 
+[-2.0, 1.0, -1.0]], [[-5.0, 4.0, -2.0], [7.0, 6.0, 7.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[62.0, 48.0, -26.0, 111.0, 37.0], [-14.0, 53.0, -76.0, -23.0, -94.0], [-29.0, 31.0, 97.0, 
+-12.0, 19.0], [-1.0, 49.0, -36.0, 10.0, -64.0]], [[44.0, 55.0, 75.0, -19.0, -3.0], [-11.0, -27.0, -15.0, -34.0, 47.0], [-15.0, 
+24.0, -49.0, -80.0, 58.0], [-31.0, 38.0, 20.0, -5.0, -72.0]]])+(1.-msk_ref)*numpy.array([[[4.0, 1.0, 49.0, -60.0, -82.0], 
+[-7.0, -132.0, 9.0, -51.0, 75.0], [-44.0, -13.0, -118.0, -12.0, 13.0], [-30.0, -57.0, -44.0, 43.0, 34.0]], [[6.0, -7.0, -3.0, 
+-10.0, -102.0], [-52.0, 19.0, -63.0, -15.0, -57.0], [-103.0, 70.0, 21.0, -10.0, 53.0], [-52.0, 26.0, 26.0, -2.0, 48.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-1.0, -2.0])+(1.-msk_arg0)*numpy.array([-1.0, 5.0])
+      arg1=Data(numpy.array([[[-7.0, 5.0], [-5.0, -1.0]], [[4.0, 3.0], [7.0, -3.0]], [[6.0, 0.0], [0.0, -1.0]], [[2.0, 5.0], 
+[-3.0, 6.0]], [[0.0, -6.0], [-5.0, 6.0]], [[-7.0, 1.0], [-1.0, -2.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[7.0, -5.0], [5.0, 1.0]], [[-4.0, -3.0], [-7.0, 3.0]], [[-6.0, 0.0], [0.0, 1.0]], [[-2.0, 
+-5.0], [3.0, -6.0]], [[0.0, 6.0], [5.0, -6.0]], [[7.0, -1.0], [1.0, 2.0]]], [[[14.0, -10.0], [10.0, 2.0]], [[-8.0, -6.0], 
+[-14.0, 6.0]], [[-12.0, 0.0], [0.0, 2.0]], [[-4.0, -10.0], [6.0, -12.0]], [[0.0, 12.0], [10.0, -12.0]], [[14.0, -2.0], [2.0, 
+4.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -5.0], [5.0, 1.0]], [[-4.0, -3.0], [-7.0, 3.0]], [[-6.0, 0.0], [0.0, 1.0]], [[-2.0, 
+-5.0], [3.0, -6.0]], [[0.0, 6.0], [5.0, -6.0]], [[7.0, -1.0], [1.0, 2.0]]], [[[-35.0, 25.0], [-25.0, -5.0]], [[20.0, 15.0], 
+[35.0, -15.0]], [[30.0, 0.0], [0.0, -5.0]], [[10.0, 25.0], [-15.0, 30.0]], [[0.0, -30.0], [-25.0, 30.0]], [[-35.0, 5.0], [-5.0, 
+-10.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, -3.0, -6.0], [4.0, -5.0, -4.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 7.0, 5.0], [3.0, 0.0, 
+0.0]])
+      arg1=Data(numpy.array([[[[1.0, -6.0, 3.0], [0.0, -7.0, 0.0]], [[1.0, -1.0, -5.0], [-2.0, 4.0, 7.0]]], [[[4.0, -7.0, 6.0], 
+[3.0, -3.0, 3.0]], [[3.0, -4.0, -3.0], [2.0, -2.0, 6.0]]], [[[1.0, -2.0, 0.0], [4.0, -1.0, 6.0]], [[3.0, 3.0, -1.0], [-1.0, 
+6.0, 4.0]]], [[[3.0, 2.0, -7.0], [2.0, -5.0, 7.0]], [[6.0, 1.0, 1.0], [5.0, 5.0, -2.0]]], [[[1.0, 1.0, -3.0], [6.0, -5.0, 
+-5.0]], [[-6.0, -6.0, -2.0], [-1.0, 0.0, 0.0]]], [[[-2.0, -7.0, -7.0], [4.0, 3.0, 0.0]], [[2.0, -1.0, -1.0], [2.0, 3.0, 
+-1.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[4.0, 21.0], [37.0, -62.0]], [[1.0, 3.0], [42.0, -22.0]], [[10.0, -17.0], [9.0, -46.0]], 
+[[48.0, -19.0], [15.0, 17.0]], [[19.0, 69.0], [6.0, -4.0]], [[55.0, 7.0], [17.0, 5.0]]], [[[22.0, 35.0], [29.0, -56.0]], 
+[[27.0, 15.0], [44.0, -6.0]], [[14.0, -3.0], [1.0, -50.0]], [[30.0, 5.0], [15.0, 3.0]], [[11.0, 69.0], [14.0, -4.0]], [[55.0, 
+1.0], [17.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[-29.0, -49.0], [-34.0, 67.0]], [[-27.0, -12.0], [-49.0, 12.0]], [[-16.0, 
+15.0], [10.0, 64.0]], [[-27.0, -4.0], [0.0, 15.0]], [[-10.0, -72.0], [-40.0, 2.0]], [[-80.0, 13.0], [-16.0, 12.0]]], [[[3.0, 
+0.0], [3.0, -6.0]], [[12.0, 9.0], [9.0, 6.0]], [[3.0, 12.0], [9.0, -3.0]], [[9.0, 6.0], [18.0, 15.0]], [[3.0, 18.0], [-18.0, 
+-3.0]], [[-6.0, 12.0], [6.0, 6.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([6.0, 0.0])+(1.-msk_arg0)*numpy.array([6.0, 5.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([6.0, 5.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 1.0, 3.0], [-7.0, -4.0, 0.0]])+(1.-msk_arg0)*numpy.array([[3.0, -4.0, 5.0], [-5.0, 5.0, 
+1.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-5.0, 1.0, -7.0])+(1.-msk_arg1)*numpy.array([2.0, -3.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-20.0, 31.0])+(1.-msk_ref)*numpy.array([18.0, -25.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-4.0, -7.0, -6.0], [-5.0, -6.0, -1.0]], [[-2.0, -6.0, 6.0], [5.0, 7.0, 
+-7.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, -7.0, 0.0], [2.0, 0.0, 5.0]], [[4.0, 5.0, 0.0], [2.0, -2.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[1.0, -6.0, -2.0], [0.0, 2.0, 0.0]])+(1.-msk_arg1)*numpy.array([[4.0, 3.0, 5.0], [-7.0, 3.0, 
+5.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([38.0, 36.0])+(1.-msk_ref)*numpy.array([-38.0, -19.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank3_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, -6.0, 0.0], [-5.0, -4.0, 1.0], [7.0, -6.0, -3.0], [-4.0, -2.0, -5.0]], [[3.0, -1.0, 
+3.0], [3.0, 3.0, -3.0], [-2.0, 5.0, -2.0], [-2.0, 0.0, 5.0]]], [[[6.0, 5.0, 7.0], [1.0, 2.0, 4.0], [5.0, -6.0, 0.0], [2.0, 1.0, 
+0.0]], [[-4.0, -2.0, 4.0], [5.0, 1.0, 3.0], [4.0, 2.0, 6.0], [-6.0, 4.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 5.0, 
+-4.0], [-7.0, 5.0, 1.0], [4.0, -1.0, 4.0], [-6.0, 5.0, 2.0]], [[-7.0, -6.0, 0.0], [-3.0, -7.0, 0.0], [-6.0, 4.0, 0.0], [-4.0, 
+2.0, -3.0]]], [[[-5.0, 0.0, 4.0], [1.0, -4.0, -5.0], [-3.0, 5.0, 1.0], [7.0, 0.0, 4.0]], [[7.0, 4.0, 2.0], [5.0, 4.0, -4.0], 
+[-3.0, 0.0, -2.0], [3.0, -6.0, -5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[3.0, 4.0, -1.0], [6.0, 0.0, -2.0], [7.0, 5.0, -4.0], [-3.0, -2.0, 7.0]], [[-2.0, 0.0, 1.0], 
+[-4.0, 7.0, -7.0], [-3.0, 4.0, -3.0], [2.0, 5.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -7.0, 6.0], [-6.0, 4.0, -4.0], [7.0, 
+0.0, 6.0], [-1.0, -7.0, -7.0]], [[2.0, 1.0, -1.0], [-4.0, 6.0, 0.0], [-3.0, -6.0, -1.0], [3.0, -3.0, 4.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([20.0, 20.0])+(1.-msk_ref)*numpy.array([-82.0, 5.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([-2.0, 0.0])+(1.-msk_arg0)*numpy.array([7.0, -3.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([6.0, 5.0])+(1.-msk_arg1)*numpy.array([-6.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-12.0, -10.0], [0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-42.0, 49.0], [18.0, -21.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-7.0, 6.0, -3.0], [0.0, -3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[5.0, -4.0, -3.0], [-7.0, 
+0.0, 0.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-4.0, -1.0, 5.0], [3.0, -4.0, 5.0]])+(1.-msk_arg1)*numpy.array([[1.0, -6.0, 5.0], [-2.0, 0.0, 
+6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[7.0, -60.0], [3.0, 12.0]])+(1.-msk_ref)*numpy.array([[14.0, -28.0], [-7.0, 14.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, 0.0, -6.0], [3.0, -7.0, -4.0]], [[6.0, -4.0, 4.0], [-3.0, -1.0, 
+7.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 0.0, -2.0], [-1.0, -3.0, 0.0]], [[0.0, -5.0, 3.0], [-2.0, 0.0, -5.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[1.0, 6.0, -6.0], [-6.0, 3.0, 1.0]], [[7.0, 4.0, 6.0], [7.0, -2.0, 
+-3.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, 4.0, 2.0], [2.0, 0.0, -5.0]], [[6.0, -1.0, 3.0], [5.0, -4.0, 7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-14.0, -38.0], [-20.0, 10.0]])+(1.-msk_ref)*numpy.array([[-6.0, 1.0], [7.0, -31.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank4_offset3(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[5.0, 0.0, 4.0], [-1.0, 1.0, 2.0], [5.0, 7.0, 7.0], [-7.0, -7.0, 4.0]], [[2.0, 0.0, -7.0], 
+[6.0, 0.0, -4.0], [0.0, 7.0, 2.0], [-3.0, -2.0, 7.0]]], [[[7.0, 2.0, -2.0], [-2.0, -1.0, 0.0], [-3.0, -6.0, 6.0], [-7.0, -7.0, 
+3.0]], [[0.0, 3.0, 0.0], [-5.0, 0.0, 5.0], [-3.0, -7.0, 0.0], [2.0, 4.0, -2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -2.0, 
+5.0], [0.0, 0.0, -5.0], [3.0, 1.0, -4.0], [-7.0, -4.0, 6.0]], [[-6.0, -1.0, 0.0], [3.0, 6.0, 2.0], [4.0, -4.0, 0.0], [-2.0, 
+1.0, 2.0]]], [[[0.0, -1.0, -3.0], [6.0, 6.0, -7.0], [1.0, 1.0, 2.0], [0.0, -5.0, -6.0]], [[-4.0, 4.0, -5.0], [-7.0, 6.0, -4.0], 
+[7.0, -5.0, 7.0], [-2.0, -7.0, -6.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[4.0, -2.0, 3.0], [-5.0, 3.0, -2.0], [-4.0, 4.0, 2.0], [-4.0, 4.0, 5.0]], [[5.0, -7.0, 7.0], 
+[0.0, 2.0, 7.0], [6.0, 3.0, 3.0], [-6.0, 2.0, 7.0]]], [[[3.0, -7.0, 5.0], [5.0, -6.0, 6.0], [-5.0, 7.0, 0.0], [2.0, 5.0, 1.0]], 
+[[0.0, 1.0, 7.0], [-4.0, -6.0, -1.0], [-5.0, 3.0, -7.0], [0.0, -7.0, -1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 6.0, -3.0], 
+[2.0, 4.0, -7.0], [-3.0, 2.0, 4.0], [7.0, 0.0, 6.0]], [[2.0, 0.0, 3.0], [0.0, 3.0, -1.0], [2.0, -4.0, -3.0], [-6.0, 1.0, 
+-1.0]]], [[[4.0, -4.0, 7.0], [5.0, 0.0, -5.0], [-6.0, -5.0, 3.0], [-5.0, 0.0, 0.0]], [[-5.0, 6.0, 0.0], [-6.0, 1.0, 5.0], [7.0, 
+6.0, -2.0], [6.0, -4.0, -5.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[101.0, -40.0], [-3.0, -94.0]])+(1.-msk_ref)*numpy.array([[11.0, 68.0], [82.0, 166.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([1.0, 5.0])+(1.-msk_arg0)*numpy.array([-2.0, -2.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-6.0, 1.0, -4.0, 5.0, -6.0], [0.0, -2.0, 7.0, 5.0, -4.0], [-3.0, 0.0, 7.0, 0.0, -4.0], [-1.0, 
+-4.0, 4.0, 3.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -7.0, 2.0, 5.0, -4.0], [-7.0, 3.0, -7.0, -4.0, -6.0], [6.0, 7.0, -6.0, 
+3.0, 1.0], [6.0, 2.0, -2.0, 5.0, 5.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-6.0, 1.0, -4.0, 5.0, -6.0], [0.0, -2.0, 7.0, 5.0, -4.0], [-3.0, 0.0, 7.0, 0.0, -4.0], [-1.0, 
+-4.0, 4.0, 3.0, 1.0]], [[-30.0, 5.0, -20.0, 25.0, -30.0], [0.0, -10.0, 35.0, 25.0, -20.0], [-15.0, 0.0, 35.0, 0.0, -20.0], 
+[-5.0, -20.0, 20.0, 15.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[14.0, 14.0, -4.0, -10.0, 8.0], [14.0, -6.0, 14.0, 8.0, 12.0], 
+[-12.0, -14.0, 12.0, -6.0, -2.0], [-12.0, -4.0, 4.0, -10.0, -10.0]], [[14.0, 14.0, -4.0, -10.0, 8.0], [14.0, -6.0, 14.0, 8.0, 
+12.0], [-12.0, -14.0, 12.0, -6.0, -2.0], [-12.0, -4.0, 4.0, -10.0, -10.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, 7.0, -4.0], [3.0, 3.0, -2.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0, 4.0], [-6.0, 2.0, 
+3.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-5.0, -5.0, -5.0], [-5.0, -3.0, 0.0], [5.0, -4.0, 5.0], [7.0, -2.0, 2.0], [0.0, 3.0, -2.0]], 
+[[-6.0, -3.0, 2.0], [4.0, 1.0, 6.0], [0.0, -6.0, 0.0], [3.0, 6.0, -5.0], [6.0, -4.0, 3.0]], [[6.0, 2.0, 7.0], [0.0, 5.0, 0.0], 
+[4.0, 4.0, 1.0], [3.0, 7.0, -1.0], [3.0, 7.0, -1.0]], [[0.0, -1.0, 6.0], [-7.0, -7.0, 6.0], [-4.0, 1.0, 7.0], [-4.0, -5.0, 
+-3.0], [0.0, 5.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 5.0, 6.0], [6.0, -7.0, 7.0], [0.0, -4.0, -2.0], [7.0, -5.0, 6.0], 
+[6.0, -3.0, 0.0]], [[-3.0, 5.0, 2.0], [-7.0, -6.0, -7.0], [2.0, -3.0, -4.0], [-4.0, -6.0, 0.0], [1.0, 3.0, -3.0]], [[0.0, 0.0, 
+-7.0], [-3.0, 2.0, -6.0], [1.0, 1.0, -3.0], [-4.0, -3.0, -6.0], [2.0, 6.0, 4.0]], [[0.0, 1.0, -1.0], [2.0, 7.0, 2.0], [-1.0, 
+1.0, 1.0], [6.0, 7.0, 3.0], [-3.0, 0.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-40.0, -46.0, -23.0, 13.0, 29.0], [-59.0, 3.0, -42.0, 77.0, -10.0], [16.0, 35.0, 44.0, 68.0, 
+68.0], [-31.0, -108.0, -41.0, -43.0, 63.0]], [[-20.0, -24.0, -7.0, 11.0, 13.0], [-31.0, 3.0, -18.0, 37.0, 0.0], [10.0, 15.0, 
+22.0, 32.0, 32.0], [-15.0, -54.0, -23.0, -21.0, 29.0]]])+(1.-msk_ref)*numpy.array([[[29.0, 21.0, -12.0, 19.0, -3.0], [13.0, 
+-34.0, -19.0, -6.0, -9.0], [-28.0, -22.0, -11.0, -27.0, 22.0], [-3.0, 15.0, 5.0, 19.0, 8.0]], [[-14.0, -29.0, -14.0, -34.0, 
+-42.0], [34.0, 9.0, -30.0, 12.0, -9.0], [-21.0, 4.0, -13.0, 0.0, 12.0], [-1.0, 8.0, 11.0, -13.0, 24.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, 4.0, 7.0], [0.0, -5.0, 0.0]], [[-7.0, -6.0, -2.0], [3.0, 6.0, 
+-2.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 5.0, 5.0], [4.0, 4.0, -7.0]], [[5.0, 2.0, 3.0], [-5.0, -3.0, -1.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[-2.0, -2.0, -3.0], [4.0, 7.0, 0.0]], [[2.0, 4.0, 3.0], [-5.0, 0.0, -7.0]], [[4.0, -7.0, 
+3.0], [-6.0, 4.0, 6.0]], [[-2.0, -7.0, -4.0], [0.0, -3.0, 4.0]], [[4.0, 2.0, 0.0], [3.0, 6.0, 3.0]]], [[[-1.0, -6.0, 3.0], 
+[-1.0, -5.0, -5.0]], [[3.0, -7.0, 5.0], [-7.0, -7.0, -3.0]], [[-1.0, -7.0, 2.0], [5.0, -7.0, 6.0]], [[-2.0, -3.0, 4.0], [-1.0, 
+-7.0, 0.0]], [[4.0, -6.0, 3.0], [5.0, -5.0, -4.0]]], [[[-3.0, -1.0, 4.0], [-7.0, 5.0, 4.0]], [[-6.0, -5.0, 0.0], [7.0, -3.0, 
+-1.0]], [[7.0, -7.0, -1.0], [3.0, -3.0, -2.0]], [[-2.0, -3.0, 3.0], [0.0, -4.0, -5.0]], [[5.0, -6.0, -5.0], [-6.0, 6.0, 
+-4.0]]], [[[-3.0, 0.0, -6.0], [-5.0, -1.0, 3.0]], [[-5.0, -5.0, 2.0], [7.0, -3.0, 5.0]], [[0.0, 5.0, 7.0], [-2.0, -7.0, 0.0]], 
+[[7.0, 3.0, 0.0], [-4.0, 6.0, 3.0]], [[0.0, 3.0, 2.0], [-3.0, -6.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, -2.0, -2.0], 
+[3.0, 0.0, 1.0]], [[-2.0, -3.0, -4.0], [-6.0, 1.0, 3.0]], [[-2.0, 3.0, 0.0], [7.0, -2.0, -5.0]], [[-5.0, 0.0, 2.0], [0.0, 2.0, 
+-5.0]], [[2.0, 5.0, -6.0], [-4.0, 5.0, -1.0]]], [[[-4.0, 4.0, -5.0], [-2.0, 6.0, 6.0]], [[0.0, -6.0, 3.0], [5.0, 4.0, 3.0]], 
+[[5.0, 3.0, 1.0], [4.0, -1.0, -4.0]], [[-5.0, -6.0, 0.0], [6.0, -1.0, -6.0]], [[5.0, -6.0, 2.0], [1.0, 7.0, 5.0]]], [[[4.0, 
+7.0, 3.0], [-4.0, -2.0, -1.0]], [[0.0, 0.0, -2.0], [4.0, -7.0, 3.0]], [[5.0, 6.0, -3.0], [6.0, -4.0, 4.0]], [[4.0, -6.0, -4.0], 
+[-7.0, 3.0, 2.0]], [[-2.0, 5.0, -5.0], [-6.0, -5.0, 2.0]]], [[[0.0, -6.0, -7.0], [-3.0, 1.0, 4.0]], [[-3.0, -3.0, 3.0], [3.0, 
+-1.0, 1.0]], [[5.0, 0.0, 6.0], [1.0, 5.0, 2.0]], [[6.0, 6.0, 0.0], [7.0, 6.0, -2.0]], [[-1.0, 4.0, 6.0], [1.0, 0.0, 6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-54.0, 27.0, -47.0, -31.0, -42.0], [27.0, 27.0, 26.0, 61.0, 2.0], [14.0, 25.0, -55.0, 39.0, 
+-114.0], [-22.0, 34.0, 104.0, -53.0, 56.0]], [[86.0, -45.0, 2.0, 38.0, -1.0], [14.0, -46.0, 6.0, -21.0, -5.0], [20.0, 77.0, 
+-10.0, 12.0, 37.0], [6.0, 54.0, -92.0, -49.0, -67.0]]])+(1.-msk_ref)*numpy.array([[[-36.0, -70.0, 76.0, 68.0, 0.0], [-19.0, 
+0.0, 45.0, 47.0, -38.0], [21.0, -43.0, -20.0, -92.0, -52.0], [-101.0, 10.0, 25.0, 78.0, 15.0]], [[9.0, -4.0, -28.0, -20.0, 
+8.0], [-41.0, -43.0, 21.0, -58.0, -12.0], [70.0, -8.0, 6.0, 20.0, 28.0], [-25.0, -25.0, 21.0, -9.0, 10.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank3_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([3.0, -1.0])+(1.-msk_arg0)*numpy.array([-4.0, -7.0])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[2.0, -2.0], [-7.0, 6.0]], [[0.0, 0.0], [0.0, 0.0]], [[7.0, -3.0], [7.0, 2.0]], [[3.0, 3.0], 
+[-4.0, 5.0]], [[0.0, -2.0], [-2.0, 6.0]], [[-4.0, 2.0], [0.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, 6.0], [-5.0, 3.0]], 
+[[-5.0, -5.0], [-4.0, 7.0]], [[-3.0, 5.0], [4.0, 7.0]], [[3.0, 0.0], [0.0, -6.0]], [[-5.0, -1.0], [1.0, 1.0]], [[4.0, 0.0], 
+[0.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[6.0, -6.0], [-21.0, 18.0]], [[0.0, 0.0], [0.0, 0.0]], [[21.0, -9.0], [21.0, 6.0]], [[9.0, 
+9.0], [-12.0, 15.0]], [[0.0, -6.0], [-6.0, 18.0]], [[-12.0, 6.0], [0.0, 18.0]]], [[[-2.0, 2.0], [7.0, -6.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[-7.0, 3.0], [-7.0, -2.0]], [[-3.0, -3.0], [4.0, -5.0]], [[0.0, 2.0], [2.0, -6.0]], [[4.0, -2.0], [0.0, 
+-6.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -24.0], [20.0, -12.0]], [[20.0, 20.0], [16.0, -28.0]], [[12.0, -20.0], [-16.0, 
+-28.0]], [[-12.0, 0.0], [0.0, 24.0]], [[20.0, 4.0], [-4.0, -4.0]], [[-16.0, 0.0], [0.0, -8.0]]], [[[-35.0, -42.0], [35.0, 
+-21.0]], [[35.0, 35.0], [28.0, -49.0]], [[21.0, -35.0], [-28.0, -49.0]], [[-21.0, 0.0], [0.0, 42.0]], [[35.0, 7.0], [-7.0, 
+-7.0]], [[-28.0, 0.0], [0.0, -14.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank4_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[5.0, 0.0, 7.0], [3.0, -6.0, -4.0]])+(1.-msk_arg0)*numpy.array([[3.0, 0.0, 3.0], [5.0, 2.0, 
+6.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[2.0, -5.0, -6.0], [1.0, -6.0, 5.0]], [[-3.0, 5.0, -2.0], [4.0, 6.0, -7.0]]], [[[-5.0, 6.0, 
+-4.0], [4.0, -7.0, 2.0]], [[0.0, 2.0, 2.0], [6.0, -4.0, 0.0]]], [[[5.0, -3.0, -3.0], [4.0, -5.0, -2.0]], [[6.0, -3.0, 4.0], 
+[-1.0, 2.0, -3.0]]], [[[3.0, -2.0, -7.0], [-1.0, 6.0, -4.0]], [[0.0, 6.0, 7.0], [-7.0, 0.0, 4.0]]], [[[-3.0, 0.0, 1.0], [-2.0, 
+-4.0, -7.0]], [[7.0, -4.0, 0.0], [-1.0, -3.0, -3.0]]], [[[5.0, -3.0, 2.0], [0.0, -7.0, 4.0]], [[6.0, -2.0, 1.0], [-2.0, 0.0, 
+0.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -3.0, -6.0], [-6.0, -4.0, 3.0]], [[0.0, 3.0, 0.0], [-4.0, 5.0, -1.0]]], [[[0.0, 
+-1.0, -6.0], [-3.0, -7.0, 6.0]], [[-2.0, 2.0, 6.0], [1.0, 6.0, 5.0]]], [[[6.0, 4.0, 5.0], [-1.0, -3.0, -4.0]], [[-7.0, 2.0, 
+-3.0], [6.0, -5.0, 3.0]]], [[[-1.0, -1.0, 4.0], [-5.0, 5.0, 2.0]], [[1.0, -4.0, 7.0], [3.0, 2.0, -1.0]]], [[[-3.0, -4.0, 3.0], 
+[4.0, -7.0, -3.0]], [[-5.0, 0.0, 1.0], [0.0, 4.0, 6.0]]], [[[4.0, 2.0, -5.0], [5.0, -5.0, -3.0]], [[5.0, 2.0, -4.0], [0.0, 
+-6.0, -6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-32.0, 40.0], [-29.0, -29.0]], [[-53.0, 34.0], [14.0, 30.0]], [[4.0, 6.0], [58.0, -26.0]], 
+[[-34.0, -33.0], [49.0, -7.0]], [[-8.0, -59.0], [35.0, -26.0]], [[39.0, 28.0], [37.0, -10.0]]], [[[60.0, 19.0], [-31.0, 4.0]], 
+[[-35.0, 46.0], [-20.0, 42.0]], [[45.0, 50.0], [20.0, -3.0]], [[49.0, -23.0], [-64.0, -37.0]], [[-13.0, 46.0], [45.0, 27.0]], 
+[[25.0, 26.0], [26.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -9.0], [0.0, -15.0]], [[-18.0, 9.0], [12.0, 18.0]], [[33.0, 
+-15.0], [-30.0, 27.0]], [[9.0, -9.0], [24.0, 6.0]], [[0.0, 3.0], [-12.0, 18.0]], [[-3.0, 6.0], [3.0, -18.0]]], [[[-22.0, 
+-20.0], [6.0, -16.0]], [[-38.0, 7.0], [30.0, 47.0]], [[68.0, -35.0], [-49.0, 38.0]], [[17.0, -3.0], [39.0, 13.0]], [[-5.0, 
+-12.0], [-19.0, 44.0]], [[-6.0, -3.0], [5.0, -48.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[0.0, 0.0, 2.0, 0.0, 0.0], [0.0, 4.0, -7.0, 3.0, -3.0], [1.0, 7.0, 0.0, -5.0, 5.0], [4.0, 
+-2.0, 2.0, -2.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 1.0, -5.0, 2.0, 4.0], [-1.0, 1.0, 3.0, -6.0, -1.0], [-4.0, 7.0, -5.0, 
+-5.0, -4.0], [7.0, 3.0, 3.0, 3.0, 0.0]])
+      arg1=7.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, 0.0, 14.0, 0.0, 0.0], [0.0, 28.0, -49.0, 21.0, -21.0], [7.0, 49.0, 0.0, -35.0, 35.0], 
+[28.0, -14.0, 14.0, -14.0, 0.0]])+(1.-msk_ref)*numpy.array([[-14.0, 7.0, -35.0, 14.0, 28.0], [-7.0, 7.0, 21.0, -42.0, -7.0], 
+[-28.0, 49.0, -35.0, -35.0, -28.0], [49.0, 21.0, 21.0, 21.0, 0.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, -4.0, 0.0, -1.0, 3.0], [1.0, 6.0, 7.0, -5.0, -5.0], [4.0, -2.0, 1.0, -1.0, -2.0], [0.0, 
+-5.0, 0.0, -1.0, 2.0]])+(1.-msk_arg0)*numpy.array([[5.0, -5.0, 5.0, -6.0, 2.0], [1.0, -2.0, 0.0, -5.0, 5.0], [0.0, 7.0, 7.0, 
+-3.0, -4.0], [5.0, -1.0, -4.0, 0.0, 6.0]])
+      arg1=numpy.array(3.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[12.0, -12.0, 0.0, -3.0, 9.0], [3.0, 18.0, 21.0, -15.0, -15.0], [12.0, -6.0, 3.0, -3.0, -6.0], 
+[0.0, -15.0, 0.0, -3.0, 6.0]])+(1.-msk_ref)*numpy.array([[15.0, -15.0, 15.0, -18.0, 6.0], [3.0, -6.0, 0.0, -15.0, 15.0], [0.0, 
+21.0, 21.0, -9.0, -12.0], [15.0, -3.0, -12.0, 0.0, 18.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 6.0, 0.0], [2.0, 1.0, -4.0], [4.0, 6.0, 4.0], [6.0, 3.0, -6.0], [2.0, 4.0, 4.0]], 
+[[-2.0, 2.0, 4.0], [-4.0, 2.0, 6.0], [6.0, -7.0, 0.0], [4.0, 0.0, 1.0], [-7.0, -5.0, -1.0]], [[6.0, -1.0, 5.0], [5.0, -7.0, 
+5.0], [-2.0, -4.0, 4.0], [0.0, -3.0, 5.0], [-6.0, -5.0, 2.0]], [[-4.0, 1.0, 6.0], [4.0, 1.0, 5.0], [-2.0, -3.0, 0.0], [-6.0, 
+-7.0, -1.0], [2.0, -1.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 0.0, 0.0], [-2.0, 1.0, 0.0], [0.0, 0.0, -6.0], [-2.0, 0.0, 
+-4.0], [-6.0, -3.0, 0.0]], [[3.0, 7.0, -4.0], [6.0, -3.0, 5.0], [6.0, 4.0, -6.0], [0.0, -7.0, -6.0], [7.0, 0.0, 7.0]], [[4.0, 
+5.0, 0.0], [-4.0, 2.0, 5.0], [6.0, 3.0, 0.0], [-1.0, -3.0, -5.0], [5.0, -7.0, -4.0]], [[6.0, 4.0, 2.0], [-3.0, 0.0, 5.0], [6.0, 
+6.0, -4.0], [5.0, 6.0, -1.0], [7.0, 4.0, -7.0]]])
+      arg1=numpy.array([4.0, 3.0, -5.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[18.0, 31.0, 14.0, 63.0, 0.0], [-22.0, -40.0, 3.0, 11.0, -38.0], [-4.0, -26.0, -40.0, -34.0, 
+-49.0], [-43.0, -6.0, -17.0, -40.0, 5.0]])+(1.-msk_ref)*numpy.array([[8.0, -5.0, 30.0, 12.0, -33.0], [53.0, -10.0, 66.0, 9.0, 
+-7.0], [31.0, -35.0, 33.0, 12.0, 19.0], [26.0, -37.0, 62.0, 43.0, 75.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-2.0, -3.0, 0.0], [0.0, -3.0, -3.0]], [[0.0, 6.0, 5.0], [-2.0, 0.0, -3.0]], [[0.0, -5.0, 
+-5.0], [-5.0, 2.0, 3.0]], [[-1.0, 6.0, 0.0], [-4.0, 5.0, 0.0]], [[-5.0, 2.0, 1.0], [0.0, 6.0, 5.0]]], [[[-6.0, 5.0, -1.0], 
+[0.0, 3.0, -6.0]], [[2.0, 2.0, 7.0], [0.0, 0.0, 2.0]], [[-6.0, -1.0, -2.0], [4.0, 0.0, 3.0]], [[3.0, 1.0, 0.0], [-4.0, 0.0, 
+1.0]], [[-2.0, 0.0, 2.0], [7.0, -4.0, -5.0]]], [[[7.0, 1.0, -1.0], [7.0, 5.0, -5.0]], [[-4.0, 1.0, -3.0], [5.0, -4.0, 0.0]], 
+[[-4.0, 6.0, -7.0], [6.0, -2.0, 0.0]], [[1.0, 1.0, -1.0], [-7.0, -4.0, -6.0]], [[-5.0, 4.0, -4.0], [-7.0, 0.0, -1.0]]], 
+[[[-3.0, 7.0, 7.0], [3.0, -1.0, -1.0]], [[4.0, 0.0, -5.0], [-2.0, 7.0, -4.0]], [[2.0, 4.0, 7.0], [2.0, 6.0, 5.0]], [[-1.0, 
+-7.0, -2.0], [-6.0, 0.0, 5.0]], [[3.0, 7.0, 0.0], [-3.0, 0.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, 4.0, 7.0], [3.0, 
+7.0, 4.0]], [[-1.0, -5.0, -6.0], [4.0, -4.0, -4.0]], [[6.0, 1.0, 0.0], [4.0, 5.0, -2.0]], [[4.0, 7.0, -7.0], [3.0, 5.0, 4.0]], 
+[[6.0, -5.0, 6.0], [-1.0, -5.0, 1.0]]], [[[-4.0, 0.0, 5.0], [4.0, -6.0, 1.0]], [[7.0, 2.0, 0.0], [-4.0, -7.0, 7.0]], [[1.0, 
+0.0, -2.0], [-1.0, -2.0, -7.0]], [[7.0, 0.0, -3.0], [4.0, 2.0, -1.0]], [[-3.0, -4.0, 3.0], [2.0, 0.0, 0.0]]], [[[-4.0, -5.0, 
+-1.0], [-4.0, 3.0, 2.0]], [[0.0, 2.0, 0.0], [-3.0, 2.0, 7.0]], [[-4.0, 2.0, 0.0], [-3.0, -5.0, -2.0]], [[3.0, 5.0, -7.0], [7.0, 
+7.0, -5.0]], [[6.0, 0.0, 6.0], [5.0, 0.0, 3.0]]], [[[-1.0, 5.0, 4.0], [-7.0, -7.0, 7.0]], [[3.0, 0.0, 0.0], [1.0, -3.0, 4.0]], 
+[[-6.0, -3.0, 4.0], [6.0, 5.0, -1.0]], [[-2.0, 4.0, 0.0], [-6.0, 7.0, -6.0]], [[-5.0, 0.0, 4.0], [-1.0, -1.0, 0.0]]]])
+      arg1=numpy.array([[-6.0, -5.0, 6.0], [6.0, 7.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[6.0, -12.0, -21.0, -13.0, 68.0], [26.0, 20.0, 53.0, -47.0, 38.0], [24.0, 3.0, -26.0, -87.0, 
+-56.0], [36.0, -17.0, 64.0, -7.0, -71.0]])+(1.-msk_ref)*numpy.array([[119.0, -9.0, 18.0, -48.0, -16.0], [36.0, -125.0, -38.0, 
+-22.0, 68.0], [40.0, -14.0, -39.0, 6.0, 30.0], [-86.0, -33.0, 146.0, 5.0, 41.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[6.0, -4.0, 3.0, 5.0, -7.0], [3.0, 0.0, 5.0, -2.0, 5.0], [2.0, 1.0, 0.0, -6.0, -7.0], [-2.0, 
+2.0, -3.0, 3.0, 3.0]])+(1.-msk_arg0)*numpy.array([[6.0, -6.0, -6.0, -1.0, -5.0], [7.0, 0.0, 6.0, 2.0, -2.0], [-2.0, 7.0, -1.0, 
+-1.0, -3.0], [1.0, 0.0, 1.0, 4.0, -2.0]])
+      arg1=numpy.array([-5.0, 5.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-30.0, 30.0], [20.0, -20.0], [-15.0, 15.0], [-25.0, 25.0], [35.0, -35.0]], [[-15.0, 15.0], 
+[0.0, 0.0], [-25.0, 25.0], [10.0, -10.0], [-25.0, 25.0]], [[-10.0, 10.0], [-5.0, 5.0], [0.0, 0.0], [30.0, -30.0], [35.0, 
+-35.0]], [[10.0, -10.0], [-10.0, 10.0], [15.0, -15.0], [-15.0, 15.0], [-15.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 
+30.0], [30.0, -30.0], [30.0, -30.0], [5.0, -5.0], [25.0, -25.0]], [[-35.0, 35.0], [0.0, 0.0], [-30.0, 30.0], [-10.0, 10.0], 
+[10.0, -10.0]], [[10.0, -10.0], [-35.0, 35.0], [5.0, -5.0], [5.0, -5.0], [15.0, -15.0]], [[-5.0, 5.0], [0.0, 0.0], [-5.0, 5.0], 
+[-20.0, 20.0], [10.0, -10.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-5.0, -6.0, 5.0], [5.0, 5.0, -6.0], [-6.0, 2.0, 2.0], [7.0, 4.0, -1.0], [-2.0, -3.0, -5.0]], 
+[[5.0, -4.0, -5.0], [-6.0, -6.0, 3.0], [5.0, 2.0, -7.0], [3.0, 4.0, 0.0], [2.0, -2.0, 0.0]], [[-1.0, 1.0, 3.0], [3.0, -7.0, 
+2.0], [-5.0, -4.0, 5.0], [2.0, -4.0, 5.0], [0.0, 5.0, 1.0]], [[-5.0, 3.0, 2.0], [0.0, -3.0, -6.0], [7.0, -1.0, 3.0], [7.0, 2.0, 
+-4.0], [4.0, -2.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 5.0, 1.0], [-2.0, -4.0, 3.0], [-6.0, 5.0, 5.0], [0.0, -4.0, 0.0], 
+[-7.0, -1.0, 4.0]], [[6.0, 5.0, 3.0], [5.0, -1.0, 2.0], [0.0, 7.0, 1.0], [-3.0, -2.0, 6.0], [0.0, -7.0, 6.0]], [[-4.0, -4.0, 
+3.0], [-5.0, -1.0, 6.0], [-1.0, -4.0, 4.0], [-3.0, -4.0, -4.0], [1.0, 1.0, 1.0]], [[5.0, -3.0, 7.0], [3.0, -4.0, 1.0], [3.0, 
+7.0, 5.0], [0.0, -4.0, 5.0], [-7.0, 0.0, -4.0]]])
+      arg1=numpy.array([[5.0, 6.0, -1.0], [-4.0, 4.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-66.0, -4.0], [61.0, 0.0], [-20.0, 32.0], [60.0, -12.0], [-23.0, -4.0]], [[6.0, -36.0], 
+[-69.0, 0.0], [44.0, -12.0], [39.0, 4.0], [-2.0, -16.0]], [[-2.0, 8.0], [-29.0, -40.0], [-54.0, 4.0], [-19.0, -24.0], [29.0, 
+20.0]], [[-9.0, 32.0], [-12.0, -12.0], [26.0, -32.0], [51.0, -20.0], [5.0, -24.0]]])+(1.-msk_ref)*numpy.array([[[39.0, 12.0], 
+[-37.0, -8.0], [-5.0, 44.0], [-24.0, -16.0], [-45.0, 24.0]], [[57.0, -4.0], [17.0, -24.0], [41.0, 28.0], [-33.0, 4.0], [-48.0, 
+-28.0]], [[-47.0, 0.0], [-37.0, 16.0], [-33.0, -12.0], [-35.0, -4.0], [10.0, 0.0]], [[0.0, -32.0], [-10.0, -28.0], [52.0, 
+16.0], [-29.0, -16.0], [-31.0, 28.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-2.0, -2.0, 5.0], [-7.0, 1.0, 4.0]], [[-6.0, -4.0, 3.0], [1.0, -5.0, -4.0]], [[0.0, 0.0, 
+-3.0], [-3.0, 5.0, 7.0]], [[-7.0, -2.0, 0.0], [0.0, 4.0, -2.0]], [[4.0, -5.0, -7.0], [-5.0, 3.0, -7.0]]], [[[3.0, -2.0, -3.0], 
+[-2.0, -5.0, -7.0]], [[6.0, -4.0, -4.0], [0.0, -6.0, 0.0]], [[-3.0, 1.0, -7.0], [-4.0, 1.0, 5.0]], [[2.0, 3.0, 6.0], [-5.0, 
+4.0, 6.0]], [[-5.0, -2.0, -5.0], [4.0, -2.0, 5.0]]], [[[3.0, -3.0, -7.0], [-2.0, 1.0, 2.0]], [[6.0, 3.0, 7.0], [3.0, 5.0, 
+-5.0]], [[0.0, -3.0, -5.0], [-1.0, -7.0, 5.0]], [[6.0, 4.0, 0.0], [1.0, 5.0, 3.0]], [[-2.0, -6.0, 1.0], [5.0, -6.0, 0.0]]], 
+[[[-1.0, 3.0, 2.0], [-6.0, 6.0, 0.0]], [[0.0, 5.0, 6.0], [-6.0, 0.0, 2.0]], [[1.0, 2.0, 3.0], [7.0, -5.0, -1.0]], [[0.0, 2.0, 
+-6.0], [0.0, 4.0, -1.0]], [[6.0, 6.0, -1.0], [3.0, 5.0, -6.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 0.0, 0.0], [4.0, 2.0, 
+6.0]], [[-5.0, -3.0, 7.0], [3.0, 6.0, 6.0]], [[5.0, 0.0, 4.0], [0.0, 6.0, -1.0]], [[3.0, -3.0, -7.0], [-5.0, 2.0, -5.0]], 
+[[3.0, 7.0, 3.0], [-3.0, 3.0, 3.0]]], [[[3.0, -4.0, 7.0], [0.0, 7.0, -2.0]], [[0.0, -3.0, 1.0], [-6.0, -4.0, 0.0]], [[4.0, 
+-7.0, -6.0], [6.0, -6.0, -2.0]], [[-6.0, -5.0, -5.0], [-2.0, 1.0, 3.0]], [[0.0, 7.0, 0.0], [-5.0, -2.0, -6.0]]], [[[7.0, 6.0, 
+-1.0], [0.0, -4.0, -3.0]], [[6.0, 0.0, 2.0], [0.0, -7.0, -7.0]], [[0.0, 4.0, 0.0], [-7.0, -2.0, -6.0]], [[1.0, 3.0, 7.0], [4.0, 
+0.0, -3.0]], [[-7.0, -1.0, 6.0], [6.0, 0.0, -3.0]]], [[[0.0, -7.0, 0.0], [-4.0, 4.0, -2.0]], [[-2.0, -5.0, 6.0], [-1.0, 2.0, 
+0.0]], [[-6.0, -3.0, -4.0], [-5.0, 0.0, 0.0]], [[-6.0, 0.0, 2.0], [-3.0, 4.0, 7.0]], [[-1.0, 7.0, 4.0], [-4.0, 0.0, 0.0]]]])
+      arg1=numpy.array([[[5.0, -1.0, -3.0], [1.0, 1.0, 0.0]], [[0.0, -7.0, -1.0], [-5.0, 5.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-29.0, 57.0], [-39.0, -13.0], [11.0, 57.0], [-29.0, 30.0], [44.0, 68.0]], [[19.0, -12.0], 
+[40.0, 2.0], [2.0, 35.0], [-12.0, 30.0], [-6.0, -1.0]], [[38.0, 47.0], [14.0, -28.0], [10.0, 6.0], [32.0, -2.0], [-8.0, 
+-14.0]], [[-14.0, 37.0], [-29.0, -7.0], [-4.0, -79.0], [20.0, 10.0], [35.0, -43.0]]])+(1.-msk_ref)*numpy.array([[[11.0, 2.0], 
+[-34.0, 41.0], [19.0, 24.0], [36.0, 53.0], [-1.0, -16.0]], [[5.0, 52.0], [-10.0, 30.0], [45.0, -9.0], [-11.0, 61.0], [-14.0, 
+-46.0]], [[28.0, -67.0], [17.0, -51.0], [-13.0, -15.0], [-15.0, -54.0], [-46.0, -35.0]], [[7.0, 85.0], [-22.0, 44.0], [-20.0, 
+50.0], [-35.0, 47.0], [-28.0, -33.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 5.0, 2.0, -5.0, -5.0], [6.0, -7.0, 6.0, -1.0, 2.0], [3.0, 3.0, 0.0, 0.0, -1.0], [-3.0, 
+-4.0, 5.0, 1.0, 6.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 7.0, 0.0, 0.0, -4.0], [4.0, 2.0, 0.0, 4.0, 2.0], [-7.0, 7.0, -3.0, 
+-7.0, 3.0], [-6.0, -1.0, 1.0, 0.0, 0.0]])
+      arg1=numpy.array([[6.0, -1.0, 0.0, -3.0, -4.0], [-7.0, 7.0, -6.0, 0.0, 5.0], [-5.0, -1.0, -7.0, -2.0, 4.0], [-1.0, -7.0, 
+-2.0, 4.0, -7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[24.0, -4.0, 0.0, -12.0, -16.0], [-28.0, 28.0, -24.0, 0.0, 20.0], [-20.0, -4.0, -28.0, -8.0, 
+16.0], [-4.0, -28.0, -8.0, 16.0, -28.0]], [[30.0, -5.0, 0.0, -15.0, -20.0], [-35.0, 35.0, -30.0, 0.0, 25.0], [-25.0, -5.0, 
+-35.0, -10.0, 20.0], [-5.0, -35.0, -10.0, 20.0, -35.0]], [[12.0, -2.0, 0.0, -6.0, -8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], 
+[-10.0, -2.0, -14.0, -4.0, 8.0], [-2.0, -14.0, -4.0, 8.0, -14.0]], [[-30.0, 5.0, 0.0, 15.0, 20.0], [35.0, -35.0, 30.0, 0.0, 
+-25.0], [25.0, 5.0, 35.0, 10.0, -20.0], [5.0, 35.0, 10.0, -20.0, 35.0]], [[-30.0, 5.0, 0.0, 15.0, 20.0], [35.0, -35.0, 30.0, 
+0.0, -25.0], [25.0, 5.0, 35.0, 10.0, -20.0], [5.0, 35.0, 10.0, -20.0, 35.0]]], [[[36.0, -6.0, 0.0, -18.0, -24.0], [-42.0, 42.0, 
+-36.0, 0.0, 30.0], [-30.0, -6.0, -42.0, -12.0, 24.0], [-6.0, -42.0, -12.0, 24.0, -42.0]], [[-42.0, 7.0, 0.0, 21.0, 28.0], 
+[49.0, -49.0, 42.0, 0.0, -35.0], [35.0, 7.0, 49.0, 14.0, -28.0], [7.0, 49.0, 14.0, -28.0, 49.0]], [[36.0, -6.0, 0.0, -18.0, 
+-24.0], [-42.0, 42.0, -36.0, 0.0, 30.0], [-30.0, -6.0, -42.0, -12.0, 24.0], [-6.0, -42.0, -12.0, 24.0, -42.0]], [[-6.0, 1.0, 
+0.0, 3.0, 4.0], [7.0, -7.0, 6.0, 0.0, -5.0], [5.0, 1.0, 7.0, 2.0, -4.0], [1.0, 7.0, 2.0, -4.0, 7.0]], [[12.0, -2.0, 0.0, -6.0, 
+-8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], [-10.0, -2.0, -14.0, -4.0, 8.0], [-2.0, -14.0, -4.0, 8.0, -14.0]]], [[[18.0, -3.0, 0.0, 
+-9.0, -12.0], [-21.0, 21.0, -18.0, 0.0, 15.0], [-15.0, -3.0, -21.0, -6.0, 12.0], [-3.0, -21.0, -6.0, 12.0, -21.0]], [[18.0, 
+-3.0, 0.0, -9.0, -12.0], [-21.0, 21.0, -18.0, 0.0, 15.0], [-15.0, -3.0, -21.0, -6.0, 12.0], [-3.0, -21.0, -6.0, 12.0, -21.0]], 
+[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 1.0, 0.0, 3.0, 4.0], [7.0, 
+-7.0, 6.0, 0.0, -5.0], [5.0, 1.0, 7.0, 2.0, -4.0], [1.0, 7.0, 2.0, -4.0, 7.0]]], [[[-18.0, 3.0, 0.0, 9.0, 12.0], [21.0, -21.0, 
+18.0, 0.0, -15.0], [15.0, 3.0, 21.0, 6.0, -12.0], [3.0, 21.0, 6.0, -12.0, 21.0]], [[-24.0, 4.0, 0.0, 12.0, 16.0], [28.0, -28.0, 
+24.0, 0.0, -20.0], [20.0, 4.0, 28.0, 8.0, -16.0], [4.0, 28.0, 8.0, -16.0, 28.0]], [[30.0, -5.0, 0.0, -15.0, -20.0], [-35.0, 
+35.0, -30.0, 0.0, 25.0], [-25.0, -5.0, -35.0, -10.0, 20.0], [-5.0, -35.0, -10.0, 20.0, -35.0]], [[6.0, -1.0, 0.0, -3.0, -4.0], 
+[-7.0, 7.0, -6.0, 0.0, 5.0], [-5.0, -1.0, -7.0, -2.0, 4.0], [-1.0, -7.0, -2.0, 4.0, -7.0]], [[36.0, -6.0, 0.0, -18.0, -24.0], 
+[-42.0, 42.0, -36.0, 0.0, 30.0], [-30.0, -6.0, -42.0, -12.0, 24.0], [-6.0, -42.0, -12.0, 24.0, 
+-42.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, 1.0, 0.0, 3.0, 4.0], [7.0, -7.0, 6.0, 0.0, -5.0], [5.0, 1.0, 7.0, 2.0, -4.0], 
+[1.0, 7.0, 2.0, -4.0, 7.0]], [[42.0, -7.0, 0.0, -21.0, -28.0], [-49.0, 49.0, -42.0, 0.0, 35.0], [-35.0, -7.0, -49.0, -14.0, 
+28.0], [-7.0, -49.0, -14.0, 28.0, -49.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[-24.0, 4.0, 0.0, 12.0, 16.0], [28.0, -28.0, 24.0, 0.0, -20.0], [20.0, 4.0, 28.0, 8.0, -16.0], [4.0, 28.0, 8.0, 
+-16.0, 28.0]]], [[[24.0, -4.0, 0.0, -12.0, -16.0], [-28.0, 28.0, -24.0, 0.0, 20.0], [-20.0, -4.0, -28.0, -8.0, 16.0], [-4.0, 
+-28.0, -8.0, 16.0, -28.0]], [[12.0, -2.0, 0.0, -6.0, -8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], [-10.0, -2.0, -14.0, -4.0, 8.0], 
+[-2.0, -14.0, -4.0, 8.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[24.0, -4.0, 0.0, -12.0, -16.0], [-28.0, 28.0, -24.0, 0.0, 20.0], [-20.0, -4.0, -28.0, -8.0, 16.0], [-4.0, 
+-28.0, -8.0, 16.0, -28.0]], [[12.0, -2.0, 0.0, -6.0, -8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], [-10.0, -2.0, -14.0, -4.0, 8.0], 
+[-2.0, -14.0, -4.0, 8.0, -14.0]]], [[[-42.0, 7.0, 0.0, 21.0, 28.0], [49.0, -49.0, 42.0, 0.0, -35.0], [35.0, 7.0, 49.0, 14.0, 
+-28.0], [7.0, 49.0, 14.0, -28.0, 49.0]], [[42.0, -7.0, 0.0, -21.0, -28.0], [-49.0, 49.0, -42.0, 0.0, 35.0], [-35.0, -7.0, 
+-49.0, -14.0, 28.0], [-7.0, -49.0, -14.0, 28.0, -49.0]], [[-18.0, 3.0, 0.0, 9.0, 12.0], [21.0, -21.0, 18.0, 0.0, -15.0], [15.0, 
+3.0, 21.0, 6.0, -12.0], [3.0, 21.0, 6.0, -12.0, 21.0]], [[-42.0, 7.0, 0.0, 21.0, 28.0], [49.0, -49.0, 42.0, 0.0, -35.0], [35.0, 
+7.0, 49.0, 14.0, -28.0], [7.0, 49.0, 14.0, -28.0, 49.0]], [[18.0, -3.0, 0.0, -9.0, -12.0], [-21.0, 21.0, -18.0, 0.0, 15.0], 
+[-15.0, -3.0, -21.0, -6.0, 12.0], [-3.0, -21.0, -6.0, 12.0, -21.0]]], [[[-36.0, 6.0, 0.0, 18.0, 24.0], [42.0, -42.0, 36.0, 0.0, 
+-30.0], [30.0, 6.0, 42.0, 12.0, -24.0], [6.0, 42.0, 12.0, -24.0, 42.0]], [[-6.0, 1.0, 0.0, 3.0, 4.0], [7.0, -7.0, 6.0, 0.0, 
+-5.0], [5.0, 1.0, 7.0, 2.0, -4.0], [1.0, 7.0, 2.0, -4.0, 7.0]], [[6.0, -1.0, 0.0, -3.0, -4.0], [-7.0, 7.0, -6.0, 0.0, 5.0], 
+[-5.0, -1.0, -7.0, -2.0, 4.0], [-1.0, -7.0, -2.0, 4.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 3.0, 2.0], [1.0, 0.0, 0.0], [-1.0, 3.0, -2.0], [1.0, -1.0, -6.0], [-3.0, -2.0, -1.0]], 
+[[0.0, -7.0, 3.0], [5.0, 3.0, 4.0], [2.0, -1.0, -2.0], [-4.0, -5.0, 0.0], [0.0, 2.0, -3.0]], [[-7.0, 6.0, -2.0], [-5.0, 3.0, 
+-2.0], [-2.0, 5.0, -4.0], [1.0, -3.0, 4.0], [1.0, 3.0, 0.0]], [[-3.0, 7.0, 5.0], [-1.0, 4.0, 4.0], [5.0, -7.0, 0.0], [5.0, 4.0, 
+0.0], [-4.0, 0.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 6.0, 7.0], [-4.0, 4.0, 1.0], [5.0, -6.0, 0.0], [-5.0, 0.0, 3.0], 
+[-3.0, -2.0, 4.0]], [[0.0, -2.0, 6.0], [7.0, 3.0, -5.0], [5.0, 0.0, 6.0], [-1.0, -3.0, -1.0], [-7.0, 1.0, 4.0]], [[-6.0, -5.0, 
+5.0], [-1.0, -5.0, -3.0], [3.0, 4.0, 2.0], [-1.0, 3.0, -4.0], [0.0, -6.0, -4.0]], [[2.0, 1.0, 7.0], [0.0, 5.0, -4.0], [-7.0, 
+3.0, -6.0], [-4.0, 3.0, -3.0], [-4.0, -5.0, 0.0]]])
+      arg1=numpy.array([[[1.0, -7.0, -7.0], [6.0, 6.0, 1.0], [-6.0, -4.0, -4.0], [6.0, -3.0, -3.0], [7.0, 4.0, 0.0]], [[0.0, 
+-4.0, 7.0], [4.0, -5.0, -2.0], [6.0, 2.0, -7.0], [-6.0, -5.0, -2.0], [-5.0, 0.0, -7.0]], [[0.0, -1.0, 7.0], [4.0, 3.0, 6.0], 
+[-6.0, 1.0, 0.0], [6.0, 0.0, -1.0], [2.0, -4.0, 2.0]], [[4.0, 2.0, 4.0], [-1.0, 2.0, 6.0], [1.0, 7.0, 2.0], [-2.0, 1.0, -6.0], 
+[7.0, -6.0, -5.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-35.0, 20.0, -20.0, -15.0, 12.0], [2.0, -19.0, -8.0, -19.0, -14.0], [11.0, 21.0, 3.0, -2.0, 
+-8.0], [14.0, 18.0, 25.0, -9.0, -28.0]], [[1.0, 6.0, -6.0, 6.0, 7.0], [0.0, 4.0, 6.0, -6.0, -5.0], [0.0, 4.0, -6.0, 6.0, 2.0], 
+[4.0, -1.0, 1.0, -2.0, 7.0]], [[-8.0, 10.0, 2.0, -9.0, 5.0], [-26.0, -15.0, 14.0, -5.0, 19.0], [-17.0, -7.0, 9.0, -4.0, -18.0], 
+[-6.0, -5.0, 16.0, 17.0, -15.0]], [[50.0, -6.0, 22.0, 27.0, 3.0], [-38.0, 21.0, 46.0, 11.0, 37.0], [-41.0, -35.0, -7.0, 12.0, 
+-6.0], [-22.0, -39.0, -18.0, 33.0, 43.0]], [[18.0, -31.0, 30.0, -9.0, -29.0], [1.0, 0.0, -15.0, 30.0, 22.0], [-5.0, -24.0, 
+16.0, -17.0, 0.0], [-20.0, -7.0, -19.0, 10.0, -4.0]]], [[[28.0, -39.0, 16.0, 12.0, -28.0], [49.0, 29.0, -35.0, 29.0, -21.0], 
+[28.0, -3.0, -7.0, -3.0, 34.0], [-2.0, 4.0, -43.0, -25.0, 27.0]], [[-44.0, 52.0, -58.0, 9.0, 47.0], [16.0, -3.0, 8.0, -53.0, 
+-53.0], [25.0, 53.0, -27.0, 26.0, 6.0], [42.0, 25.0, 34.0, -31.0, -3.0]], [[23.0, 4.0, 0.0, 21.0, 10.0], [-10.0, 17.0, 24.0, 
+-3.0, 4.0], [-13.0, -7.0, -13.0, 14.0, 4.0], [-2.0, -16.0, -9.0, 7.0, 30.0]], [[31.0, -54.0, 44.0, -9.0, -48.0], [20.0, 9.0, 
+-34.0, 49.0, 20.0], [5.0, -31.0, 19.0, -24.0, 12.0], [-26.0, -6.0, -39.0, 3.0, 2.0]], [[7.0, 9.0, 4.0, 3.0, 8.0], [-29.0, -4.0, 
+25.0, -4.0, 21.0], [-23.0, -12.0, 2.0, 3.0, -14.0], [-8.0, -14.0, 8.0, 20.0, 3.0]]], [[[-35.0, -8.0, 26.0, -54.0, -25.0], 
+[-38.0, -54.0, -16.0, 16.0, 49.0], [-20.0, -22.0, 48.0, -40.0, -42.0], [-24.0, 7.0, 31.0, 32.0, -75.0]], [[-12.0, -14.0, 26.0, 
+-33.0, -23.0], [-26.0, -31.0, -10.0, 19.0, 39.0], [-17.0, -23.0, 33.0, -28.0, -26.0], [-22.0, -1.0, 12.0, 25.0, -43.0]], 
+[[-9.0, 14.0, 8.0, -15.0, 6.0], [-48.0, -25.0, 26.0, -5.0, 38.0], [-33.0, -17.0, 17.0, -8.0, -32.0], [-14.0, -12.0, 25.0, 33.0, 
+-24.0]], [[-6.0, -8.0, -10.0, 3.0, -5.0], [40.0, 11.0, -28.0, 1.0, -33.0], [31.0, 19.0, -9.0, 2.0, 22.0], [14.0, 17.0, -12.0, 
+-29.0, 5.0]], [[-20.0, 24.0, -18.0, -3.0, 19.0], [-12.0, -11.0, 12.0, -21.0, -5.0], [-3.0, 13.0, -3.0, 6.0, -10.0], [10.0, 5.0, 
+22.0, 1.0, -11.0]]], [[[-87.0, 29.0, -30.0, -54.0, 7.0], [7.0, -57.0, -39.0, -27.0, -20.0], [28.0, 39.0, 25.0, -23.0, -24.0], 
+[22.0, 47.0, 56.0, -17.0, -88.0]], [[-57.0, 22.0, -26.0, -30.0, 9.0], [12.0, -32.0, -26.0, -22.0, -23.0], [24.0, 32.0, 10.0, 
+-10.0, -10.0], [20.0, 33.0, 35.0, -18.0, -51.0]], [[54.0, -12.0, -2.0, 51.0, 7.0], [28.0, 55.0, 16.0, 5.0, -25.0], [7.0, -1.0, 
+-37.0, 30.0, 38.0], [6.0, -19.0, -44.0, -17.0, 77.0]], [[-23.0, 54.0, -46.0, 18.0, 51.0], [-16.0, 0.0, 38.0, -50.0, -25.0], 
+[-4.0, 32.0, -26.0, 30.0, -6.0], [28.0, 3.0, 33.0, -6.0, 11.0]], [[-39.0, -19.0, 4.0, -39.0, -28.0], [35.0, -26.0, -59.0, 14.0, 
+-15.0], [35.0, 14.0, 24.0, -29.0, 2.0], [4.0, 34.0, 6.0, -22.0, -53.0]]]])+(1.-msk_ref)*numpy.array([[[[-94.0, 25.0, -34.0, 
+-57.0, 3.0], [25.0, -56.0, -55.0, -26.0, -34.0], [43.0, 48.0, 24.0, -25.0, -16.0], [28.0, 57.0, 53.0, -30.0, -92.0]], [[-39.0, 
+1.0, 4.0, -39.0, -12.0], [-9.0, -38.0, -23.0, 2.0, 13.0], [3.0, 2.0, 28.0, -25.0, -22.0], [-4.0, 18.0, 26.0, 6.0, -57.0]], 
+[[47.0, -6.0, -6.0, 48.0, 11.0], [24.0, 50.0, 18.0, 0.0, -25.0], [6.0, 2.0, -36.0, 30.0, 34.0], [8.0, -17.0, -37.0, -16.0, 
+71.0]], [[-26.0, -27.0, 18.0, -39.0, -35.0], [21.0, -26.0, -51.0, 24.0, 4.0], [21.0, -2.0, 30.0, -33.0, -4.0], [-8.0, 23.0, 
+1.0, -8.0, -50.0]], [[-17.0, -26.0, 10.0, -24.0, -29.0], [36.0, -10.0, -50.0, 20.0, -13.0], [30.0, 6.0, 16.0, -22.0, 10.0], 
+[0.0, 23.0, -9.0, -20.0, -29.0]]], [[[-28.0, -6.0, -16.0, -12.0, -8.0], [50.0, -2.0, -46.0, -2.0, -42.0], [44.0, 30.0, -2.0, 
+-6.0, 20.0], [20.0, 32.0, -2.0, -38.0, -18.0]], [[21.0, 55.0, -34.0, 48.0, 61.0], [-47.0, 23.0, 83.0, -47.0, 0.0], [-38.0, 7.0, 
+-39.0, 47.0, -8.0], [14.0, -31.0, 18.0, 19.0, 56.0]], [[-37.0, 36.0, -54.0, 12.0, 35.0], [42.0, 8.0, -12.0, -42.0, -67.0], 
+[42.0, 56.0, -30.0, 24.0, 22.0], [44.0, 31.0, 17.0, -46.0, 5.0]], [[27.0, -25.0, 22.0, 6.0, -19.0], [5.0, 13.0, -5.0, 23.0, 
+12.0], [-4.0, -19.0, 3.0, -5.0, 8.0], [-14.0, -11.0, -24.0, 5.0, 16.0]], [[-42.0, -32.0, 22.0, -57.0, -45.0], [24.0, -41.0, 
+-68.0, 29.0, 7.0], [27.0, -1.0, 43.0, -46.0, -10.0], [-10.0, 33.0, 8.0, -9.0, -75.0]]], [[[-6.0, -61.0, 36.0, -36.0, -62.0], 
+[55.0, -9.0, -81.0, 51.0, -5.0], [40.0, -9.0, 31.0, -41.0, 18.0], [-14.0, 26.0, -31.0, -23.0, -37.0]], [[55.0, -39.0, 38.0, 
+18.0, -27.0], [-1.0, 27.0, 5.0, 37.0, 26.0], [-16.0, -37.0, 1.0, -3.0, 12.0], [-26.0, -27.0, -42.0, 15.0, 38.0]], [[-39.0, 
+44.0, -42.0, 0.0, 37.0], [-2.0, -12.0, 12.0, -42.0, -29.0], [10.0, 36.0, -14.0, 16.0, -6.0], [28.0, 17.0, 35.0, -14.0, -13.0]], 
+[[6.0, 8.0, 10.0, -3.0, 5.0], [-40.0, -11.0, 28.0, -1.0, 33.0], [-31.0, -19.0, 9.0, -2.0, -22.0], [-14.0, -17.0, 12.0, 29.0, 
+-5.0]], [[70.0, -40.0, 40.0, 30.0, -24.0], [-4.0, 38.0, 16.0, 38.0, 28.0], [-22.0, -42.0, -6.0, 4.0, 16.0], [-28.0, -36.0, 
+-50.0, 18.0, 56.0]]], [[[-54.0, 25.0, -44.0, -12.0, 18.0], [45.0, -11.0, -35.0, -31.0, -59.0], [48.0, 53.0, -11.0, 5.0, 14.0], 
+[38.0, 42.0, 23.0, -45.0, -27.0]], [[-7.0, 26.0, -4.0, -3.0, 20.0], [-48.0, -17.0, 38.0, -17.0, 28.0], [-33.0, -9.0, 5.0, 4.0, 
+-28.0], [-6.0, -14.0, 27.0, 29.0, -10.0]], [[14.0, -30.0, 54.0, -33.0, -37.0], [-54.0, -31.0, 6.0, 39.0, 77.0], [-45.0, -55.0, 
+45.0, -36.0, -38.0], [-46.0, -23.0, 2.0, 53.0, -37.0]], [[-4.0, -9.0, 24.0, -24.0, -16.0], [-33.0, -25.0, 3.0, 15.0, 41.0], 
+[-24.0, -25.0, 27.0, -21.0, -26.0], [-22.0, -8.0, 11.0, 29.0, -31.0]], [[31.0, -54.0, 44.0, -9.0, -48.0], [20.0, 9.0, -34.0, 
+49.0, 20.0], [5.0, -31.0, 19.0, -24.0, 12.0], [-26.0, -6.0, -39.0, 3.0, 2.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, 4.0, 0.0], [-4.0, -5.0, 7.0]], [[-3.0, 3.0, -6.0], [1.0, 5.0, -4.0]], [[2.0, -5.0, 
+-6.0], [6.0, 4.0, -5.0]], [[7.0, -5.0, -5.0], [-5.0, -5.0, -6.0]], [[-2.0, -4.0, 7.0], [7.0, 3.0, -5.0]]], [[[-6.0, 2.0, 3.0], 
+[3.0, 7.0, 1.0]], [[-7.0, -2.0, 5.0], [5.0, -1.0, 7.0]], [[2.0, 6.0, 1.0], [1.0, -1.0, 6.0]], [[-4.0, -1.0, 6.0], [0.0, 1.0, 
+-3.0]], [[-4.0, -6.0, -4.0], [-1.0, 0.0, -6.0]]], [[[-2.0, 7.0, -5.0], [3.0, 4.0, -2.0]], [[2.0, -7.0, -6.0], [-1.0, -7.0, 
+0.0]], [[-3.0, -7.0, -7.0], [-2.0, -1.0, -2.0]], [[0.0, 3.0, -7.0], [3.0, 2.0, 1.0]], [[3.0, 0.0, -1.0], [-3.0, 5.0, -5.0]]], 
+[[[0.0, -5.0, 0.0], [2.0, 6.0, -3.0]], [[7.0, 1.0, -4.0], [-4.0, 7.0, -3.0]], [[-3.0, 7.0, -4.0], [7.0, -3.0, 0.0]], [[-3.0, 
+-6.0, -4.0], [2.0, 7.0, -7.0]], [[1.0, 1.0, 1.0], [-5.0, -1.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, 5.0, 0.0], [6.0, 
+0.0, 2.0]], [[2.0, 5.0, 4.0], [-1.0, 3.0, 6.0]], [[-1.0, -7.0, 3.0], [7.0, 3.0, 6.0]], [[6.0, -2.0, 0.0], [7.0, 2.0, 6.0]], 
+[[-7.0, -3.0, -2.0], [-7.0, -4.0, -5.0]]], [[[-5.0, -6.0, 1.0], [-6.0, -5.0, 6.0]], [[-6.0, 2.0, -6.0], [0.0, 1.0, -1.0]], 
+[[-3.0, -6.0, 1.0], [-1.0, 5.0, -2.0]], [[4.0, 1.0, 0.0], [-1.0, -2.0, 0.0]], [[5.0, -4.0, 1.0], [6.0, 3.0, -3.0]]], [[[7.0, 
+-5.0, 5.0], [0.0, 2.0, -7.0]], [[2.0, -5.0, -5.0], [1.0, -2.0, -1.0]], [[3.0, 0.0, 7.0], [0.0, -1.0, 0.0]], [[6.0, -2.0, -3.0], 
+[-3.0, 6.0, -2.0]], [[0.0, 1.0, -1.0], [3.0, 3.0, 2.0]]], [[[-5.0, -1.0, 3.0], [-7.0, 7.0, -1.0]], [[-2.0, 5.0, -7.0], [7.0, 
+-7.0, -1.0]], [[-2.0, 3.0, -6.0], [-2.0, -1.0, 1.0]], [[-5.0, 7.0, -5.0], [-2.0, 5.0, 4.0]], [[0.0, -6.0, -2.0], [7.0, 5.0, 
+-6.0]]]])
+      arg1=numpy.array([[[[2.0, -2.0, 3.0], [-1.0, 2.0, 7.0]], [[7.0, 6.0, 5.0], [1.0, -6.0, 0.0]], [[-1.0, 2.0, -2.0], [-1.0, 
+5.0, -5.0]], [[-4.0, 4.0, -7.0], [1.0, -1.0, -2.0]], [[0.0, -1.0, -3.0], [-3.0, 2.0, -6.0]]], [[[-4.0, -3.0, -3.0], [-3.0, 
+-1.0, 0.0]], [[-7.0, -7.0, 0.0], [5.0, 2.0, 4.0]], [[-2.0, 1.0, -2.0], [-4.0, 0.0, -6.0]], [[-3.0, -1.0, 3.0], [7.0, 7.0, 
+7.0]], [[-6.0, 0.0, -5.0], [-7.0, 0.0, -4.0]]], [[[6.0, 2.0, -4.0], [-1.0, -3.0, 4.0]], [[0.0, 0.0, 0.0], [-6.0, -2.0, -1.0]], 
+[[-1.0, 5.0, 1.0], [-4.0, -2.0, 1.0]], [[5.0, -7.0, 3.0], [1.0, -5.0, -7.0]], [[6.0, 2.0, -6.0], [1.0, 3.0, -7.0]]], [[[7.0, 
+1.0, 1.0], [7.0, 0.0, 2.0]], [[-7.0, -3.0, -5.0], [6.0, -5.0, -2.0]], [[0.0, 0.0, -1.0], [-1.0, 4.0, -3.0]], [[2.0, 7.0, 0.0], 
+[-1.0, 0.0, 0.0]], [[-7.0, 2.0, 1.0], [0.0, -7.0, -3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[21.0, 1.0, -41.0, 31.0, -44.0], [33.0, 19.0, -8.0, 3.0, 42.0], [13.0, 27.0, 60.0, -91.0, 
+-102.0], [-59.0, 24.0, -37.0, 18.0, 71.0]], [[-49.0, -62.0, 65.0, 70.0, 46.0], [13.0, -1.0, 41.0, 2.0, 57.0], [-20.0, -12.0, 
+-6.0, -50.0, 68.0], [-25.0, 31.0, 37.0, 14.0, -2.0]], [[-37.0, -64.0, 39.0, 26.0, 43.0], [3.0, 39.0, 9.0, 16.0, -4.0], [-12.0, 
+-39.0, -70.0, 48.0, 91.0], [35.0, 57.0, 31.0, -37.0, -43.0]], [[-38.0, 19.0, 3.0, -1.0, 61.0], [22.0, -73.0, 47.0, -143.0, 
+42.0], [48.0, 46.0, -13.0, 117.0, 84.0], [-8.0, -2.0, 8.0, -16.0, -11.0]], [[-11.0, -14.0, 13.0, -43.0, -2.0], [-25.0, 63.0, 
+-12.0, 66.0, -52.0], [-84.0, -43.0, -50.0, 66.0, -11.0], [28.0, 28.0, 13.0, -39.0, 7.0]]], [[[11.0, -54.0, 31.0, 5.0, -12.0], 
+[-7.0, 61.0, -10.0, 102.0, -4.0], [-64.0, -33.0, -6.0, -74.0, -33.0], [-14.0, 2.0, 19.0, -1.0, -3.0]], [[47.0, -25.0, -52.0, 
+-23.0, -72.0], [5.0, 114.0, -60.0, 115.0, -46.0], [-40.0, -35.0, -9.0, -45.0, -123.0], [3.0, 51.0, -35.0, -33.0, 36.0]], 
+[[34.0, 62.0, -28.0, -1.0, -50.0], [-31.0, -29.0, -40.0, 33.0, -48.0], [46.0, -10.0, 33.0, -65.0, -26.0], [40.0, -38.0, -24.0, 
+45.0, -12.0]], [[-7.0, -10.0, 10.0, -25.0, 3.0], [0.0, 25.0, 13.0, 17.0, 6.0], [-65.0, 1.0, 0.0, 21.0, -38.0], [-29.0, 2.0, 
+7.0, -15.0, 34.0]], [[-49.0, -85.0, 31.0, 31.0, 57.0], [49.0, 41.0, 50.0, -43.0, 75.0], [-43.0, 12.0, -32.0, 51.0, 29.0], 
+[-57.0, 72.0, 23.0, -49.0, 30.0]]], [[[-42.0, -18.0, 53.0, 74.0, 19.0], [-11.0, -20.0, 21.0, 19.0, 24.0], [-1.0, -24.0, 10.0, 
+-77.0, 61.0], [5.0, 20.0, 24.0, 42.0, 1.0]], [[-13.0, -17.0, -38.0, 12.0, 14.0], [41.0, 16.0, 5.0, -73.0, 25.0], [44.0, 20.0, 
+-25.0, 75.0, 12.0], [-6.0, 66.0, -21.0, -44.0, 15.0]], [[-27.0, -94.0, 10.0, 36.0, 44.0], [61.0, 50.0, 33.0, -40.0, 75.0], 
+[-7.0, 16.0, -31.0, 30.0, 19.0], [-53.0, 74.0, 11.0, -53.0, 13.0]], [[-19.0, -26.0, 22.0, 60.0, 7.0], [1.0, 2.0, -1.0, 18.0, 
+10.0], [29.0, -23.0, -7.0, -56.0, 50.0], [19.0, 32.0, 9.0, 18.0, -18.0]], [[-19.0, -17.0, 52.0, -3.0, 52.0], [-5.0, -46.0, 
+38.0, -33.0, 28.0], [-10.0, 13.0, -7.0, 19.0, 71.0], [-11.0, -49.0, 39.0, 9.0, -42.0]]], [[[-1.0, -64.0, 33.0, -18.0, 29.0], 
+[3.0, 45.0, 5.0, 40.0, -2.0], [-42.0, -21.0, -48.0, 28.0, 31.0], [3.0, 3.0, 31.0, -37.0, -43.0]], [[-3.0, -11.0, 57.0, -1.0, 
+55.0], [-14.0, -74.0, 29.0, -34.0, 18.0], [31.0, 13.0, -7.0, -2.0, 106.0], [12.0, -85.0, 45.0, 25.0, -91.0]], [[-45.0, 26.0, 
+3.0, 78.0, -22.0], [-15.0, 1.0, -7.0, 18.0, -11.0], [14.0, -36.0, 12.0, -54.0, 18.0], [31.0, 77.0, -15.0, 36.0, 52.0]], 
+[[-43.0, -117.0, 67.0, 25.0, 68.0], [29.0, 59.0, 42.0, 17.0, 52.0], [-65.0, -19.0, -60.0, 31.0, 66.0], [-31.0, 50.0, 51.0, 
+-50.0, -23.0]], [[41.0, 19.0, -26.0, -21.0, -21.0], [6.0, -21.0, -13.0, -8.0, 4.0], [32.0, 27.0, 32.0, -34.0, -41.0], [-16.0, 
+-50.0, -15.0, 14.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 57.0, -9.0, 10.0, -35.0], [-45.0, -18.0, -37.0, 42.0, -68.0], 
+[30.0, -38.0, 0.0, -28.0, 20.0], [72.0, -4.0, -12.0, 35.0, -17.0]], [[55.0, 45.0, -14.0, -32.0, -44.0], [-35.0, -24.0, -39.0, 
+57.0, -49.0], [22.0, -6.0, 31.0, -71.0, -36.0], [28.0, -82.0, -9.0, 40.0, -39.0]], [[62.0, -45.0, -41.0, -53.0, -53.0], [-8.0, 
+121.0, -75.0, 131.0, -82.0], [-24.0, -54.0, -59.0, 3.0, -64.0], [50.0, 28.0, -16.0, -58.0, -43.0]], [[55.0, 25.0, -37.0, -39.0, 
+-51.0], [-41.0, 35.0, -78.0, 89.0, -109.0], [43.0, -52.0, -42.0, -1.0, 3.0], [101.0, -16.0, -17.0, -9.0, -78.0]], [[-50.0, 
+-60.0, 17.0, 37.0, 52.0], [68.0, 7.0, 73.0, -94.0, 121.0], [-41.0, 55.0, 21.0, 28.0, -20.0], [-113.0, 56.0, 8.0, -28.0, 
+84.0]]], [[[43.0, -42.0, -58.0, -24.0, -25.0], [58.0, 61.0, -10.0, -11.0, 43.0], [-1.0, 40.0, 16.0, -3.0, -111.0], [-70.0, 
+25.0, -33.0, -46.0, 41.0]], [[-39.0, -66.0, 32.0, 75.0, 24.0], [35.0, 26.0, 32.0, -2.0, 70.0], [-15.0, -1.0, 7.0, -60.0, 14.0], 
+[-48.0, 63.0, 13.0, 2.0, 36.0]], [[6.0, -83.0, 25.0, -21.0, 28.0], [25.0, 60.0, 14.0, 32.0, 28.0], [-56.0, -2.0, -34.0, 18.0, 
+-8.0], [-37.0, 7.0, 26.0, -47.0, -19.0]], [[3.0, 45.0, -11.0, -11.0, -2.0], [-14.0, -44.0, -3.0, -34.0, -17.0], [33.0, 10.0, 
+9.0, 22.0, 19.0], [22.0, -27.0, -7.0, 16.0, -12.0]], [[0.0, 4.0, 9.0, -34.0, 7.0], [-32.0, 17.0, -22.0, 34.0, -65.0], [-9.0, 
+-39.0, -57.0, 68.0, 52.0], [68.0, -1.0, 14.0, -24.0, -54.0]]], [[[-6.0, 32.0, 18.0, -71.0, 36.0], [-30.0, -38.0, 13.0, -36.0, 
+-39.0], [-22.0, 3.0, -38.0, 124.0, 57.0], [35.0, -55.0, 24.0, -21.0, -47.0]], [[-13.0, -28.0, -8.0, 12.0, 19.0], [21.0, 18.0, 
+3.0, -30.0, 10.0], [23.0, -1.0, -33.0, 48.0, 34.0], [9.0, 44.0, -1.0, -32.0, -12.0]], [[25.0, 62.0, -22.0, -60.0, -23.0], 
+[-32.0, -23.0, -20.0, 5.0, -53.0], [-7.0, 2.0, 6.0, 41.0, -27.0], [28.0, -51.0, -11.0, 6.0, -7.0]], [[8.0, -24.0, 39.0, -16.0, 
+44.0], [-6.0, -39.0, 16.0, -18.0, 8.0], [21.0, 8.0, -21.0, 16.0, 79.0], [12.0, -65.0, 36.0, 1.0, -85.0]], [[12.0, -14.0, 6.0, 
+7.0, -13.0], [-12.0, 22.0, -21.0, 52.0, -24.0], [2.0, -26.0, -12.0, -36.0, 6.0], [25.0, 1.0, 4.0, 4.0, -26.0]]], [[[15.0, 
+-75.0, 44.0, -17.0, 33.0], [28.0, 17.0, 37.0, 18.0, 68.0], [-62.0, 29.0, 16.0, -44.0, -29.0], [-84.0, -52.0, 35.0, -10.0, 
+-10.0]], [[-63.0, 30.0, -11.0, 93.0, -13.0], [0.0, -4.0, 1.0, -27.0, 2.0], [36.0, -27.0, 5.0, -17.0, 33.0], [31.0, 113.0, 
+-25.0, 24.0, 69.0]], [[-21.0, -22.0, 12.0, 59.0, 13.0], [24.0, -15.0, 21.0, -29.0, 52.0], [27.0, 13.0, 22.0, -53.0, 18.0], 
+[-29.0, 26.0, 1.0, 19.0, 18.0]], [[1.0, -50.0, 36.0, 68.0, 0.0], [15.0, 2.0, 11.0, 42.0, 53.0], [7.0, -2.0, 37.0, -144.0, 
+-1.0], [-39.0, -6.0, 15.0, 41.0, -3.0]], [[-33.0, -69.0, 40.0, 4.0, 37.0], [-2.0, 63.0, 6.0, 42.0, -15.0], [-50.0, -46.0, 
+-76.0, 60.0, 64.0], [29.0, 57.0, 33.0, -49.0, -31.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 0.0, 6.0, -7.0, 2.0], [7.0, 0.0, 7.0, -4.0, -4.0], [-5.0, -2.0, 0.0, -4.0, -7.0], [6.0, 
+-5.0, -6.0, 2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-3.0, 7.0, -3.0, -7.0, 7.0], [6.0, 6.0, 2.0, 0.0, -5.0], [3.0, 1.0, 2.0, 
+0.0, 7.0], [-2.0, 1.0, 5.0, 0.0, -6.0]])
+      arg1=Data(-2.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-8.0, -0.0, -12.0, 14.0, -4.0], [-14.0, -0.0, -14.0, 8.0, 8.0], [10.0, 4.0, -0.0, 8.0, 14.0], 
+[-12.0, 10.0, 12.0, -4.0, -14.0]])+(1.-msk_ref)*numpy.array([[6.0, -14.0, 6.0, 14.0, -14.0], [-12.0, -12.0, -4.0, -0.0, 10.0], 
+[-6.0, -2.0, -4.0, -0.0, -14.0], [4.0, -2.0, -10.0, -0.0, 12.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[3.0, 4.0, 0.0], [-2.0, -4.0, 5.0], [-7.0, -4.0, 1.0], [2.0, 7.0, -3.0], [-3.0, -7.0, 6.0]], 
+[[1.0, 6.0, -6.0], [3.0, 0.0, -2.0], [-3.0, -5.0, 2.0], [3.0, 6.0, -5.0], [0.0, 7.0, 4.0]], [[5.0, -5.0, -5.0], [5.0, 1.0, 
+-2.0], [-3.0, 6.0, 0.0], [-4.0, -6.0, -6.0], [0.0, -6.0, -5.0]], [[-5.0, -5.0, -2.0], [2.0, 3.0, -4.0], [-1.0, -4.0, -6.0], 
+[-1.0, 7.0, 6.0], [-1.0, 1.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, -4.0, -1.0], [2.0, -1.0, -5.0], [-1.0, 5.0, 0.0], 
+[0.0, 5.0, 7.0], [3.0, 2.0, 1.0]], [[0.0, 4.0, -3.0], [5.0, 2.0, -1.0], [1.0, -2.0, 3.0], [-6.0, -3.0, 7.0], [-3.0, -4.0, 
+0.0]], [[-2.0, -7.0, 3.0], [1.0, -2.0, -4.0], [5.0, -3.0, 3.0], [-6.0, 1.0, -2.0], [-3.0, 0.0, 7.0]], [[6.0, 0.0, 1.0], [2.0, 
+7.0, -6.0], [-7.0, -7.0, -1.0], [-4.0, 5.0, 0.0], [-3.0, 6.0, -2.0]]])
+      arg1=Data(numpy.array([7.0, 4.0, 0.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[37.0, -30.0, -65.0, 42.0, -49.0], [31.0, 21.0, -41.0, 45.0, 28.0], [15.0, 39.0, 3.0, -52.0, 
+-24.0], [-55.0, 26.0, -23.0, 21.0, -3.0]])+(1.-msk_ref)*numpy.array([[-30.0, 10.0, 13.0, 20.0, 29.0], [16.0, 43.0, -1.0, -54.0, 
+-37.0], [-42.0, -1.0, 23.0, -38.0, -21.0], [42.0, 42.0, -77.0, -8.0, 3.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-5.0, 2.0, 0.0], [-5.0, -1.0, -4.0]], [[-4.0, -5.0, -3.0], [7.0, 5.0, 1.0]], [[-6.0, 2.0, 
+1.0], [6.0, -2.0, -6.0]], [[-1.0, 3.0, 4.0], [0.0, -5.0, -7.0]], [[-1.0, -6.0, 4.0], [-1.0, -6.0, 2.0]]], [[[3.0, 2.0, -3.0], 
+[7.0, -7.0, 6.0]], [[0.0, 5.0, -3.0], [-1.0, -7.0, -4.0]], [[6.0, 0.0, 2.0], [7.0, -2.0, 6.0]], [[5.0, 1.0, 1.0], [-2.0, 7.0, 
+7.0]], [[-2.0, -1.0, -4.0], [2.0, 2.0, -5.0]]], [[[-1.0, 6.0, 3.0], [3.0, -5.0, 1.0]], [[3.0, 5.0, 6.0], [-7.0, 5.0, 4.0]], 
+[[3.0, 6.0, -3.0], [6.0, 5.0, 2.0]], [[-5.0, 0.0, 6.0], [-3.0, 0.0, -6.0]], [[-7.0, -6.0, 6.0], [-4.0, 2.0, -6.0]]], [[[-6.0, 
+7.0, 2.0], [-6.0, -6.0, 1.0]], [[2.0, 0.0, -1.0], [2.0, 0.0, 6.0]], [[-6.0, 4.0, 0.0], [3.0, 0.0, 5.0]], [[-2.0, 5.0, 7.0], 
+[2.0, -6.0, 0.0]], [[-1.0, 2.0, 2.0], [-4.0, -7.0, 6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 2.0, -2.0], [-3.0, -7.0, 0.0]], 
+[[2.0, 2.0, -3.0], [-7.0, -7.0, 3.0]], [[3.0, 4.0, 5.0], [-2.0, 0.0, 5.0]], [[3.0, -4.0, 0.0], [-3.0, -3.0, -7.0]], [[7.0, 0.0, 
+-4.0], [3.0, 7.0, 2.0]]], [[[-4.0, 1.0, 5.0], [5.0, 0.0, -3.0]], [[7.0, -3.0, 0.0], [-4.0, -2.0, 6.0]], [[3.0, -7.0, 0.0], 
+[0.0, 3.0, 1.0]], [[-2.0, -5.0, -3.0], [-2.0, -1.0, -6.0]], [[2.0, 0.0, 1.0], [6.0, -4.0, 7.0]]], [[[3.0, -1.0, -1.0], [-6.0, 
+7.0, -3.0]], [[-7.0, 7.0, -3.0], [0.0, -7.0, 3.0]], [[-2.0, -7.0, -5.0], [2.0, 2.0, 7.0]], [[3.0, -3.0, -3.0], [0.0, -6.0, 
+2.0]], [[4.0, 1.0, 7.0], [0.0, 5.0, 4.0]]], [[[6.0, -7.0, 6.0], [-5.0, 6.0, -2.0]], [[4.0, -7.0, 5.0], [-3.0, -7.0, -2.0]], 
+[[5.0, -1.0, -4.0], [4.0, 5.0, 1.0]], [[-1.0, 0.0, 5.0], [-6.0, -7.0, 6.0]], [[1.0, -6.0, -3.0], [-3.0, 2.0, -7.0]]]])
+      arg1=Data(numpy.array([[3.0, 5.0, -7.0], [0.0, -2.0, -4.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[13.0, -30.0, 13.0, 22.0, -57.0], [30.0, 76.0, -16.0, -29.0, 33.0], [12.0, -34.0, 42.0, -33.0, 
+-73.0], [11.0, -11.0, -18.0, -18.0, -17.0]])+(1.-msk_ref)*numpy.array([[35.0, 39.0, -26.0, 23.0, 27.0], [-30.0, -14.0, -36.0, 
+16.0, -21.0], [9.0, 37.0, -38.0, 19.0, -58.0], [-63.0, -36.0, 24.0, -48.0, 18.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-2.0, 3.0, 6.0, 0.0, 6.0], [5.0, -1.0, 6.0, -3.0, 4.0], [-7.0, -7.0, 1.0, 3.0, 3.0], [6.0, 
+-2.0, 6.0, 1.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 0.0, -7.0, -7.0, -1.0], [6.0, 2.0, -1.0, -3.0, 6.0], [4.0, -1.0, 0.0, 
+3.0, 6.0], [-1.0, 1.0, 3.0, 5.0, 4.0]])
+      arg1=Data(numpy.array([5.0, 3.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-10.0, -6.0], [15.0, 9.0], [30.0, 18.0], [0.0, 0.0], [30.0, 18.0]], [[25.0, 15.0], [-5.0, 
+-3.0], [30.0, 18.0], [-15.0, -9.0], [20.0, 12.0]], [[-35.0, -21.0], [-35.0, -21.0], [5.0, 3.0], [15.0, 9.0], [15.0, 9.0]], 
+[[30.0, 18.0], [-10.0, -6.0], [30.0, 18.0], [5.0, 3.0], [-10.0, -6.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -6.0], [0.0, 0.0], 
+[-35.0, -21.0], [-35.0, -21.0], [-5.0, -3.0]], [[30.0, 18.0], [10.0, 6.0], [-5.0, -3.0], [-15.0, -9.0], [30.0, 18.0]], [[20.0, 
+12.0], [-5.0, -3.0], [0.0, 0.0], [15.0, 9.0], [30.0, 18.0]], [[-5.0, -3.0], [5.0, 3.0], [15.0, 9.0], [25.0, 15.0], [20.0, 
+12.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, 2.0, -2.0], [-3.0, -6.0, -1.0], [-6.0, 6.0, -3.0], [0.0, -1.0, 0.0], [-7.0, 1.0, 
+-1.0]], [[-3.0, 6.0, -6.0], [2.0, 5.0, -1.0], [-2.0, 5.0, -7.0], [0.0, 0.0, 3.0], [-3.0, 3.0, -6.0]], [[-1.0, 2.0, 4.0], [-6.0, 
+0.0, -4.0], [3.0, -7.0, 2.0], [-5.0, 2.0, -4.0], [0.0, 0.0, -1.0]], [[-2.0, 0.0, -1.0], [-5.0, -4.0, 7.0], [0.0, 5.0, 0.0], 
+[-4.0, -2.0, 0.0], [3.0, 6.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -1.0, -1.0], [4.0, 3.0, -1.0], [-4.0, -2.0, -1.0], 
+[-6.0, -5.0, 1.0], [7.0, -3.0, 1.0]], [[2.0, 0.0, 0.0], [0.0, 0.0, 7.0], [0.0, -6.0, 2.0], [-5.0, -3.0, 0.0], [-4.0, 6.0, 
+-2.0]], [[-3.0, 1.0, 0.0], [3.0, -1.0, -6.0], [3.0, 2.0, -6.0], [-7.0, 5.0, -1.0], [6.0, 1.0, 1.0]], [[-4.0, -4.0, 2.0], [-4.0, 
+-3.0, -7.0], [-6.0, -5.0, -6.0], [6.0, 5.0, 4.0], [-2.0, 1.0, 0.0]]])
+      arg1=Data(numpy.array([[3.0, 2.0, 4.0], [-6.0, -4.0, 3.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-25.0, 28.0], [-25.0, 39.0], [-18.0, 3.0], [-2.0, 4.0], [-23.0, 35.0]], [[-21.0, -24.0], 
+[12.0, -35.0], [-24.0, -29.0], [12.0, 9.0], [-27.0, -12.0]], [[17.0, 10.0], [-34.0, 24.0], [3.0, 16.0], [-27.0, 10.0], [-4.0, 
+-3.0]], [[-10.0, 9.0], [5.0, 67.0], [10.0, -20.0], [-16.0, 32.0], [21.0, -42.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -11.0], 
+[14.0, -39.0], [-20.0, 29.0], [-24.0, 59.0], [19.0, -27.0]], [[6.0, -12.0], [28.0, 21.0], [-4.0, 30.0], [-21.0, 42.0], [-8.0, 
+-6.0]], [[-7.0, 14.0], [-17.0, -32.0], [-11.0, -44.0], [-15.0, 19.0], [24.0, -37.0]], [[-12.0, 46.0], [-46.0, 15.0], [-52.0, 
+38.0], [44.0, -44.0], [-4.0, 8.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[4.0, 0.0, -5.0], [-3.0, 0.0, 0.0]], [[-3.0, 4.0, -7.0], [-6.0, -5.0, 4.0]], [[-5.0, -7.0, 
+-7.0], [3.0, -6.0, -3.0]], [[3.0, -1.0, 0.0], [-6.0, -5.0, -1.0]], [[1.0, 2.0, -7.0], [-1.0, -6.0, 4.0]]], [[[5.0, -3.0, -2.0], 
+[0.0, 0.0, -2.0]], [[0.0, -5.0, 1.0], [-2.0, -6.0, 1.0]], [[2.0, -4.0, -4.0], [-5.0, -4.0, 7.0]], [[1.0, 0.0, 6.0], [7.0, -1.0, 
+-5.0]], [[-7.0, 5.0, -6.0], [7.0, -6.0, 7.0]]], [[[0.0, -6.0, 4.0], [0.0, 1.0, 1.0]], [[-5.0, -5.0, -3.0], [-2.0, 0.0, 0.0]], 
+[[-3.0, -6.0, -7.0], [3.0, 3.0, -6.0]], [[0.0, -5.0, 1.0], [-4.0, -3.0, 4.0]], [[6.0, 4.0, -4.0], [-6.0, -6.0, 5.0]]], [[[-5.0, 
+2.0, -7.0], [4.0, 0.0, -5.0]], [[7.0, -1.0, 5.0], [-4.0, -2.0, 2.0]], [[5.0, 0.0, 4.0], [-4.0, 0.0, -6.0]], [[1.0, -1.0, 7.0], 
+[-7.0, -7.0, 2.0]], [[6.0, -3.0, 0.0], [-1.0, 2.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, 3.0, 0.0], [5.0, 1.0, 3.0]], 
+[[4.0, -3.0, 7.0], [5.0, 5.0, 7.0]], [[6.0, -1.0, 7.0], [-1.0, -2.0, 7.0]], [[-2.0, -7.0, 2.0], [-3.0, -5.0, -2.0]], [[6.0, 
+5.0, 2.0], [-1.0, 7.0, 1.0]]], [[[-6.0, 7.0, 6.0], [-6.0, 6.0, -5.0]], [[1.0, -5.0, 1.0], [-5.0, 0.0, -1.0]], [[3.0, 1.0, 7.0], 
+[5.0, 0.0, 1.0]], [[0.0, -4.0, -3.0], [5.0, 5.0, 7.0]], [[-5.0, -5.0, 3.0], [-1.0, -2.0, -6.0]]], [[[3.0, -4.0, -4.0], [0.0, 
+3.0, 5.0]], [[0.0, 5.0, 3.0], [-3.0, -7.0, -7.0]], [[-3.0, 5.0, -3.0], [7.0, -2.0, 4.0]], [[-2.0, 1.0, 0.0], [7.0, 1.0, 7.0]], 
+[[-7.0, 3.0, 0.0], [5.0, -1.0, -5.0]]], [[[3.0, 0.0, 2.0], [-1.0, -6.0, -5.0]], [[-7.0, 5.0, 0.0], [0.0, 0.0, -4.0]], [[-1.0, 
+-6.0, 3.0], [4.0, -3.0, -4.0]], [[4.0, -7.0, -3.0], [5.0, -2.0, 5.0]], [[-2.0, 0.0, 4.0], [5.0, -5.0, 4.0]]]])
+      arg1=Data(numpy.array([[[6.0, 0.0, 2.0], [-1.0, 0.0, 6.0]], [[1.0, -2.0, 5.0], [1.0, 5.0, 3.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[17.0, -24.0], [-2.0, -65.0], [-65.0, -62.0], [18.0, -29.0], [17.0, -57.0]], [[14.0, -5.0], 
+[10.0, -14.0], [51.0, -14.0], [-19.0, 18.0], [-19.0, -49.0]], [[14.0, 40.0], [-34.0, -12.0], [-71.0, -26.0], [30.0, 8.0], 
+[64.0, -43.0]], [[-78.0, -55.0], [68.0, 26.0], [6.0, 3.0], [39.0, 2.0], [55.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[43.0, 
+18.0], [75.0, 96.0], [93.0, 53.0], [-17.0, -12.0], [47.0, 43.0]], [[-48.0, 19.0], [7.0, 8.0], [33.0, 44.0], [31.0, 44.0], 
+[-59.0, -9.0]], [[40.0, 21.0], [-33.0, -54.0], [-7.0, -19.0], [23.0, 29.0], [-77.0, -28.0]], [[-7.0, -33.0], [-66.0, -29.0], 
+[-28.0, 3.0], [43.0, 13.0], [15.0, 10.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[4.0, 0.0, 6.0, -6.0, 7.0], [6.0, 1.0, -4.0, 0.0, -3.0], [-2.0, 0.0, 3.0, -5.0, 6.0], [4.0, 
+0.0, -4.0, -4.0, 1.0]])+(1.-msk_arg0)*numpy.array([[6.0, 0.0, -6.0, -4.0, -2.0], [3.0, 7.0, -6.0, 3.0, -4.0], [1.0, -3.0, -3.0, 
+1.0, 7.0], [7.0, 3.0, -1.0, 7.0, 5.0]])
+      arg1=Data(numpy.array([[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 
+5.0, -3.0, 4.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[4.0, -28.0, 4.0, 24.0, 16.0], [-16.0, -20.0, 0.0, -28.0, 4.0], [16.0, -8.0, -16.0, 0.0, 
+28.0], [28.0, 28.0, 20.0, -12.0, 16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[6.0, -42.0, 6.0, 36.0, 24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], [24.0, -12.0, -24.0, 0.0, 42.0], 
+[42.0, 42.0, 30.0, -18.0, 24.0]], [[-6.0, 42.0, -6.0, -36.0, -24.0], [24.0, 30.0, 0.0, 42.0, -6.0], [-24.0, 12.0, 24.0, 0.0, 
+-42.0], [-42.0, -42.0, -30.0, 18.0, -24.0]], [[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, 
+-28.0, 0.0, 49.0], [49.0, 49.0, 35.0, -21.0, 28.0]]], [[[6.0, -42.0, 6.0, 36.0, 24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], [24.0, 
+-12.0, -24.0, 0.0, 42.0], [42.0, 42.0, 30.0, -18.0, 24.0]], [[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, 
+-2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 5.0, -3.0, 4.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, -4.0], [-16.0, 
+8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-3.0, 21.0, -3.0, -18.0, -12.0], [12.0, 15.0, 0.0, 21.0, -3.0], [-12.0, 6.0, 
+12.0, 0.0, -21.0], [-21.0, -21.0, -15.0, 9.0, -12.0]]], [[[-2.0, 14.0, -2.0, -12.0, -8.0], [8.0, 10.0, 0.0, 14.0, -2.0], [-8.0, 
+4.0, 8.0, 0.0, -14.0], [-14.0, -14.0, -10.0, 6.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[3.0, -21.0, 3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, 
+-12.0, 0.0, 21.0], [21.0, 21.0, 15.0, -9.0, 12.0]], [[-5.0, 35.0, -5.0, -30.0, -20.0], [20.0, 25.0, 0.0, 35.0, -5.0], [-20.0, 
+10.0, 20.0, 0.0, -35.0], [-35.0, -35.0, -25.0, 15.0, -20.0]], [[6.0, -42.0, 6.0, 36.0, 24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], 
+[24.0, -12.0, -24.0, 0.0, 42.0], [42.0, 42.0, 30.0, -18.0, 24.0]]], [[[4.0, -28.0, 4.0, 24.0, 16.0], [-16.0, -20.0, 0.0, -28.0, 
+4.0], [16.0, -8.0, -16.0, 0.0, 28.0], [28.0, 28.0, 20.0, -12.0, 16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, -4.0], 
+[-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, 
+-4.0], [-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, 
+-7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 5.0, -3.0, 4.0]]]])+(1.-msk_ref)*numpy.array([[[[6.0, -42.0, 6.0, 36.0, 
+24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], [24.0, -12.0, -24.0, 0.0, 42.0], [42.0, 42.0, 30.0, -18.0, 24.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 42.0, -6.0, -36.0, -24.0], 
+[24.0, 30.0, 0.0, 42.0, -6.0], [-24.0, 12.0, 24.0, 0.0, -42.0], [-42.0, -42.0, -30.0, 18.0, -24.0]], [[-4.0, 28.0, -4.0, -24.0, 
+-16.0], [16.0, 20.0, 0.0, 28.0, -4.0], [-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[-2.0, 14.0, -2.0, 
+-12.0, -8.0], [8.0, 10.0, 0.0, 14.0, -2.0], [-8.0, 4.0, 8.0, 0.0, -14.0], [-14.0, -14.0, -10.0, 6.0, -8.0]]], [[[3.0, -21.0, 
+3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, -12.0, 0.0, 21.0], [21.0, 21.0, 15.0, -9.0, 12.0]], [[7.0, 
+-49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 0.0, 49.0], [49.0, 49.0, 35.0, -21.0, 28.0]], 
+[[-6.0, 42.0, -6.0, -36.0, -24.0], [24.0, 30.0, 0.0, 42.0, -6.0], [-24.0, 12.0, 24.0, 0.0, -42.0], [-42.0, -42.0, -30.0, 18.0, 
+-24.0]], [[3.0, -21.0, 3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, -12.0, 0.0, 21.0], [21.0, 21.0, 15.0, 
+-9.0, 12.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, -4.0], [-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, 
+-20.0, 12.0, -16.0]]], [[[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 5.0, 
+-3.0, 4.0]], [[-3.0, 21.0, -3.0, -18.0, -12.0], [12.0, 15.0, 0.0, 21.0, -3.0], [-12.0, 6.0, 12.0, 0.0, -21.0], [-21.0, -21.0, 
+-15.0, 9.0, -12.0]], [[-3.0, 21.0, -3.0, -18.0, -12.0], [12.0, 15.0, 0.0, 21.0, -3.0], [-12.0, 6.0, 12.0, 0.0, -21.0], [-21.0, 
+-21.0, -15.0, 9.0, -12.0]], [[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 
+5.0, -3.0, 4.0]], [[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 0.0, 49.0], [49.0, 
+49.0, 35.0, -21.0, 28.0]]], [[[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 0.0, 49.0], 
+[49.0, 49.0, 35.0, -21.0, 28.0]], [[3.0, -21.0, 3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, -12.0, 0.0, 
+21.0], [21.0, 21.0, 15.0, -9.0, 12.0]], [[-1.0, 7.0, -1.0, -6.0, -4.0], [4.0, 5.0, 0.0, 7.0, -1.0], [-4.0, 2.0, 4.0, 0.0, 
+-7.0], [-7.0, -7.0, -5.0, 3.0, -4.0]], [[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 
+0.0, 49.0], [49.0, 49.0, 35.0, -21.0, 28.0]], [[5.0, -35.0, 5.0, 30.0, 20.0], [-20.0, -25.0, 0.0, -35.0, 5.0], [20.0, -10.0, 
+-20.0, 0.0, 35.0], [35.0, 35.0, 25.0, -15.0, 20.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 1.0, 0.0], [1.0, -3.0, 0.0], [4.0, 0.0, 2.0], [0.0, 7.0, -5.0], [0.0, 2.0, -3.0]], 
+[[-5.0, -4.0, -6.0], [3.0, 4.0, 6.0], [3.0, 0.0, -1.0], [-3.0, -2.0, 5.0], [-1.0, -4.0, 0.0]], [[-2.0, -4.0, -2.0], [1.0, -4.0, 
+-1.0], [-1.0, -2.0, 6.0], [6.0, 0.0, 5.0], [-7.0, -3.0, -3.0]], [[3.0, -2.0, -1.0], [0.0, 6.0, 0.0], [-4.0, -3.0, 0.0], [3.0, 
+-7.0, 7.0], [2.0, -5.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, -1.0, -3.0], [4.0, -5.0, 5.0], [7.0, -2.0, 0.0], [4.0, -3.0, 
+7.0], [3.0, 4.0, -5.0]], [[4.0, 3.0, 0.0], [-5.0, -1.0, -2.0], [-7.0, -2.0, 6.0], [-4.0, 6.0, 5.0], [-5.0, 0.0, 5.0]], [[-2.0, 
+-6.0, 4.0], [7.0, -2.0, -1.0], [6.0, 3.0, -2.0], [0.0, -5.0, 0.0], [3.0, 2.0, -4.0]], [[1.0, -3.0, 6.0], [6.0, -3.0, 0.0], 
+[0.0, -4.0, -5.0], [6.0, -3.0, -4.0], [6.0, 0.0, 5.0]]])
+      arg1=Data(numpy.array([[[-2.0, 3.0, 5.0], [-6.0, 5.0, 3.0], [6.0, -5.0, -7.0], [2.0, -4.0, 5.0], [4.0, 1.0, -2.0]], 
+[[-5.0, -7.0, 4.0], [0.0, 2.0, -3.0], [2.0, 0.0, 6.0], [4.0, 1.0, -3.0], [-6.0, 7.0, 5.0]], [[-7.0, 0.0, -2.0], [6.0, 5.0, 
+7.0], [2.0, -7.0, -5.0], [5.0, -5.0, -4.0], [-7.0, -6.0, 0.0]], [[-3.0, 6.0, 6.0], [5.0, 2.0, 0.0], [1.0, -1.0, 3.0], [7.0, 
+0.0, 2.0], [-7.0, -7.0, -3.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[3.0, 5.0, -5.0, -4.0, 1.0], [-7.0, 2.0, 0.0, 1.0, 7.0], [0.0, 5.0, -7.0, -5.0, -6.0], [6.0, 
+2.0, -1.0, 0.0, -7.0]], [[-11.0, -21.0, 21.0, 14.0, 1.0], [16.0, -6.0, 2.0, 1.0, -27.0], [-7.0, -9.0, 23.0, 20.0, 11.0], 
+[-21.0, -1.0, 4.0, 7.0, 14.0]], [[2.0, -18.0, 10.0, 18.0, 12.0], [-12.0, -6.0, 20.0, 10.0, -14.0], [-32.0, 38.0, -2.0, 12.0, 
+-28.0], [0.0, 20.0, 10.0, 32.0, -34.0]], [[-4.0, 20.0, 0.0, -53.0, 17.0], [-69.0, 29.0, -30.0, 22.0, 24.0], [10.0, 0.0, -24.0, 
+-15.0, -42.0], [12.0, 14.0, -22.0, -10.0, -34.0]], [[-9.0, 1.0, 11.0, -23.0, 8.0], [-26.0, 13.0, -18.0, 11.0, -1.0], [6.0, 
+-11.0, 1.0, 2.0, -12.0], [-6.0, 4.0, -11.0, -6.0, -5.0]]], [[[-32.0, -8.0, 32.0, -24.0, -12.0], [29.0, 10.0, -46.0, -6.0, 
+-28.0], [47.0, -92.0, 48.0, 19.0, 59.0], [-45.0, -33.0, -19.0, -47.0, 81.0]], [[36.0, 20.0, -44.0, 20.0, 4.0], [-19.0, -10.0, 
+42.0, -2.0, 40.0], [-33.0, 80.0, -52.0, -29.0, -45.0], [51.0, 23.0, 17.0, 33.0, -67.0]], [[-11.0, -21.0, 25.0, 1.0, 14.0], 
+[-19.0, 3.0, 0.0, 15.0, -23.0], [-19.0, 11.0, 11.0, 19.0, -21.0], [-15.0, 15.0, 0.0, 19.0, -18.0]], [[25.0, 23.0, -43.0, 27.0, 
+-24.0], [49.0, -19.0, 24.0, -29.0, 29.0], [11.0, 7.0, -17.0, -25.0, 33.0], [27.0, -19.0, 14.0, -11.0, 20.0]], [[-10.0, -14.0, 
+14.0, 14.0, -8.0], [33.0, -8.0, -2.0, -8.0, -22.0], [7.0, -26.0, 26.0, 15.0, 31.0], [-21.0, -13.0, 3.0, -7.0, 35.0]]], 
+[[[-18.0, -14.0, 22.0, 2.0, -8.0], [30.0, -2.0, -16.0, -6.0, -26.0], [18.0, -46.0, 34.0, 18.0, 38.0], [-30.0, -18.0, -4.0, 
+-18.0, 48.0]], [[-19.0, -29.0, 33.0, 13.0, 2.0], [19.0, -5.0, -4.0, 3.0, -39.0], [-5.0, -21.0, 35.0, 29.0, 17.0], [-33.0, -3.0, 
+2.0, 5.0, 24.0]], [[26.0, 14.0, -38.0, 36.0, -18.0], [43.0, -22.0, 34.0, -24.0, 22.0], [-5.0, 26.0, -18.0, -19.0, 19.0], [27.0, 
+-9.0, 19.0, 5.0, 3.0]], [[13.0, -21.0, 1.0, 37.0, 14.0], [-10.0, -15.0, 42.0, 9.0, -11.0], [-52.0, 71.0, -13.0, 10.0, -42.0], 
+[12.0, 30.0, 21.0, 52.0, -57.0]], [[-10.0, 18.0, -6.0, -17.0, -25.0], [44.0, 3.0, -32.0, -22.0, 6.0], [55.0, -78.0, 22.0, -8.0, 
+67.0], [-15.0, -41.0, -13.0, -55.0, 79.0]]], [[[-17.0, -31.0, 35.0, 9.0, 12.0], [-5.0, -1.0, 0.0, 13.0, -37.0], [-19.0, 1.0, 
+25.0, 29.0, -9.0], [-27.0, 11.0, 2.0, 19.0, -4.0]], [[18.0, 30.0, -30.0, -24.0, 6.0], [-42.0, 12.0, 0.0, 6.0, 42.0], [0.0, 
+30.0, -42.0, -30.0, -36.0], [36.0, 12.0, -6.0, 0.0, -42.0]], [[-1.0, 9.0, -9.0, 4.0, -19.0], [41.0, -6.0, -8.0, -19.0, 3.0], 
+[28.0, -39.0, 13.0, -5.0, 46.0], [-6.0, -26.0, -1.0, -28.0, 49.0]], [[8.0, -32.0, 4.0, 69.0, -9.0], [62.0, -35.0, 48.0, -16.0, 
+-32.0], [-35.0, 32.0, 20.0, 22.0, 21.0], [-9.0, 1.0, 31.0, 35.0, 7.0]], [[-39.0, -49.0, 65.0, 4.0, 11.0], [9.0, 2.0, -20.0, 
+15.0, -67.0], [-6.0, -41.0, 59.0, 51.0, 16.0], [-60.0, 0.0, -5.0, 6.0, 33.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -20.0, 
+32.0, -9.0, 9.0], [-10.0, 7.0, -16.0, 12.0, -28.0], [-1.0, -20.0, 24.0, 22.0, -1.0], [-27.0, 3.0, -7.0, 1.0, 9.0]], [[2.0, 
+-34.0, 14.0, 53.0, 1.0], [35.0, -25.0, 38.0, -4.0, -34.0], [-38.0, 34.0, 18.0, 25.0, 2.0], [-12.0, 10.0, 24.0, 38.0, -8.0]], 
+[[-20.0, -52.0, 52.0, 22.0, 26.0], [-21.0, -4.0, 14.0, 26.0, -56.0], [-49.0, 32.0, 28.0, 45.0, -37.0], [-33.0, 31.0, 9.0, 49.0, 
+-35.0]], [[18.0, -18.0, -10.0, 55.0, -1.0], [29.0, -27.0, 50.0, -8.0, -10.0], [-42.0, 58.0, -6.0, 7.0, -10.0], [12.0, 14.0, 
+28.0, 42.0, -28.0]], [[-19.0, -13.0, 33.0, -35.0, 26.0], [-63.0, 23.0, -24.0, 31.0, -15.0], [-11.0, 3.0, 3.0, 15.0, -45.0], 
+[-15.0, 23.0, -16.0, 11.0, -34.0]]], [[[1.0, -9.0, 9.0, -4.0, 19.0], [-41.0, 6.0, 8.0, 19.0, -3.0], [-28.0, 39.0, -13.0, 5.0, 
+-46.0], [6.0, 26.0, 1.0, 28.0, -49.0]], [[-3.0, 19.0, -11.0, -16.0, -17.0], [24.0, 4.0, -22.0, -15.0, 13.0], [39.0, -49.0, 7.0, 
+-12.0, 41.0], [-3.0, -27.0, -10.0, -39.0, 48.0]], [[38.0, 50.0, -74.0, 24.0, -42.0], [73.0, -22.0, 22.0, -48.0, 58.0], [37.0, 
+-10.0, -30.0, -49.0, 61.0], [45.0, -39.0, 13.0, -37.0, 45.0]], [[51.0, 69.0, -89.0, -7.0, -20.0], [-2.0, -3.0, 22.0, -25.0, 
+91.0], [18.0, 41.0, -75.0, -70.0, -8.0], [78.0, -8.0, 5.0, -18.0, -29.0]], [[35.0, 45.0, -65.0, 15.0, -30.0], [45.0, -15.0, 
+20.0, -35.0, 55.0], [25.0, 5.0, -35.0, -45.0, 35.0], [45.0, -25.0, 10.0, -25.0, 20.0]]], [[[6.0, -6.0, -10.0, 40.0, -22.0], 
+[68.0, -24.0, 20.0, -26.0, -10.0], [6.0, -14.0, 18.0, 4.0, 50.0], [-6.0, -22.0, 16.0, -6.0, 44.0]], [[-25.0, -55.0, 59.0, 17.0, 
+28.0], [-25.0, -1.0, 8.0, 29.0, -61.0], [-47.0, 25.0, 33.0, 49.0, -37.0], [-39.0, 31.0, 6.0, 47.0, -32.0]], [[-13.0, -27.0, 
+35.0, -10.0, 31.0], [-59.0, 12.0, 0.0, 33.0, -25.0], [-38.0, 37.0, 1.0, 23.0, -60.0], [-12.0, 36.0, -3.0, 38.0, -57.0]], 
+[[-15.0, -25.0, 25.0, 20.0, -5.0], [35.0, -10.0, 0.0, -5.0, -35.0], [0.0, -25.0, 35.0, 25.0, 30.0], [-30.0, -10.0, 5.0, 0.0, 
+35.0]], [[-20.0, -20.0, 36.0, -22.0, 22.0], [-45.0, 16.0, -18.0, 26.0, -24.0], [-13.0, 0.0, 12.0, 21.0, -33.0], [-21.0, 19.0, 
+-11.0, 13.0, -23.0]]], [[[19.0, -3.0, -21.0, 44.0, -11.0], [40.0, -24.0, 38.0, -17.0, 3.0], [-19.0, 33.0, -7.0, -4.0, 11.0], 
+[15.0, -1.0, 22.0, 19.0, -4.0]], [[-21.0, -51.0, 51.0, 24.0, 21.0], [-9.0, -6.0, 12.0, 21.0, -57.0], [-42.0, 21.0, 33.0, 45.0, 
+-24.0], [-36.0, 24.0, 9.0, 42.0, -21.0]], [[-37.0, -35.0, 55.0, -9.0, 6.0], [8.0, 7.0, -30.0, 11.0, -53.0], [10.0, -55.0, 53.0, 
+40.0, 24.0], [-54.0, -8.0, -11.0, -10.0, 43.0]], [[-41.0, -63.0, 79.0, 4.0, 29.0], [-25.0, 6.0, -12.0, 33.0, -77.0], [-34.0, 
+-7.0, 53.0, 61.0, -24.0], [-60.0, 24.0, -3.0, 34.0, -9.0]], [[13.0, -21.0, 1.0, 37.0, 14.0], [-10.0, -15.0, 42.0, 9.0, -11.0], 
+[-52.0, 71.0, -13.0, 10.0, -42.0], [12.0, 30.0, 21.0, 52.0, -57.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[1.0, 0.0, 0.0], [-5.0, -7.0, 0.0]], [[-5.0, -3.0, 2.0], [2.0, -5.0, -6.0]], [[-6.0, -2.0, 
+2.0], [5.0, 1.0, -2.0]], [[-3.0, 3.0, 6.0], [-5.0, 6.0, 6.0]], [[-7.0, -4.0, 5.0], [3.0, 0.0, -4.0]]], [[[4.0, 5.0, -5.0], 
+[7.0, 4.0, 1.0]], [[-4.0, -6.0, -1.0], [-6.0, 1.0, 2.0]], [[7.0, 7.0, 7.0], [-6.0, -1.0, 7.0]], [[1.0, 6.0, -7.0], [3.0, -1.0, 
+7.0]], [[7.0, 3.0, 3.0], [-6.0, -1.0, 0.0]]], [[[-3.0, 5.0, 1.0], [-6.0, -5.0, 3.0]], [[-2.0, -4.0, 7.0], [0.0, -7.0, 1.0]], 
+[[0.0, 2.0, -6.0], [3.0, -1.0, -2.0]], [[-2.0, 4.0, 7.0], [-3.0, 0.0, 0.0]], [[-1.0, 0.0, -1.0], [0.0, 0.0, -7.0]]], [[[4.0, 
+7.0, -7.0], [3.0, 2.0, 5.0]], [[-7.0, 5.0, 6.0], [6.0, -2.0, -4.0]], [[1.0, 5.0, 5.0], [6.0, 0.0, 0.0]], [[2.0, -4.0, -6.0], 
+[-7.0, -2.0, 4.0]], [[0.0, 0.0, 3.0], [-3.0, 4.0, -6.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 5.0, -6.0], [6.0, -6.0, 3.0]], 
+[[6.0, 0.0, 6.0], [1.0, -3.0, -1.0]], [[1.0, 0.0, -4.0], [-5.0, -3.0, -6.0]], [[7.0, 5.0, 4.0], [-5.0, -1.0, 5.0]], [[-3.0, 
+4.0, -5.0], [-3.0, -2.0, -3.0]]], [[[0.0, 3.0, -7.0], [-7.0, -2.0, 2.0]], [[-1.0, -6.0, -4.0], [7.0, -5.0, 6.0]], [[5.0, 0.0, 
+1.0], [2.0, 4.0, 1.0]], [[1.0, 0.0, 6.0], [-6.0, 0.0, 1.0]], [[6.0, 6.0, -3.0], [0.0, 0.0, 2.0]]], [[[5.0, -6.0, -4.0], [-4.0, 
+4.0, -5.0]], [[0.0, 6.0, 4.0], [-5.0, 3.0, 3.0]], [[2.0, 1.0, -1.0], [1.0, 4.0, -5.0]], [[6.0, 2.0, -5.0], [1.0, -6.0, -1.0]], 
+[[6.0, 5.0, -6.0], [6.0, -1.0, -4.0]]], [[[5.0, -7.0, 1.0], [6.0, -7.0, -4.0]], [[2.0, 2.0, -4.0], [0.0, 6.0, 0.0]], [[-4.0, 
+-5.0, -1.0], [4.0, 2.0, -2.0]], [[5.0, -4.0, 3.0], [7.0, -1.0, -4.0]], [[7.0, 4.0, 0.0], [2.0, 5.0, -2.0]]]])
+      arg1=Data(numpy.array([[[[-4.0, -7.0, 7.0], [-2.0, 0.0, 4.0]], [[-3.0, -1.0, -5.0], [-5.0, -5.0, 6.0]], [[4.0, -3.0, 
+3.0], [4.0, 1.0, 6.0]], [[1.0, 4.0, -1.0], [5.0, 5.0, 1.0]], [[-1.0, 1.0, 5.0], [5.0, -1.0, 5.0]]], [[[4.0, -2.0, -6.0], [0.0, 
+3.0, -2.0]], [[4.0, 2.0, 1.0], [-3.0, 0.0, 6.0]], [[4.0, -4.0, -7.0], [6.0, -2.0, -4.0]], [[-3.0, -3.0, -2.0], [-2.0, 1.0, 
+-4.0]], [[-3.0, -4.0, -5.0], [-4.0, 6.0, -2.0]]], [[[4.0, -4.0, 5.0], [-7.0, 4.0, -2.0]], [[-5.0, 0.0, -6.0], [3.0, -6.0, 
+2.0]], [[7.0, -5.0, 1.0], [0.0, -6.0, 1.0]], [[-5.0, 0.0, -3.0], [3.0, -6.0, 1.0]], [[5.0, 7.0, 1.0], [-2.0, -2.0, -6.0]]], 
+[[[5.0, 5.0, 7.0], [-4.0, -5.0, -3.0]], [[-2.0, 0.0, 0.0], [0.0, -7.0, 4.0]], [[-2.0, -2.0, 0.0], [-4.0, 4.0, 0.0]], [[2.0, 
+-2.0, -1.0], [-3.0, -3.0, 6.0]], [[4.0, -3.0, -6.0], [6.0, 3.0, 6.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[6.0, 57.0, -23.0, -59.0, -19.0], [-17.0, 19.0, -12.0, 0.0, -25.0], [11.0, 22.0, 49.0, 22.0, 
+29.0], [60.0, 47.0, -10.0, 38.0, -47.0]], [[27.0, -13.0, -38.0, -40.0, -3.0], [-29.0, -66.0, 24.0, 35.0, -9.0], [-20.0, 37.0, 
+6.0, 49.0, -2.0], [9.0, 21.0, -12.0, -33.0, -62.0]], [[34.0, -32.0, -3.0, 12.0, 28.0], [-25.0, -53.0, 6.0, 19.0, 6.0], [-33.0, 
+23.0, -38.0, 31.0, -42.0], [-45.0, -3.0, 0.0, -40.0, -9.0]], [[67.0, 7.0, 19.0, 14.0, 35.0], [-48.0, 51.0, -132.0, -20.0, 
+11.0], [53.0, -60.0, -60.0, -48.0, -26.0], [14.0, -12.0, 44.0, 15.0, -33.0]], [[69.0, -39.0, -13.0, -17.0, 23.0], [-42.0, 
+-64.0, -13.0, 33.0, 8.0], [0.0, 6.0, -28.0, 25.0, -40.0], [-20.0, -2.0, 10.0, -44.0, -52.0]]], [[[-96.0, -41.0, 24.0, 85.0, 
+12.0], [46.0, 6.0, 61.0, -31.0, -13.0], [-64.0, 9.0, -25.0, -7.0, 22.0], [-41.0, -32.0, -30.0, -24.0, 91.0]], [[71.0, 60.0, 
+-12.0, -50.0, -28.0], [1.0, 1.0, -31.0, 37.0, 67.0], [45.0, 6.0, -3.0, 1.0, -65.0], [-44.0, 9.0, 48.0, 32.0, -13.0]], [[12.0, 
+14.0, 45.0, 0.0, 41.0], [-45.0, 109.0, -111.0, -73.0, -80.0], [59.0, -75.0, 34.0, -61.0, 63.0], [127.0, 21.0, -8.0, 56.0, 
+-32.0]], [[-73.0, 58.0, 18.0, 49.0, 21.0], [17.0, 42.0, 21.0, -42.0, -24.0], [-94.0, 66.0, -17.0, 38.0, -6.0], [-42.0, 33.0, 
+-30.0, 33.0, 85.0]], [[-16.0, -4.0, 3.0, -19.0, -18.0], [1.0, 55.0, -39.0, -25.0, -30.0], [69.0, -65.0, 43.0, -56.0, 73.0], 
+[100.0, -7.0, 0.0, 26.0, -38.0]]], [[[8.0, 72.0, -35.0, -36.0, 3.0], [-49.0, 35.0, -77.0, -13.0, -28.0], [-11.0, 27.0, -12.0, 
+27.0, 25.0], [57.0, 53.0, 0.0, 34.0, -66.0]], [[89.0, 16.0, 24.0, -59.0, 45.0], [-65.0, -3.0, -31.0, -7.0, -57.0], [13.0, 12.0, 
+56.0, 32.0, -23.0], [51.0, 57.0, -16.0, 24.0, -53.0]], [[-70.0, 6.0, -25.0, 22.0, -22.0], [33.0, -23.0, 62.0, 7.0, 8.0], 
+[-59.0, 47.0, -12.0, 31.0, 16.0], [-33.0, -1.0, -20.0, -16.0, 33.0]], [[35.0, -18.0, -11.0, -8.0, 26.0], [-58.0, 16.0, -91.0, 
+-14.0, -33.0], [32.0, -41.0, -27.0, -20.0, 31.0], [71.0, 4.0, 8.0, -10.0, -80.0]], [[-31.0, -34.0, -49.0, -7.0, -39.0], [16.0, 
+-47.0, 31.0, 33.0, 22.0], [5.0, -3.0, -15.0, 1.0, 36.0], [9.0, -26.0, 2.0, -43.0, -40.0]]], [[[-100.0, 21.0, 18.0, 69.0, 6.0], 
+[40.0, 44.0, 31.0, -43.0, -15.0], [-70.0, 29.0, -21.0, 3.0, 22.0], [-31.0, -2.0, -26.0, 16.0, 91.0]], [[7.0, -58.0, -27.0, 
+23.0, 54.0], [-72.0, -54.0, -34.0, -4.0, -57.0], [-60.0, 21.0, -60.0, 43.0, 22.0], [30.0, 12.0, -28.0, -66.0, -73.0]], [[-16.0, 
+-63.0, 28.0, 46.0, 59.0], [-36.0, 1.0, -15.0, -40.0, -72.0], [-33.0, -17.0, -13.0, -2.0, 33.0], [41.0, -2.0, -36.0, -31.0, 
+-5.0]], [[8.0, 97.0, -4.0, -49.0, -49.0], [38.0, 39.0, 12.0, 14.0, 48.0], [27.0, 25.0, 44.0, 3.0, -30.0], [-26.0, 26.0, 24.0, 
+69.0, 32.0]], [[3.0, -56.0, -35.0, -4.0, -34.0], [6.0, -24.0, -23.0, 28.0, 33.0], [64.0, -63.0, -27.0, -48.0, 37.0], [31.0, 
+-52.0, 28.0, -42.0, -60.0]]]])+(1.-msk_ref)*numpy.array([[[[-81.0, 40.0, 7.0, 30.0, 25.0], [6.0, 8.0, 62.0, -36.0, -59.0], 
+[-118.0, 91.0, 15.0, 70.0, 16.0], [-15.0, 52.0, -60.0, 16.0, 61.0]], [[12.0, -44.0, 37.0, -11.0, 27.0], [-19.0, 21.0, -2.0, 
+-31.0, -68.0], [37.0, -47.0, 65.0, -28.0, 46.0], [86.0, 5.0, -28.0, 6.0, -21.0]], [[-46.0, 21.0, -67.0, -41.0, -73.0], [31.0, 
+-21.0, 32.0, 36.0, 31.0], [19.0, 10.0, 15.0, 4.0, 53.0], [30.0, -5.0, 6.0, -6.0, -47.0]], [[-5.0, 14.0, 34.0, -2.0, 19.0], 
+[-19.0, 87.0, -68.0, -55.0, -57.0], [49.0, -58.0, 39.0, -51.0, 56.0], [98.0, 13.0, -8.0, 48.0, -14.0]], [[-57.0, 37.0, -71.0, 
+-10.0, -46.0], [10.0, -18.0, 5.0, 23.0, 24.0], [-34.0, 42.0, -37.0, 30.0, 36.0], [1.0, 8.0, 2.0, -12.0, -36.0]]], [[[-48.0, 
+89.0, -48.0, -24.0, -55.0], [26.0, 32.0, -9.0, 9.0, 35.0], [-10.0, 37.0, -8.0, 14.0, 20.0], [-2.0, 22.0, 14.0, 40.0, -3.0]], 
+[[28.0, 55.0, 61.0, -5.0, 45.0], [5.0, -5.0, 76.0, -14.0, -23.0], [-81.0, 92.0, 55.0, 74.0, -91.0], [-84.0, 61.0, -34.0, 44.0, 
+101.0]], [[-13.0, -44.0, 41.0, 35.0, 11.0], [24.0, 21.0, 13.0, -21.0, -6.0], [25.0, -47.0, 13.0, -45.0, 8.0], [1.0, -34.0, 
+-2.0, -3.0, 44.0]], [[54.0, 3.0, 4.0, -34.0, 4.0], [-34.0, 34.0, -78.0, -7.0, -11.0], [74.0, -57.0, 14.0, -40.0, 17.0], [68.0, 
+2.0, 22.0, 20.0, -62.0]], [[-79.0, 3.0, 9.0, 35.0, -5.0], [26.0, 45.0, 13.0, -38.0, -31.0], [-19.0, -8.0, 11.0, -19.0, 57.0], 
+[33.0, -4.0, -24.0, 15.0, 36.0]]], [[[-18.0, -19.0, -16.0, -20.0, -80.0], [78.0, -14.0, 60.0, 43.0, 79.0], [78.0, -47.0, 32.0, 
+-54.0, 9.0], [-22.0, -58.0, 34.0, -4.0, 20.0]], [[8.0, 2.0, -5.0, 13.0, 13.0], [-33.0, 49.0, -100.0, -25.0, -12.0], [37.0, 
+-51.0, -41.0, -42.0, 32.0], [54.0, -9.0, 20.0, 8.0, -45.0]], [[-44.0, -57.0, -20.0, 27.0, -30.0], [34.0, -24.0, 29.0, 15.0, 
+25.0], [18.0, -35.0, -21.0, -33.0, 36.0], [-1.0, -52.0, 6.0, -42.0, -1.0]], [[-79.0, 24.0, -5.0, -7.0, -23.0], [34.0, 14.0, 
+73.0, -18.0, -39.0], [-38.0, 37.0, 62.0, 23.0, 55.0], [34.0, 26.0, -44.0, 22.0, 30.0]], [[-129.0, -42.0, -10.0, 53.0, -20.0], 
+[55.0, -14.0, 100.0, -18.0, -30.0], [-64.0, 22.0, 13.0, 8.0, 73.0], [6.0, -21.0, -50.0, -31.0, 54.0]]], [[[8.0, -32.0, 37.0, 
+-33.0, 10.0], [15.0, -35.0, 107.0, 1.0, -50.0], [-9.0, 21.0, 109.0, 28.0, 3.0], [20.0, 23.0, -48.0, 2.0, 26.0]], [[-50.0, 
+-18.0, -4.0, 44.0, -26.0], [46.0, 8.0, 16.0, 2.0, 42.0], [4.0, -22.0, -36.0, -34.0, 8.0], [-38.0, -46.0, 16.0, -14.0, 44.0]], 
+[[28.0, -20.0, 2.0, 5.0, 2.0], [10.0, -51.0, 39.0, 31.0, 37.0], [-17.0, 22.0, -18.0, 21.0, -56.0], [-72.0, -14.0, 10.0, -27.0, 
+23.0]], [[-1.0, -80.0, 44.0, 12.0, 22.0], [15.0, -30.0, 75.0, -8.0, -40.0], [6.0, -24.0, 60.0, -11.0, 12.0], [15.0, -19.0, 
+-34.0, -27.0, 29.0]], [[-68.0, -72.0, 17.0, 56.0, -8.0], [39.0, 18.0, 22.0, -24.0, -11.0], [22.0, -63.0, -3.0, -61.0, 61.0], 
+[28.0, -57.0, -10.0, -27.0, 31.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-3.0, -2.0, 1.0, 5.0, 2.0], [-7.0, -1.0, -5.0, -7.0, 0.0], [3.0, -7.0, 1.0, 5.0, 6.0], [5.0, 
+-4.0, -3.0, -7.0, -5.0]])+(1.-msk_arg0)*numpy.array([[5.0, -7.0, 5.0, -1.0, 2.0], [0.0, -3.0, 0.0, -2.0, 3.0], [-2.0, 3.0, 5.0, 
+0.0, -2.0], [-3.0, -3.0, 0.0, -5.0, 1.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-5.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[9.0, 6.0, -3.0, -15.0, -6.0], [21.0, 3.0, 15.0, 21.0, -0.0], [-9.0, 21.0, -3.0, -15.0, -18.0], 
+[-15.0, 12.0, 9.0, 21.0, 15.0]])+(1.-msk_ref)*numpy.array([[-25.0, 35.0, -25.0, 5.0, -10.0], [-0.0, 15.0, -0.0, 10.0, -15.0], 
+[10.0, -15.0, -25.0, -0.0, 10.0], [15.0, 15.0, -0.0, 25.0, -5.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[4.0, -6.0, 2.0], [2.0, -7.0, 2.0], [0.0, 7.0, -1.0], [5.0, 6.0, -6.0], [-3.0, -5.0, 2.0]], 
+[[3.0, -7.0, -4.0], [3.0, 3.0, -3.0], [0.0, 7.0, -7.0], [-5.0, -7.0, -7.0], [6.0, -1.0, 3.0]], [[-1.0, -2.0, -5.0], [5.0, 6.0, 
+-6.0], [-3.0, -1.0, 4.0], [7.0, 0.0, -4.0], [-1.0, 0.0, -3.0]], [[6.0, -2.0, 2.0], [-1.0, 1.0, 0.0], [-2.0, -5.0, 0.0], [1.0, 
+0.0, -4.0], [-2.0, 0.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, -6.0, -3.0], [6.0, -1.0, 0.0], [6.0, 7.0, 0.0], [-7.0, 1.0, 
+-6.0], [-6.0, 0.0, -3.0]], [[0.0, -2.0, -7.0], [0.0, 2.0, 1.0], [-4.0, 7.0, 0.0], [6.0, 6.0, -7.0], [5.0, 0.0, -1.0]], [[-4.0, 
+7.0, -5.0], [-5.0, -3.0, -7.0], [-5.0, -4.0, -4.0], [-6.0, 7.0, 3.0], [0.0, 5.0, -5.0]], [[3.0, 4.0, 1.0], [3.0, 4.0, -3.0], 
+[6.0, 6.0, -6.0], [5.0, 1.0, -3.0], [7.0, 4.0, 3.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-4.0, 0.0, 0.0])+(1.-msk_arg1)*numpy.array([6.0, 7.0, -7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-16.0, -8.0, 0.0, -20.0, 12.0], [-12.0, -12.0, 0.0, 20.0, -24.0], [4.0, -20.0, 12.0, -28.0, 
+4.0], [-24.0, 4.0, 8.0, -4.0, 8.0]])+(1.-msk_ref)*numpy.array([[3.0, 29.0, 85.0, 7.0, -15.0], [35.0, 7.0, 25.0, 127.0, 37.0], 
+[60.0, -2.0, -30.0, -8.0, 70.0], [39.0, 67.0, 120.0, 58.0, 49.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank2_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, 0.0, 1.0], [-4.0, -2.0, -2.0]], [[-6.0, 5.0, -5.0], [-1.0, 7.0, 2.0]], [[4.0, 2.0, 
+-2.0], [-4.0, 6.0, 6.0]], [[2.0, 7.0, 5.0], [-5.0, -3.0, -4.0]], [[-7.0, -5.0, 2.0], [3.0, -1.0, 5.0]]], [[[5.0, 5.0, 0.0], 
+[-5.0, 5.0, -1.0]], [[4.0, 3.0, 0.0], [5.0, 0.0, 0.0]], [[-4.0, -2.0, -3.0], [4.0, -3.0, 5.0]], [[2.0, -3.0, 1.0], [-4.0, -2.0, 
+5.0]], [[3.0, -7.0, -3.0], [0.0, -1.0, 4.0]]], [[[-5.0, -5.0, -6.0], [0.0, -6.0, -6.0]], [[7.0, 2.0, -5.0], [-6.0, 0.0, -2.0]], 
+[[0.0, 7.0, -5.0], [-3.0, 2.0, 5.0]], [[0.0, -3.0, 1.0], [0.0, -1.0, 5.0]], [[-7.0, -6.0, 7.0], [0.0, 0.0, -4.0]]], [[[4.0, 
+5.0, 6.0], [-6.0, -4.0, -7.0]], [[-2.0, -4.0, 1.0], [-6.0, -7.0, 3.0]], [[6.0, 2.0, 7.0], [-1.0, 0.0, 1.0]], [[0.0, 0.0, -1.0], 
+[-3.0, 0.0, 7.0]], [[-2.0, 2.0, 4.0], [1.0, -5.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 3.0, -5.0], [7.0, 0.0, 4.0]], 
+[[7.0, -6.0, 0.0], [-5.0, 4.0, 3.0]], [[0.0, 0.0, 0.0], [6.0, 7.0, -6.0]], [[-4.0, 5.0, -5.0], [-7.0, 0.0, 6.0]], [[1.0, -4.0, 
+-3.0], [-2.0, 5.0, -2.0]]], [[[1.0, 5.0, -6.0], [3.0, -2.0, -3.0]], [[7.0, 3.0, 0.0], [2.0, 6.0, -6.0]], [[2.0, -4.0, -3.0], 
+[7.0, 7.0, -7.0]], [[7.0, -7.0, 0.0], [-1.0, 0.0, 7.0]], [[0.0, 4.0, 6.0], [0.0, -4.0, -2.0]]], [[[5.0, 0.0, 1.0], [-5.0, 3.0, 
+-3.0]], [[-3.0, 4.0, 0.0], [1.0, 6.0, -3.0]], [[-1.0, 5.0, 4.0], [0.0, 1.0, 7.0]], [[3.0, -6.0, 4.0], [-5.0, -5.0, -5.0]], 
+[[-3.0, -1.0, -2.0], [4.0, 0.0, 0.0]]], [[[-3.0, -3.0, -2.0], [-6.0, 1.0, -3.0]], [[-3.0, 4.0, 1.0], [-2.0, 4.0, 2.0]], [[-1.0, 
+3.0, 5.0], [2.0, 7.0, 4.0]], [[-4.0, 0.0, -1.0], [-2.0, 0.0, 3.0]], [[-6.0, -3.0, -1.0], [6.0, -6.0, -5.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[7.0, 0.0, 0.0], [5.0, 0.0, 3.0]])+(1.-msk_arg1)*numpy.array([[7.0, 3.0, -5.0], [6.0, -5.0, 
+-2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[16.0, -41.0, 26.0, -23.0, -19.0], [7.0, 53.0, 7.0, 9.0, 33.0], [-53.0, 13.0, 0.0, 15.0, -61.0], 
+[-23.0, -35.0, 40.0, 6.0, 12.0]])+(1.-msk_ref)*numpy.array([[75.0, -25.0, 13.0, -42.0, -23.0], [86.0, 52.0, 38.0, 8.0, 6.0], 
+[-9.0, -27.0, -31.0, -12.0, 10.0], [-55.0, -50.0, -54.0, -41.0, 30.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[-4.0, 6.0, 6.0, 7.0, 7.0], [3.0, -4.0, 2.0, -6.0, -4.0], [2.0, -7.0, 4.0, -5.0, 0.0], [3.0, 
+6.0, -3.0, 0.0, 4.0]])+(1.-msk_arg0)*numpy.array([[5.0, 0.0, -5.0, -1.0, -1.0], [-1.0, 0.0, 1.0, -3.0, 6.0], [1.0, -5.0, 1.0, 
+-6.0, 6.0], [0.0, -1.0, -2.0, 5.0, 4.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([7.0, 7.0])+(1.-msk_arg1)*numpy.array([4.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-28.0, -28.0], [42.0, 42.0], [42.0, 42.0], [49.0, 49.0], [49.0, 49.0]], [[21.0, 21.0], [-28.0, 
+-28.0], [14.0, 14.0], [-42.0, -42.0], [-28.0, -28.0]], [[14.0, 14.0], [-49.0, -49.0], [28.0, 28.0], [-35.0, -35.0], [0.0, 
+0.0]], [[21.0, 21.0], [42.0, 42.0], [-21.0, -21.0], [0.0, 0.0], [28.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 35.0], [0.0, 
+0.0], [-20.0, -35.0], [-4.0, -7.0], [-4.0, -7.0]], [[-4.0, -7.0], [0.0, 0.0], [4.0, 7.0], [-12.0, -21.0], [24.0, 42.0]], [[4.0, 
+7.0], [-20.0, -35.0], [4.0, 7.0], [-24.0, -42.0], [24.0, 42.0]], [[0.0, 0.0], [-4.0, -7.0], [-8.0, -14.0], [20.0, 35.0], [16.0, 
+28.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-3.0, -1.0, 6.0], [3.0, 5.0, -6.0], [7.0, 3.0, 5.0], [0.0, -2.0, -6.0], [7.0, -5.0, 7.0]], 
+[[-7.0, 7.0, 0.0], [2.0, 0.0, -4.0], [-3.0, 2.0, 0.0], [7.0, -1.0, 0.0], [-4.0, -4.0, -5.0]], [[7.0, -2.0, 1.0], [0.0, 3.0, 
+-7.0], [-5.0, 3.0, 7.0], [-3.0, -1.0, 0.0], [0.0, -5.0, -2.0]], [[-2.0, -5.0, 3.0], [-4.0, -6.0, 6.0], [-1.0, 0.0, 0.0], [-5.0, 
+-1.0, -1.0], [7.0, 3.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 2.0, -7.0], [0.0, -1.0, 3.0], [4.0, -4.0, 1.0], [-6.0, -5.0, 
+0.0], [5.0, -4.0, -5.0]], [[-5.0, -6.0, -7.0], [-7.0, -4.0, 4.0], [3.0, 0.0, -5.0], [-6.0, 1.0, -5.0], [1.0, 4.0, 6.0]], [[5.0, 
+-7.0, 2.0], [3.0, 1.0, 4.0], [-1.0, -7.0, -6.0], [4.0, -7.0, -3.0], [7.0, 0.0, -2.0]], [[-3.0, -5.0, 7.0], [5.0, -1.0, -7.0], 
+[0.0, -2.0, 2.0], [4.0, 6.0, 7.0], [3.0, -3.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[6.0, 3.0, -3.0], [6.0, 1.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -3.0, 7.0], [-1.0, 6.0, 
+7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-39.0, 11.0], [51.0, -7.0], [36.0, 70.0], [12.0, -32.0], [6.0, 72.0]], [[-21.0, -35.0], [24.0, 
+-8.0], [-12.0, -16.0], [39.0, 41.0], [-21.0, -53.0]], [[33.0, 45.0], [30.0, -32.0], [-42.0, 8.0], [-21.0, -19.0], [-9.0, 
+-15.0]], [[-36.0, -2.0], [-60.0, 0.0], [-6.0, -6.0], [-30.0, -36.0], [54.0, 40.0]]])+(1.-msk_ref)*numpy.array([[[-61.0, -39.0], 
+[24.0, 15.0], [7.0, -21.0], [33.0, -24.0], [-38.0, -64.0]], [[-16.0, -80.0], [61.0, 11.0], [-44.0, -38.0], [-20.0, -23.0], 
+[27.0, 65.0]], [[20.0, -33.0], [16.0, 31.0], [-18.0, -83.0], [-12.0, -67.0], [-35.0, -21.0]], [[73.0, 22.0], [-61.0, -60.0], 
+[20.0, 2.0], [19.0, 81.0], [-42.0, -63.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank3_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[2.0, 5.0, 7.0], [-4.0, -1.0, 4.0]], [[5.0, 2.0, -2.0], [5.0, 1.0, 1.0]], [[4.0, -5.0, 3.0], 
+[1.0, -4.0, -7.0]], [[5.0, 0.0, 4.0], [-6.0, 0.0, -2.0]], [[-3.0, 7.0, -4.0], [3.0, 0.0, 0.0]]], [[[5.0, 7.0, -7.0], [-7.0, 
+-1.0, 5.0]], [[1.0, 0.0, -3.0], [5.0, -6.0, 7.0]], [[-3.0, -7.0, 4.0], [-2.0, 0.0, 0.0]], [[3.0, -1.0, 0.0], [2.0, 3.0, -2.0]], 
+[[3.0, -7.0, -7.0], [-5.0, 4.0, 3.0]]], [[[6.0, -4.0, -4.0], [-5.0, -6.0, -4.0]], [[2.0, 2.0, 1.0], [-4.0, -1.0, 3.0]], [[2.0, 
+0.0, 4.0], [-7.0, 0.0, 0.0]], [[-6.0, 5.0, 0.0], [-1.0, 1.0, -5.0]], [[-5.0, -2.0, 0.0], [-6.0, -5.0, 4.0]]], [[[7.0, 1.0, 
+3.0], [6.0, 2.0, -1.0]], [[2.0, 0.0, 0.0], [3.0, 0.0, 1.0]], [[-1.0, 7.0, -1.0], [2.0, -3.0, -4.0]], [[7.0, 6.0, 4.0], [-6.0, 
+2.0, 7.0]], [[-4.0, 0.0, -7.0], [6.0, -7.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -2.0, -2.0], [2.0, -5.0, 7.0]], 
+[[-6.0, -6.0, 3.0], [1.0, 1.0, -7.0]], [[4.0, -3.0, 4.0], [-7.0, 3.0, 1.0]], [[2.0, 3.0, -1.0], [-6.0, 1.0, 1.0]], [[3.0, 1.0, 
+4.0], [3.0, -4.0, 3.0]]], [[[0.0, 7.0, -2.0], [-4.0, 6.0, 0.0]], [[4.0, -6.0, 0.0], [-6.0, 3.0, -4.0]], [[0.0, 5.0, -6.0], 
+[0.0, -1.0, 6.0]], [[-5.0, -5.0, -5.0], [6.0, 0.0, -7.0]], [[-7.0, -7.0, 0.0], [-6.0, 3.0, -1.0]]], [[[0.0, -4.0, -6.0], [-7.0, 
+3.0, 6.0]], [[0.0, 4.0, 0.0], [-4.0, 7.0, 5.0]], [[4.0, -2.0, 7.0], [1.0, 0.0, 6.0]], [[-2.0, 5.0, -4.0], [0.0, -2.0, -2.0]], 
+[[6.0, 2.0, -4.0], [-7.0, -5.0, -1.0]]], [[[0.0, -2.0, 1.0], [3.0, -5.0, 4.0]], [[-7.0, 0.0, 0.0], [-5.0, 6.0, -2.0]], [[0.0, 
+0.0, 3.0], [-6.0, 1.0, -5.0]], [[-5.0, -1.0, 7.0], [0.0, 5.0, -1.0]], [[1.0, -3.0, -6.0], [-7.0, -6.0, -3.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[-1.0, 3.0, -2.0], [6.0, 1.0, 5.0]], [[1.0, 6.0, -3.0], [2.0, -1.0, 
+0.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, 0.0, 0.0], [2.0, -2.0, 6.0]], [[5.0, -7.0, 0.0], [0.0, 4.0, 7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-6.0, 4.0], [41.0, 32.0], [-58.0, -29.0], [-59.0, -19.0], [50.0, 57.0]], [[12.0, 55.0], [64.0, 
+26.0], [-38.0, -61.0], [-1.0, -2.0], [-21.0, -32.0]], [[-66.0, -10.0], [-8.0, 4.0], [-52.0, -24.0], [-9.0, 21.0], [-22.0, 
+-24.0]], [[23.0, 14.0], [21.0, 8.0], [13.0, 51.0], [4.0, 17.0], [47.0, 36.0]]])+(1.-msk_ref)*numpy.array([[[62.0, 13.0], 
+[-36.0, -33.0], [-18.0, 60.0], [-10.0, 0.0], [29.0, 13.0]], [[-20.0, -25.0], [-46.0, 46.0], [38.0, 3.0], [-25.0, -39.0], 
+[-17.0, 19.0]], [[16.0, 82.0], [8.0, 35.0], [34.0, 76.0], [-6.0, -67.0], [-16.0, -11.0]], [[40.0, 22.0], [-27.0, -25.0], 
+[-44.0, -31.0], [-11.0, -5.0], [-21.0, -19.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank2_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[7.0, 0.0, 5.0, 1.0, -2.0], [-2.0, -6.0, 0.0, 0.0, 2.0], [-6.0, -5.0, 0.0, -5.0, -3.0], [-3.0, 
+-5.0, -6.0, -5.0, -7.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0, 7.0, 5.0, -4.0], [0.0, 7.0, 2.0, 6.0, -3.0], [3.0, 5.0, 2.0, 
+-6.0, -2.0], [-3.0, 0.0, 4.0, 7.0, 7.0]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[-2.0, 2.0, -1.0, -7.0, 2.0], [-6.0, 7.0, -5.0, 6.0, 0.0], [2.0, -6.0, 3.0, 4.0, -5.0], [-5.0, 
+-4.0, 4.0, 3.0, 5.0]])+(1.-msk_arg1)*numpy.array([[5.0, -3.0, 4.0, -5.0, -3.0], [-3.0, -1.0, -2.0, -2.0, 6.0], [-6.0, 1.0, 3.0, 
+0.0, -1.0], [7.0, 1.0, -4.0, -7.0, 6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-14.0, 14.0, -7.0, -49.0, 14.0], [-42.0, 49.0, -35.0, 42.0, 0.0], [14.0, -42.0, 21.0, 28.0, 
+-35.0], [-35.0, -28.0, 28.0, 21.0, 35.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-10.0, 10.0, -5.0, -35.0, 10.0], [-30.0, 35.0, -25.0, 30.0, 0.0], [10.0, -30.0, 15.0, 20.0, 
+-25.0], [-25.0, -20.0, 20.0, 15.0, 25.0]], [[-2.0, 2.0, -1.0, -7.0, 2.0], [-6.0, 7.0, -5.0, 6.0, 0.0], [2.0, -6.0, 3.0, 4.0, 
+-5.0], [-5.0, -4.0, 4.0, 3.0, 5.0]], [[4.0, -4.0, 2.0, 14.0, -4.0], [12.0, -14.0, 10.0, -12.0, 0.0], [-4.0, 12.0, -6.0, -8.0, 
+10.0], [10.0, 8.0, -8.0, -6.0, -10.0]]], [[[4.0, -4.0, 2.0, 14.0, -4.0], [12.0, -14.0, 10.0, -12.0, 0.0], [-4.0, 12.0, -6.0, 
+-8.0, 10.0], [10.0, 8.0, -8.0, -6.0, -10.0]], [[12.0, -12.0, 6.0, 42.0, -12.0], [36.0, -42.0, 30.0, -36.0, 0.0], [-12.0, 36.0, 
+-18.0, -24.0, 30.0], [30.0, 24.0, -24.0, -18.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[-4.0, 4.0, -2.0, -14.0, 4.0], [-12.0, 14.0, -10.0, 12.0, 0.0], [4.0, -12.0, 6.0, 8.0, -10.0], [-10.0, 
+-8.0, 8.0, 6.0, 10.0]]], [[[12.0, -12.0, 6.0, 42.0, -12.0], [36.0, -42.0, 30.0, -36.0, 0.0], [-12.0, 36.0, -18.0, -24.0, 30.0], 
+[30.0, 24.0, -24.0, -18.0, -30.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, -35.0, 25.0, -30.0, 0.0], [-10.0, 30.0, -15.0, 
+-20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, -35.0, 25.0, -30.0, 0.0], [-10.0, 30.0, -15.0, 
+-20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[6.0, -6.0, 3.0, 21.0, -6.0], [18.0, -21.0, 15.0, -18.0, 0.0], [-6.0, 18.0, 
+-9.0, -12.0, 15.0], [15.0, 12.0, -12.0, -9.0, -15.0]]], [[[6.0, -6.0, 3.0, 21.0, -6.0], [18.0, -21.0, 15.0, -18.0, 0.0], [-6.0, 
+18.0, -9.0, -12.0, 15.0], [15.0, 12.0, -12.0, -9.0, -15.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, -35.0, 25.0, -30.0, 0.0], 
+[-10.0, 30.0, -15.0, -20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[12.0, -12.0, 6.0, 42.0, -12.0], [36.0, -42.0, 30.0, 
+-36.0, 0.0], [-12.0, 36.0, -18.0, -24.0, 30.0], [30.0, 24.0, -24.0, -18.0, -30.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, 
+-35.0, 25.0, -30.0, 0.0], [-10.0, 30.0, -15.0, -20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[14.0, -14.0, 7.0, 49.0, 
+-14.0], [42.0, -49.0, 35.0, -42.0, 0.0], [-14.0, 42.0, -21.0, -28.0, 35.0], [35.0, 28.0, -28.0, -21.0, 
+-35.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[30.0, -18.0, 24.0, -30.0, -18.0], [-18.0, -6.0, -12.0, -12.0, 36.0], [-36.0, 6.0, 18.0, 0.0, -6.0], 
+[42.0, 6.0, -24.0, -42.0, 36.0]], [[35.0, -21.0, 28.0, -35.0, -21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], [-42.0, 7.0, 21.0, 
+0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]], [[25.0, -15.0, 20.0, -25.0, -15.0], [-15.0, -5.0, -10.0, -10.0, 30.0], [-30.0, 
+5.0, 15.0, 0.0, -5.0], [35.0, 5.0, -20.0, -35.0, 30.0]], [[-20.0, 12.0, -16.0, 20.0, 12.0], [12.0, 4.0, 8.0, 8.0, -24.0], 
+[24.0, -4.0, -12.0, 0.0, 4.0], [-28.0, -4.0, 16.0, 28.0, -24.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[35.0, -21.0, 28.0, -35.0, -21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], 
+[-42.0, 7.0, 21.0, 0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]], [[10.0, -6.0, 8.0, -10.0, -6.0], [-6.0, -2.0, -4.0, -4.0, 
+12.0], [-12.0, 2.0, 6.0, 0.0, -2.0], [14.0, 2.0, -8.0, -14.0, 12.0]], [[30.0, -18.0, 24.0, -30.0, -18.0], [-18.0, -6.0, -12.0, 
+-12.0, 36.0], [-36.0, 6.0, 18.0, 0.0, -6.0], [42.0, 6.0, -24.0, -42.0, 36.0]], [[-15.0, 9.0, -12.0, 15.0, 9.0], [9.0, 3.0, 6.0, 
+6.0, -18.0], [18.0, -3.0, -9.0, 0.0, 3.0], [-21.0, -3.0, 12.0, 21.0, -18.0]]], [[[15.0, -9.0, 12.0, -15.0, -9.0], [-9.0, -3.0, 
+-6.0, -6.0, 18.0], [-18.0, 3.0, 9.0, 0.0, -3.0], [21.0, 3.0, -12.0, -21.0, 18.0]], [[25.0, -15.0, 20.0, -25.0, -15.0], [-15.0, 
+-5.0, -10.0, -10.0, 30.0], [-30.0, 5.0, 15.0, 0.0, -5.0], [35.0, 5.0, -20.0, -35.0, 30.0]], [[10.0, -6.0, 8.0, -10.0, -6.0], 
+[-6.0, -2.0, -4.0, -4.0, 12.0], [-12.0, 2.0, 6.0, 0.0, -2.0], [14.0, 2.0, -8.0, -14.0, 12.0]], [[-30.0, 18.0, -24.0, 30.0, 
+18.0], [18.0, 6.0, 12.0, 12.0, -36.0], [36.0, -6.0, -18.0, 0.0, 6.0], [-42.0, -6.0, 24.0, 42.0, -36.0]], [[-10.0, 6.0, -8.0, 
+10.0, 6.0], [6.0, 2.0, 4.0, 4.0, -12.0], [12.0, -2.0, -6.0, 0.0, 2.0], [-14.0, -2.0, 8.0, 14.0, -12.0]]], [[[-15.0, 9.0, -12.0, 
+15.0, 9.0], [9.0, 3.0, 6.0, 6.0, -18.0], [18.0, -3.0, -9.0, 0.0, 3.0], [-21.0, -3.0, 12.0, 21.0, -18.0]], [[0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[20.0, -12.0, 16.0, -20.0, -12.0], 
+[-12.0, -4.0, -8.0, -8.0, 24.0], [-24.0, 4.0, 12.0, 0.0, -4.0], [28.0, 4.0, -16.0, -28.0, 24.0]], [[35.0, -21.0, 28.0, -35.0, 
+-21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], [-42.0, 7.0, 21.0, 0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]], [[35.0, -21.0, 
+28.0, -35.0, -21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], [-42.0, 7.0, 21.0, 0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank3_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, 3.0, 7.0], [-6.0, -5.0, 1.0], [-2.0, 6.0, -1.0], [-7.0, -2.0, 6.0], [3.0, 4.0, 6.0]], 
+[[-4.0, 6.0, 6.0], [4.0, -5.0, -6.0], [1.0, -1.0, 7.0], [-7.0, 7.0, 0.0], [4.0, 5.0, 2.0]], [[1.0, 2.0, 0.0], [4.0, 3.0, -4.0], 
+[-7.0, 1.0, 0.0], [3.0, 0.0, 4.0], [0.0, -3.0, -1.0]], [[0.0, -7.0, -6.0], [2.0, 7.0, -1.0], [0.0, -3.0, -3.0], [-4.0, 3.0, 
+2.0], [6.0, 4.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -4.0, -1.0], [-6.0, -6.0, 4.0], [4.0, 6.0, -6.0], [-7.0, -1.0, 7.0], 
+[0.0, -1.0, -1.0]], [[5.0, 4.0, 7.0], [3.0, -2.0, 4.0], [-7.0, -3.0, -7.0], [2.0, 3.0, -7.0], [-5.0, 7.0, 0.0]], [[-4.0, 0.0, 
+-7.0], [-1.0, 5.0, -1.0], [-3.0, -4.0, -1.0], [-1.0, 5.0, 0.0], [2.0, -5.0, -5.0]], [[-1.0, -5.0, -3.0], [-6.0, 1.0, -1.0], 
+[6.0, -5.0, -1.0], [5.0, -4.0, 3.0], [-3.0, -6.0, -6.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[5.0, 4.0, -3.0], [-7.0, -4.0, 3.0], [4.0, -5.0, 0.0], [-2.0, 0.0, 7.0], [-2.0, 1.0, 7.0]], 
+[[5.0, 2.0, 2.0], [-1.0, 3.0, -6.0], [-3.0, 7.0, 6.0], [5.0, 4.0, 7.0], [2.0, -2.0, -1.0]], [[0.0, 0.0, 5.0], [3.0, 4.0, -5.0], 
+[-7.0, 6.0, -7.0], [0.0, -7.0, 2.0], [3.0, -4.0, 5.0]], [[-4.0, -5.0, 6.0], [-5.0, -2.0, -4.0], [-4.0, -1.0, -2.0], [5.0, 0.0, 
+-6.0], [-2.0, -5.0, 4.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 6.0, 4.0], [5.0, 6.0, -2.0], [0.0, 3.0, 1.0], [6.0, -3.0, -4.0], 
+[2.0, 3.0, -5.0]], [[-7.0, -1.0, -1.0], [-7.0, 6.0, 3.0], [-6.0, -2.0, 1.0], [2.0, -6.0, 3.0], [-5.0, 3.0, -5.0]], [[-5.0, 
+-2.0, 0.0], [-7.0, -1.0, 0.0], [-3.0, -7.0, -5.0], [-3.0, -3.0, 0.0], [0.0, -7.0, 6.0]], [[5.0, 5.0, -1.0], [-7.0, 0.0, -1.0], 
+[7.0, 1.0, -3.0], [-1.0, -3.0, -4.0], [-2.0, -1.0, -7.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-44.0, 58.0, -43.0, 63.0, 66.0], [-15.0, -26.0, 84.0, 26.0, -27.0], [35.0, -44.0, 18.0, -7.0, 
+2.0], [55.0, 1.0, 11.0, -77.0, 27.0]], [[-53.0, 65.0, 1.0, 19.0, 14.0], [-38.0, -15.0, -11.0, -43.0, -3.0], [5.0, -43.0, 5.0, 
+37.0, 7.0], [55.0, 36.0, 27.0, -36.0, 41.0]], [[17.0, -13.0, -38.0, -3.0, 3.0], [0.0, 26.0, 42.0, 7.0, -15.0], [-5.0, 23.0, 
+57.0, -44.0, -35.0], [-28.0, 2.0, 4.0, -4.0, -30.0]], [[-61.0, 75.0, -18.0, 56.0, 54.0], [-27.0, -35.0, 43.0, -1.0, -16.0], 
+[30.0, -59.0, -5.0, 26.0, 17.0], [74.0, 15.0, 18.0, -71.0, 48.0]], [[13.0, -19.0, -8.0, 36.0, 40.0], [35.0, -27.0, 55.0, 73.0, 
+-8.0], [30.0, -5.0, -39.0, -16.0, 23.0], [4.0, -47.0, -28.0, -21.0, -2.0]]], [[[-14.0, 22.0, -46.0, 50.0, 56.0], [4.0, -14.0, 
+90.0, 46.0, -26.0], [30.0, -18.0, 22.0, -30.0, -6.0], [22.0, -16.0, -2.0, -56.0, 2.0]], [[18.0, -26.0, 41.0, -50.0, -55.0], 
+[-2.0, 17.0, -83.0, -42.0, 24.0], [-30.0, 22.0, -16.0, 23.0, 2.0], [-27.0, 14.0, 1.0, 56.0, -7.0]], [[-20.0, 18.0, 9.0, 47.0, 
+46.0], [17.0, -46.0, 32.0, 50.0, -3.0], [35.0, -36.0, -62.0, 21.0, 42.0], [43.0, -31.0, -17.0, -37.0, 31.0]], [[-7.0, 21.0, 
+-63.0, 14.0, 21.0], [-21.0, 28.0, 70.0, -7.0, -28.0], [0.0, 7.0, 91.0, -49.0, -49.0], [-7.0, 21.0, 21.0, -35.0, -21.0]], 
+[[34.0, -42.0, -9.0, 6.0, 11.0], [34.0, -1.0, 35.0, 54.0, -4.0], [10.0, 22.0, -12.0, -31.0, 2.0], [-29.0, -38.0, -25.0, 8.0, 
+-25.0]]], [[[13.0, -15.0, -6.0, -2.0, 0.0], [9.0, 5.0, 11.0, 13.0, -2.0], [0.0, 11.0, 5.0, -14.0, -5.0], [-14.0, -9.0, -6.0, 
+5.0, -12.0]], [[44.0, -52.0, 1.0, -36.0, -33.0], [18.0, 29.0, -15.0, 4.0, 6.0], [-20.0, 44.0, 18.0, -29.0, -20.0], [-55.0, 
+-10.0, -11.0, 44.0, -39.0]], [[-31.0, 45.0, -33.0, 14.0, 15.0], [-33.0, 10.0, 28.0, -31.0, -16.0], [0.0, -17.0, 55.0, -7.0, 
+-25.0], [23.0, 33.0, 27.0, -35.0, 9.0]], [[3.0, -9.0, 12.0, 22.0, 22.0], [23.0, -27.0, 15.0, 43.0, 2.0], [20.0, -11.0, -49.0, 
+8.0, 29.0], [12.0, -31.0, -20.0, -9.0, 10.0]], [[-9.0, 9.0, 15.0, -7.0, -10.0], [-8.0, -3.0, -27.0, -19.0, 7.0], [-5.0, -7.0, 
+-11.0, 19.0, 7.0], [9.0, 10.0, 5.0, 6.0, 11.0]]], [[[-10.0, 10.0, 35.0, -42.0, -49.0], [-26.0, 15.0, -85.0, -70.0, 20.0], 
+[-30.0, 2.0, 0.0, 37.0, -2.0], [-1.0, 38.0, 19.0, 36.0, 11.0]], [[41.0, -45.0, -27.0, -11.0, -4.0], [22.0, 25.0, 37.0, 31.0, 
+-9.0], [-5.0, 39.0, 35.0, -51.0, -27.0], [-49.0, -20.0, -13.0, 16.0, -43.0]], [[-3.0, 3.0, 15.0, -21.0, -24.0], [-12.0, 9.0, 
+-39.0, -33.0, 9.0], [-15.0, 3.0, 3.0, 15.0, -3.0], [-3.0, 18.0, 9.0, 18.0, 3.0]], [[-14.0, 22.0, -31.0, 22.0, 25.0], [-10.0, 
+1.0, 45.0, 6.0, -16.0], [10.0, -10.0, 32.0, -17.0, -14.0], [13.0, 6.0, 9.0, -32.0, 1.0]], [[25.0, -37.0, 4.0, 37.0, 41.0], 
+[52.0, -36.0, 52.0, 95.0, -3.0], [35.0, -1.0, -67.0, -14.0, 37.0], [-2.0, -66.0, -42.0, -12.0, 
+-4.0]]]])+(1.-msk_ref)*numpy.array([[[[-40.0, -12.0, -13.0, 28.0, -3.0], [-9.0, -41.0, -5.0, 25.0, -17.0], [-2.0, -10.0, 27.0, 
+6.0, 22.0], [-9.0, -13.0, 13.0, 14.0, 7.0]], [[16.0, -74.0, -14.0, -34.0, -50.0], [44.0, 18.0, 52.0, 36.0, -8.0], [42.0, 48.0, 
+40.0, 36.0, 66.0], [-64.0, 38.0, -60.0, 8.0, -10.0]], [[-12.0, 68.0, 12.0, 30.0, 56.0], [-28.0, -10.0, -42.0, -46.0, 28.0], 
+[-32.0, -34.0, -24.0, -30.0, -78.0], [56.0, -22.0, 52.0, 2.0, 28.0]], [[64.0, -55.0, 4.0, -67.0, -52.0], [43.0, 64.0, 51.0, 
+13.0, -3.0], [37.0, 50.0, -7.0, 24.0, 49.0], [-47.0, 42.0, -71.0, -18.0, -34.0]], [[-10.0, -4.0, -4.0, 7.0, 2.0], [2.0, -9.0, 
+1.0, 3.0, 2.0], [2.0, 1.0, 12.0, 3.0, 1.0], [-4.0, 1.0, 2.0, 7.0, 8.0]]], [[[22.0, 35.0, 19.0, -10.0, -13.0], [-46.0, 10.0, 
+-31.0, 7.0, -48.0], [-33.0, -39.0, -78.0, -27.0, 14.0], [38.0, -42.0, 18.0, -45.0, -63.0]], [[-14.0, -5.0, -2.0, 8.0, -20.0], 
+[-23.0, -21.0, -10.0, 30.0, -41.0], [-11.0, -19.0, -15.0, -3.0, 38.0], [1.0, -25.0, 7.0, -13.0, -32.0]], [[-4.0, -39.0, -16.0, 
+-5.0, 12.0], [59.0, 10.0, 41.0, -17.0, 61.0], [41.0, 52.0, 77.0, 30.0, -21.0], [-43.0, 56.0, -31.0, 44.0, 66.0]], [[-22.0, 
+42.0, 2.0, 31.0, 48.0], [-10.0, -17.0, -25.0, -35.0, 34.0], [-16.0, -17.0, 8.0, -15.0, -63.0], [32.0, -7.0, 38.0, 17.0, 42.0]], 
+[[72.0, 17.0, 21.0, -51.0, 11.0], [28.0, 77.0, 16.0, -52.0, 46.0], [11.0, 28.0, -34.0, -6.0, -49.0], [10.0, 35.0, -28.0, -16.0, 
+3.0]]], [[[-4.0, -6.0, -7.0, 4.0, 27.0], [35.0, 7.0, 17.0, -29.0, 55.0], [20.0, 28.0, 47.0, 12.0, -42.0], [-13.0, 35.0, -7.0, 
+32.0, 57.0]], [[32.0, 27.0, 14.0, -17.0, 18.0], [3.0, 34.0, -5.0, -35.0, 25.0], [-5.0, 2.0, -27.0, -12.0, -41.0], [21.0, 8.0, 
+1.0, -10.0, 4.0]], [[-10.0, -37.0, -13.0, -2.0, -13.0], [26.0, -6.0, 25.0, 15.0, 8.0], [23.0, 25.0, 42.0, 21.0, 22.0], [-34.0, 
+22.0, -22.0, 19.0, 17.0]], [[36.0, 25.0, 15.0, -21.0, 13.0], [2.0, 37.0, -4.0, -32.0, 20.0], [-5.0, 2.0, -32.0, -12.0, -35.0], 
+[20.0, 7.0, -2.0, -14.0, -3.0]], [[-62.0, -10.0, -20.0, 47.0, 14.0], [-4.0, -59.0, -7.0, 19.0, 0.0], [0.0, -9.0, 54.0, 9.0, 
+5.0], [-10.0, -9.0, 24.0, 33.0, 36.0]]], [[[-36.0, -29.0, -18.0, 21.0, -2.0], [15.0, -32.0, 13.0, 19.0, 5.0], [15.0, 12.0, 
+53.0, 18.0, 17.0], [-27.0, 10.0, -3.0, 28.0, 28.0]], [[38.0, -22.0, 2.0, -35.0, -4.0], [42.0, 45.0, 33.0, -21.0, 38.0], [28.0, 
+41.0, 16.0, 15.0, -13.0], [-24.0, 43.0, -38.0, 7.0, 18.0]], [[-70.0, 2.0, -16.0, 55.0, 2.0], [-36.0, -75.0, -27.0, 39.0, 
+-40.0], [-20.0, -37.0, 22.0, -3.0, 29.0], [6.0, -41.0, 40.0, 13.0, 0.0]], [[-42.0, -5.0, -9.0, 30.0, -17.0], [-34.0, -50.0, 
+-19.0, 43.0, -52.0], [-17.0, -31.0, -2.0, -3.0, 46.0], [2.0, -38.0, 22.0, -5.0, -27.0]], [[-42.0, -39.0, -24.0, 24.0, 6.0], 
+[33.0, -33.0, 24.0, 12.0, 27.0], [27.0, 27.0, 81.0, 27.0, 6.0], [-39.0, 27.0, -9.0, 45.0, 54.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank4_offset2(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[2.0, 4.0, 0.0], [0.0, -5.0, 0.0]], [[0.0, -2.0, -2.0], [-7.0, 4.0, 2.0]], [[6.0, -7.0, 
+2.0], [4.0, 1.0, -2.0]], [[-6.0, 3.0, 0.0], [0.0, -3.0, 6.0]], [[-5.0, 1.0, 4.0], [-7.0, -6.0, 6.0]]], [[[0.0, 5.0, 2.0], [3.0, 
+-1.0, 3.0]], [[7.0, -1.0, 0.0], [-1.0, 4.0, 0.0]], [[-1.0, 0.0, -2.0], [7.0, -4.0, 1.0]], [[-3.0, 7.0, 0.0], [7.0, -3.0, 7.0]], 
+[[-7.0, -3.0, -7.0], [4.0, 4.0, -5.0]]], [[[-5.0, -1.0, 7.0], [0.0, -6.0, -5.0]], [[-2.0, 3.0, -6.0], [2.0, 0.0, 5.0]], [[0.0, 
+-6.0, 6.0], [1.0, 1.0, 3.0]], [[1.0, -6.0, 0.0], [2.0, 0.0, -3.0]], [[4.0, 6.0, 7.0], [-5.0, 5.0, -2.0]]], [[[0.0, 3.0, -2.0], 
+[2.0, -2.0, 5.0]], [[-4.0, 2.0, -1.0], [-1.0, -2.0, 7.0]], [[1.0, -7.0, -4.0], [-4.0, 5.0, 2.0]], [[-5.0, 2.0, -1.0], [-2.0, 
+0.0, 5.0]], [[0.0, -5.0, 4.0], [4.0, 0.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, -6.0, 5.0], [-6.0, 0.0, -3.0]], [[2.0, 
+0.0, 4.0], [-7.0, 0.0, 7.0]], [[5.0, -2.0, -5.0], [-6.0, 0.0, 1.0]], [[0.0, 6.0, 4.0], [7.0, -2.0, 5.0]], [[-7.0, 2.0, -7.0], 
+[4.0, -3.0, 6.0]]], [[[5.0, -3.0, 1.0], [-3.0, -1.0, 5.0]], [[-1.0, 0.0, -4.0], [-5.0, -5.0, -1.0]], [[-3.0, -4.0, -3.0], [5.0, 
+5.0, -1.0]], [[-4.0, 0.0, 2.0], [-4.0, -7.0, -1.0]], [[1.0, -6.0, 2.0], [5.0, 0.0, -3.0]]], [[[-2.0, 0.0, -7.0], [2.0, -4.0, 
+3.0]], [[-1.0, -6.0, 1.0], [-7.0, -2.0, -4.0]], [[1.0, -2.0, 0.0], [-7.0, 5.0, -5.0]], [[4.0, -4.0, 0.0], [3.0, 0.0, 4.0]], 
+[[0.0, -7.0, 7.0], [2.0, -7.0, -4.0]]], [[[-6.0, -6.0, 3.0], [0.0, -6.0, -7.0]], [[5.0, -6.0, -1.0], [7.0, -5.0, 2.0]], [[0.0, 
+1.0, 5.0], [5.0, -6.0, 3.0]], [[-2.0, 4.0, 1.0], [-4.0, -2.0, -7.0]], [[-3.0, 3.0, -4.0], [5.0, -6.0, -2.0]]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([[[[0.0, -3.0, -2.0], [5.0, 7.0, 6.0]], [[1.0, 5.0, 1.0], [-1.0, 5.0, -3.0]], [[0.0, 1.0, 6.0], 
+[-2.0, 6.0, 5.0]], [[0.0, -5.0, 5.0], [-2.0, 4.0, -7.0]], [[-3.0, -4.0, 6.0], [1.0, 6.0, -7.0]]], [[[-3.0, 1.0, 3.0], [7.0, 
+-2.0, -5.0]], [[6.0, 3.0, -3.0], [4.0, 6.0, 4.0]], [[0.0, 0.0, 5.0], [-6.0, 0.0, 2.0]], [[0.0, -6.0, -3.0], [4.0, -2.0, -2.0]], 
+[[-2.0, -2.0, 3.0], [5.0, 7.0, -5.0]]], [[[-3.0, -4.0, -2.0], [-5.0, -6.0, -3.0]], [[1.0, 7.0, 6.0], [-5.0, 3.0, -6.0]], 
+[[-2.0, 1.0, 2.0], [2.0, 5.0, 0.0]], [[2.0, -6.0, 6.0], [6.0, 2.0, 1.0]], [[7.0, 6.0, -5.0], [2.0, 2.0, -7.0]]], [[[2.0, -3.0, 
+-6.0], [5.0, 0.0, 3.0]], [[-5.0, -4.0, 7.0], [3.0, -6.0, -1.0]], [[-5.0, -4.0, 7.0], [-6.0, -3.0, 0.0]], [[-4.0, 0.0, 1.0], 
+[0.0, -6.0, -7.0]], [[-7.0, 0.0, 0.0], [7.0, 1.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, -6.0, -5.0], [2.0, -3.0, 3.0]], 
+[[1.0, 4.0, 2.0], [-4.0, 1.0, 7.0]], [[-6.0, 2.0, -2.0], [7.0, -7.0, -7.0]], [[6.0, -1.0, 0.0], [0.0, 0.0, -3.0]], [[-1.0, 5.0, 
+2.0], [-7.0, -1.0, 7.0]]], [[[-6.0, -2.0, 6.0], [6.0, 3.0, -5.0]], [[-2.0, -7.0, -5.0], [6.0, 5.0, -5.0]], [[0.0, -2.0, 3.0], 
+[0.0, 3.0, 1.0]], [[6.0, -3.0, 1.0], [4.0, -4.0, 6.0]], [[1.0, 7.0, 4.0], [-7.0, -7.0, 3.0]]], [[[-7.0, -5.0, 0.0], [4.0, 1.0, 
+1.0]], [[-7.0, 1.0, -2.0], [1.0, 2.0, -3.0]], [[3.0, 0.0, 6.0], [-6.0, 2.0, 7.0]], [[6.0, 3.0, -5.0], [-1.0, -6.0, -4.0]], 
+[[5.0, -5.0, 2.0], [-2.0, -3.0, 7.0]]], [[[7.0, -6.0, -4.0], [-5.0, 5.0, -1.0]], [[4.0, 6.0, 5.0], [3.0, -6.0, -6.0]], [[4.0, 
+6.0, -1.0], [-5.0, -7.0, -4.0]], [[6.0, 6.0, 1.0], [5.0, -1.0, 2.0]], [[-7.0, -1.0, -5.0], [6.0, 7.0, -4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-47.0, -3.0, -26.0, -40.0, -52.0], [8.0, -6.0, 0.0, -14.0, -47.0], [8.0, 15.0, -25.0, -30.0, 
+28.0], [-8.0, 4.0, -11.0, 22.0, -19.0]], [[15.0, 9.0, 34.0, 16.0, -1.0], [-75.0, 4.0, 36.0, -22.0, -19.0], [17.0, 9.0, 0.0, 
+-32.0, -22.0], [-11.0, -53.0, 24.0, -40.0, -37.0]], [[32.0, -20.0, -7.0, 55.0, 46.0], [17.0, 23.0, -18.0, 54.0, 45.0], [-14.0, 
+-36.0, -2.0, 90.0, 14.0], [35.0, 20.0, -15.0, -14.0, -21.0]], [[6.0, -24.0, 15.0, -69.0, -54.0], [-3.0, -21.0, 12.0, -24.0, 
+-45.0], [6.0, -30.0, 0.0, -30.0, -72.0], [-3.0, 30.0, 27.0, 0.0, 63.0]], [[-52.0, -37.0, 33.0, -37.0, -50.0], [-39.0, -79.0, 
+74.0, -46.0, -87.0], [56.0, 7.0, -25.0, -40.0, -117.0], [-54.0, 58.0, 109.0, 18.0, 4.0]]], [[[7.0, 10.0, 20.0, -46.0, -32.0], 
+[19.0, 27.0, -2.0, -28.0, -11.0], [-42.0, 11.0, 10.0, 1.0, 3.0], [-3.0, 6.0, -21.0, -13.0, 32.0]], [[26.0, 23.0, 25.0, 23.0, 
+6.0], [-37.0, 59.0, 6.0, -6.0, 11.0], [-36.0, 17.0, 3.0, 22.0, 49.0], [12.0, -58.0, -37.0, -52.0, -52.0]], [[17.0, -33.0, 
+-45.0, -47.0, -33.0], [49.0, 8.0, -50.0, 40.0, -2.0], [-7.0, -66.0, -8.0, 21.0, 2.0], [48.0, 35.0, -39.0, 19.0, 56.0]], [[35.0, 
+-11.0, 10.0, -110.0, -79.0], [36.0, 41.0, -28.0, -22.0, -29.0], [-57.0, -40.0, 12.0, -5.0, -20.0], [29.0, 19.0, -46.0, -19.0, 
+95.0]], [[41.0, 2.0, -54.0, 23.0, 54.0], [42.0, -10.0, -69.0, 57.0, 72.0], [18.0, -48.0, 25.0, -11.0, 19.0], [42.0, -9.0, 
+-38.0, 32.0, 61.0]]], [[[-83.0, -18.0, -20.0, 51.0, 60.0], [72.0, -110.0, 25.0, 7.0, 16.0], [56.0, 42.0, -7.0, 21.0, -53.0], 
+[-64.0, 119.0, 96.0, 98.0, 9.0]], [[43.0, -10.0, -12.0, -84.0, -75.0], [-20.0, 43.0, -32.0, -2.0, -35.0], [-19.0, -57.0, -1.0, 
+-41.0, 3.0], [48.0, -43.0, -56.0, -33.0, 48.0]], [[36.0, -29.0, 49.0, 41.0, 46.0], [2.0, -14.0, 30.0, 14.0, 27.0], [-8.0, 
+-26.0, 13.0, 83.0, -83.0], [-4.0, 60.0, 57.0, -21.0, 20.0]], [[10.0, -22.0, -25.0, 47.0, 44.0], [20.0, -16.0, -18.0, 50.0, 
+35.0], [20.0, -33.0, -4.0, 47.0, -4.0], [21.0, 28.0, 7.0, 17.0, -5.0]], [[-34.0, 77.0, 78.0, 49.0, 45.0], [-20.0, 23.0, 61.0, 
+-83.0, 21.0], [-49.0, 140.0, 27.0, -8.0, 43.0], [-83.0, -38.0, 20.0, -25.0, -66.0]]], [[[21.0, -14.0, 0.0, -72.0, -69.0], 
+[-10.0, 31.0, -12.0, -10.0, -41.0], [-21.0, -37.0, -7.0, -17.0, -7.0], [28.0, -13.0, -32.0, -25.0, 32.0]], [[19.0, -25.0, 21.0, 
+-70.0, -64.0], [-27.0, -3.0, 15.0, -23.0, -53.0], [2.0, -39.0, -4.0, -29.0, -66.0], [8.0, 7.0, 17.0, -22.0, 47.0]], [[56.0, 
+-15.0, 17.0, 29.0, 13.0], [-70.0, 19.0, 8.0, 24.0, 5.0], [17.0, -49.0, 0.0, 8.0, -27.0], [33.0, -49.0, 4.0, -52.0, -22.0]], 
+[[16.0, -9.0, 25.0, -46.0, -36.0], [-25.0, -9.0, 17.0, -27.0, -32.0], [4.0, -17.0, 6.0, -35.0, -57.0], [-5.0, -1.0, 22.0, 
+-16.0, 41.0]], [[-15.0, -4.0, -24.0, 86.0, 97.0], [70.0, -39.0, -18.0, 48.0, 77.0], [13.0, 11.0, 11.0, 71.0, 7.0], [-10.0, 
+67.0, 24.0, 53.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[20.0, -16.0, -13.0, -15.0, 6.0], [51.0, 6.0, 24.0, -49.0, 6.0], [38.0, 
+22.0, 30.0, -55.0, 6.0], [14.0, -31.0, -19.0, -97.0, -8.0]], [[-25.0, 87.0, -118.0, -9.0, 104.0], [-65.0, -101.0, 19.0, 30.0, 
+88.0], [-35.0, -50.0, 121.0, -29.0, 81.0], [26.0, -35.0, 11.0, -5.0, -104.0]], [[-2.0, 18.0, -73.0, 29.0, 24.0], [-97.0, -12.0, 
+-10.0, 13.0, 16.0], [-48.0, -36.0, 28.0, 51.0, 44.0], [96.0, -41.0, 39.0, -15.0, -48.0]], [[-21.0, 37.0, 32.0, -21.0, 26.0], 
+[23.0, -55.0, -1.0, 52.0, 38.0], [1.0, -14.0, 13.0, -17.0, 5.0], [-102.0, 59.0, -9.0, 87.0, -18.0]], [[100.0, 10.0, 67.0, 
+-62.0, 20.0], [-19.0, 14.0, -28.0, 9.0, -10.0], [58.0, 45.0, -51.0, -11.0, -16.0], [-74.0, -57.0, -32.0, -2.0, 61.0]]], 
+[[[-5.0, 41.0, -87.0, 18.0, 39.0], [-64.0, -42.0, 11.0, 62.0, 31.0], [-28.0, -60.0, 72.0, 5.0, 86.0], [54.0, -26.0, 3.0, 9.0, 
+-82.0]], [[28.0, -1.0, 21.0, -3.0, 26.0], [-58.0, -28.0, -28.0, -16.0, 50.0], [-19.0, 3.0, -14.0, 53.0, 5.0], [10.0, -3.0, 
+64.0, -32.0, -34.0]], [[49.0, -47.0, 23.0, -11.0, -70.0], [58.0, 109.0, 13.0, -15.0, -116.0], [65.0, 41.0, -54.0, -46.0, 
+-33.0], [16.0, -60.0, -89.0, -27.0, 109.0]], [[24.0, 2.0, 48.0, -21.0, 36.0], [-4.0, -56.0, -16.0, -16.0, 78.0], [4.0, 9.0, 
+3.0, 16.0, 6.0], [-50.0, 30.0, 55.0, -37.0, -51.0]], [[21.0, -60.0, 34.0, 21.0, -83.0], [63.0, 75.0, 15.0, 28.0, -77.0], [40.0, 
+-3.0, -36.0, -15.0, 8.0], [13.0, 11.0, -47.0, -9.0, 31.0]]], [[[72.0, -7.0, 47.0, -21.0, -1.0], [-45.0, 16.0, -30.0, 23.0, 
+-7.0], [21.0, 13.0, -47.0, 33.0, 5.0], [-19.0, -31.0, 5.0, 1.0, 21.0]], [[17.0, -25.0, -15.0, 12.0, -4.0], [-4.0, 7.0, 5.0, 
+-31.0, 12.0], [3.0, 0.0, 13.0, 6.0, 19.0], [54.0, -20.0, 24.0, -82.0, -32.0]], [[-38.0, -9.0, -59.0, 23.0, -2.0], [-4.0, 20.0, 
+14.0, -66.0, -14.0], [-25.0, 9.0, 20.0, -3.0, -21.0], [84.0, -29.0, 12.0, -56.0, 8.0]], [[18.0, 4.0, -39.0, 16.0, -17.0], 
+[-18.0, 18.0, 12.0, 72.0, -33.0], [8.0, -41.0, 22.0, -7.0, 62.0], [33.0, -23.0, -39.0, 23.0, -22.0]], [[20.0, -57.0, 63.0, 
+19.0, -56.0], [67.0, 11.0, 10.0, 40.0, 2.0], [32.0, -21.0, -12.0, 0.0, 38.0], [-27.0, 65.0, 6.0, -26.0, -49.0]]], [[[54.0, 
+-79.0, 109.0, -9.0, -61.0], [83.0, 44.0, -4.0, -33.0, -15.0], [59.0, 39.0, -61.0, -5.0, -25.0], [-41.0, 33.0, 7.0, -77.0, 
+19.0]], [[46.0, -40.0, 30.0, 30.0, -67.0], [-7.0, 44.0, -4.0, 107.0, -49.0], [20.0, -48.0, -29.0, 32.0, 68.0], [13.0, 18.0, 
+-23.0, 37.0, -25.0]], [[6.0, 9.0, 48.0, -10.0, 7.0], [25.0, -47.0, -2.0, 64.0, 43.0], [12.0, -25.0, 9.0, -3.0, 34.0], [-84.0, 
+64.0, 6.0, 48.0, -50.0]], [[-40.0, -19.0, 53.0, 5.0, 5.0], [15.0, -28.0, -18.0, -73.0, 51.0], [-31.0, 29.0, -29.0, 39.0, 
+-63.0], [-25.0, 63.0, 77.0, -19.0, -5.0]], [[42.0, -39.0, 123.0, -15.0, -33.0], [10.0, 15.0, -38.0, 1.0, 3.0], [18.0, 31.0, 
+-89.0, 50.0, -44.0], [-76.0, 49.0, 35.0, 23.0, 34.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-1.0, 0.0], [-1.0, 0.0]], [[-4.0, -4.0], [-2.0, -4.0]], [[-2.0, 1.0], [-4.0, -6.0]], [[0.0, 
+5.0], [-4.0, 2.0]], [[-3.0, -3.0], [0.0, -3.0]], [[3.0, 0.0], [4.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 1.0], [2.0, 
+-1.0]], [[2.0, 0.0], [7.0, -7.0]], [[6.0, 3.0], [-1.0, 6.0]], [[-4.0, 0.0], [7.0, 5.0]], [[-2.0, 1.0], [7.0, 4.0]], [[-1.0, 
+5.0], [2.0, 0.0]]])
+      arg1=6.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-6.0, 0.0], [-6.0, 0.0]], [[-24.0, -24.0], [-12.0, -24.0]], [[-12.0, 6.0], [-24.0, -36.0]], 
+[[0.0, 30.0], [-24.0, 12.0]], [[-18.0, -18.0], [0.0, -18.0]], [[18.0, 0.0], [24.0, -24.0]]])+(1.-msk_ref)*numpy.array([[[-18.0, 
+6.0], [12.0, -6.0]], [[12.0, 0.0], [42.0, -42.0]], [[36.0, 18.0], [-6.0, 36.0]], [[-24.0, 0.0], [42.0, 30.0]], [[-12.0, 6.0], 
+[42.0, 24.0]], [[-6.0, 30.0], [12.0, 0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[-7.0, -2.0], [1.0, -5.0]], [[-1.0, -4.0], [-6.0, 4.0]], [[-5.0, 1.0], [-1.0, -7.0]], [[1.0, 
+5.0], [-4.0, 4.0]], [[0.0, 0.0], [3.0, 4.0]], [[-4.0, -1.0], [-5.0, -7.0]]])+(1.-msk_arg0)*numpy.array([[[-6.0, -6.0], [-4.0, 
+0.0]], [[4.0, 6.0], [6.0, -3.0]], [[-2.0, 7.0], [-3.0, -3.0]], [[3.0, 2.0], [4.0, 6.0]], [[4.0, 4.0], [3.0, -1.0]], [[3.0, 
+7.0], [0.0, 0.0]]])
+      arg1=numpy.array(-4.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[28.0, 8.0], [-4.0, 20.0]], [[4.0, 16.0], [24.0, -16.0]], [[20.0, -4.0], [4.0, 28.0]], [[-4.0, 
+-20.0], [16.0, -16.0]], [[-0.0, -0.0], [-12.0, -16.0]], [[16.0, 4.0], [20.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[24.0, 24.0], 
+[16.0, -0.0]], [[-16.0, -24.0], [-24.0, 12.0]], [[8.0, -28.0], [12.0, 12.0]], [[-12.0, -8.0], [-16.0, -24.0]], [[-16.0, -16.0], 
+[-12.0, 4.0]], [[-12.0, -28.0], [-0.0, -0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank4_offset2(self):
-      arg0=numpy.array([[[4.0, -3.0], [-3.0, 6.0], [-4.0, 5.0]], [[1.0, 4.0], [1.0, -1.0], [6.0, -7.0]]])
-      arg1=Data(numpy.array([[[[7.0, 1.0, -4.0, -6.0, -7.0], [0.0, -2.0, -4.0, -2.0, 1.0], [-3.0, 1.0, -6.0, -3.0, -7.0], 
-[-2.0, 7.0, 6.0, 7.0, 5.0]], [[7.0, -3.0, -4.0, 3.0, 0.0], [-4.0, 4.0, 0.0, 0.0, 4.0], [1.0, -3.0, 3.0, -6.0, -2.0], [-4.0, 
-4.0, 5.0, -2.0, -2.0]], [[-3.0, -2.0, 5.0, 7.0, -4.0], [2.0, -5.0, 1.0, -1.0, 1.0], [-3.0, 2.0, -6.0, 0.0, -1.0], [0.0, -1.0, 
--5.0, -2.0, 4.0]]], [[[5.0, 4.0, 5.0, 0.0, -5.0], [1.0, 5.0, -2.0, 5.0, 5.0], [1.0, 1.0, -4.0, -1.0, 5.0], [4.0, -6.0, 6.0, 
--6.0, 3.0]], [[0.0, 0.0, 2.0, 7.0, 6.0], [3.0, -4.0, 7.0, -6.0, -4.0], [-5.0, 0.0, 3.0, -3.0, -7.0], [1.0, -6.0, -2.0, 1.0, 
-3.0]], [[7.0, 6.0, 0.0, 0.0, -2.0], [0.0, -3.0, -1.0, -5.0, -6.0], [0.0, -4.0, 6.0, -7.0, -5.0], [5.0, 6.0, -3.0, -4.0, 
-7.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[66.0, 61.0, -17.0, -54.0, -23.0], [8.0, -17.0, -21.0, -35.0, -47.0], [-7.0, -18.0, 26.0, -40.0, 
--50.0], [39.0, 44.0, 15.0, 13.0, 58.0]], [[-23.0, -57.0, 31.0, 64.0, -11.0], [-13.0, 50.0, 9.0, 62.0, 92.0], [9.0, 21.0, -55.0, 
-21.0, 66.0], [-38.0, -62.0, 34.0, -40.0, -47.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-1.0, 0.0, 4.0], [-5.0, 1.0, -5.0]], [[-7.0, -5.0, 3.0], [6.0, 7.0, 7.0]]], [[[-4.0, -6.0, 
+-6.0], [0.0, 4.0, 6.0]], [[6.0, -1.0, 5.0], [2.0, 7.0, -4.0]]], [[[5.0, 7.0, 7.0], [5.0, 1.0, -5.0]], [[-6.0, -6.0, -3.0], 
+[-4.0, 6.0, 0.0]]], [[[0.0, -5.0, 7.0], [7.0, 7.0, -6.0]], [[3.0, 3.0, 0.0], [-7.0, -3.0, -3.0]]], [[[0.0, -7.0, -4.0], [-7.0, 
+-4.0, -1.0]], [[-6.0, 0.0, -5.0], [0.0, -4.0, 0.0]]], [[[7.0, -7.0, 0.0], [2.0, 4.0, 6.0]], [[0.0, 7.0, 0.0], [-7.0, -1.0, 
+5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, -6.0, 0.0], [5.0, -4.0, 2.0]], [[1.0, -5.0, -6.0], [-4.0, -4.0, -1.0]]], [[[4.0, 
+-4.0, -5.0], [-3.0, -5.0, -3.0]], [[6.0, 1.0, 4.0], [1.0, -3.0, 4.0]]], [[[6.0, 0.0, 6.0], [2.0, 1.0, 3.0]], [[-2.0, 2.0, 1.0], 
+[0.0, 1.0, 4.0]]], [[[-6.0, 5.0, 0.0], [-4.0, -7.0, -3.0]], [[-2.0, -5.0, -6.0], [4.0, 5.0, -1.0]]], [[[7.0, 0.0, 5.0], [-2.0, 
+7.0, 5.0]], [[-1.0, 5.0, -7.0], [6.0, 3.0, 4.0]]], [[[-6.0, -5.0, 4.0], [0.0, -4.0, 1.0]], [[5.0, 5.0, 6.0], [0.0, -5.0, 
+7.0]]]])
+      arg1=numpy.array([5.0, 0.0, 6.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[19.0, -55.0], [-17.0, 72.0]], [[-56.0, 36.0], [60.0, -14.0]], [[67.0, -5.0], [-48.0, -20.0]], 
+[[42.0, -1.0], [15.0, -53.0]], [[-24.0, -41.0], [-60.0, 0.0]], [[35.0, 46.0], [0.0, -5.0]]])+(1.-msk_ref)*numpy.array([[[-15.0, 
+37.0], [-31.0, -26.0]], [[-10.0, -33.0], [54.0, 29.0]], [[66.0, 28.0], [-4.0, 24.0]], [[-30.0, -38.0], [-46.0, 14.0]], [[65.0, 
+20.0], [-47.0, 54.0]], [[-6.0, 6.0], [61.0, 42.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_constData_rank3_offset0(self):
-      arg0=numpy.array([-1.0, 6.0])
-      arg1=Data(numpy.array([[[2.0, -6.0], [7.0, -5.0]], [[2.0, 7.0], [-6.0, -1.0]], [[6.0, 4.0], [-2.0, 2.0]], [[-4.0, 0.0], 
-[2.0, 0.0]], [[4.0, -5.0], [-1.0, 6.0]], [[0.0, -1.0], [-1.0, -7.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-2.0, 6.0], [-7.0, 5.0]], [[-2.0, -7.0], [6.0, 1.0]], [[-6.0, -4.0], [2.0, -2.0]], [[4.0, 0.0], 
-[-2.0, 0.0]], [[-4.0, 5.0], [1.0, -6.0]], [[0.0, 1.0], [1.0, 7.0]]], [[[12.0, -36.0], [42.0, -30.0]], [[12.0, 42.0], [-36.0, 
--6.0]], [[36.0, 24.0], [-12.0, 12.0]], [[-24.0, 0.0], [12.0, 0.0]], [[24.0, -30.0], [-6.0, 36.0]], [[0.0, -6.0], [-6.0, 
--42.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, -6.0], [1.0, 3.0]], [[-4.0, 4.0], [5.0, 4.0]], [[2.0, -3.0], [-2.0, 3.0]], [[-5.0, 
+-7.0], [4.0, 3.0]], [[6.0, -7.0], [2.0, 5.0]], [[4.0, 1.0], [4.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, -4.0], [0.0, 
+2.0]], [[0.0, 5.0], [-3.0, 6.0]], [[-7.0, 7.0], [-4.0, 7.0]], [[-3.0, -1.0], [6.0, 6.0]], [[0.0, -1.0], [5.0, 5.0]], [[2.0, 
+3.0], [4.0, 3.0]]])
+      arg1=numpy.array([-1.0, -4.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [6.0, 24.0]], [[-1.0, -4.0], [-3.0, -12.0]]], [[[4.0, 16.0], [-4.0, -16.0]], 
+[[-5.0, -20.0], [-4.0, -16.0]]], [[[-2.0, -8.0], [3.0, 12.0]], [[2.0, 8.0], [-3.0, -12.0]]], [[[5.0, 20.0], [7.0, 28.0]], 
+[[-4.0, -16.0], [-3.0, -12.0]]], [[[-6.0, -24.0], [7.0, 28.0]], [[-2.0, -8.0], [-5.0, -20.0]]], [[[-4.0, -16.0], [-1.0, -4.0]], 
+[[-4.0, -16.0], [-5.0, -20.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, 20.0], [4.0, 16.0]], [[0.0, 0.0], [-2.0, -8.0]]], [[[0.0, 
+0.0], [-5.0, -20.0]], [[3.0, 12.0], [-6.0, -24.0]]], [[[7.0, 28.0], [-7.0, -28.0]], [[4.0, 16.0], [-7.0, -28.0]]], [[[3.0, 
+12.0], [1.0, 4.0]], [[-6.0, -24.0], [-6.0, -24.0]]], [[[0.0, 0.0], [1.0, 4.0]], [[-5.0, -20.0], [-5.0, -20.0]]], [[[-2.0, 
+-8.0], [-3.0, -12.0]], [[-4.0, -16.0], [-3.0, -12.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank4_offset1(self):
-      arg0=numpy.array([[-3.0, -2.0], [4.0, 1.0], [6.0, 0.0]])
-      arg1=Data(numpy.array([[[[-3.0, -7.0], [7.0, -6.0]], [[-5.0, -5.0], [6.0, -2.0]], [[7.0, 0.0], [-2.0, -1.0]], [[-1.0, 
--4.0], [1.0, -3.0]], [[3.0, 7.0], [-7.0, -1.0]], [[-6.0, 0.0], [5.0, 2.0]]], [[[-6.0, 3.0], [5.0, -3.0]], [[1.0, 1.0], [-4.0, 
--7.0]], [[2.0, -6.0], [3.0, 7.0]], [[2.0, 1.0], [-3.0, -1.0]], [[6.0, 7.0], [-4.0, 6.0]], [[-1.0, -5.0], [-4.0, -7.0]]], 
-[[[-2.0, -5.0], [1.0, -1.0]], [[-2.0, 3.0], [3.0, -7.0]], [[5.0, 1.0], [0.0, -1.0]], [[-4.0, -3.0], [-7.0, -4.0]], [[-7.0, 
-6.0], [7.0, 3.0]], [[3.0, -6.0], [5.0, 0.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-27.0, 3.0], [5.0, 0.0]], [[7.0, 37.0], [-16.0, -64.0]], [[17.0, -18.0], [18.0, 25.0]], [[-13.0, 
--2.0], [-57.0, -19.0]], [[-27.0, 43.0], [47.0, 45.0]], [[32.0, -56.0], [-1.0, -34.0]]], [[[0.0, 17.0], [-9.0, 9.0]], [[11.0, 
-11.0], [-16.0, -3.0]], [[-12.0, -6.0], [7.0, 9.0]], [[4.0, 9.0], [-5.0, 5.0]], [[0.0, -7.0], [10.0, 8.0]], [[11.0, -5.0], 
-[-14.0, -11.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[0.0, 4.0, 5.0], [-7.0, 3.0, 1.0]], [[1.0, 0.0, -7.0], [2.0, 0.0, -5.0]]], [[[4.0, -2.0, 
+0.0], [-5.0, -7.0, -4.0]], [[2.0, 7.0, 7.0], [5.0, 7.0, -5.0]]], [[[1.0, 4.0, 0.0], [-4.0, -5.0, 2.0]], [[-3.0, 0.0, 7.0], 
+[-5.0, 6.0, 1.0]]], [[[-6.0, 1.0, 1.0], [-7.0, 3.0, 3.0]], [[-7.0, -1.0, 3.0], [0.0, 0.0, -5.0]]], [[[3.0, 5.0, 6.0], [3.0, 
+-1.0, 2.0]], [[-3.0, -6.0, 5.0], [-2.0, 0.0, 6.0]]], [[[3.0, 0.0, -3.0], [6.0, 5.0, 1.0]], [[-1.0, 2.0, -4.0], [2.0, -1.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -2.0, 2.0], [-6.0, 7.0, 3.0]], [[-7.0, 6.0, 1.0], [-6.0, 4.0, -3.0]]], [[[6.0, 
+0.0, -5.0], [3.0, 4.0, 0.0]], [[0.0, -6.0, -2.0], [1.0, 6.0, -6.0]]], [[[-5.0, -4.0, -3.0], [-7.0, 0.0, 5.0]], [[-2.0, -5.0, 
+1.0], [-1.0, 6.0, 4.0]]], [[[1.0, -6.0, 6.0], [-5.0, -4.0, -6.0]], [[6.0, -6.0, 0.0], [2.0, 2.0, 6.0]]], [[[0.0, 0.0, 0.0], 
+[-7.0, 0.0, -6.0]], [[4.0, -1.0, -5.0], [-5.0, 5.0, 0.0]]], [[[-4.0, 2.0, 5.0], [-3.0, -2.0, -6.0]], [[4.0, 2.0, -1.0], [2.0, 
+0.0, 2.0]]]])
+      arg1=numpy.array([[0.0, 7.0, 3.0], [4.0, -3.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[43.0, -12.0], [24.0, -37.0]], [[-21.0, 4.0], [-15.0, 8.0]]], [[[-14.0, 22.0], [-61.0, 1.0]], 
+[[70.0, -13.0], [34.0, -1.0]]], [[[28.0, -8.0], [-29.0, -1.0]], [[21.0, -12.0], [45.0, -38.0]]], [[[10.0, -27.0], [30.0, 
+-37.0]], [[2.0, -25.0], [-15.0, 0.0]]], [[[53.0, -3.0], [-1.0, 15.0]], [[-27.0, 6.0], [18.0, -8.0]]], [[[-9.0, 12.0], [38.0, 
+9.0]], [[2.0, -10.0], [-7.0, 11.0]]]])+(1.-msk_ref)*numpy.array([[[[-8.0, -18.0], [58.0, -45.0]], [[45.0, -46.0], [19.0, 
+-36.0]]], [[[-15.0, 24.0], [28.0, 0.0]], [[-48.0, 18.0], [24.0, -14.0]]], [[[-37.0, -8.0], [15.0, -28.0]], [[-32.0, 7.0], 
+[54.0, -22.0]]], [[[-24.0, 22.0], [-46.0, -8.0]], [[-42.0, 42.0], [32.0, 2.0]]], [[[0.0, 0.0], [-18.0, -28.0]], [[-22.0, 19.0], 
+[35.0, -35.0]]], [[[29.0, -22.0], [-32.0, -6.0]], [[11.0, 10.0], [6.0, 8.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank0_offset0(self):
-      arg0=numpy.array([6.0, 5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-2.0)+(1-msk_arg1)*(-2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, 7.0], [-7.0, 7.0]], [[3.0, 7.0], [-2.0, -5.0]], [[-6.0, -5.0], [-4.0, 1.0]], [[-7.0, 
+1.0], [-1.0, 2.0]], [[-3.0, -1.0], [-6.0, -1.0]], [[5.0, 1.0], [-1.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 3.0], [-7.0, 
+4.0]], [[-3.0, 0.0], [-1.0, 3.0]], [[-4.0, 4.0], [-4.0, -7.0]], [[7.0, -7.0], [4.0, -1.0]], [[-3.0, 3.0], [0.0, -2.0]], [[4.0, 
+-7.0], [0.0, 3.0]]])
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-12.0, -10.0])+(1.-msk_ref)*numpy.array([-12.0, -10.0])
+      ref=msk_ref*numpy.array([[[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [-0.0, -0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[-0.0, 
+0.0], [-0.0, 0.0]], [[-0.0, -0.0], [-0.0, -0.0]], [[0.0, 0.0], [-0.0, -0.0]]])+(1.-msk_ref)*numpy.array([[[-0.0, 0.0], [-0.0, 
+0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [-0.0, -0.0]], [[0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[0.0, 
+-0.0], [0.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[-2.0, 0.0], [7.0, 6.0], [3.0, 3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, -7.0, 1.0])+(1.-msk_arg1)*numpy.array([0.0, 6.0, -3.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[2.0, -4.0, -7.0], [-6.0, -5.0, -4.0]], [[5.0, 1.0, -6.0], [-6.0, 0.0, -6.0]]], [[[6.0, 6.0, 
+4.0], [3.0, -3.0, -2.0]], [[4.0, -2.0, 7.0], [2.0, 1.0, 4.0]]], [[[-7.0, 5.0, -5.0], [1.0, 0.0, -3.0]], [[0.0, 7.0, 4.0], 
+[-6.0, -5.0, 1.0]]], [[[-2.0, -7.0, 4.0], [7.0, -5.0, 0.0]], [[-1.0, 6.0, 2.0], [-7.0, 0.0, 7.0]]], [[[0.0, -2.0, 3.0], [1.0, 
+-2.0, 7.0]], [[-5.0, -5.0, -4.0], [7.0, 3.0, -7.0]]], [[[1.0, 6.0, -6.0], [2.0, 6.0, 1.0]], [[-3.0, -6.0, 0.0], [0.0, -1.0, 
+3.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 1.0, -3.0], [-7.0, -1.0, -4.0]], [[1.0, 0.0, -5.0], [5.0, 1.0, -5.0]]], [[[-5.0, 
+-5.0, -3.0], [-3.0, -5.0, -3.0]], [[-5.0, 3.0, 4.0], [-6.0, 3.0, -1.0]]], [[[2.0, -2.0, 1.0], [6.0, 0.0, 0.0]], [[1.0, -1.0, 
+7.0], [-3.0, -3.0, -2.0]]], [[[-3.0, -5.0, -4.0], [-6.0, 0.0, 0.0]], [[-6.0, -4.0, -5.0], [-5.0, 5.0, -4.0]]], [[[5.0, -5.0, 
+1.0], [5.0, 0.0, 4.0]], [[2.0, 0.0, -6.0], [4.0, -1.0, -7.0]]], [[[0.0, -6.0, -4.0], [2.0, 1.0, -6.0]], [[3.0, -1.0, -6.0], 
+[-2.0, 1.0, -5.0]]]])
+      arg1=Data(numpy.array([5.0, -2.0, 6.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-54.0, -39.0])+(1.-msk_ref)*numpy.array([33.0, 27.0])
+      ref=msk_ref*numpy.array([[[-24.0, -44.0], [-13.0, -66.0]], [[42.0, 9.0], [66.0, 32.0]], [[-75.0, -13.0], [10.0, -14.0]], 
+[[28.0, 45.0], [-5.0, 7.0]], [[22.0, 51.0], [-39.0, -13.0]], [[-43.0, 4.0], [-3.0, 20.0]]])+(1.-msk_ref)*numpy.array([[[-15.0, 
+-57.0], [-25.0, -7.0]], [[-33.0, -23.0], [-7.0, -42.0]], [[20.0, 30.0], [49.0, -21.0]], [[-29.0, -30.0], [-52.0, -59.0]], 
+[[41.0, 49.0], [-26.0, -20.0]], [[-12.0, -28.0], [-19.0, -42.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[[5.0, 1.0], [0.0, 0.0], [-4.0, -6.0]], [[7.0, -4.0], [-3.0, -7.0], [6.0, 3.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[6.0, -5.0, -4.0], [-5.0, 3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[5.0, 0.0, 0.0], [6.0, 7.0, 
--2.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[2.0, 5.0], [5.0, -2.0]], [[-3.0, 5.0], [0.0, -1.0]], [[-3.0, -2.0], [-6.0, 0.0]], [[7.0, 
+-3.0], [-4.0, 7.0]], [[-3.0, 7.0], [3.0, -6.0]], [[-5.0, -4.0], [-4.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 1.0], [2.0, 
+-2.0]], [[-7.0, -5.0], [-4.0, -5.0]], [[1.0, -4.0], [-7.0, 0.0]], [[-7.0, 6.0], [2.0, -2.0]], [[-4.0, 1.0], [-1.0, 5.0]], 
+[[-5.0, 2.0], [2.0, -1.0]]])
+      arg1=Data(numpy.array([5.0, 5.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-22.0, 17.0])+(1.-msk_ref)*numpy.array([34.0, -74.0])
+      ref=msk_ref*numpy.array([[[[10.0, 10.0], [25.0, 25.0]], [[25.0, 25.0], [-10.0, -10.0]]], [[[-15.0, -15.0], [25.0, 25.0]], 
+[[0.0, 0.0], [-5.0, -5.0]]], [[[-15.0, -15.0], [-10.0, -10.0]], [[-30.0, -30.0], [0.0, 0.0]]], [[[35.0, 35.0], [-15.0, -15.0]], 
+[[-20.0, -20.0], [35.0, 35.0]]], [[[-15.0, -15.0], [35.0, 35.0]], [[15.0, 15.0], [-30.0, -30.0]]], [[[-25.0, -25.0], [-20.0, 
+-20.0]], [[-20.0, -20.0], [35.0, 35.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -20.0], [5.0, 5.0]], [[10.0, 10.0], [-10.0, 
+-10.0]]], [[[-35.0, -35.0], [-25.0, -25.0]], [[-20.0, -20.0], [-25.0, -25.0]]], [[[5.0, 5.0], [-20.0, -20.0]], [[-35.0, -35.0], 
+[0.0, 0.0]]], [[[-35.0, -35.0], [30.0, 30.0]], [[10.0, 10.0], [-10.0, -10.0]]], [[[-20.0, -20.0], [5.0, 5.0]], [[-5.0, -5.0], 
+[25.0, 25.0]]], [[[-25.0, -25.0], [10.0, 10.0]], [[10.0, 10.0], [-5.0, -5.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank3_offset3(self):
-      arg0=numpy.array([[[[-5.0, -1.0], [-3.0, 1.0], [-5.0, 4.0]], [[2.0, -6.0], [4.0, 6.0], [3.0, -1.0]], [[3.0, -4.0], [1.0, 
-7.0], [-3.0, -5.0]], [[-3.0, -6.0], [4.0, -6.0], [-5.0, 1.0]]], [[[0.0, 0.0], [1.0, 1.0], [-3.0, 6.0]], [[7.0, -1.0], [0.0, 
--4.0], [4.0, 2.0]], [[4.0, 6.0], [3.0, 5.0], [-7.0, -2.0]], [[1.0, 1.0], [0.0, -6.0], [3.0, -3.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, 5.0, 1.0], [3.0, 0.0, -2.0], [0.0, 1.0, -7.0], [3.0, -3.0, -3.0]], [[5.0, 6.0, 0.0], 
-[6.0, -4.0, -6.0], [5.0, 3.0, -3.0], [-1.0, -6.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, -5.0, 0.0], [-7.0, 7.0, 7.0], 
-[-2.0, -4.0, 1.0], [0.0, 3.0, -1.0]], [[7.0, 3.0, 2.0], [4.0, 4.0, -6.0], [7.0, -7.0, -1.0], [-1.0, 0.0, -7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-6.0, -7.0, 7.0], [4.0, -2.0, -5.0]], [[5.0, 7.0, 0.0], [5.0, -3.0, 6.0]]], [[[5.0, 0.0, 
+-6.0], [-3.0, -2.0, 7.0]], [[0.0, -6.0, -1.0], [-6.0, 0.0, -3.0]]], [[[2.0, 2.0, 4.0], [-3.0, -5.0, -5.0]], [[-5.0, 2.0, 0.0], 
+[-6.0, 0.0, -2.0]]], [[[-7.0, -2.0, -5.0], [-6.0, 0.0, -4.0]], [[-1.0, 5.0, -7.0], [-2.0, 0.0, 0.0]]], [[[-6.0, -2.0, -5.0], 
+[4.0, 4.0, -1.0]], [[-5.0, 7.0, 4.0], [4.0, -5.0, 2.0]]], [[[1.0, -7.0, -1.0], [0.0, -7.0, -4.0]], [[-5.0, 5.0, -6.0], [-2.0, 
+0.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -3.0, 7.0], [-3.0, 0.0, -6.0]], [[4.0, 4.0, 3.0], [5.0, -7.0, 4.0]]], [[[2.0, 
+-3.0, -1.0], [2.0, 3.0, -3.0]], [[-2.0, -5.0, -1.0], [-1.0, 7.0, -1.0]]], [[[0.0, -3.0, 5.0], [-2.0, 1.0, 7.0]], [[0.0, 2.0, 
+0.0], [7.0, 2.0, 0.0]]], [[[0.0, 7.0, 2.0], [7.0, -3.0, -5.0]], [[1.0, 3.0, -6.0], [-4.0, -6.0, -5.0]]], [[[-2.0, 6.0, 5.0], 
+[1.0, -2.0, -2.0]], [[2.0, 1.0, 1.0], [-2.0, -4.0, -2.0]]], [[[0.0, 4.0, 3.0], [-7.0, -2.0, -4.0]], [[-4.0, 5.0, 3.0], [-3.0, 
+-5.0, -7.0]]]])
+      arg1=Data(numpy.array([[-7.0, 3.0, -4.0], [2.0, 4.0, -4.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([72.0, 101.0])+(1.-msk_ref)*numpy.array([22.0, 35.0])
+      ref=msk_ref*numpy.array([[[[-7.0, -68.0], [-14.0, 20.0]], [[-14.0, 38.0], [-68.0, -26.0]]], [[[-11.0, 34.0], [-13.0, 
+-42.0]], [[-14.0, -20.0], [54.0, 0.0]]], [[[-24.0, -4.0], [26.0, -6.0]], [[41.0, -2.0], [50.0, -4.0]]], [[[63.0, -2.0], [58.0, 
+4.0]], [[50.0, 46.0], [14.0, -4.0]]], [[[56.0, 0.0], [-12.0, 28.0]], [[40.0, 2.0], [-51.0, -20.0]]], [[[-24.0, -22.0], [-5.0, 
+-12.0]], [[74.0, 34.0], [14.0, -4.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, -52.0], [45.0, 18.0]], [[-28.0, 12.0], [-72.0, 
+-34.0]]], [[[-19.0, -4.0], [7.0, 28.0]], [[3.0, -20.0], [32.0, 30.0]]], [[[-29.0, -32.0], [-11.0, -28.0]], [[6.0, 8.0], [-43.0, 
+22.0]]], [[[13.0, 20.0], [-38.0, 22.0]], [[26.0, 38.0], [30.0, -12.0]]], [[[12.0, 0.0], [-5.0, 2.0]], [[-15.0, 4.0], [10.0, 
+-12.0]]], [[[0.0, 4.0], [59.0, -6.0]], [[31.0, 0.0], [34.0, 2.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank1_offset0(self):
-      arg0=numpy.array([0.0, -3.0])
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[0.0, 2.0], [-2.0, -6.0]], [[2.0, 0.0], [4.0, -3.0]], [[0.0, 6.0], [1.0, -6.0]], [[3.0, 
+-5.0], [-2.0, -5.0]], [[6.0, -6.0], [-7.0, -4.0]], [[0.0, -4.0], [-5.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 6.0], [-3.0, 
+-1.0]], [[1.0, -6.0], [0.0, 6.0]], [[0.0, 0.0], [2.0, 1.0]], [[-1.0, 4.0], [6.0, 0.0]], [[6.0, 6.0], [-6.0, -2.0]], [[-3.0, 
+0.0], [4.0, 0.0]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([7.0, 4.0])+(1.-msk_arg1)*numpy.array([0.0, 4.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*(3.0)+(1-msk_arg1)*(6.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, 0.0], [-21.0, -12.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0], [0.0, -12.0]])
+      ref=msk_ref*numpy.array([[[0.0, 6.0], [-6.0, -18.0]], [[6.0, 0.0], [12.0, -9.0]], [[0.0, 18.0], [3.0, -18.0]], [[9.0, 
+-15.0], [-6.0, -15.0]], [[18.0, -18.0], [-21.0, -12.0]], [[0.0, -12.0], [-15.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[-42.0, 
+36.0], [-18.0, -6.0]], [[6.0, -36.0], [0.0, 36.0]], [[0.0, 0.0], [12.0, 6.0]], [[-6.0, 24.0], [36.0, 0.0]], [[36.0, 36.0], 
+[-36.0, -12.0]], [[-18.0, 0.0], [24.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[3.0, -7.0], [0.0, -6.0], [2.0, -2.0]])
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank1_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, 7.0, -6.0], [-2.0, 7.0, -1.0]], [[7.0, -3.0, -3.0], [-7.0, 3.0, -3.0]]], [[[-1.0, 0.0, 
+-6.0], [2.0, 1.0, 3.0]], [[-5.0, -4.0, 6.0], [-1.0, 2.0, -2.0]]], [[[3.0, 1.0, -6.0], [7.0, -6.0, 6.0]], [[0.0, -1.0, -3.0], 
+[-7.0, -3.0, 4.0]]], [[[3.0, -2.0, -1.0], [-6.0, -7.0, 0.0]], [[-5.0, 5.0, 3.0], [-4.0, 1.0, -5.0]]], [[[-7.0, -6.0, 7.0], 
+[4.0, 3.0, 0.0]], [[-1.0, -4.0, -7.0], [3.0, -3.0, 0.0]]], [[[0.0, -7.0, 7.0], [2.0, -7.0, 6.0]], [[-1.0, -4.0, -2.0], [0.0, 
+4.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 1.0, 0.0], [-6.0, -7.0, -3.0]], [[3.0, 0.0, 2.0], [-5.0, 7.0, -1.0]]], 
+[[[3.0, 3.0, 6.0], [6.0, -2.0, 1.0]], [[0.0, 6.0, 7.0], [4.0, -7.0, 1.0]]], [[[-4.0, 4.0, 3.0], [3.0, -1.0, -7.0]], [[-3.0, 
+-2.0, -6.0], [-4.0, 0.0, 5.0]]], [[[-1.0, -7.0, 6.0], [2.0, -7.0, -2.0]], [[-6.0, -1.0, -7.0], [-2.0, 6.0, 0.0]]], [[[0.0, 
+-2.0, -3.0], [-1.0, 0.0, -7.0]], [[0.0, -4.0, 7.0], [-1.0, 6.0, -6.0]]], [[[-1.0, 7.0, 0.0], [0.0, 1.0, -5.0]], [[1.0, -2.0, 
+5.0], [-7.0, 0.0, 0.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, -3.0], [-2.0, 0.0], [-6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -7.0], [-5.0, 
-4.0], [5.0, -2.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      arg1=msk_arg1*numpy.array([0.0, 6.0, 2.0])+(1.-msk_arg1)*numpy.array([0.0, -1.0, -3.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, -13.0], [52.0, 25.0]])+(1.-msk_ref)*numpy.array([[1.0, -25.0], [41.0, 29.0]])
+      ref=msk_ref*numpy.array([[[30.0, 40.0], [-24.0, 12.0]], [[-12.0, 12.0], [-12.0, 8.0]], [[-6.0, -24.0], [-12.0, -10.0]], 
+[[-14.0, -42.0], [36.0, -4.0]], [[-22.0, 18.0], [-38.0, -18.0]], [[-28.0, -30.0], [-28.0, 
+10.0]]])+(1.-msk_ref)*numpy.array([[[-1.0, 16.0], [-6.0, -4.0]], [[-21.0, -1.0], [-27.0, 4.0]], [[-13.0, 22.0], [20.0, -15.0]], 
+[[-11.0, 13.0], [22.0, -6.0]], [[11.0, 21.0], [-17.0, 12.0]], [[-7.0, 14.0], [-13.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[[3.0, 3.0], [6.0, 0.0], [0.0, -6.0]], [[-6.0, 2.0], [6.0, -4.0], [7.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, -7.0], [-4.0, -5.0], [-1.0, 6.0]], [[6.0, -2.0], [5.0, -4.0], [-5.0, 
-0.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 1.0], [7.0, 5.0], [-5.0, -2.0]], [[2.0, -4.0], [4.0, 0.0], [0.0, 7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank1_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[3.0, 0.0], [3.0, -2.0]], [[2.0, 0.0], [-6.0, 3.0]], [[0.0, 7.0], [0.0, -4.0]], [[-4.0, 
+-5.0], [-3.0, -4.0]], [[2.0, 6.0], [2.0, 2.0]], [[1.0, 1.0], [0.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, 2.0], [0.0, 
+4.0]], [[-2.0, 1.0], [-6.0, -2.0]], [[-3.0, 4.0], [0.0, -3.0]], [[5.0, -2.0], [-5.0, 1.0]], [[3.0, 2.0], [2.0, -3.0]], [[-5.0, 
+3.0], [7.0, 0.0]]])
+      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg1=msk_arg1*numpy.array([-6.0, -1.0])+(1.-msk_arg1)*numpy.array([4.0, -4.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-77.0, -63.0], [16.0, -45.0]])+(1.-msk_ref)*numpy.array([[45.0, 106.0], [9.0, -35.0]])
+      ref=msk_ref*numpy.array([[[[-18.0, -3.0], [0.0, 0.0]], [[-18.0, -3.0], [12.0, 2.0]]], [[[-12.0, -2.0], [0.0, 0.0]], 
+[[36.0, 6.0], [-18.0, -3.0]]], [[[0.0, 0.0], [-42.0, -7.0]], [[0.0, 0.0], [24.0, 4.0]]], [[[24.0, 4.0], [30.0, 5.0]], [[18.0, 
+3.0], [24.0, 4.0]]], [[[-12.0, -2.0], [-36.0, -6.0]], [[-12.0, -2.0], [-12.0, -2.0]]], [[[-6.0, -1.0], [-6.0, -1.0]], [[0.0, 
+0.0], [-36.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[-8.0, 8.0], [8.0, -8.0]], [[0.0, 0.0], [16.0, -16.0]]], [[[-8.0, 8.0], 
+[4.0, -4.0]], [[-24.0, 24.0], [-8.0, 8.0]]], [[[-12.0, 12.0], [16.0, -16.0]], [[0.0, 0.0], [-12.0, 12.0]]], [[[20.0, -20.0], 
+[-8.0, 8.0]], [[-20.0, 20.0], [4.0, -4.0]]], [[[12.0, -12.0], [8.0, -8.0]], [[8.0, -8.0], [-12.0, 12.0]]], [[[-20.0, 20.0], 
+[12.0, -12.0]], [[28.0, -28.0], [0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not arg0.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank4_offset3(self):
-      arg0=numpy.array([[[[5.0, -7.0], [7.0, 5.0], [7.0, 7.0]], [[-5.0, -1.0], [-5.0, -4.0], [-3.0, -7.0]], [[-6.0, 3.0], [1.0, 
--3.0], [5.0, 3.0]], [[3.0, 7.0], [-6.0, 2.0], [-5.0, 5.0]]], [[[0.0, 0.0], [-6.0, 3.0], [-3.0, 1.0]], [[0.0, -7.0], [5.0, 
--3.0], [0.0, 3.0]], [[0.0, 2.0], [-3.0, 0.0], [-7.0, 1.0]], [[2.0, 0.0], [-2.0, 3.0], [-6.0, 4.0]]]])
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank2_offset1(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-2.0, -2.0, 6.0], [6.0, 6.0, 2.0]], [[-4.0, 2.0, 3.0], [4.0, -6.0, 6.0]]], [[[6.0, 2.0, 
+3.0], [2.0, -4.0, -1.0]], [[-6.0, -7.0, 1.0], [-6.0, 3.0, -7.0]]], [[[0.0, 3.0, 0.0], [-2.0, 4.0, -4.0]], [[2.0, 0.0, -1.0], 
+[1.0, 2.0, -4.0]]], [[[0.0, 4.0, 0.0], [2.0, -2.0, -7.0]], [[1.0, 2.0, -5.0], [-4.0, -6.0, -7.0]]], [[[6.0, -1.0, -4.0], [5.0, 
+7.0, 5.0]], [[-1.0, -2.0, 7.0], [7.0, 3.0, -5.0]]], [[[-5.0, 5.0, 3.0], [-6.0, -2.0, 0.0]], [[-3.0, 0.0, 6.0], [1.0, 4.0, 
+-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 4.0, 6.0], [4.0, 5.0, -2.0]], [[-3.0, 4.0, 7.0], [4.0, -7.0, 2.0]]], [[[3.0, 7.0, 
+0.0], [0.0, -7.0, 0.0]], [[5.0, -6.0, -3.0], [0.0, -5.0, -1.0]]], [[[3.0, 0.0, 1.0], [2.0, -3.0, -3.0]], [[-2.0, 2.0, 1.0], 
+[-4.0, 7.0, -2.0]]], [[[4.0, 1.0, -4.0], [-5.0, -1.0, -2.0]], [[7.0, -2.0, 2.0], [-4.0, -6.0, 1.0]]], [[[5.0, 2.0, -3.0], [2.0, 
+5.0, 4.0]], [[-1.0, -4.0, -4.0], [-6.0, 3.0, 7.0]]], [[[4.0, -2.0, 5.0], [-6.0, -1.0, -5.0]], [[4.0, 0.0, 2.0], [2.0, -7.0, 
+-4.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-6.0, 6.0], [-6.0, 0.0], [1.0, 0.0]], [[3.0, -4.0], [-4.0, 7.0], [0.0, 1.0]], [[-1.0, 3.0], 
-[7.0, -5.0], [3.0, 6.0]], [[2.0, -4.0], [-5.0, -3.0], [0.0, 1.0]]], [[[-2.0, 2.0], [0.0, -6.0], [0.0, -4.0]], [[5.0, 6.0], 
-[-5.0, -4.0], [0.0, -2.0]], [[-1.0, -1.0], [3.0, -6.0], [7.0, -5.0]], [[1.0, -6.0], [4.0, 3.0], [-5.0, 
-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 1.0], [-5.0, 4.0], [6.0, -6.0]], [[1.0, 1.0], [0.0, -3.0], [1.0, 7.0]], [[-7.0, 
-0.0], [3.0, 2.0], [-1.0, 3.0]], [[1.0, 5.0], [4.0, 6.0], [7.0, 6.0]]], [[[5.0, -4.0], [-4.0, 1.0], [-4.0, 6.0]], [[-1.0, -5.0], 
-[-6.0, 2.0], [7.0, -2.0]], [[-5.0, -4.0], [2.0, -4.0], [-6.0, 4.0]], [[-5.0, -2.0], [-3.0, 1.0], [6.0, -1.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      arg1=msk_arg1*numpy.array([[7.0, -1.0, 6.0], [1.0, 0.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-5.0, 5.0, 1.0], [1.0, 6.0, 
+2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-55.0, 41.0], [-2.0, -88.0]])+(1.-msk_ref)*numpy.array([[-25.0, -84.0], [69.0, 40.0]])
+      ref=msk_ref*numpy.array([[[[24.0, -26.0], [48.0, -2.0]], [[-12.0, -16.0], [70.0, -20.0]]], [[[58.0, -6.0], [12.0, 6.0]], 
+[[-29.0, -10.0], [-87.0, 22.0]]], [[[-3.0, 0.0], [-42.0, 14.0]], [[8.0, 6.0], [-19.0, 17.0]]], [[[-4.0, 0.0], [-26.0, 30.0]], 
+[[-25.0, 21.0], [-64.0, 24.0]]], [[[19.0, 22.0], [58.0, -15.0]], [[37.0, -29.0], [16.0, 27.0]]], [[[-22.0, -17.0], [-40.0, 
+-6.0]], [[15.0, -27.0], [-27.0, 21.0]]]])+(1.-msk_ref)*numpy.array([[[[26.0, 36.0], [3.0, 30.0]], [[42.0, 35.0], [-53.0, 
+-34.0]]], [[[20.0, 45.0], [-35.0, -42.0]], [[-58.0, -37.0], [-26.0, -32.0]]], [[[-14.0, 5.0], [-28.0, -22.0]], [[21.0, 12.0], 
+[53.0, 34.0]]], [[[-19.0, 2.0], [18.0, -15.0]], [[-43.0, -1.0], [-9.0, -38.0]]], [[[-18.0, 11.0], [19.0, 40.0]], [[-19.0, 
+-33.0], [52.0, 26.0]]], [[[-25.0, 2.0], [20.0, -22.0]], [[-18.0, 8.0], [-49.0, -48.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank2_offset0(self):
-      arg0=numpy.array([-4.0, -3.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 3.0, -3.0, -7.0, 4.0], [6.0, 0.0, -4.0, -2.0, -2.0], [-6.0, 2.0, 2.0, 7.0, -5.0], 
-[-3.0, 2.0, 0.0, 1.0, -7.0]])+(1.-msk_arg1)*numpy.array([[0.0, 5.0, 2.0, -6.0, 7.0], [-2.0, -5.0, 7.0, -2.0, 6.0], [-4.0, 3.0, 
-7.0, -7.0, -7.0], [-5.0, -5.0, 0.0, -2.0, 4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorTransposedProduct_expandedData_rank4_float_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-3.0, 6.0, 0.0, 0.0], [6.0, 2.0, 6.0, -7.0], [5.0, -7.0, -2.0, -2.0]], [[-1.0, 5.0, 4.0, 
+-2.0], [7.0, 0.0, 4.0, -5.0], [-3.0, 1.0, 5.0, 4.0]]], [[[4.0, 7.0, -5.0, -6.0], [5.0, 4.0, 6.0, -1.0], [-4.0, 1.0, 7.0, 6.0]], 
+[[0.0, 0.0, -1.0, 0.0], [0.0, -4.0, 6.0, 4.0], [0.0, 6.0, 3.0, -4.0]]], [[[7.0, 6.0, 0.0, 6.0], [-7.0, 2.0, 6.0, 0.0], [-4.0, 
+2.0, 4.0, -1.0]], [[-2.0, -5.0, 5.0, 6.0], [-1.0, 6.0, -7.0, 7.0], [6.0, 6.0, 1.0, 
+-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 4.0, -2.0, -5.0], [7.0, 2.0, 0.0, 0.0], [7.0, 1.0, -2.0, -2.0]], [[7.0, 7.0, 5.0, 
+4.0], [-5.0, -6.0, 5.0, 6.0], [1.0, 4.0, 1.0, 2.0]]], [[[-2.0, -1.0, -3.0, -7.0], [0.0, -6.0, -1.0, 7.0], [3.0, 4.0, -3.0, 
+0.0]], [[-7.0, 5.0, -6.0, -4.0], [1.0, 4.0, 7.0, 0.0], [-7.0, -2.0, -3.0, 2.0]]], [[[3.0, -7.0, -6.0, -6.0], [-2.0, 6.0, 0.0, 
+-7.0], [-6.0, -4.0, 6.0, -5.0]], [[-7.0, 0.0, 0.0, 6.0], [0.0, -6.0, 5.0, 0.0], [-1.0, -2.0, -2.0, 5.0]]]])
+      arg1=-6.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[16.0, -12.0, 12.0, 28.0, -16.0], [-24.0, 0.0, 16.0, 8.0, 8.0], [24.0, -8.0, -8.0, -28.0, 
-20.0], [12.0, -8.0, 0.0, -4.0, 28.0]], [[12.0, -9.0, 9.0, 21.0, -12.0], [-18.0, 0.0, 12.0, 6.0, 6.0], [18.0, -6.0, -6.0, -21.0, 
-15.0], [9.0, -6.0, 0.0, -3.0, 21.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -20.0, -8.0, 24.0, -28.0], [8.0, 20.0, -28.0, 8.0, 
--24.0], [16.0, -12.0, -28.0, 28.0, 28.0], [20.0, 20.0, 0.0, 8.0, -16.0]], [[0.0, -15.0, -6.0, 18.0, -21.0], [6.0, 15.0, -21.0, 
-6.0, -18.0], [12.0, -9.0, -21.0, 21.0, 21.0], [15.0, 15.0, 0.0, 6.0, -12.0]]])
+      ref=msk_ref*numpy.array([[[[18.0, -36.0, -0.0, -0.0], [-36.0, -12.0, -36.0, 42.0], [-30.0, 42.0, 12.0, 12.0]], [[6.0, 
+-30.0, -24.0, 12.0], [-42.0, -0.0, -24.0, 30.0], [18.0, -6.0, -30.0, -24.0]]], [[[-24.0, -42.0, 30.0, 36.0], [-30.0, -24.0, 
+-36.0, 6.0], [24.0, -6.0, -42.0, -36.0]], [[-0.0, -0.0, 6.0, -0.0], [-0.0, 24.0, -36.0, -24.0], [-0.0, -36.0, -18.0, 24.0]]], 
+[[[-42.0, -36.0, -0.0, -36.0], [42.0, -12.0, -36.0, -0.0], [24.0, -12.0, -24.0, 6.0]], [[12.0, 30.0, -30.0, -36.0], [6.0, 
+-36.0, 42.0, -42.0], [-36.0, -36.0, -6.0, 24.0]]]])+(1.-msk_ref)*numpy.array([[[[6.0, -24.0, 12.0, 30.0], [-42.0, -12.0, -0.0, 
+-0.0], [-42.0, -6.0, 12.0, 12.0]], [[-42.0, -42.0, -30.0, -24.0], [30.0, 36.0, -30.0, -36.0], [-6.0, -24.0, -6.0, -12.0]]], 
+[[[12.0, 6.0, 18.0, 42.0], [-0.0, 36.0, 6.0, -42.0], [-18.0, -24.0, 18.0, -0.0]], [[42.0, -30.0, 36.0, 24.0], [-6.0, -24.0, 
+-42.0, -0.0], [42.0, 12.0, 18.0, -12.0]]], [[[-18.0, 42.0, 36.0, 36.0], [12.0, -36.0, -0.0, 42.0], [36.0, 24.0, -36.0, 30.0]], 
+[[42.0, -0.0, -0.0, -36.0], [-0.0, 36.0, -30.0, -0.0], [6.0, 12.0, 12.0, -30.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank3_offset1(self):
-      arg0=numpy.array([[-1.0, 4.0], [-4.0, 1.0], [-6.0, -1.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, -2.0, 3.0, -7.0, 1.0], [4.0, -6.0, 4.0, -1.0, -1.0], [2.0, -7.0, -3.0, -3.0, -4.0], 
-[7.0, 1.0, 3.0, 0.0, 4.0]], [[0.0, 6.0, -5.0, 6.0, -3.0], [1.0, -6.0, -1.0, -6.0, 4.0], [-5.0, 4.0, 1.0, 7.0, 4.0], [-2.0, 
--5.0, 1.0, 3.0, 0.0]], [[3.0, 3.0, 0.0, 3.0, 4.0], [-6.0, 0.0, 6.0, 4.0, -5.0], [-3.0, -1.0, -1.0, -3.0, 2.0], [4.0, 6.0, -6.0, 
--2.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 7.0, 6.0, 6.0, -1.0], [2.0, -5.0, -1.0, -3.0, -1.0], [1.0, 1.0, -7.0, -5.0, 
-5.0], [1.0, -1.0, 4.0, 6.0, -4.0]], [[0.0, -6.0, -5.0, -2.0, -3.0], [-6.0, 6.0, 0.0, 7.0, -6.0], [1.0, 0.0, -5.0, 5.0, 1.0], 
-[-3.0, -1.0, 2.0, -6.0, 7.0]], [[6.0, 2.0, -4.0, -6.0, 1.0], [7.0, -1.0, -6.0, -5.0, -7.0], [-1.0, 0.0, 7.0, 3.0, -1.0], [-2.0, 
--2.0, 0.0, 2.0, 3.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[-7.0, 7.0, 3.0, 0.0], [-1.0, 2.0, 4.0, 2.0], [2.0, -6.0, -5.0, 0.0]], [[-1.0, -1.0, 7.0, 
+-1.0], [2.0, -4.0, 7.0, 2.0], [2.0, 7.0, -2.0, -5.0]]], [[[-6.0, 0.0, 1.0, 3.0], [4.0, 7.0, 2.0, 6.0], [-2.0, 4.0, 5.0, 7.0]], 
+[[1.0, 1.0, 7.0, 0.0], [3.0, 1.0, 0.0, -3.0], [2.0, -5.0, 3.0, 2.0]]], [[[3.0, -4.0, -2.0, -5.0], [-5.0, 3.0, -6.0, 1.0], [4.0, 
+0.0, 5.0, -4.0]], [[0.0, -7.0, 7.0, -1.0], [-2.0, -4.0, -2.0, 2.0], [-1.0, -3.0, -5.0, 
+0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 7.0, -6.0, -5.0], [4.0, 5.0, -1.0, 0.0], [-4.0, 4.0, 7.0, -5.0]], [[6.0, -3.0, 
+0.0, 3.0], [4.0, 4.0, -1.0, 1.0], [5.0, -2.0, 0.0, 3.0]]], [[[4.0, 6.0, -6.0, -1.0], [-7.0, 7.0, -7.0, 4.0], [6.0, -5.0, 1.0, 
+1.0]], [[7.0, -2.0, -7.0, -5.0], [-2.0, -2.0, -5.0, 6.0], [3.0, -6.0, -6.0, -6.0]]], [[[6.0, 5.0, 1.0, -5.0], [0.0, -2.0, -5.0, 
+-4.0], [1.0, -3.0, -6.0, 0.0]], [[-1.0, -3.0, 5.0, -6.0], [1.0, -5.0, -2.0, -5.0], [3.0, 4.0, 6.0, -7.0]]]])
+      arg1=numpy.array(0.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, -40.0, 17.0, -35.0, -13.0], [28.0, 30.0, -36.0, 1.0, 15.0], [36.0, -3.0, 5.0, -7.0, 
--24.0], [-23.0, -17.0, 29.0, 0.0, -46.0]], [[-27.0, -5.0, 7.0, -25.0, -3.0], [23.0, -30.0, 9.0, -14.0, 5.0], [6.0, -23.0, 
--10.0, -2.0, -14.0], [22.0, -7.0, 19.0, 5.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 5.0, 38.0, 38.0, 7.0], [-20.0, -13.0, 
-37.0, 5.0, 67.0], [1.0, -1.0, -15.0, -33.0, -3.0], [23.0, 17.0, -12.0, 6.0, -42.0]], [[-30.0, 20.0, 23.0, 28.0, -8.0], [-5.0, 
--13.0, 2.0, 0.0, -3.0], [6.0, 4.0, -40.0, -18.0, 22.0], [3.0, -3.0, 18.0, 16.0, -12.0]]])
+      ref=msk_ref*numpy.array([[[[-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, -0.0, 0.0, 
+-0.0], [0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]], [[[-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]], 
+[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0]]], [[[0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 
+0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, 
+0.0], [0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]]], [[[0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]], 
+[[0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, -0.0], 
+[0.0, -0.0, -0.0, 0.0]], [[-0.0, -0.0, 0.0, -0.0], [0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[[-7.0, -1.0], [-7.0, 0.0], [-1.0, 2.0]], [[-1.0, -3.0], [6.0, 0.0], [1.0, -5.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, 2.0, -1.0, -5.0, -1.0], [-7.0, -3.0, -5.0, 3.0, 5.0], [-2.0, -3.0, -4.0, 0.0, 1.0], 
-[-5.0, 0.0, 3.0, 1.0, 3.0]], [[2.0, 3.0, 7.0, -4.0, -4.0], [-7.0, 2.0, 1.0, -7.0, 2.0], [3.0, -2.0, 7.0, 6.0, -1.0], [-2.0, 
-1.0, 5.0, -5.0, -1.0]], [[0.0, -5.0, -7.0, -6.0, 6.0], [-1.0, 0.0, -3.0, -4.0, 0.0], [0.0, -4.0, -3.0, 4.0, -3.0], [-2.0, -1.0, 
--5.0, 1.0, 5.0]]], [[[4.0, -3.0, -6.0, 5.0, 0.0], [7.0, -2.0, -6.0, -5.0, 0.0], [-2.0, -7.0, 1.0, -7.0, -4.0], [-7.0, 7.0, 2.0, 
--4.0, -3.0]], [[0.0, -4.0, 0.0, -4.0, 7.0], [7.0, 4.0, -1.0, 0.0, -7.0], [4.0, 7.0, 7.0, 1.0, -3.0], [1.0, 5.0, 5.0, -6.0, 
--2.0]], [[-5.0, 2.0, 3.0, -7.0, 2.0], [-6.0, 2.0, 1.0, -1.0, 5.0], [0.0, -5.0, 1.0, -7.0, -5.0], [6.0, 6.0, -2.0, -1.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, 0.0, -7.0, 4.0, -4.0], [0.0, -5.0, 0.0, -1.0, 0.0], [-3.0, -3.0, 0.0, 7.0, -6.0], 
-[-2.0, 1.0, -1.0, -3.0, -5.0]], [[-3.0, -1.0, -1.0, 0.0, 0.0], [-5.0, -5.0, 4.0, -7.0, 0.0], [4.0, 5.0, -4.0, -7.0, -6.0], 
-[5.0, 7.0, -1.0, 7.0, 3.0]], [[0.0, -1.0, -2.0, -1.0, 2.0], [6.0, -3.0, -5.0, -4.0, -1.0], [3.0, 0.0, -2.0, -4.0, -4.0], [0.0, 
--6.0, 0.0, 3.0, 3.0]]], [[[-2.0, 3.0, -4.0, -4.0, 6.0], [-2.0, 5.0, 2.0, 7.0, 5.0], [-4.0, 6.0, 3.0, -2.0, 7.0], [-3.0, -7.0, 
--7.0, -3.0, -7.0]], [[-4.0, -3.0, -3.0, 7.0, 0.0], [1.0, 4.0, -2.0, -6.0, -4.0], [1.0, -5.0, -7.0, -6.0, 7.0], [-2.0, 2.0, 
--4.0, -3.0, 6.0]], [[5.0, -3.0, -5.0, -3.0, 0.0], [3.0, -2.0, -6.0, 0.0, -3.0], [3.0, -7.0, 5.0, 6.0, 0.0], [-7.0, 7.0, 0.0, 
--1.0, -5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[7.0, 0.0, 3.0, -2.0], [0.0, 0.0, 1.0, 3.0], [-3.0, -1.0, 7.0, 4.0]], [[-6.0, 5.0, -7.0, 
+5.0], [6.0, 1.0, -1.0, 3.0], [4.0, 3.0, 0.0, 4.0]]], [[[-3.0, -2.0, 5.0, -4.0], [3.0, 3.0, -1.0, 0.0], [4.0, -3.0, -1.0, 6.0]], 
+[[-1.0, -6.0, 4.0, 6.0], [7.0, 7.0, 4.0, 0.0], [-2.0, -1.0, -2.0, 6.0]]], [[[-3.0, -4.0, -1.0, 6.0], [0.0, 2.0, -3.0, 5.0], 
+[1.0, -3.0, -6.0, -3.0]], [[5.0, -2.0, -7.0, 0.0], [0.0, 4.0, 7.0, 2.0], [-1.0, 4.0, 1.0, 
+-7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 6.0, 5.0, -1.0], [-5.0, -2.0, 2.0, 6.0], [7.0, 7.0, -2.0, 2.0]], [[-7.0, 0.0, 4.0, 
+4.0], [-7.0, -2.0, -5.0, 5.0], [-1.0, -3.0, -7.0, -3.0]]], [[[4.0, -5.0, -6.0, 2.0], [2.0, 0.0, -5.0, -3.0], [-6.0, -2.0, 2.0, 
+-6.0]], [[-5.0, -5.0, -5.0, 0.0], [0.0, -3.0, 5.0, 7.0], [-6.0, -1.0, 6.0, 5.0]]], [[[-4.0, -5.0, 6.0, 4.0], [0.0, 6.0, -6.0, 
+-7.0], [3.0, -3.0, 0.0, 6.0]], [[3.0, 0.0, 7.0, 7.0], [-3.0, 0.0, -5.0, 0.0], [-3.0, 0.0, 4.0, 7.0]]]])
+      arg1=Data(5.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-9.0, -49.0, -26.0, 33.0, 73.0], [128.0, 35.0, 32.0, 36.0, -86.0], [19.0, 83.0, 24.0, -40.0, 
--16.0], [70.0, 23.0, -25.0, -6.0, -28.0]], [[15.0, -13.0, -10.0, 13.0, 3.0], [14.0, -1.0, 12.0, 9.0, -30.0], [8.0, 41.0, -10.0, 
-64.0, 30.0], [-8.0, -53.0, -9.0, 18.0, 16.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, -16.0, 39.0, 16.0, 20.0], [40.0, 90.0, 
--43.0, 17.0, -31.0], [3.0, -57.0, -10.0, -24.0, 123.0], [-37.0, -24.0, -3.0, -47.0, 49.0]], [[-23.0, 4.0, 40.0, 21.0, -10.0], 
-[3.0, -6.0, 14.0, -28.0, -2.0], [6.0, 20.0, -38.0, -39.0, -23.0], [46.0, -27.0, 22.0, 23.0, 57.0]]])
+      ref=msk_ref*numpy.array([[[[35.0, 0.0, 15.0, -10.0], [0.0, 0.0, 5.0, 15.0], [-15.0, -5.0, 35.0, 20.0]], [[-30.0, 25.0, 
+-35.0, 25.0], [30.0, 5.0, -5.0, 15.0], [20.0, 15.0, 0.0, 20.0]]], [[[-15.0, -10.0, 25.0, -20.0], [15.0, 15.0, -5.0, 0.0], 
+[20.0, -15.0, -5.0, 30.0]], [[-5.0, -30.0, 20.0, 30.0], [35.0, 35.0, 20.0, 0.0], [-10.0, -5.0, -10.0, 30.0]]], [[[-15.0, -20.0, 
+-5.0, 30.0], [0.0, 10.0, -15.0, 25.0], [5.0, -15.0, -30.0, -15.0]], [[25.0, -10.0, -35.0, 0.0], [0.0, 20.0, 35.0, 10.0], [-5.0, 
+20.0, 5.0, -35.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, 30.0, 25.0, -5.0], [-25.0, -10.0, 10.0, 30.0], [35.0, 35.0, -10.0, 
+10.0]], [[-35.0, 0.0, 20.0, 20.0], [-35.0, -10.0, -25.0, 25.0], [-5.0, -15.0, -35.0, -15.0]]], [[[20.0, -25.0, -30.0, 10.0], 
+[10.0, 0.0, -25.0, -15.0], [-30.0, -10.0, 10.0, -30.0]], [[-25.0, -25.0, -25.0, 0.0], [0.0, -15.0, 25.0, 35.0], [-30.0, -5.0, 
+30.0, 25.0]]], [[[-20.0, -25.0, 30.0, 20.0], [0.0, 30.0, -30.0, -35.0], [15.0, -15.0, 0.0, 30.0]], [[15.0, 0.0, 35.0, 35.0], 
+[-15.0, 0.0, -25.0, 0.0], [-15.0, 0.0, 20.0, 35.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank1_expandedData_rank3_offset0(self):
-      arg0=numpy.array([0.0, -3.0])
+   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank0_offset0(self):
+      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      arg0=msk_arg0*numpy.array([[[[6.0, -3.0, -3.0, -3.0], [1.0, -2.0, 6.0, -6.0], [4.0, -1.0, -7.0, 7.0]], [[0.0, 6.0, 6.0, 
+5.0], [2.0, 7.0, 6.0, 6.0], [-3.0, -5.0, 1.0, -3.0]]], [[[-2.0, -1.0, 0.0, 0.0], [0.0, 7.0, 1.0, 4.0], [-6.0, -4.0, -3.0, 
+-1.0]], [[0.0, 6.0, 4.0, 1.0], [-6.0, -5.0, -6.0, 1.0], [-6.0, -5.0, 5.0, 0.0]]], [[[4.0, -1.0, -2.0, -7.0], [-6.0, 5.0, -1.0, 
+-4.0], [2.0, -3.0, -4.0, 2.0]], [[0.0, 1.0, 5.0, 4.0], [1.0, -1.0, -5.0, 1.0], [6.0, -3.0, -4.0, 
+3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -3.0, -5.0, -5.0], [-1.0, 7.0, -3.0, 3.0], [0.0, 2.0, 0.0, 3.0]], [[3.0, 6.0, 5.0, 
+-4.0], [-4.0, 6.0, -4.0, 0.0], [0.0, 0.0, 0.0, -3.0]]], [[[-7.0, -4.0, -6.0, 7.0], [-6.0, 3.0, -5.0, -2.0], [-5.0, 4.0, 4.0, 
+7.0]], [[-2.0, 4.0, 3.0, 4.0], [-5.0, 0.0, 0.0, 7.0], [4.0, -3.0, -3.0, 2.0]]], [[[2.0, 3.0, 7.0, -5.0], [4.0, -5.0, 7.0, 4.0], 
+[-6.0, -3.0, 1.0, 0.0]], [[-3.0, 5.0, 0.0, 4.0], [-1.0, -7.0, 6.0, -3.0], [-6.0, -6.0, -6.0, 7.0]]]])
       msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[6.0, 0.0], [0.0, 5.0]], [[7.0, -3.0], [5.0, -5.0]], [[-6.0, 0.0], [-6.0, 0.0]], [[-1.0, 
-1.0], [-5.0, 6.0]], [[-6.0, -4.0], [6.0, 6.0]], [[3.0, 6.0], [2.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -5.0], [-5.0, 
--7.0]], [[5.0, 0.0], [6.0, -3.0]], [[0.0, 5.0], [2.0, -5.0]], [[5.0, -6.0], [0.0, -3.0]], [[-3.0, 7.0], [6.0, -6.0]], [[4.0, 
-3.0], [-6.0, -7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-18.0, 0.0], [0.0, -15.0]], [[-21.0, 9.0], [-15.0, 15.0]], 
-[[18.0, 0.0], [18.0, 0.0]], [[3.0, -3.0], [15.0, -18.0]], [[18.0, 12.0], [-18.0, -18.0]], [[-9.0, -18.0], [-6.0, 
-21.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-3.0, 15.0], [15.0, 21.0]], [[-15.0, 0.0], [-18.0, 9.0]], 
-[[0.0, -15.0], [-6.0, 15.0]], [[-15.0, 18.0], [0.0, 9.0]], [[9.0, -21.0], [-18.0, 18.0]], [[-12.0, -9.0], [18.0, 21.0]]]])
+      ref=msk_ref*numpy.array([[[[6.0, -3.0, -3.0, -3.0], [1.0, -2.0, 6.0, -6.0], [4.0, -1.0, -7.0, 7.0]], [[0.0, 6.0, 6.0, 
+5.0], [2.0, 7.0, 6.0, 6.0], [-3.0, -5.0, 1.0, -3.0]]], [[[-2.0, -1.0, 0.0, 0.0], [0.0, 7.0, 1.0, 4.0], [-6.0, -4.0, -3.0, 
+-1.0]], [[0.0, 6.0, 4.0, 1.0], [-6.0, -5.0, -6.0, 1.0], [-6.0, -5.0, 5.0, 0.0]]], [[[4.0, -1.0, -2.0, -7.0], [-6.0, 5.0, -1.0, 
+-4.0], [2.0, -3.0, -4.0, 2.0]], [[0.0, 1.0, 5.0, 4.0], [1.0, -1.0, -5.0, 1.0], [6.0, -3.0, -4.0, 
+3.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, -21.0, -35.0, -35.0], [-7.0, 49.0, -21.0, 21.0], [0.0, 14.0, 0.0, 21.0]], [[21.0, 
+42.0, 35.0, -28.0], [-28.0, 42.0, -28.0, 0.0], [0.0, 0.0, 0.0, -21.0]]], [[[-49.0, -28.0, -42.0, 49.0], [-42.0, 21.0, -35.0, 
+-14.0], [-35.0, 28.0, 28.0, 49.0]], [[-14.0, 28.0, 21.0, 28.0], [-35.0, 0.0, 0.0, 49.0], [28.0, -21.0, -21.0, 14.0]]], [[[14.0, 
+21.0, 49.0, -35.0], [28.0, -35.0, 49.0, 28.0], [-42.0, -21.0, 7.0, 0.0]], [[-21.0, 35.0, 0.0, 28.0], [-7.0, -49.0, 42.0, 
+-21.0], [-42.0, -42.0, -42.0, 49.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+
+
+
+
+
+
+
+
+
+ 
+  
+
+
+ 
+  
+ 
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank4_offset1(self):
-      arg0=numpy.array([[-1.0, 3.0], [-2.0, 4.0], [-4.0, -3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -3.0], [7.0, 1.0]], [[3.0, -7.0], [-3.0, 1.0]], [[2.0, 7.0], [1.0, -1.0]], [[-4.0, 
-4.0], [0.0, -2.0]], [[3.0, 0.0], [6.0, -7.0]], [[-4.0, -4.0], [0.0, 4.0]]], [[[-3.0, 2.0], [3.0, 5.0]], [[1.0, -3.0], [0.0, 
--1.0]], [[-1.0, -1.0], [5.0, 6.0]], [[0.0, 1.0], [-1.0, 5.0]], [[-7.0, -7.0], [0.0, -6.0]], [[7.0, -5.0], [4.0, 2.0]]], [[[0.0, 
-7.0], [3.0, -4.0]], [[0.0, 4.0], [5.0, 7.0]], [[-2.0, -3.0], [-1.0, 4.0]], [[-6.0, 0.0], [0.0, -4.0]], [[7.0, -5.0], [-1.0, 
--6.0]], [[-7.0, -4.0], [0.0, -3.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 6.0], [3.0, 5.0]], [[7.0, 6.0], [-4.0, 5.0]], [[-4.0, 
-0.0], [-2.0, -1.0]], [[1.0, -1.0], [-2.0, 3.0]], [[1.0, 0.0], [-6.0, -5.0]], [[2.0, 2.0], [-6.0, -6.0]]], [[[-1.0, -4.0], [2.0, 
-5.0]], [[-6.0, 2.0], [0.0, 2.0]], [[-7.0, 1.0], [-6.0, -3.0]], [[6.0, -3.0], [7.0, -5.0]], [[-3.0, 0.0], [-3.0, -5.0]], [[0.0, 
--4.0], [0.0, 2.0]]], [[[2.0, 0.0], [0.0, 4.0]], [[-4.0, -3.0], [0.0, 5.0]], [[3.0, -2.0], [7.0, 0.0]], [[-3.0, -2.0], [-3.0, 
-5.0]], [[-2.0, 4.0], [-3.0, 0.0]], [[1.0, 2.0], [5.0, 0.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[8.0, -29.0], [-25.0, 5.0]], [[-5.0, -3.0], [-17.0, -27.0]], [[8.0, 7.0], [-7.0, -27.0]], 
-[[28.0, -6.0], [2.0, 8.0]], [[-17.0, 34.0], [-2.0, 43.0]], [[18.0, 30.0], [-8.0, 4.0]]], [[[-18.0, -22.0], [24.0, 35.0]], 
-[[13.0, -45.0], [-24.0, -22.0]], [[8.0, 26.0], [26.0, 9.0]], [[6.0, 16.0], [-4.0, 26.0]], [[-40.0, -13.0], [21.0, -27.0]], 
-[[37.0, -20.0], [16.0, 29.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, 2.0], [-7.0, -31.0]], [[21.0, 2.0], [4.0, -29.0]], [[6.0, 
-6.0], [-14.0, 7.0]], [[-1.0, 15.0], [0.0, -13.0]], [[13.0, -16.0], [24.0, 15.0]], [[-6.0, -2.0], [-14.0, 2.0]]], [[[-10.0, 
-2.0], [17.0, 23.0]], [[9.0, 35.0], [-12.0, 8.0]], [[-49.0, 10.0], [-51.0, -15.0]], [[36.0, -9.0], [31.0, -26.0]], [[-3.0, 
--12.0], [-21.0, -35.0]], [[3.0, -16.0], [-33.0, -10.0]]]])
+   def test_generalTensorProduct_float_rank0_taggedData_rank0_offset0(self):
+      arg0=0.0
+      arg1=Data(3.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(0.0,self.functionspace)
+      ref.setTaggedValue(1,0.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_float_rank0_taggedData_rank1_offset0(self):
+      arg0=-4.0
+      arg1=Data(numpy.array([0.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, 0.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, -24.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-16.0, -0.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_float_rank0_offset0(self):
-      arg0=numpy.array([[-2.0, -5.0, 1.0, -3.0, -2.0], [3.0, 1.0, -5.0, 4.0, -5.0], [-1.0, -2.0, -7.0, 4.0, 3.0], [0.0, 5.0, 
-3.0, 3.0, 5.0]])
-      arg1=0.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-0.0, -0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_float_rank0_taggedData_rank2_offset0(self):
+      arg0=7.0
+      arg1=Data(numpy.array([[5.0, -6.0, 7.0, 7.0, -7.0], [-6.0, 2.0, -4.0, -7.0, 5.0], [-2.0, -3.0, 6.0, -6.0, 1.0], [1.0, 
+-6.0, -4.0, -3.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, -7.0, -6.0, 3.0, 7.0], [-1.0, -6.0, 4.0, 7.0, -7.0], [-6.0, -6.0, 1.0, -5.0, 
+-6.0], [2.0, 0.0, 3.0, -3.0, 2.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[35.0, -42.0, 49.0, 49.0, -49.0], [-42.0, 14.0, -28.0, -49.0, 35.0], [-14.0, -21.0, 42.0, -42.0, 
+7.0], [7.0, -42.0, -28.0, -21.0, -35.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[35.0, -49.0, -42.0, 21.0, 49.0], [-7.0, -42.0, 28.0, 49.0, -49.0], [-42.0, -42.0, 7.0, 
+-35.0, -42.0], [14.0, 0.0, 21.0, -21.0, 14.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank0_offset0(self):
-      arg0=numpy.array([[4.0, 0.0, -1.0, -6.0, -4.0], [-7.0, 0.0, -4.0, -4.0, 4.0], [-5.0, 0.0, 3.0, -6.0, 2.0], [1.0, 7.0, 
--2.0, 6.0, 4.0]])
-      arg1=numpy.array(-5.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-20.0, -0.0, 5.0, 30.0, 20.0], [35.0, -0.0, 20.0, 20.0, -20.0], [25.0, -0.0, -15.0, 30.0, -10.0], 
-[-5.0, -35.0, 10.0, -30.0, -20.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_float_rank0_taggedData_rank3_offset0(self):
+      arg0=-1.0
+      arg1=Data(numpy.array([[[6.0, -3.0], [6.0, -3.0]], [[4.0, 0.0], [-5.0, 7.0]], [[3.0, 1.0], [1.0, -5.0]], [[2.0, 0.0], 
+[6.0, 7.0]], [[5.0, 5.0], [0.0, -1.0]], [[-6.0, 1.0], [3.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[5.0, 1.0], [4.0, -1.0]], [[-4.0, 4.0], [0.0, -1.0]], [[-4.0, 7.0], [0.0, 3.0]], 
+[[-4.0, -3.0], [-7.0, -2.0]], [[3.0, -1.0], [6.0, -4.0]], [[-5.0, 0.0], [3.0, -7.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-6.0, 3.0], [-6.0, 3.0]], [[-4.0, -0.0], [5.0, -7.0]], [[-3.0, -1.0], [-1.0, 5.0]], [[-2.0, 
+-0.0], [-6.0, -7.0]], [[-5.0, -5.0], [-0.0, 1.0]], [[6.0, -1.0], [-3.0, 2.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-5.0, -1.0], [-4.0, 1.0]], [[4.0, -4.0], [-0.0, 1.0]], [[4.0, -7.0], [-0.0, -3.0]], 
+[[4.0, 3.0], [7.0, 2.0]], [[-3.0, 1.0], [-6.0, 4.0]], [[5.0, -0.0], [-3.0, 7.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank1_offset1(self):
-      arg0=numpy.array([[[-4.0, -6.0, 0.0, 0.0, -5.0], [2.0, 5.0, 7.0, -2.0, 7.0], [-1.0, 7.0, 1.0, -5.0, -4.0], [-2.0, 4.0, 
-5.0, -3.0, 5.0]], [[2.0, 0.0, -6.0, -7.0, -2.0], [-6.0, 5.0, 4.0, -2.0, 4.0], [-1.0, 6.0, -3.0, -2.0, 6.0], [-1.0, 2.0, 6.0, 
-1.0, 1.0]], [[7.0, -6.0, -3.0, 5.0, -6.0], [-5.0, 6.0, -7.0, -6.0, 4.0], [-1.0, 7.0, -7.0, -4.0, 4.0], [-7.0, -3.0, 0.0, 6.0, 
-0.0]]])
-      arg1=numpy.array([-7.0, 0.0, 0.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[28.0, 42.0, 0.0, 0.0, 35.0], [-14.0, -35.0, -49.0, 14.0, -49.0], [7.0, -49.0, -7.0, 35.0, 28.0], [14.0, 
--28.0, -35.0, 21.0, -35.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_float_rank0_taggedData_rank4_offset0(self):
+      arg0=-4.0
+      arg1=Data(numpy.array([[[[2.0, 2.0, 7.0, 3.0], [-7.0, 0.0, 2.0, -4.0], [-4.0, -5.0, -2.0, 0.0]], [[-1.0, -1.0, -1.0, 
+1.0], [2.0, -7.0, 0.0, 3.0], [6.0, 6.0, -5.0, -4.0]]], [[[-3.0, 7.0, 1.0, -4.0], [5.0, -4.0, 0.0, 5.0], [5.0, 5.0, -7.0, 
+-3.0]], [[-5.0, -2.0, -5.0, 6.0], [4.0, 1.0, -6.0, -7.0], [5.0, -6.0, -6.0, -3.0]]], [[[1.0, 5.0, 1.0, -5.0], [1.0, 0.0, -4.0, 
+-2.0], [-3.0, 0.0, -3.0, 1.0]], [[-4.0, -1.0, -7.0, 7.0], [0.0, -4.0, -1.0, -1.0], [5.0, -1.0, -4.0, 
+2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, 3.0, -1.0, 0.0], [-2.0, 0.0, -3.0, 3.0], [6.0, -3.0, -7.0, -6.0]], [[3.0, 
+-3.0, 0.0, -2.0], [-7.0, 1.0, -2.0, -4.0], [-3.0, 4.0, 2.0, 4.0]]], [[[4.0, 0.0, -4.0, 0.0], [-1.0, -5.0, -7.0, 7.0], [-1.0, 
+-1.0, 3.0, -3.0]], [[-5.0, -1.0, 4.0, -3.0], [4.0, -6.0, 1.0, -5.0], [5.0, 3.0, 0.0, -7.0]]], [[[-4.0, 4.0, -3.0, 4.0], [7.0, 
+0.0, 0.0, -4.0], [-7.0, 3.0, -4.0, 0.0]], [[1.0, -7.0, 5.0, -2.0], [-3.0, -7.0, -6.0, 5.0], [3.0, 5.0, -7.0, -7.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-8.0, -8.0, -28.0, -12.0], [28.0, -0.0, -8.0, 16.0], [16.0, 20.0, 8.0, -0.0]], [[4.0, 4.0, 4.0, 
+-4.0], [-8.0, 28.0, -0.0, -12.0], [-24.0, -24.0, 20.0, 16.0]]], [[[12.0, -28.0, -4.0, 16.0], [-20.0, 16.0, -0.0, -20.0], 
+[-20.0, -20.0, 28.0, 12.0]], [[20.0, 8.0, 20.0, -24.0], [-16.0, -4.0, 24.0, 28.0], [-20.0, 24.0, 24.0, 12.0]]], [[[-4.0, -20.0, 
+-4.0, 20.0], [-4.0, -0.0, 16.0, 8.0], [12.0, -0.0, 12.0, -4.0]], [[16.0, 4.0, 28.0, -28.0], [-0.0, 16.0, 4.0, 4.0], [-20.0, 
+4.0, 16.0, -8.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-12.0, -12.0, 4.0, -0.0], [8.0, -0.0, 12.0, -12.0], [-24.0, 12.0, 28.0, 24.0]], 
+[[-12.0, 12.0, -0.0, 8.0], [28.0, -4.0, 8.0, 16.0], [12.0, -16.0, -8.0, -16.0]]], [[[-16.0, -0.0, 16.0, -0.0], [4.0, 20.0, 
+28.0, -28.0], [4.0, 4.0, -12.0, 12.0]], [[20.0, 4.0, -16.0, 12.0], [-16.0, 24.0, -4.0, 20.0], [-20.0, -12.0, -0.0, 28.0]]], 
+[[[16.0, -16.0, 12.0, -16.0], [-28.0, -0.0, -0.0, 16.0], [28.0, -12.0, 16.0, -0.0]], [[-4.0, 28.0, -20.0, 8.0], [12.0, 28.0, 
+24.0, -20.0], [-12.0, -20.0, 28.0, 28.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3,2,3,4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank2_offset2(self):
-      arg0=numpy.array([[[[-7.0, 3.0, 3.0, -2.0, -5.0], [0.0, 7.0, -6.0, 0.0, 4.0], [-2.0, -3.0, -7.0, 0.0, 2.0], [-3.0, -2.0, 
-6.0, 4.0, -1.0]], [[-5.0, -5.0, -2.0, -1.0, 3.0], [1.0, 4.0, 0.0, -7.0, -4.0], [0.0, -5.0, 7.0, 0.0, -4.0], [-1.0, 4.0, 0.0, 
--2.0, -3.0]], [[-4.0, 5.0, -2.0, 6.0, 0.0], [-2.0, 1.0, 7.0, -5.0, -6.0], [4.0, 0.0, 3.0, 0.0, -5.0], [5.0, -7.0, -5.0, 5.0, 
-0.0]]], [[[-7.0, 6.0, -5.0, -1.0, -5.0], [2.0, -6.0, 7.0, -2.0, 3.0], [-3.0, 1.0, -2.0, -2.0, 6.0], [-6.0, 6.0, -5.0, 5.0, 
--7.0]], [[7.0, 5.0, -7.0, 0.0, -7.0], [-7.0, 0.0, 4.0, -7.0, 0.0], [-3.0, 1.0, -5.0, -3.0, -6.0], [6.0, 2.0, 1.0, 5.0, -5.0]], 
-[[-1.0, 2.0, 7.0, -4.0, 0.0], [3.0, 5.0, -4.0, -2.0, -4.0], [-2.0, 0.0, 0.0, 0.0, 0.0], [0.0, -2.0, -1.0, 2.0, 5.0]]]])
-      arg1=numpy.array([[-1.0, 6.0, -5.0], [-1.0, -5.0, 0.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[-31.0, -89.0, 35.0, -33.0, 63.0], [49.0, 18.0, -56.0, 20.0, -1.0], [0.0, -33.0, 61.0, 17.0, 23.0], 
-[-52.0, 45.0, 19.0, -71.0, 15.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_taggedData_rank0_offset0(self):
+      arg0=numpy.array(-7.0)
+      arg1=Data(4.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-28.0,self.functionspace)
+      ref.setTaggedValue(1,-35.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank1_offset0(self):
-      arg0=numpy.array([[3.0, -5.0, -2.0, 1.0, -6.0], [3.0, 0.0, 4.0, 6.0, -2.0], [1.0, -5.0, -4.0, 0.0, 5.0], [7.0, 0.0, -2.0, 
--2.0, 0.0]])
-      arg1=numpy.array([-2.0, 0.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-6.0, 0.0], [10.0, 0.0], [4.0, 0.0], [-2.0, 0.0], [12.0, 0.0]], [[-6.0, 0.0], [0.0, 0.0], [-8.0, 0.0], 
-[-12.0, 0.0], [4.0, 0.0]], [[-2.0, 0.0], [10.0, 0.0], [8.0, 0.0], [0.0, 0.0], [-10.0, 0.0]], [[-14.0, 0.0], [0.0, 0.0], [4.0, 
-0.0], [4.0, 0.0], [0.0, 0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_taggedData_rank1_offset1(self):
+      arg0=numpy.array([-2.0, -6.0, 6.0])
+      arg1=Data(numpy.array([2.0, 1.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, 5.0, -1.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-28.0,self.functionspace)
+      ref.setTaggedValue(1,-36.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank2_offset1(self):
-      arg0=numpy.array([[[-3.0, -5.0, 0.0, 5.0, 4.0], [2.0, 4.0, -3.0, -6.0, 0.0], [-1.0, -4.0, 3.0, 3.0, 4.0], [5.0, 4.0, 
--3.0, 5.0, -2.0]], [[6.0, -5.0, 5.0, -3.0, 2.0], [4.0, 6.0, 0.0, 4.0, -1.0], [-4.0, 6.0, 3.0, 3.0, -2.0], [1.0, -4.0, -2.0, 
-6.0, -6.0]], [[-5.0, 7.0, -7.0, 2.0, 0.0], [-7.0, -7.0, -3.0, -4.0, 4.0], [5.0, -7.0, -2.0, -5.0, 0.0], [-1.0, 7.0, 0.0, 5.0, 
--3.0]]])
-      arg1=numpy.array([[3.0, 2.0], [2.0, 0.0], [1.0, -3.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-2.0, 9.0], [-18.0, -31.0], [3.0, 21.0], [11.0, 4.0], [16.0, 8.0]], [[7.0, 25.0], [17.0, 29.0], 
-[-12.0, 3.0], [-14.0, 0.0], [2.0, -12.0]], [[-6.0, -17.0], [-7.0, 13.0], [13.0, 12.0], [10.0, 21.0], [8.0, 8.0]], [[16.0, 
-13.0], [11.0, -13.0], [-13.0, -6.0], [32.0, -5.0], [-21.0, 5.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[6.0, -6.0, -1.0], [4.0, 4.0, -4.0]])
+      arg1=Data(numpy.array([[-3.0, 3.0, -7.0], [1.0, 0.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, 7.0, 1.0], [7.0, -3.0, 5.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-33.0,self.functionspace)
+      ref.setTaggedValue(1,-41.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank3_taggedData_rank3_offset3(self):
+      arg0=numpy.array([[[7.0, -3.0, -5.0], [0.0, -5.0, 5.0], [0.0, 2.0, -6.0], [-7.0, 3.0, 0.0]], [[-3.0, 4.0, 5.0], [5.0, 
+-1.0, 6.0], [6.0, 2.0, 0.0], [-4.0, 5.0, -1.0]]])
+      arg1=Data(numpy.array([[[6.0, 1.0, -3.0], [6.0, 3.0, -1.0], [-3.0, -7.0, -7.0], [2.0, 0.0, 2.0]], [[4.0, 6.0, -1.0], 
+[7.0, 5.0, 7.0], [2.0, 0.0, 2.0], [0.0, -3.0, 7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 6.0, -3.0], [5.0, 7.0, 5.0], [-3.0, 3.0, 7.0], [-2.0, -4.0, 7.0]], [[0.0, 3.0, 
+7.0], [-4.0, 4.0, 0.0], [2.0, -7.0, 7.0], [0.0, 4.0, -4.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(117.0,self.functionspace)
+      ref.setTaggedValue(1,40.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank3_offset2(self):
-      arg0=numpy.array([[[[2.0, -4.0, 2.0, -6.0, 4.0], [-6.0, 4.0, 7.0, 0.0, 1.0], [-6.0, 3.0, 2.0, -2.0, 2.0], [5.0, 1.0, 1.0, 
-0.0, 7.0]], [[3.0, 0.0, -4.0, -3.0, -3.0], [0.0, 0.0, 5.0, 0.0, -5.0], [-6.0, 1.0, 7.0, -2.0, 2.0], [-3.0, -3.0, 0.0, 2.0, 
--3.0]], [[4.0, 0.0, 3.0, 2.0, -4.0], [-1.0, -3.0, 5.0, -5.0, -4.0], [6.0, 6.0, -7.0, -4.0, 7.0], [-4.0, 5.0, 3.0, -1.0, 5.0]]], 
-[[[-1.0, 7.0, 2.0, -7.0, 0.0], [2.0, -4.0, -2.0, 1.0, -3.0], [-4.0, 6.0, 3.0, 6.0, 0.0], [-1.0, -7.0, -3.0, 2.0, 6.0]], [[5.0, 
-7.0, -3.0, 0.0, 4.0], [-1.0, 3.0, -1.0, 2.0, -7.0], [-5.0, 4.0, 4.0, -2.0, 6.0], [5.0, -4.0, 4.0, 0.0, -4.0]], [[-6.0, 3.0, 
-4.0, -2.0, 0.0], [-2.0, 4.0, -2.0, 7.0, 2.0], [-3.0, 0.0, 0.0, 0.0, -2.0], [3.0, -2.0, 0.0, 0.0, -7.0]]]])
-      arg1=numpy.array([[[1.0, 6.0], [-3.0, -2.0], [3.0, 7.0]], [[-7.0, 0.0], [1.0, -1.0], [-5.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[47.0, 17.0], [-61.0, -25.0], [-14.0, 52.0], [68.0, -20.0], [5.0, -2.0]], [[-14.0, -46.0], [6.0, 8.0], 
-[30.0, 64.0], [-55.0, -23.0], [8.0, -1.0]], [[68.0, 17.0], [-20.0, 54.0], [-57.0, -55.0], [-52.0, -34.0], [33.0, 47.0]], 
-[[-1.0, 9.0], [80.0, 47.0], [35.0, 23.0], [-23.0, -11.0], [20.0, 73.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_taggedData_rank4_offset4(self):
+      arg0=numpy.array([[[[6.0, -4.0], [0.0, 7.0], [0.0, -1.0]], [[4.0, 4.0], [7.0, -1.0], [6.0, 5.0]]], [[[4.0, -6.0], [-3.0, 
+-4.0], [-4.0, -6.0]], [[-1.0, -1.0], [1.0, 3.0], [3.0, -5.0]]], [[[-3.0, 0.0], [6.0, 4.0], [-4.0, 3.0]], [[-3.0, 5.0], [-2.0, 
+6.0], [-2.0, -3.0]]], [[[5.0, 5.0], [0.0, 6.0], [1.0, 6.0]], [[2.0, -3.0], [-1.0, 4.0], [7.0, -5.0]]]])
+      arg1=Data(numpy.array([[[[1.0, 0.0], [6.0, -1.0], [6.0, 5.0]], [[-1.0, 0.0], [-1.0, 1.0], [6.0, 7.0]]], [[[7.0, 4.0], 
+[2.0, 4.0], [6.0, -6.0]], [[-3.0, -4.0], [-6.0, -3.0], [3.0, -1.0]]], [[[5.0, -6.0], [-1.0, 1.0], [-4.0, -7.0]], [[3.0, -3.0], 
+[3.0, 0.0], [7.0, 7.0]]], [[[0.0, -1.0], [5.0, 7.0], [0.0, -5.0]], [[-4.0, 0.0], [0.0, -4.0], [0.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -1.0], [5.0, 2.0], [-7.0, 0.0]], [[-6.0, 0.0], [1.0, 1.0], [-4.0, 7.0]]], 
+[[[3.0, -3.0], [2.0, 1.0], [0.0, 6.0]], [[-4.0, 6.0], [0.0, 1.0], [1.0, 1.0]]], [[[7.0, -5.0], [4.0, -5.0], [-3.0, -7.0]], 
+[[-5.0, 3.0], [0.0, -5.0], [0.0, -5.0]]], [[[-1.0, 0.0], [5.0, -1.0], [2.0, 0.0]], [[-7.0, 3.0], [7.0, -1.0], [7.0, -4.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-61.0,self.functionspace)
+      ref.setTaggedValue(1,27.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_array_rank2_offset0(self):
-      arg0=numpy.array([[4.0, -6.0, -1.0, -2.0, -5.0], [-2.0, -3.0, -7.0, 7.0, -5.0], [0.0, -5.0, -1.0, 2.0, 5.0], [4.0, 0.0, 
--3.0, -1.0, 6.0]])
-      arg1=numpy.array([[0.0, 0.0, -4.0, -5.0, -5.0], [-5.0, 1.0, 1.0, -4.0, 3.0], [-4.0, -7.0, -1.0, -3.0, 5.0], [6.0, -3.0, 
--2.0, 6.0, 1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[0.0, 0.0, -16.0, -20.0, -20.0], [-20.0, 4.0, 4.0, -16.0, 12.0], [-16.0, -28.0, -4.0, -12.0, 20.0], 
-[24.0, -12.0, -8.0, 24.0, 4.0]], [[0.0, 0.0, 24.0, 30.0, 30.0], [30.0, -6.0, -6.0, 24.0, -18.0], [24.0, 42.0, 6.0, 18.0, 
--30.0], [-36.0, 18.0, 12.0, -36.0, -6.0]], [[0.0, 0.0, 4.0, 5.0, 5.0], [5.0, -1.0, -1.0, 4.0, -3.0], [4.0, 7.0, 1.0, 3.0, 
--5.0], [-6.0, 3.0, 2.0, -6.0, -1.0]], [[0.0, 0.0, 8.0, 10.0, 10.0], [10.0, -2.0, -2.0, 8.0, -6.0], [8.0, 14.0, 2.0, 6.0, 
--10.0], [-12.0, 6.0, 4.0, -12.0, -2.0]], [[0.0, 0.0, 20.0, 25.0, 25.0], [25.0, -5.0, -5.0, 20.0, -15.0], [20.0, 35.0, 5.0, 
-15.0, -25.0], [-30.0, 15.0, 10.0, -30.0, -5.0]]], [[[0.0, 0.0, 8.0, 10.0, 10.0], [10.0, -2.0, -2.0, 8.0, -6.0], [8.0, 14.0, 
-2.0, 6.0, -10.0], [-12.0, 6.0, 4.0, -12.0, -2.0]], [[0.0, 0.0, 12.0, 15.0, 15.0], [15.0, -3.0, -3.0, 12.0, -9.0], [12.0, 21.0, 
-3.0, 9.0, -15.0], [-18.0, 9.0, 6.0, -18.0, -3.0]], [[0.0, 0.0, 28.0, 35.0, 35.0], [35.0, -7.0, -7.0, 28.0, -21.0], [28.0, 49.0, 
-7.0, 21.0, -35.0], [-42.0, 21.0, 14.0, -42.0, -7.0]], [[0.0, 0.0, -28.0, -35.0, -35.0], [-35.0, 7.0, 7.0, -28.0, 21.0], [-28.0, 
--49.0, -7.0, -21.0, 35.0], [42.0, -21.0, -14.0, 42.0, 7.0]], [[0.0, 0.0, 20.0, 25.0, 25.0], [25.0, -5.0, -5.0, 20.0, -15.0], 
-[20.0, 35.0, 5.0, 15.0, -25.0], [-30.0, 15.0, 10.0, -30.0, -5.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 20.0, 25.0, 25.0], [25.0, -5.0, -5.0, 20.0, -15.0], [20.0, 
-35.0, 5.0, 15.0, -25.0], [-30.0, 15.0, 10.0, -30.0, -5.0]], [[0.0, 0.0, 4.0, 5.0, 5.0], [5.0, -1.0, -1.0, 4.0, -3.0], [4.0, 
-7.0, 1.0, 3.0, -5.0], [-6.0, 3.0, 2.0, -6.0, -1.0]], [[0.0, 0.0, -8.0, -10.0, -10.0], [-10.0, 2.0, 2.0, -8.0, 6.0], [-8.0, 
--14.0, -2.0, -6.0, 10.0], [12.0, -6.0, -4.0, 12.0, 2.0]], [[0.0, 0.0, -20.0, -25.0, -25.0], [-25.0, 5.0, 5.0, -20.0, 15.0], 
-[-20.0, -35.0, -5.0, -15.0, 25.0], [30.0, -15.0, -10.0, 30.0, 5.0]]], [[[0.0, 0.0, -16.0, -20.0, -20.0], [-20.0, 4.0, 4.0, 
--16.0, 12.0], [-16.0, -28.0, -4.0, -12.0, 20.0], [24.0, -12.0, -8.0, 24.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 12.0, 15.0, 15.0], [15.0, -3.0, -3.0, 12.0, 
--9.0], [12.0, 21.0, 3.0, 9.0, -15.0], [-18.0, 9.0, 6.0, -18.0, -3.0]], [[0.0, 0.0, 4.0, 5.0, 5.0], [5.0, -1.0, -1.0, 4.0, 
--3.0], [4.0, 7.0, 1.0, 3.0, -5.0], [-6.0, 3.0, 2.0, -6.0, -1.0]], [[0.0, 0.0, -24.0, -30.0, -30.0], [-30.0, 6.0, 6.0, -24.0, 
-18.0], [-24.0, -42.0, -6.0, -18.0, 30.0], [36.0, -18.0, -12.0, 36.0, 6.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank0_taggedData_rank1_offset0(self):
+      arg0=numpy.array(-7.0)
+      arg1=Data(numpy.array([6.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -1.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-42.0, 14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-14.0, 7.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank3_offset1(self):
-      arg0=numpy.array([[[7.0, -2.0, -2.0, -4.0, 7.0], [-7.0, 0.0, -7.0, 5.0, 3.0], [-5.0, -6.0, -4.0, -3.0, 4.0], [-4.0, -6.0, 
--7.0, 0.0, 0.0]], [[2.0, -7.0, -2.0, 0.0, 5.0], [-3.0, 7.0, -2.0, 7.0, 1.0], [3.0, 7.0, -2.0, 5.0, -7.0], [0.0, 5.0, 0.0, -1.0, 
--5.0]], [[2.0, 1.0, -1.0, -5.0, -7.0], [4.0, 6.0, 4.0, 1.0, 2.0], [2.0, -6.0, -1.0, 4.0, -7.0], [6.0, -6.0, -2.0, -3.0, 3.0]]])
-      arg1=numpy.array([[[2.0, 5.0, -7.0, -6.0, -2.0], [4.0, 1.0, -1.0, 4.0, 3.0], [7.0, -3.0, -5.0, -5.0, 5.0], [-3.0, 5.0, 
-2.0, -5.0, -7.0]], [[0.0, 5.0, -3.0, -7.0, 6.0], [0.0, 4.0, 6.0, -6.0, 0.0], [6.0, 4.0, 0.0, -2.0, -6.0], [5.0, 2.0, 0.0, -3.0, 
-4.0]], [[-3.0, -7.0, -6.0, 6.0, 4.0], [-1.0, -6.0, 7.0, -5.0, 1.0], [-1.0, 0.0, 1.0, 0.0, 0.0], [2.0, 5.0, 4.0, 7.0, 3.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[8.0, 31.0, -67.0, -44.0, 6.0], [26.0, 3.0, 19.0, 6.0, 23.0], [59.0, -13.0, -33.0, -39.0, 23.0], 
-[-7.0, 49.0, 22.0, -27.0, -35.0]], [[-7.0, -52.0, 29.0, 67.0, -34.0], [-9.0, -36.0, -33.0, 29.0, -5.0], [-57.0, -22.0, 11.0, 
-24.0, 32.0], [-27.0, -19.0, 0.0, 38.0, -11.0]], [[-1.0, -13.0, 26.0, 20.0, -12.0], [-7.0, -4.0, -17.0, 9.0, -7.0], [-25.0, 
--2.0, 9.0, 14.0, 2.0], [-6.0, -19.0, -8.0, 9.0, 3.0]], [[7.0, 15.0, 58.0, -6.0, -12.0], [-11.0, 26.0, -31.0, 9.0, -17.0], 
-[-23.0, 12.0, 15.0, 20.0, -20.0], [2.0, -45.0, -28.0, -15.0, 13.0]], [[35.0, 109.0, -22.0, -119.0, -12.0], [35.0, 69.0, -26.0, 
-33.0, 14.0], [86.0, -1.0, -42.0, -45.0, 5.0], [-10.0, 10.0, -14.0, -99.0, -50.0]]], [[[-26.0, -78.0, 34.0, 87.0, 12.0], [-32.0, 
--43.0, 17.0, -30.0, -17.0], [-71.0, 9.0, 39.0, 41.0, -17.0], [14.0, -21.0, 2.0, 72.0, 49.0]], [[-18.0, -7.0, -57.0, -13.0, 
-66.0], [-6.0, -8.0, 84.0, -72.0, 6.0], [36.0, 28.0, 6.0, -14.0, -42.0], [47.0, 44.0, 24.0, 21.0, 46.0]], [[-26.0, -73.0, 31.0, 
-80.0, 18.0], [-32.0, -39.0, 23.0, -36.0, -17.0], [-65.0, 13.0, 39.0, 39.0, -23.0], [19.0, -19.0, 2.0, 69.0, 53.0]], [[7.0, 
-53.0, -62.0, -73.0, 36.0], [19.0, 27.0, 44.0, -27.0, 16.0], [76.0, 13.0, -24.0, -39.0, -17.0], [22.0, 44.0, 14.0, -39.0, 
--4.0]], [[0.0, 6.0, -36.0, -13.0, 8.0], [10.0, -5.0, 17.0, -4.0, 11.0], [25.0, -5.0, -13.0, -17.0, 9.0], [0.0, 27.0, 14.0, 
--4.0, -11.0]]], [[[-16.0, -24.0, 14.0, 21.0, 36.0], [-22.0, -5.0, 37.0, -48.0, -13.0], [-19.0, 27.0, 27.0, 19.0, -43.0], [34.0, 
--9.0, -2.0, 30.0, 53.0]], [[6.0, 47.0, 57.0, -49.0, 30.0], [-18.0, 58.0, 6.0, -36.0, -24.0], [6.0, 46.0, 24.0, 16.0, -72.0], 
-[41.0, -46.0, -36.0, -33.0, 52.0]], [[-5.0, -23.0, 40.0, 32.0, -8.0], [-15.0, -6.0, -15.0, 1.0, -13.0], [-39.0, 4.0, 19.0, 
-24.0, -8.0], [0.0, -29.0, -12.0, 19.0, 17.0]], [[-18.0, -18.0, -18.0, 7.0, 52.0], [-16.0, -7.0, 61.0, -62.0, -5.0], [5.0, 29.0, 
-19.0, 5.0, -45.0], [42.0, 15.0, 10.0, 28.0, 53.0]], [[29.0, 34.0, 35.0, -17.0, -78.0], [23.0, 18.0, -95.0, 93.0, 5.0], [-7.0, 
--40.0, -27.0, -6.0, 62.0], [-61.0, -29.0, -20.0, -48.0, -77.0]]], [[[-26.0, -62.0, -8.0, 60.0, 32.0], [-22.0, -40.0, 46.0, 
--46.0, -6.0], [-34.0, 12.0, 26.0, 20.0, -20.0], [24.0, 10.0, 16.0, 62.0, 46.0]], [[6.0, 37.0, 63.0, -35.0, 18.0], [-18.0, 50.0, 
--6.0, -24.0, -24.0], [-6.0, 38.0, 24.0, 20.0, -60.0], [31.0, -50.0, -36.0, -27.0, 44.0]], [[-8.0, -21.0, 61.0, 30.0, 6.0], 
-[-26.0, 5.0, -7.0, -18.0, -23.0], [-47.0, 21.0, 33.0, 35.0, -35.0], [17.0, -45.0, -22.0, 21.0, 43.0]], [[9.0, 16.0, 21.0, 
--11.0, -18.0], [3.0, 14.0, -27.0, 21.0, -3.0], [-3.0, -4.0, -3.0, 2.0, 6.0], [-11.0, -17.0, -12.0, -18.0, -13.0]], [[-9.0, 
--46.0, -3.0, 53.0, -18.0], [-3.0, -38.0, -9.0, 15.0, 3.0], [-33.0, -20.0, 3.0, 10.0, 30.0], [-19.0, 5.0, 12.0, 36.0, -11.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank1_taggedData_rank2_offset1(self):
+      arg0=numpy.array([-4.0, -3.0, 3.0])
+      arg1=Data(numpy.array([[2.0, 0.0], [0.0, 1.0], [6.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 5.0], [5.0, 1.0], [-7.0, 4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([10.0, 0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-48.0, -11.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank4_offset2(self):
-      arg0=numpy.array([[[[0.0, 7.0, 2.0, 4.0, 5.0], [-6.0, 6.0, 5.0, -3.0, -7.0], [7.0, 0.0, -4.0, -4.0, 7.0], [3.0, -6.0, 
-7.0, 0.0, -5.0]], [[5.0, 0.0, 3.0, -5.0, 1.0], [2.0, 3.0, 7.0, 0.0, 7.0], [-5.0, 5.0, 7.0, 5.0, 0.0], [6.0, -6.0, 4.0, -6.0, 
--3.0]], [[-3.0, 3.0, -3.0, 0.0, 5.0], [0.0, -5.0, -2.0, 4.0, -4.0], [-1.0, -4.0, 7.0, -7.0, -6.0], [-1.0, 6.0, 7.0, 2.0, 
-0.0]]], [[[4.0, 5.0, 5.0, -5.0, 2.0], [-3.0, -4.0, 0.0, -7.0, 0.0], [-7.0, 6.0, -4.0, -6.0, -7.0], [6.0, 3.0, -5.0, 7.0, 4.0]], 
-[[-7.0, 7.0, -3.0, -5.0, -5.0], [4.0, 5.0, 6.0, 4.0, -2.0], [5.0, -6.0, -3.0, -7.0, -4.0], [-4.0, -2.0, -3.0, 1.0, 3.0]], 
-[[-6.0, 1.0, 4.0, 0.0, -3.0], [-1.0, 2.0, -6.0, 2.0, -5.0], [-5.0, -7.0, 5.0, 4.0, 7.0], [3.0, 2.0, -2.0, -7.0, 0.0]]]])
-      arg1=numpy.array([[[[7.0, 1.0, -2.0, -6.0, -5.0], [0.0, 0.0, -6.0, -5.0, -5.0], [5.0, -4.0, 0.0, 7.0, -6.0], [-2.0, 7.0, 
--1.0, 0.0, -1.0]], [[-4.0, -1.0, -5.0, 0.0, 0.0], [-2.0, 0.0, 1.0, 3.0, 2.0], [-3.0, -7.0, -1.0, 7.0, -1.0], [-7.0, 3.0, 5.0, 
--5.0, 7.0]], [[4.0, 5.0, -1.0, -5.0, 0.0], [-4.0, 5.0, 0.0, 3.0, -1.0], [5.0, 0.0, 0.0, 3.0, 2.0], [-4.0, 3.0, 0.0, 2.0, 
-3.0]]], [[[-1.0, 3.0, -2.0, -4.0, 5.0], [-6.0, -3.0, 3.0, 4.0, -6.0], [2.0, 3.0, -6.0, -1.0, -6.0], [5.0, 5.0, -4.0, -5.0, 
--6.0]], [[-2.0, -6.0, -7.0, -2.0, 5.0], [4.0, -4.0, -4.0, -5.0, -1.0], [-5.0, 0.0, -7.0, 2.0, 6.0], [0.0, 0.0, 0.0, -4.0, 
--2.0]], [[2.0, -7.0, 0.0, -3.0, 4.0], [-7.0, -6.0, -6.0, -6.0, 4.0], [6.0, -5.0, 0.0, 2.0, 7.0], [-4.0, 4.0, 0.0, -5.0, 
--7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[[-34.0, 76.0, 19.0, 31.0, -39.0], [-8.0, 37.0, 81.0, 93.0, -28.0], [-23.0, 7.0, 20.0, -4.0, -119.0], 
-[21.0, 2.0, 9.0, 7.0, 58.0]], [[44.0, -12.0, -76.0, -94.0, 29.0], [-21.0, -34.0, -61.0, -47.0, -71.0], [31.0, -18.0, -79.0, 
-69.0, -17.0], [-5.0, 87.0, -27.0, -52.0, -49.0]], [[-1.0, -11.0, -5.0, -23.0, 16.0], [-64.0, -42.0, -6.0, 1.0, -12.0], [35.0, 
--34.0, -12.0, 23.0, -41.0], [-4.0, 55.0, -7.0, -54.0, -42.0]], [[63.0, 24.0, 62.0, 6.0, -70.0], [20.0, 35.0, -24.0, -30.0, 
-5.0], [50.0, 4.0, 70.0, -12.0, -19.0], [2.0, -12.0, -9.0, 70.0, 1.0]], [[53.0, 86.0, 11.0, -44.0, -52.0], [-33.0, 57.0, 15.0, 
-44.0, -47.0], [58.0, -6.0, 22.0, 39.0, -84.0], [-15.0, 51.0, -8.0, 30.0, 36.0]]], [[[-57.0, -34.0, -20.0, 43.0, 31.0], [37.0, 
--1.0, 19.0, 10.0, 44.0], [-68.0, 6.0, -12.0, -19.0, 69.0], [-13.0, -55.0, 28.0, -6.0, 37.0]], [[8.0, -78.0, -49.0, -11.0, 
--17.0], [44.0, -45.0, -77.0, -89.0, 8.0], [-25.0, -67.0, -14.0, 66.0, 19.0], [-41.0, 24.0, 25.0, -35.0, 0.0]], [[-25.0, -6.0, 
--85.0, -14.0, -19.0], [60.0, 2.0, -11.0, -4.0, -39.0], [-72.0, -39.0, -49.0, 78.0, -47.0], [-27.0, 26.0, 30.0, -33.0, 68.0]], 
-[[-2.0, -42.0, -12.0, 12.0, 8.0], [28.0, 13.0, -31.0, -33.0, 57.0], [-17.0, -19.0, 14.0, 10.0, 106.0], [-53.0, -36.0, 31.0, 
-17.0, 35.0]], [[-99.0, 13.0, -3.0, 81.0, 5.0], [29.0, 18.0, 87.0, 84.0, 35.0], [-96.0, 4.0, 7.0, -26.0, -20.0], [1.0, -60.0, 
-42.0, -10.0, 83.0]]], [[[52.0, -9.0, -9.0, -4.0, -65.0], [111.0, 26.0, -58.0, -76.0, -27.0], [-24.0, 11.0, 12.0, 18.0, -2.0], 
-[10.0, -24.0, -4.0, 63.0, 22.0]], [[-44.0, 78.0, 9.0, 29.0, -28.0], [-5.0, 28.0, 89.0, 99.0, -44.0], [-35.0, 18.0, 1.0, -9.0, 
--134.0], [39.0, 5.0, 1.0, -4.0, 48.0]], [[-8.0, -5.0, -5.0, -4.0, 5.0], [-65.0, 29.0, 1.0, 31.0, 74.0], [31.0, -70.0, 38.0, 
-50.0, 72.0], [-109.0, 14.0, 55.0, -14.0, 69.0]], [[-48.0, -48.0, 51.0, 85.0, -29.0], [-2.0, -13.0, 15.0, 1.0, 96.0], [-23.0, 
--57.0, 80.0, -14.0, 27.0], [-45.0, -48.0, 53.0, -1.0, 40.0]], [[54.0, -69.0, 34.0, 3.0, -62.0], [1.0, -35.0, -89.0, -103.0, 
-45.0], [53.0, -84.0, 70.0, 44.0, 13.0], [-53.0, 24.0, 21.0, 4.0, -24.0]]], [[[1.0, 13.0, -19.0, -38.0, 7.0], [-81.0, -25.0, 
-4.0, 26.0, -22.0], [42.0, -51.0, -14.0, 52.0, -65.0], [-26.0, 78.0, 3.0, -61.0, -13.0]], [[11.0, 37.0, 44.0, -8.0, 43.0], 
-[-52.0, 17.0, 35.0, 40.0, 4.0], [46.0, 65.0, 2.0, -69.0, 38.0], [37.0, -19.0, -36.0, 25.0, -46.0]], [[68.0, 55.0, -10.0, -45.0, 
--83.0], [-4.0, 74.0, -29.0, 5.0, -9.0], [51.0, -61.0, 47.0, 93.0, -34.0], [-87.0, 49.0, 33.0, 41.0, 92.0]], [[9.0, 80.0, 7.0, 
--19.0, 12.0], [15.0, 27.0, 53.0, 53.0, -85.0], [-5.0, 98.0, -43.0, -55.0, -75.0], [97.0, -5.0, -58.0, 30.0, -31.0]], [[-33.0, 
--8.0, -4.0, 8.0, 60.0], [-6.0, -24.0, 27.0, 17.0, -8.0], [-23.0, 53.0, -42.0, -54.0, 27.0], [51.0, -24.0, -26.0, -17.0, 
--46.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank2_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[3.0, 2.0, 6.0], [-1.0, 5.0, 0.0]])
+      arg1=Data(numpy.array([[[6.0, 5.0], [0.0, -1.0], [-5.0, -6.0]], [[-3.0, -5.0], [1.0, 3.0], [-6.0, 
+3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 2.0], [2.0, -7.0], [-1.0, 1.0]], [[7.0, 2.0], [-6.0, 3.0], [-2.0, 6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-4.0, -3.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-57.0, 11.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank0_offset0(self):
-      arg0=numpy.array([[7.0, 6.0, 5.0, -5.0, 2.0], [-2.0, -7.0, 6.0, -4.0, 3.0], [-4.0, -2.0, -3.0, 0.0, 0.0], [-7.0, -6.0, 
-3.0, 5.0, 0.0]])
-      arg1=Data(1.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[7.0, 6.0, 5.0, -5.0, 2.0], [-2.0, -7.0, 6.0, -4.0, 3.0], [-4.0, -2.0, -3.0, 0.0, 0.0], [-7.0, 
--6.0, 3.0, 5.0, 0.0]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_taggedData_rank4_offset3(self):
+      arg0=numpy.array([[[-1.0, -2.0, 6.0], [-4.0, -2.0, 0.0], [-4.0, 1.0, 6.0], [6.0, -1.0, -6.0]], [[3.0, 0.0, 5.0], [4.0, 
+-5.0, 6.0], [-1.0, 4.0, -7.0], [-2.0, 3.0, -7.0]]])
+      arg1=Data(numpy.array([[[[5.0, -7.0], [-5.0, 0.0], [-3.0, 1.0]], [[-5.0, -7.0], [6.0, 6.0], [7.0, 6.0]], [[-4.0, 0.0], 
+[-6.0, -7.0], [0.0, -3.0]], [[-4.0, 5.0], [-3.0, 2.0], [-1.0, -5.0]]], [[[5.0, -1.0], [7.0, 1.0], [-7.0, -5.0]], [[2.0, -4.0], 
+[2.0, -6.0], [1.0, 1.0]], [[0.0, 5.0], [0.0, -1.0], [0.0, -5.0]], [[3.0, 7.0], [0.0, 7.0], [1.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, 1.0], [3.0, -3.0], [-6.0, -7.0]], [[2.0, 3.0], [1.0, -5.0], [-3.0, -2.0]], 
+[[0.0, -5.0], [0.0, 5.0], [-5.0, -4.0]], [[3.0, 4.0], [-4.0, 1.0], [-5.0, -5.0]]], [[[1.0, -5.0], [-7.0, 0.0], [-7.0, -1.0]], 
+[[7.0, 1.0], [7.0, -2.0], [3.0, -6.0]], [[7.0, 6.0], [0.0, 1.0], [0.0, 0.0]], [[0.0, -1.0], [7.0, 6.0], [-6.0, -5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-39.0, 87.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([3.0, 26.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank0_taggedData_rank2_offset0(self):
+      arg0=numpy.array(-6.0)
+      arg1=Data(numpy.array([[1.0, -3.0, -2.0, 0.0, 5.0], [0.0, 2.0, -6.0, 5.0, 2.0], [-7.0, -2.0, -1.0, 7.0, -7.0], [-3.0, 
+6.0, 4.0, -4.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, -3.0, 7.0, 5.0, 7.0], [-3.0, 2.0, 0.0, 5.0, -4.0], [4.0, 0.0, 4.0, -3.0, -2.0], 
+[0.0, 0.0, 0.0, 6.0, -1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-6.0, 18.0, 12.0, -0.0, -30.0], [-0.0, -12.0, 36.0, -30.0, -12.0], [42.0, 12.0, 6.0, -42.0, 42.0], 
+[18.0, -36.0, -24.0, 24.0, 12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-6.0, 18.0, -42.0, -30.0, -42.0], [18.0, -12.0, -0.0, -30.0, 24.0], [-24.0, -0.0, 
+-24.0, 18.0, 12.0], [-0.0, -0.0, -0.0, -36.0, 6.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1, axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4,5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank1_offset1(self):
-      arg0=numpy.array([[[-4.0, 7.0, 3.0, 3.0, 0.0], [5.0, 0.0, -1.0, 5.0, 5.0], [-3.0, 7.0, 5.0, -2.0, -2.0], [-3.0, 4.0, 5.0, 
-6.0, 1.0]], [[0.0, 2.0, -6.0, 1.0, 3.0], [3.0, -7.0, -7.0, -2.0, -6.0], [0.0, -6.0, -1.0, -1.0, 6.0], [-5.0, -4.0, 1.0, -6.0, 
-0.0]], [[5.0, -4.0, -6.0, -6.0, -5.0], [4.0, -6.0, -2.0, -1.0, 6.0], [3.0, -7.0, 1.0, 0.0, -4.0], [-6.0, -3.0, -1.0, -4.0, 
-0.0]]])
-      arg1=Data(numpy.array([-6.0, 7.0, 7.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[59.0, -56.0, -102.0, -53.0, -14.0], [19.0, -91.0, -57.0, -51.0, -30.0], [39.0, -133.0, -30.0, 5.0, 
-26.0], [-59.0, -73.0, -30.0, -106.0, -6.0]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_taggedData_rank3_offset1(self):
+      arg0=numpy.array([2.0, 1.0, -3.0])
+      arg1=Data(numpy.array([[[-7.0, 4.0, 6.0, 0.0, 0.0], [4.0, -4.0, -1.0, 7.0, -7.0], [0.0, 1.0, -3.0, 3.0, -4.0], [3.0, 
+-6.0, -6.0, -7.0, -6.0]], [[-7.0, 0.0, 0.0, 1.0, 6.0], [-6.0, -1.0, 5.0, -7.0, 5.0], [-4.0, 2.0, 6.0, 7.0, 0.0], [-1.0, -2.0, 
+-1.0, -4.0, 3.0]], [[-3.0, 4.0, 3.0, -2.0, 0.0], [-3.0, 0.0, 6.0, -2.0, 7.0], [0.0, 3.0, 0.0, 4.0, 6.0], [-1.0, 2.0, 4.0, -3.0, 
+-6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 4.0, -1.0, 0.0, 5.0], [-6.0, 3.0, 3.0, 1.0, 3.0], [2.0, 3.0, -1.0, -6.0, -6.0], 
+[-3.0, -2.0, 4.0, -6.0, 5.0]], [[-3.0, -6.0, 7.0, -6.0, 6.0], [5.0, -7.0, -1.0, -4.0, -2.0], [4.0, -7.0, -3.0, 0.0, -1.0], 
+[-6.0, -1.0, 0.0, 2.0, -6.0]], [[5.0, -3.0, 6.0, 0.0, -3.0], [-7.0, 1.0, 7.0, -5.0, 0.0], [6.0, -6.0, 7.0, -7.0, -1.0], [7.0, 
+-3.0, 2.0, 0.0, -2.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-12.0, -4.0, 3.0, 7.0, 6.0], [11.0, -9.0, -15.0, 13.0, -30.0], [-4.0, -5.0, 0.0, 1.0, -26.0], 
+[8.0, -20.0, -25.0, -9.0, 9.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-6.0, 11.0, -13.0, -6.0, 25.0], [14.0, -4.0, -16.0, 13.0, 4.0], [-10.0, 17.0, -26.0, 
+9.0, -10.0], [-33.0, 4.0, 2.0, -10.0, 10.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank2_offset2(self):
-      arg0=numpy.array([[[[3.0, -7.0, 7.0, -6.0, 1.0], [0.0, 4.0, 6.0, 0.0, -7.0], [-7.0, -1.0, 2.0, -7.0, 6.0], [-7.0, 1.0, 
-2.0, 0.0, -1.0]], [[2.0, 3.0, 2.0, -2.0, -3.0], [6.0, -1.0, 0.0, -6.0, 6.0], [-5.0, -1.0, -1.0, -3.0, -4.0], [-6.0, 1.0, -5.0, 
--1.0, -5.0]], [[4.0, -4.0, -5.0, 3.0, 7.0], [2.0, -4.0, -1.0, -7.0, -4.0], [-5.0, 0.0, -3.0, -5.0, 0.0], [-4.0, 4.0, 6.0, 3.0, 
-0.0]]], [[[5.0, -4.0, 6.0, 4.0, 0.0], [-3.0, 1.0, -6.0, -3.0, -6.0], [-2.0, 7.0, 0.0, -6.0, 4.0], [4.0, -5.0, 0.0, 2.0, -1.0]], 
-[[0.0, -3.0, 6.0, -3.0, 1.0], [-4.0, 6.0, 1.0, 3.0, 1.0], [-4.0, 4.0, 6.0, 0.0, 2.0], [7.0, -5.0, -3.0, 0.0, 4.0]], [[4.0, 2.0, 
-6.0, -7.0, -1.0], [6.0, 0.0, 2.0, 4.0, 2.0], [-1.0, 0.0, 2.0, -1.0, 5.0], [-3.0, 0.0, -1.0, -3.0, 3.0]]]])
-      arg1=Data(numpy.array([[6.0, 0.0, 6.0], [-7.0, 4.0, 4.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[23.0, -42.0, 18.0, -86.0, 48.0], [41.0, 17.0, 84.0, 7.0, -12.0], [-78.0, -39.0, 26.0, -34.0, 
-36.0], [-78.0, 45.0, 32.0, -8.0, 29.0]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[-4.0, 6.0, 1.0], [0.0, -2.0, -7.0]])
+      arg1=Data(numpy.array([[[[-1.0, 0.0, -6.0, 5.0, 1.0], [1.0, -7.0, -6.0, 0.0, 7.0], [5.0, -5.0, -2.0, 5.0, -5.0], [-5.0, 
+6.0, -3.0, 4.0, -5.0]], [[0.0, 0.0, 3.0, -1.0, -4.0], [-6.0, -2.0, 7.0, 4.0, 0.0], [7.0, 2.0, 7.0, -6.0, 3.0], [-1.0, 6.0, 2.0, 
+0.0, 0.0]], [[6.0, 7.0, 3.0, -3.0, -3.0], [4.0, -4.0, -4.0, -4.0, -1.0], [-5.0, 0.0, -5.0, 6.0, -1.0], [6.0, -5.0, -4.0, -4.0, 
+4.0]]], [[[-5.0, 1.0, -2.0, 0.0, -7.0], [0.0, 1.0, -7.0, 5.0, 1.0], [-6.0, -1.0, 4.0, 6.0, -6.0], [-1.0, 0.0, 6.0, -7.0, 3.0]], 
+[[-5.0, 0.0, 2.0, -6.0, 0.0], [-2.0, 6.0, 2.0, 0.0, -1.0], [0.0, -5.0, 5.0, 1.0, 5.0], [-6.0, 7.0, 3.0, 0.0, -1.0]], [[1.0, 
+3.0, 3.0, -7.0, 5.0], [0.0, 0.0, 2.0, -7.0, 5.0], [-1.0, -6.0, -2.0, -2.0, 7.0], [1.0, -7.0, 3.0, -3.0, 
+2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, -4.0, -3.0, 0.0, -6.0], [-5.0, -4.0, -4.0, -4.0, 6.0], [0.0, 0.0, -4.0, 0.0, 
+4.0], [0.0, -4.0, 1.0, 4.0, 7.0]], [[-3.0, 3.0, 0.0, 4.0, 7.0], [-6.0, -3.0, -3.0, 3.0, 6.0], [6.0, 5.0, 0.0, 3.0, -4.0], 
+[-6.0, -4.0, 6.0, -7.0, -6.0]], [[-3.0, 4.0, 5.0, 6.0, -1.0], [0.0, 6.0, -2.0, -1.0, 4.0], [1.0, 5.0, 3.0, 5.0, -3.0], [-4.0, 
+2.0, 4.0, -2.0, -3.0]]], [[[0.0, -1.0, -7.0, -1.0, 4.0], [1.0, -6.0, -3.0, -7.0, -2.0], [-7.0, -5.0, -2.0, 2.0, -1.0], [0.0, 
+1.0, -7.0, -6.0, -5.0]], [[-3.0, 1.0, -2.0, -2.0, 0.0], [-6.0, 7.0, -5.0, 5.0, -1.0], [5.0, 2.0, 6.0, -6.0, -2.0], [1.0, -2.0, 
+4.0, 6.0, 6.0]], [[-3.0, 4.0, 2.0, 5.0, -2.0], [1.0, -4.0, 6.0, 3.0, -6.0], [5.0, 0.0, -3.0, -4.0, -4.0], [-7.0, 4.0, -2.0, 
+-6.0, -6.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[13.0, -14.0, 20.0, 32.0, -66.0], [-32.0, 0.0, 44.0, 69.0, -62.0], [24.0, 84.0, 49.0, -38.0, 
+-22.0], [25.0, 42.0, -7.0, 1.0, 12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-10.0, 8.0, 7.0, -1.0, 79.0], [-11.0, 18.0, -36.0, 2.0, 60.0], [-8.0, 31.0, 28.0, 
+63.0, -11.0], [7.0, -30.0, 42.0, -30.0, -37.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank1_offset0(self):
-      arg0=numpy.array([[0.0, 7.0, 2.0, 7.0, 5.0], [6.0, -5.0, -4.0, -1.0, 3.0], [0.0, 7.0, -2.0, 2.0, 6.0], [-1.0, -4.0, 4.0, 
-1.0, 7.0]])
-      arg1=Data(numpy.array([5.0, 5.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, 0.0], [35.0, 35.0], [10.0, 10.0], [35.0, 35.0], [25.0, 25.0]], [[30.0, 30.0], [-25.0, 
--25.0], [-20.0, -20.0], [-5.0, -5.0], [15.0, 15.0]], [[0.0, 0.0], [35.0, 35.0], [-10.0, -10.0], [10.0, 10.0], [30.0, 30.0]], 
-[[-5.0, -5.0], [-20.0, -20.0], [20.0, 20.0], [5.0, 5.0], [35.0, 35.0]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank0_taggedData_rank3_offset0(self):
+      arg0=numpy.array(2.0)
+      arg1=Data(numpy.array([[[3.0, -3.0], [-7.0, 2.0]], [[-7.0, 3.0], [0.0, -1.0]], [[-1.0, 0.0], [-7.0, 3.0]], [[-2.0, -7.0], 
+[1.0, 2.0]], [[-6.0, -7.0], [0.0, 3.0]], [[1.0, -5.0], [2.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 3.0], [2.0, 0.0]], [[0.0, -5.0], [0.0, -3.0]], [[-7.0, 7.0], [-7.0, -1.0]], 
+[[0.0, -1.0], [-7.0, -3.0]], [[0.0, 0.0], [-2.0, 5.0]], [[7.0, -6.0], [6.0, -1.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[6.0, -6.0], [-14.0, 4.0]], [[-14.0, 6.0], [0.0, -2.0]], [[-2.0, 0.0], [-14.0, 6.0]], [[-4.0, 
+-14.0], [2.0, 4.0]], [[-12.0, -14.0], [0.0, 6.0]], [[2.0, -10.0], [4.0, -4.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 6.0], [4.0, 0.0]], [[0.0, -10.0], [0.0, -6.0]], [[-14.0, 14.0], [-14.0, -2.0]], 
+[[0.0, -2.0], [-14.0, -6.0]], [[0.0, 0.0], [-4.0, 10.0]], [[14.0, -12.0], [12.0, -2.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6,2,2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")           
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank1_taggedData_rank4_offset1(self):
+      arg0=numpy.array([0.0, 2.0, -3.0])
+      arg1=Data(numpy.array([[[[0.0, -6.0], [-1.0, -1.0]], [[-2.0, -3.0], [2.0, 2.0]], [[-1.0, 4.0], [4.0, -6.0]], [[5.0, 6.0], 
+[-6.0, 7.0]], [[-4.0, 0.0], [3.0, -3.0]], [[-6.0, 2.0], [0.0, -5.0]]], [[[-1.0, 3.0], [3.0, 3.0]], [[0.0, 7.0], [-1.0, 3.0]], 
+[[4.0, -6.0], [-1.0, 3.0]], [[-3.0, -3.0], [4.0, 3.0]], [[-2.0, -1.0], [6.0, 6.0]], [[-1.0, 3.0], [-2.0, -1.0]]], [[[1.0, 5.0], 
+[7.0, -3.0]], [[0.0, 3.0], [6.0, 7.0]], [[-6.0, -2.0], [1.0, 7.0]], [[7.0, 0.0], [-5.0, -3.0]], [[-5.0, -5.0], [6.0, -2.0]], 
+[[6.0, -2.0], [-5.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 4.0], [-6.0, -7.0]], [[3.0, 1.0], [-2.0, -7.0]], [[-1.0, 3.0], [7.0, 3.0]], 
+[[-4.0, 2.0], [4.0, 7.0]], [[-4.0, -6.0], [2.0, 3.0]], [[-3.0, -6.0], [-2.0, 4.0]]], [[[-7.0, -5.0], [-3.0, -2.0]], [[-6.0, 
+3.0], [2.0, -7.0]], [[-3.0, -2.0], [-1.0, 0.0]], [[-1.0, 0.0], [-5.0, -5.0]], [[-3.0, 6.0], [6.0, 0.0]], [[0.0, 1.0], [-2.0, 
+0.0]]], [[[-4.0, 6.0], [-2.0, 0.0]], [[4.0, -5.0], [5.0, -1.0]], [[-6.0, 1.0], [0.0, 3.0]], [[6.0, 3.0], [7.0, -7.0]], [[5.0, 
+-2.0], [1.0, 2.0]], [[4.0, 2.0], [-6.0, 5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-5.0, -9.0], [-15.0, 15.0]], [[0.0, 5.0], [-20.0, -15.0]], [[26.0, -6.0], [-5.0, -15.0]], 
+[[-27.0, -6.0], [23.0, 15.0]], [[11.0, 13.0], [-6.0, 18.0]], [[-20.0, 12.0], [11.0, -2.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-2.0, -28.0], [0.0, -4.0]], [[-24.0, 21.0], [-11.0, -11.0]], [[12.0, -7.0], [-2.0, 
+-9.0]], [[-20.0, -9.0], [-31.0, 11.0]], [[-21.0, 18.0], [9.0, -6.0]], [[-12.0, -4.0], [14.0, -15.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank2_offset1(self):
-      arg0=numpy.array([[[-6.0, 3.0, -4.0, 0.0, 1.0], [2.0, -7.0, 1.0, -4.0, 0.0], [7.0, -1.0, -3.0, 3.0, 2.0], [4.0, 2.0, 0.0, 
-0.0, -4.0]], [[0.0, 3.0, 0.0, 5.0, -4.0], [-1.0, -4.0, -5.0, 3.0, -2.0], [0.0, 6.0, -6.0, 1.0, -7.0], [-1.0, 1.0, 3.0, 0.0, 
--1.0]], [[-5.0, -4.0, 0.0, 3.0, 4.0], [5.0, -2.0, 0.0, -1.0, 3.0], [-6.0, 7.0, 7.0, -2.0, -1.0], [-5.0, 4.0, -3.0, -3.0, 
--5.0]]])
-      arg1=Data(numpy.array([[0.0, 5.0], [0.0, 1.0], [4.0, 0.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-20.0, -30.0], [-16.0, 18.0], [0.0, -20.0], [12.0, 5.0], [16.0, 1.0]], [[20.0, 9.0], [-8.0, 
--39.0], [0.0, 0.0], [-4.0, -17.0], [12.0, -2.0]], [[-24.0, 35.0], [28.0, 1.0], [28.0, -21.0], [-8.0, 16.0], [-4.0, 3.0]], 
-[[-20.0, 19.0], [16.0, 11.0], [-12.0, 3.0], [-12.0, 0.0], [-20.0, -21.0]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank0_taggedData_rank4_offset0(self):
+      arg0=numpy.array(-6.0)
+      arg1=Data(numpy.array([[[[-4.0, -4.0, 7.0, 1.0], [-6.0, -1.0, -5.0, 6.0], [1.0, -4.0, -4.0, 5.0]], [[-4.0, -6.0, 0.0, 
+0.0], [3.0, 5.0, 5.0, 5.0], [4.0, -7.0, 7.0, -5.0]]], [[[2.0, -6.0, 5.0, -1.0], [7.0, -6.0, 3.0, -6.0], [-5.0, 3.0, 6.0, 5.0]], 
+[[1.0, -4.0, -5.0, 0.0], [-6.0, 7.0, -4.0, -4.0], [-3.0, -4.0, 4.0, -4.0]]], [[[-1.0, 7.0, -5.0, 4.0], [-4.0, -2.0, -1.0, 
+-5.0], [-1.0, -2.0, 4.0, 3.0]], [[-1.0, 5.0, 2.0, 3.0], [-5.0, 6.0, -7.0, 7.0], [0.0, -5.0, 6.0, -6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, 1.0, -1.0, 4.0], [0.0, -7.0, 5.0, 0.0], [6.0, 7.0, 4.0, -7.0]], [[-2.0, -6.0, 
+4.0, -5.0], [3.0, -5.0, -3.0, 3.0], [5.0, 0.0, 0.0, -1.0]]], [[[0.0, 6.0, 0.0, 5.0], [1.0, 2.0, -2.0, -5.0], [-4.0, 4.0, -1.0, 
+2.0]], [[6.0, 0.0, 6.0, 1.0], [-4.0, 5.0, -3.0, 7.0], [0.0, 5.0, 1.0, -5.0]]], [[[-7.0, -2.0, 0.0, 1.0], [-1.0, -5.0, 3.0, 
+5.0], [6.0, 5.0, 7.0, 1.0]], [[-5.0, -2.0, -3.0, 7.0], [4.0, -1.0, -5.0, 4.0], [3.0, 1.0, -7.0, 5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[24.0, 24.0, -42.0, -6.0], [36.0, 6.0, 30.0, -36.0], [-6.0, 24.0, 24.0, -30.0]], [[24.0, 36.0, 
+-0.0, -0.0], [-18.0, -30.0, -30.0, -30.0], [-24.0, 42.0, -42.0, 30.0]]], [[[-12.0, 36.0, -30.0, 6.0], [-42.0, 36.0, -18.0, 
+36.0], [30.0, -18.0, -36.0, -30.0]], [[-6.0, 24.0, 30.0, -0.0], [36.0, -42.0, 24.0, 24.0], [18.0, 24.0, -24.0, 24.0]]], [[[6.0, 
+-42.0, 30.0, -24.0], [24.0, 12.0, 6.0, 30.0], [6.0, 12.0, -24.0, -18.0]], [[6.0, -30.0, -12.0, -18.0], [30.0, -36.0, 42.0, 
+-42.0], [-0.0, 30.0, -36.0, 36.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[18.0, -6.0, 6.0, -24.0], [-0.0, 42.0, -30.0, -0.0], [-36.0, -42.0, -24.0, 42.0]], 
+[[12.0, 36.0, -24.0, 30.0], [-18.0, 30.0, 18.0, -18.0], [-30.0, -0.0, -0.0, 6.0]]], [[[-0.0, -36.0, -0.0, -30.0], [-6.0, -12.0, 
+12.0, 30.0], [24.0, -24.0, 6.0, -12.0]], [[-36.0, -0.0, -36.0, -6.0], [24.0, -30.0, 18.0, -42.0], [-0.0, -30.0, -6.0, 30.0]]], 
+[[[42.0, 12.0, -0.0, -6.0], [6.0, 30.0, -18.0, -30.0], [-36.0, -30.0, -42.0, -6.0]], [[30.0, 12.0, 18.0, -42.0], [-24.0, 6.0, 
+30.0, -24.0], [-18.0, -6.0, 42.0, -30.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank3_offset2(self):
-      arg0=numpy.array([[[[0.0, 4.0, -6.0, 5.0, -4.0], [-6.0, -3.0, 2.0, -4.0, -3.0], [-3.0, -7.0, -3.0, 0.0, -6.0], [6.0, 
--5.0, 1.0, -4.0, 1.0]], [[2.0, -5.0, -3.0, 5.0, 3.0], [1.0, -6.0, 0.0, 4.0, -6.0], [-2.0, 4.0, -6.0, -5.0, -4.0], [-2.0, 3.0, 
-5.0, 0.0, -3.0]], [[-7.0, -1.0, -1.0, -7.0, 2.0], [-2.0, 5.0, -3.0, 1.0, 7.0], [-3.0, -2.0, 2.0, -4.0, -7.0], [0.0, 3.0, -2.0, 
-4.0, 1.0]]], [[[-7.0, 7.0, 6.0, -3.0, 0.0], [2.0, -7.0, 1.0, -5.0, -5.0], [-2.0, 5.0, 1.0, 3.0, -2.0], [-4.0, 6.0, 4.0, -2.0, 
--5.0]], [[-2.0, -7.0, 1.0, -1.0, 7.0], [2.0, -2.0, -4.0, -6.0, -6.0], [-1.0, 6.0, 3.0, 2.0, 7.0], [-7.0, -5.0, -7.0, -3.0, 
--6.0]], [[-6.0, 5.0, -6.0, -7.0, 4.0], [-6.0, -4.0, 7.0, -3.0, 0.0], [7.0, 4.0, 7.0, 2.0, -4.0], [0.0, -1.0, 2.0, -6.0, 1.0]]]])
-      arg1=Data(numpy.array([[[-5.0, 1.0], [-2.0, 7.0], [6.0, 0.0]], [[-6.0, -6.0], [-4.0, -3.0], [3.0, 
--1.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-14.0, 68.0], [-15.0, -57.0], [-28.0, -60.0], [-76.0, 68.0], [10.0, -8.0]], [[-22.0, -11.0], 
-[95.0, 7.0], [3.0, 1.0], [63.0, 75.0], [123.0, 3.0]], [[38.0, -9.0], [-27.0, -31.0], [42.0, -67.0], [-34.0, -61.0], [-32.0, 
--39.0]], [[26.0, 37.0], [18.0, -4.0], [-17.0, 31.0], [50.0, 23.0], [64.0, 27.0]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank1_taggedData_rank0_offset0(self):
+      arg0=numpy.array([2.0, -5.0])
+      arg1=Data(7.0,self.functionspace)
+      arg1.setTaggedValue(1,-5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([14.0, -35.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-10.0, 25.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_constData_rank2_offset0(self):
-      arg0=numpy.array([[6.0, -7.0, -5.0, -3.0, -3.0], [7.0, -6.0, -7.0, 6.0, -7.0], [3.0, 5.0, 1.0, -5.0, -3.0], [-3.0, -1.0, 
-2.0, 2.0, -2.0]])
-      arg1=Data(numpy.array([[2.0, -1.0, -6.0, -7.0, 3.0], [-5.0, 7.0, -2.0, -2.0, 0.0], [-7.0, 7.0, 5.0, 3.0, 4.0], [-5.0, 
-4.0, -5.0, 2.0, 1.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[12.0, -6.0, -36.0, -42.0, 18.0], [-30.0, 42.0, -12.0, -12.0, 0.0], [-42.0, 42.0, 30.0, 18.0, 
-24.0], [-30.0, 24.0, -30.0, 12.0, 6.0]], [[-14.0, 7.0, 42.0, 49.0, -21.0], [35.0, -49.0, 14.0, 14.0, 0.0], [49.0, -49.0, -35.0, 
--21.0, -28.0], [35.0, -28.0, 35.0, -14.0, -7.0]], [[-10.0, 5.0, 30.0, 35.0, -15.0], [25.0, -35.0, 10.0, 10.0, 0.0], [35.0, 
--35.0, -25.0, -15.0, -20.0], [25.0, -20.0, 25.0, -10.0, -5.0]], [[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 0.0], 
-[21.0, -21.0, -15.0, -9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]], [[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 
-0.0], [21.0, -21.0, -15.0, -9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]]], [[[14.0, -7.0, -42.0, -49.0, 21.0], [-35.0, 49.0, 
--14.0, -14.0, 0.0], [-49.0, 49.0, 35.0, 21.0, 28.0], [-35.0, 28.0, -35.0, 14.0, 7.0]], [[-12.0, 6.0, 36.0, 42.0, -18.0], [30.0, 
--42.0, 12.0, 12.0, 0.0], [42.0, -42.0, -30.0, -18.0, -24.0], [30.0, -24.0, 30.0, -12.0, -6.0]], [[-14.0, 7.0, 42.0, 49.0, 
--21.0], [35.0, -49.0, 14.0, 14.0, 0.0], [49.0, -49.0, -35.0, -21.0, -28.0], [35.0, -28.0, 35.0, -14.0, -7.0]], [[12.0, -6.0, 
--36.0, -42.0, 18.0], [-30.0, 42.0, -12.0, -12.0, 0.0], [-42.0, 42.0, 30.0, 18.0, 24.0], [-30.0, 24.0, -30.0, 12.0, 6.0]], 
-[[-14.0, 7.0, 42.0, 49.0, -21.0], [35.0, -49.0, 14.0, 14.0, 0.0], [49.0, -49.0, -35.0, -21.0, -28.0], [35.0, -28.0, 35.0, 
--14.0, -7.0]]], [[[6.0, -3.0, -18.0, -21.0, 9.0], [-15.0, 21.0, -6.0, -6.0, 0.0], [-21.0, 21.0, 15.0, 9.0, 12.0], [-15.0, 12.0, 
--15.0, 6.0, 3.0]], [[10.0, -5.0, -30.0, -35.0, 15.0], [-25.0, 35.0, -10.0, -10.0, 0.0], [-35.0, 35.0, 25.0, 15.0, 20.0], 
-[-25.0, 20.0, -25.0, 10.0, 5.0]], [[2.0, -1.0, -6.0, -7.0, 3.0], [-5.0, 7.0, -2.0, -2.0, 0.0], [-7.0, 7.0, 5.0, 3.0, 4.0], 
-[-5.0, 4.0, -5.0, 2.0, 1.0]], [[-10.0, 5.0, 30.0, 35.0, -15.0], [25.0, -35.0, 10.0, 10.0, 0.0], [35.0, -35.0, -25.0, -15.0, 
--20.0], [25.0, -20.0, 25.0, -10.0, -5.0]], [[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 0.0], [21.0, -21.0, -15.0, 
--9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]]], [[[-6.0, 3.0, 18.0, 21.0, -9.0], [15.0, -21.0, 6.0, 6.0, 0.0], [21.0, -21.0, 
--15.0, -9.0, -12.0], [15.0, -12.0, 15.0, -6.0, -3.0]], [[-2.0, 1.0, 6.0, 7.0, -3.0], [5.0, -7.0, 2.0, 2.0, 0.0], [7.0, -7.0, 
--5.0, -3.0, -4.0], [5.0, -4.0, 5.0, -2.0, -1.0]], [[4.0, -2.0, -12.0, -14.0, 6.0], [-10.0, 14.0, -4.0, -4.0, 0.0], [-14.0, 
-14.0, 10.0, 6.0, 8.0], [-10.0, 8.0, -10.0, 4.0, 2.0]], [[4.0, -2.0, -12.0, -14.0, 6.0], [-10.0, 14.0, -4.0, -4.0, 0.0], [-14.0, 
-14.0, 10.0, 6.0, 8.0], [-10.0, 8.0, -10.0, 4.0, 2.0]], [[-4.0, 2.0, 12.0, 14.0, -6.0], [10.0, -14.0, 4.0, 4.0, 0.0], [14.0, 
--14.0, -10.0, -6.0, -8.0], [10.0, -8.0, 10.0, -4.0, -2.0]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank2_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[0.0, 0.0, 6.0], [-2.0, -1.0, 3.0]])
+      arg1=Data(numpy.array([0.0, 4.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, 0.0, 7.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([36.0, 14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([42.0, 21.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank3_offset1(self):
-      arg0=numpy.array([[[6.0, -3.0, -7.0, 4.0, 5.0], [2.0, -7.0, -2.0, 5.0, 5.0], [-2.0, 6.0, -6.0, -6.0, -1.0], [-5.0, 0.0, 
-4.0, -7.0, -3.0]], [[4.0, 1.0, 2.0, -6.0, -4.0], [-7.0, 1.0, -1.0, -1.0, -7.0], [-6.0, 6.0, -3.0, -6.0, 6.0], [-1.0, 0.0, -5.0, 
--5.0, 7.0]], [[-3.0, 4.0, -7.0, -7.0, 4.0], [3.0, -4.0, 4.0, -5.0, -1.0], [6.0, 5.0, 3.0, 0.0, -2.0], [-3.0, 7.0, 4.0, 3.0, 
-0.0]]])
-      arg1=Data(numpy.array([[[5.0, 4.0, 7.0, -3.0, 7.0], [4.0, -7.0, 1.0, 6.0, -3.0], [0.0, -4.0, -6.0, -7.0, -5.0], [-4.0, 
--1.0, 2.0, 6.0, 6.0]], [[0.0, -4.0, 5.0, -1.0, 4.0], [-7.0, 0.0, -2.0, -6.0, 7.0], [-3.0, 1.0, 4.0, -3.0, 5.0], [0.0, -5.0, 
-5.0, 0.0, 4.0]], [[6.0, 5.0, -5.0, -2.0, 2.0], [-6.0, -2.0, 0.0, 7.0, -5.0], [-4.0, 1.0, -7.0, 4.0, -5.0], [-2.0, -2.0, 5.0, 
-3.0, 3.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[12.0, -7.0, 77.0, -16.0, 52.0], [14.0, -36.0, -2.0, -9.0, 25.0], [0.0, -23.0, 1.0, -66.0, 5.0], 
-[-18.0, -20.0, 17.0, 27.0, 43.0]], [[9.0, 4.0, -36.0, 0.0, -9.0], [-43.0, 13.0, -5.0, 4.0, -4.0], [-19.0, 17.0, -6.0, 34.0, 
-0.0], [4.0, -10.0, 19.0, -6.0, -2.0]], [[-77.0, -71.0, -4.0, 33.0, -55.0], [0.0, 63.0, -11.0, -103.0, 70.0], [22.0, 23.0, 99.0, 
-15.0, 80.0], [42.0, 11.0, -39.0, -63.0, -55.0]], [[-22.0, 5.0, 33.0, 8.0, -10.0], [100.0, -14.0, 16.0, 11.0, -19.0], [46.0, 
--29.0, 1.0, -38.0, -15.0], [-2.0, 40.0, -57.0, 3.0, -21.0]], [[49.0, 56.0, -5.0, -19.0, 27.0], [24.0, -43.0, 13.0, 82.0, 
--63.0], [-4.0, -20.0, -74.0, -7.0, -65.0], [-28.0, 7.0, 10.0, 42.0, 26.0]]], [[[28.0, 51.0, -36.0, -5.0, -8.0], [39.0, -20.0, 
-16.0, 75.0, -70.0], [9.0, -12.0, -61.0, 19.0, -60.0], [-14.0, 27.0, -16.0, 21.0, -7.0]], [[-59.0, -52.0, -24.0, 28.0, -53.0], 
-[-11.0, 57.0, -9.0, -76.0, 48.0], [13.0, 25.0, 74.0, 30.0, 60.0], [36.0, 10.0, -29.0, -54.0, -50.0]], [[14.0, 16.0, -39.0, 
--1.0, -10.0], [-25.0, 6.0, 0.0, 22.0, -21.0], [-13.0, 11.0, -20.0, 33.0, -15.0], [0.0, -1.0, 11.0, 0.0, -4.0]], [[-5.0, -1.0, 
-55.0, -4.0, 21.0], [57.0, -25.0, 7.0, 1.0, 3.0], [23.0, -26.0, 1.0, -52.0, -5.0], [-10.0, 10.0, -20.0, 15.0, 11.0]], [[19.0, 
-43.0, 5.0, -6.0, 5.0], [75.0, -33.0, 19.0, 65.0, -59.0], [25.0, -28.0, -51.0, -18.0, -55.0], [-18.0, 32.0, -30.0, 27.0, 
--1.0]]], [[[26.0, 46.0, -74.0, 0.0, -26.0], [-2.0, 2.0, 10.0, 66.0, -66.0], [-6.0, 8.0, -54.0, 56.0, -50.0], [-4.0, 20.0, -4.0, 
-6.0, -18.0]], [[60.0, 25.0, 47.0, -34.0, 76.0], [-48.0, -52.0, -6.0, 35.0, -1.0], [-38.0, -13.0, -47.0, -40.0, -25.0], [-34.0, 
--46.0, 67.0, 51.0, 75.0]], [[-12.0, 3.0, -72.0, 15.0, -48.0], [-21.0, 36.0, 0.0, 3.0, -18.0], [-3.0, 24.0, 3.0, 63.0, 0.0], 
-[18.0, 15.0, -12.0, -27.0, -39.0]], [[-30.0, 0.0, -72.0, 24.0, -66.0], [18.0, 42.0, 6.0, 0.0, -24.0], [18.0, 18.0, 12.0, 60.0, 
-0.0], [24.0, 36.0, -42.0, -36.0, -60.0]], [[-17.0, -38.0, 33.0, 1.0, 13.0], [-34.0, 11.0, -13.0, -56.0, 55.0], [-10.0, 8.0, 
-44.0, -19.0, 45.0], [8.0, -25.0, 18.0, -12.0, 12.0]]], [[[-43.0, -31.0, -25.0, 22.0, -45.0], [5.0, 41.0, -3.0, -45.0, 23.0], 
-[15.0, 16.0, 47.0, 26.0, 35.0], [26.0, 16.0, -30.0, -39.0, -43.0]], [[42.0, 35.0, -35.0, -14.0, 14.0], [-42.0, -14.0, 0.0, 
-49.0, -35.0], [-28.0, 7.0, -49.0, 28.0, -35.0], [-14.0, -14.0, 35.0, 21.0, 21.0]], [[44.0, 56.0, -17.0, -15.0, 16.0], [27.0, 
--36.0, 14.0, 82.0, -67.0], [-1.0, -17.0, -72.0, 3.0, -65.0], [-24.0, 13.0, 3.0, 36.0, 16.0]], [[-17.0, 7.0, -89.0, 20.0, 
--63.0], [-11.0, 43.0, 3.0, 9.0, -29.0], [3.0, 26.0, 1.0, 76.0, -5.0], [22.0, 26.0, -24.0, -33.0, -53.0]], [[-15.0, -40.0, 14.0, 
-2.0, 7.0], [-61.0, 21.0, -17.0, -60.0, 58.0], [-21.0, 19.0, 46.0, 0.0, 50.0], [12.0, -32.0, 29.0, -18.0, 
-10.0]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[[7.0, 1.0, -2.0], [3.0, 4.0, -1.0]], [[-4.0, 0.0, 3.0], [-5.0, -7.0, 5.0]]])
+      arg1=Data(numpy.array([[-6.0, -6.0, 0.0], [0.0, 0.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -6.0, 0.0], [1.0, -4.0, -5.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-49.0, 29.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-14.0, -2.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank4_taggedData_rank3_offset3(self):
+      arg0=numpy.array([[[[-4.0, -2.0, 5.0], [0.0, -5.0, 3.0], [6.0, -5.0, 2.0], [-4.0, 1.0, -6.0]], [[2.0, -3.0, 2.0], [0.0, 
+7.0, 4.0], [-2.0, -5.0, 3.0], [5.0, 5.0, 5.0]]], [[[1.0, -1.0, -6.0], [-3.0, 1.0, 5.0], [-5.0, 1.0, 5.0], [7.0, 5.0, -6.0]], 
+[[0.0, -7.0, -7.0], [0.0, 4.0, 0.0], [-1.0, -5.0, 2.0], [-7.0, 5.0, -3.0]]]])
+      arg1=Data(numpy.array([[[3.0, -6.0, -1.0], [7.0, -2.0, -7.0], [-5.0, -5.0, -2.0], [0.0, 1.0, -2.0]], [[-1.0, -3.0, 0.0], 
+[3.0, -6.0, 2.0], [-1.0, 2.0, -5.0], [2.0, -6.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, 4.0, 7.0], [2.0, -6.0, -1.0], [6.0, 6.0, -6.0], [-6.0, 1.0, -6.0]], [[-1.0, 
+-5.0, 6.0], [-1.0, 0.0, -4.0], [-6.0, -5.0, 0.0], [-3.0, 5.0, -4.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-92.0, -76.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([157.0, -39.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank1_taggedData_rank1_offset0(self):
+      arg0=numpy.array([7.0, -2.0])
+      arg1=Data(numpy.array([3.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-7.0, 6.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[21.0, 0.0], [-6.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-49.0, 42.0], [14.0, -12.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank2_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[4.0, 3.0, 4.0], [-1.0, -7.0, -3.0]])
+      arg1=Data(numpy.array([[6.0, 6.0], [1.0, -5.0], [6.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-7.0, 7.0], [7.0, -4.0], [-7.0, 1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[51.0, 13.0], [-31.0, 26.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, 20.0], [-21.0, 18.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
       ref=-ref
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank4_offset2(self):
-      arg0=numpy.array([[[[5.0, -6.0, -4.0, 6.0, 2.0], [4.0, -3.0, -3.0, 1.0, 3.0], [2.0, 7.0, 3.0, 7.0, 3.0], [6.0, 7.0, -1.0, 
--2.0, 0.0]], [[-5.0, 4.0, -2.0, 3.0, 2.0], [5.0, -1.0, -4.0, 2.0, -1.0], [6.0, -2.0, 4.0, -5.0, 5.0], [0.0, 7.0, -4.0, 4.0, 
-0.0]], [[0.0, -5.0, 0.0, 1.0, 7.0], [1.0, 0.0, 6.0, -2.0, -2.0], [2.0, 0.0, 0.0, 7.0, 4.0], [-5.0, 3.0, 3.0, 5.0, 5.0]]], 
-[[[5.0, 5.0, -5.0, -7.0, -2.0], [-3.0, -7.0, -1.0, -1.0, -1.0], [0.0, -2.0, 5.0, 6.0, -3.0], [6.0, -6.0, -3.0, 1.0, 1.0]], 
-[[1.0, 4.0, -6.0, 4.0, 6.0], [2.0, 1.0, 5.0, -6.0, 2.0], [-4.0, -3.0, -4.0, -3.0, -7.0], [-7.0, 0.0, 1.0, 3.0, 7.0]], [[0.0, 
-2.0, 7.0, 2.0, -5.0], [-6.0, -2.0, 6.0, 0.0, 0.0], [-1.0, 0.0, -6.0, 4.0, 4.0], [0.0, -3.0, 6.0, 2.0, -2.0]]]])
-      arg1=Data(numpy.array([[[[0.0, -6.0, 6.0, 4.0, -3.0], [3.0, 2.0, 4.0, 5.0, -5.0], [5.0, -4.0, -4.0, 0.0, -5.0], [3.0, 
-0.0, 0.0, -1.0, -2.0]], [[3.0, -4.0, 0.0, 7.0, 0.0], [0.0, 2.0, 4.0, 0.0, 4.0], [-6.0, 0.0, -3.0, 1.0, 3.0], [0.0, 1.0, 0.0, 
-6.0, 3.0]], [[-7.0, -3.0, -1.0, 5.0, 0.0], [0.0, -1.0, -4.0, 0.0, -6.0], [1.0, -4.0, -1.0, -4.0, 7.0], [-2.0, -3.0, 5.0, 0.0, 
-5.0]]], [[[0.0, 2.0, -2.0, -6.0, 6.0], [-2.0, 0.0, 1.0, 6.0, -6.0], [3.0, 0.0, 0.0, 5.0, 6.0], [2.0, 1.0, 3.0, -7.0, 3.0]], 
-[[7.0, 4.0, -1.0, 4.0, 0.0], [-1.0, 1.0, -4.0, 0.0, 5.0], [6.0, -4.0, 5.0, 1.0, 5.0], [0.0, 0.0, 6.0, 4.0, 1.0]], [[0.0, 4.0, 
--1.0, 3.0, -7.0], [4.0, -5.0, 7.0, 7.0, 1.0], [0.0, -4.0, 0.0, -2.0, 3.0], [-5.0, -6.0, 5.0, 5.0, -3.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[-8.0, 4.0, 19.0, -41.0, 15.0], [4.0, 1.0, 1.0, 55.0, -70.0], [76.0, -24.0, 0.0, 21.0, -5.0], 
-[25.0, 0.0, 21.0, -66.0, -9.0]], [[75.0, 69.0, -47.0, -29.0, 34.0], [-24.0, -5.0, 15.0, 14.0, 68.0], [-20.0, 20.0, 37.0, 49.0, 
-63.0], [-8.0, 12.0, 24.0, 21.0, 12.0]], [[-48.0, 26.0, -15.0, -3.0, -67.0], [32.0, -53.0, 44.0, -1.0, 19.0], [-59.0, 12.0, 
--8.0, -47.0, -25.0], [-57.0, -49.0, -16.0, 38.0, -40.0]], [[30.0, -41.0, 43.0, 114.0, -74.0], [36.0, 11.0, 23.0, 2.0, 40.0], 
-[16.0, -52.0, -14.0, -36.0, -30.0], [-8.0, -19.0, 18.0, 87.0, -21.0]], [[-1.0, -41.0, 8.0, 78.0, 17.0], [-16.0, 32.0, -73.0, 
--37.0, -7.0], [35.0, -40.0, 9.0, -20.0, 48.0], [13.0, 9.0, 40.0, 23.0, 52.0]]], [[[22.0, -69.0, 33.0, 64.0, 12.0], [-8.0, 49.0, 
--21.0, -40.0, 16.0], [-6.0, -4.0, -22.0, 0.0, -24.0], [34.0, 35.0, -22.0, 25.0, 23.0]], [[4.0, 4.0, -3.0, 21.0, -19.0], [-4.0, 
-3.0, -41.0, -71.0, 56.0], [-24.0, 16.0, 20.0, -31.0, -31.0], [-13.0, 4.0, -25.0, 40.0, -11.0]], [[-19.0, 58.0, -33.0, 34.0, 
--39.0], [12.0, -45.0, -31.0, 21.0, 0.0], [42.0, -56.0, 43.0, -40.0, 82.0], [-53.0, -59.0, 87.0, 36.0, 8.0]], [[-22.0, -34.0, 
-16.0, -10.0, -9.0], [11.0, 2.0, 43.0, -1.0, -9.0], [-48.0, 28.0, -38.0, -1.0, -49.0], [5.0, 7.0, -49.0, -6.0, -15.0]], [[25.0, 
--2.0, 20.0, 9.0, -15.0], [9.0, 8.0, 7.0, 9.0, 9.0], [28.0, -12.0, 3.0, 4.0, -28.0], [11.0, 4.0, -1.0, 6.0, -20.0]]], [[[-24.0, 
--62.0, 15.0, 41.0, 1.0], [6.0, 15.0, 33.0, 3.0, -19.0], [-48.0, 4.0, -48.0, -4.0, -1.0], [7.0, 6.0, -19.0, 13.0, 23.0]], 
-[[-27.0, -50.0, 49.0, 14.0, -33.0], [28.0, 7.0, 30.0, 23.0, -46.0], [23.0, -16.0, -37.0, -15.0, -68.0], [17.0, -4.0, -24.0, 
--17.0, -29.0]], [[-16.0, -64.0, 18.0, -24.0, 63.0], [-21.0, 40.0, 7.0, 3.0, -55.0], [-18.0, 28.0, -44.0, 37.0, -11.0], [49.0, 
-45.0, -39.0, -60.0, 35.0]], [[-85.0, -27.0, 22.0, -8.0, -13.0], [28.0, -26.0, 26.0, 99.0, -144.0], [72.0, -60.0, -35.0, -14.0, 
-32.0], [-1.0, -44.0, 55.0, -71.0, 9.0]], [[-62.0, -68.0, 23.0, 69.0, -55.0], [38.0, -15.0, 69.0, 25.0, -32.0], [-62.0, -16.0, 
--66.0, -41.0, -13.0], [-25.0, -34.0, -11.0, 40.0, 1.0]]], [[[-14.0, -37.0, 36.0, -65.0, 18.0], [13.0, 10.0, 78.0, 66.0, -71.0], 
-[1.0, 24.0, -54.0, 43.0, -64.0], [40.0, 21.0, -49.0, -76.0, -26.0]], [[0.0, -103.0, 54.0, 119.0, -36.0], [21.0, 40.0, 17.0, 
--22.0, 8.0], [-22.0, -28.0, -52.0, -29.0, -38.0], [18.0, 10.0, -18.0, 62.0, 13.0]], [[-26.0, 35.0, -10.0, 23.0, -57.0], [26.0, 
--42.0, 3.0, 19.0, 0.0], [19.0, -36.0, 18.0, -42.0, 19.0], [-45.0, -52.0, 42.0, 32.0, -21.0]], [[-2.0, 3.0, -24.0, 57.0, -2.0], 
-[-3.0, -8.0, -9.0, 10.0, 7.0], [-8.0, -32.0, 6.0, -12.0, 84.0], [-24.0, -22.0, 56.0, 41.0, 41.0]], [[14.0, 7.0, -12.0, 41.0, 
-20.0], [-17.0, 12.0, -61.0, -8.0, -3.0], [50.0, -40.0, 30.0, -4.0, 70.0], [2.0, -2.0, 60.0, 11.0, 41.0]]]]),self.functionspace)
+   def test_generalTensorProduct_array_rank3_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[[-4.0, 4.0, 1.0], [-7.0, 7.0, -2.0]], [[0.0, 4.0, -2.0], [4.0, 2.0, -7.0]]])
+      arg1=Data(numpy.array([[[-5.0, -7.0], [4.0, 2.0], [0.0, 7.0]], [[-3.0, -6.0], [-6.0, -5.0], [0.0, 
+1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 1.0], [2.0, -1.0], [7.0, 6.0]], [[-7.0, 3.0], [-3.0, -4.0], [7.0, 5.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[15.0, 48.0], [-8.0, -47.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[57.0, -61.0], [-89.0, -47.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank4_taggedData_rank4_offset3(self):
+      arg0=numpy.array([[[[-4.0, 6.0, 4.0], [-4.0, 0.0, 5.0], [4.0, 7.0, -3.0], [7.0, -6.0, -2.0]], [[-1.0, -5.0, 5.0], [-2.0, 
+6.0, -5.0], [-7.0, -5.0, 2.0], [1.0, 0.0, -5.0]]], [[[5.0, 1.0, 1.0], [0.0, 0.0, -5.0], [-5.0, -4.0, 1.0], [0.0, -5.0, -2.0]], 
+[[-5.0, 7.0, -3.0], [-6.0, 3.0, -5.0], [-5.0, -4.0, 3.0], [-4.0, -6.0, 0.0]]]])
+      arg1=Data(numpy.array([[[[-7.0, -7.0], [-2.0, -6.0], [6.0, 5.0]], [[-5.0, -2.0], [-6.0, 3.0], [-6.0, 0.0]], [[-4.0, 0.0], 
+[1.0, 4.0], [6.0, 5.0]], [[6.0, -3.0], [6.0, 4.0], [1.0, 4.0]]], [[[4.0, 5.0], [0.0, -7.0], [5.0, 7.0]], [[-2.0, 0.0], [-3.0, 
+-2.0], [-2.0, -1.0]], [[7.0, -5.0], [-2.0, -3.0], [4.0, -5.0]], [[5.0, -6.0], [3.0, 6.0], [0.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, -6.0], [-7.0, 4.0], [5.0, 5.0]], [[6.0, 1.0], [4.0, -2.0], [2.0, -2.0]], 
+[[4.0, 6.0], [-4.0, 3.0], [-1.0, 7.0]], [[-2.0, 0.0], [3.0, 0.0], [-4.0, -4.0]]], [[[7.0, 6.0], [-2.0, 0.0], [-5.0, 3.0]], 
+[[4.0, 7.0], [3.0, -7.0], [-3.0, -7.0]], [[0.0, 0.0], [-4.0, -5.0], [5.0, 4.0]], [[7.0, -4.0], [0.0, 3.0], [0.0, 0.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-2.0, 37.0], [-86.0, -161.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-45.0, 103.0], [-35.0, -75.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank1_taggedData_rank2_offset0(self):
+      arg0=numpy.array([7.0, -2.0])
+      arg1=Data(numpy.array([[4.0, 6.0, 6.0, -3.0, -2.0], [-6.0, 6.0, -6.0, 5.0, 4.0], [0.0, -2.0, 1.0, 1.0, -3.0], [0.0, 0.0, 
+-4.0, -5.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 2.0, 0.0, 3.0, -6.0], [7.0, 0.0, 0.0, -7.0, -3.0], [-5.0, -5.0, 0.0, -6.0, 
+-3.0], [7.0, 4.0, 0.0, -3.0, 7.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[28.0, 42.0, 42.0, -21.0, -14.0], [-42.0, 42.0, -42.0, 35.0, 28.0], [0.0, -14.0, 7.0, 7.0, -21.0], 
+[0.0, 0.0, -28.0, -35.0, -7.0]], [[-8.0, -12.0, -12.0, 6.0, 4.0], [12.0, -12.0, 12.0, -10.0, -8.0], [0.0, 4.0, -2.0, -2.0, 
+6.0], [0.0, 0.0, 8.0, 10.0, 2.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[49.0, 14.0, 0.0, 21.0, -42.0], [49.0, 0.0, 0.0, -49.0, -21.0], [-35.0, -35.0, 0.0, 
+-42.0, -21.0], [49.0, 28.0, 0.0, -21.0, 49.0]], [[-14.0, -4.0, 0.0, -6.0, 12.0], [-14.0, 0.0, 0.0, 14.0, 6.0], [10.0, 10.0, 
+0.0, 12.0, 6.0], [-14.0, -8.0, 0.0, 6.0, -14.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank2_taggedData_rank3_offset1(self):
+      arg0=numpy.array([[6.0, -5.0, 1.0], [-4.0, -6.0, 0.0]])
+      arg1=Data(numpy.array([[[2.0, 2.0, 5.0, 2.0, -4.0], [-1.0, 0.0, -7.0, -5.0, 0.0], [0.0, 7.0, 2.0, 7.0, -1.0], [-2.0, 5.0, 
+4.0, -3.0, -4.0]], [[0.0, 2.0, 5.0, -7.0, -1.0], [-7.0, 2.0, 5.0, -1.0, -7.0], [-3.0, -3.0, 7.0, -5.0, -3.0], [-3.0, -4.0, 
+-3.0, 2.0, -3.0]], [[-5.0, -5.0, 0.0, 1.0, 1.0], [-7.0, -6.0, -3.0, -4.0, 3.0], [-6.0, 4.0, -2.0, 3.0, 3.0], [6.0, 4.0, -7.0, 
+-1.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 2.0, 0.0, 7.0, 0.0], [6.0, -3.0, 1.0, -7.0, 6.0], [3.0, -5.0, -5.0, -1.0, 3.0], 
+[6.0, 0.0, 7.0, -2.0, 0.0]], [[-3.0, 1.0, 1.0, -5.0, 6.0], [0.0, -6.0, 0.0, -7.0, 2.0], [0.0, 6.0, -7.0, -6.0, 5.0], [0.0, 6.0, 
+-3.0, -1.0, -7.0]], [[2.0, -1.0, -3.0, -5.0, 3.0], [7.0, 0.0, 4.0, 1.0, 0.0], [3.0, -4.0, 6.0, 2.0, 7.0], [-5.0, 3.0, -1.0, 
+0.0, 1.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[7.0, -3.0, 5.0, 48.0, -18.0], [22.0, -16.0, -70.0, -29.0, 38.0], [9.0, 61.0, -25.0, 70.0, 12.0], 
+[9.0, 54.0, 32.0, -29.0, -16.0]], [[-8.0, -20.0, -50.0, 34.0, 22.0], [46.0, -12.0, -2.0, 26.0, 42.0], [18.0, -10.0, -50.0, 2.0, 
+22.0], [26.0, 4.0, 2.0, 0.0, 34.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[53.0, 6.0, -8.0, 62.0, -27.0], [43.0, 12.0, 10.0, -6.0, 26.0], [21.0, -64.0, 11.0, 
+26.0, 0.0], [31.0, -27.0, 56.0, -7.0, 36.0]], [[-6.0, -14.0, -6.0, 2.0, -36.0], [-24.0, 48.0, -4.0, 70.0, -36.0], [-12.0, 
+-16.0, 62.0, 40.0, -42.0], [-24.0, -36.0, -10.0, 14.0, 42.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[7.0, -2.0, 1.0, -3.0, 1.0], [-2.0, 0.0, 1.0, 4.0, 2.0], [1.0, -4.0, -5.0, -5.0, 5.0], [5.0, -6.0, 6.0, 
--2.0, -7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-4.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, -0.0, 0.0], [0.0, 
--0.0, 0.0, -0.0, -0.0]])+(1.-msk_ref)*numpy.array([[-28.0, 8.0, -4.0, 12.0, -4.0], [8.0, -0.0, -4.0, -16.0, -8.0], [-4.0, 16.0, 
-20.0, 20.0, -20.0], [-20.0, 24.0, -24.0, 8.0, 28.0]])
+   def test_generalTensorProduct_array_rank3_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[[-1.0, 4.0, 0.0], [7.0, 5.0, 0.0]], [[-7.0, 0.0, -4.0], [-1.0, -4.0, 6.0]]])
+      arg1=Data(numpy.array([[[[-7.0, -1.0, 6.0, 7.0, 4.0], [-1.0, 0.0, -4.0, 6.0, 4.0], [2.0, -5.0, -2.0, -4.0, 6.0], [-1.0, 
+3.0, 6.0, -3.0, 0.0]], [[-3.0, -2.0, 4.0, -5.0, 6.0], [-7.0, -6.0, 0.0, 5.0, -6.0], [-4.0, 2.0, 5.0, 7.0, 3.0], [0.0, 3.0, 
+-1.0, 0.0, 4.0]], [[-3.0, 4.0, -3.0, -7.0, 3.0], [2.0, -1.0, -1.0, 0.0, 0.0], [1.0, 5.0, 5.0, -3.0, -7.0], [0.0, 0.0, 2.0, 
+-3.0, 2.0]]], [[[2.0, -3.0, 0.0, 5.0, -2.0], [-1.0, 2.0, -2.0, 1.0, -7.0], [7.0, 4.0, 7.0, -2.0, 3.0], [1.0, 5.0, 6.0, -4.0, 
+2.0]], [[-5.0, -6.0, -6.0, 5.0, 2.0], [7.0, 0.0, -7.0, -1.0, 0.0], [-1.0, -5.0, -2.0, -7.0, 2.0], [-6.0, -2.0, -7.0, -7.0, 
+0.0]], [[-1.0, 6.0, 5.0, -2.0, -6.0], [7.0, -3.0, 4.0, 2.0, 6.0], [6.0, -5.0, 3.0, -6.0, -2.0], [-4.0, 3.0, 0.0, -2.0, 
+7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, 3.0, 3.0, -1.0, 0.0], [3.0, 7.0, 4.0, -2.0, 3.0], [-5.0, 6.0, -3.0, -7.0, 
+-7.0], [-3.0, -2.0, -4.0, 6.0, 4.0]], [[0.0, -2.0, 5.0, -7.0, 6.0], [6.0, 0.0, 1.0, 0.0, 5.0], [-1.0, -3.0, 7.0, -2.0, -6.0], 
+[-7.0, 4.0, 7.0, -6.0, 5.0]], [[-7.0, 7.0, -1.0, -6.0, -6.0], [-6.0, 0.0, -6.0, 7.0, -1.0], [-7.0, -5.0, 1.0, -1.0, -1.0], 
+[0.0, 5.0, -1.0, 2.0, -7.0]]], [[[-3.0, 0.0, -6.0, -3.0, 2.0], [4.0, 6.0, 4.0, -7.0, -1.0], [4.0, -3.0, 4.0, -6.0, 3.0], [0.0, 
+3.0, -5.0, -6.0, 1.0]], [[0.0, -2.0, 7.0, 6.0, 7.0], [2.0, 2.0, 5.0, -1.0, -6.0], [-4.0, -4.0, 4.0, 6.0, 3.0], [2.0, 7.0, 7.0, 
+0.0, 0.0]], [[1.0, -4.0, 7.0, -4.0, 0.0], [0.0, 6.0, 0.0, 0.0, 6.0], [-3.0, 0.0, 7.0, 5.0, -3.0], [7.0, 1.0, -1.0, 2.0, 
+-3.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-16.0, -58.0, -20.0, 33.0, 16.0], [1.0, -10.0, -45.0, 16.0, -77.0], [26.0, 16.0, 61.0, -17.0, 
+37.0], [-22.0, 34.0, -3.0, -60.0, 30.0]], [[73.0, 54.0, 24.0, -58.0, -82.0], [14.0, -16.0, 86.0, -27.0, 15.0], [15.0, 1.0, 
+13.0, 34.0, -37.0], [6.0, 0.0, -28.0, 53.0, 32.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-24.0, -21.0, 10.0, -18.0, 73.0], [59.0, 45.0, 53.0, -52.0, -20.0], [9.0, -59.0, 
+79.0, -13.0, 19.0], [-15.0, 74.0, 32.0, -72.0, 23.0]], [[16.0, -65.0, 3.0, -14.0, -6.0], [-9.0, -27.0, -28.0, -3.0, 44.0], 
+[57.0, -3.0, 39.0, 65.0, 20.0], [55.0, -31.0, 3.0, -32.0, -19.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank1_taggedData_rank3_offset0(self):
+      arg0=numpy.array([-7.0, 3.0])
+      arg1=Data(numpy.array([[[4.0, 4.0], [5.0, -3.0]], [[-5.0, 4.0], [6.0, 0.0]], [[-1.0, -5.0], [0.0, 6.0]], [[5.0, -5.0], 
+[0.0, 4.0]], [[-3.0, 1.0], [0.0, -2.0]], [[5.0, -6.0], [-7.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 5.0], [-7.0, 0.0]], [[4.0, -3.0], [4.0, -3.0]], [[0.0, -4.0], [-4.0, -3.0]], 
+[[-2.0, -4.0], [4.0, -7.0]], [[3.0, -6.0], [5.0, 1.0]], [[2.0, 7.0], [6.0, -6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-28.0, -28.0], [-35.0, 21.0]], [[35.0, -28.0], [-42.0, 0.0]], [[7.0, 35.0], [0.0, -42.0]], 
+[[-35.0, 35.0], [0.0, -28.0]], [[21.0, -7.0], [0.0, 14.0]], [[-35.0, 42.0], [49.0, 49.0]]], [[[12.0, 12.0], [15.0, -9.0]], 
+[[-15.0, 12.0], [18.0, 0.0]], [[-3.0, -15.0], [0.0, 18.0]], [[15.0, -15.0], [0.0, 12.0]], [[-9.0, 3.0], [0.0, -6.0]], [[15.0, 
+-18.0], [-21.0, -21.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -35.0], [49.0, 0.0]], [[-28.0, 21.0], [-28.0, 21.0]], [[0.0, 28.0], [28.0, 
+21.0]], [[14.0, 28.0], [-28.0, 49.0]], [[-21.0, 42.0], [-35.0, -7.0]], [[-14.0, -49.0], [-42.0, 42.0]]], [[[0.0, 15.0], [-21.0, 
+0.0]], [[12.0, -9.0], [12.0, -9.0]], [[0.0, -12.0], [-12.0, -9.0]], [[-6.0, -12.0], [12.0, -21.0]], [[9.0, -18.0], [15.0, 
+3.0]], [[6.0, 21.0], [18.0, -18.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank2_taggedData_rank4_offset1(self):
+      arg0=numpy.array([[1.0, -2.0, 1.0], [4.0, -1.0, -3.0]])
+      arg1=Data(numpy.array([[[[4.0, -2.0], [3.0, -5.0]], [[0.0, 3.0], [-1.0, 7.0]], [[7.0, 0.0], [7.0, -6.0]], [[5.0, -2.0], 
+[5.0, 0.0]], [[7.0, -4.0], [-5.0, -4.0]], [[-4.0, -7.0], [-2.0, 7.0]]], [[[2.0, 6.0], [-3.0, -4.0]], [[-1.0, 7.0], [-5.0, 
+0.0]], [[-4.0, 0.0], [-2.0, 5.0]], [[0.0, -2.0], [-1.0, 1.0]], [[-6.0, 2.0], [-7.0, -4.0]], [[6.0, 5.0], [-7.0, -7.0]]], 
+[[[-5.0, 6.0], [3.0, 4.0]], [[6.0, -6.0], [-7.0, -3.0]], [[-6.0, 3.0], [0.0, -7.0]], [[2.0, 2.0], [-4.0, 0.0]], [[1.0, -3.0], 
+[-2.0, 5.0]], [[3.0, -7.0], [2.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-7.0, 3.0], [7.0, -4.0]], [[-6.0, 5.0], [-5.0, 6.0]], [[-1.0, -3.0], [1.0, 1.0]], 
+[[-2.0, -6.0], [2.0, 1.0]], [[-3.0, 5.0], [0.0, 0.0]], [[6.0, -3.0], [5.0, 1.0]]], [[[-7.0, 0.0], [7.0, -5.0]], [[-7.0, 2.0], 
+[1.0, 0.0]], [[0.0, -1.0], [1.0, 1.0]], [[4.0, 1.0], [7.0, 0.0]], [[-5.0, 5.0], [1.0, 2.0]], [[0.0, 2.0], [-7.0, -6.0]]], 
+[[[0.0, -3.0], [0.0, -6.0]], [[6.0, 4.0], [6.0, 0.0]], [[-7.0, 1.0], [-3.0, -1.0]], [[4.0, 5.0], [1.0, -3.0]], [[5.0, 5.0], 
+[3.0, 0.0]], [[1.0, 6.0], [-6.0, 5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-5.0, -8.0], [12.0, 7.0]], [[8.0, -17.0], [2.0, 4.0]], [[9.0, 3.0], [11.0, -23.0]], [[7.0, 4.0], 
+[3.0, -2.0]], [[20.0, -11.0], [7.0, 9.0]], [[-13.0, -24.0], [14.0, 22.0]]], [[[29.0, -32.0], [6.0, -28.0]], [[-17.0, 23.0], 
+[22.0, 37.0]], [[50.0, -9.0], [30.0, -8.0]], [[14.0, -12.0], [33.0, -1.0]], [[31.0, -9.0], [-7.0, -27.0]], [[-31.0, -12.0], 
+[-7.0, 32.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[7.0, 0.0], [-7.0, 0.0]], [[14.0, 5.0], [-1.0, 6.0]], [[-8.0, 0.0], [-4.0, -2.0]], 
+[[-6.0, -3.0], [-11.0, -2.0]], [[12.0, 0.0], [1.0, -4.0]], [[7.0, -1.0], [13.0, 18.0]]], [[[-21.0, 21.0], [21.0, 7.0]], 
+[[-35.0, 6.0], [-39.0, 24.0]], [[17.0, -14.0], [12.0, 6.0]], [[-24.0, -40.0], [-2.0, 13.0]], [[-22.0, 0.0], [-10.0, -2.0]], 
+[[21.0, -32.0], [45.0, -5.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank2_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[-4.0, -6.0, -3.0, -7.0, 3.0], [1.0, 6.0, 0.0, -7.0, 4.0], [-2.0, -5.0, 1.0, -2.0, 0.0], [6.0, 6.0, 
+3.0, 0.0, 6.0]])
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,-7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, -0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[28.0, 42.0, 21.0, 49.0, -21.0], [-7.0, -42.0, -0.0, 49.0, -28.0], [14.0, 35.0, -7.0, 
+14.0, -0.0], [-42.0, -42.0, -21.0, -0.0, -42.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[[6.0, -5.0, -5.0, 2.0, -1.0], [1.0, 0.0, 7.0, -1.0, -4.0], [7.0, 6.0, -7.0, -2.0, 7.0], [2.0, -5.0, 
-1.0, -1.0, 2.0]], [[0.0, 2.0, -6.0, 0.0, -2.0], [-6.0, 3.0, 3.0, 3.0, -1.0], [-2.0, 4.0, 4.0, 7.0, 0.0], [-3.0, 7.0, 1.0, 7.0, 
-0.0]], [[1.0, -2.0, 5.0, 4.0, -3.0], [7.0, -4.0, 5.0, 5.0, -4.0], [0.0, 7.0, 6.0, -4.0, 4.0], [-2.0, 0.0, -3.0, 3.0, -7.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, -3.0, 2.0])+(1.-msk_arg1)*numpy.array([2.0, 1.0, 0.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-28.0, 15.0, 53.0, -2.0, 5.0], [27.0, -17.0, -34.0, 6.0, 15.0], [-29.0, -28.0, 35.0, -19.0, 
--27.0], [-5.0, 4.0, -14.0, -10.0, -24.0]])+(1.-msk_ref)*numpy.array([[12.0, -8.0, -16.0, 4.0, -4.0], [-4.0, 3.0, 17.0, 1.0, 
--9.0], [12.0, 16.0, -10.0, 3.0, 14.0], [1.0, -3.0, 3.0, 5.0, 4.0]])
+   def test_generalTensorProduct_array_rank3_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[[1.0, 2.0, -4.0], [0.0, -7.0, -6.0], [-3.0, 5.0, -1.0], [6.0, 2.0, -3.0], [-2.0, 0.0, -1.0]], [[-4.0, 
+4.0, 3.0], [-6.0, 7.0, 0.0], [0.0, -7.0, 0.0], [-1.0, 4.0, -5.0], [0.0, 7.0, 5.0]], [[-4.0, -1.0, 5.0], [5.0, 3.0, 4.0], [-6.0, 
+-5.0, 0.0], [0.0, 0.0, -5.0], [-3.0, 0.0, 4.0]], [[3.0, 0.0, 7.0], [2.0, -7.0, 0.0], [-2.0, -7.0, 1.0], [2.0, 2.0, 4.0], [-6.0, 
+0.0, 7.0]]])
+      arg1=Data(numpy.array([4.0, 0.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, 7.0, -2.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-20.0, -36.0, -18.0, 6.0, -14.0], [2.0, -24.0, 0.0, -34.0, 30.0], [14.0, 44.0, -24.0, -30.0, 
+12.0], [54.0, 8.0, -2.0, 32.0, 18.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[26.0, -37.0, 25.0, 44.0, -6.0], [6.0, 25.0, -49.0, 34.0, 39.0], [-33.0, 33.0, -59.0, 
+10.0, -20.0], [-2.0, -41.0, -59.0, 14.0, -38.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[[[-2.0, 3.0, 7.0, -4.0, -2.0], [0.0, -2.0, 0.0, -4.0, 0.0], [3.0, 0.0, -1.0, 6.0, -1.0], [6.0, 1.0, 
-7.0, 7.0, -1.0]], [[-1.0, 4.0, -6.0, 5.0, 7.0], [4.0, 0.0, -5.0, -4.0, -5.0], [6.0, 6.0, -1.0, 1.0, 2.0], [-7.0, 5.0, -6.0, 
-7.0, -7.0]], [[7.0, 0.0, 4.0, 6.0, 0.0], [-1.0, -3.0, 5.0, 7.0, 6.0], [1.0, -3.0, 6.0, 5.0, 0.0], [-2.0, -4.0, 0.0, 7.0, 
-0.0]]], [[[1.0, 4.0, 0.0, 5.0, 5.0], [0.0, 6.0, 3.0, 5.0, -6.0], [-7.0, -4.0, -5.0, 0.0, 1.0], [5.0, -7.0, -4.0, 1.0, 1.0]], 
-[[3.0, 1.0, -5.0, -7.0, -6.0], [4.0, -2.0, 0.0, -3.0, 3.0], [-5.0, 0.0, 1.0, 0.0, 2.0], [-2.0, -7.0, -2.0, 0.0, 3.0]], [[-5.0, 
-3.0, 0.0, -1.0, 4.0], [4.0, 3.0, 3.0, -5.0, 0.0], [6.0, 5.0, 2.0, 0.0, 0.0], [-7.0, 1.0, -1.0, 2.0, -4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, -1.0, 7.0], [1.0, -6.0, -7.0]])+(1.-msk_arg1)*numpy.array([[0.0, -5.0, 0.0], [-3.0, 0.0, 
-0.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[66.0, -24.0, 71.0, 87.0, 4.0], [-63.0, -26.0, 22.0, 107.0, 23.0], [-15.0, -66.0, 17.0, 40.0, 
--14.0], [65.0, -4.0, 28.0, 36.0, 17.0]])+(1.-msk_ref)*numpy.array([[2.0, -32.0, 30.0, -40.0, -50.0], [-20.0, -18.0, 16.0, 5.0, 
-43.0], [-9.0, -18.0, 20.0, -5.0, -13.0], [20.0, -4.0, 42.0, -38.0, 32.0]])
+   def test_generalTensorProduct_array_rank4_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[[[-6.0, 2.0, 1.0], [1.0, 7.0, 0.0]], [[-4.0, -4.0, 5.0], [-5.0, 1.0, 0.0]], [[-1.0, 4.0, 2.0], [5.0, 
+-7.0, -6.0]], [[7.0, 0.0, -5.0], [-3.0, 0.0, 0.0]], [[4.0, 5.0, -2.0], [3.0, 7.0, -7.0]]], [[[6.0, -6.0, 0.0], [6.0, -1.0, 
+-4.0]], [[1.0, 4.0, 0.0], [-3.0, -3.0, -6.0]], [[-5.0, 5.0, 3.0], [-7.0, 1.0, 5.0]], [[0.0, 0.0, 1.0], [-3.0, 2.0, 3.0]], 
+[[4.0, 0.0, -3.0], [4.0, -6.0, -6.0]]], [[[-5.0, -6.0, 4.0], [-2.0, -7.0, 0.0]], [[-1.0, -5.0, -3.0], [-6.0, 0.0, 3.0]], [[0.0, 
+-4.0, 2.0], [2.0, -3.0, 6.0]], [[0.0, -7.0, 6.0], [5.0, 0.0, 2.0]], [[-3.0, -6.0, -1.0], [0.0, -2.0, 0.0]]], [[[1.0, 4.0, 4.0], 
+[3.0, -1.0, -6.0]], [[-3.0, 7.0, 3.0], [0.0, 7.0, 5.0]], [[-1.0, -5.0, 2.0], [6.0, -4.0, -4.0]], [[0.0, -7.0, 7.0], [-5.0, 
+-5.0, -1.0]], [[-5.0, -1.0, 3.0], [-4.0, 6.0, 5.0]]]])
+      arg1=Data(numpy.array([[-1.0, 7.0, -2.0], [6.0, 2.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -5.0, -3.0], [-2.0, 7.0, 0.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[38.0, -62.0, 5.0, -15.0, 25.0], [-38.0, -33.0, 24.0, 2.0, -22.0], [-71.0, -46.0, 10.0, -19.0, 
+-41.0], [-1.0, 90.0, -34.0, -109.0, 10.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[52.0, 34.0, -82.0, 0.0, 12.0], [-7.0, -38.0, 2.0, 17.0, -53.0], [-12.0, 49.0, -11.0, 
+7.0, 28.0], [-48.0, 14.0, -18.0, -11.0, 61.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank1_offset0(self):
-      arg0=numpy.array([[-4.0, -3.0, 5.0, 0.0, 7.0], [-5.0, 5.0, 0.0, 2.0, -6.0], [-7.0, 7.0, -6.0, -4.0, -4.0], [-3.0, 0.0, 
-0.0, 5.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, -2.0])+(1.-msk_arg1)*numpy.array([-3.0, 3.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-24.0, 8.0], [-18.0, 6.0], [30.0, -10.0], [0.0, 0.0], [42.0, -14.0]], [[-30.0, 10.0], [30.0, 
--10.0], [0.0, 0.0], [12.0, -4.0], [-36.0, 12.0]], [[-42.0, 14.0], [42.0, -14.0], [-36.0, 12.0], [-24.0, 8.0], [-24.0, 8.0]], 
-[[-18.0, 6.0], [0.0, 0.0], [0.0, 0.0], [30.0, -10.0], [12.0, -4.0]]])+(1.-msk_ref)*numpy.array([[[12.0, -12.0], [9.0, -9.0], 
-[-15.0, 15.0], [0.0, 0.0], [-21.0, 21.0]], [[15.0, -15.0], [-15.0, 15.0], [0.0, 0.0], [-6.0, 6.0], [18.0, -18.0]], [[21.0, 
--21.0], [-21.0, 21.0], [18.0, -18.0], [12.0, -12.0], [12.0, -12.0]], [[9.0, -9.0], [0.0, 0.0], [0.0, 0.0], [-15.0, 15.0], 
-[-6.0, 6.0]]])
+   def test_generalTensorProduct_array_rank2_taggedData_rank1_offset0(self):
+      arg0=numpy.array([[4.0, 1.0, 1.0, -4.0, -6.0], [-3.0, -4.0, -3.0, 7.0, 2.0], [4.0, -6.0, 5.0, 4.0, 0.0], [1.0, 2.0, 5.0, 
+-2.0, -7.0]])
+      arg1=Data(numpy.array([5.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 5.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[20.0, -4.0], [5.0, -1.0], [5.0, -1.0], [-20.0, 4.0], [-30.0, 6.0]], [[-15.0, 3.0], [-20.0, 4.0], 
+[-15.0, 3.0], [35.0, -7.0], [10.0, -2.0]], [[20.0, -4.0], [-30.0, 6.0], [25.0, -5.0], [20.0, -4.0], [0.0, 0.0]], [[5.0, -1.0], 
+[10.0, -2.0], [25.0, -5.0], [-10.0, 2.0], [-35.0, 7.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-24.0, 20.0], [-6.0, 5.0], [-6.0, 5.0], [24.0, -20.0], [36.0, -30.0]], [[18.0, 
+-15.0], [24.0, -20.0], [18.0, -15.0], [-42.0, 35.0], [-12.0, 10.0]], [[-24.0, 20.0], [36.0, -30.0], [-30.0, 25.0], [-24.0, 
+20.0], [0.0, 0.0]], [[-6.0, 5.0], [-12.0, 10.0], [-30.0, 25.0], [12.0, -10.0], [42.0, -35.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[[-3.0, -7.0, 6.0, -7.0, 6.0], [6.0, -7.0, 7.0, 3.0, 0.0], [-4.0, 0.0, -7.0, -6.0, -5.0], [0.0, 5.0, 
--6.0, -3.0, 0.0]], [[6.0, 0.0, -6.0, 6.0, -6.0], [-2.0, -3.0, -5.0, -3.0, 0.0], [-5.0, -3.0, -6.0, 6.0, 6.0], [2.0, -6.0, 0.0, 
-1.0, 0.0]], [[0.0, -2.0, 5.0, -5.0, 6.0], [3.0, 5.0, -5.0, 0.0, -3.0], [7.0, 6.0, -5.0, 5.0, -5.0], [4.0, -6.0, -1.0, 3.0, 
--6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, -6.0], [-3.0, -7.0], [4.0, -7.0]])+(1.-msk_arg1)*numpy.array([[7.0, 1.0], [5.0, 0.0], 
-[0.0, 1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-3.0, -24.0], [27.0, 56.0], [8.0, -29.0], [-3.0, 35.0], [12.0, -36.0]], [[-12.0, -43.0], 
-[64.0, 28.0], [-40.0, 28.0], [-6.0, 3.0], [-12.0, 21.0]], [[63.0, 10.0], [33.0, -21.0], [33.0, 119.0], [32.0, -41.0], [-13.0, 
-23.0]], [[10.0, -42.0], [-31.0, 54.0], [26.0, 43.0], [24.0, -10.0], [-24.0, 42.0]]])+(1.-msk_ref)*numpy.array([[[9.0, -3.0], 
-[-49.0, -9.0], [12.0, 11.0], [-19.0, -12.0], [12.0, 12.0]], [[32.0, 9.0], [-64.0, -2.0], [24.0, 2.0], [6.0, 3.0], [0.0, -3.0]], 
-[[-53.0, 3.0], [-15.0, 6.0], [-79.0, -12.0], [-12.0, -1.0], [-5.0, -10.0]], [[10.0, 4.0], [5.0, -1.0], [-42.0, -7.0], [-16.0, 
-0.0], [0.0, -6.0]]])
+   def test_generalTensorProduct_array_rank3_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[[0.0, 0.0, -7.0], [0.0, 4.0, 1.0], [4.0, -7.0, -7.0], [7.0, -4.0, -2.0], [2.0, -2.0, 4.0]], [[2.0, 
+-1.0, -5.0], [5.0, 0.0, -1.0], [3.0, -1.0, 3.0], [5.0, 0.0, 5.0], [-1.0, -3.0, -1.0]], [[5.0, -2.0, -2.0], [4.0, 0.0, -1.0], 
+[6.0, 2.0, 7.0], [-3.0, 6.0, 6.0], [0.0, 6.0, 4.0]], [[1.0, 7.0, 0.0], [-7.0, 5.0, -4.0], [3.0, 6.0, -7.0], [-2.0, -6.0, 1.0], 
+[-1.0, 0.0, 0.0]]])
+      arg1=Data(numpy.array([[6.0, -5.0], [-7.0, 5.0], [2.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, -2.0], [0.0, 7.0], [5.0, 2.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-14.0, 0.0], [-26.0, 20.0], [59.0, -55.0], [66.0, -55.0], [34.0, -20.0]], [[9.0, -15.0], [28.0, 
+-25.0], [31.0, -20.0], [40.0, -25.0], [13.0, -10.0]], [[40.0, -35.0], [22.0, -20.0], [36.0, -20.0], [-48.0, 45.0], [-34.0, 
+30.0]], [[-43.0, 30.0], [-85.0, 60.0], [-38.0, 15.0], [32.0, -20.0], [-6.0, 5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-35.0, -14.0], [5.0, 30.0], [-27.0, -71.0], [4.0, -46.0], [24.0, -10.0]], [[-21.0, 
+-21.0], [5.0, -12.0], [21.0, -7.0], [35.0, 0.0], [-7.0, -21.0]], [[0.0, -28.0], [3.0, -10.0], [47.0, 16.0], [24.0, 60.0], 
+[20.0, 50.0]], [[2.0, 47.0], [-34.0, 41.0], [-29.0, 22.0], [1.0, -36.0], [-2.0, 2.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[[[-3.0, -3.0, 4.0, -6.0, 3.0], [1.0, 3.0, -1.0, 2.0, -5.0], [-2.0, -7.0, 7.0, -1.0, -6.0], [5.0, 6.0, 
--2.0, 6.0, -2.0]], [[4.0, 3.0, 2.0, -6.0, -3.0], [-2.0, -5.0, -1.0, 2.0, 0.0], [4.0, -2.0, 0.0, 3.0, -7.0], [6.0, 1.0, -2.0, 
-0.0, 6.0]], [[4.0, 6.0, -4.0, -4.0, -5.0], [-5.0, -6.0, 7.0, -7.0, 6.0], [-4.0, 1.0, -7.0, 4.0, -3.0], [6.0, 0.0, 1.0, 3.0, 
--4.0]]], [[[-2.0, -6.0, 1.0, -7.0, 7.0], [1.0, -4.0, -5.0, 6.0, -5.0], [0.0, -5.0, -4.0, -6.0, 1.0], [-6.0, 7.0, 7.0, 2.0, 
-2.0]], [[1.0, -1.0, -5.0, -6.0, 1.0], [-2.0, 6.0, -4.0, 0.0, 5.0], [5.0, -1.0, 5.0, -1.0, -1.0], [-7.0, -5.0, -4.0, -5.0, 
-2.0]], [[-6.0, 7.0, -7.0, -7.0, -5.0], [2.0, 3.0, 0.0, -3.0, 7.0], [-4.0, 3.0, -7.0, -3.0, -1.0], [0.0, -4.0, 5.0, -4.0, 
--2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[5.0, -3.0], [2.0, -1.0], [2.0, -7.0]], [[-2.0, 2.0], [7.0, -4.0], [-7.0, 
-3.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 2.0], [0.0, -1.0], [0.0, -5.0]], [[1.0, -6.0], [3.0, -3.0], [3.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[54.0, -49.0], [-41.0, -23.0], [28.0, 15.0], [-29.0, 41.0], [27.0, 24.0]], [[-39.0, 50.0], 
-[22.0, 15.0], [-11.0, -39.0], [9.0, 44.0], [-17.0, -36.0]], [[53.0, -2.0], [-55.0, 19.0], [113.0, -21.0], [35.0, -45.0], 
-[-52.0, 49.0]], [[12.0, -47.0], [11.0, 3.0], [-89.0, 46.0], [25.0, -27.0], [18.0, 18.0]]])+(1.-msk_ref)*numpy.array([[[-8.0, 
--21.0], [21.0, 0.0], [-47.0, 35.0], [-28.0, 74.0], [-14.0, -11.0]], [[-2.0, 29.0], [14.0, 47.0], [-14.0, 6.0], [-9.0, 1.0], 
-[46.0, -25.0]], [[9.0, -3.0], [22.0, 16.0], [-31.0, 58.0], [-15.0, 14.0], [13.0, 7.0]], [[-42.0, 31.0], [-38.0, -16.0], [16.0, 
--37.0], [-43.0, 0.0], [8.0, -8.0]]])
+   def test_generalTensorProduct_array_rank4_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[[[-7.0, 5.0, 0.0], [5.0, 3.0, 5.0]], [[5.0, -2.0, 0.0], [-3.0, 6.0, 0.0]], [[5.0, 0.0, 0.0], [-7.0, 
+-3.0, -6.0]], [[6.0, -4.0, -1.0], [5.0, 6.0, -4.0]], [[-4.0, -7.0, -7.0], [-3.0, -4.0, -5.0]]], [[[5.0, -1.0, 7.0], [6.0, 6.0, 
+-1.0]], [[4.0, -7.0, 1.0], [-6.0, 2.0, -3.0]], [[0.0, -3.0, 3.0], [7.0, -2.0, 0.0]], [[-7.0, 7.0, -3.0], [4.0, -6.0, 2.0]], 
+[[-5.0, 3.0, -5.0], [5.0, -1.0, 0.0]]], [[[-6.0, 0.0, -2.0], [1.0, 1.0, -2.0]], [[5.0, -6.0, -2.0], [3.0, 3.0, 1.0]], [[2.0, 
+7.0, 6.0], [1.0, 0.0, -7.0]], [[-3.0, -6.0, -5.0], [0.0, -1.0, 0.0]], [[-2.0, -7.0, -7.0], [-7.0, -6.0, -7.0]]], [[[-2.0, 2.0, 
+3.0], [-7.0, 0.0, -1.0]], [[6.0, -4.0, -5.0], [-2.0, 0.0, 1.0]], [[7.0, -3.0, -5.0], [4.0, 2.0, -5.0]], [[7.0, -4.0, 4.0], 
+[7.0, 7.0, 4.0]], [[0.0, -4.0, -4.0], [-7.0, 2.0, 1.0]]]])
+      arg1=Data(numpy.array([[[4.0, -7.0], [2.0, 2.0], [1.0, 0.0]], [[2.0, 0.0], [-7.0, -4.0], [7.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 7.0], [-6.0, 5.0], [0.0, -6.0]], [[-4.0, -1.0], [-6.0, 3.0], [6.0, -3.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[6.0, 72.0], [-32.0, -63.0], [-15.0, -53.0], [-45.0, -94.0], [-50.0, 5.0]], [[-12.0, -66.0], 
+[-44.0, -65.0], [25.0, 2.0], [47.0, 97.0], [-2.0, 45.0]], [[-45.0, 28.0], [-2.0, -54.0], [-19.0, -35.0], [-22.0, 13.0], [-50.0, 
+-11.0]], [[-22.0, 13.0], [14.0, -45.0], [-24.0, -88.0], [17.0, -65.0], [-33.0, -11.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-38.0, -35.0], [-12.0, 46.0], [10.0, 51.0], [-56.0, 53.0], [48.0, -15.0]], [[-60.0, 
+3.0], [36.0, 8.0], [2.0, -46.0], [-10.0, -24.0], [-32.0, 2.0]], [[-22.0, -22.0], [12.0, 20.0], [-88.0, 33.0], [42.0, -24.0], 
+[64.0, 3.0]], [[10.0, -12.0], [38.0, 51.0], [-40.0, 81.0], [-22.0, 7.0], [46.0, 14.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank2_expandedData_rank2_offset0(self):
-      arg0=numpy.array([[4.0, 0.0, 0.0, 3.0, 6.0], [-1.0, 3.0, 3.0, 5.0, 2.0], [5.0, 7.0, 6.0, -6.0, 0.0], [-7.0, 4.0, -5.0, 
--6.0, 1.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, -6.0, 0.0, 1.0, 2.0], [5.0, 7.0, 3.0, -4.0, 2.0], [0.0, -7.0, 4.0, -1.0, -7.0], [5.0, 
-4.0, 5.0, -6.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 0.0, -5.0, -6.0, 5.0], [-4.0, 4.0, 0.0, 0.0, 2.0], [2.0, -6.0, 2.0, 
-7.0, -2.0], [7.0, -2.0, 0.0, -3.0, 1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-20.0, -24.0, 0.0, 4.0, 8.0], [20.0, 28.0, 12.0, -16.0, 8.0], [0.0, -28.0, 16.0, -4.0, 
--28.0], [20.0, 16.0, 20.0, -24.0, -16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[-15.0, -18.0, 0.0, 3.0, 6.0], [15.0, 21.0, 9.0, -12.0, 6.0], [0.0, -21.0, 12.0, -3.0, -21.0], [15.0, 12.0, 15.0, 
--18.0, -12.0]], [[-30.0, -36.0, 0.0, 6.0, 12.0], [30.0, 42.0, 18.0, -24.0, 12.0], [0.0, -42.0, 24.0, -6.0, -42.0], [30.0, 24.0, 
-30.0, -36.0, -24.0]]], [[[5.0, 6.0, 0.0, -1.0, -2.0], [-5.0, -7.0, -3.0, 4.0, -2.0], [0.0, 7.0, -4.0, 1.0, 7.0], [-5.0, -4.0, 
--5.0, 6.0, 4.0]], [[-15.0, -18.0, 0.0, 3.0, 6.0], [15.0, 21.0, 9.0, -12.0, 6.0], [0.0, -21.0, 12.0, -3.0, -21.0], [15.0, 12.0, 
-15.0, -18.0, -12.0]], [[-15.0, -18.0, 0.0, 3.0, 6.0], [15.0, 21.0, 9.0, -12.0, 6.0], [0.0, -21.0, 12.0, -3.0, -21.0], [15.0, 
-12.0, 15.0, -18.0, -12.0]], [[-25.0, -30.0, 0.0, 5.0, 10.0], [25.0, 35.0, 15.0, -20.0, 10.0], [0.0, -35.0, 20.0, -5.0, -35.0], 
-[25.0, 20.0, 25.0, -30.0, -20.0]], [[-10.0, -12.0, 0.0, 2.0, 4.0], [10.0, 14.0, 6.0, -8.0, 4.0], [0.0, -14.0, 8.0, -2.0, 
--14.0], [10.0, 8.0, 10.0, -12.0, -8.0]]], [[[-25.0, -30.0, 0.0, 5.0, 10.0], [25.0, 35.0, 15.0, -20.0, 10.0], [0.0, -35.0, 20.0, 
--5.0, -35.0], [25.0, 20.0, 25.0, -30.0, -20.0]], [[-35.0, -42.0, 0.0, 7.0, 14.0], [35.0, 49.0, 21.0, -28.0, 14.0], [0.0, -49.0, 
-28.0, -7.0, -49.0], [35.0, 28.0, 35.0, -42.0, -28.0]], [[-30.0, -36.0, 0.0, 6.0, 12.0], [30.0, 42.0, 18.0, -24.0, 12.0], [0.0, 
--42.0, 24.0, -6.0, -42.0], [30.0, 24.0, 30.0, -36.0, -24.0]], [[30.0, 36.0, 0.0, -6.0, -12.0], [-30.0, -42.0, -18.0, 24.0, 
--12.0], [0.0, 42.0, -24.0, 6.0, 42.0], [-30.0, -24.0, -30.0, 36.0, 24.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[35.0, 42.0, 0.0, -7.0, -14.0], [-35.0, -49.0, -21.0, 28.0, 
--14.0], [0.0, 49.0, -28.0, 7.0, 49.0], [-35.0, -28.0, -35.0, 42.0, 28.0]], [[-20.0, -24.0, 0.0, 4.0, 8.0], [20.0, 28.0, 12.0, 
--16.0, 8.0], [0.0, -28.0, 16.0, -4.0, -28.0], [20.0, 16.0, 20.0, -24.0, -16.0]], [[25.0, 30.0, 0.0, -5.0, -10.0], [-25.0, 
--35.0, -15.0, 20.0, -10.0], [0.0, 35.0, -20.0, 5.0, 35.0], [-25.0, -20.0, -25.0, 30.0, 20.0]], [[30.0, 36.0, 0.0, -6.0, -12.0], 
-[-30.0, -42.0, -18.0, 24.0, -12.0], [0.0, 42.0, -24.0, 6.0, 42.0], [-30.0, -24.0, -30.0, 36.0, 24.0]], [[-5.0, -6.0, 0.0, 1.0, 
-2.0], [5.0, 7.0, 3.0, -4.0, 2.0], [0.0, -7.0, 4.0, -1.0, -7.0], [5.0, 4.0, 5.0, -6.0, 
--4.0]]]])+(1.-msk_ref)*numpy.array([[[[-28.0, 0.0, -20.0, -24.0, 20.0], [-16.0, 16.0, 0.0, 0.0, 8.0], [8.0, -24.0, 8.0, 28.0, 
--8.0], [28.0, -8.0, 0.0, -12.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]], [[-21.0, 0.0, -15.0, -18.0, 15.0], [-12.0, 12.0, 0.0, 0.0, 6.0], [6.0, -18.0, 6.0, 21.0, -6.0], [21.0, -6.0, 0.0, -9.0, 
-3.0]], [[-42.0, 0.0, -30.0, -36.0, 30.0], [-24.0, 24.0, 0.0, 0.0, 12.0], [12.0, -36.0, 12.0, 42.0, -12.0], [42.0, -12.0, 0.0, 
--18.0, 6.0]]], [[[7.0, 0.0, 5.0, 6.0, -5.0], [4.0, -4.0, 0.0, 0.0, -2.0], [-2.0, 6.0, -2.0, -7.0, 2.0], [-7.0, 2.0, 0.0, 3.0, 
--1.0]], [[-21.0, 0.0, -15.0, -18.0, 15.0], [-12.0, 12.0, 0.0, 0.0, 6.0], [6.0, -18.0, 6.0, 21.0, -6.0], [21.0, -6.0, 0.0, -9.0, 
-3.0]], [[-21.0, 0.0, -15.0, -18.0, 15.0], [-12.0, 12.0, 0.0, 0.0, 6.0], [6.0, -18.0, 6.0, 21.0, -6.0], [21.0, -6.0, 0.0, -9.0, 
-3.0]], [[-35.0, 0.0, -25.0, -30.0, 25.0], [-20.0, 20.0, 0.0, 0.0, 10.0], [10.0, -30.0, 10.0, 35.0, -10.0], [35.0, -10.0, 0.0, 
--15.0, 5.0]], [[-14.0, 0.0, -10.0, -12.0, 10.0], [-8.0, 8.0, 0.0, 0.0, 4.0], [4.0, -12.0, 4.0, 14.0, -4.0], [14.0, -4.0, 0.0, 
--6.0, 2.0]]], [[[-35.0, 0.0, -25.0, -30.0, 25.0], [-20.0, 20.0, 0.0, 0.0, 10.0], [10.0, -30.0, 10.0, 35.0, -10.0], [35.0, 
--10.0, 0.0, -15.0, 5.0]], [[-49.0, 0.0, -35.0, -42.0, 35.0], [-28.0, 28.0, 0.0, 0.0, 14.0], [14.0, -42.0, 14.0, 49.0, -14.0], 
-[49.0, -14.0, 0.0, -21.0, 7.0]], [[-42.0, 0.0, -30.0, -36.0, 30.0], [-24.0, 24.0, 0.0, 0.0, 12.0], [12.0, -36.0, 12.0, 42.0, 
--12.0], [42.0, -12.0, 0.0, -18.0, 6.0]], [[42.0, 0.0, 30.0, 36.0, -30.0], [24.0, -24.0, 0.0, 0.0, -12.0], [-12.0, 36.0, -12.0, 
--42.0, 12.0], [-42.0, 12.0, 0.0, 18.0, -6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[49.0, 0.0, 35.0, 42.0, -35.0], [28.0, -28.0, 0.0, 0.0, -14.0], [-14.0, 42.0, -14.0, 
--49.0, 14.0], [-49.0, 14.0, 0.0, 21.0, -7.0]], [[-28.0, 0.0, -20.0, -24.0, 20.0], [-16.0, 16.0, 0.0, 0.0, 8.0], [8.0, -24.0, 
-8.0, 28.0, -8.0], [28.0, -8.0, 0.0, -12.0, 4.0]], [[35.0, 0.0, 25.0, 30.0, -25.0], [20.0, -20.0, 0.0, 0.0, -10.0], [-10.0, 
-30.0, -10.0, -35.0, 10.0], [-35.0, 10.0, 0.0, 15.0, -5.0]], [[42.0, 0.0, 30.0, 36.0, -30.0], [24.0, -24.0, 0.0, 0.0, -12.0], 
-[-12.0, 36.0, -12.0, -42.0, 12.0], [-42.0, 12.0, 0.0, 18.0, -6.0]], [[-7.0, 0.0, -5.0, -6.0, 5.0], [-4.0, 4.0, 0.0, 0.0, 2.0], 
-[2.0, -6.0, 2.0, 7.0, -2.0], [7.0, -2.0, 0.0, -3.0, 1.0]]]])
+   def test_generalTensorProduct_array_rank2_taggedData_rank2_offset0(self):
+      arg0=numpy.array([[-5.0, -2.0, 2.0, -1.0, 1.0], [3.0, -4.0, 7.0, 0.0, -1.0], [-3.0, -1.0, -4.0, -4.0, 3.0], [1.0, -6.0, 
+3.0, -2.0, -5.0]])
+      arg1=Data(numpy.array([[-1.0, 3.0, 3.0, -1.0, -4.0], [4.0, 6.0, -1.0, 0.0, -3.0], [3.0, 1.0, 7.0, -1.0, -4.0], [-2.0, 
+0.0, -2.0, -5.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, -6.0, 2.0, 7.0, -5.0], [-2.0, 3.0, -6.0, 7.0, 4.0], [-7.0, 6.0, -5.0, 0.0, 7.0], 
+[4.0, 1.0, 1.0, 3.0, -1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[5.0, -15.0, -15.0, 5.0, 20.0], [-20.0, -30.0, 5.0, 0.0, 15.0], [-15.0, -5.0, -35.0, 5.0, 20.0], 
+[10.0, 0.0, 10.0, 25.0, 5.0]], [[2.0, -6.0, -6.0, 2.0, 8.0], [-8.0, -12.0, 2.0, 0.0, 6.0], [-6.0, -2.0, -14.0, 2.0, 8.0], [4.0, 
+0.0, 4.0, 10.0, 2.0]], [[-2.0, 6.0, 6.0, -2.0, -8.0], [8.0, 12.0, -2.0, 0.0, -6.0], [6.0, 2.0, 14.0, -2.0, -8.0], [-4.0, 0.0, 
+-4.0, -10.0, -2.0]], [[1.0, -3.0, -3.0, 1.0, 4.0], [-4.0, -6.0, 1.0, 0.0, 3.0], [-3.0, -1.0, -7.0, 1.0, 4.0], [2.0, 0.0, 2.0, 
+5.0, 1.0]], [[-1.0, 3.0, 3.0, -1.0, -4.0], [4.0, 6.0, -1.0, 0.0, -3.0], [3.0, 1.0, 7.0, -1.0, -4.0], [-2.0, 0.0, -2.0, -5.0, 
+-1.0]]], [[[-3.0, 9.0, 9.0, -3.0, -12.0], [12.0, 18.0, -3.0, 0.0, -9.0], [9.0, 3.0, 21.0, -3.0, -12.0], [-6.0, 0.0, -6.0, 
+-15.0, -3.0]], [[4.0, -12.0, -12.0, 4.0, 16.0], [-16.0, -24.0, 4.0, 0.0, 12.0], [-12.0, -4.0, -28.0, 4.0, 16.0], [8.0, 0.0, 
+8.0, 20.0, 4.0]], [[-7.0, 21.0, 21.0, -7.0, -28.0], [28.0, 42.0, -7.0, 0.0, -21.0], [21.0, 7.0, 49.0, -7.0, -28.0], [-14.0, 
+0.0, -14.0, -35.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[1.0, -3.0, -3.0, 1.0, 4.0], [-4.0, -6.0, 1.0, 0.0, 3.0], [-3.0, -1.0, -7.0, 1.0, 4.0], [2.0, 0.0, 2.0, 5.0, 
+1.0]]], [[[3.0, -9.0, -9.0, 3.0, 12.0], [-12.0, -18.0, 3.0, 0.0, 9.0], [-9.0, -3.0, -21.0, 3.0, 12.0], [6.0, 0.0, 6.0, 15.0, 
+3.0]], [[1.0, -3.0, -3.0, 1.0, 4.0], [-4.0, -6.0, 1.0, 0.0, 3.0], [-3.0, -1.0, -7.0, 1.0, 4.0], [2.0, 0.0, 2.0, 5.0, 1.0]], 
+[[4.0, -12.0, -12.0, 4.0, 16.0], [-16.0, -24.0, 4.0, 0.0, 12.0], [-12.0, -4.0, -28.0, 4.0, 16.0], [8.0, 0.0, 8.0, 20.0, 4.0]], 
+[[4.0, -12.0, -12.0, 4.0, 16.0], [-16.0, -24.0, 4.0, 0.0, 12.0], [-12.0, -4.0, -28.0, 4.0, 16.0], [8.0, 0.0, 8.0, 20.0, 4.0]], 
+[[-3.0, 9.0, 9.0, -3.0, -12.0], [12.0, 18.0, -3.0, 0.0, -9.0], [9.0, 3.0, 21.0, -3.0, -12.0], [-6.0, 0.0, -6.0, -15.0, -3.0]]], 
+[[[-1.0, 3.0, 3.0, -1.0, -4.0], [4.0, 6.0, -1.0, 0.0, -3.0], [3.0, 1.0, 7.0, -1.0, -4.0], [-2.0, 0.0, -2.0, -5.0, -1.0]], 
+[[6.0, -18.0, -18.0, 6.0, 24.0], [-24.0, -36.0, 6.0, 0.0, 18.0], [-18.0, -6.0, -42.0, 6.0, 24.0], [12.0, 0.0, 12.0, 30.0, 
+6.0]], [[-3.0, 9.0, 9.0, -3.0, -12.0], [12.0, 18.0, -3.0, 0.0, -9.0], [9.0, 3.0, 21.0, -3.0, -12.0], [-6.0, 0.0, -6.0, -15.0, 
+-3.0]], [[2.0, -6.0, -6.0, 2.0, 8.0], [-8.0, -12.0, 2.0, 0.0, 6.0], [-6.0, -2.0, -14.0, 2.0, 8.0], [4.0, 0.0, 4.0, 10.0, 2.0]], 
+[[5.0, -15.0, -15.0, 5.0, 20.0], [-20.0, -30.0, 5.0, 0.0, 15.0], [-15.0, -5.0, -35.0, 5.0, 20.0], [10.0, 0.0, 10.0, 25.0, 
+5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-15.0, 30.0, -10.0, -35.0, 25.0], [10.0, -15.0, 30.0, -35.0, -20.0], [35.0, -30.0, 
+25.0, 0.0, -35.0], [-20.0, -5.0, -5.0, -15.0, 5.0]], [[-6.0, 12.0, -4.0, -14.0, 10.0], [4.0, -6.0, 12.0, -14.0, -8.0], [14.0, 
+-12.0, 10.0, 0.0, -14.0], [-8.0, -2.0, -2.0, -6.0, 2.0]], [[6.0, -12.0, 4.0, 14.0, -10.0], [-4.0, 6.0, -12.0, 14.0, 8.0], 
+[-14.0, 12.0, -10.0, 0.0, 14.0], [8.0, 2.0, 2.0, 6.0, -2.0]], [[-3.0, 6.0, -2.0, -7.0, 5.0], [2.0, -3.0, 6.0, -7.0, -4.0], 
+[7.0, -6.0, 5.0, 0.0, -7.0], [-4.0, -1.0, -1.0, -3.0, 1.0]], [[3.0, -6.0, 2.0, 7.0, -5.0], [-2.0, 3.0, -6.0, 7.0, 4.0], [-7.0, 
+6.0, -5.0, 0.0, 7.0], [4.0, 1.0, 1.0, 3.0, -1.0]]], [[[9.0, -18.0, 6.0, 21.0, -15.0], [-6.0, 9.0, -18.0, 21.0, 12.0], [-21.0, 
+18.0, -15.0, 0.0, 21.0], [12.0, 3.0, 3.0, 9.0, -3.0]], [[-12.0, 24.0, -8.0, -28.0, 20.0], [8.0, -12.0, 24.0, -28.0, -16.0], 
+[28.0, -24.0, 20.0, 0.0, -28.0], [-16.0, -4.0, -4.0, -12.0, 4.0]], [[21.0, -42.0, 14.0, 49.0, -35.0], [-14.0, 21.0, -42.0, 
+49.0, 28.0], [-49.0, 42.0, -35.0, 0.0, 49.0], [28.0, 7.0, 7.0, 21.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-3.0, 6.0, -2.0, -7.0, 5.0], [2.0, -3.0, 6.0, -7.0, -4.0], [7.0, 
+-6.0, 5.0, 0.0, -7.0], [-4.0, -1.0, -1.0, -3.0, 1.0]]], [[[-9.0, 18.0, -6.0, -21.0, 15.0], [6.0, -9.0, 18.0, -21.0, -12.0], 
+[21.0, -18.0, 15.0, 0.0, -21.0], [-12.0, -3.0, -3.0, -9.0, 3.0]], [[-3.0, 6.0, -2.0, -7.0, 5.0], [2.0, -3.0, 6.0, -7.0, -4.0], 
+[7.0, -6.0, 5.0, 0.0, -7.0], [-4.0, -1.0, -1.0, -3.0, 1.0]], [[-12.0, 24.0, -8.0, -28.0, 20.0], [8.0, -12.0, 24.0, -28.0, 
+-16.0], [28.0, -24.0, 20.0, 0.0, -28.0], [-16.0, -4.0, -4.0, -12.0, 4.0]], [[-12.0, 24.0, -8.0, -28.0, 20.0], [8.0, -12.0, 
+24.0, -28.0, -16.0], [28.0, -24.0, 20.0, 0.0, -28.0], [-16.0, -4.0, -4.0, -12.0, 4.0]], [[9.0, -18.0, 6.0, 21.0, -15.0], [-6.0, 
+9.0, -18.0, 21.0, 12.0], [-21.0, 18.0, -15.0, 0.0, 21.0], [12.0, 3.0, 3.0, 9.0, -3.0]]], [[[3.0, -6.0, 2.0, 7.0, -5.0], [-2.0, 
+3.0, -6.0, 7.0, 4.0], [-7.0, 6.0, -5.0, 0.0, 7.0], [4.0, 1.0, 1.0, 3.0, -1.0]], [[-18.0, 36.0, -12.0, -42.0, 30.0], [12.0, 
+-18.0, 36.0, -42.0, -24.0], [42.0, -36.0, 30.0, 0.0, -42.0], [-24.0, -6.0, -6.0, -18.0, 6.0]], [[9.0, -18.0, 6.0, 21.0, -15.0], 
+[-6.0, 9.0, -18.0, 21.0, 12.0], [-21.0, 18.0, -15.0, 0.0, 21.0], [12.0, 3.0, 3.0, 9.0, -3.0]], [[-6.0, 12.0, -4.0, -14.0, 
+10.0], [4.0, -6.0, 12.0, -14.0, -8.0], [14.0, -12.0, 10.0, 0.0, -14.0], [-8.0, -2.0, -2.0, -6.0, 2.0]], [[-15.0, 30.0, -10.0, 
+-35.0, 25.0], [10.0, -15.0, 30.0, -35.0, -20.0], [35.0, -30.0, 25.0, 0.0, -35.0], [-20.0, -5.0, -5.0, -15.0, 5.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank3_offset1(self):
-      arg0=numpy.array([[[3.0, -6.0, 2.0, -3.0, -5.0], [-6.0, 4.0, 0.0, 1.0, 6.0], [-3.0, -4.0, 3.0, 5.0, 0.0], [-6.0, 4.0, 
--4.0, 0.0, -5.0]], [[-4.0, -5.0, 1.0, 1.0, 4.0], [2.0, 0.0, 3.0, 4.0, 0.0], [-3.0, -5.0, 1.0, 6.0, 0.0], [7.0, 1.0, 2.0, -6.0, 
--1.0]], [[-7.0, -3.0, 0.0, -1.0, 0.0], [4.0, 1.0, 1.0, 0.0, -6.0], [4.0, -1.0, 0.0, -6.0, -4.0], [2.0, -6.0, -6.0, -2.0, 
--6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, 4.0, 6.0, 6.0, -6.0], [-6.0, -2.0, -7.0, 7.0, -1.0], [-1.0, 0.0, 2.0, -7.0, 3.0], [4.0, 
-1.0, -7.0, 2.0, -6.0]], [[-6.0, -5.0, 7.0, -3.0, -4.0], [7.0, -5.0, 3.0, 4.0, -6.0], [5.0, -2.0, -6.0, 7.0, -3.0], [7.0, 6.0, 
-1.0, -2.0, 5.0]], [[-1.0, 2.0, 3.0, 6.0, -4.0], [4.0, -5.0, 2.0, -4.0, -1.0], [7.0, 6.0, -1.0, 4.0, 2.0], [5.0, -2.0, -1.0, 
-4.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 7.0, -5.0, -2.0, 3.0], [1.0, 0.0, 0.0, 2.0, 0.0], [6.0, 7.0, 2.0, -6.0, 0.0], 
-[7.0, 7.0, -3.0, -1.0, -3.0]], [[1.0, -4.0, -4.0, 1.0, -4.0], [5.0, -1.0, 7.0, -5.0, -7.0], [5.0, 3.0, -1.0, -2.0, -2.0], [1.0, 
-6.0, -5.0, 3.0, 1.0]], [[-4.0, -7.0, -5.0, 0.0, 4.0], [2.0, -2.0, 5.0, -1.0, 5.0], [-6.0, 1.0, 7.0, -4.0, -3.0], [-1.0, -7.0, 
-0.0, 1.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[37.0, 18.0, -31.0, -12.0, 26.0], [-74.0, 49.0, -47.0, 33.0, 28.0], [-72.0, -34.0, 37.0, 
--77.0, 7.0], [-51.0, -7.0, -18.0, -14.0, -87.0]], [[21.0, -5.0, -80.0, -39.0, 68.0], [-11.0, 52.0, 21.0, -50.0, 39.0], [-40.0, 
--8.0, 21.0, -5.0, -9.0], [-74.0, -30.0, 40.0, -14.0, -10.0]], [[-2.0, 3.0, 19.0, 9.0, -16.0], [-5.0, -9.0, -11.0, 18.0, -8.0], 
-[3.0, -2.0, -2.0, -7.0, 3.0], [15.0, 8.0, -13.0, 2.0, -7.0]], [[-11.0, -19.0, -14.0, -27.0, 18.0], [21.0, 6.0, 22.0, -13.0, 
--2.0], [1.0, -8.0, -11.0, 24.0, -14.0], [-10.0, 5.0, 23.0, -12.0, 16.0]], [[-34.0, -40.0, -2.0, -42.0, 14.0], [58.0, -10.0, 
-47.0, -19.0, -19.0], [25.0, -8.0, -34.0, 63.0, -27.0], [8.0, 19.0, 39.0, -18.0, 50.0]]], [[[-28.0, -26.0, -10.0, -18.0, 12.0], 
-[66.0, -18.0, 56.0, -50.0, -10.0], [44.0, 20.0, -28.0, 72.0, -16.0], [10.0, -2.0, 40.0, 0.0, 74.0]], [[7.0, 18.0, 27.0, 30.0, 
--28.0], [-20.0, -13.0, -26.0, 24.0, -5.0], [3.0, 6.0, 7.0, -24.0, 14.0], [21.0, 2.0, -29.0, 12.0, -17.0]], [[-19.0, -13.0, 
-24.0, -3.0, -16.0], [25.0, -20.0, 11.0, 8.0, -19.0], [22.0, 0.0, -19.0, 25.0, -7.0], [26.0, 16.0, 2.0, -2.0, 22.0]], [[-22.0, 
--16.0, 34.0, -6.0, -22.0], [22.0, -22.0, 5.0, 23.0, -25.0], [19.0, -8.0, -22.0, 21.0, -9.0], [32.0, 25.0, -3.0, -6.0, 14.0]], 
-[[18.0, 12.0, 18.0, 0.0, -12.0], [-60.0, 18.0, -54.0, 66.0, 0.0], [-48.0, -36.0, 18.0, -66.0, 6.0], [-6.0, 18.0, -36.0, -12.0, 
--78.0]]], [[[8.0, 11.0, -27.0, 15.0, 14.0], [13.0, 1.0, 20.0, -49.0, 17.0], [16.0, 30.0, 8.0, 16.0, 8.0], [-13.0, -29.0, 14.0, 
-16.0, 31.0]], [[23.0, 7.0, -62.0, -15.0, 48.0], [-15.0, 38.0, 11.0, -44.0, 35.0], [-28.0, 4.0, 23.0, -11.0, 1.0], [-56.0, 
--32.0, 24.0, -2.0, -8.0]], [[0.0, 7.0, 25.0, 15.0, -22.0], [-11.0, -11.0, -18.0, 25.0, -9.0], [2.0, -2.0, 0.0, -14.0, 6.0], 
-[19.0, 9.0, -20.0, 4.0, -13.0]], [[-20.0, -22.0, 54.0, -24.0, -30.0], [-12.0, -10.0, -29.0, 83.0, -35.0], [-17.0, -48.0, -20.0, 
--17.0, -15.0], [32.0, 53.0, -23.0, -26.0, -42.0]], [[4.0, -8.0, -12.0, -24.0, 16.0], [-16.0, 20.0, -8.0, 16.0, 4.0], [-28.0, 
--24.0, 4.0, -16.0, -8.0], [-20.0, 8.0, 4.0, -16.0, -28.0]]], [[[-56.0, -55.0, 19.0, -45.0, 0.0], [93.0, -33.0, 67.0, -22.0, 
--38.0], [55.0, -2.0, -56.0, 99.0, -35.0], [35.0, 32.0, 47.0, -18.0, 85.0]], [[8.0, -1.0, 13.0, -15.0, -4.0], [-41.0, 17.0, 
--37.0, 56.0, -4.0], [-41.0, -38.0, 8.0, -45.0, -3.0], [-7.0, 22.0, -21.0, -18.0, -61.0]], [[-14.0, -38.0, -28.0, -66.0, 40.0], 
-[14.0, 28.0, 22.0, 4.0, -2.0], [-28.0, -40.0, -14.0, 18.0, -30.0], [-32.0, 20.0, 36.0, -36.0, -8.0]], [[38.0, 26.0, -48.0, 6.0, 
-32.0], [-50.0, 40.0, -22.0, -16.0, 38.0], [-44.0, 0.0, 38.0, -50.0, 14.0], [-52.0, -32.0, -4.0, 4.0, -44.0]], [[2.0, -27.0, 
--55.0, -63.0, 58.0], [-1.0, 45.0, 20.0, -15.0, 17.0], [-42.0, -34.0, 2.0, 4.0, -24.0], [-57.0, 1.0, 40.0, -32.0, 
--17.0]]]])+(1.-msk_ref)*numpy.array([[[[45.0, 86.0, 36.0, -10.0, -3.0], [-31.0, 18.0, -63.0, 33.0, -7.0], [40.0, 2.0, -39.0, 
-18.0, 29.0], [24.0, 46.0, 11.0, -22.0, -13.0]], [[-35.0, -1.0, 65.0, 7.0, -10.0], [-37.0, 11.0, -50.0, 16.0, 20.0], [-43.0, 
--60.0, -28.0, 58.0, 19.0], [-44.0, -51.0, 43.0, -12.0, 13.0]], [[15.0, 10.0, -14.0, -3.0, 2.0], [7.0, -1.0, 7.0, -1.0, -7.0], 
-[17.0, 17.0, 3.0, -14.0, -2.0], [15.0, 20.0, -11.0, 1.0, -5.0]], [[-16.0, -18.0, 16.0, 7.0, -17.0], [0.0, 1.0, 2.0, -10.0, 
--12.0], [-7.0, -19.0, -14.0, 20.0, 1.0], [-19.0, -8.0, 4.0, 5.0, 10.0]], [[-31.0, -51.0, 9.0, 14.0, -31.0], [15.0, -4.0, 28.0, 
--30.0, -28.0], [-10.0, -23.0, -14.0, 22.0, -8.0], [-31.0, -11.0, -5.0, 17.0, 19.0]]], [[[-56.0, -78.0, 2.0, 14.0, -10.0], 
-[12.0, -10.0, 34.0, -26.0, 6.0], [-50.0, -32.0, 14.0, 16.0, -16.0], [-44.0, -58.0, 8.0, 16.0, 20.0]], [[24.0, 21.0, -25.0, 
--8.0, 16.0], [6.0, -2.0, 5.0, 7.0, 5.0], [18.0, 29.0, 15.0, -28.0, -3.0], [27.0, 21.0, -12.0, -3.0, -12.0]], [[-1.0, -19.0, 
--17.0, 3.0, -8.0], [17.0, -5.0, 26.0, -16.0, -16.0], [9.0, 10.0, 4.0, -10.0, -9.0], [2.0, 11.0, -15.0, 10.0, 3.0]], [[11.0, 
--9.0, -21.0, 2.0, -13.0], [21.0, -4.0, 28.0, -18.0, -28.0], [26.0, 19.0, -2.0, -14.0, -8.0], [11.0, 31.0, -23.0, 11.0, 1.0]], 
-[[66.0, 84.0, 0.0, -12.0, -6.0], [-6.0, 12.0, -30.0, 18.0, -30.0], [72.0, 36.0, -30.0, -12.0, 18.0], [48.0, 84.0, -18.0, -12.0, 
--18.0]]], [[[-40.0, -37.0, 7.0, 3.0, 19.0], [-10.0, -5.0, -1.0, 5.0, 41.0], [-57.0, -26.0, 25.0, 8.0, -6.0], [-28.0, -67.0, 
-24.0, -2.0, 6.0]], [[-29.0, -1.0, 45.0, 3.0, 4.0], [-31.0, 7.0, -40.0, 18.0, 30.0], [-43.0, -44.0, -10.0, 38.0, 13.0], [-32.0, 
--51.0, 37.0, -12.0, 7.0]], [[22.0, 17.0, -19.0, -5.0, 5.0], [8.0, -1.0, 7.0, 1.0, -7.0], [23.0, 24.0, 5.0, -20.0, -2.0], [22.0, 
-27.0, -14.0, 0.0, -8.0]], [[65.0, 53.0, -19.0, -4.0, -33.0], [23.0, 6.0, 12.0, -14.0, -72.0], [96.0, 47.0, -38.0, -18.0, 6.0], 
-[47.0, 113.0, -45.0, 7.0, -9.0]], [[16.0, 28.0, 20.0, 0.0, -16.0], [-8.0, 8.0, -20.0, 4.0, -20.0], [24.0, -4.0, -28.0, 16.0, 
-12.0], [4.0, 28.0, 0.0, -4.0, 0.0]]], [[[-43.0, -84.0, -8.0, 19.0, -38.0], [33.0, -11.0, 59.0, -49.0, -39.0], [-13.0, -19.0, 
--5.0, 14.0, -20.0], [-37.0, -14.0, -17.0, 29.0, 25.0]], [[53.0, 66.0, 6.0, -7.0, -16.0], [-3.0, 11.0, -23.0, 9.0, -37.0], 
-[65.0, 25.0, -35.0, -2.0, 16.0], [35.0, 76.0, -17.0, -7.0, -11.0]], [[-2.0, 6.0, 42.0, 10.0, -44.0], [-6.0, 10.0, -16.0, -12.0, 
--44.0], [22.0, -28.0, -52.0, 44.0, 14.0], [-20.0, 26.0, 2.0, 4.0, 14.0]], [[2.0, 38.0, 34.0, -6.0, 16.0], [-34.0, 10.0, -52.0, 
-32.0, 32.0], [-18.0, -20.0, -8.0, 20.0, 18.0], [-4.0, -22.0, 30.0, -20.0, -6.0]], [[-12.0, 11.0, 59.0, 9.0, -35.0], [-22.0, 
-13.0, -37.0, 1.0, -23.0], [1.0, -44.0, -51.0, 56.0, 20.0], [-30.0, 1.0, 20.0, -4.0, 14.0]]]])
+   def test_generalTensorProduct_array_rank3_taggedData_rank3_offset1(self):
+      arg0=numpy.array([[[5.0, 1.0, -6.0], [6.0, -5.0, -7.0], [-2.0, 3.0, 7.0], [2.0, 1.0, 0.0], [0.0, -3.0, 7.0]], [[6.0, 
+-3.0, 7.0], [4.0, 4.0, 7.0], [5.0, 1.0, -7.0], [-1.0, -5.0, 3.0], [-1.0, 0.0, 4.0]], [[0.0, 0.0, 1.0], [-4.0, -7.0, -2.0], 
+[7.0, 3.0, -3.0], [0.0, 2.0, -1.0], [-7.0, -4.0, 5.0]], [[5.0, 0.0, -4.0], [-7.0, 4.0, 4.0], [-3.0, 2.0, -5.0], [0.0, -3.0, 
+3.0], [-5.0, 3.0, -3.0]]])
+      arg1=Data(numpy.array([[[0.0, -2.0, 3.0, 6.0, -1.0], [-7.0, 6.0, 1.0, 0.0, 0.0], [6.0, 2.0, 7.0, -3.0, 0.0], [-3.0, -4.0, 
+5.0, 6.0, -2.0]], [[3.0, -4.0, -3.0, 5.0, 5.0], [5.0, 0.0, 1.0, -2.0, 1.0], [5.0, 7.0, 4.0, -7.0, -7.0], [1.0, 1.0, 7.0, 1.0, 
+-6.0]], [[5.0, -6.0, 3.0, 2.0, 0.0], [2.0, 0.0, 6.0, 0.0, 5.0], [0.0, 3.0, 1.0, 2.0, -2.0], [-5.0, -5.0, 6.0, 0.0, 
+2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -7.0, 4.0, 6.0, -6.0], [2.0, 5.0, -6.0, -6.0, 4.0], [-4.0, -6.0, 1.0, 4.0, 
+6.0], [-3.0, -1.0, 0.0, 0.0, -5.0]], [[-6.0, 5.0, 1.0, 0.0, -5.0], [1.0, 1.0, 2.0, 5.0, 7.0], [-2.0, -1.0, 3.0, 5.0, -6.0], 
+[6.0, 1.0, -1.0, -6.0, -6.0]], [[-5.0, -4.0, -1.0, -7.0, 0.0], [6.0, -7.0, 5.0, -3.0, -3.0], [-4.0, 0.0, -4.0, 2.0, -7.0], 
+[-1.0, 5.0, 1.0, 1.0, -3.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-27.0, 22.0, -6.0, 23.0, 0.0], [-42.0, 30.0, -30.0, -2.0, -29.0], [35.0, -1.0, 33.0, -34.0, 
+5.0], [16.0, 11.0, -4.0, 31.0, -28.0]], [[-50.0, 50.0, 12.0, -3.0, -31.0], [-81.0, 36.0, -41.0, 10.0, -40.0], [11.0, -44.0, 
+15.0, 3.0, 49.0], [12.0, 6.0, -47.0, 31.0, 4.0]], [[44.0, -50.0, 6.0, 17.0, 17.0], [43.0, -12.0, 43.0, -6.0, 38.0], [3.0, 38.0, 
+5.0, -1.0, -35.0], [-26.0, -24.0, 53.0, -9.0, 0.0]], [[3.0, -8.0, 3.0, 17.0, 3.0], [-9.0, 12.0, 3.0, -2.0, 1.0], [17.0, 11.0, 
+18.0, -13.0, -7.0], [-5.0, -7.0, 17.0, 13.0, -10.0]], [[26.0, -30.0, 30.0, -1.0, -15.0], [-1.0, 0.0, 39.0, 6.0, 32.0], [-15.0, 
+0.0, -5.0, 35.0, 7.0], [-38.0, -38.0, 21.0, -3.0, 32.0]]], [[[26.0, -42.0, 48.0, 35.0, -21.0], [-43.0, 36.0, 45.0, 6.0, 32.0], 
+[21.0, 12.0, 37.0, 17.0, 7.0], [-56.0, -62.0, 51.0, 33.0, 20.0]], [[47.0, -66.0, 21.0, 58.0, 16.0], [6.0, 24.0, 50.0, -8.0, 
+39.0], [44.0, 57.0, 51.0, -26.0, -42.0], [-43.0, -47.0, 90.0, 28.0, -18.0]], [[-32.0, 28.0, -9.0, 21.0, 0.0], [-44.0, 30.0, 
+-36.0, -2.0, -34.0], [35.0, -4.0, 32.0, -36.0, 7.0], [21.0, 16.0, -10.0, 31.0, -30.0]], [[0.0, 4.0, 21.0, -25.0, -24.0], 
+[-12.0, -6.0, 12.0, 10.0, 10.0], [-31.0, -28.0, -24.0, 44.0, 29.0], [-17.0, -16.0, -22.0, -11.0, 38.0]], [[20.0, -22.0, 9.0, 
+2.0, 1.0], [15.0, -6.0, 23.0, 0.0, 20.0], [-6.0, 10.0, -3.0, 11.0, -8.0], [-17.0, -16.0, 19.0, -6.0, 10.0]]], [[[5.0, -6.0, 
+3.0, 2.0, 0.0], [2.0, 0.0, 6.0, 0.0, 5.0], [0.0, 3.0, 1.0, 2.0, -2.0], [-5.0, -5.0, 6.0, 0.0, 2.0]], [[-31.0, 48.0, 3.0, -63.0, 
+-31.0], [-11.0, -24.0, -23.0, 14.0, -17.0], [-59.0, -63.0, -58.0, 57.0, 53.0], [15.0, 19.0, -81.0, -31.0, 46.0]], [[-6.0, -8.0, 
+3.0, 51.0, 8.0], [-40.0, 42.0, -8.0, -6.0, -12.0], [57.0, 26.0, 58.0, -48.0, -15.0], [-3.0, -10.0, 38.0, 45.0, -38.0]], [[1.0, 
+-2.0, -9.0, 8.0, 10.0], [8.0, 0.0, -4.0, -4.0, -3.0], [10.0, 11.0, 7.0, -16.0, -12.0], [7.0, 7.0, 8.0, 2.0, -14.0]], [[13.0, 
+0.0, 6.0, -52.0, -13.0], [39.0, -42.0, 19.0, 8.0, 21.0], [-62.0, -27.0, -60.0, 59.0, 18.0], [-8.0, -1.0, -33.0, -46.0, 48.0]]], 
+[[[-20.0, 14.0, 3.0, 22.0, -5.0], [-43.0, 30.0, -19.0, 0.0, -20.0], [30.0, -2.0, 31.0, -23.0, 8.0], [5.0, 0.0, 1.0, 30.0, 
+-18.0]], [[32.0, -26.0, -21.0, -14.0, 27.0], [77.0, -42.0, 21.0, -8.0, 24.0], [-22.0, 26.0, -29.0, 1.0, -36.0], [5.0, 12.0, 
+17.0, -38.0, -2.0]], [[-19.0, 28.0, -30.0, -18.0, 13.0], [21.0, -18.0, -31.0, -4.0, -23.0], [-8.0, -7.0, -18.0, -15.0, -4.0], 
+[36.0, 39.0, -31.0, -16.0, -16.0]], [[6.0, -6.0, 18.0, -9.0, -15.0], [-9.0, 0.0, 15.0, 6.0, 12.0], [-15.0, -12.0, -9.0, 27.0, 
+15.0], [-18.0, -18.0, -3.0, -3.0, 24.0]], [[-6.0, 16.0, -33.0, -21.0, 20.0], [44.0, -30.0, -20.0, -6.0, -12.0], [-15.0, 2.0, 
+-26.0, -12.0, -15.0], [33.0, 38.0, -22.0, -27.0, -14.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[24.0, -6.0, 27.0, 72.0, -35.0], [-25.0, 68.0, -58.0, -7.0, 45.0], [2.0, -31.0, 32.0, 
+13.0, 66.0], [-3.0, -34.0, -7.0, -12.0, -13.0]], [[65.0, -39.0, 26.0, 85.0, -11.0], [-35.0, 74.0, -81.0, -40.0, 10.0], [14.0, 
+-31.0, 19.0, -15.0, 115.0], [-41.0, -46.0, -2.0, 23.0, 21.0]], [[-53.0, 1.0, -12.0, -61.0, -3.0], [41.0, -56.0, 53.0, 6.0, 
+-8.0], [-26.0, 9.0, -21.0, 21.0, -79.0], [17.0, 40.0, 4.0, -11.0, -29.0]], [[-6.0, -9.0, 9.0, 12.0, -17.0], [5.0, 11.0, -10.0, 
+-7.0, 15.0], [-10.0, -13.0, 5.0, 13.0, 6.0], [0.0, -1.0, -1.0, -6.0, -16.0]], [[-17.0, -43.0, -10.0, -49.0, 15.0], [39.0, 
+-52.0, 29.0, -36.0, -42.0], [-22.0, 3.0, -37.0, -1.0, -31.0], [-25.0, 32.0, 10.0, 25.0, -3.0]]], [[[-17.0, -85.0, 14.0, -13.0, 
+-21.0], [51.0, -22.0, -7.0, -72.0, -18.0], [-46.0, -33.0, -31.0, 23.0, 5.0], [-43.0, 26.0, 10.0, 25.0, -33.0]], [[-59.0, -36.0, 
+13.0, -25.0, -44.0], [54.0, -25.0, 19.0, -25.0, 23.0], [-52.0, -28.0, -12.0, 50.0, -49.0], [5.0, 35.0, 3.0, -17.0, -65.0]], 
+[[29.0, -2.0, 28.0, 79.0, -35.0], [-31.0, 75.0, -63.0, -4.0, 48.0], [6.0, -31.0, 36.0, 11.0, 73.0], [-2.0, -39.0, -8.0, -13.0, 
+-10.0]], [[15.0, -30.0, -12.0, -27.0, 31.0], [11.0, -31.0, 11.0, -28.0, -48.0], [2.0, 11.0, -28.0, -23.0, 3.0], [-30.0, 11.0, 
+8.0, 33.0, 26.0]], [[-20.0, -9.0, -8.0, -34.0, 6.0], [22.0, -33.0, 26.0, -6.0, -16.0], [-12.0, 6.0, -17.0, 4.0, -34.0], [-1.0, 
+21.0, 4.0, 4.0, -7.0]]], [[[-5.0, -4.0, -1.0, -7.0, 0.0], [6.0, -7.0, 5.0, -3.0, -3.0], [-4.0, 0.0, -4.0, 2.0, -7.0], [-1.0, 
+5.0, 1.0, 1.0, -3.0]], [[52.0, 1.0, -21.0, -10.0, 59.0], [-27.0, -13.0, 0.0, -5.0, -59.0], [38.0, 31.0, -17.0, -55.0, 32.0], 
+[-28.0, -13.0, 5.0, 40.0, 68.0]], [[-3.0, -22.0, 34.0, 63.0, -57.0], [-1.0, 59.0, -51.0, -18.0, 58.0], [-22.0, -45.0, 28.0, 
+37.0, 45.0], [0.0, -19.0, -6.0, -21.0, -44.0]], [[-7.0, 14.0, 3.0, 7.0, -10.0], [-4.0, 9.0, -1.0, 13.0, 17.0], [0.0, -2.0, 
+10.0, 8.0, -5.0], [13.0, -3.0, -3.0, -13.0, -9.0]], [[-1.0, 9.0, -37.0, -77.0, 62.0], [12.0, -74.0, 59.0, 7.0, -71.0], [16.0, 
+46.0, -39.0, -38.0, -53.0], [-8.0, 28.0, 9.0, 29.0, 44.0]]], [[[20.0, -19.0, 24.0, 58.0, -30.0], [-14.0, 53.0, -50.0, -18.0, 
+32.0], [-4.0, -30.0, 21.0, 12.0, 58.0], [-11.0, -25.0, -4.0, -4.0, -13.0]], [[-44.0, 53.0, -28.0, -70.0, 22.0], [14.0, -59.0, 
+70.0, 50.0, -12.0], [4.0, 38.0, -11.0, 0.0, -94.0], [41.0, 31.0, 0.0, -20.0, -1.0]], [[13.0, 51.0, -5.0, 17.0, 8.0], [-34.0, 
+22.0, -3.0, 43.0, 17.0], [28.0, 16.0, 23.0, -12.0, 5.0], [26.0, -20.0, -7.0, -17.0, 18.0]], [[3.0, -27.0, -6.0, -21.0, 15.0], 
+[15.0, -24.0, 9.0, -24.0, -30.0], [-6.0, 3.0, -21.0, -9.0, -3.0], [-21.0, 12.0, 6.0, 21.0, 9.0]], [[-3.0, 62.0, -14.0, -9.0, 
+15.0], [-25.0, -1.0, 21.0, 54.0, 10.0], [26.0, 27.0, 16.0, -11.0, -27.0], [36.0, -7.0, -6.0, -21.0, 16.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank4_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[[[2.0, 0.0, 3.0], [0.0, -3.0, 0.0]], [[-6.0, 2.0, -2.0], [5.0, -2.0, -4.0]], [[4.0, 7.0, -1.0], [-5.0, 
+2.0, 6.0]], [[3.0, 5.0, 6.0], [2.0, -2.0, -5.0]], [[-3.0, 1.0, -5.0], [-5.0, 3.0, -3.0]]], [[[-1.0, 4.0, 6.0], [-2.0, 5.0, 
+-3.0]], [[2.0, -5.0, -6.0], [3.0, 3.0, -1.0]], [[-7.0, 3.0, 2.0], [0.0, 0.0, -6.0]], [[-7.0, 1.0, 0.0], [-7.0, -1.0, 5.0]], 
+[[3.0, 5.0, 3.0], [-4.0, -3.0, 2.0]]], [[[4.0, 0.0, -5.0], [-5.0, 4.0, -4.0]], [[-5.0, 0.0, 3.0], [6.0, -2.0, 6.0]], [[4.0, 
+1.0, -3.0], [1.0, 7.0, 0.0]], [[4.0, -2.0, -1.0], [-7.0, -2.0, 2.0]], [[5.0, -7.0, 3.0], [-6.0, 0.0, 4.0]]], [[[-2.0, 6.0, 
+5.0], [0.0, -2.0, 4.0]], [[-5.0, 7.0, -3.0], [-7.0, 3.0, 2.0]], [[4.0, 0.0, -5.0], [7.0, 7.0, -2.0]], [[3.0, -7.0, 3.0], [-5.0, 
+-7.0, 7.0]], [[7.0, 1.0, -5.0], [0.0, 6.0, 2.0]]]])
+      arg1=Data(numpy.array([[[[7.0, 0.0, -5.0, 7.0, 5.0], [2.0, 0.0, 4.0, 1.0, -3.0], [-3.0, 2.0, -5.0, -5.0, 6.0], [3.0, 4.0, 
+-7.0, 6.0, 1.0]], [[7.0, 3.0, -3.0, -1.0, 0.0], [-3.0, -7.0, -2.0, 0.0, 0.0], [-3.0, 3.0, 6.0, 7.0, 6.0], [0.0, -2.0, 4.0, 5.0, 
+6.0]], [[-1.0, 1.0, -6.0, 7.0, -4.0], [-7.0, -1.0, -4.0, -5.0, 6.0], [-3.0, -7.0, 0.0, 1.0, 1.0], [-4.0, 5.0, 2.0, 1.0, 4.0]]], 
+[[[6.0, -7.0, -3.0, 6.0, 6.0], [-1.0, -4.0, 6.0, 2.0, -3.0], [7.0, -1.0, -7.0, 6.0, 7.0], [1.0, -6.0, 2.0, -6.0, -4.0]], [[4.0, 
+0.0, 2.0, -5.0, -2.0], [6.0, 7.0, -4.0, 4.0, 0.0], [5.0, 4.0, 2.0, -4.0, 7.0], [-1.0, 0.0, 5.0, 5.0, 2.0]], [[6.0, 2.0, -2.0, 
+-3.0, 7.0], [3.0, -7.0, 4.0, 2.0, 7.0], [4.0, 6.0, 4.0, -2.0, -3.0], [-4.0, -1.0, 6.0, 5.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 1.0, -7.0, 4.0, 2.0], [-6.0, 3.0, -1.0, 7.0, -6.0], [5.0, -5.0, -1.0, -4.0, 
+6.0], [-4.0, -2.0, -2.0, 6.0, 1.0]], [[-4.0, -5.0, 6.0, 1.0, -2.0], [-4.0, -4.0, -2.0, 4.0, -7.0], [-7.0, -3.0, 4.0, 4.0, 5.0], 
+[6.0, -5.0, 0.0, 2.0, -7.0]], [[7.0, 7.0, -5.0, 0.0, -2.0], [5.0, -1.0, 2.0, -6.0, -3.0], [2.0, -3.0, 7.0, 5.0, 6.0], [6.0, 
+5.0, -3.0, 3.0, 3.0]]], [[[4.0, -7.0, 2.0, 6.0, 4.0], [-1.0, -3.0, 5.0, -4.0, 7.0], [-4.0, 5.0, 7.0, -4.0, -1.0], [-5.0, -5.0, 
+-3.0, 4.0, -6.0]], [[5.0, -3.0, -7.0, -4.0, 0.0], [1.0, 5.0, -4.0, 0.0, 0.0], [-6.0, 4.0, -7.0, -3.0, -1.0], [0.0, -1.0, 2.0, 
+-7.0, -1.0]], [[6.0, 2.0, -7.0, 2.0, -2.0], [-7.0, 0.0, 3.0, 1.0, 4.0], [1.0, 3.0, -7.0, 5.0, 1.0], [-4.0, -3.0, 6.0, -3.0, 
+7.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-1.0, 3.0, -34.0, 50.0, 4.0], [-35.0, -24.0, 8.0, -25.0, 12.0], [-30.0, -29.0, -16.0, 5.0, 
+-6.0], [-3.0, 23.0, -23.0, 0.0, 8.0]], [[-28.0, -39.0, 25.0, -6.0, -16.0], [-33.0, -18.0, 2.0, -2.0, -37.0], [27.0, -29.0, 
+-13.0, 88.0, 7.0], [13.0, -64.0, 22.0, -88.0, -14.0]], [[92.0, 67.0, -28.0, -44.0, 32.0], [29.0, -56.0, -8.0, 19.0, 39.0], 
+[-31.0, 85.0, 85.0, -22.0, 26.0], [-15.0, 21.0, 34.0, 128.0, 48.0]], [[24.0, -3.0, -66.0, 95.0, -28.0], [-80.0, -28.0, -22.0, 
+-41.0, -14.0], [-58.0, -61.0, -23.0, 56.0, 69.0], [9.0, 25.0, -25.0, 2.0, 60.0]], [[-45.0, 27.0, 69.0, -93.0, -52.0], [40.0, 
+60.0, -48.0, 18.0, -27.0], [-11.0, 31.0, 50.0, -19.0, -22.0], [15.0, -6.0, 2.0, 12.0, 18.0]]], [[[5.0, 26.0, -21.0, 3.0, 
+-72.0], [-33.0, 30.0, -80.0, -21.0, 24.0], [-28.0, -28.0, 41.0, 13.0, 54.0], [-22.0, 33.0, 38.0, 42.0, 74.0]], [[9.0, -44.0, 
+40.0, -17.0, 39.0], [73.0, 57.0, 44.0, 48.0, -58.0], [59.0, 34.0, -59.0, -43.0, 21.0], [34.0, -29.0, -31.0, -27.0, -55.0]], 
+[[-66.0, -1.0, 26.0, -20.0, -85.0], [-55.0, 19.0, -66.0, -29.0, -9.0], [-18.0, -55.0, 29.0, 70.0, -4.0], [-5.0, -18.0, 29.0, 
+-55.0, 37.0]], [[-58.0, 62.0, 41.0, -102.0, -40.0], [-1.0, -21.0, -48.0, -15.0, 77.0], [-16.0, 22.0, 108.0, -6.0, -107.0], 
+[-47.0, 7.0, 64.0, 25.0, 10.0]], [[29.0, 50.0, -46.0, 22.0, -1.0], [-38.0, -57.0, -14.0, -28.0, 35.0], [-68.0, 4.0, 45.0, 7.0, 
+-4.0], [-12.0, 39.0, -6.0, 65.0, 49.0]]], [[[-5.0, 22.0, 41.0, -45.0, -26.0], [60.0, 81.0, -26.0, 27.0, -55.0], [-28.0, 40.0, 
+7.0, -63.0, 24.0], [39.0, 25.0, -52.0, 49.0, 24.0]], [[26.0, -27.0, -27.0, 14.0, 45.0], [-31.0, -83.0, 36.0, -4.0, 57.0], 
+[62.0, -9.0, 3.0, 60.0, -17.0], [-43.0, -47.0, 79.0, -43.0, -39.0]], [[72.0, -7.0, 6.0, -23.0, 24.0], [67.0, 41.0, 4.0, 49.0, 
+-33.0], [36.0, 59.0, -7.0, -38.0, 83.0], [18.0, -7.0, 7.0, 55.0, 8.0]], [[-23.0, 46.0, 5.0, -15.0, 0.0], [22.0, 15.0, -2.0, 
+-9.0, 17.0], [-54.0, 20.0, 21.0, -73.0, -58.0], [3.0, 55.0, -50.0, 55.0, 6.0]], [[-29.0, 32.0, -12.0, 15.0, 5.0], [28.0, 42.0, 
+2.0, -14.0, 49.0], [-29.0, -2.0, -9.0, -115.0, -63.0], [-19.0, 81.0, -45.0, 54.0, -13.0]]], [[[39.0, 31.0, -50.0, 13.0, 2.0], 
+[-57.0, -89.0, -16.0, -27.0, 64.0], [-21.0, -5.0, 58.0, 57.0, 3.0], [-40.0, 1.0, 62.0, 33.0, 38.0]], [[-1.0, 71.0, 45.0, 
+-126.0, -47.0], [21.0, -11.0, -68.0, 12.0, 32.0], [-23.0, 63.0, 130.0, 13.0, -25.0], [-21.0, -9.0, 70.0, 69.0, 53.0]], [[91.0, 
+-58.0, 7.0, 6.0, 54.0], [72.0, 40.0, 42.0, 67.0, -77.0], [79.0, 52.0, -63.0, -7.0, 123.0], [40.0, -49.0, -1.0, 2.0, -24.0]], 
+[[-47.0, 31.0, -25.0, 33.0, 36.0], [-10.0, -32.0, 40.0, -36.0, 73.0], [-39.0, -17.0, -8.0, -77.0, -126.0], [-29.0, 64.0, -46.0, 
+16.0, -42.0]], [[97.0, 2.0, 0.0, -23.0, 57.0], [88.0, 26.0, 30.0, 60.0, -37.0], [29.0, 88.0, -9.0, -61.0, 79.0], [27.0, -1.0, 
+-13.0, 82.0, -1.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-4.0, 32.0, -8.0, 20.0, -2.0], [0.0, -12.0, 16.0, -4.0, -21.0], [34.0, -31.0, 40.0, 
+16.0, 33.0], [10.0, 14.0, -19.0, 42.0, 14.0]], [[-6.0, -67.0, 116.0, 8.0, 16.0], [39.0, -49.0, 19.0, -46.0, 47.0], [-60.0, 
+35.0, 77.0, -12.0, -45.0], [15.0, -19.0, -25.0, 8.0, -82.0]], [[-29.0, 3.0, -47.0, -3.0, -36.0], [-92.0, 10.0, -35.0, 88.0, 
+-81.0], [-17.0, -37.0, -74.0, 51.0, 62.0], [21.0, -43.0, 50.0, -17.0, 22.0]], [[-25.0, 2.0, 32.0, 27.0, 2.0], [23.0, -33.0, 
+2.0, -8.0, -77.0], [-9.0, -61.0, 122.0, 11.0, 74.0], [64.0, 6.0, -64.0, 83.0, -59.0]], [[-47.0, -23.0, 42.0, -59.0, -12.0], 
+[18.0, 22.0, -55.0, 30.0, -21.0], [-33.0, 5.0, -63.0, -13.0, -44.0], [25.0, 7.0, 24.0, -63.0, -19.0]]], [[[30.0, 14.0, -17.0, 
+-38.0, -24.0], [48.0, 6.0, -34.0, -22.0, -66.0], [-46.0, -24.0, 31.0, 28.0, 44.0], [86.0, 26.0, -18.0, -14.0, -25.0]], [[-11.0, 
+-47.0, -22.0, 7.0, 40.0], [-15.0, 38.0, -4.0, 17.0, 58.0], [2.0, 47.0, -57.0, -84.0, -56.0], [-85.0, -24.0, 5.0, -22.0, -9.0]], 
+[[1.0, -20.0, 99.0, -37.0, -12.0], [82.0, -35.0, -13.0, -55.0, -9.0], [-58.0, 2.0, 75.0, 20.0, -21.0], [82.0, 27.0, -28.0, 
+-12.0, -64.0]], [[28.0, 50.0, 13.0, -55.0, -54.0], [9.0, -9.0, -11.0, -12.0, 6.0], [-3.0, 8.0, -66.0, 88.0, -24.0], [49.0, 
+30.0, 63.0, -76.0, 64.0]], [[-33.0, 40.0, -7.0, 9.0, -30.0], [-36.0, -17.0, -9.0, 41.0, -82.0], [22.0, -65.0, 17.0, 58.0, 
+70.0], [48.0, 1.0, 3.0, 36.0, 18.0]]], [[[-79.0, -16.0, -13.0, -38.0, 6.0], [-12.0, 52.0, -67.0, 74.0, -60.0], [2.0, -26.0, 
+-74.0, -53.0, -9.0], [-5.0, 0.0, 6.0, -27.0, -13.0]], [[96.0, -8.0, 4.0, 36.0, -4.0], [-5.0, -46.0, 67.0, -71.0, 87.0], [-25.0, 
+56.0, 40.0, 47.0, -10.0], [-16.0, -21.0, 15.0, -1.0, 12.0]], [[-6.0, -50.0, -54.0, -5.0, 16.0], [-37.0, 43.0, -35.0, 46.0, 
+-15.0], [-39.0, 19.0, -63.0, -52.0, 3.0], [-33.0, -40.0, 12.0, -28.0, -25.0]], [[-45.0, 66.0, -49.0, -16.0, -18.0], [-30.0, 
+32.0, -23.0, 56.0, -48.0], [74.0, -48.0, -68.0, 15.0, 19.0], [-7.0, 28.0, 24.0, -3.0, 73.0]], [[24.0, 111.0, -132.0, -15.0, 
+-14.0], [-9.0, 58.0, -3.0, 17.0, -16.0], [108.0, -31.0, -82.0, 11.0, 23.0], [-30.0, 58.0, 23.0, -11.0, 127.0]]], [[[35.0, 17.0, 
+11.0, 14.0, -34.0], [-17.0, -45.0, 20.0, -16.0, -29.0], [-26.0, -19.0, 47.0, 83.0, 54.0], [58.0, -11.0, 9.0, 17.0, 1.0]], 
+[[-25.0, -17.0, 43.0, -63.0, -50.0], [-17.0, -4.0, -56.0, 41.0, -51.0], [-68.0, -4.0, -72.0, 62.0, -7.0], [71.0, -14.0, 58.0, 
+-80.0, -10.0]], [[-4.0, -105.0, -24.0, 26.0, 50.0], [-35.0, 31.0, -13.0, 28.0, 32.0], [-62.0, 52.0, -25.0, -100.0, -22.0], 
+[-73.0, -69.0, -12.0, -6.0, -74.0]], [[21.0, 129.0, -88.0, 17.0, -20.0], [-26.0, 14.0, 41.0, 2.0, 15.0], [139.0, -35.0, -45.0, 
+51.0, 20.0], [-39.0, 55.0, 28.0, 21.0, 147.0]], [[-32.0, -47.0, -74.0, 9.0, 18.0], [-79.0, 52.0, -37.0, 85.0, -26.0], [-16.0, 
+7.0, -94.0, -57.0, 13.0], [-60.0, -56.0, 25.0, -19.0, -7.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank3_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[[1.0, -4.0], [7.0, -5.0]], [[-2.0, 5.0], [-6.0, -3.0]], [[-7.0, 0.0], [2.0, 6.0]], [[-7.0, -4.0], 
+[-6.0, 5.0]], [[-1.0, 2.0], [2.0, 0.0]], [[5.0, -1.0], [-7.0, 1.0]]])
+      arg1=Data(3.0,self.functionspace)
+      arg1.setTaggedValue(1,-6.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[3.0, -12.0], [21.0, -15.0]], [[-6.0, 15.0], [-18.0, -9.0]], [[-21.0, 0.0], [6.0, 18.0]], [[-21.0, 
+-12.0], [-18.0, 15.0]], [[-3.0, 6.0], [6.0, 0.0]], [[15.0, -3.0], [-21.0, 3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-6.0, 24.0], [-42.0, 30.0]], [[12.0, -30.0], [36.0, 18.0]], [[42.0, -0.0], [-12.0, 
+-36.0]], [[42.0, 24.0], [36.0, -30.0]], [[6.0, -12.0], [-12.0, -0.0]], [[-30.0, 6.0], [42.0, -6.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank4_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[[[-4.0, 6.0, 5.0], [1.0, -7.0, 7.0]], [[3.0, -2.0, 5.0], [-5.0, 0.0, -2.0]]], [[[7.0, 0.0, -6.0], 
+[0.0, 5.0, -4.0]], [[2.0, -7.0, -7.0], [2.0, -3.0, 1.0]]], [[[7.0, 3.0, -1.0], [3.0, 0.0, 2.0]], [[1.0, -1.0, 0.0], [-1.0, 5.0, 
+4.0]]], [[[4.0, -6.0, -5.0], [-7.0, -1.0, 2.0]], [[0.0, 5.0, 4.0], [-2.0, -4.0, 0.0]]], [[[-4.0, 2.0, 1.0], [-3.0, -6.0, 
+-4.0]], [[-7.0, 3.0, -2.0], [-3.0, -7.0, 4.0]]], [[[4.0, 0.0, 7.0], [-7.0, -3.0, 1.0]], [[0.0, -1.0, 3.0], [-5.0, -7.0, 0.0]]]])
+      arg1=Data(numpy.array([-3.0, 3.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, 0.0, -5.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[25.0, -31.0], [-20.0, 17.0]], [[-15.0, 19.0], [-20.0, -16.0]], [[-11.0, -11.0], [-6.0, 14.0]], 
+[[-25.0, 16.0], [11.0, -6.0]], [[17.0, -5.0], [32.0, -16.0]], [[-19.0, 11.0], [-6.0, -6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-25.0, -35.0], [-25.0, 10.0]], [[30.0, 20.0], [35.0, -5.0]], [[5.0, -10.0], [0.0, 
+-20.0]], [[25.0, -10.0], [-20.0, 0.0]], [[-5.0, 20.0], [10.0, -20.0]], [[-35.0, -5.0], [-15.0, 0.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_array_rank3_taggedData_rank1_offset0(self):
+      arg0=numpy.array([[[7.0, -5.0], [-2.0, 2.0]], [[6.0, 0.0], [-5.0, -3.0]], [[-4.0, -1.0], [2.0, -6.0]], [[3.0, -4.0], 
+[4.0, 0.0]], [[5.0, 2.0], [-5.0, 0.0]], [[6.0, 2.0], [3.0, 0.0]]])
+      arg1=Data(numpy.array([0.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, 0.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 7.0], [0.0, -5.0]], [[0.0, -2.0], [0.0, 2.0]]], [[[0.0, 6.0], [0.0, 0.0]], [[0.0, -5.0], 
+[0.0, -3.0]]], [[[0.0, -4.0], [0.0, -1.0]], [[0.0, 2.0], [0.0, -6.0]]], [[[0.0, 3.0], [0.0, -4.0]], [[0.0, 4.0], [0.0, 0.0]]], 
+[[[0.0, 5.0], [0.0, 2.0]], [[0.0, -5.0], [0.0, 0.0]]], [[[0.0, 6.0], [0.0, 2.0]], [[0.0, 3.0], [0.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[7.0, 0.0], [-5.0, 0.0]], [[-2.0, 0.0], [2.0, 0.0]]], [[[6.0, 0.0], [0.0, 0.0]], 
+[[-5.0, 0.0], [-3.0, 0.0]]], [[[-4.0, 0.0], [-1.0, 0.0]], [[2.0, 0.0], [-6.0, 0.0]]], [[[3.0, 0.0], [-4.0, 0.0]], [[4.0, 0.0], 
+[0.0, 0.0]]], [[[5.0, 0.0], [2.0, 0.0]], [[-5.0, 0.0], [0.0, 0.0]]], [[[6.0, 0.0], [2.0, 0.0]], [[3.0, 0.0], [0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[[[-6.0, -1.0, -3.0, -2.0, -7.0], [-1.0, -3.0, -6.0, 1.0, 3.0], [0.0, -1.0, -2.0, -5.0, 3.0], [-4.0, 
--5.0, 0.0, 1.0, -7.0]], [[-6.0, 2.0, 5.0, 3.0, -4.0], [-3.0, -3.0, -1.0, 1.0, 3.0], [-4.0, -3.0, -7.0, -5.0, -6.0], [-3.0, 
--7.0, 3.0, 1.0, -5.0]], [[0.0, -1.0, 2.0, 1.0, -5.0], [4.0, -7.0, 6.0, 4.0, -4.0], [-1.0, 1.0, -1.0, 6.0, -4.0], [-6.0, -1.0, 
-0.0, 5.0, 6.0]]], [[[0.0, -4.0, 0.0, 4.0, -5.0], [-2.0, -4.0, 0.0, 3.0, 4.0], [2.0, 0.0, 6.0, -3.0, 3.0], [0.0, 2.0, -3.0, 
--3.0, -2.0]], [[1.0, 2.0, 3.0, 6.0, -4.0], [0.0, 3.0, -1.0, 7.0, -4.0], [-2.0, -3.0, -6.0, 6.0, 2.0], [-2.0, 1.0, -5.0, -3.0, 
--5.0]], [[7.0, -1.0, 0.0, 2.0, -7.0], [-2.0, 2.0, -7.0, -5.0, 3.0], [5.0, 6.0, 0.0, 4.0, 5.0], [4.0, 6.0, -5.0, 2.0, -1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, -3.0, 7.0, 4.0, -5.0], [7.0, -4.0, -1.0, 0.0, -6.0], [-3.0, -7.0, 2.0, -1.0, -5.0], 
-[3.0, -2.0, -2.0, 5.0, 4.0]], [[-7.0, 7.0, 1.0, -3.0, 6.0], [2.0, -7.0, 0.0, 4.0, -5.0], [6.0, 0.0, 2.0, 0.0, 0.0], [-4.0, 
--1.0, 2.0, -6.0, 0.0]], [[-4.0, -3.0, 0.0, -5.0, -6.0], [2.0, 0.0, -7.0, -3.0, 3.0], [-2.0, -6.0, 3.0, 3.0, -3.0], [4.0, 0.0, 
--6.0, 1.0, 4.0]]], [[[3.0, 1.0, 6.0, -7.0, 0.0], [-7.0, 0.0, -7.0, 0.0, -7.0], [-7.0, 6.0, 4.0, -2.0, -6.0], [-5.0, -3.0, 6.0, 
--2.0, 7.0]], [[0.0, -3.0, -3.0, -4.0, 5.0], [-5.0, 5.0, -3.0, -6.0, 0.0], [-3.0, 1.0, 0.0, 0.0, -2.0], [-3.0, 7.0, 4.0, -7.0, 
--3.0]], [[-1.0, 2.0, -4.0, 6.0, -4.0], [5.0, 0.0, 0.0, -7.0, 0.0], [-1.0, -6.0, 2.0, 0.0, -3.0], [7.0, -1.0, -1.0, -1.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, -1.0, -2.0, 1.0, 5.0], [7.0, 0.0, 0.0, -1.0, 0.0], [-6.0, -6.0, 5.0, -7.0, 0.0], 
-[4.0, 1.0, 7.0, 5.0, 5.0]], [[0.0, 6.0, -2.0, 0.0, 3.0], [-2.0, 3.0, -2.0, -2.0, -5.0], [0.0, 0.0, -6.0, 4.0, 0.0], [-4.0, 0.0, 
-2.0, 4.0, 4.0]], [[3.0, 5.0, 0.0, -3.0, 7.0], [4.0, 1.0, -1.0, -6.0, -1.0], [-6.0, 3.0, -5.0, -2.0, -7.0], [5.0, 0.0, -6.0, 
--4.0, -1.0]]], [[[-6.0, 0.0, 6.0, 1.0, 5.0], [0.0, -1.0, -6.0, -3.0, -5.0], [0.0, -5.0, -2.0, -7.0, 6.0], [3.0, -3.0, 2.0, 
--5.0, 3.0]], [[-6.0, 3.0, 2.0, 4.0, 0.0], [7.0, 2.0, 4.0, -4.0, 0.0], [4.0, 0.0, 5.0, -7.0, -7.0], [-7.0, -6.0, 0.0, 4.0, 
-7.0]], [[7.0, 0.0, 3.0, -4.0, 4.0], [-5.0, 5.0, 0.0, -4.0, -2.0], [-5.0, -3.0, 6.0, -1.0, -6.0], [1.0, 5.0, 5.0, 1.0, -5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[65.0, -13.0, -79.0, 32.0, -29.0], [-24.0, 71.0, 3.0, -79.0, 66.0], [-28.0, 1.0, -10.0, 6.0, 
-7.0], [52.0, 18.0, -3.0, -8.0, -69.0]], [[-16.0, 8.0, -31.0, 9.0, 37.0], [8.0, 0.0, 30.0, 6.0, 21.0], [40.0, -3.0, -19.0, 6.0, 
-31.0], [-8.0, 27.0, -3.0, -23.0, -36.0]], [[-28.0, 29.0, -25.0, -49.0, 48.0], [-22.0, -8.0, -20.0, -4.0, -1.0], [26.0, 12.0, 
-10.0, 9.0, 3.0], [-30.0, 22.0, 16.0, -64.0, -13.0]], [[-5.0, 14.0, -13.0, -62.0, 44.0], [-54.0, 17.0, -51.0, -41.0, -28.0], 
-[-26.0, 26.0, 25.0, -3.0, -35.0], [-38.0, 29.0, 50.0, -79.0, -6.0]], [[75.0, 1.0, -43.0, 18.0, 49.0], [-47.0, 36.0, 89.0, 72.0, 
-82.0], [61.0, 87.0, -71.0, 2.0, 109.0], [-37.0, 12.0, -3.0, 29.0, -29.0]]], [[[6.0, -36.0, -14.0, -13.0, -29.0], [-1.0, 25.0, 
--13.0, -10.0, 47.0], [-7.0, -17.0, -8.0, 17.0, 11.0], [21.0, 13.0, -38.0, 23.0, 10.0]], [[50.0, 0.0, -65.0, 60.0, 46.0], 
-[-18.0, 48.0, 71.0, -23.0, 40.0], [22.0, 30.0, -45.0, -10.0, 48.0], [0.0, 40.0, 28.0, -19.0, -89.0]], [[20.0, -18.0, -12.0, 
--89.0, 11.0], [-62.0, 26.0, -33.0, 33.0, 59.0], [10.0, 47.0, -10.0, 24.0, 35.0], [-36.0, 13.0, -23.0, -4.0, 45.0]], [[-14.0, 
--36.0, 25.0, -98.0, 32.0], [-64.0, 24.0, -71.0, -15.0, -20.0], [-42.0, 24.0, 18.0, 5.0, -34.0], [-56.0, 42.0, 27.0, -47.0, 
-50.0]], [[-11.0, 46.0, 48.0, 29.0, -5.0], [26.0, -53.0, 9.0, 27.0, -73.0], [-2.0, 5.0, 22.0, -23.0, -28.0], [-6.0, -52.0, 29.0, 
-10.0, 18.0]]], [[[33.0, -7.0, -6.0, 41.0, -48.0], [11.0, 18.0, -1.0, -36.0, 3.0], [-35.0, -14.0, 7.0, -7.0, -20.0], [43.0, 
--21.0, -3.0, 28.0, -14.0]], [[16.0, 0.0, -25.0, 48.0, -58.0], [34.0, 10.0, 3.0, -39.0, 24.0], [-14.0, -38.0, 7.0, 4.0, -10.0], 
-[64.0, -22.0, -28.0, 29.0, -27.0]], [[81.0, -16.0, 33.0, 0.0, -56.0], [-42.0, 27.0, -15.0, 11.0, 2.0], [-58.0, 50.0, 3.0, 
--13.0, -11.0], [6.0, -49.0, 8.0, 61.0, 48.0]], [[23.0, -51.0, -92.0, -14.0, -27.0], [-22.0, 85.0, -34.0, -102.0, 94.0], [-28.0, 
--37.0, -6.0, 29.0, 1.0], [54.0, 62.0, -34.0, -29.0, -59.0]], [[47.0, -32.0, 7.0, 51.0, -37.0], [-5.0, 40.0, -2.0, -59.0, 
--21.0], [-69.0, -7.0, 4.0, -21.0, -40.0], [31.0, 0.0, 27.0, 22.0, -19.0]]], [[[61.0, 23.0, -41.0, 55.0, 12.0], [-16.0, 27.0, 
-52.0, -10.0, 21.0], [8.0, 38.0, -24.0, -14.0, 30.0], [10.0, -7.0, 26.0, 2.0, -58.0]], [[78.0, -20.0, -57.0, 24.0, -30.0], 
-[-40.0, 74.0, -5.0, -73.0, 48.0], [-48.0, 18.0, -7.0, -2.0, -4.0], [38.0, 12.0, 12.0, -1.0, -49.0]], [[-25.0, 23.0, 20.0, 2.0, 
-13.0], [27.0, -46.0, 36.0, 77.0, 6.0], [59.0, 7.0, -16.0, 6.0, 43.0], [-17.0, -24.0, -27.0, 28.0, 24.0]], [[-43.0, -1.0, -9.0, 
-21.0, -52.0], [65.0, -26.0, -6.0, -7.0, 25.0], [21.0, -70.0, 11.0, 20.0, -2.0], [57.0, -17.0, -62.0, 29.0, 0.0]], [[41.0, 
--21.0, -47.0, -15.0, -52.0], [-13.0, 38.0, -6.0, -1.0, 99.0], [9.0, 2.0, -16.0, 29.0, 42.0], [41.0, -9.0, -63.0, 41.0, 
-3.0]]]])+(1.-msk_ref)*numpy.array([[[[73.0, -27.0, 47.0, -30.0, -20.0], [-58.0, 19.0, 16.0, -14.0, 16.0], [5.0, 15.0, 53.0, 
-4.0, -49.0], [0.0, 23.0, -19.0, -43.0, -82.0]], [[7.0, 14.0, -25.0, 10.0, -30.0], [4.0, 8.0, 29.0, 11.0, 13.0], [25.0, 26.0, 
-0.0, 32.0, -25.0], [-44.0, -6.0, -10.0, 34.0, 11.0]], [[3.0, 52.0, 2.0, 3.0, 14.0], [-2.0, 23.0, 0.0, -31.0, -27.0], [18.0, 
-24.0, -40.0, 16.0, -35.0], [-43.0, -21.0, -23.0, 9.0, 24.0]], [[-33.0, 43.0, 40.0, 15.0, 34.0], [16.0, 28.0, -7.0, -54.0, 
--40.0], [20.0, -11.0, 1.0, -48.0, -37.0], [-43.0, -40.0, 4.0, 4.0, 45.0]], [[25.0, -54.0, -37.0, 15.0, -135.0], [-54.0, -55.0, 
-27.0, 104.0, 64.0], [91.0, 73.0, -38.0, 113.0, 75.0], [-31.0, -3.0, -72.0, -29.0, -54.0]]], [[[15.0, 3.0, -10.0, -7.0, -4.0], 
-[25.0, -13.0, 14.0, -3.0, 25.0], [-8.0, 34.0, -15.0, 3.0, -28.0], [20.0, -5.0, -51.0, -25.0, -17.0]], [[14.0, -41.0, 0.0, 18.0, 
--85.0], [-32.0, 4.0, 49.0, 43.0, 38.0], [62.0, 11.0, 73.0, 28.0, -8.0], [-66.0, 1.0, 17.0, 35.0, -21.0]], [[5.0, 27.0, -9.0, 
-0.0, -19.0], [12.0, -34.0, -8.0, 4.0, 13.0], [31.0, 75.0, -101.0, 40.0, 7.0], [10.0, -35.0, -115.0, -69.0, -12.0]], [[-88.0, 
-46.0, 13.0, 40.0, 31.0], [95.0, -7.0, 4.0, -44.0, -14.0], [23.0, 6.0, -22.0, -76.0, -29.0], [-25.0, -75.0, -34.0, 1.0, 88.0]], 
-[[-6.0, -17.0, 13.0, -9.0, 28.0], [-44.0, 8.0, -42.0, 7.0, -37.0], [-25.0, -59.0, 7.0, -4.0, 62.0], [23.0, 30.0, 74.0, 10.0, 
-0.0]]], [[[32.0, -35.0, 31.0, -23.0, 11.0], [-35.0, 6.0, -11.0, -4.0, 1.0], [-27.0, -28.0, 45.0, -19.0, 3.0], [36.0, 31.0, 
-27.0, -25.0, -48.0]], [[68.0, -21.0, 20.0, -40.0, 17.0], [-48.0, 16.0, -7.0, -11.0, 2.0], [-42.0, -9.0, 29.0, 8.0, -22.0], 
-[40.0, 47.0, 11.0, -27.0, -69.0]], [[7.0, -63.0, 42.0, -17.0, -8.0], [-46.0, -40.0, -45.0, 28.0, 6.0], [-6.0, -21.0, -5.0, 
--12.0, 85.0], [75.0, 16.0, -10.0, -88.0, -61.0]], [[53.0, 23.0, 26.0, -18.0, 3.0], [21.0, 26.0, 46.0, -52.0, 26.0], [-2.0, 
-51.0, 35.0, -22.0, -126.0], [-17.0, -12.0, -67.0, -26.0, -38.0]], [[-22.0, -53.0, 43.0, 6.0, 4.0], [6.0, 4.0, 6.0, -4.0, 9.0], 
-[-11.0, -60.0, 105.0, -77.0, 2.0], [16.0, 7.0, 64.0, 5.0, -7.0]]], [[[42.0, -50.0, 22.0, -10.0, -55.0], [-80.0, 1.0, 4.0, 38.0, 
-13.0], [32.0, -6.0, 42.0, 38.0, 32.0], [-16.0, 28.0, 22.0, -12.0, -60.0]], [[46.0, -39.0, 56.0, -20.0, -19.0], [-48.0, 8.0, 
-7.0, -9.0, 14.0], [10.0, -1.0, 59.0, -18.0, -24.0], [8.0, 13.0, -9.0, -49.0, -69.0]], [[13.0, 3.0, -49.0, -3.0, -26.0], [-16.0, 
--23.0, -8.0, 43.0, 10.0], [5.0, 30.0, -67.0, 73.0, 47.0], [9.0, 14.0, -25.0, 2.0, -7.0]], [[60.0, 21.0, -22.0, -37.0, 36.0], 
-[-6.0, 15.0, -1.0, -20.0, 1.0], [-58.0, 18.0, -23.0, 27.0, -44.0], [39.0, 38.0, -17.0, -6.0, -36.0]], [[88.0, -8.0, -1.0, 
--43.0, -22.0], [-45.0, -22.0, -4.0, 11.0, 31.0], [-9.0, 73.0, -62.0, 67.0, -13.0], [50.0, 24.0, -104.0, -90.0, -97.0]]]])
+   def test_generalTensorProduct_array_rank4_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[[[0.0, -3.0, 0.0], [6.0, -2.0, -3.0]], [[4.0, 2.0, -6.0], [7.0, -1.0, -1.0]]], [[[-3.0, -4.0, -6.0], 
+[2.0, 0.0, -5.0]], [[-3.0, -7.0, 5.0], [1.0, 4.0, -6.0]]], [[[-6.0, -6.0, -6.0], [0.0, -7.0, -1.0]], [[-3.0, -6.0, -4.0], 
+[-1.0, 6.0, 4.0]]], [[[0.0, -3.0, 4.0], [-7.0, -3.0, 0.0]], [[-5.0, 0.0, -4.0], [-2.0, -4.0, 3.0]]], [[[-2.0, 4.0, 7.0], [7.0, 
+5.0, 6.0]], [[-5.0, 0.0, 0.0], [4.0, -3.0, -3.0]]], [[[-3.0, 4.0, -1.0], [-7.0, -3.0, 6.0]], [[-3.0, -4.0, -5.0], [3.0, 5.0, 
+-5.0]]]])
+      arg1=Data(numpy.array([[1.0, -2.0], [4.0, -7.0], [7.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, 3.0], [5.0, -6.0], [2.0, -1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-12.0, 21.0], [-23.0, -13.0]], [[-30.0, -52.0], [-4.0, -12.0]]], [[[-61.0, 4.0], [-33.0, 
+-29.0]], [[4.0, 80.0], [-25.0, -60.0]]], [[[-72.0, 24.0], [-35.0, 44.0]], [[-55.0, 28.0], [51.0, -20.0]]], [[[16.0, 41.0], 
+[-19.0, 35.0]], [[-33.0, -10.0], [3.0, 47.0]]], [[[63.0, 11.0], [69.0, -19.0]], [[-5.0, 10.0], [-29.0, -2.0]]], [[[6.0, -27.0], 
+[23.0, 65.0]], [[-54.0, 9.0], [-12.0, -66.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-15.0, 18.0], [8.0, 33.0]], [[14.0, 6.0], [21.0, 28.0]]], [[[-44.0, 21.0], [-2.0, 
+11.0]], [[-37.0, 28.0], [12.0, -15.0]]], [[[-66.0, 24.0], [-37.0, 43.0]], [[-50.0, 31.0], [34.0, -43.0]]], [[[-7.0, 14.0], 
+[-43.0, -3.0]], [[-28.0, -11.0], [-22.0, 15.0]]], [[[26.0, -37.0], [65.0, -15.0]], [[-20.0, -15.0], [-5.0, 33.0]]], [[[6.0, 
+-32.0], [-31.0, -9.0]], [[-42.0, 20.0], [27.0, -16.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_float_rank0_offset0(self):
-      arg0=numpy.array([[[-6.0, -7.0], [-7.0, -1.0]], [[1.0, -3.0], [7.0, -6.0]], [[-2.0, 7.0], [6.0, 7.0]], [[-3.0, -3.0], 
-[-2.0, 4.0]], [[-3.0, 5.0], [-3.0, -7.0]], [[-7.0, -1.0], [3.0, 2.0]]])
-      arg1=0.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-0.0, -0.0], [-0.0, -0.0]], [[0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], 
-[-0.0, 0.0]], [[-0.0, 0.0], [-0.0, -0.0]], [[-0.0, -0.0], [0.0, 0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_array_rank4_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[[[1.0, -7.0, -2.0, -5.0], [-6.0, 6.0, -7.0, 2.0], [7.0, 5.0, 0.0, 2.0]], [[0.0, -5.0, -3.0, -5.0], 
+[5.0, -4.0, 3.0, 3.0], [-3.0, -1.0, -3.0, -7.0]]], [[[5.0, 4.0, 3.0, 5.0], [3.0, 5.0, -5.0, 2.0], [-7.0, -4.0, -5.0, 1.0]], 
+[[2.0, 4.0, -5.0, 6.0], [-5.0, 2.0, -1.0, 6.0], [-4.0, -5.0, 0.0, -2.0]]], [[[-7.0, 5.0, 0.0, -5.0], [0.0, 4.0, -1.0, 0.0], 
+[-7.0, 1.0, 7.0, -4.0]], [[5.0, -2.0, -7.0, -5.0], [6.0, 3.0, 0.0, -5.0], [0.0, -3.0, -4.0, 5.0]]]])
+      arg1=Data(2.0,self.functionspace)
+      arg1.setTaggedValue(1,0.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[2.0, -14.0, -4.0, -10.0], [-12.0, 12.0, -14.0, 4.0], [14.0, 10.0, 0.0, 4.0]], [[0.0, -10.0, 
+-6.0, -10.0], [10.0, -8.0, 6.0, 6.0], [-6.0, -2.0, -6.0, -14.0]]], [[[10.0, 8.0, 6.0, 10.0], [6.0, 10.0, -10.0, 4.0], [-14.0, 
+-8.0, -10.0, 2.0]], [[4.0, 8.0, -10.0, 12.0], [-10.0, 4.0, -2.0, 12.0], [-8.0, -10.0, 0.0, -4.0]]], [[[-14.0, 10.0, 0.0, 
+-10.0], [0.0, 8.0, -2.0, 0.0], [-14.0, 2.0, 14.0, -8.0]], [[10.0, -4.0, -14.0, -10.0], [12.0, 6.0, 0.0, -10.0], [0.0, -6.0, 
+-8.0, 10.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, -0.0, 
+-0.0, -0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 
+-0.0, 0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0]]], [[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 
+-0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank0_offset0(self):
-      arg0=numpy.array([[[3.0, -4.0], [-1.0, 6.0]], [[-4.0, -4.0], [-5.0, 7.0]], [[2.0, 4.0], [0.0, 0.0]], [[-4.0, -1.0], [6.0, 
-7.0]], [[6.0, 5.0], [1.0, 0.0]], [[2.0, -1.0], [6.0, 4.0]]])
-      arg1=numpy.array(0.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[0.0, -0.0], [-0.0, 0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, 
-0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg1=Data(-6.0,self.functionspace)
+      arg1.setTaggedValue(1,6.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-12.0,self.functionspace)
+      ref.setTaggedValue(1,12.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank1_offset1(self):
-      arg0=numpy.array([[[[6.0, -6.0], [-1.0, -5.0]], [[0.0, 4.0], [3.0, 5.0]], [[5.0, -3.0], [6.0, 6.0]], [[7.0, -5.0], [-1.0, 
-4.0]], [[0.0, -4.0], [2.0, 0.0]], [[6.0, -2.0], [2.0, -4.0]]], [[[6.0, -4.0], [-5.0, 0.0]], [[-2.0, 0.0], [6.0, 4.0]], [[5.0, 
--5.0], [-6.0, 0.0]], [[4.0, -1.0], [5.0, 3.0]], [[7.0, 1.0], [3.0, -6.0]], [[-7.0, -6.0], [-1.0, -4.0]]], [[[5.0, 3.0], [-2.0, 
-6.0]], [[-2.0, 3.0], [-7.0, 7.0]], [[2.0, 7.0], [2.0, 3.0]], [[-6.0, 7.0], [3.0, -6.0]], [[0.0, 2.0], [0.0, -3.0]], [[-3.0, 
-3.0], [0.0, -4.0]]]])
-      arg1=numpy.array([-7.0, 6.0, -7.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-41.0, -3.0], [-9.0, -7.0]], [[2.0, -49.0], [64.0, -60.0]], [[-19.0, -58.0], [-92.0, -63.0]], [[17.0, 
--20.0], [16.0, 32.0]], [[42.0, 20.0], [4.0, -15.0]], [[-63.0, -43.0], [-20.0, 32.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-5.0, 1.0, 3.0]),self.functionspace)
+      arg1=Data(numpy.array([-7.0, -2.0, 4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, 4.0, 0.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(45.0,self.functionspace)
+      ref.setTaggedValue(1,9.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_array_rank1_offset0(self):
-      arg0=numpy.array([[[-7.0, 1.0], [5.0, -6.0]], [[1.0, -6.0], [2.0, 7.0]], [[1.0, 7.0], [-3.0, -4.0]], [[2.0, 1.0], [-3.0, 
-0.0]], [[1.0, 2.0], [-1.0, 0.0]], [[-3.0, 1.0], [0.0, 0.0]]])
-      arg1=numpy.array([4.0, 5.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-28.0, -35.0], [4.0, 5.0]], [[20.0, 25.0], [-24.0, -30.0]]], [[[4.0, 5.0], [-24.0, -30.0]], [[8.0, 
-10.0], [28.0, 35.0]]], [[[4.0, 5.0], [28.0, 35.0]], [[-12.0, -15.0], [-16.0, -20.0]]], [[[8.0, 10.0], [4.0, 5.0]], [[-12.0, 
--15.0], [0.0, 0.0]]], [[[4.0, 5.0], [8.0, 10.0]], [[-4.0, -5.0], [0.0, 0.0]]], [[[-12.0, -15.0], [4.0, 5.0]], [[0.0, 0.0], 
-[0.0, 0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[2.0, -1.0, -4.0], [-1.0, 5.0, -3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[5.0, 7.0, 3.0], [-7.0, -2.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, -6.0, 0.0], [4.0, 0.0, 0.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-18.0,self.functionspace)
+      ref.setTaggedValue(1,-8.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank2_offset1(self):
-      arg0=numpy.array([[[[-6.0, -6.0], [-6.0, 7.0]], [[5.0, 7.0], [5.0, 4.0]], [[-7.0, 5.0], [-1.0, -2.0]], [[2.0, -2.0], 
-[-7.0, -5.0]], [[4.0, 5.0], [4.0, -7.0]], [[4.0, -2.0], [7.0, -1.0]]], [[[4.0, -4.0], [7.0, 4.0]], [[6.0, 0.0], [-1.0, -2.0]], 
-[[6.0, 4.0], [7.0, -5.0]], [[2.0, -4.0], [3.0, -7.0]], [[-7.0, 0.0], [-3.0, 1.0]], [[-6.0, 0.0], [-4.0, 7.0]]], [[[-5.0, -7.0], 
-[-5.0, -6.0]], [[4.0, 6.0], [0.0, -6.0]], [[5.0, -1.0], [-7.0, -3.0]], [[-1.0, 0.0], [1.0, 0.0]], [[3.0, 1.0], [1.0, -7.0]], 
-[[6.0, 6.0], [7.0, 0.0]]]])
-      arg1=numpy.array([[0.0, -3.0], [-1.0, -7.0], [1.0, -4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[-9.0, 10.0], [-3.0, 74.0]], [[-12.0, -11.0], [-10.0, -25.0]]], [[[-2.0, -73.0], [6.0, -45.0]], [[1.0, 
--8.0], [-4.0, 26.0]]], [[[-1.0, -41.0], [-5.0, -39.0]], [[-14.0, -18.0], [2.0, 53.0]]], [[[-3.0, -16.0], [4.0, 34.0]], [[-2.0, 
--4.0], [7.0, 64.0]]], [[[10.0, 25.0], [1.0, -19.0]], [[4.0, 5.0], [-8.0, 42.0]]], [[[12.0, 6.0], [6.0, -18.0]], [[11.0, -21.0], 
-[-7.0, -46.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[5.0, -3.0, 3.0], [-5.0, 7.0, 1.0], [3.0, 6.0, 0.0], [7.0, 7.0, 3.0]], [[-3.0, 3.0, -4.0], [-5.0, 
+7.0, -2.0], [5.0, 0.0, -5.0], [-4.0, -3.0, 5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-3.0, -2.0, -3.0], [0.0, 3.0, 3.0], [-2.0, -2.0, -5.0], [-4.0, 7.0, -2.0]], [[-6.0, 5.0, -3.0], 
+[2.0, 0.0, 0.0], [-3.0, -1.0, 4.0], [4.0, 5.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -4.0, -6.0], [-6.0, 0.0, -7.0], [-4.0, 7.0, -5.0], [3.0, 4.0, 4.0]], [[-5.0, 
+-6.0, -2.0], [6.0, -6.0, 4.0], [7.0, -6.0, -1.0], [-2.0, 0.0, 6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-43.0,self.functionspace)
+      ref.setTaggedValue(1,81.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank0_offset0(self):
-      arg0=numpy.array([[[-6.0, 7.0], [-1.0, -1.0]], [[-4.0, 3.0], [0.0, 3.0]], [[-4.0, 0.0], [1.0, 6.0]], [[0.0, 4.0], [4.0, 
-0.0]], [[5.0, -7.0], [4.0, 5.0]], [[-4.0, -2.0], [-4.0, 5.0]]])
-      arg1=Data(5.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-30.0, 35.0], [-5.0, -5.0]], [[-20.0, 15.0], [0.0, 15.0]], [[-20.0, 0.0], [5.0, 30.0]], [[0.0, 
-20.0], [20.0, 0.0]], [[25.0, -35.0], [20.0, 25.0]], [[-20.0, -10.0], [-20.0, 25.0]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[7.0, 3.0], [-5.0, 0.0], [0.0, -6.0]], [[4.0, -1.0], [5.0, -6.0], [7.0, -6.0]]], [[[1.0, -5.0], 
+[4.0, 0.0], [-3.0, -3.0]], [[1.0, 0.0], [3.0, -1.0], [2.0, 1.0]]], [[[7.0, -1.0], [-2.0, -7.0], [5.0, -6.0]], [[4.0, -5.0], 
+[2.0, -3.0], [-5.0, -6.0]]], [[[5.0, -2.0], [5.0, -7.0], [-3.0, 2.0]], [[6.0, 0.0], [0.0, -7.0], [-7.0, 
+-3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[1.0, 7.0], [1.0, -3.0], [-3.0, 5.0]], [[-6.0, -4.0], [7.0, -5.0], [-6.0, -3.0]]], [[[-7.0, 
+2.0], [-5.0, -5.0], [4.0, -3.0]], [[0.0, -1.0], [2.0, -4.0], [-4.0, 6.0]]], [[[-6.0, -4.0], [5.0, -7.0], [1.0, 5.0]], [[0.0, 
+0.0], [-3.0, -4.0], [7.0, 7.0]]], [[[-2.0, 1.0], [6.0, -3.0], [-4.0, -7.0]], [[-1.0, 0.0], [1.0, 0.0], [3.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -2.0], [-1.0, 0.0], [0.0, -3.0]], [[-7.0, 3.0], [-1.0, -4.0], [1.0, -1.0]]], 
+[[[5.0, -5.0], [-6.0, 6.0], [-5.0, 4.0]], [[6.0, 2.0], [-1.0, -1.0], [-1.0, 6.0]]], [[[3.0, 6.0], [-2.0, -5.0], [5.0, 0.0]], 
+[[6.0, 3.0], [-3.0, 3.0], [-1.0, 6.0]]], [[[1.0, 0.0], [-7.0, -7.0], [-7.0, 6.0]], [[-5.0, -4.0], [2.0, -3.0], [-2.0, 0.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-103.0,self.functionspace)
+      ref.setTaggedValue(1,141.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank1_offset1(self):
-      arg0=numpy.array([[[[2.0, -4.0], [4.0, 2.0]], [[5.0, 0.0], [5.0, 5.0]], [[-4.0, 4.0], [-1.0, -4.0]], [[-1.0, 2.0], [6.0, 
-7.0]], [[-4.0, -5.0], [3.0, -4.0]], [[6.0, 1.0], [-3.0, 7.0]]], [[[-1.0, 1.0], [-2.0, -1.0]], [[3.0, 5.0], [-7.0, 0.0]], 
-[[-5.0, -6.0], [-6.0, 5.0]], [[2.0, -1.0], [7.0, 0.0]], [[1.0, 3.0], [-4.0, -1.0]], [[-3.0, -7.0], [7.0, -5.0]]], [[[3.0, 0.0], 
-[-4.0, 6.0]], [[0.0, -1.0], [-3.0, 4.0]], [[6.0, 5.0], [5.0, 2.0]], [[5.0, 5.0], [0.0, -5.0]], [[7.0, -2.0], [6.0, 0.0]], 
-[[-1.0, -6.0], [4.0, 2.0]]]])
-      arg1=Data(numpy.array([7.0, -3.0, 3.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[26.0, -31.0], [22.0, 35.0]], [[26.0, -18.0], [47.0, 47.0]], [[5.0, 61.0], [26.0, -37.0]], [[2.0, 
-32.0], [21.0, 34.0]], [[-10.0, -50.0], [51.0, -25.0]], [[48.0, 10.0], [-30.0, 70.0]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg1=Data(numpy.array([6.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -6.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-24.0, 12.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-8.0, 24.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([4.0, -4.0, -3.0]),self.functionspace)
+      arg1=Data(numpy.array([[1.0, 1.0], [7.0, -4.0], [0.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -2.0], [0.0, 7.0], [-5.0, -1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-24.0, 29.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([3.0, -33.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[7.0, 1.0, -2.0], [-6.0, 7.0, -4.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 6.0], [-3.0, 0.0], [2.0, 1.0]], [[7.0, 0.0], [0.0, -4.0], [6.0, 
+-4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, -4.0], [3.0, -3.0], [3.0, -4.0]], [[-6.0, 6.0], [7.0, -1.0], [-7.0, -3.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-87.0, 28.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([75.0, -54.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[1.0, 1.0, -2.0], [-1.0, 4.0, 2.0], [2.0, -2.0, -1.0], [6.0, -3.0, 1.0]], [[2.0, -5.0, -4.0], 
+[3.0, -2.0, 0.0], [0.0, 2.0, -2.0], [4.0, 7.0, -6.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-3.0, 2.0], [3.0, -4.0], [-3.0, -1.0]], [[4.0, -3.0], [-2.0, 7.0], [-6.0, -7.0]], [[0.0, -2.0], 
+[-7.0, 3.0], [0.0, -2.0]], [[6.0, -1.0], [2.0, 6.0], [-7.0, 2.0]]], [[[2.0, 1.0], [5.0, -4.0], [2.0, 0.0]], [[7.0, 3.0], [-4.0, 
+0.0], [7.0, -1.0]], [[3.0, 4.0], [4.0, 6.0], [3.0, 1.0]], [[0.0, 7.0], [2.0, 6.0], [-5.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, -1.0], [0.0, 6.0], [7.0, -5.0]], [[-6.0, 6.0], [-4.0, 7.0], [-4.0, 5.0]], 
+[[0.0, -7.0], [-4.0, 7.0], [-4.0, -7.0]], [[0.0, -4.0], [-3.0, 1.0], [3.0, 2.0]]], [[[-5.0, -7.0], [3.0, -7.0], [-2.0, -6.0]], 
+[[0.0, -6.0], [-7.0, -7.0], [6.0, 3.0]], [[-1.0, -6.0], [5.0, -6.0], [-5.0, -4.0]], [[-1.0, -3.0], [2.0, -2.0], [-4.0, 
+-3.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([65.0, 98.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([37.0, 30.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg1=Data(numpy.array([[-2.0, -2.0, 0.0, 0.0, -4.0], [7.0, 2.0, -5.0, -6.0, 0.0], [5.0, 0.0, 0.0, -7.0, -3.0], [3.0, 7.0, 
+-3.0, -1.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, 5.0, 0.0, -2.0, -3.0], [2.0, -2.0, 0.0, 5.0, -3.0], [3.0, -1.0, 6.0, 7.0, 4.0], 
+[-5.0, -1.0, 2.0, -4.0, 3.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-2.0, -2.0, 0.0, 0.0, -4.0], [7.0, 2.0, -5.0, -6.0, 0.0], [5.0, 0.0, 0.0, -7.0, -3.0], [3.0, 7.0, 
+-3.0, -1.0, -3.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-6.0, 5.0, 0.0, -2.0, -3.0], [2.0, -2.0, 0.0, 5.0, -3.0], [3.0, -1.0, 6.0, 7.0, 4.0], 
+[-5.0, -1.0, 2.0, -4.0, 3.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-2.0, 7.0, 0.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, -1.0, -7.0, 6.0, 0.0], [-6.0, 0.0, -7.0, 4.0, 4.0], [6.0, 0.0, -5.0, 4.0, 2.0], [2.0, 0.0, 
+-1.0, -4.0, 1.0]], [[3.0, -2.0, 0.0, 7.0, -2.0], [-1.0, -4.0, 7.0, 3.0, -1.0], [-3.0, -3.0, 5.0, -3.0, 1.0], [-5.0, 0.0, 0.0, 
+1.0, -2.0]], [[2.0, 7.0, 0.0, 6.0, -7.0], [1.0, -4.0, 5.0, -7.0, 0.0], [5.0, 0.0, -7.0, -5.0, 2.0], [0.0, -6.0, -4.0, 1.0, 
+-5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, 3.0, 6.0, -2.0, -6.0], [2.0, -7.0, 4.0, 0.0, -6.0], [1.0, 6.0, 1.0, 2.0, 
+-4.0], [6.0, 6.0, -7.0, 4.0, -7.0]], [[7.0, -6.0, -7.0, 4.0, 5.0], [4.0, 0.0, -5.0, -4.0, 6.0], [-3.0, 0.0, 0.0, 1.0, -7.0], 
+[-7.0, -2.0, -3.0, -2.0, 6.0]], [[-2.0, -2.0, -5.0, -7.0, -3.0], [0.0, -6.0, -1.0, -6.0, -2.0], [7.0, 7.0, -1.0, 5.0, -4.0], 
+[-4.0, 0.0, 3.0, -3.0, 3.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[29.0, -12.0, 14.0, 37.0, -14.0], [5.0, -28.0, 63.0, 13.0, -15.0], [-33.0, -21.0, 45.0, -29.0, 
+3.0], [-39.0, 0.0, 2.0, 15.0, -16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[51.0, -48.0, -61.0, 32.0, 47.0], [24.0, 14.0, -43.0, -28.0, 54.0], [-23.0, -12.0, 
+-2.0, 3.0, -41.0], [-61.0, -26.0, -7.0, -22.0, 56.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-6.0, 7.0, 1.0], [6.0, -1.0, 1.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-5.0, 2.0, 4.0, 0.0, -1.0], [0.0, 1.0, -3.0, -4.0, -1.0], [4.0, 0.0, 0.0, 6.0, 1.0], [0.0, 6.0, 
+0.0, -6.0, 2.0]], [[3.0, 7.0, 6.0, 1.0, -3.0], [4.0, 5.0, -5.0, 5.0, -5.0], [-3.0, 5.0, 5.0, 1.0, 0.0], [3.0, 0.0, -6.0, 5.0, 
+-2.0]], [[1.0, -2.0, 7.0, 6.0, 0.0], [0.0, 6.0, 0.0, 0.0, -2.0], [0.0, 3.0, -4.0, 0.0, -5.0], [-6.0, -1.0, -4.0, -1.0, 2.0]]], 
+[[[-1.0, -6.0, 2.0, -6.0, -5.0], [-2.0, 7.0, 0.0, 4.0, -1.0], [-6.0, -1.0, 0.0, 0.0, 7.0], [3.0, 2.0, 7.0, 0.0, -4.0]], [[0.0, 
+6.0, -5.0, 0.0, -7.0], [-7.0, 6.0, -6.0, -5.0, 2.0], [7.0, -6.0, -4.0, 2.0, -1.0], [-5.0, 2.0, -1.0, -4.0, -1.0]], [[-4.0, 4.0, 
+4.0, -5.0, 5.0], [0.0, 1.0, 2.0, 3.0, -4.0], [5.0, -6.0, -7.0, 0.0, 6.0], [5.0, -5.0, -6.0, -5.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 2.0, -4.0, 5.0, 1.0], [7.0, -5.0, 5.0, 0.0, -3.0], [1.0, -3.0, -1.0, -5.0, 
+2.0], [-3.0, 7.0, -5.0, 6.0, 7.0]], [[-5.0, -3.0, 2.0, -4.0, -5.0], [3.0, 0.0, -2.0, 0.0, 7.0], [7.0, 0.0, -2.0, -4.0, -1.0], 
+[-7.0, -7.0, -2.0, 3.0, 7.0]], [[3.0, -6.0, 5.0, 5.0, 0.0], [-2.0, 3.0, -3.0, -5.0, -7.0], [6.0, 6.0, 3.0, -4.0, 0.0], [6.0, 
+7.0, -2.0, -5.0, -4.0]]], [[[7.0, 4.0, 5.0, -5.0, 3.0], [0.0, 1.0, 4.0, -6.0, -1.0], [-3.0, 7.0, 3.0, 3.0, 3.0], [-6.0, 2.0, 
+0.0, -1.0, -7.0]], [[-5.0, 7.0, -7.0, -6.0, -3.0], [3.0, -1.0, 2.0, 6.0, 0.0], [-4.0, 5.0, -2.0, 2.0, 0.0], [-5.0, -4.0, -3.0, 
+0.0, 1.0]], [[-3.0, 3.0, 1.0, -6.0, 0.0], [6.0, -3.0, 0.0, 0.0, 5.0], [4.0, -2.0, -2.0, 1.0, -5.0], [0.0, 2.0, -3.0, 3.0, 
+-3.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[42.0, -3.0, 46.0, -28.0, -33.0], [23.0, 72.0, -9.0, 91.0, -43.0], [-83.0, 32.0, 28.0, -31.0, 
+38.0], [43.0, -32.0, -9.0, 69.0, -40.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[42.0, -19.0, 81.0, -83.0, -20.0], [-20.0, 37.0, -25.0, -47.0, 59.0], [39.0, 59.0, 
+13.0, 15.0, -6.0], [-56.0, -66.0, 14.0, -23.0, -43.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, -2.0], [0.0, 2.0]], [[5.0, -6.0], [6.0, 6.0]], [[4.0, -6.0], [-4.0, 5.0]], [[4.0, 7.0], 
+[-6.0, -3.0]], [[6.0, -1.0], [7.0, -1.0]], [[-7.0, -4.0], [-4.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, -5.0], [0.0, 3.0]], [[-1.0, 4.0], [-1.0, 7.0]], [[-4.0, 5.0], [-7.0, 6.0]], 
+[[1.0, 6.0], [-4.0, -6.0]], [[1.0, -4.0], [0.0, -5.0]], [[1.0, -6.0], [-1.0, 6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[24.0, 8.0], [-0.0, -8.0]], [[-20.0, 24.0], [-24.0, -24.0]], [[-16.0, 24.0], [16.0, -20.0]], 
+[[-16.0, -28.0], [24.0, 12.0]], [[-24.0, 4.0], [-28.0, 4.0]], [[28.0, 16.0], [16.0, -20.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-24.0, 20.0], [-0.0, -12.0]], [[4.0, -16.0], [4.0, -28.0]], [[16.0, -20.0], [28.0, 
+-24.0]], [[-4.0, -24.0], [16.0, 24.0]], [[-4.0, 16.0], [-0.0, 20.0]], [[-4.0, 24.0], [4.0, -24.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_constData_rank1_offset0(self):
-      arg0=numpy.array([[[1.0, -2.0], [-4.0, 2.0]], [[6.0, 2.0], [-5.0, 7.0]], [[5.0, 6.0], [4.0, 2.0]], [[5.0, -7.0], [-7.0, 
--1.0]], [[1.0, 6.0], [7.0, -6.0]], [[-6.0, 0.0], [7.0, 0.0]]])
-      arg1=Data(numpy.array([2.0, -5.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[2.0, -5.0], [-4.0, 10.0]], [[-8.0, 20.0], [4.0, -10.0]]], [[[12.0, -30.0], [4.0, -10.0]], 
-[[-10.0, 25.0], [14.0, -35.0]]], [[[10.0, -25.0], [12.0, -30.0]], [[8.0, -20.0], [4.0, -10.0]]], [[[10.0, -25.0], [-14.0, 
-35.0]], [[-14.0, 35.0], [-2.0, 5.0]]], [[[2.0, -5.0], [12.0, -30.0]], [[14.0, -35.0], [-12.0, 30.0]]], [[[-12.0, 30.0], [0.0, 
-0.0]], [[14.0, -35.0], [0.0, 0.0]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([6.0, -4.0, -2.0]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, 1.0], [-2.0, 5.0]], [[7.0, 3.0], [7.0, -5.0]], [[4.0, 2.0], [-6.0, 3.0]], [[6.0, -5.0], 
+[-6.0, 1.0]], [[-5.0, -1.0], [-7.0, -7.0]], [[0.0, -3.0], [0.0, 5.0]]], [[[2.0, 4.0], [2.0, 5.0]], [[3.0, 4.0], [7.0, 0.0]], 
+[[0.0, 2.0], [7.0, -7.0]], [[0.0, 3.0], [5.0, -5.0]], [[2.0, 5.0], [7.0, 2.0]], [[6.0, 1.0], [0.0, -4.0]]], [[[2.0, 4.0], 
+[-2.0, -6.0]], [[-1.0, 2.0], [-7.0, -6.0]], [[-3.0, 7.0], [-1.0, 2.0]], [[-3.0, 6.0], [1.0, -6.0]], [[-7.0, -4.0], [5.0, 0.0]], 
+[[5.0, 1.0], [0.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-1.0, 3.0], [-7.0, 7.0]], [[-2.0, -4.0], [-3.0, 4.0]], [[-2.0, -5.0], [0.0, 6.0]], 
+[[6.0, -1.0], [-5.0, -7.0]], [[5.0, -7.0], [4.0, -1.0]], [[-6.0, 3.0], [0.0, 3.0]]], [[[-3.0, 0.0], [0.0, -6.0]], [[1.0, 2.0], 
+[7.0, -3.0]], [[3.0, 6.0], [7.0, 0.0]], [[-1.0, -4.0], [-1.0, 5.0]], [[0.0, 6.0], [-1.0, -1.0]], [[6.0, -7.0], [-7.0, 1.0]]], 
+[[[3.0, 1.0], [-2.0, 0.0]], [[2.0, 1.0], [2.0, 7.0]], [[-1.0, 3.0], [-4.0, 0.0]], [[-3.0, 6.0], [-7.0, 6.0]], [[6.0, 7.0], 
+[4.0, -2.0]], [[0.0, 3.0], [0.0, -4.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-12.0, -18.0], [-16.0, 22.0]], [[32.0, -2.0], [28.0, -18.0]], [[30.0, -10.0], [-62.0, 42.0]], 
+[[42.0, -54.0], [-58.0, 38.0]], [[-24.0, -18.0], [-80.0, -50.0]], [[-34.0, -24.0], [0.0, 42.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 16.0], [-38.0, 66.0]], [[-20.0, -34.0], [-50.0, 22.0]], [[-22.0, -60.0], [-20.0, 
+36.0]], [[46.0, -2.0], [-12.0, -74.0]], [[18.0, -80.0], [20.0, 2.0]], [[-60.0, 40.0], [28.0, 22.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank2_offset1(self):
-      arg0=numpy.array([[[[-6.0, 4.0], [5.0, -5.0]], [[-3.0, 5.0], [3.0, 1.0]], [[3.0, 4.0], [-7.0, 3.0]], [[-2.0, -1.0], [3.0, 
-4.0]], [[7.0, 1.0], [-7.0, 1.0]], [[-4.0, 3.0], [-2.0, -3.0]]], [[[-5.0, 5.0], [0.0, 4.0]], [[-2.0, 0.0], [-2.0, 7.0]], [[-6.0, 
-1.0], [-3.0, -3.0]], [[5.0, -3.0], [0.0, -4.0]], [[-2.0, 7.0], [3.0, -6.0]], [[2.0, -6.0], [-7.0, 1.0]]], [[[7.0, -1.0], [0.0, 
-1.0]], [[0.0, 5.0], [2.0, -5.0]], [[2.0, 0.0], [0.0, 0.0]], [[-7.0, 2.0], [2.0, 0.0]], [[-4.0, -1.0], [-2.0, -6.0]], [[3.0, 
--5.0], [1.0, -5.0]]]])
-      arg1=Data(numpy.array([[-2.0, 5.0], [-1.0, 3.0], [-5.0, -4.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-18.0, -73.0], [-8.0, 39.0]], [[-10.0, 25.0], [1.0, -17.0]]], [[[8.0, -21.0], [-35.0, 5.0]], 
-[[-14.0, 1.0], [16.0, 46.0]]], [[[-10.0, -11.0], [-9.0, 23.0]], [[17.0, -44.0], [-3.0, 6.0]]], [[[34.0, 33.0], [-5.0, -22.0]], 
-[[-16.0, 7.0], [-4.0, 8.0]]], [[[8.0, 45.0], [-4.0, 30.0]], [[21.0, -18.0], [34.0, 11.0]]], [[[-9.0, -26.0], [25.0, 17.0]], 
-[[6.0, -35.0], [30.0, 8.0]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg1=Data(numpy.array([[[[-6.0, 6.0, 0.0, -7.0], [3.0, 5.0, 3.0, 0.0], [-4.0, 0.0, -5.0, -7.0]], [[-7.0, -6.0, -1.0, 
+5.0], [3.0, -6.0, -4.0, -3.0], [-6.0, -4.0, 7.0, 5.0]]], [[[4.0, -6.0, -5.0, 3.0], [5.0, -5.0, 1.0, -3.0], [3.0, 0.0, 6.0, 
+-7.0]], [[-1.0, 5.0, -1.0, -5.0], [-6.0, 3.0, -1.0, 4.0], [4.0, -1.0, 0.0, 0.0]]], [[[-1.0, 3.0, 1.0, 3.0], [-1.0, -5.0, -3.0, 
+-1.0], [-2.0, 0.0, -5.0, 5.0]], [[-4.0, 2.0, 7.0, -3.0], [6.0, -6.0, 2.0, 6.0], [-2.0, -1.0, -2.0, 5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[7.0, 6.0, -2.0, 0.0], [4.0, 1.0, 2.0, 5.0], [-5.0, 3.0, 4.0, 1.0]], [[1.0, -7.0, 
+-5.0, 3.0], [2.0, -3.0, -1.0, -6.0], [1.0, 4.0, -1.0, -2.0]]], [[[-2.0, -3.0, 1.0, 2.0], [6.0, 0.0, 6.0, 3.0], [5.0, -3.0, 3.0, 
+3.0]], [[5.0, -7.0, 6.0, 5.0], [6.0, -3.0, -7.0, -6.0], [6.0, 7.0, 7.0, -7.0]]], [[[-7.0, -7.0, -3.0, -6.0], [-4.0, -6.0, -3.0, 
+-2.0], [4.0, 0.0, -2.0, 6.0]], [[-1.0, -2.0, -4.0, 7.0], [1.0, -6.0, 1.0, -7.0], [-2.0, 0.0, -2.0, 5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[18.0, -18.0, -0.0, 21.0], [-9.0, -15.0, -9.0, -0.0], [12.0, -0.0, 15.0, 21.0]], [[21.0, 18.0, 
+3.0, -15.0], [-9.0, 18.0, 12.0, 9.0], [18.0, 12.0, -21.0, -15.0]]], [[[-12.0, 18.0, 15.0, -9.0], [-15.0, 15.0, -3.0, 9.0], 
+[-9.0, -0.0, -18.0, 21.0]], [[3.0, -15.0, 3.0, 15.0], [18.0, -9.0, 3.0, -12.0], [-12.0, 3.0, -0.0, -0.0]]], [[[3.0, -9.0, -3.0, 
+-9.0], [3.0, 15.0, 9.0, 3.0], [6.0, -0.0, 15.0, -15.0]], [[12.0, -6.0, -21.0, 9.0], [-18.0, 18.0, -6.0, -18.0], [6.0, 3.0, 6.0, 
+-15.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-21.0, -18.0, 6.0, -0.0], [-12.0, -3.0, -6.0, -15.0], [15.0, -9.0, -12.0, -3.0]], 
+[[-3.0, 21.0, 15.0, -9.0], [-6.0, 9.0, 3.0, 18.0], [-3.0, -12.0, 3.0, 6.0]]], [[[6.0, 9.0, -3.0, -6.0], [-18.0, -0.0, -18.0, 
+-9.0], [-15.0, 9.0, -9.0, -9.0]], [[-15.0, 21.0, -18.0, -15.0], [-18.0, 9.0, 21.0, 18.0], [-18.0, -21.0, -21.0, 21.0]]], 
+[[[21.0, 21.0, 9.0, 18.0], [12.0, 18.0, 9.0, 6.0], [-12.0, -0.0, 6.0, -18.0]], [[3.0, 6.0, 12.0, -21.0], [-3.0, 18.0, -3.0, 
+21.0], [6.0, -0.0, 6.0, -15.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([4.0, 4.0]),self.functionspace)
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,1.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-8.0, -8.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([4.0, 4.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
       ref=-ref
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[[0.0, -3.0], [1.0, 4.0]], [[-7.0, -2.0], [2.0, 1.0]], [[0.0, 0.0], [3.0, 5.0]], [[2.0, 1.0], [-4.0, 
-3.0]], [[0.0, 5.0], [-6.0, -1.0]], [[1.0, -2.0], [-3.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(7.0)+(1-msk_arg1)*(-3.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -21.0], [7.0, 28.0]], [[-49.0, -14.0], [14.0, 7.0]], [[0.0, 0.0], [21.0, 35.0]], [[14.0, 
-7.0], [-28.0, 21.0]], [[0.0, 35.0], [-42.0, -7.0]], [[7.0, -14.0], [-21.0, -42.0]]])+(1.-msk_ref)*numpy.array([[[-0.0, 9.0], 
-[-3.0, -12.0]], [[21.0, 6.0], [-6.0, -3.0]], [[-0.0, -0.0], [-9.0, -15.0]], [[-6.0, -3.0], [12.0, -9.0]], [[-0.0, -15.0], 
-[18.0, 3.0]], [[-3.0, 6.0], [9.0, 18.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[[[5.0, 1.0], [0.0, 3.0]], [[0.0, 7.0], [2.0, -3.0]], [[0.0, 5.0], [-3.0, 1.0]], [[-2.0, 1.0], [-7.0, 
--5.0]], [[6.0, -2.0], [-7.0, 2.0]], [[2.0, -4.0], [-3.0, -7.0]]], [[[-3.0, -4.0], [-5.0, -5.0]], [[-4.0, -2.0], [-6.0, 1.0]], 
-[[-6.0, -3.0], [0.0, 7.0]], [[3.0, 2.0], [3.0, -4.0]], [[1.0, 2.0], [-4.0, 7.0]], [[0.0, -2.0], [-3.0, -3.0]]], [[[1.0, 6.0], 
-[-6.0, 0.0]], [[-2.0, -5.0], [-7.0, -6.0]], [[0.0, -7.0], [-2.0, -2.0]], [[-5.0, 1.0], [0.0, 6.0]], [[-4.0, -7.0], [-1.0, 
-3.0]], [[-2.0, -3.0], [-5.0, -2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-1.0, -5.0, 1.0])+(1.-msk_arg1)*numpy.array([-2.0, -4.0, 7.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[11.0, 25.0], [19.0, 22.0]], [[18.0, -2.0], [21.0, -8.0]], [[30.0, 3.0], [1.0, -38.0]], 
-[[-18.0, -10.0], [-8.0, 31.0]], [[-15.0, -15.0], [26.0, -34.0]], [[-4.0, 11.0], [13.0, 
-20.0]]])+(1.-msk_ref)*numpy.array([[[9.0, 56.0], [-22.0, 14.0]], [[2.0, -41.0], [-29.0, -40.0]], [[24.0, -47.0], [-8.0, 
--44.0]], [[-43.0, -3.0], [2.0, 68.0]], [[-44.0, -53.0], [23.0, -11.0]], [[-18.0, -5.0], [-17.0, 12.0]]])
+   def test_generalTensorProduct_constData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[7.0, 4.0, -5.0], [3.0, -4.0, -1.0]]),self.functionspace)
+      arg1=Data(numpy.array([-4.0, -7.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, 7.0, -6.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-66.0, 14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([37.0, -31.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank3_expandedData_rank1_offset0(self):
-      arg0=numpy.array([[[1.0, 0.0], [5.0, 0.0]], [[-6.0, -5.0], [4.0, 1.0]], [[5.0, -7.0], [-7.0, -2.0]], [[-7.0, -6.0], [7.0, 
--7.0]], [[6.0, -1.0], [-4.0, -1.0]], [[-5.0, -6.0], [-3.0, 3.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, -2.0])+(1.-msk_arg1)*numpy.array([-3.0, 2.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, -2.0], [0.0, 0.0]], [[0.0, -10.0], [0.0, 0.0]]], [[[0.0, 12.0], [0.0, 10.0]], [[0.0, 
--8.0], [0.0, -2.0]]], [[[0.0, -10.0], [0.0, 14.0]], [[0.0, 14.0], [0.0, 4.0]]], [[[0.0, 14.0], [0.0, 12.0]], [[0.0, -14.0], 
-[0.0, 14.0]]], [[[0.0, -12.0], [0.0, 2.0]], [[0.0, 8.0], [0.0, 2.0]]], [[[0.0, 10.0], [0.0, 12.0]], [[0.0, 6.0], [0.0, 
--6.0]]]])+(1.-msk_ref)*numpy.array([[[[-3.0, 2.0], [0.0, 0.0]], [[-15.0, 10.0], [0.0, 0.0]]], [[[18.0, -12.0], [15.0, -10.0]], 
-[[-12.0, 8.0], [-3.0, 2.0]]], [[[-15.0, 10.0], [21.0, -14.0]], [[21.0, -14.0], [6.0, -4.0]]], [[[21.0, -14.0], [18.0, -12.0]], 
-[[-21.0, 14.0], [21.0, -14.0]]], [[[-18.0, 12.0], [3.0, -2.0]], [[12.0, -8.0], [3.0, -2.0]]], [[[15.0, -10.0], [18.0, -12.0]], 
-[[9.0, -6.0], [-9.0, 6.0]]]])
+   def test_generalTensorProduct_constData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[3.0, 5.0, 3.0], [1.0, 1.0, 0.0]], [[-4.0, -4.0, 3.0], [-2.0, 6.0, -5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-7.0, -3.0, -6.0], [5.0, -2.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 6.0, 0.0], [6.0, 2.0, -1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-51.0, 5.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([32.0, -11.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[[[-5.0, -1.0], [-6.0, 5.0]], [[5.0, 5.0], [7.0, -2.0]], [[4.0, -2.0], [-3.0, 0.0]], [[-6.0, 3.0], 
-[5.0, 1.0]], [[-3.0, 3.0], [0.0, 1.0]], [[6.0, 3.0], [-2.0, -6.0]]], [[[3.0, -1.0], [2.0, 1.0]], [[4.0, 1.0], [7.0, 5.0]], 
-[[7.0, 3.0], [0.0, 0.0]], [[7.0, -2.0], [-5.0, -1.0]], [[0.0, 7.0], [-3.0, 7.0]], [[6.0, 2.0], [-6.0, 1.0]]], [[[6.0, 6.0], 
-[-6.0, -3.0]], [[2.0, 2.0], [-6.0, -3.0]], [[0.0, 7.0], [-5.0, 4.0]], [[4.0, -4.0], [7.0, 6.0]], [[-6.0, -3.0], [3.0, 0.0]], 
-[[4.0, -4.0], [-7.0, 5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, 0.0], [-3.0, 0.0], [-7.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 1.0], [-7.0, -7.0], 
-[-6.0, -4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-16.0, 6.0], [-32.0, 6.0]], [[78.0, -6.0], [-17.0, -3.0]]], [[[-61.0, 2.0], [-52.0, 2.0]], 
-[[-28.0, -6.0], [20.0, -3.0]]], [[[-49.0, 0.0], [-44.0, 7.0]], [[56.0, -5.0], [-28.0, 4.0]]], [[[-7.0, 4.0], [13.0, -4.0]], 
-[[-69.0, 7.0], [-46.0, 6.0]]], [[[63.0, -6.0], [-21.0, -3.0]], [[-12.0, 3.0], [-28.0, 0.0]]], [[[-88.0, 4.0], [1.0, -4.0]], 
-[[81.0, -7.0], [4.0, 5.0]]]])+(1.-msk_ref)*numpy.array([[[[-37.0, -50.0], [-25.0, -18.0]], [[46.0, 4.0], [-9.0, 10.0]]], 
-[[[-60.0, -31.0], [-39.0, -10.0]], [[-41.0, -18.0], [-9.0, -25.0]]], [[[-65.0, -45.0], [-55.0, -51.0]], [[42.0, 17.0], [-24.0, 
--16.0]]], [[[-49.0, -71.0], [26.0, 33.0]], [[-27.0, 12.0], [-33.0, -16.0]]], [[[48.0, 21.0], [-43.0, -34.0]], [[3.0, 9.0], 
-[-53.0, -48.0]]], [[[-90.0, -52.0], [-2.0, 5.0]], [[92.0, 68.0], [-13.0, -33.0]]]])
+   def test_generalTensorProduct_constData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-5.0, -7.0, 4.0], [5.0, 1.0, -5.0], [-7.0, -4.0, -4.0], [2.0, 0.0, -5.0]], [[6.0, -6.0, -5.0], 
+[0.0, 0.0, -7.0], [0.0, -4.0, -7.0], [-2.0, -3.0, -4.0]]], [[[0.0, -7.0, -3.0], [-6.0, 3.0, 2.0], [-4.0, 6.0, 4.0], [-1.0, 
+-4.0, -2.0]], [[-6.0, -1.0, 7.0], [-3.0, -2.0, -4.0], [-5.0, 0.0, 6.0], [2.0, -7.0, -3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[5.0, 4.0, 2.0], [-3.0, 7.0, -1.0], [1.0, 2.0, 3.0], [1.0, 0.0, 5.0]], [[-6.0, -7.0, -5.0], 
+[-2.0, 1.0, 0.0], [7.0, -2.0, 7.0], [0.0, 3.0, 4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 0.0, 4.0], [-4.0, 1.0, 7.0], [3.0, 5.0, -7.0], [6.0, -6.0, 0.0]], [[3.0, 6.0, 
+7.0], [0.0, 0.0, 6.0], [-5.0, 0.0, -2.0], [0.0, 1.0, 0.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-133.0, -2.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-88.0, 44.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_float_rank0_offset0(self):
-      arg0=numpy.array([[[[5.0, 6.0, 3.0, 5.0], [0.0, 2.0, 3.0, -4.0], [-1.0, 6.0, 6.0, -7.0]], [[-7.0, 0.0, 7.0, -7.0], [4.0, 
-7.0, -5.0, 0.0], [-4.0, -6.0, -2.0, -3.0]]], [[[-6.0, -3.0, -4.0, 5.0], [1.0, 0.0, -7.0, 6.0], [2.0, -1.0, -1.0, 7.0]], [[2.0, 
-0.0, 4.0, 3.0], [-4.0, -6.0, 0.0, 0.0], [-2.0, 7.0, -2.0, -3.0]]], [[[-3.0, -5.0, -6.0, -1.0], [-1.0, 0.0, -6.0, 1.0], [5.0, 
--3.0, 0.0, -6.0]], [[-1.0, 1.0, 7.0, -7.0], [-6.0, 7.0, 5.0, 5.0], [3.0, 7.0, 3.0, -7.0]]]])
-      arg1=7.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[35.0, 42.0, 21.0, 35.0], [0.0, 14.0, 21.0, -28.0], [-7.0, 42.0, 42.0, -49.0]], [[-49.0, 0.0, 49.0, 
--49.0], [28.0, 49.0, -35.0, 0.0], [-28.0, -42.0, -14.0, -21.0]]], [[[-42.0, -21.0, -28.0, 35.0], [7.0, 0.0, -49.0, 42.0], 
-[14.0, -7.0, -7.0, 49.0]], [[14.0, 0.0, 28.0, 21.0], [-28.0, -42.0, 0.0, 0.0], [-14.0, 49.0, -14.0, -21.0]]], [[[-21.0, -35.0, 
--42.0, -7.0], [-7.0, 0.0, -42.0, 7.0], [35.0, -21.0, 0.0, -42.0]], [[-7.0, 7.0, 49.0, -49.0], [-42.0, 49.0, 35.0, 35.0], [21.0, 
-49.0, 21.0, -49.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-4.0, 5.0]),self.functionspace)
+      arg1=Data(numpy.array([0.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-4.0, -7.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 0.0], [0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[16.0, 28.0], [-20.0, -35.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_array_rank0_offset0(self):
-      arg0=numpy.array([[[[4.0, -5.0, -7.0, 5.0], [0.0, -1.0, 0.0, 2.0], [2.0, -4.0, 0.0, 2.0]], [[-1.0, 3.0, -4.0, -4.0], 
-[0.0, 6.0, -7.0, 5.0], [0.0, 7.0, -1.0, -4.0]]], [[[5.0, 5.0, 7.0, -7.0], [0.0, 7.0, 0.0, -4.0], [0.0, 2.0, 6.0, 5.0]], [[0.0, 
-1.0, -4.0, 6.0], [0.0, -3.0, -6.0, 4.0], [-4.0, 6.0, -4.0, 2.0]]], [[[-6.0, 1.0, 0.0, -3.0], [1.0, -7.0, 6.0, -4.0], [1.0, 
--1.0, -1.0, 0.0]], [[-7.0, 6.0, 0.0, 4.0], [-7.0, -2.0, -4.0, -6.0], [-3.0, 4.0, 2.0, -6.0]]]])
-      arg1=numpy.array(-4.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-16.0, 20.0, 28.0, -20.0], [-0.0, 4.0, -0.0, -8.0], [-8.0, 16.0, -0.0, -8.0]], [[4.0, -12.0, 16.0, 
-16.0], [-0.0, -24.0, 28.0, -20.0], [-0.0, -28.0, 4.0, 16.0]]], [[[-20.0, -20.0, -28.0, 28.0], [-0.0, -28.0, -0.0, 16.0], [-0.0, 
--8.0, -24.0, -20.0]], [[-0.0, -4.0, 16.0, -24.0], [-0.0, 12.0, 24.0, -16.0], [16.0, -24.0, 16.0, -8.0]]], [[[24.0, -4.0, -0.0, 
-12.0], [-4.0, 28.0, -24.0, 16.0], [-4.0, 4.0, 4.0, -0.0]], [[28.0, -24.0, -0.0, -16.0], [28.0, 8.0, 16.0, 24.0], [12.0, -16.0, 
--8.0, 24.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTensorProduct_constData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-4.0, -6.0, 3.0], [-3.0, 0.0, 4.0]]),self.functionspace)
+      arg1=Data(numpy.array([[5.0, -7.0], [-7.0, 0.0], [1.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 4.0], [0.0, 6.0], [1.0, 4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[25.0, 43.0], [-11.0, 41.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[23.0, -40.0], [19.0, 4.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_constData_rank0_offset0(self):
-      arg0=numpy.array([[[[-4.0, -6.0, 1.0, 3.0], [0.0, -7.0, -3.0, 6.0], [-5.0, 2.0, 1.0, 6.0]], [[-7.0, -7.0, 4.0, 2.0], 
-[3.0, 1.0, 3.0, 1.0], [0.0, 0.0, 5.0, -2.0]]], [[[-1.0, 1.0, -1.0, -1.0], [7.0, 0.0, -4.0, -1.0], [5.0, 0.0, 7.0, -5.0]], 
-[[4.0, 3.0, -7.0, 7.0], [2.0, 0.0, 4.0, 3.0], [-1.0, 3.0, -2.0, -5.0]]], [[[-5.0, 3.0, -5.0, -3.0], [0.0, -1.0, 3.0, 6.0], 
-[-5.0, -3.0, -5.0, 1.0]], [[-1.0, 0.0, 1.0, -5.0], [1.0, -4.0, -5.0, -4.0], [-5.0, 4.0, 0.0, 3.0]]]])
-      arg1=Data(7.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-28.0, -42.0, 7.0, 21.0], [0.0, -49.0, -21.0, 42.0], [-35.0, 14.0, 7.0, 42.0]], [[-49.0, -49.0, 
-28.0, 14.0], [21.0, 7.0, 21.0, 7.0], [0.0, 0.0, 35.0, -14.0]]], [[[-7.0, 7.0, -7.0, -7.0], [49.0, 0.0, -28.0, -7.0], [35.0, 
-0.0, 49.0, -35.0]], [[28.0, 21.0, -49.0, 49.0], [14.0, 0.0, 28.0, 21.0], [-7.0, 21.0, -14.0, -35.0]]], [[[-35.0, 21.0, -35.0, 
--21.0], [0.0, -7.0, 21.0, 42.0], [-35.0, -21.0, -35.0, 7.0]], [[-7.0, 0.0, 7.0, -35.0], [7.0, -28.0, -35.0, -28.0], [-35.0, 
-28.0, 0.0, 21.0]]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[5.0, -4.0, 7.0], [-4.0, -1.0, 5.0]], [[-3.0, -6.0, 3.0], [2.0, -1.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[4.0, 1.0], [5.0, -7.0], [-4.0, 2.0]], [[6.0, 7.0], [6.0, -2.0], [-4.0, 
+0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -1.0], [0.0, 0.0], [-6.0, -1.0]], [[0.0, -3.0], [6.0, -6.0], [0.0, -6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-78.0, 21.0], [-60.0, 61.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-78.0, -24.0], [-6.0, -18.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_array_rank4_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[[[3.0, 5.0, 6.0, 1.0], [3.0, 0.0, 6.0, -5.0], [4.0, 6.0, 0.0, -4.0]], [[-7.0, 0.0, 0.0, -5.0], [6.0, 
-5.0, -7.0, -2.0], [-5.0, -6.0, -5.0, -6.0]]], [[[0.0, 6.0, 0.0, 3.0], [-4.0, 2.0, 3.0, 0.0], [-4.0, -3.0, 3.0, 5.0]], [[4.0, 
-7.0, -1.0, -5.0], [0.0, 7.0, -5.0, -5.0], [-3.0, -1.0, 6.0, 6.0]]], [[[-7.0, 4.0, -2.0, 2.0], [3.0, 5.0, 7.0, -4.0], [5.0, 3.0, 
--5.0, -2.0]], [[4.0, -2.0, 3.0, 0.0], [-1.0, -5.0, -3.0, -4.0], [-6.0, 4.0, 7.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(2.0)+(1-msk_arg1)*(-5.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[6.0, 10.0, 12.0, 2.0], [6.0, 0.0, 12.0, -10.0], [8.0, 12.0, 0.0, -8.0]], [[-14.0, 0.0, 0.0, 
--10.0], [12.0, 10.0, -14.0, -4.0], [-10.0, -12.0, -10.0, -12.0]]], [[[0.0, 12.0, 0.0, 6.0], [-8.0, 4.0, 6.0, 0.0], [-8.0, -6.0, 
-6.0, 10.0]], [[8.0, 14.0, -2.0, -10.0], [0.0, 14.0, -10.0, -10.0], [-6.0, -2.0, 12.0, 12.0]]], [[[-14.0, 8.0, -4.0, 4.0], [6.0, 
-10.0, 14.0, -8.0], [10.0, 6.0, -10.0, -4.0]], [[8.0, -4.0, 6.0, 0.0], [-2.0, -10.0, -6.0, -8.0], [-12.0, 8.0, 14.0, 
--10.0]]]])+(1.-msk_ref)*numpy.array([[[[-15.0, -25.0, -30.0, -5.0], [-15.0, -0.0, -30.0, 25.0], [-20.0, -30.0, -0.0, 20.0]], 
-[[35.0, -0.0, -0.0, 25.0], [-30.0, -25.0, 35.0, 10.0], [25.0, 30.0, 25.0, 30.0]]], [[[-0.0, -30.0, -0.0, -15.0], [20.0, -10.0, 
--15.0, -0.0], [20.0, 15.0, -15.0, -25.0]], [[-20.0, -35.0, 5.0, 25.0], [-0.0, -35.0, 25.0, 25.0], [15.0, 5.0, -30.0, -30.0]]], 
-[[[35.0, -20.0, 10.0, -10.0], [-15.0, -25.0, -35.0, 20.0], [-25.0, -15.0, 25.0, 10.0]], [[-20.0, 10.0, -15.0, -0.0], [5.0, 
-25.0, 15.0, 20.0], [30.0, -20.0, -35.0, 25.0]]]])
+   def test_generalTensorProduct_constData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[3.0, 3.0, -2.0], [6.0, -3.0, 0.0], [0.0, -7.0, 4.0], [-7.0, 0.0, 5.0]], [[3.0, 0.0, 2.0], 
+[-5.0, -6.0, 5.0], [2.0, 7.0, 6.0], [5.0, 5.0, -5.0]]], [[[-2.0, 0.0, -1.0], [6.0, -4.0, 7.0], [4.0, 0.0, -2.0], [-7.0, -3.0, 
+-1.0]], [[-1.0, 7.0, 4.0], [0.0, 0.0, 5.0], [-6.0, -4.0, 0.0], [-6.0, 5.0, 2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[6.0, 2.0], [5.0, -7.0], [-3.0, -6.0]], [[-7.0, -2.0], [-6.0, -3.0], [6.0, -4.0]], [[7.0, -6.0], 
+[-5.0, -4.0], [4.0, -2.0]], [[-6.0, 3.0], [-2.0, -7.0], [2.0, -5.0]]], [[[6.0, 1.0], [-5.0, 1.0], [-3.0, -5.0]], [[5.0, -1.0], 
+[0.0, 6.0], [-1.0, 0.0]], [[7.0, -1.0], [-1.0, 2.0], [4.0, 7.0]], [[-3.0, -7.0], [-4.0, -7.0], [-7.0, 
+7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, -6.0], [2.0, -7.0], [2.0, 4.0]], [[0.0, -3.0], [-2.0, -2.0], [-4.0, -7.0]], 
+[[-3.0, 0.0], [-6.0, 1.0], [1.0, 6.0]], [[2.0, -6.0], [6.0, 1.0], [1.0, 1.0]]], [[[2.0, -2.0], [-2.0, 0.0], [0.0, 5.0]], [[4.0, 
+-2.0], [-3.0, -7.0], [2.0, -2.0]], [[6.0, 4.0], [5.0, 7.0], [5.0, 7.0]], [[2.0, 2.0], [0.0, -6.0], [-5.0, -2.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[131.0, -121.0], [-31.0, -36.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[162.0, 140.0], [-147.0, -111.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_float_rank0_offset0(self):
-      arg0=Data(-1.0,self.functionspace)
-      arg1=5.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-5.0,self.functionspace)
+   def test_generalTensorProduct_constData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([7.0, -3.0]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 2.0, 1.0, 6.0, 7.0], [-1.0, -5.0, 3.0, -3.0, 7.0], [-6.0, -2.0, 1.0, 2.0, -6.0], [-3.0, 
+5.0, -3.0, 5.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 2.0, -6.0, 3.0, 5.0], [6.0, 6.0, -2.0, 4.0, 2.0], [0.0, 7.0, -7.0, 2.0, -6.0], 
+[4.0, 6.0, 7.0, 5.0, 6.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-7.0, 14.0, 7.0, 42.0, 49.0], [-7.0, -35.0, 21.0, -21.0, 49.0], [-42.0, -14.0, 7.0, 14.0, -42.0], 
+[-21.0, 35.0, -21.0, 35.0, 28.0]], [[3.0, -6.0, -3.0, -18.0, -21.0], [3.0, 15.0, -9.0, 9.0, -21.0], [18.0, 6.0, -3.0, -6.0, 
+18.0], [9.0, -15.0, 9.0, -15.0, -12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-28.0, 14.0, -42.0, 21.0, 35.0], [42.0, 42.0, -14.0, 28.0, 14.0], [0.0, 49.0, -49.0, 
+14.0, -42.0], [28.0, 42.0, 49.0, 35.0, 42.0]], [[12.0, -6.0, 18.0, -9.0, -15.0], [-18.0, -18.0, 6.0, -12.0, -6.0], [0.0, -21.0, 
+21.0, -6.0, 18.0], [-12.0, -18.0, -21.0, -15.0, -18.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_array_rank0_offset0(self):
-      arg0=Data(2.0,self.functionspace)
-      arg1=numpy.array(-4.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-8.0,self.functionspace)
+   def test_generalTensorProduct_constData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-2.0, 1.0, -4.0], [-7.0, 0.0, 6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[0.0, 7.0, 6.0, -5.0, -4.0], [4.0, 0.0, 1.0, 5.0, -4.0], [0.0, -4.0, -7.0, -4.0, 3.0], [7.0, 
+-1.0, -6.0, -4.0, -4.0]], [[3.0, 0.0, -5.0, 0.0, 7.0], [-5.0, -4.0, 0.0, -5.0, 3.0], [-6.0, -2.0, 1.0, -3.0, 0.0], [4.0, 2.0, 
+-4.0, 5.0, -2.0]], [[-4.0, 7.0, 5.0, -7.0, -5.0], [-4.0, -7.0, 3.0, 7.0, -3.0], [6.0, -4.0, -5.0, -2.0, 2.0], [5.0, 1.0, -4.0, 
+3.0, 7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 0.0, 1.0, -6.0, 4.0], [0.0, 0.0, -5.0, -6.0, 4.0], [-6.0, 6.0, -3.0, -5.0, 
+-1.0], [5.0, -6.0, 1.0, -7.0, 0.0]], [[-5.0, 6.0, -6.0, -7.0, 3.0], [-1.0, -6.0, -1.0, -7.0, 2.0], [3.0, 0.0, 7.0, 2.0, 1.0], 
+[0.0, -7.0, -6.0, -4.0, 1.0]], [[5.0, 0.0, -3.0, 4.0, 1.0], [-2.0, 5.0, -2.0, 3.0, -3.0], [6.0, 5.0, 0.0, -5.0, 1.0], [-1.0, 
+7.0, 7.0, 0.0, -3.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[19.0, -42.0, -37.0, 38.0, 35.0], [3.0, 24.0, -14.0, -43.0, 23.0], [-30.0, 22.0, 35.0, 13.0, 
+-14.0], [-30.0, 0.0, 24.0, 1.0, -22.0]], [[-24.0, -7.0, -12.0, -7.0, -2.0], [-52.0, -42.0, 11.0, 7.0, 10.0], [36.0, 4.0, 19.0, 
+16.0, -9.0], [-19.0, 13.0, 18.0, 46.0, 70.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-37.0, 6.0, 4.0, -11.0, -9.0], [7.0, -26.0, 17.0, -7.0, 6.0], [-9.0, -32.0, 13.0, 
+32.0, -1.0], [-6.0, -23.0, -36.0, 10.0, 13.0]], [[-12.0, 0.0, -25.0, 66.0, -22.0], [-12.0, 30.0, 23.0, 60.0, -46.0], [78.0, 
+-12.0, 21.0, 5.0, 13.0], [-41.0, 84.0, 35.0, 49.0, -18.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank1_offset1(self):
-      arg0=Data(numpy.array([3.0, -2.0, 6.0]),self.functionspace)
-      arg1=numpy.array([-3.0, -7.0, -2.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(-7.0,self.functionspace)
+   def test_generalTensorProduct_constData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[6.0, 0.0, -2.0], [1.0, -3.0, -3.0]], [[0.0, 3.0, 3.0], [0.0, 0.0, 0.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[1.0, 5.0, -2.0, 0.0, 0.0], [-3.0, 1.0, 6.0, 5.0, -5.0], [0.0, 5.0, 3.0, -7.0, -2.0], [-6.0, 
+1.0, 2.0, 4.0, 0.0]], [[5.0, 2.0, 1.0, 7.0, -5.0], [-4.0, 2.0, 5.0, 5.0, -7.0], [-3.0, -1.0, 4.0, -4.0, 3.0], [-4.0, 1.0, 6.0, 
+-4.0, 4.0]], [[-3.0, -7.0, 7.0, 7.0, 2.0], [-1.0, 6.0, -7.0, -6.0, -3.0], [0.0, 5.0, 7.0, 3.0, 0.0], [4.0, -3.0, -7.0, 1.0, 
+0.0]]], [[[0.0, 1.0, -1.0, 3.0, 0.0], [-7.0, 0.0, 6.0, 4.0, -1.0], [-7.0, 2.0, 1.0, -1.0, 2.0], [-7.0, -4.0, 2.0, 4.0, -5.0]], 
+[[-7.0, 4.0, 5.0, 6.0, -5.0], [-2.0, 2.0, 1.0, 0.0, 0.0], [-5.0, -5.0, -1.0, -3.0, 1.0], [-7.0, -4.0, 3.0, -1.0, 7.0]], [[-3.0, 
+1.0, 6.0, -1.0, -3.0], [1.0, 2.0, 0.0, -1.0, 0.0], [1.0, -5.0, -1.0, -3.0, -4.0], [-6.0, -6.0, -6.0, -1.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, -6.0, -2.0, 1.0, -2.0], [3.0, 7.0, 4.0, 3.0, -6.0], [-7.0, 0.0, 6.0, -2.0, 
+-1.0], [-2.0, 6.0, -5.0, 7.0, 7.0]], [[2.0, 4.0, -3.0, 4.0, 5.0], [3.0, -6.0, -4.0, 1.0, 1.0], [0.0, -1.0, 0.0, 1.0, 0.0], 
+[-6.0, 7.0, -2.0, 1.0, -6.0]], [[-7.0, 6.0, -1.0, -1.0, 6.0], [0.0, 5.0, -5.0, -3.0, -6.0], [-7.0, -6.0, -4.0, 0.0, -1.0], 
+[2.0, 6.0, -7.0, -1.0, 4.0]]], [[[-6.0, -6.0, -6.0, 6.0, 7.0], [-6.0, -2.0, -1.0, -7.0, 2.0], [6.0, 1.0, -5.0, 6.0, 5.0], 
+[-6.0, 5.0, -7.0, -7.0, 2.0]], [[-5.0, 1.0, -5.0, -4.0, 2.0], [-2.0, -7.0, 7.0, 7.0, -1.0], [6.0, -3.0, 6.0, 0.0, 5.0], [-7.0, 
+0.0, 0.0, -6.0, 4.0]], [[7.0, -1.0, -7.0, 5.0, -3.0], [7.0, -5.0, 0.0, 2.0, 0.0], [-7.0, 2.0, -3.0, -7.0, -2.0], [6.0, 3.0, 
+1.0, -2.0, 3.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[42.0, 30.0, -60.0, -26.0, 20.0], [-20.0, -18.0, 53.0, 49.0, -25.0], [5.0, 52.0, 11.0, -31.0, 
+-1.0], [-12.0, 38.0, 37.0, 32.0, -8.0]], [[6.0, -15.0, 24.0, 42.0, -9.0], [-15.0, 24.0, -6.0, -3.0, -30.0], [-9.0, 12.0, 33.0, 
+-3.0, 9.0], [0.0, -6.0, -3.0, -9.0, 12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-34.0, -54.0, 20.0, 11.0, -14.0], [-3.0, 66.0, 12.0, -10.0, -19.0], [-19.0, 16.0, 
+30.0, 15.0, -8.0], [-19.0, 20.0, -26.0, 61.0, 15.0]], [[-15.0, 30.0, -12.0, 9.0, 33.0], [9.0, -3.0, -27.0, -6.0, -15.0], 
+[-21.0, -21.0, -12.0, 3.0, -3.0], [-12.0, 39.0, -27.0, 0.0, -6.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
       ref=-ref
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[-7.0, -2.0, 0.0], [-5.0, 0.0, -3.0]]),self.functionspace)
-      arg1=numpy.array([[5.0, -5.0, 0.0], [-1.0, 0.0, -1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-17.0,self.functionspace)
+   def test_generalTensorProduct_constData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-6.0, 2.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 0.0], [4.0, 7.0]], [[-5.0, 0.0], [-4.0, -4.0]], [[2.0, -4.0], [-6.0, -5.0]], [[3.0, 1.0], 
+[7.0, -3.0]], [[-7.0, -7.0], [3.0, -6.0]], [[0.0, -4.0], [1.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-2.0, 2.0], [-7.0, -7.0]], [[-6.0, -7.0], [0.0, 6.0]], [[-7.0, 1.0], [0.0, -3.0]], 
+[[0.0, 0.0], [-5.0, -3.0]], [[-3.0, -1.0], [-7.0, -6.0]], [[3.0, 3.0], [3.0, -1.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[12.0, 0.0], [-24.0, -42.0]], [[30.0, 0.0], [24.0, 24.0]], [[-12.0, 24.0], [36.0, 30.0]], 
+[[-18.0, -6.0], [-42.0, 18.0]], [[42.0, 42.0], [-18.0, 36.0]], [[0.0, 24.0], [-6.0, 12.0]]], [[[-4.0, 0.0], [8.0, 14.0]], 
+[[-10.0, 0.0], [-8.0, -8.0]], [[4.0, -8.0], [-12.0, -10.0]], [[6.0, 2.0], [14.0, -6.0]], [[-14.0, -14.0], [6.0, -12.0]], [[0.0, 
+-8.0], [2.0, -4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[12.0, -12.0], [42.0, 42.0]], [[36.0, 42.0], [0.0, -36.0]], [[42.0, -6.0], [0.0, 
+18.0]], [[0.0, 0.0], [30.0, 18.0]], [[18.0, 6.0], [42.0, 36.0]], [[-18.0, -18.0], [-18.0, 6.0]]], [[[-4.0, 4.0], [-14.0, 
+-14.0]], [[-12.0, -14.0], [0.0, 12.0]], [[-14.0, 2.0], [0.0, -6.0]], [[0.0, 0.0], [-10.0, -6.0]], [[-6.0, -2.0], [-14.0, 
+-12.0]], [[6.0, 6.0], [6.0, -2.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank3_offset3(self):
-      arg0=Data(numpy.array([[[-3.0, 4.0, -1.0], [-3.0, 7.0, 1.0], [-6.0, 6.0, -7.0], [6.0, 7.0, -5.0]], [[-6.0, 7.0, 1.0], 
-[3.0, -7.0, -1.0], [6.0, 4.0, -1.0], [-4.0, 7.0, 6.0]]]),self.functionspace)
-      arg1=numpy.array([[[-5.0, -4.0, -5.0], [7.0, 0.0, -5.0], [-6.0, -3.0, -5.0], [-7.0, -3.0, 4.0]], [[-4.0, 1.0, 4.0], [3.0, 
-3.0, -5.0], [2.0, 0.0, 6.0], [-4.0, 5.0, -6.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(-3.0,self.functionspace)
+   def test_generalTensorProduct_constData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[0.0, -2.0, 1.0], [6.0, -7.0, -6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[4.0, -5.0], [4.0, 1.0]], [[-2.0, 6.0], [2.0, -5.0]], [[0.0, 7.0], [1.0, 0.0]], [[-7.0, -1.0], 
+[-7.0, -2.0]], [[0.0, -2.0], [1.0, 0.0]], [[3.0, 0.0], [1.0, -5.0]]], [[[7.0, 2.0], [5.0, -4.0]], [[2.0, 0.0], [7.0, 1.0]], 
+[[-4.0, 4.0], [-5.0, 1.0]], [[1.0, 4.0], [7.0, -5.0]], [[-3.0, -2.0], [-7.0, 3.0]], [[-3.0, -7.0], [4.0, -6.0]]], [[[-1.0, 
+-2.0], [2.0, 2.0]], [[7.0, -3.0], [-7.0, -2.0]], [[-5.0, -2.0], [-2.0, -7.0]], [[-5.0, 7.0], [5.0, -1.0]], [[6.0, 6.0], [5.0, 
+-1.0]], [[-3.0, -4.0], [-5.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 0.0], [1.0, -7.0]], [[6.0, -2.0], [0.0, -6.0]], [[-6.0, 5.0], [-7.0, -4.0]], 
+[[-7.0, -4.0], [-4.0, -6.0]], [[3.0, -7.0], [2.0, -1.0]], [[-1.0, -2.0], [7.0, 5.0]]], [[[7.0, 0.0], [1.0, 6.0]], [[4.0, -7.0], 
+[-7.0, -2.0]], [[2.0, 2.0], [-3.0, 3.0]], [[-4.0, -4.0], [5.0, -1.0]], [[-4.0, -5.0], [-3.0, -6.0]], [[7.0, 7.0], [0.0, 4.0]]], 
+[[[5.0, -3.0], [-2.0, -1.0]], [[-6.0, 6.0], [1.0, 5.0]], [[7.0, -5.0], [2.0, 6.0]], [[6.0, 4.0], [-1.0, 3.0]], [[-4.0, 3.0], 
+[7.0, -3.0]], [[3.0, -7.0], [5.0, -2.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-15.0, -6.0], [-8.0, 10.0]], [[3.0, -3.0], [-21.0, -4.0]], [[3.0, -10.0], [8.0, -9.0]], [[-7.0, 
+-1.0], [-9.0, 9.0]], [[12.0, 10.0], [19.0, -7.0]], [[3.0, 10.0], [-13.0, 14.0]]], [[[-19.0, -32.0], [-23.0, 22.0]], [[-68.0, 
+54.0], [5.0, -25.0]], [[58.0, 26.0], [53.0, 35.0]], [[-19.0, -76.0], [-121.0, 29.0]], [[-15.0, -34.0], [25.0, -15.0]], [[57.0, 
+73.0], [8.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-9.0, -3.0], [-4.0, -13.0]], [[-14.0, 20.0], [15.0, 9.0]], [[3.0, -9.0], [8.0, 
+0.0]], [[14.0, 12.0], [-11.0, 5.0]], [[4.0, 13.0], [13.0, 9.0]], [[-11.0, -21.0], [5.0, -10.0]]], [[[-79.0, 18.0], [11.0, 
+-78.0]], [[44.0, 1.0], [43.0, -52.0]], [[-92.0, 46.0], [-33.0, -81.0]], [[-50.0, -20.0], [-53.0, -47.0]], [[70.0, -25.0], 
+[-9.0, 54.0]], [[-73.0, -19.0], [12.0, 14.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[-7.0, -5.0], [-3.0, -4.0], [-1.0, 3.0]], [[0.0, -7.0], [-1.0, 0.0], [-5.0, 0.0]]], [[[0.0, 
-5.0], [5.0, 1.0], [-5.0, 7.0]], [[3.0, -7.0], [-7.0, 5.0], [-6.0, 0.0]]], [[[-6.0, -3.0], [-4.0, 2.0], [5.0, 0.0]], [[-1.0, 
--5.0], [-2.0, 6.0], [6.0, 6.0]]], [[[-5.0, 5.0], [5.0, -2.0], [3.0, -7.0]], [[-4.0, -7.0], [1.0, 5.0], [0.0, 
--4.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[4.0, 6.0], [-1.0, 0.0], [-6.0, -5.0]], [[5.0, 6.0], [5.0, 6.0], [4.0, -7.0]]], [[[-2.0, -6.0], 
-[-2.0, 6.0], [-1.0, -3.0]], [[-4.0, 4.0], [3.0, 0.0], [1.0, 0.0]]], [[[-5.0, 0.0], [7.0, 1.0], [-7.0, 0.0]], [[-7.0, -3.0], 
-[-2.0, 0.0], [6.0, -4.0]]], [[[2.0, -6.0], [-3.0, -7.0], [7.0, -5.0]], [[4.0, -7.0], [6.0, 0.0], [4.0, -7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      ref=Data(-159.0,self.functionspace)
+   def test_generalTensorProduct_constData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[0.0, 6.0, 2.0, -1.0, 3.0], [7.0, -1.0, 6.0, 4.0, -1.0], [5.0, 4.0, -3.0, -6.0, -4.0], [-1.0, 0.0, 
+-7.0, -4.0, -5.0]]),self.functionspace)
+      arg1=Data(-6.0,self.functionspace)
+      arg1.setTaggedValue(1,4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, -36.0, -12.0, 6.0, -18.0], [-42.0, 6.0, -36.0, -24.0, 6.0], [-30.0, -24.0, 18.0, 36.0, 
+24.0], [6.0, -0.0, 42.0, 24.0, 30.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[0.0, 24.0, 8.0, -4.0, 12.0], [28.0, -4.0, 24.0, 16.0, -4.0], [20.0, 16.0, -12.0, 
+-24.0, -16.0], [-4.0, 0.0, -28.0, -16.0, -20.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_array_rank1_offset0(self):
-      arg0=Data(-1.0,self.functionspace)
-      arg1=numpy.array([-7.0, -6.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([7.0, 6.0]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[5.0, -5.0, 2.0], [0.0, -7.0, 7.0], [-1.0, 5.0, 0.0], [0.0, 6.0, -3.0], [6.0, 6.0, -5.0]], 
+[[-5.0, 4.0, 4.0], [4.0, 6.0, 4.0], [-2.0, 0.0, 6.0], [-5.0, 4.0, -3.0], [-7.0, 2.0, 4.0]], [[-5.0, 6.0, 5.0], [-7.0, -4.0, 
+1.0], [2.0, -1.0, 1.0], [-3.0, 2.0, -3.0], [-5.0, 2.0, 3.0]], [[-7.0, -5.0, 2.0], [-4.0, -3.0, -3.0], [-7.0, -6.0, 0.0], [-6.0, 
+0.0, -7.0], [-6.0, -3.0, -4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-6.0, -2.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-5.0, -5.0, 4.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-22.0, 7.0, -4.0, -9.0, -43.0], [18.0, -40.0, 6.0, 25.0, 34.0], [13.0, 49.0, -11.0, 17.0, 23.0], 
+[50.0, 33.0, 54.0, 43.0, 46.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[8.0, 63.0, -20.0, -42.0, -80.0], [21.0, -34.0, 34.0, -7.0, 41.0], [15.0, 59.0, -1.0, 
+-7.0, 27.0], [68.0, 23.0, 65.0, 2.0, 29.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank2_offset1(self):
-      arg0=Data(numpy.array([-3.0, 3.0, 7.0]),self.functionspace)
-      arg1=numpy.array([[0.0, -1.0], [-7.0, 7.0], [-6.0, 6.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-63.0, 66.0]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-7.0, 0.0, -7.0], [3.0, -5.0, -7.0]], [[-2.0, 7.0, -4.0], [-1.0, 3.0, 1.0]], [[1.0, 6.0, 3.0], 
+[-1.0, 4.0, -3.0]], [[7.0, 0.0, -3.0], [-7.0, 1.0, -7.0]], [[6.0, 3.0, 2.0], [-2.0, 3.0, -6.0]]], [[[-6.0, -4.0, 0.0], [-4.0, 
+-7.0, -7.0]], [[0.0, 7.0, 0.0], [-6.0, 3.0, -2.0]], [[6.0, -6.0, -3.0], [6.0, -1.0, -6.0]], [[7.0, 2.0, -5.0], [4.0, -3.0, 
+0.0]], [[-3.0, 4.0, 7.0], [-3.0, 2.0, -7.0]]], [[[-7.0, 0.0, 5.0], [-1.0, 1.0, 0.0]], [[1.0, 1.0, -4.0], [-7.0, 1.0, -7.0]], 
+[[-7.0, 4.0, 6.0], [1.0, 6.0, -2.0]], [[-3.0, -4.0, 5.0], [6.0, 0.0, -4.0]], [[3.0, 0.0, 4.0], [-6.0, -6.0, -3.0]]], [[[-2.0, 
+-5.0, -7.0], [0.0, 1.0, 5.0]], [[0.0, -5.0, 7.0], [-3.0, 3.0, 0.0]], [[6.0, 2.0, 0.0], [3.0, -7.0, -3.0]], [[-3.0, -3.0, -1.0], 
+[-3.0, -7.0, 3.0]], [[-3.0, -2.0, -7.0], [-2.0, -5.0, 2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 7.0, -2.0], [-5.0, 0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 3.0, -5.0], [-3.0, 0.0, 5.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[6.0, 64.0, 40.0, 34.0, 21.0], [-2.0, 79.0, -72.0, -3.0, 32.0], [2.0, 49.0, 18.0, -65.0, 19.0], 
+[-19.0, -34.0, -7.0, -1.0, 13.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-30.0, 43.0, -6.0, 22.0, -7.0], [-53.0, 29.0, -33.0, 40.0, -58.0], [-43.0, 12.0, 
+-52.0, -84.0, -8.0], [39.0, -41.0, 0.0, 11.0, 36.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-1.0, 7.0, 1.0, -7.0, -4.0], [0.0, 5.0, -5.0, 5.0, -3.0], [-2.0, 0.0, 1.0, -5.0, -7.0], [-4.0, 
+-2.0, -1.0, 3.0, 6.0]]),self.functionspace)
+      arg1=Data(numpy.array([4.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 5.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-4.0, 7.0], [28.0, -49.0], [4.0, -7.0], [-28.0, 49.0], [-16.0, 28.0]], [[0.0, 0.0], [20.0, 
+-35.0], [-20.0, 35.0], [20.0, -35.0], [-12.0, 21.0]], [[-8.0, 14.0], [0.0, 0.0], [4.0, -7.0], [-20.0, 35.0], [-28.0, 49.0]], 
+[[-16.0, 28.0], [-8.0, 14.0], [-4.0, 7.0], [12.0, -21.0], [24.0, -42.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-6.0, -5.0], [42.0, 35.0], [6.0, 5.0], [-42.0, -35.0], [-24.0, -20.0]], [[0.0, 0.0], 
+[30.0, 25.0], [-30.0, -25.0], [30.0, 25.0], [-18.0, -15.0]], [[-12.0, -10.0], [0.0, 0.0], [6.0, 5.0], [-30.0, -25.0], [-42.0, 
+-35.0]], [[-24.0, -20.0], [-12.0, -10.0], [-6.0, -5.0], [18.0, 15.0], [36.0, 30.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -1.0, 3.0], [-7.0, 4.0, -5.0], [0.0, -3.0, 0.0], [1.0, 2.0, -3.0], [0.0, -2.0, -2.0]], 
+[[-2.0, 7.0, -7.0], [5.0, 1.0, -2.0], [5.0, 5.0, 3.0], [0.0, -1.0, -3.0], [7.0, 1.0, 0.0]], [[2.0, -7.0, -1.0], [2.0, 4.0, 
+5.0], [3.0, -2.0, 4.0], [5.0, -1.0, 3.0], [-7.0, 2.0, -6.0]], [[-7.0, -7.0, 2.0], [0.0, -7.0, 6.0], [3.0, -7.0, 7.0], [0.0, 
+-7.0, -6.0], [1.0, -5.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 0.0], [4.0, 4.0], [-7.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -4.0], [4.0, 3.0], [5.0, -4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-25.0, -16.0], [58.0, 36.0], [-12.0, -12.0], [28.0, 20.0], [6.0, 0.0]], [[79.0, 56.0], [13.0, 
+12.0], [-6.0, 8.0], [17.0, 8.0], [-3.0, 4.0]], [[-23.0, -24.0], [-21.0, -4.0], [-39.0, -24.0], [-30.0, -16.0], [57.0, 32.0]], 
+[[-35.0, -36.0], [-70.0, -52.0], [-80.0, -56.0], [14.0, -4.0], [-42.0, -32.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[11.0, -15.0], [-51.0, 60.0], [-12.0, -9.0], [-1.0, 14.0], [-18.0, 2.0]], [[-19.0, 
+57.0], [24.0, -9.0], [65.0, -17.0], [-19.0, 9.0], [46.0, -25.0]], [[-21.0, -25.0], [53.0, -16.0], [30.0, -34.0], [41.0, -35.0], 
+[-64.0, 58.0]], [[-60.0, -1.0], [2.0, -45.0], [25.0, -61.0], [-58.0, 3.0], [1.0, -31.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, -2.0, -6.0], [-3.0, -4.0, 5.0]], [[-6.0, 0.0, -5.0], [5.0, -2.0, 4.0]], [[-6.0, -1.0, 
+-4.0], [-3.0, 1.0, 2.0]], [[-4.0, 5.0, 3.0], [6.0, 2.0, -7.0]], [[-6.0, -1.0, 0.0], [-2.0, -6.0, -5.0]]], [[[5.0, -3.0, -1.0], 
+[-5.0, 3.0, -1.0]], [[-2.0, 0.0, 5.0], [6.0, -2.0, -5.0]], [[5.0, -1.0, -2.0], [6.0, -1.0, 1.0]], [[0.0, 7.0, 7.0], [2.0, -6.0, 
+4.0]], [[-4.0, 0.0, 7.0], [-2.0, -6.0, 6.0]]], [[[-4.0, 6.0, -6.0], [1.0, 0.0, -5.0]], [[-5.0, -3.0, -6.0], [6.0, -2.0, -1.0]], 
+[[-4.0, 1.0, -6.0], [6.0, -1.0, 3.0]], [[7.0, -4.0, 0.0], [0.0, 4.0, -7.0]], [[0.0, 4.0, 0.0], [-5.0, 3.0, 1.0]]], [[[-2.0, 
+2.0, -5.0], [0.0, 0.0, 1.0]], [[-5.0, -5.0, 4.0], [-7.0, -7.0, -4.0]], [[-2.0, -7.0, -1.0], [5.0, -5.0, -3.0]], [[3.0, -7.0, 
+7.0], [4.0, -1.0, 0.0]], [[7.0, 0.0, 1.0], [-1.0, 3.0, 3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-1.0, -2.0], [-6.0, 6.0], [5.0, -3.0]], [[0.0, -6.0], [3.0, -2.0], [6.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -7.0], [-4.0, -7.0], [-2.0, -6.0]], [[1.0, 5.0], [-4.0, 1.0], [4.0, -2.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[1.0, 54.0], [-1.0, 17.0], [7.0, 42.0], [-47.0, -39.0], [-36.0, 10.0]], [[11.0, -5.0], [-9.0, 
+-63.0], [-6.0, -40.0], [-1.0, 37.0], [57.0, 35.0]], [[-92.0, 36.0], [-19.0, -26.0], [-17.0, 10.0], [-13.0, -74.0], [-9.0, 
+52.0]], [[-29.0, 35.0], [10.0, 8.0], [6.0, -67.0], [71.0, -91.0], [25.0, -5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[59.0, 28.0], [75.0, 87.0], [49.0, 55.0], [-32.0, 21.0], [42.0, 43.0]], [[-37.0, 
+-28.0], [-4.0, 22.0], [-8.0, 11.0], [0.0, -95.0], [56.0, -42.0]], [[-7.0, 37.0], [64.0, 122.0], [54.0, 80.0], [-70.0, -3.0], 
+[-29.0, -52.0]], [[18.0, 28.0], [47.0, 12.0], [55.0, 95.0], [4.0, 5.0], [-45.0, -63.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_constData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[6.0, -3.0, 1.0, -1.0, -1.0], [5.0, 6.0, 7.0, 4.0, -1.0], [5.0, 7.0, -1.0, -4.0, 4.0], [-5.0, 
+-2.0, -3.0, -7.0, -3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[0.0, 5.0, 0.0, -6.0, 7.0], [7.0, -1.0, -4.0, 1.0, -2.0], [1.0, 1.0, 4.0, -4.0, -3.0], [-1.0, 7.0, 
+5.0, -4.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, 6.0, -4.0, 3.0, -6.0], [-3.0, 0.0, -2.0, 1.0, -5.0], [1.0, 4.0, 2.0, -6.0, 
+-6.0], [5.0, 5.0, -4.0, -1.0, 6.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 30.0, 0.0, -36.0, 42.0], [42.0, -6.0, -24.0, 6.0, -12.0], [6.0, 6.0, 24.0, -24.0, -18.0], 
+[-6.0, 42.0, 30.0, -24.0, -18.0]], [[0.0, -15.0, 0.0, 18.0, -21.0], [-21.0, 3.0, 12.0, -3.0, 6.0], [-3.0, -3.0, -12.0, 12.0, 
+9.0], [3.0, -21.0, -15.0, 12.0, 9.0]], [[0.0, 5.0, 0.0, -6.0, 7.0], [7.0, -1.0, -4.0, 1.0, -2.0], [1.0, 1.0, 4.0, -4.0, -3.0], 
+[-1.0, 7.0, 5.0, -4.0, -3.0]], [[0.0, -5.0, 0.0, 6.0, -7.0], [-7.0, 1.0, 4.0, -1.0, 2.0], [-1.0, -1.0, -4.0, 4.0, 3.0], [1.0, 
+-7.0, -5.0, 4.0, 3.0]], [[0.0, -5.0, 0.0, 6.0, -7.0], [-7.0, 1.0, 4.0, -1.0, 2.0], [-1.0, -1.0, -4.0, 4.0, 3.0], [1.0, -7.0, 
+-5.0, 4.0, 3.0]]], [[[0.0, 25.0, 0.0, -30.0, 35.0], [35.0, -5.0, -20.0, 5.0, -10.0], [5.0, 5.0, 20.0, -20.0, -15.0], [-5.0, 
+35.0, 25.0, -20.0, -15.0]], [[0.0, 30.0, 0.0, -36.0, 42.0], [42.0, -6.0, -24.0, 6.0, -12.0], [6.0, 6.0, 24.0, -24.0, -18.0], 
+[-6.0, 42.0, 30.0, -24.0, -18.0]], [[0.0, 35.0, 0.0, -42.0, 49.0], [49.0, -7.0, -28.0, 7.0, -14.0], [7.0, 7.0, 28.0, -28.0, 
+-21.0], [-7.0, 49.0, 35.0, -28.0, -21.0]], [[0.0, 20.0, 0.0, -24.0, 28.0], [28.0, -4.0, -16.0, 4.0, -8.0], [4.0, 4.0, 16.0, 
+-16.0, -12.0], [-4.0, 28.0, 20.0, -16.0, -12.0]], [[0.0, -5.0, 0.0, 6.0, -7.0], [-7.0, 1.0, 4.0, -1.0, 2.0], [-1.0, -1.0, -4.0, 
+4.0, 3.0], [1.0, -7.0, -5.0, 4.0, 3.0]]], [[[0.0, 25.0, 0.0, -30.0, 35.0], [35.0, -5.0, -20.0, 5.0, -10.0], [5.0, 5.0, 20.0, 
+-20.0, -15.0], [-5.0, 35.0, 25.0, -20.0, -15.0]], [[0.0, 35.0, 0.0, -42.0, 49.0], [49.0, -7.0, -28.0, 7.0, -14.0], [7.0, 7.0, 
+28.0, -28.0, -21.0], [-7.0, 49.0, 35.0, -28.0, -21.0]], [[0.0, -5.0, 0.0, 6.0, -7.0], [-7.0, 1.0, 4.0, -1.0, 2.0], [-1.0, -1.0, 
+-4.0, 4.0, 3.0], [1.0, -7.0, -5.0, 4.0, 3.0]], [[0.0, -20.0, 0.0, 24.0, -28.0], [-28.0, 4.0, 16.0, -4.0, 8.0], [-4.0, -4.0, 
+-16.0, 16.0, 12.0], [4.0, -28.0, -20.0, 16.0, 12.0]], [[0.0, 20.0, 0.0, -24.0, 28.0], [28.0, -4.0, -16.0, 4.0, -8.0], [4.0, 
+4.0, 16.0, -16.0, -12.0], [-4.0, 28.0, 20.0, -16.0, -12.0]]], [[[0.0, -25.0, 0.0, 30.0, -35.0], [-35.0, 5.0, 20.0, -5.0, 10.0], 
+[-5.0, -5.0, -20.0, 20.0, 15.0], [5.0, -35.0, -25.0, 20.0, 15.0]], [[0.0, -10.0, 0.0, 12.0, -14.0], [-14.0, 2.0, 8.0, -2.0, 
+4.0], [-2.0, -2.0, -8.0, 8.0, 6.0], [2.0, -14.0, -10.0, 8.0, 6.0]], [[0.0, -15.0, 0.0, 18.0, -21.0], [-21.0, 3.0, 12.0, -3.0, 
+6.0], [-3.0, -3.0, -12.0, 12.0, 9.0], [3.0, -21.0, -15.0, 12.0, 9.0]], [[0.0, -35.0, 0.0, 42.0, -49.0], [-49.0, 7.0, 28.0, 
+-7.0, 14.0], [-7.0, -7.0, -28.0, 28.0, 21.0], [7.0, -49.0, -35.0, 28.0, 21.0]], [[0.0, -15.0, 0.0, 18.0, -21.0], [-21.0, 3.0, 
+12.0, -3.0, 6.0], [-3.0, -3.0, -12.0, 12.0, 9.0], [3.0, -21.0, -15.0, 12.0, 9.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-36.0, 36.0, -24.0, 18.0, -36.0], [-18.0, 0.0, -12.0, 6.0, -30.0], [6.0, 24.0, 12.0, 
+-36.0, -36.0], [30.0, 30.0, -24.0, -6.0, 36.0]], [[18.0, -18.0, 12.0, -9.0, 18.0], [9.0, 0.0, 6.0, -3.0, 15.0], [-3.0, -12.0, 
+-6.0, 18.0, 18.0], [-15.0, -15.0, 12.0, 3.0, -18.0]], [[-6.0, 6.0, -4.0, 3.0, -6.0], [-3.0, 0.0, -2.0, 1.0, -5.0], [1.0, 4.0, 
+2.0, -6.0, -6.0], [5.0, 5.0, -4.0, -1.0, 6.0]], [[6.0, -6.0, 4.0, -3.0, 6.0], [3.0, 0.0, 2.0, -1.0, 5.0], [-1.0, -4.0, -2.0, 
+6.0, 6.0], [-5.0, -5.0, 4.0, 1.0, -6.0]], [[6.0, -6.0, 4.0, -3.0, 6.0], [3.0, 0.0, 2.0, -1.0, 5.0], [-1.0, -4.0, -2.0, 6.0, 
+6.0], [-5.0, -5.0, 4.0, 1.0, -6.0]]], [[[-30.0, 30.0, -20.0, 15.0, -30.0], [-15.0, 0.0, -10.0, 5.0, -25.0], [5.0, 20.0, 10.0, 
+-30.0, -30.0], [25.0, 25.0, -20.0, -5.0, 30.0]], [[-36.0, 36.0, -24.0, 18.0, -36.0], [-18.0, 0.0, -12.0, 6.0, -30.0], [6.0, 
+24.0, 12.0, -36.0, -36.0], [30.0, 30.0, -24.0, -6.0, 36.0]], [[-42.0, 42.0, -28.0, 21.0, -42.0], [-21.0, 0.0, -14.0, 7.0, 
+-35.0], [7.0, 28.0, 14.0, -42.0, -42.0], [35.0, 35.0, -28.0, -7.0, 42.0]], [[-24.0, 24.0, -16.0, 12.0, -24.0], [-12.0, 0.0, 
+-8.0, 4.0, -20.0], [4.0, 16.0, 8.0, -24.0, -24.0], [20.0, 20.0, -16.0, -4.0, 24.0]], [[6.0, -6.0, 4.0, -3.0, 6.0], [3.0, 0.0, 
+2.0, -1.0, 5.0], [-1.0, -4.0, -2.0, 6.0, 6.0], [-5.0, -5.0, 4.0, 1.0, -6.0]]], [[[-30.0, 30.0, -20.0, 15.0, -30.0], [-15.0, 
+0.0, -10.0, 5.0, -25.0], [5.0, 20.0, 10.0, -30.0, -30.0], [25.0, 25.0, -20.0, -5.0, 30.0]], [[-42.0, 42.0, -28.0, 21.0, -42.0], 
+[-21.0, 0.0, -14.0, 7.0, -35.0], [7.0, 28.0, 14.0, -42.0, -42.0], [35.0, 35.0, -28.0, -7.0, 42.0]], [[6.0, -6.0, 4.0, -3.0, 
+6.0], [3.0, 0.0, 2.0, -1.0, 5.0], [-1.0, -4.0, -2.0, 6.0, 6.0], [-5.0, -5.0, 4.0, 1.0, -6.0]], [[24.0, -24.0, 16.0, -12.0, 
+24.0], [12.0, 0.0, 8.0, -4.0, 20.0], [-4.0, -16.0, -8.0, 24.0, 24.0], [-20.0, -20.0, 16.0, 4.0, -24.0]], [[-24.0, 24.0, -16.0, 
+12.0, -24.0], [-12.0, 0.0, -8.0, 4.0, -20.0], [4.0, 16.0, 8.0, -24.0, -24.0], [20.0, 20.0, -16.0, -4.0, 24.0]]], [[[30.0, 
+-30.0, 20.0, -15.0, 30.0], [15.0, 0.0, 10.0, -5.0, 25.0], [-5.0, -20.0, -10.0, 30.0, 30.0], [-25.0, -25.0, 20.0, 5.0, -30.0]], 
+[[12.0, -12.0, 8.0, -6.0, 12.0], [6.0, 0.0, 4.0, -2.0, 10.0], [-2.0, -8.0, -4.0, 12.0, 12.0], [-10.0, -10.0, 8.0, 2.0, -12.0]], 
+[[18.0, -18.0, 12.0, -9.0, 18.0], [9.0, 0.0, 6.0, -3.0, 15.0], [-3.0, -12.0, -6.0, 18.0, 18.0], [-15.0, -15.0, 12.0, 3.0, 
+-18.0]], [[42.0, -42.0, 28.0, -21.0, 42.0], [21.0, 0.0, 14.0, -7.0, 35.0], [-7.0, -28.0, -14.0, 42.0, 42.0], [-35.0, -35.0, 
+28.0, 7.0, -42.0]], [[18.0, -18.0, 12.0, -9.0, 18.0], [9.0, 0.0, 6.0, -3.0, 15.0], [-3.0, -12.0, -6.0, 18.0, 18.0], [-15.0, 
+-15.0, 12.0, 3.0, -18.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[-5.0, 6.0, 6.0], [0.0, 0.0, -4.0]]),self.functionspace)
-      arg1=numpy.array([[[-2.0, 0.0], [7.0, 6.0], [6.0, -1.0]], [[-2.0, 2.0], [-3.0, -3.0], [-2.0, -2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([96.0, 38.0]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-2.0, -2.0, -1.0], [0.0, -7.0, -7.0], [7.0, 2.0, 5.0], [6.0, 2.0, 3.0], [-7.0, 6.0, 0.0]], 
+[[-6.0, -6.0, 0.0], [1.0, 4.0, 1.0], [5.0, -2.0, -3.0], [4.0, -1.0, -2.0], [-1.0, 3.0, 6.0]], [[-2.0, 5.0, -2.0], [-3.0, 7.0, 
+4.0], [-3.0, -6.0, -2.0], [0.0, 1.0, 7.0], [3.0, -1.0, 5.0]], [[-2.0, 0.0, 1.0], [0.0, -1.0, -1.0], [0.0, 5.0, -2.0], [-1.0, 
+-1.0, 6.0], [0.0, 4.0, -6.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, 2.0, 3.0, -4.0, -1.0], [0.0, -7.0, -2.0, 1.0, 4.0], [0.0, -5.0, -7.0, -1.0, 7.0], [2.0, 
+5.0, 0.0, -4.0, 5.0]], [[-5.0, 0.0, -6.0, 5.0, -7.0], [-2.0, 1.0, 6.0, 6.0, -5.0], [-6.0, -6.0, -5.0, -1.0, -3.0], [-5.0, 1.0, 
+-4.0, 5.0, -6.0]], [[-2.0, 1.0, 6.0, 5.0, -1.0], [1.0, 5.0, 4.0, 6.0, -1.0], [-5.0, -7.0, -2.0, 6.0, 0.0], [7.0, 0.0, 3.0, 
+-1.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, -4.0, -1.0, 4.0, 4.0], [4.0, -1.0, 1.0, 4.0, -1.0], [4.0, 4.0, 6.0, -3.0, 
+6.0], [4.0, -1.0, 3.0, -3.0, -4.0]], [[2.0, -3.0, -7.0, -5.0, -1.0], [0.0, 6.0, -2.0, 2.0, 5.0], [3.0, 1.0, -6.0, -4.0, 7.0], 
+[1.0, -6.0, -4.0, 1.0, 4.0]], [[-1.0, 0.0, -7.0, -5.0, -7.0], [7.0, 7.0, 7.0, 0.0, -5.0], [0.0, -5.0, -3.0, -1.0, 0.0], [-6.0, 
+0.0, 6.0, 3.0, 7.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[24.0, -5.0, 0.0, -7.0, 17.0], [3.0, 7.0, -12.0, -20.0, 3.0], [17.0, 29.0, 26.0, -2.0, -8.0], 
+[-1.0, -12.0, 5.0, -1.0, 4.0]], [[49.0, -7.0, 0.0, -70.0, 56.0], [7.0, -42.0, -70.0, -84.0, 42.0], [77.0, 91.0, 49.0, -35.0, 
+21.0], [-14.0, -7.0, 7.0, -28.0, 56.0]], [[-62.0, 19.0, 39.0, 7.0, -26.0], [1.0, -22.0, 18.0, 49.0, 13.0], [-37.0, -82.0, 
+-69.0, 21.0, 43.0], [39.0, 37.0, 7.0, -23.0, 13.0]], [[-52.0, 15.0, 24.0, 1.0, -23.0], [-1.0, -25.0, 12.0, 36.0, 11.0], [-27.0, 
+-63.0, -58.0, 10.0, 36.0], [23.0, 32.0, 1.0, -17.0, 12.0]], [[12.0, -14.0, -57.0, 58.0, -35.0], [-12.0, 55.0, 50.0, 29.0, 
+-58.0], [-36.0, -1.0, 19.0, 1.0, -67.0], [-44.0, -29.0, -24.0, 58.0, -71.0]]], [[[66.0, -12.0, 18.0, -6.0, 48.0], [12.0, 36.0, 
+-24.0, -42.0, 6.0], [36.0, 66.0, 72.0, 12.0, -24.0], [18.0, -36.0, 24.0, -6.0, 6.0]], [[-28.0, 3.0, -15.0, 21.0, -30.0], [-7.0, 
+2.0, 26.0, 31.0, -17.0], [-29.0, -36.0, -29.0, 1.0, -5.0], [-11.0, 9.0, -13.0, 15.0, -21.0]], [[-14.0, 7.0, 9.0, -45.0, 12.0], 
+[1.0, -52.0, -34.0, -25.0, 33.0], [27.0, 8.0, -19.0, -21.0, 41.0], [-1.0, 23.0, -1.0, -27.0, 43.0]], [[-15.0, 6.0, 6.0, -31.0, 
+5.0], [0.0, -39.0, -22.0, -14.0, 23.0], [16.0, 0.0, -19.0, -15.0, 31.0], [-1.0, 19.0, -2.0, -19.0, 30.0]], [[-21.0, 4.0, 15.0, 
+49.0, -26.0], [0.0, 40.0, 44.0, 53.0, -25.0], [-48.0, -55.0, -20.0, 34.0, -16.0], [25.0, -2.0, 6.0, 13.0, -35.0]]], [[[-9.0, 
+-6.0, -48.0, 23.0, -31.0], [-12.0, 9.0, 26.0, 16.0, -31.0], [-20.0, -6.0, -7.0, -15.0, -29.0], [-43.0, -5.0, -26.0, 35.0, 
+-36.0]], [[-25.0, -2.0, -27.0, 67.0, -50.0], [-10.0, 48.0, 64.0, 63.0, -51.0], [-62.0, -55.0, -22.0, 20.0, -42.0], [-13.0, 
+-8.0, -16.0, 43.0, -65.0]], [[52.0, -8.0, 15.0, -28.0, 47.0], [10.0, 5.0, -38.0, -51.0, 20.0], [46.0, 65.0, 55.0, -3.0, -3.0], 
+[10.0, -21.0, 18.0, -16.0, 25.0]], [[-19.0, 7.0, 36.0, 40.0, -14.0], [5.0, 36.0, 34.0, 48.0, -12.0], [-41.0, -55.0, -19.0, 
+41.0, -3.0], [44.0, 1.0, 17.0, -2.0, -20.0]], [[-23.0, 11.0, 45.0, 8.0, -1.0], [7.0, 3.0, 8.0, 27.0, 12.0], [-19.0, -44.0, 
+-26.0, 28.0, 24.0], [46.0, 14.0, 19.0, -22.0, 11.0]]], [[[10.0, -3.0, 0.0, 13.0, 1.0], [1.0, 19.0, 8.0, 4.0, -9.0], [-5.0, 3.0, 
+12.0, 8.0, -14.0], [3.0, -10.0, 3.0, 7.0, -12.0]], [[7.0, -1.0, 0.0, -10.0, 8.0], [1.0, -6.0, -10.0, -12.0, 6.0], [11.0, 13.0, 
+7.0, -5.0, 3.0], [-2.0, -1.0, 1.0, -4.0, 8.0]], [[-21.0, -2.0, -42.0, 15.0, -33.0], [-12.0, -5.0, 22.0, 18.0, -23.0], [-20.0, 
+-16.0, -21.0, -17.0, -15.0], [-39.0, 5.0, -26.0, 27.0, -26.0]], [[-1.0, 4.0, 39.0, 29.0, 2.0], [8.0, 36.0, 20.0, 29.0, -5.0], 
+[-24.0, -31.0, 0.0, 38.0, -4.0], [45.0, -6.0, 22.0, -7.0, -11.0]], [[-8.0, -6.0, -60.0, -10.0, -22.0], [-14.0, -26.0, 0.0, 
+-12.0, -14.0], [6.0, 18.0, -8.0, -40.0, -12.0], [-62.0, 4.0, -34.0, 26.0, -12.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-1.0, 14.0, 23.0, 7.0, 1.0], [-15.0, -17.0, -5.0, -12.0, -3.0], [-14.0, -5.0, 3.0, 
+15.0, -26.0], [-4.0, 14.0, -4.0, 1.0, -7.0]], [[-7.0, 21.0, 98.0, 70.0, 56.0], [-49.0, -91.0, -35.0, -14.0, 0.0], [-21.0, 28.0, 
+63.0, 35.0, -49.0], [35.0, 42.0, -14.0, -28.0, -77.0]], [[-8.0, -34.0, -56.0, -7.0, -9.0], [63.0, 40.0, 38.0, 32.0, -22.0], 
+[34.0, 5.0, 15.0, -34.0, 56.0], [0.0, -19.0, 43.0, -4.0, 15.0]], [[-5.0, -30.0, -41.0, -1.0, 1.0], [45.0, 27.0, 23.0, 28.0, 
+-11.0], [30.0, 11.0, 15.0, -29.0, 50.0], [8.0, -18.0, 28.0, -7.0, 5.0]], [[19.0, 10.0, -35.0, -58.0, -34.0], [-28.0, 43.0, 
+-19.0, -16.0, 37.0], [-10.0, -22.0, -78.0, -3.0, 0.0], [-22.0, -29.0, -45.0, 27.0, 52.0]]], [[[-6.0, 42.0, 48.0, 6.0, -18.0], 
+[-24.0, -30.0, 6.0, -36.0, -24.0], [-42.0, -30.0, 0.0, 42.0, -78.0], [-30.0, 42.0, 6.0, 12.0, 0.0]], [[6.0, -16.0, -36.0, 
+-21.0, -7.0], [11.0, 30.0, 0.0, 12.0, 14.0], [16.0, 3.0, -21.0, -20.0, 34.0], [2.0, -25.0, -7.0, 4.0, 19.0]], [[-6.0, -14.0, 
+30.0, 45.0, 43.0], [-1.0, -38.0, -12.0, 16.0, 0.0], [14.0, 33.0, 51.0, -4.0, 16.0], [36.0, 7.0, 5.0, -26.0, -49.0]], [[-4.0, 
+-13.0, 17.0, 31.0, 31.0], [2.0, -24.0, -8.0, 14.0, 1.0], [13.0, 25.0, 36.0, -6.0, 17.0], [27.0, 2.0, 4.0, -19.0, -34.0]], 
+[[1.0, -5.0, -62.0, -49.0, -49.0], [38.0, 61.0, 35.0, 2.0, -14.0], [5.0, -31.0, -42.0, -15.0, 15.0], [-37.0, -17.0, 21.0, 24.0, 
+58.0]]], [[[14.0, -7.0, -19.0, -23.0, 1.0], [-22.0, 18.0, -26.0, 2.0, 37.0], [7.0, 7.0, -36.0, -12.0, 23.0], [9.0, -28.0, 
+-38.0, 5.0, 14.0]], [[13.0, -9.0, -74.0, -67.0, -47.0], [16.0, 73.0, 11.0, 2.0, 18.0], [9.0, -25.0, -72.0, -23.0, 31.0], 
+[-29.0, -39.0, -13.0, 28.0, 68.0]], [[-7.0, 30.0, 59.0, 28.0, 8.0], [-26.0, -47.0, -5.0, -24.0, -17.0], [-30.0, -8.0, 24.0, 
+35.0, -60.0], [-6.0, 39.0, 3.0, -3.0, -26.0]], [[-5.0, -3.0, -56.0, -40.0, -50.0], [49.0, 55.0, 47.0, 2.0, -30.0], [3.0, -34.0, 
+-27.0, -11.0, 7.0], [-41.0, -6.0, 38.0, 22.0, 53.0]], [[-10.0, -9.0, -31.0, -8.0, -22.0], [47.0, 26.0, 40.0, 10.0, -33.0], 
+[9.0, -14.0, 9.0, -10.0, 11.0], [-19.0, 3.0, 43.0, 5.0, 19.0]]], [[[1.0, 8.0, -5.0, -13.0, -15.0], [-1.0, 9.0, 5.0, -8.0, 
+-3.0], [-8.0, -13.0, -15.0, 5.0, -12.0], [-14.0, 2.0, 0.0, 9.0, 15.0]], [[-1.0, 3.0, 14.0, 10.0, 8.0], [-7.0, -13.0, -5.0, 
+-2.0, 0.0], [-3.0, 4.0, 9.0, 5.0, -7.0], [5.0, 6.0, -2.0, -4.0, -11.0]], [[12.0, -15.0, -21.0, -15.0, 9.0], [-14.0, 16.0, 
+-24.0, 10.0, 35.0], [15.0, 15.0, -24.0, -18.0, 35.0], [17.0, -30.0, -32.0, -1.0, 6.0]], [[-7.0, 7.0, -34.0, -29.0, -45.0], 
+[38.0, 37.0, 43.0, -6.0, -34.0], [-7.0, -35.0, -18.0, 1.0, -13.0], [-41.0, 7.0, 37.0, 20.0, 42.0]], [[14.0, -12.0, 14.0, 10.0, 
+38.0], [-42.0, -18.0, -50.0, 8.0, 50.0], [12.0, 34.0, -6.0, -10.0, 28.0], [40.0, -24.0, -52.0, -14.0, -26.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank4_offset3(self):
-      arg0=Data(numpy.array([[[1.0, -5.0, 6.0], [-3.0, -3.0, 5.0], [-1.0, -1.0, -4.0], [7.0, -4.0, 3.0]], [[-7.0, 0.0, 0.0], 
-[7.0, 5.0, 3.0], [1.0, -6.0, -5.0], [6.0, -3.0, -3.0]]]),self.functionspace)
-      arg1=numpy.array([[[[4.0, 0.0], [-3.0, -5.0], [-3.0, -5.0]], [[5.0, 0.0], [3.0, -3.0], [6.0, -7.0]], [[2.0, 0.0], [-5.0, 
-6.0], [0.0, -5.0]], [[0.0, 2.0], [-5.0, 4.0], [1.0, 7.0]]], [[[1.0, 0.0], [0.0, 0.0], [-6.0, 6.0]], [[6.0, 0.0], [6.0, 6.0], 
-[-2.0, 7.0]], [[6.0, -4.0], [0.0, 3.0], [-2.0, 1.0]], [[-2.0, -3.0], [1.0, -6.0], [6.0, 2.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([75.0, 20.0]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[6.0, -5.0, -6.0], [-2.0, 6.0, 7.0]], [[6.0, -1.0, 0.0], [0.0, -5.0, -2.0]], [[1.0, -1.0, 0.0], 
+[4.0, 6.0, -5.0]], [[-5.0, 5.0, 0.0], [-7.0, 0.0, -7.0]], [[7.0, -7.0, 1.0], [5.0, 5.0, -3.0]]], [[[4.0, -4.0, 0.0], [7.0, 5.0, 
+-7.0]], [[-2.0, 1.0, -7.0], [-6.0, 2.0, 3.0]], [[2.0, -1.0, 7.0], [0.0, 5.0, -6.0]], [[0.0, 4.0, 7.0], [0.0, -7.0, -2.0]], 
+[[-3.0, -5.0, 3.0], [-4.0, 5.0, -2.0]]], [[[0.0, -6.0, 0.0], [-3.0, 7.0, -2.0]], [[7.0, 4.0, 0.0], [4.0, 3.0, -1.0]], [[0.0, 
+1.0, 5.0], [-7.0, 5.0, 6.0]], [[3.0, -3.0, 2.0], [-1.0, 6.0, -7.0]], [[3.0, -6.0, -2.0], [0.0, 7.0, -5.0]]], [[[-5.0, 3.0, 
+0.0], [0.0, 2.0, 4.0]], [[-2.0, 0.0, 0.0], [-3.0, 0.0, 0.0]], [[6.0, -3.0, -4.0], [7.0, -6.0, -5.0]], [[6.0, -1.0, 1.0], [2.0, 
+4.0, -7.0]], [[2.0, -5.0, 4.0], [6.0, -7.0, 4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[1.0, -1.0, -3.0, 7.0, -6.0], [-4.0, -3.0, 5.0, -1.0, -7.0], [-6.0, -2.0, 2.0, 4.0, -1.0], 
+[-5.0, 7.0, 6.0, -6.0, -5.0]], [[0.0, 3.0, -4.0, 6.0, 3.0], [-6.0, 0.0, -2.0, 0.0, 4.0], [-1.0, -4.0, -2.0, -1.0, -7.0], [-7.0, 
+-7.0, 2.0, -5.0, 4.0]], [[0.0, 0.0, -3.0, -6.0, 0.0], [1.0, 0.0, 2.0, 7.0, 6.0], [3.0, -7.0, -6.0, 0.0, -1.0], [5.0, 6.0, 2.0, 
+-7.0, 5.0]]], [[[1.0, 7.0, 1.0, -2.0, 6.0], [6.0, -1.0, 0.0, 1.0, 1.0], [5.0, -3.0, -5.0, 5.0, 5.0], [-4.0, 1.0, -3.0, -5.0, 
+-7.0]], [[-7.0, 3.0, 0.0, -2.0, -5.0], [6.0, 3.0, 1.0, 1.0, -6.0], [-1.0, 3.0, 2.0, -3.0, -6.0], [4.0, -3.0, -4.0, -2.0, 
+-6.0]], [[-4.0, -1.0, 2.0, 2.0, 4.0], [1.0, -1.0, 4.0, -7.0, 6.0], [0.0, 3.0, 5.0, 6.0, -7.0], [-4.0, 4.0, 4.0, 4.0, 
+-4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, -1.0, 7.0, 5.0, -2.0], [-1.0, -4.0, -7.0, 6.0, 3.0], [-5.0, 4.0, -6.0, 4.0, 
+-7.0], [0.0, -7.0, 6.0, -6.0, 7.0]], [[-2.0, -4.0, -4.0, -1.0, 7.0], [0.0, -4.0, -5.0, -1.0, -6.0], [-7.0, 3.0, -2.0, 0.0, 
+7.0], [-1.0, -5.0, -4.0, 3.0, 5.0]], [[3.0, -6.0, -1.0, -7.0, -1.0], [0.0, 0.0, 6.0, 3.0, 6.0], [-7.0, -4.0, 1.0, -2.0, 2.0], 
+[-2.0, 1.0, -2.0, 4.0, -6.0]]], [[[3.0, 0.0, -4.0, -7.0, -3.0], [3.0, -2.0, 5.0, -1.0, 7.0], [-2.0, 4.0, 0.0, 7.0, 4.0], [0.0, 
+0.0, -2.0, 0.0, -7.0]], [[-1.0, 3.0, -1.0, 0.0, -2.0], [0.0, 1.0, -2.0, 0.0, 2.0], [-2.0, 5.0, 6.0, -3.0, -6.0], [-1.0, -5.0, 
+-7.0, 7.0, -6.0]], [[-6.0, -5.0, -4.0, -3.0, -4.0], [3.0, -6.0, 0.0, -7.0, 3.0], [-1.0, -3.0, 5.0, -3.0, -7.0], [6.0, -6.0, 
+0.0, -6.0, -6.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-66.0, -24.0, 32.0, 54.0, -65.0], [31.0, -5.0, 62.0, -93.0, -94.0], [-65.0, 95.0, 115.0, 43.0, 
+-60.0], [-21.0, 49.0, 24.0, 57.0, -130.0]], [[49.0, -22.0, -18.0, 42.0, -22.0], [-50.0, -31.0, 19.0, 3.0, -28.0], [-30.0, 
+-29.0, -6.0, 28.0, 45.0], [-35.0, 56.0, 46.0, -29.0, 4.0]], [[-17.0, 47.0, -5.0, -29.0, -35.0], [57.0, 16.0, -7.0, 44.0, 
+-73.0], [9.0, -7.0, -29.0, -23.0, 25.0], [30.0, -20.0, -52.0, -53.0, -53.0]], [[16.0, -22.0, -26.0, -5.0, -25.0], [-59.0, 29.0, 
+-63.0, 47.0, 6.0], [-10.0, -10.0, -20.0, -102.0, -16.0], [46.0, -105.0, -27.0, 12.0, 122.0]], [[-11.0, 25.0, 3.0, -25.0, 
+-70.0], [72.0, -8.0, 44.0, 31.0, -114.0], [-12.0, -2.0, -8.0, 27.0, 57.0], [31.0, 82.0, -17.0, -61.0, -111.0]]], [[[4.0, 55.0, 
+-3.0, -34.0, -47.0], [73.0, 3.0, 5.0, 57.0, -109.0], [10.0, -19.0, -44.0, -2.0, 78.0], [28.0, 20.0, -53.0, -77.0, -87.0]], 
+[[-34.0, -34.0, 23.0, 48.0, -19.0], [-26.0, 15.0, -12.0, -72.0, -24.0], [-42.0, 82.0, 85.0, -27.0, -61.0], [-12.0, -63.0, -2.0, 
+94.0, -3.0]], [[-9.0, 16.0, -35.0, -56.0, -64.0], [29.0, 15.0, 7.0, 94.0, -42.0], [5.0, -52.0, -56.0, -42.0, 10.0], [76.0, 
+24.0, -20.0, -90.0, 15.0]], [[57.0, -7.0, -41.0, -8.0, 39.0], [-61.0, -19.0, -9.0, 56.0, 88.0], [24.0, -92.0, -74.0, 5.0, 
+21.0], [-13.0, 27.0, 42.0, -63.0, 101.0]], [[-34.0, -23.0, 12.0, -75.0, -54.0], [49.0, 30.0, -2.0, 39.0, -27.0], [7.0, 26.0, 
+6.0, -54.0, -1.0], [109.0, 5.0, -38.0, 24.0, 16.0]]], [[[-44.0, -16.0, 17.0, -48.0, -79.0], [58.0, 26.0, 11.0, 18.0, -81.0], 
+[-16.0, 48.0, 31.0, -42.0, -1.0], [90.0, 10.0, -39.0, 23.0, -37.0]], [[-6.0, 43.0, -35.0, 57.0, -25.0], [-11.0, -15.0, 26.0, 
+7.0, -53.0], [-29.0, -36.0, -13.0, 29.0, -26.0], [-63.0, 12.0, 22.0, -92.0, -61.0]], [[-66.0, -37.0, -14.0, -8.0, -40.0], 
+[-7.0, 16.0, 37.0, -9.0, 33.0], [-26.0, 15.0, 43.0, -15.0, -119.0], [42.0, 25.0, 37.0, 9.0, 24.0]], [[-12.0, 6.0, -18.0, -33.0, 
+-91.0], [31.0, 17.0, 3.0, 65.0, -100.0], [-20.0, -8.0, -18.0, -50.0, 24.0], [72.0, 7.0, -33.0, -52.0, -18.0]], [[-26.0, 5.0, 
+11.0, -27.0, -91.0], [59.0, 17.0, 10.0, 25.0, -129.0], [-25.0, 38.0, 19.0, -33.0, 34.0], [65.0, 10.0, -46.0, -8.0, -71.0]]], 
+[[[-35.0, 16.0, 11.0, -13.0, 45.0], [18.0, 17.0, -13.0, -21.0, 59.0], [25.0, 16.0, 8.0, -5.0, -56.0], [-4.0, -46.0, -16.0, 
+27.0, 9.0]], [[-5.0, -19.0, 3.0, -8.0, -6.0], [-10.0, 9.0, -10.0, -1.0, 11.0], [-3.0, 13.0, 11.0, -23.0, -13.0], [22.0, -17.0, 
+-3.0, 27.0, 31.0]], [[75.0, 21.0, 3.0, 36.0, 7.0], [-9.0, -38.0, 2.0, 2.0, -65.0], [-4.0, -26.0, -30.0, 50.0, 125.0], [-61.0, 
+44.0, 5.0, -36.0, -55.0]], [[8.0, 24.0, -29.0, 4.0, -75.0], [12.0, -1.0, 10.0, 56.0, -104.0], [-26.0, -30.0, -29.0, -19.0, 
+35.0], [18.0, 17.0, -14.0, -84.0, -39.0]], [[41.0, 0.0, 16.0, -30.0, 60.0], [24.0, -37.0, 37.0, -3.0, 62.0], [42.0, -39.0, 
+-34.0, 88.0, 73.0], [-23.0, 116.0, 36.0, -15.0, -26.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-86.0, 33.0, 42.0, 70.0, -75.0], [9.0, -36.0, -75.0, -24.0, 31.0], [32.0, 34.0, 
+39.0, -17.0, -182.0], [53.0, -95.0, 30.0, -75.0, -11.0]], [[-5.0, -7.0, 59.0, 37.0, -1.0], [-12.0, -13.0, -27.0, 51.0, 8.0], 
+[-11.0, 2.0, -74.0, 45.0, -5.0], [-6.0, 0.0, 75.0, -62.0, 79.0]], [[34.0, 46.0, 9.0, -7.0, -13.0], [-4.0, 28.0, 6.0, 38.0, 
+34.0], [-13.0, 62.0, 7.0, 29.0, 1.0], [-35.0, -2.0, -40.0, 63.0, -32.0]], [[31.0, 20.0, 1.0, 40.0, 94.0], [-37.0, 56.0, -25.0, 
+21.0, -115.0], [11.0, -12.0, -15.0, -48.0, 91.0], [-47.0, 52.0, -36.0, 87.0, 81.0]], [[17.0, 45.0, 63.0, 9.0, -77.0], [-1.0, 
+13.0, 7.0, 68.0, 105.0], [-10.0, 57.0, -12.0, 55.0, -85.0], [-18.0, -20.0, 23.0, -6.0, -39.0]]], [[[50.0, 62.0, 39.0, -4.0, 
+-39.0], [-4.0, 33.0, 17.0, 70.0, 74.0], [-9.0, 78.0, -21.0, 71.0, -9.0], [-43.0, 9.0, -9.0, 41.0, -29.0]], [[-53.0, 31.0, -1.0, 
+71.0, 20.0], [-7.0, 0.0, -67.0, -49.0, -83.0], [57.0, 0.0, 30.0, -51.0, -50.0], [29.0, -26.0, -4.0, -17.0, 45.0]], [[46.0, 5.0, 
+30.0, -20.0, -4.0], [-20.0, 37.0, 23.0, 76.0, 46.0], [-56.0, 20.0, -3.0, -3.0, 5.0], [-54.0, 9.0, -33.0, 84.0, -27.0]], [[32.0, 
+-69.0, -8.0, -47.0, 43.0], [-6.0, -11.0, 36.0, 31.0, -2.0], [-61.0, -45.0, -53.0, 13.0, 98.0], [-23.0, 34.0, 19.0, 3.0, 32.0]], 
+[[26.0, 30.0, 15.0, 3.0, -22.0], [-15.0, 57.0, 34.0, 14.0, 15.0], [29.0, -24.0, 51.0, -55.0, -40.0], [-18.0, 36.0, -31.0, 62.0, 
+-54.0]]], [[[8.0, 55.0, 37.0, 33.0, -39.0], [-15.0, 49.0, 1.0, 23.0, 23.0], [36.0, 11.0, 44.0, -36.0, -82.0], [-13.0, 7.0, 
+-19.0, 43.0, -39.0]], [[-21.0, -9.0, 18.0, 6.0, 0.0], [2.0, -43.0, -55.0, 41.0, 28.0], [-76.0, 74.0, -37.0, 50.0, -16.0], 
+[-13.0, -78.0, -3.0, -3.0, 29.0]], [[-49.0, -49.0, -10.0, -5.0, -11.0], [-3.0, -21.0, -20.0, -21.0, 3.0], [-44.0, -38.0, 63.0, 
+-92.0, -83.0], [20.0, -61.0, -35.0, 22.0, -42.0]], [[33.0, 50.0, 57.0, 32.0, -10.0], [-27.0, 50.0, -11.0, 77.0, 23.0], [-11.0, 
+42.0, -9.0, 4.0, -29.0], [-49.0, 8.0, -14.0, 65.0, 7.0]], [[17.0, 79.0, 60.0, 50.0, -40.0], [-18.0, 49.0, -17.0, 53.0, 32.0], 
+[32.0, 52.0, 9.0, 10.0, -74.0], [-27.0, 2.0, -3.0, 35.0, -9.0]]], [[[-12.0, -21.0, -65.0, -40.0, 11.0], [17.0, -14.0, 16.0, 
+-61.0, -17.0], [-4.0, -13.0, 56.0, -38.0, 16.0], [19.0, -14.0, -56.0, 29.0, -56.0]], [[-1.0, 2.0, -2.0, 11.0, 13.0], [-7.0, 
+14.0, -1.0, -9.0, -27.0], [16.0, -20.0, 12.0, -29.0, 2.0], [0.0, 14.0, -6.0, 12.0, 7.0]], [[27.0, 37.0, 56.0, 27.0, -18.0], 
+[0.0, -2.0, -4.0, 55.0, 34.0], [22.0, 44.0, -95.0, 114.0, 28.0], [-13.0, 29.0, 84.0, -73.0, 68.0]], [[25.0, 39.0, 61.0, 31.0, 
+-6.0], [-21.0, 22.0, -29.0, 87.0, 31.0], [-35.0, 66.0, -44.0, 45.0, -14.0], [-47.0, -14.0, 6.0, 35.0, 35.0]], [[15.0, -47.0, 
+-3.0, -67.0, -63.0], [28.0, -31.0, 79.0, -5.0, 100.0], [-5.0, -46.0, -20.0, 51.0, -3.0], [28.0, 26.0, 61.0, -84.0, -59.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_array_rank2_offset0(self):
-      arg0=Data(5.0,self.functionspace)
-      arg1=numpy.array([[-4.0, -1.0, 2.0, 6.0, 2.0], [-5.0, 4.0, 1.0, -4.0, 6.0], [7.0, 6.0, 7.0, -3.0, -2.0], [-6.0, 0.0, 6.0, 
-3.0, 0.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-20.0, -5.0, 10.0, 30.0, 10.0], [-25.0, 20.0, 5.0, -20.0, 30.0], [35.0, 30.0, 35.0, -15.0, -10.0], 
-[-30.0, 0.0, 30.0, 15.0, 0.0]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-4.0, 6.0], [-6.0, -7.0]], [[0.0, 0.0], [7.0, 0.0]], [[1.0, 1.0], [2.0, 0.0]], [[-7.0, 2.0], 
+[-7.0, 7.0]], [[-4.0, -5.0], [-4.0, -6.0]], [[-4.0, -7.0], [3.0, 0.0]]]),self.functionspace)
+      arg1=Data(-6.0,self.functionspace)
+      arg1.setTaggedValue(1,1.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[24.0, -36.0], [36.0, 42.0]], [[-0.0, -0.0], [-42.0, -0.0]], [[-6.0, -6.0], [-12.0, -0.0]], 
+[[42.0, -12.0], [42.0, -42.0]], [[24.0, 30.0], [24.0, 36.0]], [[24.0, 42.0], [-18.0, -0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-4.0, 6.0], [-6.0, -7.0]], [[0.0, 0.0], [7.0, 0.0]], [[1.0, 1.0], [2.0, 0.0]], 
+[[-7.0, 2.0], [-7.0, 7.0]], [[-4.0, -5.0], [-4.0, -6.0]], [[-4.0, -7.0], [3.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank3_offset1(self):
-      arg0=Data(numpy.array([1.0, -4.0, 4.0]),self.functionspace)
-      arg1=numpy.array([[[-7.0, -7.0, -3.0, 3.0, 0.0], [4.0, 2.0, -2.0, -3.0, -1.0], [-5.0, 4.0, -2.0, 7.0, 5.0], [0.0, -2.0, 
--1.0, -1.0, 1.0]], [[-7.0, 3.0, 0.0, -3.0, 7.0], [0.0, 2.0, 0.0, -3.0, -6.0], [4.0, 1.0, 6.0, -2.0, -4.0], [-3.0, -7.0, -4.0, 
--1.0, 1.0]], [[-2.0, 0.0, -5.0, 4.0, -1.0], [-7.0, 2.0, 0.0, -2.0, 7.0], [-2.0, 4.0, 5.0, 6.0, 5.0], [-7.0, 0.0, 4.0, 0.0, 
--3.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[13.0, -19.0, -23.0, 31.0, -32.0], [-24.0, 2.0, -2.0, 1.0, 51.0], [-29.0, 16.0, -6.0, 39.0, 41.0], 
-[-16.0, 26.0, 31.0, 3.0, -15.0]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[1.0, 4.0, -2.0], [3.0, -2.0, -6.0]], [[-2.0, -7.0, 7.0], [-6.0, -7.0, 1.0]]], [[[0.0, 2.0, 
+3.0], [-2.0, 0.0, 6.0]], [[4.0, -4.0, 5.0], [0.0, 2.0, -5.0]]], [[[4.0, 6.0, 4.0], [4.0, -4.0, 6.0]], [[-7.0, 4.0, -6.0], 
+[-7.0, 5.0, -4.0]]], [[[7.0, 2.0, 4.0], [4.0, 1.0, 3.0]], [[2.0, -4.0, -5.0], [-4.0, 0.0, -2.0]]], [[[-1.0, -6.0, -6.0], [0.0, 
+2.0, -2.0]], [[1.0, -3.0, 6.0], [5.0, 5.0, 6.0]]], [[[-6.0, 7.0, 6.0], [3.0, -7.0, 5.0]], [[0.0, -2.0, 1.0], [5.0, 0.0, 
+-6.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([0.0, 1.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 7.0, -7.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[2.0, -8.0], [0.0, -6.0]], [[5.0, 6.0], [1.0, -3.0]], [[10.0, 2.0], [-2.0, 1.0]], [[6.0, 4.0], 
+[-9.0, -2.0]], [[-12.0, 0.0], [3.0, 11.0]], [[13.0, -2.0], [-1.0, -6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[45.0, 37.0], [-104.0, -74.0]], [[-7.0, -48.0], [-51.0, 49.0]], [[26.0, -58.0], [49.0, 
+42.0]], [[7.0, -2.0], [13.0, 2.0]], [[-3.0, 28.0], [-60.0, 8.0]], [[-11.0, -75.0], [-21.0, 57.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[-2.0, 5.0, -2.0], [1.0, 6.0, 0.0]]),self.functionspace)
-      arg1=numpy.array([[[[2.0, 0.0, 2.0, -5.0, -2.0], [4.0, 0.0, -2.0, 1.0, 6.0], [-5.0, 7.0, -5.0, -3.0, -7.0], [-7.0, 3.0, 
-6.0, 3.0, -3.0]], [[0.0, -4.0, -3.0, -5.0, -5.0], [6.0, 3.0, 1.0, 6.0, 5.0], [-3.0, -2.0, 1.0, -3.0, 0.0], [3.0, 3.0, 4.0, 
--4.0, 2.0]], [[-1.0, -1.0, -6.0, 4.0, -5.0], [-1.0, 1.0, 3.0, -4.0, -1.0], [0.0, -3.0, -4.0, 6.0, 7.0], [-5.0, 1.0, -4.0, -3.0, 
-7.0]]], [[[-5.0, 7.0, -3.0, -2.0, -7.0], [-7.0, 3.0, -7.0, 4.0, -1.0], [4.0, 0.0, 7.0, 4.0, -4.0], [6.0, 4.0, -5.0, 7.0, 
--6.0]], [[3.0, -2.0, -3.0, 0.0, -5.0], [0.0, 3.0, 7.0, -1.0, -7.0], [0.0, -6.0, -5.0, -5.0, -2.0], [5.0, 3.0, 4.0, 1.0, 0.0]], 
-[[1.0, 1.0, 0.0, 7.0, 7.0], [-1.0, 2.0, 5.0, 2.0, -3.0], [2.0, 3.0, -1.0, -7.0, 2.0], [7.0, -7.0, 7.0, 0.0, 6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[11.0, -23.0, -28.0, -25.0, -48.0], [17.0, 34.0, 38.0, 34.0, -28.0], [-1.0, -54.0, 0.0, -47.0, 
--16.0], [75.0, 29.0, 35.0, -7.0, -4.0]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[1.0, -3.0], [7.0, -1.0]], [[6.0, 3.0], [1.0, -1.0]], [[0.0, -6.0], [-6.0, -1.0]], [[-7.0, 4.0], 
+[-1.0, -3.0]], [[-5.0, -7.0], [-5.0, 6.0]], [[0.0, 0.0], [-3.0, -4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-2.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-4.0, -6.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-2.0, 3.0], [6.0, -9.0]], [[-14.0, 21.0], [2.0, -3.0]]], [[[-12.0, 18.0], [-6.0, 9.0]], [[-2.0, 
+3.0], [2.0, -3.0]]], [[[0.0, 0.0], [12.0, -18.0]], [[12.0, -18.0], [2.0, -3.0]]], [[[14.0, -21.0], [-8.0, 12.0]], [[2.0, -3.0], 
+[6.0, -9.0]]], [[[10.0, -15.0], [14.0, -21.0]], [[10.0, -15.0], [-12.0, 18.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[6.0, -9.0], [8.0, 
+-12.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-4.0, -6.0], [12.0, 18.0]], [[-28.0, -42.0], [4.0, 6.0]]], [[[-24.0, -36.0], [-12.0, 
+-18.0]], [[-4.0, -6.0], [4.0, 6.0]]], [[[0.0, 0.0], [24.0, 36.0]], [[24.0, 36.0], [4.0, 6.0]]], [[[28.0, 42.0], [-16.0, 
+-24.0]], [[4.0, 6.0], [12.0, 18.0]]], [[[20.0, 30.0], [28.0, 42.0]], [[20.0, 30.0], [-24.0, -36.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[12.0, 18.0], [16.0, 24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_array_rank3_offset0(self):
-      arg0=Data(6.0,self.functionspace)
-      arg1=numpy.array([[[5.0, 0.0], [3.0, 5.0]], [[-5.0, 0.0], [-2.0, 7.0]], [[7.0, -4.0], [0.0, 0.0]], [[-1.0, 0.0], [-1.0, 
--4.0]], [[1.0, -4.0], [1.0, 1.0]], [[4.0, 5.0], [-1.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[30.0, 0.0], [18.0, 30.0]], [[-30.0, 0.0], [-12.0, 42.0]], [[42.0, -24.0], [0.0, 0.0]], [[-6.0, 
-0.0], [-6.0, -24.0]], [[6.0, -24.0], [6.0, 6.0]], [[24.0, 30.0], [-6.0, 12.0]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[2.0, -1.0, 6.0], [6.0, 4.0, -1.0]], [[0.0, 0.0, 6.0], [3.0, 6.0, 5.0]]], [[[0.0, 3.0, 3.0], 
+[7.0, 2.0, 6.0]], [[5.0, 0.0, -5.0], [4.0, -6.0, -4.0]]], [[[-6.0, 6.0, -7.0], [-4.0, -3.0, 0.0]], [[5.0, -3.0, -3.0], [4.0, 
+-1.0, -7.0]]], [[[3.0, 6.0, 5.0], [6.0, 3.0, -6.0]], [[6.0, -7.0, 2.0], [2.0, 2.0, -6.0]]], [[[-7.0, -2.0, -7.0], [-2.0, -7.0, 
+-1.0]], [[-2.0, -1.0, -6.0], [-7.0, 4.0, -2.0]]], [[[-4.0, 3.0, -5.0], [4.0, 0.0, 3.0]], [[0.0, 1.0, -1.0], [6.0, -7.0, 
+0.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-2.0, 2.0], [0.0, 5.0], [-7.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, -3.0], [-5.0, -4.0], [1.0, 1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-46.0, -37.0], [-5.0, 38.0]], [[-42.0, -36.0], [-41.0, 6.0]]], [[[-21.0, -3.0], [-56.0, -12.0]], 
+[[25.0, 40.0], [20.0, 2.0]]], [[[61.0, 60.0], [8.0, -23.0]], [[11.0, 13.0], [41.0, 45.0]]], [[[-41.0, 6.0], [30.0, 63.0]], 
+[[-26.0, -35.0], [38.0, 50.0]]], [[[63.0, 18.0], [11.0, -33.0]], [[46.0, 27.0], [28.0, 18.0]]], [[[43.0, 37.0], [-29.0, 
+-10.0]], [[7.0, 11.0], [-12.0, -23.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[19.0, 4.0], [3.0, -35.0]], [[6.0, 6.0], [-13.0, -28.0]]], [[[-12.0, -9.0], [24.0, 
+-23.0]], [[15.0, -20.0], [42.0, 8.0]]], [[[-61.0, -13.0], [-1.0, 24.0]], [[32.0, -6.0], [14.0, -15.0]]], [[[-13.0, -28.0], 
+[3.0, -36.0]], [[61.0, 12.0], [-8.0, -20.0]]], [[[-25.0, 22.0], [26.0, 33.0]], [[-9.0, 4.0], [-50.0, 3.0]]], [[[-36.0, -5.0], 
+[19.0, -9.0]], [[-6.0, -5.0], [59.0, 10.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank4_offset1(self):
-      arg0=Data(numpy.array([3.0, 1.0, 0.0]),self.functionspace)
-      arg1=numpy.array([[[[-4.0, 3.0], [-5.0, -6.0]], [[5.0, 5.0], [0.0, -7.0]], [[-2.0, -4.0], [0.0, 6.0]], [[0.0, 6.0], [1.0, 
--7.0]], [[-4.0, 0.0], [3.0, 0.0]], [[0.0, -6.0], [6.0, 3.0]]], [[[7.0, 2.0], [2.0, 1.0]], [[-6.0, 2.0], [6.0, 2.0]], [[3.0, 
-5.0], [0.0, -3.0]], [[4.0, -2.0], [-3.0, -5.0]], [[4.0, 0.0], [1.0, 5.0]], [[0.0, 3.0], [3.0, -5.0]]], [[[-6.0, 4.0], [-6.0, 
-5.0]], [[-5.0, -6.0], [7.0, 3.0]], [[-4.0, -5.0], [2.0, -2.0]], [[6.0, 6.0], [-5.0, -7.0]], [[-4.0, -4.0], [3.0, 1.0]], [[0.0, 
--3.0], [3.0, -7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-5.0, 11.0], [-13.0, -17.0]], [[9.0, 17.0], [6.0, -19.0]], [[-3.0, -7.0], [0.0, 15.0]], [[4.0, 
-16.0], [0.0, -26.0]], [[-8.0, 0.0], [10.0, 5.0]], [[0.0, -15.0], [21.0, 4.0]]]),self.functionspace)
+   def test_generalTensorProduct_constData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-6.0, 5.0, 6.0, -1.0], [-1.0, 4.0, -7.0, -7.0], [0.0, 7.0, 1.0, -2.0]], [[0.0, 5.0, -5.0, 5.0], 
+[-2.0, -4.0, -2.0, -1.0], [5.0, 7.0, 0.0, 0.0]]], [[[0.0, -3.0, 5.0, -5.0], [-7.0, 3.0, 0.0, -7.0], [7.0, -6.0, -5.0, -6.0]], 
+[[1.0, -2.0, -7.0, -2.0], [-6.0, -4.0, 1.0, 4.0], [7.0, 2.0, -7.0, -5.0]]], [[[7.0, 4.0, 0.0, -2.0], [0.0, 1.0, 6.0, 7.0], 
+[-4.0, 0.0, 7.0, -7.0]], [[2.0, -3.0, 6.0, 0.0], [-1.0, -5.0, 4.0, -2.0], [-2.0, 4.0, -2.0, -2.0]]]]),self.functionspace)
+      arg1=Data(-7.0,self.functionspace)
+      arg1.setTaggedValue(1,0.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[42.0, -35.0, -42.0, 7.0], [7.0, -28.0, 49.0, 49.0], [-0.0, -49.0, -7.0, 14.0]], [[-0.0, -35.0, 
+35.0, -35.0], [14.0, 28.0, 14.0, 7.0], [-35.0, -49.0, -0.0, -0.0]]], [[[-0.0, 21.0, -35.0, 35.0], [49.0, -21.0, -0.0, 49.0], 
+[-49.0, 42.0, 35.0, 42.0]], [[-7.0, 14.0, 49.0, 14.0], [42.0, 28.0, -7.0, -28.0], [-49.0, -14.0, 49.0, 35.0]]], [[[-49.0, 
+-28.0, -0.0, 14.0], [-0.0, -7.0, -42.0, -49.0], [28.0, -0.0, -49.0, 49.0]], [[-14.0, 21.0, -42.0, -0.0], [7.0, 35.0, -28.0, 
+14.0], [14.0, -28.0, 14.0, 14.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, 0.0, 
+-0.0, 0.0], [-0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 
+-0.0, -0.0]], [[0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 
+0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_array_rank4_offset0(self):
-      arg0=Data(0.0,self.functionspace)
-      arg1=numpy.array([[[[-7.0, 1.0, 0.0, -6.0], [0.0, 2.0, 4.0, 4.0], [-7.0, -1.0, -1.0, 0.0]], [[1.0, -2.0, 2.0, 0.0], [2.0, 
-4.0, -1.0, 5.0], [0.0, 2.0, 6.0, -1.0]]], [[[-1.0, 5.0, 1.0, -5.0], [-7.0, 7.0, -1.0, -6.0], [-2.0, -6.0, -6.0, -4.0]], [[5.0, 
-1.0, 2.0, 4.0], [-2.0, -4.0, -2.0, -3.0], [1.0, 3.0, 4.0, -1.0]]], [[[6.0, -3.0, 1.0, -4.0], [5.0, 6.0, -5.0, -3.0], [4.0, 4.0, 
-2.0, -3.0]], [[-7.0, 3.0, -5.0, 3.0], [-4.0, 7.0, -3.0, -7.0], [-3.0, -3.0, 4.0, 3.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, 0.0]], [[0.0, -0.0, 0.0, 0.0], 
-[0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0]]], [[[-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]], 
-[[0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]]], [[[0.0, -0.0, 0.0, -0.0], [0.0, 0.0, -0.0, -0.0], 
-[0.0, 0.0, 0.0, -0.0]], [[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_float_rank0_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,3.0)
+      arg1=2.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-6.0,self.functionspace)
+      ref.setTaggedValue(1,6.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_constData_rank0_offset0(self):
-      arg0=Data(5.0,self.functionspace)
-      arg1=Data(1.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(5.0,self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_array_rank0_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=numpy.array(7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-28.0,self.functionspace)
+      ref.setTaggedValue(1,49.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([4.0, -2.0, 4.0]),self.functionspace)
-      arg1=Data(numpy.array([5.0, 6.0, 6.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(32.0,self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_array_rank1_offset1(self):
+      arg0=Data(numpy.array([1.0, -1.0, 1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, -1.0, -3.0]))
+      arg1=numpy.array([-2.0, 5.0, 0.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-7.0,self.functionspace)
+      ref.setTaggedValue(1,1.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[-1.0, 2.0, -7.0], [0.0, 6.0, -6.0]]),self.functionspace)
-      arg1=Data(numpy.array([[4.0, 4.0, 4.0], [-4.0, 7.0, 7.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-24.0,self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[1.0, 4.0, 7.0], [0.0, 2.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, 4.0, -3.0], [4.0, -1.0, -1.0]]))
+      arg1=numpy.array([[5.0, 0.0, 1.0], [-7.0, 2.0, -7.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(37.0,self.functionspace)
+      ref.setTaggedValue(1,-16.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[5.0, 6.0, -4.0], [6.0, 1.0, 0.0], [0.0, -2.0, -6.0], [-5.0, -3.0, -1.0]], [[0.0, -2.0, 0.0], 
-[6.0, 3.0, 0.0], [-3.0, -2.0, 1.0], [0.0, 6.0, -7.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-4.0, 6.0, 6.0], [-7.0, -4.0, -2.0], [0.0, 6.0, -6.0], [4.0, -3.0, 6.0]], [[3.0, -6.0, 2.0], 
-[1.0, -4.0, 7.0], [-4.0, -6.0, 0.0], [-2.0, 0.0, -1.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(-10.0,self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[7.0, 0.0, -2.0], [1.0, 4.0, -7.0], [5.0, 3.0, -2.0], [7.0, 0.0, -6.0]], [[-7.0, -1.0, -4.0], 
+[0.0, -6.0, 1.0], [4.0, 1.0, 7.0], [-6.0, -5.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, -2.0, -5.0], [3.0, -2.0, -3.0], [5.0, -4.0, 0.0], [-3.0, 6.0, -1.0]], [[-5.0, 
+4.0, -1.0], [-3.0, -7.0, -2.0], [-2.0, 0.0, 2.0], [-3.0, 2.0, 0.0]]]))
+      arg1=numpy.array([[[-7.0, 0.0, -7.0], [0.0, -4.0, 4.0], [2.0, 2.0, -1.0], [-5.0, 0.0, 6.0]], [[4.0, -2.0, 3.0], [2.0, 
+2.0, 2.0], [-6.0, 7.0, 1.0], [7.0, 0.0, -1.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-238.0,self.functionspace)
+      ref.setTaggedValue(1,-55.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[5.0, -1.0], [7.0, -7.0], [3.0, -2.0]], [[1.0, -3.0], [-1.0, -3.0], [3.0, 2.0]]], [[[0.0, -3.0], 
-[1.0, -7.0], [-5.0, -7.0]], [[7.0, 5.0], [3.0, 6.0], [0.0, 2.0]]], [[[-2.0, 5.0], [-5.0, -5.0], [-6.0, -2.0]], [[6.0, 0.0], 
-[-7.0, 7.0], [7.0, -4.0]]], [[[4.0, -1.0], [2.0, 5.0], [2.0, 5.0]], [[3.0, -5.0], [3.0, -5.0], [-7.0, 
-7.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[6.0, 3.0], [2.0, 0.0], [-5.0, 6.0]], [[-1.0, -3.0], [5.0, -1.0], [5.0, 0.0]]], [[[-5.0, 4.0], 
-[2.0, -7.0], [4.0, 0.0]], [[2.0, -1.0], [-5.0, 0.0], [2.0, -1.0]]], [[[-4.0, 7.0], [-3.0, 7.0], [-6.0, 0.0]], [[2.0, 3.0], 
-[2.0, -6.0], [4.0, 7.0]]], [[[6.0, -7.0], [-5.0, 7.0], [7.0, 0.0]], [[-7.0, 7.0], [2.0, -3.0], [-6.0, 
--2.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      ref=Data(124.0,self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_array_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[5.0, -5.0], [5.0, -2.0], [2.0, -7.0]], [[3.0, 2.0], [4.0, 0.0], [6.0, 7.0]]], [[[-7.0, -4.0], 
+[-4.0, -2.0], [-5.0, 0.0]], [[6.0, 7.0], [-5.0, 5.0], [-6.0, 6.0]]], [[[3.0, 4.0], [5.0, 4.0], [0.0, -6.0]], [[4.0, 1.0], 
+[-4.0, -7.0], [-6.0, 5.0]]], [[[6.0, -1.0], [0.0, 0.0], [-1.0, 6.0]], [[-2.0, 7.0], [-6.0, -2.0], [2.0, 
+4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 0.0], [0.0, 7.0], [0.0, 3.0]], [[7.0, 0.0], [0.0, -1.0], [4.0, 0.0]]], 
+[[[0.0, -3.0], [-4.0, 0.0], [1.0, -7.0]], [[-4.0, 5.0], [6.0, -4.0], [-7.0, 1.0]]], [[[7.0, 5.0], [-7.0, -5.0], [0.0, 3.0]], 
+[[-6.0, 0.0], [0.0, 3.0], [0.0, -2.0]]], [[[4.0, 4.0], [1.0, -2.0], [-7.0, 3.0]], [[-1.0, 6.0], [7.0, 4.0], [0.0, -6.0]]]]))
+      arg1=numpy.array([[[[0.0, 1.0], [-5.0, 0.0], [7.0, 7.0]], [[0.0, 4.0], [7.0, -1.0], [-1.0, -7.0]]], [[[2.0, 6.0], [0.0, 
+-7.0], [-3.0, -3.0]], [[-6.0, -5.0], [3.0, 0.0], [-4.0, -6.0]]], [[[3.0, -7.0], [-7.0, -6.0], [1.0, -3.0]], [[3.0, 3.0], [0.0, 
+0.0], [7.0, -4.0]]], [[[2.0, 4.0], [5.0, 0.0], [4.0, 0.0]], [[6.0, -6.0], [0.0, -6.0], [2.0, 4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-316.0,self.functionspace)
+      ref.setTaggedValue(1,14.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_constData_rank1_offset0(self):
+   def test_generalTensorProduct_taggedData_rank0_array_rank1_offset0(self):
       arg0=Data(-2.0,self.functionspace)
-      arg1=Data(numpy.array([4.0, -3.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-8.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=numpy.array([1.0, 3.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-2.0, -6.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([7.0, 21.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([0.0, -1.0, -3.0]),self.functionspace)
-      arg1=Data(numpy.array([[0.0, 0.0], [4.0, 5.0], [6.0, 1.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-22.0, -8.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_array_rank2_offset1(self):
+      arg0=Data(numpy.array([0.0, 5.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([7.0, 3.0, 2.0]))
+      arg1=numpy.array([[2.0, 2.0], [-4.0, -2.0], [5.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-20.0, -10.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([12.0, 20.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[0.0, -1.0, -5.0], [-3.0, 4.0, 3.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[-1.0, 4.0], [6.0, -5.0], [4.0, -4.0]], [[3.0, -1.0], [6.0, 3.0], [0.0, 
-1.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-11.0, 43.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[-3.0, 0.0, -7.0], [0.0, 6.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -5.0, 5.0], [-3.0, -7.0, 7.0]]))
+      arg1=numpy.array([[[4.0, 0.0], [5.0, 1.0], [-2.0, -5.0]], [[-3.0, 3.0], [0.0, 0.0], [-6.0, -7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([38.0, 77.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-96.0, -88.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[-1.0, 5.0, 3.0], [-1.0, 0.0, 6.0], [-5.0, 1.0, 3.0], [7.0, -5.0, 2.0]], [[-6.0, -5.0, -3.0], 
-[4.0, 2.0, -6.0], [0.0, 2.0, 6.0], [-4.0, 2.0, 3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-2.0, 4.0], [-6.0, 3.0], [0.0, 4.0]], [[4.0, 2.0], [1.0, 0.0], [-3.0, -4.0]], [[1.0, 5.0], 
-[4.0, 1.0], [0.0, -6.0]], [[1.0, -3.0], [-6.0, -1.0], [-4.0, 2.0]]], [[[1.0, 1.0], [0.0, -4.0], [-4.0, 0.0]], [[-5.0, -5.0], 
-[2.0, -1.0], [3.0, -5.0]], [[-2.0, 5.0], [-6.0, -7.0], [-6.0, 3.0]], [[4.0, 1.0], [-6.0, -1.0], [6.0, 
--7.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([-108.0, -58.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[0.0, -6.0, -7.0], [5.0, 4.0, -3.0], [5.0, 6.0, 2.0], [7.0, -2.0, -7.0]], [[-6.0, 6.0, -7.0], 
+[1.0, 0.0, 5.0], [-7.0, 2.0, 3.0], [-6.0, 7.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 0.0, -3.0], [-2.0, 2.0, -5.0], [1.0, -1.0, 4.0], [-2.0, 7.0, -4.0]], [[0.0, 
+-2.0, -7.0], [-2.0, 1.0, 5.0], [-6.0, -3.0, 0.0], [-1.0, 3.0, 4.0]]]))
+      arg1=numpy.array([[[[-6.0, 1.0], [2.0, 1.0], [-3.0, 1.0]], [[-2.0, 6.0], [-3.0, 4.0], [-3.0, -3.0]], [[5.0, 2.0], [-5.0, 
+4.0], [-1.0, 3.0]], [[4.0, 6.0], [2.0, -1.0], [-3.0, -1.0]]], [[[-3.0, 7.0], [3.0, 2.0], [7.0, -5.0]], [[-3.0, -3.0], [-1.0, 
+2.0], [-5.0, -1.0]], [[-4.0, -2.0], [1.0, -7.0], [5.0, -1.0]], [[-7.0, 0.0], [0.0, -6.0], [-2.0, 2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([74.0, 91.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-3.0, 59.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_constData_rank2_offset0(self):
-      arg0=Data(-5.0,self.functionspace)
-      arg1=Data(numpy.array([[3.0, -5.0, 7.0, 1.0, -2.0], [1.0, -7.0, 4.0, 3.0, -4.0], [-7.0, 7.0, -3.0, -1.0, 0.0], [-1.0, 
-2.0, 5.0, -3.0, -1.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-15.0, 25.0, -35.0, -5.0, 10.0], [-5.0, 35.0, -20.0, -15.0, 20.0], [35.0, -35.0, 15.0, 5.0, -0.0], 
-[5.0, -10.0, -25.0, 15.0, 5.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_array_rank2_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=numpy.array([[2.0, -2.0, -5.0, -4.0, 0.0], [0.0, -6.0, -3.0, 3.0, -3.0], [6.0, 2.0, 4.0, -2.0, -6.0], [6.0, -1.0, 
+-2.0, -6.0, 7.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[10.0, -10.0, -25.0, -20.0, 0.0], [0.0, -30.0, -15.0, 15.0, -15.0], [30.0, 10.0, 20.0, -10.0, 
+-30.0], [30.0, -5.0, -10.0, -30.0, 35.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[14.0, -14.0, -35.0, -28.0, 0.0], [0.0, -42.0, -21.0, 21.0, -21.0], [42.0, 14.0, 28.0, 
+-14.0, -42.0], [42.0, -7.0, -14.0, -42.0, 49.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([-5.0, -2.0, -1.0]),self.functionspace)
-      arg1=Data(numpy.array([[[3.0, 7.0, 0.0, -1.0, -6.0], [5.0, -7.0, -3.0, -1.0, 3.0], [-7.0, 7.0, 0.0, -5.0, 3.0], [4.0, 
--2.0, 0.0, 2.0, -7.0]], [[-2.0, 1.0, 4.0, 4.0, 4.0], [4.0, 1.0, -7.0, -4.0, -1.0], [-3.0, -4.0, -5.0, 6.0, 4.0], [-1.0, 2.0, 
-4.0, -7.0, 7.0]], [[4.0, 5.0, -3.0, -6.0, -5.0], [-4.0, 4.0, 1.0, 6.0, -2.0], [-1.0, 3.0, -4.0, 0.0, -6.0], [-2.0, -6.0, -1.0, 
--4.0, 0.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-15.0, -42.0, -5.0, 3.0, 27.0], [-29.0, 29.0, 28.0, 7.0, -11.0], [42.0, -30.0, 14.0, 13.0, -17.0], 
-[-16.0, 12.0, -7.0, 8.0, 21.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_array_rank3_offset1(self):
+      arg0=Data(numpy.array([-5.0, 2.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, -2.0, -7.0]))
+      arg1=numpy.array([[[1.0, 5.0, 4.0, 0.0, 4.0], [0.0, 7.0, -5.0, 2.0, -4.0], [-3.0, -4.0, 1.0, 0.0, 6.0], [-5.0, -6.0, 
+-2.0, 1.0, 7.0]], [[-4.0, 0.0, 5.0, 0.0, -7.0], [-4.0, 0.0, 4.0, 3.0, 4.0], [-3.0, -5.0, -2.0, -7.0, 0.0], [0.0, -3.0, -5.0, 
+-5.0, 5.0]], [[0.0, 0.0, -1.0, -2.0, -6.0], [-7.0, 4.0, 0.0, -5.0, 4.0], [-7.0, 3.0, -6.0, 0.0, -5.0], [-6.0, -2.0, 5.0, 5.0, 
+6.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-13.0, -25.0, -5.0, 10.0, -4.0], [27.0, -55.0, 33.0, 21.0, 8.0], [44.0, -5.0, 21.0, -14.0, -5.0], 
+[55.0, 34.0, -25.0, -40.0, -55.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[5.0, -15.0, -15.0, 14.0, 44.0], [57.0, -49.0, 7.0, 23.0, -24.0], [64.0, 1.0, 43.0, 
+14.0, 17.0], [57.0, 38.0, -19.0, -28.0, -73.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[0.0, -4.0, -5.0], [-2.0, 4.0, 1.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-5.0, -7.0, 7.0, 5.0, 7.0], [-1.0, 7.0, 3.0, 6.0, 4.0], [-4.0, -4.0, -3.0, 0.0, -2.0], [4.0, 
-5.0, 3.0, -4.0, 7.0]], [[6.0, 0.0, -2.0, -7.0, 0.0], [4.0, -4.0, -4.0, -6.0, 1.0], [7.0, 3.0, -3.0, 2.0, 2.0], [-7.0, 3.0, 
--1.0, 0.0, 2.0]], [[3.0, -2.0, 0.0, -4.0, 4.0], [0.0, 4.0, -1.0, 3.0, 5.0], [0.0, -7.0, 2.0, -7.0, -4.0], [0.0, -1.0, 4.0, 
--5.0, 0.0]]], [[[-1.0, 2.0, -7.0, 7.0, 5.0], [-6.0, 5.0, 2.0, 0.0, -5.0], [-3.0, 5.0, -1.0, 3.0, 2.0], [-1.0, 0.0, -5.0, 4.0, 
-0.0]], [[3.0, 4.0, 2.0, -6.0, -2.0], [3.0, -2.0, -3.0, 0.0, 4.0], [2.0, -7.0, 2.0, 7.0, -1.0], [-6.0, 2.0, 3.0, 3.0, -3.0]], 
-[[5.0, -6.0, 0.0, 2.0, 4.0], [-2.0, 4.0, 0.0, 7.0, 2.0], [4.0, 0.0, 4.0, -2.0, 6.0], [-2.0, 0.0, 5.0, -6.0, 
-5.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-20.0, 16.0, 30.0, 12.0, -34.0], [6.0, -18.0, 5.0, 16.0, -1.0], [-10.0, -15.0, 16.0, 47.0, 10.0], 
-[4.0, 1.0, 11.0, 23.0, -15.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[0.0, -4.0, -4.0], [1.0, -4.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, -6.0, 0.0], [-2.0, 0.0, 3.0]]))
+      arg1=numpy.array([[[[0.0, 4.0, -1.0, -3.0, 2.0], [-7.0, -1.0, -5.0, -6.0, -6.0], [-4.0, -7.0, -3.0, -5.0, -7.0], [0.0, 
+1.0, -1.0, 4.0, -2.0]], [[6.0, -5.0, 3.0, 1.0, 1.0], [-3.0, -4.0, -7.0, -2.0, 5.0], [4.0, -5.0, 3.0, 5.0, 1.0], [1.0, 0.0, 
+-6.0, 3.0, -7.0]], [[-1.0, -2.0, 3.0, 0.0, 5.0], [-3.0, -2.0, 2.0, 2.0, -5.0], [6.0, -2.0, 5.0, 6.0, 5.0], [7.0, -1.0, 2.0, 
+7.0, 0.0]]], [[[-6.0, 0.0, -5.0, 0.0, 4.0], [1.0, 1.0, -6.0, -6.0, 3.0], [7.0, 3.0, 4.0, -3.0, -4.0], [-2.0, 0.0, -6.0, 2.0, 
+0.0]], [[5.0, 3.0, -7.0, 3.0, 6.0], [-2.0, 5.0, 7.0, -1.0, 1.0], [-4.0, 0.0, -4.0, -6.0, 2.0], [1.0, 0.0, -4.0, 0.0, 4.0]], 
+[[5.0, -6.0, -3.0, 1.0, 1.0], [0.0, -2.0, 1.0, 3.0, 0.0], [-5.0, 4.0, -4.0, -6.0, -4.0], [7.0, -1.0, 4.0, -3.0, -3.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-36.0, 4.0, -7.0, -14.0, -42.0], [33.0, 1.0, -12.0, 4.0, -1.0], [-27.0, 39.0, -20.0, -35.0, 
+-44.0], [-24.0, 2.0, 34.0, -44.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-9.0, 24.0, -20.0, -12.0, -5.0], [-5.0, 13.0, 42.0, 15.0, -54.0], [-65.0, 15.0, -47.0, 
+-57.0, -31.0], [19.0, 0.0, 57.0, -19.0, 27.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_constData_rank3_offset0(self):
-      arg0=Data(5.0,self.functionspace)
-      arg1=Data(numpy.array([[[3.0, -7.0], [-7.0, -2.0]], [[-4.0, 4.0], [6.0, -5.0]], [[6.0, 6.0], [-3.0, -4.0]], [[-3.0, 
--6.0], [-6.0, -3.0]], [[3.0, 1.0], [5.0, 1.0]], [[1.0, -3.0], [5.0, -6.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[15.0, -35.0], [-35.0, -10.0]], [[-20.0, 20.0], [30.0, -25.0]], [[30.0, 30.0], [-15.0, -20.0]], 
-[[-15.0, -30.0], [-30.0, -15.0]], [[15.0, 5.0], [25.0, 5.0]], [[5.0, -15.0], [25.0, -30.0]]]),self.functionspace)
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank4_offset1(self):
-      arg0=Data(numpy.array([4.0, 4.0, -5.0]),self.functionspace)
-      arg1=Data(numpy.array([[[[5.0, -5.0], [2.0, -1.0]], [[-1.0, 2.0], [-1.0, 5.0]], [[-6.0, 0.0], [6.0, 0.0]], [[2.0, -1.0], 
-[1.0, 1.0]], [[4.0, -7.0], [5.0, 0.0]], [[-6.0, -5.0], [4.0, 2.0]]], [[[1.0, -1.0], [-5.0, 5.0]], [[4.0, 3.0], [-1.0, 3.0]], 
-[[7.0, 2.0], [-2.0, -3.0]], [[6.0, 3.0], [-2.0, 0.0]], [[2.0, -7.0], [0.0, -6.0]], [[-4.0, 2.0], [-2.0, -5.0]]], [[[-5.0, 0.0], 
-[2.0, 5.0]], [[6.0, 5.0], [-6.0, 3.0]], [[-1.0, 4.0], [-6.0, -6.0]], [[4.0, 4.0], [-3.0, -6.0]], [[-1.0, 0.0], [1.0, 4.0]], 
-[[-7.0, 7.0], [2.0, 0.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[49.0, -24.0], [-22.0, -9.0]], [[-18.0, -5.0], [22.0, 17.0]], [[9.0, -12.0], [46.0, 18.0]], 
-[[12.0, -12.0], [11.0, 34.0]], [[29.0, -56.0], [15.0, -44.0]], [[-5.0, -47.0], [-2.0, -12.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_array_rank3_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg0.setTaggedValue(1,1.0)
+      arg1=numpy.array([[[4.0, 0.0], [3.0, -4.0]], [[-6.0, -3.0], [-6.0, 0.0]], [[4.0, 1.0], [-6.0, 4.0]], [[-4.0, 3.0], [-3.0, 
+-1.0]], [[6.0, -7.0], [-4.0, 0.0]], [[-6.0, 7.0], [-4.0, 2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[12.0, 0.0], [9.0, -12.0]], [[-18.0, -9.0], [-18.0, 0.0]], [[12.0, 3.0], [-18.0, 12.0]], [[-12.0, 
+9.0], [-9.0, -3.0]], [[18.0, -21.0], [-12.0, 0.0]], [[-18.0, 21.0], [-12.0, 6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[4.0, 0.0], [3.0, -4.0]], [[-6.0, -3.0], [-6.0, 0.0]], [[4.0, 1.0], [-6.0, 4.0]], 
+[[-4.0, 3.0], [-3.0, -1.0]], [[6.0, -7.0], [-4.0, 0.0]], [[-6.0, 7.0], [-4.0, 2.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_constData_rank4_offset0(self):
-      arg0=Data(3.0,self.functionspace)
-      arg1=Data(numpy.array([[[[3.0, 3.0, 2.0, 1.0], [-1.0, 7.0, -2.0, 0.0], [4.0, 1.0, 7.0, -5.0]], [[-4.0, -7.0, -6.0, -6.0], 
-[3.0, -2.0, -7.0, 2.0], [2.0, 4.0, -7.0, -2.0]]], [[[1.0, 2.0, 3.0, 4.0], [7.0, 1.0, -1.0, 4.0], [5.0, -7.0, -1.0, -3.0]], 
-[[-2.0, -2.0, -5.0, 4.0], [0.0, -6.0, -7.0, -6.0], [-2.0, -3.0, 3.0, -5.0]]], [[[0.0, -1.0, 0.0, -6.0], [-5.0, 7.0, 4.0, -2.0], 
-[-6.0, -3.0, 7.0, 6.0]], [[0.0, 2.0, 7.0, -7.0], [-1.0, -1.0, 1.0, -6.0], [-4.0, -5.0, 7.0, -6.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[9.0, 9.0, 6.0, 3.0], [-3.0, 21.0, -6.0, 0.0], [12.0, 3.0, 21.0, -15.0]], [[-12.0, -21.0, -18.0, 
--18.0], [9.0, -6.0, -21.0, 6.0], [6.0, 12.0, -21.0, -6.0]]], [[[3.0, 6.0, 9.0, 12.0], [21.0, 3.0, -3.0, 12.0], [15.0, -21.0, 
--3.0, -9.0]], [[-6.0, -6.0, -15.0, 12.0], [0.0, -18.0, -21.0, -18.0], [-6.0, -9.0, 9.0, -15.0]]], [[[0.0, -3.0, 0.0, -18.0], 
-[-15.0, 21.0, 12.0, -6.0], [-18.0, -9.0, 21.0, 18.0]], [[0.0, 6.0, 21.0, -21.0], [-3.0, -3.0, 3.0, -18.0], [-12.0, -15.0, 21.0, 
--18.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_array_rank4_offset1(self):
+      arg0=Data(numpy.array([5.0, -2.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, 0.0, -4.0]))
+      arg1=numpy.array([[[[-1.0, -1.0], [7.0, 0.0]], [[0.0, 3.0], [-1.0, -2.0]], [[7.0, 6.0], [-4.0, 5.0]], [[6.0, 1.0], [-1.0, 
+-1.0]], [[6.0, -4.0], [3.0, -1.0]], [[-4.0, 3.0], [5.0, -5.0]]], [[[7.0, 3.0], [7.0, -4.0]], [[-3.0, 6.0], [4.0, -2.0]], 
+[[-2.0, 0.0], [-4.0, 7.0]], [[7.0, -7.0], [1.0, -6.0]], [[0.0, 5.0], [-7.0, 4.0]], [[-4.0, 3.0], [5.0, -2.0]]], [[[-2.0, -3.0], 
+[0.0, 0.0]], [[-5.0, -7.0], [-6.0, -2.0]], [[-6.0, -6.0], [-7.0, 1.0]], [[2.0, 1.0], [4.0, 4.0]], [[7.0, 1.0], [1.0, 0.0]], 
+[[-1.0, -2.0], [7.0, -1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-13.0, -2.0], [21.0, 8.0]], [[21.0, 24.0], [5.0, 0.0]], [[57.0, 48.0], [9.0, 8.0]], [[10.0, 
+16.0], [-19.0, -5.0]], [[9.0, -33.0], [26.0, -13.0]], [[-9.0, 15.0], [-6.0, -18.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[12.0, 16.0], [-28.0, 0.0]], [[20.0, 16.0], [28.0, 16.0]], [[-4.0, 0.0], [44.0, 
+-24.0]], [[-32.0, -8.0], [-12.0, -12.0]], [[-52.0, 12.0], [-16.0, 4.0]], [[20.0, -4.0], [-48.0, 24.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank0_array_rank4_offset0(self):
+      arg0=Data(-6.0,self.functionspace)
+      arg0.setTaggedValue(1,2.0)
+      arg1=numpy.array([[[[-3.0, -1.0, -3.0, 5.0], [1.0, -4.0, -4.0, 3.0], [5.0, 4.0, -4.0, -3.0]], [[0.0, -4.0, 4.0, 1.0], 
+[-4.0, 2.0, 3.0, -4.0], [6.0, 3.0, -5.0, 6.0]]], [[[4.0, 3.0, -5.0, 4.0], [-3.0, -7.0, 2.0, 0.0], [0.0, 1.0, -5.0, 2.0]], 
+[[-4.0, 0.0, 4.0, -1.0], [-3.0, -5.0, 4.0, -4.0], [0.0, 2.0, -7.0, 7.0]]], [[[1.0, 5.0, 7.0, -7.0], [3.0, 6.0, -7.0, 6.0], 
+[-5.0, -6.0, 0.0, 0.0]], [[-2.0, 0.0, -1.0, 0.0], [7.0, -5.0, 7.0, 2.0], [-1.0, -7.0, -5.0, 6.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[18.0, 6.0, 18.0, -30.0], [-6.0, 24.0, 24.0, -18.0], [-30.0, -24.0, 24.0, 18.0]], [[-0.0, 24.0, 
+-24.0, -6.0], [24.0, -12.0, -18.0, 24.0], [-36.0, -18.0, 30.0, -36.0]]], [[[-24.0, -18.0, 30.0, -24.0], [18.0, 42.0, -12.0, 
+-0.0], [-0.0, -6.0, 30.0, -12.0]], [[24.0, -0.0, -24.0, 6.0], [18.0, 30.0, -24.0, 24.0], [-0.0, -12.0, 42.0, -42.0]]], [[[-6.0, 
+-30.0, -42.0, 42.0], [-18.0, -36.0, 42.0, -36.0], [30.0, 36.0, -0.0, -0.0]], [[12.0, -0.0, 6.0, -0.0], [-42.0, 30.0, -42.0, 
+-12.0], [6.0, 42.0, 30.0, -36.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-6.0, -2.0, -6.0, 10.0], [2.0, -8.0, -8.0, 6.0], [10.0, 8.0, -8.0, -6.0]], [[0.0, 
+-8.0, 8.0, 2.0], [-8.0, 4.0, 6.0, -8.0], [12.0, 6.0, -10.0, 12.0]]], [[[8.0, 6.0, -10.0, 8.0], [-6.0, -14.0, 4.0, 0.0], [0.0, 
+2.0, -10.0, 4.0]], [[-8.0, 0.0, 8.0, -2.0], [-6.0, -10.0, 8.0, -8.0], [0.0, 4.0, -14.0, 14.0]]], [[[2.0, 10.0, 14.0, -14.0], 
+[6.0, 12.0, -14.0, 12.0], [-10.0, -12.0, 0.0, 0.0]], [[-4.0, 0.0, -2.0, 0.0], [14.0, -10.0, 14.0, 4.0], [-2.0, -14.0, -10.0, 
+12.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank0_offset0(self):
-      arg0=Data(4.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(0.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-16.0)+(1.-msk_ref)*numpy.array(0.0)
+   def test_generalTensorProduct_taggedData_rank0_constData_rank0_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,6.0)
+      arg1=Data(-2.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(2.0,self.functionspace)
+      ref.setTaggedValue(1,-12.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([7.0, 2.0, 7.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, 7.0, 2.0])+(1.-msk_arg1)*numpy.array([-2.0, 2.0, -5.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(-45.0)
+   def test_generalTensorProduct_taggedData_rank1_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([-7.0, 3.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, -7.0, 1.0]))
+      arg1=Data(numpy.array([0.0, 0.0, 5.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(20.0,self.functionspace)
+      ref.setTaggedValue(1,5.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[-6.0, 7.0, 0.0], [4.0, -4.0, 2.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, -3.0, 0.0], [1.0, 0.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -2.0, -4.0], [6.0, 0.0, 
-5.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-35.0)+(1.-msk_ref)*numpy.array(62.0)
+   def test_generalTensorProduct_taggedData_rank2_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-3.0, 3.0, -5.0], [-5.0, -2.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -4.0, -5.0], [-5.0, -6.0, -2.0]]))
+      arg1=Data(numpy.array([[-6.0, -5.0, 0.0], [-1.0, -3.0, -4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(38.0,self.functionspace)
+      ref.setTaggedValue(1,63.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[2.0, -4.0, 0.0], [7.0, -2.0, 5.0], [0.0, -6.0, 7.0], [0.0, 0.0, -1.0]], [[-4.0, 2.0, 4.0], [1.0, 
-2.0, 3.0], [-4.0, 4.0, -4.0], [-3.0, -3.0, -5.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-1.0, 7.0, 0.0], [5.0, 3.0, -3.0], [7.0, -4.0, -5.0], [-5.0, -5.0, 7.0]], [[2.0, -5.0, 0.0], 
-[1.0, -3.0, 5.0], [0.0, -2.0, 2.0], [6.0, 7.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, 1.0, 0.0], [1.0, -3.0, 5.0], [-3.0, 
--7.0, -4.0], [-2.0, -6.0, -4.0]], [[0.0, 2.0, -1.0], [3.0, 3.0, 0.0], [-4.0, -1.0, 3.0], [-3.0, 1.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-97.0)+(1.-msk_ref)*numpy.array(79.0)
+   def test_generalTensorProduct_taggedData_rank3_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[2.0, 6.0, -4.0], [7.0, -2.0, 0.0], [0.0, 6.0, 5.0], [3.0, 7.0, 7.0]], [[-7.0, 2.0, -3.0], [2.0, 
+7.0, 2.0], [4.0, 5.0, -4.0], [-3.0, 5.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, 0.0, 4.0], [2.0, -2.0, 3.0], [-7.0, 4.0, 0.0], [-2.0, -4.0, 0.0]], [[-2.0, 7.0, 
+-6.0], [-3.0, 1.0, 3.0], [-2.0, 1.0, 7.0], [3.0, -3.0, -3.0]]]))
+      arg1=Data(numpy.array([[[5.0, -5.0, 4.0], [7.0, 7.0, 7.0], [6.0, 1.0, -6.0], [4.0, 6.0, -4.0]], [[6.0, -3.0, 0.0], [-2.0, 
+1.0, 3.0], [2.0, -4.0, 3.0], [0.0, 7.0, 0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-27.0,self.functionspace)
+      ref.setTaggedValue(1,-53.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[-2.0, 5.0], [-5.0, -3.0], [-6.0, 7.0]], [[-2.0, 6.0], [0.0, 2.0], [7.0, 0.0]]], [[[-3.0, 1.0], 
-[-2.0, -6.0], [-1.0, 1.0]], [[3.0, 6.0], [-3.0, 3.0], [3.0, 4.0]]], [[[3.0, -7.0], [-1.0, 1.0], [0.0, 2.0]], [[1.0, -4.0], 
-[1.0, -4.0], [-5.0, 1.0]]], [[[-6.0, 0.0], [6.0, 0.0], [-1.0, -4.0]], [[1.0, -3.0], [6.0, -7.0], [0.0, 
-0.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, -7.0], [2.0, 2.0], [4.0, 0.0]], [[-1.0, -7.0], [0.0, 7.0], [-1.0, 5.0]]], [[[-4.0, 
--1.0], [4.0, 0.0], [2.0, -5.0]], [[4.0, -4.0], [-6.0, -5.0], [2.0, 4.0]]], [[[0.0, -4.0], [-1.0, 2.0], [-6.0, 2.0]], [[-5.0, 
-3.0], [4.0, 0.0], [-4.0, -7.0]]], [[[4.0, -2.0], [1.0, -3.0], [1.0, -1.0]], [[5.0, -5.0], [0.0, -5.0], [0.0, 
-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, 6.0], [-6.0, 7.0], [0.0, 0.0]], [[-4.0, 1.0], [3.0, -2.0], [6.0, 7.0]]], [[[7.0, 
-0.0], [0.0, -7.0], [-1.0, -5.0]], [[-2.0, 5.0], [-7.0, 7.0], [3.0, 7.0]]], [[[7.0, 5.0], [2.0, -2.0], [4.0, -3.0]], [[0.0, 
-3.0], [5.0, 7.0], [-1.0, 6.0]]], [[[3.0, 4.0], [-1.0, -6.0], [0.0, 0.0]], [[6.0, -4.0], [2.0, 0.0], [1.0, -6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-26.0)+(1.-msk_ref)*numpy.array(177.0)
+   def test_generalTensorProduct_taggedData_rank4_constData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-1.0, -7.0], [3.0, -5.0], [4.0, 0.0]], [[5.0, -6.0], [6.0, -5.0], [-2.0, 0.0]]], [[[1.0, 0.0], 
+[5.0, 6.0], [5.0, -7.0]], [[-2.0, 6.0], [6.0, 1.0], [7.0, 5.0]]], [[[4.0, 5.0], [-4.0, 3.0], [-3.0, -5.0]], [[3.0, 4.0], [-1.0, 
+-5.0], [0.0, -7.0]]], [[[-2.0, -4.0], [-5.0, 0.0], [-3.0, 0.0]], [[-6.0, -3.0], [-6.0, -2.0], [-5.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 4.0], [-2.0, 2.0], [7.0, -2.0]], [[-3.0, -5.0], [6.0, 3.0], [0.0, -3.0]]], 
+[[[5.0, 4.0], [-3.0, 3.0], [-5.0, 5.0]], [[1.0, -7.0], [6.0, 5.0], [5.0, -2.0]]], [[[1.0, 5.0], [3.0, 4.0], [-6.0, 0.0]], 
+[[-5.0, 3.0], [2.0, 5.0], [2.0, 5.0]]], [[[6.0, -6.0], [5.0, -2.0], [-4.0, 7.0]], [[-3.0, 5.0], [5.0, 7.0], [5.0, 5.0]]]]))
+      arg1=Data(numpy.array([[[[5.0, -5.0], [4.0, 0.0], [-1.0, -7.0]], [[6.0, -1.0], [-2.0, 3.0], [7.0, -3.0]]], [[[2.0, -6.0], 
+[-1.0, 2.0], [3.0, -2.0]], [[-1.0, 6.0], [2.0, 3.0], [-2.0, -1.0]]], [[[5.0, 0.0], [0.0, 4.0], [0.0, 1.0]], [[0.0, 6.0], [5.0, 
+3.0], [4.0, 7.0]]], [[[7.0, 0.0], [0.0, -1.0], [4.0, -4.0]], [[0.0, 4.0], [-1.0, 7.0], [0.0, 0.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(41.0,self.functionspace)
+      ref.setTaggedValue(1,89.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank1_offset0(self):
-      arg0=Data(6.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 6.0])+(1.-msk_arg1)*numpy.array([-6.0, -3.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([0.0, 36.0])+(1.-msk_ref)*numpy.array([-36.0, -18.0])
+   def test_generalTensorProduct_taggedData_rank0_constData_rank1_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,-7.0)
+      arg1=Data(numpy.array([2.0, -7.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-4.0, 14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-14.0, 49.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([-2.0, -7.0, -1.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, 2.0], [0.0, 2.0], [-2.0, 3.0]])+(1.-msk_arg1)*numpy.array([[7.0, 3.0], [2.0, 5.0], 
-[-3.0, 5.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-4.0, -21.0])+(1.-msk_ref)*numpy.array([-25.0, -46.0])
+   def test_generalTensorProduct_taggedData_rank1_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([-7.0, 3.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([5.0, -2.0, 5.0]))
+      arg1=Data(numpy.array([[1.0, -6.0], [-3.0, -7.0], [3.0, 3.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-28.0, 9.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([26.0, -1.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[2.0, 7.0, 0.0], [4.0, 5.0, 0.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -4.0], [2.0, 2.0], [-6.0, 4.0]], [[-2.0, -2.0], [2.0, 3.0], [-2.0, 
-1.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 1.0], [6.0, 4.0], [-6.0, 2.0]], [[0.0, 7.0], [3.0, 0.0], [-1.0, 5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([16.0, 13.0])+(1.-msk_ref)*numpy.array([63.0, 58.0])
+   def test_generalTensorProduct_taggedData_rank2_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-2.0, 1.0, -5.0], [-3.0, -1.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -1.0, 2.0], [1.0, 5.0, -3.0]]))
+      arg1=Data(numpy.array([[[5.0, 5.0], [0.0, -2.0], [-6.0, -1.0]], [[-4.0, 0.0], [5.0, -3.0], [-7.0, 
+-7.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([13.0, -18.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-5.0, -29.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[-7.0, 3.0, -3.0], [3.0, 5.0, 0.0], [2.0, -1.0, -4.0], [7.0, 3.0, 6.0]], [[3.0, 6.0, 7.0], [-1.0, 
-0.0, 6.0], [4.0, 0.0, 4.0], [0.0, 0.0, -7.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-6.0, 6.0], [3.0, -4.0], [-7.0, 4.0]], [[-7.0, -5.0], [3.0, 3.0], [3.0, 3.0]], [[-3.0, 
--7.0], [-4.0, -4.0], [2.0, -3.0]], [[7.0, 5.0], [-7.0, 2.0], [-5.0, -1.0]]], [[[2.0, 3.0], [-1.0, -7.0], [5.0, -3.0]], [[0.0, 
-2.0], [4.0, 0.0], [5.0, 3.0]], [[1.0, -4.0], [-1.0, -3.0], [5.0, 1.0]], [[0.0, 0.0], [-2.0, -1.0], [-2.0, 
--5.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 7.0], [2.0, -5.0], [-2.0, 7.0]], [[2.0, 1.0], [3.0, 2.0], [-7.0, 5.0]], [[6.0, 
-1.0], [-3.0, 1.0], [1.0, -7.0]], [[-5.0, 0.0], [0.0, 0.0], [-6.0, 0.0]]], [[[-4.0, 1.0], [1.0, -5.0], [0.0, 7.0]], [[-1.0, 
-4.0], [-1.0, 0.0], [-4.0, 3.0]], [[-5.0, -6.0], [3.0, -2.0], [3.0, 4.0]], [[6.0, 3.0], [6.0, -5.0], [-7.0, 5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([157.0, -44.0])+(1.-msk_ref)*numpy.array([-36.0, -50.0])
+   def test_generalTensorProduct_taggedData_rank3_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[0.0, -2.0, -7.0], [0.0, 0.0, -7.0], [-7.0, 1.0, 4.0], [-1.0, 2.0, -3.0]], [[6.0, 1.0, -2.0], 
+[-6.0, 0.0, 5.0], [-3.0, 4.0, 5.0], [-2.0, -1.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, -3.0, -2.0], [0.0, -5.0, 7.0], [-7.0, 6.0, -5.0], [-3.0, -6.0, -1.0]], [[-2.0, 
+-1.0, 7.0], [-1.0, 2.0, 7.0], [5.0, 7.0, -4.0], [-3.0, -5.0, -2.0]]]))
+      arg1=Data(numpy.array([[[[-6.0, 6.0], [-5.0, 6.0], [1.0, 1.0]], [[1.0, 0.0], [6.0, -6.0], [-6.0, 2.0]], [[3.0, 7.0], 
+[-2.0, -6.0], [3.0, 3.0]], [[6.0, 2.0], [7.0, 6.0], [-7.0, 4.0]]], [[[-2.0, -3.0], [-2.0, 0.0], [-3.0, 7.0]], [[5.0, -2.0], 
+[-3.0, -3.0], [-3.0, -1.0]], [[5.0, 1.0], [-3.0, -3.0], [-5.0, 3.0]], [[6.0, -4.0], [-7.0, 6.0], [0.0, 
+7.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-47.0, -52.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-136.0, -168.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank2_offset0(self):
-      arg0=Data(-1.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, 6.0, 6.0, 2.0, 1.0], [4.0, 7.0, 7.0, 2.0, 6.0], [-5.0, 4.0, 3.0, -5.0, -7.0], [5.0, 
--6.0, 4.0, 3.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -2.0, 7.0, 1.0, -5.0], [-2.0, 2.0, -5.0, 2.0, 7.0], [-5.0, 3.0, -2.0, 
--7.0, 5.0], [4.0, 5.0, 3.0, 6.0, 2.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[6.0, -6.0, -6.0, -2.0, -1.0], [-4.0, -7.0, -7.0, -2.0, -6.0], [5.0, -4.0, -3.0, 5.0, 7.0], 
-[-5.0, 6.0, -4.0, -3.0, 1.0]])+(1.-msk_ref)*numpy.array([[4.0, 2.0, -7.0, -1.0, 5.0], [2.0, -2.0, 5.0, -2.0, -7.0], [5.0, -3.0, 
-2.0, 7.0, -5.0], [-4.0, -5.0, -3.0, -6.0, -2.0]])
+   def test_generalTensorProduct_taggedData_rank0_constData_rank2_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=Data(numpy.array([[6.0, -5.0, -2.0, 3.0, -6.0], [0.0, 1.0, 0.0, 0.0, -5.0], [1.0, 5.0, -4.0, 1.0, 4.0], [3.0, 6.0, 
+0.0, -4.0, 6.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-12.0, 10.0, 4.0, -6.0, 12.0], [-0.0, -2.0, -0.0, -0.0, 10.0], [-2.0, -10.0, 8.0, -2.0, -8.0], 
+[-6.0, -12.0, -0.0, 8.0, -12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[42.0, -35.0, -14.0, 21.0, -42.0], [0.0, 7.0, 0.0, 0.0, -35.0], [7.0, 35.0, -28.0, 7.0, 
+28.0], [21.0, 42.0, 0.0, -28.0, 42.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([-5.0, 6.0, -1.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-3.0, -5.0, 3.0, -3.0, 2.0], [-3.0, 2.0, -3.0, -1.0, 5.0], [2.0, 0.0, 5.0, 4.0, 4.0], [-5.0, 
--5.0, 1.0, 4.0, 4.0]], [[4.0, 0.0, 5.0, -5.0, 2.0], [5.0, 3.0, -3.0, 0.0, 4.0], [4.0, 2.0, -5.0, 0.0, 1.0], [3.0, 4.0, 7.0, 
-5.0, 1.0]], [[2.0, -6.0, 5.0, -7.0, 2.0], [-3.0, -5.0, 7.0, 5.0, -6.0], [-5.0, 5.0, 1.0, -6.0, 7.0], [0.0, -4.0, 6.0, 6.0, 
-7.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 3.0, 5.0, -5.0, 0.0], [-7.0, 3.0, 0.0, -4.0, 3.0], [3.0, 1.0, 2.0, 7.0, 0.0], [-3.0, 
-5.0, -6.0, -1.0, 1.0]], [[6.0, 6.0, 0.0, 1.0, 0.0], [-1.0, 2.0, 4.0, -7.0, 2.0], [1.0, 1.0, 4.0, -5.0, 0.0], [0.0, -6.0, -4.0, 
-0.0, -7.0]], [[-7.0, 4.0, -5.0, -3.0, -4.0], [0.0, 7.0, -7.0, -5.0, -2.0], [4.0, 0.0, -5.0, -5.0, 0.0], [5.0, 6.0, 4.0, -5.0, 
-1.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[37.0, 31.0, 10.0, -8.0, 0.0], [48.0, 13.0, -10.0, 0.0, 5.0], [19.0, 7.0, -56.0, -14.0, -21.0], 
-[43.0, 53.0, 31.0, 4.0, -21.0]])+(1.-msk_ref)*numpy.array([[73.0, 17.0, -20.0, 34.0, 4.0], [29.0, -10.0, 31.0, -17.0, -1.0], 
-[-13.0, 1.0, 19.0, -60.0, 0.0], [10.0, -67.0, 2.0, 10.0, -48.0]])
+   def test_generalTensorProduct_taggedData_rank1_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([-7.0, 2.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, -5.0, -1.0]))
+      arg1=Data(numpy.array([[[3.0, -1.0, 0.0, -3.0, 0.0], [-2.0, 3.0, 4.0, -6.0, -2.0], [-2.0, -4.0, -7.0, -3.0, 3.0], [-3.0, 
+1.0, -3.0, -5.0, 5.0]], [[0.0, 0.0, 6.0, -2.0, 1.0], [-2.0, -4.0, 4.0, -1.0, -5.0], [6.0, -2.0, -1.0, -7.0, -1.0], [0.0, 1.0, 
+2.0, 3.0, -6.0]], [[2.0, -2.0, 6.0, -1.0, 3.0], [-2.0, -2.0, 0.0, -1.0, 0.0], [2.0, -6.0, -4.0, 7.0, -4.0], [5.0, -1.0, 2.0, 
+-5.0, -1.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-21.0, 7.0, 12.0, 17.0, 2.0], [10.0, -29.0, -20.0, 40.0, 4.0], [26.0, 24.0, 47.0, 7.0, -23.0], 
+[21.0, -5.0, 25.0, 41.0, -47.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-23.0, 9.0, -36.0, 32.0, -8.0], [26.0, 1.0, -48.0, 48.0, 39.0], [-18.0, 44.0, 58.0, 
+49.0, -12.0], [16.0, -11.0, 9.0, 25.0, -4.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[0.0, 7.0, 6.0], [1.0, -1.0, 7.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-7.0, -2.0, -2.0, -6.0, 2.0], [2.0, 5.0, -3.0, -3.0, 5.0], [3.0, 5.0, 1.0, 0.0, 7.0], 
-[-5.0, -3.0, 0.0, -4.0, 4.0]], [[-6.0, -5.0, 6.0, 5.0, 1.0], [7.0, -5.0, -6.0, -7.0, 0.0], [-3.0, -3.0, 4.0, 3.0, -1.0], [2.0, 
-5.0, -3.0, -4.0, 0.0]], [[6.0, -7.0, -7.0, 5.0, -7.0], [-5.0, -4.0, -4.0, 5.0, -6.0], [6.0, 2.0, 0.0, 4.0, 5.0], [5.0, -2.0, 
--6.0, 7.0, -3.0]]], [[[2.0, 7.0, 0.0, -5.0, -2.0], [-2.0, -3.0, 7.0, -7.0, 1.0], [-3.0, -5.0, -2.0, 6.0, -7.0], [-3.0, 5.0, 
-0.0, 0.0, 1.0]], [[2.0, -6.0, 4.0, 0.0, -7.0], [2.0, 5.0, -7.0, -4.0, 6.0], [-5.0, 0.0, -6.0, 3.0, -1.0], [-5.0, -6.0, 2.0, 
-1.0, -4.0]], [[-2.0, -7.0, -5.0, -5.0, -6.0], [-7.0, 4.0, 3.0, 5.0, 0.0], [0.0, -6.0, 7.0, 4.0, 3.0], [-6.0, 5.0, 1.0, 5.0, 
-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -1.0, -1.0, 5.0, 7.0], [-1.0, -4.0, -5.0, 5.0, 1.0], [2.0, -1.0, 1.0, 3.0, 2.0], 
-[7.0, 7.0, 0.0, 1.0, 0.0]], [[-7.0, 1.0, 2.0, -3.0, 0.0], [1.0, -5.0, -7.0, -3.0, -3.0], [-6.0, 4.0, -2.0, 3.0, 5.0], [-4.0, 
--3.0, -2.0, 0.0, 3.0]], [[2.0, 3.0, 6.0, 5.0, 6.0], [4.0, -5.0, -7.0, 1.0, -5.0], [7.0, 5.0, 0.0, 0.0, 1.0], [-7.0, 5.0, 3.0, 
-3.0, -6.0]]], [[[-3.0, 0.0, 7.0, -1.0, 1.0], [4.0, -1.0, -1.0, 6.0, 1.0], [-4.0, 0.0, 2.0, 0.0, -6.0], [3.0, -4.0, 0.0, -4.0, 
-0.0]], [[-3.0, 4.0, 5.0, 0.0, -2.0], [0.0, 0.0, -3.0, 0.0, -4.0], [-2.0, -3.0, -7.0, 2.0, -1.0], [-7.0, 0.0, -3.0, 1.0, 4.0]], 
-[[-1.0, 7.0, 3.0, 5.0, 0.0], [1.0, 6.0, 0.0, 0.0, -5.0], [2.0, 2.0, -6.0, 3.0, 5.0], [-4.0, 6.0, -6.0, 0.0, -4.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-20.0, -113.0, -39.0, 25.0, -72.0], [-34.0, -39.0, -31.0, 13.0, -41.0], [17.0, -56.0, 81.0, 
-76.0, 38.0], [4.0, 69.0, -52.0, 48.0, 22.0]])+(1.-msk_ref)*numpy.array([[-44.0, 70.0, 73.0, 43.0, 39.0], [42.0, -24.0, -89.0, 
--9.0, -81.0], [12.0, 75.0, -47.0, 40.0, 71.0], [-88.0, 47.0, -35.0, 13.0, -47.0]])
+   def test_generalTensorProduct_taggedData_rank2_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[6.0, 0.0, -2.0], [7.0, 6.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, -4.0, -1.0], [7.0, 1.0, 5.0]]))
+      arg1=Data(numpy.array([[[[1.0, -5.0, -1.0, 3.0, -1.0], [6.0, -5.0, 2.0, 4.0, 5.0], [0.0, -2.0, -7.0, -1.0, 7.0], [6.0, 
+0.0, -2.0, -3.0, 5.0]], [[0.0, -1.0, -2.0, 3.0, 0.0], [-1.0, 4.0, 7.0, 6.0, 1.0], [6.0, -3.0, 6.0, -6.0, -5.0], [4.0, 5.0, 
+-2.0, -7.0, 0.0]], [[7.0, -3.0, -5.0, -1.0, -1.0], [5.0, 0.0, 0.0, -1.0, -2.0], [4.0, 4.0, -3.0, -5.0, -4.0], [5.0, 5.0, 0.0, 
+3.0, -6.0]]], [[[-3.0, 7.0, -3.0, -5.0, -7.0], [6.0, 6.0, 5.0, 0.0, -2.0], [2.0, -7.0, 0.0, 0.0, -7.0], [0.0, 0.0, -3.0, -4.0, 
+2.0]], [[1.0, 5.0, 5.0, -2.0, -6.0], [-5.0, -1.0, -2.0, -3.0, -7.0], [-5.0, 0.0, 4.0, 5.0, 4.0], [3.0, -7.0, -2.0, 1.0, 4.0]], 
+[[6.0, -5.0, 0.0, 0.0, 0.0], [6.0, -3.0, -7.0, 4.0, -3.0], [2.0, -2.0, 2.0, -3.0, 4.0], [2.0, 4.0, 3.0, -5.0, 
+0.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[1.0, 35.0, 13.0, -27.0, -89.0], [62.0, -6.0, 7.0, 24.0, -34.0], [-16.0, -77.0, -4.0, 22.0, 41.0], 
+[52.0, -36.0, -33.0, -66.0, 80.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-1.0, 56.0, 1.0, -60.0, -50.0], [42.0, 30.0, -38.0, -22.0, -58.0], [-9.0, -43.0, 21.0, 
+23.0, -29.0], [-32.0, -12.0, 8.0, -15.0, 4.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank3_offset0(self):
-      arg0=Data(0.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, -5.0], [-6.0, -2.0]], [[-2.0, 3.0], [1.0, 2.0]], [[-7.0, -6.0], [3.0, -7.0]], [[0.0, 
--5.0], [-5.0, 1.0]], [[3.0, 6.0], [-1.0, 5.0]], [[0.0, 7.0], [6.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, 2.0], [3.0, 0.0]], 
-[[7.0, -2.0], [-3.0, -1.0]], [[-3.0, -6.0], [-5.0, 3.0]], [[1.0, -7.0], [-2.0, 0.0]], [[1.0, -2.0], [5.0, 1.0]], [[1.0, 6.0], 
-[-1.0, 1.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -0.0], [-0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, -0.0]], [[0.0, 
--0.0], [-0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [0.0, 0.0]], 
-[[0.0, -0.0], [-0.0, -0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[0.0, -0.0], [-0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[-0.0, 0.0]]])
+   def test_generalTensorProduct_taggedData_rank0_constData_rank3_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=Data(numpy.array([[[-7.0, -6.0], [0.0, -4.0]], [[-4.0, 7.0], [-1.0, 7.0]], [[1.0, 0.0], [-3.0, -4.0]], [[-3.0, 6.0], 
+[-7.0, 7.0]], [[2.0, 0.0], [0.0, -5.0]], [[1.0, 0.0], [4.0, 0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[7.0, 6.0], [-0.0, 4.0]], [[4.0, -7.0], [1.0, -7.0]], [[-1.0, -0.0], [3.0, 4.0]], [[3.0, -6.0], 
+[7.0, -7.0]], [[-2.0, -0.0], [-0.0, 5.0]], [[-1.0, -0.0], [-4.0, -0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [-0.0, -0.0]], 
+[[-0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank4_offset1(self):
-      arg0=Data(numpy.array([-1.0, 5.0, 1.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-4.0, 3.0], [0.0, -7.0]], [[0.0, 5.0], [6.0, -3.0]], [[0.0, 0.0], [-1.0, 2.0]], [[-5.0, 
--2.0], [2.0, 4.0]], [[7.0, -3.0], [2.0, 0.0]], [[7.0, 6.0], [1.0, -7.0]]], [[[1.0, 2.0], [6.0, 7.0]], [[5.0, -2.0], [1.0, 
--5.0]], [[2.0, 2.0], [2.0, 4.0]], [[-5.0, 2.0], [-5.0, 0.0]], [[6.0, -2.0], [3.0, 7.0]], [[5.0, -2.0], [-1.0, 4.0]]], [[[-6.0, 
-5.0], [-6.0, 0.0]], [[7.0, -3.0], [0.0, 0.0]], [[0.0, 7.0], [-4.0, -7.0]], [[-2.0, -6.0], [-4.0, 4.0]], [[4.0, 0.0], [-3.0, 
--6.0]], [[-3.0, -1.0], [-2.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[6.0, -7.0], [-3.0, -6.0]], [[3.0, -2.0], [5.0, 1.0]], 
-[[-5.0, -2.0], [4.0, -7.0]], [[2.0, 1.0], [-5.0, -6.0]], [[4.0, -6.0], [7.0, 5.0]], [[0.0, -4.0], [4.0, 7.0]]], [[[-1.0, -5.0], 
-[-6.0, -3.0]], [[0.0, 7.0], [4.0, 0.0]], [[-2.0, 0.0], [4.0, 0.0]], [[5.0, 7.0], [0.0, 6.0]], [[3.0, 3.0], [-4.0, -7.0]], 
-[[4.0, 5.0], [0.0, -4.0]]], [[[7.0, 0.0], [0.0, -1.0]], [[0.0, -1.0], [-6.0, 4.0]], [[-2.0, 1.0], [-2.0, 0.0]], [[-3.0, -1.0], 
-[-1.0, -5.0]], [[-1.0, 1.0], [-5.0, -6.0]], [[-4.0, -1.0], [-3.0, -6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[3.0, 12.0], [24.0, 42.0]], [[32.0, -18.0], [-1.0, -22.0]], [[10.0, 17.0], [7.0, 11.0]], 
-[[-22.0, 6.0], [-31.0, 0.0]], [[27.0, -7.0], [10.0, 29.0]], [[15.0, -17.0], [-8.0, 22.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, 
--18.0], [-27.0, -10.0]], [[-3.0, 36.0], [9.0, 3.0]], [[-7.0, 3.0], [14.0, 7.0]], [[20.0, 33.0], [4.0, 31.0]], [[10.0, 22.0], 
-[-32.0, -46.0]], [[16.0, 28.0], [-7.0, -33.0]]])
+   def test_generalTensorProduct_taggedData_rank1_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([-3.0, -1.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, -4.0, -2.0]))
+      arg1=Data(numpy.array([[[[-7.0, -7.0], [0.0, 2.0]], [[0.0, -5.0], [-3.0, 3.0]], [[-2.0, -7.0], [7.0, 0.0]], [[1.0, -1.0], 
+[-2.0, -5.0]], [[-3.0, 0.0], [-3.0, -4.0]], [[-6.0, 3.0], [-3.0, 0.0]]], [[[4.0, -4.0], [-3.0, 0.0]], [[0.0, -6.0], [7.0, 
+-1.0]], [[-4.0, 3.0], [-1.0, -3.0]], [[0.0, -3.0], [0.0, -7.0]], [[0.0, 0.0], [7.0, -4.0]], [[4.0, 6.0], [7.0, -1.0]]], 
+[[[-5.0, 7.0], [7.0, -7.0]], [[-2.0, 4.0], [3.0, 2.0]], [[7.0, 0.0], [-5.0, 3.0]], [[6.0, -3.0], [1.0, 0.0]], [[-4.0, 3.0], 
+[-6.0, 7.0]], [[-4.0, 3.0], [-6.0, -1.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-13.0, 67.0], [45.0, -48.0]], [[-12.0, 45.0], [20.0, 4.0]], [[52.0, 18.0], [-50.0, 21.0]], 
+[[33.0, -12.0], [12.0, 22.0]], [[-15.0, 18.0], [-34.0, 58.0]], [[-10.0, 3.0], [-34.0, -5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[1.0, 9.0], [-2.0, 12.0]], [[4.0, 21.0], [-31.0, -3.0]], [[4.0, -5.0], [7.0, 6.0]], 
+[[-13.0, 19.0], [0.0, 33.0]], [[11.0, -6.0], [-13.0, 6.0]], [[-2.0, -33.0], [-13.0, 6.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank0_expandedData_rank4_offset0(self):
-      arg0=Data(5.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, -5.0, 2.0, 5.0], [-4.0, -5.0, 0.0, 1.0], [6.0, 4.0, -2.0, 7.0]], [[-2.0, -2.0, 6.0, 
--2.0], [0.0, -5.0, 7.0, -4.0], [0.0, 1.0, 7.0, 1.0]]], [[[-7.0, -7.0, 6.0, 1.0], [1.0, -4.0, 1.0, 3.0], [3.0, -3.0, -6.0, 
--4.0]], [[-7.0, 7.0, 5.0, -3.0], [-7.0, 2.0, 4.0, 3.0], [3.0, 0.0, 0.0, -7.0]]], [[[0.0, 3.0, 5.0, -6.0], [5.0, 6.0, -3.0, 
--3.0], [-1.0, -1.0, 1.0, 0.0]], [[-3.0, -6.0, -2.0, -1.0], [-5.0, -4.0, 6.0, 3.0], [-1.0, 1.0, -7.0, 
--2.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -6.0, 0.0, 0.0], [-2.0, 0.0, 1.0, 2.0], [-6.0, -6.0, -5.0, 5.0]], [[-2.0, -7.0, 
-5.0, -7.0], [-3.0, 0.0, -5.0, -7.0], [3.0, -5.0, -5.0, -2.0]]], [[[-2.0, 0.0, 5.0, -7.0], [2.0, 3.0, 3.0, -5.0], [-5.0, 7.0, 
--1.0, -5.0]], [[6.0, -3.0, -4.0, 2.0], [-5.0, -4.0, 7.0, -7.0], [-7.0, -1.0, 4.0, 5.0]]], [[[-7.0, 3.0, 5.0, 1.0], [1.0, 5.0, 
--6.0, -5.0], [4.0, -4.0, 0.0, -5.0]], [[5.0, -2.0, -1.0, 0.0], [-6.0, 5.0, -3.0, 0.0], [-2.0, 3.0, -5.0, 2.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-25.0, -25.0, 10.0, 25.0], [-20.0, -25.0, 0.0, 5.0], [30.0, 20.0, -10.0, 35.0]], [[-10.0, 
--10.0, 30.0, -10.0], [0.0, -25.0, 35.0, -20.0], [0.0, 5.0, 35.0, 5.0]]], [[[-35.0, -35.0, 30.0, 5.0], [5.0, -20.0, 5.0, 15.0], 
-[15.0, -15.0, -30.0, -20.0]], [[-35.0, 35.0, 25.0, -15.0], [-35.0, 10.0, 20.0, 15.0], [15.0, 0.0, 0.0, -35.0]]], [[[0.0, 15.0, 
-25.0, -30.0], [25.0, 30.0, -15.0, -15.0], [-5.0, -5.0, 5.0, 0.0]], [[-15.0, -30.0, -10.0, -5.0], [-25.0, -20.0, 30.0, 15.0], 
-[-5.0, 5.0, -35.0, -10.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -30.0, 0.0, 0.0], [-10.0, 0.0, 5.0, 10.0], [-30.0, -30.0, 
--25.0, 25.0]], [[-10.0, -35.0, 25.0, -35.0], [-15.0, 0.0, -25.0, -35.0], [15.0, -25.0, -25.0, -10.0]]], [[[-10.0, 0.0, 25.0, 
--35.0], [10.0, 15.0, 15.0, -25.0], [-25.0, 35.0, -5.0, -25.0]], [[30.0, -15.0, -20.0, 10.0], [-25.0, -20.0, 35.0, -35.0], 
-[-35.0, -5.0, 20.0, 25.0]]], [[[-35.0, 15.0, 25.0, 5.0], [5.0, 25.0, -30.0, -25.0], [20.0, -20.0, 0.0, -25.0]], [[25.0, -10.0, 
--5.0, 0.0], [-30.0, 25.0, -15.0, 0.0], [-10.0, 15.0, -25.0, 10.0]]]])
+   def test_generalTensorProduct_taggedData_rank0_constData_rank4_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,-2.0)
+      arg1=Data(numpy.array([[[[7.0, 2.0, -3.0, -6.0], [0.0, -3.0, 5.0, 0.0], [2.0, 0.0, 2.0, -4.0]], [[-7.0, 1.0, -6.0, -3.0], 
+[0.0, -2.0, -4.0, 3.0], [4.0, -3.0, -6.0, -2.0]]], [[[-2.0, 6.0, 1.0, 7.0], [6.0, -3.0, -5.0, -5.0], [-5.0, -4.0, -2.0, -5.0]], 
+[[-5.0, 2.0, -1.0, 3.0], [7.0, -4.0, 7.0, -6.0], [1.0, -5.0, -4.0, 0.0]]], [[[6.0, 0.0, -5.0, 6.0], [3.0, -2.0, 2.0, 2.0], 
+[7.0, -7.0, -3.0, 7.0]], [[-2.0, 1.0, -4.0, 2.0], [-3.0, 5.0, -4.0, 7.0], [1.0, 4.0, 3.0, 6.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0, -0.0, -0.0], [0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], [[-0.0, 0.0, -0.0, -0.0], 
+[0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, -0.0]]], [[[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]], 
+[[-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0], 
+[0.0, -0.0, -0.0, 0.0]], [[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-14.0, -4.0, 6.0, 12.0], [-0.0, 6.0, -10.0, -0.0], [-4.0, -0.0, -4.0, 8.0]], [[14.0, 
+-2.0, 12.0, 6.0], [-0.0, 4.0, 8.0, -6.0], [-8.0, 6.0, 12.0, 4.0]]], [[[4.0, -12.0, -2.0, -14.0], [-12.0, 6.0, 10.0, 10.0], 
+[10.0, 8.0, 4.0, 10.0]], [[10.0, -4.0, 2.0, -6.0], [-14.0, 8.0, -14.0, 12.0], [-2.0, 10.0, 8.0, -0.0]]], [[[-12.0, -0.0, 10.0, 
+-12.0], [-6.0, 4.0, -4.0, -4.0], [-14.0, 14.0, 6.0, -14.0]], [[4.0, -2.0, 8.0, -4.0], [6.0, -10.0, 8.0, -14.0], [-2.0, -8.0, 
+-6.0, -12.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_float_rank0_offset0(self):
-      arg0=Data(numpy.array([2.0, 2.0]),self.functionspace)
-      arg1=0.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([0.0, 0.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,-5.0)
+      arg1=Data(-7.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(7.0,self.functionspace)
+      ref.setTaggedValue(1,-25.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-7.0, -2.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, -1.0, 0.0]))
+      arg1=Data(numpy.array([1.0, -6.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, -7.0, -4.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-7.0,self.functionspace)
+      ref.setTaggedValue(1,4.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[2.0, -5.0, 1.0], [3.0, 0.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, -6.0, 7.0], [-3.0, -6.0, 1.0]]))
+      arg1=Data(numpy.array([[4.0, 2.0, -2.0], [2.0, 7.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, -3.0, 1.0], [1.0, -6.0, -4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(26.0,self.functionspace)
+      ref.setTaggedValue(1,58.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[0.0, 6.0, 1.0], [-1.0, -1.0, 1.0], [7.0, -2.0, 2.0], [-6.0, 2.0, 0.0]], [[3.0, -2.0, 2.0], [3.0, 
+5.0, 0.0], [1.0, -3.0, 0.0], [-1.0, 2.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 3.0, 2.0], [5.0, 1.0, 0.0], [5.0, -2.0, 2.0], [-6.0, -1.0, 0.0]], [[3.0, -7.0, 
+6.0], [5.0, 5.0, -6.0], [-7.0, 7.0, -1.0], [1.0, 5.0, -6.0]]]))
+      arg1=Data(numpy.array([[[0.0, 3.0, 1.0], [0.0, 3.0, 1.0], [-5.0, 0.0, -2.0], [1.0, 0.0, 2.0]], [[-3.0, 2.0, -6.0], [2.0, 
+4.0, 3.0], [2.0, -3.0, 5.0], [-5.0, 2.0, -4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, -7.0, 6.0], [5.0, -1.0, 2.0], [-3.0, 4.0, -2.0], [-2.0, 1.0, 4.0]], [[0.0, 
+1.0, 4.0], [3.0, 5.0, -1.0], [0.0, -2.0, 5.0], [0.0, 0.0, 4.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(9.0,self.functionspace)
+      ref.setTaggedValue(1,1.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-3.0, 7.0], [-1.0, 7.0], [-7.0, 5.0]], [[-2.0, 0.0], [-6.0, 1.0], [6.0, -7.0]]], [[[5.0, 7.0], 
+[5.0, 6.0], [0.0, 2.0]], [[3.0, 4.0], [4.0, 3.0], [3.0, -1.0]]], [[[-3.0, -5.0], [-3.0, 5.0], [2.0, 5.0]], [[-7.0, 3.0], [0.0, 
+-1.0], [7.0, -7.0]]], [[[1.0, 1.0], [6.0, -4.0], [0.0, 1.0]], [[0.0, -5.0], [6.0, 4.0], [-3.0, 3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 1.0], [-6.0, 4.0], [-5.0, -4.0]], [[-5.0, -4.0], [-4.0, -1.0], [4.0, -2.0]]], 
+[[[3.0, 4.0], [1.0, -1.0], [-1.0, 5.0]], [[-7.0, 3.0], [-4.0, 4.0], [0.0, -7.0]]], [[[-3.0, 3.0], [3.0, 1.0], [-1.0, 0.0]], 
+[[3.0, 0.0], [-3.0, -5.0], [-2.0, 4.0]]], [[[-3.0, -7.0], [1.0, 3.0], [-7.0, 0.0]], [[4.0, 2.0], [-7.0, -1.0], [0.0, 3.0]]]]))
+      arg1=Data(numpy.array([[[[0.0, -5.0], [0.0, 4.0], [7.0, 6.0]], [[-1.0, -3.0], [2.0, 3.0], [7.0, 4.0]]], [[[-3.0, -5.0], 
+[-3.0, -7.0], [-6.0, -5.0]], [[6.0, -6.0], [5.0, -5.0], [-7.0, -3.0]]], [[[0.0, -3.0], [0.0, -3.0], [3.0, 6.0]], [[6.0, -5.0], 
+[-2.0, 1.0], [-5.0, 0.0]]], [[[0.0, 6.0], [5.0, -1.0], [0.0, 0.0]], [[-3.0, 0.0], [4.0, 6.0], [-4.0, 
+1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, -6.0], [4.0, 5.0], [0.0, 0.0]], [[-3.0, 4.0], [-1.0, 4.0], [7.0, 7.0]]], 
+[[[-1.0, -1.0], [6.0, -2.0], [0.0, -4.0]], [[7.0, 7.0], [3.0, -6.0], [-5.0, 2.0]]], [[[0.0, 0.0], [0.0, -3.0], [-5.0, 7.0]], 
+[[1.0, 4.0], [7.0, -1.0], [-2.0, -7.0]]], [[[5.0, -7.0], [-2.0, -1.0], [-2.0, -1.0]], [[-4.0, -6.0], [0.0, -2.0], [6.0, 
+0.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-109.0,self.functionspace)
+      ref.setTaggedValue(1,-100.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg0.setTaggedValue(1,-5.0)
+      arg1=Data(numpy.array([1.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, 4.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([5.0, -20.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-35.0, -20.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank0_offset0(self):
-      arg0=Data(numpy.array([0.0, -1.0]),self.functionspace)
-      arg1=numpy.array(4.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([0.0, -4.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-2.0, -5.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, 7.0, 4.0]))
+      arg1=Data(numpy.array([[6.0, 7.0], [-7.0, 6.0], [7.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, -7.0], [4.0, 3.0], [-1.0, 5.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([65.0, -2.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([0.0, -1.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[-4.0, 1.0], [-4.0, 7.0], [5.0, 0.0]]),self.functionspace)
-      arg1=numpy.array([-2.0, 0.0, 5.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([33.0, -2.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-6.0, 7.0, 5.0], [7.0, 7.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 0.0, 1.0], [-1.0, 7.0, -1.0]]))
+      arg1=Data(numpy.array([[[-4.0, 6.0], [0.0, 5.0], [0.0, 1.0]], [[-4.0, -5.0], [1.0, 2.0], [2.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 1.0], [-4.0, -7.0], [-4.0, 2.0]], [[-6.0, 4.0], [4.0, 5.0], [-3.0, -1.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-7.0, -27.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([33.0, 33.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[[1.0, 6.0], [3.0, -3.0], [3.0, 5.0]], [[-1.0, 0.0], [2.0, -3.0], [-2.0, 
--1.0]]]),self.functionspace)
-      arg1=numpy.array([[6.0, 5.0, -6.0], [-6.0, 4.0, -7.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([31.0, -14.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[0.0, 2.0, 7.0], [6.0, -7.0, 2.0], [2.0, -3.0, -5.0], [5.0, -6.0, -1.0]], [[-1.0, 4.0, -6.0], 
+[1.0, -3.0, 7.0], [-7.0, 6.0, 4.0], [-7.0, -3.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 7.0, 3.0], [-4.0, -4.0, 7.0], [5.0, 3.0, 5.0], [-4.0, 0.0, 7.0]], [[4.0, -4.0, 
+0.0], [-4.0, -4.0, 3.0], [1.0, -3.0, 4.0], [0.0, 4.0, -1.0]]]))
+      arg1=Data(numpy.array([[[[-3.0, 4.0], [6.0, -7.0], [-1.0, 7.0]], [[5.0, 7.0], [3.0, -1.0], [-5.0, 2.0]], [[0.0, -2.0], 
+[-6.0, -4.0], [-4.0, 3.0]], [[1.0, -5.0], [-7.0, 6.0], [-2.0, -1.0]]], [[[-7.0, 2.0], [0.0, 0.0], [1.0, -3.0]], [[2.0, -5.0], 
+[4.0, -4.0], [0.0, 1.0]], [[0.0, 2.0], [-6.0, -6.0], [-5.0, 0.0]], [[-4.0, 1.0], [-1.0, 0.0], [5.0, 5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, -2.0], [4.0, -1.0], [2.0, -3.0]], [[-6.0, 5.0], [-5.0, 1.0], [-1.0, -2.0]], 
+[[5.0, 6.0], [-3.0, 1.0], [5.0, 0.0]], [[3.0, 6.0], [-4.0, 7.0], [-6.0, -1.0]]], [[[7.0, -3.0], [0.0, 2.0], [2.0, 1.0]], [[0.0, 
+-5.0], [-6.0, -5.0], [-4.0, 1.0]], [[-6.0, 5.0], [5.0, 1.0], [1.0, 3.0]], [[4.0, -6.0], [5.0, 3.0], [2.0, 5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([77.0, 14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([97.0, -6.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[3.0, -6.0], [0.0, -5.0], [-3.0, -5.0]], [[0.0, 4.0], [-3.0, 1.0], [-6.0, -7.0]], [[0.0, 5.0], 
-[-4.0, 0.0], [-1.0, -4.0]], [[4.0, -3.0], [7.0, 1.0], [0.0, -7.0]]], [[[-3.0, 0.0], [6.0, -5.0], [0.0, -4.0]], [[6.0, -1.0], 
-[6.0, 2.0], [7.0, -2.0]], [[0.0, -6.0], [5.0, 6.0], [2.0, -6.0]], [[-2.0, -1.0], [-5.0, 0.0], [-4.0, 
-1.0]]]]),self.functionspace)
-      arg1=numpy.array([[[-7.0, 5.0, -7.0], [7.0, 0.0, 0.0], [3.0, 0.0, 0.0], [-4.0, 0.0, -4.0]], [[6.0, 4.0, 0.0], [0.0, -3.0, 
-3.0], [-2.0, 7.0, 1.0], [5.0, 0.0, 1.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([16.0, 147.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg1=Data(numpy.array([[3.0, -6.0, 0.0, 3.0, 0.0], [0.0, -2.0, 0.0, -6.0, 4.0], [-4.0, -5.0, -2.0, -4.0, 6.0], [-4.0, 
+-6.0, 3.0, 3.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -7.0, -7.0, 0.0, 5.0], [5.0, 1.0, -3.0, -2.0, -3.0], [-4.0, 0.0, -5.0, 1.0, 
+6.0], [3.0, 2.0, 3.0, 7.0, -4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[15.0, -30.0, 0.0, 15.0, 0.0], [0.0, -10.0, 0.0, -30.0, 20.0], [-20.0, -25.0, -10.0, -20.0, 30.0], 
+[-20.0, -30.0, 15.0, 15.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-24.0, 28.0, 28.0, -0.0, -20.0], [-20.0, -4.0, 12.0, 8.0, 12.0], [16.0, -0.0, 20.0, 
+-4.0, -24.0], [-12.0, -8.0, -12.0, -28.0, 16.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank1_offset0(self):
-      arg0=Data(numpy.array([-7.0, -3.0]),self.functionspace)
-      arg1=numpy.array([6.0, 1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-42.0, -7.0], [-18.0, -3.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([2.0, 1.0, 5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -3.0, 0.0]))
+      arg1=Data(numpy.array([[[-7.0, 0.0, 0.0, 6.0, 7.0], [-4.0, 0.0, -5.0, -7.0, 0.0], [-4.0, 5.0, -4.0, 0.0, 1.0], [6.0, 0.0, 
+-4.0, -7.0, 2.0]], [[-1.0, 1.0, -2.0, -6.0, 2.0], [-2.0, -4.0, 4.0, 0.0, -5.0], [-5.0, 3.0, -5.0, -6.0, -1.0], [-7.0, -1.0, 
+-5.0, -7.0, 0.0]], [[-4.0, 2.0, -6.0, -7.0, -5.0], [-2.0, 5.0, -3.0, 0.0, 2.0], [0.0, 5.0, 5.0, -4.0, 6.0], [6.0, -2.0, -2.0, 
+-6.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, -2.0, -3.0, 0.0, -5.0], [-6.0, 3.0, 2.0, 0.0, 6.0], [6.0, 0.0, -2.0, -2.0, 
+7.0], [7.0, 6.0, -1.0, 2.0, -1.0]], [[-6.0, -5.0, 1.0, -2.0, 2.0], [-7.0, -7.0, -6.0, 4.0, 0.0], [-6.0, -2.0, 7.0, 0.0, 0.0], 
+[-6.0, -6.0, -6.0, 6.0, -4.0]], [[-1.0, 6.0, 7.0, 4.0, 3.0], [0.0, 4.0, -5.0, 1.0, 3.0], [1.0, -6.0, 0.0, -3.0, -7.0], [6.0, 
+4.0, -5.0, 6.0, -4.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-35.0, 11.0, -32.0, -29.0, -9.0], [-20.0, 21.0, -21.0, -14.0, 5.0], [-13.0, 38.0, 12.0, -26.0, 
+31.0], [35.0, -11.0, -23.0, -51.0, 4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[20.0, 13.0, -6.0, 6.0, -11.0], [15.0, 24.0, 20.0, -12.0, 6.0], [24.0, 6.0, -23.0, 
+-2.0, 7.0], [25.0, 24.0, 17.0, -16.0, 11.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[5.0, 6.0], [-6.0, 5.0], [0.0, 1.0]]),self.functionspace)
-      arg1=numpy.array([[3.0, -7.0], [4.0, 6.0], [1.0, -3.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-9.0, -71.0], [39.0, -15.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[6.0, 3.0, -2.0], [0.0, 2.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 5.0, -7.0], [2.0, 2.0, 4.0]]))
+      arg1=Data(numpy.array([[[[7.0, 3.0, -1.0, 5.0, 0.0], [1.0, -4.0, 2.0, -1.0, -4.0], [-4.0, -2.0, 3.0, -7.0, 4.0], [5.0, 
+-1.0, -1.0, -6.0, 3.0]], [[-7.0, 2.0, 7.0, 0.0, 5.0], [6.0, 0.0, 5.0, -6.0, 1.0], [3.0, 0.0, 3.0, -2.0, -1.0], [4.0, 1.0, -5.0, 
+-4.0, 6.0]], [[7.0, -5.0, 1.0, -7.0, 4.0], [-1.0, 5.0, -5.0, 7.0, 5.0], [-4.0, 3.0, 0.0, 5.0, 5.0], [2.0, -1.0, 3.0, 0.0, 
+3.0]]], [[[5.0, 0.0, 2.0, 4.0, -3.0], [-1.0, 5.0, 5.0, -1.0, 6.0], [2.0, 1.0, 1.0, 5.0, 0.0], [-1.0, 1.0, 4.0, -1.0, -7.0]], 
+[[-1.0, -7.0, -6.0, 1.0, 5.0], [-3.0, 6.0, 7.0, 6.0, 0.0], [-7.0, 1.0, -7.0, 6.0, -2.0], [-7.0, -7.0, 1.0, 0.0, 7.0]], [[0.0, 
+-3.0, 1.0, 6.0, 6.0], [4.0, 0.0, -7.0, 0.0, -7.0], [-6.0, -7.0, 3.0, 6.0, 0.0], [0.0, 6.0, 3.0, 6.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 2.0, -1.0, 5.0, 1.0], [3.0, 6.0, 0.0, -4.0, -3.0], [4.0, -2.0, -3.0, 5.0, 
+0.0], [-1.0, -7.0, 1.0, -3.0, 4.0]], [[-1.0, -2.0, 4.0, -4.0, 7.0], [6.0, -5.0, 4.0, -5.0, 6.0], [7.0, -4.0, -4.0, -2.0, 6.0], 
+[4.0, -7.0, -2.0, 2.0, 0.0]], [[-7.0, -1.0, 4.0, 7.0, -1.0], [3.0, 4.0, -5.0, 7.0, 2.0], [4.0, -6.0, -5.0, 3.0, 7.0], [2.0, 
+0.0, 6.0, -5.0, 6.0]]], [[[3.0, 6.0, -3.0, -7.0, -3.0], [-2.0, 5.0, -6.0, 3.0, 1.0], [2.0, 0.0, -7.0, -2.0, -3.0], [2.0, 6.0, 
+-4.0, 0.0, -7.0]], [[-4.0, -2.0, 2.0, -6.0, 0.0], [-5.0, 5.0, -3.0, -7.0, -1.0], [-2.0, 6.0, -3.0, 0.0, 3.0], [2.0, 1.0, -3.0, 
+0.0, -3.0]], [[-7.0, 2.0, 4.0, -4.0, 4.0], [-3.0, 1.0, 2.0, 0.0, 0.0], [4.0, -7.0, 4.0, 0.0, -6.0], [2.0, -2.0, -2.0, 2.0, 
+0.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[5.0, 14.0, 3.0, 58.0, 29.0], [28.0, -22.0, 37.0, -26.0, -45.0], [-33.0, -30.0, 19.0, -34.0, 7.0], 
+[24.0, -3.0, -19.0, -36.0, 44.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[14.0, 13.0, 6.0, -111.0, 52.0], [-17.0, -29.0, 45.0, -82.0, 16.0], [23.0, 6.0, 11.0, 
+-35.0, -43.0], [22.0, -29.0, -74.0, 53.0, -62.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[[-4.0, 4.0], [-6.0, -2.0], [-7.0, 0.0]], [[-7.0, 0.0], [-4.0, -4.0], [2.0, 
-2.0]]]),self.functionspace)
-      arg1=numpy.array([[[7.0, 1.0], [-6.0, 7.0], [-6.0, 5.0]], [[0.0, 5.0], [-4.0, -4.0], [-1.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[64.0, -96.0], [54.0, 10.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=Data(numpy.array([[[3.0, -2.0], [-4.0, -3.0]], [[-7.0, 0.0], [-7.0, -3.0]], [[6.0, 2.0], [3.0, 0.0]], [[5.0, -3.0], 
+[-2.0, 3.0]], [[-7.0, -3.0], [2.0, -3.0]], [[0.0, -3.0], [2.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, 0.0], [7.0, 0.0]], [[3.0, 0.0], [-5.0, -6.0]], [[5.0, 0.0], [2.0, -1.0]], 
+[[-5.0, 2.0], [4.0, 6.0]], [[-4.0, -3.0], [1.0, -7.0]], [[-2.0, -6.0], [0.0, 7.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-12.0, 8.0], [16.0, 12.0]], [[28.0, -0.0], [28.0, 12.0]], [[-24.0, -8.0], [-12.0, -0.0]], 
+[[-20.0, 12.0], [8.0, -12.0]], [[28.0, 12.0], [-8.0, 12.0]], [[-0.0, 12.0], [-8.0, -20.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, -0.0]], [[0.0, 0.0], [0.0, -0.0]], 
+[[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, -0.0]], [[-0.0, -0.0], [0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[-5.0, -4.0], [-2.0, -1.0], [2.0, 3.0]], [[4.0, -7.0], [0.0, 7.0], [-3.0, -4.0]], [[0.0, -3.0], 
-[-4.0, -6.0], [6.0, 0.0]], [[-1.0, 4.0], [0.0, 3.0], [-4.0, -5.0]]], [[[5.0, -4.0], [-3.0, 4.0], [6.0, 0.0]], [[2.0, 7.0], 
-[-4.0, -6.0], [7.0, -2.0]], [[-7.0, -1.0], [6.0, 4.0], [-3.0, 0.0]], [[6.0, 1.0], [-6.0, -2.0], [2.0, 
-5.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[-4.0, 2.0], [-3.0, -7.0], [7.0, -7.0]], [[-2.0, 6.0], [-3.0, 5.0], [3.0, 7.0]], [[7.0, 0.0], [-1.0, 
--3.0], [0.0, 7.0]], [[-6.0, -4.0], [0.0, -3.0], [-5.0, 7.0]]], [[[7.0, -2.0], [7.0, 7.0], [-7.0, -4.0]], [[-4.0, -5.0], [0.0, 
-4.0], [5.0, -1.0]], [[1.0, -1.0], [-7.0, 3.0], [-4.0, 2.0]], [[-2.0, -3.0], [-4.0, 5.0], [-5.0, 2.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[17.0, -90.0], [-79.0, -110.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([3.0, -4.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 5.0, 6.0]))
+      arg1=Data(numpy.array([[[[-6.0, -5.0], [5.0, -3.0]], [[1.0, -7.0], [-2.0, 0.0]], [[0.0, 0.0], [-5.0, -7.0]], [[0.0, 3.0], 
+[7.0, 4.0]], [[-2.0, 7.0], [-5.0, -2.0]], [[-7.0, 5.0], [7.0, 7.0]]], [[[3.0, 3.0], [7.0, 0.0]], [[1.0, 7.0], [0.0, 5.0]], 
+[[-2.0, 2.0], [-3.0, 0.0]], [[3.0, -5.0], [-7.0, -4.0]], [[1.0, -4.0], [3.0, 0.0]], [[0.0, 0.0], [-5.0, -1.0]]], [[[0.0, -4.0], 
+[-2.0, 6.0]], [[3.0, 5.0], [3.0, -7.0]], [[6.0, 3.0], [-4.0, -1.0]], [[2.0, 0.0], [5.0, -5.0]], [[0.0, 7.0], [2.0, 6.0]], 
+[[-5.0, 6.0], [0.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -3.0], [-7.0, -1.0]], [[1.0, 4.0], [-4.0, -2.0]], [[-7.0, -6.0], [0.0, 0.0]], 
+[[5.0, 4.0], [2.0, -6.0]], [[2.0, 6.0], [-4.0, 2.0]], [[-2.0, -2.0], [4.0, -2.0]]], [[[-5.0, -3.0], [-2.0, -5.0]], [[-2.0, 
+6.0], [0.0, -4.0]], [[5.0, -6.0], [6.0, -2.0]], [[0.0, -3.0], [-1.0, 5.0]], [[-2.0, -6.0], [-4.0, 6.0]], [[-7.0, 2.0], [-5.0, 
+-1.0]]], [[[6.0, 6.0], [7.0, 4.0]], [[2.0, 4.0], [-5.0, 5.0]], [[-3.0, -3.0], [-5.0, -4.0]], [[7.0, -6.0], [-1.0, 4.0]], [[0.0, 
+-1.0], [6.0, -2.0]], [[-3.0, 4.0], [-2.0, 7.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-30.0, -11.0], [-5.0, -33.0]], [[-13.0, -69.0], [-18.0, 8.0]], [[-16.0, -20.0], [13.0, -17.0]], 
+[[-20.0, 29.0], [29.0, 48.0]], [[-10.0, 9.0], [-35.0, -30.0]], [[-1.0, -9.0], [41.0, 21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[11.0, 21.0], [32.0, -1.0]], [[2.0, 54.0], [-30.0, 10.0]], [[7.0, -48.0], [0.0, 
+-34.0]], [[42.0, -51.0], [-11.0, 49.0]], [[-10.0, -36.0], [16.0, 18.0]], [[-53.0, 34.0], [-37.0, 37.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank2_offset0(self):
-      arg0=Data(numpy.array([-3.0, -7.0]),self.functionspace)
-      arg1=numpy.array([[2.0, 7.0, -1.0, 6.0, 5.0], [6.0, -5.0, -2.0, 3.0, 5.0], [0.0, 3.0, -1.0, -2.0, 1.0], [-3.0, -2.0, 
--1.0, 6.0, 6.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-6.0, -21.0, 3.0, -18.0, -15.0], [-18.0, 15.0, 6.0, -9.0, -15.0], [0.0, -9.0, 3.0, 6.0, -3.0], 
-[9.0, 6.0, 3.0, -18.0, -18.0]], [[-14.0, -49.0, 7.0, -42.0, -35.0], [-42.0, 35.0, 14.0, -21.0, -35.0], [0.0, -21.0, 7.0, 14.0, 
--7.0], [21.0, 14.0, 7.0, -42.0, -42.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg1=Data(numpy.array([[[[-5.0, 0.0, -1.0, -6.0], [2.0, 1.0, -2.0, 3.0], [-7.0, 1.0, 0.0, -7.0]], [[-6.0, 6.0, -6.0, 
+0.0], [1.0, 4.0, 2.0, -1.0], [-1.0, -2.0, -7.0, -7.0]]], [[[2.0, 5.0, 3.0, -6.0], [2.0, 5.0, 1.0, -5.0], [6.0, -2.0, -4.0, 
+-2.0]], [[-1.0, -4.0, -1.0, 5.0], [-7.0, -4.0, 0.0, -1.0], [-4.0, 0.0, -5.0, -5.0]]], [[[-6.0, -3.0, 0.0, 0.0], [-3.0, -4.0, 
+-6.0, 6.0], [4.0, 0.0, 3.0, 3.0]], [[-4.0, -2.0, 0.0, 0.0], [-5.0, 7.0, 7.0, -3.0], [1.0, -3.0, -7.0, 
+5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[6.0, 2.0, -3.0, -4.0], [0.0, -7.0, 3.0, -7.0], [2.0, -1.0, 0.0, 6.0]], [[6.0, 3.0, 
+4.0, 7.0], [0.0, -7.0, 6.0, -5.0], [-6.0, 1.0, -1.0, -2.0]]], [[[-2.0, -1.0, -7.0, -2.0], [-4.0, 5.0, 1.0, -7.0], [7.0, -5.0, 
+-6.0, 5.0]], [[6.0, 1.0, 6.0, 0.0], [-7.0, 6.0, -1.0, 6.0], [0.0, -7.0, 6.0, -6.0]]], [[[-5.0, 4.0, -5.0, 5.0], [-5.0, 0.0, 
+2.0, -3.0], [7.0, 0.0, 3.0, -7.0]], [[7.0, 0.0, -7.0, 4.0], [6.0, 1.0, 0.0, -7.0], [3.0, 3.0, -6.0, 6.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[-0.0, 0.0, -0.0, 0.0], 
+[0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, -0.0]], 
+[[-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, -0.0]]], [[[-0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0]], [[-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-24.0, -8.0, 12.0, 16.0], [-0.0, 28.0, -12.0, 28.0], [-8.0, 4.0, -0.0, -24.0]], 
+[[-24.0, -12.0, -16.0, -28.0], [-0.0, 28.0, -24.0, 20.0], [24.0, -4.0, 4.0, 8.0]]], [[[8.0, 4.0, 28.0, 8.0], [16.0, -20.0, 
+-4.0, 28.0], [-28.0, 20.0, 24.0, -20.0]], [[-24.0, -4.0, -24.0, -0.0], [28.0, -24.0, 4.0, -24.0], [-0.0, 28.0, -24.0, 24.0]]], 
+[[[20.0, -16.0, 20.0, -20.0], [20.0, -0.0, -8.0, 12.0], [-28.0, -0.0, -12.0, 28.0]], [[-28.0, -0.0, 28.0, -16.0], [-24.0, -4.0, 
+-0.0, 28.0], [-12.0, -12.0, 24.0, -24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank3_offset1(self):
-      arg0=Data(numpy.array([[-6.0, 5.0], [-3.0, -4.0], [-5.0, 3.0]]),self.functionspace)
-      arg1=numpy.array([[[-4.0, 1.0, 2.0, 2.0, 1.0], [-7.0, 2.0, -2.0, 7.0, -6.0], [3.0, 0.0, -2.0, 0.0, 0.0], [3.0, -2.0, 7.0, 
-1.0, -3.0]], [[-5.0, 0.0, 7.0, 2.0, 2.0], [-7.0, 7.0, -1.0, 3.0, 0.0], [3.0, -2.0, 2.0, -4.0, 7.0], [2.0, 7.0, -4.0, 4.0, 
--4.0]], [[2.0, -1.0, -3.0, -1.0, 5.0], [3.0, -7.0, -6.0, -7.0, 3.0], [-7.0, 0.0, -5.0, -1.0, 2.0], [4.0, 1.0, -2.0, -1.0, 
-3.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[29.0, -1.0, -18.0, -13.0, -37.0], [48.0, 2.0, 45.0, -16.0, 21.0], [8.0, 6.0, 31.0, 17.0, -31.0], 
-[-44.0, -14.0, -20.0, -13.0, 15.0]], [[6.0, 2.0, -27.0, -1.0, 12.0], [2.0, -39.0, -24.0, 2.0, -21.0], [-18.0, 8.0, -33.0, 13.0, 
--22.0], [19.0, -35.0, 45.0, -14.0, 10.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_expandedData_rank0_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=Data(-1.0,self.functionspace)
+      arg1.setTaggedValue(1,-6.0)
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-3.0)+(1.-msk_ref)*numpy.array(-0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[[5.0, -7.0], [-2.0, -3.0], [7.0, 2.0]], [[-4.0, 5.0], [-3.0, -6.0], [5.0, 
--1.0]]]),self.functionspace)
-      arg1=numpy.array([[[[-7.0, 4.0, 0.0, 4.0, 2.0], [-1.0, -5.0, -6.0, -3.0, 1.0], [3.0, -5.0, -6.0, 0.0, 1.0], [4.0, -5.0, 
-1.0, 3.0, -7.0]], [[1.0, 0.0, -5.0, 3.0, -5.0], [4.0, 0.0, 3.0, 4.0, 0.0], [2.0, -2.0, 5.0, 6.0, -7.0], [6.0, -3.0, 1.0, 3.0, 
--7.0]], [[1.0, -3.0, -1.0, 6.0, -3.0], [-1.0, 7.0, 6.0, 4.0, 6.0], [3.0, 0.0, -5.0, 5.0, -2.0], [5.0, 1.0, 6.0, 6.0, 3.0]]], 
-[[[-4.0, -2.0, -6.0, -1.0, -4.0], [3.0, 1.0, -5.0, 6.0, 4.0], [3.0, 7.0, 7.0, -5.0, 1.0], [-4.0, -6.0, 0.0, 0.0, 0.0]], [[2.0, 
--1.0, -6.0, 0.0, 5.0], [7.0, 6.0, -3.0, 3.0, 0.0], [-7.0, 3.0, 0.0, -3.0, -2.0], [1.0, -7.0, 1.0, -4.0, -1.0]], [[-3.0, -5.0, 
--5.0, 2.0, -7.0], [4.0, 5.0, 3.0, -5.0, 6.0], [-3.0, 2.0, 0.0, -1.0, 6.0], [-1.0, -3.0, 0.0, 3.0, 2.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-35.0, -15.0, 20.0, 70.0, -35.0], [-33.0, 27.0, 50.0, -53.0, 61.0], [26.0, -48.0, -103.0, 47.0, 
-37.0], [51.0, 18.0, 42.0, 78.0, 13.0]], [[19.0, -33.0, 24.0, -32.0, -48.0], [-38.0, 13.0, 35.0, 34.0, 19.0], [39.0, 56.0, 52.0, 
--14.0, 21.0], [-61.0, 61.0, -4.0, 3.0, 80.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([0.0, 3.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -5.0, 4.0]))
+      arg1=Data(numpy.array([1.0, 0.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, 5.0, 7.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(2.0)+(1.-msk_ref)*numpy.array(4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_array_rank3_offset0(self):
-      arg0=Data(numpy.array([7.0, 1.0]),self.functionspace)
-      arg1=numpy.array([[[1.0, 0.0], [5.0, 0.0]], [[0.0, 6.0], [-2.0, -1.0]], [[1.0, 2.0], [-6.0, -2.0]], [[-6.0, -5.0], [-5.0, 
-5.0]], [[0.0, 1.0], [3.0, 6.0]], [[2.0, 2.0], [7.0, 7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[7.0, 0.0], [35.0, 0.0]], [[0.0, 42.0], [-14.0, -7.0]], [[7.0, 14.0], [-42.0, -14.0]], [[-42.0, 
--35.0], [-35.0, 35.0]], [[0.0, 7.0], [21.0, 42.0]], [[14.0, 14.0], [49.0, 49.0]]], [[[1.0, 0.0], [5.0, 0.0]], [[0.0, 6.0], 
-[-2.0, -1.0]], [[1.0, 2.0], [-6.0, -2.0]], [[-6.0, -5.0], [-5.0, 5.0]], [[0.0, 1.0], [3.0, 6.0]], [[2.0, 2.0], [7.0, 
-7.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[4.0, 4.0, 2.0], [-3.0, -4.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, 0.0, 5.0], [0.0, -2.0, -3.0]]))
+      arg1=Data(numpy.array([[0.0, 4.0, 0.0], [6.0, -7.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, -7.0, -7.0], [-4.0, 1.0, -7.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(33.0)+(1.-msk_ref)*numpy.array(-4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank4_offset1(self):
-      arg0=Data(numpy.array([[5.0, -7.0], [0.0, -4.0], [5.0, -1.0]]),self.functionspace)
-      arg1=numpy.array([[[[2.0, 2.0], [-6.0, 0.0]], [[-6.0, -5.0], [-1.0, 6.0]], [[2.0, -2.0], [-3.0, 1.0]], [[-1.0, 6.0], 
-[1.0, -7.0]], [[0.0, 0.0], [-5.0, -6.0]], [[3.0, -3.0], [3.0, -7.0]]], [[[-2.0, 5.0], [2.0, -6.0]], [[1.0, 0.0], [-4.0, -4.0]], 
-[[-7.0, -5.0], [1.0, -2.0]], [[-1.0, 3.0], [-6.0, -1.0]], [[0.0, -1.0], [3.0, 5.0]], [[-2.0, 6.0], [-2.0, -7.0]]], [[[-1.0, 
-6.0], [-2.0, 0.0]], [[-2.0, 7.0], [1.0, 3.0]], [[3.0, 6.0], [1.0, -6.0]], [[0.0, -5.0], [-6.0, 7.0]], [[0.0, -5.0], [1.0, 
-5.0]], [[0.0, -5.0], [-7.0, -4.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[5.0, 40.0], [-40.0, 0.0]], [[-40.0, 10.0], [0.0, 45.0]], [[25.0, 20.0], [-10.0, -25.0]], [[-5.0, 
-5.0], [-25.0, 0.0]], [[0.0, -25.0], [-20.0, -5.0]], [[15.0, -40.0], [-20.0, -55.0]]], [[[-5.0, -40.0], [36.0, 24.0]], [[40.0, 
-28.0], [22.0, -29.0]], [[11.0, 28.0], [16.0, 7.0]], [[11.0, -49.0], [23.0, 46.0]], [[0.0, 9.0], [22.0, 17.0]], [[-13.0, 2.0], 
-[-6.0, 81.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-2.0, 7.0, -3.0], [2.0, 0.0, -4.0], [-7.0, 7.0, 5.0], [3.0, -7.0, -3.0]], [[7.0, -7.0, -4.0], 
+[7.0, 1.0, 4.0], [-5.0, 6.0, 3.0], [-6.0, 3.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 0.0, 0.0], [2.0, -2.0, 2.0], [3.0, 3.0, 5.0], [-6.0, 0.0, 5.0]], [[-6.0, -2.0, 
+5.0], [0.0, 7.0, 3.0], [4.0, 1.0, 0.0], [0.0, 1.0, -4.0]]]))
+      arg1=Data(numpy.array([[[-4.0, 2.0, 4.0], [2.0, -7.0, -3.0], [0.0, -1.0, 2.0], [-4.0, 4.0, -6.0]], [[6.0, -1.0, -2.0], 
+[-7.0, 3.0, -6.0], [-3.0, 4.0, -3.0], [6.0, 0.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -5.0, -4.0], [-7.0, 1.0, -5.0], [-2.0, -3.0, -7.0], [5.0, 6.0, -3.0]], [[4.0, 
+4.0, -6.0], [-3.0, 3.0, -3.0], [0.0, 6.0, -6.0], [2.0, 6.0, 7.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-42.0)+(1.-msk_ref)*numpy.array(-145.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([6.0, 3.0]),self.functionspace)
-      arg1=Data(-3.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-18.0, -9.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[3.0, -5.0], [-5.0, 2.0], [2.0, 6.0]], [[6.0, 4.0], [4.0, 0.0], [-7.0, -7.0]]], [[[7.0, 5.0], 
+[2.0, -3.0], [-1.0, 2.0]], [[2.0, -1.0], [0.0, -7.0], [4.0, 7.0]]], [[[-3.0, -2.0], [1.0, 7.0], [7.0, -2.0]], [[-4.0, -6.0], 
+[7.0, -4.0], [0.0, -3.0]]], [[[0.0, -6.0], [0.0, 3.0], [2.0, -1.0]], [[7.0, 4.0], [-2.0, -1.0], [-5.0, 
+-6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 4.0], [-7.0, -2.0], [-5.0, -2.0]], [[2.0, -2.0], [4.0, 5.0], [1.0, -2.0]]], 
+[[[0.0, 4.0], [3.0, 4.0], [3.0, 4.0]], [[7.0, -6.0], [-2.0, 6.0], [5.0, 3.0]]], [[[0.0, 4.0], [-2.0, 1.0], [-1.0, 0.0]], 
+[[-3.0, 0.0], [-5.0, -2.0], [2.0, -4.0]]], [[[-6.0, 0.0], [5.0, 6.0], [4.0, -3.0]], [[-7.0, -2.0], [-3.0, 5.0], [-1.0, 
+-6.0]]]]))
+      arg1=Data(numpy.array([[[[-2.0, -4.0], [5.0, 1.0], [5.0, 1.0]], [[0.0, 0.0], [0.0, 1.0], [-4.0, 0.0]]], [[[3.0, 4.0], 
+[-6.0, 0.0], [-5.0, -7.0]], [[2.0, -7.0], [3.0, 3.0], [-5.0, -3.0]]], [[[4.0, 5.0], [3.0, -6.0], [-1.0, 0.0]], [[-1.0, -1.0], 
+[-1.0, -3.0], [1.0, 0.0]]], [[[1.0, 2.0], [7.0, 6.0], [0.0, -1.0]], [[-7.0, -7.0], [-6.0, -7.0], [-3.0, 
+1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, -6.0], [-3.0, 5.0], [0.0, 2.0]], [[-6.0, 6.0], [2.0, -6.0], [4.0, 3.0]]], 
+[[[-1.0, 0.0], [-3.0, -6.0], [6.0, 4.0]], [[-2.0, -2.0], [0.0, -6.0], [-3.0, -7.0]]], [[[2.0, 2.0], [3.0, 7.0], [3.0, 1.0]], 
+[[0.0, 7.0], [6.0, -4.0], [6.0, 7.0]]], [[[-5.0, 3.0], [3.0, -3.0], [-2.0, -2.0]], [[0.0, -4.0], [4.0, 1.0], [6.0, -5.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-91.0)+(1.-msk_ref)*numpy.array(-85.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=4)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[1.0, 1.0], [3.0, -1.0], [-4.0, -2.0]]),self.functionspace)
-      arg1=Data(numpy.array([7.0, 0.0, -1.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([11.0, 9.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_expandedData_rank1_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg0.setTaggedValue(1,-7.0)
+      arg1=Data(numpy.array([4.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-2.0, -4.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([20.0, 15.0])+(1.-msk_ref)*numpy.array([14.0, 28.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[1.0, 7.0], [3.0, 0.0], [7.0, -5.0]], [[1.0, -1.0], [-2.0, -1.0], [-6.0, 
-7.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[-1.0, 0.0, 6.0], [0.0, -5.0, -5.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([81.0, -67.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-5.0, 1.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, -1.0, -3.0]))
+      arg1=Data(numpy.array([[5.0, 0.0], [-7.0, -2.0], [-1.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 2.0], [0.0, -1.0], [7.0, 7.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-31.0, 3.0])+(1.-msk_ref)*numpy.array([-19.0, -22.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[7.0, 1.0], [-5.0, -7.0], [3.0, -2.0]], [[7.0, 0.0], [-3.0, 0.0], [5.0, -1.0]], [[6.0, 0.0], 
-[0.0, 5.0], [1.0, 7.0]], [[5.0, 1.0], [7.0, 2.0], [-1.0, 7.0]]], [[[-1.0, 2.0], [5.0, -2.0], [4.0, -1.0]], [[4.0, -3.0], [-1.0, 
-7.0], [-5.0, -7.0]], [[-1.0, 0.0], [-4.0, 6.0], [-2.0, 5.0]], [[1.0, -1.0], [-4.0, -1.0], [-6.0, 7.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[1.0, 6.0, -3.0], [4.0, 0.0, -2.0], [5.0, 7.0, 0.0], [1.0, -3.0, -3.0]], [[4.0, 4.0, -1.0], [0.0, 
--1.0, -2.0], [-7.0, -1.0, -5.0], [-7.0, 0.0, -7.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([82.0, -89.0]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[0.0, -6.0, -3.0], [6.0, 4.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 0.0, -7.0], [-5.0, 0.0, -1.0]]))
+      arg1=Data(numpy.array([[[2.0, 7.0], [6.0, -7.0], [0.0, -6.0]], [[4.0, -2.0], [0.0, -4.0], [0.0, 
+0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, 1.0], [0.0, 3.0], [2.0, 3.0]], [[7.0, 5.0], [0.0, 0.0], [5.0, -5.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-12.0, 32.0])+(1.-msk_ref)*numpy.array([-30.0, -47.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([0.0, 5.0]),self.functionspace)
-      arg1=Data(numpy.array([-3.0, 6.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[0.0, 0.0], [-15.0, 30.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-3.0, -2.0, 6.0], [-4.0, 5.0, -6.0], [-6.0, -2.0, 3.0], [-6.0, -5.0, -4.0]], [[3.0, 6.0, -5.0], 
+[2.0, 5.0, -4.0], [-4.0, 5.0, -6.0], [-4.0, 2.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, 0.0, -3.0], [4.0, -2.0, -3.0], [7.0, 1.0, 0.0], [-5.0, 7.0, 4.0]], [[-1.0, 
+-6.0, -4.0], [0.0, -2.0, 5.0], [-4.0, 7.0, 3.0], [6.0, 3.0, -4.0]]]))
+      arg1=Data(numpy.array([[[[-4.0, 0.0], [5.0, -2.0], [-6.0, -2.0]], [[-2.0, 5.0], [5.0, -7.0], [-4.0, 1.0]], [[2.0, -6.0], 
+[0.0, 5.0], [4.0, -7.0]], [[-2.0, -6.0], [-7.0, -7.0], [2.0, -2.0]]], [[[0.0, -1.0], [0.0, 1.0], [6.0, -3.0]], [[5.0, 6.0], 
+[7.0, 7.0], [0.0, 0.0]], [[-3.0, 7.0], [-1.0, 5.0], [1.0, 2.0]], [[7.0, 0.0], [3.0, 6.0], [-1.0, 5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, -1.0], [4.0, -3.0], [6.0, 0.0]], [[0.0, -1.0], [7.0, -6.0], [-3.0, -6.0]], 
+[[4.0, -5.0], [-3.0, -5.0], [1.0, 4.0]], [[1.0, -4.0], [-6.0, 1.0], [5.0, 0.0]]], [[[-2.0, 4.0], [-2.0, 0.0], [0.0, 3.0]], 
+[[0.0, 3.0], [0.0, -4.0], [6.0, -7.0]], [[-7.0, -1.0], [7.0, 1.0], [3.0, -2.0]], [[-3.0, 6.0], [-7.0, 6.0], [-1.0, 6.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([52.0, 97.0])+(1.-msk_ref)*numpy.array([67.0, 4.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[7.0, 4.0], [6.0, -1.0], [-5.0, -4.0]]),self.functionspace)
-      arg1=Data(numpy.array([[3.0, -7.0], [-7.0, 1.0], [6.0, -1.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-51.0, -38.0], [-5.0, -25.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_expandedData_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=Data(numpy.array([[0.0, -7.0, 6.0, 0.0, 7.0], [7.0, 7.0, 3.0, 0.0, -6.0], [0.0, 1.0, 3.0, 0.0, -5.0], [-5.0, -4.0, 
+-4.0, 4.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 0.0, -1.0, 2.0, -4.0], [3.0, 2.0, 2.0, -5.0, 0.0], [1.0, -4.0, -3.0, 1.0, 
+-4.0], [-5.0, 0.0, 3.0, 5.0, 7.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, 
+-0.0, 0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-35.0, 0.0, -7.0, 14.0, -28.0], [21.0, 14.0, 14.0, -35.0, 0.0], [7.0, -28.0, 
+-21.0, 7.0, -28.0], [-35.0, 0.0, 21.0, 35.0, 49.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[5.0, 4.0], [-4.0, 7.0], [-4.0, -7.0]], [[0.0, 6.0], [3.0, -3.0], [-5.0, 
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([7.0, 0.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, 0.0, -3.0]))
+      arg1=Data(numpy.array([[[3.0, 5.0, 6.0, 2.0, 0.0], [4.0, -1.0, -7.0, -6.0, 7.0], [-6.0, 2.0, 1.0, 4.0, -3.0], [-4.0, 5.0, 
+-1.0, -1.0, 2.0]], [[-6.0, -1.0, 4.0, -4.0, -7.0], [-7.0, 3.0, 5.0, 2.0, 4.0], [-2.0, 0.0, 7.0, -3.0, -3.0], [-2.0, 0.0, 1.0, 
+-3.0, 4.0]], [[0.0, 0.0, -6.0, 6.0, -1.0], [-6.0, 5.0, 4.0, 4.0, 0.0], [6.0, 4.0, -7.0, -2.0, 0.0], [2.0, 5.0, -1.0, 7.0, 
 0.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-2.0, 7.0], [2.0, 5.0], [7.0, -7.0]], [[-4.0, -4.0], [6.0, -6.0], [-2.0, 
--2.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-18.0, 35.0], [-85.0, 106.0]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[7.0, 1.0], [-4.0, 2.0], [-5.0, 0.0]], [[-4.0, -7.0], [5.0, 4.0], [2.0, -2.0]], [[7.0, 7.0], 
-[5.0, 0.0], [-1.0, 5.0]], [[-5.0, 7.0], [3.0, 0.0], [4.0, 0.0]]], [[[3.0, -2.0], [7.0, 0.0], [-3.0, 4.0]], [[4.0, -5.0], [-6.0, 
--5.0], [-6.0, 6.0]], [[5.0, 5.0], [-1.0, -7.0], [-6.0, 3.0]], [[-4.0, 0.0], [-3.0, 3.0], [3.0, 7.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[3.0, 1.0], [5.0, 7.0], [-5.0, 3.0]], [[6.0, 5.0], [7.0, 2.0], [-5.0, 5.0]], [[-5.0, 0.0], 
-[-4.0, -7.0], [-1.0, 2.0]], [[-7.0, 2.0], [-3.0, -6.0], [1.0, 5.0]]], [[[4.0, -3.0], [-7.0, -6.0], [5.0, -2.0]], [[7.0, -5.0], 
-[2.0, 4.0], [6.0, 0.0]], [[-3.0, 5.0], [-7.0, 3.0], [-2.0, 0.0]], [[0.0, 7.0], [-5.0, 6.0], [1.0, -2.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[-47.0, -200.0], [-57.0, 13.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 1.0, 1.0, 7.0, 4.0], [6.0, 4.0, 6.0, 1.0, 1.0], [5.0, 0.0, 0.0, -5.0, 1.0], 
+[-2.0, -7.0, 6.0, 0.0, 7.0]], [[1.0, 2.0, 0.0, -1.0, 4.0], [6.0, 7.0, 2.0, -5.0, 4.0], [2.0, -5.0, 0.0, -7.0, 4.0], [-4.0, 2.0, 
+-1.0, 1.0, -4.0]], [[-5.0, 3.0, -1.0, 5.0, -4.0], [0.0, -5.0, -2.0, -7.0, 2.0], [-5.0, -4.0, 6.0, 4.0, 7.0], [-6.0, -3.0, -3.0, 
+5.0, 3.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[21.0, 35.0, 18.0, 38.0, -4.0], [4.0, 13.0, -33.0, -26.0, 49.0], [-18.0, 30.0, -21.0, 20.0, 
+-21.0], [-20.0, 55.0, -11.0, 21.0, 14.0]])+(1.-msk_ref)*numpy.array([[12.0, -12.0, 0.0, -36.0, 0.0], [-18.0, 3.0, -12.0, 18.0, 
+-9.0], [0.0, 12.0, -18.0, 3.0, -24.0], [24.0, 30.0, -9.0, -15.0, -30.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank2_offset0(self):
-      arg0=Data(numpy.array([0.0, -3.0]),self.functionspace)
-      arg1=Data(numpy.array([[3.0, -2.0, 2.0, -7.0, 1.0], [-7.0, 2.0, 2.0, -4.0, -4.0], [3.0, -7.0, -3.0, 1.0, 0.0], [-3.0, 
-6.0, 3.0, 2.0, 6.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[-9.0, 6.0, -6.0, 21.0, -3.0], [21.0, -6.0, -6.0, 12.0, 12.0], [-9.0, 21.0, 9.0, -3.0, 0.0], [9.0, -18.0, -9.0, 
--6.0, -18.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[0.0, 0.0, 0.0], [2.0, -7.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, -2.0, -6.0], [-4.0, 4.0, 0.0]]))
+      arg1=Data(numpy.array([[[[-1.0, 7.0, 5.0, 4.0, -2.0], [1.0, 2.0, 4.0, 2.0, 3.0], [-7.0, 6.0, -7.0, -4.0, 0.0], [0.0, 
+-5.0, 6.0, 3.0, 0.0]], [[2.0, 5.0, -1.0, 2.0, -1.0], [-5.0, 0.0, 2.0, 4.0, 0.0], [-4.0, 3.0, 0.0, -6.0, -3.0], [-4.0, -5.0, 
+-6.0, -3.0, 7.0]], [[-7.0, 3.0, -4.0, -4.0, 3.0], [1.0, -3.0, -2.0, 6.0, -6.0], [7.0, 0.0, 1.0, -1.0, -4.0], [-3.0, -3.0, -4.0, 
+7.0, 0.0]]], [[[4.0, -5.0, 4.0, 0.0, 7.0], [-4.0, 1.0, -2.0, -2.0, 4.0], [5.0, 0.0, 0.0, 4.0, -3.0], [3.0, 6.0, 7.0, -7.0, 
+-5.0]], [[-3.0, -4.0, -5.0, -3.0, 0.0], [7.0, 4.0, 1.0, -7.0, -4.0], [-6.0, 3.0, -6.0, 3.0, 4.0], [-7.0, 7.0, 2.0, -3.0, 0.0]], 
+[[-2.0, 6.0, 0.0, -6.0, -6.0], [0.0, -7.0, 0.0, 3.0, -5.0], [4.0, 4.0, -3.0, -2.0, -6.0], [-4.0, 3.0, 5.0, 7.0, 
+4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, 2.0, 2.0, -6.0, 5.0], [4.0, 0.0, -1.0, 4.0, 1.0], [-4.0, 6.0, 4.0, -6.0, 0.0], 
+[-4.0, 7.0, 0.0, 7.0, 0.0]], [[-3.0, 5.0, -7.0, 3.0, -1.0], [4.0, 2.0, 0.0, 7.0, -5.0], [0.0, -4.0, 6.0, -1.0, -5.0], [6.0, 
+2.0, -5.0, -6.0, -4.0]], [[2.0, -7.0, 0.0, -6.0, -2.0], [-5.0, -3.0, -3.0, 2.0, 4.0], [2.0, 4.0, 7.0, -4.0, 7.0], [-1.0, 2.0, 
+-6.0, -3.0, 6.0]]], [[[1.0, 0.0, -1.0, -4.0, 0.0], [-5.0, -4.0, 7.0, -6.0, 7.0], [-6.0, -4.0, 7.0, -7.0, 4.0], [-3.0, -2.0, 
+0.0, 1.0, -2.0]], [[-1.0, -4.0, 2.0, 1.0, 4.0], [-3.0, -1.0, -3.0, 5.0, -6.0], [-2.0, 3.0, 2.0, -7.0, 0.0], [-1.0, -3.0, 1.0, 
+1.0, 7.0]], [[-4.0, 2.0, -1.0, -2.0, -1.0], [-3.0, 4.0, 1.0, 3.0, -2.0], [3.0, -4.0, -1.0, -6.0, 1.0], [-1.0, 6.0, 0.0, 6.0, 
+-7.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[15.0, 60.0, 43.0, -21.0, -28.0], [-57.0, -75.0, -11.0, 66.0, 1.0], [80.0, 7.0, 21.0, -27.0, 
+-76.0], [27.0, -16.0, 35.0, 56.0, 18.0]])+(1.-msk_ref)*numpy.array([[-6.0, 24.0, 34.0, 26.0, 50.0], [46.0, 26.0, -26.0, 34.0, 
+-62.0], [-12.0, 36.0, -58.0, 2.0, -48.0], [-14.0, 8.0, 50.0, 58.0, 8.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([[-5.0, -4.0], [0.0, -2.0], [4.0, -4.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[2.0, -6.0, 6.0, -4.0, 0.0], [6.0, 3.0, -4.0, 2.0, -2.0], [-1.0, 5.0, 4.0, 0.0, -7.0], [3.0, 
--5.0, -1.0, -3.0, -4.0]], [[-5.0, -3.0, 2.0, -4.0, -3.0], [-5.0, 0.0, 1.0, -6.0, -6.0], [-5.0, 4.0, -5.0, -4.0, 5.0], [-7.0, 
-1.0, -5.0, -4.0, 0.0]], [[2.0, 0.0, -5.0, -2.0, 6.0], [3.0, 0.0, 2.0, 2.0, 6.0], [-1.0, 6.0, 5.0, 1.0, 0.0], [-1.0, 6.0, -1.0, 
-0.0, -2.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-2.0, 30.0, -50.0, 12.0, 24.0], [-18.0, -15.0, 28.0, -2.0, 34.0], [1.0, -1.0, 0.0, 4.0, 35.0], 
-[-19.0, 49.0, 1.0, 15.0, 12.0]], [[-6.0, 30.0, -8.0, 32.0, -18.0], [-26.0, -12.0, 6.0, -4.0, -4.0], [18.0, -52.0, -26.0, 4.0, 
-18.0], [6.0, -6.0, 18.0, 20.0, 24.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_expandedData_rank3_offset0(self):
+      arg0=Data(5.0,self.functionspace)
+      arg0.setTaggedValue(1,-6.0)
+      arg1=Data(numpy.array([[[-3.0, 0.0], [0.0, 7.0]], [[0.0, 0.0], [3.0, 5.0]], [[0.0, 6.0], [6.0, -7.0]], [[-6.0, -7.0], 
+[6.0, 3.0]], [[-3.0, 1.0], [0.0, 0.0]], [[-1.0, 1.0], [-6.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 0.0], [-4.0, -3.0]], [[0.0, 2.0], [6.0, -4.0]], [[0.0, -4.0], [-7.0, 3.0]], 
+[[-1.0, -6.0], [-7.0, -1.0]], [[1.0, 6.0], [0.0, 6.0]], [[-1.0, 4.0], [5.0, 7.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-15.0, 0.0], [0.0, 35.0]], [[0.0, 0.0], [15.0, 25.0]], [[0.0, 30.0], [30.0, -35.0]], [[-30.0, 
+-35.0], [30.0, 15.0]], [[-15.0, 5.0], [0.0, 0.0]], [[-5.0, 5.0], [-30.0, -10.0]]])+(1.-msk_ref)*numpy.array([[[-36.0, -0.0], 
+[24.0, 18.0]], [[-0.0, -12.0], [-36.0, 24.0]], [[-0.0, 24.0], [42.0, -18.0]], [[6.0, 36.0], [42.0, 6.0]], [[-6.0, -36.0], 
+[-0.0, -36.0]], [[6.0, -24.0], [-30.0, -42.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[5.0, 3.0], [3.0, 5.0], [0.0, 5.0]], [[-4.0, 7.0], [3.0, 3.0], [4.0, 1.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-4.0, -5.0, -3.0, 1.0, -1.0], [-6.0, 0.0, -5.0, -7.0, -4.0], [7.0, -2.0, -5.0, -6.0, 4.0], 
-[7.0, -4.0, 4.0, 7.0, 1.0]], [[-7.0, 5.0, 3.0, 2.0, 2.0], [-7.0, -2.0, -4.0, -6.0, -7.0], [0.0, -3.0, 3.0, 3.0, -6.0], [0.0, 
--6.0, 0.0, -7.0, 0.0]], [[-7.0, -1.0, 4.0, 5.0, 7.0], [2.0, -6.0, -3.0, 5.0, -6.0], [7.0, -6.0, 0.0, 1.0, -6.0], [-1.0, 1.0, 
-5.0, -5.0, 6.0]]], [[[0.0, 7.0, 6.0, -1.0, 3.0], [3.0, 2.0, 2.0, 1.0, 1.0], [7.0, 0.0, 0.0, -1.0, 2.0], [-3.0, 4.0, -5.0, 6.0, 
-4.0]], [[7.0, 7.0, 5.0, 0.0, 0.0], [7.0, 0.0, 3.0, 6.0, 0.0], [0.0, 2.0, 5.0, 7.0, -6.0], [6.0, -3.0, 7.0, 0.0, -6.0]], [[0.0, 
--1.0, -6.0, -3.0, 4.0], [5.0, -3.0, -7.0, 6.0, -3.0], [-3.0, 4.0, 2.0, 4.0, -4.0], [-7.0, -7.0, -5.0, 6.0, 
--6.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-20.0, -21.0, -39.0, 3.0, 5.0], [-22.0, -26.0, -64.0, -15.0, -57.0], [-5.0, 3.0, 7.0, 20.0, 
--40.0], [37.0, -91.0, 41.0, 14.0, -53.0]], [[-61.0, 74.0, 77.0, 28.0, 67.0], [4.0, -29.0, -34.0, 5.0, -73.0], [102.0, -41.0, 
-17.0, 20.0, -56.0], [6.0, -25.0, 18.0, 9.0, 37.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([-7.0, -6.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([7.0, 0.0, 7.0]))
+      arg1=Data(numpy.array([[[[-6.0, 4.0], [7.0, -4.0]], [[0.0, -5.0], [6.0, -6.0]], [[7.0, -6.0], [2.0, -7.0]], [[-3.0, 3.0], 
+[-6.0, 5.0]], [[1.0, -3.0], [0.0, 6.0]], [[-5.0, -4.0], [3.0, -3.0]]], [[[-3.0, -3.0], [0.0, -7.0]], [[-5.0, 1.0], [0.0, 0.0]], 
+[[-7.0, -5.0], [6.0, -5.0]], [[-3.0, -6.0], [6.0, 1.0]], [[7.0, -3.0], [0.0, 6.0]], [[-2.0, -7.0], [-7.0, -7.0]]], [[[1.0, 
+-6.0], [2.0, -5.0]], [[5.0, -7.0], [5.0, -6.0]], [[2.0, 1.0], [1.0, 0.0]], [[0.0, 1.0], [3.0, 1.0]], [[-5.0, 5.0], [6.0, 4.0]], 
+[[-7.0, 6.0], [0.0, -2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, 0.0], [-7.0, 2.0]], [[-4.0, 4.0], [-5.0, -6.0]], [[2.0, 7.0], [-2.0, -4.0]], 
+[[-7.0, -2.0], [0.0, 1.0]], [[4.0, -5.0], [4.0, 7.0]], [[-7.0, -4.0], [-5.0, 2.0]]], [[[-7.0, 2.0], [-7.0, -3.0]], [[7.0, 
+-1.0], [-5.0, -2.0]], [[1.0, 0.0], [0.0, -4.0]], [[-6.0, 7.0], [-4.0, 1.0]], [[7.0, 4.0], [-4.0, -2.0]], [[-7.0, 1.0], [-1.0, 
+0.0]]], [[[-2.0, 5.0], [0.0, 2.0]], [[4.0, 4.0], [-4.0, -6.0]], [[6.0, 3.0], [-5.0, -4.0]], [[5.0, 0.0], [3.0, 0.0]], [[-4.0, 
+-5.0], [5.0, 6.0]], [[7.0, -1.0], [0.0, -6.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[64.0, -34.0], [-41.0, 50.0]], [[50.0, 1.0], [-22.0, 18.0]], [[1.0, 76.0], [-46.0, 79.0]], 
+[[39.0, 19.0], [18.0, -37.0]], [[-69.0, 59.0], [24.0, -62.0]], [[19.0, 94.0], [21.0, 55.0]]])+(1.-msk_ref)*numpy.array([[[14.0, 
+35.0], [-49.0, 28.0]], [[0.0, 56.0], [-63.0, -84.0]], [[56.0, 70.0], [-49.0, -56.0]], [[-14.0, -14.0], [21.0, 7.0]], [[0.0, 
+-70.0], [63.0, 91.0]], [[0.0, -35.0], [-35.0, -28.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_constData_rank3_offset0(self):
-      arg0=Data(numpy.array([2.0, -6.0]),self.functionspace)
-      arg1=Data(numpy.array([[[3.0, -2.0], [-6.0, -2.0]], [[-5.0, 6.0], [7.0, 5.0]], [[0.0, -4.0], [-1.0, 7.0]], [[7.0, -4.0], 
-[-7.0, 4.0]], [[0.0, -5.0], [7.0, -5.0]], [[7.0, -4.0], [-4.0, 6.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[6.0, -4.0], [-12.0, -4.0]], [[-10.0, 12.0], [14.0, 10.0]], [[0.0, -8.0], [-2.0, 14.0]], [[14.0, 
--8.0], [-14.0, 8.0]], [[0.0, -10.0], [14.0, -10.0]], [[14.0, -8.0], [-8.0, 12.0]]], [[[-18.0, 12.0], [36.0, 12.0]], [[30.0, 
--36.0], [-42.0, -30.0]], [[0.0, 24.0], [6.0, -42.0]], [[-42.0, 24.0], [42.0, -24.0]], [[0.0, 30.0], [-42.0, 30.0]], [[-42.0, 
-24.0], [24.0, -36.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank0_expandedData_rank4_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg1=Data(numpy.array([[[[3.0, 3.0, 1.0, 6.0], [0.0, 0.0, -5.0, -7.0], [3.0, -7.0, -5.0, -5.0]], [[1.0, 3.0, -1.0, -7.0], 
+[-5.0, 7.0, -2.0, -4.0], [4.0, -4.0, 6.0, -3.0]]], [[[0.0, 7.0, 0.0, 2.0], [7.0, 3.0, -7.0, 4.0], [-6.0, 7.0, 0.0, 2.0]], 
+[[-5.0, 4.0, -6.0, 5.0], [1.0, -3.0, -3.0, -7.0], [-3.0, -2.0, -7.0, 6.0]]], [[[-3.0, 7.0, -4.0, 6.0], [-6.0, -2.0, 7.0, -3.0], 
+[0.0, -3.0, 0.0, 1.0]], [[3.0, 1.0, -7.0, 3.0], [5.0, -5.0, 6.0, -2.0], [2.0, -2.0, 4.0, -4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 0.0, -4.0, -5.0], [-7.0, 6.0, -4.0, 2.0], [-1.0, 0.0, 2.0, -2.0]], [[-4.0, 
+0.0, -5.0, 0.0], [3.0, 3.0, 1.0, 5.0], [5.0, 1.0, 1.0, -5.0]]], [[[-5.0, -6.0, -1.0, 6.0], [-3.0, -7.0, 3.0, 5.0], [-3.0, -3.0, 
+7.0, 0.0]], [[0.0, -4.0, 0.0, 5.0], [7.0, 4.0, 1.0, -5.0], [1.0, 4.0, 1.0, 0.0]]], [[[7.0, 4.0, 6.0, -4.0], [-7.0, -2.0, -7.0, 
+-7.0], [5.0, 3.0, -4.0, 6.0]], [[2.0, -1.0, -2.0, -3.0], [-1.0, 4.0, 4.0, 6.0], [0.0, 7.0, 4.0, -2.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[3.0, 3.0, 1.0, 6.0], [0.0, 0.0, -5.0, -7.0], [3.0, -7.0, -5.0, -5.0]], [[1.0, 3.0, -1.0, 
+-7.0], [-5.0, 7.0, -2.0, -4.0], [4.0, -4.0, 6.0, -3.0]]], [[[0.0, 7.0, 0.0, 2.0], [7.0, 3.0, -7.0, 4.0], [-6.0, 7.0, 0.0, 
+2.0]], [[-5.0, 4.0, -6.0, 5.0], [1.0, -3.0, -3.0, -7.0], [-3.0, -2.0, -7.0, 6.0]]], [[[-3.0, 7.0, -4.0, 6.0], [-6.0, -2.0, 7.0, 
+-3.0], [0.0, -3.0, 0.0, 1.0]], [[3.0, 1.0, -7.0, 3.0], [5.0, -5.0, 6.0, -2.0], [2.0, -2.0, 4.0, 
+-4.0]]]])+(1.-msk_ref)*numpy.array([[[[16.0, -0.0, 16.0, 20.0], [28.0, -24.0, 16.0, -8.0], [4.0, -0.0, -8.0, 8.0]], [[16.0, 
+-0.0, 20.0, -0.0], [-12.0, -12.0, -4.0, -20.0], [-20.0, -4.0, -4.0, 20.0]]], [[[20.0, 24.0, 4.0, -24.0], [12.0, 28.0, -12.0, 
+-20.0], [12.0, 12.0, -28.0, -0.0]], [[-0.0, 16.0, -0.0, -20.0], [-28.0, -16.0, -4.0, 20.0], [-4.0, -16.0, -4.0, -0.0]]], 
+[[[-28.0, -16.0, -24.0, 16.0], [28.0, 8.0, 28.0, 28.0], [-20.0, -12.0, 16.0, -24.0]], [[-8.0, 4.0, 8.0, 12.0], [4.0, -16.0, 
+-16.0, -24.0], [-0.0, -28.0, -16.0, 8.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank4_offset1(self):
-      arg0=Data(numpy.array([[4.0, 2.0], [5.0, -2.0], [-4.0, -7.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[[3.0, 6.0], [-1.0, -6.0]], [[3.0, -6.0], [-4.0, 3.0]], [[2.0, 0.0], [3.0, -6.0]], [[-5.0, 4.0], 
-[-2.0, -2.0]], [[7.0, -6.0], [-3.0, -2.0]], [[-5.0, 6.0], [4.0, 4.0]]], [[[-7.0, 2.0], [5.0, 3.0]], [[4.0, -6.0], [-6.0, 4.0]], 
-[[1.0, -3.0], [4.0, 5.0]], [[5.0, -3.0], [5.0, -1.0]], [[7.0, 4.0], [-4.0, 3.0]], [[4.0, 4.0], [-1.0, 7.0]]], [[[1.0, 7.0], 
-[2.0, -6.0]], [[-4.0, -6.0], [1.0, 3.0]], [[3.0, -4.0], [-7.0, -4.0]], [[-6.0, 7.0], [0.0, -6.0]], [[-6.0, 0.0], [-1.0, 5.0]], 
-[[0.0, -3.0], [-2.0, 4.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-27.0, 6.0], [13.0, 15.0]], [[48.0, -30.0], [-50.0, 20.0]], [[1.0, 1.0], [60.0, 17.0]], [[29.0, 
--27.0], [17.0, 11.0]], [[87.0, -4.0], [-28.0, -13.0]], [[0.0, 56.0], [19.0, 35.0]]], [[[13.0, -41.0], [-26.0, 24.0]], [[26.0, 
-42.0], [-3.0, -23.0]], [[-19.0, 34.0], [47.0, 6.0]], [[22.0, -35.0], [-14.0, 40.0]], [[42.0, -20.0], [9.0, -45.0]], [[-18.0, 
-25.0], [24.0, -34.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_float_rank0_offset0(self):
+      arg0=Data(numpy.array([7.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, -5.0]))
+      arg1=-7.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-49.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-0.0, 35.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([0.0, 4.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(3.0)+(1-msk_arg1)*(-3.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([0.0, 12.0])+(1.-msk_ref)*numpy.array([-0.0, -12.0])
+   def test_generalTensorProduct_taggedData_rank1_array_rank0_offset0(self):
+      arg0=Data(numpy.array([-4.0, 3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, 0.0]))
+      arg1=numpy.array(2.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-8.0, 6.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-6.0, 0.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[-2.0, -3.0], [1.0, 0.0], [0.0, 0.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([1.0, -4.0, -5.0])+(1.-msk_arg1)*numpy.array([-3.0, -1.0, 1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-6.0, -3.0])+(1.-msk_ref)*numpy.array([5.0, 9.0])
+   def test_generalTensorProduct_taggedData_rank2_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[6.0, 2.0, -3.0], [-6.0, 1.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, -7.0, 7.0], [6.0, 6.0, 3.0]]))
+      arg1=numpy.array([-2.0, 2.0, 1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-11.0, 10.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-13.0, 3.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[-4.0, 0.0], [2.0, 6.0], [-6.0, -5.0]], [[-5.0, 0.0], [-5.0, 2.0], [-4.0, 
--7.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, -2.0, -2.0], [0.0, 5.0, 6.0]])+(1.-msk_arg1)*numpy.array([[1.0, -2.0, 1.0], [3.0, 0.0, 
-3.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-61.0, -34.0])+(1.-msk_ref)*numpy.array([-41.0, -38.0])
+   def test_generalTensorProduct_taggedData_rank3_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[2.0, 7.0, 1.0], [0.0, -3.0, 6.0]], [[7.0, 7.0, 4.0], [7.0, -6.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-7.0, 2.0, 2.0], [3.0, 6.0, -7.0]], [[3.0, 0.0, 4.0], [-2.0, 1.0, 4.0]]]))
+      arg1=numpy.array([[2.0, 6.0, -1.0], [7.0, -2.0, 0.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([51.0, 113.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([5.0, -14.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[-4.0, -4.0], [0.0, 5.0], [6.0, -2.0]], [[0.0, 0.0], [1.0, 3.0], [7.0, -4.0]], [[-4.0, -2.0], 
-[-3.0, 6.0], [-7.0, -5.0]], [[6.0, -5.0], [7.0, 3.0], [-6.0, 7.0]]], [[[-6.0, 4.0], [7.0, 4.0], [0.0, 0.0]], [[7.0, 1.0], [0.0, 
-1.0], [3.0, 2.0]], [[-1.0, 7.0], [-4.0, 7.0], [4.0, 1.0]], [[4.0, 2.0], [0.0, 1.0], [5.0, 3.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, 4.0, 4.0], [-4.0, 7.0, -5.0], [-4.0, -4.0, 6.0], [-4.0, 0.0, -7.0]], [[-4.0, 7.0, 
--1.0], [-1.0, 5.0, -4.0], [-2.0, 1.0, -6.0], [-3.0, 0.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 5.0, -1.0], [-3.0, 0.0, 
--6.0], [7.0, -1.0, 2.0], [-5.0, 7.0, 5.0]], [[4.0, -4.0, 4.0], [3.0, 1.0, 0.0], [-4.0, 3.0, 3.0], [-2.0, 2.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([23.0, -40.0])+(1.-msk_ref)*numpy.array([-115.0, 114.0])
+   def test_generalTensorProduct_taggedData_rank4_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[2.0, 0.0, -7.0], [4.0, -7.0, 7.0], [6.0, 6.0, 3.0], [-4.0, 0.0, -3.0]], [[6.0, -6.0, 3.0], 
+[3.0, -7.0, -2.0], [2.0, -1.0, 7.0], [-6.0, 1.0, 0.0]]], [[[-1.0, -5.0, 4.0], [3.0, 4.0, 0.0], [7.0, -4.0, -3.0], [-4.0, -7.0, 
+1.0]], [[1.0, 2.0, -5.0], [3.0, -7.0, 5.0], [-4.0, 0.0, 1.0], [-3.0, -5.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, -3.0, 0.0], [7.0, -6.0, -3.0], [0.0, -6.0, -1.0], [6.0, -7.0, -2.0]], [[3.0, 
+0.0, -6.0], [-2.0, -5.0, 0.0], [-4.0, 1.0, 2.0], [6.0, 1.0, 6.0]]], [[[-6.0, 0.0, -6.0], [-1.0, -2.0, -5.0], [2.0, -1.0, 7.0], 
+[1.0, 2.0, -3.0]], [[0.0, 0.0, 5.0], [-7.0, 0.0, 5.0], [6.0, -5.0, -6.0], [4.0, -1.0, 1.0]]]]))
+      arg1=numpy.array([[[3.0, -6.0, 4.0], [-4.0, -1.0, 3.0], [-7.0, -2.0, 0.0], [-5.0, 0.0, -6.0]], [[-5.0, -1.0, -6.0], 
+[-3.0, 0.0, 3.0], [7.0, 0.0, 4.0], [-5.0, 1.0, -7.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-10.0, -20.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-89.0, -54.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([1.0, 3.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, -1.0])+(1.-msk_arg1)*numpy.array([-7.0, -6.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, -1.0], [0.0, -3.0]])+(1.-msk_ref)*numpy.array([[-7.0, -6.0], [-21.0, -18.0]])
+   def test_generalTensorProduct_taggedData_rank1_array_rank1_offset0(self):
+      arg0=Data(numpy.array([-3.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 3.0]))
+      arg1=numpy.array([7.0, 5.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-21.0, -15.0], [28.0, 20.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, -25.0], [21.0, 15.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[-4.0, -7.0], [4.0, 3.0], [5.0, 1.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, 1.0], [6.0, -5.0], [-3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[6.0, -3.0], [0.0, -3.0], 
-[5.0, 0.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-3.0, -44.0], [-6.0, -26.0]])+(1.-msk_ref)*numpy.array([[1.0, 0.0], [-37.0, 12.0]])
+   def test_generalTensorProduct_taggedData_rank2_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[-4.0, -1.0, -1.0], [-4.0, -4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, 6.0, 2.0], [0.0, 1.0, 3.0]]))
+      arg1=numpy.array([[-2.0, 7.0], [-1.0, -5.0], [-5.0, -1.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[14.0, -22.0], [12.0, -8.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-22.0, -11.0], [-16.0, -8.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[7.0, 1.0], [-2.0, 0.0], [-1.0, -4.0]], [[6.0, 4.0], [0.0, -1.0], [-4.0, 
-0.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -5.0], [-3.0, 6.0], [4.0, 6.0]], [[-3.0, -3.0], [2.0, -1.0], [2.0, 
--5.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 3.0], [4.0, -3.0], [0.0, -6.0]], [[1.0, 0.0], [-4.0, 0.0], [-5.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, -51.0], [-30.0, -40.0]])+(1.-msk_ref)*numpy.array([[39.0, 33.0], [11.0, 27.0]])
+   def test_generalTensorProduct_taggedData_rank3_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 2.0, 5.0], [1.0, 1.0, -7.0]], [[7.0, -1.0, 4.0], [-2.0, -7.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, -3.0, 0.0], [5.0, -6.0, -7.0]], [[2.0, -2.0, 2.0], [-5.0, 7.0, 7.0]]]))
+      arg1=numpy.array([[[6.0, -2.0], [-7.0, 3.0], [3.0, 7.0]], [[-2.0, 1.0], [-6.0, 4.0], [-2.0, -2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[7.0, 60.0], [97.0, -29.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[67.0, -16.0], [-14.0, 13.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[-4.0, 3.0], [-5.0, 3.0], [2.0, -3.0]], [[0.0, 0.0], [0.0, 4.0], [3.0, -5.0]], [[-5.0, 2.0], 
-[-7.0, -7.0], [-6.0, 2.0]], [[0.0, 1.0], [5.0, 5.0], [-3.0, -1.0]]], [[[0.0, -6.0], [6.0, 4.0], [-5.0, 5.0]], [[7.0, 5.0], 
-[-5.0, 7.0], [7.0, 5.0]], [[1.0, 1.0], [1.0, 2.0], [-3.0, 6.0]], [[6.0, -6.0], [0.0, -6.0], [-3.0, -5.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -5.0], [-7.0, 2.0], [2.0, -7.0]], [[0.0, -6.0], [4.0, -1.0], [-2.0, -6.0]], [[4.0, 
-0.0], [-7.0, 2.0], [7.0, -2.0]], [[5.0, 3.0], [-6.0, 0.0], [-6.0, -3.0]]], [[[4.0, 2.0], [2.0, 5.0], [7.0, 6.0]], [[2.0, 7.0], 
-[1.0, -3.0], [3.0, -5.0]], [[7.0, -1.0], [3.0, 7.0], [3.0, 6.0]], [[7.0, 0.0], [-4.0, 3.0], [-6.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, 4.0], [3.0, 2.0], [2.0, -3.0]], [[3.0, 2.0], [4.0, -2.0], [5.0, 3.0]], [[1.0, 
--6.0], [-2.0, 0.0], [-2.0, -7.0]], [[-2.0, -6.0], [3.0, -1.0], [-3.0, 7.0]]], [[[-7.0, 6.0], [5.0, 2.0], [-1.0, -3.0]], [[6.0, 
-0.0], [0.0, -7.0], [4.0, 0.0]], [[-1.0, 3.0], [-2.0, -5.0], [0.0, -6.0]], [[2.0, 6.0], [6.0, -4.0], [-1.0, 5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[76.0, 2.0], [145.0, 84.0]])+(1.-msk_ref)*numpy.array([[190.0, 122.0], [63.0, -212.0]])
+   def test_generalTensorProduct_taggedData_rank4_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[5.0, 2.0, 1.0], [-5.0, 2.0, 5.0], [-5.0, -5.0, 2.0], [-3.0, -5.0, -6.0]], [[0.0, 0.0, -5.0], 
+[2.0, 7.0, 4.0], [1.0, 2.0, 4.0], [6.0, -4.0, -7.0]]], [[[4.0, 0.0, 5.0], [7.0, -2.0, -1.0], [6.0, 0.0, 0.0], [5.0, -2.0, 
+3.0]], [[0.0, 0.0, -2.0], [-3.0, -5.0, -1.0], [0.0, -2.0, -7.0], [0.0, -1.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 4.0, -6.0], [3.0, 1.0, 2.0], [-7.0, -3.0, 5.0], [1.0, -1.0, 5.0]], [[2.0, 5.0, 
+-5.0], [4.0, 1.0, 5.0], [0.0, -3.0, 6.0], [-3.0, 1.0, 0.0]]], [[[-3.0, -5.0, 0.0], [4.0, 0.0, 7.0], [1.0, 6.0, -3.0], [-7.0, 
+-6.0, 5.0]], [[-2.0, 0.0, 2.0], [5.0, 6.0, 7.0], [-1.0, 4.0, -1.0], [-2.0, -7.0, -3.0]]]]))
+      arg1=numpy.array([[[[2.0, -6.0], [2.0, 2.0], [5.0, 4.0]], [[-1.0, 4.0], [-1.0, -7.0], [-1.0, 5.0]], [[7.0, 7.0], [6.0, 
+2.0], [7.0, 0.0]], [[-7.0, -7.0], [-5.0, -3.0], [-2.0, 2.0]]], [[[0.0, 3.0], [7.0, -1.0], [1.0, -6.0]], [[-5.0, -1.0], [1.0, 
+4.0], [0.0, -6.0]], [[6.0, 4.0], [-7.0, 0.0], [-4.0, 1.0]], [[7.0, -3.0], [4.0, 0.0], [-6.0, -2.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[60.0, -16.0], [104.0, 52.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-71.0, -64.0], [-7.0, 121.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank2_offset0(self):
-      arg0=Data(numpy.array([1.0, 0.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, 2.0, -5.0, 6.0, 5.0], [-1.0, 7.0, 4.0, 6.0, 5.0], [-3.0, 1.0, -4.0, 3.0, 0.0], [7.0, 
-3.0, -6.0, -7.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -3.0, 5.0, -6.0, 6.0], [5.0, -4.0, -6.0, -7.0, 3.0], [6.0, 3.0, 
--7.0, 7.0, -3.0], [-2.0, -1.0, -7.0, 1.0, 6.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-7.0, 2.0, -5.0, 6.0, 5.0], [-1.0, 7.0, 4.0, 6.0, 5.0], [-3.0, 1.0, -4.0, 3.0, 0.0], [7.0, 
-3.0, -6.0, -7.0, -6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, -3.0, 5.0, -6.0, 6.0], [5.0, -4.0, -6.0, -7.0, 3.0], [6.0, 3.0, -7.0, 7.0, -3.0], 
-[-2.0, -1.0, -7.0, 1.0, 6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]]])
+   def test_generalTensorProduct_taggedData_rank1_array_rank2_offset0(self):
+      arg0=Data(numpy.array([6.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, -1.0]))
+      arg1=numpy.array([[0.0, 6.0, -4.0, 6.0, 6.0], [-3.0, 7.0, -7.0, -3.0, -5.0], [-7.0, -5.0, -7.0, 3.0, -7.0], [3.0, 0.0, 
+7.0, -7.0, 5.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 36.0, -24.0, 36.0, 36.0], [-18.0, 42.0, -42.0, -18.0, -30.0], [-42.0, -30.0, -42.0, 18.0, 
+-42.0], [18.0, 0.0, 42.0, -42.0, 30.0]], [[0.0, -6.0, 4.0, -6.0, -6.0], [3.0, -7.0, 7.0, 3.0, 5.0], [7.0, 5.0, 7.0, -3.0, 7.0], 
+[-3.0, 0.0, -7.0, 7.0, -5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 24.0, -16.0, 24.0, 24.0], [-12.0, 28.0, -28.0, -12.0, -20.0], [-28.0, -20.0, 
+-28.0, 12.0, -28.0], [12.0, 0.0, 28.0, -28.0, 20.0]], [[0.0, -6.0, 4.0, -6.0, -6.0], [3.0, -7.0, 7.0, 3.0, 5.0], [7.0, 5.0, 
+7.0, -3.0, 7.0], [-3.0, 0.0, -7.0, 7.0, -5.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([[-5.0, 6.0], [1.0, -5.0], [0.0, 2.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, 0.0, -7.0, 0.0, -7.0], [7.0, -2.0, -2.0, -2.0, 0.0], [6.0, -1.0, 0.0, -6.0, 4.0], 
-[-5.0, 6.0, 2.0, -5.0, 2.0]], [[-6.0, -1.0, -5.0, -5.0, 0.0], [0.0, -3.0, 4.0, -3.0, 2.0], [-3.0, -5.0, 6.0, -4.0, 5.0], [6.0, 
--4.0, -4.0, -7.0, 1.0]], [[2.0, -4.0, -4.0, -2.0, 0.0], [2.0, 0.0, -5.0, 0.0, 7.0], [4.0, 2.0, 7.0, -2.0, -4.0], [6.0, 7.0, 
-7.0, 1.0, -1.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, 1.0, -7.0, 0.0, -7.0], [0.0, -1.0, -3.0, -3.0, 6.0], [2.0, 6.0, 0.0, 0.0, 
-7.0], [7.0, 0.0, 0.0, 5.0, 0.0]], [[-4.0, -4.0, 5.0, -4.0, -7.0], [3.0, 7.0, -7.0, 0.0, 5.0], [-2.0, 4.0, -4.0, -6.0, 5.0], 
-[-6.0, -3.0, 3.0, 0.0, 0.0]], [[-4.0, -5.0, 5.0, 5.0, -6.0], [-7.0, 1.0, 0.0, -6.0, 7.0], [-5.0, -1.0, 5.0, -7.0, 5.0], [-4.0, 
-6.0, -5.0, -7.0, -5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, -1.0, 30.0, -5.0, 35.0], [-35.0, 7.0, 14.0, 7.0, 2.0], [-33.0, 0.0, 6.0, 26.0, -15.0], 
-[31.0, -34.0, -14.0, 18.0, -9.0]], [[34.0, -3.0, -25.0, 21.0, -42.0], [46.0, 3.0, -42.0, 3.0, 4.0], [59.0, 23.0, -16.0, -20.0, 
--9.0], [-48.0, 70.0, 46.0, 7.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[16.0, -9.0, 40.0, -4.0, 28.0], [3.0, 12.0, 8.0, 15.0, 
--25.0], [-12.0, -26.0, -4.0, -6.0, -30.0], [-41.0, -3.0, 3.0, -25.0, 0.0]], [[-12.0, 16.0, -57.0, 30.0, -19.0], [-29.0, -39.0, 
-17.0, -30.0, 25.0], [12.0, 14.0, 30.0, 16.0, 27.0], [64.0, 27.0, -25.0, 16.0, -10.0]]])
+   def test_generalTensorProduct_taggedData_rank2_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[-1.0, 0.0, -5.0], [1.0, 4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 5.0, 5.0], [-5.0, -7.0, -2.0]]))
+      arg1=numpy.array([[[0.0, -2.0, 4.0, 3.0, 7.0], [-2.0, 5.0, 0.0, 0.0, 6.0], [7.0, 3.0, -2.0, -1.0, 7.0], [-4.0, -2.0, 
+-7.0, 4.0, -1.0]], [[-3.0, 2.0, 4.0, 7.0, 0.0], [-6.0, -6.0, 2.0, -5.0, 0.0], [-4.0, 1.0, 0.0, -7.0, 0.0], [-4.0, 7.0, 4.0, 
+-7.0, -2.0]], [[-7.0, -3.0, 4.0, 0.0, 5.0], [0.0, -4.0, 6.0, -1.0, -4.0], [-1.0, -1.0, 0.0, -6.0, 5.0], [5.0, -6.0, 0.0, 0.0, 
+-2.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[35.0, 17.0, -24.0, -3.0, -32.0], [2.0, 15.0, -30.0, 5.0, 14.0], [-2.0, 2.0, 2.0, 31.0, -32.0], 
+[-21.0, 32.0, 7.0, -4.0, 11.0]], [[-12.0, 6.0, 20.0, 31.0, 7.0], [-26.0, -19.0, 8.0, -20.0, 6.0], [-9.0, 7.0, -2.0, -29.0, 
+7.0], [-20.0, 26.0, 9.0, -24.0, -9.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-50.0, 7.0, 16.0, 17.0, -17.0], [-18.0, -80.0, 40.0, -30.0, -56.0], [-67.0, -18.0, 
+12.0, -59.0, -17.0], [29.0, 17.0, 62.0, -59.0, -14.0]], [[35.0, 2.0, -56.0, -64.0, -45.0], [52.0, 25.0, -26.0, 37.0, -22.0], 
+[-5.0, -20.0, 10.0, 66.0, -45.0], [38.0, -27.0, 7.0, 29.0, 23.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[0.0, -6.0], [0.0, -7.0], [4.0, 3.0]], [[-2.0, -5.0], [-3.0, 1.0], [-6.0, 
-0.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, -1.0, -6.0, 1.0], [-5.0, 0.0, -7.0, -2.0, -4.0], [6.0, 5.0, 0.0, 0.0, -6.0], 
-[-4.0, -3.0, 6.0, 0.0, -4.0]], [[-6.0, 2.0, -7.0, 2.0, 0.0], [6.0, -5.0, -1.0, 3.0, -2.0], [6.0, 6.0, -5.0, -4.0, -3.0], [6.0, 
--5.0, 0.0, 3.0, 5.0]], [[3.0, -6.0, -3.0, 0.0, -1.0], [-2.0, -3.0, 5.0, -7.0, 2.0], [5.0, -4.0, 1.0, 0.0, -1.0], [5.0, -4.0, 
-5.0, 3.0, -2.0]]], [[[6.0, -5.0, -5.0, -6.0, 0.0], [-6.0, 3.0, 6.0, -5.0, 6.0], [-5.0, 7.0, 2.0, 5.0, -2.0], [1.0, -3.0, -2.0, 
-4.0, -7.0]], [[7.0, 5.0, 1.0, -4.0, -3.0], [-5.0, 5.0, 0.0, -6.0, 0.0], [0.0, 0.0, -6.0, -6.0, 2.0], [-2.0, -5.0, -5.0, 1.0, 
-2.0]], [[2.0, -6.0, -6.0, 1.0, 6.0], [7.0, 3.0, -4.0, -4.0, -1.0], [-6.0, -4.0, 4.0, -2.0, -7.0], [-1.0, 1.0, 3.0, -5.0, 
--5.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 3.0, 3.0, 1.0, -4.0], [3.0, 6.0, 5.0, 0.0, 2.0], [2.0, -4.0, -3.0, -6.0, -2.0], 
-[-1.0, 4.0, -4.0, 0.0, 0.0]], [[3.0, 7.0, 0.0, 4.0, 0.0], [6.0, -1.0, -3.0, -6.0, 7.0], [1.0, 0.0, -6.0, -7.0, 4.0], [5.0, 5.0, 
-3.0, -5.0, -5.0]], [[3.0, 1.0, 1.0, 2.0, -7.0], [6.0, 1.0, -5.0, 5.0, 4.0], [6.0, -5.0, -4.0, 3.0, -4.0], [5.0, 3.0, -1.0, 1.0, 
-0.0]]], [[[-2.0, -6.0, 2.0, 2.0, 5.0], [-2.0, 0.0, 0.0, -4.0, 5.0], [5.0, -7.0, 6.0, -3.0, -2.0], [3.0, 4.0, 3.0, 2.0, 7.0]], 
-[[-7.0, -6.0, 3.0, 4.0, -3.0], [-6.0, 3.0, -5.0, 6.0, 4.0], [6.0, -1.0, 3.0, 0.0, -2.0], [-6.0, 0.0, 6.0, 6.0, 6.0]], [[4.0, 
--4.0, -7.0, 3.0, 0.0], [-1.0, -6.0, -7.0, 5.0, 6.0], [-7.0, 4.0, 0.0, 4.0, -6.0], [-1.0, -5.0, -7.0, 3.0, -7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-33.0, 7.0, 31.0, 18.0, -31.0], [-23.0, -51.0, 32.0, 24.0, 2.0], [66.0, -6.0, -6.0, 20.0, 
-36.0], [30.0, -1.0, 21.0, 31.0, 30.0]], [[28.0, -2.0, 72.0, 48.0, -12.0], [7.0, 16.0, 34.0, -11.0, 14.0], [-38.0, -119.0, 22.0, 
--3.0, 66.0], [-10.0, 51.0, -16.0, -31.0, 20.0]]])+(1.-msk_ref)*numpy.array([[[13.0, 58.0, 33.0, -26.0, -29.0], [52.0, 31.0, 
-37.0, -20.0, -42.0], [38.0, -27.0, -37.0, -6.0, 30.0], [38.0, 34.0, 14.0, -36.0, 10.0]], [[21.0, -40.0, -22.0, -34.0, -25.0], 
-[-38.0, -23.0, -29.0, 83.0, -70.0], [-20.0, 43.0, 21.0, 109.0, -20.0], [-35.0, -70.0, -9.0, 34.0, 6.0]]])
+   def test_generalTensorProduct_taggedData_rank3_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, -2.0, -4.0], [-3.0, 6.0, 2.0]], [[5.0, 7.0, -6.0], [4.0, 6.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, -2.0, 1.0], [5.0, 6.0, 6.0]], [[6.0, -7.0, 2.0], [-5.0, -3.0, 4.0]]]))
+      arg1=numpy.array([[[[-4.0, 7.0, -2.0, 7.0, 0.0], [-1.0, 5.0, -1.0, 0.0, 4.0], [-7.0, -3.0, -6.0, 5.0, 6.0], [7.0, -1.0, 
+-4.0, -3.0, 6.0]], [[1.0, 1.0, -5.0, -2.0, 4.0], [0.0, -2.0, -5.0, 5.0, -3.0], [2.0, 0.0, -6.0, 5.0, -2.0], [1.0, 6.0, 5.0, 
+-3.0, 1.0]], [[-7.0, 3.0, 5.0, -4.0, 4.0], [0.0, -1.0, 7.0, 2.0, -1.0], [0.0, -1.0, 4.0, -1.0, 3.0], [-6.0, 5.0, -4.0, 3.0, 
+-2.0]]], [[[-6.0, -6.0, 6.0, 1.0, -3.0], [1.0, 3.0, 6.0, 2.0, -6.0], [4.0, -2.0, -2.0, -6.0, -3.0], [-2.0, -5.0, 1.0, 5.0, 
+6.0]], [[-4.0, -5.0, 4.0, -3.0, 3.0], [4.0, -2.0, 5.0, 0.0, -3.0], [0.0, 2.0, 4.0, 1.0, 3.0], [-3.0, 4.0, 5.0, 2.0, -6.0]], 
+[[4.0, 5.0, -6.0, 1.0, 2.0], [2.0, 0.0, -7.0, 0.0, -6.0], [5.0, -2.0, 1.0, -4.0, 3.0], [-6.0, -7.0, 3.0, 1.0, -1.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[36.0, -30.0, -12.0, -13.0, 7.0], [27.0, -23.0, -18.0, -24.0, -10.0], [8.0, 24.0, 40.0, 0.0, 
+13.0], [-16.0, -5.0, 47.0, -1.0, -62.0]], [[-43.0, -60.0, 9.0, 25.0, -2.0], [11.0, 17.0, 14.0, 31.0, -1.0], [-35.0, 7.0, -86.0, 
+72.0, -14.0], [88.0, 53.0, 55.0, -28.0, 43.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-59.0, 6.0, 23.0, 28.0, 11.0], [36.0, 31.0, 30.0, 2.0, -59.0], [11.0, -26.0, 6.0, 
+-34.0, 58.0], [-37.0, -55.0, 19.0, 37.0, 14.0]], [[13.0, 106.0, -33.0, 56.0, -6.0], [-15.0, 33.0, -30.0, -41.0, 58.0], [-56.0, 
+-24.0, 16.0, 4.0, 74.0], [18.0, -53.0, -75.0, -18.0, 9.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank1_array_rank3_offset0(self):
+      arg0=Data(numpy.array([0.0, 7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -7.0]))
+      arg1=numpy.array([[[6.0, -6.0], [1.0, 7.0]], [[-5.0, 5.0], [7.0, -5.0]], [[0.0, 5.0], [-3.0, -7.0]], [[0.0, 4.0], [4.0, 
+0.0]], [[4.0, -1.0], [6.0, -1.0]], [[7.0, -3.0], [-2.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[42.0, -42.0], [7.0, 49.0]], [[-35.0, 35.0], [49.0, -35.0]], 
+[[0.0, 35.0], [-21.0, -49.0]], [[0.0, 28.0], [28.0, 0.0]], [[28.0, -7.0], [42.0, -7.0]], [[49.0, -21.0], [-14.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[6.0, -6.0], [1.0, 7.0]], [[-5.0, 5.0], [7.0, -5.0]], [[0.0, 5.0], [-3.0, -7.0]], 
+[[0.0, 4.0], [4.0, 0.0]], [[4.0, -1.0], [6.0, -1.0]], [[7.0, -3.0], [-2.0, 0.0]]], [[[-42.0, 42.0], [-7.0, -49.0]], [[35.0, 
+-35.0], [-49.0, 35.0]], [[0.0, -35.0], [21.0, 49.0]], [[0.0, -28.0], [-28.0, 0.0]], [[-28.0, 7.0], [-42.0, 7.0]], [[-49.0, 
+21.0], [14.0, 0.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_array_rank4_offset1(self):
+      arg0=Data(numpy.array([[-5.0, 5.0, 1.0], [-7.0, 3.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, -7.0, 6.0], [7.0, -3.0, -6.0]]))
+      arg1=numpy.array([[[[5.0, -6.0], [4.0, 7.0]], [[0.0, 5.0], [4.0, 4.0]], [[-2.0, 2.0], [-3.0, 2.0]], [[0.0, 0.0], [5.0, 
+0.0]], [[3.0, 2.0], [1.0, 3.0]], [[-1.0, -3.0], [6.0, -4.0]]], [[[-4.0, -5.0], [-4.0, -1.0]], [[3.0, 4.0], [-2.0, 5.0]], [[5.0, 
+-5.0], [5.0, 5.0]], [[1.0, -2.0], [3.0, -6.0]], [[-1.0, 0.0], [-4.0, 0.0]], [[-7.0, 5.0], [-2.0, 3.0]]], [[[-5.0, 2.0], [-2.0, 
+1.0]], [[5.0, 0.0], [-6.0, 5.0]], [[7.0, 0.0], [2.0, 1.0]], [[-3.0, 6.0], [-3.0, 6.0]], [[-4.0, -5.0], [-6.0, -7.0]], [[7.0, 
+-6.0], [0.0, 5.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-50.0, 7.0], [-42.0, -39.0]], [[20.0, -5.0], [-36.0, 10.0]], [[42.0, -35.0], [42.0, 16.0]], 
+[[2.0, -4.0], [-13.0, -24.0]], [[-24.0, -15.0], [-31.0, -22.0]], [[-23.0, 34.0], [-40.0, 40.0]]], [[[-57.0, 31.0], [-44.0, 
+-50.0]], [[19.0, -23.0], [-46.0, -3.0]], [[43.0, -29.0], [40.0, 3.0]], [[-3.0, 6.0], [-32.0, -6.0]], [[-32.0, -24.0], [-31.0, 
+-35.0]], [[0.0, 24.0], [-48.0, 47.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-17.0, 65.0], [4.0, -8.0]], [[9.0, -43.0], [-34.0, -17.0]], [[13.0, 29.0], [-14.0, 
+-35.0]], [[-25.0, 50.0], [-54.0, 78.0]], [[-26.0, -36.0], [-11.0, -51.0]], [[94.0, -62.0], [-4.0, 21.0]]], [[[77.0, -39.0], 
+[52.0, 46.0]], [[-39.0, 23.0], [70.0, -17.0]], [[-71.0, 29.0], [-48.0, -7.0]], [[15.0, -30.0], [44.0, -18.0]], [[48.0, 44.0], 
+[55.0, 63.0]], [[-28.0, 0.0], [48.0, -67.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank1_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([7.0, 2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 4.0]))
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([0.0, 0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([0.0, 0.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[5.0, -5.0, -6.0], [-2.0, 2.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 3.0, -2.0], [7.0, 1.0, 7.0]]))
+      arg1=Data(numpy.array([6.0, 5.0, -6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([41.0, 34.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-9.0, 5.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank3_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[5.0, 0.0, -1.0], [-5.0, -4.0, 7.0]], [[3.0, -7.0, -3.0], [-1.0, 2.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, 5.0, 7.0], [0.0, -1.0, 4.0]], [[-5.0, -6.0, 0.0], [7.0, 0.0, -1.0]]]))
+      arg1=Data(numpy.array([[-6.0, 6.0, 4.0], [-1.0, 0.0, 0.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-29.0, -71.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([16.0, -13.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[5.0, -7.0, 6.0], [-1.0, 6.0, -3.0], [-1.0, 6.0, 7.0], [3.0, -3.0, 7.0]], [[-3.0, -6.0, 4.0], 
+[-3.0, 4.0, 0.0], [-2.0, 0.0, 4.0], [3.0, 0.0, -5.0]]], [[[-3.0, 2.0, -3.0], [0.0, 2.0, 0.0], [3.0, -4.0, 6.0], [0.0, 5.0, 
+3.0]], [[-1.0, -5.0, 1.0], [0.0, -5.0, 0.0], [-3.0, 0.0, 6.0], [-2.0, 3.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 2.0, -1.0], [-7.0, 7.0, -2.0], [1.0, 0.0, -1.0], [-2.0, 7.0, -3.0]], [[-1.0, 
+-7.0, -1.0], [1.0, -5.0, 6.0], [-3.0, 3.0, 7.0], [1.0, 3.0, 7.0]]], [[[3.0, 7.0, -1.0], [5.0, -5.0, 5.0], [1.0, -4.0, 2.0], 
+[-6.0, -4.0, 6.0]], [[-2.0, 4.0, -3.0], [5.0, 0.0, -3.0], [6.0, 3.0, 2.0], [-3.0, 0.0, 6.0]]]]))
+      arg1=Data(numpy.array([[[0.0, 6.0, -3.0], [-5.0, -5.0, 3.0], [6.0, 1.0, -3.0], [0.0, 2.0, 6.0]], [[0.0, -2.0, 6.0], [2.0, 
+-5.0, 2.0], [0.0, 5.0, 4.0], [-1.0, 2.0, -7.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-21.0, 115.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([60.0, 46.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank1_expandedData_rank3_offset0(self):
-      arg0=Data(numpy.array([0.0, -6.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, -4.0], [-1.0, -2.0]], [[6.0, 0.0], [0.0, 4.0]], [[-2.0, -6.0], [-1.0, -5.0]], [[-4.0, 
-3.0], [0.0, 7.0]], [[3.0, 1.0], [0.0, 0.0]], [[-7.0, -2.0], [7.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 4.0], [5.0, 
--7.0]], [[1.0, -7.0], [4.0, -7.0]], [[-3.0, -1.0], [-5.0, -2.0]], [[-4.0, 6.0], [-2.0, 4.0]], [[0.0, 2.0], [-2.0, 1.0]], [[7.0, 
-5.0], [-7.0, 4.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[30.0, 24.0], [6.0, 12.0]], [[-36.0, 0.0], [0.0, -24.0]], 
-[[12.0, 36.0], [6.0, 30.0]], [[24.0, -18.0], [0.0, -42.0]], [[-18.0, -6.0], [0.0, 0.0]], [[42.0, 12.0], [-42.0, 
--12.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 
-0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[42.0, -24.0], [-30.0, 42.0]], [[-6.0, 42.0], [-24.0, 
-42.0]], [[18.0, 6.0], [30.0, 12.0]], [[24.0, -36.0], [12.0, -24.0]], [[0.0, -12.0], [12.0, -6.0]], [[-42.0, -30.0], [42.0, 
--24.0]]]])
+   def test_generalTensorProduct_taggedData_rank1_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([5.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, 0.0]))
+      arg1=Data(numpy.array([-2.0, -3.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-10.0, -15.0], [0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[6.0, 9.0], [0.0, 0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank4_offset1(self):
-      arg0=Data(numpy.array([[0.0, 3.0], [-7.0, 7.0], [0.0, 4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[6.0, 6.0], [2.0, 1.0]], [[-5.0, 4.0], [0.0, -7.0]], [[-2.0, 3.0], [-6.0, 2.0]], [[-1.0, 
--5.0], [6.0, 6.0]], [[1.0, 1.0], [-2.0, -3.0]], [[-7.0, -5.0], [-6.0, -6.0]]], [[[1.0, 3.0], [-2.0, 2.0]], [[-6.0, 0.0], [-1.0, 
--1.0]], [[-5.0, -4.0], [-2.0, 3.0]], [[-6.0, 4.0], [5.0, -7.0]], [[-4.0, 5.0], [-4.0, 5.0]], [[-6.0, -6.0], [-3.0, -1.0]]], 
-[[[-2.0, -5.0], [7.0, 2.0]], [[4.0, 0.0], [0.0, 5.0]], [[4.0, 7.0], [-3.0, 1.0]], [[5.0, -3.0], [-3.0, -6.0]], [[6.0, 5.0], 
-[4.0, 5.0]], [[4.0, -7.0], [-1.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 1.0], [-7.0, 5.0]], [[7.0, 0.0], [-7.0, 4.0]], 
-[[1.0, 4.0], [0.0, 7.0]], [[1.0, -6.0], [1.0, -6.0]], [[0.0, -7.0], [-5.0, 1.0]], [[-2.0, -1.0], [-6.0, 1.0]]], [[[-5.0, 5.0], 
-[2.0, 7.0]], [[2.0, 1.0], [4.0, -1.0]], [[-1.0, 5.0], [0.0, 7.0]], [[-3.0, -1.0], [4.0, 0.0]], [[7.0, -6.0], [-7.0, 7.0]], 
-[[2.0, 1.0], [3.0, -2.0]]], [[[-7.0, 4.0], [7.0, 5.0]], [[-7.0, -3.0], [-2.0, -6.0]], [[0.0, 2.0], [-3.0, -6.0]], [[7.0, 5.0], 
-[0.0, 5.0]], [[3.0, 1.0], [4.0, -4.0]], [[4.0, -2.0], [-4.0, 1.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-7.0, -21.0], [14.0, -14.0]], [[42.0, 0.0], [7.0, 7.0]], [[35.0, 28.0], [14.0, -21.0]], 
-[[42.0, -28.0], [-35.0, 49.0]], [[28.0, -35.0], [28.0, -35.0]], [[42.0, 42.0], [21.0, 7.0]]], [[[17.0, 19.0], [20.0, 25.0]], 
-[[-41.0, 12.0], [-7.0, -8.0]], [[-25.0, 9.0], [-44.0, 31.0]], [[-25.0, 1.0], [41.0, -55.0]], [[-1.0, 58.0], [-18.0, 46.0]], 
-[[-47.0, -85.0], [-43.0, -25.0]]]])+(1.-msk_ref)*numpy.array([[[[35.0, -35.0], [-14.0, -49.0]], [[-14.0, -7.0], [-28.0, 7.0]], 
-[[7.0, -35.0], [0.0, -49.0]], [[21.0, 7.0], [-28.0, 0.0]], [[-49.0, 42.0], [49.0, -49.0]], [[-14.0, -7.0], [-21.0, 14.0]]], 
-[[[-54.0, 54.0], [21.0, 84.0]], [[7.0, -5.0], [-1.0, -19.0]], [[-4.0, 55.0], [-12.0, 46.0]], [[10.0, -5.0], [31.0, 2.0]], 
-[[61.0, -59.0], [-48.0, 36.0]], [[24.0, -4.0], [-13.0, -7.0]]]])
+   def test_generalTensorProduct_taggedData_rank2_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[5.0, -4.0, -1.0], [-1.0, 3.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, -3.0, 1.0], [-3.0, 0.0, -6.0]]))
+      arg1=Data(numpy.array([[7.0, -3.0], [0.0, -4.0], [2.0, -4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[33.0, 5.0], [7.0, -37.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-19.0, 17.0], [-33.0, 33.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[-3.0, 7.0, 6.0, 6.0, 2.0], [2.0, -6.0, -6.0, -3.0, 2.0], [7.0, -7.0, 4.0, 3.0, 5.0], [4.0, -5.0, 
-0.0, 6.0, 0.0]]),self.functionspace)
-      arg1=0.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-0.0, 0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 
-0.0, 0.0, 0.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[2.0, -1.0, 0.0], [2.0, -6.0, -3.0]], [[-1.0, 0.0, 3.0], [-5.0, 2.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 2.0, -7.0], [-7.0, 0.0, 2.0]], [[4.0, 4.0, 5.0], [5.0, -7.0, 0.0]]]))
+      arg1=Data(numpy.array([[[-6.0, 6.0], [5.0, -7.0], [-4.0, 4.0]], [[-5.0, -5.0], [0.0, -5.0], [-1.0, 
+-6.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-24.0, 57.0], [22.0, 39.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[77.0, -25.0], [-49.0, 26.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[-7.0, -5.0, 2.0, -4.0, -7.0], [-4.0, 6.0, -2.0, 7.0, 0.0], [6.0, 1.0, 7.0, 3.0, 7.0], [2.0, -2.0, 
-1.0, 3.0, -3.0]]),self.functionspace)
-      arg1=numpy.array(5.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-35.0, -25.0, 10.0, -20.0, -35.0], [-20.0, 30.0, -10.0, 35.0, 0.0], [30.0, 5.0, 35.0, 15.0, 35.0], 
-[10.0, -10.0, 5.0, 15.0, -15.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-6.0, 4.0, 2.0], [-5.0, 3.0, 0.0], [-5.0, 4.0, 6.0], [-5.0, -4.0, 1.0]], [[2.0, -4.0, -7.0], 
+[-1.0, -3.0, -5.0], [-6.0, 0.0, -6.0], [-7.0, -4.0, -3.0]]], [[[3.0, -5.0, 0.0], [2.0, -3.0, 6.0], [5.0, -7.0, 0.0], [-3.0, 
+-1.0, -7.0]], [[-7.0, 0.0, -7.0], [-6.0, -1.0, -7.0], [-1.0, 0.0, -3.0], [5.0, 0.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 1.0, -2.0], [6.0, -4.0, 5.0], [-7.0, -5.0, -7.0], [0.0, 4.0, -5.0]], [[4.0, 
+2.0, -4.0], [-6.0, 2.0, -6.0], [6.0, 3.0, -5.0], [-2.0, 6.0, -6.0]]], [[[-2.0, -7.0, -3.0], [-6.0, -4.0, -3.0], [0.0, 0.0, 
+-6.0], [-7.0, 2.0, -4.0]], [[2.0, 2.0, -6.0], [6.0, -3.0, 6.0], [5.0, 0.0, -3.0], [6.0, -1.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[[-4.0, 5.0], [-2.0, 1.0], [7.0, -6.0]], [[5.0, -6.0], [-1.0, -2.0], [7.0, -7.0]], [[-7.0, -2.0], 
+[-6.0, -7.0], [-6.0, 0.0]], [[2.0, 3.0], [6.0, 7.0], [-5.0, 0.0]]], [[[-3.0, 4.0], [-6.0, -3.0], [-1.0, -6.0]], [[-2.0, -7.0], 
+[-7.0, -4.0], [7.0, -2.0]], [[-5.0, -5.0], [-5.0, 7.0], [-7.0, -1.0]], [[4.0, -1.0], [6.0, -7.0], [-7.0, 
+0.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-8.0, 87.0], [148.0, 62.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[219.0, 63.0], [61.0, 34.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[[-2.0, 4.0, -4.0, 7.0, 2.0], [-2.0, 0.0, 3.0, 2.0, -7.0], [4.0, 6.0, 6.0, 0.0, -1.0], [5.0, -7.0, 
-7.0, 6.0, 0.0]], [[-7.0, 0.0, 0.0, 6.0, -2.0], [0.0, -7.0, 4.0, 0.0, -7.0], [3.0, -2.0, 0.0, 1.0, 3.0], [7.0, -1.0, 1.0, -2.0, 
-0.0]], [[4.0, 3.0, 3.0, -1.0, 3.0], [2.0, 0.0, 2.0, 1.0, 0.0], [-2.0, 6.0, -4.0, 5.0, 1.0], [3.0, 0.0, 3.0, -5.0, 
--1.0]]]),self.functionspace)
-      arg1=numpy.array([-3.0, 2.0, 1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-4.0, -9.0, 15.0, -10.0, -7.0], [8.0, -14.0, 1.0, -5.0, 7.0], [-8.0, -16.0, -22.0, 7.0, 10.0], 
-[2.0, 19.0, -16.0, -27.0, -1.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([2.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, 5.0]))
+      arg1=Data(numpy.array([[-4.0, 2.0, 5.0, -4.0, 0.0], [4.0, 0.0, 5.0, -1.0, -7.0], [3.0, 3.0, 6.0, -1.0, 3.0], [1.0, 6.0, 
+2.0, 3.0, -4.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-8.0, 4.0, 10.0, -8.0, 0.0], [8.0, 0.0, 10.0, -2.0, -14.0], [6.0, 6.0, 12.0, -2.0, 6.0], [2.0, 
+12.0, 4.0, 6.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[16.0, -8.0, -20.0, 16.0, 0.0], [-16.0, 0.0, -20.0, 4.0, 28.0], [-12.0, -12.0, -24.0, 
+4.0, -12.0], [-4.0, -24.0, -8.0, -12.0, 16.0]], [[-20.0, 10.0, 25.0, -20.0, 0.0], [20.0, 0.0, 25.0, -5.0, -35.0], [15.0, 15.0, 
+30.0, -5.0, 15.0], [5.0, 30.0, 10.0, 15.0, -20.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[-3.0, 7.0, -6.0, 5.0, 3.0], [-2.0, -2.0, 6.0, 3.0, 7.0], [4.0, -5.0, 4.0, 3.0, 0.0], [-6.0, 
-0.0, -5.0, 4.0, -6.0]], [[0.0, 2.0, -5.0, 3.0, 6.0], [-5.0, -2.0, -6.0, -6.0, 5.0], [4.0, -6.0, 5.0, -1.0, 1.0], [7.0, -1.0, 
-1.0, -3.0, 5.0]], [[-4.0, -1.0, -7.0, 4.0, 0.0], [-6.0, -5.0, -4.0, -3.0, -6.0], [-6.0, 0.0, -1.0, -3.0, -3.0], [5.0, -4.0, 
-4.0, 2.0, -4.0]]], [[[-6.0, 5.0, 6.0, 1.0, -2.0], [4.0, -3.0, -2.0, 2.0, -5.0], [-2.0, 1.0, -6.0, -4.0, -2.0], [-1.0, 7.0, 3.0, 
-0.0, 5.0]], [[4.0, 3.0, 7.0, 7.0, 6.0], [-6.0, -5.0, -5.0, -3.0, -2.0], [0.0, -1.0, 6.0, -5.0, 7.0], [0.0, 2.0, -7.0, -6.0, 
-2.0]], [[-1.0, -6.0, 7.0, 6.0, 6.0], [0.0, -3.0, 0.0, 6.0, -2.0], [-5.0, -2.0, 7.0, -1.0, 1.0], [-1.0, 0.0, -7.0, -7.0, 
--6.0]]]]),self.functionspace)
-      arg1=numpy.array([[0.0, -5.0, 6.0], [3.0, -3.0, -4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-50.0, 14.0, -48.0, -33.0, -78.0], [19.0, -2.0, 15.0, 3.0, -62.0], [-42.0, 44.0, -95.0, -6.0, 
--54.0], [-4.0, -4.0, 77.0, 73.0, -16.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-4.0, 4.0, 7.0], [5.0, -6.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, 5.0, 6.0], [3.0, -1.0, -3.0]]))
+      arg1=Data(numpy.array([[[-1.0, 2.0, 0.0, -1.0, 0.0], [-5.0, 2.0, -4.0, 3.0, 6.0], [-6.0, -3.0, -1.0, 0.0, 0.0], [4.0, 
+0.0, -1.0, -5.0, 4.0]], [[5.0, 1.0, -1.0, -2.0, 4.0], [-1.0, 2.0, 1.0, 6.0, 0.0], [2.0, 6.0, 7.0, 1.0, -3.0], [5.0, 4.0, -3.0, 
+0.0, -7.0]], [[-7.0, 2.0, -6.0, -4.0, -7.0], [3.0, -3.0, -2.0, -5.0, -2.0], [6.0, -1.0, -1.0, -3.0, -5.0], [-7.0, 2.0, -2.0, 
+6.0, 1.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-25.0, 10.0, -46.0, -32.0, -33.0], [37.0, -21.0, 6.0, -23.0, -38.0], [74.0, 29.0, 25.0, -17.0, 
+-47.0], [-45.0, 30.0, -22.0, 62.0, -37.0]], [[-70.0, 14.0, -24.0, -13.0, -59.0], [-4.0, -17.0, -36.0, -46.0, 20.0], [-12.0, 
+-56.0, -52.0, -21.0, -7.0], [-45.0, -14.0, 3.0, 5.0, 67.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-20.0, 23.0, -41.0, -37.0, -22.0], [-2.0, -2.0, -19.0, 9.0, 6.0], [28.0, 15.0, 26.0, 
+-13.0, -45.0], [-5.0, 32.0, -30.0, 21.0, -17.0]], [[13.0, -1.0, 19.0, 11.0, 17.0], [-23.0, 13.0, -7.0, 18.0, 24.0], [-38.0, 
+-12.0, -7.0, 8.0, 18.0], [28.0, -10.0, 6.0, -33.0, 16.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank1_offset0(self):
-      arg0=Data(numpy.array([[-5.0, -2.0, 3.0, 1.0, -6.0], [-6.0, 0.0, 4.0, 3.0, 0.0], [-4.0, 5.0, 3.0, 7.0, 1.0], [-7.0, -5.0, 
-0.0, -5.0, -6.0]]),self.functionspace)
-      arg1=numpy.array([-7.0, -5.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[35.0, 25.0], [14.0, 10.0], [-21.0, -15.0], [-7.0, -5.0], [42.0, 30.0]], [[42.0, 30.0], [0.0, 
-0.0], [-28.0, -20.0], [-21.0, -15.0], [0.0, 0.0]], [[28.0, 20.0], [-35.0, -25.0], [-21.0, -15.0], [-49.0, -35.0], [-7.0, 
--5.0]], [[49.0, 35.0], [35.0, 25.0], [0.0, 0.0], [35.0, 25.0], [42.0, 30.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, -6.0, -7.0], [-3.0, -4.0, 4.0]], [[-5.0, 0.0, 1.0], [-1.0, 2.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, 2.0, 0.0], [2.0, -4.0, 7.0]], [[5.0, 4.0, 2.0], [7.0, 1.0, -4.0]]]))
+      arg1=Data(numpy.array([[[[3.0, 1.0, 1.0, -3.0, 0.0], [7.0, 1.0, -3.0, 2.0, 6.0], [-7.0, 5.0, -7.0, -6.0, 1.0], [0.0, 7.0, 
+-5.0, -3.0, -5.0]], [[6.0, 4.0, 3.0, 2.0, -5.0], [-6.0, -1.0, -5.0, -2.0, -4.0], [-7.0, 1.0, -3.0, 7.0, 0.0], [-3.0, -1.0, 5.0, 
+7.0, -5.0]], [[5.0, -6.0, 3.0, 6.0, -7.0], [0.0, -7.0, -4.0, 5.0, 0.0], [-1.0, 7.0, -4.0, -5.0, 4.0], [7.0, -6.0, -1.0, -7.0, 
+5.0]]], [[[-2.0, -7.0, -1.0, 4.0, -7.0], [6.0, 2.0, 6.0, -6.0, 5.0], [-7.0, -7.0, -6.0, -7.0, 2.0], [-5.0, 1.0, 3.0, 6.0, 
+-4.0]], [[5.0, 3.0, 4.0, 6.0, -7.0], [2.0, 3.0, -6.0, 6.0, 7.0], [2.0, -1.0, 1.0, -3.0, 2.0], [-4.0, 3.0, -2.0, -7.0, 7.0]], 
+[[-1.0, -7.0, 3.0, 0.0, -3.0], [-3.0, 0.0, 7.0, -2.0, 4.0], [-5.0, 2.0, -7.0, -4.0, 0.0], [7.0, 6.0, 6.0, 6.0, 
+-4.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-95.0, -3.0, -42.0, -84.0, 116.0], [-16.0, 35.0, 98.0, -41.0, -15.0], [56.0, -32.0, 46.0, 22.0, 
+-44.0], [28.0, 43.0, 10.0, 47.0, -27.0]], [[2.0, 2.0, 7.0, 29.0, -14.0], [-37.0, -8.0, -7.0, 13.0, -21.0], [45.0, -13.0, 39.0, 
+26.0, 1.0], [4.0, -36.0, 17.0, -12.0, 48.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-16.0, -66.0, 10.0, -15.0, -17.0], [-22.0, -9.0, 72.0, -52.0, 8.0], [-78.0, 11.0, 
+-78.0, -22.0, -3.0], [49.0, 37.0, 61.0, 93.0, -79.0]], [[44.0, -9.0, 8.0, 39.0, -78.0], [67.0, 4.0, -35.0, -16.0, 40.0], 
+[-92.0, -15.0, -68.0, -48.0, 29.0], [-65.0, 5.0, -12.0, 10.0, -40.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[[0.0, 6.0, 4.0, 5.0, 2.0], [6.0, 4.0, 0.0, -4.0, 3.0], [-7.0, 6.0, -5.0, 6.0, -7.0], [7.0, -5.0, 
-4.0, -3.0, -4.0]], [[1.0, 7.0, -7.0, -2.0, 1.0], [0.0, -5.0, -1.0, -1.0, -3.0], [-6.0, -3.0, 0.0, -2.0, 0.0], [3.0, -6.0, 0.0, 
--3.0, 1.0]], [[0.0, 0.0, -7.0, 0.0, 6.0], [4.0, 2.0, -3.0, 6.0, -2.0], [0.0, -7.0, 0.0, 2.0, 0.0], [5.0, -1.0, 3.0, 7.0, 
-6.0]]]),self.functionspace)
-      arg1=numpy.array([[5.0, 3.0], [-6.0, 5.0], [-7.0, 1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-6.0, 5.0], [-12.0, 53.0], [111.0, -30.0], [37.0, 5.0], [-38.0, 17.0]], [[2.0, 22.0], [36.0, 
--11.0], [27.0, -8.0], [-56.0, -11.0], [47.0, -8.0]], [[1.0, -51.0], [97.0, -4.0], [-25.0, -15.0], [28.0, 10.0], [-35.0, 
--21.0]], [[-18.0, 41.0], [18.0, -46.0], [-1.0, 15.0], [-46.0, -17.0], [-68.0, -1.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_constData_rank3_offset0(self):
+      arg0=Data(numpy.array([0.0, 2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, -1.0]))
+      arg1=Data(numpy.array([[[-7.0, 0.0], [-4.0, 0.0]], [[-2.0, -6.0], [5.0, 5.0]], [[-6.0, 6.0], [6.0, -4.0]], [[4.0, -1.0], 
+[7.0, -1.0]], [[4.0, -6.0], [-4.0, 7.0]], [[-3.0, -6.0], [4.0, -5.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-14.0, 0.0], [-8.0, 0.0]], [[-4.0, -12.0], [10.0, 10.0]], 
+[[-12.0, 12.0], [12.0, -8.0]], [[8.0, -2.0], [14.0, -2.0]], [[8.0, -12.0], [-8.0, 14.0]], [[-6.0, -12.0], [8.0, 
+-10.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-42.0, 0.0], [-24.0, 0.0]], [[-12.0, -36.0], [30.0, 30.0]], [[-36.0, 36.0], [36.0, 
+-24.0]], [[24.0, -6.0], [42.0, -6.0]], [[24.0, -36.0], [-24.0, 42.0]], [[-18.0, -36.0], [24.0, -30.0]]], [[[7.0, 0.0], [4.0, 
+0.0]], [[2.0, 6.0], [-5.0, -5.0]], [[6.0, -6.0], [-6.0, 4.0]], [[-4.0, 1.0], [-7.0, 1.0]], [[-4.0, 6.0], [4.0, -7.0]], [[3.0, 
+6.0], [-4.0, 5.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[3.0, 6.0, 4.0, 0.0, 6.0], [1.0, -4.0, 0.0, 0.0, 3.0], [0.0, 1.0, 7.0, -5.0, 0.0], [7.0, 7.0, 
--4.0, 7.0, 6.0]], [[-6.0, -1.0, 7.0, -1.0, -4.0], [-1.0, -4.0, 4.0, -4.0, 1.0], [7.0, 0.0, -6.0, -7.0, -2.0], [-5.0, -3.0, 1.0, 
-0.0, -1.0]], [[-3.0, -1.0, 2.0, 2.0, -6.0], [2.0, 4.0, 1.0, 6.0, 6.0], [-2.0, -7.0, 5.0, -1.0, -4.0], [-5.0, 3.0, -3.0, -6.0, 
-1.0]]], [[[5.0, 5.0, 5.0, 3.0, 0.0], [-1.0, 6.0, 0.0, 0.0, 1.0], [4.0, 0.0, 4.0, -3.0, 5.0], [6.0, 0.0, 4.0, 5.0, -7.0]], 
-[[0.0, 7.0, -6.0, 4.0, -6.0], [-1.0, 6.0, 3.0, 6.0, 5.0], [-6.0, 0.0, -7.0, 7.0, -7.0], [3.0, 1.0, 1.0, -5.0, 6.0]], [[4.0, 
--6.0, -6.0, 0.0, -4.0], [2.0, -2.0, 5.0, -5.0, -1.0], [6.0, 4.0, -4.0, -7.0, 6.0], [3.0, 2.0, -2.0, 5.0, 
-0.0]]]]),self.functionspace)
-      arg1=numpy.array([[[0.0, 0.0], [7.0, 5.0], [7.0, -5.0]], [[0.0, -6.0], [4.0, -7.0], [2.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-55.0, -45.0], [2.0, -79.0], [27.0, 37.0], [23.0, -61.0], [-102.0, 52.0]], [[7.0, -2.0], [20.0, 
--118.0], [57.0, -6.0], [28.0, -92.0], [67.0, -66.0]], [[23.0, 63.0], [-41.0, 35.0], [-43.0, -30.0], [-42.0, -61.0], [-58.0, 
-29.0]], [[-52.0, -57.0], [8.0, -37.0], [-14.0, -11.0], [-52.0, 35.0], [24.0, -10.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([[2.0, 3.0, 6.0], [4.0, 1.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, -6.0, 2.0], [0.0, 2.0, -7.0]]))
+      arg1=Data(numpy.array([[[[4.0, 6.0], [-3.0, 0.0]], [[0.0, 3.0], [-3.0, 0.0]], [[-4.0, 0.0], [3.0, -5.0]], [[-2.0, -3.0], 
+[6.0, 2.0]], [[4.0, 1.0], [2.0, -6.0]], [[-6.0, 5.0], [-2.0, -3.0]]], [[[0.0, 3.0], [-6.0, -5.0]], [[3.0, -1.0], [0.0, -3.0]], 
+[[0.0, -3.0], [6.0, -3.0]], [[2.0, -1.0], [-6.0, -5.0]], [[-6.0, -5.0], [1.0, -6.0]], [[-5.0, 5.0], [-7.0, -6.0]]], [[[1.0, 
+2.0], [2.0, -1.0]], [[-2.0, 3.0], [-2.0, -7.0]], [[1.0, -3.0], [-1.0, -1.0]], [[1.0, -7.0], [-2.0, 6.0]], [[-5.0, 1.0], [4.0, 
+4.0]], [[4.0, -3.0], [0.0, 0.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[14.0, 33.0], [-12.0, -21.0]], [[-3.0, 21.0], [-18.0, -51.0]], [[-2.0, -27.0], [18.0, -25.0]], 
+[[8.0, -51.0], [-18.0, 25.0]], [[-40.0, -7.0], [31.0, -6.0]], [[-3.0, 7.0], [-25.0, -24.0]]], [[[20.0, 35.0], [-10.0, -9.0]], 
+[[-5.0, 23.0], [-20.0, -31.0]], [[-12.0, -15.0], [14.0, -27.0]], [[-2.0, -41.0], [10.0, 27.0]], [[-10.0, 3.0], [25.0, -14.0]], 
+[[-13.0, 13.0], [-15.0, -18.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[6.0, -8.0], [37.0, 28.0]], [[-22.0, 15.0], [-7.0, 4.0]], [[-2.0, 12.0], [-35.0, 
+11.0]], [[-12.0, -11.0], [38.0, 44.0]], [[30.0, 33.0], [4.0, 38.0]], [[32.0, -31.0], [40.0, 33.0]]], [[[-7.0, -8.0], [-26.0, 
+-3.0]], [[20.0, -23.0], [14.0, 43.0]], [[-7.0, 15.0], [19.0, 1.0]], [[-3.0, 47.0], [2.0, -52.0]], [[23.0, -17.0], [-26.0, 
+-40.0]], [[-38.0, 31.0], [-14.0, -12.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_array_rank2_offset0(self):
-      arg0=Data(numpy.array([[0.0, -2.0, 1.0, -2.0, 6.0], [-3.0, -4.0, 2.0, 0.0, -6.0], [7.0, -1.0, -7.0, 2.0, 1.0], [-3.0, 
-0.0, -4.0, -5.0, -7.0]]),self.functionspace)
-      arg1=numpy.array([[0.0, 5.0, -5.0, -2.0, -2.0], [3.0, -7.0, 0.0, 5.0, -4.0], [5.0, 0.0, 4.0, 1.0, 3.0], [3.0, 2.0, 5.0, 
-4.0, -7.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[0.0, -10.0, 10.0, 4.0, 4.0], [-6.0, 14.0, 0.0, -10.0, 8.0], [-10.0, 0.0, -8.0, -2.0, -6.0], [-6.0, -4.0, -10.0, 
--8.0, 14.0]], [[0.0, 5.0, -5.0, -2.0, -2.0], [3.0, -7.0, 0.0, 5.0, -4.0], [5.0, 0.0, 4.0, 1.0, 3.0], [3.0, 2.0, 5.0, 4.0, 
--7.0]], [[0.0, -10.0, 10.0, 4.0, 4.0], [-6.0, 14.0, 0.0, -10.0, 8.0], [-10.0, 0.0, -8.0, -2.0, -6.0], [-6.0, -4.0, -10.0, -8.0, 
-14.0]], [[0.0, 30.0, -30.0, -12.0, -12.0], [18.0, -42.0, 0.0, 30.0, -24.0], [30.0, 0.0, 24.0, 6.0, 18.0], [18.0, 12.0, 30.0, 
-24.0, -42.0]]], [[[0.0, -15.0, 15.0, 6.0, 6.0], [-9.0, 21.0, 0.0, -15.0, 12.0], [-15.0, 0.0, -12.0, -3.0, -9.0], [-9.0, -6.0, 
--15.0, -12.0, 21.0]], [[0.0, -20.0, 20.0, 8.0, 8.0], [-12.0, 28.0, 0.0, -20.0, 16.0], [-20.0, 0.0, -16.0, -4.0, -12.0], [-12.0, 
--8.0, -20.0, -16.0, 28.0]], [[0.0, 10.0, -10.0, -4.0, -4.0], [6.0, -14.0, 0.0, 10.0, -8.0], [10.0, 0.0, 8.0, 2.0, 6.0], [6.0, 
-4.0, 10.0, 8.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]], [[0.0, -30.0, 30.0, 12.0, 12.0], [-18.0, 42.0, 0.0, -30.0, 24.0], [-30.0, 0.0, -24.0, -6.0, -18.0], [-18.0, -12.0, 
--30.0, -24.0, 42.0]]], [[[0.0, 35.0, -35.0, -14.0, -14.0], [21.0, -49.0, 0.0, 35.0, -28.0], [35.0, 0.0, 28.0, 7.0, 21.0], 
-[21.0, 14.0, 35.0, 28.0, -49.0]], [[0.0, -5.0, 5.0, 2.0, 2.0], [-3.0, 7.0, 0.0, -5.0, 4.0], [-5.0, 0.0, -4.0, -1.0, -3.0], 
-[-3.0, -2.0, -5.0, -4.0, 7.0]], [[0.0, -35.0, 35.0, 14.0, 14.0], [-21.0, 49.0, 0.0, -35.0, 28.0], [-35.0, 0.0, -28.0, -7.0, 
--21.0], [-21.0, -14.0, -35.0, -28.0, 49.0]], [[0.0, 10.0, -10.0, -4.0, -4.0], [6.0, -14.0, 0.0, 10.0, -8.0], [10.0, 0.0, 8.0, 
-2.0, 6.0], [6.0, 4.0, 10.0, 8.0, -14.0]], [[0.0, 5.0, -5.0, -2.0, -2.0], [3.0, -7.0, 0.0, 5.0, -4.0], [5.0, 0.0, 4.0, 1.0, 
-3.0], [3.0, 2.0, 5.0, 4.0, -7.0]]], [[[0.0, -15.0, 15.0, 6.0, 6.0], [-9.0, 21.0, 0.0, -15.0, 12.0], [-15.0, 0.0, -12.0, -3.0, 
--9.0], [-9.0, -6.0, -15.0, -12.0, 21.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -20.0, 20.0, 8.0, 8.0], [-12.0, 28.0, 0.0, -20.0, 16.0], [-20.0, 0.0, -16.0, -4.0, -12.0], 
-[-12.0, -8.0, -20.0, -16.0, 28.0]], [[0.0, -25.0, 25.0, 10.0, 10.0], [-15.0, 35.0, 0.0, -25.0, 20.0], [-25.0, 0.0, -20.0, -5.0, 
--15.0], [-15.0, -10.0, -25.0, -20.0, 35.0]], [[0.0, -35.0, 35.0, 14.0, 14.0], [-21.0, 49.0, 0.0, -35.0, 28.0], [-35.0, 0.0, 
--28.0, -7.0, -21.0], [-21.0, -14.0, -35.0, -28.0, 49.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([0.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, 2.0]))
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,0.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, -12.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([0.0, 0.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank3_offset1(self):
-      arg0=Data(numpy.array([[[5.0, 5.0, 4.0, -7.0, 6.0], [-3.0, -5.0, -4.0, 0.0, 7.0], [7.0, 3.0, 6.0, 4.0, 1.0], [2.0, -3.0, 
--5.0, -7.0, -1.0]], [[6.0, -3.0, -4.0, 1.0, -7.0], [-1.0, 1.0, -7.0, -2.0, 5.0], [-6.0, -1.0, 4.0, -4.0, 7.0], [0.0, -2.0, 5.0, 
--3.0, 4.0]], [[5.0, -7.0, -5.0, 3.0, 6.0], [-2.0, -6.0, -1.0, 1.0, -7.0], [4.0, -3.0, -3.0, 2.0, 1.0], [-6.0, -3.0, 7.0, 0.0, 
-3.0]]]),self.functionspace)
-      arg1=numpy.array([[[-6.0, -1.0, 0.0, 7.0, -4.0], [0.0, 2.0, -4.0, -1.0, -1.0], [1.0, -1.0, 7.0, 0.0, 3.0], [-2.0, -5.0, 
--2.0, 0.0, 4.0]], [[3.0, -2.0, 1.0, -3.0, 2.0], [6.0, -6.0, 2.0, -5.0, 5.0], [2.0, 1.0, 7.0, 2.0, 3.0], [7.0, -6.0, -6.0, 6.0, 
-0.0]], [[-3.0, -4.0, 0.0, 6.0, 6.0], [-7.0, 5.0, 0.0, -3.0, -5.0], [-6.0, 5.0, -6.0, 4.0, 5.0], [-5.0, 0.0, 0.0, -4.0, -5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-27.0, -37.0, 6.0, 47.0, 22.0], [1.0, -1.0, -8.0, -50.0, 0.0], [-13.0, 26.0, 47.0, 32.0, 58.0], 
-[7.0, -61.0, -46.0, 16.0, -5.0]], [[-18.0, 29.0, -3.0, 2.0, -68.0], [31.0, -7.0, -26.0, 31.0, 15.0], [41.0, -43.0, 56.0, -34.0, 
--29.0], [4.0, -7.0, 8.0, 10.0, 55.0]], [[-21.0, 24.0, -4.0, 10.0, -54.0], [11.0, 7.0, -24.0, 31.0, 1.0], [26.0, -33.0, 30.0, 
--28.0, -25.0], [-11.0, 4.0, 16.0, -4.0, 41.0]], [[36.0, -7.0, 1.0, -34.0, 48.0], [-15.0, -5.0, 30.0, -7.0, -3.0], [-23.0, 23.0, 
--60.0, 14.0, -3.0], [6.0, 29.0, 8.0, -6.0, -43.0]], [[-75.0, -16.0, -7.0, 99.0, -2.0], [-84.0, 84.0, -38.0, 11.0, -71.0], 
-[-44.0, 17.0, -43.0, 10.0, 27.0], [-91.0, 12.0, 30.0, -66.0, -6.0]]], [[[21.0, 13.0, -1.0, -30.0, -2.0], [8.0, -10.0, 10.0, 
-14.0, 8.0], [7.0, -8.0, -16.0, -10.0, -22.0], [9.0, 21.0, 12.0, 2.0, -2.0]], [[51.0, 27.0, 1.0, -74.0, -14.0], [48.0, -46.0, 
-22.0, 18.0, 40.0], [33.0, -24.0, 8.0, -22.0, -42.0], [47.0, 19.0, 4.0, 30.0, 10.0]], [[6.0, 22.0, -7.0, -13.0, -4.0], [-35.0, 
-29.0, 2.0, 42.0, -26.0], [-12.0, -8.0, -71.0, -18.0, -38.0], [-36.0, 62.0, 50.0, -38.0, -11.0]], [[-9.0, 0.0, -2.0, 12.0, 2.0], 
-[-19.0, 17.0, -4.0, 7.0, -15.0], [-10.0, 3.0, -20.0, 0.0, -1.0], [-19.0, 12.0, 12.0, -16.0, -5.0]], [[-6.0, 11.0, 5.0, -8.0, 
--60.0], [79.0, -51.0, -18.0, -11.0, 53.0], [59.0, -37.0, 126.0, -18.0, 1.0], [56.0, -65.0, -44.0, 58.0, 63.0]]], [[[-72.0, 
--11.0, -6.0, 91.0, -16.0], [-64.0, 70.0, -40.0, 11.0, -57.0], [-29.0, 7.0, -17.0, 4.0, 23.0], [-76.0, 1.0, 22.0, -52.0, 8.0]], 
-[[-12.0, 11.0, -1.0, 6.0, -32.0], [15.0, -3.0, -14.0, 11.0, 7.0], [19.0, -19.0, 32.0, -14.0, -9.0], [2.0, -9.0, 0.0, 6.0, 
-27.0]], [[-15.0, -2.0, 4.0, 12.0, -34.0], [45.0, -27.0, -16.0, -17.0, 29.0], [32.0, -17.0, 88.0, -4.0, 15.0], [31.0, -54.0, 
--36.0, 36.0, 39.0]], [[-42.0, -4.0, -4.0, 52.0, -12.0], [-38.0, 42.0, -24.0, 10.0, -34.0], [-16.0, 2.0, -12.0, 0.0, 10.0], 
-[-46.0, 4.0, 16.0, -32.0, 6.0]], [[12.0, -19.0, 7.0, -8.0, 16.0], [35.0, -35.0, 10.0, -39.0, 29.0], [9.0, 11.0, 50.0, 18.0, 
-29.0], [42.0, -47.0, -44.0, 38.0, -1.0]]], [[[6.0, 22.0, 0.0, -22.0, -44.0], [42.0, -26.0, -8.0, 16.0, 28.0], [38.0, -32.0, 
-50.0, -24.0, -24.0], [26.0, -10.0, -4.0, 24.0, 38.0]], [[21.0, 19.0, -2.0, -33.0, -10.0], [9.0, -9.0, 8.0, 22.0, 8.0], [11.0, 
--14.0, -17.0, -16.0, -30.0], [7.0, 27.0, 18.0, 0.0, 3.0]], [[24.0, -33.0, 5.0, -8.0, 72.0], [-19.0, -5.0, 30.0, -41.0, -5.0], 
-[-37.0, 45.0, -42.0, 38.0, 35.0], [10.0, -5.0, -20.0, 2.0, -55.0]], [[33.0, 13.0, -3.0, -40.0, 22.0], [-18.0, 4.0, 22.0, 22.0, 
--8.0], [-13.0, 4.0, -70.0, -6.0, -30.0], [-7.0, 53.0, 32.0, -18.0, -28.0]], [[9.0, -19.0, 4.0, -1.0, 30.0], [3.0, -11.0, 12.0, 
--28.0, 6.0], [-11.0, 20.0, 3.0, 20.0, 24.0], [15.0, -19.0, -22.0, 12.0, -19.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[-2.0, -6.0, 0.0], [7.0, -5.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, 2.0, -2.0], [-3.0, 4.0, -5.0]]))
+      arg1=Data(numpy.array([2.0, -6.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-4.0, 1.0, 0.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([32.0, 60.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-14.0, 16.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[7.0, -6.0, -4.0, 2.0, -6.0], [-5.0, 5.0, 2.0, -1.0, -2.0], [0.0, 6.0, 3.0, -1.0, 7.0], [7.0, 
-4.0, -1.0, 3.0, -3.0]], [[0.0, 5.0, -7.0, -3.0, -1.0], [6.0, 7.0, 0.0, 2.0, -3.0], [-4.0, -3.0, -6.0, 0.0, 1.0], [6.0, -7.0, 
--7.0, 5.0, -3.0]], [[7.0, -2.0, 0.0, 4.0, 3.0], [6.0, 2.0, 4.0, 3.0, 5.0], [0.0, -3.0, 0.0, -7.0, -1.0], [-4.0, 4.0, -5.0, 
--4.0, -3.0]]], [[[-5.0, 5.0, -5.0, 1.0, -7.0], [-6.0, 0.0, 1.0, -2.0, 4.0], [2.0, -4.0, 6.0, 5.0, -7.0], [1.0, 0.0, -7.0, -4.0, 
-1.0]], [[0.0, 0.0, 1.0, 7.0, 6.0], [-2.0, 0.0, -1.0, -4.0, -6.0], [2.0, 5.0, 6.0, 2.0, 6.0], [-3.0, 6.0, -3.0, 0.0, -7.0]], 
-[[-7.0, 7.0, -2.0, 1.0, 7.0], [-1.0, 2.0, 4.0, 2.0, 4.0], [6.0, 5.0, 0.0, -6.0, -2.0], [-1.0, 7.0, 4.0, -6.0, 
--7.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[3.0, -6.0, -6.0, -6.0, 4.0], [-5.0, -6.0, -2.0, 1.0, 5.0], [6.0, 6.0, 0.0, -5.0, 4.0], [-5.0, 0.0, 
--7.0, -2.0, 6.0]], [[-3.0, 7.0, 3.0, -1.0, -5.0], [6.0, 0.0, 0.0, -1.0, -3.0], [-3.0, 0.0, -2.0, -7.0, -4.0], [4.0, 6.0, -4.0, 
--6.0, 5.0]], [[5.0, -7.0, -3.0, 6.0, 7.0], [-5.0, 5.0, 0.0, 3.0, -2.0], [0.0, 7.0, 1.0, 1.0, -2.0], [-5.0, -4.0, 3.0, -4.0, 
-6.0]]], [[[-5.0, 0.0, 4.0, 0.0, -4.0], [-4.0, 5.0, 2.0, -5.0, -4.0], [-4.0, 7.0, 4.0, 0.0, -5.0], [3.0, 2.0, -1.0, 7.0, -5.0]], 
-[[3.0, 4.0, -1.0, -4.0, 5.0], [-3.0, 5.0, 4.0, 2.0, -6.0], [6.0, -4.0, -4.0, 7.0, 2.0], [6.0, 5.0, -7.0, -3.0, -1.0]], [[5.0, 
--5.0, 6.0, 6.0, 6.0], [5.0, 4.0, -2.0, 6.0, 1.0], [4.0, 7.0, -2.0, 0.0, 4.0], [3.0, 7.0, -3.0, -4.0, 6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[46.0, -56.0, -125.0, -42.0, 55.0], [-85.0, -60.0, -10.0, 11.0, 34.0], [34.0, 7.0, 1.0, -28.0, 
-11.0], [-106.0, -87.0, -2.0, -49.0, 67.0]], [[-33.0, 50.0, 119.0, 61.0, -41.0], [85.0, 79.0, 8.0, 0.0, -54.0], [-43.0, 34.0, 
--6.0, -7.0, -37.0], [96.0, 97.0, -10.0, -3.0, -6.0]], [[27.0, -11.0, -30.0, 15.0, 32.0], [-15.0, -4.0, 6.0, 18.0, 13.0], [15.0, 
--77.0, -6.0, 76.0, 31.0], [-23.0, -61.0, 60.0, 20.0, -47.0]], [[56.0, -38.0, -30.0, -7.0, 88.0], [-68.0, 52.0, 24.0, 32.0, 
--34.0], [63.0, 26.0, -16.0, 64.0, 25.0], [6.0, 10.0, -43.0, -20.0, 15.0]], [[88.0, -3.0, 32.0, 73.0, 102.0], [54.0, 74.0, 8.0, 
-93.0, -34.0], [59.0, -39.0, -61.0, 82.0, 49.0], [47.0, 47.0, -1.0, -89.0, 48.0]]], [[[16.0, 27.0, 2.0, 62.0, 0.0], [56.0, 16.0, 
--8.0, 27.0, -20.0], [-40.0, -29.0, -20.0, -25.0, -34.0], [-14.0, -17.0, 52.0, -82.0, 62.0]], [[14.0, -5.0, -3.0, -13.0, 11.0], 
-[17.0, -12.0, -14.0, 16.0, 2.0], [17.0, 58.0, -16.0, -72.0, -4.0], [-1.0, 48.0, -63.0, -68.0, 89.0]], [[38.0, -64.0, 5.0, 40.0, 
-51.0], [-11.0, 24.0, -14.0, 31.0, 8.0], [18.0, 79.0, 4.0, -13.0, 9.0], [-21.0, 9.0, -8.0, -26.0, 56.0]], [[14.0, -27.0, 11.0, 
-50.0, 7.0], [32.0, -1.0, -22.0, 20.0, 17.0], [-20.0, 31.0, 3.0, -34.0, -8.0], [-26.0, -10.0, 32.0, -32.0, 48.0]], [[10.0, 
--88.0, 34.0, 93.0, 20.0], [-11.0, 43.0, -20.0, 8.0, 13.0], [-39.0, 103.0, 43.0, -6.0, -22.0], [-39.0, -32.0, 67.0, 32.0, 
-13.0]]], [[[38.0, -50.0, 30.0, 32.0, 58.0], [-8.0, 44.0, 0.0, 34.0, -2.0], [40.0, 48.0, -4.0, 42.0, 34.0], [20.0, 32.0, -18.0, 
-8.0, 4.0]], [[72.0, -41.0, -27.0, -41.0, 89.0], [-7.0, -26.0, -10.0, 60.0, 36.0], [111.0, 2.0, -43.0, 23.0, 92.0], [6.0, 46.0, 
--85.0, -45.0, 48.0]], [[15.0, -36.0, -18.0, -36.0, 48.0], [-93.0, 42.0, 30.0, -9.0, -27.0], [48.0, 36.0, 12.0, 69.0, 18.0], 
-[15.0, 6.0, -45.0, 54.0, -48.0]], [[-87.0, 93.0, 9.0, -80.0, -99.0], [-16.0, -18.0, 32.0, -79.0, -29.0], [-38.0, -70.0, 17.0, 
-12.0, -35.0], [49.0, 6.0, -15.0, 83.0, -111.0]], [[56.0, 6.0, -82.0, -85.0, 62.0], [-24.0, -60.0, 0.0, 38.0, 24.0], [95.0, 
--52.0, -51.0, -1.0, 65.0], [-17.0, 12.0, -85.0, -75.0, 58.0]]], [[[-36.0, 21.0, -11.0, -66.0, -55.0], [21.0, -76.0, -22.0, 
--28.0, 38.0], [-2.0, 26.0, 2.0, -102.0, -3.0], [-9.0, 32.0, -62.0, -14.0, 40.0]], [[106.0, -112.0, -21.0, 25.0, 151.0], [-65.0, 
-54.0, 2.0, 77.0, 4.0], [109.0, 77.0, -20.0, 75.0, 76.0], [-11.0, 21.0, -51.0, -28.0, 49.0]], [[39.0, -40.0, -1.0, 19.0, 33.0], 
-[45.0, -53.0, -32.0, 44.0, 76.0], [41.0, -50.0, -15.0, 28.0, 79.0], [-25.0, -23.0, 36.0, 8.0, -9.0]], [[-36.0, 75.0, -43.0, 
--83.0, -61.0], [21.0, -82.0, -2.0, -30.0, 18.0], [-5.0, -80.0, -18.0, -54.0, -4.0], [-5.0, -4.0, -31.0, -24.0, 3.0]], [[-76.0, 
-25.0, -13.0, -11.0, -99.0], [-6.0, -55.0, -6.0, -70.0, 31.0], [-83.0, -53.0, 49.0, -16.0, -41.0], [-42.0, -88.0, 93.0, 92.0, 
--91.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, 7.0, 7.0], [-7.0, -5.0, 5.0]], [[2.0, 5.0, -4.0], [0.0, -4.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, -7.0, 7.0], [0.0, 0.0, 4.0]], [[-5.0, 1.0, 0.0], [-5.0, -5.0, 0.0]]]))
+      arg1=Data(numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 6.0, 5.0], [-2.0, -4.0, 1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-8.0, 14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-18.0, 61.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[1.0, -2.0, 1.0], [1.0, -1.0, -1.0], [4.0, -2.0, 4.0], [-1.0, -2.0, -1.0]], [[0.0, -6.0, -5.0], 
+[3.0, 5.0, -6.0], [-1.0, 0.0, 5.0], [2.0, -6.0, -1.0]]], [[[6.0, 5.0, 2.0], [-5.0, -3.0, 1.0], [-2.0, -1.0, 1.0], [0.0, 7.0, 
+4.0]], [[4.0, 6.0, 2.0], [-5.0, -7.0, -5.0], [-1.0, -5.0, 5.0], [4.0, 3.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, -7.0, -2.0], [1.0, 0.0, 0.0], [-5.0, 3.0, -4.0], [4.0, -1.0, 7.0]], [[-4.0, 
+2.0, -3.0], [2.0, 5.0, 2.0], [0.0, -2.0, -4.0], [1.0, -1.0, 5.0]]], [[[2.0, 4.0, 0.0], [-7.0, 2.0, 1.0], [5.0, -3.0, -6.0], 
+[7.0, -4.0, 7.0]], [[3.0, -1.0, -6.0], [6.0, 4.0, 7.0], [4.0, 1.0, -3.0], [5.0, 0.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[3.0, -7.0, -1.0], [5.0, 1.0, -2.0], [4.0, -7.0, 0.0], [2.0, 0.0, -2.0]], [[-5.0, 3.0, 4.0], 
+[-3.0, 6.0, 5.0], [2.0, 7.0, -7.0], [6.0, -4.0, 7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -1.0, 5.0], [-3.0, 2.0, 0.0], [6.0, -7.0, 5.0], [2.0, -4.0, -2.0]], [[7.0, 
+-5.0, 4.0], [2.0, -3.0, 4.0], [-7.0, -6.0, -7.0], [-3.0, -5.0, -5.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-3.0, -206.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-127.0, 48.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[0.0, 6.0, -2.0, 5.0, -4.0], [5.0, -5.0, 3.0, 7.0, -3.0], [-6.0, -5.0, -5.0, 0.0, -4.0], [4.0, 
-6.0, -3.0, 4.0, 3.0]]),self.functionspace)
-      arg1=Data(1.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[0.0, 6.0, -2.0, 5.0, -4.0], [5.0, -5.0, 3.0, 7.0, -3.0], [-6.0, -5.0, -5.0, 0.0, -4.0], [4.0, 6.0, 
--3.0, 4.0, 3.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-2.0, 3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([2.0, -6.0]))
+      arg1=Data(numpy.array([2.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, 7.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-4.0, -6.0], [6.0, 9.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[4.0, 14.0], [-12.0, -42.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[2.0, 4.0, 6.0, -7.0, -5.0], [-6.0, -6.0, -1.0, -5.0, 0.0], [3.0, 7.0, 3.0, -5.0, -3.0], [-7.0, 
-7.0, 2.0, 7.0, -7.0]], [[0.0, 1.0, -4.0, 1.0, 5.0], [-4.0, 6.0, 4.0, -1.0, 4.0], [0.0, 6.0, 7.0, -6.0, 5.0], [0.0, 2.0, 5.0, 
-7.0, -6.0]], [[0.0, -4.0, -6.0, 0.0, -3.0], [4.0, 0.0, -6.0, 4.0, 5.0], [5.0, -3.0, -1.0, -4.0, -6.0], [-4.0, -2.0, 3.0, -2.0, 
-2.0]]]),self.functionspace)
-      arg1=Data(numpy.array([1.0, 6.0, 1.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[2.0, 6.0, -24.0, -1.0, 22.0], [-26.0, 30.0, 17.0, -7.0, 29.0], [8.0, 40.0, 44.0, -45.0, 21.0], 
-[-11.0, 17.0, 35.0, 47.0, -41.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[0.0, 7.0, 0.0], [5.0, 6.0, 3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, 2.0, 3.0], [5.0, 6.0, -6.0]]))
+      arg1=Data(numpy.array([[7.0, 2.0], [-2.0, 4.0], [6.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, -5.0], [2.0, -1.0], [0.0, 0.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-14.0, 28.0], [41.0, 55.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[39.0, 33.0], [-13.0, -31.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[1.0, -4.0, -7.0, 5.0, 6.0], [2.0, 3.0, -3.0, -4.0, 0.0], [0.0, -1.0, 0.0, -3.0, -5.0], [-7.0, 
-7.0, -7.0, -1.0, 5.0]], [[-3.0, 0.0, 4.0, -2.0, -6.0], [5.0, -3.0, 5.0, 0.0, 4.0], [-4.0, 3.0, 5.0, 7.0, -6.0], [0.0, 4.0, 3.0, 
-7.0, -2.0]], [[2.0, -2.0, -7.0, 0.0, 0.0], [-3.0, 5.0, 6.0, -5.0, -1.0], [-4.0, 7.0, -6.0, 3.0, 5.0], [3.0, -5.0, -1.0, -4.0, 
--3.0]]], [[[3.0, 1.0, 7.0, 7.0, 0.0], [0.0, -2.0, 2.0, 7.0, -3.0], [-4.0, 0.0, 7.0, -4.0, 6.0], [3.0, -6.0, -3.0, 4.0, -1.0]], 
-[[-3.0, 6.0, -4.0, -5.0, -7.0], [-6.0, -3.0, 6.0, 2.0, -4.0], [0.0, -6.0, 0.0, -5.0, 1.0], [-1.0, 3.0, 0.0, 1.0, -1.0]], [[3.0, 
-2.0, 1.0, -2.0, 2.0], [7.0, -5.0, 1.0, 2.0, -7.0], [5.0, 2.0, -4.0, 4.0, 0.0], [4.0, -4.0, -7.0, -3.0, 
-0.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[-1.0, 5.0, -4.0], [1.0, 6.0, -6.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-57.0, 37.0, 32.0, -26.0, -90.0], [-43.0, -28.0, 36.0, 31.0, 39.0], [-38.0, -60.0, 80.0, -32.0, 
--33.0], [-32.0, 69.0, 65.0, 80.0, -10.0]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[0.0, -7.0, -6.0], [1.0, 7.0, -6.0]], [[-2.0, 0.0, 7.0], [7.0, 6.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 5.0, -4.0], [-4.0, 3.0, 2.0]], [[0.0, -5.0, 2.0], [0.0, 6.0, 1.0]]]))
+      arg1=Data(numpy.array([[[0.0, -3.0], [4.0, 0.0], [1.0, 1.0]], [[-5.0, 0.0], [4.0, -6.0], [-7.0, 
+-1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, -6.0], [-5.0, 1.0], [-2.0, 3.0]], [[6.0, 3.0], [6.0, -1.0], [4.0, -7.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[31.0, -42.0], [3.0, -22.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-57.0, 0.0], [61.0, -12.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([[4.0, -2.0, 1.0, 3.0, -5.0], [0.0, 7.0, -1.0, 0.0, 6.0], [1.0, -5.0, 5.0, 2.0, 7.0], [1.0, -2.0, 
--6.0, 7.0, 1.0]]),self.functionspace)
-      arg1=Data(numpy.array([-2.0, 1.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-8.0, 4.0], [4.0, -2.0], [-2.0, 1.0], [-6.0, 3.0], [10.0, -5.0]], [[0.0, 0.0], [-14.0, 7.0], 
-[2.0, -1.0], [0.0, 0.0], [-12.0, 6.0]], [[-2.0, 1.0], [10.0, -5.0], [-10.0, 5.0], [-4.0, 2.0], [-14.0, 7.0]], [[-2.0, 1.0], 
-[4.0, -2.0], [12.0, -6.0], [-14.0, 7.0], [-2.0, 1.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[2.0, 6.0, 3.0], [-3.0, 1.0, -3.0], [-7.0, -6.0, -4.0], [0.0, -2.0, -4.0]], [[3.0, -6.0, 0.0], 
+[3.0, 5.0, 1.0], [1.0, 3.0, 2.0], [7.0, 1.0, 6.0]]], [[[-5.0, -7.0, 0.0], [-3.0, 3.0, -5.0], [-7.0, -5.0, -2.0], [-3.0, 3.0, 
+-2.0]], [[-3.0, 6.0, 0.0], [0.0, -5.0, 4.0], [2.0, 1.0, -5.0], [-1.0, -3.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, 7.0, -1.0], [0.0, 0.0, 5.0], [-6.0, 7.0, 2.0], [-2.0, 6.0, 0.0]], [[-1.0, 7.0, 
+-2.0], [0.0, 4.0, 2.0], [-7.0, 2.0, -4.0], [2.0, -5.0, -1.0]]], [[[-1.0, -6.0, 0.0], [1.0, 0.0, 1.0], [7.0, 2.0, 6.0], [-3.0, 
+-7.0, 5.0]], [[7.0, 6.0, 2.0], [0.0, 4.0, 4.0], [0.0, -6.0, -4.0], [6.0, -4.0, -5.0]]]]))
+      arg1=Data(numpy.array([[[[-2.0, -1.0], [-4.0, -1.0], [5.0, 1.0]], [[5.0, -2.0], [4.0, 0.0], [-1.0, 5.0]], [[-2.0, -4.0], 
+[-6.0, -6.0], [3.0, 6.0]], [[-3.0, 6.0], [0.0, -6.0], [-6.0, 6.0]]], [[[-4.0, 3.0], [4.0, 0.0], [-7.0, 0.0]], [[4.0, 3.0], 
+[-3.0, 4.0], [0.0, 7.0]], [[0.0, 4.0], [-1.0, 7.0], [-4.0, 3.0]], [[-4.0, -1.0], [-2.0, -4.0], [-4.0, 
+5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 5.0], [7.0, 1.0], [-7.0, 1.0]], [[7.0, 3.0], [1.0, -3.0], [-3.0, 1.0]], [[2.0, 
+-5.0], [-7.0, -7.0], [6.0, -7.0]], [[6.0, 7.0], [2.0, -3.0], [3.0, 1.0]]], [[[-5.0, 6.0], [7.0, 4.0], [-4.0, -5.0]], [[-3.0, 
+-7.0], [4.0, -4.0], [1.0, 1.0]], [[-6.0, 6.0], [-2.0, -7.0], [-7.0, 1.0]], [[-5.0, 7.0], [4.0, 0.0], [4.0, -2.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-63.0, 109.0], [191.0, -12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[107.0, -65.0], [-27.0, 41.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[6.0, 3.0, 3.0, 7.0, 6.0], [-7.0, 6.0, -4.0, 4.0, -7.0], [7.0, 7.0, 1.0, 6.0, 5.0], [-1.0, 1.0, 
--6.0, -5.0, -2.0]], [[-7.0, 3.0, 0.0, -3.0, 2.0], [1.0, 4.0, -7.0, 5.0, -5.0], [-7.0, 2.0, 0.0, 0.0, 1.0], [6.0, 0.0, -1.0, 
--1.0, 0.0]], [[0.0, -5.0, 4.0, 4.0, 4.0], [6.0, 0.0, 3.0, -1.0, -5.0], [-1.0, 4.0, 7.0, 3.0, -5.0], [-2.0, -5.0, -1.0, 2.0, 
-3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[-3.0, 0.0], [5.0, 6.0], [0.0, -7.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-53.0, -42.0], [6.0, 53.0], [-9.0, -28.0], [-36.0, -46.0], [-8.0, -16.0]], [[26.0, -36.0], [2.0, 
-24.0], [-23.0, -63.0], [13.0, 37.0], [-4.0, 5.0]], [[-56.0, -35.0], [-11.0, -16.0], [-3.0, -49.0], [-18.0, -21.0], [-10.0, 
-41.0]], [[33.0, 50.0], [-3.0, 35.0], [13.0, 1.0], [10.0, -20.0], [6.0, -21.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([-6.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 2.0]))
+      arg1=Data(numpy.array([[2.0, -4.0, -5.0, -5.0, -2.0], [0.0, -6.0, 0.0, 0.0, -4.0], [-3.0, -7.0, 6.0, 6.0, 2.0], [2.0, 
+-1.0, 3.0, 3.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, 4.0, 1.0, -3.0, 0.0], [5.0, 0.0, -1.0, 0.0, 0.0], [-5.0, -6.0, -5.0, -3.0, 
+-2.0], [0.0, -2.0, -3.0, -2.0, 0.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-12.0, 24.0, 30.0, 30.0, 12.0], [0.0, 36.0, 0.0, 0.0, 24.0], [18.0, 42.0, -36.0, -36.0, -12.0], 
+[-12.0, 6.0, -18.0, -18.0, 30.0]], [[-14.0, 28.0, 35.0, 35.0, 14.0], [0.0, 42.0, 0.0, 0.0, 28.0], [21.0, 49.0, -42.0, -42.0, 
+-14.0], [-14.0, 7.0, -21.0, -21.0, 35.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-20.0, -20.0, -5.0, 15.0, 0.0], [-25.0, 0.0, 5.0, 0.0, 0.0], [25.0, 30.0, 25.0, 15.0, 
+10.0], [0.0, 10.0, 15.0, 10.0, 0.0]], [[8.0, 8.0, 2.0, -6.0, 0.0], [10.0, 0.0, -2.0, 0.0, 0.0], [-10.0, -12.0, -10.0, -6.0, 
+-4.0], [0.0, -4.0, -6.0, -4.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[3.0, 7.0, 7.0, 1.0, 6.0], [-4.0, 6.0, -2.0, 1.0, -2.0], [7.0, 2.0, 7.0, 1.0, -6.0], [-1.0, 6.0, 
-4.0, -7.0, -6.0]], [[4.0, -2.0, 1.0, 2.0, 7.0], [3.0, -2.0, 5.0, -3.0, 4.0], [-1.0, 1.0, 2.0, 4.0, -4.0], [7.0, -2.0, 0.0, 0.0, 
--6.0]], [[3.0, 7.0, 2.0, 2.0, -2.0], [-7.0, 6.0, 4.0, -1.0, -3.0], [-4.0, 0.0, 7.0, 7.0, 5.0], [-4.0, -1.0, -1.0, 6.0, -5.0]]], 
-[[[5.0, 7.0, -1.0, -1.0, 0.0], [-6.0, 0.0, 3.0, 5.0, -7.0], [3.0, -4.0, 1.0, -5.0, -5.0], [-4.0, -5.0, 5.0, 7.0, 4.0]], [[2.0, 
--7.0, 1.0, 7.0, 4.0], [5.0, -7.0, -5.0, 0.0, 6.0], [3.0, 0.0, 4.0, -6.0, 0.0], [-5.0, -7.0, 1.0, -6.0, 1.0]], [[7.0, 3.0, 0.0, 
-7.0, -3.0], [-7.0, -1.0, -2.0, 5.0, 6.0], [-2.0, -3.0, 7.0, -2.0, 3.0], [-1.0, -2.0, -7.0, -7.0, -3.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-6.0, 0.0], [4.0, -3.0], [3.0, 0.0]], [[7.0, 1.0], [-3.0, -2.0], [5.0, 
-1.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[71.0, -4.0], [56.0, 30.0], [-42.0, -6.0], [15.0, -14.0], [-41.0, -32.0]], [[-77.0, -32.0], 
-[-10.0, 19.0], [70.0, -4.0], [39.0, 19.0], [-18.0, -25.0]], [[-56.0, -2.0], [-51.0, -10.0], [17.0, -6.0], [4.0, -7.0], [15.0, 
-10.0]], [[4.0, -16.0], [-71.0, 13.0], [-30.0, -4.0], [92.0, 12.0], [7.0, 17.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-2.0, 5.0, -2.0], [-3.0, -4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 0.0, -3.0], [-4.0, 4.0, 0.0]]))
+      arg1=Data(numpy.array([[[5.0, -4.0, 1.0, -4.0, 1.0], [7.0, 4.0, 5.0, 3.0, -2.0], [-3.0, 5.0, -5.0, 4.0, -6.0], [-3.0, 
+1.0, 7.0, -7.0, 5.0]], [[-3.0, 0.0, -5.0, -1.0, 1.0], [1.0, 5.0, 5.0, 3.0, -2.0], [0.0, -7.0, -2.0, -1.0, -3.0], [-3.0, -6.0, 
+-2.0, -1.0, -4.0]], [[2.0, 3.0, -7.0, 4.0, -1.0], [-2.0, 0.0, -6.0, 6.0, -6.0], [3.0, -7.0, -7.0, 1.0, -5.0], [-7.0, 0.0, -7.0, 
+2.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, 0.0, 4.0, 1.0, 2.0], [-6.0, 0.0, -2.0, 6.0, 6.0], [-1.0, 6.0, 6.0, 0.0, 4.0], 
+[7.0, 2.0, 4.0, 2.0, 6.0]], [[-6.0, -4.0, 2.0, 6.0, 5.0], [-5.0, 5.0, 7.0, 2.0, 0.0], [0.0, -2.0, 6.0, 0.0, 1.0], [-1.0, -2.0, 
+0.0, -4.0, -6.0]], [[-2.0, 1.0, -7.0, 2.0, 1.0], [2.0, -6.0, -2.0, -2.0, -7.0], [5.0, -1.0, 6.0, -5.0, 1.0], [-6.0, 3.0, -6.0, 
+0.0, -3.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-29.0, 2.0, -13.0, -5.0, 5.0], [-5.0, 17.0, 27.0, -3.0, 6.0], [0.0, -31.0, 14.0, -15.0, 7.0], 
+[5.0, -32.0, -10.0, 5.0, -42.0]], [[-3.0, 12.0, 17.0, 16.0, -7.0], [-25.0, -32.0, -35.0, -21.0, 14.0], [9.0, 13.0, 23.0, -8.0, 
+30.0], [21.0, 21.0, -13.0, 25.0, 1.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[6.0, -3.0, 21.0, -6.0, -3.0], [-6.0, 18.0, 6.0, 6.0, 21.0], [-15.0, 3.0, -18.0, 15.0, 
+-3.0], [18.0, -9.0, 18.0, 0.0, 9.0]], [[-20.0, -16.0, -8.0, 20.0, 12.0], [4.0, 20.0, 36.0, -16.0, -24.0], [4.0, -32.0, 0.0, 
+0.0, -12.0], [-32.0, -16.0, -16.0, -24.0, -48.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_constData_rank2_offset0(self):
-      arg0=Data(numpy.array([[-5.0, 1.0, 6.0, -7.0, -6.0], [5.0, 7.0, 5.0, -6.0, -4.0], [-5.0, -7.0, 0.0, 5.0, -4.0], [-3.0, 
-6.0, 0.0, 7.0, 7.0]]),self.functionspace)
-      arg1=Data(numpy.array([[4.0, 2.0, -6.0, -2.0, 0.0], [0.0, -7.0, 0.0, -7.0, -4.0], [5.0, -7.0, 2.0, -5.0, 7.0], [0.0, 5.0, 
-2.0, -5.0, -6.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-20.0, -10.0, 30.0, 10.0, 0.0], [0.0, 35.0, 0.0, 35.0, 20.0], [-25.0, 35.0, -10.0, 25.0, -35.0], 
-[0.0, -25.0, -10.0, 25.0, 30.0]], [[4.0, 2.0, -6.0, -2.0, 0.0], [0.0, -7.0, 0.0, -7.0, -4.0], [5.0, -7.0, 2.0, -5.0, 7.0], 
-[0.0, 5.0, 2.0, -5.0, -6.0]], [[24.0, 12.0, -36.0, -12.0, 0.0], [0.0, -42.0, 0.0, -42.0, -24.0], [30.0, -42.0, 12.0, -30.0, 
-42.0], [0.0, 30.0, 12.0, -30.0, -36.0]], [[-28.0, -14.0, 42.0, 14.0, 0.0], [0.0, 49.0, 0.0, 49.0, 28.0], [-35.0, 49.0, -14.0, 
-35.0, -49.0], [0.0, -35.0, -14.0, 35.0, 42.0]], [[-24.0, -12.0, 36.0, 12.0, 0.0], [0.0, 42.0, 0.0, 42.0, 24.0], [-30.0, 42.0, 
--12.0, 30.0, -42.0], [0.0, -30.0, -12.0, 30.0, 36.0]]], [[[20.0, 10.0, -30.0, -10.0, 0.0], [0.0, -35.0, 0.0, -35.0, -20.0], 
-[25.0, -35.0, 10.0, -25.0, 35.0], [0.0, 25.0, 10.0, -25.0, -30.0]], [[28.0, 14.0, -42.0, -14.0, 0.0], [0.0, -49.0, 0.0, -49.0, 
--28.0], [35.0, -49.0, 14.0, -35.0, 49.0], [0.0, 35.0, 14.0, -35.0, -42.0]], [[20.0, 10.0, -30.0, -10.0, 0.0], [0.0, -35.0, 0.0, 
--35.0, -20.0], [25.0, -35.0, 10.0, -25.0, 35.0], [0.0, 25.0, 10.0, -25.0, -30.0]], [[-24.0, -12.0, 36.0, 12.0, 0.0], [0.0, 
-42.0, 0.0, 42.0, 24.0], [-30.0, 42.0, -12.0, 30.0, -42.0], [0.0, -30.0, -12.0, 30.0, 36.0]], [[-16.0, -8.0, 24.0, 8.0, 0.0], 
-[0.0, 28.0, 0.0, 28.0, 16.0], [-20.0, 28.0, -8.0, 20.0, -28.0], [0.0, -20.0, -8.0, 20.0, 24.0]]], [[[-20.0, -10.0, 30.0, 10.0, 
-0.0], [0.0, 35.0, 0.0, 35.0, 20.0], [-25.0, 35.0, -10.0, 25.0, -35.0], [0.0, -25.0, -10.0, 25.0, 30.0]], [[-28.0, -14.0, 42.0, 
-14.0, 0.0], [0.0, 49.0, 0.0, 49.0, 28.0], [-35.0, 49.0, -14.0, 35.0, -49.0], [0.0, -35.0, -14.0, 35.0, 42.0]], [[0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[20.0, 10.0, -30.0, -10.0, 0.0], 
-[0.0, -35.0, 0.0, -35.0, -20.0], [25.0, -35.0, 10.0, -25.0, 35.0], [0.0, 25.0, 10.0, -25.0, -30.0]], [[-16.0, -8.0, 24.0, 8.0, 
-0.0], [0.0, 28.0, 0.0, 28.0, 16.0], [-20.0, 28.0, -8.0, 20.0, -28.0], [0.0, -20.0, -8.0, 20.0, 24.0]]], [[[-12.0, -6.0, 18.0, 
-6.0, 0.0], [0.0, 21.0, 0.0, 21.0, 12.0], [-15.0, 21.0, -6.0, 15.0, -21.0], [0.0, -15.0, -6.0, 15.0, 18.0]], [[24.0, 12.0, 
--36.0, -12.0, 0.0], [0.0, -42.0, 0.0, -42.0, -24.0], [30.0, -42.0, 12.0, -30.0, 42.0], [0.0, 30.0, 12.0, -30.0, -36.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[28.0, 14.0, -42.0, 
--14.0, 0.0], [0.0, -49.0, 0.0, -49.0, -28.0], [35.0, -49.0, 14.0, -35.0, 49.0], [0.0, 35.0, 14.0, -35.0, -42.0]], [[28.0, 14.0, 
--42.0, -14.0, 0.0], [0.0, -49.0, 0.0, -49.0, -28.0], [35.0, -49.0, 14.0, -35.0, 49.0], [0.0, 35.0, 14.0, -35.0, 
--42.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-4.0, 3.0, 0.0], [4.0, 7.0, -6.0]], [[3.0, -6.0, -2.0], [5.0, -1.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, -2.0, 6.0], [6.0, -1.0, 7.0]], [[1.0, 1.0, 2.0], [-6.0, 3.0, 0.0]]]))
+      arg1=Data(numpy.array([[[[0.0, 1.0, 5.0, 2.0, 1.0], [1.0, 1.0, 5.0, 0.0, 6.0], [4.0, 5.0, -5.0, 0.0, -2.0], [3.0, -6.0, 
+6.0, 4.0, 3.0]], [[-6.0, 1.0, 0.0, -2.0, -5.0], [4.0, -1.0, -7.0, 0.0, 3.0], [-2.0, 0.0, -3.0, 1.0, 7.0], [0.0, 5.0, 1.0, -2.0, 
+-7.0]], [[-2.0, -2.0, 0.0, -1.0, -4.0], [6.0, 0.0, 0.0, -7.0, 3.0], [5.0, -5.0, 2.0, 2.0, -1.0], [4.0, -4.0, -5.0, 0.0, 4.0]]], 
+[[[2.0, 4.0, -3.0, 2.0, 7.0], [-4.0, 0.0, 5.0, 2.0, 7.0], [1.0, -3.0, 7.0, 0.0, -2.0], [-2.0, 3.0, 4.0, 7.0, -4.0]], [[7.0, 
+-1.0, -2.0, -4.0, 3.0], [-5.0, -3.0, 3.0, 3.0, 1.0], [5.0, -4.0, -4.0, -1.0, 5.0], [7.0, 2.0, 0.0, 7.0, 3.0]], [[2.0, 3.0, 2.0, 
+6.0, -7.0], [-3.0, 2.0, 7.0, -4.0, -2.0], [1.0, 7.0, 6.0, 4.0, -7.0], [-3.0, -5.0, -2.0, 3.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, 3.0, -4.0, 6.0, 0.0], [-2.0, 1.0, 0.0, 0.0, 4.0], [-1.0, 0.0, -3.0, -1.0, 
+-6.0], [-1.0, 6.0, -3.0, 3.0, -4.0]], [[6.0, 7.0, 5.0, 0.0, -6.0], [-1.0, 7.0, -3.0, 1.0, 0.0], [3.0, 0.0, -2.0, 3.0, -7.0], 
+[2.0, 0.0, 5.0, 0.0, 4.0]], [[-3.0, 4.0, 7.0, -4.0, 0.0], [3.0, 6.0, 5.0, -5.0, -2.0], [-4.0, -3.0, 0.0, 0.0, -3.0], [2.0, 2.0, 
+-4.0, 0.0, -3.0]]], [[[1.0, 4.0, 3.0, 4.0, -7.0], [2.0, 4.0, -1.0, 3.0, 0.0], [-1.0, 3.0, -3.0, 4.0, 6.0], [1.0, -6.0, -6.0, 
+-3.0, 4.0]], [[-2.0, 0.0, 6.0, 4.0, 5.0], [6.0, 3.0, -2.0, 6.0, 2.0], [5.0, 2.0, 5.0, 1.0, -3.0], [7.0, 3.0, -1.0, 1.0, 0.0]], 
+[[6.0, 7.0, -7.0, -6.0, -6.0], [2.0, 7.0, 7.0, -5.0, -4.0], [3.0, 0.0, -4.0, 5.0, -7.0], [-3.0, 6.0, -5.0, -1.0, -1.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[27.0, -10.0, -58.0, -70.0, 72.0], [-25.0, -40.0, -42.0, 53.0, 32.0], [11.0, -102.0, -25.0, -28.0, 
+98.0], [47.0, 95.0, 7.0, 37.0, -10.0]], [[43.0, 22.0, 2.0, 34.0, 73.0], [-48.0, 12.0, 79.0, 21.0, 28.0], [14.0, 14.0, 38.0, 
+-9.0, -61.0], [-16.0, -27.0, 42.0, 52.0, 20.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[56.0, 65.0, 19.0, -82.0, -77.0], [52.0, 86.0, 81.0, -55.0, -66.0], [-14.0, -2.0, 
+-29.0, 58.0, 22.0], [-8.0, -21.0, -86.0, -44.0, 15.0]], [[-18.0, -6.0, 15.0, -14.0, 51.0], [9.0, 5.0, 7.0, -9.0, 6.0], [15.0, 
+-18.0, 28.0, -19.0, -64.0], [20.0, 55.0, 27.0, 24.0, -30.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([[[-4.0, -6.0, 5.0, -3.0, 0.0], [5.0, 5.0, 4.0, 0.0, 2.0], [-2.0, 1.0, -3.0, 5.0, 7.0], [-4.0, 5.0, 
-2.0, 3.0, -2.0]], [[-2.0, -5.0, 5.0, -1.0, -1.0], [-3.0, 0.0, -2.0, 1.0, 5.0], [0.0, 0.0, 2.0, 7.0, -4.0], [2.0, 0.0, 4.0, 7.0, 
-1.0]], [[5.0, 1.0, 2.0, 0.0, 4.0], [-5.0, 2.0, -5.0, -1.0, 0.0], [0.0, -2.0, 6.0, -3.0, 0.0], [-6.0, -5.0, 2.0, 2.0, 
-0.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[5.0, -5.0, 3.0, 1.0, -1.0], [2.0, -1.0, -2.0, 6.0, 4.0], [7.0, 4.0, -2.0, -4.0, 4.0], [7.0, 4.0, 
--2.0, -1.0, -6.0]], [[0.0, 6.0, -7.0, 6.0, 3.0], [7.0, -3.0, -2.0, 6.0, 6.0], [0.0, -7.0, 6.0, -6.0, -6.0], [-7.0, 4.0, 5.0, 
-0.0, 7.0]], [[7.0, -3.0, 7.0, 5.0, 4.0], [-1.0, 2.0, -1.0, 6.0, -2.0], [-1.0, 0.0, -2.0, 5.0, -2.0], [-2.0, -4.0, 5.0, 4.0, 
-5.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[15.0, -7.0, 37.0, 9.0, 18.0], [-27.0, 20.0, 7.0, -6.0, -38.0], [-33.0, -2.0, -14.0, 53.0, 
--14.0], [-24.0, -44.0, 23.0, 24.0, 35.0]], [[-23.0, -3.0, 24.0, -31.0, -5.0], [-48.0, 23.0, 21.0, -60.0, -56.0], [-43.0, 11.0, 
--20.0, 59.0, 4.0], [-9.0, -48.0, -8.0, 10.0, 6.0]], [[39.0, -1.0, -6.0, 45.0, 18.0], [43.0, -16.0, -22.0, 72.0, 46.0], [33.0, 
--15.0, 16.0, -40.0, -14.0], [-4.0, 32.0, 25.0, 3.0, 15.0]], [[-15.0, 9.0, -2.0, -9.0, 0.0], [-13.0, 6.0, 8.0, -24.0, -18.0], 
-[-21.0, -5.0, 0.0, 18.0, -6.0], [-14.0, -16.0, 1.0, 3.0, 11.0]], [[28.0, -18.0, 35.0, 14.0, 13.0], [-11.0, 11.0, -2.0, 18.0, 
--14.0], [-4.0, 7.0, -14.0, 26.0, -2.0], [-1.0, -20.0, 15.0, 16.0, 13.0]]], [[[-10.0, -28.0, 1.0, -38.0, -34.0], [-6.0, -6.0, 
-1.0, -18.0, 12.0], [40.0, 41.0, -18.0, -27.0, 48.0], [66.0, 28.0, -50.0, -25.0, -76.0]], [[39.0, -31.0, 29.0, 15.0, 3.0], [8.0, 
--1.0, -12.0, 42.0, 16.0], [33.0, 20.0, -14.0, -10.0, 16.0], [31.0, 12.0, 0.0, 3.0, -20.0]], [[-15.0, -17.0, -9.0, -33.0, 
--30.0], [-1.0, -8.0, 1.0, -18.0, 14.0], [33.0, 30.0, -10.0, -29.0, 38.0], [52.0, 28.0, -43.0, -24.0, -63.0]], [[-7.0, 9.0, 
--14.0, 1.0, -1.0], [8.0, -5.0, -1.0, 0.0, 8.0], [1.0, -7.0, 8.0, -11.0, -4.0], [-5.0, 8.0, 0.0, -4.0, 2.0]], [[10.0, 20.0, 
--29.0, 32.0, 13.0], [39.0, -17.0, -14.0, 42.0, 38.0], [14.0, -27.0, 26.0, -38.0, -22.0], [-21.0, 28.0, 21.0, -2.0, 23.0]]], 
-[[[-10.0, 10.0, -6.0, -2.0, 2.0], [-4.0, 2.0, 4.0, -12.0, -8.0], [-14.0, -8.0, 4.0, 8.0, -8.0], [-14.0, -8.0, 4.0, 2.0, 12.0]], 
-[[-9.0, 1.0, -11.0, -9.0, -9.0], [4.0, -5.0, 0.0, -6.0, 8.0], [9.0, 4.0, 2.0, -14.0, 8.0], [11.0, 12.0, -12.0, -9.0, -16.0]], 
-[[27.0, 9.0, 19.0, 39.0, 33.0], [2.0, 9.0, -4.0, 30.0, -12.0], [-27.0, -26.0, 6.0, 30.0, -36.0], [-47.0, -28.0, 46.0, 27.0, 
-62.0]], [[4.0, 26.0, -55.0, 32.0, 4.0], [62.0, -32.0, -21.0, 54.0, 68.0], [38.0, -29.0, 38.0, -77.0, -16.0], [-8.0, 60.0, 10.0, 
--17.0, 4.0]], [[35.0, -59.0, 49.0, -17.0, -19.0], [-14.0, 5.0, -6.0, 18.0, 4.0], [49.0, 56.0, -38.0, -4.0, 52.0], [77.0, 12.0, 
--34.0, -7.0, -70.0]]], [[[-62.0, 50.0, -68.0, -22.0, -14.0], [12.0, -14.0, 10.0, -48.0, 8.0], [-22.0, -30.0, 32.0, -26.0, 
--16.0], [-30.0, 16.0, -12.0, -20.0, 8.0]], [[-10.0, -10.0, -20.0, -20.0, -25.0], [15.0, -15.0, -5.0, 0.0, 30.0], [40.0, 20.0, 
-0.0, -45.0, 30.0], [45.0, 40.0, -35.0, -25.0, -55.0]], [[24.0, 8.0, -8.0, 36.0, 18.0], [30.0, -10.0, -14.0, 48.0, 28.0], [12.0, 
--20.0, 16.0, -22.0, -20.0], [-18.0, 16.0, 26.0, 6.0, 26.0]], [[29.0, 21.0, -26.0, 55.0, 26.0], [53.0, -20.0, -22.0, 72.0, 
-50.0], [19.0, -37.0, 32.0, -44.0, -34.0], [-32.0, 32.0, 39.0, 5.0, 41.0]], [[-10.0, 16.0, -13.0, 4.0, 5.0], [3.0, -1.0, 2.0, 
--6.0, -2.0], [-14.0, -15.0, 10.0, 2.0, -14.0], [-21.0, -4.0, 9.0, 2.0, 19.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-4.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -1.0]))
+      arg1=Data(numpy.array([[[-7.0, -2.0], [3.0, 6.0]], [[0.0, -1.0], [-1.0, -4.0]], [[3.0, -4.0], [1.0, -1.0]], [[1.0, -2.0], 
+[-5.0, -4.0]], [[-1.0, 0.0], [2.0, 1.0]], [[-3.0, -1.0], [-2.0, -1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 7.0], [1.0, 7.0]], [[5.0, -6.0], [7.0, 6.0]], [[2.0, -2.0], [-5.0, 0.0]], 
+[[-5.0, 5.0], [-6.0, -6.0]], [[0.0, -7.0], [-4.0, -2.0]], [[-4.0, 6.0], [3.0, -1.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[28.0, 8.0], [-12.0, -24.0]], [[0.0, 4.0], [4.0, 16.0]], [[-12.0, 16.0], [-4.0, 4.0]], [[-4.0, 
+8.0], [20.0, 16.0]], [[4.0, 0.0], [-8.0, -4.0]], [[12.0, 4.0], [8.0, 4.0]]], [[[21.0, 6.0], [-9.0, -18.0]], [[0.0, 3.0], [3.0, 
+12.0]], [[-9.0, 12.0], [-3.0, 3.0]], [[-3.0, 6.0], [15.0, 12.0]], [[3.0, 0.0], [-6.0, -3.0]], [[9.0, 3.0], [6.0, 
+3.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 7.0], [1.0, 7.0]], [[5.0, -6.0], [7.0, 6.0]], [[2.0, -2.0], [-5.0, 0.0]], 
+[[-5.0, 5.0], [-6.0, -6.0]], [[0.0, -7.0], [-4.0, -2.0]], [[-4.0, 6.0], [3.0, -1.0]]], [[[0.0, -7.0], [-1.0, -7.0]], [[-5.0, 
+6.0], [-7.0, -6.0]], [[-2.0, 2.0], [5.0, 0.0]], [[5.0, -5.0], [6.0, 6.0]], [[0.0, 7.0], [4.0, 2.0]], [[4.0, -6.0], [-3.0, 
+1.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[-2.0, -1.0, -3.0], [0.0, -4.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, -1.0, 7.0], [-2.0, -2.0, 6.0]]))
+      arg1=Data(numpy.array([[[[-2.0, -4.0], [4.0, -2.0]], [[-4.0, 0.0], [-7.0, 4.0]], [[6.0, -2.0], [0.0, 2.0]], [[2.0, -4.0], 
+[2.0, -1.0]], [[3.0, -1.0], [2.0, -4.0]], [[2.0, -1.0], [-1.0, 3.0]]], [[[5.0, 1.0], [-7.0, -4.0]], [[-4.0, 4.0], [-6.0, 4.0]], 
+[[6.0, -3.0], [5.0, -6.0]], [[-4.0, 4.0], [-3.0, 0.0]], [[-7.0, 5.0], [4.0, 5.0]], [[3.0, 5.0], [5.0, 5.0]]], [[[0.0, 4.0], 
+[-5.0, 5.0]], [[-3.0, -6.0], [2.0, -1.0]], [[-2.0, -4.0], [0.0, 4.0]], [[6.0, 4.0], [-7.0, -3.0]], [[-4.0, -1.0], [6.0, 4.0]], 
+[[-4.0, 7.0], [-3.0, 5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 6.0], [-4.0, 7.0]], [[0.0, 3.0], [7.0, 4.0]], [[-6.0, 0.0], [2.0, -4.0]], 
+[[-2.0, 0.0], [-5.0, -6.0]], [[-5.0, -2.0], [0.0, 1.0]], [[-6.0, 4.0], [1.0, 7.0]]], [[[3.0, -7.0], [-1.0, -5.0]], [[1.0, 0.0], 
+[-6.0, -7.0]], [[-3.0, 4.0], [5.0, 5.0]], [[-4.0, 3.0], [-3.0, 7.0]], [[0.0, 5.0], [5.0, 3.0]], [[4.0, -7.0], [-1.0, 1.0]]], 
+[[[3.0, 6.0], [-2.0, 5.0]], [[7.0, -3.0], [0.0, -5.0]], [[2.0, -3.0], [-1.0, 3.0]], [[1.0, -6.0], [-6.0, 1.0]], [[0.0, -5.0], 
+[-4.0, 4.0]], [[-3.0, 3.0], [7.0, 4.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-1.0, -5.0], [14.0, -7.0]], [[21.0, 14.0], [14.0, -9.0]], [[-12.0, 19.0], [-5.0, -10.0]], 
+[[-18.0, -8.0], [20.0, 11.0]], [[13.0, 0.0], [-26.0, -9.0]], [[5.0, -24.0], [6.0, -26.0]]], [[[-20.0, -12.0], [38.0, 6.0]], 
+[[22.0, -4.0], [20.0, -14.0]], [[-20.0, 20.0], [-20.0, 16.0]], [[4.0, -24.0], [26.0, 6.0]], [[36.0, -18.0], [-28.0, -28.0]], 
+[[-4.0, -34.0], [-14.0, -30.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[30.0, 31.0], [-1.0, 19.0]], [[48.0, -30.0], [-15.0, -40.0]], [[35.0, -25.0], [-18.0, 
+28.0]], [[17.0, -45.0], [-24.0, 18.0]], [[15.0, -34.0], [-33.0, 22.0]], [[-7.0, 16.0], [47.0, 6.0]]], [[[20.0, 38.0], [-2.0, 
+26.0]], [[40.0, -24.0], [-2.0, -24.0]], [[30.0, -26.0], [-20.0, 16.0]], [[18.0, -42.0], [-20.0, 4.0]], [[10.0, -36.0], [-34.0, 
+16.0]], [[-14.0, 24.0], [42.0, 8.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[-2.0, 3.0, -3.0, 5.0, -2.0], [7.0, 5.0, 1.0, 6.0, -6.0], [2.0, -7.0, 7.0, -6.0, 7.0], [7.0, 
-1.0, -1.0, -1.0, -1.0]], [[0.0, -7.0, 5.0, 5.0, -1.0], [4.0, 4.0, 6.0, -7.0, -4.0], [0.0, 0.0, 0.0, -3.0, 2.0], [4.0, -3.0, 
-5.0, 5.0, 0.0]], [[7.0, -3.0, 1.0, 5.0, -5.0], [-7.0, -5.0, -3.0, 1.0, 5.0], [-1.0, -3.0, 3.0, 7.0, -7.0], [-2.0, 0.0, 7.0, 
--6.0, 5.0]]], [[[3.0, 0.0, -7.0, -4.0, 7.0], [4.0, 7.0, -2.0, 2.0, -3.0], [-4.0, 6.0, -2.0, 0.0, 4.0], [-5.0, -6.0, 6.0, -6.0, 
--4.0]], [[-4.0, -4.0, -3.0, -1.0, 5.0], [-4.0, -6.0, 2.0, -5.0, 4.0], [4.0, -2.0, 2.0, 5.0, 3.0], [-7.0, 0.0, 5.0, 0.0, -5.0]], 
-[[0.0, -5.0, 0.0, -3.0, -2.0], [-1.0, -2.0, -6.0, -5.0, -4.0], [4.0, -3.0, -1.0, 4.0, 3.0], [-6.0, 3.0, -5.0, 3.0, 
-5.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-7.0, -7.0, -5.0, -3.0, 0.0], [-2.0, 3.0, 1.0, -2.0, 7.0], [1.0, 4.0, -1.0, 4.0, -6.0], [7.0, 
-3.0, 5.0, -1.0, 5.0]], [[0.0, 0.0, -5.0, 1.0, 6.0], [2.0, -5.0, -4.0, -2.0, 5.0], [-3.0, 0.0, -2.0, 2.0, -5.0], [5.0, 5.0, 2.0, 
--4.0, 0.0]], [[0.0, -2.0, 4.0, -5.0, -6.0], [-7.0, 3.0, 0.0, 3.0, 4.0], [2.0, 3.0, -1.0, 6.0, -5.0], [-6.0, 1.0, -6.0, -1.0, 
--6.0]]], [[[-7.0, -1.0, 1.0, 6.0, -2.0], [5.0, 0.0, -2.0, 1.0, -2.0], [-6.0, -6.0, 0.0, -3.0, 7.0], [0.0, -6.0, 1.0, -2.0, 
--2.0]], [[6.0, -1.0, -5.0, 2.0, 0.0], [-3.0, 6.0, 5.0, 0.0, 7.0], [-1.0, -7.0, 6.0, 0.0, -5.0], [3.0, -4.0, -6.0, -4.0, 5.0]], 
-[[6.0, 1.0, -4.0, -5.0, -2.0], [-6.0, 4.0, 3.0, -4.0, -7.0], [6.0, 0.0, 7.0, 3.0, -5.0], [-1.0, 2.0, -1.0, -5.0, 
--3.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[-31.0, 1.0, 61.0, -19.0, -48.0], [-18.0, -9.0, -28.0, 28.0, -20.0], [-2.0, 23.0, -29.0, 25.0, 
-18.0], [-68.0, -1.0, -25.0, 5.0, -78.0]], [[-75.0, -16.0, 48.0, 16.0, -14.0], [43.0, -9.0, -4.0, 19.0, -19.0], [-8.0, 31.0, 
--45.0, -35.0, 77.0], [-3.0, -23.0, 48.0, 69.0, 28.0]], [[52.0, 29.0, 2.0, -39.0, 38.0], [-17.0, -49.0, -24.0, -8.0, 1.0], 
-[29.0, 54.0, -26.0, 25.0, -46.0], [-11.0, 71.0, 0.0, 8.0, -22.0]], [[-31.0, -43.0, -17.0, -46.0, 14.0], [-34.0, -13.0, -21.0, 
-3.0, 102.0], [7.0, 66.0, -47.0, 63.0, -88.0], [30.0, 67.0, 10.0, -3.0, 7.0]], [[-17.0, 10.0, -15.0, 92.0, 14.0], [69.0, 6.0, 
-7.0, 6.0, -4.0], [-68.0, -100.0, 25.0, -67.0, 76.0], [28.0, -82.0, -3.0, -13.0, 37.0]]], [[[-107.0, -36.0, -55.0, 39.0, 60.0], 
-[81.0, -48.0, -40.0, -35.0, 12.0], [-45.0, 11.0, -39.0, -21.0, 26.0], [100.0, 24.0, 114.0, -3.0, 52.0]], [[-132.0, -28.0, 
--20.0, 54.0, 44.0], [98.0, -64.0, -61.0, -18.0, -7.0], [-65.0, 5.0, -58.0, -29.0, 64.0], [69.0, 8.0, 108.0, 4.0, 17.0]], 
-[[-17.0, -7.0, -35.0, 40.0, 70.0], [51.0, -48.0, -27.0, -1.0, 85.0], [-49.0, -7.0, -40.0, -14.0, -15.0], [67.0, 22.0, 27.0, 
-4.0, 55.0]], [[-116.0, -46.0, 56.0, -3.0, -42.0], [22.0, 6.0, -10.0, 27.0, 7.0], [-8.0, 50.0, -58.0, -5.0, 58.0], [-9.0, -18.0, 
-47.0, 62.0, 10.0]], [[63.0, 27.0, 63.0, -1.0, -40.0], [-34.0, 25.0, 24.0, 48.0, 20.0], [6.0, -19.0, 5.0, -5.0, 10.0], [-76.0, 
--39.0, -91.0, 27.0, -22.0]]], [[[62.0, -8.0, -54.0, -37.0, 6.0], [-53.0, 43.0, 42.0, -27.0, 18.0], [44.0, 1.0, 51.0, 26.0, 
--75.0], [28.0, 21.0, -16.0, -29.0, 32.0]], [[-23.0, 48.0, 51.0, 83.0, 12.0], [89.0, -54.0, -38.0, 23.0, -66.0], [-65.0, -59.0, 
--23.0, -73.0, 124.0], [-34.0, -58.0, 4.0, 21.0, -30.0]], [[-29.0, -56.0, -31.0, -39.0, -12.0], [-45.0, 38.0, 18.0, -3.0, 86.0], 
-[17.0, 35.0, -5.0, 49.0, -76.0], [38.0, 26.0, 4.0, -9.0, 34.0]], [[96.0, 27.0, 32.0, -30.0, -68.0], [-82.0, 64.0, 43.0, 23.0, 
--22.0], [36.0, -38.0, 63.0, 24.0, -29.0], [-88.0, -38.0, -112.0, -29.0, -59.0]], [[-41.0, -39.0, -96.0, 31.0, 40.0], [32.0, 
-20.0, 15.0, -47.0, 23.0], [-22.0, -38.0, 35.0, -13.0, -19.0], [107.0, -6.0, 64.0, -43.0, 75.0]]], [[[-92.0, -39.0, -9.0, -21.0, 
-58.0], [40.0, -71.0, -52.0, -9.0, 64.0], [-8.0, 101.0, -97.0, 21.0, -22.0], [66.0, 85.0, 98.0, 47.0, 40.0]], [[53.0, 2.0, -8.0, 
--57.0, -12.0], [-56.0, 30.0, 34.0, -14.0, -17.0], [64.0, 40.0, 26.0, 25.0, -48.0], [-11.0, 30.0, -10.0, 8.0, 8.0]], [[-35.0, 
--23.0, 9.0, 44.0, -14.0], [8.0, 3.0, -23.0, 39.0, 104.0], [-73.0, -54.0, -21.0, 15.0, -12.0], [-4.0, -37.0, -56.0, -33.0, 
--19.0]], [[67.0, 28.0, -62.0, -13.0, 72.0], [6.0, -34.0, 0.0, -44.0, -15.0], [26.0, 14.0, 18.0, -3.0, -46.0], [51.0, 58.0, 
-32.0, -16.0, 34.0]], [[35.0, 11.0, 26.0, -81.0, -32.0], [-68.0, 2.0, -3.0, -7.0, -49.0], [68.0, 70.0, 1.0, 53.0, -47.0], 
-[-57.0, 56.0, -14.0, -1.0, -67.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([6.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, 7.0]))
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-12.0, -12.0])+(1.-msk_ref)*numpy.array([16.0, -28.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[-3.0, 4.0, -7.0, 1.0, 2.0], [4.0, 4.0, 4.0, 4.0, 3.0], [-2.0, 1.0, 0.0, -1.0, 1.0], [2.0, 3.0, 
--3.0, -4.0, 4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[5.0, 7.0, 4.0], [-4.0, -4.0, 1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 3.0, 0.0], [-2.0, 0.0, 2.0]]))
+      arg1=Data(numpy.array([7.0, 2.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, -6.0, 0.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-0.0, 0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 
--0.0, -0.0, 0.0]])+(1.-msk_ref)*numpy.array([[6.0, -8.0, 14.0, -2.0, -4.0], [-8.0, -8.0, -8.0, -8.0, -6.0], [4.0, -2.0, -0.0, 
-2.0, -2.0], [-4.0, -6.0, 6.0, 8.0, -8.0]])
+      ref=msk_ref*numpy.array([33.0, -40.0])+(1.-msk_ref)*numpy.array([-18.0, 0.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not res.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-4.0, 0.0, 3.0], [5.0, -4.0, -3.0]], [[1.0, 4.0, 7.0], [-5.0, -1.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, -2.0, -5.0], [-2.0, 0.0, 3.0]], [[-7.0, 2.0, 0.0], [-2.0, 4.0, -4.0]]]))
+      arg1=Data(numpy.array([[2.0, 2.0, 7.0], [-3.0, 3.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, -1.0, -7.0], [1.0, -1.0, 1.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-29.0, 66.0])+(1.-msk_ref)*numpy.array([38.0, 16.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[-6.0, 1.0, -4.0, -7.0, 7.0], [1.0, 2.0, 3.0, -3.0, 1.0], [7.0, 0.0, 0.0, 4.0, -5.0], [2.0, 6.0, 
--4.0, 1.0, -2.0]], [[4.0, 3.0, -6.0, 3.0, -3.0], [4.0, 7.0, -1.0, 7.0, 0.0], [-5.0, 3.0, 7.0, 0.0, 5.0], [0.0, 6.0, -1.0, 1.0, 
--1.0]], [[4.0, 6.0, -2.0, -5.0, -1.0], [6.0, -1.0, 2.0, -4.0, 2.0], [3.0, -7.0, 0.0, 2.0, -5.0], [1.0, 3.0, 6.0, 2.0, 
-6.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([2.0, 7.0, -7.0])+(1.-msk_arg1)*numpy.array([0.0, -5.0, 7.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-5.0, 7.0, 4.0], [-3.0, -6.0, 0.0], [-1.0, -3.0, -7.0], [0.0, 3.0, 0.0]], [[5.0, 5.0, -3.0], 
+[-4.0, 4.0, -1.0], [-3.0, 0.0, -6.0], [4.0, 0.0, -2.0]]], [[[-5.0, 4.0, -5.0], [-7.0, 4.0, 3.0], [-5.0, -2.0, -4.0], [-2.0, 
+0.0, -1.0]], [[2.0, -7.0, 0.0], [7.0, 0.0, 6.0], [-7.0, -5.0, 2.0], [0.0, 3.0, 1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 4.0, 5.0], [-1.0, 0.0, 6.0], [4.0, -6.0, -6.0], [4.0, -1.0, -5.0]], [[-4.0, 
+2.0, 5.0], [4.0, 1.0, -6.0], [6.0, -7.0, -3.0], [-1.0, 7.0, -1.0]]], [[[4.0, -3.0, 4.0], [-7.0, 3.0, -2.0], [0.0, 0.0, -1.0], 
+[4.0, -4.0, 0.0]], [[7.0, -4.0, 4.0], [0.0, -3.0, -7.0], [0.0, 6.0, -5.0], [5.0, 7.0, 6.0]]]]))
+      arg1=Data(numpy.array([[[4.0, -1.0, -3.0], [-7.0, -2.0, -1.0], [0.0, 2.0, 0.0], [0.0, -6.0, -7.0]], [[-4.0, 3.0, 5.0], 
+[6.0, -5.0, -5.0], [-5.0, 0.0, 5.0], [-4.0, 1.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -6.0, -3.0], [4.0, 6.0, 6.0], [3.0, 6.0, 7.0], [5.0, 5.0, -3.0]], [[-3.0, -6.0, 
+3.0], [-7.0, -1.0, 0.0], [-2.0, -1.0, -2.0], [-6.0, 3.0, -6.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-12.0, -19.0, -36.0, 42.0, 0.0], [-12.0, 60.0, -15.0, 71.0, -12.0], [-42.0, 70.0, 49.0, -6.0, 
-60.0], [-3.0, 33.0, -57.0, -5.0, -53.0]])+(1.-msk_ref)*numpy.array([[8.0, 27.0, 16.0, -50.0, 8.0], [22.0, -42.0, 19.0, -63.0, 
-14.0], [46.0, -64.0, -35.0, 14.0, -60.0], [7.0, -9.0, 47.0, 9.0, 47.0]])
+      ref=msk_ref*numpy.array([-110.0, 58.0])+(1.-msk_ref)*numpy.array([-27.0, -30.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[2.0, 1.0, -1.0, 5.0, 7.0], [-6.0, -3.0, 6.0, -3.0, -2.0], [5.0, -2.0, -2.0, -7.0, -7.0], [-3.0, 
--5.0, -7.0, 6.0, 3.0]], [[1.0, 4.0, 7.0, -4.0, -5.0], [-6.0, -2.0, -3.0, -1.0, -6.0], [6.0, 7.0, 6.0, -4.0, 6.0], [-7.0, 6.0, 
-5.0, -6.0, 2.0]], [[-2.0, -3.0, -4.0, 3.0, -5.0], [-7.0, -2.0, 1.0, -4.0, -2.0], [4.0, 1.0, 3.0, -2.0, 0.0], [-6.0, -1.0, 6.0, 
-2.0, -1.0]]], [[[7.0, 1.0, -3.0, 0.0, 6.0], [-2.0, 3.0, -1.0, 5.0, 7.0], [2.0, 0.0, 5.0, -3.0, 6.0], [3.0, 6.0, 2.0, -1.0, 
-3.0]], [[-5.0, 1.0, 6.0, 2.0, 4.0], [-6.0, -7.0, 1.0, -1.0, 0.0], [-2.0, 2.0, 1.0, -2.0, -7.0], [3.0, 4.0, 3.0, 3.0, -3.0]], 
-[[-1.0, 4.0, -7.0, 6.0, -3.0], [6.0, -7.0, 0.0, 4.0, -2.0], [-2.0, -1.0, -1.0, 3.0, -1.0], [-1.0, 1.0, -2.0, -1.0, 
-0.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 0.0, 0.0], [-5.0, 2.0, 3.0]])+(1.-msk_arg1)*numpy.array([[3.0, -7.0, 5.0], [-1.0, -1.0, 
--1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([4.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, 5.0]))
+      arg1=Data(numpy.array([-1.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-2.0, 4.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-46.0, 10.0, 5.0, 27.0, -24.0], [10.0, -53.0, 13.0, -18.0, -43.0], [-15.0, -1.0, -28.0, 13.0, 
--54.0], [-15.0, -24.0, -17.0, 14.0, -18.0]])+(1.-msk_ref)*numpy.array([[-12.0, -46.0, -68.0, 50.0, 24.0], [-9.0, 6.0, 44.0, 
--30.0, 21.0], [-5.0, -51.0, -38.0, -1.0, -61.0], [5.0, -73.0, -29.0, 69.0, -10.0]])
+      ref=msk_ref*numpy.array([[-4.0, 0.0], [3.0, 0.0]])+(1.-msk_ref)*numpy.array([[-8.0, 16.0], [-10.0, 20.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([[5.0, -6.0, -1.0, -6.0, -1.0], [-7.0, 2.0, 7.0, -7.0, 5.0], [-3.0, -7.0, -2.0, -3.0, 0.0], [2.0, 
--4.0, -3.0, -4.0, -5.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, 3.0])+(1.-msk_arg1)*numpy.array([6.0, 0.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[0.0, 3.0, -5.0], [3.0, 2.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -7.0, 1.0], [0.0, 7.0, 7.0]]))
+      arg1=Data(numpy.array([[6.0, 0.0], [-3.0, 3.0], [3.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 5.0], [-3.0, -5.0], [3.0, -2.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-25.0, 15.0], [30.0, -18.0], [5.0, -3.0], [30.0, -18.0], [5.0, -3.0]], [[35.0, -21.0], [-10.0, 
-6.0], [-35.0, 21.0], [35.0, -21.0], [-25.0, 15.0]], [[15.0, -9.0], [35.0, -21.0], [10.0, -6.0], [15.0, -9.0], [0.0, 0.0]], 
-[[-10.0, 6.0], [20.0, -12.0], [15.0, -9.0], [20.0, -12.0], [25.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[30.0, 0.0], [-36.0, 
-0.0], [-6.0, 0.0], [-36.0, 0.0], [-6.0, 0.0]], [[-42.0, 0.0], [12.0, 0.0], [42.0, 0.0], [-42.0, 0.0], [30.0, 0.0]], [[-18.0, 
-0.0], [-42.0, 0.0], [-12.0, 0.0], [-18.0, 0.0], [0.0, 0.0]], [[12.0, 0.0], [-24.0, 0.0], [-18.0, 0.0], [-24.0, 0.0], [-30.0, 
-0.0]]])
+      ref=msk_ref*numpy.array([[-24.0, 44.0], [27.0, -29.0]])+(1.-msk_ref)*numpy.array([[-25.0, -2.0], [0.0, -49.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[-6.0, -4.0, 5.0, 6.0, -1.0], [-4.0, 6.0, 3.0, -7.0, 6.0], [-1.0, 0.0, -4.0, 2.0, 6.0], [5.0, 
-6.0, -3.0, -6.0, 3.0]], [[7.0, -4.0, 3.0, 0.0, 0.0], [5.0, 0.0, -6.0, -5.0, 3.0], [-1.0, -1.0, 0.0, -7.0, -2.0], [-5.0, -3.0, 
-7.0, 5.0, -2.0]], [[1.0, -1.0, 3.0, 1.0, -7.0], [2.0, -5.0, 4.0, -4.0, 7.0], [5.0, 3.0, 4.0, 0.0, 4.0], [-4.0, -3.0, 7.0, 1.0, 
-2.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, 3.0], [-6.0, 5.0], [4.0, 5.0]])+(1.-msk_arg1)*numpy.array([[1.0, -6.0], [-5.0, 5.0], 
-[-1.0, -7.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[1.0, -1.0, 0.0], [-7.0, -7.0, 6.0]], [[0.0, 0.0, -4.0], [0.0, -1.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 0.0, 4.0], [-5.0, -3.0, 4.0]], [[7.0, -4.0, 3.0], [0.0, 1.0, -1.0]]]))
+      arg1=Data(numpy.array([[[-1.0, 1.0], [-2.0, 0.0], [7.0, -2.0]], [[3.0, 6.0], [-3.0, 4.0], [-6.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 7.0], [4.0, 2.0], [7.0, 3.0]], [[2.0, -2.0], [4.0, -6.0], [3.0, -2.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-26.0, 22.0], [28.0, -37.0], [-16.0, 45.0], [-8.0, 23.0], [-26.0, -38.0]], [[-14.0, 23.0], 
-[-32.0, -7.0], [46.0, -1.0], [28.0, -66.0], [-2.0, 68.0]], [[28.0, 17.0], [18.0, 10.0], [24.0, 8.0], [38.0, -29.0], [16.0, 
-28.0]], [[4.0, -30.0], [-6.0, -12.0], [-8.0, 61.0], [-14.0, 12.0], [14.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[-42.0, 64.0], 
-[17.0, 11.0], [-13.0, -36.0], [5.0, -43.0], [6.0, 55.0]], [[-31.0, 35.0], [11.0, -1.0], [29.0, -76.0], [22.0, 45.0], [-16.0, 
--70.0]], [[-1.0, -34.0], [2.0, -26.0], [-8.0, -4.0], [37.0, -47.0], [12.0, -74.0]], [[34.0, -27.0], [24.0, -30.0], [-45.0, 
-4.0], [-32.0, 54.0], [11.0, -42.0]]])
+      ref=msk_ref*numpy.array([[-35.0, -45.0], [-61.0, 28.0]])+(1.-msk_ref)*numpy.array([[17.0, 25.0], [13.0, 46.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[5.0, 3.0, -2.0, 0.0, 7.0], [2.0, 0.0, -5.0, -6.0, 5.0], [-4.0, -1.0, -2.0, -7.0, 0.0], [5.0, 
-0.0, -4.0, 7.0, 0.0]], [[5.0, 4.0, 6.0, 3.0, 7.0], [7.0, 7.0, -3.0, -4.0, 0.0], [6.0, -4.0, 4.0, -3.0, 6.0], [-4.0, -6.0, -3.0, 
--4.0, 6.0]], [[-5.0, 6.0, 2.0, 0.0, 2.0], [3.0, 0.0, 2.0, -5.0, -4.0], [-6.0, 5.0, -7.0, 1.0, 5.0], [-6.0, 2.0, -3.0, -6.0, 
--3.0]]], [[[0.0, -6.0, -2.0, -7.0, -6.0], [0.0, -5.0, -2.0, -5.0, 2.0], [6.0, 3.0, 3.0, 6.0, -2.0], [6.0, -6.0, -5.0, -6.0, 
-0.0]], [[0.0, -5.0, 4.0, 1.0, -5.0], [-4.0, 6.0, -4.0, 0.0, -1.0], [3.0, 0.0, -1.0, 7.0, -3.0], [2.0, -3.0, -4.0, 5.0, 3.0]], 
-[[5.0, -5.0, 4.0, -6.0, 3.0], [1.0, 4.0, 6.0, 7.0, 7.0], [-7.0, -3.0, 5.0, 3.0, -2.0], [2.0, 0.0, 3.0, 0.0, 
-0.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -6.0], [-3.0, 5.0], [0.0, 0.0]], [[6.0, 2.0], [4.0, 7.0], [-6.0, 
--1.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 1.0], [7.0, 7.0], [-7.0, 3.0]], [[4.0, -7.0], [1.0, -7.0], [4.0, -5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, 0.0, -6.0], [5.0, -1.0, 6.0], [1.0, 3.0, -7.0], [4.0, 6.0, 4.0]], [[3.0, -2.0, -3.0], 
+[7.0, -4.0, -3.0], [-4.0, -3.0, -5.0], [1.0, -4.0, 4.0]]], [[[-7.0, 3.0, -3.0], [6.0, -4.0, 3.0], [-6.0, -3.0, 7.0], [3.0, 
+-7.0, -7.0]], [[2.0, -6.0, 5.0], [2.0, 7.0, 3.0], [-4.0, -3.0, -1.0], [0.0, 5.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, -5.0, 1.0], [-4.0, 3.0, 0.0], [7.0, -1.0, 7.0], [-3.0, 4.0, 7.0]], [[-2.0, 
+6.0, -5.0], [0.0, -2.0, -7.0], [1.0, 5.0, -1.0], [6.0, -6.0, 3.0]]], [[[1.0, -4.0, 0.0], [1.0, 0.0, -5.0], [-6.0, 2.0, 1.0], 
+[1.0, 6.0, 6.0]], [[-1.0, 5.0, -2.0], [6.0, -2.0, 7.0], [0.0, 6.0, -4.0], [-4.0, 3.0, 1.0]]]]))
+      arg1=Data(numpy.array([[[[3.0, -2.0], [3.0, -3.0], [0.0, 2.0]], [[3.0, 7.0], [-1.0, 6.0], [5.0, -7.0]], [[6.0, -5.0], 
+[1.0, -2.0], [5.0, -2.0]], [[2.0, 0.0], [1.0, -3.0], [-2.0, 1.0]]], [[[-1.0, -1.0], [4.0, -7.0], [-6.0, 2.0]], [[5.0, 1.0], 
+[2.0, 6.0], [0.0, 2.0]], [[-7.0, 5.0], [5.0, 1.0], [0.0, -5.0]], [[-6.0, 5.0], [6.0, -2.0], [0.0, -4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-7.0, -4.0], [0.0, 6.0], [7.0, 6.0]], [[7.0, -6.0], [4.0, 7.0], [2.0, -7.0]], 
+[[6.0, 0.0], [-3.0, -3.0], [6.0, -3.0]], [[-2.0, 2.0], [2.0, -5.0], [-4.0, -7.0]]], [[[0.0, -1.0], [-7.0, 1.0], [-7.0, 5.0]], 
+[[-2.0, -6.0], [-6.0, 4.0], [-4.0, 6.0]], [[-5.0, 5.0], [0.0, 0.0], [0.0, 2.0]], [[1.0, -3.0], [-7.0, -3.0], [5.0, -6.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-45.0, -10.0], [-38.0, -40.0], [-38.0, 62.0], [-11.0, 14.0], [-95.0, -57.0]], [[-43.0, -6.0], 
-[-51.0, 63.0], [-55.0, -23.0], [-60.0, -1.0], [-34.0, -40.0]], [[72.0, 94.0], [48.0, -5.0], [-28.0, 26.0], [55.0, 85.0], 
-[-30.0, 7.0]], [[44.0, -26.0], [-30.0, -63.0], [-55.0, -32.0], [-4.0, -39.0], [-6.0, 51.0]]])+(1.-msk_ref)*numpy.array([[[75.0, 
-0.0], [-72.0, 151.0], [46.0, 12.0], [-30.0, 93.0], [-3.0, 124.0]], [[22.0, 83.0], [51.0, 22.0], [-8.0, -8.0], [33.0, -49.0], 
-[48.0, -49.0]], [[95.0, -8.0], [-60.0, -20.0], [114.0, -34.0], [36.0, -131.0], [-12.0, 102.0]], [[33.0, -107.0], [-83.0, 27.0], 
-[0.0, 14.0], [-26.0, -32.0], [66.0, 12.0]]])
+      ref=msk_ref*numpy.array([[55.0, -63.0], [45.0, 104.0]])+(1.-msk_ref)*numpy.array([[169.0, -146.0], [-129.0, -95.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank2_expandedData_rank2_offset0(self):
-      arg0=Data(numpy.array([[0.0, 3.0, 7.0, 4.0, 6.0], [0.0, -6.0, -4.0, -3.0, -4.0], [-2.0, 1.0, 1.0, -3.0, -6.0], [1.0, 0.0, 
--3.0, 1.0, 3.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], [-6.0, -5.0, 0.0, -5.0, 6.0], 
-[-6.0, 0.0, -1.0, -6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, 
--2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 5.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([-4.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-2.0, -6.0]))
+      arg1=Data(numpy.array([[-1.0, -4.0, -4.0, 5.0, -4.0], [-1.0, 5.0, -2.0, 1.0, 7.0], [-3.0, 0.0, -7.0, 4.0, -1.0], [2.0, 
+-2.0, -1.0, 2.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, 4.0, 4.0, 3.0, 4.0], [5.0, -2.0, 6.0, 3.0, -4.0], [6.0, -6.0, 1.0, 0.0, 7.0], 
+[5.0, 1.0, 1.0, -3.0, 5.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[-15.0, 0.0, 6.0, -9.0, 15.0], [-6.0, 15.0, -15.0, -9.0, -21.0], [-18.0, -15.0, 0.0, -15.0, 18.0], [-18.0, 
-0.0, -3.0, -18.0, -6.0]], [[-35.0, 0.0, 14.0, -21.0, 35.0], [-14.0, 35.0, -35.0, -21.0, -49.0], [-42.0, -35.0, 0.0, -35.0, 
-42.0], [-42.0, 0.0, -7.0, -42.0, -14.0]], [[-20.0, 0.0, 8.0, -12.0, 20.0], [-8.0, 20.0, -20.0, -12.0, -28.0], [-24.0, -20.0, 
-0.0, -20.0, 24.0], [-24.0, 0.0, -4.0, -24.0, -8.0]], [[-30.0, 0.0, 12.0, -18.0, 30.0], [-12.0, 30.0, -30.0, -18.0, -42.0], 
-[-36.0, -30.0, 0.0, -30.0, 36.0], [-36.0, 0.0, -6.0, -36.0, -12.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[30.0, 0.0, -12.0, 18.0, -30.0], [12.0, -30.0, 30.0, 18.0, 42.0], 
-[36.0, 30.0, 0.0, 30.0, -36.0], [36.0, 0.0, 6.0, 36.0, 12.0]], [[20.0, 0.0, -8.0, 12.0, -20.0], [8.0, -20.0, 20.0, 12.0, 28.0], 
-[24.0, 20.0, 0.0, 20.0, -24.0], [24.0, 0.0, 4.0, 24.0, 8.0]], [[15.0, 0.0, -6.0, 9.0, -15.0], [6.0, -15.0, 15.0, 9.0, 21.0], 
-[18.0, 15.0, 0.0, 15.0, -18.0], [18.0, 0.0, 3.0, 18.0, 6.0]], [[20.0, 0.0, -8.0, 12.0, -20.0], [8.0, -20.0, 20.0, 12.0, 28.0], 
-[24.0, 20.0, 0.0, 20.0, -24.0], [24.0, 0.0, 4.0, 24.0, 8.0]]], [[[10.0, 0.0, -4.0, 6.0, -10.0], [4.0, -10.0, 10.0, 6.0, 14.0], 
-[12.0, 10.0, 0.0, 10.0, -12.0], [12.0, 0.0, 2.0, 12.0, 4.0]], [[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], 
-[-6.0, -5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], 
-[-6.0, -5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[15.0, 0.0, -6.0, 9.0, -15.0], [6.0, -15.0, 15.0, 9.0, 21.0], 
-[18.0, 15.0, 0.0, 15.0, -18.0], [18.0, 0.0, 3.0, 18.0, 6.0]], [[30.0, 0.0, -12.0, 18.0, -30.0], [12.0, -30.0, 30.0, 18.0, 
-42.0], [36.0, 30.0, 0.0, 30.0, -36.0], [36.0, 0.0, 6.0, 36.0, 12.0]]], [[[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, 
--7.0], [-6.0, -5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[15.0, 0.0, -6.0, 9.0, -15.0], [6.0, -15.0, 15.0, 9.0, 21.0], [18.0, 
-15.0, 0.0, 15.0, -18.0], [18.0, 0.0, 3.0, 18.0, 6.0]], [[-5.0, 0.0, 2.0, -3.0, 5.0], [-2.0, 5.0, -5.0, -3.0, -7.0], [-6.0, 
--5.0, 0.0, -5.0, 6.0], [-6.0, 0.0, -1.0, -6.0, -2.0]], [[-15.0, 0.0, 6.0, -9.0, 15.0], [-6.0, 15.0, -15.0, -9.0, -21.0], 
-[-18.0, -15.0, 0.0, -15.0, 18.0], [-18.0, 0.0, -3.0, -18.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[21.0, -21.0, 21.0, -15.0, -3.0], [-21.0, 
--15.0, 6.0, -18.0, 12.0], [18.0, -6.0, 3.0, 6.0, 0.0], [0.0, 15.0, -12.0, 18.0, 15.0]], [[49.0, -49.0, 49.0, -35.0, -7.0], 
-[-49.0, -35.0, 14.0, -42.0, 28.0], [42.0, -14.0, 7.0, 14.0, 0.0], [0.0, 35.0, -28.0, 42.0, 35.0]], [[28.0, -28.0, 28.0, -20.0, 
--4.0], [-28.0, -20.0, 8.0, -24.0, 16.0], [24.0, -8.0, 4.0, 8.0, 0.0], [0.0, 20.0, -16.0, 24.0, 20.0]], [[42.0, -42.0, 42.0, 
--30.0, -6.0], [-42.0, -30.0, 12.0, -36.0, 24.0], [36.0, -12.0, 6.0, 12.0, 0.0], [0.0, 30.0, -24.0, 36.0, 30.0]]], [[[0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-42.0, 42.0, -42.0, 30.0, 
-6.0], [42.0, 30.0, -12.0, 36.0, -24.0], [-36.0, 12.0, -6.0, -12.0, 0.0], [0.0, -30.0, 24.0, -36.0, -30.0]], [[-28.0, 28.0, 
--28.0, 20.0, 4.0], [28.0, 20.0, -8.0, 24.0, -16.0], [-24.0, 8.0, -4.0, -8.0, 0.0], [0.0, -20.0, 16.0, -24.0, -20.0]], [[-21.0, 
-21.0, -21.0, 15.0, 3.0], [21.0, 15.0, -6.0, 18.0, -12.0], [-18.0, 6.0, -3.0, -6.0, 0.0], [0.0, -15.0, 12.0, -18.0, -15.0]], 
-[[-28.0, 28.0, -28.0, 20.0, 4.0], [28.0, 20.0, -8.0, 24.0, -16.0], [-24.0, 8.0, -4.0, -8.0, 0.0], [0.0, -20.0, 16.0, -24.0, 
--20.0]]], [[[-14.0, 14.0, -14.0, 10.0, 2.0], [14.0, 10.0, -4.0, 12.0, -8.0], [-12.0, 4.0, -2.0, -4.0, 0.0], [0.0, -10.0, 8.0, 
--12.0, -10.0]], [[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 
-5.0]], [[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 5.0]], 
-[[-21.0, 21.0, -21.0, 15.0, 3.0], [21.0, 15.0, -6.0, 18.0, -12.0], [-18.0, 6.0, -3.0, -6.0, 0.0], [0.0, -15.0, 12.0, -18.0, 
--15.0]], [[-42.0, 42.0, -42.0, 30.0, 6.0], [42.0, 30.0, -12.0, 36.0, -24.0], [-36.0, 12.0, -6.0, -12.0, 0.0], [0.0, -30.0, 
-24.0, -36.0, -30.0]]], [[[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, 
--4.0, 6.0, 5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
-[[-21.0, 21.0, -21.0, 15.0, 3.0], [21.0, 15.0, -6.0, 18.0, -12.0], [-18.0, 6.0, -3.0, -6.0, 0.0], [0.0, -15.0, 12.0, -18.0, 
--15.0]], [[7.0, -7.0, 7.0, -5.0, -1.0], [-7.0, -5.0, 2.0, -6.0, 4.0], [6.0, -2.0, 1.0, 2.0, 0.0], [0.0, 5.0, -4.0, 6.0, 5.0]], 
-[[21.0, -21.0, 21.0, -15.0, -3.0], [-21.0, -15.0, 6.0, -18.0, 12.0], [18.0, -6.0, 3.0, 6.0, 0.0], [0.0, 15.0, -12.0, 18.0, 
-15.0]]]])
+      ref=msk_ref*numpy.array([[[4.0, 16.0, 16.0, -20.0, 16.0], [4.0, -20.0, 8.0, -4.0, -28.0], [12.0, 0.0, 28.0, -16.0, 4.0], 
+[-8.0, 8.0, 4.0, -8.0, -16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, -8.0, -8.0, -6.0, -8.0], [-10.0, 4.0, -12.0, -6.0, 8.0], [-12.0, 12.0, 
+-2.0, 0.0, -14.0], [-10.0, -2.0, -2.0, 6.0, -10.0]], [[-6.0, -24.0, -24.0, -18.0, -24.0], [-30.0, 12.0, -36.0, -18.0, 24.0], 
+[-36.0, 36.0, -6.0, 0.0, -42.0], [-30.0, -6.0, -6.0, 18.0, -30.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([[[5.0, -6.0, 2.0, 4.0, -4.0], [-5.0, -3.0, 2.0, -5.0, 4.0], [0.0, -7.0, 4.0, -2.0, 7.0], [1.0, 
--7.0, -6.0, 5.0, -3.0]], [[6.0, -4.0, -6.0, 4.0, 5.0], [-2.0, 4.0, 6.0, 1.0, 7.0], [2.0, 7.0, 3.0, -6.0, 4.0], [3.0, -6.0, 0.0, 
-5.0, -1.0]], [[-3.0, -3.0, 7.0, 2.0, 0.0], [1.0, 0.0, -3.0, 1.0, 3.0], [-7.0, -5.0, -2.0, 3.0, 7.0], [6.0, 3.0, 3.0, 3.0, 
-2.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, -2.0, -2.0, 3.0, 6.0], [-2.0, -1.0, -4.0, 4.0, 1.0], [-2.0, 7.0, -4.0, 4.0, -1.0], 
-[5.0, 4.0, 0.0, 4.0, -6.0]], [[-2.0, 4.0, 1.0, -3.0, 0.0], [4.0, -7.0, 1.0, 3.0, 2.0], [-1.0, 0.0, -4.0, -7.0, 0.0], [-6.0, 
-1.0, 3.0, 3.0, 0.0]], [[-6.0, 0.0, -5.0, 0.0, 5.0], [-3.0, 5.0, 1.0, 4.0, -7.0], [-7.0, -1.0, 7.0, -4.0, -6.0], [4.0, 0.0, 0.0, 
--6.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, -3.0, 5.0, -5.0, -7.0], [0.0, -4.0, 2.0, -1.0, 3.0], [-5.0, -3.0, 3.0, -4.0, 
-7.0], [-1.0, 5.0, 1.0, 5.0, 0.0]], [[5.0, 0.0, 0.0, 7.0, -2.0], [-5.0, 7.0, 5.0, 7.0, -1.0], [1.0, -6.0, -1.0, -3.0, -6.0], 
-[0.0, -4.0, 2.0, 5.0, 4.0]], [[3.0, -5.0, 1.0, -3.0, -1.0], [-5.0, -4.0, -3.0, 6.0, 3.0], [-4.0, 4.0, -4.0, -1.0, 1.0], [6.0, 
-0.0, -3.0, -5.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[0.0, 3.0, 7.0], [-1.0, -3.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 4.0, -7.0], [5.0, -2.0, -6.0]]))
+      arg1=Data(numpy.array([[[-3.0, -7.0, -2.0, 4.0, -4.0], [-2.0, 3.0, 6.0, -5.0, 3.0], [1.0, 4.0, 0.0, 6.0, -1.0], [-5.0, 
+5.0, 3.0, -7.0, 5.0]], [[3.0, 6.0, -4.0, 7.0, 0.0], [2.0, 0.0, 1.0, -6.0, -3.0], [-7.0, 0.0, 6.0, 6.0, -7.0], [-3.0, 7.0, 0.0, 
+-7.0, 0.0]], [[-2.0, 4.0, -4.0, 2.0, -3.0], [3.0, 4.0, -1.0, 1.0, -2.0], [-3.0, 6.0, -5.0, -4.0, 2.0], [-6.0, 7.0, 3.0, -1.0, 
+3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, 7.0, 0.0, -6.0, -4.0], [-6.0, -6.0, -3.0, 0.0, 1.0], [-1.0, 1.0, -4.0, -3.0, 
+-2.0], [-2.0, 1.0, 1.0, 2.0, 1.0]], [[5.0, -4.0, -5.0, 4.0, -2.0], [-2.0, -5.0, -3.0, 4.0, 2.0], [-5.0, 6.0, 4.0, -1.0, 6.0], 
+[3.0, 3.0, -4.0, 4.0, 3.0]], [[6.0, 7.0, -3.0, 1.0, 0.0], [-2.0, -5.0, -4.0, 4.0, -5.0], [0.0, 3.0, 6.0, 0.0, 0.0], [6.0, -6.0, 
+7.0, 6.0, 0.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[26.0, 14.0, 11.0, -3.0, 15.0], [23.0, -62.0, -17.0, 26.0, 38.0], [5.0, 38.0, -65.0, -10.0, 
-13.0], [-23.0, 26.0, 18.0, 56.0, -18.0]], [[2.0, -4.0, 23.0, -6.0, -51.0], [5.0, 19.0, 17.0, -48.0, 7.0], [37.0, -39.0, 19.0, 
-16.0, 24.0], [-18.0, -28.0, -12.0, -18.0, 48.0]], [[-22.0, -28.0, -45.0, 24.0, 47.0], [-49.0, 75.0, -7.0, 18.0, -59.0], [-47.0, 
-7.0, 65.0, 22.0, -44.0], [74.0, 2.0, -18.0, -52.0, -40.0]], [[-4.0, 8.0, -14.0, 0.0, 34.0], [2.0, -22.0, -10.0, 36.0, -2.0], 
-[-26.0, 26.0, -18.0, -20.0, -16.0], [4.0, 20.0, 12.0, 16.0, -32.0]], [[-26.0, 28.0, 13.0, -27.0, -24.0], [28.0, -31.0, 21.0, 
--1.0, 6.0], [3.0, -28.0, -4.0, -51.0, 4.0], [-50.0, -11.0, 15.0, -1.0, 24.0]]], [[[-22.0, 2.0, 3.0, -9.0, -25.0], [-1.0, 24.0, 
-19.0, -22.0, -16.0], [5.0, -36.0, 35.0, -10.0, -1.0], [-9.0, -22.0, -6.0, -32.0, 26.0]], [[-20.0, 22.0, 10.0, -21.0, -18.0], 
-[22.0, -25.0, 16.0, 0.0, 5.0], [2.0, -21.0, -4.0, -40.0, 3.0], [-39.0, -8.0, 12.0, 0.0, 18.0]], [[14.0, 20.0, 17.0, -12.0, 
--3.0], [29.0, -59.0, -5.0, 14.0, 35.0], [11.0, 17.0, -53.0, -22.0, 16.0], [-38.0, 14.0, 18.0, 44.0, 0.0]], [[-28.0, 14.0, 6.0, 
--18.0, -25.0], [11.0, 3.0, 22.0, -13.0, -10.0], [2.0, -36.0, 23.0, -31.0, -1.0], [-27.0, -19.0, 3.0, -23.0, 26.0]], [[-16.0, 
-20.0, -16.0, -9.0, 39.0], [11.0, -38.0, -6.0, 49.0, -3.0], [-36.0, 25.0, -23.0, -45.0, -22.0], [-10.0, 23.0, 21.0, 19.0, 
--36.0]]], [[[38.0, 8.0, 37.0, -6.0, -35.0], [29.0, -49.0, -5.0, -22.0, 53.0], [47.0, 7.0, -57.0, 14.0, 42.0], [-40.0, 2.0, 6.0, 
-48.0, 28.0]], [[-12.0, 42.0, 46.0, -42.0, -67.0], [57.0, -67.0, 30.0, -27.0, 42.0], [42.0, -44.0, -35.0, -57.0, 37.0], [-97.0, 
--21.0, 21.0, 23.0, 62.0]], [[22.0, 4.0, 5.0, 3.0, 14.0], [10.0, -35.0, -15.0, 17.0, 24.0], [3.0, 30.0, -42.0, 3.0, 8.0], [-6.0, 
-19.0, 9.0, 37.0, -16.0]], [[-14.0, -20.0, -17.0, 12.0, 3.0], [-29.0, 59.0, 5.0, -14.0, -35.0], [-11.0, -17.0, 53.0, 22.0, 
--16.0], [38.0, -14.0, -18.0, -44.0, 0.0]], [[-22.0, 2.0, -45.0, 9.0, 77.0], [-19.0, 0.0, -17.0, 68.0, -34.0], [-67.0, 42.0, 
-5.0, -28.0, -49.0], [39.0, 32.0, 12.0, -2.0, -70.0]]], [[[-38.0, 10.0, -29.0, -6.0, 36.0], [-8.0, 8.0, 5.0, 37.0, -35.0], 
-[-47.0, 1.0, 26.0, -41.0, -37.0], [11.0, 7.0, 9.0, -23.0, -30.0]], [[-34.0, -10.0, -7.0, -3.0, -27.0], [-19.0, 64.0, 25.0, 
--34.0, -40.0], [-1.0, -52.0, 73.0, 2.0, -11.0], [13.0, -34.0, -18.0, -64.0, 30.0]], [[-42.0, 12.0, -3.0, -18.0, -21.0], [3.0, 
-21.0, 27.0, -12.0, -27.0], [-9.0, -45.0, 45.0, -36.0, -12.0], [-18.0, -24.0, 0.0, -42.0, 24.0]], [[-8.0, 10.0, -20.0, 0.0, 
-45.0], [1.0, -25.0, -12.0, 47.0, -6.0], [-36.0, 32.0, -19.0, -27.0, -23.0], [7.0, 25.0, 15.0, 17.0, -42.0]], [[-22.0, 2.0, 
--5.0, -6.0, -8.0], [-4.0, 20.0, 13.0, -7.0, -19.0], [-7.0, -23.0, 30.0, -13.0, -9.0], [-1.0, -13.0, -3.0, -27.0, 
-10.0]]]])+(1.-msk_ref)*numpy.array([[[[51.0, 0.0, 22.0, 26.0, -44.0], [-15.0, 34.0, 49.0, 19.0, 0.0], [-7.0, -63.0, 21.0, 
--35.0, -4.0], [-23.0, 1.0, 26.0, 70.0, 18.0]], [[-65.0, 33.0, -33.0, 11.0, 53.0], [35.0, 8.0, -23.0, -40.0, -23.0], [38.0, 
-30.0, -2.0, 39.0, -21.0], [-12.0, -14.0, -5.0, -35.0, -22.0]], [[3.0, -41.0, 17.0, -73.0, -9.0], [-5.0, -78.0, -47.0, -2.0, 
-33.0], [-44.0, 58.0, -16.0, 3.0, 57.0], [40.0, 34.0, -31.0, -55.0, -10.0]], [[50.0, -22.0, 22.0, 2.0, -38.0], [-30.0, 4.0, 
-22.0, 36.0, 14.0], [-24.0, -28.0, 0.0, -30.0, 6.0], [8.0, 4.0, 6.0, 30.0, 20.0]], [[1.0, 12.0, -20.0, 55.0, 18.0], [-25.0, 
-51.0, 17.0, 39.0, -17.0], [25.0, -18.0, -17.0, 1.0, -58.0], [4.0, -40.0, 6.0, 5.0, 20.0]]], [[[-37.0, 10.0, -24.0, 8.0, 38.0], 
-[5.0, 2.0, -23.0, -3.0, -10.0], [19.0, 31.0, -17.0, 25.0, -22.0], [11.0, -17.0, -12.0, -40.0, -6.0]], [[2.0, 9.0, -15.0, 43.0, 
-13.0], [-20.0, 40.0, 14.0, 31.0, -13.0], [19.0, -15.0, -13.0, 0.0, -45.0], [3.0, -31.0, 5.0, 5.0, 16.0]], [[33.0, 9.0, 7.0, 
-41.0, -23.0], [-15.0, 46.0, 43.0, 22.0, -9.0], [8.0, -54.0, 12.0, -23.0, -25.0], [-20.0, -14.0, 23.0, 55.0, 18.0]], [[-22.0, 
-10.0, -24.0, 29.0, 32.0], [-10.0, 23.0, -8.0, 18.0, -13.0], [22.0, 13.0, -20.0, 16.0, -40.0], [11.0, -29.0, -6.0, -25.0, 6.0]], 
-[[68.0, -27.0, 23.0, 20.0, -45.0], [-50.0, 21.0, 34.0, 63.0, 14.0], [-25.0, -42.0, -7.0, -40.0, -11.0], [14.0, -8.0, 9.0, 40.0, 
-34.0]]], [[[-11.0, 35.0, -7.0, 35.0, 3.0], [25.0, 42.0, 31.0, -28.0, -23.0], [30.0, -40.0, 26.0, 1.0, -19.0], [-42.0, -8.0, 
-25.0, 45.0, -6.0]], [[-22.0, 46.0, -40.0, 99.0, 40.0], [-10.0, 97.0, 36.0, 26.0, -43.0], [62.0, -41.0, -8.0, 12.0, -96.0], 
-[-23.0, -63.0, 22.0, 25.0, 18.0]], [[33.0, -2.0, 18.0, 7.0, -32.0], [-5.0, 13.0, 29.0, 5.0, 3.0], [-9.0, -38.0, 17.0, -23.0, 
-8.0], [-16.0, 8.0, 16.0, 45.0, 8.0]], [[-33.0, -9.0, -7.0, -41.0, 23.0], [15.0, -46.0, -43.0, -22.0, 9.0], [-8.0, 54.0, -12.0, 
-23.0, 25.0], [20.0, 14.0, -23.0, -55.0, -18.0]], [[83.0, -56.0, 42.0, -28.0, -64.0], [-55.0, -28.0, 13.0, 63.0, 38.0], [-59.0, 
--17.0, -11.0, -47.0, 32.0], [35.0, 19.0, -6.0, 20.0, 30.0]]], [[[39.0, -33.0, 11.0, -2.0, -19.0], [-45.0, -7.0, -1.0, 56.0, 
-18.0], [-26.0, 3.0, -24.0, -19.0, -5.0], [35.0, -7.0, -11.0, -10.0, 24.0]], [[-63.0, 6.0, -32.0, -16.0, 58.0], [15.0, -26.0, 
--53.0, -17.0, -6.0], [17.0, 69.0, -27.0, 43.0, -10.0], [25.0, -11.0, -28.0, -80.0, -18.0]], [[-27.0, 3.0, -27.0, 21.0, 39.0], 
-[-15.0, 12.0, -21.0, 24.0, -9.0], [18.0, 30.0, -30.0, 21.0, -39.0], [24.0, -30.0, -15.0, -45.0, 6.0]], [[64.0, -30.0, 28.0, 
-1.0, -48.0], [-40.0, 3.0, 26.0, 48.0, 19.0], [-32.0, -33.0, -2.0, -38.0, 8.0], [13.0, 5.0, 6.0, 35.0, 26.0]], [[-17.0, -1.0, 
--13.0, 2.0, 21.0], [-5.0, -3.0, -17.0, 8.0, -2.0], [6.0, 23.0, -16.0, 13.0, -13.0], [15.0, -11.0, -11.0, -30.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[[-5.0, 46.0, -40.0, 35.0, -21.0], [27.0, 28.0, -4.0, -11.0, -23.0], [-42.0, 42.0, -17.0, -10.0, 
+-7.0], [-51.0, 70.0, 21.0, -28.0, 21.0]], [[2.0, -27.0, 30.0, -33.0, 16.0], [-16.0, -19.0, -5.0, 19.0, 14.0], [32.0, -28.0, 
+2.0, -8.0, 14.0], [38.0, -54.0, -15.0, 32.0, -17.0]]])+(1.-msk_ref)*numpy.array([[[-22.0, -65.0, 1.0, 9.0, -8.0], [6.0, 15.0, 
+16.0, -12.0, 43.0], [-20.0, 3.0, -26.0, -4.0, 24.0], [-30.0, 54.0, -65.0, -26.0, 12.0]], [[-31.0, 1.0, 28.0, -44.0, -16.0], 
+[-14.0, 10.0, 15.0, -32.0, 31.0], [5.0, -25.0, -64.0, -13.0, -22.0], [-52.0, 35.0, -29.0, -34.0, -1.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[6.0, -3.0, 3.0, -4.0, 6.0], [-2.0, -1.0, -7.0, 1.0, -2.0], [-5.0, 3.0, 3.0, 4.0, 7.0], [-2.0, 
-4.0, -3.0, -5.0, 6.0]], [[-5.0, 4.0, -2.0, 3.0, 3.0], [-6.0, 5.0, 6.0, -1.0, 5.0], [-1.0, -1.0, -3.0, -7.0, 0.0], [-5.0, 2.0, 
-0.0, 2.0, -6.0]], [[-1.0, -1.0, 1.0, -1.0, 1.0], [-6.0, 7.0, 6.0, 4.0, 6.0], [-1.0, -5.0, -3.0, -6.0, 2.0], [2.0, -3.0, 0.0, 
--7.0, -4.0]]], [[[-5.0, 0.0, 3.0, -1.0, -1.0], [-5.0, -3.0, -6.0, -6.0, 2.0], [5.0, 7.0, 1.0, 0.0, 0.0], [-3.0, 7.0, -4.0, 0.0, 
-0.0]], [[1.0, 2.0, 6.0, 6.0, 1.0], [5.0, 0.0, -3.0, 0.0, 3.0], [0.0, 3.0, 2.0, -6.0, 0.0], [-1.0, 0.0, -2.0, -3.0, 2.0]], 
-[[7.0, -2.0, 0.0, -3.0, 4.0], [-2.0, 4.0, 6.0, 5.0, 1.0], [0.0, -3.0, -6.0, 1.0, -5.0], [2.0, -5.0, 0.0, 7.0, 
--4.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, -2.0, -4.0, 3.0, -6.0], [-3.0, -1.0, -1.0, -1.0, -4.0], [7.0, -7.0, 3.0, 4.0, 0.0], 
-[0.0, -4.0, -1.0, -6.0, 0.0]], [[-2.0, 2.0, 2.0, 0.0, -3.0], [3.0, -2.0, -7.0, -3.0, -6.0], [5.0, 1.0, 4.0, 7.0, 0.0], [-3.0, 
-3.0, -3.0, 5.0, -6.0]], [[1.0, 1.0, 0.0, -5.0, -1.0], [1.0, -3.0, -4.0, 0.0, 3.0], [3.0, -7.0, 0.0, -7.0, -6.0], [-6.0, -2.0, 
-2.0, 0.0, -3.0]]], [[[-5.0, -3.0, -6.0, -6.0, 0.0], [-4.0, -6.0, -7.0, 2.0, -1.0], [-5.0, 7.0, -7.0, 5.0, -7.0], [4.0, 6.0, 
--4.0, 4.0, 6.0]], [[3.0, -1.0, 0.0, 4.0, -6.0], [3.0, 0.0, -7.0, 5.0, 0.0], [-1.0, -5.0, 6.0, -1.0, -6.0], [-4.0, -1.0, -6.0, 
-1.0, 2.0]], [[3.0, 6.0, -3.0, 2.0, -6.0], [6.0, -2.0, -4.0, -3.0, -7.0], [-3.0, 7.0, 3.0, -3.0, -4.0], [4.0, -3.0, 1.0, 2.0, 
-5.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, -5.0, -5.0, -5.0, 3.0], [-7.0, 0.0, 2.0, -3.0, -2.0], [3.0, -7.0, 2.0, 3.0, 5.0], 
-[3.0, -2.0, -2.0, -1.0, -3.0]], [[5.0, 0.0, -7.0, 1.0, -3.0], [-7.0, 0.0, 6.0, -1.0, 4.0], [6.0, 6.0, -2.0, -6.0, -3.0], [-7.0, 
--3.0, 6.0, 0.0, 3.0]], [[6.0, 6.0, -2.0, 7.0, 7.0], [-1.0, -4.0, 4.0, 3.0, -4.0], [0.0, 3.0, -3.0, -6.0, -5.0], [-6.0, 4.0, 
--4.0, -7.0, -3.0]]], [[[-6.0, 2.0, -5.0, -6.0, -5.0], [0.0, 3.0, -1.0, 7.0, -7.0], [-6.0, 3.0, -4.0, 7.0, -1.0], [0.0, 7.0, 
-7.0, 7.0, -1.0]], [[4.0, 2.0, -1.0, -2.0, -1.0], [-1.0, -6.0, 4.0, 7.0, -1.0], [1.0, -1.0, -7.0, 1.0, 4.0], [-1.0, 1.0, 3.0, 
--5.0, -6.0]], [[-2.0, 6.0, 6.0, 1.0, 4.0], [1.0, -5.0, -6.0, -4.0, -4.0], [-2.0, -4.0, 1.0, 7.0, -4.0], [1.0, -7.0, 2.0, -1.0, 
-7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[5.0, 5.0, 4.0], [6.0, -7.0, -3.0]], [[1.0, -2.0, 3.0], [6.0, -3.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, 2.0, -7.0], [7.0, -7.0, 5.0]], [[-1.0, -6.0, -6.0], [7.0, -7.0, 0.0]]]))
+      arg1=Data(numpy.array([[[[4.0, -4.0, -5.0, -6.0, -6.0], [-2.0, -7.0, -5.0, 3.0, -1.0], [2.0, 0.0, -2.0, 1.0, -7.0], 
+[-6.0, -5.0, -2.0, -4.0, -7.0]], [[-2.0, -7.0, 2.0, -3.0, 3.0], [-3.0, 6.0, -2.0, 7.0, 5.0], [-2.0, 0.0, 4.0, 3.0, 0.0], [5.0, 
+2.0, 7.0, 7.0, -6.0]], [[2.0, 7.0, -1.0, -7.0, 1.0], [-5.0, -3.0, -3.0, 2.0, 1.0], [4.0, -2.0, 7.0, -7.0, -7.0], [2.0, -7.0, 
+-3.0, -4.0, 2.0]]], [[[7.0, -3.0, 0.0, 2.0, -2.0], [-5.0, -3.0, 5.0, -5.0, -6.0], [7.0, 1.0, -1.0, -5.0, 0.0], [3.0, 7.0, 2.0, 
+1.0, 3.0]], [[6.0, -3.0, 0.0, -2.0, 6.0], [3.0, 6.0, 0.0, 0.0, -4.0], [-7.0, 2.0, -2.0, 4.0, -3.0], [3.0, 0.0, 6.0, 0.0, 
+-5.0]], [[-7.0, -5.0, 2.0, 0.0, 7.0], [7.0, 7.0, 2.0, 1.0, -3.0], [0.0, 3.0, -4.0, -1.0, 6.0], [0.0, 1.0, -4.0, 7.0, 
+-1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-1.0, -1.0, 2.0, -5.0, 6.0], [-3.0, 6.0, -1.0, -2.0, 3.0], [3.0, 6.0, 2.0, 6.0, 
+3.0], [-1.0, 0.0, -4.0, 0.0, 4.0]], [[-3.0, 0.0, 4.0, 2.0, 3.0], [0.0, 1.0, -4.0, -5.0, 0.0], [7.0, 7.0, -7.0, 2.0, 6.0], [2.0, 
+-6.0, 4.0, -4.0, -3.0]], [[7.0, -2.0, 3.0, -1.0, -6.0], [-7.0, -4.0, -3.0, 3.0, 4.0], [0.0, -1.0, 4.0, 2.0, -2.0], [6.0, 4.0, 
+-4.0, 0.0, -7.0]]], [[[2.0, -1.0, -7.0, 6.0, -2.0], [6.0, 0.0, -3.0, 2.0, 2.0], [4.0, 7.0, -2.0, 1.0, -2.0], [0.0, -6.0, 3.0, 
+-7.0, 2.0]], [[-1.0, 0.0, 1.0, -3.0, -5.0], [-7.0, -6.0, 2.0, -7.0, -6.0], [3.0, -3.0, 6.0, 6.0, 2.0], [-7.0, 7.0, 3.0, -7.0, 
+-5.0]], [[-2.0, -4.0, 6.0, 1.0, -1.0], [3.0, 4.0, -3.0, -6.0, 0.0], [4.0, 0.0, 1.0, 7.0, 5.0], [-3.0, 5.0, 5.0, -7.0, 5.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[64.0, 33.0, -25.0, 71.0, -68.0], [31.0, 23.0, 33.0, -17.0, -41.0], [17.0, -31.0, 60.0, -51.0, 
-7.0], [25.0, -89.0, 28.0, -66.0, 40.0]], [[-12.0, -1.0, 26.0, 0.0, 7.0], [14.0, 2.0, -27.0, 7.0, -1.0], [0.0, 8.0, 13.0, 27.0, 
-2.0], [-22.0, 30.0, -25.0, 36.0, -27.0]], [[11.0, -24.0, -34.0, 10.0, -49.0], [-8.0, -20.0, -56.0, 39.0, 0.0], [-7.0, -39.0, 
-16.0, 0.0, -63.0], [-12.0, -8.0, -43.0, -10.0, 39.0]], [[3.0, -8.0, 37.0, 17.0, -2.0], [24.0, 13.0, -36.0, 32.0, 17.0], [-8.0, 
--20.0, 34.0, 10.0, -11.0], [-43.0, 24.0, -42.0, 35.0, -24.0]], [[21.0, 21.0, -24.0, 31.0, -76.0], [23.0, -17.0, -47.0, -24.0, 
--66.0], [52.0, -30.0, 55.0, 20.0, -21.0], [-7.0, -36.0, -11.0, -16.0, -5.0]]], [[[38.0, -16.0, 32.0, 70.0, 18.0], [5.0, 66.0, 
-76.0, 41.0, 45.0], [-36.0, -24.0, 29.0, -32.0, 49.0], [6.0, -27.0, -4.0, -37.0, 24.0]], [[23.0, 52.0, 20.0, -12.0, -40.0], 
-[61.0, -20.0, -57.0, -32.0, -30.0], [42.0, -30.0, 50.0, -45.0, -37.0], [-53.0, -25.0, 16.0, 27.0, -49.0]], [[26.0, 89.0, 58.0, 
--15.0, 0.0], [96.0, 1.0, -20.0, -56.0, -26.0], [14.0, 28.0, 45.0, -73.0, 0.0], [-42.0, -17.0, 49.0, 57.0, -66.0]], [[52.0, 
-48.0, 15.0, 29.0, -37.0], [52.0, 15.0, 12.0, -25.0, -15.0], [29.0, -43.0, 56.0, -76.0, -2.0], [-25.0, -66.0, 39.0, -25.0, 
--17.0]], [[-4.0, 17.0, 3.0, -34.0, -33.0], [34.0, -40.0, -96.0, 3.0, -13.0], [13.0, -17.0, 21.0, -11.0, -72.0], [-51.0, 17.0, 
--26.0, 50.0, -25.0]]], [[[-29.0, -8.0, -12.0, -40.0, 34.0], [-9.0, -20.0, -19.0, 18.0, 18.0], [-68.0, 76.0, -54.0, 5.0, -29.0], 
-[29.0, 49.0, -14.0, 45.0, 39.0]], [[-35.0, -55.0, -47.0, -2.0, -10.0], [-54.0, -22.0, -34.0, 38.0, -7.0], [-28.0, 26.0, -35.0, 
-81.0, -25.0], [37.0, 43.0, -59.0, 2.0, 54.0]], [[-11.0, -56.0, -6.0, 14.0, 18.0], [-55.0, 18.0, 33.0, 36.0, 38.0], [8.0, -48.0, 
--16.0, 33.0, 23.0], [-1.0, 7.0, -22.0, -39.0, 7.0]], [[-3.0, -16.0, -33.0, 20.0, 33.0], [-51.0, 26.0, 107.0, -16.0, 1.0], 
-[-22.0, 44.0, -49.0, 12.0, 68.0], [85.0, -22.0, 42.0, -63.0, 53.0]], [[-6.0, -42.0, -13.0, 1.0, -14.0], [-49.0, -3.0, 5.0, 8.0, 
-13.0], [70.0, -98.0, 6.0, 29.0, 8.0], [-32.0, -17.0, -8.0, -52.0, -31.0]]], [[[28.0, 18.0, 10.0, 2.0, 19.0], [14.0, 20.0, 49.0, 
-0.0, 33.0], [-23.0, -7.0, -5.0, -77.0, 7.0], [3.0, -34.0, 41.0, -22.0, 14.0]], [[-53.0, -58.0, -39.0, -25.0, 3.0], [-67.0, 
--31.0, -35.0, 19.0, -9.0], [9.0, 9.0, -44.0, 101.0, -11.0], [20.0, 53.0, -49.0, 4.0, 14.0]], [[11.0, 20.0, 36.0, 7.0, 30.0], 
-[19.0, 27.0, 45.0, -15.0, 16.0], [1.0, 3.0, 7.0, -30.0, 40.0], [-8.0, -10.0, 31.0, 0.0, -28.0]], [[-4.0, 52.0, 3.0, 22.0, 7.0], 
-[47.0, 8.0, 12.0, -37.0, -62.0], [-64.0, 150.0, -4.0, 25.0, 32.0], [76.0, 22.0, 10.0, 51.0, 38.0]], [[8.0, -54.0, -24.0, 38.0, 
--2.0], [-58.0, 26.0, 54.0, 34.0, 28.0], [10.0, -58.0, -6.0, 20.0, 28.0], [18.0, -24.0, -12.0, -72.0, 
-32.0]]]])+(1.-msk_ref)*numpy.array([[[[19.0, -2.0, 73.0, -7.0, 78.0], [0.0, -52.0, -55.0, -72.0, -22.0], [5.0, -119.0, 45.0, 
-69.0, 31.0], [65.0, -84.0, -56.0, -46.0, 18.0]], [[11.0, 1.0, -25.0, 6.0, -38.0], [-10.0, 2.0, 34.0, 24.0, 32.0], [21.0, 48.0, 
--27.0, -39.0, -6.0], [-35.0, 6.0, 36.0, 2.0, -2.0]], [[17.0, 9.0, -24.0, -40.0, 1.0], [-14.0, -31.0, 19.0, 59.0, -45.0], 
-[-15.0, -27.0, -47.0, 42.0, 37.0], [11.0, 31.0, 17.0, -19.0, -57.0]], [[25.0, 6.0, -18.0, 7.0, -41.0], [-1.0, -20.0, 49.0, 
-53.0, 37.0], [24.0, 46.0, -52.0, -46.0, 13.0], [-36.0, 15.0, 35.0, -23.0, -32.0]], [[53.0, 0.0, -25.0, -12.0, 36.0], [-61.0, 
--33.0, 15.0, -34.0, -14.0], [35.0, -41.0, 4.0, 16.0, 5.0], [-6.0, -51.0, 6.0, -29.0, 11.0]]], [[[-22.0, -38.0, 72.0, -20.0, 
--18.0], [55.0, -11.0, -27.0, 2.0, 42.0], [-3.0, -52.0, 9.0, 22.0, 71.0], [65.0, -18.0, -32.0, -14.0, -33.0]], [[72.0, 65.0, 
--5.0, 81.0, 62.0], [-31.0, -57.0, 35.0, -18.0, -1.0], [37.0, 33.0, -17.0, -68.0, -68.0], [-76.0, -34.0, -9.0, -73.0, 28.0]], 
-[[43.0, 89.0, 50.0, 131.0, 60.0], [10.0, -54.0, 4.0, -54.0, 35.0], [36.0, 64.0, 7.0, -96.0, -113.0], [-90.0, -67.0, -13.0, 
--68.0, 87.0]], [[50.0, 37.0, 54.0, 63.0, 84.0], [1.0, -59.0, -12.0, -52.0, 0.0], [23.0, -39.0, 21.0, -22.0, -26.0], [-9.0, 
--60.0, -56.0, -76.0, 23.0]], [[49.0, 62.0, -44.0, 40.0, 12.0], [-29.0, -41.0, 54.0, 50.0, -21.0], [13.0, 61.0, -60.0, -48.0, 
--49.0], [-79.0, 23.0, 35.0, -42.0, -10.0]]], [[[-66.0, 29.0, 9.0, -13.0, -44.0], [43.0, 19.0, -25.0, 48.0, -25.0], [-51.0, 
-41.0, -25.0, 32.0, -22.0], [-2.0, 44.0, 43.0, 47.0, 10.0]], [[-44.0, -43.0, -54.0, -102.0, -73.0], [-15.0, 38.0, 3.0, 59.0, 
--30.0], [-30.0, -12.0, -29.0, 76.0, 60.0], [40.0, 50.0, 60.0, 69.0, -43.0]], [[-4.0, -63.0, -31.0, -55.0, -34.0], [-5.0, 33.0, 
-19.0, 30.0, 9.0], [-1.0, -23.0, -3.0, 12.0, 70.0], [40.0, 42.0, -11.0, 21.0, -64.0]], [[-77.0, -62.0, 53.0, -56.0, 1.0], [34.0, 
-55.0, -88.0, -69.0, -10.0], [-38.0, -86.0, 83.0, 91.0, 43.0], [104.0, -24.0, -42.0, 67.0, 28.0]], [[57.0, -53.0, -69.0, -26.0, 
-15.0], [-56.0, 17.0, 52.0, 5.0, -2.0], [31.0, -23.0, 3.0, -26.0, 45.0], [4.0, 29.0, -32.0, -16.0, -62.0]]], [[[-13.0, 26.0, 
-69.0, 41.0, 47.0], [50.0, -21.0, -39.0, -19.0, -10.0], [-23.0, -26.0, 21.0, 4.0, -14.0], [20.0, -9.0, -54.0, -30.0, 8.0]], 
-[[-20.0, -54.0, -93.0, -86.0, -70.0], [-44.0, 58.0, 31.0, 46.0, -17.0], [-8.0, 16.0, -20.0, 32.0, 42.0], [11.0, 58.0, 55.0, 
-71.0, -39.0]], [[1.0, 3.0, 37.0, 43.0, 13.0], [23.0, 0.0, -10.0, -33.0, 36.0], [13.0, 11.0, 24.0, -39.0, -19.0], [-7.0, -24.0, 
--28.0, -15.0, 25.0]], [[-83.0, 19.0, 70.0, -9.0, -39.0], [38.0, 11.0, -80.0, -57.0, 21.0], [-20.0, 1.0, 35.0, 61.0, -36.0], 
-[23.0, -76.0, 55.0, 62.0, 109.0]], [[-8.0, -74.0, -6.0, -72.0, -10.0], [-2.0, 24.0, -8.0, 6.0, -6.0], [-8.0, -76.0, 18.0, 52.0, 
-92.0], [78.0, 20.0, -34.0, 16.0, -64.0]]]])
+      ref=msk_ref*numpy.array([[[39.0, -9.0, -25.0, -47.0, -86.0], [-117.0, -98.0, -23.0, 25.0, 25.0], [107.0, -25.0, 58.0, 
+-63.0, -60.0], [0.0, -4.0, -5.0, -16.0, -1.0]], [[45.0, 27.0, -14.0, -3.0, -46.0], [-57.0, -71.0, 18.0, -36.0, -29.0], [81.0, 
+-9.0, 15.0, -67.0, -25.0], [-1.0, 11.0, -27.0, -31.0, 45.0]]])+(1.-msk_ref)*numpy.array([[[-49.0, -18.0, -29.0, 54.0, 94.0], 
+[140.0, 122.0, -42.0, -8.0, 43.0], [56.0, 121.0, -83.0, 20.0, 38.0], [-9.0, -106.0, 41.0, -43.0, 137.0]], [[-2.0, 6.0, -100.0, 
+62.0, 33.0], [136.0, 54.0, 8.0, 77.0, 29.0], [-38.0, 28.0, -40.0, -65.0, -55.0], [2.0, -79.0, 4.0, 24.0, 105.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank1_expandedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-4.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 0.0]))
+      arg1=Data(numpy.array([[[-7.0, 2.0], [1.0, 1.0]], [[-2.0, 3.0], [-7.0, -2.0]], [[-4.0, 2.0], [2.0, 0.0]], [[3.0, 0.0], 
+[3.0, 7.0]], [[-2.0, 0.0], [-5.0, 0.0]], [[-3.0, 0.0], [3.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 6.0], [0.0, 0.0]], [[5.0, 0.0], [0.0, -7.0]], [[5.0, -7.0], [-5.0, 3.0]], 
+[[0.0, 3.0], [-5.0, 3.0]], [[0.0, -4.0], [-3.0, 0.0]], [[3.0, 4.0], [-4.0, -1.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[28.0, -8.0], [-4.0, -4.0]], [[8.0, -12.0], [28.0, 8.0]], [[16.0, -8.0], [-8.0, 0.0]], 
+[[-12.0, 0.0], [-12.0, -28.0]], [[8.0, 0.0], [20.0, 0.0]], [[12.0, 0.0], [-12.0, 28.0]]], [[[-42.0, 12.0], [6.0, 6.0]], 
+[[-12.0, 18.0], [-42.0, -12.0]], [[-24.0, 12.0], [12.0, 0.0]], [[18.0, 0.0], [18.0, 42.0]], [[-12.0, 0.0], [-30.0, 0.0]], 
+[[-18.0, 0.0], [18.0, -42.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[0.0, -2.0, -6.0], [4.0, 4.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, 1.0, 5.0], [7.0, 7.0, 1.0]]))
+      arg1=Data(numpy.array([[[[1.0, 4.0], [5.0, -2.0]], [[0.0, 0.0], [-2.0, 3.0]], [[3.0, 0.0], [0.0, 1.0]], [[-6.0, 0.0], 
+[0.0, 2.0]], [[-6.0, -3.0], [5.0, -6.0]], [[-6.0, 3.0], [-3.0, -6.0]]], [[[-5.0, 4.0], [-5.0, 6.0]], [[0.0, -4.0], [6.0, 
+-4.0]], [[0.0, 5.0], [4.0, -1.0]], [[2.0, 2.0], [4.0, 0.0]], [[2.0, 5.0], [-2.0, -3.0]], [[7.0, -2.0], [-6.0, 5.0]]], [[[-5.0, 
+6.0], [7.0, 7.0]], [[-4.0, 7.0], [4.0, 4.0]], [[-4.0, -3.0], [2.0, 6.0]], [[-4.0, 5.0], [-1.0, 3.0]], [[-3.0, 0.0], [0.0, 
+-2.0]], [[1.0, 1.0], [-4.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, 0.0], [-6.0, 7.0]], [[5.0, 1.0], [4.0, -5.0]], [[-1.0, -4.0], [-3.0, -2.0]], 
+[[-1.0, 4.0], [1.0, -6.0]], [[-1.0, -5.0], [-4.0, 1.0]], [[6.0, 0.0], [-1.0, 2.0]]], [[[0.0, 5.0], [-5.0, -6.0]], [[-6.0, 7.0], 
+[-7.0, -5.0]], [[-4.0, -4.0], [-1.0, -4.0]], [[-3.0, -6.0], [6.0, -5.0]], [[5.0, 3.0], [3.0, -4.0]], [[6.0, 6.0], [-6.0, 
+-3.0]]], [[[6.0, -2.0], [5.0, -3.0]], [[0.0, 2.0], [-1.0, 4.0]], [[0.0, 4.0], [0.0, 1.0]], [[3.0, -5.0], [-6.0, -1.0]], [[-5.0, 
+-7.0], [0.0, 2.0]], [[3.0, 0.0], [7.0, -6.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[40.0, -44.0], [-32.0, -54.0]], [[24.0, -34.0], [-36.0, -16.0]], [[24.0, 8.0], [-20.0, 
+-34.0]], [[20.0, -34.0], [-2.0, -18.0]], [[14.0, -10.0], [4.0, 18.0]], [[-20.0, -2.0], [36.0, -22.0]]], [[[4.0, 8.0], [-28.0, 
+-12.0]], [[16.0, -44.0], [0.0, -20.0]], [[28.0, 32.0], [8.0, -24.0]], [[0.0, -12.0], [20.0, -4.0]], [[-4.0, 8.0], [12.0, 
+-28.0]], [[0.0, 0.0], [-20.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[32.0, -5.0], [14.0, -14.0]], [[-1.0, 18.0], [-8.0, 
+10.0]], [[-5.0, 12.0], [-4.0, -1.0]], [[11.0, -27.0], [-23.0, -16.0]], [[-21.0, -37.0], [-1.0, 7.0]], [[27.0, 6.0], [28.0, 
+-31.0]]], [[[20.0, 33.0], [-72.0, 4.0]], [[-7.0, 58.0], [-22.0, -66.0]], [[-35.0, -52.0], [-28.0, -41.0]], [[-25.0, -19.0], 
+[43.0, -78.0]], [[23.0, -21.0], [-7.0, -19.0]], [[87.0, 42.0], [-42.0, -13.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[[1.0, -3.0], [7.0, 5.0]], [[-2.0, -1.0], [0.0, 7.0]], [[4.0, 1.0], [3.0, 7.0]], [[-6.0, 7.0], 
-[6.0, 2.0]], [[6.0, -2.0], [-6.0, 2.0]], [[1.0, 6.0], [4.0, -3.0]]]),self.functionspace)
-      arg1=6.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[6.0, -18.0], [42.0, 30.0]], [[-12.0, -6.0], [0.0, 42.0]], [[24.0, 6.0], [18.0, 42.0]], [[-36.0, 
-42.0], [36.0, 12.0]], [[36.0, -12.0], [-36.0, 12.0]], [[6.0, 36.0], [24.0, -18.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[2.0, 5.0, -5.0, -4.0, 3.0], [5.0, 3.0, 0.0, 1.0, -3.0], [7.0, 1.0, -7.0, 5.0, -5.0], [6.0, -3.0, 
+-1.0, 6.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 7.0, 1.0, 1.0, 5.0], [-6.0, 4.0, 0.0, 0.0, 0.0], [2.0, 0.0, 6.0, -3.0, 0.0], 
+[7.0, 5.0, 2.0, -2.0, 1.0]]))
+      arg1=4.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[8.0, 20.0, -20.0, -16.0, 12.0], [20.0, 12.0, 0.0, 4.0, -12.0], [28.0, 4.0, -28.0, 20.0, -20.0], 
+[24.0, -12.0, -4.0, 24.0, 20.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-24.0, 28.0, 4.0, 4.0, 20.0], [-24.0, 16.0, 0.0, 0.0, 0.0], [8.0, 0.0, 24.0, -12.0, 
+0.0], [28.0, 20.0, 8.0, -8.0, 4.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[[7.0, 2.0], [7.0, -7.0]], [[-2.0, 6.0], [5.0, 5.0]], [[5.0, 4.0], [0.0, 5.0]], [[7.0, -2.0], 
-[4.0, 5.0]], [[2.0, -3.0], [-3.0, 3.0]], [[6.0, -2.0], [0.0, 0.0]]]),self.functionspace)
-      arg1=numpy.array(5.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[35.0, 10.0], [35.0, -35.0]], [[-10.0, 30.0], [25.0, 25.0]], [[25.0, 20.0], [0.0, 25.0]], [[35.0, 
--10.0], [20.0, 25.0]], [[10.0, -15.0], [-15.0, 15.0]], [[30.0, -10.0], [0.0, 0.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[-5.0, 3.0, -5.0, -3.0, -3.0], [0.0, 0.0, 1.0, 2.0, -2.0], [2.0, 0.0, 0.0, 0.0, -4.0], [-1.0, 2.0, 
+1.0, -3.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -1.0, 5.0, 3.0, -2.0], [-1.0, 1.0, 2.0, -1.0, 3.0], [4.0, 1.0, 4.0, -7.0, 
+-1.0], [-1.0, 2.0, -4.0, 1.0, -6.0]]))
+      arg1=numpy.array(-5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[25.0, -15.0, 25.0, 15.0, 15.0], [-0.0, -0.0, -5.0, -10.0, 10.0], [-10.0, -0.0, -0.0, -0.0, 20.0], 
+[5.0, -10.0, -5.0, 15.0, -30.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[10.0, 5.0, -25.0, -15.0, 10.0], [5.0, -5.0, -10.0, 5.0, -15.0], [-20.0, -5.0, -20.0, 
+35.0, 5.0], [5.0, -10.0, 20.0, -5.0, 30.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[-2.0, 0.0], [-6.0, -6.0]], [[5.0, -2.0], [-2.0, -6.0]], [[6.0, -1.0], [2.0, -3.0]], [[5.0, 
--3.0], [-3.0, -3.0]], [[4.0, -2.0], [7.0, 2.0]], [[1.0, 4.0], [0.0, 2.0]]], [[[0.0, -1.0], [7.0, -5.0]], [[-2.0, 1.0], [-3.0, 
--3.0]], [[-4.0, -1.0], [-5.0, 0.0]], [[2.0, -2.0], [4.0, 5.0]], [[4.0, 6.0], [7.0, -6.0]], [[1.0, 4.0], [-4.0, 5.0]]], [[[-3.0, 
-1.0], [1.0, 1.0]], [[-2.0, -3.0], [1.0, 2.0]], [[-2.0, 3.0], [4.0, -6.0]], [[-6.0, -5.0], [0.0, -6.0]], [[1.0, 6.0], [-1.0, 
-1.0]], [[-3.0, -5.0], [0.0, -6.0]]]]),self.functionspace)
-      arg1=numpy.array([0.0, -3.0, 2.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-6.0, 5.0], [-19.0, 17.0]], [[2.0, -9.0], [11.0, 13.0]], [[8.0, 9.0], [23.0, -12.0]], [[-18.0, 
--4.0], [-12.0, -27.0]], [[-10.0, -6.0], [-23.0, 20.0]], [[-9.0, -22.0], [12.0, -27.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[7.0, 0.0, -3.0], [0.0, -6.0, -4.0], [0.0, -2.0, -1.0], [-4.0, -2.0, -1.0], [0.0, 3.0, -7.0]], 
+[[-1.0, 2.0, 1.0], [-6.0, 7.0, -2.0], [0.0, 0.0, -4.0], [-6.0, 1.0, -5.0], [6.0, 0.0, -5.0]], [[-4.0, 3.0, -1.0], [-2.0, 7.0, 
+3.0], [-7.0, 0.0, -1.0], [1.0, 2.0, 0.0], [0.0, 3.0, 3.0]], [[2.0, -1.0, 5.0], [-2.0, 6.0, 7.0], [-3.0, 1.0, 0.0], [-3.0, 3.0, 
+4.0], [3.0, 6.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[2.0, 5.0, 1.0], [-4.0, 4.0, 6.0], [7.0, -3.0, 1.0], [4.0, 4.0, -7.0], [4.0, 3.0, 
+6.0]], [[5.0, -3.0, -2.0], [-6.0, -1.0, 5.0], [1.0, 3.0, -4.0], [-3.0, 4.0, 1.0], [6.0, 7.0, 4.0]], [[5.0, 5.0, -3.0], [-7.0, 
+-7.0, 3.0], [0.0, -4.0, 0.0], [6.0, 6.0, -2.0], [3.0, 2.0, 0.0]], [[-2.0, -5.0, -1.0], [-5.0, -7.0, 2.0], [5.0, 7.0, 0.0], 
+[1.0, -3.0, 3.0], [-4.0, 2.0, 1.0]]]))
+      arg1=numpy.array([-2.0, 6.0, -1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-11.0, -32.0, -11.0, -3.0, 25.0], [13.0, 56.0, 4.0, 23.0, -7.0], [27.0, 43.0, 15.0, 10.0, 15.0], 
+[-15.0, 33.0, 12.0, 20.0, 36.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[25.0, 26.0, -33.0, 23.0, 4.0], [-26.0, 1.0, 20.0, 29.0, 26.0], [23.0, -31.0, -24.0, 
+26.0, 6.0], [-25.0, -34.0, 32.0, -23.0, 19.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-4.0, -6.0, 2.0], [-1.0, -1.0, 1.0]], [[4.0, 2.0, 0.0], [4.0, -5.0, -5.0]], [[0.0, -3.0, 4.0], 
+[-6.0, -1.0, -7.0]], [[4.0, 1.0, -2.0], [-3.0, 0.0, -5.0]], [[-1.0, 5.0, 4.0], [0.0, 3.0, 7.0]]], [[[5.0, -7.0, -2.0], [6.0, 
+-3.0, 7.0]], [[-7.0, -4.0, -3.0], [-7.0, -2.0, 0.0]], [[6.0, -2.0, -4.0], [-3.0, 2.0, 0.0]], [[3.0, -4.0, -3.0], [0.0, -6.0, 
+2.0]], [[-1.0, 1.0, -3.0], [2.0, 1.0, 4.0]]], [[[-7.0, 0.0, 1.0], [-2.0, 2.0, 3.0]], [[-3.0, 0.0, 3.0], [1.0, -2.0, -6.0]], 
+[[-2.0, 3.0, -4.0], [-7.0, 2.0, -2.0]], [[-6.0, 0.0, 0.0], [-2.0, 2.0, -5.0]], [[3.0, -1.0, 2.0], [-1.0, 5.0, -6.0]]], [[[1.0, 
+-1.0, 2.0], [1.0, 7.0, 6.0]], [[6.0, -1.0, -2.0], [-3.0, -7.0, -4.0]], [[3.0, 2.0, 1.0], [4.0, -1.0, 3.0]], [[3.0, 0.0, -1.0], 
+[5.0, -6.0, 7.0]], [[-3.0, -6.0, 4.0], [-3.0, 6.0, 4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, -6.0, 7.0], [-6.0, -7.0, -1.0]], [[0.0, -6.0, -1.0], [-6.0, 3.0, 3.0]], 
+[[6.0, -7.0, 0.0], [-7.0, 7.0, 5.0]], [[-3.0, 0.0, -1.0], [2.0, 0.0, -4.0]], [[-6.0, 2.0, -4.0], [0.0, 0.0, -2.0]]], [[[-7.0, 
+1.0, 7.0], [-3.0, 3.0, 6.0]], [[-4.0, -2.0, -1.0], [0.0, 0.0, 0.0]], [[7.0, 6.0, 7.0], [-2.0, 3.0, 4.0]], [[7.0, -1.0, 6.0], 
+[2.0, 3.0, -1.0]], [[1.0, -2.0, -4.0], [-3.0, -3.0, -2.0]]], [[[2.0, -4.0, -6.0], [-3.0, 0.0, -2.0]], [[-1.0, 3.0, 0.0], [7.0, 
+6.0, -7.0]], [[-1.0, -7.0, -7.0], [-1.0, 7.0, -7.0]], [[-1.0, 2.0, -5.0], [-5.0, 0.0, 6.0]], [[2.0, 5.0, 1.0], [3.0, -3.0, 
+1.0]]], [[[-4.0, 3.0, 5.0], [6.0, 4.0, 5.0]], [[4.0, -2.0, 0.0], [0.0, 0.0, 7.0]], [[-5.0, 3.0, 0.0], [2.0, 2.0, 5.0]], [[-4.0, 
+-7.0, 2.0], [-2.0, -6.0, 5.0]], [[-4.0, 2.0, 4.0], [5.0, 2.0, -7.0]]]]))
+      arg1=numpy.array([[-2.0, 3.0, 1.0], [5.0, -3.0, -4.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-14.0, 53.0, -4.0, -2.0, -16.0], [-22.0, -30.0, -43.0, -11.0, -7.0], [-13.0, 44.0, -24.0, 16.0, 
+-3.0], [-43.0, 5.0, 12.0, 8.0, -57.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-2.0, -70.0, -109.0, 31.0, 22.0], [-24.0, 1.0, -24.0, -6.0, -10.0], [-29.0, 56.0, 
+-24.0, -46.0, 32.0], [20.0, -42.0, 3.0, -23.0, 65.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_array_rank1_offset0(self):
-      arg0=Data(numpy.array([[[-4.0, -3.0], [-5.0, 5.0]], [[3.0, 0.0], [-3.0, -5.0]], [[-6.0, -7.0], [1.0, 2.0]], [[5.0, -7.0], 
-[3.0, -6.0]], [[-6.0, -1.0], [5.0, 3.0]], [[1.0, 7.0], [7.0, 6.0]]]),self.functionspace)
-      arg1=numpy.array([6.0, -5.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-24.0, 20.0], [-18.0, 15.0]], [[-30.0, 25.0], [30.0, -25.0]]], [[[18.0, -15.0], [0.0, 0.0]], 
-[[-18.0, 15.0], [-30.0, 25.0]]], [[[-36.0, 30.0], [-42.0, 35.0]], [[6.0, -5.0], [12.0, -10.0]]], [[[30.0, -25.0], [-42.0, 
-35.0]], [[18.0, -15.0], [-36.0, 30.0]]], [[[-36.0, 30.0], [-6.0, 5.0]], [[30.0, -25.0], [18.0, -15.0]]], [[[6.0, -5.0], [42.0, 
--35.0]], [[42.0, -35.0], [36.0, -30.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[-3.0, 7.0, -6.0, 2.0, -3.0], [0.0, 0.0, 2.0, -6.0, 0.0], [0.0, 1.0, -4.0, -4.0, -6.0], [5.0, 7.0, 
+5.0, 2.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 4.0, 0.0, 6.0, 0.0], [4.0, -5.0, -4.0, 5.0, 0.0], [4.0, 4.0, 2.0, -6.0, 0.0], 
+[4.0, 0.0, 4.0, 0.0, 1.0]]))
+      arg1=numpy.array([-4.0, -1.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[12.0, 3.0], [-28.0, -7.0], [24.0, 6.0], [-8.0, -2.0], [12.0, 3.0]], [[0.0, 0.0], [0.0, 0.0], 
+[-8.0, -2.0], [24.0, 6.0], [0.0, 0.0]], [[0.0, 0.0], [-4.0, -1.0], [16.0, 4.0], [16.0, 4.0], [24.0, 6.0]], [[-20.0, -5.0], 
+[-28.0, -7.0], [-20.0, -5.0], [-8.0, -2.0], [-28.0, -7.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0], [-16.0, -4.0], [0.0, 0.0], [-24.0, -6.0], [0.0, 0.0]], [[-16.0, -4.0], 
+[20.0, 5.0], [16.0, 4.0], [-20.0, -5.0], [0.0, 0.0]], [[-16.0, -4.0], [-16.0, -4.0], [-8.0, -2.0], [24.0, 6.0], [0.0, 0.0]], 
+[[-16.0, -4.0], [0.0, 0.0], [-16.0, -4.0], [0.0, 0.0], [-4.0, -1.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[4.0, 7.0], [7.0, -4.0]], [[0.0, 3.0], [-5.0, -5.0]], [[2.0, 6.0], [-6.0, -7.0]], [[4.0, -4.0], 
-[2.0, 0.0]], [[-6.0, -7.0], [0.0, 5.0]], [[4.0, 6.0], [-2.0, 5.0]]], [[[-3.0, 3.0], [-4.0, 6.0]], [[4.0, 0.0], [-5.0, 1.0]], 
-[[-3.0, 5.0], [1.0, -1.0]], [[-7.0, 2.0], [2.0, 7.0]], [[5.0, -5.0], [0.0, 2.0]], [[-6.0, 6.0], [7.0, -7.0]]], [[[-5.0, 0.0], 
-[2.0, 5.0]], [[6.0, 3.0], [-7.0, -7.0]], [[-5.0, -1.0], [1.0, -6.0]], [[4.0, 5.0], [0.0, -7.0]], [[0.0, 5.0], [0.0, 0.0]], 
-[[-4.0, -4.0], [4.0, 0.0]]]]),self.functionspace)
-      arg1=numpy.array([[-2.0, -3.0], [-3.0, 5.0], [4.0, 6.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-19.0, -57.0], [-23.0, -6.0]], [[6.0, -29.0], [10.0, 72.0]]], [[[12.0, 56.0], [6.0, 9.0]], 
-[[-3.0, -52.0], [-21.0, -22.0]]], [[[-15.0, -51.0], [-31.0, 1.0]], [[13.0, 29.0], [-7.0, -20.0]]], [[[29.0, -23.0], [22.0, 
-52.0]], [[-10.0, 4.0], [-49.0, -7.0]]], [[[-3.0, 43.0], [49.0, 26.0]], [[0.0, 0.0], [-16.0, -5.0]]], [[[-6.0, -66.0], [-46.0, 
--12.0]], [[-1.0, 65.0], [11.0, -50.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[4.0, -1.0, -2.0], [0.0, -4.0, 0.0], [2.0, 4.0, -1.0], [0.0, -3.0, -1.0], [5.0, 4.0, 4.0]], 
+[[-5.0, 0.0, 0.0], [5.0, -4.0, 1.0], [7.0, 1.0, 6.0], [-3.0, 0.0, 7.0], [0.0, -2.0, 2.0]], [[-2.0, 0.0, 2.0], [-4.0, 7.0, 
+-6.0], [1.0, 6.0, 2.0], [3.0, -7.0, 0.0], [-2.0, -2.0, -5.0]], [[-2.0, -2.0, 0.0], [-4.0, 5.0, -1.0], [-2.0, -2.0, -5.0], [2.0, 
+6.0, -4.0], [-6.0, 5.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-4.0, 4.0, 2.0], [-2.0, -4.0, 0.0], [0.0, 4.0, 0.0], [-7.0, -2.0, -3.0], [-4.0, 6.0, 
+-5.0]], [[3.0, -6.0, 0.0], [-7.0, -3.0, -1.0], [5.0, -6.0, 7.0], [4.0, 1.0, 1.0], [0.0, 7.0, 1.0]], [[6.0, -5.0, -4.0], [2.0, 
+7.0, 3.0], [-4.0, 7.0, 6.0], [1.0, 7.0, 0.0], [-2.0, 5.0, 5.0]], [[4.0, 6.0, -5.0], [-6.0, 5.0, -6.0], [-1.0, -6.0, -6.0], 
+[7.0, 6.0, 1.0], [-1.0, 0.0, -2.0]]]))
+      arg1=numpy.array([[-1.0, -7.0], [-5.0, 3.0], [-6.0, -6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[13.0, -19.0], [20.0, -12.0], [-16.0, 4.0], [21.0, -3.0], [-49.0, -47.0]], [[5.0, 35.0], [9.0, 
+-53.0], [-48.0, -82.0], [-39.0, -21.0], [-2.0, -18.0]], [[-10.0, 2.0], [5.0, 85.0], [-43.0, -1.0], [32.0, -42.0], [42.0, 
+38.0]], [[12.0, 8.0], [-15.0, 49.0], [42.0, 38.0], [-8.0, 28.0], [-7.0, 69.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-28.0, 28.0], [22.0, 2.0], [-20.0, 12.0], [35.0, 61.0], [4.0, 76.0]], [[27.0, -39.0], 
+[28.0, 46.0], [-17.0, -95.0], [-15.0, -31.0], [-41.0, 15.0]], [[43.0, -33.0], [-55.0, -11.0], [-67.0, 13.0], [-36.0, 14.0], 
+[-53.0, -1.0]], [[-4.0, 20.0], [17.0, 93.0], [67.0, 25.0], [-43.0, -37.0], [13.0, 19.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[5.0, 3.0], [4.0, 6.0]], [[-2.0, 6.0], [-6.0, -1.0]], [[6.0, -2.0], [-4.0, 4.0]], [[0.0, 3.0], 
-[5.0, 6.0]], [[0.0, 0.0], [-6.0, 0.0]], [[-3.0, -5.0], [-7.0, 2.0]]]),self.functionspace)
-      arg1=Data(-2.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-10.0, -6.0], [-8.0, -12.0]], [[4.0, -12.0], [12.0, 2.0]], [[-12.0, 4.0], [8.0, -8.0]], [[-0.0, 
--6.0], [-10.0, -12.0]], [[-0.0, -0.0], [12.0, -0.0]], [[6.0, 10.0], [14.0, -4.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[3.0, -7.0, -3.0], [-6.0, -5.0, -2.0]], [[-4.0, 0.0, -4.0], [2.0, 3.0, 7.0]], [[-5.0, 6.0, 0.0], 
+[-6.0, -7.0, 0.0]], [[-3.0, 1.0, -7.0], [0.0, -3.0, 3.0]], [[-2.0, 1.0, -5.0], [3.0, 0.0, -1.0]]], [[[4.0, 7.0, -4.0], [-4.0, 
+-5.0, -1.0]], [[0.0, -4.0, 1.0], [0.0, 3.0, 1.0]], [[-2.0, 7.0, 6.0], [0.0, 7.0, 3.0]], [[-2.0, 4.0, -1.0], [0.0, -6.0, 1.0]], 
+[[0.0, -4.0, -3.0], [2.0, 6.0, 6.0]]], [[[-7.0, 6.0, -5.0], [2.0, 5.0, -1.0]], [[3.0, 7.0, 2.0], [-1.0, 1.0, 6.0]], [[7.0, 6.0, 
+0.0], [4.0, 6.0, 5.0]], [[7.0, 4.0, 0.0], [-3.0, -3.0, -5.0]], [[6.0, -3.0, -3.0], [-2.0, 3.0, -6.0]]], [[[-5.0, -2.0, 2.0], 
+[0.0, 7.0, -1.0]], [[-2.0, 2.0, 0.0], [0.0, 2.0, 0.0]], [[-1.0, -1.0, 0.0], [0.0, -7.0, -1.0]], [[-1.0, 1.0, -6.0], [0.0, -1.0, 
+6.0]], [[-2.0, 1.0, 0.0], [-5.0, 1.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 1.0, -1.0], [-2.0, 7.0, -2.0]], [[-1.0, 3.0, -7.0], [0.0, 2.0, 2.0]], [[2.0, 
+-7.0, 0.0], [-1.0, 6.0, 0.0]], [[0.0, -6.0, -3.0], [-7.0, -5.0, -4.0]], [[-2.0, -5.0, 5.0], [-7.0, 4.0, -7.0]]], [[[-7.0, 0.0, 
+-6.0], [1.0, -3.0, 2.0]], [[-6.0, -2.0, 0.0], [0.0, -7.0, 6.0]], [[2.0, -7.0, -4.0], [3.0, 7.0, 2.0]], [[7.0, 0.0, 0.0], [3.0, 
+7.0, -7.0]], [[1.0, -6.0, 0.0], [7.0, 5.0, -2.0]]], [[[1.0, -5.0, 7.0], [-6.0, 0.0, -7.0]], [[1.0, 0.0, -1.0], [-4.0, 0.0, 
+7.0]], [[-6.0, -6.0, 0.0], [-1.0, -5.0, 2.0]], [[2.0, -4.0, 6.0], [7.0, 5.0, 3.0]], [[5.0, 3.0, -2.0], [4.0, 1.0, -1.0]]], 
+[[[7.0, -7.0, -7.0], [-5.0, 2.0, 7.0]], [[-4.0, 6.0, -2.0], [5.0, 0.0, 4.0]], [[-6.0, 1.0, 5.0], [6.0, -1.0, 1.0]], [[0.0, 2.0, 
+7.0], [5.0, 0.0, 1.0]], [[0.0, 0.0, -4.0], [4.0, -7.0, -3.0]]]]))
+      arg1=numpy.array([[[6.0, 3.0], [4.0, 0.0], [2.0, -3.0]], [[-3.0, 7.0], [2.0, -5.0], [-3.0, 0.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-2.0, 1.0], [-53.0, -1.0], [-2.0, -22.0], [-43.0, 27.0], [-24.0, 30.0]], [[49.0, 21.0], [-11.0, 
+-18.0], [33.0, -59.0], [-13.0, 27.0], [-34.0, -7.0]], [[-21.0, -17.0], [37.0, -9.0], [51.0, 19.0], [76.0, 15.0], [48.0, -2.0]], 
+[[-17.0, -56.0], [0.0, -16.0], [-21.0, 32.0], [-34.0, 20.0], [27.0, -46.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[58.0, -31.0], [-10.0, 8.0], [-1.0, -31.0], [-7.0, -15.0], [28.0, -90.0]], [[-69.0, 
+19.0], [-76.0, 17.0], [-25.0, 4.0], [68.0, 7.0], [-23.0, 27.0]], [[39.0, -60.0], [-5.0, -22.0], [-73.0, 0.0], [-12.0, 12.0], 
+[31.0, 44.0]], [[-2.0, -3.0], [-31.0, 29.0], [-45.0, 14.0], [4.0, 14.0], [-25.0, 75.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[0.0, 7.0], [-1.0, -4.0]], [[-7.0, -5.0], [-7.0, 6.0]], [[0.0, -7.0], [-2.0, -7.0]], [[-1.0, 
-5.0], [-7.0, 4.0]], [[4.0, 0.0], [7.0, -4.0]], [[-2.0, -2.0], [-3.0, 2.0]]], [[[0.0, -6.0], [-2.0, -2.0]], [[-7.0, 5.0], [4.0, 
-6.0]], [[-6.0, -6.0], [0.0, -6.0]], [[6.0, 0.0], [4.0, 7.0]], [[-2.0, -2.0], [-3.0, 0.0]], [[-6.0, -1.0], [5.0, -1.0]]], 
-[[[7.0, 7.0], [5.0, 4.0]], [[5.0, -2.0], [3.0, 5.0]], [[4.0, -2.0], [0.0, -2.0]], [[-5.0, -1.0], [-7.0, 0.0]], [[4.0, -5.0], 
-[5.0, -6.0]], [[2.0, 7.0], [0.0, -6.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([7.0, 0.0, 0.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[0.0, 49.0], [-7.0, -28.0]], [[-49.0, -35.0], [-49.0, 42.0]], [[0.0, -49.0], [-14.0, -49.0]], 
-[[-7.0, 35.0], [-49.0, 28.0]], [[28.0, 0.0], [49.0, -28.0]], [[-14.0, -14.0], [-21.0, 14.0]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_array_rank2_offset0(self):
+      arg0=Data(numpy.array([[3.0, 0.0, -1.0, 4.0, -4.0], [6.0, -3.0, 1.0, 6.0, -1.0], [1.0, -5.0, 0.0, 3.0, 0.0], [6.0, -4.0, 
+-3.0, 2.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, -3.0, 2.0, 2.0, 4.0], [-7.0, 7.0, 3.0, -1.0, -3.0], [3.0, 3.0, 1.0, -5.0, 0.0], 
+[5.0, -1.0, 4.0, 2.0, 7.0]]))
+      arg1=numpy.array([[3.0, -6.0, 6.0, -5.0, -3.0], [-2.0, 1.0, 5.0, -5.0, 4.0], [-3.0, 5.0, -4.0, -4.0, 0.0], [7.0, 4.0, 
+2.0, 7.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[9.0, -18.0, 18.0, -15.0, -9.0], [-6.0, 3.0, 15.0, -15.0, 12.0], [-9.0, 15.0, -12.0, -12.0, 0.0], 
+[21.0, 12.0, 6.0, 21.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[-3.0, 6.0, -6.0, 5.0, 3.0], [2.0, -1.0, -5.0, 5.0, -4.0], [3.0, -5.0, 4.0, 4.0, 0.0], [-7.0, -4.0, -2.0, 
+-7.0, -6.0]], [[12.0, -24.0, 24.0, -20.0, -12.0], [-8.0, 4.0, 20.0, -20.0, 16.0], [-12.0, 20.0, -16.0, -16.0, 0.0], [28.0, 
+16.0, 8.0, 28.0, 24.0]], [[-12.0, 24.0, -24.0, 20.0, 12.0], [8.0, -4.0, -20.0, 20.0, -16.0], [12.0, -20.0, 16.0, 16.0, 0.0], 
+[-28.0, -16.0, -8.0, -28.0, -24.0]]], [[[18.0, -36.0, 36.0, -30.0, -18.0], [-12.0, 6.0, 30.0, -30.0, 24.0], [-18.0, 30.0, 
+-24.0, -24.0, 0.0], [42.0, 24.0, 12.0, 42.0, 36.0]], [[-9.0, 18.0, -18.0, 15.0, 9.0], [6.0, -3.0, -15.0, 15.0, -12.0], [9.0, 
+-15.0, 12.0, 12.0, 0.0], [-21.0, -12.0, -6.0, -21.0, -18.0]], [[3.0, -6.0, 6.0, -5.0, -3.0], [-2.0, 1.0, 5.0, -5.0, 4.0], 
+[-3.0, 5.0, -4.0, -4.0, 0.0], [7.0, 4.0, 2.0, 7.0, 6.0]], [[18.0, -36.0, 36.0, -30.0, -18.0], [-12.0, 6.0, 30.0, -30.0, 24.0], 
+[-18.0, 30.0, -24.0, -24.0, 0.0], [42.0, 24.0, 12.0, 42.0, 36.0]], [[-3.0, 6.0, -6.0, 5.0, 3.0], [2.0, -1.0, -5.0, 5.0, -4.0], 
+[3.0, -5.0, 4.0, 4.0, 0.0], [-7.0, -4.0, -2.0, -7.0, -6.0]]], [[[3.0, -6.0, 6.0, -5.0, -3.0], [-2.0, 1.0, 5.0, -5.0, 4.0], 
+[-3.0, 5.0, -4.0, -4.0, 0.0], [7.0, 4.0, 2.0, 7.0, 6.0]], [[-15.0, 30.0, -30.0, 25.0, 15.0], [10.0, -5.0, -25.0, 25.0, -20.0], 
+[15.0, -25.0, 20.0, 20.0, 0.0], [-35.0, -20.0, -10.0, -35.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[9.0, -18.0, 18.0, -15.0, -9.0], [-6.0, 3.0, 15.0, -15.0, 12.0], [-9.0, 
+15.0, -12.0, -12.0, 0.0], [21.0, 12.0, 6.0, 21.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[18.0, -36.0, 36.0, -30.0, -18.0], [-12.0, 6.0, 30.0, -30.0, 24.0], [-18.0, 
+30.0, -24.0, -24.0, 0.0], [42.0, 24.0, 12.0, 42.0, 36.0]], [[-12.0, 24.0, -24.0, 20.0, 12.0], [8.0, -4.0, -20.0, 20.0, -16.0], 
+[12.0, -20.0, 16.0, 16.0, 0.0], [-28.0, -16.0, -8.0, -28.0, -24.0]], [[-9.0, 18.0, -18.0, 15.0, 9.0], [6.0, -3.0, -15.0, 15.0, 
+-12.0], [9.0, -15.0, 12.0, 12.0, 0.0], [-21.0, -12.0, -6.0, -21.0, -18.0]], [[6.0, -12.0, 12.0, -10.0, -6.0], [-4.0, 2.0, 10.0, 
+-10.0, 8.0], [-6.0, 10.0, -8.0, -8.0, 0.0], [14.0, 8.0, 4.0, 14.0, 12.0]], [[-12.0, 24.0, -24.0, 20.0, 12.0], [8.0, -4.0, 
+-20.0, 20.0, -16.0], [12.0, -20.0, 16.0, 16.0, 0.0], [-28.0, -16.0, -8.0, -28.0, -24.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[15.0, -30.0, 30.0, -25.0, -15.0], [-10.0, 5.0, 25.0, -25.0, 20.0], [-15.0, 25.0, 
+-20.0, -20.0, 0.0], [35.0, 20.0, 10.0, 35.0, 30.0]], [[-9.0, 18.0, -18.0, 15.0, 9.0], [6.0, -3.0, -15.0, 15.0, -12.0], [9.0, 
+-15.0, 12.0, 12.0, 0.0], [-21.0, -12.0, -6.0, -21.0, -18.0]], [[6.0, -12.0, 12.0, -10.0, -6.0], [-4.0, 2.0, 10.0, -10.0, 8.0], 
+[-6.0, 10.0, -8.0, -8.0, 0.0], [14.0, 8.0, 4.0, 14.0, 12.0]], [[6.0, -12.0, 12.0, -10.0, -6.0], [-4.0, 2.0, 10.0, -10.0, 8.0], 
+[-6.0, 10.0, -8.0, -8.0, 0.0], [14.0, 8.0, 4.0, 14.0, 12.0]], [[12.0, -24.0, 24.0, -20.0, -12.0], [-8.0, 4.0, 20.0, -20.0, 
+16.0], [-12.0, 20.0, -16.0, -16.0, 0.0], [28.0, 16.0, 8.0, 28.0, 24.0]]], [[[-21.0, 42.0, -42.0, 35.0, 21.0], [14.0, -7.0, 
+-35.0, 35.0, -28.0], [21.0, -35.0, 28.0, 28.0, 0.0], [-49.0, -28.0, -14.0, -49.0, -42.0]], [[21.0, -42.0, 42.0, -35.0, -21.0], 
+[-14.0, 7.0, 35.0, -35.0, 28.0], [-21.0, 35.0, -28.0, -28.0, 0.0], [49.0, 28.0, 14.0, 49.0, 42.0]], [[9.0, -18.0, 18.0, -15.0, 
+-9.0], [-6.0, 3.0, 15.0, -15.0, 12.0], [-9.0, 15.0, -12.0, -12.0, 0.0], [21.0, 12.0, 6.0, 21.0, 18.0]], [[-3.0, 6.0, -6.0, 5.0, 
+3.0], [2.0, -1.0, -5.0, 5.0, -4.0], [3.0, -5.0, 4.0, 4.0, 0.0], [-7.0, -4.0, -2.0, -7.0, -6.0]], [[-9.0, 18.0, -18.0, 15.0, 
+9.0], [6.0, -3.0, -15.0, 15.0, -12.0], [9.0, -15.0, 12.0, 12.0, 0.0], [-21.0, -12.0, -6.0, -21.0, -18.0]]], [[[9.0, -18.0, 
+18.0, -15.0, -9.0], [-6.0, 3.0, 15.0, -15.0, 12.0], [-9.0, 15.0, -12.0, -12.0, 0.0], [21.0, 12.0, 6.0, 21.0, 18.0]], [[9.0, 
+-18.0, 18.0, -15.0, -9.0], [-6.0, 3.0, 15.0, -15.0, 12.0], [-9.0, 15.0, -12.0, -12.0, 0.0], [21.0, 12.0, 6.0, 21.0, 18.0]], 
+[[3.0, -6.0, 6.0, -5.0, -3.0], [-2.0, 1.0, 5.0, -5.0, 4.0], [-3.0, 5.0, -4.0, -4.0, 0.0], [7.0, 4.0, 2.0, 7.0, 6.0]], [[-15.0, 
+30.0, -30.0, 25.0, 15.0], [10.0, -5.0, -25.0, 25.0, -20.0], [15.0, -25.0, 20.0, 20.0, 0.0], [-35.0, -20.0, -10.0, -35.0, 
+-30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
+[[[15.0, -30.0, 30.0, -25.0, -15.0], [-10.0, 5.0, 25.0, -25.0, 20.0], [-15.0, 25.0, -20.0, -20.0, 0.0], [35.0, 20.0, 10.0, 
+35.0, 30.0]], [[-3.0, 6.0, -6.0, 5.0, 3.0], [2.0, -1.0, -5.0, 5.0, -4.0], [3.0, -5.0, 4.0, 4.0, 0.0], [-7.0, -4.0, -2.0, -7.0, 
+-6.0]], [[12.0, -24.0, 24.0, -20.0, -12.0], [-8.0, 4.0, 20.0, -20.0, 16.0], [-12.0, 20.0, -16.0, -16.0, 0.0], [28.0, 16.0, 8.0, 
+28.0, 24.0]], [[6.0, -12.0, 12.0, -10.0, -6.0], [-4.0, 2.0, 10.0, -10.0, 8.0], [-6.0, 10.0, -8.0, -8.0, 0.0], [14.0, 8.0, 4.0, 
+14.0, 12.0]], [[21.0, -42.0, 42.0, -35.0, -21.0], [-14.0, 7.0, 35.0, -35.0, 28.0], [-21.0, 35.0, -28.0, -28.0, 0.0], [49.0, 
+28.0, 14.0, 49.0, 42.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([[[3.0, 5.0], [0.0, 4.0]], [[0.0, -6.0], [-5.0, -1.0]], [[-3.0, 2.0], [-1.0, 4.0]], [[-5.0, 7.0], 
-[3.0, 1.0]], [[4.0, -4.0], [-2.0, 5.0]], [[-5.0, 2.0], [1.0, 3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([-1.0, -4.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-3.0, -12.0], [-5.0, -20.0]], [[0.0, 0.0], [-4.0, -16.0]]], [[[0.0, 0.0], [6.0, 24.0]], [[5.0, 
-20.0], [1.0, 4.0]]], [[[3.0, 12.0], [-2.0, -8.0]], [[1.0, 4.0], [-4.0, -16.0]]], [[[5.0, 20.0], [-7.0, -28.0]], [[-3.0, -12.0], 
-[-1.0, -4.0]]], [[[-4.0, -16.0], [4.0, 16.0]], [[2.0, 8.0], [-5.0, -20.0]]], [[[5.0, 20.0], [-2.0, -8.0]], [[-1.0, -4.0], 
-[-3.0, -12.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[[4.0, -6.0, -1.0], [-5.0, 0.0, 2.0], [-6.0, 0.0, 7.0], [3.0, 6.0, 3.0], [2.0, 6.0, 2.0]], [[-1.0, 
+-6.0, 6.0], [6.0, -4.0, -1.0], [3.0, -5.0, -3.0], [5.0, 3.0, -4.0], [-2.0, 0.0, 0.0]], [[0.0, 1.0, -6.0], [2.0, -1.0, 5.0], 
+[-3.0, -7.0, -4.0], [3.0, 6.0, 5.0], [0.0, 4.0, 3.0]], [[-5.0, -5.0, -2.0], [-5.0, 4.0, -4.0], [5.0, 0.0, -4.0], [6.0, 0.0, 
+7.0], [0.0, 0.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, -7.0, -2.0], [-7.0, 2.0, -3.0], [-4.0, 2.0, -7.0], [2.0, 5.0, -3.0], [2.0, 
+-6.0, -2.0]], [[-5.0, 6.0, -3.0], [0.0, -1.0, 0.0], [-2.0, 3.0, 4.0], [-6.0, -1.0, -1.0], [-7.0, 7.0, -1.0]], [[7.0, -5.0, 
+-3.0], [0.0, 3.0, 0.0], [-5.0, -5.0, 4.0], [6.0, 0.0, -4.0], [-3.0, 0.0, 2.0]], [[4.0, 2.0, 6.0], [1.0, -1.0, -3.0], [-7.0, 
+0.0, 5.0], [-3.0, -5.0, -4.0], [-2.0, -6.0, 0.0]]]))
+      arg1=numpy.array([[[-7.0, 1.0, 7.0, 7.0, -6.0], [-4.0, 3.0, 6.0, -5.0, -7.0], [-1.0, 7.0, -1.0, 6.0, -2.0], [6.0, -4.0, 
+-6.0, -5.0, -3.0]], [[2.0, 1.0, -2.0, 4.0, 4.0], [2.0, -1.0, 1.0, -1.0, -4.0], [3.0, -4.0, -7.0, 0.0, -3.0], [3.0, -2.0, -2.0, 
+-2.0, -6.0]], [[-4.0, -6.0, 2.0, -6.0, -7.0], [-2.0, -2.0, 4.0, -2.0, -3.0], [4.0, -4.0, 3.0, 2.0, -3.0], [-3.0, -1.0, -7.0, 
+-5.0, 4.0]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-36.0, 4.0, 38.0, 10.0, -41.0], [-26.0, 20.0, 14.0, -12.0, -1.0], [-26.0, 56.0, 35.0, 22.0, 
+13.0], [9.0, -3.0, -5.0, -3.0, 20.0]], [[27.0, -17.0, -31.0, -47.0, 16.0], [16.0, -19.0, -22.0, 21.0, 29.0], [13.0, -43.0, 
+11.0, -26.0, 4.0], [-36.0, 18.0, 16.0, 15.0, 23.0]], [[14.0, -48.0, -28.0, -84.0, -13.0], [10.0, -32.0, -8.0, 16.0, 21.0], 
+[34.0, -70.0, 27.0, -22.0, -9.0], [-57.0, 17.0, -13.0, -5.0, 46.0]], [[-21.0, -9.0, 15.0, 27.0, -15.0], [-6.0, -3.0, 36.0, 
+-27.0, -54.0], [27.0, -15.0, -36.0, 24.0, -33.0], [27.0, -27.0, -51.0, -42.0, -33.0]], [[-10.0, -4.0, 6.0, 26.0, -2.0], [0.0, 
+-4.0, 26.0, -20.0, -44.0], [24.0, -18.0, -38.0, 16.0, -28.0], [24.0, -22.0, -38.0, -32.0, -34.0]]], [[[-29.0, -43.0, 17.0, 
+-67.0, -60.0], [-20.0, -9.0, 12.0, -1.0, 13.0], [7.0, -7.0, 61.0, 6.0, 2.0], [-42.0, 10.0, -24.0, -13.0, 63.0]], [[-46.0, 8.0, 
+48.0, 32.0, -45.0], [-30.0, 24.0, 28.0, -24.0, -23.0], [-22.0, 62.0, 19.0, 34.0, 3.0], [27.0, -15.0, -21.0, -17.0, 2.0]], 
+[[-19.0, 16.0, 25.0, 19.0, -17.0], [-16.0, 20.0, 1.0, -4.0, 8.0], [-30.0, 53.0, 23.0, 12.0, 18.0], [12.0, 1.0, 13.0, 10.0, 
+9.0]], [[-13.0, 32.0, 21.0, 71.0, 10.0], [-6.0, 20.0, 17.0, -20.0, -35.0], [-12.0, 39.0, -38.0, 22.0, -7.0], [51.0, -22.0, 
+-8.0, -11.0, -49.0]], [[14.0, -2.0, -14.0, -14.0, 12.0], [8.0, -6.0, -12.0, 10.0, 14.0], [2.0, -14.0, 2.0, -12.0, 4.0], [-12.0, 
+8.0, 12.0, 10.0, 6.0]]], [[[26.0, 37.0, -14.0, 40.0, 46.0], [14.0, 11.0, -23.0, 11.0, 14.0], [-21.0, 20.0, -25.0, -12.0, 15.0], 
+[21.0, 4.0, 40.0, 28.0, -30.0]], [[-36.0, -29.0, 26.0, -20.0, -51.0], [-20.0, -3.0, 31.0, -19.0, -25.0], [15.0, -2.0, 20.0, 
+22.0, -16.0], [-6.0, -11.0, -45.0, -33.0, 20.0]], [[23.0, 14.0, -15.0, -25.0, 18.0], [6.0, 6.0, -41.0, 30.0, 61.0], [-34.0, 
+23.0, 40.0, -26.0, 39.0], [-27.0, 30.0, 60.0, 49.0, 35.0]], [[-29.0, -21.0, 19.0, 15.0, -29.0], [-10.0, -7.0, 44.0, -31.0, 
+-60.0], [35.0, -23.0, -30.0, 28.0, -39.0], [21.0, -29.0, -65.0, -52.0, -25.0]], [[-4.0, -14.0, -2.0, -2.0, -5.0], [2.0, -10.0, 
+16.0, -10.0, -25.0], [24.0, -28.0, -19.0, 6.0, -21.0], [3.0, -11.0, -29.0, -23.0, -12.0]]], [[[33.0, 2.0, -29.0, -43.0, 24.0], 
+[14.0, -6.0, -43.0, 34.0, 61.0], [-18.0, -7.0, 34.0, -34.0, 31.0], [-39.0, 32.0, 54.0, 45.0, 37.0]], [[59.0, 23.0, -51.0, 5.0, 
+74.0], [36.0, -11.0, -42.0, 29.0, 31.0], [1.0, -35.0, -35.0, -38.0, 10.0], [-6.0, 16.0, 50.0, 37.0, -25.0]], [[-19.0, 29.0, 
+27.0, 59.0, -2.0], [-12.0, 23.0, 14.0, -17.0, -23.0], [-21.0, 51.0, -17.0, 22.0, 2.0], [42.0, -16.0, -2.0, -5.0, -31.0]], 
+[[-70.0, -36.0, 56.0, 0.0, -85.0], [-38.0, 4.0, 64.0, -44.0, -63.0], [22.0, 14.0, 15.0, 50.0, -33.0], [15.0, -31.0, -85.0, 
+-65.0, 10.0]], [[-8.0, -12.0, 4.0, -12.0, -14.0], [-4.0, -4.0, 8.0, -4.0, -6.0], [8.0, -8.0, 6.0, 4.0, -6.0], [-6.0, -2.0, 
+-14.0, -10.0, 8.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[8.0, 3.0, -4.0, -30.0, -2.0], [-2.0, 5.0, -27.0, 21.0, 48.0], [-27.0, 22.0, 45.0, 
+-16.0, 31.0], [-27.0, 24.0, 40.0, 34.0, 40.0]], [[65.0, 13.0, -59.0, -23.0, 71.0], [38.0, -17.0, -52.0, 39.0, 50.0], [1.0, 
+-45.0, -16.0, -48.0, 17.0], [-27.0, 27.0, 59.0, 46.0, -3.0]], [[60.0, 40.0, -46.0, 22.0, 81.0], [34.0, 0.0, -50.0, 32.0, 41.0], 
+[-18.0, -8.0, -31.0, -38.0, 23.0], [3.0, 19.0, 69.0, 51.0, -28.0]], [[8.0, 25.0, -2.0, 52.0, 29.0], [8.0, 7.0, 5.0, -9.0, 
+-25.0], [1.0, 6.0, -46.0, 6.0, -10.0], [36.0, -15.0, -1.0, -5.0, -48.0]], [[-18.0, 8.0, 22.0, 2.0, -22.0], [-16.0, 16.0, -2.0, 
+0.0, 16.0], [-28.0, 46.0, 34.0, 8.0, 20.0], [0.0, 6.0, 14.0, 12.0, 22.0]]], [[[59.0, 19.0, -53.0, 7.0, 75.0], [38.0, -15.0, 
+-36.0, 25.0, 20.0], [11.0, -47.0, -46.0, -36.0, 1.0], [-3.0, 11.0, 39.0, 28.0, -33.0]], [[-2.0, -1.0, 2.0, -4.0, -4.0], [-2.0, 
+1.0, -1.0, 1.0, 4.0], [-3.0, 4.0, 7.0, 0.0, 3.0], [-3.0, 2.0, 2.0, 2.0, 6.0]], [[4.0, -23.0, -12.0, -26.0, -4.0], [6.0, -17.0, 
+7.0, -1.0, -10.0], [27.0, -42.0, -7.0, -4.0, -17.0], [-15.0, -2.0, -22.0, -16.0, 4.0]], [[44.0, -1.0, -42.0, -40.0, 39.0], 
+[24.0, -15.0, -41.0, 33.0, 49.0], [-1.0, -34.0, 10.0, -38.0, 18.0], [-36.0, 27.0, 45.0, 37.0, 20.0]], [[67.0, 6.0, -65.0, 
+-15.0, 77.0], [44.0, -26.0, -39.0, 30.0, 24.0], [24.0, -73.0, -45.0, -44.0, -4.0], [-18.0, 15.0, 35.0, 26.0, -25.0]]], 
+[[[-47.0, 20.0, 53.0, 47.0, -41.0], [-32.0, 32.0, 25.0, -24.0, -20.0], [-34.0, 81.0, 19.0, 36.0, 10.0], [36.0, -15.0, -11.0, 
+-10.0, -3.0]], [[6.0, 3.0, -6.0, 12.0, 12.0], [6.0, -3.0, 3.0, -3.0, -12.0], [9.0, -12.0, -21.0, 0.0, -9.0], [9.0, -6.0, -6.0, 
+-6.0, -18.0]], [[9.0, -34.0, -17.0, -79.0, -18.0], [2.0, -18.0, -19.0, 22.0, 43.0], [6.0, -31.0, 52.0, -22.0, 13.0], [-57.0, 
+26.0, 12.0, 15.0, 61.0]], [[-26.0, 30.0, 34.0, 66.0, -8.0], [-16.0, 26.0, 20.0, -22.0, -30.0], [-22.0, 58.0, -18.0, 28.0, 0.0], 
+[48.0, -20.0, -8.0, -10.0, -34.0]], [[13.0, -15.0, -17.0, -33.0, 4.0], [8.0, -13.0, -10.0, 11.0, 15.0], [11.0, -29.0, 9.0, 
+-14.0, 0.0], [-24.0, 10.0, 4.0, 5.0, 17.0]]], [[[-48.0, -30.0, 36.0, 0.0, -58.0], [-24.0, -2.0, 50.0, -34.0, -54.0], [26.0, 
+-4.0, 0.0, 36.0, -32.0], [12.0, -26.0, -70.0, -54.0, 0.0]], [[3.0, 18.0, 3.0, 21.0, 11.0], [0.0, 10.0, -7.0, 2.0, 6.0], [-16.0, 
+23.0, -3.0, 0.0, 10.0], [12.0, 1.0, 17.0, 12.0, -9.0]], [[29.0, -37.0, -39.0, -79.0, 7.0], [18.0, -31.0, -22.0, 25.0, 34.0], 
+[27.0, -69.0, 22.0, -32.0, -1.0], [-57.0, 23.0, 7.0, 10.0, 41.0]], [[27.0, 16.0, -19.0, -17.0, 26.0], [10.0, 4.0, -39.0, 28.0, 
+53.0], [-28.0, 15.0, 26.0, -26.0, 33.0], [-21.0, 26.0, 56.0, 45.0, 23.0]], [[2.0, -8.0, -2.0, -38.0, -12.0], [-4.0, 0.0, -18.0, 
+16.0, 38.0], [-16.0, 10.0, 44.0, -12.0, 22.0], [-30.0, 20.0, 24.0, 22.0, 42.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[-5.0, 1.0], [3.0, -1.0]], [[2.0, -3.0], [6.0, 7.0]], [[0.0, -1.0], [-2.0, -3.0]], [[2.0, -2.0], 
-[-5.0, -3.0]], [[7.0, 4.0], [-1.0, -2.0]], [[-3.0, -5.0], [4.0, -7.0]]], [[[1.0, -3.0], [1.0, 2.0]], [[-5.0, -3.0], [-2.0, 
--1.0]], [[0.0, -4.0], [-7.0, 3.0]], [[-4.0, -7.0], [-3.0, -5.0]], [[-7.0, 7.0], [0.0, 2.0]], [[-5.0, 4.0], [7.0, -7.0]]], 
-[[[0.0, 1.0], [4.0, -2.0]], [[6.0, 6.0], [-4.0, -6.0]], [[-6.0, -6.0], [-3.0, 3.0]], [[-7.0, -4.0], [-3.0, 0.0]], [[4.0, -2.0], 
-[-5.0, 3.0]], [[-4.0, 4.0], [-3.0, 4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[6.0, 0.0], [1.0, 0.0], [2.0, -6.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-29.0, 0.0], [5.0, -6.0]], [[27.0, -24.0], [-8.0, 12.0]]], [[[19.0, -36.0], [-9.0, -36.0]], 
-[[26.0, 24.0], [29.0, 36.0]]], [[[-12.0, 36.0], [-22.0, 36.0]], [[-25.0, 18.0], [-9.0, -18.0]]], [[[-6.0, 42.0], [-27.0, 
-24.0]], [[-39.0, 18.0], [-23.0, 0.0]]], [[[43.0, -24.0], [27.0, 12.0]], [[-16.0, 30.0], [-4.0, -18.0]]], [[[-31.0, 24.0], 
-[-18.0, -24.0]], [[25.0, 18.0], [-41.0, -24.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[6.0, -7.0, 2.0], [0.0, 0.0, -7.0]], [[-7.0, -6.0, 0.0], [5.0, 6.0, 7.0]], [[6.0, 0.0, 3.0], 
+[4.0, -2.0, -5.0]], [[-5.0, -1.0, -1.0], [-2.0, 2.0, -5.0]], [[1.0, -6.0, -4.0], [1.0, -3.0, 6.0]]], [[[5.0, 0.0, 1.0], [6.0, 
+0.0, 7.0]], [[-1.0, -5.0, 6.0], [2.0, -3.0, -3.0]], [[5.0, -6.0, 0.0], [-6.0, -4.0, -6.0]], [[6.0, 3.0, -1.0], [5.0, -5.0, 
+1.0]], [[-3.0, -3.0, -7.0], [-5.0, 7.0, 6.0]]], [[[0.0, -2.0, 3.0], [5.0, 6.0, 6.0]], [[7.0, -1.0, 7.0], [-1.0, 4.0, 5.0]], 
+[[0.0, -4.0, -5.0], [6.0, 5.0, -6.0]], [[-1.0, 1.0, 6.0], [-2.0, -3.0, 7.0]], [[-5.0, 6.0, 7.0], [-6.0, -7.0, 0.0]]], [[[-5.0, 
+2.0, 1.0], [6.0, -6.0, 1.0]], [[-6.0, 4.0, 2.0], [4.0, -3.0, 4.0]], [[-3.0, 5.0, -7.0], [-3.0, -3.0, -2.0]], [[-6.0, -7.0, 
+0.0], [-6.0, -4.0, -6.0]], [[6.0, -6.0, 0.0], [4.0, -4.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, 5.0, 0.0], [-6.0, 0.0, 3.0]], [[4.0, -1.0, 4.0], [-1.0, -6.0, -2.0]], [[-6.0, 
+-1.0, -4.0], [-3.0, -4.0, -1.0]], [[-6.0, 0.0, 6.0], [5.0, -3.0, 3.0]], [[0.0, 0.0, -3.0], [0.0, -3.0, 4.0]]], [[[6.0, -5.0, 
+-3.0], [3.0, 0.0, -6.0]], [[7.0, 7.0, -3.0], [1.0, 7.0, -5.0]], [[-6.0, -1.0, -2.0], [0.0, 0.0, -7.0]], [[-2.0, 2.0, 7.0], 
+[3.0, -4.0, 0.0]], [[-3.0, 0.0, -4.0], [0.0, 1.0, -6.0]]], [[[3.0, -1.0, 3.0], [2.0, -4.0, 4.0]], [[4.0, 0.0, -1.0], [-1.0, 
+4.0, 0.0]], [[-7.0, -4.0, 2.0], [2.0, -7.0, 7.0]], [[-3.0, -5.0, -3.0], [-3.0, 6.0, -3.0]], [[7.0, -5.0, 2.0], [0.0, 7.0, 
+-3.0]]], [[[4.0, 4.0, 5.0], [-7.0, 0.0, 1.0]], [[-2.0, -5.0, -2.0], [7.0, -7.0, -4.0]], [[6.0, 4.0, 6.0], [0.0, 5.0, -7.0]], 
+[[-7.0, 7.0, 7.0], [-7.0, 1.0, 0.0]], [[7.0, 3.0, -6.0], [0.0, 7.0, 5.0]]]]))
+      arg1=numpy.array([[[[2.0, -3.0, 1.0, 0.0, 7.0], [-4.0, 7.0, 0.0, -1.0, 4.0], [-5.0, -6.0, 2.0, 6.0, 0.0], [0.0, 2.0, 
+-7.0, -3.0, 0.0]], [[0.0, -6.0, 3.0, 2.0, 7.0], [0.0, -6.0, 0.0, -1.0, -1.0], [2.0, 5.0, -5.0, -7.0, 0.0], [-3.0, 5.0, -1.0, 
+-3.0, -2.0]], [[-7.0, -5.0, 0.0, -3.0, -1.0], [-5.0, 0.0, -3.0, 6.0, -4.0], [-4.0, 3.0, 3.0, 0.0, 4.0], [4.0, 4.0, 1.0, 6.0, 
+-6.0]]], [[[7.0, -6.0, -6.0, 2.0, 0.0], [-1.0, -7.0, -4.0, 0.0, -7.0], [-2.0, 0.0, 3.0, -4.0, 3.0], [7.0, -5.0, 6.0, 1.0, 
+0.0]], [[1.0, 6.0, 5.0, -1.0, -1.0], [2.0, -2.0, 0.0, -4.0, 0.0], [-1.0, 2.0, -7.0, -4.0, -4.0], [7.0, 0.0, 2.0, -1.0, -4.0]], 
+[[0.0, -7.0, -6.0, -4.0, -4.0], [-2.0, 0.0, 2.0, 7.0, 2.0], [-2.0, 6.0, 4.0, -1.0, -6.0], [-3.0, -2.0, 0.0, 6.0, -4.0]]]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-2.0, 63.0, 27.0, 8.0, 19.0], [-20.0, 84.0, -20.0, -36.0, 9.0], [-38.0, -107.0, 25.0, 92.0, 
+50.0], [50.0, -1.0, -33.0, -27.0, 30.0]], [[27.0, 14.0, -67.0, -36.0, -125.0], [21.0, -60.0, -6.0, 38.0, -43.0], [-7.0, 66.0, 
+17.0, -51.0, -51.0], [74.0, -83.0, 97.0, 80.0, -40.0]], [[17.0, -34.0, 2.0, 21.0, 61.0], [-37.0, 18.0, -35.0, -15.0, -26.0], 
+[-38.0, -61.0, 27.0, 33.0, 62.0], [41.0, 14.0, -19.0, -24.0, 10.0]], [[-15.0, 85.0, 44.0, 15.0, -23.0], [41.0, -19.0, 1.0, 
+-43.0, -11.0], [39.0, -4.0, -48.0, -18.0, 12.0], [14.0, 1.0, 27.0, -22.0, 20.0]], [[34.0, -13.0, -74.0, -19.0, -52.0], [-3.0, 
+42.0, 20.0, 35.0, 31.0], [-12.0, -18.0, 68.0, 50.0, -37.0], [-30.0, -61.0, -5.0, 31.0, 24.0]]], [[[45.0, -105.0, -73.0, -19.0, 
+6.0], [-45.0, -7.0, -13.0, 50.0, -12.0], [-55.0, 15.0, 59.0, -1.0, -20.0], [25.0, -30.0, 2.0, 39.0, -34.0]], [[-33.0, -6.0, 
+-25.0, -9.0, -33.0], [-28.0, 15.0, -32.0, 33.0, -43.0], [-24.0, -25.0, 56.0, 36.0, 60.0], [41.0, -7.0, 24.0, 41.0, -2.0]], 
+[[-36.0, 75.0, 39.0, 4.0, 21.0], [-10.0, 121.0, 12.0, -25.0, 56.0], [-9.0, -104.0, 26.0, 118.0, 34.0], [-34.0, 22.0, -73.0, 
+-35.0, 52.0]], [[49.0, -98.0, -46.0, 20.0, 65.0], [-36.0, -1.0, -15.0, 12.0, -8.0], [-27.0, -28.0, 48.0, 14.0, 25.0], [-16.0, 
+-4.0, -26.0, -17.0, 16.0]], [[15.0, 92.0, 17.0, -26.0, -66.0], [54.0, 18.0, 53.0, -22.0, 66.0], [28.0, 32.0, -52.0, -11.0, 
+-107.0], [-23.0, -36.0, 1.0, 0.0, -4.0]]], [[[20.0, -39.0, -42.0, -33.0, -47.0], [-20.0, -35.0, -17.0, 38.0, -33.0], [-44.0, 
+47.0, 16.0, -36.0, -33.0], [77.0, -35.0, 47.0, 59.0, -62.0]], [[-38.0, -55.0, 0.0, -49.0, 11.0], [-64.0, 54.0, -7.0, 55.0, 
+18.0], [-77.0, 12.0, 29.0, 32.0, -21.0], [37.0, 32.0, -39.0, 49.0, -76.0]], [[82.0, 85.0, 13.0, 38.0, -4.0], [41.0, -28.0, 
+-21.0, -88.0, -30.0], [7.0, -61.0, -36.0, -10.0, 14.0], [87.0, -58.0, 45.0, -53.0, 42.0]], [[-61.0, -88.0, -43.0, -45.0, 
+-31.0], [-44.0, 7.0, 4.0, 97.0, -1.0], [-24.0, 65.0, 54.0, 0.0, -12.0], [-35.0, 23.0, -6.0, 79.0, -54.0]], [[-108.0, -62.0, 
+14.0, -14.0, 7.0], [-23.0, -15.0, 3.0, 69.0, -12.0], [28.0, 67.0, 12.0, -20.0, 38.0], [-81.0, 78.0, -14.0, 40.0, -26.0]]], 
+[[[19.0, -81.0, -71.0, 15.0, -20.0], [-5.0, -77.0, -25.0, 40.0, -66.0], [17.0, 37.0, 47.0, -45.0, 40.0], [-5.0, -28.0, 58.0, 
+33.0, 10.0]], [[-1.0, -86.0, -57.0, -3.0, -29.0], [-4.0, -88.0, -14.0, 54.0, -56.0], [17.0, 80.0, 23.0, -72.0, 8.0], [-9.0, 
+-12.0, 58.0, 49.0, -24.0]], [[19.0, 28.0, 27.0, 36.0, 32.0], [48.0, -24.0, 29.0, -46.0, 28.0], [66.0, 4.0, -48.0, -27.0, 
+-13.0], [-79.0, 10.0, -15.0, -60.0, 52.0]], [[-58.0, 114.0, 25.0, 2.0, -63.0], [34.0, 50.0, 12.0, -13.0, 13.0], [44.0, -43.0, 
+9.0, 59.0, 34.0], [-31.0, -5.0, 5.0, 1.0, 54.0]], [[36.0, -23.0, -50.0, 4.0, 8.0], [-34.0, 58.0, -18.0, 9.0, 0.0], [-44.0, 
+-80.0, 78.0, 79.0, 34.0], [21.0, -36.0, -20.0, 2.0, 32.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-46.0, -9.0, 31.0, -14.0, 9.0], [8.0, -2.0, 30.0, 18.0, 35.0], [26.0, 55.0, -35.0, 
+-26.0, -36.0], [-66.0, 45.0, -27.0, 3.0, -22.0]], [[-33.0, -42.0, -11.0, -2.0, 31.0], [-43.0, 53.0, -12.0, 31.0, 4.0], [-26.0, 
+-41.0, 56.0, 61.0, 49.0], [-24.0, 28.0, -41.0, 8.0, 10.0]], [[-9.0, 45.0, -5.0, 12.0, -37.0], [41.0, -7.0, 22.0, -8.0, 12.0], 
+[56.0, 5.0, -4.0, 0.0, -3.0], [-59.0, -16.0, 13.0, -8.0, 46.0]], [[-22.0, -81.0, -69.0, -17.0, -57.0], [-23.0, -71.0, -32.0, 
+75.0, -77.0], [-7.0, 66.0, 54.0, -47.0, 33.0], [29.0, -19.0, 72.0, 80.0, -36.0]], [[18.0, -31.0, -39.0, -4.0, -10.0], [1.0, 
+6.0, 17.0, 22.0, 20.0], [7.0, 9.0, 28.0, 8.0, -24.0], [-45.0, -20.0, -9.0, 9.0, 14.0]]], [[[54.0, 51.0, 9.0, 29.0, 34.0], [0.0, 
+51.0, -15.0, -61.0, 8.0], [-22.0, -106.0, 13.0, 65.0, 33.0], [42.0, -28.0, -22.0, -54.0, 52.0]], [[49.0, 23.0, 87.0, 38.0, 
+114.0], [10.0, -14.0, -5.0, -95.0, 16.0], [-8.0, -32.0, -96.0, -34.0, -7.0], [38.0, 42.0, -39.0, -96.0, -4.0]], [[2.0, 83.0, 
+33.0, 32.0, -19.0], [48.0, -36.0, -8.0, -54.0, -29.0], [50.0, -17.0, -41.0, -22.0, 34.0], [16.0, -11.0, 41.0, -33.0, 42.0]], 
+[[-36.0, -83.0, -34.0, -7.0, -3.0], [-38.0, -39.0, -33.0, 58.0, -59.0], [-16.0, 35.0, 44.0, -22.0, 53.0], [15.0, 19.0, 29.0, 
+49.0, -30.0]], [[23.0, 77.0, 38.0, 35.0, 6.0], [46.0, -23.0, 0.0, -67.0, -8.0], [42.0, -28.0, -49.0, -16.0, 16.0], [9.0, -10.0, 
+19.0, -52.0, 44.0]]], [[[-5.0, -82.0, -56.0, -19.0, -1.0], [-45.0, 21.0, -9.0, 60.0, -5.0], [-37.0, 2.0, 70.0, 29.0, 10.0], 
+[-11.0, -5.0, -13.0, 42.0, -16.0]], [[12.0, 23.0, 30.0, -3.0, 25.0], [-2.0, 27.0, 7.0, -26.0, 27.0], [-18.0, -19.0, -26.0, 
+12.0, -23.0], [17.0, 9.0, -27.0, -23.0, -10.0]], [[-21.0, -68.0, -108.0, -31.0, -100.0], [-12.0, -25.0, 0.0, 100.0, -32.0], 
+[8.0, 56.0, 95.0, -1.0, 0.0], [-36.0, -50.0, 53.0, 96.0, -4.0]], [[0.0, 129.0, 48.0, -1.0, -47.0], [48.0, 18.0, 15.0, -55.0, 
+20.0], [23.0, -22.0, -53.0, 8.0, -27.0], [33.0, -22.0, 17.0, -21.0, 16.0]], [[7.0, 62.0, 45.0, -11.0, 17.0], [-18.0, 65.0, 
+-12.0, -39.0, 19.0], [-54.0, -65.0, -16.0, 52.0, -2.0], [81.0, 3.0, -28.0, -19.0, -18.0]]], [[[-76.0, -26.0, 52.0, -25.0, 
+47.0], [-36.0, 53.0, 15.0, 29.0, 43.0], [-20.0, 17.0, -14.0, 23.0, -7.0], [-44.0, 81.0, -69.0, 5.0, -42.0]], [[52.0, -10.0, 
+-70.0, 33.0, -24.0], [5.0, -19.0, -30.0, -5.0, -52.0], [9.0, -57.0, 69.0, 27.0, 65.0], [19.0, -64.0, 45.0, -1.0, 66.0]], 
+[[-25.0, 7.0, 85.0, 13.0, 87.0], [-30.0, 8.0, -32.0, -43.0, -18.0], [-37.0, -30.0, -53.0, -5.0, 46.0], [68.0, 70.0, -30.0, 
+-41.0, -36.0]], [[-111.0, -8.0, 61.0, -22.0, -8.0], [2.0, -44.0, 7.0, 38.0, -14.0], [34.0, 100.0, -56.0, -67.0, 3.0], [-35.0, 
+84.0, 9.0, 34.0, -60.0]], [[63.0, -2.0, 21.0, -3.0, 49.0], [6.0, 17.0, 28.0, -39.0, 59.0], [-22.0, -1.0, -48.0, -12.0, -82.0], 
+[1.0, -5.0, -44.0, -43.0, -18.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[-3.0, 2.0], [-5.0, -1.0]], [[3.0, 3.0], [5.0, 0.0]], [[3.0, -5.0], [-1.0, 6.0]], [[0.0, 0.0], 
-[2.0, 7.0]], [[2.0, 1.0], [7.0, 6.0]], [[-6.0, -7.0], [-7.0, 4.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[9.0, -6.0], [15.0, 3.0]], [[-9.0, -9.0], [-15.0, -0.0]], [[-9.0, 15.0], [3.0, -18.0]], [[-0.0, 
--0.0], [-6.0, -21.0]], [[-6.0, -3.0], [-21.0, -18.0]], [[18.0, 21.0], [21.0, -12.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -4.0], 
-[10.0, 2.0]], [[-6.0, -6.0], [-10.0, -0.0]], [[-6.0, 10.0], [2.0, -12.0]], [[-0.0, -0.0], [-4.0, -14.0]], [[-4.0, -2.0], 
-[-14.0, -12.0]], [[12.0, 14.0], [14.0, -8.0]]])
+   def test_generalTensorProduct_taggedData_rank2_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[6.0, -7.0, 5.0, -1.0, 7.0], [-4.0, 1.0, -7.0, -7.0, 5.0], [7.0, -3.0, 0.0, -4.0, 7.0], [7.0, 
+-2.0, -7.0, 5.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, 1.0, -1.0, -6.0, -2.0], [-6.0, 7.0, -4.0, 1.0, 7.0], [0.0, 6.0, 5.0, -6.0, 
+7.0], [7.0, 0.0, 0.0, 0.0, -3.0]]))
+      arg1=Data(-4.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-24.0, 28.0, -20.0, 4.0, -28.0], [16.0, -4.0, 28.0, 28.0, -20.0], [-28.0, 12.0, -0.0, 16.0, 
+-28.0], [-28.0, 8.0, 28.0, -20.0, 8.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[12.0, -4.0, 4.0, 24.0, 8.0], [24.0, -28.0, 16.0, -4.0, -28.0], [-0.0, -24.0, -20.0, 
+24.0, -28.0], [-28.0, -0.0, -0.0, -0.0, 12.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[0.0, 1.0], [-5.0, -5.0]], [[-7.0, 5.0], [-3.0, 7.0]], [[0.0, -6.0], [6.0, 2.0]], [[-6.0, 3.0], 
-[-7.0, 4.0]], [[-3.0, 3.0], [-5.0, 6.0]], [[-5.0, 2.0], [2.0, -5.0]]], [[[0.0, 1.0], [0.0, -1.0]], [[-2.0, 2.0], [-7.0, 5.0]], 
-[[-2.0, 4.0], [0.0, 2.0]], [[-4.0, 0.0], [1.0, 4.0]], [[3.0, -7.0], [4.0, 3.0]], [[7.0, -4.0], [-3.0, -2.0]]], [[[0.0, -2.0], 
-[-2.0, 3.0]], [[0.0, 0.0], [1.0, -2.0]], [[6.0, 1.0], [-2.0, 7.0]], [[0.0, 0.0], [3.0, -5.0]], [[-3.0, 1.0], [-2.0, -2.0]], 
-[[4.0, 2.0], [-1.0, 1.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, 1.0, -3.0])+(1.-msk_arg1)*numpy.array([-3.0, -5.0, -4.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 1.0], [36.0, 20.0]], [[40.0, -28.0], [8.0, -31.0]], [[-20.0, 37.0], [-30.0, -31.0]], 
-[[32.0, -18.0], [34.0, -5.0]], [[30.0, -28.0], [40.0, -27.0]], [[25.0, -22.0], [-12.0, 
-25.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [23.0, 8.0]], [[31.0, -25.0], [40.0, -38.0]], [[-14.0, -6.0], [-10.0, -44.0]], 
-[[38.0, -9.0], [4.0, -12.0]], [[6.0, 22.0], [3.0, -25.0]], [[-36.0, 6.0], [13.0, 21.0]]])
+   def test_generalTensorProduct_taggedData_rank3_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-5.0, 5.0, 1.0], [1.0, -2.0, 4.0], [0.0, -2.0, -5.0], [0.0, -4.0, 5.0], [0.0, 3.0, 6.0]], [[2.0, 
+7.0, -1.0], [1.0, 3.0, -6.0], [1.0, 4.0, 0.0], [5.0, 3.0, 0.0], [-6.0, -7.0, -6.0]], [[1.0, 4.0, -7.0], [0.0, -5.0, -7.0], 
+[5.0, 7.0, 5.0], [1.0, -5.0, -5.0], [-4.0, -6.0, -7.0]], [[-5.0, -3.0, 0.0], [3.0, -6.0, -3.0], [-4.0, 0.0, 3.0], [0.0, 0.0, 
+-1.0], [-7.0, -4.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, 4.0, -6.0], [-7.0, 0.0, 1.0], [-3.0, -2.0, 3.0], [-7.0, -4.0, -4.0], [5.0, 
+6.0, 4.0]], [[-4.0, -2.0, 5.0], [-7.0, 3.0, 1.0], [-6.0, 2.0, -3.0], [-1.0, 0.0, -2.0], [7.0, 2.0, -4.0]], [[-3.0, -2.0, 5.0], 
+[1.0, -7.0, -7.0], [-2.0, 2.0, 7.0], [7.0, 5.0, 1.0], [1.0, -4.0, 5.0]], [[-6.0, 4.0, 6.0], [3.0, 0.0, 5.0], [-2.0, -1.0, 
+-7.0], [4.0, -6.0, 0.0], [0.0, 5.0, -6.0]]]))
+      arg1=Data(numpy.array([4.0, -6.0, 0.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-50.0, 16.0, 12.0, 24.0, -18.0], [-34.0, -14.0, -20.0, 2.0, 18.0], [-20.0, 30.0, -22.0, 34.0, 
+20.0], [-2.0, 48.0, -16.0, 0.0, -4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-36.0, -28.0, 0.0, -4.0, -16.0], [-4.0, -46.0, -36.0, -4.0, 16.0], [0.0, 46.0, -20.0, 
+-2.0, 28.0], [-48.0, 12.0, -2.0, 52.0, -30.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-5.0, 6.0, -5.0], [5.0, 6.0, 0.0]], [[-2.0, 4.0, 2.0], [-5.0, -1.0, 4.0]], [[7.0, -3.0, 1.0], 
+[7.0, -2.0, 7.0]], [[0.0, -3.0, 5.0], [-6.0, -7.0, -3.0]], [[-3.0, -4.0, -6.0], [0.0, 0.0, 6.0]]], [[[1.0, 1.0, -2.0], [0.0, 
+7.0, -1.0]], [[0.0, -6.0, -3.0], [-2.0, -2.0, 4.0]], [[3.0, 0.0, 7.0], [-6.0, 6.0, 0.0]], [[5.0, 0.0, -3.0], [6.0, -4.0, 6.0]], 
+[[-3.0, -4.0, 3.0], [-1.0, -1.0, -1.0]]], [[[-7.0, 7.0, -7.0], [6.0, 4.0, -7.0]], [[6.0, -1.0, -2.0], [2.0, 1.0, 7.0]], [[-7.0, 
+-4.0, 2.0], [5.0, 3.0, 2.0]], [[7.0, -7.0, -5.0], [-5.0, -2.0, 1.0]], [[4.0, -2.0, 4.0], [5.0, 4.0, -2.0]]], [[[3.0, 2.0, 
+-1.0], [2.0, 7.0, -7.0]], [[3.0, -2.0, -4.0], [6.0, -2.0, 0.0]], [[4.0, -6.0, 4.0], [4.0, 6.0, 2.0]], [[5.0, -7.0, 4.0], [0.0, 
+-3.0, 5.0]], [[5.0, 4.0, -6.0], [-2.0, -4.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, -3.0, 0.0], [6.0, 3.0, -1.0]], [[5.0, -5.0, 1.0], [5.0, -2.0, -1.0]], [[-6.0, 
+0.0, -2.0], [0.0, -1.0, 2.0]], [[-7.0, -1.0, -6.0], [-7.0, 0.0, -7.0]], [[-7.0, 0.0, -4.0], [-2.0, 6.0, -6.0]]], [[[-4.0, 3.0, 
+3.0], [6.0, 2.0, 4.0]], [[4.0, 1.0, 4.0], [-3.0, 5.0, 5.0]], [[5.0, 1.0, -5.0], [4.0, 2.0, 0.0]], [[-5.0, -1.0, -7.0], [3.0, 
+0.0, 0.0]], [[4.0, -2.0, 2.0], [4.0, 6.0, -6.0]]], [[[0.0, 7.0, 4.0], [-3.0, 0.0, -3.0]], [[-3.0, 4.0, 0.0], [7.0, -7.0, 1.0]], 
+[[-1.0, 2.0, 5.0], [0.0, -6.0, -5.0]], [[0.0, -5.0, -7.0], [5.0, -2.0, -4.0]], [[-2.0, -7.0, -1.0], [-7.0, 1.0, -2.0]]], 
+[[[-3.0, 3.0, 3.0], [-4.0, 0.0, 5.0]], [[4.0, 4.0, -6.0], [-4.0, 3.0, -2.0]], [[1.0, -5.0, 5.0], [6.0, 7.0, -7.0]], [[-6.0, 
+0.0, 7.0], [0.0, 6.0, -2.0]], [[-5.0, 4.0, -7.0], [-4.0, 1.0, -3.0]]]]))
+      arg1=Data(numpy.array([[6.0, -3.0, 0.0], [0.0, 2.0, 0.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-36.0, -26.0, 47.0, -5.0, -6.0], [17.0, 14.0, 30.0, 22.0, -8.0], [-55.0, 41.0, -24.0, 59.0, 38.0], 
+[26.0, 20.0, 54.0, 45.0, 10.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[27.0, 41.0, -38.0, -39.0, -30.0], [-29.0, 31.0, 31.0, -27.0, 42.0], [-21.0, -44.0, 
+-24.0, 11.0, 11.0], [-27.0, 18.0, 35.0, -24.0, -40.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank3_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([[[2.0, -5.0], [-2.0, 4.0]], [[3.0, -7.0], [-4.0, -7.0]], [[-7.0, -5.0], [3.0, 3.0]], [[0.0, -6.0], 
-[4.0, 4.0]], [[-6.0, 3.0], [-1.0, -4.0]], [[5.0, -6.0], [3.0, 4.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([2.0, 4.0])+(1.-msk_arg1)*numpy.array([2.0, 6.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[4.0, 8.0], [-10.0, -20.0]], [[-4.0, -8.0], [8.0, 16.0]]], [[[6.0, 12.0], [-14.0, -28.0]], 
-[[-8.0, -16.0], [-14.0, -28.0]]], [[[-14.0, -28.0], [-10.0, -20.0]], [[6.0, 12.0], [6.0, 12.0]]], [[[0.0, 0.0], [-12.0, 
--24.0]], [[8.0, 16.0], [8.0, 16.0]]], [[[-12.0, -24.0], [6.0, 12.0]], [[-2.0, -4.0], [-8.0, -16.0]]], [[[10.0, 20.0], [-12.0, 
--24.0]], [[6.0, 12.0], [8.0, 16.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 12.0], [-10.0, -30.0]], [[-4.0, -12.0], [8.0, 24.0]]], 
-[[[6.0, 18.0], [-14.0, -42.0]], [[-8.0, -24.0], [-14.0, -42.0]]], [[[-14.0, -42.0], [-10.0, -30.0]], [[6.0, 18.0], [6.0, 
-18.0]]], [[[0.0, 0.0], [-12.0, -36.0]], [[8.0, 24.0], [8.0, 24.0]]], [[[-12.0, -36.0], [6.0, 18.0]], [[-2.0, -6.0], [-8.0, 
--24.0]]], [[[10.0, 30.0], [-12.0, -36.0]], [[6.0, 18.0], [8.0, 24.0]]]])
+   def test_generalTensorProduct_taggedData_rank2_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[6.0, 2.0, -6.0, -2.0, -7.0], [-2.0, 5.0, 4.0, 6.0, 0.0], [4.0, 1.0, -5.0, -6.0, -7.0], [6.0, 2.0, 
+-5.0, 6.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -1.0, -1.0, -1.0, -4.0], [5.0, 5.0, 0.0, 7.0, 1.0], [5.0, 1.0, 0.0, 2.0, 4.0], 
+[0.0, -6.0, 6.0, 0.0, 0.0]]))
+      arg1=Data(numpy.array([-7.0, 6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-42.0, 36.0], [-14.0, 12.0], [42.0, -36.0], [14.0, -12.0], [49.0, -42.0]], [[14.0, -12.0], 
+[-35.0, 30.0], [-28.0, 24.0], [-42.0, 36.0], [0.0, 0.0]], [[-28.0, 24.0], [-7.0, 6.0], [35.0, -30.0], [42.0, -36.0], [49.0, 
+-42.0]], [[-42.0, 36.0], [-14.0, 12.0], [35.0, -30.0], [-42.0, 36.0], [28.0, -24.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0], [7.0, -6.0], [7.0, -6.0], [7.0, -6.0], [28.0, -24.0]], [[-35.0, 30.0], 
+[-35.0, 30.0], [0.0, 0.0], [-49.0, 42.0], [-7.0, 6.0]], [[-35.0, 30.0], [-7.0, 6.0], [0.0, 0.0], [-14.0, 12.0], [-28.0, 24.0]], 
+[[0.0, 0.0], [42.0, -36.0], [-42.0, 36.0], [0.0, 0.0], [0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[-2.0, -1.0], [4.0, 3.0]], [[3.0, 6.0], [0.0, -7.0]], [[-4.0, -3.0], [-5.0, 5.0]], [[6.0, -4.0], 
-[0.0, -5.0]], [[-1.0, -6.0], [5.0, -7.0]], [[0.0, -3.0], [2.0, 7.0]]], [[[-2.0, 6.0], [1.0, -5.0]], [[-1.0, 3.0], [2.0, 0.0]], 
-[[-4.0, -3.0], [-3.0, -3.0]], [[4.0, 0.0], [7.0, -2.0]], [[4.0, 7.0], [7.0, -6.0]], [[1.0, -2.0], [1.0, -4.0]]], [[[-1.0, 
--4.0], [6.0, 1.0]], [[2.0, -5.0], [3.0, -1.0]], [[0.0, -2.0], [0.0, 0.0]], [[-2.0, 1.0], [3.0, 0.0]], [[0.0, 2.0], [-2.0, 
-2.0]], [[-1.0, 5.0], [-4.0, 1.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 1.0], [-1.0, 4.0], [-4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 4.0], [-1.0, 5.0], 
-[-4.0, 4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[6.0, -14.0], [10.0, 7.0]], [[-25.0, 32.0], [1.0, -13.0]]], [[[-7.0, 7.0], [17.0, -2.0]], 
-[[-14.0, 20.0], [4.0, -11.0]]], [[[4.0, -20.0], [11.0, -23.0]], [[3.0, -17.0], [3.0, -7.0]]], [[[4.0, 14.0], [-4.0, 0.0]], 
-[[-19.0, 40.0], [2.0, -13.0]]], [[[-4.0, 15.0], [-15.0, 30.0]], [[1.0, 25.0], [-2.0, -23.0]]], [[[3.0, 0.0], [-18.0, 9.0]], 
-[[15.0, -10.0], [0.0, -5.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -22.0], [7.0, 10.0]], [[-13.0, 45.0], [10.0, -9.0]]], [[[2.0, 
-15.0], [35.0, 19.0]], [[-14.0, 22.0], [-17.0, -32.0]]], [[[-8.0, -36.0], [2.0, -35.0]], [[-12.0, -35.0], [18.0, 5.0]]], 
-[[[22.0, 36.0], [-16.0, -12.0]], [[-19.0, 47.0], [-13.0, -30.0]]], [[[-7.0, 16.0], [-33.0, 19.0]], [[16.0, 47.0], [-23.0, 
--50.0]]], [[[3.0, 1.0], [-27.0, -2.0]], [[21.0, -3.0], [21.0, 12.0]]]])
+   def test_generalTensorProduct_taggedData_rank3_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -2.0, 4.0], [-1.0, -6.0, 7.0], [-1.0, 2.0, -7.0], [0.0, 1.0, -4.0], [7.0, 1.0, 6.0]], 
+[[0.0, -4.0, -4.0], [-3.0, 0.0, 2.0], [-6.0, -5.0, 1.0], [0.0, -3.0, 6.0], [5.0, -5.0, 5.0]], [[3.0, 0.0, -1.0], [1.0, 3.0, 
+4.0], [6.0, -3.0, -6.0], [-5.0, -3.0, -5.0], [0.0, -2.0, 5.0]], [[3.0, 6.0, -3.0], [-2.0, 4.0, 1.0], [-5.0, 6.0, 5.0], [2.0, 
+2.0, 3.0], [3.0, 6.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, -1.0, -4.0], [1.0, 1.0, -2.0], [0.0, 0.0, 2.0], [6.0, -6.0, -7.0], [5.0, 5.0, 
+0.0]], [[0.0, -3.0, -1.0], [5.0, -7.0, 7.0], [1.0, 0.0, 3.0], [-5.0, -3.0, -2.0], [1.0, 0.0, -4.0]], [[6.0, -4.0, 0.0], [0.0, 
+2.0, 0.0], [-1.0, 4.0, 2.0], [-1.0, 3.0, -4.0], [0.0, -6.0, -4.0]], [[0.0, 3.0, -2.0], [-1.0, -7.0, -2.0], [-5.0, 0.0, 4.0], 
+[1.0, 0.0, 5.0], [-7.0, 7.0, -2.0]]]))
+      arg1=Data(numpy.array([[-6.0, 7.0], [6.0, 1.0], [3.0, -5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[0.0, -22.0], [-9.0, -48.0], [-3.0, 30.0], [-6.0, 21.0], [-18.0, 20.0]], [[-36.0, 16.0], [24.0, 
+-31.0], [9.0, -52.0], [0.0, -33.0], [-45.0, 5.0]], [[-21.0, 26.0], [24.0, -10.0], [-72.0, 69.0], [-3.0, -13.0], [3.0, -27.0]], 
+[[9.0, 42.0], [39.0, -15.0], [81.0, -54.0], [9.0, 1.0], [18.0, 27.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-48.0, 54.0], [-6.0, 18.0], [6.0, -10.0], [-93.0, 71.0], [0.0, 40.0]], [[-21.0, 2.0], 
+[-51.0, -7.0], [3.0, -8.0], [6.0, -28.0], [-18.0, 27.0]], [[-60.0, 38.0], [12.0, 2.0], [36.0, -13.0], [12.0, 16.0], [-48.0, 
+14.0]], [[12.0, 13.0], [-42.0, -4.0], [42.0, -55.0], [9.0, -18.0], [78.0, -32.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[-3.0, 2.0, 5.0, -6.0], [5.0, -2.0, 7.0, -2.0], [4.0, -4.0, 4.0, 0.0]], [[4.0, -1.0, 2.0, -3.0], 
-[-6.0, 2.0, 0.0, 5.0], [-7.0, 1.0, 3.0, -1.0]]], [[[-1.0, 7.0, 0.0, 5.0], [1.0, 6.0, 3.0, 0.0], [5.0, 0.0, -5.0, -4.0]], [[7.0, 
--5.0, -3.0, 0.0], [3.0, -2.0, 0.0, 7.0], [-6.0, 2.0, -2.0, 1.0]]], [[[0.0, -2.0, 0.0, -5.0], [-2.0, 1.0, 4.0, -5.0], [0.0, 4.0, 
--5.0, 0.0]], [[0.0, 0.0, 6.0, 2.0], [-6.0, -5.0, 3.0, 2.0], [3.0, 6.0, 4.0, -4.0]]]]),self.functionspace)
-      arg1=-4.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[12.0, -8.0, -20.0, 24.0], [-20.0, 8.0, -28.0, 8.0], [-16.0, 16.0, -16.0, -0.0]], [[-16.0, 4.0, 
--8.0, 12.0], [24.0, -8.0, -0.0, -20.0], [28.0, -4.0, -12.0, 4.0]]], [[[4.0, -28.0, -0.0, -20.0], [-4.0, -24.0, -12.0, -0.0], 
-[-20.0, -0.0, 20.0, 16.0]], [[-28.0, 20.0, 12.0, -0.0], [-12.0, 8.0, -0.0, -28.0], [24.0, -8.0, 8.0, -4.0]]], [[[-0.0, 8.0, 
--0.0, 20.0], [8.0, -4.0, -16.0, 20.0], [-0.0, -16.0, 20.0, -0.0]], [[-0.0, -0.0, -24.0, -8.0], [24.0, 20.0, -12.0, -8.0], 
-[-12.0, -24.0, -16.0, 16.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank4_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, -7.0, 6.0], [-3.0, 6.0, 5.0]], [[6.0, 0.0, -3.0], [3.0, 5.0, -5.0]], [[1.0, 0.0, -3.0], 
+[-6.0, 5.0, 0.0]], [[-6.0, -1.0, -3.0], [-1.0, 1.0, -6.0]], [[-5.0, -4.0, -7.0], [4.0, 3.0, -1.0]]], [[[-5.0, -7.0, 5.0], [1.0, 
+-6.0, 5.0]], [[6.0, 3.0, -5.0], [0.0, 3.0, 1.0]], [[5.0, -4.0, -1.0], [-2.0, -5.0, -6.0]], [[0.0, 6.0, 5.0], [4.0, 1.0, 7.0]], 
+[[3.0, -1.0, 2.0], [6.0, -1.0, -2.0]]], [[[-5.0, 1.0, 1.0], [2.0, -3.0, -1.0]], [[-1.0, -3.0, 7.0], [6.0, 0.0, 6.0]], [[3.0, 
+0.0, -5.0], [-3.0, 5.0, 3.0]], [[-1.0, 5.0, -2.0], [-1.0, 4.0, 6.0]], [[5.0, 4.0, -7.0], [1.0, -2.0, 2.0]]], [[[-6.0, -1.0, 
+6.0], [5.0, 0.0, 1.0]], [[0.0, 2.0, -7.0], [-4.0, 7.0, 1.0]], [[-1.0, 7.0, -2.0], [-5.0, -4.0, 3.0]], [[4.0, -2.0, -3.0], [0.0, 
+-1.0, 6.0]], [[-2.0, -7.0, -6.0], [-4.0, 0.0, 1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, 3.0, 6.0], [0.0, 5.0, -5.0]], [[3.0, -3.0, 3.0], [-5.0, -2.0, 0.0]], [[-4.0, 
+5.0, -1.0], [2.0, -4.0, 6.0]], [[-2.0, 5.0, -1.0], [-6.0, -3.0, 0.0]], [[3.0, 4.0, -1.0], [-7.0, 7.0, 7.0]]], [[[-1.0, 5.0, 
+1.0], [3.0, -6.0, -1.0]], [[5.0, -7.0, -5.0], [2.0, 4.0, 5.0]], [[2.0, -3.0, -6.0], [0.0, 3.0, 7.0]], [[3.0, -2.0, 4.0], [7.0, 
+1.0, -6.0]], [[2.0, 0.0, 3.0], [5.0, 7.0, 4.0]]], [[[3.0, 0.0, 1.0], [4.0, 5.0, 6.0]], [[4.0, 7.0, 0.0], [-6.0, 3.0, 7.0]], 
+[[4.0, 3.0, -7.0], [2.0, 1.0, 1.0]], [[1.0, 3.0, 4.0], [7.0, 5.0, 3.0]], [[-7.0, -1.0, -5.0], [1.0, 5.0, 3.0]]], [[[4.0, -7.0, 
+-1.0], [6.0, -6.0, 5.0]], [[7.0, 7.0, -4.0], [5.0, 4.0, 3.0]], [[-2.0, 0.0, 6.0], [-6.0, 3.0, -1.0]], [[-4.0, -1.0, -3.0], 
+[-4.0, 3.0, 6.0]], [[-2.0, 3.0, 5.0], [-1.0, -6.0, 3.0]]]]))
+      arg1=Data(numpy.array([[[3.0, -1.0], [-7.0, 0.0], [-6.0, 1.0]], [[1.0, -5.0], [0.0, 0.0], [-2.0, 
+6.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[0.0, 51.0], [49.0, -54.0], [15.0, 26.0], [18.0, -28.0], [61.0, -28.0]], [[-5.0, 35.0], [25.0, 
+-5.0], [59.0, -32.0], [-82.0, 27.0], [14.0, -43.0]], [[-24.0, -10.0], [-30.0, 14.0], [30.0, 25.0], [-39.0, 40.0], [26.0, 
+-5.0]], [[-44.0, -7.0], [22.0, 19.0], [-51.0, 42.0], [32.0, 29.0], [73.0, 22.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-62.0, -19.0], [7.0, 25.0], [-51.0, 29.0], [-41.0, 31.0], [-34.0, 73.0]], [[-39.0, 
+-19.0], [86.0, 10.0], [49.0, 34.0], [18.0, -70.0], [-15.0, 0.0]], [[-5.0, 14.0], [-57.0, 68.0], [33.0, -15.0], [-41.0, -14.0], 
+[11.0, 15.0]], [[63.0, -5.0], [-5.0, -18.0], [-46.0, 32.0], [-3.0, 57.0], [-64.0, 30.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[7.0, 0.0, 2.0, 4.0], [-4.0, 6.0, -3.0, -7.0], [1.0, 0.0, -6.0, -2.0]], [[-6.0, 1.0, 7.0, 4.0], 
-[4.0, -7.0, -2.0, -7.0], [0.0, 2.0, 6.0, -3.0]]], [[[1.0, 7.0, 7.0, -6.0], [6.0, -4.0, 2.0, 4.0], [-7.0, -3.0, -6.0, -7.0]], 
-[[2.0, 5.0, -5.0, 0.0], [3.0, 7.0, 0.0, 1.0], [-5.0, 1.0, 4.0, 6.0]]], [[[-1.0, 4.0, 1.0, 3.0], [-6.0, -1.0, -4.0, 0.0], [7.0, 
--3.0, 4.0, -4.0]], [[6.0, 7.0, 0.0, 4.0], [-4.0, 7.0, 6.0, -3.0], [-1.0, -2.0, -2.0, -7.0]]]]),self.functionspace)
-      arg1=numpy.array(-4.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-28.0, -0.0, -8.0, -16.0], [16.0, -24.0, 12.0, 28.0], [-4.0, -0.0, 24.0, 8.0]], [[24.0, -4.0, 
--28.0, -16.0], [-16.0, 28.0, 8.0, 28.0], [-0.0, -8.0, -24.0, 12.0]]], [[[-4.0, -28.0, -28.0, 24.0], [-24.0, 16.0, -8.0, -16.0], 
-[28.0, 12.0, 24.0, 28.0]], [[-8.0, -20.0, 20.0, -0.0], [-12.0, -28.0, -0.0, -4.0], [20.0, -4.0, -16.0, -24.0]]], [[[4.0, -16.0, 
--4.0, -12.0], [24.0, 4.0, 16.0, -0.0], [-28.0, 12.0, -16.0, 16.0]], [[-24.0, -28.0, -0.0, -16.0], [16.0, -28.0, -24.0, 12.0], 
-[4.0, 8.0, 8.0, 28.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank2_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-4.0, 4.0, 1.0, 6.0, 7.0], [6.0, -5.0, -4.0, -3.0, 3.0], [-2.0, -3.0, 3.0, 0.0, 7.0], [4.0, -4.0, 
+-7.0, 3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, -6.0, 2.0, 0.0, -1.0], [7.0, 2.0, -1.0, -3.0, 6.0], [-6.0, 4.0, -4.0, -3.0, 
+-1.0], [0.0, 6.0, 0.0, -4.0, -6.0]]))
+      arg1=Data(numpy.array([[7.0, -2.0, -1.0, 0.0, -5.0], [-7.0, -6.0, 7.0, 7.0, -5.0], [-2.0, 0.0, 1.0, 3.0, 4.0], [4.0, 
+-7.0, 2.0, 1.0, 5.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-28.0, 8.0, 4.0, 0.0, 20.0], [28.0, 24.0, -28.0, -28.0, 20.0], [8.0, 0.0, -4.0, -12.0, -16.0], 
+[-16.0, 28.0, -8.0, -4.0, -20.0]], [[28.0, -8.0, -4.0, 0.0, -20.0], [-28.0, -24.0, 28.0, 28.0, -20.0], [-8.0, 0.0, 4.0, 12.0, 
+16.0], [16.0, -28.0, 8.0, 4.0, 20.0]], [[7.0, -2.0, -1.0, 0.0, -5.0], [-7.0, -6.0, 7.0, 7.0, -5.0], [-2.0, 0.0, 1.0, 3.0, 4.0], 
+[4.0, -7.0, 2.0, 1.0, 5.0]], [[42.0, -12.0, -6.0, 0.0, -30.0], [-42.0, -36.0, 42.0, 42.0, -30.0], [-12.0, 0.0, 6.0, 18.0, 
+24.0], [24.0, -42.0, 12.0, 6.0, 30.0]], [[49.0, -14.0, -7.0, 0.0, -35.0], [-49.0, -42.0, 49.0, 49.0, -35.0], [-14.0, 0.0, 7.0, 
+21.0, 28.0], [28.0, -49.0, 14.0, 7.0, 35.0]]], [[[42.0, -12.0, -6.0, 0.0, -30.0], [-42.0, -36.0, 42.0, 42.0, -30.0], [-12.0, 
+0.0, 6.0, 18.0, 24.0], [24.0, -42.0, 12.0, 6.0, 30.0]], [[-35.0, 10.0, 5.0, 0.0, 25.0], [35.0, 30.0, -35.0, -35.0, 25.0], 
+[10.0, 0.0, -5.0, -15.0, -20.0], [-20.0, 35.0, -10.0, -5.0, -25.0]], [[-28.0, 8.0, 4.0, 0.0, 20.0], [28.0, 24.0, -28.0, -28.0, 
+20.0], [8.0, 0.0, -4.0, -12.0, -16.0], [-16.0, 28.0, -8.0, -4.0, -20.0]], [[-21.0, 6.0, 3.0, 0.0, 15.0], [21.0, 18.0, -21.0, 
+-21.0, 15.0], [6.0, 0.0, -3.0, -9.0, -12.0], [-12.0, 21.0, -6.0, -3.0, -15.0]], [[21.0, -6.0, -3.0, 0.0, -15.0], [-21.0, -18.0, 
+21.0, 21.0, -15.0], [-6.0, 0.0, 3.0, 9.0, 12.0], [12.0, -21.0, 6.0, 3.0, 15.0]]], [[[-14.0, 4.0, 2.0, 0.0, 10.0], [14.0, 12.0, 
+-14.0, -14.0, 10.0], [4.0, 0.0, -2.0, -6.0, -8.0], [-8.0, 14.0, -4.0, -2.0, -10.0]], [[-21.0, 6.0, 3.0, 0.0, 15.0], [21.0, 
+18.0, -21.0, -21.0, 15.0], [6.0, 0.0, -3.0, -9.0, -12.0], [-12.0, 21.0, -6.0, -3.0, -15.0]], [[21.0, -6.0, -3.0, 0.0, -15.0], 
+[-21.0, -18.0, 21.0, 21.0, -15.0], [-6.0, 0.0, 3.0, 9.0, 12.0], [12.0, -21.0, 6.0, 3.0, 15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[49.0, -14.0, -7.0, 0.0, -35.0], [-49.0, 
+-42.0, 49.0, 49.0, -35.0], [-14.0, 0.0, 7.0, 21.0, 28.0], [28.0, -49.0, 14.0, 7.0, 35.0]]], [[[28.0, -8.0, -4.0, 0.0, -20.0], 
+[-28.0, -24.0, 28.0, 28.0, -20.0], [-8.0, 0.0, 4.0, 12.0, 16.0], [16.0, -28.0, 8.0, 4.0, 20.0]], [[-28.0, 8.0, 4.0, 0.0, 20.0], 
+[28.0, 24.0, -28.0, -28.0, 20.0], [8.0, 0.0, -4.0, -12.0, -16.0], [-16.0, 28.0, -8.0, -4.0, -20.0]], [[-49.0, 14.0, 7.0, 0.0, 
+35.0], [49.0, 42.0, -49.0, -49.0, 35.0], [14.0, 0.0, -7.0, -21.0, -28.0], [-28.0, 49.0, -14.0, -7.0, -35.0]], [[21.0, -6.0, 
+-3.0, 0.0, -15.0], [-21.0, -18.0, 21.0, 21.0, -15.0], [-6.0, 0.0, 3.0, 9.0, 12.0], [12.0, -21.0, 6.0, 3.0, 15.0]], [[0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-42.0, 12.0, 6.0, 0.0, 30.0], [42.0, 36.0, -42.0, -42.0, 30.0], [12.0, 0.0, -6.0, 
+-18.0, -24.0], [-24.0, 42.0, -12.0, -6.0, -30.0]], [[-42.0, 12.0, 6.0, 0.0, 30.0], [42.0, 36.0, -42.0, -42.0, 30.0], [12.0, 
+0.0, -6.0, -18.0, -24.0], [-24.0, 42.0, -12.0, -6.0, -30.0]], [[14.0, -4.0, -2.0, 0.0, -10.0], [-14.0, -12.0, 14.0, 14.0, 
+-10.0], [-4.0, 0.0, 2.0, 6.0, 8.0], [8.0, -14.0, 4.0, 2.0, 10.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-7.0, 2.0, 1.0, 0.0, 5.0], [7.0, 6.0, -7.0, -7.0, 5.0], [2.0, 0.0, -1.0, 
+-3.0, -4.0], [-4.0, 7.0, -2.0, -1.0, -5.0]]], [[[49.0, -14.0, -7.0, 0.0, -35.0], [-49.0, -42.0, 49.0, 49.0, -35.0], [-14.0, 
+0.0, 7.0, 21.0, 28.0], [28.0, -49.0, 14.0, 7.0, 35.0]], [[14.0, -4.0, -2.0, 0.0, -10.0], [-14.0, -12.0, 14.0, 14.0, -10.0], 
+[-4.0, 0.0, 2.0, 6.0, 8.0], [8.0, -14.0, 4.0, 2.0, 10.0]], [[-7.0, 2.0, 1.0, 0.0, 5.0], [7.0, 6.0, -7.0, -7.0, 5.0], [2.0, 0.0, 
+-1.0, -3.0, -4.0], [-4.0, 7.0, -2.0, -1.0, -5.0]], [[-21.0, 6.0, 3.0, 0.0, 15.0], [21.0, 18.0, -21.0, -21.0, 15.0], [6.0, 0.0, 
+-3.0, -9.0, -12.0], [-12.0, 21.0, -6.0, -3.0, -15.0]], [[42.0, -12.0, -6.0, 0.0, -30.0], [-42.0, -36.0, 42.0, 42.0, -30.0], 
+[-12.0, 0.0, 6.0, 18.0, 24.0], [24.0, -42.0, 12.0, 6.0, 30.0]]], [[[-42.0, 12.0, 6.0, 0.0, 30.0], [42.0, 36.0, -42.0, -42.0, 
+30.0], [12.0, 0.0, -6.0, -18.0, -24.0], [-24.0, 42.0, -12.0, -6.0, -30.0]], [[28.0, -8.0, -4.0, 0.0, -20.0], [-28.0, -24.0, 
+28.0, 28.0, -20.0], [-8.0, 0.0, 4.0, 12.0, 16.0], [16.0, -28.0, 8.0, 4.0, 20.0]], [[-28.0, 8.0, 4.0, 0.0, 20.0], [28.0, 24.0, 
+-28.0, -28.0, 20.0], [8.0, 0.0, -4.0, -12.0, -16.0], [-16.0, 28.0, -8.0, -4.0, -20.0]], [[-21.0, 6.0, 3.0, 0.0, 15.0], [21.0, 
+18.0, -21.0, -21.0, 15.0], [6.0, 0.0, -3.0, -9.0, -12.0], [-12.0, 21.0, -6.0, -3.0, -15.0]], [[-7.0, 2.0, 1.0, 0.0, 5.0], [7.0, 
+6.0, -7.0, -7.0, 5.0], [2.0, 0.0, -1.0, -3.0, -4.0], [-4.0, 7.0, -2.0, -1.0, -5.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[42.0, -12.0, -6.0, 0.0, -30.0], [-42.0, -36.0, 42.0, 
+42.0, -30.0], [-12.0, 0.0, 6.0, 18.0, 24.0], [24.0, -42.0, 12.0, 6.0, 30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-28.0, 8.0, 4.0, 0.0, 20.0], [28.0, 24.0, -28.0, -28.0, 20.0], 
+[8.0, 0.0, -4.0, -12.0, -16.0], [-16.0, 28.0, -8.0, -4.0, -20.0]], [[-42.0, 12.0, 6.0, 0.0, 30.0], [42.0, 36.0, -42.0, -42.0, 
+30.0], [12.0, 0.0, -6.0, -18.0, -24.0], [-24.0, 42.0, -12.0, -6.0, -30.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank3_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -1.0, -7.0], [2.0, 3.0, 7.0], [7.0, -3.0, 5.0], [-5.0, 7.0, 0.0], [0.0, 5.0, 1.0]], [[0.0, 
+-7.0, -2.0], [0.0, -2.0, 2.0], [6.0, 2.0, -1.0], [5.0, 0.0, 6.0], [1.0, 1.0, -1.0]], [[-3.0, -4.0, -7.0], [5.0, 6.0, -5.0], 
+[7.0, -1.0, 3.0], [1.0, 0.0, 4.0], [-6.0, 7.0, -4.0]], [[4.0, 7.0, 7.0], [0.0, 0.0, -4.0], [4.0, -6.0, 0.0], [-6.0, 0.0, 5.0], 
+[5.0, 0.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, 1.0, 1.0], [-3.0, -6.0, 4.0], [0.0, 1.0, 0.0], [-1.0, -3.0, 6.0], [4.0, 3.0, 
+-1.0]], [[-6.0, -4.0, 0.0], [0.0, -5.0, 0.0], [-7.0, -4.0, 4.0], [6.0, -1.0, -7.0], [6.0, -1.0, 7.0]], [[-1.0, 0.0, 5.0], [7.0, 
+3.0, 0.0], [-1.0, 6.0, -4.0], [-7.0, 3.0, 4.0], [1.0, 0.0, 0.0]], [[-4.0, -3.0, -3.0], [-7.0, -4.0, 4.0], [7.0, 6.0, 3.0], 
+[-6.0, 4.0, -1.0], [5.0, 1.0, 2.0]]]))
+      arg1=Data(numpy.array([[[0.0, -7.0, 3.0, -1.0, 2.0], [-4.0, 1.0, 2.0, 2.0, 1.0], [-3.0, 1.0, -1.0, -4.0, -6.0], [0.0, 
+-6.0, 4.0, 7.0, -3.0]], [[7.0, 3.0, 0.0, 4.0, 0.0], [6.0, 3.0, -5.0, 3.0, 0.0], [-3.0, 0.0, -7.0, 6.0, -2.0], [4.0, -4.0, 0.0, 
+0.0, -2.0]], [[-6.0, -4.0, 6.0, 6.0, 0.0], [2.0, -6.0, -6.0, 1.0, 0.0], [3.0, 3.0, -4.0, -2.0, 2.0], [0.0, 1.0, -7.0, 0.0, 
+0.0]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[35.0, 25.0, -42.0, -46.0, 0.0], [-20.0, 39.0, 47.0, -10.0, 0.0], [-18.0, -21.0, 35.0, 8.0, 
+-12.0], [-4.0, -3.0, 49.0, 0.0, 2.0]], [[-21.0, -33.0, 48.0, 52.0, 4.0], [24.0, -31.0, -53.0, 20.0, 2.0], [6.0, 23.0, -51.0, 
+-4.0, -4.0], [12.0, -17.0, -41.0, 14.0, -12.0]], [[-51.0, -78.0, 51.0, 11.0, 14.0], [-36.0, -32.0, -1.0, 10.0, 7.0], [3.0, 
+22.0, -6.0, -56.0, -26.0], [-12.0, -25.0, -7.0, 49.0, -15.0]], [[49.0, 56.0, -15.0, 33.0, -10.0], [62.0, 16.0, -45.0, 11.0, 
+-5.0], [-6.0, -5.0, -44.0, 62.0, 16.0], [28.0, 2.0, -20.0, -35.0, 1.0]], [[29.0, 11.0, 6.0, 26.0, 0.0], [32.0, 9.0, -31.0, 
+16.0, 0.0], [-12.0, 3.0, -39.0, 28.0, -8.0], [20.0, -19.0, -7.0, 0.0, -10.0]]], [[[-37.0, -13.0, -12.0, -40.0, 0.0], [-46.0, 
+-9.0, 47.0, -23.0, 0.0], [15.0, -6.0, 57.0, -38.0, 10.0], [-28.0, 26.0, 14.0, 0.0, 14.0]], [[-26.0, -14.0, 12.0, 4.0, 0.0], 
+[-8.0, -18.0, -2.0, -4.0, 0.0], [12.0, 6.0, 6.0, -16.0, 8.0], [-8.0, 10.0, -14.0, 0.0, 4.0]], [[20.0, -32.0, 12.0, -4.0, 12.0], 
+[-14.0, 18.0, 8.0, 17.0, 6.0], [-27.0, 3.0, -16.0, -10.0, -42.0], [8.0, -45.0, 31.0, 42.0, -22.0]], [[-36.0, -59.0, 51.0, 31.0, 
+10.0], [-8.0, -31.0, -26.0, 16.0, 5.0], [3.0, 23.0, -29.0, -32.0, -18.0], [0.0, -24.0, -22.0, 35.0, -15.0]], [[13.0, 0.0, -3.0, 
+-3.0, 2.0], [0.0, 10.0, 3.0, 4.0, 1.0], [-9.0, -2.0, -4.0, 4.0, -10.0], [4.0, -11.0, 11.0, 7.0, -5.0]]], [[[14.0, 37.0, -51.0, 
+-55.0, -6.0], [-26.0, 27.0, 56.0, -25.0, -3.0], [0.0, -24.0, 59.0, 2.0, 12.0], [-16.0, 27.0, 37.0, -21.0, 17.0]], [[72.0, 3.0, 
+-15.0, -11.0, 10.0], [6.0, 53.0, 10.0, 23.0, 5.0], [-48.0, -10.0, -27.0, 26.0, -52.0], [24.0, -59.0, 55.0, 35.0, -27.0]], 
+[[-25.0, -64.0, 39.0, 7.0, 14.0], [-28.0, -14.0, 1.0, 14.0, 7.0], [-9.0, 16.0, -12.0, -40.0, -34.0], [-4.0, -35.0, 7.0, 49.0, 
+-19.0]], [[-24.0, -23.0, 27.0, 23.0, 2.0], [4.0, -23.0, -22.0, 6.0, 1.0], [9.0, 13.0, -17.0, -12.0, 2.0], [0.0, -2.0, -24.0, 
+7.0, -3.0]], [[73.0, 79.0, -42.0, 10.0, -12.0], [58.0, 39.0, -23.0, 5.0, -6.0], [-15.0, -18.0, -27.0, 74.0, 14.0], [28.0, 4.0, 
+4.0, -42.0, 4.0]]], [[[7.0, -35.0, 54.0, 66.0, 8.0], [40.0, -17.0, -69.0, 36.0, 4.0], [-12.0, 25.0, -81.0, 12.0, -24.0], [28.0, 
+-45.0, -33.0, 28.0, -26.0]], [[24.0, 16.0, -24.0, -24.0, 0.0], [-8.0, 24.0, 24.0, -4.0, 0.0], [-12.0, -12.0, 16.0, 8.0, -8.0], 
+[0.0, -4.0, 28.0, 0.0, 0.0]], [[-42.0, -46.0, 12.0, -28.0, 8.0], [-52.0, -14.0, 38.0, -10.0, 4.0], [6.0, 4.0, 38.0, -52.0, 
+-12.0], [-24.0, 0.0, 16.0, 28.0, 0.0]], [[-30.0, 22.0, 12.0, 36.0, -12.0], [34.0, -36.0, -42.0, -7.0, -6.0], [33.0, 9.0, -14.0, 
+14.0, 46.0], [0.0, 41.0, -59.0, -42.0, 18.0]], [[24.0, -19.0, -9.0, -29.0, 10.0], [-28.0, 29.0, 34.0, 6.0, 5.0], [-27.0, -7.0, 
+11.0, -12.0, -38.0], [0.0, -34.0, 48.0, 35.0, -15.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[1.0, 34.0, -9.0, 15.0, -10.0], [28.0, -8.0, -21.0, -6.0, -5.0], [15.0, -2.0, -6.0, 
+24.0, 30.0], [4.0, 27.0, -27.0, -35.0, 13.0]], [[-66.0, -13.0, 15.0, 3.0, -6.0], [-16.0, -45.0, 0.0, -20.0, -3.0], [39.0, 9.0, 
+29.0, -32.0, 38.0], [-24.0, 46.0, -40.0, -21.0, 21.0]], [[7.0, 3.0, 0.0, 4.0, 0.0], [6.0, 3.0, -5.0, 3.0, 0.0], [-3.0, 0.0, 
+-7.0, 6.0, -2.0], [4.0, -4.0, 0.0, 0.0, -2.0]], [[-57.0, -26.0, 33.0, 25.0, -2.0], [-2.0, -46.0, -23.0, -5.0, -1.0], [30.0, 
+17.0, -2.0, -26.0, 24.0], [-12.0, 24.0, -46.0, -7.0, 9.0]], [[27.0, -15.0, 6.0, 2.0, 8.0], [0.0, 19.0, -1.0, 16.0, 4.0], 
+[-24.0, 1.0, -21.0, 4.0, -32.0], [12.0, -37.0, 23.0, 28.0, -18.0]]], [[[-28.0, 30.0, -18.0, -10.0, -12.0], [0.0, -18.0, 8.0, 
+-24.0, -6.0], [30.0, -6.0, 34.0, 0.0, 44.0], [-16.0, 52.0, -24.0, -42.0, 26.0]], [[-35.0, -15.0, 0.0, -20.0, 0.0], [-30.0, 
+-15.0, 25.0, -15.0, 0.0], [15.0, 0.0, 35.0, -30.0, 10.0], [-20.0, 20.0, 0.0, 0.0, 10.0]], [[-52.0, 21.0, 3.0, 15.0, -14.0], 
+[12.0, -43.0, -18.0, -22.0, -7.0], [45.0, 5.0, 19.0, -4.0, 58.0], [-16.0, 62.0, -56.0, -49.0, 29.0]], [[35.0, -17.0, -24.0, 
+-52.0, 12.0], [-44.0, 45.0, 59.0, 2.0, 6.0], [-36.0, -15.0, 29.0, -16.0, -48.0], [-4.0, -39.0, 73.0, 42.0, -16.0]], [[-49.0, 
+-73.0, 60.0, 32.0, 12.0], [-16.0, -39.0, -25.0, 16.0, 6.0], [6.0, 27.0, -27.0, -44.0, -20.0], [-4.0, -25.0, -25.0, 42.0, 
+-16.0]]], [[[-30.0, -13.0, 27.0, 31.0, -2.0], [14.0, -31.0, -32.0, 3.0, -1.0], [18.0, 14.0, -19.0, -6.0, 16.0], [0.0, 11.0, 
+-39.0, -7.0, 3.0]], [[21.0, -40.0, 21.0, 5.0, 14.0], [-10.0, 16.0, -1.0, 23.0, 7.0], [-30.0, 7.0, -28.0, -10.0, -48.0], [12.0, 
+-54.0, 28.0, 49.0, -27.0]], [[66.0, 41.0, -27.0, 1.0, -2.0], [32.0, 41.0, -8.0, 12.0, -1.0], [-27.0, -13.0, -25.0, 48.0, 
+-14.0], [24.0, -22.0, 24.0, -7.0, -9.0]], [[-3.0, 42.0, 3.0, 43.0, -14.0], [54.0, -22.0, -53.0, -1.0, -7.0], [24.0, 5.0, -30.0, 
+38.0, 44.0], [12.0, 34.0, -56.0, -49.0, 15.0]], [[0.0, -7.0, 3.0, -1.0, 2.0], [-4.0, 1.0, 2.0, 2.0, 1.0], [-3.0, 1.0, -1.0, 
+-4.0, -6.0], [0.0, -6.0, 4.0, 7.0, -3.0]]], [[[-3.0, 31.0, -30.0, -26.0, -8.0], [-8.0, 5.0, 25.0, -20.0, -4.0], [12.0, -13.0, 
+37.0, 4.0, 24.0], [-12.0, 33.0, 5.0, -28.0, 18.0]], [[-52.0, 21.0, 3.0, 15.0, -14.0], [12.0, -43.0, -18.0, -22.0, -7.0], [45.0, 
+5.0, 19.0, -4.0, 58.0], [-16.0, 62.0, -56.0, -49.0, 29.0]], [[24.0, -43.0, 39.0, 35.0, 14.0], [14.0, 7.0, -34.0, 35.0, 7.0], 
+[-30.0, 16.0, -61.0, 2.0, -48.0], [24.0, -63.0, 7.0, 49.0, -33.0]], [[34.0, 58.0, -24.0, 16.0, -12.0], [46.0, 12.0, -26.0, 
+-1.0, -6.0], [3.0, -9.0, -18.0, 50.0, 26.0], [16.0, 19.0, -17.0, -42.0, 10.0]], [[-5.0, -40.0, 27.0, 11.0, 10.0], [-10.0, -4.0, 
+-7.0, 15.0, 5.0], [-12.0, 11.0, -20.0, -18.0, -28.0], [4.0, -32.0, 6.0, 35.0, -17.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-2.0, 6.0, -3.0], [-7.0, -7.0, -2.0]], [[5.0, 3.0, -7.0], [-2.0, -6.0, 0.0]], [[-6.0, 4.0, 
+-3.0], [4.0, -2.0, 0.0]], [[4.0, 1.0, -1.0], [-6.0, 7.0, -4.0]], [[-7.0, 0.0, 7.0], [-4.0, -4.0, 5.0]]], [[[3.0, -6.0, 0.0], 
+[0.0, -1.0, 4.0]], [[-1.0, 7.0, -1.0], [-1.0, 7.0, -5.0]], [[-1.0, -4.0, 2.0], [0.0, -5.0, 0.0]], [[-2.0, 0.0, 4.0], [0.0, 0.0, 
+-4.0]], [[7.0, 3.0, 3.0], [2.0, 7.0, -2.0]]], [[[6.0, 6.0, 6.0], [1.0, 3.0, 4.0]], [[2.0, 6.0, -2.0], [0.0, -7.0, -4.0]], 
+[[2.0, 7.0, 0.0], [3.0, 0.0, -5.0]], [[0.0, 0.0, 6.0], [-5.0, 6.0, 7.0]], [[7.0, -3.0, -4.0], [2.0, 7.0, 7.0]]], [[[2.0, 0.0, 
+2.0], [0.0, 1.0, -7.0]], [[0.0, 2.0, 5.0], [4.0, 4.0, 0.0]], [[-3.0, 1.0, 3.0], [0.0, -7.0, 0.0]], [[-6.0, 4.0, 1.0], [5.0, 
+3.0, 0.0]], [[-1.0, 5.0, 1.0], [-2.0, 7.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, 0.0, 0.0], [-1.0, 2.0, 2.0]], [[0.0, 0.0, 5.0], [-7.0, 7.0, -6.0]], [[-4.0, 
+-2.0, -5.0], [4.0, -4.0, -2.0]], [[4.0, 7.0, -1.0], [-4.0, -1.0, -1.0]], [[-7.0, 0.0, 1.0], [-3.0, -4.0, 4.0]]], [[[-2.0, -3.0, 
+-6.0], [-1.0, 2.0, 6.0]], [[-3.0, 3.0, 5.0], [0.0, 0.0, 7.0]], [[3.0, 1.0, 0.0], [-1.0, 5.0, -1.0]], [[6.0, -6.0, -5.0], [6.0, 
+-1.0, -1.0]], [[-4.0, -5.0, 1.0], [6.0, 1.0, 4.0]]], [[[-1.0, -7.0, 3.0], [2.0, 3.0, -1.0]], [[-6.0, 3.0, 0.0], [7.0, 3.0, 
+-5.0]], [[-5.0, 3.0, 0.0], [7.0, 5.0, -3.0]], [[-3.0, 5.0, 0.0], [-5.0, 6.0, -1.0]], [[-7.0, -6.0, -5.0], [3.0, 0.0, -5.0]]], 
+[[[-2.0, 2.0, -5.0], [-6.0, 3.0, -1.0]], [[-2.0, 1.0, 7.0], [-4.0, 2.0, 6.0]], [[2.0, 7.0, -6.0], [0.0, 5.0, 0.0]], [[-2.0, 
+-7.0, 4.0], [4.0, 0.0, 0.0]], [[4.0, 3.0, 2.0], [5.0, 5.0, -3.0]]]]))
+      arg1=Data(numpy.array([[[[1.0, -7.0, 7.0, -7.0, 5.0], [-5.0, 3.0, -6.0, 6.0, -1.0], [2.0, 3.0, -2.0, -6.0, 2.0], [1.0, 
+-7.0, 4.0, -5.0, 0.0]], [[-2.0, -6.0, 0.0, -6.0, 0.0], [5.0, 0.0, -3.0, -1.0, 5.0], [0.0, -3.0, 5.0, 7.0, 6.0], [5.0, 3.0, 0.0, 
+-2.0, 1.0]], [[2.0, 4.0, 2.0, -2.0, -7.0], [6.0, 0.0, 4.0, -6.0, 0.0], [4.0, 0.0, -1.0, 3.0, 0.0], [6.0, 2.0, -7.0, 4.0, 
+6.0]]], [[[7.0, 2.0, 0.0, 5.0, -5.0], [6.0, 0.0, 5.0, -1.0, -1.0], [4.0, 6.0, 4.0, -4.0, 3.0], [4.0, -2.0, -4.0, 0.0, 3.0]], 
+[[3.0, -2.0, -3.0, -7.0, -6.0], [4.0, -7.0, -1.0, -1.0, -1.0], [2.0, 0.0, 4.0, 3.0, 4.0], [2.0, 0.0, 0.0, 7.0, -4.0]], [[5.0, 
+6.0, -3.0, 0.0, 1.0], [0.0, -6.0, -6.0, -6.0, 5.0], [-4.0, 7.0, -5.0, 0.0, -4.0], [5.0, 1.0, -1.0, 0.0, 
+-2.0]]]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-100.0, -46.0, 7.0, -2.0, 86.0], [-48.0, 55.0, -34.0, 26.0, 36.0], [-50.0, -80.0, -9.0, 52.0, 
+-9.0], [-42.0, 38.0, 43.0, -63.0, -1.0]], [[-47.0, -73.0, 39.0, -7.0, 120.0], [-88.0, 57.0, -71.0, 77.0, 18.0], [-38.0, -6.0, 
+-20.0, -40.0, -2.0], [-42.0, -36.0, 77.0, -101.0, -21.0]], [[2.0, 18.0, -42.0, 58.0, -17.0], [48.0, -4.0, 34.0, -24.0, 24.0], 
+[-12.0, -6.0, 43.0, 33.0, 16.0], [8.0, 40.0, -19.0, -4.0, 6.0]], [[-41.0, -88.0, 17.0, -111.0, 11.0], [-29.0, -13.0, -44.0, 
+52.0, -20.0], [10.0, -55.0, 22.0, 25.0, 40.0], [-27.0, -19.0, 51.0, 23.0, -43.0]], [[-8.0, 107.0, -38.0, 43.0, -35.0], [37.0, 
+-23.0, 24.0, -106.0, 40.0], [-30.0, -10.0, -50.0, 67.0, -62.0], [36.0, 76.0, -66.0, 35.0, 36.0]]], [[[32.0, 41.0, 12.0, 22.0, 
+25.0], [-49.0, -8.0, -23.0, 1.0, -12.0], [-12.0, 55.0, -60.0, -63.0, -50.0], [-9.0, -35.0, 8.0, -10.0, -10.0]], [[-28.0, -85.0, 
+-15.0, -87.0, -40.0], [56.0, -22.0, -1.0, 17.0, 5.0], [24.0, -65.0, 87.0, 77.0, 85.0], [13.0, 23.0, 12.0, 36.0, -20.0]], 
+[[-4.0, 49.0, 12.0, 62.0, 11.0], [-23.0, 32.0, 31.0, -9.0, -14.0], [-4.0, 9.0, -40.0, -31.0, -46.0], [-19.0, -1.0, -18.0, 
+-14.0, 28.0]], [[-14.0, 6.0, 6.0, 6.0, -42.0], [34.0, 18.0, 52.0, -12.0, -18.0], [28.0, -34.0, 20.0, 24.0, 12.0], [2.0, 18.0, 
+-32.0, 26.0, 32.0]], [[32.0, -77.0, 40.0, -112.0, -40.0], [38.0, -16.0, -24.0, 24.0, -11.0], [56.0, 10.0, 44.0, 1.0, 74.0], 
+[52.0, -40.0, 1.0, 20.0, 3.0]]], [[[42.0, -34.0, 33.0, -106.0, -31.0], [54.0, -27.0, -52.0, -34.0, 40.0], [30.0, 34.0, 8.0, 
+29.0, 47.0], [102.0, -10.0, -26.0, 3.0, 25.0]], [[-55.0, -68.0, 43.0, 3.0, 62.0], [-20.0, 79.0, -7.0, 49.0, 15.0], [-2.0, 
+-40.0, 20.0, 3.0, 28.0], [-14.0, -4.0, 26.0, -79.0, 30.0]], [[-16.0, -80.0, 29.0, -41.0, -10.0], [43.0, 36.0, 12.0, 32.0, 5.0], 
+[36.0, -32.0, 68.0, 25.0, 75.0], [24.0, -4.0, 1.0, -24.0, 26.0]], [[30.0, 44.0, -27.0, -79.0, -46.0], [30.0, -84.0, -49.0, 
+-79.0, 34.0], [-12.0, 19.0, -37.0, 56.0, -19.0], [63.0, 29.0, -29.0, 66.0, -17.0]], [[75.0, -15.0, -1.0, -62.0, 18.0], [-34.0, 
+-70.0, -88.0, 18.0, 4.0], [-8.0, 91.0, -24.0, -62.0, 2.0], [25.0, -63.0, 41.0, 4.0, -63.0]]], [[[-26.0, -50.0, 36.0, -25.0, 
+-17.0], [6.0, 41.0, 37.0, 41.0, -38.0], [42.0, -43.0, 33.0, -3.0, 36.0], [-19.0, -17.0, 1.0, 5.0, 22.0]], [[46.0, 8.0, -2.0, 
+-30.0, -79.0], [80.0, -28.0, 30.0, -40.0, 2.0], [44.0, 18.0, 37.0, 25.0, 40.0], [64.0, 8.0, -51.0, 44.0, 28.0]], [[-20.0, 41.0, 
+6.0, 58.0, 6.0], [10.0, 40.0, 34.0, -30.0, 15.0], [-8.0, -12.0, -20.0, 13.0, -28.0], [6.0, 30.0, -33.0, -24.0, 47.0]], [[32.0, 
+26.0, -49.0, 20.0, -80.0], [98.0, -39.0, 50.0, -54.0, 18.0], [18.0, 0.0, 63.0, 56.0, 39.0], [46.0, 46.0, -51.0, 47.0, 13.0]], 
+[[23.0, -7.0, -41.0, -84.0, -39.0], [52.0, -82.0, -52.0, -52.0, 46.0], [-12.0, 5.0, 21.0, 73.0, 30.0], [61.0, 33.0, -8.0, 48.0, 
+-33.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[5.0, 34.0, -40.0, 9.0, -25.0], [22.0, -38.0, 5.0, -37.0, 13.0], [-16.0, -4.0, 2.0, 
+34.0, -11.0], [6.0, 32.0, -14.0, 34.0, -15.0]], [[-48.0, -44.0, 7.0, -94.0, -48.0], [16.0, -13.0, 14.0, 6.0, -30.0], [30.0, 
+-84.0, 25.0, 64.0, 31.0], [-14.0, 18.0, -1.0, 69.0, -7.0]], [[-4.0, 24.0, -20.0, 98.0, 17.0], [-12.0, 28.0, 46.0, 20.0, -16.0], 
+[-12.0, 4.0, 13.0, -33.0, -16.0], [-46.0, 2.0, 5.0, -24.0, 0.0]], [[-48.0, -86.0, 32.0, -81.0, 52.0], [-19.0, 25.0, -62.0, 
+34.0, 31.0], [-10.0, -40.0, 13.0, 35.0, 38.0], [10.0, -2.0, 40.0, -45.0, -5.0]], [[-18.0, 79.0, -47.0, 60.0, 1.0], [7.0, -17.0, 
+11.0, -65.0, 34.0], [-46.0, -11.0, -35.0, 45.0, -55.0], [-1.0, 61.0, -27.0, 11.0, 5.0]]], [[[21.0, 38.0, -50.0, 25.0, 31.0], 
+[-39.0, -56.0, -46.0, -10.0, 16.0], [-52.0, 39.0, -31.0, -17.0, -41.0], [-23.0, 1.0, 32.0, 6.0, -62.0]], [[36.0, 65.0, -32.0, 
+-7.0, -43.0], [60.0, -51.0, -13.0, -93.0, 53.0], [-14.0, 31.0, -19.0, 54.0, -16.0], [77.0, 47.0, -54.0, 29.0, 19.0]], [[4.0, 
+-45.0, 9.0, -67.0, -11.0], [4.0, -20.0, -25.0, 19.0, -7.0], [16.0, -7.0, 20.0, 8.0, 33.0], [9.0, -17.0, 17.0, 18.0, -20.0]], 
+[[42.0, -18.0, 38.0, 41.0, 40.0], [-58.0, 31.0, -1.0, 73.0, -46.0], [18.0, 65.0, -12.0, -120.0, -6.0], [-37.0, -83.0, 36.0, 
+-45.0, -12.0]], [[73.0, 96.0, -41.0, 79.0, -59.0], [41.0, -43.0, 48.0, -56.0, -8.0], [6.0, 67.0, -10.0, -29.0, -32.0], [23.0, 
+7.0, -51.0, 41.0, 7.0]]], [[[37.0, 53.0, -7.0, 32.0, -55.0], [12.0, -18.0, 52.0, -16.0, -44.0], [28.0, 23.0, -11.0, -33.0, 
+-22.0], [-9.0, -13.0, -32.0, 52.0, 7.0]], [[21.0, 2.0, -36.0, 38.0, -88.0], [99.0, -9.0, 89.0, -19.0, -14.0], [42.0, -20.0, 
+92.0, 38.0, 59.0], [18.0, 32.0, -47.0, 45.0, 22.0]], [[38.0, 3.0, -41.0, 17.0, -93.0], [102.0, -32.0, 69.0, -27.0, -7.0], 
+[40.0, -3.0, 88.0, 38.0, 61.0], [33.0, 27.0, -45.0, 54.0, 10.0]], [[-35.0, -37.0, -36.0, -76.0, -27.0], [34.0, -45.0, -22.0, 
+-18.0, 22.0], [-10.0, -61.0, 40.0, 91.0, 37.0], [9.0, 45.0, 9.0, 47.0, -32.0]], [[-9.0, 41.0, -44.0, 110.0, -20.0], [-7.0, 9.0, 
+85.0, 21.0, -51.0], [-2.0, -20.0, 26.0, -27.0, -21.0], [-80.0, 10.0, 0.0, 27.0, -17.0]]], [[[-54.0, -42.0, -30.0, -39.0, 36.0], 
+[-34.0, -21.0, -41.0, 25.0, 10.0], [-38.0, -55.0, 12.0, 44.0, 6.0], [-45.0, 21.0, 52.0, 7.0, -56.0]], [[18.0, 60.0, -24.0, 
+-40.0, -45.0], [41.0, -56.0, -21.0, -89.0, 39.0], [-12.0, 9.0, -36.0, 62.0, -26.0], [63.0, 45.0, -47.0, 50.0, 11.0]], [[-9.0, 
+-90.0, -13.0, -79.0, 22.0], [9.0, -29.0, -62.0, 36.0, 28.0], [-10.0, -15.0, 57.0, 34.0, 66.0], [11.0, -5.0, 50.0, -13.0, 
+-49.0]], [[48.0, 80.0, -6.0, 68.0, -58.0], [23.0, -6.0, 69.0, -33.0, -37.0], [28.0, 39.0, -19.0, -41.0, -34.0], [3.0, -7.0, 
+-52.0, 40.0, 29.0]], [[37.0, -56.0, 26.0, -60.0, -52.0], [57.0, -5.0, 13.0, 17.0, -14.0], [58.0, 12.0, 60.0, -2.0, 73.0], 
+[46.0, -28.0, -15.0, 17.0, 16.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[0.0, 7.0, -3.0, 7.0, -3.0], [4.0, 6.0, 3.0, 1.0, 1.0], [2.0, 0.0, 4.0, -1.0, -1.0], [-1.0, 7.0, 
+-1.0, 4.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, -2.0, 2.0, 1.0, -7.0], [-5.0, 5.0, -6.0, 0.0, 3.0], [6.0, 3.0, -7.0, 6.0, 6.0], 
+[0.0, -7.0, 2.0, 7.0, 5.0]]))
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, -14.0, 6.0, -14.0, 6.0], [-8.0, -12.0, -6.0, -2.0, -2.0], [-4.0, -0.0, -8.0, 2.0, 2.0], 
+[2.0, -14.0, 2.0, -8.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[25.0, -10.0, 10.0, 5.0, -35.0], [-25.0, 25.0, -30.0, 0.0, 15.0], [30.0, 15.0, -35.0, 
+30.0, 30.0], [0.0, -35.0, 10.0, 35.0, 25.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-6.0, -6.0, -6.0], [0.0, 0.0, -6.0], [-2.0, -2.0, 3.0], [0.0, 6.0, 0.0], [-1.0, 1.0, 1.0]], 
+[[-7.0, -6.0, -5.0], [2.0, 6.0, 2.0], [2.0, 0.0, -2.0], [-1.0, -6.0, -6.0], [5.0, 4.0, 3.0]], [[-2.0, 4.0, 7.0], [-3.0, -6.0, 
+0.0], [0.0, -3.0, 2.0], [-6.0, -5.0, -3.0], [2.0, -5.0, -1.0]], [[-7.0, -2.0, 7.0], [-6.0, -5.0, -3.0], [0.0, 0.0, 5.0], [1.0, 
+0.0, 5.0], [1.0, -6.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-7.0, -3.0, 0.0], [7.0, -4.0, -4.0], [-1.0, -3.0, -5.0], [0.0, 5.0, -6.0], [2.0, 
+-6.0, 1.0]], [[1.0, 5.0, -2.0], [0.0, 3.0, -3.0], [2.0, 0.0, 3.0], [1.0, -6.0, 6.0], [-7.0, 7.0, 2.0]], [[1.0, -4.0, -3.0], 
+[2.0, -7.0, -6.0], [6.0, -3.0, -3.0], [-3.0, 6.0, 7.0], [3.0, 7.0, 5.0]], [[-4.0, -6.0, -1.0], [4.0, -1.0, 1.0], [0.0, 4.0, 
+6.0], [4.0, -2.0, -5.0], [1.0, -2.0, 6.0]]]))
+      arg1=Data(numpy.array([0.0, 4.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, -5.0, 1.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[12.0, 36.0, -26.0, 24.0, -2.0], [6.0, 12.0, 12.0, 12.0, -2.0], [-26.0, -24.0, -24.0, -2.0, -14.0], 
+[-50.0, -2.0, -30.0, -30.0, 18.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[36.0, -5.0, 13.0, -31.0, 25.0], [-30.0, -18.0, -3.0, 33.0, -12.0], [14.0, 23.0, -6.0, 
+-14.0, -39.0], [41.0, -6.0, -14.0, -7.0, 13.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[2.0, 1.0, -4.0], [-2.0, 2.0, 7.0]], [[-3.0, 7.0, -5.0], [2.0, 7.0, 5.0]], [[7.0, 7.0, 0.0], 
+[2.0, -1.0, -5.0]], [[-7.0, 3.0, 0.0], [1.0, 0.0, 1.0]], [[5.0, -3.0, -1.0], [7.0, -6.0, -7.0]]], [[[-7.0, 0.0, -4.0], [-4.0, 
+2.0, 0.0]], [[4.0, 6.0, 7.0], [-4.0, -2.0, 6.0]], [[0.0, -2.0, 1.0], [0.0, 0.0, 1.0]], [[5.0, -5.0, -5.0], [-6.0, -4.0, -3.0]], 
+[[2.0, 6.0, 6.0], [-4.0, -4.0, 3.0]]], [[[7.0, 3.0, -2.0], [-4.0, 2.0, 4.0]], [[4.0, -5.0, -5.0], [6.0, 0.0, -5.0]], [[-1.0, 
+1.0, -3.0], [-6.0, 0.0, -1.0]], [[5.0, -2.0, 3.0], [-3.0, -7.0, -1.0]], [[-7.0, -4.0, 6.0], [-5.0, 3.0, 5.0]]], [[[-4.0, 2.0, 
+5.0], [-5.0, 2.0, -7.0]], [[6.0, 0.0, -4.0], [0.0, -2.0, -1.0]], [[-3.0, 3.0, -5.0], [-6.0, -6.0, 5.0]], [[6.0, -2.0, -4.0], 
+[2.0, -5.0, -1.0]], [[-7.0, -1.0, 0.0], [0.0, 1.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, -2.0, -6.0], [-7.0, -2.0, -7.0]], [[0.0, 5.0, 3.0], [-1.0, 5.0, 2.0]], [[-3.0, 
+0.0, 5.0], [0.0, -2.0, 7.0]], [[-4.0, -3.0, 7.0], [-5.0, -6.0, 1.0]], [[4.0, 2.0, -7.0], [0.0, 6.0, -3.0]]], [[[4.0, -5.0, 
+-2.0], [-3.0, -7.0, 0.0]], [[-1.0, 0.0, -5.0], [-4.0, -1.0, 4.0]], [[6.0, 1.0, -3.0], [0.0, -4.0, -7.0]], [[3.0, -5.0, 1.0], 
+[0.0, -3.0, -7.0]], [[3.0, -6.0, -1.0], [-7.0, 5.0, 0.0]]], [[[7.0, 0.0, 2.0], [0.0, 0.0, -6.0]], [[7.0, 0.0, 3.0], [-5.0, 
+-7.0, 5.0]], [[-5.0, 3.0, 1.0], [5.0, 4.0, -6.0]], [[0.0, 3.0, -7.0], [-5.0, -2.0, 7.0]], [[1.0, 3.0, -2.0], [1.0, -5.0, 
+-5.0]]], [[[-1.0, -6.0, -7.0], [-7.0, 3.0, -1.0]], [[-3.0, -6.0, 6.0], [-5.0, 3.0, -5.0]], [[0.0, 3.0, -4.0], [6.0, -1.0, 
+7.0]], [[-7.0, -6.0, -1.0], [-6.0, -2.0, 0.0]], [[2.0, 0.0, 5.0], [4.0, -3.0, 1.0]]]]))
+      arg1=Data(numpy.array([[1.0, 0.0, 0.0], [-1.0, 3.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 7.0, 4.0], [1.0, 7.0, -4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[24.0, 26.0, -8.0, -6.0, -34.0], [3.0, 14.0, 2.0, -7.0, 0.0], [25.0, -12.0, 3.0, -15.0, 17.0], 
+[-7.0, -2.0, -5.0, -13.0, -10.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-46.0, 73.0, -7.0, -24.0, 20.0], [-115.0, -42.0, -35.0, -39.0, -33.0], [-3.0, -97.0, 
+107.0, -54.0, -6.0], [-47.0, 33.0, -24.0, -31.0, -11.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[0.0, 0.0, -1.0, 5.0, 0.0], [-1.0, 6.0, 5.0, 3.0, 6.0], [-6.0, -5.0, -1.0, 0.0, -2.0], [7.0, 2.0, 
+-3.0, -7.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -5.0, 3.0, -4.0, -2.0], [0.0, 4.0, 0.0, 2.0, 0.0], [-1.0, 0.0, 1.0, 2.0, 5.0], 
+[5.0, -3.0, 3.0, -7.0, 5.0]]))
+      arg1=Data(numpy.array([-6.0, -5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, -6.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0], [0.0, 0.0], [6.0, 5.0], [-30.0, -25.0], [0.0, 0.0]], [[6.0, 5.0], [-36.0, -30.0], 
+[-30.0, -25.0], [-18.0, -15.0], [-36.0, -30.0]], [[36.0, 30.0], [30.0, 25.0], [6.0, 5.0], [0.0, 0.0], [12.0, 10.0]], [[-42.0, 
+-35.0], [-12.0, -10.0], [18.0, 15.0], [42.0, 35.0], [-12.0, -10.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[42.0, 42.0], [30.0, 30.0], [-18.0, -18.0], [24.0, 24.0], [12.0, 12.0]], [[0.0, 0.0], 
+[-24.0, -24.0], [0.0, 0.0], [-12.0, -12.0], [0.0, 0.0]], [[6.0, 6.0], [0.0, 0.0], [-6.0, -6.0], [-12.0, -12.0], [-30.0, 
+-30.0]], [[-30.0, -30.0], [18.0, 18.0], [-18.0, -18.0], [42.0, 42.0], [-30.0, -30.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[7.0, -7.0, 7.0, 4.0], [-2.0, 7.0, -3.0, -7.0], [3.0, 4.0, 7.0, -4.0]], [[7.0, -1.0, 4.0, -4.0], 
-[-3.0, -2.0, 4.0, -7.0], [-6.0, -7.0, -5.0, -1.0]]], [[[6.0, 7.0, -2.0, -6.0], [0.0, 6.0, -6.0, 3.0], [5.0, 1.0, 3.0, -2.0]], 
-[[-2.0, 3.0, 6.0, 0.0], [7.0, -6.0, -6.0, 4.0], [-5.0, 4.0, -5.0, 7.0]]], [[[-2.0, 2.0, -6.0, 4.0], [0.0, -6.0, 0.0, 0.0], 
-[0.0, -7.0, 1.0, 0.0]], [[1.0, 3.0, -6.0, -2.0], [-3.0, -1.0, 6.0, -4.0], [-6.0, -3.0, 0.0, 4.0]]]]),self.functionspace)
-      arg1=Data(0.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, -0.0], 
-[-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0]], 
-[[-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0], 
-[0.0, -0.0, 0.0, 0.0]], [[0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]]]]),self.functionspace)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[5.0, 6.0, 5.0], [-3.0, 6.0, 0.0], [1.0, 2.0, 3.0], [-2.0, -1.0, -2.0], [-2.0, 2.0, -4.0]], 
+[[2.0, 0.0, 0.0], [-1.0, 2.0, -5.0], [-4.0, 2.0, 4.0], [5.0, -1.0, -5.0], [6.0, -5.0, -7.0]], [[7.0, -1.0, -2.0], [5.0, 2.0, 
+-1.0], [4.0, -6.0, 7.0], [0.0, -1.0, -5.0], [3.0, -4.0, -6.0]], [[3.0, -3.0, 0.0], [-6.0, 0.0, -2.0], [2.0, 0.0, 6.0], [0.0, 
+2.0, 6.0], [5.0, -6.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -5.0, 6.0], [4.0, 4.0, 2.0], [-1.0, 1.0, 5.0], [-5.0, -2.0, -1.0], [0.0, 5.0, 
+-6.0]], [[2.0, 0.0, 0.0], [0.0, -3.0, -5.0], [4.0, -7.0, 5.0], [-6.0, 7.0, 5.0], [-2.0, 5.0, -3.0]], [[-5.0, 3.0, 2.0], [-4.0, 
+0.0, -7.0], [-2.0, -7.0, 7.0], [7.0, -4.0, 1.0], [-7.0, -3.0, 3.0]], [[-5.0, 2.0, -2.0], [4.0, 4.0, 0.0], [6.0, -4.0, -2.0], 
+[4.0, -4.0, 6.0], [-3.0, 5.0, 1.0]]]))
+      arg1=Data(numpy.array([[1.0, -2.0], [-6.0, -5.0], [-2.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, 3.0], [4.0, 0.0], [7.0, 0.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-41.0, -20.0], [-39.0, -24.0], [-17.0, 0.0], [8.0, 1.0], [-6.0, -22.0]], [[2.0, -4.0], [-3.0, 
+-28.0], [-24.0, 14.0], [21.0, -25.0], [50.0, -15.0]], [[17.0, -17.0], [-5.0, -24.0], [26.0, 50.0], [16.0, -15.0], [39.0, 
+-10.0]], [[21.0, 9.0], [-2.0, 4.0], [-10.0, 20.0], [-24.0, 14.0], [47.0, 8.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[4.0, -9.0], [54.0, 12.0], [33.0, -3.0], [-45.0, -15.0], [-22.0, 0.0]], [[12.0, 6.0], 
+[-47.0, 0.0], [31.0, 12.0], [27.0, -18.0], [-13.0, -6.0]], [[-4.0, -15.0], [-73.0, -12.0], [9.0, -6.0], [33.0, 21.0], [-33.0, 
+-21.0]], [[-36.0, -15.0], [40.0, 12.0], [6.0, 18.0], [50.0, 12.0], [9.0, -9.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_constData_rank4_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[-6.0, -1.0, -7.0, 0.0], [-3.0, -6.0, -1.0, -2.0], [-3.0, -6.0, 0.0, 0.0]], [[-2.0, -7.0, 4.0, 
--4.0], [-6.0, 0.0, 0.0, 6.0], [4.0, -5.0, 1.0, -7.0]]], [[[-2.0, -6.0, -4.0, 0.0], [-4.0, -3.0, -5.0, 2.0], [-1.0, -1.0, 0.0, 
--2.0]], [[2.0, -1.0, -7.0, 3.0], [0.0, 5.0, -2.0, 0.0], [3.0, 1.0, 2.0, -1.0]]], [[[5.0, 2.0, -3.0, 6.0], [0.0, 1.0, 2.0, 5.0], 
-[-3.0, -7.0, -2.0, -6.0]], [[7.0, -4.0, -6.0, 3.0], [3.0, 3.0, 5.0, 5.0], [1.0, -5.0, -5.0, 3.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(7.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, 4.0, 28.0, -0.0], [12.0, 24.0, 4.0, 8.0], [12.0, 24.0, -0.0, -0.0]], [[8.0, 28.0, 
--16.0, 16.0], [24.0, -0.0, -0.0, -24.0], [-16.0, 20.0, -4.0, 28.0]]], [[[8.0, 24.0, 16.0, -0.0], [16.0, 12.0, 20.0, -8.0], 
-[4.0, 4.0, -0.0, 8.0]], [[-8.0, 4.0, 28.0, -12.0], [-0.0, -20.0, 8.0, -0.0], [-12.0, -4.0, -8.0, 4.0]]], [[[-20.0, -8.0, 12.0, 
--24.0], [-0.0, -4.0, -8.0, -20.0], [12.0, 28.0, 8.0, 24.0]], [[-28.0, 16.0, 24.0, -12.0], [-12.0, -12.0, -20.0, -20.0], [-4.0, 
-20.0, 20.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, -7.0, -49.0, 0.0], [-21.0, -42.0, -7.0, -14.0], [-21.0, -42.0, 0.0, 
-0.0]], [[-14.0, -49.0, 28.0, -28.0], [-42.0, 0.0, 0.0, 42.0], [28.0, -35.0, 7.0, -49.0]]], [[[-14.0, -42.0, -28.0, 0.0], 
-[-28.0, -21.0, -35.0, 14.0], [-7.0, -7.0, 0.0, -14.0]], [[14.0, -7.0, -49.0, 21.0], [0.0, 35.0, -14.0, 0.0], [21.0, 7.0, 14.0, 
--7.0]]], [[[35.0, 14.0, -21.0, 42.0], [0.0, 7.0, 14.0, 35.0], [-21.0, -49.0, -14.0, -42.0]], [[49.0, -28.0, -42.0, 21.0], 
-[21.0, 21.0, 35.0, 35.0], [7.0, -35.0, -35.0, 21.0]]]])
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-4.0, -7.0, -4.0], [-2.0, 0.0, -1.0]], [[1.0, 1.0, 3.0], [2.0, 2.0, 3.0]], [[-6.0, -2.0, 0.0], 
+[-3.0, -3.0, 7.0]], [[5.0, -6.0, 0.0], [-6.0, -4.0, 4.0]], [[2.0, 5.0, -6.0], [5.0, -7.0, 1.0]]], [[[5.0, 7.0, 5.0], [-6.0, 
+-7.0, 7.0]], [[4.0, 2.0, 4.0], [0.0, -5.0, -6.0]], [[0.0, -4.0, 6.0], [0.0, 3.0, 5.0]], [[2.0, 7.0, -5.0], [1.0, -7.0, 0.0]], 
+[[4.0, 1.0, 0.0], [6.0, -4.0, -2.0]]], [[[-2.0, -3.0, 6.0], [7.0, 0.0, 3.0]], [[0.0, 6.0, -7.0], [6.0, 5.0, -5.0]], [[-6.0, 
+1.0, 4.0], [-4.0, -1.0, 6.0]], [[-5.0, -5.0, 7.0], [-4.0, -5.0, 2.0]], [[6.0, 1.0, -5.0], [-3.0, 4.0, -2.0]]], [[[0.0, 7.0, 
+0.0], [0.0, 0.0, -5.0]], [[0.0, 0.0, 5.0], [-5.0, -7.0, -6.0]], [[-2.0, 5.0, 3.0], [-1.0, 0.0, -7.0]], [[1.0, -1.0, -6.0], 
+[0.0, 6.0, -4.0]], [[4.0, 0.0, 2.0], [-3.0, 4.0, -7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 3.0, -6.0], [-6.0, -1.0, 7.0]], [[0.0, -6.0, 2.0], [3.0, -5.0, 1.0]], [[0.0, 
+4.0, 1.0], [1.0, 1.0, 7.0]], [[5.0, -2.0, -2.0], [7.0, 7.0, 2.0]], [[3.0, -1.0, -1.0], [5.0, 7.0, 0.0]]], [[[-6.0, 0.0, 7.0], 
+[0.0, -2.0, -5.0]], [[5.0, -4.0, -3.0], [0.0, -1.0, 2.0]], [[-1.0, 7.0, 0.0], [0.0, 2.0, -3.0]], [[-1.0, 1.0, -7.0], [0.0, 0.0, 
+0.0]], [[0.0, 3.0, -2.0], [0.0, 1.0, -7.0]]], [[[1.0, -5.0, 0.0], [-5.0, -4.0, 2.0]], [[-3.0, 0.0, 0.0], [-3.0, -4.0, -4.0]], 
+[[3.0, 4.0, -1.0], [6.0, 6.0, -2.0]], [[-6.0, 3.0, 0.0], [-4.0, 4.0, -2.0]], [[6.0, -3.0, -1.0], [3.0, 0.0, -2.0]]], [[[-1.0, 
+5.0, 7.0], [0.0, -4.0, 3.0]], [[6.0, -4.0, -4.0], [2.0, 0.0, 7.0]], [[-4.0, 0.0, -1.0], [7.0, 3.0, -2.0]], [[0.0, 0.0, 5.0], 
+[0.0, 0.0, -6.0]], [[-1.0, 0.0, 5.0], [0.0, 6.0, 3.0]]]]))
+      arg1=Data(numpy.array([[[3.0, -1.0], [4.0, -6.0], [-5.0, 4.0]], [[0.0, -3.0], [-7.0, -4.0], [-7.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 0.0], [7.0, -4.0], [5.0, -4.0]], [[0.0, -3.0], [0.0, 6.0], [-4.0, 6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-13.0, 32.0], [-43.0, 3.0], [-54.0, 67.0], [-9.0, 81.0], [98.0, -39.0]], [[18.0, 47.0], [77.0, 
+-4.0], [-102.0, 56.0], [108.0, -39.0], [58.0, -20.0]], [[-69.0, 35.0], [59.0, -122.0], [-69.0, 56.0], [-49.0, 103.0], [33.0, 
+-47.0]], [[63.0, -62.0], [66.0, 39.0], [48.0, -41.0], [15.0, -59.0], [23.0, -31.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[5.0, 66.0], [-36.0, -17.0], [5.0, 25.0], [-62.0, 49.0], [-30.0, 35.0]], [[91.0, 
+-70.0], [-81.0, 34.0], [67.0, -34.0], [-22.0, 24.0], [39.0, -40.0]], [[-49.0, 23.0], [34.0, -39.0], [13.0, -6.0], [65.0, 12.0], 
+[-54.0, -5.0]], [[64.0, -54.0], [-112.0, 68.0], [27.0, -11.0], [49.0, -56.0], [19.0, 34.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(6.0)
-      arg1=6.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(36.0)+(1.-msk_ref)*numpy.array(36.0)
+   def test_generalTensorProduct_taggedData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[7.0, 2.0, -4.0, -6.0, 2.0], [2.0, 6.0, -5.0, -6.0, 2.0], [-1.0, 3.0, -7.0, -6.0, -5.0], [0.0, 
+-7.0, -3.0, 2.0, 1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 2.0, -3.0, -6.0, -4.0], [5.0, 0.0, 5.0, 6.0, 2.0], [0.0, 1.0, -7.0, 3.0, 7.0], 
+[4.0, 2.0, 0.0, 2.0, -7.0]]))
+      arg1=Data(numpy.array([[-7.0, 5.0, 0.0, 5.0, 7.0], [1.0, -6.0, -7.0, -7.0, -5.0], [2.0, 1.0, -3.0, 2.0, -3.0], [-7.0, 
+3.0, -6.0, -3.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -2.0, 3.0, 1.0, -3.0], [0.0, -4.0, 1.0, 0.0, 6.0], [5.0, -5.0, 0.0, -5.0, -6.0], 
+[4.0, 6.0, 7.0, 1.0, 7.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-49.0, 35.0, 0.0, 35.0, 49.0], [7.0, -42.0, -49.0, -49.0, -35.0], [14.0, 7.0, -21.0, 14.0, 
+-21.0], [-49.0, 21.0, -42.0, -21.0, 35.0]], [[-14.0, 10.0, 0.0, 10.0, 14.0], [2.0, -12.0, -14.0, -14.0, -10.0], [4.0, 2.0, 
+-6.0, 4.0, -6.0], [-14.0, 6.0, -12.0, -6.0, 10.0]], [[28.0, -20.0, 0.0, -20.0, -28.0], [-4.0, 24.0, 28.0, 28.0, 20.0], [-8.0, 
+-4.0, 12.0, -8.0, 12.0], [28.0, -12.0, 24.0, 12.0, -20.0]], [[42.0, -30.0, 0.0, -30.0, -42.0], [-6.0, 36.0, 42.0, 42.0, 30.0], 
+[-12.0, -6.0, 18.0, -12.0, 18.0], [42.0, -18.0, 36.0, 18.0, -30.0]], [[-14.0, 10.0, 0.0, 10.0, 14.0], [2.0, -12.0, -14.0, 
+-14.0, -10.0], [4.0, 2.0, -6.0, 4.0, -6.0], [-14.0, 6.0, -12.0, -6.0, 10.0]]], [[[-14.0, 10.0, 0.0, 10.0, 14.0], [2.0, -12.0, 
+-14.0, -14.0, -10.0], [4.0, 2.0, -6.0, 4.0, -6.0], [-14.0, 6.0, -12.0, -6.0, 10.0]], [[-42.0, 30.0, 0.0, 30.0, 42.0], [6.0, 
+-36.0, -42.0, -42.0, -30.0], [12.0, 6.0, -18.0, 12.0, -18.0], [-42.0, 18.0, -36.0, -18.0, 30.0]], [[35.0, -25.0, 0.0, -25.0, 
+-35.0], [-5.0, 30.0, 35.0, 35.0, 25.0], [-10.0, -5.0, 15.0, -10.0, 15.0], [35.0, -15.0, 30.0, 15.0, -25.0]], [[42.0, -30.0, 
+0.0, -30.0, -42.0], [-6.0, 36.0, 42.0, 42.0, 30.0], [-12.0, -6.0, 18.0, -12.0, 18.0], [42.0, -18.0, 36.0, 18.0, -30.0]], 
+[[-14.0, 10.0, 0.0, 10.0, 14.0], [2.0, -12.0, -14.0, -14.0, -10.0], [4.0, 2.0, -6.0, 4.0, -6.0], [-14.0, 6.0, -12.0, -6.0, 
+10.0]]], [[[7.0, -5.0, 0.0, -5.0, -7.0], [-1.0, 6.0, 7.0, 7.0, 5.0], [-2.0, -1.0, 3.0, -2.0, 3.0], [7.0, -3.0, 6.0, 3.0, 
+-5.0]], [[-21.0, 15.0, 0.0, 15.0, 21.0], [3.0, -18.0, -21.0, -21.0, -15.0], [6.0, 3.0, -9.0, 6.0, -9.0], [-21.0, 9.0, -18.0, 
+-9.0, 15.0]], [[49.0, -35.0, 0.0, -35.0, -49.0], [-7.0, 42.0, 49.0, 49.0, 35.0], [-14.0, -7.0, 21.0, -14.0, 21.0], [49.0, 
+-21.0, 42.0, 21.0, -35.0]], [[42.0, -30.0, 0.0, -30.0, -42.0], [-6.0, 36.0, 42.0, 42.0, 30.0], [-12.0, -6.0, 18.0, -12.0, 
+18.0], [42.0, -18.0, 36.0, 18.0, -30.0]], [[35.0, -25.0, 0.0, -25.0, -35.0], [-5.0, 30.0, 35.0, 35.0, 25.0], [-10.0, -5.0, 
+15.0, -10.0, 15.0], [35.0, -15.0, 30.0, 15.0, -25.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[49.0, -35.0, 0.0, -35.0, -49.0], [-7.0, 42.0, 49.0, 49.0, 35.0], [-14.0, -7.0, 21.0, 
+-14.0, 21.0], [49.0, -21.0, 42.0, 21.0, -35.0]], [[21.0, -15.0, 0.0, -15.0, -21.0], [-3.0, 18.0, 21.0, 21.0, 15.0], [-6.0, 
+-3.0, 9.0, -6.0, 9.0], [21.0, -9.0, 18.0, 9.0, -15.0]], [[-14.0, 10.0, 0.0, 10.0, 14.0], [2.0, -12.0, -14.0, -14.0, -10.0], 
+[4.0, 2.0, -6.0, 4.0, -6.0], [-14.0, 6.0, -12.0, -6.0, 10.0]], [[-7.0, 5.0, 0.0, 5.0, 7.0], [1.0, -6.0, -7.0, -7.0, -5.0], 
+[2.0, 1.0, -3.0, 2.0, -3.0], [-7.0, 3.0, -6.0, -3.0, 5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -12.0, 18.0, 6.0, -18.0], [0.0, -24.0, 6.0, 0.0, 36.0], [30.0, -30.0, 0.0, 
+-30.0, -36.0], [24.0, 36.0, 42.0, 6.0, 42.0]], [[0.0, -4.0, 6.0, 2.0, -6.0], [0.0, -8.0, 2.0, 0.0, 12.0], [10.0, -10.0, 0.0, 
+-10.0, -12.0], [8.0, 12.0, 14.0, 2.0, 14.0]], [[0.0, 6.0, -9.0, -3.0, 9.0], [0.0, 12.0, -3.0, 0.0, -18.0], [-15.0, 15.0, 0.0, 
+15.0, 18.0], [-12.0, -18.0, -21.0, -3.0, -21.0]], [[0.0, 12.0, -18.0, -6.0, 18.0], [0.0, 24.0, -6.0, 0.0, -36.0], [-30.0, 30.0, 
+0.0, 30.0, 36.0], [-24.0, -36.0, -42.0, -6.0, -42.0]], [[0.0, 8.0, -12.0, -4.0, 12.0], [0.0, 16.0, -4.0, 0.0, -24.0], [-20.0, 
+20.0, 0.0, 20.0, 24.0], [-16.0, -24.0, -28.0, -4.0, -28.0]]], [[[0.0, -10.0, 15.0, 5.0, -15.0], [0.0, -20.0, 5.0, 0.0, 30.0], 
+[25.0, -25.0, 0.0, -25.0, -30.0], [20.0, 30.0, 35.0, 5.0, 35.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -10.0, 15.0, 5.0, -15.0], [0.0, -20.0, 5.0, 0.0, 30.0], [25.0, -25.0, 
+0.0, -25.0, -30.0], [20.0, 30.0, 35.0, 5.0, 35.0]], [[0.0, -12.0, 18.0, 6.0, -18.0], [0.0, -24.0, 6.0, 0.0, 36.0], [30.0, 
+-30.0, 0.0, -30.0, -36.0], [24.0, 36.0, 42.0, 6.0, 42.0]], [[0.0, -4.0, 6.0, 2.0, -6.0], [0.0, -8.0, 2.0, 0.0, 12.0], [10.0, 
+-10.0, 0.0, -10.0, -12.0], [8.0, 12.0, 14.0, 2.0, 14.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -2.0, 3.0, 1.0, -3.0], [0.0, -4.0, 1.0, 0.0, 6.0], [5.0, -5.0, 0.0, -5.0, 
+-6.0], [4.0, 6.0, 7.0, 1.0, 7.0]], [[0.0, 14.0, -21.0, -7.0, 21.0], [0.0, 28.0, -7.0, 0.0, -42.0], [-35.0, 35.0, 0.0, 35.0, 
+42.0], [-28.0, -42.0, -49.0, -7.0, -49.0]], [[0.0, -6.0, 9.0, 3.0, -9.0], [0.0, -12.0, 3.0, 0.0, 18.0], [15.0, -15.0, 0.0, 
+-15.0, -18.0], [12.0, 18.0, 21.0, 3.0, 21.0]], [[0.0, -14.0, 21.0, 7.0, -21.0], [0.0, -28.0, 7.0, 0.0, 42.0], [35.0, -35.0, 
+0.0, -35.0, -42.0], [28.0, 42.0, 49.0, 7.0, 49.0]]], [[[0.0, -8.0, 12.0, 4.0, -12.0], [0.0, -16.0, 4.0, 0.0, 24.0], [20.0, 
+-20.0, 0.0, -20.0, -24.0], [16.0, 24.0, 28.0, 4.0, 28.0]], [[0.0, -4.0, 6.0, 2.0, -6.0], [0.0, -8.0, 2.0, 0.0, 12.0], [10.0, 
+-10.0, 0.0, -10.0, -12.0], [8.0, 12.0, 14.0, 2.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -4.0, 6.0, 2.0, -6.0], [0.0, -8.0, 2.0, 0.0, 12.0], [10.0, -10.0, 0.0, 
+-10.0, -12.0], [8.0, 12.0, 14.0, 2.0, 14.0]], [[0.0, 14.0, -21.0, -7.0, 21.0], [0.0, 28.0, -7.0, 0.0, -42.0], [-35.0, 35.0, 
+0.0, 35.0, 42.0], [-28.0, -42.0, -49.0, -7.0, -49.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(2.0)
-      arg1=numpy.array(-7.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(35.0)+(1.-msk_ref)*numpy.array(-14.0)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -7.0, -6.0], [-1.0, -4.0, -3.0], [0.0, 6.0, -5.0], [4.0, 1.0, -7.0], [3.0, -5.0, 0.0]], 
+[[6.0, -7.0, -3.0], [6.0, 1.0, 0.0], [5.0, 5.0, -3.0], [4.0, 6.0, -1.0], [4.0, -5.0, -2.0]], [[-1.0, -3.0, 2.0], [5.0, 0.0, 
+3.0], [0.0, 4.0, -4.0], [0.0, -1.0, 7.0], [6.0, -3.0, 5.0]], [[-7.0, 1.0, -1.0], [0.0, -3.0, 0.0], [3.0, -2.0, -4.0], [-5.0, 
+-3.0, -1.0], [0.0, 6.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-7.0, -1.0, -7.0], [4.0, -6.0, -5.0], [-5.0, 0.0, -4.0], [-2.0, -3.0, 2.0], [2.0, 
+-1.0, 4.0]], [[4.0, 6.0, 6.0], [-5.0, 4.0, 4.0], [5.0, -4.0, -2.0], [7.0, 2.0, -3.0], [7.0, -4.0, -2.0]], [[-1.0, -4.0, -4.0], 
+[0.0, 4.0, -4.0], [-7.0, -5.0, 4.0], [-5.0, -5.0, 5.0], [-2.0, 2.0, -6.0]], [[0.0, -3.0, 3.0], [1.0, 6.0, 2.0], [-6.0, 6.0, 
+1.0], [3.0, -6.0, 6.0], [0.0, -6.0, 6.0]]]))
+      arg1=Data(numpy.array([[[-6.0, -6.0, 6.0, 4.0, -7.0], [0.0, 1.0, 4.0, -5.0, 0.0], [3.0, -5.0, 3.0, 2.0, 4.0], [2.0, 0.0, 
+0.0, 6.0, -6.0]], [[-2.0, 3.0, -1.0, -5.0, -5.0], [7.0, 0.0, 3.0, 6.0, -3.0], [-4.0, -3.0, -2.0, -6.0, 0.0], [-3.0, -3.0, -3.0, 
+6.0, 4.0]], [[-3.0, -6.0, 6.0, -3.0, -5.0], [-3.0, -6.0, 5.0, 3.0, 4.0], [6.0, 1.0, 0.0, 5.0, -3.0], [-4.0, -6.0, -5.0, 3.0, 
+-5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, -5.0, 0.0, 3.0, 3.0], [1.0, -3.0, -2.0, -5.0, 2.0], [-4.0, 5.0, -1.0, 6.0, 
+6.0], [6.0, 0.0, 3.0, 0.0, -5.0]], [[-1.0, -6.0, -3.0, -4.0, 3.0], [-6.0, 6.0, 1.0, 5.0, -7.0], [0.0, 0.0, -2.0, 0.0, -4.0], 
+[3.0, -4.0, 5.0, 0.0, 4.0]], [[4.0, 0.0, -3.0, -5.0, 4.0], [-4.0, -2.0, -5.0, 0.0, -4.0], [4.0, 1.0, -7.0, -6.0, -1.0], [3.0, 
+3.0, -1.0, 1.0, -4.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[32.0, 15.0, -29.0, 53.0, 65.0], [-31.0, 36.0, -51.0, -60.0, -3.0], [-8.0, 15.0, 14.0, 12.0, 
+18.0], [45.0, 57.0, 51.0, -60.0, 2.0]], [[23.0, 12.0, -20.0, 25.0, 42.0], [-19.0, 17.0, -31.0, -28.0, 0.0], [-5.0, 14.0, 5.0, 
+7.0, 5.0], [22.0, 30.0, 27.0, -39.0, 5.0]], [[3.0, 48.0, -36.0, -15.0, -5.0], [57.0, 30.0, -7.0, 21.0, -38.0], [-54.0, -23.0, 
+-12.0, -61.0, 15.0], [2.0, 12.0, 7.0, 21.0, 49.0]], [[-5.0, 21.0, -19.0, 32.0, 2.0], [28.0, 46.0, -16.0, -35.0, -31.0], [-34.0, 
+-30.0, 10.0, -33.0, 37.0], [33.0, 39.0, 32.0, 9.0, 15.0]], [[-8.0, -33.0, 23.0, 37.0, 4.0], [-35.0, 3.0, -3.0, -45.0, 15.0], 
+[29.0, 0.0, 19.0, 36.0, 12.0], [21.0, 15.0, 15.0, -12.0, -38.0]]], [[[-13.0, -39.0, 25.0, 68.0, 8.0], [-40.0, 24.0, -12.0, 
+-81.0, 9.0], [28.0, -12.0, 32.0, 39.0, 33.0], [45.0, 39.0, 36.0, -15.0, -49.0]], [[-38.0, -33.0, 35.0, 19.0, -47.0], [7.0, 6.0, 
+27.0, -24.0, -3.0], [14.0, -33.0, 16.0, 6.0, 24.0], [9.0, -3.0, -3.0, 42.0, -32.0]], [[-31.0, 3.0, 7.0, 4.0, -45.0], [44.0, 
+23.0, 20.0, -4.0, -27.0], [-23.0, -43.0, 5.0, -35.0, 29.0], [7.0, 3.0, 0.0, 51.0, 5.0]], [[-33.0, 0.0, 12.0, -11.0, -53.0], 
+[45.0, 10.0, 29.0, 13.0, -22.0], [-18.0, -39.0, 0.0, -33.0, 19.0], [-6.0, -12.0, -13.0, 57.0, 5.0]], [[-8.0, -27.0, 17.0, 47.0, 
+7.0], [-29.0, 16.0, -9.0, -56.0, 7.0], [20.0, -7.0, 22.0, 28.0, 22.0], [31.0, 27.0, 25.0, -12.0, -34.0]]], [[[6.0, -15.0, 9.0, 
+5.0, 12.0], [-27.0, -13.0, -3.0, -7.0, 17.0], [21.0, 16.0, 3.0, 26.0, -10.0], [-1.0, -3.0, -1.0, -18.0, -16.0]], [[-39.0, 
+-48.0, 48.0, 11.0, -50.0], [-9.0, -13.0, 35.0, -16.0, 12.0], [33.0, -22.0, 15.0, 25.0, 11.0], [-2.0, -18.0, -15.0, 39.0, 
+-45.0]], [[4.0, 36.0, -28.0, -8.0, 0.0], [40.0, 24.0, -8.0, 12.0, -28.0], [-40.0, -16.0, -8.0, -44.0, 12.0], [4.0, 12.0, 8.0, 
+12.0, 36.0]], [[-19.0, -45.0, 43.0, -16.0, -30.0], [-28.0, -42.0, 32.0, 15.0, 31.0], [46.0, 10.0, 2.0, 41.0, -21.0], [-25.0, 
+-39.0, -32.0, 15.0, -39.0]], [[-45.0, -75.0, 69.0, 24.0, -52.0], [-36.0, -24.0, 40.0, -33.0, 29.0], [60.0, -16.0, 24.0, 55.0, 
+9.0], [1.0, -21.0, -16.0, 33.0, -73.0]]], [[[43.0, 51.0, -49.0, -30.0, 49.0], [10.0, -1.0, -30.0, 38.0, -7.0], [-31.0, 31.0, 
+-23.0, -25.0, -25.0], [-13.0, 3.0, 2.0, -39.0, 51.0]], [[6.0, -9.0, 3.0, 15.0, 15.0], [-21.0, 0.0, -9.0, -18.0, 9.0], [12.0, 
+9.0, 6.0, 18.0, 0.0], [9.0, 9.0, 9.0, -18.0, -12.0]], [[-2.0, 0.0, -4.0, 34.0, 9.0], [-2.0, 27.0, -14.0, -39.0, -10.0], [-7.0, 
+-13.0, 13.0, -2.0, 24.0], [28.0, 30.0, 26.0, -6.0, -6.0]], [[39.0, 27.0, -33.0, -2.0, 55.0], [-18.0, 1.0, -34.0, 4.0, 5.0], 
+[-9.0, 33.0, -9.0, 3.0, -17.0], [3.0, 15.0, 14.0, -51.0, 23.0]], [[-6.0, 30.0, -18.0, -24.0, -20.0], [48.0, 12.0, 8.0, 30.0, 
+-26.0], [-36.0, -20.0, -12.0, -46.0, 6.0], [-10.0, -6.0, -8.0, 30.0, 34.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-76.0, 41.0, 24.0, 18.0, -52.0], [27.0, 29.0, 48.0, 30.0, 21.0], [0.0, -42.0, 58.0, 
+0.0, -31.0], [-66.0, -17.0, -19.0, -7.0, 59.0]], [[14.0, 16.0, 33.0, 61.0, -26.0], [60.0, -38.0, 11.0, -50.0, 70.0], [-36.0, 
+15.0, 43.0, 54.0, 53.0], [-9.0, 9.0, -13.0, -5.0, -24.0]], [[-51.0, 25.0, 12.0, 5.0, -31.0], [11.0, 23.0, 30.0, 25.0, 6.0], 
+[4.0, -29.0, 33.0, -6.0, -26.0], [-42.0, -12.0, -11.0, -4.0, 41.0]], [[-3.0, 28.0, 3.0, -4.0, -7.0], [8.0, -16.0, -9.0, -5.0, 
+9.0], [16.0, -8.0, -6.0, -24.0, -2.0], [-15.0, 18.0, -23.0, 2.0, -10.0]], [[31.0, -4.0, -9.0, -10.0, 19.0], [-8.0, -20.0, 
+-25.0, -15.0, -5.0], [8.0, 14.0, -28.0, -12.0, 12.0], [21.0, 16.0, -3.0, 4.0, -30.0]]], [[[46.0, -56.0, -36.0, -42.0, 54.0], 
+[-56.0, 12.0, -32.0, 10.0, -58.0], [8.0, 26.0, -58.0, -12.0, -6.0], [60.0, -6.0, 36.0, 6.0, -20.0]], [[-23.0, 1.0, -24.0, 
+-51.0, 13.0], [-45.0, 31.0, -6.0, 45.0, -54.0], [36.0, -21.0, -31.0, -54.0, -50.0], [-6.0, -4.0, 1.0, 4.0, 25.0]], [[31.0, 
+-1.0, 18.0, 41.0, -5.0], [37.0, -35.0, -4.0, -45.0, 46.0], [-28.0, 23.0, 17.0, 42.0, 48.0], [12.0, 10.0, -3.0, -2.0, -33.0]], 
+[[35.0, -47.0, 3.0, 28.0, 15.0], [7.0, -3.0, 3.0, -25.0, 12.0], [-40.0, 32.0, 10.0, 60.0, 37.0], [39.0, -17.0, 34.0, -3.0, 
+-15.0]], [[45.0, -11.0, 18.0, 47.0, 1.0], [39.0, -41.0, -8.0, -55.0, 50.0], [-36.0, 33.0, 15.0, 54.0, 60.0], [24.0, 10.0, 3.0, 
+-2.0, -43.0]]], [[[-19.0, 29.0, 24.0, 33.0, -31.0], [39.0, -13.0, 18.0, -15.0, 42.0], [-12.0, -9.0, 37.0, 18.0, 14.0], [-30.0, 
+4.0, -19.0, -4.0, 5.0]], [[-20.0, -24.0, 0.0, 4.0, -4.0], [-8.0, 32.0, 24.0, 20.0, -12.0], [-16.0, -4.0, 20.0, 24.0, -12.0], 
+[0.0, -28.0, 24.0, -4.0, 32.0]], [[-28.0, 65.0, 3.0, -21.0, -20.0], [7.0, -17.0, -11.0, 10.0, 5.0], [44.0, -31.0, -11.0, -66.0, 
+-26.0], [-45.0, 32.0, -50.0, 4.0, -1.0]], [[-10.0, 55.0, 0.0, -20.0, -10.0], [5.0, -25.0, -20.0, 0.0, 5.0], [40.0, -20.0, 
+-20.0, -60.0, -15.0], [-30.0, 35.0, -45.0, 5.0, -15.0]], [[-40.0, -2.0, 12.0, 16.0, -24.0], [10.0, 30.0, 36.0, 20.0, 6.0], 
+[-16.0, -16.0, 40.0, 24.0, -14.0], [-24.0, -26.0, 10.0, -6.0, 42.0]]], [[[15.0, 18.0, 0.0, -3.0, 3.0], [6.0, -24.0, -18.0, 
+-15.0, 9.0], [12.0, 3.0, -15.0, -18.0, 9.0], [0.0, 21.0, -18.0, 3.0, -24.0]], [[9.0, -41.0, -24.0, -31.0, 29.0], [-43.0, 29.0, 
+-6.0, 25.0, -48.0], [4.0, 7.0, -27.0, -6.0, -20.0], [30.0, -18.0, 31.0, 2.0, 11.0]], [[-44.0, -6.0, -21.0, -47.0, 4.0], [-46.0, 
+52.0, 13.0, 60.0, -58.0], [28.0, -29.0, -13.0, -42.0, -61.0], [-15.0, -21.0, 11.0, 1.0, 50.0]], [[51.0, 21.0, 0.0, 3.0, 15.0], 
+[15.0, -57.0, -42.0, -45.0, 24.0], [12.0, 21.0, -33.0, -18.0, 36.0], [18.0, 42.0, -27.0, 6.0, -63.0]], [[30.0, 36.0, 0.0, -6.0, 
+6.0], [12.0, -48.0, -36.0, -30.0, 18.0], [24.0, 6.0, -30.0, -36.0, 18.0], [0.0, 42.0, -36.0, 6.0, -48.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-7.0, 4.0, -1.0])+(1.-msk_arg0)*numpy.array([-1.0, -3.0, -3.0])
-      arg1=numpy.array([7.0, 1.0, 6.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-51.0)+(1.-msk_ref)*numpy.array(-28.0)
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-7.0, 7.0, -7.0], [-6.0, 2.0, 0.0]], [[1.0, 0.0, -5.0], [2.0, -4.0, 1.0]], [[4.0, -2.0, -3.0], 
+[-7.0, 2.0, -7.0]], [[2.0, 3.0, -2.0], [1.0, -3.0, 6.0]], [[1.0, 7.0, 7.0], [-7.0, -5.0, -1.0]]], [[[-4.0, 7.0, -7.0], [4.0, 
+-6.0, -3.0]], [[4.0, 0.0, 4.0], [2.0, 2.0, -2.0]], [[-6.0, 5.0, 0.0], [7.0, 7.0, 2.0]], [[-1.0, 1.0, 2.0], [7.0, -5.0, 2.0]], 
+[[-7.0, 6.0, 3.0], [1.0, -6.0, -5.0]]], [[[5.0, 7.0, 0.0], [-7.0, -4.0, -3.0]], [[-3.0, -1.0, 7.0], [-3.0, -1.0, -3.0]], [[2.0, 
+-4.0, 7.0], [-6.0, 6.0, -5.0]], [[5.0, -1.0, -2.0], [5.0, 6.0, -3.0]], [[0.0, 6.0, -6.0], [1.0, 6.0, -4.0]]], [[[-3.0, 2.0, 
+5.0], [3.0, 6.0, -2.0]], [[4.0, -4.0, -5.0], [-7.0, -2.0, 1.0]], [[2.0, 0.0, 1.0], [-2.0, 0.0, 6.0]], [[-5.0, 1.0, -3.0], 
+[-1.0, 3.0, 4.0]], [[-4.0, -6.0, 3.0], [6.0, 2.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 2.0, 1.0], [5.0, 1.0, -1.0]], [[0.0, -7.0, 0.0], [1.0, 1.0, -4.0]], [[-6.0, 
+-1.0, -4.0], [0.0, 0.0, -4.0]], [[0.0, -4.0, 4.0], [2.0, -5.0, -4.0]], [[-3.0, 1.0, 4.0], [3.0, -1.0, -6.0]]], [[[6.0, 7.0, 
+-5.0], [-3.0, -7.0, 3.0]], [[1.0, 3.0, -3.0], [0.0, -2.0, 6.0]], [[3.0, 6.0, 0.0], [0.0, -2.0, -3.0]], [[2.0, -5.0, -2.0], 
+[3.0, 4.0, 0.0]], [[-7.0, -7.0, -4.0], [0.0, 6.0, 0.0]]], [[[3.0, -5.0, -2.0], [3.0, 7.0, 7.0]], [[-2.0, -1.0, 0.0], [-1.0, 
+6.0, 0.0]], [[1.0, 1.0, 7.0], [4.0, 1.0, 1.0]], [[2.0, -4.0, -4.0], [4.0, 0.0, 4.0]], [[0.0, 4.0, 5.0], [-2.0, 2.0, 0.0]]], 
+[[[0.0, 1.0, 1.0], [-7.0, 5.0, -4.0]], [[-6.0, -5.0, 6.0], [2.0, -4.0, -5.0]], [[3.0, -7.0, -5.0], [-6.0, -2.0, 1.0]], [[-3.0, 
+-5.0, -5.0], [3.0, 4.0, -1.0]], [[5.0, 5.0, -2.0], [1.0, 4.0, 6.0]]]]))
+      arg1=Data(numpy.array([[[[-2.0, 0.0, -3.0, 6.0, -3.0], [-3.0, 3.0, 1.0, 6.0, -3.0], [-3.0, 6.0, -2.0, 2.0, -6.0], [-5.0, 
+-7.0, -4.0, 4.0, 0.0]], [[-6.0, 7.0, 5.0, -1.0, -5.0], [3.0, -4.0, 0.0, -2.0, -3.0], [5.0, -4.0, 4.0, -3.0, -6.0], [-2.0, 1.0, 
+-1.0, -2.0, 1.0]], [[0.0, 0.0, 6.0, 0.0, -1.0], [3.0, 7.0, 3.0, 0.0, -3.0], [-7.0, 5.0, 2.0, -7.0, -6.0], [-5.0, -1.0, 0.0, 
+1.0, 4.0]]], [[[1.0, 7.0, 4.0, -7.0, 7.0], [-1.0, -3.0, 3.0, 2.0, -2.0], [-4.0, -3.0, 1.0, -7.0, 1.0], [-2.0, -1.0, 7.0, 1.0, 
+3.0]], [[-5.0, 0.0, 5.0, 6.0, 7.0], [3.0, 4.0, 4.0, 0.0, 1.0], [5.0, 2.0, 0.0, 4.0, 4.0], [4.0, 0.0, -3.0, 0.0, -6.0]], [[-6.0, 
+-3.0, -6.0, 2.0, 3.0], [5.0, 1.0, 2.0, -1.0, 1.0], [-1.0, 5.0, -6.0, -3.0, 5.0], [7.0, -3.0, -1.0, 0.0, 
+7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -7.0, 5.0, 2.0, -7.0], [2.0, 0.0, -2.0, 6.0, 7.0], [-6.0, 0.0, -5.0, 7.0, 
+-4.0], [2.0, -7.0, 4.0, 1.0, -3.0]], [[-1.0, 4.0, 0.0, -6.0, -3.0], [3.0, 2.0, 2.0, 1.0, 6.0], [0.0, -2.0, 5.0, 0.0, -3.0], 
+[-6.0, 2.0, 1.0, 1.0, 6.0]], [[-2.0, -5.0, 0.0, 1.0, -3.0], [2.0, 7.0, 7.0, 5.0, 4.0], [4.0, -3.0, -4.0, -7.0, -1.0], [7.0, 
+3.0, 3.0, -3.0, -5.0]]], [[[6.0, -4.0, 6.0, 0.0, 0.0], [-4.0, 0.0, -3.0, -4.0, 4.0], [1.0, -7.0, -4.0, 7.0, -2.0], [7.0, -6.0, 
+0.0, -5.0, -3.0]], [[7.0, 4.0, 4.0, -4.0, -4.0], [-2.0, -1.0, 2.0, -7.0, -6.0], [6.0, 5.0, 6.0, -1.0, -3.0], [7.0, -5.0, -5.0, 
+7.0, 4.0]], [[-1.0, -2.0, 7.0, -4.0, 7.0], [3.0, 5.0, -3.0, -6.0, 3.0], [2.0, -6.0, 0.0, 6.0, 0.0], [0.0, 7.0, 7.0, 4.0, 
+6.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-44.0, 7.0, 0.0, 5.0, -35.0], [33.0, -72.0, -38.0, -68.0, 35.0], [139.0, -83.0, 22.0, 64.0, 
+44.0], [76.0, 69.0, -27.0, -55.0, -51.0]], [[14.0, 11.0, -51.0, -30.0, -9.0], [-27.0, -53.0, -22.0, 9.0, 5.0], [3.0, -28.0, 
+-16.0, 4.0, 15.0], [7.0, -7.0, 21.0, 1.0, 17.0]], [[29.0, -42.0, -16.0, 73.0, -55.0], [-49.0, 21.0, -32.0, 21.0, 12.0], [44.0, 
+7.0, 13.0, 113.0, -28.0], [-28.0, 1.0, -62.0, 10.0, -96.0]], [[-42.0, 10.0, -50.0, -4.0, -15.0], [17.0, -29.0, -1.0, 2.0, 
+-8.0], [-2.0, 11.0, -31.0, -28.0, 1.0], [22.0, -28.0, -1.0, 1.0, 58.0]], [[-20.0, 3.0, 27.0, 16.0, -132.0], [26.0, 24.0, -21.0, 
+-21.0, -37.0], [-13.0, 19.0, 39.0, -36.0, -122.0], [-67.0, 3.0, -44.0, -10.0, 37.0]]], [[[18.0, 86.0, 9.0, -101.0, -39.0], 
+[-25.0, -128.0, -43.0, -27.0, -5.0], [53.0, -126.0, 44.0, -23.0, -11.0], [-12.0, 47.0, 58.0, -33.0, 6.0]], [[-4.0, 20.0, 42.0, 
+18.0, 6.0], [-6.0, 40.0, 26.0, 30.0, -28.0], [-36.0, 32.0, 14.0, -20.0, -48.0], [-50.0, -28.0, -6.0, 22.0, -4.0]], [[-58.0, 
+78.0, 94.0, -44.0, 97.0], [57.0, -29.0, 47.0, -34.0, -2.0], [48.0, -53.0, 27.0, -54.0, 51.0], [48.0, 34.0, 45.0, -27.0, -2.0]], 
+[[16.0, 50.0, 11.0, -82.0, 16.0], [0.0, -32.0, 10.0, 4.0, -23.0], [-61.0, -21.0, 5.0, -94.0, -15.0], [-27.0, -7.0, 65.0, 3.0, 
+74.0]], [[39.0, 64.0, 73.0, -101.0, -62.0], [4.0, -56.0, -29.0, -47.0, -19.0], [1.0, -91.0, 75.0, -69.0, -60.0], [-53.0, 66.0, 
+52.0, -36.0, 22.0]]], [[[-21.0, 9.0, -10.0, 42.0, -136.0], [-14.0, -11.0, -38.0, 5.0, -29.0], [31.0, 0.0, 29.0, 31.0, -110.0], 
+[-62.0, -12.0, -61.0, -1.0, -11.0]], [[32.0, -19.0, 47.0, -8.0, -30.0], [12.0, 46.0, -1.0, -19.0, -7.0], [-35.0, 13.0, 31.0, 
+-26.0, -40.0], [-37.0, 25.0, -2.0, -6.0, 3.0]], [[14.0, -55.0, 52.0, 84.0, -8.0], [2.0, 108.0, 19.0, 13.0, -2.0], [-16.0, 68.0, 
+18.0, 48.0, -37.0], [-36.0, -4.0, -59.0, 17.0, -65.0]], [[-11.0, 37.0, 36.0, 26.0, 60.0], [-26.0, 11.0, 32.0, 45.0, -13.0], 
+[7.0, 6.0, 5.0, 25.0, 2.0], [-20.0, -30.0, 1.0, 25.0, -51.0]], [[-41.0, 61.0, 52.0, 15.0, 13.0], [-3.0, -49.0, 1.0, -6.0, 0.0], 
+[102.0, -65.0, 37.0, 53.0, 5.0], [12.0, 23.0, -13.0, -17.0, -79.0]]], [[[-21.0, 41.0, 103.0, -9.0, 51.0], [35.0, 31.0, 41.0, 
+-14.0, -14.0], [4.0, -8.0, 39.0, -38.0, -7.0], [-10.0, 21.0, 15.0, -8.0, -19.0]], [[13.0, -80.0, -106.0, 67.0, -47.0], [-33.0, 
+7.0, -38.0, 17.0, 28.0], [20.0, 37.0, -47.0, 93.0, 20.0], [26.0, -23.0, -56.0, 12.0, -26.0]], [[-42.0, -32.0, -44.0, 38.0, 
+-3.0], [29.0, 25.0, 11.0, 2.0, 1.0], [-11.0, 53.0, -40.0, -7.0, 10.0], [31.0, -31.0, -28.0, 7.0, 40.0]], [[-36.0, -12.0, -11.0, 
+2.0, 39.0], [39.0, -21.0, 3.0, -38.0, 30.0], [56.0, -20.0, -17.0, 15.0, 73.0], [80.0, 28.0, -1.0, -26.0, -4.0]], [[-2.0, -21.0, 
+-8.0, -34.0, 116.0], [38.0, 30.0, 45.0, -7.0, 18.0], [-60.0, 36.0, -46.0, -66.0, 91.0], [62.0, -8.0, 51.0, 5.0, 
+61.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[34.0, -4.0, 22.0, -13.0, -13.0], [-19.0, 5.0, 3.0, -20.0, 20.0], [19.0, -31.0, -3.0, 
+14.0, -16.0], [35.0, -28.0, -11.0, -24.0, -7.0]], [[24.0, -20.0, -18.0, 54.0, -11.0], [-39.0, -35.0, -3.0, 6.0, -56.0], [-1.0, 
+36.0, -33.0, -18.0, 16.0], [56.0, -53.0, -40.0, -21.0, -65.0]], [[13.0, 66.0, -58.0, 6.0, 29.0], [-35.0, -50.0, -6.0, -33.0, 
+-76.0], [12.0, 38.0, 41.0, -38.0, 31.0], [-34.0, 0.0, -65.0, -11.0, 8.0]], [[-23.0, -56.0, -36.0, 64.0, -8.0], [-14.0, 5.0, 
+16.0, 67.0, 18.0], [-20.0, -19.0, -74.0, -33.0, 19.0], [31.0, -11.0, 5.0, -77.0, -94.0]], [[8.0, 1.0, -43.0, 20.0, -32.0], 
+[-23.0, 1.0, 43.0, 34.0, 1.0], [19.0, -4.0, -14.0, -63.0, 2.0], [30.0, -20.0, -36.0, -60.0, -54.0]]], [[[-67.0, -11.0, 5.0, 
+-19.0, 1.0], [58.0, 1.0, -47.0, 61.0, 103.0], [-95.0, -31.0, -5.0, 81.0, -13.0], [-135.0, 31.0, 72.0, 6.0, 48.0]], [[-17.0, 
+0.0, 39.0, -35.0, 43.0], [27.0, 17.0, -39.0, -28.0, 43.0], [-18.0, -43.0, 10.0, 66.0, -4.0], [-51.0, 42.0, 50.0, 23.0, 58.0]], 
+[[-17.0, 1.0, -14.0, -10.0, -52.0], [19.0, -1.0, 11.0, 56.0, 60.0], [-36.0, -4.0, 3.0, 5.0, -24.0], [-44.0, -20.0, 7.0, -17.0, 
+1.0]], [[55.0, -20.0, 44.0, 16.0, -9.0], [-35.0, -28.0, -29.0, -43.0, -36.0], [7.0, 15.0, -15.0, 45.0, -9.0], [69.0, -68.0, 
+-23.0, 16.0, -19.0]], [[57.0, 65.0, -11.0, 0.0, 58.0], [-55.0, -48.0, -16.0, -111.0, -143.0], [62.0, 56.0, 52.0, -27.0, 35.0], 
+[42.0, -7.0, -77.0, 40.0, 23.0]]], [[[69.0, -29.0, 110.0, -22.0, 21.0], [-18.0, 4.0, -46.0, -100.0, -26.0], [33.0, -12.0, -2.0, 
+91.0, -22.0], [92.0, -41.0, 15.0, 66.0, 32.0]], [[37.0, 38.0, 8.0, -22.0, -7.0], [-15.0, -8.0, 17.0, -51.0, -60.0], [47.0, 
+39.0, 45.0, -27.0, -5.0], [37.0, -12.0, -39.0, 44.0, 27.0]], [[15.0, -52.0, 40.0, -5.0, -28.0], [4.0, 55.0, 36.0, 13.0, 54.0], 
+[34.0, -52.0, -38.0, -9.0, -25.0], [80.0, -6.0, 28.0, -28.0, -34.0]], [[32.0, -34.0, 62.0, 8.0, 38.0], [-20.0, -16.0, -64.0, 
+-52.0, 2.0], [-16.0, -32.0, -30.0, 94.0, 0.0], [28.0, -30.0, 20.0, 6.0, 2.0]], [[-12.0, 7.0, -4.0, -27.0, -35.0], [26.0, 41.0, 
+53.0, 23.0, 24.0], [30.0, 1.0, 20.0, -51.0, -19.0], [11.0, 25.0, 9.0, 13.0, 13.0]]], [[[-6.0, 55.0, -50.0, -9.0, -54.0], [11.0, 
+-16.0, 52.0, 23.0, -60.0], [19.0, 93.0, 59.0, -85.0, -5.0], [-13.0, -6.0, -49.0, 52.0, 18.0]], [[-18.0, -22.0, -69.0, 60.0, 
+20.0], [-30.0, 11.0, 45.0, 39.0, -31.0], [28.0, -12.0, -51.0, -96.0, 41.0], [46.0, 23.0, -26.0, -87.0, -94.0]], [[-34.0, -10.0, 
+-22.0, 47.0, 30.0], [6.0, -42.0, -44.0, 18.0, -50.0], [-54.0, 55.0, -18.0, 22.0, 32.0], [-43.0, 3.0, 7.0, 31.0, -10.0]], 
+[[62.0, 32.0, 12.0, 7.0, 28.0], [-54.0, -54.0, -37.0, -82.0, -86.0], [23.0, 30.0, 22.0, 25.0, 14.0], [38.0, -49.0, -59.0, 16.0, 
+5.0]], [[27.0, -5.0, 89.0, -62.0, -18.0], [27.0, 22.0, -27.0, -43.0, 55.0], [-1.0, -27.0, 28.0, 88.0, -47.0], [1.0, -15.0, 
+41.0, 63.0, 74.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[7.0, -7.0, 7.0], [-4.0, -2.0, 3.0]])+(1.-msk_arg0)*numpy.array([[6.0, 4.0, 4.0], [-4.0, 4.0, 
--4.0]])
-      arg1=numpy.array([[5.0, -3.0, 2.0], [-6.0, -3.0, 7.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-1.0, -5.0, 0.0, 3.0, -6.0], [-3.0, 4.0, -6.0, 0.0, 5.0], [7.0, 3.0, 3.0, 6.0, -6.0], [0.0, 0.0, 
+5.0, 6.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -6.0, 4.0, 1.0, -4.0], [2.0, -2.0, 4.0, 2.0, 4.0], [-6.0, 5.0, -2.0, 1.0, 2.0], 
+[-4.0, -3.0, -7.0, 0.0, -6.0]]))
+      arg1=Data(-7.0,self.functionspace)
+      arg1.setTaggedValue(1,4.0)
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(121.0)+(1.-msk_ref)*numpy.array(10.0)
+      ref=msk_ref*numpy.array([[7.0, 35.0, -0.0, -21.0, 42.0], [21.0, -28.0, 42.0, -0.0, -35.0], [-49.0, -21.0, -21.0, -42.0, 
+42.0], [-0.0, -0.0, -35.0, -42.0, -49.0]])+(1.-msk_ref)*numpy.array([[-28.0, -24.0, 16.0, 4.0, -16.0], [8.0, -8.0, 16.0, 8.0, 
+16.0], [-24.0, 20.0, -8.0, 4.0, 8.0], [-16.0, -12.0, -28.0, 0.0, -24.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 6.0, 0.0], [-5.0, -7.0, 5.0], [0.0, 6.0, 5.0], [6.0, 0.0, -7.0]], [[5.0, 1.0, 0.0], 
-[-3.0, 1.0, -5.0], [6.0, -2.0, 6.0], [4.0, 0.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 5.0, -6.0], [0.0, 1.0, -3.0], [7.0, 
-2.0, 7.0], [-5.0, -7.0, 7.0]], [[1.0, -6.0, -5.0], [-4.0, -4.0, -4.0], [-4.0, 7.0, 7.0], [7.0, -7.0, -4.0]]])
-      arg1=numpy.array([[[-7.0, 1.0, -6.0], [-4.0, -2.0, 5.0], [1.0, -7.0, 0.0], [-1.0, -5.0, 0.0]], [[-5.0, 4.0, -6.0], [7.0, 
--2.0, 4.0], [-2.0, 6.0, -5.0], [1.0, -1.0, -7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[5.0, 0.0, 3.0], [0.0, 5.0, 3.0], [6.0, -3.0, -7.0], [5.0, -5.0, 3.0], [-6.0, -6.0, 0.0]], [[4.0, 
+0.0, -2.0], [-4.0, 6.0, 7.0], [6.0, -7.0, -2.0], [1.0, 3.0, 3.0], [6.0, 4.0, 3.0]], [[-3.0, 7.0, 7.0], [1.0, -6.0, -5.0], [6.0, 
+5.0, 4.0], [6.0, 4.0, -6.0], [7.0, 6.0, -6.0]], [[-7.0, -1.0, 2.0], [-2.0, -1.0, 7.0], [2.0, 6.0, 2.0], [-7.0, 0.0, 0.0], [2.0, 
+-5.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, 0.0, 0.0], [-4.0, -2.0, -6.0], [7.0, 7.0, 7.0], [7.0, 6.0, -2.0], [2.0, 0.0, 
+-4.0]], [[0.0, 7.0, -1.0], [-3.0, 3.0, -3.0], [2.0, 4.0, 4.0], [-1.0, 2.0, 3.0], [5.0, -6.0, -1.0]], [[3.0, -4.0, 7.0], [7.0, 
+3.0, 6.0], [3.0, 6.0, 0.0], [-6.0, -3.0, -7.0], [2.0, -4.0, 1.0]], [[-7.0, 4.0, -3.0], [6.0, -1.0, 2.0], [-6.0, -7.0, -3.0], 
+[6.0, -5.0, 5.0], [-4.0, 0.0, -1.0]]]))
+      arg1=Data(numpy.array([1.0, 7.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, -1.0, -7.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-97.0)+(1.-msk_ref)*numpy.array(65.0)
+      ref=msk_ref*numpy.array([[-13.0, 17.0, 27.0, -48.0, -48.0], [16.0, -4.0, -31.0, 4.0, 16.0], [4.0, -11.0, 17.0, 70.0, 
+85.0], [-26.0, -51.0, 32.0, -7.0, -27.0]])+(1.-msk_ref)*numpy.array([[-2.0, 40.0, -49.0, 15.0, 30.0], [0.0, 15.0, -30.0, -24.0, 
+18.0], [-42.0, -38.0, -3.0, 46.0, -1.0], [10.0, -7.0, 22.0, -24.0, 3.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, 0.0, -3.0], [3.0, -1.0, 0.0]], [[0.0, -3.0, 3.0], [2.0, -6.0, 0.0]], [[0.0, 4.0, 4.0], 
+[0.0, 1.0, -2.0]], [[-5.0, 5.0, 6.0], [0.0, 0.0, 5.0]], [[-6.0, 6.0, -2.0], [-4.0, -2.0, -4.0]]], [[[0.0, 3.0, 4.0], [0.0, 
+-3.0, 1.0]], [[0.0, 0.0, 6.0], [2.0, -3.0, 5.0]], [[-1.0, 6.0, 6.0], [-3.0, 2.0, 7.0]], [[3.0, 5.0, 4.0], [-4.0, -1.0, 7.0]], 
+[[3.0, -3.0, 6.0], [-3.0, -4.0, -2.0]]], [[[6.0, 7.0, -1.0], [-4.0, 0.0, 0.0]], [[-7.0, 0.0, 3.0], [-6.0, -3.0, 2.0]], [[3.0, 
+0.0, -3.0], [-1.0, 2.0, 0.0]], [[2.0, -5.0, 2.0], [1.0, 3.0, 6.0]], [[-5.0, 4.0, 3.0], [6.0, 1.0, 4.0]]], [[[-5.0, 2.0, 2.0], 
+[-3.0, 7.0, 6.0]], [[-5.0, -6.0, -6.0], [6.0, 0.0, -3.0]], [[-2.0, -2.0, -7.0], [7.0, 3.0, 7.0]], [[-1.0, 0.0, -2.0], [3.0, 
+1.0, 3.0]], [[2.0, -1.0, -5.0], [7.0, -7.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, -5.0, -7.0], [4.0, -4.0, -6.0]], [[7.0, 3.0, -6.0], [3.0, -4.0, 1.0]], [[0.0, 
+-5.0, 2.0], [1.0, -6.0, -1.0]], [[4.0, -4.0, -6.0], [3.0, 3.0, -5.0]], [[6.0, -3.0, -6.0], [-7.0, 0.0, -7.0]]], [[[6.0, -5.0, 
+5.0], [-1.0, 1.0, -6.0]], [[-5.0, 6.0, -4.0], [3.0, 3.0, 2.0]], [[5.0, -7.0, -1.0], [1.0, -6.0, -5.0]], [[4.0, 5.0, 6.0], 
+[-6.0, 0.0, 0.0]], [[-5.0, 1.0, -3.0], [3.0, -6.0, -1.0]]], [[[-2.0, -3.0, 5.0], [-1.0, 0.0, 0.0]], [[-4.0, 5.0, 0.0], [4.0, 
+3.0, -4.0]], [[3.0, -2.0, -5.0], [5.0, 5.0, 1.0]], [[-1.0, 0.0, 7.0], [0.0, 6.0, 5.0]], [[4.0, -3.0, -6.0], [0.0, -4.0, 5.0]]], 
+[[[5.0, 7.0, -7.0], [-7.0, 5.0, 1.0]], [[3.0, -5.0, 0.0], [-5.0, 5.0, 5.0]], [[0.0, -3.0, 2.0], [7.0, -6.0, -6.0]], [[7.0, 
+-6.0, 3.0], [-5.0, 2.0, 5.0]], [[-1.0, 0.0, -4.0], [3.0, 3.0, 1.0]]]]))
+      arg1=Data(numpy.array([[-2.0, -3.0, -7.0], [1.0, 0.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 0.0, 5.0], [-3.0, -6.0, -7.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[24.0, -10.0, -52.0, -17.0, -20.0], [-31.0, -10.0, -19.0, -11.0, -54.0], [-30.0, -1.0, 14.0, 
+34.0, 7.0], [23.0, 58.0, 108.0, 37.0, 35.0]])+(1.-msk_ref)*numpy.array([[25.0, -36.0, 50.0, -30.0, 28.0], [52.0, -51.0, 53.0, 
+40.0, 29.0], [32.0, 6.0, -83.0, -34.0, -49.0], [-61.0, -56.0, 67.0, -31.0, -52.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, -6.0], [7.0, -6.0], [0.0, -2.0]], [[-5.0, -3.0], [7.0, 3.0], [-4.0, 2.0]]], [[[-5.0, 
-6.0], [-3.0, 5.0], [1.0, -3.0]], [[-1.0, -5.0], [6.0, 0.0], [2.0, -4.0]]], [[[-5.0, 3.0], [-1.0, 1.0], [3.0, 2.0]], [[7.0, 
-4.0], [2.0, -6.0], [4.0, 1.0]]], [[[2.0, -7.0], [-3.0, -6.0], [-1.0, -5.0]], [[6.0, -3.0], [-1.0, -7.0], [3.0, 
-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, -1.0], [-7.0, 3.0], [4.0, 4.0]], [[6.0, 6.0], [3.0, 0.0], [5.0, 0.0]]], [[[5.0, 
--5.0], [-3.0, 1.0], [3.0, -6.0]], [[4.0, 2.0], [-2.0, 7.0], [7.0, 7.0]]], [[[-7.0, 2.0], [6.0, -3.0], [0.0, -7.0]], [[0.0, 
-4.0], [1.0, -7.0], [-4.0, -7.0]]], [[[7.0, -3.0], [-5.0, -2.0], [-2.0, -4.0]], [[1.0, 0.0], [0.0, -4.0], [0.0, 4.0]]]])
-      arg1=numpy.array([[[[3.0, 3.0], [3.0, -6.0], [0.0, -7.0]], [[-4.0, -3.0], [-3.0, 2.0], [-1.0, 0.0]]], [[[1.0, 0.0], [3.0, 
-2.0], [-5.0, 1.0]], [[2.0, 0.0], [3.0, -6.0], [4.0, -5.0]]], [[[5.0, 0.0], [6.0, 2.0], [-7.0, 0.0]], [[-6.0, 6.0], [-5.0, 0.0], 
-[3.0, -7.0]]], [[[-2.0, 5.0], [3.0, -4.0], [0.0, -3.0]], [[7.0, 3.0], [3.0, -1.0], [-2.0, 4.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[4.0, 1.0, -1.0, -3.0, 3.0], [5.0, 7.0, 2.0, -3.0, 7.0], [3.0, -7.0, 7.0, -3.0, 1.0], [-6.0, 5.0, 
+-5.0, -3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 6.0, -3.0, -3.0, 7.0], [-1.0, 7.0, 7.0, 3.0, 7.0], [-3.0, 5.0, -2.0, -1.0, 0.0], 
+[4.0, 0.0, 5.0, 7.0, -1.0]]))
+      arg1=Data(numpy.array([0.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, -1.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(79.0)+(1.-msk_ref)*numpy.array(-130.0)
+      ref=msk_ref*numpy.array([[[0.0, 12.0], [0.0, 3.0], [0.0, -3.0], [0.0, -9.0], [0.0, 9.0]], [[0.0, 15.0], [0.0, 21.0], 
+[0.0, 6.0], [0.0, -9.0], [0.0, 21.0]], [[0.0, 9.0], [0.0, -21.0], [0.0, 21.0], [0.0, -9.0], [0.0, 3.0]], [[0.0, -18.0], [0.0, 
+15.0], [0.0, -15.0], [0.0, -9.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [36.0, -6.0], [-18.0, 3.0], [-18.0, 
+3.0], [42.0, -7.0]], [[-6.0, 1.0], [42.0, -7.0], [42.0, -7.0], [18.0, -3.0], [42.0, -7.0]], [[-18.0, 3.0], [30.0, -5.0], 
+[-12.0, 2.0], [-6.0, 1.0], [0.0, 0.0]], [[24.0, -4.0], [0.0, 0.0], [30.0, -5.0], [42.0, -7.0], [-6.0, 1.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(-5.0)
-      arg1=numpy.array([3.0, 4.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[6.0, 2.0, 0.0], [-2.0, 4.0, -2.0], [5.0, 6.0, 0.0], [-5.0, 6.0, 4.0], [1.0, 3.0, 0.0]], [[2.0, 
+-1.0, -7.0], [4.0, 1.0, 5.0], [3.0, 6.0, -1.0], [4.0, 2.0, 5.0], [7.0, 1.0, -1.0]], [[2.0, 4.0, 4.0], [-7.0, 4.0, 5.0], [6.0, 
+2.0, 3.0], [6.0, -5.0, -6.0], [-4.0, -3.0, 6.0]], [[-3.0, 3.0, -1.0], [5.0, -4.0, -6.0], [-2.0, -1.0, 7.0], [0.0, -3.0, -4.0], 
+[6.0, -4.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, 6.0, 1.0], [-5.0, 1.0, 4.0], [7.0, -6.0, -1.0], [-1.0, 3.0, 0.0], [2.0, 5.0, 
+-1.0]], [[2.0, -7.0, 4.0], [7.0, 0.0, 6.0], [6.0, 3.0, 0.0], [5.0, 3.0, 4.0], [-1.0, 5.0, 1.0]], [[-6.0, 6.0, -2.0], [-6.0, 
+3.0, 1.0], [-4.0, 0.0, -4.0], [6.0, -5.0, -5.0], [-5.0, -3.0, 1.0]], [[6.0, 3.0, -6.0], [-7.0, 5.0, 4.0], [4.0, 4.0, 0.0], 
+[7.0, -3.0, 6.0], [-6.0, 2.0, -1.0]]]))
+      arg1=Data(numpy.array([[0.0, 5.0], [0.0, -1.0], [0.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 6.0], [-6.0, 4.0], [4.0, -1.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-12.0, -16.0])+(1.-msk_ref)*numpy.array([-15.0, -20.0])
+      ref=msk_ref*numpy.array([[[0.0, 28.0], [0.0, 0.0], [0.0, 19.0], [0.0, -59.0], [0.0, 2.0]], [[0.0, 60.0], [0.0, -16.0], 
+[0.0, 16.0], [0.0, -17.0], [0.0, 41.0]], [[0.0, -22.0], [0.0, -74.0], [0.0, 7.0], [0.0, 77.0], [0.0, -59.0]], [[0.0, -11.0], 
+[0.0, 71.0], [0.0, -58.0], [0.0, 31.0], [0.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[-38.0, 41.0], [20.0, -30.0], [18.0, 19.0], 
+[-16.0, 6.0], [-38.0, 33.0]], [[54.0, -20.0], [10.0, 36.0], [-30.0, 48.0], [-12.0, 38.0], [-24.0, 13.0]], [[-32.0, -10.0], 
+[-2.0, -25.0], [-8.0, -20.0], [-2.0, 21.0], [32.0, -43.0]], [[-54.0, 54.0], [0.0, -26.0], [-32.0, 40.0], [28.0, 24.0], [-4.0, 
+-27.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, 2.0, 0.0])+(1.-msk_arg0)*numpy.array([7.0, -5.0, -1.0])
-      arg1=numpy.array([[2.0, 4.0], [-2.0, 0.0], [-4.0, -1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, -3.0, 2.0], [5.0, -7.0, -6.0]], [[-1.0, 7.0, 0.0], [0.0, -1.0, -1.0]], [[-2.0, -4.0, 
+-7.0], [2.0, 0.0, -3.0]], [[3.0, -3.0, 0.0], [3.0, 2.0, -3.0]], [[-2.0, -7.0, 0.0], [-3.0, 6.0, 6.0]]], [[[2.0, 1.0, 6.0], 
+[3.0, 2.0, -1.0]], [[0.0, 6.0, 1.0], [0.0, 7.0, -4.0]], [[4.0, 4.0, 0.0], [-6.0, -6.0, 4.0]], [[-6.0, -4.0, -1.0], [-1.0, 7.0, 
+-2.0]], [[7.0, 1.0, 7.0], [7.0, -1.0, 6.0]]], [[[-6.0, -5.0, -7.0], [-3.0, 0.0, 0.0]], [[3.0, 5.0, -7.0], [-1.0, 3.0, -7.0]], 
+[[-6.0, -6.0, 0.0], [0.0, 5.0, -3.0]], [[-2.0, -1.0, -7.0], [-1.0, -7.0, 3.0]], [[0.0, 4.0, 2.0], [6.0, 6.0, -2.0]]], [[[-4.0, 
+-4.0, -5.0], [1.0, -4.0, 2.0]], [[-4.0, -6.0, 0.0], [-5.0, -1.0, -6.0]], [[-1.0, 3.0, 3.0], [-5.0, 5.0, 7.0]], [[3.0, -2.0, 
+-1.0], [5.0, -3.0, -3.0]], [[7.0, -6.0, 2.0], [4.0, 0.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, 2.0, -6.0], [4.0, 7.0, -4.0]], [[-5.0, 3.0, 5.0], [0.0, -1.0, -4.0]], [[-2.0, 
+0.0, 4.0], [-6.0, 0.0, 0.0]], [[6.0, 3.0, 0.0], [2.0, 0.0, 0.0]], [[4.0, -6.0, 1.0], [-2.0, -2.0, 5.0]]], [[[-2.0, -3.0, 6.0], 
+[-6.0, -1.0, -6.0]], [[7.0, -6.0, 4.0], [-7.0, 2.0, -7.0]], [[-7.0, 3.0, -5.0], [2.0, 4.0, -4.0]], [[5.0, 1.0, -7.0], [-6.0, 
+5.0, -5.0]], [[2.0, 5.0, -7.0], [-3.0, -5.0, 1.0]]], [[[-6.0, -5.0, 0.0], [-6.0, 6.0, -3.0]], [[7.0, -1.0, -2.0], [2.0, 3.0, 
+2.0]], [[-1.0, -1.0, 4.0], [0.0, -5.0, 6.0]], [[-5.0, -3.0, 2.0], [0.0, 6.0, -7.0]], [[4.0, -3.0, -6.0], [4.0, 6.0, 0.0]]], 
+[[[5.0, 1.0, -1.0], [-2.0, 7.0, 1.0]], [[0.0, -2.0, -7.0], [-7.0, 2.0, 0.0]], [[-6.0, 0.0, 7.0], [2.0, 0.0, 2.0]], [[3.0, 0.0, 
+0.0], [6.0, 1.0, -3.0]], [[-1.0, 2.0, 0.0], [5.0, 5.0, 1.0]]]]))
+      arg1=Data(numpy.array([[[-1.0, 7.0], [-2.0, -4.0], [5.0, -4.0]], [[0.0, -3.0], [1.0, -2.0], [-1.0, 
+2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[5.0, -6.0], [-3.0, -5.0], [2.0, 1.0]], [[3.0, 7.0], [0.0, -6.0], [6.0, 0.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-14.0, -20.0])+(1.-msk_ref)*numpy.array([28.0, 29.0])
+      ref=msk_ref*numpy.array([[[15.0, -9.0], [-13.0, -35.0], [-22.0, 18.0], [8.0, 14.0], [16.0, 23.0]], [[29.0, -29.0], [4.0, 
+-50.0], [-22.0, 50.0], [18.0, -37.0], [19.0, 10.0]], [[-19.0, 15.0], [-38.0, 12.0], [26.0, -34.0], [-41.0, 41.0], [10.0, 
+-58.0]], [[-19.0, 17.0], [21.0, 1.0], [8.0, -12.0], [-4.0, 18.0], [8.0, 67.0]]])+(1.-msk_ref)*numpy.array([[[-55.0, 0.0], 
+[-48.0, 26.0], [-20.0, -26.0], [27.0, -37.0], [64.0, 5.0]], [[-43.0, -3.0], [-2.0, -69.0], [-72.0, 12.0], [-40.0, -114.0], 
+[-22.0, -35.0]], [[-51.0, -17.0], [52.0, -43.0], [42.0, 45.0], [-54.0, 11.0], [29.0, -23.0]], [[20.0, -92.0], [-29.0, -58.0], 
+[2.0, 57.0], [15.0, 18.0], [10.0, 1.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -6.0, -3.0], [7.0, -6.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-6.0, -2.0, -4.0], [7.0, 
-0.0, 6.0]])
-      arg1=numpy.array([[[5.0, -6.0], [-7.0, 5.0], [3.0, -1.0]], [[-1.0, -3.0], [7.0, -5.0], [0.0, 7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_taggedData_rank2_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[2.0, -5.0, 4.0, -7.0, 2.0], [-7.0, 0.0, -5.0, 0.0, 2.0], [2.0, -3.0, 7.0, 6.0, 0.0], [-5.0, 2.0, 
+-1.0, -5.0, 3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -5.0, 0.0, 3.0, 0.0], [-4.0, 0.0, -2.0, 3.0, -1.0], [3.0, -2.0, 0.0, -5.0, 5.0], 
+[-7.0, 6.0, 3.0, 5.0, -3.0]]))
+      arg1=Data(numpy.array([[-3.0, -5.0, 2.0, 0.0, 7.0], [-4.0, 7.0, 5.0, 0.0, 4.0], [7.0, 3.0, -3.0, -5.0, -3.0], [3.0, -1.0, 
+-2.0, 6.0, 3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -6.0, -5.0, 1.0, -4.0], [-2.0, -7.0, 5.0, -3.0, -7.0], [3.0, -7.0, -3.0, -7.0, 
+-6.0], [-2.0, 0.0, -4.0, 5.0, 5.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-1.0, -78.0])+(1.-msk_ref)*numpy.array([-35.0, 51.0])
+      ref=msk_ref*numpy.array([[[[-6.0, -10.0, 4.0, 0.0, 14.0], [-8.0, 14.0, 10.0, 0.0, 8.0], [14.0, 6.0, -6.0, -10.0, -6.0], 
+[6.0, -2.0, -4.0, 12.0, 6.0]], [[15.0, 25.0, -10.0, 0.0, -35.0], [20.0, -35.0, -25.0, 0.0, -20.0], [-35.0, -15.0, 15.0, 25.0, 
+15.0], [-15.0, 5.0, 10.0, -30.0, -15.0]], [[-12.0, -20.0, 8.0, 0.0, 28.0], [-16.0, 28.0, 20.0, 0.0, 16.0], [28.0, 12.0, -12.0, 
+-20.0, -12.0], [12.0, -4.0, -8.0, 24.0, 12.0]], [[21.0, 35.0, -14.0, 0.0, -49.0], [28.0, -49.0, -35.0, 0.0, -28.0], [-49.0, 
+-21.0, 21.0, 35.0, 21.0], [-21.0, 7.0, 14.0, -42.0, -21.0]], [[-6.0, -10.0, 4.0, 0.0, 14.0], [-8.0, 14.0, 10.0, 0.0, 8.0], 
+[14.0, 6.0, -6.0, -10.0, -6.0], [6.0, -2.0, -4.0, 12.0, 6.0]]], [[[21.0, 35.0, -14.0, 0.0, -49.0], [28.0, -49.0, -35.0, 0.0, 
+-28.0], [-49.0, -21.0, 21.0, 35.0, 21.0], [-21.0, 7.0, 14.0, -42.0, -21.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[15.0, 25.0, -10.0, 0.0, -35.0], [20.0, -35.0, -25.0, 0.0, 
+-20.0], [-35.0, -15.0, 15.0, 25.0, 15.0], [-15.0, 5.0, 10.0, -30.0, -15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, -10.0, 4.0, 0.0, 14.0], [-8.0, 14.0, 10.0, 0.0, 8.0], 
+[14.0, 6.0, -6.0, -10.0, -6.0], [6.0, -2.0, -4.0, 12.0, 6.0]]], [[[-6.0, -10.0, 4.0, 0.0, 14.0], [-8.0, 14.0, 10.0, 0.0, 8.0], 
+[14.0, 6.0, -6.0, -10.0, -6.0], [6.0, -2.0, -4.0, 12.0, 6.0]], [[9.0, 15.0, -6.0, 0.0, -21.0], [12.0, -21.0, -15.0, 0.0, 
+-12.0], [-21.0, -9.0, 9.0, 15.0, 9.0], [-9.0, 3.0, 6.0, -18.0, -9.0]], [[-21.0, -35.0, 14.0, 0.0, 49.0], [-28.0, 49.0, 35.0, 
+0.0, 28.0], [49.0, 21.0, -21.0, -35.0, -21.0], [21.0, -7.0, -14.0, 42.0, 21.0]], [[-18.0, -30.0, 12.0, 0.0, 42.0], [-24.0, 
+42.0, 30.0, 0.0, 24.0], [42.0, 18.0, -18.0, -30.0, -18.0], [18.0, -6.0, -12.0, 36.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[15.0, 25.0, -10.0, 0.0, -35.0], [20.0, -35.0, 
+-25.0, 0.0, -20.0], [-35.0, -15.0, 15.0, 25.0, 15.0], [-15.0, 5.0, 10.0, -30.0, -15.0]], [[-6.0, -10.0, 4.0, 0.0, 14.0], [-8.0, 
+14.0, 10.0, 0.0, 8.0], [14.0, 6.0, -6.0, -10.0, -6.0], [6.0, -2.0, -4.0, 12.0, 6.0]], [[3.0, 5.0, -2.0, 0.0, -7.0], [4.0, -7.0, 
+-5.0, 0.0, -4.0], [-7.0, -3.0, 3.0, 5.0, 3.0], [-3.0, 1.0, 2.0, -6.0, -3.0]], [[15.0, 25.0, -10.0, 0.0, -35.0], [20.0, -35.0, 
+-25.0, 0.0, -20.0], [-35.0, -15.0, 15.0, 25.0, 15.0], [-15.0, 5.0, 10.0, -30.0, -15.0]], [[-9.0, -15.0, 6.0, 0.0, 21.0], 
+[-12.0, 21.0, 15.0, 0.0, 12.0], [21.0, 9.0, -9.0, -15.0, -9.0], [9.0, -3.0, -6.0, 18.0, 
+9.0]]]])+(1.-msk_ref)*numpy.array([[[[42.0, -42.0, -35.0, 7.0, -28.0], [-14.0, -49.0, 35.0, -21.0, -49.0], [21.0, -49.0, -21.0, 
+-49.0, -42.0], [-14.0, 0.0, -28.0, 35.0, 35.0]], [[-30.0, 30.0, 25.0, -5.0, 20.0], [10.0, 35.0, -25.0, 15.0, 35.0], [-15.0, 
+35.0, 15.0, 35.0, 30.0], [10.0, 0.0, 20.0, -25.0, -25.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[18.0, -18.0, -15.0, 3.0, -12.0], [-6.0, -21.0, 15.0, -9.0, -21.0], [9.0, -21.0, 
+-9.0, -21.0, -18.0], [-6.0, 0.0, -12.0, 15.0, 15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-24.0, 24.0, 20.0, -4.0, 16.0], [8.0, 28.0, -20.0, 12.0, 28.0], [-12.0, 28.0, 12.0, 
+28.0, 24.0], [8.0, 0.0, 16.0, -20.0, -20.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, 12.0, 10.0, -2.0, 8.0], [4.0, 14.0, -10.0, 6.0, 14.0], [-6.0, 14.0, 6.0, 14.0, 12.0], 
+[4.0, 0.0, 8.0, -10.0, -10.0]], [[18.0, -18.0, -15.0, 3.0, -12.0], [-6.0, -21.0, 15.0, -9.0, -21.0], [9.0, -21.0, -9.0, -21.0, 
+-18.0], [-6.0, 0.0, -12.0, 15.0, 15.0]], [[-6.0, 6.0, 5.0, -1.0, 4.0], [2.0, 7.0, -5.0, 3.0, 7.0], [-3.0, 7.0, 3.0, 7.0, 6.0], 
+[2.0, 0.0, 4.0, -5.0, -5.0]]], [[[18.0, -18.0, -15.0, 3.0, -12.0], [-6.0, -21.0, 15.0, -9.0, -21.0], [9.0, -21.0, -9.0, -21.0, 
+-18.0], [-6.0, 0.0, -12.0, 15.0, 15.0]], [[-12.0, 12.0, 10.0, -2.0, 8.0], [4.0, 14.0, -10.0, 6.0, 14.0], [-6.0, 14.0, 6.0, 
+14.0, 12.0], [4.0, 0.0, 8.0, -10.0, -10.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, 30.0, 25.0, -5.0, 20.0], [10.0, 35.0, -25.0, 15.0, 35.0], [-15.0, 35.0, 15.0, 35.0, 30.0], 
+[10.0, 0.0, 20.0, -25.0, -25.0]], [[30.0, -30.0, -25.0, 5.0, -20.0], [-10.0, -35.0, 25.0, -15.0, -35.0], [15.0, -35.0, -15.0, 
+-35.0, -30.0], [-10.0, 0.0, -20.0, 25.0, 25.0]]], [[[-42.0, 42.0, 35.0, -7.0, 28.0], [14.0, 49.0, -35.0, 21.0, 49.0], [-21.0, 
+49.0, 21.0, 49.0, 42.0], [14.0, 0.0, 28.0, -35.0, -35.0]], [[36.0, -36.0, -30.0, 6.0, -24.0], [-12.0, -42.0, 30.0, -18.0, 
+-42.0], [18.0, -42.0, -18.0, -42.0, -36.0], [-12.0, 0.0, -24.0, 30.0, 30.0]], [[18.0, -18.0, -15.0, 3.0, -12.0], [-6.0, -21.0, 
+15.0, -9.0, -21.0], [9.0, -21.0, -9.0, -21.0, -18.0], [-6.0, 0.0, -12.0, 15.0, 15.0]], [[30.0, -30.0, -25.0, 5.0, -20.0], 
+[-10.0, -35.0, 25.0, -15.0, -35.0], [15.0, -35.0, -15.0, -35.0, -30.0], [-10.0, 0.0, -20.0, 25.0, 25.0]], [[-18.0, 18.0, 15.0, 
+-3.0, 12.0], [6.0, 21.0, -15.0, 9.0, 21.0], [-9.0, 21.0, 9.0, 21.0, 18.0], [6.0, 0.0, 12.0, -15.0, -15.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-6.0, -7.0, -3.0], [-3.0, 3.0, 6.0], [1.0, 5.0, -2.0], [6.0, -7.0, -7.0]], [[6.0, -2.0, 
-4.0], [2.0, 7.0, -2.0], [6.0, 4.0, 6.0], [3.0, 2.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-6.0, 2.0, 7.0], [-3.0, 7.0, 5.0], 
-[2.0, 0.0, 6.0], [5.0, 5.0, -6.0]], [[4.0, -5.0, 7.0], [4.0, -3.0, 2.0], [2.0, 5.0, 0.0], [2.0, 1.0, 6.0]]])
-      arg1=numpy.array([[[[7.0, 5.0], [-7.0, 2.0], [-3.0, -6.0]], [[-1.0, 7.0], [-3.0, 3.0], [7.0, 6.0]], [[0.0, -2.0], [-7.0, 
-3.0], [6.0, 0.0]], [[0.0, -3.0], [-3.0, 3.0], [0.0, 0.0]]], [[[-3.0, -6.0], [-5.0, 0.0], [-1.0, -3.0]], [[2.0, 0.0], [6.0, 
-5.0], [3.0, -2.0]], [[-2.0, 5.0], [-2.0, 3.0], [-5.0, -6.0]], [[-2.0, 7.0], [0.0, 6.0], [-2.0, -1.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-4.0, -3.0, 0.0], [5.0, -3.0, -2.0], [6.0, -3.0, 2.0], [0.0, -4.0, 2.0], [-4.0, 2.0, 0.0]], 
+[[0.0, -1.0, 5.0], [4.0, 5.0, 1.0], [5.0, 0.0, -1.0], [-6.0, 6.0, 1.0], [6.0, 5.0, 5.0]], [[3.0, -6.0, -3.0], [2.0, 3.0, 5.0], 
+[-6.0, 0.0, 3.0], [5.0, 6.0, -2.0], [0.0, 3.0, -7.0]], [[-1.0, -4.0, 6.0], [3.0, -4.0, -1.0], [6.0, -3.0, 2.0], [-6.0, -6.0, 
+-1.0], [-4.0, 0.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 0.0, 4.0], [-3.0, -3.0, -4.0], [-3.0, 7.0, -3.0], [-4.0, 1.0, 0.0], [0.0, -4.0, 
+0.0]], [[4.0, -2.0, 6.0], [-1.0, -5.0, 3.0], [-3.0, -7.0, -5.0], [0.0, -7.0, 1.0], [7.0, -1.0, 0.0]], [[6.0, 4.0, -5.0], [6.0, 
+-1.0, 0.0], [-1.0, 3.0, -3.0], [0.0, -1.0, -4.0], [-1.0, 3.0, 7.0]], [[2.0, 5.0, -7.0], [-3.0, 5.0, 7.0], [3.0, 7.0, -2.0], 
+[4.0, 6.0, -6.0], [-6.0, 4.0, -3.0]]]))
+      arg1=Data(numpy.array([[[5.0, 5.0, 3.0, -2.0, 4.0], [-2.0, -4.0, -3.0, 1.0, -3.0], [4.0, -3.0, -1.0, 5.0, 3.0], [0.0, 
+0.0, 4.0, -1.0, -1.0]], [[3.0, 3.0, 6.0, 5.0, 0.0], [-4.0, -2.0, -5.0, -5.0, 7.0], [-5.0, -7.0, -2.0, -2.0, -2.0], [0.0, -3.0, 
+2.0, -1.0, -1.0]], [[-1.0, 0.0, 5.0, 7.0, 7.0], [-3.0, -2.0, 5.0, 1.0, -3.0], [-5.0, 0.0, -6.0, -7.0, -2.0], [7.0, 6.0, 4.0, 
+5.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 3.0, -2.0, -6.0, 0.0], [5.0, 3.0, 2.0, -4.0, -6.0], [2.0, 3.0, 4.0, 0.0, 1.0], 
+[-4.0, -4.0, -1.0, 5.0, -4.0]], [[-2.0, -1.0, -2.0, -5.0, 3.0], [-1.0, -2.0, -5.0, 7.0, 6.0], [5.0, 7.0, 6.0, 7.0, 3.0], [-1.0, 
+-5.0, -1.0, 2.0, -5.0]], [[-1.0, 5.0, -5.0, 0.0, 5.0], [-7.0, 2.0, 4.0, 4.0, -4.0], [7.0, 1.0, -5.0, -4.0, -4.0], [0.0, 2.0, 
+-2.0, -2.0, 3.0]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-16.0, -5.0])+(1.-msk_ref)*numpy.array([-67.0, -67.0])
+      ref=msk_ref*numpy.array([[[[-29.0, -29.0, -30.0, -7.0, -16.0], [20.0, 22.0, 27.0, 11.0, -9.0], [-1.0, 33.0, 10.0, -14.0, 
+-6.0], [0.0, 9.0, -22.0, 7.0, 7.0]], [[18.0, 16.0, -13.0, -39.0, 6.0], [8.0, -10.0, -10.0, 18.0, -30.0], [45.0, 6.0, 13.0, 
+45.0, 25.0], [-14.0, -3.0, 6.0, -12.0, -8.0]], [[19.0, 21.0, 10.0, -13.0, 38.0], [-6.0, -22.0, 7.0, 23.0, -45.0], [29.0, 3.0, 
+-12.0, 22.0, 20.0], [14.0, 21.0, 26.0, 7.0, 3.0]], [[-14.0, -12.0, -14.0, -6.0, 14.0], [10.0, 4.0, 30.0, 22.0, -34.0], [10.0, 
+28.0, -4.0, -6.0, 4.0], [14.0, 24.0, 0.0, 14.0, 10.0]], [[-14.0, -14.0, 0.0, 18.0, -16.0], [0.0, 12.0, 2.0, -14.0, 26.0], 
+[-26.0, -2.0, 0.0, -24.0, -16.0], [0.0, -6.0, -12.0, 2.0, 2.0]]], [[[-8.0, -3.0, 19.0, 30.0, 35.0], [-11.0, -8.0, 30.0, 10.0, 
+-22.0], [-20.0, 7.0, -28.0, -33.0, -8.0], [35.0, 33.0, 18.0, 26.0, 16.0]], [[34.0, 35.0, 47.0, 24.0, 23.0], [-31.0, -28.0, 
+-32.0, -20.0, 20.0], [-14.0, -47.0, -20.0, 3.0, 0.0], [7.0, -9.0, 30.0, -4.0, -6.0]], [[26.0, 25.0, 10.0, -17.0, 13.0], [-7.0, 
+-18.0, -20.0, 4.0, -12.0], [25.0, -15.0, 1.0, 32.0, 17.0], [-7.0, -6.0, 16.0, -10.0, -8.0]], [[-13.0, -12.0, 23.0, 49.0, 
+-17.0], [-15.0, 10.0, -7.0, -35.0, 57.0], [-59.0, -24.0, -12.0, -49.0, -32.0], [7.0, -12.0, -8.0, 5.0, 3.0]], [[40.0, 45.0, 
+73.0, 48.0, 59.0], [-47.0, -44.0, -18.0, -14.0, 2.0], [-26.0, -53.0, -46.0, -15.0, -2.0], [35.0, 15.0, 54.0, 14.0, 4.0]]], 
+[[[0.0, -3.0, -42.0, -57.0, -9.0], [27.0, 6.0, 6.0, 30.0, -42.0], [57.0, 33.0, 27.0, 48.0, 27.0], [-21.0, 0.0, -12.0, -12.0, 
+-6.0]], [[14.0, 19.0, 49.0, 46.0, 43.0], [-31.0, -24.0, 4.0, -8.0, 0.0], [-32.0, -27.0, -38.0, -31.0, -10.0], [35.0, 21.0, 
+34.0, 20.0, 10.0]], [[-33.0, -30.0, -3.0, 33.0, -3.0], [3.0, 18.0, 33.0, -3.0, 9.0], [-39.0, 18.0, -12.0, -51.0, -24.0], [21.0, 
+18.0, -12.0, 21.0, 15.0]], [[45.0, 43.0, 41.0, 6.0, 6.0], [-28.0, -28.0, -55.0, -27.0, 33.0], [0.0, -57.0, -5.0, 27.0, 7.0], 
+[-14.0, -30.0, 24.0, -21.0, -17.0]], [[16.0, 9.0, -17.0, -34.0, -49.0], [9.0, 8.0, -50.0, -22.0, 42.0], [20.0, -21.0, 36.0, 
+43.0, 8.0], [-49.0, -51.0, -22.0, -38.0, -24.0]]], [[[-23.0, -17.0, 3.0, 24.0, 38.0], [0.0, 0.0, 53.0, 25.0, -43.0], [-14.0, 
+31.0, -27.0, -39.0, -7.0], [42.0, 48.0, 12.0, 35.0, 23.0]], [[4.0, 3.0, -20.0, -33.0, 5.0], [13.0, -2.0, 6.0, 22.0, -34.0], 
+[37.0, 19.0, 11.0, 30.0, 19.0], [-7.0, 6.0, 0.0, -4.0, -2.0]], [[19.0, 21.0, 10.0, -13.0, 38.0], [-6.0, -22.0, 7.0, 23.0, 
+-45.0], [29.0, 3.0, -12.0, 22.0, 20.0], [14.0, 21.0, 26.0, 7.0, 3.0]], [[-47.0, -48.0, -59.0, -25.0, -31.0], [39.0, 38.0, 43.0, 
+23.0, -21.0], [11.0, 60.0, 24.0, -11.0, -4.0], [-7.0, 12.0, -40.0, 7.0, 9.0]], [[-23.0, -20.0, 3.0, 29.0, 5.0], [-1.0, 10.0, 
+27.0, -1.0, 3.0], [-31.0, 12.0, -14.0, -41.0, -18.0], [21.0, 18.0, -4.0, 19.0, 13.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 
+20.0, -20.0, 0.0, 20.0], [-28.0, 8.0, 16.0, 16.0, -16.0], [28.0, 4.0, -20.0, -16.0, -16.0], [0.0, 8.0, -8.0, -8.0, 12.0]], 
+[[-8.0, -26.0, 32.0, 33.0, -29.0], [16.0, -11.0, -7.0, -25.0, 16.0], [-49.0, -34.0, -10.0, -5.0, 4.0], [15.0, 19.0, 14.0, 
+-13.0, 15.0]], [[-29.0, -31.0, 7.0, -17.0, 6.0], [-1.0, -29.0, -53.0, 49.0, 72.0], [8.0, 37.0, 45.0, 61.0, 30.0], [5.0, -29.0, 
+2.0, 5.0, -32.0]], [[-26.0, -13.0, 6.0, 19.0, 3.0], [-21.0, -14.0, -13.0, 23.0, 30.0], [-3.0, -5.0, -10.0, 7.0, -1.0], [15.0, 
+11.0, 3.0, -18.0, 11.0]], [[8.0, 4.0, 8.0, 20.0, -12.0], [4.0, 8.0, 20.0, -28.0, -24.0], [-20.0, -28.0, -24.0, -28.0, -12.0], 
+[4.0, 20.0, 4.0, -8.0, 20.0]]], [[[22.0, 44.0, -34.0, -14.0, 24.0], [-20.0, 28.0, 42.0, -6.0, -60.0], [40.0, 4.0, -26.0, -38.0, 
+-26.0], [-14.0, 6.0, -14.0, 4.0, 12.0]], [[1.0, 17.0, -3.0, 31.0, 0.0], [-21.0, 13.0, 35.0, -19.0, -36.0], [-6.0, -35.0, -49.0, 
+-47.0, -28.0], [9.0, 35.0, 0.0, -21.0, 38.0]], [[1.0, -27.0, 45.0, 53.0, -46.0], [27.0, -5.0, 9.0, -57.0, -4.0], [-76.0, -63.0, 
+-29.0, -29.0, -4.0], [19.0, 37.0, 20.0, -19.0, 32.0]], [[13.0, 12.0, 9.0, 35.0, -16.0], [0.0, 16.0, 39.0, -45.0, -46.0], 
+[-28.0, -48.0, -47.0, -53.0, -25.0], [7.0, 37.0, 5.0, -16.0, 38.0]], [[44.0, 22.0, -12.0, -37.0, -3.0], [36.0, 23.0, 19.0, 
+-35.0, -48.0], [9.0, 14.0, 22.0, -7.0, 4.0], [-27.0, -23.0, -6.0, 33.0, -23.0]]], [[[33.0, -11.0, 5.0, -56.0, -13.0], [61.0, 
+0.0, -28.0, -16.0, 8.0], [-3.0, 41.0, 73.0, 48.0, 38.0], [-28.0, -54.0, 0.0, 48.0, -59.0]], [[38.0, 19.0, -10.0, -31.0, -3.0], 
+[31.0, 20.0, 17.0, -31.0, -42.0], [7.0, 11.0, 18.0, -7.0, 3.0], [-23.0, -19.0, -5.0, 28.0, -19.0]], [[-9.0, -21.0, 11.0, -9.0, 
+-6.0], [13.0, -15.0, -29.0, 13.0, 36.0], [-8.0, 15.0, 29.0, 33.0, 20.0], [1.0, -17.0, 4.0, 7.0, -20.0]], [[6.0, -19.0, 22.0, 
+5.0, -23.0], [29.0, -6.0, -11.0, -23.0, 10.0], [-33.0, -11.0, 14.0, 9.0, 13.0], [1.0, -3.0, 9.0, 6.0, -7.0]], [[-19.0, 29.0, 
+-39.0, -9.0, 44.0], [-57.0, 5.0, 11.0, 53.0, -4.0], [62.0, 25.0, -21.0, -7.0, -20.0], [1.0, 3.0, -16.0, -13.0, 10.0]]], [[[9.0, 
+-34.0, 21.0, -37.0, -20.0], [54.0, -18.0, -49.0, -1.0, 46.0], [-20.0, 34.0, 73.0, 63.0, 45.0], [-13.0, -47.0, 7.0, 34.0, 
+-54.0]], [[-35.0, 21.0, -39.0, -7.0, 50.0], [-69.0, -5.0, -3.0, 75.0, 20.0], [68.0, 33.0, -17.0, 7.0, -16.0], [7.0, 1.0, -16.0, 
+-19.0, 8.0]], [[6.0, -8.0, -10.0, -53.0, 11.0], [22.0, -9.0, -37.0, 29.0, 32.0], [27.0, 56.0, 64.0, 57.0, 32.0], [-19.0, -51.0, 
+-6.0, 33.0, -53.0]], [[18.0, -24.0, 10.0, -54.0, -12.0], [56.0, -12.0, -46.0, 2.0, 36.0], [-4.0, 48.0, 82.0, 66.0, 46.0], 
+[-22.0, -58.0, 2.0, 44.0, -64.0]], [[-41.0, -37.0, 19.0, 16.0, -3.0], [-13.0, -32.0, -44.0, 40.0, 72.0], [-13.0, 7.0, 15.0, 
+40.0, 18.0], [20.0, -2.0, 8.0, -16.0, -5.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(5.0)
-      arg1=numpy.array([[-5.0, -4.0, 0.0, -1.0, 0.0], [0.0, 1.0, 7.0, 6.0, 5.0], [2.0, -3.0, 4.0, 4.0, 5.0], [0.0, -5.0, 3.0, 
-4.0, -5.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, -4.0, 5.0], [-7.0, -5.0, -5.0]], [[3.0, -7.0, 2.0], [7.0, -5.0, 6.0]], [[5.0, 7.0, 0.0], 
+[2.0, -6.0, -1.0]], [[-3.0, 7.0, 6.0], [4.0, 0.0, -6.0]], [[4.0, 0.0, -5.0], [0.0, -1.0, -3.0]]], [[[7.0, 7.0, 0.0], [-4.0, 
+4.0, -3.0]], [[5.0, -1.0, 3.0], [-4.0, -7.0, 2.0]], [[7.0, 4.0, -1.0], [1.0, 2.0, 2.0]], [[2.0, -1.0, 3.0], [0.0, -2.0, 4.0]], 
+[[2.0, -3.0, 0.0], [5.0, -6.0, 2.0]]], [[[-5.0, -2.0, -2.0], [-1.0, -3.0, 4.0]], [[6.0, -2.0, 7.0], [0.0, -5.0, -4.0]], [[0.0, 
+2.0, 7.0], [-2.0, -1.0, 6.0]], [[-2.0, -4.0, 4.0], [0.0, -1.0, 0.0]], [[-3.0, 3.0, 0.0], [6.0, 1.0, 7.0]]], [[[-7.0, -5.0, 
+3.0], [6.0, -4.0, -7.0]], [[0.0, -1.0, 5.0], [6.0, 5.0, 5.0]], [[-5.0, -6.0, 6.0], [7.0, -6.0, -3.0]], [[2.0, 2.0, 1.0], [6.0, 
+-5.0, -4.0]], [[5.0, -6.0, 1.0], [-6.0, 2.0, 3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -2.0, -2.0], [-3.0, 3.0, -4.0]], [[-4.0, -3.0, -1.0], [7.0, 3.0, 6.0]], 
+[[-4.0, -7.0, 2.0], [3.0, -5.0, 1.0]], [[1.0, 6.0, -5.0], [7.0, -6.0, -4.0]], [[6.0, 4.0, 7.0], [0.0, 4.0, -7.0]]], [[[5.0, 
+-6.0, -5.0], [7.0, 3.0, 5.0]], [[6.0, 6.0, 2.0], [-3.0, -4.0, -2.0]], [[-6.0, 2.0, 3.0], [3.0, 7.0, 1.0]], [[5.0, 6.0, 3.0], 
+[0.0, 3.0, 1.0]], [[0.0, 2.0, -2.0], [-4.0, -4.0, 6.0]]], [[[7.0, 0.0, 4.0], [-3.0, 6.0, -5.0]], [[-4.0, 3.0, 7.0], [3.0, 2.0, 
+3.0]], [[3.0, 4.0, 0.0], [7.0, -4.0, 0.0]], [[-5.0, -4.0, -2.0], [7.0, 0.0, -2.0]], [[-5.0, -6.0, -3.0], [5.0, -7.0, -5.0]]], 
+[[[-2.0, -4.0, -7.0], [-3.0, 3.0, -3.0]], [[0.0, -3.0, 5.0], [3.0, -1.0, 3.0]], [[7.0, -7.0, -1.0], [5.0, 0.0, 6.0]], [[6.0, 
+7.0, -7.0], [-5.0, 5.0, 6.0]], [[1.0, 2.0, 0.0], [-3.0, -6.0, 6.0]]]]))
+      arg1=Data(numpy.array([[[[-5.0, -2.0, 5.0, -7.0, 7.0], [-5.0, 6.0, -4.0, -1.0, 4.0], [0.0, 0.0, 5.0, 3.0, 7.0], [0.0, 
+3.0, 3.0, -4.0, 7.0]], [[2.0, -3.0, 2.0, 3.0, 1.0], [4.0, 4.0, 4.0, 6.0, -3.0], [1.0, 5.0, 0.0, -4.0, 0.0], [-2.0, 0.0, 0.0, 
+5.0, 0.0]], [[-4.0, -4.0, -5.0, 6.0, -5.0], [2.0, -7.0, -6.0, -3.0, -4.0], [7.0, 0.0, 0.0, 0.0, 6.0], [4.0, 3.0, 0.0, -4.0, 
+-6.0]]], [[[3.0, -1.0, 2.0, 6.0, 5.0], [2.0, 7.0, 5.0, -1.0, -7.0], [5.0, -7.0, 3.0, -3.0, -7.0], [3.0, 5.0, 0.0, -1.0, 3.0]], 
+[[-1.0, 0.0, -7.0, -3.0, -3.0], [-2.0, 7.0, -4.0, -6.0, 5.0], [-1.0, 3.0, 0.0, -1.0, 3.0], [-1.0, 5.0, 5.0, 7.0, -6.0]], 
+[[-7.0, 7.0, 4.0, 0.0, -2.0], [-2.0, -7.0, 0.0, -4.0, 3.0], [-5.0, -4.0, -1.0, 7.0, -3.0], [-1.0, -3.0, 0.0, 7.0, 
+-5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-1.0, -5.0, 6.0, 0.0, 0.0], [-7.0, 4.0, 6.0, 0.0, 0.0], [-1.0, -7.0, 5.0, 2.0, 
+-6.0], [6.0, -2.0, 7.0, 6.0, 5.0]], [[2.0, 5.0, -3.0, 6.0, 7.0], [-6.0, 0.0, -1.0, 3.0, 2.0], [1.0, -2.0, 7.0, -3.0, 0.0], 
+[7.0, 5.0, 1.0, -5.0, 2.0]], [[-1.0, 3.0, 0.0, -4.0, 0.0], [6.0, 4.0, 0.0, -4.0, 4.0], [-3.0, -6.0, -4.0, 4.0, -5.0], [-5.0, 
+-7.0, -4.0, 6.0, 7.0]]], [[[0.0, 1.0, -5.0, 6.0, -4.0], [7.0, 0.0, -4.0, 6.0, 0.0], [-6.0, -1.0, -2.0, 3.0, 4.0], [5.0, -2.0, 
+-2.0, -4.0, -1.0]], [[7.0, 2.0, 7.0, -3.0, -3.0], [-1.0, 2.0, -7.0, 7.0, 1.0], [6.0, -1.0, 0.0, 5.0, -7.0], [1.0, -3.0, 0.0, 
+-6.0, 0.0]], [[7.0, 0.0, 0.0, 2.0, 2.0], [2.0, 2.0, 3.0, -7.0, -7.0], [1.0, -7.0, 3.0, -1.0, 0.0], [5.0, 7.0, -6.0, -3.0, 
+1.0]]]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[25.0, 20.0, -0.0, 5.0, -0.0], [-0.0, -5.0, -35.0, -30.0, -25.0], [-10.0, 15.0, -20.0, -20.0, 
--25.0], [-0.0, 25.0, -15.0, -20.0, 25.0]])+(1.-msk_ref)*numpy.array([[-25.0, -20.0, 0.0, -5.0, 0.0], [0.0, 5.0, 35.0, 30.0, 
-25.0], [10.0, -15.0, 20.0, 20.0, 25.0], [0.0, -25.0, 15.0, 20.0, -25.0]])
+      ref=msk_ref*numpy.array([[[[-29.0, -44.0, -12.0, -37.0, -11.0], [-20.0, -76.0, -77.0, 14.0, 17.0], [26.0, 34.0, 4.0, 
+19.0, 107.0], [17.0, -18.0, -13.0, -119.0, 32.0]], [[-53.0, 42.0, 64.0, 27.0, 42.0], [-27.0, -52.0, 3.0, -52.0, -31.0], [17.0, 
+-123.0, 30.0, 63.0, -49.0], [42.0, 7.0, -16.0, -55.0, 30.0]], [[8.0, -40.0, 81.0, 16.0, 72.0], [21.0, 37.0, 42.0, 75.0, -48.0], 
+[28.0, 7.0, 32.0, -20.0, 6.0], [-1.0, -2.0, -15.0, -36.0, 82.0]], [[59.0, -85.0, -47.0, 102.0, -12.0], [75.0, 38.0, 24.0, 47.0, 
+-103.0], [99.0, 31.0, 3.0, -91.0, 5.0], [28.0, 47.0, -9.0, -23.0, -15.0]], [[22.0, -9.0, 40.0, -55.0, 62.0], [-22.0, 73.0, 
+18.0, 29.0, 22.0], [-19.0, 9.0, 23.0, -8.0, 4.0], [-16.0, 1.0, 7.0, -24.0, 79.0]]], [[[-16.0, -52.0, 1.0, -64.0, 30.0], [-17.0, 
+91.0, -36.0, 27.0, 46.0], [-2.0, 87.0, 26.0, -20.0, 98.0], [-27.0, 30.0, 41.0, 18.0, 28.0]], [[-58.0, -1.0, 57.0, -23.0, 16.0], 
+[-21.0, -86.0, -34.0, 18.0, 10.0], [-3.0, -6.0, 11.0, 52.0, 54.0], [7.0, -37.0, -20.0, -68.0, 37.0]], [[-36.0, -9.0, 44.0, 
+-43.0, 53.0], [-27.0, 72.0, -9.0, -1.0, 29.0], [-10.0, 11.0, 36.0, 14.0, 36.0], [-13.0, 27.0, 31.0, 23.0, 36.0]], [[-50.0, 
+15.0, 23.0, 7.0, -4.0], [-12.0, -55.0, -22.0, -21.0, 1.0], [2.0, -27.0, 6.0, 40.0, 14.0], [12.0, -7.0, -4.0, -11.0, -12.0]], 
+[[-9.0, 14.0, 64.0, 25.0, 50.0], [-4.0, -21.0, 29.0, 3.0, -42.0], [18.0, -76.0, 23.0, 23.0, -45.0], [25.0, -5.0, -24.0, -56.0, 
+55.0]]], [[[1.0, 53.0, 16.0, 20.0, -31.0], [9.0, -80.0, 31.0, 2.0, -2.0], [-38.0, -28.0, -32.0, 27.0, -61.0], [-8.0, -53.0, 
+-30.0, 26.0, -28.0]], [[-29.0, -62.0, 10.0, 9.0, 28.0], [-6.0, -28.0, -54.0, 7.0, -35.0], [72.0, -9.0, 34.0, 3.0, 81.0], [41.0, 
+26.0, -7.0, -125.0, 50.0]], [[-71.0, 10.0, -4.0, 39.0, -52.0], [8.0, -104.0, -40.0, -25.0, -7.0], [12.0, -3.0, -12.0, 41.0, 
+35.0], [13.0, -12.0, -5.0, 19.0, -72.0]], [[-13.0, 0.0, -31.0, 29.0, -35.0], [4.0, -63.0, -28.0, -28.0, -17.0], [25.0, -23.0, 
+-10.0, 11.0, 7.0], [25.0, 1.0, -11.0, -35.0, -32.0]], [[-11.0, 40.0, 24.0, 63.0, -5.0], [23.0, -6.0, 50.0, -19.0, -37.0], 
+[-3.0, -52.0, -4.0, 9.0, -81.0], [4.0, 5.0, -4.0, 77.0, -44.0]]], [[[84.0, -38.0, -48.0, 100.0, -13.0], [55.0, -20.0, 36.0, 
+14.0, -108.0], [85.0, -51.0, -10.0, -64.0, -64.0], [51.0, 19.0, -41.0, -92.0, 10.0]], [[-44.0, 12.0, -30.0, 48.0, -21.0], 
+[-2.0, 3.0, -24.0, -77.0, -19.0], [34.0, -52.0, 13.0, 16.0, -12.0], [30.0, 55.0, 25.0, 39.0, -67.0]], [[37.0, -24.0, -23.0, 
+113.0, -12.0], [45.0, -68.0, 19.0, -8.0, -114.0], [92.0, -85.0, -1.0, -27.0, -57.0], [66.0, 17.0, -45.0, -104.0, 1.0]], [[41.0, 
+-48.0, 40.0, 49.0, 64.0], [30.0, 48.0, 44.0, 47.0, -81.0], [64.0, -31.0, 32.0, -43.0, -25.0], [27.0, 26.0, -19.0, -71.0, 
+76.0]], [[-82.0, 31.0, -6.0, -89.0, -18.0], [-69.0, -50.0, -88.0, -62.0, 95.0], [-46.0, 6.0, 4.0, 76.0, 80.0], [-7.0, -11.0, 
+25.0, -13.0, -16.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 12.0, 12.0, -39.0, -19.0], [3.0, -30.0, -49.0, 33.0, 19.0], [41.0, 
+79.0, -37.0, -2.0, 7.0], [-66.0, -17.0, 1.0, -26.0, -44.0]], [[62.0, 15.0, -29.0, 31.0, -46.0], [98.0, -2.0, -52.0, 16.0, 
+-49.0], [-14.0, -12.0, -33.0, 27.0, 36.0], [28.0, 19.0, -77.0, -79.0, -34.0]], [[-40.0, -16.0, -53.0, -15.0, -44.0], [110.0, 
+-16.0, 9.0, -53.0, -18.0], [-56.0, 25.0, -80.0, 4.0, 61.0], [-68.0, -25.0, -55.0, 38.0, -22.0]], [[-54.0, 5.0, -89.0, 108.0, 
+24.0], [-26.0, -36.0, 2.0, 66.0, 14.0], [-62.0, 38.0, 41.0, -41.0, 89.0], [82.0, 39.0, 43.0, -34.0, -29.0]], [[-26.0, 19.0, 
+52.0, -30.0, 2.0], [-42.0, 46.0, -17.0, 61.0, 89.0], [-6.0, -47.0, 9.0, 55.0, -99.0], [-2.0, -102.0, 60.0, 55.0, 80.0]]], 
+[[[44.0, -57.0, 34.0, 27.0, -69.0], [27.0, 16.0, 2.0, 30.0, -64.0], [-15.0, -38.0, 4.0, 39.0, 2.0], [76.0, 7.0, 5.0, -31.0, 
+-24.0]], [[-38.0, -5.0, 5.0, 18.0, 62.0], [-87.0, 20.0, 64.0, -22.0, 30.0], [-14.0, -45.0, 64.0, -25.0, -30.0], [39.0, 8.0, 
+58.0, 60.0, 57.0]], [[63.0, 66.0, -8.0, -1.0, -17.0], [64.0, 4.0, -96.0, 54.0, 16.0], [24.0, 3.0, -31.0, 37.0, -16.0], [-10.0, 
+-19.0, -64.0, -85.0, -7.0]], [[32.0, 20.0, 33.0, 17.0, 35.0], [-54.0, 40.0, 6.0, 20.0, 20.0], [11.0, -75.0, 58.0, 18.0, -66.0], 
+[65.0, -3.0, 23.0, -3.0, 59.0]], [[20.0, -8.0, -14.0, 20.0, 54.0], [-36.0, -4.0, 60.0, -80.0, -50.0], [14.0, -26.0, 48.0, 
+-52.0, 22.0], [30.0, 86.0, -18.0, 0.0, 0.0]]], [[[-4.0, -14.0, 99.0, -62.0, -16.0], [-62.0, 46.0, -3.0, 43.0, 57.0], [30.0, 
+-41.0, 10.0, 56.0, -116.0], [-12.0, -89.0, 69.0, 57.0, 61.0]], [[38.0, 63.0, -34.0, 8.0, 9.0], [77.0, 22.0, -44.0, -8.0, 15.0], 
+[-17.0, -46.0, -24.0, 27.0, -13.0], [-6.0, -17.0, -77.0, -30.0, 35.0]], [[-23.0, 4.0, -57.0, 78.0, 12.0], [8.0, 4.0, 14.0, 
+26.0, 4.0], [-65.0, -32.0, 29.0, -5.0, 38.0], [77.0, 12.0, 11.0, -6.0, 16.0]], [[-15.0, 6.0, -53.0, 22.0, -60.0], [92.0, -32.0, 
+-60.0, 52.0, -2.0], [-37.0, 62.0, -65.0, 17.0, 68.0], [-23.0, -24.0, -33.0, -44.0, -56.0]], [[-88.0, -23.0, -86.0, 17.0, 
+-51.0], [85.0, -56.0, -10.0, 10.0, 4.0], [-69.0, 102.0, -80.0, -19.0, 114.0], [-64.0, -23.0, -9.0, 19.0, -68.0]]], [[[1.0, 
+-28.0, 36.0, -29.0, -31.0], [-34.0, -36.0, -26.0, 40.0, -12.0], [52.0, 85.0, -13.0, -11.0, 14.0], [-32.0, 9.0, 34.0, -31.0, 
+-67.0]], [[3.0, 1.0, -13.0, -11.0, -24.0], [76.0, 24.0, 7.0, -39.0, -8.0], [-39.0, -47.0, -38.0, 30.0, -6.0], [-17.0, -32.0, 
+-47.0, 30.0, 29.0]], [[22.0, -68.0, 38.0, 4.0, -57.0], [34.0, 36.0, 47.0, -29.0, -60.0], [-35.0, -76.0, -2.0, 40.0, -17.0], 
+[53.0, -10.0, 0.0, 33.0, 15.0]], [[92.0, -11.0, 75.0, 37.0, 66.0], [-154.0, 18.0, 32.0, 12.0, -51.0], [88.0, -56.0, 135.0, 
+-33.0, -56.0], [130.0, 109.0, 51.0, -69.0, 6.0]], [[3.0, -10.0, -27.0, 24.0, 56.0], [-22.0, 4.0, 76.0, -96.0, -44.0], [-11.0, 
+-44.0, 43.0, -49.0, 24.0], [29.0, 74.0, -21.0, 26.0, 18.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, 5.0, -1.0])+(1.-msk_arg0)*numpy.array([-6.0, -2.0, -1.0])
-      arg1=numpy.array([[[-7.0, 3.0, 1.0, 3.0, 0.0], [-1.0, -7.0, 4.0, -3.0, 0.0], [0.0, 0.0, 0.0, 6.0, -7.0], [5.0, -2.0, 
--5.0, 1.0, -7.0]], [[-3.0, -6.0, -7.0, -5.0, -2.0], [0.0, 7.0, -2.0, -2.0, -2.0], [0.0, 4.0, 4.0, 6.0, -1.0], [3.0, 4.0, -3.0, 
-7.0, 7.0]], [[-6.0, 4.0, -2.0, -1.0, 7.0], [2.0, -1.0, 0.0, -2.0, -6.0], [2.0, -7.0, 4.0, 0.0, 2.0], [6.0, -5.0, 4.0, 3.0, 
--5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[26.0, -49.0, -38.0, -39.0, -17.0], [3.0, 71.0, -30.0, 7.0, -4.0], [-2.0, 27.0, 16.0, 0.0, 
-28.0], [-16.0, 35.0, 6.0, 27.0, 75.0]])+(1.-msk_ref)*numpy.array([[54.0, -10.0, 10.0, -7.0, -3.0], [4.0, 29.0, -20.0, 24.0, 
-10.0], [-2.0, -1.0, -12.0, -48.0, 42.0], [-42.0, 9.0, 32.0, -23.0, 33.0]])
+   def test_generalTensorProduct_taggedData_rank3_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-2.0, 3.0], [3.0, 7.0]], [[2.0, 6.0], [7.0, -2.0]], [[4.0, -7.0], [5.0, 1.0]], [[2.0, -2.0], 
+[0.0, -2.0]], [[0.0, 1.0], [-4.0, -3.0]], [[-6.0, -7.0], [7.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, 0.0], [-1.0, 6.0]], [[1.0, 3.0], [-1.0, 5.0]], [[-4.0, 4.0], [0.0, 5.0]], 
+[[2.0, 0.0], [2.0, 3.0]], [[-3.0, -3.0], [-2.0, 3.0]], [[-6.0, -5.0], [4.0, -6.0]]]))
+      arg1=-3.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[6.0, -9.0], [-9.0, -21.0]], [[-6.0, -18.0], [-21.0, 6.0]], [[-12.0, 21.0], [-15.0, -3.0]], 
+[[-6.0, 6.0], [-0.0, 6.0]], [[-0.0, -3.0], [12.0, 9.0]], [[18.0, 21.0], [-21.0, 12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-9.0, -0.0], [3.0, -18.0]], [[-3.0, -9.0], [3.0, -15.0]], [[12.0, -12.0], [-0.0, 
+-15.0]], [[-6.0, -0.0], [-6.0, -9.0]], [[9.0, 9.0], [6.0, -9.0]], [[18.0, 15.0], [-12.0, 18.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[2.0, 2.0, -6.0], [6.0, -3.0, 3.0]])+(1.-msk_arg0)*numpy.array([[6.0, 1.0, 7.0], [-5.0, 2.0, 
--4.0]])
-      arg1=numpy.array([[[[5.0, -6.0, -4.0, -6.0, -5.0], [-7.0, -5.0, -1.0, -1.0, 6.0], [-2.0, 6.0, -5.0, -2.0, 7.0], [-6.0, 
--4.0, 5.0, 7.0, -5.0]], [[2.0, -4.0, -5.0, -4.0, 7.0], [1.0, 1.0, -4.0, 1.0, 1.0], [-7.0, 0.0, -3.0, -6.0, 3.0], [2.0, -6.0, 
--6.0, 1.0, 0.0]], [[2.0, 1.0, 0.0, 4.0, -3.0], [6.0, 7.0, -1.0, -2.0, 3.0], [-5.0, -5.0, -2.0, -5.0, -2.0], [3.0, -2.0, 0.0, 
-2.0, 5.0]]], [[[-7.0, 6.0, 4.0, 7.0, 7.0], [-5.0, 0.0, -2.0, -1.0, 3.0], [-1.0, 0.0, 1.0, 1.0, 6.0], [5.0, -2.0, 5.0, -6.0, 
-1.0]], [[-3.0, 3.0, -6.0, -5.0, 5.0], [4.0, -7.0, 6.0, -3.0, 4.0], [6.0, 3.0, -4.0, 0.0, 7.0], [-6.0, 5.0, 4.0, 7.0, -3.0]], 
-[[-5.0, -5.0, 2.0, -1.0, 7.0], [4.0, -3.0, 3.0, 3.0, 7.0], [5.0, 2.0, -6.0, -4.0, 4.0], [7.0, 5.0, 7.0, -6.0, 0.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-46.0, -14.0, 30.0, 10.0, 70.0], [-78.0, -38.0, -25.0, 24.0, 23.0], [3.0, 39.0, -4.0, 8.0, 
-59.0], [43.0, -20.0, 37.0, -71.0, -25.0]])+(1.-msk_ref)*numpy.array([[95.0, -37.0, -69.0, -53.0, -97.0], [18.0, 18.0, -7.0, 
--32.0, 23.0], [-57.0, -1.0, -36.0, -42.0, -1.0], [-78.0, -44.0, -21.0, 125.0, -6.0]])
+   def test_generalTensorProduct_taggedData_rank3_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[5.0, 2.0], [0.0, -1.0]], [[2.0, -3.0], [4.0, -7.0]], [[-5.0, 1.0], [-3.0, -6.0]], [[-4.0, -7.0], 
+[0.0, 0.0]], [[-6.0, 2.0], [4.0, -5.0]], [[7.0, 6.0], [7.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, 3.0], [-6.0, -2.0]], [[3.0, -6.0], [0.0, 5.0]], [[-2.0, 6.0], [-6.0, -5.0]], 
+[[-4.0, 6.0], [-5.0, 6.0]], [[-5.0, -5.0], [4.0, 7.0]], [[-5.0, -4.0], [-3.0, 6.0]]]))
+      arg1=numpy.array(-3.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-15.0, -6.0], [-0.0, 3.0]], [[-6.0, 9.0], [-12.0, 21.0]], [[15.0, -3.0], [9.0, 18.0]], [[12.0, 
+21.0], [-0.0, -0.0]], [[18.0, -6.0], [-12.0, 15.0]], [[-21.0, -18.0], [-21.0, -9.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[6.0, -9.0], [18.0, 6.0]], [[-9.0, 18.0], [-0.0, -15.0]], [[6.0, -18.0], [18.0, 
+15.0]], [[12.0, -18.0], [15.0, -18.0]], [[15.0, 15.0], [-12.0, -21.0]], [[15.0, 12.0], [9.0, -18.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-2.0)+(1-msk_arg0)*(-6.0)
-      arg1=numpy.array([[[6.0, 7.0], [0.0, 4.0]], [[0.0, -5.0], [5.0, -6.0]], [[-7.0, -5.0], [6.0, -5.0]], [[7.0, -7.0], [5.0, 
--5.0]], [[0.0, -5.0], [0.0, -3.0]], [[-6.0, 3.0], [1.0, 5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, -14.0], [-0.0, -8.0]], [[-0.0, 10.0], [-10.0, 12.0]], [[14.0, 10.0], [-12.0, 10.0]], 
-[[-14.0, 14.0], [-10.0, 10.0]], [[-0.0, 10.0], [-0.0, 6.0]], [[12.0, -6.0], [-2.0, -10.0]]])+(1.-msk_ref)*numpy.array([[[-36.0, 
--42.0], [-0.0, -24.0]], [[-0.0, 30.0], [-30.0, 36.0]], [[42.0, 30.0], [-36.0, 30.0]], [[-42.0, 42.0], [-30.0, 30.0]], [[-0.0, 
-30.0], [-0.0, 18.0]], [[36.0, -18.0], [-6.0, -30.0]]])
+   def test_generalTensorProduct_taggedData_rank4_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-5.0, 3.0, -1.0], [-4.0, -1.0, 6.0]], [[-1.0, 7.0, 1.0], [-4.0, 2.0, 0.0]]], [[[-2.0, 5.0, 
+-7.0], [-7.0, 0.0, -3.0]], [[7.0, 7.0, 3.0], [5.0, 0.0, 0.0]]], [[[-6.0, -1.0, -5.0], [-3.0, -6.0, 6.0]], [[0.0, -5.0, 1.0], 
+[-2.0, -5.0, 2.0]]], [[[-4.0, 7.0, -3.0], [6.0, 0.0, -1.0]], [[4.0, 4.0, 0.0], [1.0, 4.0, 6.0]]], [[[-1.0, 0.0, -3.0], [7.0, 
+-1.0, 2.0]], [[5.0, -7.0, -2.0], [7.0, -1.0, 1.0]]], [[[0.0, 6.0, 6.0], [-4.0, 5.0, -3.0]], [[-1.0, 4.0, -2.0], [1.0, 0.0, 
+-5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, -5.0, 5.0], [4.0, 5.0, -1.0]], [[-5.0, -6.0, 5.0], [0.0, 3.0, -4.0]]], [[[2.0, 
+-6.0, -6.0], [-6.0, -2.0, -5.0]], [[-7.0, -1.0, 1.0], [0.0, 2.0, 2.0]]], [[[-4.0, 0.0, 5.0], [-2.0, 1.0, 4.0]], [[3.0, 0.0, 
+-2.0], [4.0, 2.0, -2.0]]], [[[5.0, 3.0, -6.0], [4.0, -5.0, 3.0]], [[-6.0, -6.0, 2.0], [-7.0, -4.0, 3.0]]], [[[7.0, 0.0, -1.0], 
+[-7.0, 4.0, 3.0]], [[4.0, 7.0, -4.0], [-7.0, 7.0, 7.0]]], [[[-7.0, 5.0, 1.0], [-1.0, -4.0, 3.0]], [[0.0, -7.0, 0.0], [3.0, 1.0, 
+1.0]]]]))
+      arg1=numpy.array([-1.0, 1.0, -7.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[15.0, -39.0], [1.0, 6.0]], [[56.0, 28.0], [-21.0, -5.0]], [[40.0, -45.0], [-12.0, -17.0]], 
+[[32.0, 1.0], [0.0, -39.0]], [[22.0, -22.0], [2.0, -15.0]], [[-36.0, 30.0], [19.0, 34.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-47.0, 8.0], [-36.0, 31.0]], [[34.0, 39.0], [-1.0, -12.0]], [[-31.0, -25.0], [11.0, 
+12.0]], [[40.0, -30.0], [-14.0, -18.0]], [[0.0, -10.0], [31.0, -35.0]], [[5.0, -24.0], [-7.0, -9.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, -4.0, -1.0])+(1.-msk_arg0)*numpy.array([7.0, 5.0, 6.0])
-      arg1=numpy.array([[[[2.0, 1.0], [3.0, -3.0]], [[2.0, -6.0], [-7.0, 6.0]], [[0.0, 6.0], [1.0, -4.0]], [[7.0, -7.0], [7.0, 
-4.0]], [[3.0, 0.0], [7.0, 7.0]], [[6.0, -7.0], [0.0, 7.0]]], [[[5.0, 6.0], [2.0, -5.0]], [[1.0, -6.0], [0.0, 5.0]], [[1.0, 
--6.0], [-6.0, -5.0]], [[-3.0, 2.0], [-5.0, -3.0]], [[-3.0, 2.0], [1.0, 6.0]], [[-5.0, -5.0], [2.0, -7.0]]], [[[-5.0, -7.0], 
-[-2.0, 7.0]], [[-2.0, 0.0], [2.0, 5.0]], [[-2.0, -5.0], [5.0, -7.0]], [[6.0, -5.0], [-4.0, -4.0]], [[0.0, -6.0], [-6.0, -3.0]], 
-[[-5.0, -3.0], [-6.0, 4.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-25.0, -22.0], [-21.0, 28.0]], [[-12.0, 54.0], [33.0, -55.0]], [[-2.0, -1.0], [14.0, 47.0]], 
-[[-29.0, 32.0], [-11.0, -4.0]], [[-3.0, -2.0], [-33.0, -56.0]], [[-5.0, 58.0], [-2.0, 
--11.0]]])+(1.-msk_ref)*numpy.array([[[9.0, -5.0], [19.0, -4.0]], [[7.0, -72.0], [-37.0, 97.0]], [[-7.0, -18.0], [7.0, -95.0]], 
-[[70.0, -69.0], [0.0, -11.0]], [[6.0, -26.0], [18.0, 61.0]], [[-13.0, -92.0], [-26.0, 38.0]]])
+   def test_generalTensorProduct_taggedData_rank3_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, 6.0], [-3.0, -6.0]], [[7.0, 0.0], [1.0, 4.0]], [[0.0, 0.0], [6.0, -1.0]], [[-7.0, -5.0], 
+[1.0, 0.0]], [[-3.0, -6.0], [-1.0, 3.0]], [[-6.0, -3.0], [1.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, 6.0], [-6.0, 3.0]], [[-5.0, -1.0], [7.0, 3.0]], [[6.0, 3.0], [-4.0, -4.0]], 
+[[2.0, -3.0], [3.0, -2.0]], [[-1.0, -6.0], [4.0, -6.0]], [[-5.0, 7.0], [2.0, 7.0]]]))
+      arg1=numpy.array([3.0, -2.0])
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [18.0, -12.0]], [[-9.0, 6.0], [-18.0, 12.0]]], [[[21.0, -14.0], [0.0, 0.0]], [[3.0, 
+-2.0], [12.0, -8.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[18.0, -12.0], [-3.0, 2.0]]], [[[-21.0, 14.0], [-15.0, 10.0]], [[3.0, -2.0], 
+[0.0, 0.0]]], [[[-9.0, 6.0], [-18.0, 12.0]], [[-3.0, 2.0], [9.0, -6.0]]], [[[-18.0, 12.0], [-9.0, 6.0]], [[3.0, -2.0], [6.0, 
+-4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-6.0, 4.0], [18.0, -12.0]], [[-18.0, 12.0], [9.0, -6.0]]], [[[-15.0, 10.0], [-3.0, 
+2.0]], [[21.0, -14.0], [9.0, -6.0]]], [[[18.0, -12.0], [9.0, -6.0]], [[-12.0, 8.0], [-12.0, 8.0]]], [[[6.0, -4.0], [-9.0, 
+6.0]], [[9.0, -6.0], [-6.0, 4.0]]], [[[-3.0, 2.0], [-18.0, 12.0]], [[12.0, -8.0], [-18.0, 12.0]]], [[[-15.0, 10.0], [21.0, 
+-14.0]], [[6.0, -4.0], [21.0, -14.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_array_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(-7.0)
-      arg1=numpy.array([[[[-1.0, 2.0, -3.0, 4.0], [2.0, -7.0, -3.0, 5.0], [3.0, -6.0, 2.0, -3.0]], [[-3.0, -6.0, 0.0, -4.0], 
-[2.0, -4.0, 3.0, 5.0], [5.0, 4.0, 1.0, 2.0]]], [[[-4.0, -5.0, -3.0, 6.0], [2.0, -3.0, -3.0, -7.0], [-3.0, -3.0, -2.0, -5.0]], 
-[[1.0, -4.0, -7.0, -7.0], [-7.0, -3.0, 2.0, -7.0], [-2.0, 1.0, 3.0, -3.0]]], [[[2.0, -2.0, 4.0, 4.0], [6.0, 4.0, 4.0, 1.0], 
-[-3.0, 5.0, 7.0, 3.0]], [[1.0, -4.0, -6.0, 2.0], [-7.0, -6.0, -2.0, 1.0], [-5.0, -5.0, -5.0, 7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-6.0, 12.0, -18.0, 24.0], [12.0, -42.0, -18.0, 30.0], [18.0, -36.0, 12.0, -18.0]], [[-18.0, 
--36.0, 0.0, -24.0], [12.0, -24.0, 18.0, 30.0], [30.0, 24.0, 6.0, 12.0]]], [[[-24.0, -30.0, -18.0, 36.0], [12.0, -18.0, -18.0, 
--42.0], [-18.0, -18.0, -12.0, -30.0]], [[6.0, -24.0, -42.0, -42.0], [-42.0, -18.0, 12.0, -42.0], [-12.0, 6.0, 18.0, -18.0]]], 
-[[[12.0, -12.0, 24.0, 24.0], [36.0, 24.0, 24.0, 6.0], [-18.0, 30.0, 42.0, 18.0]], [[6.0, -24.0, -36.0, 12.0], [-42.0, -36.0, 
--12.0, 6.0], [-30.0, -30.0, -30.0, 42.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -14.0, 21.0, -28.0], [-14.0, 49.0, 21.0, -35.0], 
-[-21.0, 42.0, -14.0, 21.0]], [[21.0, 42.0, -0.0, 28.0], [-14.0, 28.0, -21.0, -35.0], [-35.0, -28.0, -7.0, -14.0]]], [[[28.0, 
-35.0, 21.0, -42.0], [-14.0, 21.0, 21.0, 49.0], [21.0, 21.0, 14.0, 35.0]], [[-7.0, 28.0, 49.0, 49.0], [49.0, 21.0, -14.0, 49.0], 
-[14.0, -7.0, -21.0, 21.0]]], [[[-14.0, 14.0, -28.0, -28.0], [-42.0, -28.0, -28.0, -7.0], [21.0, -35.0, -49.0, -21.0]], [[-7.0, 
-28.0, 42.0, -14.0], [49.0, 42.0, 14.0, -7.0], [35.0, 35.0, 35.0, -49.0]]]])
+   def test_generalTensorProduct_taggedData_rank4_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[7.0, 1.0, -4.0], [4.0, -1.0, 0.0]], [[-5.0, 1.0, 3.0], [-5.0, 4.0, -6.0]]], [[[-3.0, 7.0, 
+-6.0], [1.0, -7.0, 2.0]], [[5.0, 2.0, -1.0], [-3.0, 6.0, 4.0]]], [[[0.0, 3.0, -6.0], [-5.0, 4.0, 7.0]], [[0.0, -1.0, 0.0], 
+[-1.0, -3.0, 6.0]]], [[[0.0, 0.0, -5.0], [-5.0, -3.0, 4.0]], [[-2.0, -5.0, -1.0], [1.0, -2.0, -4.0]]], [[[5.0, 0.0, 5.0], [3.0, 
+1.0, -7.0]], [[0.0, -7.0, 2.0], [-1.0, 7.0, 0.0]]], [[[7.0, -7.0, -1.0], [3.0, -7.0, 6.0]], [[-7.0, -1.0, 2.0], [1.0, 6.0, 
+1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, -3.0, 6.0], [1.0, 6.0, -6.0]], [[-1.0, 3.0, -3.0], [-2.0, 5.0, 2.0]]], 
+[[[-6.0, -7.0, 7.0], [7.0, -1.0, 2.0]], [[-6.0, 0.0, 4.0], [-7.0, 0.0, 3.0]]], [[[1.0, 2.0, 6.0], [2.0, -6.0, 5.0]], [[-7.0, 
+2.0, -7.0], [-6.0, -1.0, 2.0]]], [[[1.0, -1.0, 5.0], [3.0, 0.0, -2.0]], [[-1.0, 2.0, 2.0], [-1.0, -5.0, -3.0]]], [[[-7.0, -1.0, 
+-1.0], [0.0, -1.0, 6.0]], [[-7.0, -3.0, -5.0], [1.0, 5.0, -2.0]]], [[[2.0, 6.0, -5.0], [0.0, 2.0, 2.0]], [[2.0, 5.0, -1.0], 
+[-5.0, -2.0, 5.0]]]]))
+      arg1=numpy.array([[3.0, -7.0], [1.0, -4.0], [0.0, 6.0]])
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[22.0, -77.0], [11.0, -24.0]], [[-14.0, 49.0], [-11.0, -17.0]]], [[[-2.0, -43.0], [-4.0, 33.0]], 
+[[17.0, -49.0], [-3.0, 21.0]]], [[[3.0, -48.0], [-11.0, 61.0]], [[-1.0, 4.0], [-6.0, 55.0]]], [[[0.0, -30.0], [-18.0, 71.0]], 
+[[-11.0, 28.0], [1.0, -23.0]]], [[[15.0, -5.0], [10.0, -67.0]], [[-7.0, 40.0], [4.0, -21.0]]], [[[14.0, -27.0], [2.0, 43.0]], 
+[[-22.0, 65.0], [9.0, -25.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[18.0, -1.0], [9.0, -67.0]], [[0.0, -23.0], [-1.0, 6.0]]], [[[-25.0, 112.0], [20.0, 
+-33.0]], [[-18.0, 66.0], [-21.0, 67.0]]], [[[5.0, 21.0], [0.0, 40.0]], [[-19.0, -1.0], [-19.0, 58.0]]], [[[2.0, 27.0], [9.0, 
+-33.0]], [[-1.0, 11.0], [-8.0, 9.0]]], [[[-22.0, 47.0], [-1.0, 40.0]], [[-24.0, 31.0], [8.0, -39.0]]], [[[12.0, -68.0], [2.0, 
+4.0]], [[11.0, -40.0], [-17.0, 73.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_taggedData_rank3_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[7.0, -2.0], [0.0, 6.0]], [[-5.0, 7.0], [0.0, 0.0]], [[2.0, -5.0], [-3.0, 6.0]], [[-7.0, -2.0], 
+[4.0, -6.0]], [[-1.0, -5.0], [6.0, 3.0]], [[7.0, -1.0], [-2.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 6.0], [4.0, -3.0]], [[2.0, 7.0], [-7.0, 3.0]], [[5.0, 6.0], [-4.0, -6.0]], 
+[[6.0, 3.0], [3.0, 1.0]], [[0.0, 0.0], [4.0, -4.0]], [[-4.0, -7.0], [2.0, -5.0]]]))
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, -0.0], [0.0, 0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [-0.0, 0.0]], [[-0.0, -0.0], 
+[0.0, -0.0]], [[-0.0, -0.0], [0.0, 0.0]], [[0.0, -0.0], [-0.0, -0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [-0.0, -0.0]], 
+[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[-0.0, -0.0], [0.0, -0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(2.0)
-      arg1=Data(-1.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(4.0)+(1.-msk_ref)*numpy.array(-2.0)
+   def test_generalTensorProduct_taggedData_rank4_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-4.0, 0.0, 0.0], [-5.0, 0.0, -6.0]], [[-6.0, -7.0, 0.0], [-5.0, 6.0, 0.0]]], [[[-7.0, 0.0, 
+4.0], [-6.0, -6.0, -7.0]], [[6.0, -2.0, -2.0], [-4.0, 7.0, 5.0]]], [[[-7.0, 3.0, 3.0], [4.0, 1.0, 6.0]], [[-1.0, -5.0, -7.0], 
+[-6.0, -7.0, -5.0]]], [[[0.0, 7.0, -1.0], [-7.0, -1.0, 1.0]], [[6.0, 2.0, 6.0], [-7.0, 7.0, -7.0]]], [[[7.0, -6.0, 3.0], [-5.0, 
+0.0, -6.0]], [[-4.0, -3.0, -6.0], [-7.0, -5.0, 7.0]]], [[[0.0, 6.0, 1.0], [-7.0, 7.0, 7.0]], [[-2.0, 1.0, -7.0], [0.0, 3.0, 
+-3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, -6.0, -7.0], [1.0, 6.0, -1.0]], [[6.0, 2.0, 6.0], [-7.0, -6.0, -5.0]]], 
+[[[-7.0, 6.0, -5.0], [7.0, 0.0, -4.0]], [[0.0, 0.0, -2.0], [0.0, 4.0, 7.0]]], [[[1.0, -6.0, -2.0], [3.0, 4.0, 1.0]], [[0.0, 
+2.0, -5.0], [-5.0, 2.0, 7.0]]], [[[-6.0, 6.0, 1.0], [3.0, -4.0, 7.0]], [[-6.0, 5.0, -1.0], [5.0, 7.0, -2.0]]], [[[7.0, -6.0, 
+-5.0], [4.0, 5.0, 0.0]], [[1.0, 6.0, -6.0], [-3.0, 2.0, 0.0]]], [[[7.0, 5.0, 1.0], [1.0, 3.0, 5.0]], [[-2.0, -6.0, 5.0], [2.0, 
+6.0, -7.0]]]]))
+      arg1=Data(numpy.array([-6.0, 7.0, 6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[24.0, -6.0], [-13.0, 72.0]], [[66.0, -48.0], [-62.0, 103.0]], [[81.0, 19.0], [-71.0, -43.0]], 
+[[43.0, 41.0], [14.0, 49.0]], [[-66.0, -6.0], [-33.0, 49.0]], [[48.0, 133.0], [-23.0, 3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-90.0, 30.0], [14.0, -30.0]], [[54.0, -66.0], [-12.0, 70.0]], [[-60.0, 16.0], [-16.0, 
+86.0]], [[84.0, -4.0], [65.0, 7.0]], [[-114.0, 11.0], [0.0, 32.0]], [[-1.0, 45.0], [0.0, -12.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-2.0, 3.0, -7.0])+(1.-msk_arg0)*numpy.array([7.0, -7.0, 7.0])
-      arg1=Data(numpy.array([-3.0, -1.0, 4.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-25.0)+(1.-msk_ref)*numpy.array(14.0)
+   def test_generalTensorProduct_taggedData_rank3_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[7.0, 0.0], [-7.0, 3.0]], [[-1.0, -7.0], [3.0, -3.0]], [[0.0, 0.0], [-5.0, -1.0]], [[-2.0, -6.0], 
+[-4.0, -2.0]], [[0.0, 4.0], [-4.0, 1.0]], [[-6.0, 0.0], [2.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, -6.0], [5.0, 4.0]], [[0.0, 2.0], [7.0, 6.0]], [[3.0, -2.0], [-2.0, -6.0]], 
+[[-2.0, -6.0], [-3.0, 3.0]], [[-7.0, 3.0], [-7.0, 0.0]], [[7.0, 4.0], [-1.0, -4.0]]]))
+      arg1=Data(numpy.array([4.0, 6.0]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[28.0, 42.0], [0.0, 0.0]], [[-28.0, -42.0], [12.0, 18.0]]], [[[-4.0, -6.0], [-28.0, -42.0]], 
+[[12.0, 18.0], [-12.0, -18.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[-20.0, -30.0], [-4.0, -6.0]]], [[[-8.0, -12.0], [-24.0, -36.0]], 
+[[-16.0, -24.0], [-8.0, -12.0]]], [[[0.0, 0.0], [16.0, 24.0]], [[-16.0, -24.0], [4.0, 6.0]]], [[[-24.0, -36.0], [0.0, 0.0]], 
+[[8.0, 12.0], [0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[20.0, 30.0], [-24.0, -36.0]], [[20.0, 30.0], [16.0, 24.0]]], [[[0.0, 0.0], [8.0, 
+12.0]], [[28.0, 42.0], [24.0, 36.0]]], [[[12.0, 18.0], [-8.0, -12.0]], [[-8.0, -12.0], [-24.0, -36.0]]], [[[-8.0, -12.0], 
+[-24.0, -36.0]], [[-12.0, -18.0], [12.0, 18.0]]], [[[-28.0, -42.0], [12.0, 18.0]], [[-28.0, -42.0], [0.0, 0.0]]], [[[28.0, 
+42.0], [16.0, 24.0]], [[-4.0, -6.0], [-16.0, -24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-2.0, 7.0, 0.0], [5.0, -1.0, -7.0]])+(1.-msk_arg0)*numpy.array([[7.0, 3.0, 2.0], [-6.0, -5.0, 
-7.0]])
-      arg1=Data(numpy.array([[-7.0, -5.0, 1.0], [5.0, 7.0, -1.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(4.0)+(1.-msk_ref)*numpy.array(-134.0)
+   def test_generalTensorProduct_taggedData_rank4_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[7.0, 6.0, 0.0], [-7.0, -3.0, 0.0]], [[3.0, -1.0, 3.0], [0.0, 0.0, 4.0]]], [[[0.0, 2.0, 1.0], 
+[7.0, -1.0, 7.0]], [[-2.0, -5.0, -7.0], [4.0, 0.0, -7.0]]], [[[-1.0, 7.0, 6.0], [-1.0, -2.0, 2.0]], [[6.0, -4.0, -1.0], [5.0, 
+1.0, 2.0]]], [[[1.0, 7.0, -7.0], [-2.0, -6.0, -4.0]], [[5.0, -7.0, 0.0], [-4.0, -5.0, 6.0]]], [[[0.0, -7.0, 3.0], [1.0, -7.0, 
+5.0]], [[0.0, -4.0, -5.0], [-1.0, -2.0, -1.0]]], [[[-2.0, 5.0, -6.0], [5.0, 4.0, -3.0]], [[-6.0, 1.0, 0.0], [7.0, -5.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, 2.0, 0.0], [-2.0, -4.0, 1.0]], [[7.0, -3.0, -3.0], [-2.0, 0.0, 3.0]]], 
+[[[-4.0, -5.0, 2.0], [-3.0, 3.0, 5.0]], [[0.0, -7.0, 1.0], [-6.0, 5.0, -2.0]]], [[[-3.0, -2.0, 1.0], [5.0, 4.0, 4.0]], [[6.0, 
+3.0, -5.0], [7.0, 4.0, 7.0]]], [[[-6.0, 5.0, 0.0], [3.0, 1.0, -3.0]], [[5.0, 7.0, 3.0], [6.0, -1.0, -3.0]]], [[[7.0, 3.0, 
+-6.0], [0.0, -7.0, -5.0]], [[3.0, 0.0, 0.0], [1.0, 7.0, 2.0]]], [[[5.0, 5.0, 7.0], [4.0, 3.0, 0.0]], [[3.0, -6.0, -4.0], [1.0, 
+-2.0, -1.0]]]]))
+      arg1=Data(numpy.array([[-1.0, 0.0], [-4.0, 5.0], [7.0, 0.0]]),self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-31.0, 30.0], [19.0, -15.0]], [[22.0, -5.0], [28.0, 0.0]]], [[[-1.0, 10.0], [46.0, -5.0]], 
+[[-27.0, -25.0], [-53.0, 0.0]]], [[[15.0, 35.0], [23.0, -10.0]], [[3.0, -20.0], [5.0, 5.0]]], [[[-78.0, 35.0], [-2.0, -30.0]], 
+[[23.0, -35.0], [66.0, -25.0]]], [[[49.0, -35.0], [62.0, -35.0]], [[-19.0, -20.0], [2.0, -10.0]]], [[[-60.0, 25.0], [-42.0, 
+20.0]], [[2.0, 5.0], [6.0, -25.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-5.0, 10.0], [25.0, -20.0]], [[-16.0, -15.0], [23.0, 0.0]]], [[[38.0, -25.0], [26.0, 
+15.0]], [[35.0, -35.0], [-28.0, 25.0]]], [[[18.0, -10.0], [7.0, 20.0]], [[-53.0, 15.0], [26.0, 20.0]]], [[[-14.0, 25.0], 
+[-28.0, 5.0]], [[-12.0, 35.0], [-23.0, -5.0]]], [[[-61.0, 15.0], [-7.0, -35.0]], [[-3.0, 0.0], [-15.0, 35.0]]], [[[24.0, 25.0], 
+[-16.0, 15.0]], [[-7.0, -30.0], [0.0, -10.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[3.0, 5.0, -7.0], [7.0, 2.0, 5.0], [-2.0, -6.0, 3.0], [-1.0, -5.0, -2.0]], [[-2.0, 1.0, 
--3.0], [-1.0, -5.0, 6.0], [-4.0, -2.0, 0.0], [-4.0, 0.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, -1.0, -4.0], [4.0, -4.0, 
--1.0], [-5.0, 3.0, 1.0], [-1.0, 0.0, -4.0]], [[6.0, -4.0, 0.0], [-7.0, 5.0, 0.0], [-6.0, -4.0, -6.0], [7.0, -2.0, 1.0]]])
-      arg1=Data(numpy.array([[[6.0, 7.0, 3.0], [7.0, -2.0, -6.0], [-7.0, 4.0, -3.0], [0.0, -7.0, 3.0]], [[-1.0, -5.0, -4.0], 
-[7.0, 2.0, 0.0], [5.0, -2.0, 5.0], [0.0, 0.0, -2.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(23.0)+(1.-msk_ref)*numpy.array(-30.0)
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[6.0, 1.0], [0.0, 1.0]], [[-7.0, 7.0], [-4.0, -2.0]], [[-4.0, 2.0], [4.0, 0.0]], [[5.0, 3.0], 
+[5.0, 2.0]], [[2.0, -1.0], [6.0, -2.0]], [[0.0, -6.0], [-3.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 1.0], [-1.0, -7.0]], [[-6.0, 3.0], [6.0, 6.0]], [[-7.0, 5.0], [-5.0, 5.0]], 
+[[-3.0, -4.0], [0.0, 1.0]], [[-6.0, 0.0], [-1.0, 6.0]], [[5.0, 1.0], [7.0, -1.0]]]))
+      arg1=Data(6.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[36.0, 6.0], [0.0, 6.0]], [[-42.0, 42.0], [-24.0, -12.0]], [[-24.0, 12.0], [24.0, 0.0]], [[30.0, 
+18.0], [30.0, 12.0]], [[12.0, -6.0], [36.0, -12.0]], [[0.0, -36.0], [-18.0, -36.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[4.0, -4.0], [4.0, 28.0]], [[24.0, -12.0], [-24.0, -24.0]], [[28.0, -20.0], [20.0, 
+-20.0]], [[12.0, 16.0], [-0.0, -4.0]], [[24.0, -0.0], [4.0, -24.0]], [[-20.0, -4.0], [-28.0, 4.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[1.0, -4.0], [-5.0, 2.0], [7.0, 1.0]], [[-6.0, 3.0], [-7.0, 0.0], [-3.0, -6.0]]], [[[5.0, 
-4.0], [6.0, -3.0], [7.0, 3.0]], [[2.0, -7.0], [7.0, 5.0], [-5.0, -5.0]]], [[[-4.0, -2.0], [-1.0, 0.0], [4.0, -6.0]], [[1.0, 
--1.0], [4.0, 3.0], [3.0, 0.0]]], [[[2.0, -4.0], [2.0, -7.0], [-1.0, 3.0]], [[0.0, -2.0], [-3.0, -1.0], [-5.0, 
-6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, -7.0], [-3.0, -4.0], [0.0, 2.0]], [[-2.0, -3.0], [5.0, -7.0], [5.0, -7.0]]], 
-[[[4.0, 0.0], [-6.0, -5.0], [3.0, -5.0]], [[-7.0, -7.0], [-4.0, 7.0], [0.0, 3.0]]], [[[6.0, -7.0], [-2.0, 3.0], [0.0, -2.0]], 
-[[-2.0, 4.0], [-6.0, 6.0], [6.0, 6.0]]], [[[5.0, -2.0], [-7.0, 4.0], [5.0, 1.0]], [[3.0, -6.0], [7.0, 1.0], [7.0, -6.0]]]])
-      arg1=Data(numpy.array([[[[-1.0, -1.0], [-4.0, -7.0], [5.0, -1.0]], [[4.0, 5.0], [5.0, 6.0], [-7.0, 0.0]]], [[[2.0, -2.0], 
-[0.0, 3.0], [-1.0, 5.0]], [[-6.0, 0.0], [4.0, 6.0], [0.0, 5.0]]], [[[6.0, -5.0], [7.0, -4.0], [6.0, -7.0]], [[-4.0, 0.0], 
-[-5.0, -1.0], [-4.0, 5.0]]], [[[7.0, 0.0], [3.0, 2.0], [-5.0, 3.0]], [[5.0, -6.0], [0.0, -2.0], [2.0, 
-6.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(108.0)+(1.-msk_ref)*numpy.array(149.0)
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 5.0, -3.0], [5.0, 0.0, 2.0]], [[2.0, 2.0, 3.0], [4.0, -6.0, -4.0]]], [[[4.0, 1.0, -2.0], 
+[2.0, 3.0, -4.0]], [[6.0, -4.0, -3.0], [-5.0, 3.0, -1.0]]], [[[-1.0, 7.0, -3.0], [6.0, -3.0, 6.0]], [[-3.0, -4.0, 5.0], [1.0, 
+0.0, 0.0]]], [[[-6.0, -2.0, 0.0], [6.0, 0.0, 4.0]], [[0.0, -1.0, -7.0], [-6.0, 3.0, 6.0]]], [[[-3.0, 1.0, 7.0], [4.0, -5.0, 
+0.0]], [[-3.0, 2.0, 2.0], [2.0, -2.0, -4.0]]], [[[-1.0, -3.0, 2.0], [7.0, 0.0, -6.0]], [[-3.0, -7.0, -4.0], [-3.0, -4.0, 
+-6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 1.0, 6.0], [4.0, 1.0, -5.0]], [[2.0, 6.0, 3.0], [7.0, 6.0, -2.0]]], [[[-6.0, 
+-1.0, -1.0], [5.0, -7.0, -2.0]], [[0.0, 7.0, 6.0], [-7.0, 2.0, -7.0]]], [[[0.0, -6.0, 2.0], [-2.0, 5.0, -1.0]], [[-4.0, 1.0, 
+-1.0], [5.0, 0.0, 4.0]]], [[[0.0, -6.0, 2.0], [-5.0, 6.0, -7.0]], [[-7.0, 5.0, 4.0], [-2.0, -1.0, 0.0]]], [[[0.0, 6.0, 4.0], 
+[3.0, 0.0, -4.0]], [[-2.0, -5.0, -3.0], [6.0, -7.0, 5.0]]], [[[-2.0, 3.0, 3.0], [0.0, -1.0, 2.0]], [[2.0, -3.0, -6.0], [5.0, 
+0.0, 1.0]]]]))
+      arg1=Data(numpy.array([1.0, -2.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-2.0, -1.0, -3.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-13.0, 7.0], [1.0, 12.0]], [[0.0, -8.0], [11.0, -12.0]], [[-18.0, 18.0], [10.0, 1.0]], [[-2.0, 
+10.0], [-5.0, -6.0]], [[2.0, 14.0], [-5.0, 2.0]], [[7.0, 1.0], [7.0, -1.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-33.0, 6.0], [-19.0, -14.0]], [[16.0, 3.0], [-25.0, 33.0]], [[0.0, 2.0], [10.0, 
+-22.0]], [[0.0, 25.0], [-3.0, 5.0]], [[-18.0, 6.0], [18.0, -20.0]], [[-8.0, -5.0], [17.0, -13.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(-5.0)
-      arg1=Data(numpy.array([-3.0, 4.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([12.0, -16.0])+(1.-msk_ref)*numpy.array([15.0, -20.0])
+   def test_generalTensorProduct_taggedData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[6.0, -5.0], [6.0, 0.0]], [[-5.0, -5.0], [4.0, 6.0]], [[-7.0, 6.0], [3.0, -2.0]], [[-6.0, -7.0], 
+[3.0, -7.0]], [[3.0, 1.0], [7.0, -7.0]], [[-4.0, 1.0], [0.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-7.0, 7.0], [-4.0, 7.0]], [[4.0, -3.0], [2.0, -7.0]], [[-2.0, 7.0], [-7.0, 4.0]], 
+[[3.0, -3.0], [1.0, -1.0]], [[5.0, 1.0], [6.0, -7.0]], [[0.0, 6.0], [6.0, 0.0]]]))
+      arg1=Data(numpy.array([5.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, 5.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[30.0, -12.0], [-25.0, 10.0]], [[30.0, -12.0], [0.0, 0.0]]], [[[-25.0, 10.0], [-25.0, 10.0]], 
+[[20.0, -8.0], [30.0, -12.0]]], [[[-35.0, 14.0], [30.0, -12.0]], [[15.0, -6.0], [-10.0, 4.0]]], [[[-30.0, 12.0], [-35.0, 
+14.0]], [[15.0, -6.0], [-35.0, 14.0]]], [[[15.0, -6.0], [5.0, -2.0]], [[35.0, -14.0], [-35.0, 14.0]]], [[[-20.0, 8.0], [5.0, 
+-2.0]], [[0.0, 0.0], [-5.0, 2.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -35.0], [0.0, 35.0]], [[0.0, -20.0], [0.0, 35.0]]], [[[0.0, 20.0], [0.0, 
+-15.0]], [[0.0, 10.0], [0.0, -35.0]]], [[[0.0, -10.0], [0.0, 35.0]], [[0.0, -35.0], [0.0, 20.0]]], [[[0.0, 15.0], [0.0, 
+-15.0]], [[0.0, 5.0], [0.0, -5.0]]], [[[0.0, 25.0], [0.0, 5.0]], [[0.0, 30.0], [0.0, -35.0]]], [[[0.0, 0.0], [0.0, 30.0]], 
+[[0.0, 30.0], [0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-7.0, 2.0, -2.0])+(1.-msk_arg0)*numpy.array([-7.0, 3.0, -5.0])
-      arg1=Data(numpy.array([[2.0, 0.0], [3.0, 2.0], [1.0, 3.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-10.0, -2.0])+(1.-msk_ref)*numpy.array([-10.0, -9.0])
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-2.0, 0.0, 6.0], [1.0, -4.0, -6.0]], [[-1.0, -1.0, 7.0], [-1.0, -3.0, -4.0]]], [[[-3.0, 0.0, 
+-1.0], [-4.0, -3.0, 1.0]], [[0.0, 0.0, 2.0], [-4.0, 0.0, 4.0]]], [[[-5.0, 6.0, 7.0], [6.0, 4.0, -5.0]], [[1.0, 1.0, -1.0], 
+[-7.0, 7.0, 7.0]]], [[[-5.0, 0.0, -3.0], [-2.0, -4.0, -3.0]], [[-5.0, -3.0, 1.0], [1.0, -2.0, 2.0]]], [[[0.0, 3.0, 3.0], [-6.0, 
+-1.0, 1.0]], [[0.0, -4.0, -1.0], [-1.0, -1.0, -5.0]]], [[[0.0, -1.0, 2.0], [-2.0, 0.0, 5.0]], [[-5.0, 2.0, 7.0], [0.0, 5.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, -1.0, 3.0], [-3.0, 7.0, 3.0]], [[1.0, -1.0, 4.0], [-5.0, 7.0, 2.0]]], [[[-6.0, 
+0.0, -1.0], [-2.0, 0.0, 0.0]], [[-1.0, -5.0, 0.0], [-2.0, -1.0, 0.0]]], [[[2.0, 0.0, 4.0], [-6.0, -5.0, 2.0]], [[0.0, -1.0, 
+-7.0], [-3.0, 2.0, 6.0]]], [[[3.0, -2.0, -1.0], [0.0, 5.0, -2.0]], [[7.0, -2.0, -2.0], [7.0, -4.0, 3.0]]], [[[2.0, -6.0, -4.0], 
+[-7.0, -1.0, -3.0]], [[4.0, 0.0, 0.0], [0.0, -4.0, 7.0]]], [[[6.0, 0.0, 4.0], [-5.0, -3.0, 2.0]], [[-3.0, 6.0, -6.0], [0.0, 
+0.0, 0.0]]]]))
+      arg1=Data(numpy.array([[0.0, 2.0], [1.0, 1.0], [6.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, 1.0], [-2.0, -3.0], [4.0, -2.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[36.0, -28.0], [-40.0, 22.0]], [[41.0, -31.0], [-27.0, 11.0]]], [[[-6.0, -2.0], [3.0, -15.0]], 
+[[12.0, -8.0], [24.0, -24.0]]], [[[48.0, -32.0], [-26.0, 36.0]], [[-5.0, 7.0], [49.0, -35.0]]], [[[-18.0, 2.0], [-22.0, 4.0]], 
+[[3.0, -17.0], [10.0, -8.0]]], [[[21.0, -9.0], [5.0, -17.0]], [[-10.0, 0.0], [-31.0, 17.0]]], [[[11.0, -9.0], [30.0, -24.0]], 
+[[44.0, -36.0], [5.0, 5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[14.0, -3.0], [-17.0, -30.0]], [[23.0, -4.0], [-31.0, -30.0]]], [[[-34.0, -4.0], 
+[-10.0, -2.0]], [[5.0, 14.0], [-8.0, 1.0]]], [[[26.0, -6.0], [-12.0, 5.0]], [[-26.0, 17.0], [5.0, -21.0]]], [[[15.0, 11.0], 
+[-18.0, -11.0]], [[31.0, 17.0], [55.0, 13.0]]], [[[6.0, 28.0], [-45.0, 2.0]], [[20.0, 4.0], [36.0, -2.0]]], [[[46.0, -2.0], 
+[-11.0, 0.0]], [[-51.0, -9.0], [0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 5.0, -6.0], [2.0, -1.0, 1.0]])+(1.-msk_arg0)*numpy.array([[-3.0, 6.0, -1.0], [4.0, -1.0, 
-5.0]])
-      arg1=Data(numpy.array([[[3.0, -7.0], [-5.0, 0.0], [4.0, 5.0]], [[-4.0, -2.0], [-3.0, 7.0], [2.0, 
-7.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[0.0, 3.0], [5.0, 0.0]], [[0.0, -4.0], [1.0, 1.0]], [[0.0, -1.0], [-3.0, 4.0]], [[3.0, 5.0], 
+[0.0, 2.0]], [[7.0, 0.0], [0.0, 3.0]], [[4.0, -2.0], [2.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 0.0], [4.0, -7.0]], [[1.0, -7.0], [1.0, 0.0]], [[-3.0, -3.0], [-7.0, 0.0]], 
+[[1.0, 1.0], [-7.0, 1.0]], [[6.0, 6.0], [3.0, -7.0]], [[3.0, -5.0], [0.0, 1.0]]]))
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,3.0)
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-37.0, -69.0])+(1.-msk_ref)*numpy.array([-46.0, 36.0])
+      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[0.0, -0.0], [-0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, 0.0], [12.0, -21.0]], 
+[[3.0, -21.0], [3.0, 0.0]], [[-9.0, -9.0], [-21.0, 0.0]], [[3.0, 3.0], [-21.0, 3.0]], [[18.0, 18.0], [9.0, -21.0]], [[9.0, 
+-15.0], [0.0, 3.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-2.0, 2.0, 4.0], [7.0, -5.0, 2.0], [0.0, 4.0, 1.0], [4.0, 7.0, 4.0]], [[6.0, 0.0, 2.0], 
-[-1.0, 0.0, -6.0], [-5.0, 1.0, 6.0], [3.0, -6.0, -2.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 2.0, 3.0], [0.0, -2.0, -6.0], 
-[-4.0, -5.0, 2.0], [7.0, -6.0, -5.0]], [[4.0, -7.0, -5.0], [-4.0, 2.0, -2.0], [0.0, -7.0, 2.0], [2.0, 0.0, -1.0]]])
-      arg1=Data(numpy.array([[[[2.0, 6.0], [0.0, 3.0], [-3.0, 3.0]], [[-1.0, 2.0], [-4.0, -5.0], [2.0, -2.0]], [[-7.0, -2.0], 
-[3.0, -2.0], [0.0, -7.0]], [[-4.0, -3.0], [-3.0, -1.0], [-5.0, -6.0]]], [[[6.0, 0.0], [5.0, 4.0], [-2.0, -6.0]], [[1.0, 1.0], 
-[0.0, 2.0], [-2.0, 0.0]], [[0.0, 0.0], [2.0, 5.0], [-1.0, -3.0]], [[-1.0, -7.0], [-5.0, 3.0], [3.0, 0.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-4.0, 0.0, 2.0], [1.0, 5.0, 5.0]], [[0.0, -2.0, -7.0], [6.0, 1.0, -4.0]]], [[[3.0, 6.0, -2.0], 
+[-3.0, -2.0, -2.0]], [[2.0, -1.0, 5.0], [-4.0, -4.0, 4.0]]], [[[4.0, 6.0, 0.0], [0.0, 7.0, -4.0]], [[-6.0, -4.0, 5.0], [1.0, 
+-2.0, -5.0]]], [[[1.0, -6.0, 0.0], [-2.0, 7.0, -2.0]], [[3.0, 2.0, 6.0], [4.0, 0.0, 2.0]]], [[[-3.0, -4.0, -2.0], [0.0, 3.0, 
+0.0]], [[5.0, 3.0, 1.0], [4.0, 7.0, 0.0]]], [[[6.0, 6.0, 4.0], [7.0, 1.0, -5.0]], [[0.0, 0.0, -2.0], [5.0, 5.0, 
+-6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 7.0, -4.0], [0.0, -7.0, 7.0]], [[0.0, 5.0, 1.0], [-5.0, -6.0, -4.0]]], 
+[[[-5.0, 0.0, 6.0], [3.0, 0.0, -1.0]], [[3.0, -4.0, 1.0], [4.0, 5.0, 0.0]]], [[[6.0, -1.0, 2.0], [-4.0, -4.0, 0.0]], [[-6.0, 
+-2.0, -2.0], [-7.0, 5.0, -5.0]]], [[[4.0, -5.0, 0.0], [7.0, -4.0, -3.0]], [[-4.0, 0.0, -4.0], [-7.0, 0.0, 2.0]]], [[[-1.0, 
+-1.0, -2.0], [-2.0, -2.0, 7.0]], [[-7.0, -6.0, 0.0], [-5.0, -4.0, -5.0]]], [[[-7.0, -2.0, 0.0], [0.0, -3.0, -3.0]], [[0.0, 0.0, 
+-4.0], [-6.0, 0.0, 4.0]]]]))
+      arg1=Data(numpy.array([-5.0, -1.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-7.0, -5.0, -4.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([16.0, -82.0])+(1.-msk_ref)*numpy.array([-7.0, 3.0])
+      ref=msk_ref*numpy.array([[[12.0, -30.0], [30.0, -15.0]], [[-13.0, 25.0], [-29.0, 8.0]], [[-26.0, 9.0], [14.0, 17.0]], 
+[[1.0, 11.0], [-41.0, -28.0]], [[27.0, -3.0], [-32.0, -27.0]], [[-52.0, -16.0], [8.0, 
+-6.0]]])+(1.-msk_ref)*numpy.array([[[23.0, 7.0], [-29.0, 81.0]], [[11.0, -17.0], [-5.0, -53.0]], [[-45.0, 48.0], [60.0, 44.0]], 
+[[-3.0, -17.0], [44.0, 41.0]], [[20.0, -4.0], [79.0, 75.0]], [[59.0, 27.0], [16.0, 26.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(5.0)+(1-msk_arg0)*(5.0)
-      arg1=Data(numpy.array([[6.0, -1.0, 4.0, 5.0, 4.0], [2.0, 4.0, 3.0, 0.0, -1.0], [5.0, 0.0, -3.0, 1.0, -3.0], [6.0, -4.0, 
--5.0, 6.0, 3.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank3_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-1.0, 2.0], [-3.0, 1.0]], [[-2.0, 7.0], [-3.0, 3.0]], [[0.0, -1.0], [-7.0, 3.0]], [[0.0, -3.0], 
+[3.0, 1.0]], [[6.0, 5.0], [-2.0, 0.0]], [[2.0, 0.0], [0.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, 7.0], [2.0, -4.0]], [[-1.0, -4.0], [-1.0, -4.0]], [[5.0, -3.0], [-3.0, -5.0]], 
+[[-1.0, -5.0], [0.0, 0.0]], [[-6.0, -6.0], [-3.0, 7.0]], [[-4.0, -5.0], [0.0, -5.0]]]))
+      arg1=Data(numpy.array([5.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -4.0]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[30.0, -5.0, 20.0, 25.0, 20.0], [10.0, 20.0, 15.0, 0.0, -5.0], [25.0, 0.0, -15.0, 5.0, -15.0], 
-[30.0, -20.0, -25.0, 30.0, 15.0]])+(1.-msk_ref)*numpy.array([[30.0, -5.0, 20.0, 25.0, 20.0], [10.0, 20.0, 15.0, 0.0, -5.0], 
-[25.0, 0.0, -15.0, 5.0, -15.0], [30.0, -20.0, -25.0, 30.0, 15.0]])
+      ref=msk_ref*numpy.array([[[[-5.0, -1.0], [10.0, 2.0]], [[-15.0, -3.0], [5.0, 1.0]]], [[[-10.0, -2.0], [35.0, 7.0]], 
+[[-15.0, -3.0], [15.0, 3.0]]], [[[0.0, 0.0], [-5.0, -1.0]], [[-35.0, -7.0], [15.0, 3.0]]], [[[0.0, 0.0], [-15.0, -3.0]], 
+[[15.0, 3.0], [5.0, 1.0]]], [[[30.0, 6.0], [25.0, 5.0]], [[-10.0, -2.0], [0.0, 0.0]]], [[[10.0, 2.0], [0.0, 0.0]], [[0.0, 0.0], 
+[10.0, 2.0]]]])+(1.-msk_ref)*numpy.array([[[[6.0, -12.0], [14.0, -28.0]], [[4.0, -8.0], [-8.0, 16.0]]], [[[-2.0, 4.0], [-8.0, 
+16.0]], [[-2.0, 4.0], [-8.0, 16.0]]], [[[10.0, -20.0], [-6.0, 12.0]], [[-6.0, 12.0], [-10.0, 20.0]]], [[[-2.0, 4.0], [-10.0, 
+20.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-12.0, 24.0], [-12.0, 24.0]], [[-6.0, 12.0], [14.0, -28.0]]], [[[-8.0, 16.0], [-10.0, 
+20.0]], [[0.0, 0.0], [-10.0, 20.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([1.0, 7.0, -6.0])+(1.-msk_arg0)*numpy.array([-5.0, -6.0, 0.0])
-      arg1=Data(numpy.array([[[-7.0, -3.0, 1.0, 7.0, 7.0], [1.0, 2.0, 2.0, -7.0, 3.0], [2.0, -2.0, 5.0, 5.0, -7.0], [3.0, 7.0, 
-6.0, 2.0, 2.0]], [[5.0, -5.0, -2.0, 7.0, 7.0], [-5.0, 6.0, 4.0, 4.0, -7.0], [-6.0, 4.0, -7.0, -3.0, -2.0], [4.0, 0.0, 5.0, 
--2.0, 0.0]], [[-5.0, -3.0, -7.0, 6.0, 0.0], [6.0, 0.0, 2.0, 2.0, 5.0], [0.0, 4.0, -5.0, -6.0, 1.0], [-3.0, 0.0, -1.0, -7.0, 
--3.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-7.0, 2.0, 3.0], [2.0, -4.0, 2.0]], [[0.0, -7.0, -7.0], [-5.0, -7.0, -1.0]]], [[[-2.0, -1.0, 
+2.0], [2.0, -4.0, 1.0]], [[0.0, 1.0, -7.0], [-5.0, -5.0, -1.0]]], [[[-1.0, -2.0, 2.0], [-2.0, 4.0, 4.0]], [[-6.0, 5.0, 2.0], 
+[-4.0, 5.0, -5.0]]], [[[-1.0, -5.0, -2.0], [5.0, -3.0, 0.0]], [[1.0, -4.0, 3.0], [7.0, 7.0, -3.0]]], [[[4.0, -3.0, -4.0], 
+[-5.0, 7.0, -5.0]], [[3.0, 2.0, 6.0], [-6.0, -6.0, 0.0]]], [[[2.0, -1.0, -7.0], [-1.0, 5.0, 1.0]], [[7.0, 2.0, 4.0], [-5.0, 
+6.0, -4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 4.0, 1.0], [-4.0, -2.0, -2.0]], [[-3.0, 6.0, -3.0], [-2.0, -1.0, -3.0]]], 
+[[[-1.0, -2.0, -1.0], [0.0, -5.0, 0.0]], [[-2.0, 0.0, -3.0], [5.0, 1.0, -2.0]]], [[[5.0, -6.0, -3.0], [-7.0, -2.0, -7.0]], 
+[[-3.0, 4.0, -7.0], [4.0, 1.0, -2.0]]], [[[5.0, 4.0, 0.0], [0.0, 3.0, 6.0]], [[-5.0, 4.0, -6.0], [3.0, 7.0, -2.0]]], [[[-5.0, 
+-5.0, 5.0], [3.0, -4.0, -4.0]], [[-7.0, 4.0, -4.0], [3.0, 6.0, -5.0]]], [[[-4.0, 4.0, 5.0], [6.0, 3.0, 6.0]], [[3.0, 0.0, 0.0], 
+[7.0, 1.0, -3.0]]]]))
+      arg1=Data(numpy.array([[-7.0, 1.0], [0.0, -5.0], [6.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 0.0], [2.0, 7.0], [1.0, -7.0]]))
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[58.0, -20.0, 29.0, 20.0, 56.0], [-70.0, 44.0, 18.0, 9.0, -76.0], [-40.0, 2.0, -14.0, 20.0, 
--27.0], [49.0, 7.0, 47.0, 30.0, 20.0]])+(1.-msk_ref)*numpy.array([[5.0, 45.0, 7.0, -77.0, -77.0], [25.0, -46.0, -34.0, 11.0, 
-27.0], [26.0, -14.0, 17.0, -7.0, 47.0], [-39.0, -35.0, -60.0, 2.0, -10.0]])
+      ref=msk_ref*numpy.array([[[[67.0, -17.0], [-2.0, 22.0]], [[-42.0, 35.0], [29.0, 30.0]]], [[[26.0, 3.0], [-8.0, 22.0]], 
+[[-42.0, -5.0], [29.0, 20.0]]], [[[19.0, 9.0], [38.0, -22.0]], [[54.0, -31.0], [-2.0, -29.0]]], [[[-5.0, 24.0], [-35.0, 20.0]], 
+[[11.0, 21.0], [-67.0, -28.0]]], [[[-52.0, 19.0], [5.0, -40.0]], [[15.0, -7.0], [42.0, 24.0]]], [[[-56.0, 7.0], [13.0, -26.0]], 
+[[-25.0, -3.0], [11.0, -35.0]]]])+(1.-msk_ref)*numpy.array([[[[-9.0, 21.0], [-18.0, 0.0]], [[0.0, 63.0], [-11.0, 14.0]]], 
+[[[-8.0, -7.0], [-10.0, -35.0]], [[-9.0, 21.0], [15.0, 21.0]]], [[[0.0, -21.0], [-32.0, 35.0]], [[-8.0, 77.0], [12.0, 21.0]]], 
+[[[23.0, 28.0], [12.0, -21.0]], [[-13.0, 70.0], [21.0, 63.0]]], [[[-20.0, -70.0], [-3.0, 0.0]], [[-17.0, 56.0], [16.0, 77.0]]], 
+[[[1.0, -7.0], [30.0, -21.0]], [[9.0, 0.0], [20.0, 28.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, -7.0, -3.0], [-7.0, 0.0, 7.0]])+(1.-msk_arg0)*numpy.array([[6.0, 1.0, 2.0], [0.0, -4.0, 
-4.0]])
-      arg1=Data(numpy.array([[[[-4.0, -1.0, -2.0, -3.0, 0.0], [-6.0, 1.0, 5.0, 1.0, 3.0], [2.0, -3.0, 0.0, -1.0, 4.0], [6.0, 
-6.0, 5.0, -3.0, -7.0]], [[3.0, -3.0, -1.0, 6.0, 1.0], [5.0, -5.0, 4.0, -2.0, 6.0], [5.0, 4.0, -7.0, 0.0, 0.0], [-6.0, -1.0, 
-7.0, 5.0, 7.0]], [[0.0, -5.0, -2.0, -1.0, 6.0], [6.0, -3.0, 1.0, -7.0, -5.0], [2.0, -2.0, 0.0, 0.0, 5.0], [4.0, 1.0, 4.0, -4.0, 
-0.0]]], [[[-5.0, -4.0, -2.0, 4.0, 0.0], [-2.0, 3.0, -3.0, 2.0, -2.0], [4.0, 2.0, -1.0, 1.0, 7.0], [-6.0, -2.0, 1.0, -7.0, 
--4.0]], [[4.0, -7.0, -5.0, -7.0, 0.0], [-1.0, -5.0, -4.0, 4.0, -5.0], [0.0, -4.0, -7.0, 0.0, -7.0], [6.0, 4.0, -5.0, 3.0, 
--3.0]], [[1.0, -7.0, -2.0, -3.0, 5.0], [-7.0, 0.0, 5.0, -4.0, -3.0], [6.0, 7.0, 2.0, -6.0, 0.0], [-4.0, 0.0, -3.0, -5.0, 
-7.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[5.0, 11.0, 5.0, -100.0, 10.0], [-112.0, 27.0, 45.0, -3.0, -22.0], [-19.0, 1.0, 70.0, -53.0, 
--48.0], [68.0, 42.0, -69.0, -21.0, 0.0]])+(1.-msk_ref)*numpy.array([[-33.0, -19.0, -5.0, 2.0, 33.0], [-43.0, 15.0, 72.0, -42.0, 
-22.0], [45.0, 26.0, 29.0, -30.0, 62.0], [-2.0, 21.0, 53.0, -53.0, 5.0]])
+   def test_generalTensorProduct_taggedData_rank4_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-2.0, 0.0, 1.0, -1.0], [-2.0, 6.0, 3.0, 5.0], [-7.0, 0.0, 7.0, 3.0]], [[-7.0, 1.0, -7.0, 6.0], 
+[7.0, 1.0, -2.0, 5.0], [0.0, 2.0, 4.0, -4.0]]], [[[3.0, -7.0, 2.0, 0.0], [-4.0, 6.0, 5.0, 3.0], [3.0, 1.0, -2.0, -1.0]], 
+[[-6.0, 0.0, -1.0, -3.0], [5.0, -7.0, -6.0, -2.0], [4.0, -7.0, 4.0, 0.0]]], [[[1.0, 4.0, 0.0, 7.0], [4.0, 6.0, -4.0, 1.0], 
+[-2.0, 5.0, -4.0, -7.0]], [[-1.0, 0.0, 0.0, 4.0], [-2.0, 2.0, -3.0, 7.0], [-5.0, -4.0, -3.0, -4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, -7.0, -7.0, 3.0], [0.0, -2.0, -6.0, 6.0], [-2.0, 1.0, 3.0, 7.0]], [[0.0, 4.0, 
+4.0, -3.0], [1.0, -5.0, 1.0, 3.0], [0.0, 1.0, 3.0, 6.0]]], [[[-2.0, -6.0, 4.0, -1.0], [3.0, -2.0, -3.0, -3.0], [7.0, 2.0, 3.0, 
+-3.0]], [[5.0, 6.0, 4.0, -7.0], [6.0, 5.0, 0.0, -1.0], [5.0, 0.0, 0.0, 3.0]]], [[[7.0, 5.0, 1.0, 5.0], [6.0, 3.0, 5.0, -7.0], 
+[-5.0, 2.0, 3.0, 2.0]], [[1.0, 6.0, 4.0, -2.0], [-2.0, 1.0, -4.0, 4.0], [7.0, 7.0, -3.0, 0.0]]]]))
+      arg1=-4.0
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[8.0, -0.0, -4.0, 4.0], [8.0, -24.0, -12.0, -20.0], [28.0, -0.0, -28.0, -12.0]], [[28.0, -4.0, 
+28.0, -24.0], [-28.0, -4.0, 8.0, -20.0], [-0.0, -8.0, -16.0, 16.0]]], [[[-12.0, 28.0, -8.0, -0.0], [16.0, -24.0, -20.0, -12.0], 
+[-12.0, -4.0, 8.0, 4.0]], [[24.0, -0.0, 4.0, 12.0], [-20.0, 28.0, 24.0, 8.0], [-16.0, 28.0, -16.0, -0.0]]], [[[-4.0, -16.0, 
+-0.0, -28.0], [-16.0, -24.0, 16.0, -4.0], [8.0, -20.0, 16.0, 28.0]], [[4.0, -0.0, -0.0, -16.0], [8.0, -8.0, 12.0, -28.0], 
+[20.0, 16.0, 12.0, 16.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-12.0, 28.0, 28.0, -12.0], [-0.0, 8.0, 24.0, -24.0], [8.0, -4.0, -12.0, -28.0]], 
+[[-0.0, -16.0, -16.0, 12.0], [-4.0, 20.0, -4.0, -12.0], [-0.0, -4.0, -12.0, -24.0]]], [[[8.0, 24.0, -16.0, 4.0], [-12.0, 8.0, 
+12.0, 12.0], [-28.0, -8.0, -12.0, 12.0]], [[-20.0, -24.0, -16.0, 28.0], [-24.0, -20.0, -0.0, 4.0], [-20.0, -0.0, -0.0, 
+-12.0]]], [[[-28.0, -20.0, -4.0, -20.0], [-24.0, -12.0, -20.0, 28.0], [20.0, -8.0, -12.0, -8.0]], [[-4.0, -24.0, -16.0, 8.0], 
+[8.0, -4.0, 16.0, -16.0], [-28.0, -28.0, 12.0, -0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(2.0)
-      arg1=Data(numpy.array([[[6.0, 5.0], [5.0, 3.0]], [[2.0, 1.0], [-4.0, 7.0]], [[1.0, 3.0], [5.0, -6.0]], [[-2.0, 6.0], 
-[2.0, -2.0]], [[-1.0, 2.0], [2.0, 3.0]], [[0.0, 4.0], [-5.0, 0.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], 
-[0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 10.0], [10.0, 6.0]], 
-[[4.0, 2.0], [-8.0, 14.0]], [[2.0, 6.0], [10.0, -12.0]], [[-4.0, 12.0], [4.0, -4.0]], [[-2.0, 4.0], [4.0, 6.0]], [[0.0, 8.0], 
-[-10.0, 0.0]]])
+   def test_generalTensorProduct_taggedData_rank4_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[3.0, 0.0, 6.0, -5.0], [1.0, -4.0, 7.0, 2.0], [7.0, 0.0, 0.0, 7.0]], [[-2.0, -4.0, -6.0, -1.0], 
+[0.0, -2.0, 4.0, -5.0], [5.0, 3.0, -1.0, 2.0]]], [[[-4.0, -5.0, 0.0, 5.0], [6.0, 0.0, -3.0, 1.0], [-7.0, 3.0, 5.0, 4.0]], 
+[[-3.0, 2.0, -7.0, -3.0], [0.0, 6.0, 5.0, 5.0], [7.0, -2.0, 1.0, 0.0]]], [[[0.0, -2.0, 4.0, 0.0], [6.0, -2.0, 5.0, -6.0], [1.0, 
+-2.0, 1.0, 3.0]], [[-2.0, -3.0, 4.0, 5.0], [-7.0, -2.0, 4.0, -7.0], [-5.0, -7.0, -6.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 1.0, 0.0, 6.0], [7.0, -1.0, -6.0, 3.0], [7.0, 5.0, 5.0, 7.0]], [[-6.0, 1.0, 
+7.0, -3.0], [3.0, -1.0, -4.0, 6.0], [-7.0, -3.0, 6.0, 2.0]]], [[[5.0, 7.0, 7.0, 4.0], [6.0, -1.0, -7.0, 0.0], [7.0, -7.0, -7.0, 
+-3.0]], [[-5.0, -4.0, -5.0, 3.0], [-1.0, -4.0, 1.0, 6.0], [7.0, 1.0, 7.0, 2.0]]], [[[-3.0, -3.0, 2.0, 7.0], [3.0, 5.0, 3.0, 
+-7.0], [-5.0, 4.0, 7.0, 4.0]], [[-2.0, 3.0, -6.0, -3.0], [7.0, -4.0, 2.0, 4.0], [-4.0, 6.0, 6.0, 1.0]]]]))
+      arg1=numpy.array(-3.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-9.0, -0.0, -18.0, 15.0], [-3.0, 12.0, -21.0, -6.0], [-21.0, -0.0, -0.0, -21.0]], [[6.0, 12.0, 
+18.0, 3.0], [-0.0, 6.0, -12.0, 15.0], [-15.0, -9.0, 3.0, -6.0]]], [[[12.0, 15.0, -0.0, -15.0], [-18.0, -0.0, 9.0, -3.0], [21.0, 
+-9.0, -15.0, -12.0]], [[9.0, -6.0, 21.0, 9.0], [-0.0, -18.0, -15.0, -15.0], [-21.0, 6.0, -3.0, -0.0]]], [[[-0.0, 6.0, -12.0, 
+-0.0], [-18.0, 6.0, -15.0, 18.0], [-3.0, 6.0, -3.0, -9.0]], [[6.0, 9.0, -12.0, -15.0], [21.0, 6.0, -12.0, 21.0], [15.0, 21.0, 
+18.0, -6.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-18.0, -3.0, -0.0, -18.0], [-21.0, 3.0, 18.0, -9.0], [-21.0, -15.0, -15.0, -21.0]], 
+[[18.0, -3.0, -21.0, 9.0], [-9.0, 3.0, 12.0, -18.0], [21.0, 9.0, -18.0, -6.0]]], [[[-15.0, -21.0, -21.0, -12.0], [-18.0, 3.0, 
+21.0, -0.0], [-21.0, 21.0, 21.0, 9.0]], [[15.0, 12.0, 15.0, -9.0], [3.0, 12.0, -3.0, -18.0], [-21.0, -3.0, -21.0, -6.0]]], 
+[[[9.0, 9.0, -6.0, -21.0], [-9.0, -15.0, -9.0, 21.0], [15.0, -12.0, -21.0, -12.0]], [[6.0, -9.0, 18.0, 9.0], [-21.0, 12.0, 
+-6.0, -12.0], [12.0, -18.0, -18.0, -3.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([0.0, -3.0, 3.0])+(1.-msk_arg0)*numpy.array([6.0, 0.0, -7.0])
-      arg1=Data(numpy.array([[[[0.0, 5.0], [6.0, -6.0]], [[-1.0, 6.0], [-1.0, -6.0]], [[4.0, -4.0], [-1.0, -7.0]], [[-1.0, 
-1.0], [3.0, 4.0]], [[-6.0, 1.0], [5.0, -5.0]], [[-4.0, -3.0], [0.0, -3.0]]], [[[-2.0, -4.0], [4.0, -1.0]], [[0.0, 0.0], [0.0, 
-2.0]], [[1.0, -6.0], [3.0, -7.0]], [[3.0, 1.0], [4.0, -2.0]], [[0.0, 2.0], [0.0, 4.0]], [[0.0, 0.0], [-4.0, 0.0]]], [[[4.0, 
--7.0], [-4.0, -5.0]], [[6.0, -3.0], [-2.0, -2.0]], [[2.0, -4.0], [-6.0, -5.0]], [[0.0, -5.0], [0.0, 4.0]], [[-7.0, -2.0], [5.0, 
-0.0]], [[2.0, 4.0], [-7.0, 5.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[18.0, -9.0], [-24.0, -12.0]], [[18.0, -9.0], [-6.0, -12.0]], [[3.0, 6.0], [-27.0, 6.0]], 
-[[-9.0, -18.0], [-12.0, 18.0]], [[-21.0, -12.0], [15.0, -12.0]], [[6.0, 12.0], [-9.0, 
-15.0]]])+(1.-msk_ref)*numpy.array([[[-28.0, 79.0], [64.0, -1.0]], [[-48.0, 57.0], [8.0, -22.0]], [[10.0, 4.0], [36.0, -7.0]], 
-[[-6.0, 41.0], [18.0, -4.0]], [[13.0, 20.0], [-5.0, -30.0]], [[-38.0, -46.0], [49.0, -53.0]]])
+   def test_generalTensorProduct_taggedData_rank4_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-7.0, 3.0, -3.0, -4.0], [-4.0, -1.0, -2.0, -4.0], [4.0, 4.0, 4.0, -5.0]], [[5.0, -1.0, 0.0, 
+-6.0], [5.0, -1.0, 1.0, 5.0], [7.0, 7.0, -7.0, -3.0]]], [[[5.0, -5.0, 7.0, 1.0], [1.0, -1.0, -5.0, 1.0], [2.0, 7.0, -7.0, 
+-7.0]], [[0.0, 6.0, 1.0, 0.0], [-2.0, -3.0, 0.0, 6.0], [-6.0, -7.0, 0.0, 5.0]]], [[[-4.0, 3.0, -4.0, 4.0], [-3.0, 1.0, -4.0, 
+-1.0], [6.0, 2.0, -4.0, 1.0]], [[-5.0, 6.0, 7.0, 4.0], [-3.0, -1.0, 0.0, -7.0], [-7.0, 0.0, 1.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, -4.0, -2.0, 2.0], [5.0, -5.0, 0.0, 3.0], [-7.0, -2.0, 2.0, -7.0]], [[1.0, 
+-4.0, -7.0, 1.0], [-7.0, -5.0, -3.0, -7.0], [-3.0, -1.0, -5.0, 7.0]]], [[[1.0, -5.0, -1.0, 7.0], [0.0, 4.0, -1.0, 5.0], [6.0, 
+0.0, -4.0, -1.0]], [[3.0, -4.0, -7.0, -4.0], [7.0, -2.0, -2.0, 2.0], [2.0, 0.0, 7.0, 6.0]]], [[[3.0, 4.0, -2.0, 0.0], [-5.0, 
+-7.0, -2.0, 3.0], [-4.0, 0.0, 0.0, -6.0]], [[1.0, -2.0, 3.0, 3.0], [-4.0, -4.0, 6.0, 1.0], [-1.0, 1.0, 1.0, 6.0]]]]))
+      arg1=Data(0.0,self.functionspace)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, 
+-0.0], [0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0], [0.0, 0.0, -0.0, 
+-0.0]], [[0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 
+-0.0], [0.0, 0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, -0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0]], [[0.0, -0.0, 
+-0.0, 0.0], [-0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 0.0]]], [[[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 
+-0.0, -0.0]], [[0.0, -0.0, -0.0, -0.0], [0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 
+-0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_constData_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-6.0)+(1-msk_arg0)*(-5.0)
-      arg1=Data(numpy.array([[[[-2.0, -4.0, -2.0, -3.0], [2.0, 4.0, -2.0, 0.0], [2.0, 4.0, -1.0, 0.0]], [[4.0, 3.0, 0.0, 5.0], 
-[-2.0, -1.0, -2.0, 4.0], [-3.0, 0.0, -5.0, -7.0]]], [[[-7.0, 1.0, 4.0, 0.0], [0.0, -6.0, 1.0, -4.0], [0.0, -5.0, 6.0, -2.0]], 
-[[-1.0, -5.0, 6.0, -7.0], [4.0, 1.0, -7.0, 0.0], [7.0, 6.0, 5.0, -5.0]]], [[[-1.0, 3.0, -5.0, 1.0], [-3.0, 1.0, 3.0, 7.0], 
-[-1.0, -3.0, 6.0, -3.0]], [[7.0, -7.0, 0.0, -7.0], [1.0, -6.0, -6.0, 7.0], [2.0, -1.0, -1.0, 4.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[12.0, 24.0, 12.0, 18.0], [-12.0, -24.0, 12.0, -0.0], [-12.0, -24.0, 6.0, -0.0]], [[-24.0, 
--18.0, -0.0, -30.0], [12.0, 6.0, 12.0, -24.0], [18.0, -0.0, 30.0, 42.0]]], [[[42.0, -6.0, -24.0, -0.0], [-0.0, 36.0, -6.0, 
-24.0], [-0.0, 30.0, -36.0, 12.0]], [[6.0, 30.0, -36.0, 42.0], [-24.0, -6.0, 42.0, -0.0], [-42.0, -36.0, -30.0, 30.0]]], [[[6.0, 
--18.0, 30.0, -6.0], [18.0, -6.0, -18.0, -42.0], [6.0, 18.0, -36.0, 18.0]], [[-42.0, 42.0, -0.0, 42.0], [-6.0, 36.0, 36.0, 
--42.0], [-12.0, 6.0, 6.0, -24.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, 20.0, 10.0, 15.0], [-10.0, -20.0, 10.0, -0.0], [-10.0, 
--20.0, 5.0, -0.0]], [[-20.0, -15.0, -0.0, -25.0], [10.0, 5.0, 10.0, -20.0], [15.0, -0.0, 25.0, 35.0]]], [[[35.0, -5.0, -20.0, 
--0.0], [-0.0, 30.0, -5.0, 20.0], [-0.0, 25.0, -30.0, 10.0]], [[5.0, 25.0, -30.0, 35.0], [-20.0, -5.0, 35.0, -0.0], [-35.0, 
--30.0, -25.0, 25.0]]], [[[5.0, -15.0, 25.0, -5.0], [15.0, -5.0, -15.0, -35.0], [5.0, 15.0, -30.0, 15.0]], [[-35.0, 35.0, -0.0, 
-35.0], [-5.0, 30.0, 30.0, -35.0], [-10.0, 5.0, 5.0, -20.0]]]])
+   def test_generalTensorProduct_taggedData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[3.0, 1.0, -2.0, 7.0], [4.0, 2.0, 4.0, 6.0], [-3.0, 2.0, -7.0, -3.0]], [[0.0, 1.0, 4.0, 6.0], 
+[2.0, 2.0, 5.0, 1.0], [-4.0, -7.0, -5.0, 0.0]]], [[[2.0, -3.0, 6.0, 6.0], [3.0, -6.0, -3.0, -5.0], [-2.0, -6.0, 0.0, -4.0]], 
+[[5.0, -6.0, -3.0, 7.0], [1.0, -2.0, 0.0, 1.0], [-4.0, 0.0, 2.0, 1.0]]], [[[-1.0, -2.0, -7.0, 7.0], [5.0, -7.0, 7.0, 1.0], 
+[-1.0, -2.0, -5.0, 0.0]], [[3.0, -1.0, -5.0, 7.0], [4.0, 5.0, 3.0, -1.0], [-5.0, -3.0, -7.0, 1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, -6.0, 5.0, -5.0], [-3.0, 7.0, 7.0, 0.0], [-5.0, -7.0, 4.0, 5.0]], [[-6.0, 
+-6.0, -6.0, 0.0], [-3.0, -5.0, -2.0, -4.0], [7.0, -1.0, 1.0, 7.0]]], [[[0.0, -3.0, -6.0, -6.0], [2.0, -1.0, 7.0, -2.0], [1.0, 
+-4.0, 1.0, 3.0]], [[5.0, 0.0, -7.0, 1.0], [0.0, 2.0, -7.0, 5.0], [-6.0, -4.0, 0.0, -3.0]]], [[[-3.0, 2.0, 7.0, -5.0], [5.0, 
+6.0, -1.0, 0.0], [2.0, -6.0, -5.0, 6.0]], [[-1.0, 0.0, -7.0, 6.0], [-4.0, 7.0, 7.0, 3.0], [7.0, 5.0, 6.0, -6.0]]]]))
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,-7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-9.0, -3.0, 6.0, -21.0], [-12.0, -6.0, -12.0, -18.0], [9.0, -6.0, 21.0, 9.0]], [[-0.0, -3.0, 
+-12.0, -18.0], [-6.0, -6.0, -15.0, -3.0], [12.0, 21.0, 15.0, -0.0]]], [[[-6.0, 9.0, -18.0, -18.0], [-9.0, 18.0, 9.0, 15.0], 
+[6.0, 18.0, -0.0, 12.0]], [[-15.0, 18.0, 9.0, -21.0], [-3.0, 6.0, -0.0, -3.0], [12.0, -0.0, -6.0, -3.0]]], [[[3.0, 6.0, 21.0, 
+-21.0], [-15.0, 21.0, -21.0, -3.0], [3.0, 6.0, 15.0, -0.0]], [[-9.0, 3.0, 15.0, -21.0], [-12.0, -15.0, -9.0, 3.0], [15.0, 9.0, 
+21.0, -3.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[21.0, 42.0, -35.0, 35.0], [21.0, -49.0, -49.0, -0.0], [35.0, 49.0, -28.0, -35.0]], 
+[[42.0, 42.0, 42.0, -0.0], [21.0, 35.0, 14.0, 28.0], [-49.0, 7.0, -7.0, -49.0]]], [[[-0.0, 21.0, 42.0, 42.0], [-14.0, 7.0, 
+-49.0, 14.0], [-7.0, 28.0, -7.0, -21.0]], [[-35.0, -0.0, 49.0, -7.0], [-0.0, -14.0, 49.0, -35.0], [42.0, 28.0, -0.0, 21.0]]], 
+[[[21.0, -14.0, -49.0, 35.0], [-35.0, -42.0, 7.0, -0.0], [-14.0, 42.0, 35.0, -42.0]], [[7.0, -0.0, 49.0, -42.0], [28.0, -49.0, 
+-49.0, -21.0], [-49.0, -35.0, -42.0, 42.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(4.0)+(1-msk_arg0)*(2.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-5.0)+(1-msk_arg1)*(2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_taggedData_rank4_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-2.0, 0.0, 2.0, 6.0], [5.0, -1.0, 1.0, 7.0], [1.0, 3.0, -4.0, -4.0]], [[4.0, 7.0, -2.0, 0.0], 
+[4.0, 7.0, -7.0, -2.0], [0.0, 3.0, -3.0, 2.0]]], [[[6.0, -3.0, -2.0, 5.0], [-4.0, 4.0, -4.0, -3.0], [-2.0, 1.0, -6.0, 7.0]], 
+[[2.0, 0.0, -5.0, -6.0], [-3.0, -7.0, -2.0, -5.0], [2.0, -5.0, 0.0, 2.0]]], [[[-4.0, -2.0, 1.0, -5.0], [5.0, 4.0, -5.0, 3.0], 
+[-1.0, -4.0, 3.0, 0.0]], [[6.0, 5.0, 6.0, 2.0], [-4.0, 2.0, 2.0, -1.0], [-3.0, -7.0, -2.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 3.0, -5.0, 7.0], [0.0, 0.0, -6.0, 7.0], [7.0, 0.0, -1.0, -2.0]], [[-5.0, -1.0, 
+-6.0, -5.0], [7.0, -1.0, -4.0, 7.0], [-4.0, -5.0, -4.0, 0.0]]], [[[7.0, -5.0, -4.0, -4.0], [3.0, -6.0, -1.0, -6.0], [-2.0, 
+-6.0, 5.0, -1.0]], [[6.0, -1.0, -4.0, -3.0], [-5.0, -4.0, 4.0, 6.0], [0.0, -1.0, -4.0, -7.0]]], [[[-6.0, -5.0, -2.0, 0.0], 
+[6.0, -2.0, 2.0, 4.0], [-7.0, 0.0, 0.0, -5.0]], [[-2.0, 5.0, -2.0, -3.0], [5.0, 2.0, -5.0, 6.0], [7.0, -1.0, -1.0, -1.0]]]]))
+      arg1=Data(-7.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      arg1.expand()
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-20.0)+(1.-msk_ref)*numpy.array(4.0)
+      ref=msk_ref*numpy.array([[[[14.0, -0.0, -14.0, -42.0], [-35.0, 7.0, -7.0, -49.0], [-7.0, -21.0, 28.0, 28.0]], [[-28.0, 
+-49.0, 14.0, -0.0], [-28.0, -49.0, 49.0, 14.0], [-0.0, -21.0, 21.0, -14.0]]], [[[-42.0, 21.0, 14.0, -35.0], [28.0, -28.0, 28.0, 
+21.0], [14.0, -7.0, 42.0, -49.0]], [[-14.0, -0.0, 35.0, 42.0], [21.0, 49.0, 14.0, 35.0], [-14.0, 35.0, -0.0, -14.0]]], [[[28.0, 
+14.0, -7.0, 35.0], [-35.0, -28.0, 35.0, -21.0], [7.0, 28.0, -21.0, -0.0]], [[-42.0, -35.0, -42.0, -14.0], [28.0, -14.0, -14.0, 
+7.0], [21.0, 49.0, 14.0, -35.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 21.0, -35.0, 49.0], [0.0, 0.0, -42.0, 49.0], [49.0, 0.0, 
+-7.0, -14.0]], [[-35.0, -7.0, -42.0, -35.0], [49.0, -7.0, -28.0, 49.0], [-28.0, -35.0, -28.0, 0.0]]], [[[49.0, -35.0, -28.0, 
+-28.0], [21.0, -42.0, -7.0, -42.0], [-14.0, -42.0, 35.0, -7.0]], [[42.0, -7.0, -28.0, -21.0], [-35.0, -28.0, 28.0, 42.0], [0.0, 
+-7.0, -28.0, -49.0]]], [[[-42.0, -35.0, -14.0, 0.0], [42.0, -14.0, 14.0, 28.0], [-49.0, 0.0, 0.0, -35.0]], [[-14.0, 35.0, 
+-14.0, -21.0], [35.0, 14.0, -35.0, 42.0], [49.0, -7.0, -7.0, -7.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, 5.0, -6.0])+(1.-msk_arg0)*numpy.array([-3.0, -6.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, -7.0, 6.0])+(1.-msk_arg1)*numpy.array([1.0, -3.0, 3.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg0.expand()
+      arg1=Data(3.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-71.0)+(1.-msk_ref)*numpy.array(15.0)
+      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 3.0, 4.0], [2.0, 7.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-4.0, -3.0, 2.0], [0.0, 5.0, 
--6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, -6.0, -1.0], [-2.0, -5.0, -5.0]])+(1.-msk_arg1)*numpy.array([[6.0, 6.0, 4.0], [-3.0, 
-4.0, -7.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([7.0, 2.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 3.0, 3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([4.0, -5.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-5.0, 2.0, -2.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-75.0)+(1.-msk_ref)*numpy.array(28.0)
+      ref=msk_ref*numpy.array(18.0)+(1.-msk_ref)*numpy.array(0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 1.0, 4.0], [1.0, -1.0, -5.0], [1.0, 0.0, -4.0], [4.0, 6.0, 1.0]], [[-6.0, -7.0, 0.0], 
-[-3.0, -7.0, 2.0], [6.0, -5.0, 6.0], [1.0, 7.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[6.0, 3.0, 1.0], [-1.0, -4.0, -6.0], [-5.0, 
-1.0, 1.0], [-7.0, -2.0, -1.0]], [[-4.0, -5.0, 5.0], [1.0, 7.0, 6.0], [-2.0, -2.0, 6.0], [4.0, 2.0, 1.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[6.0, 3.0, -7.0], [2.0, 3.0, 0.0], [-7.0, -3.0, 5.0], [4.0, -3.0, 1.0]], [[5.0, 4.0, 5.0], 
-[-3.0, -7.0, -1.0], [-4.0, 4.0, 2.0], [5.0, -6.0, -2.0]]])+(1.-msk_arg1)*numpy.array([[[4.0, -3.0, 4.0], [2.0, -3.0, -5.0], 
-[5.0, -1.0, 7.0], [-6.0, 0.0, -3.0]], [[3.0, -7.0, -7.0], [0.0, 2.0, -7.0], [2.0, 0.0, -6.0], [-7.0, 0.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[0.0, -7.0, -4.0], [0.0, 5.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 2.0, 4.0], [3.0, 6.0, 1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-2.0, 3.0, -6.0], [0.0, -1.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, -6.0, -3.0], [7.0, -7.0, -7.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-137.0)+(1.-msk_ref)*numpy.array(-21.0)
+      ref=msk_ref*numpy.array(10.0)+(1.-msk_ref)*numpy.array(-67.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorProduct(arg0,arg1,axis_offset=2)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, -4.0], [4.0, 1.0], [7.0, -6.0]], [[0.0, 6.0], [3.0, 6.0], [3.0, 5.0]]], [[[-2.0, 
--4.0], [6.0, 0.0], [-7.0, 4.0]], [[2.0, 0.0], [1.0, -6.0], [-2.0, 4.0]]], [[[4.0, -2.0], [7.0, 5.0], [2.0, -7.0]], [[-4.0, 
-5.0], [-1.0, 0.0], [-6.0, -7.0]]], [[[-6.0, 4.0], [7.0, 7.0], [-6.0, -5.0]], [[-7.0, -6.0], [4.0, -5.0], [-1.0, 
--6.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, 0.0], [-3.0, 5.0], [-4.0, 3.0]], [[-7.0, 7.0], [1.0, 5.0], [-1.0, 1.0]]], [[[0.0, 
-3.0], [-7.0, -5.0], [-7.0, 5.0]], [[3.0, -5.0], [-6.0, 3.0], [3.0, -5.0]]], [[[-3.0, 6.0], [-1.0, 2.0], [-2.0, 4.0]], [[5.0, 
-0.0], [-2.0, 7.0], [0.0, -4.0]]], [[[5.0, -3.0], [0.0, 6.0], [-2.0, 5.0]], [[2.0, -1.0], [-3.0, -6.0], [3.0, 5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -1.0], [-7.0, 4.0], [1.0, -1.0]], [[-6.0, 0.0], [-7.0, 6.0], [-3.0, 5.0]]], [[[-1.0, 
--4.0], [-5.0, -1.0], [-1.0, -1.0]], [[5.0, -5.0], [3.0, -3.0], [-5.0, 4.0]]], [[[-1.0, -4.0], [0.0, -1.0], [0.0, 6.0]], [[0.0, 
-3.0], [-4.0, -1.0], [7.0, -2.0]]], [[[-2.0, -3.0], [-2.0, 0.0], [-5.0, -6.0]], [[0.0, -4.0], [4.0, 0.0], [-7.0, 
-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -4.0], [6.0, 0.0], [7.0, 1.0]], [[2.0, -3.0], [5.0, -1.0], [-6.0, 0.0]]], [[[3.0, 
-4.0], [-5.0, 4.0], [4.0, 4.0]], [[2.0, -6.0], [2.0, -4.0], [2.0, 1.0]]], [[[2.0, 4.0], [0.0, 6.0], [0.0, 1.0]], [[5.0, -7.0], 
-[7.0, 2.0], [-6.0, 7.0]]], [[[6.0, 6.0], [-2.0, 2.0], [3.0, 7.0]], [[0.0, 1.0], [7.0, 0.0], [7.0, 7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-3.0, 6.0, 0.0], [5.0, 4.0, 6.0], [6.0, -2.0, 4.0], [0.0, -7.0, -7.0]], [[2.0, 1.0, 5.0], [-1.0, 
+4.0, -6.0], [-1.0, 0.0, 2.0], [5.0, 7.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, -3.0, -7.0], [0.0, 7.0, -4.0], [-7.0, 7.0, -2.0], [-5.0, 4.0, 5.0]], [[3.0, 
+4.0, 0.0], [-4.0, 0.0, 2.0], [6.0, 7.0, 7.0], [-2.0, -6.0, 1.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[4.0, -1.0, 6.0], [-7.0, 5.0, 0.0], [-1.0, -2.0, 3.0], [2.0, 3.0, 0.0]], [[7.0, -5.0, 7.0], 
+[-7.0, -4.0, -3.0], [0.0, -2.0, 0.0], [-1.0, -6.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 1.0, -1.0], [-7.0, -2.0, 7.0], [1.0, -6.0, 6.0], [0.0, -3.0, -2.0]], [[3.0, 
+0.0, 0.0], [-1.0, -4.0, 6.0], [0.0, -6.0, -6.0], [0.0, 1.0, 2.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(71.0)+(1.-msk_ref)*numpy.array(78.0)
+      ref=msk_ref*numpy.array(-35.0)+(1.-msk_ref)*numpy.array(-149.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(5.0)+(1-msk_arg0)*(-4.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-7.0, 2.0])+(1.-msk_arg1)*numpy.array([-2.0, 1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[5.0, 7.0], [5.0, -7.0], [-2.0, 2.0]], [[-3.0, -6.0], [5.0, -6.0], [3.0, 0.0]]], [[[1.0, -4.0], 
+[0.0, -1.0], [5.0, 5.0]], [[5.0, -5.0], [4.0, -4.0], [-3.0, -3.0]]], [[[3.0, -2.0], [7.0, -4.0], [2.0, -3.0]], [[-7.0, -7.0], 
+[5.0, 0.0], [7.0, 5.0]]], [[[0.0, 7.0], [6.0, 1.0], [5.0, -7.0]], [[-4.0, 0.0], [6.0, -6.0], [2.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, -7.0], [-7.0, 0.0], [1.0, 2.0]], [[-7.0, -2.0], [-5.0, -5.0], [0.0, -7.0]]], 
+[[[0.0, -1.0], [4.0, 0.0], [5.0, 7.0]], [[6.0, -3.0], [-2.0, 2.0], [7.0, 2.0]]], [[[-4.0, 0.0], [7.0, -7.0], [5.0, 6.0]], 
+[[1.0, 3.0], [-6.0, 0.0], [5.0, -6.0]]], [[[2.0, -4.0], [1.0, 6.0], [2.0, -7.0]], [[6.0, -7.0], [4.0, -5.0], [4.0, 3.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[6.0, 4.0], [-4.0, -7.0], [5.0, 1.0]], [[4.0, -2.0], [-6.0, 0.0], [-2.0, -6.0]]], [[[-7.0, 
+-5.0], [-3.0, 2.0], [4.0, 6.0]], [[0.0, 4.0], [6.0, -5.0], [1.0, 6.0]]], [[[6.0, -3.0], [6.0, 3.0], [-7.0, 0.0]], [[5.0, -2.0], 
+[-1.0, 7.0], [-2.0, -2.0]]], [[[2.0, 5.0], [-3.0, 6.0], [0.0, 4.0]], [[6.0, -1.0], [-4.0, -5.0], [6.0, 
+4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[6.0, -6.0], [-5.0, 3.0], [-5.0, 2.0]], [[-4.0, -4.0], [-7.0, -3.0], [7.0, 2.0]]], 
+[[[-1.0, 6.0], [1.0, 4.0], [-2.0, 5.0]], [[-5.0, 3.0], [1.0, -7.0], [5.0, 0.0]]], [[[-3.0, -4.0], [1.0, -7.0], [-3.0, 4.0]], 
+[[-7.0, 5.0], [1.0, -6.0], [7.0, -2.0]]], [[[0.0, 7.0], [2.0, -1.0], [-2.0, 3.0]], [[-6.0, -4.0], [1.0, 6.0], [-1.0, -5.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-35.0, 10.0])+(1.-msk_ref)*numpy.array([8.0, -4.0])
+      ref=msk_ref*numpy.array(62.0)+(1.-msk_ref)*numpy.array(197.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-1.0, -6.0, 1.0])+(1.-msk_arg0)*numpy.array([6.0, 6.0, -4.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 0.0], [0.0, -3.0], [1.0, -7.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 1.0], [-5.0, 1.0], 
-[6.0, 0.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,-7.0)
+      arg0.expand()
+      arg1=Data(numpy.array([-5.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, -4.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([1.0, 11.0])+(1.-msk_ref)*numpy.array([-72.0, 12.0])
+      ref=msk_ref*numpy.array([20.0, 8.0])+(1.-msk_ref)*numpy.array([-28.0, 28.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[1.0, -4.0, 0.0], [0.0, -4.0, -2.0]])+(1.-msk_arg0)*numpy.array([[2.0, 6.0, -5.0], [-1.0, 5.0, 
-3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[6.0, 5.0], [-5.0, 0.0], [0.0, -6.0]], [[-5.0, -4.0], [-1.0, -4.0], [0.0, 
-0.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 4.0], [3.0, -7.0], [-7.0, -1.0]], [[6.0, 3.0], [-3.0, 6.0], [0.0, 7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([4.0, 4.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([5.0, -4.0, -3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[5.0, 4.0], [-4.0, -3.0], [1.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 0.0], [0.0, 6.0], [-2.0, 4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([30.0, 21.0])+(1.-msk_ref)*numpy.array([34.0, 19.0])
+      ref=msk_ref*numpy.array([8.0, -8.0])+(1.-msk_ref)*numpy.array([6.0, -36.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 0.0, -6.0], [1.0, 4.0, -1.0], [3.0, -7.0, 3.0], [-4.0, 3.0, -2.0]], [[-3.0, -4.0, 
--4.0], [4.0, 6.0, -4.0], [-3.0, 0.0, -3.0], [-2.0, 0.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 2.0, 2.0], [3.0, -5.0, 
--1.0], [1.0, 2.0, -5.0], [-6.0, -5.0, 0.0]], [[7.0, -7.0, -7.0], [0.0, -7.0, -2.0], [0.0, 6.0, 4.0], [-2.0, -4.0, -4.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 1.0], [4.0, -4.0], [2.0, -1.0]], [[4.0, 1.0], [1.0, -6.0], [2.0, 2.0]], [[5.0, 3.0], 
-[-3.0, -2.0], [-3.0, -5.0]], [[3.0, 2.0], [4.0, 5.0], [-2.0, 0.0]]], [[[7.0, 5.0], [-1.0, 2.0], [6.0, 0.0]], [[-5.0, 7.0], 
-[2.0, 0.0], [2.0, -3.0]], [[1.0, -6.0], [3.0, 5.0], [-7.0, 7.0]], [[4.0, 5.0], [-7.0, -3.0], [-7.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 1.0], [4.0, -5.0], [5.0, 5.0]], [[5.0, -3.0], [7.0, 7.0], [5.0, 7.0]], [[2.0, 
-0.0], [-7.0, -1.0], [4.0, -6.0]], [[-1.0, 2.0], [0.0, 1.0], [-5.0, 0.0]]], [[[-6.0, 0.0], [0.0, 1.0], [0.0, -4.0]], [[-4.0, 
-0.0], [-5.0, 2.0], [0.0, 6.0]], [[-5.0, -1.0], [7.0, 4.0], [-3.0, -3.0]], [[-4.0, -3.0], [-5.0, -4.0], [0.0, 6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[2.0, -5.0, 0.0], [4.0, 3.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 5.0, -7.0], [7.0, -3.0, 6.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[5.0, 4.0], [3.0, 7.0], [-7.0, 6.0]], [[-3.0, -2.0], [-1.0, -3.0], [-5.0, 
+7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-2.0, 0.0], [5.0, 7.0], [-6.0, -4.0]], [[2.0, 0.0], [-5.0, -1.0], [2.0, -7.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([6.0, 24.0])+(1.-msk_ref)*numpy.array([18.0, -38.0])
+      ref=msk_ref*numpy.array([-15.0, -51.0])+(1.-msk_ref)*numpy.array([108.0, 24.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(4.0)+(1-msk_arg0)*(-7.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, -2.0, 1.0, 0.0, -4.0], [4.0, -4.0, 3.0, 1.0, 2.0], [6.0, -5.0, -1.0, 7.0, -7.0], [0.0, 
-6.0, 0.0, -3.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -7.0, -4.0, 3.0, -2.0], [-3.0, -4.0, -7.0, 0.0, 4.0], [0.0, -4.0, 
--7.0, 0.0, -2.0], [-6.0, -5.0, 0.0, 5.0, 4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[2.0, -7.0, 0.0], [3.0, -4.0, -6.0], [1.0, 4.0, 0.0], [-1.0, 3.0, -6.0]], [[-1.0, -1.0, 4.0], 
+[-3.0, 0.0, 4.0], [0.0, 3.0, -1.0], [7.0, -4.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 7.0, 1.0], [0.0, -6.0, 0.0], [0.0, -3.0, -7.0], [0.0, 4.0, 3.0]], [[5.0, -3.0, 
+-7.0], [2.0, 0.0, -1.0], [-1.0, -3.0, -4.0], [3.0, -1.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[2.0, 4.0], [-2.0, 1.0], [-2.0, -6.0]], [[0.0, -2.0], [-7.0, 6.0], [3.0, 0.0]], [[-6.0, -3.0], 
+[-5.0, -5.0], [-1.0, -4.0]], [[0.0, 5.0], [-7.0, 0.0], [-7.0, 2.0]]], [[[7.0, 7.0], [7.0, -4.0], [0.0, -1.0]], [[-2.0, 1.0], 
+[-4.0, 5.0], [-2.0, -1.0]], [[-5.0, 3.0], [1.0, -3.0], [3.0, -3.0]], [[6.0, 0.0], [-1.0, 0.0], [0.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, 7.0], [0.0, -2.0], [-3.0, -3.0]], [[4.0, 0.0], [6.0, 0.0], [-4.0, 3.0]], 
+[[7.0, -6.0], [1.0, -5.0], [4.0, -7.0]], [[7.0, 7.0], [5.0, 0.0], [-3.0, 7.0]]], [[[-7.0, -6.0], [-3.0, 1.0], [4.0, -3.0]], 
+[[-3.0, -5.0], [-5.0, -1.0], [-6.0, -4.0]], [[-5.0, 6.0], [0.0, 0.0], [-7.0, -2.0]], [[-3.0, -5.0], [-5.0, 3.0], [7.0, 7.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[4.0, -8.0, 4.0, 0.0, -16.0], [16.0, -16.0, 12.0, 4.0, 8.0], [24.0, -20.0, -4.0, 28.0, -28.0], 
-[0.0, 24.0, 0.0, -12.0, -4.0]])+(1.-msk_ref)*numpy.array([[49.0, 49.0, 28.0, -21.0, 14.0], [21.0, 28.0, 49.0, -0.0, -28.0], 
-[-0.0, 28.0, 49.0, -0.0, 14.0], [42.0, 35.0, -0.0, -35.0, -28.0]])
+      ref=msk_ref*numpy.array([53.0, -89.0])+(1.-msk_ref)*numpy.array([-92.0, 62.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([1.0, -7.0, 5.0])+(1.-msk_arg0)*numpy.array([0.0, -5.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, 0.0, -2.0, 2.0, -4.0], [-3.0, -4.0, -5.0, -1.0, 0.0], [0.0, -2.0, -3.0, -4.0, 4.0], 
-[-1.0, -2.0, -7.0, -7.0, 7.0]], [[6.0, -5.0, 4.0, -5.0, 4.0], [7.0, 3.0, -2.0, -3.0, 7.0], [-6.0, 0.0, -4.0, -3.0, -7.0], [0.0, 
-3.0, -4.0, -2.0, -1.0]], [[0.0, -5.0, 5.0, 5.0, 2.0], [-6.0, 2.0, 7.0, 4.0, -2.0], [4.0, 1.0, -7.0, 0.0, -7.0], [6.0, 5.0, 0.0, 
--2.0, -5.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, -1.0, -7.0, 0.0, -5.0], [-5.0, -6.0, 6.0, -3.0, 0.0], [4.0, -4.0, -1.0, 6.0, 
-0.0], [7.0, 5.0, -2.0, 6.0, 4.0]], [[-4.0, -3.0, -2.0, -4.0, -5.0], [-7.0, -4.0, -2.0, 5.0, -1.0], [0.0, -5.0, -7.0, -4.0, 
--1.0], [2.0, 1.0, -1.0, 7.0, -4.0]], [[7.0, 5.0, 0.0, -4.0, -2.0], [-1.0, -3.0, 6.0, 2.0, 0.0], [0.0, 0.0, 4.0, 0.0, 0.0], 
-[0.0, 5.0, -5.0, -2.0, -5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,-1.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[2.0, -3.0, 2.0, 6.0, 6.0], [1.0, -4.0, 3.0, -7.0, 1.0], [-3.0, 6.0, -6.0, -3.0, 0.0], [1.0, -7.0, 
+1.0, -6.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, -2.0, 5.0, 6.0, 5.0], [7.0, 0.0, 7.0, 0.0, 6.0], [-4.0, -6.0, -2.0, -4.0, 
+-6.0], [6.0, -4.0, 0.0, 6.0, -3.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-46.0, 10.0, -5.0, 62.0, -22.0], [-82.0, -15.0, 44.0, 40.0, -59.0], [62.0, 3.0, -10.0, 17.0, 
-18.0], [29.0, 2.0, 21.0, -3.0, -11.0]])+(1.-msk_ref)*numpy.array([[20.0, 15.0, 10.0, 20.0, 25.0], [35.0, 20.0, 10.0, -25.0, 
-5.0], [0.0, 25.0, 35.0, 20.0, 5.0], [-10.0, -5.0, 5.0, -35.0, 20.0]])
+      ref=msk_ref*numpy.array([[0.0, -0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0, 0.0], [0.0, 
+-0.0, 0.0, -0.0, 0.0]])+(1.-msk_ref)*numpy.array([[5.0, 2.0, -5.0, -6.0, -5.0], [-7.0, -0.0, -7.0, -0.0, -6.0], [4.0, 6.0, 2.0, 
+4.0, 6.0], [-6.0, 4.0, -0.0, -6.0, 3.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, -7.0, 4.0], [-4.0, 4.0, -1.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0, -6.0], [3.0, 6.0, 
-7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-4.0, -2.0, -2.0, 0.0, -6.0], [6.0, 6.0, 2.0, -3.0, -1.0], [-1.0, 0.0, 2.0, -6.0, -4.0], 
-[-1.0, 0.0, -1.0, -3.0, -3.0]], [[-7.0, -1.0, 2.0, -6.0, 4.0], [-3.0, 1.0, 4.0, 3.0, 2.0], [7.0, 3.0, 7.0, 5.0, 1.0], [-6.0, 
-0.0, 5.0, 5.0, -4.0]], [[0.0, -3.0, 2.0, 5.0, 4.0], [-7.0, 0.0, 7.0, 6.0, 4.0], [-1.0, 6.0, -3.0, -4.0, 7.0], [5.0, -3.0, -6.0, 
--2.0, 6.0]]], [[[-4.0, 7.0, -1.0, -3.0, -3.0], [6.0, 2.0, -7.0, -6.0, -6.0], [1.0, -7.0, -2.0, 0.0, 3.0], [-2.0, 5.0, 6.0, 3.0, 
-6.0]], [[3.0, -2.0, 0.0, -2.0, -1.0], [6.0, 7.0, 5.0, 1.0, -7.0], [0.0, -4.0, -1.0, 6.0, -2.0], [2.0, 2.0, -6.0, -1.0, -7.0]], 
-[[4.0, -4.0, -3.0, 3.0, -6.0], [4.0, -7.0, -2.0, -3.0, 4.0], [-1.0, -4.0, -6.0, 1.0, -1.0], [3.0, -5.0, -3.0, 4.0, 
-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -4.0, -1.0, -1.0, -1.0], [-6.0, -4.0, -5.0, -6.0, 0.0], [4.0, -3.0, 2.0, 0.0, 
--3.0], [-5.0, 2.0, -1.0, -4.0, -4.0]], [[-1.0, 0.0, 6.0, 6.0, -2.0], [-4.0, 7.0, 2.0, 7.0, 0.0], [3.0, 0.0, -2.0, 0.0, 4.0], 
-[-3.0, 1.0, 1.0, -6.0, 7.0]], [[3.0, 1.0, 0.0, 5.0, 4.0], [-4.0, 4.0, 3.0, -3.0, 2.0], [3.0, 6.0, -2.0, 6.0, -1.0], [-6.0, 4.0, 
-0.0, 6.0, -3.0]]], [[[0.0, -2.0, 7.0, -6.0, -4.0], [4.0, -6.0, -1.0, -6.0, 0.0], [7.0, 1.0, 0.0, -7.0, 7.0], [-4.0, 7.0, -3.0, 
--5.0, 6.0]], [[5.0, -6.0, -3.0, 1.0, 3.0], [2.0, 2.0, -5.0, -3.0, -7.0], [-2.0, 6.0, 2.0, 6.0, -5.0], [-1.0, -4.0, 6.0, -4.0, 
--7.0]], [[6.0, 1.0, -4.0, -4.0, 6.0], [-1.0, 7.0, 6.0, 1.0, 0.0], [0.0, -4.0, -2.0, 5.0, -5.0], [0.0, 0.0, 7.0, 2.0, -5.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([4.0, -5.0, 5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, -2.0, -6.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[5.0, -6.0, -7.0, 4.0, -6.0], [-7.0, 3.0, -3.0, 1.0, -6.0], [-5.0, -7.0, 0.0, 0.0, 6.0], [-2.0, 
+5.0, -7.0, 7.0, 0.0]], [[3.0, -4.0, 4.0, 0.0, 5.0], [-4.0, -4.0, 6.0, 5.0, -5.0], [-1.0, 3.0, 7.0, -7.0, 0.0], [5.0, 2.0, 6.0, 
+-2.0, -3.0]], [[0.0, -7.0, 5.0, 2.0, -4.0], [-6.0, 2.0, -5.0, 0.0, -7.0], [-5.0, 0.0, 4.0, -2.0, 0.0], [0.0, 5.0, -1.0, 3.0, 
+0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 0.0, -7.0, 0.0, 6.0], [7.0, -7.0, -2.0, -2.0, -5.0], [-2.0, 4.0, -7.0, 3.0, 
+0.0], [5.0, 7.0, 0.0, -3.0, 6.0]], [[-4.0, 4.0, 6.0, -6.0, 6.0], [1.0, 7.0, -6.0, 5.0, -4.0], [0.0, -7.0, 6.0, 0.0, -2.0], 
+[0.0, -5.0, 3.0, -7.0, -6.0]], [[7.0, -5.0, -3.0, -3.0, 6.0], [-1.0, -6.0, -2.0, 4.0, 2.0], [-1.0, -4.0, 0.0, 4.0, 0.0], [5.0, 
+7.0, -6.0, -1.0, 6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[97.0, -25.0, 13.0, 63.0, 38.0], [-47.0, -16.0, 38.0, 52.0, 0.0], [-50.0, 19.0, -63.0, 8.0, 
-26.0], [81.0, -19.0, -98.0, -45.0, 14.0]])+(1.-msk_ref)*numpy.array([[53.0, -41.0, -19.0, -64.0, 22.0], [37.0, 26.0, -7.0, 
--4.0, -54.0], [-6.0, -25.0, 8.0, 14.0, -34.0], [15.0, -26.0, 77.0, -67.0, -34.0]])
+      ref=msk_ref*numpy.array([[5.0, -39.0, -23.0, 26.0, -69.0], [-38.0, 42.0, -67.0, -21.0, -34.0], [-40.0, -43.0, -15.0, 
+25.0, 24.0], [-33.0, 35.0, -63.0, 53.0, 15.0]])+(1.-msk_ref)*numpy.array([[-58.0, 22.0, 34.0, 30.0, -72.0], [-24.0, 50.0, 32.0, 
+-26.0, 16.0], [14.0, 22.0, 16.0, -36.0, 4.0], [-50.0, -60.0, 30.0, 32.0, -48.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[5.0, -3.0, -7.0], [0.0, 2.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, -1.0, -6.0], [-7.0, 6.0, 7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[6.0, -2.0, 0.0, 5.0, 4.0], [4.0, 1.0, 1.0, 7.0, 1.0], [-1.0, 4.0, -6.0, -2.0, 3.0], [0.0, 4.0, 
+0.0, 4.0, 5.0]], [[3.0, 2.0, 0.0, -1.0, 0.0], [-6.0, -5.0, -2.0, 7.0, 0.0], [7.0, 1.0, -6.0, 7.0, -1.0], [-2.0, 2.0, 0.0, -2.0, 
+2.0]], [[-4.0, 3.0, 0.0, -7.0, 1.0], [7.0, 7.0, -4.0, 4.0, 7.0], [-6.0, -4.0, 0.0, 3.0, 7.0], [-6.0, 6.0, -6.0, -2.0, 7.0]]], 
+[[[-1.0, -5.0, -2.0, 5.0, -7.0], [7.0, -1.0, 4.0, 1.0, 0.0], [-4.0, -5.0, 5.0, 5.0, -7.0], [2.0, 3.0, -2.0, 2.0, 2.0]], [[3.0, 
+4.0, -1.0, -1.0, -5.0], [-5.0, -6.0, -4.0, 7.0, -7.0], [-1.0, 1.0, 3.0, 5.0, -4.0], [0.0, 6.0, 3.0, -4.0, -6.0]], [[-4.0, -2.0, 
+-2.0, 1.0, 7.0], [0.0, 4.0, 5.0, 1.0, -4.0], [-5.0, 5.0, -4.0, -3.0, 3.0], [6.0, 0.0, -6.0, 0.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[6.0, 2.0, 1.0, 6.0, 2.0], [4.0, 3.0, -2.0, 0.0, 6.0], [4.0, 6.0, -7.0, 0.0, -5.0], 
+[0.0, 1.0, 4.0, 4.0, 0.0]], [[1.0, -2.0, 4.0, -7.0, -4.0], [-5.0, 1.0, 3.0, 2.0, -4.0], [7.0, -7.0, -4.0, 1.0, 5.0], [-3.0, 
+1.0, 2.0, -3.0, 5.0]], [[7.0, 0.0, -1.0, -7.0, -2.0], [-5.0, -7.0, 6.0, 7.0, 2.0], [2.0, -3.0, 5.0, 1.0, 4.0], [-3.0, 2.0, 
+-3.0, 0.0, 5.0]]], [[[0.0, -2.0, 0.0, 1.0, 1.0], [6.0, -4.0, 0.0, -6.0, 5.0], [6.0, 6.0, -5.0, 2.0, -3.0], [-7.0, 1.0, -1.0, 
+0.0, -3.0]], [[6.0, -3.0, 3.0, 0.0, 0.0], [-5.0, 6.0, 2.0, 6.0, -6.0], [0.0, -3.0, 4.0, 3.0, -4.0], [0.0, 5.0, 6.0, 0.0, 0.0]], 
+[[4.0, -7.0, -2.0, 0.0, -1.0], [1.0, -4.0, 3.0, 4.0, -3.0], [-1.0, 3.0, -4.0, -3.0, 6.0], [3.0, -2.0, -1.0, 1.0, -1.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[63.0, -25.0, 2.0, 73.0, -11.0], [-21.0, -49.0, 21.0, -2.0, -50.0], [24.0, 37.0, 2.0, -36.0, 
+-45.0], [36.0, -16.0, 60.0, 32.0, -42.0]])+(1.-msk_ref)*numpy.array([[15.0, -53.0, 5.0, 36.0, 0.0], [-34.0, 74.0, -4.0, 62.0, 
+-106.0], [-72.0, -20.0, 12.0, -24.0, 15.0], [91.0, -5.0, 48.0, 6.0, -21.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(2.0)+(1-msk_arg0)*(3.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, -4.0], [-2.0, -4.0]], [[2.0, 6.0], [-6.0, -2.0]], [[-7.0, 1.0], [3.0, -3.0]], [[-7.0, 
--3.0], [-5.0, -5.0]], [[-4.0, -4.0], [-7.0, 1.0]], [[-6.0, -7.0], [0.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[6.0, 1.0], [4.0, 
-4.0]], [[0.0, 3.0], [5.0, -3.0]], [[1.0, -2.0], [-5.0, 0.0]], [[-2.0, 1.0], [4.0, -3.0]], [[3.0, -4.0], [0.0, -6.0]], [[-1.0, 
-3.0], [-4.0, 3.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      arg0.setTaggedValue(1,-2.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[[2.0, 2.0], [6.0, -2.0]], [[-3.0, -4.0], [0.0, -6.0]], [[0.0, -6.0], [5.0, 0.0]], [[2.0, 5.0], 
+[-4.0, -4.0]], [[2.0, -7.0], [-7.0, -2.0]], [[5.0, 3.0], [1.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 7.0], [5.0, 6.0]], [[5.0, 4.0], [-3.0, 0.0]], [[2.0, 7.0], [-7.0, 5.0]], [[5.0, 
+0.0], [-2.0, -6.0]], [[4.0, 6.0], [-6.0, 0.0]], [[2.0, 6.0], [0.0, -5.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[8.0, -8.0], [-4.0, -8.0]], [[4.0, 12.0], [-12.0, -4.0]], [[-14.0, 2.0], [6.0, -6.0]], [[-14.0, 
--6.0], [-10.0, -10.0]], [[-8.0, -8.0], [-14.0, 2.0]], [[-12.0, -14.0], [0.0, -14.0]]])+(1.-msk_ref)*numpy.array([[[18.0, 3.0], 
-[12.0, 12.0]], [[0.0, 9.0], [15.0, -9.0]], [[3.0, -6.0], [-15.0, 0.0]], [[-6.0, 3.0], [12.0, -9.0]], [[9.0, -12.0], [0.0, 
--18.0]], [[-3.0, 9.0], [-12.0, 9.0]]])
+      ref=msk_ref*numpy.array([[[12.0, 12.0], [36.0, -12.0]], [[-18.0, -24.0], [0.0, -36.0]], [[0.0, -36.0], [30.0, 0.0]], 
+[[12.0, 30.0], [-24.0, -24.0]], [[12.0, -42.0], [-42.0, -12.0]], [[30.0, 18.0], [6.0, 
+12.0]]])+(1.-msk_ref)*numpy.array([[[-4.0, -14.0], [-10.0, -12.0]], [[-10.0, -8.0], [6.0, -0.0]], [[-4.0, -14.0], [14.0, 
+-10.0]], [[-10.0, -0.0], [4.0, 12.0]], [[-8.0, -12.0], [12.0, -0.0]], [[-4.0, -12.0], [-0.0, 10.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([4.0, 3.0, 2.0])+(1.-msk_arg0)*numpy.array([5.0, 0.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -5.0], [7.0, 3.0]], [[-3.0, 0.0], [-3.0, 6.0]], [[4.0, -2.0], [2.0, 5.0]], [[0.0, 
--7.0], [-1.0, 2.0]], [[3.0, 0.0], [-3.0, 0.0]], [[6.0, -7.0], [7.0, 0.0]]], [[[-3.0, 6.0], [2.0, -4.0]], [[3.0, 6.0], [0.0, 
-3.0]], [[-4.0, -5.0], [7.0, 6.0]], [[-1.0, -5.0], [6.0, -7.0]], [[-2.0, 1.0], [2.0, -4.0]], [[7.0, 1.0], [7.0, -4.0]]], 
-[[[-3.0, 5.0], [2.0, 0.0]], [[-3.0, 0.0], [4.0, 3.0]], [[-4.0, -6.0], [-2.0, -5.0]], [[-7.0, -4.0], [-2.0, -1.0]], [[4.0, 
--1.0], [-2.0, -4.0]], [[-2.0, 4.0], [6.0, -6.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -6.0], [2.0, 2.0]], [[-2.0, 3.0], [-3.0, 
-5.0]], [[6.0, -4.0], [0.0, 2.0]], [[2.0, -3.0], [5.0, 5.0]], [[-7.0, 6.0], [5.0, 4.0]], [[0.0, -7.0], [1.0, -5.0]]], [[[1.0, 
-0.0], [-1.0, -1.0]], [[1.0, 0.0], [-1.0, 7.0]], [[-5.0, 0.0], [0.0, -5.0]], [[3.0, 6.0], [0.0, -1.0]], [[5.0, 4.0], [-1.0, 
-6.0]], [[-7.0, 3.0], [5.0, -6.0]]], [[[7.0, 5.0], [-3.0, -6.0]], [[-3.0, 0.0], [2.0, -2.0]], [[5.0, 6.0], [4.0, -4.0]], [[0.0, 
-4.0], [1.0, -5.0]], [[-2.0, -6.0], [-2.0, -6.0]], [[1.0, -3.0], [7.0, 4.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([-4.0, 7.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, -1.0, -2.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[0.0, -4.0], [0.0, -7.0]], [[0.0, 1.0], [6.0, -4.0]], [[-3.0, 0.0], [4.0, 0.0]], [[-7.0, 3.0], 
+[4.0, 1.0]], [[1.0, 3.0], [-3.0, 5.0]], [[1.0, 4.0], [3.0, -3.0]]], [[[-2.0, -7.0], [0.0, -2.0]], [[-5.0, -4.0], [4.0, 4.0]], 
+[[0.0, 3.0], [3.0, -3.0]], [[-4.0, -3.0], [6.0, -3.0]], [[-6.0, -5.0], [1.0, 2.0]], [[-5.0, -4.0], [0.0, -6.0]]], [[[0.0, 6.0], 
+[7.0, 4.0]], [[-6.0, -4.0], [-4.0, 2.0]], [[-3.0, 0.0], [4.0, 7.0]], [[2.0, 1.0], [3.0, -6.0]], [[6.0, -3.0], [0.0, 0.0]], 
+[[1.0, -5.0], [1.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 4.0], [-1.0, -3.0]], [[-4.0, 6.0], [0.0, 3.0]], [[-3.0, 0.0], [-7.0, 4.0]], 
+[[6.0, 7.0], [-1.0, -2.0]], [[2.0, 4.0], [-2.0, 2.0]], [[-7.0, -5.0], [-4.0, 4.0]]], [[[-7.0, -7.0], [7.0, 5.0]], [[-7.0, 
+-3.0], [-1.0, -2.0]], [[-7.0, 7.0], [5.0, 1.0]], [[6.0, -1.0], [1.0, -2.0]], [[-5.0, 0.0], [0.0, -3.0]], [[2.0, -4.0], [-4.0, 
+7.0]]], [[[3.0, 3.0], [2.0, 0.0]], [[6.0, 0.0], [4.0, 7.0]], [[6.0, -4.0], [5.0, 5.0]], [[6.0, -7.0], [-5.0, -3.0]], [[-6.0, 
+0.0], [3.0, -1.0]], [[2.0, 5.0], [-4.0, -6.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-15.0, 8.0], [38.0, 0.0]], [[-9.0, 18.0], [-4.0, 39.0]], [[-4.0, -35.0], [25.0, 28.0]], 
-[[-17.0, -51.0], [10.0, -15.0]], [[14.0, 1.0], [-10.0, -20.0]], [[41.0, -17.0], [61.0, 
--24.0]]])+(1.-msk_ref)*numpy.array([[[20.0, -30.0], [10.0, 10.0]], [[-10.0, 15.0], [-15.0, 25.0]], [[30.0, -20.0], [0.0, 
-10.0]], [[10.0, -15.0], [25.0, 25.0]], [[-35.0, 30.0], [25.0, 20.0]], [[0.0, -35.0], [5.0, -25.0]]])
+      ref=msk_ref*numpy.array([[[-14.0, -51.0], [-21.0, 2.0]], [[-17.0, -20.0], [16.0, 38.0]], [[21.0, 21.0], [-7.0, -42.0]], 
+[[-6.0, -36.0], [17.0, -7.0]], [[-64.0, -38.0], [19.0, -6.0]], [[-42.0, -29.0], [-15.0, 
+-21.0]]])+(1.-msk_ref)*numpy.array([[[-23.0, 25.0], [-17.0, -23.0]], [[-29.0, 39.0], [-7.0, 6.0]], [[-23.0, 1.0], [-57.0, 
+13.0]], [[18.0, 57.0], [3.0, -4.0]], [[29.0, 24.0], [-18.0, 17.0]], [[-48.0, -36.0], [-12.0, 29.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank0_expandedData_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-2.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[7.0, -5.0, -3.0, -5.0], [-7.0, -5.0, 0.0, 2.0], [-1.0, -5.0, -4.0, -1.0]], [[0.0, -2.0, 
-0.0, 2.0], [-7.0, 1.0, -1.0, 0.0], [-6.0, 1.0, 2.0, 1.0]]], [[[7.0, 4.0, 5.0, -1.0], [-7.0, 6.0, 3.0, 2.0], [0.0, -1.0, 1.0, 
-0.0]], [[-5.0, 3.0, 1.0, -4.0], [1.0, 6.0, -6.0, 5.0], [6.0, -5.0, 3.0, 0.0]]], [[[-1.0, 0.0, 3.0, 6.0], [1.0, 7.0, 4.0, -2.0], 
-[2.0, -1.0, 4.0, 5.0]], [[5.0, -6.0, 0.0, 6.0], [3.0, 4.0, 0.0, 7.0], [4.0, 2.0, -1.0, 
-4.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 3.0, -5.0, 5.0], [-6.0, -1.0, 7.0, 2.0], [0.0, -6.0, 2.0, -5.0]], [[0.0, -3.0, 7.0, 
--6.0], [1.0, 3.0, -2.0, -1.0], [6.0, 3.0, 0.0, -7.0]]], [[[-2.0, -2.0, 3.0, -1.0], [-2.0, 5.0, -3.0, -2.0], [0.0, -6.0, -4.0, 
--3.0]], [[4.0, -3.0, 1.0, 6.0], [3.0, 4.0, 5.0, -3.0], [-3.0, -4.0, 4.0, 4.0]]], [[[0.0, -1.0, 2.0, 2.0], [1.0, -2.0, 6.0, 
-3.0], [0.0, 7.0, 1.0, 4.0]], [[7.0, 7.0, 2.0, -5.0], [-2.0, 3.0, -5.0, -2.0], [-7.0, 3.0, 2.0, 0.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-5.0, 6.0, 1.0, -5.0], [5.0, 3.0, 3.0, -5.0], [0.0, 1.0, -3.0, -4.0]], [[1.0, 0.0, 3.0, -1.0], 
+[7.0, -2.0, 7.0, 3.0], [-1.0, -7.0, 4.0, -6.0]]], [[[0.0, 0.0, 0.0, -7.0], [7.0, -3.0, 3.0, 5.0], [-7.0, 2.0, 4.0, -4.0]], 
+[[1.0, 5.0, 1.0, -7.0], [-7.0, 0.0, 3.0, 6.0], [4.0, 0.0, -2.0, -4.0]]], [[[-7.0, 1.0, -2.0, 7.0], [2.0, -1.0, -7.0, 1.0], 
+[5.0, 0.0, 0.0, 3.0]], [[-3.0, 1.0, -6.0, 5.0], [-6.0, 3.0, -4.0, -4.0], [-6.0, 7.0, 4.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 6.0, -4.0, -4.0], [6.0, 6.0, 1.0, -2.0], [0.0, -5.0, -3.0, 6.0]], [[7.0, 6.0, 
+-6.0, 3.0], [-3.0, -6.0, -7.0, 4.0], [-2.0, 2.0, -6.0, 5.0]]], [[[2.0, -1.0, -4.0, 0.0], [-4.0, 2.0, 0.0, 6.0], [6.0, 5.0, 
+-3.0, -3.0]], [[-4.0, 6.0, 5.0, -1.0], [-3.0, -7.0, -6.0, 0.0], [0.0, -2.0, 3.0, 0.0]]], [[[-5.0, 6.0, 3.0, -7.0], [1.0, -7.0, 
+5.0, -7.0], [0.0, 7.0, -2.0, -5.0]], [[7.0, 4.0, -7.0, 0.0], [1.0, -4.0, -4.0, 3.0], [-1.0, 2.0, -7.0, 4.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0]], [[0.0, -0.0, 0.0, 
-0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 0.0, 0.0]], 
-[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]]], [[[-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 
--0.0, 0.0, 0.0]], [[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-2.0, 
--6.0, 10.0, -10.0], [12.0, 2.0, -14.0, -4.0], [-0.0, 12.0, -4.0, 10.0]], [[-0.0, 6.0, -14.0, 12.0], [-2.0, -6.0, 4.0, 2.0], 
-[-12.0, -6.0, -0.0, 14.0]]], [[[4.0, 4.0, -6.0, 2.0], [4.0, -10.0, 6.0, 4.0], [-0.0, 12.0, 8.0, 6.0]], [[-8.0, 6.0, -2.0, 
--12.0], [-6.0, -8.0, -10.0, 6.0], [6.0, 8.0, -8.0, -8.0]]], [[[-0.0, 2.0, -4.0, -4.0], [-2.0, 4.0, -12.0, -6.0], [-0.0, -14.0, 
--2.0, -8.0]], [[-14.0, -14.0, -4.0, 10.0], [4.0, -6.0, 10.0, 4.0], [14.0, -6.0, -4.0, -0.0]]]])
+      ref=msk_ref*numpy.array([[[[20.0, -24.0, -4.0, 20.0], [-20.0, -12.0, -12.0, 20.0], [-0.0, -4.0, 12.0, 16.0]], [[-4.0, 
+-0.0, -12.0, 4.0], [-28.0, 8.0, -28.0, -12.0], [4.0, 28.0, -16.0, 24.0]]], [[[-0.0, -0.0, -0.0, 28.0], [-28.0, 12.0, -12.0, 
+-20.0], [28.0, -8.0, -16.0, 16.0]], [[-4.0, -20.0, -4.0, 28.0], [28.0, -0.0, -12.0, -24.0], [-16.0, -0.0, 8.0, 16.0]]], 
+[[[28.0, -4.0, 8.0, -28.0], [-8.0, 4.0, 28.0, -4.0], [-20.0, -0.0, -0.0, -12.0]], [[12.0, -4.0, 24.0, -20.0], [24.0, -12.0, 
+16.0, 16.0], [24.0, -28.0, -16.0, -0.0]]]])+(1.-msk_ref)*numpy.array([[[[16.0, -24.0, 16.0, 16.0], [-24.0, -24.0, -4.0, 8.0], 
+[-0.0, 20.0, 12.0, -24.0]], [[-28.0, -24.0, 24.0, -12.0], [12.0, 24.0, 28.0, -16.0], [8.0, -8.0, 24.0, -20.0]]], [[[-8.0, 4.0, 
+16.0, -0.0], [16.0, -8.0, -0.0, -24.0], [-24.0, -20.0, 12.0, 12.0]], [[16.0, -24.0, -20.0, 4.0], [12.0, 28.0, 24.0, -0.0], 
+[-0.0, 8.0, -12.0, -0.0]]], [[[20.0, -24.0, -12.0, 28.0], [-4.0, 28.0, -20.0, 28.0], [-0.0, -28.0, 8.0, 20.0]], [[-28.0, -16.0, 
+28.0, -0.0], [-4.0, 16.0, 16.0, -12.0], [4.0, -8.0, 28.0, -16.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([4.0, 4.0])+(1.-msk_arg0)*numpy.array([2.0, -4.0])
-      arg1=0.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, -0.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-3.0, 6.0])+(1.-msk_arg0)*numpy.array([-4.0, 0.0])
-      arg1=numpy.array(-3.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([7.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 7.0]))
+      arg0.expand()
+      arg1=Data(-4.0,self.functionspace)
+      arg1.setTaggedValue(1,3.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([9.0, -18.0])+(1.-msk_ref)*numpy.array([12.0, -0.0])
+      ref=msk_ref*numpy.array([-28.0, 16.0])+(1.-msk_ref)*numpy.array([0.0, 21.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, -6.0], [7.0, -2.0], [-5.0, -1.0]])+(1.-msk_arg0)*numpy.array([[6.0, 2.0], [-5.0, -4.0], 
-[4.0, 2.0]])
-      arg1=numpy.array([3.0, 6.0, 7.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[3.0, -1.0, 0.0], [0.0, -2.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -2.0, 6.0], [0.0, 5.0, 7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-7.0, 7.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, -3.0, 7.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([22.0, -37.0])+(1.-msk_ref)*numpy.array([16.0, -4.0])
+      ref=msk_ref*numpy.array([-28.0, -14.0])+(1.-msk_ref)*numpy.array([48.0, 34.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, -3.0], [5.0, -3.0], [-4.0, -5.0]], [[3.0, -3.0], [-3.0, -2.0], [0.0, 
--3.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -3.0], [0.0, -1.0], [-4.0, -2.0]], [[-5.0, 5.0], [-4.0, 0.0], [4.0, -3.0]]])
-      arg1=numpy.array([[1.0, -3.0, 0.0], [6.0, -6.0, -3.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, 5.0, -2.0], [-3.0, -7.0, -4.0]], [[1.0, -1.0, 2.0], [1.0, 3.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 1.0, -3.0], [-4.0, 0.0, 0.0]], [[-3.0, -1.0, 1.0], [-2.0, -7.0, -6.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[2.0, -6.0, -4.0], [0.0, -6.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 1.0, 2.0], [3.0, 4.0, -6.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([23.0, 9.0])+(1.-msk_ref)*numpy.array([-22.0, 39.0])
+      ref=msk_ref*numpy.array([-14.0, -53.0])+(1.-msk_ref)*numpy.array([13.0, 18.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 6.0], [0.0, -1.0], [6.0, -3.0]], [[4.0, 5.0], [6.0, -4.0], [4.0, 1.0]], [[6.0, 4.0], 
-[0.0, 6.0], [0.0, 0.0]], [[0.0, 1.0], [2.0, -4.0], [-2.0, 0.0]]], [[[-4.0, -3.0], [-3.0, 3.0], [-3.0, -4.0]], [[7.0, 3.0], 
-[1.0, 0.0], [-7.0, -5.0]], [[-1.0, 4.0], [-6.0, -5.0], [3.0, -2.0]], [[-7.0, -2.0], [0.0, -7.0], [7.0, 
--5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-2.0, 5.0], [-7.0, -4.0], [2.0, 0.0]], [[-4.0, 6.0], [-2.0, -6.0], [7.0, 0.0]], [[-1.0, 
-0.0], [7.0, -4.0], [-4.0, 0.0]], [[-5.0, -3.0], [-7.0, -5.0], [3.0, 3.0]]], [[[6.0, 5.0], [2.0, 7.0], [0.0, 7.0]], [[-3.0, 
-2.0], [0.0, 2.0], [-3.0, 2.0]], [[6.0, -5.0], [0.0, 4.0], [-6.0, -5.0]], [[6.0, 7.0], [2.0, 6.0], [1.0, 4.0]]]])
-      arg1=numpy.array([[[-5.0, 6.0, -7.0], [7.0, 4.0, 7.0], [-1.0, -5.0, 1.0], [1.0, 2.0, 4.0]], [[7.0, 0.0, 5.0], [-2.0, 6.0, 
-0.0], [5.0, -1.0, -7.0], [-4.0, 4.0, 2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, 0.0, 0.0], [7.0, -5.0, -6.0], [-5.0, 3.0, 6.0], [-5.0, 6.0, -1.0]], [[5.0, -5.0, 0.0], 
+[3.0, -5.0, -7.0], [-6.0, -2.0, -4.0], [5.0, 4.0, -1.0]]], [[[3.0, 3.0, 7.0], [0.0, -5.0, -7.0], [5.0, 3.0, -2.0], [-2.0, -6.0, 
+0.0]], [[5.0, 4.0, -2.0], [1.0, 0.0, -7.0], [5.0, -7.0, -2.0], [3.0, 3.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 0.0, 3.0], [5.0, -3.0, 7.0], [7.0, -3.0, -7.0], [-5.0, 0.0, 0.0]], [[-5.0, 
+-7.0, 3.0], [-5.0, 6.0, 4.0], [3.0, 0.0, 4.0], [2.0, 3.0, -2.0]]], [[[4.0, -6.0, -6.0], [6.0, 2.0, 3.0], [-6.0, -4.0, 0.0], 
+[3.0, 3.0, -5.0]], [[-3.0, 0.0, 5.0], [4.0, 0.0, 6.0], [7.0, -7.0, -4.0], [1.0, 4.0, -3.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[6.0, -2.0, 3.0], [7.0, 7.0, -5.0], [-3.0, 0.0, 7.0], [-7.0, 3.0, 0.0]], [[7.0, 0.0, 0.0], [-7.0, 
+5.0, 7.0], [-2.0, -7.0, 7.0], [3.0, -7.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, 6.0, -3.0], [6.0, -4.0, 7.0], [0.0, -5.0, -7.0], [2.0, 7.0, 0.0]], [[5.0, 
+-4.0, -7.0], [1.0, 3.0, -7.0], [0.0, -7.0, -2.0], [0.0, -3.0, -7.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-1.0, -68.0])+(1.-msk_ref)*numpy.array([28.0, 76.0])
+      ref=msk_ref*numpy.array([105.0, 4.0])+(1.-msk_ref)*numpy.array([70.0, 36.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, -5.0])+(1.-msk_arg0)*numpy.array([3.0, -7.0])
-      arg1=numpy.array([2.0, -4.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[14.0, -28.0], [-10.0, 20.0]])+(1.-msk_ref)*numpy.array([[6.0, -12.0], [-14.0, 28.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[1.0, 6.0], [6.0, 6.0], [0.0, 4.0]])+(1.-msk_arg0)*numpy.array([[5.0, 6.0], [3.0, 3.0], [7.0, 
--7.0]])
-      arg1=numpy.array([[7.0, -4.0], [7.0, -6.0], [1.0, 6.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-7.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([5.0, 3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([4.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, 4.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[49.0, -40.0], [88.0, -36.0]])+(1.-msk_ref)*numpy.array([[63.0, 4.0], [56.0, -84.0]])
+      ref=msk_ref*numpy.array([[-28.0, 28.0], [-20.0, 20.0]])+(1.-msk_ref)*numpy.array([[5.0, 20.0], [3.0, 12.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, 3.0], [2.0, 6.0], [-5.0, -6.0]], [[5.0, -1.0], [2.0, 7.0], [0.0, 
--3.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 0.0], [-4.0, -6.0], [1.0, 0.0]], [[-5.0, -6.0], [4.0, 0.0], [-5.0, 1.0]]])
-      arg1=numpy.array([[[1.0, 5.0], [3.0, 2.0], [-4.0, -2.0]], [[7.0, -4.0], [-2.0, -7.0], [2.0, -5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-1.0, 1.0, -4.0], [0.0, 0.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, -1.0, 6.0], [7.0, 1.0, 1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-7.0, 5.0], [5.0, 5.0], [5.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 6.0], [-2.0, 1.0], [-4.0, -4.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[58.0, -15.0], [18.0, 9.0]])+(1.-msk_ref)*numpy.array([[-69.0, 7.0], [-58.0, 7.0]])
+      ref=msk_ref*numpy.array([[-8.0, -4.0], [-20.0, -4.0]])+(1.-msk_ref)*numpy.array([[-1.0, -7.0], [43.0, 39.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 6.0], [5.0, 5.0], [0.0, 3.0]], [[1.0, 6.0], [-5.0, 0.0], [-5.0, -1.0]], [[-4.0, 0.0], 
-[0.0, 6.0], [7.0, 4.0]], [[-5.0, 4.0], [5.0, -7.0], [-6.0, -1.0]]], [[[1.0, 0.0], [-4.0, -6.0], [2.0, -6.0]], [[5.0, -2.0], 
-[3.0, -1.0], [-3.0, -2.0]], [[0.0, -3.0], [0.0, 2.0], [0.0, 0.0]], [[-2.0, 1.0], [1.0, -5.0], [-4.0, 
--1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 3.0], [6.0, 1.0], [5.0, 2.0]], [[-5.0, 2.0], [-3.0, 7.0], [0.0, 0.0]], [[-7.0, 
-2.0], [-5.0, 0.0], [1.0, -2.0]], [[3.0, 2.0], [0.0, -6.0], [-3.0, -3.0]]], [[[-6.0, -5.0], [5.0, 0.0], [-1.0, 1.0]], [[-3.0, 
--7.0], [6.0, -7.0], [0.0, -6.0]], [[5.0, 4.0], [-2.0, -5.0], [-4.0, 0.0]], [[0.0, 6.0], [1.0, 3.0], [0.0, -6.0]]]])
-      arg1=numpy.array([[[[0.0, -5.0], [-5.0, -5.0], [-4.0, 0.0]], [[0.0, 0.0], [4.0, -2.0], [-2.0, 6.0]], [[-7.0, -7.0], [7.0, 
--2.0], [-3.0, 3.0]], [[1.0, 0.0], [3.0, 5.0], [-5.0, 3.0]]], [[[-3.0, 6.0], [-7.0, 3.0], [7.0, 6.0]], [[4.0, -5.0], [4.0, 
--2.0], [0.0, 3.0]], [[-3.0, -6.0], [0.0, -7.0], [-4.0, 0.0]], [[-7.0, 7.0], [0.0, 1.0], [3.0, -6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, 7.0, 1.0], [3.0, 0.0, -5.0]], [[5.0, -2.0, 3.0], [0.0, 5.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, -1.0, -7.0], [0.0, -5.0, 3.0]], [[3.0, 6.0, -6.0], [2.0, 5.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-3.0, -3.0], [0.0, -6.0], [-7.0, 3.0]], [[0.0, 1.0], [-1.0, -7.0], [3.0, 
+-3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -1.0], [7.0, -6.0], [3.0, 0.0]], [[6.0, -1.0], [2.0, -6.0], [-1.0, -5.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[85.0, -12.0], [-30.0, -135.0]])+(1.-msk_ref)*numpy.array([[-44.0, 20.0], [-100.0, 6.0]])
+      ref=msk_ref*numpy.array([[-1.0, 0.0], [-53.0, -17.0]])+(1.-msk_ref)*numpy.array([[-5.0, 27.0], [28.0, -71.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([3.0, 7.0])+(1.-msk_arg0)*numpy.array([4.0, -2.0])
-      arg1=numpy.array([[-3.0, -3.0, 0.0, -5.0, -7.0], [5.0, -7.0, 3.0, -5.0, 3.0], [3.0, 5.0, 6.0, 5.0, -5.0], [3.0, -4.0, 
--3.0, 7.0, 7.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[2.0, 4.0, -4.0], [-1.0, 6.0, 4.0], [0.0, 0.0, -6.0], [6.0, 6.0, -1.0]], [[4.0, 3.0, 4.0], [6.0, 
+-5.0, 4.0], [-1.0, 4.0, 5.0], [-6.0, 1.0, 0.0]]], [[[-7.0, -7.0, 2.0], [-4.0, 0.0, -1.0], [-6.0, -1.0, -7.0], [0.0, 5.0, 
+-4.0]], [[-2.0, -6.0, 7.0], [-2.0, -4.0, -2.0], [-4.0, -1.0, 5.0], [-2.0, 6.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 5.0, -7.0], [0.0, -6.0, 0.0], [-3.0, 0.0, 2.0], [5.0, -3.0, 4.0]], [[5.0, 0.0, 
+5.0], [-4.0, 1.0, -6.0], [-3.0, 4.0, 7.0], [-6.0, -2.0, -4.0]]], [[[2.0, -2.0, -7.0], [0.0, 3.0, 4.0], [-4.0, 5.0, 7.0], [0.0, 
+5.0, 3.0]], [[5.0, -6.0, 7.0], [4.0, 4.0, -4.0], [-2.0, 4.0, -4.0], [-1.0, 5.0, -6.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[1.0, 6.0], [2.0, -6.0], [-2.0, 0.0]], [[0.0, 1.0], [-5.0, 1.0], [-4.0, -1.0]], [[-5.0, -3.0], 
+[-7.0, 6.0], [7.0, 5.0]], [[-3.0, 3.0], [7.0, 4.0], [2.0, 3.0]]], [[[-1.0, -5.0], [-1.0, -2.0], [0.0, -2.0]], [[5.0, -1.0], 
+[1.0, -7.0], [-5.0, -2.0]], [[3.0, 7.0], [-4.0, 0.0], [-1.0, -1.0]], [[0.0, -5.0], [1.0, 6.0], [5.0, 
+3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, 1.0], [-7.0, -3.0], [-2.0, 7.0]], [[5.0, 3.0], [5.0, 7.0], [-4.0, 0.0]], 
+[[5.0, -3.0], [4.0, -4.0], [5.0, 2.0]], [[6.0, 4.0], [6.0, 1.0], [3.0, -6.0]]], [[[0.0, -1.0], [5.0, 3.0], [6.0, 0.0]], [[1.0, 
+-6.0], [5.0, -5.0], [7.0, -7.0]], [[-2.0, -3.0], [0.0, -7.0], [-1.0, 2.0]], [[-1.0, 4.0], [-1.0, -5.0], [6.0, 3.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-9.0, -9.0, 0.0, -15.0, -21.0], [15.0, -21.0, 9.0, -15.0, 9.0], [9.0, 15.0, 18.0, 15.0, 
--15.0], [9.0, -12.0, -9.0, 21.0, 21.0]], [[-21.0, -21.0, 0.0, -35.0, -49.0], [35.0, -49.0, 21.0, -35.0, 21.0], [21.0, 35.0, 
-42.0, 35.0, -35.0], [21.0, -28.0, -21.0, 49.0, 49.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, -12.0, 0.0, -20.0, -28.0], [20.0, 
--28.0, 12.0, -20.0, 12.0], [12.0, 20.0, 24.0, 20.0, -20.0], [12.0, -16.0, -12.0, 28.0, 28.0]], [[6.0, 6.0, 0.0, 10.0, 14.0], 
-[-10.0, 14.0, -6.0, 10.0, -6.0], [-6.0, -10.0, -12.0, -10.0, 10.0], [-6.0, 8.0, 6.0, -14.0, -14.0]]])
+      ref=msk_ref*numpy.array([[-73.0, 9.0], [-24.0, 28.0]])+(1.-msk_ref)*numpy.array([[-40.0, -70.0], [85.0, -143.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -1.0], [-7.0, 6.0], [5.0, -4.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 3.0], [3.0, 3.0], 
-[4.0, -7.0]])
-      arg1=numpy.array([[[-1.0, -7.0, 0.0, -6.0, 2.0], [-1.0, -1.0, 5.0, 3.0, -7.0], [-4.0, 2.0, -7.0, -3.0, -6.0], [-4.0, 7.0, 
--6.0, -5.0, -7.0]], [[-5.0, 0.0, 0.0, 6.0, -2.0], [-6.0, -4.0, -5.0, 0.0, 0.0], [7.0, -7.0, 1.0, 1.0, 2.0], [-7.0, 0.0, -1.0, 
--4.0, -3.0]], [[-6.0, -2.0, -6.0, 0.0, 5.0], [6.0, -7.0, 0.0, 2.0, -7.0], [7.0, 4.0, -1.0, -4.0, -6.0], [-3.0, -7.0, -5.0, 3.0, 
--4.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([0.0, 2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, 0.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[6.0, -5.0, 5.0, 1.0, 1.0], [0.0, -2.0, 7.0, 3.0, 4.0], [-7.0, -4.0, -3.0, 1.0, 1.0], [-5.0, -1.0, 
+3.0, 2.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 4.0, -3.0, -3.0, 6.0], [-1.0, 7.0, 7.0, 0.0, 3.0], [2.0, 3.0, 7.0, 0.0, -4.0], 
+[0.0, -3.0, 2.0, -5.0, 1.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[2.0, -31.0, -30.0, -60.0, 45.0], [69.0, -10.0, 50.0, 19.0, -56.0], [-26.0, 75.0, -33.0, -36.0, 
--62.0], [22.0, -14.0, -36.0, 28.0, -20.0]], [[-5.0, 15.0, 24.0, 42.0, -34.0], [-59.0, 5.0, -35.0, -11.0, 35.0], [18.0, -60.0, 
-17.0, 25.0, 42.0], [-26.0, 21.0, 20.0, -31.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, 20.0, -24.0, 42.0, 6.0], [10.0, -36.0, 
--35.0, -4.0, 0.0], [65.0, -13.0, 27.0, -1.0, 6.0], [-17.0, -56.0, 1.0, 20.0, 3.0]], [[24.0, -7.0, 42.0, 0.0, -35.0], [-63.0, 
-34.0, 0.0, -5.0, 28.0], [-40.0, -43.0, -11.0, 22.0, 30.0], [-12.0, 70.0, 14.0, -48.0, -2.0]]])
+      ref=msk_ref*numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[12.0, -10.0, 10.0, 2.0, 2.0], [0.0, -4.0, 14.0, 6.0, 8.0], [-14.0, -8.0, -6.0, 2.0, 2.0], [-10.0, -2.0, 6.0, 
+4.0, 14.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, -4.0, 3.0, 3.0, -6.0], [1.0, -7.0, -7.0, 0.0, -3.0], [-2.0, -3.0, -7.0, 0.0, 
+4.0], [0.0, 3.0, -2.0, 5.0, -1.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[3.0, 5.0], [3.0, -6.0], [7.0, -5.0]], [[5.0, 6.0], [-6.0, 2.0], [7.0, 
--3.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -5.0], [0.0, 7.0], [3.0, -1.0]], [[0.0, -6.0], [-4.0, 4.0], [-1.0, -3.0]]])
-      arg1=numpy.array([[[[2.0, -5.0, 3.0, 4.0, 0.0], [-1.0, 4.0, 4.0, 0.0, -3.0], [7.0, 6.0, 7.0, 3.0, 0.0], [0.0, 3.0, 0.0, 
--4.0, -6.0]], [[-3.0, -5.0, 2.0, 4.0, -7.0], [-7.0, -7.0, -2.0, 5.0, 0.0], [-5.0, 0.0, 4.0, 3.0, -5.0], [1.0, 6.0, -1.0, 5.0, 
--5.0]], [[-6.0, -2.0, -3.0, -6.0, -4.0], [-5.0, 4.0, 6.0, -2.0, 5.0], [0.0, -3.0, 7.0, -4.0, 0.0], [3.0, 3.0, 1.0, 7.0, 0.0]]], 
-[[[-7.0, -6.0, 6.0, 0.0, -2.0], [1.0, -5.0, -2.0, -4.0, -5.0], [3.0, -7.0, -6.0, -5.0, 5.0], [-3.0, -5.0, 3.0, 0.0, 6.0]], 
-[[3.0, 2.0, -2.0, -6.0, -1.0], [-5.0, -5.0, -1.0, 4.0, 0.0], [0.0, -2.0, 3.0, 5.0, 5.0], [-4.0, -4.0, 0.0, -2.0, 0.0]], [[-6.0, 
-0.0, -4.0, -7.0, 2.0], [0.0, 4.0, 0.0, 5.0, -7.0], [-3.0, 0.0, -7.0, -2.0, -5.0], [5.0, 7.0, 3.0, 5.0, 6.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-5.0, 0.0, 1.0], [3.0, 1.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 7.0, -4.0], [-3.0, 2.0, -7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-3.0, 7.0, 5.0, 6.0, -7.0], [2.0, -7.0, 1.0, 6.0, 3.0], [6.0, 4.0, -3.0, -3.0, 2.0], [-3.0, 1.0, 
+-4.0, -7.0, -5.0]], [[1.0, 2.0, 4.0, 2.0, 6.0], [-3.0, -5.0, 2.0, 2.0, 0.0], [4.0, -7.0, -5.0, -5.0, 0.0], [-2.0, -3.0, 2.0, 
+-6.0, -1.0]], [[6.0, -6.0, 0.0, 0.0, 0.0], [4.0, -5.0, -2.0, -1.0, -7.0], [1.0, -5.0, 7.0, 5.0, -1.0], [-4.0, 4.0, -4.0, 0.0, 
+0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 4.0, -3.0, 3.0, -4.0], [0.0, 6.0, 3.0, -5.0, -6.0], [-6.0, -7.0, -4.0, -2.0, 
+-7.0], [-4.0, 6.0, 0.0, 5.0, 0.0]], [[1.0, 0.0, -5.0, 1.0, 0.0], [0.0, 1.0, 6.0, 2.0, -6.0], [0.0, 4.0, 0.0, 3.0, 5.0], [3.0, 
+5.0, -2.0, 1.0, -1.0]], [[2.0, -5.0, 2.0, -4.0, 1.0], [-7.0, 0.0, 4.0, -1.0, -2.0], [-7.0, -7.0, -1.0, -4.0, -5.0], [7.0, 7.0, 
+-6.0, -3.0, 4.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-140.0, -86.0, 8.0, -31.0, -39.0], [-24.0, 52.0, 44.0, -8.0, -48.0], [0.0, -26.0, -15.0, 
--79.0, -55.0], [68.0, 96.0, 40.0, 99.0, 39.0]], [[40.0, -17.0, 62.0, 35.0, 42.0], [58.0, -10.0, -12.0, -51.0, -49.0], [92.0, 
--1.0, -33.0, 3.0, 85.0], [-62.0, -95.0, 10.0, -104.0, 18.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, -14.0, 3.0, 13.0, -10.0], 
-[5.0, 28.0, 22.0, -27.0, 22.0], [3.0, -1.0, 16.0, -30.0, -15.0], [20.0, 18.0, 0.0, 24.0, -6.0]], [[47.0, 36.0, -30.0, 11.0, 
--43.0], [-65.0, -75.0, -32.0, 62.0, 61.0], [-79.0, 7.0, 55.0, 66.0, -30.0], [-9.0, 17.0, -35.0, 25.0, -59.0]]])
+      ref=msk_ref*numpy.array([[[21.0, -41.0, -25.0, -30.0, 35.0], [-6.0, 30.0, -7.0, -31.0, -22.0], [-29.0, -25.0, 22.0, 20.0, 
+-11.0], [11.0, -1.0, 16.0, 35.0, 25.0]], [[16.0, -1.0, 19.0, 20.0, -15.0], [19.0, -46.0, -3.0, 16.0, -19.0], [26.0, -15.0, 
+14.0, 6.0, 2.0], [-27.0, 16.0, -26.0, -27.0, -16.0]]])+(1.-msk_ref)*numpy.array([[[5.0, 16.0, -40.0, 20.0, 0.0], [28.0, 1.0, 
+23.0, 23.0, -28.0], [34.0, 63.0, 8.0, 39.0, 62.0], [-3.0, 1.0, 10.0, 14.0, -23.0]], [[6.0, 23.0, -15.0, 21.0, 5.0], [49.0, 
+-16.0, -25.0, 26.0, 20.0], [67.0, 78.0, 19.0, 40.0, 66.0], [-31.0, -57.0, 38.0, 8.0, -30.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_array_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-6.0, 7.0])+(1.-msk_arg0)*numpy.array([2.0, 5.0])
-      arg1=numpy.array([[[2.0, 0.0], [-3.0, 7.0]], [[-3.0, 1.0], [2.0, 3.0]], [[-4.0, 0.0], [3.0, -7.0]], [[-2.0, 0.0], [-3.0, 
-6.0]], [[-3.0, -2.0], [5.0, -5.0]], [[0.0, -3.0], [3.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[7.0, -5.0, -7.0], [3.0, 7.0, 7.0]], [[7.0, 5.0, 0.0], [0.0, 4.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 5.0, -4.0], [7.0, 4.0, 0.0]], [[4.0, -2.0, -1.0], [1.0, -2.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-5.0, -2.0, -3.0, -1.0, 6.0], [1.0, -2.0, -6.0, -7.0, -3.0], [0.0, 0.0, 7.0, 2.0, -6.0], [-1.0, 
+0.0, 2.0, 1.0, -6.0]], [[-6.0, 3.0, 2.0, 5.0, 6.0], [-7.0, -1.0, -1.0, -5.0, 2.0], [0.0, 1.0, -3.0, -4.0, 0.0], [-2.0, 5.0, 
+-4.0, -2.0, 1.0]], [[-5.0, -7.0, 5.0, 4.0, 3.0], [6.0, 7.0, 2.0, -7.0, -1.0], [2.0, -3.0, 3.0, 5.0, 0.0], [4.0, -7.0, -4.0, 
+5.0, 4.0]]], [[[-3.0, 7.0, -2.0, 0.0, -3.0], [0.0, 6.0, 6.0, -2.0, 1.0], [4.0, -2.0, -1.0, 4.0, 5.0], [-2.0, -1.0, -6.0, -1.0, 
+6.0]], [[2.0, 6.0, -7.0, -7.0, -5.0], [4.0, -4.0, 0.0, -7.0, 2.0], [-6.0, -2.0, 4.0, -4.0, 6.0], [-4.0, 7.0, -3.0, 0.0, -3.0]], 
+[[2.0, 2.0, -4.0, 4.0, 0.0], [3.0, 0.0, 5.0, -6.0, -2.0], [0.0, -3.0, 6.0, 1.0, 3.0], [2.0, -4.0, -1.0, -2.0, 
+7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, -6.0, 0.0, -5.0, 1.0], [0.0, 0.0, 0.0, 0.0, 0.0], [-3.0, -2.0, 3.0, 2.0, 
+0.0], [1.0, 0.0, 7.0, -7.0, -5.0]], [[-7.0, -3.0, 4.0, 6.0, 3.0], [-3.0, 0.0, 5.0, 3.0, -5.0], [6.0, 0.0, -3.0, -2.0, -2.0], 
+[-7.0, 6.0, 4.0, 1.0, 2.0]], [[-5.0, -5.0, -7.0, 7.0, 7.0], [4.0, 7.0, 2.0, -5.0, 0.0], [-6.0, 2.0, -4.0, 0.0, 0.0], [-2.0, 
+7.0, 3.0, 1.0, -7.0]]], [[[-7.0, 6.0, 5.0, 0.0, 0.0], [-6.0, 6.0, -3.0, 0.0, 0.0], [4.0, -1.0, 6.0, 2.0, -1.0], [-4.0, -7.0, 
+6.0, -3.0, 0.0]], [[2.0, 6.0, -4.0, -1.0, -5.0], [7.0, 6.0, 4.0, 0.0, -2.0], [6.0, 6.0, -5.0, 0.0, -5.0], [-2.0, 0.0, 1.0, 7.0, 
+0.0]], [[-4.0, 3.0, 7.0, 1.0, -5.0], [-4.0, -1.0, -5.0, -2.0, -4.0], [-7.0, -2.0, -4.0, 7.0, 6.0], [-6.0, 6.0, 5.0, 4.0, 
+7.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-12.0, 0.0], [18.0, -42.0]], [[18.0, -6.0], [-12.0, -18.0]], [[24.0, 0.0], [-18.0, 42.0]], 
-[[12.0, 0.0], [18.0, -36.0]], [[18.0, 12.0], [-30.0, 30.0]], [[0.0, 18.0], [-18.0, 0.0]]], [[[14.0, 0.0], [-21.0, 49.0]], 
-[[-21.0, 7.0], [14.0, 21.0]], [[-28.0, 0.0], [21.0, -49.0]], [[-14.0, 0.0], [-21.0, 42.0]], [[-21.0, -14.0], [35.0, -35.0]], 
-[[0.0, -21.0], [21.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 0.0], [-6.0, 14.0]], [[-6.0, 2.0], [4.0, 6.0]], [[-8.0, 0.0], 
-[6.0, -14.0]], [[-4.0, 0.0], [-6.0, 12.0]], [[-6.0, -4.0], [10.0, -10.0]], [[0.0, -6.0], [6.0, 0.0]]], [[[10.0, 0.0], [-15.0, 
-35.0]], [[-15.0, 5.0], [10.0, 15.0]], [[-20.0, 0.0], [15.0, -35.0]], [[-10.0, 0.0], [-15.0, 30.0]], [[-15.0, -10.0], [25.0, 
--25.0]], [[0.0, -15.0], [15.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[[49.0, 97.0, -149.0, -81.0, -53.0], [49.0, -68.0, 2.0, -72.0, -21.0], [-44.0, -25.0, 110.0, 
+-10.0, 36.0], [-45.0, 42.0, 16.0, -35.0, -29.0]], [[-51.0, 31.0, -51.0, 2.0, 52.0], [-3.0, -35.0, -32.0, -120.0, -9.0], [-24.0, 
+-12.0, 68.0, -19.0, -9.0], [-27.0, 41.0, -21.0, -9.0, -28.0]]])+(1.-msk_ref)*numpy.array([[[-64.0, 47.0, 67.0, -22.0, -29.0], 
+[-45.0, 38.0, 12.0, 35.0, -33.0], [94.0, 1.0, 35.0, 12.0, -37.0], [-59.0, -47.0, 82.0, -20.0, 18.0]], [[0.0, -19.0, 12.0, 
+-37.0, 1.0], [-18.0, -13.0, -23.0, -1.0, 14.0], [-26.0, -23.0, 38.0, 14.0, 13.0], [20.0, -26.0, 21.0, -48.0, -17.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, -1.0], [2.0, 6.0], [-6.0, -3.0]])+(1.-msk_arg0)*numpy.array([[-6.0, -7.0], [6.0, -1.0], 
-[-3.0, -1.0]])
-      arg1=numpy.array([[[[-4.0, -7.0], [4.0, -6.0]], [[-2.0, -4.0], [1.0, -6.0]], [[-7.0, -3.0], [-1.0, 3.0]], [[0.0, -7.0], 
-[-7.0, 1.0]], [[-1.0, 3.0], [-6.0, 0.0]], [[2.0, 5.0], [-6.0, -4.0]]], [[[-6.0, -2.0], [2.0, -1.0]], [[-4.0, 0.0], [-1.0, 
-3.0]], [[4.0, 1.0], [-6.0, 3.0]], [[-3.0, 6.0], [-1.0, 7.0]], [[0.0, -4.0], [7.0, 4.0]], [[-1.0, 4.0], [7.0, -6.0]]], [[[0.0, 
-2.0], [4.0, 4.0]], [[7.0, 4.0], [-7.0, -5.0]], [[4.0, -3.0], [2.0, 6.0]], [[-4.0, 6.0], [2.0, 7.0]], [[-2.0, -3.0], [-7.0, 
-1.0]], [[0.0, 0.0], [4.0, 4.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([2.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, 3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-7.0, -5.0], [-3.0, -6.0]], [[1.0, 2.0], [-5.0, -6.0]], [[-2.0, 5.0], [4.0, 6.0]], [[5.0, -2.0], 
+[1.0, -2.0]], [[-2.0, 0.0], [-3.0, 5.0]], [[0.0, 2.0], [5.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -2.0], [2.0, 2.0]], [[7.0, -1.0], [-4.0, 7.0]], [[0.0, -6.0], [5.0, 6.0]], 
+[[-6.0, 0.0], [0.0, -7.0]], [[-3.0, 6.0], [-4.0, 0.0]], [[2.0, 3.0], [5.0, 5.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-28.0, -44.0], [-4.0, -50.0]], [[-58.0, -40.0], [44.0, 12.0]], [[-44.0, 8.0], [-28.0, 
--18.0]], [[18.0, -52.0], [-42.0, -24.0]], [[8.0, 22.0], [32.0, 2.0]], [[6.0, 28.0], [-34.0, -52.0]]], [[[-32.0, -11.0], [-4.0, 
--12.0]], [[-43.0, -8.0], [14.0, 39.0]], [[19.0, 18.0], [-41.0, -3.0]], [[-6.0, 25.0], [-5.0, 20.0]], [[7.0, -18.0], [69.0, 
-21.0]], [[-8.0, 19.0], [36.0, -44.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 24.0], [-24.0, 18.0]], [[-33.0, 12.0], [9.0, 
-69.0]], [[54.0, 33.0], [-36.0, -18.0]], [[-6.0, 60.0], [30.0, 15.0]], [[12.0, -33.0], [99.0, 21.0]], [[-18.0, -6.0], [66.0, 
--24.0]]], [[[34.0, 49.0], [-34.0, 39.0]], [[11.0, 24.0], [1.0, 44.0]], [[41.0, 23.0], [11.0, -30.0]], [[7.0, 37.0], [48.0, 
--21.0]], [[9.0, -14.0], [42.0, -5.0]], [[-13.0, -39.0], [31.0, 30.0]]]])
+      ref=msk_ref*numpy.array([[[[-14.0, -10.0], [-6.0, -12.0]], [[2.0, 4.0], [-10.0, -12.0]], [[-4.0, 10.0], [8.0, 12.0]], 
+[[10.0, -4.0], [2.0, -4.0]], [[-4.0, 0.0], [-6.0, 10.0]], [[0.0, 4.0], [10.0, 4.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-28.0, 14.0], [-14.0, -14.0]], [[-49.0, 7.0], [28.0, -49.0]], [[0.0, 42.0], [-35.0, 
+-42.0]], [[42.0, 0.0], [0.0, 49.0]], [[21.0, -42.0], [28.0, 0.0]], [[-14.0, -21.0], [-35.0, -35.0]]], [[[12.0, -6.0], [6.0, 
+6.0]], [[21.0, -3.0], [-12.0, 21.0]], [[0.0, -18.0], [15.0, 18.0]], [[-18.0, 0.0], [0.0, -21.0]], [[-9.0, 18.0], [-12.0, 0.0]], 
+[[6.0, 9.0], [15.0, 15.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([2.0, 1.0])+(1.-msk_arg0)*numpy.array([1.0, 6.0])
-      arg1=Data(7.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([14.0, 7.0])+(1.-msk_ref)*numpy.array([7.0, 42.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, 7.0], [-1.0, 7.0], [-7.0, 1.0]])+(1.-msk_arg0)*numpy.array([[-7.0, 4.0], [6.0, -1.0], 
-[4.0, 7.0]])
-      arg1=Data(numpy.array([-2.0, 2.0, 2.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[4.0, 1.0, 2.0], [-6.0, 2.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, -7.0, -5.0], [6.0, -2.0, 0.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-6.0, 3.0], [5.0, 6.0]], [[4.0, -6.0], [-5.0, 1.0]], [[-4.0, -3.0], [-5.0, -2.0]], [[0.0, 1.0], 
+[3.0, -1.0]], [[7.0, 1.0], [-4.0, -4.0]], [[2.0, -1.0], [-5.0, -3.0]]], [[[4.0, 3.0], [0.0, -3.0]], [[-2.0, 0.0], [-3.0, 0.0]], 
+[[-1.0, -5.0], [0.0, -6.0]], [[-1.0, -4.0], [-4.0, 3.0]], [[0.0, 5.0], [-2.0, 0.0]], [[0.0, 7.0], [6.0, -6.0]]], [[[6.0, -4.0], 
+[5.0, 5.0]], [[-1.0, -6.0], [5.0, 2.0]], [[-1.0, 3.0], [-7.0, 5.0]], [[3.0, 5.0], [0.0, 0.0]], [[-2.0, -3.0], [7.0, -2.0]], 
+[[-7.0, 0.0], [-6.0, -4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, 7.0], [0.0, -6.0]], [[-7.0, -5.0], [0.0, 4.0]], [[7.0, -7.0], [1.0, 1.0]], 
+[[0.0, 1.0], [-5.0, -2.0]], [[-1.0, -7.0], [7.0, -7.0]], [[6.0, -6.0], [1.0, 7.0]]], [[[5.0, -2.0], [0.0, 6.0]], [[-3.0, -1.0], 
+[6.0, -2.0]], [[4.0, -2.0], [-1.0, -6.0]], [[2.0, 1.0], [-1.0, 6.0]], [[0.0, 3.0], [0.0, 2.0]], [[-1.0, -4.0], [4.0, -7.0]]], 
+[[[-7.0, -3.0], [-1.0, -7.0]], [[-5.0, 5.0], [2.0, -5.0]], [[5.0, 7.0], [-3.0, 2.0]], [[3.0, 3.0], [2.0, 0.0]], [[-6.0, 1.0], 
+[4.0, 4.0]], [[2.0, 6.0], [-6.0, 0.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-22.0, 2.0])+(1.-msk_ref)*numpy.array([34.0, 4.0])
+      ref=msk_ref*numpy.array([[[[-8.0, 7.0], [30.0, 31.0]], [[12.0, -36.0], [-13.0, 8.0]], [[-19.0, -11.0], [-34.0, -4.0]], 
+[[5.0, 10.0], [8.0, -1.0]], [[24.0, 3.0], [-4.0, -20.0]], [[-6.0, 3.0], [-26.0, -26.0]]], [[[74.0, -32.0], [-5.0, -17.0]], 
+[[-33.0, 6.0], [49.0, 4.0]], [[17.0, 23.0], [-5.0, 25.0]], [[13.0, 11.0], [-26.0, 12.0]], [[-52.0, -11.0], [55.0, 14.0]], 
+[[-47.0, 20.0], [12.0, -14.0]]]])+(1.-msk_ref)*numpy.array([[[[20.0, 64.0], [5.0, -37.0]], [[11.0, -43.0], [-52.0, 59.0]], 
+[[-18.0, -56.0], [27.0, 37.0]], [[-29.0, -17.0], [-28.0, -52.0]], [[25.0, -61.0], [15.0, -69.0]], [[27.0, -32.0], [7.0, 
+84.0]]], [[[14.0, 46.0], [0.0, -48.0]], [[-36.0, -28.0], [-12.0, 28.0]], [[34.0, -38.0], [8.0, 18.0]], [[-4.0, 4.0], [-28.0, 
+-24.0]], [[-6.0, -48.0], [42.0, -46.0]], [[38.0, -28.0], [-2.0, 56.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -6.0], [7.0, 5.0], [5.0, 1.0]], [[0.0, 3.0], [4.0, -2.0], [1.0, 
-0.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 2.0], [5.0, -6.0], [-7.0, 4.0]], [[7.0, -2.0], [-1.0, 0.0], [-7.0, 7.0]]])
-      arg1=Data(numpy.array([[-5.0, -5.0, -2.0], [0.0, 0.0, 3.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[0.0, 3.0, 2.0, 1.0, -3.0], [-7.0, -7.0, 0.0, -4.0, -3.0], [1.0, -6.0, 6.0, 7.0, -7.0], [7.0, 6.0, 
+4.0, 1.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, 6.0, -4.0, -7.0, -6.0], [4.0, 5.0, 6.0, -6.0, -1.0], [2.0, 5.0, 0.0, -7.0, 6.0], 
+[4.0, 6.0, 5.0, 6.0, -4.0]]))
+      arg0.expand()
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,-1.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-42.0, 3.0])+(1.-msk_ref)*numpy.array([-12.0, 33.0])
+      ref=msk_ref*numpy.array([[-0.0, -9.0, -6.0, -3.0, 9.0], [21.0, 21.0, -0.0, 12.0, 9.0], [-3.0, 18.0, -18.0, -21.0, 21.0], 
+[-21.0, -18.0, -12.0, -3.0, 9.0]])+(1.-msk_ref)*numpy.array([[-2.0, -6.0, 4.0, 7.0, 6.0], [-4.0, -5.0, -6.0, 6.0, 1.0], [-2.0, 
+-5.0, -0.0, 7.0, -6.0], [-4.0, -6.0, -5.0, -6.0, 4.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, -5.0], [4.0, -1.0], [4.0, -5.0]], [[0.0, -7.0], [5.0, 0.0], [0.0, -5.0]], [[2.0, 2.0], 
-[-7.0, 7.0], [-4.0, -4.0]], [[0.0, 4.0], [0.0, 5.0], [0.0, -2.0]]], [[[1.0, -6.0], [-4.0, -1.0], [5.0, -7.0]], [[-7.0, 4.0], 
-[2.0, 0.0], [-3.0, 3.0]], [[0.0, 0.0], [-5.0, 4.0], [7.0, 6.0]], [[-4.0, -2.0], [4.0, -2.0], [5.0, 
-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, -2.0], [-3.0, -2.0], [-4.0, 0.0]], [[-5.0, 5.0], [2.0, -4.0], [3.0, -7.0]], [[3.0, 
-5.0], [-5.0, -2.0], [-5.0, -2.0]], [[-6.0, 3.0], [5.0, 5.0], [-2.0, -1.0]]], [[[-1.0, -1.0], [0.0, -4.0], [-3.0, 5.0]], [[-2.0, 
-1.0], [6.0, -7.0], [-2.0, 2.0]], [[2.0, 7.0], [0.0, 0.0], [-1.0, -3.0]], [[0.0, 0.0], [5.0, 1.0], [2.0, -4.0]]]])
-      arg1=Data(numpy.array([[[0.0, 2.0, -4.0], [7.0, -2.0, 4.0], [-7.0, 6.0, 2.0], [1.0, 3.0, -5.0]], [[-1.0, 4.0, 4.0], [4.0, 
--5.0, -3.0], [2.0, -4.0, -3.0], [3.0, -2.0, -6.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[1.0, -5.0, -2.0], [0.0, -5.0, 1.0], [-1.0, -3.0, 4.0], [2.0, 6.0, 6.0], [6.0, -6.0, 1.0]], 
+[[5.0, 0.0, 0.0], [4.0, -1.0, 5.0], [-6.0, -7.0, 7.0], [7.0, 5.0, 2.0], [3.0, -4.0, -7.0]], [[7.0, -7.0, 3.0], [7.0, 5.0, 0.0], 
+[-4.0, -5.0, -1.0], [-2.0, 4.0, -2.0], [-3.0, -5.0, 4.0]], [[3.0, 2.0, 2.0], [7.0, -4.0, 5.0], [0.0, -1.0, 0.0], [2.0, -6.0, 
+1.0], [0.0, 0.0, -5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, 7.0, 0.0], [-3.0, 5.0, -6.0], [-5.0, 2.0, -1.0], [4.0, 4.0, 6.0], [-1.0, -5.0, 
+0.0]], [[0.0, -1.0, -6.0], [3.0, 4.0, 6.0], [4.0, -1.0, -5.0], [0.0, -7.0, 4.0], [-2.0, 4.0, 7.0]], [[4.0, -2.0, 0.0], [-7.0, 
+5.0, -2.0], [-7.0, 1.0, 0.0], [-6.0, 0.0, -3.0], [5.0, -7.0, 4.0]], [[-5.0, 4.0, 5.0], [-3.0, 3.0, -4.0], [2.0, 6.0, 4.0], 
+[-1.0, 4.0, 6.0], [-3.0, 1.0, -3.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-6.0, 6.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, 0.0, -3.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-159.0, -87.0])+(1.-msk_ref)*numpy.array([-117.0, 66.0])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([2.0, -4.0])+(1.-msk_arg0)*numpy.array([2.0, -3.0])
-      arg1=Data(numpy.array([2.0, 0.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=msk_ref*numpy.array([[-22.0, -37.0, -40.0, -18.0, -79.0], [-30.0, -65.0, -55.0, -26.0, 7.0], [-105.0, -12.0, 1.0, 
+50.0, -40.0], [-20.0, -101.0, -6.0, -55.0, 35.0]])+(1.-msk_ref)*numpy.array([[49.0, -3.0, -32.0, 10.0, -7.0], [18.0, 3.0, 43.0, 
+-12.0, -35.0], [28.0, -43.0, -49.0, -33.0, 23.0], [-50.0, -9.0, 2.0, -25.0, -12.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-4.0, -6.0, 1.0], [5.0, 6.0, -6.0]], [[1.0, -1.0, 7.0], [-1.0, 4.0, -4.0]], [[5.0, -1.0, -7.0], 
+[-6.0, 0.0, -5.0]], [[4.0, 6.0, 4.0], [4.0, -5.0, -2.0]], [[0.0, -1.0, 6.0], [-7.0, -7.0, -7.0]]], [[[-5.0, -7.0, 3.0], [-7.0, 
+7.0, -2.0]], [[-2.0, 3.0, 0.0], [-5.0, 3.0, -6.0]], [[4.0, 0.0, 1.0], [7.0, 4.0, -1.0]], [[-2.0, 0.0, 2.0], [1.0, 3.0, -4.0]], 
+[[1.0, -4.0, 1.0], [0.0, -3.0, 1.0]]], [[[6.0, -2.0, 0.0], [-3.0, 3.0, -5.0]], [[1.0, 0.0, -4.0], [5.0, -2.0, 4.0]], [[3.0, 
+5.0, 5.0], [6.0, -2.0, 7.0]], [[-3.0, -1.0, 5.0], [2.0, 2.0, 0.0]], [[-3.0, 6.0, -3.0], [-6.0, 5.0, 1.0]]], [[[-5.0, 0.0, 1.0], 
+[0.0, 6.0, -1.0]], [[-5.0, -5.0, 0.0], [6.0, 5.0, -5.0]], [[5.0, -1.0, 6.0], [-6.0, 5.0, -1.0]], [[-4.0, -2.0, 7.0], [-1.0, 
+-2.0, -1.0]], [[4.0, 0.0, -1.0], [-3.0, 5.0, -5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -2.0, 3.0], [2.0, 6.0, 7.0]], [[0.0, -2.0, -4.0], [7.0, -3.0, -6.0]], [[-6.0, 
+-6.0, -1.0], [-7.0, 3.0, 1.0]], [[-2.0, 0.0, 3.0], [2.0, -5.0, -1.0]], [[1.0, -1.0, 0.0], [0.0, -2.0, -7.0]]], [[[5.0, 7.0, 
+-6.0], [0.0, -2.0, 4.0]], [[7.0, 5.0, 2.0], [5.0, -6.0, 0.0]], [[-6.0, -4.0, -2.0], [2.0, 3.0, -5.0]], [[4.0, -1.0, 4.0], [0.0, 
+3.0, 5.0]], [[-3.0, -3.0, 6.0], [2.0, 6.0, -6.0]]], [[[6.0, 5.0, 1.0], [-4.0, 2.0, -2.0]], [[-4.0, -7.0, 0.0], [0.0, 6.0, 
+-6.0]], [[-4.0, 4.0, 4.0], [6.0, 0.0, -4.0]], [[5.0, -3.0, 6.0], [-1.0, -7.0, -3.0]], [[-3.0, -3.0, 4.0], [6.0, 7.0, 2.0]]], 
+[[[-1.0, 0.0, 6.0], [0.0, -4.0, -2.0]], [[6.0, 1.0, -3.0], [0.0, -5.0, 2.0]], [[-3.0, -5.0, -7.0], [-5.0, 2.0, 2.0]], [[3.0, 
+-4.0, 0.0], [-4.0, 7.0, 3.0]], [[-2.0, -3.0, -5.0], [-7.0, -2.0, -7.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[0.0, 7.0, 2.0], [4.0, -5.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -4.0, 5.0], [-1.0, -6.0, 2.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[4.0, 0.0], [-8.0, 0.0]])+(1.-msk_ref)*numpy.array([[4.0, 0.0], [-6.0, 0.0]])
+      ref=msk_ref*numpy.array([[-56.0, -21.0, -50.0, 89.0, 5.0], [-108.0, -20.0, 9.0, -11.0, -10.0], [-46.0, 26.0, 86.0, 1.0, 
+-12.0], [-29.0, -41.0, -45.0, 5.0, -44.0]])+(1.-msk_ref)*numpy.array([[-31.0, -13.0, -26.0, 29.0, 8.0], [-8.0, 63.0, -60.0, 
+40.0, -26.0], [9.0, -44.0, -34.0, 109.0, -30.0], [44.0, 51.0, -36.0, 2.0, -20.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[6.0, -2.0], [6.0, 0.0], [3.0, 4.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 4.0], [-3.0, -7.0], 
-[0.0, -6.0]])
-      arg1=Data(numpy.array([[-7.0, 6.0], [4.0, 6.0], [0.0, 0.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[1.0, 0.0, -1.0, 2.0, 6.0], [6.0, 3.0, 5.0, 2.0, 7.0], [5.0, 0.0, 1.0, -5.0, 0.0], [0.0, -4.0, 
+1.0, -4.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, 2.0, 7.0, -5.0, 0.0], [-1.0, -3.0, 6.0, -4.0, -4.0], [0.0, -3.0, 2.0, 4.0, 
+1.0], [-6.0, -6.0, -4.0, 5.0, -1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-2.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, 0.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-18.0, 72.0], [14.0, -12.0]])+(1.-msk_ref)*numpy.array([[2.0, -30.0], [-56.0, -18.0]])
+      ref=msk_ref*numpy.array([[[-2.0, 0.0], [0.0, 0.0], [2.0, 0.0], [-4.0, 0.0], [-12.0, 0.0]], [[-12.0, 0.0], [-6.0, 0.0], 
+[-10.0, 0.0], [-4.0, 0.0], [-14.0, 0.0]], [[-10.0, 0.0], [0.0, 0.0], [-2.0, 0.0], [10.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [8.0, 
+0.0], [-2.0, 0.0], [8.0, 0.0], [-4.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-14.0, 0.0], [4.0, 0.0], [14.0, 0.0], [-10.0, 0.0], 
+[0.0, 0.0]], [[-2.0, 0.0], [-6.0, 0.0], [12.0, 0.0], [-8.0, 0.0], [-8.0, 0.0]], [[0.0, 0.0], [-6.0, 0.0], [4.0, 0.0], [8.0, 
+0.0], [2.0, 0.0]], [[-12.0, 0.0], [-12.0, 0.0], [-8.0, 0.0], [10.0, 0.0], [-2.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 0.0], [2.0, 7.0], [-7.0, -4.0]], [[0.0, 2.0], [6.0, 7.0], [0.0, 
-2.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -7.0], [-5.0, 0.0], [1.0, 4.0]], [[6.0, 7.0], [3.0, -1.0], [-7.0, -2.0]]])
-      arg1=Data(numpy.array([[[1.0, 2.0], [4.0, 2.0], [-3.0, -1.0]], [[5.0, 6.0], [-6.0, 7.0], [4.0, 0.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[3.0, -3.0, -5.0], [-3.0, -2.0, -1.0], [2.0, 6.0, -2.0], [-2.0, 1.0, -1.0], [-5.0, -2.0, 6.0]], 
+[[0.0, -2.0, -6.0], [4.0, -3.0, -1.0], [5.0, -7.0, -3.0], [-5.0, -6.0, 5.0], [-1.0, 0.0, 0.0]], [[-6.0, -5.0, 1.0], [6.0, -5.0, 
+0.0], [4.0, -1.0, 5.0], [-5.0, -6.0, 0.0], [4.0, 0.0, 0.0]], [[-4.0, -1.0, 1.0], [4.0, 3.0, 3.0], [-2.0, -1.0, 0.0], [5.0, 
+-1.0, 6.0], [-7.0, -5.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, -6.0, 0.0], [3.0, 0.0, -1.0], [1.0, 5.0, -2.0], [-4.0, -7.0, -7.0], [2.0, -4.0, 
+-6.0]], [[0.0, 0.0, 5.0], [-3.0, -3.0, -1.0], [-4.0, -7.0, -3.0], [-1.0, 3.0, 5.0], [5.0, -2.0, 0.0]], [[-2.0, -1.0, -6.0], 
+[-3.0, 2.0, 1.0], [-6.0, -5.0, 7.0], [-3.0, 0.0, -1.0], [0.0, -7.0, 7.0]], [[0.0, -4.0, 5.0], [-6.0, -3.0, -3.0], [-1.0, -6.0, 
+-6.0], [4.0, -7.0, -4.0], [6.0, 4.0, 3.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[5.0, -4.0], [4.0, -5.0], [-4.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -1.0], [4.0, 6.0], [-7.0, 2.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-12.0, 43.0], [16.0, 79.0]])+(1.-msk_ref)*numpy.array([[-37.0, 50.0], [14.0, 17.0]])
+      ref=msk_ref*numpy.array([[[23.0, -2.0], [-19.0, 21.0], [42.0, -40.0], [-2.0, 2.0], [-57.0, 36.0]], [[16.0, 4.0], [12.0, 
+-2.0], [9.0, 12.0], [-69.0, 55.0], [-5.0, 4.0]], [[-54.0, 50.0], [10.0, 1.0], [-4.0, -6.0], [-49.0, 50.0], [20.0, -16.0]], 
+[[-28.0, 22.0], [20.0, -28.0], [-14.0, 13.0], [-3.0, -9.0], [-71.0, 57.0]]])+(1.-msk_ref)*numpy.array([[[-24.0, -36.0], [7.0, 
+-5.0], [34.0, 25.0], [21.0, -52.0], [26.0, -38.0]], [[-35.0, 10.0], [-5.0, -17.0], [-7.0, -44.0], [-23.0, 29.0], [-8.0, 
+-17.0]], [[38.0, -16.0], [1.0, 17.0], [-69.0, -10.0], [7.0, 1.0], [-77.0, -28.0]], [[-51.0, -14.0], [9.0, -18.0], [18.0, 
+-47.0], [0.0, -54.0], [-5.0, 24.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 7.0], [4.0, 2.0], [-1.0, 4.0]], [[-5.0, 0.0], [5.0, -3.0], [7.0, -4.0]], [[2.0, -7.0], 
-[-5.0, -2.0], [-4.0, -1.0]], [[-1.0, 2.0], [-5.0, 7.0], [2.0, -5.0]]], [[[-7.0, 0.0], [-7.0, -4.0], [-2.0, 5.0]], [[1.0, 1.0], 
-[-6.0, -4.0], [-3.0, 1.0]], [[2.0, -6.0], [0.0, -3.0], [-7.0, -2.0]], [[2.0, -1.0], [4.0, 2.0], [-6.0, 
-2.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 5.0], [-4.0, -6.0], [4.0, 2.0]], [[-5.0, -3.0], [-1.0, 1.0], [5.0, 5.0]], [[-7.0, 
--1.0], [5.0, -7.0], [-7.0, 7.0]], [[6.0, -2.0], [-6.0, -5.0], [5.0, 7.0]]], [[[4.0, -1.0], [6.0, 0.0], [5.0, 7.0]], [[-4.0, 
--7.0], [0.0, -1.0], [0.0, -1.0]], [[-1.0, 5.0], [0.0, 3.0], [7.0, 7.0]], [[6.0, -5.0], [-1.0, 7.0], [2.0, -3.0]]]])
-      arg1=Data(numpy.array([[[[5.0, 0.0], [5.0, -2.0], [3.0, 3.0]], [[5.0, 5.0], [4.0, 0.0], [-7.0, -3.0]], [[-3.0, -4.0], 
-[6.0, 3.0], [-4.0, -3.0]], [[-6.0, 4.0], [-5.0, -3.0], [7.0, 7.0]]], [[[7.0, 4.0], [3.0, 6.0], [1.0, 1.0]], [[1.0, 0.0], [-4.0, 
--6.0], [1.0, -6.0]], [[-3.0, 6.0], [6.0, -2.0], [2.0, 3.0]], [[3.0, 2.0], [-6.0, -2.0], [3.0, 7.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, 2.0, 2.0], [-5.0, 6.0, -2.0]], [[4.0, -6.0, 0.0], [5.0, 7.0, 2.0]], [[5.0, 2.0, -2.0], 
+[-2.0, 3.0, 5.0]], [[0.0, -6.0, 1.0], [0.0, -7.0, 7.0]], [[7.0, 4.0, -2.0], [-7.0, -5.0, -7.0]]], [[[2.0, 5.0, -2.0], [-4.0, 
+5.0, 1.0]], [[5.0, 1.0, -3.0], [-5.0, 0.0, -6.0]], [[7.0, 4.0, 2.0], [-7.0, -1.0, 7.0]], [[-4.0, -4.0, -6.0], [-4.0, -6.0, 
+-6.0]], [[-7.0, -6.0, -2.0], [-5.0, -4.0, -4.0]]], [[[-2.0, -1.0, 0.0], [-2.0, 3.0, 7.0]], [[-5.0, 0.0, -7.0], [1.0, 7.0, 
+6.0]], [[-2.0, -6.0, 4.0], [2.0, 7.0, 1.0]], [[-4.0, -2.0, 0.0], [0.0, -3.0, -1.0]], [[-6.0, -4.0, 7.0], [-5.0, -4.0, -4.0]]], 
+[[[1.0, 6.0, -3.0], [2.0, 1.0, -4.0]], [[3.0, 0.0, 5.0], [-7.0, 1.0, 5.0]], [[-6.0, 0.0, -5.0], [6.0, -2.0, -6.0]], [[-7.0, 
+4.0, 0.0], [5.0, -4.0, -6.0]], [[0.0, 6.0, 1.0], [0.0, -7.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 0.0, 2.0], [4.0, 6.0, -3.0]], [[5.0, -4.0, 4.0], [2.0, 2.0, -2.0]], [[0.0, 
+-5.0, 6.0], [-4.0, 7.0, 0.0]], [[4.0, 2.0, -3.0], [-5.0, 7.0, 5.0]], [[0.0, -7.0, -2.0], [-4.0, -3.0, 3.0]]], [[[-5.0, -7.0, 
+-3.0], [-3.0, 7.0, 5.0]], [[2.0, -2.0, 3.0], [5.0, 6.0, -1.0]], [[3.0, -1.0, 3.0], [0.0, 7.0, -7.0]], [[5.0, 6.0, -7.0], [0.0, 
+-7.0, -1.0]], [[2.0, -4.0, 6.0], [-4.0, -3.0, 7.0]]], [[[-6.0, -7.0, -6.0], [-6.0, -6.0, 1.0]], [[6.0, 4.0, -3.0], [-7.0, -4.0, 
+-1.0]], [[6.0, 3.0, -5.0], [-3.0, -2.0, -3.0]], [[0.0, 0.0, -6.0], [-4.0, 7.0, 1.0]], [[1.0, 7.0, -6.0], [-4.0, 7.0, -1.0]]], 
+[[[-7.0, 2.0, -3.0], [1.0, 0.0, -2.0]], [[-1.0, -6.0, 2.0], [-6.0, 6.0, -6.0]], [[-6.0, 6.0, -6.0], [2.0, -7.0, -5.0]], [[-4.0, 
+5.0, -5.0], [-4.0, 6.0, -3.0]], [[7.0, 6.0, 2.0], [-1.0, -1.0, 0.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-2.0, -3.0], [-4.0, -4.0], [-1.0, -2.0]], [[7.0, 1.0], [-3.0, 0.0], [-2.0, 
+-1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 4.0], [-1.0, -6.0], [3.0, 1.0]], [[0.0, 7.0], [7.0, 5.0], [-3.0, -1.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-118.0, -116.0], [2.0, -32.0]])+(1.-msk_ref)*numpy.array([[110.0, 221.0], [-79.0, 21.0]])
+      ref=msk_ref*numpy.array([[[-59.0, -15.0], [26.0, 15.0], [-49.0, -26.0], [30.0, 15.0], [-48.0, -33.0]], [[-67.0, -27.0], 
+[-34.0, -12.0], [-92.0, -55.0], [32.0, 42.0], [25.0, 48.0]], [[-29.0, 1.0], [-9.0, 24.0], [15.0, 23.0], [27.0, 21.0], [6.0, 
+19.0]], [[-4.0, -15.0], [-73.0, -31.0], [77.0, 40.0], [57.0, 16.0], [-18.0, -33.0]]])+(1.-msk_ref)*numpy.array([[[57.0, 83.0], 
+[36.0, 74.0], [72.0, 43.0], [23.0, -4.0], [-29.0, -6.0]], [[32.0, 28.0], [56.0, 89.0], [80.0, 63.0], [-73.0, -57.0], [-20.0, 
+-12.0]], [[-56.0, -61.0], [-38.0, -71.0], [-23.0, -27.0], [28.0, 0.0], [27.0, -36.0]], [[-5.0, -34.0], [72.0, 28.0], [-58.0, 
+-82.0], [31.0, -46.0], [-7.0, -18.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-3.0, 5.0])+(1.-msk_arg0)*numpy.array([6.0, 4.0])
-      arg1=Data(numpy.array([[-3.0, 6.0, 2.0, -7.0, -3.0], [-4.0, 2.0, -5.0, 5.0, 0.0], [3.0, -4.0, 4.0, 7.0, -3.0], [0.0, 2.0, 
-2.0, 7.0, -5.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[2.0, -3.0, 3.0, -2.0, 5.0], [6.0, 1.0, -3.0, -5.0, 0.0], [0.0, 5.0, 1.0, 5.0, 5.0], [1.0, -3.0, 
+-6.0, -7.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, -6.0, 3.0, -7.0, -6.0], [6.0, 1.0, -3.0, -4.0, 2.0], [2.0, 4.0, 2.0, 4.0, 2.0], 
+[4.0, -2.0, 6.0, 6.0, 6.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[5.0, 0.0, -3.0, 2.0, -5.0], [0.0, -4.0, -5.0, 5.0, -5.0], [-1.0, -4.0, -6.0, -7.0, 5.0], [1.0, 
+4.0, -6.0, -7.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, 2.0, 2.0, -2.0, -7.0], [-7.0, -6.0, -7.0, -3.0, -6.0], [-3.0, -2.0, 0.0, 4.0, 
+-6.0], [-7.0, -1.0, -3.0, 3.0, 0.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[9.0, -18.0, -6.0, 21.0, 9.0], [12.0, -6.0, 15.0, -15.0, 0.0], [-9.0, 12.0, -12.0, -21.0, 9.0], 
-[0.0, -6.0, -6.0, -21.0, 15.0]], [[-15.0, 30.0, 10.0, -35.0, -15.0], [-20.0, 10.0, -25.0, 25.0, 0.0], [15.0, -20.0, 20.0, 35.0, 
--15.0], [0.0, 10.0, 10.0, 35.0, -25.0]]])+(1.-msk_ref)*numpy.array([[[-18.0, 36.0, 12.0, -42.0, -18.0], [-24.0, 12.0, -30.0, 
-30.0, 0.0], [18.0, -24.0, 24.0, 42.0, -18.0], [0.0, 12.0, 12.0, 42.0, -30.0]], [[-12.0, 24.0, 8.0, -28.0, -12.0], [-16.0, 8.0, 
--20.0, 20.0, 0.0], [12.0, -16.0, 16.0, 28.0, -12.0], [0.0, 8.0, 8.0, 28.0, -20.0]]])
+      ref=msk_ref*numpy.array([[[[10.0, 0.0, -6.0, 4.0, -10.0], [0.0, -8.0, -10.0, 10.0, -10.0], [-2.0, -8.0, -12.0, -14.0, 
+10.0], [2.0, 8.0, -12.0, -14.0, 0.0]], [[-15.0, 0.0, 9.0, -6.0, 15.0], [0.0, 12.0, 15.0, -15.0, 15.0], [3.0, 12.0, 18.0, 21.0, 
+-15.0], [-3.0, -12.0, 18.0, 21.0, 0.0]], [[15.0, 0.0, -9.0, 6.0, -15.0], [0.0, -12.0, -15.0, 15.0, -15.0], [-3.0, -12.0, -18.0, 
+-21.0, 15.0], [3.0, 12.0, -18.0, -21.0, 0.0]], [[-10.0, 0.0, 6.0, -4.0, 10.0], [0.0, 8.0, 10.0, -10.0, 10.0], [2.0, 8.0, 12.0, 
+14.0, -10.0], [-2.0, -8.0, 12.0, 14.0, 0.0]], [[25.0, 0.0, -15.0, 10.0, -25.0], [0.0, -20.0, -25.0, 25.0, -25.0], [-5.0, -20.0, 
+-30.0, -35.0, 25.0], [5.0, 20.0, -30.0, -35.0, 0.0]]], [[[30.0, 0.0, -18.0, 12.0, -30.0], [0.0, -24.0, -30.0, 30.0, -30.0], 
+[-6.0, -24.0, -36.0, -42.0, 30.0], [6.0, 24.0, -36.0, -42.0, 0.0]], [[5.0, 0.0, -3.0, 2.0, -5.0], [0.0, -4.0, -5.0, 5.0, -5.0], 
+[-1.0, -4.0, -6.0, -7.0, 5.0], [1.0, 4.0, -6.0, -7.0, 0.0]], [[-15.0, 0.0, 9.0, -6.0, 15.0], [0.0, 12.0, 15.0, -15.0, 15.0], 
+[3.0, 12.0, 18.0, 21.0, -15.0], [-3.0, -12.0, 18.0, 21.0, 0.0]], [[-25.0, 0.0, 15.0, -10.0, 25.0], [0.0, 20.0, 25.0, -25.0, 
+25.0], [5.0, 20.0, 30.0, 35.0, -25.0], [-5.0, -20.0, 30.0, 35.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[25.0, 0.0, -15.0, 10.0, -25.0], [0.0, -20.0, -25.0, 25.0, -25.0], [-5.0, -20.0, -30.0, 
+-35.0, 25.0], [5.0, 20.0, -30.0, -35.0, 0.0]], [[5.0, 0.0, -3.0, 2.0, -5.0], [0.0, -4.0, -5.0, 5.0, -5.0], [-1.0, -4.0, -6.0, 
+-7.0, 5.0], [1.0, 4.0, -6.0, -7.0, 0.0]], [[25.0, 0.0, -15.0, 10.0, -25.0], [0.0, -20.0, -25.0, 25.0, -25.0], [-5.0, -20.0, 
+-30.0, -35.0, 25.0], [5.0, 20.0, -30.0, -35.0, 0.0]], [[25.0, 0.0, -15.0, 10.0, -25.0], [0.0, -20.0, -25.0, 25.0, -25.0], 
+[-5.0, -20.0, -30.0, -35.0, 25.0], [5.0, 20.0, -30.0, -35.0, 0.0]]], [[[5.0, 0.0, -3.0, 2.0, -5.0], [0.0, -4.0, -5.0, 5.0, 
+-5.0], [-1.0, -4.0, -6.0, -7.0, 5.0], [1.0, 4.0, -6.0, -7.0, 0.0]], [[-15.0, 0.0, 9.0, -6.0, 15.0], [0.0, 12.0, 15.0, -15.0, 
+15.0], [3.0, 12.0, 18.0, 21.0, -15.0], [-3.0, -12.0, 18.0, 21.0, 0.0]], [[-30.0, 0.0, 18.0, -12.0, 30.0], [0.0, 24.0, 30.0, 
+-30.0, 30.0], [6.0, 24.0, 36.0, 42.0, -30.0], [-6.0, -24.0, 36.0, 42.0, 0.0]], [[-35.0, 0.0, 21.0, -14.0, 35.0], [0.0, 28.0, 
+35.0, -35.0, 35.0], [7.0, 28.0, 42.0, 49.0, -35.0], [-7.0, -28.0, 42.0, 49.0, 0.0]], [[-5.0, 0.0, 3.0, -2.0, 5.0], [0.0, 4.0, 
+5.0, -5.0, 5.0], [1.0, 4.0, 6.0, 7.0, -5.0], [-1.0, -4.0, 6.0, 7.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-24.0, -8.0, -8.0, 
+8.0, 28.0], [28.0, 24.0, 28.0, 12.0, 24.0], [12.0, 8.0, 0.0, -16.0, 24.0], [28.0, 4.0, 12.0, -12.0, 0.0]], [[-36.0, -12.0, 
+-12.0, 12.0, 42.0], [42.0, 36.0, 42.0, 18.0, 36.0], [18.0, 12.0, 0.0, -24.0, 36.0], [42.0, 6.0, 18.0, -18.0, 0.0]], [[18.0, 
+6.0, 6.0, -6.0, -21.0], [-21.0, -18.0, -21.0, -9.0, -18.0], [-9.0, -6.0, 0.0, 12.0, -18.0], [-21.0, -3.0, -9.0, 9.0, 0.0]], 
+[[-42.0, -14.0, -14.0, 14.0, 49.0], [49.0, 42.0, 49.0, 21.0, 42.0], [21.0, 14.0, 0.0, -28.0, 42.0], [49.0, 7.0, 21.0, -21.0, 
+0.0]], [[-36.0, -12.0, -12.0, 12.0, 42.0], [42.0, 36.0, 42.0, 18.0, 36.0], [18.0, 12.0, 0.0, -24.0, 36.0], [42.0, 6.0, 18.0, 
+-18.0, 0.0]]], [[[36.0, 12.0, 12.0, -12.0, -42.0], [-42.0, -36.0, -42.0, -18.0, -36.0], [-18.0, -12.0, 0.0, 24.0, -36.0], 
+[-42.0, -6.0, -18.0, 18.0, 0.0]], [[6.0, 2.0, 2.0, -2.0, -7.0], [-7.0, -6.0, -7.0, -3.0, -6.0], [-3.0, -2.0, 0.0, 4.0, -6.0], 
+[-7.0, -1.0, -3.0, 3.0, 0.0]], [[-18.0, -6.0, -6.0, 6.0, 21.0], [21.0, 18.0, 21.0, 9.0, 18.0], [9.0, 6.0, 0.0, -12.0, 18.0], 
+[21.0, 3.0, 9.0, -9.0, 0.0]], [[-24.0, -8.0, -8.0, 8.0, 28.0], [28.0, 24.0, 28.0, 12.0, 24.0], [12.0, 8.0, 0.0, -16.0, 24.0], 
+[28.0, 4.0, 12.0, -12.0, 0.0]], [[12.0, 4.0, 4.0, -4.0, -14.0], [-14.0, -12.0, -14.0, -6.0, -12.0], [-6.0, -4.0, 0.0, 8.0, 
+-12.0], [-14.0, -2.0, -6.0, 6.0, 0.0]]], [[[12.0, 4.0, 4.0, -4.0, -14.0], [-14.0, -12.0, -14.0, -6.0, -12.0], [-6.0, -4.0, 0.0, 
+8.0, -12.0], [-14.0, -2.0, -6.0, 6.0, 0.0]], [[24.0, 8.0, 8.0, -8.0, -28.0], [-28.0, -24.0, -28.0, -12.0, -24.0], [-12.0, -8.0, 
+0.0, 16.0, -24.0], [-28.0, -4.0, -12.0, 12.0, 0.0]], [[12.0, 4.0, 4.0, -4.0, -14.0], [-14.0, -12.0, -14.0, -6.0, -12.0], [-6.0, 
+-4.0, 0.0, 8.0, -12.0], [-14.0, -2.0, -6.0, 6.0, 0.0]], [[24.0, 8.0, 8.0, -8.0, -28.0], [-28.0, -24.0, -28.0, -12.0, -24.0], 
+[-12.0, -8.0, 0.0, 16.0, -24.0], [-28.0, -4.0, -12.0, 12.0, 0.0]], [[12.0, 4.0, 4.0, -4.0, -14.0], [-14.0, -12.0, -14.0, -6.0, 
+-12.0], [-6.0, -4.0, 0.0, 8.0, -12.0], [-14.0, -2.0, -6.0, 6.0, 0.0]]], [[[24.0, 8.0, 8.0, -8.0, -28.0], [-28.0, -24.0, -28.0, 
+-12.0, -24.0], [-12.0, -8.0, 0.0, 16.0, -24.0], [-28.0, -4.0, -12.0, 12.0, 0.0]], [[-12.0, -4.0, -4.0, 4.0, 14.0], [14.0, 12.0, 
+14.0, 6.0, 12.0], [6.0, 4.0, 0.0, -8.0, 12.0], [14.0, 2.0, 6.0, -6.0, 0.0]], [[36.0, 12.0, 12.0, -12.0, -42.0], [-42.0, -36.0, 
+-42.0, -18.0, -36.0], [-18.0, -12.0, 0.0, 24.0, -36.0], [-42.0, -6.0, -18.0, 18.0, 0.0]], [[36.0, 12.0, 12.0, -12.0, -42.0], 
+[-42.0, -36.0, -42.0, -18.0, -36.0], [-18.0, -12.0, 0.0, 24.0, -36.0], [-42.0, -6.0, -18.0, 18.0, 0.0]], [[36.0, 12.0, 12.0, 
+-12.0, -42.0], [-42.0, -36.0, -42.0, -18.0, -36.0], [-18.0, -12.0, 0.0, 24.0, -36.0], [-42.0, -6.0, -18.0, 18.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -4.0], [2.0, 3.0], [-3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 1.0], [0.0, -6.0], 
-[-7.0, 0.0]])
-      arg1=Data(numpy.array([[[1.0, 0.0, 0.0, 2.0, -1.0], [6.0, -3.0, 0.0, 3.0, -3.0], [-4.0, 3.0, -7.0, -4.0, -5.0], [0.0, 
-2.0, 5.0, -5.0, -7.0]], [[0.0, 4.0, 2.0, -1.0, 4.0], [-7.0, -5.0, 3.0, -6.0, 3.0], [7.0, -5.0, -5.0, -6.0, 4.0], [-2.0, -6.0, 
--4.0, 2.0, 1.0]], [[-7.0, 6.0, -2.0, 7.0, -3.0], [4.0, -3.0, -3.0, 3.0, 7.0], [7.0, 0.0, 2.0, 6.0, 6.0], [-6.0, -6.0, 0.0, 
--4.0, 1.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -3.0, 3.0], [-4.0, -7.0, -1.0], [7.0, -7.0, -5.0], [-4.0, 5.0, 2.0], [-4.0, -6.0, -5.0]], 
+[[1.0, -7.0, 0.0], [1.0, 0.0, -7.0], [6.0, -6.0, -2.0], [-6.0, 0.0, -2.0], [-3.0, -3.0, 0.0]], [[0.0, 7.0, 1.0], [-5.0, 6.0, 
+-6.0], [-2.0, 0.0, 4.0], [6.0, 0.0, 5.0], [-3.0, 2.0, -2.0]], [[-7.0, -4.0, 3.0], [7.0, -4.0, 3.0], [1.0, 7.0, -2.0], [6.0, 
+-7.0, -2.0], [0.0, 2.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 7.0, 2.0], [0.0, -5.0, 0.0], [-3.0, 3.0, -1.0], [-6.0, 1.0, -1.0], [-4.0, 1.0, 
+0.0]], [[3.0, -6.0, -5.0], [-1.0, 0.0, 2.0], [1.0, 0.0, -5.0], [-5.0, 2.0, -7.0], [1.0, 2.0, -3.0]], [[1.0, 0.0, -6.0], [2.0, 
+2.0, -6.0], [-6.0, -5.0, -6.0], [-3.0, 0.0, -7.0], [4.0, -2.0, 3.0]], [[2.0, -3.0, 3.0], [6.0, 2.0, -4.0], [-7.0, -2.0, -5.0], 
+[-6.0, -4.0, 6.0], [0.0, 3.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[7.0, 3.0, -4.0, 7.0, 1.0], [0.0, -4.0, 7.0, 4.0, 3.0], [4.0, 0.0, 4.0, 5.0, 5.0], [-1.0, 0.0, 
+2.0, 2.0, -1.0]], [[0.0, 7.0, 4.0, 7.0, -1.0], [5.0, 1.0, 1.0, -1.0, 0.0], [7.0, 5.0, 7.0, -4.0, 2.0], [3.0, 7.0, -4.0, -2.0, 
+-1.0]], [[-7.0, 7.0, 5.0, -1.0, 6.0], [5.0, -2.0, -3.0, 3.0, 5.0], [7.0, -2.0, 5.0, -2.0, 5.0], [4.0, 0.0, 1.0, 7.0, 
+2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 0.0, 4.0, 7.0, 2.0], [7.0, -4.0, -3.0, -5.0, -5.0], [-5.0, 5.0, 6.0, -2.0, 
+7.0], [2.0, 1.0, -3.0, 5.0, 6.0]], [[4.0, -2.0, 1.0, 0.0, -7.0], [4.0, 5.0, 4.0, 5.0, -6.0], [4.0, -2.0, 4.0, -3.0, 4.0], [6.0, 
+-5.0, -6.0, 5.0, -6.0]], [[3.0, 5.0, -7.0, 6.0, 4.0], [-1.0, -5.0, -6.0, 1.0, 0.0], [1.0, 1.0, -5.0, 5.0, 5.0], [-5.0, 2.0, 
+0.0, 7.0, -6.0]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[24.0, -10.0, 10.0, -17.0, 14.0], [-8.0, -10.0, 15.0, -12.0, -24.0], [-19.0, -1.0, -37.0, 
--42.0, -25.0], [14.0, 12.0, 7.0, 1.0, -22.0]], [[-4.0, 12.0, 6.0, -11.0, 16.0], [-45.0, -3.0, 9.0, -30.0, 21.0], [37.0, -27.0, 
-13.0, -2.0, 32.0], [-6.0, -26.0, -32.0, 26.0, 31.0]]])+(1.-msk_ref)*numpy.array([[[48.0, -42.0, 14.0, -51.0, 22.0], [-34.0, 
-24.0, 21.0, -24.0, -46.0], [-45.0, -3.0, -7.0, -38.0, -37.0], [42.0, 40.0, -5.0, 33.0, 0.0]], [[1.0, -24.0, -12.0, 8.0, -25.0], 
-[48.0, 27.0, -18.0, 39.0, -21.0], [-46.0, 33.0, 23.0, 32.0, -29.0], [12.0, 38.0, 29.0, -17.0, -13.0]]])
+      ref=msk_ref*numpy.array([[[[-21.0, 0.0, 3.0, -24.0, 21.0], [0.0, -9.0, -12.0, 12.0, 15.0], [0.0, -21.0, -6.0, 6.0, 9.0], 
+[3.0, -21.0, 15.0, 27.0, 9.0]], [[-21.0, -68.0, -17.0, -76.0, -3.0], [-40.0, 11.0, -32.0, -12.0, -17.0], [-72.0, -33.0, -70.0, 
+10.0, -39.0], [-21.0, -49.0, 19.0, -1.0, 9.0]], [[84.0, -63.0, -81.0, 5.0, -16.0], [-60.0, -25.0, 57.0, 20.0, -4.0], [-56.0, 
+-25.0, -46.0, 73.0, -4.0], [-48.0, -49.0, 37.0, -7.0, -10.0]], [[-42.0, 37.0, 46.0, 5.0, 3.0], [35.0, 17.0, -29.0, -15.0, 
+-2.0], [33.0, 21.0, 29.0, -44.0, 0.0], [27.0, 35.0, -26.0, -4.0, 3.0]], [[7.0, -89.0, -33.0, -65.0, -28.0], [-55.0, 20.0, 
+-19.0, -25.0, -37.0], [-93.0, -20.0, -83.0, 14.0, -57.0], [-34.0, -42.0, 11.0, -31.0, 0.0]]], [[[7.0, -46.0, -32.0, -42.0, 
+8.0], [-35.0, -11.0, 0.0, 11.0, 3.0], [-45.0, -35.0, -45.0, 33.0, -9.0], [-22.0, -49.0, 30.0, 16.0, 6.0]], [[56.0, -46.0, 
+-39.0, 14.0, -41.0], [-35.0, 10.0, 28.0, -17.0, -32.0], [-45.0, 14.0, -31.0, 19.0, -30.0], [-29.0, 0.0, -5.0, -47.0, -15.0]], 
+[[56.0, -38.0, -58.0, 2.0, 0.0], [-40.0, -26.0, 42.0, 24.0, 8.0], [-32.0, -26.0, -28.0, 58.0, 8.0], [-32.0, -42.0, 34.0, 10.0, 
+-4.0]], [[-28.0, -32.0, 14.0, -40.0, -18.0], [-10.0, 28.0, -36.0, -30.0, -28.0], [-38.0, 4.0, -34.0, -26.0, -40.0], [-2.0, 0.0, 
+-14.0, -26.0, 2.0]], [[-21.0, -30.0, 0.0, -42.0, 0.0], [-15.0, 9.0, -24.0, -9.0, -9.0], [-33.0, -15.0, -33.0, -3.0, -21.0], 
+[-6.0, -21.0, 6.0, 0.0, 6.0]]], [[[-7.0, 56.0, 33.0, 48.0, -1.0], [40.0, 5.0, 4.0, -4.0, 5.0], [56.0, 33.0, 54.0, -30.0, 19.0], 
+[25.0, 49.0, -27.0, -7.0, -5.0]], [[7.0, -15.0, 14.0, 13.0, -47.0], [0.0, 38.0, -11.0, -44.0, -45.0], [-20.0, 42.0, -8.0, 
+-37.0, -43.0], [-1.0, 42.0, -40.0, -64.0, -13.0]], [[-42.0, 22.0, 28.0, -18.0, 22.0], [20.0, 0.0, -26.0, 4.0, 14.0], [20.0, 
+-8.0, 12.0, -18.0, 10.0], [18.0, 0.0, 0.0, 24.0, 10.0]], [[7.0, 53.0, 1.0, 37.0, 36.0], [25.0, -34.0, 27.0, 39.0, 43.0], [59.0, 
+-10.0, 49.0, 20.0, 55.0], [14.0, 0.0, 17.0, 47.0, 4.0]], [[-7.0, -9.0, 10.0, -5.0, -17.0], [0.0, 18.0, -13.0, -20.0, -19.0], 
+[-12.0, 14.0, -8.0, -19.0, -21.0], [1.0, 14.0, -16.0, -24.0, -3.0]]], [[[-70.0, -28.0, 27.0, -80.0, 15.0], [-5.0, 18.0, -62.0, 
+-15.0, -6.0], [-35.0, -26.0, -41.0, -25.0, -28.0], [7.0, -28.0, 5.0, 15.0, 17.0]], [[28.0, 14.0, -29.0, 18.0, 29.0], [-5.0, 
+-38.0, 36.0, 41.0, 36.0], [21.0, -26.0, 15.0, 45.0, 42.0], [-7.0, -28.0, 33.0, 43.0, 3.0]], [[21.0, 38.0, 14.0, 58.0, -18.0], 
+[25.0, 7.0, 20.0, -9.0, -7.0], [39.0, 39.0, 43.0, -19.0, 9.0], [12.0, 49.0, -28.0, -26.0, -12.0]], [[56.0, -45.0, -62.0, -5.0, 
+1.0], [-45.0, -27.0, 41.0, 25.0, 8.0], [-39.0, -31.0, -35.0, 62.0, 6.0], [-35.0, -49.0, 38.0, 12.0, -3.0]], [[49.0, -35.0, 
+-27.0, 21.0, -44.0], [-25.0, 16.0, 23.0, -23.0, -35.0], [-35.0, 24.0, -21.0, 6.0, -31.0], [-22.0, 14.0, -15.0, -53.0, 
+-16.0]]]])+(1.-msk_ref)*numpy.array([[[[-2.0, -4.0, 17.0, 54.0, -29.0], [68.0, 1.0, -2.0, 7.0, -72.0], [0.0, 18.0, 54.0, -23.0, 
+80.0], [44.0, -25.0, -60.0, 79.0, -18.0]], [[-20.0, 10.0, -5.0, 0.0, 35.0], [-20.0, -25.0, -20.0, -25.0, 30.0], [-20.0, 10.0, 
+-20.0, 15.0, -20.0], [-30.0, 25.0, 30.0, -25.0, 30.0]], [[27.0, -11.0, -2.0, -27.0, -31.0], [-8.0, 32.0, 27.0, 29.0, -3.0], 
+[26.0, -22.0, -1.0, -8.0, -14.0], [17.0, -20.0, -9.0, -7.0, -30.0]], [[37.0, -7.0, -16.0, -48.0, -23.0], [-37.0, 34.0, 28.0, 
+34.0, 24.0], [33.0, -33.0, -27.0, 4.0, -43.0], [-1.0, -13.0, 12.0, -32.0, -36.0]], [[28.0, -2.0, -15.0, -28.0, -15.0], [-24.0, 
+21.0, 16.0, 25.0, 14.0], [24.0, -22.0, -20.0, 5.0, -24.0], [-2.0, -9.0, 6.0, -15.0, -30.0]]], [[[-57.0, -13.0, 41.0, -9.0, 
+28.0], [2.0, -17.0, -3.0, -50.0, 21.0], [-44.0, 22.0, 19.0, -13.0, -28.0], [-5.0, 23.0, 27.0, -50.0, 84.0]], [[12.0, 10.0, 
+-18.0, 5.0, 6.0], [-9.0, -6.0, -9.0, 7.0, 5.0], [7.0, -3.0, -16.0, 12.0, 3.0], [-12.0, 3.0, 3.0, 9.0, -18.0]], [[-21.0, -25.0, 
+39.0, -23.0, -18.0], [12.0, 21.0, 27.0, -10.0, -5.0], [-10.0, 0.0, 31.0, -27.0, -18.0], [27.0, -9.0, -3.0, -30.0, 36.0]], 
+[[17.0, -39.0, 31.0, -77.0, -52.0], [-20.0, 65.0, 65.0, 28.0, 13.0], [26.0, -36.0, 13.0, -31.0, -62.0], [37.0, -29.0, 3.0, 
+-64.0, 0.0]], [[-7.0, -19.0, 27.0, -11.0, -24.0], [18.0, 21.0, 23.0, 2.0, -17.0], [0.0, -2.0, 29.0, -23.0, 0.0], [29.0, -15.0, 
+-15.0, -6.0, 12.0]]], [[[-24.0, -30.0, 46.0, -29.0, -22.0], [13.0, 26.0, 33.0, -11.0, -5.0], [-11.0, -1.0, 36.0, -32.0, -23.0], 
+[32.0, -11.0, -3.0, -37.0, 42.0]], [[-22.0, -34.0, 52.0, -22.0, -34.0], [28.0, 32.0, 38.0, -6.0, -22.0], [-8.0, 0.0, 50.0, 
+-40.0, -8.0], [46.0, -20.0, -18.0, -22.0, 36.0]], [[-2.0, -20.0, 13.0, -78.0, -1.0], [-56.0, 29.0, 34.0, -1.0, 60.0], [4.0, 
+-26.0, -26.0, -3.0, -92.0], [-12.0, 7.0, 48.0, -97.0, 30.0]], [[-3.0, -35.0, 37.0, -63.0, -34.0], [-14.0, 47.0, 51.0, 8.0, 
+15.0], [8.0, -22.0, 17.0, -29.0, -56.0], [29.0, -17.0, 9.0, -64.0, 24.0]], [[-23.0, 19.0, -7.0, 46.0, 34.0], [17.0, -41.0, 
+-38.0, -27.0, -8.0], [-25.0, 27.0, 1.0, 13.0, 35.0], [-19.0, 20.0, 0.0, 31.0, 18.0]]], [[[-15.0, 21.0, -16.0, 32.0, 37.0], 
+[-1.0, -38.0, -36.0, -22.0, 8.0], [-19.0, 19.0, -15.0, 20.0, 17.0], [-29.0, 23.0, 12.0, 16.0, 12.0]], [[-40.0, -24.0, 54.0, 
+18.0, -18.0], [54.0, 6.0, 14.0, -24.0, -42.0], [-26.0, 22.0, 64.0, -38.0, 30.0], [44.0, -12.0, -30.0, 12.0, 48.0]], [[19.0, 
+-21.0, 5.0, -79.0, -20.0], [-52.0, 43.0, 43.0, 20.0, 47.0], [22.0, -36.0, -25.0, -5.0, -82.0], [-1.0, -7.0, 33.0, -80.0, 0.0]], 
+[[38.0, 38.0, -70.0, -6.0, 40.0], [-64.0, -26.0, -34.0, 16.0, 54.0], [20.0, -16.0, -82.0, 54.0, -28.0], [-66.0, 26.0, 42.0, 
+-8.0, -48.0]], [[12.0, -6.0, 3.0, 0.0, -21.0], [12.0, 15.0, 12.0, 15.0, -18.0], [12.0, -6.0, 12.0, -9.0, 12.0], [18.0, -15.0, 
+-18.0, 15.0, -18.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, -2.0], [5.0, 3.0], [4.0, 4.0]], [[0.0, -4.0], [-6.0, 5.0], [-2.0, 
-3.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 1.0], [0.0, 5.0], [7.0, -3.0]], [[-3.0, -4.0], [6.0, 5.0], [0.0, 1.0]]])
-      arg1=Data(numpy.array([[[[-5.0, 2.0, 2.0, 6.0, 5.0], [5.0, -4.0, 5.0, -7.0, 6.0], [5.0, -5.0, 5.0, -1.0, 2.0], [1.0, 4.0, 
-6.0, 4.0, -5.0]], [[-2.0, -2.0, -1.0, 4.0, 0.0], [-4.0, 6.0, 2.0, 7.0, -4.0], [4.0, 6.0, 1.0, -3.0, 3.0], [2.0, -4.0, 3.0, 
--6.0, -5.0]], [[5.0, -5.0, -6.0, 0.0, 0.0], [-2.0, -1.0, 7.0, 7.0, 7.0], [-4.0, 6.0, 1.0, -3.0, -5.0], [-1.0, -6.0, -5.0, 1.0, 
-2.0]]], [[[-7.0, 5.0, -3.0, 6.0, 7.0], [5.0, -1.0, -7.0, 0.0, 1.0], [2.0, -5.0, 3.0, 1.0, -1.0], [5.0, 2.0, 3.0, -5.0, 7.0]], 
-[[-3.0, -5.0, 2.0, -4.0, -6.0], [0.0, 5.0, 4.0, 3.0, 4.0], [-2.0, 6.0, -6.0, -5.0, -3.0], [2.0, 5.0, 4.0, 5.0, -1.0]], [[4.0, 
-3.0, -2.0, -3.0, 0.0], [6.0, -7.0, 0.0, 1.0, 4.0], [-4.0, 6.0, 6.0, 2.0, -7.0], [-5.0, -2.0, -1.0, 2.0, 
--6.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[25.0, -8.0, -39.0, 44.0, 31.0], [-45.0, 14.0, 9.0, 50.0, -30.0], [19.0, 11.0, 28.0, 0.0, 
-25.0], [3.0, -74.0, -33.0, -64.0, 6.0]], [[49.0, -66.0, -15.0, -53.0, -68.0], [-32.0, 30.0, 72.0, 81.0, 32.0], [-44.0, 120.0, 
--27.0, -42.0, -47.0], [-25.0, -33.0, -18.0, 29.0, -48.0]]])+(1.-msk_ref)*numpy.array([[[23.0, -74.0, -15.0, -24.0, -42.0], 
-[-14.0, 14.0, 109.0, 46.0, 88.0], [-31.0, 78.0, -23.0, -57.0, -44.0], [-7.0, -6.0, -2.0, 64.0, -28.0]], [[-13.0, -35.0, 35.0, 
--21.0, -53.0], [-23.0, 51.0, 42.0, 23.0, -15.0], [15.0, 63.0, -29.0, -34.0, 14.0], [-1.0, 17.0, 43.0, 18.0, -75.0]]])
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-7.0, 6.0, 4.0], [7.0, -3.0, -1.0]], [[6.0, 3.0, -4.0], [-7.0, 0.0, 0.0]], [[5.0, 4.0, 0.0], 
+[-6.0, -5.0, 7.0]], [[7.0, -5.0, 6.0], [-2.0, 3.0, 5.0]], [[0.0, 7.0, -2.0], [-3.0, -2.0, -7.0]]], [[[0.0, -1.0, -5.0], [4.0, 
+-7.0, -3.0]], [[0.0, 2.0, 2.0], [0.0, -2.0, -1.0]], [[-5.0, 6.0, -3.0], [4.0, 7.0, -4.0]], [[-1.0, -1.0, -3.0], [-4.0, 1.0, 
+-2.0]], [[-5.0, 0.0, 6.0], [4.0, 1.0, 2.0]]], [[[-6.0, 3.0, -7.0], [-7.0, 5.0, 6.0]], [[7.0, -7.0, 2.0], [4.0, 3.0, 0.0]], 
+[[0.0, 4.0, 5.0], [3.0, 5.0, 6.0]], [[2.0, 4.0, 0.0], [1.0, -1.0, -2.0]], [[-7.0, 0.0, -6.0], [-7.0, 7.0, 4.0]]], [[[0.0, -3.0, 
+-1.0], [-6.0, 4.0, 5.0]], [[-4.0, 0.0, -2.0], [2.0, -5.0, -6.0]], [[-1.0, -4.0, -4.0], [0.0, -1.0, 3.0]], [[3.0, 4.0, 4.0], 
+[-6.0, -2.0, -2.0]], [[2.0, -4.0, -3.0], [5.0, -4.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 5.0, 0.0], [5.0, 5.0, -6.0]], [[6.0, -7.0, 0.0], [-3.0, -2.0, 0.0]], [[3.0, 
+-1.0, 2.0], [-6.0, -5.0, 6.0]], [[1.0, -4.0, 3.0], [-4.0, -2.0, -6.0]], [[-2.0, 1.0, 2.0], [6.0, -5.0, 0.0]]], [[[-1.0, -4.0, 
+4.0], [-3.0, -4.0, 6.0]], [[0.0, -7.0, 1.0], [1.0, 0.0, 1.0]], [[2.0, -6.0, 5.0], [4.0, 5.0, 3.0]], [[-2.0, 2.0, 0.0], [2.0, 
+0.0, -7.0]], [[-4.0, -3.0, 2.0], [1.0, 0.0, 2.0]]], [[[-4.0, -6.0, -1.0], [6.0, 0.0, 2.0]], [[5.0, 0.0, -3.0], [5.0, -2.0, 
+6.0]], [[-2.0, -3.0, 7.0], [-1.0, -6.0, 5.0]], [[-7.0, 4.0, 7.0], [-4.0, -3.0, -2.0]], [[-1.0, -4.0, -2.0], [-3.0, -6.0, 
+1.0]]], [[[-2.0, 5.0, 0.0], [-1.0, -4.0, -4.0]], [[4.0, -2.0, 7.0], [0.0, -6.0, 0.0]], [[-5.0, 0.0, -5.0], [3.0, 7.0, -5.0]], 
+[[1.0, -1.0, 5.0], [-3.0, 4.0, 5.0]], [[-6.0, 2.0, 5.0], [5.0, -6.0, -3.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-3.0, 3.0, -5.0, 1.0, -6.0], [-4.0, -3.0, -6.0, 1.0, 0.0], [-2.0, -3.0, 0.0, -2.0, 7.0], [5.0, 
+-4.0, -3.0, -6.0, -4.0]], [[-1.0, -4.0, 4.0, 4.0, -3.0], [6.0, 7.0, -1.0, 6.0, 0.0], [3.0, -2.0, 1.0, 3.0, 6.0], [-2.0, 3.0, 
+5.0, 2.0, -5.0]], [[-3.0, 4.0, -4.0, 7.0, -4.0], [0.0, -5.0, -2.0, -2.0, -2.0], [0.0, 0.0, -4.0, -1.0, -4.0], [7.0, 6.0, -6.0, 
+0.0, -2.0]]], [[[7.0, -1.0, -2.0, -5.0, 0.0], [-3.0, 4.0, 7.0, 0.0, -3.0], [7.0, 0.0, 5.0, 2.0, 3.0], [1.0, 4.0, -6.0, -2.0, 
+1.0]], [[3.0, -4.0, -5.0, 2.0, -2.0], [-5.0, -2.0, 3.0, 6.0, 2.0], [-1.0, 0.0, -4.0, -2.0, 0.0], [4.0, -3.0, -2.0, -5.0, 0.0]], 
+[[0.0, 7.0, -5.0, 0.0, 6.0], [1.0, -7.0, -6.0, 6.0, 0.0], [-2.0, -2.0, -3.0, 0.0, 7.0], [-7.0, 2.0, 7.0, 6.0, 
+-7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, 7.0, 0.0, -4.0, 3.0], [-7.0, -6.0, -4.0, -2.0, 3.0], [6.0, -6.0, -1.0, -7.0, 
+-5.0], [-2.0, 0.0, 0.0, -4.0, 1.0]], [[2.0, -1.0, 1.0, -5.0, 5.0], [6.0, 6.0, -2.0, -4.0, 0.0], [0.0, 2.0, 0.0, -1.0, -1.0], 
+[-2.0, 6.0, 7.0, 5.0, -3.0]], [[7.0, -2.0, 1.0, 4.0, 4.0], [7.0, 4.0, -7.0, 2.0, 0.0], [6.0, 4.0, 0.0, 0.0, 0.0], [-2.0, 4.0, 
+-5.0, -1.0, -4.0]]], [[[-5.0, 3.0, -7.0, 2.0, -1.0], [-1.0, 0.0, 6.0, 3.0, 6.0], [-7.0, 5.0, 0.0, -4.0, -7.0], [0.0, 0.0, -2.0, 
+1.0, -4.0]], [[4.0, 0.0, -1.0, -2.0, -4.0], [-1.0, 1.0, 4.0, -5.0, 3.0], [1.0, -5.0, 2.0, 0.0, 0.0], [-6.0, -2.0, -4.0, -3.0, 
+0.0]], [[6.0, 6.0, 5.0, 6.0, 2.0], [5.0, -6.0, 7.0, -5.0, 0.0], [-2.0, -2.0, -1.0, -3.0, 1.0], [0.0, -6.0, 2.0, -4.0, 1.0]]]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[43.0, -31.0, 49.0, 4.0, 8.0], [57.0, 84.0, 74.0, -3.0, -35.0], [86.0, 11.0, 40.0, 48.0, 
+-15.0], [-17.0, 105.0, -16.0, 49.0, 4.0]], [[-58.0, -3.0, 12.0, 25.0, -29.0], [15.0, -5.0, -80.0, 32.0, 29.0], [-52.0, -24.0, 
+-16.0, -13.0, 55.0], [-11.0, -67.0, 63.0, -16.0, -38.0]], [[-76.0, 74.0, -7.0, 41.0, 10.0], [54.0, -50.0, -133.0, 41.0, 8.0], 
+[-49.0, -37.0, -27.0, 0.0, 90.0], [-58.0, -3.0, 100.0, 57.0, -95.0]], [[-39.0, 90.0, -115.0, 45.0, -27.0], [-62.0, -135.0, 
+-84.0, 13.0, 0.0], [-56.0, -21.0, -66.0, -45.0, 24.0], [62.0, -14.0, -41.0, -33.0, -52.0]], [[-28.0, -74.0, 87.0, 25.0, -51.0], 
+[54.0, 100.0, 12.0, -8.0, 9.0], [16.0, 0.0, 29.0, 21.0, -8.0], [10.0, -11.0, 20.0, -12.0, 15.0]]], [[[23.0, -13.0, 58.0, -73.0, 
+19.0], [14.0, 69.0, 36.0, -56.0, -16.0], [38.0, 8.0, 76.0, 24.0, 5.0], [-36.0, -2.0, -6.0, 7.0, 40.0]], [[-14.0, 1.0, 15.0, 
+18.0, -16.0], [21.0, 15.0, -6.0, -10.0, -8.0], [10.0, -2.0, 5.0, 8.0, -3.0], [9.0, 22.0, -5.0, 8.0, -7.0]], [[67.0, -111.0, 
+38.0, -8.0, -14.0], [5.0, 102.0, 103.0, 55.0, 8.0], [57.0, 11.0, 22.0, 25.0, -3.0], [2.0, 7.0, -3.0, -25.0, 28.0]], [[-12.0, 
+-25.0, 26.0, -4.0, 7.0], [3.0, 7.0, 0.0, -7.0, 20.0], [-26.0, 9.0, -7.0, -8.0, -27.0], [-10.0, -40.0, 24.0, -5.0, 25.0]], 
+[[28.0, 15.0, -22.0, 19.0, 16.0], [5.0, -15.0, 37.0, 1.0, -22.0], [33.0, 11.0, -14.0, 10.0, -33.0], [11.0, 73.0, -33.0, 29.0, 
+-2.0]]], [[[2.0, -29.0, 29.0, 2.0, 81.0], [44.0, -6.0, -23.0, 92.0, 45.0], [-45.0, 0.0, -42.0, 4.0, 25.0], [-114.0, -40.0, 
+149.0, 67.0, -26.0]], [[17.0, 41.0, -94.0, -21.0, -35.0], [-97.0, -70.0, -2.0, -21.0, -10.0], [-10.0, -7.0, -7.0, -35.0, 11.0], 
+[79.0, -30.0, -98.0, -79.0, 7.0]], [[17.0, 23.0, -65.0, 46.0, -6.0], [-4.0, -37.0, -14.0, 80.0, -9.0], [16.0, -20.0, -39.0, 
+3.0, 55.0], [8.0, 51.0, 4.0, 13.0, -69.0]], [[-6.0, -21.0, 19.0, 11.0, -34.0], [16.0, 42.0, 0.0, 8.0, -5.0], [20.0, -10.0, 
+19.0, 12.0, 27.0], [13.0, 7.0, -4.0, -13.0, -13.0]], [[11.0, -38.0, 18.0, 0.0, 76.0], [18.0, -19.0, 2.0, 71.0, 47.0], [-50.0, 
+13.0, -51.0, -8.0, -18.0], [-84.0, -49.0, 113.0, 45.0, 5.0]]], [[[-24.0, 33.0, -41.0, 19.0, 35.0], [-15.0, -83.0, -55.0, 38.0, 
+28.0], [-65.0, -4.0, -60.0, -28.0, 3.0], [-26.0, -41.0, 54.0, 16.0, -24.0]], [[17.0, -44.0, 79.0, -38.0, 6.0], [29.0, 82.0, 
+63.0, -66.0, -12.0], [39.0, 24.0, 56.0, 24.0, -56.0], [-10.0, 15.0, -20.0, 9.0, 64.0]], [[16.0, 22.0, -5.0, -47.0, 54.0], 
+[-12.0, -24.0, -3.0, -5.0, 6.0], [-15.0, 5.0, 7.0, -4.0, 6.0], [-50.0, -23.0, 30.0, 21.0, 11.0]], [[-73.0, 9.0, 17.0, 73.0, 
+-54.0], [38.0, -7.0, -66.0, -5.0, 6.0], [-30.0, -13.0, -28.0, -6.0, -3.0], [35.0, 2.0, 13.0, 0.0, -32.0]], [[30.0, 35.0, -14.0, 
+-68.0, 32.0], [-25.0, -5.0, 9.0, -28.0, -17.0], [19.0, -2.0, 43.0, 5.0, 31.0], [-28.0, -2.0, -16.0, 2.0, 
+9.0]]]])+(1.-msk_ref)*numpy.array([[[[11.0, -75.0, -65.0, -33.0, -33.0], [39.0, 113.0, 26.0, 14.0, 24.0], [-60.0, 64.0, 23.0, 
+42.0, -11.0], [-26.0, 56.0, -7.0, 67.0, -48.0]], [[-43.0, 40.0, 16.0, 9.0, -6.0], [-79.0, -80.0, -36.0, 17.0, -6.0], [55.0, 
+-55.0, -10.0, -23.0, -2.0], [14.0, -38.0, -35.0, -56.0, 39.0]], [[40.0, 36.0, 78.0, 35.0, 50.0], [28.0, -57.0, -38.0, -21.0, 
+-42.0], [55.0, -29.0, -19.0, -14.0, 34.0], [22.0, -24.0, 27.0, -34.0, 28.0]], [[-17.0, -43.0, -1.0, -12.0, -5.0], [-34.0, 16.0, 
+-91.0, 48.0, -27.0], [62.0, 0.0, 1.0, 31.0, 21.0], [12.0, 28.0, -39.0, -1.0, 11.0]], [[-22.0, -1.0, -34.0, 33.0, 21.0], [33.0, 
+21.0, 8.0, 47.0, 15.0], [-47.0, 77.0, -8.0, -11.0, -33.0], [28.0, 24.0, 5.0, 32.0, -37.0]]], [[[61.0, 16.0, 55.0, 78.0, 24.0], 
+[48.0, -42.0, -8.0, 7.0, -33.0], [23.0, 7.0, -13.0, 5.0, 36.0], [26.0, -36.0, -14.0, -35.0, 13.0]], [[-6.0, 14.0, -8.0, 47.0, 
+-30.0], [-31.0, -44.0, 20.0, 28.0, 6.0], [-3.0, -7.0, -1.0, 0.0, 1.0], [12.0, -44.0, -54.0, -39.0, 14.0]], [[29.0, 40.0, -19.0, 
+58.0, -22.0], [-9.0, -41.0, 34.0, 2.0, 45.0], [13.0, -15.0, 5.0, -33.0, -29.0], [-32.0, -44.0, -89.0, -66.0, -13.0]], [[-36.0, 
+-52.0, -47.0, -40.0, -12.0], [-11.0, 66.0, -33.0, 37.0, 6.0], [-12.0, 40.0, 9.0, 25.0, -13.0], [0.0, 54.0, -4.0, 48.0, -23.0]], 
+[[39.0, -14.0, 2.0, 53.0, -16.0], [33.0, 2.0, 28.0, 17.0, -6.0], [-23.0, 27.0, 2.0, 21.0, 18.0], [10.0, -22.0, -29.0, -8.0, 
+-5.0]]], [[[-13.0, 10.0, -39.0, 66.0, -48.0], [-11.0, -28.0, 85.0, 38.0, 24.0], [-76.0, 34.0, 2.0, 4.0, -14.0], [22.0, -52.0, 
+-45.0, -15.0, -4.0]], [[-48.0, 92.0, -6.0, 18.0, 18.0], [-29.0, -80.0, 65.0, -21.0, 39.0], [-37.0, -19.0, -15.0, -73.0, -54.0], 
+[8.0, -44.0, 25.0, -30.0, 3.0]], [[66.0, 2.0, 42.0, 91.0, 42.0], [77.0, -14.0, -30.0, 32.0, -30.0], [21.0, 49.0, -15.0, 6.0, 
+25.0], [32.0, -8.0, -20.0, -17.0, -12.0]], [[95.0, -91.0, 32.0, 22.0, 39.0], [119.0, 103.0, -79.0, 25.0, -54.0], [29.0, 77.0, 
+3.0, 67.0, 57.0], [10.0, 70.0, 9.0, 54.0, -33.0]], [[-19.0, -2.0, 26.0, 28.0, -2.0], [-17.0, -38.0, -9.0, 30.0, -39.0], [-5.0, 
+3.0, -12.0, 20.0, 31.0], [50.0, -26.0, 14.0, -3.0, 32.0]]], [[[-13.0, -46.0, -4.0, -35.0, 28.0], [29.0, 62.0, -52.0, 21.0, 
+-24.0], [-1.0, 45.0, -2.0, 25.0, 8.0], [18.0, 62.0, 45.0, 60.0, -17.0]], [[-3.0, 16.0, 11.0, 34.0, 54.0], [15.0, -14.0, -85.0, 
+44.0, -6.0], [60.0, 30.0, -16.0, -26.0, -18.0], [18.0, 28.0, -25.0, -15.0, -18.0]], [[-22.0, -46.0, -58.0, -38.0, -76.0], 
+[-35.0, 47.0, 66.0, -1.0, 24.0], [-64.0, 0.0, 24.0, 38.0, -1.0], [-22.0, -4.0, -19.0, 27.0, -2.0]], [[88.0, 19.0, 46.0, 37.0, 
+15.0], [46.0, -18.0, -4.0, -42.0, -3.0], [51.0, -33.0, 2.0, -9.0, 22.0], [-34.0, -24.0, -32.0, -49.0, 1.0]], [[8.0, -57.0, 
+-37.0, 38.0, 25.0], [75.0, 80.0, -30.0, 74.0, -6.0], [-41.0, 121.0, -3.0, 29.0, -10.0], [34.0, 62.0, -3.0, 64.0, -55.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_constData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([5.0, -6.0])+(1.-msk_arg0)*numpy.array([-7.0, 5.0])
-      arg1=Data(numpy.array([[[-1.0, 6.0], [-4.0, 7.0]], [[6.0, -6.0], [-6.0, 4.0]], [[5.0, 3.0], [3.0, 1.0]], [[-4.0, 4.0], 
-[-3.0, -1.0]], [[-2.0, 2.0], [2.0, 6.0]], [[7.0, -1.0], [-1.0, -3.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[4.0, -7.0], [0.0, -3.0]], [[-7.0, 1.0], [0.0, 0.0]], [[-3.0, 0.0], [-3.0, 0.0]], [[-7.0, -5.0], 
+[3.0, -4.0]], [[-2.0, 6.0], [2.0, -3.0]], [[0.0, 3.0], [-2.0, -5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, -6.0], [-1.0, 0.0]], [[-5.0, -1.0], [-6.0, 5.0]], [[-2.0, 5.0], [1.0, 2.0]], 
+[[4.0, 4.0], [7.0, 4.0]], [[-1.0, 4.0], [-6.0, -7.0]], [[1.0, 5.0], [-4.0, 6.0]]]))
+      arg0.expand()
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-5.0, 30.0], [-20.0, 35.0]], [[30.0, -30.0], [-30.0, 20.0]], [[25.0, 15.0], [15.0, 5.0]], 
-[[-20.0, 20.0], [-15.0, -5.0]], [[-10.0, 10.0], [10.0, 30.0]], [[35.0, -5.0], [-5.0, -15.0]]], [[[6.0, -36.0], [24.0, -42.0]], 
-[[-36.0, 36.0], [36.0, -24.0]], [[-30.0, -18.0], [-18.0, -6.0]], [[24.0, -24.0], [18.0, 6.0]], [[12.0, -12.0], [-12.0, -36.0]], 
-[[-42.0, 6.0], [6.0, 18.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -42.0], [28.0, -49.0]], [[-42.0, 42.0], [42.0, -28.0]], 
-[[-35.0, -21.0], [-21.0, -7.0]], [[28.0, -28.0], [21.0, 7.0]], [[14.0, -14.0], [-14.0, -42.0]], [[-49.0, 7.0], [7.0, 21.0]]], 
-[[[-5.0, 30.0], [-20.0, 35.0]], [[30.0, -30.0], [-30.0, 20.0]], [[25.0, 15.0], [15.0, 5.0]], [[-20.0, 20.0], [-15.0, -5.0]], 
-[[-10.0, 10.0], [10.0, 30.0]], [[35.0, -5.0], [-5.0, -15.0]]]])
+      ref=msk_ref*numpy.array([[[-8.0, 14.0], [-0.0, 6.0]], [[14.0, -2.0], [-0.0, -0.0]], [[6.0, -0.0], [6.0, -0.0]], [[14.0, 
+10.0], [-6.0, 8.0]], [[4.0, -12.0], [-4.0, 6.0]], [[-0.0, -6.0], [4.0, 10.0]]])+(1.-msk_ref)*numpy.array([[[24.0, 24.0], [4.0, 
+-0.0]], [[20.0, 4.0], [24.0, -20.0]], [[8.0, -20.0], [-4.0, -8.0]], [[-16.0, -16.0], [-28.0, -16.0]], [[4.0, -16.0], [24.0, 
+28.0]], [[-4.0, -20.0], [16.0, -24.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, -3.0], [2.0, 0.0], [-5.0, 2.0]])+(1.-msk_arg0)*numpy.array([[1.0, -2.0], [-4.0, 7.0], 
-[1.0, 0.0]])
-      arg1=Data(numpy.array([[[[1.0, 3.0], [-3.0, 0.0]], [[0.0, 6.0], [0.0, 0.0]], [[-2.0, -3.0], [-5.0, -3.0]], [[-1.0, 7.0], 
-[1.0, -5.0]], [[-6.0, -3.0], [-1.0, 0.0]], [[-2.0, 0.0], [-3.0, 6.0]]], [[[0.0, -6.0], [-7.0, 4.0]], [[2.0, 1.0], [-1.0, 
--7.0]], [[1.0, -2.0], [-5.0, 5.0]], [[2.0, 0.0], [-1.0, 1.0]], [[7.0, 3.0], [3.0, 4.0]], [[-4.0, -2.0], [-2.0, -7.0]]], [[[6.0, 
-1.0], [-7.0, -2.0]], [[6.0, 0.0], [-7.0, -7.0]], [[6.0, -3.0], [-6.0, -3.0]], [[-4.0, -2.0], [6.0, -2.0]], [[7.0, -4.0], [7.0, 
--7.0]], [[7.0, 0.0], [6.0, 3.0]]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[3.0, 5.0, 5.0], [5.0, -4.0, 0.0]], [[4.0, -4.0, 2.0], [-1.0, 2.0, -5.0]]], [[[0.0, 3.0, 7.0], 
+[3.0, 2.0, 4.0]], [[-6.0, -3.0, -2.0], [1.0, -7.0, -4.0]]], [[[6.0, 3.0, -6.0], [-3.0, 2.0, 2.0]], [[-4.0, 0.0, 4.0], [5.0, 
+-7.0, 6.0]]], [[[-2.0, -3.0, 4.0], [5.0, 0.0, -1.0]], [[-6.0, 5.0, 2.0], [7.0, 4.0, 4.0]]], [[[6.0, -3.0, -3.0], [-6.0, -2.0, 
+6.0]], [[0.0, 1.0, 1.0], [-5.0, -6.0, -2.0]]], [[[0.0, -5.0, -2.0], [0.0, 7.0, 5.0]], [[-4.0, -3.0, -2.0], [4.0, -4.0, 
+-5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, -6.0, 2.0], [3.0, 2.0, 1.0]], [[-6.0, 2.0, 5.0], [-5.0, -1.0, 0.0]]], [[[3.0, 
+5.0, -3.0], [2.0, -5.0, -5.0]], [[-3.0, -6.0, 6.0], [-1.0, 3.0, -1.0]]], [[[2.0, 0.0, -3.0], [-4.0, 0.0, 0.0]], [[-7.0, -5.0, 
+2.0], [-6.0, -6.0, -1.0]]], [[[-4.0, 0.0, -7.0], [-1.0, 2.0, 4.0]], [[6.0, 1.0, 5.0], [0.0, 7.0, 6.0]]], [[[-1.0, 0.0, -2.0], 
+[-7.0, -4.0, 3.0]], [[4.0, 4.0, -2.0], [-4.0, 0.0, -6.0]]], [[[-2.0, 0.0, 6.0], [6.0, -3.0, 3.0]], [[3.0, 0.0, -2.0], [-1.0, 
+0.0, -5.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-6.0, -5.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, -4.0, 7.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-36.0, -35.0], [39.0, 18.0]], [[-26.0, -34.0], [33.0, 21.0]], [[-16.0, 29.0], [50.0, 43.0]], 
-[[30.0, -32.0], [-38.0, 42.0]], [[15.0, 44.0], [-23.0, 43.0]], [[-31.0, -4.0], [-16.0, -65.0]]], [[[9.0, -7.0], [-5.0, -4.0]], 
-[[12.0, -18.0], [-14.0, -14.0]], [[18.0, 3.0], [3.0, 3.0]], [[-5.0, -25.0], [9.0, 11.0]], [[32.0, 1.0], [17.0, -14.0]], [[20.0, 
-0.0], [21.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, 28.0], [18.0, -18.0]], [[-2.0, 2.0], [-3.0, 21.0]], [[0.0, 2.0], 
-[9.0, -26.0]], [[-13.0, 5.0], [11.0, -11.0]], [[-27.0, -19.0], [-6.0, -23.0]], [[21.0, 8.0], [11.0, 37.0]]], [[[-2.0, -48.0], 
-[-43.0, 28.0]], [[14.0, -5.0], [-7.0, -49.0]], [[11.0, -8.0], [-25.0, 41.0]], [[16.0, -14.0], [-9.0, 17.0]], [[61.0, 27.0], 
-[23.0, 28.0]], [[-24.0, -14.0], [-8.0, -61.0]]]])
+      ref=msk_ref*numpy.array([[[-8.0, -10.0], [10.0, -39.0]], [[34.0, 0.0], [37.0, 1.0]], [[-93.0, 22.0], [52.0, 47.0]], 
+[[55.0, -37.0], [25.0, -34.0]], [[-42.0, 88.0], [2.0, 46.0]], [[11.0, 0.0], [25.0, -39.0]]])+(1.-msk_ref)*numpy.array([[[38.0, 
+-1.0], [27.0, 4.0]], [[-41.0, -15.0], [66.0, -19.0]], [[-21.0, 0.0], [34.0, 17.0]], [[-49.0, 20.0], [31.0, 14.0]], [[-14.0, 
+37.0], [-30.0, -42.0]], [[42.0, 33.0], [-14.0, -35.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([3.0, -5.0])+(1.-msk_arg0)*numpy.array([-2.0, -2.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(6.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorProduct_expandedData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, 3.0], [-2.0, -4.0]], [[2.0, -2.0], [-4.0, 7.0]], [[6.0, -7.0], [2.0, 2.0]], [[2.0, -1.0], 
+[5.0, -6.0]], [[-7.0, -7.0], [0.0, -3.0]], [[5.0, -3.0], [7.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-7.0, -5.0], [-1.0, 4.0]], [[-5.0, 4.0], [2.0, 4.0]], [[1.0, -1.0], [2.0, 2.0]], 
+[[6.0, -4.0], [7.0, 5.0]], [[3.0, 1.0], [0.0, 0.0]], [[4.0, -1.0], [-5.0, 2.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-7.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-4.0, 1.0]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([0.0, -0.0])+(1.-msk_ref)*numpy.array([-12.0, -12.0])
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [-21.0, 3.0]], [[14.0, -2.0], [28.0, -4.0]]], [[[-14.0, 2.0], [14.0, -2.0]], 
+[[28.0, -4.0], [-49.0, 7.0]]], [[[-42.0, 6.0], [49.0, -7.0]], [[-14.0, 2.0], [-14.0, 2.0]]], [[[-14.0, 2.0], [7.0, -1.0]], 
+[[-35.0, 5.0], [42.0, -6.0]]], [[[49.0, -7.0], [49.0, -7.0]], [[0.0, 0.0], [21.0, -3.0]]], [[[-35.0, 5.0], [21.0, -3.0]], 
+[[-49.0, 7.0], [49.0, -7.0]]]])+(1.-msk_ref)*numpy.array([[[[28.0, -7.0], [20.0, -5.0]], [[4.0, -1.0], [-16.0, 4.0]]], [[[20.0, 
+-5.0], [-16.0, 4.0]], [[-8.0, 2.0], [-16.0, 4.0]]], [[[-4.0, 1.0], [4.0, -1.0]], [[-8.0, 2.0], [-8.0, 2.0]]], [[[-24.0, 6.0], 
+[16.0, -4.0]], [[-28.0, 7.0], [-20.0, 5.0]]], [[[-12.0, 3.0], [-4.0, 1.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-16.0, 4.0], [4.0, 
+-1.0]], [[20.0, -5.0], [-8.0, 2.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, 4.0], [0.0, -5.0], [-7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-5.0, 6.0], [-4.0, 3.0], 
-[-6.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, 1.0, 3.0])+(1.-msk_arg1)*numpy.array([1.0, 1.0, 5.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[1.0, 7.0, 7.0], [5.0, 0.0, -3.0]], [[4.0, 1.0, -5.0], [-4.0, -3.0, 4.0]]], [[[2.0, 1.0, 7.0], 
+[2.0, -2.0, 4.0]], [[4.0, -4.0, -2.0], [-6.0, 0.0, 7.0]]], [[[1.0, -6.0, -5.0], [-4.0, -1.0, -1.0]], [[-3.0, 0.0, -7.0], [4.0, 
+-7.0, -2.0]]], [[[0.0, -5.0, 7.0], [5.0, -2.0, -2.0]], [[-7.0, 5.0, 2.0], [5.0, -2.0, 0.0]]], [[[-3.0, -6.0, 4.0], [3.0, -6.0, 
+-6.0]], [[1.0, 0.0, 0.0], [2.0, 2.0, 2.0]]], [[[0.0, 6.0, 4.0], [-1.0, -1.0, -7.0]], [[5.0, 2.0, -7.0], [-4.0, 2.0, 
+-6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, -1.0, 0.0], [5.0, 3.0, 7.0]], [[-4.0, -2.0, -7.0], [5.0, 1.0, -1.0]]], 
+[[[2.0, 1.0, 4.0], [-5.0, -5.0, 5.0]], [[-7.0, 7.0, -1.0], [0.0, 1.0, -4.0]]], [[[-1.0, -6.0, -5.0], [-4.0, 3.0, -6.0]], 
+[[-7.0, -3.0, -2.0], [7.0, -6.0, 0.0]]], [[[-7.0, 0.0, 2.0], [0.0, 4.0, 5.0]], [[-5.0, -6.0, 3.0], [-7.0, 2.0, -5.0]]], [[[6.0, 
+5.0, -4.0], [5.0, 0.0, -5.0]], [[-6.0, 0.0, -1.0], [1.0, 3.0, 6.0]]], [[[2.0, -3.0, -7.0], [2.0, 3.0, 7.0]], [[6.0, -4.0, 
+-7.0], [4.0, 0.0, 4.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-2.0, 7.0], [-1.0, -6.0], [7.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-7.0, 7.0], [-1.0, 3.0], [-3.0, 6.0]]))
+      res=generalTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([9.0, -29.0])+(1.-msk_ref)*numpy.array([-39.0, 19.0])
+      ref=msk_ref*numpy.array([[[[40.0, -7.0], [-31.0, 23.0]], [[-44.0, 2.0], [39.0, 6.0]]], [[[44.0, 36.0], [26.0, 42.0]], 
+[[-18.0, 44.0], [61.0, -14.0]]], [[[-31.0, 23.0], [2.0, -26.0]], [[-43.0, -49.0], [-15.0, 62.0]]], [[[54.0, 58.0], [-22.0, 
+39.0]], [[23.0, -71.0], [-8.0, 47.0]]], [[[40.0, 31.0], [-42.0, 33.0]], [[-2.0, 7.0], [8.0, 10.0]]], [[[22.0, -20.0], [-46.0, 
+-29.0]], [[-61.0, -5.0], [-36.0, -64.0]]]])+(1.-msk_ref)*numpy.array([[[[50.0, -52.0], [-59.0, 86.0]], [[51.0, -76.0], [-33.0, 
+32.0]]], [[[-27.0, 41.0], [25.0, -20.0]], [[45.0, -34.0], [11.0, -21.0]]], [[[28.0, -55.0], [43.0, -55.0]], [[58.0, -70.0], 
+[-43.0, 31.0]]], [[[43.0, -37.0], [-19.0, 42.0]], [[32.0, -35.0], [62.0, -73.0]]], [[[-35.0, 33.0], [-20.0, 5.0]], [[45.0, 
+-48.0], [-28.0, 52.0]]], [[[10.0, -37.0], [-38.0, 65.0]], [[-17.0, -12.0], [-40.0, 52.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, -2.0], [-6.0, 1.0], [-2.0, -5.0]], [[4.0, 4.0], [-4.0, 0.0], [2.0, 
-2.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 7.0], [2.0, 6.0], [3.0, -6.0]], [[2.0, 7.0], [-7.0, 0.0], [7.0, -1.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, -1.0, 3.0], [1.0, 6.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-4.0, -5.0, 0.0], [5.0, -2.0, 
-0.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorProduct_expandedData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[3.0, 0.0, -7.0, -4.0], [0.0, 7.0, 2.0, 2.0], [0.0, 1.0, -5.0, -4.0]], [[-6.0, -2.0, 5.0, -2.0], 
+[4.0, 0.0, -6.0, -4.0], [-2.0, 0.0, -1.0, 2.0]]], [[[-6.0, 0.0, 2.0, 7.0], [-4.0, 4.0, -1.0, 6.0], [-3.0, 1.0, 0.0, -3.0]], 
+[[7.0, -4.0, 4.0, 1.0], [0.0, -5.0, 3.0, 3.0], [-6.0, -2.0, 0.0, 5.0]]], [[[-1.0, -7.0, -3.0, 4.0], [-7.0, -7.0, -5.0, 4.0], 
+[6.0, 2.0, -1.0, -1.0]], [[1.0, 4.0, -4.0, -3.0], [-1.0, 7.0, 1.0, 3.0], [-1.0, -7.0, 0.0, 1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 3.0, -4.0, 4.0], [-2.0, -2.0, -6.0, 7.0], [-7.0, -5.0, 2.0, -6.0]], [[-6.0, 
+0.0, -2.0, -7.0], [1.0, -3.0, 4.0, -6.0], [0.0, -5.0, -1.0, 2.0]]], [[[-5.0, 6.0, -2.0, 0.0], [3.0, 4.0, -4.0, -1.0], [-3.0, 
+2.0, -3.0, 7.0]], [[6.0, 4.0, -2.0, 0.0], [0.0, 6.0, -2.0, 6.0], [7.0, 7.0, 3.0, 1.0]]], [[[1.0, -6.0, -7.0, 4.0], [0.0, 4.0, 
+3.0, -5.0], [1.0, 7.0, -6.0, -3.0]], [[-6.0, -2.0, 0.0, 2.0], [-5.0, -4.0, 2.0, 6.0], [6.0, 3.0, -6.0, 3.0]]]]))
+      arg0.expand()
+      arg1=Data(-7.0,self.functionspace)
+      arg1.setTaggedValue(1,-2.0)
+      res=generalTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-35.0, -12.0])+(1.-msk_ref)*numpy.array([42.0, -23.0])
+      ref=msk_ref*numpy.array([[[[-21.0, -0.0, 49.0, 28.0], [-0.0, -49.0, -14.0, -14.0], [-0.0, -7.0, 35.0, 28.0]], [[42.0, 
+14.0, -35.0, 14.0], [-28.0, -0.0, 42.0, 28.0], [14.0, -0.0, 7.0, -14.0]]], [[[42.0, -0.0, -14.0, -49.0], [28.0, -28.0, 7.0, 
+-42.0], [21.0, -7.0, -0.0, 21.0]], [[-49.0, 28.0, -28.0, -7.0], [-0.0, 35.0, -21.0, -21.0], [42.0, 14.0, -0.0, -35.0]]], 
+[[[7.0, 49.0, 21.0, -28.0], [49.0, 49.0, 35.0, -28.0], [-42.0, -14.0, 7.0, 7.0]], [[-7.0, -28.0, 28.0, 21.0], [7.0, -49.0, 
+-7.0, -21.0], [7.0, 49.0, -0.0, -7.0]]]])+(1.-msk_ref)*numpy.array([[[[14.0, -6.0, 8.0, -8.0], [4.0, 4.0, 12.0, -14.0], [14.0, 
+10.0, -4.0, 12.0]], [[12.0, -0.0, 4.0, 14.0], [-2.0, 6.0, -8.0, 12.0], [-0.0, 10.0, 2.0, -4.0]]], [[[10.0, -12.0, 4.0, -0.0], 
+[-6.0, -8.0, 8.0, 2.0], [6.0, -4.0, 6.0, -14.0]], [[-12.0, -8.0, 4.0, -0.0], [-0.0, -12.0, 4.0, -12.0], [-14.0, -14.0, -6.0, 
+-2.0]]], [[[-2.0, 12.0, 14.0, -8.0], [-0.0, -8.0, -6.0, 10.0], [-2.0, -14.0, 12.0, 6.0]], [[12.0, 4.0, -0.0, -4.0], [10.0, 8.0, 
+-4.0, -12.0], [-12.0, -6.0, 12.0, -6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, 3.0], [-7.0, 4.0], [-6.0, 6.0]], [[-7.0, -4.0], [5.0, -7.0], [-1.0, -5.0]], [[-5.0, 
-0.0], [-7.0, -4.0], [-5.0, 3.0]], [[-2.0, 5.0], [-1.0, 6.0], [0.0, 0.0]]], [[[6.0, -7.0], [-5.0, -4.0], [-6.0, -1.0]], [[1.0, 
-2.0], [-5.0, -6.0], [4.0, 4.0]], [[0.0, -2.0], [0.0, 2.0], [-2.0, -6.0]], [[-4.0, 2.0], [4.0, 0.0], [-4.0, 
-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-7.0, 5.0], [5.0, 7.0], [-6.0, -2.0]], [[1.0, 1.0], [0.0, 2.0], [2.0, 5.0]], [[1.0, 
-4.0], [-1.0, -2.0], [2.0, 2.0]], [[3.0, 4.0], [2.0, -5.0], [-6.0, 0.0]]], [[[5.0, 2.0], [-2.0, 0.0], [0.0, -6.0]], [[6.0, 
--2.0], [0.0, 6.0], [6.0, 5.0]], [[-2.0, -1.0], [-1.0, 6.0], [-6.0, 2.0]], [[2.0, -7.0], [-3.0, 4.0], [4.0, 6.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, -6.0, 0.0], [3.0, -3.0, 6.0], [3.0, 6.0, 0.0], [-5.0, -7.0, -1.0]], [[4.0, -1.0, 0.0], 
-[4.0, 6.0, -4.0], [-1.0, -1.0, 3.0], [2.0, -3.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 0.0, -5.0], [-7.0, 0.0, 0.0], [-1.0, 
--1.0, 6.0], [-2.0, -1.0, -3.0]], [[2.0, -6.0, 0.0], [7.0, 4.0, -5.0], [-4.0, 3.0, 1.0], [7.0, 6.0, 4.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-100.0, -209.0])+(1.-msk_ref)*numpy.array([83.0, 27.0])
+   def test_transposed_tensor_mult_array_rank2_taggedData_rank1(self):
+      arg0=numpy.array([[0.0, 0.0], [-5.0, 5.0], [0.0, -7.0]])
+      arg1=Data(numpy.array([-5.0, 3.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, -4.0, 1.0]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([-15.0, 29.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([20.0, -27.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-6.0, 3.0])+(1.-msk_arg0)*numpy.array([4.0, -6.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-7.0, -2.0])+(1.-msk_arg1)*numpy.array([-6.0, -1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[42.0, 12.0], [-21.0, -6.0]])+(1.-msk_ref)*numpy.array([[-24.0, -4.0], [36.0, 6.0]])
+   def test_transposed_tensor_mult_array_rank2_taggedData_rank2(self):
+      arg0=numpy.array([[-3.0, -5.0], [-3.0, 0.0], [-7.0, 1.0]])
+      arg1=Data(numpy.array([[2.0, -6.0], [1.0, 0.0], [-1.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, -3.0], [1.0, 2.0], [1.0, 5.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[-2.0, 25.0], [-11.0, 29.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-16.0, -32.0], [-9.0, 20.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-1.0, 2.0], [-5.0, -1.0], [-2.0, 6.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 4.0], [3.0, 5.0], 
-[-2.0, -5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[6.0, 0.0], [6.0, 6.0], [-2.0, 7.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 3.0], [0.0, -2.0], 
-[-2.0, -1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-32.0, -44.0], [-6.0, 36.0]])+(1.-msk_ref)*numpy.array([[8.0, -10.0], [2.0, 7.0]])
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=transposed_tensor_mult(arg0,arg1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -5.0], [-6.0, -7.0], [0.0, -4.0]], [[1.0, 2.0], [6.0, 6.0], [-4.0, 
--4.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 1.0], [-6.0, 4.0], [-3.0, 7.0]], [[-2.0, 6.0], [4.0, 7.0], [7.0, -4.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, -6.0], [-6.0, 5.0], [0.0, 4.0]], [[-4.0, -4.0], [-3.0, 7.0], [-4.0, 
--7.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -3.0], [-6.0, 6.0], [0.0, 0.0]], [[-5.0, 0.0], [0.0, 0.0], [0.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[30.0, 36.0], [27.0, 41.0]])+(1.-msk_ref)*numpy.array([[18.0, -48.0], [-61.0, 21.0]])
+   def test_transposed_tensor_mult_array_rank4_taggedData_rank2(self):
+      arg0=numpy.array([[[[-2.0, 4.0, 7.0, 7.0, 4.0], [4.0, 7.0, -7.0, 4.0, 4.0], [5.0, -3.0, 4.0, 3.0, 0.0], [-4.0, 3.0, 0.0, 
+4.0, 5.0]], [[6.0, 4.0, -2.0, 5.0, 3.0], [2.0, 0.0, 6.0, -4.0, -3.0], [-5.0, 7.0, 3.0, 0.0, 7.0], [4.0, 7.0, -5.0, -2.0, 
+-5.0]], [[7.0, 5.0, -5.0, 3.0, -7.0], [-1.0, 4.0, -1.0, -5.0, -3.0], [1.0, 0.0, 7.0, -2.0, -6.0], [2.0, 1.0, 0.0, 0.0, 5.0]]], 
+[[[-3.0, -1.0, 1.0, -3.0, 0.0], [6.0, -3.0, -5.0, -6.0, -4.0], [4.0, 0.0, -4.0, 2.0, -1.0], [-5.0, 2.0, -5.0, 4.0, -3.0]], 
+[[1.0, -2.0, 4.0, 3.0, 1.0], [7.0, 7.0, -2.0, 0.0, 6.0], [6.0, -7.0, 0.0, 5.0, 0.0], [-7.0, 4.0, 3.0, -1.0, 5.0]], [[-4.0, 
+-4.0, 1.0, 5.0, -6.0], [-4.0, -3.0, -2.0, 7.0, 0.0], [-6.0, 6.0, 6.0, -6.0, -4.0], [2.0, -1.0, -1.0, -7.0, 6.0]]]])
+      arg1=Data(numpy.array([[0.0, 1.0, 6.0], [4.0, -3.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 2.0, -7.0], [4.0, -4.0, 6.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[45.0, 48.0, -43.0, -13.0, -24.0], [11.0, 0.0, -8.0, -79.0, -55.0], [17.0, 10.0, 11.0, -1.0, 
+-21.0], [11.0, 12.0, -31.0, 38.0, -20.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-91.0, -19.0, 74.0, 44.0, 43.0], [11.0, -37.0, -54.0, 73.0, 3.0], [-26.0, 57.0, 5.0, 
+-13.0, 28.0], [-14.0, 14.0, -48.0, 2.0, -6.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, 5.0], [-3.0, -3.0], [-4.0, 5.0]], [[7.0, -4.0], [-1.0, 1.0], [-7.0, -6.0]], [[-6.0, 
--4.0], [-3.0, -7.0], [0.0, 5.0]], [[-1.0, -5.0], [-4.0, 5.0], [0.0, -3.0]]], [[[1.0, -2.0], [-4.0, -1.0], [-4.0, 0.0]], [[-1.0, 
-2.0], [-4.0, -6.0], [1.0, -1.0]], [[0.0, 2.0], [-7.0, -5.0], [1.0, -4.0]], [[7.0, 6.0], [1.0, 0.0], [-6.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -6.0], [-2.0, 0.0], [0.0, 4.0]], [[6.0, 2.0], [4.0, -6.0], [4.0, 1.0]], [[6.0, 
-5.0], [0.0, 6.0], [-6.0, 0.0]], [[-6.0, 0.0], [4.0, 1.0], [-4.0, 0.0]]], [[[4.0, -7.0], [-7.0, 0.0], [2.0, -4.0]], [[4.0, 6.0], 
-[1.0, 7.0], [3.0, 7.0]], [[-2.0, -6.0], [-2.0, -2.0], [-6.0, 7.0]], [[1.0, 7.0], [1.0, 7.0], [-7.0, 2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, 0.0], [6.0, 5.0], [-6.0, 7.0]], [[6.0, -1.0], [1.0, -6.0], [6.0, -3.0]], [[7.0, -3.0], 
-[-5.0, -1.0], [4.0, -5.0]], [[-5.0, -1.0], [0.0, 5.0], [1.0, 6.0]]], [[[4.0, 7.0], [-4.0, 2.0], [-1.0, -1.0]], [[0.0, -6.0], 
-[5.0, 6.0], [7.0, 0.0]], [[5.0, 5.0], [6.0, -6.0], [2.0, 0.0]], [[-7.0, 2.0], [-3.0, -1.0], [-2.0, 
-1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, 5.0], [-2.0, 3.0], [-7.0, 0.0]], [[-5.0, 5.0], [-3.0, 4.0], [-4.0, -3.0]], [[1.0, 
--4.0], [-6.0, 6.0], [6.0, 4.0]], [[3.0, 6.0], [0.0, -2.0], [4.0, 2.0]]], [[[-6.0, -4.0], [1.0, 0.0], [0.0, -7.0]], [[-6.0, 
--6.0], [-7.0, 4.0], [0.0, 0.0]], [[0.0, 1.0], [-5.0, -7.0], [-1.0, -2.0]], [[-6.0, 1.0], [0.0, 6.0], [0.0, 2.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-87.0, 13.0], [-164.0, 30.0]])+(1.-msk_ref)*numpy.array([[-172.0, -95.0], [-131.0, 62.0]])
+   def test_transposed_tensor_mult_array_rank4_taggedData_rank3(self):
+      arg0=numpy.array([[[[-4.0, 7.0, -5.0, -1.0, -2.0], [0.0, 0.0, 7.0, 7.0, -5.0], [-2.0, 2.0, 2.0, 7.0, 0.0], [3.0, 3.0, 
+-4.0, -3.0, 1.0]], [[-7.0, 0.0, -5.0, -4.0, -1.0], [-6.0, 3.0, -5.0, 0.0, 1.0], [0.0, -1.0, 4.0, -2.0, 5.0], [-1.0, 0.0, 2.0, 
+-7.0, -5.0]], [[2.0, 7.0, 6.0, 1.0, -7.0], [4.0, -5.0, -1.0, -2.0, -1.0], [4.0, 7.0, 1.0, -4.0, 4.0], [5.0, -6.0, -1.0, -3.0, 
+5.0]]], [[[-2.0, 6.0, -1.0, -1.0, 6.0], [-6.0, 6.0, -4.0, -5.0, -1.0], [1.0, 3.0, -6.0, -2.0, -6.0], [-1.0, 0.0, 6.0, -4.0, 
+2.0]], [[2.0, -6.0, -2.0, 0.0, 4.0], [6.0, -2.0, -6.0, 0.0, -4.0], [3.0, 5.0, 1.0, 6.0, 1.0], [-4.0, 2.0, 5.0, -4.0, -7.0]], 
+[[-5.0, -6.0, 2.0, 7.0, -7.0], [-7.0, -4.0, -7.0, 0.0, -5.0], [2.0, 3.0, -7.0, -2.0, 7.0], [7.0, 0.0, 1.0, -2.0, 2.0]]]])
+      arg1=Data(numpy.array([[[3.0, 2.0], [-3.0, -4.0], [0.0, 6.0]], [[-2.0, -2.0], [-3.0, -5.0], [-6.0, 
+-6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, -6.0], [-1.0, 0.0], [-6.0, 1.0]], [[-2.0, 5.0], [5.0, 0.0], [0.0, 4.0]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[37.0, 56.0], [63.0, 110.0], [-4.0, 46.0], [-31.0, -20.0], [15.0, -32.0]], [[54.0, 72.0], [9.0, 
+-20.0], [104.0, 108.0], [31.0, 12.0], [26.0, 32.0]], [[-29.0, -9.0], [-30.0, 1.0], [45.0, 43.0], [25.0, -16.0], [-48.0, 
+-31.0]], [[-16.0, 20.0], [3.0, -40.0], [-51.0, -65.0], [44.0, 44.0], [23.0, 71.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-19.0, -4.0], [-35.0, -29.0], [-74.0, 39.0], [-7.0, 30.0], [37.0, 7.0]], [[24.0, 
+-54.0], [5.0, 9.0], [38.0, -91.0], [71.0, -69.0], [-48.0, 4.0]], [[-25.0, 29.0], [-8.0, 22.0], [21.0, -69.0], [109.0, -64.0], 
+[-12.0, 2.0]], [[-26.0, 10.0], [67.0, -24.0], [-11.0, 57.0], [-8.0, -13.0], [-57.0, 17.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_array_rank4_taggedData_rank4(self):
+      arg0=numpy.array([[[[-2.0, 5.0, 5.0, -5.0, -6.0], [7.0, -1.0, -3.0, 7.0, -2.0], [-4.0, 5.0, -5.0, -5.0, 0.0], [0.0, 0.0, 
+-6.0, 6.0, -3.0]], [[-6.0, -5.0, 3.0, -1.0, -4.0], [3.0, -1.0, -5.0, 0.0, -6.0], [-6.0, -3.0, -4.0, 5.0, 3.0], [-2.0, 2.0, 1.0, 
+5.0, 2.0]], [[0.0, -1.0, 0.0, 7.0, 3.0], [-4.0, 2.0, -2.0, -2.0, -4.0], [0.0, 5.0, -7.0, 5.0, 1.0], [0.0, 4.0, 2.0, 4.0, 
+-7.0]]], [[[0.0, -3.0, 4.0, -3.0, -7.0], [6.0, -6.0, -4.0, -1.0, -4.0], [-7.0, -1.0, -7.0, -7.0, 6.0], [-1.0, 3.0, 6.0, 3.0, 
+1.0]], [[7.0, -6.0, 7.0, 1.0, 0.0], [-6.0, -3.0, -2.0, 6.0, -7.0], [0.0, 0.0, 0.0, -4.0, 7.0], [5.0, -6.0, -6.0, 2.0, -6.0]], 
+[[-2.0, 4.0, 3.0, 0.0, -6.0], [0.0, -3.0, 3.0, -3.0, -6.0], [-1.0, 0.0, 7.0, 7.0, -5.0], [-4.0, 7.0, -7.0, -5.0, 2.0]]]])
+      arg1=Data(numpy.array([[[[0.0, 0.0, 0.0, -4.0, 6.0], [-3.0, 7.0, -4.0, -7.0, -1.0], [1.0, 5.0, -5.0, 6.0, -2.0], [3.0, 
+-3.0, 4.0, 2.0, -2.0]], [[-3.0, -4.0, -3.0, 6.0, -6.0], [0.0, -2.0, -5.0, 7.0, 3.0], [-3.0, -1.0, -5.0, 5.0, -2.0], [-4.0, 
+-1.0, -3.0, 4.0, 1.0]], [[1.0, 6.0, -7.0, 5.0, -7.0], [2.0, -1.0, 0.0, 7.0, -2.0], [-4.0, 4.0, 2.0, -1.0, -7.0], [-1.0, 3.0, 
+2.0, 2.0, -3.0]]], [[[-5.0, 0.0, -2.0, 5.0, 6.0], [-2.0, -3.0, 7.0, 4.0, 5.0], [-4.0, -3.0, 4.0, -3.0, -4.0], [5.0, 0.0, -5.0, 
+0.0, -3.0]], [[0.0, -6.0, -5.0, 0.0, -1.0], [-1.0, 6.0, 5.0, 6.0, -7.0], [-2.0, 0.0, 6.0, 0.0, 3.0], [-6.0, 2.0, 0.0, -3.0, 
+-6.0]], [[0.0, 1.0, -4.0, -1.0, -7.0], [-6.0, 0.0, -1.0, 4.0, 7.0], [3.0, 0.0, 6.0, 6.0, -5.0], [7.0, -2.0, 7.0, -2.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -5.0, -2.0, -1.0, 1.0], [2.0, 5.0, 3.0, 2.0, 0.0], [3.0, -6.0, 0.0, 6.0, 2.0], 
+[6.0, 1.0, -6.0, 6.0, 4.0]], [[4.0, -7.0, -2.0, -3.0, -4.0], [0.0, -6.0, -2.0, 4.0, 1.0], [-2.0, -5.0, 3.0, 4.0, -5.0], [-6.0, 
+-7.0, -6.0, -4.0, 7.0]], [[-6.0, 3.0, 7.0, -5.0, -7.0], [7.0, -2.0, 4.0, 2.0, 3.0], [-6.0, 3.0, 1.0, 0.0, 7.0], [0.0, 5.0, 
+-3.0, 2.0, -6.0]]], [[[-1.0, 3.0, 0.0, -2.0, -7.0], [0.0, -5.0, 4.0, 7.0, 2.0], [5.0, -4.0, 6.0, -5.0, 0.0], [2.0, -5.0, 6.0, 
+3.0, 7.0]], [[6.0, -3.0, 0.0, 6.0, -6.0], [4.0, -1.0, 5.0, 7.0, -3.0], [-4.0, 2.0, -4.0, -7.0, 0.0], [-2.0, -3.0, 1.0, 0.0, 
+0.0]], [[0.0, 7.0, -6.0, 0.0, -7.0], [4.0, 0.0, -5.0, 5.0, 5.0], [2.0, 0.0, 0.0, -7.0, 5.0], [0.0, 0.0, 3.0, 5.0, 2.0]]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[18.0, -20.0, -9.0, -26.0, 31.0], [11.0, 40.0, 75.0, 6.0, -79.0], [-4.0, -4.0, 70.0, -54.0, 
+47.0], [-38.0, 30.0, -4.0, -45.0, -44.0]], [[29.0, 54.0, 42.0, -74.0, 27.0], [-29.0, 19.0, -50.0, -109.0, 37.0], [60.0, 35.0, 
+-26.0, 39.0, -19.0], [85.0, -33.0, 76.0, -2.0, 33.0]], [[-29.0, -51.0, -64.0, 15.0, 8.0], [-48.0, 59.0, 25.0, 56.0, -4.0], 
+[-25.0, 10.0, 36.0, 51.0, -26.0], [2.0, -10.0, 12.0, -5.0, -61.0]], [[25.0, 40.0, -45.0, 34.0, -92.0], [34.0, -25.0, 9.0, 71.0, 
+-34.0], [-20.0, 13.0, 38.0, -33.0, -22.0], [-39.0, 39.0, 12.0, -3.0, -9.0]], [[50.0, 28.0, 29.0, -14.0, -33.0], [74.0, -16.0, 
+1.0, -17.0, -89.0], [4.0, 7.0, -8.0, -74.0, 57.0], [-82.0, 43.0, -13.0, -10.0, 20.0]]], [[[-43.0, 0.0, 37.0, 0.0, 94.0], 
+[-35.0, -7.0, -31.0, -68.0, 82.0], [2.0, -2.0, -70.0, 43.0, -34.0], [79.0, -48.0, -19.0, 36.0, 19.0]], [[35.0, 31.0, 28.0, 
+-19.0, -26.0], [40.0, -7.0, -45.0, -40.0, -36.0], [15.0, 22.0, -46.0, -13.0, 20.0], [-34.0, 10.0, 12.0, 13.0, 31.0]], [[33.0, 
+23.0, 35.0, -51.0, -17.0], [-3.0, -9.0, -4.0, -44.0, 7.0], [49.0, -6.0, 26.0, -11.0, 25.0], [26.0, -2.0, 40.0, -30.0, 31.0]], 
+[[3.0, -51.0, -2.0, -40.0, 65.0], [-11.0, 90.0, -2.0, -43.0, -71.0], [-2.0, 30.0, -25.0, 29.0, 37.0], [-39.0, -9.0, 8.0, -2.0, 
+-41.0]], [[34.0, 36.0, 113.0, -62.0, 77.0], [49.0, -28.0, -19.0, -138.0, -21.0], [44.0, -8.0, -62.0, -62.0, 69.0], [2.0, -2.0, 
+-20.0, -3.0, 64.0]]], [[[53.0, 23.0, 36.0, -54.0, -23.0], [32.0, 5.0, -2.0, -46.0, -56.0], [39.0, 7.0, 16.0, -39.0, 53.0], 
+[-30.0, 20.0, 30.0, -30.0, 23.0]], [[19.0, 42.0, -24.0, -18.0, 7.0], [-3.0, 39.0, -12.0, -25.0, -29.0], [-2.0, 51.0, -4.0, 
+13.0, -35.0], [17.0, 3.0, 44.0, 8.0, -25.0]], [[40.0, -19.0, 47.0, -81.0, -48.0], [-27.0, 1.0, -16.0, -42.0, 21.0], [84.0, 
+-28.0, 45.0, 20.0, 60.0], [22.0, -16.0, 62.0, -54.0, 48.0]], [[25.0, 41.0, -44.0, 33.0, -182.0], [1.0, -53.0, -81.0, 81.0, 
+52.0], [17.0, 11.0, 0.0, 53.0, -54.0], [-2.0, 3.0, 59.0, 18.0, 45.0]], [[-38.0, -53.0, -43.0, 58.0, 39.0], [13.0, 17.0, 67.0, 
+74.0, -47.0], [-66.0, -17.0, 23.0, -34.0, 9.0], [-60.0, 24.0, -72.0, 3.0, -60.0]]], [[[11.0, -26.0, -1.0, -13.0, 29.0], [21.0, 
+37.0, 32.0, -4.0, -74.0], [-12.0, 5.0, 12.0, -31.0, 43.0], [-55.0, 20.0, -17.0, -15.0, -29.0]], [[-17.0, 59.0, -38.0, 40.0, 
+-65.0], [-34.0, -53.0, -26.0, 46.0, 104.0], [-1.0, 5.0, 16.0, 39.0, -97.0], [88.0, -16.0, 36.0, 20.0, 17.0]], [[-31.0, 37.0, 
+29.0, 77.0, 35.0], [58.0, -100.0, 38.0, 23.0, 28.0], [-50.0, -41.0, -25.0, -93.0, -11.0], [-7.0, 25.0, -102.0, 28.0, 25.0]], 
+[[-26.0, -13.0, -39.0, 46.0, 29.0], [12.0, 31.0, -13.0, 25.0, -33.0], [-56.0, 32.0, -53.0, 18.0, -31.0], [-38.0, 3.0, -33.0, 
+44.0, -40.0]], [[-18.0, -12.0, 63.0, -8.0, 17.0], [-13.0, -57.0, -23.0, -38.0, 84.0], [33.0, -48.0, -29.0, 8.0, 19.0], [45.0, 
+-30.0, -23.0, 2.0, 62.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[16.0, 17.0, 28.0, 62.0, -6.0], [16.0, 19.0, 51.0, 11.0, -37.0], [-26.0, 56.0, -46.0, 
+-71.0, 16.0], [10.0, 19.0, 49.0, 2.0, -54.0]], [[-42.0, 44.0, -31.0, -15.0, 61.0], [-5.0, 78.0, -41.0, -55.0, 24.0], [48.0, 
+-8.0, -10.0, 39.0, 48.0], [66.0, 68.0, -9.0, 59.0, -22.0]], [[55.0, -34.0, -34.0, 20.0, -98.0], [50.0, -20.0, 45.0, 114.0, 
+5.0], [7.0, -47.0, 5.0, -48.0, 10.0], [6.0, -57.0, -8.0, 45.0, 75.0]], [[-42.0, 41.0, 61.0, -15.0, -35.0], [43.0, -19.0, 8.0, 
+-14.0, 11.0], [-74.0, 70.0, -18.0, -26.0, 44.0], [-32.0, 49.0, -2.0, -21.0, -90.0]], [[-33.0, 4.0, 77.0, 17.0, 80.0], [-15.0, 
+23.0, 4.0, -101.0, -39.0], [-75.0, 93.0, -51.0, 25.0, -1.0], [-26.0, 72.0, -9.0, -65.0, -131.0]]], [[[1.0, -32.0, -48.0, -44.0, 
+17.0], [-38.0, 1.0, -7.0, 18.0, 21.0], [93.0, -105.0, 65.0, 66.0, -29.0], [48.0, -46.0, -18.0, 40.0, 115.0]], [[-29.0, -12.0, 
+36.0, -12.0, 70.0], [-12.0, 30.0, -17.0, -80.0, -13.0], [-37.0, 35.0, -25.0, 62.0, 2.0], [-6.0, 55.0, -42.0, -31.0, -71.0]], 
+[[-19.0, 59.0, -16.0, 24.0, 50.0], [-16.0, 41.0, -48.0, -57.0, 2.0], [7.0, 49.0, -33.0, -25.0, 20.0], [8.0, 48.0, 37.0, 1.0, 
+-57.0]], [[56.0, -83.0, -10.0, 41.0, 13.0], [12.0, 38.0, 54.0, 30.0, -41.0], [-2.0, -32.0, -32.0, 26.0, -15.0], [28.0, -16.0, 
+-45.0, 20.0, 27.0]], [[-40.0, 7.0, 24.0, 6.0, 162.0], [-84.0, 61.0, -31.0, -143.0, -35.0], [26.0, 32.0, -18.0, 75.0, -32.0], 
+[30.0, 61.0, 11.0, -38.0, -66.0]]], [[[-21.0, 34.0, 26.0, 36.0, 76.0], [-12.0, 51.0, -23.0, -86.0, -25.0], [-37.0, 82.0, -60.0, 
+-6.0, 17.0], [-2.0, 73.0, 15.0, -26.0, -109.0]], [[-36.0, 8.0, 31.0, -19.0, -11.0], [45.0, 38.0, 37.0, 1.0, 10.0], [-14.0, 4.0, 
+-10.0, 23.0, 60.0], [46.0, 56.0, -33.0, 49.0, -38.0]], [[28.0, 60.0, -73.0, 66.0, 60.0], [-31.0, 48.0, -98.0, -54.0, -4.0], 
+[14.0, 57.0, -61.0, -60.0, -4.0], [-20.0, 23.0, 54.0, -14.0, -41.0]], [[-32.0, 45.0, -7.0, -45.0, -36.0], [37.0, -26.0, -88.0, 
+-22.0, 53.0], [-60.0, 40.0, -6.0, 4.0, 35.0], [-66.0, 32.0, -40.0, -26.0, -50.0]], [[42.0, -56.0, 31.0, 16.0, -68.0], [15.0, 
+-57.0, 82.0, 80.0, -28.0], [-20.0, -22.0, 18.0, -32.0, -33.0], [-20.0, -67.0, 7.0, -17.0, 47.0]]], [[[23.0, -32.0, 28.0, 38.0, 
+13.0], [4.0, 12.0, 45.0, 0.0, -39.0], [-29.0, 24.0, -32.0, -10.0, -10.0], [0.0, 4.0, -1.0, -15.0, -29.0]], [[-55.0, 74.0, 
+-18.0, -68.0, -70.0], [32.0, -29.0, -41.0, 30.0, 73.0], [25.0, -22.0, 52.0, -14.0, 53.0], [6.0, 9.0, 9.0, 44.0, 25.0]], 
+[[-56.0, 16.0, 66.0, -55.0, 19.0], [-50.0, -64.0, 17.0, -39.0, 2.0], [8.0, 1.0, 65.0, 29.0, -38.0], [-18.0, -15.0, 33.0, -53.0, 
+-1.0]], [[11.0, -85.0, 36.0, -35.0, -40.0], [28.0, -25.0, 71.0, 50.0, -8.0], [-19.0, -57.0, 29.0, 62.0, -10.0], [8.0, -30.0, 
+-73.0, 8.0, 46.0]], [[10.0, 15.0, -59.0, -6.0, 53.0], [-71.0, -12.0, -77.0, -37.0, 11.0], [62.0, -29.0, 29.0, 13.0, -55.0], 
+[-16.0, -39.0, 33.0, -27.0, 55.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_constData_rank2_taggedData_rank1(self):
+      arg0=Data(numpy.array([[0.0, 6.0], [2.0, -5.0], [4.0, 7.0]]),self.functionspace)
+      arg1=Data(numpy.array([7.0, -3.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-4.0, 7.0, -4.0]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([22.0, 106.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-2.0, -87.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_constData_rank2_taggedData_rank2(self):
+      arg0=Data(numpy.array([[-5.0, -3.0], [-2.0, 6.0], [-3.0, -1.0]]),self.functionspace)
+      arg1=Data(numpy.array([[1.0, 7.0], [-6.0, 1.0], [-5.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, -2.0], [-5.0, -4.0], [4.0, 6.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[22.0, -37.0], [-34.0, -15.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-17.0, 0.0], [-43.0, -24.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([1.0, -2.0])+(1.-msk_arg0)*numpy.array([4.0, 5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, 0.0, 5.0, -7.0, 5.0], [1.0, 2.0, 3.0, 3.0, 7.0], [4.0, 1.0, 0.0, 7.0, -2.0], [-6.0, 
--1.0, -4.0, 4.0, 2.0]])+(1.-msk_arg1)*numpy.array([[5.0, 0.0, 0.0, -1.0, -6.0], [0.0, 0.0, -6.0, 1.0, 0.0], [1.0, -6.0, -4.0, 
-0.0, -3.0], [1.0, -7.0, 0.0, -2.0, -4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-3.0, 0.0, 5.0, -7.0, 5.0], [1.0, 2.0, 3.0, 3.0, 7.0], [4.0, 1.0, 0.0, 7.0, -2.0], [-6.0, 
--1.0, -4.0, 4.0, 2.0]], [[6.0, 0.0, -10.0, 14.0, -10.0], [-2.0, -4.0, -6.0, -6.0, -14.0], [-8.0, -2.0, 0.0, -14.0, 4.0], [12.0, 
-2.0, 8.0, -8.0, -4.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 0.0, 0.0, -4.0, -24.0], [0.0, 0.0, -24.0, 4.0, 0.0], [4.0, -24.0, 
--16.0, 0.0, -12.0], [4.0, -28.0, 0.0, -8.0, -16.0]], [[25.0, 0.0, 0.0, -5.0, -30.0], [0.0, 0.0, -30.0, 5.0, 0.0], [5.0, -30.0, 
--20.0, 0.0, -15.0], [5.0, -35.0, 0.0, -10.0, -20.0]]])
+   def test_transposed_tensor_mult_constData_rank4_taggedData_rank2(self):
+      arg0=Data(numpy.array([[[[0.0, 4.0, -4.0, 7.0, 0.0], [-6.0, 2.0, -6.0, 3.0, 2.0], [7.0, 3.0, 4.0, 0.0, 4.0], [1.0, -5.0, 
+-6.0, 2.0, -6.0]], [[4.0, -3.0, 6.0, 2.0, -4.0], [-5.0, -2.0, -6.0, 0.0, 1.0], [-6.0, 3.0, -4.0, -6.0, 2.0], [1.0, 4.0, 3.0, 
+2.0, 4.0]], [[2.0, -5.0, -7.0, -2.0, 4.0], [2.0, 3.0, 1.0, 1.0, 4.0], [4.0, 2.0, 0.0, 6.0, -7.0], [1.0, 3.0, -7.0, 0.0, 1.0]]], 
+[[[6.0, 2.0, -2.0, 0.0, -6.0], [1.0, 2.0, -1.0, 3.0, 5.0], [6.0, -4.0, 6.0, -2.0, -1.0], [-5.0, 1.0, -1.0, 1.0, 6.0]], [[-4.0, 
+1.0, -7.0, -3.0, 1.0], [4.0, 2.0, 3.0, 7.0, 4.0], [0.0, 2.0, -1.0, -2.0, -3.0], [-7.0, -2.0, -6.0, 0.0, -3.0]], [[4.0, -2.0, 
+3.0, -1.0, -3.0], [6.0, -2.0, -6.0, 0.0, -6.0], [0.0, 3.0, 7.0, 1.0, 0.0], [1.0, -4.0, 1.0, 0.0, 2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[1.0, -4.0, 1.0], [2.0, 7.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 5.0, 3.0], [-2.0, 3.0, -2.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[-34.0, 24.0, -91.0, -23.0, 18.0], [40.0, 33.0, 44.0, 59.0, 46.0], [47.0, -4.0, 18.0, 11.0, -34.0], 
+[-62.0, -26.0, -70.0, -4.0, -32.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-6.0, 1.0, -42.0, 46.0, 13.0], [-63.0, 19.0, -46.0, 39.0, 45.0], [19.0, 50.0, -21.0, 
+-16.0, 10.0], [2.0, -6.0, -66.0, 22.0, -44.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, -2.0], [1.0, -4.0], [1.0, -3.0]])+(1.-msk_arg0)*numpy.array([[4.0, -5.0], [0.0, 3.0], 
-[-5.0, -7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -5.0, 0.0, -1.0, 0.0], [-5.0, 0.0, 0.0, 5.0, -3.0], [-7.0, 2.0, 5.0, 6.0, -1.0], [-5.0, 
-7.0, -4.0, 5.0, 6.0]], [[-7.0, 1.0, -6.0, 6.0, 1.0], [-2.0, -4.0, -4.0, 2.0, -5.0], [-1.0, -4.0, -5.0, -4.0, 7.0], [-1.0, 0.0, 
--1.0, 6.0, -1.0]], [[-4.0, 6.0, 7.0, -2.0, 2.0], [1.0, 1.0, -4.0, 1.0, -2.0], [1.0, -4.0, -5.0, 3.0, 7.0], [-1.0, 2.0, -3.0, 
-7.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, 6.0, -4.0, -4.0, -1.0], [0.0, 6.0, -1.0, 0.0, -4.0], [7.0, 2.0, 3.0, 0.0, 3.0], 
-[3.0, -2.0, 0.0, 1.0, -6.0]], [[4.0, -1.0, -6.0, 0.0, 0.0], [5.0, -6.0, 4.0, -4.0, -2.0], [5.0, 1.0, -4.0, -2.0, 1.0], [4.0, 
--6.0, 3.0, 2.0, -3.0]], [[6.0, -1.0, 2.0, 7.0, -2.0], [-6.0, 0.0, 4.0, -5.0, -5.0], [6.0, 0.0, 5.0, 0.0, 0.0], [7.0, -5.0, 7.0, 
-0.0, 7.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-11.0, 7.0, 1.0, 4.0, 3.0], [-1.0, -3.0, -8.0, 3.0, -7.0], [0.0, -8.0, -10.0, -1.0, 14.0], 
-[-2.0, 2.0, -4.0, 13.0, 5.0]], [[40.0, -12.0, 3.0, -16.0, -10.0], [15.0, 13.0, 28.0, -21.0, 32.0], [15.0, 24.0, 25.0, -5.0, 
--47.0], [17.0, -20.0, 21.0, -55.0, -26.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 29.0, -26.0, -51.0, 6.0], [30.0, 24.0, -24.0, 
-25.0, 9.0], [-2.0, 8.0, -13.0, 0.0, 12.0], [-23.0, 17.0, -35.0, 4.0, -59.0]], [[-55.0, -26.0, -12.0, -29.0, 19.0], [57.0, 
--48.0, -11.0, 23.0, 49.0], [-62.0, -7.0, -62.0, -6.0, -12.0], [-52.0, 27.0, -40.0, 1.0, -28.0]]])
+   def test_transposed_tensor_mult_constData_rank4_taggedData_rank3(self):
+      arg0=Data(numpy.array([[[[0.0, -5.0, -1.0, 3.0, -5.0], [-5.0, -6.0, -1.0, -7.0, 0.0], [0.0, -5.0, -7.0, 1.0, -4.0], 
+[-2.0, 2.0, 5.0, -4.0, 4.0]], [[1.0, -2.0, 3.0, 0.0, 5.0], [-6.0, -3.0, 0.0, -6.0, 0.0], [7.0, 1.0, 0.0, 4.0, -3.0], [2.0, 
+-6.0, 1.0, 7.0, 7.0]], [[0.0, -1.0, 7.0, -5.0, -6.0], [5.0, -4.0, -5.0, 0.0, -6.0], [-6.0, 3.0, -7.0, -6.0, -4.0], [7.0, -7.0, 
+-1.0, -7.0, 2.0]]], [[[3.0, 6.0, -2.0, -3.0, 3.0], [5.0, -6.0, 7.0, -1.0, 5.0], [5.0, -3.0, 1.0, 0.0, 0.0], [6.0, 0.0, 7.0, 
+-4.0, -7.0]], [[0.0, -5.0, -4.0, -4.0, 3.0], [-7.0, 0.0, 0.0, -2.0, -6.0], [7.0, 2.0, 6.0, 2.0, -7.0], [-2.0, 7.0, -1.0, -2.0, 
+-6.0]], [[-7.0, 0.0, 5.0, 0.0, -7.0], [0.0, -7.0, 0.0, -4.0, 4.0], [-5.0, -3.0, -4.0, -6.0, -2.0], [-6.0, 5.0, -5.0, -7.0, 
+5.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-5.0, 2.0], [4.0, 1.0], [1.0, 4.0]], [[-5.0, -1.0], [-7.0, -7.0], [-6.0, 
+-6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -1.0], [0.0, -7.0], [5.0, -6.0]], [[-2.0, -6.0], [6.0, 3.0], [1.0, -6.0]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[31.0, 40.0], [21.0, 13.0], [32.0, 29.0], [23.0, 17.0], [45.0, -11.0]], [[30.0, 48.0], [86.0, 
+17.0], [-35.0, -29.0], [54.0, 19.0], [-13.0, -11.0]], [[-22.0, -41.0], [51.0, 10.0], [5.0, -61.0], [27.0, 4.0], [65.0, 34.0]], 
+[[45.0, 70.0], [-120.0, -109.0], [-20.0, 37.0], [117.0, 31.0], [57.0, 42.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-13.0, 17.0], [-47.0, -26.0], [20.0, -92.0], [-43.0, 33.0], [-25.0, 39.0]], [[-27.0, 
+-34.0], [-15.0, 129.0], [-39.0, -11.0], [-14.0, 73.0], [-72.0, -36.0]], [[-3.0, 8.0], [30.0, 22.0], [-5.0, 85.0], [-24.0, 
+49.0], [-64.0, 40.0]], [[5.0, -60.0], [12.0, 73.0], [-30.0, -21.0], [-46.0, 57.0], [-7.0, -71.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, -4.0], [6.0, 0.0], [0.0, -6.0]], [[4.0, 4.0], [3.0, 5.0], [-6.0, 
--4.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 7.0], [-3.0, 2.0], [-7.0, -4.0]], [[5.0, -5.0], [-5.0, -5.0], [-1.0, 4.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, -3.0, -1.0, -5.0, -6.0], [5.0, 1.0, -6.0, 0.0, 3.0], [-2.0, -6.0, -3.0, 3.0, 5.0], 
-[3.0, 4.0, 3.0, 0.0, 7.0]], [[-5.0, 3.0, 1.0, 1.0, -5.0], [4.0, 2.0, -7.0, 5.0, 5.0], [0.0, -6.0, -7.0, -5.0, 7.0], [-5.0, 
--6.0, 2.0, -7.0, 0.0]], [[-2.0, 3.0, -6.0, -4.0, -3.0], [2.0, -3.0, -7.0, -5.0, 2.0], [1.0, 3.0, 5.0, -6.0, 0.0], [4.0, 7.0, 
-5.0, -1.0, -3.0]]], [[[-7.0, 5.0, -5.0, -2.0, 4.0], [6.0, -5.0, 3.0, 5.0, 4.0], [2.0, -2.0, -6.0, -4.0, -4.0], [1.0, 0.0, -1.0, 
--3.0, 4.0]], [[-6.0, 6.0, -3.0, 0.0, -1.0], [0.0, 4.0, -1.0, -6.0, -3.0], [-7.0, -3.0, -4.0, -6.0, 0.0], [-4.0, 0.0, 0.0, -2.0, 
-0.0]], [[0.0, -7.0, -2.0, 5.0, -7.0], [0.0, 7.0, 2.0, 4.0, 0.0], [4.0, -7.0, 6.0, -6.0, -2.0], [5.0, 7.0, -3.0, 6.0, 
--7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 3.0, -4.0, -5.0, 0.0], [0.0, -5.0, 0.0, -6.0, 7.0], [3.0, -5.0, -6.0, -1.0, 0.0], 
-[-4.0, 2.0, -1.0, -1.0, 0.0]], [[-2.0, 1.0, -2.0, -7.0, -4.0], [1.0, -2.0, 0.0, 3.0, 1.0], [2.0, 6.0, 1.0, 7.0, 7.0], [0.0, 
-5.0, 0.0, -5.0, 0.0]], [[2.0, 6.0, 2.0, -4.0, 0.0], [2.0, -2.0, -2.0, -5.0, 2.0], [0.0, -3.0, -5.0, 1.0, 5.0], [-7.0, -5.0, 
--6.0, 1.0, -3.0]]], [[[4.0, 7.0, -5.0, 7.0, 0.0], [0.0, 2.0, 5.0, -2.0, 0.0], [1.0, 4.0, -6.0, -2.0, 0.0], [4.0, 0.0, 5.0, 5.0, 
-0.0]], [[2.0, 1.0, 1.0, 1.0, -6.0], [4.0, -6.0, -3.0, 1.0, 1.0], [-7.0, -4.0, 6.0, -4.0, 4.0], [-5.0, 6.0, 7.0, -3.0, 1.0]], 
-[[-5.0, 6.0, -7.0, 5.0, -3.0], [0.0, -2.0, -4.0, -7.0, 5.0], [-1.0, -5.0, -5.0, 0.0, -1.0], [0.0, 1.0, 7.0, -2.0, -7.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-86.0, 92.0, -13.0, -42.0, 13.0], [58.0, -36.0, -57.0, 8.0, 43.0], [-41.0, -23.0, -120.0, 
--22.0, 48.0], [-62.0, -70.0, 32.0, -96.0, 72.0]], [[-26.0, 72.0, 13.0, 16.0, 81.0], [-8.0, -14.0, 65.0, 4.0, -23.0], [-41.0, 
-11.0, -86.0, 2.0, -28.0], [-72.0, -86.0, -34.0, -40.0, 34.0]]])+(1.-msk_ref)*numpy.array([[[-7.0, -15.0, -39.0, 64.0, 45.0], 
-[-37.0, 52.0, 58.0, 6.0, -13.0], [41.0, 38.0, -35.0, -20.0, -75.0], [86.0, -7.0, 23.0, 48.0, 23.0]], [[-111.0, -17.0, -48.0, 
--53.0, 10.0], [-26.0, -19.0, -18.0, -39.0, 58.0], [51.0, -31.0, -40.0, 33.0, -30.0], [5.0, 18.0, -15.0, -39.0, -21.0]]])
+   def test_transposed_tensor_mult_constData_rank4_taggedData_rank4(self):
+      arg0=Data(numpy.array([[[[5.0, -5.0, 2.0, 7.0, -7.0], [7.0, -4.0, 0.0, 0.0, -4.0], [-7.0, 0.0, -4.0, -3.0, -2.0], [6.0, 
+-2.0, 3.0, 5.0, 4.0]], [[-7.0, -6.0, 0.0, -4.0, 3.0], [3.0, 7.0, 0.0, -5.0, 2.0], [-3.0, -5.0, -5.0, 6.0, 5.0], [1.0, -7.0, 
+-7.0, -7.0, -1.0]], [[5.0, -6.0, -1.0, -7.0, -1.0], [0.0, 3.0, -4.0, 2.0, -2.0], [0.0, -1.0, -7.0, -5.0, 7.0], [0.0, 0.0, -1.0, 
+2.0, -4.0]]], [[[3.0, 0.0, -5.0, -6.0, 5.0], [-4.0, -4.0, -3.0, -6.0, -5.0], [-7.0, 7.0, 0.0, 0.0, -5.0], [-5.0, -2.0, -4.0, 
+7.0, -3.0]], [[2.0, 2.0, 1.0, 4.0, 0.0], [-3.0, -2.0, 3.0, -1.0, -5.0], [4.0, 0.0, 5.0, 0.0, 0.0], [-5.0, -3.0, -1.0, 2.0, 
+2.0]], [[-7.0, 2.0, -5.0, -4.0, 3.0], [-1.0, 6.0, 4.0, -3.0, 6.0], [-7.0, 6.0, 3.0, 2.0, 0.0], [2.0, 2.0, 1.0, -7.0, 
+3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, 7.0, 3.0, -5.0, 1.0], [-2.0, 3.0, 1.0, 6.0, -2.0], [-5.0, -7.0, 1.0, -5.0, -2.0], [6.0, 
+1.0, 5.0, -3.0, 0.0]], [[-7.0, -2.0, 0.0, -5.0, 6.0], [2.0, 6.0, 6.0, 0.0, -4.0], [-3.0, 2.0, -5.0, -5.0, -7.0], [6.0, -2.0, 
+1.0, -1.0, 7.0]], [[-3.0, 5.0, 0.0, 2.0, 7.0], [-3.0, -4.0, 2.0, 2.0, 5.0], [1.0, 5.0, 5.0, -5.0, 3.0], [4.0, -3.0, 0.0, 1.0, 
+4.0]]], [[[0.0, 0.0, -1.0, -7.0, -4.0], [-1.0, 6.0, 2.0, -3.0, -2.0], [6.0, -5.0, 1.0, 0.0, 2.0], [5.0, -5.0, 7.0, 7.0, 0.0]], 
+[[1.0, 3.0, 5.0, 3.0, 5.0], [-2.0, -3.0, 5.0, -3.0, 0.0], [-4.0, -2.0, -3.0, -2.0, -3.0], [2.0, 6.0, 0.0, -7.0, 4.0]], [[-5.0, 
+4.0, 2.0, 6.0, -5.0], [0.0, 7.0, 5.0, 0.0, 3.0], [6.0, 7.0, -3.0, 2.0, -5.0], [0.0, 1.0, 0.0, 6.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 1.0, 0.0, 5.0, -5.0], [-3.0, -2.0, -5.0, -5.0, 3.0], [-6.0, 0.0, -1.0, 6.0, 
+2.0], [4.0, -6.0, 0.0, 5.0, 7.0]], [[1.0, 1.0, 4.0, -2.0, 2.0], [1.0, -5.0, 1.0, 7.0, -6.0], [-6.0, -3.0, -5.0, 0.0, -6.0], 
+[-4.0, 4.0, 0.0, 7.0, 5.0]], [[2.0, -4.0, 2.0, -5.0, -6.0], [-2.0, 7.0, -6.0, -6.0, 4.0], [-6.0, 7.0, -6.0, -6.0, 4.0], [-6.0, 
+7.0, 7.0, -6.0, -4.0]]], [[[3.0, 6.0, -7.0, 3.0, 7.0], [-3.0, -5.0, 0.0, 0.0, 4.0], [4.0, 4.0, -1.0, 7.0, 6.0], [-2.0, 7.0, 
+0.0, 1.0, 6.0]], [[-5.0, -5.0, -5.0, 1.0, -5.0], [-6.0, -6.0, 6.0, -7.0, 2.0], [0.0, -7.0, -5.0, 0.0, 3.0], [-5.0, -5.0, 1.0, 
+-1.0, 5.0]], [[4.0, 4.0, -3.0, -7.0, -4.0], [-7.0, -6.0, 1.0, -5.0, 0.0], [1.0, 7.0, 7.0, -2.0, 6.0], [6.0, -1.0, 0.0, 5.0, 
+5.0]]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[71.0, 52.0, 8.0, -37.0, 31.0], [-46.0, -84.0, -46.0, 25.0, 16.0], [-31.0, -92.0, 83.0, -33.0, 
+89.0], [27.0, -6.0, 39.0, -38.0, -35.0]], [[52.0, -39.0, -1.0, 61.0, -83.0], [12.0, -19.0, -33.0, -48.0, 10.0], [41.0, 3.0, 
+-17.0, 85.0, 18.0], [-86.0, 39.0, -31.0, 13.0, -54.0]], [[29.0, -8.0, 6.0, -4.0, 45.0], [2.0, -58.0, -30.0, 22.0, -14.0], 
+[-75.0, -31.0, 4.0, -17.0, 5.0], [-15.0, 31.0, -25.0, -79.0, -10.0]], [[73.0, 18.0, 39.0, 1.0, -2.0], [-3.0, -51.0, -43.0, 
+34.0, -33.0], [-106.0, -98.0, -14.0, 4.0, -11.0], [-32.0, 86.0, -11.0, -118.0, -48.0]], [[-33.0, -48.0, -20.0, 1.0, -31.0], 
+[18.0, 52.0, 34.0, -59.0, -4.0], [73.0, 46.0, -31.0, 31.0, -15.0], [-3.0, -32.0, 3.0, 70.0, 23.0]]], [[[-19.0, 30.0, 8.0, 
+-37.0, 31.0], [2.0, 17.0, -3.0, 63.0, -21.0], [-62.0, -24.0, 0.0, -46.0, -29.0], [34.0, 2.0, 10.0, -37.0, 7.0]], [[-90.0, -9.0, 
+-6.0, 49.0, 35.0], [21.0, 42.0, 56.0, 0.0, 21.0], [22.0, 123.0, -40.0, -14.0, -64.0], [6.0, -13.0, -41.0, 30.0, 65.0]], [[-5.0, 
+5.0, 26.0, 46.0, -21.0], [9.0, 17.0, 21.0, -8.0, -2.0], [-10.0, 17.0, -44.0, 22.0, -47.0], [-25.0, 49.0, -21.0, -22.0, 4.0]], 
+[[43.0, 5.0, -5.0, 50.0, 18.0], [-8.0, -92.0, -58.0, 25.0, 33.0], [-33.0, 11.0, 41.0, 11.0, 47.0], [-54.0, 25.0, -47.0, -46.0, 
+-37.0]], [[-43.0, -33.0, -20.0, 62.0, -41.0], [33.0, 35.0, -1.0, 2.0, 18.0], [38.0, 99.0, -32.0, 42.0, -37.0], [-55.0, -1.0, 
+-53.0, 44.0, -2.0]]], [[[60.0, -59.0, -8.0, 69.0, 58.0], [7.0, -142.0, -54.0, -33.0, 19.0], [-56.0, 21.0, 10.0, 28.0, 44.0], 
+[-87.0, 51.0, -87.0, -95.0, -19.0]], [[8.0, 29.0, 5.0, 10.0, -95.0], [-14.0, 58.0, 12.0, -23.0, 19.0], [92.0, -8.0, 9.0, 42.0, 
+16.0], [1.0, -16.0, 44.0, 89.0, -27.0]], [[46.0, -26.0, 19.0, 64.0, -73.0], [9.0, -8.0, -8.0, -53.0, 2.0], [26.0, -6.0, -38.0, 
+76.0, -8.0], [-72.0, 60.0, -25.0, -7.0, -37.0]], [[-37.0, -50.0, -5.0, -13.0, -12.0], [33.0, 61.0, 33.0, -28.0, -37.0], [4.0, 
+22.0, -64.0, 14.0, -61.0], [-2.0, 2.0, -9.0, 10.0, 26.0]], [[-56.0, 11.0, -1.0, 34.0, 97.0], [-2.0, -34.0, 32.0, 17.0, 29.0], 
+[-28.0, 84.0, 3.0, -50.0, -20.0], [21.0, -8.0, -40.0, -27.0, 63.0]]], [[[-22.0, 33.0, 2.0, -3.0, -3.0], [5.0, 23.0, -13.0, 
+66.0, 0.0], [-31.0, 9.0, 5.0, -21.0, -24.0], [7.0, 1.0, -4.0, -7.0, -9.0]], [[36.0, -1.0, -15.0, 62.0, -61.0], [-2.0, -37.0, 
+-53.0, 3.0, 42.0], [43.0, 30.0, 34.0, 55.0, 48.0], [-70.0, 6.0, -31.0, 32.0, -57.0]], [[46.0, 31.0, 10.0, 49.0, -40.0], [-11.0, 
+-43.0, -49.0, 31.0, 28.0], [-9.0, -11.0, 29.0, 29.0, 30.0], [-50.0, 35.0, -20.0, -18.0, -55.0]], [[80.0, 37.0, 4.0, -71.0, 
+-6.0], [-41.0, -48.0, -44.0, 7.0, -7.0], [-10.0, -127.0, 72.0, -18.0, 88.0], [35.0, -17.0, 67.0, -13.0, -47.0]], [[6.0, 28.0, 
+31.0, 22.0, -23.0], [1.0, 19.0, 9.0, 19.0, -9.0], [-29.0, -18.0, -29.0, 7.0, -40.0], [-9.0, 48.0, -2.0, -32.0, 
+-9.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-26.0, -42.0, -28.0, 74.0, -30.0], [-4.0, 75.0, -57.0, -83.0, 93.0], [-13.0, 5.0, 
+-62.0, 35.0, 54.0], [-40.0, -5.0, 37.0, -88.0, -27.0]], [[-20.0, 11.0, -52.0, 5.0, 31.0], [-5.0, -26.0, 69.0, -5.0, 1.0], 
+[104.0, -24.0, 75.0, 2.0, 20.0], [42.0, -48.0, -40.0, -23.0, -21.0]], [[-42.0, -49.0, 43.0, 36.0, -24.0], [40.0, 38.0, -3.0, 
+14.0, -16.0], [-31.0, -69.0, -31.0, -7.0, -57.0], [-11.0, -54.0, -6.0, -15.0, -32.0]], [[-72.0, -41.0, 4.0, 92.0, -47.0], 
+[11.0, -13.0, 23.0, -29.0, 1.0], [-4.0, -117.0, 13.0, 50.0, -38.0], [54.0, -165.0, -45.0, 19.0, 21.0]], [[28.0, 42.0, -34.0, 
+-42.0, 70.0], [-10.0, -51.0, 47.0, 47.0, -23.0], [53.0, 25.0, 14.0, -7.0, 12.0], [-26.0, 79.0, -7.0, 12.0, 15.0]]], [[[2.0, 
+-3.0, 58.0, 21.0, -38.0], [19.0, 15.0, -51.0, 12.0, -19.0], [-77.0, -11.0, -10.0, 16.0, -43.0], [33.0, -42.0, -3.0, 50.0, 
+20.0]], [[35.0, 1.0, 54.0, -105.0, -26.0], [-5.0, -10.0, 3.0, 35.0, -62.0], [-46.0, 40.0, 7.0, -82.0, -32.0], [-8.0, 49.0, 
+19.0, 39.0, -9.0]], [[-16.0, -1.0, -14.0, -14.0, -28.0], [-29.0, -55.0, 46.0, -17.0, -22.0], [16.0, -33.0, 40.0, -5.0, -1.0], 
+[39.0, -68.0, -25.0, 38.0, 33.0]], [[-26.0, -56.0, 40.0, 2.0, -47.0], [36.0, 93.0, -26.0, -25.0, 12.0], [-9.0, -9.0, 3.0, 
+-48.0, -19.0], [7.0, -40.0, 13.0, -67.0, -89.0]], [[32.0, 25.0, 46.0, -76.0, 2.0], [21.0, 3.0, 10.0, 51.0, -62.0], [10.0, 37.0, 
+78.0, -59.0, -37.0], [59.0, 2.0, -19.0, 36.0, -35.0]]], [[[-72.0, -100.0, 38.0, 3.0, -12.0], [64.0, 82.0, 49.0, 21.0, -23.0], 
+[25.0, -96.0, -40.0, -77.0, -68.0], [-64.0, -32.0, 4.0, -102.0, -121.0]], [[38.0, 65.0, -89.0, -6.0, 21.0], [-66.0, -53.0, 7.0, 
+-59.0, 54.0], [70.0, 78.0, 66.0, 43.0, 104.0], [48.0, 16.0, -7.0, 8.0, 51.0]], [[-32.0, 6.0, -68.0, 9.0, 15.0], [-30.0, -64.0, 
+90.0, -23.0, 0.0], [99.0, -48.0, 67.0, 12.0, 27.0], [39.0, -73.0, -44.0, -3.0, 15.0]], [[4.0, 31.0, 8.0, -16.0, 49.0], [11.0, 
+-71.0, 53.0, 77.0, -65.0], [14.0, -39.0, 17.0, 8.0, -50.0], [6.0, 5.0, -35.0, 67.0, 39.0]], [[4.0, -55.0, 69.0, -70.0, -57.0], 
+[12.0, 53.0, -27.0, 3.0, -28.0], [-80.0, 14.0, -60.0, -89.0, -36.0], [-60.0, 46.0, 49.0, -22.0, -47.0]]], [[[19.0, 10.0, 58.0, 
+-6.0, -46.0], [14.0, 26.0, -57.0, 2.0, -18.0], [-60.0, 26.0, 33.0, -3.0, -27.0], [67.0, -44.0, -5.0, 47.0, 2.0]], [[10.0, 2.0, 
+-5.0, -19.0, -11.0], [9.0, 55.0, -13.0, -28.0, 22.0], [48.0, 48.0, 68.0, -30.0, 29.0], [51.0, -17.0, -3.0, -48.0, -66.0]], 
+[[-12.0, -15.0, 0.0, 14.0, -50.0], [-3.0, 42.0, -21.0, -56.0, 29.0], [15.0, 12.0, 54.0, -6.0, 23.0], [65.0, -77.0, -8.0, -26.0, 
+-34.0]], [[-20.0, -6.0, -62.0, 101.0, 16.0], [-10.0, 34.0, -39.0, -65.0, 97.0], [21.0, 0.0, -48.0, 81.0, 66.0], [-30.0, 2.0, 
+16.0, -66.0, 9.0]], [[-16.0, 3.0, -10.0, 14.0, -41.0], [-29.0, -46.0, 18.0, -32.0, -6.0], [-3.0, -30.0, 39.0, 21.0, 4.0], 
+[58.0, -90.0, -26.0, 47.0, 46.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank2_array_rank1(self):
+      arg0=Data(numpy.array([[4.0, 7.0], [-1.0, 6.0], [4.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -3.0], [-3.0, 6.0], [4.0, -5.0]]))
+      arg1=numpy.array([2.0, -5.0, 1.0])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([17.0, -10.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([15.0, -41.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank2_array_rank2(self):
+      arg0=Data(numpy.array([[1.0, -5.0], [-3.0, -5.0], [6.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -3.0], [-5.0, -5.0], [5.0, 5.0]]))
+      arg1=numpy.array([[7.0, 4.0], [-6.0, 6.0], [-5.0, -7.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[-5.0, -56.0], [-30.0, -85.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[5.0, -65.0], [-16.0, -77.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank1_expandedData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([2.0, -7.0])+(1.-msk_arg0)*numpy.array([7.0, 6.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, 1.0], [-1.0, 2.0]], [[3.0, 6.0], [1.0, 3.0]], [[5.0, -3.0], [2.0, -7.0]], [[0.0, -4.0], 
-[-5.0, 1.0]], [[0.0, 7.0], [-5.0, -4.0]], [[-2.0, -6.0], [-3.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 3.0], [-1.0, 2.0]], 
-[[0.0, -2.0], [3.0, -7.0]], [[-7.0, -4.0], [4.0, -7.0]], [[1.0, -5.0], [0.0, -1.0]], [[6.0, 6.0], [-1.0, -4.0]], [[-7.0, 3.0], 
-[-1.0, -6.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 2.0], [-2.0, 4.0]], [[6.0, 12.0], [2.0, 6.0]], [[10.0, -6.0], [4.0, -14.0]], [[0.0, 
--8.0], [-10.0, 2.0]], [[0.0, 14.0], [-10.0, -8.0]], [[-4.0, -12.0], [-6.0, 14.0]]], [[[0.0, -7.0], [7.0, -14.0]], [[-21.0, 
--42.0], [-7.0, -21.0]], [[-35.0, 21.0], [-14.0, 49.0]], [[0.0, 28.0], [35.0, -7.0]], [[0.0, -49.0], [35.0, 28.0]], [[14.0, 
-42.0], [21.0, -49.0]]]])+(1.-msk_ref)*numpy.array([[[[-14.0, 21.0], [-7.0, 14.0]], [[0.0, -14.0], [21.0, -49.0]], [[-49.0, 
--28.0], [28.0, -49.0]], [[7.0, -35.0], [0.0, -7.0]], [[42.0, 42.0], [-7.0, -28.0]], [[-49.0, 21.0], [-7.0, -42.0]]], [[[-12.0, 
-18.0], [-6.0, 12.0]], [[0.0, -12.0], [18.0, -42.0]], [[-42.0, -24.0], [24.0, -42.0]], [[6.0, -30.0], [0.0, -6.0]], [[36.0, 
-36.0], [-6.0, -24.0]], [[-42.0, 18.0], [-6.0, -36.0]]]])
+   def test_transposed_tensor_mult_taggedData_rank2_constData_rank1(self):
+      arg0=Data(numpy.array([[-5.0, 6.0], [-2.0, 5.0], [-6.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, -5.0], [-7.0, 6.0], [-1.0, -1.0]]))
+      arg1=Data(numpy.array([-6.0, -2.0, 0.0]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([34.0, -46.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([32.0, 18.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, 5.0], [-7.0, 4.0], [0.0, -1.0]])+(1.-msk_arg0)*numpy.array([[0.0, -6.0], [7.0, -7.0], 
-[-2.0, 6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -7.0], [3.0, 2.0]], [[3.0, -6.0], [7.0, 6.0]], [[-3.0, 1.0], [-6.0, -5.0]], [[3.0, 
--2.0], [7.0, 3.0]], [[-3.0, -6.0], [4.0, -5.0]], [[4.0, 0.0], [3.0, 3.0]]], [[[3.0, 0.0], [7.0, 2.0]], [[-3.0, 2.0], [-4.0, 
-5.0]], [[1.0, 3.0], [-7.0, -3.0]], [[5.0, 2.0], [-2.0, -4.0]], [[3.0, 1.0], [0.0, 3.0]], [[-3.0, 3.0], [5.0, -6.0]]], [[[-1.0, 
-4.0], [4.0, 2.0]], [[3.0, -4.0], [3.0, -5.0]], [[-1.0, 5.0], [5.0, 0.0]], [[1.0, -6.0], [2.0, -3.0]], [[-7.0, -6.0], [5.0, 
--7.0]], [[-7.0, -3.0], [-6.0, 7.0]]]])+(1.-msk_arg1)*numpy.array([[[[5.0, -2.0], [-5.0, 4.0]], [[-5.0, 3.0], [0.0, 2.0]], 
-[[0.0, 0.0], [-4.0, 4.0]], [[4.0, 0.0], [-4.0, 3.0]], [[6.0, -3.0], [7.0, -7.0]], [[7.0, -1.0], [-7.0, 3.0]]], [[[5.0, 0.0], 
-[-2.0, -5.0]], [[-4.0, -5.0], [7.0, 6.0]], [[7.0, 0.0], [-5.0, 4.0]], [[0.0, -7.0], [6.0, 3.0]], [[-5.0, -5.0], [2.0, -6.0]], 
-[[1.0, -7.0], [0.0, 0.0]]], [[[-5.0, -4.0], [2.0, 5.0]], [[7.0, 3.0], [-2.0, -2.0]], [[1.0, 6.0], [0.0, -7.0]], [[7.0, 5.0], 
-[0.0, 2.0]], [[-7.0, 7.0], [7.0, -6.0]], [[5.0, -7.0], [-5.0, 3.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-11.0, 35.0], [-64.0, -24.0]], [[6.0, 16.0], [-7.0, -65.0]], [[8.0, -26.0], [79.0, 46.0]], 
-[[-50.0, -4.0], [-21.0, 13.0]], [[-6.0, 23.0], [-20.0, 4.0]], [[1.0, -21.0], [-50.0, 27.0]]], [[[3.0, -39.0], [39.0, 16.0]], 
-[[0.0, -18.0], [16.0, 55.0]], [[-10.0, 12.0], [-63.0, -37.0]], [[34.0, 4.0], [25.0, 2.0]], [[4.0, -20.0], [15.0, -6.0]], 
-[[15.0, 15.0], [41.0, -16.0]]]])+(1.-msk_ref)*numpy.array([[[[45.0, 8.0], [-18.0, -45.0]], [[-42.0, -41.0], [53.0, 46.0]], 
-[[47.0, -12.0], [-35.0, 42.0]], [[-14.0, -59.0], [42.0, 17.0]], [[-21.0, -49.0], [0.0, -30.0]], [[-3.0, -35.0], [10.0, -6.0]]], 
-[[[-95.0, -12.0], [56.0, 41.0]], [[100.0, 35.0], [-61.0, -66.0]], [[-43.0, 36.0], [59.0, -94.0]], [[18.0, 79.0], [-18.0, 
--27.0]], [[-43.0, 95.0], [-14.0, 48.0]], [[-19.0, 13.0], [12.0, 0.0]]]])
+   def test_transposed_tensor_mult_taggedData_rank2_constData_rank2(self):
+      arg0=Data(numpy.array([[-1.0, 7.0], [-2.0, 7.0], [-5.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, -2.0], [4.0, -6.0], [1.0, 1.0]]))
+      arg1=Data(numpy.array([[-5.0, -4.0], [2.0, 5.0], [-3.0, 0.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[16.0, -6.0], [-27.0, 7.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[30.0, 40.0], [-5.0, -22.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, -2.0, -1.0, -5.0, -2.0], [-5.0, 0.0, -5.0, -5.0, 7.0], [-6.0, -5.0, 7.0, -2.0, 4.0], 
-[-3.0, 7.0, -2.0, 0.0, -6.0]])+(1.-msk_arg0)*numpy.array([[0.0, 4.0, -1.0, 6.0, -4.0], [-5.0, -3.0, 4.0, -5.0, 2.0], [-1.0, 
--1.0, -5.0, -2.0, 6.0], [-5.0, -5.0, -4.0, 5.0, 4.0]])
-      arg1=6.0
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[30.0, -12.0, -6.0, -30.0, -12.0], [-30.0, 0.0, -30.0, -30.0, 42.0], [-36.0, -30.0, 42.0, -12.0, 
-24.0], [-18.0, 42.0, -12.0, 0.0, -36.0]])+(1.-msk_ref)*numpy.array([[0.0, 24.0, -6.0, 36.0, -24.0], [-30.0, -18.0, 24.0, -30.0, 
-12.0], [-6.0, -6.0, -30.0, -12.0, 36.0], [-30.0, -30.0, -24.0, 30.0, 24.0]])
+   def test_transposed_tensor_mult_taggedData_rank2_taggedData_rank1(self):
+      arg0=Data(numpy.array([[-6.0, -2.0], [-5.0, -4.0], [7.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -1.0], [2.0, -1.0], [1.0, 5.0]]))
+      arg1=Data(numpy.array([6.0, 6.0, 4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, -2.0, 0.0]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([-38.0, -52.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([2.0, 5.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[2.0, 4.0, -6.0, -2.0, -6.0], [1.0, 1.0, -4.0, 2.0, 1.0], [-4.0, -7.0, -5.0, -7.0, -6.0], 
-[6.0, -7.0, 6.0, 3.0, -2.0]])+(1.-msk_arg0)*numpy.array([[0.0, -3.0, 6.0, 6.0, 5.0], [0.0, -3.0, 5.0, 6.0, -4.0], [0.0, -4.0, 
-6.0, 6.0, 6.0], [4.0, -4.0, -3.0, 4.0, 6.0]])
-      arg1=numpy.array(2.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[4.0, 8.0, -12.0, -4.0, -12.0], [2.0, 2.0, -8.0, 4.0, 2.0], [-8.0, -14.0, -10.0, -14.0, -12.0], 
-[12.0, -14.0, 12.0, 6.0, -4.0]])+(1.-msk_ref)*numpy.array([[0.0, -6.0, 12.0, 12.0, 10.0], [0.0, -6.0, 10.0, 12.0, -8.0], [0.0, 
--8.0, 12.0, 12.0, 12.0], [8.0, -8.0, -6.0, 8.0, 12.0]])
+   def test_transposed_tensor_mult_taggedData_rank2_taggedData_rank2(self):
+      arg0=Data(numpy.array([[0.0, 0.0], [5.0, 2.0], [0.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, -1.0], [5.0, 5.0], [-4.0, -1.0]]))
+      arg1=Data(numpy.array([[-4.0, 7.0], [2.0, -2.0], [-7.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, 6.0], [0.0, 5.0], [6.0, -1.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[10.0, -10.0], [18.0, -12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-28.0, 23.0], [-10.0, 20.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[5.0, 2.0, 4.0, -5.0, 3.0], [-4.0, 4.0, 6.0, 5.0, 7.0], [5.0, -2.0, 4.0, 7.0, 4.0], [-7.0, 
-5.0, -2.0, -1.0, -7.0]], [[5.0, 3.0, 2.0, 0.0, 1.0], [1.0, -7.0, 4.0, -1.0, 1.0], [3.0, 1.0, -4.0, 1.0, 6.0], [0.0, 4.0, -2.0, 
-4.0, -3.0]], [[-1.0, -5.0, -5.0, -2.0, 0.0], [-3.0, -3.0, 1.0, -6.0, 7.0], [-3.0, -6.0, -6.0, -2.0, 0.0], [4.0, -5.0, 1.0, 1.0, 
-2.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, 3.0, 0.0, 2.0, 0.0], [3.0, -7.0, 6.0, 2.0, -1.0], [1.0, -2.0, -4.0, 2.0, 2.0], 
-[-1.0, 3.0, 0.0, -6.0, 0.0]], [[5.0, 3.0, -3.0, 7.0, 7.0], [5.0, -2.0, -7.0, 0.0, -2.0], [2.0, 1.0, 6.0, 4.0, 0.0], [-7.0, 1.0, 
--4.0, -3.0, 1.0]], [[-4.0, -2.0, 5.0, 6.0, -2.0], [-6.0, 0.0, -2.0, -2.0, 6.0], [0.0, 0.0, 0.0, 2.0, 4.0], [2.0, 5.0, -6.0, 
-3.0, 5.0]]])
-      arg1=numpy.array([4.0, -5.0, 3.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_transposed_tensor_mult_taggedData_rank2_expandedData_rank1(self):
+      arg0=Data(numpy.array([[1.0, 0.0], [-5.0, 7.0], [-3.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 6.0], [-6.0, -4.0], [2.0, 3.0]]))
+      arg1=Data(numpy.array([6.0, -2.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, 5.0, 0.0]))
+      arg1.expand()
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-8.0, -22.0, -9.0, -26.0, 7.0], [-30.0, 42.0, 7.0, 7.0, 44.0], [-4.0, -31.0, 18.0, 17.0, 
--14.0], [-16.0, -15.0, 5.0, -21.0, -7.0]])+(1.-msk_ref)*numpy.array([[-57.0, -9.0, 30.0, -9.0, -41.0], [-31.0, -18.0, 53.0, 
-2.0, 24.0], [-6.0, -13.0, -46.0, -6.0, 20.0], [37.0, 22.0, 2.0, 0.0, 10.0]])
+      ref=msk_ref*numpy.array([16.0, -14.0])+(1.-msk_ref)*numpy.array([-50.0, 4.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-4.0, -5.0, 5.0, -5.0, 5.0], [6.0, -3.0, 5.0, 0.0, -7.0], [0.0, -2.0, 3.0, 4.0, 6.0], [0.0, 
-1.0, -2.0, -6.0, -3.0]], [[3.0, 1.0, 1.0, 4.0, -3.0], [-7.0, -2.0, -7.0, -5.0, -2.0], [0.0, -4.0, 1.0, 5.0, 5.0], [-7.0, -6.0, 
--5.0, 2.0, 4.0]], [[0.0, -3.0, 7.0, 1.0, -5.0], [0.0, -6.0, -6.0, -6.0, 0.0], [7.0, -5.0, -1.0, 2.0, -1.0], [6.0, 0.0, 4.0, 
-1.0, -1.0]]], [[[4.0, 4.0, 4.0, -1.0, -7.0], [0.0, 0.0, -4.0, -4.0, 3.0], [7.0, -2.0, 6.0, 4.0, 0.0], [-6.0, -2.0, -1.0, -7.0, 
-7.0]], [[1.0, 5.0, -5.0, 3.0, 0.0], [0.0, -4.0, 1.0, 0.0, -4.0], [-2.0, 6.0, -6.0, 4.0, -3.0], [-1.0, -7.0, 7.0, 5.0, -3.0]], 
-[[-2.0, -1.0, -7.0, 4.0, -6.0], [-3.0, 2.0, 0.0, 0.0, 0.0], [6.0, 7.0, 5.0, 7.0, -3.0], [-6.0, -1.0, -3.0, -1.0, 
--2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -2.0, 5.0, -4.0, 3.0], [0.0, 2.0, 3.0, 4.0, 2.0], [-1.0, 3.0, 3.0, 6.0, 6.0], 
-[-1.0, -5.0, 5.0, 6.0, 0.0]], [[1.0, 7.0, 2.0, -3.0, 1.0], [0.0, -5.0, -6.0, 7.0, 0.0], [0.0, -2.0, -1.0, 7.0, 1.0], [-7.0, 
-0.0, -2.0, 2.0, 2.0]], [[-5.0, -1.0, -1.0, 6.0, 2.0], [1.0, 6.0, 0.0, -7.0, -4.0], [6.0, -5.0, -1.0, -1.0, 1.0], [-6.0, 2.0, 
--3.0, 0.0, -2.0]]], [[[1.0, 2.0, 7.0, 2.0, 0.0], [-5.0, 6.0, -1.0, 2.0, -5.0], [1.0, 0.0, -7.0, 2.0, -5.0], [2.0, -2.0, 5.0, 
-5.0, -3.0]], [[-5.0, -6.0, 1.0, 1.0, 7.0], [3.0, 0.0, -4.0, 6.0, 4.0], [7.0, -4.0, -2.0, 7.0, -1.0], [0.0, 5.0, 6.0, -4.0, 
-7.0]], [[0.0, 4.0, -4.0, 6.0, -4.0], [-6.0, 2.0, 5.0, 0.0, -7.0], [0.0, -2.0, 0.0, 5.0, 0.0], [-7.0, -3.0, -2.0, 2.0, 5.0]]]])
-      arg1=numpy.array([[7.0, 3.0, -3.0], [-7.0, -3.0, -5.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_transposed_tensor_mult_taggedData_rank2_expandedData_rank2(self):
+      arg0=Data(numpy.array([[3.0, 0.0], [5.0, -6.0], [0.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -2.0], [-2.0, 2.0], [6.0, 0.0]]))
+      arg1=Data(numpy.array([[3.0, -2.0], [7.0, 5.0], [0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 4.0], [3.0, -4.0], [5.0, 4.0]]))
+      arg1.expand()
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-40.0, -61.0, 39.0, -48.0, 120.0], [36.0, -7.0, 57.0, 31.0, -64.0], [-94.0, -50.0, -22.0, 
--38.0, 84.0], [36.0, 29.0, -40.0, 0.0, -36.0]])+(1.-msk_ref)*numpy.array([[26.0, -6.0, 12.0, -102.0, 17.0], [53.0, -71.0, -3.0, 
-38.0, 84.0], [-53.0, 52.0, 76.0, 6.0, 80.0], [11.0, -27.0, -5.0, 15.0, -13.0]])
+      ref=msk_ref*numpy.array([[44.0, 19.0], [-42.0, -30.0]])+(1.-msk_ref)*numpy.array([[24.0, 32.0], [2.0, -16.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank4_array_rank2(self):
+      arg0=Data(numpy.array([[[[3.0, 0.0, -6.0, -6.0, -3.0], [1.0, 7.0, 4.0, -5.0, 7.0], [-2.0, -5.0, 7.0, -3.0, 2.0], [-6.0, 
+-4.0, -1.0, -7.0, 7.0]], [[-5.0, 5.0, 1.0, -6.0, 0.0], [-6.0, 0.0, -4.0, 7.0, 4.0], [1.0, 4.0, 6.0, -6.0, 5.0], [-5.0, 0.0, 
+-1.0, -2.0, -6.0]], [[-5.0, -2.0, 4.0, 2.0, 3.0], [7.0, -4.0, -7.0, 4.0, -7.0], [1.0, 5.0, 2.0, 3.0, 2.0], [-2.0, 0.0, -1.0, 
+5.0, 0.0]]], [[[6.0, -4.0, -5.0, -6.0, 0.0], [5.0, 1.0, -4.0, -7.0, 1.0], [4.0, 2.0, 0.0, 2.0, -3.0], [-4.0, 0.0, -5.0, -7.0, 
+-3.0]], [[-4.0, -5.0, 1.0, -4.0, 5.0], [1.0, 2.0, -1.0, 3.0, -2.0], [-3.0, 3.0, -5.0, 2.0, -2.0], [-1.0, 7.0, -2.0, 4.0, 7.0]], 
+[[0.0, 0.0, -4.0, 0.0, 0.0], [2.0, 0.0, 5.0, 3.0, 4.0], [3.0, 7.0, 5.0, -2.0, -5.0], [-2.0, -5.0, 0.0, 6.0, 
+4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, -3.0, 2.0, 1.0, 2.0], [-2.0, 7.0, 0.0, -4.0, 0.0], [-7.0, -4.0, -7.0, 4.0, 
+5.0], [7.0, 6.0, -5.0, -4.0, -1.0]], [[3.0, 7.0, -5.0, -3.0, 7.0], [3.0, 0.0, 6.0, 7.0, 6.0], [-3.0, -2.0, -3.0, 0.0, -6.0], 
+[-7.0, 2.0, -1.0, 0.0, 6.0]], [[6.0, -6.0, 2.0, -5.0, 2.0], [-2.0, 6.0, -2.0, 1.0, -1.0], [7.0, 5.0, -4.0, 5.0, 2.0], [7.0, 
+-6.0, -2.0, 5.0, -2.0]]], [[[1.0, 7.0, -4.0, 6.0, 5.0], [0.0, -7.0, -1.0, -3.0, -6.0], [5.0, 4.0, 6.0, 3.0, -7.0], [-2.0, 0.0, 
+3.0, 3.0, 5.0]], [[-6.0, -4.0, 7.0, -2.0, -2.0], [7.0, 7.0, 3.0, 0.0, 3.0], [-5.0, 7.0, 2.0, -1.0, -2.0], [2.0, -7.0, -7.0, 
+3.0, -2.0]], [[-3.0, 0.0, 4.0, 2.0, -3.0], [-5.0, 4.0, -4.0, -3.0, 2.0], [-7.0, 0.0, 6.0, 2.0, -5.0], [6.0, 4.0, -3.0, 6.0, 
+-2.0]]]]))
+      arg1=numpy.array([[6.0, -7.0, -2.0], [7.0, 3.0, -3.0]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[93.0, -74.0, -71.0, -52.0, -9.0], [66.0, 63.0, 20.0, -136.0, 17.0], [-11.0, -66.0, -34.0, 44.0, 
+-39.0], [-22.0, 12.0, -38.0, -93.0, 72.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, -18.0, 24.0, 67.0, -3.0], [7.0, -10.0, -24.0, -87.0, -79.0], [6.0, 29.0, 17.0, 
+26.0, 28.0], [51.0, 1.0, -10.0, -22.0, -9.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, -6.0, -5.0, 3.0, -7.0], [3.0, -3.0, 1.0, 6.0, -1.0], [4.0, 0.0, -3.0, -5.0, -5.0], 
-[0.0, -4.0, -6.0, 7.0, 4.0]])+(1.-msk_arg0)*numpy.array([[-4.0, 5.0, 4.0, 0.0, -1.0], [2.0, 0.0, 0.0, 2.0, 3.0], [-3.0, 7.0, 
--2.0, -2.0, -4.0], [7.0, -7.0, 2.0, 5.0, 0.0]])
-      arg1=numpy.array([-1.0, -2.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[5.0, 10.0], [6.0, 12.0], [5.0, 10.0], [-3.0, -6.0], [7.0, 14.0]], [[-3.0, -6.0], [3.0, 6.0], 
-[-1.0, -2.0], [-6.0, -12.0], [1.0, 2.0]], [[-4.0, -8.0], [0.0, 0.0], [3.0, 6.0], [5.0, 10.0], [5.0, 10.0]], [[0.0, 0.0], [4.0, 
-8.0], [6.0, 12.0], [-7.0, -14.0], [-4.0, -8.0]]])+(1.-msk_ref)*numpy.array([[[4.0, 8.0], [-5.0, -10.0], [-4.0, -8.0], [0.0, 
-0.0], [1.0, 2.0]], [[-2.0, -4.0], [0.0, 0.0], [0.0, 0.0], [-2.0, -4.0], [-3.0, -6.0]], [[3.0, 6.0], [-7.0, -14.0], [2.0, 4.0], 
-[2.0, 4.0], [4.0, 8.0]], [[-7.0, -14.0], [7.0, 14.0], [-2.0, -4.0], [-5.0, -10.0], [0.0, 0.0]]])
+   def test_transposed_tensor_mult_taggedData_rank4_array_rank3(self):
+      arg0=Data(numpy.array([[[[4.0, -3.0, -3.0, 0.0, -7.0], [2.0, 2.0, -3.0, 0.0, 6.0], [6.0, 0.0, -4.0, 0.0, -6.0], [0.0, 
+-5.0, -5.0, -4.0, 6.0]], [[0.0, 3.0, -2.0, -6.0, -7.0], [-6.0, -1.0, -5.0, 3.0, 0.0], [-3.0, 4.0, -4.0, 0.0, 6.0], [6.0, -1.0, 
+1.0, 4.0, 1.0]], [[-2.0, 6.0, -1.0, 2.0, 1.0], [6.0, -3.0, -5.0, 6.0, 5.0], [1.0, 4.0, -5.0, -5.0, -7.0], [-3.0, 7.0, 6.0, 5.0, 
+4.0]]], [[[-5.0, 0.0, 7.0, 1.0, -3.0], [5.0, 6.0, 6.0, 3.0, 5.0], [6.0, -2.0, 2.0, -5.0, -4.0], [5.0, 3.0, -5.0, 4.0, -6.0]], 
+[[4.0, 3.0, -6.0, -4.0, -2.0], [7.0, 4.0, -1.0, 4.0, 6.0], [0.0, 3.0, 0.0, 3.0, -6.0], [1.0, -2.0, 0.0, -6.0, 2.0]], [[0.0, 
+-7.0, 5.0, -7.0, -5.0], [6.0, 5.0, 7.0, -1.0, 6.0], [-5.0, -5.0, 5.0, 1.0, -3.0], [7.0, 1.0, 3.0, 2.0, 
+6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, 6.0, -2.0, -5.0, -1.0], [-7.0, -3.0, -7.0, 7.0, 6.0], [-4.0, -7.0, 3.0, -1.0, 
+-4.0], [-7.0, 4.0, 5.0, -6.0, -1.0]], [[2.0, 1.0, 3.0, 0.0, 6.0], [-3.0, 3.0, 6.0, -2.0, -4.0], [0.0, 4.0, 4.0, -5.0, -2.0], 
+[1.0, 1.0, 3.0, 1.0, -6.0]], [[-5.0, -5.0, 7.0, 2.0, 2.0], [0.0, 3.0, -6.0, 2.0, 4.0], [-7.0, 5.0, 5.0, 0.0, -5.0], [7.0, 2.0, 
+0.0, -3.0, -2.0]]], [[[-6.0, 0.0, 3.0, 5.0, 1.0], [7.0, 3.0, 4.0, 1.0, -6.0], [1.0, 3.0, -7.0, 5.0, 1.0], [0.0, 0.0, -4.0, 
+-1.0, -7.0]], [[-6.0, -4.0, 1.0, 2.0, -1.0], [6.0, -4.0, -4.0, 4.0, -5.0], [6.0, -5.0, 2.0, 5.0, -5.0], [0.0, -2.0, 0.0, -5.0, 
+0.0]], [[7.0, 2.0, -5.0, 6.0, -4.0], [6.0, 6.0, -1.0, 4.0, 3.0], [1.0, -3.0, 7.0, 1.0, -7.0], [-1.0, 3.0, -3.0, -2.0, 0.0]]]]))
+      arg1=numpy.array([[[3.0, -2.0], [7.0, 7.0], [5.0, 3.0]], [[0.0, -2.0], [4.0, 7.0], [0.0, 0.0]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[18.0, 24.0], [54.0, 66.0], [-52.0, -67.0], [-48.0, -66.0], [-73.0, -40.0]], [[22.0, 11.0], [0.0, 
+-4.0], [-73.0, -63.0], [67.0, 61.0], [67.0, 35.0]], [[2.0, -42.0], [60.0, 65.0], [-65.0, -39.0], [-13.0, 16.0], [-35.0, -1.0]], 
+[[31.0, 30.0], [5.0, 4.0], [22.0, 45.0], [17.0, 1.0], [53.0, 33.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-41.0, -27.0], [-16.0, -48.0], [54.0, 47.0], [3.0, 20.0], [45.0, 41.0]], [[-18.0, 
+21.0], [11.0, 2.0], [-25.0, 2.0], [33.0, 4.0], [-10.0, -51.0]], [[-23.0, 27.0], [12.0, 16.0], [70.0, 65.0], [-18.0, -8.0], 
+[-71.0, -58.0]], [[21.0, 42.0], [21.0, -9.0], [36.0, 19.0], [-46.0, -23.0], [-55.0, -32.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, -3.0, 0.0, -7.0, -6.0], [-3.0, 6.0, -3.0, -1.0, 3.0], [-5.0, 6.0, -6.0, 6.0, 2.0], 
-[3.0, 2.0, -5.0, 4.0, 4.0]], [[-6.0, 7.0, 4.0, 0.0, -3.0], [6.0, -7.0, 3.0, -5.0, 6.0], [-1.0, 3.0, 6.0, 3.0, -6.0], [-2.0, 
-2.0, -7.0, 3.0, -4.0]], [[4.0, -6.0, 0.0, 6.0, 2.0], [-7.0, 7.0, -4.0, 0.0, 5.0], [-1.0, -6.0, 0.0, 4.0, 4.0], [6.0, -4.0, 0.0, 
--3.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 4.0, 0.0, 0.0, -5.0], [4.0, 2.0, 0.0, 2.0, -3.0], [5.0, -7.0, 0.0, -5.0, 2.0], 
-[0.0, 0.0, 3.0, 5.0, -2.0]], [[1.0, -5.0, 1.0, 0.0, 5.0], [-1.0, -1.0, -5.0, -5.0, 2.0], [2.0, -2.0, -3.0, 0.0, -2.0], [-7.0, 
-3.0, 7.0, 0.0, 0.0]], [[0.0, -2.0, 0.0, 6.0, -5.0], [2.0, 4.0, -1.0, 3.0, 4.0], [7.0, -1.0, -6.0, 4.0, 2.0], [3.0, 5.0, -2.0, 
-0.0, 6.0]]])
-      arg1=numpy.array([[7.0, 0.0], [1.0, -2.0], [7.0, 3.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[29.0, 24.0], [-56.0, -32.0], [4.0, -8.0], [-7.0, 18.0], [-31.0, 12.0]], [[-64.0, -33.0], 
-[84.0, 35.0], [-46.0, -18.0], [-12.0, 10.0], [62.0, 3.0]], [[-43.0, -1.0], [3.0, -24.0], [-36.0, -12.0], [73.0, 6.0], [36.0, 
-24.0]], [[61.0, 22.0], [-12.0, -16.0], [-42.0, 14.0], [10.0, -15.0], [17.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[22.0, -2.0], 
-[9.0, 4.0], [1.0, -2.0], [42.0, 18.0], [-65.0, -25.0]], [[41.0, 8.0], [41.0, 14.0], [-12.0, 7.0], [30.0, 19.0], [9.0, 8.0]], 
-[[86.0, 17.0], [-58.0, 1.0], [-45.0, -12.0], [-7.0, 12.0], [26.0, 10.0]], [[14.0, 23.0], [38.0, 9.0], [14.0, -20.0], [35.0, 
-0.0], [28.0, 18.0]]])
+   def test_transposed_tensor_mult_taggedData_rank4_array_rank4(self):
+      arg0=Data(numpy.array([[[[-1.0, -3.0, 5.0, 0.0, -3.0], [0.0, -4.0, 3.0, -2.0, -1.0], [6.0, 4.0, 2.0, -6.0, 0.0], [4.0, 
+-2.0, 6.0, 3.0, 0.0]], [[-5.0, -5.0, 6.0, -7.0, 3.0], [2.0, -1.0, 4.0, 5.0, 6.0], [-5.0, -2.0, -6.0, -3.0, -2.0], [4.0, 7.0, 
+-6.0, -3.0, 1.0]], [[0.0, -6.0, 2.0, 0.0, 0.0], [-6.0, 7.0, 0.0, -7.0, -7.0], [-5.0, 5.0, 6.0, -7.0, 0.0], [4.0, 3.0, -4.0, 
+-7.0, 1.0]]], [[[-3.0, 2.0, -2.0, 0.0, 3.0], [-3.0, -2.0, 7.0, -2.0, 6.0], [0.0, -7.0, 6.0, 1.0, 6.0], [-4.0, -5.0, 7.0, -7.0, 
+-1.0]], [[0.0, 7.0, 1.0, -7.0, -7.0], [2.0, -5.0, -1.0, -2.0, 3.0], [4.0, 3.0, 4.0, -5.0, 3.0], [-4.0, 3.0, 7.0, 0.0, 1.0]], 
+[[-6.0, 4.0, -7.0, -4.0, -5.0], [-1.0, 0.0, -1.0, -2.0, -1.0], [-3.0, 4.0, -2.0, -3.0, 6.0], [4.0, -6.0, 2.0, 2.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, -5.0, -1.0, 3.0, -1.0], [-5.0, 3.0, 3.0, -6.0, -3.0], [-3.0, 4.0, -6.0, -4.0, 
+5.0], [-6.0, 0.0, -3.0, -2.0, 1.0]], [[3.0, -4.0, 2.0, 6.0, -6.0], [-2.0, -5.0, 1.0, -5.0, -3.0], [0.0, 7.0, 0.0, -3.0, -4.0], 
+[0.0, 3.0, 7.0, 0.0, 0.0]], [[-2.0, 3.0, 3.0, 7.0, -3.0], [-6.0, 4.0, 6.0, -3.0, -6.0], [-6.0, 0.0, 0.0, 5.0, -5.0], [6.0, 
+-5.0, 2.0, -6.0, 3.0]]], [[[-2.0, -7.0, -3.0, 3.0, -4.0], [6.0, 1.0, 5.0, -6.0, -2.0], [5.0, -1.0, -5.0, 0.0, -6.0], [0.0, 3.0, 
+-2.0, 0.0, 3.0]], [[-1.0, 6.0, 4.0, -7.0, 0.0], [3.0, 4.0, -4.0, 0.0, -5.0], [-1.0, 0.0, 7.0, -1.0, 6.0], [-4.0, -5.0, -7.0, 
+-2.0, -4.0]], [[-3.0, 3.0, 7.0, 0.0, 7.0], [-3.0, 0.0, -1.0, 6.0, 0.0], [1.0, -5.0, 4.0, 5.0, -7.0], [0.0, 7.0, 0.0, -6.0, 
+2.0]]]]))
+      arg1=numpy.array([[[[0.0, 6.0, 6.0, -5.0, 2.0], [2.0, 4.0, 1.0, 3.0, -3.0], [5.0, -5.0, 2.0, -4.0, -7.0], [-3.0, -5.0, 
+2.0, 4.0, -7.0]], [[-6.0, 7.0, -3.0, -1.0, 0.0], [0.0, 0.0, -4.0, 4.0, 1.0], [-1.0, -4.0, 3.0, -1.0, -2.0], [-4.0, 2.0, 1.0, 
+0.0, -2.0]], [[-7.0, -3.0, -5.0, 4.0, 3.0], [-4.0, 0.0, -5.0, 0.0, 1.0], [7.0, 1.0, 7.0, 1.0, 2.0], [-4.0, 0.0, 0.0, -5.0, 
+1.0]]], [[[-7.0, 5.0, -6.0, -1.0, -5.0], [2.0, -7.0, -1.0, -1.0, -1.0], [-5.0, -7.0, 0.0, 2.0, -6.0], [-6.0, -7.0, 1.0, -7.0, 
+5.0]], [[4.0, 5.0, 0.0, -3.0, 4.0], [-2.0, 6.0, 3.0, -6.0, -3.0], [5.0, 4.0, 2.0, 6.0, -1.0], [-5.0, -2.0, -5.0, -6.0, 1.0]], 
+[[-5.0, 1.0, 0.0, -2.0, 7.0], [-2.0, 0.0, 7.0, 7.0, 5.0], [-1.0, 5.0, -1.0, 0.0, 3.0], [2.0, 6.0, -7.0, -2.0, -1.0]]]])
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[81.0, -62.0, 27.0, 25.0, -29.0], [4.0, 17.0, -20.0, -62.0, -29.0], [21.0, 16.0, -11.0, 3.0, 
+17.0], [29.0, -20.0, 32.0, 29.0, 8.0]], [[66.0, 14.0, 15.0, -35.0, 22.0], [0.0, 16.0, 94.0, -45.0, -5.0], [-31.0, 63.0, -53.0, 
+57.0, 12.0], [14.0, 1.0, -72.0, -46.0, 38.0]], [[3.0, 54.0, 14.0, -10.0, -19.0], [10.0, 40.0, -73.0, -14.0, -43.0], [55.0, 
+-64.0, 51.0, -22.0, -53.0], [-54.0, -43.0, 58.0, 32.0, -47.0]], [[34.0, -88.0, 21.0, 36.0, -56.0], [22.0, -42.0, -21.0, -14.0, 
+-6.0], [-24.0, -20.0, -31.0, -35.0, 9.0], [55.0, -24.0, 56.0, 50.0, 11.0]], [[-42.0, -22.0, -45.0, 40.0, -84.0], [24.0, -75.0, 
+-74.0, 7.0, 5.0], [-63.0, -71.0, -6.0, -27.0, -11.0], [4.0, -16.0, 70.0, 19.0, 28.0]]], [[[64.0, 26.0, 42.0, -27.0, -2.0], 
+[16.0, 33.0, 24.0, -8.0, -12.0], [-18.0, 10.0, -31.0, -2.0, -3.0], [22.0, 15.0, -4.0, 41.0, -22.0]], [[-49.0, -87.0, -44.0, 
+66.0, 3.0], [-30.0, -32.0, -48.0, 16.0, 35.0], [15.0, 25.0, 28.0, -10.0, 61.0], [25.0, 42.0, 14.0, -7.0, 22.0]], [[-72.0, 75.0, 
+-36.0, -21.0, -40.0], [24.0, -43.0, -30.0, 17.0, -14.0], [-28.0, -89.0, 17.0, -8.0, -73.0], [-64.0, -60.0, 29.0, -29.0, 6.0]], 
+[[35.0, 22.0, 20.0, -11.0, -37.0], [28.0, -6.0, -5.0, 14.0, 2.0], [-62.0, -21.0, -40.0, -20.0, -2.0], [32.0, 26.0, 23.0, 57.0, 
+-13.0]], [[-12.0, 101.0, -25.0, -42.0, -48.0], [34.0, -28.0, 6.0, -10.0, -18.0], [-74.0, -61.0, -26.0, 21.0, -61.0], [-46.0, 
+-37.0, 2.0, -27.0, 22.0]]], [[[96.0, 33.0, 76.0, -51.0, -8.0], [30.0, 48.0, 42.0, -47.0, -55.0], [23.0, -14.0, -27.0, 0.0, 
+-55.0], [-4.0, -66.0, 8.0, 31.0, -30.0]], [[18.0, -21.0, 47.0, -8.0, 98.0], [-40.0, 83.0, 31.0, 21.0, 9.0], [103.0, 74.0, 39.0, 
+-5.0, 37.0], [11.0, 43.0, -44.0, 14.0, -55.0]], [[-22.0, 0.0, -36.0, 6.0, -6.0], [-12.0, -10.0, -12.0, -62.0, -34.0], [50.0, 
+-16.0, 38.0, 40.0, -36.0], [-66.0, -84.0, -2.0, -84.0, 40.0]], [[55.0, -59.0, 2.0, 25.0, -79.0], [34.0, -61.0, 4.0, -22.0, 
+7.0], [-103.0, -7.0, -77.0, -8.0, 24.0], [71.0, 9.0, 32.0, 40.0, 44.0]], [[-48.0, 37.0, -30.0, -25.0, 24.0], [-6.0, -24.0, 
+53.0, 10.0, 13.0], [-19.0, 8.0, -6.0, 32.0, -17.0], [-31.0, -16.0, -53.0, -72.0, 31.0]]], [[[-60.0, 4.0, 16.0, 0.0, 52.0], 
+[-16.0, 20.0, -12.0, 84.0, 32.0], [40.0, 0.0, 36.0, -48.0, 12.0], [8.0, 48.0, 0.0, 40.0, -60.0]], [[14.0, 12.0, -18.0, 23.0, 
+0.0], [-20.0, 45.0, -73.0, -33.0, -18.0], [50.0, 2.0, 50.0, 12.0, 15.0], [-31.0, 17.0, 25.0, 6.0, -13.0]], [[33.0, 78.0, 32.0, 
+-72.0, 7.0], [24.0, 17.0, 78.0, -41.0, -46.0], [6.0, -21.0, -22.0, 34.0, -81.0], [-51.0, -93.0, -36.0, -51.0, 6.0]], [[106.0, 
+-15.0, 104.0, -37.0, 34.0], [16.0, 61.0, 71.0, 18.0, -2.0], [2.0, 49.0, -54.0, -30.0, 19.0], [77.0, 40.0, -18.0, 92.0, -59.0]], 
+[[3.0, 3.0, -2.0, 3.0, 5.0], [-6.0, 13.0, -12.0, -8.0, -5.0], [17.0, 3.0, 13.0, 4.0, 2.0], [-9.0, 1.0, 2.0, -2.0, 
+-4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[21.0, -15.0, -11.0, 20.0, -29.0], [4.0, -8.0, -28.0, -13.0, 3.0], [-29.0, 1.0, 
+-12.0, 1.0, 22.0], [19.0, 24.0, 19.0, 20.0, 12.0]], [[61.0, -69.0, 9.0, 24.0, 79.0], [-54.0, 65.0, 42.0, -39.0, 18.0], [62.0, 
+132.0, 8.0, 49.0, 94.0], [37.0, 72.0, -72.0, -28.0, 14.0]], [[-31.0, 11.0, -9.0, -8.0, 87.0], [-42.0, 41.0, 40.0, 33.0, 34.0], 
+[42.0, 72.0, 26.0, 23.0, 44.0], [-5.0, 64.0, -72.0, -36.0, -12.0]], [[-134.0, 19.0, -53.0, 25.0, -16.0], [-2.0, -51.0, -80.0, 
+72.0, 22.0], [8.0, -81.0, 59.0, -47.0, -30.0], [-44.0, -10.0, 50.0, -2.0, -18.0]], [[50.0, -52.0, 51.0, -11.0, 58.0], [-12.0, 
+24.0, 91.0, 26.0, 33.0], [-7.0, 89.0, -48.0, -1.0, 58.0], [77.0, 63.0, -61.0, 25.0, -11.0]]], [[[39.0, 16.0, -30.0, -6.0, 
+-67.0], [26.0, -44.0, 15.0, -68.0, -23.0], [-77.0, -18.0, -49.0, 46.0, -21.0], [-10.0, -45.0, 0.0, -44.0, 69.0]], [[11.0, -4.0, 
+7.0, -7.0, 29.0], [-16.0, 29.0, 14.0, -36.0, -23.0], [63.0, 18.0, 27.0, 23.0, -13.0], [-31.0, -40.0, -18.0, -39.0, 2.0]], 
+[[-94.0, 11.0, -45.0, 17.0, -24.0], [2.0, -47.0, -55.0, 25.0, 0.0], [12.0, -69.0, 44.0, -21.0, -40.0], [-49.0, -46.0, 39.0, 
+-27.0, 5.0]], [[63.0, -86.0, 30.0, 17.0, 51.0], [-24.0, 18.0, 77.0, 10.0, 46.0], [-22.0, 119.0, -54.0, 14.0, 100.0], [98.0, 
+98.0, -65.0, 21.0, 13.0]], [[54.0, -56.0, 33.0, 11.0, -34.0], [24.0, -28.0, 26.0, 11.0, 17.0], [-69.0, 15.0, -67.0, -25.0, 
+32.0], [82.0, 33.0, 14.0, 62.0, 6.0]]], [[[-2.0, 21.0, -18.0, -13.0, -46.0], [28.0, -53.0, 26.0, -1.0, 6.0], [-88.0, -25.0, 
+-51.0, 10.0, -17.0], [10.0, -12.0, -3.0, -13.0, 38.0]], [[-10.0, 63.0, 9.0, -16.0, -22.0], [16.0, 23.0, -58.0, 6.0, -29.0], 
+[23.0, -66.0, 34.0, -25.0, -51.0], [-44.0, -29.0, 49.0, 33.0, -42.0]], [[43.0, -22.0, -6.0, 6.0, 69.0], [-44.0, 53.0, 48.0, 
+-27.0, 22.0], [26.0, 113.0, -2.0, 56.0, 77.0], [21.0, 75.0, -80.0, -39.0, 20.0]], [[-46.0, -60.0, -40.0, 36.0, 38.0], [-36.0, 
+-22.0, 15.0, 17.0, 42.0], [8.0, 58.0, 11.0, 18.0, 60.0], [19.0, 46.0, -41.0, -45.0, 33.0]], [[160.0, 10.0, 103.0, -39.0, 0.0], 
+[20.0, 98.0, 21.0, -80.0, -71.0], [61.0, 17.0, -18.0, 3.0, -28.0], [13.0, -45.0, 19.0, 65.0, -49.0]]], [[[-58.0, -74.0, -66.0, 
+66.0, -10.0], [-28.0, -48.0, -48.0, 6.0, 36.0], [-8.0, 20.0, 22.0, 6.0, 58.0], [14.0, 38.0, 8.0, -30.0, 44.0]], [[-59.0, 33.0, 
+-2.0, -25.0, -1.0], [22.0, -51.0, 44.0, 88.0, 45.0], [-85.0, -23.0, -43.0, -32.0, -8.0], [29.0, 37.0, -18.0, 20.0, -8.0]], 
+[[-70.0, -20.0, -37.0, 39.0, -18.0], [-4.0, -40.0, -60.0, 63.0, 41.0], [-33.0, -25.0, 15.0, -39.0, 30.0], [20.0, 57.0, 34.0, 
+34.0, -8.0]], [[64.0, -10.0, 18.0, 4.0, -72.0], [36.0, -20.0, -20.0, -36.0, -24.0], [-56.0, -34.0, -44.0, -10.0, -14.0], [28.0, 
+-22.0, 48.0, 46.0, 12.0]], [[-68.0, -6.0, -27.0, 12.0, -6.0], [0.0, -41.0, -15.0, 38.0, 19.0], [-11.0, -29.0, 13.0, -19.0, 
+-9.0], [-9.0, -6.0, 11.0, -12.0, 5.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 7.0, -4.0, -1.0, -4.0], [-1.0, -2.0, 7.0, 0.0, -5.0], [-5.0, -7.0, 0.0, 4.0, -6.0], 
-[0.0, 3.0, -5.0, 7.0, -7.0]], [[-5.0, 6.0, 5.0, -5.0, 4.0], [-2.0, -5.0, 6.0, -4.0, -2.0], [-1.0, 5.0, -1.0, -7.0, -4.0], 
-[-5.0, 7.0, -5.0, 7.0, -5.0]], [[-1.0, -2.0, 6.0, -2.0, 1.0], [-1.0, -1.0, 7.0, -6.0, 0.0], [-3.0, -5.0, -4.0, 0.0, -3.0], 
-[-7.0, -4.0, 0.0, 7.0, 4.0]]], [[[-5.0, -6.0, 3.0, 7.0, -2.0], [6.0, 0.0, -3.0, -2.0, -1.0], [0.0, 6.0, -3.0, 0.0, 1.0], [-7.0, 
-2.0, 6.0, -6.0, -5.0]], [[3.0, 6.0, 4.0, 2.0, 0.0], [4.0, 6.0, -6.0, 7.0, 2.0], [-1.0, 2.0, -2.0, -4.0, 7.0], [-2.0, -1.0, 
--5.0, -5.0, -5.0]], [[-3.0, 1.0, 7.0, -7.0, 0.0], [0.0, 0.0, -1.0, 6.0, 6.0], [6.0, 7.0, 2.0, 4.0, -3.0], [7.0, 1.0, -1.0, 
--7.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 6.0, 7.0, -1.0, 1.0], [3.0, -6.0, -3.0, 1.0, 2.0], [-3.0, -3.0, -6.0, -2.0, 
-5.0], [1.0, 0.0, 2.0, -6.0, 0.0]], [[-1.0, -7.0, 5.0, 1.0, -7.0], [7.0, 3.0, 0.0, 6.0, 0.0], [-6.0, 5.0, -6.0, 2.0, 1.0], 
-[-4.0, 0.0, -6.0, 1.0, 1.0]], [[-3.0, 5.0, 0.0, 1.0, -3.0], [-7.0, 2.0, -2.0, -6.0, 2.0], [-3.0, -3.0, -3.0, -6.0, -6.0], 
-[-4.0, 4.0, 6.0, -4.0, -1.0]]], [[[-2.0, -2.0, -4.0, 1.0, 0.0], [0.0, -7.0, -7.0, 2.0, 2.0], [6.0, -4.0, -7.0, -7.0, 2.0], 
-[3.0, -4.0, -1.0, -3.0, 2.0]], [[7.0, 2.0, 1.0, 2.0, -3.0], [-6.0, -7.0, -2.0, 3.0, 1.0], [-6.0, -5.0, -4.0, 3.0, 0.0], [-6.0, 
--4.0, 4.0, 0.0, -7.0]], [[-2.0, 0.0, 5.0, 3.0, 5.0], [0.0, -6.0, -7.0, 6.0, 7.0], [3.0, -3.0, 3.0, 7.0, 2.0], [-4.0, -3.0, 4.0, 
--2.0, 0.0]]]])
-      arg1=numpy.array([[[3.0, 1.0], [7.0, -1.0], [-1.0, -2.0]], [[3.0, 6.0], [-3.0, 0.0], [-4.0, -5.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-31.0, -3.0], [25.0, -36.0], [-14.0, -38.0], [7.0, 85.0], [9.0, -22.0]], [[-10.0, 39.0], 
-[-58.0, 5.0], [69.0, -26.0], [-73.0, -26.0], [-62.0, -39.0]], [[-40.0, -28.0], [3.0, -1.0], [-14.0, -19.0], [-41.0, -9.0], 
-[-49.0, 25.0]], [[-71.0, -58.0], [67.0, 11.0], [-13.0, 41.0], [88.0, -15.0], [-60.0, 
--40.0]]])+(1.-msk_ref)*numpy.array([[[-26.0, 4.0], [-48.0, -9.0], [21.0, -47.0], [-12.0, -13.0], [-54.0, -11.0]], [[83.0, 
-10.0], [25.0, -25.0], [6.0, -6.0], [24.0, -11.0], [-21.0, -25.0]], [[-24.0, 30.0], [44.0, -11.0], [-78.0, -51.0], [-44.0, 
--69.0], [26.0, 18.0]], [[22.0, 51.0], [8.0, -17.0], [-73.0, -30.0], [-8.0, -7.0], [35.0, 13.0]]])
+   def test_transposed_tensor_mult_taggedData_rank4_constData_rank2(self):
+      arg0=Data(numpy.array([[[[-1.0, -5.0, 0.0, 3.0, -1.0], [0.0, 3.0, -6.0, 0.0, 1.0], [1.0, 2.0, -3.0, -3.0, 2.0], [5.0, 
+-5.0, -6.0, 5.0, 5.0]], [[7.0, 3.0, 3.0, -1.0, -3.0], [-1.0, 6.0, 6.0, 0.0, -2.0], [0.0, 7.0, 7.0, -6.0, 4.0], [5.0, -5.0, 0.0, 
+-1.0, -5.0]], [[4.0, 6.0, 7.0, -4.0, 2.0], [-3.0, -3.0, -5.0, 6.0, -2.0], [-1.0, -7.0, 6.0, -3.0, -3.0], [-6.0, 7.0, 5.0, 3.0, 
+-5.0]]], [[[-1.0, -3.0, 3.0, 5.0, 1.0], [-4.0, -6.0, 6.0, 3.0, 7.0], [3.0, 3.0, 0.0, 1.0, 4.0], [5.0, 6.0, 0.0, -2.0, 7.0]], 
+[[6.0, -1.0, 2.0, -4.0, -4.0], [0.0, -4.0, -5.0, 3.0, 7.0], [0.0, 6.0, -6.0, 7.0, 0.0], [-2.0, -6.0, 7.0, 5.0, 7.0]], [[-3.0, 
+7.0, 3.0, -4.0, -4.0], [3.0, 2.0, 6.0, -1.0, 6.0], [-4.0, 3.0, 5.0, -4.0, -5.0], [-2.0, -2.0, 2.0, 7.0, 
+3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 0.0, -6.0, 6.0, 0.0], [5.0, 5.0, -3.0, -1.0, -7.0], [5.0, 7.0, 1.0, 1.0, 4.0], 
+[-4.0, -4.0, -6.0, -3.0, -1.0]], [[6.0, 4.0, 6.0, -4.0, -6.0], [-1.0, -5.0, -5.0, 0.0, -6.0], [5.0, -3.0, 3.0, 4.0, -6.0], 
+[-4.0, 3.0, -7.0, -1.0, 1.0]], [[-2.0, -4.0, 0.0, -3.0, -4.0], [0.0, -2.0, 4.0, 0.0, 7.0], [5.0, 2.0, 5.0, 2.0, 2.0], [0.0, 
+-4.0, -2.0, -4.0, -2.0]]], [[[7.0, 0.0, 1.0, 2.0, 0.0], [3.0, -4.0, 7.0, 3.0, 5.0], [4.0, -4.0, -4.0, -2.0, -7.0], [-5.0, -1.0, 
+0.0, 3.0, 7.0]], [[1.0, 1.0, 2.0, -7.0, -3.0], [7.0, 0.0, 4.0, 0.0, -7.0], [0.0, 6.0, 7.0, 3.0, 0.0], [5.0, -1.0, -2.0, 5.0, 
+7.0]], [[-2.0, 5.0, -6.0, -3.0, 1.0], [4.0, 1.0, 3.0, 6.0, 1.0], [1.0, 4.0, -4.0, 5.0, 7.0], [0.0, 5.0, 0.0, -1.0, 2.0]]]]))
+      arg1=Data(numpy.array([[-5.0, -7.0, 4.0], [3.0, -7.0, 0.0]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[-73.0, 26.0, 2.0, 19.0, 65.0], [-17.0, -59.0, 21.0, 12.0, -27.0], [0.0, -120.0, 32.0, -1.0, 
+-38.0], [-55.0, 148.0, 1.0, -47.0, -38.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-71.0, -51.0, -23.0, 41.0, 47.0], [-58.0, -10.0, 59.0, 14.0, 169.0], [-28.0, -60.0, 
+-67.0, -52.0, 9.0], [-2.0, -13.0, 85.0, -20.0, -38.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank4_constData_rank3(self):
+      arg0=Data(numpy.array([[[[-6.0, -1.0, 6.0, -5.0, -6.0], [-1.0, 6.0, -6.0, -7.0, -6.0], [0.0, 1.0, 1.0, 5.0, -2.0], [1.0, 
+6.0, 3.0, -2.0, 6.0]], [[-1.0, 1.0, 7.0, -3.0, 0.0], [4.0, 4.0, -1.0, -2.0, 1.0], [-4.0, 6.0, -2.0, -2.0, -4.0], [-6.0, -3.0, 
+1.0, -6.0, -5.0]], [[7.0, -3.0, -7.0, -6.0, 0.0], [-4.0, -4.0, 0.0, 4.0, -4.0], [0.0, 5.0, 0.0, 6.0, -4.0], [0.0, 7.0, -3.0, 
+-4.0, -5.0]]], [[[6.0, -1.0, -7.0, -2.0, -1.0], [2.0, 1.0, 2.0, -3.0, 2.0], [6.0, -7.0, -2.0, 0.0, -5.0], [6.0, 5.0, 4.0, 2.0, 
+0.0]], [[-4.0, 2.0, -6.0, 5.0, 0.0], [6.0, 2.0, 3.0, 5.0, 5.0], [-5.0, -1.0, 7.0, -3.0, -5.0], [-7.0, 2.0, 0.0, 3.0, -3.0]], 
+[[-2.0, -6.0, 4.0, -7.0, 1.0], [-5.0, -3.0, -3.0, -5.0, 3.0], [-7.0, -1.0, 4.0, -2.0, 2.0], [3.0, 2.0, 1.0, 6.0, 
+-3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, -4.0, 5.0, 6.0, -2.0], [2.0, -4.0, -2.0, -6.0, -5.0], [-6.0, 0.0, -1.0, 0.0, 
+-7.0], [-3.0, -6.0, 0.0, 1.0, -1.0]], [[-1.0, -2.0, -3.0, -3.0, -6.0], [1.0, 0.0, 6.0, 0.0, 5.0], [-3.0, 0.0, 0.0, 0.0, -2.0], 
+[-5.0, 1.0, -2.0, -1.0, -7.0]], [[0.0, -4.0, -5.0, 3.0, 4.0], [-1.0, 3.0, -4.0, -5.0, 3.0], [2.0, 7.0, 6.0, -6.0, -5.0], [-3.0, 
+-6.0, 4.0, 2.0, 0.0]]], [[[5.0, 7.0, 3.0, 0.0, -3.0], [7.0, 1.0, -2.0, 0.0, 4.0], [-5.0, 6.0, -7.0, 0.0, 6.0], [0.0, -2.0, 
+-2.0, 5.0, -2.0]], [[3.0, 0.0, 3.0, -7.0, 5.0], [4.0, -6.0, 2.0, -1.0, 0.0], [-4.0, -6.0, -6.0, 0.0, 6.0], [5.0, -6.0, 3.0, 
+3.0, 0.0]], [[-3.0, -4.0, 6.0, 0.0, 6.0], [-3.0, 5.0, -1.0, -1.0, 7.0], [7.0, -7.0, 2.0, 3.0, -1.0], [-1.0, -1.0, -3.0, 5.0, 
+-1.0]]]]))
+      arg1=Data(numpy.array([[[-7.0, 3.0], [7.0, 0.0], [-6.0, 2.0]], [[7.0, 5.0], [0.0, 6.0], [7.0, 0.0]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[21.0, 2.0], [-17.0, -2.0], [28.0, -67.0], [-13.0, -7.0], [42.0, -23.0]], [[38.0, 35.0], [-4.0, 
+27.0], [28.0, 10.0], [-45.0, 2.0], [108.0, 14.0]], [[-35.0, 0.0], [-51.0, -28.0], [-7.0, 35.0], [-99.0, 9.0], [-11.0, -69.0]], 
+[[14.0, -9.0], [-56.0, 69.0], [39.0, 23.0], [52.0, 14.0], [-68.0, -10.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[7.0, 43.0], [59.0, 15.0], [37.0, 38.0], [-81.0, -18.0], [-31.0, 17.0]], [[27.0, 
+63.0], [52.0, -37.0], [59.0, -12.0], [65.0, -34.0], [129.0, 11.0]], [[23.0, -63.0], [-49.0, 8.0], [-64.0, -62.0], [57.0, 
+-12.0], [100.0, 35.0]], [[-3.0, 15.0], [64.0, -76.0], [-73.0, 16.0], [44.0, 50.0], [-63.0, -13.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=transposed_tensor_mult(arg0,arg1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -7.0, -3.0, -2.0, 3.0], [2.0, 3.0, -2.0, 5.0, 3.0], [-3.0, 7.0, 1.0, 1.0, 1.0], [0.0, 
-6.0, -2.0, 6.0, -3.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0, -6.0, 1.0, 0.0], [4.0, -3.0, -4.0, -3.0, -3.0], [6.0, 4.0, 3.0, 
--3.0, -5.0], [7.0, -7.0, -2.0, 3.0, 3.0]])
-      arg1=numpy.array([[5.0, -3.0, -7.0, 3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 
-6.0, 0.0, 4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 
-21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], [[-35.0, 21.0, 49.0, -21.0, 35.0], [-7.0, 28.0, -42.0, 0.0, 14.0], [-49.0, 42.0, -21.0, 
-28.0, -49.0], [-21.0, 35.0, -42.0, 0.0, -28.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, 
--9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]], [[-10.0, 6.0, 14.0, -6.0, 10.0], [-2.0, 8.0, -12.0, 0.0, 4.0], [-14.0, 
-12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], 
-[21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]]], [[[10.0, -6.0, -14.0, 6.0, -10.0], [2.0, -8.0, 12.0, 0.0, 
--4.0], [14.0, -12.0, 6.0, -8.0, 14.0], [6.0, -10.0, 12.0, 0.0, 8.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, 
--6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], [[-10.0, 6.0, 14.0, -6.0, 10.0], [-2.0, 8.0, -12.0, 
-0.0, 4.0], [-14.0, 12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[25.0, -15.0, -35.0, 15.0, -25.0], [5.0, -20.0, 
-30.0, 0.0, -10.0], [35.0, -30.0, 15.0, -20.0, 35.0], [15.0, -25.0, 30.0, 0.0, 20.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, 
--12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]]], [[[-15.0, 9.0, 21.0, -9.0, 15.0], 
-[-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]], [[35.0, -21.0, -49.0, 21.0, 
--35.0], [7.0, -28.0, 42.0, 0.0, -14.0], [49.0, -42.0, 21.0, -28.0, 49.0], [21.0, -35.0, 42.0, 0.0, 28.0]], [[5.0, -3.0, -7.0, 
-3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 0.0, 4.0]], [[5.0, -3.0, -7.0, 3.0, 
--5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 0.0, 4.0]], [[5.0, -3.0, -7.0, 3.0, -5.0], 
-[1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 0.0, 4.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[30.0, -18.0, -42.0, 18.0, -30.0], [6.0, -24.0, 36.0, 
-0.0, -12.0], [42.0, -36.0, 18.0, -24.0, 42.0], [18.0, -30.0, 36.0, 0.0, 24.0]], [[-10.0, 6.0, 14.0, -6.0, 10.0], [-2.0, 8.0, 
--12.0, 0.0, 4.0], [-14.0, 12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[30.0, -18.0, -42.0, 18.0, -30.0], [6.0, 
--24.0, 36.0, 0.0, -12.0], [42.0, -36.0, 18.0, -24.0, 42.0], [18.0, -30.0, 36.0, 0.0, 24.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], 
-[-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, 
--12.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[5.0, -3.0, -7.0, 3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 
-0.0, 4.0]], [[-30.0, 18.0, 42.0, -18.0, 30.0], [-6.0, 24.0, -36.0, 0.0, 12.0], [-42.0, 36.0, -18.0, 24.0, -42.0], [-18.0, 30.0, 
--36.0, 0.0, -24.0]], [[5.0, -3.0, -7.0, 3.0, -5.0], [1.0, -4.0, 6.0, 0.0, -2.0], [7.0, -6.0, 3.0, -4.0, 7.0], [3.0, -5.0, 6.0, 
-0.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
-[[[20.0, -12.0, -28.0, 12.0, -20.0], [4.0, -16.0, 24.0, 0.0, -8.0], [28.0, -24.0, 12.0, -16.0, 28.0], [12.0, -20.0, 24.0, 0.0, 
-16.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 
-0.0, -12.0]], [[-20.0, 12.0, 28.0, -12.0, 20.0], [-4.0, 16.0, -24.0, 0.0, 8.0], [-28.0, 24.0, -12.0, 16.0, -28.0], [-12.0, 
-20.0, -24.0, 0.0, -16.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], 
-[-9.0, 15.0, -18.0, 0.0, -12.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 6.0], [-21.0, 18.0, -9.0, 12.0, 
--21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]]], [[[30.0, -18.0, -42.0, 18.0, -30.0], [6.0, -24.0, 36.0, 0.0, -12.0], [42.0, -36.0, 
-18.0, -24.0, 42.0], [18.0, -30.0, 36.0, 0.0, 24.0]], [[20.0, -12.0, -28.0, 12.0, -20.0], [4.0, -16.0, 24.0, 0.0, -8.0], [28.0, 
--24.0, 12.0, -16.0, 28.0], [12.0, -20.0, 24.0, 0.0, 16.0]], [[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], 
-[21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], [[-15.0, 9.0, 21.0, -9.0, 15.0], [-3.0, 12.0, -18.0, 0.0, 
-6.0], [-21.0, 18.0, -9.0, 12.0, -21.0], [-9.0, 15.0, -18.0, 0.0, -12.0]], [[-25.0, 15.0, 35.0, -15.0, 25.0], [-5.0, 20.0, 
--30.0, 0.0, 10.0], [-35.0, 30.0, -15.0, 20.0, -35.0], [-15.0, 25.0, -30.0, 0.0, -20.0]]], [[[35.0, -21.0, -49.0, 21.0, -35.0], 
-[7.0, -28.0, 42.0, 0.0, -14.0], [49.0, -42.0, 21.0, -28.0, 49.0], [21.0, -35.0, 42.0, 0.0, 28.0]], [[-35.0, 21.0, 49.0, -21.0, 
-35.0], [-7.0, 28.0, -42.0, 0.0, 14.0], [-49.0, 42.0, -21.0, 28.0, -49.0], [-21.0, 35.0, -42.0, 0.0, -28.0]], [[-10.0, 6.0, 
-14.0, -6.0, 10.0], [-2.0, 8.0, -12.0, 0.0, 4.0], [-14.0, 12.0, -6.0, 8.0, -14.0], [-6.0, 10.0, -12.0, 0.0, -8.0]], [[15.0, 
--9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 12.0]], 
-[[15.0, -9.0, -21.0, 9.0, -15.0], [3.0, -12.0, 18.0, 0.0, -6.0], [21.0, -18.0, 9.0, -12.0, 21.0], [9.0, -15.0, 18.0, 0.0, 
-12.0]]]])
+   def test_transposed_tensor_mult_taggedData_rank4_constData_rank4(self):
+      arg0=Data(numpy.array([[[[0.0, -6.0, -6.0, 2.0, -7.0], [5.0, 1.0, 2.0, 6.0, 4.0], [0.0, 6.0, -3.0, -1.0, -1.0], [-1.0, 
+4.0, 4.0, -6.0, 2.0]], [[2.0, 6.0, -1.0, 0.0, -6.0], [0.0, 3.0, -4.0, -4.0, 7.0], [3.0, -5.0, 6.0, 4.0, -5.0], [-5.0, 0.0, 0.0, 
+4.0, 1.0]], [[2.0, 2.0, 2.0, -4.0, 0.0], [0.0, 6.0, -6.0, 7.0, 2.0], [6.0, 4.0, -1.0, -5.0, 4.0], [-1.0, 4.0, 0.0, 1.0, 0.0]]], 
+[[[-7.0, 3.0, 0.0, -2.0, -6.0], [-1.0, -2.0, 4.0, 5.0, -3.0], [-4.0, -6.0, 5.0, -5.0, -1.0], [2.0, -5.0, 5.0, 6.0, 0.0]], 
+[[0.0, 7.0, -7.0, -1.0, -4.0], [6.0, 5.0, 3.0, -6.0, -4.0], [-4.0, 7.0, -7.0, 0.0, -4.0], [0.0, -7.0, -1.0, 0.0, 4.0]], [[-1.0, 
+-4.0, -7.0, 4.0, 4.0], [1.0, 6.0, 0.0, 5.0, 0.0], [-6.0, 7.0, 0.0, -2.0, 2.0], [-7.0, 2.0, -3.0, 0.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 7.0, 1.0, -7.0, -5.0], [5.0, -5.0, 0.0, 3.0, 5.0], [6.0, 7.0, -7.0, 4.0, 
+-2.0], [-1.0, -2.0, 4.0, -6.0, -2.0]], [[2.0, 3.0, -4.0, -3.0, 1.0], [6.0, -4.0, 7.0, 5.0, -5.0], [-5.0, -4.0, 5.0, 1.0, 4.0], 
+[5.0, 1.0, -5.0, 2.0, 2.0]], [[-2.0, -2.0, -5.0, -2.0, 1.0], [0.0, -6.0, -6.0, -6.0, 7.0], [-4.0, -3.0, -6.0, -6.0, -1.0], 
+[1.0, 1.0, 5.0, -2.0, 5.0]]], [[[0.0, 4.0, -5.0, 5.0, 2.0], [3.0, 1.0, -7.0, 1.0, 0.0], [-3.0, 6.0, 0.0, 5.0, 4.0], [-6.0, 5.0, 
+-3.0, 3.0, 2.0]], [[5.0, -2.0, 7.0, -7.0, -5.0], [-3.0, -2.0, -6.0, 3.0, 1.0], [-7.0, -7.0, 3.0, -6.0, 2.0], [3.0, 2.0, 3.0, 
+7.0, -4.0]], [[-6.0, 1.0, -5.0, -7.0, 0.0], [-3.0, -5.0, 0.0, -7.0, 4.0], [-6.0, -4.0, 1.0, -2.0, 6.0], [-1.0, 3.0, 7.0, -4.0, 
+-5.0]]]]))
+      arg1=Data(numpy.array([[[[-7.0, 2.0, 1.0, -1.0, -4.0], [7.0, 2.0, 1.0, 0.0, 1.0], [3.0, -1.0, -4.0, -1.0, 5.0], [3.0, 
+1.0, 1.0, -2.0, -5.0]], [[7.0, 1.0, -1.0, -6.0, 7.0], [-7.0, -2.0, -3.0, -1.0, 5.0], [-3.0, 4.0, 7.0, -7.0, -5.0], [2.0, 4.0, 
+-6.0, 5.0, -4.0]], [[-6.0, -7.0, 2.0, -2.0, 6.0], [-1.0, 0.0, -5.0, 5.0, 5.0], [-4.0, 0.0, 1.0, 0.0, 3.0], [5.0, -2.0, -6.0, 
+6.0, 6.0]]], [[[0.0, 1.0, 2.0, -1.0, -2.0], [-1.0, -2.0, -7.0, 1.0, 4.0], [5.0, 6.0, -1.0, -2.0, -1.0], [4.0, 0.0, 1.0, 5.0, 
+-7.0]], [[-1.0, 7.0, -4.0, 2.0, 2.0], [0.0, 1.0, 2.0, 1.0, -1.0], [0.0, 5.0, 0.0, 4.0, 7.0], [7.0, -1.0, 0.0, 4.0, -1.0]], 
+[[1.0, 7.0, -5.0, 6.0, 0.0], [-2.0, -6.0, 7.0, -4.0, -4.0], [1.0, -3.0, -4.0, -6.0, 6.0], [-6.0, -1.0, 0.0, -3.0, 
+1.0]]]]),self.functionspace)
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[1.0, -26.0, -7.0, -15.0, 40.0], [-7.0, 16.0, 26.0, 5.0, -4.0], [-50.0, -31.0, 27.0, 6.0, -3.0], 
+[-8.0, 5.0, -31.0, -10.0, 52.0]], [[61.0, 4.0, -10.0, -47.0, 86.0], [-81.0, 1.0, -69.0, 30.0, 55.0], [-33.0, 95.0, 81.0, 10.0, 
+-32.0], [89.0, 11.0, -51.0, 109.0, -14.0]], [[23.0, -125.0, 62.0, -48.0, 15.0], [-23.0, 25.0, -76.0, 32.0, 34.0], [-30.0, 
+-12.0, 47.0, 27.0, -110.0], [-17.0, 0.0, -12.0, 12.0, 46.0]], [[15.0, 51.0, -26.0, 30.0, -30.0], [12.0, -17.0, 62.0, -39.0, 
+-41.0], [16.0, -31.0, -26.0, -26.0, 17.0], [-53.0, 7.0, 24.0, -54.0, -15.0]], [[15.0, -26.0, -17.0, 65.0, -10.0], [-9.0, -18.0, 
+73.0, -20.0, -73.0], [-29.0, -85.0, -24.0, 21.0, -3.0], [-109.0, -31.0, 23.0, -74.0, 109.0]]], [[[-40.0, 58.0, -26.0, 14.0, 
+-6.0], [34.0, 12.0, 31.0, 1.0, -9.0], [11.0, 16.0, -23.0, 15.0, 74.0], [47.0, -2.0, 4.0, 6.0, -23.0]], [[-21.0, 38.0, -44.0, 
+17.0, 67.0], [-30.0, -31.0, 28.0, 6.0, 9.0], [-34.0, 6.0, 1.0, -34.0, 81.0], [30.0, -10.0, -55.0, 41.0, 34.0]], [[-9.0, 67.0, 
+-10.0, 36.0, -74.0], [44.0, 7.0, 22.0, -19.0, -35.0], [62.0, 21.0, -46.0, 30.0, 29.0], [5.0, -5.0, 66.0, -28.0, -61.0]], 
+[[-101.0, -43.0, 33.0, 17.0, -32.0], [48.0, -26.0, -29.0, 18.0, 27.0], [32.0, -37.0, -70.0, -42.0, 54.0], [-7.0, -23.0, -7.0, 
+-4.0, 4.0]], [[13.0, -30.0, 11.0, -55.0, 43.0], [-20.0, -4.0, -14.0, -4.0, 41.0], [-32.0, -14.0, 38.0, -63.0, -34.0], [-4.0, 
+32.0, -53.0, 8.0, -11.0]]], [[[-17.0, -113.0, 47.0, -70.0, 57.0], [-11.0, 34.0, -61.0, 43.0, 57.0], [-59.0, -14.0, 55.0, 7.0, 
+-57.0], [28.0, 10.0, -58.0, 33.0, 50.0]], [[-101.0, 71.0, -56.0, 78.0, -9.0], [65.0, -1.0, 106.0, -2.0, -58.0], [-6.0, -48.0, 
+-77.0, 27.0, 164.0], [11.0, -36.0, 6.0, -36.0, 56.0]], [[76.0, -37.0, 27.0, -50.0, 24.0], [-67.0, -35.0, -65.0, -13.0, 49.0], 
+[2.0, 22.0, 48.0, -77.0, -102.0], [-31.0, 30.0, -28.0, 27.0, -43.0]], [[63.0, 18.0, -15.0, -20.0, 12.0], [-21.0, 12.0, 33.0, 
+-26.0, -18.0], [-22.0, -7.0, 40.0, -5.0, -47.0], [-28.0, 27.0, 0.0, -27.0, -8.0]], [[-46.0, -50.0, 16.0, 28.0, -13.0], [21.0, 
+-6.0, 7.0, 12.0, -14.0], [-7.0, -51.0, -34.0, 10.0, 17.0], [-37.0, -27.0, 4.0, -26.0, 62.0]]], [[[-29.0, -47.0, 41.0, -11.0, 
+-41.0], [41.0, 46.0, -44.0, 30.0, 5.0], [19.0, 14.0, -6.0, 74.0, -27.0], [32.0, -12.0, 37.0, 2.0, -2.0]], [[-43.0, -60.0, 20.0, 
+-9.0, 4.0], [25.0, -1.0, 19.0, 0.0, 3.0], [-27.0, -75.0, -15.0, -34.0, 0.0], [-49.0, 1.0, -25.0, -43.0, 48.0]], [[-30.0, -15.0, 
+33.0, -29.0, -28.0], [29.0, 15.0, -54.0, 16.0, 37.0], [34.0, 30.0, -9.0, 0.0, -10.0], [43.0, 8.0, 9.0, 22.0, -57.0]], [[64.0, 
+-9.0, 4.0, -26.0, 46.0], [-77.0, -32.0, -65.0, 7.0, 43.0], [-4.0, 58.0, 47.0, -34.0, -53.0], [19.0, 8.0, -30.0, 68.0, -22.0]], 
+[[-11.0, 33.0, -15.0, 0.0, 7.0], [7.0, 6.0, 7.0, 3.0, 3.0], [3.0, 22.0, -1.0, 7.0, 33.0], [36.0, 2.0, -4.0, 17.0, 
+-18.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[1.0, 13.0, 6.0, -36.0, 4.0], [14.0, 41.0, -26.0, 17.0, 21.0], [2.0, 49.0, 28.0, 
+40.0, -7.0], [71.0, 15.0, 2.0, 32.0, -41.0]], [[-13.0, 28.0, 11.0, -23.0, -31.0], [24.0, -8.0, -17.0, -15.0, 26.0], [41.0, 
+16.0, -17.0, -50.0, 2.0], [13.0, 24.0, 5.0, -2.0, -84.0]], [[-17.0, 42.0, -18.0, 22.0, -38.0], [55.0, 57.0, 52.0, 1.0, -51.0], 
+[5.0, 3.0, -12.0, 95.0, 34.0], [29.0, -7.0, 50.0, -34.0, 4.0]], [[40.0, -96.0, 65.0, -32.0, -29.0], [-17.0, 17.0, -86.0, 19.0, 
+23.0], [14.0, 11.0, 28.0, 32.0, -122.0], [-24.0, -1.0, 28.0, 5.0, 0.0]], [[41.0, -49.0, 20.0, -15.0, 19.0], [-45.0, -21.0, 
+-37.0, 1.0, 18.0], [-12.0, -4.0, 26.0, -26.0, -64.0], [-35.0, 2.0, -15.0, 11.0, 18.0]]], [[[7.0, -23.0, 32.0, -68.0, 10.0], 
+[-4.0, 7.0, -61.0, 6.0, 62.0], [9.0, 31.0, 31.0, -47.0, -47.0], [36.0, 35.0, -28.0, 32.0, -70.0]], [[40.0, -20.0, 22.0, 6.0, 
+-50.0], [8.0, 24.0, -9.0, -7.0, -29.0], [21.0, 0.0, 5.0, 53.0, -68.0], [-33.0, -2.0, 56.0, -34.0, -5.0]], [[91.0, 0.0, -9.0, 
+-35.0, 15.0], [-36.0, -6.0, 46.0, -50.0, -17.0], [-32.0, -44.0, 50.0, -59.0, -88.0], [-86.0, 46.0, -13.0, -60.0, -9.0]], 
+[[40.0, 26.0, 11.0, -58.0, -9.0], [5.0, 39.0, -32.0, -3.0, 27.0], [16.0, 59.0, 44.0, 14.0, -50.0], [56.0, 39.0, 10.0, 21.0, 
+-88.0]], [[-109.0, -9.0, 0.0, 37.0, -11.0], [55.0, -3.0, 15.0, 25.0, -2.0], [6.0, -32.0, -64.0, 10.0, 102.0], [23.0, -34.0, 
+-7.0, -1.0, 40.0]]], [[[-52.0, -59.0, 55.0, -15.0, -91.0], [96.0, 57.0, 6.0, -1.0, -20.0], [28.0, -61.0, -36.0, 43.0, -39.0], 
+[-37.0, 7.0, 57.0, -86.0, -12.0]], [[-56.0, -40.0, 65.0, -21.0, -100.0], [82.0, 27.0, -50.0, 4.0, 19.0], [71.0, -10.0, -49.0, 
+5.0, -33.0], [-3.0, 8.0, 55.0, -38.0, -76.0]], [[118.0, 61.0, -41.0, 1.0, 33.0], [-80.0, -27.0, 21.0, -36.0, -19.0], [-11.0, 
+39.0, 53.0, -22.0, -51.0], [-26.0, 21.0, -1.0, 12.0, -23.0]], [[19.0, 0.0, 35.0, -27.0, -67.0], [26.0, 2.0, -30.0, -24.0, 
+13.0], [56.0, 6.0, -12.0, -33.0, -62.0], [-26.0, 28.0, 39.0, -32.0, -91.0]], [[52.0, 67.0, -38.0, 16.0, 26.0], [-57.0, -54.0, 
+9.0, -27.0, 3.0], [12.0, 34.0, 7.0, -62.0, 13.0], [-9.0, 8.0, -16.0, 28.0, -36.0]]], [[[32.0, 4.0, -23.0, -25.0, 63.0], [-35.0, 
+9.0, 20.0, 1.0, 6.0], [-53.0, 3.0, 50.0, -4.0, -6.0], [15.0, 15.0, -43.0, 18.0, 29.0]], [[16.0, 30.0, -14.0, 11.0, 15.0], 
+[-33.0, -32.0, -20.0, -1.0, 14.0], [15.0, 37.0, -1.0, -25.0, 15.0], [17.0, -5.0, -9.0, 39.0, -22.0]], [[-89.0, 35.0, -34.0, 
+67.0, -9.0], [47.0, -15.0, 70.0, 2.0, -39.0], [-1.0, -48.0, -71.0, 7.0, 126.0], [-6.0, -36.0, 1.0, -27.0, 55.0]], [[57.0, 28.0, 
+-14.0, -15.0, 34.0], [-49.0, 9.0, -37.0, 14.0, 15.0], [-5.0, 79.0, 49.0, 38.0, -24.0], [61.0, 3.0, -3.0, 65.0, -22.0]], [[-3.0, 
+-98.0, 51.0, -60.0, 40.0], [-25.0, 14.0, -90.0, 41.0, 65.0], [-27.0, 17.0, 45.0, -2.0, -65.0], [33.0, 5.0, -42.0, 53.0, 
+17.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank4_taggedData_rank2(self):
+      arg0=Data(numpy.array([[[[7.0, -1.0, -2.0, -5.0, 2.0], [7.0, 7.0, 5.0, -4.0, 0.0], [-5.0, 6.0, 0.0, 6.0, 6.0], [-6.0, 
+-1.0, 0.0, 1.0, 7.0]], [[5.0, -1.0, 0.0, -3.0, 5.0], [-3.0, -3.0, 1.0, -1.0, 3.0], [7.0, -5.0, -5.0, 5.0, 3.0], [-1.0, 5.0, 
+4.0, 4.0, 0.0]], [[4.0, -2.0, 1.0, 2.0, -5.0], [6.0, -7.0, 0.0, 1.0, 3.0], [2.0, 4.0, -3.0, -2.0, -2.0], [-3.0, 0.0, -6.0, 
+-1.0, 0.0]]], [[[7.0, 2.0, 4.0, -4.0, -1.0], [7.0, 5.0, -6.0, 7.0, -1.0], [-4.0, -3.0, 2.0, -7.0, 4.0], [6.0, 0.0, 0.0, 2.0, 
+3.0]], [[0.0, 4.0, 5.0, -6.0, 1.0], [-4.0, 3.0, 0.0, 6.0, 5.0], [-4.0, 3.0, 3.0, 2.0, 0.0], [0.0, 0.0, 3.0, 3.0, -6.0]], [[6.0, 
+-1.0, -1.0, 0.0, 1.0], [-5.0, -5.0, -5.0, 1.0, -5.0], [4.0, 2.0, -3.0, 7.0, 0.0], [2.0, 5.0, -3.0, -5.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -3.0, 0.0, -7.0, -5.0], [3.0, 5.0, 2.0, 1.0, -2.0], [-2.0, -5.0, -7.0, 2.0, 
+6.0], [2.0, -1.0, -2.0, 1.0, -6.0]], [[1.0, -7.0, 3.0, -3.0, 0.0], [0.0, -7.0, 2.0, -2.0, 3.0], [-3.0, -1.0, -1.0, -2.0, 2.0], 
+[-4.0, 1.0, -1.0, -7.0, -1.0]], [[5.0, 4.0, 3.0, 0.0, -6.0], [0.0, 0.0, 0.0, -6.0, 2.0], [0.0, 4.0, 4.0, 5.0, -1.0], [1.0, 
+-2.0, 5.0, 0.0, 2.0]]], [[[0.0, -7.0, -3.0, 5.0, -5.0], [-7.0, 6.0, -1.0, -6.0, -6.0], [5.0, 7.0, -6.0, 1.0, -5.0], [6.0, 0.0, 
+-1.0, -5.0, 0.0]], [[-4.0, 3.0, -3.0, 5.0, -4.0], [-6.0, 2.0, 4.0, -5.0, -1.0], [-3.0, 0.0, 6.0, 5.0, -5.0], [0.0, 5.0, 5.0, 
+0.0, 2.0]], [[0.0, -4.0, 0.0, 7.0, 5.0], [-7.0, 1.0, 0.0, -5.0, 3.0], [-3.0, -4.0, 6.0, 2.0, 0.0], [-4.0, -6.0, -2.0, 7.0, 
+5.0]]]]))
+      arg1=Data(numpy.array([[-4.0, -2.0, 3.0], [7.0, -2.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 0.0, 3.0], [0.0, 7.0, -2.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[5.0, 9.0, 32.0, 16.0, -45.0], [68.0, 1.0, -49.0, 55.0, 1.0], [-20.0, -35.0, 18.0, -114.0, -8.0], 
+[53.0, -21.0, -23.0, 8.0, 5.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-13.0, 41.0, -12.0, 21.0, -56.0], [-28.0, 12.0, 28.0, -43.0, -7.0], [-15.0, 20.0, 
+42.0, 46.0, -38.0], [11.0, 41.0, 54.0, -14.0, 10.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank4_taggedData_rank3(self):
+      arg0=Data(numpy.array([[[[0.0, 0.0, 5.0, 2.0, -4.0], [-2.0, 0.0, 5.0, 2.0, -6.0], [-5.0, 0.0, -5.0, 3.0, 7.0], [-3.0, 
+0.0, 1.0, -6.0, 3.0]], [[6.0, 2.0, 2.0, -2.0, -6.0], [0.0, -4.0, -7.0, -7.0, 1.0], [-6.0, 1.0, -4.0, -7.0, -5.0], [2.0, 0.0, 
+4.0, -4.0, -5.0]], [[-7.0, 0.0, 3.0, 4.0, -3.0], [0.0, -5.0, 1.0, -2.0, 3.0], [0.0, 0.0, -4.0, -3.0, 4.0], [5.0, -5.0, -2.0, 
+3.0, 6.0]]], [[[6.0, 1.0, -4.0, 3.0, 4.0], [3.0, 2.0, 6.0, -2.0, -7.0], [-2.0, 0.0, -3.0, -7.0, -4.0], [-2.0, -3.0, 2.0, -2.0, 
+-6.0]], [[-6.0, 6.0, 0.0, 2.0, -5.0], [0.0, 5.0, -6.0, -1.0, -2.0], [-7.0, 7.0, 6.0, 5.0, -7.0], [6.0, -6.0, -5.0, 5.0, -3.0]], 
+[[-4.0, -4.0, 3.0, -4.0, 4.0], [2.0, 0.0, -6.0, -6.0, 3.0], [5.0, 2.0, -1.0, -2.0, 0.0], [1.0, 1.0, 0.0, -3.0, 
+-2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, 0.0, 5.0, 3.0, -7.0], [6.0, -5.0, 0.0, 0.0, 6.0], [7.0, -5.0, -1.0, -5.0, 
+0.0], [-1.0, -5.0, -7.0, -4.0, 1.0]], [[-7.0, -5.0, 1.0, 2.0, 7.0], [0.0, 5.0, -5.0, 1.0, -4.0], [-5.0, 3.0, 2.0, 0.0, -3.0], 
+[2.0, 5.0, 3.0, -1.0, 1.0]], [[3.0, -5.0, 3.0, 4.0, -5.0], [6.0, 0.0, -3.0, 0.0, -1.0], [-6.0, 2.0, 0.0, -5.0, -1.0], [6.0, 
+5.0, -2.0, -2.0, 1.0]]], [[[0.0, -5.0, -2.0, -2.0, -5.0], [2.0, 1.0, 7.0, 0.0, 1.0], [-2.0, -7.0, -7.0, -2.0, -5.0], [-6.0, 
+6.0, 0.0, 7.0, 0.0]], [[-5.0, -5.0, -4.0, -2.0, 6.0], [-3.0, -7.0, 0.0, -4.0, -2.0], [3.0, 3.0, 2.0, -3.0, -4.0], [1.0, -1.0, 
+-4.0, 0.0, -7.0]], [[-1.0, 6.0, 6.0, 0.0, 1.0], [4.0, 0.0, 3.0, 3.0, -2.0], [4.0, -6.0, -5.0, 5.0, -3.0], [2.0, 2.0, -2.0, 
+-2.0, -2.0]]]]))
+      arg1=Data(numpy.array([[[-7.0, 5.0], [0.0, 5.0], [5.0, 0.0]], [[5.0, 5.0], [-6.0, 4.0], [5.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, 5.0], [2.0, 7.0], [-2.0, 1.0]], [[4.0, 1.0], [1.0, 0.0], [-4.0, -4.0]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[11.0, 36.0], [-51.0, 39.0], [-25.0, 15.0], [-11.0, 23.0], [83.0, -50.0]], [[39.0, 5.0], [-45.0, 
+10.0], [6.0, -4.0], [-58.0, -39.0], [49.0, -68.0]], [[92.0, -93.0], [-32.0, 33.0], [-41.0, -36.0], [-111.0, -35.0], [-7.0, 
+-38.0]], [[5.0, 9.0], [1.0, -39.0], [23.0, 15.0], [2.0, -40.0], [-13.0, -52.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-14.0, -37.0], [-49.0, -69.0], [-5.0, 9.0], [7.0, 31.0], [-43.0, 0.0]], [[19.0, 
+22.0], [-28.0, 11.0], [12.0, -43.0], [-14.0, -5.0], [46.0, 10.0]], [[30.0, -24.0], [-34.0, 15.0], [-9.0, 22.0], [-56.0, -52.0], 
+[-16.0, -15.0]], [[-46.0, 1.0], [-20.0, 13.0], [-35.0, -8.0], [10.0, -14.0], [8.0, 21.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank4_taggedData_rank4(self):
+      arg0=Data(numpy.array([[[[0.0, 1.0, -1.0, 7.0, 0.0], [3.0, 5.0, 2.0, -1.0, -3.0], [5.0, -4.0, 4.0, -4.0, -6.0], [-6.0, 
+1.0, 0.0, 5.0, 0.0]], [[0.0, 2.0, 6.0, -1.0, -1.0], [-4.0, 0.0, 0.0, -6.0, -3.0], [-1.0, -1.0, 4.0, 5.0, -1.0], [6.0, -7.0, 
+-1.0, 0.0, 3.0]], [[-4.0, -1.0, 4.0, -1.0, -3.0], [0.0, -6.0, 7.0, 1.0, -4.0], [-2.0, 7.0, 0.0, 6.0, -2.0], [3.0, -1.0, -1.0, 
+0.0, -7.0]]], [[[-6.0, 5.0, 0.0, -1.0, 3.0], [-6.0, -2.0, 7.0, 5.0, -5.0], [-2.0, 4.0, -2.0, 4.0, -6.0], [0.0, 6.0, -7.0, -1.0, 
+-7.0]], [[6.0, -2.0, 1.0, -3.0, -6.0], [-4.0, -7.0, -7.0, 1.0, 0.0], [2.0, -4.0, 3.0, -7.0, 0.0], [7.0, 6.0, 1.0, -4.0, -1.0]], 
+[[-2.0, -5.0, -1.0, 0.0, -4.0], [4.0, -1.0, 0.0, 3.0, 5.0], [3.0, 1.0, -3.0, 4.0, -3.0], [0.0, 7.0, 6.0, 4.0, 
+5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 0.0, 0.0, 3.0, 1.0], [-6.0, 3.0, 4.0, 0.0, -4.0], [-3.0, 5.0, 0.0, -4.0, 
+-3.0], [-6.0, 5.0, -7.0, 0.0, -3.0]], [[-5.0, 0.0, 4.0, -6.0, 2.0], [6.0, -6.0, 2.0, -7.0, 4.0], [-2.0, 1.0, -3.0, 4.0, 6.0], 
+[-6.0, 5.0, -5.0, 0.0, -3.0]], [[-7.0, -6.0, 4.0, -2.0, -1.0], [2.0, 0.0, 0.0, -1.0, 1.0], [-2.0, -6.0, -2.0, -1.0, 4.0], [1.0, 
+-1.0, 0.0, -7.0, 6.0]]], [[[1.0, 5.0, 1.0, 1.0, 1.0], [-6.0, 4.0, 5.0, -2.0, 0.0], [0.0, -1.0, 3.0, 6.0, -6.0], [-6.0, -4.0, 
+-7.0, 2.0, 4.0]], [[4.0, -1.0, -1.0, -1.0, -1.0], [-4.0, 2.0, -3.0, 1.0, 7.0], [7.0, 0.0, -5.0, -4.0, -5.0], [-5.0, 2.0, -4.0, 
+3.0, 6.0]], [[0.0, 6.0, 2.0, 2.0, 3.0], [-3.0, 4.0, -5.0, -2.0, 0.0], [4.0, 2.0, 3.0, 5.0, 2.0], [2.0, 2.0, -7.0, -1.0, 
+-2.0]]]]))
+      arg1=Data(numpy.array([[[[0.0, 4.0, -6.0, -1.0, -7.0], [-6.0, -4.0, 3.0, 3.0, 6.0], [0.0, -6.0, 4.0, 7.0, -2.0], [-5.0, 
+-7.0, -7.0, 2.0, 4.0]], [[7.0, 7.0, -3.0, 0.0, -6.0], [4.0, 5.0, 2.0, 0.0, 0.0], [-6.0, 0.0, 1.0, 3.0, 4.0], [6.0, 7.0, 7.0, 
+3.0, -2.0]], [[-5.0, 5.0, -3.0, -2.0, 0.0], [-5.0, -3.0, -3.0, 1.0, 3.0], [-4.0, 0.0, -3.0, 2.0, 4.0], [1.0, 2.0, 3.0, -4.0, 
+4.0]]], [[[7.0, -5.0, 7.0, 1.0, 4.0], [7.0, -4.0, -6.0, -4.0, 3.0], [-2.0, 2.0, 5.0, 3.0, 7.0], [-5.0, 0.0, 7.0, -4.0, -7.0]], 
+[[0.0, 1.0, 5.0, 4.0, -2.0], [-5.0, 2.0, 4.0, 5.0, 7.0], [7.0, -2.0, 2.0, -5.0, -6.0], [-1.0, 2.0, 2.0, 5.0, 3.0]], [[1.0, 0.0, 
+-6.0, -7.0, -2.0], [-1.0, -6.0, 4.0, -5.0, 5.0], [0.0, -1.0, 3.0, 2.0, -7.0], [-2.0, -2.0, -7.0, 6.0, 
+-1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, -4.0, -5.0, 2.0, 0.0], [-1.0, 1.0, 0.0, -3.0, -3.0], [0.0, 6.0, 2.0, 6.0, 
+6.0], [0.0, 3.0, -6.0, 6.0, -1.0]], [[0.0, -7.0, -4.0, -5.0, 5.0], [0.0, 6.0, -4.0, 3.0, 4.0], [-1.0, 2.0, -1.0, 0.0, -4.0], 
+[-4.0, -6.0, -7.0, 3.0, 3.0]], [[-1.0, -1.0, -3.0, -5.0, 0.0], [-1.0, 4.0, 6.0, 2.0, -5.0], [2.0, -4.0, -2.0, 4.0, -1.0], [1.0, 
+-1.0, -7.0, 0.0, -4.0]]], [[[7.0, -7.0, 4.0, 5.0, 7.0], [-4.0, 0.0, 1.0, -2.0, 0.0], [0.0, 5.0, -1.0, 1.0, -6.0], [0.0, 5.0, 
+-5.0, -6.0, -4.0]], [[-4.0, -6.0, -4.0, 3.0, -1.0], [-2.0, -2.0, 3.0, -4.0, -1.0], [-1.0, 0.0, 7.0, 7.0, 6.0], [-7.0, 6.0, 1.0, 
+-7.0, -3.0]], [[-6.0, -6.0, 0.0, 2.0, 1.0], [4.0, -3.0, 0.0, -2.0, -2.0], [6.0, -1.0, -1.0, -1.0, -4.0], [-2.0, -1.0, 1.0, 
+-1.0, -5.0]]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-24.0, 16.0, 12.0, 40.0, -32.0], [-50.0, 60.0, 64.0, 60.0, 2.0], [70.0, -22.0, -12.0, -60.0, 
+-80.0], [24.0, 8.0, -28.0, 58.0, 46.0]], [[49.0, -14.0, 46.0, 33.0, 15.0], [57.0, 15.0, -48.0, -3.0, -21.0], [-32.0, 13.0, 
+15.0, 26.0, 84.0], [-7.0, 11.0, 70.0, -48.0, -40.0]], [[21.0, 59.0, -13.0, 4.0, -29.0], [6.0, 30.0, -3.0, 11.0, 8.0], [-45.0, 
+5.0, -11.0, 12.0, 43.0], [46.0, 61.0, 70.0, -1.0, 4.0]], [[-9.0, 18.0, -58.0, -18.0, -41.0], [-33.0, -32.0, 16.0, 9.0, 15.0], 
+[-9.0, -38.0, 19.0, 56.0, -11.0], [-34.0, -64.0, -72.0, 4.0, 24.0]], [[25.0, -43.0, 27.0, 13.0, 38.0], [66.0, 4.0, -51.0, 
+-25.0, -62.0], [-30.0, 22.0, -1.0, 22.0, 69.0], [-10.0, -17.0, 21.0, -57.0, -45.0]]], [[[-66.0, 10.0, -92.0, -53.0, -21.0], 
+[-60.0, -40.0, 37.0, -7.0, -8.0], [8.0, -26.0, -18.0, 19.0, -68.0], [-13.0, -65.0, -127.0, 22.0, 46.0]], [[15.0, -7.0, -55.0, 
+-16.0, -27.0], [22.0, -2.0, 13.0, -13.0, -48.0], [-21.0, -19.0, 11.0, 50.0, 1.0], [-12.0, -59.0, -74.0, 1.0, -10.0]], [[14.0, 
+1.0, -19.0, -37.0, 28.0], [37.0, -71.0, -85.0, -50.0, 5.0], [-91.0, 16.0, 8.0, 84.0, 115.0], [-31.0, -14.0, 42.0, -87.0, 
+-34.0]], [[-9.0, -65.0, 43.0, -13.0, 55.0], [4.0, -65.0, -32.0, -32.0, 34.0], [29.0, 11.0, 23.0, -7.0, -10.0], [-62.0, -37.0, 
+-16.0, -21.0, -23.0]], [[-31.0, -28.0, -26.0, -29.0, 9.0], [-14.0, -1.0, 47.0, -18.0, -20.0], [44.0, 3.0, -13.0, -43.0, -92.0], 
+[8.0, -18.0, -82.0, 51.0, 8.0]]], [[[-8.0, 15.0, -43.0, -16.0, -47.0], [-51.0, -25.0, 51.0, 16.0, 47.0], [32.0, -41.0, 28.0, 
+18.0, -69.0], [-31.0, -48.0, -79.0, 51.0, 31.0]], [[-13.0, -12.0, 8.0, -29.0, 56.0], [32.0, -40.0, -71.0, -46.0, -14.0], 
+[-58.0, 39.0, -23.0, 17.0, 77.0], [3.0, 25.0, 55.0, -69.0, -27.0]], [[11.0, 57.0, -17.0, 27.0, -60.0], [-34.0, 36.0, 32.0, 
+50.0, 24.0], [1.0, -31.0, 7.0, 13.0, -3.0], [17.0, 12.0, 13.0, 25.0, 34.0]], [[37.0, 22.0, -40.0, -60.0, 20.0], [73.0, -31.0, 
+-56.0, -77.0, -23.0], [-111.0, 42.0, -11.0, 54.0, 94.0], [35.0, 53.0, 67.0, -44.0, -55.0]], [[-42.0, -11.0, 21.0, 25.0, 30.0], 
+[3.0, 67.0, 10.0, 19.0, -75.0], [26.0, 27.0, -58.0, -73.0, -21.0], [58.0, 37.0, 8.0, -1.0, 15.0]]], [[[27.0, 40.0, 44.0, 28.0, 
+-8.0], [10.0, 59.0, 13.0, 20.0, 22.0], [1.0, 22.0, -13.0, -53.0, 6.0], [62.0, 104.0, 107.0, 29.0, -3.0]], [[5.0, -74.0, 48.0, 
+-18.0, 33.0], [-24.0, -90.0, 8.0, -27.0, 98.0], [76.0, -13.0, 63.0, -14.0, -77.0], [-98.0, -60.0, -54.0, 33.0, -17.0]], 
+[[-45.0, 24.0, -74.0, -43.0, -36.0], [-59.0, -8.0, 71.0, 2.0, 13.0], [31.0, -22.0, -13.0, -19.0, -105.0], [15.0, -19.0, -99.0, 
+70.0, 44.0]], [[-3.0, 21.0, -81.0, -50.0, -39.0], [-21.0, -48.0, 21.0, -21.0, 19.0], [-26.0, -28.0, 19.0, 60.0, -21.0], [-24.0, 
+-51.0, -78.0, 18.0, 11.0]], [[12.0, 20.0, -72.0, -32.0, -54.0], [-2.0, 32.0, 85.0, -9.0, -24.0], [17.0, -17.0, 2.0, -11.0, 
+-94.0], [37.0, -5.0, -86.0, 90.0, 7.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[14.0, -5.0, 9.0, 85.0, -22.0], [-9.0, -62.0, -9.0, -59.0, -1.0], [-13.0, 47.0, 54.0, 
+25.0, 69.0], [-15.0, 78.0, 59.0, -25.0, -7.0]], [[9.0, -59.0, 42.0, 64.0, 42.0], [12.0, -40.0, -34.0, -30.0, 19.0], [25.0, 
+43.0, -6.0, -32.0, -54.0], [-11.0, 19.0, 22.0, -29.0, -23.0]], [[-5.0, -45.0, -20.0, -34.0, 30.0], [2.0, 36.0, 6.0, 18.0, 
+-7.0], [17.0, -5.0, -22.0, 8.0, -40.0], [-9.0, -31.0, -60.0, 11.0, -15.0]], [[13.0, 19.0, 23.0, 52.0, -20.0], [5.0, -45.0, 
+10.0, -33.0, -26.0], [15.0, 17.0, 6.0, 2.0, 24.0], [25.0, 44.0, 34.0, -1.0, -24.0]], [[-2.0, -36.0, -2.0, 5.0, 21.0], [10.0, 
+2.0, -16.0, -3.0, 5.0], [15.0, 16.0, -9.0, -7.0, -25.0], [-8.0, -12.0, -16.0, 10.0, -7.0]]], [[[-34.0, 64.0, -8.0, -100.0, 
+-11.0], [24.0, 55.0, -30.0, 74.0, 42.0], [-16.0, -59.0, -41.0, -59.0, -38.0], [12.0, -107.0, 3.0, 49.0, 67.0]], [[8.0, -34.0, 
+17.0, 70.0, 0.0], [-7.0, -49.0, 34.0, -51.0, -43.0], [28.0, 22.0, 18.0, 32.0, 14.0], [2.0, 73.0, 10.0, -42.0, -63.0]], [[93.0, 
+-17.0, 4.0, 4.0, 43.0], [-38.0, 37.0, -12.0, 6.0, 9.0], [-29.0, 58.0, -15.0, 13.0, -12.0], [23.0, 12.0, -71.0, 26.0, 16.0]], 
+[[-5.0, 70.0, 19.0, 29.0, -52.0], [-1.0, -42.0, 23.0, -19.0, -20.0], [-8.0, -18.0, 20.0, 3.0, 55.0], [24.0, 41.0, 65.0, -14.0, 
+-2.0]], [[-45.0, -55.0, -27.0, -12.0, 13.0], [-11.0, 10.0, 11.0, -2.0, 16.0], [-9.0, -20.0, 35.0, 29.0, 1.0], [-64.0, 5.0, 
+-4.0, -61.0, -9.0]]], [[[-62.0, -38.0, 1.0, 43.0, -13.0], [7.0, -49.0, 17.0, -37.0, -4.0], [15.0, -18.0, 45.0, 19.0, 18.0], 
+[-51.0, 43.0, 57.0, -77.0, -36.0]], [[7.0, -26.0, -15.0, 34.0, 0.0], [13.0, -19.0, -41.0, -26.0, 15.0], [-1.0, 49.0, 20.0, 3.0, 
+30.0], [-14.0, 8.0, 12.0, 37.0, 16.0]], [[25.0, 14.0, 50.0, 31.0, 14.0], [12.0, -25.0, -12.0, -5.0, -3.0], [22.0, 14.0, -34.0, 
+-43.0, -46.0], [39.0, 2.0, 18.0, 5.0, -13.0]], [[13.0, -59.0, 47.0, 5.0, 71.0], [9.0, 9.0, -28.0, 16.0, 27.0], [28.0, 13.0, 
+-49.0, -55.0, -119.0], [1.0, -34.0, -26.0, -25.0, -17.0]], [[-50.0, 26.0, -25.0, -97.0, -5.0], [41.0, 53.0, -21.0, 63.0, 14.0], 
+[19.0, -54.0, -51.0, -45.0, -48.0], [11.0, -111.0, -25.0, 69.0, 34.0]]], [[[-59.0, 125.0, 47.0, -28.0, -65.0], [47.0, -34.0, 
+9.0, 30.0, -10.0], [25.0, -84.0, -39.0, -75.0, -15.0], [56.0, -45.0, 98.0, 15.0, 13.0]], [[-27.0, -50.0, -66.0, -20.0, -3.0], 
+[16.0, 21.0, -24.0, -6.0, 4.0], [3.0, 22.0, 23.0, 34.0, 39.0], [-39.0, -24.0, -34.0, 53.0, 14.0]], [[-19.0, 178.0, 43.0, -50.0, 
+-77.0], [15.0, -8.0, 1.0, 50.0, 19.0], [-33.0, -80.0, -23.0, -70.0, 24.0], [62.0, -43.0, 101.0, 20.0, 67.0]], [[15.0, -19.0, 
+17.0, 52.0, 10.0], [-11.0, -31.0, -31.0, -28.0, 34.0], [-23.0, 39.0, 34.0, -4.0, 17.0], [-26.0, 36.0, 41.0, -32.0, 16.0]], 
+[[-2.0, -25.0, 1.0, 13.0, 5.0], [-39.0, -3.0, 70.0, -16.0, -35.0], [-3.0, -26.0, 25.0, 54.0, 8.0], [-20.0, 61.0, -19.0, -91.0, 
+-54.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, -3.0, -2.0, -5.0, -6.0], [7.0, 4.0, 6.0, 1.0, -7.0], [1.0, 0.0, 4.0, 0.0, -5.0], 
-[-6.0, -7.0, 7.0, 2.0, 2.0]], [[-3.0, -6.0, -1.0, -5.0, 3.0], [6.0, -3.0, 0.0, 0.0, 7.0], [-7.0, -6.0, 0.0, -2.0, 2.0], [0.0, 
--4.0, 6.0, 6.0, -6.0]], [[-1.0, -4.0, 2.0, -6.0, 5.0], [6.0, -5.0, -2.0, 6.0, 5.0], [4.0, 0.0, 4.0, 6.0, -7.0], [5.0, 6.0, 1.0, 
-2.0, 4.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, -7.0, -1.0, 0.0, 7.0], [-6.0, 3.0, 7.0, -6.0, -2.0], [2.0, 4.0, -2.0, -3.0, 
--2.0], [-6.0, -7.0, 4.0, -2.0, -2.0]], [[-5.0, -2.0, -1.0, 3.0, 7.0], [7.0, 0.0, -4.0, 4.0, -5.0], [-4.0, -3.0, -2.0, 5.0, 
-5.0], [7.0, -7.0, -3.0, -6.0, 3.0]], [[6.0, 4.0, 5.0, 0.0, 1.0], [0.0, 0.0, -6.0, 7.0, 5.0], [-3.0, 7.0, -4.0, -3.0, -3.0], 
-[2.0, -4.0, 7.0, -1.0, 5.0]]])
-      arg1=numpy.array([[[-4.0, -6.0, 7.0, 5.0, 5.0], [6.0, -5.0, 1.0, -7.0, 5.0], [6.0, -4.0, 6.0, -3.0, 4.0], [6.0, 0.0, 
--5.0, 1.0, 2.0]], [[-2.0, 4.0, 3.0, 2.0, 6.0], [0.0, -6.0, -3.0, -4.0, -7.0], [5.0, 0.0, 1.0, -5.0, 7.0], [-7.0, -4.0, 6.0, 
-0.0, 7.0]], [[2.0, 5.0, -1.0, 6.0, 4.0], [4.0, -4.0, -4.0, -7.0, 7.0], [4.0, 1.0, -6.0, 4.0, -2.0], [5.0, 7.0, 1.0, 0.0, 1.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_transposed_tensor_mult_taggedData_rank4_expandedData_rank2(self):
+      arg0=Data(numpy.array([[[[-7.0, 6.0, 6.0, 3.0, -3.0], [4.0, 0.0, 1.0, 3.0, 3.0], [3.0, -7.0, 0.0, -2.0, 2.0], [2.0, 0.0, 
+-7.0, -6.0, 0.0]], [[0.0, 0.0, -5.0, -1.0, 5.0], [6.0, 4.0, 4.0, -4.0, -5.0], [5.0, 5.0, 3.0, 5.0, -4.0], [-7.0, 0.0, 7.0, 
+-5.0, -5.0]], [[1.0, 5.0, -7.0, -4.0, -6.0], [7.0, 0.0, -4.0, -6.0, 5.0], [3.0, -1.0, -7.0, -1.0, -4.0], [7.0, 2.0, -2.0, -1.0, 
+-7.0]]], [[[0.0, 1.0, 1.0, 6.0, -4.0], [5.0, 0.0, 4.0, 6.0, 4.0], [7.0, 0.0, 3.0, 3.0, 5.0], [-5.0, -6.0, -1.0, -1.0, 3.0]], 
+[[0.0, 6.0, 5.0, -4.0, 1.0], [-6.0, 3.0, -2.0, 1.0, -5.0], [0.0, 1.0, 4.0, -5.0, 6.0], [-2.0, -6.0, 2.0, -4.0, -1.0]], [[4.0, 
+-3.0, -4.0, -6.0, 6.0], [4.0, 6.0, -7.0, -1.0, -2.0], [5.0, 1.0, 3.0, -4.0, 2.0], [-6.0, 0.0, -1.0, 0.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, -1.0, 2.0, 7.0, 3.0], [-2.0, -2.0, -4.0, -5.0, 5.0], [-2.0, -5.0, -5.0, -6.0, 
+-4.0], [3.0, 4.0, -1.0, 1.0, -2.0]], [[-6.0, -5.0, -2.0, -6.0, 5.0], [7.0, -7.0, -2.0, 0.0, 2.0], [7.0, 5.0, 4.0, 1.0, 7.0], 
+[-3.0, 6.0, -7.0, 5.0, -7.0]], [[5.0, -2.0, -5.0, 0.0, -3.0], [-3.0, -4.0, -6.0, 0.0, -6.0], [4.0, 6.0, 0.0, 3.0, -1.0], [-2.0, 
+-5.0, 1.0, 3.0, 5.0]]], [[[-2.0, -3.0, -3.0, 0.0, -6.0], [-4.0, -1.0, 2.0, 7.0, 0.0], [0.0, 0.0, -2.0, 1.0, 7.0], [-2.0, 6.0, 
+0.0, 0.0, 2.0]], [[1.0, 0.0, -6.0, -4.0, 2.0], [-7.0, 6.0, 2.0, 7.0, 6.0], [7.0, 7.0, -1.0, -5.0, 4.0], [1.0, -4.0, -2.0, 0.0, 
+-5.0]], [[2.0, 0.0, 0.0, -7.0, 0.0], [-3.0, 5.0, 5.0, -3.0, 7.0], [-2.0, 3.0, -3.0, 5.0, -4.0], [-7.0, 5.0, 7.0, 3.0, 2.0]]]]))
+      arg1=Data(numpy.array([[6.0, 0.0, 5.0], [2.0, -2.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -7.0, 6.0], [7.0, -4.0, 7.0]]))
+      arg1.expand()
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[32.0, 25.0, -57.0, -47.0, -57.0], [-46.0, 57.0, 6.0, 68.0, -21.0], [-61.0, 27.0, -39.0, 32.0, 
--47.0], [-26.0, 5.0, 16.0, -7.0, -36.0]], [[16.0, -26.0, -35.0, -51.0, -67.0], [-34.0, 67.0, 31.0, 73.0, -1.0], [-64.0, 8.0, 
-0.0, 23.0, -46.0], [4.0, -4.0, -25.0, -3.0, -52.0]], [[14.0, 18.0, -19.0, 0.0, -8.0], [-4.0, 8.0, -7.0, 4.0, 11.0], [-9.0, 
-10.0, -25.0, 19.0, -19.0], [5.0, 18.0, 6.0, -2.0, -9.0]], [[18.0, -20.0, -44.0, -71.0, -79.0], [-54.0, 79.0, 34.0, 97.0, 
--32.0], [-79.0, 14.0, 1.0, 16.0, -43.0], [-25.0, -22.0, -11.0, -5.0, -51.0]], [[28.0, 73.0, -38.0, 6.0, 8.0], [-16.0, -8.0, 
--35.0, -5.0, -16.0], [-1.0, 29.0, -63.0, 23.0, -13.0], [-32.0, 23.0, 53.0, -6.0, 14.0]]], [[[-28.0, 12.0, 61.0, 83.0, 95.0], 
-[66.0, -95.0, -35.0, -115.0, 35.0], [96.0, -22.0, 12.0, -27.0, 58.0], [30.0, 18.0, 7.0, 7.0, 62.0]], [[-20.0, -61.0, 24.0, 
--16.0, -18.0], [4.0, 18.0, 33.0, 19.0, 6.0], [-11.0, -21.0, 51.0, -17.0, 5.0], [20.0, -23.0, -43.0, 4.0, -18.0]], [[-28.0, 
--46.0, 44.0, 18.0, 22.0], [28.0, -22.0, 14.0, -28.0, 16.0], [28.0, -26.0, 48.0, -26.0, 28.0], [26.0, -14.0, -32.0, 6.0, 10.0]], 
-[[8.0, 24.0, 1.0, 41.0, 29.0], [30.0, -29.0, -23.0, -49.0, 47.0], [30.0, 2.0, -30.0, 21.0, -8.0], [36.0, 42.0, 1.0, 1.0, 8.0]], 
-[[24.0, 95.0, -33.0, 9.0, 27.0], [-22.0, -27.0, -48.0, -14.0, -49.0], [13.0, 33.0, -65.0, 6.0, 11.0], [-66.0, 7.0, 82.0, -7.0, 
-40.0]]], [[[18.0, -14.0, -18.0, 15.0, -21.0], [22.0, 21.0, 6.0, -7.0, 82.0], [-13.0, 0.0, -25.0, 48.0, -53.0], [75.0, 56.0, 
--43.0, 1.0, -43.0]], [[12.0, -24.0, -18.0, -12.0, -36.0], [0.0, 36.0, 18.0, 24.0, 42.0], [-30.0, 0.0, -6.0, 30.0, -42.0], 
-[42.0, 24.0, -36.0, 0.0, -42.0]], [[-8.0, -4.0, 24.0, 44.0, 36.0], [40.0, -36.0, -12.0, -56.0, 48.0], [40.0, -12.0, 0.0, 4.0, 
-8.0], [44.0, 28.0, -16.0, 4.0, 12.0]], [[16.0, 22.0, -12.0, 32.0, 12.0], [24.0, -12.0, -18.0, -34.0, 56.0], [14.0, 6.0, -38.0, 
-34.0, -26.0], [44.0, 50.0, -6.0, 0.0, -8.0]], [[2.0, 3.0, -22.0, -63.0, -41.0], [-58.0, 41.0, 17.0, 76.0, -88.0], [-48.0, 13.0, 
-14.0, -23.0, 8.0], [-79.0, -57.0, 30.0, -5.0, -3.0]]], [[[34.0, 61.0, -47.0, 0.0, -10.0], [-16.0, 10.0, -26.0, 7.0, 5.0], 
-[-16.0, 29.0, -66.0, 38.0, -34.0], [-11.0, 35.0, 35.0, -6.0, -7.0]], [[48.0, 56.0, -67.0, -7.0, -35.0], [-18.0, 35.0, -19.0, 
-23.0, 35.0], [-38.0, 34.0, -82.0, 65.0, -68.0], [16.0, 58.0, 17.0, -7.0, -36.0]], [[-38.0, -13.0, 66.0, 53.0, 75.0], [46.0, 
--75.0, -15.0, -80.0, 0.0], [76.0, -27.0, 42.0, -47.0, 68.0], [5.0, -17.0, 2.0, 7.0, 57.0]], [[-16.0, 22.0, 30.0, 34.0, 54.0], 
-[20.0, -54.0, -24.0, -52.0, -18.0], [50.0, -6.0, 6.0, -28.0, 46.0], [-20.0, -10.0, 28.0, 2.0, 48.0]], [[12.0, -16.0, -8.0, 
-22.0, -10.0], [28.0, 10.0, 4.0, -18.0, 80.0], [-2.0, -4.0, -18.0, 40.0, -42.0], [74.0, 52.0, -42.0, 2.0, 
--34.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -32.0, 28.0, 61.0, 29.0], [66.0, -29.0, -2.0, -71.0, 112.0], [41.0, -22.0, 1.0, 
-28.0, -19.0], [107.0, 62.0, -59.0, 7.0, -15.0]], [[40.0, 54.0, -59.0, -15.0, -31.0], [-26.0, 31.0, -17.0, 29.0, 7.0], [-36.0, 
-32.0, -68.0, 47.0, -50.0], [-8.0, 36.0, 27.0, -7.0, -24.0]], [[16.0, 27.0, -15.0, 23.0, 9.0], [14.0, -9.0, -18.0, -24.0, 37.0], 
-[9.0, 9.0, -37.0, 28.0, -21.0], [26.0, 39.0, 4.0, -1.0, -4.0]], [[-6.0, 12.0, 9.0, 6.0, 18.0], [0.0, -18.0, -9.0, -12.0, 
--21.0], [15.0, 0.0, 3.0, -15.0, 21.0], [-21.0, -12.0, 18.0, 0.0, 21.0]], [[-40.0, -9.0, 69.0, 55.0, 81.0], [46.0, -81.0, -18.0, 
--84.0, -7.0], [81.0, -27.0, 43.0, -52.0, 75.0], [-2.0, -21.0, 8.0, 7.0, 64.0]]], [[[10.0, 64.0, -21.0, -16.0, 12.0], [-36.0, 
--12.0, -27.0, 14.0, -79.0], [-1.0, 24.0, -29.0, -17.0, 25.0], [-85.0, -28.0, 72.0, -6.0, 37.0]], [[-12.0, -18.0, 21.0, 15.0, 
-15.0], [18.0, -15.0, 3.0, -21.0, 15.0], [18.0, -12.0, 18.0, -9.0, 12.0], [18.0, 0.0, -15.0, 3.0, 6.0]], [[-32.0, -88.0, 43.0, 
--9.0, -13.0], [18.0, 13.0, 43.0, 9.0, 21.0], [-2.0, -34.0, 74.0, -25.0, 12.0], [40.0, -26.0, -65.0, 7.0, -20.0]], [[30.0, 87.0, 
--37.0, 20.0, 22.0], [-8.0, -22.0, -46.0, -23.0, -9.0], [12.0, 31.0, -74.0, 26.0, -10.0], [-29.0, 33.0, 61.0, -6.0, 23.0]], 
-[[28.0, 17.0, -34.0, 10.0, -20.0], [8.0, 20.0, -7.0, -1.0, 60.0], [-17.0, 13.0, -47.0, 51.0, -53.0], [48.0, 55.0, -15.0, -2.0, 
--34.0]]], [[[-6.0, -43.0, 5.0, -16.0, -26.0], [0.0, 26.0, 26.0, 23.0, 17.0], [-20.0, -11.0, 26.0, 2.0, -14.0], [25.0, -5.0, 
--37.0, 2.0, -27.0]], [[4.0, -1.0, 12.0, 56.0, 30.0], [52.0, -30.0, -15.0, -65.0, 90.0], [37.0, -9.0, -21.0, 31.0, -19.0], 
-[80.0, 61.0, -31.0, 4.0, -6.0]], [[4.0, -16.0, -16.0, -38.0, -38.0], [-28.0, 38.0, 20.0, 50.0, -24.0], [-38.0, 4.0, 10.0, 0.0, 
--14.0], [-18.0, -20.0, -6.0, -2.0, -22.0]], [[-4.0, 23.0, -3.0, -23.0, 3.0], [-30.0, -3.0, -6.0, 22.0, -71.0], [-5.0, 9.0, 5.0, 
--28.0, 29.0], [-68.0, -41.0, 42.0, -3.0, 26.0]], [[-8.0, 17.0, 4.0, -18.0, 8.0], [-24.0, -8.0, -5.0, 15.0, -66.0], [1.0, 5.0, 
-11.0, -31.0, 33.0], [-62.0, -41.0, 37.0, -2.0, 28.0]]], [[[14.0, 74.0, -23.0, -4.0, 20.0], [-28.0, -20.0, -35.0, 0.0, -65.0], 
-[7.0, 26.0, -41.0, -9.0, 21.0], [-75.0, -14.0, 74.0, -6.0, 39.0]], [[34.0, -6.0, -66.0, -73.0, -93.0], [-58.0, 93.0, 30.0, 
-105.0, -14.0], [-93.0, 24.0, -25.0, 40.0, -69.0], [-13.0, 0.0, -11.0, -7.0, -67.0]], [[4.0, -1.0, 12.0, 56.0, 30.0], [52.0, 
--30.0, -15.0, -65.0, 90.0], [37.0, -9.0, -21.0, 31.0, -19.0], [80.0, 61.0, -31.0, 4.0, -6.0]], [[18.0, -17.0, -31.0, -28.0, 
--50.0], [-16.0, 50.0, 20.0, 45.0, 25.0], [-46.0, 7.0, -12.0, 32.0, -48.0], [25.0, 17.0, -27.0, -2.0, -47.0]], [[12.0, 49.0, 
--10.0, 26.0, 28.0], [8.0, -28.0, -31.0, -33.0, 4.0], [23.0, 13.0, -39.0, 11.0, 3.0], [-8.0, 23.0, 33.0, -2.0, 22.0]]]])
+      ref=msk_ref*numpy.array([[-9.0, 30.0, -35.0, -24.0, -16.0], [109.0, 36.0, -51.0, -9.0, 47.0], [82.0, -42.0, -16.0, -29.0, 
+4.0], [-1.0, 10.0, -65.0, -35.0, -27.0]])+(1.-msk_ref)*numpy.array([[68.0, 2.0, -13.0, 9.0, -103.0], [-88.0, 29.0, 19.0, 0.0, 
+-25.0], [-67.0, -6.0, -59.0, 73.0, -50.0], [-58.0, 21.0, 112.0, 4.0, 127.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 3.0, -2.0, 1.0, 0.0], [6.0, 6.0, -1.0, 3.0, -3.0], [-4.0, -1.0, 0.0, -4.0, 7.0], 
-[-2.0, 6.0, -3.0, 5.0, 0.0]], [[-2.0, -5.0, -1.0, 7.0, -6.0], [0.0, 1.0, 0.0, -5.0, 5.0], [5.0, -2.0, -5.0, -1.0, -6.0], [-7.0, 
--1.0, -6.0, 6.0, 4.0]], [[-4.0, 7.0, 0.0, 5.0, 7.0], [4.0, 2.0, -6.0, 4.0, 5.0], [-2.0, -1.0, -1.0, 1.0, 7.0], [-3.0, 2.0, 1.0, 
-6.0, 1.0]]], [[[-3.0, -3.0, -6.0, 0.0, 6.0], [2.0, 0.0, 3.0, -1.0, -7.0], [-2.0, -4.0, 0.0, -4.0, 3.0], [5.0, 0.0, 0.0, 0.0, 
-3.0]], [[-6.0, -7.0, 6.0, 0.0, 2.0], [0.0, 3.0, 6.0, -7.0, 4.0], [7.0, 5.0, -1.0, 6.0, -3.0], [5.0, 1.0, -2.0, -5.0, 1.0]], 
-[[-3.0, 4.0, -5.0, 3.0, -3.0], [3.0, 6.0, 7.0, 7.0, 2.0], [-4.0, -1.0, -5.0, -5.0, -3.0], [1.0, -4.0, 0.0, 0.0, 
--2.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 4.0, 1.0, 5.0, 4.0], [-1.0, 1.0, 2.0, -5.0, 0.0], [-6.0, 5.0, 0.0, 0.0, -1.0], 
-[-3.0, -3.0, -6.0, -1.0, 0.0]], [[-1.0, -1.0, 2.0, -3.0, 0.0], [-6.0, 1.0, 7.0, -3.0, 2.0], [-4.0, 0.0, 0.0, 2.0, -7.0], [1.0, 
--2.0, -2.0, 1.0, 0.0]], [[-3.0, -4.0, 7.0, -4.0, -4.0], [5.0, 7.0, 5.0, -7.0, 4.0], [-2.0, 0.0, 3.0, 4.0, -2.0], [-1.0, -4.0, 
-7.0, 1.0, -2.0]]], [[[-4.0, -5.0, 2.0, 1.0, 6.0], [0.0, 5.0, 2.0, -5.0, 0.0], [0.0, -7.0, -1.0, 4.0, -2.0], [2.0, 1.0, 1.0, 
-2.0, 6.0]], [[-7.0, -5.0, -3.0, 6.0, 4.0], [7.0, 6.0, 3.0, -5.0, -4.0], [0.0, -6.0, -6.0, -4.0, -7.0], [5.0, 2.0, -1.0, -4.0, 
--3.0]], [[4.0, 1.0, 2.0, 5.0, 0.0], [-7.0, -6.0, 4.0, 0.0, 4.0], [-5.0, -1.0, 0.0, 2.0, 2.0], [5.0, 4.0, -1.0, -3.0, 4.0]]]])
-      arg1=numpy.array([[[[3.0, -6.0, 5.0, -5.0, -5.0], [-4.0, -7.0, -1.0, 2.0, -4.0], [-1.0, 1.0, -4.0, 0.0, 1.0], [-7.0, 
--6.0, -4.0, -1.0, -1.0]], [[1.0, 3.0, -4.0, -4.0, 4.0], [6.0, -7.0, -1.0, 0.0, -7.0], [-4.0, 4.0, -7.0, -3.0, 4.0], [6.0, -4.0, 
-0.0, 7.0, -2.0]], [[-2.0, 0.0, 1.0, 6.0, 0.0], [-3.0, -3.0, -6.0, 4.0, 7.0], [6.0, 6.0, 2.0, 4.0, 0.0], [2.0, -1.0, 0.0, -3.0, 
--5.0]]], [[[0.0, 7.0, -5.0, 2.0, 0.0], [1.0, 3.0, 0.0, -6.0, 6.0], [4.0, -6.0, 6.0, 0.0, -2.0], [-1.0, -3.0, -1.0, -3.0, 2.0]], 
-[[1.0, 3.0, 5.0, 3.0, 2.0], [6.0, 7.0, 7.0, 1.0, 6.0], [2.0, 0.0, 3.0, -2.0, 7.0], [6.0, 1.0, -2.0, 6.0, 2.0]], [[4.0, 2.0, 
-1.0, 0.0, 7.0], [-3.0, 6.0, 3.0, -3.0, 7.0], [-7.0, 4.0, -2.0, -4.0, 3.0], [7.0, 4.0, 4.0, -4.0, -1.0]]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_transposed_tensor_mult_taggedData_rank4_expandedData_rank3(self):
+      arg0=Data(numpy.array([[[[-2.0, -4.0, 5.0, 3.0, 0.0], [0.0, 2.0, 3.0, -1.0, 7.0], [-1.0, -5.0, -4.0, -5.0, 7.0], [6.0, 
+1.0, -1.0, 3.0, 1.0]], [[-5.0, -3.0, 6.0, -2.0, 7.0], [7.0, 3.0, -1.0, 4.0, -4.0], [0.0, 1.0, 0.0, 3.0, 1.0], [-7.0, 7.0, -4.0, 
+7.0, 2.0]], [[-4.0, 5.0, 2.0, -2.0, 2.0], [3.0, 0.0, -2.0, 7.0, 0.0], [3.0, -3.0, 4.0, -6.0, 1.0], [0.0, -7.0, 0.0, 3.0, 
+-7.0]]], [[[-3.0, 6.0, -6.0, -7.0, 2.0], [-3.0, -2.0, 4.0, 0.0, 3.0], [1.0, -6.0, 0.0, 6.0, -3.0], [-6.0, -3.0, 4.0, 3.0, 
+-3.0]], [[4.0, 5.0, -4.0, 5.0, -5.0], [6.0, -3.0, -1.0, 5.0, 3.0], [5.0, -1.0, -1.0, 0.0, -5.0], [6.0, -1.0, 1.0, 5.0, -4.0]], 
+[[-6.0, 0.0, 6.0, 0.0, 3.0], [-3.0, 6.0, -1.0, -6.0, 7.0], [2.0, 7.0, 0.0, -1.0, -3.0], [0.0, 1.0, 4.0, -7.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -7.0, -4.0, 2.0, 7.0], [0.0, 2.0, -3.0, 4.0, -7.0], [-1.0, -4.0, 5.0, -2.0, 
+-1.0], [5.0, 7.0, 3.0, -7.0, -4.0]], [[1.0, -2.0, 4.0, -6.0, 6.0], [-1.0, -5.0, 0.0, 2.0, -2.0], [-3.0, 7.0, -4.0, -6.0, 0.0], 
+[-5.0, -5.0, -3.0, -4.0, -4.0]], [[-5.0, 2.0, 0.0, -1.0, -3.0], [7.0, -1.0, -5.0, -1.0, -5.0], [7.0, -7.0, 1.0, 7.0, -2.0], 
+[-6.0, -6.0, 2.0, -5.0, -2.0]]], [[[-5.0, -6.0, 6.0, 4.0, 0.0], [-3.0, 5.0, -2.0, -6.0, 2.0], [3.0, 0.0, 0.0, -7.0, -5.0], 
+[4.0, 0.0, -7.0, 6.0, -3.0]], [[-4.0, 6.0, 6.0, -3.0, 0.0], [-6.0, 5.0, -3.0, 0.0, -5.0], [1.0, 1.0, -6.0, -3.0, -3.0], [-5.0, 
+-6.0, -7.0, 3.0, -1.0]], [[7.0, -1.0, -5.0, 3.0, 5.0], [3.0, 3.0, 0.0, -1.0, -6.0], [4.0, 4.0, -6.0, 7.0, 5.0], [0.0, 1.0, 0.0, 
+0.0, -3.0]]]]))
+      arg1=Data(numpy.array([[[-4.0, 3.0], [-7.0, -7.0], [0.0, -6.0]], [[4.0, 1.0], [-7.0, -7.0], [0.0, 
+-2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 3.0], [2.0, -4.0], [0.0, -7.0]], [[-1.0, 7.0], [-3.0, -5.0], [6.0, 6.0]]]))
+      arg1.expand()
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[3.0, -81.0, 11.0, -65.0, -66.0], [-50.0, -78.0, -30.0, 15.0, -109.0], [-24.0, -21.0, -44.0, 
-14.0, -48.0], [-109.0, -27.0, -17.0, -22.0, 4.0]], [[-1.0, -67.0, 26.0, 20.0, -21.0], [-120.0, -41.0, -77.0, 33.0, 40.0], [5.0, 
-59.0, -10.0, 41.0, -48.0], [-48.0, 13.0, 21.0, -108.0, -52.0]], [[-21.0, -25.0, 49.0, 20.0, -17.0], [47.0, 15.0, 30.0, 53.0, 
--20.0], [29.0, 10.0, 7.0, 11.0, 33.0], [15.0, 20.0, -18.0, 69.0, 9.0]], [[12.0, 21.0, -15.0, -3.0, 44.0], [14.0, -53.0, -29.0, 
-13.0, 3.0], [-20.0, 71.0, -49.0, -13.0, 38.0], [66.0, -27.0, 8.0, 21.0, -43.0]], [[-30.0, 24.0, 8.0, 84.0, -41.0], [-30.0, 
-35.0, -31.0, 3.0, 118.0], [115.0, -30.0, 104.0, 54.0, -31.0], [-37.0, -11.0, -22.0, -57.0, -4.0]]], [[[22.0, -16.0, 27.0, -2.0, 
--9.0], [-43.0, -30.0, -21.0, 7.0, 37.0], [5.0, 30.0, -10.0, 4.0, 11.0], [-15.0, -34.0, -14.0, -36.0, -25.0]], [[42.0, -12.0, 
-49.0, -13.0, 22.0], [-24.0, 2.0, 20.0, 5.0, 43.0], [-34.0, 46.0, -30.0, -25.0, 49.0], [28.0, -15.0, -6.0, -11.0, -18.0]], 
-[[43.0, 59.0, 11.0, -7.0, 66.0], [40.0, 118.0, 100.0, -59.0, 65.0], [-60.0, -27.0, 14.0, -64.0, 56.0], [77.0, 37.0, 17.0, 18.0, 
-42.0]], [[17.0, -47.0, 16.0, 6.0, 0.0], [-118.0, -8.0, -50.0, 0.0, 52.0], [-26.0, 41.0, -10.0, 17.0, -43.0], [-35.0, 22.0, 
-31.0, -117.0, -36.0]], [[-2.0, 0.0, 27.0, 23.0, 57.0], [38.0, -10.0, 2.0, 54.0, 8.0], [-21.0, 97.0, -47.0, -11.0, 65.0], 
-[106.0, 26.0, 19.0, 60.0, -40.0]]], [[[-12.0, 38.0, -1.0, 5.0, 26.0], [104.0, 18.0, 48.0, 15.0, -31.0], [6.0, 0.0, -6.0, -21.0, 
-57.0], [70.0, 3.0, -12.0, 109.0, 18.0]], [[-2.0, -15.0, 46.0, 14.0, 0.0], [24.0, 41.0, 41.0, 26.0, 10.0], [4.0, 5.0, 9.0, -4.0, 
-31.0], [20.0, 28.0, -6.0, 36.0, 13.0]], [[-24.0, -28.0, 9.0, 11.0, -57.0], [-18.0, 1.0, -11.0, 10.0, -13.0], [47.0, -46.0, 
-40.0, 33.0, -42.0], [-73.0, 0.0, -18.0, -18.0, 18.0]], [[-29.0, 1.0, 30.0, 40.0, -7.0], [54.0, 32.0, 26.0, 41.0, 7.0], [45.0, 
-2.0, 29.0, 15.0, 27.0], [29.0, 25.0, -12.0, 62.0, 10.0]], [[-14.0, -54.0, 33.0, 28.0, -86.0], [-91.0, -58.0, -73.0, 30.0, 
-42.0], [86.0, -5.0, 43.0, 64.0, -53.0], [-113.0, -49.0, -37.0, -85.0, -27.0]]], [[[2.0, 43.0, 16.0, 45.0, -1.0], [7.0, 128.0, 
-65.0, -44.0, 103.0], [35.0, -74.0, 94.0, -5.0, -2.0], [-2.0, 37.0, -3.0, -27.0, 50.0]], [[-2.0, -44.0, 37.0, -11.0, -60.0], 
-[-18.0, -58.0, -22.0, 33.0, -25.0], [40.0, -2.0, -2.0, 25.0, -3.0], [-66.0, -49.0, -42.0, 3.0, -8.0]], [[-19.0, -6.0, 0.0, 
-39.0, -13.0], [-39.0, 46.0, -11.0, -4.0, 49.0], [29.0, -21.0, 50.0, 26.0, -41.0], [-25.0, 39.0, 16.0, -54.0, 6.0]], [[4.0, 
--27.0, -18.0, -28.0, -11.0], [-32.0, -130.0, -82.0, 29.0, -50.0], [-3.0, 65.0, -65.0, 16.0, -6.0], [-17.0, -65.0, -10.0, -11.0, 
--57.0]], [[-5.0, 32.0, -27.0, -1.0, 4.0], [36.0, -27.0, -9.0, -7.0, -11.0], [18.0, -4.0, -1.0, -2.0, 11.0], [15.0, -33.0, 
--13.0, 30.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[26.0, -68.0, 10.0, -63.0, -10.0], [-71.0, -49.0, -22.0, 1.0, -68.0], 
-[-76.0, 22.0, -68.0, -11.0, -29.0], [-50.0, 4.0, 18.0, -48.0, -13.0]], [[18.0, -75.0, 21.0, -65.0, -27.0], [-48.0, -53.0, 
--11.0, 14.0, -90.0], [-61.0, 10.0, -64.0, -7.0, -22.0], [-60.0, -2.0, 3.0, -18.0, -3.0]], [[-4.0, 9.0, -19.0, 24.0, 11.0], 
-[-35.0, -45.0, -60.0, 9.0, 39.0], [21.0, 47.0, -5.0, 20.0, -10.0], [13.0, -22.0, 8.0, -40.0, -44.0]], [[46.0, -4.0, 63.0, 
--17.0, 10.0], [-4.0, 73.0, 79.0, -21.0, 50.0], [-36.0, -17.0, 7.0, -39.0, 48.0], [9.0, 9.0, -13.0, -1.0, 30.0]], [[24.0, 30.0, 
-6.0, -20.0, -12.0], [26.0, 30.0, 48.0, -40.0, 16.0], [4.0, -56.0, 24.0, -24.0, 20.0], [-18.0, -34.0, -30.0, 14.0, 36.0]]], 
-[[[-40.0, -5.0, 52.0, 80.0, -54.0], [16.0, 41.0, 5.0, 46.0, 74.0], [118.0, -23.0, 91.0, 52.0, 3.0], [-26.0, 4.0, -38.0, 14.0, 
-9.0]], [[-28.0, 38.0, 7.0, 61.0, -31.0], [40.0, -14.0, -20.0, 24.0, 62.0], [111.0, -7.0, 63.0, 37.0, 19.0], [2.0, -50.0, -45.0, 
-30.0, -10.0]], [[22.0, 40.0, -4.0, 5.0, 52.0], [27.0, -27.0, -6.0, 3.0, 36.0], [-14.0, 64.0, -34.0, -23.0, 59.0], [82.0, -32.0, 
-0.0, 28.0, -35.0]], [[-9.0, -29.0, -20.0, -30.0, 3.0], [-12.0, 27.0, 15.0, -13.0, -68.0], [-55.0, -29.0, -18.0, -9.0, -42.0], 
-[-22.0, 59.0, 35.0, -10.0, 26.0]], [[6.0, 2.0, -20.0, 4.0, 28.0], [-36.0, -30.0, -42.0, 0.0, 18.0], [-20.0, 48.0, -26.0, 2.0, 
--8.0], [24.0, 0.0, 24.0, -38.0, -36.0]]], [[[-38.0, 14.0, -21.0, 34.0, -21.0], [21.0, 46.0, 7.0, -5.0, 3.0], [45.0, -54.0, 
-58.0, 24.0, -37.0], [-21.0, 34.0, 4.0, 4.0, 29.0]], [[5.0, -99.0, 29.0, -57.0, -44.0], [-60.0, -104.0, -50.0, 49.0, -105.0], 
-[-38.0, 43.0, -78.0, 16.0, -26.0], [-71.0, -19.0, -5.0, -16.0, -30.0]], [[-12.0, -25.0, -22.0, -2.0, -12.0], [-46.0, -54.0, 
--60.0, 12.0, -21.0], [2.0, 24.0, -18.0, 24.0, -40.0], [-29.0, -6.0, 13.0, -42.0, -29.0]], [[-2.0, 26.0, -42.0, 12.0, 14.0], 
-[-26.0, -30.0, -48.0, -18.0, 28.0], [10.0, 16.0, 2.0, 10.0, -22.0], [6.0, -20.0, 12.0, -42.0, -26.0]], [[-5.0, -46.0, -2.0, 
--4.0, -23.0], [-82.0, 19.0, -23.0, -11.0, -1.0], [-19.0, -21.0, 12.0, 19.0, -68.0], [-65.0, 43.0, 28.0, -86.0, 5.0]]], [[[19.0, 
-60.0, 0.0, 24.0, 64.0], [38.0, 88.0, 58.0, -32.0, 75.0], [-24.0, 3.0, 20.0, -37.0, 47.0], [88.0, 34.0, 20.0, 17.0, 15.0]], 
-[[15.0, 33.0, -2.0, 7.0, 39.0], [13.0, 88.0, 55.0, -38.0, 44.0], [-33.0, -25.0, 22.0, -30.0, 13.0], [40.0, 45.0, 23.0, -6.0, 
-29.0]], [[-39.0, 32.0, -26.0, 79.0, 13.0], [-11.0, 25.0, -44.0, 12.0, 80.0], [65.0, 18.0, 57.0, 40.0, -26.0], [30.0, 29.0, 
-21.0, -34.0, -24.0]], [[-20.0, 5.0, -41.0, -1.0, -20.0], [-6.0, -43.0, -43.0, -5.0, -29.0], [24.0, -15.0, 5.0, 21.0, -38.0], 
-[-32.0, -21.0, -2.0, -13.0, -7.0]], [[17.0, 41.0, -43.0, -9.0, 22.0], [-18.0, 27.0, 3.0, -59.0, 32.0], [-22.0, -32.0, 15.0, 
--18.0, -21.0], [0.0, -3.0, 16.0, -46.0, 12.0]]]])
+      ref=msk_ref*numpy.array([[[3.0, 34.0], [26.0, -50.0], [-58.0, -29.0], [-61.0, -7.0], [-6.0, -30.0]], [[-103.0, -106.0], 
+[-16.0, -8.0], [18.0, 41.0], [-59.0, -96.0], [-9.0, 17.0]], [[-27.0, -59.0], [-4.0, -17.0], [23.0, -29.0], [23.0, 8.0], [-12.0, 
+46.0]], [[-41.0, 19.0], [-58.0, -2.0], [41.0, 14.0], [-84.0, -76.0], [-2.0, 58.0]]])+(1.-msk_ref)*numpy.array([[[61.0, 43.0], 
+[-22.0, -105.0], [-46.0, -46.0], [11.0, 98.0], [42.0, 48.0]], [[37.0, -18.0], [-12.0, 61.0], [11.0, 27.0], [4.0, -37.0], 
+[-27.0, 25.0]], [[12.0, 0.0], [35.0, 28.0], [-26.0, 18.0], [46.0, -23.0], [44.0, 21.0]], [[1.0, 130.0], [14.0, 119.0], [22.0, 
+-7.0], [-23.0, 57.0], [-20.0, -16.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_taggedData_rank4_expandedData_rank4(self):
+      arg0=Data(numpy.array([[[[-1.0, 4.0, 0.0, 4.0, -6.0], [4.0, -3.0, 5.0, 2.0, -7.0], [-3.0, 7.0, 4.0, 6.0, 0.0], [4.0, 
+-6.0, 1.0, 0.0, 1.0]], [[-3.0, 0.0, -3.0, -6.0, -5.0], [-1.0, 7.0, -1.0, -5.0, 3.0], [1.0, -4.0, 0.0, 0.0, -5.0], [1.0, -5.0, 
+7.0, -6.0, -5.0]], [[3.0, 4.0, 1.0, -3.0, -6.0], [7.0, -4.0, -5.0, -6.0, -5.0], [4.0, -1.0, -7.0, -7.0, 0.0], [-3.0, 3.0, 6.0, 
+2.0, -4.0]]], [[[3.0, -7.0, 6.0, 4.0, 6.0], [2.0, 7.0, 2.0, -5.0, 2.0], [-5.0, 7.0, -6.0, 2.0, -5.0], [-4.0, -2.0, -7.0, 1.0, 
+3.0]], [[0.0, 0.0, -4.0, -6.0, 5.0], [-1.0, 5.0, 0.0, 6.0, -6.0], [-5.0, -4.0, -4.0, 4.0, -2.0], [-2.0, 7.0, 5.0, 1.0, 1.0]], 
+[[0.0, 6.0, -2.0, 5.0, -4.0], [-4.0, -1.0, 0.0, -5.0, -4.0], [4.0, 7.0, -7.0, 0.0, -3.0], [-1.0, 5.0, 1.0, -6.0, 
+-7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 3.0, -5.0, 6.0, -3.0], [4.0, -4.0, 5.0, -2.0, 4.0], [-5.0, -6.0, -6.0, -1.0, 
+-1.0], [-7.0, 4.0, 6.0, -3.0, 3.0]], [[5.0, 0.0, -5.0, 7.0, 5.0], [0.0, 0.0, 5.0, -4.0, 0.0], [3.0, -1.0, 7.0, 0.0, -4.0], 
+[-6.0, -7.0, 6.0, 4.0, -4.0]], [[-5.0, 2.0, -6.0, -4.0, 0.0], [6.0, 4.0, -7.0, 3.0, 0.0], [0.0, 2.0, -3.0, -7.0, -3.0], [3.0, 
+1.0, -7.0, -3.0, -1.0]]], [[[7.0, 3.0, -6.0, -6.0, -7.0], [2.0, 1.0, 5.0, -3.0, 7.0], [6.0, 1.0, 5.0, 4.0, -5.0], [-3.0, -2.0, 
+4.0, -7.0, 1.0]], [[7.0, -1.0, -4.0, -7.0, -5.0], [-3.0, 7.0, -5.0, 5.0, -1.0], [0.0, 4.0, 0.0, -5.0, 1.0], [6.0, 6.0, -4.0, 
+6.0, 6.0]], [[0.0, -7.0, 2.0, 5.0, 1.0], [3.0, 0.0, -3.0, -4.0, -7.0], [2.0, -3.0, 0.0, 0.0, 1.0], [7.0, 5.0, 0.0, 6.0, 
+-6.0]]]]))
+      arg1=Data(numpy.array([[[[-2.0, 2.0, -1.0, 0.0, 2.0], [0.0, 4.0, -1.0, -6.0, 0.0], [-6.0, 0.0, 1.0, -5.0, 2.0], [4.0, 
+6.0, 2.0, 5.0, 3.0]], [[4.0, 0.0, -1.0, 6.0, -1.0], [1.0, 0.0, 3.0, 6.0, -1.0], [0.0, -5.0, 7.0, 0.0, -4.0], [4.0, -1.0, -5.0, 
+0.0, -7.0]], [[-5.0, -3.0, 5.0, 4.0, 6.0], [6.0, -7.0, 6.0, 0.0, 6.0], [-7.0, 3.0, 3.0, -6.0, -1.0], [4.0, 4.0, 3.0, -6.0, 
+-4.0]]], [[[7.0, 0.0, -4.0, 0.0, -3.0], [7.0, -5.0, -2.0, 3.0, -5.0], [0.0, 6.0, -2.0, 5.0, -6.0], [7.0, 0.0, 0.0, 0.0, -2.0]], 
+[[-3.0, -7.0, 6.0, -2.0, -1.0], [-5.0, 1.0, 6.0, 0.0, 7.0], [6.0, -1.0, 3.0, 0.0, 1.0], [0.0, 5.0, 1.0, -2.0, -1.0]], [[-1.0, 
+2.0, -3.0, -5.0, 3.0], [-6.0, -1.0, -5.0, -1.0, 6.0], [-1.0, 6.0, 1.0, -6.0, 7.0], [5.0, -7.0, -5.0, 0.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 0.0, 5.0, -6.0, -4.0], [0.0, -6.0, 4.0, -2.0, 6.0], [-1.0, 7.0, -4.0, 4.0, 
+0.0], [5.0, -5.0, -5.0, -6.0, -4.0]], [[-7.0, -6.0, -4.0, 7.0, 1.0], [0.0, 5.0, -2.0, -2.0, 5.0], [4.0, -7.0, -3.0, -7.0, 
+-4.0], [3.0, 1.0, 4.0, 0.0, 6.0]], [[2.0, 1.0, -5.0, -4.0, -7.0], [1.0, -5.0, -7.0, -2.0, -4.0], [-2.0, 0.0, 2.0, -7.0, -2.0], 
+[4.0, 1.0, 1.0, -6.0, -7.0]]], [[[-6.0, 5.0, 0.0, 7.0, -5.0], [0.0, 0.0, -4.0, -1.0, 3.0], [3.0, -6.0, -3.0, -1.0, -5.0], [1.0, 
+-4.0, -6.0, 5.0, -7.0]], [[1.0, 5.0, -5.0, -2.0, 0.0], [-4.0, -6.0, -1.0, 1.0, 3.0], [4.0, 0.0, -3.0, 0.0, 1.0], [-6.0, 3.0, 
+1.0, 4.0, 7.0]], [[-4.0, -7.0, -4.0, -2.0, 6.0], [-3.0, 5.0, -7.0, -3.0, 4.0], [3.0, -6.0, 7.0, 0.0, -2.0], [2.0, 7.0, 4.0, 
+1.0, 1.0]]]]))
+      arg1.expand()
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-4.0, -11.0, 7.0, -6.0, 10.0], [36.0, -40.0, 4.0, -3.0, 6.0], [-15.0, 42.0, -19.0, 2.0, 
+-11.0], [17.0, 9.0, 22.0, -23.0, 0.0]], [[-83.0, 8.0, 26.0, -14.0, 71.0], [-61.0, 17.0, 4.0, -51.0, 95.0], [-58.0, 6.0, 36.0, 
+-115.0, 88.0], [13.0, -2.0, -10.0, -4.0, -26.0]], [[39.0, 21.0, -34.0, 4.0, -11.0], [77.0, -39.0, -29.0, 2.0, -61.0], [-29.0, 
+46.0, -44.0, 36.0, -43.0], [24.0, 1.0, 24.0, 2.0, 21.0]], [[24.0, 69.0, -80.0, -61.0, 5.0], [4.0, 6.0, -109.0, -53.0, -44.0], 
+[-44.0, 81.0, -68.0, -12.0, 40.0], [33.0, -47.0, -2.0, 50.0, 34.0]], [[53.0, -37.0, -1.0, -44.0, -78.0], [0.0, -3.0, -7.0, 
+28.0, -50.0], [112.0, 14.0, -60.0, 120.0, -45.0], [-46.0, -2.0, 20.0, -4.0, 48.0]]], [[[-26.0, -14.0, 30.0, 44.0, 34.0], [84.0, 
+-40.0, 45.0, -20.0, 2.0], [-75.0, 15.0, 7.0, -28.0, -36.0], [34.0, 76.0, 53.0, -20.0, 12.0]], [[89.0, -31.0, -19.0, 21.0, 
+-66.0], [13.0, -13.0, 21.0, 82.0, -37.0], [77.0, -16.0, 34.0, 80.0, -74.0], [44.0, -9.0, -43.0, -1.0, -55.0]], [[25.0, 25.0, 
+-37.0, -26.0, -25.0], [-17.0, 45.0, -42.0, -30.0, -39.0], [5.0, 2.0, -21.0, 15.0, 7.0], [10.0, 11.0, 0.0, 55.0, 38.0]], 
+[[-42.0, -30.0, 44.0, -41.0, -33.0], [-76.0, 86.0, 18.0, -52.0, 6.0], [71.0, -59.0, -28.0, 31.0, 31.0], [-96.0, 58.0, 42.0, 
+34.0, 99.0]], [[87.0, 35.0, -53.0, 30.0, -59.0], [41.0, -5.0, -34.0, 70.0, -109.0], [45.0, -36.0, -27.0, 99.0, -67.0], [-42.0, 
+-67.0, -30.0, 7.0, 4.0]]], [[[-34.0, 25.0, 0.0, 12.0, 49.0], [-9.0, -24.0, -10.0, 5.0, 37.0], [-44.0, 6.0, 15.0, -58.0, 39.0], 
+[-7.0, -56.0, -24.0, -29.0, -41.0]], [[29.0, 59.0, -81.0, -55.0, 16.0], [17.0, -11.0, -98.0, -52.0, -23.0], [-66.0, 105.0, 
+-43.0, -36.0, 34.0], [92.0, -27.0, -8.0, 49.0, 1.0]], [[4.0, 43.0, -18.0, 15.0, -33.0], [-22.0, 98.0, -23.0, -35.0, -82.0], 
+[8.0, -95.0, -24.0, 34.0, -2.0], [-89.0, 25.0, 18.0, 70.0, 98.0]], [[25.0, 5.0, -25.0, -36.0, -40.0], [-48.0, 67.0, -28.0, 
+-30.0, -24.0], [37.0, -13.0, -7.0, 22.0, 11.0], [10.0, 28.0, -5.0, 64.0, 38.0]], [[-46.0, 8.0, 22.0, -11.0, 13.0], [-12.0, 
+26.0, -2.0, -42.0, -2.0], [-9.0, -21.0, -34.0, -7.0, 27.0], [-70.0, 16.0, 38.0, 4.0, 65.0]]], [[[-10.0, 29.0, -13.0, 3.0, 0.0], 
+[-29.0, 56.0, -18.0, -29.0, -19.0], [-14.0, -42.0, 3.0, -16.0, 22.0], [-25.0, 8.0, -3.0, 42.0, 33.0]], [[-63.0, -60.0, 61.0, 
+-57.0, 25.0], [-66.0, -33.0, 30.0, -5.0, 112.0], [52.0, 45.0, -2.0, -28.0, 59.0], [-21.0, -19.0, 4.0, -62.0, -28.0]], [[-69.0, 
+-49.0, 77.0, 51.0, 50.0], [-37.0, 1.0, 95.0, 14.0, 105.0], [-19.0, -58.0, 98.0, -82.0, 22.0], [12.0, 41.0, -15.0, -41.0, 
+-67.0]], [[-24.0, -25.0, 36.0, 0.0, -4.0], [44.0, -12.0, 28.0, -27.0, -16.0], [-2.0, 5.0, -41.0, 29.0, -25.0], [-39.0, 61.0, 
+67.0, -14.0, 67.0]], [[23.0, -7.0, -1.0, -13.0, -48.0], [29.0, 25.0, -5.0, -20.0, -69.0], [35.0, -12.0, -56.0, 76.0, -40.0], 
+[-46.0, 49.0, 51.0, 27.0, 89.0]]]])+(1.-msk_ref)*numpy.array([[[[-74.0, 35.0, 0.0, 54.0, -19.0], [-33.0, -28.0, 14.0, -12.0, 
+123.0], [73.0, -35.0, -91.0, 17.0, -38.0], [-10.0, -37.0, -50.0, 57.0, 41.0]], [[16.0, 61.0, 38.0, 11.0, -83.0], [27.0, -57.0, 
+36.0, 7.0, -12.0], [-23.0, 45.0, -63.0, -5.0, -6.0], [18.0, -77.0, -60.0, -26.0, -61.0]], [[42.0, -40.0, 37.0, -19.0, 99.0], 
+[4.0, 69.0, 46.0, 28.0, -53.0], [-31.0, 24.0, 67.0, 63.0, 54.0], [-42.0, 40.0, 39.0, 22.0, 48.0]], [[-42.0, -146.0, 37.0, -9.0, 
+71.0], [9.0, 86.0, 34.0, -34.0, 68.0], [-1.0, -1.0, 21.0, 9.0, -7.0], [81.0, 11.0, 43.0, -65.0, 44.0]], [[-5.0, -97.0, -14.0, 
+12.0, 58.0], [17.0, 78.0, 4.0, -5.0, -25.0], [-15.0, -20.0, 40.0, -40.0, 8.0], [25.0, 40.0, 76.0, -36.0, 57.0]]], [[[-11.0, 
+-20.0, -7.0, -34.0, -50.0], [9.0, -21.0, -52.0, -34.0, 9.0], [-13.0, -2.0, 20.0, -28.0, -31.0], [70.0, -10.0, -17.0, -59.0, 
+-90.0]], [[5.0, 44.0, -75.0, 1.0, -17.0], [-24.0, -38.0, -55.0, 6.0, -16.0], [27.0, -34.0, 0.0, -45.0, -6.0], [-45.0, 41.0, 
+25.0, 33.0, 30.0]], [[-67.0, -16.0, 77.0, 84.0, -9.0], [22.0, 45.0, 65.0, -7.0, 71.0], [15.0, -12.0, -70.0, 29.0, -30.0], 
+[41.0, -83.0, -59.0, 14.0, -14.0]], [[71.0, 65.0, -18.0, -51.0, -26.0], [-5.0, -73.0, 14.0, 26.0, -54.0], [-21.0, 56.0, -8.0, 
+2.0, 38.0], [-51.0, 8.0, 4.0, -5.0, 15.0]], [[-11.0, 79.0, 53.0, 41.0, -93.0], [25.0, -53.0, 38.0, 5.0, 14.0], [-8.0, 28.0, 
+-83.0, 9.0, -22.0], [19.0, -100.0, -91.0, 0.0, -79.0]]], [[[-70.0, -2.0, -45.0, 89.0, 5.0], [-6.0, 55.0, -64.0, -8.0, 11.0], 
+[41.0, -104.0, 7.0, -47.0, -46.0], [-6.0, 18.0, 9.0, 62.0, -2.0]], [[15.0, 54.0, -44.0, 26.0, -14.0], [-5.0, -18.0, -23.0, 
+22.0, -46.0], [8.0, -23.0, -5.0, -32.0, 5.0], [-54.0, 18.0, 14.0, 42.0, 22.0]], [[-91.0, -20.0, -43.0, 132.0, 27.0], [-3.0, 
+86.0, -37.0, -1.0, 26.0], [55.0, -121.0, -18.0, -57.0, -47.0], [-16.0, 14.0, 25.0, 79.0, 52.0]], [[-44.0, -12.0, 55.0, 72.0, 
+33.0], [13.0, 71.0, 34.0, 7.0, 19.0], [7.0, -31.0, -7.0, 41.0, -11.0], [1.0, -33.0, -31.0, 48.0, -10.0]], [[48.0, -6.0, 17.0, 
+-49.0, 52.0], [-10.0, 0.0, 37.0, 19.0, -22.0], [-17.0, 45.0, 29.0, 50.0, 46.0], [-38.0, 28.0, 21.0, 4.0, 44.0]]], [[[37.0, 5.0, 
+-84.0, -59.0, 58.0], [-42.0, -4.0, -80.0, 8.0, -47.0], [13.0, -31.0, 92.0, -4.0, 25.0], [-66.0, 111.0, 66.0, 40.0, 41.0]], 
+[[53.0, 28.0, -7.0, -113.0, 10.0], [-38.0, -75.0, -10.0, -3.0, 17.0], [-1.0, 59.0, 30.0, 60.0, 32.0], [-25.0, 35.0, -9.0, 
+-11.0, -4.0]], [[-78.0, -43.0, 61.0, 70.0, 11.0], [9.0, 53.0, 49.0, -18.0, 94.0], [28.0, -24.0, -56.0, 27.0, -34.0], [48.0, 
+-59.0, -41.0, 10.0, 5.0]], [[-13.0, -74.0, -70.0, -15.0, 108.0], [-45.0, 47.0, -19.0, -1.0, 35.0], [46.0, -43.0, 39.0, -12.0, 
+19.0], [-46.0, 104.0, 100.0, 31.0, 154.0]], [[53.0, 100.0, 30.0, -35.0, -50.0], [-7.0, -99.0, 59.0, 27.0, -1.0], [-8.0, 79.0, 
+-65.0, 46.0, 31.0], [-48.0, -48.0, -56.0, 11.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[6.0, 0.0, 7.0, 4.0, -6.0], [5.0, -5.0, 7.0, 3.0, 3.0], [0.0, 4.0, -4.0, 1.0, 1.0], [-3.0, 
-7.0, -3.0, -3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[4.0, 0.0, 3.0, 4.0, -1.0], [-7.0, 7.0, -7.0, 5.0, 6.0], [-4.0, -1.0, -1.0, 
--1.0, 7.0], [0.0, -7.0, -2.0, 1.0, -1.0]])
-      arg1=Data(0.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_transposed_tensor_mult_expandedData_rank2_taggedData_rank1(self):
+      arg0=Data(numpy.array([[-7.0, -6.0], [-5.0, 4.0], [4.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, -7.0], [4.0, 3.0], [2.0, 1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([2.0, -4.0, -5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 6.0, -4.0]))
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, 
--0.0, -0.0, 0.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0, 
-0.0], [0.0, -0.0, -0.0, 0.0, -0.0]])
+      ref=msk_ref*numpy.array([-14.0, -23.0])+(1.-msk_ref)*numpy.array([19.0, -7.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, 5.0, -2.0, -3.0, 3.0], [1.0, 4.0, -2.0, 0.0, 4.0], [5.0, 1.0, -2.0, 0.0, 5.0], [7.0, 
--7.0, -3.0, -4.0, -3.0]], [[4.0, 1.0, -2.0, 5.0, -4.0], [7.0, 6.0, -1.0, -7.0, -6.0], [-2.0, 5.0, 5.0, 6.0, 6.0], [0.0, 6.0, 
--6.0, 7.0, 3.0]], [[-5.0, -5.0, -2.0, -3.0, 2.0], [-6.0, -5.0, -1.0, -3.0, -1.0], [-6.0, 6.0, 4.0, 0.0, -1.0], [-7.0, -4.0, 
-0.0, 3.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 1.0, -5.0, 7.0, 2.0], [6.0, 1.0, 1.0, -6.0, 0.0], [-6.0, 1.0, 5.0, 6.0, 
-0.0], [-4.0, 7.0, 5.0, -6.0, 7.0]], [[0.0, -1.0, -5.0, 0.0, 1.0], [4.0, -3.0, 1.0, 0.0, -5.0], [6.0, 0.0, 3.0, -6.0, 0.0], 
-[3.0, 7.0, -7.0, -5.0, 2.0]], [[6.0, 4.0, 0.0, 4.0, 3.0], [3.0, -5.0, 5.0, -7.0, 5.0], [-1.0, 4.0, -7.0, 6.0, -5.0], [2.0, 0.0, 
-0.0, 6.0, 0.0]]])
-      arg1=Data(numpy.array([0.0, -6.0, -6.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+   def test_transposed_tensor_mult_expandedData_rank2_taggedData_rank2(self):
+      arg0=Data(numpy.array([[2.0, -6.0], [-3.0, -3.0], [-7.0, 1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, 7.0], [3.0, -1.0], [2.0, -6.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[4.0, -7.0], [0.0, 0.0], [-2.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, -1.0], [6.0, 0.0], [-3.0, -3.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[6.0, 24.0, 24.0, -12.0, 12.0], [-6.0, -6.0, 12.0, 60.0, 42.0], [48.0, -66.0, -54.0, -36.0, 
--30.0], [42.0, -12.0, 36.0, -60.0, 12.0]])+(1.-msk_ref)*numpy.array([[-36.0, -18.0, 30.0, -24.0, -24.0], [-42.0, 48.0, -36.0, 
-42.0, 0.0], [-30.0, -24.0, 24.0, 0.0, 30.0], [-30.0, -42.0, 42.0, -6.0, -12.0]])
+      ref=msk_ref*numpy.array([[22.0, -63.0], [-26.0, 49.0]])+(1.-msk_ref)*numpy.array([[20.0, -2.0], [-2.0, 11.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-3.0, 7.0, -5.0, -3.0, 3.0], [-2.0, -7.0, 0.0, -5.0, 0.0], [-6.0, 5.0, 6.0, 0.0, 0.0], 
-[1.0, 0.0, -1.0, 3.0, 1.0]], [[0.0, 5.0, -3.0, 1.0, 5.0], [-3.0, -2.0, 2.0, -4.0, -2.0], [0.0, -7.0, 4.0, 5.0, 6.0], [5.0, 1.0, 
-0.0, 0.0, 1.0]], [[4.0, 7.0, -4.0, -3.0, 2.0], [-2.0, 6.0, 5.0, -7.0, 3.0], [6.0, 4.0, -4.0, -6.0, 4.0], [-7.0, -2.0, -4.0, 
--6.0, -5.0]]], [[[-3.0, -4.0, -6.0, -6.0, 4.0], [-6.0, -2.0, -1.0, 1.0, -6.0], [-1.0, 0.0, 7.0, 2.0, 2.0], [-6.0, -7.0, -7.0, 
-6.0, 0.0]], [[0.0, -5.0, -7.0, -4.0, -4.0], [-2.0, 3.0, -7.0, 5.0, -4.0], [3.0, 2.0, 2.0, 5.0, -3.0], [-4.0, 5.0, -2.0, 3.0, 
--4.0]], [[-2.0, 3.0, -2.0, -5.0, 7.0], [3.0, 6.0, -5.0, -3.0, -2.0], [-5.0, 7.0, -5.0, 3.0, 3.0], [2.0, 7.0, -6.0, -6.0, 
-7.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 7.0, -5.0, 6.0, -1.0], [-5.0, -4.0, -4.0, 5.0, -1.0], [-4.0, -4.0, 1.0, 6.0, 0.0], 
-[-5.0, 4.0, 5.0, 1.0, -7.0]], [[7.0, 3.0, 1.0, 0.0, -1.0], [-3.0, 0.0, -6.0, 4.0, 0.0], [0.0, -4.0, -4.0, 5.0, -6.0], [-5.0, 
--3.0, 5.0, 4.0, -7.0]], [[5.0, 0.0, 4.0, -6.0, -1.0], [2.0, 6.0, 0.0, 1.0, -2.0], [-3.0, -4.0, -7.0, -6.0, -1.0], [-4.0, -1.0, 
--5.0, -5.0, 5.0]]], [[[1.0, 5.0, -6.0, -7.0, -4.0], [-2.0, -2.0, 0.0, -7.0, 5.0], [-2.0, -3.0, -1.0, 6.0, -3.0], [0.0, 0.0, 
--4.0, -2.0, 6.0]], [[7.0, 2.0, 2.0, -2.0, -3.0], [1.0, 0.0, -3.0, -6.0, -5.0], [4.0, -2.0, 1.0, 7.0, 0.0], [2.0, -2.0, 0.0, 
-3.0, 3.0]], [[4.0, 6.0, 6.0, 0.0, 4.0], [7.0, 4.0, -4.0, 3.0, 0.0], [4.0, 3.0, 1.0, 4.0, -4.0], [2.0, -2.0, 1.0, 7.0, -2.0]]]])
-      arg1=Data(numpy.array([[-6.0, -4.0, 3.0], [0.0, 4.0, -6.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+   def test_transposed_tensor_mult_expandedData_rank4_taggedData_rank2(self):
+      arg0=Data(numpy.array([[[[-4.0, -6.0, -7.0, 2.0, 3.0], [7.0, 2.0, 6.0, -5.0, -5.0], [-2.0, -3.0, -6.0, -6.0, 1.0], [0.0, 
+-3.0, -7.0, 2.0, -2.0]], [[6.0, 0.0, 0.0, 4.0, -6.0], [6.0, 3.0, 0.0, 7.0, 0.0], [7.0, 2.0, 6.0, 2.0, 0.0], [-4.0, -1.0, 1.0, 
+0.0, 4.0]], [[6.0, 7.0, 0.0, 2.0, -6.0], [-3.0, -7.0, -1.0, -5.0, 0.0], [-4.0, -2.0, 5.0, -2.0, 2.0], [-5.0, 4.0, 0.0, -5.0, 
+-2.0]]], [[[4.0, 1.0, 0.0, -2.0, -5.0], [5.0, 0.0, 0.0, 5.0, -6.0], [4.0, 0.0, 0.0, -1.0, -5.0], [-6.0, 7.0, 1.0, -1.0, 0.0]], 
+[[2.0, -6.0, -1.0, -4.0, 0.0], [2.0, -6.0, -5.0, -6.0, 7.0], [2.0, 6.0, 0.0, -2.0, 6.0], [3.0, 6.0, 7.0, 3.0, 2.0]], [[2.0, 
+6.0, -3.0, 2.0, -1.0], [0.0, -5.0, 0.0, 0.0, -1.0], [2.0, -4.0, 4.0, 1.0, -3.0], [3.0, 4.0, 7.0, 7.0, 
+-2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 0.0, 6.0, 2.0, 1.0], [-1.0, 6.0, 0.0, 7.0, -6.0], [4.0, 2.0, 2.0, 1.0, 1.0], 
+[5.0, -7.0, 2.0, 4.0, -4.0]], [[1.0, -1.0, -6.0, 0.0, -5.0], [3.0, -1.0, 7.0, -1.0, -2.0], [7.0, 2.0, -4.0, -4.0, -1.0], [-6.0, 
+2.0, -1.0, -7.0, 7.0]], [[0.0, -7.0, 5.0, -2.0, -5.0], [-7.0, 3.0, 6.0, -6.0, 5.0], [5.0, -6.0, 1.0, -4.0, 0.0], [3.0, 3.0, 
+1.0, 7.0, -5.0]]], [[[1.0, -2.0, 3.0, -4.0, 1.0], [5.0, -4.0, 0.0, 1.0, 0.0], [-6.0, 1.0, 6.0, -5.0, -4.0], [3.0, 0.0, -3.0, 
+-2.0, 6.0]], [[-3.0, 3.0, 5.0, 4.0, 7.0], [-7.0, 1.0, 4.0, 1.0, 4.0], [6.0, -4.0, 3.0, -4.0, -4.0], [7.0, 5.0, 0.0, 3.0, 6.0]], 
+[[4.0, 3.0, 4.0, 4.0, 4.0], [-3.0, 3.0, 5.0, -1.0, -1.0], [-6.0, 4.0, 1.0, 6.0, 2.0], [-2.0, -6.0, -2.0, -2.0, -4.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[7.0, -3.0, -5.0], [0.0, -2.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 5.0, 3.0], [2.0, -6.0, -6.0]]))
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[42.0, -79.0, 14.0, 19.0, -90.0], [-8.0, 44.0, 9.0, 63.0, 13.0], [96.0, -24.0, -26.0, -36.0, 
--42.0], [-75.0, -32.0, 22.0, 12.0, -83.0]])+(1.-msk_ref)*numpy.array([[-33.0, -82.0, 10.0, -62.0, -29.0], [10.0, 18.0, 60.0, 
--85.0, -20.0], [7.0, 2.0, -13.0, -70.0, 45.0], [34.0, -11.0, -71.0, -67.0, 109.0]])
+      ref=msk_ref*numpy.array([[-70.0, -35.0, -62.0, 10.0, 64.0], [42.0, 27.0, 57.0, -19.0, -54.0], [-9.0, -49.0, -65.0, -29.0, 
+-30.0], [46.0, -30.0, -31.0, 68.0, -30.0]])+(1.-msk_ref)*numpy.array([[-15.0, -66.0, -87.0, -70.0, -108.0], [68.0, -52.0, -1.0, 
+-49.0, 11.0], [22.0, -14.0, -37.0, -58.0, -5.0], [-65.0, 53.0, -4.0, -40.0, 36.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not res.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=transposed_tensor_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 0.0, 5.0, -3.0, 3.0], [3.0, -4.0, -3.0, -6.0, -4.0], [0.0, 1.0, 5.0, -4.0, -1.0], [3.0, 
-0.0, -7.0, -4.0, -2.0]])+(1.-msk_arg0)*numpy.array([[5.0, 6.0, 3.0, 1.0, 4.0], [-7.0, 1.0, 0.0, 0.0, 5.0], [1.0, 4.0, 0.0, 
--4.0, -4.0], [-5.0, -4.0, 7.0, -7.0, 1.0]])
-      arg1=Data(numpy.array([3.0, -7.0]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+   def test_transposed_tensor_mult_expandedData_rank4_taggedData_rank3(self):
+      arg0=Data(numpy.array([[[[4.0, 0.0, 4.0, 0.0, 7.0], [2.0, 0.0, -5.0, 7.0, 6.0], [-1.0, 7.0, 6.0, 5.0, -6.0], [0.0, -7.0, 
+6.0, -5.0, 0.0]], [[6.0, 6.0, 3.0, -1.0, 2.0], [2.0, -7.0, -1.0, 3.0, -6.0], [-6.0, -5.0, 4.0, -5.0, -5.0], [5.0, 4.0, -7.0, 
+-5.0, -1.0]], [[-1.0, 1.0, 3.0, -4.0, 6.0], [-7.0, -6.0, 0.0, -6.0, -7.0], [0.0, -3.0, 0.0, 4.0, 1.0], [0.0, 7.0, -5.0, 4.0, 
+-2.0]]], [[[7.0, 4.0, 0.0, 3.0, -1.0], [-1.0, -3.0, -6.0, -4.0, 7.0], [0.0, 5.0, -7.0, -5.0, 0.0], [2.0, 2.0, -4.0, 1.0, 3.0]], 
+[[0.0, 2.0, 3.0, 3.0, 3.0], [-2.0, 7.0, 2.0, -6.0, -7.0], [5.0, -5.0, -5.0, 3.0, 4.0], [-1.0, -3.0, -5.0, -6.0, 2.0]], [[-3.0, 
+-5.0, -4.0, -3.0, 2.0], [2.0, 3.0, 1.0, 1.0, -5.0], [7.0, 4.0, 5.0, -5.0, -5.0], [-7.0, 7.0, 7.0, -1.0, 
+6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, -1.0, -7.0, -5.0, -4.0], [-4.0, -3.0, -4.0, -6.0, -3.0], [5.0, 6.0, 2.0, 0.0, 
+7.0], [3.0, -7.0, 3.0, -6.0, 3.0]], [[-3.0, 6.0, -4.0, 3.0, 0.0], [-7.0, 7.0, -5.0, -5.0, 0.0], [-6.0, 1.0, -5.0, 3.0, 2.0], 
+[0.0, 4.0, 0.0, -1.0, -2.0]], [[6.0, -1.0, -5.0, 5.0, -4.0], [7.0, 5.0, -7.0, 1.0, 4.0], [0.0, 7.0, -6.0, 0.0, -5.0], [6.0, 
+3.0, 4.0, -6.0, 2.0]]], [[[2.0, 0.0, -3.0, 5.0, 5.0], [6.0, 2.0, 0.0, -3.0, 0.0], [3.0, -6.0, 0.0, 6.0, 2.0], [6.0, 4.0, 2.0, 
+-4.0, 3.0]], [[1.0, -7.0, 4.0, 0.0, 0.0], [0.0, -3.0, -1.0, 4.0, 0.0], [5.0, 2.0, -6.0, -5.0, 7.0], [1.0, 0.0, 1.0, 1.0, 
+-4.0]], [[-1.0, -6.0, -1.0, 3.0, -3.0], [-4.0, -3.0, 7.0, -5.0, 2.0], [-7.0, -7.0, 0.0, -4.0, 0.0], [-5.0, 4.0, 7.0, -5.0, 
+2.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-7.0, -6.0], [1.0, -5.0], [7.0, -4.0]], [[-5.0, -1.0], [6.0, 0.0], [2.0, 
+-4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 6.0], [-6.0, 1.0], [3.0, 0.0]], [[-5.0, 6.0], [-4.0, -2.0], [3.0, -3.0]]]))
+      res=transposed_tensor_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, 0.0], [15.0, -35.0], [-9.0, 21.0], [9.0, -21.0]], [[9.0, -21.0], [-12.0, 
-28.0], [-9.0, 21.0], [-18.0, 42.0], [-12.0, 28.0]], [[0.0, 0.0], [3.0, -7.0], [15.0, -35.0], [-12.0, 28.0], [-3.0, 7.0]], 
-[[9.0, -21.0], [0.0, 0.0], [-21.0, 49.0], [-12.0, 28.0], [-6.0, 14.0]]])+(1.-msk_ref)*numpy.array([[[15.0, -35.0], [18.0, 
--42.0], [9.0, -21.0], [3.0, -7.0], [12.0, -28.0]], [[-21.0, 49.0], [3.0, -7.0], [0.0, 0.0], [0.0, 0.0], [15.0, -35.0]], [[3.0, 
--7.0], [12.0, -28.0], [0.0, 0.0], [-12.0, 28.0], [-12.0, 28.0]], [[-15.0, 35.0], [-12.0, 28.0], [21.0, -49.0], [-21.0, 49.0], 
-[3.0, -7.0]]])
+      ref=msk_ref*numpy.array([[[-70.0, -45.0], [-5.0, -18.0], [6.0, -35.0], [-32.0, 30.0], [22.0, -83.0]], [[-64.0, -1.0], 
+[14.0, 50.0], [78.0, 37.0], [-102.0, -33.0], [-184.0, 35.0]], [[45.0, 8.0], [-122.0, -26.0], [-23.0, -69.0], [21.0, 4.0], 
+[58.0, 77.0]], [[-25.0, 1.0], [88.0, -36.0], [-80.0, -5.0], [15.0, 42.0], [-6.0, -14.0]]])+(1.-msk_ref)*numpy.array([[[23.0, 
+34.0], [-30.0, 32.0], [-2.0, -69.0], [-24.0, -6.0], [-50.0, 15.0]], [[17.0, 17.0], [-37.0, 16.0], [30.0, -48.0], [11.0, -52.0], 
+[15.0, -24.0]], [[-15.0, 53.0], [22.0, 18.0], [38.0, 19.0], [-40.0, 61.0], [-58.0, 42.0]], [[-28.0, 67.0], [-30.0, -26.0], 
+[22.0, 7.0], [-17.0, -48.0], [28.0, 36.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_expandedData_rank4_taggedData_rank4(self):
+      arg0=Data(numpy.array([[[[3.0, 5.0, -3.0, 0.0, 0.0], [5.0, -1.0, 3.0, -5.0, -3.0], [-5.0, -1.0, 0.0, -2.0, 1.0], [-1.0, 
+-6.0, -3.0, 2.0, -1.0]], [[-4.0, -6.0, 2.0, 3.0, 0.0], [1.0, -5.0, 2.0, -4.0, 0.0], [1.0, 6.0, -5.0, 3.0, -7.0], [6.0, 5.0, 
+7.0, 3.0, -7.0]], [[5.0, 1.0, -1.0, -2.0, 5.0], [7.0, 6.0, -1.0, 0.0, -5.0], [5.0, -4.0, -4.0, -7.0, 3.0], [-3.0, -2.0, -5.0, 
+0.0, -5.0]]], [[[0.0, -6.0, -2.0, -2.0, 4.0], [0.0, 3.0, 2.0, 7.0, 3.0], [-1.0, 4.0, 1.0, -5.0, 3.0], [-6.0, -5.0, 5.0, -3.0, 
+0.0]], [[3.0, 1.0, 0.0, -7.0, 4.0], [5.0, 2.0, -7.0, 0.0, 0.0], [-2.0, 3.0, 0.0, 5.0, 0.0], [2.0, -6.0, 2.0, -6.0, -6.0]], 
+[[4.0, 0.0, -5.0, -1.0, 2.0], [-3.0, -4.0, 7.0, -2.0, -3.0], [-3.0, 1.0, -4.0, -3.0, -3.0], [-2.0, 6.0, -6.0, -1.0, 
+4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 4.0, 0.0, -5.0, -5.0], [2.0, -1.0, -5.0, -3.0, 4.0], [6.0, 1.0, 3.0, 7.0, 
+7.0], [-1.0, 0.0, -2.0, -1.0, -7.0]], [[-7.0, -6.0, 5.0, 5.0, 5.0], [3.0, 0.0, -1.0, -6.0, -2.0], [6.0, 0.0, 3.0, 0.0, 7.0], 
+[0.0, -5.0, 4.0, -6.0, 7.0]], [[-4.0, 6.0, 5.0, -4.0, 6.0], [0.0, 0.0, 1.0, -2.0, 2.0], [-6.0, -7.0, 6.0, 4.0, -5.0], [-5.0, 
+4.0, -6.0, -1.0, 0.0]]], [[[-5.0, -1.0, 1.0, 3.0, 1.0], [-7.0, -5.0, -2.0, 3.0, 2.0], [-4.0, -1.0, -2.0, -5.0, 0.0], [5.0, 0.0, 
+-2.0, 2.0, 0.0]], [[-2.0, -2.0, -5.0, 1.0, -1.0], [1.0, 1.0, 0.0, -3.0, -1.0], [-1.0, 2.0, 1.0, -3.0, -3.0], [-4.0, 4.0, 0.0, 
+1.0, -7.0]], [[-6.0, 7.0, 0.0, 6.0, -1.0], [0.0, 0.0, 4.0, 6.0, -4.0], [-1.0, -2.0, 3.0, 0.0, 4.0], [-3.0, 2.0, 6.0, -4.0, 
+7.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-7.0, -5.0, 4.0, 1.0, -4.0], [0.0, 0.0, 5.0, 2.0, 0.0], [0.0, 3.0, 5.0, 0.0, 6.0], [3.0, 0.0, 
+-1.0, 1.0, 4.0]], [[-1.0, -2.0, -3.0, 6.0, 5.0], [2.0, 6.0, 1.0, -3.0, -5.0], [3.0, 4.0, 3.0, 0.0, 0.0], [0.0, -1.0, -4.0, 2.0, 
+-7.0]], [[2.0, -1.0, 2.0, -2.0, 6.0], [-2.0, 1.0, 0.0, -2.0, -2.0], [-1.0, 7.0, 5.0, -5.0, 4.0], [-6.0, -3.0, -3.0, 4.0, 
+4.0]]], [[[4.0, -2.0, 2.0, 7.0, 0.0], [0.0, 0.0, 3.0, 2.0, -4.0], [-4.0, 5.0, -7.0, -7.0, 5.0], [7.0, -2.0, 6.0, 2.0, -4.0]], 
+[[7.0, 4.0, -5.0, 6.0, 6.0], [4.0, -1.0, 7.0, -3.0, -4.0], [-7.0, 2.0, 6.0, 7.0, 0.0], [0.0, -2.0, -6.0, 1.0, 5.0]], [[5.0, 
+7.0, 1.0, -5.0, 2.0], [0.0, 4.0, 0.0, 6.0, 0.0], [-1.0, 4.0, -5.0, -1.0, -5.0], [-5.0, -6.0, 0.0, -1.0, 
+4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 5.0, -5.0, -5.0, -3.0], [3.0, 3.0, 0.0, -5.0, 5.0], [1.0, 5.0, 1.0, 3.0, 1.0], 
+[6.0, 3.0, -6.0, 2.0, 1.0]], [[-3.0, -5.0, 7.0, 1.0, -2.0], [4.0, -7.0, -4.0, -1.0, -6.0], [5.0, 2.0, -6.0, -4.0, 3.0], [6.0, 
+-7.0, -2.0, -5.0, -6.0]], [[-6.0, 1.0, 1.0, 3.0, 3.0], [4.0, -2.0, 6.0, -2.0, 1.0], [0.0, 2.0, -2.0, -3.0, 7.0], [2.0, 3.0, 
+-4.0, -2.0, -7.0]]], [[[-7.0, 7.0, -6.0, -2.0, -6.0], [-3.0, -1.0, 5.0, -5.0, 2.0], [2.0, 3.0, -1.0, -2.0, -4.0], [6.0, -7.0, 
+1.0, -4.0, -6.0]], [[7.0, 0.0, 1.0, 0.0, 6.0], [5.0, 0.0, -5.0, 4.0, -7.0], [-1.0, 0.0, -7.0, 4.0, 5.0], [3.0, 0.0, 0.0, 6.0, 
+-1.0]], [[-2.0, 0.0, 5.0, 3.0, 0.0], [-4.0, 0.0, 6.0, 0.0, -2.0], [4.0, -1.0, 3.0, 0.0, -3.0], [-1.0, 3.0, 0.0, -1.0, -5.0]]]]))
+      res=transposed_tensor_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[34.0, 28.0, 23.0, -33.0, 24.0], [-6.0, -6.0, 32.0, 23.0, -2.0], [-42.0, 50.0, 26.0, -8.0, 
+18.0], [-41.0, -41.0, -20.0, 14.0, 91.0]], [[-44.0, 2.0, 23.0, -69.0, -38.0], [-10.0, -36.0, 8.0, 11.0, 48.0], [-2.0, -30.0, 
+60.0, 44.0, 4.0], [-33.0, 13.0, -26.0, -14.0, 95.0]], [[-16.0, -19.0, -29.0, 22.0, 6.0], [6.0, -9.0, -19.0, -44.0, 0.0], [20.0, 
+-38.0, 25.0, 24.0, -7.0], [8.0, 35.0, -14.0, -2.0, -42.0]], [[-69.0, -35.0, 17.0, -29.0, -41.0], [-18.0, 19.0, -52.0, 6.0, 
+25.0], [69.0, -30.0, -24.0, -24.0, -13.0], [3.0, 27.0, 24.0, -12.0, -60.0]], [[64.0, 17.0, 0.0, 32.0, 58.0], [6.0, 9.0, 40.0, 
+-2.0, -42.0], [-51.0, 71.0, 11.0, -27.0, 30.0], [-12.0, -43.0, -15.0, 30.0, 32.0]]], [[[-2.0, -35.0, 3.0, 42.0, 51.0], [8.0, 
+-4.0, 61.0, -40.0, -39.0], [-36.0, 66.0, 108.0, 3.0, 73.0], [-12.0, -14.0, -60.0, 43.0, 54.0]], [[30.0, -17.0, 15.0, 10.0, 
+19.0], [-14.0, -42.0, 13.0, -23.0, -7.0], [-43.0, 22.0, 21.0, -33.0, 53.0], [2.0, 1.0, 9.0, 25.0, 37.0]], [[-31.0, -1.0, 50.0, 
+-46.0, -36.0], [-22.0, 46.0, -26.0, 69.0, 12.0], [41.0, 34.0, -75.0, -65.0, -11.0], [-6.0, -31.0, 46.0, -7.0, -21.0]], [[57.0, 
+5.0, 4.0, 30.0, -4.0], [-8.0, -32.0, -8.0, 4.0, -8.0], [-38.0, -4.0, -76.0, -47.0, 15.0], [44.0, 2.0, 63.0, 3.0, -28.0]], 
+[[8.0, -7.0, -19.0, 43.0, -24.0], [10.0, -17.0, -6.0, -8.0, -2.0], [-4.0, -41.0, -46.0, 7.0, -8.0], [57.0, 27.0, 36.0, -14.0, 
+-56.0]]], [[[11.0, -9.0, -8.0, -13.0, 37.0], [-16.0, 1.0, -41.0, -37.0, -3.0], [19.0, 3.0, 13.0, -29.0, 0.0], [-37.0, 8.0, 
+-8.0, 16.0, -25.0]], [[35.0, 8.0, -36.0, 84.0, 30.0], [32.0, 33.0, 34.0, -7.0, -50.0], [-16.0, 23.0, -22.0, 12.0, -7.0], [44.0, 
+-14.0, -5.0, 5.0, -59.0]], [[-19.0, -16.0, 5.0, 5.0, -57.0], [-2.0, -50.0, -2.0, 1.0, 29.0], [-11.0, -59.0, -22.0, 17.0, 9.0], 
+[51.0, 39.0, 38.0, -20.0, -1.0]], [[-3.0, 20.0, -69.0, 40.0, 5.0], [40.0, -6.0, 13.0, -42.0, -1.0], [4.0, -70.0, 44.0, 108.0, 
+-50.0], [16.0, 36.0, -49.0, -26.0, -24.0]], [[3.0, -21.0, 34.0, -11.0, -27.0], [-20.0, -51.0, 7.0, 5.0, 17.0], [-33.0, -1.0, 
+-7.0, -33.0, 48.0], [21.0, 10.0, 36.0, 8.0, 41.0]]], [[[-25.0, 2.0, -52.0, 21.0, 24.0], [26.0, 23.0, -3.0, -44.0, -8.0], [33.0, 
+-34.0, 62.0, 73.0, -38.0], [-17.0, 23.0, -62.0, -9.0, -32.0]], [[1.0, 50.0, -17.0, -73.0, 13.0], [-10.0, 58.0, -82.0, 21.0, 
+23.0], [73.0, -25.0, -56.0, -3.0, -99.0], [-71.0, -13.0, -2.0, -26.0, -53.0]], [[8.0, -38.0, -49.0, 126.0, 17.0], [32.0, 11.0, 
+21.0, -49.0, -53.0], [-2.0, -11.0, -12.0, 10.0, 17.0], [86.0, 30.0, 8.0, 9.0, -115.0]], [[-76.0, -41.0, 22.0, -32.0, -31.0], 
+[-18.0, 20.0, -38.0, 1.0, 21.0], [64.0, -13.0, 9.0, -20.0, 2.0], [-10.0, 21.0, 4.0, -3.0, -35.0]], [[-18.0, 28.0, 41.0, -89.0, 
+-89.0], [-28.0, -25.0, -54.0, 71.0, 69.0], [22.0, -62.0, -107.0, -21.0, -46.0], [7.0, 10.0, 80.0, -45.0, 
+11.0]]]])+(1.-msk_ref)*numpy.array([[[[85.0, 31.0, -90.0, -62.0, -1.0], [6.0, 83.0, -47.0, -3.0, 89.0], [-60.0, 4.0, 58.0, 
+63.0, -14.0], [-38.0, 75.0, -17.0, 71.0, 139.0]], [[-35.0, 49.0, -17.0, 15.0, 12.0], [-23.0, 43.0, 107.0, -29.0, 60.0], [2.0, 
+10.0, 64.0, 12.0, 1.0], [-19.0, 100.0, -37.0, 11.0, -29.0]], [[-87.0, -13.0, 29.0, 18.0, -31.0], [12.0, -46.0, 40.0, -40.0, 
+12.0], [32.0, 23.0, -6.0, -57.0, 21.0], [31.0, -27.0, -29.0, -69.0, -66.0]], [[-22.0, -33.0, 69.0, 30.0, -19.0], [-39.0, -45.0, 
+2.0, 17.0, -72.0], [49.0, -20.0, -19.0, -25.0, -43.0], [7.0, -65.0, 39.0, -39.0, -56.0]], [[-68.0, -37.0, 54.0, 43.0, 11.0], 
+[25.0, -63.0, 20.0, -1.0, -38.0], [19.0, 1.0, -44.0, -59.0, 46.0], [16.0, -42.0, -3.0, -56.0, -77.0]]], [[[49.0, -54.0, 54.0, 
+7.0, 36.0], [44.0, -8.0, -52.0, 26.0, -29.0], [2.0, -5.0, -16.0, 12.0, 44.0], [-9.0, 34.0, -25.0, 23.0, 25.0]], [[41.0, -40.0, 
+36.0, 15.0, 39.0], [17.0, 2.0, -30.0, 34.0, -22.0], [-12.0, -20.0, -3.0, 11.0, 24.0], [-33.0, 32.0, 1.0, 24.0, 28.0]], [[-2.0, 
+-33.0, 51.0, 43.0, 32.0], [-25.0, -8.0, 24.0, 34.0, -30.0], [2.0, -35.0, 13.0, -10.0, -5.0], [-50.0, 21.0, 26.0, -3.0, -14.0]], 
+[[-27.0, 34.0, -20.0, 15.0, -21.0], [-89.0, 34.0, 78.0, -2.0, 34.0], [0.0, -28.0, 73.0, 3.0, -80.0], [-55.0, 24.0, 41.0, -8.0, 
+2.0]], [[-15.0, 46.0, -65.0, -32.0, -20.0], [17.0, 20.0, 11.0, -36.0, 53.0], [-17.0, 30.0, 5.0, 6.0, 11.0], [29.0, 6.0, -26.0, 
+4.0, 11.0]]], [[[47.0, -34.0, 24.0, -37.0, -30.0], [29.0, -8.0, -81.0, -8.0, -11.0], [25.0, 19.0, -10.0, 16.0, -4.0], [34.0, 
+-17.0, -28.0, 5.0, 42.0]], [[68.0, -9.0, -14.0, -30.0, -6.0], [-4.0, 18.0, -69.0, 22.0, -14.0], [-11.0, -10.0, -4.0, 34.0, 
+-28.0], [-6.0, -17.0, 21.0, 34.0, 64.0]], [[-27.0, -8.0, 40.0, 19.0, 21.0], [44.0, -22.0, 27.0, -16.0, -14.0], [25.0, 24.0, 
+-23.0, -13.0, 58.0], [36.0, 29.0, -50.0, -10.0, -61.0]], [[-3.0, 4.0, -4.0, -13.0, 3.0], [37.0, 18.0, 14.0, -30.0, 50.0], [0.0, 
+28.0, 25.0, 7.0, 40.0], [11.0, 68.0, -63.0, 8.0, 12.0]], [[-13.0, -5.0, 26.0, -31.0, -68.0], [-2.0, -18.0, -19.0, -44.0, 1.0], 
+[61.0, 35.0, 8.0, -4.0, -34.0], [61.0, -31.0, -36.0, -33.0, -17.0]]], [[[-28.0, 25.0, -49.0, -29.0, -66.0], [-46.0, 2.0, -3.0, 
+-26.0, 34.0], [1.0, 3.0, 23.0, -14.0, -67.0], [5.0, -62.0, 31.0, -33.0, 23.0]], [[15.0, 29.0, -17.0, 13.0, 46.0], [8.0, 27.0, 
+36.0, 13.0, 2.0], [-21.0, -4.0, 0.0, 24.0, 27.0], [-12.0, 53.0, -6.0, 39.0, -12.0]], [[24.0, -50.0, 74.0, 18.0, -8.0], [-32.0, 
+-20.0, -26.0, 28.0, -56.0], [38.0, -26.0, 6.0, 0.0, -42.0], [-18.0, -20.0, 26.0, -10.0, -2.0]], [[24.0, 38.0, -69.0, -20.0, 
+6.0], [-16.0, 39.0, -1.0, 7.0, 35.0], [-44.0, -9.0, 16.0, 24.0, -17.0], [-25.0, 10.0, 24.0, 32.0, 49.0]], [[-91.0, -70.0, 
+112.0, 63.0, -35.0], [-56.0, -70.0, 49.0, 0.0, -42.0], [63.0, -28.0, 21.0, -77.0, -42.0], [-28.0, -49.0, 28.0, -98.0, -77.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_float_rank0_taggedData_rank0_offset0(self):
+      arg0=-7.0
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(14.0,self.functionspace)
+      ref.setTaggedValue(1,28.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_float_rank0_taggedData_rank1_offset0(self):
+      arg0=4.0
+      arg1=Data(numpy.array([4.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 0.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([16.0, 24.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-24.0, 0.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, -2.0, 6.0, 0.0, 2.0], [3.0, -2.0, -4.0, -5.0, 7.0], [-4.0, -5.0, -7.0, 0.0, 6.0], [0.0, 
-1.0, 7.0, 0.0, 5.0]], [[0.0, 7.0, -6.0, 1.0, 4.0], [-5.0, -1.0, 0.0, 4.0, 5.0], [6.0, 3.0, -3.0, -1.0, -2.0], [-2.0, -6.0, 3.0, 
--1.0, 1.0]], [[-1.0, 3.0, 3.0, 0.0, -3.0], [-6.0, -2.0, -2.0, -5.0, 2.0], [-7.0, 4.0, 5.0, 5.0, -7.0], [-3.0, -4.0, 1.0, -7.0, 
-0.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -1.0, -4.0, 3.0, -4.0], [-4.0, 0.0, 0.0, 6.0, 3.0], [-1.0, 7.0, -5.0, 6.0, -6.0], 
-[3.0, -4.0, 0.0, 2.0, 1.0]], [[5.0, -7.0, 2.0, -2.0, 2.0], [4.0, 1.0, 1.0, 0.0, 5.0], [-4.0, -6.0, -4.0, 2.0, 0.0], [6.0, -1.0, 
-2.0, -7.0, -2.0]], [[2.0, 0.0, 4.0, -7.0, 4.0], [1.0, 7.0, 1.0, -1.0, 0.0], [0.0, 0.0, 3.0, -7.0, -2.0], [-6.0, 0.0, 2.0, -3.0, 
--4.0]]])
-      arg1=Data(numpy.array([[6.0, 0.0], [1.0, 7.0], [-7.0, 5.0]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[31.0, -5.0], [-26.0, 64.0], [9.0, -27.0], [1.0, 7.0], [37.0, 13.0]], [[55.0, -65.0], [1.0, 
--17.0], [-10.0, -10.0], [9.0, 3.0], [33.0, 45.0]], [[31.0, 7.0], [-55.0, 41.0], [-80.0, 4.0], [-36.0, 18.0], [83.0, -49.0]], 
-[[19.0, -29.0], [28.0, -62.0], [38.0, 26.0], [48.0, -42.0], [31.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[3.0, 45.0], [-13.0, 
--49.0], [-50.0, 34.0], [65.0, -49.0], [-50.0, 34.0]], [[-27.0, 33.0], [-48.0, 42.0], [-6.0, 12.0], [43.0, -5.0], [23.0, 35.0]], 
-[[-10.0, -28.0], [36.0, -42.0], [-55.0, -13.0], [87.0, -21.0], [-22.0, -10.0]], [[66.0, 12.0], [-25.0, -7.0], [-12.0, 24.0], 
-[26.0, -64.0], [32.0, -34.0]]])
+   def test_generalTransposedTensorProduct_float_rank0_taggedData_rank2_offset0(self):
+      arg0=5.0
+      arg1=Data(numpy.array([[-3.0, -6.0, -1.0, 0.0, 7.0], [-4.0, 2.0, 5.0, -6.0, -3.0], [-3.0, 4.0, -3.0, 3.0, -1.0], [5.0, 
+0.0, 0.0, 5.0, 3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 0.0, -6.0, 0.0, 7.0], [3.0, -6.0, -7.0, 0.0, -6.0], [7.0, -3.0, 6.0, 1.0, 0.0], 
+[5.0, 5.0, -5.0, -6.0, -6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-15.0, -30.0, -5.0, 0.0, 35.0], [-20.0, 10.0, 25.0, -30.0, -15.0], [-15.0, 20.0, -15.0, 15.0, 
+-5.0], [25.0, 0.0, 0.0, 25.0, 15.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[0.0, 0.0, -30.0, 0.0, 35.0], [15.0, -30.0, -35.0, 0.0, -30.0], [35.0, -15.0, 30.0, 
+5.0, 0.0], [25.0, 25.0, -25.0, -30.0, -30.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[1.0, 3.0, 1.0, -6.0, -3.0], [1.0, -6.0, -3.0, -3.0, -4.0], [2.0, -7.0, 2.0, 0.0, 6.0], 
-[0.0, 4.0, -6.0, -6.0, 6.0]], [[-7.0, 0.0, -4.0, -2.0, 0.0], [2.0, 7.0, 1.0, -2.0, 3.0], [0.0, 7.0, 6.0, 4.0, -3.0], [0.0, 3.0, 
--3.0, 0.0, -5.0]], [[-1.0, -5.0, -4.0, -1.0, 6.0], [-2.0, -5.0, -2.0, 5.0, 0.0], [-7.0, -2.0, 6.0, -5.0, -2.0], [0.0, -6.0, 
-0.0, 0.0, -2.0]]], [[[-4.0, -3.0, -4.0, -7.0, 4.0], [-6.0, 6.0, 5.0, -4.0, -3.0], [-6.0, 6.0, 1.0, 5.0, -1.0], [-7.0, 1.0, 7.0, 
-4.0, 2.0]], [[7.0, -2.0, -1.0, -5.0, -4.0], [4.0, 4.0, -4.0, 5.0, 7.0], [5.0, -4.0, -2.0, 6.0, 6.0], [-2.0, -5.0, 2.0, 6.0, 
-7.0]], [[-2.0, 1.0, -3.0, 0.0, 0.0], [-1.0, -6.0, 0.0, 3.0, -1.0], [7.0, 4.0, 5.0, 6.0, 5.0], [-2.0, 1.0, 0.0, 2.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-2.0, 5.0, 0.0, 6.0, -6.0], [3.0, 5.0, 0.0, -6.0, -3.0], [-5.0, 0.0, -6.0, 7.0, -6.0], 
-[7.0, -3.0, -6.0, -1.0, 4.0]], [[-7.0, 3.0, 2.0, -6.0, 5.0], [1.0, 0.0, 4.0, 5.0, -1.0], [-6.0, 3.0, -3.0, 5.0, 0.0], [-4.0, 
--5.0, 7.0, 0.0, -5.0]], [[-4.0, -7.0, 1.0, 5.0, -4.0], [0.0, 0.0, 3.0, 2.0, 2.0], [4.0, -3.0, 1.0, 5.0, 1.0], [7.0, -7.0, 1.0, 
-2.0, 0.0]]], [[[4.0, 7.0, -7.0, 0.0, -7.0], [6.0, -2.0, -4.0, 0.0, -6.0], [6.0, 5.0, 0.0, -6.0, 3.0], [7.0, -2.0, 2.0, 5.0, 
--7.0]], [[2.0, -6.0, 5.0, 6.0, -7.0], [0.0, 7.0, -1.0, 2.0, -5.0], [-2.0, -7.0, -1.0, 2.0, 1.0], [-6.0, -4.0, -1.0, -1.0, 
--6.0]], [[-5.0, 4.0, -1.0, 5.0, -6.0], [7.0, -7.0, -6.0, -7.0, -1.0], [5.0, 0.0, 2.0, 3.0, 0.0], [0.0, 0.0, 2.0, 1.0, 5.0]]]])
-      arg1=Data(numpy.array([[[3.0, -3.0], [0.0, 6.0], [-1.0, 4.0]], [[6.0, 3.0], [-6.0, 5.0], [4.0, 1.0]]]),self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-70.0, -28.0], [12.0, -47.0], [-23.0, -63.0], [-29.0, -44.0], [33.0, 25.0]], [[-59.0, 2.0], 
-[-25.0, 72.0], [47.0, 2.0], [-56.0, 33.0], [-76.0, 55.0]], [[-25.0, -20.0], [57.0, 57.0], [38.0, 52.0], [23.0, 55.0], [-2.0, 
--12.0]], [[-38.0, -33.0], [58.0, -39.0], [12.0, 31.0], [-22.0, 62.0], [-10.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 
--35.0], [116.0, -30.0], [-77.0, 19.0], [-3.0, 1.0], [-38.0, -30.0]], [[73.0, 22.0], [-67.0, 7.0], [-45.0, 13.0], [-60.0, 59.0], 
-[-21.0, -33.0]], [[49.0, 8.0], [75.0, -14.0], [-5.0, 1.0], [-20.0, 24.0], [-7.0, 36.0]], [[92.0, -26.0], [10.0, -75.0], [7.0, 
-67.0], [35.0, 22.0], [26.0, -88.0]]])
+   def test_generalTransposedTensorProduct_float_rank0_taggedData_rank3_offset0(self):
+      arg0=3.0
+      arg1=Data(numpy.array([[[-4.0, -3.0], [2.0, 6.0]], [[0.0, 6.0], [0.0, -1.0]], [[5.0, -7.0], [0.0, -5.0]], [[-1.0, 6.0], 
+[7.0, -5.0]], [[2.0, 4.0], [6.0, 4.0]], [[2.0, -1.0], [-4.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, 5.0], [5.0, 6.0]], [[-2.0, 2.0], [-7.0, -2.0]], [[3.0, 0.0], [-6.0, -4.0]], 
+[[-3.0, -1.0], [-1.0, -7.0]], [[0.0, 0.0], [-4.0, 7.0]], [[3.0, -7.0], [-5.0, 3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-12.0, -9.0], [6.0, 18.0]], [[0.0, 18.0], [0.0, -3.0]], [[15.0, -21.0], [0.0, -15.0]], [[-3.0, 
+18.0], [21.0, -15.0]], [[6.0, 12.0], [18.0, 12.0]], [[6.0, -3.0], [-12.0, -6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[12.0, 15.0], [15.0, 18.0]], [[-6.0, 6.0], [-21.0, -6.0]], [[9.0, 0.0], [-18.0, 
+-12.0]], [[-9.0, -3.0], [-3.0, -21.0]], [[0.0, 0.0], [-12.0, 21.0]], [[9.0, -21.0], [-15.0, 9.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 4.0, -6.0, 7.0, -3.0], [3.0, -6.0, 0.0, -6.0, 0.0], [1.0, 2.0, -3.0, -1.0, 6.0], [2.0, 
--3.0, 7.0, 7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[2.0, 7.0, 7.0, 6.0, -6.0], [-3.0, 6.0, 0.0, -2.0, 1.0], [5.0, 6.0, 0.0, 4.0, 
--6.0], [-5.0, 5.0, 2.0, 3.0, 2.0]])
-      arg1=Data(numpy.array([[-2.0, 4.0, 2.0, 3.0, -7.0], [3.0, 6.0, -2.0, -2.0, -3.0], [-6.0, -1.0, -3.0, 6.0, -4.0], [-2.0, 
--5.0, -5.0, 4.0, -3.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_float_rank0_taggedData_rank4_offset0(self):
+      arg0=-3.0
+      arg1=Data(numpy.array([[[[-5.0, 2.0, 0.0, 5.0], [-5.0, 3.0, -4.0, 0.0], [7.0, 1.0, -5.0, -5.0]], [[3.0, 4.0, -5.0, 2.0], 
+[5.0, -7.0, -1.0, 2.0], [7.0, 7.0, 0.0, -1.0]]], [[[0.0, 1.0, 4.0, 7.0], [1.0, -7.0, 4.0, 2.0], [1.0, 7.0, -1.0, 5.0]], [[-6.0, 
+0.0, -7.0, -3.0], [0.0, -3.0, 1.0, 0.0], [3.0, 6.0, 5.0, -2.0]]], [[[-5.0, 4.0, -3.0, -2.0], [-6.0, 7.0, -5.0, 1.0], [-1.0, 
+0.0, 2.0, 5.0]], [[-2.0, -6.0, 5.0, -6.0], [-7.0, 0.0, 3.0, -7.0], [2.0, 6.0, -3.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -7.0, 1.0, 0.0], [0.0, -4.0, 5.0, 7.0], [1.0, 1.0, 1.0, -5.0]], [[-5.0, -2.0, 
+5.0, 4.0], [0.0, -7.0, -2.0, 2.0], [1.0, 7.0, 0.0, 0.0]]], [[[3.0, -4.0, 3.0, 1.0], [0.0, 3.0, 7.0, -4.0], [2.0, -4.0, 1.0, 
+-1.0]], [[-4.0, 0.0, 5.0, 1.0], [1.0, 0.0, 5.0, -7.0], [-5.0, 5.0, 4.0, -7.0]]], [[[7.0, -6.0, -6.0, -2.0], [-1.0, -6.0, 5.0, 
+-4.0], [0.0, -2.0, -2.0, -6.0]], [[-6.0, -5.0, 2.0, 1.0], [0.0, -4.0, -6.0, -4.0], [-5.0, 0.0, 5.0, 0.0]]]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-8.0, 16.0, 8.0, 12.0, -28.0], [12.0, 24.0, -8.0, -8.0, -12.0], [-24.0, -4.0, -12.0, 24.0, 
--16.0], [-8.0, -20.0, -20.0, 16.0, -12.0]], [[-8.0, 16.0, 8.0, 12.0, -28.0], [12.0, 24.0, -8.0, -8.0, -12.0], [-24.0, -4.0, 
--12.0, 24.0, -16.0], [-8.0, -20.0, -20.0, 16.0, -12.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], [-18.0, -36.0, 12.0, 12.0, 18.0], 
-[36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], [21.0, 42.0, -14.0, -14.0, 
--21.0], [-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[6.0, -12.0, -6.0, -9.0, 21.0], [-9.0, -18.0, 
-6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]]], [[[-6.0, 12.0, 6.0, 9.0, -21.0], [9.0, 18.0, 
--6.0, -6.0, -9.0], [-18.0, -3.0, -9.0, 18.0, -12.0], [-6.0, -15.0, -15.0, 12.0, -9.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], 
-[-18.0, -36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], [-18.0, 
--36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-2.0, 4.0, 2.0, 3.0, -7.0], [3.0, 6.0, -2.0, 
--2.0, -3.0], [-6.0, -1.0, -3.0, 6.0, -4.0], [-2.0, -5.0, -5.0, 4.0, -3.0]], [[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, 
--4.0, -6.0], [-12.0, -2.0, -6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[6.0, -12.0, -6.0, -9.0, 21.0], [-9.0, -18.0, 
-6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]], [[2.0, -4.0, -2.0, -3.0, 7.0], [-3.0, -6.0, 2.0, 
-2.0, 3.0], [6.0, 1.0, 3.0, -6.0, 4.0], [2.0, 5.0, 5.0, -4.0, 3.0]], [[-12.0, 24.0, 12.0, 18.0, -42.0], [18.0, 36.0, -12.0, 
--12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, -18.0]]], [[[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 
-12.0, -4.0, -4.0, -6.0], [-12.0, -2.0, -6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[6.0, -12.0, -6.0, -9.0, 21.0], 
-[-9.0, -18.0, 6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], 
-[21.0, 42.0, -14.0, -14.0, -21.0], [-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[-14.0, 28.0, 14.0, 
-21.0, -49.0], [21.0, 42.0, -14.0, -14.0, -21.0], [-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, -4.0, -6.0], [-12.0, -2.0, -6.0, 12.0, 
--8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], [21.0, 42.0, -14.0, -14.0, -21.0], [-42.0, -7.0, 
--21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[-14.0, 28.0, 14.0, 21.0, -49.0], [21.0, 42.0, -14.0, -14.0, -21.0], 
-[-42.0, -7.0, -21.0, 42.0, -28.0], [-14.0, -35.0, -35.0, 28.0, -21.0]], [[-12.0, 24.0, 12.0, 18.0, -42.0], [18.0, 36.0, -12.0, 
--12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, -18.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], 
-[-18.0, -36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 30.0, -24.0, 18.0]]], [[[6.0, -12.0, -6.0, -9.0, 
-21.0], [-9.0, -18.0, 6.0, 6.0, 9.0], [18.0, 3.0, 9.0, -18.0, 12.0], [6.0, 15.0, 15.0, -12.0, 9.0]], [[-12.0, 24.0, 12.0, 18.0, 
--42.0], [18.0, 36.0, -12.0, -12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, -18.0]], [[0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[4.0, -8.0, -4.0, -6.0, 
-14.0], [-6.0, -12.0, 4.0, 4.0, 6.0], [12.0, 2.0, 6.0, -12.0, 8.0], [4.0, 10.0, 10.0, -8.0, 6.0]], [[-2.0, 4.0, 2.0, 3.0, -7.0], 
-[3.0, 6.0, -2.0, -2.0, -3.0], [-6.0, -1.0, -3.0, 6.0, -4.0], [-2.0, -5.0, -5.0, 4.0, -3.0]]], [[[-10.0, 20.0, 10.0, 15.0, 
--35.0], [15.0, 30.0, -10.0, -10.0, -15.0], [-30.0, -5.0, -15.0, 30.0, -20.0], [-10.0, -25.0, -25.0, 20.0, -15.0]], [[-12.0, 
-24.0, 12.0, 18.0, -42.0], [18.0, 36.0, -12.0, -12.0, -18.0], [-36.0, -6.0, -18.0, 36.0, -24.0], [-12.0, -30.0, -30.0, 24.0, 
--18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-8.0, 
-16.0, 8.0, 12.0, -28.0], [12.0, 24.0, -8.0, -8.0, -12.0], [-24.0, -4.0, -12.0, 24.0, -16.0], [-8.0, -20.0, -20.0, 16.0, 
--12.0]], [[12.0, -24.0, -12.0, -18.0, 42.0], [-18.0, -36.0, 12.0, 12.0, 18.0], [36.0, 6.0, 18.0, -36.0, 24.0], [12.0, 30.0, 
-30.0, -24.0, 18.0]]], [[[10.0, -20.0, -10.0, -15.0, 35.0], [-15.0, -30.0, 10.0, 10.0, 15.0], [30.0, 5.0, 15.0, -30.0, 20.0], 
-[10.0, 25.0, 25.0, -20.0, 15.0]], [[-10.0, 20.0, 10.0, 15.0, -35.0], [15.0, 30.0, -10.0, -10.0, -15.0], [-30.0, -5.0, -15.0, 
-30.0, -20.0], [-10.0, -25.0, -25.0, 20.0, -15.0]], [[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, -4.0, -6.0], [-12.0, -2.0, 
--6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]], [[-6.0, 12.0, 6.0, 9.0, -21.0], [9.0, 18.0, -6.0, -6.0, -9.0], [-18.0, 
--3.0, -9.0, 18.0, -12.0], [-6.0, -15.0, -15.0, 12.0, -9.0]], [[-4.0, 8.0, 4.0, 6.0, -14.0], [6.0, 12.0, -4.0, -4.0, -6.0], 
-[-12.0, -2.0, -6.0, 12.0, -8.0], [-4.0, -10.0, -10.0, 8.0, -6.0]]]])
+      ref=Data(numpy.array([[[[15.0, -6.0, -0.0, -15.0], [15.0, -9.0, 12.0, -0.0], [-21.0, -3.0, 15.0, 15.0]], [[-9.0, -12.0, 
+15.0, -6.0], [-15.0, 21.0, 3.0, -6.0], [-21.0, -21.0, -0.0, 3.0]]], [[[-0.0, -3.0, -12.0, -21.0], [-3.0, 21.0, -12.0, -6.0], 
+[-3.0, -21.0, 3.0, -15.0]], [[18.0, -0.0, 21.0, 9.0], [-0.0, 9.0, -3.0, -0.0], [-9.0, -18.0, -15.0, 6.0]]], [[[15.0, -12.0, 
+9.0, 6.0], [18.0, -21.0, 15.0, -3.0], [3.0, -0.0, -6.0, -15.0]], [[6.0, 18.0, -15.0, 18.0], [21.0, -0.0, -9.0, 21.0], [-6.0, 
+-18.0, 9.0, -12.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-9.0, 21.0, -3.0, -0.0], [-0.0, 12.0, -15.0, -21.0], [-3.0, -3.0, -3.0, 15.0]], 
+[[15.0, 6.0, -15.0, -12.0], [-0.0, 21.0, 6.0, -6.0], [-3.0, -21.0, -0.0, -0.0]]], [[[-9.0, 12.0, -9.0, -3.0], [-0.0, -9.0, 
+-21.0, 12.0], [-6.0, 12.0, -3.0, 3.0]], [[12.0, -0.0, -15.0, -3.0], [-3.0, -0.0, -15.0, 21.0], [15.0, -15.0, -12.0, 21.0]]], 
+[[[-21.0, 18.0, 18.0, 6.0], [3.0, 18.0, -15.0, 12.0], [-0.0, 6.0, 6.0, 18.0]], [[18.0, 15.0, -6.0, -3.0], [-0.0, 12.0, 18.0, 
+12.0], [15.0, -0.0, -15.0, -0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-2.0, 0.0, 1.0, -5.0, -2.0], [-6.0, -4.0, -4.0, -1.0, 0.0], [6.0, 4.0, -5.0, 0.0, 0.0], 
-[-6.0, -6.0, -1.0, -5.0, -3.0]], [[5.0, 4.0, 6.0, 6.0, -3.0], [7.0, -1.0, 2.0, -7.0, -6.0], [-2.0, 0.0, -2.0, 3.0, -4.0], [6.0, 
--1.0, -2.0, -4.0, 6.0]], [[2.0, -4.0, -5.0, 2.0, -2.0], [0.0, 2.0, -7.0, -5.0, -6.0], [-5.0, -2.0, 1.0, 7.0, 4.0], [-3.0, 4.0, 
--2.0, -5.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 7.0, 1.0, 3.0, -7.0], [2.0, -7.0, -4.0, -5.0, -6.0], [-2.0, -1.0, 5.0, 
-5.0, -1.0], [-7.0, -6.0, -1.0, -7.0, -7.0]], [[-6.0, -3.0, 1.0, 3.0, 1.0], [6.0, -7.0, 6.0, 6.0, 0.0], [-6.0, -3.0, -7.0, -2.0, 
-0.0], [0.0, -6.0, 1.0, 0.0, -3.0]], [[4.0, 5.0, -2.0, -4.0, -3.0], [6.0, 1.0, 1.0, 7.0, -3.0], [-1.0, -5.0, 1.0, 4.0, -3.0], 
-[1.0, 4.0, -7.0, 1.0, -1.0]]])
-      arg1=Data(numpy.array([[[0.0, -7.0, 3.0, -5.0, 1.0], [0.0, 2.0, 0.0, 4.0, -7.0], [-4.0, 3.0, -4.0, 0.0, 4.0], [-5.0, 6.0, 
-3.0, 2.0, 3.0]], [[-4.0, -4.0, -5.0, -7.0, 0.0], [6.0, 1.0, 4.0, 2.0, -1.0], [-2.0, -6.0, -5.0, -2.0, -6.0], [-3.0, -6.0, 2.0, 
-0.0, -6.0]], [[3.0, 7.0, 2.0, 7.0, -1.0], [-7.0, -6.0, 7.0, -2.0, -7.0], [-2.0, -2.0, -4.0, -2.0, -1.0], [-2.0, -6.0, 7.0, 
--7.0, 4.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank0_taggedData_rank0_offset0(self):
+      arg0=numpy.array(-2.0)
+      arg1=Data(6.0,self.functionspace)
+      arg1.setTaggedValue(1,6.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-12.0,self.functionspace)
+      ref.setTaggedValue(1,-12.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank1_offset1(self):
+      arg0=numpy.array([2.0, 6.0, -3.0])
+      arg1=Data(numpy.array([5.0, 4.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, 3.0, -4.0]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-14.0, 8.0, -27.0, -11.0, -4.0], [16.0, -11.0, 34.0, -2.0, -5.0], [-6.0, -40.0, -25.0, -14.0, 
--40.0], [-9.0, -54.0, 18.0, -18.0, -28.0]], [[-28.0, -44.0, -28.0, -56.0, 4.0], [52.0, 28.0, -12.0, 16.0, 24.0], [0.0, -16.0, 
--4.0, 0.0, -20.0], [-4.0, 0.0, -20.0, 28.0, -40.0]], [[-39.0, -66.0, -37.0, -82.0, 6.0], [71.0, 38.0, -11.0, 26.0, 22.0], 
-[-6.0, -23.0, -14.0, -2.0, -27.0], [-13.0, 0.0, -20.0, 37.0, -53.0]], [[-18.0, 25.0, -41.0, -3.0, -7.0], [22.0, -16.0, 38.0, 
--12.0, 15.0], [4.0, -55.0, -18.0, -16.0, -58.0], [3.0, -78.0, 11.0, -24.0, -43.0]], [[6.0, 12.0, 5.0, 17.0, 0.0], [-4.0, 5.0, 
--26.0, -10.0, 31.0], [18.0, 16.0, 31.0, 10.0, 12.0], [23.0, 18.0, -26.0, 10.0, 4.0]]], [[[-28.0, 14.0, -53.0, -19.0, -6.0], 
-[42.0, -5.0, 28.0, -10.0, 35.0], [10.0, -60.0, -11.0, -14.0, -66.0], [9.0, -78.0, -4.0, -12.0, -60.0]], [[10.0, 46.0, -3.0, 
-41.0, -6.0], [-20.0, -21.0, 10.0, -22.0, 15.0], [14.0, -10.0, 13.0, -2.0, -12.0], [19.0, -30.0, 0.0, -22.0, 2.0]], [[-29.0, 
--29.0, -36.0, -43.0, 3.0], [61.0, 36.0, -41.0, 2.0, 75.0], [26.0, -10.0, 34.0, 10.0, -21.0], [28.0, 6.0, -57.0, 41.0, -52.0]], 
-[[13.0, 0.0, 22.0, 19.0, 4.0], [-7.0, 21.0, -63.0, -8.0, 49.0], [28.0, 49.0, 59.0, 24.0, 43.0], [36.0, 66.0, -52.0, 33.0, 
-19.0]], [[6.0, -18.0, 18.0, 0.0, 6.0], [6.0, 30.0, -66.0, 0.0, 48.0], [24.0, 48.0, 54.0, 24.0, 42.0], [30.0, 72.0, -54.0, 42.0, 
-12.0]]], [[[-7.0, -69.0, 18.0, -51.0, 11.0], [23.0, 40.0, -43.0, 30.0, -5.0], [-10.0, 40.0, 6.0, 14.0, 41.0], [-14.0, 78.0, 
--21.0, 47.0, 10.0]], [[-6.0, -42.0, 8.0, -34.0, 6.0], [14.0, 20.0, -14.0, 20.0, -14.0], [-12.0, 16.0, -8.0, 4.0, 18.0], [-16.0, 
-36.0, -2.0, 22.0, 4.0]], [[11.0, 50.0, -3.0, 46.0, -6.0], [-19.0, -18.0, -1.0, -26.0, 30.0], [22.0, -5.0, 26.0, 2.0, -9.0], 
-[29.0, -24.0, -12.0, -17.0, 1.0]], [[9.0, 37.0, -1.0, 28.0, -7.0], [-31.0, -39.0, 61.0, -8.0, -52.0], [-20.0, -32.0, -43.0, 
--20.0, -25.0], [-23.0, -60.0, 55.0, -49.0, 10.0]], [[28.0, 44.0, 28.0, 56.0, -4.0], [-52.0, -28.0, 12.0, -16.0, -24.0], [0.0, 
-16.0, 4.0, 0.0, 20.0], [4.0, 0.0, 20.0, -28.0, 40.0]]], [[[-33.0, -3.0, -54.0, -33.0, -3.0], [57.0, 12.0, 3.0, -6.0, 57.0], 
-[18.0, -48.0, 6.0, -6.0, -57.0], [18.0, -54.0, -27.0, 9.0, -66.0]], [[16.0, 74.0, -5.0, 65.0, -10.0], [-34.0, -37.0, 24.0, 
--34.0, 15.0], [18.0, -20.0, 13.0, -6.0, -22.0], [25.0, -54.0, 8.0, -40.0, 4.0]], [[2.0, 1.0, 3.0, 5.0, 1.0], [2.0, 8.0, -22.0, 
--4.0, 23.0], [12.0, 13.0, 22.0, 8.0, 10.0], [15.0, 18.0, -21.0, 12.0, 1.0]], [[1.0, 16.0, -5.0, 18.0, 0.0], [11.0, 16.0, -51.0, 
--18.0, 74.0], [38.0, 19.0, 60.0, 18.0, 9.0], [47.0, 24.0, -58.0, 25.0, -11.0]], [[-33.0, -24.0, -45.0, -48.0, 0.0], [57.0, 
-18.0, 3.0, 6.0, 36.0], [6.0, -39.0, -6.0, -6.0, -45.0], [3.0, -36.0, -18.0, 15.0, -57.0]]]])+(1.-msk_ref)*numpy.array([[[[36.0, 
-24.0, 50.0, 50.0, 0.0], [-64.0, -22.0, 4.0, -4.0, -50.0], [-12.0, 40.0, -2.0, 4.0, 48.0], [-10.0, 36.0, 28.0, -20.0, 64.0]], 
-[[27.0, -2.0, 46.0, 21.0, 2.0], [-53.0, -19.0, 23.0, 12.0, -81.0], [-32.0, 29.0, -33.0, -4.0, 41.0], [-36.0, 30.0, 50.0, -21.0, 
-59.0]], [[-10.0, -25.0, -6.0, -26.0, 3.0], [20.0, 15.0, -10.0, 10.0, 6.0], [-2.0, 1.0, -1.0, 2.0, 0.0], [-4.0, 12.0, -9.0, 
-16.0, -11.0]], [[-24.0, -61.0, -14.0, -64.0, 7.0], [46.0, 33.0, -16.0, 26.0, 4.0], [-10.0, -1.0, -11.0, 2.0, -2.0], [-16.0, 
-24.0, -13.0, 34.0, -25.0]], [[-13.0, 24.0, -32.0, 7.0, -4.0], [27.0, 5.0, -17.0, -20.0, 69.0], [32.0, -21.0, 35.0, 4.0, -31.0], 
-[38.0, -30.0, -40.0, 7.0, -39.0]]], [[[-6.0, 4.0, -12.0, -10.0, -4.0], [-6.0, -26.0, 66.0, 8.0, -62.0], [-32.0, -42.0, -62.0, 
--24.0, -34.0], [-40.0, -60.0, 60.0, -38.0, -6.0]], [[31.0, 84.0, 16.0, 91.0, -8.0], [-49.0, -27.0, -21.0, -44.0, 49.0], [40.0, 
-19.0, 59.0, 12.0, 13.0], [54.0, -6.0, -28.0, -21.0, 25.0]], [[-21.0, 11.0, -40.0, -15.0, -5.0], [29.0, -8.0, 31.0, -6.0, 15.0], 
-[2.0, -50.0, -18.0, -14.0, -53.0], [0.0, -66.0, 7.0, -15.0, -44.0]], [[-3.0, 60.0, -31.0, 32.0, -12.0], [-13.0, -46.0, 73.0, 
--22.0, -20.0], [-6.0, -65.0, -38.0, -26.0, -63.0], [-7.0, -108.0, 46.0, -59.0, -23.0]], [[-9.0, 21.0, -24.0, 9.0, -3.0], [21.0, 
-6.0, -21.0, -18.0, 63.0], [30.0, -12.0, 36.0, 6.0, -21.0], [36.0, -18.0, -39.0, 9.0, -30.0]]], [[[21.0, 31.0, 22.0, 45.0, 
--1.0], [-29.0, -4.0, -31.0, -18.0, 27.0], [22.0, 32.0, 42.0, 14.0, 29.0], [30.0, 30.0, -25.0, 3.0, 26.0]], [[-3.0, -16.0, 2.0, 
--9.0, 4.0], [17.0, 25.0, -47.0, 0.0, 45.0], [20.0, 25.0, 39.0, 16.0, 19.0], [24.0, 42.0, -44.0, 33.0, -5.0]], [[31.0, 0.0, 
-52.0, 31.0, 4.0], [-49.0, -3.0, -21.0, 4.0, -35.0], [-8.0, 55.0, 11.0, 12.0, 61.0], [-6.0, 66.0, 8.0, 3.0, 61.0]], [[20.0, 1.0, 
-33.0, 17.0, 1.0], [-40.0, -16.0, 20.0, 8.0, -61.0], [-24.0, 19.0, -26.0, -4.0, 28.0], [-27.0, 18.0, 39.0, -18.0, 43.0]], 
-[[-9.0, -14.0, -9.0, -16.0, 2.0], [21.0, 16.0, -21.0, 2.0, 28.0], [10.0, 3.0, 16.0, 6.0, -1.0], [11.0, 12.0, -24.0, 19.0, 
--15.0]]], [[[3.0, 56.0, -19.0, 42.0, -8.0], [-7.0, -20.0, 7.0, -30.0, 42.0], [26.0, -23.0, 24.0, -2.0, -29.0], [33.0, -48.0, 
--14.0, -21.0, -17.0]], [[36.0, 94.0, 20.0, 100.0, -10.0], [-64.0, -42.0, 4.0, -44.0, 20.0], [28.0, 10.0, 38.0, 4.0, 8.0], 
-[40.0, -24.0, -2.0, -40.0, 34.0]], [[-25.0, -46.0, -22.0, -51.0, 6.0], [55.0, 41.0, -45.0, 12.0, 55.0], [16.0, 5.0, 27.0, 12.0, 
--3.0], [16.0, 30.0, -50.0, 47.0, -37.0]], [[3.0, 56.0, -19.0, 42.0, -8.0], [-7.0, -20.0, 7.0, -30.0, 42.0], [26.0, -23.0, 24.0, 
--2.0, -29.0], [33.0, -48.0, -14.0, -21.0, -17.0]], [[9.0, 54.0, -8.0, 49.0, -6.0], [-11.0, -11.0, -19.0, -32.0, 59.0], [36.0, 
--1.0, 47.0, 8.0, -9.0], [46.0, -18.0, -34.0, -7.0, -7.0]]]])
+      ref=Data(43.0,self.functionspace)
+      ref.setTaggedValue(1,44.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 0.0, -1.0, -7.0, -2.0], [5.0, 0.0, -2.0, -7.0, 0.0], [2.0, 0.0, 0.0, -5.0, -2.0], 
-[5.0, -6.0, 1.0, -7.0, -5.0]], [[-3.0, 4.0, 0.0, 7.0, -1.0], [7.0, -2.0, 1.0, 7.0, 0.0], [-3.0, 6.0, 2.0, 1.0, -5.0], [5.0, 
-2.0, -4.0, -7.0, 1.0]], [[-3.0, -7.0, 0.0, -5.0, -7.0], [5.0, -2.0, -2.0, -1.0, -2.0], [1.0, -5.0, 0.0, 4.0, 7.0], [-5.0, 0.0, 
--6.0, 1.0, -7.0]]], [[[3.0, 7.0, -6.0, -6.0, 1.0], [1.0, 3.0, 7.0, -1.0, 7.0], [-1.0, 6.0, 7.0, 1.0, 3.0], [-1.0, -5.0, -3.0, 
-0.0, 2.0]], [[0.0, 0.0, 7.0, 3.0, -5.0], [-7.0, -6.0, -3.0, 3.0, 7.0], [2.0, 3.0, 1.0, 0.0, -3.0], [-5.0, 0.0, 5.0, -6.0, 
--5.0]], [[0.0, -3.0, -7.0, 3.0, 0.0], [5.0, 0.0, 1.0, 7.0, 1.0], [-3.0, 7.0, 2.0, 4.0, -7.0], [-5.0, 1.0, 2.0, 3.0, 
--7.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, -1.0, 2.0, 0.0, -4.0], [-5.0, 4.0, 7.0, 5.0, 7.0], [1.0, 6.0, 2.0, -5.0, -5.0], 
-[1.0, 3.0, 6.0, 2.0, 0.0]], [[7.0, 6.0, -7.0, -1.0, -1.0], [2.0, 1.0, 2.0, 1.0, 1.0], [-2.0, 4.0, 0.0, 2.0, -7.0], [-4.0, -7.0, 
--3.0, -6.0, 3.0]], [[-4.0, -1.0, -5.0, -2.0, -1.0], [-7.0, 2.0, 6.0, -7.0, -7.0], [2.0, -1.0, -6.0, 6.0, -5.0], [4.0, 0.0, 
--2.0, 0.0, -1.0]]], [[[1.0, 4.0, 6.0, -2.0, -6.0], [7.0, 3.0, 0.0, 0.0, 0.0], [0.0, -1.0, -1.0, -1.0, -2.0], [-7.0, 2.0, -2.0, 
--3.0, 5.0]], [[-2.0, 1.0, 6.0, -7.0, 1.0], [5.0, -4.0, -4.0, 0.0, 7.0], [-2.0, 0.0, -6.0, 5.0, -5.0], [5.0, 1.0, -4.0, -1.0, 
--3.0]], [[7.0, -5.0, 4.0, 4.0, 0.0], [-3.0, -1.0, -6.0, 5.0, -2.0], [-1.0, 0.0, 3.0, 0.0, -2.0], [2.0, 1.0, 6.0, 3.0, 2.0]]]])
-      arg1=Data(numpy.array([[[[4.0, 3.0, 7.0, 7.0, 5.0], [-1.0, -7.0, -1.0, 5.0, 7.0], [-6.0, -2.0, 5.0, 5.0, -1.0], [6.0, 
--4.0, -6.0, -4.0, 6.0]], [[5.0, -4.0, -1.0, 4.0, -2.0], [-6.0, 7.0, 7.0, -5.0, 0.0], [5.0, 3.0, -5.0, 5.0, -5.0], [2.0, 7.0, 
--2.0, 2.0, 4.0]], [[4.0, 4.0, -4.0, 0.0, -7.0], [-4.0, 3.0, 4.0, 1.0, 2.0], [1.0, -5.0, -6.0, 1.0, 4.0], [4.0, -3.0, -5.0, 
--7.0, 1.0]]], [[[0.0, -3.0, -3.0, 0.0, 2.0], [0.0, 0.0, -4.0, 5.0, 5.0], [7.0, 2.0, 4.0, 0.0, -7.0], [-6.0, -5.0, 1.0, 6.0, 
--3.0]], [[7.0, -1.0, 0.0, -5.0, 6.0], [2.0, 3.0, 0.0, -3.0, 4.0], [4.0, 5.0, 1.0, 7.0, 5.0], [-4.0, 1.0, -7.0, -7.0, 0.0]], 
-[[0.0, 0.0, -1.0, -3.0, 1.0], [-6.0, 0.0, -4.0, 1.0, -5.0], [6.0, -3.0, 2.0, -5.0, 0.0], [0.0, 0.0, 0.0, -7.0, 
--7.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[2.0, -5.0, 2.0], [0.0, 0.0, 3.0]])
+      arg1=Data(numpy.array([[-4.0, -4.0, 4.0], [1.0, -7.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, 6.0, -2.0], [0.0, -5.0, 4.0]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-7.0, 6.0, 41.0, 23.0, 58.0], [25.0, -65.0, -50.0, 52.0, 44.0], [-27.0, 2.0, 70.0, 7.0, 
--23.0], [-6.0, -47.0, -6.0, 13.0, 6.0]], [[-8.0, -65.0, 6.0, 25.0, 52.0], [22.0, 7.0, -16.0, 5.0, 36.0], [44.0, 70.0, 44.0, 
-28.0, -97.0], [-62.0, 14.0, 34.0, 120.0, 9.0]], [[45.0, 8.0, 18.0, -21.0, 18.0], [57.0, 28.0, 53.0, -63.0, 26.0], [-50.0, 46.0, 
--36.0, 79.0, 78.0], [2.0, 41.0, -49.0, -32.0, 61.0]], [[8.0, -54.0, -21.0, -45.0, -5.0], [-27.0, 92.0, 48.0, -111.0, -92.0], 
-[60.0, 54.0, -55.0, 1.0, 9.0], [-24.0, 125.0, 26.0, -1.0, -22.0]], [[-76.0, -28.0, 12.0, 7.0, 13.0], [26.0, -29.0, -37.0, 8.0, 
--43.0], [-13.0, 13.0, 36.0, -57.0, -53.0], [-28.0, 12.0, 85.0, 96.0, -26.0]]], [[[26.0, 11.0, 0.0, 83.0, -59.0], [-111.0, 8.0, 
-40.0, 26.0, -3.0], [19.0, -62.0, -33.0, -9.0, -62.0], [86.0, 2.0, -19.0, -21.0, 25.0]], [[-60.0, -3.0, 1.0, 22.0, -12.0], [8.0, 
--38.0, -34.0, 41.0, -13.0], [-15.0, -20.0, 28.0, -54.0, -49.0], [-6.0, -29.0, 59.0, 70.0, -19.0]], [[-32.0, -36.0, -29.0, 2.0, 
--1.0], [-8.0, 6.0, -31.0, 28.0, 0.0], [58.0, 13.0, 24.0, -33.0, -75.0], [-48.0, -17.0, 48.0, 80.0, -38.0]], [[24.0, -53.0, 
--56.0, -57.0, -19.0], [-67.0, 104.0, 28.0, -78.0, -79.0], [123.0, 32.0, -51.0, -15.0, -10.0], [-38.0, 88.0, 11.0, -27.0, 
--61.0]], [[41.0, -36.0, -14.0, -38.0, 71.0], [16.0, 15.0, -40.0, 13.0, 54.0], [81.0, 56.0, 49.0, 42.0, -22.0], [-78.0, -22.0, 
--32.0, 0.0, -30.0]]], [[[11.0, 23.0, 19.0, 1.0, 16.0], [34.0, -26.0, -3.0, 12.0, 34.0], [-43.0, -1.0, 11.0, 25.0, 34.0], [8.0, 
--25.0, -26.0, -20.0, 25.0]], [[31.0, -65.0, -11.0, -12.0, 60.0], [-52.0, 36.0, -30.0, -7.0, -3.0], [121.0, 49.0, 41.0, 11.0, 
--77.0], [-56.0, 30.0, -2.0, 13.0, -48.0]], [[17.0, -30.0, -25.0, -3.0, 18.0], [-22.0, 17.0, -22.0, 24.0, 29.0], [75.0, 19.0, 
-23.0, 7.0, -54.0], [-42.0, -20.0, -4.0, 25.0, -27.0]], [[1.0, -6.0, -59.0, -43.0, -49.0], [-41.0, 54.0, 8.0, -17.0, -42.0], 
-[70.0, -17.0, -42.0, -36.0, 9.0], [-18.0, 10.0, 9.0, -28.0, -53.0]], [[-26.0, 36.0, -39.0, 2.0, -68.0], [40.0, -9.0, 11.0, 
-39.0, 38.0], [-39.0, -34.0, -32.0, -14.0, 19.0], [0.0, -66.0, 11.0, 37.0, 15.0]]], [[[-10.0, -17.0, 58.0, 95.0, 13.0], [5.0, 
--30.0, 34.0, 0.0, 25.0], [-67.0, 18.0, 11.0, 35.0, -68.0], [46.0, 30.0, 19.0, 89.0, 83.0]], [[-14.0, -11.0, -30.0, -37.0, 
--43.0], [-12.0, 56.0, 36.0, -64.0, -72.0], [17.0, 5.0, -58.0, -25.0, 31.0], [-2.0, 63.0, 27.0, -9.0, -20.0]], [[-5.0, -1.0, 
-42.0, -40.0, 81.0], [45.0, -38.0, -49.0, -9.0, -10.0], [-21.0, 29.0, 58.0, 4.0, 41.0], [-28.0, 6.0, -6.0, -37.0, -21.0]], 
-[[-101.0, 17.0, -49.0, -56.0, -61.0], [15.0, -15.0, -50.0, 22.0, -86.0], [2.0, -51.0, -6.0, -126.0, 16.0], [-28.0, -30.0, 93.0, 
-28.0, -90.0]], [[-78.0, -48.0, -7.0, 15.0, -11.0], [59.0, 6.0, 4.0, -19.0, -24.0], [-20.0, 48.0, 1.0, -27.0, -67.0], [-48.0, 
-33.0, 100.0, 167.0, 10.0]]]])+(1.-msk_ref)*numpy.array([[[[33.0, -24.0, 48.0, 66.0, 46.0], [-79.0, -18.0, -6.0, 14.0, 3.0], 
-[30.0, -2.0, 40.0, 17.0, -75.0], [42.0, 26.0, -21.0, -15.0, 14.0]], [[29.0, -44.0, -16.0, 27.0, -1.0], [1.0, 49.0, 43.0, -24.0, 
-40.0], [37.0, 53.0, -22.0, 56.0, -56.0], [-26.0, 30.0, -4.0, 75.0, 40.0]], [[-5.0, -10.0, 19.0, -56.0, 111.0], [48.0, -60.0, 
--111.0, 56.0, 38.0], [38.0, 30.0, 113.0, -8.0, 1.0], [-82.0, -66.0, -9.0, -21.0, -67.0]], [[-62.0, 9.0, 11.0, 19.0, -26.0], 
-[-24.0, -34.0, -23.0, 18.0, -62.0], [-25.0, -44.0, 10.0, -76.0, -24.0], [30.0, 2.0, 59.0, 21.0, -28.0]], [[-18.0, 5.0, -5.0, 
--37.0, -17.0], [16.0, 21.0, 17.0, -49.0, -56.0], [-20.0, 3.0, -32.0, -19.0, 52.0], [2.0, 43.0, 18.0, -22.0, -11.0]]], [[[-3.0, 
--77.0, -27.0, -43.0, 61.0], [49.0, 43.0, -25.0, -25.0, 21.0], [84.0, 99.0, 34.0, 28.0, -57.0], [-116.0, 25.0, 33.0, 101.0, 
--29.0]], [[1.0, 11.0, 11.0, 55.0, -15.0], [-20.0, -27.0, 3.0, 43.0, 36.0], [-18.0, -26.0, 9.0, 4.0, -42.0], [32.0, -34.0, -5.0, 
-25.0, 28.0]], [[34.0, 41.0, 29.0, 95.0, -41.0], [-15.0, -29.0, 55.0, 37.0, 75.0], [-78.0, -40.0, -27.0, 53.0, -13.0], [86.0, 
--36.0, -48.0, 4.0, 98.0]], [[-3.0, -17.0, 57.0, 24.0, 77.0], [-13.0, -49.0, -46.0, 18.0, -4.0], [-2.0, 13.0, 72.0, -2.0, 
--38.0], [4.0, 8.0, 3.0, -4.0, -8.0]], [[54.0, -18.0, 78.0, 24.0, 122.0], [41.0, -42.0, -20.0, 0.0, 73.0], [-28.0, 65.0, 75.0, 
-92.0, -5.0], [-12.0, 7.0, -58.0, -12.0, 53.0]]], [[[-12.0, 21.0, 2.0, 12.0, -18.0], [5.0, -21.0, -3.0, 22.0, 8.0], [-28.0, 
--25.0, -1.0, -12.0, 7.0], [18.0, -26.0, 2.0, -1.0, 7.0]], [[40.0, 1.0, 45.0, 58.0, 27.0], [-26.0, -17.0, 22.0, 4.0, 35.0], 
-[-24.0, 3.0, 12.0, 49.0, -23.0], [46.0, 12.0, -40.0, -15.0, 54.0]], [[-58.0, -9.0, 38.0, 35.0, 17.0], [-8.0, -50.0, -34.0, 
-20.0, -42.0], [-31.0, -15.0, 42.0, -53.0, -49.0], [18.0, 9.0, 59.0, 49.0, -12.0]], [[49.0, -1.0, -58.0, -52.0, -43.0], [-21.0, 
-82.0, 47.0, -49.0, -8.0], [59.0, 9.0, -70.0, 26.0, 51.0], [-16.0, 26.0, -40.0, -59.0, -13.0]], [[-110.0, 4.0, 0.0, -32.0, 
--12.0], [69.0, -44.0, -48.0, 8.0, -65.0], [-56.0, -9.0, 23.0, -90.0, 9.0], [-32.0, -9.0, 102.0, 78.0, -43.0]]], [[[35.0, 51.0, 
-14.0, -40.0, 3.0], [5.0, -8.0, 7.0, -19.0, -10.0], [-39.0, -29.0, -18.0, 14.0, 109.0], [36.0, -4.0, -60.0, -131.0, 1.0]], 
-[[-16.0, 30.0, 21.0, -15.0, 40.0], [35.0, -67.0, -64.0, 58.0, 30.0], [-29.0, -21.0, 61.0, -18.0, 23.0], [-12.0, -70.0, -9.0, 
--28.0, -23.0]], [[-27.0, 32.0, 53.0, 32.0, 28.0], [-24.0, -81.0, -51.0, 51.0, -18.0], [-47.0, -53.0, 57.0, -45.0, -5.0], [50.0, 
--33.0, 6.0, -42.0, -14.0]], [[-29.0, 40.0, 26.0, -14.0, 13.0], [14.0, -59.0, -44.0, 31.0, -20.0], [-49.0, -42.0, 33.0, -42.0, 
-44.0], [22.0, -36.0, 4.0, -52.0, -24.0]], [[-10.0, -28.0, -16.0, 21.0, -5.0], [-32.0, 9.0, -11.0, 20.0, 1.0], [49.0, 3.0, 12.0, 
--17.0, -69.0], [-16.0, -4.0, 25.0, 50.0, -18.0]]]])
+      ref=Data(41.0,self.functionspace)
+      ref.setTaggedValue(1,-10.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank3_offset3(self):
+      arg0=numpy.array([[[3.0, -7.0, 0.0], [3.0, -7.0, -4.0], [-6.0, 3.0, -6.0], [4.0, -7.0, -4.0]], [[6.0, 0.0, 5.0], [6.0, 
+7.0, -2.0], [6.0, -7.0, 2.0], [-3.0, -4.0, -4.0]]])
+      arg1=Data(numpy.array([[[5.0, -2.0, -5.0], [6.0, 0.0, 7.0], [-6.0, 2.0, 1.0], [-6.0, 3.0, 5.0]], [[-5.0, 7.0, -1.0], 
+[2.0, 3.0, -4.0], [-3.0, -6.0, 0.0], [-7.0, -5.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, -4.0, 4.0], [3.0, 4.0, 2.0], [6.0, 1.0, 6.0], [3.0, 6.0, -4.0]], [[3.0, -2.0, 
+-2.0], [-2.0, 3.0, 2.0], [-7.0, -3.0, 1.0], [1.0, 4.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(61.0,self.functionspace)
+      ref.setTaggedValue(1,-119.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 7.0, 0.0, 5.0, -3.0], [4.0, 6.0, 5.0, 2.0, 0.0], [-6.0, 2.0, 0.0, 4.0, 3.0], [0.0, 0.0, 
-5.0, 3.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -4.0, 0.0, 0.0, -7.0], [-6.0, 2.0, 2.0, 0.0, -7.0], [-7.0, 0.0, 0.0, -7.0, 
-1.0], [2.0, 0.0, -5.0, -3.0, 6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(-6.0)
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank4_offset4(self):
+      arg0=numpy.array([[[[3.0, -6.0], [-6.0, -6.0], [-7.0, -5.0]], [[0.0, -7.0], [-5.0, 3.0], [-5.0, 5.0]]], [[[-7.0, 4.0], 
+[2.0, -6.0], [1.0, 6.0]], [[-3.0, 2.0], [1.0, 2.0], [7.0, 2.0]]], [[[3.0, 4.0], [1.0, 0.0], [-4.0, 2.0]], [[6.0, 0.0], [2.0, 
+-7.0], [1.0, 4.0]]], [[[0.0, -1.0], [3.0, -2.0], [-4.0, 7.0]], [[2.0, -4.0], [4.0, 1.0], [-6.0, -3.0]]]])
+      arg1=Data(numpy.array([[[[-1.0, -5.0], [-6.0, 3.0], [1.0, 4.0]], [[-4.0, 4.0], [-5.0, 7.0], [-4.0, 2.0]]], [[[-3.0, 
+-5.0], [7.0, -1.0], [6.0, 2.0]], [[-6.0, -2.0], [5.0, -4.0], [-1.0, 7.0]]], [[[4.0, 4.0], [-4.0, 0.0], [7.0, 7.0]], [[5.0, 
+-7.0], [-6.0, 1.0], [-1.0, -6.0]]], [[[6.0, -3.0], [-3.0, 6.0], [7.0, 5.0]], [[4.0, -5.0], [-4.0, 2.0], [3.0, 
+1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, -1.0], [-7.0, -6.0], [-4.0, -7.0]], [[5.0, 7.0], [-1.0, -6.0], [-3.0, 1.0]]], 
+[[[-3.0, -5.0], [-2.0, 0.0], [2.0, -6.0]], [[2.0, 0.0], [-7.0, -7.0], [1.0, -3.0]]], [[[6.0, -4.0], [-2.0, -1.0], [7.0, 3.0]], 
+[[1.0, 0.0], [-1.0, 5.0], [0.0, 7.0]]], [[[-5.0, 1.0], [7.0, -2.0], [5.0, -3.0]], [[5.0, -7.0], [0.0, 0.0], [1.0, -1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(101.0,self.functionspace)
+      ref.setTaggedValue(1,26.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank0_taggedData_rank1_offset0(self):
+      arg0=numpy.array(0.0)
+      arg1=Data(numpy.array([7.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, 5.0]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-16.0, -28.0, -0.0, -20.0, 12.0], [-16.0, -24.0, -20.0, -8.0, -0.0], [24.0, -8.0, -0.0, -16.0, 
--12.0], [-0.0, -0.0, -20.0, -12.0, 24.0]])+(1.-msk_ref)*numpy.array([[18.0, 24.0, -0.0, -0.0, 42.0], [36.0, -12.0, -12.0, -0.0, 
-42.0], [42.0, -0.0, -0.0, 42.0, -6.0], [-12.0, -0.0, 30.0, 18.0, -36.0]])
+      ref=Data(numpy.array([0.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([0.0, 0.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-3.0, 6.0, 3.0, 7.0, 3.0], [-1.0, -5.0, -1.0, -7.0, 7.0], [-6.0, -6.0, 6.0, 7.0, 7.0], 
-[-1.0, 2.0, -6.0, 7.0, 2.0]], [[5.0, 6.0, -1.0, 7.0, -6.0], [7.0, 2.0, 7.0, -7.0, 5.0], [-2.0, 0.0, -6.0, 7.0, -2.0], [-5.0, 
--7.0, 7.0, -3.0, 3.0]], [[-6.0, -5.0, -6.0, 3.0, -7.0], [-5.0, 0.0, -6.0, 7.0, -2.0], [-2.0, 7.0, 3.0, 1.0, 2.0], [-2.0, 0.0, 
-3.0, 0.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, -3.0, -1.0, -6.0, 1.0], [1.0, -7.0, -1.0, -2.0, 7.0], [-3.0, 4.0, 0.0, 
--4.0, -6.0], [3.0, -6.0, -1.0, -1.0, 2.0]], [[-3.0, -3.0, -4.0, -6.0, 0.0], [-5.0, -7.0, -3.0, 0.0, -5.0], [-2.0, 7.0, 5.0, 
-0.0, 7.0], [0.0, 0.0, -1.0, -5.0, -7.0]], [[6.0, 2.0, 0.0, 2.0, -2.0], [6.0, 0.0, 2.0, -6.0, 4.0], [0.0, -1.0, 3.0, 4.0, -3.0], 
-[-1.0, 3.0, 2.0, -4.0, -7.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, -6.0, 1.0])+(1.-msk_arg1)*numpy.array([3.0, -7.0, -5.0])
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank2_offset1(self):
+      arg0=numpy.array([5.0, -3.0, 1.0])
+      arg1=Data(numpy.array([[6.0, -2.0], [3.0, -2.0], [2.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, 3.0], [-6.0, 2.0], [-3.0, 2.0]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-36.0, -41.0, 0.0, -39.0, 29.0], [-47.0, -12.0, -48.0, 49.0, -32.0], [10.0, 7.0, 39.0, -41.0, 
-14.0], [28.0, 42.0, -39.0, 18.0, -17.0]])+(1.-msk_ref)*numpy.array([[0.0, 2.0, 25.0, 14.0, 13.0], [8.0, 28.0, 8.0, 24.0, 36.0], 
-[5.0, -32.0, -50.0, -32.0, -52.0], [14.0, -33.0, -6.0, 52.0, 90.0]])
+      ref=Data(numpy.array([23.0, -10.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([40.0, 11.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 0.0, -3.0, 5.0, 1.0], [-1.0, 5.0, -3.0, 3.0, 0.0], [4.0, -1.0, -3.0, 0.0, -2.0], 
-[-7.0, -7.0, 6.0, 3.0, 0.0]], [[5.0, 0.0, -1.0, 7.0, 4.0], [5.0, -4.0, 7.0, 1.0, -5.0], [0.0, 4.0, 0.0, 3.0, -2.0], [3.0, 3.0, 
--2.0, 1.0, 7.0]], [[3.0, 6.0, 5.0, -1.0, 6.0], [-5.0, 0.0, 2.0, -1.0, 0.0], [-7.0, 1.0, -3.0, -2.0, -5.0], [0.0, 0.0, 0.0, 0.0, 
--1.0]]], [[[-3.0, -2.0, 0.0, 6.0, -3.0], [4.0, 2.0, 3.0, -1.0, -1.0], [1.0, 3.0, -4.0, 6.0, 0.0], [-5.0, 5.0, -1.0, -6.0, 
--2.0]], [[-1.0, -7.0, -1.0, 1.0, 0.0], [-4.0, 5.0, 0.0, 5.0, -4.0], [-1.0, -4.0, -5.0, -7.0, -5.0], [3.0, 6.0, 3.0, 0.0, 6.0]], 
-[[1.0, 0.0, 3.0, 4.0, -1.0], [0.0, 0.0, -1.0, -3.0, -5.0], [2.0, 1.0, -7.0, 5.0, -7.0], [-4.0, 0.0, -5.0, -4.0, 
-4.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 2.0, 6.0, -1.0, 0.0], [6.0, -1.0, 1.0, 6.0, -3.0], [-3.0, -1.0, -4.0, 5.0, 2.0], 
-[-2.0, 1.0, -6.0, 0.0, 5.0]], [[1.0, -6.0, -4.0, 6.0, 5.0], [-5.0, 1.0, 4.0, -6.0, 5.0], [6.0, -6.0, -4.0, 2.0, -5.0], [-4.0, 
-0.0, -4.0, -5.0, -1.0]], [[-7.0, -7.0, -2.0, -3.0, -1.0], [-4.0, -3.0, 0.0, -3.0, -5.0], [2.0, -2.0, 1.0, -5.0, 7.0], [-5.0, 
-3.0, 0.0, 0.0, -7.0]]], [[[-6.0, -3.0, -3.0, -3.0, -1.0], [-6.0, -2.0, 3.0, -1.0, -1.0], [5.0, -3.0, 1.0, 2.0, 1.0], [7.0, 1.0, 
-3.0, 5.0, 3.0]], [[0.0, -1.0, -3.0, 2.0, 4.0], [-3.0, -6.0, -7.0, -1.0, 7.0], [0.0, 3.0, -5.0, -2.0, 6.0], [2.0, 2.0, -7.0, 
-1.0, -4.0]], [[-2.0, 0.0, 2.0, -5.0, -1.0], [2.0, -6.0, -4.0, 1.0, 7.0], [-7.0, 0.0, 0.0, -7.0, 7.0], [-1.0, -3.0, 4.0, -7.0, 
--6.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, 5.0, 3.0], [3.0, 7.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-4.0, 2.0, 3.0], [5.0, 1.0, 
-6.0]])
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[5.0, -3.0, 0.0], [-1.0, -1.0, 1.0]])
+      arg1=Data(numpy.array([[[-3.0, -2.0], [-5.0, -2.0], [-3.0, 4.0]], [[-2.0, -6.0], [-4.0, 4.0], [-6.0, 
+1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -4.0], [0.0, 0.0], [2.0, 2.0]], [[2.0, 4.0], [2.0, -6.0], [-3.0, 0.0]]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[22.0, -37.0, 24.0, 58.0, 22.0], [-3.0, 6.0, 55.0, 13.0, -76.0], [-29.0, 11.0, -75.0, -2.0, 
--82.0], [26.0, 93.0, -30.0, -38.0, 84.0]])+(1.-msk_ref)*numpy.array([[-61.0, -57.0, -44.0, -36.0, 0.0], [-67.0, -55.0, -12.0, 
--45.0, 51.0], [13.0, -26.0, 11.0, -65.0, 56.0], [16.0, -6.0, 48.0, -26.0, -68.0]])
+      ref=Data(numpy.array([0.0, -1.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([13.0, -18.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-7.0, -2.0, 3.0, 5.0, -5.0], [-7.0, 4.0, -6.0, 2.0, 3.0], [-6.0, -6.0, -1.0, -3.0, 2.0], 
-[-3.0, -5.0, 4.0, -2.0, 2.0]])+(1.-msk_arg0)*numpy.array([[7.0, -6.0, -5.0, -2.0, 0.0], [-6.0, -5.0, 0.0, -7.0, 0.0], [-4.0, 
--5.0, -2.0, 6.0, 0.0], [3.0, 7.0, 7.0, 3.0, -7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, -3.0])+(1.-msk_arg1)*numpy.array([0.0, 1.0])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[35.0, 21.0], [10.0, 6.0], [-15.0, -9.0], [-25.0, -15.0], [25.0, 15.0]], [[35.0, 21.0], [-20.0, 
--12.0], [30.0, 18.0], [-10.0, -6.0], [-15.0, -9.0]], [[30.0, 18.0], [30.0, 18.0], [5.0, 3.0], [15.0, 9.0], [-10.0, -6.0]], 
-[[15.0, 9.0], [25.0, 15.0], [-20.0, -12.0], [10.0, 6.0], [-10.0, -6.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 7.0], [0.0, -6.0], 
-[0.0, -5.0], [0.0, -2.0], [0.0, 0.0]], [[0.0, -6.0], [0.0, -5.0], [0.0, 0.0], [0.0, -7.0], [0.0, 0.0]], [[0.0, -4.0], [0.0, 
--5.0], [0.0, -2.0], [0.0, 6.0], [0.0, 0.0]], [[0.0, 3.0], [0.0, 7.0], [0.0, 7.0], [0.0, 3.0], [0.0, -7.0]]])
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank4_offset3(self):
+      arg0=numpy.array([[[-6.0, -2.0, -3.0], [5.0, -6.0, 6.0], [0.0, 2.0, 0.0], [4.0, 7.0, 5.0]], [[5.0, 4.0, 7.0], [3.0, -4.0, 
+0.0], [-3.0, -2.0, 2.0], [0.0, 5.0, -1.0]]])
+      arg1=Data(numpy.array([[[[-5.0, 7.0], [0.0, -2.0], [-5.0, 5.0]], [[2.0, 3.0], [0.0, 2.0], [6.0, 3.0]], [[-4.0, 0.0], 
+[-3.0, 7.0], [4.0, -4.0]], [[3.0, -4.0], [-7.0, -5.0], [-2.0, 2.0]]], [[[5.0, 6.0], [0.0, -3.0], [-3.0, 6.0]], [[5.0, 6.0], 
+[0.0, 7.0], [-1.0, -7.0]], [[6.0, -5.0], [3.0, -2.0], [-7.0, -5.0]], [[2.0, 0.0], [3.0, 1.0], [-5.0, 
+-5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, 6.0], [5.0, -4.0], [-6.0, 6.0]], [[1.0, 3.0], [6.0, 3.0], [0.0, 6.0]], [[0.0, 
+-2.0], [2.0, 5.0], [6.0, 2.0]], [[5.0, 5.0], [6.0, 5.0], [-7.0, 1.0]]], [[[7.0, -1.0], [6.0, -5.0], [4.0, 6.0]], [[6.0, 0.0], 
+[0.0, 0.0], [6.0, 7.0]], [[4.0, 0.0], [-3.0, 0.0], [-7.0, -6.0]], [[3.0, -2.0], [-2.0, 1.0], [-3.0, 4.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([39.0, 10.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([104.0, 63.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, -6.0, 0.0, 3.0, 6.0], [4.0, 0.0, 0.0, -5.0, 1.0], [2.0, 7.0, 3.0, 4.0, 0.0], [-4.0, 
--5.0, -6.0, 4.0, -4.0]], [[-1.0, -5.0, 4.0, 7.0, -5.0], [-2.0, 0.0, 4.0, 1.0, 7.0], [3.0, 7.0, 4.0, 7.0, -7.0], [0.0, 7.0, 
--6.0, 3.0, 6.0]], [[4.0, 7.0, -4.0, -3.0, -6.0], [-4.0, -2.0, -3.0, -5.0, -3.0], [1.0, 5.0, 1.0, 4.0, 3.0], [-7.0, 7.0, 6.0, 
--5.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-1.0, 0.0, -7.0, -3.0, -2.0], [-1.0, 0.0, -6.0, -4.0, -1.0], [4.0, 2.0, -5.0, 0.0, 
--4.0], [-4.0, 2.0, 1.0, 7.0, 0.0]], [[-5.0, 3.0, 4.0, -5.0, 3.0], [3.0, -3.0, -1.0, -6.0, 1.0], [-6.0, -5.0, 6.0, 2.0, 1.0], 
-[-4.0, 5.0, 6.0, 6.0, -4.0]], [[-1.0, -4.0, -1.0, 0.0, -1.0], [-7.0, 2.0, -1.0, -6.0, 0.0], [1.0, 3.0, -1.0, -1.0, -3.0], 
-[-6.0, 5.0, 4.0, -5.0, -7.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-1.0, -2.0], [3.0, 5.0], [5.0, 2.0]])+(1.-msk_arg1)*numpy.array([[7.0, 1.0], [3.0, 5.0], 
-[-5.0, -4.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[15.0, -1.0], [26.0, 1.0], [-8.0, 12.0], [3.0, 23.0], [-51.0, -49.0]], [[-30.0, -26.0], [-10.0, 
--4.0], [-3.0, 14.0], [-17.0, 5.0], [5.0, 27.0]], [[12.0, 13.0], [39.0, 31.0], [14.0, 16.0], [37.0, 35.0], [-6.0, -29.0]], 
-[[-31.0, -6.0], [61.0, 59.0], [18.0, -6.0], [-20.0, -3.0], [2.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[-17.0, -22.0], [29.0, 
-31.0], [-32.0, 17.0], [-36.0, -28.0], [0.0, 17.0]], [[37.0, 42.0], [-19.0, -23.0], [-40.0, -7.0], [-16.0, -10.0], [-4.0, 4.0]], 
-[[5.0, -30.0], [-16.0, -35.0], [-12.0, 29.0], [11.0, 14.0], [-10.0, 13.0]], [[-10.0, 0.0], [4.0, 7.0], [5.0, 15.0], [92.0, 
-57.0], [23.0, 8.0]]])
+   def test_generalTransposedTensorProduct_array_rank0_taggedData_rank2_offset0(self):
+      arg0=numpy.array(-1.0)
+      arg1=Data(numpy.array([[-4.0, -4.0, 1.0, 2.0, -5.0], [-3.0, -5.0, -5.0, 4.0, 0.0], [4.0, 1.0, 6.0, 0.0, 3.0], [3.0, 3.0, 
+5.0, 1.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, 1.0, 3.0, 2.0, -1.0], [-1.0, 0.0, 4.0, 4.0, -5.0], [-7.0, -5.0, -2.0, 4.0, 
+-1.0], [6.0, 1.0, -7.0, 6.0, 4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[4.0, 4.0, -1.0, -2.0, 5.0], [3.0, 5.0, 5.0, -4.0, -0.0], [-4.0, -1.0, -6.0, -0.0, -3.0], [-3.0, 
+-3.0, -5.0, -1.0, 5.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-4.0, -1.0, -3.0, -2.0, 1.0], [1.0, -0.0, -4.0, -4.0, 5.0], [7.0, 5.0, 2.0, -4.0, 
+1.0], [-6.0, -1.0, 7.0, -6.0, -4.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-5.0, 0.0, -5.0, 1.0, 1.0], [7.0, 0.0, -5.0, 1.0, 3.0], [0.0, -5.0, 4.0, 0.0, 4.0], [2.0, 
-1.0, 2.0, -4.0, 5.0]], [[-3.0, -7.0, 0.0, 2.0, 0.0], [-7.0, 0.0, -1.0, -2.0, -7.0], [6.0, -3.0, -6.0, 0.0, 1.0], [5.0, 0.0, 
-1.0, 2.0, -2.0]], [[5.0, 2.0, -1.0, 1.0, 4.0], [5.0, 3.0, 2.0, -5.0, 3.0], [1.0, 7.0, 4.0, 4.0, -5.0], [-6.0, -5.0, 0.0, -3.0, 
--7.0]]], [[[1.0, -4.0, 1.0, -3.0, 0.0], [-2.0, 2.0, 1.0, -6.0, 4.0], [3.0, 6.0, 4.0, -4.0, 7.0], [3.0, -3.0, 3.0, 5.0, 4.0]], 
-[[7.0, -7.0, -7.0, 5.0, -2.0], [-5.0, 2.0, -5.0, 5.0, 0.0], [1.0, -5.0, -6.0, 7.0, -4.0], [-7.0, 6.0, -2.0, -7.0, 7.0]], [[2.0, 
-6.0, 7.0, -1.0, 7.0], [-2.0, 1.0, -1.0, 5.0, 6.0], [0.0, 6.0, -7.0, -6.0, 2.0], [3.0, 3.0, 4.0, 3.0, 
--1.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, -4.0, 4.0, -3.0, 4.0], [1.0, -1.0, -2.0, -3.0, 0.0], [-7.0, 1.0, 2.0, -5.0, 1.0], 
-[7.0, 6.0, 3.0, 1.0, 7.0]], [[-1.0, -2.0, -4.0, 2.0, -3.0], [-5.0, -5.0, -6.0, 4.0, 0.0], [0.0, 6.0, 7.0, -3.0, -3.0], [1.0, 
-7.0, 5.0, 7.0, -5.0]], [[-3.0, -5.0, 7.0, -7.0, -4.0], [-3.0, -6.0, 0.0, 6.0, 0.0], [1.0, 0.0, 1.0, -7.0, 4.0], [-1.0, 2.0, 
--2.0, 4.0, -6.0]]], [[[7.0, -5.0, -1.0, 0.0, 3.0], [-5.0, -2.0, 3.0, 0.0, -3.0], [-1.0, 0.0, 3.0, 0.0, 2.0], [5.0, 7.0, 4.0, 
--3.0, 4.0]], [[-7.0, 5.0, 0.0, 0.0, 7.0], [-2.0, -3.0, 1.0, -2.0, -6.0], [-4.0, -4.0, -3.0, -7.0, 0.0], [3.0, 5.0, 6.0, 0.0, 
--7.0]], [[-2.0, 4.0, 0.0, -4.0, 0.0], [5.0, 1.0, 4.0, 1.0, 4.0], [-7.0, -1.0, -6.0, -5.0, -6.0], [3.0, 7.0, 6.0, 3.0, 0.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, 0.0], [-7.0, -1.0], [-5.0, 2.0]], [[3.0, -3.0], [4.0, -2.0], [-3.0, 
-0.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, -7.0], [-2.0, -2.0], [-1.0, -2.0]], [[3.0, 4.0], [4.0, -5.0], [7.0, 0.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[6.0, -4.0], [-19.0, 37.0], [-56.0, 9.0], [-2.0, -1.0], [-46.0, 12.0]], [[25.0, 33.0], [-4.0, 
--4.0], [-32.0, 12.0], [29.0, 0.0], [37.0, 1.0]], [[-34.0, -15.0], [-49.0, 9.0], [43.0, 14.0], [14.0, 6.0], [29.0, -24.0]], 
-[[-27.0, -12.0], [34.0, -13.0], [-12.0, -6.0], [-33.0, -9.0], [107.0, -38.0]]])+(1.-msk_ref)*numpy.array([[[-21.0, 36.0], 
-[46.0, -3.0], [-6.0, -38.0], [-22.0, 31.0], [43.0, -37.0]], [[24.0, -1.0], [6.0, 36.0], [55.0, 33.0], [-12.0, 11.0], [-5.0, 
-18.0]], [[-62.0, 63.0], [-36.0, 1.0], [-62.0, -3.0], [-45.0, 90.0], [-35.0, -1.0]], [[40.0, -44.0], [68.0, -57.0], [67.0, 
--41.0], [-7.0, -41.0], [-7.0, 24.0]]])
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank3_offset1(self):
+      arg0=numpy.array([0.0, -6.0, 6.0])
+      arg1=Data(numpy.array([[[7.0, 0.0, -7.0, -4.0, 2.0], [-4.0, -6.0, -3.0, -5.0, -5.0], [1.0, 4.0, -2.0, 6.0, -2.0], [-2.0, 
+-2.0, 2.0, -7.0, 0.0]], [[-4.0, 4.0, -5.0, -4.0, 4.0], [6.0, 0.0, 0.0, 2.0, 6.0], [-7.0, 4.0, 5.0, 2.0, 1.0], [4.0, 7.0, -6.0, 
+4.0, 1.0]], [[-3.0, 3.0, -5.0, -2.0, -3.0], [0.0, -3.0, -4.0, 3.0, 3.0], [1.0, 2.0, -3.0, -2.0, -5.0], [2.0, 2.0, 6.0, 4.0, 
+-4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, 2.0, 1.0, 1.0, -5.0], [1.0, 5.0, 0.0, 5.0, -7.0], [-6.0, 2.0, 3.0, 0.0, -7.0], 
+[-6.0, 5.0, 7.0, 0.0, 5.0]], [[0.0, -2.0, -1.0, 2.0, 4.0], [2.0, -6.0, -5.0, 5.0, -3.0], [2.0, 1.0, 2.0, 2.0, 5.0], [0.0, 4.0, 
+0.0, 5.0, 2.0]], [[1.0, 4.0, 2.0, 1.0, -6.0], [7.0, 2.0, -6.0, -4.0, 4.0], [3.0, 5.0, -7.0, 2.0, -7.0], [-6.0, 6.0, -7.0, 2.0, 
+-7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[6.0, -6.0, 0.0, 12.0, -42.0], [-36.0, -18.0, -24.0, 6.0, -18.0], [48.0, -12.0, -48.0, -24.0, 
+-36.0], [-12.0, -30.0, 72.0, 0.0, -30.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[6.0, 36.0, 18.0, -6.0, -60.0], [30.0, 48.0, -6.0, -54.0, 42.0], [6.0, 24.0, -54.0, 
+0.0, -72.0], [-36.0, 12.0, -42.0, -18.0, -54.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank2_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-6.0, 4.0, -6.0, -5.0, 0.0], [0.0, -2.0, 0.0, 0.0, -7.0], [0.0, -2.0, -5.0, 0.0, -4.0], [0.0, 
--4.0, 5.0, 1.0, -5.0]])+(1.-msk_arg0)*numpy.array([[5.0, 5.0, 6.0, 4.0, 2.0], [7.0, 3.0, -3.0, 7.0, 1.0], [4.0, 1.0, 2.0, 1.0, 
-4.0], [-6.0, -1.0, 4.0, -5.0, 7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, -1.0, 4.0, 5.0, 5.0], [4.0, -4.0, -2.0, 1.0, -3.0], [-3.0, 0.0, 4.0, -4.0, 0.0], [2.0, 
--3.0, 0.0, 4.0, -6.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, 
--3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-18.0, 6.0, -24.0, -30.0, -30.0], [-24.0, 24.0, 12.0, -6.0, 18.0], [18.0, 0.0, -24.0, 24.0, 
-0.0], [-12.0, 18.0, 0.0, -24.0, 36.0]], [[12.0, -4.0, 16.0, 20.0, 20.0], [16.0, -16.0, -8.0, 4.0, -12.0], [-12.0, 0.0, 16.0, 
--16.0, 0.0], [8.0, -12.0, 0.0, 16.0, -24.0]], [[-18.0, 6.0, -24.0, -30.0, -30.0], [-24.0, 24.0, 12.0, -6.0, 18.0], [18.0, 0.0, 
--24.0, 24.0, 0.0], [-12.0, 18.0, 0.0, -24.0, 36.0]], [[-15.0, 5.0, -20.0, -25.0, -25.0], [-20.0, 20.0, 10.0, -5.0, 15.0], 
-[15.0, 0.0, -20.0, 20.0, 0.0], [-10.0, 15.0, 0.0, -20.0, 30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 2.0, -8.0, -10.0, -10.0], [-8.0, 8.0, 4.0, -2.0, 6.0], [6.0, 0.0, -8.0, 8.0, 0.0], 
-[-4.0, 6.0, 0.0, -8.0, 12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
-[[-21.0, 7.0, -28.0, -35.0, -35.0], [-28.0, 28.0, 14.0, -7.0, 21.0], [21.0, 0.0, -28.0, 28.0, 0.0], [-14.0, 21.0, 0.0, -28.0, 
-42.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 
-2.0, -8.0, -10.0, -10.0], [-8.0, 8.0, 4.0, -2.0, 6.0], [6.0, 0.0, -8.0, 8.0, 0.0], [-4.0, 6.0, 0.0, -8.0, 12.0]], [[-15.0, 5.0, 
--20.0, -25.0, -25.0], [-20.0, 20.0, 10.0, -5.0, 15.0], [15.0, 0.0, -20.0, 20.0, 0.0], [-10.0, 15.0, 0.0, -20.0, 30.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, 4.0, -16.0, 
--20.0, -20.0], [-16.0, 16.0, 8.0, -4.0, 12.0], [12.0, 0.0, -16.0, 16.0, 0.0], [-8.0, 12.0, 0.0, -16.0, 24.0]]], [[[0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, 4.0, -16.0, -20.0, 
--20.0], [-16.0, 16.0, 8.0, -4.0, 12.0], [12.0, 0.0, -16.0, 16.0, 0.0], [-8.0, 12.0, 0.0, -16.0, 24.0]], [[15.0, -5.0, 20.0, 
-25.0, 25.0], [20.0, -20.0, -10.0, 5.0, -15.0], [-15.0, 0.0, 20.0, -20.0, 0.0], [10.0, -15.0, 0.0, 20.0, -30.0]], [[3.0, -1.0, 
-4.0, 5.0, 5.0], [4.0, -4.0, -2.0, 1.0, -3.0], [-3.0, 0.0, 4.0, -4.0, 0.0], [2.0, -3.0, 0.0, 4.0, -6.0]], [[-15.0, 5.0, -20.0, 
--25.0, -25.0], [-20.0, 20.0, 10.0, -5.0, 15.0], [15.0, 0.0, -20.0, 20.0, 0.0], [-10.0, 15.0, 0.0, -20.0, 
-30.0]]]])+(1.-msk_ref)*numpy.array([[[[-35.0, -25.0, 0.0, 0.0, -15.0], [0.0, 10.0, -20.0, -5.0, -25.0], [-5.0, -5.0, -15.0, 
--20.0, -5.0], [-20.0, 25.0, 5.0, 10.0, 5.0]], [[-35.0, -25.0, 0.0, 0.0, -15.0], [0.0, 10.0, -20.0, -5.0, -25.0], [-5.0, -5.0, 
--15.0, -20.0, -5.0], [-20.0, 25.0, 5.0, 10.0, 5.0]], [[-42.0, -30.0, 0.0, 0.0, -18.0], [0.0, 12.0, -24.0, -6.0, -30.0], [-6.0, 
--6.0, -18.0, -24.0, -6.0], [-24.0, 30.0, 6.0, 12.0, 6.0]], [[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 8.0, -16.0, -4.0, -20.0], 
-[-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]], [[-14.0, -10.0, 0.0, 0.0, -6.0], [0.0, 4.0, -8.0, -2.0, 
--10.0], [-2.0, -2.0, -6.0, -8.0, -2.0], [-8.0, 10.0, 2.0, 4.0, 2.0]]], [[[-49.0, -35.0, 0.0, 0.0, -21.0], [0.0, 14.0, -28.0, 
--7.0, -35.0], [-7.0, -7.0, -21.0, -28.0, -7.0], [-28.0, 35.0, 7.0, 14.0, 7.0]], [[-21.0, -15.0, 0.0, 0.0, -9.0], [0.0, 6.0, 
--12.0, -3.0, -15.0], [-3.0, -3.0, -9.0, -12.0, -3.0], [-12.0, 15.0, 3.0, 6.0, 3.0]], [[21.0, 15.0, 0.0, 0.0, 9.0], [0.0, -6.0, 
-12.0, 3.0, 15.0], [3.0, 3.0, 9.0, 12.0, 3.0], [12.0, -15.0, -3.0, -6.0, -3.0]], [[-49.0, -35.0, 0.0, 0.0, -21.0], [0.0, 14.0, 
--28.0, -7.0, -35.0], [-7.0, -7.0, -21.0, -28.0, -7.0], [-28.0, 35.0, 7.0, 14.0, 7.0]], [[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 
-2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, -3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]]], [[[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 
-8.0, -16.0, -4.0, -20.0], [-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]], [[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 
-2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, -3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]], [[-14.0, -10.0, 0.0, 0.0, -6.0], [0.0, 
-4.0, -8.0, -2.0, -10.0], [-2.0, -2.0, -6.0, -8.0, -2.0], [-8.0, 10.0, 2.0, 4.0, 2.0]], [[-7.0, -5.0, 0.0, 0.0, -3.0], [0.0, 
-2.0, -4.0, -1.0, -5.0], [-1.0, -1.0, -3.0, -4.0, -1.0], [-4.0, 5.0, 1.0, 2.0, 1.0]], [[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 
-8.0, -16.0, -4.0, -20.0], [-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]]], [[[42.0, 30.0, 0.0, 0.0, 18.0], 
-[0.0, -12.0, 24.0, 6.0, 30.0], [6.0, 6.0, 18.0, 24.0, 6.0], [24.0, -30.0, -6.0, -12.0, -6.0]], [[7.0, 5.0, 0.0, 0.0, 3.0], 
-[0.0, -2.0, 4.0, 1.0, 5.0], [1.0, 1.0, 3.0, 4.0, 1.0], [4.0, -5.0, -1.0, -2.0, -1.0]], [[-28.0, -20.0, 0.0, 0.0, -12.0], [0.0, 
-8.0, -16.0, -4.0, -20.0], [-4.0, -4.0, -12.0, -16.0, -4.0], [-16.0, 20.0, 4.0, 8.0, 4.0]], [[35.0, 25.0, 0.0, 0.0, 15.0], [0.0, 
--10.0, 20.0, 5.0, 25.0], [5.0, 5.0, 15.0, 20.0, 5.0], [20.0, -25.0, -5.0, -10.0, -5.0]], [[-49.0, -35.0, 0.0, 0.0, -21.0], 
-[0.0, 14.0, -28.0, -7.0, -35.0], [-7.0, -7.0, -21.0, -28.0, -7.0], [-28.0, 35.0, 7.0, 14.0, 7.0]]]])
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[7.0, 0.0, -4.0], [-4.0, -7.0, 6.0]])
+      arg1=Data(numpy.array([[[[4.0, -2.0, -2.0, -7.0, -6.0], [-6.0, 0.0, 0.0, 3.0, 3.0], [-4.0, -4.0, -4.0, -6.0, 0.0], [-1.0, 
+-7.0, -6.0, 0.0, 2.0]], [[-1.0, 3.0, -7.0, -1.0, 6.0], [2.0, -4.0, 1.0, -1.0, -1.0], [-4.0, 1.0, -1.0, 5.0, -7.0], [2.0, -6.0, 
+2.0, -1.0, 7.0]], [[7.0, 1.0, 7.0, 0.0, 2.0], [-7.0, 1.0, 4.0, 4.0, 1.0], [7.0, 4.0, -6.0, 1.0, 4.0], [7.0, 5.0, 6.0, -7.0, 
+1.0]]], [[[7.0, -2.0, 0.0, -2.0, 0.0], [-4.0, -3.0, -2.0, -5.0, -3.0], [5.0, -7.0, 5.0, -4.0, -1.0], [-2.0, 5.0, -6.0, 5.0, 
+-6.0]], [[2.0, 3.0, -4.0, 4.0, -5.0], [0.0, -2.0, -5.0, -1.0, 2.0], [-7.0, -5.0, 0.0, -7.0, -7.0], [-2.0, 0.0, -5.0, 3.0, 
+-2.0]], [[-3.0, 4.0, -5.0, 5.0, 4.0], [-1.0, 0.0, 2.0, 4.0, -7.0], [0.0, 6.0, 7.0, -4.0, 0.0], [0.0, 0.0, -7.0, 4.0, 
+-7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, 5.0, 0.0, -3.0, -7.0], [3.0, -7.0, -1.0, 6.0, 0.0], [7.0, -7.0, -6.0, 2.0, 
+7.0], [0.0, -6.0, -4.0, -2.0, -4.0]], [[2.0, 3.0, -4.0, -6.0, -6.0], [2.0, -1.0, 7.0, 1.0, 5.0], [-5.0, -2.0, 0.0, 3.0, 2.0], 
+[0.0, 2.0, -7.0, -2.0, 7.0]], [[-3.0, -7.0, 5.0, 0.0, -2.0], [-5.0, -5.0, -2.0, 1.0, 4.0], [5.0, 2.0, -3.0, 5.0, -4.0], [-1.0, 
+0.0, -7.0, -1.0, 1.0]]], [[[3.0, 2.0, 0.0, -6.0, -4.0], [-2.0, -1.0, 0.0, -2.0, 2.0], [-2.0, 3.0, 2.0, 0.0, 0.0], [-1.0, -2.0, 
+7.0, 5.0, 6.0]], [[-5.0, 0.0, -6.0, -2.0, 1.0], [7.0, 2.0, 0.0, -5.0, -3.0], [7.0, 7.0, 5.0, -4.0, 2.0], [0.0, 7.0, 6.0, -6.0, 
+-2.0]], [[2.0, -7.0, -5.0, -3.0, 1.0], [7.0, 2.0, -7.0, 7.0, 4.0], [4.0, 4.0, 4.0, 0.0, 4.0], [-6.0, 5.0, 7.0, -4.0, -1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-60.0, -7.0, -44.0, -39.0, 9.0], [-4.0, 22.0, 39.0, 56.0, -27.0], [-27.0, 55.0, 18.0, -5.0, 37.0], 
+[-13.0, -89.0, -49.0, 11.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[61.0, 13.0, -8.0, -1.0, -26.0], [42.0, -27.0, -41.0, 123.0, 21.0], [12.0, -94.0, 
+-49.0, 22.0, 75.0], [-28.0, -53.0, -28.0, -12.0, -48.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, 7.0, 2.0, 7.0, 1.0], [-3.0, 2.0, -4.0, -5.0, -5.0], [5.0, 7.0, -5.0, -5.0, 0.0], [3.0, 
-6.0, 0.0, 7.0, -6.0]], [[2.0, -5.0, 0.0, -5.0, 6.0], [6.0, 0.0, -3.0, -4.0, 0.0], [-7.0, 0.0, 5.0, -2.0, 7.0], [-2.0, 7.0, 3.0, 
-3.0, 4.0]], [[-2.0, -5.0, 6.0, 7.0, 4.0], [-4.0, 5.0, 4.0, -1.0, 7.0], [2.0, 4.0, 1.0, 2.0, -5.0], [3.0, 2.0, -2.0, 4.0, 
-0.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 1.0, -6.0, 0.0, 4.0], [0.0, 6.0, -4.0, -1.0, 1.0], [3.0, 2.0, -7.0, 3.0, 0.0], [6.0, 
--4.0, 6.0, -2.0, 4.0]], [[0.0, 6.0, 5.0, 0.0, -1.0], [5.0, 6.0, 6.0, 2.0, 2.0], [-4.0, -4.0, -2.0, 3.0, 7.0], [6.0, -5.0, 0.0, 
--7.0, -4.0]], [[-6.0, -4.0, -2.0, -1.0, -1.0], [7.0, 0.0, -5.0, 1.0, -3.0], [2.0, 0.0, -5.0, -3.0, 0.0], [6.0, 1.0, 4.0, -7.0, 
--4.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, -1.0, 1.0, -1.0, -3.0], [-1.0, -7.0, 5.0, -6.0, 1.0], [3.0, 2.0, 4.0, 0.0, -4.0], 
-[4.0, -1.0, 0.0, 7.0, 3.0]], [[2.0, 5.0, 1.0, -3.0, -7.0], [-4.0, -5.0, 3.0, -2.0, 7.0], [-2.0, 0.0, 2.0, 1.0, -1.0], [-6.0, 
-1.0, -7.0, -7.0, -4.0]], [[1.0, 3.0, 5.0, 6.0, -7.0], [-7.0, -6.0, 4.0, 0.0, -5.0], [0.0, -3.0, 6.0, -5.0, -5.0], [-7.0, -6.0, 
--5.0, -5.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, -7.0, -2.0, 0.0, -5.0], [-4.0, -2.0, 6.0, 0.0, 1.0], [1.0, -4.0, 7.0, 
-5.0, 4.0], [-1.0, 2.0, 3.0, 2.0, 4.0]], [[6.0, 0.0, -1.0, -2.0, 1.0], [0.0, 7.0, 4.0, -4.0, 1.0], [5.0, 6.0, 2.0, -6.0, 6.0], 
-[-6.0, 1.0, 1.0, -3.0, -3.0]], [[3.0, 7.0, 5.0, 3.0, 3.0], [7.0, 7.0, -6.0, 6.0, -6.0], [-2.0, 0.0, -5.0, 6.0, 4.0], [-1.0, 
-0.0, 7.0, -4.0, -2.0]]])
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-14.0, 0.0, -4.0, -22.0, -12.0], [2.0, -26.0, 18.0, -28.0, 28.0], [8.0, 14.0, 8.0, 12.0, 
--8.0], [18.0, 10.0, -4.0, 24.0, -8.0]], [[-43.0, -47.0, -23.0, -22.0, 49.0], [48.0, 6.0, 0.0, -32.0, -3.0], [31.0, 29.0, -12.0, 
-20.0, 2.0], [93.0, 18.0, 60.0, 109.0, 11.0]], [[-2.0, 16.0, 32.0, 34.0, -48.0], [-44.0, -50.0, 34.0, -12.0, -28.0], [6.0, 
--14.0, 44.0, -30.0, -38.0], [-34.0, -38.0, -30.0, -16.0, 42.0]], [[-31.0, -11.0, 37.0, 50.0, -35.0], [-36.0, -66.0, 48.0, 
--32.0, -63.0], [31.0, -7.0, 60.0, -40.0, -58.0], [9.0, -54.0, 0.0, 49.0, 83.0]], [[12.0, 41.0, 27.0, 5.0, -73.0], [-53.0, 
--61.0, 39.0, -18.0, 23.0], [-9.0, -10.0, 40.0, -14.0, -30.0], [-60.0, -19.0, -62.0, -55.0, 3.0]]], [[[20.0, 21.0, -17.0, -39.0, 
--5.0], [7.0, 15.0, -13.0, 6.0, 59.0], [-21.0, 6.0, -24.0, 26.0, 26.0], [-20.0, 33.0, -22.0, -43.0, -57.0]], [[-3.0, 13.0, 27.0, 
-28.0, -41.0], [-37.0, -44.0, 30.0, -12.0, -23.0], [6.0, -11.0, 38.0, -25.0, -33.0], [-27.0, -32.0, -25.0, -11.0, 36.0]], 
-[[14.0, 1.0, 13.0, 37.0, 5.0], [-12.0, 19.0, -13.0, 30.0, -45.0], [-6.0, -20.0, 2.0, -23.0, -1.0], [-26.0, -23.0, 1.0, -27.0, 
-24.0]], [[11.0, -18.0, -14.0, 11.0, 50.0], [28.0, 61.0, -41.0, 38.0, -28.0], [-7.0, -7.0, -34.0, 1.0, 29.0], [11.0, 7.0, 33.0, 
--2.0, -5.0]], [[27.0, 26.0, 30.0, 47.0, -34.0], [-44.0, -7.0, 3.0, 30.0, -40.0], [-15.0, -31.0, 22.0, -35.0, -15.0], [-69.0, 
--37.0, -35.0, -70.0, 27.0]]], [[[-32.0, -34.0, 8.0, 28.0, 20.0], [9.0, -12.0, 12.0, -16.0, -54.0], [29.0, 4.0, 18.0, -17.0, 
--23.0], [48.0, -24.0, 39.0, 74.0, 55.0]], [[-24.0, 5.0, 27.0, 17.0, -49.0], [-35.0, -73.0, 51.0, -42.0, -13.0], [21.0, 2.0, 
-52.0, -20.0, -48.0], [0.0, -31.0, -20.0, 29.0, 45.0]], [[31.0, 33.0, 5.0, -4.0, -27.0], [-22.0, 4.0, -6.0, 20.0, 25.0], [-25.0, 
--13.0, -4.0, 0.0, 10.0], [-57.0, 4.0, -40.0, -75.0, -29.0]], [[18.0, 1.0, 3.0, 23.0, 15.0], [-1.0, 33.0, -23.0, 34.0, -29.0], 
-[-11.0, -16.0, -12.0, -12.0, 12.0], [-22.0, -9.0, 4.0, -31.0, 5.0]], [[9.0, 20.0, -18.0, -51.0, -14.0], [7.0, -5.0, 1.0, -14.0, 
-74.0], [-14.0, 15.0, -16.0, 32.0, 18.0], [-7.0, 37.0, -24.0, -24.0, -58.0]]], [[[-13.0, -4.0, 16.0, 21.0, -16.0], [-16.0, 
--29.0, 21.0, -14.0, -26.0], [13.0, -3.0, 26.0, -17.0, -25.0], [3.0, -23.0, -1.0, 20.0, 35.0]], [[-8.0, 35.0, 23.0, -15.0, 
--81.0], [-48.0, -89.0, 59.0, -50.0, 45.0], [4.0, 6.0, 50.0, -3.0, -41.0], [-32.0, -11.0, -59.0, -17.0, 2.0]], [[4.0, 9.0, -7.0, 
--21.0, -7.0], [2.0, -3.0, 1.0, -6.0, 31.0], [-6.0, 6.0, -6.0, 13.0, 7.0], [-4.0, 15.0, -11.0, -11.0, -24.0]], [[-18.0, 20.0, 
-30.0, 8.0, -70.0], [-47.0, -88.0, 60.0, -48.0, 8.0], [15.0, 2.0, 58.0, -17.0, -51.0], [-18.0, -28.0, -41.0, 8.0, 33.0]], 
-[[32.0, 26.0, -2.0, -6.0, -10.0], [-10.0, 22.0, -18.0, 28.0, 22.0], [-26.0, -12.0, -16.0, 4.0, 20.0], [-48.0, 10.0, -28.0, 
--70.0, -34.0]]]])+(1.-msk_ref)*numpy.array([[[[-39.0, -91.0, -44.0, -18.0, -53.0], [-70.0, -56.0, 78.0, -36.0, 43.0], [19.0, 
--28.0, 79.0, -1.0, 4.0], [-1.0, 14.0, -21.0, 38.0, 40.0]], [[21.0, -35.0, -28.0, -24.0, -11.0], [-32.0, 12.0, 54.0, -48.0, 
-31.0], [39.0, 32.0, 39.0, -55.0, 24.0], [-33.0, 8.0, -19.0, 0.0, -6.0]], [[42.0, 28.0, -3.0, -16.0, 29.0], [10.0, 33.0, -4.0, 
--32.0, 11.0], [23.0, 54.0, -22.0, -72.0, -2.0], [-22.0, -7.0, -27.0, -19.0, -35.0]], [[-3.0, -7.0, -5.0, -3.0, -3.0], [-7.0, 
--7.0, 6.0, -6.0, 6.0], [2.0, 0.0, 5.0, -6.0, -4.0], [1.0, 0.0, -7.0, 4.0, 2.0]], [[-21.0, -35.0, -12.0, -1.0, -24.0], [-23.0, 
--22.0, 26.0, -2.0, 9.0], [1.0, -22.0, 31.0, 20.0, 6.0], [3.0, 7.0, 4.0, 15.0, 21.0]]], [[[51.0, 49.0, 30.0, 11.0, 26.0], [49.0, 
-84.0, -22.0, 22.0, -37.0], [11.0, 30.0, -25.0, 12.0, 58.0], [-37.0, 5.0, 54.0, -43.0, -29.0]], [[18.0, -42.0, -18.0, -12.0, 
--24.0], [-24.0, 30.0, 60.0, -24.0, 12.0], [36.0, 12.0, 54.0, -6.0, 60.0], [-42.0, 18.0, 24.0, -6.0, 6.0]], [[33.0, -7.0, -23.0, 
--27.0, 11.0], [-19.0, 15.0, 30.0, -54.0, 32.0], [36.0, 52.0, 9.0, -86.0, 0.0], [-27.0, -2.0, -41.0, -6.0, -24.0]], [[18.0, 
-14.0, 5.0, -1.0, 10.0], [11.0, 23.0, -4.0, -2.0, -5.0], [7.0, 16.0, -8.0, -11.0, 12.0], [-12.0, 0.0, 6.0, -12.0, -12.0]], 
-[[0.0, -28.0, -19.0, -13.0, -12.0], [-25.0, -9.0, 32.0, -26.0, 21.0], [17.0, 8.0, 26.0, -25.0, 4.0], [-10.0, 4.0, -16.0, 8.0, 
-4.0]]], [[[-27.0, -7.0, 8.0, 14.0, -13.0], [2.0, -20.0, -10.0, 28.0, -13.0], [-21.0, -36.0, 3.0, 51.0, -4.0], [19.0, 2.0, 19.0, 
-10.0, 20.0]], [[-30.0, -14.0, 0.0, 8.0, -14.0], [-8.0, -32.0, -4.0, 16.0, -2.0], [-18.0, -32.0, 6.0, 34.0, -16.0], [22.0, 0.0, 
-2.0, 16.0, 20.0]], [[-6.0, 14.0, -9.0, -11.0, 18.0], [-7.0, -35.0, -20.0, -22.0, 21.0], [-7.0, 16.0, -28.0, -53.0, -60.0], 
-[24.0, -16.0, -58.0, 12.0, -12.0]], [[0.0, -42.0, -24.0, -15.0, -21.0], [-33.0, -6.0, 48.0, -30.0, 24.0], [24.0, 6.0, 42.0, 
--21.0, 18.0], [-18.0, 9.0, -9.0, 9.0, 9.0]], [[42.0, 0.0, -7.0, -14.0, 7.0], [0.0, 49.0, 28.0, -28.0, 7.0], [35.0, 42.0, 14.0, 
--42.0, 42.0], [-42.0, 7.0, 7.0, -21.0, -21.0]]], [[[36.0, 0.0, 12.0, 6.0, -6.0], [18.0, 72.0, 24.0, 12.0, -24.0], [24.0, 12.0, 
-24.0, 30.0, 84.0], [-48.0, 18.0, 66.0, -30.0, -6.0]], [[-15.0, 35.0, 18.0, 13.0, 18.0], [23.0, -20.0, -50.0, 26.0, -15.0], 
-[-31.0, -14.0, -43.0, 16.0, -42.0], [33.0, -13.0, -10.0, 3.0, -3.0]], [[-6.0, -14.0, 8.0, 12.0, -18.0], [4.0, 16.0, 12.0, 24.0, 
--18.0], [-2.0, -24.0, 22.0, 54.0, 40.0], [-10.0, 12.0, 46.0, -4.0, 16.0]], [[-57.0, -35.0, -24.0, -7.0, -18.0], [-41.0, -94.0, 
-2.0, -14.0, 33.0], [-23.0, -34.0, 7.0, -10.0, -78.0], [51.0, -11.0, -62.0, 45.0, 27.0]], [[-48.0, -56.0, -24.0, -4.0, -36.0], 
-[-44.0, -64.0, 32.0, -8.0, 24.0], [-8.0, -40.0, 40.0, 20.0, -24.0], [24.0, 4.0, -20.0, 36.0, 36.0]]]])
+   def test_generalTransposedTensorProduct_array_rank0_taggedData_rank3_offset0(self):
+      arg0=numpy.array(-7.0)
+      arg1=Data(numpy.array([[[5.0, -3.0], [0.0, 1.0]], [[-1.0, 7.0], [1.0, -4.0]], [[3.0, -7.0], [0.0, -1.0]], [[4.0, -2.0], 
+[3.0, -1.0]], [[-2.0, -5.0], [-2.0, 1.0]], [[6.0, -2.0], [7.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -2.0], [-5.0, 2.0]], [[-5.0, -4.0], [1.0, -5.0]], [[0.0, 4.0], [6.0, 7.0]], 
+[[-5.0, -5.0], [4.0, -4.0]], [[-3.0, -7.0], [-1.0, 5.0]], [[-2.0, -3.0], [4.0, -7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-35.0, 21.0], [-0.0, -7.0]], [[7.0, -49.0], [-7.0, 28.0]], [[-21.0, 49.0], [-0.0, 7.0]], [[-28.0, 
+14.0], [-21.0, 7.0]], [[14.0, 35.0], [14.0, -7.0]], [[-42.0, 14.0], [-49.0, -0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[49.0, 14.0], [35.0, -14.0]], [[35.0, 28.0], [-7.0, 35.0]], [[-0.0, -28.0], [-42.0, 
+-49.0]], [[35.0, 35.0], [-28.0, 28.0]], [[21.0, 49.0], [7.0, -35.0]], [[14.0, 21.0], [-28.0, 49.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, -6.0, -6.0, 0.0, 2.0], [2.0, -4.0, -4.0, 1.0, -7.0], [-6.0, -5.0, -4.0, 5.0, -3.0], 
-[6.0, 4.0, -5.0, 6.0, -6.0]], [[-1.0, -7.0, 0.0, 3.0, 0.0], [3.0, -2.0, 2.0, 7.0, 7.0], [1.0, 7.0, -5.0, -3.0, -2.0], [-3.0, 
-4.0, 6.0, -2.0, -2.0]], [[-7.0, -3.0, -6.0, 2.0, -1.0], [3.0, 0.0, 3.0, 2.0, 0.0], [-6.0, -5.0, 0.0, -5.0, 2.0], [4.0, -7.0, 
--3.0, 1.0, 4.0]]], [[[0.0, -1.0, 3.0, 0.0, 6.0], [0.0, 2.0, -6.0, 5.0, 0.0], [7.0, 6.0, -2.0, -5.0, 0.0], [1.0, 3.0, 5.0, 0.0, 
-0.0]], [[-4.0, -4.0, -1.0, -4.0, 7.0], [5.0, -2.0, 0.0, 3.0, 0.0], [2.0, -2.0, -6.0, -5.0, -2.0], [4.0, 7.0, -4.0, -4.0, 0.0]], 
-[[1.0, -2.0, 7.0, -2.0, -4.0], [5.0, 0.0, 1.0, 0.0, 3.0], [-6.0, 4.0, 4.0, 7.0, 1.0], [-1.0, 1.0, -3.0, -3.0, 
-7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 4.0, 5.0, -2.0, 0.0], [-1.0, -5.0, -7.0, 4.0, 0.0], [0.0, -7.0, -2.0, -4.0, -7.0], 
-[6.0, 6.0, -1.0, 5.0, -2.0]], [[0.0, -5.0, 2.0, 4.0, -4.0], [-7.0, 6.0, 3.0, -4.0, 5.0], [0.0, -4.0, -7.0, 7.0, -4.0], [7.0, 
-3.0, -6.0, 0.0, 5.0]], [[-7.0, -7.0, -4.0, 0.0, 5.0], [7.0, -4.0, 6.0, -6.0, 7.0], [0.0, 7.0, -6.0, -6.0, 4.0], [-1.0, 5.0, 
-0.0, 5.0, -6.0]]], [[[-1.0, 0.0, -5.0, 0.0, 6.0], [-1.0, 5.0, 4.0, 0.0, 1.0], [4.0, -4.0, 0.0, -4.0, -3.0], [2.0, 5.0, 0.0, 
-2.0, -1.0]], [[5.0, -4.0, -6.0, 5.0, 3.0], [3.0, -7.0, -7.0, 5.0, 0.0], [-4.0, -6.0, -7.0, 3.0, -3.0], [5.0, 3.0, 4.0, 4.0, 
-3.0]], [[0.0, -6.0, -2.0, -3.0, -7.0], [-4.0, -3.0, -7.0, 0.0, 0.0], [5.0, -4.0, 3.0, -3.0, 3.0], [2.0, 2.0, 0.0, 3.0, -1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 4.0, -7.0, -3.0, 2.0], [2.0, -1.0, 2.0, 2.0, -4.0], [-5.0, 0.0, 1.0, -5.0, -1.0], 
-[5.0, 7.0, 1.0, -4.0, 7.0]], [[0.0, 5.0, -2.0, 0.0, 3.0], [-2.0, -3.0, 3.0, 7.0, -3.0], [5.0, 6.0, 5.0, -4.0, 1.0], [-7.0, 2.0, 
-7.0, 4.0, -3.0]], [[-2.0, -1.0, -4.0, -1.0, 0.0], [-2.0, -2.0, -7.0, 7.0, 4.0], [-5.0, -5.0, -1.0, 3.0, 3.0], [0.0, 3.0, 0.0, 
--3.0, -3.0]]], [[[2.0, 0.0, -7.0, -6.0, -3.0], [6.0, 3.0, -2.0, -2.0, -3.0], [6.0, 2.0, 2.0, -1.0, 0.0], [7.0, -1.0, 2.0, -4.0, 
--7.0]], [[5.0, 5.0, -7.0, -5.0, -6.0], [5.0, -6.0, -6.0, -1.0, 1.0], [5.0, 2.0, 4.0, 2.0, 0.0], [-5.0, -3.0, -5.0, 0.0, -5.0]], 
-[[-1.0, -6.0, -2.0, 1.0, 0.0], [4.0, 5.0, -7.0, -1.0, -2.0], [-2.0, 7.0, -5.0, 1.0, 0.0], [1.0, -2.0, -2.0, 1.0, 
-1.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, -1.0, -1.0, 4.0, 6.0], [6.0, -1.0, -7.0, 3.0, 0.0], [1.0, 0.0, -6.0, 7.0, -2.0], 
-[6.0, -2.0, 5.0, -6.0, -1.0]], [[-3.0, 7.0, -5.0, -4.0, -1.0], [2.0, 1.0, 2.0, 0.0, 7.0], [-2.0, 3.0, -5.0, -5.0, -2.0], [-3.0, 
--3.0, -5.0, 6.0, 1.0]], [[5.0, -5.0, -2.0, -2.0, -6.0], [0.0, 0.0, 7.0, 2.0, -4.0], [3.0, -5.0, 4.0, -7.0, 1.0], [2.0, 1.0, 
--6.0, -7.0, -2.0]]], [[[3.0, -3.0, -5.0, -1.0, -6.0], [-2.0, -5.0, 6.0, -3.0, -6.0], [-2.0, 0.0, -2.0, 0.0, 5.0], [3.0, -3.0, 
-0.0, -5.0, -2.0]], [[-4.0, 0.0, -3.0, 0.0, 5.0], [3.0, 1.0, 0.0, -4.0, 0.0], [1.0, 1.0, 3.0, -6.0, 5.0], [3.0, -5.0, 0.0, 2.0, 
--5.0]], [[3.0, -3.0, -7.0, 5.0, 3.0], [7.0, -4.0, -3.0, 7.0, -7.0], [6.0, 4.0, -7.0, 5.0, 2.0], [0.0, -5.0, 2.0, 0.0, 4.0]]]])
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank4_offset1(self):
+      arg0=numpy.array([0.0, -2.0, -6.0])
+      arg1=Data(numpy.array([[[[0.0, 0.0], [-6.0, -6.0]], [[-6.0, 6.0], [0.0, -6.0]], [[-3.0, 0.0], [3.0, 4.0]], [[0.0, -7.0], 
+[-5.0, -4.0]], [[1.0, 0.0], [2.0, -2.0]], [[7.0, -4.0], [-2.0, -5.0]]], [[[3.0, -7.0], [2.0, 0.0]], [[3.0, -5.0], [-5.0, 0.0]], 
+[[6.0, -7.0], [-6.0, 2.0]], [[-4.0, -1.0], [0.0, -4.0]], [[-2.0, -6.0], [4.0, 6.0]], [[-4.0, -3.0], [-6.0, -2.0]]], [[[-7.0, 
+-3.0], [-3.0, 4.0]], [[-5.0, -7.0], [-5.0, 3.0]], [[5.0, 3.0], [4.0, 3.0]], [[3.0, 3.0], [3.0, 7.0]], [[1.0, 3.0], [-4.0, 
+5.0]], [[6.0, 3.0], [7.0, -2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[6.0, 6.0], [3.0, 3.0]], [[7.0, -4.0], [2.0, 7.0]], [[4.0, -5.0], [-3.0, -2.0]], 
+[[-7.0, 5.0], [-6.0, 1.0]], [[7.0, 0.0], [-5.0, -6.0]], [[0.0, 4.0], [6.0, 0.0]]], [[[1.0, 7.0], [5.0, 6.0]], [[7.0, -6.0], 
+[4.0, 4.0]], [[-3.0, -7.0], [-4.0, 4.0]], [[-7.0, 4.0], [6.0, 3.0]], [[-2.0, 7.0], [0.0, 3.0]], [[0.0, -3.0], [1.0, 5.0]]], 
+[[[0.0, 7.0], [-6.0, 3.0]], [[1.0, -2.0], [-6.0, -7.0]], [[-7.0, -4.0], [7.0, -6.0]], [[1.0, -4.0], [7.0, 4.0]], [[-1.0, 5.0], 
+[-5.0, -3.0]], [[0.0, 7.0], [-7.0, -5.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[36.0, 32.0], [14.0, -24.0]], [[24.0, 52.0], [40.0, -18.0]], [[-42.0, -4.0], [-12.0, -22.0]], 
+[[-10.0, -16.0], [-18.0, -34.0]], [[-2.0, -6.0], [16.0, -42.0]], [[-28.0, -12.0], [-30.0, 16.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-2.0, -56.0], [26.0, -30.0]], [[-20.0, 24.0], [28.0, 34.0]], [[48.0, 38.0], [-34.0, 
+28.0]], [[8.0, 16.0], [-54.0, -30.0]], [[10.0, -44.0], [30.0, 12.0]], [[0.0, -36.0], [40.0, 20.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank0_taggedData_rank4_offset0(self):
+      arg0=numpy.array(2.0)
+      arg1=Data(numpy.array([[[[-6.0, -4.0, 7.0, -7.0], [4.0, 7.0, -3.0, 5.0], [1.0, -1.0, -7.0, 5.0]], [[6.0, -6.0, -7.0, 
+0.0], [6.0, 2.0, -3.0, -5.0], [-7.0, 2.0, 2.0, 5.0]]], [[[2.0, 3.0, 6.0, -5.0], [-5.0, -5.0, 6.0, 3.0], [-3.0, 5.0, -3.0, 
+5.0]], [[-2.0, 1.0, -3.0, 0.0], [1.0, 2.0, 5.0, 2.0], [0.0, 2.0, -5.0, 7.0]]], [[[4.0, 3.0, -3.0, -4.0], [-5.0, -6.0, -5.0, 
+5.0], [-7.0, -2.0, 5.0, 0.0]], [[6.0, 6.0, 4.0, -1.0], [-4.0, -1.0, -2.0, -1.0], [3.0, 6.0, 0.0, -7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 5.0, 7.0, -1.0], [2.0, 3.0, 0.0, 0.0], [1.0, 2.0, 7.0, -2.0]], [[2.0, -1.0, 
+7.0, -5.0], [-7.0, -4.0, 0.0, 0.0], [-2.0, 6.0, 1.0, -3.0]]], [[[-3.0, 1.0, 5.0, -7.0], [0.0, 5.0, 0.0, 5.0], [5.0, 7.0, 4.0, 
+-7.0]], [[7.0, -6.0, 0.0, 0.0], [6.0, -2.0, -7.0, 0.0], [-1.0, 0.0, -6.0, -3.0]]], [[[3.0, 7.0, 0.0, -3.0], [0.0, 7.0, 5.0, 
+3.0], [1.0, -7.0, -6.0, 3.0]], [[-6.0, 4.0, 3.0, -6.0], [-6.0, 4.0, -4.0, 3.0], [4.0, 0.0, 5.0, 0.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-12.0, -8.0, 14.0, -14.0], [8.0, 14.0, -6.0, 10.0], [2.0, -2.0, -14.0, 10.0]], [[12.0, -12.0, 
+-14.0, 0.0], [12.0, 4.0, -6.0, -10.0], [-14.0, 4.0, 4.0, 10.0]]], [[[4.0, 6.0, 12.0, -10.0], [-10.0, -10.0, 12.0, 6.0], [-6.0, 
+10.0, -6.0, 10.0]], [[-4.0, 2.0, -6.0, 0.0], [2.0, 4.0, 10.0, 4.0], [0.0, 4.0, -10.0, 14.0]]], [[[8.0, 6.0, -6.0, -8.0], 
+[-10.0, -12.0, -10.0, 10.0], [-14.0, -4.0, 10.0, 0.0]], [[12.0, 12.0, 8.0, -2.0], [-8.0, -2.0, -4.0, -2.0], [6.0, 12.0, 0.0, 
+-14.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-8.0, 10.0, 14.0, -2.0], [4.0, 6.0, 0.0, 0.0], [2.0, 4.0, 14.0, -4.0]], [[4.0, -2.0, 
+14.0, -10.0], [-14.0, -8.0, 0.0, 0.0], [-4.0, 12.0, 2.0, -6.0]]], [[[-6.0, 2.0, 10.0, -14.0], [0.0, 10.0, 0.0, 10.0], [10.0, 
+14.0, 8.0, -14.0]], [[14.0, -12.0, 0.0, 0.0], [12.0, -4.0, -14.0, 0.0], [-2.0, 0.0, -12.0, -6.0]]], [[[6.0, 14.0, 0.0, -6.0], 
+[0.0, 14.0, 10.0, 6.0], [2.0, -14.0, -12.0, 6.0]], [[-12.0, 8.0, 6.0, -12.0], [-12.0, 8.0, -8.0, 6.0], [8.0, 0.0, 10.0, 
+0.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank0_offset0(self):
+      arg0=numpy.array([-7.0, -1.0])
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-28.0, -4.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[0.0, 2.0], [5.0, 1.0], [-7.0, -6.0]])
+      arg1=Data(numpy.array([4.0, -2.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 7.0, 4.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-17.0, 0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([7.0, -11.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[[-2.0, 3.0], [4.0, -1.0], [-2.0, 2.0]], [[-3.0, 0.0], [-6.0, 2.0], [-7.0, 6.0]]])
+      arg1=Data(numpy.array([[4.0, 4.0, -5.0], [4.0, -7.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, 2.0, 0.0], [3.0, 5.0, 4.0]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-7.0, -16.0, 42.0, 22.0, 25.0], [4.0, 44.0, 67.0, -49.0, -39.0], [-2.0, 28.0, -17.0, -34.0, 
--24.0], [38.0, 1.0, 13.0, 10.0, 59.0]], [[-14.0, -64.0, 107.0, 45.0, -6.0], [-26.0, 44.0, 28.0, -74.0, 36.0], [-12.0, -51.0, 
--46.0, 40.0, -10.0], [30.0, -48.0, -33.0, 7.0, 13.0]], [[6.0, -65.0, 38.0, 18.0, -15.0], [41.0, 68.0, -19.0, -66.0, -24.0], 
-[59.0, 83.0, -33.0, 14.0, -12.0], [3.0, -74.0, -9.0, 37.0, -33.0]], [[-22.0, 5.0, 18.0, 16.0, 33.0], [-38.0, 1.0, 33.0, 41.0, 
--1.0], [-11.0, -14.0, 7.0, -16.0, 9.0], [-3.0, 28.0, 45.0, 4.0, 3.0]], [[53.0, 68.0, -93.0, -80.0, -56.0], [61.0, -44.0, -15.0, 
--18.0, -15.0], [74.0, 3.0, 63.0, -9.0, -5.0], [13.0, -8.0, -13.0, -33.0, -64.0]]], [[[14.0, 15.0, -77.0, -29.0, -17.0], [37.0, 
--22.0, -73.0, 36.0, -10.0], [5.0, 48.0, 9.0, 2.0, 10.0], [-31.0, 4.0, -12.0, 0.0, -24.0]], [[-6.0, -36.0, 32.0, 10.0, -8.0], 
-[-2.0, 28.0, -6.0, -24.0, 14.0], [12.0, -12.0, -18.0, 22.0, 2.0], [18.0, -28.0, -4.0, 0.0, -26.0]], [[-19.0, -15.0, 52.0, 46.0, 
-16.0], [-50.0, -21.0, -18.0, 38.0, 38.0], [-23.0, -8.0, -14.0, 28.0, 15.0], [-75.0, -11.0, -4.0, 40.0, 0.0]], [[21.0, 52.0, 
--85.0, -50.0, -10.0], [29.0, -29.0, -19.0, 52.0, -29.0], [65.0, 48.0, 56.0, -26.0, 12.0], [-24.0, 13.0, 45.0, -2.0, -70.0]], 
-[[-3.0, -11.0, 29.0, 24.0, 7.0], [-16.0, 1.0, -14.0, 32.0, 1.0], [64.0, 63.0, 13.0, 10.0, 14.0], [-81.0, -41.0, 36.0, 59.0, 
--67.0]]], [[[42.0, 33.0, 13.0, -34.0, -42.0], [26.0, -6.0, 49.0, -57.0, -10.0], [129.0, 12.0, 57.0, -1.0, -11.0], [-4.0, -59.0, 
-17.0, 12.0, -92.0]], [[8.0, -14.0, 5.0, -2.0, 5.0], [28.0, 44.0, 18.0, -10.0, -49.0], [103.0, 103.0, 19.0, -24.0, -3.0], 
-[-18.0, -44.0, 58.0, 43.0, -69.0]], [[-38.0, -95.0, 86.0, 58.0, 19.0], [-24.0, 69.0, -11.0, -37.0, 23.0], [-55.0, -18.0, -77.0, 
-34.0, -1.0], [35.0, -26.0, -21.0, 8.0, 35.0]], [[-32.0, -57.0, 47.0, 52.0, 46.0], [-1.0, 64.0, 27.0, -38.0, -35.0], [-84.0, 
-36.0, -70.0, -26.0, -23.0], [43.0, 20.0, -15.0, 10.0, 126.0]], [[-15.0, -40.0, 29.0, 18.0, 0.0], [-12.0, 22.0, -21.0, -5.0, 
-22.0], [-17.0, -19.0, -28.0, 26.0, 7.0], [10.0, -15.0, -9.0, -1.0, -10.0]]], [[[15.0, 31.0, -85.0, -49.0, -24.0], [32.0, -31.0, 
--44.0, 14.0, 4.0], [-37.0, -35.0, 10.0, 0.0, 3.0], [37.0, 37.0, -31.0, -53.0, 11.0]], [[54.0, 72.0, -80.0, -57.0, -31.0], 
-[71.0, -30.0, 14.0, -27.0, -60.0], [86.0, 86.0, 60.0, -45.0, -21.0], [-21.0, -11.0, 1.0, 10.0, -18.0]], [[-1.0, 11.0, 34.0, 
-5.0, 17.0], [-18.0, 17.0, 64.0, 8.0, -23.0], [86.0, 32.0, 37.0, -24.0, 2.0], [-15.0, -19.0, 73.0, 30.0, -62.0]], [[-19.0, 11.0, 
--8.0, -2.0, 30.0], [-18.0, 7.0, 44.0, 12.0, -12.0], [-59.0, -46.0, -6.0, -30.0, -5.0], [61.0, 59.0, 18.0, -38.0, 62.0]], 
-[[-15.0, -80.0, 16.0, 21.0, -18.0], [12.0, 39.0, -95.0, -5.0, 32.0], [-14.0, 17.0, -55.0, 57.0, 16.0], [-9.0, -48.0, -34.0, 
-11.0, -41.0]]]])+(1.-msk_ref)*numpy.array([[[[-57.0, 37.0, 3.0, 19.0, 79.0], [23.0, 9.0, -62.0, -28.0, 34.0], [-13.0, 40.0, 
--17.0, 26.0, 11.0], [4.0, -31.0, 47.0, 58.0, -10.0]], [[-18.0, 14.0, 89.0, 20.0, 33.0], [-40.0, 11.0, -69.0, -28.0, 35.0], 
-[-47.0, -8.0, 3.0, 96.0, -37.0], [13.0, 50.0, 75.0, -13.0, 1.0]], [[-18.0, 50.0, 50.0, 15.0, 46.0], [12.0, 24.0, -83.0, 32.0, 
-74.0], [-19.0, 12.0, -50.0, 79.0, -77.0], [-17.0, 35.0, 35.0, 23.0, 37.0]], [[-43.0, 39.0, -12.0, -39.0, 0.0], [-10.0, 23.0, 
-31.0, -47.0, 49.0], [-23.0, 5.0, 28.0, -79.0, 15.0], [-9.0, -18.0, -36.0, 46.0, -31.0]], [[22.0, -50.0, 20.0, -35.0, -68.0], 
-[-60.0, -3.0, 84.0, -69.0, -35.0], [-28.0, -62.0, 86.0, -68.0, 44.0], [49.0, 19.0, -24.0, -83.0, -69.0]]], [[[28.0, -68.0, 
-46.0, -9.0, -32.0], [-37.0, 18.0, 48.0, -26.0, -43.0], [15.0, -69.0, 108.0, -59.0, 25.0], [35.0, 38.0, -20.0, -74.0, -49.0]], 
-[[-9.0, 61.0, 0.0, -56.0, -86.0], [-70.0, -9.0, 58.0, -31.0, 49.0], [-64.0, 19.0, -26.0, -10.0, -22.0], [-62.0, 23.0, -37.0, 
-55.0, 32.0]], [[33.0, 7.0, 30.0, -91.0, -161.0], [-114.0, 11.0, 142.0, -42.0, 22.0], [-52.0, -56.0, 71.0, -99.0, -15.0], 
-[-48.0, 69.0, -100.0, -16.0, -3.0]], [[-34.0, -2.0, 13.0, 44.0, 89.0], [31.0, -3.0, -78.0, -20.0, -4.0], [-1.0, 23.0, -13.0, 
-60.0, 19.0], [39.0, -27.0, 76.0, 4.0, -21.0]], [[23.0, -3.0, -44.0, -35.0, -53.0], [8.0, 0.0, 65.0, 11.0, 1.0], [9.0, -20.0, 
-1.0, -74.0, 2.0], [2.0, -11.0, -67.0, -24.0, -11.0]]], [[[43.0, -27.0, -43.0, 21.0, -29.0], [15.0, -44.0, 9.0, 39.0, -59.0], 
-[18.0, 16.0, -55.0, 49.0, 10.0], [0.0, -17.0, 10.0, -28.0, 32.0]], [[40.0, -32.0, 79.0, -42.0, -98.0], [-88.0, 33.0, 78.0, 1.0, 
--4.0], [0.0, -69.0, 108.0, -62.0, -29.0], [-46.0, 95.0, -65.0, -23.0, 11.0]], [[26.0, -26.0, 49.0, 47.0, 5.0], [-26.0, -24.0, 
--51.0, 31.0, -46.0], [5.0, 14.0, -19.0, 120.0, -17.0], [-24.0, 39.0, 67.0, -2.0, 54.0]], [[-88.0, 104.0, 13.0, -43.0, 35.0], 
-[-14.0, 46.0, -15.0, -45.0, 118.0], [-43.0, 42.0, 3.0, -54.0, -23.0], [-60.0, -7.0, -25.0, 134.0, 4.0]], [[37.0, -41.0, 22.0, 
--2.0, -50.0], [-32.0, 3.0, 42.0, 29.0, -47.0], [34.0, -23.0, 54.0, -24.0, 2.0], [-40.0, 39.0, -33.0, -1.0, 28.0]]], [[[-28.0, 
-36.0, -78.0, 6.0, 54.0], [75.0, -12.0, -29.0, 4.0, 27.0], [2.0, 39.0, -78.0, -6.0, 12.0], [34.0, -75.0, 5.0, 13.0, -18.0]], 
-[[31.0, -31.0, -79.0, 7.0, -6.0], [55.0, -33.0, 23.0, 15.0, -43.0], [20.0, -5.0, -46.0, -16.0, 31.0], [61.0, -56.0, -11.0, 
--72.0, -30.0]], [[1.0, -41.0, 19.0, 20.0, 20.0], [-6.0, -1.0, -5.0, -19.0, -42.0], [15.0, -14.0, 48.0, -1.0, 34.0], [24.0, 0.0, 
-25.0, -22.0, -25.0]], [[29.0, -45.0, -58.0, 23.0, 17.0], [59.0, -23.0, 3.0, 24.0, -53.0], [38.0, -9.0, -23.0, -9.0, 31.0], 
-[58.0, -46.0, 1.0, -67.0, -27.0]], [[-65.0, 73.0, -8.0, -20.0, 37.0], [2.0, 19.0, -21.0, -34.0, 72.0], [-31.0, 44.0, -19.0, 
--20.0, -4.0], [-33.0, -24.0, -1.0, 95.0, 2.0]]]])
+      ref=Data(numpy.array([83.0, -46.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-53.0, 23.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-2.0, 3.0], [-3.0, 4.0]], [[4.0, 1.0], [1.0, 4.0]], [[-4.0, 3.0], [6.0, -6.0]], [[-4.0, 
-4.0], [3.0, -6.0]], [[0.0, 4.0], [7.0, 6.0]], [[7.0, 1.0], [-7.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, -2.0], [2.0, 
-1.0]], [[0.0, -4.0], [-1.0, -1.0]], [[-4.0, 2.0], [4.0, -6.0]], [[-1.0, 6.0], [-5.0, 5.0]], [[-6.0, 0.0], [0.0, -7.0]], [[2.0, 
--1.0], [-1.0, 4.0]]])
-      arg1=0.0
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank3_offset3(self):
+      arg0=numpy.array([[[[-7.0, 0.0], [1.0, -5.0], [4.0, 6.0]], [[0.0, -4.0], [5.0, 7.0], [0.0, 0.0]], [[-2.0, -6.0], [-1.0, 
+-7.0], [3.0, -3.0]], [[1.0, 7.0], [6.0, -3.0], [-1.0, 6.0]]], [[[2.0, 4.0], [-1.0, 5.0], [-3.0, 2.0]], [[6.0, -2.0], [-3.0, 
+5.0], [4.0, -6.0]], [[-6.0, 6.0], [0.0, 5.0], [7.0, -4.0]], [[0.0, -3.0], [3.0, 6.0], [-5.0, -4.0]]]])
+      arg1=Data(numpy.array([[[-3.0, 0.0, 6.0], [-4.0, -2.0, -2.0], [-2.0, -3.0, -3.0], [-4.0, 2.0, 7.0]], [[3.0, 0.0, -5.0], 
+[0.0, 1.0, 0.0], [-5.0, 1.0, 5.0], [2.0, 4.0, -6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 4.0, 1.0], [6.0, 5.0, 4.0], [-4.0, -2.0, -3.0], [-2.0, 5.0, 5.0]], [[1.0, -2.0, 
+4.0], [0.0, 1.0, 4.0], [7.0, 0.0, -1.0], [-3.0, 1.0, -7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([159.0, 92.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([51.0, 117.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank1_offset0(self):
+      arg0=numpy.array([3.0, 4.0])
+      arg1=Data(numpy.array([-6.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, 4.0]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], 
-[0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-0.0, -0.0], [0.0, 0.0]], 
-[[0.0, -0.0], [-0.0, -0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[0.0, -0.0], 
-[-0.0, 0.0]]])
+      ref=Data(numpy.array([[-18.0, -18.0], [-24.0, -24.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[12.0, 12.0], [16.0, 16.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[1.0, 6.0], [-4.0, -5.0]], [[-1.0, 0.0], [-7.0, 0.0]], [[7.0, 5.0], [-3.0, 5.0]], [[-2.0, 
--6.0], [1.0, 3.0]], [[-6.0, -6.0], [-5.0, 1.0]], [[-7.0, 0.0], [5.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, 7.0], [3.0, 
--4.0]], [[-1.0, 3.0], [6.0, 0.0]], [[-3.0, -2.0], [2.0, 7.0]], [[-2.0, 0.0], [3.0, -4.0]], [[-1.0, -5.0], [-7.0, 1.0]], [[1.0, 
-2.0], [4.0, -7.0]]])
-      arg1=numpy.array(-5.0)
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[-6.0, -4.0], [1.0, 7.0], [3.0, 4.0]])
+      arg1=Data(numpy.array([[-1.0, -5.0], [-1.0, -5.0], [5.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 4.0], [0.0, 3.0], [-6.0, -3.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[20.0, 4.0], [17.0, -43.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-18.0, -30.0], [-24.0, -7.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[[0.0, -4.0], [2.0, -3.0], [7.0, -7.0]], [[7.0, -7.0], [3.0, -6.0], [0.0, -6.0]]])
+      arg1=Data(numpy.array([[[-1.0, 6.0], [-1.0, -4.0], [0.0, 7.0]], [[2.0, 6.0], [3.0, -3.0], [-7.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, -5.0], [-6.0, -2.0], [-6.0, 4.0]], [[5.0, -7.0], [-2.0, 7.0], [3.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[21.0, 74.0], [17.0, -109.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-25.0, -4.0], [31.0, 5.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank4_offset3(self):
+      arg0=numpy.array([[[[-7.0, 0.0], [3.0, -3.0], [-2.0, 1.0]], [[4.0, 7.0], [7.0, 5.0], [7.0, 5.0]], [[5.0, -4.0], [5.0, 
+-5.0], [-7.0, 0.0]], [[3.0, 5.0], [-5.0, -2.0], [7.0, 2.0]]], [[[7.0, 0.0], [-6.0, 0.0], [-2.0, -5.0]], [[-2.0, 7.0], [-6.0, 
+-5.0], [-7.0, -5.0]], [[-1.0, -3.0], [2.0, -1.0], [5.0, 0.0]], [[-7.0, 3.0], [2.0, -2.0], [-2.0, 7.0]]]])
+      arg1=Data(numpy.array([[[[1.0, -5.0], [5.0, -5.0], [0.0, 1.0]], [[-5.0, 1.0], [3.0, -3.0], [2.0, -6.0]], [[5.0, -2.0], 
+[6.0, 3.0], [-2.0, -2.0]], [[-3.0, 0.0], [6.0, 4.0], [0.0, 6.0]]], [[[0.0, -1.0], [6.0, -4.0], [7.0, -6.0]], [[7.0, -6.0], 
+[2.0, 0.0], [0.0, 0.0]], [[0.0, 3.0], [4.0, 5.0], [3.0, 2.0]], [[-1.0, -2.0], [3.0, -3.0], [4.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -3.0], [-7.0, 1.0], [7.0, 0.0]], [[-6.0, -6.0], [2.0, 0.0], [-2.0, -4.0]], 
+[[-5.0, 4.0], [-5.0, -5.0], [2.0, 0.0]], [[0.0, 5.0], [-3.0, 7.0], [7.0, 0.0]]], [[[5.0, -5.0], [-2.0, 7.0], [-6.0, -2.0]], 
+[[-1.0, -7.0], [3.0, 3.0], [1.0, -1.0]], [[-6.0, -7.0], [5.0, 1.0], [7.0, 3.0]], [[0.0, -1.0], [-1.0, 6.0], [-3.0, 7.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[5.0, 66.0], [-83.0, -51.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[11.0, -94.0], [48.0, -40.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank2_offset0(self):
+      arg0=numpy.array([5.0, 3.0])
+      arg1=Data(numpy.array([[0.0, -4.0, 0.0, -1.0, 0.0], [-2.0, -7.0, 1.0, -2.0, 0.0], [0.0, 0.0, 6.0, -7.0, 5.0], [-6.0, 3.0, 
+2.0, -3.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, -6.0, -5.0, 0.0, 5.0], [-1.0, 1.0, 3.0, -2.0, 1.0], [3.0, 2.0, -2.0, 6.0, 
+-2.0], [7.0, -6.0, -5.0, 5.0, -5.0]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-5.0, -30.0], [20.0, 25.0]], [[5.0, -0.0], [35.0, -0.0]], [[-35.0, -25.0], [15.0, -25.0]], 
-[[10.0, 30.0], [-5.0, -15.0]], [[30.0, 30.0], [25.0, -5.0]], [[35.0, -0.0], [-25.0, 
--25.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, -35.0], [-15.0, 20.0]], [[5.0, -15.0], [-30.0, -0.0]], [[15.0, 10.0], [-10.0, 
--35.0]], [[10.0, -0.0], [-15.0, 20.0]], [[5.0, 25.0], [35.0, -5.0]], [[-5.0, -10.0], [-20.0, 35.0]]])
+      ref=Data(numpy.array([[[0.0, -20.0, 0.0, -5.0, 0.0], [-10.0, -35.0, 5.0, -10.0, 0.0], [0.0, 0.0, 30.0, -35.0, 25.0], 
+[-30.0, 15.0, 10.0, -15.0, 25.0]], [[0.0, -12.0, 0.0, -3.0, 0.0], [-6.0, -21.0, 3.0, -6.0, 0.0], [0.0, 0.0, 18.0, -21.0, 15.0], 
+[-18.0, 9.0, 6.0, -9.0, 15.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-30.0, -30.0, -25.0, 0.0, 25.0], [-5.0, 5.0, 15.0, -10.0, 5.0], [15.0, 10.0, -10.0, 
+30.0, -10.0], [35.0, -30.0, -25.0, 25.0, -25.0]], [[-18.0, -18.0, -15.0, 0.0, 15.0], [-3.0, 3.0, 9.0, -6.0, 3.0], [9.0, 6.0, 
+-6.0, 18.0, -6.0], [21.0, -18.0, -15.0, 15.0, -15.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 2.0], [-2.0, -3.0]], [[0.0, -5.0], [-5.0, 4.0]], [[3.0, -5.0], [4.0, -2.0]], [[7.0, 
-0.0], [-6.0, 2.0]], [[-5.0, -5.0], [3.0, -1.0]], [[-5.0, 5.0], [-6.0, -5.0]]], [[[-1.0, 4.0], [-1.0, -4.0]], [[-3.0, 0.0], 
-[5.0, 6.0]], [[1.0, 4.0], [-5.0, -7.0]], [[1.0, 6.0], [-2.0, 4.0]], [[-3.0, 7.0], [4.0, -5.0]], [[1.0, 1.0], [0.0, -2.0]]], 
-[[[-2.0, 0.0], [6.0, 1.0]], [[-5.0, 1.0], [3.0, 2.0]], [[-4.0, 5.0], [3.0, 1.0]], [[6.0, -6.0], [3.0, 1.0]], [[-6.0, 7.0], 
-[-3.0, 0.0]], [[-7.0, 2.0], [-4.0, -6.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -7.0], [-2.0, 4.0]], [[0.0, -1.0], [-6.0, 
-5.0]], [[0.0, -2.0], [-4.0, 0.0]], [[-3.0, 4.0], [-7.0, -1.0]], [[-7.0, 7.0], [-1.0, 0.0]], [[0.0, 0.0], [3.0, 0.0]]], [[[-1.0, 
-3.0], [4.0, 3.0]], [[-2.0, 0.0], [-1.0, 2.0]], [[-6.0, -1.0], [-4.0, -4.0]], [[2.0, 1.0], [-5.0, 6.0]], [[0.0, -4.0], [-6.0, 
-4.0]], [[-6.0, -4.0], [4.0, -3.0]]], [[[-3.0, 7.0], [3.0, -2.0]], [[7.0, -3.0], [0.0, 6.0]], [[-6.0, 4.0], [4.0, -5.0]], 
-[[-6.0, 0.0], [-5.0, 2.0]], [[-3.0, -5.0], [-3.0, -7.0]], [[-1.0, 7.0], [7.0, 7.0]]]])
-      arg1=numpy.array([-1.0, 2.0, -3.0])
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank3_offset1(self):
+      arg0=numpy.array([[2.0, -7.0], [3.0, 7.0], [3.0, 0.0]])
+      arg1=Data(numpy.array([[[5.0, -4.0, -2.0, -1.0, 3.0], [2.0, 5.0, -2.0, -3.0, 5.0], [-6.0, 7.0, 0.0, 0.0, 7.0], [4.0, 
+-2.0, 7.0, -3.0, -6.0]], [[-2.0, 0.0, -2.0, 2.0, -2.0], [-7.0, 0.0, 6.0, 1.0, -3.0], [-3.0, -4.0, -7.0, 6.0, 0.0], [1.0, -3.0, 
+-1.0, 0.0, 5.0]], [[-6.0, -3.0, 7.0, 2.0, -5.0], [-3.0, 6.0, 4.0, 7.0, 1.0], [5.0, 1.0, -1.0, 1.0, -5.0], [-2.0, -4.0, 1.0, 
+2.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 2.0, 7.0, -3.0, -3.0], [5.0, 4.0, 0.0, 6.0, -4.0], [6.0, -4.0, -7.0, -2.0, 
+-7.0], [-7.0, -3.0, -4.0, -1.0, -3.0]], [[0.0, -5.0, 3.0, -5.0, -1.0], [1.0, -5.0, -7.0, -7.0, 5.0], [-3.0, 3.0, 6.0, -1.0, 
+-4.0], [-4.0, -6.0, 1.0, 5.0, -6.0]], [[-5.0, 6.0, -6.0, -2.0, -4.0], [5.0, -4.0, 4.0, -4.0, -4.0], [-3.0, 4.0, -5.0, -2.0, 
+1.0], [3.0, 0.0, 3.0, 7.0, -7.0]]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[4.0, 6.0], [-18.0, -8.0]], [[9.0, 2.0], [6.0, 2.0]], [[11.0, -2.0], [-23.0, -15.0]], [[-23.0, 
-30.0], [-7.0, 3.0]], [[17.0, -2.0], [14.0, -9.0]], [[28.0, -9.0], [18.0, 19.0]]])+(1.-msk_ref)*numpy.array([[[7.0, -8.0], [1.0, 
-8.0]], [[-25.0, 10.0], [4.0, -19.0]], [[6.0, -12.0], [-16.0, 7.0]], [[25.0, -2.0], [12.0, 7.0]], [[16.0, 0.0], [-2.0, 29.0]], 
-[[-9.0, -29.0], [-16.0, -27.0]]])
+      ref=Data(numpy.array([[[-14.0, -17.0, 11.0, 10.0, -15.0], [-26.0, 28.0, 26.0, 18.0, 4.0], [-6.0, 5.0, -24.0, 21.0, -1.0], 
+[5.0, -25.0, 14.0, 0.0, -3.0]], [[-49.0, 28.0, 0.0, 21.0, -35.0], [-63.0, -35.0, 56.0, 28.0, -56.0], [21.0, -77.0, -49.0, 42.0, 
+-49.0], [-21.0, -7.0, -56.0, 21.0, 77.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-13.0, 7.0, 5.0, -27.0, -21.0], [28.0, -19.0, -9.0, -21.0, -5.0], [-6.0, 13.0, -11.0, 
+-13.0, -23.0], [-17.0, -24.0, 4.0, 34.0, -45.0]], [[-7.0, -49.0, -28.0, -14.0, 14.0], [-28.0, -63.0, -49.0, -91.0, 63.0], 
+[-63.0, 49.0, 91.0, 7.0, 21.0], [21.0, -21.0, 35.0, 42.0, -21.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, 2.0], [6.0, -3.0]], [[3.0, 6.0], [-3.0, 7.0]], [[0.0, -4.0], [1.0, -1.0]], [[-2.0, 
--1.0], [1.0, 6.0]], [[-2.0, -1.0], [-4.0, -7.0]], [[3.0, 2.0], [3.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 7.0], [1.0, 
-2.0]], [[0.0, 6.0], [-5.0, -5.0]], [[-3.0, -2.0], [-6.0, 2.0]], [[-4.0, -2.0], [7.0, 0.0]], [[-4.0, -3.0], [3.0, -3.0]], [[3.0, 
--6.0], [5.0, -6.0]]])
-      arg1=numpy.array([-3.0, -7.0])
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[[5.0, 7.0], [5.0, -1.0], [-5.0, 0.0]], [[0.0, 0.0], [7.0, -5.0], [7.0, -4.0]]])
+      arg1=Data(numpy.array([[[[2.0, 0.0, 0.0, -5.0, 1.0], [-7.0, 6.0, -5.0, 0.0, -3.0], [4.0, 5.0, -3.0, -6.0, 7.0], [-2.0, 
+7.0, 0.0, 0.0, -1.0]], [[-6.0, 2.0, 6.0, -5.0, 4.0], [-6.0, -2.0, 0.0, -1.0, 3.0], [5.0, 3.0, 2.0, 5.0, 5.0], [0.0, -7.0, 6.0, 
+-1.0, 6.0]], [[2.0, 2.0, 6.0, -3.0, -6.0], [-7.0, -1.0, -6.0, -6.0, 1.0], [6.0, 6.0, 3.0, -5.0, 0.0], [2.0, -1.0, 0.0, -1.0, 
+-3.0]]], [[[3.0, -5.0, 7.0, 7.0, -2.0], [0.0, -1.0, -3.0, 0.0, 7.0], [1.0, 3.0, 5.0, -4.0, 3.0], [1.0, 6.0, -3.0, 0.0, -4.0]], 
+[[-1.0, -6.0, -3.0, 4.0, -2.0], [3.0, -3.0, 4.0, -3.0, 7.0], [-4.0, 0.0, -6.0, -7.0, -4.0], [-1.0, 5.0, 0.0, 0.0, 6.0]], [[0.0, 
+-1.0, 2.0, 5.0, 0.0], [-3.0, 0.0, -3.0, -3.0, 1.0], [5.0, 2.0, 4.0, 3.0, 1.0], [0.0, 6.0, -1.0, 4.0, 
+7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, 4.0, -2.0, -1.0, 1.0], [5.0, 5.0, 1.0, 6.0, -2.0], [5.0, -4.0, 7.0, 1.0, 
+-4.0], [3.0, 2.0, 6.0, 6.0, -1.0]], [[2.0, 0.0, 7.0, 4.0, 4.0], [-3.0, -3.0, 7.0, 2.0, 5.0], [-5.0, 0.0, 3.0, -2.0, 2.0], 
+[-2.0, -7.0, 7.0, 0.0, -2.0]], [[-1.0, 0.0, -1.0, -2.0, 3.0], [1.0, 4.0, -6.0, -2.0, -6.0], [3.0, 0.0, 7.0, -2.0, 6.0], [-3.0, 
+-6.0, 6.0, 6.0, 3.0]]], [[[-2.0, 7.0, 4.0, -1.0, -7.0], [7.0, 2.0, 7.0, -4.0, 3.0], [-1.0, 6.0, 5.0, 7.0, -2.0], [2.0, 5.0, 
+-4.0, -3.0, 6.0]], [[0.0, -5.0, 0.0, 2.0, 2.0], [5.0, 2.0, 2.0, 4.0, 4.0], [0.0, -3.0, 4.0, 4.0, -3.0], [2.0, -7.0, -5.0, 3.0, 
+7.0]], [[1.0, -3.0, 3.0, 0.0, 3.0], [0.0, -1.0, 2.0, 7.0, 6.0], [2.0, 7.0, 6.0, -6.0, -6.0], [0.0, -6.0, -7.0, -5.0, -2.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-37.0, -49.0, -7.0, 28.0, 41.0], [-30.0, 4.0, 12.0, -17.0, 51.0], [22.0, 24.0, -34.0, -8.0, 
+39.0], [-27.0, 82.0, 23.0, 28.0, 131.0]], [[25.0, 32.0, 1.0, -70.0, 13.0], [-46.0, 59.0, -43.0, 28.0, -63.0], [23.0, 24.0, 
+-9.0, -24.0, 60.0], [-9.0, 7.0, -2.0, -15.0, -71.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[7.0, -36.0, 51.0, 39.0, 45.0], [40.0, -3.0, 98.0, 127.0, 115.0], [-1.0, 8.0, 85.0, 
+-9.0, -103.0], [34.0, -86.0, -49.0, -14.0, 5.0]], [[-27.0, 65.0, -33.0, -21.0, -19.0], [13.0, 32.0, -18.0, -8.0, -63.0], [32.0, 
+-41.0, 2.0, 13.0, 9.0], [13.0, 80.0, 88.0, 47.0, -32.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank1_taggedData_rank3_offset0(self):
+      arg0=numpy.array([6.0, 0.0])
+      arg1=Data(numpy.array([[[1.0, -6.0], [3.0, 0.0]], [[0.0, -5.0], [0.0, 4.0]], [[4.0, -2.0], [7.0, -3.0]], [[2.0, -3.0], 
+[-5.0, 3.0]], [[0.0, -2.0], [-3.0, 0.0]], [[5.0, -3.0], [-4.0, 1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[5.0, -3.0], [3.0, -3.0]], [[2.0, 6.0], [0.0, 0.0]], [[-4.0, 5.0], [-7.0, 0.0]], 
+[[-4.0, 5.0], [6.0, 4.0]], [[-5.0, 4.0], [0.0, 2.0]], [[-2.0, 6.0], [-5.0, -6.0]]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[3.0, 7.0], [-6.0, -14.0]], [[-18.0, -42.0], [9.0, 21.0]]], [[[-9.0, -21.0], [-18.0, -42.0]], 
-[[9.0, 21.0], [-21.0, -49.0]]], [[[0.0, 0.0], [12.0, 28.0]], [[-3.0, -7.0], [3.0, 7.0]]], [[[6.0, 14.0], [3.0, 7.0]], [[-3.0, 
--7.0], [-18.0, -42.0]]], [[[6.0, 14.0], [3.0, 7.0]], [[12.0, 28.0], [21.0, 49.0]]], [[[-9.0, -21.0], [-6.0, -14.0]], [[-9.0, 
--21.0], [12.0, 28.0]]]])+(1.-msk_ref)*numpy.array([[[[-9.0, -21.0], [-21.0, -49.0]], [[-3.0, -7.0], [-6.0, -14.0]]], [[[0.0, 
-0.0], [-18.0, -42.0]], [[15.0, 35.0], [15.0, 35.0]]], [[[9.0, 21.0], [6.0, 14.0]], [[18.0, 42.0], [-6.0, -14.0]]], [[[12.0, 
-28.0], [6.0, 14.0]], [[-21.0, -49.0], [0.0, 0.0]]], [[[12.0, 28.0], [9.0, 21.0]], [[-9.0, -21.0], [9.0, 21.0]]], [[[-9.0, 
--21.0], [18.0, 42.0]], [[-15.0, -35.0], [18.0, 42.0]]]])
+      ref=Data(numpy.array([[[[6.0, -36.0], [18.0, 0.0]], [[0.0, -30.0], [0.0, 24.0]], [[24.0, -12.0], [42.0, -18.0]], [[12.0, 
+-18.0], [-30.0, 18.0]], [[0.0, -12.0], [-18.0, 0.0]], [[30.0, -18.0], [-24.0, 6.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[30.0, -18.0], [18.0, -18.0]], [[12.0, 36.0], [0.0, 0.0]], [[-24.0, 30.0], [-42.0, 
+0.0]], [[-24.0, 30.0], [36.0, 24.0]], [[-30.0, 24.0], [0.0, 12.0]], [[-12.0, 36.0], [-30.0, -36.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 0.0], [-4.0, -7.0]], [[-1.0, 5.0], [1.0, -7.0]], [[-2.0, 5.0], [-5.0, 2.0]], [[7.0, 
--2.0], [-2.0, 4.0]], [[2.0, -7.0], [3.0, 4.0]], [[1.0, 2.0], [0.0, 7.0]]], [[[3.0, 0.0], [5.0, -7.0]], [[1.0, 6.0], [0.0, 
--6.0]], [[-4.0, -4.0], [1.0, 5.0]], [[-5.0, -1.0], [1.0, 2.0]], [[4.0, 6.0], [-6.0, 0.0]], [[6.0, -6.0], [-4.0, -4.0]]], 
-[[[-4.0, 6.0], [-1.0, -7.0]], [[-2.0, -3.0], [2.0, -3.0]], [[-1.0, -6.0], [-2.0, 0.0]], [[0.0, 0.0], [5.0, 1.0]], [[-6.0, 
--4.0], [3.0, -3.0]], [[7.0, 6.0], [-2.0, -4.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -7.0], [4.0, -7.0]], [[-7.0, -6.0], 
-[-7.0, 4.0]], [[-4.0, -5.0], [6.0, -5.0]], [[1.0, -6.0], [1.0, -2.0]], [[6.0, -7.0], [0.0, -5.0]], [[4.0, -2.0], [-4.0, 
--4.0]]], [[[-4.0, 1.0], [1.0, -2.0]], [[1.0, -7.0], [-2.0, -1.0]], [[-5.0, -7.0], [-5.0, 3.0]], [[1.0, -4.0], [-5.0, 6.0]], 
-[[-2.0, 7.0], [-1.0, -1.0]], [[5.0, -5.0], [-6.0, -5.0]]], [[[6.0, 0.0], [6.0, 0.0]], [[3.0, -5.0], [6.0, -5.0]], [[-2.0, 
--7.0], [4.0, 0.0]], [[-7.0, 2.0], [-6.0, 5.0]], [[1.0, -4.0], [-1.0, 1.0]], [[1.0, 0.0], [-4.0, 0.0]]]])
-      arg1=numpy.array([[6.0, 4.0], [-1.0, -3.0], [5.0, -2.0]])
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank4_offset1(self):
+      arg0=numpy.array([[1.0, -3.0], [1.0, 1.0], [-4.0, 3.0]])
+      arg1=Data(numpy.array([[[[-7.0, 1.0], [-6.0, -4.0]], [[7.0, 0.0], [-4.0, 0.0]], [[3.0, 6.0], [4.0, 4.0]], [[4.0, -1.0], 
+[2.0, 0.0]], [[1.0, -3.0], [2.0, -6.0]], [[-5.0, -5.0], [-1.0, 6.0]]], [[[-2.0, -1.0], [3.0, -3.0]], [[-1.0, 5.0], [0.0, 0.0]], 
+[[-1.0, 7.0], [4.0, 7.0]], [[4.0, 3.0], [6.0, 3.0]], [[-2.0, 1.0], [-6.0, 7.0]], [[-6.0, -3.0], [-7.0, 0.0]]], [[[-6.0, -5.0], 
+[0.0, -4.0]], [[-4.0, -3.0], [7.0, -4.0]], [[7.0, 7.0], [-2.0, -2.0]], [[0.0, 0.0], [-5.0, 0.0]], [[0.0, 3.0], [-2.0, 2.0]], 
+[[-1.0, 3.0], [-6.0, -5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, -4.0], [0.0, 0.0]], [[4.0, 2.0], [0.0, -5.0]], [[6.0, -1.0], [2.0, 7.0]], 
+[[-6.0, -7.0], [-4.0, -7.0]], [[5.0, -7.0], [0.0, 3.0]], [[-4.0, -4.0], [-3.0, 3.0]]], [[[7.0, -6.0], [3.0, 6.0]], [[0.0, 0.0], 
+[1.0, 1.0]], [[-1.0, -6.0], [5.0, 5.0]], [[1.0, 0.0], [3.0, 1.0]], [[0.0, 5.0], [3.0, 0.0]], [[0.0, -3.0], [-7.0, 2.0]]], 
+[[[1.0, -7.0], [5.0, 0.0]], [[2.0, 3.0], [5.0, -6.0]], [[0.0, 3.0], [-4.0, 1.0]], [[6.0, 0.0], [-5.0, 6.0]], [[4.0, 0.0], [7.0, 
+5.0]], [[2.0, -4.0], [5.0, 1.0]]]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-23.0, -1.0], [30.0, -12.0]], [[-34.0, -29.0], [-70.0, 7.0]]], [[[-17.0, -3.0], [9.0, 8.0]], 
-[[16.0, 0.0], [-51.0, -4.0]]], [[[-13.0, 6.0], [4.0, 44.0]], [[-41.0, -19.0], [7.0, -7.0]]], [[[47.0, 43.0], [-11.0, -5.0]], 
-[[12.0, -21.0], [27.0, 8.0]]], [[[-22.0, 8.0], [-68.0, -38.0]], [[39.0, 24.0], [9.0, 22.0]]], [[[35.0, -28.0], [48.0, 14.0]], 
-[[-6.0, 16.0], [26.0, 48.0]]]])+(1.-msk_ref)*numpy.array([[[[34.0, 0.0], [-43.0, -31.0]], [[53.0, 1.0], [-40.0, -22.0]]], 
-[[[-28.0, -37.0], [-54.0, 7.0]], [[-10.0, -34.0], [0.0, 29.0]]], [[[-29.0, 3.0], [-58.0, 15.0]], [[61.0, 31.0], [-33.0, 
--29.0]]], [[[-30.0, 15.0], [-22.0, -16.0]], [[-19.0, 31.0], [7.0, -36.0]]], [[[43.0, 28.0], [-69.0, -41.0]], [[-4.0, 5.0], 
-[-24.0, -19.0]]], [[[24.0, -1.0], [-7.0, 7.0]], [[-38.0, 10.0], [-19.0, -1.0]]]])
+      ref=Data(numpy.array([[[[15.0, 20.0], [-3.0, 9.0]], [[22.0, 17.0], [-32.0, 16.0]], [[-26.0, -15.0], [16.0, 19.0]], [[8.0, 
+2.0], [28.0, 3.0]], [[-1.0, -14.0], [4.0, -7.0]], [[-7.0, -20.0], [16.0, 26.0]]], [[[1.0, -19.0], [21.0, -3.0]], [[-34.0, 
+-4.0], [33.0, -12.0]], [[11.0, 10.0], [-14.0, -11.0]], [[-8.0, 6.0], [-15.0, 3.0]], [[-5.0, 19.0], [-18.0, 31.0]], [[6.0, 
+21.0], [-22.0, -33.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 18.0], [-17.0, 6.0]], [[-4.0, -10.0], [-19.0, 20.0]], [[5.0, -19.0], [23.0, 
+8.0]], [[-29.0, -7.0], [19.0, -30.0]], [[-11.0, -2.0], [-25.0, -17.0]], [[-12.0, 9.0], [-30.0, 1.0]]], [[[19.0, -15.0], [18.0, 
+6.0]], [[-6.0, 3.0], [16.0, -2.0]], [[-19.0, 6.0], [-13.0, -13.0]], [[37.0, 21.0], [0.0, 40.0]], [[-3.0, 26.0], [24.0, 6.0]], 
+[[18.0, -3.0], [17.0, -4.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-4.0, -5.0], [0.0, -5.0]], [[-2.0, 0.0], [2.0, 0.0]], [[-5.0, 0.0], [4.0, -4.0]], [[-5.0, 
-6.0], [6.0, -6.0]], [[-1.0, 5.0], [4.0, 0.0]], [[6.0, -1.0], [-5.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[3.0, 4.0], [4.0, 
-6.0]], [[4.0, -6.0], [-6.0, -3.0]], [[3.0, 3.0], [-7.0, -4.0]], [[4.0, -1.0], [-4.0, -6.0]], [[-5.0, -1.0], [2.0, -3.0]], 
-[[-3.0, 7.0], [-2.0, -4.0]]])
-      arg1=Data(1.0,self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[2.0, -1.0, 4.0, -7.0, 1.0], [1.0, 6.0, 0.0, 4.0, 5.0], [6.0, 4.0, -4.0, 0.0, 1.0], [6.0, -4.0, 0.0, 
+7.0, -6.0]])
+      arg1=Data(-4.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-4.0, -5.0], [0.0, -5.0]], [[-2.0, 0.0], [2.0, 0.0]], [[-5.0, 0.0], [4.0, -4.0]], [[-5.0, 
-6.0], [6.0, -6.0]], [[-1.0, 5.0], [4.0, 0.0]], [[6.0, -1.0], [-5.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[3.0, 4.0], [4.0, 
-6.0]], [[4.0, -6.0], [-6.0, -3.0]], [[3.0, 3.0], [-7.0, -4.0]], [[4.0, -1.0], [-4.0, -6.0]], [[-5.0, -1.0], [2.0, -3.0]], 
-[[-3.0, 7.0], [-2.0, -4.0]]])
+      ref=Data(numpy.array([[-8.0, 4.0, -16.0, 28.0, -4.0], [-4.0, -24.0, -0.0, -16.0, -20.0], [-24.0, -16.0, 16.0, -0.0, 
+-4.0], [-24.0, 16.0, -0.0, -28.0, 24.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-8.0, 4.0, -16.0, 28.0, -4.0], [-4.0, -24.0, -0.0, -16.0, -20.0], [-24.0, -16.0, 16.0, 
+-0.0, -4.0], [-24.0, 16.0, -0.0, -28.0, 24.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-3.0, 0.0], [-4.0, 0.0]], [[-1.0, 0.0], [0.0, -5.0]], [[-6.0, -7.0], [-1.0, 0.0]], [[0.0, 
--4.0], [0.0, 4.0]], [[-5.0, 5.0], [7.0, -3.0]], [[-6.0, -6.0], [6.0, 3.0]]], [[[-7.0, -1.0], [0.0, 7.0]], [[2.0, 4.0], [6.0, 
-4.0]], [[-2.0, 0.0], [-3.0, 0.0]], [[5.0, -5.0], [-1.0, -5.0]], [[-5.0, 6.0], [0.0, 0.0]], [[0.0, -4.0], [6.0, -3.0]]], 
-[[[-5.0, -6.0], [4.0, -7.0]], [[-4.0, -6.0], [0.0, -6.0]], [[-3.0, -1.0], [7.0, -6.0]], [[1.0, -5.0], [-4.0, -7.0]], [[0.0, 
--3.0], [-3.0, -2.0]], [[4.0, -6.0], [-4.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 5.0], [0.0, 3.0]], [[6.0, 0.0], [-3.0, 
-0.0]], [[-3.0, -7.0], [-1.0, -5.0]], [[-3.0, -6.0], [5.0, -7.0]], [[1.0, 0.0], [-1.0, -7.0]], [[1.0, 6.0], [2.0, 3.0]]], 
-[[[-5.0, -1.0], [1.0, 7.0]], [[6.0, 2.0], [1.0, -2.0]], [[-3.0, -2.0], [-4.0, -1.0]], [[-4.0, -3.0], [6.0, 1.0]], [[-4.0, 
--1.0], [3.0, -6.0]], [[2.0, 7.0], [-6.0, -5.0]]], [[[-4.0, -5.0], [6.0, 5.0]], [[-1.0, -6.0], [7.0, -3.0]], [[-3.0, -7.0], 
-[-4.0, 6.0]], [[5.0, 4.0], [7.0, -5.0]], [[-3.0, -1.0], [-6.0, 4.0]], [[4.0, 0.0], [-6.0, 4.0]]]])
-      arg1=Data(numpy.array([2.0, 6.0, 2.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[[3.0, -2.0, -4.0, 4.0, -1.0], [3.0, 4.0, -3.0, 4.0, 5.0], [-6.0, 4.0, -4.0, 2.0, 6.0], [0.0, 2.0, 
+-2.0, 0.0, 1.0]], [[-1.0, 0.0, -7.0, 0.0, 0.0], [-3.0, -2.0, 2.0, 5.0, -4.0], [4.0, 7.0, 7.0, 2.0, -7.0], [3.0, 6.0, 3.0, 2.0, 
+0.0]], [[-5.0, 0.0, 0.0, 6.0, 5.0], [0.0, -1.0, 0.0, 0.0, 5.0], [5.0, -1.0, -5.0, 5.0, -5.0], [7.0, -3.0, 0.0, -5.0, -3.0]]])
+      arg1=Data(numpy.array([-1.0, 5.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-7.0, 5.0, -2.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-43.0, 2.0, -31.0, 38.0, 36.0], [-18.0, -21.0, 13.0, 21.0, 10.0], [61.0, 24.0, 4.0, 43.0, -76.0], 
+[64.0, 7.0, 17.0, -25.0, -22.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-16.0, 14.0, -7.0, -40.0, -3.0], [-36.0, -36.0, 31.0, -3.0, -65.0], [52.0, 9.0, 73.0, 
+-14.0, -67.0], [1.0, 22.0, 29.0, 20.0, -1.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[[[-4.0, 6.0, -5.0, 1.0, 0.0], [-5.0, -2.0, 5.0, -1.0, -3.0], [4.0, -3.0, 3.0, -4.0, 0.0], [0.0, 1.0, 
+1.0, 6.0, 0.0]], [[-6.0, 7.0, 0.0, 3.0, -1.0], [2.0, 0.0, -1.0, -5.0, 5.0], [2.0, -2.0, 3.0, -2.0, 3.0], [-3.0, -7.0, 1.0, 0.0, 
+-4.0]], [[0.0, 2.0, -1.0, -6.0, 6.0], [-4.0, -4.0, 1.0, 3.0, -7.0], [1.0, -7.0, 6.0, -2.0, -2.0], [-4.0, -3.0, 0.0, -6.0, 
+-5.0]]], [[[5.0, -7.0, 2.0, 6.0, -1.0], [5.0, 5.0, -6.0, 0.0, 0.0], [4.0, 3.0, 7.0, 0.0, 1.0], [-2.0, 4.0, 5.0, 7.0, -1.0]], 
+[[6.0, 2.0, -1.0, 7.0, -2.0], [-2.0, 0.0, -1.0, 4.0, -5.0], [3.0, 4.0, 7.0, 3.0, 5.0], [-6.0, 6.0, -2.0, -2.0, 3.0]], [[-1.0, 
+0.0, 0.0, -3.0, -3.0], [3.0, 0.0, 2.0, -6.0, 2.0], [-6.0, -7.0, 7.0, -7.0, -6.0], [1.0, 3.0, 6.0, -7.0, 1.0]]]])
+      arg1=Data(numpy.array([[-6.0, -3.0, -7.0], [2.0, 5.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 7.0, 2.0], [0.0, -5.0, 1.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[77.0, -75.0, 36.0, 59.0, -66.0], [67.0, 50.0, -41.0, -10.0, 37.0], [-44.0, 64.0, 15.0, 24.0, 2.0], 
+[8.0, 89.0, 21.0, -25.0, 65.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-53.0, 13.0, 28.0, -34.0, 12.0], [44.0, 2.0, -23.0, -50.0, 63.0], [-25.0, -40.0, 
+-10.0, -20.0, -14.0], [2.0, -87.0, 18.0, -39.0, -52.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank1_offset0(self):
+      arg0=numpy.array([[0.0, -3.0, 0.0, -3.0, -1.0], [-1.0, 0.0, 4.0, -2.0, 5.0], [7.0, 0.0, -1.0, -2.0, 4.0], [5.0, 5.0, 1.0, 
+-2.0, -2.0]])
+      arg1=Data(numpy.array([-3.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, 4.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0], [9.0, -3.0], [0.0, 0.0], [9.0, -3.0], [3.0, -1.0]], [[3.0, -1.0], [0.0, 0.0], [-12.0, 
+4.0], [6.0, -2.0], [-15.0, 5.0]], [[-21.0, 7.0], [0.0, 0.0], [3.0, -1.0], [6.0, -2.0], [-12.0, 4.0]], [[-15.0, 5.0], [-15.0, 
+5.0], [-3.0, 1.0], [6.0, -2.0], [6.0, -2.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0], [0.0, -12.0], [0.0, 0.0], [0.0, -12.0], [0.0, -4.0]], [[0.0, -4.0], [0.0, 
+0.0], [0.0, 16.0], [0.0, -8.0], [0.0, 20.0]], [[0.0, 28.0], [0.0, 0.0], [0.0, -4.0], [0.0, -8.0], [0.0, 16.0]], [[0.0, 20.0], 
+[0.0, 20.0], [0.0, 4.0], [0.0, -8.0], [0.0, -8.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[[0.0, -1.0, 7.0, -5.0, -3.0], [0.0, 1.0, -5.0, -2.0, 5.0], [1.0, -7.0, 7.0, 2.0, -2.0], [-1.0, 6.0, 
+-3.0, -5.0, 2.0]], [[6.0, -2.0, 1.0, -1.0, 0.0], [-4.0, 6.0, -2.0, -5.0, 3.0], [4.0, -7.0, -5.0, 6.0, -6.0], [2.0, -5.0, 4.0, 
+0.0, 7.0]], [[-4.0, -3.0, -3.0, -3.0, -3.0], [-3.0, 1.0, 0.0, 1.0, 2.0], [-3.0, -3.0, -3.0, 1.0, -7.0], [2.0, 4.0, -6.0, -2.0, 
+-2.0]]])
+      arg1=Data(numpy.array([[-4.0, -7.0], [-6.0, -2.0], [7.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 0.0], [6.0, -3.0], [0.0, -4.0]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-58.0, -18.0], [0.0, 28.0]], [[2.0, 12.0], [36.0, 2.0]], [[-30.0, -16.0], [-6.0, -12.0]], 
-[[32.0, -48.0], [-14.0, -36.0]], [[-40.0, 40.0], [8.0, -10.0]], [[-4.0, -48.0], [40.0, 
--12.0]]])+(1.-msk_ref)*numpy.array([[[-46.0, -6.0], [18.0, 58.0]], [[46.0, 0.0], [14.0, -18.0]], [[-30.0, -40.0], [-34.0, 
--4.0]], [[-20.0, -22.0], [60.0, -18.0]], [[-28.0, -8.0], [4.0, -42.0]], [[22.0, 54.0], [-44.0, -16.0]]])
+      ref=Data(numpy.array([[[-64.0, -12.0], [-5.0, 11.0], [-55.0, -51.0], [5.0, 37.0], [-9.0, 21.0]], [[3.0, 8.0], [-33.0, 
+-19.0], [32.0, 39.0], [45.0, 24.0], [-24.0, -41.0]], [[-49.0, -15.0], [49.0, 63.0], [-19.0, -39.0], [-37.0, -26.0], [-5.0, 
+26.0]], [[6.0, 3.0], [34.0, -32.0], [-54.0, 13.0], [6.0, 35.0], [-64.0, -28.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[36.0, -2.0], [-12.0, 18.0], [6.0, 9.0], [-6.0, 15.0], [0.0, 12.0]], [[-24.0, 24.0], 
+[36.0, -22.0], [-12.0, 6.0], [-30.0, 11.0], [18.0, -17.0]], [[24.0, 0.0], [-42.0, 33.0], [-30.0, 27.0], [36.0, -22.0], [-36.0, 
+46.0]], [[12.0, -14.0], [-30.0, -1.0], [24.0, 12.0], [0.0, 8.0], [42.0, -13.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-6.0, 3.0], [-3.0, -3.0]], [[1.0, 6.0], [0.0, -4.0]], [[7.0, 4.0], [2.0, 6.0]], [[4.0, 2.0], 
-[-1.0, -4.0]], [[-4.0, 0.0], [4.0, -2.0]], [[4.0, -5.0], [6.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[5.0, -2.0], [-4.0, 5.0]], 
-[[7.0, -2.0], [3.0, 1.0]], [[-4.0, 0.0], [0.0, -1.0]], [[6.0, 5.0], [2.0, 1.0]], [[-2.0, 5.0], [-2.0, -5.0]], [[0.0, 5.0], 
-[1.0, -1.0]]])
-      arg1=Data(numpy.array([6.0, -1.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[[[6.0, 1.0, 0.0, -5.0, 0.0], [-4.0, -5.0, -6.0, 7.0, 1.0], [4.0, -7.0, -6.0, -7.0, 6.0], [-1.0, -6.0, 
+0.0, -1.0, 4.0]], [[2.0, 7.0, -5.0, -4.0, -1.0], [-1.0, -2.0, -7.0, -6.0, -1.0], [-2.0, -1.0, 2.0, 0.0, 0.0], [-7.0, -6.0, 1.0, 
+0.0, -4.0]], [[-7.0, -1.0, -2.0, 0.0, 1.0], [-5.0, -2.0, 0.0, -4.0, 4.0], [5.0, -5.0, -4.0, 0.0, -2.0], [1.0, 7.0, 4.0, 7.0, 
+1.0]]], [[[-7.0, -1.0, -7.0, -3.0, 3.0], [3.0, 4.0, -5.0, -2.0, 2.0], [0.0, 0.0, 4.0, 6.0, 0.0], [2.0, -1.0, -3.0, -3.0, 1.0]], 
+[[0.0, 0.0, 2.0, -7.0, -4.0], [-5.0, 0.0, -4.0, -2.0, 0.0], [-4.0, 6.0, 0.0, 1.0, 0.0], [5.0, -7.0, -4.0, 7.0, 6.0]], [[2.0, 
+0.0, -4.0, -3.0, -1.0], [7.0, -4.0, -7.0, -7.0, -6.0], [-2.0, 0.0, 0.0, 1.0, 2.0], [3.0, 6.0, 1.0, -7.0, -5.0]]]])
+      arg1=Data(numpy.array([[[-6.0, -4.0], [-5.0, 0.0], [-1.0, 5.0]], [[-2.0, 5.0], [1.0, -5.0], [6.0, 
+0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, 7.0], [-3.0, 4.0], [-3.0, -3.0]], [[1.0, -4.0], [3.0, 4.0], [7.0, -5.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-13.0, -94.0], [-38.0, -14.0], [19.0, -55.0], [31.0, 40.0], [-12.0, 40.0]], [[65.0, 31.0], [10.0, 
+30.0], [35.0, 19.0], [-48.0, -48.0], [-45.0, 26.0]], [[-35.0, 29.0], [58.0, -27.0], [22.0, 24.0], [37.0, 53.0], [-22.0, 
+-34.0]], [[59.0, -6.0], [90.0, 89.0], [-1.0, 25.0], [-30.0, -11.0], [-31.0, -36.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[4.0, 89.0], [-22.0, 42.0], [-8.0, 42.0], [-18.0, -52.0], [-16.0, -30.0]], [[67.0, 
+-84.0], [3.0, -33.0], [-27.0, -31.0], [-48.0, 72.0], [-52.0, 13.0]], [[-47.0, -1.0], [57.0, -14.0], [28.0, -38.0], [37.0, 
+-74.0], [2.0, 38.0]], [[59.0, -41.0], [35.0, -141.0], [-23.0, -17.0], [-49.0, 47.0], [-19.0, 54.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank2_taggedData_rank2_offset0(self):
+      arg0=numpy.array([[5.0, 0.0, -1.0, -2.0, -2.0], [3.0, 2.0, 6.0, 4.0, -4.0], [7.0, 6.0, 3.0, 0.0, 1.0], [7.0, -5.0, -2.0, 
+-4.0, 0.0]])
+      arg1=Data(numpy.array([[-4.0, 5.0, -2.0, -4.0, -7.0], [0.0, 5.0, -4.0, 4.0, 0.0], [0.0, -6.0, -5.0, -6.0, -5.0], [4.0, 
+0.0, 0.0, 0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -3.0, 0.0, 6.0, 3.0], [5.0, -2.0, -2.0, -7.0, 0.0], [6.0, 0.0, 0.0, -2.0, 1.0], 
+[5.0, 5.0, -2.0, -2.0, 6.0]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-36.0, 6.0], [18.0, -3.0]], [[-18.0, 3.0], [-18.0, 3.0]]], [[[6.0, -1.0], [36.0, -6.0]], 
-[[0.0, 0.0], [-24.0, 4.0]]], [[[42.0, -7.0], [24.0, -4.0]], [[12.0, -2.0], [36.0, -6.0]]], [[[24.0, -4.0], [12.0, -2.0]], 
-[[-6.0, 1.0], [-24.0, 4.0]]], [[[-24.0, 4.0], [0.0, 0.0]], [[24.0, -4.0], [-12.0, 2.0]]], [[[24.0, -4.0], [-30.0, 5.0]], 
-[[36.0, -6.0], [18.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[30.0, -5.0], [-12.0, 2.0]], [[-24.0, 4.0], [30.0, -5.0]]], 
-[[[42.0, -7.0], [-12.0, 2.0]], [[18.0, -3.0], [6.0, -1.0]]], [[[-24.0, 4.0], [0.0, 0.0]], [[0.0, 0.0], [-6.0, 1.0]]], [[[36.0, 
--6.0], [30.0, -5.0]], [[12.0, -2.0], [6.0, -1.0]]], [[[-12.0, 2.0], [30.0, -5.0]], [[-12.0, 2.0], [-30.0, 5.0]]], [[[0.0, 0.0], 
-[30.0, -5.0]], [[6.0, -1.0], [-6.0, 1.0]]]])
+      ref=Data(numpy.array([[[[-20.0, 25.0, -10.0, -20.0, -35.0], [0.0, 25.0, -20.0, 20.0, 0.0], [0.0, -30.0, -25.0, -30.0, 
+-25.0], [20.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[4.0, -5.0, 2.0, 4.0, 7.0], [0.0, -5.0, 4.0, -4.0, 0.0], [0.0, 6.0, 5.0, 6.0, 5.0], [-4.0, 0.0, 0.0, 
+0.0, 0.0]], [[8.0, -10.0, 4.0, 8.0, 14.0], [0.0, -10.0, 8.0, -8.0, 0.0], [0.0, 12.0, 10.0, 12.0, 10.0], [-8.0, 0.0, 0.0, 0.0, 
+0.0]], [[8.0, -10.0, 4.0, 8.0, 14.0], [0.0, -10.0, 8.0, -8.0, 0.0], [0.0, 12.0, 10.0, 12.0, 10.0], [-8.0, 0.0, 0.0, 0.0, 
+0.0]]], [[[-12.0, 15.0, -6.0, -12.0, -21.0], [0.0, 15.0, -12.0, 12.0, 0.0], [0.0, -18.0, -15.0, -18.0, -15.0], [12.0, 0.0, 0.0, 
+0.0, 0.0]], [[-8.0, 10.0, -4.0, -8.0, -14.0], [0.0, 10.0, -8.0, 8.0, 0.0], [0.0, -12.0, -10.0, -12.0, -10.0], [8.0, 0.0, 0.0, 
+0.0, 0.0]], [[-24.0, 30.0, -12.0, -24.0, -42.0], [0.0, 30.0, -24.0, 24.0, 0.0], [0.0, -36.0, -30.0, -36.0, -30.0], [24.0, 0.0, 
+0.0, 0.0, 0.0]], [[-16.0, 20.0, -8.0, -16.0, -28.0], [0.0, 20.0, -16.0, 16.0, 0.0], [0.0, -24.0, -20.0, -24.0, -20.0], [16.0, 
+0.0, 0.0, 0.0, 0.0]], [[16.0, -20.0, 8.0, 16.0, 28.0], [0.0, -20.0, 16.0, -16.0, 0.0], [0.0, 24.0, 20.0, 24.0, 20.0], [-16.0, 
+0.0, 0.0, 0.0, 0.0]]], [[[-28.0, 35.0, -14.0, -28.0, -49.0], [0.0, 35.0, -28.0, 28.0, 0.0], [0.0, -42.0, -35.0, -42.0, -35.0], 
+[28.0, 0.0, 0.0, 0.0, 0.0]], [[-24.0, 30.0, -12.0, -24.0, -42.0], [0.0, 30.0, -24.0, 24.0, 0.0], [0.0, -36.0, -30.0, -36.0, 
+-30.0], [24.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, 15.0, -6.0, -12.0, -21.0], [0.0, 15.0, -12.0, 12.0, 0.0], [0.0, -18.0, -15.0, 
+-18.0, -15.0], [12.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-4.0, 5.0, -2.0, -4.0, -7.0], [0.0, 5.0, -4.0, 4.0, 0.0], [0.0, -6.0, -5.0, -6.0, -5.0], [4.0, 
+0.0, 0.0, 0.0, 0.0]]], [[[-28.0, 35.0, -14.0, -28.0, -49.0], [0.0, 35.0, -28.0, 28.0, 0.0], [0.0, -42.0, -35.0, -42.0, -35.0], 
+[28.0, 0.0, 0.0, 0.0, 0.0]], [[20.0, -25.0, 10.0, 20.0, 35.0], [0.0, -25.0, 20.0, -20.0, 0.0], [0.0, 30.0, 25.0, 30.0, 25.0], 
+[-20.0, 0.0, 0.0, 0.0, 0.0]], [[8.0, -10.0, 4.0, 8.0, 14.0], [0.0, -10.0, 8.0, -8.0, 0.0], [0.0, 12.0, 10.0, 12.0, 10.0], 
+[-8.0, 0.0, 0.0, 0.0, 0.0]], [[16.0, -20.0, 8.0, 16.0, 28.0], [0.0, -20.0, 16.0, -16.0, 0.0], [0.0, 24.0, 20.0, 24.0, 20.0], 
+[-16.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -15.0, 0.0, 30.0, 15.0], [25.0, -10.0, -10.0, -35.0, 0.0], [30.0, 0.0, 0.0, 
+-10.0, 5.0], [25.0, 25.0, -10.0, -10.0, 30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 3.0, 0.0, -6.0, -3.0], [-5.0, 2.0, 2.0, 7.0, 0.0], [-6.0, 0.0, 0.0, 2.0, -1.0], [-5.0, 
+-5.0, 2.0, 2.0, -6.0]], [[0.0, 6.0, 0.0, -12.0, -6.0], [-10.0, 4.0, 4.0, 14.0, 0.0], [-12.0, 0.0, 0.0, 4.0, -2.0], [-10.0, 
+-10.0, 4.0, 4.0, -12.0]], [[0.0, 6.0, 0.0, -12.0, -6.0], [-10.0, 4.0, 4.0, 14.0, 0.0], [-12.0, 0.0, 0.0, 4.0, -2.0], [-10.0, 
+-10.0, 4.0, 4.0, -12.0]]], [[[0.0, -9.0, 0.0, 18.0, 9.0], [15.0, -6.0, -6.0, -21.0, 0.0], [18.0, 0.0, 0.0, -6.0, 3.0], [15.0, 
+15.0, -6.0, -6.0, 18.0]], [[0.0, -6.0, 0.0, 12.0, 6.0], [10.0, -4.0, -4.0, -14.0, 0.0], [12.0, 0.0, 0.0, -4.0, 2.0], [10.0, 
+10.0, -4.0, -4.0, 12.0]], [[0.0, -18.0, 0.0, 36.0, 18.0], [30.0, -12.0, -12.0, -42.0, 0.0], [36.0, 0.0, 0.0, -12.0, 6.0], 
+[30.0, 30.0, -12.0, -12.0, 36.0]], [[0.0, -12.0, 0.0, 24.0, 12.0], [20.0, -8.0, -8.0, -28.0, 0.0], [24.0, 0.0, 0.0, -8.0, 4.0], 
+[20.0, 20.0, -8.0, -8.0, 24.0]], [[0.0, 12.0, 0.0, -24.0, -12.0], [-20.0, 8.0, 8.0, 28.0, 0.0], [-24.0, 0.0, 0.0, 8.0, -4.0], 
+[-20.0, -20.0, 8.0, 8.0, -24.0]]], [[[0.0, -21.0, 0.0, 42.0, 21.0], [35.0, -14.0, -14.0, -49.0, 0.0], [42.0, 0.0, 0.0, -14.0, 
+7.0], [35.0, 35.0, -14.0, -14.0, 42.0]], [[0.0, -18.0, 0.0, 36.0, 18.0], [30.0, -12.0, -12.0, -42.0, 0.0], [36.0, 0.0, 0.0, 
+-12.0, 6.0], [30.0, 30.0, -12.0, -12.0, 36.0]], [[0.0, -9.0, 0.0, 18.0, 9.0], [15.0, -6.0, -6.0, -21.0, 0.0], [18.0, 0.0, 0.0, 
+-6.0, 3.0], [15.0, 15.0, -6.0, -6.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -3.0, 0.0, 6.0, 3.0], [5.0, -2.0, -2.0, -7.0, 0.0], [6.0, 0.0, 0.0, -2.0, 1.0], [5.0, 5.0, 
+-2.0, -2.0, 6.0]]], [[[0.0, -21.0, 0.0, 42.0, 21.0], [35.0, -14.0, -14.0, -49.0, 0.0], [42.0, 0.0, 0.0, -14.0, 7.0], [35.0, 
+35.0, -14.0, -14.0, 42.0]], [[0.0, 15.0, 0.0, -30.0, -15.0], [-25.0, 10.0, 10.0, 35.0, 0.0], [-30.0, 0.0, 0.0, 10.0, -5.0], 
+[-25.0, -25.0, 10.0, 10.0, -30.0]], [[0.0, 6.0, 0.0, -12.0, -6.0], [-10.0, 4.0, 4.0, 14.0, 0.0], [-12.0, 0.0, 0.0, 4.0, -2.0], 
+[-10.0, -10.0, 4.0, 4.0, -12.0]], [[0.0, 12.0, 0.0, -24.0, -12.0], [-20.0, 8.0, 8.0, 28.0, 0.0], [-24.0, 0.0, 0.0, 8.0, -4.0], 
+[-20.0, -20.0, 8.0, 8.0, -24.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -2.0], [4.0, -5.0]], [[-3.0, -2.0], [0.0, 0.0]], [[5.0, -2.0], [0.0, 2.0]], [[5.0, 
-2.0], [0.0, -4.0]], [[6.0, -1.0], [1.0, 7.0]], [[-5.0, -4.0], [7.0, 0.0]]], [[[6.0, -2.0], [2.0, -3.0]], [[6.0, -4.0], [-3.0, 
--3.0]], [[-1.0, 7.0], [2.0, 4.0]], [[6.0, -4.0], [-4.0, 6.0]], [[-4.0, -5.0], [-6.0, 1.0]], [[-2.0, -5.0], [4.0, 6.0]]], 
-[[[0.0, 5.0], [4.0, -3.0]], [[7.0, -4.0], [1.0, 4.0]], [[0.0, 2.0], [-7.0, -4.0]], [[7.0, 1.0], [3.0, -4.0]], [[-5.0, 5.0], 
-[4.0, 0.0]], [[4.0, 7.0], [-6.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[7.0, -4.0], [-1.0, 0.0]], [[4.0, -5.0], [7.0, 0.0]], 
-[[-1.0, 3.0], [-1.0, -2.0]], [[4.0, -2.0], [3.0, 5.0]], [[7.0, -2.0], [7.0, 0.0]], [[-7.0, -7.0], [7.0, 4.0]]], [[[-5.0, 4.0], 
-[0.0, 5.0]], [[0.0, 0.0], [-7.0, -7.0]], [[-4.0, -6.0], [0.0, 3.0]], [[-5.0, 6.0], [-6.0, 4.0]], [[5.0, 3.0], [-2.0, 2.0]], 
-[[-1.0, 2.0], [0.0, -2.0]]], [[[1.0, -3.0], [0.0, 0.0]], [[1.0, -3.0], [6.0, 4.0]], [[-5.0, 6.0], [5.0, 4.0]], [[6.0, 0.0], 
-[-7.0, -3.0]], [[-1.0, -3.0], [-2.0, -5.0]], [[-5.0, -1.0], [-2.0, -4.0]]]])
-      arg1=Data(numpy.array([[-3.0, 5.0], [6.0, -5.0], [7.0, -1.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank3_offset1(self):
+      arg0=numpy.array([[[2.0, 6.0, 4.0, -7.0, 4.0], [-2.0, -6.0, -4.0, -1.0, -5.0], [-4.0, 2.0, -4.0, 0.0, -1.0], [4.0, 0.0, 
+0.0, -2.0, 2.0]], [[1.0, 2.0, -3.0, -4.0, -4.0], [-7.0, 7.0, 1.0, 5.0, -5.0], [1.0, -2.0, 0.0, 1.0, -5.0], [-1.0, 4.0, 1.0, 
+-5.0, 5.0]], [[0.0, 1.0, 4.0, -4.0, -3.0], [-2.0, -6.0, -2.0, -2.0, -1.0], [2.0, -5.0, -7.0, -1.0, -7.0], [2.0, 7.0, 0.0, 5.0, 
+4.0]]])
+      arg1=Data(numpy.array([[[2.0, 5.0, 5.0, -6.0, -6.0], [-2.0, 5.0, -6.0, 0.0, -7.0], [1.0, 6.0, 0.0, 3.0, -4.0], [5.0, 7.0, 
+-1.0, -7.0, -4.0]], [[2.0, -1.0, 3.0, -7.0, 2.0], [2.0, 0.0, -4.0, 6.0, -3.0], [5.0, 0.0, 0.0, 6.0, 5.0], [-6.0, 2.0, -6.0, 
+3.0, 0.0]], [[3.0, 0.0, 4.0, 7.0, -2.0], [1.0, -7.0, 0.0, -1.0, 7.0], [-6.0, 0.0, 4.0, -3.0, 7.0], [-1.0, 5.0, 1.0, 0.0, 
+6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -1.0, 7.0, -3.0, -7.0], [-3.0, -3.0, -7.0, 0.0, 0.0], [5.0, -2.0, -4.0, -5.0, 
+4.0], [-6.0, 3.0, 5.0, -6.0, 2.0]], [[-1.0, 4.0, 0.0, -5.0, 4.0], [3.0, -7.0, 6.0, -1.0, 0.0], [-3.0, 7.0, 2.0, -4.0, -6.0], 
+[1.0, 0.0, 3.0, 1.0, -2.0]], [[0.0, -7.0, -4.0, 4.0, 0.0], [4.0, -1.0, 4.0, 1.0, 0.0], [0.0, 6.0, 4.0, -7.0, -1.0], [7.0, 1.0, 
+6.0, 2.0, 5.0]]]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[18.0, 0.0], [29.0, -5.0]], [[28.0, 6.0], [-24.0, -7.0]]], [[[94.0, -52.0], [-46.0, 14.0]], 
-[[-11.0, 14.0], [10.0, 11.0]]], [[[-21.0, 30.0], [62.0, -47.0]], [[-37.0, -3.0], [-10.0, -6.0]]], [[[70.0, -12.0], [-23.0, 
-29.0]], [[-3.0, 17.0], [20.0, -46.0]]], [[[-77.0, 55.0], [8.0, 15.0]], [[-11.0, 31.0], [-15.0, 30.0]]], [[[31.0, -19.0], [31.0, 
--2.0]], [[-39.0, 21.0], [71.0, -35.0]]]])+(1.-msk_ref)*numpy.array([[[[-44.0, 59.0], [15.0, -37.0]], [[3.0, -5.0], [30.0, 
--25.0]]], [[[-5.0, 19.0], [-6.0, -22.0]], [[-21.0, 64.0], [-14.0, 31.0]]], [[[-56.0, 20.0], [-3.0, 39.0]], [[38.0, -10.0], 
-[52.0, -29.0]]], [[[0.0, 39.0], [42.0, -40.0]], [[-94.0, 52.0], [-12.0, 8.0]]], [[[2.0, 11.0], [3.0, -22.0]], [[-47.0, 47.0], 
-[-23.0, -5.0]]], [[[-20.0, -25.0], [26.0, -44.0]], [[-35.0, 37.0], [-52.0, 34.0]]]])
+      ref=Data(numpy.array([[[[6.0, 9.0, 13.0, -19.0, -10.0], [-2.0, 10.0, -16.0, 6.0, -17.0], [7.0, 12.0, 0.0, 12.0, -3.0], 
+[4.0, 16.0, -8.0, -11.0, -8.0]], [[19.0, 28.0, 40.0, -43.0, -34.0], [-7.0, 23.0, -44.0, 11.0, -41.0], [10.0, 36.0, 4.0, 27.0, 
+-7.0], [17.0, 51.0, -17.0, -36.0, -18.0]], [[14.0, 23.0, 27.0, 25.0, -38.0], [-10.0, -8.0, -12.0, -22.0, 9.0], [-35.0, 24.0, 
+16.0, -18.0, -3.0], [34.0, 42.0, 18.0, -37.0, 8.0]], [[-34.0, -31.0, -63.0, 42.0, 42.0], [2.0, -7.0, 58.0, -20.0, 33.0], [-3.0, 
+-42.0, -16.0, -33.0, -20.0], [-7.0, -77.0, 27.0, 37.0, 4.0]], [[-9.0, 24.0, -4.0, -17.0, -26.0], [-19.0, 41.0, -8.0, -21.0, 
+-37.0], [2.0, 24.0, -12.0, -3.0, -57.0], [47.0, 5.0, 17.0, -40.0, -34.0]]], [[[-24.0, -3.0, -39.0, 47.0, 2.0], [-12.0, 4.0, 
+40.0, -40.0, 21.0], [-25.0, -12.0, -8.0, -42.0, -41.0], [34.0, -38.0, 42.0, -7.0, -4.0]], [[-16.0, -37.0, -33.0, -55.0, 62.0], 
+[20.0, 12.0, 8.0, 48.0, -21.0], [65.0, -36.0, -24.0, 42.0, 17.0], [-66.0, -58.0, -42.0, 63.0, -12.0]], [[-12.0, -21.0, -25.0, 
+3.0, 30.0], [8.0, -6.0, 20.0, 8.0, 11.0], [13.0, -24.0, -8.0, 0.0, 7.0], [-24.0, -36.0, -4.0, 31.0, 4.0]], [[2.0, -10.0, 2.0, 
+-43.0, 20.0], [10.0, 9.0, -14.0, 32.0, -22.0], [36.0, -6.0, -8.0, 33.0, 15.0], [-33.0, -7.0, -31.0, 22.0, -8.0]], [[-23.0, 
+-20.0, -44.0, 58.0, 22.0], [-1.0, -18.0, 50.0, -29.0, 43.0], [-24.0, -30.0, -4.0, -42.0, -12.0], [6.0, -50.0, 34.0, 20.0, 
+14.0]]], [[[0.0, -21.0, -9.0, 31.0, 22.0], [12.0, -34.0, 20.0, 4.0, 39.0], [-11.0, -24.0, 8.0, -12.0, 35.0], [-28.0, -16.0, 
+0.0, 31.0, 28.0]], [[-15.0, 12.0, -16.0, -33.0, -6.0], [-13.0, 45.0, -4.0, -7.0, -43.0], [22.0, 12.0, -20.0, 9.0, -53.0], 
+[27.0, -15.0, 5.0, -20.0, -38.0]], [[-29.0, -20.0, -48.0, -25.0, 38.0], [1.0, 29.0, 24.0, 7.0, -21.0], [38.0, -24.0, -28.0, 
+9.0, -33.0], [-13.0, -63.0, -3.0, 28.0, -26.0]], [[-1.0, -1.0, -1.0, -14.0, 4.0], [1.0, 7.0, -4.0, 7.0, -10.0], [11.0, 0.0, 
+-4.0, 9.0, -2.0], [-5.0, -3.0, -7.0, 3.0, -6.0]], [[-33.0, 0.0, -48.0, -8.0, 10.0], [-15.0, 44.0, 26.0, -23.0, -27.0], [16.0, 
+-6.0, -28.0, -12.0, -70.0], [32.0, -52.0, 24.0, -8.0, -38.0]]], [[[12.0, 21.0, 25.0, -3.0, -30.0], [-8.0, 6.0, -20.0, -8.0, 
+-11.0], [-13.0, 24.0, 8.0, 0.0, -7.0], [24.0, 36.0, 4.0, -31.0, -4.0]], [[29.0, -4.0, 40.0, 21.0, -6.0], [15.0, -49.0, -16.0, 
+17.0, 37.0], [-22.0, 0.0, 28.0, 3.0, 69.0], [-31.0, 43.0, -17.0, 12.0, 42.0]], [[2.0, -1.0, 3.0, -7.0, 2.0], [2.0, 0.0, -4.0, 
+6.0, -3.0], [5.0, 0.0, 0.0, 6.0, 5.0], [-6.0, 2.0, -6.0, 3.0, 0.0]], [[1.0, -5.0, -5.0, 82.0, -8.0], [-1.0, -45.0, 32.0, -35.0, 
+64.0], [-57.0, -12.0, 20.0, -51.0, 18.0], [15.0, 1.0, 37.0, -1.0, 38.0]], [[26.0, 5.0, 41.0, -19.0, -10.0], [10.0, -18.0, 
+-32.0, 26.0, -1.0], [3.0, 12.0, 16.0, 24.0, 45.0], [-24.0, 44.0, -28.0, 1.0, 16.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-1.0, 2.0, 14.0, -11.0, -10.0], [-3.0, -13.0, -8.0, -1.0, 0.0], [7.0, 3.0, -6.0, 
+-14.0, 2.0], [-11.0, 6.0, 13.0, -11.0, 2.0]], [[-2.0, -5.0, 38.0, -24.0, -34.0], [-8.0, -33.0, -26.0, -1.0, 0.0], [24.0, 8.0, 
+-16.0, -45.0, 11.0], [-27.0, 19.0, 42.0, -32.0, 13.0]], [[3.0, -44.0, 12.0, 19.0, -40.0], [-5.0, 5.0, -30.0, 7.0, 0.0], [29.0, 
+-5.0, -6.0, -36.0, 30.0], [1.0, 16.0, 35.0, -19.0, 34.0]], [[4.0, 19.0, -33.0, 25.0, 33.0], [-7.0, 53.0, 9.0, 0.0, 0.0], 
+[-23.0, -38.0, 4.0, 79.0, 0.0], [10.0, -25.0, -71.0, 30.0, -26.0]], [[4.0, 1.0, 40.0, -4.0, -44.0], [-36.0, 19.0, -64.0, 1.0, 
+0.0], [32.0, -54.0, -36.0, 17.0, 43.0], [-49.0, 9.0, -10.0, -34.0, 1.0]]], [[[7.0, -12.0, -6.0, 33.0, -14.0], [-23.0, 57.0, 
+-36.0, 5.0, 0.0], [11.0, -57.0, -14.0, 52.0, 36.0], [-9.0, -8.0, -43.0, 1.0, 0.0]], [[-7.0, 76.0, -18.0, -41.0, 70.0], [15.0, 
+-25.0, 60.0, -13.0, 0.0], [-51.0, 25.0, 14.0, 44.0, -60.0], [1.0, -24.0, -45.0, 31.0, -56.0]], [[-1.0, 22.0, -20.0, -1.0, 
+32.0], [7.0, 7.0, 26.0, -3.0, 0.0], [-23.0, 3.0, 10.0, 30.0, -20.0], [11.0, -14.0, -29.0, 21.0, -20.0]], [[-5.0, 35.0, 1.0, 
+-30.0, 27.0], [10.0, -30.0, 29.0, -7.0, 0.0], [-20.0, 25.0, 6.0, -1.0, -32.0], [-3.0, -5.0, -2.0, 7.0, -22.0]], [[5.0, -8.0, 
+-31.0, 36.0, 15.0], [-4.0, 51.0, 1.0, 4.0, 0.0], [-10.0, -31.0, 6.0, 52.0, 11.0], [18.0, -16.0, -46.0, 23.0, -5.0]]], [[[-1.0, 
+-6.0, -36.0, 15.0, 32.0], [23.0, 3.0, 42.0, 1.0, 0.0], [-23.0, 27.0, 26.0, 2.0, -24.0], [39.0, -10.0, -5.0, 29.0, 0.0]], [[2.0, 
+25.0, 34.0, -16.0, -22.0], [-32.0, 13.0, -46.0, -3.0, 0.0], [16.0, -48.0, -32.0, 33.0, 25.0], [-49.0, 1.0, -26.0, -24.0, 
+-17.0]], [[0.0, 53.0, 0.0, -16.0, 28.0], [-16.0, 19.0, 0.0, -7.0, 0.0], [-20.0, -34.0, -12.0, 69.0, -9.0], [-25.0, -19.0, 
+-62.0, 10.0, -43.0]], [[-1.0, 11.0, 4.0, -9.0, 4.0], [-1.0, -6.0, 2.0, -2.0, 0.0], [-3.0, 1.0, -2.0, 3.0, -5.0], [-6.0, -1.0, 
+-3.0, -1.0, -7.0]], [[5.0, 30.0, 21.0, 0.0, -13.0], [-40.0, 45.0, -51.0, -2.0, 0.0], [10.0, -75.0, -34.0, 74.0, 33.0], [-48.0, 
+-10.0, -62.0, -13.0, -27.0]]], [[[1.0, -22.0, 20.0, 1.0, -32.0], [-7.0, -7.0, -26.0, 3.0, 0.0], [23.0, -3.0, -10.0, -30.0, 
+20.0], [-11.0, 14.0, 29.0, -21.0, 20.0]], [[-4.0, -33.0, -28.0, 8.0, 16.0], [40.0, -35.0, 52.0, 3.0, 0.0], [-12.0, 70.0, 36.0, 
+-65.0, -31.0], [53.0, 7.0, 54.0, 18.0, 27.0]], [[-1.0, 4.0, 0.0, -5.0, 4.0], [3.0, -7.0, 6.0, -1.0, 0.0], [-3.0, 7.0, 2.0, 
+-4.0, -6.0], [1.0, 0.0, 3.0, 1.0, -2.0]], [[5.0, -53.0, -34.0, 51.0, -6.0], [11.0, 36.0, 4.0, 10.0, 0.0], [5.0, -1.0, 18.0, 
+-5.0, 17.0], [42.0, -1.0, 5.0, 17.0, 31.0]], [[-5.0, -10.0, -2.0, -15.0, 6.0], [25.0, -45.0, 32.0, -1.0, 0.0], [-5.0, 55.0, 
+18.0, -58.0, -26.0], [21.0, 10.0, 49.0, 1.0, 14.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[6.0, -6.0], [2.0, -7.0]], [[4.0, 4.0], [7.0, -7.0]], [[-3.0, 7.0], [6.0, -1.0]], [[5.0, 
--7.0], [7.0, -7.0]], [[5.0, -7.0], [-3.0, -6.0]], [[4.0, -5.0], [-6.0, -3.0]]])+(1.-msk_arg0)*numpy.array([[[5.0, -6.0], [0.0, 
--2.0]], [[0.0, -1.0], [3.0, -3.0]], [[3.0, -4.0], [4.0, 7.0]], [[0.0, 0.0], [7.0, 4.0]], [[-7.0, 4.0], [3.0, 0.0]], [[1.0, 
--4.0], [-2.0, 7.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(5.0)+(1-msk_arg1)*(1.0)
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[[[3.0, 6.0, -7.0, 2.0, -4.0], [4.0, 2.0, 6.0, -2.0, -4.0], [6.0, -7.0, -4.0, -4.0, 0.0], [1.0, 7.0, 
+1.0, 3.0, -3.0]], [[6.0, -3.0, -4.0, 3.0, 3.0], [-6.0, 6.0, 2.0, -3.0, 0.0], [-4.0, 3.0, 6.0, 4.0, 1.0], [4.0, -3.0, 7.0, -5.0, 
+-4.0]], [[4.0, -5.0, -4.0, -7.0, -1.0], [-2.0, 2.0, 7.0, 6.0, 1.0], [0.0, 7.0, -4.0, 7.0, -6.0], [5.0, 4.0, 3.0, -1.0, -1.0]]], 
+[[[5.0, 2.0, -5.0, 7.0, 6.0], [-7.0, -2.0, -6.0, 5.0, 5.0], [3.0, 1.0, -2.0, 7.0, 5.0], [-6.0, 7.0, 7.0, 6.0, 1.0]], [[7.0, 
+3.0, 0.0, 3.0, -2.0], [2.0, 4.0, -6.0, -6.0, 3.0], [-1.0, 5.0, -5.0, 7.0, -7.0], [4.0, -2.0, 7.0, -2.0, -2.0]], [[-7.0, 6.0, 
+-4.0, -2.0, 7.0], [0.0, 2.0, 0.0, 4.0, -6.0], [6.0, -3.0, 6.0, -2.0, 2.0], [-4.0, 1.0, 4.0, 2.0, -4.0]]]])
+      arg1=Data(numpy.array([[[[0.0, -4.0, -6.0, -7.0, -6.0], [-5.0, -2.0, -6.0, 0.0, 4.0], [4.0, 4.0, 3.0, 0.0, -7.0], [-4.0, 
+7.0, -7.0, -4.0, -3.0]], [[4.0, -7.0, 7.0, -5.0, 0.0], [1.0, 3.0, 6.0, -1.0, -3.0], [-4.0, -2.0, 6.0, 7.0, 5.0], [-2.0, -5.0, 
+7.0, 7.0, 0.0]], [[-7.0, 1.0, 2.0, -3.0, -3.0], [7.0, 2.0, 0.0, -3.0, -5.0], [7.0, -7.0, 7.0, 0.0, 0.0], [0.0, 5.0, -4.0, 6.0, 
+0.0]]], [[[0.0, 5.0, -4.0, -6.0, -7.0], [7.0, -5.0, 5.0, 1.0, -5.0], [1.0, -5.0, -4.0, 3.0, -7.0], [2.0, 4.0, 4.0, 0.0, -2.0]], 
+[[1.0, 3.0, 6.0, -6.0, -4.0], [5.0, -6.0, -4.0, 2.0, -7.0], [-6.0, -7.0, 5.0, -3.0, -5.0], [2.0, 1.0, 7.0, 4.0, 6.0]], [[-1.0, 
+6.0, 5.0, -1.0, 3.0], [-4.0, -6.0, 0.0, 0.0, 0.0], [-4.0, -7.0, 0.0, -6.0, 2.0], [1.0, 2.0, -4.0, 4.0, 
+-7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, -1.0, 5.0, 3.0, 2.0], [-2.0, -2.0, 0.0, 0.0, -2.0], [-5.0, 7.0, 6.0, 7.0, 
+0.0], [-3.0, 1.0, -6.0, 5.0, 4.0]], [[-6.0, 4.0, 6.0, -1.0, -6.0], [-6.0, 0.0, 7.0, -1.0, 6.0], [0.0, 2.0, -6.0, 1.0, 0.0], 
+[3.0, 2.0, -1.0, -6.0, -6.0]], [[-3.0, 3.0, 0.0, -4.0, 0.0], [7.0, 0.0, 4.0, 7.0, 5.0], [-2.0, 6.0, -7.0, -7.0, -7.0], [3.0, 
+-1.0, 7.0, -4.0, 1.0]]], [[[-2.0, 2.0, -2.0, 0.0, 7.0], [-2.0, 6.0, 3.0, 1.0, 4.0], [-5.0, 6.0, 2.0, 7.0, -2.0], [-3.0, 4.0, 
+3.0, -3.0, 1.0]], [[-7.0, 5.0, -5.0, -3.0, 4.0], [3.0, 2.0, 1.0, 7.0, -2.0], [-6.0, -1.0, -2.0, -5.0, 1.0], [4.0, -3.0, 4.0, 
+-4.0, -5.0]], [[1.0, 1.0, -6.0, 1.0, -7.0], [-6.0, 2.0, -5.0, 3.0, -2.0], [-6.0, 7.0, -3.0, 3.0, -3.0], [6.0, -1.0, 2.0, -4.0, 
+-1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[10.0, -46.0, 19.0, -128.0, -114.0], [117.0, -5.0, 15.0, 1.0, -100.0], [7.0, -53.0, 88.0, 78.0, 
+-75.0], [-7.0, 24.0, 102.0, 54.0, 72.0]], [[20.0, 47.0, -27.0, -48.0, -29.0], [-63.0, -95.0, -56.0, 26.0, 27.0], [-39.0, -8.0, 
+-28.0, -60.0, -74.0], [-2.0, 55.0, -38.0, -39.0, -46.0]], [[16.0, 3.0, 6.0, 115.0, 77.0], [-16.0, 43.0, -7.0, 11.0, 29.0], 
+[-29.0, 61.0, -53.0, -19.0, 56.0], [22.0, -77.0, 33.0, -40.0, 59.0]], [[66.0, -4.0, -25.0, -66.0, -58.0], [16.0, -50.0, 29.0, 
+31.0, -22.0], [-56.0, 9.0, -38.0, 45.0, -67.0], [4.0, -9.0, 92.0, -25.0, 12.0]], [[10.0, 60.0, 42.0, -15.0, 14.0], [20.0, 
+-45.0, 80.0, 2.0, -36.0], [-45.0, -80.0, -35.0, 3.0, 25.0], [25.0, -12.0, 35.0, 51.0, -61.0]]], [[[-8.0, -5.0, -30.0, 38.0, 
+23.0], [-79.0, -7.0, -103.0, 9.0, 65.0], [7.0, 63.0, 0.0, -69.0, -19.0], [-14.0, 22.0, -76.0, -62.0, 14.0]], [[12.0, -34.0, 
+76.0, -64.0, -14.0], [8.0, -8.0, -2.0, -6.0, -38.0], [-36.0, -50.0, 84.0, 12.0, 14.0], [-14.0, -6.0, 32.0, 70.0, 8.0]], 
+[[-47.0, -79.0, -20.0, -1.0, 9.0], [-51.0, 74.0, -30.0, -41.0, 55.0], [95.0, 43.0, 73.0, 14.0, 40.0], [-52.0, 37.0, -122.0, 
+8.0, -42.0]], [[-64.0, 66.0, -33.0, 13.0, -5.0], [38.0, -6.0, 43.0, -22.0, -12.0], [71.0, -55.0, -32.0, -12.0, 2.0], [16.0, 
+53.0, -69.0, 15.0, -68.0]], [[2.0, 15.0, -6.0, -17.0, -44.0], [101.0, 3.0, 37.0, 8.0, -67.0], [2.0, -27.0, -10.0, 42.0, -34.0], 
+[26.0, -12.0, 89.0, 10.0, 62.0]]], [[[-23.0, 52.0, -52.0, -40.0, -35.0], [-42.0, -69.0, -41.0, 5.0, 28.0], [25.0, -18.0, -23.0, 
+-52.0, -66.0], [-6.0, 85.0, -89.0, -32.0, -72.0]], [[-29.0, 16.0, 88.0, -20.0, -15.0], [131.0, 20.0, 45.0, -13.0, -112.0], 
+[-8.0, -102.0, 67.0, 27.0, 26.0], [31.0, -26.0, 93.0, 99.0, 70.0]], [[41.0, -19.0, 66.0, 46.0, 88.0], [-65.0, 22.0, 70.0, -6.0, 
+31.0], [-64.0, 3.0, -21.0, 15.0, 109.0], [-4.0, -79.0, 19.0, 38.0, -56.0]], [[-24.0, 39.0, 70.0, -95.0, -80.0], [165.0, -31.0, 
+55.0, -4.0, -147.0], [-10.0, -143.0, 68.0, 40.0, -40.0], [34.0, 18.0, 113.0, 106.0, 54.0]], [[37.0, 3.0, -57.0, 23.0, 17.0], 
+[-49.0, -4.0, 59.0, 8.0, 51.0], [-7.0, 50.0, -91.0, 31.0, 9.0], [-4.0, -18.0, -6.0, -49.0, -66.0]]], [[[-11.0, -69.0, 60.0, 
+-26.0, -7.0], [28.0, 50.0, -28.0, -17.0, -31.0], [9.0, -9.0, 106.0, 22.0, 27.0], [-20.0, -16.0, 21.0, 54.0, 61.0]], [[-43.0, 
+32.0, -90.0, -77.0, -92.0], [25.0, -44.0, -17.0, -6.0, -4.0], [83.0, -22.0, -7.0, 0.0, -101.0], [-11.0, 112.0, -76.0, -29.0, 
+-54.0]], [[10.0, 30.0, 83.0, -139.0, -80.0], [91.0, -76.0, 43.0, 5.0, -116.0], [-54.0, -143.0, 73.0, 25.0, -48.0], [14.0, 30.0, 
+91.0, 107.0, -3.0]], [[-17.0, 58.0, -81.0, -19.0, -43.0], [-3.0, -53.0, -10.0, 10.0, 16.0], [35.0, -1.0, -62.0, -23.0, -74.0], 
+[8.0, 67.0, -50.0, -53.0, -47.0]], [[-7.0, 14.0, -48.0, 54.0, 10.0], [17.0, 23.0, 7.0, 4.0, 14.0], [26.0, 40.0, -54.0, 5.0, 
+-4.0], [14.0, -12.0, 3.0, -46.0, 23.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-120.0, 71.0, 48.0, -41.0, 82.0], [39.0, 24.0, 115.0, 55.0, 70.0], [-48.0, 31.0, 
+-29.0, -22.0, -10.0], [-8.0, 17.0, 33.0, -52.0, -43.0]], [[2.0, -8.0, -43.0, 38.0, 14.0], [-60.0, 18.0, -62.0, 9.0, -65.0], 
+[-84.0, 57.0, 69.0, 91.0, 16.0], [0.0, -2.0, -38.0, 26.0, 18.0]], [[56.0, -35.0, -25.0, -5.0, 3.0], [44.0, -24.0, -39.0, -41.0, 
+-42.0], [92.0, -139.0, 12.0, -72.0, 50.0], [-12.0, -27.0, -5.0, 36.0, -9.0]], [[-38.0, 16.0, 11.0, 20.0, 61.0], [-64.0, 40.0, 
+27.0, -30.0, 5.0], [-37.0, 3.0, 57.0, 94.0, 44.0], [-39.0, 36.0, -35.0, -5.0, -23.0]], [[2.0, 22.0, -46.0, 2.0, -41.0], [-77.0, 
+54.0, -2.0, 3.0, 35.0], [-38.0, 59.0, -40.0, 55.0, -28.0], [34.0, 26.0, 38.0, -72.0, -26.0]]], [[[34.0, -38.0, -12.0, 20.0, 
+3.0], [34.0, -46.0, -69.0, -1.0, -86.0], [7.0, -40.0, 56.0, -23.0, 30.0], [-7.0, -40.0, -45.0, 77.0, 33.0]], [[-68.0, 46.0, 
+18.0, -18.0, -44.0], [-22.0, -4.0, 38.0, 40.0, 22.0], [-40.0, 36.0, -56.0, -22.0, -12.0], [52.0, -10.0, 10.0, -52.0, -50.0]], 
+[[9.0, -19.0, 84.0, 6.0, -66.0], [19.0, -60.0, 18.0, -1.0, 23.0], [22.0, 58.0, -25.0, -17.0, -43.0], [3.0, -3.0, -31.0, 32.0, 
+43.0]], [[40.0, -8.0, -32.0, -5.0, -3.0], [12.0, 30.0, -8.0, 20.0, 40.0], [-15.0, 80.0, -26.0, 18.0, -70.0], [0.0, 20.0, 56.0, 
+-23.0, 47.0]], [[-32.0, 26.0, -9.0, -31.0, 81.0], [50.0, 32.0, 52.0, 15.0, 39.0], [11.0, -37.0, -9.0, -33.0, 4.0], [-24.0, 
+12.0, 46.0, -27.0, -19.0]]], [[[19.0, -15.0, -31.0, 31.0, 11.0], [-33.0, 16.0, -50.0, 18.0, -34.0], [-75.0, 95.0, 50.0, 82.0, 
+-25.0], [-7.0, 7.0, -15.0, 25.0, 50.0]], [[-65.0, 64.0, -26.0, -70.0, 16.0], [76.0, 24.0, 72.0, 73.0, 67.0], [4.0, -21.0, 
+-108.0, -122.0, -37.0], [50.0, -16.0, 105.0, -92.0, -60.0]], [[29.0, -7.0, 9.0, 19.0, -120.0], [-103.0, -2.0, -15.0, -53.0, 
+14.0], [32.0, -5.0, -44.0, 35.0, 9.0], [40.0, 13.0, -24.0, -38.0, -39.0]], [[-102.0, 88.0, -33.0, -67.0, 59.0], [52.0, 60.0, 
+94.0, 95.0, 85.0], [-59.0, 43.0, -91.0, -65.0, -50.0], [40.0, 6.0, 114.0, -113.0, -59.0]], [[53.0, -37.0, 19.0, 46.0, -13.0], 
+[-91.0, 20.0, -19.0, -81.0, 6.0], [17.0, 17.0, 54.0, 119.0, 19.0], [-46.0, 47.0, -52.0, 23.0, 26.0]]], [[[-61.0, 34.0, 45.0, 
+-37.0, -20.0], [57.0, -38.0, 54.0, 41.0, 23.0], [15.0, -23.0, -61.0, -98.0, -7.0], [34.0, -28.0, 15.0, -21.0, -37.0]], [[-7.0, 
+-2.0, 7.0, 15.0, 66.0], [6.0, 26.0, 9.0, 27.0, 18.0], [-72.0, 118.0, 47.0, 80.0, -47.0], [-41.0, 30.0, 4.0, 20.0, 66.0]], 
+[[-112.0, 89.0, -26.0, -33.0, 9.0], [-40.0, 62.0, 69.0, 82.0, 61.0], [-112.0, 102.0, -69.0, 19.0, -40.0], [58.0, 15.0, 65.0, 
+-114.0, -67.0]], [[31.0, -22.0, -29.0, 26.0, 56.0], [-13.0, 30.0, -33.0, -4.0, -17.0], [-43.0, 57.0, 65.0, 81.0, -13.0], 
+[-41.0, 22.0, -6.0, 31.0, 55.0]], [[41.0, -28.0, -7.0, 1.0, 45.0], [39.0, 0.0, -11.0, -28.0, -7.0], [48.0, -55.0, 31.0, -13.0, 
+15.0], [-41.0, 4.0, 2.0, 34.0, 26.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[[0.0, 0.0], [-2.0, -3.0]], [[0.0, 0.0], [0.0, -6.0]], [[-3.0, -6.0], [3.0, 6.0]], [[0.0, -3.0], [-6.0, 
+1.0]], [[-6.0, -2.0], [0.0, -5.0]], [[-5.0, 1.0], [-7.0, 5.0]]])
+      arg1=Data(-6.0,self.functionspace)
+      arg1.setTaggedValue(1,-2.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[30.0, -30.0], [10.0, -35.0]], [[20.0, 20.0], [35.0, -35.0]], [[-15.0, 35.0], [30.0, -5.0]], 
-[[25.0, -35.0], [35.0, -35.0]], [[25.0, -35.0], [-15.0, -30.0]], [[20.0, -25.0], [-30.0, 
--15.0]]])+(1.-msk_ref)*numpy.array([[[5.0, -6.0], [0.0, -2.0]], [[0.0, -1.0], [3.0, -3.0]], [[3.0, -4.0], [4.0, 7.0]], [[0.0, 
-0.0], [7.0, 4.0]], [[-7.0, 4.0], [3.0, 0.0]], [[1.0, -4.0], [-2.0, 7.0]]])
+      ref=Data(numpy.array([[[-0.0, -0.0], [12.0, 18.0]], [[-0.0, -0.0], [-0.0, 36.0]], [[18.0, 36.0], [-18.0, -36.0]], [[-0.0, 
+18.0], [36.0, -6.0]], [[36.0, 12.0], [-0.0, 30.0]], [[30.0, -6.0], [42.0, -30.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-0.0, -0.0], [4.0, 6.0]], [[-0.0, -0.0], [-0.0, 12.0]], [[6.0, 12.0], [-6.0, -12.0]], 
+[[-0.0, 6.0], [12.0, -2.0]], [[12.0, 4.0], [-0.0, 10.0]], [[10.0, -2.0], [14.0, -10.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-2.0, -6.0], [7.0, 0.0]], [[-1.0, 3.0], [2.0, 3.0]], [[-1.0, -1.0], [4.0, -1.0]], [[-7.0, 
--3.0], [4.0, 3.0]], [[2.0, -6.0], [7.0, 0.0]], [[-3.0, 3.0], [-2.0, -3.0]]], [[[-3.0, 3.0], [4.0, 4.0]], [[2.0, 0.0], [-7.0, 
--2.0]], [[-1.0, -2.0], [-2.0, -6.0]], [[-1.0, 1.0], [-4.0, 3.0]], [[-3.0, 0.0], [-5.0, 0.0]], [[-6.0, -1.0], [7.0, 7.0]]], 
-[[[-7.0, 1.0], [-7.0, 2.0]], [[1.0, 4.0], [-5.0, 0.0]], [[5.0, -7.0], [-2.0, -3.0]], [[-7.0, -1.0], [3.0, -6.0]], [[-1.0, 0.0], 
-[4.0, -5.0]], [[-1.0, 5.0], [-5.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 0.0], [6.0, -6.0]], [[-6.0, -7.0], [6.0, 
--1.0]], [[-1.0, -6.0], [0.0, -3.0]], [[-7.0, -1.0], [-7.0, -5.0]], [[4.0, -3.0], [4.0, -6.0]], [[-1.0, -1.0], [2.0, 0.0]]], 
-[[[-6.0, -3.0], [-1.0, 3.0]], [[-1.0, 1.0], [6.0, 4.0]], [[5.0, -5.0], [-4.0, 6.0]], [[-6.0, 5.0], [1.0, -7.0]], [[7.0, 0.0], 
-[2.0, -6.0]], [[1.0, -6.0], [0.0, -4.0]]], [[[2.0, -1.0], [-7.0, -1.0]], [[-4.0, 2.0], [7.0, -5.0]], [[-7.0, 2.0], [-2.0, 
--4.0]], [[6.0, -7.0], [-3.0, -5.0]], [[-3.0, -1.0], [-1.0, -6.0]], [[6.0, 4.0], [6.0, -7.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-4.0, 3.0, -6.0])+(1.-msk_arg1)*numpy.array([-2.0, 5.0, 6.0])
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[[[7.0, 0.0], [7.0, 3.0]], [[2.0, 2.0], [0.0, -1.0]], [[-2.0, 3.0], [3.0, -6.0]], [[6.0, 7.0], [-7.0, 
+5.0]], [[-2.0, -5.0], [0.0, 7.0]], [[0.0, 7.0], [-1.0, 5.0]]], [[[-7.0, -3.0], [5.0, -5.0]], [[0.0, -3.0], [4.0, -1.0]], [[6.0, 
+2.0], [1.0, 2.0]], [[5.0, 3.0], [5.0, -5.0]], [[0.0, 2.0], [4.0, -1.0]], [[6.0, 0.0], [3.0, 6.0]]], [[[4.0, -1.0], [-7.0, 
+-1.0]], [[-3.0, -3.0], [5.0, -3.0]], [[3.0, -1.0], [-7.0, -7.0]], [[-5.0, 4.0], [-3.0, -6.0]], [[0.0, 5.0], [0.0, 1.0]], 
+[[-7.0, 0.0], [7.0, -5.0]]]])
+      arg1=Data(numpy.array([5.0, 2.0, 4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 7.0, 3.0]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[41.0, 27.0], [26.0, 0.0]], [[4.0, -36.0], [1.0, -18.0]], [[-29.0, 40.0], [-10.0, 4.0]], 
-[[67.0, 21.0], [-46.0, 33.0]], [[-11.0, 24.0], [-67.0, 30.0]], [[0.0, -45.0], [59.0, 
-63.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -21.0], [-59.0, 21.0]], [[-17.0, 31.0], [60.0, -8.0]], [[-15.0, -1.0], [-32.0, 
-12.0]], [[20.0, -15.0], [1.0, -55.0]], [[9.0, 0.0], [-4.0, -54.0]], [[43.0, -4.0], [32.0, -62.0]]])
+      ref=Data(numpy.array([[[37.0, -10.0], [17.0, 1.0]], [[-2.0, -8.0], [28.0, -19.0]], [[14.0, 15.0], [-11.0, -54.0]], 
+[[20.0, 57.0], [-37.0, -9.0]], [[-10.0, -1.0], [8.0, 37.0]], [[-16.0, 35.0], [29.0, 17.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[5.0, -24.0], [56.0, -20.0]], [[3.0, -18.0], [43.0, -22.0]], [[39.0, 29.0], [4.0, 
+-43.0]], [[56.0, 75.0], [-16.0, -23.0]], [[-12.0, -1.0], [28.0, 38.0]], [[21.0, 42.0], [36.0, 57.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank3_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-4.0, -2.0], [0.0, 0.0]], [[1.0, 0.0], [6.0, 4.0]], [[-1.0, 2.0], [0.0, -3.0]], [[-1.0, 
-6.0], [6.0, 0.0]], [[0.0, -5.0], [-6.0, -5.0]], [[1.0, 0.0], [0.0, -6.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, -2.0], [-4.0, 
-6.0]], [[-5.0, -5.0], [1.0, 5.0]], [[7.0, 5.0], [2.0, 3.0]], [[-4.0, 0.0], [-6.0, 3.0]], [[2.0, -2.0], [-4.0, -7.0]], [[3.0, 
-0.0], [-2.0, 0.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, 1.0])+(1.-msk_arg1)*numpy.array([3.0, 0.0])
+   def test_generalTransposedTensorProduct_array_rank3_taggedData_rank1_offset0(self):
+      arg0=numpy.array([[[0.0, -7.0], [3.0, -3.0]], [[0.0, -3.0], [-1.0, -5.0]], [[3.0, 4.0], [4.0, -5.0]], [[4.0, 3.0], [7.0, 
+6.0]], [[7.0, -4.0], [5.0, -7.0]], [[-2.0, -4.0], [-2.0, 3.0]]])
+      arg1=Data(numpy.array([3.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-5.0, 0.0]))
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-16.0, -4.0], [-8.0, -2.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[4.0, 1.0], [0.0, 0.0]], [[24.0, 
-6.0], [16.0, 4.0]]], [[[-4.0, -1.0], [8.0, 2.0]], [[0.0, 0.0], [-12.0, -3.0]]], [[[-4.0, -1.0], [24.0, 6.0]], [[24.0, 6.0], 
-[0.0, 0.0]]], [[[0.0, 0.0], [-20.0, -5.0]], [[-24.0, -6.0], [-20.0, -5.0]]], [[[4.0, 1.0], [0.0, 0.0]], [[0.0, 0.0], [-24.0, 
--6.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 0.0], [-6.0, 0.0]], [[-12.0, 0.0], [18.0, 0.0]]], [[[-15.0, 0.0], [-15.0, 0.0]], 
-[[3.0, 0.0], [15.0, 0.0]]], [[[21.0, 0.0], [15.0, 0.0]], [[6.0, 0.0], [9.0, 0.0]]], [[[-12.0, 0.0], [0.0, 0.0]], [[-18.0, 0.0], 
-[9.0, 0.0]]], [[[6.0, 0.0], [-6.0, 0.0]], [[-12.0, 0.0], [-21.0, 0.0]]], [[[9.0, 0.0], [0.0, 0.0]], [[-6.0, 0.0], [0.0, 0.0]]]])
+      ref=Data(numpy.array([[[[0.0, 0.0], [-21.0, -21.0]], [[9.0, 9.0], [-9.0, -9.0]]], [[[0.0, 0.0], [-9.0, -9.0]], [[-3.0, 
+-3.0], [-15.0, -15.0]]], [[[9.0, 9.0], [12.0, 12.0]], [[12.0, 12.0], [-15.0, -15.0]]], [[[12.0, 12.0], [9.0, 9.0]], [[21.0, 
+21.0], [18.0, 18.0]]], [[[21.0, 21.0], [-12.0, -12.0]], [[15.0, 15.0], [-21.0, -21.0]]], [[[-6.0, -6.0], [-12.0, -12.0]], 
+[[-6.0, -6.0], [9.0, 9.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 0.0], [35.0, 0.0]], [[-15.0, 0.0], [15.0, 0.0]]], [[[0.0, 0.0], [15.0, 0.0]], 
+[[5.0, 0.0], [25.0, 0.0]]], [[[-15.0, 0.0], [-20.0, 0.0]], [[-20.0, 0.0], [25.0, 0.0]]], [[[-20.0, 0.0], [-15.0, 0.0]], 
+[[-35.0, 0.0], [-30.0, 0.0]]], [[[-35.0, 0.0], [20.0, 0.0]], [[-25.0, 0.0], [35.0, 0.0]]], [[[10.0, 0.0], [20.0, 0.0]], [[10.0, 
+0.0], [-15.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-5.0, -3.0], [6.0, 1.0]], [[6.0, 5.0], [1.0, 0.0]], [[6.0, 6.0], [1.0, -2.0]], [[7.0, 6.0], 
-[-4.0, 2.0]], [[7.0, 5.0], [7.0, -1.0]], [[1.0, 4.0], [3.0, -3.0]]], [[[6.0, -7.0], [-6.0, -5.0]], [[0.0, 7.0], [-4.0, 1.0]], 
-[[-4.0, 5.0], [-6.0, -4.0]], [[-3.0, 5.0], [0.0, 7.0]], [[1.0, -5.0], [4.0, -2.0]], [[-3.0, 7.0], [3.0, 4.0]]], [[[-4.0, -7.0], 
-[6.0, -2.0]], [[7.0, 4.0], [-4.0, -1.0]], [[-3.0, 1.0], [4.0, 3.0]], [[5.0, 0.0], [-5.0, 3.0]], [[7.0, 1.0], [-4.0, 7.0]], 
-[[0.0, -5.0], [3.0, 1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 4.0], [-1.0, 3.0]], [[6.0, -3.0], [-6.0, -5.0]], [[-6.0, 1.0], 
-[7.0, -5.0]], [[2.0, 1.0], [-3.0, 7.0]], [[-7.0, -3.0], [3.0, 2.0]], [[7.0, 6.0], [-7.0, 4.0]]], [[[-2.0, -7.0], [4.0, 3.0]], 
-[[2.0, 0.0], [0.0, 7.0]], [[0.0, -6.0], [2.0, -3.0]], [[0.0, 7.0], [-5.0, -3.0]], [[-3.0, 6.0], [0.0, -4.0]], [[-5.0, -3.0], 
-[0.0, 0.0]]], [[[0.0, 4.0], [0.0, 7.0]], [[-5.0, -6.0], [-3.0, 0.0]], [[-2.0, 6.0], [-1.0, -6.0]], [[2.0, -6.0], [-7.0, -7.0]], 
-[[-7.0, 5.0], [-6.0, 0.0]], [[5.0, -6.0], [0.0, 0.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 2.0], [7.0, -7.0], [1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 6.0], [1.0, -3.0], 
-[2.0, 7.0]])
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[[[0.0, -6.0], [3.0, 4.0]], [[-2.0, -3.0], [-1.0, 0.0]], [[6.0, 3.0], [6.0, -4.0]], [[5.0, -4.0], [5.0, 
+-7.0]], [[4.0, 2.0], [-3.0, 1.0]], [[-3.0, 4.0], [-3.0, -6.0]]], [[[0.0, -1.0], [-6.0, 2.0]], [[0.0, 3.0], [6.0, 7.0]], [[5.0, 
+4.0], [-5.0, 5.0]], [[-6.0, 7.0], [7.0, 4.0]], [[-6.0, -4.0], [6.0, -1.0]], [[-5.0, 7.0], [-3.0, -7.0]]], [[[6.0, 3.0], [-7.0, 
+-3.0]], [[-4.0, 2.0], [-5.0, -1.0]], [[-4.0, 2.0], [2.0, -4.0]], [[-4.0, 7.0], [5.0, 0.0]], [[3.0, -1.0], [-2.0, -7.0]], [[0.0, 
+-5.0], [-3.0, -3.0]]]])
+      arg1=Data(numpy.array([[-7.0, -2.0], [6.0, 4.0], [3.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 0.0], [-4.0, 1.0], [-6.0, -6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[18.0, -12.0], [45.0, 2.0]], [[-78.0, -16.0], [-25.0, 6.0]]], [[[2.0, 12.0], [45.0, 14.0]], 
+[[28.0, 36.0], [39.0, 30.0]]], [[[-24.0, 16.0], [9.0, 6.0]], [[-66.0, -36.0], [46.0, 36.0]]], [[[-83.0, -26.0], [91.0, 22.0]], 
+[[22.0, 8.0], [73.0, 30.0]]], [[[-55.0, -38.0], [-41.0, -18.0]], [[51.0, 34.0], [-34.0, 8.0]]], [[[-9.0, -14.0], [-1.0, 30.0]], 
+[[-6.0, 0.0], [-9.0, -10.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-36.0, -36.0], [-56.0, -19.0]], [[87.0, 36.0], [38.0, 20.0]]], [[[10.0, 24.0], 
+[-45.0, -9.0]], [[-1.0, 36.0], [-22.0, 13.0]]], [[[46.0, 29.0], [-7.0, -8.0]], [[50.0, -17.0], [-24.0, 29.0]]], [[[83.0, 18.0], 
+[-98.0, -35.0]], [[-23.0, -23.0], [-65.0, 4.0]]], [[[34.0, -24.0], [36.0, 2.0]], [[-33.0, 18.0], [53.0, 41.0]]], [[[-1.0, 
+-5.0], [30.0, 37.0]], [[9.0, 15.0], [4.0, 11.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[63.0, -52.0], [-41.0, 43.0]], [[-66.0, 54.0], [-42.0, 37.0]]], [[[-23.0, 12.0], [28.0, 
--39.0]], [[-37.0, 30.0], [6.0, -7.0]]], [[[-61.0, 40.0], [6.0, -23.0]], [[-43.0, 44.0], [-15.0, 24.0]]], [[[-51.0, 35.0], [5.0, 
--23.0]], [[15.0, -8.0], [42.0, -45.0]]], [[[-21.0, 7.0], [-59.0, 45.0]], [[-11.0, -14.0], [-2.0, 12.0]]], [[[-26.0, 23.0], 
-[24.0, -41.0]], [[9.0, -15.0], [44.0, -34.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, -18.0], [-11.0, 73.0]], [[7.0, -18.0], 
-[8.0, 58.0]]], [[[-26.0, -5.0], [-3.0, -60.0]], [[12.0, -57.0], [22.0, -51.0]]], [[[14.0, -50.0], [3.0, 66.0]], [[-21.0, 29.0], 
-[0.0, -63.0]]], [[[-2.0, 26.0], [-8.0, -57.0]], [[-10.0, -52.0], [-38.0, 2.0]]], [[[4.0, -82.0], [25.0, -1.0]], [[-21.0, 
--24.0], [-10.0, 24.0]]], [[[-16.0, 92.0], [-33.0, 3.0]], [[21.0, -42.0], [-12.0, 24.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, 3.0, -2.0, -4.0], [-5.0, -6.0, 1.0, -5.0], [-2.0, 7.0, 4.0, 1.0]], [[0.0, 0.0, 4.0, 
-0.0], [1.0, -1.0, -3.0, 7.0], [5.0, -4.0, 6.0, -5.0]]], [[[-5.0, 0.0, 2.0, -5.0], [-5.0, -4.0, -2.0, 6.0], [-5.0, 3.0, -4.0, 
--2.0]], [[3.0, 0.0, 1.0, 2.0], [5.0, 3.0, 2.0, -2.0], [-1.0, -4.0, -3.0, -6.0]]], [[[1.0, 6.0, 5.0, 7.0], [-1.0, -1.0, 0.0, 
-6.0], [-3.0, 0.0, 0.0, -1.0]], [[-4.0, 5.0, 2.0, 7.0], [1.0, -6.0, 5.0, 3.0], [-3.0, 7.0, 6.0, 
--5.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, -2.0, -5.0, 5.0], [0.0, 3.0, 2.0, 2.0], [-6.0, 1.0, -3.0, 6.0]], [[-4.0, 3.0, 3.0, 
--4.0], [5.0, -4.0, 0.0, 0.0], [-5.0, -2.0, -5.0, -2.0]]], [[[-3.0, 0.0, -1.0, -5.0], [4.0, -6.0, -3.0, 3.0], [1.0, -7.0, 4.0, 
-0.0]], [[6.0, 0.0, -7.0, 0.0], [-7.0, 7.0, 0.0, 6.0], [2.0, 4.0, 0.0, 1.0]]], [[[0.0, 6.0, -6.0, 6.0], [6.0, 4.0, 5.0, -7.0], 
-[0.0, 0.0, 0.0, 4.0]], [[-1.0, 4.0, -2.0, -1.0], [1.0, -1.0, 0.0, -1.0], [0.0, -3.0, -4.0, -7.0]]]])
-      arg1=4.0
+   def test_generalTransposedTensorProduct_array_rank4_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[[[0.0, -4.0, -4.0, 2.0], [-4.0, 4.0, 1.0, 2.0], [4.0, 1.0, 0.0, 0.0]], [[3.0, -5.0, -3.0, -5.0], 
+[-6.0, 6.0, -6.0, 6.0], [-2.0, -4.0, -7.0, -5.0]]], [[[-7.0, -4.0, 0.0, -1.0], [-6.0, 6.0, 4.0, 0.0], [7.0, 0.0, 6.0, 0.0]], 
+[[6.0, 7.0, 0.0, 3.0], [0.0, 4.0, -6.0, -5.0], [-5.0, 0.0, 0.0, -2.0]]], [[[-4.0, -7.0, -7.0, -1.0], [7.0, 4.0, -1.0, 5.0], 
+[-1.0, 7.0, -7.0, -4.0]], [[1.0, 1.0, -1.0, 1.0], [4.0, 0.0, 3.0, 1.0], [4.0, -2.0, 0.0, -1.0]]]])
+      arg1=Data(-5.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, 12.0, -8.0, -16.0], [-20.0, -24.0, 4.0, -20.0], [-8.0, 28.0, 16.0, 4.0]], [[0.0, 0.0, 
-16.0, 0.0], [4.0, -4.0, -12.0, 28.0], [20.0, -16.0, 24.0, -20.0]]], [[[-20.0, 0.0, 8.0, -20.0], [-20.0, -16.0, -8.0, 24.0], 
-[-20.0, 12.0, -16.0, -8.0]], [[12.0, 0.0, 4.0, 8.0], [20.0, 12.0, 8.0, -8.0], [-4.0, -16.0, -12.0, -24.0]]], [[[4.0, 24.0, 
-20.0, 28.0], [-4.0, -4.0, 0.0, 24.0], [-12.0, 0.0, 0.0, -4.0]], [[-16.0, 20.0, 8.0, 28.0], [4.0, -24.0, 20.0, 12.0], [-12.0, 
-28.0, 24.0, -20.0]]]])+(1.-msk_ref)*numpy.array([[[[8.0, -8.0, -20.0, 20.0], [0.0, 12.0, 8.0, 8.0], [-24.0, 4.0, -12.0, 24.0]], 
-[[-16.0, 12.0, 12.0, -16.0], [20.0, -16.0, 0.0, 0.0], [-20.0, -8.0, -20.0, -8.0]]], [[[-12.0, 0.0, -4.0, -20.0], [16.0, -24.0, 
--12.0, 12.0], [4.0, -28.0, 16.0, 0.0]], [[24.0, 0.0, -28.0, 0.0], [-28.0, 28.0, 0.0, 24.0], [8.0, 16.0, 0.0, 4.0]]], [[[0.0, 
-24.0, -24.0, 24.0], [24.0, 16.0, 20.0, -28.0], [0.0, 0.0, 0.0, 16.0]], [[-4.0, 16.0, -8.0, -4.0], [4.0, -4.0, 0.0, -4.0], [0.0, 
--12.0, -16.0, -28.0]]]])
+      ref=Data(numpy.array([[[[-0.0, 20.0, 20.0, -10.0], [20.0, -20.0, -5.0, -10.0], [-20.0, -5.0, -0.0, -0.0]], [[-15.0, 25.0, 
+15.0, 25.0], [30.0, -30.0, 30.0, -30.0], [10.0, 20.0, 35.0, 25.0]]], [[[35.0, 20.0, -0.0, 5.0], [30.0, -30.0, -20.0, -0.0], 
+[-35.0, -0.0, -30.0, -0.0]], [[-30.0, -35.0, -0.0, -15.0], [-0.0, -20.0, 30.0, 25.0], [25.0, -0.0, -0.0, 10.0]]], [[[20.0, 
+35.0, 35.0, 5.0], [-35.0, -20.0, 5.0, -25.0], [5.0, -35.0, 35.0, 20.0]], [[-5.0, -5.0, 5.0, -5.0], [-20.0, -0.0, -15.0, -5.0], 
+[-20.0, 10.0, -0.0, 5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-0.0, 12.0, 12.0, -6.0], [12.0, -12.0, -3.0, -6.0], [-12.0, -3.0, -0.0, -0.0]], 
+[[-9.0, 15.0, 9.0, 15.0], [18.0, -18.0, 18.0, -18.0], [6.0, 12.0, 21.0, 15.0]]], [[[21.0, 12.0, -0.0, 3.0], [18.0, -18.0, 
+-12.0, -0.0], [-21.0, -0.0, -18.0, -0.0]], [[-18.0, -21.0, -0.0, -9.0], [-0.0, -12.0, 18.0, 15.0], [15.0, -0.0, -0.0, 6.0]]], 
+[[[12.0, 21.0, 21.0, 3.0], [-21.0, -12.0, 3.0, -15.0], [3.0, -21.0, 21.0, 12.0]], [[-3.0, -3.0, 3.0, -3.0], [-12.0, -0.0, -9.0, 
+-3.0], [-12.0, 6.0, -0.0, 3.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[3.0, -6.0, 6.0, 0.0], [1.0, 1.0, -6.0, -7.0], [6.0, -3.0, 4.0, -7.0]], [[-2.0, 0.0, 2.0, 
--5.0], [4.0, -5.0, 5.0, -3.0], [-7.0, -6.0, 4.0, -7.0]]], [[[1.0, -5.0, 6.0, -2.0], [-1.0, -1.0, -5.0, -3.0], [0.0, -4.0, -1.0, 
--3.0]], [[0.0, 2.0, 5.0, 1.0], [-3.0, 6.0, 7.0, 3.0], [3.0, 4.0, 6.0, -6.0]]], [[[6.0, -2.0, -1.0, -3.0], [0.0, -2.0, 4.0, 
-0.0], [0.0, -5.0, 4.0, -4.0]], [[-2.0, 2.0, 5.0, -6.0], [-5.0, 7.0, 4.0, 0.0], [6.0, 5.0, 7.0, 
--1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 0.0, -7.0, -2.0], [5.0, 1.0, 1.0, -4.0], [0.0, -4.0, -6.0, -4.0]], [[1.0, 4.0, 
--3.0, 0.0], [-7.0, -7.0, 4.0, -5.0], [-6.0, 7.0, 7.0, 2.0]]], [[[3.0, 2.0, -7.0, -2.0], [-4.0, -3.0, 0.0, 4.0], [1.0, -6.0, 
--2.0, 6.0]], [[1.0, 1.0, 3.0, 0.0], [0.0, 4.0, 4.0, 7.0], [7.0, 1.0, 4.0, 0.0]]], [[[6.0, -5.0, -6.0, 1.0], [2.0, 0.0, -1.0, 
--5.0], [-1.0, -1.0, 0.0, 0.0]], [[5.0, 1.0, 6.0, 0.0], [-7.0, 7.0, -2.0, 0.0], [7.0, 7.0, -7.0, 1.0]]]])
-      arg1=numpy.array(7.0)
+   def test_generalTransposedTensorProduct_constData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg1=Data(-4.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
       res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[21.0, -42.0, 42.0, 0.0], [7.0, 7.0, -42.0, -49.0], [42.0, -21.0, 28.0, -49.0]], [[-14.0, 0.0, 
-14.0, -35.0], [28.0, -35.0, 35.0, -21.0], [-49.0, -42.0, 28.0, -49.0]]], [[[7.0, -35.0, 42.0, -14.0], [-7.0, -7.0, -35.0, 
--21.0], [0.0, -28.0, -7.0, -21.0]], [[0.0, 14.0, 35.0, 7.0], [-21.0, 42.0, 49.0, 21.0], [21.0, 28.0, 42.0, -42.0]]], [[[42.0, 
--14.0, -7.0, -21.0], [0.0, -14.0, 28.0, 0.0], [0.0, -35.0, 28.0, -28.0]], [[-14.0, 14.0, 35.0, -42.0], [-35.0, 49.0, 28.0, 
-0.0], [42.0, 35.0, 49.0, -7.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, 0.0, -49.0, -14.0], [35.0, 7.0, 7.0, -28.0], [0.0, 
--28.0, -42.0, -28.0]], [[7.0, 28.0, -21.0, 0.0], [-49.0, -49.0, 28.0, -35.0], [-42.0, 49.0, 49.0, 14.0]]], [[[21.0, 14.0, 
--49.0, -14.0], [-28.0, -21.0, 0.0, 28.0], [7.0, -42.0, -14.0, 42.0]], [[7.0, 7.0, 21.0, 0.0], [0.0, 28.0, 28.0, 49.0], [49.0, 
-7.0, 28.0, 0.0]]], [[[42.0, -35.0, -42.0, 7.0], [14.0, 0.0, -7.0, -35.0], [-7.0, -7.0, 0.0, 0.0]], [[35.0, 7.0, 42.0, 0.0], 
-[-49.0, 49.0, -14.0, 0.0], [49.0, 49.0, -49.0, 7.0]]]])
+      ref=Data(-0.0,self.functionspace)
+      ref.setTaggedValue(1,-0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 0.0, 1.0, 0.0], [2.0, -5.0, 4.0, 7.0], [7.0, 2.0, 1.0, 0.0]], [[-3.0, 6.0, 0.0, 7.0], 
-[0.0, 1.0, 0.0, 4.0], [1.0, 7.0, -2.0, 7.0]]], [[[0.0, -5.0, -3.0, 7.0], [-4.0, 6.0, -4.0, 0.0], [1.0, 7.0, -6.0, 0.0]], [[7.0, 
-2.0, -3.0, 1.0], [7.0, 2.0, -4.0, -1.0], [0.0, 1.0, -6.0, -3.0]]], [[[1.0, 1.0, 4.0, -3.0], [-4.0, 0.0, -3.0, -3.0], [-5.0, 
-3.0, 6.0, 0.0]], [[7.0, -4.0, 3.0, -2.0], [-4.0, -5.0, -3.0, 4.0], [-4.0, -7.0, -4.0, 
--5.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -2.0, 0.0, -2.0], [-4.0, -6.0, -1.0, -7.0], [3.0, 2.0, 7.0, 1.0]], [[2.0, -6.0, 
--1.0, 7.0], [0.0, 2.0, -1.0, 4.0], [-2.0, -7.0, -7.0, 6.0]]], [[[-6.0, -1.0, -4.0, 7.0], [1.0, 7.0, -5.0, -2.0], [3.0, 7.0, 
-3.0, 2.0]], [[-4.0, 7.0, 6.0, 1.0], [3.0, -4.0, 6.0, -4.0], [5.0, -3.0, -1.0, -2.0]]], [[[2.0, 6.0, 7.0, 3.0], [4.0, -1.0, 
--1.0, 1.0], [4.0, 0.0, 7.0, -2.0]], [[0.0, 0.0, 4.0, -7.0], [1.0, 7.0, 6.0, 6.0], [5.0, 6.0, 1.0, -6.0]]]])
-      arg1=Data(-2.0,self.functionspace)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-0.0, -0.0, -2.0, -0.0], [-4.0, 10.0, -8.0, -14.0], [-14.0, -4.0, -2.0, -0.0]], [[6.0, -12.0, 
--0.0, -14.0], [-0.0, -2.0, -0.0, -8.0], [-2.0, -14.0, 4.0, -14.0]]], [[[-0.0, 10.0, 6.0, -14.0], [8.0, -12.0, 8.0, -0.0], 
-[-2.0, -14.0, 12.0, -0.0]], [[-14.0, -4.0, 6.0, -2.0], [-14.0, -4.0, 8.0, 2.0], [-0.0, -2.0, 12.0, 6.0]]], [[[-2.0, -2.0, -8.0, 
-6.0], [8.0, -0.0, 6.0, 6.0], [10.0, -6.0, -12.0, -0.0]], [[-14.0, 8.0, -6.0, 4.0], [8.0, 10.0, 6.0, -8.0], [8.0, 14.0, 8.0, 
-10.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 4.0, -0.0, 4.0], [8.0, 12.0, 2.0, 14.0], [-6.0, -4.0, -14.0, -2.0]], [[-4.0, 
-12.0, 2.0, -14.0], [-0.0, -4.0, 2.0, -8.0], [4.0, 14.0, 14.0, -12.0]]], [[[12.0, 2.0, 8.0, -14.0], [-2.0, -14.0, 10.0, 4.0], 
-[-6.0, -14.0, -6.0, -4.0]], [[8.0, -14.0, -12.0, -2.0], [-6.0, 8.0, -12.0, 8.0], [-10.0, 6.0, 2.0, 4.0]]], [[[-4.0, -12.0, 
--14.0, -6.0], [-8.0, 2.0, 2.0, -2.0], [-8.0, -0.0, -14.0, 4.0]], [[-0.0, -0.0, -8.0, 14.0], [-2.0, -14.0, -12.0, -12.0], 
-[-10.0, -12.0, -2.0, 12.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-4.0, -3.0, 0.0]),self.functionspace)
+      arg1=Data(numpy.array([0.0, 7.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 0.0, -7.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-21.0,self.functionspace)
+      ref.setTaggedValue(1,24.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTransposedTensorProduct_expandedData_rank4_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, -7.0, -1.0, -1.0], [5.0, 5.0, -4.0, 7.0], [6.0, 0.0, -1.0, 6.0]], [[-5.0, -2.0, -7.0, 
--5.0], [6.0, 5.0, 1.0, -6.0], [-5.0, 0.0, -4.0, -4.0]]], [[[-2.0, -6.0, -7.0, 2.0], [-5.0, -3.0, 0.0, 4.0], [6.0, 5.0, 3.0, 
-6.0]], [[1.0, 0.0, 0.0, -2.0], [6.0, 6.0, -3.0, 7.0], [-3.0, 3.0, 4.0, -7.0]]], [[[3.0, 5.0, -1.0, -6.0], [-3.0, 6.0, 5.0, 
--4.0], [-6.0, -6.0, -1.0, 5.0]], [[-1.0, 2.0, 0.0, -1.0], [2.0, 0.0, -6.0, -3.0], [-5.0, -7.0, -7.0, 
--3.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -6.0, -5.0, -6.0], [-7.0, -7.0, 1.0, 5.0], [0.0, 6.0, 1.0, 6.0]], [[3.0, 6.0, 7.0, 
-6.0], [7.0, 0.0, -3.0, -5.0], [4.0, -3.0, 5.0, -4.0]]], [[[-7.0, 4.0, 0.0, 1.0], [-6.0, 1.0, 6.0, 4.0], [4.0, -1.0, -7.0, 
-5.0]], [[-5.0, -3.0, 0.0, 1.0], [4.0, 0.0, 0.0, 4.0], [-3.0, 2.0, 2.0, 0.0]]], [[[-1.0, 2.0, -3.0, 0.0], [-4.0, -4.0, 4.0, 
--3.0], [0.0, 0.0, -7.0, 7.0]], [[-6.0, 3.0, 6.0, 0.0], [3.0, -4.0, 3.0, 1.0], [-1.0, -3.0, 0.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(7.0)
-      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-0.0, 21.0, 3.0, 3.0], [-15.0, -15.0, 12.0, -21.0], [-18.0, -0.0, 3.0, -18.0]], [[15.0, 6.0, 
-21.0, 15.0], [-18.0, -15.0, -3.0, 18.0], [15.0, -0.0, 12.0, 12.0]]], [[[6.0, 18.0, 21.0, -6.0], [15.0, 9.0, -0.0, -12.0], 
-[-18.0, -15.0, -9.0, -18.0]], [[-3.0, -0.0, -0.0, 6.0], [-18.0, -18.0, 9.0, -21.0], [9.0, -9.0, -12.0, 21.0]]], [[[-9.0, -15.0, 
-3.0, 18.0], [9.0, -18.0, -15.0, 12.0], [18.0, 18.0, 3.0, -15.0]], [[3.0, -6.0, -0.0, 3.0], [-6.0, -0.0, 18.0, 9.0], [15.0, 
-21.0, 21.0, 9.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, -42.0, -35.0, -42.0], [-49.0, -49.0, 7.0, 35.0], [0.0, 42.0, 7.0, 
-42.0]], [[21.0, 42.0, 49.0, 42.0], [49.0, 0.0, -21.0, -35.0], [28.0, -21.0, 35.0, -28.0]]], [[[-49.0, 28.0, 0.0, 7.0], [-42.0, 
-7.0, 42.0, 28.0], [28.0, -7.0, -49.0, 35.0]], [[-35.0, -21.0, 0.0, 7.0], [28.0, 0.0, 0.0, 28.0], [-21.0, 14.0, 14.0, 0.0]]], 
-[[[-7.0, 14.0, -21.0, 0.0], [-28.0, -28.0, 28.0, -21.0], [0.0, 0.0, -49.0, 49.0]], [[-42.0, 21.0, 42.0, 0.0], [21.0, -28.0, 
-21.0, 7.0], [-7.0, -21.0, 0.0, -35.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-3.0, -7.0, 1.0], [-3.0, -5.0, -3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-4.0, -6.0, -2.0], [1.0, -5.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 0.0, 4.0], [6.0, 6.0, 0.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(80.0,self.functionspace)
+      ref.setTaggedValue(1,-29.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_array_rank2_array_rank2(self):
-      arg0=numpy.array([[5.0, -3.0, -5.0], [3.0, 1.0, 2.0]])
-      arg1=numpy.array([[-5.0, -1.0, 6.0], [7.0, -5.0, 0.0]])
-      res=matrix_transposed_mult(arg0,arg1)
-      ref=numpy.array([[-52.0, 50.0], [-4.0, 16.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-2.0, 0.0, -2.0], [4.0, 3.0, -6.0], [4.0, 6.0, 1.0], [0.0, 6.0, -6.0]], [[-4.0, 5.0, 0.0], 
+[-1.0, -3.0, 0.0], [-1.0, -3.0, 3.0], [1.0, 0.0, 5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-2.0, 6.0, 7.0], [-7.0, 4.0, -1.0], [7.0, -4.0, 5.0], [-6.0, 0.0, 6.0]], [[-4.0, 2.0, -4.0], 
+[-6.0, -3.0, 6.0], [0.0, 5.0, 4.0], [-2.0, -1.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, 5.0, -3.0], [5.0, -7.0, 4.0], [4.0, 1.0, -4.0], [-7.0, -7.0, -3.0]], [[-2.0, 
+7.0, 1.0], [0.0, 0.0, -3.0], [2.0, -7.0, -5.0], [-4.0, 2.0, -7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(4.0,self.functionspace)
+      ref.setTaggedValue(1,-25.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-4.0, -2.0], [0.0, -4.0], [-3.0, -7.0]], [[-5.0, 3.0], [5.0, 0.0], [0.0, 4.0]]], [[[-7.0, 0.0], 
+[-3.0, -1.0], [-5.0, -4.0]], [[-6.0, 2.0], [-6.0, 7.0], [-4.0, -6.0]]], [[[7.0, -7.0], [6.0, 4.0], [4.0, -5.0]], [[3.0, 7.0], 
+[2.0, -7.0], [-6.0, 2.0]]], [[[5.0, 1.0], [-1.0, -1.0], [6.0, -3.0]], [[1.0, -2.0], [-7.0, 0.0], [-1.0, 
+0.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-5.0, 0.0], [1.0, 1.0], [7.0, 1.0]], [[-2.0, -4.0], [-7.0, -7.0], [-7.0, -3.0]]], [[[-2.0, 
+5.0], [-6.0, 0.0], [1.0, 1.0]], [[-5.0, 6.0], [6.0, 1.0], [-2.0, 3.0]]], [[[-5.0, -1.0], [2.0, 4.0], [6.0, 0.0]], [[-5.0, 
+-5.0], [-4.0, 2.0], [-3.0, 5.0]]], [[[0.0, -5.0], [-4.0, 4.0], [3.0, -6.0]], [[-3.0, -5.0], [3.0, 0.0], [-6.0, 
+4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -3.0], [2.0, 7.0], [-1.0, 7.0]], [[-4.0, -5.0], [2.0, 3.0], [3.0, 4.0]]], 
+[[[-6.0, 5.0], [4.0, -1.0], [6.0, -6.0]], [[-1.0, -6.0], [-3.0, -4.0], [7.0, -6.0]]], [[[2.0, 6.0], [0.0, -6.0], [7.0, -3.0]], 
+[[-6.0, 0.0], [-1.0, 6.0], [-6.0, 6.0]]], [[[-5.0, -4.0], [6.0, 5.0], [5.0, 6.0]], [[6.0, 0.0], [6.0, -3.0], [-7.0, 7.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-32.0,self.functionspace)
+      ref.setTaggedValue(1,-104.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=matrix_transposed_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[4.0, 1.0, -7.0], [0.0, 2.0, 6.0]])
-      arg1=Data(numpy.array([[3.0, 1.0, -3.0], [-7.0, 4.0, -3.0]]),self.functionspace)
-      res=matrix_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[34.0, -3.0], [-16.0, -10.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      arg1=Data(numpy.array([-3.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, -5.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-18.0, -12.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([30.0, -30.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[-4.0, 5.0, -4.0], [-1.0, 2.0, -6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, 7.0, 3.0], [-7.0, 6.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 6.0, -2.0], [0.0, -1.0, 
--4.0]])
-      res=matrix_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[35.0, 58.0], [-1.0, 19.0]])+(1.-msk_ref)*numpy.array([[46.0, 11.0], [26.0, 22.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([5.0, -5.0, 4.0]),self.functionspace)
+      arg1=Data(numpy.array([[7.0, 4.0], [0.0, -1.0], [7.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, 2.0], [4.0, -5.0], [2.0, 6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([63.0, 29.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-17.0, 59.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=matrix_transposed_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[3.0, 1.0, -6.0], [5.0, -6.0, -3.0]]),self.functionspace)
-      arg1=numpy.array([[0.0, 3.0, 6.0], [-2.0, 6.0, 0.0]])
-      res=matrix_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[-33.0, 0.0], [-36.0, -46.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-7.0, 7.0, -1.0], [-6.0, 5.0, -2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[4.0, 5.0], [6.0, -7.0], [-1.0, 6.0]], [[7.0, 1.0], [-2.0, 0.0], [-5.0, 
+7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, 2.0], [-2.0, 2.0], [5.0, 4.0]], [[0.0, -6.0], [6.0, 6.0], [4.0, -3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-27.0, -110.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-18.0, 68.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[-5.0, 4.0, -2.0], [-7.0, -4.0, 4.0]]),self.functionspace)
-      arg1=Data(numpy.array([[-6.0, 2.0, 0.0], [-4.0, 1.0, 0.0]]),self.functionspace)
-      res=matrix_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[38.0, 24.0], [34.0, 24.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[0.0, -6.0, -7.0], [0.0, 0.0, 7.0], [4.0, -5.0, -2.0], [7.0, -3.0, -4.0]], [[7.0, 4.0, -4.0], 
+[-2.0, -5.0, 3.0], [-1.0, -7.0, -3.0], [0.0, 5.0, 7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[5.0, -3.0], [0.0, -2.0], [0.0, 7.0]], [[1.0, 2.0], [0.0, 0.0], [4.0, 2.0]], [[5.0, -4.0], [2.0, 
+0.0], [0.0, 1.0]], [[-3.0, -6.0], [2.0, 0.0], [-7.0, 6.0]]], [[[-5.0, -6.0], [0.0, -5.0], [-3.0, -4.0]], [[-5.0, -5.0], [6.0, 
+5.0], [-2.0, 5.0]], [[1.0, -7.0], [0.0, 3.0], [2.0, 3.0]], [[3.0, 6.0], [3.0, -4.0], [3.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, 7.0], [-2.0, 3.0], [0.0, -3.0]], [[-3.0, 6.0], [1.0, 0.0], [-6.0, -7.0]], 
+[[-6.0, -4.0], [-1.0, -1.0], [2.0, -2.0]], [[-7.0, 5.0], [0.0, -2.0], [-4.0, -5.0]]], [[[-2.0, 1.0], [3.0, 1.0], [-7.0, -7.0]], 
+[[4.0, 2.0], [-4.0, 4.0], [1.0, -3.0]], [[0.0, -7.0], [-3.0, 0.0], [-6.0, 7.0]], [[2.0, 2.0], [5.0, -7.0], [1.0, 0.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([19.0, -196.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([26.0, -35.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=matrix_transposed_mult(arg0,arg1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_constData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg1=Data(numpy.array([[-7.0, 1.0, 0.0, -1.0, 4.0], [4.0, -6.0, 4.0, -4.0, 7.0], [4.0, 0.0, -4.0, -6.0, 7.0], [-5.0, 
+-5.0, -7.0, -6.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 3.0, 3.0, 0.0, 3.0], [6.0, 0.0, 1.0, 0.0, 2.0], [-3.0, 7.0, 4.0, -5.0, 4.0], 
+[-6.0, 6.0, -3.0, 4.0, -6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, 0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, -0.0, 0.0], [0.0, 0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, 
+-0.0, -0.0, -0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], 
+[-0.0, 0.0, -0.0, 0.0, -0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[0.0, -1.0, 1.0], [-5.0, 2.0, 0.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[4.0, 4.0, 1.0], [-1.0, -2.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, 6.0, 0.0], [1.0, 0.0, 
--2.0]])
-      res=matrix_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-3.0, 6.0], [-12.0, 1.0]])+(1.-msk_ref)*numpy.array([[-6.0, -2.0], [-3.0, -5.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-4.0, -6.0, -1.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, -6.0, 5.0, -1.0, 6.0], [-1.0, -2.0, 5.0, -4.0, 3.0], [-5.0, -7.0, 3.0, 5.0, 5.0], [-6.0, 
+-1.0, -2.0, -7.0, 4.0]], [[4.0, 0.0, 0.0, 4.0, -3.0], [-3.0, -2.0, 3.0, -1.0, 3.0], [3.0, 2.0, -2.0, -4.0, 0.0], [-4.0, 5.0, 
+-3.0, 7.0, 4.0]], [[-1.0, 1.0, -5.0, 1.0, -4.0], [1.0, -2.0, -5.0, 7.0, 6.0], [2.0, 6.0, 7.0, -5.0, 2.0], [0.0, 0.0, -4.0, 6.0, 
+6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 0.0, 0.0, 2.0, 3.0], [-5.0, 5.0, 0.0, 0.0, 0.0], [-3.0, -6.0, 0.0, -6.0, -6.0], 
+[-2.0, -7.0, 3.0, -1.0, 4.0]], [[5.0, 0.0, -1.0, -3.0, -6.0], [-3.0, -5.0, -5.0, -4.0, 0.0], [-7.0, 3.0, 4.0, -1.0, -6.0], 
+[-3.0, 4.0, -5.0, 2.0, -6.0]], [[1.0, 0.0, 4.0, -3.0, 3.0], [-7.0, -3.0, -2.0, -2.0, 6.0], [0.0, -7.0, 2.0, 5.0, 1.0], [-3.0, 
+4.0, -1.0, -3.0, -3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-7.0, 23.0, -15.0, -21.0, -2.0], [21.0, 22.0, -33.0, 15.0, -36.0], [0.0, 10.0, -7.0, 9.0, -22.0], 
+[48.0, -26.0, 30.0, -20.0, -46.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, 0.0, 2.0, 13.0, 21.0], [45.0, 13.0, 32.0, 26.0, -6.0], [54.0, 13.0, -26.0, 
+25.0, 59.0], [29.0, 0.0, 19.0, -5.0, 23.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_expandedData_rank2_array_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-2.0, -3.0, -1.0], [5.0, 7.0, -2.0]])+(1.-msk_arg0)*numpy.array([[1.0, -6.0, 1.0], [4.0, 
--4.0, 2.0]])
-      arg1=numpy.array([[4.0, 7.0, 5.0], [0.0, -3.0, -5.0]])
-      res=matrix_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-34.0, 14.0], [59.0, -11.0]])+(1.-msk_ref)*numpy.array([[-33.0, 13.0], [-2.0, 2.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[1.0, 0.0, -4.0], [1.0, -5.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-7.0, 1.0, -7.0, -4.0, -3.0], [-6.0, 1.0, -5.0, 4.0, 4.0], [-5.0, 1.0, 0.0, 0.0, 7.0], [4.0, 
+0.0, 5.0, 7.0, 2.0]], [[-4.0, -1.0, -3.0, -4.0, 7.0], [-6.0, -6.0, -1.0, 3.0, 0.0], [7.0, -1.0, 0.0, 1.0, -4.0], [6.0, 3.0, 
+7.0, 3.0, -3.0]], [[0.0, -1.0, 0.0, 7.0, -7.0], [-5.0, 0.0, -3.0, 2.0, -4.0], [0.0, 1.0, -1.0, -1.0, 5.0], [-7.0, -5.0, 0.0, 
+-4.0, 3.0]]], [[[-5.0, 7.0, 6.0, 1.0, -4.0], [2.0, -7.0, 4.0, 6.0, -6.0], [1.0, -2.0, 6.0, 6.0, -5.0], [5.0, 0.0, 6.0, -7.0, 
+-2.0]], [[0.0, 5.0, 3.0, 3.0, 7.0], [3.0, -7.0, 4.0, 6.0, -5.0], [0.0, 7.0, 6.0, 4.0, 7.0], [6.0, 0.0, 6.0, -1.0, 6.0]], 
+[[-2.0, 1.0, -3.0, 7.0, -7.0], [5.0, 1.0, 0.0, -2.0, 5.0], [5.0, 3.0, 2.0, 0.0, -4.0], [3.0, -5.0, 4.0, 0.0, 
+1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 4.0, 2.0, 2.0, 4.0], [-1.0, -3.0, -5.0, 3.0, 1.0], [0.0, -7.0, 7.0, -3.0, 
+-5.0], [-4.0, 1.0, 0.0, -1.0, -2.0]], [[4.0, 4.0, -6.0, 4.0, -5.0], [1.0, -3.0, 4.0, -3.0, 3.0], [-1.0, 0.0, 6.0, -2.0, 6.0], 
+[-6.0, 0.0, 4.0, 6.0, 3.0]], [[7.0, -4.0, -5.0, -2.0, -7.0], [0.0, -6.0, 2.0, 6.0, -6.0], [-2.0, -7.0, 5.0, -6.0, 6.0], [0.0, 
+-5.0, 1.0, -1.0, 7.0]]], [[[-7.0, -5.0, -3.0, 5.0, -1.0], [2.0, -3.0, -2.0, 2.0, -6.0], [0.0, -5.0, 1.0, -3.0, 4.0], [5.0, 5.0, 
+7.0, 3.0, -3.0]], [[0.0, 1.0, 3.0, 4.0, -3.0], [6.0, -4.0, 2.0, -7.0, 4.0], [4.0, -2.0, -4.0, 2.0, 1.0], [-3.0, -1.0, 0.0, 4.0, 
+-4.0]], [[7.0, -2.0, -2.0, -3.0, 0.0], [-4.0, 3.0, 2.0, 5.0, -3.0], [-6.0, 3.0, 4.0, -2.0, -3.0], [1.0, 0.0, -4.0, 7.0, 
+-5.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-12.0, -13.0, -16.0, -46.0, -14.0], [1.0, 29.0, -9.0, -28.0, 39.0], [-4.0, -40.0, -20.0, -10.0, 
+-53.0], [7.0, 20.0, -19.0, 21.0, -42.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, 10.0, 4.0, -5.0, 46.0], [-29.0, 38.0, -25.0, 16.0, -1.0], [-12.0, 26.0, 8.0, 
+8.0, -30.0], [16.0, 31.0, 3.0, -14.0, -13.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_expandedData_rank2_constData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, 0.0, -4.0], [-2.0, 4.0, -5.0]])+(1.-msk_arg0)*numpy.array([[3.0, 7.0, 0.0], [-4.0, 
--3.0, 1.0]])
-      arg1=Data(numpy.array([[5.0, -7.0, 6.0], [3.0, 4.0, -1.0]]),self.functionspace)
-      res=matrix_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-39.0, -5.0], [-68.0, 15.0]])+(1.-msk_ref)*numpy.array([[-34.0, 37.0], [7.0, -25.0]])
+   def test_generalTransposedTensorProduct_constData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg1=Data(numpy.array([[[-7.0, 4.0], [-1.0, 4.0]], [[2.0, 1.0], [3.0, -3.0]], [[-2.0, -5.0], [-7.0, -7.0]], [[-6.0, 4.0], 
+[3.0, -7.0]], [[2.0, -7.0], [1.0, -7.0]], [[1.0, -5.0], [-7.0, 4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 0.0], [3.0, 6.0]], [[-5.0, 3.0], [-5.0, 1.0]], [[6.0, 5.0], [-3.0, 6.0]], 
+[[-3.0, 4.0], [-6.0, 3.0]], [[-6.0, -4.0], [-7.0, -5.0]], [[-4.0, -4.0], [6.0, 7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[14.0, -8.0], [2.0, -8.0]], [[-4.0, -2.0], [-6.0, 6.0]], [[4.0, 10.0], [14.0, 14.0]], [[12.0, 
+-8.0], [-6.0, 14.0]], [[-4.0, 14.0], [-2.0, 14.0]], [[-2.0, 10.0], [14.0, -8.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[14.0, -0.0], [-6.0, -12.0]], [[10.0, -6.0], [10.0, -2.0]], [[-12.0, -10.0], [6.0, 
+-12.0]], [[6.0, -8.0], [12.0, -6.0]], [[12.0, 8.0], [14.0, 10.0]], [[8.0, 8.0], [-12.0, -14.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_matrix_transposed_mult_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, -5.0, -6.0], [0.0, 6.0, -3.0]])+(1.-msk_arg0)*numpy.array([[3.0, -3.0, 4.0], [0.0, 1.0, 
-4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[7.0, -3.0, 6.0], [2.0, 2.0, 2.0]])+(1.-msk_arg1)*numpy.array([[2.0, -7.0, 4.0], [-1.0, 4.0, 
-0.0]])
-      res=matrix_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-56.0, -32.0], [-36.0, 6.0]])+(1.-msk_ref)*numpy.array([[43.0, -15.0], [9.0, 4.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([0.0, 5.0, 1.0]),self.functionspace)
+      arg1=Data(numpy.array([[[[-5.0, 7.0], [3.0, -6.0]], [[-7.0, 4.0], [1.0, 7.0]], [[-3.0, 1.0], [1.0, 7.0]], [[-1.0, -5.0], 
+[5.0, -5.0]], [[1.0, -5.0], [3.0, -5.0]], [[-4.0, -5.0], [7.0, -6.0]]], [[[-1.0, 7.0], [2.0, 0.0]], [[-2.0, -7.0], [1.0, 1.0]], 
+[[5.0, 7.0], [3.0, -2.0]], [[-6.0, -1.0], [-2.0, 0.0]], [[-4.0, 4.0], [-7.0, 1.0]], [[-1.0, 3.0], [0.0, -3.0]]], [[[-7.0, 
+-5.0], [3.0, 5.0]], [[-3.0, -5.0], [3.0, 0.0]], [[1.0, 4.0], [5.0, 7.0]], [[-4.0, -3.0], [0.0, 6.0]], [[2.0, 0.0], [-1.0, 
+-4.0]], [[7.0, 0.0], [-6.0, -7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -6.0], [0.0, 0.0]], [[-4.0, -7.0], [7.0, 5.0]], [[2.0, 1.0], [-1.0, -2.0]], 
+[[7.0, -6.0], [2.0, -5.0]], [[-5.0, 0.0], [0.0, -1.0]], [[-4.0, -7.0], [-5.0, -2.0]]], [[[2.0, 0.0], [-5.0, -5.0]], [[-6.0, 
+1.0], [-3.0, 4.0]], [[1.0, -3.0], [-7.0, -3.0]], [[2.0, 3.0], [6.0, -2.0]], [[7.0, 4.0], [6.0, 5.0]], [[0.0, -5.0], [4.0, 
+-7.0]]], [[[5.0, -6.0], [-3.0, -5.0]], [[-7.0, 5.0], [-5.0, 3.0]], [[6.0, 6.0], [-6.0, 2.0]], [[-4.0, 6.0], [7.0, -1.0]], 
+[[-5.0, -7.0], [-5.0, 4.0]], [[-5.0, 1.0], [-2.0, 4.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-12.0, 30.0], [13.0, 5.0]], [[-13.0, -40.0], [8.0, 5.0]], [[26.0, 39.0], [20.0, -3.0]], [[-34.0, 
+-8.0], [-10.0, 6.0]], [[-18.0, 20.0], [-36.0, 1.0]], [[2.0, 15.0], [-6.0, -22.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[15.0, -6.0], [-28.0, -30.0]], [[-37.0, 10.0], [-20.0, 23.0]], [[11.0, -9.0], [-41.0, 
+-13.0]], [[6.0, 21.0], [37.0, -11.0]], [[30.0, 13.0], [25.0, 29.0]], [[-5.0, -24.0], [18.0, -31.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank2_array_rank1(self):
-      arg0=numpy.array([[-5.0, -7.0, -5.0], [0.0, -6.0, 3.0]])
-      arg1=numpy.array([-3.0, 0.0, 2.0])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=numpy.array([5.0, 6.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(6.0,self.functionspace)
+      arg1=Data(numpy.array([[[[2.0, 0.0, -5.0, 0.0], [7.0, 7.0, 0.0, 4.0], [-7.0, 2.0, 3.0, -6.0]], [[0.0, 2.0, 0.0, 7.0], 
+[-2.0, 0.0, 1.0, 0.0], [-3.0, -1.0, -7.0, -4.0]]], [[[6.0, 3.0, 7.0, 2.0], [2.0, 1.0, -3.0, 7.0], [-3.0, 4.0, 0.0, 7.0]], 
+[[-1.0, 3.0, 5.0, -1.0], [-6.0, 0.0, -5.0, -2.0], [0.0, 0.0, 3.0, 1.0]]], [[[-1.0, 0.0, 6.0, 0.0], [-3.0, 5.0, -7.0, 0.0], 
+[-5.0, 2.0, 5.0, 2.0]], [[2.0, 0.0, 0.0, -3.0], [-2.0, 7.0, -4.0, -3.0], [5.0, 4.0, 7.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, -4.0, 7.0, 3.0], [-1.0, 3.0, -5.0, -3.0], [0.0, 4.0, 4.0, 0.0]], [[-2.0, 5.0, 
+1.0, 5.0], [0.0, 3.0, 0.0, -4.0], [-4.0, 1.0, 4.0, -3.0]]], [[[0.0, 5.0, -6.0, -2.0], [5.0, 6.0, 4.0, 4.0], [-7.0, 1.0, -5.0, 
+-2.0]], [[2.0, 0.0, 2.0, -6.0], [3.0, 4.0, 1.0, 4.0], [-6.0, -5.0, 5.0, 5.0]]], [[[0.0, -6.0, -7.0, 0.0], [5.0, 5.0, -5.0, 
+-4.0], [1.0, -7.0, 2.0, -2.0]], [[-4.0, -6.0, 2.0, 5.0], [-5.0, -1.0, 0.0, 4.0], [0.0, 3.0, 5.0, -4.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[12.0, 0.0, -30.0, 0.0], [42.0, 42.0, 0.0, 24.0], [-42.0, 12.0, 18.0, -36.0]], [[0.0, 12.0, 0.0, 
+42.0], [-12.0, 0.0, 6.0, 0.0], [-18.0, -6.0, -42.0, -24.0]]], [[[36.0, 18.0, 42.0, 12.0], [12.0, 6.0, -18.0, 42.0], [-18.0, 
+24.0, 0.0, 42.0]], [[-6.0, 18.0, 30.0, -6.0], [-36.0, 0.0, -30.0, -12.0], [0.0, 0.0, 18.0, 6.0]]], [[[-6.0, 0.0, 36.0, 0.0], 
+[-18.0, 30.0, -42.0, 0.0], [-30.0, 12.0, 30.0, 12.0]], [[12.0, 0.0, 0.0, -18.0], [-12.0, 42.0, -24.0, -18.0], [30.0, 24.0, 
+42.0, 42.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[12.0, -24.0, 42.0, 18.0], [-6.0, 18.0, -30.0, -18.0], [0.0, 24.0, 24.0, 0.0]], 
+[[-12.0, 30.0, 6.0, 30.0], [0.0, 18.0, 0.0, -24.0], [-24.0, 6.0, 24.0, -18.0]]], [[[0.0, 30.0, -36.0, -12.0], [30.0, 36.0, 
+24.0, 24.0], [-42.0, 6.0, -30.0, -12.0]], [[12.0, 0.0, 12.0, -36.0], [18.0, 24.0, 6.0, 24.0], [-36.0, -30.0, 30.0, 30.0]]], 
+[[[0.0, -36.0, -42.0, 0.0], [30.0, 30.0, -30.0, -24.0], [6.0, -42.0, 12.0, -12.0]], [[-24.0, -36.0, 12.0, 30.0], [-30.0, -6.0, 
+0.0, 24.0], [0.0, 18.0, 30.0, -24.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_transposed_mult(arg0,arg1)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank2_array_rank2(self):
-      arg0=numpy.array([[1.0, -6.0, -3.0], [-5.0, 0.0, -1.0]])
-      arg1=numpy.array([[7.0, 3.0, -7.0], [-7.0, -6.0, 3.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=numpy.array([[10.0, 20.0], [-28.0, 32.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([-5.0, -3.0]),self.functionspace)
+      arg1=Data(-1.0,self.functionspace)
+      arg1.setTaggedValue(1,-2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([5.0, 3.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([10.0, 6.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank2_constData_rank1(self):
-      arg0=numpy.array([[-7.0, 5.0, -6.0], [0.0, -6.0, -7.0]])
-      arg1=Data(numpy.array([-3.0, -6.0, -6.0]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([27.0, 78.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[0.0, 3.0], [-6.0, 2.0], [7.0, -7.0]]),self.functionspace)
+      arg1=Data(numpy.array([0.0, 0.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 7.0, -4.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([0.0, 0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-70.0, 24.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank2_constData_rank2(self):
-      arg0=numpy.array([[-4.0, 5.0, 7.0], [3.0, 1.0, -6.0]])
-      arg1=Data(numpy.array([[0.0, 1.0, -1.0], [7.0, 0.0, -3.0]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[-2.0, -49.0], [7.0, 39.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-1.0, 6.0], [2.0, 2.0], [-2.0, 4.0]], [[-1.0, -2.0], [4.0, 0.0], [-6.0, 
+-7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-7.0, -1.0, -2.0], [7.0, 0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -3.0, -3.0], [-4.0, 2.0, 7.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([2.0, -66.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-30.0, -59.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank2_expandedData_rank1(self):
-      arg0=numpy.array([[-5.0, -1.0, -6.0], [-5.0, -2.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, 6.0, -1.0])+(1.-msk_arg1)*numpy.array([4.0, 2.0, -6.0])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([25.0, 11.0])+(1.-msk_ref)*numpy.array([14.0, -36.0])
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, -7.0], [6.0, 0.0], [-6.0, 1.0]], [[2.0, 4.0], [6.0, -6.0], [5.0, 0.0]], [[3.0, 6.0], [4.0, 
+0.0], [6.0, -4.0]], [[3.0, -3.0], [-7.0, -5.0], [7.0, 7.0]]], [[[2.0, -5.0], [-5.0, 2.0], [-2.0, 6.0]], [[-1.0, -2.0], [-1.0, 
+6.0], [-2.0, -7.0]], [[0.0, 0.0], [2.0, 7.0], [1.0, -1.0]], [[-1.0, -5.0], [-7.0, -6.0], [1.0, 3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[2.0, -6.0, 0.0], [6.0, 1.0, 5.0], [-2.0, -3.0, -1.0], [3.0, -6.0, 0.0]], [[-2.0, 6.0, 0.0], 
+[0.0, -1.0, -7.0], [-6.0, -5.0, 0.0], [6.0, 0.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, -2.0, -1.0], [3.0, -1.0, 7.0], [-1.0, 2.0, -2.0], [-1.0, 5.0, -7.0]], [[-4.0, 
+-3.0, 7.0], [-6.0, 0.0, 6.0], [4.0, -2.0, -2.0], [6.0, 3.0, -3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([4.0, 8.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-102.0, -116.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=tensor_transposed_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank2_expandedData_rank2(self):
-      arg0=numpy.array([[0.0, 4.0, 6.0], [-4.0, -5.0, -5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, -7.0, 1.0], [3.0, 5.0, -6.0]])+(1.-msk_arg1)*numpy.array([[6.0, 7.0, -3.0], [7.0, 0.0, 
--6.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-22.0, -16.0], [26.0, -7.0]])+(1.-msk_ref)*numpy.array([[10.0, -36.0], [-44.0, 2.0]])
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([2.0, -5.0]),self.functionspace)
+      arg1=Data(numpy.array([0.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 7.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 0.0], [0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[6.0, 14.0], [-15.0, -35.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_array_rank2(self):
-      arg0=numpy.array([[[[-3.0, -3.0, -7.0], [2.0, 0.0, 6.0]], [[7.0, 2.0, -4.0], [7.0, 6.0, -1.0]], [[-3.0, 3.0, 6.0], [7.0, 
-1.0, 1.0]], [[-4.0, -6.0, 1.0], [-5.0, -7.0, -2.0]], [[3.0, 6.0, -3.0], [4.0, -2.0, 0.0]]], [[[-4.0, 4.0, 4.0], [-6.0, -4.0, 
-0.0]], [[-6.0, 6.0, -5.0], [-6.0, 7.0, -3.0]], [[-1.0, -2.0, 7.0], [6.0, 0.0, 0.0]], [[4.0, -3.0, 1.0], [-2.0, 0.0, 0.0]], 
-[[6.0, -3.0, -6.0], [2.0, 6.0, -6.0]]], [[[-3.0, 0.0, -7.0], [0.0, -7.0, -6.0]], [[-1.0, -7.0, -7.0], [5.0, 6.0, -1.0]], 
-[[-7.0, 0.0, 2.0], [-1.0, 4.0, -2.0]], [[2.0, -7.0, 2.0], [-7.0, -6.0, 6.0]], [[-7.0, -4.0, 6.0], [3.0, -6.0, 3.0]]], [[[-5.0, 
--7.0, 0.0], [4.0, -4.0, 4.0]], [[0.0, 7.0, 7.0], [-6.0, -3.0, 0.0]], [[4.0, -4.0, -5.0], [4.0, -7.0, 2.0]], [[-5.0, 2.0, 4.0], 
-[-4.0, 2.0, -6.0]], [[0.0, 2.0, 7.0], [4.0, 0.0, -4.0]]]])
-      arg1=numpy.array([[1.0, 1.0, 6.0], [-4.0, 5.0, 5.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=numpy.array([[-26.0, -18.0, 18.0, -29.0, -35.0], [28.0, 14.0, 15.0, 15.0, -41.0], [-110.0, -45.0, 19.0, 35.0, -2.0], 
-[-28.0, 58.0, -71.0, 17.0, 8.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[5.0, -2.0], [-3.0, 3.0], [-7.0, 2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-3.0, -3.0], [-1.0, -4.0], [0.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 5.0], [-4.0, 0.0], [0.0, -4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-12.0, 11.0], [3.0, -10.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[12.0, 53.0], [-12.0, -18.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_array_rank3(self):
-      arg0=numpy.array([[[[3.0, 0.0, 7.0], [-3.0, -5.0, -3.0]], [[6.0, 5.0, 2.0], [2.0, 7.0, 2.0]], [[-6.0, 4.0, 1.0], [-5.0, 
-1.0, 6.0]], [[-5.0, -5.0, -3.0], [2.0, 1.0, 5.0]], [[1.0, 4.0, 0.0], [5.0, -1.0, 5.0]]], [[[-3.0, -5.0, -3.0], [-5.0, 3.0, 
--2.0]], [[-7.0, -1.0, 6.0], [7.0, -1.0, 3.0]], [[-6.0, 5.0, 6.0], [-7.0, 6.0, -4.0]], [[-1.0, 0.0, 0.0], [0.0, 4.0, -2.0]], 
-[[-2.0, -1.0, 6.0], [-7.0, -5.0, 7.0]]], [[[7.0, 0.0, -7.0], [0.0, -4.0, -2.0]], [[4.0, 5.0, -5.0], [-1.0, -3.0, -5.0]], [[5.0, 
-6.0, 0.0], [7.0, 0.0, 2.0]], [[5.0, 5.0, -4.0], [4.0, 0.0, 2.0]], [[1.0, -1.0, 2.0], [-1.0, 0.0, 4.0]]], [[[0.0, -3.0, 4.0], 
-[-5.0, 3.0, -5.0]], [[5.0, 1.0, -3.0], [-7.0, 1.0, 3.0]], [[4.0, 1.0, -1.0], [-3.0, -6.0, 7.0]], [[-7.0, -1.0, -5.0], [6.0, 
-0.0, 7.0]], [[-7.0, 5.0, 2.0], [0.0, 0.0, 2.0]]]])
-      arg1=numpy.array([[[-7.0, 1.0, -5.0], [-2.0, 7.0, 6.0]], [[5.0, 3.0, 4.0], [-1.0, 4.0, 4.0]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=numpy.array([[[-103.0, 14.0], [10.0, 87.0], [94.0, 19.0], [78.0, -30.0], [10.0, 28.0]], [[50.0, -33.0], [15.0, 
--13.0], [49.0, 24.0], [23.0, 3.0], [4.0, 26.0]], [[-54.0, -17.0], [-47.0, -16.0], [-31.0, 44.0], [-6.0, 28.0], [8.0, 27.0]], 
-[[-22.0, 4.0], [20.0, 39.0], [-16.0, 26.0], [103.0, -36.0], [56.0, -4.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 3.0], [5.0, -4.0], [-5.0, 0.0]], [[-7.0, -1.0], [-1.0, 1.0], [-5.0, 
+5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-1.0, 6.0], [1.0, 2.0], [5.0, -7.0]], [[1.0, 0.0], [3.0, 1.0], [-2.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -2.0], [-7.0, -4.0], [-3.0, 4.0]], [[-1.0, 2.0], [1.0, 4.0], [0.0, -4.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-20.0, 34.0], [-15.0, 21.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-14.0, -38.0], [30.0, -8.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_array_rank4(self):
-      arg0=numpy.array([[[[2.0, -6.0, -5.0], [-1.0, 4.0, 3.0]], [[3.0, 1.0, 4.0], [0.0, -5.0, -3.0]], [[-1.0, 2.0, 3.0], [-1.0, 
-7.0, 5.0]], [[7.0, -7.0, -3.0], [0.0, 4.0, 6.0]], [[5.0, -5.0, -1.0], [1.0, -5.0, -7.0]]], [[[0.0, 5.0, 4.0], [-2.0, 6.0, 
-3.0]], [[2.0, 6.0, 3.0], [0.0, 0.0, 6.0]], [[0.0, 5.0, 0.0], [-7.0, 0.0, 0.0]], [[0.0, -6.0, 0.0], [0.0, -4.0, -7.0]], [[-4.0, 
-6.0, 7.0], [-4.0, -7.0, 5.0]]], [[[0.0, 0.0, -7.0], [5.0, 0.0, 0.0]], [[-5.0, 0.0, -3.0], [5.0, 4.0, -3.0]], [[2.0, -4.0, 7.0], 
-[2.0, -1.0, 5.0]], [[-7.0, -1.0, -6.0], [7.0, -7.0, 7.0]], [[-6.0, 6.0, 5.0], [-5.0, 5.0, -6.0]]], [[[-6.0, -3.0, 6.0], [3.0, 
-1.0, 1.0]], [[0.0, 5.0, -2.0], [-5.0, -1.0, -2.0]], [[4.0, -1.0, -3.0], [7.0, -7.0, 5.0]], [[-6.0, 6.0, -4.0], [3.0, 0.0, 
--5.0]], [[-1.0, 7.0, 1.0], [-1.0, -4.0, -4.0]]]])
-      arg1=numpy.array([[[[0.0, -2.0, 5.0], [0.0, 7.0, -3.0]], [[-4.0, 4.0, 4.0], [3.0, 0.0, 3.0]], [[5.0, 7.0, 7.0], [3.0, 
--1.0, -7.0]], [[4.0, -5.0, 3.0], [-5.0, -6.0, 2.0]], [[0.0, 1.0, -4.0], [-3.0, 7.0, 4.0]]], [[[7.0, -1.0, 3.0], [-1.0, -2.0, 
--4.0]], [[7.0, -7.0, -4.0], [-4.0, -4.0, 1.0]], [[7.0, -5.0, 7.0], [6.0, 4.0, 0.0]], [[-5.0, 4.0, -4.0], [-5.0, -1.0, 6.0]], 
-[[0.0, -7.0, 1.0], [2.0, -5.0, 6.0]]], [[[-4.0, 0.0, 1.0], [6.0, -2.0, 5.0]], [[-5.0, -7.0, 7.0], [2.0, -7.0, -5.0]], [[5.0, 
-2.0, 0.0], [1.0, -2.0, 0.0]], [[7.0, 0.0, 2.0], [4.0, 0.0, 4.0]], [[-3.0, 5.0, -4.0], [0.0, 4.0, -2.0]]], [[[1.0, 0.0, 3.0], 
-[5.0, 3.0, 1.0]], [[0.0, 1.0, 2.0], [6.0, 2.0, -2.0]], [[0.0, -5.0, -6.0], [3.0, -5.0, -5.0]], [[6.0, 0.0, -2.0], [-2.0, 4.0, 
-6.0]], [[3.0, 0.0, -3.0], [5.0, -4.0, 0.0]]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=numpy.array([[[[6.0, -46.0, -95.0, 10.0, 57.0], [-14.0, 67.0, 19.0, 5.0, 33.0], [-12.0, -48.0, -11.0, 12.0, -6.0], 
-[-3.0, -20.0, 22.0, 58.0, 0.0]], [[-8.0, -1.0, 76.0, 43.0, -62.0], [54.0, 15.0, 24.0, -40.0, 4.0], [-13.0, 56.0, 27.0, 17.0, 
--34.0], [-3.0, 5.0, 11.0, -28.0, 17.0]], [[45.0, 36.0, -15.0, -32.0, 62.0], [-33.0, -52.0, 26.0, 29.0, -18.0], [12.0, -64.0, 
--16.0, 15.0, 19.0], [29.0, 6.0, -91.0, 48.0, -45.0]], [[9.0, -50.0, -81.0, 42.0, 57.0], [15.0, 100.0, 79.0, -19.0, 62.0], 
-[-9.0, -65.0, 13.0, 67.0, -40.0], [16.0, -17.0, 3.0, 100.0, 14.0]], [[-9.0, -62.0, 40.0, 53.0, -67.0], [74.0, 83.0, 39.0, 
--83.0, 19.0], [-40.0, 75.0, 26.0, 9.0, -42.0], [-15.0, 3.0, 94.0, -32.0, 43.0]]], [[[43.0, 39.0, 30.0, -33.0, 49.0], [-15.0, 
--64.0, 15.0, 26.0, -47.0], [-5.0, -68.0, -4.0, 12.0, 27.0], [23.0, 7.0, -100.0, 38.0, -46.0]], [[-15.0, 46.0, 31.0, -1.0, 
-18.0], [-7.0, -34.0, 5.0, 38.0, -3.0], [25.0, -61.0, 22.0, 44.0, 0.0], [17.0, 0.0, -78.0, 42.0, -3.0]], [[-10.0, -1.0, 14.0, 
-10.0, 26.0], [2.0, -7.0, -67.0, 55.0, -49.0], [-42.0, -49.0, 3.0, -28.0, 25.0], [-35.0, -37.0, -46.0, 14.0, -35.0]], [[5.0, 
--45.0, 11.0, 40.0, -62.0], [42.0, 51.0, 14.0, -62.0, 20.0], [-27.0, 105.0, -4.0, -28.0, -32.0], [-19.0, 0.0, 85.0, -58.0, 
-16.0]], [[-41.0, 71.0, 31.0, 47.0, -39.0], [-15.0, -49.0, -61.0, 73.0, 22.0], [38.0, 43.0, 2.0, -10.0, -24.0], [-19.0, -28.0, 
--74.0, -28.0, -25.0]]], [[[-35.0, -13.0, -34.0, -46.0, 13.0], [-26.0, 8.0, -19.0, 3.0, 3.0], [23.0, -39.0, 5.0, 6.0, 28.0], 
-[4.0, 16.0, 57.0, 4.0, 46.0]], [[22.0, 14.0, -14.0, -84.0, 13.0], [-45.0, -62.0, -10.0, -10.0, -31.0], [24.0, 1.0, -28.0, 
--33.0, 49.0], [20.0, 38.0, 28.0, -36.0, 3.0]], [[21.0, 25.0, 3.0, 55.0, -25.0], [19.0, 15.0, 91.0, -33.0, 74.0], [38.0, 53.0, 
-6.0, 56.0, -68.0], [35.0, 10.0, -36.0, 20.0, -1.0]], [[-98.0, 42.0, -105.0, -20.0, -19.0], [-87.0, -11.0, -72.0, 69.0, 92.0], 
-[113.0, 28.0, -16.0, -5.0, -2.0], [-4.0, 1.0, 62.0, -30.0, 60.0]], [[66.0, 35.0, 69.0, -56.0, 12.0], [-14.0, -110.0, -47.0, 
-18.0, -108.0], [-41.0, 8.0, -33.0, -76.0, 60.0], [-7.0, 8.0, -70.0, -52.0, -78.0]]], [[[40.0, 48.0, -8.0, -10.0, -25.0], 
-[-30.0, -60.0, 37.0, -16.0, 34.0], [51.0, 87.0, -35.0, -14.0, -19.0], [31.0, 27.0, -22.0, -44.0, -25.0]], [[-21.0, -9.0, 21.0, 
--4.0, 13.0], [4.0, -5.0, -73.0, 42.0, -54.0], [-40.0, -42.0, 7.0, -32.0, 33.0], [-36.0, -27.0, -13.0, -2.0, -15.0]], [[-77.0, 
-4.0, -15.0, 29.0, -39.0], [7.0, 52.0, 26.0, -10.0, 83.0], [62.0, 4.0, 39.0, 70.0, -43.0], [14.0, 11.0, 54.0, 18.0, 84.0]], 
-[[-17.0, 26.0, 28.0, -91.0, -7.0], [-43.0, -85.0, -82.0, 25.0, -70.0], [13.0, -9.0, -15.0, -58.0, 74.0], [-8.0, 26.0, 28.0, 
--64.0, 9.0]], [[-25.0, 21.0, 80.0, -15.0, -38.0], [14.0, -44.0, -57.0, 14.0, -54.0], [-13.0, 9.0, 16.0, -25.0, 26.0], [-19.0, 
-3.0, -4.0, -46.0, 5.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, -1.0], [-1.0, -3.0], [-4.0, 3.0]], [[-2.0, -6.0], [-6.0, 0.0], [-3.0, 6.0]], [[-7.0, 
+-1.0], [1.0, 7.0], [-2.0, 2.0]], [[4.0, 7.0], [1.0, -4.0], [2.0, -4.0]]], [[[-4.0, -2.0], [0.0, 3.0], [0.0, 3.0]], [[3.0, 2.0], 
+[1.0, -3.0], [2.0, 0.0]], [[7.0, -5.0], [-5.0, -7.0], [-3.0, -5.0]], [[-1.0, 3.0], [7.0, -5.0], [-1.0, 
+1.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[5.0, -3.0], [0.0, -2.0], [-5.0, -2.0]], [[0.0, -1.0], [-5.0, 5.0], [-7.0, 0.0]], [[3.0, -7.0], 
+[0.0, 5.0], [-4.0, 7.0]], [[7.0, -1.0], [-5.0, 1.0], [-7.0, -2.0]]], [[[-5.0, -1.0], [4.0, -7.0], [-6.0, -6.0]], [[1.0, -7.0], 
+[-7.0, 6.0], [-1.0, -3.0]], [[4.0, 1.0], [7.0, 6.0], [4.0, 6.0]], [[1.0, -3.0], [7.0, -6.0], [3.0, 6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, -7.0], [6.0, -5.0], [-4.0, -7.0]], [[3.0, -5.0], [-6.0, 6.0], [1.0, 5.0]], 
+[[-4.0, 5.0], [1.0, 6.0], [6.0, -5.0]], [[5.0, 4.0], [0.0, -6.0], [5.0, 0.0]]], [[[-3.0, -2.0], [-7.0, -7.0], [5.0, 1.0]], 
+[[5.0, 1.0], [2.0, 0.0], [-6.0, -1.0]], [[-3.0, 0.0], [-2.0, 0.0], [0.0, 6.0]], [[3.0, -5.0], [-3.0, 0.0], [1.0, 3.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[127.0, -100.0], [-67.0, -57.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[45.0, -52.0], [59.0, 86.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_constData_rank2(self):
-      arg0=numpy.array([[[[4.0, -4.0, 1.0], [-3.0, -5.0, 7.0]], [[-6.0, 7.0, 0.0], [7.0, -4.0, 6.0]], [[5.0, -7.0, 5.0], [6.0, 
--1.0, 6.0]], [[5.0, 0.0, 0.0], [-5.0, -2.0, 7.0]], [[-6.0, 6.0, -4.0], [-5.0, -7.0, -5.0]]], [[[1.0, 4.0, 6.0], [0.0, 0.0, 
-4.0]], [[-3.0, -2.0, 3.0], [-6.0, 2.0, 5.0]], [[5.0, -5.0, -2.0], [4.0, 6.0, 5.0]], [[2.0, 7.0, -3.0], [2.0, 4.0, 0.0]], [[4.0, 
-4.0, -3.0], [3.0, 0.0, 0.0]]], [[[3.0, 5.0, -3.0], [-2.0, -7.0, 1.0]], [[6.0, -7.0, 2.0], [-5.0, -1.0, -3.0]], [[3.0, -2.0, 
-1.0], [7.0, 4.0, 3.0]], [[-2.0, 0.0, -7.0], [5.0, 1.0, -1.0]], [[-6.0, -1.0, 1.0], [-6.0, -7.0, 4.0]]], [[[6.0, -5.0, 3.0], 
-[-1.0, -6.0, 6.0]], [[-2.0, -1.0, -6.0], [0.0, 7.0, 1.0]], [[-7.0, 4.0, 2.0], [-3.0, 6.0, 3.0]], [[-6.0, -1.0, -1.0], [-3.0, 
-5.0, -3.0]], [[4.0, -6.0, 2.0], [5.0, 6.0, -7.0]]]])
-      arg1=Data(numpy.array([[1.0, 5.0, 3.0], [-6.0, -6.0, 3.0]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[56.0, 29.0, -27.0, 68.0, 69.0], [51.0, 35.0, -71.0, -8.0, -3.0], [76.0, 4.0, -61.0, -62.0, 82.0], 
-[50.0, -64.0, 10.0, -35.0, -107.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([2.0, 7.0]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, -7.0, 7.0, 1.0, 2.0], [-7.0, 1.0, -7.0, -6.0, 3.0], [-7.0, 6.0, 0.0, 6.0, -1.0], [-6.0, 
+-2.0, 0.0, -1.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 0.0, 5.0, 0.0, -3.0], [-5.0, 6.0, -2.0, 3.0, -2.0], [7.0, -7.0, 0.0, 0.0, -5.0], 
+[-6.0, -3.0, -2.0, -3.0, 6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-2.0, -14.0, 14.0, 2.0, 4.0], [-14.0, 2.0, -14.0, -12.0, 6.0], [-14.0, 12.0, 0.0, 12.0, -2.0], 
+[-12.0, -4.0, 0.0, -2.0, -12.0]], [[-7.0, -49.0, 49.0, 7.0, 14.0], [-49.0, 7.0, -49.0, -42.0, 21.0], [-49.0, 42.0, 0.0, 42.0, 
+-7.0], [-42.0, -14.0, 0.0, -7.0, -42.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[14.0, 0.0, 10.0, 0.0, -6.0], [-10.0, 12.0, -4.0, 6.0, -4.0], [14.0, -14.0, 0.0, 0.0, 
+-10.0], [-12.0, -6.0, -4.0, -6.0, 12.0]], [[49.0, 0.0, 35.0, 0.0, -21.0], [-35.0, 42.0, -14.0, 21.0, -14.0], [49.0, -49.0, 0.0, 
+0.0, -35.0], [-42.0, -21.0, -14.0, -21.0, 42.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_constData_rank3(self):
-      arg0=numpy.array([[[[3.0, -1.0, -2.0], [1.0, 0.0, 5.0]], [[7.0, -6.0, 4.0], [-3.0, -5.0, 4.0]], [[3.0, 0.0, 6.0], [7.0, 
--3.0, 2.0]], [[2.0, -5.0, 6.0], [2.0, 2.0, -4.0]], [[0.0, 6.0, 7.0], [3.0, 5.0, -5.0]]], [[[0.0, 6.0, -6.0], [3.0, 7.0, -3.0]], 
-[[-4.0, 6.0, 5.0], [-3.0, 5.0, -6.0]], [[5.0, 5.0, 2.0], [7.0, -5.0, -2.0]], [[0.0, -5.0, -6.0], [-2.0, 0.0, -3.0]], [[1.0, 
--3.0, -5.0], [2.0, 5.0, 3.0]]], [[[5.0, 1.0, -1.0], [2.0, 1.0, 4.0]], [[-7.0, 5.0, 1.0], [0.0, 6.0, 1.0]], [[-2.0, 0.0, -2.0], 
-[1.0, 2.0, -6.0]], [[1.0, 7.0, 5.0], [3.0, 1.0, 6.0]], [[-7.0, 6.0, -1.0], [6.0, 7.0, -3.0]]], [[[5.0, 0.0, -1.0], [-2.0, 1.0, 
-6.0]], [[1.0, 0.0, 0.0], [5.0, -3.0, 2.0]], [[7.0, -3.0, 4.0], [5.0, -2.0, 6.0]], [[5.0, 1.0, 7.0], [2.0, 2.0, 0.0]], [[2.0, 
-1.0, -1.0], [-2.0, 0.0, 0.0]]]])
-      arg1=Data(numpy.array([[[1.0, -3.0, -2.0], [0.0, -6.0, 4.0]], [[4.0, 0.0, 7.0], [5.0, 0.0, -5.0]]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[[30.0, -22.0], [63.0, 21.0], [17.0, 79.0], [-23.0, 80.0], [-82.0, 89.0]], [[-60.0, -12.0], [-86.0, 
-34.0], [8.0, 79.0], [15.0, -37.0], [2.0, -36.0]], [[14.0, 3.0], [-56.0, -26.0], [-34.0, 13.0], [-12.0, 24.0], [-77.0, 10.0]], 
-[[25.0, -27.0], [27.0, 19.0], [44.0, 51.0], [-24.0, 79.0], [1.0, -9.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-6.0, -7.0], [3.0, 1.0], [-7.0, -3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-3.0, -5.0, 5.0, 1.0, -2.0], [-7.0, -5.0, -5.0, 0.0, 3.0], [5.0, -5.0, -6.0, 7.0, 0.0], [-6.0, 
+-1.0, 5.0, 1.0, -3.0]], [[1.0, 1.0, 1.0, 5.0, 5.0], [4.0, 7.0, -5.0, 1.0, -1.0], [6.0, 5.0, 5.0, 6.0, 5.0], [6.0, 3.0, 2.0, 
+3.0, 5.0]], [[1.0, -5.0, 4.0, 6.0, -7.0], [-7.0, -6.0, -1.0, 2.0, -2.0], [4.0, 5.0, 0.0, 2.0, 5.0], [5.0, 5.0, 2.0, 3.0, 
+7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 3.0, -2.0, -3.0, 7.0], [6.0, 6.0, 1.0, 3.0, 0.0], [3.0, 0.0, -5.0, -1.0, 0.0], 
+[2.0, 0.0, -2.0, -5.0, -1.0]], [[-1.0, -4.0, 2.0, -6.0, -1.0], [4.0, 0.0, -1.0, -6.0, 4.0], [-2.0, 5.0, -7.0, -1.0, -6.0], 
+[1.0, 3.0, -6.0, 2.0, 6.0]], [[1.0, -2.0, 1.0, -1.0, 2.0], [6.0, -4.0, 1.0, 0.0, 4.0], [-3.0, 3.0, 0.0, 2.0, 4.0], [2.0, 0.0, 
+3.0, -2.0, 2.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[14.0, 68.0, -55.0, -33.0, 76.0], [103.0, 93.0, 22.0, -11.0, -7.0], [-40.0, 10.0, 51.0, -38.0, 
+-20.0], [19.0, -20.0, -38.0, -18.0, -16.0]], [[19.0, 51.0, -46.0, -20.0, 40.0], [74.0, 60.0, 33.0, -5.0, -16.0], [-41.0, 25.0, 
+47.0, -49.0, -10.0], [33.0, -5.0, -39.0, -13.0, 5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[26.0, -16.0, 11.0, 7.0, -59.0], [-66.0, -8.0, -16.0, -36.0, -16.0], [-3.0, -6.0, 9.0, 
+-11.0, -46.0], [-23.0, 9.0, -27.0, 50.0, 10.0]], [[38.0, -19.0, 13.0, 18.0, -56.0], [-56.0, -30.0, -11.0, -27.0, -8.0], [-14.0, 
+-4.0, 28.0, 0.0, -18.0], [-19.0, 3.0, -1.0, 43.0, 7.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[7.0, 3.0], [2.0, -1.0], [-2.0, 5.0]], [[-1.0, 2.0], [-6.0, 6.0], [2.0, 
+5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[4.0, -5.0, -5.0, -1.0, 3.0], [3.0, -3.0, 0.0, 0.0, -5.0], [6.0, -4.0, -3.0, 3.0, -6.0], [-7.0, 
+-1.0, -5.0, -6.0, -2.0]], [[0.0, -3.0, 0.0, -6.0, 3.0], [-2.0, 7.0, -3.0, 3.0, -5.0], [6.0, 1.0, -6.0, 2.0, -4.0], [3.0, 3.0, 
+-3.0, -7.0, 1.0]], [[2.0, 1.0, 3.0, -5.0, 1.0], [-6.0, 7.0, 4.0, -2.0, 1.0], [0.0, -7.0, 3.0, -7.0, 2.0], [7.0, -1.0, -2.0, 
+1.0, 1.0]]], [[[3.0, 2.0, -7.0, 7.0, 3.0], [-3.0, -4.0, 0.0, 1.0, 6.0], [3.0, -2.0, 7.0, -6.0, 0.0], [-4.0, 1.0, 0.0, -6.0, 
+7.0]], [[-3.0, 0.0, 7.0, 7.0, -3.0], [7.0, -1.0, -1.0, 0.0, 0.0], [-1.0, -3.0, 4.0, 7.0, -5.0], [2.0, -6.0, -6.0, -2.0, 3.0]], 
+[[0.0, 5.0, 5.0, 3.0, 0.0], [0.0, 4.0, 5.0, 2.0, -7.0], [6.0, -2.0, -2.0, 5.0, -3.0], [6.0, 0.0, 2.0, -6.0, 
+-3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, 5.0, 0.0, 3.0, -5.0], [-7.0, 5.0, 2.0, -5.0, 7.0], [-4.0, -3.0, -7.0, 4.0, 
+7.0], [-4.0, 0.0, -1.0, 0.0, 0.0]], [[-7.0, 4.0, 7.0, -5.0, 5.0], [-3.0, 6.0, 5.0, -6.0, 7.0], [-2.0, 7.0, 0.0, 6.0, 1.0], 
+[1.0, 3.0, 7.0, -7.0, 7.0]], [[0.0, -7.0, -2.0, -3.0, -6.0], [5.0, -4.0, 6.0, 3.0, -7.0], [-2.0, 3.0, 4.0, 0.0, -2.0], [1.0, 
+-5.0, 6.0, -6.0, -3.0]]], [[[1.0, 7.0, -6.0, 1.0, 1.0], [0.0, -7.0, -6.0, -5.0, 0.0], [2.0, 0.0, -4.0, -6.0, 2.0], [-4.0, -1.0, 
+-4.0, 1.0, -2.0]], [[-2.0, -4.0, -6.0, 0.0, -1.0], [0.0, 4.0, -7.0, -6.0, 5.0], [7.0, 2.0, 6.0, -7.0, 4.0], [0.0, 5.0, 2.0, 
+6.0, 0.0]], [[-5.0, 5.0, 3.0, 5.0, 7.0], [0.0, -6.0, -6.0, 5.0, -5.0], [1.0, -2.0, 7.0, -4.0, -6.0], [0.0, 6.0, 5.0, 6.0, 
+-7.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[39.0, -35.0, -66.0, -52.0, 40.0], [-10.0, -3.0, 2.0, 13.0, -67.0], [69.0, 4.0, -74.0, 13.0, 
+-30.0], [-53.0, 36.0, 3.0, -52.0, -45.0]], [[10.0, 22.0, 53.0, 49.0, -1.0], [17.0, 25.0, 42.0, -1.0, -28.0], [42.0, -80.0, 
+40.0, 27.0, -49.0], [45.0, -45.0, -48.0, -60.0, 15.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[15.0, 84.0, 66.0, 26.0, 6.0], [-65.0, 26.0, 48.0, -2.0, 37.0], [-70.0, -29.0, -75.0, 
+80.0, 17.0], [-24.0, -1.0, -3.0, -27.0, 8.0]], [[-16.0, -9.0, -50.0, 26.0, -19.0], [7.0, -31.0, -53.0, -15.0, -16.0], [31.0, 
+1.0, 62.0, -68.0, 8.0], [-16.0, 30.0, 49.0, 45.0, -61.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_constData_rank4(self):
-      arg0=numpy.array([[[[0.0, 4.0, -1.0], [6.0, 6.0, 6.0]], [[3.0, 2.0, -3.0], [4.0, 1.0, 6.0]], [[-1.0, -3.0, 5.0], [7.0, 
--5.0, 1.0]], [[4.0, 4.0, -7.0], [-3.0, 7.0, 4.0]], [[3.0, 6.0, -3.0], [0.0, -3.0, 1.0]]], [[[-3.0, -7.0, -5.0], [2.0, -7.0, 
-1.0]], [[-4.0, 0.0, 5.0], [-2.0, 0.0, 6.0]], [[-3.0, -4.0, 1.0], [4.0, 5.0, -6.0]], [[3.0, 4.0, 0.0], [-5.0, 0.0, -4.0]], 
-[[4.0, 1.0, -4.0], [0.0, 1.0, 5.0]]], [[[7.0, -4.0, 3.0], [7.0, 5.0, -3.0]], [[-3.0, 1.0, 7.0], [0.0, 3.0, 7.0]], [[6.0, 7.0, 
-7.0], [5.0, -3.0, 7.0]], [[-2.0, -6.0, 1.0], [-6.0, 3.0, -1.0]], [[-7.0, 2.0, 6.0], [6.0, -6.0, 4.0]]], [[[0.0, 3.0, -7.0], 
-[-3.0, 7.0, 7.0]], [[-5.0, -5.0, -1.0], [-4.0, -6.0, 0.0]], [[6.0, 1.0, 7.0], [-4.0, 5.0, 6.0]], [[3.0, -4.0, -2.0], [1.0, 7.0, 
-7.0]], [[0.0, 4.0, -7.0], [-2.0, 0.0, -7.0]]]])
-      arg1=Data(numpy.array([[[[4.0, 0.0, -6.0], [-4.0, -6.0, 1.0]], [[3.0, -2.0, 1.0], [-3.0, 4.0, 3.0]], [[0.0, -1.0, -7.0], 
-[-7.0, -6.0, 0.0]], [[-3.0, -2.0, 5.0], [5.0, 7.0, -6.0]], [[-4.0, -5.0, 0.0], [-4.0, -1.0, -4.0]]], [[[-4.0, 3.0, -2.0], 
-[-7.0, 0.0, 0.0]], [[-7.0, 1.0, 4.0], [6.0, 7.0, 0.0]], [[-5.0, 6.0, 6.0], [-2.0, -4.0, 5.0]], [[-5.0, 3.0, 0.0], [-3.0, 1.0, 
-6.0]], [[-4.0, 0.0, 0.0], [-5.0, -3.0, 2.0]]], [[[-4.0, 1.0, 0.0], [4.0, 2.0, 4.0]], [[7.0, 0.0, -6.0], [4.0, -1.0, 3.0]], 
-[[2.0, 3.0, -4.0], [-2.0, -2.0, 2.0]], [[0.0, 4.0, -3.0], [4.0, -2.0, 3.0]], [[6.0, 1.0, 2.0], [2.0, -3.0, -3.0]]], [[[2.0, 
--6.0, -5.0], [6.0, -4.0, -3.0]], [[1.0, 4.0, 0.0], [-3.0, 4.0, 7.0]], [[0.0, 7.0, 0.0], [-2.0, 2.0, -1.0]], [[-7.0, 0.0, -1.0], 
-[-1.0, 1.0, 3.0]], [[4.0, -1.0, 6.0], [4.0, 2.0, 1.0]]]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-48.0, 15.0, -75.0, 23.0, -74.0], [-28.0, 78.0, 12.0, 36.0, -36.0], [64.0, 42.0, 4.0, 49.0, 
--22.0], [-25.0, 64.0, 22.0, 19.0, 32.0]], [[14.0, 12.0, -15.0, -37.0, -63.0], [-28.0, 0.0, -3.0, 16.0, -23.0], [32.0, 72.0, 
-26.0, 49.0, 1.0], [11.0, 45.0, 2.0, -3.0, 16.0]], [[-31.0, -30.0, -51.0, 28.0, -8.0], [-64.0, 31.0, 28.0, -24.0, -14.0], [23.0, 
--1.0, -33.0, 14.0, 27.0], [50.0, -47.0, -46.0, -7.0, 48.0]], [[32.0, 46.0, 24.0, -45.0, -47.0], [31.0, -21.0, -40.0, 32.0, 
--14.0], [6.0, 63.0, 48.0, 23.0, -25.0], [-39.0, 85.0, 44.0, 1.0, -24.0]], [[49.0, -15.0, 33.0, -63.0, -43.0], [12.0, -48.0, 
-20.0, 6.0, -1.0], [-8.0, 45.0, 44.0, 42.0, 24.0], [-6.0, 22.0, 35.0, -18.0, -17.0]]], [[[53.0, -31.0, 70.0, -47.0, 42.0], 
-[-13.0, -43.0, -28.0, -13.0, 25.0], [3.0, 27.0, 5.0, 12.0, -13.0], [98.0, -58.0, -68.0, 20.0, -40.0]], [[-32.0, 17.0, -21.0, 
--9.0, 0.0], [20.0, 36.0, 84.0, 62.0, 38.0], [32.0, -48.0, -12.0, -5.0, -36.0], [-63.0, 44.0, -2.0, 43.0, 12.0]], [[-70.0, 
--10.0, -61.0, 113.0, 35.0], [-30.0, 80.0, -61.0, -40.0, -35.0], [10.0, -34.0, -52.0, -31.0, -9.0], [35.0, -53.0, -20.0, 3.0, 
-18.0]], [[28.0, 4.0, 31.0, -18.0, 4.0], [35.0, -47.0, -1.0, -12.0, 5.0], [-44.0, -11.0, 20.0, -16.0, 24.0], [-36.0, 6.0, 42.0, 
--28.0, -16.0]], [[39.0, 25.0, 21.0, -57.0, -42.0], [-5.0, -36.0, -17.0, 14.0, -9.0], [7.0, 66.0, 35.0, 29.0, -1.0], [3.0, 47.0, 
-4.0, -8.0, -2.0]]], [[[-51.0, 22.0, -96.0, 90.0, -29.0], [-95.0, 36.0, -90.0, -81.0, -84.0], [-6.0, 45.0, -40.0, -16.0, 52.0], 
-[54.0, -31.0, -29.0, -63.0, 85.0]], [[-65.0, 29.0, -68.0, 21.0, -24.0], [1.0, 71.0, 86.0, 63.0, 17.0], [47.0, -45.0, -23.0, 
--2.0, -33.0], [-80.0, 62.0, 6.0, 38.0, 42.0]], [[-13.0, 5.0, -73.0, -35.0, -104.0], [-52.0, 2.0, 91.0, 15.0, -26.0], [25.0, 
-44.0, 15.0, 54.0, 55.0], [-44.0, 56.0, 26.0, -36.0, 80.0]], [[-9.0, 34.0, 23.0, 20.0, 63.0], [30.0, -3.0, -25.0, 7.0, 27.0], 
-[-20.0, -50.0, -22.0, -60.0, -34.0], [-18.0, -3.0, -23.0, 19.0, -15.0]], [[-48.0, -49.0, -50.0, 11.0, -16.0], [-20.0, 69.0, 
-115.0, 41.0, 24.0], [58.0, -43.0, -24.0, 38.0, -10.0], [-8.0, -13.0, -14.0, 43.0, 22.0]]], [[[19.0, 45.0, 25.0, -49.0, -38.0], 
-[44.0, 6.0, -11.0, 67.0, 8.0], [33.0, 44.0, 43.0, 28.0, -59.0], [-50.0, 98.0, 34.0, 38.0, -36.0]], [[38.0, -18.0, 76.0, -42.0, 
-67.0], [35.0, -40.0, 21.0, 16.0, 58.0], [-13.0, -39.0, -1.0, -21.0, -27.0], [25.0, -37.0, -39.0, 34.0, -49.0]], [[-26.0, 73.0, 
--52.0, -6.0, -42.0], [-7.0, -2.0, 36.0, 26.0, -7.0], [-5.0, -3.0, -3.0, -25.0, 10.0], [-91.0, 84.0, 19.0, -22.0, 65.0]], 
-[[-15.0, 61.0, -31.0, 1.0, -31.0], [-27.0, 22.0, -46.0, 19.0, -24.0], [30.0, 51.0, 0.0, 1.0, -30.0], [-3.0, 61.0, -23.0, 8.0, 
-29.0]], [[43.0, -30.0, 59.0, -11.0, 16.0], [40.0, -36.0, -49.0, -24.0, -4.0], [-32.0, 13.0, 30.0, 8.0, 7.0], [20.0, -27.0, 
-39.0, -12.0, -61.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([4.0, -3.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-1.0, 1.0], [-6.0, -5.0]], [[-5.0, 7.0], [-2.0, 5.0]], [[0.0, 6.0], [6.0, -7.0]], [[2.0, -4.0], 
+[1.0, 4.0]], [[3.0, -5.0], [0.0, 6.0]], [[-3.0, 1.0], [-4.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, -3.0], [5.0, -5.0]], [[-4.0, -2.0], [-2.0, 0.0]], [[-1.0, 0.0], [5.0, 3.0]], 
+[[3.0, 0.0], [0.0, 7.0]], [[5.0, -3.0], [-1.0, 2.0]], [[-7.0, 4.0], [2.0, -6.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-4.0, 4.0], [-24.0, -20.0]], [[-20.0, 28.0], [-8.0, 20.0]], [[0.0, 24.0], [24.0, -28.0]], [[8.0, 
+-16.0], [4.0, 16.0]], [[12.0, -20.0], [0.0, 24.0]], [[-12.0, 4.0], [-16.0, -12.0]]], [[[3.0, -3.0], [18.0, 15.0]], [[15.0, 
+-21.0], [6.0, -15.0]], [[0.0, -18.0], [-18.0, 21.0]], [[-6.0, 12.0], [-3.0, -12.0]], [[-9.0, 15.0], [0.0, -18.0]], [[9.0, 
+-3.0], [12.0, 9.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[4.0, -12.0], [20.0, -20.0]], [[-16.0, -8.0], [-8.0, 0.0]], [[-4.0, 0.0], [20.0, 
+12.0]], [[12.0, 0.0], [0.0, 28.0]], [[20.0, -12.0], [-4.0, 8.0]], [[-28.0, 16.0], [8.0, -24.0]]], [[[-3.0, 9.0], [-15.0, 
+15.0]], [[12.0, 6.0], [6.0, 0.0]], [[3.0, 0.0], [-15.0, -9.0]], [[-9.0, 0.0], [0.0, -21.0]], [[-15.0, 9.0], [3.0, -6.0]], 
+[[21.0, -12.0], [-6.0, 18.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=tensor_transposed_mult(arg0,arg1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[7.0, 5.0], [-4.0, 6.0], [2.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-7.0, 1.0], [-6.0, 3.0]], [[4.0, 4.0], [-2.0, -3.0]], [[-2.0, 7.0], [-3.0, 5.0]], [[6.0, 0.0], 
+[-6.0, 0.0]], [[-6.0, 0.0], [4.0, 0.0]], [[5.0, 0.0], [7.0, 3.0]]], [[[-1.0, 0.0], [-7.0, 2.0]], [[4.0, 6.0], [-2.0, -5.0]], 
+[[-2.0, -2.0], [-1.0, -7.0]], [[1.0, 3.0], [5.0, 3.0]], [[-4.0, 2.0], [-5.0, 6.0]], [[6.0, 3.0], [-7.0, 2.0]]], [[[-2.0, -5.0], 
+[3.0, -6.0]], [[3.0, -5.0], [6.0, 7.0]], [[0.0, 1.0], [0.0, -1.0]], [[-2.0, 1.0], [6.0, 6.0]], [[1.0, -7.0], [6.0, 3.0]], 
+[[-4.0, 3.0], [7.0, -4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 5.0], [-3.0, -5.0]], [[-1.0, 2.0], [6.0, -2.0]], [[7.0, -2.0], [-2.0, -3.0]], 
+[[-4.0, 5.0], [-7.0, 5.0]], [[-5.0, 3.0], [-3.0, -6.0]], [[4.0, -3.0], [2.0, -4.0]]], [[[5.0, -6.0], [0.0, 4.0]], [[-5.0, 
+-6.0], [4.0, 0.0]], [[-1.0, -1.0], [-1.0, -3.0]], [[7.0, -2.0], [0.0, 3.0]], [[0.0, -4.0], [0.0, -2.0]], [[-5.0, 0.0], [-3.0, 
+0.0]]], [[[-4.0, -7.0], [-3.0, 5.0]], [[5.0, -4.0], [-2.0, -4.0]], [[0.0, 1.0], [-1.0, 0.0]], [[0.0, -3.0], [1.0, -2.0]], 
+[[4.0, -1.0], [3.0, 4.0]], [[-7.0, 2.0], [-5.0, 3.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-49.0, -3.0], [-8.0, 1.0]], [[18.0, -6.0], [6.0, 13.0]], [[-6.0, 59.0], [-17.0, 61.0]], [[34.0, 
+-10.0], [-50.0, 0.0]], [[-24.0, -22.0], [60.0, -18.0]], [[3.0, -6.0], [91.0, 5.0]]], [[[-41.0, 5.0], [-72.0, 27.0]], [[44.0, 
+56.0], [-22.0, -45.0]], [[-22.0, 23.0], [-21.0, -17.0]], [[36.0, 18.0], [0.0, 18.0]], [[-54.0, 12.0], [-10.0, 36.0]], [[61.0, 
+18.0], [-7.0, 27.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-21.0, 45.0], [-27.0, -41.0]], [[23.0, 30.0], [22.0, -22.0]], [[53.0, -8.0], [-12.0, 
+-9.0]], [[-56.0, 37.0], [-47.0, 19.0]], [[-27.0, 35.0], [-15.0, -26.0]], [[34.0, -17.0], [16.0, -22.0]]], [[[35.0, -11.0], 
+[-15.0, -1.0]], [[-35.0, -26.0], [54.0, -10.0]], [[29.0, -16.0], [-16.0, -33.0]], [[22.0, 13.0], [-35.0, 43.0]], [[-25.0, 
+-9.0], [-15.0, -42.0]], [[-10.0, -15.0], [-8.0, -20.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_expandedData_rank2(self):
-      arg0=numpy.array([[[[-7.0, -7.0, 0.0], [1.0, 7.0, -7.0]], [[-1.0, -5.0, 6.0], [-3.0, -1.0, 6.0]], [[4.0, 3.0, -3.0], 
-[-4.0, 3.0, -2.0]], [[3.0, 4.0, -5.0], [5.0, -3.0, 0.0]], [[7.0, -3.0, -3.0], [3.0, -4.0, -7.0]]], [[[-6.0, 2.0, 4.0], [-6.0, 
-4.0, 0.0]], [[5.0, 2.0, 0.0], [1.0, 4.0, 7.0]], [[-5.0, -6.0, 2.0], [4.0, -7.0, 3.0]], [[0.0, -6.0, 7.0], [2.0, 7.0, -4.0]], 
-[[-3.0, 3.0, 0.0], [-5.0, -1.0, -2.0]]], [[[4.0, 2.0, -7.0], [1.0, -5.0, 0.0]], [[4.0, 5.0, 7.0], [7.0, -5.0, -3.0]], [[5.0, 
-6.0, 6.0], [-6.0, 0.0, -7.0]], [[4.0, -3.0, -3.0], [2.0, 5.0, 1.0]], [[-2.0, 6.0, -2.0], [-6.0, -5.0, -3.0]]], [[[2.0, 2.0, 
-0.0], [0.0, 2.0, -1.0]], [[1.0, 2.0, -4.0], [-3.0, -7.0, -4.0]], [[-2.0, 2.0, 4.0], [-3.0, -1.0, 4.0]], [[4.0, -5.0, -2.0], 
-[-4.0, -4.0, -6.0]], [[0.0, 0.0, -7.0], [-7.0, 6.0, -3.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-3.0, -6.0, -6.0], [-5.0, 0.0, -5.0]])+(1.-msk_arg1)*numpy.array([[4.0, 5.0, -1.0], [3.0, 
-0.0, 2.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[93.0, -18.0, 18.0, -28.0, 35.0], [12.0, -67.0, 4.0, 4.0, 26.0], [13.0, -104.0, -22.0, 9.0, 
-27.0], [-13.0, 44.0, -35.0, 80.0, 92.0]])+(1.-msk_ref)*numpy.array([[-74.0, -32.0, 18.0, 52.0, 11.0], [-36.0, 47.0, -34.0, 
--39.0, -16.0], [36.0, 49.0, 12.0, 12.0, 0.0], [16.0, 1.0, -3.0, -31.0, -20.0]])
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-2.0, -5.0, 0.0, -4.0, 7.0], [6.0, 0.0, 5.0, 0.0, 7.0], [-1.0, 3.0, 6.0, 1.0, 1.0], [-4.0, 4.0, 
+6.0, 3.0, 3.0]]),self.functionspace)
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,-7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, -0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 
+0.0, 0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[14.0, 35.0, -0.0, 28.0, -49.0], [-42.0, -0.0, -35.0, -0.0, -49.0], [7.0, -21.0, -42.0, 
+-7.0, -7.0], [28.0, -28.0, -42.0, -21.0, -21.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_expandedData_rank3(self):
-      arg0=numpy.array([[[[7.0, 3.0, -1.0], [6.0, -6.0, -4.0]], [[6.0, -7.0, 5.0], [0.0, 0.0, -7.0]], [[1.0, -5.0, 2.0], [-7.0, 
-4.0, 1.0]], [[-5.0, 2.0, 6.0], [-1.0, -7.0, 5.0]], [[-5.0, -5.0, -6.0], [2.0, -2.0, -6.0]]], [[[5.0, 5.0, -2.0], [-6.0, 1.0, 
--2.0]], [[2.0, -1.0, 0.0], [-4.0, 0.0, 6.0]], [[-7.0, -5.0, -3.0], [-5.0, -5.0, 2.0]], [[5.0, -2.0, 2.0], [0.0, 4.0, -4.0]], 
-[[7.0, -7.0, 4.0], [-4.0, -2.0, 2.0]]], [[[4.0, -2.0, 4.0], [2.0, 0.0, -1.0]], [[3.0, 6.0, -4.0], [-4.0, 7.0, 3.0]], [[-2.0, 
-2.0, -3.0], [0.0, 2.0, -1.0]], [[0.0, 3.0, -1.0], [-6.0, -3.0, 4.0]], [[2.0, -6.0, -3.0], [-1.0, 1.0, 3.0]]], [[[-1.0, -1.0, 
--1.0], [6.0, 7.0, 4.0]], [[-2.0, 4.0, 0.0], [7.0, 1.0, 0.0]], [[-2.0, 0.0, -1.0], [-6.0, -6.0, -2.0]], [[0.0, 0.0, -3.0], [6.0, 
--5.0, -1.0]], [[-1.0, -2.0, 4.0], [6.0, 0.0, -2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-7.0, -4.0, -7.0], [-1.0, 4.0, -5.0]], [[-6.0, 5.0, 2.0], [-1.0, 0.0, 
--3.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 0.0, 6.0], [1.0, -6.0, 0.0]], [[-6.0, -2.0, 3.0], [-1.0, 3.0, -5.0]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-64.0, -23.0], [-14.0, -40.0], [17.0, -23.0], [-67.0, 38.0], [117.0, 9.0]], [[-21.0, 3.0], 
-[-36.0, -31.0], [65.0, 10.0], [-5.0, -24.0], [-63.0, -71.0]], [[-45.0, -25.0], [0.0, -1.0], [40.0, 19.0], [-31.0, 7.0], [21.0, 
--56.0]], [[20.0, -19.0], [-5.0, 25.0], [13.0, 22.0], [0.0, -9.0], [-9.0, 4.0]]])+(1.-msk_ref)*numpy.array([[[57.0, -55.0], 
-[48.0, 28.0], [-16.0, 24.0], [62.0, -1.0], [-37.0, 44.0]], [[-9.0, -27.0], [2.0, -36.0], [-14.0, 23.0], [3.0, 12.0], [53.0, 
--28.0]], [[38.0, -5.0], [-61.0, -32.0], [-36.0, 10.0], [6.0, -32.0], [-19.0, -20.0]], [[-45.0, 0.0], [-5.0, 0.0], [18.0, 7.0], 
-[18.0, -25.0], [27.0, 26.0]]])
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[5.0, -3.0, 6.0, -4.0, -6.0], [2.0, 0.0, 1.0, 6.0, 0.0], [6.0, 0.0, 5.0, 1.0, -4.0], [4.0, 0.0, 
+3.0, 1.0, 0.0]], [[-2.0, 0.0, 6.0, -6.0, 6.0], [0.0, 4.0, 2.0, 5.0, 7.0], [-3.0, 3.0, 0.0, -6.0, 0.0], [3.0, -6.0, 0.0, 4.0, 
+6.0]], [[-6.0, -1.0, 2.0, 3.0, -2.0], [-3.0, 3.0, -5.0, -5.0, -5.0], [0.0, 4.0, 2.0, 3.0, 3.0], [1.0, 3.0, 5.0, 0.0, 
+7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-2.0, 7.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, -2.0, 4.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[12.0, 12.0, 18.0, -52.0, 66.0], [14.0, 10.0, 42.0, 53.0, 79.0], [-33.0, -3.0, -22.0, -62.0, 
+-10.0], [7.0, -60.0, -36.0, 26.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, 5.0, -22.0, 36.0, -2.0], [-18.0, 4.0, -27.0, -48.0, -34.0], [-12.0, 10.0, -7.0, 
+21.0, 24.0], [-14.0, 24.0, 11.0, -11.0, 16.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_array_rank4_expandedData_rank4(self):
-      arg0=numpy.array([[[[6.0, -1.0, 6.0], [-5.0, -6.0, 0.0]], [[6.0, -2.0, 0.0], [3.0, -6.0, -7.0]], [[3.0, -4.0, -4.0], 
-[-6.0, -5.0, 6.0]], [[-4.0, -1.0, 3.0], [-4.0, 0.0, -7.0]], [[-6.0, 1.0, -6.0], [4.0, -1.0, -2.0]]], [[[1.0, 2.0, -7.0], [6.0, 
--4.0, -1.0]], [[-6.0, 0.0, 4.0], [0.0, -4.0, 3.0]], [[0.0, 3.0, 6.0], [5.0, -1.0, -3.0]], [[-7.0, -5.0, 2.0], [-4.0, 6.0, 
--4.0]], [[-3.0, 3.0, -7.0], [0.0, 6.0, 6.0]]], [[[0.0, -1.0, -6.0], [7.0, 2.0, -4.0]], [[6.0, 0.0, 3.0], [-6.0, 2.0, -3.0]], 
-[[-1.0, 7.0, 0.0], [-2.0, -6.0, 0.0]], [[1.0, 1.0, 3.0], [-1.0, 2.0, 7.0]], [[1.0, 0.0, 0.0], [-5.0, 0.0, 7.0]]], [[[4.0, 3.0, 
--7.0], [5.0, -6.0, -7.0]], [[-3.0, -2.0, 4.0], [0.0, 7.0, 7.0]], [[7.0, 1.0, 1.0], [7.0, 3.0, 2.0]], [[-3.0, -1.0, -6.0], 
-[-4.0, -5.0, 4.0]], [[-1.0, -5.0, 1.0], [-2.0, -6.0, 1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[3.0, -3.0, 6.0], [3.0, 3.0, -6.0]], [[-7.0, 2.0, 0.0], [0.0, -2.0, 7.0]], [[5.0, 0.0, 4.0], 
-[-7.0, 5.0, -6.0]], [[4.0, 4.0, -1.0], [0.0, -3.0, 7.0]], [[-2.0, 3.0, 7.0], [5.0, 0.0, 2.0]]], [[[5.0, 0.0, 7.0], [4.0, 5.0, 
-5.0]], [[3.0, -4.0, 3.0], [-4.0, 6.0, 0.0]], [[0.0, 6.0, -6.0], [-6.0, -7.0, 0.0]], [[2.0, -1.0, -5.0], [-3.0, 0.0, 2.0]], 
-[[7.0, -5.0, -5.0], [1.0, 0.0, -6.0]]], [[[-1.0, 6.0, -2.0], [-6.0, 0.0, 1.0]], [[-4.0, -7.0, -5.0], [4.0, 4.0, -5.0]], [[5.0, 
-0.0, -3.0], [1.0, -4.0, 0.0]], [[-1.0, -1.0, -4.0], [4.0, 1.0, -3.0]], [[-1.0, -3.0, 7.0], [7.0, -3.0, 3.0]]], [[[7.0, -2.0, 
-1.0], [-7.0, -7.0, 0.0]], [[0.0, -1.0, -7.0], [6.0, -5.0, -4.0]], [[-2.0, 4.0, -6.0], [4.0, -4.0, 0.0]], [[3.0, -6.0, -4.0], 
-[-4.0, 7.0, 3.0]], [[-7.0, 6.0, 5.0], [-5.0, -3.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 6.0, -5.0], [6.0, 6.0, 6.0]], 
-[[3.0, 3.0, 1.0], [3.0, -5.0, -3.0]], [[2.0, 6.0, -2.0], [-6.0, -4.0, -2.0]], [[0.0, -5.0, 6.0], [0.0, 5.0, 0.0]], [[5.0, -5.0, 
--6.0], [-5.0, 0.0, -4.0]]], [[[0.0, 4.0, -1.0], [2.0, -6.0, 6.0]], [[-6.0, 7.0, 4.0], [0.0, 1.0, 1.0]], [[7.0, -3.0, 6.0], 
-[3.0, -1.0, -5.0]], [[4.0, -3.0, -1.0], [5.0, 4.0, 2.0]], [[2.0, -3.0, -3.0], [-2.0, 0.0, -5.0]]], [[[-2.0, 2.0, -5.0], [-7.0, 
-0.0, -7.0]], [[-3.0, 3.0, -7.0], [-1.0, 7.0, -7.0]], [[-7.0, 5.0, 0.0], [6.0, 4.0, 0.0]], [[-2.0, -4.0, 7.0], [-5.0, -1.0, 
--1.0]], [[-1.0, -2.0, -6.0], [4.0, 7.0, 2.0]]], [[[2.0, -7.0, 6.0], [7.0, -2.0, 4.0]], [[7.0, 3.0, -1.0], [4.0, -6.0, -1.0]], 
-[[4.0, -7.0, -2.0], [1.0, -5.0, 1.0]], [[0.0, 7.0, 5.0], [3.0, 0.0, 5.0]], [[4.0, 3.0, 6.0], [-3.0, -5.0, -6.0]]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, -32.0, 59.0, 32.0, 2.0], [22.0, 24.0, 30.0, -2.0, 12.0], [6.0, -91.0, 31.0, -55.0, 
-22.0], [127.0, -41.0, -48.0, -22.0, 25.0]], [[57.0, -83.0, 21.0, -15.0, -17.0], [-23.0, -22.0, 12.0, -9.0, 97.0], [-43.0, 13.0, 
-57.0, 23.0, 18.0], [67.0, 78.0, 16.0, -45.0, -72.0]], [[-72.0, 23.0, -20.0, 57.0, -64.0], [-32.0, 7.0, 71.0, 60.0, 19.0], 
-[23.0, -38.0, 41.0, -30.0, -28.0], [102.0, -3.0, -2.0, 56.0, -2.0]], [[39.0, -23.0, 62.0, -72.0, -8.0], [-50.0, 17.0, 0.0, 
--24.0, 0.0], [9.0, 27.0, -33.0, -2.0, -21.0], [5.0, -16.0, -30.0, -23.0, 36.0]], [[-36.0, 32.0, -75.0, -25.0, -11.0], [-71.0, 
--62.0, 25.0, 1.0, -1.0], [-2.0, 69.0, -4.0, 50.0, -14.0], [-71.0, 78.0, 72.0, -29.0, -5.0]]], [[[-33.0, -2.0, -79.0, 24.0, 
--17.0], [-45.0, -74.0, 46.0, 15.0, 44.0], [-12.0, 30.0, 48.0, 48.0, -5.0], [-18.0, 107.0, 88.0, -36.0, -51.0]], [[-24.0, 71.0, 
--52.0, 5.0, 46.0], [-7.0, -30.0, 4.0, -26.0, -80.0], [1.0, -27.0, -26.0, -23.0, 55.0], [-10.0, -20.0, 4.0, -53.0, 83.0]], 
-[[57.0, -13.0, 2.0, -12.0, 70.0], [42.0, -20.0, -41.0, -54.0, -22.0], [-27.0, -20.0, -9.0, 1.0, 62.0], [-28.0, 2.0, 0.0, -78.0, 
-17.0]], [[36.0, -1.0, 55.0, -96.0, -15.0], [-27.0, 57.0, -60.0, -15.0, -14.0], [-7.0, 81.0, -69.0, 6.0, -22.0], [-51.0, -47.0, 
--58.0, 47.0, 19.0]], [[-78.0, 57.0, -49.0, 31.0, -22.0], [-4.0, -6.0, 18.0, 38.0, -37.0], [41.0, 20.0, -18.0, 16.0, -55.0], 
-[-76.0, -8.0, 36.0, 61.0, 4.0]]], [[[18.0, -34.0, -39.0, -32.0, -18.0], [-24.0, -30.0, -26.0, 2.0, 66.0], [-40.0, 93.0, 17.0, 
-67.0, -8.0], [-67.0, 91.0, 52.0, 4.0, -89.0]], [[42.0, -67.0, 112.0, -6.0, -27.0], [22.0, 63.0, 4.0, 9.0, 39.0], [21.0, -40.0, 
-7.0, -31.0, -42.0], [73.0, -55.0, -62.0, 35.0, -12.0]], [[-48.0, 33.0, -21.0, 42.0, 13.0], [-43.0, -59.0, 96.0, -3.0, -44.0], 
-[55.0, -77.0, 17.0, -20.0, -16.0], [35.0, 11.0, 46.0, -79.0, 77.0]], [[-21.0, 40.0, -8.0, 48.0, 31.0], [67.0, 24.0, -20.0, 3.0, 
--56.0], [12.0, -57.0, -13.0, -37.0, 25.0], [1.0, -66.0, -28.0, 24.0, 34.0]], [[-54.0, 42.0, -2.0, 53.0, -13.0], [20.0, 23.0, 
-30.0, 31.0, -40.0], [36.0, -59.0, 0.0, -42.0, -15.0], [42.0, -58.0, -22.0, 44.0, 39.0]]], [[[0.0, -59.0, -31.0, 4.0, -37.0], 
-[-74.0, -77.0, 72.0, 11.0, 95.0], [-9.0, 29.0, 70.0, 56.0, -30.0], [22.0, 134.0, 90.0, -61.0, -73.0]], [[0.0, 52.0, -6.0, 4.0, 
-42.0], [83.0, 53.0, -85.0, -10.0, -73.0], [-10.0, -1.0, -55.0, -25.0, 37.0], [-62.0, -89.0, -54.0, 57.0, 29.0]], [[42.0, -39.0, 
--7.0, 36.0, 35.0], [95.0, 10.0, -63.0, -9.0, 34.0], [-43.0, -10.0, 27.0, 13.0, 43.0], [-22.0, 11.0, 0.0, 10.0, -76.0]], 
-[[-93.0, 57.0, -60.0, 33.0, -51.0], [-78.0, -37.0, 89.0, 45.0, -14.0], [37.0, -7.0, 19.0, -5.0, -37.0], [38.0, 28.0, 42.0, 
-14.0, 32.0]], [[-12.0, 16.0, -23.0, 0.0, -14.0], [-31.0, -8.0, 18.0, 6.0, 5.0], [-18.0, -3.0, 14.0, -15.0, 30.0], [60.0, 12.0, 
--8.0, -8.0, 13.0]]]])+(1.-msk_ref)*numpy.array([[[[-132.0, 36.0, 48.0, 11.0, 24.0], [16.0, -25.0, 72.0, -28.0, 7.0], [-9.0, 
--100.0, -101.0, 65.0, -102.0], [32.0, 49.0, 44.0, 8.0, 102.0]], [[-102.0, 72.0, 20.0, -20.0, 53.0], [-8.0, -63.0, 98.0, 7.0, 
-47.0], [12.0, -20.0, -58.0, -6.0, -46.0], [31.0, 91.0, 64.0, -40.0, 81.0]], [[-49.0, -18.0, 34.0, -29.0, 65.0], [42.0, -61.0, 
--34.0, -10.0, 12.0], [6.0, -64.0, -97.0, 11.0, -18.0], [2.0, 13.0, 73.0, -36.0, -17.0]], [[-67.0, -3.0, 18.0, 23.0, 15.0], 
-[-57.0, 22.0, 16.0, -50.0, 29.0], [68.0, 41.0, -1.0, 60.0, -42.0], [-39.0, -43.0, -26.0, -39.0, 53.0]], [[72.0, 2.0, -10.0, 
--46.0, -11.0], [12.0, 16.0, -58.0, -9.0, 5.0], [30.0, 66.0, 67.0, -51.0, 45.0], [-33.0, -9.0, -12.0, -21.0, -52.0]]], [[[48.0, 
-43.0, 10.0, -72.0, 11.0], [45.0, -25.0, -14.0, 17.0, 10.0], [2.0, 25.0, 23.0, -84.0, 31.0], [-8.0, 69.0, 29.0, -8.0, -24.0]], 
-[[4.0, -3.0, -10.0, 4.0, -66.0], [38.0, 51.0, -29.0, -38.0, -39.0], [-29.0, -59.0, 26.0, 41.0, -40.0], [32.0, -25.0, -9.0, 
-35.0, 2.0]], [[-6.0, 44.0, -14.0, 16.0, -64.0], [4.0, 41.0, 58.0, 0.0, -22.0], [-38.0, -24.0, 41.0, 9.0, -35.0], [40.0, 32.0, 
--26.0, 51.0, 53.0]], [[-17.0, -64.0, -40.0, 67.0, 14.0], [-90.0, 17.0, -20.0, -19.0, 23.0], [50.0, 66.0, 24.0, 66.0, 23.0], 
-[-23.0, -114.0, -35.0, -57.0, -25.0]], [[140.0, -55.0, -10.0, -27.0, -12.0], [19.0, 23.0, -108.0, 22.0, -24.0], [5.0, 67.0, 
-60.0, -67.0, 93.0], [-57.0, -47.0, -43.0, 16.0, -111.0]]], [[[54.0, 14.0, -36.0, -21.0, 22.0], [-20.0, -33.0, 6.0, 44.0, 27.0], 
-[7.0, 74.0, 45.0, -71.0, 72.0], [0.0, 23.0, 12.0, -36.0, -46.0]], [[-87.0, 2.0, 40.0, 28.0, 54.0], [-45.0, -25.0, 55.0, -7.0, 
-30.0], [36.0, 2.0, -70.0, 40.0, -40.0], [-28.0, 6.0, -1.0, -18.0, 68.0]], [[-1.0, 42.0, 76.0, -65.0, -30.0], [60.0, 49.0, 
--28.0, -59.0, -19.0], [30.0, -16.0, 6.0, -10.0, -63.0], [-53.0, 42.0, -25.0, 43.0, 53.0]], [[34.0, -25.0, -14.0, 23.0, -41.0], 
-[29.0, 22.0, -18.0, 15.0, -43.0], [-57.0, -55.0, 0.0, 11.0, 3.0], [30.0, -16.0, -13.0, 54.0, -24.0]], [[7.0, -33.0, 18.0, 0.0, 
-2.0], [32.0, 1.0, -43.0, -7.0, -23.0], [-16.0, -47.0, -37.0, 16.0, -7.0], [-5.0, -20.0, 6.0, 20.0, -23.0]]], [[[-15.0, 80.0, 
-48.0, -87.0, 50.0], [23.0, -44.0, 33.0, 1.0, 45.0], [47.0, 48.0, -7.0, -81.0, -4.0], [-36.0, 107.0, 37.0, -34.0, 40.0]], 
-[[67.0, -67.0, -68.0, 69.0, -57.0], [-12.0, 34.0, -33.0, 32.0, -47.0], [-67.0, -25.0, 39.0, 28.0, 46.0], [46.0, -80.0, -34.0, 
-41.0, -71.0]], [[38.0, 25.0, -40.0, 16.0, -19.0], [11.0, -26.0, 60.0, 75.0, -16.0], [-80.0, -25.0, 10.0, -51.0, 38.0], [64.0, 
-59.0, 13.0, 43.0, -11.0]], [[9.0, -17.0, 36.0, -56.0, 30.0], [48.0, -14.0, -81.0, -35.0, 3.0], [34.0, -11.0, -28.0, -11.0, 
--2.0], [-37.0, -8.0, 32.0, -29.0, -38.0]], [[-72.0, 4.0, 0.0, 1.0, 20.0], [17.0, -30.0, 9.0, -22.0, 9.0], [-6.0, -66.0, -54.0, 
-44.0, -43.0], [41.0, 4.0, 58.0, -31.0, 17.0]]]])
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 1.0, 5.0, 4.0, 7.0], [5.0, -5.0, 5.0, -2.0, 5.0], [-7.0, -3.0, 6.0, -4.0, -5.0], [2.0, 
+1.0, 0.0, -7.0, -6.0]], [[4.0, 0.0, 7.0, -6.0, 0.0], [0.0, 0.0, 1.0, 0.0, 7.0], [-2.0, 1.0, -5.0, 4.0, 0.0], [0.0, -2.0, -6.0, 
+4.0, 3.0]], [[5.0, -4.0, 5.0, 5.0, 6.0], [5.0, -3.0, -3.0, 6.0, 4.0], [4.0, 0.0, 0.0, -5.0, -3.0], [-3.0, 5.0, 5.0, 2.0, 
+0.0]]], [[[-2.0, 7.0, -6.0, 4.0, 0.0], [6.0, 7.0, -4.0, -1.0, 0.0], [-2.0, 0.0, -2.0, 4.0, 2.0], [4.0, 5.0, 0.0, -4.0, 7.0]], 
+[[7.0, -6.0, -1.0, -7.0, -1.0], [-4.0, 6.0, 0.0, 3.0, 6.0], [7.0, -1.0, 5.0, -4.0, 1.0], [4.0, 5.0, -1.0, 0.0, 0.0]], [[-5.0, 
+-2.0, -1.0, -2.0, 6.0], [0.0, 1.0, -7.0, -6.0, -5.0], [-4.0, -5.0, 2.0, 6.0, 1.0], [-5.0, 3.0, 3.0, 3.0, 
+-1.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-7.0, -6.0, 0.0], [-1.0, 3.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -5.0, -7.0], [-3.0, 0.0, -6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-1.0, -18.0, -67.0, -3.0, -94.0], [-53.0, 39.0, 12.0, 66.0, -24.0], [112.0, 47.0, -9.0, -54.0, 
+29.0], [29.0, -6.0, 12.0, 8.0, 24.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-19.0, 19.0, -46.0, -5.0, -78.0], [-53.0, -6.0, 70.0, -3.0, -33.0], [12.0, 25.0, 19.0, 
+-33.0, 9.0], [39.0, -58.0, -23.0, -40.0, -30.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank2_array_rank1(self):
-      arg0=Data(numpy.array([[1.0, 5.0, 6.0], [6.0, 6.0, -3.0]]),self.functionspace)
-      arg1=numpy.array([4.0, 3.0, -4.0])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([-5.0, 54.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[0.0, -4.0, -1.0, 4.0, -1.0], [0.0, -4.0, 4.0, 7.0, 0.0], [-2.0, 0.0, -5.0, -7.0, 4.0], [-4.0, 
+5.0, 6.0, -4.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([-4.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, -5.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0], [16.0, 16.0], [4.0, 4.0], [-16.0, -16.0], [4.0, 4.0]], [[0.0, 0.0], [16.0, 16.0], 
+[-16.0, -16.0], [-28.0, -28.0], [0.0, 0.0]], [[8.0, 8.0], [0.0, 0.0], [20.0, 20.0], [28.0, 28.0], [-16.0, -16.0]], [[16.0, 
+16.0], [-20.0, -20.0], [-24.0, -24.0], [16.0, 16.0], [0.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0], [-12.0, 20.0], [-3.0, 5.0], [12.0, -20.0], [-3.0, 5.0]], [[0.0, 0.0], 
+[-12.0, 20.0], [12.0, -20.0], [21.0, -35.0], [0.0, 0.0]], [[-6.0, 10.0], [0.0, 0.0], [-15.0, 25.0], [-21.0, 35.0], [12.0, 
+-20.0]], [[-12.0, 20.0], [15.0, -25.0], [18.0, -30.0], [-12.0, 20.0], [0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank2_array_rank2(self):
-      arg0=Data(numpy.array([[5.0, 3.0, 4.0], [-7.0, 6.0, 7.0]]),self.functionspace)
-      arg1=numpy.array([[5.0, 0.0, 2.0], [-6.0, 7.0, 7.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[33.0, 19.0], [-21.0, 133.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-7.0, 6.0, 7.0, -4.0, 0.0], [6.0, 6.0, 2.0, -4.0, -4.0], [2.0, 4.0, -5.0, 0.0, -3.0], [-3.0, 
+-6.0, 0.0, 4.0, -1.0]], [[4.0, 3.0, 1.0, 6.0, 1.0], [5.0, -5.0, 4.0, 7.0, 7.0], [5.0, -2.0, -2.0, 2.0, 6.0], [-5.0, 4.0, -7.0, 
+-5.0, -5.0]], [[-1.0, -7.0, 1.0, -2.0, -3.0], [4.0, -4.0, -4.0, 7.0, 7.0], [2.0, -4.0, 2.0, 1.0, 0.0], [-5.0, -7.0, 7.0, -4.0, 
+-3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[6.0, -2.0], [1.0, 3.0], [-5.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 0.0], [3.0, 1.0], [-1.0, -2.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-33.0, 29.0], [74.0, 18.0], [38.0, -14.0], [-8.0, 32.0], [16.0, 12.0]], [[21.0, -9.0], [51.0, 
+-15.0], [36.0, 20.0], [-52.0, 8.0], [-52.0, 8.0]], [[7.0, 5.0], [42.0, -2.0], [-42.0, -2.0], [-3.0, 3.0], [-12.0, 24.0]], 
+[[2.0, 6.0], [3.0, 45.0], [-42.0, -42.0], [39.0, -11.0], [4.0, -4.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-1.0, 6.0], [28.0, 17.0], [16.0, -1.0], [12.0, 10.0], [6.0, 7.0]], [[23.0, -3.0], 
+[1.0, 3.0], [20.0, 12.0], [6.0, -7.0], [6.0, -7.0]], [[17.0, 1.0], [6.0, 6.0], [-18.0, -6.0], [5.0, 0.0], [12.0, 6.0]], 
+[[-16.0, 5.0], [7.0, 18.0], [-28.0, -21.0], [-3.0, 3.0], [-14.0, 1.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank2_constData_rank1(self):
-      arg0=Data(numpy.array([[-7.0, 4.0, -4.0], [-7.0, -6.0, 0.0]]),self.functionspace)
-      arg1=Data(numpy.array([-5.0, 5.0, 0.0]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([55.0, 5.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, 6.0, -5.0, -1.0, 6.0], [-2.0, 1.0, 4.0, 6.0, 5.0], [-2.0, 0.0, -5.0, 0.0, 0.0], [0.0, 
+-2.0, 6.0, -2.0, -4.0]], [[6.0, -2.0, 1.0, 2.0, -7.0], [2.0, 2.0, -6.0, -6.0, 3.0], [-6.0, 7.0, 6.0, -5.0, 7.0], [-1.0, -7.0, 
+4.0, 4.0, 0.0]], [[-4.0, 0.0, 1.0, 7.0, -3.0], [-1.0, 4.0, -3.0, -4.0, 2.0], [5.0, 7.0, 3.0, 1.0, 7.0], [3.0, 4.0, 4.0, 0.0, 
+-5.0]]], [[[-2.0, 0.0, -7.0, 5.0, 2.0], [0.0, -6.0, 7.0, 3.0, -4.0], [0.0, 5.0, 6.0, 2.0, 2.0], [2.0, 2.0, -5.0, -2.0, 0.0]], 
+[[4.0, 0.0, -5.0, -5.0, 4.0], [5.0, 4.0, 0.0, -4.0, 7.0], [0.0, 6.0, 7.0, 7.0, 6.0], [-2.0, 5.0, -4.0, 0.0, -1.0]], [[-7.0, 
+-4.0, -7.0, 2.0, -6.0], [-1.0, 7.0, 0.0, 6.0, -2.0], [-6.0, -6.0, 6.0, -1.0, 2.0], [-7.0, -3.0, 6.0, -7.0, 
+-2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-7.0, 0.0], [7.0, 0.0], [4.0, -3.0]], [[-4.0, 1.0], [2.0, 5.0], [0.0, 4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -4.0], [5.0, 5.0], [-7.0, 4.0]], [[-5.0, -5.0], [4.0, 0.0], [5.0, -4.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[49.0, 2.0], [-56.0, -16.0], [64.0, -63.0], [19.0, -33.0], [-103.0, 7.0]], [[34.0, 24.0], [55.0, 
+30.0], [-110.0, 16.0], [-120.0, 19.0], [24.0, 17.0]], [[-8.0, -39.0], [69.0, -10.0], [79.0, 56.0], [-25.0, 30.0], [81.0, 
+19.0]], [[-7.0, -45.0], [-17.0, 3.0], [14.0, -13.0], [50.0, -30.0], [6.0, 2.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[49.0, 56.0], [-30.0, -18.0], [-22.0, 92.0], [-74.0, 9.0], [-38.0, -57.0]], [[32.0, 
+18.0], [63.0, 24.0], [-44.0, -93.0], [-3.0, -109.0], [39.0, 31.0]], [[-95.0, 22.0], [-45.0, 62.0], [37.0, 8.0], [-19.0, -27.0], 
+[10.0, 45.0]], [[-79.0, 25.0], [-68.0, -9.0], [31.0, 13.0], [-5.0, 66.0], [21.0, 4.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank2_constData_rank2(self):
-      arg0=Data(numpy.array([[3.0, 6.0, -7.0], [-1.0, 0.0, -1.0]]),self.functionspace)
-      arg1=Data(numpy.array([[5.0, -1.0, 0.0], [-7.0, -6.0, 0.0]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[9.0, -57.0], [-5.0, 7.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-7.0, 5.0, 2.0, -6.0, 3.0], [-2.0, 4.0, -5.0, -7.0, -4.0], [2.0, 0.0, 0.0, 2.0, -1.0], [3.0, 
+-1.0, -5.0, 6.0, 7.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 1.0, -4.0, -2.0, 0.0], [2.0, -3.0, -6.0, -6.0, -1.0], [0.0, -5.0, 5.0, -5.0, 1.0], [5.0, 
+4.0, 4.0, 4.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, 3.0, 0.0, -7.0, -6.0], [-7.0, 5.0, -2.0, -6.0, 2.0], [1.0, -5.0, -1.0, -5.0, 
+2.0], [-5.0, -3.0, 6.0, 0.0, 2.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[7.0, -7.0, 28.0, 14.0, 0.0], [-14.0, 21.0, 42.0, 42.0, 7.0], [0.0, 35.0, -35.0, 35.0, -7.0], 
+[-35.0, -28.0, -28.0, -28.0, 49.0]], [[-5.0, 5.0, -20.0, -10.0, 0.0], [10.0, -15.0, -30.0, -30.0, -5.0], [0.0, -25.0, 25.0, 
+-25.0, 5.0], [25.0, 20.0, 20.0, 20.0, -35.0]], [[-2.0, 2.0, -8.0, -4.0, 0.0], [4.0, -6.0, -12.0, -12.0, -2.0], [0.0, -10.0, 
+10.0, -10.0, 2.0], [10.0, 8.0, 8.0, 8.0, -14.0]], [[6.0, -6.0, 24.0, 12.0, 0.0], [-12.0, 18.0, 36.0, 36.0, 6.0], [0.0, 30.0, 
+-30.0, 30.0, -6.0], [-30.0, -24.0, -24.0, -24.0, 42.0]], [[-3.0, 3.0, -12.0, -6.0, 0.0], [6.0, -9.0, -18.0, -18.0, -3.0], [0.0, 
+-15.0, 15.0, -15.0, 3.0], [15.0, 12.0, 12.0, 12.0, -21.0]]], [[[2.0, -2.0, 8.0, 4.0, 0.0], [-4.0, 6.0, 12.0, 12.0, 2.0], [0.0, 
+10.0, -10.0, 10.0, -2.0], [-10.0, -8.0, -8.0, -8.0, 14.0]], [[-4.0, 4.0, -16.0, -8.0, 0.0], [8.0, -12.0, -24.0, -24.0, -4.0], 
+[0.0, -20.0, 20.0, -20.0, 4.0], [20.0, 16.0, 16.0, 16.0, -28.0]], [[5.0, -5.0, 20.0, 10.0, 0.0], [-10.0, 15.0, 30.0, 30.0, 
+5.0], [0.0, 25.0, -25.0, 25.0, -5.0], [-25.0, -20.0, -20.0, -20.0, 35.0]], [[7.0, -7.0, 28.0, 14.0, 0.0], [-14.0, 21.0, 42.0, 
+42.0, 7.0], [0.0, 35.0, -35.0, 35.0, -7.0], [-35.0, -28.0, -28.0, -28.0, 49.0]], [[4.0, -4.0, 16.0, 8.0, 0.0], [-8.0, 12.0, 
+24.0, 24.0, 4.0], [0.0, 20.0, -20.0, 20.0, -4.0], [-20.0, -16.0, -16.0, -16.0, 28.0]]], [[[-2.0, 2.0, -8.0, -4.0, 0.0], [4.0, 
+-6.0, -12.0, -12.0, -2.0], [0.0, -10.0, 10.0, -10.0, 2.0], [10.0, 8.0, 8.0, 8.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-2.0, 2.0, -8.0, -4.0, 0.0], [4.0, -6.0, -12.0, -12.0, -2.0], 
+[0.0, -10.0, 10.0, -10.0, 2.0], [10.0, 8.0, 8.0, 8.0, -14.0]], [[1.0, -1.0, 4.0, 2.0, 0.0], [-2.0, 3.0, 6.0, 6.0, 1.0], [0.0, 
+5.0, -5.0, 5.0, -1.0], [-5.0, -4.0, -4.0, -4.0, 7.0]]], [[[-3.0, 3.0, -12.0, -6.0, 0.0], [6.0, -9.0, -18.0, -18.0, -3.0], [0.0, 
+-15.0, 15.0, -15.0, 3.0], [15.0, 12.0, 12.0, 12.0, -21.0]], [[1.0, -1.0, 4.0, 2.0, 0.0], [-2.0, 3.0, 6.0, 6.0, 1.0], [0.0, 5.0, 
+-5.0, 5.0, -1.0], [-5.0, -4.0, -4.0, -4.0, 7.0]], [[5.0, -5.0, 20.0, 10.0, 0.0], [-10.0, 15.0, 30.0, 30.0, 5.0], [0.0, 25.0, 
+-25.0, 25.0, -5.0], [-25.0, -20.0, -20.0, -20.0, 35.0]], [[-6.0, 6.0, -24.0, -12.0, 0.0], [12.0, -18.0, -36.0, -36.0, -6.0], 
+[0.0, -30.0, 30.0, -30.0, 6.0], [30.0, 24.0, 24.0, 24.0, -42.0]], [[-7.0, 7.0, -28.0, -14.0, 0.0], [14.0, -21.0, -42.0, -42.0, 
+-7.0], [0.0, -35.0, 35.0, -35.0, 7.0], [35.0, 28.0, 28.0, 28.0, -49.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-35.0, -21.0, 0.0, 49.0, 42.0], [49.0, -35.0, 14.0, 42.0, -14.0], [-7.0, 35.0, 7.0, 
+35.0, -14.0], [35.0, 21.0, -42.0, 0.0, -14.0]], [[25.0, 15.0, 0.0, -35.0, -30.0], [-35.0, 25.0, -10.0, -30.0, 10.0], [5.0, 
+-25.0, -5.0, -25.0, 10.0], [-25.0, -15.0, 30.0, 0.0, 10.0]], [[10.0, 6.0, 0.0, -14.0, -12.0], [-14.0, 10.0, -4.0, -12.0, 4.0], 
+[2.0, -10.0, -2.0, -10.0, 4.0], [-10.0, -6.0, 12.0, 0.0, 4.0]], [[-30.0, -18.0, 0.0, 42.0, 36.0], [42.0, -30.0, 12.0, 36.0, 
+-12.0], [-6.0, 30.0, 6.0, 30.0, -12.0], [30.0, 18.0, -36.0, 0.0, -12.0]], [[15.0, 9.0, 0.0, -21.0, -18.0], [-21.0, 15.0, -6.0, 
+-18.0, 6.0], [3.0, -15.0, -3.0, -15.0, 6.0], [-15.0, -9.0, 18.0, 0.0, 6.0]]], [[[-10.0, -6.0, 0.0, 14.0, 12.0], [14.0, -10.0, 
+4.0, 12.0, -4.0], [-2.0, 10.0, 2.0, 10.0, -4.0], [10.0, 6.0, -12.0, 0.0, -4.0]], [[20.0, 12.0, 0.0, -28.0, -24.0], [-28.0, 
+20.0, -8.0, -24.0, 8.0], [4.0, -20.0, -4.0, -20.0, 8.0], [-20.0, -12.0, 24.0, 0.0, 8.0]], [[-25.0, -15.0, 0.0, 35.0, 30.0], 
+[35.0, -25.0, 10.0, 30.0, -10.0], [-5.0, 25.0, 5.0, 25.0, -10.0], [25.0, 15.0, -30.0, 0.0, -10.0]], [[-35.0, -21.0, 0.0, 49.0, 
+42.0], [49.0, -35.0, 14.0, 42.0, -14.0], [-7.0, 35.0, 7.0, 35.0, -14.0], [35.0, 21.0, -42.0, 0.0, -14.0]], [[-20.0, -12.0, 0.0, 
+28.0, 24.0], [28.0, -20.0, 8.0, 24.0, -8.0], [-4.0, 20.0, 4.0, 20.0, -8.0], [20.0, 12.0, -24.0, 0.0, -8.0]]], [[[10.0, 6.0, 
+0.0, -14.0, -12.0], [-14.0, 10.0, -4.0, -12.0, 4.0], [2.0, -10.0, -2.0, -10.0, 4.0], [-10.0, -6.0, 12.0, 0.0, 4.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[10.0, 6.0, 0.0, -14.0, -12.0], 
+[-14.0, 10.0, -4.0, -12.0, 4.0], [2.0, -10.0, -2.0, -10.0, 4.0], [-10.0, -6.0, 12.0, 0.0, 4.0]], [[-5.0, -3.0, 0.0, 7.0, 6.0], 
+[7.0, -5.0, 2.0, 6.0, -2.0], [-1.0, 5.0, 1.0, 5.0, -2.0], [5.0, 3.0, -6.0, 0.0, -2.0]]], [[[15.0, 9.0, 0.0, -21.0, -18.0], 
+[-21.0, 15.0, -6.0, -18.0, 6.0], [3.0, -15.0, -3.0, -15.0, 6.0], [-15.0, -9.0, 18.0, 0.0, 6.0]], [[-5.0, -3.0, 0.0, 7.0, 6.0], 
+[7.0, -5.0, 2.0, 6.0, -2.0], [-1.0, 5.0, 1.0, 5.0, -2.0], [5.0, 3.0, -6.0, 0.0, -2.0]], [[-25.0, -15.0, 0.0, 35.0, 30.0], 
+[35.0, -25.0, 10.0, 30.0, -10.0], [-5.0, 25.0, 5.0, 25.0, -10.0], [25.0, 15.0, -30.0, 0.0, -10.0]], [[30.0, 18.0, 0.0, -42.0, 
+-36.0], [-42.0, 30.0, -12.0, -36.0, 12.0], [6.0, -30.0, -6.0, -30.0, 12.0], [-30.0, -18.0, 36.0, 0.0, 12.0]], [[35.0, 21.0, 
+0.0, -49.0, -42.0], [-49.0, 35.0, -14.0, -42.0, 14.0], [7.0, -35.0, -7.0, -35.0, 14.0], [-35.0, -21.0, 42.0, 0.0, 14.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank2_expandedData_rank1(self):
-      arg0=Data(numpy.array([[0.0, 7.0, -7.0], [2.0, -4.0, -5.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 6.0, 2.0])+(1.-msk_arg1)*numpy.array([1.0, 7.0, 0.0])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([28.0, -34.0])+(1.-msk_ref)*numpy.array([49.0, -26.0])
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[1.0, 1.0, 3.0, -2.0, -4.0], [5.0, -7.0, -1.0, 0.0, 2.0], [-1.0, 4.0, 3.0, 2.0, -3.0], [1.0, 2.0, 
+7.0, 2.0, -6.0]], [[-3.0, 6.0, 0.0, 7.0, -7.0], [-2.0, 5.0, 3.0, 1.0, -7.0], [-5.0, -7.0, -1.0, 6.0, -6.0], [-2.0, 1.0, 3.0, 
+-2.0, -5.0]], [[-4.0, 2.0, 2.0, 0.0, 4.0], [4.0, -5.0, 0.0, -3.0, 4.0], [0.0, 1.0, -2.0, -5.0, 0.0], [2.0, -1.0, 7.0, -1.0, 
+-2.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, 0.0, -4.0, 0.0, 5.0], [0.0, 6.0, -3.0, -6.0, -2.0], [6.0, -5.0, 4.0, 7.0, -6.0], [0.0, 
+-5.0, -4.0, -3.0, -1.0]], [[6.0, 1.0, 1.0, 2.0, -3.0], [7.0, -2.0, 4.0, -6.0, -7.0], [-5.0, 3.0, -4.0, -4.0, 0.0], [2.0, 7.0, 
+-4.0, 0.0, 1.0]], [[6.0, -3.0, 6.0, -3.0, 5.0], [-3.0, -1.0, -2.0, 6.0, -1.0], [-2.0, 5.0, 4.0, -5.0, -3.0], [0.0, 1.0, 1.0, 
+-2.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-2.0, -6.0, 2.0, -3.0, -1.0], [2.0, 2.0, 4.0, -1.0, 4.0], [5.0, 0.0, -2.0, 4.0, 
+1.0], [0.0, -6.0, 2.0, -1.0, 3.0]], [[4.0, -3.0, 5.0, -4.0, -3.0], [-4.0, 7.0, 2.0, 4.0, 4.0], [4.0, 6.0, 1.0, 0.0, 7.0], 
+[-7.0, 1.0, -5.0, -5.0, -2.0]], [[7.0, -4.0, 4.0, 0.0, 6.0], [0.0, 5.0, -4.0, 7.0, 3.0], [-4.0, 1.0, 7.0, 2.0, -5.0], [-1.0, 
+-6.0, 5.0, 5.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-46.0, 9.0, -31.0, 6.0, -6.0], [-9.0, 16.0, -7.0, -12.0, 23.0], [29.0, -34.0, 0.0, 39.0, 6.0], 
+[-6.0, -30.0, 4.0, 5.0, -12.0]], [[44.0, 0.0, 14.0, 6.0, -3.0], [36.0, -8.0, 17.0, -30.0, -46.0], [-28.0, 23.0, -12.0, -27.0, 
+-12.0], [12.0, 39.0, -26.0, -7.0, 9.0]], [[0.0, -6.0, 0.0, -6.0, 25.0], [-6.0, 16.0, -13.0, -6.0, -8.0], [14.0, -5.0, 20.0, 
+11.0, -24.0], [0.0, -13.0, -10.0, -13.0, 1.0]], [[50.0, 7.0, 15.0, 14.0, -31.0], [49.0, -26.0, 34.0, -30.0, -45.0], [-47.0, 
+31.0, -36.0, -42.0, 12.0], [14.0, 59.0, -20.0, 6.0, 9.0]], [[-2.0, -19.0, 33.0, -26.0, 21.0], [-61.0, -14.0, -24.0, 90.0, 
+53.0], [3.0, 19.0, 28.0, -20.0, 12.0], [-14.0, -25.0, 48.0, 4.0, 5.0]]], [[[-8.0, -14.0, 2.0, -16.0, 51.0], [-26.0, 30.0, 
+-31.0, 6.0, 0.0], [32.0, -11.0, 44.0, 23.0, -42.0], [-4.0, -35.0, -8.0, -23.0, 1.0]], [[28.0, 20.0, 3.0, 25.0, -75.0], [50.0, 
+-47.0, 51.0, -18.0, -16.0], [-57.0, 25.0, -68.0, -44.0, 57.0], [10.0, 65.0, 3.0, 31.0, 2.0]], [[22.0, 3.0, 7.0, 6.0, -14.0], 
+[21.0, -12.0, 15.0, -12.0, -19.0], [-21.0, 14.0, -16.0, -19.0, 6.0], [6.0, 26.0, -8.0, 3.0, 4.0]], [[-12.0, 10.0, -17.0, 11.0, 
+-18.0], [16.0, 1.0, 10.0, -24.0, -4.0], [1.0, -12.0, -16.0, 11.0, 9.0], [2.0, 4.0, -7.0, 6.0, -5.0]], [[-26.0, -19.0, 9.0, 
+-26.0, 51.0], [-61.0, 22.0, -42.0, 54.0, 41.0], [39.0, -11.0, 52.0, 22.0, -24.0], [-14.0, -55.0, 24.0, -14.0, -1.0]]], 
+[[[-26.0, -5.0, -1.0, -10.0, 10.0], [-35.0, 4.0, -17.0, 36.0, 37.0], [19.0, -10.0, 16.0, 13.0, 6.0], [-10.0, -30.0, 24.0, 3.0, 
+-4.0]], [[-52.0, -10.0, -17.0, -17.0, 46.0], [-52.0, 37.0, -42.0, 24.0, 40.0], [57.0, -36.0, 48.0, 51.0, -27.0], [-14.0, -68.0, 
+13.0, -14.0, -9.0]], [[-30.0, 5.0, -25.0, 4.0, 8.0], [-1.0, 22.0, -9.0, -24.0, 3.0], [27.0, -28.0, 8.0, 35.0, -12.0], [-2.0, 
+-24.0, -10.0, -5.0, -8.0]], [[-2.0, 21.0, -32.0, 27.0, -33.0], [57.0, 5.0, 28.0, -78.0, -41.0], [-8.0, -17.0, -36.0, 15.0, 
+3.0], [12.0, 27.0, -37.0, 4.0, -6.0]], [[-24.0, -6.0, 6.0, -12.0, 3.0], [-42.0, -6.0, -15.0, 54.0, 48.0], [12.0, -3.0, 12.0, 
+3.0, 18.0], [-12.0, -27.0, 36.0, 9.0, -3.0]]], [[[-4.0, -8.0, 6.0, -10.0, 21.0], [-20.0, 8.0, -15.0, 18.0, 10.0], [12.0, -1.0, 
+20.0, 5.0, -12.0], [-4.0, -17.0, 6.0, -7.0, 1.0]], [[-8.0, 4.0, -13.0, 5.0, 2.0], [10.0, 11.0, 0.0, -24.0, -10.0], [9.0, -12.0, 
+0.0, 15.0, -9.0], [2.0, -4.0, -13.0, -4.0, -3.0]], [[32.0, -18.0, 17.0, -15.0, 61.0], [0.0, 29.0, -23.0, -18.0, -42.0], [13.0, 
+9.0, 44.0, 2.0, -63.0], [6.0, -7.0, -33.0, -35.0, 10.0]], [[-26.0, 1.0, -16.0, -1.0, 11.0], [-11.0, 17.0, -12.0, -6.0, 11.0], 
+[24.0, -21.0, 12.0, 27.0, -9.0], [-4.0, -25.0, -1.0, -4.0, -6.0]], [[-18.0, 1.0, 7.0, -4.0, -25.0], [-29.0, -24.0, 2.0, 54.0, 
+49.0], [-7.0, 5.0, -12.0, -12.0, 42.0], [-10.0, -7.0, 42.0, 22.0, -3.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-42.0, 19.0, -29.0, 9.0, -16.0], [14.0, -39.0, 14.0, -41.0, -20.0], [9.0, -22.0, 
+-33.0, -4.0, 0.0], [25.0, 15.0, -3.0, -6.0, 9.0]], [[36.0, -32.0, 40.0, -27.0, -7.0], [-22.0, 54.0, 8.0, 37.0, 34.0], [21.0, 
+38.0, 18.0, 8.0, 33.0], [-44.0, -12.0, -18.0, -21.0, -9.0]], [[8.0, -26.0, 14.0, -9.0, 9.0], [6.0, 16.0, 4.0, 11.0, 18.0], 
+[7.0, 2.0, 8.0, 16.0, -7.0], [-2.0, -30.0, 16.0, 7.0, 9.0]], [[32.0, -9.0, 31.0, -22.0, -19.0], [-32.0, 45.0, 6.0, 30.0, 20.0], 
+[18.0, 42.0, 11.0, -8.0, 47.0], [-49.0, 19.0, -39.0, -33.0, -20.0]], [[8.0, 29.0, -27.0, 40.0, 49.0], [20.0, -37.0, -46.0, 4.0, 
+-32.0], [-64.0, -38.0, 29.0, -8.0, -73.0], [45.0, -7.0, 47.0, 59.0, 2.0]]], [[[10.0, -40.0, 16.0, -7.0, 25.0], [18.0, 16.0, 
+0.0, 15.0, 24.0], [1.0, -8.0, 16.0, 28.0, -29.0], [10.0, -56.0, 40.0, 25.0, 19.0]], [[-1.0, 47.0, -9.0, 1.0, -38.0], [-34.0, 
+-4.0, 2.0, -8.0, -23.0], [5.0, 25.0, -16.0, -38.0, 53.0], [-30.0, 77.0, -64.0, -43.0, -31.0]], [[14.0, -3.0, 13.0, -9.0, -8.0], 
+[-14.0, 19.0, 2.0, 13.0, 8.0], [7.0, 18.0, 5.0, -4.0, 20.0], [-21.0, 9.0, -17.0, -14.0, -9.0]], [[-17.0, 9.0, -7.0, -4.0, 
+-21.0], [-4.0, -8.0, 14.0, -17.0, -5.0], [16.0, 3.0, -20.0, -6.0, 22.0], [-4.0, 19.0, -20.0, -20.0, -2.0]], [[-4.0, -7.0, 
+-15.0, 22.0, 43.0], [32.0, -25.0, -22.0, -2.0, -8.0], [-34.0, -38.0, 17.0, 16.0, -67.0], [45.0, -43.0, 59.0, 53.0, 20.0]]], 
+[[[-18.0, 21.0, -27.0, 23.0, 16.0], [18.0, -37.0, -14.0, -19.0, -24.0], [-25.0, -30.0, -3.0, -4.0, -36.0], [35.0, 1.0, 23.0, 
+26.0, 7.0]], [[-29.0, -7.0, -23.0, 16.0, 23.0], [36.0, -36.0, -2.0, -25.0, -9.0], [-12.0, -41.0, -8.0, 18.0, -50.0], [48.0, 
+-37.0, 48.0, 36.0, 26.0]], [[-24.0, -7.0, -7.0, -5.0, -12.0], [10.0, -11.0, 18.0, -21.0, 2.0], [19.0, -8.0, -21.0, 8.0, 6.0], 
+[9.0, -7.0, 1.0, -8.0, 11.0]], [[-15.0, -10.0, 14.0, -30.0, -50.0], [-20.0, 21.0, 40.0, -13.0, 17.0], [54.0, 31.0, -33.0, -2.0, 
+69.0], [-37.0, 24.0, -51.0, -57.0, -6.0]], [[-18.0, 36.0, -36.0, 33.0, 21.0], [18.0, -48.0, -24.0, -21.0, -36.0], [-39.0, 
+-36.0, 0.0, -12.0, -45.0], [42.0, 12.0, 24.0, 33.0, 3.0]]], [[[4.0, -8.0, 0.0, 5.0, 17.0], [10.0, -2.0, -8.0, 5.0, 2.0], 
+[-11.0, -10.0, 10.0, 8.0, -23.0], [12.0, -20.0, 22.0, 19.0, 7.0]], [[-7.0, -11.0, 5.0, -10.0, -11.0], [0.0, 6.0, 14.0, -5.0, 
+9.0], [18.0, 5.0, -10.0, 6.0, 14.0], [-6.0, -5.0, -6.0, -12.0, 4.0]], [[47.0, -79.0, 57.0, -33.0, 26.0], [2.0, 70.0, 6.0, 54.0, 
+61.0], [19.0, 25.0, 38.0, 42.0, -7.0], [-28.0, -81.0, 34.0, 13.0, 15.0]], [[-19.0, -2.0, -10.0, 2.0, -2.0], [12.0, -15.0, 8.0, 
+-17.0, -3.0], [6.0, -13.0, -13.0, 6.0, -7.0], [15.0, -8.0, 9.0, 3.0, 10.0]], [[-22.0, 59.0, -45.0, 38.0, 9.0], [8.0, -57.0, 
+-26.0, -28.0, -50.0], [-42.0, -32.0, -7.0, -28.0, -31.0], [37.0, 43.0, 3.0, 21.0, -8.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank2_expandedData_rank2(self):
-      arg0=Data(numpy.array([[-3.0, 5.0, 0.0], [-5.0, -1.0, -6.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[2.0, -4.0, -1.0], [-6.0, 0.0, 4.0]])+(1.-msk_arg1)*numpy.array([[2.0, -6.0, -6.0], [3.0, 
--3.0, 6.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-26.0, 18.0], [0.0, 6.0]])+(1.-msk_ref)*numpy.array([[-36.0, -24.0], [32.0, -48.0]])
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[1.0, 0.0, -7.0, 2.0, -7.0], [-7.0, -5.0, 6.0, -6.0, 3.0], [-5.0, -5.0, 1.0, -3.0, 1.0], [-6.0, 
+-5.0, 3.0, -7.0, 1.0]], [[-5.0, 2.0, -2.0, 4.0, -6.0], [0.0, -1.0, -6.0, 4.0, 0.0], [0.0, 0.0, 5.0, 6.0, -5.0], [-7.0, 2.0, 
+-2.0, -4.0, 0.0]], [[-7.0, 1.0, 4.0, 7.0, 3.0], [-6.0, -3.0, 6.0, 7.0, -1.0], [-1.0, 2.0, 4.0, 0.0, 5.0], [-1.0, 7.0, 5.0, 
+-4.0, 2.0]]], [[[-6.0, 0.0, -5.0, 2.0, -7.0], [3.0, 1.0, -5.0, -5.0, -5.0], [3.0, -7.0, 0.0, 3.0, -1.0], [6.0, 1.0, 0.0, 3.0, 
+1.0]], [[-2.0, 5.0, 7.0, -1.0, 4.0], [3.0, 4.0, -6.0, 1.0, 4.0], [-7.0, 0.0, 5.0, 0.0, 0.0], [1.0, -5.0, 1.0, 7.0, -1.0]], 
+[[2.0, -4.0, -4.0, -4.0, 0.0], [-3.0, -2.0, 2.0, 7.0, 5.0], [4.0, 6.0, 5.0, 5.0, 0.0], [6.0, -4.0, 4.0, 5.0, 
+3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[4.0, -6.0, -1.0, -5.0, -4.0], [0.0, 3.0, -4.0, -4.0, 5.0], [3.0, 4.0, 4.0, -7.0, -6.0], [-1.0, 
+5.0, -5.0, 3.0, -7.0]], [[1.0, -6.0, 0.0, -4.0, 7.0], [5.0, -5.0, 0.0, 4.0, -3.0], [1.0, -1.0, 1.0, 2.0, 7.0], [5.0, 0.0, 5.0, 
+-2.0, -4.0]], [[0.0, 4.0, 6.0, 5.0, -2.0], [2.0, 0.0, 4.0, 1.0, 2.0], [5.0, -7.0, -4.0, -4.0, 1.0], [-4.0, 6.0, 2.0, -6.0, 
+1.0]]], [[[-2.0, 3.0, 0.0, -1.0, -2.0], [0.0, -2.0, 6.0, -2.0, 7.0], [4.0, -1.0, -5.0, -3.0, -5.0], [-3.0, 3.0, 3.0, 5.0, 
+-6.0]], [[6.0, 3.0, 7.0, -3.0, 4.0], [-7.0, -1.0, -2.0, -5.0, 0.0], [2.0, -6.0, -2.0, 5.0, 7.0], [0.0, 0.0, -4.0, -7.0, -2.0]], 
+[[2.0, 4.0, -5.0, 7.0, -2.0], [-7.0, 6.0, -6.0, 7.0, -6.0], [2.0, 4.0, -7.0, -3.0, -3.0], [-1.0, -6.0, 4.0, 3.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[7.0, 2.0, -3.0, -1.0, 2.0], [3.0, -4.0, -6.0, 0.0, 3.0], [-5.0, 6.0, 4.0, -6.0, 
+-5.0], [-5.0, 5.0, 2.0, -4.0, 5.0]], [[-7.0, 5.0, 0.0, -3.0, 7.0], [-3.0, -2.0, -3.0, 0.0, 0.0], [-2.0, -1.0, -7.0, 5.0, -1.0], 
+[2.0, -3.0, 7.0, -5.0, 3.0]], [[-6.0, 4.0, -5.0, 7.0, 0.0], [-3.0, -3.0, 5.0, 2.0, 6.0], [-7.0, 6.0, 4.0, 4.0, -2.0], [-1.0, 
+5.0, -3.0, 3.0, -6.0]]], [[[6.0, 2.0, 6.0, 3.0, 4.0], [5.0, -2.0, 2.0, -7.0, 7.0], [0.0, -1.0, 0.0, -1.0, 5.0], [-3.0, -2.0, 
+7.0, -3.0, -3.0]], [[7.0, 0.0, -6.0, 5.0, -6.0], [-5.0, 1.0, 1.0, -2.0, 4.0], [5.0, -1.0, -4.0, -2.0, -1.0], [-4.0, -6.0, 7.0, 
+0.0, 6.0]], [[-3.0, 0.0, 2.0, 0.0, -6.0], [0.0, -3.0, 3.0, 4.0, -4.0], [-6.0, 7.0, 5.0, -7.0, 6.0], [1.0, 5.0, 7.0, -4.0, 
+-3.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[3.0, -20.0, -67.0, 6.0, -25.0], [-39.0, 54.0, -76.0, 5.0, -48.0], [-61.0, 84.0, 47.0, 13.0, 
+-38.0], [18.0, -67.0, -46.0, 45.0, 34.0]], [[24.0, -9.0, 61.0, -46.0, 40.0], [5.0, -39.0, 18.0, -44.0, 20.0], [9.0, -55.0, 
+16.0, 37.0, 62.0], [10.0, 30.0, -24.0, -57.0, 7.0]], [[14.0, 60.0, 100.0, 19.0, 52.0], [-23.0, -32.0, 24.0, -29.0, -32.0], 
+[-17.0, -107.0, -7.0, 91.0, 118.0], [0.0, -2.0, -26.0, -127.0, 101.0]], [[-6.0, -21.0, 53.0, -18.0, 6.0], [69.0, -41.0, 58.0, 
+-12.0, 50.0], [43.0, -57.0, 4.0, -33.0, 18.0], [-12.0, 82.0, 18.0, -39.0, -9.0]], [[4.0, 81.0, 53.0, 69.0, 10.0], [-52.0, 19.0, 
+-10.0, 1.0, -60.0], [-32.0, -60.0, -19.0, 66.0, 66.0], [-14.0, -38.0, -26.0, -90.0, 110.0]]], [[[-22.0, 24.0, 7.0, -28.0, 
+52.0], [-12.0, -48.0, 34.0, -20.0, -8.0], [-39.0, -19.0, -4.0, 88.0, 51.0], [25.0, -44.0, 8.0, 0.0, 37.0]], [[-3.0, 31.0, 25.0, 
+-13.0, 37.0], [-25.0, -28.0, 18.0, -23.0, -9.0], [-23.0, -31.0, -8.0, 68.0, 49.0], [11.0, -28.0, -7.0, -24.0, 34.0]], [[-4.0, 
+-1.0, -22.0, 61.0, -96.0], [10.0, 76.0, -30.0, 12.0, 13.0], [14.0, 37.0, 17.0, -99.0, -95.0], [-47.0, 39.0, -31.0, 17.0, 
+18.0]], [[10.0, 56.0, 20.0, 100.0, 38.0], [-22.0, 13.0, -22.0, 101.0, -105.0], [17.0, -50.0, -74.0, 21.0, 82.0], [6.0, -45.0, 
+73.0, -79.0, 19.0]], [[56.0, -5.0, -6.0, 8.0, 6.0], [-65.0, 45.0, -84.0, 12.0, -52.0], [2.0, 20.0, -2.0, 3.0, 19.0], [11.0, 
+-36.0, -28.0, -23.0, -30.0]]], [[[-60.0, 30.0, -70.0, 66.0, -20.0], [19.0, 10.0, 24.0, 76.0, -30.0], [-14.0, 42.0, -45.0, 
+-17.0, -47.0], [-4.0, -46.0, 76.0, 67.0, 6.0]], [[6.0, 41.0, -13.0, 84.0, 18.0], [-38.0, 35.0, -50.0, 78.0, -106.0], [-21.0, 
+-3.0, -35.0, 30.0, 49.0], [12.0, -70.0, 32.0, -44.0, 43.0]], [[49.0, 15.0, 33.0, 15.0, 33.0], [-37.0, 3.0, -28.0, 30.0, -32.0], 
+[48.0, -39.0, -52.0, -3.0, 53.0], [3.0, -1.0, 28.0, -51.0, -63.0]], [[-2.0, 11.0, -22.0, 23.0, 38.0], [-5.0, -15.0, 0.0, 65.0, 
+-42.0], [19.0, -1.0, -56.0, 9.0, 30.0], [19.0, -36.0, 74.0, 9.0, -51.0]], [[1.0, 41.0, 29.0, 41.0, -47.0], [-15.0, 30.0, 10.0, 
+-17.0, 23.0], [19.0, -25.0, -16.0, -34.0, -31.0], [-43.0, 32.0, -23.0, -22.0, 24.0]]], [[[-25.0, 119.0, -23.0, 86.0, -43.0], 
+[-86.0, 40.0, 18.0, 20.0, -5.0], [8.0, 2.0, -101.0, 1.0, -55.0], [-49.0, -54.0, 31.0, 43.0, -5.0]], [[-58.0, 18.0, 32.0, 38.0, 
+6.0], [87.0, -46.0, 88.0, 30.0, 14.0], [8.0, -58.0, -13.0, -5.0, 23.0], [-12.0, 44.0, 56.0, -33.0, 62.0]], [[24.0, 33.0, 14.0, 
+43.0, -40.0], [-35.0, 42.0, -18.0, 8.0, 7.0], [42.0, -11.0, -40.0, -52.0, -32.0], [-37.0, 21.0, -3.0, -12.0, -34.0]], [[14.0, 
+100.0, 7.0, 42.0, 20.0], [-112.0, 16.0, -14.0, 2.0, -40.0], [-9.0, -21.0, -80.0, 68.0, 29.0], [-11.0, -80.0, 8.0, -8.0, -1.0]], 
+[[2.0, 14.0, -11.0, 28.0, -20.0], [-10.0, 20.0, -6.0, 22.0, -2.0], [21.0, 7.0, -28.0, -32.0, -25.0], [-15.0, 2.0, 18.0, 12.0, 
+-27.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[28.0, -63.0, 12.0, -63.0, -57.0], [19.0, 31.0, -34.0, 40.0, -97.0], [32.0, -9.0, 
+29.0, -63.0, -2.0], [20.0, 19.0, -54.0, 10.0, 32.0]], [[27.0, 14.0, -43.0, 26.0, 8.0], [-34.0, 10.0, -8.0, -24.0, 42.0], [38.0, 
+-29.0, -50.0, 32.0, -33.0], [-21.0, -51.0, 18.0, 9.0, 42.0]], [[-28.0, -18.0, -79.0, 61.0, -66.0], [-87.0, 49.0, 53.0, 13.0, 
+12.0], [70.0, -46.0, -46.0, 67.0, -27.0], [10.0, -61.0, -54.0, 81.0, 4.0]], [[-39.0, 56.0, -31.0, 36.0, 70.0], [-12.0, -30.0, 
+2.0, -14.0, 74.0], [-48.0, 21.0, -8.0, 64.0, -41.0], [-15.0, 15.0, -10.0, 3.0, -20.0]], [[-39.0, -46.0, -60.0, 45.0, -108.0], 
+[-67.0, 49.0, 65.0, 47.0, -36.0], [46.0, -15.0, 10.0, 23.0, -4.0], [25.0, -12.0, -86.0, 88.0, -26.0]]], [[[35.0, -32.0, 45.0, 
+-11.0, -2.0], [-3.0, 52.0, 12.0, -51.0, -12.0], [110.0, -105.0, -79.0, 30.0, 41.0], [17.0, -104.0, 25.0, 13.0, 19.0]], [[30.0, 
+-25.0, 8.0, 10.0, -25.0], [-18.0, 39.0, 18.0, -29.0, -2.0], [80.0, -66.0, -51.0, 18.0, 21.0], [5.0, -73.0, 13.0, 21.0, 17.0]], 
+[[-30.0, -4.0, -38.0, 9.0, -26.0], [23.0, -32.0, 2.0, 67.0, -13.0], [-102.0, 103.0, 124.0, -39.0, -43.0], [-7.0, 134.0, -111.0, 
+31.0, -51.0]], [[-156.0, 26.0, -39.0, 33.0, -52.0], [-81.0, -15.0, 71.0, 75.0, -35.0], [-64.0, 55.0, 7.0, 38.0, 28.0], [49.0, 
+32.0, 16.0, 12.0, -60.0]], [[10.0, -8.0, -48.0, -5.0, -68.0], [-33.0, -10.0, -14.0, 45.0, -36.0], [-18.0, 48.0, 17.0, -60.0, 
+-12.0], [-10.0, 21.0, 37.0, -20.0, 45.0]]], [[[-72.0, -8.0, 88.0, -28.0, 20.0], [38.0, -2.0, 36.0, 7.0, -44.0], [-27.0, -4.0, 
+24.0, 9.0, 73.0], [49.0, 26.0, -7.0, -8.0, -82.0]], [[-107.0, -16.0, -25.0, -2.0, -74.0], [-56.0, 10.0, 44.0, 77.0, -76.0], 
+[-25.0, 31.0, 18.0, 3.0, 22.0], [50.0, 29.0, -23.0, 23.0, -34.0]], [[-32.0, 43.0, -43.0, 37.0, -23.0], [-49.0, -36.0, 19.0, 
+18.0, 27.0], [-48.0, 55.0, -10.0, -10.0, 7.0], [-14.0, 5.0, 95.0, -37.0, 11.0]], [[-60.0, 30.0, 37.0, -6.0, 18.0], [-12.0, 
+-21.0, 21.0, -1.0, -8.0], [-27.0, 8.0, -29.0, 10.0, 54.0], [23.0, -14.0, 92.0, -47.0, -21.0]], [[6.0, -5.0, -34.0, 46.0, 
+-37.0], [-2.0, -7.0, 32.0, 17.0, 26.0], [-30.0, 42.0, 59.0, -10.0, -15.0], [-17.0, 47.0, -55.0, 39.0, -37.0]]], [[[38.0, -39.0, 
+65.0, 43.0, -79.0], [31.0, 12.0, 83.0, -22.0, -2.0], [20.0, 0.0, 47.0, -53.0, 104.0], [1.0, -2.0, 33.0, 14.0, -75.0]], 
+[[-108.0, 30.0, 8.0, 26.0, 62.0], [-12.0, 0.0, 44.0, 1.0, 30.0], [-29.0, -14.0, -6.0, 105.0, -5.0], [35.0, 12.0, -73.0, 44.0, 
+-82.0]], [[0.0, 16.0, -32.0, 43.0, -38.0], [-5.0, -34.0, 26.0, 24.0, 27.0], [-65.0, 77.0, 62.0, -38.0, 0.0], [-24.0, 60.0, 
+12.0, -3.0, -27.0]], [[55.0, -44.0, 27.0, 35.0, -102.0], [-17.0, 34.0, 62.0, -23.0, -16.0], [76.0, -37.0, -19.0, -46.0, 85.0], 
+[-1.0, -66.0, 75.0, 7.0, -5.0]], [[-15.0, 12.0, 5.0, 11.0, -6.0], [7.0, -22.0, 14.0, 11.0, 6.0], [-42.0, 39.0, 31.0, -18.0, 
+15.0], [-3.0, 34.0, 17.0, -13.0, -25.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_array_rank2(self):
-      arg0=Data(numpy.array([[[[-6.0, -7.0, 6.0], [1.0, 5.0, 6.0]], [[0.0, -3.0, 4.0], [0.0, 1.0, 1.0]], [[3.0, 7.0, -6.0], 
-[-7.0, -4.0, -5.0]], [[-1.0, -4.0, 7.0], [5.0, -3.0, -5.0]], [[-1.0, -4.0, 0.0], [-5.0, 2.0, -4.0]]], [[[2.0, 4.0, 1.0], [0.0, 
--1.0, -2.0]], [[2.0, -1.0, 1.0], [7.0, 6.0, 5.0]], [[3.0, 6.0, 6.0], [0.0, -5.0, -3.0]], [[3.0, -1.0, 4.0], [-7.0, 0.0, 4.0]], 
-[[0.0, 0.0, -1.0], [7.0, 6.0, 2.0]]], [[[1.0, 4.0, -3.0], [0.0, -3.0, 2.0]], [[3.0, -6.0, 5.0], [7.0, -1.0, 1.0]], [[-3.0, 
--3.0, 0.0], [-1.0, 0.0, 0.0]], [[-2.0, 1.0, 6.0], [6.0, 7.0, 0.0]], [[2.0, 5.0, 7.0], [-3.0, -3.0, 3.0]]], [[[4.0, -5.0, 0.0], 
-[-1.0, 1.0, 4.0]], [[1.0, 5.0, -6.0], [-4.0, 2.0, -3.0]], [[-3.0, -1.0, 0.0], [-2.0, 0.0, 1.0]], [[-6.0, 2.0, 4.0], [0.0, -6.0, 
-0.0]], [[-1.0, 1.0, -6.0], [7.0, 7.0, -1.0]]]]),self.functionspace)
-      arg1=numpy.array([[-5.0, -1.0, -7.0], [1.0, -5.0, -7.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[-71.0, -37.0, 68.0, 15.0, 22.0], [-2.0, -74.0, -17.0, -77.0, -30.0], [13.0, -39.0, 17.0, -62.0, 
--73.0], [-49.0, 39.0, 7.0, 30.0, 25.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[4.0, -2.0], [-6.0, 0.0]], [[0.0, 1.0], [3.0, 4.0]], [[2.0, 1.0], [6.0, -6.0]], [[5.0, 0.0], 
+[-4.0, 2.0]], [[-2.0, -4.0], [-4.0, -7.0]], [[-5.0, 5.0], [6.0, -3.0]]]),self.functionspace)
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,-6.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, -0.0], [-0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], 
+[-0.0, 0.0]], [[-0.0, -0.0], [-0.0, -0.0]], [[-0.0, 0.0], [0.0, -0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-24.0, 12.0], [36.0, -0.0]], [[-0.0, -6.0], [-18.0, -24.0]], [[-12.0, -6.0], [-36.0, 
+36.0]], [[-30.0, -0.0], [24.0, -12.0]], [[12.0, 24.0], [24.0, 42.0]], [[30.0, -30.0], [-36.0, 18.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_array_rank3(self):
-      arg0=Data(numpy.array([[[[0.0, -5.0, 0.0], [-5.0, -1.0, 5.0]], [[-7.0, -5.0, 1.0], [-6.0, 3.0, -6.0]], [[7.0, -3.0, 0.0], 
-[-6.0, 1.0, -4.0]], [[5.0, 0.0, 0.0], [5.0, 1.0, 7.0]], [[-2.0, -4.0, 1.0], [0.0, 2.0, -4.0]]], [[[2.0, 1.0, 7.0], [-6.0, 0.0, 
-6.0]], [[-4.0, 7.0, 3.0], [-7.0, 5.0, 6.0]], [[6.0, 0.0, -5.0], [0.0, -1.0, 0.0]], [[-6.0, 7.0, -6.0], [4.0, -5.0, -3.0]], 
-[[0.0, 0.0, -2.0], [0.0, -1.0, 6.0]]], [[[-6.0, 0.0, -5.0], [-3.0, -1.0, 5.0]], [[-7.0, -4.0, -5.0], [0.0, -2.0, -3.0]], [[1.0, 
-3.0, 2.0], [0.0, 3.0, 1.0]], [[3.0, 6.0, 0.0], [1.0, 6.0, 3.0]], [[-4.0, -4.0, -6.0], [6.0, 2.0, -5.0]]], [[[-6.0, 6.0, -5.0], 
-[5.0, -2.0, -7.0]], [[-1.0, -4.0, 1.0], [0.0, -5.0, 0.0]], [[-5.0, -6.0, -5.0], [-6.0, 5.0, -3.0]], [[0.0, -3.0, -5.0], [7.0, 
-5.0, -7.0]], [[-4.0, 5.0, 6.0], [4.0, 4.0, 2.0]]]]),self.functionspace)
-      arg1=numpy.array([[[1.0, 7.0, 1.0], [0.0, -1.0, 2.0]], [[4.0, -6.0, -3.0], [-7.0, 3.0, -7.0]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[[-24.0, 27.0], [-56.0, 92.0], [-23.0, 119.0], [18.0, -61.0], [-39.0, 47.0]], [[28.0, -19.0], 
-[55.0, -45.0], [2.0, 36.0], [36.0, -70.0], [11.0, -39.0]], [[0.0, -26.0], [-44.0, 26.0], [23.0, -18.0], [45.0, -34.0], [-50.0, 
-25.0]], [[19.0, -37.0], [-23.0, 2.0], [-63.0, 109.0], [-45.0, 48.0], [37.0, -94.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[7.0, 5.0], [-1.0, 0.0]], [[-6.0, 3.0], [0.0, -5.0]], [[3.0, -6.0], [-4.0, 5.0]], [[-2.0, -6.0], 
+[2.0, -1.0]], [[-2.0, 3.0], [5.0, 3.0]], [[7.0, 2.0], [-7.0, -4.0]]], [[[-4.0, 0.0], [-4.0, 7.0]], [[7.0, -6.0], [-6.0, -4.0]], 
+[[-2.0, -7.0], [2.0, -1.0]], [[0.0, 4.0], [-4.0, 4.0]], [[-5.0, 5.0], [-6.0, 0.0]], [[2.0, -3.0], [0.0, 3.0]]], [[[2.0, -1.0], 
+[4.0, -2.0]], [[1.0, -6.0], [-7.0, -2.0]], [[2.0, 6.0], [2.0, 7.0]], [[-3.0, -3.0], [-7.0, 2.0]], [[0.0, 6.0], [-1.0, -1.0]], 
+[[-6.0, 1.0], [1.0, -7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([-5.0, -2.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-7.0, -3.0, 0.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-15.0, -31.0], [37.0, -26.0]], [[22.0, -39.0], [-30.0, 21.0]], [[1.0, 80.0], [28.0, 19.0]], 
+[[-8.0, 4.0], [-44.0, 9.0]], [[20.0, 11.0], [-19.0, -21.0]], [[-75.0, 2.0], [41.0, -28.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-37.0, -35.0], [19.0, -21.0]], [[21.0, -3.0], [18.0, 47.0]], [[-15.0, 63.0], [22.0, 
+-32.0]], [[14.0, 30.0], [-2.0, -5.0]], [[29.0, -36.0], [-17.0, -21.0]], [[-55.0, -5.0], [49.0, 19.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_array_rank4(self):
-      arg0=Data(numpy.array([[[[-6.0, 2.0, 0.0], [-5.0, -1.0, 5.0]], [[7.0, 7.0, 4.0], [0.0, 6.0, 6.0]], [[2.0, 4.0, -1.0], 
-[-6.0, 0.0, -3.0]], [[-1.0, -2.0, 3.0], [1.0, 6.0, -1.0]], [[6.0, 0.0, -5.0], [-5.0, -4.0, 1.0]]], [[[5.0, 7.0, 7.0], [5.0, 
--5.0, -7.0]], [[3.0, 3.0, 5.0], [-3.0, -5.0, -4.0]], [[6.0, 0.0, 0.0], [-3.0, 3.0, 7.0]], [[7.0, -4.0, -7.0], [-1.0, 0.0, 
-2.0]], [[2.0, 0.0, -3.0], [4.0, 0.0, 5.0]]], [[[6.0, 2.0, -1.0], [-2.0, 7.0, 4.0]], [[3.0, 0.0, -5.0], [-6.0, -3.0, 1.0]], 
-[[-1.0, -6.0, -2.0], [-3.0, 2.0, -6.0]], [[-7.0, -2.0, -6.0], [-1.0, 3.0, 0.0]], [[6.0, -2.0, -2.0], [4.0, -1.0, -2.0]]], 
-[[[-2.0, -5.0, -6.0], [-7.0, 7.0, -5.0]], [[5.0, -5.0, 1.0], [-2.0, -4.0, 3.0]], [[2.0, -1.0, -4.0], [0.0, -2.0, -4.0]], [[0.0, 
-2.0, 4.0], [-6.0, -3.0, 6.0]], [[4.0, -4.0, 5.0], [7.0, 3.0, -3.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[-2.0, -4.0, 4.0], [7.0, 4.0, 3.0]], [[0.0, -6.0, 2.0], [-2.0, 0.0, -2.0]], [[3.0, 1.0, -4.0], [4.0, 
--3.0, -6.0]], [[-4.0, -5.0, 3.0], [5.0, -5.0, 5.0]], [[0.0, 0.0, 0.0], [-2.0, 4.0, -5.0]]], [[[2.0, -1.0, 6.0], [-6.0, -4.0, 
--1.0]], [[-5.0, 4.0, 3.0], [-6.0, -4.0, 4.0]], [[-6.0, 0.0, 4.0], [-5.0, 2.0, 2.0]], [[1.0, 0.0, 6.0], [-1.0, 1.0, -3.0]], 
-[[-5.0, 6.0, -3.0], [5.0, 1.0, 5.0]]], [[[7.0, 0.0, 2.0], [3.0, 6.0, -4.0]], [[4.0, 0.0, -3.0], [3.0, 0.0, -5.0]], [[-1.0, 
--7.0, -3.0], [1.0, -5.0, 1.0]], [[5.0, 4.0, 0.0], [3.0, -6.0, -2.0]], [[0.0, -1.0, 6.0], [0.0, 3.0, 4.0]]], [[[4.0, 4.0, -5.0], 
-[-3.0, 2.0, -6.0]], [[-2.0, 1.0, 3.0], [-7.0, -7.0, 4.0]], [[-5.0, 7.0, -4.0], [-2.0, -5.0, 0.0]], [[7.0, -4.0, -2.0], [-2.0, 
-5.0, -1.0]], [[-4.0, 5.0, 0.0], [-3.0, 5.0, -3.0]]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-20.0, -12.0, -63.0, 19.0, -19.0], [15.0, 92.0, 69.0, -17.0, 41.0], [-83.0, -64.0, -3.0, -41.0, 
-15.0], [-33.0, 76.0, 59.0, -50.0, 29.0]], [[16.0, -46.0, -42.0, -51.0, -6.0], [1.0, 5.0, -2.0, 19.0, 31.0], [69.0, -14.0, 
--92.0, 15.0, 59.0], [12.0, -13.0, -32.0, 37.0, 19.0]], [[-75.0, -8.0, 8.0, -76.0, 27.0], [33.0, 27.0, 8.0, 11.0, -28.0], [6.0, 
-8.0, -36.0, 14.0, -22.0], [65.0, 27.0, 34.0, 15.0, 39.0]], [[50.0, 18.0, -25.0, -7.0, 27.0], [-11.0, -28.0, 23.0, 25.0, -10.0], 
-[42.0, -5.0, -24.0, -44.0, 34.0], [-12.0, -44.0, -53.0, 24.0, 24.0]], [[-80.0, -2.0, 24.0, -39.0, -11.0], [27.0, 5.0, -37.0, 
--26.0, -39.0], [-11.0, 19.0, 25.0, 37.0, -38.0], [50.0, 40.0, 20.0, 41.0, -32.0]]], [[[-16.0, -24.0, 71.0, -19.0, 5.0], [42.0, 
--14.0, -51.0, 58.0, -19.0], [62.0, 49.0, -52.0, 112.0, -8.0], [30.0, -10.0, 11.0, -35.0, -4.0]], [[-51.0, 6.0, 19.0, -22.0, 
-6.0], [75.0, 34.0, -1.0, 43.0, -52.0], [8.0, 8.0, -21.0, 56.0, -4.0], [22.0, 52.0, 17.0, -16.0, -1.0]], [[0.0, -8.0, -45.0, 
--19.0, -17.0], [11.0, 4.0, -1.0, -9.0, -7.0], [23.0, -20.0, -17.0, -11.0, 37.0], [-3.0, 16.0, -39.0, 56.0, -21.0]], [[-27.0, 
-8.0, 29.0, -24.0, -8.0], [-20.0, -58.0, -61.0, -40.0, -33.0], [24.0, 36.0, 43.0, 12.0, -30.0], [38.0, -24.0, -33.0, 79.0, 
--51.0]], [[27.0, -24.0, 4.0, 28.0, -33.0], [-43.0, -23.0, -34.0, -35.0, 44.0], [0.0, 4.0, 16.0, 12.0, 2.0], [-19.0, -21.0, 
--6.0, 7.0, -35.0]]], [[[2.0, -18.0, -29.0, -62.0, 12.0], [-16.0, -25.0, -8.0, -3.0, 2.0], [60.0, 1.0, -50.0, -18.0, 29.0], 
-[33.0, -32.0, -43.0, 71.0, 15.0]], [[-77.0, 0.0, 8.0, -37.0, -5.0], [23.0, 22.0, -12.0, -27.0, -28.0], [-29.0, 4.0, 22.0, 13.0, 
--35.0], [43.0, 46.0, 32.0, 27.0, -12.0]], [[-13.0, 50.0, 17.0, -27.0, 44.0], [8.0, -39.0, 5.0, 10.0, -68.0], [16.0, 23.0, 30.0, 
--38.0, -24.0], [31.0, -27.0, -33.0, 43.0, 11.0]], [[3.0, 2.0, -12.0, 0.0, 14.0], [-54.0, 3.0, 29.0, -39.0, 39.0], [-46.0, 
--13.0, 23.0, -64.0, -25.0], [3.0, -20.0, 32.0, -12.0, 36.0]], [[6.0, 4.0, 55.0, -5.0, -2.0], [-16.0, -72.0, -70.0, -5.0, 
--27.0], [52.0, 52.0, 21.0, 44.0, -21.0], [24.0, -49.0, -39.0, 43.0, -45.0]]], [[[-36.0, 42.0, -6.0, -80.0, 67.0], [-16.0, 
--34.0, 27.0, -9.0, -55.0], [15.0, 14.0, 8.0, -83.0, -30.0], [67.0, -39.0, -22.0, 72.0, 54.0]], [[-7.0, 30.0, -8.0, 33.0, 
--27.0], [46.0, -2.0, -18.0, 0.0, -57.0], [-5.0, -4.0, 48.0, 17.0, 11.0], [-25.0, 42.0, -40.0, 34.0, -68.0]], [[-36.0, 6.0, 
-51.0, -25.0, 12.0], [-7.0, -34.0, -40.0, -12.0, -26.0], [10.0, 40.0, 23.0, 26.0, -45.0], [44.0, -19.0, 9.0, 20.0, -11.0]], 
-[[-28.0, -4.0, -65.0, 17.0, -30.0], [64.0, 92.0, 52.0, 9.0, -3.0], [-52.0, -60.0, -11.0, -4.0, 37.0], [-36.0, 101.0, 25.0, 
--25.0, -5.0]], [[80.0, 26.0, 25.0, 24.0, 13.0], [-9.0, -87.0, -39.0, 39.0, -36.0], [89.0, 37.0, -2.0, 13.0, 31.0], [-22.0, 
--79.0, -97.0, 38.0, -33.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[5.0, 2.0], [6.0, -6.0]], [[-7.0, -5.0], [4.0, 7.0]], [[6.0, 3.0], [-1.0, 3.0]], [[-5.0, -2.0], 
+[-1.0, 1.0]], [[3.0, 1.0], [0.0, -5.0]], [[0.0, 3.0], [6.0, -7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-5.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, 5.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-25.0, -30.0], [-10.0, -12.0]], [[-30.0, -36.0], [30.0, 36.0]]], [[[35.0, 42.0], [25.0, 30.0]], 
+[[-20.0, -24.0], [-35.0, -42.0]]], [[[-30.0, -36.0], [-15.0, -18.0]], [[5.0, 6.0], [-15.0, -18.0]]], [[[25.0, 30.0], [10.0, 
+12.0]], [[5.0, 6.0], [-5.0, -6.0]]], [[[-15.0, -18.0], [-5.0, -6.0]], [[0.0, 0.0], [25.0, 30.0]]], [[[0.0, 0.0], [-15.0, 
+-18.0]], [[-30.0, -36.0], [35.0, 42.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[35.0, 25.0], [14.0, 10.0]], [[42.0, 30.0], [-42.0, -30.0]]], [[[-49.0, -35.0], 
+[-35.0, -25.0]], [[28.0, 20.0], [49.0, 35.0]]], [[[42.0, 30.0], [21.0, 15.0]], [[-7.0, -5.0], [21.0, 15.0]]], [[[-35.0, -25.0], 
+[-14.0, -10.0]], [[-7.0, -5.0], [7.0, 5.0]]], [[[21.0, 15.0], [7.0, 5.0]], [[0.0, 0.0], [-35.0, -25.0]]], [[[0.0, 0.0], [21.0, 
+15.0]], [[42.0, 30.0], [-49.0, -35.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_constData_rank2(self):
-      arg0=Data(numpy.array([[[[1.0, 4.0, 1.0], [-3.0, -3.0, 6.0]], [[-2.0, 6.0, 1.0], [-1.0, -1.0, 0.0]], [[-7.0, -6.0, 6.0], 
-[-1.0, 2.0, -7.0]], [[5.0, 3.0, 0.0], [1.0, 3.0, -4.0]], [[6.0, -3.0, -5.0], [3.0, -1.0, -3.0]]], [[[-1.0, 5.0, 5.0], [5.0, 
-2.0, 1.0]], [[0.0, 2.0, 1.0], [1.0, 4.0, 3.0]], [[-6.0, 2.0, 1.0], [-3.0, -4.0, -3.0]], [[3.0, -7.0, 0.0], [4.0, 7.0, -4.0]], 
-[[-1.0, 3.0, -2.0], [7.0, -5.0, 2.0]]], [[[5.0, -1.0, -5.0], [4.0, 6.0, 0.0]], [[-1.0, -2.0, -6.0], [1.0, 0.0, 0.0]], [[-6.0, 
--3.0, 4.0], [0.0, 0.0, 2.0]], [[-7.0, -5.0, 5.0], [6.0, -7.0, 0.0]], [[-5.0, 0.0, 4.0], [-4.0, -1.0, -3.0]]], [[[3.0, -2.0, 
-1.0], [-1.0, -7.0, 7.0]], [[-6.0, 4.0, 6.0], [-6.0, 0.0, 4.0]], [[4.0, 0.0, 3.0], [6.0, 7.0, -1.0]], [[-5.0, 0.0, 3.0], [4.0, 
--3.0, 1.0]], [[6.0, -1.0, 5.0], [-7.0, 5.0, 3.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[3.0, 6.0, 6.0], [-5.0, 3.0, -1.0]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[33.0, 38.0, -3.0, 41.0, -45.0], [37.0, 22.0, 6.0, -28.0, -49.0], [-23.0, -56.0, -14.0, -72.0, 
-29.0], [-20.0, 68.0, 22.0, -27.0, 89.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[1.0, 3.0], [-7.0, 5.0]], [[2.0, 0.0], [-6.0, -1.0]], [[-1.0, -6.0], [1.0, 3.0]], [[3.0, 4.0], 
+[3.0, -2.0]], [[0.0, 7.0], [-6.0, 2.0]], [[-5.0, 0.0], [-4.0, -5.0]]], [[[3.0, -7.0], [-3.0, 4.0]], [[-5.0, 0.0], [-4.0, 4.0]], 
+[[4.0, -2.0], [5.0, 6.0]], [[5.0, 4.0], [-4.0, 0.0]], [[5.0, 6.0], [1.0, -3.0]], [[-2.0, 7.0], [-5.0, 2.0]]], [[[1.0, 0.0], 
+[0.0, -3.0]], [[5.0, -5.0], [-3.0, 5.0]], [[-3.0, -3.0], [0.0, 7.0]], [[-4.0, 0.0], [0.0, 0.0]], [[3.0, -2.0], [7.0, 1.0]], 
+[[4.0, -2.0], [4.0, 1.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[-7.0, 5.0], [-4.0, -1.0], [-5.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, -3.0], [-3.0, -7.0], [0.0, -7.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-24.0, 4.0], [7.0, 22.0]], [[61.0, -32.0], [-36.0, 15.0]]], [[[-19.0, 25.0], [25.0, -10.0]], 
+[[73.0, -32.0], [-34.0, 1.0]]], [[[6.0, -15.0], [65.0, -34.0]], [[-27.0, 0.0], [-80.0, 23.0]]], [[[-21.0, 2.0], [-44.0, 16.0]], 
+[[-5.0, 19.0], [14.0, -10.0]]], [[[-35.0, 1.0], [-63.0, 25.0]], [[3.0, -17.0], [-7.0, 15.0]]], [[[23.0, -15.0], [-18.0, 
+-11.0]], [[28.0, -7.0], [22.0, -25.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-5.0, -31.0], [33.0, 40.0]], [[-19.0, 42.0], [8.0, -22.0]]], [[[23.0, -6.0], [0.0, 
+35.0]], [[-12.0, 67.0], [-16.0, -60.0]]], [[[-16.0, -4.0], [-18.0, 53.0]], [[-11.0, -38.0], [-6.0, -100.0]]], [[[-3.0, -16.0], 
+[4.0, -40.0]], [[24.0, 19.0], [-8.0, 6.0]]], [[[-15.0, -56.0], [10.0, -49.0]], [[-27.0, -38.0], [17.0, 8.0]]], [[[-14.0, 1.0], 
+[-21.0, -35.0]], [[-1.0, 19.0], [-26.0, -6.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_constData_rank3(self):
-      arg0=Data(numpy.array([[[[-7.0, -5.0, -3.0], [-5.0, 3.0, -5.0]], [[7.0, 6.0, 1.0], [-3.0, 3.0, -5.0]], [[2.0, -6.0, 5.0], 
-[-1.0, 1.0, -2.0]], [[5.0, -7.0, -1.0], [2.0, -4.0, 1.0]], [[-5.0, -1.0, 7.0], [2.0, 7.0, -5.0]]], [[[-5.0, 4.0, 0.0], [4.0, 
-4.0, 7.0]], [[0.0, 1.0, -5.0], [0.0, 4.0, -7.0]], [[7.0, 6.0, -2.0], [-1.0, 0.0, 6.0]], [[1.0, -6.0, -4.0], [-1.0, 3.0, -7.0]], 
-[[-1.0, -2.0, -5.0], [-6.0, -2.0, 1.0]]], [[[7.0, 0.0, -5.0], [5.0, 0.0, 0.0]], [[0.0, -6.0, -7.0], [0.0, -2.0, 2.0]], [[-5.0, 
-0.0, -3.0], [-2.0, 6.0, 6.0]], [[2.0, 1.0, -3.0], [-6.0, 5.0, 3.0]], [[0.0, 0.0, -1.0], [-3.0, 7.0, -7.0]]], [[[-4.0, 6.0, 
-7.0], [-7.0, 0.0, 7.0]], [[0.0, 2.0, -2.0], [7.0, 6.0, -5.0]], [[0.0, -4.0, -5.0], [7.0, 4.0, 0.0]], [[5.0, 2.0, 7.0], [-1.0, 
--2.0, -7.0]], [[7.0, 4.0, -6.0], [3.0, 6.0, 3.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-3.0, -7.0, 2.0], [1.0, 4.0, 3.0]], [[-5.0, -1.0, 0.0], [5.0, 2.0, 3.0]]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[[42.0, 6.0], [-67.0, -65.0], [43.0, -13.0], [21.0, -13.0], [51.0, 35.0]], [[28.0, 70.0], [-22.0, 
--14.0], [-50.0, -28.0], [21.0, -19.0], [-4.0, -24.0]], [[-26.0, -10.0], [26.0, 8.0], [49.0, 45.0], [4.0, -22.0], [2.0, -22.0]], 
-[[-2.0, 0.0], [-2.0, 30.0], [41.0, 47.0], [-45.0, -57.0], [-25.0, -3.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_constData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[5.0, -2.0, 0.0, 4.0], [-7.0, -3.0, 0.0, -5.0], [-7.0, -5.0, -4.0, -4.0]], [[-3.0, -1.0, 6.0, 
+6.0], [-3.0, 1.0, -2.0, -5.0], [-3.0, 6.0, -3.0, 0.0]]], [[[7.0, -3.0, -6.0, 2.0], [0.0, -4.0, 0.0, -4.0], [-4.0, -2.0, 2.0, 
+6.0]], [[3.0, 5.0, -5.0, 2.0], [7.0, 0.0, -6.0, 1.0], [1.0, -6.0, 1.0, -1.0]]], [[[-3.0, 0.0, -5.0, 0.0], [-4.0, 3.0, 4.0, 
+4.0], [-3.0, 1.0, 7.0, -6.0]], [[4.0, -6.0, -6.0, 2.0], [-1.0, 0.0, -5.0, 5.0], [7.0, 7.0, 3.0, -4.0]]]]),self.functionspace)
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, -0.0]], [[-0.0, -0.0, 0.0, 
+0.0], [-0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 
+0.0]], [[0.0, 0.0, -0.0, 0.0], [0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, -0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 
+0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[15.0, -6.0, 0.0, 12.0], [-21.0, -9.0, 0.0, -15.0], [-21.0, -15.0, -12.0, -12.0]], 
+[[-9.0, -3.0, 18.0, 18.0], [-9.0, 3.0, -6.0, -15.0], [-9.0, 18.0, -9.0, 0.0]]], [[[21.0, -9.0, -18.0, 6.0], [0.0, -12.0, 0.0, 
+-12.0], [-12.0, -6.0, 6.0, 18.0]], [[9.0, 15.0, -15.0, 6.0], [21.0, 0.0, -18.0, 3.0], [3.0, -18.0, 3.0, -3.0]]], [[[-9.0, 0.0, 
+-15.0, 0.0], [-12.0, 9.0, 12.0, 12.0], [-9.0, 3.0, 21.0, -18.0]], [[12.0, -18.0, -18.0, 6.0], [-3.0, 0.0, -15.0, 15.0], [21.0, 
+21.0, 9.0, -12.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_constData_rank4(self):
-      arg0=Data(numpy.array([[[[-2.0, 0.0, -2.0], [-5.0, 3.0, -2.0]], [[4.0, 2.0, 0.0], [-7.0, -2.0, -7.0]], [[-7.0, 0.0, 
--2.0], [2.0, -4.0, 1.0]], [[2.0, -3.0, -7.0], [-1.0, -4.0, -3.0]], [[-3.0, 5.0, 2.0], [7.0, 0.0, 7.0]]], [[[-4.0, 4.0, 0.0], 
-[-5.0, 4.0, 7.0]], [[-5.0, 7.0, -7.0], [-2.0, -4.0, -5.0]], [[-6.0, -3.0, 0.0], [7.0, -1.0, -6.0]], [[3.0, -7.0, 4.0], [-1.0, 
-2.0, -3.0]], [[4.0, -2.0, -2.0], [0.0, -1.0, 0.0]]], [[[-7.0, -6.0, 0.0], [-1.0, 1.0, 0.0]], [[7.0, -2.0, -6.0], [-3.0, 3.0, 
-0.0]], [[3.0, 6.0, 2.0], [7.0, -3.0, 4.0]], [[-2.0, 7.0, -4.0], [-4.0, -5.0, -4.0]], [[-1.0, 1.0, 5.0], [-7.0, 2.0, -7.0]]], 
-[[[1.0, -2.0, 6.0], [-1.0, 5.0, -4.0]], [[0.0, 0.0, -5.0], [-5.0, -7.0, 5.0]], [[0.0, -5.0, 7.0], [3.0, 7.0, 2.0]], [[3.0, 7.0, 
-6.0], [-3.0, -5.0, 0.0]], [[7.0, -3.0, -7.0], [-3.0, 0.0, -4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[2.0, -6.0, -3.0], [7.0, 0.0, 4.0]], [[4.0, -5.0, 3.0], [-1.0, -1.0, 0.0]], [[-7.0, 1.0, 0.0], 
-[4.0, 0.0, 6.0]], [[-3.0, -3.0, -4.0], [-6.0, 4.0, 0.0]], [[6.0, 1.0, -7.0], [-6.0, -1.0, 6.0]]], [[[6.0, 2.0, 7.0], [5.0, 1.0, 
-1.0]], [[4.0, 3.0, 4.0], [3.0, 5.0, -1.0]], [[-3.0, 3.0, -5.0], [-7.0, -4.0, 6.0]], [[-2.0, 7.0, 3.0], [4.0, 5.0, -7.0]], 
-[[-6.0, 0.0, -4.0], [-5.0, 2.0, 6.0]]], [[[3.0, 4.0, 5.0], [-4.0, -7.0, -7.0]], [[-3.0, -1.0, -5.0], [0.0, -6.0, 4.0]], [[-3.0, 
-3.0, 0.0], [-4.0, 4.0, 1.0]], [[4.0, 2.0, -4.0], [-7.0, -6.0, 4.0]], [[-6.0, 0.0, 0.0], [7.0, -5.0, 1.0]]], [[[0.0, 5.0, -7.0], 
-[3.0, 5.0, -7.0]], [[4.0, 3.0, -6.0], [-5.0, 0.0, 2.0]], [[-5.0, 6.0, -4.0], [-4.0, 0.0, 7.0]], [[-3.0, -4.0, 4.0], [0.0, 6.0, 
-2.0]], [[3.0, 6.0, -5.0], [6.0, 1.0, 0.0]]]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      ref=Data(numpy.array([[[[-41.0, -12.0, -18.0, 56.0, 17.0], [-50.0, -14.0, 27.0, 7.0, 39.0], [-3.0, -10.0, 36.0, 9.0, 
--40.0], [28.0, 25.0, 24.0, 12.0, -23.0]], [[-81.0, 15.0, -96.0, 16.0, 28.0], [-16.0, -2.0, 9.0, 17.0, -35.0], [111.0, -30.0, 
-7.0, 53.0, -70.0], [28.0, 43.0, -29.0, -46.0, -20.0]], [[10.0, -32.0, 63.0, 1.0, -30.0], [-49.0, -51.0, 39.0, -11.0, 38.0], 
-[-18.0, 59.0, -2.0, -6.0, 77.0], [-7.0, -24.0, 42.0, -9.0, -3.0]], [[24.0, 7.0, -39.0, 21.0, 50.0], [-55.0, -49.0, 25.0, -49.0, 
--5.0], [12.0, 44.0, -30.0, 49.0, -2.0], [32.0, 40.0, -17.0, -52.0, 13.0]], [[35.0, -38.0, 96.0, -56.0, -27.0], [48.0, 25.0, 
-7.0, 26.0, 17.0], [-56.0, 22.0, 3.0, -31.0, 74.0], [-17.0, -30.0, 58.0, 11.0, 53.0]]], [[[-39.0, -35.0, 54.0, 46.0, 48.0], 
-[-30.0, -6.0, 85.0, -13.0, 99.0], [-53.0, 12.0, 67.0, 31.0, -24.0], [-24.0, 35.0, 113.0, 34.0, -14.0]], [[-65.0, -70.0, 4.0, 
-18.0, 12.0], [-84.0, -48.0, 71.0, 45.0, 30.0], [49.0, 47.0, 23.0, 40.0, 31.0], [93.0, 43.0, 68.0, -75.0, 46.0]], [[31.0, -15.0, 
-31.0, -19.0, -116.0], [-14.0, -11.0, -72.0, 56.0, -37.0], [-9.0, 3.0, -29.0, -97.0, 84.0], [43.0, -80.0, -58.0, 12.0, 5.0]], 
-[[17.0, 58.0, -50.0, 10.0, -31.0], [26.0, 17.0, -69.0, -16.0, -43.0], [12.0, -46.0, -21.0, -35.0, -38.0], [-35.0, -34.0, -90.0, 
-41.0, -57.0]], [[26.0, 21.0, -30.0, -2.0, 37.0], [5.0, -3.0, -4.0, -33.0, -18.0], [1.0, 6.0, -22.0, 26.0, -19.0], [-1.0, 22.0, 
--24.0, -18.0, 9.0]]], [[[15.0, 2.0, 39.0, 49.0, -43.0], [-58.0, -44.0, 6.0, -27.0, 49.0], [-48.0, 21.0, 11.0, -39.0, 30.0], 
-[-28.0, -41.0, 3.0, 51.0, -62.0]], [[23.0, 20.0, -63.0, 39.0, 97.0], [-16.0, 4.0, 12.0, -43.0, 3.0], [-26.0, -7.0, -3.0, 51.0, 
--78.0], [38.0, 73.0, -11.0, -19.0, 24.0]], [[29.0, -16.0, 37.0, -89.0, -5.0], [80.0, 40.0, -14.0, 27.0, -43.0], [8.0, 9.0, 
--27.0, 1.0, 50.0], [-6.0, -9.0, 13.0, -35.0, 74.0]], [[-78.0, -46.0, -19.0, 5.0, 28.0], [-55.0, -36.0, 71.0, 28.0, 14.0], 
-[81.0, 33.0, 19.0, 64.0, 5.0], [54.0, 49.0, 56.0, -76.0, 27.0]], [[-100.0, 11.0, -62.0, 30.0, -42.0], [-9.0, 15.0, -20.0, 55.0, 
--17.0], [89.0, -63.0, 35.0, -13.0, -60.0], [8.0, -10.0, -30.0, 17.0, -62.0]]], [[[-27.0, 28.0, -37.0, 5.0, -61.0], [40.0, 48.0, 
--76.0, 51.0, -39.0], [22.0, -77.0, 11.0, -63.0, -42.0], [-2.0, -41.0, -65.0, 51.0, -40.0]], [[0.0, -3.0, 10.0, 22.0, 102.0], 
-[-62.0, -75.0, 118.0, -105.0, 61.0], [9.0, 87.0, -3.0, 117.0, 5.0], [-50.0, 65.0, 75.0, -52.0, -12.0]], [[38.0, 36.0, 19.0, 
--3.0, -67.0], [63.0, 55.0, -87.0, 19.0, -17.0], [-60.0, -64.0, 3.0, -93.0, -12.0], [-44.0, -68.0, -56.0, 94.0, -40.0]], 
-[[-75.0, 3.0, -26.0, -56.0, 6.0], [54.0, 23.0, 23.0, 24.0, -37.0], [114.0, -16.0, 4.0, 53.0, -14.0], [-41.0, 12.0, 15.0, -43.0, 
--2.0]], [[16.0, 25.0, -88.0, 34.0, 82.0], [-32.0, -14.0, 2.0, -40.0, -23.0], [14.0, 1.0, -22.0, 55.0, -67.0], [53.0, 68.0, 
--41.0, -45.0, 20.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank0_float_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg0.setTaggedValue(1,-5.0)
+      arg1=0.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(0.0,self.functionspace)
+      ref.setTaggedValue(1,-0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_expandedData_rank2(self):
-      arg0=Data(numpy.array([[[[-4.0, -2.0, -1.0], [-1.0, 1.0, -4.0]], [[6.0, -2.0, 4.0], [1.0, 1.0, 0.0]], [[5.0, -1.0, 6.0], 
-[5.0, 1.0, 6.0]], [[4.0, -3.0, -1.0], [-6.0, -5.0, -2.0]], [[7.0, -6.0, -5.0], [4.0, -3.0, 1.0]]], [[[6.0, 3.0, -3.0], [3.0, 
-6.0, 5.0]], [[-4.0, 1.0, 5.0], [7.0, 7.0, 5.0]], [[4.0, 1.0, 1.0], [6.0, 6.0, 6.0]], [[1.0, -4.0, -7.0], [6.0, 3.0, 0.0]], 
-[[-7.0, 0.0, 6.0], [1.0, 3.0, -3.0]]], [[[7.0, 2.0, -5.0], [2.0, -1.0, 4.0]], [[1.0, 1.0, -3.0], [1.0, -3.0, 1.0]], [[-7.0, 
-2.0, -6.0], [3.0, -7.0, -4.0]], [[7.0, 3.0, 7.0], [-1.0, -7.0, 4.0]], [[-5.0, -6.0, -4.0], [0.0, 5.0, 5.0]]], [[[-7.0, -5.0, 
-4.0], [2.0, -2.0, -3.0]], [[2.0, -2.0, -2.0], [4.0, 3.0, 0.0]], [[-6.0, 4.0, -7.0], [-6.0, -4.0, -5.0]], [[5.0, 0.0, -4.0], 
-[5.0, -4.0, 1.0]], [[0.0, -5.0, 3.0], [-1.0, -1.0, -6.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, -1.0, -4.0], [2.0, 6.0, -6.0]])+(1.-msk_arg1)*numpy.array([[6.0, 5.0, 6.0], [-7.0, 7.0, 
-6.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[58.0, -42.0, -73.0, -47.0, -32.0], [-15.0, 29.0, -17.0, 56.0, 56.0], [-50.0, -17.0, 52.0, 
--141.0, 52.0], [41.0, 24.0, 54.0, -34.0, 21.0]])+(1.-msk_ref)*numpy.array([[-50.0, 50.0, 69.0, -2.0, -61.0], [84.0, 41.0, 71.0, 
--77.0, -10.0], [25.0, -29.0, -162.0, 81.0, -19.0], [-89.0, -17.0, -74.0, -51.0, -43.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank0_array_rank0_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=numpy.array(3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-6.0,self.functionspace)
+      ref.setTaggedValue(1,21.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_expandedData_rank3(self):
-      arg0=Data(numpy.array([[[[-4.0, 5.0, 7.0], [-2.0, -5.0, 4.0]], [[-3.0, -1.0, -3.0], [-6.0, 3.0, 6.0]], [[3.0, -3.0, 3.0], 
-[-2.0, -1.0, -6.0]], [[3.0, -6.0, -1.0], [0.0, -7.0, 1.0]], [[1.0, 6.0, -3.0], [-4.0, 0.0, -7.0]]], [[[-1.0, 5.0, 3.0], [-7.0, 
--7.0, -5.0]], [[-6.0, 3.0, -4.0], [-6.0, 1.0, -3.0]], [[-4.0, 3.0, 1.0], [5.0, -4.0, -7.0]], [[4.0, 4.0, 1.0], [4.0, 0.0, 
-7.0]], [[5.0, -2.0, 4.0], [4.0, 4.0, 4.0]]], [[[7.0, 0.0, -6.0], [0.0, 5.0, 6.0]], [[-7.0, 7.0, 1.0], [-6.0, 0.0, -5.0]], 
-[[-4.0, 4.0, -1.0], [-3.0, -5.0, -6.0]], [[-5.0, 3.0, -2.0], [0.0, 6.0, 7.0]], [[-3.0, -6.0, 7.0], [-6.0, 0.0, -6.0]]], [[[2.0, 
--6.0, 1.0], [-5.0, 1.0, -2.0]], [[-7.0, 3.0, 6.0], [-2.0, 1.0, -1.0]], [[4.0, 6.0, 3.0], [-4.0, -1.0, 6.0]], [[2.0, 3.0, 5.0], 
-[-3.0, -6.0, 7.0]], [[1.0, 6.0, 3.0], [-3.0, 0.0, 2.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, -5.0, -7.0], [-4.0, -3.0, 4.0]], [[7.0, -5.0, 5.0], [7.0, 3.0, 
--6.0]]])+(1.-msk_arg1)*numpy.array([[[4.0, -3.0, 5.0], [7.0, 6.0, 3.0]], [[-6.0, -4.0, -3.0], [-5.0, 1.0, 1.0]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-43.0, -71.0], [59.0, -100.0], [-13.0, 70.0], [68.0, 19.0], [-19.0, -24.0]], [[-19.0, -57.0], 
-[10.0, -98.0], [-66.0, 27.0], [-7.0, -1.0], [-20.0, 81.0]], [[65.0, -2.0], [-52.0, -91.0], [-18.0, -53.0], [-1.0, -84.0], 
-[-25.0, 38.0]], [[36.0, 29.0], [-70.0, -39.0], [0.0, -54.0], [12.0, -57.0], [-29.0, 
--41.0]]])+(1.-msk_ref)*numpy.array([[[-28.0, -8.0], [-30.0, 70.0], [-2.0, -12.0], [-14.0, 3.0], [-78.0, -8.0]], [[-110.0, 0.0], 
-[-98.0, 64.0], [-30.0, -27.0], [58.0, -56.0], [110.0, -46.0]], [[46.0, -13.0], [-101.0, 36.0], [-102.0, 15.0], [18.0, 37.0], 
-[-19.0, 45.0]], [[-4.0, 33.0], [-18.0, 22.0], [-3.0, -32.0], [-12.0, -23.0], [-14.0, -22.0]]])
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank1_offset1(self):
+      arg0=Data(numpy.array([2.0, 3.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, -1.0, 6.0]))
+      arg1=numpy.array([0.0, -6.0, -6.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-12.0,self.functionspace)
+      ref.setTaggedValue(1,-30.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_constData_rank4_expandedData_rank4(self):
-      arg0=Data(numpy.array([[[[-6.0, 6.0, -1.0], [-1.0, 4.0, 4.0]], [[-3.0, -1.0, -6.0], [1.0, -1.0, -4.0]], [[-7.0, -4.0, 
--7.0], [-6.0, 0.0, 0.0]], [[1.0, 3.0, 3.0], [-4.0, 7.0, -5.0]], [[-5.0, 2.0, 0.0], [-1.0, 7.0, -5.0]]], [[[1.0, 0.0, 5.0], 
-[-4.0, 1.0, 3.0]], [[1.0, 1.0, -1.0], [-3.0, -6.0, -1.0]], [[0.0, 6.0, 7.0], [-7.0, -7.0, 3.0]], [[4.0, -1.0, -1.0], [2.0, 5.0, 
-0.0]], [[-6.0, 3.0, 0.0], [-2.0, -1.0, 5.0]]], [[[4.0, 4.0, 2.0], [0.0, 5.0, 0.0]], [[-7.0, -6.0, -7.0], [4.0, 0.0, -4.0]], 
-[[0.0, -3.0, -7.0], [0.0, 6.0, 1.0]], [[0.0, -1.0, 2.0], [-7.0, -7.0, 2.0]], [[3.0, -4.0, 3.0], [-4.0, -1.0, -7.0]]], [[[6.0, 
--5.0, 5.0], [4.0, -6.0, -3.0]], [[-2.0, -2.0, -1.0], [7.0, -1.0, 6.0]], [[-4.0, -4.0, 6.0], [1.0, 6.0, -4.0]], [[5.0, -1.0, 
-5.0], [0.0, -2.0, 4.0]], [[-3.0, -5.0, 1.0], [0.0, -1.0, 0.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-3.0, -6.0, 2.0], [6.0, -1.0, -5.0]], [[-3.0, -4.0, 0.0], [-6.0, -1.0, 7.0]], [[-7.0, 0.0, 
--5.0], [-3.0, 1.0, 0.0]], [[-5.0, 3.0, 0.0], [-3.0, 1.0, -2.0]], [[-5.0, -6.0, 5.0], [-4.0, -6.0, 3.0]]], [[[7.0, -3.0, 0.0], 
-[6.0, 1.0, 7.0]], [[-3.0, 7.0, -3.0], [2.0, -2.0, 5.0]], [[-6.0, 4.0, 1.0], [1.0, 0.0, -4.0]], [[-7.0, 0.0, 4.0], [2.0, -5.0, 
--1.0]], [[0.0, -5.0, 0.0], [-1.0, -6.0, -2.0]]], [[[-3.0, 0.0, -7.0], [6.0, 5.0, -1.0]], [[2.0, 4.0, -5.0], [6.0, 3.0, 4.0]], 
-[[4.0, -5.0, 4.0], [-4.0, 3.0, 0.0]], [[7.0, 5.0, 0.0], [2.0, 0.0, -3.0]], [[-4.0, 1.0, -5.0], [0.0, -3.0, -3.0]]], [[[1.0, 
--4.0, 4.0], [2.0, 0.0, 0.0]], [[-4.0, -3.0, 3.0], [5.0, 2.0, 0.0]], [[-7.0, 5.0, -2.0], [0.0, -2.0, -5.0]], [[-2.0, -4.0, 3.0], 
-[-1.0, 6.0, 4.0]], [[-6.0, 6.0, 7.0], [7.0, -6.0, -7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 3.0, 3.0], [2.0, -7.0, -3.0]], 
-[[6.0, 6.0, 5.0], [4.0, 1.0, -1.0]], [[-7.0, 6.0, 2.0], [-7.0, -6.0, -1.0]], [[4.0, 2.0, 3.0], [4.0, 5.0, 3.0]], [[4.0, -3.0, 
--7.0], [-6.0, -1.0, -6.0]]], [[[-3.0, -2.0, 7.0], [-4.0, -7.0, 0.0]], [[-2.0, 5.0, -7.0], [4.0, 5.0, 0.0]], [[0.0, -6.0, 4.0], 
-[0.0, -6.0, -5.0]], [[2.0, 7.0, 5.0], [-5.0, -4.0, -2.0]], [[6.0, -7.0, 4.0], [4.0, 0.0, 6.0]]], [[[6.0, 3.0, -5.0], [7.0, 2.0, 
-0.0]], [[3.0, 4.0, 4.0], [0.0, 5.0, 0.0]], [[-7.0, 3.0, -1.0], [0.0, -3.0, -6.0]], [[3.0, 7.0, 1.0], [3.0, -4.0, -3.0]], [[3.0, 
-7.0, 2.0], [-7.0, 7.0, -2.0]]], [[[7.0, 5.0, 7.0], [-5.0, 6.0, 5.0]], [[7.0, -3.0, 0.0], [6.0, 5.0, 0.0]], [[-7.0, 5.0, -5.0], 
-[-1.0, -1.0, -6.0]], [[2.0, -2.0, 3.0], [7.0, 5.0, -1.0]], [[-4.0, 0.0, -2.0], [7.0, 1.0, 1.0]]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-50.0, 24.0, 54.0, 47.0, -19.0], [-34.0, 73.0, 42.0, 12.0, -61.0], [35.0, 39.0, -42.0, -26.0, 
-11.0], [-36.0, 6.0, 46.0, 26.0, 6.0]], [[30.0, -20.0, 47.0, 16.0, -19.0], [-41.0, 4.0, 25.0, 8.0, 18.0], [56.0, 7.0, -38.0, 
--12.0, 56.0], [-21.0, 0.0, 50.0, -31.0, 11.0]], [[-5.0, 73.0, 102.0, 41.0, 48.0], [-73.0, 2.0, 13.0, 9.0, 26.0], [34.0, -31.0, 
--12.0, -81.0, 59.0], [-31.0, -11.0, 43.0, 15.0, -73.0]], [[-21.0, -33.0, -3.0, 33.0, -49.0], [-54.0, -38.0, 25.0, -33.0, 
--43.0], [-8.0, -24.0, 38.0, 29.0, -22.0], [-7.0, -10.0, 13.0, 21.0, -2.0]], [[15.0, -29.0, 45.0, 51.0, -40.0], [-75.0, -12.0, 
-57.0, 3.0, -41.0], [49.0, -7.0, -5.0, -12.0, 16.0], [-15.0, 23.0, 56.0, 25.0, 28.0]]], [[[-33.0, 41.0, -19.0, 2.0, 39.0], [5.0, 
--13.0, -17.0, -3.0, -8.0], [-60.0, -32.0, 43.0, -10.0, -41.0], [13.0, -7.0, -34.0, 35.0, -26.0]], [[-18.0, 10.0, 1.0, 3.0, 
-29.0], [-27.0, 8.0, -2.0, 14.0, 36.0], [-43.0, -29.0, -11.0, 9.0, 23.0], [-13.0, -37.0, 17.0, -46.0, 15.0]], [[-72.0, 46.0, 
--21.0, 26.0, 78.0], [-46.0, 36.0, 12.0, 46.0, 13.0], [-129.0, -62.0, 5.0, 7.0, -17.0], [-10.0, -46.0, 15.0, -26.0, 57.0]], 
-[[-1.0, -25.0, -24.0, -24.0, -57.0], [48.0, -22.0, -27.0, -53.0, -27.0], [32.0, 36.0, 24.0, 27.0, -27.0], [8.0, 4.0, -41.0, 
-21.0, -53.0]], [[-36.0, 54.0, 47.0, 34.0, 41.0], [-29.0, 62.0, 26.0, 38.0, -17.0], [-4.0, 5.0, -34.0, -46.0, 15.0], [-22.0, 
-3.0, 34.0, 16.0, 11.0]]], [[[-37.0, -33.0, -33.0, -3.0, -64.0], [21.0, 0.0, -6.0, -45.0, -50.0], [-1.0, 29.0, 19.0, 48.0, 
--37.0], [-4.0, -12.0, -22.0, 12.0, -16.0]], [[87.0, -7.0, 72.0, 13.0, 8.0], [-35.0, -12.0, 31.0, 33.0, 34.0], [98.0, 5.0, 
--42.0, -59.0, 69.0], [-3.0, 45.0, 53.0, -3.0, 13.0]], [[-7.0, 13.0, 41.0, -5.0, -50.0], [22.0, -7.0, -23.0, -59.0, -23.0], 
-[78.0, 45.0, 5.0, -18.0, 11.0], [-16.0, 0.0, -18.0, 31.0, -110.0]], [[-35.0, 67.0, 4.0, 7.0, 92.0], [-32.0, -3.0, -17.0, 27.0, 
-50.0], [-93.0, -69.0, 20.0, -25.0, 4.0], [-2.0, -40.0, -5.0, -17.0, -13.0]], [[33.0, -17.0, -25.0, -2.0, 25.0], [-41.0, -87.0, 
--7.0, -5.0, 44.0], [-52.0, -80.0, 57.0, 14.0, -7.0], [23.0, -13.0, -10.0, -11.0, 6.0]]], [[[67.0, -37.0, -85.0, -57.0, 36.0], 
-[54.0, -63.0, -35.0, 19.0, 63.0], [-56.0, -39.0, 35.0, 34.0, -27.0], [54.0, 14.0, -50.0, -29.0, 54.0]], [[29.0, 15.0, -3.0, 
--30.0, 13.0], [75.0, 41.0, -14.0, 23.0, -3.0], [44.0, 56.0, -33.0, -28.0, -4.0], [16.0, 44.0, -22.0, 20.0, 6.0]], [[68.0, 
--12.0, 1.0, 19.0, 22.0], [-32.0, -64.0, 31.0, 28.0, -9.0], [10.0, -46.0, 42.0, -34.0, -24.0], [38.0, 63.0, 4.0, 61.0, 41.0]], 
-[[-17.0, 19.0, -62.0, -38.0, 30.0], [64.0, -13.0, -45.0, -9.0, 9.0], [-64.0, -9.0, 39.0, 18.0, -52.0], [29.0, -6.0, -66.0, 
-13.0, -17.0]], [[42.0, 30.0, 15.0, -1.0, 56.0], [-7.0, -27.0, -1.0, 30.0, 31.0], [-3.0, -34.0, 14.0, -46.0, 5.0], [21.0, 28.0, 
--4.0, 23.0, 1.0]]]])+(1.-msk_ref)*numpy.array([[[[15.0, -9.0, 55.0, 13.0, -57.0], [-25.0, 65.0, -84.0, 6.0, -62.0], [-12.0, 
-22.0, 25.0, -8.0, 49.0], [30.0, -46.0, 50.0, -18.0, 27.0]], [[21.0, -47.0, 6.0, -45.0, 52.0], [-28.0, 42.0, 8.0, -36.0, -55.0], 
-[14.0, -42.0, 51.0, -3.0, -34.0], [-99.0, -17.0, 70.0, -16.0, 26.0]], [[4.0, -125.0, 53.0, -81.0, 69.0], [4.0, 19.0, -4.0, 
--47.0, -66.0], [-61.0, -65.0, 44.0, -74.0, -21.0], [-88.0, -73.0, 70.0, -69.0, 0.0]], [[-31.0, 35.0, 8.0, 23.0, 21.0], [-21.0, 
-11.0, -23.0, 40.0, -49.0], [-14.0, 62.0, 8.0, 2.0, 117.0], [80.0, 9.0, 20.0, 17.0, -36.0]], [[5.0, -10.0, 17.0, 0.0, 3.0], 
-[-34.0, 51.0, -29.0, -9.0, -78.0], [-17.0, 28.0, 50.0, -17.0, 65.0], [-3.0, -12.0, 69.0, 19.0, 15.0]]], [[[-16.0, 13.0, 22.0, 
-17.0, -26.0], [41.0, -48.0, -1.0, 37.0, 28.0], [-45.0, 28.0, -33.0, -17.0, 42.0], [83.0, -12.0, -47.0, -9.0, -38.0]], [[32.0, 
--10.0, 55.0, -42.0, 38.0], [42.0, -32.0, 31.0, 45.0, -23.0], [-19.0, -27.0, 21.0, 27.0, -11.0], [-21.0, -44.0, 18.0, -53.0, 
--30.0]], [[65.0, 33.0, 138.0, -21.0, -36.0], [114.0, -82.0, 19.0, 134.0, -24.0], [-80.0, 17.0, 14.0, 47.0, 50.0], [87.0, -95.0, 
--9.0, -78.0, -67.0]], [[-65.0, 26.0, -80.0, 44.0, 9.0], [-60.0, 27.0, -28.0, -34.0, 35.0], [50.0, 29.0, -45.0, -10.0, 24.0], 
-[36.0, 68.0, -35.0, 46.0, 5.0]], [[39.0, -32.0, 75.0, -16.0, -50.0], [27.0, 14.0, -37.0, 13.0, -35.0], [-43.0, -11.0, 24.0, 
--14.0, 0.0], [2.0, -68.0, 30.0, -42.0, 14.0]]], [[[-45.0, 63.0, -30.0, 55.0, -15.0], [-41.0, 23.0, -46.0, 26.0, 4.0], [36.0, 
-61.0, -33.0, 22.0, 79.0], [92.0, 41.0, -23.0, 31.0, -15.0]], [[30.0, -93.0, -25.0, -57.0, 39.0], [-32.0, 49.0, 28.0, -103.0, 
--36.0], [3.0, -73.0, 62.0, -46.0, -97.0], [-168.0, -7.0, 74.0, 9.0, 66.0]], [[-75.0, -48.0, -69.0, 6.0, 46.0], [-85.0, 64.0, 
--51.0, -82.0, -1.0], [38.0, -10.0, -26.0, -55.0, 5.0], [-23.0, 39.0, 8.0, 14.0, 21.0]], [[32.0, -33.0, 87.0, -53.0, 26.0], 
-[93.0, -82.0, 46.0, 62.0, -1.0], [-76.0, -31.0, 4.0, -4.0, -7.0], [12.0, -74.0, -13.0, -78.0, -58.0]], [[-4.0, -1.0, 2.0, 
--29.0, 70.0], [43.0, -68.0, 77.0, 31.0, 0.0], [-39.0, 0.0, 9.0, -3.0, 22.0], [1.0, 4.0, -9.0, -3.0, -54.0]]], [[[17.0, 44.0, 
--51.0, 6.0, 4.0], [53.0, -86.0, 101.0, 12.0, 89.0], [12.0, -12.0, -26.0, 33.0, -71.0], [-19.0, 51.0, -72.0, 38.0, -15.0]], 
-[[8.0, -8.0, -49.0, 26.0, -72.0], [-18.0, 24.0, -16.0, -66.0, 62.0], [34.0, -23.0, -24.0, -14.0, -90.0], [-42.0, 29.0, -33.0, 
-35.0, 64.0]], [[6.0, -4.0, -23.0, 16.0, -34.0], [16.0, -20.0, 32.0, -27.0, 8.0], [-47.0, 26.0, 16.0, -43.0, 15.0], [5.0, 20.0, 
--5.0, 59.0, 13.0]], [[-21.0, 43.0, -23.0, 35.0, -34.0], [36.0, -60.0, 18.0, 28.0, 81.0], [-2.0, 21.0, -61.0, 9.0, -4.0], [73.0, 
-28.0, -87.0, 13.0, -28.0]], [[16.0, -44.0, -1.0, -24.0, -3.0], [33.0, -31.0, 40.0, -32.0, 21.0], [-40.0, -30.0, 8.0, -39.0, 
--49.0], [-45.0, -11.0, -8.0, 2.0, 9.0]]]])
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[5.0, -4.0, -6.0], [4.0, 0.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -4.0, 3.0], [-3.0, 0.0, -3.0]]))
+      arg1=numpy.array([[-1.0, 7.0, -2.0], [3.0, 2.0, -7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-51.0,self.functionspace)
+      ref.setTaggedValue(1,-22.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[6.0, -7.0, 5.0], [2.0, 5.0, 5.0], [6.0, -4.0, 5.0], [-2.0, 0.0, 6.0]], [[-6.0, -7.0, -7.0], 
+[2.0, -3.0, -7.0], [-3.0, 3.0, 1.0], [-4.0, -4.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -1.0, -2.0], [5.0, 6.0, -4.0], [-3.0, -7.0, 4.0], [6.0, -4.0, -7.0]], [[0.0, 
+7.0, 6.0], [1.0, -5.0, -1.0], [-3.0, -4.0, -5.0], [-7.0, 4.0, 4.0]]]))
+      arg1=numpy.array([[[3.0, -1.0, 5.0], [-2.0, -1.0, -1.0], [3.0, -7.0, 5.0], [2.0, -4.0, 5.0]], [[-4.0, -7.0, 4.0], [4.0, 
+-5.0, -3.0], [-4.0, 6.0, 5.0], [1.0, 2.0, -1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(238.0,self.functionspace)
+      ref.setTaggedValue(1,-10.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[1.0, 0.0], [5.0, 0.0], [-1.0, -6.0]], [[-7.0, -1.0], [-6.0, 3.0], [1.0, 1.0]]], [[[7.0, -5.0], 
+[-3.0, 5.0], [0.0, 1.0]], [[0.0, 0.0], [0.0, 4.0], [0.0, -5.0]]], [[[2.0, -2.0], [-4.0, -6.0], [-6.0, 3.0]], [[7.0, -6.0], 
+[5.0, 1.0], [0.0, -2.0]]], [[[-1.0, -2.0], [-2.0, -2.0], [-3.0, 2.0]], [[-5.0, -4.0], [-5.0, -5.0], [0.0, 
+-3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, -6.0], [-5.0, -2.0], [4.0, 3.0]], [[0.0, -2.0], [-1.0, 3.0], [-2.0, 0.0]]], 
+[[[1.0, 7.0], [1.0, -6.0], [-4.0, -7.0]], [[-7.0, 4.0], [0.0, -6.0], [1.0, 6.0]]], [[[6.0, -1.0], [6.0, -2.0], [-7.0, 0.0]], 
+[[-7.0, 2.0], [3.0, 6.0], [-5.0, 4.0]]], [[[-2.0, 0.0], [-1.0, -5.0], [-6.0, -6.0]], [[1.0, 4.0], [4.0, -2.0], [-6.0, 7.0]]]]))
+      arg1=numpy.array([[[[-1.0, 6.0], [-1.0, 5.0], [3.0, 1.0]], [[7.0, 0.0], [0.0, 0.0], [-6.0, 2.0]]], [[[-5.0, -2.0], [4.0, 
+4.0], [4.0, 0.0]], [[1.0, 7.0], [5.0, 4.0], [5.0, 4.0]]], [[[-6.0, 5.0], [-1.0, 1.0], [-7.0, -5.0]], [[-2.0, 6.0], [6.0, -6.0], 
+[1.0, 5.0]]], [[[1.0, -3.0], [-6.0, 1.0], [5.0, -6.0]], [[-1.0, -6.0], [6.0, -7.0], [-6.0, 0.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-100.0,self.functionspace)
+      ref.setTaggedValue(1,31.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=tensor_transposed_mult(arg0,arg1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank2_array_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, -6.0, -4.0], [-4.0, -3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[6.0, 6.0, 1.0], [-2.0, 
-3.0, -5.0]])
-      arg1=numpy.array([0.0, 7.0, 4.0])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-58.0, -21.0])+(1.-msk_ref)*numpy.array([46.0, 1.0])
+   def test_generalTransposedTensorProduct_taggedData_rank0_array_rank1_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg0.setTaggedValue(1,3.0)
+      arg1=numpy.array([-7.0, -2.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-7.0, -2.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-21.0, -6.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank2_array_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[2.0, 5.0, 0.0], [-1.0, 5.0, -6.0]])+(1.-msk_arg0)*numpy.array([[5.0, -2.0, -6.0], [0.0, 2.0, 
--6.0]])
-      arg1=numpy.array([[1.0, -2.0, 0.0], [-4.0, 5.0, -2.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-8.0, 17.0], [-11.0, 41.0]])+(1.-msk_ref)*numpy.array([[9.0, -18.0], [-4.0, 22.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank2_offset1(self):
+      arg0=Data(numpy.array([-1.0, 3.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, 0.0, 3.0]))
+      arg1=numpy.array([[0.0, -6.0], [7.0, 0.0], [-3.0, 4.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([3.0, 30.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-9.0, -12.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank2_constData_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 4.0, -3.0], [4.0, -1.0, -6.0]])+(1.-msk_arg0)*numpy.array([[1.0, 7.0, 3.0], [-1.0, -6.0, 
--2.0]])
-      arg1=Data(numpy.array([6.0, 7.0, 6.0]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([40.0, -19.0])+(1.-msk_ref)*numpy.array([73.0, -60.0])
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[0.0, 3.0, 2.0], [6.0, 1.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, 1.0, -7.0], [-1.0, 3.0, 1.0]]))
+      arg1=numpy.array([[[-2.0, 2.0], [6.0, 5.0], [3.0, -1.0]], [[0.0, -1.0], [-1.0, 2.0], [-4.0, 1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-5.0, 16.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-24.0, 22.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank2_constData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 7.0, 0.0], [0.0, -6.0, -6.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0, -7.0], [4.0, -5.0, 
--5.0]])
-      arg1=Data(numpy.array([[-5.0, 5.0, 1.0], [3.0, -1.0, 0.0]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[15.0, 5.0], [-36.0, 6.0]])+(1.-msk_ref)*numpy.array([[23.0, -6.0], [-50.0, 17.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-6.0, -6.0, 7.0], [-7.0, 0.0, 4.0], [0.0, 7.0, 1.0], [0.0, 0.0, 3.0]], [[-6.0, -5.0, -7.0], 
+[2.0, -4.0, -3.0], [-2.0, 2.0, -5.0], [-5.0, -7.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, -1.0, 0.0], [-2.0, 7.0, 0.0], [-3.0, -1.0, 0.0], [-2.0, 6.0, -5.0]], [[-3.0, 
+4.0, -4.0], [-7.0, 7.0, -4.0], [5.0, 7.0, -7.0], [0.0, -1.0, -7.0]]]))
+      arg1=numpy.array([[[[-3.0, 5.0], [3.0, 0.0], [-5.0, -6.0]], [[-4.0, 3.0], [1.0, 5.0], [-5.0, -3.0]], [[-1.0, 7.0], [-5.0, 
+-1.0], [4.0, 3.0]], [[-3.0, -1.0], [-2.0, -5.0], [0.0, 1.0]]], [[[4.0, -4.0], [-4.0, -3.0], [-4.0, -7.0]], [[-6.0, 4.0], [0.0, 
+2.0], [-3.0, 7.0]], [[2.0, 0.0], [0.0, 1.0], [-4.0, 3.0]], [[-4.0, 6.0], [-7.0, 4.0], [4.0, -3.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([48.0, -110.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([70.0, -30.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank2_expandedData_rank1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 0.0, 7.0], [0.0, 2.0, 2.0]])+(1.-msk_arg0)*numpy.array([[1.0, -7.0, -1.0], [-2.0, 4.0, 
-1.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([4.0, -2.0, 1.0])+(1.-msk_arg1)*numpy.array([3.0, -1.0, 1.0])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([23.0, -2.0])+(1.-msk_ref)*numpy.array([9.0, -9.0])
+   def test_generalTransposedTensorProduct_taggedData_rank0_array_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg1=numpy.array([[1.0, 2.0, 1.0, 6.0, -1.0], [4.0, 3.0, -5.0, 0.0, 7.0], [-6.0, -5.0, 0.0, -2.0, 1.0], [-4.0, 0.0, -3.0, 
+7.0, -2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 
+-0.0, 0.0, -0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-4.0, -8.0, -4.0, -24.0, 4.0], [-16.0, -12.0, 20.0, -0.0, -28.0], [24.0, 20.0, -0.0, 
+8.0, -4.0], [16.0, -0.0, 12.0, -28.0, 8.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank2_expandedData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, 1.0, 4.0], [0.0, 0.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 0.0, -6.0], [0.0, 6.0, 
-5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 1.0, 4.0], [-7.0, 1.0, 4.0]])+(1.-msk_arg1)*numpy.array([[2.0, 0.0, -2.0], [-3.0, 6.0, 
--1.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[32.0, 38.0], [28.0, 28.0]])+(1.-msk_ref)*numpy.array([[0.0, 24.0], [-10.0, 31.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank3_offset1(self):
+      arg0=Data(numpy.array([-6.0, -3.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, -2.0, -2.0]))
+      arg1=numpy.array([[[-1.0, 4.0, -7.0, -4.0, -3.0], [1.0, 0.0, 3.0, -2.0, -6.0], [1.0, -4.0, 0.0, 0.0, -1.0], [7.0, 7.0, 
+6.0, 1.0, 4.0]], [[7.0, 0.0, 6.0, -1.0, 0.0], [-6.0, 7.0, 0.0, -6.0, 4.0], [-1.0, -3.0, -3.0, -5.0, -6.0], [-7.0, -7.0, 5.0, 
+3.0, -4.0]], [[3.0, 0.0, 4.0, -5.0, -6.0], [0.0, 3.0, -4.0, 4.0, 4.0], [2.0, -3.0, 3.0, 4.0, 1.0], [5.0, -4.0, -5.0, -1.0, 
+0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[3.0, -24.0, 48.0, -3.0, -18.0], [12.0, -3.0, -42.0, 54.0, 48.0], [9.0, 15.0, 27.0, 39.0, 30.0], 
+[9.0, -45.0, -81.0, -21.0, -12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-14.0, -24.0, 22.0, 36.0, 30.0], [6.0, -20.0, -10.0, 16.0, 20.0], [-8.0, 36.0, 0.0, 
+2.0, 16.0], [-38.0, -20.0, -36.0, -10.0, -16.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_array_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, -7.0, 7.0], [5.0, 6.0, -3.0]], [[-6.0, 2.0, 2.0], [1.0, -4.0, 6.0]], [[0.0, 5.0, 
-0.0], [6.0, 5.0, -2.0]], [[2.0, -4.0, -7.0], [7.0, 1.0, 7.0]], [[-4.0, -1.0, 2.0], [5.0, 1.0, -3.0]]], [[[-6.0, -3.0, 4.0], 
-[7.0, 5.0, 5.0]], [[-7.0, 7.0, 3.0], [5.0, 4.0, 1.0]], [[-6.0, -7.0, 0.0], [-1.0, -5.0, -3.0]], [[-2.0, -4.0, 2.0], [3.0, 1.0, 
-6.0]], [[-1.0, -6.0, -7.0], [3.0, 3.0, 0.0]]], [[[-2.0, -2.0, 3.0], [-2.0, 0.0, -5.0]], [[-3.0, -6.0, 6.0], [1.0, -5.0, 3.0]], 
-[[0.0, 0.0, -7.0], [-3.0, 2.0, -5.0]], [[-1.0, 2.0, 7.0], [4.0, -5.0, 6.0]], [[6.0, -3.0, -3.0], [4.0, -4.0, 7.0]]], [[[-1.0, 
-4.0, 7.0], [6.0, -7.0, -6.0]], [[0.0, 4.0, -1.0], [3.0, 1.0, -6.0]], [[-1.0, 5.0, 2.0], [-5.0, 0.0, 3.0]], [[-7.0, 2.0, -1.0], 
-[-6.0, 1.0, -5.0]], [[-2.0, -2.0, -2.0], [-2.0, -1.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 0.0, 0.0], [1.0, -3.0, 
-4.0]], [[3.0, -2.0, 5.0], [7.0, 0.0, -2.0]], [[6.0, -6.0, 5.0], [5.0, -6.0, -4.0]], [[6.0, -7.0, -5.0], [-1.0, -1.0, 0.0]], 
-[[-3.0, 5.0, -6.0], [-7.0, 1.0, -3.0]]], [[[-2.0, 0.0, -5.0], [5.0, 5.0, -4.0]], [[4.0, -3.0, -7.0], [1.0, -2.0, -5.0]], [[4.0, 
--3.0, -7.0], [4.0, 6.0, 5.0]], [[0.0, -2.0, -2.0], [-4.0, 5.0, -4.0]], [[4.0, 3.0, -5.0], [-2.0, 4.0, 0.0]]], [[[-2.0, -6.0, 
-7.0], [-5.0, 6.0, -1.0]], [[-6.0, 5.0, -5.0], [3.0, -6.0, 3.0]], [[3.0, -2.0, 0.0], [-2.0, -5.0, 5.0]], [[3.0, 0.0, -2.0], 
-[0.0, -1.0, -6.0]], [[4.0, -4.0, 7.0], [3.0, -3.0, 0.0]]], [[[-3.0, -6.0, -6.0], [7.0, -1.0, 6.0]], [[3.0, 4.0, -1.0], [-1.0, 
--4.0, -7.0]], [[7.0, 6.0, -1.0], [3.0, 3.0, 6.0]], [[1.0, -2.0, 6.0], [-5.0, 0.0, 7.0]], [[-4.0, -4.0, -6.0], [-4.0, 6.0, 
-6.0]]]])
-      arg1=numpy.array([[0.0, -7.0, -2.0], [-4.0, -3.0, 7.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, 32.0, -88.0, 60.0, -41.0], [5.0, -80.0, 47.0, 51.0, 35.0], [-19.0, 62.0, -15.0, 13.0, 
-72.0], [-87.0, -83.0, 2.0, -26.0, -6.0]])+(1.-msk_ref)*numpy.array([[33.0, -38.0, 2.0, 66.0, -19.0], [-53.0, 2.0, 36.0, -9.0, 
--15.0], [23.0, 2.0, 72.0, -35.0, 11.0], [71.0, -59.0, -19.0, 71.0, 80.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[-5.0, 6.0, -7.0], [-4.0, 5.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -1.0, -7.0], [-3.0, -1.0, 1.0]]))
+      arg1=numpy.array([[[[7.0, 0.0, -5.0, 0.0, -3.0], [-3.0, 0.0, -7.0, 7.0, 1.0], [-7.0, 5.0, 7.0, 3.0, 3.0], [7.0, 4.0, 0.0, 
+-6.0, 6.0]], [[1.0, -7.0, -1.0, 5.0, 0.0], [2.0, 7.0, 0.0, -7.0, 5.0], [2.0, 0.0, -5.0, -2.0, 3.0], [-1.0, -3.0, -2.0, -2.0, 
+6.0]], [[-3.0, 6.0, 3.0, -4.0, 0.0], [-2.0, -3.0, -4.0, 0.0, -2.0], [2.0, -7.0, -2.0, 0.0, 2.0], [0.0, 2.0, -6.0, 2.0, -1.0]]], 
+[[[-7.0, 5.0, 1.0, -6.0, 1.0], [7.0, -1.0, -2.0, 0.0, 0.0], [-1.0, -7.0, 6.0, 7.0, -6.0], [2.0, 1.0, -1.0, 1.0, 0.0]], [[-5.0, 
+5.0, 4.0, -1.0, -4.0], [0.0, -6.0, 2.0, -7.0, -4.0], [-7.0, -5.0, 0.0, 6.0, 3.0], [5.0, 5.0, -4.0, -1.0, 2.0]], [[-1.0, 0.0, 
+-5.0, -2.0, 5.0], [0.0, 4.0, 6.0, -4.0, -6.0], [-6.0, 1.0, 6.0, 3.0, -1.0], [5.0, -3.0, 3.0, -6.0, 2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[0.0, -79.0, 39.0, 87.0, -34.0], [13.0, 17.0, 51.0, -92.0, 49.0], [32.0, 22.0, -105.0, -40.0, 
+33.0], [-49.0, -16.0, -1.0, 25.0, 13.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[31.0, -55.0, -22.0, 40.0, 12.0], [-3.0, 27.0, 52.0, -4.0, 5.0], [2.0, 66.0, -7.0, 
+-28.0, -9.0], [-19.0, -30.0, 54.0, -8.0, -11.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_array_rank3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, 5.0, -3.0], [-1.0, 0.0, -2.0]], [[2.0, 5.0, -2.0], [3.0, -6.0, -2.0]], [[3.0, -7.0, 
--2.0], [-3.0, 2.0, -3.0]], [[-2.0, -3.0, -5.0], [-1.0, 5.0, 3.0]], [[6.0, 3.0, 2.0], [-7.0, 1.0, 5.0]]], [[[-2.0, 0.0, 6.0], 
-[5.0, 7.0, 5.0]], [[0.0, 0.0, -2.0], [4.0, 2.0, 1.0]], [[-4.0, -2.0, -6.0], [-4.0, -7.0, 4.0]], [[2.0, 3.0, -1.0], [6.0, 5.0, 
--6.0]], [[0.0, 3.0, -2.0], [0.0, 3.0, 0.0]]], [[[7.0, 4.0, 6.0], [2.0, 3.0, -6.0]], [[-1.0, -2.0, 0.0], [0.0, -5.0, 3.0]], 
-[[-6.0, -3.0, -5.0], [-2.0, 0.0, 6.0]], [[-5.0, 0.0, 0.0], [5.0, -4.0, -3.0]], [[-4.0, 5.0, 2.0], [3.0, 0.0, 0.0]]], [[[0.0, 
--2.0, -4.0], [7.0, 5.0, -3.0]], [[-6.0, 3.0, -6.0], [-4.0, -4.0, 7.0]], [[3.0, -5.0, -6.0], [1.0, -5.0, 7.0]], [[-3.0, -6.0, 
-6.0], [-1.0, -5.0, -2.0]], [[-2.0, -5.0, -2.0], [-6.0, 6.0, 2.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, -4.0, 7.0], [-2.0, 6.0, 
-4.0]], [[4.0, -5.0, 0.0], [0.0, 2.0, 0.0]], [[-5.0, 5.0, -6.0], [3.0, 0.0, 6.0]], [[4.0, -7.0, 6.0], [2.0, -5.0, -3.0]], 
-[[-4.0, 6.0, 2.0], [-2.0, 2.0, 6.0]]], [[[-4.0, 1.0, -4.0], [2.0, 0.0, -3.0]], [[0.0, -7.0, -2.0], [6.0, 0.0, -2.0]], [[0.0, 
-0.0, -6.0], [-3.0, 7.0, 0.0]], [[-6.0, -2.0, -2.0], [-3.0, -5.0, 7.0]], [[-4.0, 5.0, -2.0], [-6.0, 0.0, -6.0]]], [[[0.0, -5.0, 
--4.0], [4.0, 0.0, 3.0]], [[0.0, 0.0, -2.0], [0.0, -1.0, 0.0]], [[5.0, 5.0, -6.0], [-3.0, 4.0, -3.0]], [[1.0, 0.0, -4.0], [4.0, 
-2.0, -3.0]], [[2.0, 1.0, -4.0], [1.0, -1.0, 0.0]]], [[[0.0, -3.0, 5.0], [-3.0, -6.0, -2.0]], [[-1.0, -6.0, 6.0], [5.0, -1.0, 
-5.0]], [[4.0, 1.0, 2.0], [3.0, 4.0, 0.0]], [[5.0, -3.0, 0.0], [1.0, 1.0, -4.0]], [[-5.0, -1.0, 0.0], [4.0, 1.0, 0.0]]]])
-      arg1=numpy.array([[[-1.0, 1.0, -1.0], [-5.0, 0.0, -2.0]], [[7.0, -2.0, 1.0], [-5.0, 6.0, 1.0]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[11.0, 32.0], [-6.0, -51.0], [13.0, 57.0], [3.0, 25.0], [20.0, 84.0]], [[-39.0, 14.0], [-20.0, 
--9.0], [20.0, -48.0], [-16.0, 1.0], [5.0, 10.0]], [[-7.0, 49.0], [-7.0, -30.0], [6.0, -25.0], [-14.0, -87.0], [-8.0, -51.0]], 
-[[-27.0, -8.0], [21.0, -51.0], [-21.0, -3.0], [0.0, -30.0], [25.0, 62.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 72.0], [-9.0, 
-50.0], [-11.0, -60.0], [-21.0, 5.0], [6.0, -10.0]], [[5.0, -47.0], [-31.0, -20.0], [21.0, 51.0], [7.0, -48.0], [53.0, -16.0]], 
-[[-27.0, -11.0], [2.0, -8.0], [27.0, 55.0], [-11.0, -8.0], [-2.0, -3.0]], [[11.0, -12.0], [-46.0, -15.0], [-20.0, 37.0], [-5.0, 
-38.0], [-16.0, -47.0]]])
+   def test_generalTransposedTensorProduct_taggedData_rank0_array_rank3_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,-3.0)
+      arg1=numpy.array([[[0.0, 5.0], [0.0, -2.0]], [[-3.0, 3.0], [-5.0, -2.0]], [[0.0, 6.0], [-6.0, 1.0]], [[3.0, 4.0], [7.0, 
+5.0]], [[5.0, 2.0], [3.0, -6.0]], [[-1.0, -4.0], [7.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-0.0, -20.0], [-0.0, 8.0]], [[12.0, -12.0], [20.0, 8.0]], [[-0.0, -24.0], [24.0, -4.0]], [[-12.0, 
+-16.0], [-28.0, -20.0]], [[-20.0, -8.0], [-12.0, 24.0]], [[4.0, 16.0], [-28.0, -0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-0.0, -15.0], [-0.0, 6.0]], [[9.0, -9.0], [15.0, 6.0]], [[-0.0, -18.0], [18.0, 
+-3.0]], [[-9.0, -12.0], [-21.0, -15.0]], [[-15.0, -6.0], [-9.0, 18.0]], [[3.0, 12.0], [-21.0, -0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_array_rank4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, -5.0, -1.0], [-3.0, 4.0, -6.0]], [[-5.0, -4.0, -5.0], [3.0, -6.0, -2.0]], [[3.0, 2.0, 
--2.0], [3.0, 3.0, -1.0]], [[-6.0, -5.0, 0.0], [-3.0, 4.0, -5.0]], [[1.0, 5.0, -6.0], [5.0, -6.0, 6.0]]], [[[-7.0, -2.0, 6.0], 
-[6.0, 3.0, -1.0]], [[-3.0, 5.0, 0.0], [-6.0, -5.0, -3.0]], [[-7.0, 6.0, 6.0], [0.0, -6.0, 1.0]], [[-1.0, 0.0, 7.0], [1.0, -3.0, 
-0.0]], [[5.0, 0.0, 1.0], [1.0, -7.0, 7.0]]], [[[0.0, 5.0, 3.0], [0.0, 7.0, 1.0]], [[-4.0, 2.0, 0.0], [-3.0, -3.0, -2.0]], 
-[[-7.0, -4.0, -3.0], [-3.0, 1.0, 6.0]], [[-2.0, -6.0, -5.0], [-6.0, -2.0, -4.0]], [[-5.0, -2.0, 5.0], [-6.0, -7.0, -3.0]]], 
-[[[0.0, -4.0, -7.0], [0.0, 2.0, -1.0]], [[0.0, 5.0, 1.0], [-4.0, 1.0, -4.0]], [[2.0, 0.0, -2.0], [0.0, -4.0, -2.0]], [[1.0, 
--2.0, 7.0], [6.0, -2.0, 6.0]], [[-2.0, 5.0, -6.0], [0.0, 5.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 1.0, 1.0], [-2.0, 
-5.0, 4.0]], [[1.0, -1.0, 3.0], [-2.0, -7.0, 1.0]], [[6.0, -2.0, -7.0], [-2.0, 4.0, 0.0]], [[5.0, -3.0, -3.0], [-2.0, 6.0, 
--7.0]], [[3.0, 4.0, -6.0], [-7.0, 6.0, -6.0]]], [[[7.0, -3.0, 0.0], [-1.0, 1.0, 4.0]], [[3.0, 1.0, -4.0], [7.0, 4.0, 1.0]], 
-[[0.0, 2.0, 0.0], [6.0, 3.0, 1.0]], [[-7.0, -6.0, 4.0], [-2.0, -7.0, 2.0]], [[-4.0, 7.0, -5.0], [0.0, -7.0, -6.0]]], [[[6.0, 
-7.0, -5.0], [0.0, -5.0, -3.0]], [[-3.0, 7.0, 7.0], [1.0, 3.0, 6.0]], [[-2.0, 4.0, -3.0], [-2.0, -1.0, -7.0]], [[-6.0, 7.0, 
-3.0], [5.0, -5.0, -3.0]], [[6.0, 3.0, 1.0], [-1.0, -7.0, 6.0]]], [[[-6.0, 5.0, -6.0], [4.0, -4.0, 1.0]], [[7.0, 0.0, -6.0], 
-[-2.0, 1.0, 3.0]], [[3.0, -1.0, -1.0], [-3.0, 6.0, -2.0]], [[3.0, -6.0, 2.0], [0.0, 0.0, -1.0]], [[4.0, 5.0, -6.0], [3.0, -5.0, 
--4.0]]]])
-      arg1=numpy.array([[[[-3.0, 0.0, 7.0], [-6.0, 6.0, 7.0]], [[7.0, 0.0, -6.0], [0.0, 0.0, 0.0]], [[6.0, 1.0, -3.0], [0.0, 
--4.0, -1.0]], [[-5.0, 7.0, -4.0], [2.0, -7.0, 4.0]], [[-7.0, 3.0, -1.0], [0.0, -2.0, 4.0]]], [[[1.0, 0.0, 3.0], [6.0, -4.0, 
--3.0]], [[7.0, 3.0, -6.0], [-6.0, 7.0, 5.0]], [[-6.0, -1.0, 7.0], [-5.0, 2.0, 3.0]], [[6.0, 5.0, -3.0], [5.0, -7.0, -3.0]], 
-[[5.0, 0.0, 4.0], [0.0, -1.0, 4.0]]], [[[2.0, -7.0, -2.0], [5.0, -4.0, -1.0]], [[-7.0, 0.0, 1.0], [6.0, 2.0, 4.0]], [[-6.0, 
-5.0, -4.0], [4.0, 5.0, -3.0]], [[1.0, 6.0, -5.0], [3.0, -1.0, 2.0]], [[-3.0, -1.0, 7.0], [-6.0, 2.0, -2.0]]], [[[6.0, 5.0, 
--2.0], [-1.0, 5.0, 5.0]], [[6.0, -1.0, 2.0], [2.0, 7.0, -7.0]], [[4.0, 0.0, 1.0], [0.0, 3.0, 7.0]], [[-2.0, -2.0, -5.0], [5.0, 
--5.0, 0.0]], [[6.0, 6.0, -3.0], [-6.0, -3.0, -4.0]]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-4.0, -1.0, -18.0, -84.0, -39.0], [-20.0, 0.0, 9.0, -53.0, -37.0], [10.0, -28.0, 11.0, -51.0, 
-39.0], [-36.0, 61.0, -35.0, -18.0, -3.0]], [[-88.0, -5.0, 7.0, 57.0, 32.0], [28.0, -87.0, -34.0, 28.0, -47.0], [69.0, 28.0, 
-18.0, 7.0, -42.0], [-83.0, -58.0, -57.0, 88.0, -31.0]], [[-30.0, 33.0, 15.0, -12.0, -23.0], [6.0, 37.0, -46.0, 31.0, 0.0], 
-[0.0, -3.0, 30.0, 29.0, -35.0], [39.0, 46.0, 12.0, 0.0, 13.0]], [[25.0, -42.0, -52.0, -59.0, -1.0], [-25.0, -36.0, 49.0, -89.0, 
--54.0], [-3.0, 12.0, 34.0, -59.0, 59.0], [-63.0, 26.0, -47.0, -13.0, -40.0]], [[-69.0, 43.0, 47.0, 130.0, 50.0], [19.0, 16.0, 
--72.0, 98.0, 11.0], [22.0, 29.0, 15.0, 94.0, -104.0], [38.0, -85.0, 22.0, 73.0, 18.0]]], [[[38.0, -85.0, -73.0, -16.0, 27.0], 
-[38.0, -111.0, 59.0, -58.0, -18.0], [7.0, 93.0, 50.0, -36.0, 37.0], [-60.0, 12.0, -20.0, 3.0, -113.0]], [[-6.0, -21.0, 10.0, 
-61.0, 34.0], [-10.0, -20.0, 24.0, 21.0, -22.0], [-48.0, -37.0, 3.0, 8.0, 36.0], [-27.0, -49.0, -48.0, -9.0, 75.0]], [[34.0, 
--85.0, -31.0, 99.0, 77.0], [32.0, -104.0, 69.0, 9.0, -1.0], [-45.0, 47.0, 15.0, 7.0, 43.0], [-49.0, -85.0, -33.0, 2.0, -10.0]], 
-[[28.0, -49.0, -15.0, 0.0, 6.0], [38.0, -76.0, 44.0, -1.0, 26.0], [1.0, 14.0, -33.0, -30.0, 40.0], [-36.0, -11.0, -6.0, -13.0, 
--24.0]], [[-7.0, 29.0, 48.0, 50.0, 6.0], [21.0, 9.0, -21.0, 60.0, 64.0], [34.0, -14.0, -86.0, 24.0, -42.0], [27.0, -64.0, 49.0, 
-25.0, 14.0]]], [[[70.0, -18.0, -33.0, -22.0, 2.0], [-22.0, 51.0, 33.0, -36.0, 9.0], [-70.0, 21.0, 45.0, 10.0, 28.0], [59.0, 
-43.0, 31.0, -60.0, -4.0]], [[-2.0, -28.0, -8.0, 41.0, 32.0], [-4.0, -35.0, 25.0, -2.0, -25.0], [-23.0, -4.0, 13.0, -2.0, 26.0], 
-[-36.0, -39.0, -39.0, 4.0, 23.0]], [[66.0, -31.0, -47.0, 30.0, 62.0], [-56.0, 12.0, 60.0, -93.0, -24.0], [-5.0, 54.0, 9.0, 
--14.0, 12.0], [-18.0, -85.0, 14.0, 17.0, -66.0]], [[-33.0, 16.0, 9.0, -26.0, -11.0], [-33.0, 0.0, -3.0, -31.0, -44.0], [30.0, 
--47.0, -20.0, -37.0, 17.0], [-56.0, -14.0, -47.0, 21.0, 25.0]], [[23.0, -65.0, -16.0, 16.0, 26.0], [11.0, -99.0, 74.0, -27.0, 
--10.0], [-5.0, -22.0, -50.0, -59.0, 80.0], [-94.0, -58.0, -57.0, -6.0, 12.0]]], [[[-44.0, 42.0, 10.0, -18.0, -13.0], [-26.0, 
-39.0, -44.0, -10.0, -34.0], [35.0, -7.0, 21.0, 7.0, -39.0], [-1.0, 11.0, -8.0, 33.0, -5.0]], [[9.0, -6.0, 2.0, 0.0, -4.0], 
-[-13.0, 20.0, 12.0, 7.0, -13.0], [-57.0, -37.0, 22.0, 4.0, 36.0], [12.0, 24.0, -24.0, -40.0, 64.0]], [[-58.0, 26.0, 36.0, 18.0, 
--12.0], [18.0, -12.0, -40.0, 52.0, -2.0], [26.0, -32.0, -18.0, 12.0, -24.0], [-14.0, -6.0, -20.0, 26.0, 38.0]], [[40.0, -35.0, 
--15.0, 3.0, 8.0], [48.0, -61.0, 29.0, 1.0, 59.0], [34.0, 56.0, -48.0, -14.0, -4.0], [-4.0, -22.0, 47.0, 7.0, -81.0]], [[-41.0, 
-22.0, -4.0, 14.0, 5.0], [-25.0, 47.0, -40.0, 11.0, -59.0], [-42.0, -2.0, 101.0, 43.0, -21.0], [25.0, 41.0, -34.0, -1.0, 
-41.0]]]])+(1.-msk_ref)*numpy.array([[[[65.0, 22.0, -2.0, -40.0, -20.0], [-37.0, 92.0, 14.0, -31.0, 35.0], [-35.0, -13.0, -18.0, 
-2.0, 8.0], [74.0, 28.0, 60.0, -50.0, 8.0]], [[-5.0, -11.0, 23.0, 25.0, 5.0], [23.0, -46.0, 15.0, 28.0, 28.0], [20.0, -26.0, 
--69.0, -17.0, 15.0], [-33.0, -47.0, -7.0, 10.0, 20.0]], [[-31.0, 84.0, 39.0, -48.0, -49.0], [-43.0, 118.0, -65.0, 9.0, -2.0], 
-[14.0, -53.0, -6.0, 19.0, -45.0], [62.0, 48.0, 29.0, -3.0, 45.0]], [[-37.0, 53.0, 19.0, -108.0, -81.0], [-19.0, 63.0, -47.0, 
--7.0, -21.0], [10.0, -66.0, 10.0, -24.0, 5.0], [18.0, 114.0, -14.0, -29.0, 43.0]], [[-15.0, 57.0, 22.0, -43.0, -39.0], [-63.0, 
-123.0, -35.0, -3.0, -39.0], [-63.0, -81.0, 46.0, 18.0, 11.0], [57.0, 72.0, -18.0, -49.0, 108.0]]], [[[19.0, 49.0, 31.0, -49.0, 
--44.0], [-15.0, 73.0, -20.0, 3.0, 50.0], [22.0, -37.0, -68.0, -7.0, -18.0], [53.0, 22.0, 59.0, -18.0, 11.0]], [[-48.0, 45.0, 
-14.0, -2.0, -18.0], [14.0, 39.0, -71.0, 39.0, -1.0], [25.0, 29.0, 48.0, 48.0, -74.0], [49.0, 44.0, 27.0, 27.0, -22.0]], 
-[[-11.0, 0.0, -11.0, 9.0, 4.0], [21.0, -4.0, -23.0, 16.0, 1.0], [3.0, 46.0, 46.0, 29.0, -34.0], [24.0, 24.0, 16.0, 11.0, 
--37.0]], [[33.0, -73.0, -34.0, 30.0, 49.0], [15.0, -118.0, 78.0, -51.0, -4.0], [36.0, 35.0, -53.0, -58.0, 49.0], [-103.0, 
--95.0, -31.0, 31.0, -65.0]], [[-107.0, 2.0, 32.0, 114.0, 44.0], [27.0, -56.0, -50.0, 93.0, -57.0], [-13.0, -15.0, 62.0, 58.0, 
--32.0], [-44.0, -48.0, -84.0, 54.0, 78.0]]], [[[-104.0, 72.0, 81.0, 62.0, -18.0], [20.0, 43.0, -97.0, 130.0, 3.0], [-4.0, 
--69.0, 3.0, 72.0, -64.0], [41.0, 5.0, -17.0, 24.0, 120.0]], [[112.0, -63.0, -50.0, 41.0, 53.0], [-6.0, 3.0, 79.0, -38.0, 34.0], 
-[-82.0, 64.0, 26.0, 16.0, 39.0], [47.0, -30.0, 46.0, -53.0, -36.0]], [[-58.0, 4.0, 12.0, 25.0, 3.0], [2.0, -14.0, -26.0, 35.0, 
--49.0], [-25.0, -31.0, 52.0, 18.0, 5.0], [-24.0, 16.0, -63.0, 6.0, 64.0]], [[-42.0, -60.0, -15.0, 100.0, 58.0], [62.0, -119.0, 
-6.0, 59.0, -25.0], [-19.0, 53.0, 63.0, 35.0, -2.0], [-52.0, -41.0, -57.0, 33.0, -6.0]], [[-5.0, 36.0, 58.0, 58.0, 4.0], [13.0, 
-32.0, -23.0, 74.0, 65.0], [6.0, -37.0, -82.0, 35.0, -34.0], [45.0, -58.0, 46.0, 7.0, 54.0]]], [[[-65.0, -6.0, 2.0, 129.0, 
-75.0], [13.0, -38.0, -36.0, 52.0, -46.0], [0.0, 56.0, 78.0, 72.0, -63.0], [-18.0, -80.0, -35.0, 72.0, -4.0]], [[-24.0, 85.0, 
-53.0, -10.0, -33.0], [-36.0, 119.0, -63.0, 34.0, 22.0], [9.0, -53.0, -30.0, 36.0, -55.0], [76.0, 12.0, 46.0, 1.0, 57.0]], 
-[[24.0, 27.0, -2.0, -74.0, -43.0], [-36.0, 74.0, -3.0, -35.0, -3.0], [-22.0, -36.0, 5.0, -17.0, 19.0], [38.0, 67.0, 15.0, 
--44.0, 23.0]], [[-2.0, 9.0, 7.0, -69.0, -45.0], [12.0, -14.0, -1.0, -15.0, 19.0], [45.0, -23.0, -53.0, -45.0, 13.0], [-21.0, 
-35.0, 7.0, -4.0, -20.0]], [[-130.0, 64.0, 71.0, 64.0, -13.0], [36.0, 6.0, -108.0, 129.0, -15.0], [24.0, -42.0, 24.0, 70.0, 
--79.0], [13.0, 6.0, -33.0, 52.0, 85.0]]]])
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank4_offset1(self):
+      arg0=Data(numpy.array([0.0, -4.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([5.0, -2.0, -3.0]))
+      arg1=numpy.array([[[[-4.0, 7.0], [6.0, 0.0]], [[4.0, -1.0], [5.0, 5.0]], [[-4.0, 2.0], [-5.0, -6.0]], [[-5.0, 3.0], 
+[-4.0, -2.0]], [[-3.0, -7.0], [-1.0, 7.0]], [[-3.0, -6.0], [-3.0, 3.0]]], [[[7.0, -2.0], [6.0, -4.0]], [[4.0, 2.0], [4.0, 
+0.0]], [[-3.0, 5.0], [0.0, -2.0]], [[4.0, 1.0], [-7.0, -5.0]], [[0.0, -1.0], [6.0, 3.0]], [[6.0, 0.0], [-5.0, 4.0]]], [[[-6.0, 
+1.0], [3.0, 6.0]], [[-3.0, -5.0], [1.0, 5.0]], [[-1.0, 4.0], [0.0, -5.0]], [[3.0, 0.0], [4.0, 6.0]], [[5.0, 0.0], [2.0, -5.0]], 
+[[-7.0, -7.0], [5.0, 7.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-16.0, 6.0], [-30.0, 4.0]], [[-10.0, 2.0], [-18.0, -10.0]], [[14.0, -28.0], [0.0, 18.0]], 
+[[-22.0, -4.0], [20.0, 8.0]], [[-10.0, 4.0], [-28.0, -2.0]], [[-10.0, 14.0], [10.0, -30.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-16.0, 36.0], [9.0, -10.0]], [[21.0, 6.0], [14.0, 10.0]], [[-11.0, -12.0], [-25.0, 
+-11.0]], [[-42.0, 13.0], [-18.0, -18.0]], [[-30.0, -33.0], [-23.0, 44.0]], [[-6.0, -9.0], [-20.0, -14.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_constData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, -5.0, 1.0], [3.0, -6.0, -2.0]], [[-3.0, -2.0, 7.0], [-4.0, -3.0, 1.0]], [[3.0, -7.0, 
--2.0], [7.0, 4.0, 5.0]], [[0.0, 3.0, -7.0], [-2.0, 5.0, -1.0]], [[-2.0, 3.0, 7.0], [4.0, 7.0, -1.0]]], [[[-3.0, -4.0, 4.0], 
-[-6.0, 0.0, 3.0]], [[-4.0, 0.0, 3.0], [-4.0, -5.0, -3.0]], [[-2.0, 0.0, -3.0], [-6.0, -4.0, 1.0]], [[0.0, 0.0, 3.0], [6.0, 7.0, 
-5.0]], [[7.0, -4.0, -6.0], [-5.0, 0.0, 5.0]]], [[[-2.0, -5.0, 1.0], [0.0, 3.0, 4.0]], [[-3.0, 7.0, -4.0], [0.0, 4.0, 0.0]], 
-[[2.0, 0.0, 0.0], [-4.0, 6.0, 4.0]], [[0.0, 3.0, 0.0], [3.0, -2.0, 7.0]], [[-3.0, -6.0, -1.0], [-4.0, 2.0, 6.0]]], [[[-2.0, 
-7.0, -6.0], [7.0, 3.0, 3.0]], [[-2.0, -2.0, 5.0], [2.0, -4.0, 5.0]], [[1.0, 3.0, -5.0], [1.0, -4.0, -1.0]], [[4.0, -4.0, 4.0], 
-[4.0, 2.0, -3.0]], [[1.0, -3.0, 7.0], [2.0, -6.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -7.0, 1.0], [6.0, -3.0, 6.0]], 
-[[1.0, -6.0, 6.0], [-5.0, 7.0, 3.0]], [[-6.0, 6.0, 4.0], [-4.0, 7.0, 6.0]], [[-3.0, -5.0, 2.0], [-6.0, -3.0, -6.0]], [[1.0, 
--6.0, 7.0], [5.0, 0.0, -6.0]]], [[[2.0, 6.0, 3.0], [-1.0, 5.0, 5.0]], [[3.0, 2.0, 4.0], [-7.0, 6.0, -3.0]], [[-3.0, 6.0, 6.0], 
-[0.0, -3.0, -3.0]], [[-2.0, 4.0, -2.0], [-3.0, -7.0, 3.0]], [[6.0, -2.0, 6.0], [3.0, 3.0, -6.0]]], [[[-1.0, -5.0, 6.0], [0.0, 
-4.0, 1.0]], [[-3.0, -3.0, -3.0], [7.0, -5.0, -3.0]], [[3.0, 1.0, -5.0], [1.0, -5.0, -2.0]], [[1.0, 7.0, 7.0], [-7.0, 3.0, 
-2.0]], [[-3.0, 6.0, 1.0], [-3.0, 4.0, 7.0]]], [[[4.0, -4.0, 7.0], [5.0, -5.0, -5.0]], [[3.0, 0.0, -6.0], [-6.0, 2.0, 7.0]], 
-[[-2.0, -4.0, 5.0], [6.0, -5.0, -6.0]], [[-1.0, -1.0, 7.0], [4.0, -3.0, 3.0]], [[7.0, 0.0, 7.0], [0.0, -6.0, 6.0]]]])
-      arg1=Data(numpy.array([[-2.0, 5.0, 4.0], [7.0, -7.0, 0.0]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[28.0, 17.0, -28.0, -62.0, 26.0], [-40.0, 27.0, -22.0, 5.0, -93.0], [-38.0, -3.0, -74.0, 50.0, 
--70.0], [43.0, 56.0, 28.0, 2.0, 67.0]])+(1.-msk_ref)*numpy.array([[20.0, -92.0, -19.0, -32.0, 31.0], [-4.0, -71.0, 81.0, 44.0, 
-2.0], [-27.0, 63.0, 21.0, -9.0, -9.0], [70.0, -86.0, 81.0, 74.0, 56.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank0_array_rank4_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,4.0)
+      arg1=numpy.array([[[[3.0, -3.0, -6.0, 0.0], [4.0, -5.0, -6.0, -4.0], [1.0, -7.0, -3.0, 1.0]], [[0.0, -5.0, -1.0, 1.0], 
+[-2.0, 3.0, -6.0, -3.0], [7.0, 5.0, 3.0, -7.0]]], [[[-1.0, 6.0, -5.0, -3.0], [-6.0, 1.0, -4.0, 5.0], [-7.0, -5.0, 5.0, -2.0]], 
+[[-1.0, 5.0, 3.0, 1.0], [4.0, -5.0, 5.0, 1.0], [6.0, 0.0, 1.0, 5.0]]], [[[2.0, 0.0, 5.0, -2.0], [-6.0, 3.0, -2.0, -6.0], [-7.0, 
+0.0, -6.0, -3.0]], [[0.0, -4.0, -6.0, 0.0], [6.0, 0.0, -2.0, -4.0], [7.0, -1.0, -1.0, -5.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-9.0, 9.0, 18.0, -0.0], [-12.0, 15.0, 18.0, 12.0], [-3.0, 21.0, 9.0, -3.0]], [[-0.0, 15.0, 3.0, 
+-3.0], [6.0, -9.0, 18.0, 9.0], [-21.0, -15.0, -9.0, 21.0]]], [[[3.0, -18.0, 15.0, 9.0], [18.0, -3.0, 12.0, -15.0], [21.0, 15.0, 
+-15.0, 6.0]], [[3.0, -15.0, -9.0, -3.0], [-12.0, 15.0, -15.0, -3.0], [-18.0, -0.0, -3.0, -15.0]]], [[[-6.0, -0.0, -15.0, 6.0], 
+[18.0, -9.0, 6.0, 18.0], [21.0, -0.0, 18.0, 9.0]], [[-0.0, 12.0, 18.0, -0.0], [-18.0, -0.0, 6.0, 12.0], [-21.0, 3.0, 3.0, 
+15.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[12.0, -12.0, -24.0, 0.0], [16.0, -20.0, -24.0, -16.0], [4.0, -28.0, -12.0, 4.0]], 
+[[0.0, -20.0, -4.0, 4.0], [-8.0, 12.0, -24.0, -12.0], [28.0, 20.0, 12.0, -28.0]]], [[[-4.0, 24.0, -20.0, -12.0], [-24.0, 4.0, 
+-16.0, 20.0], [-28.0, -20.0, 20.0, -8.0]], [[-4.0, 20.0, 12.0, 4.0], [16.0, -20.0, 20.0, 4.0], [24.0, 0.0, 4.0, 20.0]]], 
+[[[8.0, 0.0, 20.0, -8.0], [-24.0, 12.0, -8.0, -24.0], [-28.0, 0.0, -24.0, -12.0]], [[0.0, -16.0, -24.0, 0.0], [24.0, 0.0, -8.0, 
+-16.0], [28.0, -4.0, -4.0, -20.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_constData_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=Data(-2.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-4.0,self.functionspace)
+      ref.setTaggedValue(1,-0.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([-2.0, 6.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([3.0, 4.0, 0.0]))
+      arg1=Data(numpy.array([1.0, 7.0, 7.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(68.0,self.functionspace)
+      ref.setTaggedValue(1,31.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-5.0, -7.0, 3.0], [-3.0, -4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 4.0, -2.0], [-3.0, -4.0, 2.0]]))
+      arg1=Data(numpy.array([[-1.0, 0.0, -7.0], [-6.0, -6.0, -5.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(26.0,self.functionspace)
+      ref.setTaggedValue(1,40.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[2.0, -4.0, 5.0], [5.0, 1.0, 6.0], [4.0, -6.0, 6.0], [-3.0, 2.0, 0.0]], [[0.0, 7.0, -7.0], [7.0, 
+0.0, -6.0], [6.0, -2.0, 2.0], [-4.0, -3.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 0.0, -1.0], [-5.0, -7.0, -2.0], [0.0, -1.0, 1.0], [-6.0, -6.0, 5.0]], [[3.0, 
+2.0, -7.0], [-5.0, -4.0, 3.0], [0.0, -6.0, 0.0], [0.0, 4.0, 6.0]]]))
+      arg1=Data(numpy.array([[[1.0, -6.0, -2.0], [4.0, -6.0, 3.0], [4.0, -4.0, -5.0], [6.0, 3.0, 6.0]], [[3.0, -6.0, -2.0], 
+[6.0, -6.0, -6.0], [2.0, -4.0, 7.0], [-7.0, 0.0, -6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(134.0,self.functionspace)
+      ref.setTaggedValue(1,-26.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[3.0, -3.0], [-7.0, 1.0], [-4.0, 0.0]], [[-2.0, -1.0], [-3.0, 3.0], [-6.0, 1.0]]], [[[6.0, 
+-5.0], [1.0, 3.0], [0.0, 7.0]], [[-2.0, 5.0], [3.0, 7.0], [-6.0, -7.0]]], [[[3.0, 6.0], [-2.0, 2.0], [-4.0, 4.0]], [[-5.0, 
+4.0], [3.0, 2.0], [-6.0, -5.0]]], [[[6.0, 2.0], [0.0, -3.0], [-2.0, -5.0]], [[7.0, 7.0], [5.0, 1.0], [0.0, 
+-3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, -4.0], [-6.0, -7.0], [2.0, 7.0]], [[-3.0, -5.0], [0.0, 3.0], [0.0, -3.0]]], 
+[[[3.0, 3.0], [4.0, 5.0], [-5.0, 0.0]], [[-6.0, -4.0], [2.0, -3.0], [-3.0, 0.0]]], [[[6.0, 2.0], [0.0, -5.0], [0.0, 7.0]], 
+[[-1.0, 0.0], [-1.0, -1.0], [0.0, 2.0]]], [[[1.0, -4.0], [4.0, -5.0], [0.0, -6.0]], [[4.0, 1.0], [1.0, 5.0], [-6.0, 1.0]]]]))
+      arg1=Data(numpy.array([[[[4.0, 2.0], [0.0, 1.0], [-3.0, 4.0]], [[-6.0, -6.0], [-3.0, 4.0], [7.0, 3.0]]], [[[5.0, -4.0], 
+[-2.0, 5.0], [4.0, -6.0]], [[2.0, 0.0], [-6.0, -3.0], [3.0, 1.0]]], [[[3.0, 4.0], [0.0, -3.0], [2.0, -1.0]], [[-2.0, -7.0], 
+[-5.0, 3.0], [1.0, -1.0]]], [[[-3.0, 7.0], [5.0, -6.0], [-5.0, -5.0]], [[7.0, -2.0], [-6.0, -5.0], [1.0, 
+2.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(2.0,self.functionspace)
+      ref.setTaggedValue(1,98.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_constData_rank1_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=Data(numpy.array([6.0, 0.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-12.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([42.0, 0.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([-1.0, -2.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, 0.0, 5.0]))
+      arg1=Data(numpy.array([[6.0, 5.0], [0.0, 0.0], [-2.0, 5.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([4.0, -30.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-34.0, 5.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_constData_rank3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, -2.0, 0.0], [7.0, -4.0, -2.0]], [[2.0, -2.0, -1.0], [4.0, -5.0, 2.0]], [[0.0, 0.0, 
-5.0], [-2.0, 1.0, 0.0]], [[7.0, 6.0, 3.0], [-7.0, 5.0, 7.0]], [[-2.0, 7.0, -2.0], [-5.0, -2.0, 6.0]]], [[[6.0, -7.0, -5.0], 
-[6.0, -7.0, 0.0]], [[2.0, 2.0, 1.0], [7.0, 0.0, -7.0]], [[-7.0, 0.0, -6.0], [0.0, 0.0, -4.0]], [[5.0, 6.0, -4.0], [-5.0, -6.0, 
-5.0]], [[4.0, -4.0, 1.0], [0.0, -3.0, 0.0]]], [[[5.0, 4.0, -3.0], [3.0, -5.0, -2.0]], [[1.0, 1.0, -1.0], [-5.0, 1.0, 2.0]], 
-[[5.0, -7.0, 6.0], [3.0, -6.0, 1.0]], [[-3.0, 1.0, 2.0], [-6.0, 0.0, 3.0]], [[3.0, -5.0, -3.0], [-7.0, 7.0, 6.0]]], [[[-1.0, 
-0.0, -4.0], [1.0, 2.0, 1.0]], [[0.0, -7.0, 3.0], [0.0, 0.0, -7.0]], [[0.0, 7.0, -3.0], [-3.0, 2.0, -2.0]], [[-2.0, -5.0, 0.0], 
-[5.0, 6.0, 5.0]], [[7.0, 4.0, 1.0], [1.0, 0.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[6.0, -3.0, 5.0], [-1.0, 3.0, -3.0]], 
-[[4.0, 0.0, -6.0], [-4.0, 4.0, -1.0]], [[-6.0, 6.0, 6.0], [1.0, 5.0, 5.0]], [[-1.0, 0.0, 0.0], [-2.0, 0.0, 6.0]], [[-1.0, 3.0, 
-1.0], [-2.0, -3.0, -5.0]]], [[[0.0, -2.0, 7.0], [2.0, 2.0, 2.0]], [[-2.0, -6.0, 0.0], [-1.0, 1.0, -1.0]], [[0.0, -2.0, 0.0], 
-[-6.0, 4.0, -2.0]], [[4.0, 7.0, -4.0], [0.0, -3.0, -6.0]], [[3.0, 0.0, -7.0], [7.0, -7.0, 1.0]]], [[[3.0, -2.0, -5.0], [-2.0, 
-4.0, -5.0]], [[-7.0, -3.0, 5.0], [-3.0, -3.0, -6.0]], [[5.0, -4.0, -6.0], [0.0, 4.0, 1.0]], [[5.0, -5.0, 3.0], [-7.0, 4.0, 
--4.0]], [[-3.0, 5.0, -3.0], [6.0, -7.0, 4.0]]], [[[6.0, 2.0, -7.0], [-3.0, -7.0, 3.0]], [[6.0, -7.0, -3.0], [-3.0, 0.0, -1.0]], 
-[[6.0, -2.0, -1.0], [-2.0, 2.0, -3.0]], [[-2.0, -6.0, 6.0], [1.0, 6.0, 4.0]], [[4.0, -2.0, -2.0], [3.0, 2.0, -1.0]]]])
-      arg1=Data(numpy.array([[[-5.0, 4.0, 4.0], [3.0, 1.0, 4.0]], [[-3.0, -7.0, -1.0], [-3.0, -1.0, 5.0]]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[31.0, 5.0], [-7.0, 12.0], [15.0, 0.0], [13.0, -15.0], [37.0, 6.0]], [[-67.0, 25.0], [-5.0, 
--77.0], [-5.0, 7.0], [-18.0, -7.0], [-35.0, 18.0]], [[-25.0, -54.0], [-11.0, 15.0], [-22.0, 30.0], [21.0, 33.0], [-37.0, 
-73.0]], [[-2.0, 7.0], [-44.0, 11.0], [1.0, -49.0], [31.0, 45.0], [16.0, -18.0]]])+(1.-msk_ref)*numpy.array([[[-34.0, -17.0], 
-[-56.0, -3.0], [106.0, -13.0], [23.0, 39.0], [-8.0, -35.0]], [[36.0, 9.0], [-20.0, 45.0], [-30.0, 18.0], [-35.0, -84.0], 
-[-25.0, -11.0]], [[-65.0, -13.0], [7.0, 19.0], [-57.0, 20.0], [-66.0, 14.0], [50.0, -14.0]], [[-54.0, 6.0], [-83.0, 38.0], 
-[-58.0, -14.0], [35.0, 53.0], [-29.0, -12.0]]])
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[0.0, -5.0, 7.0], [0.0, -3.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, 0.0, -3.0], [-4.0, 0.0, 4.0]]))
+      arg1=Data(numpy.array([[[0.0, 3.0], [-7.0, 4.0], [-7.0, -6.0]], [[-1.0, -5.0], [4.0, 7.0], [-5.0, 
+-2.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-51.0, -93.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([5.0, 39.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_constData_rank4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -1.0, 2.0], [-3.0, 3.0, -5.0]], [[3.0, 1.0, 6.0], [-6.0, 6.0, -1.0]], [[-2.0, 0.0, 
--1.0], [-5.0, -1.0, 4.0]], [[0.0, 4.0, 5.0], [4.0, 0.0, -3.0]], [[-2.0, 0.0, -1.0], [6.0, -5.0, 0.0]]], [[[6.0, 0.0, 5.0], 
-[-2.0, 3.0, 0.0]], [[0.0, -2.0, 6.0], [-3.0, -3.0, -7.0]], [[-4.0, -1.0, -1.0], [5.0, 5.0, 1.0]], [[1.0, -7.0, -3.0], [-4.0, 
-3.0, 3.0]], [[6.0, 0.0, -3.0], [-5.0, 1.0, -3.0]]], [[[-5.0, 3.0, 7.0], [-6.0, 1.0, -3.0]], [[-7.0, -5.0, 0.0], [-6.0, 6.0, 
--6.0]], [[5.0, 5.0, -1.0], [0.0, 5.0, 3.0]], [[-4.0, -1.0, -4.0], [-3.0, 3.0, 7.0]], [[0.0, 7.0, -1.0], [0.0, -6.0, -3.0]]], 
-[[[4.0, 3.0, 5.0], [-6.0, -2.0, -3.0]], [[6.0, 0.0, -7.0], [2.0, 0.0, 4.0]], [[-4.0, 4.0, 6.0], [0.0, 4.0, 5.0]], [[4.0, 0.0, 
-5.0], [4.0, -4.0, 1.0]], [[-2.0, -1.0, -3.0], [-3.0, 0.0, 6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-2.0, -6.0, 4.0], [-7.0, -5.0, 
--3.0]], [[4.0, 2.0, 2.0], [-7.0, -5.0, -6.0]], [[-5.0, -2.0, 3.0], [7.0, 3.0, 7.0]], [[-7.0, 6.0, -1.0], [1.0, 6.0, -5.0]], 
-[[1.0, -3.0, 3.0], [-1.0, -4.0, -3.0]]], [[[-5.0, -6.0, 5.0], [5.0, -2.0, 5.0]], [[-4.0, 6.0, -1.0], [4.0, 4.0, 0.0]], [[-3.0, 
--5.0, 0.0], [-6.0, -4.0, -5.0]], [[-1.0, 3.0, -2.0], [0.0, 0.0, -7.0]], [[2.0, 0.0, 1.0], [-1.0, -1.0, -1.0]]], [[[7.0, 4.0, 
-2.0], [1.0, 4.0, -2.0]], [[6.0, -5.0, 0.0], [0.0, 7.0, 7.0]], [[-1.0, 4.0, -5.0], [-4.0, -6.0, -6.0]], [[-3.0, 0.0, -5.0], 
-[-4.0, 5.0, -1.0]], [[5.0, -2.0, -3.0], [0.0, 0.0, 0.0]]], [[[-7.0, -2.0, -2.0], [5.0, -7.0, 6.0]], [[5.0, -7.0, -4.0], [4.0, 
-6.0, 3.0]], [[3.0, 1.0, -6.0], [-7.0, 2.0, 0.0]], [[6.0, 2.0, -4.0], [7.0, -5.0, 2.0]], [[3.0, -7.0, -6.0], [-6.0, 6.0, 
--5.0]]]])
-      arg1=Data(numpy.array([[[[6.0, 0.0, 3.0], [3.0, -1.0, 3.0]], [[-3.0, -4.0, 7.0], [-7.0, -4.0, 0.0]], [[-1.0, -1.0, 0.0], 
-[-1.0, 0.0, -4.0]], [[-6.0, -1.0, -4.0], [0.0, 4.0, 0.0]], [[1.0, 7.0, -4.0], [-1.0, -5.0, 1.0]]], [[[4.0, -4.0, -7.0], [-5.0, 
-5.0, -6.0]], [[6.0, 4.0, 0.0], [-5.0, 4.0, 3.0]], [[-6.0, -2.0, -7.0], [-6.0, 4.0, 0.0]], [[3.0, 2.0, -6.0], [7.0, 0.0, 1.0]], 
-[[6.0, -6.0, 0.0], [2.0, 5.0, 2.0]]], [[[-4.0, 0.0, 5.0], [-5.0, 3.0, 3.0]], [[0.0, 7.0, 0.0], [0.0, 4.0, 3.0]], [[-6.0, 0.0, 
-0.0], [6.0, 2.0, 2.0]], [[7.0, 0.0, -5.0], [-3.0, 7.0, 7.0]], [[-2.0, 0.0, -7.0], [-3.0, -3.0, -4.0]]], [[[3.0, 0.0, 1.0], 
-[5.0, 5.0, 6.0]], [[-7.0, -6.0, 7.0], [2.0, 1.0, -3.0]], [[0.0, 0.0, -2.0], [-4.0, 0.0, 4.0]], [[-6.0, -6.0, 7.0], [1.0, 5.0, 
--5.0]], [[-4.0, 0.0, 6.0], [-6.0, -3.0, 5.0]]]]),self.functionspace)
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[15.0, 9.0, 18.0, -31.0, -26.0], [74.0, 44.0, -18.0, -22.0, 41.0], [-5.0, -10.0, -58.0, 27.0, 
--6.0], [-10.0, -10.0, -12.0, 21.0, -28.0]], [[9.0, 47.0, 6.0, -19.0, -39.0], [32.0, 73.0, -2.0, -68.0, 28.0], [63.0, 28.0, 
--44.0, 44.0, -44.0], [9.0, 12.0, 8.0, 47.0, 37.0]], [[-17.0, 38.0, -9.0, 12.0, 16.0], [-5.0, 21.0, 45.0, -31.0, -19.0], [37.0, 
-8.0, -12.0, 27.0, 13.0], [-13.0, -16.0, 38.0, -25.0, 55.0]], [[18.0, -9.0, 4.0, -24.0, 1.0], [-53.0, -13.0, -67.0, 3.0, -22.0], 
-[-4.0, 19.0, 18.0, -58.0, -35.0], [7.0, 28.0, -38.0, 30.0, -9.0]], [[8.0, -23.0, -4.0, -4.0, 21.0], [-56.0, -62.0, -37.0, 42.0, 
--25.0], [-42.0, -20.0, 38.0, -62.0, 8.0], [-2.0, 14.0, -22.0, -14.0, -19.0]]], [[[42.0, 19.0, -4.0, -44.0, -27.0], [14.0, 58.0, 
--47.0, -26.0, 47.0], [20.0, 12.0, -42.0, 44.0, -50.0], [28.0, -8.0, -2.0, 12.0, 9.0]], [[-9.0, 83.0, 33.0, -34.0, -27.0], [8.0, 
--26.0, -32.0, -68.0, -23.0], [15.0, -47.0, -38.0, -91.0, 4.0], [-66.0, 66.0, -28.0, 71.0, 28.0]], [[-14.0, -46.0, -4.0, 49.0, 
--36.0], [-11.0, -30.0, 23.0, 28.0, 19.0], [4.0, 16.0, 66.0, 4.0, -19.0], [43.0, 39.0, -14.0, 48.0, -30.0]], [[-9.0, 20.0, -2.0, 
-25.0, -44.0], [70.0, 19.0, 65.0, -18.0, 61.0], [19.0, -28.0, -18.0, 76.0, 10.0], [13.0, 0.0, 34.0, 11.0, 8.0]], [[2.0, -8.0, 
-11.0, -20.0, 15.0], [93.0, 56.0, 19.0, -2.0, 25.0], [-20.0, -5.0, -70.0, 58.0, 33.0], [-23.0, -63.0, 14.0, -42.0, -30.0]]], 
-[[[-37.0, 90.0, 20.0, 3.0, -14.0], [-28.0, 7.0, 15.0, -96.0, -61.0], [79.0, 16.0, -10.0, -66.0, -12.0], [-51.0, 64.0, -2.0, 
-75.0, 80.0]], [[-84.0, 59.0, 42.0, 71.0, -72.0], [88.0, -26.0, 112.0, -79.0, -6.0], [58.0, -29.0, 6.0, -31.0, 38.0], [-57.0, 
-91.0, 0.0, 126.0, 16.0]], [[31.0, -62.0, -22.0, -11.0, 22.0], [14.0, 79.0, -13.0, 34.0, 31.0], [-1.0, 64.0, -14.0, 96.0, 
--30.0], [57.0, -76.0, 14.0, -57.0, -26.0]], [[-27.0, -3.0, -20.0, 53.0, 0.0], [4.0, 20.0, 84.0, -4.0, 5.0], [41.0, 26.0, 26.0, 
-71.0, 8.0], [26.0, -18.0, 48.0, -21.0, 36.0]], [[-6.0, -11.0, 5.0, -27.0, 80.0], [-33.0, -5.0, -31.0, 17.0, -78.0], [-32.0, 
-16.0, -18.0, -58.0, 37.0], [-49.0, -46.0, -10.0, -64.0, -3.0]]], [[[14.0, 61.0, 11.0, -55.0, 18.0], [7.0, 49.0, -37.0, -57.0, 
--22.0], [24.0, 4.0, -70.0, -14.0, -7.0], [-41.0, -16.0, 2.0, -8.0, 41.0]], [[33.0, -81.0, -24.0, -8.0, 36.0], [39.0, 38.0, 1.0, 
-78.0, 48.0], [-57.0, 12.0, -16.0, 99.0, 15.0], [45.0, -99.0, 22.0, -103.0, -58.0]], [[5.0, 22.0, -20.0, 12.0, -15.0], [-84.0, 
-23.0, -10.0, -35.0, -18.0], [73.0, 59.0, 42.0, 5.0, -66.0], [44.0, 35.0, 8.0, 37.0, 65.0]], [[58.0, 11.0, -12.0, -60.0, 1.0], 
-[-65.0, -9.0, -99.0, 11.0, 14.0], [-20.0, -13.0, -6.0, -30.0, -47.0], [23.0, 8.0, -22.0, -10.0, 7.0]], [[-12.0, 10.0, -18.0, 
-25.0, 12.0], [-4.0, 17.0, 53.0, -5.0, 0.0], [26.0, 11.0, 6.0, 52.0, 10.0], [12.0, -25.0, 42.0, -36.0, 
-38.0]]]])+(1.-msk_ref)*numpy.array([[[[-25.0, 127.0, 27.0, -18.0, -31.0], [16.0, -30.0, 18.0, -94.0, -21.0], [39.0, -71.0, 
--46.0, -69.0, 24.0], [-80.0, 68.0, 8.0, 59.0, 74.0]], [[-4.0, 63.0, 25.0, -54.0, 36.0], [40.0, 29.0, -20.0, -51.0, -39.0], 
-[-4.0, -24.0, -88.0, -38.0, 38.0], [-82.0, -27.0, 0.0, -24.0, 23.0]], [[18.0, -17.0, -28.0, 32.0, -46.0], [-95.0, -40.0, -17.0, 
-19.0, 25.0], [30.0, 19.0, 92.0, -1.0, -69.0], [80.0, 64.0, -6.0, 50.0, 22.0]], [[-63.0, -41.0, 20.0, 64.0, 3.0], [10.0, -14.0, 
-55.0, -1.0, -56.0], [21.0, 51.0, 50.0, -40.0, 20.0], [-17.0, 29.0, -22.0, 55.0, -27.0]], [[7.0, 53.0, 15.0, -31.0, -14.0], 
-[-2.0, -26.0, -31.0, -31.0, -4.0], [-5.0, -46.0, -26.0, -54.0, 4.0], [-37.0, 35.0, -14.0, 27.0, 17.0]]], [[[17.0, 47.0, -14.0, 
-8.0, -57.0], [-96.0, -72.0, -31.0, -17.0, 16.0], [29.0, -35.0, 66.0, -54.0, -54.0], [35.0, 99.0, -10.0, 71.0, 51.0]], [[-19.0, 
--63.0, -6.0, 38.0, 18.0], [-33.0, -4.0, 11.0, 34.0, -32.0], [3.0, 58.0, 56.0, -7.0, -9.0], [27.0, -3.0, -14.0, 5.0, -26.0]], 
-[[-47.0, 87.0, 34.0, 7.0, -17.0], [48.0, -39.0, 48.0, -66.0, -30.0], [15.0, -66.0, -36.0, -66.0, 56.0], [-89.0, 50.0, 4.0, 
-47.0, 35.0]], [[-33.0, -23.0, 26.0, 11.0, 21.0], [40.0, -15.0, 14.0, 8.0, -38.0], [-27.0, 0.0, -8.0, -46.0, 44.0], [-47.0, 
--4.0, -24.0, 9.0, -43.0]], [[10.0, 12.0, 3.0, -20.0, 3.0], [7.0, 10.0, -17.0, -8.0, 3.0], [-4.0, -7.0, -22.0, -2.0, -1.0], 
-[-9.0, -7.0, -2.0, -6.0, 2.0]]], [[[41.0, -46.0, -4.0, -38.0, 4.0], [25.0, 63.0, -54.0, 22.0, 36.0], [-17.0, 38.0, -32.0, 50.0, 
--35.0], [36.0, -47.0, -16.0, -21.0, -44.0]], [[50.0, -26.0, -29.0, -3.0, -57.0], [37.0, 65.0, 2.0, 15.0, 115.0], [18.0, 14.0, 
--8.0, 140.0, -61.0], [95.0, -26.0, 28.0, -6.0, -10.0]], [[-45.0, 4.0, 25.0, -2.0, 75.0], [41.0, -12.0, 33.0, 1.0, -80.0], 
-[-37.0, -14.0, -42.0, -54.0, 91.0], [-94.0, -48.0, 2.0, -57.0, -14.0]], [[-53.0, -18.0, 11.0, 58.0, -5.0], [74.0, 19.0, 97.0, 
--8.0, -3.0], [19.0, 17.0, 2.0, 44.0, 42.0], [-15.0, -14.0, 22.0, 9.0, -14.0]], [[21.0, -28.0, -3.0, -16.0, 3.0], [49.0, 22.0, 
--5.0, 29.0, 42.0], [-35.0, -14.0, -30.0, 50.0, 11.0], [12.0, -44.0, 6.0, -39.0, -38.0]]], [[[-8.0, 8.0, -20.0, 24.0, 23.0], 
-[-102.0, -85.0, 2.0, 28.0, -43.0], [-10.0, -24.0, 70.0, -61.0, 10.0], [3.0, 32.0, 8.0, -20.0, 37.0]], [[33.0, -67.0, -14.0, 
-17.0, -59.0], [68.0, 15.0, 12.0, 56.0, 116.0], [-33.0, -16.0, 12.0, 106.0, -24.0], [79.0, -16.0, 4.0, 3.0, -71.0]], [[-23.0, 
--14.0, 3.0, 13.0, 31.0], [95.0, 65.0, 72.0, -2.0, 8.0], [-1.0, 15.0, -56.0, 86.0, 51.0], [-22.0, -81.0, 40.0, -63.0, -12.0]], 
-[[56.0, -83.0, -23.0, -42.0, 56.0], [-28.0, -5.0, -74.0, 97.0, 17.0], [-88.0, 0.0, 0.0, 20.0, 2.0], [36.0, -79.0, -12.0, 
--104.0, -65.0]], [[-39.0, -5.0, 30.0, 37.0, -51.0], [172.0, 29.0, 98.0, -16.0, 68.0], [-9.0, -40.0, -52.0, 76.0, 56.0], [-27.0, 
--12.0, 16.0, 31.0, -55.0]]]])
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[0.0, -4.0, 5.0], [7.0, 1.0, 7.0], [1.0, -4.0, -6.0], [0.0, 0.0, 5.0]], [[3.0, -1.0, 4.0], [-3.0, 
+0.0, 3.0], [0.0, -7.0, -7.0], [-4.0, -4.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, -5.0, 0.0], [0.0, -7.0, -3.0], [-6.0, 0.0, 1.0], [-3.0, 0.0, 1.0]], [[2.0, 
+-6.0, 0.0], [4.0, -3.0, -6.0], [6.0, 1.0, -7.0], [7.0, -4.0, 6.0]]]))
+      arg1=Data(numpy.array([[[[3.0, -2.0], [0.0, -3.0], [-5.0, 5.0]], [[-6.0, 4.0], [-7.0, 5.0], [6.0, 4.0]], [[0.0, -5.0], 
+[5.0, -7.0], [-6.0, -2.0]], [[-7.0, -3.0], [-4.0, 0.0], [6.0, 3.0]]], [[[-1.0, -5.0], [5.0, 0.0], [4.0, 1.0]], [[-1.0, -6.0], 
+[-1.0, 5.0], [7.0, 0.0]], [[-2.0, -2.0], [0.0, -7.0], [3.0, -7.0]], [[-7.0, 5.0], [5.0, 3.0], [-4.0, 
+7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([33.0, 221.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-149.0, 54.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_expandedData_rank2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-2.0, 0.0, 1.0], [2.0, 3.0, 3.0]], [[6.0, -4.0, 4.0], [2.0, 3.0, -6.0]], [[-5.0, 5.0, 
--2.0], [0.0, -2.0, 0.0]], [[-5.0, 1.0, -1.0], [2.0, 5.0, -7.0]], [[0.0, 5.0, -2.0], [7.0, -3.0, -6.0]]], [[[3.0, 4.0, 1.0], 
-[-1.0, 1.0, 3.0]], [[4.0, 0.0, -1.0], [5.0, 0.0, 0.0]], [[3.0, 0.0, 0.0], [6.0, 5.0, 4.0]], [[7.0, -7.0, 4.0], [6.0, -3.0, 
--2.0]], [[-3.0, -6.0, 4.0], [-3.0, 4.0, 1.0]]], [[[0.0, 7.0, 6.0], [7.0, 5.0, 3.0]], [[-4.0, -5.0, 5.0], [-1.0, 4.0, -4.0]], 
-[[6.0, -5.0, -7.0], [7.0, -4.0, -6.0]], [[-7.0, 7.0, -7.0], [-2.0, 6.0, 3.0]], [[-6.0, -2.0, 3.0], [-6.0, -3.0, 7.0]]], 
-[[[-1.0, 4.0, 6.0], [-6.0, 4.0, 2.0]], [[1.0, 3.0, 2.0], [-5.0, -6.0, 3.0]], [[0.0, 0.0, 4.0], [-6.0, -2.0, 5.0]], [[2.0, -5.0, 
-0.0], [1.0, -3.0, -1.0]], [[3.0, 1.0, -7.0], [0.0, -5.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[2.0, 5.0, -5.0], [-1.0, -6.0, 
-0.0]], [[-6.0, 3.0, 7.0], [5.0, -2.0, 0.0]], [[-4.0, 4.0, 2.0], [4.0, -4.0, -1.0]], [[3.0, 0.0, -4.0], [5.0, 6.0, 2.0]], [[6.0, 
--7.0, -4.0], [-7.0, -1.0, 5.0]]], [[[1.0, -4.0, 3.0], [-5.0, -1.0, 0.0]], [[-5.0, 2.0, -1.0], [2.0, 5.0, -6.0]], [[-4.0, -6.0, 
-2.0], [0.0, 2.0, -7.0]], [[-5.0, 6.0, 2.0], [7.0, -6.0, 0.0]], [[-3.0, -3.0, -5.0], [-3.0, 4.0, -7.0]]], [[[6.0, 2.0, -2.0], 
-[6.0, -5.0, -6.0]], [[6.0, -2.0, 6.0], [-4.0, -2.0, -4.0]], [[2.0, 6.0, -5.0], [-4.0, -2.0, 2.0]], [[4.0, 2.0, -3.0], [1.0, 
-6.0, 0.0]], [[2.0, -7.0, -3.0], [6.0, 3.0, 0.0]]], [[[-2.0, 7.0, -5.0], [-5.0, 1.0, -4.0]], [[7.0, -2.0, 3.0], [7.0, 6.0, 
--1.0]], [[0.0, -4.0, 7.0], [6.0, -3.0, 0.0]], [[-7.0, -1.0, 6.0], [-4.0, 0.0, 5.0]], [[-6.0, 4.0, 5.0], [4.0, 4.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 6.0, 0.0], [3.0, -6.0, -2.0]])+(1.-msk_arg1)*numpy.array([[2.0, 7.0, -5.0], [1.0, -1.0, 
-2.0]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-8.0, -54.0, 67.0, 21.0, 81.0], [-6.0, -5.0, -35.0, -37.0, -56.0], [27.0, -29.0, -3.0, 29.0, 
-4.0], [-17.0, 28.0, -16.0, -17.0, 21.0]])+(1.-msk_ref)*numpy.array([[69.0, -19.0, 16.0, 29.0, -13.0], [-45.0, -6.0, -76.0, 
-35.0, -23.0], [35.0, -42.0, 73.0, 32.0, -27.0], [56.0, -16.0, -54.0, -45.0, -19.0]])
+   def test_generalTransposedTensorProduct_taggedData_rank0_constData_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,5.0)
+      arg1=Data(numpy.array([[6.0, 4.0, 1.0, 1.0, 0.0], [3.0, 0.0, 4.0, 7.0, 6.0], [7.0, 0.0, -1.0, 1.0, -7.0], [-3.0, -2.0, 
+-4.0, 4.0, 5.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, 
+-0.0, 0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[30.0, 20.0, 5.0, 5.0, 0.0], [15.0, 0.0, 20.0, 35.0, 30.0], [35.0, 0.0, -5.0, 5.0, 
+-35.0], [-15.0, -10.0, -20.0, 20.0, 25.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_expandedData_rank3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 5.0, -3.0], [2.0, 6.0, -3.0]], [[6.0, 0.0, 5.0], [0.0, 2.0, 1.0]], [[-3.0, 2.0, 4.0], 
-[0.0, 7.0, 0.0]], [[-7.0, -6.0, 5.0], [2.0, 7.0, 5.0]], [[0.0, 2.0, -5.0], [-7.0, 5.0, -5.0]]], [[[-2.0, -5.0, -4.0], [-3.0, 
-2.0, -3.0]], [[0.0, -2.0, 7.0], [-3.0, -1.0, 3.0]], [[2.0, 5.0, 3.0], [3.0, -5.0, -5.0]], [[7.0, -3.0, -2.0], [0.0, -1.0, 
--4.0]], [[-3.0, 3.0, 7.0], [-3.0, -5.0, -5.0]]], [[[5.0, 3.0, -6.0], [3.0, -4.0, 0.0]], [[-6.0, -6.0, 6.0], [6.0, 0.0, 5.0]], 
-[[2.0, 2.0, 7.0], [3.0, -6.0, -4.0]], [[5.0, -2.0, 0.0], [1.0, 4.0, 0.0]], [[-6.0, -2.0, -5.0], [-3.0, -1.0, -3.0]]], [[[-6.0, 
-0.0, 5.0], [-3.0, 4.0, -5.0]], [[5.0, 0.0, -2.0], [5.0, 2.0, 1.0]], [[-2.0, 0.0, -7.0], [-7.0, -7.0, -4.0]], [[-1.0, 3.0, 0.0], 
-[2.0, -5.0, 0.0]], [[4.0, 2.0, -7.0], [5.0, -2.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 3.0, 5.0], [0.0, 2.0, -2.0]], 
-[[-4.0, 0.0, -2.0], [-6.0, -3.0, -2.0]], [[5.0, 5.0, 1.0], [2.0, -7.0, 2.0]], [[0.0, -3.0, -2.0], [-4.0, 1.0, -5.0]], [[7.0, 
--6.0, -5.0], [4.0, -7.0, 0.0]]], [[[6.0, 1.0, 1.0], [1.0, -7.0, -1.0]], [[5.0, -3.0, 5.0], [-1.0, 2.0, 1.0]], [[3.0, 6.0, 
--5.0], [6.0, 5.0, 0.0]], [[-3.0, -2.0, -7.0], [-6.0, -1.0, 2.0]], [[1.0, -6.0, 0.0], [-5.0, -3.0, 4.0]]], [[[-7.0, -7.0, -2.0], 
-[0.0, -4.0, 3.0]], [[7.0, 4.0, -6.0], [3.0, 2.0, 7.0]], [[6.0, -3.0, -7.0], [-4.0, -1.0, -6.0]], [[-1.0, 3.0, -4.0], [-7.0, 
-2.0, -5.0]], [[-1.0, 1.0, -7.0], [-6.0, 7.0, -5.0]]], [[[6.0, 5.0, 0.0], [-3.0, 7.0, 3.0]], [[-1.0, 7.0, 0.0], [-2.0, 2.0, 
--4.0]], [[-2.0, 7.0, 7.0], [0.0, 3.0, -2.0]], [[5.0, -1.0, 2.0], [6.0, 6.0, -2.0]], [[4.0, -3.0, 1.0], [-4.0, -6.0, -2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, 0.0, -5.0], [3.0, -7.0, -5.0]], [[7.0, 2.0, 0.0], [-1.0, 5.0, 
-7.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 4.0, -5.0], [1.0, -1.0, -6.0]], [[0.0, 0.0, 1.0], [3.0, -5.0, -2.0]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, 17.0], [-26.0, 59.0], [-78.0, 18.0], [-114.0, 7.0], [-6.0, 1.0]], [[6.0, -32.0], [-52.0, 
-15.0], [60.0, -39.0], [58.0, 10.0], [7.0, -72.0]], [[82.0, 18.0], [-55.0, -25.0], [42.0, -43.0], [-10.0, 50.0], [20.0, -69.0]], 
-[[-55.0, -54.0], [21.0, 47.0], [77.0, -70.0], [38.0, -28.0], [51.0, 52.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -1.0], [47.0, 
--1.0], [-23.0, 38.0], [23.0, -9.0], [-37.0, 42.0]], [[-29.0, 41.0], [-81.0, -10.0], [29.0, -12.0], [31.0, -24.0], [-57.0, 
--8.0]], [[17.0, 12.0], [-44.0, -21.0], [14.0, -2.0], [60.0, -25.0], [63.0, -50.0]], [[-50.0, -50.0], [55.0, -8.0], [16.0, 
--4.0], [-37.0, -6.0], [-31.0, 23.0]]])
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([-1.0, -4.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([2.0, -6.0, -1.0]))
+      arg1=Data(numpy.array([[[2.0, 0.0, 0.0, -3.0, -7.0], [5.0, 5.0, 0.0, 0.0, -2.0], [7.0, -7.0, 7.0, -6.0, -4.0], [-7.0, 
+-4.0, 2.0, -4.0, 5.0]], [[-4.0, -4.0, -3.0, 6.0, 0.0], [2.0, 2.0, 7.0, -6.0, -1.0], [6.0, -6.0, -7.0, 0.0, -6.0], [6.0, 0.0, 
+4.0, -3.0, 7.0]], [[6.0, -3.0, 2.0, 6.0, 2.0], [6.0, 4.0, 6.0, 0.0, 2.0], [5.0, -5.0, 1.0, 4.0, 2.0], [6.0, 1.0, -2.0, -6.0, 
+0.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-22.0, 34.0, 0.0, -57.0, -5.0], [-49.0, -37.0, -64.0, 24.0, -6.0], [-61.0, 61.0, 15.0, -18.0, 
+16.0], [-53.0, -2.0, -6.0, 52.0, -33.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[22.0, 27.0, 16.0, -48.0, -16.0], [-8.0, -6.0, -48.0, 36.0, 0.0], [-27.0, 27.0, 55.0, 
+-16.0, 26.0], [-56.0, -9.0, -18.0, 16.0, -32.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_tensor_transposed_mult_expandedData_rank4_expandedData_rank4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 4.0, 5.0], [6.0, 3.0, -1.0]], [[0.0, 7.0, -3.0], [0.0, 5.0, -2.0]], [[-2.0, 4.0, 
--5.0], [4.0, 2.0, 4.0]], [[3.0, 5.0, 0.0], [-2.0, -7.0, 3.0]], [[1.0, 6.0, -6.0], [-3.0, 7.0, -5.0]]], [[[-5.0, 4.0, 5.0], 
-[6.0, -6.0, 0.0]], [[-7.0, -4.0, -7.0], [7.0, -6.0, -2.0]], [[-5.0, -6.0, 0.0], [-6.0, -1.0, 0.0]], [[-5.0, 1.0, 0.0], [0.0, 
--5.0, -2.0]], [[4.0, 1.0, -1.0], [0.0, -7.0, 4.0]]], [[[4.0, -4.0, -5.0], [-6.0, 5.0, 1.0]], [[1.0, -1.0, -6.0], [-3.0, 0.0, 
-6.0]], [[-1.0, 3.0, 4.0], [2.0, 1.0, 2.0]], [[-5.0, 1.0, 7.0], [-5.0, -5.0, -5.0]], [[-2.0, 6.0, 1.0], [-5.0, -4.0, -5.0]]], 
-[[[0.0, -3.0, 0.0], [-3.0, 5.0, 3.0]], [[-6.0, 6.0, -1.0], [-4.0, -7.0, -3.0]], [[4.0, -3.0, -3.0], [4.0, 3.0, -4.0]], [[4.0, 
--1.0, -4.0], [6.0, 5.0, -3.0]], [[2.0, 0.0, 7.0], [-5.0, -7.0, -1.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 5.0, 4.0], [3.0, 
--5.0, 7.0]], [[3.0, -1.0, 0.0], [6.0, 3.0, -6.0]], [[3.0, -5.0, 7.0], [-4.0, 3.0, 0.0]], [[0.0, 0.0, -7.0], [-6.0, 2.0, 4.0]], 
-[[-7.0, -2.0, 7.0], [-2.0, 3.0, 5.0]]], [[[0.0, -3.0, -4.0], [2.0, 7.0, -3.0]], [[1.0, 1.0, 0.0], [0.0, 7.0, 5.0]], [[-3.0, 
-3.0, 0.0], [6.0, -6.0, 7.0]], [[1.0, 2.0, -5.0], [-6.0, 2.0, -6.0]], [[0.0, -1.0, 2.0], [7.0, -3.0, 1.0]]], [[[-5.0, -1.0, 
-7.0], [5.0, -1.0, -5.0]], [[3.0, 1.0, 3.0], [-3.0, 6.0, -4.0]], [[0.0, 0.0, -3.0], [3.0, -7.0, 5.0]], [[-5.0, 5.0, 7.0], [0.0, 
-3.0, -4.0]], [[-1.0, -7.0, -2.0], [-2.0, 7.0, 4.0]]], [[[0.0, 2.0, 0.0], [2.0, -1.0, -7.0]], [[1.0, 2.0, 0.0], [-6.0, -2.0, 
--3.0]], [[0.0, -4.0, 1.0], [7.0, -6.0, 2.0]], [[6.0, -1.0, -4.0], [7.0, -2.0, 1.0]], [[-1.0, -7.0, -4.0], [-1.0, 5.0, -1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-7.0, -4.0, -1.0], [7.0, -3.0, -1.0]], [[-4.0, -4.0, -5.0], [0.0, -2.0, -4.0]], [[-3.0, 
-6.0, -4.0], [-6.0, 1.0, 0.0]], [[-2.0, 1.0, 1.0], [-6.0, -6.0, 3.0]], [[2.0, -6.0, 6.0], [2.0, -6.0, 5.0]]], [[[-3.0, -3.0, 
--6.0], [0.0, -3.0, -3.0]], [[0.0, -6.0, 7.0], [-1.0, -5.0, -7.0]], [[1.0, -2.0, 0.0], [-4.0, -1.0, 3.0]], [[4.0, -1.0, 4.0], 
-[3.0, 4.0, -6.0]], [[1.0, 1.0, 7.0], [0.0, -6.0, -2.0]]], [[[-4.0, 7.0, -3.0], [-1.0, 0.0, 7.0]], [[-7.0, 4.0, -3.0], [-7.0, 
-0.0, 2.0]], [[0.0, 7.0, -1.0], [-3.0, -7.0, -1.0]], [[1.0, 4.0, 5.0], [0.0, 3.0, 0.0]], [[7.0, -6.0, 6.0], [7.0, -3.0, 5.0]]], 
-[[[-6.0, -3.0, -7.0], [1.0, 7.0, -4.0]], [[2.0, 3.0, 5.0], [0.0, -3.0, 5.0]], [[0.0, 7.0, -7.0], [-6.0, 6.0, 2.0]], [[3.0, 
--7.0, 3.0], [6.0, 5.0, -3.0]], [[5.0, -4.0, -6.0], [3.0, 2.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, 7.0, 0.0], [-5.0, 
-0.0, -3.0]], [[-5.0, -7.0, -2.0], [6.0, -1.0, -7.0]], [[-6.0, 1.0, 0.0], [5.0, -7.0, -2.0]], [[-1.0, -3.0, -6.0], [0.0, -4.0, 
-7.0]], [[4.0, -6.0, -1.0], [-2.0, -5.0, 7.0]]], [[[3.0, -4.0, 5.0], [-7.0, 6.0, -3.0]], [[0.0, 1.0, -6.0], [-5.0, 6.0, -2.0]], 
-[[2.0, 0.0, -5.0], [-1.0, -2.0, 5.0]], [[-1.0, 6.0, 6.0], [2.0, 7.0, 1.0]], [[2.0, 4.0, 5.0], [0.0, 7.0, -1.0]]], [[[-6.0, 
--3.0, -7.0], [2.0, 1.0, -5.0]], [[-6.0, -5.0, 0.0], [6.0, -6.0, 6.0]], [[-1.0, 5.0, -4.0], [-6.0, 7.0, 6.0]], [[3.0, -7.0, 
-6.0], [-4.0, 1.0, 5.0]], [[-1.0, -1.0, -3.0], [-3.0, 3.0, 5.0]]], [[[0.0, -4.0, -3.0], [-4.0, 1.0, -7.0]], [[-1.0, 5.0, -4.0], 
-[-4.0, -4.0, 1.0]], [[0.0, -1.0, 3.0], [4.0, 2.0, 3.0]], [[-7.0, 0.0, 3.0], [4.0, -1.0, -1.0]], [[-7.0, 0.0, 0.0], [3.0, 3.0, 
-3.0]]]])
-      res=tensor_transposed_mult(arg0,arg1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-22.0, -63.0, -44.0, -58.0, 5.0], [-63.0, -3.0, -33.0, 72.0, 28.0], [-20.0, -78.0, -15.0, 
-55.0, 69.0], [-46.0, 33.0, -27.0, 56.0, 3.0]], [[-38.0, -15.0, 59.0, -32.0, -100.0], [-12.0, -74.0, -25.0, 13.0, -40.0], [44.0, 
-33.0, 19.0, 28.0, -85.0], [43.0, -19.0, 96.0, -27.0, 0.0]], [[21.0, -3.0, 28.0, -21.0, -42.0], [6.0, -101.0, -16.0, -36.0, 
--53.0], [75.0, 25.0, 3.0, -5.0, -26.0], [37.0, -3.0, 59.0, -27.0, 20.0]], [[-37.0, -30.0, 26.0, 62.0, 29.0], [-12.0, -14.0, 
-17.0, -45.0, 44.0], [46.0, 19.0, 87.0, 2.0, 13.0], [-96.0, 57.0, 11.0, -82.0, -25.0]], [[-62.0, 8.0, 82.0, -41.0, -143.0], 
-[9.0, -75.0, -21.0, 23.0, -67.0], [24.0, 46.0, 13.0, 16.0, -132.0], [84.0, -56.0, 134.0, -25.0, 22.0]]], [[[74.0, -9.0, -23.0, 
-19.0, 44.0], [-9.0, 35.0, -31.0, -10.0, 70.0], [27.0, -6.0, 47.0, 18.0, 31.0], [-53.0, 45.0, -79.0, -22.0, -65.0]], [[141.0, 
-99.0, -23.0, -9.0, 8.0], [99.0, 12.0, -27.0, -43.0, -20.0], [0.0, 1.0, 2.0, -76.0, -10.0], [76.0, -53.0, -61.0, 4.0, 32.0]], 
-[[20.0, 46.0, 14.0, 46.0, 20.0], [36.0, 47.0, 32.0, -36.0, -5.0], [-16.0, 53.0, -17.0, -32.0, -38.0], [35.0, -25.0, -12.0, 
--14.0, -21.0]], [[48.0, 34.0, 16.0, 35.0, 4.0], [33.0, 33.0, -8.0, -29.0, 30.0], [13.0, 35.0, 44.0, -16.0, -36.0], [0.0, -2.0, 
--27.0, -41.0, -39.0]], [[-14.0, -17.0, -9.0, 46.0, 58.0], [0.0, -6.0, 21.0, -41.0, 32.0], [22.0, -13.0, 53.0, -18.0, 57.0], 
-[-85.0, 47.0, -20.0, -45.0, 8.0]]], [[[-65.0, 11.0, 25.0, -8.0, -35.0], [12.0, -37.0, 34.0, -4.0, -67.0], [-16.0, 15.0, -41.0, 
--22.0, -30.0], [48.0, -39.0, 75.0, 11.0, 58.0]], [[-24.0, 6.0, 33.0, 27.0, -4.0], [18.0, -75.0, 33.0, -64.0, -54.0], [52.0, 
-40.0, 2.0, -33.0, -14.0], [12.0, -1.0, 65.0, -44.0, 36.0]], [[0.0, -38.0, -6.0, -3.0, 12.0], [-39.0, -11.0, -10.0, 7.0, 20.0], 
-[25.0, -3.0, 2.0, 34.0, 20.0], [-30.0, 34.0, -9.0, -1.0, -33.0]], [[9.0, 11.0, 18.0, 63.0, 21.0], [0.0, 108.0, 3.0, 2.0, 85.0], 
-[-24.0, 43.0, 55.0, 19.0, -44.0], [-42.0, 18.0, -52.0, -41.0, -96.0]], [[-29.0, 7.0, 64.0, 50.0, -45.0], [9.0, 31.0, -5.0, 
--11.0, 45.0], [17.0, 60.0, 89.0, 15.0, -92.0], [-26.0, 6.0, 31.0, -80.0, -63.0]]], [[[-27.0, -10.0, 5.0, -6.0, -3.0], [-15.0, 
--25.0, 22.0, -4.0, -39.0], [3.0, 15.0, -50.0, 3.0, -3.0], [29.0, -9.0, 33.0, 19.0, 13.0]], [[15.0, 31.0, 75.0, 74.0, -35.0], 
-[36.0, 17.0, -4.0, -56.0, 41.0], [52.0, 91.0, 107.0, -8.0, -106.0], [-16.0, 7.0, 25.0, -113.0, -74.0]], [[10.0, 21.0, -39.0, 
--68.0, -22.0], [18.0, 6.0, -21.0, 55.0, -30.0], [-60.0, -67.0, -47.0, -14.0, 27.0], [47.0, -45.0, -14.0, 75.0, 68.0]], [[10.0, 
-10.0, -33.0, -88.0, -43.0], [9.0, -32.0, -32.0, 57.0, -49.0], [-38.0, -68.0, -53.0, -5.0, 22.0], [60.0, -45.0, 9.0, 77.0, 
-76.0]], [[-34.0, -25.0, -11.0, 72.0, 73.0], [-24.0, 96.0, 26.0, -1.0, 95.0], [-31.0, -2.0, 58.0, 16.0, 37.0], [-111.0, 55.0, 
--63.0, -35.0, -61.0]]]])+(1.-msk_ref)*numpy.array([[[[-1.0, -69.0, 41.0, 30.0, 34.0], [-72.0, -78.0, 22.0, 32.0, -2.0], [-77.0, 
-65.0, -2.0, 7.0, -6.0], [-98.0, 24.0, 30.0, 22.0, 15.0]], [[-37.0, 67.0, 2.0, -54.0, -51.0], [7.0, -1.0, -36.0, 18.0, 29.0], 
-[30.0, -31.0, -59.0, -35.0, -41.0], [25.0, -50.0, 13.0, 6.0, -12.0]], [[-33.0, -21.0, -64.0, -42.0, 28.0], [110.0, -9.0, -31.0, 
-22.0, 42.0], [-57.0, -35.0, -11.0, 105.0, 2.0], [18.0, -52.0, 16.0, -19.0, -24.0]], [[18.0, -52.0, -52.0, 62.0, 37.0], [7.0, 
-76.0, 57.0, -36.0, -25.0], [19.0, -24.0, 102.0, 4.0, 65.0], [19.0, 48.0, -29.0, -51.0, 0.0]], [[23.0, -15.0, -1.0, -6.0, 1.0], 
-[39.0, -26.0, -28.0, 59.0, 29.0], [-27.0, 52.0, 32.0, 71.0, 28.0], [-37.0, -30.0, 36.0, 54.0, 67.0]]], [[[-22.0, 55.0, -36.0, 
--16.0, -38.0], [29.0, 59.0, -11.0, 8.0, 20.0], [63.0, -33.0, 20.0, -19.0, 15.0], [44.0, -38.0, 4.0, -8.0, 18.0]], [[-14.0, 
--54.0, -64.0, 3.0, -2.0], [26.0, 33.0, 13.0, 59.0, 50.0], [-27.0, -23.0, 83.0, 28.0, 44.0], [-32.0, -19.0, 28.0, -19.0, 29.0]], 
-[[-12.0, -13.0, 79.0, 67.0, 37.0], [-120.0, -77.0, 35.0, -2.0, -43.0], [-20.0, 117.0, -18.0, -25.0, -1.0], [-91.0, 25.0, 30.0, 
-44.0, 42.0]], [[56.0, -5.0, -36.0, -27.0, -43.0], [42.0, 86.0, -1.0, -23.0, 5.0], [43.0, -100.0, 43.0, -45.0, 6.0], [75.0, 
-39.0, -55.0, -42.0, -37.0]], [[-45.0, 41.0, 53.0, 10.0, 12.0], [-56.0, -68.0, -6.0, 0.0, -16.0], [-5.0, 71.0, -70.0, -7.0, 
--30.0], [-40.0, -28.0, 32.0, 36.0, 15.0]]], [[[13.0, 84.0, 71.0, -65.0, -61.0], [-2.0, -64.0, -73.0, 39.0, 19.0], [18.0, 41.0, 
--95.0, -12.0, -58.0], [-3.0, -49.0, 25.0, 82.0, 32.0]], [[16.0, -24.0, -66.0, -76.0, -49.0], [89.0, 42.0, -38.0, 53.0, 71.0], 
-[-22.0, -101.0, 26.0, 18.0, -6.0], [33.0, -26.0, -4.0, -26.0, -24.0]], [[-30.0, -4.0, 54.0, 81.0, 67.0], [-93.0, -49.0, 51.0, 
--56.0, -69.0], [-5.0, 90.0, -25.0, -12.0, 4.0], [-45.0, 33.0, 4.0, 5.0, 3.0]], [[77.0, 1.0, 22.0, -92.0, -100.0], [30.0, -11.0, 
--71.0, 94.0, 70.0], [-11.0, -37.0, -1.0, -25.0, -32.0], [-10.0, -14.0, 10.0, 57.0, 32.0]], [[-45.0, 11.0, -68.0, 34.0, 37.0], 
-[59.0, 49.0, 16.0, -4.0, 5.0], [24.0, 11.0, 59.0, 69.0, 61.0], [21.0, -42.0, 19.0, -18.0, 34.0]]], [[[25.0, 48.0, 33.0, -51.0, 
--60.0], [-7.0, 0.0, -35.0, 2.0, 8.0], [32.0, -34.0, -51.0, -58.0, -46.0], [32.0, -1.0, -17.0, 16.0, -18.0]], [[47.0, -32.0, 
--14.0, -20.0, -7.0], [34.0, 26.0, -3.0, -18.0, -1.0], [-11.0, -58.0, 13.0, -4.0, -6.0], [35.0, 38.0, -39.0, -26.0, -40.0]], 
-[[-69.0, 60.0, 69.0, 44.0, 53.0], [-70.0, -85.0, 10.0, -44.0, -55.0], [3.0, 110.0, -96.0, 10.0, -28.0], [-35.0, -26.0, 29.0, 
-35.0, 9.0]], [[-81.0, 22.0, 10.0, 36.0, 37.0], [-62.0, -26.0, 34.0, -35.0, -27.0], [2.0, 29.0, -45.0, -24.0, -15.0], [-21.0, 
--14.0, 16.0, -25.0, -24.0]], [[-35.0, 58.0, -39.0, 19.0, 12.0], [45.0, 54.0, 4.0, -33.0, -14.0], [63.0, -1.0, 17.0, 26.0, 
-33.0], [56.0, -35.0, -2.0, -13.0, 16.0]]]])
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[4.0, -2.0, -1.0], [4.0, -1.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, 0.0, -4.0], [-6.0, -7.0, -2.0]]))
+      arg1=Data(numpy.array([[[[-5.0, -3.0, -6.0, 7.0, 3.0], [-4.0, 3.0, -7.0, 2.0, 4.0], [7.0, 3.0, 7.0, -4.0, -5.0], [5.0, 
+2.0, -6.0, 2.0, -5.0]], [[-7.0, 7.0, 0.0, -2.0, 1.0], [7.0, -5.0, -2.0, -7.0, 0.0], [-3.0, -6.0, -6.0, -6.0, -4.0], [0.0, 6.0, 
+-6.0, -2.0, -6.0]], [[6.0, 7.0, -4.0, 1.0, -4.0], [1.0, 6.0, -6.0, 0.0, 3.0], [7.0, -1.0, -4.0, -5.0, -6.0], [-4.0, 7.0, -2.0, 
+4.0, 0.0]]], [[[-7.0, 0.0, -4.0, -4.0, 5.0], [1.0, -2.0, -4.0, -4.0, -5.0], [3.0, 2.0, -4.0, -1.0, -7.0], [-6.0, 0.0, 0.0, 2.0, 
+-5.0]], [[1.0, -6.0, -5.0, 7.0, 1.0], [6.0, -3.0, 6.0, 0.0, 2.0], [-5.0, -4.0, 2.0, -7.0, 0.0], [4.0, -7.0, -2.0, 0.0, 4.0]], 
+[[7.0, -5.0, -3.0, -3.0, -1.0], [6.0, -4.0, 7.0, 6.0, -3.0], [7.0, 2.0, -4.0, 1.0, 3.0], [-2.0, 7.0, -2.0, -7.0, 
+4.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-76.0, -2.0, -16.0, 23.0, 38.0], [-63.0, 31.0, -75.0, -24.0, 6.0], [9.0, 27.0, 46.0, -1.0, -49.0], 
+[6.0, -39.0, 2.0, 51.0, -52.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-13.0, 18.0, 69.0, -9.0, -13.0], [-72.0, 23.0, -22.0, 16.0, 18.0], [-11.0, 22.0, 48.0, 
+65.0, 50.0], [38.0, 11.0, 14.0, -10.0, -16.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_constData_rank3_offset0(self):
+      arg0=Data(-7.0,self.functionspace)
+      arg0.setTaggedValue(1,2.0)
+      arg1=Data(numpy.array([[[-5.0, -5.0], [-6.0, -3.0]], [[-6.0, -4.0], [6.0, 6.0]], [[-4.0, -2.0], [-5.0, -2.0]], [[-1.0, 
+1.0], [-3.0, 6.0]], [[-5.0, -6.0], [1.0, 5.0]], [[7.0, 5.0], [-1.0, 3.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[35.0, 35.0], [42.0, 21.0]], [[42.0, 28.0], [-42.0, -42.0]], [[28.0, 14.0], [35.0, 14.0]], [[7.0, 
+-7.0], [21.0, -42.0]], [[35.0, 42.0], [-7.0, -35.0]], [[-49.0, -35.0], [7.0, -21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-10.0, -10.0], [-12.0, -6.0]], [[-12.0, -8.0], [12.0, 12.0]], [[-8.0, -4.0], [-10.0, 
+-4.0]], [[-2.0, 2.0], [-6.0, 12.0]], [[-10.0, -12.0], [2.0, 10.0]], [[14.0, 10.0], [-2.0, 6.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_float_rank0_offset0(self):
-      arg0=-5.0
-      arg1=7.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=-35.0
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([-7.0, -4.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([2.0, -2.0, -1.0]))
+      arg1=Data(numpy.array([[[[3.0, 3.0], [-5.0, -4.0]], [[-4.0, 0.0], [0.0, 7.0]], [[-7.0, 3.0], [-6.0, -6.0]], [[-4.0, 
+-7.0], [-7.0, 7.0]], [[-3.0, -6.0], [-4.0, -5.0]], [[-7.0, 2.0], [-4.0, -3.0]]], [[[1.0, 6.0], [3.0, -2.0]], [[-1.0, -5.0], 
+[6.0, -3.0]], [[-4.0, -2.0], [0.0, 4.0]], [[-3.0, 0.0], [3.0, 5.0]], [[0.0, 0.0], [0.0, 7.0]], [[-6.0, 4.0], [-4.0, -1.0]]], 
+[[[-3.0, 1.0], [-7.0, -5.0]], [[4.0, 3.0], [-6.0, -1.0]], [[5.0, -7.0], [0.0, -4.0]], [[2.0, 0.0], [-1.0, 3.0]], [[-7.0, 2.0], 
+[-7.0, -7.0]], [[6.0, 0.0], [4.0, -3.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-4.0, -52.0], [72.0, 71.0]], [[4.0, -1.0], [18.0, -30.0]], [[30.0, 36.0], [42.0, 54.0]], [[26.0, 
+49.0], [44.0, -90.0]], [[70.0, 28.0], [77.0, 56.0]], [[31.0, -30.0], [16.0, 46.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[7.0, -7.0], [-9.0, 1.0]], [[-10.0, 7.0], [-6.0, 21.0]], [[-11.0, 17.0], [-12.0, 
+-16.0]], [[-4.0, -14.0], [-19.0, 1.0]], [[1.0, -14.0], [-1.0, -17.0]], [[-8.0, -4.0], [-4.0, -1.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_array_rank0_offset0(self):
-      arg0=0.0
-      arg1=numpy.array(-7.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(-0.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result."+str(type(res)))
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank0_constData_rank4_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,-1.0)
+      arg1=Data(numpy.array([[[[-2.0, 3.0, 1.0, -7.0], [-7.0, 6.0, -5.0, -1.0], [-7.0, 0.0, -3.0, -5.0]], [[-3.0, 3.0, -7.0, 
+3.0], [5.0, -6.0, -7.0, 2.0], [0.0, -7.0, 3.0, -1.0]]], [[[-3.0, -3.0, 0.0, 0.0], [1.0, 6.0, 3.0, 3.0], [0.0, -4.0, 6.0, 
+-5.0]], [[-3.0, 0.0, -2.0, 3.0], [-2.0, -6.0, 0.0, -3.0], [-2.0, 0.0, 0.0, 1.0]]], [[[2.0, 6.0, 5.0, -6.0], [-6.0, 4.0, 7.0, 
+-4.0], [2.0, 2.0, 3.0, 2.0]], [[0.0, -3.0, 2.0, -1.0], [0.0, -5.0, -1.0, -7.0], [0.0, 7.0, 0.0, 1.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[2.0, -3.0, -1.0, 7.0], [7.0, -6.0, 5.0, 1.0], [7.0, -0.0, 3.0, 5.0]], [[3.0, -3.0, 7.0, -3.0], 
+[-5.0, 6.0, 7.0, -2.0], [-0.0, 7.0, -3.0, 1.0]]], [[[3.0, 3.0, -0.0, -0.0], [-1.0, -6.0, -3.0, -3.0], [-0.0, 4.0, -6.0, 5.0]], 
+[[3.0, -0.0, 2.0, -3.0], [2.0, 6.0, -0.0, 3.0], [2.0, -0.0, -0.0, -1.0]]], [[[-2.0, -6.0, -5.0, 6.0], [6.0, -4.0, -7.0, 4.0], 
+[-2.0, -2.0, -3.0, -2.0]], [[-0.0, 3.0, -2.0, 1.0], [-0.0, 5.0, 1.0, 7.0], [-0.0, -7.0, -0.0, -1.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[2.0, -3.0, -1.0, 7.0], [7.0, -6.0, 5.0, 1.0], [7.0, -0.0, 3.0, 5.0]], [[3.0, -3.0, 
+7.0, -3.0], [-5.0, 6.0, 7.0, -2.0], [-0.0, 7.0, -3.0, 1.0]]], [[[3.0, 3.0, -0.0, -0.0], [-1.0, -6.0, -3.0, -3.0], [-0.0, 4.0, 
+-6.0, 5.0]], [[3.0, -0.0, 2.0, -3.0], [2.0, 6.0, -0.0, 3.0], [2.0, -0.0, -0.0, -1.0]]], [[[-2.0, -6.0, -5.0, 6.0], [6.0, -4.0, 
+-7.0, 4.0], [-2.0, -2.0, -3.0, -2.0]], [[-0.0, 3.0, -2.0, 1.0], [-0.0, 5.0, 1.0, 7.0], [-0.0, -7.0, -0.0, -1.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=numpy.array(arg1*1j)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=-ref
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result."+str(type(res)))
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_array_rank1_offset0(self):
-      arg0=4.0
-      arg1=numpy.array([-2.0, 3.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([-8.0, 12.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      arg0.setTaggedValue(1,-6.0)
+      arg1=Data(5.0,self.functionspace)
+      arg1.setTaggedValue(1,-6.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(20.0,self.functionspace)
+      ref.setTaggedValue(1,36.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_array_rank2_offset0(self):
-      arg0=0.0
-      arg1=numpy.array([[1.0, 0.0, 7.0, 4.0, 5.0], [6.0, -3.0, 5.0, 0.0, 2.0], [2.0, 6.0, -6.0, -1.0, 7.0], [0.0, -3.0, 6.0, 
-1.0, 4.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 
-0.0, 0.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-4.0, -7.0, 1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, -3.0, 6.0]))
+      arg1=Data(numpy.array([6.0, -1.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, -3.0, -4.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-11.0,self.functionspace)
+      ref.setTaggedValue(1,-15.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_array_rank3_offset0(self):
-      arg0=-6.0
-      arg1=numpy.array([[[3.0, 6.0], [1.0, -6.0]], [[-3.0, -3.0], [-4.0, -2.0]], [[4.0, -4.0], [4.0, -2.0]], [[5.0, 1.0], [6.0, 
-4.0]], [[0.0, 0.0], [2.0, 7.0]], [[-3.0, -1.0], [6.0, 0.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-18.0, -36.0], [-6.0, 36.0]], [[18.0, 18.0], [24.0, 12.0]], [[-24.0, 24.0], [-24.0, 12.0]], [[-30.0, 
--6.0], [-36.0, -24.0]], [[-0.0, -0.0], [-12.0, -42.0]], [[18.0, 6.0], [-36.0, -0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-3.0, -3.0, 0.0], [-7.0, -2.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -1.0, -1.0], [1.0, 4.0, 6.0]]))
+      arg1=Data(numpy.array([[-4.0, -5.0, -6.0], [4.0, 2.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 7.0, -7.0], [5.0, 5.0, -5.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-5.0,self.functionspace)
+      ref.setTaggedValue(1,-5.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_array_rank4_offset0(self):
-      arg0=-4.0
-      arg1=numpy.array([[[[-1.0, -5.0, -2.0, 2.0], [1.0, 3.0, -3.0, 4.0], [-6.0, 2.0, 4.0, 7.0]], [[4.0, 7.0, -3.0, 0.0], [3.0, 
--7.0, 1.0, -5.0], [0.0, 2.0, -4.0, 2.0]]], [[[0.0, 0.0, -3.0, 3.0], [0.0, 4.0, 7.0, -4.0], [6.0, 7.0, 0.0, -6.0]], [[1.0, -6.0, 
--4.0, 4.0], [4.0, 7.0, -5.0, 6.0], [1.0, 3.0, 0.0, -5.0]]], [[[0.0, 7.0, -3.0, 0.0], [1.0, 0.0, 1.0, -4.0], [7.0, 1.0, -4.0, 
-4.0]], [[-2.0, 5.0, -4.0, -5.0], [-4.0, 2.0, -3.0, 7.0], [-2.0, 1.0, 6.0, -3.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[4.0, 20.0, 8.0, -8.0], [-4.0, -12.0, 12.0, -16.0], [24.0, -8.0, -16.0, -28.0]], [[-16.0, -28.0, 12.0, 
--0.0], [-12.0, 28.0, -4.0, 20.0], [-0.0, -8.0, 16.0, -8.0]]], [[[-0.0, -0.0, 12.0, -12.0], [-0.0, -16.0, -28.0, 16.0], [-24.0, 
--28.0, -0.0, 24.0]], [[-4.0, 24.0, 16.0, -16.0], [-16.0, -28.0, 20.0, -24.0], [-4.0, -12.0, -0.0, 20.0]]], [[[-0.0, -28.0, 
-12.0, -0.0], [-4.0, -0.0, -4.0, 16.0], [-28.0, -4.0, 16.0, -16.0]], [[8.0, -20.0, 16.0, 20.0], [16.0, -8.0, 12.0, -28.0], [8.0, 
--4.0, -24.0, 12.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[0.0, 7.0, -3.0], [-1.0, 2.0, 3.0], [0.0, -1.0, -2.0], [7.0, -3.0, 4.0]], [[-1.0, 7.0, -2.0], 
+[-3.0, -1.0, 0.0], [3.0, 2.0, 4.0], [0.0, 5.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[2.0, 0.0, -2.0], [3.0, -2.0, 2.0], [-5.0, -1.0, 4.0], [6.0, -2.0, 0.0]], [[0.0, 
+-1.0, 1.0], [3.0, 4.0, 0.0], [-1.0, -6.0, -2.0], [-6.0, 1.0, 0.0]]]))
+      arg1=Data(numpy.array([[[-3.0, 6.0, -3.0], [-7.0, 1.0, -7.0], [-2.0, -6.0, 2.0], [3.0, 2.0, 0.0]], [[-2.0, 2.0, -2.0], 
+[0.0, 1.0, -7.0], [0.0, -3.0, 4.0], [0.0, 1.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, -7.0, -2.0], [-4.0, -6.0, -5.0], [-6.0, -6.0, 1.0], [-3.0, -1.0, -7.0]], 
+[[-4.0, -3.0, 3.0], [2.0, -3.0, -2.0], [4.0, -5.0, 2.0], [0.0, 0.0, 3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(105.0,self.functionspace)
+      ref.setTaggedValue(1,38.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_constData_rank0_offset0(self):
-      arg0=6.0
-      arg1=Data(-1.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-6.0,self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-1.0, -7.0], [5.0, 1.0], [-5.0, 4.0]], [[-6.0, 7.0], [4.0, 3.0], [3.0, 0.0]]], [[[7.0, -2.0], 
+[-2.0, -7.0], [-4.0, -2.0]], [[-7.0, 0.0], [-2.0, -7.0], [-6.0, 2.0]]], [[[7.0, 7.0], [-7.0, -2.0], [1.0, -1.0]], [[-3.0, 
+-7.0], [-1.0, 0.0], [0.0, 5.0]]], [[[3.0, -4.0], [-4.0, -7.0], [2.0, 4.0]], [[4.0, 1.0], [4.0, 2.0], [0.0, 
+-2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, -3.0], [1.0, 3.0], [-3.0, -6.0]], [[-6.0, -3.0], [0.0, 6.0], [-4.0, -7.0]]], 
+[[[-5.0, 6.0], [-2.0, 0.0], [2.0, 0.0]], [[-1.0, 1.0], [7.0, 4.0], [-6.0, 0.0]]], [[[5.0, 4.0], [4.0, 2.0], [7.0, 0.0]], 
+[[-1.0, 6.0], [4.0, -3.0], [-6.0, -5.0]]], [[[0.0, -5.0], [5.0, -2.0], [3.0, -2.0]], [[3.0, 2.0], [-6.0, 6.0], [1.0, 4.0]]]]))
+      arg1=Data(numpy.array([[[[2.0, 1.0], [-3.0, -3.0], [4.0, 4.0]], [[-1.0, -4.0], [6.0, 5.0], [7.0, -5.0]]], [[[6.0, 7.0], 
+[-5.0, 3.0], [-2.0, 6.0]], [[2.0, 0.0], [-3.0, 6.0], [-6.0, -6.0]]], [[[-4.0, 4.0], [1.0, 0.0], [-6.0, 1.0]], [[0.0, 6.0], 
+[0.0, -6.0], [-5.0, -5.0]]], [[[-2.0, -7.0], [5.0, 2.0], [2.0, 0.0]], [[0.0, -3.0], [-4.0, -3.0], [4.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, -4.0], [-7.0, 7.0], [0.0, 5.0]], [[5.0, 2.0], [4.0, -7.0], [-7.0, 6.0]]], 
+[[[2.0, 0.0], [5.0, -5.0], [-7.0, -4.0]], [[5.0, 1.0], [-7.0, -5.0], [1.0, -4.0]]], [[[-7.0, -1.0], [4.0, -7.0], [-5.0, 5.0]], 
+[[-1.0, 2.0], [7.0, 3.0], [-6.0, -3.0]]], [[[-2.0, -7.0], [3.0, -6.0], [6.0, -6.0]], [[0.0, -5.0], [6.0, -6.0], [-7.0, 6.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-120.0,self.functionspace)
+      ref.setTaggedValue(1,-141.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_constData_rank1_offset0(self):
-      arg0=0.0
-      arg1=Data(numpy.array([-4.0, 6.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-0.0, 0.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,-5.0)
+      arg1=Data(numpy.array([-5.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, -2.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([15.0, -21.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-0.0, 10.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_constData_rank2_offset0(self):
-      arg0=0.0
-      arg1=Data(numpy.array([[-1.0, 0.0, 2.0, 1.0, 3.0], [-3.0, 3.0, 1.0, -4.0, 0.0], [-5.0, 7.0, -6.0, -5.0, 7.0], [6.0, 6.0, 
--2.0, 7.0, 5.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-0.0, 0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 
--0.0, 0.0, 0.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-4.0, 2.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, -1.0, 4.0]))
+      arg1=Data(numpy.array([[-5.0, -7.0], [0.0, 0.0], [-5.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 2.0], [-7.0, -7.0], [0.0, 3.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([50.0, 34.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([7.0, 19.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[0.0, -3.0, -4.0], [5.0, 5.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -2.0, 0.0], [7.0, -5.0, 7.0]]))
+      arg1=Data(numpy.array([[[1.0, -6.0], [-6.0, 6.0], [-2.0, 4.0]], [[-5.0, 5.0], [-5.0, 1.0], [-7.0, 
+-4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-2.0, 2.0], [-5.0, -6.0], [-2.0, -6.0]], [[3.0, 6.0], [-4.0, -1.0], [-4.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-24.0, -4.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([23.0, 59.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[2.0, -7.0, -4.0], [-3.0, 5.0, 5.0], [-4.0, -3.0, 0.0], [2.0, -6.0, 2.0]], [[-5.0, 4.0, 2.0], 
+[-3.0, 1.0, -6.0], [0.0, 5.0, -2.0], [-4.0, -3.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 2.0, 4.0], [-4.0, 1.0, 4.0], [7.0, -4.0, 6.0], [-4.0, -7.0, -3.0]], [[-3.0, 
+7.0, 7.0], [-7.0, -3.0, 5.0], [-7.0, 0.0, -1.0], [0.0, -2.0, 7.0]]]))
+      arg1=Data(numpy.array([[[[-3.0, 6.0], [7.0, 5.0], [-3.0, 7.0]], [[-3.0, 0.0], [3.0, 7.0], [-3.0, -2.0]], [[6.0, 0.0], 
+[7.0, 0.0], [-7.0, 7.0]], [[6.0, -4.0], [6.0, -7.0], [-3.0, 4.0]]], [[[2.0, 2.0], [-3.0, 7.0], [1.0, -2.0]], [[-4.0, 6.0], 
+[-1.0, 0.0], [2.0, -5.0]], [[-3.0, -6.0], [2.0, 1.0], [-1.0, 1.0]], [[-7.0, 0.0], [7.0, 5.0], [-5.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 0.0], [-5.0, -6.0], [-7.0, -3.0]], [[6.0, -6.0], [-3.0, 7.0], [-3.0, -3.0]], 
+[[-7.0, -6.0], [5.0, -3.0], [3.0, 2.0]], [[1.0, -4.0], [6.0, -2.0], [-2.0, 0.0]]], [[[6.0, -2.0], [-6.0, -5.0], [1.0, 0.0]], 
+[[0.0, 7.0], [-2.0, 5.0], [-7.0, 1.0]], [[4.0, -7.0], [-2.0, 5.0], [-5.0, -6.0]], [[3.0, -5.0], [4.0, 4.0], [5.0, 4.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-76.0, 72.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-246.0, -6.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,-3.0)
+      arg1=Data(numpy.array([[0.0, 2.0, -6.0, 0.0, 0.0], [-3.0, 1.0, -3.0, 0.0, 7.0], [-5.0, 7.0, 0.0, 0.0, 3.0], [-7.0, -5.0, 
+-6.0, -4.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, -6.0, -5.0, -4.0, 6.0], [-7.0, -4.0, -2.0, 2.0, 0.0], [3.0, 6.0, 6.0, -1.0, 
+4.0], [2.0, 6.0, 7.0, 2.0, 2.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, -6.0, 18.0, -0.0, -0.0], [9.0, -3.0, 9.0, -0.0, -21.0], [15.0, -21.0, -0.0, -0.0, -9.0], 
+[21.0, 15.0, 18.0, 12.0, -6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[3.0, 18.0, 15.0, 12.0, -18.0], [21.0, 12.0, 6.0, -6.0, -0.0], [-9.0, -18.0, -18.0, 
+3.0, -12.0], [-6.0, -18.0, -21.0, -6.0, -6.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-6.0, -3.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, -4.0, 2.0]))
+      arg1=Data(numpy.array([[[7.0, 2.0, 4.0, 0.0, -1.0], [-1.0, 0.0, -5.0, 6.0, 6.0], [7.0, -5.0, -4.0, 0.0, -6.0], [7.0, 
+-2.0, 6.0, -7.0, -6.0]], [[-2.0, 0.0, 0.0, -3.0, -4.0], [-4.0, 3.0, 6.0, -2.0, 0.0], [-6.0, 3.0, 7.0, -5.0, -3.0], [-7.0, -2.0, 
+7.0, -7.0, 5.0]], [[-1.0, 4.0, -7.0, -2.0, -3.0], [1.0, 3.0, 0.0, 4.0, -4.0], [-6.0, -4.0, -6.0, -4.0, -1.0], [2.0, -5.0, 5.0, 
+-5.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -3.0, -6.0, -1.0, -3.0], [1.0, -7.0, -1.0, 2.0, -5.0], [-5.0, 1.0, -4.0, 3.0, 
+3.0], [-4.0, 2.0, 0.0, 7.0, -6.0]], [[7.0, -5.0, 1.0, 5.0, 7.0], [1.0, 5.0, 6.0, 7.0, -2.0], [0.0, -3.0, 0.0, -7.0, -7.0], 
+[-1.0, 6.0, 1.0, 5.0, -1.0]], [[4.0, 0.0, -7.0, 7.0, -6.0], [2.0, 6.0, -3.0, -3.0, 6.0], [0.0, -7.0, 6.0, -5.0, 7.0], [-6.0, 
+1.0, 0.0, -7.0, 5.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-40.0, 4.0, -52.0, 1.0, 6.0], [22.0, 3.0, 12.0, -14.0, -52.0], [-48.0, 5.0, -21.0, -1.0, 41.0], 
+[-13.0, -2.0, -37.0, 43.0, 9.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-20.0, 23.0, -12.0, -5.0, -37.0], [-1.0, -1.0, -29.0, -36.0, 25.0], [5.0, -3.0, 16.0, 
+15.0, 39.0], [-4.0, -24.0, -4.0, -41.0, 20.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_constData_rank3_offset0(self):
-      arg0=2.0
-      arg1=Data(numpy.array([[[1.0, -6.0], [0.0, 0.0]], [[1.0, 0.0], [-5.0, 2.0]], [[4.0, 2.0], [-5.0, 7.0]], [[3.0, 0.0], 
-[-6.0, 0.0]], [[2.0, 2.0], [-2.0, -2.0]], [[4.0, -6.0], [0.0, -1.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[2.0, -12.0], [0.0, 0.0]], [[2.0, 0.0], [-10.0, 4.0]], [[8.0, 4.0], [-10.0, 14.0]], [[6.0, 0.0], 
-[-12.0, 0.0]], [[4.0, 4.0], [-4.0, -4.0]], [[8.0, -12.0], [0.0, -2.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-5.0, 2.0, -4.0], [1.0, 3.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, 7.0, 7.0], [-4.0, -1.0, -1.0]]))
+      arg1=Data(numpy.array([[[[-4.0, 2.0, 4.0, 1.0, -1.0], [4.0, 3.0, 0.0, 0.0, -3.0], [-5.0, -3.0, 0.0, -5.0, -1.0], [-3.0, 
+0.0, 3.0, -5.0, 0.0]], [[7.0, -3.0, 5.0, -4.0, -3.0], [3.0, 2.0, -7.0, 0.0, 5.0], [5.0, -6.0, 3.0, -2.0, -1.0], [0.0, -5.0, 
+-6.0, -6.0, 6.0]], [[-4.0, -6.0, -2.0, 6.0, -7.0], [5.0, 0.0, -6.0, -2.0, 0.0], [-2.0, 4.0, 5.0, 0.0, -1.0], [7.0, 2.0, 0.0, 
+-6.0, -6.0]]], [[[-1.0, -6.0, 1.0, 7.0, 1.0], [7.0, 2.0, -1.0, 4.0, 0.0], [-2.0, 7.0, -6.0, 6.0, 0.0], [7.0, 0.0, 5.0, -6.0, 
+-6.0]], [[6.0, -6.0, -1.0, 2.0, 3.0], [6.0, 7.0, 0.0, -7.0, -2.0], [-6.0, -1.0, -7.0, 7.0, -2.0], [5.0, 0.0, -4.0, 6.0, -5.0]], 
+[[0.0, 0.0, 5.0, -7.0, -2.0], [-2.0, -5.0, -5.0, 4.0, -6.0], [4.0, 0.0, -6.0, -4.0, 2.0], [-1.0, 3.0, -1.0, 1.0, 
+2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -3.0, -2.0, 0.0, -6.0], [1.0, 2.0, -3.0, -6.0, 7.0], [3.0, -4.0, -2.0, -6.0, 
+0.0], [0.0, 6.0, -6.0, -2.0, -1.0]], [[-5.0, -2.0, -5.0, -4.0, -2.0], [2.0, -2.0, 3.0, 7.0, 5.0], [-5.0, 3.0, -5.0, 3.0, 7.0], 
+[1.0, -4.0, 4.0, 4.0, 0.0]], [[3.0, 0.0, -6.0, -4.0, -7.0], [6.0, 0.0, 0.0, -4.0, -1.0], [2.0, -3.0, 0.0, 6.0, 5.0], [6.0, 
+-5.0, -4.0, -5.0, -3.0]]], [[[-6.0, 2.0, 3.0, 3.0, -2.0], [-4.0, 1.0, 7.0, 2.0, -6.0], [2.0, -3.0, -5.0, 6.0, -6.0], [-6.0, 
+3.0, 0.0, 0.0, -7.0]], [[2.0, 0.0, -6.0, -3.0, 1.0], [0.0, -7.0, 0.0, -2.0, -7.0], [-5.0, 7.0, -5.0, 2.0, 5.0], [0.0, -1.0, 
+3.0, -6.0, 1.0]], [[7.0, -7.0, 7.0, -1.0, 4.0], [5.0, 4.0, 5.0, 6.0, 2.0], [1.0, -2.0, 6.0, 5.0, 2.0], [-2.0, -7.0, -2.0, 6.0, 
+2.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[67.0, -16.0, 26.0, -66.0, 25.0], [-21.0, -18.0, -21.0, 15.0, -17.0], [47.0, -9.0, -77.0, 24.0, 
+13.0], [3.0, 0.0, -40.0, 55.0, 27.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[1.0, -27.0, -98.0, -64.0, -84.0], [71.0, -7.0, -24.0, -15.0, 85.0], [-13.0, -9.0, 
+-24.0, 8.0, 101.0], [75.0, -43.0, -25.0, -15.0, 0.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,-2.0)
+      arg1=Data(numpy.array([[[-3.0, 3.0], [4.0, 7.0]], [[4.0, 0.0], [5.0, -7.0]], [[3.0, 0.0], [4.0, -2.0]], [[0.0, 2.0], 
+[-5.0, 3.0]], [[-5.0, -1.0], [2.0, -1.0]], [[-1.0, -7.0], [7.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, -6.0], [0.0, -3.0]], [[1.0, 1.0], [6.0, 5.0]], [[-3.0, 0.0], [-1.0, -3.0]], 
+[[0.0, -5.0], [-1.0, -4.0]], [[-4.0, 3.0], [1.0, -7.0]], [[7.0, -4.0], [-6.0, 4.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[6.0, -6.0], [-8.0, -14.0]], [[-8.0, -0.0], [-10.0, 14.0]], [[-6.0, -0.0], [-8.0, 4.0]], [[-0.0, 
+-4.0], [10.0, -6.0]], [[10.0, 2.0], [-4.0, 2.0]], [[2.0, 14.0], [-14.0, -12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[8.0, 12.0], [-0.0, 6.0]], [[-2.0, -2.0], [-12.0, -10.0]], [[6.0, -0.0], [2.0, 6.0]], 
+[[-0.0, 10.0], [2.0, 8.0]], [[8.0, -6.0], [-2.0, 14.0]], [[-14.0, 8.0], [12.0, -8.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_constData_rank4_offset0(self):
-      arg0=6.0
-      arg1=Data(numpy.array([[[[7.0, 4.0, -1.0, -6.0], [1.0, -4.0, 3.0, -6.0], [6.0, -7.0, -6.0, 3.0]], [[-1.0, -2.0, -1.0, 
--1.0], [4.0, 5.0, 4.0, -4.0], [-2.0, -6.0, 2.0, 5.0]]], [[[3.0, -4.0, 7.0, -4.0], [0.0, -6.0, 1.0, 6.0], [5.0, 4.0, -4.0, 
--1.0]], [[0.0, 7.0, 0.0, 4.0], [5.0, 5.0, -3.0, 1.0], [4.0, 2.0, -7.0, -1.0]]], [[[-2.0, 1.0, 7.0, -2.0], [-7.0, 6.0, -4.0, 
-1.0], [-1.0, -6.0, -3.0, 0.0]], [[-7.0, 5.0, 4.0, 5.0], [7.0, -6.0, 7.0, 0.0], [0.0, 0.0, -3.0, 0.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[42.0, 24.0, -6.0, -36.0], [6.0, -24.0, 18.0, -36.0], [36.0, -42.0, -36.0, 18.0]], [[-6.0, -12.0, 
--6.0, -6.0], [24.0, 30.0, 24.0, -24.0], [-12.0, -36.0, 12.0, 30.0]]], [[[18.0, -24.0, 42.0, -24.0], [0.0, -36.0, 6.0, 36.0], 
-[30.0, 24.0, -24.0, -6.0]], [[0.0, 42.0, 0.0, 24.0], [30.0, 30.0, -18.0, 6.0], [24.0, 12.0, -42.0, -6.0]]], [[[-12.0, 6.0, 
-42.0, -12.0], [-42.0, 36.0, -24.0, 6.0], [-6.0, -36.0, -18.0, 0.0]], [[-42.0, 30.0, 24.0, 30.0], [42.0, -36.0, 42.0, 0.0], 
-[0.0, 0.0, -18.0, 0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([6.0, 5.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-2.0, 0.0, -2.0]))
+      arg1=Data(numpy.array([[[[4.0, 1.0], [-5.0, -6.0]], [[3.0, 5.0], [4.0, 4.0]], [[1.0, -7.0], [-1.0, -2.0]], [[-2.0, -5.0], 
+[-3.0, -1.0]], [[2.0, 2.0], [4.0, -6.0]], [[2.0, 1.0], [-4.0, -6.0]]], [[[-5.0, 6.0], [7.0, 7.0]], [[6.0, -5.0], [3.0, 1.0]], 
+[[-1.0, 7.0], [6.0, 0.0]], [[6.0, 3.0], [0.0, -1.0]], [[0.0, -6.0], [1.0, 3.0]], [[5.0, -3.0], [-2.0, 0.0]]], [[[5.0, 5.0], 
+[-2.0, -5.0]], [[-5.0, 2.0], [-4.0, -2.0]], [[-6.0, 0.0], [-7.0, 5.0]], [[1.0, 1.0], [-2.0, -5.0]], [[4.0, -2.0], [0.0, -5.0]], 
+[[0.0, -1.0], [4.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-1.0, 5.0], [-7.0, 1.0]], [[0.0, -1.0], [7.0, -1.0]], [[6.0, 0.0], [0.0, -6.0]], 
+[[-3.0, -4.0], [0.0, 2.0]], [[1.0, 1.0], [-2.0, -7.0]], [[-3.0, -6.0], [-7.0, -3.0]]], [[[6.0, 1.0], [1.0, -4.0]], [[-5.0, 
+-2.0], [-1.0, -3.0]], [[0.0, -6.0], [1.0, 2.0]], [[7.0, 4.0], [-6.0, -6.0]], [[-1.0, 5.0], [0.0, 0.0]], [[0.0, 0.0], [5.0, 
+-7.0]]], [[[-4.0, -1.0], [-1.0, 0.0]], [[-1.0, 4.0], [5.0, -6.0]], [[-1.0, -3.0], [3.0, 7.0]], [[-5.0, 0.0], [-4.0, 4.0]], 
+[[4.0, -5.0], [-5.0, 4.0]], [[0.0, 7.0], [7.0, -7.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-36.0, 1.0], [19.0, 34.0]], [[83.0, -9.0], [67.0, 43.0]], [[43.0, -7.0], [73.0, -47.0]], [[11.0, 
+-22.0], [-4.0, 24.0]], [[-16.0, -4.0], [29.0, 14.0]], [[37.0, -2.0], [-62.0, -36.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[10.0, -8.0], [16.0, -2.0]], [[2.0, -6.0], [-24.0, 14.0]], [[-10.0, 6.0], [-6.0, 
+-2.0]], [[16.0, 8.0], [8.0, -12.0]], [[-10.0, 8.0], [14.0, 6.0]], [[6.0, -2.0], [0.0, 20.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,2.0)
+      arg1=Data(numpy.array([[[[-5.0, 7.0, -2.0, 1.0], [-2.0, 2.0, -2.0, -6.0], [-1.0, 2.0, -7.0, -2.0]], [[-2.0, 1.0, -6.0, 
+0.0], [1.0, 5.0, -3.0, 5.0], [1.0, -2.0, -7.0, -6.0]]], [[[1.0, -6.0, 6.0, 4.0], [2.0, 0.0, 5.0, -5.0], [0.0, 1.0, 0.0, 4.0]], 
+[[3.0, 5.0, 7.0, 5.0], [6.0, 0.0, 6.0, 0.0], [-1.0, -7.0, -7.0, -3.0]]], [[[0.0, 6.0, 1.0, 3.0], [-1.0, 0.0, 0.0, 0.0], [3.0, 
+7.0, -7.0, 0.0]], [[1.0, -4.0, -4.0, 5.0], [1.0, -4.0, 2.0, 3.0], [-6.0, 4.0, -6.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, 5.0, 3.0, 1.0], [3.0, 0.0, 2.0, 6.0], [-3.0, -1.0, -2.0, 6.0]], [[7.0, 6.0, 
+0.0, -5.0], [2.0, -5.0, 7.0, -4.0], [5.0, 7.0, -2.0, -2.0]]], [[[6.0, -7.0, -7.0, 1.0], [5.0, -6.0, 2.0, -1.0], [0.0, 4.0, 
+-6.0, -1.0]], [[-5.0, 6.0, 0.0, -5.0], [-1.0, 4.0, 0.0, -7.0], [6.0, -2.0, 0.0, -6.0]]], [[[4.0, 0.0, 4.0, 4.0], [5.0, 1.0, 
+-6.0, 4.0], [0.0, 5.0, -3.0, 7.0]], [[-6.0, 4.0, 2.0, 2.0], [-5.0, 0.0, -3.0, -4.0], [-1.0, 2.0, 3.0, 4.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, -0.0]], [[-0.0, 0.0, -0.0, 
+0.0], [0.0, 0.0, -0.0, 0.0], [0.0, -0.0, -0.0, -0.0]]], [[[0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, 0.0]], 
+[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, -0.0, 0.0]], [[0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-12.0, 10.0, 6.0, 2.0], [6.0, 0.0, 4.0, 12.0], [-6.0, -2.0, -4.0, 12.0]], [[14.0, 
+12.0, 0.0, -10.0], [4.0, -10.0, 14.0, -8.0], [10.0, 14.0, -4.0, -4.0]]], [[[12.0, -14.0, -14.0, 2.0], [10.0, -12.0, 4.0, -2.0], 
+[0.0, 8.0, -12.0, -2.0]], [[-10.0, 12.0, 0.0, -10.0], [-2.0, 8.0, 0.0, -14.0], [12.0, -4.0, 0.0, -12.0]]], [[[8.0, 0.0, 8.0, 
+8.0], [10.0, 2.0, -12.0, 8.0], [0.0, 10.0, -6.0, 14.0]], [[-12.0, 8.0, 4.0, 4.0], [-10.0, 0.0, -6.0, -8.0], [-2.0, 4.0, 6.0, 
+8.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_expandedData_rank0_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,7.0)
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,-2.0)
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-1.0)+(1.-msk_ref)*numpy.array(-14.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([7.0, -4.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-2.0, 6.0, -2.0]))
+      arg1=Data(numpy.array([1.0, 6.0, 4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, 0.0, -3.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-37.0)+(1.-msk_ref)*numpy.array(2.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not res.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[7.0, 2.0, 3.0], [0.0, 2.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -7.0, 2.0], [2.0, -5.0, 0.0]]))
+      arg1=Data(numpy.array([[-4.0, 2.0, 5.0], [-3.0, 2.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 3.0, -3.0], [1.0, -1.0, 3.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-25.0)+(1.-msk_ref)*numpy.array(-24.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-6.0, -1.0, 3.0], [-2.0, -4.0, 0.0], [4.0, 0.0, 0.0], [-3.0, -2.0, -6.0]], [[0.0, -3.0, 2.0], 
+[-6.0, -4.0, 1.0], [-7.0, -6.0, 6.0], [5.0, 0.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 4.0, 5.0], [-2.0, -1.0, 3.0], [-5.0, 3.0, 3.0], [-6.0, -3.0, -6.0]], [[4.0, 
+-2.0, -1.0], [-5.0, 0.0, -3.0], [1.0, 5.0, 5.0], [-3.0, 0.0, 4.0]]]))
+      arg1=Data(numpy.array([[[5.0, 4.0, -3.0], [-2.0, 7.0, -5.0], [-5.0, 0.0, 0.0], [-1.0, -5.0, 5.0]], [[-4.0, 0.0, 7.0], 
+[6.0, -1.0, -6.0], [-2.0, 7.0, 1.0], [0.0, 5.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[5.0, 1.0, -2.0], [3.0, 1.0, 0.0], [-5.0, -5.0, -5.0], [2.0, 4.0, 3.0]], [[-6.0, 5.0, 
+7.0], [-7.0, -6.0, 4.0], [-1.0, 7.0, -3.0], [-2.0, 2.0, 2.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-171.0)+(1.-msk_ref)*numpy.array(-45.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not res.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")         
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-7.0, 1.0], [0.0, -5.0], [-6.0, 1.0]], [[4.0, 3.0], [0.0, 1.0], [-6.0, -7.0]]], [[[-3.0, 2.0], 
+[-1.0, 1.0], [-5.0, 1.0]], [[5.0, -5.0], [-5.0, 6.0], [-6.0, 4.0]]], [[[-4.0, 7.0], [4.0, 0.0], [0.0, -4.0]], [[-3.0, -2.0], 
+[3.0, 1.0], [-7.0, -5.0]]], [[[3.0, -2.0], [3.0, 3.0], [0.0, -1.0]], [[6.0, -5.0], [-7.0, -2.0], [1.0, 
+-6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -7.0], [1.0, 2.0], [-4.0, 5.0]], [[5.0, -6.0], [5.0, 6.0], [-5.0, 5.0]]], 
+[[[-4.0, -6.0], [0.0, -4.0], [-6.0, 3.0]], [[3.0, 4.0], [6.0, 4.0], [4.0, 7.0]]], [[[4.0, -5.0], [4.0, 0.0], [-4.0, 6.0]], 
+[[-2.0, -3.0], [3.0, 0.0], [-2.0, -6.0]]], [[[-7.0, 0.0], [-2.0, -1.0], [5.0, -6.0]], [[0.0, -3.0], [-2.0, 7.0], [1.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[[7.0, 1.0], [1.0, 6.0], [3.0, 6.0]], [[1.0, -7.0], [5.0, -5.0], [0.0, 5.0]]], [[[2.0, 4.0], 
+[5.0, 4.0], [-2.0, -7.0]], [[7.0, -4.0], [4.0, 2.0], [-4.0, -5.0]]], [[[3.0, 2.0], [-2.0, -3.0], [3.0, 0.0]], [[7.0, 2.0], 
+[-4.0, -6.0], [0.0, 1.0]]], [[[1.0, -1.0], [3.0, -5.0], [-7.0, 5.0]], [[0.0, -4.0], [0.0, 6.0], [1.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, 7.0], [-5.0, 4.0], [4.0, 0.0]], [[-6.0, -6.0], [-5.0, -4.0], [4.0, -2.0]]], 
+[[[2.0, 6.0], [-6.0, 2.0], [2.0, 4.0]], [[-6.0, -3.0], [4.0, -5.0], [-3.0, 3.0]]], [[[0.0, -1.0], [0.0, 3.0], [-2.0, -4.0]], 
+[[-5.0, 2.0], [2.0, -3.0], [4.0, 4.0]]], [[[7.0, -5.0], [4.0, 6.0], [7.0, -7.0]], [[-6.0, -6.0], [-7.0, 2.0], [-4.0, 3.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-107.0)+(1.-msk_ref)*numpy.array(-196.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_expandedData_rank1_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg0.setTaggedValue(1,-6.0)
+      arg1=Data(numpy.array([6.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-2.0, 6.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-30.0, 35.0])+(1.-msk_ref)*numpy.array([12.0, -36.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([1.0, -2.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, 7.0, 0.0]))
+      arg1=Data(numpy.array([[2.0, 0.0], [1.0, -3.0], [5.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, -7.0], [6.0, -2.0], [-2.0, 0.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-25.0, 26.0])+(1.-msk_ref)*numpy.array([36.0, -21.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[4.0, -2.0, 3.0], [-5.0, 4.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, -1.0, 0.0], [0.0, 5.0, 0.0]]))
+      arg1=Data(numpy.array([[[-7.0, 1.0], [0.0, 3.0], [3.0, 2.0]], [[-6.0, -5.0], [0.0, 2.0], [1.0, 
+-5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 5.0], [3.0, 4.0], [-7.0, 0.0]], [[-5.0, 0.0], [-3.0, 1.0], [1.0, 3.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([6.0, 62.0])+(1.-msk_ref)*numpy.array([-54.0, 31.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[7.0, 1.0, -4.0], [1.0, 0.0, 7.0], [-1.0, 7.0, -7.0], [-1.0, -3.0, -4.0]], [[0.0, 2.0, 6.0], 
+[3.0, 6.0, 0.0], [7.0, 0.0, 0.0], [0.0, 3.0, -5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 5.0, -6.0], [4.0, -3.0, -4.0], [5.0, 5.0, -1.0], [3.0, 6.0, 2.0]], [[7.0, -7.0, 
+4.0], [-3.0, -7.0, -5.0], [-7.0, 1.0, 3.0], [-5.0, 0.0, -2.0]]]))
+      arg1=Data(numpy.array([[[[0.0, -2.0], [0.0, -2.0], [-7.0, -4.0]], [[0.0, 7.0], [0.0, 0.0], [1.0, -1.0]], [[7.0, 1.0], 
+[4.0, 3.0], [4.0, -3.0]], [[-5.0, 7.0], [6.0, 7.0], [-4.0, 1.0]]], [[[6.0, 1.0], [6.0, 0.0], [-6.0, 0.0]], [[2.0, -2.0], [0.0, 
+-1.0], [6.0, -2.0]], [[-1.0, 5.0], [7.0, 3.0], [-5.0, -4.0]], [[-5.0, 3.0], [6.0, 4.0], [-4.0, -1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, -3.0], [3.0, -6.0], [4.0, -1.0]], [[3.0, 2.0], [3.0, -3.0], [1.0, 7.0]], 
+[[0.0, -6.0], [-4.0, -4.0], [-2.0, -5.0]], [[4.0, -7.0], [0.0, 4.0], [7.0, -5.0]]], [[[-4.0, 6.0], [2.0, 7.0], [4.0, 1.0]], 
+[[3.0, -7.0], [-6.0, 7.0], [2.0, 6.0]], [[-1.0, 0.0], [-5.0, 3.0], [-4.0, 3.0]], [[1.0, 1.0], [1.0, 4.0], [4.0, 1.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([44.0, 49.0])+(1.-msk_ref)*numpy.array([-12.0, -155.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank0_expandedData_rank2_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg0.setTaggedValue(1,1.0)
+      arg1=Data(numpy.array([[-2.0, -5.0, 4.0, 0.0, 0.0], [0.0, 4.0, -5.0, -1.0, -3.0], [5.0, -5.0, 5.0, -5.0, -6.0], [5.0, 
+2.0, 0.0, 5.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, -7.0, -1.0, 2.0, 3.0], [-6.0, 6.0, 3.0, 6.0, -1.0], [3.0, 4.0, -3.0, 1.0, 3.0], 
+[-7.0, -1.0, 5.0, -4.0, -3.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[10.0, 25.0, -20.0, -0.0, -0.0], [-0.0, -20.0, 25.0, 5.0, 15.0], [-25.0, 25.0, -25.0, 25.0, 
+30.0], [-25.0, -10.0, -0.0, -25.0, -25.0]])+(1.-msk_ref)*numpy.array([[1.0, -7.0, -1.0, 2.0, 3.0], [-6.0, 6.0, 3.0, 6.0, -1.0], 
+[3.0, 4.0, -3.0, 1.0, 3.0], [-7.0, -1.0, 5.0, -4.0, -3.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank0_offset0(self):
-      arg0=6.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-6.0)+(1-msk_arg1)*(2.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([4.0, -3.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -6.0, 0.0]))
+      arg1=Data(numpy.array([[[-4.0, 5.0, -1.0, -7.0, -2.0], [-2.0, -3.0, 3.0, 7.0, -2.0], [-3.0, 1.0, 3.0, 2.0, 1.0], [4.0, 
+7.0, -7.0, -3.0, -6.0]], [[0.0, -4.0, 0.0, 6.0, -6.0], [4.0, 2.0, -5.0, 0.0, 7.0], [-5.0, -3.0, -2.0, 5.0, -4.0], [6.0, 5.0, 
+-1.0, -2.0, -5.0]], [[-1.0, 4.0, -6.0, 0.0, 7.0], [0.0, -1.0, -4.0, -2.0, 2.0], [0.0, -1.0, 0.0, 5.0, 0.0], [7.0, -5.0, -1.0, 
+-1.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, 3.0, 0.0, -6.0, 0.0], [0.0, -1.0, -5.0, 0.0, 7.0], [-2.0, -7.0, -6.0, -2.0, 
+2.0], [-6.0, -6.0, -6.0, 1.0, 6.0]], [[5.0, 0.0, 1.0, -7.0, -4.0], [0.0, -7.0, 2.0, 4.0, 5.0], [-4.0, 0.0, 4.0, 7.0, -3.0], 
+[-6.0, -7.0, 6.0, 1.0, 6.0]], [[-1.0, -7.0, 3.0, -3.0, -6.0], [-4.0, -6.0, 0.0, 6.0, -3.0], [-2.0, 0.0, -6.0, -4.0, 0.0], 
+[-6.0, 2.0, -3.0, 7.0, 1.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-36.0)+(1.-msk_ref)*numpy.array(12.0)
+      ref=msk_ref*numpy.array([[-11.0, 12.0, 26.0, -46.0, -25.0], [-20.0, -13.0, 47.0, 38.0, -39.0], [3.0, 18.0, 18.0, -32.0, 
+16.0], [-37.0, 38.0, -20.0, -1.0, 6.0]])+(1.-msk_ref)*numpy.array([[-31.0, 3.0, -6.0, 36.0, 24.0], [0.0, 41.0, -17.0, -24.0, 
+-23.0], [22.0, -7.0, -30.0, -44.0, 20.0], [30.0, 36.0, -42.0, -5.0, -30.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank1_offset0(self):
-      arg0=1.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-1.0, 4.0])+(1.-msk_arg1)*numpy.array([3.0, 3.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-4.0, 5.0, 6.0], [4.0, 0.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, 0.0, 5.0], [0.0, 4.0, 3.0]]))
+      arg1=Data(numpy.array([[[[-6.0, -2.0, 6.0, -1.0, 0.0], [4.0, 4.0, -6.0, -7.0, 0.0], [-5.0, 5.0, 4.0, 0.0, 4.0], [5.0, 
+-5.0, -7.0, 7.0, -6.0]], [[-2.0, 4.0, 5.0, 4.0, -1.0], [3.0, -1.0, -3.0, 6.0, 6.0], [-3.0, 3.0, 2.0, 7.0, 5.0], [-5.0, -4.0, 
+4.0, 0.0, 5.0]], [[-7.0, 0.0, 4.0, -6.0, -5.0], [-6.0, -1.0, -3.0, 3.0, 2.0], [7.0, 6.0, 2.0, 5.0, 0.0], [0.0, 2.0, -6.0, 3.0, 
+-3.0]]], [[[6.0, 0.0, 5.0, 1.0, 5.0], [0.0, 5.0, 7.0, -3.0, 2.0], [2.0, -1.0, 3.0, 2.0, -5.0], [-5.0, -1.0, 6.0, 0.0, -1.0]], 
+[[1.0, 4.0, 3.0, 0.0, -7.0], [-5.0, -4.0, -5.0, 5.0, 7.0], [-5.0, -2.0, 0.0, 1.0, -6.0], [0.0, 5.0, -4.0, 4.0, 7.0]], [[7.0, 
+-4.0, 2.0, 4.0, 7.0], [-2.0, -6.0, 0.0, -6.0, -1.0], [-6.0, 5.0, -7.0, 0.0, 0.0], [-6.0, 0.0, 1.0, 6.0, 
+-3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, -4.0, 3.0, -2.0, 6.0], [7.0, 4.0, -6.0, -4.0, -1.0], [5.0, 0.0, -4.0, 5.0, 
+0.0], [-1.0, -7.0, 5.0, -7.0, -2.0]], [[3.0, -3.0, 0.0, 3.0, 1.0], [-7.0, -6.0, -7.0, -7.0, 6.0], [0.0, 7.0, -7.0, 5.0, -6.0], 
+[1.0, 5.0, 0.0, 0.0, -2.0]], [[5.0, -2.0, -5.0, -6.0, -3.0], [-3.0, 6.0, 1.0, 7.0, -4.0], [3.0, 4.0, 4.0, -6.0, -5.0], [-5.0, 
+-2.0, 3.0, 6.0, 0.0]]], [[[-3.0, 6.0, -1.0, 7.0, -6.0], [0.0, 4.0, 0.0, 0.0, 2.0], [-1.0, 5.0, 1.0, -3.0, 1.0], [-1.0, 6.0, 
+0.0, 3.0, -4.0]], [[0.0, -3.0, -6.0, 3.0, -6.0], [-2.0, 5.0, -6.0, -6.0, 0.0], [1.0, -7.0, 4.0, -5.0, 7.0], [1.0, -3.0, 1.0, 
+3.0, 3.0]], [[5.0, -2.0, -5.0, 4.0, 6.0], [6.0, -3.0, 0.0, 3.0, -6.0], [-4.0, 0.0, 2.0, 1.0, -3.0], [0.0, -1.0, 4.0, -7.0, 
+-2.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-1.0, 4.0])+(1.-msk_ref)*numpy.array([3.0, 3.0])
+      ref=msk_ref*numpy.array([[-46.0, 52.0, 33.0, -32.0, -57.0], [-25.0, 29.0, 19.0, 100.0, 56.0], [91.0, -3.0, 60.0, 73.0, 
+-11.0], [-29.0, 8.0, 30.0, -46.0, 45.0]])+(1.-msk_ref)*numpy.array([[75.0, 0.0, -85.0, 8.0, -63.0], [-54.0, 13.0, 23.0, 48.0, 
+-31.0], [-28.0, -8.0, 70.0, -82.0, -6.0], [-14.0, 24.0, -4.0, 70.0, 20.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank2_offset0(self):
-      arg0=7.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, 3.0, -7.0, -2.0, -7.0], [-7.0, 0.0, 3.0, -7.0, 3.0], [7.0, 3.0, -6.0, -6.0, 7.0], [0.0, 
-0.0, 2.0, -2.0, -1.0]])+(1.-msk_arg1)*numpy.array([[0.0, -7.0, 3.0, 1.0, -2.0], [6.0, 4.0, 0.0, -2.0, 7.0], [0.0, 1.0, -7.0, 
-5.0, 4.0], [2.0, 2.0, -4.0, 6.0, -1.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank0_expandedData_rank3_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,5.0)
+      arg1=Data(numpy.array([[[4.0, 3.0], [0.0, -5.0]], [[5.0, -3.0], [-6.0, 3.0]], [[-5.0, 0.0], [-6.0, 0.0]], [[-3.0, 5.0], 
+[-5.0, -4.0]], [[6.0, -4.0], [-7.0, 6.0]], [[4.0, -1.0], [0.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, 4.0], [-4.0, 5.0]], [[4.0, 0.0], [0.0, 2.0]], [[-6.0, -4.0], [3.0, -3.0]], 
+[[6.0, -6.0], [-4.0, -1.0]], [[-4.0, 2.0], [-5.0, 3.0]], [[2.0, 2.0], [0.0, 0.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-42.0, 21.0, -49.0, -14.0, -49.0], [-49.0, 0.0, 21.0, -49.0, 21.0], [49.0, 21.0, -42.0, -42.0, 
-49.0], [0.0, 0.0, 14.0, -14.0, -7.0]])+(1.-msk_ref)*numpy.array([[0.0, -49.0, 21.0, 7.0, -14.0], [42.0, 28.0, 0.0, -14.0, 
-49.0], [0.0, 7.0, -49.0, 35.0, 28.0], [14.0, 14.0, -28.0, 42.0, -7.0]])
+      ref=msk_ref*numpy.array([[[-4.0, -3.0], [-0.0, 5.0]], [[-5.0, 3.0], [6.0, -3.0]], [[5.0, -0.0], [6.0, -0.0]], [[3.0, 
+-5.0], [5.0, 4.0]], [[-6.0, 4.0], [7.0, -6.0]], [[-4.0, 1.0], [-0.0, 3.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 20.0], [-20.0, 
+25.0]], [[20.0, 0.0], [0.0, 10.0]], [[-30.0, -20.0], [15.0, -15.0]], [[30.0, -30.0], [-20.0, -5.0]], [[-20.0, 10.0], [-25.0, 
+15.0]], [[10.0, 10.0], [0.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank3_offset0(self):
-      arg0=0.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[5.0, -4.0], [2.0, -2.0]], [[0.0, 0.0], [6.0, 5.0]], [[-6.0, 4.0], [-3.0, 0.0]], [[2.0, 
--3.0], [0.0, -5.0]], [[4.0, 3.0], [0.0, 3.0]], [[7.0, 6.0], [2.0, 4.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, -2.0], [0.0, 3.0]], 
-[[-6.0, -4.0], [-5.0, 5.0]], [[-4.0, 7.0], [1.0, -7.0]], [[4.0, 5.0], [-3.0, 7.0]], [[-4.0, 4.0], [-1.0, -2.0]], [[5.0, -2.0], 
-[-6.0, 5.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([1.0, -7.0, 2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 0.0, -4.0]))
+      arg1=Data(numpy.array([[[[6.0, -4.0], [7.0, 1.0]], [[3.0, 7.0], [1.0, -2.0]], [[-7.0, 6.0], [-4.0, -3.0]], [[-4.0, -5.0], 
+[-2.0, -2.0]], [[2.0, 1.0], [-2.0, 5.0]], [[4.0, 2.0], [2.0, -2.0]]], [[[2.0, -3.0], [-5.0, 4.0]], [[-4.0, 2.0], [1.0, 0.0]], 
+[[-7.0, 4.0], [2.0, -3.0]], [[5.0, 0.0], [-6.0, -2.0]], [[-2.0, -5.0], [0.0, 7.0]], [[-2.0, -5.0], [-3.0, -1.0]]], [[[4.0, 
+6.0], [3.0, -7.0]], [[-3.0, -3.0], [6.0, 0.0]], [[-7.0, -6.0], [-1.0, 2.0]], [[-7.0, -5.0], [-6.0, -7.0]], [[-5.0, 6.0], [-1.0, 
+0.0]], [[7.0, -6.0], [5.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -7.0], [0.0, -4.0]], [[0.0, 2.0], [0.0, -7.0]], [[-3.0, -2.0], [-7.0, -6.0]], 
+[[7.0, 0.0], [-5.0, -3.0]], [[6.0, 0.0], [-6.0, 0.0]], [[4.0, -1.0], [-7.0, -2.0]]], [[[4.0, 4.0], [1.0, 4.0]], [[-4.0, -7.0], 
+[-5.0, -2.0]], [[5.0, 3.0], [7.0, -7.0]], [[1.0, 2.0], [-4.0, -7.0]], [[-2.0, -7.0], [-6.0, 0.0]], [[6.0, 0.0], [0.0, -7.0]]], 
+[[[-5.0, -5.0], [-5.0, 3.0]], [[-5.0, 6.0], [3.0, 4.0]], [[2.0, -5.0], [-7.0, 3.0]], [[0.0, -7.0], [6.0, -6.0]], [[5.0, 1.0], 
+[7.0, 0.0]], [[-2.0, 5.0], [-2.0, 3.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -0.0], [0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[0.0, -0.0], 
-[0.0, -0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -0.0], [0.0, 0.0]], [[-0.0, 
--0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [-0.0, -0.0]], [[0.0, -0.0], [-0.0, 
-0.0]]])
+      ref=msk_ref*numpy.array([[[0.0, 29.0], [48.0, -41.0]], [[25.0, -13.0], [6.0, -2.0]], [[28.0, -34.0], [-20.0, 22.0]], 
+[[-53.0, -15.0], [28.0, -2.0]], [[6.0, 48.0], [-4.0, -44.0]], [[32.0, 25.0], [33.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 
+20.0], [20.0, -12.0]], [[20.0, -24.0], [-12.0, -16.0]], [[-8.0, 20.0], [28.0, -12.0]], [[0.0, 28.0], [-24.0, 24.0]], [[-20.0, 
+-4.0], [-28.0, 0.0]], [[8.0, -20.0], [8.0, -12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_float_rank0_expandedData_rank4_offset0(self):
-      arg0=3.0
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, -2.0, 6.0], [-5.0, 6.0, 0.0, -3.0], [-6.0, -7.0, -4.0, -6.0]], [[-3.0, -2.0, 1.0, 
-5.0], [5.0, -2.0, 6.0, -3.0], [0.0, -5.0, 1.0, -2.0]]], [[[-4.0, -6.0, 4.0, 0.0], [2.0, 2.0, -5.0, -6.0], [7.0, 1.0, 5.0, 
-3.0]], [[-6.0, 1.0, 0.0, -4.0], [-3.0, 3.0, 4.0, -1.0], [7.0, 6.0, 0.0, 6.0]]], [[[4.0, -6.0, 1.0, -5.0], [0.0, -1.0, 4.0, 
--4.0], [1.0, -4.0, 0.0, 0.0]], [[2.0, -5.0, 6.0, 4.0], [6.0, 5.0, -1.0, 0.0], [7.0, 1.0, 4.0, 
-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, -4.0, 7.0, -4.0], [3.0, -4.0, 1.0, 0.0], [-2.0, 3.0, 7.0, 6.0]], [[-5.0, -3.0, 
-4.0, -7.0], [0.0, 0.0, 4.0, 0.0], [-6.0, -6.0, 0.0, -4.0]]], [[[-1.0, -6.0, -6.0, 0.0], [0.0, 2.0, 7.0, -7.0], [3.0, 3.0, 2.0, 
--5.0]], [[7.0, 5.0, 7.0, 5.0], [4.0, 4.0, -4.0, 6.0], [0.0, -5.0, 6.0, -7.0]]], [[[0.0, 7.0, -3.0, 2.0], [6.0, -6.0, 7.0, 4.0], 
-[-6.0, -6.0, 6.0, -6.0]], [[0.0, 4.0, 3.0, 4.0], [-7.0, -2.0, 7.0, -3.0], [-5.0, 5.0, -4.0, -4.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank0_expandedData_rank4_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,3.0)
+      arg1=Data(numpy.array([[[[4.0, 3.0, 4.0, 2.0], [2.0, 5.0, -2.0, 7.0], [-7.0, 6.0, -4.0, 2.0]], [[0.0, 4.0, 4.0, -3.0], 
+[-6.0, -3.0, -2.0, 0.0], [1.0, -5.0, -3.0, 4.0]]], [[[-6.0, -6.0, -1.0, 2.0], [-4.0, 2.0, 4.0, 0.0], [4.0, 0.0, 0.0, 2.0]], 
+[[4.0, -2.0, -2.0, -2.0], [1.0, 4.0, -3.0, -4.0], [1.0, -4.0, 0.0, 0.0]]], [[[0.0, -2.0, -1.0, -1.0], [7.0, 5.0, -6.0, -7.0], 
+[4.0, -4.0, 5.0, 6.0]], [[6.0, 3.0, -1.0, -1.0], [3.0, 7.0, 5.0, 0.0], [-2.0, 2.0, 4.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -3.0, 7.0, 5.0], [5.0, 0.0, 2.0, 2.0], [-4.0, -3.0, -3.0, -1.0]], [[4.0, -3.0, 
+-4.0, 3.0], [3.0, -4.0, 7.0, -3.0], [3.0, 4.0, -6.0, 0.0]]], [[[0.0, -2.0, 5.0, 2.0], [3.0, 3.0, 0.0, -3.0], [5.0, -2.0, 5.0, 
+-5.0]], [[-6.0, -7.0, 6.0, -1.0], [4.0, -5.0, 7.0, -6.0], [4.0, -5.0, 3.0, -3.0]]], [[[3.0, 4.0, -3.0, 2.0], [6.0, 5.0, 4.0, 
+-4.0], [-3.0, 6.0, 0.0, -7.0]], [[-1.0, 0.0, 5.0, 4.0], [-1.0, 5.0, 2.0, 7.0], [7.0, 2.0, -4.0, 0.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0, -6.0, 18.0], [-15.0, 18.0, 0.0, -9.0], [-18.0, -21.0, -12.0, -18.0]], [[-9.0, -6.0, 
-3.0, 15.0], [15.0, -6.0, 18.0, -9.0], [0.0, -15.0, 3.0, -6.0]]], [[[-12.0, -18.0, 12.0, 0.0], [6.0, 6.0, -15.0, -18.0], [21.0, 
-3.0, 15.0, 9.0]], [[-18.0, 3.0, 0.0, -12.0], [-9.0, 9.0, 12.0, -3.0], [21.0, 18.0, 0.0, 18.0]]], [[[12.0, -18.0, 3.0, -15.0], 
-[0.0, -3.0, 12.0, -12.0], [3.0, -12.0, 0.0, 0.0]], [[6.0, -15.0, 18.0, 12.0], [18.0, 15.0, -3.0, 0.0], [21.0, 3.0, 12.0, 
-9.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -12.0, 21.0, -12.0], [9.0, -12.0, 3.0, 0.0], [-6.0, 9.0, 21.0, 18.0]], [[-15.0, 
--9.0, 12.0, -21.0], [0.0, 0.0, 12.0, 0.0], [-18.0, -18.0, 0.0, -12.0]]], [[[-3.0, -18.0, -18.0, 0.0], [0.0, 6.0, 21.0, -21.0], 
-[9.0, 9.0, 6.0, -15.0]], [[21.0, 15.0, 21.0, 15.0], [12.0, 12.0, -12.0, 18.0], [0.0, -15.0, 18.0, -21.0]]], [[[0.0, 21.0, -9.0, 
-6.0], [18.0, -18.0, 21.0, 12.0], [-18.0, -18.0, 18.0, -18.0]], [[0.0, 12.0, 9.0, 12.0], [-21.0, -6.0, 21.0, -9.0], [-15.0, 
-15.0, -12.0, -12.0]]]])
+      ref=msk_ref*numpy.array([[[[-16.0, -12.0, -16.0, -8.0], [-8.0, -20.0, 8.0, -28.0], [28.0, -24.0, 16.0, -8.0]], [[-0.0, 
+-16.0, -16.0, 12.0], [24.0, 12.0, 8.0, -0.0], [-4.0, 20.0, 12.0, -16.0]]], [[[24.0, 24.0, 4.0, -8.0], [16.0, -8.0, -16.0, 
+-0.0], [-16.0, -0.0, -0.0, -8.0]], [[-16.0, 8.0, 8.0, 8.0], [-4.0, -16.0, 12.0, 16.0], [-4.0, 16.0, -0.0, -0.0]]], [[[-0.0, 
+8.0, 4.0, 4.0], [-28.0, -20.0, 24.0, 28.0], [-16.0, 16.0, -20.0, -24.0]], [[-24.0, -12.0, 4.0, 4.0], [-12.0, -28.0, -20.0, 
+-0.0], [8.0, -8.0, -16.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[9.0, -9.0, 21.0, 15.0], [15.0, 0.0, 6.0, 6.0], [-12.0, -9.0, 
+-9.0, -3.0]], [[12.0, -9.0, -12.0, 9.0], [9.0, -12.0, 21.0, -9.0], [9.0, 12.0, -18.0, 0.0]]], [[[0.0, -6.0, 15.0, 6.0], [9.0, 
+9.0, 0.0, -9.0], [15.0, -6.0, 15.0, -15.0]], [[-18.0, -21.0, 18.0, -3.0], [12.0, -15.0, 21.0, -18.0], [12.0, -15.0, 9.0, 
+-9.0]]], [[[9.0, 12.0, -9.0, 6.0], [18.0, 15.0, 12.0, -12.0], [-9.0, 18.0, 0.0, -21.0]], [[-3.0, 0.0, 15.0, 12.0], [-3.0, 15.0, 
+6.0, 21.0], [21.0, 6.0, -12.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_float_rank0_offset0(self):
-      arg0=numpy.array(4.0)
-      arg1=-4.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(-16.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_float_rank0_offset0(self):
+      arg0=Data(numpy.array([-5.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([2.0, 2.0]))
+      arg1=-6.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([30.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-12.0, -12.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_array_rank0_offset0(self):
-      arg0=numpy.array(0.0)
-      arg1=numpy.array(7.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array(0.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank0_offset0(self):
+      arg0=Data(numpy.array([5.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([5.0, 1.0]))
+      arg1=numpy.array(-2.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-10.0, 4.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-10.0, -2.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank1_offset1(self):
-      arg0=numpy.array([6.0, -2.0, 3.0])
-      arg1=numpy.array([3.0, -1.0, 3.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array(29.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[-1.0, 2.0], [-3.0, -3.0], [5.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 6.0], [7.0, -4.0], [6.0, -7.0]]))
+      arg1=numpy.array([2.0, 5.0, -2.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-27.0, -1.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([23.0, 6.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank2_offset2(self):
-      arg0=numpy.array([[5.0, 1.0, 0.0], [-3.0, -7.0, 4.0]])
-      arg1=numpy.array([[-5.0, 1.0, 3.0], [-6.0, -4.0, 0.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array(22.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[2.0, 1.0], [-2.0, 3.0], [-1.0, -1.0]], [[5.0, 7.0], [4.0, -1.0], [-1.0, 
+7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, -3.0], [-1.0, 0.0], [1.0, -5.0]], [[2.0, 1.0], [-1.0, 5.0], [1.0, 1.0]]]))
+      arg1=numpy.array([[3.0, 5.0, 7.0], [2.0, 6.0, 5.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([18.0, 54.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([17.0, -7.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank3_offset3(self):
-      arg0=numpy.array([[[-1.0, 3.0, -1.0], [0.0, 0.0, -6.0], [-5.0, 7.0, 7.0], [1.0, 7.0, -6.0]], [[5.0, -2.0, -3.0], [6.0, 
-5.0, -3.0], [-2.0, 4.0, 6.0], [-1.0, 2.0, -6.0]]])
-      arg1=numpy.array([[[-5.0, -2.0, 6.0], [4.0, 1.0, 6.0], [-3.0, 1.0, 6.0], [-3.0, 4.0, 0.0]], [[0.0, -2.0, -1.0], [0.0, 
-1.0, 5.0], [-7.0, 0.0, 0.0], [7.0, -5.0, 4.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array(16.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-5.0, -6.0], [-6.0, -7.0], [3.0, 1.0]], [[4.0, -4.0], [2.0, 0.0], [4.0, -7.0]], [[-3.0, -3.0], 
+[-5.0, 7.0], [5.0, -2.0]], [[-2.0, -3.0], [2.0, 3.0], [-6.0, -7.0]]], [[[5.0, -1.0], [-7.0, 0.0], [0.0, 5.0]], [[5.0, 7.0], 
+[-3.0, -3.0], [2.0, 2.0]], [[-1.0, -2.0], [5.0, -5.0], [6.0, 5.0]], [[-4.0, -7.0], [-5.0, -1.0], [-1.0, 
+5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 4.0], [5.0, 0.0], [2.0, -5.0]], [[-5.0, 0.0], [2.0, 4.0], [7.0, 1.0]], [[-7.0, 
+5.0], [0.0, -4.0], [-7.0, 3.0]], [[-2.0, 0.0], [3.0, -2.0], [7.0, 3.0]]], [[[5.0, 1.0], [5.0, -5.0], [1.0, -6.0]], [[3.0, 
+-6.0], [0.0, 4.0], [-3.0, 1.0]], [[-7.0, 6.0], [1.0, 1.0], [5.0, 7.0]], [[3.0, -1.0], [5.0, -4.0], [-3.0, -5.0]]]]))
+      arg1=numpy.array([[[-4.0, 3.0, 2.0], [2.0, 7.0, -7.0], [7.0, 3.0, 7.0], [-1.0, -6.0, -1.0]], [[1.0, 1.0, -1.0], [3.0, 
+5.0, -5.0], [2.0, -1.0, 3.0], [0.0, 0.0, 0.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-4.0, 30.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-130.0, 79.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank4_offset4(self):
-      arg0=numpy.array([[[[5.0, -7.0], [-1.0, 1.0], [-4.0, 4.0]], [[-4.0, -4.0], [-3.0, 0.0], [7.0, 3.0]]], [[[0.0, 0.0], [5.0, 
-7.0], [-5.0, -4.0]], [[1.0, 4.0], [3.0, -2.0], [0.0, -6.0]]], [[[2.0, -3.0], [-3.0, -3.0], [-1.0, 7.0]], [[7.0, -1.0], [-1.0, 
--7.0], [-7.0, -6.0]]], [[[1.0, -6.0], [0.0, 0.0], [-1.0, 2.0]], [[5.0, 4.0], [-4.0, 6.0], [-6.0, -4.0]]]])
-      arg1=numpy.array([[[[-4.0, 7.0], [2.0, 4.0], [-1.0, -4.0]], [[2.0, 2.0], [-4.0, -7.0], [-2.0, 4.0]]], [[[0.0, 0.0], 
-[-5.0, -6.0], [0.0, -1.0]], [[0.0, 3.0], [6.0, -1.0], [-3.0, 5.0]]], [[[5.0, 0.0], [-1.0, -4.0], [-1.0, 3.0]], [[0.0, 1.0], 
-[-6.0, -6.0], [-6.0, -2.0]]], [[[-4.0, 6.0], [7.0, 4.0], [7.0, 7.0]], [[5.0, -6.0], [-6.0, 4.0], [5.0, -1.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      ref=numpy.array(-8.0)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank1_offset0(self):
+      arg0=Data(numpy.array([-3.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, -5.0]))
+      arg1=numpy.array([7.0, -5.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-21.0, 15.0], [-28.0, 20.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-7.0, 5.0], [-35.0, 25.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_array_rank1_offset0(self):
-      arg0=numpy.array(4.0)
-      arg1=numpy.array([-3.0, 7.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([-12.0, 28.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[-6.0, 3.0], [1.0, 3.0], [0.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -4.0], [-1.0, -7.0], [-7.0, 3.0]]))
+      arg1=numpy.array([[3.0, 4.0], [0.0, -6.0], [-4.0, -5.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-18.0, -30.0], [1.0, -16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[49.0, 69.0], [-24.0, 11.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank2_offset1(self):
-      arg0=numpy.array([-3.0, -4.0, -2.0])
-      arg1=numpy.array([[6.0, 4.0, 7.0], [-7.0, 7.0, -2.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([-48.0, -3.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, 1.0], [2.0, 6.0], [-4.0, 2.0]], [[6.0, -4.0], [0.0, 0.0], [4.0, 
+-5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -6.0], [1.0, 6.0], [7.0, 6.0]], [[-6.0, 3.0], [-5.0, -5.0], [-1.0, -6.0]]]))
+      arg1=numpy.array([[[-4.0, -3.0], [-2.0, -6.0], [7.0, 3.0]], [[0.0, 4.0], [-1.0, 7.0], [-4.0, 3.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-40.0, 18.0], [18.0, -64.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[68.0, -38.0], [83.0, -41.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank3_offset2(self):
-      arg0=numpy.array([[7.0, 1.0, 2.0], [3.0, 3.0, 1.0]])
-      arg1=numpy.array([[[5.0, 2.0, -7.0], [-3.0, 5.0, 2.0]], [[-2.0, -3.0, 3.0], [3.0, 1.0, -3.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([31.0, -2.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, -6.0], [0.0, -5.0], [0.0, 4.0]], [[6.0, -3.0], [-7.0, 7.0], [-2.0, 5.0]], [[-3.0, 4.0], 
+[6.0, 4.0], [4.0, 4.0]], [[-5.0, 4.0], [1.0, -5.0], [7.0, -3.0]]], [[[7.0, -7.0], [-2.0, -3.0], [7.0, 5.0]], [[0.0, 3.0], 
+[-4.0, 4.0], [5.0, -5.0]], [[-4.0, 4.0], [6.0, -2.0], [-1.0, 2.0]], [[-4.0, 2.0], [-2.0, -3.0], [0.0, 
+-2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 5.0], [-5.0, -7.0], [3.0, 4.0]], [[-4.0, -6.0], [-6.0, 5.0], [-3.0, -1.0]], 
+[[6.0, 7.0], [7.0, -3.0], [3.0, 1.0]], [[2.0, 4.0], [6.0, 1.0], [2.0, 6.0]]], [[[-3.0, 4.0], [-1.0, -7.0], [1.0, -6.0]], [[0.0, 
+-2.0], [-3.0, -1.0], [7.0, -4.0]], [[5.0, 1.0], [-2.0, -2.0], [7.0, 3.0]], [[3.0, 4.0], [1.0, 4.0], [5.0, 1.0]]]]))
+      arg1=numpy.array([[[[-3.0, 1.0], [0.0, 6.0], [-4.0, 7.0]], [[-7.0, 2.0], [0.0, -3.0], [-3.0, 0.0]], [[-6.0, -3.0], [0.0, 
+-5.0], [3.0, -6.0]], [[4.0, -5.0], [-6.0, 4.0], [7.0, -3.0]]], [[[2.0, -5.0], [-7.0, -2.0], [7.0, 6.0]], [[-5.0, 1.0], [-2.0, 
+-5.0], [0.0, 0.0]], [[-3.0, -1.0], [5.0, 2.0], [5.0, 0.0]], [[6.0, -3.0], [0.0, 6.0], [-1.0, -4.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[103.0, 47.0], [42.0, -92.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[21.0, -56.0], [79.0, -118.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank4_offset3(self):
-      arg0=numpy.array([[[-6.0, 1.0, -3.0], [3.0, 5.0, -6.0], [3.0, -3.0, -2.0], [1.0, 5.0, 2.0]], [[3.0, 0.0, 3.0], [7.0, 
--7.0, 7.0], [-6.0, -6.0, 0.0], [-1.0, 0.0, -3.0]]])
-      arg1=numpy.array([[[[3.0, -6.0, 1.0], [-1.0, 0.0, 7.0], [3.0, -6.0, 1.0], [1.0, -2.0, 6.0]], [[-2.0, 5.0, -6.0], [3.0, 
--7.0, -4.0], [-7.0, 2.0, -4.0], [-7.0, 2.0, -6.0]]], [[[6.0, 4.0, 6.0], [-6.0, -3.0, -1.0], [-3.0, 0.0, -7.0], [6.0, 3.0, 
--1.0]], [[3.0, -5.0, -3.0], [7.0, 0.0, 1.0], [6.0, -1.0, 0.0], [-7.0, 5.0, -4.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([29.0, -8.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank2_offset0(self):
+      arg0=Data(numpy.array([0.0, 3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, -4.0]))
+      arg1=numpy.array([[1.0, 4.0, 3.0, 7.0, 4.0], [-1.0, -4.0, 5.0, 3.0, 0.0], [1.0, -5.0, 0.0, 0.0, -5.0], [-6.0, 1.0, -3.0, 
+-2.0, 2.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[3.0, 12.0, 9.0, 21.0, 12.0], [-3.0, -12.0, 15.0, 9.0, 0.0], [3.0, -15.0, 0.0, 0.0, -15.0], [-18.0, 3.0, -9.0, 
+-6.0, 6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-5.0, -20.0, -15.0, -35.0, -20.0], [5.0, 20.0, -25.0, -15.0, 0.0], [-5.0, 25.0, 0.0, 
+0.0, 25.0], [30.0, -5.0, 15.0, 10.0, -10.0]], [[-4.0, -16.0, -12.0, -28.0, -16.0], [4.0, 16.0, -20.0, -12.0, 0.0], [-4.0, 20.0, 
+0.0, 0.0, 20.0], [24.0, -4.0, 12.0, 8.0, -8.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_array_rank2_offset0(self):
-      arg0=numpy.array(-2.0)
-      arg1=numpy.array([[3.0, 4.0, -5.0, 3.0, 1.0], [3.0, -4.0, -4.0, 2.0, -2.0], [1.0, 5.0, 4.0, -3.0, 6.0], [-2.0, 0.0, -3.0, 
-2.0, 6.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-6.0, -8.0, 10.0, -6.0, -2.0], [-6.0, 8.0, 8.0, -4.0, 4.0], [-2.0, -10.0, -8.0, 6.0, -12.0], [4.0, 
--0.0, 6.0, -4.0, -12.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[-1.0, -4.0], [-3.0, 0.0], [3.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, 5.0], [5.0, -3.0], [6.0, 0.0]]))
+      arg1=numpy.array([[[-3.0, 4.0, -5.0, 6.0, 2.0], [5.0, -5.0, -7.0, 2.0, 6.0], [5.0, 0.0, -1.0, 0.0, 0.0], [-7.0, 4.0, 1.0, 
+-6.0, -3.0]], [[-3.0, 0.0, 0.0, -6.0, 5.0], [-6.0, 0.0, 5.0, -6.0, 4.0], [3.0, 4.0, 3.0, -1.0, -2.0], [-2.0, -5.0, 7.0, 3.0, 
+-6.0]], [[4.0, 5.0, 4.0, -7.0, 0.0], [0.0, -6.0, 5.0, 3.0, 6.0], [3.0, 0.0, 2.0, 4.0, -4.0], [4.0, -7.0, -4.0, -6.0, -2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[24.0, 11.0, 17.0, -9.0, -17.0], [13.0, -13.0, 7.0, 25.0, 0.0], [-5.0, -12.0, -2.0, 15.0, -6.0], 
+[25.0, -10.0, -34.0, -21.0, 15.0]], [[0.0, -31.0, 8.0, -3.0, -8.0], [-20.0, 38.0, 13.0, -17.0, -42.0], [-29.0, 0.0, -2.0, 
+-12.0, 12.0], [16.0, 5.0, 8.0, 42.0, 18.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-6.0, 50.0, -1.0, -42.0, 35.0], [-5.0, -61.0, 20.0, -2.0, 86.0], [58.0, 20.0, 22.0, 
+19.0, -34.0], [-21.0, -47.0, 16.0, -51.0, -57.0]], [[-6.0, 20.0, -25.0, 48.0, -5.0], [43.0, -25.0, -50.0, 28.0, 18.0], [16.0, 
+-12.0, -14.0, 3.0, 6.0], [-29.0, 35.0, -16.0, -39.0, 3.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank3_offset1(self):
-      arg0=numpy.array([5.0, -6.0, 7.0])
-      arg1=numpy.array([[[7.0, 3.0, -1.0], [6.0, -6.0, 6.0], [-7.0, -5.0, -1.0], [5.0, -5.0, -4.0], [4.0, -3.0, 1.0]], [[-3.0, 
-0.0, 5.0], [4.0, 4.0, -4.0], [2.0, 7.0, 7.0], [-1.0, -4.0, 1.0], [4.0, 4.0, 0.0]], [[2.0, -4.0, -1.0], [-2.0, 0.0, 2.0], [0.0, 
-0.0, 1.0], [7.0, 5.0, 0.0], [0.0, 2.0, -3.0]], [[0.0, -4.0, 2.0], [1.0, -5.0, -7.0], [-6.0, -1.0, -4.0], [-2.0, -7.0, -7.0], 
-[-6.0, 5.0, -7.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[10.0, 108.0, -12.0, 27.0, 45.0], [20.0, -32.0, 17.0, 26.0, -4.0], [27.0, 4.0, 7.0, 5.0, -33.0], [38.0, 
--14.0, -52.0, -17.0, -109.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, 3.0], [0.0, 2.0], [0.0, -3.0]], [[4.0, 1.0], [0.0, 2.0], [1.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, -3.0], [4.0, -2.0], [5.0, 2.0]], [[2.0, 5.0], [2.0, -3.0], [0.0, 7.0]]]))
+      arg1=numpy.array([[[[7.0, -1.0, 4.0, 6.0, -3.0], [2.0, 3.0, 6.0, 2.0, -5.0], [7.0, 7.0, 5.0, 0.0, -1.0], [-3.0, 1.0, 2.0, 
+6.0, -1.0]], [[-7.0, -1.0, 4.0, 2.0, 5.0], [-3.0, 0.0, -2.0, -6.0, -2.0], [4.0, -5.0, 2.0, 2.0, -2.0], [4.0, 0.0, -7.0, -1.0, 
+3.0]], [[-2.0, -3.0, -2.0, -3.0, -7.0], [0.0, 6.0, 5.0, -2.0, 0.0], [-7.0, -5.0, 0.0, 3.0, 5.0], [6.0, -5.0, 1.0, 7.0, -7.0]]], 
+[[[-7.0, 5.0, 0.0, -6.0, 0.0], [0.0, -1.0, 2.0, 1.0, 5.0], [1.0, -4.0, 1.0, -5.0, 6.0], [5.0, 5.0, -3.0, -3.0, -1.0]], [[1.0, 
+-2.0, -7.0, -5.0, 0.0], [1.0, -4.0, -5.0, -5.0, 0.0], [-7.0, -4.0, 1.0, -4.0, -2.0], [6.0, 1.0, -5.0, -1.0, -2.0]], [[4.0, 3.0, 
+-4.0, -7.0, 3.0], [-3.0, -4.0, -7.0, 4.0, 1.0], [3.0, -1.0, -6.0, -6.0, -6.0], [1.0, 0.0, -7.0, -5.0, -3.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-38.0, 25.0, -12.0, -43.0, 9.0], [-7.0, -14.0, -11.0, 4.0, 31.0], [-7.0, -31.0, -12.0, -26.0, 
+20.0], [27.0, 18.0, -23.0, -29.0, -5.0]], [[12.0, 8.0, 8.0, 8.0, 25.0], [-1.0, -22.0, -16.0, -5.0, -13.0], [40.0, 13.0, 16.0, 
+-24.0, -26.0], [-1.0, 25.0, -31.0, -15.0, 16.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-22.0, -17.0, 8.0, -5.0, -27.0], [-2.0, 32.0, 35.0, -34.0, -18.0], [-3.0, -33.0, 
+32.0, 5.0, 21.0], [56.0, -9.0, -31.0, 47.0, -33.0]], [[-21.0, 51.0, -31.0, -92.0, 6.0], [-24.0, -18.0, -28.0, 50.0, 51.0], 
+[4.0, -36.0, -59.0, -53.0, 11.0], [27.0, 9.0, -39.0, -49.0, -37.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank4_offset2(self):
-      arg0=numpy.array([[6.0, -2.0, 1.0], [0.0, -2.0, -3.0]])
-      arg1=numpy.array([[[[6.0, -7.0, -5.0], [0.0, 5.0, -6.0]], [[-5.0, -3.0, 0.0], [0.0, 2.0, 1.0]], [[3.0, -4.0, 7.0], [-6.0, 
-5.0, 5.0]], [[2.0, -7.0, -1.0], [-6.0, -4.0, -2.0]], [[-1.0, -4.0, 7.0], [6.0, 2.0, 0.0]]], [[[-5.0, -5.0, 7.0], [1.0, 7.0, 
-7.0]], [[1.0, 7.0, 2.0], [5.0, -4.0, -6.0]], [[0.0, -5.0, 2.0], [6.0, -3.0, 3.0]], [[2.0, 7.0, -3.0], [3.0, -2.0, -4.0]], 
-[[-7.0, 7.0, -7.0], [3.0, -5.0, 7.0]]], [[[-2.0, 7.0, -5.0], [4.0, 5.0, 0.0]], [[4.0, 6.0, 0.0], [2.0, 1.0, 3.0]], [[-4.0, 
--4.0, 4.0], [-6.0, 0.0, -7.0]], [[0.0, -1.0, -2.0], [0.0, 6.0, 0.0]], [[-2.0, 2.0, -3.0], [2.0, -3.0, 3.0]]], [[[-3.0, -5.0, 
--1.0], [-2.0, 5.0, -2.0]], [[1.0, 1.0, 3.0], [-6.0, 0.0, 1.0]], [[6.0, 2.0, -1.0], [-4.0, 2.0, 3.0]], [[4.0, -6.0, -4.0], [2.0, 
-5.0, 0.0]], [[-6.0, -7.0, 5.0], [7.0, -5.0, -7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[53.0, -31.0, 8.0, 39.0, 5.0], [-48.0, 20.0, 9.0, 11.0, -74.0], [-41.0, 1.0, 9.0, -12.0, -22.0], [-13.0, 
-4.0, 18.0, 22.0, 14.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_array_rank3_offset0(self):
+      arg0=Data(numpy.array([-3.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, 0.0]))
+      arg1=numpy.array([[[-1.0, 4.0], [-2.0, 3.0]], [[1.0, 0.0], [-2.0, 3.0]], [[1.0, 1.0], [4.0, 0.0]], [[-2.0, -2.0], [2.0, 
+2.0]], [[-1.0, -3.0], [3.0, -6.0]], [[-5.0, 6.0], [-7.0, -1.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[3.0, -12.0], [6.0, -9.0]], [[-3.0, 0.0], [6.0, -9.0]], [[-3.0, -3.0], [-12.0, 0.0]], [[6.0, 
+6.0], [-6.0, -6.0]], [[3.0, 9.0], [-9.0, 18.0]], [[15.0, -18.0], [21.0, 3.0]]], [[[-6.0, 24.0], [-12.0, 18.0]], [[6.0, 0.0], 
+[-12.0, 18.0]], [[6.0, 6.0], [24.0, 0.0]], [[-12.0, -12.0], [12.0, 12.0]], [[-6.0, -18.0], [18.0, -36.0]], [[-30.0, 36.0], 
+[-42.0, -6.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[6.0, -24.0], [12.0, -18.0]], [[-6.0, 0.0], [12.0, -18.0]], [[-6.0, -6.0], [-24.0, 
+0.0]], [[12.0, 12.0], [-12.0, -12.0]], [[6.0, 18.0], [-18.0, 36.0]], [[30.0, -36.0], [42.0, 6.0]]], [[[0.0, 0.0], [0.0, 0.0]], 
+[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank4_offset1(self):
+      arg0=Data(numpy.array([[0.0, -4.0], [6.0, 0.0], [7.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, 0.0], [-6.0, -6.0], [4.0, 1.0]]))
+      arg1=numpy.array([[[[0.0, 5.0], [-7.0, 1.0]], [[5.0, 1.0], [0.0, -1.0]], [[-3.0, -4.0], [-3.0, -5.0]], [[1.0, 0.0], [0.0, 
+3.0]], [[-3.0, -6.0], [1.0, 5.0]], [[-3.0, 2.0], [6.0, 3.0]]], [[[5.0, -1.0], [-4.0, -3.0]], [[0.0, 5.0], [-4.0, -3.0]], 
+[[-2.0, 7.0], [-4.0, -6.0]], [[3.0, 2.0], [3.0, -1.0]], [[-4.0, 0.0], [-7.0, 0.0]], [[-6.0, 1.0], [-4.0, 3.0]]], [[[0.0, -5.0], 
+[0.0, 4.0]], [[7.0, -3.0], [-2.0, -5.0]], [[-1.0, 6.0], [6.0, -7.0]], [[1.0, 1.0], [0.0, 0.0]], [[7.0, 2.0], [-3.0, -1.0]], 
+[[2.0, -2.0], [-3.0, -2.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[30.0, -41.0], [-24.0, 10.0]], [[49.0, 9.0], [-38.0, -53.0]], [[-19.0, 84.0], [18.0, -85.0]], 
+[[25.0, 19.0], [18.0, -6.0]], [[25.0, 14.0], [-63.0, -7.0]], [[-22.0, -8.0], [-45.0, 4.0]]], [[[0.0, -30.0], [28.0, 4.0]], 
+[[-6.0, -10.0], [-4.0, -6.0]], [[10.0, 28.0], [24.0, 6.0]], [[-2.0, 2.0], [0.0, -12.0]], [[26.0, 28.0], [-10.0, -22.0]], 
+[[16.0, -12.0], [-30.0, -16.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-30.0, 21.0], [-25.0, 41.0]], [[63.0, -35.0], [16.0, -9.0]], [[-13.0, -46.0], [27.0, 
+-27.0]], [[-7.0, -8.0], [-18.0, 27.0]], [[31.0, -34.0], [37.0, 31.0]], [[23.0, 0.0], [54.0, -5.0]]], [[[-30.0, 1.0], [24.0, 
+22.0]], [[7.0, -33.0], [22.0, 13.0]], [[11.0, -36.0], [30.0, 29.0]], [[-17.0, -11.0], [-18.0, 6.0]], [[31.0, 2.0], [39.0, 
+-1.0]], [[38.0, -8.0], [21.0, -20.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([-1.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, -5.0]))
+      arg1=Data(-7.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([7.0, 7.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([42.0, 35.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[4.0, -1.0], [-3.0, 1.0], [7.0, 3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, -3.0], [0.0, -1.0], [5.0, 6.0]]))
+      arg1=Data(numpy.array([0.0, -7.0, 2.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([35.0, -1.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([10.0, 19.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_array_rank3_offset0(self):
-      arg0=numpy.array(-7.0)
-      arg1=numpy.array([[[2.0, -3.0], [-2.0, 0.0]], [[-6.0, -4.0], [2.0, -6.0]], [[1.0, -4.0], [0.0, 1.0]], [[1.0, 5.0], [-7.0, 
--4.0]], [[-3.0, 3.0], [-4.0, 0.0]], [[5.0, -5.0], [0.0, 7.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-14.0, 21.0], [14.0, -0.0]], [[42.0, 28.0], [-14.0, 42.0]], [[-7.0, 28.0], [-0.0, -7.0]], [[-7.0, 
--35.0], [49.0, 28.0]], [[21.0, -21.0], [28.0, -0.0]], [[-35.0, 35.0], [-0.0, -49.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[5.0, -6.0], [7.0, 0.0], [6.0, 2.0]], [[0.0, -4.0], [0.0, 0.0], [1.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, 7.0], [-1.0, -5.0], [7.0, -3.0]], [[0.0, -4.0], [5.0, -7.0], [-3.0, -3.0]]]))
+      arg1=Data(numpy.array([[-4.0, 0.0, -6.0], [3.0, 6.0, 7.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-49.0, -42.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-53.0, -85.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank4_offset1(self):
-      arg0=numpy.array([-2.0, -6.0, -2.0])
-      arg1=numpy.array([[[[4.0, 5.0, 2.0], [1.0, 0.0, 2.0]], [[5.0, -1.0, 5.0], [-1.0, -1.0, 7.0]]], [[[4.0, 0.0, 0.0], [-4.0, 
--1.0, -5.0]], [[4.0, 0.0, -3.0], [-7.0, 2.0, 4.0]]], [[[4.0, 2.0, 0.0], [-1.0, 7.0, 0.0]], [[-5.0, -1.0, 6.0], [5.0, -2.0, 
-6.0]]], [[[4.0, 0.0, -7.0], [7.0, 2.0, -6.0]], [[4.0, -3.0, -7.0], [-6.0, 4.0, 5.0]]], [[[-3.0, 1.0, 7.0], [1.0, 2.0, 6.0]], 
-[[0.0, -1.0, 6.0], [-5.0, 5.0, 3.0]]], [[[7.0, -3.0, -3.0], [2.0, 4.0, 0.0]], [[4.0, -6.0, -3.0], [-5.0, -5.0, -5.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-42.0, -6.0], [-14.0, -6.0]], [[-8.0, 24.0], [-2.0, -6.0]], [[-20.0, -40.0], [4.0, -10.0]], [[6.0, 
--14.0], [24.0, -22.0]], [[-14.0, -26.0], [-6.0, -26.0]], [[10.0, -28.0], [34.0, 50.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[5.0, 0.0], [6.0, -6.0], [3.0, -7.0]], [[3.0, 7.0], [2.0, 2.0], [3.0, -4.0]], [[0.0, 0.0], 
+[-4.0, 3.0], [7.0, 7.0]], [[-4.0, 7.0], [4.0, -5.0], [6.0, 2.0]]], [[[-6.0, -7.0], [3.0, 1.0], [5.0, -4.0]], [[5.0, 5.0], [3.0, 
+-4.0], [0.0, 1.0]], [[0.0, 0.0], [-3.0, 4.0], [-4.0, -6.0]], [[3.0, 3.0], [1.0, -7.0], [0.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, -1.0], [6.0, 5.0], [0.0, 6.0]], [[6.0, -2.0], [7.0, -3.0], [-1.0, -7.0]], 
+[[0.0, 5.0], [-7.0, 2.0], [-3.0, -1.0]], [[3.0, 0.0], [6.0, 0.0], [-5.0, -2.0]]], [[[5.0, 7.0], [-6.0, -5.0], [-1.0, 4.0]], 
+[[-3.0, 0.0], [2.0, 1.0], [5.0, 3.0]], [[-5.0, -7.0], [7.0, -2.0], [-4.0, 3.0]], [[7.0, -3.0], [4.0, -6.0], [3.0, -5.0]]]]))
+      arg1=Data(numpy.array([[[7.0, 5.0, -1.0], [-3.0, 5.0, -3.0], [-2.0, -5.0, -6.0], [-3.0, -6.0, 3.0]], [[7.0, -2.0, -3.0], 
+[2.0, -5.0, 0.0], [4.0, 0.0, -2.0], [2.0, 6.0, -3.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-10.0, -118.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([80.0, -15.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_array_rank4_offset0(self):
-      arg0=numpy.array(-2.0)
-      arg1=numpy.array([[[[-2.0, 4.0, -2.0, -5.0], [3.0, -3.0, -4.0, 7.0], [6.0, 0.0, -7.0, -3.0]], [[1.0, 2.0, -4.0, 7.0], 
-[4.0, 5.0, 3.0, 5.0], [3.0, 4.0, 7.0, 6.0]]], [[[-6.0, -2.0, -5.0, 1.0], [7.0, 4.0, -6.0, -7.0], [5.0, 0.0, 3.0, 4.0]], [[7.0, 
-0.0, -1.0, 2.0], [1.0, -6.0, 0.0, 0.0], [4.0, -1.0, -2.0, -6.0]]], [[[-3.0, 4.0, 6.0, 7.0], [2.0, -6.0, 3.0, -3.0], [-3.0, 0.0, 
--3.0, 4.0]], [[7.0, 0.0, -1.0, 0.0], [0.0, -1.0, 6.0, 1.0], [-5.0, 0.0, 5.0, 0.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[4.0, -8.0, 4.0, 10.0], [-6.0, 6.0, 8.0, -14.0], [-12.0, -0.0, 14.0, 6.0]], [[-2.0, -4.0, 8.0, -14.0], 
-[-8.0, -10.0, -6.0, -10.0], [-6.0, -8.0, -14.0, -12.0]]], [[[12.0, 4.0, 10.0, -2.0], [-14.0, -8.0, 12.0, 14.0], [-10.0, -0.0, 
--6.0, -8.0]], [[-14.0, -0.0, 2.0, -4.0], [-2.0, 12.0, -0.0, -0.0], [-8.0, 2.0, 4.0, 12.0]]], [[[6.0, -8.0, -12.0, -14.0], 
-[-4.0, 12.0, -6.0, 6.0], [6.0, -0.0, 6.0, -8.0]], [[-14.0, -0.0, 2.0, -0.0], [-0.0, 2.0, -12.0, -2.0], [10.0, -0.0, -10.0, 
--0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([3.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 0.0]))
+      arg1=Data(numpy.array([0.0, 7.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, 21.0], [0.0, -49.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[0.0, -35.0], [0.0, 0.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_constData_rank0_offset0(self):
-      arg0=numpy.array(6.0)
-      arg1=Data(-1.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-6.0,self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[0.0, 4.0], [-3.0, 4.0], [-3.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 5.0], [-6.0, 1.0], [-1.0, 0.0]]))
+      arg1=Data(numpy.array([[5.0, 2.0], [-3.0, -1.0], [3.0, 0.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[0.0, 3.0], [-1.0, 4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[15.0, 6.0], [22.0, 9.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank1_offset1(self):
-      arg0=numpy.array([7.0, 4.0, 4.0])
-      arg1=Data(numpy.array([1.0, -2.0, -6.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(-25.0,self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[5.0, 4.0], [6.0, 1.0], [4.0, -6.0]], [[2.0, 4.0], [-3.0, -2.0], [-3.0, 
+3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[2.0, -4.0], [0.0, 3.0], [2.0, 1.0]], [[-5.0, -2.0], [-5.0, 0.0], [4.0, -7.0]]]))
+      arg1=Data(numpy.array([[[-5.0, -2.0], [7.0, 3.0], [-5.0, 3.0]], [[0.0, -6.0], [-4.0, 6.0], [7.0, 
+-1.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-12.0, -7.0], [46.0, -62.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[28.0, -2.0], [-13.0, 39.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-1.0, 0.0], [5.0, 0.0], [-6.0, 3.0]], [[2.0, -1.0], [2.0, -5.0], [-3.0, -2.0]], [[4.0, 5.0], 
+[-5.0, -1.0], [-6.0, -4.0]], [[-1.0, 7.0], [-7.0, 1.0], [0.0, -3.0]]], [[[-2.0, -6.0], [2.0, 3.0], [-6.0, 7.0]], [[4.0, 4.0], 
+[-6.0, -3.0], [-5.0, 5.0]], [[2.0, 0.0], [0.0, 0.0], [-1.0, 3.0]], [[-7.0, -1.0], [-6.0, 3.0], [5.0, 
+3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, -3.0], [2.0, 1.0], [0.0, 7.0]], [[0.0, 1.0], [0.0, -3.0], [5.0, 3.0]], 
+[[-1.0, -7.0], [2.0, 0.0], [5.0, 5.0]], [[5.0, 6.0], [-2.0, -7.0], [2.0, -5.0]]], [[[0.0, -5.0], [-5.0, 5.0], [2.0, 1.0]], 
+[[-2.0, -6.0], [-1.0, 3.0], [2.0, 6.0]], [[7.0, -3.0], [-5.0, 3.0], [0.0, -1.0]], [[1.0, -4.0], [3.0, -1.0], [2.0, -6.0]]]]))
+      arg1=Data(numpy.array([[[[2.0, 4.0], [1.0, -7.0], [6.0, -7.0]], [[6.0, 3.0], [6.0, 4.0], [0.0, 1.0]], [[-6.0, 0.0], [5.0, 
+-3.0], [-4.0, -2.0]], [[1.0, 5.0], [-4.0, -1.0], [-3.0, 0.0]]], [[[-2.0, -6.0], [-5.0, 6.0], [3.0, 2.0]], [[-2.0, 3.0], [7.0, 
+0.0], [4.0, 5.0]], [[-1.0, 5.0], [-4.0, 6.0], [-2.0, 6.0]], [[-5.0, 2.0], [5.0, 1.0], [-3.0, -7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-111.0, -9.0], [-11.0, 102.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[44.0, -52.0], [167.0, 57.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank2_offset2(self):
-      arg0=numpy.array([[-1.0, 3.0, 5.0], [5.0, -6.0, 2.0]])
-      arg1=Data(numpy.array([[7.0, -4.0, -5.0], [0.0, 1.0, -7.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-64.0,self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([-6.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, 1.0]))
+      arg1=Data(numpy.array([[7.0, -1.0, -2.0, -7.0, 7.0], [1.0, -3.0, 0.0, -1.0, -5.0], [0.0, 3.0, 0.0, -2.0, 2.0], [2.0, 1.0, 
+-1.0, 0.0, 6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-42.0, 6.0, 12.0, 42.0, -42.0], [-6.0, 18.0, 0.0, 6.0, 30.0], [0.0, -18.0, 0.0, 12.0, -12.0], 
+[-12.0, -6.0, 6.0, 0.0, -36.0]], [[-14.0, 2.0, 4.0, 14.0, -14.0], [-2.0, 6.0, 0.0, 2.0, 10.0], [0.0, -6.0, 0.0, 4.0, -4.0], 
+[-4.0, -2.0, 2.0, 0.0, -12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[28.0, -4.0, -8.0, -28.0, 28.0], [4.0, -12.0, 0.0, -4.0, -20.0], [0.0, 12.0, 0.0, 
+-8.0, 8.0], [8.0, 4.0, -4.0, 0.0, 24.0]], [[7.0, -1.0, -2.0, -7.0, 7.0], [1.0, -3.0, 0.0, -1.0, -5.0], [0.0, 3.0, 0.0, -2.0, 
+2.0], [2.0, 1.0, -1.0, 0.0, 6.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank3_offset3(self):
-      arg0=numpy.array([[[6.0, 2.0, -5.0], [0.0, 4.0, 6.0], [-7.0, 2.0, 4.0], [5.0, -2.0, -7.0]], [[1.0, 3.0, 4.0], [-1.0, 
--1.0, -5.0], [-5.0, 6.0, 3.0], [5.0, 0.0, -5.0]]])
-      arg1=Data(numpy.array([[[-3.0, -7.0, 6.0], [7.0, 0.0, -4.0], [-2.0, -2.0, 2.0], [-7.0, -3.0, 3.0]], [[-4.0, -7.0, -5.0], 
-[0.0, 4.0, 4.0], [0.0, 5.0, 4.0], [4.0, -3.0, 3.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(-140.0,self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[0.0, -1.0], [-4.0, 4.0], [-3.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 5.0], [5.0, -6.0], [-1.0, 5.0]]))
+      arg1=Data(numpy.array([[[7.0, -7.0, -4.0, -5.0, 3.0], [-2.0, -6.0, -3.0, 5.0, -1.0], [0.0, -4.0, 6.0, -7.0, -4.0], [-2.0, 
+-7.0, -4.0, -4.0, 3.0]], [[-4.0, -1.0, 2.0, -7.0, -2.0], [2.0, 7.0, 5.0, -2.0, -4.0], [0.0, -7.0, 6.0, -3.0, 3.0], [5.0, 0.0, 
+-3.0, 0.0, 2.0]], [[0.0, 5.0, -5.0, 0.0, 7.0], [7.0, 0.0, 3.0, -6.0, 0.0], [-3.0, 0.0, -5.0, -2.0, 6.0], [3.0, 5.0, 7.0, -5.0, 
+-6.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[16.0, -11.0, 7.0, 28.0, -13.0], [-29.0, -28.0, -29.0, 26.0, 16.0], [9.0, 28.0, -9.0, 18.0, 
+-30.0], [-29.0, -15.0, -9.0, 15.0, 10.0]], [[-23.0, -12.0, 27.0, -23.0, -32.0], [-11.0, 34.0, 14.0, 5.0, -15.0], [9.0, -24.0, 
+33.0, 1.0, -2.0], [13.0, -8.0, -29.0, 19.0, 23.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-20.0, -10.0, 15.0, -35.0, -17.0], [3.0, 35.0, 22.0, -4.0, -20.0], [3.0, -35.0, 35.0, 
+-13.0, 9.0], [22.0, -5.0, -22.0, 5.0, 16.0]], [[59.0, -4.0, -57.0, 17.0, 62.0], [13.0, -72.0, -30.0, 7.0, 19.0], [-15.0, 22.0, 
+-31.0, -27.0, -8.0], [-25.0, -10.0, 33.0, -45.0, -27.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank4_offset4(self):
-      arg0=numpy.array([[[[0.0, -7.0], [3.0, -7.0], [3.0, -7.0]], [[7.0, -5.0], [4.0, 1.0], [1.0, -2.0]]], [[[4.0, -6.0], 
-[-6.0, -5.0], [1.0, 5.0]], [[-5.0, -2.0], [7.0, -5.0], [0.0, 3.0]]], [[[1.0, -2.0], [0.0, 5.0], [2.0, -3.0]], [[-3.0, -7.0], 
-[-3.0, -4.0], [-3.0, -7.0]]], [[[1.0, 0.0], [0.0, 6.0], [-1.0, -7.0]], [[-5.0, -7.0], [5.0, 6.0], [6.0, 7.0]]]])
-      arg1=Data(numpy.array([[[[4.0, 1.0], [-1.0, 0.0], [0.0, 0.0]], [[-3.0, 2.0], [4.0, -3.0], [-3.0, -3.0]]], [[[2.0, -5.0], 
-[6.0, -5.0], [0.0, -6.0]], [[2.0, 0.0], [6.0, 4.0], [-2.0, 6.0]]], [[[-6.0, -3.0], [-3.0, -2.0], [1.0, 6.0]], [[-2.0, -1.0], 
-[7.0, -3.0], [-3.0, -1.0]]], [[[-1.0, 0.0], [0.0, -6.0], [-6.0, 4.0]], [[6.0, -6.0], [6.0, 2.0], [-5.0, 
-7.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      ref=Data(10.0,self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-4.0, -1.0], [-7.0, -4.0], [-7.0, 5.0]], [[0.0, -5.0], [-4.0, 6.0], [-1.0, 
+0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, -4.0], [6.0, -1.0], [7.0, 0.0]], [[7.0, 0.0], [-1.0, -6.0], [6.0, 2.0]]]))
+      arg1=Data(numpy.array([[[[-4.0, -7.0, 7.0, -2.0, 6.0], [5.0, -2.0, 0.0, 0.0, 5.0], [2.0, 4.0, -4.0, 5.0, 2.0], [-2.0, 
+-4.0, 4.0, 2.0, -1.0]], [[-6.0, 5.0, 5.0, 3.0, 0.0], [0.0, -4.0, -6.0, 6.0, 2.0], [1.0, -5.0, 1.0, 7.0, -4.0], [6.0, 7.0, 0.0, 
+2.0, -1.0]], [[-6.0, 3.0, 1.0, -4.0, 7.0], [-2.0, -4.0, 7.0, 0.0, 0.0], [-6.0, -5.0, -6.0, 3.0, -4.0], [-6.0, 5.0, -7.0, 3.0, 
+-2.0]]], [[[1.0, -2.0, -1.0, -3.0, -3.0], [6.0, 7.0, -5.0, 7.0, -3.0], [-3.0, 6.0, 7.0, 0.0, -4.0], [-2.0, 4.0, -5.0, -1.0, 
+6.0]], [[0.0, 6.0, 7.0, 1.0, -1.0], [-6.0, -4.0, 2.0, -2.0, 5.0], [0.0, 6.0, 2.0, -4.0, -4.0], [-6.0, -4.0, -7.0, 3.0, 5.0]], 
+[[5.0, -6.0, -7.0, -1.0, 5.0], [4.0, -3.0, -2.0, 4.0, -4.0], [3.0, -6.0, 1.0, -1.0, 2.0], [0.0, -1.0, -1.0, -6.0, 
+3.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[95.0, -46.0, -91.0, 12.0, -74.0], [14.0, 83.0, -13.0, -38.0, -50.0], [24.0, 36.0, 42.0, -73.0, 
+62.0], [32.0, -51.0, 62.0, -49.0, 2.0]], [[-7.0, 48.0, 25.0, -9.0, 38.0], [-81.0, -61.0, 96.0, -71.0, 32.0], [-21.0, -3.0, 
+-53.0, -42.0, -10.0], [-78.0, -43.0, -56.0, 28.0, -5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-65.0, -47.0, 23.0, -50.0, 95.0], [88.0, -29.0, -36.0, 111.0, -8.0], [-27.0, -41.0, 
+-7.0, 91.0, -52.0], [-26.0, 79.0, -59.0, -1.0, 29.0]], [[32.0, -25.0, -89.0, -3.0, -8.0], [24.0, 30.0, -10.0, 14.0, -60.0], 
+[-3.0, -59.0, 5.0, -5.0, 24.0], [38.0, 31.0, 24.0, -40.0, -19.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_constData_rank1_offset0(self):
-      arg0=numpy.array(-7.0)
-      arg1=Data(numpy.array([-5.0, 3.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([35.0, -21.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank1_constData_rank3_offset0(self):
+      arg0=Data(numpy.array([3.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 0.0]))
+      arg1=Data(numpy.array([[[-6.0, 3.0], [-7.0, -6.0]], [[0.0, 0.0], [4.0, 4.0]], [[-4.0, 2.0], [5.0, 3.0]], [[1.0, 2.0], 
+[3.0, 1.0]], [[4.0, -1.0], [7.0, -1.0]], [[-5.0, -2.0], [-4.0, 3.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-18.0, 9.0], [-21.0, -18.0]], [[0.0, 0.0], [12.0, 12.0]], [[-12.0, 6.0], [15.0, 9.0]], [[3.0, 
+6.0], [9.0, 3.0]], [[12.0, -3.0], [21.0, -3.0]], [[-15.0, -6.0], [-12.0, 9.0]]], [[[36.0, -18.0], [42.0, 36.0]], [[0.0, 0.0], 
+[-24.0, -24.0]], [[24.0, -12.0], [-30.0, -18.0]], [[-6.0, -12.0], [-18.0, -6.0]], [[-24.0, 6.0], [-42.0, 6.0]], [[30.0, 12.0], 
+[24.0, -18.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[30.0, -15.0], [35.0, 30.0]], [[0.0, 0.0], [-20.0, -20.0]], [[20.0, -10.0], [-25.0, 
+-15.0]], [[-5.0, -10.0], [-15.0, -5.0]], [[-20.0, 5.0], [-35.0, 5.0]], [[25.0, 10.0], [20.0, -15.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank2_offset1(self):
-      arg0=numpy.array([7.0, 4.0, 7.0])
-      arg1=Data(numpy.array([[-3.0, 6.0, 3.0], [0.0, -6.0, 0.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([24.0, -24.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([[4.0, 0.0], [-4.0, 2.0], [6.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, -4.0], [7.0, -6.0], [3.0, -5.0]]))
+      arg1=Data(numpy.array([[[[-2.0, 6.0], [3.0, 7.0]], [[7.0, 5.0], [-2.0, -2.0]], [[-6.0, 3.0], [6.0, 7.0]], [[0.0, -7.0], 
+[0.0, -7.0]], [[0.0, 5.0], [-1.0, 0.0]], [[-5.0, 1.0], [5.0, -2.0]]], [[[-3.0, -4.0], [-2.0, 0.0]], [[2.0, -6.0], [7.0, -6.0]], 
+[[-4.0, 6.0], [1.0, 0.0]], [[0.0, -2.0], [6.0, 3.0]], [[-2.0, 5.0], [-4.0, -3.0]], [[-7.0, -4.0], [-5.0, -5.0]]], [[[-4.0, 
+5.0], [-6.0, 2.0]], [[3.0, -5.0], [0.0, 5.0]], [[0.0, 3.0], [-7.0, 7.0]], [[-6.0, 4.0], [6.0, 0.0]], [[-1.0, -6.0], [-4.0, 
+-7.0]], [[0.0, -6.0], [7.0, 5.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-20.0, 70.0], [-16.0, 40.0]], [[38.0, 14.0], [-36.0, 46.0]], [[-8.0, 6.0], [-22.0, 70.0]], 
+[[-36.0, 4.0], [12.0, -40.0]], [[2.0, -36.0], [-12.0, -30.0]], [[8.0, -16.0], [82.0, 42.0]]], [[[-34.0, 27.0], [-46.0, 14.0]], 
+[[25.0, -47.0], [14.0, 23.0]], [[-8.0, 33.0], [-47.0, 49.0]], [[-42.0, 24.0], [54.0, 6.0]], [[-11.0, -32.0], [-36.0, -55.0]], 
+[[-14.0, -50.0], [39.0, 25.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-21.0, -49.0], [-50.0, -36.0]], [[-19.0, -87.0], [61.0, -15.0]], [[8.0, 33.0], 
+[-50.0, -21.0]], [[-18.0, 40.0], [60.0, 63.0]], [[-17.0, -13.0], [-34.0, -42.0]], [[-19.0, -52.0], [-44.0, -8.0]]], [[[46.0, 
+-25.0], [30.0, -38.0]], [[-55.0, 41.0], [-34.0, 19.0]], [[48.0, -63.0], [5.0, -63.0]], [[30.0, 20.0], [-66.0, 10.0]], [[17.0, 
+-20.0], [48.0, 53.0]], [[62.0, 50.0], [-25.0, 13.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank3_offset2(self):
-      arg0=numpy.array([[2.0, -4.0, -5.0], [3.0, 5.0, -4.0]])
-      arg1=Data(numpy.array([[[0.0, -2.0, 3.0], [-6.0, 4.0, -6.0]], [[2.0, -5.0, 4.0], [-5.0, -6.0, -3.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([19.0, -29.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([-1.0, 3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 4.0]))
+      arg1=Data(-4.0,self.functionspace)
+      arg1.setTaggedValue(1,4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([4.0, -12.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([0.0, 16.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank4_offset3(self):
-      arg0=numpy.array([[[7.0, 6.0, 7.0], [0.0, 4.0, -4.0], [-2.0, -6.0, 0.0], [-2.0, -6.0, 0.0]], [[0.0, 7.0, 3.0], [2.0, 
--4.0, 7.0], [-3.0, 3.0, -7.0], [4.0, -5.0, -2.0]]])
-      arg1=Data(numpy.array([[[[-4.0, -6.0, 0.0], [0.0, -4.0, -2.0], [4.0, -5.0, 7.0], [1.0, -6.0, -4.0]], [[-4.0, -2.0, 7.0], 
-[-3.0, -1.0, 6.0], [0.0, -2.0, 5.0], [2.0, -3.0, -2.0]]], [[[6.0, 3.0, -3.0], [2.0, 5.0, 0.0], [3.0, 3.0, 3.0], [-7.0, 6.0, 
--1.0]], [[0.0, -2.0, -3.0], [-3.0, 5.0, 2.0], [6.0, 0.0, 1.0], [2.0, -1.0, 0.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([17.0, -34.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[4.0, -6.0], [6.0, -2.0], [3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -4.0], [-5.0, -1.0], [-4.0, 2.0]]))
+      arg1=Data(numpy.array([-6.0, 1.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, -5.0, -3.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([-12.0, 34.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([37.0, -1.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_constData_rank2_offset0(self):
-      arg0=numpy.array(-5.0)
-      arg1=Data(numpy.array([[-2.0, 4.0, 2.0, -3.0, -5.0], [4.0, 5.0, 0.0, 5.0, 1.0], [-6.0, -2.0, -7.0, -1.0, 0.0], [1.0, 2.0, 
-2.0, 6.0, 2.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[10.0, -20.0, -10.0, 15.0, 25.0], [-20.0, -25.0, -0.0, -25.0, -5.0], [30.0, 10.0, 35.0, 5.0, -0.0], 
-[-5.0, -10.0, -10.0, -30.0, -10.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, -5.0], [5.0, 1.0], [7.0, -1.0]], [[-2.0, -5.0], [6.0, -3.0], [0.0, 
+7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, 4.0], [0.0, 7.0], [-4.0, -4.0]], [[5.0, 0.0], [0.0, -5.0], [7.0, -4.0]]]))
+      arg1=Data(numpy.array([[7.0, 0.0, -1.0], [5.0, 5.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 5.0, 5.0], [-1.0, 3.0, -4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([13.0, -123.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-63.0, 8.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank3_offset1(self):
-      arg0=numpy.array([-3.0, 0.0, 2.0])
-      arg1=Data(numpy.array([[[7.0, -3.0, -4.0], [1.0, 6.0, -5.0], [0.0, 7.0, 1.0], [1.0, 2.0, 6.0], [1.0, -5.0, 4.0]], [[-4.0, 
-0.0, -3.0], [-1.0, 7.0, -4.0], [7.0, -3.0, -5.0], [2.0, -6.0, 0.0], [-5.0, 2.0, -3.0]], [[6.0, 6.0, 5.0], [6.0, -2.0, -2.0], 
-[-2.0, 3.0, 1.0], [3.0, 0.0, -4.0], [4.0, 0.0, 6.0]], [[-6.0, 0.0, 3.0], [-7.0, 3.0, 3.0], [6.0, 6.0, -1.0], [4.0, -5.0, 0.0], 
-[7.0, -1.0, -2.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-29.0, -13.0, 2.0, 9.0, 5.0], [6.0, -5.0, -31.0, -6.0, 9.0], [-8.0, -22.0, 8.0, -17.0, 0.0], 
-[24.0, 27.0, -20.0, -12.0, -25.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[1.0, -4.0], [-1.0, 4.0], [4.0, -2.0]], [[-5.0, 6.0], [-5.0, 7.0], [-3.0, 6.0]], [[-6.0, 1.0], 
+[-2.0, 4.0], [6.0, 5.0]], [[5.0, 6.0], [-1.0, 7.0], [-6.0, -7.0]]], [[[-4.0, -3.0], [5.0, 0.0], [-3.0, 7.0]], [[4.0, -6.0], 
+[3.0, 7.0], [-4.0, 1.0]], [[0.0, -5.0], [-5.0, 0.0], [-1.0, 0.0]], [[2.0, -3.0], [-7.0, -6.0], [0.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 2.0], [3.0, 0.0], [3.0, 4.0]], [[4.0, 6.0], [5.0, -6.0], [0.0, -4.0]], [[4.0, 
+0.0], [6.0, -6.0], [1.0, -3.0]], [[6.0, 1.0], [3.0, -1.0], [0.0, 5.0]]], [[[-5.0, 0.0], [-4.0, 0.0], [7.0, 3.0]], [[0.0, -6.0], 
+[-5.0, -7.0], [-6.0, -2.0]], [[-6.0, -3.0], [-1.0, -3.0], [-3.0, -7.0]], [[-7.0, 7.0], [4.0, 5.0], [-4.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[-2.0, 2.0, -4.0], [-6.0, -2.0, -7.0], [6.0, -7.0, -2.0], [4.0, -3.0, 2.0]], [[4.0, -3.0, -3.0], 
+[4.0, -6.0, -6.0], [-6.0, 0.0, 2.0], [1.0, -3.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, 3.0, -3.0], [-4.0, -7.0, 2.0], [-3.0, -7.0, 7.0], [7.0, -5.0, 2.0]], [[0.0, 
+0.0, 0.0], [-5.0, 4.0, 0.0], [-1.0, 7.0, 6.0], [6.0, -7.0, 7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([39.0, -173.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-215.0, 4.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank4_offset2(self):
-      arg0=numpy.array([[-5.0, 5.0, 3.0], [-5.0, -4.0, -3.0]])
-      arg1=Data(numpy.array([[[[0.0, -2.0, -3.0], [6.0, -2.0, 2.0]], [[-6.0, 6.0, -3.0], [2.0, 4.0, -4.0]], [[1.0, -3.0, 6.0], 
-[-3.0, -3.0, -3.0]], [[1.0, 7.0, -1.0], [0.0, 1.0, 5.0]], [[-7.0, -7.0, 0.0], [-5.0, -3.0, -6.0]]], [[[7.0, -5.0, -1.0], [4.0, 
--2.0, 6.0]], [[7.0, -4.0, 0.0], [-1.0, -7.0, -6.0]], [[-5.0, 7.0, 5.0], [4.0, 0.0, -7.0]], [[0.0, -4.0, -6.0], [-3.0, 7.0, 
-0.0]], [[-4.0, 0.0, 4.0], [0.0, 3.0, -1.0]]], [[[-7.0, -7.0, 7.0], [-2.0, -2.0, -1.0]], [[-3.0, -5.0, 4.0], [6.0, -2.0, 3.0]], 
-[[-3.0, 3.0, -1.0], [-3.0, -2.0, 4.0]], [[0.0, -6.0, -7.0], [-1.0, -4.0, 1.0]], [[0.0, 5.0, -4.0], [3.0, 5.0, -1.0]]], [[[7.0, 
-6.0, 6.0], [6.0, -1.0, -2.0]], [[-7.0, 5.0, 4.0], [-2.0, -7.0, 0.0]], [[0.0, 3.0, -6.0], [4.0, -2.0, 6.0]], [[-4.0, 6.0, -4.0], 
-[0.0, 2.0, -2.0]], [[1.0, 4.0, 6.0], [-7.0, -3.0, 0.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-47.0, 37.0, 34.0, 8.0, 55.0], [-93.0, -4.0, 76.0, -51.0, 23.0], [42.0, -29.0, 38.0, -33.0, 
--19.0], [-7.0, 110.0, -33.0, 36.0, 80.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-5.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, 1.0]))
+      arg1=Data(numpy.array([-5.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, -7.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[25.0, -5.0], [20.0, -4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[24.0, 28.0], [-6.0, -7.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_constData_rank3_offset0(self):
-      arg0=numpy.array(3.0)
-      arg1=Data(numpy.array([[[6.0, -2.0], [5.0, -1.0]], [[5.0, 7.0], [0.0, 7.0]], [[-5.0, 5.0], [-1.0, -4.0]], [[-7.0, -6.0], 
-[0.0, -1.0]], [[3.0, 2.0], [0.0, -3.0]], [[-4.0, 0.0], [5.0, 0.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[18.0, -6.0], [15.0, -3.0]], [[15.0, 21.0], [0.0, 21.0]], [[-15.0, 15.0], [-3.0, -12.0]], [[-21.0, 
--18.0], [0.0, -3.0]], [[9.0, 6.0], [0.0, -9.0]], [[-12.0, 0.0], [15.0, 0.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[3.0, 0.0], [-1.0, 1.0], [3.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, 3.0], [-2.0, -2.0], [4.0, 4.0]]))
+      arg1=Data(numpy.array([[-2.0, -4.0], [0.0, 5.0], [1.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 2.0], [0.0, 6.0], [-1.0, -3.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-3.0, -11.0], [-3.0, -1.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-19.0, -18.0], [-19.0, -18.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank4_offset1(self):
-      arg0=numpy.array([-3.0, -7.0, 4.0])
-      arg1=Data(numpy.array([[[[-2.0, -4.0, 2.0], [1.0, 7.0, 4.0]], [[3.0, -4.0, -6.0], [0.0, -1.0, 0.0]]], [[[-6.0, 7.0, 1.0], 
-[-1.0, -1.0, 5.0]], [[6.0, 6.0, -7.0], [7.0, 6.0, -5.0]]], [[[0.0, -1.0, 0.0], [7.0, -5.0, 6.0]], [[2.0, 3.0, 2.0], [-3.0, 4.0, 
-5.0]]], [[[0.0, -3.0, -1.0], [2.0, 1.0, 6.0]], [[-5.0, -2.0, 6.0], [7.0, -2.0, 1.0]]], [[[-3.0, -7.0, 2.0], [2.0, 2.0, 2.0]], 
-[[0.0, 6.0, -3.0], [2.0, -6.0, 0.0]]], [[[4.0, 6.0, 5.0], [0.0, 6.0, -3.0]], [[-2.0, -7.0, -7.0], [3.0, -2.0, 
-2.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[42.0, -36.0], [-5.0, 7.0]], [[-27.0, 30.0], [-88.0, -83.0]], [[7.0, 38.0], [-19.0, 1.0]], [[17.0, 
-11.0], [53.0, -3.0]], [[66.0, -12.0], [-54.0, 36.0]], [[-34.0, -54.0], [27.0, 13.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 2.0], [-1.0, 0.0], [-6.0, 2.0]], [[-4.0, 1.0], [-2.0, 7.0], [0.0, 
+0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 5.0], [-5.0, 6.0], [7.0, 7.0]], [[1.0, 3.0], [-2.0, 7.0], [6.0, -5.0]]]))
+      arg1=Data(numpy.array([[[-1.0, 2.0], [0.0, 0.0], [-7.0, -1.0]], [[1.0, -6.0], [-4.0, 0.0], [7.0, 
+-5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 3.0], [6.0, 3.0], [5.0, 2.0]], [[1.0, -1.0], [4.0, -1.0], [-1.0, 3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[46.0, 30.0], [-43.0, -4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-8.0, 18.0], [117.0, 22.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_constData_rank4_offset0(self):
-      arg0=numpy.array(-2.0)
-      arg1=Data(numpy.array([[[[0.0, 4.0, -5.0, -2.0], [5.0, -5.0, 6.0, 4.0], [0.0, 0.0, -1.0, -3.0]], [[2.0, -6.0, 6.0, -6.0], 
-[0.0, -4.0, 7.0, -1.0], [2.0, 5.0, 0.0, 5.0]]], [[[-2.0, -3.0, 7.0, 0.0], [-5.0, -6.0, -3.0, 3.0], [6.0, -2.0, 1.0, 4.0]], 
-[[-1.0, -3.0, 0.0, 0.0], [0.0, -6.0, 7.0, -6.0], [0.0, 0.0, 0.0, 4.0]]], [[[7.0, -3.0, 0.0, -5.0], [7.0, -6.0, -2.0, -2.0], 
-[-3.0, -3.0, 7.0, 6.0]], [[-7.0, 0.0, -5.0, 7.0], [-2.0, -7.0, -3.0, 3.0], [3.0, 5.0, 6.0, 0.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-0.0, -8.0, 10.0, 4.0], [-10.0, 10.0, -12.0, -8.0], [-0.0, -0.0, 2.0, 6.0]], [[-4.0, 12.0, 
--12.0, 12.0], [-0.0, 8.0, -14.0, 2.0], [-4.0, -10.0, -0.0, -10.0]]], [[[4.0, 6.0, -14.0, -0.0], [10.0, 12.0, 6.0, -6.0], 
-[-12.0, 4.0, -2.0, -8.0]], [[2.0, 6.0, -0.0, -0.0], [-0.0, 12.0, -14.0, 12.0], [-0.0, -0.0, -0.0, -8.0]]], [[[-14.0, 6.0, -0.0, 
-10.0], [-14.0, 12.0, 4.0, 4.0], [6.0, 6.0, -14.0, -12.0]], [[14.0, -0.0, 10.0, -14.0], [4.0, 14.0, 6.0, -6.0], [-6.0, -10.0, 
--12.0, -0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[0.0, 3.0], [1.0, -3.0], [3.0, 6.0]], [[-5.0, 6.0], [1.0, 1.0], [7.0, 6.0]], [[0.0, 0.0], [-5.0, 
+-1.0], [3.0, 0.0]], [[7.0, 0.0], [5.0, 7.0], [-6.0, 0.0]]], [[[-6.0, 0.0], [-2.0, 7.0], [5.0, -7.0]], [[4.0, -2.0], [-3.0, 
+2.0], [-5.0, -1.0]], [[-5.0, 2.0], [1.0, 4.0], [0.0, -7.0]], [[-5.0, 4.0], [1.0, -5.0], [-6.0, 1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 0.0], [-7.0, -1.0], [7.0, -5.0]], [[-4.0, -2.0], [1.0, 4.0], [-1.0, 3.0]], 
+[[3.0, -7.0], [0.0, -6.0], [4.0, -5.0]], [[-2.0, 5.0], [-1.0, 4.0], [7.0, 0.0]]], [[[6.0, -1.0], [3.0, -1.0], [3.0, 3.0]], 
+[[-5.0, -3.0], [4.0, -5.0], [-3.0, 1.0]], [[2.0, 0.0], [-3.0, 4.0], [-7.0, -3.0]], [[6.0, -7.0], [1.0, -7.0], [-2.0, 7.0]]]]))
+      arg1=Data(numpy.array([[[[-5.0, -4.0], [-6.0, 2.0], [7.0, 4.0]], [[5.0, 5.0], [7.0, -6.0], [-3.0, -1.0]], [[6.0, -4.0], 
+[4.0, -6.0], [2.0, -6.0]], [[3.0, 7.0], [2.0, 1.0], [5.0, -3.0]]], [[[-1.0, 3.0], [-2.0, 2.0], [-6.0, -3.0]], [[5.0, 5.0], 
+[-5.0, 6.0], [7.0, 1.0]], [[0.0, -5.0], [-3.0, 2.0], [-2.0, 3.0]], [[6.0, -4.0], [1.0, -6.0], [3.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, 3.0], [-7.0, -4.0], [-6.0, -6.0]], [[0.0, -2.0], [2.0, -3.0], [-7.0, -7.0]], 
+[[-6.0, -1.0], [-1.0, 5.0], [-4.0, 1.0]], [[-6.0, -4.0], [-5.0, 2.0], [-1.0, 1.0]]], [[[-3.0, -6.0], [-7.0, 4.0], [7.0, 0.0]], 
+[[0.0, -6.0], [-1.0, -2.0], [-2.0, -4.0]], [[-2.0, -1.0], [-2.0, -6.0], [0.0, -4.0]], [[4.0, 5.0], [1.0, 0.0], [-5.0, 1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-107.0, 19.0], [99.0, 71.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-17.0, 109.0], [-2.0, -49.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank0_offset0(self):
-      arg0=numpy.array(3.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(4.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-12.0)+(1.-msk_ref)*numpy.array(12.0)
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([7.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, -7.0]))
+      arg1=Data(numpy.array([[-7.0, 6.0, -7.0, 0.0, 7.0], [0.0, 7.0, 6.0, -7.0, -6.0], [-6.0, 2.0, -7.0, 7.0, 3.0], [0.0, 2.0, 
+4.0, -6.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -3.0, -6.0, -3.0, 0.0], [0.0, 3.0, 0.0, 6.0, -6.0], [-4.0, 0.0, 4.0, 7.0, 0.0], 
+[-3.0, 1.0, -1.0, 6.0, 0.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-49.0, 42.0, -49.0, 0.0, 49.0], [0.0, 49.0, 42.0, -49.0, -42.0], [-42.0, 14.0, -49.0, 49.0, 
+21.0], [0.0, 14.0, 28.0, -42.0, -28.0]], [[21.0, -18.0, 21.0, 0.0, -21.0], [0.0, -21.0, -18.0, 21.0, 18.0], [18.0, -6.0, 21.0, 
+-21.0, -9.0], [0.0, -6.0, -12.0, 18.0, 12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[-42.0, 21.0, 42.0, 21.0, 0.0], [0.0, -21.0, 0.0, -42.0, 42.0], [28.0, 0.0, -28.0, -49.0, 0.0], [21.0, 
+-7.0, 7.0, -42.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank1_offset1(self):
-      arg0=numpy.array([-5.0, 0.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([3.0, -1.0, -6.0])+(1.-msk_arg1)*numpy.array([5.0, -1.0, 6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-15.0)+(1.-msk_ref)*numpy.array(-25.0)
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-4.0, -1.0], [-4.0, -2.0], [-1.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 1.0], [3.0, 0.0], [0.0, 7.0]]))
+      arg1=Data(numpy.array([[[3.0, 2.0, -7.0, 0.0, -7.0], [0.0, -5.0, 2.0, -4.0, -4.0], [-7.0, 2.0, -7.0, 3.0, -6.0], [0.0, 
+1.0, -7.0, 4.0, -4.0]], [[6.0, -3.0, -1.0, 0.0, -7.0], [1.0, 7.0, 3.0, 3.0, 0.0], [5.0, 5.0, -5.0, 3.0, 0.0], [-3.0, -7.0, 
+-5.0, 6.0, 1.0]], [[-4.0, -5.0, -6.0, 0.0, 6.0], [4.0, 2.0, -1.0, 4.0, -2.0], [-4.0, 7.0, 0.0, 6.0, 2.0], [-5.0, -2.0, 5.0, 
+-4.0, 1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -5.0, 1.0, 0.0, 0.0], [-3.0, 0.0, -4.0, 4.0, 6.0], [3.0, 0.0, -3.0, -2.0, 
+-2.0], [1.0, 2.0, 5.0, -5.0, 1.0]], [[6.0, 0.0, 0.0, -3.0, 2.0], [2.0, 0.0, -1.0, -1.0, 3.0], [-7.0, 5.0, -7.0, 0.0, 0.0], 
+[5.0, -1.0, -6.0, 2.0, -1.0]], [[-5.0, 2.0, -3.0, -4.0, 1.0], [-3.0, 0.0, 2.0, 7.0, -5.0], [7.0, 0.0, 6.0, 4.0, 0.0], [7.0, 
+-2.0, 6.0, -4.0, 6.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-32.0, 9.0, 38.0, 0.0, 50.0], [-8.0, -10.0, -19.0, 0.0, 18.0], [12.0, -35.0, 48.0, -30.0, 22.0], 
+[17.0, 26.0, 43.0, -36.0, 11.0]], [[-3.0, 19.0, 27.0, 0.0, 3.0], [-14.0, -15.0, -5.0, -14.0, 10.0], [9.0, -33.0, 17.0, -27.0, 
+0.0], [21.0, 19.0, 2.0, -4.0, -1.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[24.0, 5.0, -1.0, -9.0, 6.0], [9.0, 0.0, 1.0, -7.0, 3.0], [-24.0, 15.0, -18.0, 2.0, 
+2.0], [14.0, -5.0, -23.0, 11.0, -4.0]], [[-41.0, 9.0, -20.0, -28.0, 7.0], [-24.0, 0.0, 10.0, 53.0, -29.0], [52.0, 0.0, 39.0, 
+26.0, -2.0], [50.0, -12.0, 47.0, -33.0, 43.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[-2.0, -6.0, -7.0], [-4.0, 3.0, -6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, -3.0, -6.0], [-1.0, 1.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 3.0, 4.0], [0.0, -2.0, 
-2.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(61.0)+(1.-msk_ref)*numpy.array(-50.0)
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[3.0, 0.0], [5.0, 0.0], [1.0, 3.0]], [[-7.0, 5.0], [-7.0, 3.0], [4.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, -3.0], [7.0, 6.0], [-3.0, -3.0]], [[5.0, -4.0], [5.0, 3.0], [-5.0, 0.0]]]))
+      arg1=Data(numpy.array([[[[5.0, -7.0, -5.0, 4.0, 6.0], [-3.0, -3.0, -6.0, 4.0, -3.0], [-2.0, -6.0, 6.0, 7.0, -1.0], [5.0, 
+1.0, 4.0, 1.0, -3.0]], [[-4.0, -6.0, -2.0, 3.0, 0.0], [5.0, 3.0, 6.0, -3.0, 7.0], [0.0, -1.0, -2.0, 2.0, -6.0], [2.0, -2.0, 
+3.0, -7.0, -3.0]], [[-3.0, -4.0, 4.0, -1.0, 0.0], [-7.0, 6.0, 0.0, 5.0, 7.0], [6.0, -1.0, 1.0, 5.0, 0.0], [1.0, 6.0, -7.0, 0.0, 
+-1.0]]], [[[2.0, 4.0, -3.0, -1.0, 0.0], [1.0, 2.0, -5.0, -2.0, -5.0], [-6.0, -5.0, -6.0, -6.0, 0.0], [-1.0, -3.0, -1.0, -7.0, 
+7.0]], [[4.0, 7.0, 2.0, 0.0, -3.0], [-4.0, -1.0, 4.0, 5.0, -6.0], [0.0, -4.0, -5.0, 2.0, -3.0], [-5.0, 1.0, -2.0, 4.0, 2.0]], 
+[[-6.0, -7.0, 6.0, -1.0, -4.0], [-7.0, -5.0, 5.0, -6.0, 7.0], [1.0, 3.0, 0.0, 6.0, -6.0], [3.0, -5.0, 6.0, 5.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[7.0, -5.0, -2.0, -1.0, 2.0], [-6.0, 6.0, -6.0, -1.0, -1.0], [7.0, 2.0, 5.0, 4.0, 
+6.0], [-3.0, 7.0, 0.0, 0.0, -4.0]], [[-7.0, -3.0, -3.0, -2.0, -7.0], [0.0, 6.0, -7.0, 4.0, 7.0], [7.0, -3.0, 4.0, 0.0, 4.0], 
+[2.0, 0.0, -2.0, 2.0, 3.0]], [[-6.0, 7.0, -7.0, 3.0, -3.0], [-1.0, 6.0, -5.0, -1.0, 7.0], [3.0, 2.0, 4.0, 2.0, 5.0], [-1.0, 
+-7.0, 4.0, -4.0, -3.0]]], [[[1.0, -2.0, 1.0, -3.0, 0.0], [-7.0, 4.0, 7.0, -3.0, 3.0], [-4.0, -3.0, 0.0, -3.0, 0.0], [7.0, -7.0, 
+-3.0, -3.0, 1.0]], [[1.0, -1.0, 7.0, -5.0, 0.0], [7.0, -7.0, -2.0, 7.0, 0.0], [7.0, 3.0, 2.0, -7.0, 6.0], [-6.0, 3.0, -2.0, 
+4.0, 7.0]], [[0.0, -3.0, 6.0, 4.0, 1.0], [-6.0, 3.0, -7.0, -1.0, -4.0], [0.0, 7.0, -7.0, -5.0, 1.0], [-3.0, -7.0, 2.0, 0.0, 
+1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-74.0, -160.0, 10.0, 29.0, 23.0], [2.0, -15.0, 39.0, -43.0, 138.0], [46.0, 51.0, 86.0, 88.0, 
+-36.0], [80.0, -7.0, 65.0, 9.0, -88.0]], [[-29.0, -20.0, 45.0, -15.0, -37.0], [-77.0, -10.0, 22.0, -22.0, 27.0], [-5.0, -19.0, 
+-42.0, 33.0, -51.0], [4.0, -29.0, 10.0, 12.0, 38.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-35.0, -32.0, 14.0, -81.0, -49.0], [45.0, -18.0, 38.0, 58.0, 65.0], [41.0, -66.0, 
+51.0, -39.0, 26.0], [43.0, 22.0, -61.0, 31.0, 73.0]], [[-46.0, -19.0, 26.0, -21.0, -39.0], [70.0, -37.0, -43.0, 63.0, 12.0], 
+[49.0, -9.0, 3.0, -27.0, 9.0], [-22.0, 37.0, -18.0, 48.0, 56.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank3_offset3(self):
-      arg0=numpy.array([[[-6.0, -6.0, 4.0], [-4.0, 2.0, 6.0], [-1.0, 0.0, 3.0], [4.0, 0.0, -4.0]], [[-7.0, 6.0, 3.0], [5.0, 
-7.0, 7.0], [1.0, -7.0, 0.0], [1.0, -7.0, -5.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, -6.0, -7.0], [5.0, 3.0, 6.0], [-4.0, 5.0, -4.0], [-1.0, -2.0, 3.0]], [[-1.0, 5.0, 3.0], 
-[1.0, -1.0, -2.0], [0.0, 7.0, -3.0], [0.0, -1.0, 3.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 2.0, -5.0], [-7.0, -5.0, -1.0], 
-[-4.0, 0.0, 5.0], [-1.0, 0.0, -2.0]], [[5.0, -7.0, 1.0], [-2.0, -7.0, -4.0], [1.0, -1.0, -3.0], [5.0, 3.0, 4.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-39.0)+(1.-msk_ref)*numpy.array(-186.0)
+   def test_generalTransposedTensorProduct_taggedData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([6.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, -6.0]))
+      arg1=Data(numpy.array([[[-7.0, 4.0], [-1.0, -5.0]], [[-2.0, -1.0], [5.0, 5.0]], [[-2.0, 1.0], [1.0, -5.0]], [[7.0, 3.0], 
+[2.0, 5.0]], [[2.0, 1.0], [0.0, 6.0]], [[7.0, -3.0], [-1.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 1.0], [0.0, 5.0]], [[-4.0, -5.0], [-2.0, -2.0]], [[-2.0, 7.0], [7.0, 3.0]], 
+[[2.0, 2.0], [1.0, -4.0]], [[-2.0, 0.0], [0.0, -3.0]], [[-7.0, 3.0], [7.0, -6.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-42.0, 24.0], [-6.0, -30.0]], [[-12.0, -6.0], [30.0, 30.0]], [[-12.0, 6.0], [6.0, -30.0]], 
+[[42.0, 18.0], [12.0, 30.0]], [[12.0, 6.0], [0.0, 36.0]], [[42.0, -18.0], [-6.0, 18.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, -6.0], [0.0, -30.0]], [[24.0, 30.0], [12.0, 
+12.0]], [[12.0, -42.0], [-42.0, -18.0]], [[-12.0, -12.0], [-6.0, 24.0]], [[12.0, 0.0], [0.0, 18.0]], [[42.0, -18.0], [-42.0, 
+36.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank4_offset4(self):
-      arg0=numpy.array([[[[5.0, 0.0], [0.0, 2.0], [6.0, 7.0]], [[-5.0, 0.0], [5.0, -1.0], [1.0, 0.0]]], [[[0.0, -7.0], [-1.0, 
--3.0], [-7.0, 0.0]], [[-6.0, 0.0], [-2.0, -4.0], [6.0, -7.0]]], [[[3.0, 0.0], [-2.0, 4.0], [0.0, -6.0]], [[5.0, -2.0], [-1.0, 
--3.0], [0.0, 2.0]]], [[[-7.0, 0.0], [6.0, -2.0], [0.0, 3.0]], [[-2.0, -7.0], [0.0, 3.0], [-1.0, -1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-7.0, -2.0], [3.0, -7.0], [-3.0, -1.0]], [[-7.0, -3.0], [-4.0, 0.0], [4.0, -5.0]]], [[[3.0, 
-3.0], [-6.0, -6.0], [-3.0, -5.0]], [[5.0, 1.0], [0.0, -6.0], [-5.0, 3.0]]], [[[-2.0, -2.0], [7.0, 4.0], [-2.0, -5.0]], [[6.0, 
-2.0], [2.0, -5.0], [-6.0, 0.0]]], [[[2.0, -6.0], [4.0, 6.0], [0.0, 4.0]], [[0.0, 0.0], [-3.0, 5.0], [5.0, 
--3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, -2.0], [3.0, -7.0], [4.0, 5.0]], [[0.0, -5.0], [7.0, -3.0], [-4.0, -3.0]]], 
-[[[4.0, 0.0], [0.0, -7.0], [2.0, -2.0]], [[1.0, 5.0], [4.0, -7.0], [-1.0, 3.0]]], [[[5.0, 0.0], [3.0, -7.0], [0.0, 5.0]], 
-[[4.0, -2.0], [7.0, -6.0], [-2.0, 0.0]]], [[[3.0, -6.0], [-4.0, 0.0], [5.0, -4.0]], [[1.0, -1.0], [7.0, 1.0], [-5.0, 3.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(-18.0)
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[0.0, -5.0], [7.0, 1.0], [-5.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, 0.0], [4.0, -6.0], [6.0, 0.0]]))
+      arg1=Data(numpy.array([[[[-4.0, 1.0], [3.0, 5.0]], [[2.0, 0.0], [0.0, 2.0]], [[7.0, -4.0], [-6.0, -4.0]], [[0.0, 5.0], 
+[-3.0, 5.0]], [[2.0, 0.0], [-7.0, 2.0]], [[4.0, 3.0], [7.0, 4.0]]], [[[4.0, 5.0], [-2.0, 5.0]], [[-1.0, -5.0], [-7.0, 3.0]], 
+[[-4.0, 3.0], [-5.0, 0.0]], [[7.0, -5.0], [0.0, 5.0]], [[-7.0, -3.0], [-4.0, 4.0]], [[7.0, -3.0], [4.0, -7.0]]], [[[0.0, 7.0], 
+[-7.0, 2.0]], [[-4.0, -4.0], [4.0, 0.0]], [[-6.0, 3.0], [5.0, -4.0]], [[-6.0, -7.0], [1.0, 0.0]], [[-2.0, 0.0], [-6.0, -4.0]], 
+[[-6.0, 4.0], [1.0, -1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[7.0, 7.0], [-6.0, 4.0]], [[-5.0, 6.0], [2.0, 5.0]], [[7.0, 5.0], [0.0, 6.0]], 
+[[6.0, 0.0], [1.0, -2.0]], [[0.0, -6.0], [-6.0, -2.0]], [[4.0, -5.0], [-7.0, -4.0]]], [[[7.0, -5.0], [-1.0, 2.0]], [[-2.0, 
+-4.0], [4.0, 6.0]], [[0.0, -5.0], [-2.0, -4.0]], [[3.0, 1.0], [-1.0, 6.0]], [[-7.0, -2.0], [0.0, -2.0]], [[-7.0, 0.0], [7.0, 
+6.0]]], [[[2.0, 6.0], [-4.0, 0.0]], [[4.0, 0.0], [0.0, 5.0]], [[4.0, 5.0], [-3.0, -1.0]], [[5.0, -5.0], [-3.0, 1.0]], [[-4.0, 
+-4.0], [0.0, 5.0]], [[5.0, -6.0], [-2.0, 7.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[28.0, 0.0], [21.0, 25.0]], [[13.0, -15.0], [-69.0, 21.0]], [[2.0, 6.0], [-60.0, 20.0]], [[79.0, 
+0.0], [-5.0, 35.0]], [[-39.0, -21.0], [2.0, 48.0]], [[79.0, -41.0], [23.0, -44.0]]], [[[24.0, 28.0], [-45.0, -12.0]], [[-27.0, 
+-21.0], [9.0, -7.0]], [[-63.0, 35.0], [45.0, 4.0]], [[-17.0, -58.0], [19.0, -20.0]], [[-25.0, -3.0], [7.0, -22.0]], [[-37.0, 
+-2.0], [-27.0, -31.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-9.0, -33.0], [14.0, -20.0]], [[51.0, -58.0], [2.0, 19.0]], [[-25.0, -25.0], [-26.0, 
+-64.0]], [[0.0, -26.0], [-29.0, 44.0]], [[-52.0, 10.0], [42.0, 36.0]], [[-26.0, -1.0], [65.0, 94.0]]], [[[-42.0, 30.0], [6.0, 
+-12.0]], [[12.0, 24.0], [-24.0, -36.0]], [[0.0, 30.0], [12.0, 24.0]], [[-18.0, -6.0], [6.0, -36.0]], [[42.0, 12.0], [0.0, 
+12.0]], [[42.0, 0.0], [-42.0, -36.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank1_offset0(self):
-      arg0=numpy.array(-2.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([5.0, -4.0])+(1.-msk_arg1)*numpy.array([3.0, 7.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([7.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, 0.0]))
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,4.0)
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-10.0, 8.0])+(1.-msk_ref)*numpy.array([-6.0, -14.0])
+      ref=msk_ref*numpy.array([-21.0, 9.0])+(1.-msk_ref)*numpy.array([-12.0, 0.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank2_offset1(self):
-      arg0=numpy.array([0.0, 3.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, 1.0, 7.0], [6.0, 3.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-7.0, 2.0, -3.0], [6.0, -4.0, 
--6.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[0.0, -1.0], [-7.0, -6.0], [-1.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, 0.0], [-7.0, 6.0], [-6.0, 0.0]]))
+      arg1=Data(numpy.array([-4.0, -4.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-2.0, -7.0, 5.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([3.0, 9.0])+(1.-msk_ref)*numpy.array([6.0, -12.0])
+      ref=msk_ref*numpy.array([29.0, 35.0])+(1.-msk_ref)*numpy.array([5.0, -42.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[3.0, -7.0, 4.0], [3.0, -1.0, 3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[5.0, -1.0, -3.0], [4.0, -7.0, 0.0]], [[4.0, 3.0, -4.0], [0.0, 7.0, 
--5.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -1.0, 1.0], [0.0, -2.0, 3.0]], [[6.0, 2.0, -7.0], [-1.0, -3.0, -1.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-3.0, 6.0], [-1.0, 5.0], [-2.0, 2.0]], [[-4.0, -1.0], [-1.0, 6.0], [-4.0, 
+7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, 6.0], [-6.0, 6.0], [-2.0, -7.0]], [[3.0, 1.0], [-2.0, -2.0], [0.0, 3.0]]]))
+      arg1=Data(numpy.array([[-4.0, 4.0, 6.0], [-5.0, -7.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, -6.0, 6.0], [3.0, -4.0, -6.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([29.0, -47.0])+(1.-msk_ref)*numpy.array([1.0, -27.0])
+      ref=msk_ref*numpy.array([51.0, -78.0])+(1.-msk_ref)*numpy.array([76.0, -43.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank4_offset3(self):
-      arg0=numpy.array([[[-1.0, 1.0, -6.0], [-1.0, 0.0, -1.0], [7.0, -6.0, 2.0], [-6.0, -2.0, -2.0]], [[2.0, 6.0, 0.0], [-7.0, 
--7.0, -6.0], [-7.0, 7.0, 2.0], [0.0, -6.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -1.0, -7.0], [-5.0, -5.0, 4.0], [6.0, 3.0, 0.0], [0.0, 3.0, 0.0]], [[3.0, -3.0, 4.0], 
-[-4.0, 7.0, 0.0], [-5.0, -5.0, -6.0], [-3.0, 7.0, 2.0]]], [[[6.0, 1.0, 0.0], [4.0, -5.0, -5.0], [5.0, 0.0, 5.0], [-3.0, 4.0, 
--5.0]], [[4.0, -7.0, -5.0], [-2.0, 0.0, 7.0], [-5.0, -2.0, -6.0], [5.0, 2.0, -4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, 6.0, 
-4.0], [2.0, 7.0, 6.0], [0.0, -2.0, 0.0], [1.0, 0.0, -3.0]], [[0.0, 2.0, 4.0], [-7.0, 4.0, -6.0], [-5.0, 2.0, 3.0], [4.0, 4.0, 
--6.0]]], [[[7.0, 1.0, -7.0], [6.0, -6.0, 6.0], [-7.0, 5.0, -7.0], [-1.0, 2.0, -4.0]], [[-5.0, 3.0, 0.0], [-1.0, 1.0, 6.0], 
-[5.0, 0.0, -7.0], [7.0, -3.0, 5.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-5.0, -1.0], [3.0, -4.0], [1.0, -2.0]], [[-6.0, -3.0], [-7.0, 6.0], [0.0, -2.0]], [[-3.0, 0.0], 
+[-2.0, 0.0], [4.0, 0.0]], [[-5.0, 7.0], [-7.0, 1.0], [4.0, 1.0]]], [[[5.0, -4.0], [6.0, 0.0], [4.0, 0.0]], [[0.0, 0.0], [-2.0, 
+-7.0], [0.0, -7.0]], [[7.0, 7.0], [4.0, 2.0], [-1.0, 1.0]], [[-5.0, 7.0], [-1.0, -3.0], [-4.0, -7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 2.0], [4.0, 0.0], [5.0, 2.0]], [[5.0, -6.0], [6.0, -2.0], [-2.0, 3.0]], [[2.0, 
+1.0], [-2.0, 2.0], [2.0, -3.0]], [[7.0, -4.0], [4.0, 6.0], [7.0, 4.0]]], [[[6.0, 4.0], [3.0, -6.0], [1.0, -4.0]], [[-4.0, 
+-5.0], [-7.0, 1.0], [0.0, -4.0]], [[-2.0, 3.0], [4.0, 3.0], [6.0, -6.0]], [[7.0, 7.0], [-5.0, -1.0], [-7.0, -3.0]]]]))
+      arg1=Data(numpy.array([[[7.0, 0.0, 1.0], [5.0, -1.0, 6.0], [2.0, 3.0, -1.0], [5.0, 4.0, 3.0]], [[4.0, 1.0, 5.0], [-6.0, 
+1.0, 2.0], [5.0, 3.0, 5.0], [-6.0, 7.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -6.0, 0.0], [-4.0, -2.0, 2.0], [0.0, -5.0, -6.0], [-4.0, -5.0, -6.0]], [[-2.0, 
+2.0, 5.0], [-5.0, 3.0, 1.0], [-3.0, 1.0, 1.0], [3.0, 2.0, -3.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-39.0, 20.0])+(1.-msk_ref)*numpy.array([123.0, -148.0])
+      ref=msk_ref*numpy.array([7.0, -33.0])+(1.-msk_ref)*numpy.array([-118.0, -8.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank2_offset0(self):
-      arg0=numpy.array(-1.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, 5.0, -4.0, 5.0, 0.0], [2.0, 1.0, -3.0, -5.0, 0.0], [0.0, -3.0, -6.0, 0.0, -6.0], [-7.0, 
--1.0, 4.0, -1.0, -4.0]])+(1.-msk_arg1)*numpy.array([[2.0, 0.0, 0.0, -2.0, -5.0], [-6.0, -4.0, 0.0, 2.0, 5.0], [-3.0, -5.0, 
--7.0, 6.0, 0.0], [-1.0, 1.0, -6.0, 2.0, -7.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-1.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, -2.0]))
+      arg1=Data(numpy.array([4.0, 5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, -5.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-1.0, -5.0, 4.0, -5.0, -0.0], [-2.0, -1.0, 3.0, 5.0, -0.0], [-0.0, 3.0, 6.0, -0.0, 6.0], [7.0, 
-1.0, -4.0, 1.0, 4.0]])+(1.-msk_ref)*numpy.array([[-2.0, -0.0, -0.0, 2.0, 5.0], [6.0, 4.0, -0.0, -2.0, -5.0], [3.0, 5.0, 7.0, 
--6.0, -0.0], [1.0, -1.0, 6.0, -2.0, 7.0]])
+      ref=msk_ref*numpy.array([[-4.0, -5.0], [-20.0, -25.0]])+(1.-msk_ref)*numpy.array([[18.0, 15.0], [12.0, 10.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank3_offset1(self):
-      arg0=numpy.array([-4.0, -4.0, -5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -3.0, -2.0], [5.0, 4.0, -6.0], [0.0, -2.0, -4.0], [-5.0, 4.0, 0.0], [3.0, -2.0, -1.0]], 
-[[-6.0, 7.0, 0.0], [0.0, -3.0, -4.0], [2.0, 4.0, 0.0], [0.0, -3.0, 2.0], [3.0, -6.0, 5.0]], [[6.0, -5.0, -1.0], [0.0, -3.0, 
-7.0], [-2.0, -2.0, 2.0], [4.0, -3.0, -1.0], [0.0, -6.0, -1.0]], [[0.0, 4.0, -7.0], [7.0, 4.0, 5.0], [2.0, -2.0, 3.0], [3.0, 
-6.0, 6.0], [6.0, -4.0, 4.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 1.0, 2.0], [0.0, 6.0, 1.0], [-5.0, -7.0, -6.0], [-1.0, 7.0, 
-6.0], [-3.0, 0.0, -2.0]], [[4.0, -3.0, -2.0], [4.0, 6.0, 1.0], [-6.0, 4.0, 0.0], [-3.0, 1.0, 5.0], [-3.0, -7.0, -2.0]], [[-1.0, 
-5.0, 0.0], [-4.0, 1.0, 0.0], [-5.0, 6.0, 2.0], [0.0, -4.0, 2.0], [4.0, 0.0, -1.0]], [[-7.0, 7.0, 1.0], [2.0, -1.0, -5.0], 
-[-3.0, -3.0, -4.0], [7.0, 0.0, 6.0], [-2.0, 0.0, 6.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[7.0, -3.0], [-3.0, -7.0], [7.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 1.0], [0.0, 5.0], [1.0, -1.0]]))
+      arg1=Data(numpy.array([[-1.0, 2.0], [0.0, 3.0], [4.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 5.0], [-2.0, 3.0], [1.0, -2.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[22.0, -6.0, 28.0, 4.0, 1.0], [-4.0, 32.0, -24.0, 2.0, -13.0], [1.0, -23.0, 6.0, 1.0, 29.0], 
-[19.0, -69.0, -15.0, -66.0, -28.0]])+(1.-msk_ref)*numpy.array([[-14.0, -29.0, 78.0, -54.0, 22.0], [6.0, -45.0, 8.0, -17.0, 
-50.0], [-16.0, 12.0, -14.0, 6.0, -11.0], [-5.0, 21.0, 44.0, -58.0, -22.0]])
+      ref=msk_ref*numpy.array([[21.0, -30.0], [3.0, -27.0]])+(1.-msk_ref)*numpy.array([[13.0, 28.0], [-9.0, 22.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[2.0, -3.0, 4.0], [-3.0, 3.0, -5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -6.0, -2.0], [0.0, -4.0, 5.0]], [[2.0, 1.0, 0.0], [-5.0, 6.0, -4.0]], [[4.0, 4.0, 
--5.0], [2.0, 4.0, 6.0]], [[-6.0, 7.0, 0.0], [-1.0, -7.0, 2.0]], [[-1.0, 0.0, 2.0], [7.0, -4.0, -4.0]]], [[[-7.0, 0.0, -5.0], 
-[-1.0, -6.0, -2.0]], [[1.0, -6.0, 6.0], [4.0, 5.0, -1.0]], [[-3.0, 1.0, -5.0], [2.0, 1.0, 1.0]], [[2.0, -4.0, 1.0], [-7.0, 
--1.0, 3.0]], [[5.0, 0.0, 3.0], [5.0, -6.0, 1.0]]], [[[5.0, -6.0, -2.0], [-2.0, -2.0, -7.0]], [[3.0, -1.0, -2.0], [-7.0, -2.0, 
-3.0]], [[-6.0, 5.0, 4.0], [6.0, 0.0, 0.0]], [[0.0, 5.0, -3.0], [4.0, 5.0, 0.0]], [[0.0, 3.0, 5.0], [-1.0, -5.0, 2.0]]], [[[6.0, 
--7.0, 0.0], [-4.0, 7.0, 0.0]], [[1.0, 7.0, 4.0], [0.0, 6.0, -3.0]], [[0.0, -7.0, 3.0], [3.0, 7.0, -2.0]], [[-6.0, -6.0, 7.0], 
-[1.0, 2.0, 7.0]], [[7.0, 1.0, 0.0], [6.0, 4.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 4.0, 7.0], [2.0, -5.0, -3.0]], 
-[[0.0, -5.0, 0.0], [6.0, -2.0, 6.0]], [[-2.0, -4.0, -1.0], [6.0, -4.0, -4.0]], [[-6.0, 1.0, -4.0], [-1.0, 6.0, 0.0]], [[3.0, 
--1.0, 1.0], [6.0, 0.0, -6.0]]], [[[1.0, 0.0, 0.0], [0.0, -5.0, -4.0]], [[-2.0, -2.0, 3.0], [-2.0, 7.0, 5.0]], [[0.0, 1.0, 3.0], 
-[2.0, -3.0, 1.0]], [[3.0, 5.0, -4.0], [0.0, 5.0, 2.0]], [[4.0, 7.0, 4.0], [6.0, 0.0, 5.0]]], [[[0.0, -2.0, 2.0], [-1.0, 6.0, 
-3.0]], [[-1.0, 5.0, 6.0], [-5.0, -6.0, -3.0]], [[0.0, 7.0, 4.0], [6.0, -4.0, -6.0]], [[-3.0, -3.0, 5.0], [-6.0, 3.0, -3.0]], 
-[[0.0, 3.0, 6.0], [-7.0, 7.0, 1.0]]], [[[-2.0, 2.0, -7.0], [-6.0, -3.0, -4.0]], [[-6.0, 5.0, -5.0], [0.0, 1.0, 5.0]], [[3.0, 
--2.0, -1.0], [-7.0, 2.0, 1.0]], [[6.0, 5.0, 2.0], [-5.0, 4.0, 6.0]], [[-5.0, 1.0, 7.0], [0.0, 7.0, 1.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[5.0, 0.0], [-6.0, 5.0], [-1.0, 5.0]], [[-1.0, 0.0], [-4.0, 3.0], [2.0, 
+3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, -6.0], [6.0, 0.0], [0.0, -7.0]], [[0.0, 1.0], [-5.0, 4.0], [0.0, -5.0]]]))
+      arg1=Data(numpy.array([[[-6.0, -1.0], [1.0, -2.0], [0.0, 7.0]], [[-1.0, 5.0], [-7.0, 5.0], [-5.0, 
+5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, 1.0], [-4.0, -4.0], [-2.0, 3.0]], [[-5.0, -3.0], [-4.0, 6.0], [-1.0, -2.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-31.0, 54.0, -48.0, -61.0, -7.0], [-39.0, 52.0, -37.0, 23.0, -16.0], [55.0, 1.0, -29.0, -24.0, 
--11.0], [66.0, 30.0, 55.0, 2.0, -15.0]])+(1.-msk_ref)*numpy.array([[6.0, -39.0, -6.0, -10.0, 25.0], [7.0, 16.0, -11.0, -20.0, 
--40.0], [20.0, 19.0, -5.0, 65.0, 52.0], [-9.0, -69.0, 30.0, 2.0, 31.0]])
+      ref=msk_ref*numpy.array([[-17.0, -15.0], [-31.0, 55.0]])+(1.-msk_ref)*numpy.array([[24.0, -50.0], [-44.0, 4.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank3_offset0(self):
-      arg0=numpy.array(5.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -7.0], [-1.0, 7.0]], [[-1.0, -3.0], [4.0, 0.0]], [[-6.0, 0.0], [4.0, -7.0]], [[6.0, 
--1.0], [-6.0, 5.0]], [[-5.0, -5.0], [-1.0, 2.0]], [[-1.0, 3.0], [0.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, -1.0], [5.0, 
-3.0]], [[-1.0, -7.0], [0.0, 2.0]], [[-2.0, 5.0], [1.0, -1.0]], [[-1.0, -5.0], [4.0, 4.0]], [[-7.0, -2.0], [-3.0, -7.0]], 
-[[-5.0, -3.0], [3.0, 3.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-1.0, 5.0], [5.0, 5.0], [2.0, 2.0]], [[0.0, 4.0], [-7.0, 7.0], [3.0, 5.0]], [[2.0, -2.0], 
+[-2.0, -2.0], [7.0, -3.0]], [[-4.0, -7.0], [0.0, -7.0], [-6.0, -2.0]]], [[[7.0, -6.0], [-1.0, 0.0], [3.0, -5.0]], [[0.0, -7.0], 
+[-6.0, -6.0], [-7.0, 5.0]], [[-2.0, -6.0], [-7.0, -6.0], [-6.0, 0.0]], [[-5.0, 1.0], [-2.0, -7.0], [1.0, 
+-2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, -5.0], [3.0, 0.0], [-1.0, -6.0]], [[0.0, 7.0], [1.0, 6.0], [-2.0, -1.0]], 
+[[0.0, 0.0], [0.0, 7.0], [-5.0, 6.0]], [[-2.0, 6.0], [0.0, 2.0], [-4.0, 3.0]]], [[[-5.0, -3.0], [0.0, -4.0], [-6.0, -4.0]], 
+[[6.0, 0.0], [-2.0, 1.0], [0.0, 0.0]], [[-7.0, 0.0], [7.0, 6.0], [-1.0, -4.0]], [[-3.0, 2.0], [7.0, 0.0], [0.0, -3.0]]]]))
+      arg1=Data(numpy.array([[[[-6.0, -2.0], [1.0, -2.0], [-4.0, -1.0]], [[4.0, -2.0], [6.0, 6.0], [0.0, -6.0]], [[4.0, 2.0], 
+[-5.0, 4.0], [0.0, -7.0]], [[2.0, -7.0], [-2.0, 0.0], [4.0, -6.0]]], [[[-2.0, 7.0], [6.0, 2.0], [5.0, -3.0]], [[0.0, 6.0], 
+[7.0, 7.0], [-6.0, -3.0]], [[-7.0, -1.0], [-3.0, 2.0], [-4.0, -4.0]], [[-4.0, 0.0], [-4.0, 7.0], [5.0, 
+-7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 6.0], [-4.0, -5.0], [1.0, 7.0]], [[-4.0, 6.0], [3.0, 6.0], [-3.0, 2.0]], 
+[[0.0, 5.0], [6.0, 1.0], [0.0, 4.0]], [[3.0, 4.0], [5.0, 5.0], [-1.0, 2.0]]], [[[-1.0, 0.0], [6.0, -2.0], [5.0, -2.0]], [[-6.0, 
+-6.0], [4.0, 0.0], [-7.0, -2.0]], [[4.0, -7.0], [2.0, 2.0], [4.0, 0.0]], [[3.0, -6.0], [-2.0, 2.0], [0.0, 6.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -35.0], [-5.0, 35.0]], [[-5.0, -15.0], [20.0, 0.0]], [[-30.0, 0.0], [20.0, -35.0]], 
-[[30.0, -5.0], [-30.0, 25.0]], [[-25.0, -25.0], [-5.0, 10.0]], [[-5.0, 15.0], [0.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, 
--5.0], [25.0, 15.0]], [[-5.0, -35.0], [0.0, 10.0]], [[-10.0, 25.0], [5.0, -5.0]], [[-5.0, -25.0], [20.0, 20.0]], [[-35.0, 
--10.0], [-15.0, -35.0]], [[-25.0, -15.0], [15.0, 15.0]]])
+      ref=msk_ref*numpy.array([[34.0, -51.0], [8.0, -115.0]])+(1.-msk_ref)*numpy.array([[-123.0, -27.0], [14.0, 73.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank4_offset1(self):
-      arg0=numpy.array([-1.0, 3.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[6.0, -2.0, -3.0], [5.0, 5.0, 7.0]], [[4.0, 0.0, 2.0], [-4.0, 0.0, 2.0]]], [[[-6.0, -2.0, 
-0.0], [5.0, 5.0, -2.0]], [[-7.0, 7.0, -1.0], [5.0, 5.0, -4.0]]], [[[-2.0, -4.0, 4.0], [5.0, 6.0, 3.0]], [[-7.0, -1.0, 5.0], 
-[-2.0, 5.0, -4.0]]], [[[-1.0, 4.0, 6.0], [5.0, 4.0, -3.0]], [[2.0, 1.0, 2.0], [-3.0, 0.0, -4.0]]], [[[6.0, 6.0, 0.0], [-7.0, 
-3.0, -2.0]], [[7.0, 5.0, -3.0], [-6.0, -4.0, 4.0]]], [[[2.0, 6.0, 2.0], [-1.0, -5.0, -3.0]], [[4.0, -6.0, 4.0], [-4.0, 1.0, 
--4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, -1.0, -5.0], [-7.0, -7.0, 0.0]], [[-7.0, -7.0, -3.0], [7.0, -4.0, -2.0]]], 
-[[[-7.0, 3.0, 6.0], [-2.0, 7.0, -5.0]], [[-7.0, -2.0, 2.0], [0.0, -4.0, 1.0]]], [[[3.0, 5.0, 2.0], [-2.0, 0.0, -3.0]], [[-4.0, 
--4.0, 7.0], [4.0, -2.0, -4.0]]], [[[7.0, -2.0, -2.0], [1.0, 2.0, 0.0]], [[2.0, -2.0, -2.0], [7.0, -7.0, 0.0]]], [[[-6.0, 0.0, 
-6.0], [-1.0, -3.0, 5.0]], [[-7.0, 2.0, -2.0], [2.0, 4.0, 7.0]]], [[[2.0, 5.0, -7.0], [-1.0, 4.0, -5.0]], [[7.0, -6.0, 4.0], 
-[-3.0, 0.0, -1.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([1.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 7.0]))
+      arg1=Data(numpy.array([[4.0, 2.0, 5.0, 0.0, 7.0], [-7.0, -1.0, -5.0, 1.0, 6.0], [-3.0, 0.0, -2.0, 3.0, 0.0], [0.0, -1.0, 
+4.0, -3.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, 0.0, 3.0, 5.0, -7.0], [3.0, 7.0, -1.0, 3.0, 2.0], [0.0, 1.0, -3.0, 0.0, -4.0], 
+[0.0, 5.0, -7.0, -3.0, 0.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, 10.0], [-4.0, 4.0]], [[0.0, 10.0], [28.0, 10.0]], [[-10.0, 13.0], [4.0, 17.0]], [[13.0, 
-7.0], [1.0, 3.0]], [[12.0, 16.0], [8.0, -6.0]], [[16.0, -14.0], [-22.0, 7.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, -14.0], 
-[-14.0, -19.0]], [[16.0, 23.0], [1.0, -12.0]], [[12.0, 2.0], [-8.0, -10.0]], [[-13.0, 5.0], [-8.0, -28.0]], [[6.0, -8.0], 
-[13.0, 10.0]], [[13.0, 13.0], [-25.0, 3.0]]])
+      ref=msk_ref*numpy.array([[[4.0, 2.0, 5.0, 0.0, 7.0], [-7.0, -1.0, -5.0, 1.0, 6.0], [-3.0, 0.0, -2.0, 3.0, 0.0], [0.0, 
+-1.0, 4.0, -3.0, 0.0]], [[-16.0, -8.0, -20.0, 0.0, -28.0], [28.0, 4.0, 20.0, -4.0, -24.0], [12.0, 0.0, 8.0, -12.0, 0.0], [0.0, 
+4.0, -16.0, 12.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 0.0, -15.0, -25.0, 35.0], [-15.0, -35.0, 5.0, -15.0, -10.0], [0.0, 
+-5.0, 15.0, 0.0, 20.0], [0.0, -25.0, 35.0, 15.0, 0.0]], [[28.0, 0.0, 21.0, 35.0, -49.0], [21.0, 49.0, -7.0, 21.0, 14.0], [0.0, 
+7.0, -21.0, 0.0, -28.0], [0.0, 35.0, -49.0, -21.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank0_expandedData_rank4_offset0(self):
-      arg0=numpy.array(-5.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-6.0, 5.0, -3.0, -5.0], [0.0, 3.0, -2.0, 6.0], [7.0, -3.0, 3.0, 0.0]], [[2.0, 0.0, -4.0, 
-5.0], [-1.0, -4.0, 1.0, 2.0], [2.0, -1.0, 6.0, 5.0]]], [[[2.0, 0.0, 1.0, -4.0], [2.0, 0.0, -6.0, 5.0], [-5.0, 0.0, -1.0, 2.0]], 
-[[-1.0, -4.0, 1.0, 6.0], [1.0, 7.0, 7.0, -6.0], [6.0, -6.0, -2.0, 2.0]]], [[[5.0, 0.0, 3.0, -6.0], [7.0, 7.0, 0.0, -5.0], [0.0, 
-6.0, 7.0, 2.0]], [[5.0, -7.0, -3.0, 0.0], [0.0, 5.0, -4.0, 7.0], [7.0, -5.0, -2.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 
-7.0, 2.0, -6.0], [-4.0, -1.0, -3.0, -7.0], [4.0, -1.0, -5.0, 5.0]], [[6.0, 1.0, -6.0, 7.0], [0.0, 5.0, 6.0, -1.0], [3.0, -2.0, 
--3.0, -4.0]]], [[[1.0, -5.0, -4.0, 5.0], [6.0, 2.0, -7.0, 2.0], [-4.0, 0.0, 5.0, 0.0]], [[-4.0, -7.0, -3.0, -2.0], [1.0, -1.0, 
--3.0, -5.0], [1.0, -2.0, 3.0, 6.0]]], [[[0.0, 0.0, -7.0, 7.0], [-6.0, 7.0, -6.0, 7.0], [3.0, 0.0, -2.0, -2.0]], [[-2.0, -2.0, 
-3.0, -5.0], [5.0, -4.0, 5.0, 4.0], [2.0, -5.0, 0.0, 0.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-6.0, 7.0], [2.0, 2.0], [0.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -6.0], [6.0, 0.0], [6.0, 4.0]]))
+      arg1=Data(numpy.array([[[7.0, 1.0, -4.0, 4.0, 1.0], [4.0, -6.0, -2.0, 6.0, -7.0], [7.0, 6.0, 0.0, -2.0, 0.0], [-2.0, 
+-1.0, 4.0, 0.0, -1.0]], [[-3.0, -1.0, 2.0, 0.0, 0.0], [0.0, 6.0, 5.0, -6.0, 3.0], [-1.0, -3.0, 4.0, 0.0, -5.0], [0.0, 5.0, 
+-7.0, 2.0, -3.0]], [[-7.0, -2.0, -7.0, -4.0, 1.0], [0.0, -1.0, 2.0, 0.0, -2.0], [-1.0, -5.0, 6.0, -5.0, -7.0], [4.0, 7.0, 1.0, 
+3.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -2.0, -4.0, -4.0, 5.0], [3.0, 5.0, -6.0, -6.0, 7.0], [-3.0, -2.0, -5.0, 3.0, 
+7.0], [6.0, 6.0, 0.0, -6.0, -4.0]], [[-5.0, -2.0, 0.0, -5.0, 6.0], [-4.0, 4.0, 1.0, -6.0, 1.0], [4.0, -3.0, 7.0, 2.0, 5.0], 
+[7.0, 2.0, -5.0, -7.0, -7.0]], [[1.0, 5.0, 0.0, -1.0, -7.0], [-6.0, -7.0, 0.0, 3.0, -5.0], [0.0, -5.0, -4.0, 7.0, 0.0], [1.0, 
+-6.0, 0.0, -5.0, 6.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[30.0, -25.0, 15.0, 25.0], [-0.0, -15.0, 10.0, -30.0], [-35.0, 15.0, -15.0, -0.0]], [[-10.0, 
--0.0, 20.0, -25.0], [5.0, 20.0, -5.0, -10.0], [-10.0, 5.0, -30.0, -25.0]]], [[[-10.0, -0.0, -5.0, 20.0], [-10.0, -0.0, 30.0, 
--25.0], [25.0, -0.0, 5.0, -10.0]], [[5.0, 20.0, -5.0, -30.0], [-5.0, -35.0, -35.0, 30.0], [-30.0, 30.0, 10.0, -10.0]]], 
-[[[-25.0, -0.0, -15.0, 30.0], [-35.0, -35.0, -0.0, 25.0], [-0.0, -30.0, -35.0, -10.0]], [[-25.0, 35.0, 15.0, -0.0], [-0.0, 
--25.0, 20.0, -35.0], [-35.0, 25.0, 10.0, 25.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, -35.0, -10.0, 30.0], [20.0, 5.0, 15.0, 
-35.0], [-20.0, 5.0, 25.0, -25.0]], [[-30.0, -5.0, 30.0, -35.0], [-0.0, -25.0, -30.0, 5.0], [-15.0, 10.0, 15.0, 20.0]]], 
-[[[-5.0, 25.0, 20.0, -25.0], [-30.0, -10.0, 35.0, -10.0], [20.0, -0.0, -25.0, -0.0]], [[20.0, 35.0, 15.0, 10.0], [-5.0, 5.0, 
-15.0, 25.0], [-5.0, 10.0, -15.0, -30.0]]], [[[-0.0, -0.0, 35.0, -35.0], [30.0, -35.0, 30.0, -35.0], [-15.0, -0.0, 10.0, 10.0]], 
-[[10.0, 10.0, -15.0, 25.0], [-25.0, 20.0, -25.0, -20.0], [-10.0, 25.0, -0.0, -0.0]]]])
+      ref=msk_ref*numpy.array([[[-48.0, -8.0, 28.0, -24.0, -6.0], [-24.0, 48.0, 22.0, -48.0, 48.0], [-44.0, -42.0, 8.0, 12.0, 
+-10.0], [12.0, 16.0, -38.0, 4.0, 0.0]], [[92.0, 19.0, 25.0, 56.0, 0.0], [28.0, -23.0, -18.0, 30.0, -29.0], [54.0, 71.0, -34.0, 
+21.0, 39.0], [-42.0, -46.0, 7.0, -17.0, -48.0]]])+(1.-msk_ref)*numpy.array([[[25.0, 32.0, 28.0, -8.0, -41.0], [-81.0, -53.0, 
+48.0, 24.0, -73.0], [45.0, -34.0, 53.0, 33.0, -19.0], [6.0, -66.0, -30.0, -30.0, 22.0]], [[46.0, 32.0, 24.0, 20.0, -58.0], 
+[-42.0, -58.0, 36.0, 48.0, -62.0], [18.0, -8.0, 14.0, 10.0, -42.0], [-32.0, -60.0, 0.0, 16.0, 48.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_float_rank0_offset0(self):
-      arg0=numpy.array([-1.0, -1.0])
-      arg1=-3.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([3.0, 3.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-5.0, 6.0], [-2.0, 2.0], [2.0, 2.0]], [[3.0, -5.0], [-2.0, -6.0], [-7.0, 
+-7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 4.0], [5.0, 7.0], [-4.0, 4.0]], [[3.0, -1.0], [7.0, -6.0], [-3.0, 3.0]]]))
+      arg1=Data(numpy.array([[[[-5.0, 0.0, 6.0, 5.0, -5.0], [2.0, -2.0, 5.0, 2.0, 0.0], [0.0, 4.0, 6.0, 7.0, 2.0], [6.0, 4.0, 
+-4.0, -7.0, 0.0]], [[7.0, -5.0, 5.0, -2.0, 3.0], [5.0, 0.0, 2.0, 4.0, -2.0], [-4.0, 2.0, -7.0, 1.0, 0.0], [-6.0, -6.0, -6.0, 
+0.0, 5.0]], [[5.0, 6.0, 0.0, -3.0, 4.0], [-4.0, 3.0, -2.0, 0.0, 5.0], [4.0, 6.0, 7.0, 2.0, -3.0], [-5.0, -5.0, 6.0, 1.0, 
+0.0]]], [[[7.0, 3.0, 5.0, 6.0, 4.0], [-4.0, 3.0, -6.0, 1.0, 7.0], [5.0, -7.0, 7.0, 5.0, 7.0], [-2.0, 7.0, 6.0, 5.0, 6.0]], 
+[[2.0, -4.0, 0.0, 4.0, 2.0], [-6.0, -3.0, -1.0, -4.0, 7.0], [-1.0, 2.0, 7.0, 0.0, 1.0], [-3.0, -7.0, -1.0, -3.0, 3.0]], [[-7.0, 
+1.0, -2.0, -1.0, 5.0], [2.0, 1.0, -4.0, 6.0, -5.0], [7.0, -6.0, 6.0, -2.0, -5.0], [5.0, -7.0, -6.0, -2.0, 
+-2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[6.0, -6.0, 0.0, 0.0, 1.0], [-5.0, -6.0, 4.0, -7.0, -4.0], [-3.0, -5.0, -2.0, 3.0, 
+6.0], [6.0, 4.0, 7.0, 4.0, -5.0]], [[0.0, -1.0, 1.0, 4.0, 2.0], [0.0, 6.0, 6.0, -1.0, 0.0], [-7.0, 4.0, 5.0, 4.0, 3.0], [1.0, 
+0.0, 7.0, -6.0, 6.0]], [[-6.0, 1.0, 6.0, -4.0, -3.0], [0.0, 0.0, 7.0, 3.0, 0.0], [-5.0, -6.0, 1.0, -4.0, 0.0], [-7.0, 5.0, 
+-2.0, 6.0, -7.0]]], [[[0.0, 5.0, -1.0, 7.0, -1.0], [2.0, -2.0, 1.0, -4.0, 0.0], [1.0, 6.0, 4.0, -1.0, 4.0], [-5.0, -7.0, 7.0, 
+0.0, 1.0]], [[-3.0, 2.0, 0.0, 1.0, -5.0], [-1.0, -2.0, 5.0, -7.0, -1.0], [-1.0, 0.0, -1.0, 7.0, -4.0], [6.0, -3.0, 2.0, 0.0, 
+0.0]], [[3.0, -2.0, 2.0, 3.0, -5.0], [-4.0, -2.0, 3.0, -6.0, 2.0], [1.0, -5.0, 7.0, -7.0, -6.0], [2.0, 5.0, 0.0, -3.0, 7.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[87.0, 32.0, -11.0, -10.0, 0.0], [-42.0, 24.0, -21.0, -49.0, 56.0], [-16.0, 5.0, -37.0, -4.0, 
+38.0], [-63.0, 66.0, 106.0, 72.0, 16.0]], [[-4.0, 4.0, 35.0, -27.0, -83.0], [56.0, -10.0, 94.0, -3.0, -36.0], [-68.0, 105.0, 
+-83.0, 37.0, 0.0], [7.0, 58.0, -6.0, -33.0, -24.0]]])+(1.-msk_ref)*numpy.array([[[30.0, -10.0, -28.0, 55.0, 5.0], [-19.0, 
+-20.0, 55.0, -102.0, -37.0], [-40.0, 47.0, -7.0, 121.0, 53.0], [90.0, -53.0, 120.0, -21.0, 10.0]], [[27.0, -50.0, 38.0, 8.0, 
+22.0], [-28.0, 26.0, 64.0, 5.0, -4.0], [-73.0, -37.0, 54.0, -38.0, 47.0], [-22.0, 76.0, 50.0, -11.0, 14.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank0_offset0(self):
-      arg0=numpy.array([4.0, 1.0])
-      arg1=numpy.array(-1.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([-4.0, -1.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank1_expandedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-6.0, 1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 1.0]))
+      arg1=Data(numpy.array([[[7.0, -4.0], [-2.0, 7.0]], [[-4.0, 4.0], [7.0, 5.0]], [[5.0, -3.0], [-2.0, 0.0]], [[-3.0, 1.0], 
+[6.0, 7.0]], [[0.0, -7.0], [6.0, 5.0]], [[2.0, 4.0], [2.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, 4.0], [-7.0, 4.0]], [[-1.0, 2.0], [-2.0, -4.0]], [[6.0, 2.0], [4.0, -7.0]], 
+[[4.0, -6.0], [1.0, 7.0]], [[5.0, 6.0], [2.0, -6.0]], [[2.0, 5.0], [-4.0, 1.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-42.0, 24.0], [12.0, -42.0]], [[24.0, -24.0], [-42.0, -30.0]], [[-30.0, 18.0], [12.0, 0.0]], 
+[[18.0, -6.0], [-36.0, -42.0]], [[0.0, 42.0], [-36.0, -30.0]], [[-12.0, -24.0], [-12.0, 42.0]]], [[[7.0, -4.0], [-2.0, 7.0]], 
+[[-4.0, 4.0], [7.0, 5.0]], [[5.0, -3.0], [-2.0, 0.0]], [[-3.0, 1.0], [6.0, 7.0]], [[0.0, -7.0], [6.0, 5.0]], [[2.0, 4.0], [2.0, 
+-7.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
+[0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-5.0, 4.0], [-7.0, 4.0]], [[-1.0, 2.0], [-2.0, -4.0]], 
+[[6.0, 2.0], [4.0, -7.0]], [[4.0, -6.0], [1.0, 7.0]], [[5.0, 6.0], [2.0, -6.0]], [[2.0, 5.0], [-4.0, 1.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank1_offset1(self):
-      arg0=numpy.array([[-2.0, -1.0, -2.0], [1.0, 0.0, 7.0]])
-      arg1=numpy.array([3.0, 5.0, -2.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([-7.0, -11.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[3.0, 3.0], [-3.0, -7.0], [-3.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, 1.0], [3.0, 4.0], [7.0, 1.0]]))
+      arg1=Data(numpy.array([[[[-2.0, -1.0], [-7.0, -1.0]], [[1.0, 6.0], [-2.0, -7.0]], [[0.0, 3.0], [-6.0, 0.0]], [[0.0, 
+-2.0], [4.0, 4.0]], [[0.0, 3.0], [0.0, -2.0]], [[6.0, 0.0], [4.0, 1.0]]], [[[7.0, 6.0], [5.0, 2.0]], [[0.0, 2.0], [2.0, 0.0]], 
+[[-5.0, 0.0], [-4.0, 5.0]], [[3.0, 4.0], [2.0, 3.0]], [[3.0, 4.0], [-3.0, 6.0]], [[0.0, -7.0], [0.0, 0.0]]], [[[2.0, -6.0], 
+[1.0, 0.0]], [[-1.0, -4.0], [-7.0, -2.0]], [[-4.0, -7.0], [0.0, -3.0]], [[-2.0, 7.0], [-7.0, -3.0]], [[5.0, 2.0], [3.0, -1.0]], 
+[[0.0, -1.0], [1.0, -7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, 0.0], [7.0, -7.0]], [[1.0, -2.0], [4.0, 6.0]], [[-1.0, 5.0], [2.0, 2.0]], 
+[[3.0, -3.0], [-6.0, 0.0]], [[-6.0, 7.0], [-2.0, -7.0]], [[4.0, 0.0], [5.0, 4.0]]], [[[7.0, -5.0], [-4.0, 0.0]], [[0.0, 2.0], 
+[-4.0, 3.0]], [[-3.0, 2.0], [1.0, 7.0]], [[2.0, -7.0], [7.0, -2.0]], [[-3.0, 3.0], [-1.0, -7.0]], [[-4.0, -1.0], [2.0, -4.0]]], 
+[[[3.0, -1.0], [0.0, 7.0]], [[-3.0, 1.0], [7.0, -4.0]], [[4.0, 6.0], [0.0, 1.0]], [[4.0, -5.0], [0.0, -6.0]], [[6.0, 0.0], 
+[3.0, 0.0]], [[2.0, -3.0], [1.0, 6.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-33.0, -3.0], [-39.0, -9.0]], [[6.0, 24.0], [9.0, -15.0]], [[27.0, 30.0], [-6.0, -6.0]], 
+[[-3.0, -39.0], [27.0, 12.0]], [[-24.0, -9.0], [0.0, -21.0]], [[18.0, 24.0], [9.0, 24.0]]], [[[-67.0, -9.0], [-62.0, -17.0]], 
+[[9.0, 28.0], [22.0, -9.0]], [[59.0, 51.0], [10.0, -17.0]], [[-9.0, -76.0], [40.0, 9.0]], [[-51.0, -31.0], [3.0, -42.0]], 
+[[18.0, 55.0], [6.0, 45.0]]]])+(1.-msk_ref)*numpy.array([[[[51.0, -22.0], [-33.0, 70.0]], [[-24.0, 19.0], [25.0, -37.0]], 
+[[22.0, 33.0], [-3.0, 22.0]], [[25.0, -47.0], [39.0, -48.0]], [[51.0, -12.0], [24.0, 0.0]], [[-10.0, -24.0], [-2.0, 18.0]]], 
+[[[28.0, -21.0], [-9.0, 0.0]], [[-2.0, 7.0], [-5.0, 14.0]], [[-9.0, 19.0], [6.0, 31.0]], [[15.0, -36.0], [22.0, -14.0]], 
+[[-12.0, 19.0], [-3.0, -35.0]], [[-10.0, -7.0], [14.0, -6.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank2_offset2(self):
-      arg0=numpy.array([[[-3.0, -3.0, 3.0], [7.0, -7.0, -3.0]], [[-4.0, 0.0, -3.0], [1.0, -6.0, -2.0]]])
-      arg1=numpy.array([[4.0, 2.0, 3.0], [0.0, 7.0, 6.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([-76.0, -79.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[-6.0, 0.0, -5.0, 0.0, 3.0], [-6.0, 6.0, 4.0, 0.0, -1.0], [-3.0, 0.0, 0.0, 0.0, -5.0], [6.0, -1.0, 
+-4.0, 5.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 6.0, 0.0, 2.0, 3.0], [7.0, 0.0, 2.0, -1.0, -2.0], [-7.0, -5.0, -3.0, -5.0, 
+-3.0], [7.0, 1.0, 3.0, 5.0, -3.0]]))
+      arg1=-1.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[6.0, -0.0, 5.0, -0.0, -3.0], [6.0, -6.0, -4.0, -0.0, 1.0], [3.0, -0.0, -0.0, -0.0, 5.0], [-6.0, 
+1.0, 4.0, -5.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-0.0, -6.0, -0.0, -2.0, -3.0], [-7.0, -0.0, -2.0, 1.0, 2.0], [7.0, 5.0, 3.0, 5.0, 
+3.0], [-7.0, -1.0, -3.0, -5.0, 3.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank3_offset3(self):
-      arg0=numpy.array([[[[2.0, -6.0, 5.0], [7.0, -4.0, 6.0], [-6.0, -4.0, 3.0], [-4.0, -3.0, -4.0]], [[0.0, -3.0, -5.0], [7.0, 
--1.0, -1.0], [0.0, 0.0, -5.0], [-7.0, -3.0, -2.0]]], [[[3.0, 0.0, 6.0], [-2.0, -6.0, 3.0], [1.0, 0.0, 0.0], [3.0, 0.0, 7.0]], 
-[[-4.0, 7.0, 6.0], [2.0, 6.0, -3.0], [5.0, 1.0, -5.0], [-6.0, 3.0, 6.0]]]])
-      arg1=numpy.array([[[6.0, -3.0, -1.0], [3.0, 2.0, -5.0], [1.0, 5.0, 6.0], [4.0, -4.0, 6.0]], [[0.0, 2.0, 6.0], [7.0, 3.0, 
--4.0], [0.0, 2.0, -7.0], [-6.0, -1.0, -1.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([68.0, 192.0])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2,),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[6.0, 0.0, 4.0, -2.0, -1.0], [6.0, -6.0, -6.0, 6.0, 6.0], [4.0, -3.0, 3.0, -7.0, 3.0], [-6.0, 
+-5.0, 0.0, 0.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -4.0, -3.0, -2.0, -3.0], [-4.0, 1.0, -7.0, -5.0, 2.0], [5.0, -5.0, 0.0, 7.0, 
+-1.0], [6.0, -4.0, -3.0, -3.0, -4.0]]))
+      arg1=numpy.array(-3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-18.0, -0.0, -12.0, 6.0, 3.0], [-18.0, 18.0, 18.0, -18.0, -18.0], [-12.0, 9.0, -9.0, 21.0, -9.0], 
+[18.0, 15.0, -0.0, -0.0, -18.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-0.0, 12.0, 9.0, 6.0, 9.0], [12.0, -3.0, 21.0, 15.0, -6.0], [-15.0, 15.0, -0.0, -21.0, 
+3.0], [-18.0, 12.0, 9.0, 9.0, 12.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank1_offset0(self):
-      arg0=numpy.array([-3.0, 6.0])
-      arg1=numpy.array([-1.0, 6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[3.0, -18.0], [-6.0, 36.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[4.0, -7.0, 7.0, -6.0, -7.0], [1.0, 6.0, 5.0, -2.0, -3.0], [0.0, 4.0, 7.0, 0.0, 4.0], [2.0, 3.0, 
+-6.0, 4.0, 2.0]], [[-7.0, 5.0, 3.0, 5.0, 4.0], [0.0, 4.0, 4.0, -3.0, 5.0], [3.0, 3.0, 6.0, 4.0, -1.0], [-2.0, -7.0, 3.0, 7.0, 
+-1.0]], [[6.0, 3.0, 4.0, -6.0, -6.0], [0.0, 2.0, 7.0, -5.0, 3.0], [0.0, 2.0, -5.0, 6.0, 2.0], [5.0, -2.0, 1.0, -2.0, 
+0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, 4.0, -4.0, -1.0, 6.0], [2.0, -3.0, 3.0, 1.0, 0.0], [0.0, 3.0, 2.0, 6.0, 7.0], 
+[1.0, -2.0, 1.0, -6.0, 0.0]], [[5.0, -7.0, 6.0, -1.0, -5.0], [-7.0, 6.0, 1.0, 2.0, 0.0], [1.0, 6.0, 4.0, -2.0, -3.0], [-1.0, 
+-5.0, -5.0, -1.0, 7.0]], [[-5.0, 4.0, -4.0, 7.0, -5.0], [-6.0, -7.0, 0.0, 0.0, 6.0], [7.0, -5.0, 6.0, -7.0, 0.0], [7.0, -6.0, 
+-6.0, 1.0, -4.0]]]))
+      arg1=numpy.array([0.0, 4.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-28.0, 20.0, 12.0, 20.0, 16.0], [0.0, 16.0, 16.0, -12.0, 20.0], [12.0, 12.0, 24.0, 16.0, -4.0], 
+[-8.0, -28.0, 12.0, 28.0, -4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[20.0, -28.0, 24.0, -4.0, -20.0], [-28.0, 24.0, 4.0, 8.0, 0.0], [4.0, 24.0, 16.0, -8.0, 
+-12.0], [-4.0, -20.0, -20.0, -4.0, 28.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank2_offset1(self):
-      arg0=numpy.array([[-4.0, -2.0, -4.0], [1.0, -4.0, -5.0]])
-      arg1=numpy.array([[-3.0, 2.0, -7.0], [-2.0, 0.0, 7.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[36.0, -20.0], [24.0, -37.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, 0.0, 2.0, -7.0, -3.0], [-1.0, 7.0, 6.0, -4.0, -7.0], [7.0, 0.0, -2.0, 5.0, 1.0], [-6.0, 
+7.0, 3.0, 4.0, 4.0]], [[7.0, 7.0, -2.0, -4.0, -2.0], [6.0, 2.0, -6.0, -2.0, -1.0], [0.0, -2.0, -2.0, 4.0, -1.0], [7.0, -5.0, 
+-1.0, 3.0, -3.0]], [[-7.0, -6.0, 7.0, 3.0, 2.0], [6.0, 7.0, -1.0, -6.0, -1.0], [1.0, 5.0, -2.0, 7.0, 1.0], [0.0, -6.0, -4.0, 
+7.0, -5.0]]], [[[4.0, -1.0, -3.0, 2.0, 2.0], [4.0, 4.0, -1.0, -6.0, 4.0], [3.0, -7.0, -5.0, -1.0, 1.0], [-7.0, 0.0, -7.0, 0.0, 
+-5.0]], [[0.0, -4.0, 3.0, -4.0, 7.0], [-2.0, -7.0, -6.0, -4.0, 7.0], [-6.0, 5.0, 0.0, 0.0, -4.0], [2.0, 2.0, -7.0, 2.0, 5.0]], 
+[[-3.0, 1.0, -4.0, -7.0, 6.0], [4.0, 6.0, 0.0, 1.0, 7.0], [-2.0, 0.0, 0.0, -6.0, -3.0], [0.0, 3.0, 3.0, 0.0, 
+-7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, -5.0, -5.0, 1.0, -3.0], [-4.0, -7.0, 2.0, -2.0, 5.0], [1.0, -2.0, 0.0, 5.0, 
+5.0], [3.0, 7.0, -6.0, 2.0, 3.0]], [[4.0, 1.0, -3.0, 1.0, 7.0], [5.0, -4.0, 0.0, 7.0, -6.0], [1.0, 0.0, 5.0, 7.0, -1.0], [-3.0, 
+-2.0, -7.0, -2.0, 1.0]], [[-7.0, -2.0, 5.0, 5.0, -7.0], [-7.0, 4.0, 4.0, -1.0, 6.0], [4.0, -2.0, 4.0, 0.0, -6.0], [0.0, 2.0, 
+-4.0, -2.0, 7.0]]], [[[5.0, -7.0, 2.0, -4.0, -6.0], [-7.0, 5.0, -1.0, 5.0, -6.0], [-6.0, -4.0, 0.0, -5.0, -3.0], [1.0, -2.0, 
+3.0, 5.0, 6.0]], [[2.0, 2.0, 0.0, 4.0, -7.0], [2.0, 0.0, 0.0, 1.0, -4.0], [2.0, 6.0, -3.0, -1.0, -5.0], [4.0, -3.0, -6.0, 6.0, 
+-5.0]], [[-4.0, 0.0, -5.0, -2.0, 2.0], [1.0, 6.0, 1.0, -4.0, -7.0], [4.0, 5.0, 1.0, 1.0, 3.0], [5.0, -1.0, 3.0, 0.0, 1.0]]]]))
+      arg1=numpy.array([[-5.0, -2.0, -1.0], [5.0, 0.0, 6.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-5.0, -7.0, -52.0, 8.0, 63.0], [31.0, 10.0, -22.0, 6.0, 100.0], [-33.0, -36.0, -9.0, -81.0, 
+-17.0], [-19.0, -1.0, -26.0, -33.0, -76.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[20.0, -10.0, 6.0, -44.0, -10.0], [-12.0, 100.0, -13.0, -2.0, -91.0], [-17.0, 22.0, 
+-8.0, -58.0, -14.0], [26.0, -49.0, 81.0, 21.0, 12.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank3_offset2(self):
-      arg0=numpy.array([[[5.0, 7.0, -6.0], [7.0, 3.0, 0.0]], [[-2.0, 6.0, 5.0], [0.0, 6.0, 4.0]]])
-      arg1=numpy.array([[[3.0, 7.0, -2.0], [1.0, 7.0, 0.0]], [[0.0, -1.0, -1.0], [-2.0, 2.0, 0.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[104.0, -9.0], [68.0, 1.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[1.0, -7.0, -7.0, 5.0, 2.0], [0.0, -3.0, 5.0, 6.0, 7.0], [-4.0, -1.0, -1.0, 3.0, 3.0], [-1.0, 
+-5.0, 7.0, -2.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, -3.0, -4.0, 4.0, -2.0], [6.0, -3.0, -2.0, -1.0, -7.0], [1.0, 3.0, -6.0, 1.0, 
+0.0], [-2.0, 0.0, -5.0, 3.0, 0.0]]))
+      arg1=numpy.array([-1.0, 0.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-1.0, 0.0], [7.0, 0.0], [7.0, 0.0], [-5.0, 0.0], [-2.0, 0.0]], [[0.0, 0.0], [3.0, 0.0], [-5.0, 
+0.0], [-6.0, 0.0], [-7.0, 0.0]], [[4.0, 0.0], [1.0, 0.0], [1.0, 0.0], [-3.0, 0.0], [-3.0, 0.0]], [[1.0, 0.0], [5.0, 0.0], 
+[-7.0, 0.0], [2.0, 0.0], [-2.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[1.0, 0.0], [3.0, 0.0], [4.0, 0.0], [-4.0, 0.0], [2.0, 0.0]], [[-6.0, 0.0], [3.0, 
+0.0], [2.0, 0.0], [1.0, 0.0], [7.0, 0.0]], [[-1.0, 0.0], [-3.0, 0.0], [6.0, 0.0], [-1.0, 0.0], [0.0, 0.0]], [[2.0, 0.0], [0.0, 
+0.0], [5.0, 0.0], [-3.0, 0.0], [0.0, 0.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank4_offset3(self):
-      arg0=numpy.array([[[[0.0, -2.0, 1.0], [-7.0, 3.0, -2.0], [3.0, 4.0, 7.0], [4.0, 7.0, 4.0]], [[5.0, 0.0, -2.0], [-1.0, 
-1.0, 5.0], [5.0, 0.0, 3.0], [6.0, -3.0, 3.0]]], [[[0.0, -6.0, 4.0], [-4.0, -5.0, -3.0], [-6.0, -1.0, 0.0], [2.0, -7.0, -6.0]], 
-[[-2.0, -1.0, 0.0], [-5.0, -4.0, -6.0], [-2.0, 3.0, 5.0], [0.0, 3.0, -4.0]]]])
-      arg1=numpy.array([[[[3.0, 6.0, -1.0], [2.0, -6.0, -3.0], [-3.0, 5.0, -6.0], [0.0, -6.0, 0.0]], [[-7.0, -4.0, 5.0], [-5.0, 
--7.0, -6.0], [4.0, 0.0, -7.0], [0.0, -6.0, -7.0]]], [[[-6.0, 4.0, -5.0], [4.0, -1.0, 3.0], [-2.0, -1.0, -2.0], [2.0, -2.0, 
--1.0]], [[0.0, 3.0, 7.0], [6.0, -2.0, 5.0], [-7.0, -1.0, 3.0], [7.0, -2.0, -7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=numpy.array([[-193.0, -80.0], [120.0, -34.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-3.0, -2.0, 6.0, -5.0, 2.0], [4.0, 1.0, 3.0, 3.0, 3.0], [7.0, 4.0, -4.0, -6.0, 0.0], [2.0, -1.0, 
+-7.0, 5.0, 3.0]], [[-5.0, -5.0, 1.0, -5.0, 5.0], [6.0, 4.0, 4.0, 0.0, 5.0], [-1.0, 6.0, 1.0, 4.0, 2.0], [0.0, -6.0, 6.0, 3.0, 
+4.0]], [[5.0, 4.0, -4.0, 0.0, 3.0], [0.0, -2.0, -4.0, 0.0, 2.0], [-5.0, 5.0, -4.0, 3.0, 4.0], [4.0, 6.0, 7.0, -7.0, 
+-2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, 0.0, -3.0, -3.0, -7.0], [0.0, 0.0, -3.0, 6.0, -7.0], [4.0, -3.0, 7.0, -7.0, 
+0.0], [0.0, -4.0, 5.0, 4.0, -4.0]], [[-6.0, -5.0, -3.0, -4.0, 3.0], [-3.0, 7.0, 5.0, 1.0, -6.0], [3.0, -4.0, -2.0, 0.0, 5.0], 
+[-2.0, 0.0, 1.0, 7.0, -6.0]], [[-7.0, -1.0, -3.0, 3.0, 1.0], [3.0, 4.0, -6.0, 7.0, -2.0], [-3.0, 2.0, -3.0, -4.0, -1.0], [4.0, 
+2.0, 7.0, 2.0, -3.0]]]))
+      arg1=numpy.array([[1.0, 2.0], [-6.0, 0.0], [0.0, 7.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[27.0, 29.0], [28.0, 24.0], [0.0, -16.0], [25.0, -10.0], [-28.0, 25.0]], [[-32.0, 8.0], [-23.0, 
+-12.0], [-21.0, -22.0], [3.0, 6.0], [-27.0, 20.0]], [[13.0, -21.0], [-32.0, 43.0], [-10.0, -36.0], [-30.0, 9.0], [-12.0, 
+28.0]], [[2.0, 32.0], [35.0, 40.0], [-43.0, 35.0], [-13.0, -39.0], [-21.0, -8.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[33.0, -55.0], [30.0, -7.0], [15.0, -27.0], [21.0, 15.0], [-25.0, -7.0]], [[18.0, 
+21.0], [-42.0, 28.0], [-33.0, -48.0], [0.0, 61.0], [29.0, -28.0]], [[-14.0, -13.0], [21.0, 8.0], [19.0, -7.0], [-7.0, -42.0], 
+[-30.0, -7.0]], [[12.0, 28.0], [-4.0, 6.0], [-1.0, 59.0], [-38.0, 22.0], [32.0, -29.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank2_offset0(self):
-      arg0=numpy.array([-6.0, -5.0])
-      arg1=numpy.array([[-5.0, 2.0, 5.0, 1.0, 3.0], [-1.0, -4.0, 5.0, -1.0, 0.0], [4.0, -4.0, -1.0, 4.0, -6.0], [2.0, 0.0, 
--6.0, 0.0, -2.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[30.0, -12.0, -30.0, -6.0, -18.0], [6.0, 24.0, -30.0, 6.0, 0.0], [-24.0, 24.0, 6.0, -24.0, 36.0], 
-[-12.0, 0.0, 36.0, 0.0, 12.0]], [[25.0, -10.0, -25.0, -5.0, -15.0], [5.0, 20.0, -25.0, 5.0, 0.0], [-20.0, 20.0, 5.0, -20.0, 
-30.0], [-10.0, 0.0, 30.0, 0.0, 10.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[1.0, -2.0, 7.0, 2.0, 5.0], [7.0, 1.0, -4.0, -1.0, 4.0], [-7.0, -4.0, 7.0, -4.0, -7.0], [5.0, 
+-1.0, -7.0, 7.0, -4.0]], [[0.0, -6.0, -4.0, -2.0, 1.0], [6.0, 5.0, 0.0, -3.0, -1.0], [-7.0, -1.0, 0.0, 7.0, 7.0], [-1.0, 7.0, 
+2.0, 0.0, 0.0]], [[-1.0, 0.0, -4.0, 0.0, 0.0], [2.0, 0.0, -2.0, 5.0, -4.0], [1.0, 0.0, -7.0, -5.0, 5.0], [-3.0, 3.0, 6.0, -4.0, 
+7.0]]], [[[-5.0, 6.0, 0.0, -1.0, 0.0], [-5.0, 5.0, 2.0, 0.0, -2.0], [0.0, 1.0, -1.0, -6.0, -1.0], [7.0, 4.0, -5.0, 5.0, -5.0]], 
+[[5.0, 2.0, -5.0, 6.0, -6.0], [1.0, 2.0, -4.0, 5.0, 0.0], [-7.0, 7.0, 0.0, -7.0, 5.0], [7.0, 2.0, -1.0, 0.0, 4.0]], [[-7.0, 
+0.0, -3.0, -3.0, 6.0], [0.0, 0.0, -4.0, 5.0, -2.0], [0.0, 6.0, -5.0, 1.0, 1.0], [-5.0, 2.0, -5.0, 0.0, 
+5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, -6.0, 4.0, -2.0, 4.0], [7.0, 5.0, 1.0, 1.0, 7.0], [2.0, 7.0, 5.0, -2.0, -6.0], 
+[-6.0, 4.0, -1.0, 5.0, 2.0]], [[-3.0, 7.0, -1.0, 7.0, -1.0], [3.0, -7.0, 2.0, 5.0, 4.0], [7.0, 4.0, -1.0, 3.0, 7.0], [-6.0, 
+-2.0, 3.0, -6.0, -4.0]], [[-5.0, 1.0, 4.0, -3.0, 5.0], [2.0, 0.0, 0.0, 2.0, -3.0], [-4.0, -5.0, -6.0, -6.0, -1.0], [-5.0, -3.0, 
+-6.0, 4.0, -1.0]]], [[[5.0, 4.0, 5.0, -2.0, 2.0], [-2.0, 0.0, 6.0, 3.0, 3.0], [-2.0, 4.0, 5.0, 0.0, -6.0], [-4.0, -3.0, 4.0, 
+-6.0, 6.0]], [[-3.0, 4.0, 0.0, -6.0, 0.0], [-6.0, 5.0, 1.0, 2.0, 3.0], [3.0, -3.0, 1.0, 2.0, -6.0], [-6.0, -1.0, -6.0, 0.0, 
+6.0]], [[-6.0, -4.0, 4.0, -5.0, 4.0], [2.0, -2.0, 5.0, 2.0, 5.0], [3.0, 5.0, -3.0, -4.0, 3.0], [-2.0, -2.0, 6.0, 0.0, 3.0]]]]))
+      arg1=numpy.array([[[-1.0, 1.0], [0.0, 2.0], [1.0, 5.0]], [[-2.0, 4.0], [-5.0, 0.0], [-3.0, 7.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[4.0, -73.0], [-20.0, 10.0], [23.0, -42.0], [-21.0, -27.0], [7.0, 49.0]], [[0.0, 9.0], [-21.0, 
+31.0], [30.0, -34.0], [-34.0, 53.0], [2.0, -40.0]], [[43.0, -16.0], [-51.0, 40.0], [3.0, -67.0], [43.0, -32.0], [-14.0, 35.0]], 
+[[-42.0, -19.0], [-20.0, 58.0], [43.0, -28.0], [-21.0, 7.0], [-14.0, 46.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[15.0, -50.0], [-9.0, 1.0], [-22.0, 70.0], [48.0, -46.0], [-15.0, 63.0]], [[23.0, 
+29.0], [-24.0, -23.0], [-33.0, 64.0], [-21.0, 47.0], [-46.0, 47.0]], [[-26.0, 9.0], [-20.0, 41.0], [-17.0, -28.0], [-2.0, 
+-54.0], [38.0, 0.0]], [[45.0, -73.0], [10.0, -41.0], [-1.0, 33.0], [11.0, -11.0], [-54.0, 34.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank3_offset1(self):
-      arg0=numpy.array([[6.0, -3.0, 0.0], [0.0, 1.0, -2.0]])
-      arg1=numpy.array([[[-1.0, 7.0, -2.0], [7.0, 1.0, 1.0], [7.0, 6.0, -6.0], [-2.0, 7.0, 0.0], [-3.0, -3.0, 1.0]], [[0.0, 
-7.0, -5.0], [3.0, 2.0, -6.0], [0.0, -2.0, 4.0], [6.0, 5.0, -1.0], [-6.0, 2.0, -3.0]], [[-3.0, 0.0, 0.0], [1.0, 7.0, -1.0], 
-[-1.0, 4.0, -5.0], [6.0, -3.0, -7.0], [-2.0, 5.0, 6.0]], [[-3.0, 2.0, -3.0], [5.0, 1.0, 6.0], [-5.0, -7.0, 6.0], [6.0, -1.0, 
--6.0], [3.0, 5.0, 0.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[-27.0, 39.0, 24.0, -33.0, -9.0], [-21.0, 12.0, 6.0, 21.0, -42.0], [-18.0, -15.0, -18.0, 45.0, -27.0], 
-[-24.0, 27.0, -9.0, 39.0, 3.0]], [[11.0, -1.0, 18.0, 7.0, -5.0], [17.0, 14.0, -10.0, 7.0, 8.0], [0.0, 9.0, 14.0, 11.0, -7.0], 
-[8.0, -11.0, -19.0, 11.0, 5.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_array_rank2_offset0(self):
+      arg0=Data(numpy.array([[6.0, 4.0, 0.0, 0.0, -6.0], [-2.0, 6.0, 5.0, 3.0, -4.0], [-2.0, -4.0, -5.0, -6.0, -4.0], [6.0, 
+0.0, -7.0, 7.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, -6.0, -7.0, 7.0, 1.0], [2.0, 7.0, -3.0, -3.0, -7.0], [1.0, -6.0, 4.0, 3.0, 
+-5.0], [2.0, -2.0, 0.0, 2.0, -5.0]]))
+      arg1=numpy.array([[0.0, 4.0, -6.0, -1.0, 7.0], [-5.0, -2.0, 5.0, -7.0, 7.0], [5.0, -7.0, 7.0, -3.0, 0.0], [3.0, -7.0, 
+6.0, 6.0, 3.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 24.0, -36.0, -6.0, 42.0], [-30.0, -12.0, 30.0, -42.0, 42.0], [30.0, -42.0, 42.0, -18.0, 
+0.0], [18.0, -42.0, 36.0, 36.0, 18.0]], [[0.0, 16.0, -24.0, -4.0, 28.0], [-20.0, -8.0, 20.0, -28.0, 28.0], [20.0, -28.0, 28.0, 
+-12.0, 0.0], [12.0, -28.0, 24.0, 24.0, 12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[0.0, -24.0, 36.0, 6.0, -42.0], [30.0, 12.0, -30.0, 42.0, -42.0], [-30.0, 42.0, -42.0, 18.0, 0.0], [-18.0, 
+42.0, -36.0, -36.0, -18.0]]], [[[0.0, -8.0, 12.0, 2.0, -14.0], [10.0, 4.0, -10.0, 14.0, -14.0], [-10.0, 14.0, -14.0, 6.0, 0.0], 
+[-6.0, 14.0, -12.0, -12.0, -6.0]], [[0.0, 24.0, -36.0, -6.0, 42.0], [-30.0, -12.0, 30.0, -42.0, 42.0], [30.0, -42.0, 42.0, 
+-18.0, 0.0], [18.0, -42.0, 36.0, 36.0, 18.0]], [[0.0, 20.0, -30.0, -5.0, 35.0], [-25.0, -10.0, 25.0, -35.0, 35.0], [25.0, 
+-35.0, 35.0, -15.0, 0.0], [15.0, -35.0, 30.0, 30.0, 15.0]], [[0.0, 12.0, -18.0, -3.0, 21.0], [-15.0, -6.0, 15.0, -21.0, 21.0], 
+[15.0, -21.0, 21.0, -9.0, 0.0], [9.0, -21.0, 18.0, 18.0, 9.0]], [[0.0, -16.0, 24.0, 4.0, -28.0], [20.0, 8.0, -20.0, 28.0, 
+-28.0], [-20.0, 28.0, -28.0, 12.0, 0.0], [-12.0, 28.0, -24.0, -24.0, -12.0]]], [[[0.0, -8.0, 12.0, 2.0, -14.0], [10.0, 4.0, 
+-10.0, 14.0, -14.0], [-10.0, 14.0, -14.0, 6.0, 0.0], [-6.0, 14.0, -12.0, -12.0, -6.0]], [[0.0, -16.0, 24.0, 4.0, -28.0], [20.0, 
+8.0, -20.0, 28.0, -28.0], [-20.0, 28.0, -28.0, 12.0, 0.0], [-12.0, 28.0, -24.0, -24.0, -12.0]], [[0.0, -20.0, 30.0, 5.0, 
+-35.0], [25.0, 10.0, -25.0, 35.0, -35.0], [-25.0, 35.0, -35.0, 15.0, 0.0], [-15.0, 35.0, -30.0, -30.0, -15.0]], [[0.0, -24.0, 
+36.0, 6.0, -42.0], [30.0, 12.0, -30.0, 42.0, -42.0], [-30.0, 42.0, -42.0, 18.0, 0.0], [-18.0, 42.0, -36.0, -36.0, -18.0]], 
+[[0.0, -16.0, 24.0, 4.0, -28.0], [20.0, 8.0, -20.0, 28.0, -28.0], [-20.0, 28.0, -28.0, 12.0, 0.0], [-12.0, 28.0, -24.0, -24.0, 
+-12.0]]], [[[0.0, 24.0, -36.0, -6.0, 42.0], [-30.0, -12.0, 30.0, -42.0, 42.0], [30.0, -42.0, 42.0, -18.0, 0.0], [18.0, -42.0, 
+36.0, 36.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]], [[0.0, -28.0, 42.0, 7.0, -49.0], [35.0, 14.0, -35.0, 49.0, -49.0], [-35.0, 49.0, -49.0, 21.0, 0.0], [-21.0, 49.0, -42.0, 
+-42.0, -21.0]], [[0.0, 28.0, -42.0, -7.0, 49.0], [-35.0, -14.0, 35.0, -49.0, 49.0], [35.0, -49.0, 49.0, -21.0, 0.0], [21.0, 
+-49.0, 42.0, 42.0, 21.0]], [[0.0, -20.0, 30.0, 5.0, -35.0], [25.0, 10.0, -25.0, 35.0, -35.0], [-25.0, 35.0, -35.0, 15.0, 0.0], 
+[-15.0, 35.0, -30.0, -30.0, -15.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 20.0, -30.0, -5.0, 35.0], [-25.0, -10.0, 25.0, -35.0, 35.0], [25.0, -35.0, 
+35.0, -15.0, 0.0], [15.0, -35.0, 30.0, 30.0, 15.0]], [[0.0, -24.0, 36.0, 6.0, -42.0], [30.0, 12.0, -30.0, 42.0, -42.0], [-30.0, 
+42.0, -42.0, 18.0, 0.0], [-18.0, 42.0, -36.0, -36.0, -18.0]], [[0.0, -28.0, 42.0, 7.0, -49.0], [35.0, 14.0, -35.0, 49.0, 
+-49.0], [-35.0, 49.0, -49.0, 21.0, 0.0], [-21.0, 49.0, -42.0, -42.0, -21.0]], [[0.0, 28.0, -42.0, -7.0, 49.0], [-35.0, -14.0, 
+35.0, -49.0, 49.0], [35.0, -49.0, 49.0, -21.0, 0.0], [21.0, -49.0, 42.0, 42.0, 21.0]], [[0.0, 4.0, -6.0, -1.0, 7.0], [-5.0, 
+-2.0, 5.0, -7.0, 7.0], [5.0, -7.0, 7.0, -3.0, 0.0], [3.0, -7.0, 6.0, 6.0, 3.0]]], [[[0.0, 8.0, -12.0, -2.0, 14.0], [-10.0, 
+-4.0, 10.0, -14.0, 14.0], [10.0, -14.0, 14.0, -6.0, 0.0], [6.0, -14.0, 12.0, 12.0, 6.0]], [[0.0, 28.0, -42.0, -7.0, 49.0], 
+[-35.0, -14.0, 35.0, -49.0, 49.0], [35.0, -49.0, 49.0, -21.0, 0.0], [21.0, -49.0, 42.0, 42.0, 21.0]], [[0.0, -12.0, 18.0, 3.0, 
+-21.0], [15.0, 6.0, -15.0, 21.0, -21.0], [-15.0, 21.0, -21.0, 9.0, 0.0], [-9.0, 21.0, -18.0, -18.0, -9.0]], [[0.0, -12.0, 18.0, 
+3.0, -21.0], [15.0, 6.0, -15.0, 21.0, -21.0], [-15.0, 21.0, -21.0, 9.0, 0.0], [-9.0, 21.0, -18.0, -18.0, -9.0]], [[0.0, -28.0, 
+42.0, 7.0, -49.0], [35.0, 14.0, -35.0, 49.0, -49.0], [-35.0, 49.0, -49.0, 21.0, 0.0], [-21.0, 49.0, -42.0, -42.0, -21.0]]], 
+[[[0.0, 4.0, -6.0, -1.0, 7.0], [-5.0, -2.0, 5.0, -7.0, 7.0], [5.0, -7.0, 7.0, -3.0, 0.0], [3.0, -7.0, 6.0, 6.0, 3.0]], [[0.0, 
+-24.0, 36.0, 6.0, -42.0], [30.0, 12.0, -30.0, 42.0, -42.0], [-30.0, 42.0, -42.0, 18.0, 0.0], [-18.0, 42.0, -36.0, -36.0, 
+-18.0]], [[0.0, 16.0, -24.0, -4.0, 28.0], [-20.0, -8.0, 20.0, -28.0, 28.0], [20.0, -28.0, 28.0, -12.0, 0.0], [12.0, -28.0, 
+24.0, 24.0, 12.0]], [[0.0, 12.0, -18.0, -3.0, 21.0], [-15.0, -6.0, 15.0, -21.0, 21.0], [15.0, -21.0, 21.0, -9.0, 0.0], [9.0, 
+-21.0, 18.0, 18.0, 9.0]], [[0.0, -20.0, 30.0, 5.0, -35.0], [25.0, 10.0, -25.0, 35.0, -35.0], [-25.0, 35.0, -35.0, 15.0, 0.0], 
+[-15.0, 35.0, -30.0, -30.0, -15.0]]], [[[0.0, 8.0, -12.0, -2.0, 14.0], [-10.0, -4.0, 10.0, -14.0, 14.0], [10.0, -14.0, 14.0, 
+-6.0, 0.0], [6.0, -14.0, 12.0, 12.0, 6.0]], [[0.0, -8.0, 12.0, 2.0, -14.0], [10.0, 4.0, -10.0, 14.0, -14.0], [-10.0, 14.0, 
+-14.0, 6.0, 0.0], [-6.0, 14.0, -12.0, -12.0, -6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 8.0, -12.0, -2.0, 14.0], [-10.0, -4.0, 10.0, -14.0, 14.0], [10.0, -14.0, 14.0, 
+-6.0, 0.0], [6.0, -14.0, 12.0, 12.0, 6.0]], [[0.0, -20.0, 30.0, 5.0, -35.0], [25.0, 10.0, -25.0, 35.0, -35.0], [-25.0, 35.0, 
+-35.0, 15.0, 0.0], [-15.0, 35.0, -30.0, -30.0, -15.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank4_offset2(self):
-      arg0=numpy.array([[[-2.0, -6.0, -5.0], [5.0, -2.0, 0.0]], [[-1.0, -2.0, 1.0], [4.0, -1.0, 5.0]]])
-      arg1=numpy.array([[[[5.0, 1.0, -3.0], [-7.0, -2.0, 0.0]], [[2.0, -7.0, 1.0], [-7.0, 0.0, -6.0]], [[-5.0, 1.0, -1.0], 
-[-6.0, 2.0, 3.0]], [[-6.0, -1.0, -4.0], [-5.0, 6.0, 6.0]], [[-7.0, -6.0, 4.0], [-5.0, -1.0, 5.0]]], [[[3.0, -2.0, 7.0], [3.0, 
-0.0, 2.0]], [[4.0, 6.0, -6.0], [7.0, 4.0, 0.0]], [[-5.0, -3.0, -6.0], [6.0, -3.0, 3.0]], [[2.0, 4.0, 2.0], [0.0, 0.0, -4.0]], 
-[[1.0, -3.0, 1.0], [0.0, -3.0, -2.0]]], [[[3.0, -2.0, -5.0], [7.0, -3.0, -6.0]], [[7.0, 0.0, 0.0], [3.0, -1.0, 0.0]], [[-1.0, 
--1.0, 7.0], [5.0, -6.0, -7.0]], [[-5.0, 5.0, -2.0], [3.0, 0.0, -3.0]], [[3.0, 1.0, 4.0], [-2.0, -6.0, -3.0]]], [[[4.0, 5.0, 
--5.0], [3.0, 1.0, 0.0]], [[4.0, -7.0, -7.0], [-6.0, -5.0, 1.0]], [[-2.0, 1.0, 7.0], [3.0, 0.0, 0.0]], [[-4.0, 5.0, 2.0], [4.0, 
-4.0, -3.0]], [[-5.0, 0.0, 7.0], [0.0, -7.0, -7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[-32.0, -2.0, -25.0, 1.0, 7.0], [-14.0, 13.0, 94.0, -38.0, 17.0], [72.0, 3.0, 10.0, 5.0, -30.0], [0.0, 
-49.0, -22.0, -20.0, -11.0]], [[-36.0, -45.0, -9.0, 8.0, 29.0], [30.0, 2.0, 47.0, -28.0, -1.0], [-3.0, 6.0, 1.0, -10.0, -18.0], 
-[-8.0, -11.0, 19.0, -7.0, -16.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-6.0, -5.0, 6.0, 2.0, 5.0], [0.0, 7.0, -5.0, -3.0, -5.0], [1.0, -4.0, 1.0, -6.0, 0.0], [-4.0, 
+7.0, 4.0, 6.0, 0.0]], [[0.0, -3.0, 0.0, 6.0, 7.0], [7.0, 0.0, 1.0, 7.0, 5.0], [2.0, -7.0, -3.0, -4.0, 4.0], [0.0, 0.0, 2.0, 
+-4.0, -5.0]], [[0.0, -6.0, -4.0, 0.0, 1.0], [5.0, 6.0, 5.0, 4.0, 5.0], [5.0, 3.0, 4.0, -5.0, 7.0], [-1.0, -3.0, -5.0, 2.0, 
+0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, 3.0, -7.0, 0.0, -5.0], [-7.0, -2.0, 5.0, -3.0, 0.0], [2.0, -5.0, 2.0, 6.0, 
+-3.0], [-7.0, 1.0, -1.0, -2.0, -4.0]], [[4.0, 5.0, -4.0, 0.0, 1.0], [-3.0, 1.0, -2.0, -2.0, 0.0], [-6.0, 1.0, 7.0, 5.0, 0.0], 
+[-2.0, -1.0, 0.0, -4.0, -6.0]], [[-3.0, -5.0, 0.0, 6.0, -2.0], [-1.0, -7.0, 0.0, -3.0, -3.0], [-3.0, -4.0, 0.0, 6.0, 4.0], 
+[-1.0, -5.0, 1.0, -6.0, -5.0]]]))
+      arg1=numpy.array([[[-4.0, -6.0, 6.0, 7.0, -1.0], [6.0, 3.0, 4.0, -2.0, 3.0], [4.0, 7.0, 0.0, -2.0, 4.0], [3.0, -3.0, 
+-5.0, -1.0, 0.0]], [[0.0, 1.0, -4.0, 5.0, 5.0], [6.0, -5.0, 3.0, 7.0, 1.0], [7.0, -5.0, -2.0, 6.0, -3.0], [0.0, 7.0, 5.0, 0.0, 
+-6.0]], [[7.0, 6.0, 6.0, 2.0, 1.0], [1.0, 7.0, -6.0, 5.0, 3.0], [0.0, 6.0, 2.0, 2.0, 6.0], [-2.0, 6.0, -2.0, -7.0, 2.0]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[24.0, 36.0, -36.0, -42.0, 6.0], [-36.0, -18.0, -24.0, 12.0, -18.0], [-24.0, -42.0, 0.0, 12.0, 
+-24.0], [-18.0, 18.0, 30.0, 6.0, 0.0]], [[-22.0, -9.0, -54.0, -62.0, -16.0], [-54.0, -42.0, 7.0, -41.0, -36.0], [-41.0, -56.0, 
+-6.0, -20.0, -47.0], [-3.0, -42.0, 22.0, 47.0, 6.0]], [[-52.0, -60.0, 12.0, 34.0, -10.0], [32.0, -10.0, 48.0, -32.0, 6.0], 
+[24.0, 18.0, -8.0, -20.0, 0.0], [26.0, -42.0, -22.0, 22.0, -8.0]], [[-8.0, -6.0, -12.0, 44.0, 28.0], [48.0, -24.0, 26.0, 38.0, 
+12.0], [50.0, -16.0, -12.0, 32.0, -10.0], [6.0, 36.0, 20.0, -2.0, -36.0]], [[-13.0, -17.0, 8.0, 72.0, 31.0], [73.0, -13.0, 
+35.0, 44.0, 25.0], [69.0, 6.0, -12.0, 34.0, 5.0], [13.0, 40.0, 8.0, -12.0, -40.0]]], [[[35.0, 37.0, 2.0, 45.0, 40.0], [47.0, 
+0.0, -9.0, 74.0, 22.0], [49.0, -5.0, -4.0, 52.0, 9.0], [-10.0, 79.0, 25.0, -35.0, -32.0]], [[14.0, -6.0, 78.0, 61.0, -1.0], 
+[48.0, 63.0, -8.0, 16.0, 39.0], [28.0, 85.0, 12.0, -2.0, 64.0], [9.0, 15.0, -47.0, -49.0, 12.0]], [[55.0, 61.0, -4.0, -20.0, 
+15.0], [-19.0, 15.0, -47.0, 42.0, 1.0], [-13.0, -10.0, 8.0, 26.0, 7.0], [-25.0, 52.0, 20.0, -30.0, 4.0]], [[40.0, 49.0, -22.0, 
+22.0, 42.0], [28.0, -16.0, -15.0, 75.0, 10.0], [37.0, -32.0, -6.0, 56.0, -9.0], [-17.0, 82.0, 42.0, -25.0, -34.0]], [[55.0, 
+65.0, -20.0, 0.0, 35.0], [5.0, -5.0, -35.0, 70.0, 5.0], [15.0, -30.0, 0.0, 50.0, -5.0], [-25.0, 80.0, 40.0, -30.0, -20.0]]], 
+[[[31.0, 26.0, 28.0, 27.0, 14.0], [23.0, 28.0, -20.0, 37.0, 20.0], [18.0, 27.0, 6.0, 20.0, 28.0], [-7.0, 41.0, -5.0, -36.0, 
+-2.0]], [[37.0, 35.0, 22.0, -57.0, -28.0], [-63.0, 44.0, -55.0, -26.0, -10.0], [-65.0, 25.0, 20.0, -28.0, 23.0], [-18.0, -19.0, 
+-21.0, -17.0, 48.0]], [[24.0, 15.0, 42.0, 0.0, -12.0], [-8.0, 46.0, -29.0, -3.0, 12.0], [-17.0, 46.0, 14.0, -12.0, 37.0], 
+[-5.0, 0.0, -28.0, -29.0, 26.0]], [[-11.0, 2.0, -50.0, -72.0, -19.0], [-65.0, -33.0, -6.0, -41.0, -37.0], [-52.0, -52.0, -2.0, 
+-22.0, -42.0], [-8.0, -40.0, 20.0, 41.0, 14.0]], [[49.0, 46.0, 26.0, 34.0, 27.0], [31.0, 29.0, -30.0, 63.0, 25.0], [28.0, 22.0, 
+6.0, 38.0, 30.0], [-14.0, 70.0, 6.0, -49.0, -10.0]]], [[[9.0, 18.0, -30.0, -30.0, 3.0], [-25.0, -19.0, -10.0, 3.0, -15.0], 
+[-16.0, -34.0, -2.0, 6.0, -22.0], [-10.0, 6.0, 22.0, 11.0, -2.0]], [[-49.0, -60.0, 24.0, 43.0, -10.0], [39.0, 0.0, 46.0, -29.0, 
+12.0], [28.0, 31.0, -6.0, -20.0, 10.0], [27.0, -39.0, -29.0, 14.0, -6.0]], [[-51.0, -52.0, -14.0, 28.0, 1.0], [31.0, -33.0, 
+52.0, -19.0, -1.0], [30.0, -12.0, -14.0, -6.0, -20.0], [22.0, -28.0, 0.0, 31.0, -22.0]], [[-10.0, -28.0, 64.0, 26.0, -24.0], 
+[14.0, 52.0, 0.0, -30.0, 20.0], [-4.0, 74.0, 12.0, -32.0, 48.0], [14.0, -34.0, -54.0, -20.0, 28.0]], [[0.0, -5.0, 20.0, -25.0, 
+-25.0], [-30.0, 25.0, -15.0, -35.0, -5.0], [-35.0, 25.0, 10.0, -30.0, 15.0], [0.0, -35.0, -25.0, 0.0, 
+30.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-13.0, -2.0, -46.0, 0.0, 19.0], [9.0, -47.0, 22.0, 17.0, -11.0], [20.0, -52.0, 
+-14.0, 22.0, -38.0], [0.0, 16.0, 36.0, 23.0, -30.0]], [[-47.0, -43.0, -32.0, 36.0, 17.0], [43.0, -51.0, 57.0, 4.0, -1.0], 
+[47.0, -34.0, -20.0, 14.0, -33.0], [19.0, -4.0, 20.0, 32.0, -40.0]], [[28.0, 38.0, -26.0, -69.0, -13.0], [-66.0, -1.0, -40.0, 
+-14.0, -25.0], [-56.0, -29.0, 8.0, -10.0, -16.0], [-21.0, -7.0, 15.0, 7.0, 24.0]], [[42.0, 36.0, 36.0, 12.0, 6.0], [6.0, 42.0, 
+-36.0, 30.0, 18.0], [0.0, 36.0, 12.0, 12.0, 36.0], [-12.0, 36.0, -12.0, -42.0, 12.0]], [[6.0, 19.0, -46.0, -34.0, 8.0], [-26.0, 
+-34.0, -5.0, 7.0, -20.0], [-13.0, -52.0, -6.0, 12.0, -35.0], [-11.0, 10.0, 34.0, 19.0, -10.0]]], [[[21.0, 33.0, -36.0, -66.0, 
+-9.0], [-61.0, -13.0, -31.0, -12.0, -27.0], [-49.0, -40.0, 4.0, -6.0, -25.0], [-19.0, -6.0, 22.0, 14.0, 16.0]], [[-41.0, -29.0, 
+-58.0, -23.0, 0.0], [-13.0, -60.0, 37.0, -24.0, -26.0], [-1.0, -61.0, -16.0, -4.0, -53.0], [8.0, -29.0, 29.0, 51.0, -20.0]], 
+[[-20.0, -32.0, 38.0, 25.0, -15.0], [18.0, 25.0, 14.0, -24.0, 13.0], [6.0, 45.0, 4.0, -22.0, 26.0], [15.0, -29.0, -35.0, -5.0, 
+12.0]], [[-9.0, -2.0, -28.0, -37.0, -10.0], [-33.0, -20.0, 0.0, -23.0, -20.0], [-26.0, -29.0, -2.0, -12.0, -24.0], [-3.0, 
+-23.0, 11.0, 24.0, 6.0]], [[-21.0, -18.0, -18.0, -6.0, -3.0], [-3.0, -21.0, 18.0, -15.0, -9.0], [0.0, -18.0, -6.0, -6.0, 
+-18.0], [6.0, -18.0, 6.0, 21.0, -6.0]]], [[[-29.0, -36.0, 18.0, -22.0, -35.0], [-27.0, 15.0, 8.0, -61.0, -9.0], [-34.0, 26.0, 
+6.0, -46.0, 8.0], [12.0, -66.0, -34.0, 19.0, 30.0]], [[-8.0, 7.0, -58.0, -38.0, 6.0], [-28.0, -48.0, 7.0, -3.0, -26.0], [-13.0, 
+-64.0, -10.0, 8.0, -47.0], [-7.0, -2.0, 38.0, 33.0, -14.0]], [[-8.0, -5.0, -16.0, 49.0, 33.0], [54.0, -29.0, 29.0, 45.0, 13.0], 
+[57.0, -21.0, -14.0, 38.0, -13.0], [6.0, 43.0, 25.0, -2.0, -42.0]], [[18.0, 5.0, 52.0, 79.0, 25.0], [72.0, 35.0, 3.0, 53.0, 
+41.0], [59.0, 53.0, 2.0, 30.0, 45.0], [6.0, 53.0, -17.0, -48.0, -18.0]], [[40.0, 42.0, 6.0, -13.0, 7.0], [-14.0, 19.0, -36.0, 
+26.0, 3.0], [-12.0, 3.0, 8.0, 14.0, 12.0], [-17.0, 33.0, 7.0, -25.0, 8.0]]], [[[21.0, 34.0, -40.0, -61.0, -4.0], [-55.0, -18.0, 
+-28.0, -5.0, -26.0], [-42.0, -45.0, 2.0, 0.0, -28.0], [-19.0, 1.0, 27.0, 14.0, 10.0]], [[-39.0, -37.0, -20.0, -8.0, -11.0], 
+[-5.0, -27.0, 31.0, -34.0, -13.0], [-3.0, -18.0, -8.0, -18.0, -23.0], [13.0, -40.0, 0.0, 34.0, -4.0]], [[11.0, 12.0, 0.0, -5.0, 
+2.0], [-5.0, 4.0, -10.0, 7.0, 0.0], [-4.0, -1.0, 2.0, 4.0, 2.0], [-5.0, 9.0, 3.0, -6.0, 2.0]], [[-34.0, -28.0, -32.0, -46.0, 
+-24.0], [-42.0, -28.0, 16.0, -54.0, -28.0], [-36.0, -30.0, -4.0, -32.0, -32.0], [6.0, -58.0, 2.0, 44.0, 12.0]], [[-19.0, -12.0, 
+-30.0, -68.0, -31.0], [-65.0, -17.0, -4.0, -59.0, -33.0], [-58.0, -28.0, 2.0, -38.0, -28.0], [-2.0, -60.0, 0.0, 39.0, 26.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_array_rank3_offset0(self):
-      arg0=numpy.array([2.0, 7.0])
-      arg1=numpy.array([[[-3.0, -2.0], [-5.0, -1.0]], [[4.0, 0.0], [7.0, 2.0]], [[5.0, 4.0], [-1.0, 3.0]], [[-2.0, -2.0], [5.0, 
-5.0]], [[-7.0, -6.0], [6.0, 7.0]], [[-4.0, 0.0], [4.0, -3.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-6.0, -4.0], [-10.0, -2.0]], [[8.0, 0.0], [14.0, 4.0]], [[10.0, 8.0], [-2.0, 6.0]], [[-4.0, -4.0], 
-[10.0, 10.0]], [[-14.0, -12.0], [12.0, 14.0]], [[-8.0, 0.0], [8.0, -6.0]]], [[[-21.0, -14.0], [-35.0, -7.0]], [[28.0, 0.0], 
-[49.0, 14.0]], [[35.0, 28.0], [-7.0, 21.0]], [[-14.0, -14.0], [35.0, 35.0]], [[-49.0, -42.0], [42.0, 49.0]], [[-28.0, 0.0], 
-[28.0, -21.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 5.0, -5.0, 4.0, 7.0], [5.0, 0.0, 0.0, 1.0, -5.0], [-7.0, -3.0, -1.0, 7.0, 3.0], [-6.0, 
+0.0, 3.0, 3.0, 5.0]], [[3.0, -4.0, 3.0, 3.0, 0.0], [0.0, 1.0, 1.0, 2.0, -5.0], [-3.0, 7.0, -5.0, -4.0, -1.0], [-2.0, 0.0, 6.0, 
+7.0, 7.0]], [[0.0, 4.0, 6.0, -6.0, -2.0], [5.0, 0.0, 0.0, 3.0, 0.0], [-2.0, 0.0, -2.0, 4.0, -5.0], [0.0, 6.0, 0.0, -5.0, 
+2.0]]], [[[-5.0, -2.0, 5.0, -2.0, 1.0], [2.0, -3.0, 1.0, 6.0, -1.0], [0.0, 0.0, 0.0, -4.0, 0.0], [0.0, 1.0, -3.0, 0.0, 0.0]], 
+[[-3.0, 4.0, 3.0, 5.0, -7.0], [-1.0, 3.0, 2.0, -1.0, -5.0], [-4.0, 1.0, 4.0, 7.0, -7.0], [-4.0, -4.0, 5.0, 2.0, 1.0]], [[0.0, 
+3.0, -4.0, 2.0, -5.0], [6.0, 4.0, -2.0, 3.0, -4.0], [6.0, 4.0, 6.0, 0.0, 5.0], [6.0, -3.0, 5.0, 1.0, 
+1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 7.0, 1.0, -6.0, -7.0], [4.0, -3.0, 0.0, 5.0, 7.0], [3.0, 1.0, -1.0, -2.0, 
+6.0], [-1.0, -7.0, -4.0, 5.0, -1.0]], [[4.0, -3.0, -7.0, -5.0, 3.0], [5.0, 5.0, 4.0, 1.0, 6.0], [2.0, 2.0, 0.0, -7.0, -6.0], 
+[6.0, 0.0, -4.0, -6.0, 2.0]], [[-5.0, 3.0, 7.0, -6.0, 1.0], [-5.0, 4.0, -5.0, 7.0, 5.0], [0.0, -3.0, 7.0, -1.0, -1.0], [-7.0, 
+-3.0, 3.0, 5.0, -3.0]]], [[[-3.0, 1.0, -3.0, -6.0, -1.0], [-4.0, -5.0, -4.0, -3.0, 1.0], [0.0, -4.0, 3.0, 1.0, -4.0], [-3.0, 
+4.0, 5.0, -2.0, -6.0]], [[-1.0, 1.0, -3.0, 0.0, -7.0], [3.0, -1.0, -2.0, -3.0, 4.0], [2.0, -1.0, -6.0, -2.0, 7.0], [2.0, 7.0, 
+0.0, -3.0, 0.0]], [[-3.0, 7.0, -5.0, -1.0, -7.0], [7.0, 0.0, 2.0, 3.0, -7.0], [-5.0, -7.0, 4.0, -1.0, -3.0], [-6.0, -4.0, -2.0, 
+-6.0, 0.0]]]]))
+      arg1=numpy.array([[[[4.0, -4.0, -4.0, 0.0, 1.0], [0.0, 0.0, -2.0, -1.0, -3.0], [-5.0, 6.0, 0.0, -5.0, -1.0], [-3.0, 4.0, 
+4.0, 4.0, 4.0]], [[-1.0, -1.0, 7.0, 0.0, -1.0], [1.0, -4.0, -5.0, 5.0, 4.0], [7.0, 4.0, -1.0, 3.0, 2.0], [0.0, 5.0, -2.0, 0.0, 
+3.0]], [[6.0, -3.0, 2.0, -7.0, 0.0], [2.0, 0.0, -6.0, -3.0, -3.0], [0.0, 2.0, -4.0, -7.0, -7.0], [2.0, -4.0, 2.0, 4.0, -3.0]]], 
+[[[7.0, 7.0, 2.0, 0.0, 2.0], [-4.0, -3.0, -6.0, 7.0, 6.0], [3.0, -2.0, -4.0, -2.0, 3.0], [3.0, 0.0, 0.0, 7.0, 1.0]], [[3.0, 
+-6.0, -7.0, 2.0, -7.0], [4.0, 7.0, 0.0, 1.0, -4.0], [0.0, 2.0, 3.0, -7.0, -2.0], [3.0, 3.0, -7.0, 4.0, 7.0]], [[-6.0, -3.0, 
+2.0, -1.0, -3.0], [0.0, 0.0, 3.0, 7.0, -6.0], [1.0, -7.0, 1.0, 0.0, 0.0], [0.0, 5.0, -1.0, -7.0, -1.0]]]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-27.0, -40.0, 12.0, -6.0, 13.0], [11.0, -18.0, 5.0, -28.0, -21.0], [-19.0, 46.0, 8.0, 15.0, 
+-8.0], [-39.0, 26.0, 35.0, -27.0, 3.0]], [[28.0, -75.0, -66.0, -23.0, -32.0], [28.0, 50.0, 7.0, -26.0, -89.0], [-56.0, 13.0, 
+11.0, -89.0, -55.0], [-1.0, 11.0, 5.0, 17.0, 19.0]], [[81.0, 28.0, 34.0, -32.0, -7.0], [7.0, -6.0, -83.0, 12.0, 51.0], [57.0, 
+18.0, -42.0, -39.0, -22.0], [51.0, -40.0, -31.0, 79.0, 1.0]], [[-34.0, -51.0, -42.0, 50.0, -44.0], [19.0, 29.0, 31.0, 34.0, 
+-26.0], [-3.0, 24.0, 46.0, 0.0, 28.0], [-15.0, 80.0, -39.0, -16.0, 74.0]], [[32.0, 42.0, 9.0, 5.0, 73.0], [-36.0, -52.0, -23.0, 
+-36.0, 49.0], [-37.0, 57.0, -22.0, 26.0, 24.0], [-43.0, -10.0, 78.0, 34.0, -9.0]]], [[[25.0, -33.0, 13.0, -43.0, -2.0], [-2.0, 
+-13.0, -34.0, 35.0, -50.0], [-13.0, -8.0, -25.0, -57.0, -32.0], [-2.0, 27.0, 31.0, 8.0, -6.0]], [[-37.0, -52.0, -12.0, 2.0, 
+-40.0], [25.0, 26.0, 25.0, 15.0, -50.0], [2.0, -12.0, 24.0, -12.0, -13.0], [0.0, 34.0, -27.0, -37.0, 17.0]], [[24.0, 0.0, -9.0, 
+6.0, -7.0], [5.0, 7.0, -17.0, 0.0, 14.0], [8.0, 20.0, -1.0, -13.0, 1.0], [9.0, 1.0, -14.0, 29.0, 20.0]], [[41.0, 24.0, 41.0, 
+-26.0, 9.0], [-20.0, -33.0, -57.0, 62.0, 18.0], [30.0, -15.0, -38.0, -25.0, 2.0], [18.0, 14.0, 10.0, 33.0, -3.0]], [[-13.0, 
+60.0, 10.0, -6.0, 45.0], [-21.0, -12.0, 29.0, -60.0, 33.0], [-17.0, -30.0, -10.0, 47.0, 2.0], [-3.0, -80.0, 29.0, -19.0, 
+-67.0]]], [[[-85.0, 43.0, 43.0, 0.0, 6.0], [-23.0, -16.0, 59.0, 36.0, -5.0], [20.0, -108.0, 5.0, 68.0, 23.0], [5.0, -17.0, 
+-4.0, -94.0, -65.0]], [[-40.0, -13.0, 62.0, -2.0, -29.0], [11.0, -21.0, -17.0, 67.0, 9.0], [68.0, -16.0, 0.0, 29.0, 15.0], 
+[12.0, 46.0, -37.0, -36.0, 12.0]], [[-35.0, -27.0, -51.0, 16.0, -42.0], [7.0, 48.0, 57.0, 28.0, -63.0], [-24.0, -64.0, 31.0, 
+-24.0, -3.0], [11.0, 21.0, -32.0, -38.0, 9.0]], [[49.0, -106.0, -105.0, -14.0, -46.0], [48.0, 77.0, 6.0, -60.0, -101.0], 
+[-75.0, 56.0, 25.0, -116.0, -69.0], [-4.0, 13.0, -5.0, 44.0, 49.0]], [[-68.0, 31.0, 30.0, 16.0, 38.0], [-39.0, -45.0, 44.0, 
+35.0, 0.0], [-17.0, -45.0, 5.0, 66.0, 44.0], [-40.0, 31.0, 48.0, -71.0, -30.0]]], [[[-70.0, 32.0, 50.0, -14.0, 6.0], [-18.0, 
+-20.0, 40.0, 34.0, -10.0], [22.0, -94.0, -4.0, 52.0, 10.0], [6.0, -16.0, 2.0, -82.0, -64.0]], [[49.0, 22.0, 36.0, -47.0, 39.0], 
+[-8.0, -31.0, -51.0, -36.0, 22.0], [0.0, 23.0, -43.0, -16.0, -31.0], [3.0, -51.0, 43.0, 36.0, -42.0]], [[-30.0, -84.0, -1.0, 
+5.0, -59.0], [38.0, 20.0, -3.0, 46.0, -53.0], [23.0, 23.0, 26.0, -26.0, -10.0], [-3.0, 82.0, -40.0, -24.0, 57.0]], [[-25.0, 
+-19.0, 15.0, 38.0, -21.0], [5.0, -14.0, -8.0, 56.0, 20.0], [35.0, 33.0, 20.0, 27.0, 42.0], [-13.0, 78.0, -27.0, -7.0, 61.0]], 
+[[22.0, -42.0, 28.0, -13.0, -12.0], [15.0, -21.0, -54.0, 32.0, -3.0], [25.0, 57.0, -11.0, -25.0, -7.0], [-8.0, 55.0, 2.0, 25.0, 
+41.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-40.0, 5.0, 13.0, 36.0, 6.0], [2.0, -14.0, 19.0, -8.0, 35.0], [16.0, 31.0, 22.0, 
+60.0, 36.0], [-22.0, 22.0, -8.0, -24.0, 20.0]], [[17.0, -54.0, -34.0, -26.0, -16.0], [3.0, 16.0, -2.0, 26.0, -82.0], [-46.0, 
+-13.0, -3.0, -74.0, -33.0], [-9.0, 39.0, 26.0, 2.0, 11.0]], [[53.0, -6.0, -34.0, -50.0, 38.0], [7.0, 16.0, -6.0, -116.0, 
+-28.0], [-68.0, 27.0, -23.0, -48.0, -67.0], [-7.0, -93.0, 58.0, 34.0, -57.0]], [[-91.0, 8.0, -37.0, 43.0, -10.0], [7.0, 38.0, 
+106.0, -50.0, -14.0], [-24.0, -49.0, 52.0, 69.0, 20.0], [-12.0, -30.0, -25.0, -83.0, -26.0]], [[-11.0, 78.0, 84.0, -14.0, 
+58.0], [-19.0, -58.0, -22.0, -44.0, 94.0], [46.0, 9.0, -31.0, 88.0, 17.0], [-1.0, -73.0, 24.0, -10.0, -65.0]]], [[[-80.0, 
+-73.0, -6.0, 34.0, -51.0], [23.0, 13.0, 42.0, 60.0, -55.0], [10.0, -1.0, 47.0, 17.0, 23.0], [-25.0, 105.0, -32.0, -69.0, 
+56.0]], [[-31.0, -34.0, 52.0, -30.0, -11.0], [29.0, -12.0, -13.0, -20.0, -9.0], [35.0, 18.0, -4.0, 19.0, -28.0], [-1.0, -6.0, 
+-7.0, -35.0, -21.0]], [[-80.0, -11.0, 28.0, 29.0, -4.0], [2.0, -18.0, 40.0, 19.0, 3.0], [18.0, -4.0, 28.0, 69.0, 35.0], [-28.0, 
+44.0, -6.0, -70.0, 7.0]], [[13.0, -54.0, 22.0, -58.0, 10.0], [15.0, -16.0, -30.0, -24.0, -56.0], [-24.0, 27.0, -23.0, -44.0, 
+-55.0], [-19.0, 3.0, 50.0, -6.0, -25.0]], [[113.0, -45.0, -16.0, -20.0, -4.0], [28.0, 1.0, -101.0, -30.0, 20.0], [3.0, 131.0, 
+-25.0, -82.0, -35.0], [4.0, 15.0, 5.0, 120.0, 67.0]]], [[[46.0, -11.0, -22.0, 9.0, 2.0], [10.0, 6.0, -31.0, -26.0, 21.0], 
+[-6.0, 65.0, -1.0, -23.0, -3.0], [-3.0, 3.0, -1.0, 55.0, 37.0]], [[-5.0, 2.0, -11.0, 26.0, 19.0], [8.0, -3.0, 9.0, -60.0, 
+36.0], [-10.0, 63.0, 16.0, 37.0, 14.0], [-24.0, -12.0, 8.0, 9.0, 15.0]], [[17.0, 28.0, 74.0, -65.0, 35.0], [-22.0, -51.0, 
+-46.0, 23.0, 0.0], [18.0, -38.0, -54.0, -8.0, -27.0], [8.0, -30.0, 48.0, -7.0, -68.0]], [[0.0, 40.0, -29.0, 4.0, 24.0], [-21.0, 
+11.0, 36.0, -32.0, 1.0], [-37.0, -41.0, 0.0, 8.0, 2.0], [1.0, -50.0, 19.0, -6.0, -38.0]], [[35.0, -76.0, -131.0, 24.0, -36.0], 
+[36.0, 85.0, 39.0, -75.0, -73.0], [-87.0, 53.0, 44.0, -82.0, -37.0], [-11.0, 4.0, -12.0, 41.0, 57.0]]], [[[-31.0, 4.0, 0.0, 
+59.0, -9.0], [12.0, -1.0, 14.0, -9.0, 58.0], [32.0, 56.0, 34.0, 64.0, 49.0], [-14.0, 30.0, -38.0, -3.0, 52.0]], [[27.0, 35.0, 
+-27.0, 39.0, -36.0], [6.0, 37.0, -4.0, 23.0, 50.0], [43.0, -14.0, 13.0, -1.0, 26.0], [48.0, -15.0, -79.0, 44.0, 38.0]], [[53.0, 
+52.0, 0.0, -19.0, 16.0], [-18.0, 1.0, -26.0, -4.0, 29.0], [5.0, -30.0, -30.0, -23.0, -10.0], [33.0, -58.0, 0.0, 45.0, -30.0]], 
+[[69.0, -7.0, -47.0, -35.0, 46.0], [0.0, 9.0, -16.0, -109.0, -18.0], [-79.0, 56.0, -21.0, -53.0, -52.0], [-20.0, -69.0, 69.0, 
+56.0, -30.0]], [[-66.0, -31.0, 0.0, 21.0, -15.0], [20.0, 10.0, 46.0, -22.0, -16.0], [1.0, 8.0, 34.0, 44.0, 8.0], [-21.0, 18.0, 
+-14.0, -58.0, 5.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank4_offset1(self):
-      arg0=numpy.array([[1.0, 2.0, 1.0], [2.0, -4.0, 3.0]])
-      arg1=numpy.array([[[[-5.0, 0.0, 7.0], [7.0, -3.0, 0.0]], [[2.0, 2.0, -3.0], [-6.0, 2.0, 7.0]]], [[[-2.0, -2.0, 3.0], 
-[-7.0, 6.0, -7.0]], [[-1.0, -6.0, -4.0], [-4.0, -1.0, -1.0]]], [[[-3.0, -2.0, -4.0], [-4.0, 0.0, -4.0]], [[5.0, 0.0, 7.0], 
-[1.0, 0.0, -7.0]]], [[[-7.0, -5.0, -3.0], [1.0, -7.0, -2.0]], [[-3.0, -4.0, -4.0], [7.0, 4.0, -1.0]]], [[[0.0, 4.0, -1.0], 
-[-5.0, 5.0, 6.0]], [[-2.0, -4.0, -4.0], [0.0, 0.0, -5.0]]], [[[-7.0, 7.0, -3.0], [-2.0, 7.0, -7.0]], [[-6.0, 2.0, 1.0], [-5.0, 
--4.0, 6.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[2.0, 1.0], [3.0, 5.0]], [[-3.0, -2.0], [-17.0, -7.0]], [[-11.0, -8.0], [12.0, -6.0]], [[-20.0, 
--15.0], [-15.0, 14.0]], [[7.0, 11.0], [-14.0, -5.0]], [[4.0, 5.0], [-1.0, -7.0]]], [[[11.0, 26.0], [-13.0, 1.0]], [[13.0, 
--59.0], [10.0, -7.0]], [[-10.0, -20.0], [31.0, -19.0]], [[-3.0, 24.0], [-2.0, -5.0]], [[-19.0, -12.0], [0.0, -15.0]], [[-51.0, 
--53.0], [-17.0, 24.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[2.0, 4.0, 6.0, 5.0, 6.0], [-1.0, 3.0, 2.0, 0.0, 2.0], [0.0, 2.0, -6.0, 7.0, 0.0], [-7.0, 7.0, 
+-1.0, 7.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 2.0, -4.0, 7.0, -1.0], [7.0, 6.0, 5.0, 1.0, 5.0], [-1.0, -5.0, -6.0, -5.0, 3.0], 
+[-6.0, 5.0, -1.0, 4.0, 4.0]]))
+      arg1=Data(3.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[6.0, 12.0, 18.0, 15.0, 18.0], [-3.0, 9.0, 6.0, 0.0, 6.0], [0.0, 6.0, -18.0, 21.0, 0.0], [-21.0, 
+21.0, -3.0, 21.0, -15.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[0.0, 6.0, -12.0, 21.0, -3.0], [21.0, 18.0, 15.0, 3.0, 15.0], [-3.0, -15.0, -18.0, 
+-15.0, 9.0], [-18.0, 15.0, -3.0, 12.0, 12.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank0_offset0(self):
-      arg0=numpy.array([4.0, 3.0])
-      arg1=Data(-4.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-16.0, -12.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -3.0, -6.0, 0.0, 0.0], [0.0, 0.0, 3.0, 6.0, -4.0], [3.0, -5.0, -6.0, -6.0, -1.0], [-7.0, 
+2.0, 7.0, -2.0, -6.0]], [[0.0, 0.0, -2.0, 3.0, -1.0], [1.0, -3.0, -4.0, -4.0, -1.0], [-1.0, -5.0, -3.0, -4.0, 0.0], [1.0, 1.0, 
+5.0, -2.0, -1.0]], [[7.0, 2.0, -7.0, -4.0, -3.0], [0.0, 4.0, -4.0, 2.0, -6.0], [-2.0, -3.0, -5.0, 5.0, 0.0], [1.0, 6.0, -3.0, 
+6.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-4.0, 3.0, -2.0, 2.0, 4.0], [-2.0, -2.0, -4.0, 5.0, -2.0], [6.0, 5.0, 0.0, -5.0, 
+-2.0], [6.0, 7.0, 1.0, 7.0, 0.0]], [[7.0, 6.0, 7.0, 7.0, -3.0], [6.0, -3.0, 0.0, -4.0, 0.0], [-1.0, -7.0, 4.0, 0.0, 5.0], [7.0, 
+4.0, 0.0, -1.0, -4.0]], [[-4.0, 3.0, -5.0, 6.0, 7.0], [7.0, -3.0, 1.0, -1.0, 2.0], [2.0, -7.0, -2.0, -6.0, 7.0], [7.0, 4.0, 
+4.0, 7.0, -4.0]]]))
+      arg1=Data(numpy.array([-7.0, -3.0, -6.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-42.0, 9.0, 90.0, 15.0, 21.0], [-3.0, -15.0, 15.0, -42.0, 67.0], [-6.0, 68.0, 81.0, 24.0, 7.0], 
+[40.0, -53.0, -46.0, -16.0, 45.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[31.0, -57.0, 23.0, -71.0, -61.0], [-46.0, 41.0, 22.0, -17.0, 2.0], [-51.0, 28.0, 0.0, 
+71.0, -43.0], [-105.0, -85.0, -31.0, -88.0, 36.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank1_offset1(self):
-      arg0=numpy.array([[-5.0, 0.0, -1.0], [-7.0, -3.0, -5.0]])
-      arg1=Data(numpy.array([1.0, 0.0, 2.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-7.0, -17.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, -4.0, -2.0, -3.0, 3.0], [-5.0, -3.0, -5.0, 4.0, 1.0], [5.0, 0.0, -4.0, -4.0, -6.0], [7.0, 
+-2.0, 7.0, 3.0, 7.0]], [[5.0, 3.0, 6.0, -7.0, -4.0], [-1.0, -3.0, 5.0, -5.0, -7.0], [7.0, -3.0, -4.0, 1.0, 7.0], [-1.0, 7.0, 
+-7.0, -6.0, -2.0]], [[-1.0, 5.0, 6.0, 4.0, -3.0], [-4.0, -7.0, -4.0, 0.0, 7.0], [1.0, -5.0, -1.0, 0.0, 1.0], [-5.0, -7.0, 0.0, 
+0.0, 4.0]]], [[[4.0, 2.0, -2.0, 5.0, 4.0], [0.0, -2.0, 6.0, 7.0, -2.0], [7.0, 6.0, 0.0, 5.0, 7.0], [7.0, 2.0, 7.0, 4.0, 3.0]], 
+[[-7.0, -5.0, 2.0, -6.0, 6.0], [6.0, -3.0, -1.0, -3.0, -1.0], [7.0, -3.0, 2.0, 0.0, -2.0], [4.0, 4.0, 3.0, 1.0, 3.0]], [[-3.0, 
+-6.0, -5.0, -4.0, 1.0], [2.0, -2.0, 0.0, 4.0, -3.0], [-4.0, 0.0, 0.0, -1.0, -1.0], [3.0, -2.0, 7.0, -2.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 1.0, 1.0, 6.0, 0.0], [1.0, -6.0, 6.0, -6.0, -2.0], [5.0, 4.0, 0.0, -2.0, 
+1.0], [3.0, 3.0, -1.0, -6.0, 0.0]], [[0.0, 2.0, -2.0, 1.0, 1.0], [0.0, 0.0, 2.0, -1.0, -6.0], [7.0, -6.0, -4.0, 6.0, -3.0], 
+[-2.0, 4.0, 3.0, 1.0, 6.0]], [[-1.0, 2.0, -5.0, -5.0, -7.0], [5.0, -5.0, -7.0, -6.0, 3.0], [4.0, 3.0, -3.0, -5.0, 3.0], [-3.0, 
+-3.0, -4.0, 5.0, -1.0]]], [[[0.0, 5.0, -4.0, -7.0, -7.0], [0.0, 4.0, -5.0, -1.0, 4.0], [-7.0, -6.0, 7.0, 7.0, -6.0], [0.0, 
+-7.0, 0.0, -7.0, 3.0]], [[-1.0, -4.0, 3.0, 0.0, -2.0], [2.0, 5.0, 0.0, -1.0, 3.0], [-3.0, 7.0, -2.0, 0.0, 6.0], [4.0, -6.0, 
+2.0, 0.0, 6.0]], [[1.0, -5.0, -6.0, -3.0, -3.0], [-7.0, 0.0, -4.0, 2.0, 6.0], [-6.0, 3.0, 7.0, 0.0, 0.0], [-6.0, 4.0, -6.0, 
+4.0, -6.0]]]]))
+      arg1=Data(numpy.array([[1.0, -3.0, -7.0], [3.0, 7.0, 7.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-67.0, -119.0, -89.0, -65.0, 97.0], [82.0, 14.0, 19.0, 47.0, -61.0], [19.0, 41.0, 29.0, 1.0, 
+-34.0], [115.0, 46.0, 119.0, 26.0, 8.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[1.0, -67.0, 9.0, -4.0, -10.0], [-69.0, 76.0, 6.0, 43.0, 70.0], [-128.0, 53.0, 89.0, 
+36.0, 13.0], [16.0, -23.0, -10.0, -37.0, -2.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank2_offset2(self):
-      arg0=numpy.array([[[-3.0, 0.0, 7.0], [4.0, -3.0, -3.0]], [[1.0, -5.0, -3.0], [6.0, 6.0, 4.0]]])
-      arg1=Data(numpy.array([[5.0, 0.0, 3.0], [1.0, 5.0, 2.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-11.0, 40.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -6.0, 5.0, -5.0, -1.0], [3.0, -2.0, -5.0, -7.0, 5.0], [1.0, -7.0, 0.0, 0.0, 6.0], [0.0, 
+-4.0, -6.0, -1.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 2.0, 5.0, 0.0, 2.0], [-2.0, 0.0, -4.0, 2.0, 0.0], [5.0, 2.0, -5.0, -3.0, 1.0], 
+[0.0, 2.0, 3.0, -2.0, 3.0]]))
+      arg1=Data(numpy.array([0.0, -2.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, 14.0], [0.0, 12.0], [0.0, -10.0], [0.0, 10.0], [0.0, 2.0]], [[0.0, -6.0], [0.0, 4.0], [0.0, 
+10.0], [0.0, 14.0], [0.0, -10.0]], [[0.0, -2.0], [0.0, 14.0], [0.0, 0.0], [0.0, 0.0], [0.0, -12.0]], [[0.0, 0.0], [0.0, 8.0], 
+[0.0, 12.0], [0.0, 2.0], [0.0, -10.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, -12.0], [0.0, -4.0], [0.0, -10.0], [0.0, 0.0], [0.0, -4.0]], [[0.0, 4.0], [0.0, 
+0.0], [0.0, 8.0], [0.0, -4.0], [0.0, 0.0]], [[0.0, -10.0], [0.0, -4.0], [0.0, 10.0], [0.0, 6.0], [0.0, -2.0]], [[0.0, 0.0], 
+[0.0, -4.0], [0.0, -6.0], [0.0, 4.0], [0.0, -6.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank3_offset3(self):
-      arg0=numpy.array([[[[2.0, 4.0, 2.0], [-2.0, -2.0, 0.0], [-7.0, -1.0, -5.0], [4.0, -7.0, -5.0]], [[6.0, 7.0, -7.0], [-4.0, 
-4.0, 3.0], [0.0, -4.0, -3.0], [-2.0, 1.0, -7.0]]], [[[2.0, 2.0, -7.0], [4.0, 5.0, -3.0], [-2.0, 6.0, -6.0], [1.0, -1.0, -2.0]], 
-[[-6.0, -1.0, 6.0], [-3.0, -7.0, 5.0], [4.0, -7.0, -7.0], [-4.0, 4.0, -5.0]]]])
-      arg1=Data(numpy.array([[[0.0, 0.0, -3.0], [0.0, 1.0, -4.0], [0.0, 7.0, 5.0], [5.0, 5.0, -2.0]], [[-4.0, 0.0, -2.0], 
-[-3.0, -2.0, 0.0], [1.0, -3.0, 7.0], [-3.0, 1.0, 1.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([-60.0, 76.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[2.0, 0.0, -2.0, 1.0, -6.0], [-6.0, 6.0, 5.0, -7.0, -5.0], [1.0, 1.0, -6.0, 3.0, -7.0], [3.0, 
+-2.0, 2.0, 3.0, 7.0]], [[1.0, 3.0, 0.0, 3.0, 3.0], [-6.0, -5.0, 0.0, 1.0, -3.0], [-4.0, -4.0, -6.0, -5.0, 3.0], [-7.0, 0.0, 
+3.0, -4.0, 4.0]], [[-6.0, 6.0, -7.0, 0.0, -6.0], [5.0, 0.0, -4.0, 7.0, -1.0], [-6.0, 5.0, 3.0, -7.0, 1.0], [2.0, 7.0, -6.0, 
+6.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, 4.0, 6.0, -7.0, 4.0], [-2.0, 0.0, 2.0, 0.0, 6.0], [2.0, -3.0, 2.0, 0.0, 0.0], 
+[-2.0, -6.0, -1.0, -2.0, -6.0]], [[5.0, 1.0, 3.0, 3.0, 2.0], [-3.0, -5.0, 5.0, -3.0, 3.0], [7.0, -5.0, 5.0, -6.0, 2.0], [-7.0, 
+4.0, 7.0, -2.0, 5.0]], [[5.0, -5.0, 0.0, 0.0, -5.0], [1.0, 2.0, 5.0, 7.0, -7.0], [-5.0, -6.0, 1.0, 5.0, 0.0], [-5.0, 5.0, 0.0, 
+2.0, 0.0]]]))
+      arg1=Data(numpy.array([[0.0, -1.0], [0.0, -5.0], [1.0, 7.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-6.0, -49.0], [6.0, 27.0], [-7.0, -47.0], [0.0, -16.0], [-6.0, -51.0]], [[5.0, 71.0], [0.0, 
+19.0], [-4.0, -33.0], [7.0, 51.0], [-1.0, 13.0]], [[-6.0, -23.0], [5.0, 54.0], [3.0, 57.0], [-7.0, -27.0], [1.0, -1.0]], [[2.0, 
+46.0], [7.0, 51.0], [-6.0, -59.0], [6.0, 59.0], [1.0, -20.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[5.0, 12.0], [-5.0, -44.0], [0.0, -21.0], [0.0, -8.0], [-5.0, -49.0]], [[1.0, 24.0], 
+[2.0, 39.0], [5.0, 8.0], [7.0, 64.0], [-7.0, -70.0]], [[-5.0, -72.0], [-6.0, -14.0], [1.0, -20.0], [5.0, 65.0], [0.0, -10.0]], 
+[[-5.0, 2.0], [5.0, 21.0], [0.0, -34.0], [2.0, 26.0], [0.0, -19.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank1_offset0(self):
-      arg0=numpy.array([4.0, 2.0])
-      arg1=Data(numpy.array([6.0, -7.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[24.0, -28.0], [12.0, -14.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, 5.0, -6.0, 0.0, 3.0], [-2.0, 0.0, 0.0, -7.0, 5.0], [-7.0, -2.0, -3.0, -2.0, -1.0], [3.0, 
+-6.0, -4.0, -3.0, 7.0]], [[0.0, 3.0, 2.0, 5.0, -2.0], [-5.0, -5.0, 0.0, 5.0, 2.0], [3.0, -6.0, -4.0, -5.0, 2.0], [-6.0, 4.0, 
+-7.0, 3.0, -3.0]], [[4.0, -6.0, -5.0, -2.0, -7.0], [3.0, 6.0, -1.0, -2.0, 4.0], [0.0, 4.0, -1.0, -4.0, 6.0], [2.0, 6.0, -3.0, 
+4.0, 0.0]]], [[[0.0, 2.0, 3.0, -1.0, -1.0], [0.0, 7.0, -3.0, -4.0, 5.0], [5.0, 0.0, 6.0, -3.0, -3.0], [-2.0, -6.0, 4.0, 4.0, 
+6.0]], [[1.0, -2.0, 3.0, -5.0, -3.0], [-2.0, 2.0, -3.0, -2.0, -1.0], [5.0, -7.0, 0.0, -1.0, -7.0], [5.0, 1.0, -6.0, 7.0, 0.0]], 
+[[0.0, -7.0, 0.0, 3.0, 5.0], [2.0, 2.0, 4.0, 5.0, 0.0], [3.0, -5.0, 0.0, -4.0, -1.0], [6.0, 0.0, -1.0, 3.0, 
+-4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, 0.0, 0.0, 7.0, -6.0], [-5.0, 2.0, -5.0, 0.0, 6.0], [5.0, 0.0, -5.0, -3.0, 
+1.0], [0.0, -2.0, -4.0, 2.0, 1.0]], [[-3.0, -3.0, 7.0, 4.0, 0.0], [0.0, -4.0, -7.0, 7.0, 3.0], [-4.0, 6.0, 2.0, 0.0, 0.0], 
+[0.0, -1.0, 3.0, -5.0, -3.0]], [[-4.0, -7.0, 3.0, -1.0, 4.0], [-1.0, -4.0, -6.0, 2.0, -7.0], [-6.0, 0.0, -5.0, -2.0, -3.0], 
+[4.0, 1.0, 7.0, -7.0, -3.0]]], [[[-6.0, 3.0, 1.0, 4.0, 4.0], [-5.0, 6.0, -4.0, 0.0, 3.0], [-7.0, 4.0, 6.0, -4.0, -7.0], [1.0, 
+7.0, 5.0, 6.0, 1.0]], [[-4.0, 5.0, -6.0, -6.0, 6.0], [-2.0, 0.0, 2.0, 5.0, 2.0], [0.0, 0.0, -4.0, -3.0, 3.0], [-1.0, 4.0, 0.0, 
+6.0, -5.0]], [[-7.0, -5.0, -5.0, 5.0, 2.0], [7.0, 1.0, -1.0, -2.0, 7.0], [-7.0, 0.0, 0.0, 3.0, 3.0], [0.0, -6.0, -6.0, 4.0, 
+3.0]]]]))
+      arg1=Data(numpy.array([[[2.0, 7.0], [3.0, -5.0], [6.0, 5.0]], [[4.0, -2.0], [4.0, 3.0], [2.0, -4.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[36.0, 51.0], [-31.0, 8.0], [-12.0, -74.0], [-15.0, -60.0], [-48.0, -31.0]], [[-5.0, 12.0], [61.0, 
+39.0], [-22.0, -24.0], [-25.0, -102.0], [56.0, 32.0]], [[41.0, -71.0], [-36.0, 35.0], [0.0, -18.0], [-67.0, 10.0], [-2.0, 
+2.0]], [[24.0, 56.0], [16.0, -17.0], [-57.0, -30.0], [77.0, -15.0], [21.0, 68.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-93.0, 2.0], [-29.0, 9.0], [9.0, -20.0], [22.0, -22.0], [56.0, -20.0]], [[-30.0, 
+-64.0], [-6.0, -2.0], [-77.0, -12.0], [49.0, -2.0], [13.0, -36.0]], [[-80.0, 67.0], [34.0, -38.0], [-26.0, -94.0], [-40.0, 
+-44.0], [-26.0, 3.0]], [[24.0, 15.0], [31.0, 18.0], [51.0, 6.0], [3.0, -6.0], [-35.0, -22.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank2_offset1(self):
-      arg0=numpy.array([[7.0, -7.0, 3.0], [3.0, -4.0, 6.0]])
-      arg1=Data(numpy.array([[-6.0, 3.0, -2.0], [-1.0, 0.0, 6.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-69.0, 11.0], [-42.0, 33.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-2.0, 0.0, 0.0, 0.0, -6.0], [-6.0, 0.0, -1.0, 4.0, -3.0], [-6.0, 0.0, -6.0, 7.0, 0.0], [-7.0, 
+0.0, 6.0, -6.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, -7.0, 2.0, -2.0, 3.0], [-5.0, 5.0, 1.0, 6.0, 2.0], [0.0, -7.0, 7.0, -6.0, 0.0], 
+[-7.0, -5.0, -5.0, 7.0, -7.0]]))
+      arg1=Data(numpy.array([[-6.0, -1.0, 2.0, -3.0, 0.0], [7.0, 2.0, -3.0, -2.0, -6.0], [5.0, 2.0, 5.0, -3.0, 4.0], [-2.0, 
+-1.0, -3.0, -3.0, 6.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[12.0, 2.0, -4.0, 6.0, 0.0], [-14.0, -4.0, 6.0, 4.0, 12.0], [-10.0, -4.0, -10.0, 6.0, -8.0], 
+[4.0, 2.0, 6.0, 6.0, -12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
+[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[36.0, 6.0, 
+-12.0, 18.0, 0.0], [-42.0, -12.0, 18.0, 12.0, 36.0], [-30.0, -12.0, -30.0, 18.0, -24.0], [12.0, 6.0, 18.0, 18.0, -36.0]]], 
+[[[36.0, 6.0, -12.0, 18.0, 0.0], [-42.0, -12.0, 18.0, 12.0, 36.0], [-30.0, -12.0, -30.0, 18.0, -24.0], [12.0, 6.0, 18.0, 18.0, 
+-36.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[6.0, 
+1.0, -2.0, 3.0, 0.0], [-7.0, -2.0, 3.0, 2.0, 6.0], [-5.0, -2.0, -5.0, 3.0, -4.0], [2.0, 1.0, 3.0, 3.0, -6.0]], [[-24.0, -4.0, 
+8.0, -12.0, 0.0], [28.0, 8.0, -12.0, -8.0, -24.0], [20.0, 8.0, 20.0, -12.0, 16.0], [-8.0, -4.0, -12.0, -12.0, 24.0]], [[18.0, 
+3.0, -6.0, 9.0, 0.0], [-21.0, -6.0, 9.0, 6.0, 18.0], [-15.0, -6.0, -15.0, 9.0, -12.0], [6.0, 3.0, 9.0, 9.0, -18.0]]], [[[36.0, 
+6.0, -12.0, 18.0, 0.0], [-42.0, -12.0, 18.0, 12.0, 36.0], [-30.0, -12.0, -30.0, 18.0, -24.0], [12.0, 6.0, 18.0, 18.0, -36.0]], 
+[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[36.0, 6.0, 
+-12.0, 18.0, 0.0], [-42.0, -12.0, 18.0, 12.0, 36.0], [-30.0, -12.0, -30.0, 18.0, -24.0], [12.0, 6.0, 18.0, 18.0, -36.0]], 
+[[-42.0, -7.0, 14.0, -21.0, 0.0], [49.0, 14.0, -21.0, -14.0, -42.0], [35.0, 14.0, 35.0, -21.0, 28.0], [-14.0, -7.0, -21.0, 
+-21.0, 42.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
+[[[42.0, 7.0, -14.0, 21.0, 0.0], [-49.0, -14.0, 21.0, 14.0, 42.0], [-35.0, -14.0, -35.0, 21.0, -28.0], [14.0, 7.0, 21.0, 21.0, 
+-42.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-36.0, 
+-6.0, 12.0, -18.0, 0.0], [42.0, 12.0, -18.0, -12.0, -36.0], [30.0, 12.0, 30.0, -18.0, 24.0], [-12.0, -6.0, -18.0, -18.0, 
+36.0]], [[36.0, 6.0, -12.0, 18.0, 0.0], [-42.0, -12.0, 18.0, 12.0, 36.0], [-30.0, -12.0, -30.0, 18.0, -24.0], [12.0, 6.0, 18.0, 
+18.0, -36.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-36.0, -6.0, 12.0, -18.0, 0.0], [42.0, 12.0, -18.0, -12.0, -36.0], [30.0, 12.0, 
+30.0, -18.0, 24.0], [-12.0, -6.0, -18.0, -18.0, 36.0]], [[42.0, 7.0, -14.0, 21.0, 0.0], [-49.0, -14.0, 21.0, 14.0, 42.0], 
+[-35.0, -14.0, -35.0, 21.0, -28.0], [14.0, 7.0, 21.0, 21.0, -42.0]], [[-12.0, -2.0, 4.0, -6.0, 0.0], [14.0, 4.0, -6.0, -4.0, 
+-12.0], [10.0, 4.0, 10.0, -6.0, 8.0], [-4.0, -2.0, -6.0, -6.0, 12.0]], [[12.0, 2.0, -4.0, 6.0, 0.0], [-14.0, -4.0, 6.0, 4.0, 
+12.0], [-10.0, -4.0, -10.0, 6.0, -8.0], [4.0, 2.0, 6.0, 6.0, -12.0]], [[-18.0, -3.0, 6.0, -9.0, 0.0], [21.0, 6.0, -9.0, -6.0, 
+-18.0], [15.0, 6.0, 15.0, -9.0, 12.0], [-6.0, -3.0, -9.0, -9.0, 18.0]]], [[[30.0, 5.0, -10.0, 15.0, 0.0], [-35.0, -10.0, 15.0, 
+10.0, 30.0], [-25.0, -10.0, -25.0, 15.0, -20.0], [10.0, 5.0, 15.0, 15.0, -30.0]], [[-30.0, -5.0, 10.0, -15.0, 0.0], [35.0, 
+10.0, -15.0, -10.0, -30.0], [25.0, 10.0, 25.0, -15.0, 20.0], [-10.0, -5.0, -15.0, -15.0, 30.0]], [[-6.0, -1.0, 2.0, -3.0, 0.0], 
+[7.0, 2.0, -3.0, -2.0, -6.0], [5.0, 2.0, 5.0, -3.0, 4.0], [-2.0, -1.0, -3.0, -3.0, 6.0]], [[-36.0, -6.0, 12.0, -18.0, 0.0], 
+[42.0, 12.0, -18.0, -12.0, -36.0], [30.0, 12.0, 30.0, -18.0, 24.0], [-12.0, -6.0, -18.0, -18.0, 36.0]], [[-12.0, -2.0, 4.0, 
+-6.0, 0.0], [14.0, 4.0, -6.0, -4.0, -12.0], [10.0, 4.0, 10.0, -6.0, 8.0], [-4.0, -2.0, -6.0, -6.0, 12.0]]], [[[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[42.0, 7.0, -14.0, 21.0, 0.0], 
+[-49.0, -14.0, 21.0, 14.0, 42.0], [-35.0, -14.0, -35.0, 21.0, -28.0], [14.0, 7.0, 21.0, 21.0, -42.0]], [[-42.0, -7.0, 14.0, 
+-21.0, 0.0], [49.0, 14.0, -21.0, -14.0, -42.0], [35.0, 14.0, 35.0, -21.0, 28.0], [-14.0, -7.0, -21.0, -21.0, 42.0]], [[36.0, 
+6.0, -12.0, 18.0, 0.0], [-42.0, -12.0, 18.0, 12.0, 36.0], [-30.0, -12.0, -30.0, 18.0, -24.0], [12.0, 6.0, 18.0, 18.0, -36.0]], 
+[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[42.0, 7.0, 
+-14.0, 21.0, 0.0], [-49.0, -14.0, 21.0, 14.0, 42.0], [-35.0, -14.0, -35.0, 21.0, -28.0], [14.0, 7.0, 21.0, 21.0, -42.0]], 
+[[30.0, 5.0, -10.0, 15.0, 0.0], [-35.0, -10.0, 15.0, 10.0, 30.0], [-25.0, -10.0, -25.0, 15.0, -20.0], [10.0, 5.0, 15.0, 15.0, 
+-30.0]], [[30.0, 5.0, -10.0, 15.0, 0.0], [-35.0, -10.0, 15.0, 10.0, 30.0], [-25.0, -10.0, -25.0, 15.0, -20.0], [10.0, 5.0, 
+15.0, 15.0, -30.0]], [[-42.0, -7.0, 14.0, -21.0, 0.0], [49.0, 14.0, -21.0, -14.0, -42.0], [35.0, 14.0, 35.0, -21.0, 28.0], 
+[-14.0, -7.0, -21.0, -21.0, 42.0]], [[42.0, 7.0, -14.0, 21.0, 0.0], [-49.0, -14.0, 21.0, 14.0, 42.0], [-35.0, -14.0, -35.0, 
+21.0, -28.0], [14.0, 7.0, 21.0, 21.0, -42.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank3_offset2(self):
-      arg0=numpy.array([[[4.0, -3.0, 2.0], [0.0, -1.0, -1.0]], [[-1.0, -7.0, -2.0], [-2.0, 0.0, -4.0]]])
-      arg1=Data(numpy.array([[[-1.0, 4.0, 3.0], [3.0, 4.0, 0.0]], [[0.0, -2.0, -7.0], [2.0, -6.0, -2.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-14.0, 0.0], [-39.0, 32.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[7.0, 6.0, -4.0, -7.0, -5.0], [4.0, -4.0, 3.0, 0.0, 3.0], [2.0, 5.0, -5.0, -1.0, 1.0], [1.0, 5.0, 
+-6.0, 5.0, 7.0]], [[-6.0, 2.0, 0.0, -4.0, -6.0], [4.0, -5.0, 5.0, 3.0, 4.0], [-1.0, -1.0, 5.0, -2.0, 3.0], [0.0, -7.0, 3.0, 
+0.0, -3.0]], [[-5.0, -5.0, -5.0, 0.0, -5.0], [-4.0, -1.0, 4.0, -3.0, 2.0], [-7.0, -5.0, 7.0, -4.0, -2.0], [2.0, -6.0, -3.0, 
+5.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, -1.0, -2.0, 3.0, -5.0], [0.0, 0.0, -7.0, 3.0, -7.0], [-7.0, 5.0, 0.0, 0.0, 
+-6.0], [2.0, 6.0, -1.0, 7.0, -1.0]], [[4.0, 1.0, 4.0, 7.0, 1.0], [1.0, 5.0, -3.0, -1.0, -7.0], [-3.0, -4.0, -4.0, 6.0, -1.0], 
+[-2.0, -1.0, -4.0, 1.0, -3.0]], [[6.0, 4.0, 6.0, -2.0, 4.0], [1.0, -5.0, -3.0, -1.0, 6.0], [-6.0, 6.0, 4.0, -7.0, 0.0], [-6.0, 
+5.0, -4.0, 0.0, 6.0]]]))
+      arg1=Data(numpy.array([[[1.0, -1.0, -2.0, -5.0, 1.0], [0.0, -1.0, 2.0, 4.0, 5.0], [0.0, -4.0, 4.0, 5.0, -7.0], [-5.0, 
+-6.0, 2.0, 4.0, -1.0]], [[0.0, 3.0, 0.0, -5.0, -2.0], [-7.0, -1.0, 0.0, -1.0, 0.0], [-3.0, 5.0, 1.0, 7.0, 4.0], [0.0, -5.0, 
+-4.0, -3.0, 3.0]], [[-5.0, -4.0, -1.0, 0.0, 1.0], [-3.0, -6.0, 2.0, -2.0, 1.0], [-6.0, -2.0, 7.0, 0.0, -5.0], [-4.0, 7.0, -1.0, 
+5.0, 7.0]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[32.0, -5.0, -9.0, -5.0, 14.0], [57.0, 29.0, 4.0, 44.0, 30.0], [48.0, -48.0, -13.0, -7.0, -48.0], 
+[-15.0, -47.0, 43.0, 21.0, -60.0]], [[31.0, 20.0, -7.0, -40.0, -3.0], [1.0, 22.0, 2.0, 32.0, 25.0], [24.0, -4.0, -9.0, 44.0, 
+-9.0], [-10.0, -81.0, 9.0, -7.0, -35.0]], [[21.0, 24.0, 13.0, 20.0, -9.0], [15.0, 34.0, -18.0, -6.0, -25.0], [30.0, 26.0, 
+-51.0, -20.0, 53.0], [40.0, -11.0, -3.0, -41.0, -31.0]], [[-7.0, -5.0, 14.0, 55.0, 1.0], [28.0, 11.0, -14.0, -24.0, -35.0], 
+[12.0, 8.0, -32.0, -63.0, 33.0], [35.0, 62.0, 2.0, -16.0, -5.0]], [[20.0, 7.0, 15.0, 55.0, 2.0], [57.0, 41.0, -20.0, -4.0, 
+-30.0], [48.0, 0.0, -61.0, -67.0, 36.0], [45.0, 25.0, 19.0, -27.0, -48.0]]], [[[24.0, 24.0, -4.0, -40.0, -8.0], [-16.0, 16.0, 
+0.0, 20.0, 16.0], [12.0, 12.0, -8.0, 48.0, 8.0], [-4.0, -72.0, -4.0, -16.0, -20.0]], [[1.0, -7.0, 9.0, 45.0, 5.0], [38.0, 15.0, 
+-10.0, -9.0, -21.0], [21.0, -7.0, -28.0, -55.0, 13.0], [24.0, 42.0, 13.0, -6.0, -18.0]], [[-17.0, -4.0, -10.0, -40.0, -3.0], 
+[-47.0, -32.0, 14.0, -1.0, 19.0], [-39.0, 5.0, 45.0, 50.0, -21.0], [-31.0, -15.0, -18.0, 17.0, 40.0]], [[15.0, 21.0, 3.0, 
+-15.0, -9.0], [-12.0, 15.0, -6.0, 3.0, -3.0], [9.0, 21.0, -18.0, 21.0, 27.0], [12.0, -36.0, -9.0, -24.0, -12.0]], [[-7.0, 1.0, 
+-8.0, -35.0, -3.0], [-34.0, -19.0, 10.0, 4.0, 17.0], [-24.0, 4.0, 30.0, 43.0, -15.0], [-23.0, -24.0, -12.0, 10.0, 23.0]]], 
+[[[37.0, 23.0, 3.0, -5.0, -3.0], [28.0, 41.0, -10.0, 23.0, 3.0], [45.0, 1.0, -42.0, 3.0, 17.0], [18.0, -56.0, 15.0, -24.0, 
+-54.0]], [[30.0, 12.0, -5.0, -20.0, 2.0], [22.0, 26.0, 0.0, 31.0, 20.0], [33.0, -15.0, -16.0, 18.0, -14.0], [-5.0, -60.0, 19.0, 
+-2.0, -43.0]], [[-40.0, -8.0, 3.0, 0.0, -8.0], [-56.0, -42.0, 4.0, -39.0, -18.0], [-57.0, 31.0, 34.0, 10.0, 20.0], [-3.0, 54.0, 
+-37.0, 0.0, 69.0]], [[19.0, 11.0, 6.0, 15.0, -1.0], [26.0, 27.0, -10.0, 6.0, -9.0], [30.0, 2.0, -34.0, -19.0, 19.0], [21.0, 
+-12.0, 10.0, -18.0, -33.0]], [[11.0, 16.0, 0.0, -20.0, -7.0], [-15.0, 8.0, -2.0, 5.0, 3.0], [3.0, 15.0, -7.0, 26.0, 15.0], 
+[3.0, -35.0, -8.0, -15.0, -6.0]]], [[[-9.0, -9.0, -4.0, -5.0, 3.0], [-6.0, -13.0, 6.0, 0.0, 7.0], [-12.0, -8.0, 18.0, 5.0, 
+-17.0], [-13.0, 8.0, 0.0, 14.0, 13.0]], [[35.0, -2.0, -4.0, 10.0, 13.0], [67.0, 38.0, -2.0, 39.0, 19.0], [57.0, -43.0, -29.0, 
+-24.0, -33.0], [-1.0, -37.0, 44.0, 11.0, -68.0]], [[9.0, 27.0, 15.0, 15.0, -15.0], [-12.0, 21.0, -18.0, -21.0, -33.0], [9.0, 
+45.0, -42.0, -9.0, 69.0], [42.0, 0.0, -21.0, -48.0, -6.0]], [[-20.0, -25.0, -15.0, -25.0, 10.0], [-15.0, -35.0, 20.0, 10.0, 
+30.0], [-30.0, -30.0, 55.0, 25.0, -60.0], [-45.0, 5.0, 5.0, 45.0, 30.0]], [[42.0, 12.0, -7.0, -20.0, 6.0], [42.0, 38.0, 0.0, 
+45.0, 28.0], [51.0, -29.0, -24.0, 14.0, -26.0], [-7.0, -76.0, 33.0, 2.0, -65.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-35.0, -7.0, 4.0, 5.0, -7.0], [-46.0, -35.0, 2.0, -36.0, -19.0], [-48.0, 28.0, 26.0, 
+3.0, 21.0], [1.0, 52.0, -32.0, -2.0, 59.0]], [[-21.0, -12.0, -2.0, 0.0, 1.0], [-19.0, -24.0, 6.0, -13.0, -1.0], [-27.0, 1.0, 
+25.0, 2.0, -9.0], [-11.0, 29.0, -10.0, 13.0, 32.0]], [[-32.0, -10.0, -2.0, -10.0, -4.0], [-46.0, -38.0, 8.0, -24.0, -4.0], 
+[-48.0, 16.0, 38.0, 18.0, 0.0], [-14.0, 34.0, -26.0, 10.0, 56.0]], [[13.0, 26.0, -4.0, -50.0, -13.0], [-43.0, 2.0, 2.0, 9.0, 
+13.0], [-9.0, 27.0, 5.0, 64.0, 17.0], [-7.0, -67.0, -20.0, -19.0, 4.0]], [[-25.0, -8.0, 6.0, 20.0, -3.0], [-19.0, -20.0, -2.0, 
+-29.0, -21.0], [-27.0, 17.0, 9.0, -18.0, 19.0], [9.0, 53.0, -18.0, -3.0, 36.0]]], [[[-5.0, -1.0, -1.0, -5.0, -1.0], [-10.0, 
+-7.0, 2.0, -3.0, 1.0], [-9.0, 3.0, 8.0, 7.0, -1.0], [-4.0, 2.0, -5.0, 2.0, 10.0]], [[25.0, 35.0, 5.0, -25.0, -15.0], [-20.0, 
+25.0, -10.0, 5.0, -5.0], [15.0, 35.0, -30.0, 35.0, 45.0], [20.0, -60.0, -15.0, -40.0, -20.0]], [[8.0, 10.0, 17.0, 50.0, -4.0], 
+[30.0, 28.0, -20.0, -19.0, -38.0], [27.0, 19.0, -52.0, -56.0, 52.0], [47.0, 36.0, 1.0, -34.0, -23.0]], [[8.0, -2.0, -5.0, 
+-10.0, 4.0], [10.0, 4.0, 4.0, 15.0, 14.0], [9.0, -15.0, 4.0, 8.0, -20.0], [-11.0, -20.0, 11.0, 10.0, -13.0]], [[-37.0, -38.0, 
+8.0, 70.0, 13.0], [31.0, -22.0, -2.0, -33.0, -29.0], [-15.0, -19.0, 7.0, -84.0, -9.0], [11.0, 119.0, 8.0, 23.0, 28.0]]], 
+[[[23.0, 22.0, 20.0, 50.0, -7.0], [39.0, 46.0, -26.0, -13.0, -41.0], [45.0, 25.0, -73.0, -56.0, 67.0], [59.0, 15.0, 4.0, -49.0, 
+-44.0]], [[-25.0, -41.0, -16.0, -5.0, 19.0], [10.0, -37.0, 22.0, 12.0, 31.0], [-24.0, -52.0, 58.0, -3.0, -81.0], [-49.0, 32.0, 
+20.0, 62.0, 25.0]], [[-20.0, -28.0, -4.0, 20.0, 12.0], [16.0, -20.0, 8.0, -4.0, 4.0], [-12.0, -28.0, 24.0, -28.0, -36.0], 
+[-16.0, 48.0, 12.0, 32.0, 16.0]], [[35.0, 46.0, 7.0, -30.0, -19.0], [-21.0, 36.0, -14.0, 8.0, -7.0], [24.0, 44.0, -43.0, 42.0, 
+59.0], [28.0, -79.0, -17.0, -53.0, -31.0]], [[-6.0, 3.0, 12.0, 35.0, -4.0], [7.0, 7.0, -12.0, -23.0, -30.0], [3.0, 19.0, -25.0, 
+-37.0, 38.0], [30.0, 41.0, -8.0, -21.0, 3.0]]], [[[32.0, 16.0, 2.0, 0.0, 0.0], [32.0, 36.0, -8.0, 22.0, 4.0], [42.0, -6.0, 
+-36.0, -4.0, 8.0], [14.0, -44.0, 18.0, -16.0, -50.0]], [[-19.0, -29.0, -17.0, -25.0, 13.0], [-8.0, -35.0, 22.0, 15.0, 35.0], 
+[-27.0, -39.0, 58.0, 23.0, -71.0], [-50.0, 4.0, 11.0, 52.0, 26.0]], [[19.0, 5.0, 6.0, 25.0, 3.0], [40.0, 29.0, -10.0, 8.0, 
+-9.0], [36.0, -8.0, -36.0, -33.0, 11.0], [21.0, -2.0, 18.0, -12.0, -39.0]], [[7.0, -4.0, -14.0, -40.0, 5.0], [-7.0, -8.0, 14.0, 
+27.0, 35.0], [-3.0, -23.0, 29.0, 42.0, -45.0], [-35.0, -47.0, 10.0, 25.0, -4.0]], [[-31.0, -32.0, -4.0, 20.0, 11.0], [3.0, 
+-32.0, 10.0, -13.0, 1.0], [-27.0, -23.0, 35.0, -26.0, -35.0], [-19.0, 63.0, 4.0, 35.0, 34.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank4_offset3(self):
-      arg0=numpy.array([[[[1.0, -7.0, 2.0], [-3.0, 1.0, 1.0], [6.0, -3.0, 1.0], [1.0, -5.0, 6.0]], [[0.0, 1.0, -3.0], [-3.0, 
-2.0, 6.0], [3.0, -4.0, -5.0], [0.0, -1.0, -4.0]]], [[[7.0, 1.0, 0.0], [-1.0, 7.0, 6.0], [0.0, 3.0, -3.0], [4.0, -3.0, 6.0]], 
-[[-5.0, 4.0, -2.0], [-2.0, 5.0, -7.0], [4.0, 6.0, 1.0], [4.0, 7.0, -1.0]]]])
-      arg1=Data(numpy.array([[[[7.0, 5.0, -1.0], [7.0, 5.0, -1.0], [-6.0, -6.0, 7.0], [-2.0, -2.0, 6.0]], [[-3.0, 4.0, -4.0], 
-[3.0, 6.0, 5.0], [7.0, 7.0, 7.0], [2.0, 0.0, 6.0]]], [[[-4.0, 0.0, 2.0], [-3.0, -5.0, -5.0], [-1.0, 3.0, -6.0], [7.0, -1.0, 
-0.0]], [[-3.0, 0.0, -3.0], [-4.0, -2.0, -4.0], [-5.0, 4.0, 4.0], [-5.0, 5.0, 0.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[-31.0, -73.0], [178.0, 38.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, -3.0, -5.0, -7.0, -7.0], [7.0, 3.0, -6.0, 1.0, 5.0], [-2.0, 4.0, 0.0, -7.0, 1.0], [-5.0, 
+-4.0, -1.0, 4.0, 0.0]], [[0.0, -4.0, 7.0, -7.0, 5.0], [7.0, -1.0, 4.0, -3.0, 0.0], [-1.0, 6.0, 3.0, 0.0, 0.0], [-4.0, 0.0, 
+-6.0, -5.0, -2.0]], [[-5.0, -3.0, 0.0, 7.0, 2.0], [-1.0, 1.0, -2.0, 3.0, -5.0], [-1.0, -1.0, 0.0, 7.0, -4.0], [-7.0, -5.0, 
+-2.0, -5.0, 3.0]]], [[[-3.0, 4.0, -3.0, -2.0, 4.0], [-6.0, -1.0, 1.0, 3.0, 5.0], [-2.0, -2.0, 3.0, -6.0, -1.0], [4.0, -5.0, 
+-3.0, 6.0, 6.0]], [[3.0, 6.0, -2.0, 0.0, 1.0], [0.0, 3.0, -3.0, 5.0, 5.0], [-3.0, 3.0, -6.0, -1.0, 6.0], [4.0, -1.0, 0.0, 7.0, 
+3.0]], [[-6.0, 7.0, 0.0, -2.0, 4.0], [0.0, 3.0, 3.0, -3.0, 6.0], [2.0, 4.0, -6.0, 0.0, 6.0], [0.0, -7.0, 3.0, -5.0, 
+6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 6.0, -1.0, -1.0, -3.0], [5.0, -4.0, -4.0, -6.0, 1.0], [0.0, -4.0, 3.0, 0.0, 
+5.0], [7.0, -3.0, -4.0, -4.0, -2.0]], [[-3.0, 0.0, -4.0, -1.0, 0.0], [2.0, 7.0, 6.0, 2.0, -2.0], [-3.0, 4.0, -6.0, -4.0, 1.0], 
+[-1.0, 5.0, -2.0, -7.0, 4.0]], [[0.0, 3.0, 0.0, 1.0, 0.0], [-6.0, 6.0, -6.0, 4.0, 1.0], [2.0, -5.0, -4.0, -3.0, 7.0], [2.0, 
+-2.0, 6.0, 4.0, 5.0]]], [[[7.0, -2.0, 6.0, 2.0, 7.0], [2.0, -6.0, 1.0, 3.0, 6.0], [-7.0, -6.0, 1.0, -7.0, 2.0], [0.0, -6.0, 
+-4.0, -5.0, 7.0]], [[-4.0, 6.0, 0.0, 7.0, -4.0], [3.0, 5.0, -4.0, 2.0, -2.0], [-4.0, -5.0, -1.0, 0.0, -4.0], [-3.0, -3.0, -6.0, 
+3.0, -7.0]], [[-3.0, 2.0, 6.0, -5.0, 1.0], [-2.0, 7.0, -2.0, 6.0, 7.0], [-5.0, -4.0, 0.0, 7.0, -3.0], [0.0, 6.0, -5.0, 6.0, 
+0.0]]]]))
+      arg1=Data(numpy.array([[[[2.0, -4.0, 6.0, 0.0, 3.0], [6.0, -1.0, -7.0, -1.0, -1.0], [-2.0, 3.0, 5.0, -7.0, -2.0], [6.0, 
+3.0, 4.0, 4.0, 0.0]], [[-1.0, -3.0, 7.0, 3.0, 5.0], [-7.0, -4.0, -6.0, 5.0, 2.0], [-7.0, 0.0, -2.0, 1.0, 6.0], [2.0, 0.0, -5.0, 
+3.0, -5.0]], [[1.0, -7.0, 5.0, -2.0, 0.0], [-5.0, -7.0, -7.0, -1.0, 1.0], [0.0, -4.0, 0.0, -6.0, 4.0], [1.0, -2.0, 0.0, -5.0, 
+-1.0]]], [[[6.0, 5.0, 2.0, 6.0, 0.0], [4.0, 5.0, 1.0, 6.0, 6.0], [6.0, 3.0, 5.0, 5.0, 5.0], [6.0, -2.0, -2.0, -5.0, 6.0]], 
+[[5.0, -3.0, 2.0, 4.0, -4.0], [-1.0, -1.0, -5.0, 6.0, 6.0], [6.0, 3.0, 0.0, -4.0, 2.0], [-6.0, 4.0, 5.0, -3.0, 4.0]], [[3.0, 
+-4.0, 4.0, 3.0, -3.0], [-1.0, -2.0, 0.0, 2.0, 1.0], [0.0, -3.0, -5.0, 7.0, -2.0], [7.0, -6.0, 3.0, -3.0, 
+-7.0]]]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-18.0, 19.0, -25.0, -14.0, 18.0], [40.0, 25.0, -11.0, -11.0, -15.0], [-8.0, 50.0, 35.0, -67.0, 
+-25.0], [-59.0, 76.0, 19.0, 65.0, 41.0]], [[70.0, 19.0, -13.0, 63.0, -74.0], [28.0, 40.0, 40.0, 60.0, 59.0], [94.0, 12.0, 
+-22.0, 80.0, -12.0], [8.0, -29.0, 51.0, -68.0, 22.0]], [[-45.0, -10.0, 9.0, -5.0, 28.0], [-89.0, -36.0, 0.0, 10.0, -11.0], 
+[-69.0, -30.0, -54.0, 35.0, 33.0], [-22.0, -17.0, -59.0, 22.0, -61.0]], [[-18.0, -2.0, -68.0, -53.0, -50.0], [-34.0, -20.0, 
+40.0, -51.0, -14.0], [51.0, -49.0, -21.0, -24.0, -6.0], [-75.0, -19.0, 5.0, -68.0, 30.0]], [[24.0, 0.0, 29.0, 51.0, -12.0], 
+[-76.0, -16.0, 4.0, 68.0, 53.0], [9.0, -26.0, -45.0, 86.0, 66.0], [16.0, -53.0, -44.0, -58.0, -27.0]]], [[[-30.0, -72.0, 74.0, 
+-13.0, 56.0], [-26.0, -58.0, -90.0, -7.0, -30.0], [-99.0, 7.0, -9.0, -66.0, -6.0], [19.0, 35.0, 5.0, 84.0, -70.0]], [[26.0, 
+-42.0, 32.0, 10.0, -17.0], [10.0, -20.0, -38.0, 9.0, 11.0], [13.0, 2.0, -3.0, -24.0, -13.0], [14.0, 3.0, 43.0, -9.0, -11.0]], 
+[[-18.0, 28.0, -10.0, 19.0, 5.0], [-50.0, 6.0, 48.0, 22.0, 3.0], [-28.0, -25.0, -48.0, 96.0, 21.0], [15.0, -46.0, -52.0, -7.0, 
+-45.0]], [[42.0, -4.0, 4.0, 14.0, -23.0], [22.0, 6.0, -32.0, 23.0, 41.0], [67.0, 24.0, 41.0, -54.0, 23.0], [-30.0, 29.0, 29.0, 
+-41.0, 71.0]], [[78.0, 1.0, 49.0, 78.0, -23.0], [64.0, 38.0, -20.0, 72.0, 56.0], [50.0, 47.0, 20.0, 42.0, -7.0], [67.0, -1.0, 
+53.0, -13.0, 13.0]]], [[[-25.0, 9.0, -26.0, -19.0, -5.0], [-7.0, 2.0, 40.0, -28.0, -29.0], [-19.0, -23.0, -28.0, 35.0, -26.0], 
+[5.0, -24.0, -8.0, 7.0, -32.0]], [[16.0, -62.0, 79.0, 32.0, 18.0], [-28.0, -42.0, -74.0, 41.0, 17.0], [-44.0, 7.0, -22.0, 
+-10.0, 12.0], [33.0, 6.0, 17.0, 28.0, -57.0]], [[-33.0, 48.0, -9.0, -15.0, 57.0], [3.0, 21.0, 15.0, -15.0, -18.0], [-39.0, 9.0, 
+39.0, 0.0, 33.0], [18.0, 6.0, -69.0, 30.0, 21.0]], [[-48.0, -48.0, -21.0, -54.0, -17.0], [-100.0, -71.0, -1.0, -42.0, -28.0], 
+[-28.0, -70.0, -65.0, -19.0, 10.0], [-65.0, -27.0, -21.0, -30.0, -47.0]], [[40.0, -23.0, 20.0, 44.0, -39.0], [10.0, 4.0, -10.0, 
+45.0, 31.0], [28.0, 16.0, -30.0, 30.0, -23.0], [2.0, 1.0, 54.0, -7.0, -20.0]]], [[[31.0, 89.0, -77.0, 42.0, -51.0], [45.0, 
+86.0, 92.0, 40.0, 38.0], [86.0, 37.0, 3.0, 77.0, -14.0], [-45.0, 7.0, 12.0, -29.0, 67.0]], [[-69.0, 57.0, -89.0, -45.0, 13.0], 
+[-11.0, 29.0, 63.0, -41.0, -44.0], [-28.0, 11.0, -10.0, -12.0, -25.0], [-102.0, 46.0, -32.0, 58.0, 20.0]], [[-7.0, 9.0, -52.0, 
+-23.0, -42.0], [31.0, 18.0, 54.0, -39.0, -28.0], [26.0, -13.0, -23.0, 19.0, -63.0], [-17.0, -11.0, 41.0, -6.0, -7.0]], [[64.0, 
+63.0, -30.0, 44.0, -26.0], [106.0, 84.0, 8.0, 44.0, 54.0], [105.0, 86.0, 85.0, -36.0, -4.0], [-32.0, 68.0, 49.0, -10.0, 
+129.0]], [[74.0, -18.0, 43.0, 54.0, -40.0], [14.0, 2.0, -18.0, 53.0, 59.0], [68.0, -3.0, 4.0, 40.0, 24.0], [59.0, -42.0, 31.0, 
+-78.0, 13.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[30.0, 40.0, 15.0, 8.0, 31.0], [98.0, 50.0, -4.0, -10.0, 2.0], [25.0, 39.0, 91.0, 
+-22.0, 1.0], [81.0, 9.0, 0.0, 5.0, 62.0]], [[39.0, -81.0, 67.0, 12.0, -12.0], [5.0, -47.0, -95.0, 19.0, 23.0], [12.0, 12.0, 
+10.0, -80.0, -2.0], [5.0, 28.0, 64.0, -5.0, -5.0]], [[56.0, 22.0, 2.0, 42.0, -41.0], [40.0, 35.0, 37.0, 29.0, 35.0], [66.0, 
+-3.0, 3.0, 75.0, -4.0], [64.0, -51.0, 22.0, -64.0, 14.0]], [[32.0, 9.0, -10.0, 20.0, -21.0], [2.0, 11.0, -27.0, 39.0, 49.0], 
+[63.0, 35.0, 32.0, -53.0, 34.0], [-72.0, 49.0, 17.0, -28.0, 79.0]], [[19.0, 55.0, -8.0, 29.0, 4.0], [13.0, 40.0, 48.0, 23.0, 
+22.0], [24.0, -3.0, 15.0, 79.0, 31.0], [55.0, -45.0, -43.0, -38.0, 19.0]]], [[[23.0, 25.0, 16.0, 36.0, 19.0], [53.0, 40.0, 
+-18.0, 37.0, 21.0], [6.0, 60.0, 41.0, -13.0, -2.0], [8.0, 47.0, 15.0, 43.0, 34.0]], [[1.0, -120.0, 81.0, 14.0, -18.0], [-139.0, 
+-115.0, -87.0, 41.0, 25.0], [-47.0, -60.0, -99.0, -2.0, 40.0], [-21.0, -34.0, 7.0, -31.0, -106.0]], [[-40.0, 65.0, -26.0, 14.0, 
+40.0], [-26.0, 35.0, 55.0, 18.0, -10.0], [-52.0, 9.0, -17.0, 77.0, 21.0], [-2.0, -6.0, -74.0, 45.0, -20.0]], [[36.0, -25.0, 
+32.0, 42.0, -34.0], [-66.0, -29.0, -5.0, 54.0, 50.0], [28.0, -37.0, -49.0, 69.0, 47.0], [20.0, -60.0, -12.0, -77.0, -30.0]], 
+[[52.0, 3.0, 33.0, 41.0, -20.0], [34.0, 18.0, 14.0, 26.0, 27.0], [36.0, -10.0, 4.0, 72.0, 2.0], [100.0, -61.0, 13.0, -52.0, 
+-12.0]]], [[[-72.0, -8.0, -53.0, -86.0, 16.0], [-8.0, -23.0, 17.0, -93.0, -75.0], [-45.0, -26.0, -4.0, -69.0, -43.0], [-57.0, 
+24.0, -6.0, 43.0, -10.0]], [[-90.0, 40.0, -59.0, -46.0, 40.0], [-42.0, 6.0, 58.0, -45.0, -63.0], [-86.0, -13.0, -38.0, 24.0, 
+-20.0], [-55.0, 14.0, -61.0, 78.0, -43.0]], [[9.0, 42.0, -44.0, -8.0, -17.0], [85.0, 55.0, 49.0, -29.0, -19.0], [36.0, 25.0, 
+32.0, 6.0, -55.0], [14.0, 11.0, 35.0, 12.0, 36.0]], [[-20.0, -30.0, -29.0, -27.0, -41.0], [8.0, -12.0, 38.0, -45.0, -46.0], 
+[-14.0, -30.0, -62.0, 28.0, -85.0], [-4.0, -22.0, 55.0, 17.0, -68.0]], [[-1.0, -38.0, 56.0, -24.0, 45.0], [3.0, -38.0, -68.0, 
+-25.0, -11.0], [-29.0, -10.0, 48.0, -71.0, 32.0], [54.0, -1.0, -18.0, -1.0, 5.0]]], [[[2.0, -30.0, 39.0, -19.0, 28.0], [42.0, 
+-14.0, -42.0, -32.0, -25.0], [-25.0, 4.0, 37.0, -50.0, -18.0], [60.0, 5.0, 18.0, 24.0, -9.0]], [[-46.0, -34.0, 13.0, -11.0, 
+10.0], [-70.0, -42.0, 14.0, -12.0, -37.0], [-83.0, -46.0, -85.0, 62.0, -20.0], [14.0, -41.0, -22.0, 34.0, -113.0]], [[-69.0, 
+-2.0, -48.0, -81.0, 17.0], [-45.0, -34.0, 24.0, -82.0, -59.0], [-38.0, -51.0, -11.0, -41.0, -2.0], [-45.0, -10.0, -43.0, 1.0, 
+-9.0]], [[6.0, -49.0, -33.0, -29.0, -77.0], [-24.0, -36.0, 22.0, -35.0, -12.0], [45.0, -52.0, -61.0, 2.0, -49.0], [-40.0, 
+-34.0, 62.0, -59.0, -29.0]], [[4.0, 17.0, 41.0, 16.0, 42.0], [-30.0, -7.0, -3.0, 17.0, 15.0], [-24.0, -26.0, 17.0, 51.0, 69.0], 
+[85.0, -58.0, -77.0, -35.0, -11.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank2_offset0(self):
-      arg0=numpy.array([0.0, -6.0])
-      arg1=Data(numpy.array([[1.0, 4.0, 0.0, 0.0, -6.0], [-4.0, -3.0, -3.0, -1.0, 5.0], [3.0, -1.0, 0.0, 0.0, -5.0], [0.0, 
--5.0, -2.0, -2.0, 3.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[-6.0, -24.0, 0.0, 0.0, 36.0], [24.0, 18.0, 18.0, 6.0, -30.0], [-18.0, 6.0, 0.0, 0.0, 30.0], [0.0, 30.0, 12.0, 
-12.0, -18.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-3.0, 3.0, -7.0, -4.0, 0.0], [1.0, 1.0, 5.0, 0.0, 5.0], [1.0, -3.0, 5.0, 2.0, 0.0], [-3.0, 4.0, 
+-1.0, -3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 0.0, 0.0, 0.0, -3.0], [-3.0, 6.0, 0.0, 1.0, -7.0], [5.0, -7.0, 4.0, 5.0, -5.0], 
+[2.0, -2.0, 0.0, -4.0, -4.0]]))
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[6.0, -6.0, 14.0, 8.0, -0.0], [-2.0, -2.0, -10.0, -0.0, -10.0], [-2.0, 6.0, -10.0, -4.0, -0.0], 
+[6.0, -8.0, 2.0, 6.0, -0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[15.0, -0.0, -0.0, -0.0, 9.0], [9.0, -18.0, -0.0, -3.0, 21.0], [-15.0, 21.0, -12.0, 
+-15.0, 15.0], [-6.0, 6.0, -0.0, 12.0, 12.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank3_offset1(self):
-      arg0=numpy.array([[0.0, -3.0, 6.0], [-1.0, -4.0, 1.0]])
-      arg1=Data(numpy.array([[[-5.0, -4.0, 1.0], [-7.0, -5.0, 5.0], [6.0, 1.0, -6.0], [0.0, -6.0, 6.0], [2.0, 1.0, 6.0]], 
-[[4.0, 6.0, 6.0], [-5.0, -6.0, 7.0], [-2.0, -3.0, -1.0], [0.0, -3.0, 0.0], [3.0, -4.0, -4.0]], [[6.0, 0.0, 3.0], [-3.0, -1.0, 
--4.0], [0.0, 2.0, -2.0], [5.0, -5.0, 1.0], [6.0, 4.0, 0.0]], [[-4.0, 1.0, 2.0], [-6.0, 0.0, 6.0], [6.0, -7.0, -5.0], [0.0, 3.0, 
-2.0], [5.0, 1.0, 6.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[18.0, 45.0, -39.0, 54.0, 33.0], [18.0, 60.0, 3.0, 9.0, -12.0], [18.0, -21.0, -18.0, 21.0, -12.0], 
-[9.0, 36.0, -9.0, 3.0, 33.0]], [[22.0, 32.0, -16.0, 30.0, 0.0], [-22.0, 36.0, 13.0, 12.0, 9.0], [-3.0, 3.0, -10.0, 16.0, 
--22.0], [2.0, 12.0, 17.0, -10.0, -3.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-2.0, -5.0, -6.0, -2.0, -6.0], [0.0, -1.0, -5.0, -7.0, 3.0], [0.0, -7.0, 0.0, 0.0, 2.0], [-4.0, 
+0.0, 6.0, 3.0, 1.0]], [[-1.0, -5.0, -3.0, 4.0, 2.0], [-5.0, -1.0, -4.0, 3.0, 0.0], [-2.0, 3.0, 4.0, -4.0, 6.0], [4.0, 5.0, 5.0, 
+7.0, -1.0]], [[2.0, 4.0, -3.0, -3.0, -5.0], [-6.0, 5.0, 0.0, -3.0, -5.0], [7.0, 5.0, 2.0, 1.0, 5.0], [-4.0, -3.0, -6.0, -7.0, 
+5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, 5.0, -2.0, 5.0, 5.0], [7.0, 6.0, 6.0, 6.0, 6.0], [4.0, 5.0, -5.0, 0.0, 4.0], 
+[0.0, 0.0, -5.0, -3.0, 7.0]], [[-4.0, -6.0, 0.0, 1.0, -1.0], [2.0, 6.0, 0.0, 1.0, 2.0], [-2.0, 6.0, 1.0, -7.0, 6.0], [7.0, 4.0, 
+7.0, 7.0, -5.0]], [[-2.0, -3.0, -6.0, -1.0, 4.0], [-1.0, 1.0, 0.0, 0.0, -6.0], [-6.0, 7.0, 0.0, -4.0, -3.0], [3.0, 1.0, -6.0, 
+1.0, -6.0]]]))
+      arg1=Data(numpy.array([2.0, -7.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, -1.0, -4.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[15.0, 49.0, -9.0, -50.0, -56.0], [-1.0, 35.0, 18.0, -53.0, -24.0], [56.0, -5.0, -16.0, 34.0, 
+-8.0], [-60.0, -53.0, -59.0, -85.0, 39.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[12.0, 18.0, 24.0, 3.0, -15.0], [2.0, -10.0, 0.0, -1.0, 22.0], [26.0, -34.0, -1.0, 
+23.0, 6.0], [-19.0, -8.0, 17.0, -11.0, 29.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank4_offset2(self):
-      arg0=numpy.array([[[-7.0, 7.0, -6.0], [-7.0, -6.0, -4.0]], [[4.0, 6.0, -7.0], [1.0, 2.0, -6.0]]])
-      arg1=Data(numpy.array([[[[3.0, -3.0, -1.0], [0.0, -7.0, 0.0]], [[6.0, 0.0, 7.0], [-4.0, 1.0, -7.0]], [[-2.0, 5.0, 0.0], 
-[3.0, 4.0, -1.0]], [[-2.0, 0.0, -5.0], [-5.0, 3.0, 5.0]], [[-7.0, -6.0, 2.0], [-5.0, 2.0, -4.0]]], [[[2.0, -7.0, -3.0], [-3.0, 
--7.0, 0.0]], [[4.0, 5.0, 7.0], [-5.0, 3.0, 0.0]], [[3.0, -7.0, -7.0], [-3.0, -1.0, -6.0]], [[2.0, 0.0, 3.0], [-5.0, 2.0, 1.0]], 
-[[7.0, -5.0, -3.0], [-4.0, 0.0, -6.0]]], [[[-7.0, -5.0, 3.0], [-6.0, 0.0, -6.0]], [[-1.0, 2.0, 4.0], [-1.0, 7.0, 0.0]], [[1.0, 
-5.0, 1.0], [5.0, -1.0, -1.0]], [[-4.0, 3.0, -2.0], [2.0, 1.0, 3.0]], [[1.0, -3.0, 0.0], [1.0, -5.0, 5.0]]], [[[-6.0, -3.0, 
-1.0], [-2.0, -1.0, 0.0]], [[-2.0, -1.0, 1.0], [-2.0, 6.0, 0.0]], [[2.0, -7.0, 2.0], [-3.0, 2.0, -3.0]], [[-7.0, -4.0, 1.0], 
-[-5.0, 1.0, 4.0]], [[7.0, 5.0, -4.0], [6.0, -4.0, 3.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[6.0, -34.0, 8.0, 41.0, 34.0], [18.0, -18.0, 23.0, -13.0, -14.0], [62.0, -38.0, -3.0, 29.0, 
--25.0], [35.0, -21.0, -54.0, 28.0, -20.0]], [[-13.0, 15.0, 39.0, -2.0, -55.0], [-30.0, -2.0, 50.0, -20.0, 51.0], [-49.0, -7.0, 
-36.0, 2.0, -53.0], [-53.0, -11.0, -29.0, -86.0, 66.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[7.0, 1.0, 4.0, -7.0, 1.0], [7.0, 0.0, 7.0, 4.0, 5.0], [2.0, 2.0, 4.0, 3.0, 2.0], [7.0, 5.0, 
+-3.0, 7.0, 6.0]], [[7.0, -3.0, 0.0, 6.0, 3.0], [5.0, -4.0, 0.0, 6.0, 0.0], [-4.0, 0.0, 1.0, -5.0, 0.0], [-5.0, -5.0, 0.0, 3.0, 
+1.0]], [[6.0, -4.0, 5.0, 0.0, -7.0], [-4.0, 1.0, 6.0, 4.0, -1.0], [7.0, 1.0, -2.0, -6.0, 0.0], [6.0, -4.0, -2.0, 5.0, 3.0]]], 
+[[[-5.0, 0.0, -6.0, -6.0, -4.0], [6.0, -2.0, -4.0, 1.0, -4.0], [-1.0, -6.0, -5.0, 4.0, -4.0], [-5.0, 0.0, -6.0, 0.0, 6.0]], 
+[[6.0, -4.0, 0.0, 2.0, 3.0], [-6.0, 3.0, -4.0, -7.0, 0.0], [0.0, -3.0, 0.0, -7.0, 2.0], [7.0, 0.0, -3.0, -2.0, -1.0]], [[3.0, 
+7.0, 3.0, -3.0, 4.0], [1.0, -1.0, -2.0, -2.0, -4.0], [2.0, 0.0, -5.0, 6.0, 2.0], [1.0, 0.0, -5.0, -2.0, 
+4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 0.0, 2.0, -4.0, -6.0], [0.0, -2.0, -1.0, -1.0, 3.0], [4.0, -5.0, -1.0, 6.0, 
+5.0], [5.0, 1.0, 5.0, 3.0, -1.0]], [[-1.0, 2.0, -7.0, -5.0, 3.0], [-1.0, -4.0, 2.0, -3.0, -2.0], [2.0, 2.0, 0.0, 7.0, -5.0], 
+[2.0, 1.0, -5.0, 5.0, -3.0]], [[-6.0, -3.0, 6.0, -3.0, -3.0], [-1.0, -7.0, -5.0, -3.0, -4.0], [3.0, -1.0, 2.0, 2.0, -2.0], 
+[7.0, -1.0, 4.0, -5.0, -2.0]]], [[[5.0, 3.0, -3.0, 6.0, 0.0], [-7.0, 6.0, 1.0, -2.0, 7.0], [-4.0, 0.0, 7.0, -2.0, -4.0], [4.0, 
+1.0, 4.0, -1.0, 7.0]], [[0.0, 3.0, -6.0, 7.0, -7.0], [6.0, -7.0, -1.0, -1.0, -1.0], [-5.0, -6.0, -1.0, 4.0, 2.0], [-3.0, 3.0, 
+7.0, 1.0, -2.0]], [[7.0, 6.0, 5.0, 7.0, 0.0], [7.0, -2.0, 2.0, 6.0, 4.0], [-7.0, -4.0, -1.0, 2.0, 3.0], [-1.0, -3.0, 1.0, -4.0, 
+2.0]]]]))
+      arg1=Data(numpy.array([[6.0, 4.0, -5.0], [-2.0, -3.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, 4.0, 0.0], [4.0, 5.0, -6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[32.0, 26.0, 11.0, -12.0, 52.0], [88.0, -26.0, 32.0, 47.0, 43.0], [-37.0, 28.0, 48.0, 41.0, 14.0], 
+[-19.0, 30.0, 13.0, 35.0, 16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-16.0, -1.0, -90.0, -23.0, -53.0], [-44.0, -25.0, -10.0, -66.0, 6.0], [29.0, -23.0, 
+24.0, 58.0, -19.0], [40.0, 46.0, 50.0, 60.0, -11.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[3.0, -2.0, 3.0, 2.0, -4.0], [-6.0, 4.0, -4.0, 3.0, 0.0], [-7.0, 4.0, -1.0, 1.0, 2.0], [-6.0, 
+-1.0, 3.0, -7.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, -6.0, 0.0, -7.0, 7.0], [1.0, -5.0, 0.0, 5.0, 4.0], [0.0, -5.0, -3.0, -5.0, 0.0], 
+[1.0, 7.0, -6.0, -4.0, 0.0]]))
+      arg1=Data(numpy.array([-3.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, -2.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-9.0, 0.0], [6.0, 0.0], [-9.0, 0.0], [-6.0, 0.0], [12.0, 0.0]], [[18.0, 0.0], [-12.0, 0.0], 
+[12.0, 0.0], [-9.0, 0.0], [0.0, 0.0]], [[21.0, 0.0], [-12.0, 0.0], [3.0, 0.0], [-3.0, 0.0], [-6.0, 0.0]], [[18.0, 0.0], [3.0, 
+0.0], [-9.0, 0.0], [21.0, 0.0], [-18.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[24.0, -8.0], [-36.0, 12.0], [0.0, 0.0], [-42.0, 14.0], [42.0, -14.0]], [[6.0, -2.0], 
+[-30.0, 10.0], [0.0, 0.0], [30.0, -10.0], [24.0, -8.0]], [[0.0, 0.0], [-30.0, 10.0], [-18.0, 6.0], [-30.0, 10.0], [0.0, 0.0]], 
+[[6.0, -2.0], [42.0, -14.0], [-36.0, 12.0], [-24.0, 8.0], [0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_constData_rank3_offset0(self):
-      arg0=numpy.array([3.0, 1.0])
-      arg1=Data(numpy.array([[[2.0, 2.0], [6.0, 4.0]], [[5.0, -2.0], [-4.0, -5.0]], [[-4.0, -3.0], [1.0, 0.0]], [[-6.0, 1.0], 
-[-6.0, -2.0]], [[2.0, 7.0], [4.0, 0.0]], [[-3.0, 7.0], [2.0, 0.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[6.0, 6.0], [18.0, 12.0]], [[15.0, -6.0], [-12.0, -15.0]], [[-12.0, -9.0], [3.0, 0.0]], [[-18.0, 
-3.0], [-18.0, -6.0]], [[6.0, 21.0], [12.0, 0.0]], [[-9.0, 21.0], [6.0, 0.0]]], [[[2.0, 2.0], [6.0, 4.0]], [[5.0, -2.0], [-4.0, 
--5.0]], [[-4.0, -3.0], [1.0, 0.0]], [[-6.0, 1.0], [-6.0, -2.0]], [[2.0, 7.0], [4.0, 0.0]], [[-3.0, 7.0], [2.0, 
-0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-1.0, 1.0, 6.0, -7.0, -7.0], [5.0, -4.0, 2.0, 6.0, -7.0], [-4.0, 0.0, 2.0, -3.0, -4.0], [5.0, 
+-4.0, 0.0, 7.0, 5.0]], [[-4.0, -5.0, -7.0, 0.0, 5.0], [-5.0, -7.0, 1.0, -1.0, -3.0], [0.0, 5.0, -2.0, -4.0, 0.0], [4.0, 5.0, 
+-2.0, 6.0, 7.0]], [[-6.0, 6.0, 6.0, -2.0, -3.0], [6.0, -4.0, -7.0, -3.0, -4.0], [-3.0, 6.0, -5.0, 5.0, -4.0], [-2.0, -7.0, 
+-2.0, 0.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, -1.0, -6.0, 0.0, 6.0], [-3.0, 7.0, 1.0, -4.0, 5.0], [2.0, 5.0, -7.0, 0.0, 5.0], 
+[7.0, -1.0, 5.0, -2.0, -1.0]], [[4.0, -5.0, -5.0, -4.0, 5.0], [4.0, 1.0, 4.0, -3.0, 0.0], [0.0, -3.0, -1.0, 0.0, -5.0], [7.0, 
+4.0, -3.0, -6.0, 0.0]], [[1.0, -3.0, 3.0, -7.0, 2.0], [-1.0, -3.0, 1.0, 5.0, 5.0], [0.0, 7.0, 4.0, -3.0, -1.0], [-3.0, 5.0, 
+5.0, 0.0, 7.0]]]))
+      arg1=Data(numpy.array([[-3.0, -6.0], [3.0, -4.0], [-2.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 7.0], [0.0, 3.0], [-5.0, 4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[3.0, 10.0], [-30.0, 26.0], [-51.0, 4.0], [25.0, 38.0], [42.0, 16.0]], [[-42.0, 2.0], [-1.0, 
+44.0], [11.0, -30.0], [-15.0, -38.0], [20.0, 46.0]], [[18.0, 18.0], [3.0, -8.0], [-2.0, -14.0], [-13.0, 44.0], [20.0, 16.0]], 
+[[1.0, -50.0], [41.0, -10.0], [-2.0, 4.0], [-3.0, -66.0], [6.0, -58.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[1.0, 37.0], [13.0, -34.0], [-27.0, -45.0], [35.0, -40.0], [2.0, 65.0]], [[-1.0, 
+-13.0], [29.0, 40.0], [-3.0, 23.0], [-33.0, -17.0], [-15.0, 55.0]], [[4.0, 14.0], [-25.0, 54.0], [-34.0, -36.0], [15.0, -12.0], 
+[15.0, 16.0]], [[29.0, 58.0], [-27.0, 25.0], [-15.0, 46.0], [-4.0, -32.0], [-37.0, 21.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank4_offset1(self):
-      arg0=numpy.array([[-7.0, -2.0, 0.0], [5.0, 7.0, 1.0]])
-      arg1=Data(numpy.array([[[[1.0, 4.0, 3.0], [1.0, 2.0, -2.0]], [[6.0, -3.0, -3.0], [0.0, 6.0, -7.0]]], [[[3.0, -2.0, 2.0], 
-[2.0, -1.0, -1.0]], [[-7.0, 7.0, -7.0], [0.0, -4.0, -1.0]]], [[[-1.0, 4.0, -7.0], [7.0, 2.0, -1.0]], [[-7.0, 5.0, -4.0], [1.0, 
--5.0, 0.0]]], [[[7.0, -2.0, -7.0], [6.0, 6.0, 7.0]], [[-7.0, -7.0, 0.0], [6.0, -3.0, 0.0]]], [[[0.0, 6.0, 3.0], [2.0, -1.0, 
-0.0]], [[-7.0, -6.0, 0.0], [1.0, 0.0, 2.0]]], [[[6.0, 0.0, 4.0], [1.0, 3.0, -3.0]], [[-3.0, 2.0, -7.0], [-3.0, 5.0, 
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[2.0, 7.0, -1.0, 6.0, -4.0], [-2.0, -6.0, 0.0, 5.0, 1.0], [2.0, 5.0, 7.0, -5.0, 7.0], [-7.0, 
+0.0, -6.0, 4.0, 3.0]], [[0.0, -4.0, 3.0, 0.0, -5.0], [-2.0, -1.0, 0.0, -3.0, -1.0], [-7.0, 5.0, 3.0, 2.0, 1.0], [-3.0, 6.0, 
+3.0, 6.0, -6.0]], [[0.0, -5.0, 1.0, 1.0, 0.0], [7.0, 2.0, 4.0, 0.0, 6.0], [-6.0, 4.0, -3.0, 5.0, -4.0], [2.0, -2.0, -6.0, -1.0, 
+3.0]]], [[[-4.0, 6.0, -4.0, 7.0, 6.0], [3.0, -2.0, -3.0, 0.0, -6.0], [4.0, 0.0, 5.0, 3.0, -3.0], [-4.0, -1.0, 2.0, 2.0, 7.0]], 
+[[0.0, 1.0, -4.0, 7.0, -6.0], [6.0, 5.0, 2.0, 0.0, -1.0], [5.0, -3.0, 1.0, 5.0, 3.0], [-2.0, -4.0, -3.0, -4.0, 6.0]], [[-7.0, 
+-5.0, 1.0, 7.0, 0.0], [-7.0, 0.0, -5.0, -3.0, 5.0], [0.0, -1.0, 0.0, 0.0, -7.0], [-4.0, 6.0, 2.0, 7.0, 
 0.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-15.0, -11.0], [-36.0, -12.0]], [[-17.0, -12.0], [35.0, 8.0]], [[-1.0, -53.0], [39.0, 3.0]], 
-[[-45.0, -54.0], [63.0, -36.0]], [[-12.0, -12.0], [61.0, -7.0]], [[-42.0, -13.0], [17.0, 11.0]]], [[[36.0, 17.0], [6.0, 35.0]], 
-[[3.0, 2.0], [7.0, -29.0]], [[16.0, 48.0], [-4.0, -30.0]], [[14.0, 79.0], [-84.0, 9.0]], [[45.0, 3.0], [-77.0, 7.0]], [[34.0, 
-23.0], [-8.0, 20.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, -1.0, -7.0, 6.0, -5.0], [-2.0, 2.0, 2.0, -3.0, 7.0], [5.0, 0.0, 2.0, 0.0, 
+2.0], [-4.0, 7.0, 7.0, 0.0, 3.0]], [[1.0, -5.0, 0.0, -3.0, 4.0], [-6.0, -4.0, 0.0, 6.0, 0.0], [-2.0, 6.0, 2.0, -2.0, 0.0], 
+[1.0, 1.0, -7.0, -2.0, -2.0]], [[7.0, 3.0, -2.0, 5.0, -1.0], [-6.0, 0.0, 6.0, 4.0, 4.0], [-6.0, 0.0, 0.0, -3.0, 3.0], [-6.0, 
+-4.0, 7.0, -3.0, -3.0]]], [[[1.0, -2.0, 0.0, 2.0, -2.0], [4.0, -4.0, 3.0, 7.0, 6.0], [-6.0, 6.0, -2.0, -7.0, 2.0], [-1.0, 2.0, 
+2.0, -3.0, 5.0]], [[0.0, -7.0, -1.0, -6.0, 4.0], [-3.0, 7.0, -7.0, -5.0, 4.0], [-5.0, 7.0, -5.0, 6.0, 1.0], [-7.0, 2.0, 4.0, 
+-7.0, -5.0]], [[-7.0, 1.0, -4.0, -4.0, -3.0], [6.0, -4.0, -5.0, 3.0, -7.0], [6.0, 1.0, 0.0, 3.0, 2.0], [1.0, 7.0, -4.0, -2.0, 
+-4.0]]]]))
+      arg1=Data(numpy.array([[[-7.0, 3.0], [6.0, -1.0], [-7.0, 7.0]], [[5.0, -4.0], [-4.0, 3.0], [5.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-2.0, -3.0], [0.0, -1.0], [2.0, -4.0]], [[-1.0, 4.0], [-1.0, -2.0], [1.0, -6.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-69.0, -6.0], [-37.0, -51.0], [19.0, 9.0], [-7.0, 46.0], [52.0, -49.0]], [[-91.0, 23.0], [-8.0, 
+20.0], [-76.0, 26.0], [-68.0, 6.0], [-56.0, 87.0]], [[-14.0, -30.0], [-26.0, 25.0], [11.0, -20.0], [7.0, 21.0], [-77.0, 
+-15.0]], [[-15.0, -10.0], [91.0, -4.0], [134.0, -72.0], [76.0, 7.0], [-67.0, 26.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[6.0, 17.0], [18.0, -4.0], [7.0, 55.0], [-2.0, 9.0], [3.0, 17.0]], [[-3.0, 22.0], 
+[-11.0, -8.0], [7.0, 26.0], [15.0, 7.0], [-23.0, 21.0]], [[-5.0, -39.0], [-12.0, -2.0], [3.0, -6.0], [-2.0, -44.0], [1.0, 
+-24.0]], [[5.0, 39.0], [-19.0, -44.0], [-10.0, -18.0], [2.0, 28.0], [-16.0, 59.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank0_offset0(self):
-      arg0=numpy.array([3.0, 0.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(2.0)+(1-msk_arg1)*(0.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([6.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, 0.0])
+   def test_generalTransposedTensorProduct_taggedData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[1.0, 7.0, -3.0, -2.0, -6.0], [4.0, -5.0, -5.0, 0.0, 0.0], [-7.0, 1.0, -3.0, -2.0, 4.0], [-7.0, 
+-4.0, -4.0, 6.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -4.0, -5.0, 1.0, 4.0], [7.0, -4.0, 5.0, 6.0, 5.0], [-4.0, 5.0, 6.0, -7.0, 7.0], 
+[-3.0, 5.0, 7.0, -5.0, -2.0]]))
+      arg1=Data(numpy.array([[-3.0, 6.0, 6.0, -4.0, -3.0], [1.0, -4.0, 0.0, 0.0, 3.0], [5.0, 7.0, 3.0, 0.0, 4.0], [-2.0, 0.0, 
+0.0, 7.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 4.0, 3.0, 2.0, 3.0], [-4.0, -5.0, 5.0, -2.0, -4.0], [-7.0, 3.0, -5.0, -7.0, 
+4.0], [-1.0, 4.0, -5.0, -7.0, 0.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-3.0, 6.0, 6.0, -4.0, -3.0], [1.0, -4.0, 0.0, 0.0, 3.0], [5.0, 7.0, 3.0, 0.0, 4.0], [-2.0, 0.0, 
+0.0, 7.0, -1.0]], [[-21.0, 42.0, 42.0, -28.0, -21.0], [7.0, -28.0, 0.0, 0.0, 21.0], [35.0, 49.0, 21.0, 0.0, 28.0], [-14.0, 0.0, 
+0.0, 49.0, -7.0]], [[9.0, -18.0, -18.0, 12.0, 9.0], [-3.0, 12.0, 0.0, 0.0, -9.0], [-15.0, -21.0, -9.0, 0.0, -12.0], [6.0, 0.0, 
+0.0, -21.0, 3.0]], [[6.0, -12.0, -12.0, 8.0, 6.0], [-2.0, 8.0, 0.0, 0.0, -6.0], [-10.0, -14.0, -6.0, 0.0, -8.0], [4.0, 0.0, 
+0.0, -14.0, 2.0]], [[18.0, -36.0, -36.0, 24.0, 18.0], [-6.0, 24.0, 0.0, 0.0, -18.0], [-30.0, -42.0, -18.0, 0.0, -24.0], [12.0, 
+0.0, 0.0, -42.0, 6.0]]], [[[-12.0, 24.0, 24.0, -16.0, -12.0], [4.0, -16.0, 0.0, 0.0, 12.0], [20.0, 28.0, 12.0, 0.0, 16.0], 
+[-8.0, 0.0, 0.0, 28.0, -4.0]], [[15.0, -30.0, -30.0, 20.0, 15.0], [-5.0, 20.0, 0.0, 0.0, -15.0], [-25.0, -35.0, -15.0, 0.0, 
+-20.0], [10.0, 0.0, 0.0, -35.0, 5.0]], [[15.0, -30.0, -30.0, 20.0, 15.0], [-5.0, 20.0, 0.0, 0.0, -15.0], [-25.0, -35.0, -15.0, 
+0.0, -20.0], [10.0, 0.0, 0.0, -35.0, 5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]]], [[[21.0, -42.0, -42.0, 28.0, 21.0], [-7.0, 28.0, 0.0, 0.0, -21.0], [-35.0, -49.0, -21.0, 0.0, -28.0], [14.0, 0.0, 
+0.0, -49.0, 7.0]], [[-3.0, 6.0, 6.0, -4.0, -3.0], [1.0, -4.0, 0.0, 0.0, 3.0], [5.0, 7.0, 3.0, 0.0, 4.0], [-2.0, 0.0, 0.0, 7.0, 
+-1.0]], [[9.0, -18.0, -18.0, 12.0, 9.0], [-3.0, 12.0, 0.0, 0.0, -9.0], [-15.0, -21.0, -9.0, 0.0, -12.0], [6.0, 0.0, 0.0, -21.0, 
+3.0]], [[6.0, -12.0, -12.0, 8.0, 6.0], [-2.0, 8.0, 0.0, 0.0, -6.0], [-10.0, -14.0, -6.0, 0.0, -8.0], [4.0, 0.0, 0.0, -14.0, 
+2.0]], [[-12.0, 24.0, 24.0, -16.0, -12.0], [4.0, -16.0, 0.0, 0.0, 12.0], [20.0, 28.0, 12.0, 0.0, 16.0], [-8.0, 0.0, 0.0, 28.0, 
+-4.0]]], [[[21.0, -42.0, -42.0, 28.0, 21.0], [-7.0, 28.0, 0.0, 0.0, -21.0], [-35.0, -49.0, -21.0, 0.0, -28.0], [14.0, 0.0, 0.0, 
+-49.0, 7.0]], [[12.0, -24.0, -24.0, 16.0, 12.0], [-4.0, 16.0, 0.0, 0.0, -12.0], [-20.0, -28.0, -12.0, 0.0, -16.0], [8.0, 0.0, 
+0.0, -28.0, 4.0]], [[12.0, -24.0, -24.0, 16.0, 12.0], [-4.0, 16.0, 0.0, 0.0, -12.0], [-20.0, -28.0, -12.0, 0.0, -16.0], [8.0, 
+0.0, 0.0, -28.0, 4.0]], [[-18.0, 36.0, 36.0, -24.0, -18.0], [6.0, -24.0, 0.0, 0.0, 18.0], [30.0, 42.0, 18.0, 0.0, 24.0], 
+[-12.0, 0.0, 0.0, 42.0, -6.0]], [[-21.0, 42.0, 42.0, -28.0, -21.0], [7.0, -28.0, 0.0, 0.0, 21.0], [35.0, 49.0, 21.0, 0.0, 
+28.0], [-14.0, 0.0, 0.0, 49.0, -7.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[16.0, -16.0, -12.0, -8.0, -12.0], [16.0, 20.0, -20.0, 8.0, 16.0], [28.0, -12.0, 20.0, 28.0, 
+-16.0], [4.0, -16.0, 20.0, 28.0, 0.0]], [[20.0, -20.0, -15.0, -10.0, -15.0], [20.0, 25.0, -25.0, 10.0, 20.0], [35.0, -15.0, 
+25.0, 35.0, -20.0], [5.0, -20.0, 25.0, 35.0, 0.0]], [[-4.0, 4.0, 3.0, 2.0, 3.0], [-4.0, -5.0, 5.0, -2.0, -4.0], [-7.0, 3.0, 
+-5.0, -7.0, 4.0], [-1.0, 4.0, -5.0, -7.0, 0.0]], [[-16.0, 16.0, 12.0, 8.0, 12.0], [-16.0, -20.0, 20.0, -8.0, -16.0], [-28.0, 
+12.0, -20.0, -28.0, 16.0], [-4.0, 16.0, -20.0, -28.0, 0.0]]], [[[-28.0, 28.0, 21.0, 14.0, 21.0], [-28.0, -35.0, 35.0, -14.0, 
+-28.0], [-49.0, 21.0, -35.0, -49.0, 28.0], [-7.0, 28.0, -35.0, -49.0, 0.0]], [[16.0, -16.0, -12.0, -8.0, -12.0], [16.0, 20.0, 
+-20.0, 8.0, 16.0], [28.0, -12.0, 20.0, 28.0, -16.0], [4.0, -16.0, 20.0, 28.0, 0.0]], [[-20.0, 20.0, 15.0, 10.0, 15.0], [-20.0, 
+-25.0, 25.0, -10.0, -20.0], [-35.0, 15.0, -25.0, -35.0, 20.0], [-5.0, 20.0, -25.0, -35.0, 0.0]], [[-24.0, 24.0, 18.0, 12.0, 
+18.0], [-24.0, -30.0, 30.0, -12.0, -24.0], [-42.0, 18.0, -30.0, -42.0, 24.0], [-6.0, 24.0, -30.0, -42.0, 0.0]], [[-20.0, 20.0, 
+15.0, 10.0, 15.0], [-20.0, -25.0, 25.0, -10.0, -20.0], [-35.0, 15.0, -25.0, -35.0, 20.0], [-5.0, 20.0, -25.0, -35.0, 0.0]]], 
+[[[16.0, -16.0, -12.0, -8.0, -12.0], [16.0, 20.0, -20.0, 8.0, 16.0], [28.0, -12.0, 20.0, 28.0, -16.0], [4.0, -16.0, 20.0, 28.0, 
+0.0]], [[-20.0, 20.0, 15.0, 10.0, 15.0], [-20.0, -25.0, 25.0, -10.0, -20.0], [-35.0, 15.0, -25.0, -35.0, 20.0], [-5.0, 20.0, 
+-25.0, -35.0, 0.0]], [[-24.0, 24.0, 18.0, 12.0, 18.0], [-24.0, -30.0, 30.0, -12.0, -24.0], [-42.0, 18.0, -30.0, -42.0, 24.0], 
+[-6.0, 24.0, -30.0, -42.0, 0.0]], [[28.0, -28.0, -21.0, -14.0, -21.0], [28.0, 35.0, -35.0, 14.0, 28.0], [49.0, -21.0, 35.0, 
+49.0, -28.0], [7.0, -28.0, 35.0, 49.0, 0.0]], [[-28.0, 28.0, 21.0, 14.0, 21.0], [-28.0, -35.0, 35.0, -14.0, -28.0], [-49.0, 
+21.0, -35.0, -49.0, 28.0], [-7.0, 28.0, -35.0, -49.0, 0.0]]], [[[12.0, -12.0, -9.0, -6.0, -9.0], [12.0, 15.0, -15.0, 6.0, 
+12.0], [21.0, -9.0, 15.0, 21.0, -12.0], [3.0, -12.0, 15.0, 21.0, 0.0]], [[-20.0, 20.0, 15.0, 10.0, 15.0], [-20.0, -25.0, 25.0, 
+-10.0, -20.0], [-35.0, 15.0, -25.0, -35.0, 20.0], [-5.0, 20.0, -25.0, -35.0, 0.0]], [[-28.0, 28.0, 21.0, 14.0, 21.0], [-28.0, 
+-35.0, 35.0, -14.0, -28.0], [-49.0, 21.0, -35.0, -49.0, 28.0], [-7.0, 28.0, -35.0, -49.0, 0.0]], [[20.0, -20.0, -15.0, -10.0, 
+-15.0], [20.0, 25.0, -25.0, 10.0, 20.0], [35.0, -15.0, 25.0, 35.0, -20.0], [5.0, -20.0, 25.0, 35.0, 0.0]], [[8.0, -8.0, -6.0, 
+-4.0, -6.0], [8.0, 10.0, -10.0, 4.0, 8.0], [14.0, -6.0, 10.0, 14.0, -8.0], [2.0, -8.0, 10.0, 14.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[0.0, 5.0, 5.0], [7.0, -7.0, 6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, -2.0, -5.0])+(1.-msk_arg1)*numpy.array([-2.0, 7.0, -7.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-35.0, -58.0])+(1.-msk_ref)*numpy.array([0.0, -105.0])
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-1.0, 2.0, -6.0, 2.0, -6.0], [-2.0, -4.0, 3.0, 2.0, -5.0], [-7.0, 0.0, 7.0, 6.0, 1.0], [-1.0, 
+-4.0, 5.0, 0.0, 0.0]], [[7.0, 7.0, 1.0, 6.0, -4.0], [-1.0, -6.0, 6.0, -2.0, 0.0], [-5.0, -3.0, 1.0, -1.0, 3.0], [2.0, 4.0, 
+-1.0, 3.0, -3.0]], [[1.0, 4.0, -5.0, 3.0, 4.0], [2.0, 3.0, 7.0, 2.0, 3.0], [-5.0, -3.0, -6.0, 4.0, 1.0], [5.0, -3.0, -6.0, 0.0, 
+1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, 5.0, -2.0, -6.0, 2.0], [-2.0, 2.0, -2.0, 4.0, -5.0], [-7.0, -5.0, -1.0, -7.0, 
+-5.0], [-2.0, -6.0, 0.0, -7.0, -4.0]], [[7.0, -5.0, -5.0, -7.0, 1.0], [6.0, -1.0, 3.0, -3.0, -1.0], [-6.0, -3.0, 5.0, -7.0, 
+-3.0], [2.0, -7.0, 1.0, 7.0, 1.0]], [[0.0, -6.0, 1.0, 4.0, 4.0], [6.0, 0.0, -5.0, -6.0, 4.0], [2.0, -5.0, -1.0, 7.0, -6.0], 
+[0.0, 1.0, -3.0, 4.0, 0.0]]]))
+      arg1=Data(numpy.array([[[-3.0, 1.0, 3.0, -6.0, -6.0], [-3.0, -3.0, 3.0, 5.0, 4.0], [-1.0, -7.0, -5.0, -4.0, 2.0], [6.0, 
+4.0, -3.0, 1.0, 1.0]], [[-1.0, -2.0, 1.0, 3.0, -3.0], [0.0, -6.0, 1.0, 0.0, 3.0], [-4.0, 2.0, -2.0, -6.0, 2.0], [6.0, 7.0, 
+-1.0, 0.0, -4.0]], [[-6.0, -7.0, 4.0, 0.0, -4.0], [6.0, 3.0, 7.0, 1.0, -6.0], [-7.0, -4.0, 6.0, 3.0, 5.0], [-3.0, -7.0, 6.0, 
+1.0, 7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, -6.0, -5.0, 0.0, -7.0], [-5.0, 1.0, -2.0, -6.0, 0.0], [-4.0, 0.0, 6.0, -7.0, 
+0.0], [0.0, 4.0, 3.0, 7.0, 7.0]], [[0.0, 6.0, -4.0, 5.0, 1.0], [2.0, -1.0, 3.0, -7.0, -5.0], [-6.0, 4.0, -3.0, 0.0, -5.0], 
+[6.0, -3.0, -1.0, 5.0, 4.0]], [[3.0, 0.0, -5.0, -5.0, 6.0], [-1.0, -5.0, 0.0, 0.0, -7.0], [0.0, 2.0, 3.0, 0.0, 7.0], [-2.0, 
+4.0, 1.0, -4.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-10.0, -22.0, 8.0, 27.0, -19.0], [9.0, -36.0, 11.0, -4.0, 11.0], [-34.0, 17.0, -3.0, -35.0, 
+17.0], [33.0, 38.0, 2.0, 0.0, -22.0]], [[-37.0, -40.0, 29.0, 9.0, -49.0], [18.0, -36.0, 41.0, 14.0, 5.0], [-58.0, -16.0, 0.0, 
+-38.0, 38.0], [42.0, 29.0, 11.0, 6.0, 2.0]], [[47.0, 27.0, -37.0, 39.0, 53.0], [-12.0, -3.0, -52.0, -35.0, 9.0], [37.0, 64.0, 
+-2.0, 3.0, -35.0], [-15.0, 18.0, -13.0, -11.0, -45.0]], [[-30.0, -31.0, 24.0, 6.0, -42.0], [12.0, -33.0, 33.0, 13.0, 8.0], 
+[-47.0, -14.0, -4.0, -35.0, 31.0], [39.0, 29.0, 6.0, 5.0, -1.0]], [[-2.0, -26.0, -6.0, 24.0, 32.0], [42.0, 54.0, 6.0, -26.0, 
+-60.0], [-6.0, 18.0, 62.0, 60.0, 0.0], [-72.0, -80.0, 46.0, -2.0, 38.0]]], [[[-5.0, -14.0, 1.0, 9.0, 7.0], [18.0, 18.0, 7.0, 
+-8.0, -23.0], [-8.0, 4.0, 24.0, 20.0, 4.0], [-24.0, -29.0, 19.0, 0.0, 16.0]], [[0.0, -13.0, -6.0, 6.0, 30.0], [30.0, 57.0, 3.0, 
+-17.0, -52.0], [7.0, 4.0, 50.0, 61.0, -5.0], [-69.0, -79.0, 36.0, -1.0, 41.0]], [[-57.0, -58.0, 43.0, 0.0, -64.0], [33.0, 
+-24.0, 64.0, 22.0, -12.0], [-76.0, -37.0, 15.0, -27.0, 53.0], [33.0, 5.0, 27.0, 10.0, 28.0]], [[-16.0, -8.0, 12.0, -18.0, 
+-14.0], [6.0, 12.0, 18.0, 12.0, -10.0], [-8.0, -26.0, 6.0, 10.0, 10.0], [-6.0, -20.0, 8.0, 4.0, 24.0]], [[-3.0, -26.0, -3.0, 
+30.0, 18.0], [33.0, 24.0, 6.0, -22.0, -38.0], [-16.0, 23.0, 43.0, 29.0, 5.0], [-39.0, -41.0, 33.0, -2.0, 16.0]]], [[[56.0, 
+38.0, -46.0, 27.0, 77.0], [-9.0, 36.0, -61.0, -40.0, -13.0], [62.0, 59.0, 15.0, 43.0, -49.0], [-57.0, -28.0, -4.0, -12.0, 
+-22.0]], [[21.0, 27.0, -15.0, -9.0, 21.0], [-18.0, 9.0, -24.0, -3.0, 9.0], [33.0, 6.0, -12.0, 9.0, -21.0], [-9.0, 0.0, -15.0, 
+-3.0, -9.0]], [[14.0, 47.0, -2.0, -39.0, -21.0], [-57.0, -45.0, -20.0, 29.0, 67.0], [31.0, -23.0, -73.0, -52.0, -14.0], [66.0, 
+77.0, -58.0, 1.0, -39.0]], [[-41.0, -20.0, 33.0, -39.0, -49.0], [6.0, 0.0, 45.0, 34.0, -3.0], [-30.0, -60.0, -4.0, -6.0, 30.0], 
+[18.0, -11.0, 7.0, 10.0, 38.0]], [[-12.0, -12.0, 10.0, 3.0, -19.0], [3.0, -18.0, 13.0, 6.0, 7.0], [-20.0, -5.0, -5.0, -19.0, 
+13.0], [21.0, 18.0, 0.0, 2.0, -4.0]]], [[[-29.0, -40.0, 19.0, 12.0, -20.0], [33.0, 6.0, 34.0, 0.0, -28.0], [-42.0, -9.0, 31.0, 
+7.0, 27.0], [-9.0, -25.0, 31.0, 4.0, 26.0]], [[26.0, 9.0, -20.0, 36.0, 24.0], [-6.0, -21.0, -29.0, -23.0, 14.0], [9.0, 48.0, 
+-6.0, -17.0, -15.0], [9.0, 33.0, -10.0, -7.0, -41.0]], [[22.0, 49.0, -10.0, -33.0, -3.0], [-51.0, -27.0, -28.0, 19.0, 53.0], 
+[41.0, -13.0, -59.0, -32.0, -22.0], [42.0, 55.0, -50.0, -1.0, -33.0]], [[-3.0, -6.0, 3.0, 9.0, -9.0], [0.0, -18.0, 3.0, 0.0, 
+9.0], [-12.0, 6.0, -6.0, -18.0, 6.0], [18.0, 21.0, -3.0, 0.0, -12.0]], [[-3.0, -1.0, 1.0, -9.0, 5.0], [6.0, 21.0, 4.0, 1.0, 
+-15.0], [5.0, -10.0, 12.0, 21.0, -1.0], [-21.0, -28.0, 9.0, 1.0, 19.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-9.0, 60.0, -13.0, 35.0, 28.0], [29.0, -10.0, 27.0, -31.0, -35.0], [-30.0, 28.0, 
+-39.0, 21.0, -35.0], [42.0, -33.0, -16.0, 14.0, 7.0]], [[-3.0, -60.0, 25.0, 5.0, -76.0], [-29.0, 40.0, -25.0, 5.0, 67.0], 
+[10.0, -32.0, 27.0, -35.0, -17.0], [-18.0, 11.0, 14.0, 34.0, 15.0]], [[-3.0, -18.0, 25.0, -30.0, 15.0], [-1.0, -2.0, -11.0, 
+47.0, 18.0], [38.0, -18.0, 6.0, 14.0, 32.0], [-32.0, 11.0, 0.0, -43.0, -34.0]], [[-6.0, -6.0, 38.0, -55.0, 59.0], [12.0, -19.0, 
+-9.0, 85.0, 7.0], [66.0, -20.0, -3.0, 42.0, 63.0], [-50.0, 13.0, -7.0, -93.0, -70.0]], [[18.0, -6.0, -34.0, -15.0, 11.0], 
+[-12.0, -19.0, -1.0, -19.0, -33.0], [-14.0, 12.0, 21.0, -14.0, 23.0], [-2.0, 21.0, 9.0, 3.0, 18.0]]], [[[12.0, 48.0, -44.0, 
+0.0, 56.0], [16.0, -38.0, 22.0, -30.0, -72.0], [-28.0, 36.0, -12.0, 14.0, 12.0], [24.0, -2.0, -6.0, -8.0, 10.0]], [[6.0, -18.0, 
+-6.0, -5.0, -15.0], [-12.0, 3.0, -7.0, -5.0, 5.0], [-2.0, -4.0, 15.0, -14.0, 5.0], [-6.0, 11.0, 7.0, 9.0, 10.0]], [[-21.0, 
+30.0, 23.0, 40.0, -13.0], [21.0, 20.0, 13.0, -9.0, 20.0], [-10.0, 2.0, -36.0, 14.0, -50.0], [28.0, -37.0, -14.0, 21.0, -2.0]], 
+[[-6.0, -42.0, 22.0, 15.0, -67.0], [-20.0, 37.0, -17.0, -3.0, 57.0], [2.0, -24.0, 15.0, -28.0, -27.0], [-6.0, 1.0, 9.0, 37.0, 
+16.0]], [[-3.0, 24.0, 9.0, -25.0, 58.0], [19.0, -24.0, 7.0, 37.0, -23.0], [26.0, 4.0, -15.0, 35.0, 33.0], [-14.0, -1.0, -10.0, 
+-56.0, -39.0]]], [[[-15.0, 6.0, 49.0, -40.0, 55.0], [21.0, -11.0, -4.0, 84.0, 16.0], [64.0, -20.0, -18.0, 49.0, 44.0], [-40.0, 
+-2.0, -13.0, -87.0, -73.0]], [[-30.0, 12.0, 62.0, 10.0, 2.0], [24.0, 23.0, 1.0, 51.0, 50.0], [38.0, -22.0, -36.0, 35.0, -20.0], 
+[-8.0, -31.0, -17.0, -30.0, -47.0]], [[-6.0, 36.0, -10.0, 30.0, 6.0], [16.0, -1.0, 17.0, -29.0, -18.0], [-26.0, 18.0, -24.0, 
+7.0, -32.0], [32.0, -23.0, -9.0, 22.0, 13.0]], [[0.0, 0.0, 28.0, -70.0, 84.0], [14.0, -35.0, -7.0, 91.0, -14.0], [70.0, -14.0, 
+0.0, 49.0, 84.0], [-56.0, 21.0, -7.0, -112.0, -77.0]], [[-33.0, 12.0, 67.0, 15.0, -4.0], [25.0, 28.0, 1.0, 51.0, 57.0], [38.0, 
+-24.0, -39.0, 35.0, -27.0], [-6.0, -35.0, -18.0, -26.0, -47.0]]], [[[-6.0, 24.0, 2.0, 10.0, 16.0], [14.0, -4.0, 10.0, -2.0, 
+-10.0], [-4.0, 8.0, -18.0, 14.0, -10.0], [12.0, -14.0, -8.0, -4.0, -6.0]], [[-15.0, -6.0, 53.0, -40.0, 41.0], [15.0, -4.0, 
+-9.0, 85.0, 28.0], [66.0, -26.0, -12.0, 42.0, 42.0], [-44.0, 1.0, -10.0, -81.0, -70.0]], [[-9.0, 6.0, 11.0, 20.0, -17.0], [5.0, 
+14.0, 3.0, -7.0, 16.0], [-6.0, -2.0, -12.0, 0.0, -26.0], [12.0, -15.0, -4.0, 17.0, 4.0]], [[-9.0, 84.0, -13.0, 15.0, 80.0], 
+[45.0, -34.0, 35.0, -7.0, -63.0], [-14.0, 36.0, -51.0, 49.0, -7.0], [34.0, -33.0, -24.0, -30.0, -21.0]], [[-12.0, 30.0, 16.0, 
+5.0, 29.0], [22.0, -5.0, 11.0, 17.0, -5.0], [10.0, 4.0, -27.0, 28.0, -5.0], [6.0, -19.0, -13.0, -23.0, -24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[[-1.0, -1.0, -3.0], [5.0, -1.0, -7.0]], [[-5.0, -6.0, 4.0], [-5.0, -1.0, 0.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, -7.0, 0.0], [-5.0, 2.0, -5.0]])+(1.-msk_arg1)*numpy.array([[7.0, -1.0, 6.0], [4.0, 0.0, 
--3.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([15.0, 65.0])+(1.-msk_ref)*numpy.array([17.0, -25.0])
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, 4.0, 2.0, -1.0, -2.0], [4.0, 3.0, -1.0, -5.0, 7.0], [6.0, 3.0, -5.0, 3.0, 2.0], [7.0, 
+7.0, 5.0, -7.0, -4.0]], [[0.0, -3.0, -3.0, 7.0, -5.0], [-4.0, 4.0, -3.0, -2.0, -5.0], [6.0, -1.0, 1.0, -5.0, 2.0], [-6.0, 3.0, 
+-5.0, 5.0, -4.0]], [[-7.0, -4.0, -2.0, -3.0, 0.0], [0.0, 5.0, 6.0, 7.0, -5.0], [-1.0, 6.0, -6.0, -6.0, 0.0], [0.0, -6.0, -5.0, 
+0.0, 4.0]]], [[[4.0, 4.0, 1.0, 6.0, 2.0], [-4.0, 2.0, 7.0, 7.0, 3.0], [-5.0, -2.0, 2.0, 1.0, -1.0], [0.0, -4.0, 4.0, 2.0, 
+-2.0]], [[-4.0, 1.0, 7.0, -7.0, 0.0], [0.0, 5.0, 2.0, 1.0, 5.0], [-1.0, -1.0, -7.0, 0.0, 0.0], [5.0, 3.0, 4.0, 0.0, -1.0]], 
+[[-6.0, 2.0, 4.0, 2.0, -1.0], [5.0, 0.0, 4.0, 7.0, 1.0], [-1.0, -3.0, -5.0, -4.0, 1.0], [-3.0, 5.0, 3.0, -5.0, 
+-6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, -6.0, 6.0, 4.0, 1.0], [3.0, -1.0, 2.0, -4.0, -3.0], [2.0, -4.0, 6.0, 3.0, 
+6.0], [-2.0, 4.0, 3.0, 7.0, -5.0]], [[-7.0, -5.0, 3.0, -2.0, -6.0], [2.0, 3.0, -1.0, -5.0, 2.0], [1.0, -3.0, 0.0, 6.0, 7.0], 
+[1.0, 7.0, -7.0, 3.0, -3.0]], [[7.0, -5.0, -5.0, -6.0, 0.0], [-2.0, 2.0, 5.0, 6.0, -6.0], [1.0, -6.0, 0.0, 5.0, 7.0], [5.0, 
+2.0, -1.0, 3.0, 6.0]]], [[[7.0, -7.0, -5.0, -6.0, -7.0], [-4.0, 2.0, 7.0, 1.0, -2.0], [-3.0, -7.0, 4.0, -5.0, -1.0], [2.0, 6.0, 
+6.0, 7.0, -2.0]], [[-3.0, -4.0, -6.0, 6.0, -5.0], [2.0, -5.0, -2.0, -4.0, 2.0], [4.0, -4.0, -1.0, -1.0, -4.0], [0.0, 0.0, -6.0, 
+-6.0, -1.0]], [[-6.0, 1.0, 5.0, -1.0, 3.0], [6.0, 4.0, 1.0, -4.0, 6.0], [0.0, -4.0, -1.0, 4.0, 0.0], [-5.0, -3.0, -7.0, 6.0, 
+-6.0]]]]))
+      arg1=Data(numpy.array([[[[-3.0, 4.0, 0.0, 6.0, 7.0], [7.0, -4.0, 5.0, 2.0, -3.0], [-2.0, 3.0, 2.0, 4.0, -6.0], [-2.0, 
+-2.0, 5.0, -5.0, -1.0]], [[4.0, -2.0, 3.0, 0.0, -6.0], [-3.0, 0.0, -7.0, 2.0, 2.0], [6.0, 1.0, 2.0, 0.0, -4.0], [0.0, -1.0, 
+3.0, 5.0, 5.0]], [[5.0, -6.0, 7.0, 4.0, -1.0], [3.0, 7.0, 1.0, -2.0, 2.0], [5.0, -2.0, 0.0, 0.0, -6.0], [7.0, -7.0, -7.0, 4.0, 
+-7.0]]], [[[3.0, 1.0, -5.0, -7.0, 4.0], [-2.0, 1.0, 4.0, -4.0, -5.0], [-5.0, 0.0, 6.0, 0.0, 0.0], [-7.0, 6.0, -1.0, -6.0, 
+0.0]], [[-4.0, 5.0, -4.0, -4.0, 3.0], [-4.0, 4.0, 3.0, 3.0, 2.0], [0.0, -7.0, -3.0, -7.0, 0.0], [7.0, -6.0, -2.0, 5.0, 0.0]], 
+[[-5.0, 2.0, -6.0, 2.0, -2.0], [1.0, 6.0, 0.0, 0.0, -3.0], [6.0, 7.0, 5.0, 0.0, 2.0], [7.0, -7.0, 0.0, -1.0, 
+-3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 0.0, 3.0, -5.0, -4.0], [-1.0, 6.0, -7.0, -6.0, -2.0], [1.0, 0.0, 4.0, 4.0, 
+0.0], [-2.0, 3.0, -2.0, -4.0, -3.0]], [[2.0, -4.0, -4.0, -7.0, 4.0], [-7.0, 6.0, -3.0, 7.0, 1.0], [0.0, -4.0, 5.0, 7.0, 5.0], 
+[-5.0, -2.0, -5.0, 0.0, 0.0]], [[-1.0, 2.0, -3.0, 2.0, -4.0], [-3.0, -1.0, 0.0, 5.0, 4.0], [3.0, 7.0, -6.0, -7.0, -3.0], [-3.0, 
+7.0, 0.0, 0.0, -3.0]]], [[[-6.0, -6.0, 5.0, -6.0, -5.0], [0.0, 1.0, -3.0, 2.0, -7.0], [6.0, -6.0, -3.0, -1.0, 0.0], [6.0, -3.0, 
+-6.0, 4.0, -6.0]], [[-6.0, -5.0, 0.0, -3.0, -7.0], [-1.0, 2.0, 5.0, 2.0, -7.0], [6.0, 7.0, 2.0, 0.0, 6.0], [-7.0, -3.0, 5.0, 
+7.0, -3.0]], [[0.0, -4.0, -2.0, -7.0, 6.0], [-3.0, 6.0, -2.0, 7.0, -2.0], [0.0, 2.0, -3.0, -5.0, -6.0], [-7.0, -1.0, 3.0, 0.0, 
+0.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[26.0, 10.0, -17.0, -58.0, 16.0], [-26.0, -93.0, -8.0, -16.0, -21.0], [-89.0, -3.0, 4.0, 24.0, 
+36.0], [-145.0, 141.0, 48.0, -61.0, 68.0]], [[-46.0, 59.0, -73.0, -20.0, 65.0], [15.0, -24.0, 56.0, -3.0, -50.0], [-54.0, 24.0, 
+33.0, 9.0, 16.0], [-43.0, 27.0, 33.0, -72.0, 3.0]], [[-73.0, 70.0, -80.0, -23.0, 51.0], [-9.0, 31.0, 54.0, 19.0, -19.0], 
+[-13.0, -14.0, 3.0, -41.0, 20.0], [52.0, -51.0, 0.0, -8.0, -15.0]], [[52.0, -25.0, -14.0, -28.0, -47.0], [-19.0, -27.0, -54.0, 
+-27.0, -39.0], [11.0, 73.0, 79.0, 45.0, 0.0], [-96.0, 80.0, 45.0, -45.0, 51.0]], [[-3.0, 2.0, -19.0, -28.0, 26.0], [-4.0, 4.0, 
+33.0, -22.0, -11.0], [-42.0, -18.0, -7.0, -8.0, 30.0], [-17.0, 28.0, -27.0, -26.0, -20.0]]], [[[-65.0, 30.0, -22.0, 62.0, 
+26.0], [53.0, 10.0, 32.0, 16.0, -15.0], [18.0, 43.0, 1.0, 16.0, 2.0], [55.0, -63.0, 12.0, -21.0, -39.0]], [[18.0, 1.0, 17.0, 
+4.0, 15.0], [0.0, 45.0, 15.0, 11.0, 9.0], [33.0, -32.0, 11.0, -23.0, -64.0], [50.0, -63.0, -20.0, 38.0, -18.0]], [[14.0, -9.0, 
+-34.0, -31.0, 31.0], [2.0, 85.0, 56.0, -42.0, -34.0], [3.0, -4.0, 48.0, -18.0, -10.0], [37.0, -35.0, -67.0, -22.0, -68.0]], 
+[[24.0, -32.0, -38.0, -41.0, -13.0], [-19.0, 122.0, 27.0, -53.0, -29.0], [40.0, 11.0, 60.0, -27.0, 10.0], [66.0, -50.0, -89.0, 
+-1.0, -75.0]], [[-82.0, 98.0, -91.0, -17.0, 109.0], [24.0, -34.0, 92.0, 17.0, -49.0], [-78.0, -2.0, 12.0, -7.0, 10.0], [-28.0, 
+7.0, 42.0, -74.0, 0.0]]], [[[-5.0, 6.0, 46.0, 69.0, -14.0], [34.0, -46.0, -36.0, 43.0, 18.0], [38.0, 26.0, -8.0, 31.0, -56.0], 
+[2.0, -28.0, 62.0, 22.0, 34.0]], [[30.0, -35.0, 71.0, 54.0, 16.0], [47.0, 6.0, 17.0, -3.0, 18.0], [10.0, -18.0, -20.0, 19.0, 
+-56.0], [22.0, -32.0, -26.0, 14.0, -41.0]], [[48.0, -29.0, 9.0, -50.0, -38.0], [-37.0, -78.0, -51.0, -25.0, -4.0], [-54.0, 
+12.0, 0.0, 29.0, 52.0], [-130.0, 140.0, 32.0, -36.0, 67.0]], [[-36.0, 51.0, -38.0, -21.0, 69.0], [12.0, -77.0, 48.0, 4.0, 
+-24.0], [-95.0, -12.0, -18.0, 12.0, 30.0], [-83.0, 75.0, 41.0, -66.0, 26.0]], [[-6.0, 5.0, 5.0, 21.0, -4.0], [11.0, -3.0, -8.0, 
+12.0, 0.0], [19.0, 15.0, 7.0, 8.0, -18.0], [10.0, -19.0, 17.0, 5.0, 5.0]]], [[[-50.0, 59.0, -20.0, 16.0, 106.0], [44.0, -26.0, 
+92.0, 17.0, -14.0], [-68.0, -41.0, -28.0, -7.0, -24.0], [0.0, -17.0, 7.0, -37.0, -28.0]], [[-88.0, 79.0, -55.0, 44.0, 20.0], 
+[23.0, -32.0, 1.0, 57.0, -16.0], [24.0, 50.0, 12.0, 7.0, -8.0], [28.0, -52.0, 84.0, -10.0, 35.0]], [[-79.0, 90.0, -104.0, 
+-28.0, 92.0], [14.0, -17.0, 83.0, 6.0, -56.0], [-67.0, 13.0, 27.0, -8.0, 26.0], [-24.0, 9.0, 33.0, -77.0, -4.0]], [[72.0, 
+-46.0, 35.0, -66.0, -61.0], [-73.0, 0.0, -62.0, -12.0, 36.0], [4.0, -51.0, -17.0, -28.0, 12.0], [-35.0, 56.0, -22.0, 53.0, 
+47.0]], [[44.0, -51.0, 66.0, -2.0, -7.0], [-2.0, 2.0, 1.0, -19.0, 38.0], [-22.0, -59.0, -55.0, -9.0, 4.0], [1.0, 20.0, -56.0, 
+29.0, -26.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-45.0, 39.0, 75.0, 37.0, -134.0], [42.0, -42.0, -52.0, -90.0, -9.0], [52.0, 2.0, 
+-58.0, -47.0, -38.0], [105.0, 78.0, -54.0, -21.0, -75.0]], [[61.0, 68.0, -20.0, 102.0, 93.0], [57.0, -70.0, 56.0, -39.0, 62.0], 
+[-87.0, 1.0, -9.0, -22.0, -40.0], [31.0, -11.0, 62.0, -32.0, 87.0]], [[77.0, 18.0, -14.0, -48.0, 105.0], [-21.0, 72.0, -76.0, 
+-27.0, 38.0], [-75.0, -49.0, 57.0, 60.0, -36.0], [-35.0, 5.0, -12.0, -86.0, 45.0]], [[2.0, 6.0, 10.0, 7.0, -18.0], [25.0, 18.0, 
+28.0, -75.0, -32.0], [-14.0, 42.0, 75.0, 55.0, 50.0], [-51.0, -25.0, 65.0, 2.0, 24.0]], [[60.0, 79.0, -14.0, 73.0, 60.0], 
+[37.0, -29.0, 1.0, -51.0, 70.0], [-71.0, 37.0, -24.0, -46.0, -78.0], [0.0, 48.0, 54.0, -67.0, 54.0]]], [[[18.0, -22.0, -25.0, 
+-57.0, 46.0], [-31.0, 68.0, -17.0, 24.0, -10.0], [-15.0, 28.0, 32.0, 14.0, -8.0], [-90.0, -9.0, 36.0, -14.0, 15.0]], [[22.0, 
+-11.0, -19.0, -37.0, 57.0], [-33.0, 26.0, -41.0, 59.0, 26.0], [-13.0, -37.0, -29.0, -19.0, -45.0], [0.0, 10.0, -38.0, -23.0, 
+0.0]], [[-37.0, -22.0, 28.0, -36.0, -47.0], [-11.0, 10.0, -44.0, 23.0, -22.0], [47.0, -15.0, -55.0, -46.0, -38.0], [35.0, 27.0, 
+-48.0, 6.0, -57.0]], [[2.0, 62.0, 3.0, 101.0, -29.0], [37.0, -91.0, 28.0, -15.0, 56.0], [-4.0, 20.0, -76.0, -74.0, -43.0], 
+[77.0, 53.0, -5.0, -8.0, 0.0]], [[10.0, -42.0, -21.0, -47.0, 76.0], [-13.0, 38.0, 19.0, 44.0, -28.0], [-21.0, -12.0, 26.0, 
+16.0, 4.0], [-54.0, -61.0, 36.0, 18.0, 33.0]]], [[[-5.0, -4.0, -16.0, -9.0, -21.0], [-16.0, 22.0, 12.0, 2.0, -6.0], [11.0, 
+49.0, 24.0, 11.0, 26.0], [-58.0, 8.0, 29.0, 8.0, -3.0]], [[66.0, 78.0, -9.0, 111.0, 67.0], [59.0, -75.0, 46.0, -77.0, 66.0], 
+[-88.0, -24.0, 30.0, 32.0, 3.0], [55.0, -11.0, 33.0, -40.0, 84.0]], [[-18.0, -15.0, 40.0, -44.0, -43.0], [-2.0, 32.0, -57.0, 
+-37.0, -31.0], [24.0, -33.0, 13.0, 25.0, 0.0], [26.0, 10.0, -44.0, -15.0, -39.0]], [[43.0, 5.0, -63.0, -42.0, 48.0], [-71.0, 
+66.0, -37.0, 65.0, 54.0], [-18.0, 42.0, 13.0, 4.0, -15.0], [-102.0, 46.0, 1.0, -39.0, 9.0]], [[37.0, 12.0, -36.0, -47.0, 9.0], 
+[-72.0, 62.0, -80.0, 38.0, 58.0], [-3.0, -1.0, 12.0, 25.0, -10.0], [-46.0, 68.0, -61.0, -56.0, -21.0]]], [[[-15.0, 14.0, -5.0, 
+36.0, -48.0], [-5.0, -39.0, 15.0, 13.0, 21.0], [25.0, 9.0, -24.0, -13.0, 20.0], [31.0, 26.0, -28.0, 16.0, -21.0]], [[-24.0, 
+-48.0, 14.0, -80.0, -44.0], [-50.0, 52.0, -61.0, 26.0, -29.0], [46.0, -56.0, 30.0, 60.0, 47.0], [8.0, -3.0, -88.0, 8.0, 
+-54.0]], [[-13.0, 48.0, 84.0, 63.0, -66.0], [76.0, -71.0, -34.0, -121.0, -3.0], [0.0, -71.0, -26.0, -1.0, -26.0], [159.0, 23.0, 
+-58.0, -30.0, -24.0]], [[-3.0, -42.0, 23.0, -116.0, 15.0], [-49.0, 88.0, -121.0, 38.0, -18.0], [22.0, -63.0, -26.0, -9.0, 
+-66.0], [4.0, 27.0, -83.0, -42.0, -54.0]], [[6.0, 65.0, -19.0, 115.0, -35.0], [27.0, -94.0, 57.0, -9.0, 64.0], [-5.0, 47.0, 
+-49.0, -51.0, -3.0], [44.0, 48.0, 14.0, 5.0, 12.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank3_offset3(self):
-      arg0=numpy.array([[[[-2.0, 7.0, -1.0], [-5.0, -5.0, 7.0], [3.0, 6.0, 0.0], [-3.0, 0.0, 7.0]], [[-1.0, -6.0, -6.0], [-4.0, 
-0.0, -4.0], [-3.0, 3.0, -6.0], [-4.0, 1.0, -6.0]]], [[[0.0, 2.0, 1.0], [1.0, -2.0, -4.0], [0.0, -3.0, 0.0], [5.0, 2.0, -1.0]], 
-[[-7.0, 0.0, 6.0], [-1.0, -2.0, 3.0], [1.0, 0.0, -4.0], [0.0, -2.0, 5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, 4.0, -6.0], [-5.0, -1.0, 5.0], [4.0, -1.0, 5.0], [-2.0, 2.0, 6.0]], [[0.0, 1.0, 0.0], 
-[-2.0, 0.0, 5.0], [0.0, -7.0, -5.0], [5.0, -7.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 0.0, 4.0], [0.0, -5.0, 2.0], [5.0, 
--1.0, 2.0], [-4.0, -3.0, 6.0]], [[2.0, 0.0, -3.0], [0.0, -3.0, 1.0], [3.0, 0.0, 5.0], [7.0, -1.0, -7.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-3.0, 0.0, 3.0, -4.0, 0.0], [-5.0, -4.0, -3.0, -3.0, 5.0], [2.0, 3.0, 1.0, 1.0, -6.0], [-3.0, 
+6.0, -3.0, 4.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 6.0, -3.0, -1.0, 0.0], [5.0, -4.0, 6.0, -5.0, -4.0], [-7.0, -5.0, 4.0, 6.0, 
+6.0], [-7.0, 7.0, -5.0, 2.0, 1.0]]))
+      arg1=Data(-7.0,self.functionspace)
+      arg1.setTaggedValue(1,-2.0)
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([77.0, 51.0])+(1.-msk_ref)*numpy.array([78.0, -96.0])
+      ref=msk_ref*numpy.array([[21.0, -0.0, -21.0, 28.0, -0.0], [35.0, 28.0, 21.0, 21.0, -35.0], [-14.0, -21.0, -7.0, -7.0, 
+42.0], [21.0, -42.0, 21.0, -28.0, 42.0]])+(1.-msk_ref)*numpy.array([[2.0, -12.0, 6.0, 2.0, -0.0], [-10.0, 8.0, -12.0, 10.0, 
+8.0], [14.0, 10.0, -8.0, -12.0, -12.0], [14.0, -14.0, 10.0, -4.0, -2.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank1_offset0(self):
-      arg0=numpy.array([-3.0, 4.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 4.0])+(1.-msk_arg1)*numpy.array([0.0, -6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[4.0, -3.0, -5.0, 3.0, 5.0], [3.0, 6.0, 0.0, 7.0, 2.0], [0.0, 6.0, -3.0, 0.0, -4.0], [5.0, 7.0, 
+0.0, -5.0, -5.0]], [[1.0, 0.0, 0.0, 1.0, 6.0], [-3.0, 4.0, 1.0, 7.0, -2.0], [2.0, -6.0, -7.0, 7.0, 4.0], [4.0, 0.0, 4.0, 4.0, 
+-6.0]], [[-6.0, 1.0, -2.0, 4.0, -2.0], [-2.0, 6.0, 6.0, 5.0, 5.0], [5.0, -4.0, -1.0, 1.0, 6.0], [5.0, -7.0, -6.0, 3.0, 
+1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, -2.0, 4.0, -6.0, 2.0], [1.0, 3.0, 7.0, 4.0, -5.0], [2.0, -5.0, 0.0, -3.0, 0.0], 
+[5.0, 1.0, 0.0, 0.0, 6.0]], [[4.0, 7.0, 0.0, 3.0, -1.0], [-7.0, 2.0, -5.0, -6.0, 5.0], [6.0, 7.0, 6.0, 3.0, 1.0], [-7.0, 4.0, 
+6.0, -1.0, -4.0]], [[-7.0, -5.0, 6.0, 5.0, -3.0], [-5.0, 1.0, 6.0, 5.0, -4.0], [-5.0, 2.0, 6.0, 5.0, 1.0], [-7.0, 1.0, 6.0, 
+-2.0, 4.0]]]))
+      arg1=Data(numpy.array([-7.0, -3.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, 3.0, 3.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, -12.0], [0.0, 16.0]])+(1.-msk_ref)*numpy.array([[0.0, 18.0], [0.0, -24.0]])
+      ref=msk_ref*numpy.array([[-7.0, 17.0, 43.0, -40.0, -45.0], [-4.0, -78.0, -27.0, -90.0, -28.0], [-26.0, -8.0, 46.0, -25.0, 
+-8.0], [-67.0, -21.0, 12.0, 11.0, 49.0]])+(1.-msk_ref)*numpy.array([[11.0, -4.0, 38.0, -6.0, -2.0], [-31.0, 24.0, 38.0, 17.0, 
+-22.0], [13.0, 2.0, 36.0, 9.0, 6.0], [-17.0, 20.0, 36.0, -9.0, 30.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[-5.0, -1.0, -1.0], [-5.0, 4.0, 4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, 2.0, 6.0], [-6.0, -3.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-2.0, 3.0, -1.0], [6.0, 
--6.0, -3.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-5.0, -4.0, 6.0, -3.0, 0.0], [-3.0, -2.0, -1.0, -5.0, 2.0], [3.0, -3.0, -1.0, 3.0, -1.0], [4.0, 
+-6.0, 2.0, -2.0, 5.0]], [[-4.0, 5.0, 4.0, -5.0, -6.0], [-5.0, 2.0, -2.0, 5.0, -3.0], [7.0, 0.0, -3.0, -1.0, 0.0], [0.0, -5.0, 
+-7.0, -2.0, 5.0]], [[5.0, -2.0, -7.0, 4.0, 0.0], [-2.0, -7.0, 0.0, 6.0, -2.0], [-1.0, 4.0, -5.0, 0.0, 0.0], [6.0, -7.0, -2.0, 
+-5.0, -7.0]]], [[[3.0, 4.0, 0.0, -1.0, 5.0], [2.0, 3.0, -1.0, -3.0, 4.0], [0.0, -7.0, -2.0, -2.0, 3.0], [-5.0, 3.0, 2.0, 5.0, 
+-3.0]], [[2.0, -5.0, -4.0, -1.0, -3.0], [-2.0, 5.0, -4.0, -1.0, 3.0], [-3.0, 5.0, -2.0, -7.0, -4.0], [-5.0, -4.0, 0.0, -5.0, 
+-2.0]], [[6.0, 3.0, -2.0, 0.0, -5.0], [-7.0, -2.0, 2.0, 4.0, 3.0], [-7.0, -1.0, 4.0, 4.0, 0.0], [-3.0, 1.0, -6.0, 0.0, 
+7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, -2.0, 3.0, -1.0, 6.0], [3.0, 4.0, 2.0, -2.0, 7.0], [-3.0, 0.0, 5.0, 5.0, 
+-3.0], [0.0, 4.0, -7.0, -7.0, 6.0]], [[-7.0, 7.0, 6.0, 7.0, 0.0], [7.0, -3.0, 7.0, 2.0, -2.0], [0.0, -3.0, 4.0, 7.0, -1.0], 
+[4.0, 2.0, 0.0, 7.0, 0.0]], [[5.0, 2.0, 4.0, 3.0, -7.0], [4.0, -6.0, 0.0, -1.0, 4.0], [6.0, 0.0, 2.0, -2.0, -7.0], [2.0, 5.0, 
+0.0, -4.0, 0.0]]], [[[0.0, 0.0, -1.0, 0.0, -6.0], [-4.0, 4.0, 1.0, 0.0, 1.0], [-4.0, 1.0, 3.0, 0.0, 3.0], [6.0, -1.0, -2.0, 
+6.0, -1.0]], [[-6.0, 0.0, 6.0, 1.0, 7.0], [-3.0, -1.0, 1.0, -6.0, -1.0], [-5.0, 3.0, 2.0, -4.0, 3.0], [4.0, -3.0, 4.0, -5.0, 
+1.0]], [[0.0, -5.0, 1.0, 6.0, -3.0], [1.0, 1.0, -5.0, -6.0, -6.0], [0.0, 5.0, 1.0, 1.0, 6.0], [-5.0, -5.0, -7.0, 0.0, -3.0]]]]))
+      arg1=Data(numpy.array([[-6.0, -6.0, 6.0], [0.0, 0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, -7.0, -4.0], [-5.0, -2.0, 5.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-33.0, 34.0], [7.0, 14.0]])+(1.-msk_ref)*numpy.array([[8.0, -21.0], [18.0, -66.0]])
+      ref=msk_ref*numpy.array([[84.0, -18.0, -102.0, 72.0, 36.0], [36.0, -42.0, 18.0, 36.0, -6.0], [-66.0, 42.0, -6.0, -12.0, 
+6.0], [12.0, 24.0, 18.0, -6.0, -102.0]])+(1.-msk_ref)*numpy.array([[50.0, -88.0, -51.0, -36.0, 47.0], [-25.0, 44.0, -75.0, 
+-34.0, -14.0], [-3.0, 35.0, -35.0, -13.0, 35.0], [-99.0, -36.0, -54.0, -74.0, 6.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[[-5.0, -2.0, -2.0], [0.0, -1.0, 0.0]], [[6.0, -7.0, -5.0], [2.0, 4.0, 6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -1.0, -6.0], [-1.0, 1.0, 3.0]], [[-2.0, 6.0, 2.0], [6.0, 0.0, 
--3.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 3.0, 3.0], [-2.0, -4.0, 6.0]], [[1.0, 7.0, -6.0], [3.0, -7.0, 3.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-4.0, -1.0, 1.0, 0.0, 5.0], [-4.0, 5.0, -6.0, -7.0, 0.0], [-3.0, -1.0, -1.0, -1.0, 2.0], [1.0, 
+-5.0, -7.0, -1.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, -7.0, 0.0, 0.0, -1.0], [0.0, -7.0, 7.0, -4.0, 0.0], [-3.0, -7.0, -4.0, -6.0, 
+-5.0], [5.0, -4.0, -6.0, -2.0, 4.0]]))
+      arg1=Data(numpy.array([5.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, -4.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[13.0, -6.0], [57.0, -70.0]])+(1.-msk_ref)*numpy.array([[-43.0, 0.0], [22.0, -17.0]])
+      ref=msk_ref*numpy.array([[[-20.0, -8.0], [-5.0, -2.0], [5.0, 2.0], [0.0, 0.0], [25.0, 10.0]], [[-20.0, -8.0], [25.0, 
+10.0], [-30.0, -12.0], [-35.0, -14.0], [0.0, 0.0]], [[-15.0, -6.0], [-5.0, -2.0], [-5.0, -2.0], [-5.0, -2.0], [10.0, 4.0]], 
+[[5.0, 2.0], [-25.0, -10.0], [-35.0, -14.0], [-5.0, -2.0], [0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[24.0, 16.0], [42.0, 28.0], 
+[0.0, 0.0], [0.0, 0.0], [6.0, 4.0]], [[0.0, 0.0], [42.0, 28.0], [-42.0, -28.0], [24.0, 16.0], [0.0, 0.0]], [[18.0, 12.0], 
+[42.0, 28.0], [24.0, 16.0], [36.0, 24.0], [30.0, 20.0]], [[-30.0, -20.0], [24.0, 16.0], [36.0, 24.0], [12.0, 8.0], [-24.0, 
+-16.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank4_offset3(self):
-      arg0=numpy.array([[[[4.0, -2.0, 7.0], [4.0, 4.0, -2.0], [3.0, -1.0, 7.0], [6.0, -2.0, 0.0]], [[-7.0, 4.0, 6.0], [1.0, 
-5.0, 0.0], [-4.0, -4.0, -2.0], [2.0, -3.0, -1.0]]], [[[5.0, -6.0, 5.0], [0.0, 6.0, 0.0], [-2.0, -1.0, -3.0], [2.0, -4.0, 
--1.0]], [[2.0, -2.0, 3.0], [2.0, -5.0, -2.0], [0.0, -7.0, -5.0], [0.0, -6.0, 3.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[5.0, 6.0, -2.0], [-6.0, -5.0, -4.0], [-2.0, -6.0, 1.0], [-3.0, 0.0, -7.0]], [[-7.0, -6.0, 
--5.0], [1.0, 7.0, -4.0], [6.0, -5.0, 0.0], [2.0, -6.0, 2.0]]], [[[5.0, 0.0, -3.0], [4.0, 7.0, -3.0], [1.0, 1.0, 1.0], [2.0, 
-2.0, 0.0]], [[-7.0, -3.0, 1.0], [0.0, -5.0, 2.0], [2.0, -6.0, -1.0], [3.0, -2.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 
--3.0, -5.0], [1.0, -5.0, -4.0], [0.0, 1.0, 6.0], [0.0, -2.0, 3.0]], [[-2.0, -6.0, -7.0], [0.0, -2.0, -3.0], [5.0, -4.0, 5.0], 
-[0.0, -7.0, 5.0]]], [[[2.0, 3.0, -2.0], [1.0, 4.0, -1.0], [3.0, 5.0, 7.0], [6.0, 2.0, 4.0]], [[-5.0, 2.0, -2.0], [1.0, -3.0, 
--5.0], [7.0, 3.0, -3.0], [4.0, 2.0, 4.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, -1.0, 6.0, -7.0, -6.0], [7.0, 0.0, 2.0, 0.0, -7.0], [-1.0, -2.0, -5.0, -1.0, 7.0], [-5.0, 
+-3.0, -5.0, -3.0, -2.0]], [[4.0, -4.0, 4.0, -3.0, -4.0], [1.0, -5.0, 2.0, -4.0, -3.0], [-2.0, -6.0, 5.0, -4.0, 3.0], [0.0, 
+-2.0, 0.0, 6.0, 0.0]], [[4.0, -7.0, 2.0, 0.0, -3.0], [3.0, -4.0, 1.0, -1.0, 1.0], [-6.0, -6.0, -2.0, 0.0, 7.0], [2.0, -5.0, 
+4.0, 2.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, 0.0, -6.0, 3.0, -5.0], [0.0, 0.0, -2.0, -2.0, 6.0], [6.0, -1.0, 7.0, 5.0, 
+-5.0], [-1.0, -7.0, -1.0, 4.0, 4.0]], [[-5.0, -3.0, -4.0, 3.0, 0.0], [-5.0, -4.0, -5.0, 7.0, 1.0], [-3.0, -1.0, 7.0, 5.0, 7.0], 
+[3.0, 7.0, 4.0, -3.0, 6.0]], [[5.0, -2.0, 3.0, 7.0, 0.0], [6.0, -6.0, 2.0, 4.0, -4.0], [3.0, -3.0, -5.0, 0.0, -3.0], [2.0, 
+-4.0, -5.0, -6.0, 7.0]]]))
+      arg1=Data(numpy.array([[0.0, 1.0], [1.0, -1.0], [-4.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, 6.0], [-5.0, 6.0], [7.0, 0.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-6.0, 110.0], [-8.0, 129.0]])+(1.-msk_ref)*numpy.array([[-40.0, 76.0], [27.0, -25.0]])
+      ref=msk_ref*numpy.array([[[-12.0, -8.0], [24.0, 10.0], [-4.0, 0.0], [-3.0, -4.0], [8.0, 1.0]], [[-11.0, 3.0], [11.0, 
+9.0], [-2.0, -1.0], [0.0, 5.0], [-7.0, -5.0]], [[22.0, 7.0], [18.0, 10.0], [13.0, -8.0], [-4.0, 3.0], [-25.0, -3.0]], [[-8.0, 
+-7.0], [18.0, 4.0], [-16.0, -9.0], [-2.0, -11.0], [8.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[75.0, -60.0], [1.0, -18.0], [59.0, 
+-60.0], [25.0, 36.0], [15.0, -30.0]], [[67.0, -30.0], [-22.0, -24.0], [45.0, -42.0], [-1.0, 30.0], [-51.0, 42.0]], [[18.0, 
+18.0], [-13.0, -12.0], [-91.0, 84.0], [-40.0, 60.0], [-41.0, 12.0]], [[2.0, 12.0], [-42.0, 0.0], [-52.0, 18.0], [-39.0, 6.0], 
+[7.0, 60.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank2_offset0(self):
-      arg0=numpy.array([6.0, 3.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, -4.0, -6.0, -6.0, -2.0], [-1.0, 3.0, 7.0, 6.0, 1.0], [5.0, 2.0, 5.0, 3.0, 4.0], [4.0, 
--7.0, -3.0, 0.0, 3.0]])+(1.-msk_arg1)*numpy.array([[1.0, -1.0, 5.0, -2.0, 1.0], [6.0, -2.0, 0.0, -3.0, 4.0], [0.0, -7.0, 2.0, 
--3.0, 3.0], [-5.0, -5.0, -2.0, -2.0, -2.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[6.0, -7.0, 2.0, -2.0, -7.0], [-2.0, -6.0, 6.0, -6.0, 4.0], [-3.0, -1.0, 4.0, 0.0, 3.0], [-3.0, 
+2.0, -6.0, 5.0, -1.0]], [[3.0, -5.0, -2.0, 2.0, 3.0], [7.0, 5.0, -7.0, 6.0, 4.0], [-2.0, -6.0, -6.0, 6.0, 1.0], [3.0, 0.0, 2.0, 
+3.0, -4.0]], [[7.0, 0.0, 0.0, 6.0, 7.0], [6.0, -5.0, 4.0, -6.0, -2.0], [2.0, 0.0, 6.0, -2.0, 5.0], [-4.0, -3.0, -6.0, -6.0, 
+0.0]]], [[[5.0, 6.0, 4.0, 0.0, 1.0], [2.0, 0.0, 4.0, 1.0, -1.0], [0.0, -3.0, -3.0, 5.0, -5.0], [5.0, -5.0, -1.0, -7.0, -4.0]], 
+[[6.0, -7.0, 0.0, 4.0, 1.0], [5.0, -2.0, 4.0, -4.0, -5.0], [-5.0, -1.0, 1.0, 0.0, 0.0], [-6.0, 0.0, -1.0, -3.0, -2.0]], [[4.0, 
+0.0, 4.0, 6.0, -5.0], [-4.0, -6.0, 3.0, 7.0, 7.0], [-1.0, 0.0, 0.0, 0.0, -5.0], [4.0, -3.0, 0.0, 3.0, 
+7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, 3.0, 7.0, -5.0, 7.0], [-2.0, -1.0, 7.0, 5.0, 2.0], [-6.0, -1.0, -5.0, 0.0, 
+4.0], [6.0, 2.0, 1.0, 7.0, -1.0]], [[-7.0, 5.0, 1.0, -5.0, -3.0], [4.0, -7.0, -2.0, 0.0, -2.0], [0.0, 1.0, 7.0, -5.0, -2.0], 
+[-4.0, 3.0, -1.0, 5.0, 0.0]], [[1.0, -2.0, 7.0, -7.0, 7.0], [3.0, -3.0, -3.0, 1.0, -3.0], [-4.0, -5.0, 0.0, -1.0, -7.0], [2.0, 
+1.0, -1.0, 6.0, 1.0]]], [[[-3.0, -5.0, 6.0, 2.0, -3.0], [-2.0, -5.0, 5.0, 0.0, -7.0], [4.0, 0.0, 3.0, 4.0, 0.0], [-4.0, 2.0, 
+1.0, -6.0, -6.0]], [[2.0, -5.0, 7.0, 6.0, 1.0], [-3.0, -1.0, -3.0, -1.0, -7.0], [2.0, 6.0, 4.0, 4.0, -1.0], [-7.0, 0.0, -6.0, 
+-4.0, -5.0]], [[1.0, 2.0, -6.0, -6.0, -1.0], [5.0, -2.0, 0.0, -1.0, -1.0], [7.0, -6.0, 7.0, 0.0, -1.0], [4.0, 3.0, 1.0, 6.0, 
+-2.0]]]]))
+      arg1=Data(numpy.array([[[-4.0, -3.0], [-7.0, 1.0], [-1.0, 0.0]], [[0.0, 0.0], [2.0, 1.0], [6.0, 
+-3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 3.0], [6.0, 1.0], [2.0, -6.0]], [[-1.0, -4.0], [-2.0, 3.0], [-5.0, -3.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-12.0, -24.0, -36.0, -36.0, -12.0], [-6.0, 18.0, 42.0, 36.0, 6.0], [30.0, 12.0, 30.0, 18.0, 
-24.0], [24.0, -42.0, -18.0, 0.0, 18.0]], [[-6.0, -12.0, -18.0, -18.0, -6.0], [-3.0, 9.0, 21.0, 18.0, 3.0], [15.0, 6.0, 15.0, 
-9.0, 12.0], [12.0, -21.0, -9.0, 0.0, 9.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -6.0, 30.0, -12.0, 6.0], [36.0, -12.0, 0.0, 
--18.0, 24.0], [0.0, -42.0, 12.0, -18.0, 18.0], [-30.0, -30.0, -12.0, -12.0, -12.0]], [[3.0, -3.0, 15.0, -6.0, 3.0], [18.0, 
--6.0, 0.0, -9.0, 12.0], [0.0, -21.0, 6.0, -9.0, 9.0], [-15.0, -15.0, -6.0, -6.0, -6.0]]])
+      ref=msk_ref*numpy.array([[[-16.0, -21.0], [49.0, 9.0], [30.0, -20.0], [32.0, -6.0], [-28.0, 40.0]], [[-61.0, 30.0], 
+[-46.0, 39.0], [47.0, -30.0], [22.0, -1.0], [-10.0, -34.0]], [[8.0, 5.0], [44.0, -4.0], [22.0, -17.0], [-40.0, 6.0], [-54.0, 
+7.0]], [[7.0, -6.0], [-23.0, 3.0], [14.0, 19.0], [-23.0, -24.0], [70.0, -24.0]]])+(1.-msk_ref)*numpy.array([[[-48.0, -4.0], 
+[34.0, 25.0], [37.0, -5.0], [-33.0, 50.0], [9.0, -6.0]], [[11.0, -36.0], [-32.0, 31.0], [-10.0, 8.0], [14.0, 9.0], [10.0, 
+32.0]], [[-57.0, -25.0], [13.0, 64.0], [-9.0, -29.0], [-44.0, -3.0], [-15.0, 52.0]], [[-16.0, -15.0], [5.0, -14.0], [-1.0, 
+-17.0], [33.0, -16.0], [27.0, 6.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank3_offset1(self):
-      arg0=numpy.array([[3.0, -4.0, 4.0], [6.0, -7.0, 6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-3.0, 2.0, -4.0], [-7.0, 3.0, 0.0], [-3.0, 1.0, -3.0], [0.0, -5.0, -1.0], [3.0, 7.0, -7.0]], 
-[[-2.0, 1.0, 1.0], [-4.0, -1.0, -1.0], [-7.0, -6.0, 5.0], [4.0, 3.0, 7.0], [7.0, -1.0, -7.0]], [[7.0, 4.0, -1.0], [7.0, -7.0, 
--3.0], [4.0, 5.0, 1.0], [-3.0, -4.0, 0.0], [3.0, -3.0, 4.0]], [[2.0, 3.0, -7.0], [0.0, 5.0, 1.0], [0.0, -5.0, 7.0], [7.0, -5.0, 
-3.0], [1.0, -7.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -2.0, 3.0], [-1.0, -5.0, 0.0], [-3.0, 1.0, -5.0], [7.0, -5.0, 
--3.0], [4.0, 2.0, 0.0]], [[6.0, -3.0, 1.0], [5.0, 1.0, -3.0], [5.0, -7.0, 6.0], [-2.0, -6.0, 7.0], [4.0, -6.0, -7.0]], [[-6.0, 
-3.0, -5.0], [3.0, 0.0, 4.0], [-7.0, 1.0, -7.0], [-3.0, -1.0, 6.0], [-3.0, -2.0, 4.0]], [[-3.0, -4.0, -4.0], [-3.0, 5.0, -3.0], 
-[-2.0, -1.0, -3.0], [-4.0, -4.0, 6.0], [4.0, -2.0, 2.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_taggedData_rank2_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[0.0, -4.0, -4.0, 1.0, -2.0], [6.0, -4.0, -1.0, 6.0, 0.0], [0.0, 3.0, 2.0, -2.0, 3.0], [0.0, -5.0, 
+4.0, -3.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, -4.0, 0.0, 4.0, -5.0], [4.0, 6.0, 6.0, -4.0, 4.0], [3.0, 5.0, 0.0, -3.0, 0.0], 
+[1.0, -3.0, 5.0, 7.0, 6.0]]))
+      arg1=Data(numpy.array([[-3.0, -5.0, 0.0, -6.0, -1.0], [7.0, 4.0, -2.0, 0.0, 5.0], [-2.0, 0.0, -3.0, 1.0, 0.0], [0.0, 
+-7.0, 2.0, 4.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -5.0, -3.0, 2.0, -1.0], [-4.0, 0.0, -5.0, 7.0, -7.0], [4.0, -7.0, -5.0, 0.0, 
+-5.0], [-7.0, -6.0, 2.0, -4.0, -1.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-33.0, -33.0, -25.0, 16.0, -47.0], [-6.0, -12.0, 23.0, 28.0, -3.0], [1.0, 37.0, -4.0, 7.0, 
-37.0], [-34.0, -16.0, 48.0, 53.0, 19.0]], [[-56.0, -63.0, -43.0, 29.0, -73.0], [-13.0, -23.0, 30.0, 45.0, 7.0], [8.0, 73.0, 
--5.0, 10.0, 63.0], [-51.0, -29.0, 77.0, 95.0, 37.0]]])+(1.-msk_ref)*numpy.array([[[5.0, 17.0, -33.0, 29.0, 4.0], [34.0, -1.0, 
-67.0, 46.0, 8.0], [-50.0, 25.0, -53.0, 19.0, 15.0], [-9.0, -41.0, -14.0, 28.0, 28.0]], [[2.0, 29.0, -55.0, 59.0, 10.0], [63.0, 
-5.0, 115.0, 72.0, 24.0], [-87.0, 42.0, -91.0, 25.0, 20.0], [-14.0, -71.0, -23.0, 40.0, 50.0]]])
+      ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[12.0, 20.0, 0.0, 24.0, 4.0], [-28.0, -16.0, 8.0, 0.0, -20.0], [8.0, 0.0, 12.0, -4.0, 0.0], [0.0, 28.0, -8.0, 
+-16.0, 0.0]], [[12.0, 20.0, 0.0, 24.0, 4.0], [-28.0, -16.0, 8.0, 0.0, -20.0], [8.0, 0.0, 12.0, -4.0, 0.0], [0.0, 28.0, -8.0, 
+-16.0, 0.0]], [[-3.0, -5.0, 0.0, -6.0, -1.0], [7.0, 4.0, -2.0, 0.0, 5.0], [-2.0, 0.0, -3.0, 1.0, 0.0], [0.0, -7.0, 2.0, 4.0, 
+0.0]], [[6.0, 10.0, 0.0, 12.0, 2.0], [-14.0, -8.0, 4.0, 0.0, -10.0], [4.0, 0.0, 6.0, -2.0, 0.0], [0.0, 14.0, -4.0, -8.0, 
+0.0]]], [[[-18.0, -30.0, 0.0, -36.0, -6.0], [42.0, 24.0, -12.0, 0.0, 30.0], [-12.0, 0.0, -18.0, 6.0, 0.0], [0.0, -42.0, 12.0, 
+24.0, 0.0]], [[12.0, 20.0, 0.0, 24.0, 4.0], [-28.0, -16.0, 8.0, 0.0, -20.0], [8.0, 0.0, 12.0, -4.0, 0.0], [0.0, 28.0, -8.0, 
+-16.0, 0.0]], [[3.0, 5.0, 0.0, 6.0, 1.0], [-7.0, -4.0, 2.0, 0.0, -5.0], [2.0, 0.0, 3.0, -1.0, 0.0], [0.0, 7.0, -2.0, -4.0, 
+0.0]], [[-18.0, -30.0, 0.0, -36.0, -6.0], [42.0, 24.0, -12.0, 0.0, 30.0], [-12.0, 0.0, -18.0, 6.0, 0.0], [0.0, -42.0, 12.0, 
+24.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
+[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-9.0, -15.0, 
+0.0, -18.0, -3.0], [21.0, 12.0, -6.0, 0.0, 15.0], [-6.0, 0.0, -9.0, 3.0, 0.0], [0.0, -21.0, 6.0, 12.0, 0.0]], [[-6.0, -10.0, 
+0.0, -12.0, -2.0], [14.0, 8.0, -4.0, 0.0, 10.0], [-4.0, 0.0, -6.0, 2.0, 0.0], [0.0, -14.0, 4.0, 8.0, 0.0]], [[6.0, 10.0, 0.0, 
+12.0, 2.0], [-14.0, -8.0, 4.0, 0.0, -10.0], [4.0, 0.0, 6.0, -2.0, 0.0], [0.0, 14.0, -4.0, -8.0, 0.0]], [[-9.0, -15.0, 0.0, 
+-18.0, -3.0], [21.0, 12.0, -6.0, 0.0, 15.0], [-6.0, 0.0, -9.0, 3.0, 0.0], [0.0, -21.0, 6.0, 12.0, 0.0]]], [[[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[15.0, 25.0, 0.0, 30.0, 5.0], 
+[-35.0, -20.0, 10.0, 0.0, -25.0], [10.0, 0.0, 15.0, -5.0, 0.0], [0.0, 35.0, -10.0, -20.0, 0.0]], [[-12.0, -20.0, 0.0, -24.0, 
+-4.0], [28.0, 16.0, -8.0, 0.0, 20.0], [-8.0, 0.0, -12.0, 4.0, 0.0], [0.0, -28.0, 8.0, 16.0, 0.0]], [[9.0, 15.0, 0.0, 18.0, 
+3.0], [-21.0, -12.0, 6.0, 0.0, -15.0], [6.0, 0.0, 9.0, -3.0, 0.0], [0.0, 21.0, -6.0, -12.0, 0.0]], [[9.0, 15.0, 0.0, 18.0, 
+3.0], [-21.0, -12.0, 6.0, 0.0, -15.0], [6.0, 0.0, 9.0, -3.0, 0.0], [0.0, 21.0, -6.0, -12.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -10.0, -6.0, 4.0, -2.0], [-8.0, 0.0, -10.0, 14.0, -14.0], [8.0, -14.0, -10.0, 0.0, 
+-10.0], [-14.0, -12.0, 4.0, -8.0, -2.0]], [[12.0, 20.0, 12.0, -8.0, 4.0], [16.0, 0.0, 20.0, -28.0, 28.0], [-16.0, 28.0, 20.0, 
+0.0, 20.0], [28.0, 24.0, -8.0, 16.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, -20.0, -12.0, 8.0, -4.0], [-16.0, 0.0, -20.0, 28.0, -28.0], [16.0, -28.0, -20.0, 0.0, 
+-20.0], [-28.0, -24.0, 8.0, -16.0, -4.0]], [[15.0, 25.0, 15.0, -10.0, 5.0], [20.0, 0.0, 25.0, -35.0, 35.0], [-20.0, 35.0, 25.0, 
+0.0, 25.0], [35.0, 30.0, -10.0, 20.0, 5.0]]], [[[-12.0, -20.0, -12.0, 8.0, -4.0], [-16.0, 0.0, -20.0, 28.0, -28.0], [16.0, 
+-28.0, -20.0, 0.0, -20.0], [-28.0, -24.0, 8.0, -16.0, -4.0]], [[-18.0, -30.0, -18.0, 12.0, -6.0], [-24.0, 0.0, -30.0, 42.0, 
+-42.0], [24.0, -42.0, -30.0, 0.0, -30.0], [-42.0, -36.0, 12.0, -24.0, -6.0]], [[-18.0, -30.0, -18.0, 12.0, -6.0], [-24.0, 0.0, 
+-30.0, 42.0, -42.0], [24.0, -42.0, -30.0, 0.0, -30.0], [-42.0, -36.0, 12.0, -24.0, -6.0]], [[12.0, 20.0, 12.0, -8.0, 4.0], 
+[16.0, 0.0, 20.0, -28.0, 28.0], [-16.0, 28.0, 20.0, 0.0, 20.0], [28.0, 24.0, -8.0, 16.0, 4.0]], [[-12.0, -20.0, -12.0, 8.0, 
+-4.0], [-16.0, 0.0, -20.0, 28.0, -28.0], [16.0, -28.0, -20.0, 0.0, -20.0], [-28.0, -24.0, 8.0, -16.0, -4.0]]], [[[-9.0, -15.0, 
+-9.0, 6.0, -3.0], [-12.0, 0.0, -15.0, 21.0, -21.0], [12.0, -21.0, -15.0, 0.0, -15.0], [-21.0, -18.0, 6.0, -12.0, -3.0]], 
+[[-15.0, -25.0, -15.0, 10.0, -5.0], [-20.0, 0.0, -25.0, 35.0, -35.0], [20.0, -35.0, -25.0, 0.0, -25.0], [-35.0, -30.0, 10.0, 
+-20.0, -5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
+[[9.0, 15.0, 9.0, -6.0, 3.0], [12.0, 0.0, 15.0, -21.0, 21.0], [-12.0, 21.0, 15.0, 0.0, 15.0], [21.0, 18.0, -6.0, 12.0, 3.0]], 
+[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-3.0, -5.0, 
+-3.0, 2.0, -1.0], [-4.0, 0.0, -5.0, 7.0, -7.0], [4.0, -7.0, -5.0, 0.0, -5.0], [-7.0, -6.0, 2.0, -4.0, -1.0]], [[9.0, 15.0, 9.0, 
+-6.0, 3.0], [12.0, 0.0, 15.0, -21.0, 21.0], [-12.0, 21.0, 15.0, 0.0, 15.0], [21.0, 18.0, -6.0, 12.0, 3.0]], [[-15.0, -25.0, 
+-15.0, 10.0, -5.0], [-20.0, 0.0, -25.0, 35.0, -35.0], [20.0, -35.0, -25.0, 0.0, -25.0], [-35.0, -30.0, 10.0, -20.0, -5.0]], 
+[[-21.0, -35.0, -21.0, 14.0, -7.0], [-28.0, 0.0, -35.0, 49.0, -49.0], [28.0, -49.0, -35.0, 0.0, -35.0], [-49.0, -42.0, 14.0, 
+-28.0, -7.0]], [[-18.0, -30.0, -18.0, 12.0, -6.0], [-24.0, 0.0, -30.0, 42.0, -42.0], [24.0, -42.0, -30.0, 0.0, -30.0], [-42.0, 
+-36.0, 12.0, -24.0, -6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[[-7.0, 0.0, 0.0], [-3.0, 0.0, 7.0]], [[-3.0, 7.0, 2.0], [4.0, 1.0, -2.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, -2.0, 2.0], [-6.0, 2.0, 5.0]], [[3.0, -3.0, -7.0], [-3.0, 3.0, 4.0]], [[-4.0, -4.0, 
--4.0], [1.0, -7.0, -5.0]], [[0.0, -2.0, 4.0], [7.0, -7.0, 1.0]], [[0.0, 6.0, 3.0], [-4.0, -5.0, 7.0]]], [[[7.0, -4.0, -2.0], 
-[-7.0, 0.0, -4.0]], [[-2.0, -5.0, -1.0], [0.0, -3.0, -4.0]], [[-4.0, -7.0, -1.0], [-3.0, 6.0, -4.0]], [[1.0, -4.0, 6.0], [3.0, 
-1.0, 1.0]], [[-5.0, -4.0, 7.0], [2.0, -6.0, -3.0]]], [[[6.0, 1.0, -7.0], [-4.0, -2.0, 4.0]], [[1.0, 0.0, 2.0], [2.0, -5.0, 
--7.0]], [[6.0, 4.0, 5.0], [7.0, 0.0, -4.0]], [[7.0, -2.0, -7.0], [-1.0, 0.0, 7.0]], [[4.0, -3.0, 1.0], [-3.0, 6.0, 7.0]]], 
-[[[-4.0, -2.0, -4.0], [-4.0, 1.0, 6.0]], [[4.0, -3.0, -6.0], [-3.0, 4.0, -5.0]], [[-4.0, 0.0, 5.0], [4.0, -4.0, 0.0]], [[-2.0, 
-7.0, 7.0], [-1.0, 4.0, 7.0]], [[-5.0, 1.0, 5.0], [1.0, 2.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, 4.0, -1.0], [7.0, 1.0, 
--1.0]], [[-5.0, -3.0, 4.0], [2.0, 1.0, 2.0]], [[4.0, 5.0, 1.0], [-7.0, 7.0, 6.0]], [[-7.0, 6.0, 4.0], [3.0, 2.0, 3.0]], [[0.0, 
-0.0, 6.0], [-6.0, 2.0, -5.0]]], [[[6.0, -1.0, -4.0], [-6.0, -7.0, 6.0]], [[-2.0, 5.0, 0.0], [3.0, 3.0, 4.0]], [[2.0, -3.0, 
-3.0], [0.0, 7.0, 7.0]], [[3.0, -1.0, 3.0], [7.0, 0.0, 2.0]], [[-2.0, 6.0, -2.0], [-1.0, -2.0, 7.0]]], [[[4.0, -2.0, -5.0], 
-[4.0, -5.0, -6.0]], [[4.0, 0.0, -4.0], [1.0, 2.0, 6.0]], [[-3.0, -4.0, -2.0], [0.0, 4.0, 7.0]], [[-1.0, -1.0, -6.0], [1.0, 4.0, 
--7.0]], [[-1.0, 7.0, 5.0], [-2.0, 1.0, 3.0]]], [[[2.0, -3.0, 0.0], [5.0, 5.0, -5.0]], [[-4.0, 0.0, 6.0], [0.0, 5.0, 0.0]], 
-[[-7.0, -5.0, -6.0], [0.0, 1.0, -3.0]], [[1.0, 7.0, 0.0], [6.0, -1.0, -5.0]], [[0.0, -2.0, -3.0], [7.0, 4.0, -7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[3.0, 3.0, 4.0, -5.0, -1.0], [-1.0, -7.0, 4.0, -4.0, 7.0], [-2.0, -3.0, 0.0, -6.0, -5.0], [0.0, 
+6.0, -4.0, -2.0, 6.0]], [[3.0, -2.0, -7.0, 5.0, -1.0], [-4.0, 7.0, 2.0, 0.0, 4.0], [0.0, 3.0, 6.0, -4.0, 6.0], [1.0, 6.0, 6.0, 
+-5.0, -7.0]], [[7.0, 3.0, 0.0, 3.0, 7.0], [5.0, -5.0, -3.0, -6.0, 7.0], [2.0, -5.0, 2.0, 7.0, 3.0], [3.0, 1.0, -6.0, -7.0, 
+-1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 0.0, -4.0, 7.0, 7.0], [-7.0, -7.0, 0.0, 2.0, -6.0], [-5.0, 0.0, -5.0, 3.0, 
+-3.0], [3.0, -5.0, 0.0, -7.0, 2.0]], [[5.0, -1.0, -3.0, 1.0, 3.0], [0.0, -5.0, -1.0, 5.0, 4.0], [-5.0, 5.0, 6.0, 4.0, -1.0], 
+[2.0, -4.0, -1.0, 7.0, 1.0]], [[1.0, 0.0, 0.0, 0.0, -1.0], [5.0, -1.0, -1.0, -2.0, 6.0], [-4.0, -7.0, -2.0, 5.0, -3.0], [1.0, 
+1.0, 1.0, -4.0, -7.0]]]))
+      arg1=Data(numpy.array([[[5.0, -4.0, 0.0, 3.0, -2.0], [0.0, -3.0, -2.0, -5.0, -5.0], [6.0, 5.0, -5.0, 0.0, -1.0], [3.0, 
+-4.0, -7.0, 0.0, -2.0]], [[4.0, 0.0, 0.0, 7.0, 5.0], [2.0, 3.0, 5.0, 5.0, 1.0], [1.0, 7.0, -7.0, -2.0, -7.0], [-4.0, 0.0, 3.0, 
+1.0, 7.0]], [[1.0, -1.0, -5.0, -6.0, -4.0], [1.0, -7.0, 0.0, 2.0, 2.0], [2.0, -2.0, 7.0, 1.0, 0.0], [4.0, 2.0, -2.0, 1.0, 
+3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, -4.0, 4.0, -5.0, 1.0], [-5.0, -2.0, 4.0, -1.0, 6.0], [-4.0, 7.0, -6.0, 1.0, 
+-5.0], [-4.0, -3.0, 2.0, 0.0, -1.0]], [[-2.0, -5.0, 3.0, -2.0, -6.0], [2.0, 6.0, -7.0, -1.0, -7.0], [4.0, -5.0, -2.0, 2.0, 
+2.0], [-2.0, -1.0, 7.0, 6.0, -2.0]], [[-3.0, -4.0, -5.0, -4.0, 4.0], [2.0, 4.0, 2.0, 0.0, -2.0], [3.0, 2.0, 2.0, 7.0, 4.0], 
+[4.0, 7.0, 3.0, 1.0, 0.0]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[46.0, 16.0, -10.0, -14.0, 61.0], [-56.0, -14.0, 9.0, -9.0, 8.0], [-2.0, -62.0, -91.0, 3.0, 
-30.0], [82.0, -54.0, 16.0, 66.0, 53.0]], [[-45.0, -61.0, -17.0, 13.0, 13.0], [-73.0, -26.0, -37.0, -8.0, 9.0], [-51.0, 18.0, 
-56.0, -67.0, -51.0], [-37.0, -43.0, 34.0, 55.0, 32.0]]])+(1.-msk_ref)*numpy.array([[[-56.0, 43.0, 35.0, 61.0, -17.0], [18.0, 
-33.0, 35.0, -28.0, 66.0], [-82.0, 11.0, 70.0, -45.0, 34.0], [-64.0, 28.0, 28.0, -60.0, -70.0]], [[45.0, 7.0, -8.0, 79.0, 0.0], 
-[-76.0, 48.0, -28.0, 14.0, 24.0], [-13.0, -26.0, -33.0, 6.0, 49.0], [8.0, 29.0, -19.0, 79.0, 26.0]]])
+      ref=msk_ref*numpy.array([[[[34.0, -19.0, -35.0, -12.0, -19.0], [13.0, -49.0, 9.0, 14.0, 2.0], [35.0, 22.0, 13.0, 1.0, 
+-24.0], [25.0, 2.0, -26.0, 10.0, 36.0]], [[10.0, -15.0, -15.0, -23.0, -28.0], [-1.0, -36.0, -16.0, -19.0, -11.0], [22.0, -5.0, 
+20.0, 7.0, 11.0], [29.0, -6.0, -33.0, 1.0, -11.0]], [[-8.0, -16.0, 0.0, -37.0, -43.0], [-14.0, -33.0, -43.0, -55.0, -27.0], 
+[17.0, -29.0, 29.0, 14.0, 45.0], [40.0, -16.0, -49.0, -7.0, -57.0]], [[-2.0, 17.0, -15.0, 2.0, 23.0], [13.0, 9.0, 35.0, 56.0, 
+36.0], [-19.0, 4.0, 11.0, -7.0, -30.0], [-23.0, 26.0, 44.0, 8.0, 54.0]], [[-2.0, -3.0, -35.0, -52.0, -31.0], [5.0, -49.0, -3.0, 
+14.0, 18.0], [7.0, -26.0, 61.0, 9.0, 8.0], [29.0, 18.0, -10.0, 6.0, 16.0]]], [[[-16.0, -1.0, -25.0, -61.0, -38.0], [-3.0, 
+-44.0, -18.0, -5.0, 11.0], [0.0, -43.0, 68.0, 13.0, 29.0], [33.0, 14.0, -15.0, 1.0, -11.0]], [[-12.0, 33.0, 25.0, 58.0, 69.0], 
+[9.0, 77.0, 49.0, 60.0, 32.0], [-45.0, 24.0, -49.0, -19.0, -42.0], [-69.0, 18.0, 80.0, 2.0, 48.0]], [[25.0, -13.0, 15.0, 44.0, 
+14.0], [1.0, 15.0, 2.0, -16.0, -24.0], [20.0, 40.0, -55.0, -7.0, -18.0], [-8.0, -22.0, -16.0, -1.0, -3.0]], [[-26.0, 22.0, 
+30.0, 24.0, 32.0], [-6.0, 54.0, 8.0, 8.0, 8.0], [-36.0, -8.0, -22.0, -6.0, 4.0], [-36.0, 4.0, 40.0, -6.0, -10.0]], [[58.0, 
+-35.0, -35.0, 7.0, -22.0], [15.0, -58.0, 6.0, -1.0, -17.0], [60.0, 49.0, -14.0, -1.0, -35.0], [33.0, -14.0, -51.0, 11.0, 
+35.0]]], [[[-8.0, 6.0, -10.0, -18.0, -4.0], [2.0, -8.0, 4.0, 14.0, 14.0], [-8.0, -14.0, 24.0, 2.0, 2.0], [2.0, 12.0, 10.0, 2.0, 
+10.0]], [[-8.0, 17.0, 25.0, 42.0, 41.0], [1.0, 53.0, 21.0, 20.0, 8.0], [-25.0, 16.0, -41.0, -11.0, -18.0], [-41.0, 2.0, 40.0, 
+-2.0, 12.0]], [[26.0, -2.0, -10.0, 30.0, 22.0], [14.0, 4.0, 30.0, 34.0, 10.0], [10.0, 38.0, -28.0, -10.0, -42.0], [-16.0, 4.0, 
+14.0, 8.0, 48.0]], [[-39.0, 17.0, -35.0, -88.0, -36.0], [-1.0, -43.0, -8.0, 24.0, 40.0], [-26.0, -72.0, 107.0, 15.0, 34.0], 
+[26.0, 38.0, 16.0, 3.0, 5.0]], [[2.0, 17.0, -15.0, 9.0, 28.0], [15.0, 12.0, 40.0, 61.0, 37.0], [-18.0, 11.0, 4.0, -9.0, -37.0], 
+[-27.0, 26.0, 47.0, 9.0, 61.0]]], [[[7.0, -3.0, -15.0, -11.0, -7.0], [5.0, -18.0, 5.0, 11.0, 7.0], [7.0, 1.0, 14.0, 1.0, -7.0], 
+[8.0, 6.0, -3.0, 4.0, 16.0]], [[55.0, -25.0, -5.0, 54.0, 14.0], [13.0, -7.0, 18.0, 2.0, -22.0], [44.0, 70.0, -65.0, -11.0, 
+-48.0], [-2.0, -22.0, -26.0, 7.0, 33.0]], [[-2.0, 22.0, 30.0, 66.0, 62.0], [6.0, 72.0, 38.0, 38.0, 14.0], [-30.0, 34.0, -64.0, 
+-18.0, -38.0], [-60.0, 4.0, 58.0, 0.0, 32.0]], [[-37.0, 15.0, 35.0, 1.0, 7.0], [-17.0, 40.0, -21.0, -29.0, -9.0], [-31.0, 
+-31.0, -4.0, 3.0, 37.0], [-14.0, -6.0, 13.0, -12.0, -52.0]], [[1.0, -23.0, 5.0, -25.0, -43.0], [-15.0, -32.0, -47.0, -67.0, 
+-39.0], [27.0, -17.0, 12.0, 13.0, 43.0], [42.0, -26.0, -61.0, -8.0, -64.0]]]])+(1.-msk_ref)*numpy.array([[[[-9.0, -45.0, 26.0, 
+-34.0, -22.0], [-8.0, 26.0, -17.0, -9.0, -13.0], [7.0, 5.0, -32.0, 21.0, -6.0], [-22.0, -10.0, 46.0, 31.0, -14.0]], [[2.0, 5.0, 
+-3.0, 2.0, 6.0], [-2.0, -6.0, 7.0, 1.0, 7.0], [-4.0, 5.0, 2.0, -2.0, -2.0], [2.0, 1.0, -7.0, -6.0, 2.0]], [[2.0, 31.0, -25.0, 
+26.0, 14.0], [14.0, -10.0, 5.0, 7.0, -3.0], [4.0, -13.0, 30.0, -10.0, 14.0], [22.0, 15.0, -29.0, -18.0, 10.0]], [[5.0, -33.0, 
+31.0, -37.0, 1.0], [-33.0, -8.0, 21.0, -8.0, 35.0], [-24.0, 44.0, -44.0, 9.0, -33.0], [-30.0, -22.0, 21.0, 6.0, -9.0]], [[4.0, 
+-39.0, 42.0, -37.0, -15.0], [-31.0, 0.0, 5.0, -10.0, 23.0], [-19.0, 32.0, -50.0, 6.0, -33.0], [-38.0, -31.0, 32.0, 17.0, 
+-13.0]]], [[[-22.0, 8.0, -53.0, 15.0, 13.0], [45.0, 34.0, -18.0, 7.0, -52.0], [43.0, -39.0, 52.0, 28.0, 55.0], [48.0, 56.0, 
+1.0, 5.0, 7.0]], [[6.0, 57.0, -38.0, 49.0, 19.0], [23.0, -20.0, 5.0, 12.0, -5.0], [5.0, -26.0, 50.0, -24.0, 21.0], [34.0, 19.0, 
+-52.0, -31.0, 17.0]], [[5.0, 9.0, 2.0, 6.0, 2.0], [-4.0, -10.0, 5.0, 1.0, 9.0], [-7.0, 3.0, 0.0, -9.0, -6.0], [-2.0, -6.0, 
+-10.0, -7.0, 2.0]], [[-2.0, -25.0, 33.0, -12.0, -36.0], [-4.0, 18.0, -31.0, -7.0, -19.0], [6.0, -15.0, -26.0, -2.0, -8.0], 
+[-26.0, -25.0, 33.0, 28.0, -12.0]], [[-32.0, -20.0, -42.0, -2.0, -6.0], [50.0, 60.0, -40.0, 2.0, -76.0], [58.0, -50.0, 40.0, 
+44.0, 62.0], [40.0, 56.0, 34.0, 30.0, -2.0]]], [[[17.0, 61.0, -15.0, 51.0, 9.0], [7.0, -36.0, 7.0, 10.0, 13.0], [-12.0, -18.0, 
+32.0, -43.0, -1.0], [14.0, -8.0, -57.0, -34.0, 15.0]], [[11.0, 3.0, 50.0, 18.0, -58.0], [-4.0, 2.0, -49.0, -5.0, -21.0], [-1.0, 
+-39.0, -24.0, -39.0, -18.0], [-38.0, -54.0, 14.0, 23.0, -10.0]], [[-11.0, -2.0, 8.0, 21.0, -49.0], [33.0, 38.0, -66.0, -1.0, 
+-68.0], [38.0, -69.0, 14.0, -7.0, 29.0], [0.0, -5.0, 26.0, 34.0, -7.0]], [[-20.0, -52.0, -1.0, -43.0, -1.0], [3.0, 38.0, -6.0, 
+-7.0, -20.0], [19.0, 11.0, -16.0, 46.0, 13.0], [0.0, 22.0, 49.0, 29.0, -11.0]], [[8.0, 29.0, 0.0, 29.0, -9.0], [7.0, -12.0, 
+-11.0, 4.0, -5.0], [-1.0, -22.0, 14.0, -26.0, 1.0], [2.0, -11.0, -22.0, -9.0, 5.0]]], [[[-4.0, -26.0, 13.0, -23.0, -5.0], 
+[-9.0, 10.0, 0.0, -5.0, 2.0], [-1.0, 13.0, -20.0, 14.0, -7.0], [-12.0, -4.0, 23.0, 13.0, -7.0]], [[0.0, 36.0, -37.0, 29.0, 
+23.0], [19.0, -10.0, 10.0, 9.0, -4.0], [7.0, -13.0, 40.0, -6.0, 21.0], [32.0, 26.0, -35.0, -23.0, 13.0]], [[-1.0, 1.0, -8.0, 
+-2.0, 10.0], [0.0, -2.0, 9.0, 1.0, 5.0], [-1.0, 7.0, 4.0, 5.0, 2.0], [6.0, 8.0, -4.0, -5.0, 2.0]], [[-9.0, 9.0, 13.0, 37.0, 
+-65.0], [41.0, 40.0, -85.0, 0.0, -83.0], [44.0, -92.0, 20.0, -21.0, 33.0], [-2.0, -14.0, 23.0, 38.0, -7.0]], [[21.0, 15.0, 
+46.0, 16.0, -32.0], [-22.0, -26.0, -13.0, -3.0, 19.0], [-25.0, -5.0, -28.0, -45.0, -36.0], [-38.0, -56.0, -10.0, -1.0, -4.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank1_expandedData_rank3_offset0(self):
-      arg0=numpy.array([-4.0, -5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, 5.0], [0.0, 7.0]], [[0.0, -2.0], [-3.0, -2.0]], [[-3.0, -5.0], [7.0, -4.0]], [[2.0, 
-7.0], [7.0, 0.0]], [[1.0, 1.0], [-7.0, -3.0]], [[-6.0, -6.0], [5.0, 1.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 7.0], [6.0, 
--1.0]], [[-5.0, 0.0], [0.0, 4.0]], [[-1.0, 2.0], [5.0, -2.0]], [[4.0, 6.0], [4.0, 2.0]], [[0.0, -1.0], [7.0, 0.0]], [[0.0, 
-4.0], [-2.0, -6.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-2.0, -6.0, -6.0, 0.0, 0.0], [1.0, 4.0, -3.0, 4.0, -2.0], [-7.0, -7.0, 3.0, 4.0, -1.0], [-6.0, 
+3.0, 5.0, 2.0, 3.0]], [[4.0, 0.0, 6.0, -5.0, -7.0], [0.0, -1.0, -5.0, 3.0, 0.0], [7.0, 0.0, -2.0, -2.0, -3.0], [5.0, -3.0, 
+-3.0, -3.0, 2.0]], [[-6.0, 1.0, -6.0, 0.0, -4.0], [0.0, -3.0, -6.0, -1.0, -7.0], [-1.0, 0.0, -7.0, -1.0, -7.0], [-6.0, 6.0, 
+0.0, 5.0, -6.0]]], [[[7.0, -5.0, -4.0, 0.0, -3.0], [3.0, 6.0, 7.0, 0.0, -7.0], [5.0, 0.0, -2.0, 4.0, -4.0], [-7.0, -6.0, 5.0, 
+-6.0, 4.0]], [[4.0, 3.0, 3.0, 3.0, 6.0], [-3.0, -4.0, 2.0, 0.0, -4.0], [6.0, -1.0, -7.0, 2.0, 2.0], [-7.0, 7.0, 1.0, -6.0, 
+5.0]], [[-4.0, -1.0, 5.0, -1.0, 5.0], [-2.0, -5.0, -3.0, -1.0, -5.0], [3.0, -1.0, 4.0, -3.0, -4.0], [5.0, 1.0, 5.0, -7.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 2.0, 0.0, 3.0, -1.0], [-4.0, 1.0, -3.0, 1.0, -6.0], [-5.0, 3.0, 6.0, 4.0, 
+4.0], [-6.0, -7.0, 6.0, 4.0, -1.0]], [[0.0, 2.0, 0.0, -6.0, -4.0], [2.0, 1.0, 3.0, -2.0, 6.0], [4.0, 2.0, -3.0, -6.0, 3.0], 
+[-3.0, 5.0, 7.0, 4.0, -4.0]], [[1.0, -6.0, 2.0, 3.0, 7.0], [2.0, 7.0, 1.0, 0.0, -6.0], [-7.0, 1.0, -4.0, 1.0, -6.0], [-7.0, 
+0.0, 5.0, 7.0, 5.0]]], [[[-3.0, 4.0, 3.0, -6.0, -6.0], [0.0, 1.0, 5.0, 3.0, -3.0], [-7.0, -2.0, -4.0, 0.0, 7.0], [-4.0, 0.0, 
+4.0, 3.0, -5.0]], [[0.0, 0.0, -1.0, 7.0, 1.0], [0.0, 4.0, 7.0, -4.0, -7.0], [1.0, 6.0, 2.0, -2.0, -6.0], [-5.0, 6.0, 7.0, -6.0, 
+-7.0]], [[2.0, 6.0, 0.0, -2.0, 1.0], [-7.0, 1.0, -5.0, -5.0, 0.0], [-6.0, 6.0, 0.0, -2.0, 1.0], [4.0, -3.0, -7.0, 1.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[[4.0, -6.0, 4.0, 1.0, 2.0], [3.0, -5.0, 3.0, -6.0, 1.0], [-2.0, 0.0, 0.0, 4.0, 0.0], [2.0, -1.0, 
+4.0, -3.0, -4.0]], [[3.0, -5.0, 7.0, 0.0, -1.0], [5.0, -1.0, 2.0, -3.0, 5.0], [-1.0, 6.0, 6.0, 0.0, 6.0], [0.0, 0.0, 5.0, -6.0, 
+5.0]], [[7.0, 0.0, -3.0, -3.0, -6.0], [-2.0, 5.0, -2.0, 7.0, -3.0], [-4.0, -6.0, -3.0, 4.0, 6.0], [2.0, -5.0, -4.0, -3.0, 
+-7.0]]], [[[-6.0, 0.0, 1.0, 2.0, 0.0], [-3.0, -2.0, 1.0, -6.0, 0.0], [4.0, -7.0, 1.0, -2.0, -2.0], [-2.0, -7.0, 0.0, -2.0, 
+0.0]], [[4.0, 2.0, 2.0, -7.0, 0.0], [1.0, 2.0, 7.0, 3.0, -5.0], [1.0, -5.0, -4.0, 3.0, 4.0], [0.0, 4.0, -5.0, -6.0, 1.0]], 
+[[-3.0, -4.0, 6.0, -6.0, -6.0], [-2.0, 5.0, -6.0, 0.0, 7.0], [6.0, -2.0, 4.0, 3.0, 7.0], [0.0, -2.0, -3.0, 3.0, 
+6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -1.0, 4.0, -7.0, 6.0], [1.0, 7.0, -6.0, 1.0, 0.0], [6.0, -5.0, 5.0, -3.0, 
+5.0], [-5.0, -7.0, -1.0, 5.0, 0.0]], [[5.0, 0.0, -4.0, 4.0, 7.0], [4.0, -4.0, -4.0, -4.0, 0.0], [-2.0, -1.0, -3.0, 5.0, -4.0], 
+[-3.0, -7.0, 7.0, 5.0, -5.0]], [[5.0, -5.0, -7.0, 5.0, -1.0], [7.0, -3.0, 4.0, 3.0, 5.0], [3.0, 7.0, -7.0, -7.0, -1.0], [-1.0, 
+1.0, -4.0, 6.0, 5.0]]], [[[6.0, 1.0, 0.0, -6.0, 3.0], [-5.0, 4.0, 1.0, 2.0, 4.0], [3.0, 0.0, -7.0, -2.0, -6.0], [5.0, -6.0, 
+-7.0, -7.0, -6.0]], [[7.0, 5.0, 4.0, -4.0, -7.0], [-5.0, 1.0, 4.0, 0.0, -7.0], [-3.0, -5.0, -5.0, 1.0, 5.0], [0.0, 3.0, -4.0, 
+5.0, -7.0]], [[-4.0, -2.0, -7.0, -1.0, 3.0], [-5.0, -4.0, -5.0, 7.0, 6.0], [-5.0, 0.0, 6.0, -1.0, -1.0], [2.0, 7.0, 3.0, 1.0, 
+6.0]]]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-28.0, -20.0], [0.0, -28.0]], [[0.0, 8.0], [12.0, 8.0]], [[12.0, 20.0], [-28.0, 16.0]], 
-[[-8.0, -28.0], [-28.0, 0.0]], [[-4.0, -4.0], [28.0, 12.0]], [[24.0, 24.0], [-20.0, -4.0]]], [[[-35.0, -25.0], [0.0, -35.0]], 
-[[0.0, 10.0], [15.0, 10.0]], [[15.0, 25.0], [-35.0, 20.0]], [[-10.0, -35.0], [-35.0, 0.0]], [[-5.0, -5.0], [35.0, 15.0]], 
-[[30.0, 30.0], [-25.0, -5.0]]]])+(1.-msk_ref)*numpy.array([[[[12.0, -28.0], [-24.0, 4.0]], [[20.0, 0.0], [0.0, -16.0]], [[4.0, 
--8.0], [-20.0, 8.0]], [[-16.0, -24.0], [-16.0, -8.0]], [[0.0, 4.0], [-28.0, 0.0]], [[0.0, -16.0], [8.0, 24.0]]], [[[15.0, 
--35.0], [-30.0, 5.0]], [[25.0, 0.0], [0.0, -20.0]], [[5.0, -10.0], [-25.0, 10.0]], [[-20.0, -30.0], [-20.0, -10.0]], [[0.0, 
-5.0], [-35.0, 0.0]], [[0.0, -20.0], [10.0, 30.0]]]])
+      ref=msk_ref*numpy.array([[[[-52.0, 16.0, 29.0, 26.0, 52.0], [17.0, -50.0, 73.0, -72.0, -12.0], [32.0, -1.0, 17.0, -46.0, 
+-38.0], [-30.0, 7.0, 28.0, -50.0, 50.0]], [[28.0, 46.0, -32.0, -34.0, -12.0], [0.0, 46.0, 2.0, 82.0, -31.0], [-15.0, 16.0, 
+-24.0, -4.0, 21.0], [0.0, 50.0, -40.0, 4.0, 14.0]], [[-27.0, -8.0, 68.0, -47.0, -12.0], [29.0, 33.0, -7.0, 9.0, 62.0], [47.0, 
+75.0, 58.0, -16.0, 55.0], [-16.0, 66.0, 0.0, 5.0, 129.0]], [[0.0, 35.0, -35.0, -15.0, 11.0], [-20.0, 6.0, 17.0, 24.0, -47.0], 
+[2.0, -43.0, -46.0, 6.0, -25.0], [0.0, 14.0, -37.0, 9.0, -28.0]], [[-22.0, 27.0, 2.0, -66.0, 1.0], [-22.0, 30.0, 3.0, 29.0, 
+-18.0], [47.0, -37.0, -37.0, 23.0, -1.0], [-2.0, 55.0, -64.0, 39.0, 29.0]]], [[[-20.0, -4.0, -11.0, 40.0, 14.0], [-5.0, -27.0, 
+-3.0, -33.0, 2.0], [-5.0, -2.0, 7.0, -17.0, -32.0], [-4.0, -30.0, 25.0, 3.0, -19.0]], [[-45.0, -7.0, -14.0, 83.0, 57.0], [1.0, 
+-79.0, 24.0, -90.0, -7.0], [-5.0, 0.0, 5.0, -35.0, -87.0], [-10.0, -37.0, 58.0, 0.0, -34.0]], [[-94.0, 59.0, -36.0, 33.0, 
+53.0], [-35.0, -35.0, 32.0, -45.0, -41.0], [47.0, -47.0, -25.0, -53.0, -93.0], [-32.0, -2.0, -14.0, 22.0, 13.0]], [[21.0, 
+-35.0, 34.0, 13.0, 17.0], [31.0, -33.0, 26.0, -40.0, 15.0], [-13.0, 26.0, 17.0, 9.0, 5.0], [6.0, 3.0, 38.0, -30.0, 0.0]], 
+[[-16.0, 24.0, -32.0, 63.0, 68.0], [35.0, -44.0, 3.0, -7.0, 4.0], [-30.0, 121.0, 10.0, -49.0, -79.0], [-4.0, 80.0, 55.0, 50.0, 
+23.0]]], [[[-29.0, 7.0, 59.0, -54.0, -33.0], [1.0, 40.0, 24.0, 2.0, 22.0], [55.0, -23.0, 38.0, -15.0, 71.0], [-26.0, -5.0, 
+-28.0, -55.0, 94.0]], [[-29.0, 44.0, -36.0, 6.0, -8.0], [-20.0, 28.0, -22.0, 39.0, -9.0], [7.0, 7.0, 0.0, -34.0, -11.0], 
+[-14.0, 5.0, -20.0, 24.0, 21.0]], [[-71.0, -38.0, 27.0, 45.0, 26.0], [4.0, -38.0, -56.0, -70.0, 77.0], [33.0, 71.0, 51.0, 
+-21.0, -50.0], [-4.0, 10.0, 53.0, 82.0, 44.0]], [[-4.0, 2.0, -5.0, 19.0, 34.0], [0.0, -42.0, 46.0, -43.0, -34.0], [-2.0, -38.0, 
+-25.0, 1.0, -39.0], [-2.0, -13.0, 9.0, -26.0, -35.0]], [[-18.0, 41.0, -28.0, 22.0, 67.0], [18.0, -35.0, 39.0, -4.0, -33.0], 
+[-5.0, 50.0, -25.0, -30.0, -72.0], [-8.0, 80.0, 11.0, 26.0, 16.0]]], [[[-52.0, -23.0, 38.0, 17.0, -11.0], [23.0, 20.0, -82.0, 
+0.0, 107.0], [26.0, 140.0, 89.0, -40.0, 15.0], [-10.0, 47.0, 45.0, 77.0, 114.0]], [[106.0, 7.0, -13.0, -82.0, -33.0], [5.0, 
+49.0, 28.0, 90.0, -58.0], [-38.0, -49.0, -66.0, 72.0, 65.0], [30.0, 35.0, -65.0, -36.0, -56.0]], [[-30.0, -33.0, 36.0, -22.0, 
+-17.0], [-24.0, -5.0, -9.0, -48.0, 20.0], [44.0, -68.0, 3.0, 28.0, 11.0], [0.0, -46.0, -15.0, 2.0, -4.0]], [[67.0, 19.0, -88.0, 
+59.0, 19.0], [7.0, -17.0, -16.0, 50.0, -47.0], [-93.0, 38.0, -43.0, 1.0, -49.0], [26.0, 5.0, 24.0, 24.0, -106.0]], [[-28.0, 
+-18.0, 58.0, -6.0, 40.0], [24.0, -45.0, 64.0, -75.0, 6.0], [37.0, -5.0, 14.0, -5.0, -12.0], [-14.0, 19.0, 21.0, -41.0, 
+45.0]]]])+(1.-msk_ref)*numpy.array([[[[-19.0, -14.0, -13.0, 7.0, 8.0], [14.0, -9.0, -21.0, 13.0, 5.0], [-4.0, -3.0, 36.0, -9.0, 
+25.0], [-22.0, 19.0, 21.0, 39.0, 35.0]], [[-18.0, 20.0, 0.0, -66.0, 62.0], [-82.0, 16.0, -70.0, 26.0, 22.0], [-28.0, -54.0, 
+54.0, 32.0, -22.0], [22.0, -16.0, 26.0, -38.0, -28.0]], [[21.0, -12.0, -18.0, -4.0, 14.0], [4.0, 5.0, 7.0, 12.0, 29.0], [18.0, 
+19.0, -30.0, -21.0, -25.0], [13.0, -19.0, -25.0, -14.0, -1.0]], [[9.0, 15.0, 57.0, -20.0, -100.0], [5.0, 27.0, 50.0, 10.0, 
+-70.0], [10.0, -23.0, 7.0, -39.0, 109.0], [-34.0, 67.0, -49.0, 78.0, 20.0]], [[-19.0, -37.0, -40.0, 57.0, -63.0], [52.0, -39.0, 
+43.0, 31.0, 10.0], [-3.0, 53.0, 1.0, -54.0, 44.0], [-18.0, 88.0, -14.0, 65.0, 90.0]]], [[[44.0, 8.0, 11.0, 53.0, -33.0], [53.0, 
+-14.0, 59.0, -55.0, -32.0], [13.0, 32.0, -82.0, 15.0, -23.0], [-2.0, -33.0, -11.0, -5.0, -42.0]], [[71.0, -17.0, -40.0, 9.0, 
+-16.0], [24.0, -14.0, 30.0, 27.0, 17.0], [11.0, 23.0, -68.0, -46.0, 7.0], [-8.0, 6.0, -42.0, 66.0, 2.0]], [[116.0, 48.0, 32.0, 
+-15.0, -47.0], [-19.0, 11.0, 68.0, -37.0, -54.0], [-2.0, -16.0, -131.0, 19.0, -18.0], [20.0, -43.0, -58.0, 1.0, -119.0]], 
+[[1.0, -8.0, 31.0, -12.0, 14.0], [23.0, 43.0, 14.0, -20.0, 10.0], [56.0, 17.0, -20.0, -18.0, -20.0], [6.0, -58.0, -35.0, -51.0, 
+-10.0]], [[-73.0, -2.0, -34.0, 82.0, 52.0], [26.0, -67.0, -43.0, -54.0, 7.0], [-54.0, 17.0, 50.0, 89.0, -65.0], [3.0, -9.0, 
+121.0, -50.0, 7.0]]], [[[-31.0, 50.0, 59.0, 60.0, -41.0], [22.0, -33.0, 13.0, -98.0, -106.0], [-53.0, -33.0, 20.0, 105.0, 
+19.0], [-27.0, 3.0, 88.0, 1.0, -56.0]], [[24.0, 8.0, -21.0, -26.0, 1.0], [-32.0, -16.0, -30.0, 36.0, -9.0], [-37.0, -40.0, 
+22.0, -2.0, 42.0], [-20.0, 38.0, 15.0, 81.0, 1.0]], [[-39.0, 20.0, 72.0, -58.0, -7.0], [-24.0, 52.0, -36.0, -2.0, -50.0], 
+[12.0, -65.0, 85.0, 5.0, 80.0], [-37.0, 5.0, 9.0, 29.0, 5.0]], [[-27.0, -15.0, 39.0, -37.0, -11.0], [7.0, 55.0, 6.0, 17.0, 
+7.0], [55.0, 3.0, 29.0, -49.0, 35.0], [-7.0, -5.0, -48.0, -16.0, 37.0]], [[-15.0, 1.0, 15.0, -65.0, 117.0], [-36.0, 52.0, 
+-82.0, -5.0, 46.0], [34.0, -35.0, 40.0, 24.0, -59.0], [14.0, -108.0, 19.0, -79.0, -39.0]]], [[[-131.0, 4.0, -11.0, 35.0, 
+-15.0], [-42.0, -46.0, -24.0, 5.0, 8.0], [-68.0, 9.0, 105.0, 51.0, -16.0], [34.0, 93.0, 73.0, -80.0, 63.0]], [[72.0, 43.0, 
+-3.0, 48.0, -58.0], [-2.0, -51.0, 61.0, -48.0, -60.0], [-55.0, 0.0, -98.0, 55.0, -22.0], [14.0, 11.0, 9.0, 17.0, -85.0]], 
+[[167.0, 22.0, 38.0, -34.0, 22.0], [49.0, 50.0, 23.0, -48.0, -50.0], [63.0, -37.0, -131.0, -12.0, 15.0], [-50.0, -138.0, -54.0, 
+95.0, -125.0]], [[31.0, -68.0, -80.0, 28.0, 99.0], [79.0, -7.0, -38.0, 22.0, 95.0], [59.0, 55.0, -26.0, -54.0, -52.0], [-22.0, 
+-78.0, 2.0, 32.0, 45.0]], [[-75.0, -64.0, -51.0, 74.0, -5.0], [78.0, -33.0, 9.0, 20.0, 54.0], [23.0, 79.0, 42.0, -49.0, 1.0], 
+[-13.0, 49.0, 16.0, 5.0, 124.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank4_offset1(self):
-      arg0=numpy.array([[-2.0, 6.0, 3.0], [7.0, -6.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-7.0, 3.0, -4.0], [3.0, -3.0, 3.0]], [[-3.0, 0.0, 5.0], [-3.0, 1.0, 3.0]]], [[[-6.0, 6.0, 
-3.0], [4.0, -2.0, -5.0]], [[7.0, -1.0, 0.0], [-2.0, 1.0, -6.0]]], [[[1.0, 4.0, 0.0], [-1.0, 3.0, -5.0]], [[2.0, 0.0, 0.0], 
-[-4.0, 2.0, 0.0]]], [[[0.0, -4.0, 7.0], [-6.0, -1.0, 0.0]], [[3.0, 0.0, -7.0], [-2.0, 1.0, -1.0]]], [[[3.0, 6.0, 1.0], [5.0, 
-3.0, -7.0]], [[-2.0, 2.0, 7.0], [0.0, -1.0, 0.0]]], [[[-6.0, -7.0, 0.0], [-5.0, 5.0, -2.0]], [[-6.0, 1.0, 1.0], [-5.0, 4.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -3.0, -1.0], [5.0, -1.0, 0.0]], [[-3.0, 6.0, -1.0], [-7.0, 6.0, 4.0]]], [[[7.0, 
--3.0, 3.0], [-6.0, 0.0, 6.0]], [[-5.0, 0.0, -7.0], [0.0, -5.0, 5.0]]], [[[7.0, 1.0, -7.0], [-1.0, 5.0, 4.0]], [[3.0, -7.0, 
--3.0], [0.0, -1.0, -4.0]]], [[[-4.0, 6.0, -6.0], [-7.0, -4.0, 4.0]], [[-2.0, 2.0, 4.0], [6.0, 5.0, -4.0]]], [[[-1.0, -2.0, 
-0.0], [-7.0, -2.0, -1.0]], [[1.0, -3.0, -6.0], [-2.0, 5.0, 7.0]]], [[[0.0, -5.0, 5.0], [3.0, -2.0, -3.0]], [[-1.0, 4.0, 0.0], 
-[7.0, 0.0, 7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[20.0, -15.0], [21.0, 21.0]], [[57.0, -35.0], [-20.0, -8.0]], [[22.0, 5.0], [-4.0, 20.0]], 
-[[-3.0, 6.0], [-27.0, 7.0]], [[33.0, -13.0], [37.0, -6.0]], [[-30.0, 34.0], [21.0, 16.0]]], [[[-75.0, 45.0], [-11.0, -21.0]], 
-[[-72.0, 30.0], [55.0, -32.0]], [[-17.0, -35.0], [14.0, -40.0]], [[38.0, -36.0], [7.0, -22.0]], [[-13.0, 3.0], [-12.0, 6.0]], 
-[[0.0, -69.0], [-46.0, -71.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -16.0], [39.0, 62.0]], [[-23.0, 30.0], [-11.0, -15.0]], 
-[[-29.0, 44.0], [-57.0, -18.0]], [[26.0, 2.0], [28.0, 6.0]], [[-10.0, -1.0], [-38.0, 55.0]], [[-15.0, -27.0], [26.0, 7.0]]], 
-[[[16.0, 41.0], [-59.0, -77.0]], [[73.0, -30.0], [-49.0, 40.0]], [[29.0, -29.0], [57.0, -2.0]], [[-76.0, -17.0], [-18.0, 4.0]], 
-[[5.0, -39.0], [13.0, -30.0]], [[40.0, 27.0], [-31.0, 63.0]]]])
+   def test_generalTransposedTensorProduct_taggedData_rank3_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-2.0, 0.0], [0.0, 4.0]], [[0.0, 0.0], [0.0, -2.0]], [[0.0, -2.0], [-6.0, 6.0]], [[-3.0, 4.0], 
+[-4.0, -1.0]], [[3.0, 4.0], [-3.0, -2.0]], [[2.0, -3.0], [-6.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 0.0], [-6.0, 0.0]], [[2.0, 3.0], [5.0, -7.0]], [[1.0, -3.0], [-7.0, -6.0]], 
+[[5.0, 2.0], [-6.0, 6.0]], [[6.0, 1.0], [-4.0, 6.0]], [[1.0, 0.0], [-5.0, -4.0]]]))
+      arg1=-4.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[8.0, -0.0], [-0.0, -16.0]], [[-0.0, -0.0], [-0.0, 8.0]], [[-0.0, 8.0], [24.0, -24.0]], [[12.0, 
+-16.0], [16.0, 4.0]], [[-12.0, -16.0], [12.0, 8.0]], [[-8.0, 12.0], [24.0, -12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[4.0, -0.0], [24.0, -0.0]], [[-8.0, -12.0], [-20.0, 28.0]], [[-4.0, 12.0], [28.0, 
+24.0]], [[-20.0, -8.0], [24.0, -24.0]], [[-24.0, -4.0], [16.0, -24.0]], [[-4.0, -0.0], [20.0, 16.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[2.0, -3.0], [5.0, 1.0]], [[5.0, 1.0], [-6.0, -4.0]], [[3.0, 3.0], [-6.0, 0.0]], [[1.0, 0.0], 
+[-1.0, -1.0]], [[7.0, -4.0], [5.0, 2.0]], [[2.0, 4.0], [2.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, -1.0], [0.0, -5.0]], [[0.0, -2.0], [2.0, 4.0]], [[0.0, -2.0], [7.0, 4.0]], 
+[[-1.0, 7.0], [4.0, 1.0]], [[0.0, 0.0], [2.0, 5.0]], [[-3.0, 7.0], [1.0, 1.0]]]))
+      arg1=numpy.array(7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[14.0, -21.0], [35.0, 7.0]], [[35.0, 7.0], [-42.0, -28.0]], [[21.0, 21.0], [-42.0, 0.0]], [[7.0, 
+0.0], [-7.0, -7.0]], [[49.0, -28.0], [35.0, 14.0]], [[14.0, 28.0], [14.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[49.0, -7.0], [0.0, -35.0]], [[0.0, -14.0], [14.0, 28.0]], [[0.0, -14.0], [49.0, 
+28.0]], [[-7.0, 49.0], [28.0, 7.0]], [[0.0, 0.0], [14.0, 35.0]], [[-21.0, 49.0], [7.0, 7.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[7.0, 1.0], [-7.0, -1.0]], [[-5.0, 3.0], [3.0, 2.0]], [[0.0, -3.0], [-3.0, -7.0]], [[-1.0, 
+-3.0], [3.0, -4.0]], [[5.0, 7.0], [-7.0, -3.0]], [[4.0, -3.0], [-3.0, 0.0]]], [[[1.0, -1.0], [-5.0, 2.0]], [[0.0, -7.0], [2.0, 
+-6.0]], [[5.0, 6.0], [-2.0, -5.0]], [[5.0, -4.0], [3.0, 2.0]], [[1.0, 2.0], [3.0, -7.0]], [[0.0, 0.0], [-3.0, -5.0]]], [[[5.0, 
+-2.0], [5.0, -2.0]], [[0.0, 2.0], [-3.0, 7.0]], [[-2.0, 1.0], [0.0, -5.0]], [[-2.0, 7.0], [-4.0, -6.0]], [[4.0, 7.0], [7.0, 
+-7.0]], [[-5.0, -3.0], [2.0, 4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, -4.0], [0.0, -4.0]], [[4.0, -3.0], [-2.0, 1.0]], [[0.0, 3.0], [2.0, 1.0]], 
+[[-3.0, 4.0], [-1.0, -2.0]], [[7.0, 3.0], [-3.0, -2.0]], [[-1.0, -6.0], [3.0, 2.0]]], [[[6.0, 0.0], [1.0, -6.0]], [[1.0, 0.0], 
+[7.0, -7.0]], [[0.0, 0.0], [7.0, 3.0]], [[-7.0, -1.0], [-7.0, -2.0]], [[7.0, 5.0], [0.0, -5.0]], [[-5.0, -4.0], [-2.0, -5.0]]], 
+[[[6.0, -1.0], [4.0, 2.0]], [[-3.0, 0.0], [0.0, 0.0]], [[-3.0, 2.0], [6.0, 0.0]], [[-2.0, 3.0], [-6.0, 0.0]], [[1.0, 1.0], 
+[7.0, 4.0]], [[4.0, -7.0], [1.0, 6.0]]]]))
+      arg1=numpy.array([-2.0, 3.0, 3.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[4.0, -11.0], [14.0, 2.0]], [[10.0, -21.0], [-9.0, -1.0]], [[9.0, 27.0], [0.0, -16.0]], [[11.0, 
+15.0], [-9.0, -4.0]], [[5.0, 13.0], [44.0, -36.0]], [[-23.0, -3.0], [3.0, -3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[44.0, 5.0], [15.0, -4.0]], [[-14.0, 6.0], [25.0, -23.0]], [[-9.0, 0.0], [35.0, 7.0]], 
+[[-21.0, -2.0], [-37.0, -2.0]], [[10.0, 12.0], [27.0, 1.0]], [[-1.0, -21.0], [-9.0, -1.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank3_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-4.0, 7.0], [0.0, 2.0]], [[0.0, 0.0], [6.0, -5.0]], [[0.0, 0.0], [0.0, 3.0]], [[5.0, -7.0], 
+[-5.0, -1.0]], [[-2.0, -7.0], [6.0, -3.0]], [[4.0, 6.0], [-2.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, -4.0], [-4.0, 0.0]], [[-7.0, -6.0], [-7.0, 5.0]], [[-6.0, 0.0], [5.0, 4.0]], 
+[[1.0, -1.0], [0.0, 2.0]], [[-2.0, 4.0], [7.0, 1.0]], [[-7.0, -7.0], [-2.0, 7.0]]]))
+      arg1=numpy.array([-2.0, 4.0])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[8.0, -16.0], [-14.0, 28.0]], [[0.0, 0.0], [-4.0, 8.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[-12.0, 
+24.0], [10.0, -20.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-6.0, 12.0]]], [[[-10.0, 20.0], [14.0, -28.0]], [[10.0, 
+-20.0], [2.0, -4.0]]], [[[4.0, -8.0], [14.0, -28.0]], [[-12.0, 24.0], [6.0, -12.0]]], [[[-8.0, 16.0], [-12.0, 24.0]], [[4.0, 
+-8.0], [-4.0, 8.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[2.0, -4.0], [8.0, -16.0]], [[8.0, -16.0], [0.0, 0.0]]], [[[14.0, -28.0], [12.0, 
+-24.0]], [[14.0, -28.0], [-10.0, 20.0]]], [[[12.0, -24.0], [0.0, 0.0]], [[-10.0, 20.0], [-8.0, 16.0]]], [[[-2.0, 4.0], [2.0, 
+-4.0]], [[0.0, 0.0], [-4.0, 8.0]]], [[[4.0, -8.0], [-8.0, 16.0]], [[-14.0, 28.0], [-2.0, 4.0]]], [[[14.0, -28.0], [14.0, 
+-28.0]], [[4.0, -8.0], [-14.0, 28.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_float_rank0_offset0(self):
-      arg0=numpy.array([[-4.0, 7.0, -2.0, 2.0, -5.0], [-4.0, 4.0, 0.0, -1.0, -2.0], [-7.0, 6.0, 0.0, 6.0, 4.0], [-7.0, -4.0, 
--1.0, -7.0, 7.0]])
-      arg1=-4.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[16.0, -28.0, 8.0, -8.0, 20.0], [16.0, -16.0, -0.0, 4.0, 8.0], [28.0, -24.0, -0.0, -24.0, -16.0], [28.0, 
-16.0, 4.0, 28.0, -28.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-7.0, 1.0], [4.0, 5.0]], [[1.0, 0.0], [-5.0, -2.0]], [[-4.0, 7.0], [-5.0, 4.0]], [[6.0, 0.0], 
+[-7.0, 2.0]], [[7.0, 5.0], [3.0, 0.0]], [[3.0, 7.0], [5.0, -1.0]]], [[[5.0, -2.0], [-6.0, -4.0]], [[-3.0, -2.0], [2.0, -6.0]], 
+[[7.0, -4.0], [7.0, -4.0]], [[4.0, 7.0], [-7.0, -7.0]], [[-2.0, 0.0], [-7.0, -6.0]], [[7.0, -5.0], [7.0, 6.0]]], [[[-2.0, 4.0], 
+[1.0, -2.0]], [[0.0, 6.0], [-5.0, 0.0]], [[2.0, -5.0], [0.0, -2.0]], [[2.0, 3.0], [-1.0, -4.0]], [[-4.0, 3.0], [5.0, 3.0]], 
+[[2.0, 2.0], [-1.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, 2.0], [-4.0, -4.0]], [[0.0, -4.0], [5.0, -1.0]], [[-5.0, -2.0], [5.0, 3.0]], 
+[[1.0, 6.0], [-6.0, -7.0]], [[-6.0, 0.0], [-1.0, -6.0]], [[4.0, -2.0], [-6.0, -3.0]]], [[[5.0, -5.0], [4.0, 6.0]], [[5.0, 
+-5.0], [-4.0, -4.0]], [[7.0, -1.0], [-7.0, 6.0]], [[5.0, 5.0], [-2.0, 2.0]], [[0.0, 2.0], [-1.0, 4.0]], [[4.0, 0.0], [-7.0, 
+-6.0]]], [[[-3.0, 4.0], [-6.0, 3.0]], [[-6.0, -4.0], [-5.0, 2.0]], [[0.0, -4.0], [-2.0, 5.0]], [[0.0, 5.0], [-6.0, 2.0]], 
+[[-6.0, -4.0], [-1.0, 5.0]], [[6.0, 6.0], [-3.0, -5.0]]]]))
+      arg1=numpy.array([[-7.0, 7.0], [3.0, 1.0], [-6.0, 0.0]])
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[76.0, -44.0], [-37.0, 5.0]], [[-52.0, 22.0], [-35.0, 31.0]]], [[[-16.0, 4.0], [-42.0, -2.0]], 
+[[71.0, -33.0], [-4.0, -20.0]]], [[[37.0, -21.0], [-31.0, 45.0]], [[56.0, -28.0], [-28.0, 24.0]]], [[[-42.0, 46.0], [3.0, 
+7.0]], [[34.0, -56.0], [-11.0, 7.0]]], [[[-31.0, 47.0], [-53.0, 35.0]], [[-72.0, 14.0], [-36.0, -6.0]]], [[[-12.0, 28.0], 
+[-76.0, 44.0]], [[-8.0, 42.0], [-17.0, -1.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[54.0, -16.0], [-53.0, 9.0]], [[76.0, -24.0], [28.0, -22.0]]], [[[51.0, 5.0], [37.0, 
+-33.0]], [[-17.0, 31.0], [-17.0, -11.0]]], [[[56.0, -28.0], [35.0, -15.0]], [[-44.0, 28.0], [-33.0, 27.0]]], [[[8.0, 12.0], 
+[-57.0, 47.0]], [[72.0, -44.0], [43.0, -47.0]]], [[[78.0, -42.0], [30.0, 2.0]], [[10.0, -8.0], [24.0, -38.0]]], [[[-52.0, 
+32.0], [-22.0, -14.0]], [[39.0, -49.0], [33.0, -27.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank0_offset0(self):
-      arg0=numpy.array([[7.0, 5.0, -3.0, -1.0, 6.0], [3.0, -7.0, 3.0, 6.0, -3.0], [0.0, 3.0, -2.0, -4.0, -6.0], [-3.0, -3.0, 
-3.0, -7.0, -5.0]])
-      arg1=numpy.array(-3.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[-21.0, -15.0, 9.0, 3.0, -18.0], [-9.0, 21.0, -9.0, -18.0, 9.0], [-0.0, -9.0, 6.0, 12.0, 18.0], [9.0, 
-9.0, -9.0, 21.0, 15.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-4.0, 0.0], [-6.0, -2.0]], [[-6.0, 5.0], [7.0, 0.0]], [[-6.0, 1.0], [-2.0, -5.0]], [[-1.0, 0.0], 
+[0.0, 6.0]], [[2.0, 1.0], [-2.0, 3.0]], [[7.0, 0.0], [2.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-4.0, 2.0], [-6.0, 5.0]], [[-7.0, -4.0], [-6.0, -2.0]], [[1.0, 0.0], [3.0, 5.0]], 
+[[-6.0, -6.0], [2.0, -6.0]], [[-7.0, -5.0], [3.0, 0.0]], [[-3.0, 2.0], [0.0, -3.0]]]))
+      arg1=Data(-5.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[20.0, -0.0], [30.0, 10.0]], [[30.0, -25.0], [-35.0, -0.0]], [[30.0, -5.0], [10.0, 25.0]], [[5.0, 
+-0.0], [-0.0, -30.0]], [[-10.0, -5.0], [10.0, -15.0]], [[-35.0, -0.0], [-10.0, 5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[20.0, -10.0], [30.0, -25.0]], [[35.0, 20.0], [30.0, 10.0]], [[-5.0, -0.0], [-15.0, 
+-25.0]], [[30.0, 30.0], [-10.0, 30.0]], [[35.0, 25.0], [-15.0, -0.0]], [[15.0, -10.0], [-0.0, 15.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank1_offset1(self):
-      arg0=numpy.array([[[5.0, 7.0, 4.0], [0.0, 6.0, -7.0], [-5.0, -3.0, 0.0], [-5.0, 0.0, -6.0], [-2.0, 3.0, 0.0]], [[-1.0, 
--5.0, 4.0], [0.0, -6.0, 5.0], [-5.0, 3.0, 4.0], [4.0, -3.0, 1.0], [5.0, -3.0, 0.0]], [[3.0, 0.0, -4.0], [4.0, 4.0, -5.0], [6.0, 
--4.0, 0.0], [4.0, 6.0, -3.0], [-2.0, 1.0, -6.0]], [[-3.0, -2.0, 3.0], [7.0, -2.0, 3.0], [7.0, -2.0, 0.0], [5.0, -6.0, -3.0], 
-[-7.0, 1.0, -6.0]]])
-      arg1=numpy.array([5.0, 0.0, -6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[1.0, 42.0, -25.0, 11.0, -10.0], [-29.0, -30.0, -49.0, 14.0, 25.0], [39.0, 50.0, 30.0, 38.0, 26.0], 
-[-33.0, 17.0, 35.0, 43.0, 1.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 3.0], [1.0, -1.0]], [[-4.0, -1.0], [5.0, -6.0]], [[-7.0, -1.0], [-5.0, 0.0]], [[0.0, 
+-2.0], [-1.0, -4.0]], [[-6.0, -3.0], [0.0, -2.0]], [[0.0, -4.0], [-1.0, 7.0]]], [[[-3.0, 0.0], [-6.0, 2.0]], [[3.0, 4.0], 
+[-6.0, 4.0]], [[6.0, 7.0], [4.0, -2.0]], [[-3.0, 6.0], [0.0, -7.0]], [[-6.0, -3.0], [7.0, 3.0]], [[7.0, 6.0], [7.0, 0.0]]], 
+[[[0.0, 5.0], [4.0, 6.0]], [[2.0, 1.0], [0.0, 2.0]], [[-2.0, -7.0], [3.0, -1.0]], [[-6.0, -2.0], [0.0, 1.0]], [[-7.0, 0.0], 
+[5.0, -2.0]], [[5.0, 4.0], [2.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, 6.0], [4.0, -7.0]], [[-4.0, 7.0], [-5.0, -5.0]], [[6.0, 2.0], [-4.0, 3.0]], 
+[[-4.0, -1.0], [6.0, -4.0]], [[-3.0, -1.0], [-2.0, -3.0]], [[0.0, 7.0], [6.0, -5.0]]], [[[-7.0, -2.0], [7.0, 5.0]], [[4.0, 
+2.0], [0.0, 0.0]], [[-7.0, -6.0], [1.0, 0.0]], [[6.0, -7.0], [5.0, -7.0]], [[7.0, 1.0], [-6.0, 2.0]], [[4.0, -7.0], [0.0, 
+-4.0]]], [[[-7.0, 0.0], [-4.0, 0.0]], [[-5.0, 6.0], [7.0, 4.0]], [[-3.0, -1.0], [6.0, -6.0]], [[-3.0, -7.0], [1.0, 7.0]], 
+[[0.0, 4.0], [-7.0, 2.0]], [[0.0, 5.0], [6.0, 1.0]]]]))
+      arg1=Data(numpy.array([6.0, -3.0, -4.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[9.0, -2.0], [8.0, -36.0]], [[-41.0, -22.0], [48.0, -56.0]], [[-52.0, 1.0], [-54.0, 10.0]], 
+[[33.0, -22.0], [-6.0, -7.0]], [[10.0, -9.0], [-41.0, -13.0]], [[-41.0, -58.0], [-35.0, 46.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[25.0, 42.0], [19.0, -57.0]], [[-16.0, 12.0], [-58.0, -46.0]], [[69.0, 34.0], [-51.0, 
+42.0]], [[-30.0, 43.0], [17.0, -31.0]], [[-39.0, -25.0], [34.0, -32.0]], [[-12.0, 43.0], [12.0, -22.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank2_offset2(self):
-      arg0=numpy.array([[[[0.0, -2.0, 7.0], [5.0, -1.0, 0.0]], [[-1.0, -3.0, -7.0], [-7.0, -2.0, 0.0]], [[-6.0, 0.0, -7.0], 
-[-2.0, 6.0, 2.0]], [[1.0, 0.0, -4.0], [-2.0, 5.0, -5.0]], [[6.0, 6.0, 4.0], [7.0, 4.0, 2.0]]], [[[-7.0, 6.0, 1.0], [-2.0, -7.0, 
--6.0]], [[-3.0, 7.0, 5.0], [-3.0, -4.0, 3.0]], [[5.0, -2.0, -6.0], [3.0, -3.0, 0.0]], [[-4.0, 1.0, 7.0], [6.0, -4.0, 0.0]], 
-[[-5.0, 2.0, 3.0], [-7.0, 3.0, 4.0]]], [[[2.0, 7.0, 2.0], [0.0, -3.0, 2.0]], [[2.0, -1.0, 3.0], [2.0, 7.0, 0.0]], [[2.0, 5.0, 
--5.0], [0.0, 3.0, -6.0]], [[4.0, 3.0, 4.0], [-5.0, -2.0, 2.0]], [[-5.0, 2.0, 7.0], [-2.0, 6.0, -5.0]]], [[[2.0, 6.0, -5.0], 
-[5.0, -7.0, 1.0]], [[0.0, -6.0, 5.0], [7.0, 0.0, -5.0]], [[2.0, 1.0, -1.0], [0.0, 6.0, -3.0]], [[0.0, 0.0, 0.0], [-1.0, -5.0, 
-5.0]], [[-2.0, 0.0, -6.0], [3.0, 7.0, -2.0]]]])
-      arg1=numpy.array([[0.0, 2.0, -1.0], [-5.0, 4.0, 3.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[-40.0, 28.0, 47.0, 19.0, -5.0], [-25.0, 17.0, -25.0, -51.0, 60.0], [6.0, 13.0, 9.0, 25.0, 16.0], 
-[-33.0, -67.0, 18.0, 0.0, 13.0]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[7.0, 7.0], [6.0, 0.0]], [[-6.0, 1.0], [-1.0, -6.0]], [[-4.0, 7.0], [1.0, 0.0]], [[6.0, -2.0], 
+[1.0, -5.0]], [[5.0, 2.0], [3.0, -6.0]], [[-5.0, 0.0], [-6.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -1.0], [-2.0, 7.0]], [[-5.0, 5.0], [-2.0, -4.0]], [[-5.0, -3.0], [-7.0, 6.0]], 
+[[0.0, -5.0], [-1.0, -2.0]], [[1.0, 4.0], [-1.0, -2.0]], [[-5.0, -3.0], [2.0, -7.0]]]))
+      arg1=Data(numpy.array([1.0, -4.0]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[7.0, -28.0], [7.0, -28.0]], [[6.0, -24.0], [0.0, 0.0]]], [[[-6.0, 24.0], [1.0, -4.0]], [[-1.0, 
+4.0], [-6.0, 24.0]]], [[[-4.0, 16.0], [7.0, -28.0]], [[1.0, -4.0], [0.0, 0.0]]], [[[6.0, -24.0], [-2.0, 8.0]], [[1.0, -4.0], 
+[-5.0, 20.0]]], [[[5.0, -20.0], [2.0, -8.0]], [[3.0, -12.0], [-6.0, 24.0]]], [[[-5.0, 20.0], [0.0, 0.0]], [[-6.0, 24.0], [-6.0, 
+24.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-3.0, 12.0], [-1.0, 4.0]], [[-2.0, 8.0], [7.0, -28.0]]], [[[-5.0, 20.0], [5.0, 
+-20.0]], [[-2.0, 8.0], [-4.0, 16.0]]], [[[-5.0, 20.0], [-3.0, 12.0]], [[-7.0, 28.0], [6.0, -24.0]]], [[[0.0, 0.0], [-5.0, 
+20.0]], [[-1.0, 4.0], [-2.0, 8.0]]], [[[1.0, -4.0], [4.0, -16.0]], [[-1.0, 4.0], [-2.0, 8.0]]], [[[-5.0, 20.0], [-3.0, 12.0]], 
+[[2.0, -8.0], [-7.0, 28.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank1_offset0(self):
-      arg0=numpy.array([[-6.0, -2.0, -2.0, 4.0, -2.0], [-7.0, 1.0, -5.0, -5.0, 1.0], [2.0, 6.0, 6.0, 0.0, 5.0], [6.0, -4.0, 
-6.0, 5.0, -5.0]])
-      arg1=numpy.array([6.0, -6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-36.0, 36.0], [-12.0, 12.0], [-12.0, 12.0], [24.0, -24.0], [-12.0, 12.0]], [[-42.0, 42.0], [6.0, 
--6.0], [-30.0, 30.0], [-30.0, 30.0], [6.0, -6.0]], [[12.0, -12.0], [36.0, -36.0], [36.0, -36.0], [0.0, 0.0], [30.0, -30.0]], 
-[[36.0, -36.0], [-24.0, 24.0], [36.0, -36.0], [30.0, -30.0], [-30.0, 30.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-1.0, 0.0], [-7.0, -5.0]], [[-4.0, -7.0], [-5.0, 2.0]], [[6.0, 2.0], [-1.0, -4.0]], [[0.0, 
+0.0], [-5.0, 2.0]], [[-4.0, 0.0], [2.0, -3.0]], [[5.0, 1.0], [3.0, 0.0]]], [[[-6.0, 1.0], [-7.0, -7.0]], [[-6.0, 6.0], [4.0, 
+3.0]], [[0.0, -5.0], [5.0, 6.0]], [[-4.0, -7.0], [-7.0, 3.0]], [[4.0, 1.0], [4.0, 5.0]], [[-2.0, 1.0], [7.0, -5.0]]], [[[-7.0, 
+-5.0], [-4.0, -2.0]], [[0.0, 4.0], [0.0, 1.0]], [[-7.0, 1.0], [-1.0, -4.0]], [[6.0, 4.0], [6.0, -4.0]], [[-1.0, 4.0], [-3.0, 
+6.0]], [[-7.0, -2.0], [-4.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, 1.0], [4.0, -2.0]], [[-3.0, 0.0], [2.0, -7.0]], [[7.0, 2.0], [-5.0, -4.0]], 
+[[-4.0, -2.0], [-5.0, -5.0]], [[4.0, -5.0], [0.0, 5.0]], [[-4.0, -7.0], [3.0, 7.0]]], [[[-1.0, 4.0], [3.0, 1.0]], [[-1.0, 2.0], 
+[-4.0, -6.0]], [[-7.0, 4.0], [0.0, -3.0]], [[-4.0, 2.0], [5.0, 4.0]], [[-2.0, 4.0], [-1.0, 5.0]], [[5.0, 2.0], [0.0, -3.0]]], 
+[[[0.0, -2.0], [4.0, -4.0]], [[0.0, -7.0], [-5.0, 0.0]], [[4.0, 0.0], [0.0, 4.0]], [[1.0, 5.0], [4.0, -3.0]], [[-6.0, 3.0], 
+[4.0, 0.0]], [[-6.0, -6.0], [0.0, -2.0]]]]))
+      arg1=Data(numpy.array([[5.0, 0.0], [5.0, 6.0], [6.0, -4.0]]),self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-77.0, -8.0], [-25.0, 26.0]], [[-94.0, -26.0], [-72.0, -34.0]]], [[[-50.0, -36.0], [19.0, 
+20.0]], [[-5.0, 24.0], [31.0, 14.0]]], [[[-12.0, 28.0], [-9.0, -34.0]], [[14.0, 34.0], [-14.0, 52.0]]], [[[16.0, -48.0], 
+[-11.0, -58.0]], [[-24.0, -66.0], [1.0, 34.0]]], [[[-6.0, 28.0], [29.0, -10.0]], [[12.0, 36.0], [46.0, 6.0]]], [[[-27.0, 16.0], 
+[-2.0, 14.0]], [[26.0, 58.0], [-25.0, -30.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-30.0, -6.0], [13.0, 32.0]], [[59.0, 2.0], [-29.0, 22.0]]], [[[-20.0, -6.0], [-32.0, 
+40.0]], [[-40.0, -4.0], [-65.0, -36.0]]], [[[24.0, -58.0], [30.0, 24.0]], [[-25.0, 0.0], [-11.0, -34.0]]], [[[-34.0, -28.0], 
+[30.0, -8.0]], [[24.0, 14.0], [-23.0, 36.0]]], [[[-26.0, 12.0], [13.0, 12.0]], [[19.0, -22.0], [50.0, 30.0]]], [[[-31.0, 54.0], 
+[-61.0, 36.0]], [[15.0, 0.0], [8.0, -10.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank2_offset1(self):
-      arg0=numpy.array([[[1.0, -1.0, -2.0], [-4.0, -4.0, -2.0], [-4.0, 3.0, 5.0], [5.0, 3.0, 0.0], [-7.0, 0.0, -2.0]], [[-5.0, 
-4.0, 1.0], [-4.0, 6.0, -2.0], [-7.0, 2.0, -6.0], [7.0, -3.0, -5.0], [7.0, 6.0, -1.0]], [[4.0, 5.0, 4.0], [5.0, 0.0, 6.0], [2.0, 
--5.0, 7.0], [2.0, 0.0, 6.0], [-3.0, 4.0, -1.0]], [[-6.0, -3.0, 3.0], [6.0, 5.0, -3.0], [0.0, -2.0, 1.0], [0.0, -1.0, 5.0], 
-[-5.0, 3.0, -5.0]]])
-      arg1=numpy.array([[-5.0, 2.0, -5.0], [4.0, -3.0, -5.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[3.0, 17.0], [22.0, 6.0], [1.0, -50.0], [-19.0, 11.0], [45.0, -18.0]], [[28.0, -37.0], [42.0, -24.0], 
-[69.0, -4.0], [-16.0, 62.0], [-18.0, 15.0]], [[-30.0, -19.0], [-55.0, -10.0], [-55.0, -12.0], [-40.0, -22.0], [28.0, -19.0]], 
-[[9.0, -30.0], [-5.0, 24.0], [-9.0, 1.0], [-27.0, -22.0], [56.0, -4.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[0.0, -2.0], [5.0, 0.0]], [[2.0, -3.0], [-7.0, 3.0]], [[-4.0, -5.0], [-6.0, 7.0]], [[-7.0, -6.0], 
+[-1.0, -4.0]], [[-7.0, 3.0], [3.0, -6.0]], [[-1.0, -2.0], [-7.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, -2.0], [7.0, 0.0]], [[-2.0, 4.0], [4.0, 3.0]], [[-7.0, 4.0], [0.0, 0.0]], 
+[[7.0, -6.0], [-2.0, 4.0]], [[5.0, 5.0], [0.0, -1.0]], [[0.0, 7.0], [3.0, -4.0]]]))
+      arg1=Data(5.0,self.functionspace)
+      arg1.setTaggedValue(1,6.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[0.0, -10.0], [25.0, 0.0]], [[10.0, -15.0], [-35.0, 15.0]], [[-20.0, -25.0], [-30.0, 35.0]], 
+[[-35.0, -30.0], [-5.0, -20.0]], [[-35.0, 15.0], [15.0, -30.0]], [[-5.0, -10.0], [-35.0, -10.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, -12.0], [42.0, 0.0]], [[-12.0, 24.0], [24.0, 18.0]], [[-42.0, 24.0], [0.0, 
+0.0]], [[42.0, -36.0], [-12.0, 24.0]], [[30.0, 30.0], [0.0, -6.0]], [[0.0, 42.0], [18.0, -24.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank3_offset2(self):
-      arg0=numpy.array([[[[6.0, 0.0, -1.0], [-3.0, -6.0, -2.0]], [[0.0, -7.0, 3.0], [4.0, -3.0, 7.0]], [[-1.0, -5.0, -2.0], 
-[3.0, 5.0, -5.0]], [[0.0, -3.0, -3.0], [-7.0, 2.0, 1.0]], [[-1.0, -7.0, 5.0], [1.0, 7.0, 3.0]]], [[[-4.0, -4.0, 0.0], [3.0, 
-2.0, 3.0]], [[-1.0, -5.0, 0.0], [2.0, 6.0, 7.0]], [[-2.0, 4.0, 4.0], [7.0, 1.0, 4.0]], [[3.0, 7.0, -4.0], [5.0, 0.0, -4.0]], 
-[[6.0, -2.0, 4.0], [0.0, 4.0, -1.0]]], [[[6.0, -7.0, -7.0], [-4.0, -5.0, -1.0]], [[-4.0, -3.0, -1.0], [-1.0, 0.0, 4.0]], 
-[[-6.0, 3.0, 0.0], [-7.0, -2.0, -6.0]], [[-7.0, 1.0, 7.0], [5.0, 1.0, 1.0]], [[1.0, 0.0, 2.0], [-3.0, -2.0, -7.0]]], [[[0.0, 
-2.0, 4.0], [-6.0, 1.0, -7.0]], [[2.0, -1.0, -2.0], [5.0, 4.0, 6.0]], [[5.0, 1.0, -1.0], [0.0, 4.0, 0.0]], [[3.0, -7.0, -2.0], 
-[5.0, 6.0, 4.0]], [[5.0, -5.0, 4.0], [0.0, -7.0, 7.0]]]])
-      arg1=numpy.array([[[0.0, -3.0, 1.0], [0.0, 5.0, -3.0]], [[0.0, 5.0, -2.0], [0.0, -7.0, -4.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[-25.0, 52.0], [-12.0, -48.0], [53.0, -36.0], [13.0, -27.0], [52.0, -106.0]], [[13.0, -46.0], [24.0, 
--95.0], [-15.0, -11.0], [-13.0, 59.0], [33.0, -42.0]], [[-8.0, 18.0], [-4.0, -29.0], [-1.0, 53.0], [6.0, -20.0], [13.0, 38.0]], 
-[[24.0, 23.0], [3.0, -53.0], [16.0, -21.0], [37.0, -89.0], [-37.0, -12.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[1.0, -6.0], [0.0, -4.0]], [[-2.0, -3.0], [-6.0, 2.0]], [[-3.0, 0.0], [-2.0, 3.0]], [[-1.0, 
+-6.0], [3.0, 1.0]], [[-2.0, 7.0], [3.0, 1.0]], [[7.0, -3.0], [4.0, -4.0]]], [[[0.0, 0.0], [-7.0, 0.0]], [[7.0, 0.0], [4.0, 
+0.0]], [[-4.0, 0.0], [3.0, 3.0]], [[0.0, 5.0], [7.0, -5.0]], [[-7.0, 7.0], [-7.0, -4.0]], [[-5.0, -4.0], [6.0, -3.0]]], 
+[[[-5.0, 5.0], [6.0, 2.0]], [[2.0, -3.0], [4.0, 5.0]], [[1.0, 4.0], [1.0, -3.0]], [[0.0, 1.0], [-4.0, 1.0]], [[2.0, 3.0], 
+[-3.0, -7.0]], [[-6.0, -7.0], [-5.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, -5.0], [6.0, -3.0]], [[4.0, 6.0], [-2.0, 1.0]], [[-5.0, 5.0], [0.0, -3.0]], 
+[[3.0, 4.0], [-3.0, -5.0]], [[-4.0, 0.0], [-2.0, -1.0]], [[4.0, 6.0], [4.0, -2.0]]], [[[5.0, 3.0], [-6.0, -4.0]], [[0.0, -6.0], 
+[0.0, 4.0]], [[-7.0, -1.0], [-5.0, -1.0]], [[-6.0, -4.0], [2.0, -3.0]], [[-5.0, 6.0], [-3.0, -2.0]], [[-4.0, 0.0], [5.0, 
+5.0]]], [[[6.0, 3.0], [0.0, 5.0]], [[0.0, -7.0], [-1.0, 1.0]], [[1.0, 0.0], [-3.0, -7.0]], [[-5.0, 3.0], [-3.0, 7.0]], [[0.0, 
+-2.0], [1.0, -2.0]], [[0.0, 6.0], [6.0, -1.0]]]]))
+      arg1=Data(numpy.array([-7.0, -3.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, 7.0, 6.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[8.0, 27.0], [3.0, 22.0]], [[-13.0, 30.0], [18.0, -29.0]], [[30.0, -12.0], [2.0, -21.0]], [[7.0, 
+24.0], [-30.0, 5.0]], [[29.0, -79.0], [9.0, 26.0]], [[-16.0, 54.0], [-31.0, 40.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[22.0, 4.0], [0.0, -19.0]], [[28.0, -42.0], [-20.0, 41.0]], [[-78.0, 28.0], [-53.0, 
+-70.0]], [[-51.0, 18.0], [-25.0, -14.0]], [[-63.0, 30.0], [-29.0, -33.0]], [[0.0, 78.0], [99.0, 15.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_array_rank2_offset0(self):
-      arg0=numpy.array([[4.0, 0.0, -5.0, -3.0, 2.0], [-2.0, 3.0, -1.0, 0.0, -5.0], [-4.0, -7.0, -6.0, 2.0, 5.0], [-3.0, 1.0, 
--3.0, -5.0, 5.0]])
-      arg1=numpy.array([[-5.0, 5.0, 0.0, -5.0, -1.0], [-4.0, -2.0, -4.0, -6.0, 6.0], [-1.0, 7.0, 0.0, 7.0, 7.0], [7.0, 0.0, 
--5.0, 3.0, -5.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-20.0, 20.0, 0.0, -20.0, -4.0], [-16.0, -8.0, -16.0, -24.0, 24.0], [-4.0, 28.0, 0.0, 28.0, 28.0], 
-[28.0, 0.0, -20.0, 12.0, -20.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[25.0, -25.0, 0.0, 25.0, 5.0], [20.0, 10.0, 20.0, 30.0, -30.0], [5.0, -35.0, 0.0, -35.0, -35.0], [-35.0, 0.0, 
-25.0, -15.0, 25.0]], [[15.0, -15.0, 0.0, 15.0, 3.0], [12.0, 6.0, 12.0, 18.0, -18.0], [3.0, -21.0, 0.0, -21.0, -21.0], [-21.0, 
-0.0, 15.0, -9.0, 15.0]], [[-10.0, 10.0, 0.0, -10.0, -2.0], [-8.0, -4.0, -8.0, -12.0, 12.0], [-2.0, 14.0, 0.0, 14.0, 14.0], 
-[14.0, 0.0, -10.0, 6.0, -10.0]]], [[[10.0, -10.0, 0.0, 10.0, 2.0], [8.0, 4.0, 8.0, 12.0, -12.0], [2.0, -14.0, 0.0, -14.0, 
--14.0], [-14.0, 0.0, 10.0, -6.0, 10.0]], [[-15.0, 15.0, 0.0, -15.0, -3.0], [-12.0, -6.0, -12.0, -18.0, 18.0], [-3.0, 21.0, 0.0, 
-21.0, 21.0], [21.0, 0.0, -15.0, 9.0, -15.0]], [[5.0, -5.0, 0.0, 5.0, 1.0], [4.0, 2.0, 4.0, 6.0, -6.0], [1.0, -7.0, 0.0, -7.0, 
--7.0], [-7.0, 0.0, 5.0, -3.0, 5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[25.0, -25.0, 0.0, 25.0, 5.0], [20.0, 10.0, 20.0, 30.0, -30.0], [5.0, -35.0, 0.0, -35.0, -35.0], [-35.0, 
-0.0, 25.0, -15.0, 25.0]]], [[[20.0, -20.0, 0.0, 20.0, 4.0], [16.0, 8.0, 16.0, 24.0, -24.0], [4.0, -28.0, 0.0, -28.0, -28.0], 
-[-28.0, 0.0, 20.0, -12.0, 20.0]], [[35.0, -35.0, 0.0, 35.0, 7.0], [28.0, 14.0, 28.0, 42.0, -42.0], [7.0, -49.0, 0.0, -49.0, 
--49.0], [-49.0, 0.0, 35.0, -21.0, 35.0]], [[30.0, -30.0, 0.0, 30.0, 6.0], [24.0, 12.0, 24.0, 36.0, -36.0], [6.0, -42.0, 0.0, 
--42.0, -42.0], [-42.0, 0.0, 30.0, -18.0, 30.0]], [[-10.0, 10.0, 0.0, -10.0, -2.0], [-8.0, -4.0, -8.0, -12.0, 12.0], [-2.0, 
-14.0, 0.0, 14.0, 14.0], [14.0, 0.0, -10.0, 6.0, -10.0]], [[-25.0, 25.0, 0.0, -25.0, -5.0], [-20.0, -10.0, -20.0, -30.0, 30.0], 
-[-5.0, 35.0, 0.0, 35.0, 35.0], [35.0, 0.0, -25.0, 15.0, -25.0]]], [[[15.0, -15.0, 0.0, 15.0, 3.0], [12.0, 6.0, 12.0, 18.0, 
--18.0], [3.0, -21.0, 0.0, -21.0, -21.0], [-21.0, 0.0, 15.0, -9.0, 15.0]], [[-5.0, 5.0, 0.0, -5.0, -1.0], [-4.0, -2.0, -4.0, 
--6.0, 6.0], [-1.0, 7.0, 0.0, 7.0, 7.0], [7.0, 0.0, -5.0, 3.0, -5.0]], [[15.0, -15.0, 0.0, 15.0, 3.0], [12.0, 6.0, 12.0, 18.0, 
--18.0], [3.0, -21.0, 0.0, -21.0, -21.0], [-21.0, 0.0, 15.0, -9.0, 15.0]], [[25.0, -25.0, 0.0, 25.0, 5.0], [20.0, 10.0, 20.0, 
-30.0, -30.0], [5.0, -35.0, 0.0, -35.0, -35.0], [-35.0, 0.0, 25.0, -15.0, 25.0]], [[-25.0, 25.0, 0.0, -25.0, -5.0], [-20.0, 
--10.0, -20.0, -30.0, 30.0], [-5.0, 35.0, 0.0, 35.0, 35.0], [35.0, 0.0, -25.0, 15.0, -25.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[2.0, -1.0], [5.0, 5.0]], [[-6.0, -1.0], [6.0, 5.0]], [[-7.0, 0.0], [-7.0, 1.0]], [[5.0, -5.0], 
+[6.0, 3.0]], [[0.0, -1.0], [3.0, 3.0]], [[6.0, 0.0], [4.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 5.0], [3.0, 3.0]], [[-2.0, 5.0], [-5.0, 6.0]], [[5.0, -2.0], [6.0, 3.0]], 
+[[2.0, 6.0], [2.0, 5.0]], [[-5.0, 0.0], [-6.0, -2.0]], [[-6.0, 0.0], [0.0, 5.0]]]))
+      arg1=Data(numpy.array([0.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, -7.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 6.0], [0.0, -3.0]], [[0.0, 15.0], [0.0, 15.0]]], [[[0.0, -18.0], [0.0, -3.0]], [[0.0, 
+18.0], [0.0, 15.0]]], [[[0.0, -21.0], [0.0, 0.0]], [[0.0, -21.0], [0.0, 3.0]]], [[[0.0, 15.0], [0.0, -15.0]], [[0.0, 18.0], 
+[0.0, 9.0]]], [[[0.0, 0.0], [0.0, -3.0]], [[0.0, 9.0], [0.0, 9.0]]], [[[0.0, 18.0], [0.0, 0.0]], [[0.0, 12.0], [0.0, 
+12.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[6.0, 42.0], [-5.0, -35.0]], [[-3.0, -21.0], [-3.0, -21.0]]], [[[2.0, 14.0], [-5.0, 
+-35.0]], [[5.0, 35.0], [-6.0, -42.0]]], [[[-5.0, -35.0], [2.0, 14.0]], [[-6.0, -42.0], [-3.0, -21.0]]], [[[-2.0, -14.0], [-6.0, 
+-42.0]], [[-2.0, -14.0], [-5.0, -35.0]]], [[[5.0, 35.0], [0.0, 0.0]], [[6.0, 42.0], [2.0, 14.0]]], [[[6.0, 42.0], [0.0, 0.0]], 
+[[0.0, 0.0], [-5.0, -35.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank3_offset1(self):
-      arg0=numpy.array([[[-6.0, -4.0, 4.0], [6.0, -2.0, -7.0], [4.0, -4.0, -6.0], [7.0, 1.0, -7.0], [5.0, -4.0, -3.0]], [[4.0, 
--1.0, 6.0], [-1.0, 6.0, 0.0], [6.0, -2.0, 3.0], [7.0, 6.0, -7.0], [2.0, -3.0, -1.0]], [[0.0, -5.0, 3.0], [-7.0, -5.0, -3.0], 
-[7.0, -7.0, 7.0], [-3.0, 0.0, 0.0], [5.0, 2.0, 7.0]], [[-1.0, -6.0, 7.0], [0.0, 4.0, 2.0], [7.0, -4.0, 6.0], [-4.0, -4.0, 
--6.0], [-6.0, 7.0, -3.0]]])
-      arg1=numpy.array([[[-6.0, -3.0, -5.0], [-7.0, 5.0, 6.0], [-4.0, 2.0, 0.0], [-7.0, 7.0, 4.0], [7.0, -5.0, 6.0]], [[3.0, 
-2.0, -2.0], [0.0, 1.0, -6.0], [-4.0, 2.0, 5.0], [-2.0, 0.0, 0.0], [-3.0, -5.0, 6.0]], [[3.0, 0.0, 0.0], [0.0, 4.0, 1.0], [-2.0, 
-5.0, -1.0], [2.0, 2.0, -7.0], [-2.0, 7.0, -6.0]], [[-5.0, -4.0, 4.0], [3.0, 7.0, -5.0], [5.0, -3.0, 6.0], [-3.0, 6.0, 6.0], 
-[-1.0, 0.0, 2.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[28.0, 46.0, 16.0, 30.0, 2.0], [-34.0, -28.0, 36.0, 12.0, 62.0], [-18.0, -12.0, -12.0, -48.0, -40.0], 
-[62.0, -66.0, 6.0, 18.0, 14.0]], [[5.0, -94.0, -28.0, -84.0, 10.0], [28.0, 40.0, -63.0, -12.0, -50.0], [18.0, -15.0, -15.0, 
-57.0, 16.0], [-50.0, 39.0, -6.0, -72.0, -20.0]], [[18.0, -84.0, -24.0, -80.0, 12.0], [16.0, 32.0, -54.0, -8.0, -28.0], [12.0, 
--22.0, -22.0, 42.0, 0.0], [-28.0, 14.0, -4.0, -72.0, -16.0]], [[-10.0, -86.0, -26.0, -70.0, 2.0], [37.0, 43.0, -61.0, -14.0, 
--68.0], [21.0, -3.0, -2.0, 65.0, 35.0], [-67.0, 63.0, -10.0, -57.0, -21.0]], [[-3.0, -73.0, -28.0, -75.0, 37.0], [13.0, 14.0, 
--43.0, -10.0, -13.0], [15.0, -19.0, -27.0, 23.0, -20.0], [-21.0, 2.0, 19.0, -57.0, -11.0]]], [[[-51.0, 3.0, -18.0, -11.0, 
-69.0], [-2.0, -37.0, 12.0, -8.0, 29.0], [12.0, 2.0, -19.0, -36.0, -51.0], [8.0, -25.0, 59.0, 18.0, 8.0]], [[-12.0, 37.0, 16.0, 
-49.0, -37.0], [9.0, 6.0, 16.0, 2.0, -27.0], [-3.0, 24.0, 32.0, 10.0, 44.0], [-19.0, 39.0, -23.0, 39.0, 1.0]], [[-45.0, -34.0, 
--28.0, -44.0, 70.0], [8.0, -20.0, -13.0, -12.0, 10.0], [18.0, -5.0, -25.0, -13.0, -44.0], [-10.0, -11.0, 54.0, -12.0, 0.0]], 
-[[-25.0, -61.0, -16.0, -35.0, -23.0], [47.0, 48.0, -51.0, -14.0, -93.0], [21.0, 17.0, 23.0, 75.0, 70.0], [-87.0, 98.0, -25.0, 
--27.0, -21.0]], [[2.0, -35.0, -14.0, -39.0, 23.0], [2.0, 3.0, -19.0, -4.0, 3.0], [6.0, -13.0, -18.0, 5.0, -19.0], [-2.0, -10.0, 
-13.0, -30.0, -4.0]]], [[[0.0, -7.0, -10.0, -23.0, 43.0], [-16.0, -23.0, 5.0, 0.0, 43.0], [0.0, -17.0, -28.0, -31.0, -53.0], 
-[32.0, -50.0, 33.0, -12.0, 6.0]], [[72.0, 6.0, 18.0, 2.0, -42.0], [-25.0, 13.0, 3.0, 14.0, 28.0], [-21.0, -23.0, -8.0, -3.0, 
--3.0], [43.0, -41.0, -38.0, -27.0, 1.0]], [[-56.0, -42.0, -42.0, -70.0, 126.0], [-7.0, -49.0, -7.0, -14.0, 56.0], [21.0, -21.0, 
--56.0, -49.0, -105.0], [21.0, -63.0, 98.0, -21.0, 7.0]], [[18.0, 21.0, 12.0, 21.0, -21.0], [-9.0, 0.0, 12.0, 6.0, 9.0], [-9.0, 
-0.0, 6.0, -6.0, 6.0], [15.0, -9.0, -15.0, 9.0, 3.0]], [[-71.0, 17.0, -16.0, 7.0, 67.0], [5.0, -40.0, 19.0, -10.0, 17.0], [15.0, 
-15.0, -7.0, -35.0, -38.0], [-5.0, -6.0, 61.0, 39.0, 9.0]]], [[[-11.0, 19.0, -8.0, -7.0, 65.0], [-29.0, -48.0, 27.0, 2.0, 75.0], 
-[-3.0, -17.0, -35.0, -63.0, -82.0], [57.0, -80.0, 55.0, 9.0, 15.0]], [[-22.0, 32.0, 8.0, 36.0, -8.0], [4.0, -8.0, 18.0, 0.0, 
--8.0], [0.0, 18.0, 18.0, -6.0, 16.0], [-8.0, 18.0, 0.0, 36.0, 4.0]], [[-60.0, -33.0, -36.0, -53.0, 105.0], [1.0, -40.0, -6.0, 
--14.0, 35.0], [21.0, -10.0, -40.0, -36.0, -78.0], [5.0, -37.0, 83.0, -9.0, 5.0]], [[66.0, -28.0, 8.0, -24.0, -44.0], [-8.0, 
-32.0, -22.0, 8.0, -4.0], [-12.0, -22.0, -6.0, 26.0, 16.0], [12.0, -10.0, -44.0, -48.0, -8.0]], [[30.0, 59.0, 38.0, 79.0, 
--95.0], [2.0, 25.0, 23.0, 12.0, -35.0], [-18.0, 25.0, 50.0, 23.0, 79.0], [-10.0, 46.0, -69.0, 42.0, 0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, -4.0], [-1.0, 0.0]], [[2.0, -6.0], [3.0, -7.0]], [[6.0, -7.0], [1.0, 2.0]], [[-4.0, 5.0], 
+[6.0, 4.0]], [[2.0, 0.0], [3.0, 1.0]], [[0.0, 2.0], [-2.0, 0.0]]], [[[-4.0, 1.0], [0.0, 3.0]], [[1.0, 0.0], [3.0, 1.0]], 
+[[-2.0, -3.0], [6.0, 4.0]], [[-7.0, 0.0], [-4.0, 7.0]], [[-5.0, -7.0], [4.0, 0.0]], [[-7.0, -4.0], [2.0, 1.0]]], [[[2.0, -3.0], 
+[4.0, -5.0]], [[6.0, -6.0], [-5.0, -1.0]], [[-3.0, 2.0], [0.0, -2.0]], [[3.0, -2.0], [7.0, 1.0]], [[5.0, -1.0], [-4.0, 4.0]], 
+[[0.0, 2.0], [0.0, -2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, 6.0], [7.0, -2.0]], [[6.0, -6.0], [6.0, 3.0]], [[1.0, -5.0], [5.0, 0.0]], 
+[[-3.0, 0.0], [1.0, 2.0]], [[1.0, 0.0], [7.0, 4.0]], [[6.0, -7.0], [-3.0, 0.0]]], [[[-2.0, -4.0], [-3.0, 5.0]], [[6.0, 0.0], 
+[-4.0, 7.0]], [[5.0, 5.0], [-2.0, -6.0]], [[-4.0, 7.0], [-5.0, -4.0]], [[0.0, 7.0], [-1.0, -3.0]], [[-1.0, -1.0], [-3.0, 
+5.0]]], [[[-3.0, -1.0], [4.0, -4.0]], [[4.0, 1.0], [5.0, -2.0]], [[-1.0, -5.0], [3.0, 7.0]], [[-4.0, -7.0], [0.0, 2.0]], 
+[[-2.0, -3.0], [7.0, -5.0]], [[3.0, 6.0], [-6.0, 4.0]]]]))
+      arg1=Data(numpy.array([[4.0, -2.0], [5.0, 5.0], [-6.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 7.0], [7.0, 0.0], [6.0, -5.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-32.0, -12.0], [7.0, 1.0]], [[-28.0, 18.0], [45.0, -5.0]]], [[[-23.0, 25.0], [12.0, -12.0]], 
+[[57.0, -11.0], [-17.0, 15.0]]], [[[32.0, -34.0], [-55.0, 7.0]], [[34.0, 28.0], [40.0, 8.0]]], [[[-69.0, -15.0], [32.0, 
+-18.0]], [[-38.0, -4.0], [45.0, 31.0]]], [[[-47.0, -9.0], [-29.0, -39.0]], [[56.0, -2.0], [-20.0, 14.0]]], [[[-35.0, -35.0], 
+[-24.0, -16.0]], [[2.0, 14.0], [17.0, -3.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-32.0, 22.0], [-34.0, 47.0]], [[3.0, 29.0], [11.0, 6.0]]], [[[66.0, 22.0], [6.0, 
+-47.0]], [[2.0, 17.0], [37.0, 31.0]]], [[[29.0, 12.0], [5.0, -10.0]], [[4.0, 20.0], [0.0, -35.0]]], [[[-52.0, -1.0], [7.0, 
+35.0]], [[-35.0, 7.0], [-16.0, 4.0]]], [[[-12.0, 17.0], [31.0, 15.0]], [[35.0, 14.0], [-51.0, 53.0]]], [[[11.0, 27.0], [29.0, 
+-79.0]], [[-57.0, 9.0], [59.0, -20.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank4_offset2(self):
-      arg0=numpy.array([[[[-2.0, 5.0, 7.0], [5.0, -7.0, 2.0]], [[-3.0, -1.0, 6.0], [-3.0, 4.0, -5.0]], [[3.0, -3.0, -7.0], 
-[-6.0, -2.0, -1.0]], [[7.0, -2.0, 3.0], [0.0, 0.0, 5.0]], [[6.0, 4.0, -1.0], [-2.0, -2.0, -5.0]]], [[[6.0, -2.0, 3.0], [0.0, 
-1.0, -5.0]], [[-3.0, -2.0, 7.0], [-6.0, -1.0, -7.0]], [[-6.0, -1.0, -5.0], [7.0, -6.0, 6.0]], [[0.0, 7.0, -5.0], [5.0, -4.0, 
-4.0]], [[-4.0, -6.0, -5.0], [-3.0, 6.0, -5.0]]], [[[5.0, 6.0, -4.0], [-3.0, 0.0, 0.0]], [[0.0, 3.0, -3.0], [-1.0, 3.0, 0.0]], 
-[[-4.0, -3.0, 5.0], [-7.0, -7.0, -1.0]], [[7.0, -1.0, 1.0], [2.0, -7.0, -3.0]], [[0.0, 5.0, -7.0], [-1.0, -1.0, 0.0]]], 
-[[[-1.0, 7.0, 6.0], [0.0, 1.0, -1.0]], [[-3.0, 7.0, 3.0], [0.0, 7.0, 0.0]], [[6.0, 2.0, 0.0], [0.0, 3.0, -1.0]], [[5.0, 7.0, 
--3.0], [-2.0, -6.0, -2.0]], [[7.0, 0.0, -3.0], [-4.0, 4.0, -2.0]]]])
-      arg1=numpy.array([[[[-2.0, 0.0, -2.0], [-6.0, 7.0, 1.0]], [[-7.0, 6.0, 0.0], [7.0, 0.0, 0.0]], [[-2.0, -7.0, -5.0], 
-[-5.0, -7.0, -3.0]], [[0.0, 5.0, -7.0], [-6.0, -6.0, 6.0]], [[5.0, 0.0, -6.0], [4.0, 6.0, 6.0]]], [[[-1.0, 0.0, -5.0], [-6.0, 
-4.0, -2.0]], [[-1.0, 2.0, 1.0], [5.0, 7.0, -7.0]], [[6.0, -4.0, 4.0], [-7.0, 3.0, 2.0]], [[0.0, -6.0, 6.0], [0.0, -7.0, -5.0]], 
-[[-2.0, 4.0, -5.0], [-6.0, 5.0, 2.0]]], [[[5.0, -2.0, -4.0], [3.0, 6.0, 0.0]], [[-1.0, -5.0, 0.0], [-4.0, -3.0, 0.0]], [[-5.0, 
--3.0, -7.0], [-1.0, -3.0, 4.0]], [[0.0, 1.0, 1.0], [-6.0, 1.0, 3.0]], [[-2.0, 7.0, -7.0], [6.0, 3.0, 6.0]]], [[[-5.0, -4.0, 
-0.0], [-3.0, -6.0, 1.0]], [[4.0, 0.0, 7.0], [-2.0, 7.0, -7.0]], [[-4.0, 1.0, 0.0], [-6.0, 7.0, 7.0]], [[4.0, 0.0, -4.0], [3.0, 
--1.0, 2.0]], [[0.0, 6.0, 6.0], [-4.0, -1.0, 2.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=numpy.array([[[[-87.0, 79.0, -48.0, 0.0, -62.0], [-95.0, -19.0, -56.0, 51.0, -72.0], [-75.0, -22.0, -30.0, -19.0, 
-11.0], [19.0, -32.0, -52.0, -10.0, 63.0]], [[35.0, -6.0, -15.0, -83.0, -69.0], [17.0, 55.0, 33.0, 39.0, 0.0], [-22.0, 8.0, 
--53.0, 12.0, -79.0], [-1.0, 99.0, 22.0, -59.0, 28.0]], [[29.0, -81.0, 97.0, 76.0, 15.0], [62.0, -53.0, 36.0, -5.0, 41.0], 
-[19.0, 42.0, 51.0, 21.0, -26.0], [26.0, -32.0, 0.0, 22.0, -36.0]], [[-15.0, -61.0, -30.0, -1.0, 47.0], [-32.0, -43.0, 72.0, 
-5.0, -27.0], [27.0, 3.0, -30.0, 16.0, -19.0], [-22.0, 14.0, 5.0, 26.0, 16.0]], [[-17.0, -32.0, 4.0, 21.0, -14.0], [13.0, 12.0, 
-14.0, 9.0, 1.0], [8.0, -12.0, -47.0, -2.0, -25.0], [-33.0, 42.0, -57.0, 14.0, 18.0]]], [[[-16.0, -54.0, -5.0, -67.0, -12.0], 
-[-7.0, 35.0, 49.0, 48.0, -40.0], [28.0, 1.0, -68.0, -13.0, -74.0], [-33.0, 87.0, -54.0, 1.0, -5.0]], [[14.0, -33.0, 43.0, 
--59.0, -129.0], [14.0, 18.0, 43.0, 96.0, -20.0], [-63.0, 40.0, -47.0, 19.0, -138.0], [40.0, 91.0, -10.0, -71.0, 41.0]], 
-[[-56.0, 85.0, 33.0, 60.0, 28.0], [-47.0, -50.0, -107.0, -12.0, -27.0], [-23.0, 1.0, 103.0, -36.0, 100.0], [55.0, -157.0, 
--19.0, 35.0, -46.0]], [[-44.0, 77.0, -33.0, 88.0, 50.0], [-29.0, -22.0, -87.0, -64.0, 11.0], [-3.0, -43.0, 37.0, -20.0, 126.0], 
-[-15.0, -101.0, -23.0, 47.0, 4.0]], [[73.0, -29.0, 63.0, -43.0, 4.0], [81.0, 49.0, 9.0, -11.0, 47.0], [39.0, 28.0, 38.0, -2.0, 
--29.0], [12.0, 32.0, 35.0, -21.0, -70.0]]], [[[16.0, -20.0, -17.0, 76.0, 37.0], [33.0, -12.0, 11.0, -60.0, 52.0], [20.0, -23.0, 
--12.0, 20.0, 42.0], [-40.0, -2.0, 4.0, 27.0, 24.0]], [[33.0, 11.0, -22.0, 24.0, 32.0], [33.0, 19.0, -8.0, -57.0, 48.0], [21.0, 
--20.0, 4.0, 9.0, 45.0], [-27.0, 2.0, 30.0, 6.0, 1.0]], [[-10.0, -39.0, 91.0, 28.0, -126.0], [-5.0, -74.0, 34.0, 102.0, -24.0], 
-[-97.0, 68.0, 18.0, 34.0, -117.0], [94.0, -9.0, -1.0, -52.0, 45.0]], [[-80.0, -41.0, 36.0, 0.0, -23.0], [-46.0, -26.0, 9.0, 
-76.0, -76.0], [-3.0, 11.0, -32.0, -28.0, -55.0], [2.0, 3.0, -111.0, 31.0, -7.0]], [[13.0, 23.0, 12.0, 86.0, 32.0], [37.0, -9.0, 
--44.0, -65.0, 56.0], [9.0, -18.0, 38.0, 3.0, 75.0], [-11.0, -54.0, 4.0, 26.0, -7.0]]], [[[-4.0, 49.0, -81.0, -19.0, -41.0], 
-[-23.0, 35.0, -9.0, -8.0, 3.0], [-37.0, -37.0, -65.0, 11.0, 6.0], [-30.0, 52.0, 11.0, -31.0, 75.0]], [[49.0, 63.0, -107.0, 
--28.0, 9.0], [16.0, 69.0, -13.0, -73.0, 54.0], [1.0, -53.0, -48.0, 17.0, 55.0], [-55.0, 58.0, 68.0, -31.0, 53.0]], [[8.0, 
--30.0, -44.0, -14.0, 42.0], [8.0, 26.0, 35.0, -28.0, 9.0], [44.0, -25.0, -49.0, 2.0, 5.0], [-57.0, 52.0, -8.0, 19.0, 7.0]], 
-[[-36.0, -7.0, 14.0, 92.0, -13.0], [2.0, -32.0, -18.0, -8.0, 11.0], [-19.0, -14.0, -13.0, 4.0, 18.0], [-13.0, -25.0, -57.0, 
-28.0, 34.0]], [[42.0, -77.0, -1.0, 9.0, 49.0], [52.0, 12.0, 66.0, -36.0, 41.0], [59.0, -3.0, -30.0, 19.0, -17.0], [-49.0, 57.0, 
-10.0, 20.0, -10.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-1.0, -1.0], [1.0, -6.0]], [[6.0, -6.0], [5.0, -2.0]], [[0.0, 0.0], [0.0, 0.0]], [[-4.0, 0.0], 
+[-4.0, 1.0]], [[0.0, 7.0], [-2.0, -7.0]], [[0.0, 0.0], [-6.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[2.0, 0.0], [-5.0, 6.0]], [[-6.0, 1.0], [7.0, 5.0]], [[0.0, 1.0], [6.0, -6.0]], 
+[[7.0, 6.0], [-2.0, -5.0]], [[5.0, 2.0], [-4.0, 2.0]], [[-2.0, -7.0], [3.0, -7.0]]]))
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,0.0)
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[3.0, 3.0], [-3.0, 18.0]], [[-18.0, 18.0], [-15.0, 6.0]], [[-0.0, -0.0], [-0.0, -0.0]], [[12.0, 
+-0.0], [12.0, -3.0]], [[-0.0, -21.0], [6.0, 21.0]], [[-0.0, -0.0], [18.0, -21.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], 
+[-0.0, 0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, -0.0]], [[0.0, 0.0], [-0.0, -0.0]], [[0.0, 0.0], [-0.0, 0.0]], 
+[[-0.0, -0.0], [0.0, -0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank0_offset0(self):
-      arg0=numpy.array([[-3.0, 3.0, -5.0, 0.0, -2.0], [0.0, 7.0, -6.0, 3.0, -5.0], [-4.0, 2.0, 5.0, 0.0, 3.0], [7.0, -3.0, 0.0, 
-7.0, 2.0]])
-      arg1=Data(-7.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[21.0, -21.0, 35.0, -0.0, 14.0], [-0.0, -49.0, 42.0, -21.0, 35.0], [28.0, -14.0, -35.0, -0.0, 
--21.0], [-49.0, 21.0, -0.0, -49.0, -14.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[6.0, -7.0], [-5.0, 2.0]], [[4.0, 0.0], [6.0, 4.0]], [[-2.0, -1.0], [-6.0, 2.0]], [[-4.0, -5.0], 
+[6.0, 5.0]], [[-6.0, -4.0], [-4.0, -6.0]], [[0.0, -1.0], [-4.0, 5.0]]], [[[0.0, 5.0], [-4.0, 5.0]], [[-2.0, -7.0], [7.0, 3.0]], 
+[[-3.0, -3.0], [1.0, 3.0]], [[-1.0, 6.0], [0.0, 4.0]], [[0.0, 3.0], [4.0, -4.0]], [[-1.0, -7.0], [5.0, 3.0]]], [[[-6.0, -6.0], 
+[2.0, 5.0]], [[4.0, 1.0], [0.0, -3.0]], [[5.0, -3.0], [6.0, -6.0]], [[4.0, 0.0], [-3.0, 0.0]], [[-1.0, 2.0], [2.0, 1.0]], 
+[[-2.0, 0.0], [6.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, 2.0], [-3.0, -7.0]], [[3.0, -6.0], [4.0, 5.0]], [[7.0, 7.0], [3.0, -6.0]], 
+[[3.0, -4.0], [-2.0, 2.0]], [[-4.0, -2.0], [5.0, 2.0]], [[6.0, 2.0], [-7.0, 7.0]]], [[[0.0, 0.0], [-1.0, 7.0]], [[4.0, -7.0], 
+[-1.0, -2.0]], [[-4.0, -2.0], [5.0, 3.0]], [[5.0, 0.0], [-6.0, -2.0]], [[-3.0, 3.0], [-2.0, 2.0]], [[-6.0, -1.0], [3.0, 
+-2.0]]], [[[-5.0, -1.0], [-7.0, -3.0]], [[-4.0, 7.0], [4.0, 7.0]], [[-7.0, -4.0], [-4.0, 4.0]], [[6.0, 7.0], [-5.0, 6.0]], 
+[[-6.0, -5.0], [-6.0, 4.0]], [[-1.0, 0.0], [-4.0, -1.0]]]]))
+      arg1=Data(numpy.array([-6.0, 6.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, -5.0, -6.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-48.0, 60.0], [10.0, 28.0]], [[-28.0, -40.0], [6.0, -12.0]], [[4.0, -18.0], [54.0, -6.0]], 
+[[26.0, 66.0], [-42.0, -6.0]], [[34.0, 46.0], [52.0, 14.0]], [[-10.0, -36.0], [66.0, 2.0]]])+(1.-msk_ref)*numpy.array([[[18.0, 
+12.0], [38.0, -38.0]], [[13.0, -25.0], [-7.0, -17.0]], [[83.0, 55.0], [8.0, -57.0]], [[-52.0, -54.0], [54.0, -20.0]], [[39.0, 
+9.0], [61.0, -28.0]], [[54.0, 11.0], [-12.0, 37.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank1_offset1(self):
-      arg0=numpy.array([[[-3.0, -3.0, 0.0], [-3.0, -3.0, -1.0], [-4.0, -3.0, 2.0], [5.0, -1.0, 0.0], [0.0, -5.0, -6.0]], 
-[[-7.0, 0.0, 1.0], [-1.0, 6.0, -7.0], [-6.0, -6.0, -7.0], [0.0, 7.0, -6.0], [-4.0, 4.0, 6.0]], [[-7.0, 1.0, 4.0], [5.0, -1.0, 
-5.0], [-2.0, 3.0, 0.0], [-1.0, 3.0, -2.0], [-5.0, -7.0, 5.0]], [[1.0, -5.0, -1.0], [0.0, 0.0, 0.0], [1.0, 0.0, -5.0], [-6.0, 
-7.0, 5.0], [0.0, 4.0, -5.0]]])
-      arg1=Data(numpy.array([3.0, 5.0, -7.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-24.0, -17.0, -41.0, 10.0, 17.0], [-28.0, 76.0, 1.0, 77.0, -34.0], [-44.0, -25.0, 9.0, 26.0, 
--85.0], [-15.0, 0.0, 38.0, -18.0, 55.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank3_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[4.0, -6.0], [0.0, 0.0]], [[-7.0, 3.0], [0.0, 7.0]], [[-3.0, 0.0], [-2.0, -6.0]], [[0.0, -3.0], 
+[5.0, 5.0]], [[2.0, 1.0], [3.0, 0.0]], [[-4.0, 7.0], [0.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 1.0], [3.0, -6.0]], [[-4.0, -2.0], [0.0, -2.0]], [[0.0, -3.0], [-2.0, 0.0]], 
+[[-6.0, 3.0], [6.0, 2.0]], [[-5.0, 4.0], [6.0, -4.0]], [[5.0, 3.0], [0.0, -4.0]]]))
+      arg1=Data(numpy.array([5.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-7.0, 6.0]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[20.0, -4.0], [-30.0, 6.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-35.0, 7.0], [15.0, -3.0]], [[0.0, 
+0.0], [35.0, -7.0]]], [[[-15.0, 3.0], [0.0, 0.0]], [[-10.0, 2.0], [-30.0, 6.0]]], [[[0.0, 0.0], [-15.0, 3.0]], [[25.0, -5.0], 
+[25.0, -5.0]]], [[[10.0, -2.0], [5.0, -1.0]], [[15.0, -3.0], [0.0, 0.0]]], [[[-20.0, 4.0], [35.0, -7.0]], [[0.0, 0.0], [-15.0, 
+3.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -6.0], [-7.0, 6.0]], [[-21.0, 18.0], [42.0, -36.0]]], [[[28.0, -24.0], [14.0, 
+-12.0]], [[0.0, 0.0], [14.0, -12.0]]], [[[0.0, 0.0], [21.0, -18.0]], [[14.0, -12.0], [0.0, 0.0]]], [[[42.0, -36.0], [-21.0, 
+18.0]], [[-42.0, 36.0], [-14.0, 12.0]]], [[[35.0, -30.0], [-28.0, 24.0]], [[-42.0, 36.0], [28.0, -24.0]]], [[[-35.0, 30.0], 
+[-21.0, 18.0]], [[0.0, 0.0], [28.0, -24.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-6.0, 6.0], [5.0, -2.0]], [[3.0, -3.0], [0.0, -4.0]], [[0.0, -3.0], [-7.0, -1.0]], [[-3.0, 
+7.0], [0.0, 2.0]], [[3.0, 2.0], [-2.0, -7.0]], [[-7.0, 1.0], [0.0, -1.0]]], [[[5.0, -4.0], [3.0, 3.0]], [[4.0, 6.0], [-5.0, 
+4.0]], [[2.0, 4.0], [-4.0, -7.0]], [[0.0, -1.0], [6.0, 5.0]], [[-7.0, -2.0], [7.0, -3.0]], [[5.0, -1.0], [-2.0, 2.0]]], [[[1.0, 
+-7.0], [3.0, -3.0]], [[-5.0, 1.0], [3.0, 6.0]], [[-1.0, -7.0], [5.0, 0.0]], [[-2.0, 0.0], [6.0, 0.0]], [[-4.0, -4.0], [3.0, 
+2.0]], [[-7.0, -3.0], [0.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, -5.0], [4.0, 7.0]], [[2.0, 6.0], [-4.0, -5.0]], [[3.0, 2.0], [-3.0, 0.0]], 
+[[-5.0, -2.0], [0.0, -3.0]], [[7.0, -1.0], [-2.0, 4.0]], [[4.0, 1.0], [0.0, -7.0]]], [[[0.0, 3.0], [1.0, 6.0]], [[7.0, -3.0], 
+[-1.0, 0.0]], [[-5.0, -5.0], [-2.0, 2.0]], [[-5.0, 0.0], [6.0, 2.0]], [[5.0, 3.0], [5.0, -6.0]], [[-1.0, 4.0], [-3.0, 3.0]]], 
+[[[0.0, 0.0], [-4.0, -7.0]], [[-6.0, 5.0], [5.0, 7.0]], [[5.0, 1.0], [0.0, 1.0]], [[-2.0, 0.0], [0.0, 0.0]], [[0.0, 4.0], [0.0, 
+3.0]], [[-3.0, 1.0], [-7.0, -7.0]]]]))
+      arg1=Data(numpy.array([[-3.0, 7.0], [1.0, -7.0], [7.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, 3.0], [4.0, -1.0], [0.0, -3.0]]))
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[30.0, -77.0], [-71.0, 70.0]], [[9.0, 14.0], [-12.0, -35.0]]], [[[-40.0, -7.0], [22.0, 
+-63.0]], [[16.0, 35.0], [58.0, -56.0]]], [[[-5.0, -14.0], [-36.0, -49.0]], [[52.0, -21.0], [-4.0, 42.0]]], [[[-5.0, -21.0], 
+[-22.0, 56.0]], [[48.0, -42.0], [-1.0, -21.0]]], [[[-44.0, 70.0], [-36.0, 28.0]], [[34.0, -63.0], [32.0, -28.0]]], [[[-23.0, 
+-84.0], [-25.0, 14.0]], [[-2.0, 14.0], [40.0, -21.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 9.0], [7.0, -18.0]], [[8.0, 23.0], 
+[31.0, 36.0]]], [[[30.0, 17.0], [-6.0, 6.0]], [[-8.0, -26.0], [-5.0, -36.0]]], [[[-17.0, -1.0], [-18.0, 8.0]], [[-11.0, -7.0], 
+[8.0, -5.0]]], [[[-25.0, -4.0], [-2.0, -6.0]], [[24.0, -6.0], [5.0, -11.0]]], [[[27.0, 16.0], [11.0, -18.0]], [[18.0, -11.0], 
+[-20.0, 9.0]]], [[[0.0, 22.0], [17.0, -4.0]], [[-12.0, 24.0], [5.0, -3.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_taggedData_rank4_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-7.0, 6.0, 0.0, 0.0], [-7.0, 2.0, -2.0, 4.0], [4.0, -2.0, 0.0, 3.0]], [[-1.0, 1.0, -6.0, 3.0], 
+[-1.0, 5.0, -3.0, 6.0], [0.0, 2.0, 7.0, 3.0]]], [[[-3.0, 5.0, 0.0, 0.0], [2.0, 4.0, -1.0, 6.0], [3.0, 0.0, -3.0, -6.0]], [[4.0, 
+0.0, 4.0, 0.0], [-2.0, -3.0, -1.0, 0.0], [0.0, -2.0, -5.0, 7.0]]], [[[0.0, -3.0, 6.0, 1.0], [0.0, 0.0, -1.0, -6.0], [5.0, 2.0, 
+-7.0, 0.0]], [[5.0, 4.0, -6.0, 7.0], [-2.0, 6.0, -5.0, 0.0], [-6.0, -2.0, -7.0, -5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, 0.0, -3.0, 5.0], [-7.0, -3.0, 7.0, 0.0], [-3.0, -3.0, 5.0, 6.0]], [[-6.0, 
+4.0, -3.0, -3.0], [0.0, -7.0, 7.0, -6.0], [1.0, 2.0, -5.0, 0.0]]], [[[0.0, -3.0, -6.0, -6.0], [4.0, 6.0, 6.0, 6.0], [-3.0, 
+-7.0, 3.0, 0.0]], [[2.0, 1.0, 4.0, 7.0], [5.0, 0.0, 3.0, 4.0], [7.0, -3.0, 0.0, -2.0]]], [[[1.0, 1.0, 5.0, 4.0], [2.0, -2.0, 
+-1.0, -4.0], [3.0, 5.0, -3.0, 0.0]], [[4.0, 0.0, 4.0, -1.0], [6.0, -7.0, 1.0, -5.0], [7.0, 6.0, 6.0, -4.0]]]]))
+      arg1=-2.0
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[14.0, -12.0, -0.0, -0.0], [14.0, -4.0, 4.0, -8.0], [-8.0, 4.0, -0.0, -6.0]], [[2.0, -2.0, 12.0, 
+-6.0], [2.0, -10.0, 6.0, -12.0], [-0.0, -4.0, -14.0, -6.0]]], [[[6.0, -10.0, -0.0, -0.0], [-4.0, -8.0, 2.0, -12.0], [-6.0, 
+-0.0, 6.0, 12.0]], [[-8.0, -0.0, -8.0, -0.0], [4.0, 6.0, 2.0, -0.0], [-0.0, 4.0, 10.0, -14.0]]], [[[-0.0, 6.0, -12.0, -2.0], 
+[-0.0, -0.0, 2.0, 12.0], [-10.0, -4.0, 14.0, -0.0]], [[-10.0, -8.0, 12.0, -14.0], [4.0, -12.0, 10.0, -0.0], [12.0, 4.0, 14.0, 
+10.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[8.0, -0.0, 6.0, -10.0], [14.0, 6.0, -14.0, -0.0], [6.0, 6.0, -10.0, -12.0]], [[12.0, 
+-8.0, 6.0, 6.0], [-0.0, 14.0, -14.0, 12.0], [-2.0, -4.0, 10.0, -0.0]]], [[[-0.0, 6.0, 12.0, 12.0], [-8.0, -12.0, -12.0, -12.0], 
+[6.0, 14.0, -6.0, -0.0]], [[-4.0, -2.0, -8.0, -14.0], [-10.0, -0.0, -6.0, -8.0], [-14.0, 6.0, -0.0, 4.0]]], [[[-2.0, -2.0, 
+-10.0, -8.0], [-4.0, 4.0, 2.0, 8.0], [-6.0, -10.0, 6.0, -0.0]], [[-8.0, -0.0, -8.0, 2.0], [-12.0, 14.0, -2.0, 10.0], [-14.0, 
+-12.0, -12.0, 8.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank2_offset2(self):
-      arg0=numpy.array([[[[-6.0, -7.0, -5.0], [3.0, 0.0, 3.0]], [[5.0, 4.0, 6.0], [-3.0, 2.0, -5.0]], [[0.0, 7.0, -3.0], [-6.0, 
--5.0, 4.0]], [[2.0, -1.0, 4.0], [-4.0, 3.0, -1.0]], [[-2.0, 2.0, 5.0], [2.0, -7.0, 5.0]]], [[[1.0, -7.0, -3.0], [-4.0, 4.0, 
--7.0]], [[-7.0, -5.0, 2.0], [0.0, -7.0, -5.0]], [[0.0, 0.0, -7.0], [-3.0, 7.0, 5.0]], [[0.0, -2.0, 6.0], [7.0, 2.0, 1.0]], 
-[[4.0, 0.0, 1.0], [-5.0, -7.0, 0.0]]], [[[0.0, -3.0, -1.0], [5.0, 4.0, 6.0]], [[-4.0, 6.0, 0.0], [-5.0, 1.0, 0.0]], [[-6.0, 
--1.0, 7.0], [5.0, -4.0, 0.0]], [[4.0, -1.0, -6.0], [5.0, -4.0, 6.0]], [[1.0, -3.0, -4.0], [0.0, 3.0, 4.0]]], [[[-6.0, 3.0, 
--1.0], [-3.0, -3.0, 1.0]], [[0.0, -3.0, -5.0], [1.0, 0.0, -3.0]], [[-2.0, 0.0, -6.0], [-6.0, 2.0, 4.0]], [[4.0, 2.0, 5.0], 
-[-1.0, 7.0, -6.0]], [[-2.0, -4.0, -7.0], [5.0, 7.0, 6.0]]]])
-      arg1=Data(numpy.array([[-2.0, -7.0, 4.0], [-1.0, 1.0, 6.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[56.0, -39.0, -36.0, 20.0, 31.0], [1.0, 20.0, 12.0, 39.0, -6.0], [52.0, -28.0, 38.0, 2.0, 30.0], 
-[-7.0, -18.0, 12.0, -30.0, 42.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-1.0, -2.0, -5.0, 4.0], [3.0, -3.0, -2.0, 4.0], [4.0, -3.0, 4.0, 0.0]], [[1.0, 4.0, -3.0, 7.0], 
+[-7.0, 7.0, -3.0, -1.0], [-7.0, 3.0, 3.0, 0.0]]], [[[-3.0, 2.0, -4.0, 0.0], [2.0, 6.0, -2.0, 6.0], [-1.0, -2.0, -6.0, 5.0]], 
+[[6.0, -6.0, 6.0, 0.0], [-3.0, -3.0, 7.0, -7.0], [7.0, -2.0, -6.0, 0.0]]], [[[6.0, 5.0, 4.0, -6.0], [-1.0, -5.0, -3.0, -5.0], 
+[-5.0, 2.0, 6.0, -1.0]], [[-6.0, 7.0, -7.0, -2.0], [4.0, -4.0, 7.0, -3.0], [6.0, -1.0, 0.0, 6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, -5.0, 2.0, 6.0], [-7.0, 2.0, -4.0, -4.0], [5.0, 0.0, 7.0, 7.0]], [[3.0, -2.0, 
+3.0, -4.0], [4.0, 1.0, 2.0, -5.0], [-4.0, 0.0, -4.0, -3.0]]], [[[-2.0, 0.0, 2.0, 4.0], [0.0, -1.0, 0.0, 1.0], [6.0, -2.0, 4.0, 
+0.0]], [[-6.0, -5.0, -5.0, 2.0], [-4.0, -4.0, -3.0, 3.0], [-7.0, 3.0, 7.0, -2.0]]], [[[-1.0, -3.0, -4.0, -3.0], [-7.0, 3.0, 
+-4.0, -2.0], [5.0, -7.0, -1.0, 2.0]], [[-5.0, 5.0, -6.0, -1.0], [6.0, -3.0, 5.0, -3.0], [3.0, 2.0, 4.0, 6.0]]]]))
+      arg1=numpy.array(4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-4.0, -8.0, -20.0, 16.0], [12.0, -12.0, -8.0, 16.0], [16.0, -12.0, 16.0, 0.0]], [[4.0, 16.0, 
+-12.0, 28.0], [-28.0, 28.0, -12.0, -4.0], [-28.0, 12.0, 12.0, 0.0]]], [[[-12.0, 8.0, -16.0, 0.0], [8.0, 24.0, -8.0, 24.0], 
+[-4.0, -8.0, -24.0, 20.0]], [[24.0, -24.0, 24.0, 0.0], [-12.0, -12.0, 28.0, -28.0], [28.0, -8.0, -24.0, 0.0]]], [[[24.0, 20.0, 
+16.0, -24.0], [-4.0, -20.0, -12.0, -20.0], [-20.0, 8.0, 24.0, -4.0]], [[-24.0, 28.0, -28.0, -8.0], [16.0, -16.0, 28.0, -12.0], 
+[24.0, -4.0, 0.0, 24.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[4.0, -20.0, 8.0, 24.0], [-28.0, 8.0, -16.0, -16.0], [20.0, 0.0, 28.0, 28.0]], 
+[[12.0, -8.0, 12.0, -16.0], [16.0, 4.0, 8.0, -20.0], [-16.0, 0.0, -16.0, -12.0]]], [[[-8.0, 0.0, 8.0, 16.0], [0.0, -4.0, 0.0, 
+4.0], [24.0, -8.0, 16.0, 0.0]], [[-24.0, -20.0, -20.0, 8.0], [-16.0, -16.0, -12.0, 12.0], [-28.0, 12.0, 28.0, -8.0]]], [[[-4.0, 
+-12.0, -16.0, -12.0], [-28.0, 12.0, -16.0, -8.0], [20.0, -28.0, -4.0, 8.0]], [[-20.0, 20.0, -24.0, -4.0], [24.0, -12.0, 20.0, 
+-12.0], [12.0, 8.0, 16.0, 24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank1_offset0(self):
-      arg0=numpy.array([[-2.0, 4.0, 0.0, -3.0, -2.0], [0.0, -6.0, 7.0, -1.0, 3.0], [0.0, 5.0, -3.0, -2.0, 7.0], [3.0, -2.0, 
-1.0, 2.0, 2.0]])
-      arg1=Data(numpy.array([7.0, 6.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-14.0, -12.0], [28.0, 24.0], [0.0, 0.0], [-21.0, -18.0], [-14.0, -12.0]], [[0.0, 0.0], [-42.0, 
--36.0], [49.0, 42.0], [-7.0, -6.0], [21.0, 18.0]], [[0.0, 0.0], [35.0, 30.0], [-21.0, -18.0], [-14.0, -12.0], [49.0, 42.0]], 
-[[21.0, 18.0], [-14.0, -12.0], [7.0, 6.0], [14.0, 12.0], [14.0, 12.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-7.0, -6.0, -3.0, -6.0], [-1.0, -5.0, 0.0, -5.0], [4.0, -1.0, -5.0, -5.0]], [[0.0, -4.0, 1.0, 
+3.0], [3.0, 4.0, 3.0, 7.0], [-4.0, 5.0, 0.0, 2.0]]], [[[-7.0, 0.0, 1.0, 6.0], [-7.0, 4.0, -5.0, -2.0], [1.0, 4.0, 1.0, -7.0]], 
+[[-3.0, -7.0, 4.0, 7.0], [-1.0, 0.0, 3.0, 0.0], [3.0, 0.0, 0.0, 5.0]]], [[[-5.0, 7.0, 1.0, 6.0], [0.0, 5.0, -1.0, 6.0], [7.0, 
+4.0, 6.0, 2.0]], [[-7.0, -4.0, -1.0, 6.0], [-1.0, -4.0, -7.0, 2.0], [-6.0, -6.0, 3.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, -1.0, 1.0, -7.0], [2.0, 0.0, -2.0, -3.0], [-5.0, -3.0, 4.0, 4.0]], [[-1.0, 
+2.0, -1.0, 5.0], [-2.0, 6.0, -3.0, -1.0], [4.0, 1.0, -5.0, -1.0]]], [[[-2.0, 6.0, -3.0, 4.0], [5.0, -5.0, 3.0, 1.0], [-1.0, 
+1.0, 4.0, -2.0]], [[-2.0, -3.0, -4.0, 7.0], [-4.0, -3.0, 2.0, -7.0], [6.0, -4.0, 7.0, 0.0]]], [[[-1.0, 0.0, -7.0, -4.0], [-7.0, 
+0.0, -2.0, 3.0], [-5.0, -5.0, -4.0, -4.0]], [[3.0, -5.0, 1.0, 6.0], [7.0, 2.0, -4.0, 1.0], [-1.0, -4.0, 0.0, -7.0]]]]))
+      arg1=Data(-3.0,self.functionspace)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[21.0, 18.0, 9.0, 18.0], [3.0, 15.0, -0.0, 15.0], [-12.0, 3.0, 15.0, 15.0]], [[-0.0, 12.0, -3.0, 
+-9.0], [-9.0, -12.0, -9.0, -21.0], [12.0, -15.0, -0.0, -6.0]]], [[[21.0, -0.0, -3.0, -18.0], [21.0, -12.0, 15.0, 6.0], [-3.0, 
+-12.0, -3.0, 21.0]], [[9.0, 21.0, -12.0, -21.0], [3.0, -0.0, -9.0, -0.0], [-9.0, -0.0, -0.0, -15.0]]], [[[15.0, -21.0, -3.0, 
+-18.0], [-0.0, -15.0, 3.0, -18.0], [-21.0, -12.0, -18.0, -6.0]], [[21.0, 12.0, 3.0, -18.0], [3.0, 12.0, 21.0, -6.0], [18.0, 
+18.0, -9.0, 3.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-6.0, 3.0, -3.0, 21.0], [-6.0, -0.0, 6.0, 9.0], [15.0, 9.0, -12.0, -12.0]], [[3.0, 
+-6.0, 3.0, -15.0], [6.0, -18.0, 9.0, 3.0], [-12.0, -3.0, 15.0, 3.0]]], [[[6.0, -18.0, 9.0, -12.0], [-15.0, 15.0, -9.0, -3.0], 
+[3.0, -3.0, -12.0, 6.0]], [[6.0, 9.0, 12.0, -21.0], [12.0, 9.0, -6.0, 21.0], [-18.0, 12.0, -21.0, -0.0]]], [[[3.0, -0.0, 21.0, 
+12.0], [21.0, -0.0, 6.0, -9.0], [15.0, 15.0, 12.0, 12.0]], [[-9.0, 15.0, -3.0, -18.0], [-21.0, -6.0, 12.0, -3.0], [3.0, 12.0, 
+-0.0, 21.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank2_offset1(self):
-      arg0=numpy.array([[[2.0, 7.0, 6.0], [5.0, 2.0, -5.0], [1.0, -5.0, 4.0], [5.0, 6.0, 1.0], [-2.0, 5.0, 3.0]], [[-5.0, -6.0, 
-2.0], [5.0, 3.0, 7.0], [-1.0, 0.0, -4.0], [5.0, 3.0, -6.0], [-7.0, 0.0, 3.0]], [[6.0, -1.0, -3.0], [-4.0, 0.0, -4.0], [-4.0, 
-2.0, 1.0], [-2.0, -4.0, -2.0], [6.0, 6.0, 4.0]], [[5.0, 6.0, -6.0], [7.0, -5.0, 6.0], [2.0, 6.0, 6.0], [6.0, 6.0, -7.0], [2.0, 
-6.0, 6.0]]])
-      arg1=Data(numpy.array([[3.0, -6.0, -7.0], [0.0, -6.0, -2.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-78.0, -54.0], [38.0, -2.0], [5.0, 22.0], [-28.0, -38.0], [-57.0, -36.0]], [[7.0, 32.0], [-52.0, 
--32.0], [25.0, 8.0], [39.0, -6.0], [-42.0, -6.0]], [[45.0, 12.0], [16.0, 8.0], [-31.0, -14.0], [32.0, 28.0], [-46.0, -44.0]], 
-[[21.0, -24.0], [9.0, 18.0], [-72.0, -48.0], [31.0, -22.0], [-72.0, -48.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-5.0, -6.0, 3.0, -1.0], [0.0, -3.0, -7.0, 5.0], [1.0, -2.0, -7.0, 1.0]], [[4.0, -6.0, 0.0, 
+4.0], [6.0, 0.0, -7.0, 0.0], [5.0, 6.0, -4.0, -3.0]]], [[[3.0, 6.0, 0.0, 2.0], [1.0, 5.0, 6.0, 4.0], [-6.0, 3.0, 4.0, 0.0]], 
+[[-5.0, -7.0, -7.0, -1.0], [-3.0, 7.0, 3.0, 3.0], [0.0, 0.0, 6.0, 6.0]]], [[[6.0, -3.0, -7.0, -2.0], [-7.0, 4.0, 0.0, 7.0], 
+[0.0, 3.0, -6.0, -4.0]], [[-5.0, 5.0, 4.0, 5.0], [1.0, -1.0, 1.0, 5.0], [6.0, 5.0, -4.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, 5.0, -6.0, -2.0], [-3.0, -5.0, 6.0, 6.0], [2.0, -2.0, 2.0, -6.0]], [[2.0, 
+-4.0, -7.0, 7.0], [1.0, 2.0, 6.0, 4.0], [-4.0, 4.0, -1.0, -3.0]]], [[[0.0, 7.0, -7.0, -2.0], [-4.0, 0.0, -5.0, -5.0], [-5.0, 
+0.0, -7.0, -5.0]], [[-2.0, 4.0, 5.0, 0.0], [-4.0, -5.0, -3.0, 0.0], [0.0, 0.0, -6.0, -4.0]]], [[[0.0, 5.0, -3.0, 7.0], [3.0, 
+-7.0, -3.0, -2.0], [-6.0, 4.0, 0.0, 2.0]], [[-7.0, -5.0, 3.0, 0.0], [-2.0, -1.0, -6.0, -5.0], [3.0, 2.0, -7.0, 0.0]]]]))
+      arg1=Data(-1.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[5.0, 6.0, -3.0, 1.0], [-0.0, 3.0, 7.0, -5.0], [-1.0, 2.0, 7.0, -1.0]], [[-4.0, 6.0, -0.0, -4.0], 
+[-6.0, -0.0, 7.0, -0.0], [-5.0, -6.0, 4.0, 3.0]]], [[[-3.0, -6.0, -0.0, -2.0], [-1.0, -5.0, -6.0, -4.0], [6.0, -3.0, -4.0, 
+-0.0]], [[5.0, 7.0, 7.0, 1.0], [3.0, -7.0, -3.0, -3.0], [-0.0, -0.0, -6.0, -6.0]]], [[[-6.0, 3.0, 7.0, 2.0], [7.0, -4.0, -0.0, 
+-7.0], [-0.0, -3.0, 6.0, 4.0]], [[5.0, -5.0, -4.0, -5.0], [-1.0, 1.0, -1.0, -5.0], [-6.0, -5.0, 4.0, 
+-2.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-15.0, 25.0, -30.0, -10.0], [-15.0, -25.0, 30.0, 30.0], [10.0, -10.0, 10.0, -30.0]], 
+[[10.0, -20.0, -35.0, 35.0], [5.0, 10.0, 30.0, 20.0], [-20.0, 20.0, -5.0, -15.0]]], [[[0.0, 35.0, -35.0, -10.0], [-20.0, 0.0, 
+-25.0, -25.0], [-25.0, 0.0, -35.0, -25.0]], [[-10.0, 20.0, 25.0, 0.0], [-20.0, -25.0, -15.0, 0.0], [0.0, 0.0, -30.0, -20.0]]], 
+[[[0.0, 25.0, -15.0, 35.0], [15.0, -35.0, -15.0, -10.0], [-30.0, 20.0, 0.0, 10.0]], [[-35.0, -25.0, 15.0, 0.0], [-10.0, -5.0, 
+-30.0, -25.0], [15.0, 10.0, -35.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank3_offset2(self):
-      arg0=numpy.array([[[[-1.0, -4.0, -2.0], [7.0, 6.0, -5.0]], [[1.0, -5.0, 4.0], [5.0, -7.0, -7.0]], [[4.0, 7.0, -4.0], 
-[-1.0, -3.0, -2.0]], [[0.0, -3.0, -2.0], [4.0, -3.0, 1.0]], [[-4.0, 1.0, -7.0], [-5.0, 6.0, -1.0]]], [[[2.0, 2.0, -5.0], [-2.0, 
--5.0, -4.0]], [[3.0, 3.0, -1.0], [-2.0, 0.0, -7.0]], [[4.0, -1.0, 2.0], [0.0, 2.0, -2.0]], [[4.0, 1.0, 4.0], [2.0, -5.0, 5.0]], 
-[[-2.0, -3.0, -7.0], [3.0, 6.0, 0.0]]], [[[-5.0, -3.0, -3.0], [-3.0, -1.0, -1.0]], [[5.0, -2.0, 1.0], [-7.0, -5.0, -6.0]], 
-[[-4.0, 3.0, 6.0], [-2.0, 1.0, 6.0]], [[0.0, -4.0, 6.0], [6.0, 6.0, 0.0]], [[-7.0, 0.0, -2.0], [0.0, 7.0, 1.0]]], [[[-6.0, 0.0, 
-1.0], [7.0, -2.0, 2.0]], [[-1.0, -1.0, 0.0], [6.0, 1.0, -6.0]], [[1.0, 6.0, 3.0], [-5.0, -6.0, 3.0]], [[-7.0, 1.0, 5.0], [0.0, 
-3.0, 1.0]], [[4.0, -2.0, 5.0], [0.0, -2.0, 2.0]]]])
-      arg1=Data(numpy.array([[[4.0, 1.0, -2.0], [-7.0, 6.0, 5.0]], [[-4.0, -3.0, -3.0], [-1.0, 0.0, 0.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-42.0, 15.0], [-121.0, -6.0], [10.0, -24.0], [-40.0, 11.0], [65.0, 39.0]], [[-16.0, 3.0], [-4.0, 
--16.0], [13.0, -19.0], [-10.0, -33.0], [18.0, 35.0]], [[-7.0, 41.0], [5.0, -10.0], [25.0, -9.0], [-22.0, -12.0], [23.0, 34.0]], 
-[[-77.0, 14.0], [-71.0, 1.0], [18.0, -26.0], [-14.0, 10.0], [2.0, -25.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_taggedData_rank4_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-7.0, -1.0, 3.0, 0.0], [7.0, 5.0, 3.0, -7.0], [-7.0, 1.0, -3.0, 0.0]], [[6.0, -3.0, -3.0, 
+-5.0], [0.0, -7.0, -3.0, 3.0], [1.0, -6.0, 4.0, -2.0]]], [[[4.0, 5.0, 4.0, -1.0], [-3.0, 2.0, 2.0, -2.0], [5.0, -7.0, 0.0, 
+0.0]], [[7.0, 0.0, -3.0, -6.0], [-1.0, -5.0, 5.0, -7.0], [1.0, -7.0, -6.0, 1.0]]], [[[0.0, 2.0, 2.0, 2.0], [-7.0, 2.0, 4.0, 
+-7.0], [6.0, 0.0, 0.0, 3.0]], [[-4.0, -1.0, 6.0, 3.0], [0.0, 0.0, 0.0, 5.0], [7.0, 1.0, -4.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 6.0, 1.0, 7.0], [-2.0, 0.0, 5.0, -7.0], [5.0, 0.0, -3.0, 7.0]], [[0.0, 2.0, 
+-7.0, -3.0], [6.0, 0.0, -6.0, -2.0], [-2.0, -4.0, 5.0, -6.0]]], [[[6.0, -4.0, 0.0, 0.0], [-2.0, -7.0, -2.0, 4.0], [0.0, -2.0, 
+6.0, -5.0]], [[-3.0, 0.0, -5.0, 3.0], [-7.0, 3.0, 3.0, 0.0], [0.0, -2.0, 0.0, 2.0]]], [[[-6.0, -3.0, 2.0, -6.0], [3.0, 7.0, 
+6.0, -3.0], [-5.0, 2.0, 4.0, 6.0]], [[-7.0, 2.0, 1.0, 0.0], [-4.0, -4.0, -3.0, 1.0], [1.0, 4.0, 5.0, 6.0]]]]))
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,-5.0)
+      arg1.expand()
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0]], [[0.0, -0.0, -0.0, 
+-0.0], [0.0, -0.0, -0.0, 0.0], [0.0, -0.0, 0.0, -0.0]]], [[[0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 
+0.0]], [[0.0, 0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 
+-0.0], [0.0, 0.0, 0.0, 0.0]], [[-0.0, -0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 
+0.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -30.0, -5.0, -35.0], [10.0, -0.0, -25.0, 35.0], [-25.0, -0.0, 15.0, -35.0]], 
+[[-0.0, -10.0, 35.0, 15.0], [-30.0, -0.0, 30.0, 10.0], [10.0, 20.0, -25.0, 30.0]]], [[[-30.0, 20.0, -0.0, -0.0], [10.0, 35.0, 
+10.0, -20.0], [-0.0, 10.0, -30.0, 25.0]], [[15.0, -0.0, 25.0, -15.0], [35.0, -15.0, -15.0, -0.0], [-0.0, 10.0, -0.0, -10.0]]], 
+[[[30.0, 15.0, -10.0, 30.0], [-15.0, -35.0, -30.0, 15.0], [25.0, -10.0, -20.0, -30.0]], [[35.0, -10.0, -5.0, -0.0], [20.0, 
+20.0, 15.0, -5.0], [-5.0, -20.0, -25.0, -30.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")       
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_constData_rank2_offset0(self):
-      arg0=numpy.array([[-5.0, 2.0, -7.0, 3.0, -3.0], [0.0, -1.0, 7.0, -7.0, -6.0], [-4.0, 6.0, -2.0, 6.0, 5.0], [5.0, 0.0, 
-5.0, -6.0, 0.0]])
-      arg1=Data(numpy.array([[-4.0, -2.0, 0.0, 0.0, 0.0], [1.0, 7.0, 1.0, 2.0, 5.0], [4.0, -5.0, -1.0, 4.0, 6.0], [4.0, 1.0, 
--6.0, 4.0, -1.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[20.0, 10.0, 0.0, 0.0, 0.0], [-5.0, -35.0, -5.0, -10.0, -25.0], [-20.0, 25.0, 5.0, -20.0, -30.0], 
-[-20.0, -5.0, 30.0, -20.0, 5.0]], [[-8.0, -4.0, 0.0, 0.0, 0.0], [2.0, 14.0, 2.0, 4.0, 10.0], [8.0, -10.0, -2.0, 8.0, 12.0], 
-[8.0, 2.0, -12.0, 8.0, -2.0]], [[28.0, 14.0, 0.0, 0.0, 0.0], [-7.0, -49.0, -7.0, -14.0, -35.0], [-28.0, 35.0, 7.0, -28.0, 
--42.0], [-28.0, -7.0, 42.0, -28.0, 7.0]], [[-12.0, -6.0, 0.0, 0.0, 0.0], [3.0, 21.0, 3.0, 6.0, 15.0], [12.0, -15.0, -3.0, 12.0, 
-18.0], [12.0, 3.0, -18.0, 12.0, -3.0]], [[12.0, 6.0, 0.0, 0.0, 0.0], [-3.0, -21.0, -3.0, -6.0, -15.0], [-12.0, 15.0, 3.0, 
--12.0, -18.0], [-12.0, -3.0, 18.0, -12.0, 3.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[4.0, 2.0, 0.0, 0.0, 0.0], [-1.0, -7.0, -1.0, -2.0, -5.0], [-4.0, 5.0, 1.0, -4.0, -6.0], 
-[-4.0, -1.0, 6.0, -4.0, 1.0]], [[-28.0, -14.0, 0.0, 0.0, 0.0], [7.0, 49.0, 7.0, 14.0, 35.0], [28.0, -35.0, -7.0, 28.0, 42.0], 
-[28.0, 7.0, -42.0, 28.0, -7.0]], [[28.0, 14.0, 0.0, 0.0, 0.0], [-7.0, -49.0, -7.0, -14.0, -35.0], [-28.0, 35.0, 7.0, -28.0, 
--42.0], [-28.0, -7.0, 42.0, -28.0, 7.0]], [[24.0, 12.0, 0.0, 0.0, 0.0], [-6.0, -42.0, -6.0, -12.0, -30.0], [-24.0, 30.0, 6.0, 
--24.0, -36.0], [-24.0, -6.0, 36.0, -24.0, 6.0]]], [[[16.0, 8.0, 0.0, 0.0, 0.0], [-4.0, -28.0, -4.0, -8.0, -20.0], [-16.0, 20.0, 
-4.0, -16.0, -24.0], [-16.0, -4.0, 24.0, -16.0, 4.0]], [[-24.0, -12.0, 0.0, 0.0, 0.0], [6.0, 42.0, 6.0, 12.0, 30.0], [24.0, 
--30.0, -6.0, 24.0, 36.0], [24.0, 6.0, -36.0, 24.0, -6.0]], [[8.0, 4.0, 0.0, 0.0, 0.0], [-2.0, -14.0, -2.0, -4.0, -10.0], [-8.0, 
-10.0, 2.0, -8.0, -12.0], [-8.0, -2.0, 12.0, -8.0, 2.0]], [[-24.0, -12.0, 0.0, 0.0, 0.0], [6.0, 42.0, 6.0, 12.0, 30.0], [24.0, 
--30.0, -6.0, 24.0, 36.0], [24.0, 6.0, -36.0, 24.0, -6.0]], [[-20.0, -10.0, 0.0, 0.0, 0.0], [5.0, 35.0, 5.0, 10.0, 25.0], [20.0, 
--25.0, -5.0, 20.0, 30.0], [20.0, 5.0, -30.0, 20.0, -5.0]]], [[[-20.0, -10.0, 0.0, 0.0, 0.0], [5.0, 35.0, 5.0, 10.0, 25.0], 
-[20.0, -25.0, -5.0, 20.0, 30.0], [20.0, 5.0, -30.0, 20.0, -5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-20.0, -10.0, 0.0, 0.0, 0.0], [5.0, 35.0, 5.0, 10.0, 25.0], [20.0, -25.0, 
--5.0, 20.0, 30.0], [20.0, 5.0, -30.0, 20.0, -5.0]], [[24.0, 12.0, 0.0, 0.0, 0.0], [-6.0, -42.0, -6.0, -12.0, -30.0], [-24.0, 
-30.0, 6.0, -24.0, -36.0], [-24.0, -6.0, 36.0, -24.0, 6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,5.0)
+      arg0.expand()
+      arg1=Data(3.0,self.functionspace)
+      arg1.setTaggedValue(1,4.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-6.0)+(1.-msk_ref)*numpy.array(20.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank3_offset1(self):
-      arg0=numpy.array([[[-7.0, 6.0, 6.0], [6.0, 7.0, 3.0], [3.0, 7.0, 6.0], [7.0, 3.0, -5.0], [-3.0, 0.0, 0.0]], [[5.0, 3.0, 
--2.0], [1.0, 2.0, 6.0], [2.0, 4.0, -3.0], [0.0, -2.0, 3.0], [-4.0, 0.0, -5.0]], [[4.0, 0.0, 6.0], [0.0, -3.0, 0.0], [0.0, -2.0, 
-0.0], [4.0, -7.0, -6.0], [-1.0, -4.0, 4.0]], [[6.0, -4.0, 5.0], [2.0, -1.0, 2.0], [1.0, 2.0, -3.0], [-1.0, 1.0, 0.0], [5.0, 
--2.0, -6.0]]])
-      arg1=Data(numpy.array([[[3.0, -5.0, 1.0], [0.0, 0.0, 0.0], [-2.0, 4.0, 6.0], [0.0, 2.0, 2.0], [4.0, -5.0, -5.0]], [[3.0, 
--2.0, -6.0], [0.0, 3.0, 4.0], [-5.0, 0.0, -4.0], [-3.0, -3.0, -2.0], [-2.0, 1.0, -2.0]], [[-4.0, -3.0, 2.0], [0.0, -3.0, -2.0], 
-[7.0, -5.0, -3.0], [2.0, 6.0, 7.0], [-2.0, 2.0, 5.0]], [[1.0, 2.0, 1.0], [5.0, -5.0, -4.0], [-3.0, -7.0, 0.0], [4.0, 7.0, 3.0], 
-[1.0, 3.0, 0.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-45.0, 0.0, 74.0, 24.0, -88.0], [-69.0, 42.0, 11.0, -9.0, 8.0], [22.0, -30.0, -97.0, 64.0, 
-56.0], [11.0, -89.0, -21.0, 32.0, 11.0]], [[-14.0, 0.0, 34.0, 20.0, -26.0], [-14.0, 33.0, -42.0, -45.0, -11.0], [-39.0, -27.0, 
--2.0, 75.0, 17.0], [23.0, -17.0, -67.0, 82.0, 27.0]], [[-20.0, 0.0, 58.0, 26.0, -53.0], [-41.0, 45.0, -39.0, -42.0, -11.0], 
-[-21.0, -33.0, -32.0, 90.0, 38.0], [23.0, -44.0, -58.0, 79.0, 24.0]], [[1.0, 0.0, -32.0, -4.0, 38.0], [45.0, -11.0, -15.0, 
--20.0, -1.0], [-47.0, 1.0, 49.0, -3.0, -33.0], [8.0, 40.0, -42.0, 34.0, 16.0]], [[-9.0, 0.0, 6.0, 0.0, -12.0], [-9.0, 0.0, 
-15.0, 9.0, 6.0], [12.0, 0.0, -21.0, -6.0, 6.0], [-3.0, -15.0, 9.0, -12.0, -3.0]]], [[[-2.0, 0.0, -10.0, 2.0, 15.0], [21.0, 1.0, 
--17.0, -20.0, -3.0], [-33.0, -5.0, 26.0, 14.0, -14.0], [9.0, 18.0, -36.0, 35.0, 14.0]], [[-1.0, 0.0, 42.0, 16.0, -36.0], 
-[-37.0, 30.0, -29.0, -21.0, -12.0], [2.0, -18.0, -21.0, 56.0, 32.0], [11.0, -29.0, -17.0, 36.0, 7.0]], [[-17.0, 0.0, -6.0, 2.0, 
-3.0], [16.0, 0.0, 2.0, -12.0, 6.0], [-26.0, -6.0, 3.0, 7.0, -11.0], [7.0, 2.0, -34.0, 27.0, 14.0]], [[13.0, 0.0, 10.0, 2.0, 
--5.0], [-14.0, 6.0, -12.0, 0.0, -8.0], [12.0, 0.0, 1.0, 9.0, 11.0], [-1.0, -2.0, 14.0, -5.0, -6.0]], [[-17.0, 0.0, -22.0, 
--10.0, 9.0], [18.0, -20.0, 40.0, 22.0, 18.0], [6.0, 10.0, -13.0, -43.0, -17.0], [-9.0, 0.0, 12.0, -31.0, -4.0]]], [[[18.0, 0.0, 
-28.0, 12.0, -14.0], [-24.0, 24.0, -44.0, -24.0, -20.0], [-4.0, -12.0, 10.0, 50.0, 22.0], [10.0, -4.0, -12.0, 34.0, 4.0]], 
-[[15.0, 0.0, -12.0, -6.0, 15.0], [6.0, -9.0, 0.0, 9.0, -3.0], [9.0, 9.0, 15.0, -18.0, -6.0], [-6.0, 15.0, 21.0, -21.0, -9.0]], 
-[[10.0, 0.0, -8.0, -4.0, 10.0], [4.0, -6.0, 0.0, 6.0, -2.0], [6.0, 6.0, 10.0, -12.0, -4.0], [-4.0, 10.0, 14.0, -14.0, -6.0]], 
-[[41.0, 0.0, -72.0, -26.0, 81.0], [62.0, -45.0, 4.0, 21.0, -3.0], [-7.0, 33.0, 81.0, -76.0, -52.0], [-16.0, 79.0, 37.0, -51.0, 
--17.0]], [[21.0, 0.0, 10.0, 0.0, -4.0], [-19.0, 4.0, -11.0, 7.0, -10.0], [24.0, 4.0, 1.0, 2.0, 14.0], [-5.0, -1.0, 31.0, -20.0, 
--13.0]]], [[[43.0, 0.0, 2.0, 2.0, 19.0], [-4.0, 8.0, -50.0, -16.0, -26.0], [-2.0, 2.0, 47.0, 23.0, 5.0], [3.0, 30.0, 10.0, 
-11.0, -6.0]], [[13.0, 0.0, 4.0, 2.0, 3.0], [-4.0, 5.0, -18.0, -7.0, -9.0], [-1.0, -1.0, 13.0, 12.0, 4.0], [2.0, 7.0, 1.0, 7.0, 
--1.0]], [[-10.0, 0.0, -12.0, -2.0, 9.0], [17.0, -6.0, 7.0, -3.0, 6.0], [-16.0, 0.0, 6.0, -7.0, -13.0], [2.0, 7.0, -17.0, 9.0, 
-7.0]], [[-8.0, 0.0, 6.0, 2.0, -9.0], [-5.0, 3.0, 5.0, 0.0, 3.0], [1.0, -3.0, -12.0, 4.0, 4.0], [1.0, -10.0, -4.0, 3.0, 2.0]], 
-[[19.0, 0.0, -54.0, -16.0, 60.0], [55.0, -30.0, -1.0, 3.0, 0.0], [-26.0, 18.0, 63.0, -44.0, -44.0], [-5.0, 59.0, -1.0, -12.0, 
--1.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([0.0, 3.0, 1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([3.0, -2.0, 4.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([0.0, 6.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, -4.0, 7.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(15.0)+(1.-msk_ref)*numpy.array(33.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank4_offset2(self):
-      arg0=numpy.array([[[[-3.0, -2.0, 3.0], [6.0, 5.0, 4.0]], [[1.0, -6.0, 3.0], [-1.0, 0.0, 7.0]], [[4.0, 0.0, -5.0], [-1.0, 
-7.0, 0.0]], [[-2.0, -1.0, 4.0], [-6.0, 0.0, 5.0]], [[-3.0, 2.0, 2.0], [3.0, -7.0, -2.0]]], [[[-6.0, -2.0, -3.0], [0.0, 4.0, 
-0.0]], [[7.0, 3.0, 5.0], [4.0, -5.0, -1.0]], [[1.0, 5.0, -1.0], [-7.0, 4.0, 2.0]], [[-1.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[0.0, 
-5.0, -5.0], [0.0, 3.0, -3.0]]], [[[7.0, -5.0, -7.0], [6.0, 2.0, -6.0]], [[-6.0, 6.0, -2.0], [-4.0, -7.0, 6.0]], [[5.0, 0.0, 
-0.0], [-5.0, 4.0, 0.0]], [[-2.0, 3.0, 0.0], [-7.0, -7.0, -2.0]], [[-6.0, -4.0, 1.0], [-3.0, -3.0, 6.0]]], [[[0.0, 1.0, -4.0], 
-[0.0, -2.0, 0.0]], [[6.0, 2.0, -6.0], [0.0, 5.0, 5.0]], [[7.0, -3.0, -6.0], [7.0, -2.0, 0.0]], [[1.0, -6.0, -6.0], [-1.0, 5.0, 
--2.0]], [[-5.0, 4.0, 3.0], [7.0, -6.0, 3.0]]]])
-      arg1=Data(numpy.array([[[[4.0, 3.0, -1.0], [6.0, -2.0, -3.0]], [[3.0, 4.0, -3.0], [-5.0, 4.0, -7.0]], [[-4.0, -7.0, 3.0], 
-[-5.0, 0.0, -2.0]], [[6.0, -5.0, 0.0], [3.0, -5.0, -1.0]], [[6.0, 1.0, 1.0], [4.0, -3.0, 3.0]]], [[[-4.0, -3.0, -4.0], [7.0, 
-1.0, 4.0]], [[3.0, -3.0, -3.0], [0.0, 5.0, 1.0]], [[5.0, 4.0, -2.0], [-2.0, 2.0, 1.0]], [[4.0, -4.0, 6.0], [-6.0, 0.0, -7.0]], 
-[[-3.0, 6.0, 6.0], [7.0, -7.0, -5.0]]], [[[4.0, -4.0, -7.0], [-5.0, -4.0, 6.0]], [[0.0, -5.0, -4.0], [1.0, 0.0, 1.0]], [[2.0, 
--4.0, -6.0], [0.0, -6.0, 0.0]], [[7.0, 1.0, -5.0], [-3.0, 0.0, -5.0]], [[5.0, 1.0, -2.0], [4.0, 3.0, -6.0]]], [[[-2.0, -1.0, 
-3.0], [3.0, 2.0, -2.0]], [[2.0, 6.0, 5.0], [0.0, -7.0, -6.0]], [[-7.0, -1.0, 5.0], [-5.0, 2.0, -6.0]], [[-3.0, 5.0, -7.0], 
-[-4.0, 0.0, 7.0]], [[-2.0, 6.0, 6.0], [0.0, -5.0, -7.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[-7.0, -64.0, -3.0, -19.0, 4.0], [69.0, 17.0, -27.0, -50.0, 2.0], [-51.0, 8.0, -46.0, -76.0, 
--8.0], [37.0, -62.0, -6.0, -18.0, -41.0]], [[-44.0, -74.0, 38.0, 26.0, 20.0], [23.0, 19.0, -16.0, 3.0, -63.0], [54.0, 24.0, 
-8.0, -46.0, -53.0], [-4.0, -61.0, -23.0, -1.0, -69.0]], [[1.0, 60.0, -26.0, -14.0, -6.0], [4.0, 62.0, 46.0, -8.0, -98.0], 
-[28.0, 19.0, -4.0, 56.0, 47.0], [-12.0, -66.0, -34.0, 27.0, -73.0]], [[-66.0, -27.0, 47.0, -30.0, -18.0], [-27.0, -10.0, -5.0, 
-21.0, -43.0], [28.0, -12.0, -24.0, -42.0, -73.0], [-11.0, -20.0, 35.0, 32.0, -13.0]], [[30.0, -36.0, -7.0, 18.0, 13.0], [4.0, 
--58.0, -33.0, -12.0, 113.0], [-33.0, -17.0, 16.0, -28.0, -14.0], [9.0, 77.0, 12.0, -21.0, 79.0]]], [[[-35.0, -1.0, 29.0, -46.0, 
--53.0], [46.0, 17.0, -24.0, -34.0, -40.0], [-11.0, 22.0, -10.0, -29.0, -14.0], [13.0, -67.0, 37.0, 29.0, -38.0]], [[69.0, 
--15.0, -52.0, 65.0, 78.0], [-38.0, -29.0, 18.0, 29.0, 95.0], [-25.0, -32.0, 2.0, 20.0, 35.0], [2.0, 98.0, -51.0, -64.0, 66.0]], 
-[[-36.0, 63.0, -11.0, -62.0, -24.0], [-52.0, 13.0, 51.0, 6.0, -66.0], [22.0, -26.0, -36.0, 28.0, -16.0], [-27.0, -13.0, 14.0, 
-71.0, -12.0]], [[-4.0, -3.0, 4.0, -6.0, -6.0], [4.0, -3.0, -5.0, -4.0, 3.0], [-4.0, 0.0, -2.0, -7.0, -5.0], [2.0, -2.0, 7.0, 
-3.0, 2.0]], [[23.0, 68.0, -44.0, -37.0, -18.0], [-4.0, 12.0, 33.0, -29.0, -6.0], [-15.0, -8.0, -8.0, 45.0, 42.0], [-8.0, 2.0, 
--6.0, 39.0, 6.0]]], [[[70.0, 42.0, -32.0, 81.0, 30.0], [35.0, 61.0, 15.0, 12.0, -35.0], [23.0, 53.0, 64.0, 91.0, 110.0], [4.0, 
--29.0, -69.0, -63.0, -54.0]], [[-32.0, -38.0, -16.0, -49.0, -9.0], [3.0, -59.0, -2.0, -78.0, 33.0], [50.0, -20.0, 18.0, -44.0, 
--93.0], [-38.0, 27.0, -4.0, 120.0, 29.0]], [[-18.0, 56.0, 5.0, -5.0, -2.0], [-51.0, 35.0, 43.0, 50.0, -78.0], [29.0, -5.0, 
--14.0, 50.0, 17.0], [-17.0, -18.0, -2.0, 5.0, -30.0]], [[-21.0, 27.0, 26.0, -11.0, -22.0], [-65.0, -52.0, 0.0, 36.0, 34.0], 
-[31.0, -24.0, 26.0, 20.0, -44.0], [-30.0, 75.0, 44.0, 35.0, 71.0]], [[-67.0, -76.0, 58.0, -16.0, -24.0], [32.0, -18.0, -42.0, 
--26.0, -30.0], [48.0, 19.0, 16.0, -72.0, -93.0], [-8.0, -46.0, 24.0, 45.0, -33.0]]], [[[11.0, 8.0, -19.0, 5.0, 3.0], [11.0, 
--1.0, 8.0, -28.0, -4.0], [32.0, 11.0, 32.0, 21.0, 3.0], [-17.0, 0.0, -25.0, 33.0, -8.0]], [[11.0, 29.0, -66.0, -4.0, 32.0], 
-[19.0, 60.0, 65.0, -55.0, -102.0], [68.0, 19.0, 10.0, 49.0, 29.0], [-32.0, -71.0, -94.0, 69.0, -96.0]], [[71.0, -16.0, -60.0, 
-88.0, 67.0], [52.0, 38.0, 17.0, -38.0, -12.0], [55.0, 46.0, 74.0, 55.0, 66.0], [-12.0, -20.0, -115.0, -22.0, -58.0]], [[-18.0, 
-36.0, 29.0, 10.0, -31.0], [28.0, 62.0, 3.0, 12.0, -107.0], [43.0, 51.0, 32.0, 44.0, 34.0], [-3.0, -87.0, -4.0, -1.0, -85.0]], 
-[[34.0, -88.0, -40.0, -2.0, 32.0], [51.0, -63.0, -38.0, -81.0, 133.0], [-50.0, -22.0, -8.0, -82.0, -35.0], [18.0, 53.0, -19.0, 
-7.0, 61.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-6.0, -7.0, 0.0], [-5.0, 5.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, -1.0, 6.0], [-2.0, 5.0, 7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[6.0, -4.0, -4.0], [3.0, 2.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 0.0, -7.0], [1.0, 1.0, 7.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array(-8.0)+(1.-msk_ref)*numpy.array(10.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[-2.0, 3.0, -7.0, 3.0, -2.0], [-4.0, -1.0, -2.0, 7.0, 3.0], [3.0, -6.0, -5.0, 0.0, 4.0], [0.0, 0.0, 
--5.0, -4.0, 5.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-2.0)+(1-msk_arg1)*(7.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[4.0, -5.0, -4.0], [-3.0, 6.0, 2.0], [3.0, -2.0, 0.0], [3.0, -1.0, -6.0]], [[4.0, 0.0, -2.0], 
+[-5.0, 2.0, 5.0], [3.0, -5.0, -6.0], [3.0, -3.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, -5.0, -4.0], [1.0, 6.0, -5.0], [7.0, 0.0, 7.0], [-6.0, -4.0, -4.0]], [[-4.0, 
+-6.0, -6.0], [-2.0, -4.0, 0.0], [-1.0, 2.0, -7.0], [5.0, 3.0, 2.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-5.0, 4.0, 1.0], [4.0, 0.0, 2.0], [2.0, -5.0, -5.0], [-6.0, 6.0, 0.0]], [[-2.0, 5.0, 1.0], 
+[-7.0, 0.0, -2.0], [4.0, -5.0, -2.0], [7.0, 3.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 4.0, 5.0], [7.0, 4.0, 1.0], [-3.0, 0.0, -1.0], [1.0, 3.0, 5.0]], [[3.0, -7.0, 
+-7.0], [3.0, 6.0, 6.0], [-3.0, 3.0, 6.0], [-1.0, 5.0, 2.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[4.0, -6.0, 14.0, -6.0, 4.0], [8.0, 2.0, 4.0, -14.0, -6.0], [-6.0, 12.0, 10.0, -0.0, -8.0], 
-[-0.0, -0.0, 10.0, 8.0, -10.0]])+(1.-msk_ref)*numpy.array([[-14.0, 21.0, -49.0, 21.0, -14.0], [-28.0, -7.0, -14.0, 49.0, 21.0], 
-[21.0, -42.0, -35.0, 0.0, 28.0], [0.0, 0.0, -35.0, -28.0, 35.0]])
+      ref=msk_ref*numpy.array(16.0)+(1.-msk_ref)*numpy.array(-15.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[[-5.0, 5.0, 0.0], [4.0, -6.0, 7.0], [3.0, -7.0, 0.0], [-2.0, -5.0, 0.0], [3.0, 2.0, 6.0]], [[6.0, 
--6.0, 0.0], [2.0, -2.0, -5.0], [2.0, 4.0, 2.0], [-3.0, -4.0, 4.0], [2.0, -5.0, 4.0]], [[6.0, 5.0, 6.0], [4.0, 4.0, -6.0], [7.0, 
-3.0, 1.0], [4.0, -7.0, 7.0], [1.0, 0.0, 1.0]], [[0.0, 0.0, 4.0], [6.0, 3.0, -5.0], [6.0, 7.0, 3.0], [4.0, -4.0, 6.0], [5.0, 
--2.0, 4.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([2.0, 7.0, -5.0])+(1.-msk_arg1)*numpy.array([-6.0, 7.0, -2.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[2.0, -3.0], [0.0, -5.0], [-4.0, 1.0]], [[4.0, -4.0], [2.0, 2.0], [-7.0, 7.0]]], [[[0.0, -6.0], 
+[-3.0, -6.0], [4.0, -6.0]], [[3.0, 6.0], [-3.0, 4.0], [3.0, 5.0]]], [[[-6.0, 0.0], [6.0, -3.0], [-7.0, -7.0]], [[-5.0, 0.0], 
+[-5.0, 2.0], [3.0, -7.0]]], [[[3.0, -5.0], [5.0, 7.0], [7.0, 0.0]], [[-2.0, -2.0], [3.0, 6.0], [-7.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 1.0], [6.0, 7.0], [-5.0, 0.0]], [[0.0, 0.0], [7.0, -3.0], [0.0, -4.0]]], 
+[[[-5.0, -5.0], [4.0, -3.0], [6.0, 5.0]], [[7.0, -4.0], [-3.0, -4.0], [-7.0, -1.0]]], [[[-2.0, -3.0], [3.0, 2.0], [0.0, 0.0]], 
+[[-1.0, -7.0], [4.0, -4.0], [6.0, -7.0]]], [[[3.0, 6.0], [5.0, 5.0], [-2.0, -1.0]], [[5.0, 1.0], [-6.0, -2.0], [-6.0, -2.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-4.0, -6.0], [-3.0, -4.0], [6.0, 2.0]], [[3.0, 2.0], [5.0, 0.0], [6.0, 7.0]]], [[[0.0, 5.0], 
+[4.0, 3.0], [0.0, 1.0]], [[6.0, -2.0], [6.0, 0.0], [-7.0, -4.0]]], [[[0.0, 7.0], [1.0, -3.0], [3.0, -1.0]], [[7.0, -6.0], [6.0, 
+4.0], [0.0, 0.0]]], [[[-6.0, 5.0], [-2.0, 2.0], [6.0, -3.0]], [[7.0, 0.0], [7.0, 3.0], [5.0, 3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, -1.0], [5.0, 6.0], [1.0, -2.0]], [[-7.0, -7.0], [5.0, 3.0], [-4.0, -7.0]]], 
+[[[6.0, 4.0], [-7.0, 2.0], [2.0, 3.0]], [[-3.0, 0.0], [-3.0, 0.0], [-7.0, 6.0]]], [[[1.0, -1.0], [-2.0, -4.0], [-4.0, 6.0]], 
+[[3.0, 0.0], [-3.0, -3.0], [4.0, -1.0]]], [[[1.0, -2.0], [1.0, 1.0], [-1.0, 3.0]], [[4.0, -1.0], [-1.0, 0.0], [6.0, -1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[25.0, -69.0, -43.0, -39.0, -10.0], [-30.0, 15.0, 22.0, -54.0, -51.0], [17.0, 66.0, 30.0, -76.0, 
--3.0], [-20.0, 58.0, 46.0, -50.0, -24.0]])+(1.-msk_ref)*numpy.array([[65.0, -80.0, -67.0, -23.0, -16.0], [-78.0, -16.0, 12.0, 
--18.0, -55.0], [-13.0, 16.0, -23.0, -87.0, -8.0], [-8.0, -5.0, 7.0, -64.0, -52.0]])
+      ref=msk_ref*numpy.array(-156.0)+(1.-msk_ref)*numpy.array(103.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank2_offset2(self):
-      arg0=numpy.array([[[[-6.0, -5.0, -2.0], [2.0, -2.0, 4.0]], [[6.0, -1.0, -5.0], [0.0, -3.0, 0.0]], [[7.0, 2.0, 4.0], [5.0, 
--3.0, -2.0]], [[6.0, -4.0, 5.0], [-2.0, 0.0, 3.0]], [[-5.0, 3.0, 2.0], [2.0, 6.0, -4.0]]], [[[1.0, 7.0, -4.0], [5.0, -4.0, 
--3.0]], [[1.0, 1.0, 4.0], [-6.0, -4.0, 0.0]], [[0.0, -5.0, -3.0], [-7.0, -3.0, 0.0]], [[-6.0, 5.0, -5.0], [0.0, -4.0, -7.0]], 
-[[0.0, -7.0, 5.0], [-1.0, 6.0, 2.0]]], [[[-3.0, 0.0, 0.0], [2.0, -5.0, 0.0]], [[-4.0, -6.0, -6.0], [-2.0, 0.0, 4.0]], [[-7.0, 
--2.0, 1.0], [5.0, 6.0, 0.0]], [[0.0, -4.0, -5.0], [0.0, -3.0, -7.0]], [[1.0, 1.0, 7.0], [6.0, 5.0, 4.0]]], [[[0.0, -5.0, 3.0], 
-[1.0, -2.0, 4.0]], [[-7.0, 2.0, -3.0], [-3.0, 0.0, 2.0]], [[2.0, -7.0, 0.0], [-7.0, 2.0, 0.0]], [[-7.0, -4.0, 4.0], [7.0, 2.0, 
-5.0]], [[4.0, -1.0, -1.0], [-4.0, 6.0, -1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, 4.0, 0.0], [3.0, 1.0, 6.0]])+(1.-msk_arg1)*numpy.array([[0.0, 1.0, 0.0], [1.0, 5.0, 
--3.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_expandedData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(7.0,self.functionspace)
+      arg0.setTaggedValue(1,1.0)
+      arg0.expand()
+      arg1=Data(numpy.array([7.0, 5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -6.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[44.0, -43.0, -34.0, -40.0, 30.0], [15.0, -24.0, -44.0, 10.0, -13.0], [19.0, 18.0, 55.0, -61.0, 
-45.0], [5.0, 53.0, -59.0, 79.0, -40.0]])+(1.-msk_ref)*numpy.array([[-25.0, -16.0, -2.0, -15.0, 47.0], [1.0, -25.0, -27.0, 6.0, 
-16.0], [-23.0, -20.0, 33.0, 2.0, 20.0], [-26.0, -7.0, -4.0, -2.0, 28.0]])
+      ref=msk_ref*numpy.array([49.0, 35.0])+(1.-msk_ref)*numpy.array([2.0, -6.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank1_offset0(self):
-      arg0=numpy.array([[4.0, 1.0, 2.0, 3.0, 6.0], [-6.0, 6.0, 3.0, 3.0, 5.0], [-2.0, 3.0, 1.0, -3.0, 6.0], [7.0, 3.0, 5.0, 
-4.0, -4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 4.0])+(1.-msk_arg1)*numpy.array([-5.0, 4.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([2.0, -7.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, 2.0, 5.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[7.0, 2.0], [6.0, -1.0], [6.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 7.0], [2.0, 0.0], [-1.0, 6.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 16.0], [0.0, 4.0], [0.0, 8.0], [0.0, 12.0], [0.0, 24.0]], [[0.0, -24.0], [0.0, 24.0], 
-[0.0, 12.0], [0.0, 12.0], [0.0, 20.0]], [[0.0, -8.0], [0.0, 12.0], [0.0, 4.0], [0.0, -12.0], [0.0, 24.0]], [[0.0, 28.0], [0.0, 
-12.0], [0.0, 20.0], [0.0, 16.0], [0.0, -16.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, 16.0], [-5.0, 4.0], [-10.0, 8.0], [-15.0, 
-12.0], [-30.0, 24.0]], [[30.0, -24.0], [-30.0, 24.0], [-15.0, 12.0], [-15.0, 12.0], [-25.0, 20.0]], [[10.0, -8.0], [-15.0, 
-12.0], [-5.0, 4.0], [15.0, -12.0], [-30.0, 24.0]], [[-35.0, 28.0], [-15.0, 12.0], [-25.0, 20.0], [-20.0, 16.0], [20.0, -16.0]]])
+      ref=msk_ref*numpy.array([-58.0, 46.0])+(1.-msk_ref)*numpy.array([-5.0, 37.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[[7.0, -2.0, -5.0], [-4.0, -6.0, -4.0], [3.0, 7.0, 5.0], [7.0, 3.0, -4.0], [1.0, 0.0, -5.0]], [[-6.0, 
--4.0, 1.0], [-4.0, 6.0, -3.0], [0.0, -3.0, -4.0], [-7.0, 6.0, -7.0], [-2.0, -7.0, 2.0]], [[1.0, 2.0, 1.0], [3.0, 6.0, -4.0], 
-[-7.0, 0.0, 3.0], [-7.0, 1.0, 7.0], [-2.0, -1.0, 6.0]], [[4.0, -3.0, 0.0], [-6.0, -7.0, 4.0], [-5.0, -7.0, 6.0], [2.0, -3.0, 
--5.0], [-4.0, -3.0, -2.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[3.0, 2.0, -2.0], [-4.0, -7.0, -5.0]])+(1.-msk_arg1)*numpy.array([[1.0, 7.0, 0.0], [0.0, -7.0, 
-4.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[2.0, 2.0, 6.0], [-2.0, 4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, 6.0, 4.0], [6.0, -5.0, -2.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-6.0, 5.0], [-2.0, -7.0], [-1.0, 3.0]], [[0.0, 2.0], [0.0, 2.0], [-6.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 3.0], [-5.0, 7.0], [-1.0, -5.0]], [[-4.0, 0.0], [-3.0, -4.0], [1.0, -7.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-22.0, 18.0])+(1.-msk_ref)*numpy.array([-57.0, 50.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[1.0, -3.0, -3.0], [1.0, -3.0, -3.0], [5.0, 4.0, 6.0], [1.0, -4.0, -5.0]], [[-1.0, 7.0, 4.0], 
+[-4.0, 0.0, 1.0], [6.0, -3.0, 4.0], [5.0, -6.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-4.0, -7.0, 4.0], [6.0, -2.0, 0.0], [7.0, 2.0, -2.0], [-2.0, 2.0, 1.0]], [[-5.0, 
+6.0, 1.0], [7.0, 6.0, -2.0], [0.0, -6.0, -5.0], [1.0, 0.0, 3.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[0.0, 4.0], [2.0, -5.0], [-6.0, -6.0]], [[3.0, -3.0], [5.0, -1.0], [-4.0, -6.0]], [[-4.0, 2.0], 
+[4.0, 0.0], [-4.0, 7.0]], [[2.0, 2.0], [-7.0, 1.0], [-1.0, -6.0]]], [[[-5.0, 7.0], [-7.0, 0.0], [-5.0, -6.0]], [[6.0, 4.0], 
+[3.0, 2.0], [-3.0, 3.0]], [[0.0, 4.0], [-3.0, 4.0], [4.0, -6.0]], [[-5.0, 6.0], [6.0, 0.0], [6.0, 6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, 3.0], [-3.0, 2.0], [6.0, -4.0]], [[3.0, -4.0], [0.0, -6.0], [0.0, -4.0]], 
+[[-4.0, 7.0], [-3.0, 4.0], [1.0, -3.0]], [[6.0, -4.0], [0.0, 6.0], [-6.0, -4.0]]], [[[-6.0, -7.0], [4.0, 5.0], [-5.0, -5.0]], 
+[[0.0, -1.0], [-6.0, -3.0], [7.0, 0.0]], [[-1.0, 3.0], [-5.0, 7.0], [0.0, -3.0]], [[-4.0, 7.0], [1.0, 6.0], [6.0, 5.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[27.0, 11.0], [-16.0, 78.0], [13.0, -86.0], [35.0, -29.0], [13.0, 21.0]], [[-28.0, 47.0], [6.0, 
--11.0], [2.0, 41.0], [5.0, 21.0], [-24.0, 47.0]], [[5.0, -23.0], [29.0, -34.0], [-27.0, 13.0], [-33.0, -14.0], [-20.0, -15.0]], 
-[[6.0, 5.0], [-40.0, 53.0], [-41.0, 39.0], [10.0, 38.0], [-14.0, 47.0]]])+(1.-msk_ref)*numpy.array([[[-7.0, -6.0], [-46.0, 
-26.0], [52.0, -29.0], [28.0, -37.0], [1.0, -20.0]], [[-34.0, 32.0], [38.0, -54.0], [-21.0, 5.0], [35.0, -70.0], [-51.0, 57.0]], 
-[[15.0, -10.0], [45.0, -58.0], [-7.0, 12.0], [0.0, 21.0], [-9.0, 31.0]], [[-17.0, 21.0], [-55.0, 65.0], [-54.0, 73.0], [-19.0, 
-1.0], [-25.0, 13.0]]])
+      ref=msk_ref*numpy.array([-108.0, 109.0])+(1.-msk_ref)*numpy.array([40.0, 55.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank3_offset2(self):
-      arg0=numpy.array([[[[7.0, -1.0, -1.0], [7.0, -3.0, -7.0]], [[4.0, 3.0, 0.0], [3.0, -2.0, -7.0]], [[6.0, 0.0, -4.0], 
-[-1.0, 2.0, 7.0]], [[-7.0, 3.0, 0.0], [7.0, 0.0, 0.0]], [[1.0, -7.0, 2.0], [-5.0, 5.0, -1.0]]], [[[-2.0, 0.0, 5.0], [-3.0, 4.0, 
--5.0]], [[-7.0, 7.0, 3.0], [6.0, 3.0, -5.0]], [[1.0, -6.0, 4.0], [-3.0, 0.0, -6.0]], [[6.0, -5.0, 6.0], [-2.0, 4.0, 7.0]], 
-[[7.0, 2.0, -4.0], [6.0, -5.0, 1.0]]], [[[-5.0, -2.0, 1.0], [-3.0, 5.0, 7.0]], [[0.0, -7.0, 4.0], [3.0, -2.0, -3.0]], [[7.0, 
-6.0, 1.0], [6.0, -4.0, 1.0]], [[-3.0, -6.0, 5.0], [0.0, -3.0, 2.0]], [[-1.0, -3.0, -7.0], [1.0, 7.0, -3.0]]], [[[2.0, 5.0, 
-0.0], [-2.0, -7.0, 4.0]], [[-7.0, 7.0, 0.0], [-1.0, -3.0, -2.0]], [[-3.0, -5.0, -3.0], [7.0, 4.0, 0.0]], [[-5.0, 3.0, -1.0], 
-[0.0, 2.0, -2.0]], [[2.0, 2.0, 0.0], [-2.0, 0.0, -3.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, -7.0, -1.0], [-5.0, 2.0, 2.0]], [[-4.0, 3.0, -7.0], [-3.0, 1.0, 
--2.0]]])+(1.-msk_arg1)*numpy.array([[[-2.0, 7.0, 2.0], [0.0, 7.0, -7.0]], [[-4.0, -5.0, 5.0], [-3.0, 0.0, 7.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_expandedData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,4.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[-5.0, -2.0, -4.0, 6.0, 0.0], [-7.0, -6.0, 5.0, 1.0, 3.0], [4.0, -5.0, 3.0, -4.0, 0.0], [-2.0, 
+3.0, -1.0, 6.0, 3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 2.0, 0.0, 0.0, -5.0], [5.0, -2.0, -3.0, 7.0, -4.0], [1.0, -4.0, -1.0, -5.0, 
+3.0], [-6.0, 3.0, 7.0, -3.0, -4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[2.0, -34.0], [-26.0, -4.0], [69.0, -5.0], [-105.0, 16.0], [87.0, -17.0]], [[-6.0, -4.0], 
-[-135.0, 23.0], [48.0, -29.0], [103.0, -85.0], [1.0, -19.0]], [[17.0, 7.0], [20.0, -54.0], [-30.0, -41.0], [14.0, -48.0], 
-[24.0, 54.0]], [[-17.0, -2.0], [-103.0, 53.0], [-10.0, 1.0], [-55.0, 42.0], [4.0, 10.0]]])+(1.-msk_ref)*numpy.array([[[5.0, 
--98.0], [48.0, -89.0], [-55.0, 8.0], [35.0, -8.0], [-5.0, 49.0]], [[77.0, 7.0], [125.0, -45.0], [6.0, 13.0], [-56.0, 86.0], 
-[-50.0, -69.0]], [[-16.0, 93.0], [-34.0, 25.0], [-5.0, -64.0], [-61.0, 81.0], [37.0, -40.0]], [[-46.0, 1.0], [56.0, -18.0], 
-[-7.0, 1.0], [57.0, -14.0], [31.0, -33.0]]])
+      ref=msk_ref*numpy.array([[15.0, 6.0, 12.0, -18.0, -0.0], [21.0, 18.0, -15.0, -3.0, -9.0], [-12.0, 15.0, -9.0, 12.0, 
+-0.0], [6.0, -9.0, 3.0, -18.0, -9.0]])+(1.-msk_ref)*numpy.array([[12.0, 8.0, 0.0, 0.0, -20.0], [20.0, -8.0, -12.0, 28.0, 
+-16.0], [4.0, -16.0, -4.0, -20.0, 12.0], [-24.0, 12.0, 28.0, -12.0, -16.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank2_expandedData_rank2_offset0(self):
-      arg0=numpy.array([[-5.0, 0.0, -4.0, 1.0, -2.0], [-1.0, 2.0, 5.0, -3.0, -3.0], [-1.0, 7.0, 6.0, 2.0, -2.0], [-3.0, 3.0, 
--3.0, -4.0, -4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, 0.0, 3.0, 6.0, -7.0], [-4.0, 0.0, 0.0, 4.0, 0.0], [6.0, 3.0, 4.0, 0.0, -7.0], [-3.0, 
--1.0, 6.0, -3.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-6.0, -7.0, 7.0, -1.0, -4.0], [0.0, 1.0, -1.0, 0.0, -1.0], [-4.0, 0.0, 
-0.0, -1.0, 0.0], [-1.0, -3.0, 5.0, -7.0, 1.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([1.0, 6.0, 1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, 6.0, 0.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[4.0, 2.0, 2.0, -2.0, 2.0], [5.0, -6.0, 7.0, 0.0, -3.0], [-2.0, -4.0, 3.0, -5.0, -4.0], [-2.0, 
+4.0, -7.0, 6.0, 1.0]], [[-5.0, 2.0, 3.0, 0.0, -1.0], [1.0, -4.0, -6.0, 0.0, 0.0], [-7.0, 7.0, -5.0, 6.0, -2.0], [7.0, -3.0, 
+-1.0, 0.0, -1.0]], [[-7.0, 5.0, 0.0, 6.0, 5.0], [4.0, 5.0, 5.0, 3.0, 4.0], [-2.0, -7.0, -7.0, 7.0, 6.0], [3.0, 4.0, -1.0, -2.0, 
+-5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 1.0, 2.0, 4.0, 5.0], [4.0, 0.0, 2.0, 0.0, 0.0], [-2.0, -1.0, -6.0, 7.0, 2.0], 
+[0.0, -5.0, 1.0, -4.0, -4.0]], [[-2.0, -4.0, 3.0, 7.0, 6.0], [-5.0, -3.0, 3.0, 0.0, 6.0], [-7.0, -2.0, -3.0, 0.0, 5.0], [6.0, 
+2.0, 2.0, 1.0, 7.0]], [[-4.0, 7.0, 0.0, 1.0, 5.0], [2.0, 2.0, 7.0, 0.0, 0.0], [7.0, 1.0, -5.0, -2.0, 6.0], [-5.0, 7.0, -5.0, 
+-1.0, -6.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-25.0, 0.0, -15.0, -30.0, 35.0], [20.0, 0.0, 0.0, -20.0, 0.0], [-30.0, -15.0, -20.0, 0.0, 
-35.0], [15.0, 5.0, -30.0, 15.0, 20.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[-20.0, 0.0, -12.0, -24.0, 28.0], [16.0, 0.0, 0.0, -16.0, 0.0], [-24.0, -12.0, -16.0, 0.0, 28.0], [12.0, 
-4.0, -24.0, 12.0, 16.0]], [[5.0, 0.0, 3.0, 6.0, -7.0], [-4.0, 0.0, 0.0, 4.0, 0.0], [6.0, 3.0, 4.0, 0.0, -7.0], [-3.0, -1.0, 
-6.0, -3.0, -4.0]], [[-10.0, 0.0, -6.0, -12.0, 14.0], [8.0, 0.0, 0.0, -8.0, 0.0], [-12.0, -6.0, -8.0, 0.0, 14.0], [6.0, 2.0, 
--12.0, 6.0, 8.0]]], [[[-5.0, 0.0, -3.0, -6.0, 7.0], [4.0, 0.0, 0.0, -4.0, 0.0], [-6.0, -3.0, -4.0, 0.0, 7.0], [3.0, 1.0, -6.0, 
-3.0, 4.0]], [[10.0, 0.0, 6.0, 12.0, -14.0], [-8.0, 0.0, 0.0, 8.0, 0.0], [12.0, 6.0, 8.0, 0.0, -14.0], [-6.0, -2.0, 12.0, -6.0, 
--8.0]], [[25.0, 0.0, 15.0, 30.0, -35.0], [-20.0, 0.0, 0.0, 20.0, 0.0], [30.0, 15.0, 20.0, 0.0, -35.0], [-15.0, -5.0, 30.0, 
--15.0, -20.0]], [[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], [9.0, 3.0, 
--18.0, 9.0, 12.0]], [[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], [9.0, 3.0, 
--18.0, 9.0, 12.0]]], [[[-5.0, 0.0, -3.0, -6.0, 7.0], [4.0, 0.0, 0.0, -4.0, 0.0], [-6.0, -3.0, -4.0, 0.0, 7.0], [3.0, 1.0, -6.0, 
-3.0, 4.0]], [[35.0, 0.0, 21.0, 42.0, -49.0], [-28.0, 0.0, 0.0, 28.0, 0.0], [42.0, 21.0, 28.0, 0.0, -49.0], [-21.0, -7.0, 42.0, 
--21.0, -28.0]], [[30.0, 0.0, 18.0, 36.0, -42.0], [-24.0, 0.0, 0.0, 24.0, 0.0], [36.0, 18.0, 24.0, 0.0, -42.0], [-18.0, -6.0, 
-36.0, -18.0, -24.0]], [[10.0, 0.0, 6.0, 12.0, -14.0], [-8.0, 0.0, 0.0, 8.0, 0.0], [12.0, 6.0, 8.0, 0.0, -14.0], [-6.0, -2.0, 
-12.0, -6.0, -8.0]], [[-10.0, 0.0, -6.0, -12.0, 14.0], [8.0, 0.0, 0.0, -8.0, 0.0], [-12.0, -6.0, -8.0, 0.0, 14.0], [6.0, 2.0, 
--12.0, 6.0, 8.0]]], [[[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], [9.0, 
-3.0, -18.0, 9.0, 12.0]], [[15.0, 0.0, 9.0, 18.0, -21.0], [-12.0, 0.0, 0.0, 12.0, 0.0], [18.0, 9.0, 12.0, 0.0, -21.0], [-9.0, 
--3.0, 18.0, -9.0, -12.0]], [[-15.0, 0.0, -9.0, -18.0, 21.0], [12.0, 0.0, 0.0, -12.0, 0.0], [-18.0, -9.0, -12.0, 0.0, 21.0], 
-[9.0, 3.0, -18.0, 9.0, 12.0]], [[-20.0, 0.0, -12.0, -24.0, 28.0], [16.0, 0.0, 0.0, -16.0, 0.0], [-24.0, -12.0, -16.0, 0.0, 
-28.0], [12.0, 4.0, -24.0, 12.0, 16.0]], [[-20.0, 0.0, -12.0, -24.0, 28.0], [16.0, 0.0, 0.0, -16.0, 0.0], [-24.0, -12.0, -16.0, 
-0.0, 28.0], [12.0, 4.0, -24.0, 12.0, 16.0]]]])+(1.-msk_ref)*numpy.array([[[[30.0, 35.0, -35.0, 5.0, 20.0], [0.0, -5.0, 5.0, 
-0.0, 5.0], [20.0, 0.0, 0.0, 5.0, 0.0], [5.0, 15.0, -25.0, 35.0, -5.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[24.0, 28.0, -28.0, 4.0, 16.0], [0.0, -4.0, 4.0, 0.0, 4.0], [16.0, 0.0, 
-0.0, 4.0, 0.0], [4.0, 12.0, -20.0, 28.0, -4.0]], [[-6.0, -7.0, 7.0, -1.0, -4.0], [0.0, 1.0, -1.0, 0.0, -1.0], [-4.0, 0.0, 0.0, 
--1.0, 0.0], [-1.0, -3.0, 5.0, -7.0, 1.0]], [[12.0, 14.0, -14.0, 2.0, 8.0], [0.0, -2.0, 2.0, 0.0, 2.0], [8.0, 0.0, 0.0, 2.0, 
-0.0], [2.0, 6.0, -10.0, 14.0, -2.0]]], [[[6.0, 7.0, -7.0, 1.0, 4.0], [0.0, -1.0, 1.0, 0.0, 1.0], [4.0, 0.0, 0.0, 1.0, 0.0], 
-[1.0, 3.0, -5.0, 7.0, -1.0]], [[-12.0, -14.0, 14.0, -2.0, -8.0], [0.0, 2.0, -2.0, 0.0, -2.0], [-8.0, 0.0, 0.0, -2.0, 0.0], 
-[-2.0, -6.0, 10.0, -14.0, 2.0]], [[-30.0, -35.0, 35.0, -5.0, -20.0], [0.0, 5.0, -5.0, 0.0, -5.0], [-20.0, 0.0, 0.0, -5.0, 0.0], 
-[-5.0, -15.0, 25.0, -35.0, 5.0]], [[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], 
-[3.0, 9.0, -15.0, 21.0, -3.0]], [[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], [3.0, 
-9.0, -15.0, 21.0, -3.0]]], [[[6.0, 7.0, -7.0, 1.0, 4.0], [0.0, -1.0, 1.0, 0.0, 1.0], [4.0, 0.0, 0.0, 1.0, 0.0], [1.0, 3.0, 
--5.0, 7.0, -1.0]], [[-42.0, -49.0, 49.0, -7.0, -28.0], [0.0, 7.0, -7.0, 0.0, -7.0], [-28.0, 0.0, 0.0, -7.0, 0.0], [-7.0, -21.0, 
-35.0, -49.0, 7.0]], [[-36.0, -42.0, 42.0, -6.0, -24.0], [0.0, 6.0, -6.0, 0.0, -6.0], [-24.0, 0.0, 0.0, -6.0, 0.0], [-6.0, 
--18.0, 30.0, -42.0, 6.0]], [[-12.0, -14.0, 14.0, -2.0, -8.0], [0.0, 2.0, -2.0, 0.0, -2.0], [-8.0, 0.0, 0.0, -2.0, 0.0], [-2.0, 
--6.0, 10.0, -14.0, 2.0]], [[12.0, 14.0, -14.0, 2.0, 8.0], [0.0, -2.0, 2.0, 0.0, 2.0], [8.0, 0.0, 0.0, 2.0, 0.0], [2.0, 6.0, 
--10.0, 14.0, -2.0]]], [[[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], [3.0, 9.0, 
--15.0, 21.0, -3.0]], [[-18.0, -21.0, 21.0, -3.0, -12.0], [0.0, 3.0, -3.0, 0.0, -3.0], [-12.0, 0.0, 0.0, -3.0, 0.0], [-3.0, 
--9.0, 15.0, -21.0, 3.0]], [[18.0, 21.0, -21.0, 3.0, 12.0], [0.0, -3.0, 3.0, 0.0, 3.0], [12.0, 0.0, 0.0, 3.0, 0.0], [3.0, 9.0, 
--15.0, 21.0, -3.0]], [[24.0, 28.0, -28.0, 4.0, 16.0], [0.0, -4.0, 4.0, 0.0, 4.0], [16.0, 0.0, 0.0, 4.0, 0.0], [4.0, 12.0, 
--20.0, 28.0, -4.0]], [[24.0, 28.0, -28.0, 4.0, 16.0], [0.0, -4.0, 4.0, 0.0, 4.0], [16.0, 0.0, 0.0, 4.0, 0.0], [4.0, 12.0, 
--20.0, 28.0, -4.0]]]])
+      ref=msk_ref*numpy.array([[-33.0, 19.0, 20.0, 4.0, 1.0], [15.0, -25.0, -24.0, 3.0, 1.0], [-46.0, 31.0, -34.0, 38.0, 
+-10.0], [43.0, -10.0, -14.0, 4.0, -10.0]])+(1.-msk_ref)*numpy.array([[0.0, -18.0, 30.0, 66.0, 66.0], [-6.0, -18.0, 30.0, 0.0, 
+36.0], [-54.0, -18.0, -54.0, 42.0, 42.0], [36.0, -18.0, 18.0, -18.0, 18.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank3_offset1(self):
-      arg0=numpy.array([[[-3.0, -2.0, -1.0], [-5.0, 0.0, -2.0], [2.0, 3.0, 4.0], [-2.0, 2.0, 1.0], [4.0, 5.0, -1.0]], [[-3.0, 
-5.0, 6.0], [7.0, -3.0, -4.0], [-7.0, 4.0, 1.0], [3.0, -4.0, -1.0], [-7.0, 3.0, -3.0]], [[6.0, 4.0, -2.0], [-6.0, 5.0, 7.0], 
-[2.0, 6.0, 4.0], [3.0, 1.0, 0.0], [5.0, 5.0, -6.0]], [[1.0, 5.0, -5.0], [-1.0, -2.0, 4.0], [-6.0, 4.0, 6.0], [4.0, 7.0, 5.0], 
-[7.0, -4.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, -1.0, -7.0], [2.0, 1.0, -3.0], [6.0, -2.0, 2.0], [1.0, 3.0, -1.0], [1.0, 4.0, 0.0]], 
-[[-1.0, -6.0, 3.0], [5.0, -6.0, 1.0], [-2.0, 2.0, 5.0], [3.0, -6.0, 0.0], [-6.0, 7.0, 0.0]], [[5.0, -1.0, 6.0], [0.0, -2.0, 
--3.0], [3.0, -1.0, 1.0], [4.0, 4.0, -2.0], [-2.0, 2.0, -4.0]], [[-2.0, 7.0, -6.0], [6.0, -2.0, -4.0], [-5.0, -2.0, -1.0], 
-[-4.0, -5.0, 4.0], [-1.0, -5.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 5.0, 1.0], [5.0, 6.0, 4.0], [-1.0, 5.0, 4.0], 
-[-5.0, 1.0, 0.0], [-2.0, 0.0, -7.0]], [[-2.0, 3.0, -7.0], [2.0, 7.0, 2.0], [7.0, 2.0, -1.0], [-5.0, 0.0, 1.0], [3.0, 2.0, 
-3.0]], [[0.0, -1.0, 5.0], [6.0, 7.0, 3.0], [2.0, 1.0, -1.0], [3.0, -7.0, -5.0], [-3.0, 6.0, 3.0]], [[-7.0, 7.0, 0.0], [-1.0, 
-0.0, -3.0], [3.0, 0.0, -3.0], [7.0, -1.0, -4.0], [-1.0, -2.0, -6.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[3.0, 5.0, 5.0], [0.0, -6.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, 5.0, -2.0], [0.0, -3.0, -1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-2.0, 0.0, -2.0, 4.0, 6.0], [6.0, 0.0, 0.0, -5.0, 0.0], [-6.0, 0.0, -1.0, -4.0, -4.0], [-6.0, 
+1.0, 1.0, 6.0, -2.0]], [[7.0, 6.0, -5.0, 0.0, -7.0], [3.0, 2.0, 0.0, -2.0, -7.0], [-4.0, 0.0, -3.0, -5.0, 3.0], [-2.0, -5.0, 
+-7.0, 0.0, -3.0]], [[7.0, 0.0, 3.0, 0.0, -4.0], [0.0, -3.0, -4.0, -3.0, -3.0], [3.0, 6.0, -7.0, 7.0, 0.0], [-1.0, -3.0, -7.0, 
+-6.0, 4.0]]], [[[0.0, 6.0, 1.0, 7.0, 5.0], [3.0, 4.0, 0.0, 2.0, 1.0], [-3.0, -3.0, 2.0, -7.0, 4.0], [0.0, 3.0, -4.0, -3.0, 
+1.0]], [[6.0, 5.0, 2.0, -1.0, 5.0], [5.0, -3.0, 1.0, -4.0, -3.0], [-3.0, -2.0, -3.0, 2.0, -7.0], [0.0, 0.0, -4.0, -5.0, 1.0]], 
+[[-7.0, -1.0, 7.0, 4.0, 3.0], [1.0, 4.0, 0.0, -6.0, -5.0], [5.0, 7.0, -2.0, -3.0, -7.0], [0.0, 3.0, 5.0, 0.0, 
+1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, -4.0, 5.0, -4.0, 4.0], [4.0, 2.0, 2.0, 7.0, 6.0], [4.0, -2.0, -5.0, 6.0, 
+0.0], [-4.0, -4.0, 4.0, -1.0, 2.0]], [[-3.0, -1.0, 1.0, 6.0, 7.0], [-5.0, 1.0, 4.0, -5.0, -1.0], [0.0, 6.0, 2.0, 6.0, -3.0], 
+[-6.0, 6.0, -2.0, 0.0, 1.0]], [[-6.0, -7.0, 2.0, 7.0, 2.0], [-5.0, -2.0, -1.0, 3.0, 1.0], [0.0, -1.0, 1.0, 0.0, -5.0], [-5.0, 
+-3.0, 3.0, -6.0, -1.0]]], [[[-5.0, -7.0, 4.0, -5.0, 0.0], [-5.0, 2.0, 4.0, 2.0, 5.0], [-1.0, 3.0, 4.0, 0.0, 1.0], [-4.0, -1.0, 
+-4.0, 4.0, 0.0]], [[-3.0, -2.0, -5.0, 1.0, 4.0], [0.0, -4.0, 0.0, -1.0, -3.0], [-4.0, 7.0, -4.0, -7.0, 4.0], [-3.0, -5.0, 1.0, 
+6.0, 2.0]], [[-4.0, 6.0, -5.0, 7.0, 7.0], [6.0, -2.0, 0.0, -4.0, 2.0], [-7.0, 5.0, 6.0, 4.0, 7.0], [0.0, -5.0, -5.0, 0.0, 
+1.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-3.0, -5.0, -16.0, -8.0, -11.0], [12.0, -4.0, -3.0, 3.0, 4.0], [-19.0, 7.0, -8.0, -18.0, 
-6.0], [-2.0, -10.0, 20.0, 18.0, 20.0]], [[-6.0, -4.0, -34.0, -3.0, -5.0], [-1.0, -27.0, 0.0, -15.0, 30.0], [-37.0, 6.0, -17.0, 
--16.0, 18.0], [22.0, -22.0, 27.0, 12.0, 19.0]], [[-23.0, -5.0, 14.0, 7.0, 14.0], [-8.0, -4.0, 22.0, -12.0, 9.0], [31.0, -18.0, 
-7.0, 12.0, -14.0], [-7.0, -10.0, -20.0, -7.0, -45.0]], [[-17.0, -5.0, -14.0, 3.0, 6.0], [-7.0, -21.0, 13.0, -18.0, 26.0], 
-[-6.0, -7.0, -7.0, -2.0, 4.0], [12.0, -20.0, 5.0, 2.0, -15.0]], [[18.0, 16.0, 12.0, 20.0, 24.0], [-37.0, -11.0, -3.0, -18.0, 
-11.0], [9.0, -7.0, 6.0, 38.0, 6.0], [33.0, 18.0, -29.0, -45.0, -22.0]]], [[[-59.0, -19.0, -16.0, 6.0, 17.0], [-9.0, -39.0, 
-46.0, -39.0, 53.0], [16.0, -28.0, -8.0, -4.0, -8.0], [5.0, -52.0, -1.0, 11.0, -64.0]], [[59.0, 23.0, 40.0, 2.0, -5.0], [-1.0, 
-49.0, -40.0, 39.0, -63.0], [14.0, 18.0, 20.0, 24.0, -4.0], [-11.0, 64.0, -25.0, -29.0, 36.0]], [[-39.0, -13.0, -48.0, 4.0, 
-9.0], [-14.0, -58.0, 27.0, -45.0, 70.0], [-33.0, -11.0, -24.0, -14.0, 18.0], [36.0, -54.0, 26.0, 12.0, -20.0]], [[23.0, 5.0, 
-24.0, -8.0, -13.0], [18.0, 38.0, -19.0, 33.0, -46.0], [13.0, 11.0, 12.0, -2.0, -10.0], [-28.0, 30.0, -6.0, 4.0, 24.0]], 
-[[-10.0, -2.0, -54.0, 5.0, 5.0], [-20.0, -56.0, 5.0, -39.0, 63.0], [-56.0, 3.0, -27.0, -10.0, 32.0], [53.0, -36.0, 32.0, 1.0, 
-13.0]]], [[[34.0, 22.0, 24.0, 20.0, 22.0], [-36.0, 4.0, -14.0, -6.0, -8.0], [14.0, -2.0, 12.0, 44.0, 4.0], [28.0, 36.0, -36.0, 
--52.0, -12.0]], [[-78.0, -28.0, -32.0, 2.0, 14.0], [-3.0, -53.0, 57.0, -48.0, 71.0], [7.0, -31.0, -16.0, -18.0, -6.0], [5.0, 
--74.0, 13.0, 27.0, -68.0]], [[-26.0, -2.0, 8.0, 16.0, 26.0], [-26.0, -22.0, 28.0, -30.0, 30.0], [28.0, -24.0, 4.0, 24.0, -8.0], 
-[14.0, -16.0, -26.0, -22.0, -60.0]], [[11.0, 7.0, 16.0, 6.0, 7.0], [-9.0, 9.0, -4.0, 3.0, -11.0], [14.0, -2.0, 8.0, 16.0, 
--4.0], [1.0, 16.0, -17.0, -17.0, -8.0]], [[57.0, 33.0, 8.0, 26.0, 25.0], [-53.0, -11.0, -30.0, -15.0, 5.0], [-16.0, 8.0, 4.0, 
-52.0, 24.0], [61.0, 44.0, -29.0, -69.0, 12.0]]], [[[34.0, 22.0, -14.0, 21.0, 21.0], [-46.0, -30.0, -17.0, -27.0, 29.0], [-30.0, 
-5.0, -7.0, 34.0, 28.0], [63.0, 16.0, -10.0, -49.0, 9.0]], [[-30.0, -16.0, 6.0, -11.0, -9.0], [25.0, 11.0, 18.0, 9.0, -8.0], 
-[21.0, -8.0, 3.0, -20.0, -18.0], [-36.0, -18.0, 5.0, 30.0, -17.0]], [[-70.0, -26.0, -32.0, 0.0, 10.0], [0.0, -48.0, 50.0, 
--42.0, 64.0], [2.0, -26.0, -16.0, -20.0, -4.0], [4.0, -68.0, 16.0, 28.0, -56.0]], [[-26.0, 0.0, 20.0, 20.0, 32.0], [-31.0, 
--17.0, 31.0, -30.0, 25.0], [43.0, -29.0, 10.0, 34.0, -14.0], [11.0, -10.0, -39.0, -31.0, -74.0]], [[74.0, 28.0, 38.0, 1.0, 
--9.0], [-1.0, 53.0, -52.0, 45.0, -70.0], [3.0, 26.0, 19.0, 24.0, 2.0], [-6.0, 74.0, -21.0, -32.0, 
-55.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -31.0, -11.0, 13.0, 13.0], [7.0, -22.0, -24.0, 14.0, -16.0], [-3.0, -35.0, -7.0, 
-10.0, -6.0], [7.0, 6.0, -6.0, -15.0, 13.0]], [[28.0, -33.0, -3.0, 25.0, 24.0], [24.0, -14.0, -33.0, 23.0, -21.0], [-10.0, 
--36.0, -8.0, -5.0, 9.0], [35.0, 11.0, -9.0, -27.0, 17.0]], [[7.0, 44.0, 29.0, -7.0, -32.0], [-23.0, 33.0, 16.0, -6.0, 24.0], 
-[17.0, 45.0, 3.0, -35.0, 24.0], [7.0, -14.0, -6.0, -5.0, -32.0]], [[23.0, 6.0, 16.0, 12.0, -3.0], [3.0, 12.0, -11.0, 11.0, 
-1.0], [3.0, 5.0, -3.0, -25.0, 21.0], [28.0, -1.0, -9.0, -20.0, -8.0]], [[0.0, 46.0, 17.0, -15.0, -1.0], [14.0, 41.0, 39.0, 
--21.0, 19.0], [-10.0, 56.0, 14.0, -18.0, 15.0], [7.0, -1.0, 15.0, 27.0, -8.0]]], [[[49.0, 39.0, 52.0, 20.0, -36.0], [-21.0, 
-41.0, -17.0, 21.0, 19.0], [25.0, 35.0, -7.0, -74.0, 57.0], [56.0, -15.0, -27.0, -50.0, -43.0]], [[-61.0, 1.0, -38.0, -38.0, 
-14.0], [5.0, -15.0, 47.0, -39.0, 3.0], [-17.0, 9.0, 15.0, 62.0, -51.0], [-70.0, 5.0, 33.0, 68.0, 23.0]], [[63.0, -7.0, 31.0, 
-39.0, 7.0], [19.0, 16.0, -42.0, 36.0, -10.0], [1.0, -11.0, -11.0, -54.0, 48.0], [77.0, 4.0, -24.0, -57.0, -7.0]], [[-39.0, 
--13.0, -27.0, -19.0, 1.0], [-11.0, -24.0, 14.0, -16.0, -2.0], [-1.0, -13.0, 3.0, 42.0, -36.0], [-49.0, 0.0, 12.0, 29.0, 11.0]], 
-[[54.0, -29.0, 10.0, 38.0, 35.0], [44.0, 1.0, -40.0, 32.0, -24.0], [-18.0, -30.0, -8.0, -27.0, 30.0], [70.0, 16.0, -12.0, 
--40.0, 19.0]]], [[[-18.0, 46.0, 6.0, -26.0, 2.0], [14.0, 36.0, 52.0, -32.0, 20.0], [-14.0, 58.0, 18.0, 0.0, 0.0], [-14.0, 0.0, 
-24.0, 46.0, -2.0]], [[68.0, 28.0, 59.0, 35.0, -37.0], [-22.0, 37.0, -39.0, 37.0, 13.0], [30.0, 20.0, -14.0, -88.0, 69.0], 
-[77.0, -15.0, -39.0, -75.0, -46.0]], [[22.0, 62.0, 44.0, -4.0, -32.0], [-14.0, 54.0, 22.0, -6.0, 30.0], [14.0, 66.0, 6.0, 
--56.0, 42.0], [28.0, -14.0, -6.0, -8.0, -38.0]], [[-13.0, 21.0, 2.0, -14.0, -6.0], [-3.0, 13.0, 23.0, -15.0, 11.0], [-1.0, 
-25.0, 7.0, 2.0, -3.0], [-14.0, -3.0, 9.0, 20.0, -5.0]], [[-11.0, 31.0, -4.0, -20.0, 32.0], [47.0, 33.0, 51.0, -31.0, 7.0], 
-[-35.0, 47.0, 21.0, 10.0, -3.0], [0.0, 13.0, 33.0, 54.0, 21.0]]], [[[14.0, 15.0, 4.0, 0.0, 33.0], [48.0, 27.0, 22.0, -10.0, 
--2.0], [-30.0, 26.0, 12.0, -7.0, 12.0], [28.0, 14.0, 18.0, 22.0, 19.0]], [[0.0, -1.0, 7.0, 3.0, -26.0], [-32.0, -8.0, -15.0, 
-9.0, 5.0], [22.0, -8.0, -8.0, -9.0, 3.0], [-7.0, -11.0, -15.0, -21.0, -19.0]], [[62.0, 18.0, 50.0, 34.0, -30.0], [-18.0, 28.0, 
--40.0, 36.0, 8.0], [26.0, 10.0, -14.0, -76.0, 60.0], [70.0, -12.0, -36.0, -70.0, -38.0]], [[16.0, 82.0, 51.0, -13.0, -43.0], 
-[-22.0, 67.0, 37.0, -15.0, 41.0], [18.0, 88.0, 10.0, -62.0, 45.0], [21.0, -19.0, -3.0, 1.0, -48.0]], [[-68.0, -13.0, -51.0, 
--39.0, 28.0], [16.0, -26.0, 47.0, -41.0, -5.0], [-26.0, -4.0, 16.0, 79.0, -63.0], [-77.0, 11.0, 39.0, 77.0, 37.0]]]])
+      ref=msk_ref*numpy.array([[63.0, 5.0, -63.0, -2.0, -82.0], [-2.0, -7.0, -26.0, 14.0, -7.0], [-30.0, 7.0, -25.0, 1.0, 
+80.0], [-33.0, -52.0, -68.0, 18.0, -12.0]])+(1.-msk_ref)*numpy.array([[-18.0, -19.0, 56.0, -22.0, 40.0], [7.0, 37.0, 36.0, 
+25.0, 42.0], [47.0, -8.0, -21.0, 89.0, -24.0], [-39.0, 28.0, 14.0, -13.0, 14.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank4_offset2(self):
-      arg0=numpy.array([[[[4.0, 6.0, 0.0], [5.0, -7.0, 3.0]], [[0.0, 1.0, 6.0], [-3.0, 0.0, 4.0]], [[-6.0, -3.0, 5.0], [-4.0, 
--6.0, -4.0]], [[-7.0, -6.0, -7.0], [-2.0, 5.0, -5.0]], [[-3.0, 4.0, 1.0], [6.0, -2.0, 7.0]]], [[[-1.0, -6.0, 5.0], [-2.0, 3.0, 
-0.0]], [[-6.0, 0.0, 3.0], [-5.0, -4.0, -3.0]], [[0.0, -2.0, 2.0], [-4.0, 1.0, -1.0]], [[3.0, 5.0, -1.0], [2.0, 1.0, -2.0]], 
-[[-5.0, -3.0, 7.0], [6.0, 3.0, 0.0]]], [[[6.0, 3.0, 1.0], [7.0, -3.0, -7.0]], [[6.0, -7.0, 1.0], [0.0, -5.0, -4.0]], [[0.0, 
--1.0, 6.0], [5.0, 1.0, 2.0]], [[2.0, 5.0, 0.0], [-7.0, -3.0, -1.0]], [[3.0, 3.0, 1.0], [2.0, 0.0, -1.0]]], [[[3.0, -5.0, 5.0], 
-[7.0, -5.0, 7.0]], [[1.0, 3.0, 1.0], [0.0, 5.0, 0.0]], [[5.0, -4.0, 1.0], [5.0, 0.0, 1.0]], [[1.0, 7.0, -4.0], [4.0, 3.0, 
--3.0]], [[-6.0, 0.0, -1.0], [-7.0, 2.0, -1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, -5.0, 2.0], [-1.0, 0.0, -5.0]], [[-6.0, -1.0, 6.0], [-5.0, 0.0, 4.0]], [[7.0, 5.0, 
-6.0], [0.0, 3.0, -5.0]], [[-1.0, -1.0, 2.0], [0.0, 0.0, -3.0]], [[2.0, -6.0, -4.0], [-6.0, 1.0, 2.0]]], [[[1.0, -3.0, -1.0], 
-[4.0, -3.0, 2.0]], [[3.0, -5.0, 1.0], [2.0, 1.0, 7.0]], [[-2.0, 0.0, -2.0], [0.0, 5.0, 6.0]], [[1.0, 0.0, -7.0], [0.0, -6.0, 
-3.0]], [[-6.0, -5.0, -1.0], [-4.0, 3.0, 2.0]]], [[[7.0, 7.0, 1.0], [0.0, 1.0, 6.0]], [[-3.0, -2.0, 0.0], [6.0, 4.0, -4.0]], 
-[[5.0, -7.0, -1.0], [7.0, 0.0, 1.0]], [[-3.0, 5.0, -4.0], [-7.0, -7.0, 1.0]], [[-6.0, 7.0, 0.0], [-7.0, 6.0, -1.0]]], [[[7.0, 
--1.0, 1.0], [2.0, 7.0, 5.0]], [[2.0, 1.0, -7.0], [-3.0, 4.0, -2.0]], [[3.0, 6.0, 0.0], [0.0, 0.0, -3.0]], [[7.0, -3.0, 6.0], 
-[0.0, -1.0, -1.0]], [[3.0, 1.0, 7.0], [5.0, -4.0, -6.0]]]])+(1.-msk_arg1)*numpy.array([[[[2.0, 0.0, 7.0], [-5.0, 2.0, 4.0]], 
-[[-1.0, -4.0, 4.0], [7.0, 3.0, 0.0]], [[-5.0, -2.0, -3.0], [-5.0, -1.0, -1.0]], [[6.0, -5.0, -7.0], [4.0, 3.0, -2.0]], [[3.0, 
--6.0, -5.0], [0.0, -3.0, 3.0]]], [[[-3.0, 2.0, 7.0], [-5.0, 4.0, 0.0]], [[-1.0, -4.0, -2.0], [4.0, -3.0, -6.0]], [[-1.0, 0.0, 
-6.0], [-7.0, 3.0, 5.0]], [[-3.0, 0.0, -6.0], [6.0, -2.0, 4.0]], [[0.0, -7.0, 0.0], [5.0, 2.0, -2.0]]], [[[-2.0, 2.0, 3.0], 
-[7.0, -2.0, 2.0]], [[-4.0, 1.0, 5.0], [4.0, -2.0, 7.0]], [[-4.0, 0.0, 6.0], [-6.0, 3.0, 0.0]], [[-1.0, 0.0, 7.0], [2.0, -4.0, 
--6.0]], [[0.0, -4.0, 4.0], [4.0, 4.0, -6.0]]], [[[3.0, -1.0, 3.0], [7.0, 3.0, -2.0]], [[5.0, -6.0, 2.0], [5.0, 7.0, -3.0]], 
-[[-7.0, -6.0, -1.0], [3.0, -1.0, -6.0]], [[-4.0, 0.0, 7.0], [-4.0, 0.0, 5.0]], [[2.0, -4.0, -1.0], [6.0, -7.0, 3.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTransposedTensorProduct_expandedData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg0.setTaggedValue(1,1.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[[0.0, -5.0], [-1.0, -5.0]], [[7.0, -5.0], [3.0, -1.0]], [[1.0, 0.0], [4.0, 3.0]], [[-2.0, -6.0], 
+[3.0, 0.0]], [[1.0, -2.0], [-1.0, 0.0]], [[5.0, 0.0], [-6.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 6.0], [-6.0, 0.0]], [[4.0, -6.0], [4.0, 2.0]], [[0.0, 0.0], [-2.0, -5.0]], 
+[[5.0, -5.0], [1.0, 4.0]], [[0.0, 6.0], [3.0, -7.0]], [[-3.0, 5.0], [-7.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-70.0, -43.0, 22.0, -19.0, -59.0], [33.0, 6.0, -25.0, 55.0, -89.0], [81.0, -34.0, 16.0, 35.0, 
--62.0], [-2.0, -35.0, 39.0, 14.0, 53.0]], [[-10.0, 66.0, 21.0, -1.0, -4.0], [-13.0, 23.0, 12.0, -30.0, 9.0], [37.0, -36.0, 
--30.0, 6.0, 24.0], [19.0, -40.0, -6.0, 29.0, 4.0]], [[79.0, 73.0, -25.0, 31.0, -4.0], [-8.0, -40.0, -52.0, -17.0, 36.0], 
-[-88.0, -8.0, -46.0, 49.0, 11.0], [-104.0, -54.0, -24.0, 7.0, 42.0]], [[78.0, -4.0, -81.0, 14.0, 57.0], [-15.0, -32.0, 23.0, 
--3.0, 92.0], [-123.0, 61.0, -5.0, -7.0, 49.0], [-44.0, 65.0, -42.0, -73.0, -76.0]], [[-44.0, 18.0, -36.0, -20.0, -58.0], [28.0, 
-31.0, 36.0, 23.0, -19.0], [48.0, 1.0, 5.0, 4.0, -15.0], [9.0, -49.0, -6.0, -32.0, -2.0]]], [[[47.0, 52.0, 2.0, 17.0, 29.0], 
-[-5.0, 31.0, 7.0, -54.0, 48.0], [-41.0, 15.0, 18.0, -54.0, -4.0], [21.0, -25.0, -39.0, 38.0, 4.0]], [[56.0, 67.0, -21.0, 21.0, 
--4.0], [-23.0, -50.0, -32.0, -12.0, 35.0], [-61.0, -16.0, -71.0, 66.0, 50.0], [-92.0, -28.0, -9.0, -17.0, 12.0]], [[23.0, 30.0, 
-10.0, 9.0, 27.0], [-17.0, -2.0, -5.0, -23.0, 25.0], [-17.0, -12.0, -17.0, 2.0, 21.0], [-2.0, 2.0, -9.0, 18.0, -6.0]], [[-34.0, 
--47.0, 53.0, -4.0, -35.0], [-10.0, -26.0, -11.0, -2.0, -51.0], [44.0, 5.0, -7.0, -3.0, 11.0], [16.0, 20.0, 45.0, 1.0, 25.0]], 
-[[48.0, 45.0, 1.0, 22.0, -53.0], [12.0, 22.0, 11.0, -72.0, 23.0], [-46.0, 69.0, 31.0, -91.0, -15.0], [8.0, -68.0, -33.0, 13.0, 
-49.0]]], [[[-15.0, -96.0, 89.0, 14.0, -69.0], [19.0, -34.0, -71.0, -4.0, -103.0], [19.0, 34.0, 50.0, -42.0, -75.0], [-2.0, 
--11.0, 57.0, 49.0, 117.0]], [[27.0, -39.0, 18.0, 15.0, 37.0], [33.0, 21.0, -63.0, 17.0, -25.0], [-35.0, -8.0, 74.0, -26.0, 
--111.0], [-5.0, -14.0, -12.0, 78.0, 62.0]], [[2.0, 20.0, 24.0, 7.0, -43.0], [18.0, 36.0, 5.0, -42.0, -14.0], [12.0, 28.0, 38.0, 
--69.0, -38.0], [34.0, -58.0, -12.0, 36.0, 50.0]], [[-23.0, 14.0, 35.0, -4.0, 11.0], [-34.0, -43.0, -25.0, 17.0, -20.0], [40.0, 
--66.0, -75.0, 88.0, 55.0], [-31.0, 20.0, 39.0, 3.0, -6.0]], [[-25.0, -29.0, 47.0, -1.0, -30.0], [-1.0, -8.0, -14.0, -7.0, 
--44.0], [37.0, 1.0, 6.0, -13.0, -10.0], [18.0, -2.0, 30.0, 19.0, 35.0]]], [[[-22.0, 10.0, -24.0, -9.0, -17.0], [70.0, 97.0, 
-1.0, 19.0, -27.0], [28.0, -5.0, 101.0, -61.0, -139.0], [45.0, -89.0, -42.0, 64.0, 52.0]], [[-18.0, -3.0, 43.0, -2.0, -15.0], 
-[-24.0, -6.0, 21.0, -36.0, -7.0], [34.0, 11.0, -17.0, -27.0, 45.0], [40.0, 18.0, 21.0, -1.0, -7.0]], [[-13.0, -41.0, 16.0, 
--2.0, 2.0], [38.0, 53.0, -6.0, 1.0, -29.0], [14.0, 19.0, 88.0, -73.0, -94.0], [55.0, -18.0, -12.0, 52.0, 37.0]], [[-37.0, 
--69.0, 42.0, -7.0, -51.0], [-15.0, -46.0, 3.0, 2.0, -50.0], [37.0, 31.0, -15.0, -4.0, 36.0], [10.0, 43.0, 54.0, -38.0, 8.0]], 
-[[40.0, 61.0, -37.0, 7.0, 34.0], [-41.0, -38.0, 18.0, -14.0, 69.0], [-47.0, -12.0, -79.0, 56.0, 98.0], [-48.0, 26.0, -15.0, 
--49.0, -62.0]]]])+(1.-msk_ref)*numpy.array([[[[-19.0, -14.0, -53.0, -13.0, 6.0], [-53.0, -5.0, -45.0, 44.0, -37.0], [59.0, 
-45.0, -67.0, 16.0, -50.0], [14.0, -49.0, -60.0, -21.0, 72.0]], [[73.0, -1.0, -9.0, -67.0, -24.0], [59.0, -52.0, 77.0, -38.0, 
--30.0], [7.0, 47.0, 54.0, 12.0, -16.0], [-12.0, -21.0, -45.0, 74.0, -16.0]], [[15.0, -8.0, 51.0, -82.0, -19.0], [43.0, 34.0, 
-26.0, -40.0, -3.0], [-3.0, 14.0, 60.0, 81.0, 16.0], [-38.0, -52.0, 73.0, 55.0, 1.0]], [[-63.0, 4.0, 78.0, 54.0, 20.0], [-10.0, 
-52.0, -31.0, 21.0, 52.0], [-53.0, -66.0, 13.0, -36.0, 38.0], [-25.0, 27.0, 111.0, -38.0, -45.0]], [[-5.0, 27.0, -31.0, -41.0, 
--11.0], [-14.0, -27.0, -4.0, 71.0, -16.0], [77.0, 98.0, -24.0, -12.0, -38.0], [12.0, -42.0, -26.0, 30.0, 48.0]]], [[[49.0, 
-40.0, 9.0, -10.0, -1.0], [48.0, -2.0, 54.0, -45.0, 38.0], [-15.0, 9.0, 55.0, 20.0, 48.0], [13.0, 52.0, 29.0, 47.0, -16.0]], 
-[[14.0, -29.0, 53.0, -83.0, -30.0], [48.0, 10.0, 32.0, -34.0, -27.0], [-12.0, 6.0, 60.0, 51.0, -6.0], [-50.0, -68.0, 46.0, 
-50.0, -26.0]], [[32.0, -9.0, 18.0, -15.0, -4.0], [34.0, -9.0, 38.0, -42.0, -2.0], [-30.0, -17.0, 39.0, 8.0, 10.0], [-15.0, 6.0, 
-3.0, 25.0, -28.0]], [[-17.0, -10.0, -31.0, 15.0, -25.0], [-12.0, -4.0, -30.0, -1.0, -19.0], [9.0, -20.0, -27.0, 2.0, 0.0], 
-[22.0, 6.0, -33.0, -37.0, -14.0]], [[15.0, 96.0, -23.0, -31.0, -41.0], [40.0, 18.0, 14.0, 3.0, 57.0], [61.0, 70.0, 35.0, 54.0, 
-76.0], [60.0, 58.0, 61.0, 45.0, 10.0]]], [[[-50.0, 26.0, -64.0, 47.0, -17.0], [-52.0, 59.0, -93.0, -4.0, 22.0], [38.0, -31.0, 
--69.0, 69.0, 50.0], [72.0, 49.0, 5.0, -80.0, 41.0]], [[-7.0, 11.0, -10.0, 57.0, 58.0], [-45.0, 59.0, -35.0, -30.0, 47.0], 
-[-21.0, -44.0, -33.0, 45.0, 36.0], [21.0, 51.0, 28.0, -37.0, 62.0]], [[27.0, 66.0, -44.0, -18.0, -21.0], [19.0, -3.0, 14.0, 
-0.0, 30.0], [53.0, 61.0, 9.0, 36.0, 40.0], [53.0, 44.0, 2.0, 32.0, 27.0]], [[29.0, -80.0, 19.0, -48.0, -18.0], [27.0, -35.0, 
-33.0, -46.0, -74.0], [-39.0, -32.0, 25.0, 2.0, -54.0], [-55.0, -73.0, -56.0, 15.0, -40.0]], [[-1.0, 3.0, -33.0, 6.0, -17.0], 
-[-6.0, -3.0, -16.0, -7.0, -9.0], [15.0, -3.0, -18.0, 14.0, 6.0], [25.0, 12.0, -28.0, -18.0, 2.0]]], [[[24.0, 71.0, -57.0, 7.0, 
-50.0], [-39.0, 8.0, -2.0, 41.0, 46.0], [72.0, 95.0, -39.0, 24.0, 6.0], [49.0, 34.0, -12.0, 30.0, 119.0]], [[19.0, 6.0, -19.0, 
--1.0, -35.0], [30.0, -30.0, 20.0, -19.0, -11.0], [-3.0, -6.0, 17.0, -14.0, 12.0], [18.0, 24.0, -31.0, 3.0, -46.0]], [[-4.0, 
-50.0, -46.0, 61.0, 37.0], [-41.0, 23.0, -29.0, 13.0, 51.0], [22.0, 8.0, -44.0, 6.0, 34.0], [55.0, 73.0, -3.0, -28.0, 58.0]], 
-[[-52.0, -8.0, -27.0, 30.0, -37.0], [-25.0, 4.0, -59.0, 27.0, -17.0], [16.0, -28.0, -43.0, -15.0, 2.0], [27.0, 5.0, -18.0, 
--63.0, -28.0]], [[16.0, -41.0, 67.0, -49.0, -22.0], [54.0, -20.0, 50.0, -26.0, -29.0], [-46.0, -20.0, 66.0, -17.0, -18.0], 
-[-62.0, -50.0, 26.0, 40.0, -70.0]]]])
+      ref=msk_ref*numpy.array([[[0.0, -15.0], [-3.0, -15.0]], [[21.0, -15.0], [9.0, -3.0]], [[3.0, 0.0], [12.0, 9.0]], [[-6.0, 
+-18.0], [9.0, 0.0]], [[3.0, -6.0], [-3.0, 0.0]], [[15.0, 0.0], [-18.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 6.0], [-6.0, 
+0.0]], [[4.0, -6.0], [4.0, 2.0]], [[0.0, 0.0], [-2.0, -5.0]], [[5.0, -5.0], [1.0, 4.0]], [[0.0, 6.0], [3.0, -7.0]], [[-3.0, 
+5.0], [-7.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_float_rank0_offset0(self):
-      arg0=numpy.array([[[7.0, 0.0], [3.0, -3.0]], [[-1.0, -2.0], [7.0, 7.0]], [[4.0, 6.0], [-5.0, -1.0]], [[-2.0, 0.0], [7.0, 
--5.0]], [[0.0, 0.0], [-4.0, 7.0]], [[0.0, 2.0], [-2.0, 6.0]]])
-      arg1=1.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[7.0, 0.0], [3.0, -3.0]], [[-1.0, -2.0], [7.0, 7.0]], [[4.0, 6.0], [-5.0, -1.0]], [[-2.0, 0.0], [7.0, 
--5.0]], [[0.0, 0.0], [-4.0, 7.0]], [[0.0, 2.0], [-2.0, 6.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([3.0, -7.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([7.0, -1.0, 3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-7.0, -7.0], [5.0, -2.0]], [[6.0, 0.0], [1.0, 1.0]], [[4.0, -2.0], [7.0, -7.0]], [[-7.0, 5.0], 
+[-2.0, 3.0]], [[-4.0, -3.0], [7.0, 7.0]], [[5.0, 2.0], [1.0, -6.0]]], [[[6.0, 2.0], [0.0, 4.0]], [[-2.0, -1.0], [5.0, -7.0]], 
+[[7.0, 3.0], [-3.0, -4.0]], [[5.0, -4.0], [1.0, -6.0]], [[4.0, -3.0], [-2.0, -1.0]], [[-2.0, 0.0], [-4.0, 5.0]]], [[[-5.0, 
+1.0], [3.0, -3.0]], [[4.0, 4.0], [0.0, -1.0]], [[-3.0, -4.0], [6.0, -2.0]], [[-3.0, -3.0], [3.0, -2.0]], [[-6.0, -2.0], [-5.0, 
+7.0]], [[3.0, -4.0], [-2.0, -7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -6.0], [-6.0, 0.0]], [[-5.0, 3.0], [4.0, -1.0]], [[0.0, -5.0], [0.0, 6.0]], 
+[[-4.0, -7.0], [-4.0, 7.0]], [[7.0, -1.0], [-6.0, 0.0]], [[5.0, 2.0], [7.0, 4.0]]], [[[2.0, -5.0], [1.0, 0.0]], [[3.0, -1.0], 
+[0.0, -7.0]], [[-1.0, -4.0], [1.0, 4.0]], [[1.0, 1.0], [-2.0, 7.0]], [[-3.0, -7.0], [0.0, -2.0]], [[-1.0, 4.0], [-4.0, -2.0]]], 
+[[[5.0, -1.0], [-1.0, 6.0]], [[7.0, -2.0], [3.0, -2.0]], [[1.0, -6.0], [4.0, -2.0]], [[5.0, 5.0], [4.0, 3.0]], [[5.0, -3.0], 
+[4.0, 6.0]], [[-1.0, -1.0], [-1.0, 5.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-48.0, -38.0], [6.0, -25.0]], [[20.0, -5.0], [-32.0, 55.0]], [[-28.0, -15.0], [24.0, 13.0]], 
+[[-47.0, 52.0], [-22.0, 57.0]], [[-22.0, 18.0], [50.0, 7.0]], [[20.0, 18.0], [37.0, -32.0]]])+(1.-msk_ref)*numpy.array([[[34.0, 
+-40.0], [-46.0, 18.0]], [[-17.0, 16.0], [37.0, -6.0]], [[4.0, -49.0], [11.0, 32.0]], [[-14.0, -35.0], [-14.0, 51.0]], [[67.0, 
+-9.0], [-30.0, 20.0]], [[33.0, 7.0], [50.0, 45.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank0_offset0(self):
-      arg0=numpy.array([[[-3.0, 3.0], [0.0, 1.0]], [[1.0, 1.0], [-5.0, -5.0]], [[2.0, -7.0], [6.0, 5.0]], [[5.0, 3.0], [-6.0, 
--2.0]], [[6.0, -2.0], [6.0, 5.0]], [[0.0, 3.0], [4.0, 0.0]]])
-      arg1=numpy.array(4.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[-12.0, 12.0], [0.0, 4.0]], [[4.0, 4.0], [-20.0, -20.0]], [[8.0, -28.0], [24.0, 20.0]], [[20.0, 12.0], 
-[-24.0, -8.0]], [[24.0, -8.0], [24.0, 20.0]], [[0.0, 12.0], [16.0, 0.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,-2.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[[[4.0, 3.0, 0.0, 1.0], [-4.0, 6.0, 4.0, -4.0], [-6.0, 5.0, 7.0, -6.0]], [[4.0, 3.0, 7.0, 0.0], 
+[1.0, -4.0, -3.0, 3.0], [-6.0, -3.0, 6.0, 5.0]]], [[[-5.0, -3.0, -5.0, -4.0], [5.0, -6.0, -1.0, -2.0], [0.0, 4.0, -1.0, 0.0]], 
+[[-6.0, 5.0, 6.0, 2.0], [-2.0, -5.0, -2.0, 5.0], [0.0, 4.0, -5.0, -4.0]]], [[[-7.0, 3.0, 2.0, -4.0], [3.0, 4.0, 6.0, -4.0], 
+[-5.0, 4.0, 5.0, -4.0]], [[4.0, -7.0, 6.0, -1.0], [-7.0, -3.0, -5.0, 0.0], [0.0, -3.0, -5.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 0.0, -4.0, 0.0], [7.0, 1.0, 7.0, 7.0], [4.0, 1.0, 1.0, 4.0]], [[-6.0, 5.0, 
+-5.0, 1.0], [7.0, -6.0, 1.0, 0.0], [-2.0, 5.0, 7.0, -6.0]]], [[[4.0, 1.0, -7.0, 7.0], [-4.0, 5.0, 2.0, -2.0], [1.0, -3.0, 7.0, 
+1.0]], [[2.0, 5.0, 0.0, 6.0], [0.0, 2.0, 5.0, -4.0], [0.0, -1.0, 0.0, 6.0]]], [[[-3.0, -1.0, 1.0, -2.0], [-1.0, 3.0, -2.0, 
+3.0], [-4.0, -1.0, 1.0, 2.0]], [[1.0, -2.0, 0.0, -2.0], [1.0, -7.0, -1.0, -1.0], [-1.0, -5.0, 2.0, -2.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-12.0, -9.0, -0.0, -3.0], [12.0, -18.0, -12.0, 12.0], [18.0, -15.0, -21.0, 18.0]], [[-12.0, 
+-9.0, -21.0, -0.0], [-3.0, 12.0, 9.0, -9.0], [18.0, 9.0, -18.0, -15.0]]], [[[15.0, 9.0, 15.0, 12.0], [-15.0, 18.0, 3.0, 6.0], 
+[-0.0, -12.0, 3.0, -0.0]], [[18.0, -15.0, -18.0, -6.0], [6.0, 15.0, 6.0, -15.0], [-0.0, -12.0, 15.0, 12.0]]], [[[21.0, -9.0, 
+-6.0, 12.0], [-9.0, -12.0, -18.0, 12.0], [15.0, -12.0, -15.0, 12.0]], [[-12.0, 21.0, -18.0, 3.0], [21.0, 9.0, 15.0, -0.0], 
+[-0.0, 9.0, 15.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, -0.0, 8.0, -0.0], [-14.0, -2.0, -14.0, -14.0], [-8.0, -2.0, 
+-2.0, -8.0]], [[12.0, -10.0, 10.0, -2.0], [-14.0, 12.0, -2.0, -0.0], [4.0, -10.0, -14.0, 12.0]]], [[[-8.0, -2.0, 14.0, -14.0], 
+[8.0, -10.0, -4.0, 4.0], [-2.0, 6.0, -14.0, -2.0]], [[-4.0, -10.0, -0.0, -12.0], [-0.0, -4.0, -10.0, 8.0], [-0.0, 2.0, -0.0, 
+-12.0]]], [[[6.0, 2.0, -2.0, 4.0], [2.0, -6.0, 4.0, -6.0], [8.0, 2.0, -2.0, -4.0]], [[-2.0, 4.0, -0.0, 4.0], [-2.0, 14.0, 2.0, 
+2.0], [2.0, 10.0, -4.0, 4.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank1_offset1(self):
-      arg0=numpy.array([[[[-2.0, 3.0, -3.0], [4.0, 5.0, 5.0]], [[2.0, 3.0, 6.0], [-3.0, -1.0, -3.0]]], [[[6.0, -7.0, -3.0], 
-[4.0, -1.0, -6.0]], [[-1.0, 4.0, 0.0], [0.0, -2.0, 2.0]]], [[[6.0, -4.0, -3.0], [0.0, -2.0, 5.0]], [[5.0, -1.0, 6.0], [0.0, 
-6.0, 6.0]]], [[[2.0, -2.0, -6.0], [-6.0, 6.0, -2.0]], [[2.0, 6.0, 6.0], [-3.0, -7.0, -3.0]]], [[[2.0, -4.0, -6.0], [-5.0, 3.0, 
--7.0]], [[6.0, 3.0, 1.0], [0.0, 0.0, 3.0]]], [[[-5.0, -3.0, -7.0], [2.0, 0.0, -3.0]], [[3.0, 3.0, -3.0], [-3.0, -5.0, 3.0]]]])
-      arg1=numpy.array([-1.0, 6.0, 6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[2.0, 56.0], [52.0, -21.0]], [[-66.0, -46.0], [25.0, 0.0]], [[-48.0, 18.0], [25.0, 72.0]], [[-50.0, 
-30.0], [70.0, -57.0]], [[-62.0, -19.0], [18.0, 18.0]], [[-55.0, -20.0], [-3.0, -9.0]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([-4.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -2.0]))
+      arg0.expand()
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([8.0, 12.0])+(1.-msk_ref)*numpy.array([7.0, -14.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_array_rank1_offset0(self):
-      arg0=numpy.array([[[-1.0, -1.0], [-6.0, 7.0]], [[2.0, 2.0], [1.0, 0.0]], [[-3.0, 2.0], [3.0, -5.0]], [[-7.0, -2.0], 
-[-5.0, 5.0]], [[-7.0, 0.0], [3.0, -6.0]], [[-4.0, 1.0], [-5.0, -3.0]]])
-      arg1=numpy.array([2.0, 7.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[-2.0, -7.0], [-2.0, -7.0]], [[-12.0, -42.0], [14.0, 49.0]]], [[[4.0, 14.0], [4.0, 14.0]], [[2.0, 
-7.0], [0.0, 0.0]]], [[[-6.0, -21.0], [4.0, 14.0]], [[6.0, 21.0], [-10.0, -35.0]]], [[[-14.0, -49.0], [-4.0, -14.0]], [[-10.0, 
--35.0], [10.0, 35.0]]], [[[-14.0, -49.0], [0.0, 0.0]], [[6.0, 21.0], [-12.0, -42.0]]], [[[-8.0, -28.0], [2.0, 7.0]], [[-10.0, 
--35.0], [-6.0, -21.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[0.0, 2.0], [-4.0, -5.0], [0.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -1.0], [-1.0, 7.0], [-6.0, -2.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([5.0, 2.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, 0.0, 0.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-8.0, 12.0])+(1.-msk_ref)*numpy.array([-21.0, 3.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank2_offset1(self):
-      arg0=numpy.array([[[[4.0, -6.0, -1.0], [4.0, 6.0, 0.0]], [[-4.0, -3.0, 3.0], [0.0, -2.0, -2.0]]], [[[-2.0, -7.0, 4.0], 
-[-1.0, 3.0, -5.0]], [[7.0, -7.0, -6.0], [0.0, 2.0, -3.0]]], [[[-2.0, -7.0, 0.0], [-1.0, 0.0, 1.0]], [[4.0, -1.0, 2.0], [7.0, 
--5.0, 4.0]]], [[[-2.0, -6.0, -1.0], [6.0, 2.0, 5.0]], [[-6.0, -4.0, -3.0], [2.0, -5.0, 0.0]]], [[[-6.0, -2.0, -3.0], [0.0, 
--1.0, 2.0]], [[5.0, 7.0, -1.0], [-7.0, 4.0, 0.0]]], [[[7.0, -1.0, 7.0], [3.0, -3.0, -2.0]], [[-5.0, 3.0, 6.0], [-5.0, -7.0, 
-1.0]]]])
-      arg1=numpy.array([[-5.0, -6.0, -7.0], [-4.0, -1.0, 0.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=numpy.array([[[[23.0, -10.0], [-56.0, -22.0]], [[17.0, 19.0], [26.0, 2.0]]], [[[24.0, 15.0], [22.0, 1.0]], [[49.0, 
--21.0], [9.0, -2.0]]], [[[52.0, 15.0], [-2.0, 4.0]], [[-28.0, -15.0], [-33.0, -23.0]]], [[[53.0, 14.0], [-77.0, -26.0]], 
-[[75.0, 28.0], [20.0, -3.0]]], [[[63.0, 26.0], [-8.0, 1.0]], [[-60.0, -27.0], [11.0, 24.0]]], [[[-78.0, -27.0], [17.0, -9.0]], 
-[[-35.0, 17.0], [60.0, 27.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 2.0], [-2.0, -6.0], [-5.0, 0.0]], [[3.0, -7.0], [5.0, -7.0], [-1.0, 
+-4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -2.0], [0.0, 6.0], [-5.0, 0.0]], [[0.0, 0.0], [6.0, 2.0], [2.0, 5.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[7.0, 7.0, -4.0], [7.0, 4.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, -6.0, 0.0], [-6.0, 6.0, 4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([51.0, -89.0])+(1.-msk_ref)*numpy.array([29.0, -14.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank0_offset0(self):
-      arg0=numpy.array([[[-4.0, -7.0], [-1.0, -4.0]], [[0.0, -7.0], [0.0, 1.0]], [[-7.0, -2.0], [2.0, 3.0]], [[-3.0, -2.0], 
-[4.0, 1.0]], [[-3.0, 1.0], [-2.0, -4.0]], [[1.0, -4.0], [-4.0, 4.0]]])
-      arg1=Data(-5.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[20.0, 35.0], [5.0, 20.0]], [[-0.0, 35.0], [-0.0, -5.0]], [[35.0, 10.0], [-10.0, -15.0]], [[15.0, 
-10.0], [-20.0, -5.0]], [[15.0, -5.0], [10.0, 20.0]], [[-5.0, 20.0], [20.0, -20.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, -4.0], [-2.0, 4.0], [7.0, 5.0]], [[3.0, 7.0], [0.0, 0.0], [6.0, -2.0]], [[0.0, 1.0], [3.0, 
+4.0], [-5.0, 5.0]], [[-6.0, 2.0], [-4.0, -2.0], [3.0, 4.0]]], [[[5.0, 0.0], [4.0, -4.0], [-6.0, -3.0]], [[-1.0, 2.0], [-6.0, 
+1.0], [-5.0, -1.0]], [[3.0, -2.0], [-6.0, 4.0], [2.0, 7.0]], [[3.0, -7.0], [-3.0, 0.0], [-5.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, 0.0], [2.0, 3.0], [0.0, -5.0]], [[6.0, -1.0], [0.0, -5.0], [0.0, 6.0]], 
+[[-6.0, 7.0], [0.0, 6.0], [-1.0, 5.0]], [[0.0, -4.0], [-4.0, -1.0], [-4.0, 1.0]]], [[[-6.0, 7.0], [-7.0, -1.0], [-6.0, -5.0]], 
+[[4.0, 5.0], [4.0, 7.0], [2.0, 2.0]], [[1.0, 5.0], [-4.0, 6.0], [6.0, 7.0]], [[-7.0, 5.0], [-4.0, 7.0], [-4.0, 6.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[1.0, 1.0, -7.0], [0.0, 0.0, 6.0], [7.0, 4.0, 3.0], [-2.0, -7.0, 6.0]], [[3.0, -2.0, 0.0], [4.0, 
+-3.0, 0.0], [-7.0, -5.0, 3.0], [-7.0, 4.0, -6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, 3.0, 4.0], [7.0, 0.0, -1.0], [0.0, 7.0, 6.0], [-3.0, 4.0, 0.0]], [[7.0, -3.0, 
+-1.0], [-3.0, -1.0, 1.0], [6.0, -4.0, 0.0], [4.0, 0.0, -4.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([77.0, 60.0])+(1.-msk_ref)*numpy.array([-23.0, 95.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank1_offset1(self):
-      arg0=numpy.array([[[[-3.0, -3.0, 5.0], [6.0, -1.0, 3.0]], [[-6.0, -5.0, -3.0], [3.0, -7.0, -7.0]]], [[[-5.0, 1.0, -5.0], 
-[-7.0, -1.0, -7.0]], [[-6.0, -1.0, 0.0], [1.0, -7.0, 3.0]]], [[[7.0, -3.0, 1.0], [-6.0, -4.0, 0.0]], [[0.0, -6.0, 1.0], [-2.0, 
--1.0, 4.0]]], [[[5.0, -6.0, 2.0], [-2.0, 5.0, 1.0]], [[-1.0, 6.0, -5.0], [-5.0, -3.0, -3.0]]], [[[5.0, -7.0, 6.0], [-3.0, -3.0, 
-7.0]], [[3.0, 2.0, 2.0], [-4.0, 7.0, -2.0]]], [[[-5.0, 0.0, -4.0], [0.0, 7.0, -5.0]], [[2.0, -7.0, -2.0], [3.0, 1.0, -4.0]]]])
-      arg1=Data(numpy.array([-1.0, -7.0, 6.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[54.0, 19.0], [23.0, 4.0]], [[-32.0, -28.0], [13.0, 66.0]], [[20.0, 34.0], [48.0, 33.0]], [[49.0, 
--27.0], [-71.0, 8.0]], [[80.0, 66.0], [-5.0, -57.0]], [[-19.0, -79.0], [35.0, -34.0]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([-3.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, 2.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([-3.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, -2.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[9.0, -18.0], [-18.0, 36.0]])+(1.-msk_ref)*numpy.array([[7.0, -2.0], [14.0, -4.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_constData_rank1_offset0(self):
-      arg0=numpy.array([[[-5.0, -5.0], [3.0, 2.0]], [[2.0, -7.0], [-2.0, 4.0]], [[2.0, -2.0], [-2.0, -5.0]], [[-6.0, 7.0], 
-[-5.0, -7.0]], [[-5.0, 2.0], [3.0, 4.0]], [[-4.0, 5.0], [0.0, 0.0]]])
-      arg1=Data(numpy.array([0.0, 0.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
-0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 
-0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-6.0, 0.0], [-1.0, 0.0], [3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, 0.0], [-6.0, 5.0], [7.0, 7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-4.0, 7.0], [0.0, 0.0], [-4.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, 5.0], [0.0, -1.0], [6.0, 4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[12.0, -57.0], [0.0, 0.0]])+(1.-msk_ref)*numpy.array([[48.0, 24.0], [42.0, 23.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank2_offset1(self):
-      arg0=numpy.array([[[[-4.0, -6.0, 3.0], [4.0, 2.0, 6.0]], [[0.0, 5.0, -3.0], [7.0, -7.0, 0.0]]], [[[-3.0, 5.0, -7.0], 
-[7.0, 1.0, -5.0]], [[-3.0, -6.0, 1.0], [1.0, 0.0, -5.0]]], [[[-7.0, -1.0, 3.0], [2.0, 4.0, -3.0]], [[2.0, 3.0, -3.0], [5.0, 
-3.0, 3.0]]], [[[-6.0, 4.0, 4.0], [5.0, -4.0, -1.0]], [[2.0, -2.0, -1.0], [5.0, 0.0, -4.0]]], [[[-5.0, -4.0, 2.0], [-2.0, -6.0, 
--6.0]], [[-7.0, -7.0, 3.0], [1.0, -1.0, -4.0]]], [[[-1.0, 0.0, -4.0], [1.0, -5.0, 5.0]], [[6.0, -1.0, 3.0], [6.0, 4.0, -6.0]]]])
-      arg1=Data(numpy.array([[-3.0, 1.0, -2.0], [-6.0, -1.0, -5.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[0.0, 15.0], [-22.0, -56.0]], [[11.0, 10.0], [-28.0, -35.0]]], [[[28.0, 48.0], [-10.0, -18.0]], 
-[[1.0, 19.0], [7.0, 19.0]]], [[[14.0, 28.0], [4.0, -1.0]], [[3.0, 0.0], [-18.0, -48.0]]], [[[14.0, 12.0], [-17.0, -21.0]], 
-[[-6.0, -5.0], [-7.0, -10.0]]], [[[7.0, 24.0], [12.0, 48.0]], [[8.0, 34.0], [4.0, 15.0]]], [[[11.0, 26.0], [-18.0, -26.0]], 
-[[-25.0, -50.0], [-2.0, -10.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[5.0, -6.0], [5.0, -5.0], [0.0, 0.0]], [[3.0, 4.0], [-2.0, 3.0], [-3.0, 
+3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 0.0], [7.0, 0.0], [-7.0, 1.0]], [[7.0, 2.0], [7.0, 5.0], [-3.0, 5.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[6.0, -7.0], [-5.0, 4.0], [1.0, 0.0]], [[1.0, 7.0], [4.0, 0.0], [-4.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 1.0], [-1.0, -4.0], [2.0, 7.0]], [[-3.0, -7.0], [-3.0, 4.0], [2.0, -3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[12.0, 0.0], [-7.0, 56.0]])+(1.-msk_ref)*numpy.array([[-81.0, -95.0], [-9.0, -2.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[[2.0, -5.0], [5.0, 4.0]], [[-1.0, 3.0], [-4.0, 4.0]], [[2.0, -1.0], [-4.0, 1.0]], [[0.0, 7.0], [0.0, 
-1.0]], [[0.0, 7.0], [4.0, 4.0]], [[-2.0, -3.0], [-2.0, -1.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(7.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[3.0, 4.0], [1.0, 4.0], [7.0, 6.0]], [[6.0, 5.0], [2.0, 0.0], [-1.0, -2.0]], [[-6.0, -2.0], 
+[5.0, 6.0], [2.0, 3.0]], [[1.0, -7.0], [0.0, -6.0], [1.0, -1.0]]], [[[-5.0, -7.0], [4.0, 6.0], [2.0, -4.0]], [[-4.0, -6.0], 
+[1.0, -4.0], [4.0, -5.0]], [[6.0, -2.0], [-1.0, 2.0], [4.0, 0.0]], [[3.0, -1.0], [3.0, 0.0], [2.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, 4.0], [-6.0, 7.0], [4.0, 1.0]], [[5.0, 7.0], [2.0, -4.0], [1.0, 6.0]], 
+[[-6.0, -2.0], [6.0, 7.0], [6.0, 0.0]], [[5.0, -1.0], [1.0, 4.0], [7.0, 7.0]]], [[[-1.0, -6.0], [5.0, 1.0], [6.0, -5.0]], 
+[[0.0, -5.0], [7.0, 7.0], [4.0, 0.0]], [[3.0, 5.0], [-6.0, 5.0], [6.0, -1.0]], [[5.0, -7.0], [5.0, 6.0], [5.0, 5.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-5.0, -7.0], [-4.0, -7.0], [-3.0, -2.0]], [[4.0, -4.0], [6.0, 1.0], [-2.0, 1.0]], [[0.0, -3.0], 
+[6.0, 1.0], [-3.0, 2.0]], [[0.0, -4.0], [0.0, 0.0], [1.0, 0.0]]], [[[2.0, -1.0], [-7.0, -5.0], [5.0, 7.0]], [[-3.0, 4.0], 
+[-7.0, -3.0], [5.0, -3.0]], [[-4.0, -4.0], [-3.0, -7.0], [6.0, -3.0]], [[4.0, 2.0], [-7.0, 2.0], [1.0, 
+-1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 6.0], [-1.0, 0.0], [0.0, 4.0]], [[6.0, -6.0], [6.0, 5.0], [-4.0, -1.0]], 
+[[4.0, 3.0], [-4.0, -3.0], [6.0, -6.0]], [[-2.0, -3.0], [-6.0, 0.0], [-1.0, 4.0]]], [[[4.0, -2.0], [-2.0, -1.0], [4.0, 4.0]], 
+[[6.0, 7.0], [-6.0, 2.0], [-7.0, -4.0]], [[6.0, 7.0], [-4.0, -4.0], [6.0, -2.0]], [[4.0, -4.0], [4.0, 4.0], [-7.0, 0.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[2.0, -5.0], [5.0, 4.0]], [[-1.0, 3.0], [-4.0, 4.0]], [[2.0, -1.0], [-4.0, 1.0]], [[0.0, 7.0], 
-[0.0, 1.0]], [[0.0, 7.0], [4.0, 4.0]], [[-2.0, -3.0], [-2.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[14.0, -35.0], [35.0, 28.0]], 
-[[-7.0, 21.0], [-28.0, 28.0]], [[14.0, -7.0], [-28.0, 7.0]], [[0.0, 49.0], [0.0, 7.0]], [[0.0, 49.0], [28.0, 28.0]], [[-14.0, 
--21.0], [-14.0, -7.0]]])
+      ref=msk_ref*numpy.array([[16.0, -93.0], [-62.0, -99.0]])+(1.-msk_ref)*numpy.array([[48.0, -36.0], [-247.0, 3.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank1_offset1(self):
-      arg0=numpy.array([[[[-2.0, -2.0, -5.0], [-7.0, 5.0, 6.0]], [[2.0, -3.0, 0.0], [0.0, -7.0, 1.0]]], [[[2.0, 3.0, 3.0], 
-[-4.0, -7.0, -1.0]], [[6.0, 1.0, 1.0], [0.0, 0.0, -4.0]]], [[[2.0, -4.0, 0.0], [-6.0, 3.0, 7.0]], [[-2.0, 0.0, 4.0], [7.0, 1.0, 
--1.0]]], [[[-6.0, -2.0, -5.0], [2.0, -4.0, -4.0]], [[0.0, -3.0, 0.0], [-2.0, 7.0, 2.0]]], [[[-5.0, -1.0, -5.0], [-1.0, 1.0, 
--4.0]], [[-1.0, -5.0, -2.0], [2.0, -1.0, 5.0]]], [[[6.0, 6.0, -5.0], [-2.0, 2.0, -4.0]], [[-2.0, 4.0, 5.0], [4.0, 3.0, 7.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-1.0, 0.0, 3.0])+(1.-msk_arg1)*numpy.array([-2.0, 7.0, -6.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([-6.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-2.0, 1.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-3.0, 5.0, 2.0, -1.0, 2.0], [-1.0, 2.0, -7.0, -1.0, 5.0], [-4.0, -1.0, 0.0, 3.0, -6.0], [-6.0, 
+1.0, 2.0, 3.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -4.0, 2.0, 4.0, 1.0], [3.0, 6.0, 1.0, 7.0, 5.0], [1.0, 5.0, -6.0, 2.0, -6.0], 
+[3.0, -4.0, -1.0, -4.0, 0.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-13.0, 25.0], [-2.0, 3.0]], [[7.0, 1.0], [-3.0, -12.0]], [[-2.0, 27.0], [14.0, -10.0]], 
-[[-9.0, -14.0], [0.0, 8.0]], [[-10.0, -11.0], [-5.0, 13.0]], [[-21.0, -10.0], [17.0, 17.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 
-13.0], [-25.0, -55.0]], [[-1.0, -35.0], [-11.0, 24.0]], [[-32.0, -9.0], [-20.0, -1.0]], [[28.0, -8.0], [-21.0, 41.0]], [[33.0, 
-33.0], [-21.0, -41.0]], [[60.0, 42.0], [2.0, -29.0]]])
+      ref=msk_ref*numpy.array([[[18.0, -30.0, -12.0, 6.0, -12.0], [6.0, -12.0, 42.0, 6.0, -30.0], [24.0, 6.0, 0.0, -18.0, 
+36.0], [36.0, -6.0, -12.0, -18.0, 42.0]], [[12.0, -20.0, -8.0, 4.0, -8.0], [4.0, -8.0, 28.0, 4.0, -20.0], [16.0, 4.0, 0.0, 
+-12.0, 24.0], [24.0, -4.0, -8.0, -12.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, 8.0, -4.0, -8.0, -2.0], [-6.0, -12.0, -2.0, 
+-14.0, -10.0], [-2.0, -10.0, 12.0, -4.0, 12.0], [-6.0, 8.0, 2.0, 8.0, 0.0]], [[6.0, -4.0, 2.0, 4.0, 1.0], [3.0, 6.0, 1.0, 7.0, 
+5.0], [1.0, 5.0, -6.0, 2.0, -6.0], [3.0, -4.0, -1.0, -4.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank3_expandedData_rank1_offset0(self):
-      arg0=numpy.array([[[-1.0, -7.0], [5.0, 2.0]], [[3.0, -3.0], [-4.0, -2.0]], [[7.0, 2.0], [-5.0, 0.0]], [[2.0, -5.0], [3.0, 
-7.0]], [[1.0, 4.0], [-1.0, -7.0]], [[4.0, -5.0], [7.0, 5.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-3.0, -6.0])+(1.-msk_arg1)*numpy.array([0.0, 0.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-3.0, 0.0], [-7.0, 6.0], [-1.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, -6.0], [-7.0, -6.0], [1.0, -3.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-5.0, -4.0, -7.0, -3.0, -6.0], [0.0, 6.0, 3.0, 5.0, 5.0], [5.0, -7.0, -5.0, 2.0, 0.0], [3.0, 
+5.0, -2.0, -4.0, -1.0]], [[6.0, 2.0, 1.0, 2.0, 6.0], [0.0, 6.0, 4.0, 1.0, 0.0], [-4.0, 6.0, 1.0, -5.0, 0.0], [3.0, -3.0, -5.0, 
+3.0, 3.0]], [[-2.0, -2.0, -3.0, -5.0, -1.0], [-1.0, -5.0, 0.0, -7.0, -7.0], [4.0, -3.0, 0.0, 0.0, 7.0], [1.0, 7.0, 5.0, 6.0, 
+-6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 2.0, 2.0, 3.0, -3.0], [1.0, 7.0, -2.0, -5.0, 5.0], [5.0, -3.0, 3.0, -6.0, 6.0], 
+[3.0, -3.0, 4.0, 0.0, -1.0]], [[-2.0, -5.0, -1.0, 2.0, 5.0], [-5.0, 1.0, -6.0, 2.0, -6.0], [-1.0, 0.0, 4.0, -1.0, -3.0], [-7.0, 
+3.0, 7.0, 5.0, 3.0]], [[-5.0, 4.0, 0.0, -4.0, 4.0], [-3.0, 5.0, 1.0, 2.0, -3.0], [0.0, -1.0, -5.0, -5.0, 0.0], [6.0, 3.0, -1.0, 
+-3.0, 3.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[3.0, 6.0], [21.0, 42.0]], [[-15.0, -30.0], [-6.0, -12.0]]], [[[-9.0, -18.0], [9.0, 18.0]], 
-[[12.0, 24.0], [6.0, 12.0]]], [[[-21.0, -42.0], [-6.0, -12.0]], [[15.0, 30.0], [0.0, 0.0]]], [[[-6.0, -12.0], [15.0, 30.0]], 
-[[-9.0, -18.0], [-21.0, -42.0]]], [[[-3.0, -6.0], [-12.0, -24.0]], [[3.0, 6.0], [21.0, 42.0]]], [[[-12.0, -24.0], [15.0, 
-30.0]], [[-21.0, -42.0], [-15.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], 
-[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 
-0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[[-25.0, 0.0, 17.0, 0.0, -23.0], [1.0, -55.0, -37.0, -15.0, -8.0], [9.0, -18.0, 8.0, 29.0, 
+-7.0], [-31.0, -1.0, 36.0, -15.0, -12.0]], [[36.0, 12.0, 6.0, 12.0, 36.0], [0.0, 36.0, 24.0, 6.0, 0.0], [-24.0, 36.0, 6.0, 
+-30.0, 0.0], [18.0, -18.0, -30.0, 18.0, 18.0]]])+(1.-msk_ref)*numpy.array([[[9.0, 27.0, -5.0, -36.0, -13.0], [26.0, -44.0, 
+55.0, 18.0, 9.0], [-23.0, 17.0, -51.0, 38.0, -15.0], [37.0, 0.0, -74.0, -38.0, -12.0]], [[27.0, 6.0, -6.0, -18.0, -24.0], 
+[33.0, -63.0, 45.0, 12.0, 15.0], [-24.0, 21.0, -27.0, 57.0, -18.0], [6.0, -9.0, -63.0, -21.0, -21.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank2_offset1(self):
-      arg0=numpy.array([[[[-6.0, 0.0, -2.0], [-4.0, -5.0, -1.0]], [[-7.0, -4.0, 3.0], [0.0, 6.0, -4.0]]], [[[4.0, -4.0, -4.0], 
-[3.0, -2.0, -2.0]], [[-7.0, -3.0, 1.0], [-7.0, 5.0, 0.0]]], [[[5.0, 0.0, -1.0], [6.0, -2.0, 0.0]], [[7.0, -7.0, -1.0], [4.0, 
-7.0, 2.0]]], [[[-1.0, 4.0, -2.0], [2.0, 3.0, 2.0]], [[-5.0, 2.0, -1.0], [-7.0, 0.0, 7.0]]], [[[-7.0, -1.0, -2.0], [0.0, -1.0, 
--7.0]], [[6.0, 6.0, 5.0], [-4.0, 6.0, -5.0]]], [[[2.0, 0.0, 4.0], [1.0, -2.0, 4.0]], [[-2.0, 7.0, -2.0], [-6.0, 0.0, 5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 7.0, 6.0], [-4.0, -1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[2.0, 3.0, 7.0], [-2.0, -4.0, 
-4.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 6.0], [2.0, 2.0], [3.0, 0.0]], [[0.0, 4.0], [-2.0, 0.0], [6.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, 1.0], [6.0, -7.0], [1.0, -1.0]], [[-1.0, 0.0], [2.0, -7.0], [-5.0, 7.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-5.0, -3.0, 3.0, -7.0, 7.0], [1.0, 5.0, -6.0, 2.0, 7.0], [0.0, 7.0, -4.0, 1.0, -5.0], [2.0, 
+-5.0, -3.0, -4.0, -4.0]], [[-5.0, -6.0, 5.0, 1.0, -2.0], [-5.0, 0.0, 2.0, 6.0, -7.0], [0.0, -7.0, 5.0, 2.0, -3.0], [0.0, 1.0, 
+-4.0, 2.0, -7.0]], [[-1.0, -2.0, 6.0, -1.0, -7.0], [7.0, 4.0, 4.0, -1.0, 4.0], [5.0, -7.0, -4.0, 4.0, -5.0], [4.0, -5.0, -3.0, 
+0.0, 0.0]]], [[[3.0, 1.0, 0.0, 0.0, 6.0], [2.0, 2.0, 7.0, -6.0, -6.0], [6.0, -1.0, 6.0, 0.0, -4.0], [-3.0, -6.0, -5.0, -4.0, 
+0.0]], [[1.0, 6.0, -2.0, -1.0, 4.0], [0.0, -2.0, 0.0, -1.0, -7.0], [5.0, -6.0, 1.0, 7.0, -6.0], [6.0, -2.0, 0.0, -4.0, 7.0]], 
+[[6.0, 5.0, 3.0, 2.0, -4.0], [4.0, -3.0, -1.0, -3.0, 0.0], [4.0, -4.0, -1.0, -2.0, 0.0], [1.0, 2.0, 3.0, -6.0, 
+3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 5.0, 1.0, -2.0, -5.0], [7.0, -3.0, -2.0, -5.0, 5.0], [0.0, -5.0, -6.0, 5.0, 
+6.0], [-4.0, -5.0, -6.0, 0.0, 5.0]], [[-2.0, 2.0, -7.0, 2.0, 4.0], [7.0, -2.0, -2.0, 5.0, 0.0], [6.0, -1.0, -3.0, 6.0, 7.0], 
+[5.0, 3.0, 7.0, -6.0, 6.0]], [[-7.0, 0.0, 5.0, -7.0, 7.0], [-3.0, -4.0, -5.0, 6.0, -1.0], [0.0, 4.0, 6.0, -3.0, 0.0], [0.0, 
+3.0, 7.0, 0.0, 7.0]]], [[[4.0, -6.0, -7.0, 0.0, 0.0], [7.0, -3.0, 1.0, -5.0, -1.0], [0.0, -6.0, 1.0, 0.0, 4.0], [-6.0, 0.0, 
+-4.0, 4.0, -4.0]], [[-2.0, 6.0, -2.0, -4.0, 0.0], [-4.0, -2.0, -4.0, -2.0, -6.0], [-2.0, -5.0, 5.0, -2.0, -6.0], [-1.0, 0.0, 
+-5.0, -2.0, 7.0]], [[0.0, 5.0, -5.0, -3.0, 1.0], [1.0, -1.0, 5.0, -3.0, -1.0], [2.0, 1.0, 6.0, -3.0, 5.0], [3.0, 3.0, 1.0, 5.0, 
+-6.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[12.0, 24.0], [-25.0, 21.0]], [[18.0, 32.0], [18.0, -6.0]]], [[[-68.0, -12.0], [-38.0, 
--10.0]], [[13.0, 31.0], [63.0, 23.0]]], [[[-26.0, -20.0], [-38.0, -22.0]], [[-83.0, -21.0], [45.0, -23.0]]], [[[20.0, 0.0], 
-[25.0, -11.0]], [[28.0, 18.0], [70.0, 28.0]]], [[[9.0, 29.0], [-49.0, 1.0]], [[48.0, -30.0], [28.0, 10.0]]], [[[16.0, -8.0], 
-[6.0, -2.0]], [[45.0, 1.0], [54.0, 24.0]]]])+(1.-msk_ref)*numpy.array([[[[-26.0, 4.0], [-30.0, 24.0]], [[-5.0, 42.0], [-10.0, 
--40.0]]], [[[-32.0, -8.0], [-14.0, -6.0]], [[-16.0, 30.0], [1.0, -6.0]]], [[[3.0, -14.0], [6.0, -4.0]], [[-14.0, 10.0], [43.0, 
--28.0]]], [[[-4.0, -22.0], [27.0, -8.0]], [[-11.0, -2.0], [35.0, 42.0]]], [[[-31.0, 10.0], [-52.0, -24.0]], [[65.0, -16.0], 
-[-25.0, -36.0]]], [[[32.0, 12.0], [24.0, 22.0]], [[3.0, -32.0], [23.0, 32.0]]]])
+      ref=msk_ref*numpy.array([[[21.0, 0.0, 50.0, 13.0, -57.0], [35.0, -2.0, 10.0, -7.0, 12.0], [29.0, -47.0, -10.0, -10.0, 
+-9.0], [6.0, 3.0, 1.0, -24.0, -10.0]], [[-28.0, -26.0, 28.0, -40.0, 62.0], [4.0, 38.0, -4.0, 0.0, 4.0], [24.0, 24.0, 10.0, 
+10.0, -52.0], [0.0, -52.0, -46.0, -36.0, -38.0]]])+(1.-msk_ref)*numpy.array([[[-27.0, -20.0, -14.0, 22.0, 51.0], [-16.0, 3.0, 
+-41.0, 77.0, -32.0], [22.0, 14.0, -3.0, 19.0, -29.0], [39.0, 31.0, 68.0, -69.0, 66.0]], [[35.0, -16.0, 24.0, -2.0, -33.0], 
+[-4.0, 22.0, 80.0, -53.0, 41.0], [-14.0, 40.0, 16.0, -41.0, 34.0], [-11.0, -8.0, -20.0, 91.0, -135.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_float_rank0_offset0(self):
-      arg0=numpy.array([[[[5.0, -1.0, -1.0, 1.0], [-1.0, 3.0, 5.0, 7.0], [-2.0, 0.0, -6.0, 3.0]], [[-3.0, -4.0, 0.0, -6.0], 
-[-5.0, 0.0, -7.0, -1.0], [7.0, 7.0, 1.0, 2.0]]], [[[5.0, -7.0, -2.0, -4.0], [7.0, -1.0, -4.0, 7.0], [-7.0, 3.0, -5.0, 0.0]], 
-[[-4.0, 6.0, 1.0, -2.0], [2.0, 4.0, -2.0, -6.0], [6.0, 1.0, 7.0, 7.0]]], [[[3.0, -7.0, 7.0, -1.0], [-1.0, 7.0, -3.0, 2.0], 
-[-2.0, 0.0, 0.0, 2.0]], [[2.0, -5.0, 0.0, 1.0], [7.0, -4.0, 0.0, -4.0], [5.0, -5.0, 1.0, 0.0]]]])
-      arg1=1.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[5.0, -1.0, -1.0, 1.0], [-1.0, 3.0, 5.0, 7.0], [-2.0, 0.0, -6.0, 3.0]], [[-3.0, -4.0, 0.0, -6.0], 
-[-5.0, 0.0, -7.0, -1.0], [7.0, 7.0, 1.0, 2.0]]], [[[5.0, -7.0, -2.0, -4.0], [7.0, -1.0, -4.0, 7.0], [-7.0, 3.0, -5.0, 0.0]], 
-[[-4.0, 6.0, 1.0, -2.0], [2.0, 4.0, -2.0, -6.0], [6.0, 1.0, 7.0, 7.0]]], [[[3.0, -7.0, 7.0, -1.0], [-1.0, 7.0, -3.0, 2.0], 
-[-2.0, 0.0, 0.0, 2.0]], [[2.0, -5.0, 0.0, 1.0], [7.0, -4.0, 0.0, -4.0], [5.0, -5.0, 1.0, 0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([6.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-2.0, 1.0], [5.0, 0.0]], [[3.0, -2.0], [-4.0, 5.0]], [[2.0, 4.0], [7.0, -5.0]], [[-5.0, 5.0], 
+[4.0, 0.0]], [[1.0, -4.0], [2.0, -5.0]], [[-6.0, -7.0], [-5.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 6.0], [-7.0, -7.0]], [[-4.0, 5.0], [-2.0, -5.0]], [[3.0, -4.0], [2.0, 6.0]], 
+[[-2.0, 6.0], [-2.0, 6.0]], [[4.0, 1.0], [5.0, 5.0]], [[-1.0, -6.0], [-3.0, -5.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-12.0, 6.0], [30.0, 0.0]], [[18.0, -12.0], [-24.0, 30.0]], [[12.0, 24.0], [42.0, -30.0]], 
+[[-30.0, 30.0], [24.0, 0.0]], [[6.0, -24.0], [12.0, -30.0]], [[-36.0, -42.0], [-30.0, 36.0]]], [[[12.0, -6.0], [-30.0, 0.0]], 
+[[-18.0, 12.0], [24.0, -30.0]], [[-12.0, -24.0], [-42.0, 30.0]], [[30.0, -30.0], [-24.0, 0.0]], [[-6.0, 24.0], [-12.0, 30.0]], 
+[[36.0, 42.0], [30.0, -36.0]]]])+(1.-msk_ref)*numpy.array([[[[2.0, 6.0], [-7.0, -7.0]], [[-4.0, 5.0], [-2.0, -5.0]], [[3.0, 
+-4.0], [2.0, 6.0]], [[-2.0, 6.0], [-2.0, 6.0]], [[4.0, 1.0], [5.0, 5.0]], [[-1.0, -6.0], [-3.0, -5.0]]], [[[-6.0, -18.0], 
+[21.0, 21.0]], [[12.0, -15.0], [6.0, 15.0]], [[-9.0, 12.0], [-6.0, -18.0]], [[6.0, -18.0], [6.0, -18.0]], [[-12.0, -3.0], 
+[-15.0, -15.0]], [[3.0, 18.0], [9.0, 15.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_array_rank0_offset0(self):
-      arg0=numpy.array([[[[-1.0, 2.0, -4.0, -5.0], [3.0, 1.0, -7.0, -2.0], [-1.0, 0.0, 2.0, 5.0]], [[0.0, 7.0, -6.0, 3.0], 
-[-4.0, 7.0, -5.0, 3.0], [-6.0, 0.0, -6.0, 2.0]]], [[[-5.0, 0.0, -7.0, -1.0], [-2.0, -6.0, -3.0, 7.0], [-1.0, -6.0, -7.0, 1.0]], 
-[[5.0, 3.0, 4.0, 1.0], [-6.0, 5.0, 0.0, 0.0], [-2.0, 1.0, 6.0, -2.0]]], [[[4.0, -7.0, 4.0, -7.0], [3.0, -2.0, 2.0, -2.0], [4.0, 
--6.0, 6.0, 5.0]], [[4.0, 1.0, -2.0, 1.0], [0.0, 6.0, 6.0, 3.0], [0.0, -7.0, -4.0, 0.0]]]])
-      arg1=numpy.array(-5.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=numpy.array([[[[5.0, -10.0, 20.0, 25.0], [-15.0, -5.0, 35.0, 10.0], [5.0, -0.0, -10.0, -25.0]], [[-0.0, -35.0, 30.0, 
--15.0], [20.0, -35.0, 25.0, -15.0], [30.0, -0.0, 30.0, -10.0]]], [[[25.0, -0.0, 35.0, 5.0], [10.0, 30.0, 15.0, -35.0], [5.0, 
-30.0, 35.0, -5.0]], [[-25.0, -15.0, -20.0, -5.0], [30.0, -25.0, -0.0, -0.0], [10.0, -5.0, -30.0, 10.0]]], [[[-20.0, 35.0, 
--20.0, 35.0], [-15.0, 10.0, -10.0, 10.0], [-20.0, 30.0, -30.0, -25.0]], [[-20.0, -5.0, 10.0, -5.0], [-0.0, -30.0, -30.0, 
--15.0], [-0.0, 35.0, 20.0, -0.0]]]])
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[7.0, -3.0], [-6.0, -2.0], [3.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, 4.0], [6.0, 1.0], [-2.0, 7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-4.0, 0.0], [5.0, 3.0]], [[2.0, 1.0], [5.0, 4.0]], [[-3.0, 0.0], [-3.0, 0.0]], [[3.0, 2.0], 
+[2.0, 4.0]], [[-2.0, -2.0], [7.0, 7.0]], [[-7.0, -1.0], [0.0, -3.0]]], [[[-3.0, 2.0], [5.0, 0.0]], [[1.0, -7.0], [-6.0, 2.0]], 
+[[-3.0, 0.0], [-4.0, 4.0]], [[1.0, 0.0], [2.0, -7.0]], [[-7.0, -1.0], [-2.0, 7.0]], [[0.0, -3.0], [1.0, 2.0]]], [[[1.0, 7.0], 
+[-1.0, 3.0]], [[-7.0, -4.0], [-5.0, 0.0]], [[5.0, 6.0], [3.0, 0.0]], [[-1.0, 4.0], [5.0, -7.0]], [[-4.0, 6.0], [-4.0, 0.0]], 
+[[0.0, 7.0], [-3.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, 0.0], [7.0, -7.0]], [[-4.0, -2.0], [7.0, 0.0]], [[-2.0, 6.0], [4.0, 5.0]], 
+[[4.0, 1.0], [0.0, -1.0]], [[-1.0, -3.0], [1.0, 1.0]], [[-4.0, 3.0], [0.0, -1.0]]], [[[1.0, 3.0], [0.0, 4.0]], [[0.0, -5.0], 
+[5.0, -5.0]], [[-3.0, -7.0], [2.0, 6.0]], [[2.0, 3.0], [-1.0, -3.0]], [[7.0, -1.0], [-2.0, 5.0]], [[-4.0, -3.0], [3.0, 6.0]]], 
+[[[2.0, -4.0], [4.0, -6.0]], [[2.0, -1.0], [-1.0, 0.0]], [[4.0, 1.0], [1.0, -2.0]], [[5.0, 0.0], [-1.0, 6.0]], [[-1.0, 0.0], 
+[2.0, 5.0]], [[0.0, 1.0], [-4.0, 0.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-7.0, 9.0], [2.0, 30.0]], [[-13.0, 37.0], [56.0, 16.0]], [[12.0, 18.0], [12.0, -24.0]], 
+[[12.0, 26.0], [17.0, 49.0]], [[16.0, 10.0], [49.0, 7.0]], [[-49.0, 32.0], [-15.0, -27.0]]], [[[11.0, -53.0], [-18.0, -30.0]], 
+[[41.0, 39.0], [32.0, -16.0]], [[-20.0, -42.0], [-4.0, -8.0]], [[-4.0, -34.0], [-45.0, 51.0]], [[48.0, -34.0], [11.0, -35.0]], 
+[[21.0, -40.0], [19.0, -9.0]]]])+(1.-msk_ref)*numpy.array([[[[-16.0, 26.0], [13.0, 15.0]], [[-16.0, -34.0], [53.0, -30.0]], 
+[[-32.0, -26.0], [22.0, 55.0]], [[14.0, 21.0], [-4.0, -33.0]], [[41.0, -15.0], [-13.0, 23.0]], [[-36.0, -11.0], [26.0, 33.0]]], 
+[[[-9.0, -25.0], [56.0, -66.0]], [[-2.0, -20.0], [26.0, -5.0]], [[17.0, 24.0], [25.0, 12.0]], [[53.0, 7.0], [-8.0, 35.0]], 
+[[-4.0, -13.0], [16.0, 44.0]], [[-20.0, 16.0], [-25.0, 2.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_constData_rank0_offset0(self):
-      arg0=numpy.array([[[[-4.0, -6.0, -1.0, 4.0], [-7.0, 1.0, 5.0, 2.0], [-4.0, 1.0, 6.0, 0.0]], [[5.0, 2.0, -4.0, -6.0], 
-[0.0, -6.0, 2.0, -6.0], [2.0, -2.0, -6.0, 0.0]]], [[[5.0, 4.0, -6.0, -7.0], [-7.0, 3.0, -1.0, 6.0], [-1.0, -4.0, 2.0, -5.0]], 
-[[5.0, -2.0, -1.0, 3.0], [2.0, 2.0, 4.0, 6.0], [6.0, 0.0, -6.0, -5.0]]], [[[-3.0, 5.0, -3.0, 6.0], [-5.0, -2.0, 6.0, 7.0], 
-[-3.0, 1.0, -1.0, -7.0]], [[5.0, 3.0, -1.0, 0.0], [-4.0, -7.0, -5.0, 6.0], [-2.0, -7.0, 6.0, 2.0]]]])
-      arg1=Data(0.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, -0.0, -0.0], 
-[0.0, -0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0]], 
-[[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]], [[[-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], 
-[-0.0, 0.0, -0.0, -0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]]]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -1.0, -4.0, 0.0, -7.0], [3.0, 5.0, 3.0, 3.0, -1.0], [6.0, 0.0, 2.0, -1.0, 7.0], [4.0, -1.0, 
+-1.0, -5.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, -7.0, 1.0, 2.0, 1.0], [-3.0, 2.0, 0.0, -6.0, 7.0], [7.0, -4.0, -1.0, 1.0, 
+-1.0], [0.0, 0.0, -4.0, 2.0, -3.0]]))
+      arg0.expand()
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,3.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-7.0, -1.0, -4.0, 0.0, -7.0], [3.0, 5.0, 3.0, 3.0, -1.0], [6.0, 0.0, 2.0, -1.0, 7.0], [4.0, 
+-1.0, -1.0, -5.0, 5.0]])+(1.-msk_ref)*numpy.array([[-18.0, -21.0, 3.0, 6.0, 3.0], [-9.0, 6.0, 0.0, -18.0, 21.0], [21.0, -12.0, 
+-3.0, 3.0, -3.0], [0.0, 0.0, -12.0, 6.0, -9.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_array_rank4_expandedData_rank0_offset0(self):
-      arg0=numpy.array([[[[0.0, -5.0, -5.0, 3.0], [2.0, -1.0, -1.0, -7.0], [-2.0, 6.0, -2.0, -7.0]], [[2.0, -1.0, 3.0, -6.0], 
-[5.0, -4.0, 2.0, 0.0], [3.0, -5.0, -5.0, 3.0]]], [[[-4.0, -4.0, 7.0, 6.0], [-3.0, 0.0, -1.0, 3.0], [-1.0, -5.0, -7.0, 0.0]], 
-[[-6.0, -5.0, -7.0, -6.0], [-4.0, -7.0, 0.0, 7.0], [6.0, -1.0, -6.0, -3.0]]], [[[-3.0, 3.0, 0.0, -4.0], [2.0, -7.0, -7.0, 4.0], 
-[-1.0, -3.0, -5.0, -4.0]], [[-6.0, -2.0, 0.0, 4.0], [7.0, 0.0, -7.0, -7.0], [5.0, 0.0, 4.0, -7.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-4.0)+(1-msk_arg1)*(-1.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[1.0, -4.0, -5.0, 0.0, -2.0], [5.0, -7.0, 7.0, 4.0, 5.0], [-4.0, -3.0, 2.0, 0.0, 0.0], [-5.0, 
+2.0, 4.0, 0.0, -4.0]], [[0.0, 2.0, 4.0, 3.0, 5.0], [-6.0, -1.0, 5.0, -1.0, -6.0], [1.0, -1.0, -1.0, 0.0, -1.0], [5.0, -7.0, 
+3.0, 1.0, 6.0]], [[-7.0, -1.0, 7.0, 7.0, 0.0], [2.0, -2.0, 1.0, 0.0, -5.0], [-7.0, -5.0, 3.0, 2.0, -6.0], [-1.0, -7.0, 4.0, 
+-3.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-7.0, 0.0, 6.0, 6.0, -2.0], [4.0, 1.0, -5.0, 3.0, -4.0], [-5.0, -1.0, -1.0, -7.0, 
+-7.0], [-5.0, 6.0, -1.0, 6.0, 5.0]], [[7.0, 7.0, 3.0, 1.0, 0.0], [-2.0, 0.0, -4.0, 5.0, 0.0], [7.0, 6.0, -7.0, -1.0, 2.0], 
+[-7.0, -5.0, -1.0, -7.0, 4.0]], [[-7.0, 2.0, 3.0, -4.0, -1.0], [5.0, -3.0, -6.0, 0.0, -3.0], [0.0, -3.0, 0.0, 3.0, -5.0], [6.0, 
+1.0, -6.0, -3.0, 5.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-7.0, -3.0, -5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, 4.0, 0.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-0.0, 20.0, 20.0, -12.0], [-8.0, 4.0, 4.0, 28.0], [8.0, -24.0, 8.0, 28.0]], [[-8.0, 4.0, 
--12.0, 24.0], [-20.0, 16.0, -8.0, -0.0], [-12.0, 20.0, 20.0, -12.0]]], [[[16.0, 16.0, -28.0, -24.0], [12.0, -0.0, 4.0, -12.0], 
-[4.0, 20.0, 28.0, -0.0]], [[24.0, 20.0, 28.0, 24.0], [16.0, 28.0, -0.0, -28.0], [-24.0, 4.0, 24.0, 12.0]]], [[[12.0, -12.0, 
--0.0, 16.0], [-8.0, 28.0, 28.0, -16.0], [4.0, 12.0, 20.0, 16.0]], [[24.0, 8.0, -0.0, -16.0], [-28.0, -0.0, 28.0, 28.0], [-20.0, 
--0.0, -16.0, 28.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 5.0, 5.0, -3.0], [-2.0, 1.0, 1.0, 7.0], [2.0, -6.0, 2.0, 7.0]], 
-[[-2.0, 1.0, -3.0, 6.0], [-5.0, 4.0, -2.0, -0.0], [-3.0, 5.0, 5.0, -3.0]]], [[[4.0, 4.0, -7.0, -6.0], [3.0, -0.0, 1.0, -3.0], 
-[1.0, 5.0, 7.0, -0.0]], [[6.0, 5.0, 7.0, 6.0], [4.0, 7.0, -0.0, -7.0], [-6.0, 1.0, 6.0, 3.0]]], [[[3.0, -3.0, -0.0, 4.0], 
-[-2.0, 7.0, 7.0, -4.0], [1.0, 3.0, 5.0, 4.0]], [[6.0, 2.0, -0.0, -4.0], [-7.0, -0.0, 7.0, 7.0], [-5.0, -0.0, -4.0, 7.0]]]])
+      ref=msk_ref*numpy.array([[28.0, 27.0, -12.0, -44.0, -1.0], [-27.0, 62.0, -69.0, -25.0, 8.0], [60.0, 49.0, -26.0, -10.0, 
+33.0], [25.0, 42.0, -57.0, 12.0, 15.0]])+(1.-msk_ref)*numpy.array([[-7.0, 28.0, 42.0, 34.0, -10.0], [12.0, 5.0, -41.0, 35.0, 
+-20.0], [3.0, 19.0, -33.0, -39.0, -27.0], [-53.0, 10.0, -9.0, 2.0, 41.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_float_rank0_offset0(self):
-      arg0=Data(-6.0,self.functionspace)
-      arg1=-4.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(24.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[6.0, 3.0, 3.0, -4.0, 2.0], [2.0, -2.0, -6.0, -5.0, 0.0], [-2.0, -6.0, 0.0, 4.0, -3.0], [-1.0, 
+2.0, 2.0, 7.0, 0.0]], [[4.0, 0.0, -1.0, 4.0, -7.0], [-4.0, -6.0, -1.0, 6.0, -2.0], [3.0, -5.0, 6.0, 0.0, -5.0], [5.0, 0.0, 6.0, 
+7.0, 3.0]], [[0.0, 0.0, 0.0, 2.0, 0.0], [-3.0, 0.0, -1.0, 3.0, 1.0], [3.0, 0.0, 0.0, 0.0, -6.0], [-4.0, -5.0, 3.0, -7.0, 
+-7.0]]], [[[2.0, 1.0, 0.0, -2.0, 3.0], [1.0, 7.0, 5.0, -2.0, -6.0], [0.0, 0.0, 0.0, -7.0, 6.0], [6.0, -3.0, -5.0, 1.0, 0.0]], 
+[[1.0, 6.0, 5.0, -3.0, 1.0], [-5.0, -7.0, -7.0, -6.0, 4.0], [-7.0, -1.0, -1.0, -7.0, -5.0], [-3.0, 2.0, 2.0, 5.0, 5.0]], [[1.0, 
+-1.0, 2.0, 3.0, 5.0], [-5.0, 3.0, 7.0, -4.0, 1.0], [-7.0, -2.0, -4.0, 4.0, 5.0], [-5.0, 5.0, 0.0, -4.0, 
+-2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, -1.0, 4.0, 1.0, 2.0], [0.0, -3.0, 5.0, 4.0, -6.0], [-5.0, -2.0, -2.0, 3.0, 
+1.0], [5.0, 3.0, -5.0, -2.0, -7.0]], [[7.0, 4.0, 5.0, 3.0, -3.0], [-6.0, -2.0, -3.0, -3.0, 7.0], [4.0, 6.0, 0.0, -3.0, 0.0], 
+[-4.0, 6.0, -6.0, -6.0, -5.0]], [[-5.0, -3.0, 5.0, 0.0, -4.0], [-2.0, 0.0, -7.0, 2.0, -3.0], [1.0, -4.0, 3.0, -7.0, 0.0], [4.0, 
+2.0, 2.0, 0.0, 1.0]]], [[[5.0, 1.0, -4.0, 2.0, 7.0], [-3.0, -5.0, 0.0, -2.0, 0.0], [1.0, 0.0, 3.0, 0.0, 4.0], [-3.0, 4.0, 5.0, 
+2.0, 3.0]], [[0.0, 5.0, 0.0, -3.0, -5.0], [7.0, -4.0, 0.0, 3.0, 6.0], [2.0, 5.0, 7.0, -6.0, 7.0], [0.0, 5.0, 2.0, 7.0, 6.0]], 
+[[0.0, -4.0, 6.0, -5.0, -7.0], [5.0, -4.0, -3.0, 5.0, 5.0], [0.0, -1.0, 5.0, 0.0, 1.0], [-2.0, 2.0, -1.0, 0.0, 2.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[5.0, 0.0, 2.0], [-3.0, -2.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, -2.0, -4.0], [7.0, -2.0, -5.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[15.0, 7.0, -9.0, -25.0, -36.0], [46.0, -38.0, -82.0, 27.0, 5.0], [59.0, -14.0, 30.0, 27.0, 
+-70.0], [10.0, -30.0, 27.0, 36.0, -10.0]])+(1.-msk_ref)*numpy.array([[31.0, 23.0, -96.0, 37.0, 112.0], [-40.0, 3.0, 39.0, 
+-55.0, -27.0], [1.0, 3.0, -26.0, 40.0, 7.0], [-29.0, -18.0, 50.0, 16.0, 19.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[3.0, 3.0, 2.0, -7.0, 3.0], [4.0, -6.0, 5.0, 7.0, 3.0], [-7.0, 0.0, 0.0, 7.0, 5.0], [-5.0, -6.0, 
+0.0, 0.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -6.0, 5.0, 3.0, 5.0], [-2.0, -1.0, 0.0, -5.0, -6.0], [1.0, -6.0, -4.0, -1.0, 
+6.0], [0.0, 0.0, 0.0, -2.0, 0.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([2.0, 5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, -5.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[6.0, 15.0], [6.0, 15.0], [4.0, 10.0], [-14.0, -35.0], [6.0, 15.0]], [[8.0, 20.0], [-12.0, 
+-30.0], [10.0, 25.0], [14.0, 35.0], [6.0, 15.0]], [[-14.0, -35.0], [0.0, 0.0], [0.0, 0.0], [14.0, 35.0], [10.0, 25.0]], 
+[[-10.0, -25.0], [-12.0, -30.0], [0.0, 0.0], [0.0, 0.0], [14.0, 35.0]]])+(1.-msk_ref)*numpy.array([[[-21.0, -35.0], [18.0, 
+30.0], [-15.0, -25.0], [-9.0, -15.0], [-15.0, -25.0]], [[6.0, 10.0], [3.0, 5.0], [0.0, 0.0], [15.0, 25.0], [18.0, 30.0]], 
+[[-3.0, -5.0], [18.0, 30.0], [12.0, 20.0], [3.0, 5.0], [-18.0, -30.0]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [6.0, 10.0], [0.0, 
+0.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_array_rank0_offset0(self):
-      arg0=Data(4.0,self.functionspace)
-      arg1=numpy.array(5.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(20.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[1.0, -7.0, -1.0, 2.0, 2.0], [0.0, 0.0, 0.0, 6.0, 2.0], [-3.0, 1.0, 7.0, 3.0, 0.0], [-4.0, 1.0, 
+0.0, -1.0, 5.0]], [[-6.0, 5.0, -4.0, 2.0, -4.0], [0.0, -6.0, 0.0, 1.0, 3.0], [-4.0, 1.0, 6.0, 5.0, -4.0], [4.0, -5.0, 2.0, 
+-1.0, 0.0]], [[7.0, 5.0, 2.0, 3.0, -1.0], [-6.0, -2.0, -6.0, 2.0, 0.0], [4.0, -5.0, 6.0, 4.0, 5.0], [-5.0, 0.0, -6.0, -2.0, 
+3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 2.0, 0.0, 4.0, 6.0], [7.0, -1.0, 3.0, -1.0, -3.0], [1.0, -2.0, 3.0, -6.0, 
+-1.0], [5.0, 7.0, -6.0, 5.0, -6.0]], [[-3.0, -5.0, 3.0, 5.0, 4.0], [6.0, 1.0, 0.0, 6.0, -5.0], [4.0, -4.0, -4.0, -5.0, -4.0], 
+[6.0, -5.0, 0.0, 6.0, -5.0]], [[6.0, -1.0, -1.0, -6.0, 2.0], [4.0, 3.0, -6.0, 4.0, -4.0], [-6.0, 3.0, -6.0, -2.0, -1.0], [-5.0, 
+-4.0, -1.0, -7.0, 2.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[2.0, -4.0], [0.0, 7.0], [0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, 0.0], [0.0, 4.0], [1.0, -7.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[2.0, -46.0], [-14.0, 63.0], [-2.0, -24.0], [4.0, 6.0], [4.0, -36.0]], [[0.0, 0.0], [0.0, 
+-42.0], [0.0, 0.0], [12.0, -17.0], [4.0, 13.0]], [[-6.0, -16.0], [2.0, 3.0], [14.0, 14.0], [6.0, 23.0], [0.0, -28.0]], [[-8.0, 
+44.0], [2.0, -39.0], [0.0, 14.0], [-2.0, -3.0], [10.0, -20.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, -54.0], [-7.0, -13.0], 
+[-1.0, 19.0], [-18.0, 62.0], [-16.0, 2.0]], [[-17.0, -4.0], [6.0, -17.0], [-15.0, 42.0], [7.0, -4.0], [5.0, 8.0]], [[-9.0, 
+58.0], [9.0, -37.0], [-15.0, 26.0], [16.0, -6.0], [2.0, -9.0]], [[-20.0, 59.0], [-25.0, 8.0], [17.0, 7.0], [-22.0, 73.0], 
+[20.0, -34.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank1_offset1(self):
-      arg0=Data(numpy.array([5.0, -5.0, 7.0]),self.functionspace)
-      arg1=numpy.array([5.0, -1.0, 5.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(65.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, 4.0, -4.0, 3.0, -1.0], [0.0, 0.0, -1.0, 0.0, -7.0], [5.0, 2.0, 2.0, -7.0, 0.0], [-6.0, 
+7.0, 7.0, 4.0, 6.0]], [[-3.0, 6.0, 0.0, 5.0, 1.0], [4.0, 2.0, -6.0, 0.0, -5.0], [3.0, -1.0, 0.0, 2.0, 4.0], [-4.0, 0.0, -7.0, 
+-2.0, -4.0]], [[-2.0, 7.0, -3.0, -2.0, 2.0], [3.0, 3.0, -7.0, 4.0, 0.0], [-2.0, -5.0, 0.0, 6.0, -3.0], [-5.0, -6.0, 4.0, -5.0, 
+-7.0]]], [[[0.0, -5.0, 0.0, -3.0, 1.0], [0.0, -7.0, 1.0, -7.0, -5.0], [0.0, 3.0, 6.0, 2.0, 5.0], [4.0, -3.0, 0.0, 3.0, 7.0]], 
+[[3.0, 1.0, 6.0, 0.0, -4.0], [2.0, 0.0, 4.0, -5.0, -6.0], [-4.0, 2.0, 7.0, -2.0, 2.0], [6.0, 4.0, -3.0, 4.0, -2.0]], [[-4.0, 
+4.0, -2.0, 0.0, -7.0], [-4.0, 3.0, -7.0, 7.0, 0.0], [-4.0, -5.0, -4.0, 1.0, 6.0], [5.0, -5.0, -6.0, -2.0, 
+-5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 5.0, -7.0, 0.0, 6.0], [3.0, 3.0, 4.0, -4.0, 0.0], [7.0, -3.0, -4.0, -4.0, 
+0.0], [-5.0, -1.0, 7.0, -7.0, 2.0]], [[3.0, -5.0, -3.0, 5.0, -3.0], [6.0, -6.0, 0.0, -6.0, 5.0], [7.0, 0.0, 7.0, 3.0, 1.0], 
+[-3.0, 0.0, -2.0, 3.0, 3.0]], [[5.0, 4.0, -2.0, -2.0, -5.0], [2.0, 4.0, 1.0, 0.0, -1.0], [5.0, 5.0, -1.0, 4.0, 4.0], [6.0, 
+-2.0, -5.0, -3.0, -7.0]]], [[[2.0, 0.0, 0.0, 0.0, -2.0], [0.0, 3.0, -4.0, 3.0, 6.0], [1.0, 6.0, 2.0, 7.0, 2.0], [3.0, -2.0, 
+5.0, 3.0, 0.0]], [[3.0, 2.0, 4.0, 2.0, 7.0], [-4.0, -6.0, 0.0, 0.0, 0.0], [6.0, -4.0, -4.0, 5.0, 6.0], [2.0, -1.0, -1.0, 5.0, 
+-6.0]], [[-3.0, 2.0, 2.0, 4.0, 1.0], [0.0, 0.0, 0.0, -1.0, -4.0], [-3.0, -1.0, -1.0, 0.0, 6.0], [-6.0, -3.0, 7.0, -7.0, 
+1.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[6.0, -2.0], [-3.0, 5.0], [5.0, -7.0]], [[-4.0, 7.0], [-5.0, -5.0], [5.0, 
+4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 5.0], [-4.0, 0.0], [-6.0, 5.0]], [[0.0, 4.0], [0.0, -5.0], [-7.0, -6.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-42.0, -30.0], [76.0, -51.0], [-79.0, -9.0], [5.0, 12.0], [-18.0, -8.0]], [[-27.0, -27.0], 
+[52.0, -48.0], [-82.0, -20.0], [108.0, -24.0], [23.0, -16.0]], [[11.0, 23.0], [-57.0, 17.0], [-67.0, -13.0], [-11.0, 10.0], 
+[-27.0, 90.0]], [[-70.0, 45.0], [-21.0, -33.0], [68.0, -86.0], [-37.0, 10.0], [-30.0, 
+56.0]]])+(1.-msk_ref)*numpy.array([[[21.0, 6.0], [-53.0, 23.0], [59.0, -77.0], [-36.0, -44.0], [-7.0, -44.0]], [[-57.0, 45.0], 
+[-21.0, 77.0], [-34.0, 9.0], [59.0, -2.0], [14.0, 43.0]], [[-86.0, 52.0], [-2.0, 60.0], [13.0, 9.0], [-8.0, 3.0], [-70.0, 
+-38.0]], [[53.0, 43.0], [40.0, 0.0], [-60.0, -7.0], [104.0, -21.0], [9.0, -1.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[-5.0, -7.0, 4.0], [-1.0, 6.0, -7.0]]),self.functionspace)
-      arg1=numpy.array([[5.0, 7.0, 0.0], [-1.0, -5.0, -7.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-54.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[0.0, -5.0, 3.0, 6.0, -6.0], [-7.0, 1.0, -1.0, -3.0, 7.0], [-3.0, -2.0, 5.0, -2.0, -5.0], [0.0, 
+1.0, -7.0, -1.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, 1.0, 3.0, 6.0, 5.0], [0.0, 5.0, 2.0, -6.0, 6.0], [-4.0, 0.0, 5.0, 0.0, 4.0], 
+[-1.0, 0.0, 7.0, 1.0, 2.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[0.0, -4.0, 6.0, -3.0, 7.0], [2.0, -1.0, -2.0, -6.0, 2.0], [5.0, -4.0, -2.0, 5.0, 3.0], [1.0, 2.0, 
+6.0, -1.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, -7.0, -4.0, 6.0, -1.0], [3.0, 2.0, -5.0, 3.0, -5.0], [-7.0, 5.0, -7.0, 1.0, 
+-6.0], [-6.0, -6.0, 6.0, 1.0, -4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[0.0, 20.0, -30.0, 15.0, -35.0], [-10.0, 5.0, 10.0, 30.0, -10.0], [-25.0, 20.0, 10.0, -25.0, -15.0], [-5.0, 
+-10.0, -30.0, 5.0, 25.0]], [[0.0, -12.0, 18.0, -9.0, 21.0], [6.0, -3.0, -6.0, -18.0, 6.0], [15.0, -12.0, -6.0, 15.0, 9.0], 
+[3.0, 6.0, 18.0, -3.0, -15.0]], [[0.0, -24.0, 36.0, -18.0, 42.0], [12.0, -6.0, -12.0, -36.0, 12.0], [30.0, -24.0, -12.0, 30.0, 
+18.0], [6.0, 12.0, 36.0, -6.0, -30.0]], [[0.0, 24.0, -36.0, 18.0, -42.0], [-12.0, 6.0, 12.0, 36.0, -12.0], [-30.0, 24.0, 12.0, 
+-30.0, -18.0], [-6.0, -12.0, -36.0, 6.0, 30.0]]], [[[0.0, 28.0, -42.0, 21.0, -49.0], [-14.0, 7.0, 14.0, 42.0, -14.0], [-35.0, 
+28.0, 14.0, -35.0, -21.0], [-7.0, -14.0, -42.0, 7.0, 35.0]], [[0.0, -4.0, 6.0, -3.0, 7.0], [2.0, -1.0, -2.0, -6.0, 2.0], [5.0, 
+-4.0, -2.0, 5.0, 3.0], [1.0, 2.0, 6.0, -1.0, -5.0]], [[0.0, 4.0, -6.0, 3.0, -7.0], [-2.0, 1.0, 2.0, 6.0, -2.0], [-5.0, 4.0, 
+2.0, -5.0, -3.0], [-1.0, -2.0, -6.0, 1.0, 5.0]], [[0.0, 12.0, -18.0, 9.0, -21.0], [-6.0, 3.0, 6.0, 18.0, -6.0], [-15.0, 12.0, 
+6.0, -15.0, -9.0], [-3.0, -6.0, -18.0, 3.0, 15.0]], [[0.0, -28.0, 42.0, -21.0, 49.0], [14.0, -7.0, -14.0, -42.0, 14.0], [35.0, 
+-28.0, -14.0, 35.0, 21.0], [7.0, 14.0, 42.0, -7.0, -35.0]]], [[[0.0, 12.0, -18.0, 9.0, -21.0], [-6.0, 3.0, 6.0, 18.0, -6.0], 
+[-15.0, 12.0, 6.0, -15.0, -9.0], [-3.0, -6.0, -18.0, 3.0, 15.0]], [[0.0, 8.0, -12.0, 6.0, -14.0], [-4.0, 2.0, 4.0, 12.0, -4.0], 
+[-10.0, 8.0, 4.0, -10.0, -6.0], [-2.0, -4.0, -12.0, 2.0, 10.0]], [[0.0, -20.0, 30.0, -15.0, 35.0], [10.0, -5.0, -10.0, -30.0, 
+10.0], [25.0, -20.0, -10.0, 25.0, 15.0], [5.0, 10.0, 30.0, -5.0, -25.0]], [[0.0, 8.0, -12.0, 6.0, -14.0], [-4.0, 2.0, 4.0, 
+12.0, -4.0], [-10.0, 8.0, 4.0, -10.0, -6.0], [-2.0, -4.0, -12.0, 2.0, 10.0]], [[0.0, 20.0, -30.0, 15.0, -35.0], [-10.0, 5.0, 
+10.0, 30.0, -10.0], [-25.0, 20.0, 10.0, -25.0, -15.0], [-5.0, -10.0, -30.0, 5.0, 25.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, -4.0, 6.0, -3.0, 7.0], [2.0, -1.0, -2.0, 
+-6.0, 2.0], [5.0, -4.0, -2.0, 5.0, 3.0], [1.0, 2.0, 6.0, -1.0, -5.0]], [[0.0, 28.0, -42.0, 21.0, -49.0], [-14.0, 7.0, 14.0, 
+42.0, -14.0], [-35.0, 28.0, 14.0, -35.0, -21.0], [-7.0, -14.0, -42.0, 7.0, 35.0]], [[0.0, 4.0, -6.0, 3.0, -7.0], [-2.0, 1.0, 
+2.0, 6.0, -2.0], [-5.0, 4.0, 2.0, -5.0, -3.0], [-1.0, -2.0, -6.0, 1.0, 5.0]], [[0.0, -24.0, 36.0, -18.0, 42.0], [12.0, -6.0, 
+-12.0, -36.0, 12.0], [30.0, -24.0, -12.0, 30.0, 18.0], [6.0, 12.0, 36.0, -6.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[14.0, 
+-49.0, -28.0, 42.0, -7.0], [21.0, 14.0, -35.0, 21.0, -35.0], [-49.0, 35.0, -49.0, 7.0, -42.0], [-42.0, -42.0, 42.0, 7.0, 
+-28.0]], [[2.0, -7.0, -4.0, 6.0, -1.0], [3.0, 2.0, -5.0, 3.0, -5.0], [-7.0, 5.0, -7.0, 1.0, -6.0], [-6.0, -6.0, 6.0, 1.0, 
+-4.0]], [[6.0, -21.0, -12.0, 18.0, -3.0], [9.0, 6.0, -15.0, 9.0, -15.0], [-21.0, 15.0, -21.0, 3.0, -18.0], [-18.0, -18.0, 18.0, 
+3.0, -12.0]], [[12.0, -42.0, -24.0, 36.0, -6.0], [18.0, 12.0, -30.0, 18.0, -30.0], [-42.0, 30.0, -42.0, 6.0, -36.0], [-36.0, 
+-36.0, 36.0, 6.0, -24.0]], [[10.0, -35.0, -20.0, 30.0, -5.0], [15.0, 10.0, -25.0, 15.0, -25.0], [-35.0, 25.0, -35.0, 5.0, 
+-30.0], [-30.0, -30.0, 30.0, 5.0, -20.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[10.0, -35.0, -20.0, 30.0, -5.0], [15.0, 10.0, -25.0, 15.0, -25.0], [-35.0, 25.0, -35.0, 5.0, 
+-30.0], [-30.0, -30.0, 30.0, 5.0, -20.0]], [[4.0, -14.0, -8.0, 12.0, -2.0], [6.0, 4.0, -10.0, 6.0, -10.0], [-14.0, 10.0, -14.0, 
+2.0, -12.0], [-12.0, -12.0, 12.0, 2.0, -8.0]], [[-12.0, 42.0, 24.0, -36.0, 6.0], [-18.0, -12.0, 30.0, -18.0, 30.0], [42.0, 
+-30.0, 42.0, -6.0, 36.0], [36.0, 36.0, -36.0, -6.0, 24.0]], [[12.0, -42.0, -24.0, 36.0, -6.0], [18.0, 12.0, -30.0, 18.0, 
+-30.0], [-42.0, 30.0, -42.0, 6.0, -36.0], [-36.0, -36.0, 36.0, 6.0, -24.0]]], [[[-8.0, 28.0, 16.0, -24.0, 4.0], [-12.0, -8.0, 
+20.0, -12.0, 20.0], [28.0, -20.0, 28.0, -4.0, 24.0], [24.0, 24.0, -24.0, -4.0, 16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[10.0, -35.0, -20.0, 30.0, -5.0], [15.0, 10.0, -25.0, 
+15.0, -25.0], [-35.0, 25.0, -35.0, 5.0, -30.0], [-30.0, -30.0, 30.0, 5.0, -20.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[8.0, -28.0, -16.0, 24.0, -4.0], [12.0, 8.0, -20.0, 12.0, 
+-20.0], [-28.0, 20.0, -28.0, 4.0, -24.0], [-24.0, -24.0, 24.0, 4.0, -16.0]]], [[[-2.0, 7.0, 4.0, -6.0, 1.0], [-3.0, -2.0, 5.0, 
+-3.0, 5.0], [7.0, -5.0, 7.0, -1.0, 6.0], [6.0, 6.0, -6.0, -1.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[14.0, -49.0, -28.0, 42.0, -7.0], [21.0, 14.0, -35.0, 21.0, -35.0], 
+[-49.0, 35.0, -49.0, 7.0, -42.0], [-42.0, -42.0, 42.0, 7.0, -28.0]], [[2.0, -7.0, -4.0, 6.0, -1.0], [3.0, 2.0, -5.0, 3.0, 
+-5.0], [-7.0, 5.0, -7.0, 1.0, -6.0], [-6.0, -6.0, 6.0, 1.0, -4.0]], [[4.0, -14.0, -8.0, 12.0, -2.0], [6.0, 4.0, -10.0, 6.0, 
+-10.0], [-14.0, 10.0, -14.0, 2.0, -12.0], [-12.0, -12.0, 12.0, 2.0, -8.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank3_offset3(self):
-      arg0=Data(numpy.array([[[-6.0, 6.0, -6.0], [-5.0, 2.0, -2.0], [-5.0, -6.0, 0.0], [-5.0, -4.0, 5.0]], [[-3.0, -2.0, -5.0], 
-[-2.0, -4.0, 3.0], [-1.0, -5.0, 4.0], [-1.0, -2.0, 1.0]]]),self.functionspace)
-      arg1=numpy.array([[[-7.0, 3.0, -6.0], [4.0, -3.0, -7.0], [3.0, -4.0, -4.0], [5.0, 1.0, 7.0]], [[-2.0, -7.0, 1.0], [3.0, 
-3.0, -3.0], [6.0, 0.0, -6.0], [4.0, 0.0, 0.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(53.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[7.0, -7.0, -7.0, -1.0, 2.0], [-7.0, -3.0, 0.0, 0.0, -5.0], [0.0, -4.0, -4.0, 1.0, -6.0], [-5.0, 
+7.0, -4.0, -1.0, -2.0]], [[-3.0, 6.0, 5.0, 5.0, 2.0], [5.0, 5.0, 5.0, -2.0, 3.0], [6.0, 6.0, 1.0, 5.0, 0.0], [-6.0, -1.0, 0.0, 
+1.0, 1.0]], [[3.0, -5.0, 3.0, 6.0, -7.0], [6.0, 6.0, -7.0, 5.0, -4.0], [5.0, 0.0, -2.0, 5.0, -7.0], [0.0, 0.0, -2.0, -7.0, 
+-7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, 2.0, 4.0, 4.0, -1.0], [-6.0, -6.0, 4.0, 1.0, 3.0], [-2.0, 0.0, -2.0, -7.0, 
+2.0], [1.0, 4.0, 0.0, -4.0, -1.0]], [[-4.0, 5.0, -2.0, 2.0, 0.0], [1.0, 4.0, 2.0, 6.0, 1.0], [7.0, -3.0, 2.0, 3.0, 7.0], [-2.0, 
+5.0, -3.0, -6.0, -7.0]], [[3.0, -6.0, 7.0, 0.0, 4.0], [-7.0, 6.0, 6.0, -5.0, 0.0], [0.0, -5.0, -4.0, -6.0, 3.0], [0.0, 1.0, 
+0.0, -4.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[5.0, 3.0, 2.0, 4.0, -6.0], [2.0, 3.0, 6.0, 0.0, -6.0], [3.0, -4.0, 7.0, 4.0, 2.0], [-3.0, -6.0, 
+2.0, -6.0, 2.0]], [[7.0, 0.0, 5.0, 3.0, -6.0], [5.0, -5.0, -2.0, -2.0, 6.0], [6.0, 5.0, 0.0, 1.0, -1.0], [-7.0, 5.0, -2.0, 4.0, 
+2.0]], [[7.0, 0.0, -7.0, 6.0, 3.0], [1.0, -6.0, -7.0, 2.0, 4.0], [-2.0, 0.0, 5.0, -3.0, -1.0], [-5.0, 0.0, 7.0, -6.0, 
+3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, 4.0, 2.0, 0.0, 5.0], [-5.0, 6.0, -7.0, -6.0, 6.0], [1.0, 7.0, -6.0, 1.0, 3.0], 
+[4.0, -3.0, 7.0, -3.0, -3.0]], [[7.0, -5.0, 0.0, -3.0, -1.0], [1.0, -7.0, -6.0, 2.0, -2.0], [-4.0, 5.0, 5.0, 0.0, 5.0], [6.0, 
+2.0, -1.0, -5.0, 3.0]], [[-6.0, 1.0, -7.0, 2.0, -7.0], [3.0, 6.0, 4.0, -1.0, -4.0], [1.0, 0.0, 5.0, 2.0, 0.0], [-7.0, -6.0, 
+-6.0, 0.0, 0.0]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[35.0, 21.0, -22.0, 37.0, -15.0], [2.0, 18.0, 27.0, 12.0, -48.0], [-3.0, -43.0, 64.0, 16.0, 
+14.0], [-15.0, -57.0, 41.0, -72.0, 17.0]], [[-28.0, -21.0, 51.0, -40.0, -9.0], [11.0, -21.0, -19.0, -22.0, 58.0], [25.0, 58.0, 
+-74.0, -7.0, -15.0], [4.0, 72.0, -61.0, 96.0, -17.0]], [[21.0, -21.0, -10.0, 5.0, 21.0], [14.0, -64.0, -73.0, -4.0, 84.0], 
+[3.0, 53.0, -34.0, -32.0, -22.0], [-29.0, 67.0, -3.0, 44.0, 5.0]], [[72.0, -3.0, -19.0, 47.0, -6.0], [29.0, -64.0, -58.0, 2.0, 
+60.0], [15.0, 29.0, 23.0, -17.0, -13.0], [-62.0, 31.0, 30.0, -10.0, 26.0]], [[-25.0, 6.0, 63.0, -28.0, -45.0], [7.0, 38.0, 
+57.0, -18.0, -28.0], [32.0, 2.0, -21.0, 31.0, 9.0], [15.0, -2.0, -49.0, 38.0, -13.0]]], [[[42.0, -21.0, -31.0, 23.0, 30.0], 
+[17.0, -82.0, -94.0, 2.0, 96.0], [-3.0, 53.0, -19.0, -41.0, -25.0], [-44.0, 67.0, 18.0, 26.0, 14.0]], [[62.0, -9.0, -23.0, 
+39.0, 6.0], [25.0, -70.0, -70.0, 2.0, 72.0], [9.0, 37.0, 9.0, -25.0, -17.0], [-56.0, 43.0, 26.0, 2.0, 22.0]], [[-14.0, 0.0, 
+74.0, -27.0, -51.0], [18.0, 17.0, 39.0, -24.0, 2.0], [44.0, 25.0, -35.0, 26.0, 2.0], [0.0, 25.0, -59.0, 62.0, -11.0]], [[21.0, 
+0.0, -45.0, 24.0, 27.0], [-5.0, -20.0, -31.0, 14.0, 8.0], [-22.0, -10.0, 25.0, -17.0, -3.0], [-11.0, -10.0, 39.0, -38.0, 
+11.0]], [[-32.0, -15.0, 33.0, -35.0, 0.0], [1.0, -6.0, -8.0, -14.0, 32.0], [11.0, 35.0, -55.0, -5.0, -9.0], [14.0, 45.0, -44.0, 
+66.0, -16.0]]], [[[77.0, 0.0, -5.0, 48.0, -21.0], [35.0, -60.0, -47.0, -2.0, 56.0], [26.0, 30.0, 25.0, -9.0, -11.0], [-67.0, 
+30.0, 23.0, -6.0, 27.0]], [[22.0, -12.0, 22.0, 2.0, -12.0], [22.0, -42.0, -36.0, -12.0, 60.0], [24.0, 46.0, -28.0, -10.0, 
+-14.0], [-30.0, 54.0, -20.0, 48.0, 4.0]], [[-27.0, -12.0, 11.0, -25.0, 12.0], [-5.0, -5.0, -12.0, -6.0, 22.0], [-2.0, 21.0, 
+-38.0, -9.0, -7.0], [15.0, 29.0, -24.0, 40.0, -12.0]], [[75.0, 3.0, -8.0, 49.0, -21.0], [32.0, -52.0, -39.0, 0.0, 44.0], [23.0, 
+21.0, 32.0, -6.0, -8.0], [-63.0, 19.0, 27.0, -16.0, 27.0]], [[-79.0, -18.0, 37.0, -66.0, 15.0], [-19.0, 24.0, 13.0, -14.0, 
+8.0], [-4.0, 24.0, -77.0, -3.0, -5.0], [53.0, 36.0, -61.0, 78.0, -33.0]]], [[[-67.0, -15.0, -40.0, -38.0, 66.0], [-40.0, 15.0, 
+-18.0, 12.0, -6.0], [-51.0, -10.0, -35.0, -26.0, -4.0], [57.0, 0.0, 2.0, 6.0, -22.0]], [[28.0, 21.0, 9.0, 25.0, -36.0], [9.0, 
+26.0, 44.0, 2.0, -48.0], [15.0, -33.0, 49.0, 27.0, 15.0], [-14.0, -47.0, 16.0, -46.0, 12.0]], [[-34.0, -12.0, 6.0, -28.0, 
+18.0], [-10.0, 0.0, -10.0, -4.0, 16.0], [-8.0, 16.0, -38.0, -10.0, -6.0], [22.0, 24.0, -22.0, 36.0, -14.0]], [[-47.0, -3.0, 
+52.0, -43.0, -21.0], [-4.0, 34.0, 41.0, -16.0, -16.0], [17.0, 9.0, -42.0, 18.0, 4.0], [31.0, 11.0, -53.0, 52.0, -21.0]], 
+[[-52.0, -6.0, 50.0, -47.0, -15.0], [-6.0, 31.0, 35.0, -16.0, -10.0], [14.0, 13.0, -49.0, 14.0, 2.0], [34.0, 17.0, -55.0, 58.0, 
+-23.0]]]])+(1.-msk_ref)*numpy.array([[[[-34.0, 35.0, -15.0, 18.0, -2.0], [-10.0, 64.0, 15.0, -29.0, 14.0], [22.0, 1.0, -23.0, 
+9.0, -11.0], [-33.0, -35.0, 7.0, 11.0, -21.0]], [[79.0, -23.0, 46.0, -27.0, 47.0], [-23.0, -59.0, -68.0, 4.0, 26.0], [-24.0, 
+39.0, -17.0, -10.0, 31.0], [80.0, 40.0, 45.0, -31.0, 9.0]], [[-40.0, 33.0, -41.0, 20.0, -27.0], [-1.0, 80.0, 12.0, -35.0, 0.0], 
+[19.0, 18.0, 1.0, 18.0, 2.0], [-45.0, -58.0, -12.0, -2.0, -18.0]], [[30.0, 6.0, 8.0, -6.0, 18.0], [-18.0, 10.0, -40.0, -20.0, 
+20.0], [-4.0, 38.0, -14.0, 4.0, 22.0], [28.0, -8.0, 26.0, -22.0, -6.0]], [[-28.0, 0.0, -30.0, 8.0, -33.0], [17.0, 18.0, 23.0, 
+2.0, -22.0], [3.0, -7.0, 26.0, 7.0, -3.0], [-32.0, -21.0, -31.0, 3.0, 3.0]]], [[[25.0, -36.0, 37.0, -17.0, 18.0], [10.0, -85.0, 
+8.0, 45.0, -10.0], [-17.0, -37.0, 6.0, -20.0, -13.0], [31.0, 62.0, -1.0, 13.0, 21.0]], [[-32.0, -38.0, -54.0, 0.0, -76.0], 
+[52.0, -28.0, 42.0, 38.0, -68.0], [-16.0, -22.0, 86.0, 6.0, 2.0], [-42.0, -10.0, -82.0, -2.0, 30.0]], [[-6.0, 12.0, -34.0, 6.0, 
+-24.0], [0.0, 46.0, -16.0, -26.0, -4.0], [2.0, 38.0, 16.0, 16.0, 22.0], [-14.0, -44.0, -10.0, -22.0, -6.0]], [[76.0, -31.0, 
+37.0, -28.0, 34.0], [-14.0, -66.0, -63.0, 11.0, 14.0], [-28.0, 37.0, -1.0, -9.0, 33.0], [75.0, 39.0, 31.0, -33.0, 15.0]], 
+[[19.0, 7.0, 6.0, -3.0, 14.0], [-14.0, 11.0, -27.0, -16.0, 16.0], [-1.0, 26.0, -13.0, 3.0, 14.0], [18.0, -7.0, 20.0, -14.0, 
+-6.0]]], [[[41.0, -43.0, -4.0, -21.0, -17.0], [17.0, -61.0, -28.0, 26.0, -26.0], [-30.0, 21.0, 47.0, -2.0, 29.0], [34.0, 20.0, 
+-21.0, -29.0, 27.0]], [[9.0, 10.0, 35.0, -1.0, 38.0], [-18.0, -9.0, -2.0, -1.0, 26.0], [7.0, -15.0, -40.0, -10.0, -15.0], 
+[17.0, 24.0, 33.0, 15.0, -9.0]], [[30.0, -22.0, 24.0, -14.0, 16.0], [0.0, -50.0, -14.0, 20.0, 0.0], [-14.0, -4.0, 2.0, -10.0, 
+4.0], [32.0, 34.0, 8.0, -4.0, 12.0]], [[29.0, -49.0, 28.0, -21.0, 4.0], [20.0, -99.0, 7.0, 54.0, -24.0], [-25.0, -34.0, 27.0, 
+-19.0, -6.0], [32.0, 63.0, -16.0, 6.0, 30.0]], [[39.0, -24.0, -17.0, -15.0, -18.0], [6.0, -19.0, -44.0, -1.0, -14.0], [-23.0, 
+49.0, 38.0, 8.0, 41.0], [29.0, -10.0, -11.0, -41.0, 15.0]]], [[[-10.0, 14.0, 2.0, 6.0, 7.0], [-7.0, 20.0, 5.0, -10.0, 10.0], 
+[9.0, -3.0, -16.0, 1.0, -7.0], [-8.0, -7.0, 9.0, 7.0, -9.0]], [[45.0, -8.0, 1.0, -13.0, 8.0], [-12.0, -5.0, -54.0, -15.0, 
+10.0], [-15.0, 53.0, 6.0, 6.0, 37.0], [39.0, -8.0, 17.0, -37.0, 3.0]], [[-21.0, 15.0, 0.0, 9.0, 3.0], [-3.0, 21.0, 18.0, -6.0, 
+6.0], [12.0, -15.0, -15.0, 0.0, -15.0], [-18.0, -6.0, 3.0, 15.0, -9.0]], [[-34.0, 10.0, 20.0, 10.0, 14.0], [2.0, -6.0, 48.0, 
+16.0, 4.0], [16.0, -58.0, -26.0, -12.0, -42.0], [-24.0, 24.0, 2.0, 42.0, -6.0]], [[-53.0, 31.0, -2.0, 21.0, 2.0], [-2.0, 43.0, 
+49.0, -8.0, 8.0], [27.0, -42.0, -29.0, -1.0, -38.0], [-46.0, -11.0, 0.0, 38.0, -18.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[-5.0, -4.0], [3.0, -1.0], [-7.0, 3.0]], [[7.0, 6.0], [3.0, 0.0], [2.0, -4.0]]], [[[-1.0, 6.0], 
-[0.0, 3.0], [-3.0, -2.0]], [[1.0, 6.0], [-7.0, -4.0], [-2.0, -5.0]]], [[[5.0, -4.0], [-1.0, -4.0], [-7.0, 7.0]], [[-5.0, -3.0], 
-[2.0, 4.0], [-6.0, -5.0]]], [[[6.0, 4.0], [-5.0, 4.0], [2.0, 3.0]], [[5.0, -2.0], [2.0, -2.0], [-5.0, 
-5.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[1.0, 5.0], [4.0, -3.0], [7.0, -1.0]], [[-7.0, -2.0], [-2.0, 2.0], [6.0, 1.0]]], [[[-6.0, 3.0], 
-[-7.0, 3.0], [5.0, 0.0]], [[2.0, 5.0], [-6.0, 4.0], [3.0, 5.0]]], [[[3.0, 0.0], [6.0, 0.0], [-2.0, -5.0]], [[1.0, 7.0], [-3.0, 
-7.0], [1.0, -5.0]]], [[[4.0, -3.0], [2.0, -4.0], [-6.0, 0.0]], [[-2.0, -7.0], [7.0, 3.0], [-5.0, 7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      ref=Data(-27.0,self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[6.0, 4.0, 0.0, 2.0, 2.0], [5.0, -6.0, -6.0, 2.0, 7.0], [6.0, 0.0, 2.0, 0.0, -7.0], [3.0, 4.0, 
+6.0, 2.0, -3.0]], [[0.0, 1.0, -3.0, 0.0, 0.0], [-2.0, -3.0, 4.0, 2.0, -2.0], [6.0, -7.0, 0.0, 5.0, -3.0], [-3.0, 4.0, 3.0, 3.0, 
+-5.0]], [[-6.0, 7.0, 0.0, -3.0, 7.0], [-6.0, 3.0, -2.0, -1.0, 0.0], [6.0, 5.0, 6.0, -3.0, -6.0], [-4.0, -1.0, 3.0, 2.0, 
+-4.0]]], [[[4.0, 3.0, -7.0, 7.0, 3.0], [6.0, 0.0, -6.0, 5.0, 5.0], [7.0, -2.0, 0.0, -7.0, -5.0], [3.0, 2.0, -1.0, -6.0, 1.0]], 
+[[-3.0, 0.0, -2.0, -3.0, 7.0], [-5.0, 5.0, 2.0, 3.0, 1.0], [-2.0, -5.0, 3.0, 7.0, -7.0], [0.0, -7.0, -1.0, -2.0, 2.0]], [[0.0, 
+7.0, 0.0, -7.0, -3.0], [-4.0, 6.0, -6.0, -7.0, 0.0], [-3.0, 0.0, 4.0, -4.0, 1.0], [7.0, 5.0, -5.0, 0.0, 
+3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 0.0, -6.0, 2.0, -1.0], [-2.0, -3.0, -2.0, 0.0, 6.0], [2.0, 1.0, 7.0, -5.0, 
+0.0], [-7.0, 0.0, 1.0, 0.0, -2.0]], [[5.0, -3.0, 5.0, -4.0, -3.0], [-7.0, 3.0, 5.0, -2.0, -3.0], [-1.0, -7.0, 4.0, -1.0, 7.0], 
+[6.0, 1.0, 0.0, 5.0, 6.0]], [[0.0, 0.0, -1.0, 1.0, 4.0], [1.0, -3.0, 3.0, 0.0, 4.0], [6.0, 5.0, -4.0, -2.0, -4.0], [-4.0, -3.0, 
+7.0, -5.0, -7.0]]], [[[3.0, 0.0, 0.0, 4.0, 3.0], [7.0, 0.0, 6.0, 4.0, 2.0], [6.0, -4.0, -7.0, -3.0, -5.0], [-4.0, -1.0, -3.0, 
+1.0, 2.0]], [[-4.0, 0.0, -2.0, -1.0, 2.0], [5.0, 0.0, 7.0, 0.0, -6.0], [5.0, 0.0, -2.0, -5.0, 0.0], [4.0, 7.0, 4.0, 0.0, 
+-1.0]], [[4.0, -2.0, -7.0, 3.0, 1.0], [0.0, 4.0, 0.0, -4.0, -6.0], [0.0, 7.0, -4.0, 5.0, -5.0], [5.0, -1.0, -5.0, 2.0, 3.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-1.0, -5.0, 3.0, 6.0, -6.0], [-7.0, -1.0, -5.0, -5.0, 0.0], [-5.0, 4.0, 2.0, -1.0, 4.0], [3.0, 
+-3.0, 3.0, 0.0, 7.0]], [[-2.0, 0.0, -7.0, -6.0, 1.0], [2.0, -7.0, 2.0, 1.0, -5.0], [6.0, -3.0, -6.0, 2.0, -5.0], [-7.0, 5.0, 
+0.0, -5.0, 0.0]], [[-4.0, 4.0, -4.0, -1.0, 7.0], [0.0, 1.0, 2.0, -3.0, 2.0], [-2.0, -5.0, -2.0, -7.0, 6.0], [-4.0, 3.0, 0.0, 
+5.0, -5.0]]], [[[-4.0, -3.0, 5.0, -2.0, -6.0], [0.0, 6.0, 0.0, -2.0, -3.0], [-5.0, 2.0, -2.0, 5.0, 7.0], [5.0, 1.0, -3.0, 4.0, 
+1.0]], [[1.0, 6.0, -1.0, -7.0, -4.0], [0.0, 5.0, 1.0, 2.0, 6.0], [-6.0, 0.0, 1.0, 5.0, -4.0], [-4.0, -4.0, 7.0, 6.0, -5.0]], 
+[[-5.0, 0.0, 6.0, -5.0, -3.0], [2.0, -3.0, 1.0, 4.0, 0.0], [2.0, 0.0, 7.0, -2.0, -7.0], [7.0, 2.0, 4.0, 3.0, 
+6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-7.0, -4.0, 0.0, -2.0, -4.0], [-6.0, 5.0, 7.0, 0.0, 7.0], [5.0, -1.0, -2.0, 6.0, 
+7.0], [-2.0, 3.0, 5.0, 3.0, -3.0]], [[4.0, 1.0, -2.0, -5.0, 5.0], [-4.0, -3.0, 0.0, -5.0, -4.0], [7.0, -6.0, 7.0, -3.0, 2.0], 
+[2.0, 4.0, 7.0, -3.0, -6.0]], [[3.0, 7.0, 0.0, 5.0, 1.0], [-5.0, -5.0, -6.0, -2.0, -3.0], [1.0, 5.0, 0.0, 6.0, 3.0], [-6.0, 
+0.0, 6.0, 6.0, -1.0]]], [[[-2.0, 7.0, -6.0, 1.0, -6.0], [-2.0, 7.0, 4.0, 0.0, 0.0], [-7.0, 3.0, 0.0, -7.0, 5.0], [6.0, 5.0, 
+2.0, 7.0, 3.0]], [[3.0, -7.0, 0.0, 2.0, 3.0], [7.0, -1.0, 3.0, 0.0, 0.0], [-1.0, 2.0, -6.0, -4.0, 7.0], [-2.0, -7.0, -3.0, 
+-3.0, 5.0]], [[-3.0, -7.0, -7.0, 3.0, -4.0], [-5.0, -4.0, 5.0, 1.0, 4.0], [0.0, -5.0, 0.0, -1.0, 0.0], [-4.0, 2.0, 1.0, 6.0, 
+-6.0]]]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-1.0, -84.0, 65.0, 55.0, -90.0], [-42.0, -3.0, -45.0, -26.0, -42.0], [-20.0, 62.0, 13.0, 
+41.0, 28.0], [74.0, -20.0, -15.0, -32.0, 91.0]], [[-81.0, -1.0, 34.0, -30.0, -13.0], [-12.0, -7.0, 3.0, -18.0, 0.0], [-29.0, 
+-16.0, 31.0, -50.0, 25.0], [41.0, 31.0, 31.0, 63.0, 38.0]], [[32.0, 9.0, -12.0, 46.0, 47.0], [-6.0, -31.0, -8.0, 7.0, 24.0], 
+[29.0, -5.0, 30.0, -51.0, -26.0], [-6.0, -14.0, 7.0, -25.0, 3.0]], [[14.0, -61.0, 14.0, 57.0, -42.0], [-28.0, 43.0, -26.0, 
+-49.0, -45.0], [-35.0, 37.0, -56.0, 53.0, 100.0], [16.0, -10.0, -64.0, -26.0, 9.0]], [[-20.0, 51.0, -32.0, -35.0, 0.0], [-20.0, 
+67.0, 8.0, -35.0, 47.0], [-87.0, -21.0, -30.0, 5.0, 64.0], [-56.0, -16.0, 34.0, 80.0, -71.0]]], [[[14.0, -97.0, 64.0, 91.0, 
+-78.0], [-47.0, 26.0, -50.0, -47.0, -50.0], [-33.0, 68.0, -11.0, 46.0, 84.0], [75.0, -25.0, -54.0, -38.0, 72.0]], [[-25.0, 
+72.0, 22.0, -86.0, 16.0], [48.0, 37.0, 41.0, 52.0, 51.0], [-12.0, -30.0, 47.0, -8.0, -53.0], [13.0, 4.0, 41.0, 78.0, -46.0]], 
+[[62.0, 52.0, -106.0, -30.0, 72.0], [38.0, -32.0, 30.0, 32.0, 6.0], [64.0, -38.0, -60.0, 20.0, -64.0], [-118.0, 6.0, -10.0, 
+-60.0, -84.0]], [[16.0, -11.0, -24.0, 5.0, -38.0], [-24.0, 49.0, -12.0, -37.0, -9.0], [-53.0, 17.0, -62.0, 63.0, 64.0], [-40.0, 
+-20.0, -16.0, 2.0, -33.0]], [[-22.0, -44.0, 59.0, 37.0, -78.0], [-53.0, 42.0, -38.0, -45.0, 1.0], [-78.0, 44.0, 17.0, 19.0, 
+69.0], [56.0, -30.0, 13.0, 36.0, 49.0]]], [[[-57.0, -39.0, -29.0, 9.0, -13.0], [-36.0, -1.0, -11.0, -72.0, -51.0], [-35.0, 
+-10.0, -73.0, -5.0, 108.0], [-26.0, 39.0, -29.0, 7.0, 11.0]], [[-3.0, -4.0, 24.0, 76.0, 60.0], [-14.0, 17.0, -9.0, -28.0, 
+21.0], [-12.0, -8.0, 31.0, -84.0, 71.0], [39.0, -2.0, -29.0, 22.0, -2.0]], [[-43.0, 32.0, 3.0, -35.0, 6.0], [-6.0, 7.0, 9.0, 
+-6.0, 30.0], [-32.0, -22.0, 23.0, -37.0, 4.0], [-2.0, 8.0, 43.0, 60.0, -7.0]], [[57.0, 51.0, -89.0, -42.0, 10.0], [2.0, -33.0, 
+7.0, 26.0, 32.0], [21.0, -14.0, -31.0, 39.0, -92.0], [-114.0, -27.0, 54.0, -38.0, -51.0]], [[45.0, -16.0, 12.0, 36.0, 52.0], 
+[45.0, -46.0, 11.0, 50.0, -24.0], [98.0, 1.0, 26.0, -19.0, -63.0], [34.0, 13.0, -51.0, -74.0, 17.0]]], [[[-28.0, -40.0, 103.0, 
+-1.0, -88.0], [-13.0, 11.0, -22.0, 16.0, -2.0], [-26.0, 47.0, 75.0, 20.0, -25.0], [110.0, -19.0, 28.0, 28.0, 86.0]], [[-48.0, 
+-72.0, 35.0, 21.0, -26.0], [-10.0, -71.0, -16.0, -11.0, -70.0], [48.0, 13.0, 10.0, -24.0, -3.0], [61.0, 45.0, -23.0, -44.0, 
+100.0]], [[4.0, -21.0, -49.0, 49.0, 13.0], [-46.0, -20.0, -24.0, -56.0, -12.0], [-17.0, -2.0, -46.0, -21.0, 59.0], [-51.0, 
+-1.0, -6.0, -25.0, 1.0]], [[6.0, 4.0, -51.0, 18.0, 49.0], [-8.0, -67.0, -2.0, -5.0, -5.0], [46.0, -23.0, -8.0, -50.0, -29.0], 
+[-45.0, 17.0, 10.0, -41.0, 8.0]], [[12.0, 8.0, 63.0, -15.0, -38.0], [17.0, 41.0, 2.0, 36.0, 26.0], [-18.0, 25.0, 53.0, 30.0, 
+-33.0], [60.0, -29.0, 14.0, 30.0, 8.0]]]])+(1.-msk_ref)*numpy.array([[[[-24.0, 18.0, -56.0, -22.0, -29.0], [-86.0, 4.0, 34.0, 
+-21.0, 10.0], [28.0, -51.0, 55.0, -12.0, 11.0], [16.0, 77.0, 67.0, 48.0, -71.0]], [[-6.0, 11.0, 20.0, 9.0, -7.0], [22.0, 17.0, 
+-10.0, 13.0, 4.0], [-21.0, 28.0, -21.0, 11.0, -6.0], [2.0, -16.0, -23.0, -3.0, 30.0]], [[74.0, 85.0, 39.0, -43.0, 70.0], [42.0, 
+-10.0, -77.0, -30.0, -87.0], [6.0, 2.0, 59.0, -42.0, -49.0], [60.0, 2.0, -2.0, -75.0, 21.0]], [[-47.0, 9.0, -37.0, 32.0, 
+-66.0], [-31.0, 34.0, 36.0, 21.0, 39.0], [-44.0, 22.0, -26.0, 3.0, 22.0], [-4.0, 23.0, 2.0, 73.0, 6.0]], [[4.0, 29.0, -19.0, 
+47.0, -23.0], [1.0, -1.0, -8.0, 8.0, -3.0], [-45.0, 47.0, -31.0, -3.0, 28.0], [-18.0, -12.0, -1.0, 51.0, 30.0]]], [[[-10.0, 
+22.0, -28.0, 61.0, -53.0], [56.0, 50.0, 23.0, 33.0, 11.0], [-112.0, 80.0, -75.0, -54.0, 45.0], [16.0, -34.0, -54.0, 55.0, 
+93.0]], [[12.0, -34.0, -34.0, -12.0, 8.0], [1.0, -25.0, 17.0, -5.0, -8.0], [3.0, -50.0, 27.0, -49.0, -24.0], [14.0, 11.0, -8.0, 
+-12.0, -30.0]], [[52.0, 27.0, -46.0, 14.0, 21.0], [14.0, -5.0, 13.0, -31.0, -43.0], [-21.0, 19.0, -3.0, -79.0, 84.0], [18.0, 
+-5.0, 34.0, 18.0, 26.0]], [[-4.0, 54.0, 8.0, 2.0, -18.0], [20.0, 50.0, -4.0, 6.0, -8.0], [-42.0, 44.0, -14.0, -18.0, 16.0], 
+[36.0, 4.0, -10.0, 10.0, 48.0]], [[-46.0, 99.0, 36.0, -5.0, -41.0], [-60.0, 63.0, -22.0, 1.0, 18.0], [5.0, 56.0, 3.0, 85.0, 
+16.0], [6.0, 46.0, 49.0, 47.0, 8.0]]], [[[3.0, 40.0, -34.0, 47.0, -28.0], [-15.0, 20.0, 17.0, -7.0, 0.0], [-38.0, 62.0, -41.0, 
+-11.0, 95.0], [-16.0, -3.0, 36.0, 72.0, 37.0]], [[-33.0, -53.0, -11.0, 75.0, -38.0], [-30.0, -55.0, -4.0, 32.0, 48.0], [-11.0, 
+19.0, -51.0, 78.0, -12.0], [-98.0, -31.0, -15.0, 68.0, -20.0]], [[-25.0, -59.0, 62.0, -77.0, 40.0], [-18.0, 12.0, 19.0, -16.0, 
+29.0], [110.0, -56.0, 26.0, 67.0, -4.0], [-4.0, 8.0, 27.0, -82.0, -48.0]], [[1.0, -16.0, -15.0, 7.0, -4.0], [-10.0, -48.0, 
+-25.0, 14.0, -5.0], [-8.0, -43.0, 33.0, -3.0, -93.0], [-8.0, 11.0, -30.0, 0.0, -41.0]], [[41.0, -21.0, 51.0, -75.0, 81.0], 
+[27.0, -16.0, -21.0, -32.0, -36.0], [80.0, -52.0, 49.0, -5.0, -23.0], [28.0, -7.0, 10.0, -110.0, -23.0]]], [[[66.0, -85.0, 
+-23.0, -17.0, 70.0], [49.0, -85.0, -4.0, -17.0, -41.0], [27.0, -78.0, 32.0, -77.0, -41.0], [-2.0, -35.0, -32.0, -73.0, -33.0]], 
+[[21.0, -69.0, 11.0, -10.0, 33.0], [67.0, 2.0, 30.0, 0.0, 1.0], [4.0, -5.0, -35.0, -41.0, 37.0], [4.0, -52.0, -35.0, -55.0, 
+35.0]], [[47.0, 31.0, 53.0, 23.0, 53.0], [18.0, -35.0, -60.0, -19.0, -34.0], [29.0, 58.0, -26.0, 58.0, 41.0], [-50.0, -50.0, 
+24.0, -18.0, 31.0]], [[-3.0, -37.0, -30.0, -43.0, 6.0], [-7.0, 9.0, 44.0, -13.0, 3.0], [23.0, -62.0, 35.0, -54.0, 0.0], [38.0, 
+29.0, 9.0, -26.0, -34.0]], [[1.0, -35.0, -45.0, -52.0, 4.0], [-3.0, 10.0, 48.0, -13.0, -5.0], [12.0, -80.0, 52.0, -85.0, 
+-20.0], [60.0, 41.0, 0.0, -31.0, -40.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_array_rank1_offset0(self):
-      arg0=Data(4.0,self.functionspace)
-      arg1=numpy.array([7.0, 1.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([28.0, 4.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-6.0, 7.0], [0.0, -6.0]], [[1.0, -5.0], [6.0, -5.0]], [[2.0, -1.0], [0.0, 0.0]], [[5.0, -6.0], 
+[7.0, 7.0]], [[-4.0, 3.0], [7.0, 0.0]], [[5.0, 4.0], [5.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 0.0], [-7.0, 3.0]], [[-2.0, 4.0], [2.0, -7.0]], [[-7.0, 2.0], [-3.0, 4.0]], 
+[[-6.0, 6.0], [5.0, -2.0]], [[1.0, -4.0], [-2.0, 1.0]], [[5.0, -3.0], [6.0, -1.0]]]))
+      arg0.expand()
+      arg1=Data(-4.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[24.0, -28.0], [-0.0, 24.0]], [[-4.0, 20.0], [-24.0, 20.0]], [[-8.0, 4.0], [-0.0, -0.0]], 
+[[-20.0, 24.0], [-28.0, -28.0]], [[16.0, -12.0], [-28.0, -0.0]], [[-20.0, -16.0], [-20.0, 
+28.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [-35.0, 15.0]], [[-10.0, 20.0], [10.0, -35.0]], [[-35.0, 10.0], [-15.0, 20.0]], 
+[[-30.0, 30.0], [25.0, -10.0]], [[5.0, -20.0], [-10.0, 5.0]], [[25.0, -15.0], [30.0, -5.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank2_offset1(self):
-      arg0=Data(numpy.array([-2.0, 3.0, 0.0]),self.functionspace)
-      arg1=numpy.array([[-7.0, -3.0, -2.0], [-2.0, -2.0, 4.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([5.0, -2.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-4.0, 2.0], [5.0, -6.0]], [[2.0, -4.0], [7.0, 5.0]], [[6.0, -1.0], [7.0, -1.0]], [[3.0, -7.0], 
+[-2.0, 0.0]], [[1.0, 7.0], [-6.0, -4.0]], [[7.0, 3.0], [1.0, -3.0]]], [[[-3.0, 1.0], [3.0, -1.0]], [[-3.0, 2.0], [-1.0, -1.0]], 
+[[-3.0, 3.0], [-3.0, 7.0]], [[7.0, -6.0], [-1.0, -2.0]], [[2.0, 3.0], [-2.0, 5.0]], [[6.0, 7.0], [1.0, -5.0]]], [[[7.0, 5.0], 
+[-7.0, 2.0]], [[-2.0, -7.0], [5.0, 6.0]], [[3.0, 0.0], [7.0, -3.0]], [[-6.0, -6.0], [-3.0, 0.0]], [[-5.0, -2.0], [5.0, 1.0]], 
+[[-4.0, 4.0], [0.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, -4.0], [6.0, 0.0]], [[1.0, 6.0], [-5.0, 1.0]], [[-3.0, 7.0], [-1.0, 3.0]], 
+[[-1.0, 0.0], [7.0, -6.0]], [[2.0, -6.0], [-4.0, -7.0]], [[1.0, 4.0], [0.0, 0.0]]], [[[4.0, 5.0], [-2.0, 0.0]], [[-2.0, -5.0], 
+[6.0, -5.0]], [[3.0, 0.0], [-7.0, 3.0]], [[3.0, 4.0], [-7.0, 3.0]], [[0.0, -4.0], [-2.0, 3.0]], [[0.0, -6.0], [-1.0, 6.0]]], 
+[[[4.0, -1.0], [-6.0, -6.0]], [[0.0, -6.0], [5.0, -5.0]], [[-2.0, -5.0], [-1.0, -4.0]], [[-6.0, -7.0], [3.0, 5.0]], [[5.0, 
+-6.0], [4.0, 5.0]], [[-1.0, 5.0], [-3.0, -4.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([2.0, 0.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 1.0, -1.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-57.0, -31.0], [59.0, -26.0]], [[18.0, 41.0], [-21.0, -32.0]], [[-9.0, -2.0], [-35.0, 19.0]], 
+[[48.0, 28.0], [17.0, 0.0]], [[37.0, 28.0], [-47.0, -15.0]], [[42.0, -22.0], [2.0, -55.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, 
+-6.0], [22.0, 6.0]], [[1.0, 19.0], [-14.0, 3.0]], [[-4.0, 26.0], [-9.0, 16.0]], [[6.0, 11.0], [11.0, -20.0]], [[1.0, -16.0], 
+[-18.0, -23.0]], [[4.0, 1.0], [2.0, 10.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[-6.0, 0.0, -1.0], [1.0, -3.0, 5.0]]),self.functionspace)
-      arg1=numpy.array([[[-5.0, 2.0, 3.0], [0.0, 7.0, 4.0]], [[6.0, -4.0, 3.0], [0.0, 5.0, -5.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([26.0, -79.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-1.0, 0.0], [4.0, 1.0]], [[1.0, -1.0], [7.0, 3.0]], [[0.0, -1.0], [3.0, 4.0]], [[-4.0, -2.0], 
+[7.0, 1.0]], [[3.0, 0.0], [5.0, 4.0]], [[-3.0, -6.0], [-5.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 1.0], [0.0, 2.0]], [[-2.0, -5.0], [-7.0, -7.0]], [[-4.0, -1.0], [-5.0, 1.0]], 
+[[-7.0, -7.0], [-4.0, -2.0]], [[6.0, 4.0], [4.0, 0.0]], [[-6.0, 5.0], [5.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-3.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([4.0, 0.0]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[3.0, 1.0], [0.0, 0.0]], [[-12.0, -4.0], [-3.0, -1.0]]], [[[-3.0, -1.0], [3.0, 1.0]], [[-21.0, 
+-7.0], [-9.0, -3.0]]], [[[0.0, 0.0], [3.0, 1.0]], [[-9.0, -3.0], [-12.0, -4.0]]], [[[12.0, 4.0], [6.0, 2.0]], [[-21.0, -7.0], 
+[-3.0, -1.0]]], [[[-9.0, -3.0], [0.0, 0.0]], [[-15.0, -5.0], [-12.0, -4.0]]], [[[9.0, 3.0], [18.0, 6.0]], [[15.0, 5.0], [-15.0, 
+-5.0]]]])+(1.-msk_ref)*numpy.array([[[[16.0, 0.0], [4.0, 0.0]], [[0.0, 0.0], [8.0, 0.0]]], [[[-8.0, 0.0], [-20.0, 0.0]], 
+[[-28.0, 0.0], [-28.0, 0.0]]], [[[-16.0, 0.0], [-4.0, 0.0]], [[-20.0, 0.0], [4.0, 0.0]]], [[[-28.0, 0.0], [-28.0, 0.0]], 
+[[-16.0, 0.0], [-8.0, 0.0]]], [[[24.0, 0.0], [16.0, 0.0]], [[16.0, 0.0], [0.0, 0.0]]], [[[-24.0, 0.0], [20.0, 0.0]], [[20.0, 
+0.0], [0.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank4_offset3(self):
-      arg0=Data(numpy.array([[[-5.0, -3.0, -5.0], [-7.0, -6.0, 2.0], [-1.0, 5.0, 3.0], [6.0, -2.0, -3.0]], [[-5.0, 6.0, 2.0], 
-[-7.0, -6.0, -5.0], [-2.0, 5.0, -2.0], [-1.0, 5.0, 4.0]]]),self.functionspace)
-      arg1=numpy.array([[[[-4.0, 6.0, -3.0], [2.0, 3.0, -7.0], [-5.0, 3.0, -4.0], [-7.0, -2.0, 3.0]], [[-2.0, 7.0, 7.0], [4.0, 
--2.0, -5.0], [-2.0, 2.0, -5.0], [-1.0, 5.0, -5.0]]], [[[-4.0, -2.0, -4.0], [-4.0, -5.0, 6.0], [3.0, -6.0, -3.0], [4.0, -4.0, 
--5.0]], [[-2.0, 0.0, -6.0], [-6.0, -4.0, 0.0], [5.0, 0.0, -7.0], [1.0, -7.0, -5.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([37.0, 133.0]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[5.0, 4.0], [7.0, 0.0]], [[5.0, 0.0], [3.0, -5.0]], [[4.0, -1.0], [3.0, 7.0]], [[6.0, 2.0], 
+[0.0, 4.0]], [[1.0, -5.0], [-6.0, 3.0]], [[0.0, 2.0], [7.0, -5.0]]], [[[2.0, -7.0], [1.0, -3.0]], [[-7.0, -6.0], [7.0, -6.0]], 
+[[4.0, 5.0], [4.0, 0.0]], [[-7.0, 5.0], [4.0, -6.0]], [[-2.0, -5.0], [-2.0, 0.0]], [[1.0, -6.0], [-1.0, -2.0]]], [[[2.0, 4.0], 
+[-4.0, -6.0]], [[6.0, 5.0], [3.0, -3.0]], [[4.0, -1.0], [-4.0, 1.0]], [[2.0, 7.0], [2.0, 0.0]], [[0.0, -4.0], [-2.0, -5.0]], 
+[[0.0, 0.0], [2.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, -3.0], [1.0, -2.0]], [[5.0, -6.0], [2.0, -7.0]], [[-2.0, -7.0], [1.0, -5.0]], 
+[[1.0, 3.0], [6.0, 0.0]], [[-2.0, 3.0], [-3.0, 0.0]], [[4.0, -1.0], [-6.0, 7.0]]], [[[6.0, 4.0], [-4.0, -5.0]], [[-2.0, 6.0], 
+[-3.0, -2.0]], [[1.0, 4.0], [6.0, -6.0]], [[-2.0, 1.0], [-1.0, 1.0]], [[-6.0, 0.0], [4.0, -5.0]], [[0.0, -2.0], [7.0, -5.0]]], 
+[[[7.0, 5.0], [1.0, -3.0]], [[4.0, -5.0], [-3.0, 0.0]], [[2.0, 1.0], [-6.0, 7.0]], [[0.0, 0.0], [3.0, 4.0]], [[3.0, 6.0], [0.0, 
+-3.0]], [[-4.0, 0.0], [7.0, -3.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-3.0, 1.0], [-3.0, 4.0], [6.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -3.0], [5.0, 5.0], [-6.0, -4.0]]))
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-9.0, 21.0], [33.0, -8.0]], [[-48.0, -5.0], [-27.0, -36.0]]], [[[42.0, 1.0], [48.0, -4.0]], 
+[[-12.0, 43.0], [15.0, -41.0]]], [[[0.0, 36.0], [-18.0, 15.0]], [[-45.0, 3.0], [-15.0, 11.0]]], [[[15.0, -14.0], [21.0, 50.0]], 
+[[0.0, 24.0], [6.0, -20.0]]], [[[3.0, -7.0], [6.0, -41.0]], [[12.0, -22.0], [-39.0, -17.0]]], [[[-3.0, 4.0], [12.0, -22.0]], 
+[[-6.0, 11.0], [21.0, -13.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 2.0], [-1.0, 9.0]], [[-29.0, -27.0], [-1.0, -7.0]]], 
+[[[-49.0, -41.0], [78.0, 68.0]], [[-3.0, -9.0], [11.0, 11.0]]], [[[-1.0, 3.0], [35.0, 37.0]], [[63.0, 51.0], [-57.0, -43.0]]], 
+[[[-13.0, -13.0], [-4.0, -4.0]], [[-41.0, -35.0], [-19.0, -11.0]]], [[[-42.0, -36.0], [-45.0, -33.0]], [[29.0, 29.0], [-7.0, 
+-13.0]]], [[[12.0, 4.0], [-7.0, -7.0]], [[11.0, 25.0], [-28.0, -34.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_array_rank2_offset0(self):
-      arg0=Data(-2.0,self.functionspace)
-      arg1=numpy.array([[-2.0, 7.0, -3.0, -6.0, 4.0], [6.0, -7.0, 3.0, -4.0, -6.0], [0.0, -2.0, -2.0, -5.0, -4.0], [-5.0, -7.0, 
-0.0, 4.0, 0.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[4.0, -14.0, 6.0, 12.0, -8.0], [-12.0, 14.0, -6.0, 8.0, 12.0], [-0.0, 4.0, 4.0, 10.0, 8.0], [10.0, 
-14.0, -0.0, -8.0, -0.0]]),self.functionspace)
+   def test_generalTransposedTensorProduct_expandedData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[2.0, -6.0, 0.0, -7.0], [-3.0, 3.0, 3.0, 1.0], [5.0, 6.0, 0.0, 4.0]], [[-2.0, 1.0, -6.0, 7.0], 
+[-2.0, -3.0, -1.0, -5.0], [-4.0, 6.0, -6.0, -1.0]]], [[[-1.0, 6.0, -7.0, 2.0], [3.0, 5.0, 0.0, -7.0], [6.0, 3.0, 3.0, 7.0]], 
+[[-2.0, -2.0, 5.0, 3.0], [-3.0, 7.0, -5.0, 0.0], [6.0, 7.0, 3.0, 0.0]]], [[[1.0, 0.0, 1.0, -7.0], [0.0, 6.0, -4.0, -2.0], 
+[-4.0, 3.0, 7.0, 1.0]], [[7.0, -2.0, 4.0, -5.0], [7.0, -6.0, -6.0, -7.0], [0.0, 0.0, -2.0, 1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, 6.0, -4.0, -6.0], [4.0, 5.0, 6.0, -7.0], [0.0, -3.0, -7.0, -7.0]], [[-6.0, 
+5.0, 2.0, 6.0], [6.0, 0.0, 0.0, 5.0], [-6.0, -1.0, 0.0, 7.0]]], [[[2.0, -4.0, 6.0, 2.0], [7.0, -5.0, 3.0, -3.0], [-5.0, 4.0, 
+6.0, 1.0]], [[6.0, -5.0, 1.0, 0.0], [-3.0, 3.0, 4.0, 4.0], [7.0, 7.0, 1.0, 7.0]]], [[[1.0, -1.0, -7.0, 2.0], [-2.0, 5.0, -5.0, 
+0.0], [-3.0, -4.0, 6.0, 0.0]], [[2.0, -3.0, 0.0, -5.0], [0.0, -1.0, -7.0, 0.0], [-1.0, 0.0, 7.0, -2.0]]]]))
+      arg0.expand()
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,-6.0)
+      res=generalTransposedTensorProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-4.0, 12.0, -0.0, 14.0], [6.0, -6.0, -6.0, -2.0], [-10.0, -12.0, -0.0, -8.0]], [[4.0, -2.0, 
+12.0, -14.0], [4.0, 6.0, 2.0, 10.0], [8.0, -12.0, 12.0, 2.0]]], [[[2.0, -12.0, 14.0, -4.0], [-6.0, -10.0, -0.0, 14.0], [-12.0, 
+-6.0, -6.0, -14.0]], [[4.0, 4.0, -10.0, -6.0], [6.0, -14.0, 10.0, -0.0], [-12.0, -14.0, -6.0, -0.0]]], [[[-2.0, -0.0, -2.0, 
+14.0], [-0.0, -12.0, 8.0, 4.0], [8.0, -6.0, -14.0, -2.0]], [[-14.0, 4.0, -8.0, 10.0], [-14.0, 12.0, 12.0, 14.0], [-0.0, -0.0, 
+4.0, -2.0]]]])+(1.-msk_ref)*numpy.array([[[[18.0, -36.0, 24.0, 36.0], [-24.0, -30.0, -36.0, 42.0], [-0.0, 18.0, 42.0, 42.0]], 
+[[36.0, -30.0, -12.0, -36.0], [-36.0, -0.0, -0.0, -30.0], [36.0, 6.0, -0.0, -42.0]]], [[[-12.0, 24.0, -36.0, -12.0], [-42.0, 
+30.0, -18.0, 18.0], [30.0, -24.0, -36.0, -6.0]], [[-36.0, 30.0, -6.0, -0.0], [18.0, -18.0, -24.0, -24.0], [-42.0, -42.0, -6.0, 
+-42.0]]], [[[-6.0, 6.0, 42.0, -12.0], [12.0, -30.0, 30.0, -0.0], [18.0, 24.0, -36.0, -0.0]], [[-12.0, 18.0, -0.0, 30.0], [-0.0, 
+6.0, 42.0, -0.0], [6.0, -0.0, -42.0, 12.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+      
+  
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_array_rank2_taggedData_rank1(self):
+      arg0=numpy.array([[0.0, 6.0, 2.0], [0.0, 7.0, 0.0]])
+      arg1=Data(numpy.array([-7.0, 0.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, -2.0, 7.0]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([-8.0, 0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([2.0, -14.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank3_offset1(self):
-      arg0=Data(numpy.array([3.0, 5.0, 1.0]),self.functionspace)
-      arg1=numpy.array([[[6.0, 0.0, 5.0], [5.0, -7.0, 0.0], [3.0, -4.0, 2.0], [3.0, 6.0, 2.0], [-7.0, -2.0, -7.0]], [[2.0, 
--5.0, 0.0], [-5.0, 7.0, -3.0], [-1.0, 0.0, 4.0], [2.0, 7.0, -2.0], [-1.0, 0.0, 7.0]], [[-4.0, 1.0, -6.0], [2.0, 5.0, -1.0], 
-[-7.0, 6.0, 4.0], [0.0, -2.0, -2.0], [-6.0, -7.0, 1.0]], [[-5.0, 0.0, 0.0], [7.0, -1.0, 2.0], [6.0, -7.0, 5.0], [3.0, 0.0, 
--2.0], [0.0, 0.0, -6.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[23.0, -20.0, -9.0, 41.0, -38.0], [-19.0, 17.0, 1.0, 39.0, 4.0], [-13.0, 30.0, 13.0, -12.0, -52.0], 
-[-15.0, 18.0, -12.0, 7.0, -6.0]]),self.functionspace)
+   def test_tensor_transposed_mult_array_rank2_taggedData_rank2(self):
+      arg0=numpy.array([[1.0, -3.0, 5.0], [3.0, 3.0, 1.0]])
+      arg1=Data(numpy.array([[-5.0, -1.0, 7.0], [0.0, 2.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, -2.0, -4.0], [6.0, 0.0, 4.0]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[33.0, -16.0], [-11.0, 4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-20.0, 26.0], [-28.0, 22.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[3.0, 4.0, 0.0], [4.0, -7.0, -2.0]]),self.functionspace)
-      arg1=numpy.array([[[[4.0, -2.0, -6.0], [-7.0, -5.0, -6.0]], [[-6.0, -6.0, 0.0], [-1.0, 0.0, 3.0]], [[6.0, 1.0, 0.0], 
-[7.0, -6.0, 3.0]], [[-2.0, 0.0, -3.0], [0.0, 0.0, 6.0]], [[-7.0, -3.0, 4.0], [-4.0, 3.0, 6.0]]], [[[0.0, -4.0, -7.0], [1.0, 
--5.0, 4.0]], [[-6.0, -6.0, 4.0], [7.0, 6.0, 5.0]], [[1.0, 3.0, -4.0], [-5.0, -6.0, 7.0]], [[1.0, -2.0, 7.0], [-6.0, 4.0, 7.0]], 
-[[-4.0, 6.0, 5.0], [0.0, -5.0, -6.0]]], [[[3.0, 4.0, 0.0], [7.0, -3.0, -6.0]], [[3.0, 4.0, 2.0], [-5.0, -7.0, 0.0]], [[-4.0, 
--4.0, 1.0], [2.0, 1.0, -6.0]], [[4.0, -1.0, -6.0], [3.0, 5.0, -5.0]], [[-7.0, 2.0, -6.0], [6.0, 5.0, -4.0]]], [[[-1.0, 6.0, 
--7.0], [-2.0, 0.0, -1.0]], [[4.0, -6.0, -7.0], [-5.0, -6.0, -3.0]], [[2.0, -6.0, -3.0], [0.0, 7.0, -4.0]], [[-3.0, 0.0, 7.0], 
-[-7.0, -4.0, 3.0]], [[3.0, -5.0, -3.0], [6.0, 0.0, 4.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[23.0, -52.0, 86.0, -18.0, -82.0], [15.0, -66.0, 23.0, -71.0, 59.0], [86.0, 54.0, -15.0, -5.0, 
--16.0], [15.0, 16.0, -59.0, -15.0, 5.0]]),self.functionspace)
+   def test_tensor_transposed_mult_array_rank4_taggedData_rank2(self):
+      arg0=numpy.array([[[[0.0, 7.0, 4.0], [-2.0, -4.0, 5.0]], [[3.0, -6.0, 6.0], [-7.0, 2.0, 7.0]], [[0.0, 4.0, 7.0], [7.0, 
+0.0, -5.0]], [[0.0, 4.0, 3.0], [-4.0, 1.0, 2.0]], [[-3.0, 3.0, 3.0], [0.0, 0.0, 0.0]]], [[[-1.0, -6.0, 0.0], [-6.0, -7.0, 
+3.0]], [[-5.0, 5.0, -3.0], [-7.0, 7.0, -1.0]], [[0.0, -5.0, -4.0], [-4.0, -3.0, 7.0]], [[4.0, -1.0, 1.0], [-1.0, -7.0, -1.0]], 
+[[0.0, 0.0, 3.0], [1.0, 0.0, 7.0]]], [[[-7.0, -1.0, -4.0], [0.0, -7.0, 5.0]], [[-7.0, 0.0, 2.0], [3.0, 3.0, 5.0]], [[-7.0, 1.0, 
+7.0], [-3.0, -5.0, -1.0]], [[5.0, -3.0, 6.0], [3.0, 2.0, 1.0]], [[4.0, 1.0, -1.0], [-3.0, -1.0, -4.0]]], [[[1.0, 7.0, 6.0], 
+[-3.0, -3.0, 4.0]], [[-6.0, 7.0, 2.0], [2.0, 6.0, -6.0]], [[4.0, -2.0, 3.0], [2.0, -2.0, -6.0]], [[7.0, -2.0, -1.0], [-5.0, 
+-1.0, 4.0]], [[-6.0, -4.0, -1.0], [-7.0, 1.0, 1.0]]]])
+      arg1=Data(numpy.array([[5.0, -3.0, 7.0], [-7.0, -2.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, -1.0, -3.0], [6.0, -5.0, 0.0]]))
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[29.0, 120.0, -12.0, 35.0, -3.0], [69.0, -26.0, 21.0, 51.0, 14.0], [-46.0, -48.0, 42.0, 51.0, 
+33.0], [53.0, -63.0, 37.0, 71.0, 22.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-11.0, -61.0, 17.0, -42.0, -15.0], [4.0, -78.0, 8.0, 31.0, -3.0], [41.0, -10.0, -22.0, 
+-2.0, -7.0], [-27.0, -37.0, 19.0, -13.0, -46.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_array_rank3_offset0(self):
-      arg0=Data(-4.0,self.functionspace)
-      arg1=numpy.array([[[3.0, -6.0], [0.0, 3.0]], [[6.0, -7.0], [-2.0, -6.0]], [[-4.0, -2.0], [-4.0, -4.0]], [[-4.0, 0.0], 
-[6.0, 4.0]], [[3.0, 7.0], [0.0, 0.0]], [[1.0, -3.0], [3.0, 4.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-12.0, 24.0], [-0.0, -12.0]], [[-24.0, 28.0], [8.0, 24.0]], [[16.0, 8.0], [16.0, 16.0]], [[16.0, 
--0.0], [-24.0, -16.0]], [[-12.0, -28.0], [-0.0, -0.0]], [[-4.0, 12.0], [-12.0, -16.0]]]),self.functionspace)
+   def test_tensor_transposed_mult_array_rank4_taggedData_rank3(self):
+      arg0=numpy.array([[[[0.0, 0.0, -4.0], [5.0, -3.0, 0.0]], [[7.0, -2.0, -2.0], [-5.0, 4.0, 3.0]], [[1.0, 2.0, 4.0], [-2.0, 
+-2.0, 1.0]], [[-6.0, -6.0, -3.0], [-7.0, -2.0, -3.0]], [[-6.0, 3.0, 6.0], [0.0, -1.0, -5.0]]], [[[7.0, -1.0, -3.0], [7.0, -3.0, 
+-3.0]], [[-1.0, 4.0, 0.0], [-4.0, -1.0, 3.0]], [[-1.0, 4.0, -7.0], [-3.0, 4.0, 0.0]], [[3.0, -3.0, 1.0], [-7.0, 0.0, 2.0]], 
+[[-3.0, 4.0, -2.0], [-3.0, 3.0, -1.0]]], [[[1.0, 6.0, 3.0], [4.0, 0.0, 7.0]], [[2.0, -4.0, 4.0], [3.0, 4.0, 3.0]], [[-3.0, 2.0, 
+-6.0], [4.0, 6.0, 0.0]], [[-5.0, 0.0, -7.0], [-5.0, -5.0, 0.0]], [[-6.0, -7.0, 7.0], [-4.0, 0.0, 0.0]]], [[[1.0, 0.0, 0.0], 
+[0.0, 6.0, 0.0]], [[-4.0, -5.0, 0.0], [6.0, 0.0, 3.0]], [[-7.0, 0.0, -3.0], [3.0, -4.0, 0.0]], [[-1.0, -7.0, -7.0], [-7.0, 7.0, 
+6.0]], [[-3.0, -3.0, 5.0], [-4.0, 4.0, -1.0]]]])
+      arg1=Data(numpy.array([[[-7.0, 2.0, 6.0], [7.0, 0.0, -2.0]], [[-1.0, 5.0, 5.0], [-2.0, 4.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, -7.0, -4.0], [-6.0, 6.0, -1.0]], [[-1.0, 6.0, -6.0], [-5.0, 7.0, 6.0]]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[11.0, -42.0], [-106.0, -1.0], [5.0, 25.0], [-31.0, -33.0], [94.0, 47.0]], [[-14.0, -53.0], 
+[-19.0, 25.0], [-48.0, 8.0], [-74.0, 1.0], [-2.0, 31.0]], [[37.0, 36.0], [17.0, 8.0], [17.0, -1.0], [-42.0, -40.0], [42.0, 
+14.0]], [[-7.0, 23.0], [54.0, -33.0], [52.0, -30.0], [-110.0, -27.0], [19.0, 37.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-32.0, -22.0], [80.0, 64.0], [-30.0, -11.0], [81.0, -9.0], [-52.0, -49.0]], [[-31.0, 
+-69.0], [-14.0, 56.0], [41.0, 110.0], [60.0, 20.0], [14.0, 69.0]], [[-84.0, 39.0], [17.0, -19.0], [19.0, 73.0], [23.0, 37.0], 
+[39.0, -58.0]], [[37.0, 41.0], [-8.0, -38.0], [-37.0, -18.0], [154.0, 121.0], [47.0, -3.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank4_offset1(self):
-      arg0=Data(numpy.array([4.0, -6.0, 0.0]),self.functionspace)
-      arg1=numpy.array([[[[5.0, -3.0, -2.0], [5.0, -2.0, -2.0]], [[-2.0, -2.0, -6.0], [-2.0, 4.0, 6.0]]], [[[-3.0, -1.0, -4.0], 
-[-1.0, 4.0, 5.0]], [[-1.0, -6.0, -7.0], [6.0, -1.0, 0.0]]], [[[-7.0, -4.0, -2.0], [0.0, -1.0, -6.0]], [[1.0, -5.0, 2.0], [-1.0, 
--6.0, -3.0]]], [[[6.0, 5.0, 4.0], [-6.0, 0.0, 3.0]], [[-3.0, 7.0, -3.0], [2.0, 0.0, 3.0]]], [[[-2.0, -3.0, -3.0], [-3.0, -1.0, 
-5.0]], [[-7.0, -3.0, -2.0], [-3.0, -7.0, -3.0]]], [[[0.0, 4.0, 5.0], [5.0, -2.0, 0.0]], [[7.0, -1.0, 7.0], [-3.0, -6.0, 
--1.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[38.0, 32.0], [4.0, -32.0]], [[-6.0, -28.0], [32.0, 30.0]], [[-4.0, 6.0], [34.0, 32.0]], [[-6.0, 
--24.0], [-54.0, 8.0]], [[10.0, -6.0], [-10.0, 30.0]], [[-24.0, 32.0], [34.0, 24.0]]]),self.functionspace)
+   def test_tensor_transposed_mult_array_rank4_taggedData_rank4(self):
+      arg0=numpy.array([[[[3.0, -1.0, 0.0], [-4.0, 3.0, 3.0]], [[0.0, 3.0, -2.0], [0.0, -2.0, 6.0]], [[-2.0, -5.0, 1.0], [-7.0, 
+3.0, -1.0]], [[-6.0, -3.0, -2.0], [-6.0, 7.0, -3.0]], [[-6.0, 2.0, 1.0], [0.0, -5.0, -1.0]]], [[[-5.0, 0.0, 3.0], [0.0, -2.0, 
+3.0]], [[0.0, 7.0, 7.0], [-2.0, -4.0, 0.0]], [[6.0, -7.0, 4.0], [6.0, 3.0, -5.0]], [[4.0, 4.0, 0.0], [-1.0, -3.0, 2.0]], 
+[[-7.0, 5.0, -5.0], [3.0, -2.0, 3.0]]], [[[5.0, -1.0, -1.0], [0.0, 4.0, -5.0]], [[2.0, 0.0, 7.0], [-1.0, -7.0, 0.0]], [[6.0, 
+-2.0, 0.0], [-4.0, 4.0, -3.0]], [[0.0, 4.0, -1.0], [6.0, -2.0, -3.0]], [[-5.0, -2.0, -6.0], [5.0, -4.0, -7.0]]], [[[-7.0, -5.0, 
+-1.0], [-2.0, -4.0, -3.0]], [[7.0, -1.0, 3.0], [1.0, 1.0, -5.0]], [[-6.0, 0.0, -3.0], [3.0, 6.0, -7.0]], [[-1.0, 6.0, 6.0], 
+[-4.0, 3.0, 7.0]], [[-4.0, 6.0, 2.0], [3.0, -7.0, -4.0]]]])
+      arg1=Data(numpy.array([[[[5.0, 4.0, 6.0], [-7.0, 0.0, 7.0]], [[2.0, -1.0, 0.0], [-3.0, 2.0, 1.0]], [[-7.0, -2.0, -3.0], 
+[6.0, 4.0, 5.0]], [[-7.0, 3.0, 7.0], [6.0, -2.0, -1.0]], [[4.0, -1.0, -2.0], [-2.0, 5.0, -1.0]]], [[[-5.0, -1.0, 2.0], [-7.0, 
+6.0, 0.0]], [[1.0, 1.0, 3.0], [2.0, -1.0, -2.0]], [[0.0, 1.0, -2.0], [-6.0, -6.0, 1.0]], [[1.0, -4.0, 7.0], [0.0, 7.0, -5.0]], 
+[[0.0, 4.0, -2.0], [2.0, 5.0, 6.0]]], [[[5.0, 6.0, 0.0], [-5.0, -1.0, -3.0]], [[-4.0, 3.0, -7.0], [7.0, -1.0, -2.0]], [[4.0, 
+-6.0, -2.0], [-4.0, 0.0, 3.0]], [[-4.0, 0.0, 4.0], [2.0, -1.0, 6.0]], [[-2.0, -7.0, 0.0], [7.0, -3.0, 5.0]]], [[[0.0, -1.0, 
+-4.0], [6.0, -3.0, -4.0]], [[1.0, -2.0, 0.0], [-6.0, 6.0, 3.0]], [[4.0, -2.0, -2.0], [-7.0, 5.0, -4.0]], [[-7.0, 6.0, -2.0], 
+[6.0, 3.0, -7.0]], [[-2.0, -7.0, 6.0], [6.0, 1.0, -5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -7.0, -1.0], [-1.0, -3.0, -7.0]], [[-6.0, -3.0, 5.0], [-5.0, 2.0, -2.0]], 
+[[-6.0, 6.0, 6.0], [0.0, 6.0, -7.0]], [[-6.0, 0.0, 3.0], [6.0, 4.0, 0.0]], [[0.0, 1.0, 1.0], [-4.0, -6.0, 4.0]]], [[[-5.0, 
+-3.0, -2.0], [0.0, 0.0, 4.0]], [[-4.0, -4.0, 0.0], [5.0, -6.0, 0.0]], [[3.0, -2.0, 6.0], [0.0, -5.0, -5.0]], [[6.0, 2.0, -6.0], 
+[5.0, 1.0, -7.0]], [[1.0, 2.0, -1.0], [5.0, 2.0, -7.0]]], [[[-4.0, 0.0, 6.0], [4.0, -2.0, -7.0]], [[7.0, -2.0, 0.0], [2.0, 
+-3.0, 4.0]], [[0.0, 6.0, -4.0], [-3.0, 0.0, -1.0]], [[-4.0, -3.0, 0.0], [1.0, -2.0, -5.0]], [[-2.0, -6.0, -5.0], [6.0, -4.0, 
+-6.0]]], [[[-3.0, 6.0, -1.0], [-6.0, 6.0, 0.0]], [[-6.0, 5.0, 0.0], [-4.0, 2.0, -5.0]], [[2.0, -4.0, 0.0], [-6.0, 4.0, 6.0]], 
+[[7.0, -5.0, 3.0], [-3.0, -2.0, 4.0]], [[5.0, -5.0, 0.0], [-1.0, 1.0, -6.0]]]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[60.0, 28.0, -16.0, -57.0, 33.0], [32.0, -15.0, 8.0, 13.0, 21.0], [17.0, -52.0, 43.0, -5.0, 
+-21.0], [-44.0, 56.0, 45.0, -63.0, -35.0]], [[42.0, -1.0, 22.0, -7.0, -15.0], [-19.0, -13.0, 25.0, -70.0, 42.0], [2.0, 13.0, 
+4.0, 30.0, 15.0], [-13.0, 0.0, -36.0, -26.0, -65.0]], [[18.0, 27.0, -14.0, -41.0, 25.0], [84.0, -19.0, 16.0, 51.0, -27.0], 
+[-5.0, -64.0, 45.0, -11.0, -24.0], [-46.0, 65.0, 68.0, -44.0, 11.0]], [[-33.0, 20.0, 31.0, -28.0, 33.0], [113.0, -28.0, -8.0, 
+56.0, -3.0], [-16.0, -14.0, 13.0, -21.0, -45.0], [-34.0, 69.0, 75.0, 34.0, 7.0]], [[-23.0, -25.0, 10.0, 66.0, -52.0], [0.0, 
+6.0, 29.0, -37.0, -25.0], [-10.0, 30.0, -41.0, 27.0, 8.0], [13.0, -43.0, -51.0, 44.0, 4.0]]], [[[14.0, -11.0, 33.0, 57.0, 
+-39.0], [19.0, 0.0, 9.0, -13.0, 2.0], [-32.0, -5.0, -17.0, 52.0, 31.0], [-18.0, -8.0, -48.0, 2.0, 11.0]], [[84.0, -9.0, -63.0, 
+66.0, -37.0], [-3.0, 28.0, 29.0, -7.0, -10.0], [56.0, -38.0, -48.0, 28.0, -51.0], [-35.0, -26.0, -34.0, 4.0, -23.0]], [[-51.0, 
+2.0, -17.0, 0.0, 31.0], [-39.0, 30.0, -74.0, 108.0, -39.0], [-30.0, -24.0, 19.0, -29.0, 45.0], [38.0, -13.0, 23.0, -12.0, 
+125.0]], [[57.0, 3.0, -44.0, -18.0, -3.0], [-35.0, 5.0, 30.0, -43.0, 11.0], [46.0, -12.0, 2.0, -3.0, -24.0], [-9.0, -10.0, 
+-8.0, -33.0, -55.0]], [[-45.0, -29.0, 79.0, 48.0, -42.0], [-13.0, -15.0, 12.0, -91.0, 44.0], [-27.0, 95.0, -51.0, 34.0, 21.0], 
+[27.0, -38.0, -71.0, 80.0, -50.0]]], [[[-20.0, 14.0, -39.0, -48.0, 48.0], [-2.0, 7.0, -28.0, 55.0, -12.0], [30.0, -10.0, 13.0, 
+-58.0, -40.0], [13.0, 16.0, 64.0, 8.0, 20.0]], [[59.0, -7.0, -69.0, 43.0, -39.0], [-31.0, 28.0, 34.0, 2.0, -51.0], [22.0, 
+-57.0, -2.0, 25.0, 10.0], [-13.0, -34.0, -34.0, -55.0, 25.0]], [[29.0, 31.0, -61.0, -77.0, 57.0], [24.0, -2.0, -5.0, 57.0, 
+-14.0], [43.0, -56.0, 43.0, -54.0, -53.0], [-22.0, 49.0, 88.0, -45.0, -3.0]], [[-53.0, -29.0, 8.0, 48.0, -21.0], [-60.0, 21.0, 
+-21.0, -22.0, 2.0], [5.0, 69.0, -55.0, -8.0, 5.0], [54.0, -65.0, -46.0, 77.0, 15.0]], [[-153.0, -38.0, 36.0, 32.0, -29.0], 
+[-44.0, 3.0, -3.0, -32.0, -48.0], [-37.0, 109.0, -37.0, -32.0, 36.0], [96.0, -76.0, -31.0, 102.0, 49.0]]], [[[-68.0, -14.0, 
+19.0, 26.0, -34.0], [28.0, -9.0, 30.0, -7.0, -60.0], [-42.0, 16.0, 3.0, 6.0, 32.0], [21.0, -18.0, -10.0, 18.0, 42.0]], [[7.0, 
+9.0, -71.0, -22.0, 31.0], [-29.0, 26.0, -24.0, 64.0, -33.0], [38.0, -36.0, 9.0, -45.0, -28.0], [12.0, -6.0, 42.0, -17.0, 
+43.0]], [[-118.0, -16.0, 58.0, 34.0, 13.0], [39.0, -1.0, -55.0, 50.0, 0.0], [-30.0, 74.0, -51.0, -30.0, -20.0], [40.0, -9.0, 
+19.0, 133.0, 53.0]], [[132.0, 17.0, 0.0, 30.0, -6.0], [57.0, -2.0, 7.0, 3.0, 61.0], [27.0, -65.0, -15.0, 59.0, -42.0], [-91.0, 
+50.0, -13.0, -33.0, -60.0]], [[-33.0, -41.0, -20.0, 96.0, -63.0], [-45.0, 29.0, 22.0, -43.0, -33.0], [20.0, 56.0, -80.0, 13.0, 
+-12.0], [41.0, -88.0, -72.0, 85.0, 9.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-16.0, 5.0, -27.0, -30.0, 9.0], [0.0, -46.0, -19.0, -22.0, -34.0], [-55.0, 18.0, 
+3.0, -34.0, -54.0], [27.0, -16.0, 64.0, 44.0, 9.0]], [[-55.0, -35.0, -48.0, -14.0, 37.0], [19.0, 0.0, -38.0, -26.0, -38.0], 
+[-50.0, 24.0, 20.0, -35.0, -36.0], [8.0, -19.0, 16.0, 7.0, -53.0]], [[37.0, 75.0, 13.0, -15.0, 2.0], [19.0, -25.0, 0.0, -53.0, 
+-35.0], [-13.0, -31.0, -12.0, 15.0, -19.0], [35.0, 26.0, 64.0, 25.0, 31.0]], [[23.0, 85.0, 69.0, 22.0, -35.0], [31.0, -36.0, 
+-44.0, -32.0, -5.0], [-5.0, -81.0, 11.0, 28.0, -6.0], [80.0, 74.0, 46.0, -41.0, 16.0]], [[1.0, 27.0, 31.0, 19.0, 29.0], [18.0, 
+46.0, 14.0, -36.0, -6.0], [47.0, -35.0, 9.0, 33.0, 21.0], [-1.0, 41.0, -46.0, -43.0, -39.0]]], [[[-23.0, 35.0, 15.0, 31.0, 
+27.0], [31.0, 32.0, -2.0, -71.0, -33.0], [21.0, -17.0, -15.0, 9.0, -15.0], [0.0, 11.0, 0.0, -10.0, -45.0]], [[-42.0, 16.0, 
+60.0, -7.0, 46.0], [-35.0, -14.0, 48.0, -42.0, -11.0], [42.0, -6.0, 20.0, -15.0, -73.0], [23.0, 35.0, -32.0, 0.0, -37.0]], 
+[[71.0, -9.0, -1.0, 24.0, -65.0], [-37.0, 16.0, 66.0, 66.0, 59.0], [53.0, 39.0, -71.0, 22.0, 64.0], [-82.0, -64.0, -14.0, 45.0, 
+92.0]], [[-28.0, -41.0, -32.0, -42.0, 34.0], [-24.0, -19.0, 9.0, 10.0, -13.0], [-28.0, 35.0, 25.0, -33.0, -38.0], [0.0, -16.0, 
+-2.0, 25.0, -14.0]], [[-55.0, -23.0, 9.0, 37.0, 12.0], [42.0, 35.0, -66.0, -10.0, -2.0], [-7.0, -35.0, 38.0, 5.0, 17.0], [26.0, 
+36.0, -42.0, -82.0, -83.0]]], [[[36.0, -14.0, 17.0, -17.0, -46.0], [-40.0, -40.0, 16.0, 73.0, 47.0], [1.0, 5.0, 3.0, 0.0, 
+15.0], [4.0, -2.0, 0.0, 9.0, 64.0]], [[17.0, 14.0, -12.0, -25.0, 53.0], [-24.0, 29.0, 83.0, -42.0, -24.0], [44.0, 33.0, -25.0, 
+5.0, -17.0], [-49.0, -22.0, -18.0, 52.0, 4.0]], [[33.0, 4.0, -3.0, -44.0, -22.0], [-36.0, -60.0, 17.0, 37.0, 11.0], [-27.0, 
+14.0, 3.0, -15.0, -22.0], [18.0, -7.0, 42.0, 44.0, 66.0]], [[-6.0, -45.0, 27.0, 25.0, -21.0], [-22.0, 26.0, 11.0, 63.0, 56.0], 
+[43.0, -2.0, 13.0, 13.0, 43.0], [-23.0, 7.0, -78.0, -49.0, -10.0]], [[71.0, -13.0, 7.0, 26.0, -32.0], [15.0, 77.0, 8.0, 72.0, 
+63.0], [61.0, -37.0, 4.0, 74.0, 140.0], [-45.0, 27.0, -90.0, -78.0, 18.0]]], [[[64.0, 60.0, 3.0, 11.0, 14.0], [40.0, 62.0, 
+18.0, -39.0, -13.0], [43.0, -43.0, -17.0, 64.0, 71.0], [-20.0, 32.0, -16.0, -25.0, 6.0]], [[42.0, -17.0, 11.0, -23.0, -28.0], 
+[-58.0, -25.0, 61.0, 63.0, 44.0], [27.0, 30.0, -16.0, -1.0, 9.0], [-30.0, -24.0, -14.0, 38.0, 70.0]], [[25.0, 32.0, 103.0, 
+69.0, -79.0], [8.0, 3.0, -31.0, 52.0, 73.0], [55.0, -82.0, 10.0, 50.0, 63.0], [39.0, 71.0, -48.0, -100.0, 15.0]], [[-103.0, 
+30.0, 47.0, 12.0, 38.0], [3.0, -58.0, -29.0, -96.0, -58.0], [-31.0, -8.0, 17.0, -59.0, -142.0], [75.0, 23.0, 52.0, 15.0, 
+-70.0]], [[-2.0, -5.0, 58.0, 20.0, 22.0], [-18.0, 49.0, 43.0, 12.0, 35.0], [82.0, -29.0, 23.0, 35.0, 32.0], [-14.0, 48.0, 
+-102.0, -63.0, -36.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_array_rank4_offset0(self):
-      arg0=Data(-6.0,self.functionspace)
-      arg1=numpy.array([[[[-1.0, 3.0, -3.0, 4.0], [-7.0, 6.0, 0.0, 7.0], [-4.0, -5.0, -7.0, 1.0]], [[4.0, -5.0, 6.0, 2.0], 
-[1.0, -1.0, 6.0, 6.0], [-3.0, -3.0, 0.0, 6.0]]], [[[-2.0, -3.0, 1.0, 3.0], [-1.0, 0.0, -3.0, 0.0], [4.0, -3.0, 6.0, -1.0]], 
-[[6.0, 0.0, -2.0, -1.0], [-4.0, 6.0, 3.0, -6.0], [-7.0, 7.0, 3.0, 3.0]]], [[[6.0, 1.0, 5.0, -4.0], [-4.0, 0.0, 7.0, 2.0], 
-[-6.0, 2.0, -1.0, 1.0]], [[7.0, 0.0, -1.0, -2.0], [-4.0, 7.0, -4.0, 0.0], [6.0, -4.0, 6.0, -2.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[6.0, -18.0, 18.0, -24.0], [42.0, -36.0, -0.0, -42.0], [24.0, 30.0, 42.0, -6.0]], [[-24.0, 30.0, 
--36.0, -12.0], [-6.0, 6.0, -36.0, -36.0], [18.0, 18.0, -0.0, -36.0]]], [[[12.0, 18.0, -6.0, -18.0], [6.0, -0.0, 18.0, -0.0], 
-[-24.0, 18.0, -36.0, 6.0]], [[-36.0, -0.0, 12.0, 6.0], [24.0, -36.0, -18.0, 36.0], [42.0, -42.0, -18.0, -18.0]]], [[[-36.0, 
--6.0, -30.0, 24.0], [24.0, -0.0, -42.0, -12.0], [36.0, -12.0, 6.0, -6.0]], [[-42.0, -0.0, 6.0, 12.0], [24.0, -42.0, 24.0, 
--0.0], [-36.0, 24.0, -36.0, 12.0]]]]),self.functionspace)
+   def test_tensor_transposed_mult_constData_rank2_taggedData_rank1(self):
+      arg0=Data(numpy.array([[-2.0, -1.0, -6.0], [4.0, 0.0, -7.0]]),self.functionspace)
+      arg1=Data(numpy.array([-5.0, 7.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -5.0, -2.0]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([21.0, 1.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([13.0, 22.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_constData_rank0_offset0(self):
-      arg0=Data(-7.0,self.functionspace)
-      arg1=Data(0.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(-0.0,self.functionspace)
+   def test_tensor_transposed_mult_constData_rank2_taggedData_rank2(self):
+      arg0=Data(numpy.array([[6.0, 5.0, -2.0], [4.0, 2.0, 2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-6.0, -1.0, 4.0], [-2.0, 0.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 1.0, 3.0], [0.0, -5.0, 7.0]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[-49.0, -4.0], [-18.0, -16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[11.0, -39.0], [16.0, 4.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([0.0, 6.0, -7.0]),self.functionspace)
-      arg1=Data(numpy.array([-6.0, 6.0, 0.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(36.0,self.functionspace)
+   def test_tensor_transposed_mult_constData_rank4_taggedData_rank2(self):
+      arg0=Data(numpy.array([[[[-5.0, 3.0, -7.0], [6.0, -3.0, 4.0]], [[-7.0, 0.0, 0.0], [1.0, -2.0, -7.0]], [[-5.0, 6.0, -6.0], 
+[7.0, -2.0, -5.0]], [[5.0, -1.0, 7.0], [-7.0, -7.0, 5.0]], [[-2.0, -3.0, 5.0], [-4.0, 6.0, -2.0]]], [[[0.0, -1.0, -4.0], [-1.0, 
+0.0, -7.0]], [[0.0, 3.0, 1.0], [-7.0, -4.0, -1.0]], [[7.0, -7.0, -3.0], [-1.0, -5.0, -1.0]], [[0.0, -6.0, -4.0], [-6.0, 3.0, 
+-6.0]], [[5.0, 2.0, 1.0], [0.0, 3.0, -1.0]]], [[[-2.0, -6.0, 6.0], [5.0, 7.0, 7.0]], [[0.0, 6.0, -6.0], [4.0, 5.0, 4.0]], 
+[[3.0, -4.0, -4.0], [7.0, -2.0, 5.0]], [[0.0, 2.0, 2.0], [4.0, 5.0, -3.0]], [[1.0, 4.0, 7.0], [3.0, -1.0, -4.0]]], [[[7.0, 4.0, 
+-2.0], [0.0, -7.0, -4.0]], [[4.0, 0.0, 0.0], [-4.0, -5.0, 2.0]], [[6.0, 4.0, 5.0], [-2.0, -5.0, -2.0]], [[-3.0, -1.0, -1.0], 
+[-2.0, 2.0, -7.0]], [[-4.0, -7.0, 7.0], [6.0, -6.0, -5.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[6.0, 0.0, -4.0], [-3.0, 1.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 3.0, 6.0], [-5.0, 5.0, 2.0]]))
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[-23.0, -47.0, -29.0, 16.0, -14.0], [19.0, 13.0, 52.0, 37.0, 29.0], [-44.0, 17.0, 11.0, -15.0, 
+-32.0], [43.0, 31.0, 17.0, -6.0, -76.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-50.0, -1.0, -53.0, 29.0, 75.0], [-36.0, 28.0, -89.0, -9.0, 5.0], [50.0, -5.0, -83.0, 
+17.0, 22.0], [-71.0, -17.0, -1.0, 9.0, -33.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      arg0=arg0*1j
-      arg1=arg1*1j
-      ref=-ref
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[0.0, -6.0, 3.0], [0.0, 0.0, 2.0]]),self.functionspace)
-      arg1=Data(numpy.array([[-3.0, 7.0, -5.0], [-4.0, 4.0, 6.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(-45.0,self.functionspace)
+   def test_tensor_transposed_mult_constData_rank4_taggedData_rank3(self):
+      arg0=Data(numpy.array([[[[-1.0, 7.0, 0.0], [-7.0, -1.0, -2.0]], [[0.0, 3.0, 0.0], [2.0, 4.0, 4.0]], [[-7.0, 5.0, 0.0], 
+[2.0, -6.0, 2.0]], [[0.0, 1.0, 0.0], [1.0, -7.0, 0.0]], [[4.0, -4.0, -3.0], [-5.0, 6.0, -7.0]]], [[[3.0, 4.0, 4.0], [-4.0, 
+-1.0, -1.0]], [[0.0, 2.0, 7.0], [0.0, 1.0, 1.0]], [[4.0, 7.0, 2.0], [7.0, 7.0, 4.0]], [[-4.0, 0.0, 7.0], [-1.0, 7.0, 0.0]], 
+[[7.0, 7.0, -2.0], [5.0, 5.0, -7.0]]], [[[3.0, -1.0, 0.0], [-1.0, 2.0, -4.0]], [[-1.0, 0.0, -2.0], [-4.0, 6.0, -6.0]], [[4.0, 
+-4.0, 2.0], [-5.0, 3.0, 1.0]], [[-1.0, 3.0, 4.0], [7.0, -2.0, -3.0]], [[-4.0, 2.0, -6.0], [-5.0, 7.0, 4.0]]], [[[2.0, 0.0, 
+7.0], [6.0, -4.0, -6.0]], [[-1.0, 4.0, -5.0], [1.0, 3.0, -3.0]], [[-4.0, -7.0, 7.0], [-6.0, -2.0, 0.0]], [[7.0, 6.0, -5.0], 
+[2.0, -3.0, -4.0]], [[6.0, -7.0, -3.0], [-3.0, -2.0, -2.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[2.0, 0.0, -1.0], [-7.0, 3.0, -6.0]], [[-7.0, 1.0, 1.0], [-2.0, -2.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -6.0, 2.0], [-4.0, -4.0, 0.0]], [[7.0, 5.0, -2.0], [-2.0, 1.0, 0.0]]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[56.0, 40.0], [-26.0, -29.0], [-58.0, 52.0], [-28.0, 13.0], [106.0, -2.0]], [[33.0, 2.0], [-10.0, 
+2.0], [-46.0, -67.0], [13.0, 23.0], [38.0, -29.0]], [[43.0, -4.0], [82.0, 31.0], [44.0, -31.0], [-43.0, 19.0], [30.0, 0.0]], 
+[[-21.0, 19.0], [23.0, 13.0], [21.0, 44.0], [20.0, -26.0], [42.0, -32.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-3.0, 41.0], [-42.0, 15.0], [35.0, -34.0], [18.0, -4.0], [-14.0, 30.0]], [[-17.0, 
+40.0], [-2.0, -3.0], [-122.0, 52.0], [18.0, -33.0], [-135.0, 83.0]], [[-19.0, 20.0], [-5.0, 11.0], [8.0, 17.0], [-23.0, -16.0], 
+[-4.0, 11.0]], [[-8.0, -16.0], [-43.0, 24.0], [116.0, -67.0], [-91.0, 82.0], [14.0, 17.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[4.0, 7.0, 0.0], [-7.0, 7.0, -5.0], [-5.0, 0.0, -5.0], [3.0, 6.0, 2.0]], [[5.0, -6.0, 5.0], 
-[-1.0, 6.0, 2.0], [-4.0, 5.0, 6.0], [0.0, 4.0, 6.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[4.0, -5.0, 1.0], [4.0, 4.0, -2.0], [-4.0, -6.0, 6.0], [-3.0, 4.0, 4.0]], [[4.0, 5.0, 0.0], [5.0, 
-4.0, 2.0], [-3.0, -2.0, 7.0], [6.0, 5.0, -1.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(75.0,self.functionspace)
+   def test_tensor_transposed_mult_constData_rank4_taggedData_rank4(self):
+      arg0=Data(numpy.array([[[[4.0, -6.0, -2.0], [5.0, 0.0, 2.0]], [[1.0, -5.0, 5.0], [-1.0, 4.0, -2.0]], [[3.0, 6.0, -4.0], 
+[3.0, 6.0, -7.0]], [[0.0, -7.0, 4.0], [7.0, -3.0, 0.0]], [[0.0, -1.0, -2.0], [5.0, 3.0, 2.0]]], [[[2.0, 6.0, -3.0], [3.0, 1.0, 
+1.0]], [[-2.0, -2.0, 4.0], [-3.0, 6.0, 7.0]], [[1.0, -3.0, 0.0], [-7.0, 2.0, 3.0]], [[-3.0, 0.0, -6.0], [-3.0, -3.0, -3.0]], 
+[[0.0, -6.0, 5.0], [7.0, 0.0, -2.0]]], [[[0.0, 3.0, -7.0], [6.0, -5.0, -3.0]], [[4.0, 7.0, 5.0], [6.0, -3.0, 7.0]], [[5.0, 5.0, 
+-6.0], [-2.0, -2.0, -1.0]], [[3.0, 6.0, 5.0], [7.0, 5.0, -1.0]], [[-4.0, 7.0, 2.0], [-5.0, 3.0, 0.0]]], [[[7.0, -7.0, 3.0], 
+[-1.0, -4.0, -1.0]], [[-5.0, -5.0, 0.0], [-4.0, 3.0, -5.0]], [[-6.0, 0.0, -6.0], [-1.0, 4.0, 4.0]], [[6.0, -6.0, 2.0], [-7.0, 
+2.0, 0.0]], [[-1.0, 6.0, -6.0], [1.0, 4.0, -5.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-3.0, 0.0, 0.0], [-4.0, 4.0, 1.0]], [[6.0, 1.0, -2.0], [-5.0, 2.0, 0.0]], [[-1.0, 7.0, -5.0], 
+[2.0, -5.0, 3.0]], [[1.0, -4.0, 4.0], [0.0, 6.0, 0.0]], [[-7.0, -3.0, 0.0], [0.0, 0.0, 2.0]]], [[[-4.0, 6.0, 5.0], [7.0, 6.0, 
+2.0]], [[-7.0, 2.0, 0.0], [1.0, -7.0, -6.0]], [[4.0, -4.0, 4.0], [0.0, 0.0, 5.0]], [[-2.0, 0.0, 3.0], [7.0, 0.0, 0.0]], [[-2.0, 
+7.0, 2.0], [-5.0, -1.0, 1.0]]], [[[-4.0, -1.0, 2.0], [-3.0, 4.0, 3.0]], [[6.0, 1.0, -5.0], [3.0, 2.0, -6.0]], [[-3.0, 0.0, 
+-1.0], [-3.0, -1.0, -6.0]], [[0.0, 5.0, -5.0], [3.0, 1.0, 3.0]], [[-5.0, 5.0, -3.0], [1.0, -6.0, -3.0]]], [[[6.0, 4.0, 6.0], 
+[5.0, -5.0, -4.0]], [[3.0, 4.0, -4.0], [4.0, 1.0, 0.0]], [[-7.0, -4.0, 5.0], [-2.0, -6.0, 0.0]], [[-3.0, 2.0, 2.0], [5.0, 6.0, 
+-4.0]], [[7.0, 4.0, 0.0], [-5.0, -5.0, 3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 3.0, -5.0], [-7.0, 3.0, -4.0]], [[2.0, 0.0, 1.0], [0.0, -4.0, -7.0]], [[7.0, 
+-6.0, 2.0], [2.0, 0.0, -7.0]], [[0.0, -1.0, 0.0], [0.0, 1.0, 5.0]], [[-4.0, -2.0, -2.0], [-7.0, -5.0, 0.0]]], [[[6.0, 2.0, 
+-2.0], [5.0, 0.0, -4.0]], [[0.0, 1.0, 1.0], [4.0, 3.0, 2.0]], [[-7.0, 0.0, 0.0], [0.0, 1.0, 5.0]], [[5.0, 3.0, 2.0], [6.0, 0.0, 
+3.0]], [[0.0, 0.0, 0.0], [2.0, -4.0, -5.0]]], [[[7.0, 4.0, -2.0], [-5.0, -2.0, 3.0]], [[-6.0, -1.0, 6.0], [1.0, -1.0, 0.0]], 
+[[-5.0, -1.0, -2.0], [-6.0, -7.0, -7.0]], [[-2.0, 2.0, -4.0], [7.0, -5.0, 0.0]], [[1.0, 2.0, -3.0], [1.0, -3.0, 1.0]]], 
+[[[-7.0, -2.0, 1.0], [0.0, -3.0, -4.0]], [[5.0, 0.0, -5.0], [0.0, -3.0, -7.0]], [[5.0, -7.0, -1.0], [2.0, 0.0, -7.0]], [[-4.0, 
+-3.0, -5.0], [0.0, 3.0, -3.0]], [[5.0, 0.0, 4.0], [2.0, 7.0, -2.0]]]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-30.0, -3.0, -20.0, 20.0, -6.0], [-23.0, -47.0, 42.0, 21.0, -77.0], [-23.0, 31.0, -37.0, 1.0, 
+-45.0], [5.0, 16.0, -24.0, -11.0, -15.0]], [[15.0, 4.0, -89.0, 65.0, 4.0], [4.0, -34.0, 34.0, 6.0, -28.0], [24.0, -7.0, 3.0, 
+-55.0, -64.0], [-1.0, -37.0, 16.0, 24.0, -34.0]], [[-4.0, 29.0, 14.0, -1.0, -53.0], [47.0, -6.0, -63.0, 3.0, 0.0], [-32.0, 
+107.0, 22.0, 44.0, 15.0], [31.0, 67.0, -107.0, 74.0, -21.0]], [[-40.0, -56.0, -40.0, 26.0, 21.0], [9.0, 14.0, 44.0, 61.0, 
+-73.0], [-18.0, -12.0, -22.0, -37.0, -22.0], [46.0, -19.0, 52.0, 11.0, -48.0]], [[-6.0, -16.0, 4.0, 14.0, 7.0], [41.0, -30.0, 
+6.0, 29.0, -37.0], [0.0, 18.0, -28.0, 29.0, -18.0], [-14.0, 27.0, -34.0, 29.0, -38.0]]], [[[-13.0, 11.0, 59.0, -28.0, -30.0], 
+[42.0, -12.0, -23.0, 8.0, 17.0], [-22.0, 38.0, -19.0, 58.0, 23.0], [24.0, 55.0, -65.0, 17.0, 21.0]], [[49.0, 5.0, -47.0, 58.0, 
+34.0], [45.0, -77.0, 51.0, -5.0, 14.0], [72.0, -73.0, -37.0, -12.0, -72.0], [-69.0, -36.0, 12.0, 3.0, -16.0]], [[36.0, 42.0, 
+-37.0, 25.0, 8.0], [-53.0, -52.0, 31.0, -51.0, 13.0], [37.0, -32.0, -2.0, -25.0, -48.0], [-63.0, -35.0, 7.0, -44.0, 29.0]], 
+[[6.0, 3.0, 33.0, -45.0, 15.0], [-63.0, 57.0, -51.0, -33.0, 9.0], [-12.0, 15.0, 45.0, 9.0, 57.0], [-42.0, 0.0, 15.0, -24.0, 
+0.0]], [[-30.0, -51.0, -59.0, 44.0, 14.0], [34.0, 7.0, 34.0, 64.0, -69.0], [-11.0, 2.0, -14.0, -40.0, -32.0], [49.0, -16.0, 
+35.0, 41.0, -65.0]]], [[[-47.0, -23.0, 84.0, -70.0, -15.0], [-11.0, 65.0, -55.0, 21.0, -21.0], [-64.0, 64.0, 12.0, 54.0, 81.0], 
+[37.0, 59.0, -29.0, 4.0, -2.0]], [[-41.0, -15.0, 68.0, -22.0, -35.0], [89.0, -29.0, 43.0, 49.0, 31.0], [-22.0, -24.0, -74.0, 
+46.0, 3.0], [99.0, 41.0, -25.0, -4.0, 62.0]], [[-16.0, 53.0, 63.0, -51.0, -52.0], [-48.0, -7.0, -29.0, -42.0, 24.0], [-42.0, 
+61.0, 5.0, 44.0, 31.0], [18.0, 49.0, -69.0, -35.0, 72.0]], [[-18.0, -11.0, 0.0, 29.0, -41.0], [126.0, -31.0, 3.0, 58.0, 5.0], 
+[-12.0, 36.0, -34.0, 28.0, -20.0], [86.0, 46.0, -64.0, 82.0, -18.0]], [[44.0, 10.0, 18.0, -6.0, 7.0], [51.0, 16.0, -36.0, 
+-21.0, 83.0], [40.0, -36.0, 22.0, 13.0, 26.0], [-24.0, -9.0, 2.0, 23.0, 10.0]]], [[[-34.0, 26.0, -56.0, 23.0, -30.0], [-88.0, 
+-30.0, 63.0, -12.0, -49.0], [-31.0, 15.0, -11.0, -60.0, -53.0], [51.0, -27.0, 20.0, -54.0, 43.0]], [[38.0, -9.0, -68.0, 33.0, 
+40.0], [-30.0, 30.0, -25.0, -18.0, -13.0], [34.0, -11.0, 54.0, -49.0, -7.0], [-65.0, -48.0, 45.0, 23.0, -65.0]], [[42.0, -11.0, 
+26.0, -6.0, 50.0], [19.0, -11.0, -28.0, -13.0, 5.0], [43.0, -25.0, -1.0, 43.0, 11.0], [-113.0, 6.0, -10.0, 9.0, -45.0]], 
+[[18.0, 65.0, -82.0, 50.0, -24.0], [-87.0, -75.0, 56.0, -55.0, -17.0], [15.0, 3.0, -1.0, -59.0, -85.0], [-21.0, -40.0, -6.0, 
+-49.0, 43.0]], [[10.0, 15.0, 40.0, -25.0, -21.0], [31.0, 22.0, -77.0, -9.0, 18.0], [-16.0, 71.0, 32.0, 52.0, 45.0], [-13.0, 
+53.0, -73.0, 52.0, -23.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-51.0, -8.0, 56.0, 16.0, -35.0], [33.0, 16.0, -18.0, 34.0, 0.0], [-11.0, -25.0, 
+-54.0, 23.0, 5.0], [-26.0, 16.0, 60.0, 6.0, 18.0]], [[-13.0, 5.0, 59.0, -1.0, -17.0], [-11.0, 4.0, -13.0, -12.0, -8.0], [-32.0, 
+24.0, -18.0, -59.0, -39.0], [4.0, -18.0, 47.0, 4.0, 55.0]], [[63.0, 27.0, 32.0, -35.0, -67.0], [81.0, 18.0, -50.0, 22.0, 17.0], 
+[5.0, -51.0, -24.0, 13.0, 5.0], [-27.0, 66.0, 32.0, 29.0, 61.0]], [[-99.0, 16.0, 64.0, 4.0, -28.0], [13.0, 16.0, -3.0, 29.0, 
+26.0], [-65.0, 41.0, -22.0, 34.0, -10.0], [27.0, -11.0, 59.0, -8.0, 9.0]], [[-27.0, -28.0, -2.0, 14.0, -44.0], [19.0, 30.0, 
+13.0, 29.0, -12.0], [-25.0, -9.0, -60.0, 26.0, 2.0], [-17.0, -13.0, 5.0, 16.0, 19.0]]], [[[11.0, -10.0, -29.0, 0.0, -40.0], 
+[41.0, 20.0, -8.0, 43.0, -3.0], [30.0, -34.0, -42.0, 36.0, 24.0], [-36.0, 15.0, -30.0, -11.0, 9.0]], [[-15.0, -73.0, -49.0, 
+43.0, -5.0], [-67.0, 22.0, 55.0, -5.0, -65.0], [-6.0, 29.0, -69.0, -67.0, -32.0], [-24.0, -97.0, -55.0, -9.0, 28.0]], [[34.0, 
+-27.0, -10.0, 20.0, 41.0], [-47.0, -19.0, 10.0, -37.0, -37.0], [35.0, -12.0, 5.0, -67.0, -15.0], [-19.0, -22.0, -9.0, 2.0, 
+-1.0]], [[54.0, 21.0, -18.0, -18.0, 60.0], [-9.0, -33.0, 3.0, -54.0, 21.0], [3.0, -18.0, 87.0, 24.0, 18.0], [36.0, 45.0, 6.0, 
+42.0, -60.0]], [[-84.0, 19.0, 74.0, -4.0, -47.0], [21.0, 23.0, -10.0, 28.0, 24.0], [-75.0, 43.0, -32.0, 17.0, -22.0], [25.0, 
+-11.0, 65.0, -1.0, 38.0]]], [[[-1.0, 34.0, 1.0, -23.0, -9.0], [62.0, -1.0, -20.0, 22.0, 47.0], [-3.0, -34.0, 31.0, 101.0, 
+45.0], [14.0, 71.0, 19.0, 20.0, -45.0]], [[-83.0, -24.0, -41.0, 25.0, -67.0], [30.0, 41.0, 4.0, 108.0, -11.0], [43.0, 8.0, 
+-101.0, 43.0, 25.0], [-56.0, -45.0, -71.0, -92.0, 17.0]], [[57.0, 19.0, -4.0, -12.0, 6.0], [46.0, -17.0, -42.0, 13.0, 9.0], 
+[78.0, -71.0, 15.0, 20.0, 36.0], [-41.0, 68.0, -1.0, -8.0, -15.0]], [[-37.0, -2.0, 16.0, -6.0, -108.0], [59.0, 52.0, -21.0, 
+82.0, -1.0], [-13.0, 8.0, -101.0, 10.0, -9.0], [-39.0, -18.0, -11.0, -37.0, 86.0]], [[55.0, -18.0, -76.0, -4.0, 18.0], [-39.0, 
+-2.0, 31.0, -25.0, -22.0], [15.0, 21.0, 18.0, -36.0, -10.0], [7.0, -39.0, -81.0, -6.0, -1.0]]], [[[-37.0, 40.0, 102.0, -2.0, 
+7.0], [21.0, -22.0, -58.0, 11.0, 19.0], [25.0, -14.0, 7.0, -27.0, -6.0], [-16.0, 39.0, 86.0, -31.0, 19.0]], [[42.0, 13.0, 22.0, 
+-17.0, 43.0], [-40.0, -22.0, 13.0, -79.0, 5.0], [-56.0, 28.0, 68.0, -43.0, -33.0], [56.0, 1.0, 37.0, 59.0, -2.0]], [[33.0, 
+-62.0, -84.0, 24.0, 23.0], [-45.0, 10.0, 66.0, -36.0, -38.0], [-21.0, -5.0, -8.0, 9.0, 3.0], [8.0, -40.0, -54.0, 54.0, -36.0]], 
+[[27.0, 6.0, 68.0, 8.0, 23.0], [-15.0, -26.0, -40.0, -26.0, -22.0], [45.0, -27.0, 0.0, -91.0, -25.0], [-34.0, 14.0, 56.0, 
+-10.0, 38.0]], [[73.0, 11.0, -18.0, -27.0, -23.0], [43.0, 6.0, -14.0, -8.0, 11.0], [1.0, -39.0, 12.0, 25.0, 13.0], [-3.0, 48.0, 
+-4.0, 43.0, 11.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[3.0, -7.0], [-3.0, -3.0], [1.0, -5.0]], [[2.0, 6.0], [7.0, -5.0], [-3.0, -5.0]]], [[[-6.0, 
--2.0], [-2.0, -1.0], [-7.0, 1.0]], [[4.0, 0.0], [2.0, 0.0], [-7.0, -3.0]]], [[[-2.0, 0.0], [-2.0, 3.0], [0.0, 7.0]], [[-4.0, 
-5.0], [6.0, -3.0], [-6.0, 4.0]]], [[[3.0, 0.0], [-2.0, -7.0], [4.0, -2.0]], [[0.0, 7.0], [-7.0, 6.0], [2.0, 
-7.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-2.0, 1.0], [-2.0, 6.0], [-3.0, 6.0]], [[-2.0, 4.0], [4.0, -4.0], [3.0, 3.0]]], [[[-4.0, -7.0], 
-[-2.0, 5.0], [7.0, 0.0]], [[1.0, -3.0], [7.0, -4.0], [3.0, 6.0]]], [[[-7.0, -7.0], [-6.0, 5.0], [0.0, 6.0]], [[-2.0, 0.0], 
-[0.0, -5.0], [0.0, 0.0]]], [[[-1.0, -5.0], [1.0, -6.0], [-6.0, -5.0]], [[7.0, 3.0], [7.0, 4.0], [1.0, 
-4.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      ref=Data(108.0,self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_array_rank1(self):
+      arg0=Data(numpy.array([[-6.0, 4.0, 0.0], [-3.0, 6.0, -1.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, -3.0, -1.0], [-7.0, 3.0, -7.0]]))
+      arg1=numpy.array([4.0, -7.0, 0.0])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([-52.0, -54.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([37.0, -49.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_constData_rank1_offset0(self):
-      arg0=Data(-7.0,self.functionspace)
-      arg1=Data(numpy.array([2.0, 2.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-14.0, -14.0]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_array_rank2(self):
+      arg0=Data(numpy.array([[4.0, -5.0, 5.0], [-5.0, -2.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 1.0, -1.0], [7.0, 0.0, -3.0]]))
+      arg1=numpy.array([[-7.0, -2.0, 6.0], [-6.0, 3.0, -4.0]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[12.0, -59.0], [51.0, 16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-50.0, -29.0], [-67.0, -30.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([3.0, -2.0, 4.0]),self.functionspace)
-      arg1=Data(numpy.array([[-3.0, -2.0, 1.0], [-6.0, -5.0, -1.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-1.0, -12.0]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_constData_rank1(self):
+      arg0=Data(numpy.array([[2.0, -2.0, -4.0], [-1.0, 2.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 0.0, 0.0], [3.0, -2.0, 0.0]]))
+      arg1=Data(numpy.array([3.0, -6.0, -1.0]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([22.0, -9.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-18.0, 21.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[1.0, -7.0, 0.0], [-2.0, -5.0, 4.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[-7.0, 3.0, 1.0], [-2.0, 2.0, -4.0]], [[-5.0, 6.0, 4.0], [0.0, 4.0, -5.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-50.0, -87.0]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_constData_rank2(self):
+      arg0=Data(numpy.array([[-2.0, 0.0, -3.0], [0.0, -3.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 1.0, 7.0], [-5.0, -7.0, -4.0]]))
+      arg1=Data(numpy.array([[7.0, -3.0, -1.0], [0.0, 6.0, -3.0]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[-11.0, 9.0], [4.0, -33.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-17.0, -15.0], [-10.0, -30.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[2.0, -4.0, -7.0], [6.0, -3.0, 2.0], [-4.0, 1.0, -7.0], [1.0, 0.0, 1.0]], [[1.0, 0.0, 6.0], 
-[-5.0, -5.0, -5.0], [0.0, -3.0, 3.0], [5.0, -3.0, 4.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[1.0, 0.0, 7.0], [6.0, -7.0, -6.0], [-2.0, -3.0, -2.0], [-2.0, -5.0, 0.0]], [[6.0, -1.0, 5.0], 
-[-2.0, -7.0, 0.0], [-1.0, 5.0, -4.0], [5.0, -3.0, 2.0]]], [[[-6.0, -6.0, -2.0], [6.0, 1.0, -1.0], [0.0, -5.0, 4.0], [6.0, -7.0, 
-0.0]], [[-4.0, 6.0, -7.0], [6.0, -5.0, 2.0], [5.0, -2.0, -5.0], [4.0, -2.0, 4.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([111.0, 2.0]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_taggedData_rank1(self):
+      arg0=Data(numpy.array([[-4.0, -7.0, 6.0], [-6.0, 7.0, -5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -2.0, 0.0], [0.0, 4.0, -1.0]]))
+      arg1=Data(numpy.array([3.0, -7.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-4.0, 2.0, -7.0]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([-5.0, -32.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-32.0, 15.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_constData_rank2_offset0(self):
-      arg0=Data(-5.0,self.functionspace)
-      arg1=Data(numpy.array([[7.0, -7.0, 5.0, -6.0, 0.0], [4.0, 0.0, -6.0, 7.0, 0.0], [-1.0, 0.0, 6.0, -5.0, 0.0], [1.0, -1.0, 
-5.0, -2.0, 0.0]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-35.0, 35.0, -25.0, 30.0, -0.0], [-20.0, -0.0, 30.0, -35.0, -0.0], [5.0, -0.0, -30.0, 25.0, -0.0], 
-[-5.0, 5.0, -25.0, 10.0, -0.0]]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_taggedData_rank2(self):
+      arg0=Data(numpy.array([[-4.0, -1.0, 6.0], [-4.0, 5.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, 6.0, -3.0], [-1.0, -7.0, -7.0]]))
+      arg1=Data(numpy.array([[-5.0, 0.0, -3.0], [0.0, -7.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-7.0, 4.0, 4.0], [-7.0, 6.0, 6.0]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[2.0, 1.0], [41.0, -28.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[26.0, 32.0], [-49.0, -77.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([7.0, -7.0, 2.0]),self.functionspace)
-      arg1=Data(numpy.array([[[-2.0, 2.0, -2.0], [-7.0, 5.0, 0.0], [-2.0, 4.0, -7.0], [1.0, 7.0, 1.0], [1.0, 0.0, 0.0]], [[5.0, 
--5.0, 3.0], [4.0, 3.0, 1.0], [-6.0, -3.0, -5.0], [-2.0, -1.0, 3.0], [-7.0, 0.0, 2.0]], [[0.0, -1.0, -3.0], [6.0, -4.0, 2.0], 
-[6.0, -5.0, 6.0], [-5.0, 4.0, 0.0], [-3.0, 3.0, 4.0]], [[-3.0, 1.0, 2.0], [2.0, -2.0, -3.0], [-3.0, -4.0, 5.0], [-4.0, -2.0, 
-4.0], [-2.0, 1.0, -1.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-32.0, -84.0, -56.0, -40.0, 7.0], [76.0, 9.0, -31.0, -1.0, -45.0], [1.0, 74.0, 89.0, -63.0, 
--34.0], [-24.0, 22.0, 17.0, -6.0, -23.0]]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_expandedData_rank1(self):
+      arg0=Data(numpy.array([[-1.0, -2.0, -5.0], [0.0, 4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -2.0, 2.0], [-2.0, -6.0, -7.0]]))
+      arg1=Data(numpy.array([6.0, 5.0, 5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, 1.0, 0.0]))
+      arg1.expand()
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-41.0, 20.0])+(1.-msk_ref)*numpy.array([5.0, -4.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=tensor_transposed_mult(arg0,arg1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[6.0, -1.0, -5.0], [0.0, 3.0, 0.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-4.0, -4.0, -4.0], [-5.0, 0.0, 6.0]], [[5.0, 6.0, -3.0], [-2.0, -3.0, 0.0]], [[-1.0, -3.0, 
--1.0], [0.0, -5.0, -2.0]], [[4.0, -4.0, 6.0], [7.0, 4.0, 6.0]], [[-2.0, 0.0, -4.0], [0.0, -6.0, 7.0]]], [[[-7.0, 2.0, 7.0], 
-[6.0, -5.0, -6.0]], [[3.0, 0.0, 0.0], [-2.0, 2.0, -1.0]], [[-5.0, -3.0, -4.0], [6.0, -4.0, -5.0]], [[0.0, -4.0, 7.0], [7.0, 
-1.0, 0.0]], [[7.0, 6.0, 6.0], [1.0, -4.0, 0.0]]], [[[-5.0, -5.0, -5.0], [0.0, 5.0, -1.0]], [[1.0, -1.0, 2.0], [2.0, -2.0, 
-3.0]], [[2.0, 2.0, 4.0], [6.0, 2.0, 5.0]], [[-3.0, -6.0, 0.0], [-2.0, -4.0, 4.0]], [[0.0, 0.0, 6.0], [5.0, -5.0, 2.0]]], 
-[[[0.0, 3.0, -4.0], [-1.0, 7.0, 0.0]], [[4.0, -5.0, 5.0], [6.0, -2.0, 3.0]], [[3.0, -4.0, 6.0], [4.0, -1.0, 4.0]], [[-2.0, 
--7.0, 5.0], [-1.0, -1.0, 0.0]], [[4.0, -5.0, -1.0], [3.0, -3.0, -5.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[0.0, 30.0, -13.0, 10.0, -10.0], [-94.0, 24.0, -19.0, -28.0, -6.0], [15.0, -9.0, -4.0, -24.0, 
--45.0], [38.0, -2.0, -11.0, -33.0, 25.0]]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank2_expandedData_rank2(self):
+      arg0=Data(numpy.array([[7.0, 0.0, -1.0], [4.0, 3.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, -4.0, 5.0], [0.0, -4.0, 4.0]]))
+      arg1=Data(numpy.array([[-7.0, 5.0, -1.0], [-1.0, -1.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, 3.0, -3.0], [3.0, 0.0, 0.0]]))
+      arg1.expand()
+      res=tensor_transposed_mult(arg0,arg1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-48.0, -13.0], [-20.0, 35.0]])+(1.-msk_ref)*numpy.array([[-28.0, 3.0], [-24.0, 0.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_constData_rank3_offset0(self):
-      arg0=Data(-1.0,self.functionspace)
-      arg1=Data(numpy.array([[[-4.0, 1.0], [0.0, 0.0]], [[-5.0, -6.0], [5.0, 6.0]], [[-2.0, 7.0], [-2.0, 1.0]], [[1.0, -7.0], 
-[0.0, -4.0]], [[0.0, -1.0], [5.0, 1.0]], [[0.0, -6.0], [-5.0, 3.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[4.0, -1.0], [-0.0, -0.0]], [[5.0, 6.0], [-5.0, -6.0]], [[2.0, -7.0], [2.0, -1.0]], [[-1.0, 7.0], 
-[-0.0, 4.0]], [[-0.0, 1.0], [-5.0, -1.0]], [[-0.0, 6.0], [5.0, -3.0]]]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank4_array_rank2(self):
+      arg0=Data(numpy.array([[[[-7.0, -4.0, -4.0], [4.0, -5.0, 4.0]], [[-5.0, 2.0, 2.0], [1.0, 0.0, 4.0]], [[-1.0, 2.0, -4.0], 
+[5.0, 7.0, -7.0]], [[4.0, -1.0, 1.0], [-1.0, -7.0, -4.0]], [[6.0, -1.0, 0.0], [5.0, 4.0, 3.0]]], [[[-2.0, -2.0, 1.0], [-1.0, 
+2.0, 5.0]], [[-4.0, 2.0, -7.0], [-3.0, -5.0, -2.0]], [[0.0, 4.0, -2.0], [2.0, -2.0, 4.0]], [[1.0, 0.0, -1.0], [-3.0, 3.0, 
+0.0]], [[-6.0, 6.0, 0.0], [0.0, -4.0, 1.0]]], [[[0.0, -6.0, -7.0], [-5.0, 0.0, -5.0]], [[2.0, 4.0, 2.0], [0.0, -1.0, 5.0]], 
+[[-5.0, 4.0, 2.0], [1.0, 1.0, 2.0]], [[-4.0, -1.0, -5.0], [1.0, -6.0, -5.0]], [[0.0, 3.0, 0.0], [-2.0, 7.0, 2.0]]], [[[0.0, 
+-6.0, 0.0], [7.0, 4.0, 4.0]], [[5.0, 4.0, 3.0], [-2.0, 0.0, 5.0]], [[3.0, 1.0, 7.0], [-4.0, -7.0, -7.0]], [[0.0, -1.0, 5.0], 
+[0.0, -1.0, 7.0]], [[2.0, -2.0, 7.0], [4.0, 1.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 0.0, 2.0], [3.0, -7.0, 0.0]], [[3.0, 1.0, -7.0], [6.0, 7.0, 4.0]], [[-3.0, 
+-2.0, -4.0], [-3.0, -2.0, 5.0]], [[-5.0, -6.0, -5.0], [7.0, -3.0, -1.0]], [[1.0, 5.0, 1.0], [5.0, 7.0, -7.0]]], [[[-1.0, -7.0, 
+-5.0], [5.0, 3.0, 7.0]], [[0.0, 3.0, -5.0], [-3.0, 4.0, 7.0]], [[7.0, -3.0, -6.0], [4.0, 6.0, 0.0]], [[2.0, -7.0, 3.0], [6.0, 
+6.0, 3.0]], [[-2.0, -7.0, -3.0], [7.0, -3.0, -2.0]]], [[[0.0, 7.0, 5.0], [-4.0, -3.0, 2.0]], [[0.0, -7.0, 3.0], [-3.0, 1.0, 
+5.0]], [[1.0, 3.0, -4.0], [3.0, 5.0, -6.0]], [[-4.0, -6.0, -5.0], [5.0, 0.0, 1.0]], [[-4.0, -4.0, -6.0], [-6.0, 0.0, 5.0]]], 
+[[[-7.0, 1.0, 1.0], [0.0, 5.0, -6.0]], [[3.0, 3.0, 0.0], [-6.0, 5.0, -3.0]], [[6.0, -3.0, -5.0], [0.0, -4.0, -3.0]], [[-1.0, 
+0.0, -4.0], [7.0, -7.0, 3.0]], [[2.0, -3.0, -4.0], [-4.0, -4.0, -1.0]]]]))
+      arg1=numpy.array([[0.0, 6.0, -6.0], [4.0, 4.0, -3.0]])
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[-16.0, -8.0, 105.0, -32.0, 21.0], [-29.0, 28.0, 24.0, 6.0, 17.0], [1.0, -7.0, 14.0, 19.0, 32.0], 
+[-4.0, -17.0, -59.0, -61.0, -16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-28.0, 88.0, -23.0, 13.0, 93.0], [-1.0, 31.0, 58.0, -21.0, -2.0], [-22.0, -83.0, 92.0, 
+11.0, -27.0], [38.0, 23.0, 5.0, 15.0, -23.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_taggedData_rank4_array_rank3(self):
+      arg0=Data(numpy.array([[[[-5.0, -5.0, 2.0], [6.0, -2.0, 0.0]], [[-3.0, 6.0, 0.0], [0.0, 5.0, 2.0]], [[-2.0, -7.0, 7.0], 
+[-5.0, 0.0, 3.0]], [[-2.0, 0.0, 0.0], [1.0, 4.0, 5.0]], [[-1.0, 6.0, -6.0], [4.0, -3.0, -5.0]]], [[[5.0, -6.0, -4.0], [-2.0, 
+-1.0, 7.0]], [[-2.0, 4.0, -1.0], [7.0, -2.0, 3.0]], [[7.0, 4.0, 5.0], [-5.0, -2.0, -1.0]], [[-4.0, 6.0, -5.0], [6.0, 0.0, 
+-1.0]], [[-3.0, -1.0, 1.0], [7.0, 5.0, 4.0]]], [[[-3.0, 5.0, 0.0], [4.0, 2.0, -6.0]], [[2.0, -2.0, -2.0], [-7.0, 5.0, -4.0]], 
+[[2.0, -3.0, -1.0], [-5.0, 3.0, 4.0]], [[-5.0, 0.0, -1.0], [-6.0, -1.0, -4.0]], [[7.0, -3.0, 3.0], [2.0, -1.0, -4.0]]], 
+[[[-7.0, 0.0, 0.0], [6.0, 0.0, 5.0]], [[0.0, 1.0, -3.0], [-7.0, 1.0, -7.0]], [[0.0, -5.0, 3.0], [4.0, 4.0, 5.0]], [[0.0, 6.0, 
+2.0], [0.0, 0.0, 0.0]], [[5.0, -5.0, 0.0], [1.0, 0.0, -2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 6.0, 2.0], [2.0, -5.0, -3.0]], [[4.0, 1.0, -6.0], [-1.0, -4.0, -6.0]], [[5.0, 
+-3.0, -6.0], [7.0, 1.0, 5.0]], [[1.0, 3.0, 3.0], [3.0, -1.0, -4.0]], [[0.0, 4.0, -3.0], [2.0, 7.0, 2.0]]], [[[-1.0, -3.0, 
+-5.0], [3.0, -3.0, -7.0]], [[-6.0, -1.0, 5.0], [1.0, 6.0, -6.0]], [[3.0, -7.0, -2.0], [-7.0, -1.0, 6.0]], [[7.0, 5.0, 1.0], 
+[0.0, 3.0, -1.0]], [[5.0, -5.0, 7.0], [-4.0, 7.0, 7.0]]], [[[-2.0, 5.0, -5.0], [-7.0, 3.0, 4.0]], [[7.0, -1.0, 6.0], [-2.0, 
+-5.0, 6.0]], [[-2.0, -5.0, -3.0], [-4.0, -3.0, 6.0]], [[6.0, 1.0, 3.0], [3.0, 0.0, -2.0]], [[0.0, 1.0, 4.0], [-4.0, 0.0, 
+-2.0]]], [[[-2.0, 2.0, 0.0], [-7.0, 3.0, -7.0]], [[6.0, 4.0, 4.0], [-7.0, -3.0, 4.0]], [[-4.0, -7.0, -3.0], [5.0, 0.0, 5.0]], 
+[[0.0, 5.0, 6.0], [4.0, -2.0, 5.0]], [[0.0, 1.0, -7.0], [-1.0, -3.0, 7.0]]]]))
+      arg1=numpy.array([[[-5.0, -3.0, 0.0], [5.0, 3.0, -4.0]], [[4.0, 2.0, 4.0], [1.0, -2.0, 4.0]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[64.0, -12.0], [4.0, -2.0], [-6.0, 13.0], [7.0, 5.0], [18.0, -26.0]], [[-48.0, 20.0], [15.0, 
+19.0], [-74.0, 51.0], [36.0, -22.0], [52.0, 3.0]], [[50.0, -26.0], [-8.0, -37.0], [-33.0, 3.0], [8.0, -44.0], [-3.0, 22.0]], 
+[[45.0, -2.0], [-7.0, -47.0], [27.0, 18.0], [-18.0, 20.0], [3.0, 3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-21.0, 28.0], [-16.0, -23.0], [2.0, 15.0], [14.0, 11.0], [11.0, -8.0]], [[48.0, 
+-49.0], [80.0, -41.0], [-56.0, 9.0], [-37.0, 32.0], [-37.0, 48.0]], [[-47.0, -15.0], [-81.0, 82.0], [-28.0, -4.0], [-10.0, 
+33.0], [-15.0, 6.0]], [[6.0, -45.0], [-102.0, 63.0], [46.0, -17.0], [-21.0, 62.0], [-45.0, 7.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank4_offset1(self):
-      arg0=Data(numpy.array([-6.0, 7.0, 0.0]),self.functionspace)
-      arg1=Data(numpy.array([[[[3.0, -2.0, -3.0], [-4.0, -2.0, -5.0]], [[3.0, 6.0, 6.0], [-7.0, 4.0, -5.0]]], [[[1.0, 6.0, 
-0.0], [-4.0, 0.0, -5.0]], [[-5.0, -1.0, -7.0], [5.0, -5.0, -1.0]]], [[[7.0, 1.0, 4.0], [0.0, -4.0, 3.0]], [[-7.0, -2.0, -2.0], 
-[-7.0, -2.0, -7.0]]], [[[0.0, -3.0, 7.0], [6.0, -1.0, 3.0]], [[7.0, -7.0, -3.0], [-6.0, 1.0, 6.0]]], [[[7.0, 2.0, 6.0], [3.0, 
-2.0, -3.0]], [[5.0, 7.0, -5.0], [7.0, -2.0, -4.0]]], [[[6.0, 2.0, 3.0], [6.0, 2.0, 3.0]], [[6.0, 1.0, 4.0], [-6.0, 0.0, 
-5.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-32.0, 10.0], [24.0, 70.0]], [[36.0, 24.0], [23.0, -65.0]], [[-35.0, -28.0], [28.0, 28.0]], 
-[[-21.0, -43.0], [-91.0, 43.0]], [[-28.0, -4.0], [19.0, -56.0]], [[-22.0, -22.0], [-29.0, 36.0]]]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank4_array_rank4(self):
+      arg0=Data(numpy.array([[[[-6.0, 0.0, 6.0], [-3.0, 1.0, 6.0]], [[1.0, -3.0, -4.0], [0.0, 5.0, 1.0]], [[3.0, -1.0, 0.0], 
+[0.0, 2.0, 2.0]], [[-2.0, 1.0, -5.0], [2.0, 1.0, 0.0]], [[4.0, -3.0, -3.0], [1.0, 0.0, 1.0]]], [[[-5.0, 1.0, -7.0], [7.0, -3.0, 
+2.0]], [[2.0, -5.0, 1.0], [-7.0, 6.0, 6.0]], [[-5.0, 7.0, -2.0], [6.0, 4.0, 2.0]], [[-4.0, 0.0, 4.0], [6.0, 6.0, -3.0]], 
+[[-1.0, -2.0, 1.0], [-6.0, -1.0, 7.0]]], [[[0.0, 4.0, 2.0], [-3.0, -6.0, -2.0]], [[-4.0, 1.0, 4.0], [-5.0, -5.0, -6.0]], [[0.0, 
+2.0, -7.0], [5.0, 6.0, 5.0]], [[-5.0, 0.0, 0.0], [2.0, 3.0, -7.0]], [[-7.0, 1.0, 2.0], [5.0, 0.0, 0.0]]], [[[3.0, -5.0, -1.0], 
+[-3.0, 3.0, 3.0]], [[1.0, 2.0, 3.0], [3.0, 7.0, 0.0]], [[-1.0, 2.0, -5.0], [-7.0, 6.0, -1.0]], [[2.0, -7.0, -2.0], [4.0, -5.0, 
+2.0]], [[-6.0, -4.0, 4.0], [7.0, -1.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, 2.0, -5.0], [7.0, 7.0, -6.0]], [[-6.0, 0.0, 6.0], [-5.0, 2.0, -7.0]], [[-5.0, 
+7.0, 7.0], [1.0, -7.0, -2.0]], [[1.0, 0.0, 4.0], [7.0, 0.0, 6.0]], [[7.0, -4.0, -3.0], [2.0, 7.0, -1.0]]], [[[6.0, 1.0, -1.0], 
+[-3.0, -2.0, 0.0]], [[2.0, -7.0, -4.0], [7.0, 2.0, 4.0]], [[4.0, 0.0, 6.0], [2.0, 4.0, -1.0]], [[-2.0, -4.0, -3.0], [7.0, -3.0, 
+-5.0]], [[-5.0, 6.0, 0.0], [6.0, 7.0, 7.0]]], [[[2.0, -2.0, 3.0], [0.0, 1.0, 7.0]], [[-3.0, -7.0, 5.0], [3.0, 2.0, 0.0]], 
+[[0.0, 5.0, -3.0], [6.0, 0.0, -3.0]], [[3.0, -3.0, 1.0], [0.0, -1.0, 5.0]], [[6.0, -4.0, -5.0], [4.0, 4.0, 4.0]]], [[[7.0, 5.0, 
+5.0], [-6.0, 3.0, 6.0]], [[4.0, 2.0, 0.0], [0.0, -5.0, -3.0]], [[-5.0, -4.0, 6.0], [2.0, -3.0, 2.0]], [[7.0, 0.0, -7.0], [-2.0, 
+7.0, 7.0]], [[6.0, 0.0, 3.0], [5.0, -5.0, 2.0]]]]))
+      arg1=numpy.array([[[[-4.0, 7.0, -6.0], [4.0, -3.0, 0.0]], [[1.0, 4.0, 6.0], [1.0, 1.0, -2.0]], [[-4.0, -3.0, 1.0], [4.0, 
+-1.0, 0.0]], [[3.0, -1.0, 4.0], [-4.0, 3.0, 5.0]], [[-4.0, 3.0, 0.0], [0.0, 1.0, 4.0]]], [[[6.0, 5.0, -2.0], [7.0, 4.0, 4.0]], 
+[[0.0, 0.0, 7.0], [3.0, 5.0, -4.0]], [[3.0, 7.0, 3.0], [-1.0, -5.0, -7.0]], [[7.0, -6.0, 6.0], [0.0, 5.0, -2.0]], [[3.0, -7.0, 
+6.0], [6.0, -7.0, 5.0]]], [[[-1.0, 7.0, -2.0], [2.0, 0.0, 6.0]], [[-2.0, -2.0, 3.0], [3.0, -2.0, -7.0]], [[6.0, 4.0, -1.0], 
+[2.0, -1.0, 7.0]], [[5.0, -2.0, 1.0], [3.0, -7.0, 4.0]], [[-6.0, -6.0, 2.0], [-5.0, 1.0, -7.0]]], [[[-7.0, -1.0, 4.0], [3.0, 
+-6.0, -2.0]], [[-4.0, -2.0, 7.0], [-3.0, -1.0, -5.0]], [[0.0, 1.0, 7.0], [-7.0, -5.0, 3.0]], [[-3.0, -7.0, 7.0], [4.0, 7.0, 
+-2.0]], [[0.0, -3.0, -5.0], [2.0, -5.0, 2.0]]]])
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[-27.0, 16.0, 17.0, 51.0, 49.0], [-41.0, 14.0, -44.0, -13.0, 23.0], [24.0, -23.0, -7.0, -16.0, 
+22.0], [39.0, 44.0, 76.0, 43.0, -29.0]], [[-16.0, -32.0, -4.0, 10.0, -4.0], [23.0, -7.0, -62.0, 24.0, -30.0], [-8.0, -25.0, 
+0.0, -24.0, 2.0], [-52.0, -36.0, -53.0, 23.0, 6.0]], [[-25.0, -3.0, -11.0, 26.0, -5.0], [29.0, 2.0, -22.0, 33.0, 12.0], [2.0, 
+-22.0, 26.0, 11.0, -24.0], [-36.0, -22.0, -5.0, 8.0, -3.0]], [[50.0, -25.0, 7.0, -32.0, 12.0], [21.0, -24.0, -21.0, -45.0, 
+-38.0], [23.0, -9.0, 0.0, -18.0, -13.0], [-7.0, -36.0, -53.0, -21.0, 21.0]], [[-15.0, -27.0, -6.0, 4.0, -21.0], [26.0, -22.0, 
+-26.0, 26.0, 26.0], [-11.0, -15.0, 24.0, 30.0, -24.0], [-36.0, -39.0, -28.0, -10.0, 28.0]]], [[[106.0, -43.0, 41.0, -71.0, 
+28.0], [34.0, -51.0, -35.0, -102.0, 9.0], [52.0, 0.0, 12.0, 16.0, -42.0], [41.0, -59.0, -76.0, -38.0, 65.0]], [[-95.0, -25.0, 
+-26.0, 91.0, 7.0], [-16.0, -8.0, -91.0, 68.0, -7.0], [-17.0, -66.0, 13.0, -18.0, 19.0], [-74.0, -6.0, 39.0, 38.0, -22.0]], 
+[[93.0, 17.0, 17.0, -32.0, 53.0], [75.0, 16.0, -12.0, -73.0, -58.0], [82.0, -14.0, 22.0, -43.0, -56.0], [10.0, -40.0, -63.0, 
+0.0, -15.0]], [[-2.0, 38.0, 38.0, -17.0, 10.0], [22.0, 88.0, -15.0, 32.0, -9.0], [-10.0, 47.0, -43.0, -52.0, 29.0], [32.0, 
+35.0, -53.0, 112.0, -44.0]], [[-37.0, -24.0, -12.0, 59.0, 25.0], [-36.0, -44.0, -52.0, -8.0, 23.0], [15.0, -56.0, 23.0, 17.0, 
+0.0], [-13.0, -1.0, 73.0, -21.0, 8.0]]], [[[22.0, 23.0, -16.0, -12.0, -2.0], [-37.0, -17.0, 81.0, -38.0, -2.0], [6.0, 15.0, 
+0.0, 19.0, 3.0], [35.0, 31.0, 63.0, -64.0, -2.0]], [[-6.0, 26.0, 2.0, -22.0, -10.0], [-106.0, 12.0, 79.0, -23.0, -20.0], 
+[-43.0, 55.0, -71.0, -22.0, 88.0], [70.0, 92.0, 71.0, -10.0, -20.0]], [[58.0, -33.0, 1.0, -7.0, 32.0], [103.0, -24.0, -77.0, 
+-34.0, -43.0], [68.0, -57.0, 54.0, -18.0, -80.0], [-61.0, -99.0, -97.0, -11.0, 19.0]], [[19.0, 14.0, 25.0, -49.0, -5.0], 
+[-32.0, 49.0, 17.0, -6.0, -59.0], [-33.0, 59.0, -78.0, -68.0, 72.0], [37.0, 46.0, -50.0, 58.0, -25.0]], [[43.0, 14.0, 47.0, 
+-34.0, 31.0], [-6.0, 29.0, -13.0, -43.0, 14.0], [20.0, 33.0, -30.0, -20.0, 15.0], [71.0, 25.0, -20.0, 48.0, -3.0]]], [[[-62.0, 
+-29.0, -13.0, 46.0, -12.0], [-2.0, -13.0, -62.0, 54.0, 14.0], [-24.0, -35.0, 11.0, 6.0, 7.0], [-53.0, -18.0, 3.0, 22.0, 5.0]], 
+[[-17.0, 37.0, -2.0, 22.0, 9.0], [59.0, 65.0, -12.0, 48.0, -24.0], [13.0, -2.0, 10.0, -36.0, -20.0], [-30.0, -3.0, -33.0, 65.0, 
+-50.0]], [[2.0, -22.0, -41.0, 16.0, 12.0], [-15.0, -22.0, -20.0, -17.0, -136.0], [5.0, -43.0, -20.0, -81.0, 32.0], [-70.0, 
+-15.0, -17.0, -30.0, -27.0]], [[-14.0, -43.0, 32.0, -16.0, -26.0], [-3.0, -35.0, -42.0, 15.0, 112.0], [-27.0, 12.0, 13.0, 77.0, 
+-13.0], [23.0, -25.0, -18.0, 6.0, 68.0]], [[3.0, 8.0, 69.0, -29.0, 11.0], [-19.0, 44.0, -36.0, 1.0, 83.0], [-16.0, 55.0, -41.0, 
+10.0, 32.0], [89.0, 40.0, -20.0, 95.0, 11.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[71.0, -1.0, 30.0, -74.0, 9.0], [43.0, 45.0, -16.0, -30.0, -96.0], [7.0, 40.0, -52.0, 
+-86.0, 22.0], [4.0, -17.0, -135.0, 55.0, -14.0]], [[-38.0, 41.0, 8.0, -3.0, -2.0], [-103.0, 65.0, 44.0, 18.0, -61.0], [-58.0, 
+60.0, -103.0, -81.0, 124.0], [53.0, 114.0, 46.0, 68.0, -64.0]], [[52.0, 63.0, 17.0, -29.0, 26.0], [-38.0, 25.0, 103.0, -66.0, 
+23.0], [30.0, 48.0, -14.0, 12.0, 4.0], [105.0, 69.0, 78.0, -26.0, -23.0]], [[0.0, 20.0, 28.0, 21.0, 20.0], [71.0, 25.0, -34.0, 
+19.0, 99.0], [41.0, -11.0, 58.0, 54.0, -75.0], [18.0, -27.0, -3.0, 41.0, 6.0]], [[-51.0, -16.0, -18.0, 21.0, -37.0], [66.0, 
+24.0, -46.0, 92.0, -11.0], [-31.0, -16.0, 19.0, -7.0, -20.0], [-91.0, -49.0, -77.0, 45.0, -6.0]]], [[[-17.0, -1.0, -38.0, 19.0, 
+-23.0], [14.0, -26.0, 35.0, 20.0, 1.0], [-3.0, -22.0, 37.0, 32.0, -31.0], [-44.0, -22.0, 25.0, -58.0, 6.0]], [[-11.0, -49.0, 
+35.0, -5.0, -11.0], [58.0, -13.0, -100.0, 34.0, 79.0], [-5.0, -13.0, 28.0, 43.0, -39.0], [-22.0, -65.0, -82.0, 49.0, 53.0]], 
+[[-56.0, 48.0, -6.0, 35.0, -16.0], [38.0, 72.0, 15.0, 86.0, 27.0], [-18.0, 15.0, 11.0, 0.0, -11.0], [-20.0, 21.0, 5.0, 68.0, 
+-48.0]], [[35.0, -22.0, 48.0, -76.0, -27.0], [-9.0, 5.0, 0.0, -13.0, 42.0], [-36.0, 65.0, -43.0, 17.0, 27.0], [55.0, 2.0, 
+-74.0, 30.0, 46.0]], [[65.0, 18.0, 19.0, 11.0, 73.0], [98.0, 25.0, -63.0, -50.0, -35.0], [101.0, -47.0, 48.0, -40.0, -78.0], 
+[-9.0, -52.0, -50.0, 32.0, -27.0]]], [[[-43.0, -1.0, 0.0, 58.0, 15.0], [28.0, -2.0, -53.0, 35.0, 66.0], [20.0, -42.0, 49.0, 
+38.0, -42.0], [-20.0, -19.0, 35.0, 22.0, 0.0]], [[-61.0, 4.0, 48.0, 12.0, -7.0], [-34.0, 54.0, -56.0, 61.0, 74.0], [-50.0, 
+40.0, -47.0, -1.0, 57.0], [45.0, 50.0, -3.0, 119.0, -8.0]], [[77.0, 14.0, 6.0, -56.0, 3.0], [61.0, 9.0, 41.0, -42.0, -32.0], 
+[35.0, 20.0, 14.0, -7.0, -45.0], [7.0, -34.0, -67.0, -26.0, 6.0]], [[-36.0, -14.0, -1.0, 38.0, -2.0], [17.0, -18.0, -39.0, 
+30.0, 68.0], [4.0, -30.0, 41.0, 49.0, -34.0], [-18.0, -23.0, 24.0, 2.0, 19.0]], [[-18.0, -40.0, -5.0, 18.0, -16.0], [86.0, 
+-19.0, -77.0, 48.0, 32.0], [8.0, -43.0, 57.0, 33.0, -66.0], [-78.0, -87.0, -75.0, 11.0, 33.0]]], [[[-56.0, 42.0, -65.0, 99.0, 
+14.0], [51.0, 8.0, 20.0, 52.0, -11.0], [42.0, -75.0, 84.0, 15.0, -71.0], [-82.0, -18.0, 85.0, -36.0, -55.0]], [[13.0, 13.0, 
+-17.0, -20.0, -27.0], [2.0, -13.0, 72.0, -3.0, 18.0], [-8.0, 19.0, 16.0, 39.0, -20.0], [6.0, 0.0, 18.0, -55.0, 13.0]], [[-27.0, 
+10.0, 49.0, 6.0, 13.0], [-52.0, 25.0, -26.0, 6.0, 92.0], [-19.0, 34.0, -31.0, 24.0, 39.0], [83.0, 57.0, 45.0, 68.0, 5.0]], 
+[[-15.0, -44.0, -50.0, 57.0, 7.0], [98.0, -48.0, -82.0, 28.0, -47.0], [45.0, -104.0, 87.0, 1.0, -88.0], [-139.0, -113.0, -49.0, 
+-43.0, 10.0]], [[-7.0, 20.0, 4.0, 5.0, -21.0], [53.0, 3.0, 33.0, 31.0, 111.0], [10.0, 8.0, 62.0, 91.0, -74.0], [11.0, -23.0, 
+17.0, -16.0, 24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_constData_rank4_offset0(self):
-      arg0=Data(-4.0,self.functionspace)
-      arg1=Data(numpy.array([[[[-6.0, 0.0, -5.0, 3.0], [-1.0, 0.0, 5.0, 2.0], [-1.0, -2.0, 5.0, 1.0]], [[0.0, -4.0, -2.0, 2.0], 
-[-5.0, -1.0, 6.0, 0.0], [0.0, -4.0, 5.0, 4.0]]], [[[2.0, 1.0, -3.0, -6.0], [7.0, 1.0, -5.0, 7.0], [4.0, 7.0, 1.0, 4.0]], [[6.0, 
--3.0, 0.0, -3.0], [5.0, -3.0, 0.0, 0.0], [-7.0, 7.0, -5.0, 2.0]]], [[[0.0, 0.0, 1.0, -1.0], [-3.0, 7.0, 5.0, -3.0], [0.0, 1.0, 
--2.0, 3.0]], [[-6.0, 6.0, -4.0, -6.0], [-1.0, -1.0, -1.0, -4.0], [-2.0, -7.0, -4.0, -2.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[24.0, -0.0, 20.0, -12.0], [4.0, -0.0, -20.0, -8.0], [4.0, 8.0, -20.0, -4.0]], [[-0.0, 16.0, 8.0, 
--8.0], [20.0, 4.0, -24.0, -0.0], [-0.0, 16.0, -20.0, -16.0]]], [[[-8.0, -4.0, 12.0, 24.0], [-28.0, -4.0, 20.0, -28.0], [-16.0, 
--28.0, -4.0, -16.0]], [[-24.0, 12.0, -0.0, 12.0], [-20.0, 12.0, -0.0, -0.0], [28.0, -28.0, 20.0, -8.0]]], [[[-0.0, -0.0, -4.0, 
-4.0], [12.0, -28.0, -20.0, 12.0], [-0.0, -4.0, 8.0, -12.0]], [[24.0, -24.0, 16.0, 24.0], [4.0, 4.0, 4.0, 16.0], [8.0, 28.0, 
-16.0, 8.0]]]]),self.functionspace)
+   def test_tensor_transposed_mult_taggedData_rank4_constData_rank2(self):
+      arg0=Data(numpy.array([[[[2.0, -7.0, 3.0], [7.0, 3.0, -6.0]], [[1.0, -7.0, -5.0], [0.0, 0.0, 3.0]], [[-6.0, -7.0, 1.0], 
+[-4.0, 4.0, -5.0]], [[3.0, -5.0, -3.0], [5.0, -4.0, 7.0]], [[-3.0, -2.0, 2.0], [7.0, 1.0, 0.0]]], [[[-1.0, 1.0, 1.0], [4.0, 
+2.0, 2.0]], [[-1.0, 5.0, 4.0], [0.0, 7.0, -6.0]], [[1.0, -5.0, -6.0], [-7.0, -2.0, 4.0]], [[6.0, 6.0, 3.0], [-7.0, 1.0, 4.0]], 
+[[3.0, -2.0, 1.0], [-3.0, -4.0, -7.0]]], [[[0.0, -6.0, -2.0], [-3.0, 2.0, 0.0]], [[-4.0, 3.0, 4.0], [-2.0, 5.0, -5.0]], [[-1.0, 
+4.0, 4.0], [-5.0, 3.0, -1.0]], [[0.0, -3.0, -7.0], [3.0, -5.0, -1.0]], [[5.0, 5.0, -7.0], [-3.0, -1.0, 5.0]]], [[[-1.0, 2.0, 
+4.0], [3.0, -6.0, 7.0]], [[-3.0, 0.0, -6.0], [-7.0, -6.0, 0.0]], [[-3.0, 0.0, 3.0], [0.0, -5.0, 5.0]], [[0.0, 0.0, 3.0], [6.0, 
+1.0, -7.0]], [[-6.0, 5.0, 6.0], [0.0, -2.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 0.0, 2.0], [2.0, 0.0, -4.0]], [[-4.0, -7.0, 2.0], [1.0, 5.0, 2.0]], [[1.0, 
+7.0, -1.0], [0.0, 4.0, 6.0]], [[-5.0, -7.0, 5.0], [-1.0, 6.0, 2.0]], [[-5.0, -5.0, -1.0], [-3.0, 0.0, -4.0]]], [[[5.0, 5.0, 
+-4.0], [0.0, 3.0, 3.0]], [[-7.0, -6.0, 1.0], [5.0, -7.0, -4.0]], [[-1.0, -1.0, 7.0], [-1.0, -4.0, 7.0]], [[-5.0, -6.0, 5.0], 
+[-1.0, -1.0, -2.0]], [[7.0, -7.0, -7.0], [2.0, -1.0, 4.0]]], [[[0.0, -7.0, -4.0], [-3.0, 3.0, 3.0]], [[-1.0, -1.0, -4.0], 
+[-7.0, 2.0, 2.0]], [[7.0, -7.0, -7.0], [6.0, 2.0, 7.0]], [[-6.0, -4.0, 7.0], [-2.0, 7.0, 6.0]], [[-4.0, 3.0, 2.0], [0.0, -1.0, 
+-4.0]]], [[[-4.0, -7.0, 2.0], [-6.0, 1.0, 6.0]], [[7.0, 0.0, -2.0], [3.0, -4.0, 6.0]], [[-3.0, -7.0, 4.0], [1.0, -1.0, -2.0]], 
+[[5.0, 4.0, 5.0], [-7.0, -6.0, 1.0]], [[5.0, -1.0, -5.0], [6.0, -5.0, 2.0]]]]))
+      arg1=Data(numpy.array([[-6.0, -4.0, -5.0], [5.0, 1.0, 6.0]]),self.functionspace)
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[3.0, 65.0, 13.0, 80.0, 52.0], [31.0, -63.0, 31.0, -85.0, -76.0], [21.0, -43.0, -58.0, 51.0, -1.0], 
+[29.0, 7.0, 28.0, -26.0, -16.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-54.0, 64.0, 11.0, 46.0, 16.0], [-9.0, 55.0, 8.0, 11.0, 54.0], [54.0, 9.0, 95.0, 50.0, 
+-23.0], [49.0, 15.0, 18.0, -106.0, 36.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_taggedData_rank4_constData_rank3(self):
+      arg0=Data(numpy.array([[[[0.0, 0.0, -7.0], [-1.0, 7.0, -5.0]], [[4.0, 6.0, 1.0], [6.0, -6.0, -4.0]], [[5.0, -7.0, -3.0], 
+[0.0, -6.0, -4.0]], [[-4.0, -2.0, -1.0], [-3.0, 1.0, 5.0]], [[3.0, -6.0, 6.0], [7.0, -4.0, -7.0]]], [[[0.0, 0.0, 7.0], [-7.0, 
+-4.0, -5.0]], [[1.0, 0.0, 6.0], [-4.0, 0.0, -6.0]], [[7.0, 5.0, -6.0], [5.0, 4.0, 4.0]], [[-5.0, 6.0, -6.0], [2.0, 3.0, 0.0]], 
+[[-5.0, 7.0, 3.0], [-4.0, -6.0, -5.0]]], [[[5.0, 0.0, 5.0], [-2.0, -4.0, 2.0]], [[1.0, 0.0, 0.0], [6.0, -1.0, -7.0]], [[6.0, 
+7.0, 4.0], [0.0, -7.0, -7.0]], [[4.0, 0.0, -2.0], [-1.0, 4.0, 0.0]], [[-3.0, 6.0, -7.0], [4.0, 3.0, 7.0]]], [[[6.0, -5.0, 
+-6.0], [3.0, -1.0, 2.0]], [[7.0, -2.0, 2.0], [-7.0, -5.0, 3.0]], [[0.0, -2.0, -2.0], [-4.0, 4.0, 3.0]], [[-4.0, -1.0, -7.0], 
+[0.0, 6.0, -5.0]], [[-5.0, 0.0, -2.0], [3.0, 3.0, -7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 7.0, -1.0], [-1.0, 5.0, 2.0]], [[1.0, 0.0, 6.0], [7.0, -4.0, -5.0]], [[-1.0, 
+7.0, -2.0], [-1.0, 4.0, 6.0]], [[4.0, -2.0, -5.0], [0.0, 0.0, -7.0]], [[-3.0, 5.0, 5.0], [3.0, 6.0, -5.0]]], [[[6.0, 7.0, 
+-3.0], [6.0, -6.0, 0.0]], [[-1.0, 4.0, -6.0], [-1.0, 0.0, 0.0]], [[-6.0, -4.0, 2.0], [3.0, 2.0, 0.0]], [[-3.0, 1.0, 6.0], [1.0, 
+-4.0, 5.0]], [[7.0, 2.0, 4.0], [7.0, 3.0, 4.0]]], [[[7.0, -4.0, 0.0], [-3.0, 0.0, -1.0]], [[7.0, -6.0, -3.0], [4.0, 0.0, 4.0]], 
+[[6.0, 4.0, 1.0], [-4.0, 1.0, 3.0]], [[-7.0, 6.0, 4.0], [-4.0, -6.0, 1.0]], [[-6.0, -5.0, -3.0], [0.0, -7.0, 7.0]]], [[[-7.0, 
+5.0, -4.0], [-7.0, -2.0, -6.0]], [[0.0, -5.0, -4.0], [2.0, 1.0, 0.0]], [[-1.0, 0.0, -2.0], [-5.0, 6.0, -5.0]], [[-6.0, 7.0, 
+-3.0], [-7.0, 2.0, 6.0]], [[6.0, -5.0, 0.0], [5.0, 1.0, -3.0]]]]))
+      arg1=Data(numpy.array([[[5.0, -7.0, 0.0], [6.0, 0.0, -7.0]], [[5.0, 4.0, -6.0], [4.0, -7.0, 7.0]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[29.0, -46.0], [42.0, 76.0], [102.0, 29.0], [-59.0, -6.0], [148.0, -38.0]], [[-7.0, -77.0], [23.0, 
+-89.0], [2.0, 111.0], [-55.0, 22.0], [-63.0, -24.0]], [[-1.0, 29.0], [90.0, -13.0], [30.0, 34.0], [14.0, 0.0], [-82.0, 95.0]], 
+[[69.0, 79.0], [-14.0, 43.0], [-31.0, -19.0], [22.0, -59.0], [42.0, -71.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-44.0, 34.0], [82.0, -10.0], [-102.0, 45.0], [83.0, -7.0], [3.0, -90.0]], [[17.0, 
+142.0], [-39.0, 43.0], [16.0, -60.0], [-51.0, 20.0], [35.0, 54.0]], [[52.0, 0.0], [73.0, 73.0], [-43.0, 38.0], [-108.0, -2.0], 
+[-44.0, 66.0]], [[-70.0, -47.0], [47.0, 5.0], [0.0, -90.0], [-163.0, 16.0], [116.0, 2.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank0_offset0(self):
-      arg0=Data(5.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-6.0)+(1-msk_arg1)*(-5.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-30.0)+(1.-msk_ref)*numpy.array(-25.0)
+   def test_tensor_transposed_mult_taggedData_rank4_constData_rank4(self):
+      arg0=Data(numpy.array([[[[0.0, -2.0, 2.0], [7.0, 2.0, 4.0]], [[2.0, 7.0, 0.0], [3.0, 3.0, -1.0]], [[6.0, 1.0, -2.0], 
+[-6.0, -1.0, -5.0]], [[0.0, 5.0, 4.0], [6.0, 2.0, 7.0]], [[6.0, -4.0, 2.0], [2.0, 1.0, -3.0]]], [[[5.0, -4.0, 2.0], [-4.0, 1.0, 
+3.0]], [[-7.0, -1.0, 3.0], [5.0, 0.0, 6.0]], [[0.0, 2.0, -6.0], [7.0, 7.0, 4.0]], [[-6.0, 6.0, -6.0], [5.0, -4.0, -7.0]], 
+[[4.0, 0.0, 4.0], [3.0, 5.0, 2.0]]], [[[-6.0, 0.0, -3.0], [-2.0, -3.0, 2.0]], [[1.0, 1.0, -3.0], [-3.0, 3.0, -7.0]], [[-1.0, 
+-4.0, 6.0], [-4.0, 5.0, 4.0]], [[-1.0, -4.0, -2.0], [-1.0, 2.0, -4.0]], [[6.0, 6.0, -3.0], [5.0, 3.0, 7.0]]], [[[3.0, -7.0, 
+7.0], [-6.0, -6.0, 7.0]], [[5.0, 4.0, 7.0], [7.0, 6.0, -2.0]], [[-2.0, 1.0, 0.0], [1.0, 0.0, 7.0]], [[-3.0, 1.0, 5.0], [-6.0, 
+1.0, 3.0]], [[-3.0, 4.0, -5.0], [4.0, -1.0, 4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 0.0, -1.0], [-3.0, 7.0, 4.0]], [[-4.0, 5.0, -1.0], [5.0, -3.0, -5.0]], [[1.0, 
+-2.0, 7.0], [1.0, -3.0, -4.0]], [[3.0, 5.0, 1.0], [0.0, 2.0, 2.0]], [[-1.0, -5.0, 0.0], [-1.0, 7.0, 2.0]]], [[[0.0, 2.0, 2.0], 
+[-2.0, 7.0, 0.0]], [[4.0, 4.0, 6.0], [0.0, -4.0, 0.0]], [[0.0, 0.0, -1.0], [-4.0, 2.0, 0.0]], [[-2.0, -5.0, 4.0], [2.0, 7.0, 
+6.0]], [[0.0, -7.0, 2.0], [-6.0, -3.0, 1.0]]], [[[6.0, 5.0, 6.0], [-6.0, 0.0, 1.0]], [[-1.0, 1.0, 3.0], [6.0, 1.0, -6.0]], 
+[[2.0, -1.0, -2.0], [0.0, -7.0, -3.0]], [[1.0, 0.0, 1.0], [-3.0, 3.0, 5.0]], [[-1.0, 0.0, 3.0], [-4.0, -6.0, 3.0]]], [[[1.0, 
+0.0, 5.0], [-3.0, 5.0, -5.0]], [[-3.0, 7.0, -4.0], [3.0, -1.0, 6.0]], [[-5.0, -3.0, 7.0], [-2.0, -7.0, -5.0]], [[-5.0, 2.0, 
+-7.0], [6.0, 0.0, -7.0]], [[-3.0, -3.0, 2.0], [-2.0, -2.0, 5.0]]]]))
+      arg1=Data(numpy.array([[[[-7.0, -5.0, -6.0], [3.0, -7.0, 6.0]], [[-6.0, 3.0, 0.0], [5.0, 1.0, 6.0]], [[-7.0, 1.0, -7.0], 
+[0.0, 2.0, 4.0]], [[7.0, -7.0, -1.0], [0.0, -7.0, -6.0]], [[-1.0, 7.0, -6.0], [5.0, 4.0, -1.0]]], [[[-2.0, 7.0, 2.0], [-5.0, 
+-7.0, -7.0]], [[0.0, 3.0, 7.0], [0.0, 0.0, -5.0]], [[4.0, 0.0, 6.0], [-4.0, -3.0, -4.0]], [[-4.0, -1.0, -3.0], [7.0, -6.0, 
+7.0]], [[-3.0, -5.0, -3.0], [2.0, -3.0, -7.0]]], [[[-1.0, 0.0, 2.0], [-6.0, -7.0, 1.0]], [[4.0, -4.0, 4.0], [-3.0, 3.0, -7.0]], 
+[[-5.0, 0.0, 5.0], [-4.0, -5.0, 3.0]], [[5.0, -1.0, -4.0], [2.0, 0.0, -2.0]], [[-3.0, 3.0, 0.0], [-1.0, -4.0, -7.0]]], [[[0.0, 
+7.0, 2.0], [0.0, -7.0, 4.0]], [[4.0, -4.0, 3.0], [-5.0, -4.0, 0.0]], [[-3.0, 2.0, 4.0], [0.0, -7.0, 0.0]], [[0.0, -6.0, 1.0], 
+[0.0, 0.0, -6.0]], [[2.0, 3.0, 0.0], [0.0, -4.0, 0.0]]]]),self.functionspace)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[29.0, 55.0, 4.0, -26.0, 13.0], [-87.0, -12.0, -38.0, 61.0, -16.0], [-48.0, -27.0, -16.0, 0.0, 
+-49.0], [-8.0, -29.0, -10.0, -10.0, -14.0]], [[-67.0, 21.0, -5.0, -50.0, 75.0], [16.0, 26.0, -9.0, -19.0, -37.0], [-42.0, 
+-13.0, -40.0, 11.0, 7.0], [24.0, -47.0, -13.0, -36.0, 13.0]], [[-76.0, -94.0, -49.0, 74.0, -16.0], [63.0, 14.0, 59.0, -90.0, 
+9.0], [28.0, 62.0, -26.0, 35.0, 30.0], [-10.0, 48.0, -17.0, 22.0, 19.0]], [[-3.0, 89.0, 9.0, -95.0, 42.0], [-50.0, 8.0, -34.0, 
+62.0, -80.0], [-35.0, -65.0, 7.0, -23.0, -48.0], [57.0, -46.0, 12.0, -68.0, 7.0]], [[-53.0, -55.0, -70.0, 79.0, -29.0], [-32.0, 
+17.0, 37.0, -39.0, 18.0], [-24.0, 66.0, -42.0, 36.0, -15.0], [-43.0, 32.0, -25.0, 44.0, -4.0]]], [[[-28.0, -43.0, -39.0, 36.0, 
+-64.0], [-42.0, -13.0, 33.0, -35.0, -33.0], [19.0, 38.0, 5.0, 7.0, -48.0], [-19.0, 58.0, -22.0, 8.0, -6.0]], [[87.0, 100.0, 
+51.0, -81.0, 1.0], [-54.0, -12.0, -54.0, 97.0, -15.0], [-11.0, -69.0, 48.0, -48.0, -29.0], [23.0, -40.0, 31.0, -27.0, -17.0]], 
+[[22.0, 72.0, 74.0, -81.0, 109.0], [-110.0, -56.0, -101.0, 51.0, -27.0], [-99.0, -60.0, -81.0, 28.0, -57.0], [-31.0, -89.0, 
+-69.0, -42.0, -22.0]], [[49.0, 33.0, 54.0, -8.0, 100.0], [94.0, 11.0, -40.0, 46.0, 77.0], [-15.0, -50.0, -21.0, 12.0, 96.0], 
+[30.0, -75.0, 34.0, 0.0, 22.0]], [[-66.0, 8.0, -38.0, -23.0, 5.0], [-64.0, 18.0, 5.0, -23.0, -47.0], [-47.0, 24.0, -31.0, 6.0, 
+-49.0], [-19.0, -7.0, -31.0, -8.0, -12.0]]], [[[87.0, 35.0, 65.0, -30.0, 0.0], [23.0, -31.0, -33.0, 51.0, 18.0], [35.0, -53.0, 
+44.0, -26.0, 18.0], [23.0, -11.0, 27.0, -15.0, 0.0]], [[-66.0, -57.0, -7.0, 24.0, 28.0], [42.0, 17.0, 17.0, -84.0, 35.0], 
+[-17.0, 55.0, -44.0, 24.0, 40.0], [-48.0, -6.0, -34.0, 33.0, -7.0]], [[-32.0, 3.0, -13.0, -44.0, -67.0], [-57.0, 10.0, 17.0, 
+-40.0, -46.0], [6.0, 35.0, 38.0, -41.0, -53.0], [-35.0, 30.0, -16.0, 6.0, -34.0]], [[-2.0, -33.0, 5.0, 33.0, -8.0], [-11.0, 
+-6.0, -2.0, -33.0, 49.0], [-15.0, 41.0, -23.0, 13.0, 12.0], [-62.0, 3.0, -27.0, 46.0, -22.0]], [[-18.0, 52.0, 19.0, -60.0, 
+84.0], [-71.0, -38.0, -51.0, 45.0, -87.0], [-56.0, -67.0, -59.0, 32.0, -66.0], [43.0, -46.0, -39.0, -81.0, 18.0]]], [[[38.0, 
+-33.0, -61.0, 63.0, -155.0], [-18.0, -7.0, 68.0, 17.0, -38.0], [96.0, 19.0, 95.0, -32.0, -49.0], [35.0, 115.0, 47.0, 7.0, 
+9.0]], [[-130.0, 11.0, -76.0, -30.0, 42.0], [-31.0, 71.0, 24.0, -46.0, -46.0], [-77.0, 43.0, -54.0, 11.0, -20.0], [-8.0, -34.0, 
+-21.0, -5.0, -2.0]], [[54.0, 62.0, 43.0, -63.0, 7.0], [-43.0, -32.0, -40.0, 63.0, -46.0], [3.0, -64.0, 27.0, -23.0, -41.0], 
+[35.0, -17.0, 8.0, -48.0, -1.0]], [[-21.0, 10.0, 1.0, -58.0, -49.0], [25.0, 23.0, 27.0, -31.0, -47.0], [45.0, 4.0, 68.0, -54.0, 
+-7.0], [22.0, 25.0, 24.0, -19.0, -7.0]], [[74.0, 73.0, 74.0, -61.0, 73.0], [-17.0, -43.0, -71.0, 85.0, -13.0], [-20.0, -91.0, 
+-9.0, 1.0, -7.0], [41.0, -59.0, 4.0, -53.0, 10.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-77.0, -26.0, -12.0, -23.0, 8.0], [-78.0, -27.0, -3.0, -60.0, -73.0], [-36.0, 26.0, 
+-51.0, 25.0, -74.0], [-35.0, 12.0, -74.0, -25.0, -14.0]], [[15.0, 31.0, 14.0, -11.0, 63.0], [72.0, 33.0, -13.0, 32.0, 44.0], 
+[-12.0, -29.0, -5.0, -1.0, 69.0], [34.0, -52.0, 39.0, -1.0, 19.0]], [[-39.0, -34.0, -80.0, 59.0, -60.0], [42.0, 63.0, 67.0, 
+-26.0, 25.0], [24.0, 56.0, 29.0, -11.0, 30.0], [5.0, 40.0, 42.0, 43.0, 8.0]], [[-54.0, 11.0, -11.0, -41.0, 32.0], [3.0, 12.0, 
+4.0, -18.0, -57.0], [-13.0, -12.0, -14.0, 2.0, -16.0], [31.0, -13.0, -9.0, -41.0, 13.0]], [[-8.0, 5.0, 24.0, -33.0, -13.0], 
+[-91.0, -25.0, -29.0, -26.0, -9.0], [-40.0, 26.0, -20.0, -6.0, -53.0], [-76.0, -7.0, -56.0, 18.0, -45.0]]], [[[-77.0, 3.0, 2.0, 
+-65.0, 20.0], [-21.0, 20.0, -1.0, -64.0, -41.0], [-33.0, 27.0, -17.0, -14.0, -20.0], [-31.0, -20.0, -37.0, -10.0, -22.0]], 
+[[-56.0, -16.0, -74.0, 22.0, -28.0], [60.0, 54.0, 64.0, -14.0, -38.0], [36.0, 12.0, 30.0, -8.0, 16.0], [68.0, 34.0, 48.0, 
+-18.0, 36.0]], [[-20.0, -18.0, 11.0, -13.0, -6.0], [4.0, -7.0, 4.0, -37.0, -11.0], [8.0, 14.0, 1.0, -4.0, -4.0], [-16.0, 9.0, 
+-18.0, -1.0, -8.0]], [[8.0, 50.0, 19.0, -68.0, -25.0], [-124.0, -17.0, -37.0, 15.0, -40.0], [-45.0, 1.0, 5.0, -29.0, -81.0], 
+[-52.0, -14.0, -37.0, -2.0, -47.0]], [[32.0, -48.0, -23.0, 62.0, -104.0], [-1.0, -12.0, 41.0, -16.0, 19.0], [62.0, 38.0, 52.0, 
+-15.0, -10.0], [-20.0, 76.0, 15.0, 38.0, -9.0]]], [[[-115.0, -45.0, -75.0, -5.0, -38.0], [58.0, 52.0, 80.0, -82.0, -80.0], 
+[43.0, 39.0, 27.0, -13.0, -4.0], [51.0, 52.0, 16.0, -30.0, 27.0]], [[-41.0, 4.0, -35.0, 12.0, 30.0], [20.0, 54.0, 11.0, -12.0, 
+40.0], [-42.0, 31.0, -27.0, 6.0, 38.0], [-18.0, -33.0, 10.0, 33.0, -3.0]], [[34.0, -40.0, -27.0, 90.0, -22.0], [55.0, -2.0, 
+29.0, 20.0, 47.0], [40.0, 4.0, 6.0, 25.0, 40.0], [26.0, 34.0, 33.0, 22.0, 29.0]], [[-13.0, 12.0, 12.0, -45.0, -15.0], [-41.0, 
+-18.0, -7.0, -11.0, -56.0], [3.0, -9.0, 12.0, -15.0, -47.0], [1.0, 10.0, -20.0, -29.0, -10.0]], [[37.0, -2.0, -14.0, 14.0, 
+-64.0], [49.0, 6.0, 36.0, 24.0, -17.0], [76.0, -19.0, 75.0, -31.0, 10.0], [60.0, 49.0, 57.0, -15.0, 22.0]]], [[[-111.0, -46.0, 
+-52.0, -3.0, -21.0], [23.0, 60.0, 51.0, -105.0, -4.0], [-13.0, 83.0, -8.0, -11.0, 15.0], [-45.0, 14.0, -18.0, 35.0, -18.0]], 
+[[62.0, 89.0, 78.0, -95.0, 81.0], [-3.0, -37.0, -69.0, 86.0, -47.0], [-10.0, -110.0, 6.0, -12.0, -11.0], [72.0, -63.0, 14.0, 
+-82.0, 19.0]], [[21.0, -26.0, -51.0, 58.0, -91.0], [97.0, 65.0, 71.0, -5.0, 61.0], [75.0, 40.0, 88.0, -44.0, 71.0], [22.0, 
+51.0, 86.0, 55.0, 9.0]], [[43.0, 24.0, 58.0, 0.0, 98.0], [29.0, -8.0, -58.0, 32.0, 87.0], [-52.0, -25.0, -55.0, 27.0, 64.0], 
+[-28.0, -79.0, -9.0, 23.0, -4.0]], [[62.0, 27.0, 20.0, -18.0, -53.0], [-22.0, -20.0, -6.0, 42.0, -15.0], [38.0, -27.0, 58.0, 
+-34.0, -25.0], [17.0, 24.0, 25.0, -10.0, -7.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([4.0, 6.0, 4.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([7.0, 5.0, 2.0])+(1.-msk_arg1)*numpy.array([1.0, -3.0, 1.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(66.0)+(1.-msk_ref)*numpy.array(-10.0)
+   def test_tensor_transposed_mult_taggedData_rank4_taggedData_rank2(self):
+      arg0=Data(numpy.array([[[[-7.0, -2.0, -4.0], [-5.0, -6.0, 0.0]], [[2.0, -6.0, 4.0], [6.0, 5.0, 0.0]], [[7.0, -1.0, 7.0], 
+[0.0, 3.0, 0.0]], [[-1.0, 7.0, -6.0], [-6.0, 3.0, -5.0]], [[7.0, -2.0, -6.0], [-2.0, -7.0, -6.0]]], [[[0.0, 6.0, -7.0], [5.0, 
+0.0, 2.0]], [[0.0, 1.0, -7.0], [-2.0, -2.0, 4.0]], [[-2.0, 3.0, -1.0], [-5.0, 4.0, 3.0]], [[-3.0, -4.0, 5.0], [-3.0, -2.0, 
+7.0]], [[-2.0, 4.0, 7.0], [6.0, -5.0, -6.0]]], [[[0.0, 7.0, -5.0], [1.0, 7.0, 1.0]], [[7.0, -5.0, 4.0], [2.0, 5.0, 0.0]], 
+[[-6.0, -3.0, 7.0], [7.0, 3.0, -3.0]], [[-6.0, 0.0, -2.0], [7.0, -6.0, 5.0]], [[-2.0, 7.0, 7.0], [5.0, -4.0, -7.0]]], [[[4.0, 
+-5.0, -3.0], [-5.0, -1.0, -7.0]], [[-5.0, -4.0, 2.0], [0.0, -4.0, -5.0]], [[-1.0, 0.0, 5.0], [0.0, -5.0, -1.0]], [[-7.0, -1.0, 
+-5.0], [1.0, -7.0, -4.0]], [[-3.0, 5.0, -7.0], [0.0, -4.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, -4.0, -3.0], [-1.0, 0.0, -1.0]], [[7.0, 3.0, -2.0], [-7.0, 7.0, 0.0]], [[4.0, 
+-3.0, 0.0], [5.0, -4.0, 0.0]], [[-7.0, 6.0, 5.0], [-6.0, -4.0, -3.0]], [[4.0, 2.0, -6.0], [3.0, 4.0, -2.0]]], [[[0.0, 7.0, 
+-2.0], [5.0, -1.0, 0.0]], [[0.0, 7.0, 3.0], [4.0, 1.0, -5.0]], [[0.0, -2.0, 4.0], [-6.0, 0.0, 1.0]], [[5.0, 0.0, -7.0], [-7.0, 
+2.0, -2.0]], [[6.0, -2.0, 6.0], [-5.0, 1.0, -2.0]]], [[[-4.0, -2.0, 4.0], [-3.0, 0.0, -1.0]], [[6.0, 4.0, 3.0], [6.0, 7.0, 
+5.0]], [[-7.0, 1.0, 6.0], [-3.0, 3.0, 2.0]], [[7.0, 7.0, -4.0], [0.0, 4.0, 4.0]], [[-6.0, -5.0, 1.0], [-5.0, 4.0, 6.0]]], 
+[[[-3.0, 2.0, 4.0], [-5.0, -4.0, -2.0]], [[-2.0, 5.0, 0.0], [0.0, 1.0, 6.0]], [[6.0, 0.0, 0.0], [-3.0, 3.0, -7.0]], [[-6.0, 
+-2.0, 2.0], [0.0, 0.0, 4.0]], [[-4.0, 0.0, -5.0], [3.0, -6.0, 7.0]]]]))
+      arg1=Data(numpy.array([[-1.0, -3.0, 2.0], [-4.0, 3.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -5.0, 3.0], [0.0, 4.0, 0.0]]))
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[7.0, 15.0, 19.0, -19.0, -50.0], [-44.0, 1.0, 35.0, 59.0, -59.0], [-10.0, 23.0, -2.0, -24.0, 
+-65.0], [-6.0, -11.0, -8.0, -41.0, -10.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[11.0, 7.0, -1.0, -31.0, -12.0], [-45.0, -22.0, 22.0, -13.0, 32.0], [22.0, 17.0, 25.0, 
+-31.0, 44.0], [-14.0, -21.0, 12.0, 16.0, -39.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_taggedData_rank4_taggedData_rank3(self):
+      arg0=Data(numpy.array([[[[-7.0, -3.0, 3.0], [4.0, -5.0, 0.0]], [[-5.0, 3.0, 2.0], [-4.0, -1.0, 0.0]], [[0.0, -4.0, -2.0], 
+[-3.0, -4.0, 4.0]], [[2.0, -2.0, 0.0], [-7.0, -1.0, -4.0]], [[0.0, 7.0, 7.0], [3.0, 3.0, -4.0]]], [[[-4.0, 5.0, 7.0], [-3.0, 
+7.0, -4.0]], [[3.0, 3.0, 0.0], [7.0, 4.0, -1.0]], [[-2.0, 7.0, -1.0], [6.0, -3.0, -5.0]], [[-6.0, 2.0, -2.0], [-4.0, 0.0, 
+4.0]], [[-7.0, 4.0, 7.0], [-5.0, 0.0, 0.0]]], [[[3.0, -3.0, -1.0], [6.0, -3.0, 2.0]], [[5.0, 1.0, -5.0], [3.0, 2.0, 7.0]], 
+[[-6.0, -1.0, -2.0], [-1.0, 7.0, -6.0]], [[-5.0, 3.0, -2.0], [2.0, 1.0, 3.0]], [[-6.0, 0.0, 1.0], [3.0, 1.0, -3.0]]], [[[-2.0, 
+-7.0, 5.0], [-4.0, -7.0, -4.0]], [[-5.0, -4.0, 0.0], [0.0, 0.0, -2.0]], [[0.0, 2.0, 1.0], [-5.0, -3.0, -3.0]], [[2.0, 7.0, 
+-4.0], [0.0, 5.0, -6.0]], [[-7.0, 5.0, -2.0], [-4.0, 3.0, 6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, 4.0, 7.0], [6.0, -7.0, 0.0]], [[4.0, 1.0, -6.0], [6.0, 0.0, -3.0]], [[-5.0, 
+1.0, -5.0], [0.0, -7.0, -2.0]], [[-1.0, 6.0, 6.0], [0.0, 5.0, 0.0]], [[1.0, -3.0, 0.0], [1.0, -1.0, 6.0]]], [[[-7.0, -5.0, 
+1.0], [5.0, -7.0, -3.0]], [[-1.0, -1.0, 3.0], [7.0, -6.0, 4.0]], [[4.0, -1.0, 2.0], [-1.0, 1.0, -5.0]], [[-1.0, -3.0, 0.0], 
+[6.0, -3.0, 7.0]], [[1.0, -7.0, -3.0], [6.0, 0.0, 1.0]]], [[[-5.0, -6.0, 0.0], [0.0, 1.0, 1.0]], [[0.0, -1.0, 0.0], [2.0, 4.0, 
+-6.0]], [[5.0, 0.0, -3.0], [-4.0, -4.0, 0.0]], [[1.0, 5.0, -3.0], [3.0, -3.0, 1.0]], [[2.0, -1.0, 1.0], [2.0, 0.0, -4.0]]], 
+[[[2.0, 0.0, 6.0], [6.0, 7.0, -3.0]], [[2.0, 3.0, 0.0], [3.0, -3.0, -2.0]], [[2.0, 6.0, -7.0], [6.0, 6.0, 3.0]], [[-6.0, -7.0, 
+-5.0], [-1.0, -3.0, -1.0]], [[-3.0, -1.0, 3.0], [7.0, 0.0, 2.0]]]]))
+      arg1=Data(numpy.array([[[7.0, -7.0, 6.0], [7.0, 1.0, -4.0]], [[2.0, -2.0, 6.0], [5.0, 6.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -3.0, -2.0], [-6.0, 1.0, -3.0]], [[7.0, 0.0, -3.0], [-3.0, 2.0, 1.0]]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[13.0, 0.0], [-73.0, -30.0], [-25.0, -51.0], [-6.0, -25.0], [33.0, 69.0]], [[-19.0, 59.0], [57.0, 
+61.0], [-10.0, -2.0], [-112.0, -56.0], [-70.0, -5.0]], [[67.0, 14.0], [-7.0, -9.0], [-23.0, 27.0], [-65.0, -18.0], [-2.0, 
+21.0]], [[46.0, -14.0], [1.0, 2.0], [-34.0, -35.0], [-30.0, 8.0], [-145.0, -50.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-49.0, -18.0], [-2.0, 25.0], [-14.0, -36.0], [-29.0, -15.0], [-12.0, 8.0]], [[-43.0, 
+-84.0], [-67.0, -45.0], [37.0, 22.0], [-55.0, -24.0], [-8.0, -1.0]], [[-4.0, -32.0], [13.0, -4.0], [46.0, 48.0], [-29.0, 2.0], 
+[9.0, 1.0]], [[-24.0, -11.0], [-16.0, -3.0], [-35.0, 32.0], [13.0, -31.0], [-63.0, -49.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[-4.0, 0.0, -4.0], [7.0, 2.0, -5.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 2.0, 5.0], [0.0, 3.0, 3.0]])+(1.-msk_arg1)*numpy.array([[5.0, -5.0, -2.0], [7.0, -3.0, 
--6.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-9.0)+(1.-msk_ref)*numpy.array(61.0)
+   def test_tensor_transposed_mult_taggedData_rank4_taggedData_rank4(self):
+      arg0=Data(numpy.array([[[[1.0, -2.0, 6.0], [1.0, -7.0, 4.0]], [[2.0, -6.0, -2.0], [-4.0, 6.0, 6.0]], [[-6.0, 1.0, -6.0], 
+[0.0, -6.0, 5.0]], [[0.0, -6.0, 0.0], [4.0, -6.0, 0.0]], [[3.0, 3.0, 2.0], [5.0, -4.0, 7.0]]], [[[5.0, 4.0, -5.0], [1.0, 7.0, 
+-2.0]], [[4.0, 2.0, -4.0], [0.0, 7.0, 2.0]], [[-7.0, -3.0, -2.0], [-1.0, -4.0, 4.0]], [[-5.0, 7.0, -4.0], [6.0, 2.0, 6.0]], 
+[[-5.0, 5.0, 0.0], [0.0, 7.0, 5.0]]], [[[-7.0, 2.0, 0.0], [-1.0, 3.0, 4.0]], [[-7.0, 2.0, 0.0], [4.0, -5.0, 1.0]], [[-7.0, 5.0, 
+5.0], [-7.0, 7.0, -3.0]], [[-5.0, -7.0, 7.0], [0.0, -5.0, 3.0]], [[1.0, 0.0, -5.0], [4.0, -6.0, 4.0]]], [[[-7.0, -1.0, 5.0], 
+[1.0, 0.0, -7.0]], [[2.0, -1.0, -1.0], [0.0, 4.0, 5.0]], [[-3.0, 1.0, 2.0], [0.0, -2.0, -6.0]], [[-7.0, -1.0, 6.0], [3.0, -5.0, 
+-5.0]], [[0.0, -3.0, -5.0], [-4.0, -4.0, -4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, -3.0, -6.0], [-1.0, 4.0, 2.0]], [[3.0, 6.0, 0.0], [-5.0, 6.0, 2.0]], [[3.0, 
+4.0, 0.0], [0.0, -3.0, 3.0]], [[-1.0, 3.0, -2.0], [2.0, 0.0, 0.0]], [[5.0, -5.0, -3.0], [-3.0, 0.0, 0.0]]], [[[3.0, 2.0, 4.0], 
+[7.0, 7.0, -3.0]], [[-2.0, -2.0, 3.0], [-5.0, 1.0, 3.0]], [[-4.0, 5.0, -5.0], [-4.0, 5.0, -2.0]], [[-3.0, -3.0, 3.0], [5.0, 
+-3.0, -5.0]], [[-7.0, 0.0, 3.0], [-3.0, 4.0, -1.0]]], [[[-4.0, 0.0, -1.0], [6.0, -3.0, 0.0]], [[-4.0, -7.0, -2.0], [-4.0, 6.0, 
+2.0]], [[-2.0, -1.0, 3.0], [-5.0, 0.0, -1.0]], [[4.0, -5.0, -6.0], [-5.0, -6.0, 0.0]], [[2.0, 0.0, -7.0], [1.0, 6.0, -3.0]]], 
+[[[1.0, 0.0, -7.0], [-1.0, -3.0, 6.0]], [[-1.0, 3.0, -3.0], [-5.0, -6.0, 6.0]], [[-4.0, 0.0, 7.0], [-3.0, -1.0, 0.0]], [[4.0, 
+4.0, -3.0], [0.0, -2.0, -1.0]], [[7.0, 2.0, -5.0], [-7.0, -2.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[[3.0, -7.0, 1.0], [0.0, 5.0, 5.0]], [[-6.0, -5.0, 1.0], [6.0, 1.0, 7.0]], [[1.0, 6.0, 5.0], 
+[-4.0, -6.0, 4.0]], [[-5.0, -7.0, -3.0], [-4.0, -5.0, 4.0]], [[0.0, 2.0, -5.0], [3.0, -4.0, -3.0]]], [[[-3.0, 4.0, 0.0], [-7.0, 
+2.0, 0.0]], [[-1.0, -1.0, 0.0], [-2.0, 2.0, 3.0]], [[-2.0, 6.0, 1.0], [0.0, -4.0, -1.0]], [[-6.0, 3.0, -6.0], [5.0, 0.0, 
+-4.0]], [[6.0, -3.0, 0.0], [-5.0, 7.0, 6.0]]], [[[5.0, 7.0, 1.0], [-1.0, -2.0, -5.0]], [[-5.0, 4.0, 0.0], [-4.0, -4.0, -1.0]], 
+[[2.0, 2.0, -7.0], [0.0, 7.0, -5.0]], [[1.0, -4.0, 2.0], [-3.0, -5.0, -1.0]], [[1.0, -5.0, -3.0], [1.0, 1.0, 4.0]]], [[[7.0, 
+0.0, -1.0], [1.0, 7.0, -3.0]], [[0.0, 4.0, 1.0], [0.0, 0.0, 0.0]], [[-5.0, 2.0, 4.0], [1.0, 2.0, -3.0]], [[0.0, -1.0, 5.0], 
+[-4.0, -5.0, 0.0]], [[4.0, 2.0, 3.0], [6.0, -1.0, 3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, 5.0, 7.0], [-6.0, -7.0, 1.0]], [[-6.0, 0.0, -6.0], [5.0, -5.0, 2.0]], [[6.0, 
+-5.0, -5.0], [-7.0, 1.0, -7.0]], [[-5.0, -5.0, 7.0], [-1.0, 0.0, 0.0]], [[-7.0, 1.0, 0.0], [4.0, -2.0, 1.0]]], [[[0.0, 4.0, 
+7.0], [-7.0, -4.0, 4.0]], [[1.0, -7.0, -5.0], [0.0, 6.0, 5.0]], [[-2.0, 1.0, -3.0], [-6.0, -3.0, 0.0]], [[2.0, 0.0, -1.0], 
+[-6.0, 6.0, 1.0]], [[3.0, -5.0, 3.0], [1.0, 0.0, -6.0]]], [[[0.0, 3.0, 6.0], [4.0, -3.0, -1.0]], [[-6.0, 3.0, 1.0], [-7.0, 1.0, 
+-7.0]], [[2.0, 0.0, -6.0], [-2.0, 4.0, 7.0]], [[0.0, 1.0, 7.0], [7.0, -1.0, 3.0]], [[5.0, -4.0, 1.0], [6.0, -5.0, 1.0]]], 
+[[[1.0, 2.0, 7.0], [2.0, -1.0, 6.0]], [[6.0, -5.0, 3.0], [2.0, 4.0, 0.0]], [[-3.0, -6.0, -4.0], [0.0, 6.0, 7.0]], [[5.0, -7.0, 
+2.0], [-1.0, 5.0, -3.0]], [[-4.0, -1.0, 7.0], [-6.0, -5.0, 3.0]]]]))
+      res=tensor_transposed_mult(arg0,arg1)
+      ref=Data(numpy.array([[[[8.0, 37.0, 73.0, 38.0, -15.0], [-32.0, -3.0, 16.0, -59.0, -18.0], [-10.0, 7.0, -113.0, 49.0, 
+3.0], [-59.0, -2.0, -10.0, 63.0, 43.0]], [[106.0, 40.0, -40.0, 48.0, -56.0], [10.0, 42.0, -72.0, -62.0, 128.0], [-72.0, -48.0, 
+18.0, -2.0, 64.0], [36.0, -26.0, -40.0, -18.0, -22.0]], [[-36.0, 54.0, 26.0, 91.0, 41.0], [10.0, 8.0, 31.0, 55.0, -51.0], 
+[-42.0, 53.0, -35.0, 3.0, 21.0], [-93.0, -2.0, -19.0, -1.0, -19.0]], [[12.0, 48.0, -16.0, 56.0, 24.0], [-64.0, -14.0, -12.0, 
+2.0, -44.0], [-34.0, -16.0, -54.0, 42.0, 28.0], [-38.0, -24.0, -20.0, 20.0, 18.0]], [[5.0, 44.0, 63.0, -14.0, 6.0], [-40.0, 
+-3.0, 23.0, -24.0, -2.0], [6.0, -14.0, -65.0, -7.0, 11.0], [-25.0, 14.0, -25.0, 7.0, 79.0]]], [[[7.0, -56.0, -50.0, -85.0, 
+14.0], [8.0, -3.0, -17.0, 25.0, 50.0], [43.0, -39.0, 112.0, -57.0, 0.0], [96.0, 11.0, -16.0, -68.0, 6.0]], [[39.0, -17.0, 
+-38.0, -49.0, -10.0], [10.0, 14.0, -30.0, -2.0, 79.0], [6.0, -42.0, 79.0, -49.0, 21.0], [75.0, 4.0, -24.0, -57.0, 7.0]], 
+[[-2.0, 73.0, 9.0, 102.0, 5.0], [8.0, 16.0, 6.0, 24.0, -32.0], [-69.0, 39.0, -54.0, 20.0, 25.0], [-88.0, -14.0, 0.0, 17.0, 
+-30.0]], [[-28.0, 71.0, 5.0, -22.0, 26.0], [5.0, 8.0, 34.0, 81.0, -31.0], [-20.0, 15.0, 16.0, -75.0, 4.0], [-29.0, 24.0, 15.0, 
+-61.0, 34.0]], [[10.0, 47.0, 3.0, -25.0, -33.0], [49.0, 29.0, 7.0, 25.0, 34.0], [-29.0, 12.0, 24.0, -65.0, -3.0], [-1.0, 20.0, 
+34.0, -40.0, -2.0]]], [[[0.0, 57.0, 7.0, 26.0, -23.0], [42.0, 25.0, 10.0, 27.0, 2.0], [-46.0, 31.0, -9.0, -31.0, 1.0], [-41.0, 
+8.0, 32.0, -13.0, -21.0]], [[-55.0, 58.0, 23.0, 34.0, 33.0], [-9.0, -10.0, 45.0, 64.0, -97.0], [-20.0, 46.0, -50.0, -3.0, 
+-14.0], [-83.0, 8.0, 30.0, 7.0, 8.0]], [[-31.0, -34.0, 22.0, -34.0, -55.0], [104.0, 21.0, 24.0, 4.0, 9.0], [13.0, 58.0, 25.0, 
+-28.0, -59.0], [-3.0, 25.0, 81.0, 13.0, -61.0]], [[31.0, 88.0, 30.0, 90.0, -38.0], [-23.0, 11.0, -8.0, -45.0, -26.0], [-72.0, 
+14.0, -123.0, 59.0, 16.0], [-86.0, -21.0, 20.0, 67.0, 1.0]], [[-12.0, 35.0, 12.0, 40.0, 49.0], [-43.0, -9.0, 13.0, 28.0, 
+-32.0], [-12.0, -1.0, -25.0, 5.0, 30.0], [-38.0, -5.0, -45.0, -11.0, 31.0]]], [[[-44.0, 9.0, -20.0, -5.0, -3.0], [10.0, -15.0, 
+20.0, 42.0, -86.0], [-3.0, 34.0, -16.0, 11.0, -44.0], [-32.0, 1.0, 75.0, 22.0, -30.0]], [[57.0, 31.0, -13.0, 0.0, -28.0], 
+[-2.0, 22.0, -32.0, -29.0, 73.0], [-31.0, -35.0, 12.0, -21.0, 34.0], [28.0, -5.0, -23.0, -24.0, 14.0]], [[-54.0, -29.0, 1.0, 
+-12.0, 18.0], [9.0, -20.0, 28.0, 33.0, -71.0], [28.0, 33.0, -2.0, 13.0, -40.0], [-19.0, 6.0, 39.0, 19.0, -20.0]], [[-58.0, 
+31.0, 15.0, 17.0, 12.0], [-14.0, -23.0, 39.0, 38.0, -119.0], [-4.0, 44.0, -68.0, 30.0, -42.0], [-72.0, 2.0, 65.0, 44.0, -4.0]], 
+[[-24.0, -46.0, -19.0, 56.0, 35.0], [8.0, -9.0, -3.0, 17.0, -23.0], [6.0, 24.0, 21.0, 38.0, 6.0], [-15.0, -17.0, -26.0, 14.0, 
+-53.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-67.0, 3.0, 54.0, -36.0, -27.0], [-55.0, 87.0, 5.0, 42.0, -10.0], [-63.0, -30.0, 
+72.0, -50.0, -8.0], [-40.0, 23.0, 74.0, 34.0, -55.0]], [[35.0, -69.0, 15.0, -40.0, -45.0], [43.0, 7.0, 12.0, 74.0, -38.0], 
+[-22.0, 27.0, 54.0, -29.0, -67.0], [11.0, 2.0, 5.0, 2.0, -12.0]], [[59.0, 3.0, -26.0, -35.0, -8.0], [40.0, -28.0, 7.0, -9.0, 
+-29.0], [18.0, -30.0, 15.0, 16.0, 17.0], [32.0, -14.0, -30.0, -37.0, 8.0]], [[-16.0, 28.0, -25.0, -26.0, 18.0], [-16.0, -12.0, 
+-1.0, -12.0, -22.0], [5.0, -1.0, 6.0, 3.0, -7.0], [-5.0, -23.0, -7.0, -32.0, -25.0]], [[-3.0, -27.0, 91.0, -18.0, -52.0], 
+[-20.0, 55.0, 12.0, 31.0, 28.0], [-45.0, -27.0, 34.0, -47.0, 24.0], [-32.0, 40.0, 27.0, 57.0, -18.0]]], [[[-41.0, -48.0, -33.0, 
+-4.0, -8.0], [-53.0, -4.0, -79.0, -1.0, 36.0], [40.0, -29.0, -25.0, 63.0, 15.0], [24.0, 62.0, -16.0, 46.0, -72.0]], [[27.0, 
+-30.0, -2.0, 46.0, -7.0], [56.0, 18.0, 20.0, 32.0, -10.0], [-14.0, 24.0, 13.0, -8.0, -31.0], [22.0, 1.0, 33.0, 11.0, 65.0]], 
+[[-43.0, 5.0, 23.0, -36.0, 5.0], [-15.0, 6.0, 37.0, 49.0, -44.0], [-44.0, 81.0, 36.0, -69.0, -96.0], [-54.0, -52.0, 18.0, 
+-30.0, -31.0]], [[-23.0, 30.0, -21.0, 46.0, 39.0], [-34.0, -40.0, -27.0, -62.0, 50.0], [43.0, 9.0, -81.0, 41.0, 40.0], [-5.0, 
+4.0, -38.0, 7.0, 6.0]], [[-25.0, -13.0, -25.0, 59.0, 28.0], [22.0, -3.0, 11.0, 24.0, -9.0], [-5.0, 77.0, -17.0, -7.0, -71.0], 
+[-2.0, -23.0, 26.0, -3.0, 44.0]]], [[[-42.0, 75.0, -64.0, 7.0, 58.0], [-37.0, -17.0, -16.0, -61.0, -9.0], [27.0, -22.0, -26.0, 
+38.0, 30.0], [4.0, -27.0, -2.0, -43.0, -12.0]], [[-85.0, -10.0, 41.0, 45.0, -5.0], [-30.0, 101.0, 13.0, 56.0, 1.0], [-69.0, 
+21.0, 50.0, -49.0, -46.0], [-34.0, 21.0, 112.0, 53.0, 9.0]], [[35.0, -33.0, 20.0, 41.0, -8.0], [48.0, -15.0, 24.0, 22.0, 9.0], 
+[-4.0, 54.0, -19.0, -18.0, -34.0], [1.0, -8.0, -7.0, 11.0, 57.0]], [[25.0, 17.0, 108.0, -32.0, -41.0], [-3.0, 33.0, 53.0, 8.0, 
+14.0], [-53.0, -16.0, 30.0, -76.0, 34.0], [-52.0, -3.0, 6.0, 18.0, 7.0]], [[-90.0, -1.0, 67.0, -60.0, -25.0], [-92.0, 58.0, 
+-7.0, 38.0, 4.0], [-53.0, 1.0, 47.0, -57.0, -24.0], [-69.0, 17.0, 37.0, 34.0, -102.0]]], [[[-11.0, 58.0, 3.0, -53.0, 1.0], 
+[-6.0, 48.0, 34.0, 3.0, -55.0], [-43.0, -51.0, 76.0, -35.0, 13.0], [-11.0, -29.0, 49.0, -41.0, -14.0]], [[67.0, 41.0, -19.0, 
+-26.0, 8.0], [74.0, -13.0, 62.0, 1.0, -68.0], [-17.0, -1.0, 44.0, -29.0, -14.0], [16.0, -64.0, 3.0, -75.0, 58.0]], [[54.0, 
+-28.0, -39.0, 72.0, 18.0], [74.0, -45.0, 8.0, -3.0, 6.0], [33.0, 51.0, -48.0, 29.0, -26.0], [40.0, -13.0, -22.0, -8.0, 88.0]], 
+[[32.0, 2.0, 24.0, -61.0, -21.0], [-1.0, -26.0, 11.0, -2.0, -11.0], [1.0, -10.0, 11.0, -18.0, 10.0], [-13.0, -13.0, -43.0, 
+-21.0, -34.0]], [[66.0, -37.0, 104.0, -73.0, -71.0], [30.0, 6.0, 51.0, 49.0, -11.0], [-46.0, 6.0, 50.0, -80.0, -10.0], [-36.0, 
+-5.0, -25.0, 8.0, -13.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[4.0, 7.0, -6.0], [-1.0, -5.0, 0.0], [0.0, 1.0, 1.0], [0.0, 4.0, 4.0]], [[-5.0, 0.0, -5.0], [1.0, 
-4.0, 5.0], [-4.0, 0.0, 4.0], [-3.0, 5.0, 0.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-6.0, -3.0, -3.0], [-3.0, 4.0, 0.0], [4.0, 3.0, 5.0], [-3.0, 1.0, -4.0]], [[-1.0, 0.0, 
--7.0], [-6.0, -3.0, -3.0], [-4.0, -5.0, 3.0], [6.0, 1.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[0.0, 6.0, 6.0], [-1.0, 3.0, 2.0], 
-[3.0, 0.0, 2.0], [0.0, -4.0, 4.0]], [[4.0, -4.0, 6.0], [-7.0, -7.0, 5.0], [-2.0, 5.0, 7.0], [7.0, -4.0, 0.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+   def test_tensor_transposed_mult_taggedData_rank4_expandedData_rank2(self):
+      arg0=Data(numpy.array([[[[2.0, -2.0, 7.0], [-7.0, 3.0, 7.0]], [[0.0, 2.0, 2.0], [-6.0, 0.0, 0.0]], [[2.0, 2.0, 1.0], 
+[6.0, -3.0, 1.0]], [[2.0, 7.0, 4.0], [1.0, -6.0, -4.0]], [[-5.0, 0.0, -4.0], [0.0, 7.0, 2.0]]], [[[5.0, 2.0, 4.0], [-4.0, -5.0, 
+-4.0]], [[4.0, 0.0, 5.0], [-3.0, -6.0, 7.0]], [[5.0, 4.0, -3.0], [6.0, -2.0, 1.0]], [[6.0, -3.0, 0.0], [1.0, -5.0, 3.0]], 
+[[-3.0, 0.0, -1.0], [-3.0, 0.0, 4.0]]], [[[6.0, 7.0, -3.0], [0.0, 0.0, -7.0]], [[-1.0, 5.0, -1.0], [1.0, -3.0, 6.0]], [[-2.0, 
+-3.0, -4.0], [7.0, -3.0, 5.0]], [[-5.0, 6.0, 5.0], [7.0, -6.0, 0.0]], [[-7.0, -4.0, 0.0], [4.0, -5.0, 3.0]]], [[[-7.0, 7.0, 
+-4.0], [4.0, 5.0, -7.0]], [[5.0, -3.0, 7.0], [1.0, -2.0, 0.0]], [[-1.0, 2.0, 1.0], [1.0, -5.0, 6.0]], [[3.0, -7.0, 6.0], [7.0, 
+3.0, -4.0]], [[-6.0, 6.0, 3.0], [4.0, 0.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, -3.0, -2.0], [2.0, 0.0, 7.0]], [[4.0, -2.0, 0.0], [4.0, -2.0, -6.0]], [[-3.0, 
+0.0, 3.0], [-7.0, 3.0, -1.0]], [[4.0, 0.0, 5.0], [5.0, -4.0, 6.0]], [[-4.0, -4.0, 0.0], [-5.0, -1.0, 0.0]]], [[[4.0, -1.0, 
+1.0], [2.0, 1.0, 4.0]], [[-5.0, 0.0, 2.0], [4.0, 7.0, -3.0]], [[0.0, -4.0, 0.0], [-6.0, 0.0, 0.0]], [[-1.0, -4.0, 6.0], [-6.0, 
+0.0, 4.0]], [[-7.0, 0.0, 2.0], [-1.0, -6.0, -1.0]]], [[[5.0, 1.0, -6.0], [2.0, 7.0, -3.0]], [[-3.0, -1.0, 0.0], [7.0, 7.0, 
+2.0]], [[0.0, 0.0, 4.0], [0.0, 4.0, -5.0]], [[2.0, 0.0, 0.0], [3.0, 5.0, -5.0]], [[-3.0, 0.0, 0.0], [-4.0, -7.0, 6.0]]], 
+[[[-7.0, 0.0, -5.0], [0.0, 5.0, -5.0]], [[4.0, 2.0, 7.0], [4.0, -3.0, 5.0]], [[-7.0, -5.0, -1.0], [0.0, -2.0, -6.0]], [[-4.0, 
+-1.0, -6.0], [2.0, -4.0, 0.0]], [[-7.0, -4.0, 4.0], [-2.0, 0.0, -3.0]]]]))
+      arg1=Data(numpy.array([[4.0, 1.0, 0.0], [0.0, 5.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 4.0, 2.0], [2.0, 3.0, -7.0]]))
+      arg1.expand()
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-26.0)+(1.-msk_ref)*numpy.array(-71.0)
+      ref=msk_ref*numpy.array([[-21.0, 2.0, -11.0, 9.0, 3.0], [21.0, -56.0, 8.0, -22.0, -36.0], [73.0, -50.0, -56.0, -44.0, 
+-75.0], [46.0, 7.0, -63.0, 44.0, -18.0]])+(1.-msk_ref)*numpy.array([[-49.0, 20.0, 20.0, -50.0, -13.0], [-39.0, 74.0, -28.0, 
+-40.0, 19.0], [18.0, 29.0, 55.0, 48.0, -59.0], [68.0, -30.0, 42.0, -8.0, 37.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
+      if not ref.isLazy():
         arg0=arg0*1j
         arg1=arg1*1j
         ref=-ref
-        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+        res=tensor_transposed_mult(arg0,arg1)
         self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(),"wrong shape of result.")
+        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
         self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank4_offset4(self):
-      arg0=Data(numpy.array([[[[0.0, 1.0], [0.0, 1.0], [-6.0, 6.0]], [[1.0, -3.0], [3.0, -1.0], [6.0, -5.0]]], [[[4.0, 6.0], 
-[3.0, -3.0], [5.0, -3.0]], [[3.0, 0.0], [1.0, 1.0], [-1.0, 0.0]]], [[[-7.0, -3.0], [4.0, -4.0], [7.0, 0.0]], [[0.0, -3.0], 
-[-6.0, -1.0], [2.0, -4.0]]], [[[7.0, -5.0], [6.0, -4.0], [-1.0, 0.0]], [[-7.0, -7.0], [-3.0, 4.0], [3.0, 
--3.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[1.0, -2.0], [1.0, 7.0], [0.0, 5.0]], [[0.0, -2.0], [3.0, 6.0], [2.0, -3.0]]], [[[-2.0, 
-1.0], [7.0, -7.0], [-7.0, 4.0]], [[6.0, 2.0], [-1.0, -1.0], [2.0, -7.0]]], [[[3.0, 6.0], [-2.0, -7.0], [5.0, 0.0]], [[0.0, 
-4.0], [4.0, 7.0], [-1.0, -3.0]]], [[[5.0, 2.0], [2.0, 1.0], [4.0, -7.0]], [[-7.0, -4.0], [6.0, 5.0], [-1.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 4.0], [-2.0, -2.0], [0.0, 6.0]], [[-5.0, 0.0], [7.0, -6.0], [2.0, 5.0]]], [[[-6.0, 
-1.0], [-7.0, -3.0], [-7.0, -1.0]], [[6.0, 0.0], [6.0, -4.0], [-5.0, 3.0]]], [[[-3.0, 4.0], [5.0, 5.0], [1.0, 0.0]], [[1.0, 
--7.0], [-5.0, -4.0], [-3.0, -2.0]]], [[[-6.0, -6.0], [-2.0, 0.0], [-7.0, -1.0]], [[-7.0, -3.0], [-7.0, -7.0], [5.0, -7.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(166.0)+(1.-msk_ref)*numpy.array(165.0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank1_offset0(self):
-      arg0=Data(-3.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, 1.0])+(1.-msk_arg1)*numpy.array([-6.0, 0.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_tensor_transposed_mult_taggedData_rank4_expandedData_rank3(self):
+      arg0=Data(numpy.array([[[[5.0, 0.0, 5.0], [2.0, -4.0, 0.0]], [[7.0, -1.0, -6.0], [-3.0, 0.0, -3.0]], [[7.0, 2.0, 2.0], 
+[-3.0, 0.0, 6.0]], [[0.0, 7.0, 5.0], [5.0, 3.0, 7.0]], [[1.0, 1.0, -7.0], [0.0, 1.0, 3.0]]], [[[2.0, 7.0, -3.0], [0.0, 1.0, 
+5.0]], [[1.0, 2.0, 0.0], [-6.0, 1.0, -5.0]], [[2.0, 3.0, -4.0], [5.0, 7.0, -6.0]], [[-4.0, -7.0, 0.0], [-7.0, 7.0, 0.0]], 
+[[-4.0, 7.0, 4.0], [5.0, 6.0, -1.0]]], [[[0.0, 2.0, -2.0], [0.0, 6.0, 6.0]], [[-4.0, -4.0, 0.0], [-4.0, 1.0, 2.0]], [[-1.0, 
+4.0, 2.0], [-7.0, -5.0, 3.0]], [[4.0, 1.0, -3.0], [7.0, 4.0, 7.0]], [[1.0, 5.0, -3.0], [2.0, 1.0, 7.0]]], [[[-7.0, 7.0, -7.0], 
+[0.0, 3.0, -2.0]], [[-7.0, 4.0, 7.0], [-7.0, -6.0, 5.0]], [[-1.0, -2.0, 4.0], [2.0, 0.0, 3.0]], [[4.0, -1.0, -4.0], [5.0, 4.0, 
+-7.0]], [[-5.0, 4.0, -5.0], [3.0, 0.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, -4.0, -3.0], [-6.0, 3.0, -5.0]], [[2.0, 5.0, -3.0], [6.0, -5.0, 0.0]], [[-7.0, 
+3.0, 3.0], [3.0, 1.0, -4.0]], [[-4.0, 0.0, 7.0], [-1.0, 1.0, 6.0]], [[-2.0, 6.0, -6.0], [4.0, 0.0, -1.0]]], [[[7.0, 6.0, 3.0], 
+[5.0, 0.0, -2.0]], [[1.0, -5.0, -4.0], [-7.0, -5.0, -2.0]], [[7.0, -7.0, 3.0], [-6.0, -5.0, 4.0]], [[-6.0, 0.0, -3.0], [-7.0, 
+-1.0, -7.0]], [[5.0, 5.0, 4.0], [-7.0, 0.0, 5.0]]], [[[-3.0, -4.0, 6.0], [6.0, -4.0, 1.0]], [[-5.0, 0.0, -2.0], [6.0, -4.0, 
+3.0]], [[7.0, -2.0, 0.0], [0.0, 2.0, 6.0]], [[3.0, -2.0, -3.0], [-5.0, 6.0, -6.0]], [[-4.0, 1.0, -1.0], [-3.0, -3.0, 1.0]]], 
+[[[-6.0, -1.0, -6.0], [0.0, 0.0, 0.0]], [[6.0, -6.0, -7.0], [2.0, 6.0, 0.0]], [[-1.0, 7.0, -6.0], [0.0, 7.0, -1.0]], [[4.0, 
+1.0, -5.0], [7.0, 4.0, 2.0]], [[2.0, -5.0, 7.0], [0.0, -2.0, -7.0]]]]))
+      arg1=Data(numpy.array([[[1.0, -4.0, -6.0], [-2.0, -7.0, 0.0]], [[4.0, -4.0, -6.0], [-4.0, 3.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, -7.0, 1.0], [-2.0, 3.0, 0.0]], [[6.0, -5.0, -6.0], [2.0, 6.0, 6.0]]]))
+      arg1.expand()
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([15.0, -3.0])+(1.-msk_ref)*numpy.array([18.0, -0.0])
+      ref=msk_ref*numpy.array([[[-1.0, -30.0], [53.0, 65.0], [-7.0, 50.0], [-89.0, -34.0], [32.0, 60.0]], [[-15.0, 26.0], 
+[-2.0, -2.0], [-45.0, -9.0], [-11.0, 61.0], [-108.0, -75.0]], [[-38.0, 52.0], [13.0, 29.0], [20.0, -4.0], [-24.0, 49.0], 
+[-12.0, 32.0]], [[-14.0, -15.0], [-9.0, -51.0], [-21.0, -13.0], [-6.0, 1.0], [3.0, -18.0]]])+(1.-msk_ref)*numpy.array([[[43.0, 
+20.0], [-71.0, -13.0], [0.0, -87.0], [24.0, -26.0], [-50.0, -4.0]], [[-70.0, -8.0], [27.0, -1.0], [28.0, 41.0], [26.0, -80.0], 
+[-32.0, -3.0]], [[19.0, -40.0], [-11.0, -12.0], [-1.0, 100.0], [30.0, 36.0], [1.0, -41.0]], [[19.0, 5.0], [31.0, 148.0], 
+[-31.0, 31.0], [-26.0, 99.0], [30.0, -59.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([-3.0, -1.0, 4.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 5.0, 4.0], [-2.0, -5.0, 4.0]])+(1.-msk_arg1)*numpy.array([[7.0, 0.0, -4.0], [2.0, -5.0, 
--6.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_tensor_transposed_mult_taggedData_rank4_expandedData_rank4(self):
+      arg0=Data(numpy.array([[[[-3.0, -7.0, 0.0], [-3.0, 0.0, 7.0]], [[-4.0, 6.0, 3.0], [6.0, 6.0, 0.0]], [[-7.0, -7.0, -6.0], 
+[-3.0, -3.0, 1.0]], [[5.0, -2.0, -4.0], [5.0, 6.0, 4.0]], [[3.0, 4.0, 6.0], [0.0, 3.0, 0.0]]], [[[-6.0, -5.0, 2.0], [-6.0, 0.0, 
+-4.0]], [[-6.0, -2.0, -7.0], [1.0, -6.0, -2.0]], [[-1.0, 0.0, 6.0], [-1.0, 5.0, -6.0]], [[4.0, 0.0, 0.0], [-4.0, -1.0, -3.0]], 
+[[3.0, -3.0, 2.0], [4.0, 7.0, -2.0]]], [[[0.0, -7.0, 0.0], [-1.0, 7.0, 0.0]], [[-5.0, 2.0, 6.0], [6.0, 6.0, -3.0]], [[6.0, 0.0, 
+-5.0], [7.0, 6.0, 1.0]], [[-3.0, -5.0, -5.0], [-6.0, 5.0, 2.0]], [[7.0, 7.0, 6.0], [-7.0, 1.0, 2.0]]], [[[5.0, -5.0, 4.0], 
+[5.0, 3.0, 4.0]], [[-2.0, 2.0, 7.0], [-5.0, -1.0, -4.0]], [[-6.0, 7.0, -1.0], [4.0, -4.0, 3.0]], [[0.0, -6.0, 1.0], [3.0, -5.0, 
+-2.0]], [[3.0, 3.0, 0.0], [3.0, 5.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 4.0, -6.0], [2.0, 3.0, 6.0]], [[-3.0, -3.0, 7.0], [6.0, -7.0, 1.0]], [[4.0, 
+4.0, 5.0], [2.0, -2.0, -2.0]], [[0.0, -5.0, 5.0], [-5.0, 0.0, -1.0]], [[3.0, 4.0, 3.0], [-6.0, 0.0, 5.0]]], [[[-5.0, 1.0, 
+-5.0], [2.0, -7.0, -5.0]], [[0.0, 2.0, 6.0], [-6.0, 1.0, -2.0]], [[3.0, 4.0, 7.0], [-3.0, -2.0, 6.0]], [[3.0, 6.0, -5.0], [0.0, 
+-5.0, 0.0]], [[1.0, -6.0, -6.0], [4.0, 6.0, -6.0]]], [[[2.0, 3.0, 0.0], [2.0, 0.0, -2.0]], [[3.0, 4.0, -6.0], [-3.0, 0.0, 
+6.0]], [[-7.0, 7.0, -7.0], [2.0, 0.0, 0.0]], [[2.0, 2.0, 2.0], [-3.0, -1.0, 7.0]], [[-3.0, -4.0, 2.0], [7.0, 2.0, -4.0]]], 
+[[[2.0, 1.0, 3.0], [0.0, -4.0, -1.0]], [[3.0, 1.0, 2.0], [-2.0, -1.0, -2.0]], [[6.0, 2.0, -6.0], [-6.0, 0.0, -2.0]], [[4.0, 
+5.0, 0.0], [5.0, 0.0, 2.0]], [[7.0, 3.0, -1.0], [5.0, 1.0, -4.0]]]]))
+      arg1=Data(numpy.array([[[[2.0, 4.0, 5.0], [-7.0, -1.0, -2.0]], [[5.0, 1.0, -4.0], [-4.0, -5.0, -4.0]], [[-2.0, 7.0, 
+-1.0], [3.0, -2.0, -6.0]], [[7.0, 0.0, -4.0], [-1.0, -5.0, 2.0]], [[3.0, 3.0, 2.0], [-5.0, -1.0, -6.0]]], [[[-7.0, -2.0, -6.0], 
+[3.0, 4.0, 1.0]], [[1.0, 1.0, 6.0], [-2.0, 0.0, -7.0]], [[7.0, -7.0, 5.0], [-1.0, 2.0, 6.0]], [[-5.0, 0.0, 6.0], [0.0, 1.0, 
+-5.0]], [[-5.0, -5.0, 1.0], [5.0, 0.0, 4.0]]], [[[2.0, 5.0, 0.0], [2.0, -4.0, -1.0]], [[5.0, 4.0, -6.0], [2.0, -2.0, -7.0]], 
+[[3.0, -5.0, 2.0], [0.0, 0.0, 3.0]], [[-3.0, -1.0, 5.0], [5.0, -7.0, -7.0]], [[-7.0, 1.0, -6.0], [2.0, 4.0, -4.0]]], [[[3.0, 
+0.0, -4.0], [2.0, 1.0, -5.0]], [[-6.0, 6.0, 5.0], [-3.0, 0.0, 0.0]], [[7.0, -7.0, -1.0], [-4.0, 5.0, 4.0]], [[7.0, -2.0, -4.0], 
+[-4.0, 0.0, -5.0]], [[-5.0, -6.0, -7.0], [1.0, -6.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, 1.0, -5.0], [0.0, 5.0, 0.0]], [[-2.0, 2.0, 0.0], [0.0, 4.0, 4.0]], [[-4.0, 
+-3.0, 2.0], [-6.0, -6.0, 6.0]], [[3.0, 2.0, 2.0], [-2.0, -1.0, -5.0]], [[2.0, 5.0, -7.0], [-1.0, 2.0, 5.0]]], [[[-7.0, 7.0, 
+-2.0], [7.0, 6.0, -5.0]], [[0.0, 6.0, -3.0], [-7.0, -6.0, 6.0]], [[4.0, -4.0, 7.0], [0.0, -4.0, 0.0]], [[-2.0, 0.0, 1.0], 
+[-2.0, 5.0, -6.0]], [[-6.0, -1.0, 4.0], [-4.0, 0.0, 0.0]]], [[[4.0, 5.0, 1.0], [5.0, 0.0, 0.0]], [[3.0, 2.0, 5.0], [5.0, 4.0, 
+4.0]], [[-4.0, -3.0, 1.0], [-5.0, -6.0, -3.0]], [[0.0, -5.0, 3.0], [0.0, 3.0, 0.0]], [[0.0, 0.0, 0.0], [5.0, 4.0, -1.0]]], 
+[[[-4.0, 1.0, -4.0], [3.0, -2.0, 4.0]], [[-3.0, 7.0, -7.0], [-3.0, 2.0, -3.0]], [[5.0, 7.0, -3.0], [0.0, 2.0, -1.0]], [[0.0, 
+-5.0, -3.0], [0.0, -7.0, 3.0]], [[1.0, 5.0, 2.0], [0.0, -4.0, 5.0]]]]))
+      arg1.expand()
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([11.0, 27.0])+(1.-msk_ref)*numpy.array([-37.0, -25.0])
+      ref=msk_ref*numpy.array([[[[-27.0, -38.0, -94.0, -4.0, -57.0], [33.0, -53.0, 73.0, -20.0, 63.0], [-54.0, -98.0, 47.0, 
+-48.0, -20.0], [-50.0, -15.0, 68.0, -30.0, 33.0]], [[-17.0, -80.0, 53.0, -76.0, -24.0], [40.0, 8.0, -49.0, 44.0, 23.0], [10.0, 
+-14.0, -36.0, 9.0, 52.0], [-6.0, 57.0, -67.0, -76.0, -67.0]], [[-50.0, 5.0, -38.0, -5.0, -42.0], [79.0, -51.0, -27.0, -9.0, 
+53.0], [-44.0, -34.0, 5.0, -3.0, 56.0], [-11.0, -21.0, 7.0, -4.0, 131.0]], [[-67.0, -27.0, -41.0, 24.0, -54.0], [36.0, -59.0, 
+60.0, -63.0, 22.0], [-18.0, 11.0, 29.0, -78.0, 5.0], [27.0, -77.0, 79.0, 15.0, -28.0]], [[49.0, -20.0, 10.0, -18.0, 30.0], 
+[-53.0, 43.0, 29.0, 24.0, -29.0], [14.0, -11.0, 1.0, -4.0, -41.0], [-12.0, 36.0, 2.0, -11.0, -99.0]]], [[[28.0, -3.0, -19.0, 
+-52.0, 25.0], [18.0, 41.0, -15.0, 62.0, 11.0], [-45.0, -46.0, -1.0, 31.0, 29.0], [-18.0, 34.0, -1.0, 4.0, 52.0]], [[-52.0, 
+30.0, 32.0, 11.0, -25.0], [65.0, -38.0, -88.0, -8.0, 30.0], [6.0, 32.0, -28.0, 46.0, 68.0], [16.0, -14.0, -63.0, -4.0, 134.0]], 
+[[42.0, -26.0, 19.0, -67.0, 45.0], [-18.0, 79.0, -2.0, 76.0, -18.0], [-18.0, -11.0, -9.0, 35.0, 13.0], [6.0, 39.0, -8.0, 3.0, 
+-50.0]], [[43.0, 53.0, 0.0, 31.0, 51.0], [-47.0, 33.0, 12.0, -6.0, -52.0], [7.0, 35.0, 3.0, -4.0, -28.0], [18.0, -12.0, 27.0, 
+59.0, -9.0]], [[-27.0, -39.0, -19.0, -30.0, -11.0], [11.0, 18.0, 50.0, 14.0, 14.0], [-27.0, -1.0, 22.0, -11.0, 8.0], [26.0, 
+-38.0, 51.0, 13.0, -43.0]]], [[[-28.0, -38.0, -66.0, -34.0, -23.0], [39.0, -5.0, 64.0, 7.0, 30.0], [-65.0, -44.0, 35.0, -47.0, 
+19.0], [5.0, -39.0, 88.0, 18.0, -1.0]], [[-14.0, -89.0, 42.0, -101.0, -15.0], [34.0, 42.0, -31.0, 82.0, 39.0], [-9.0, -32.0, 
+-22.0, 52.0, 49.0], [-6.0, 54.0, -61.0, -72.0, -50.0]], [[-70.0, -12.0, -4.0, 27.0, -39.0], [34.0, -45.0, 28.0, -59.0, 4.0], 
+[1.0, 55.0, 11.0, -57.0, 22.0], [53.0, -82.0, 53.0, 29.0, -27.0]], [[-18.0, -9.0, -64.0, -16.0, -21.0], [65.0, -40.0, 17.0, 
+-20.0, 13.0], [-65.0, -41.0, 12.0, -90.0, 46.0], [-6.0, -19.0, 76.0, 23.0, 38.0]], [[116.0, 33.0, -6.0, 31.0, 76.0], [-114.0, 
+50.0, 51.0, -8.0, -91.0], [29.0, -3.0, 4.0, -54.0, -96.0], [-26.0, 51.0, 35.0, 29.0, -138.0]]], [[[-36.0, -47.0, -64.0, 7.0, 
+-44.0], [-18.0, -14.0, 115.0, -18.0, 45.0], [-21.0, -43.0, 60.0, -14.0, -58.0], [-8.0, -55.0, 77.0, -11.0, -48.0]], [[83.0, 
+5.0, 22.0, -40.0, 64.0], [-55.0, 80.0, -14.0, 71.0, -34.0], [4.0, -24.0, -14.0, 49.0, -24.0], [-25.0, 74.0, -36.0, -6.0, 
+-38.0]], [[-19.0, -27.0, 64.0, -16.0, -33.0], [33.0, -34.0, -90.0, 5.0, 26.0], [44.0, -1.0, -46.0, 33.0, 35.0], [-25.0, 61.0, 
+-114.0, -83.0, 14.0]], [[-31.0, 11.0, -12.0, 14.0, -14.0], [-7.0, 8.0, 22.0, 11.0, 38.0], [-2.0, 0.0, 26.0, 75.0, -18.0], [7.0, 
+-40.0, -4.0, 6.0, 68.0]], [[-2.0, -7.0, 32.0, -13.0, 16.0], [-1.0, 21.0, -11.0, 5.0, -27.0], [10.0, 44.0, -15.0, -11.0, 20.0], 
+[35.0, -9.0, 1.0, 18.0, -51.0]]]])+(1.-msk_ref)*numpy.array([[[[35.0, 30.0, -46.0, -20.0, 110.0], [-7.0, 46.0, -42.0, -45.0, 
+-78.0], [52.0, 45.0, -92.0, -29.0, 16.0], [24.0, 31.0, 81.0, -5.0, 33.0]], [[-67.0, -24.0, 47.0, -11.0, -85.0], [-19.0, -33.0, 
+77.0, -40.0, 25.0], [10.0, 26.0, 37.0, 15.0, 1.0], [17.0, -96.0, -72.0, 46.0, 29.0]], [[-39.0, -16.0, -30.0, 38.0, -23.0], 
+[2.0, -5.0, 43.0, -5.0, -16.0], [51.0, 39.0, -15.0, -11.0, 4.0], [-30.0, -23.0, 31.0, -27.0, 32.0]], [[-30.0, -14.0, 49.0, 
+15.0, -60.0], [-75.0, -16.0, 55.0, 21.0, 45.0], [-45.0, -14.0, 48.0, 40.0, -24.0], [-44.0, -52.0, -49.0, 7.0, -20.0]], [[-17.0, 
+22.0, 48.0, 10.0, 36.0], [-66.0, 87.0, 17.0, -21.0, 14.0], [5.0, 22.0, -6.0, -11.0, -35.0], [-18.0, 1.0, 29.0, -14.0, 54.0]]], 
+[[[1.0, -36.0, 7.0, 5.0, -11.0], [49.0, 19.0, -31.0, -4.0, 1.0], [-10.0, -76.0, 59.0, -41.0, -13.0], [41.0, 52.0, -12.0, 44.0, 
+-7.0]], [[-23.0, 0.0, 24.0, 37.0, -34.0], [-24.0, 18.0, 30.0, 35.0, 46.0], [-14.0, 0.0, 30.0, 11.0, -24.0], [-50.0, -2.0, 0.0, 
+-41.0, 8.0]], [[-47.0, 18.0, 56.0, 9.0, 6.0], [-70.0, 72.0, 53.0, -39.0, 18.0], [24.0, 53.0, -8.0, -5.0, -29.0], [-17.0, -43.0, 
+12.0, -9.0, 75.0]], [[0.0, -14.0, -10.0, 16.0, 61.0], [1.0, 81.0, -27.0, -36.0, -44.0], [37.0, -24.0, -5.0, -60.0, -20.0], 
+[24.0, 58.0, 62.0, 20.0, 43.0]], [[52.0, -14.0, -94.0, -5.0, -8.0], [57.0, -118.0, -38.0, 50.0, -40.0], [-12.0, -19.0, -30.0, 
+30.0, 50.0], [-10.0, 15.0, -1.0, -12.0, -95.0]]], [[[-1.0, -6.0, -41.0, 18.0, 7.0], [31.0, -8.0, -4.0, 4.0, -23.0], [33.0, 
+14.0, -21.0, -15.0, 12.0], [-7.0, 15.0, 33.0, -21.0, 7.0]], [[28.0, 26.0, 18.0, -19.0, 101.0], [-32.0, 99.0, -46.0, -42.0, 
+-34.0], [11.0, -4.0, -33.0, -38.0, -21.0], [31.0, 52.0, 55.0, 16.0, 41.0]], [[56.0, 28.0, -19.0, -25.0, 68.0], [126.0, 49.0, 
+-105.0, 3.0, -1.0], [10.0, -32.0, -10.0, -56.0, 10.0], [69.0, 113.0, 35.0, -14.0, 14.0]], [[-17.0, 24.0, 56.0, -14.0, 36.0], 
+[-66.0, 75.0, 18.0, -43.0, 6.0], [5.0, 29.0, -12.0, -7.0, -26.0], [7.0, -20.0, 9.0, 12.0, 55.0]], [[2.0, -10.0, -50.0, -9.0, 
+-63.0], [70.0, -115.0, 10.0, 28.0, 2.0], [5.0, 20.0, -9.0, 32.0, 47.0], [1.0, -38.0, -41.0, -12.0, -47.0]]], [[[-38.0, -22.0, 
+13.0, 23.0, -25.0], [-32.0, 15.0, 41.0, -15.0, -1.0], [16.0, 3.0, 19.0, -8.0, -15.0], [-15.0, -25.0, 1.0, 11.0, 24.0]], 
+[[-20.0, -16.0, -5.0, 30.0, -13.0], [-28.0, 8.0, 26.0, 7.0, -3.0], [9.0, -1.0, 9.0, -2.0, -12.0], [-31.0, -6.0, 16.0, -10.0, 
+6.0]], [[20.0, -16.0, -18.0, 32.0, 60.0], [-48.0, 60.0, -26.0, 6.0, -38.0], [-2.0, -46.0, 0.0, -28.0, -28.0], [-24.0, 62.0, 
+64.0, 2.0, -6.0]], [[-3.0, 10.0, -49.0, 2.0, 38.0], [32.0, 7.0, -4.0, -30.0, -49.0], [66.0, 55.0, -62.0, -25.0, 23.0], [12.0, 
+2.0, 53.0, -19.0, 39.0]], [[-1.0, -20.0, -99.0, 34.0, 13.0], [35.0, -44.0, 5.0, 4.0, -69.0], [67.0, 35.0, -57.0, -15.0, 33.0], 
+[-24.0, 6.0, 65.0, -31.0, -4.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[-5.0, -1.0, -4.0], [-6.0, -6.0, -1.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, -5.0, 6.0], [5.0, 6.0, -7.0]], [[3.0, 4.0, 7.0], [-3.0, 3.0, 
-7.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, -2.0, -3.0], [3.0, -1.0, -4.0]], [[-2.0, -4.0, 2.0], [7.0, 1.0, 0.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_tensor_transposed_mult_expandedData_rank2_taggedData_rank1(self):
+      arg0=Data(numpy.array([[-7.0, -2.0, -1.0], [3.0, -1.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, -6.0, -5.0], [-6.0, 0.0, 0.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-1.0, 7.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, 5.0, -2.0]))
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-78.0, -54.0])+(1.-msk_ref)*numpy.array([-4.0, -42.0])
+      ref=msk_ref*numpy.array([-14.0, 32.0])+(1.-msk_ref)*numpy.array([-15.0, -30.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[1.0, 0.0, 5.0], [3.0, 1.0, -1.0], [-7.0, -4.0, -3.0], [4.0, -4.0, 3.0]], [[-5.0, 5.0, 5.0], 
-[-2.0, 0.0, -1.0], [-5.0, -7.0, -7.0], [-7.0, -7.0, 1.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, -2.0, -2.0], [7.0, 0.0, -6.0], [5.0, -4.0, -2.0], [-2.0, 2.0, -5.0]], [[-2.0, 4.0, 
-5.0], [7.0, 0.0, -3.0], [0.0, -6.0, 0.0], [-2.0, 0.0, 3.0]]], [[[4.0, 0.0, -6.0], [-1.0, 3.0, 0.0], [-2.0, -5.0, 0.0], [-3.0, 
--3.0, 0.0]], [[3.0, 0.0, -7.0], [-7.0, -2.0, -7.0], [-6.0, -3.0, 2.0], [-5.0, 5.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 
--4.0, -4.0], [4.0, -3.0, 5.0], [7.0, 3.0, -6.0], [-7.0, 5.0, 5.0]], [[6.0, 1.0, 3.0], [1.0, -4.0, 7.0], [3.0, 0.0, -6.0], [4.0, 
--5.0, 4.0]]], [[[-4.0, 7.0, -6.0], [6.0, 4.0, -1.0], [-4.0, 1.0, 4.0], [4.0, 7.0, 5.0]], [[5.0, 0.0, -5.0], [-3.0, 7.0, -5.0], 
-[4.0, 6.0, -2.0], [0.0, 6.0, -4.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+   def test_tensor_transposed_mult_expandedData_rank2_taggedData_rank2(self):
+      arg0=Data(numpy.array([[4.0, 5.0, 1.0], [4.0, -2.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -5.0, -5.0], [-1.0, 5.0, -7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-4.0, -1.0, 2.0], [0.0, -7.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, 3.0, -5.0], [-4.0, 4.0, 1.0]]))
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([71.0, 16.0])+(1.-msk_ref)*numpy.array([-73.0, -129.0])
+      ref=msk_ref*numpy.array([[-19.0, -35.0], [-20.0, 14.0]])+(1.-msk_ref)*numpy.array([[10.0, -25.0], [53.0, 17.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank2_offset0(self):
-      arg0=Data(1.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, -1.0, 0.0, -5.0, -3.0], [-2.0, 0.0, 4.0, -5.0, -7.0], [5.0, -3.0, 0.0, 4.0, -3.0], 
-[0.0, -1.0, -3.0, -7.0, 4.0]])+(1.-msk_arg1)*numpy.array([[3.0, -7.0, 3.0, -6.0, -4.0], [2.0, -6.0, 5.0, -1.0, 0.0], [-1.0, 
-0.0, -1.0, -5.0, -6.0], [-2.0, -1.0, -1.0, -5.0, 1.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_tensor_transposed_mult_expandedData_rank4_taggedData_rank2(self):
+      arg0=Data(numpy.array([[[[3.0, -1.0, -7.0], [5.0, -4.0, -3.0]], [[7.0, -4.0, -2.0], [-7.0, -3.0, -2.0]], [[4.0, 0.0, 
+7.0], [4.0, -3.0, -1.0]], [[5.0, 0.0, -4.0], [-2.0, 7.0, 1.0]], [[3.0, 0.0, -2.0], [-3.0, -3.0, -2.0]]], [[[-6.0, 5.0, -2.0], 
+[7.0, -5.0, 7.0]], [[5.0, -7.0, 4.0], [4.0, 2.0, 3.0]], [[-2.0, 5.0, 1.0], [0.0, 7.0, -2.0]], [[-7.0, -6.0, 5.0], [3.0, 5.0, 
+3.0]], [[1.0, 2.0, -3.0], [0.0, 5.0, 0.0]]], [[[0.0, 0.0, 4.0], [-6.0, -1.0, 1.0]], [[5.0, -2.0, 3.0], [5.0, 0.0, 4.0]], 
+[[-7.0, 0.0, -6.0], [-7.0, -6.0, 2.0]], [[0.0, -1.0, 6.0], [3.0, -7.0, 7.0]], [[-2.0, -5.0, 1.0], [-6.0, -4.0, 4.0]]], [[[0.0, 
+-7.0, -3.0], [3.0, 1.0, -5.0]], [[4.0, -3.0, 4.0], [6.0, -3.0, -6.0]], [[0.0, -1.0, -3.0], [1.0, -1.0, -7.0]], [[-3.0, -1.0, 
+1.0], [0.0, -2.0, 2.0]], [[-5.0, -1.0, 5.0], [7.0, -5.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 0.0, 0.0], [-1.0, 3.0, 5.0]], [[6.0, -2.0, 2.0], [-4.0, 0.0, -3.0]], [[-1.0, 
+-4.0, 0.0], [2.0, -1.0, 3.0]], [[-5.0, -6.0, 6.0], [-2.0, 7.0, -1.0]], [[6.0, -4.0, -5.0], [2.0, 0.0, 0.0]]], [[[-7.0, -2.0, 
+-1.0], [0.0, -5.0, 0.0]], [[5.0, -2.0, 1.0], [1.0, 6.0, -6.0]], [[-2.0, -5.0, 4.0], [-1.0, 4.0, 2.0]], [[-4.0, 2.0, 0.0], 
+[-5.0, -7.0, 0.0]], [[7.0, -3.0, 5.0], [-4.0, 0.0, 0.0]]], [[[-6.0, -7.0, -3.0], [-3.0, 0.0, 5.0]], [[-6.0, 5.0, 4.0], [-2.0, 
+-1.0, 0.0]], [[0.0, -7.0, 2.0], [2.0, 0.0, 2.0]], [[5.0, 4.0, -7.0], [2.0, -3.0, -4.0]], [[6.0, -5.0, -2.0], [-3.0, -5.0, 
+0.0]]], [[[-1.0, -2.0, 6.0], [0.0, -7.0, 0.0]], [[6.0, -5.0, -2.0], [2.0, 7.0, 4.0]], [[-7.0, 0.0, -6.0], [-7.0, 3.0, 6.0]], 
+[[-2.0, 1.0, -3.0], [3.0, 3.0, 5.0]], [[7.0, 6.0, 4.0], [-5.0, 5.0, 1.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[1.0, 7.0, 5.0], [7.0, -6.0, 4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -2.0, 3.0], [4.0, -7.0, -6.0]]))
+      arg1=transpose(arg1)
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-7.0, -1.0, 0.0, -5.0, -3.0], [-2.0, 0.0, 4.0, -5.0, -7.0], [5.0, -3.0, 0.0, 4.0, -3.0], [0.0, 
--1.0, -3.0, -7.0, 4.0]])+(1.-msk_ref)*numpy.array([[3.0, -7.0, 3.0, -6.0, -4.0], [2.0, -6.0, 5.0, -1.0, 0.0], [-1.0, 0.0, -1.0, 
--5.0, -6.0], [-2.0, -1.0, -1.0, -5.0, 1.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([3.0, -1.0, 5.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[6.0, 3.0, 2.0], [2.0, -1.0, 0.0], [2.0, -5.0, -4.0], [0.0, -2.0, -4.0], [2.0, -6.0, 0.0]], 
-[[-6.0, -5.0, -1.0], [-2.0, -3.0, -7.0], [5.0, 0.0, 0.0], [3.0, 7.0, 2.0], [5.0, -1.0, 5.0]], [[-1.0, 3.0, -2.0], [2.0, 0.0, 
--6.0], [-1.0, -5.0, 1.0], [6.0, 7.0, -3.0], [6.0, -6.0, 6.0]], [[4.0, 5.0, 3.0], [1.0, -2.0, 4.0], [-4.0, -2.0, 6.0], [4.0, 
-1.0, 1.0], [3.0, -3.0, -4.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 4.0, 0.0], [7.0, -1.0, -3.0], [3.0, -4.0, -7.0], [-5.0, 2.0, 
-6.0], [4.0, -3.0, -6.0]], [[1.0, -7.0, 0.0], [4.0, 2.0, 0.0], [4.0, -3.0, 5.0], [7.0, -7.0, 2.0], [4.0, -4.0, -7.0]], [[-6.0, 
-7.0, 6.0], [4.0, 0.0, -6.0], [0.0, -5.0, -7.0], [-5.0, 0.0, 5.0], [1.0, 6.0, -2.0]], [[-4.0, 5.0, -1.0], [-6.0, 6.0, 4.0], 
-[-7.0, 4.0, -5.0], [0.0, 6.0, 7.0], [0.0, -7.0, -7.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=msk_ref*numpy.array([[8.0, -70.0, 81.0, -67.0, -18.0], [126.0, 4.0, -12.0, -21.0, -30.0], [-12.0, 57.0, -42.0, 114.0, 
+-34.0], [-69.0, 39.0, -37.0, 15.0, 92.0]])+(1.-msk_ref)*numpy.array([[-55.0, 12.0, 5.0, -21.0, 1.0], [36.0, 5.0, -22.0, 25.0, 
+5.0], [-37.0, 1.0, 16.0, 24.0, 27.0], [71.0, -61.0, -103.0, -50.0, -61.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_taggedData_rank3(self):
+      arg0=Data(numpy.array([[[[5.0, 7.0, -7.0], [0.0, 1.0, -7.0]], [[3.0, -6.0, -2.0], [-3.0, 4.0, 4.0]], [[2.0, -1.0, 7.0], 
+[7.0, -5.0, -5.0]], [[-7.0, 0.0, -6.0], [0.0, -4.0, 7.0]], [[-7.0, -3.0, -2.0], [7.0, -3.0, -2.0]]], [[[-1.0, 4.0, -3.0], 
+[-1.0, -1.0, 2.0]], [[2.0, 2.0, -5.0], [0.0, -7.0, -7.0]], [[7.0, 1.0, -1.0], [6.0, -1.0, -1.0]], [[-5.0, 1.0, 0.0], [-2.0, 
+7.0, -3.0]], [[0.0, 7.0, -2.0], [-6.0, 7.0, 4.0]]], [[[2.0, 0.0, 2.0], [7.0, 7.0, -6.0]], [[-4.0, -7.0, 7.0], [-7.0, -1.0, 
+1.0]], [[2.0, 5.0, 0.0], [7.0, 0.0, 1.0]], [[0.0, -1.0, 0.0], [-5.0, 5.0, -1.0]], [[6.0, -5.0, -1.0], [-7.0, -4.0, 3.0]]], 
+[[[7.0, -1.0, 3.0], [-5.0, -7.0, 4.0]], [[2.0, 7.0, 2.0], [-3.0, -6.0, -4.0]], [[3.0, 1.0, -1.0], [-6.0, 3.0, -2.0]], [[-7.0, 
+-6.0, -5.0], [4.0, 6.0, -5.0]], [[1.0, -6.0, 2.0], [4.0, 3.0, -5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, -3.0, -6.0], [0.0, 0.0, -4.0]], [[-6.0, 2.0, -6.0], [3.0, 0.0, 4.0]], [[-2.0, 
+0.0, -5.0], [7.0, -3.0, 1.0]], [[-4.0, -4.0, -4.0], [2.0, 4.0, -7.0]], [[4.0, 1.0, -1.0], [7.0, 1.0, 4.0]]], [[[0.0, 2.0, 0.0], 
+[7.0, -6.0, 6.0]], [[6.0, -3.0, 0.0], [5.0, 6.0, -2.0]], [[-1.0, 3.0, -7.0], [-2.0, 0.0, -3.0]], [[0.0, 0.0, 2.0], [-5.0, -6.0, 
+1.0]], [[5.0, 4.0, -6.0], [1.0, 4.0, -5.0]]], [[[4.0, 2.0, 4.0], [-2.0, 0.0, 0.0]], [[7.0, -6.0, -3.0], [5.0, -2.0, 2.0]], 
+[[2.0, 4.0, 3.0], [-6.0, 4.0, -7.0]], [[0.0, -3.0, -5.0], [-2.0, -4.0, 5.0]], [[-4.0, 5.0, -7.0], [-3.0, -4.0, -2.0]]], 
+[[[-6.0, 2.0, -4.0], [3.0, 3.0, 3.0]], [[6.0, -4.0, 0.0], [5.0, 6.0, -1.0]], [[-7.0, 1.0, -5.0], [1.0, -7.0, -5.0]], [[3.0, 
+4.0, 7.0], [6.0, -4.0, 6.0]], [[3.0, 7.0, 5.0], [1.0, -7.0, -6.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[3.0, 1.0, -6.0], [-7.0, 3.0, 7.0]], [[3.0, -4.0, 3.0], [1.0, -4.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, -4.0, 3.0], [-5.0, 5.0, 0.0]], [[2.0, -3.0, 6.0], [-2.0, -2.0, 2.0]]]))
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[25.0, 7.0, -9.0, -18.0, 12.0], [-18.0, -38.0, 15.0, 12.0, 41.0], [-16.0, -24.0, 7.0, -4.0, 
-54.0], [22.0, 25.0, 20.0, 16.0, -8.0]])+(1.-msk_ref)*numpy.array([[5.0, 7.0, -22.0, 13.0, -15.0], [10.0, 10.0, 40.0, 38.0, 
--19.0], [5.0, -18.0, -30.0, 10.0, -13.0], [-22.0, -4.0, -50.0, 29.0, -28.0]])
+      ref=msk_ref*numpy.array([[[18.0, -38.0], [76.0, 8.0], [-136.0, 58.0], [52.0, -23.0], [-84.0, 4.0]], [[37.0, -25.0], 
+[-32.0, 11.0], [-24.0, 24.0], [0.0, -49.0], [110.0, -68.0]], [[-76.0, -9.0], [-8.0, 34.0], [-31.0, -7.0], [42.0, -21.0], [77.0, 
+44.0]], [[44.0, 57.0], [-24.0, 5.0], [53.0, -16.0], [-42.0, -32.0], [-69.0, 25.0]]])+(1.-msk_ref)*numpy.array([[[6.0, -43.0], 
+[-23.0, -52.0], [-59.0, -40.0], [26.0, -46.0], [-49.0, -9.0]], [[-73.0, 4.0], [-1.0, -5.0], [-20.0, -55.0], [1.0, 36.0], 
+[-34.0, -58.0]], [[2.0, 30.0], [-41.0, 12.0], [37.0, 0.0], [-13.0, 1.0], [-34.0, -55.0]], [[-2.0, -48.0], [3.0, 0.0], [-38.0, 
+-45.0], [-54.0, 44.0], [-62.0, 15.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[3.0, 5.0, -7.0], [-3.0, -4.0, 0.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[5.0, -4.0, -1.0], [-7.0, -6.0, -6.0]], [[0.0, 5.0, -7.0], [5.0, 2.0, 1.0]], [[-1.0, 1.0, 
--3.0], [-1.0, 7.0, -4.0]], [[-6.0, 6.0, -4.0], [-7.0, 0.0, 4.0]], [[3.0, 3.0, 0.0], [-4.0, 0.0, -4.0]]], [[[-2.0, 0.0, 5.0], 
-[0.0, 7.0, 2.0]], [[-4.0, -3.0, 0.0], [-6.0, 0.0, -6.0]], [[-4.0, 7.0, 7.0], [7.0, -5.0, -4.0]], [[-5.0, 5.0, 7.0], [-2.0, 
--1.0, -1.0]], [[6.0, 4.0, -6.0], [0.0, 7.0, -2.0]]], [[[0.0, -5.0, 5.0], [-2.0, 0.0, 6.0]], [[2.0, -2.0, -2.0], [2.0, 2.0, 
-0.0]], [[-4.0, 7.0, 0.0], [-3.0, -2.0, 0.0]], [[5.0, 2.0, -2.0], [-6.0, -3.0, 5.0]], [[-4.0, -7.0, 2.0], [3.0, 6.0, 3.0]]], 
-[[[0.0, 1.0, 2.0], [1.0, -2.0, -2.0]], [[1.0, -1.0, -5.0], [-1.0, 5.0, -3.0]], [[3.0, 0.0, 0.0], [5.0, 2.0, -2.0]], [[1.0, 4.0, 
-0.0], [7.0, 2.0, -6.0]], [[3.0, -4.0, -5.0], [-4.0, 7.0, -5.0]]]])+(1.-msk_arg1)*numpy.array([[[[3.0, 5.0, -6.0], [7.0, -3.0, 
-3.0]], [[6.0, -6.0, -3.0], [0.0, 3.0, -3.0]], [[-1.0, -3.0, -1.0], [-7.0, -6.0, 7.0]], [[-4.0, -1.0, -3.0], [0.0, -2.0, -4.0]], 
-[[5.0, -5.0, 2.0], [2.0, -5.0, -3.0]]], [[[-2.0, 3.0, -2.0], [6.0, 4.0, -3.0]], [[4.0, 3.0, 1.0], [6.0, -3.0, 2.0]], [[7.0, 
--3.0, 7.0], [-1.0, 0.0, -5.0]], [[-6.0, -6.0, -3.0], [4.0, -2.0, 6.0]], [[1.0, -2.0, 2.0], [5.0, -1.0, 0.0]]], [[[-3.0, 1.0, 
-0.0], [-5.0, 0.0, 6.0]], [[6.0, 0.0, 1.0], [-2.0, 5.0, 5.0]], [[7.0, -1.0, 7.0], [-1.0, 5.0, 2.0]], [[5.0, 6.0, -3.0], [-4.0, 
--5.0, 0.0]], [[-4.0, 3.0, -2.0], [-6.0, 1.0, -7.0]]], [[[0.0, 5.0, 7.0], [0.0, 6.0, 2.0]], [[1.0, -4.0, 5.0], [3.0, -1.0, 
-0.0]], [[2.0, 3.0, 2.0], [-2.0, 0.0, 6.0]], [[5.0, 0.0, 5.0], [3.0, -3.0, 0.0]], [[4.0, 0.0, 5.0], [1.0, 5.0, -5.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_expandedData_rank4_taggedData_rank4(self):
+      arg0=Data(numpy.array([[[[-4.0, -6.0, 0.0], [-4.0, 3.0, 4.0]], [[7.0, -5.0, -4.0], [-3.0, 0.0, 2.0]], [[0.0, 5.0, -6.0], 
+[-7.0, 5.0, -4.0]], [[5.0, 1.0, -6.0], [0.0, -5.0, 5.0]], [[0.0, 2.0, 4.0], [-1.0, 0.0, -5.0]]], [[[1.0, -2.0, -3.0], [-3.0, 
+-5.0, -7.0]], [[-3.0, -5.0, 2.0], [1.0, 4.0, 0.0]], [[-5.0, -4.0, 7.0], [3.0, -3.0, -1.0]], [[-6.0, -3.0, 4.0], [2.0, 5.0, 
+-1.0]], [[-4.0, 1.0, -1.0], [1.0, 3.0, -4.0]]], [[[4.0, 4.0, 6.0], [2.0, -3.0, -6.0]], [[3.0, 7.0, 2.0], [3.0, 6.0, -5.0]], 
+[[1.0, -3.0, 2.0], [7.0, -4.0, 3.0]], [[-1.0, -5.0, 2.0], [-1.0, 0.0, 4.0]], [[-1.0, 3.0, -6.0], [0.0, -6.0, 0.0]]], [[[1.0, 
+0.0, -3.0], [0.0, -5.0, 1.0]], [[5.0, 5.0, 4.0], [0.0, 4.0, 5.0]], [[2.0, 6.0, 4.0], [-4.0, -7.0, 3.0]], [[-4.0, 1.0, -2.0], 
+[2.0, 2.0, -3.0]], [[-5.0, 6.0, 5.0], [-5.0, -6.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, 4.0, 4.0], [0.0, -6.0, 3.0]], [[-5.0, -5.0, 7.0], [5.0, 0.0, 2.0]], [[1.0, 
+-2.0, -4.0], [-5.0, -1.0, -6.0]], [[-3.0, 2.0, 6.0], [-1.0, 0.0, -7.0]], [[0.0, 6.0, -1.0], [-5.0, -6.0, 4.0]]], [[[-2.0, 5.0, 
+-4.0], [0.0, 5.0, -3.0]], [[-4.0, 7.0, 5.0], [-1.0, 0.0, 0.0]], [[-4.0, -7.0, 0.0], [1.0, -3.0, -4.0]], [[0.0, -6.0, 0.0], 
+[-5.0, 6.0, 7.0]], [[3.0, -4.0, -7.0], [5.0, 7.0, 2.0]]], [[[-6.0, -4.0, 0.0], [-1.0, 1.0, 0.0]], [[-1.0, 6.0, -3.0], [-1.0, 
+7.0, 5.0]], [[0.0, -3.0, -7.0], [-4.0, -7.0, 0.0]], [[-2.0, -2.0, 4.0], [-2.0, -6.0, 0.0]], [[-3.0, 0.0, -5.0], [-2.0, 4.0, 
+0.0]]], [[[-2.0, -6.0, 4.0], [7.0, -6.0, 0.0]], [[3.0, -1.0, -5.0], [7.0, 5.0, -2.0]], [[6.0, 2.0, -3.0], [-3.0, -6.0, -5.0]], 
+[[6.0, 0.0, -7.0], [-2.0, 3.0, -6.0]], [[6.0, -3.0, 0.0], [7.0, 3.0, -6.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-6.0, -5.0, 2.0], [6.0, -4.0, 6.0]], [[0.0, -7.0, 3.0], [7.0, -5.0, -2.0]], [[-2.0, 2.0, 4.0], 
+[4.0, -4.0, 4.0]], [[-1.0, -7.0, -1.0], [1.0, 6.0, 1.0]], [[5.0, 0.0, 3.0], [-7.0, 3.0, 3.0]]], [[[-2.0, -5.0, 3.0], [0.0, 5.0, 
+-2.0]], [[6.0, -6.0, -5.0], [2.0, 1.0, 3.0]], [[-4.0, -3.0, -4.0], [-7.0, -1.0, -3.0]], [[3.0, 5.0, 1.0], [7.0, 3.0, -5.0]], 
+[[-1.0, -7.0, 6.0], [5.0, -7.0, 6.0]]], [[[6.0, 0.0, 7.0], [0.0, 0.0, 6.0]], [[-5.0, -1.0, 4.0], [5.0, -2.0, 0.0]], [[-3.0, 
+7.0, 0.0], [5.0, 3.0, 6.0]], [[7.0, -3.0, -5.0], [0.0, -6.0, 1.0]], [[-5.0, -3.0, 5.0], [6.0, -7.0, -6.0]]], [[[-6.0, 4.0, 
+2.0], [0.0, 3.0, 0.0]], [[0.0, 0.0, 1.0], [4.0, 7.0, -7.0]], [[0.0, -5.0, 4.0], [-7.0, -2.0, 2.0]], [[3.0, 0.0, 3.0], [7.0, 
+-7.0, 4.0]], [[-5.0, 4.0, 0.0], [-5.0, 6.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, 4.0, 4.0], [-7.0, 7.0, 5.0]], [[-7.0, 1.0, 1.0], [-4.0, 0.0, -4.0]], [[-5.0, 
+3.0, -7.0], [4.0, -7.0, 5.0]], [[3.0, 1.0, 3.0], [3.0, 2.0, -6.0]], [[0.0, -5.0, 1.0], [-1.0, 0.0, 1.0]]], [[[-6.0, -2.0, 
+-4.0], [1.0, 7.0, 5.0]], [[1.0, -5.0, -5.0], [-1.0, -2.0, -6.0]], [[1.0, -6.0, -1.0], [-5.0, 0.0, 6.0]], [[2.0, 7.0, 6.0], 
+[-1.0, 5.0, -5.0]], [[7.0, 7.0, 0.0], [-6.0, -1.0, 3.0]]], [[[4.0, -6.0, 0.0], [-5.0, 1.0, 5.0]], [[0.0, -1.0, 0.0], [2.0, 
+-2.0, 3.0]], [[7.0, 5.0, 3.0], [-2.0, 3.0, 7.0]], [[-4.0, 4.0, -6.0], [-7.0, -4.0, -2.0]], [[-6.0, -7.0, 1.0], [-1.0, 0.0, 
+3.0]]], [[[-5.0, 5.0, -6.0], [0.0, -7.0, 0.0]], [[6.0, -1.0, -7.0], [-5.0, -2.0, -5.0]], [[-4.0, -2.0, 1.0], [0.0, 0.0, 6.0]], 
+[[-1.0, -4.0, 4.0], [-3.0, -3.0, 7.0]], [[-6.0, 0.0, -4.0], [-1.0, 1.0, -6.0]]]]))
+      res=tensor_transposed_mult(arg0,arg1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[47.0, 51.0, -2.0, 61.0, 36.0], [-69.0, -9.0, -27.0, -29.0, 52.0], [-54.0, -4.0, 40.0, 69.0, 
--94.0], [-4.0, 16.0, -14.0, -6.0, 8.0]])+(1.-msk_ref)*numpy.array([[67.0, -3.0, 34.0, 12.0, -10.0], [-11.0, 14.0, -40.0, -31.0, 
--32.0], [11.0, -3.0, -50.0, 98.0, 31.0], [-48.0, -57.0, 13.0, -17.0, -46.0]])
+      ref=msk_ref*numpy.array([[[[42.0, -9.0, -16.0, 64.0, 29.0], [45.0, 19.0, 47.0, -81.0, 29.0], [0.0, 0.0, -17.0, -24.0, 
+-31.0], [9.0, -23.0, 60.0, -45.0, 50.0]], [[-31.0, -2.0, -44.0, 31.0, 50.0], [-5.0, 92.0, 18.0, -39.0, 1.0], [26.0, -61.0, 
+-59.0, 86.0, -70.0], [-70.0, -30.0, 34.0, -4.0, -32.0]], [[-123.0, -119.0, -78.0, -10.0, 34.0], [-10.0, -21.0, 65.0, 5.0, 
+-165.0], [-66.0, -74.0, -9.0, -19.0, -98.0], [23.0, 29.0, -18.0, -118.0, 69.0]], [[3.0, -10.0, 8.0, -31.0, 7.0], [-68.0, 64.0, 
+-9.0, -26.0, 17.0], [18.0, -40.0, 7.0, 97.0, -53.0], [-53.0, -76.0, -9.0, 52.0, -31.0]], [[-38.0, 1.0, -4.0, -24.0, 4.0], 
+[12.0, -49.0, 0.0, 32.0, -25.0], [-2.0, 9.0, -21.0, -31.0, 38.0], [16.0, 35.0, 3.0, -15.0, -7.0]]], [[[-42.0, 23.0, -38.0, 
+-24.0, -19.0], [-12.0, 1.0, 61.0, -11.0, -27.0], [-57.0, -20.0, -89.0, 51.0, 45.0], [-35.0, -1.0, 15.0, -20.0, -56.0]], [[37.0, 
+28.0, -8.0, 61.0, -4.0], [57.0, 8.0, 8.0, -13.0, 27.0], [-4.0, 25.0, -9.0, -40.0, 18.0], [14.0, 34.0, 18.0, -24.0, 14.0]], 
+[[88.0, 87.0, 50.0, 10.0, -37.0], [38.0, -41.0, -11.0, -11.0, 105.0], [13.0, 78.0, -13.0, -41.0, 117.0], [19.0, 5.0, 31.0, 
+44.0, -28.0]], [[45.0, 24.0, 6.0, 54.0, -20.0], [66.0, -32.0, 1.0, 5.0, 20.0], [-14.0, 49.0, 16.0, -84.0, 42.0], [47.0, 54.0, 
+5.0, -31.0, 34.0]], [[-13.0, -10.0, -18.0, 13.0, -33.0], [23.0, -32.0, 19.0, 28.0, -49.0], [-55.0, 14.0, 9.0, -48.0, 21.0], 
+[35.0, 52.0, -30.0, -45.0, 21.0]]], [[[-44.0, 31.0, 20.0, -60.0, -3.0], [-13.0, -47.0, -45.0, 73.0, -1.0], [30.0, 16.0, -19.0, 
+-2.0, 67.0], [-5.0, 35.0, -16.0, 41.0, -56.0]], [[-85.0, -42.0, -16.0, -20.0, 3.0], [5.0, -37.0, -53.0, 110.0, -97.0], [2.0, 
+-11.0, 43.0, -51.0, -20.0], [32.0, 91.0, -70.0, -26.0, 14.0]], [[89.0, 90.0, 56.0, 4.0, -41.0], [-7.0, 33.0, -57.0, 12.0, 
+113.0], [38.0, 49.0, 17.0, 33.0, 66.0], [-26.0, -19.0, -12.0, 98.0, -64.0]], [[53.0, 26.0, 12.0, 37.0, 20.0], [25.0, 24.0, 6.0, 
+-53.0, 67.0], [32.0, 13.0, -13.0, 2.0, 0.0], [-10.0, -30.0, 48.0, 12.0, 6.0]], [[3.0, -9.0, 8.0, -50.0, -41.0], [-61.0, 0.0, 
+25.0, -12.0, -14.0], [-48.0, -10.0, 6.0, 50.0, 8.0], [-12.0, -48.0, -27.0, 21.0, -19.0]]], [[[14.0, 14.0, 10.0, -27.0, -16.0], 
+[-38.0, 19.0, 10.0, -20.0, 22.0], [-9.0, -7.0, -12.0, 53.0, 9.0], [-27.0, -45.0, 0.0, 33.0, -31.0]], [[-33.0, -53.0, 20.0, 
+-15.0, 64.0], [-13.0, -1.0, -70.0, 31.0, -14.0], [88.0, -22.0, 62.0, -19.0, -78.0], [10.0, -3.0, -7.0, 19.0, 39.0]], [[-12.0, 
+-29.0, 48.0, -91.0, 38.0], [-63.0, -50.0, -16.0, -24.0, 27.0], [58.0, -6.0, 13.0, 21.0, -1.0], [-1.0, -82.0, 34.0, 51.0, 4.0]], 
+[[1.0, -3.0, -10.0, 10.0, -43.0], [13.0, -23.0, 14.0, 26.0, -37.0], [-56.0, 17.0, 17.0, -36.0, 23.0], [30.0, 41.0, -37.0, 
+-30.0, 14.0]], [[-32.0, -20.0, 22.0, -89.0, -11.0], [-23.0, -125.0, 41.0, -3.0, -26.0], [-31.0, 26.0, -22.0, -48.0, 80.0], 
+[46.0, -15.0, 25.0, -17.0, 14.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, -25.0, 26.0, -5.0, -13.0], [-69.0, -43.0, -7.0, 13.0, 
+64.0], [-3.0, 17.0, 56.0, -2.0, -33.0], [23.0, -17.0, 2.0, 36.0, -58.0]], [[-2.0, 9.0, -9.0, 4.0, 29.0], [27.0, -32.0, 5.0, 
+-18.0, -94.0], [-5.0, 21.0, -35.0, -81.0, 73.0], [-42.0, -109.0, 49.0, 52.0, -15.0]], [[-29.0, 31.0, -26.0, 8.0, 5.0], [-28.0, 
+74.0, 6.0, -6.0, 6.0], [10.0, -24.0, -50.0, 63.0, -9.0], [16.0, 93.0, -40.0, -33.0, 50.0]], [[13.0, 61.0, -60.0, 50.0, -10.0], 
+[-46.0, 0.0, -58.0, 80.0, -22.0], [-54.0, -25.0, -40.0, 5.0, -10.0], [-11.0, -22.0, -28.0, -27.0, 37.0]], [[33.0, 9.0, 67.0, 
+-48.0, -22.0], [-35.0, -32.0, 14.0, -9.0, 90.0], [3.0, 8.0, 47.0, 81.0, -26.0], [78.0, 18.0, 11.0, 33.0, -21.0]]], [[[30.0, 
+27.0, 3.0, 15.0, -32.0], [38.0, 1.0, -46.0, 47.0, 7.0], [-48.0, -24.0, -7.0, 38.0, -36.0], [24.0, 16.0, -24.0, -70.0, 51.0]], 
+[[67.0, 44.0, 2.0, 7.0, -29.0], [-11.0, -63.0, -46.0, 72.0, 27.0], [-53.0, -9.0, 24.0, 21.0, -19.0], [25.0, -61.0, 7.0, -1.0, 
+5.0]], [[-64.0, 33.0, 4.0, 2.0, 30.0], [-2.0, 60.0, 9.0, -53.0, -92.0], [-2.0, 3.0, -102.0, 1.0, 60.0], [6.0, 4.0, 6.0, 10.0, 
+44.0]], [[88.0, -14.0, -45.0, -51.0, 42.0], [84.0, -19.0, 103.0, -42.0, 3.0], [102.0, 5.0, 47.0, -27.0, 68.0], [-72.0, -16.0, 
+54.0, 70.0, -31.0]], [[-29.0, -60.0, 3.0, 1.0, 10.0], [82.0, 27.0, 21.0, -44.0, -38.0], [28.0, 6.0, 5.0, -53.0, 4.0], [-42.0, 
+22.0, 1.0, -37.0, 0.0]]], [[[16.0, 42.0, 7.0, -23.0, 21.0], [50.0, 13.0, 23.0, -34.0, -65.0], [6.0, 0.0, -57.0, 11.0, 65.0], 
+[3.0, -29.0, 32.0, 22.0, 38.0]], [[96.0, -6.0, 16.0, -25.0, -27.0], [79.0, -59.0, 1.0, 33.0, 49.0], [-3.0, -7.0, 72.0, 15.0, 
+-23.0], [4.0, -25.0, 19.0, -18.0, -4.0]], [[-61.0, 6.0, 73.0, -50.0, 12.0], [-19.0, 68.0, 45.0, -94.0, 10.0], [31.0, 9.0, 
+-49.0, 86.0, 18.0], [76.0, 86.0, -1.0, 17.0, 25.0]], [[-14.0, 24.0, 10.0, -14.0, 16.0], [-44.0, 2.0, 16.0, -22.0, -10.0], [8.0, 
+10.0, -26.0, 14.0, 32.0], [18.0, -16.0, 16.0, 50.0, -8.0]], [[31.0, 24.0, 14.0, -22.0, -3.0], [64.0, 16.0, 12.0, -14.0, -13.0], 
+[2.0, -12.0, -20.0, 40.0, 15.0], [17.0, 19.0, 7.0, -23.0, 44.0]]], [[[-93.0, -16.0, 34.0, 9.0, 27.0], [-27.0, 13.0, -5.0, 
+-59.0, -92.0], [-13.0, 32.0, -64.0, -65.0, 51.0], [-2.0, -57.0, 24.0, 39.0, -17.0]], [[-57.0, -47.0, 0.0, 36.0, -9.0], [36.0, 
+28.0, -33.0, -3.0, -39.0], [-22.0, -1.0, -12.0, -51.0, -29.0], [-25.0, 19.0, -27.0, -69.0, 12.0]], [[-68.0, -11.0, 2.0, 20.0, 
+-15.0], [-98.0, 56.0, -18.0, 6.0, 65.0], [-4.0, -11.0, -4.0, 57.0, -65.0], [40.0, 107.0, -61.0, -34.0, 3.0]], [[-41.0, -17.0, 
+-40.0, 33.0, -11.0], [-19.0, 73.0, -13.0, 17.0, 33.0], [7.0, -28.0, -8.0, 32.0, -59.0], [-9.0, 119.0, -67.0, -79.0, 33.0]], 
+[[-88.0, -49.0, -62.0, 78.0, 2.0], [-32.0, 44.0, -47.0, 29.0, -42.0], [-20.0, -7.0, -20.0, -85.0, -40.0], [-66.0, 28.0, -54.0, 
+-66.0, -4.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank3_offset0(self):
-      arg0=Data(1.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-4.0, -1.0], [0.0, 7.0]], [[-2.0, 0.0], [-7.0, 3.0]], [[5.0, -3.0], [2.0, -3.0]], [[0.0, 
-2.0], [0.0, 6.0]], [[6.0, 0.0], [7.0, 1.0]], [[-3.0, -7.0], [-4.0, -3.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, 6.0], [-4.0, 
--7.0]], [[0.0, -3.0], [6.0, 5.0]], [[-3.0, -7.0], [-4.0, -5.0]], [[0.0, 6.0], [4.0, 3.0]], [[6.0, 6.0], [-7.0, 3.0]], [[7.0, 
--6.0], [-2.0, 0.0]]])
+   def test_generalTensorTransposedProduct_float_rank0_taggedData_rank0_offset0(self):
+      arg0=7.0
+      arg1=Data(7.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-4.0, -1.0], [0.0, 7.0]], [[-2.0, 0.0], [-7.0, 3.0]], [[5.0, -3.0], [2.0, -3.0]], [[0.0, 2.0], 
-[0.0, 6.0]], [[6.0, 0.0], [7.0, 1.0]], [[-3.0, -7.0], [-4.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[-5.0, 6.0], [-4.0, -7.0]], 
-[[0.0, -3.0], [6.0, 5.0]], [[-3.0, -7.0], [-4.0, -5.0]], [[0.0, 6.0], [4.0, 3.0]], [[6.0, 6.0], [-7.0, 3.0]], [[7.0, -6.0], 
-[-2.0, 0.0]]])
+      ref=Data(49.0,self.functionspace)
+      ref.setTaggedValue(1,49.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank4_offset1(self):
-      arg0=Data(numpy.array([0.0, 2.0, -6.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[5.0, -4.0, 0.0], [-2.0, 7.0, 0.0]], [[4.0, -2.0, -4.0], [-4.0, 1.0, -7.0]]], [[[5.0, -4.0, 
--1.0], [-6.0, -4.0, -4.0]], [[-1.0, 5.0, -5.0], [-7.0, 7.0, -3.0]]], [[[6.0, -4.0, 0.0], [-1.0, 1.0, 7.0]], [[-3.0, -2.0, 6.0], 
-[2.0, 5.0, -2.0]]], [[[0.0, -6.0, 5.0], [-3.0, 0.0, 0.0]], [[2.0, 3.0, 6.0], [0.0, 5.0, 3.0]]], [[[5.0, 4.0, 0.0], [-2.0, -2.0, 
--6.0]], [[0.0, 1.0, -7.0], [2.0, -3.0, -5.0]]], [[[0.0, -6.0, 5.0], [-6.0, 1.0, 7.0]], [[1.0, -4.0, 6.0], [3.0, -2.0, 
--6.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 0.0, -7.0], [0.0, 7.0, 2.0]], [[-2.0, 6.0, 3.0], [6.0, 0.0, 0.0]]], [[[3.0, 1.0, 
-0.0], [-2.0, 0.0, 6.0]], [[6.0, 1.0, -3.0], [4.0, 3.0, -4.0]]], [[[-2.0, -3.0, 2.0], [-7.0, 7.0, 0.0]], [[5.0, 1.0, -6.0], 
-[1.0, 7.0, 4.0]]], [[[4.0, -6.0, -1.0], [-7.0, 0.0, 3.0]], [[-7.0, -6.0, 1.0], [6.0, -4.0, -5.0]]], [[[1.0, 6.0, 1.0], [-2.0, 
--1.0, -7.0]], [[-2.0, -7.0, -7.0], [-5.0, -1.0, -7.0]]], [[[-5.0, 7.0, 2.0], [4.0, -4.0, 4.0]], [[-7.0, 2.0, -5.0], [5.0, -2.0, 
--2.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-8.0, 14.0], [20.0, 44.0]], [[-2.0, 16.0], [40.0, 32.0]], [[-8.0, -40.0], [-40.0, 22.0]], 
-[[-42.0, 0.0], [-30.0, -8.0]], [[8.0, 32.0], [44.0, 24.0]], [[-42.0, -40.0], [-44.0, 32.0]]])+(1.-msk_ref)*numpy.array([[[42.0, 
-2.0], [-6.0, 0.0]], [[2.0, -36.0], [20.0, 30.0]], [[-18.0, 14.0], [38.0, -10.0]], [[-6.0, -18.0], [-18.0, 22.0]], [[6.0, 40.0], 
-[28.0, 40.0]], [[2.0, -32.0], [34.0, 8.0]]])
+   def test_generalTensorTransposedProduct_float_rank0_taggedData_rank1_offset0(self):
+      arg0=-3.0
+      arg1=Data(numpy.array([-7.0, 4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, 2.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([21.0, -12.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-15.0, -6.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank0_expandedData_rank4_offset0(self):
-      arg0=Data(6.0,self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-5.0, 3.0, 5.0, 3.0], [1.0, 2.0, -2.0, 7.0], [1.0, -2.0, 0.0, 3.0]], [[-5.0, -2.0, -7.0, 
--7.0], [6.0, -4.0, 5.0, 2.0], [7.0, 5.0, 6.0, 1.0]]], [[[-6.0, -2.0, 7.0, 3.0], [2.0, 5.0, 0.0, 1.0], [4.0, -7.0, 5.0, 4.0]], 
-[[0.0, 6.0, 7.0, 0.0], [-3.0, -5.0, -1.0, -5.0], [-4.0, -3.0, 2.0, -4.0]]], [[[4.0, -3.0, 6.0, 0.0], [-3.0, 2.0, -6.0, 0.0], 
-[1.0, 1.0, 5.0, -2.0]], [[7.0, 2.0, 5.0, -2.0], [-5.0, -2.0, -7.0, 2.0], [-4.0, 0.0, 3.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[-5.0, 0.0, 0.0, 7.0], [-6.0, -4.0, 3.0, 4.0], [-5.0, 4.0, -6.0, 7.0]], [[5.0, -6.0, 
--2.0, 6.0], [-4.0, -1.0, -6.0, 2.0], [4.0, 6.0, 1.0, -3.0]]], [[[-5.0, 3.0, 5.0, 2.0], [-1.0, -4.0, 5.0, 5.0], [-7.0, 3.0, 
--4.0, 0.0]], [[-7.0, 1.0, -7.0, -5.0], [-4.0, 7.0, -2.0, 0.0], [5.0, 0.0, -5.0, -2.0]]], [[[-3.0, 2.0, -6.0, -2.0], [4.0, -3.0, 
-0.0, 7.0], [-4.0, 4.0, 5.0, -2.0]], [[0.0, -4.0, 7.0, 0.0], [3.0, 7.0, 5.0, 2.0], [6.0, -6.0, 6.0, 6.0]]]])
+   def test_generalTensorTransposedProduct_float_rank0_taggedData_rank2_offset0(self):
+      arg0=1.0
+      arg1=Data(numpy.array([[1.0, 0.0, 7.0, 2.0, 3.0], [5.0, 5.0, -7.0, -5.0, 0.0], [2.0, 1.0, 1.0, 0.0, 1.0], [0.0, 4.0, 
+-2.0, 2.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, 1.0, -5.0, -5.0, -2.0], [5.0, -3.0, 2.0, -3.0, -7.0], [-5.0, 0.0, 7.0, 0.0, 
+-3.0], [-3.0, 6.0, 4.0, 3.0, 4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-30.0, 18.0, 30.0, 18.0], [6.0, 12.0, -12.0, 42.0], [6.0, -12.0, 0.0, 18.0]], [[-30.0, -12.0, 
--42.0, -42.0], [36.0, -24.0, 30.0, 12.0], [42.0, 30.0, 36.0, 6.0]]], [[[-36.0, -12.0, 42.0, 18.0], [12.0, 30.0, 0.0, 6.0], 
-[24.0, -42.0, 30.0, 24.0]], [[0.0, 36.0, 42.0, 0.0], [-18.0, -30.0, -6.0, -30.0], [-24.0, -18.0, 12.0, -24.0]]], [[[24.0, 
--18.0, 36.0, 0.0], [-18.0, 12.0, -36.0, 0.0], [6.0, 6.0, 30.0, -12.0]], [[42.0, 12.0, 30.0, -12.0], [-30.0, -12.0, -42.0, 
-12.0], [-24.0, 0.0, 18.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[-30.0, 0.0, 0.0, 42.0], [-36.0, -24.0, 18.0, 24.0], [-30.0, 
-24.0, -36.0, 42.0]], [[30.0, -36.0, -12.0, 36.0], [-24.0, -6.0, -36.0, 12.0], [24.0, 36.0, 6.0, -18.0]]], [[[-30.0, 18.0, 30.0, 
-12.0], [-6.0, -24.0, 30.0, 30.0], [-42.0, 18.0, -24.0, 0.0]], [[-42.0, 6.0, -42.0, -30.0], [-24.0, 42.0, -12.0, 0.0], [30.0, 
-0.0, -30.0, -12.0]]], [[[-18.0, 12.0, -36.0, -12.0], [24.0, -18.0, 0.0, 42.0], [-24.0, 24.0, 30.0, -12.0]], [[0.0, -24.0, 42.0, 
-0.0], [18.0, 42.0, 30.0, 12.0], [36.0, -36.0, 36.0, 36.0]]]])
+      ref=Data(numpy.array([[1.0, 0.0, 7.0, 2.0, 3.0], [5.0, 5.0, -7.0, -5.0, 0.0], [2.0, 1.0, 1.0, 0.0, 1.0], [0.0, 4.0, -2.0, 
+2.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[1.0, 1.0, -5.0, -5.0, -2.0], [5.0, -3.0, 2.0, -3.0, -7.0], [-5.0, 0.0, 7.0, 0.0, 
+-3.0], [-3.0, 6.0, 4.0, 3.0, 4.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_float_rank0_offset0(self):
-      arg0=Data(numpy.array([5.0, -3.0]),self.functionspace)
-      arg1=-6.0
+   def test_generalTensorTransposedProduct_float_rank0_taggedData_rank3_offset0(self):
+      arg0=-5.0
+      arg1=Data(numpy.array([[[5.0, 0.0], [-3.0, 7.0]], [[-6.0, 6.0], [-1.0, 1.0]], [[-7.0, -3.0], [6.0, 1.0]], [[4.0, -1.0], 
+[-1.0, 3.0]], [[-6.0, -3.0], [3.0, -4.0]], [[-6.0, 0.0], [2.0, 1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -1.0], [3.0, 3.0]], [[6.0, -1.0], [0.0, -3.0]], [[6.0, -1.0], [1.0, -1.0]], 
+[[4.0, 0.0], [1.0, 6.0]], [[0.0, 4.0], [-6.0, -7.0]], [[7.0, 1.0], [5.0, 0.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-30.0, 18.0]),self.functionspace)
+      ref=Data(numpy.array([[[-25.0, -0.0], [15.0, -35.0]], [[30.0, -30.0], [5.0, -5.0]], [[35.0, 15.0], [-30.0, -5.0]], 
+[[-20.0, 5.0], [5.0, -15.0]], [[30.0, 15.0], [-15.0, 20.0]], [[30.0, -0.0], [-10.0, -5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-20.0, 5.0], [-15.0, -15.0]], [[-30.0, 5.0], [-0.0, 15.0]], [[-30.0, 5.0], [-5.0, 
+5.0]], [[-20.0, -0.0], [-5.0, -30.0]], [[-0.0, -20.0], [30.0, 35.0]], [[-35.0, -5.0], [-25.0, -0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank0_offset0(self):
-      arg0=Data(numpy.array([-4.0, 3.0]),self.functionspace)
-      arg1=numpy.array(-1.0)
+   def test_generalTensorTransposedProduct_float_rank0_taggedData_rank4_offset0(self):
+      arg0=6.0
+      arg1=Data(numpy.array([[[[4.0, -7.0, -4.0, -3.0], [3.0, 3.0, 4.0, -1.0], [-1.0, -1.0, -2.0, -6.0]], [[-5.0, 5.0, 5.0, 
+6.0], [1.0, 3.0, -7.0, 2.0], [-4.0, 3.0, -3.0, 0.0]]], [[[0.0, -7.0, -5.0, 6.0], [-2.0, 7.0, 5.0, 0.0], [0.0, -3.0, 5.0, 
+-1.0]], [[7.0, -6.0, 6.0, -5.0], [6.0, -5.0, -7.0, 1.0], [3.0, -6.0, -1.0, 2.0]]], [[[-4.0, -2.0, 3.0, -2.0], [4.0, -7.0, -7.0, 
+0.0], [7.0, 1.0, 7.0, 2.0]], [[6.0, 5.0, 0.0, 5.0], [-5.0, -6.0, -2.0, -5.0], [3.0, -1.0, 5.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, 4.0, -7.0, -4.0], [-4.0, 3.0, -1.0, 0.0], [5.0, 4.0, -1.0, 3.0]], [[5.0, 
+-2.0, 5.0, 6.0], [6.0, 5.0, 7.0, 0.0], [5.0, 5.0, -4.0, -2.0]]], [[[2.0, -4.0, 7.0, 3.0], [0.0, 4.0, -3.0, -1.0], [0.0, -3.0, 
+3.0, -4.0]], [[6.0, 0.0, 1.0, -2.0], [6.0, -2.0, 2.0, 3.0], [6.0, 6.0, 3.0, -4.0]]], [[[-4.0, 3.0, -7.0, 3.0], [-1.0, -1.0, 
+1.0, -4.0], [2.0, 2.0, 6.0, -5.0]], [[-6.0, 4.0, -6.0, -4.0], [-7.0, -1.0, -4.0, -2.0], [0.0, 0.0, 1.0, 2.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([4.0, -3.0]),self.functionspace)
+      ref=Data(numpy.array([[[[24.0, -42.0, -24.0, -18.0], [18.0, 18.0, 24.0, -6.0], [-6.0, -6.0, -12.0, -36.0]], [[-30.0, 
+30.0, 30.0, 36.0], [6.0, 18.0, -42.0, 12.0], [-24.0, 18.0, -18.0, 0.0]]], [[[0.0, -42.0, -30.0, 36.0], [-12.0, 42.0, 30.0, 
+0.0], [0.0, -18.0, 30.0, -6.0]], [[42.0, -36.0, 36.0, -30.0], [36.0, -30.0, -42.0, 6.0], [18.0, -36.0, -6.0, 12.0]]], [[[-24.0, 
+-12.0, 18.0, -12.0], [24.0, -42.0, -42.0, 0.0], [42.0, 6.0, 42.0, 12.0]], [[36.0, 30.0, 0.0, 30.0], [-30.0, -36.0, -12.0, 
+-30.0], [18.0, -6.0, 30.0, 6.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-12.0, 24.0, -42.0, -24.0], [-24.0, 18.0, -6.0, 0.0], [30.0, 24.0, -6.0, 18.0]], 
+[[30.0, -12.0, 30.0, 36.0], [36.0, 30.0, 42.0, 0.0], [30.0, 30.0, -24.0, -12.0]]], [[[12.0, -24.0, 42.0, 18.0], [0.0, 24.0, 
+-18.0, -6.0], [0.0, -18.0, 18.0, -24.0]], [[36.0, 0.0, 6.0, -12.0], [36.0, -12.0, 12.0, 18.0], [36.0, 36.0, 18.0, -24.0]]], 
+[[[-24.0, 18.0, -42.0, 18.0], [-6.0, -6.0, 6.0, -24.0], [12.0, 12.0, 36.0, -30.0]], [[-36.0, 24.0, -36.0, -24.0], [-42.0, -6.0, 
+-24.0, -12.0], [0.0, 0.0, 6.0, 12.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[-3.0, 0.0, -2.0], [6.0, 5.0, 4.0]]),self.functionspace)
-      arg1=numpy.array([6.0, -4.0, 0.0])
+   def test_generalTensorTransposedProduct_array_rank0_taggedData_rank0_offset0(self):
+      arg0=numpy.array(0.0)
+      arg1=Data(3.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(0.0,self.functionspace)
+      ref.setTaggedValue(1,-0.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank1_offset1(self):
+      arg0=numpy.array([-4.0, 0.0, -5.0])
+      arg1=Data(numpy.array([7.0, 3.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-5.0, 6.0, 7.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-18.0, 16.0]),self.functionspace)
+      ref=Data(-43.0,self.functionspace)
+      ref.setTaggedValue(1,-15.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[[2.0, 2.0, 6.0], [3.0, 4.0, 5.0]], [[-3.0, 3.0, 1.0], [-6.0, 3.0, 6.0]]]),self.functionspace)
-      arg1=numpy.array([[0.0, -3.0, -4.0], [-7.0, 3.0, -7.0]])
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[0.0, 0.0, -1.0], [-2.0, 2.0, -5.0]])
+      arg1=Data(numpy.array([[-5.0, 4.0, -7.0], [4.0, -5.0, -4.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 2.0, -1.0], [4.0, -7.0, 0.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-74.0, -4.0]),self.functionspace)
+      ref=Data(9.0,self.functionspace)
+      ref.setTaggedValue(1,-21.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[6.0, -6.0, -5.0], [0.0, -5.0, -4.0], [6.0, -2.0, 5.0], [-7.0, -3.0, -5.0]], [[0.0, -1.0, 0.0], 
-[-2.0, 3.0, -5.0], [4.0, -5.0, 0.0], [2.0, 4.0, 0.0]]], [[[5.0, -6.0, -5.0], [2.0, -3.0, 2.0], [6.0, -3.0, -7.0], [0.0, -2.0, 
--6.0]], [[2.0, 2.0, 0.0], [-7.0, 2.0, 6.0], [-4.0, 5.0, 4.0], [-3.0, 7.0, 3.0]]]]),self.functionspace)
-      arg1=numpy.array([[[-4.0, -1.0, -5.0], [-2.0, 7.0, 4.0], [7.0, -6.0, 0.0], [-2.0, 0.0, 6.0]], [[5.0, 7.0, -2.0], [7.0, 
-7.0, 2.0], [-3.0, 3.0, -5.0], [5.0, -5.0, 0.0]]])
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank3_offset3(self):
+      arg0=numpy.array([[[-4.0, -6.0, 2.0], [-6.0, 1.0, -4.0], [7.0, 2.0, 0.0], [4.0, -7.0, -1.0]], [[2.0, -1.0, 5.0], [-3.0, 
+-7.0, 2.0], [-6.0, -6.0, 4.0], [0.0, 4.0, -4.0]]])
+      arg1=Data(numpy.array([[[1.0, -1.0, 2.0], [5.0, -6.0, 1.0], [7.0, -6.0, -6.0], [7.0, -3.0, 2.0]], [[6.0, -7.0, 2.0], 
+[4.0, -6.0, 1.0], [-6.0, -7.0, -1.0], [6.0, 3.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, -6.0, 7.0], [7.0, 7.0, 1.0], [5.0, 3.0, 4.0], [-4.0, 7.0, -5.0]], [[0.0, -4.0, 
+2.0], [-6.0, 4.0, 4.0], [0.0, -1.0, 5.0], [5.0, 1.0, -1.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([-53.0, -24.0]),self.functionspace)
+      ref=Data(189.0,self.functionspace)
+      ref.setTaggedValue(1,58.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank1_offset0(self):
-      arg0=Data(numpy.array([-4.0, 0.0]),self.functionspace)
-      arg1=numpy.array([4.0, 0.0])
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank4_offset4(self):
+      arg0=numpy.array([[[[-4.0, -5.0], [-6.0, -5.0], [0.0, 3.0]], [[0.0, 0.0], [1.0, 5.0], [-2.0, -6.0]]], [[[5.0, 0.0], 
+[-3.0, -3.0], [-3.0, 2.0]], [[-1.0, 0.0], [-1.0, 1.0], [1.0, 5.0]]], [[[6.0, -4.0], [0.0, 0.0], [-2.0, 6.0]], [[4.0, 1.0], 
+[0.0, -6.0], [-6.0, 5.0]]], [[[2.0, -2.0], [4.0, -7.0], [-5.0, 0.0]], [[3.0, 4.0], [-2.0, 0.0], [6.0, 7.0]]]])
+      arg1=Data(numpy.array([[[[-6.0, -3.0], [3.0, 7.0], [-3.0, 3.0]], [[1.0, 7.0], [-3.0, -3.0], [0.0, 0.0]]], [[[2.0, 6.0], 
+[-1.0, 0.0], [4.0, -7.0]], [[1.0, -4.0], [-6.0, -2.0], [2.0, -7.0]]], [[[0.0, -4.0], [6.0, -6.0], [0.0, 3.0]], [[-3.0, 7.0], 
+[1.0, 6.0], [7.0, 2.0]]], [[[-2.0, -4.0], [4.0, 0.0], [2.0, 6.0]], [[5.0, -7.0], [-2.0, 6.0], [0.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 1.0], [6.0, 3.0], [-7.0, -2.0]], [[-7.0, 4.0], [7.0, 0.0], [0.0, -2.0]]], 
+[[[5.0, 0.0], [-7.0, -4.0], [-4.0, -4.0]], [[4.0, 7.0], [0.0, -4.0], [-3.0, 0.0]]], [[[-3.0, -6.0], [7.0, -1.0], [-6.0, 2.0]], 
+[[-2.0, 0.0], [6.0, 2.0], [-1.0, 5.0]]], [[[-1.0, 6.0], [0.0, 4.0], [1.0, -5.0]], [[3.0, 1.0], [-3.0, -5.0], [1.0, -2.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=Data(-76.0,self.functionspace)
+      ref.setTaggedValue(1,33.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank0_taggedData_rank1_offset0(self):
+      arg0=numpy.array(-3.0)
+      arg1=Data(numpy.array([0.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, -4.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-16.0, 0.0], [0.0, 0.0]]),self.functionspace)
+      ref=Data(numpy.array([-0.0, -18.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-3.0, 12.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[4.0, -5.0, 6.0], [2.0, -2.0, 6.0]]),self.functionspace)
-      arg1=numpy.array([[1.0, -3.0, -7.0], [0.0, -3.0, 7.0]])
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank2_offset1(self):
+      arg0=numpy.array([-2.0, 0.0, -2.0])
+      arg1=Data(numpy.array([[6.0, 6.0, 3.0], [0.0, -4.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, -2.0, 4.0], [-2.0, -2.0, -1.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-23.0, 57.0], [-34.0, 48.0]]),self.functionspace)
+      ref=Data(numpy.array([-18.0, -14.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-16.0, 6.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[[-7.0, 3.0, 5.0], [-2.0, -7.0, 0.0]], [[4.0, 0.0, 4.0], [0.0, -5.0, -1.0]]]),self.functionspace)
-      arg1=numpy.array([[[-5.0, -1.0, 0.0], [1.0, -1.0, -3.0]], [[4.0, -3.0, 2.0], [-3.0, -6.0, 4.0]]])
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[0.0, 3.0, -6.0], [-1.0, 0.0, -4.0]])
+      arg1=Data(numpy.array([[[-5.0, -5.0, -1.0], [0.0, -6.0, 0.0]], [[1.0, 5.0, -5.0], [5.0, 7.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[5.0, 1.0, -6.0], [3.0, 1.0, -2.0]], [[7.0, 7.0, -2.0], [-1.0, -2.0, 0.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[37.0, 21.0], [-12.0, 50.0]]),self.functionspace)
+      ref=Data(numpy.array([-9.0, 32.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([44.0, 34.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[0.0, 7.0, 2.0], [3.0, 7.0, -5.0], [-7.0, 1.0, 0.0], [-7.0, 5.0, 5.0]], [[3.0, 5.0, -4.0], 
-[-6.0, 5.0, 0.0], [0.0, 0.0, 3.0], [-1.0, 5.0, -4.0]]], [[[1.0, 1.0, 4.0], [5.0, -3.0, -5.0], [-1.0, 6.0, -4.0], [0.0, 5.0, 
-3.0]], [[4.0, 0.0, -7.0], [3.0, 6.0, -7.0], [-3.0, -7.0, 1.0], [5.0, -1.0, -3.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[5.0, 0.0, 6.0], [-6.0, -2.0, -6.0], [2.0, 1.0, 2.0], [-5.0, -4.0, 7.0]], [[2.0, -5.0, -2.0], [3.0, 
-0.0, -7.0], [-7.0, 2.0, -7.0], [2.0, 5.0, -6.0]]], [[[7.0, -3.0, -1.0], [5.0, 3.0, 7.0], [-1.0, 3.0, 1.0], [6.0, -4.0, -4.0]], 
-[[7.0, 5.0, -1.0], [2.0, -3.0, 4.0], [-7.0, -2.0, -6.0], [-4.0, 2.0, 4.0]]]])
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank4_offset3(self):
+      arg0=numpy.array([[[-2.0, 1.0, 0.0], [0.0, -5.0, 4.0], [-2.0, 6.0, 7.0], [6.0, 4.0, 7.0]], [[4.0, -1.0, 5.0], [-3.0, 0.0, 
+3.0], [7.0, 7.0, -6.0], [7.0, 6.0, 5.0]]])
+      arg1=Data(numpy.array([[[[5.0, -7.0, -2.0], [2.0, -1.0, -2.0], [5.0, -1.0, 4.0], [4.0, -2.0, 1.0]], [[7.0, 0.0, -5.0], 
+[-7.0, 1.0, 2.0], [-1.0, 2.0, -6.0], [-6.0, 7.0, -7.0]]], [[[5.0, 1.0, 2.0], [0.0, -5.0, -6.0], [4.0, 2.0, 3.0], [0.0, 2.0, 
+3.0]], [[-3.0, -6.0, 3.0], [-5.0, 1.0, -3.0], [-4.0, -7.0, 7.0], [6.0, 2.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, 0.0, 6.0], [-1.0, -2.0, -6.0], [-2.0, 1.0, 2.0], [2.0, 3.0, -2.0]], [[6.0, 
+0.0, -4.0], [6.0, 1.0, 2.0], [5.0, 4.0, -1.0], [-5.0, 3.0, -6.0]]], [[[-4.0, 6.0, 3.0], [-3.0, 1.0, 1.0], [-6.0, -1.0, -6.0], 
+[-2.0, -1.0, -6.0]], [[0.0, -2.0, 2.0], [-1.0, -7.0, -6.0], [5.0, -6.0, 2.0], [-1.0, 2.0, -1.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[44.0, -91.0], [135.0, -46.0]]),self.functionspace)
+      ref=Data(numpy.array([53.0, 16.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([38.0, -103.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank2_offset0(self):
-      arg0=Data(numpy.array([-5.0, -2.0]),self.functionspace)
-      arg1=numpy.array([[-2.0, -2.0, 0.0, 3.0, 6.0], [-3.0, 3.0, 4.0, -4.0, -3.0], [-2.0, -4.0, 0.0, -2.0, 5.0], [-3.0, 4.0, 
--4.0, 2.0, -3.0]])
+   def test_generalTensorTransposedProduct_array_rank0_taggedData_rank2_offset0(self):
+      arg0=numpy.array(0.0)
+      arg1=Data(numpy.array([[7.0, -5.0, 0.0, -3.0, -5.0], [-1.0, 3.0, -7.0, -3.0, -2.0], [-1.0, 1.0, 0.0, 5.0, -3.0], [-1.0, 
+5.0, -6.0, 5.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 0.0, 1.0, 1.0, -1.0], [1.0, -4.0, -6.0, 0.0, -3.0], [-6.0, 1.0, 5.0, 3.0, -2.0], 
+[1.0, 6.0, -1.0, -7.0, -2.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[10.0, 10.0, 0.0, -15.0, -30.0], [15.0, -15.0, -20.0, 20.0, 15.0], [10.0, 20.0, 0.0, 10.0, -25.0], 
-[15.0, -20.0, 20.0, -10.0, 15.0]], [[4.0, 4.0, 0.0, -6.0, -12.0], [6.0, -6.0, -8.0, 8.0, 6.0], [4.0, 8.0, 0.0, 4.0, -10.0], 
-[6.0, -8.0, 8.0, -4.0, 6.0]]]),self.functionspace)
+      ref=Data(numpy.array([[0.0, -0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, 0.0, 0.0, -0.0], [-0.0, 
+0.0, -0.0, 0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0, -0.0], [-0.0, 0.0, 0.0, 0.0, -0.0], 
+[0.0, 0.0, -0.0, -0.0, -0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank3_offset1(self):
-      arg0=Data(numpy.array([[2.0, -3.0, 6.0], [0.0, -6.0, -2.0]]),self.functionspace)
-      arg1=numpy.array([[[-1.0, -2.0, 5.0], [6.0, 4.0, 7.0], [-5.0, 5.0, -1.0], [-6.0, 1.0, 3.0], [1.0, -1.0, 5.0]], [[0.0, 
--5.0, -4.0], [-3.0, 0.0, -3.0], [-3.0, -2.0, 5.0], [2.0, 3.0, 2.0], [3.0, -3.0, 1.0]], [[0.0, -1.0, 3.0], [7.0, -6.0, 3.0], 
-[-7.0, 1.0, 1.0], [-7.0, 7.0, 4.0], [-1.0, 6.0, -6.0]], [[-4.0, -7.0, 0.0], [-3.0, 1.0, -2.0], [-1.0, 6.0, -1.0], [0.0, 2.0, 
--7.0], [-5.0, 6.0, 3.0]]])
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank3_offset1(self):
+      arg0=numpy.array([1.0, -3.0, -5.0])
+      arg1=Data(numpy.array([[[-2.0, 2.0, -4.0], [1.0, 2.0, 0.0], [0.0, 0.0, -2.0], [-3.0, -3.0, -6.0], [4.0, 2.0, -4.0]], 
+[[-1.0, -3.0, 4.0], [0.0, -1.0, 5.0], [-6.0, -2.0, 3.0], [7.0, 6.0, 4.0], [-6.0, -3.0, -5.0]], [[-3.0, 7.0, 0.0], [-5.0, 0.0, 
+2.0], [0.0, 0.0, 3.0], [-7.0, 0.0, 3.0], [5.0, 5.0, 6.0]], [[6.0, -3.0, -3.0], [0.0, -4.0, -2.0], [4.0, -4.0, -4.0], [-6.0, 
+-2.0, 2.0], [1.0, -6.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, -5.0, 7.0], [0.0, 6.0, 7.0], [1.0, -7.0, 0.0], [5.0, 1.0, 3.0], [0.0, -4.0, 
+-5.0]], [[-4.0, 2.0, 0.0], [2.0, -3.0, 0.0], [0.0, -6.0, -5.0], [0.0, -3.0, 5.0], [1.0, -6.0, 6.0]], [[-1.0, 1.0, 2.0], [-6.0, 
+5.0, -3.0], [-3.0, -1.0, -1.0], [3.0, -2.0, 0.0], [3.0, 7.0, -3.0]], [[2.0, 6.0, -7.0], [-1.0, 3.0, 1.0], [-3.0, -2.0, 2.0], 
+[1.0, -3.0, 1.0], [-5.0, 3.0, -7.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[34.0, 42.0, -31.0, 3.0, 35.0], [-9.0, -24.0, 30.0, 7.0, 21.0], [21.0, 50.0, -11.0, -11.0, -56.0], 
-[13.0, -21.0, -26.0, -48.0, -10.0]], [[2.0, -38.0, -28.0, -12.0, -4.0], [38.0, 6.0, 2.0, -22.0, 16.0], [0.0, 30.0, -8.0, -50.0, 
--24.0], [42.0, -2.0, -34.0, 2.0, -42.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[[2.0, -2.0, -4.0], [7.0, 0.0, 1.0]], [[-6.0, 2.0, 3.0], [-2.0, 4.0, 0.0]]]),self.functionspace)
-      arg1=numpy.array([[[[2.0, 0.0, 3.0], [0.0, 0.0, -7.0]], [[7.0, -3.0, 5.0], [3.0, 2.0, -6.0]], [[3.0, 1.0, -7.0], [4.0, 
--3.0, -1.0]], [[-3.0, -5.0, -7.0], [4.0, -7.0, -7.0]], [[-2.0, 3.0, 0.0], [6.0, -4.0, 3.0]]], [[[0.0, 1.0, -2.0], [-7.0, -5.0, 
-3.0]], [[7.0, -6.0, 6.0], [5.0, -7.0, 6.0]], [[-5.0, -1.0, 1.0], [-2.0, 3.0, 7.0]], [[-7.0, -5.0, 0.0], [-2.0, -4.0, 7.0]], 
-[[2.0, 0.0, 7.0], [-3.0, 0.0, 5.0]]], [[[-5.0, 0.0, 1.0], [2.0, 6.0, -2.0]], [[5.0, 4.0, 1.0], [6.0, 4.0, 5.0]], [[-6.0, 0.0, 
-0.0], [0.0, 7.0, -6.0]], [[-1.0, 5.0, 0.0], [-3.0, 3.0, -5.0]], [[-4.0, -6.0, 4.0], [1.0, 6.0, 2.0]]], [[[3.0, 1.0, 7.0], [0.0, 
--2.0, 1.0]], [[1.0, 2.0, 4.0], [3.0, 1.0, -3.0]], [[-2.0, 5.0, 5.0], [-7.0, -2.0, 6.0]], [[4.0, 0.0, -5.0], [0.0, -6.0, 2.0]], 
-[[-1.0, -7.0, -4.0], [-4.0, -1.0, -6.0]]]])
+      ref=Data(numpy.array([[12.0, -5.0, 10.0, 36.0, 18.0], [-12.0, -22.0, -15.0, -31.0, 28.0], [-24.0, -15.0, -15.0, -22.0, 
+-40.0], [30.0, 22.0, 36.0, -10.0, 34.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-18.0, -53.0, 22.0, -13.0, 37.0], [-10.0, 11.0, 43.0, -16.0, -11.0], [-14.0, -6.0, 
+5.0, 9.0, -3.0], [19.0, -15.0, -7.0, 5.0, 21.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[-3.0, -4.0, -4.0], [4.0, 6.0, 6.0]])
+      arg1=Data(numpy.array([[[[-1.0, -2.0, -7.0], [-4.0, 6.0, -5.0]], [[-7.0, -2.0, -6.0], [6.0, -6.0, 4.0]], [[-7.0, 3.0, 
+3.0], [0.0, -7.0, -4.0]], [[1.0, 1.0, 2.0], [7.0, -1.0, 3.0]], [[6.0, -4.0, -1.0], [5.0, -5.0, 3.0]]], [[[4.0, 6.0, -7.0], 
+[-6.0, -2.0, -7.0]], [[-4.0, -3.0, -5.0], [0.0, 0.0, -4.0]], [[-2.0, -6.0, 6.0], [-1.0, -3.0, -1.0]], [[-4.0, -7.0, 6.0], 
+[-7.0, -4.0, -4.0]], [[-4.0, -5.0, -4.0], [2.0, 5.0, -4.0]]], [[[-2.0, -1.0, -4.0], [5.0, -4.0, -3.0]], [[6.0, -1.0, 3.0], 
+[-6.0, -2.0, 1.0]], [[4.0, 3.0, -2.0], [7.0, 0.0, -5.0]], [[-7.0, -7.0, 1.0], [3.0, -4.0, 0.0]], [[-2.0, 4.0, 7.0], [1.0, 1.0, 
+0.0]]], [[[-3.0, 4.0, 4.0], [0.0, -4.0, 6.0]], [[0.0, -6.0, 6.0], [-4.0, 6.0, -5.0]], [[5.0, 7.0, 0.0], [-4.0, 2.0, 2.0]], 
+[[6.0, 5.0, 0.0], [4.0, 6.0, -6.0]], [[7.0, -2.0, 0.0], [6.0, 1.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 7.0, -7.0], [-4.0, -1.0, 7.0]], [[2.0, 3.0, -7.0], [2.0, -4.0, -7.0]], 
+[[-6.0, -1.0, 6.0], [4.0, 5.0, 6.0]], [[5.0, 0.0, 5.0], [-1.0, -1.0, -3.0]], [[2.0, 1.0, -4.0], [-1.0, 3.0, 5.0]]], [[[1.0, 
+-2.0, 6.0], [6.0, 6.0, 3.0]], [[-4.0, -2.0, -6.0], [2.0, -2.0, 7.0]], [[5.0, 0.0, 0.0], [-4.0, 6.0, 4.0]], [[3.0, 0.0, -2.0], 
+[5.0, -6.0, -7.0]], [[1.0, -1.0, 1.0], [-4.0, -7.0, 4.0]]], [[[2.0, -7.0, -1.0], [-5.0, 5.0, -7.0]], [[3.0, -6.0, -6.0], [7.0, 
+3.0, 6.0]], [[0.0, -4.0, 3.0], [-1.0, 7.0, 0.0]], [[2.0, 0.0, -4.0], [6.0, 2.0, -4.0]], [[4.0, 5.0, 1.0], [-7.0, 2.0, -4.0]]], 
+[[[6.0, -2.0, -3.0], [-2.0, -2.0, -7.0]], [[0.0, 0.0, -6.0], [-1.0, 2.0, 0.0]], [[6.0, 5.0, -6.0], [1.0, 0.0, -3.0]], [[-2.0, 
+-2.0, 5.0], [1.0, -1.0, -3.0]], [[1.0, 6.0, 2.0], [6.0, -4.0, 1.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-15.0, 15.0, 59.0, 53.0, 35.0], [-40.0, 43.0, -19.0, -11.0, -40.0], [-2.0, 45.0, -18.0, -38.0, 
--3.0], [-23.0, 0.0, -77.0, 30.0, -6.0]], [[-3.0, -31.0, -57.0, -49.0, -10.0], [-10.0, -74.0, 47.0, 20.0, 15.0], [53.0, -15.0, 
-64.0, 34.0, 46.0], [-3.0, 8.0, 43.0, -63.0, -16.0]]]),self.functionspace)
+      ref=Data(numpy.array([[29.0, 65.0, -69.0, 25.0, 10.0], [-86.0, 20.0, -22.0, -60.0, 62.0], [4.0, -56.0, -18.0, 33.0, 
+-28.0], [-11.0, -10.0, -35.0, -22.0, 41.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[32.0, -48.0, 80.0, -63.0, 50.0], [59.0, 82.0, 29.0, -59.0, -37.0], [-6.0, 121.0, 42.0, 
+22.0, -76.0], [-60.0, 32.0, -28.0, -26.0, -29.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_array_rank3_offset0(self):
-      arg0=Data(numpy.array([-3.0, 1.0]),self.functionspace)
-      arg1=numpy.array([[[5.0, 0.0], [4.0, 2.0]], [[-3.0, 6.0], [-2.0, 3.0]], [[4.0, 2.0], [-2.0, 3.0]], [[1.0, 3.0], [7.0, 
--5.0]], [[6.0, 0.0], [4.0, -2.0]], [[4.0, -2.0], [0.0, -7.0]]])
+   def test_generalTensorTransposedProduct_array_rank0_taggedData_rank3_offset0(self):
+      arg0=numpy.array(7.0)
+      arg1=Data(numpy.array([[[6.0, 0.0], [6.0, 5.0]], [[-1.0, 2.0], [6.0, 4.0]], [[-6.0, 0.0], [-5.0, 4.0]], [[-5.0, 6.0], 
+[3.0, -4.0]], [[1.0, -1.0], [5.0, -3.0]], [[3.0, 6.0], [4.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, 3.0], [-6.0, -3.0]], [[-6.0, 6.0], [-4.0, 6.0]], [[6.0, -7.0], [7.0, 1.0]], 
+[[1.0, 0.0], [-4.0, -1.0]], [[-3.0, 3.0], [5.0, 2.0]], [[-7.0, -5.0], [3.0, -4.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[-15.0, 0.0], [-12.0, -6.0]], [[9.0, -18.0], [6.0, -9.0]], [[-12.0, -6.0], [6.0, -9.0]], [[-3.0, 
--9.0], [-21.0, 15.0]], [[-18.0, 0.0], [-12.0, 6.0]], [[-12.0, 6.0], [0.0, 21.0]]], [[[5.0, 0.0], [4.0, 2.0]], [[-3.0, 6.0], 
-[-2.0, 3.0]], [[4.0, 2.0], [-2.0, 3.0]], [[1.0, 3.0], [7.0, -5.0]], [[6.0, 0.0], [4.0, -2.0]], [[4.0, -2.0], [0.0, 
--7.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[42.0, 0.0], [42.0, 35.0]], [[-7.0, 14.0], [42.0, 28.0]], [[-42.0, 0.0], [-35.0, 28.0]], [[-35.0, 
+42.0], [21.0, -28.0]], [[7.0, -7.0], [35.0, -21.0]], [[21.0, 42.0], [28.0, -21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-35.0, 21.0], [-42.0, -21.0]], [[-42.0, 42.0], [-28.0, 42.0]], [[42.0, -49.0], [49.0, 
+7.0]], [[7.0, 0.0], [-28.0, -7.0]], [[-21.0, 21.0], [35.0, 14.0]], [[-49.0, -35.0], [21.0, -28.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank4_offset1(self):
-      arg0=Data(numpy.array([[-1.0, 0.0, 2.0], [-6.0, -3.0, 5.0]]),self.functionspace)
-      arg1=numpy.array([[[[-5.0, 6.0, -1.0], [-6.0, 1.0, 4.0]], [[2.0, 3.0, -5.0], [2.0, -1.0, 0.0]]], [[[-5.0, 4.0, 5.0], 
-[0.0, -4.0, 3.0]], [[-2.0, 0.0, -6.0], [6.0, 0.0, 5.0]]], [[[2.0, 0.0, 7.0], [-6.0, 4.0, -3.0]], [[0.0, 3.0, -3.0], [-5.0, 0.0, 
-7.0]]], [[[-1.0, -6.0, -4.0], [0.0, 0.0, -2.0]], [[5.0, -5.0, 3.0], [0.0, -2.0, 0.0]]], [[[-1.0, -6.0, 7.0], [7.0, 3.0, -6.0]], 
-[[4.0, 4.0, 5.0], [7.0, 3.0, 3.0]]], [[[-2.0, 6.0, 0.0], [0.0, -6.0, 3.0]], [[1.0, -1.0, 7.0], [7.0, 2.0, -3.0]]]])
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank4_offset1(self):
+      arg0=numpy.array([3.0, 7.0, -1.0])
+      arg1=Data(numpy.array([[[[1.0, 4.0, -2.0], [7.0, 6.0, -7.0]], [[2.0, 3.0, 7.0], [-5.0, 2.0, -5.0]]], [[[-3.0, -3.0, 1.0], 
+[0.0, -6.0, 4.0]], [[1.0, -6.0, -4.0], [3.0, 5.0, -3.0]]], [[[0.0, -3.0, -2.0], [-4.0, -5.0, -1.0]], [[3.0, -3.0, 0.0], [4.0, 
+1.0, 0.0]]], [[[2.0, -5.0, 2.0], [-5.0, 0.0, -5.0]], [[0.0, -3.0, 3.0], [7.0, -3.0, 0.0]]], [[[3.0, 7.0, -3.0], [-5.0, -5.0, 
+3.0]], [[-2.0, -7.0, 0.0], [7.0, -5.0, 6.0]]], [[[-5.0, 7.0, 6.0], [-3.0, -2.0, 0.0]], [[2.0, -7.0, 6.0], [4.0, 4.0, 
+4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 0.0, 5.0], [1.0, 2.0, -1.0]], [[-1.0, 4.0, 2.0], [-6.0, -7.0, 0.0]]], [[[0.0, 
+2.0, -2.0], [7.0, 0.0, 7.0]], [[-1.0, -7.0, -3.0], [3.0, -7.0, -5.0]]], [[[0.0, -2.0, 3.0], [0.0, 3.0, -7.0]], [[0.0, -7.0, 
+1.0], [7.0, 6.0, -1.0]]], [[[-2.0, 0.0, -2.0], [-7.0, 2.0, 3.0]], [[5.0, -2.0, -4.0], [-5.0, 5.0, -4.0]]], [[[-2.0, -1.0, 
+-1.0], [7.0, -3.0, 1.0]], [[-7.0, -6.0, 0.0], [0.0, 7.0, 2.0]]], [[[-4.0, 2.0, 7.0], [-1.0, 0.0, 0.0]], [[-1.0, 3.0, -3.0], 
+[-7.0, -7.0, -5.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[3.0, 14.0], [-12.0, -2.0]], [[15.0, 6.0], [-10.0, 4.0]], [[12.0, 0.0], [-6.0, 19.0]], [[-7.0, 
--4.0], [1.0, 0.0]], [[15.0, -19.0], [6.0, -1.0]], [[2.0, 6.0], [13.0, -13.0]]], [[[7.0, 53.0], [-46.0, -9.0]], [[43.0, 27.0], 
-[-18.0, -11.0]], [[23.0, 9.0], [-24.0, 65.0]], [[4.0, -10.0], [0.0, 6.0]], [[59.0, -81.0], [-11.0, -36.0]], [[-6.0, 33.0], 
-[32.0, -63.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[33.0, 70.0], [20.0, 4.0]], [[-31.0, -46.0], [-35.0, 47.0]], [[-19.0, -46.0], [-12.0, 19.0]], 
+[[-31.0, -10.0], [-24.0, 0.0]], [[61.0, -53.0], [-55.0, -20.0]], [[28.0, -23.0], [-49.0, 36.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-20.0, 18.0], [23.0, -67.0]], [[16.0, 14.0], [-49.0, -35.0]], [[-17.0, 28.0], [-50.0, 
+64.0]], [[-4.0, -10.0], [5.0, 24.0]], [[-12.0, -1.0], [-63.0, 47.0]], [[-5.0, -3.0], [21.0, -65.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([5.0, -5.0]),self.functionspace)
-      arg1=Data(-7.0,self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank0_taggedData_rank4_offset0(self):
+      arg0=numpy.array(5.0)
+      arg1=Data(numpy.array([[[[0.0, -2.0, -1.0, 6.0], [-2.0, 7.0, -2.0, 7.0], [0.0, -4.0, 4.0, 6.0]], [[1.0, 0.0, 7.0, -6.0], 
+[3.0, 3.0, -4.0, 4.0], [1.0, 1.0, -1.0, 0.0]]], [[[3.0, 6.0, -6.0, -3.0], [0.0, -1.0, -7.0, 2.0], [-1.0, 3.0, -1.0, 4.0]], 
+[[-4.0, -7.0, -3.0, -7.0], [-1.0, 3.0, 2.0, 0.0], [-7.0, 1.0, -4.0, 0.0]]], [[[3.0, -1.0, 2.0, -5.0], [-4.0, -7.0, -4.0, -5.0], 
+[-6.0, -1.0, -1.0, 3.0]], [[-4.0, 4.0, 2.0, -1.0], [-6.0, -2.0, -1.0, -7.0], [2.0, 2.0, 7.0, -6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -6.0, 3.0, 2.0], [-2.0, 3.0, -3.0, 2.0], [-7.0, -1.0, 3.0, -7.0]], [[4.0, 
+-2.0, 7.0, 0.0], [-6.0, -6.0, 7.0, 5.0], [-5.0, 3.0, 1.0, -3.0]]], [[[-4.0, 0.0, 2.0, 1.0], [4.0, -1.0, 4.0, -7.0], [2.0, 0.0, 
+1.0, -5.0]], [[4.0, 2.0, -7.0, -2.0], [3.0, -3.0, -6.0, 2.0], [-2.0, 5.0, 0.0, 2.0]]], [[[6.0, -7.0, 2.0, -3.0], [2.0, 4.0, 
+-7.0, -3.0], [-6.0, 0.0, -6.0, -6.0]], [[-1.0, -7.0, 3.0, 3.0], [-5.0, 4.0, 1.0, -5.0], [7.0, 6.0, -6.0, 3.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([-35.0, 35.0]),self.functionspace)
+      ref=Data(numpy.array([[[[0.0, -10.0, -5.0, 30.0], [-10.0, 35.0, -10.0, 35.0], [0.0, -20.0, 20.0, 30.0]], [[5.0, 0.0, 
+35.0, -30.0], [15.0, 15.0, -20.0, 20.0], [5.0, 5.0, -5.0, 0.0]]], [[[15.0, 30.0, -30.0, -15.0], [0.0, -5.0, -35.0, 10.0], 
+[-5.0, 15.0, -5.0, 20.0]], [[-20.0, -35.0, -15.0, -35.0], [-5.0, 15.0, 10.0, 0.0], [-35.0, 5.0, -20.0, 0.0]]], [[[15.0, -5.0, 
+10.0, -25.0], [-20.0, -35.0, -20.0, -25.0], [-30.0, -5.0, -5.0, 15.0]], [[-20.0, 20.0, 10.0, -5.0], [-30.0, -10.0, -5.0, 
+-35.0], [10.0, 10.0, 35.0, -30.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[5.0, -30.0, 15.0, 10.0], [-10.0, 15.0, -15.0, 10.0], [-35.0, -5.0, 15.0, -35.0]], 
+[[20.0, -10.0, 35.0, 0.0], [-30.0, -30.0, 35.0, 25.0], [-25.0, 15.0, 5.0, -15.0]]], [[[-20.0, 0.0, 10.0, 5.0], [20.0, -5.0, 
+20.0, -35.0], [10.0, 0.0, 5.0, -25.0]], [[20.0, 10.0, -35.0, -10.0], [15.0, -15.0, -30.0, 10.0], [-10.0, 25.0, 0.0, 10.0]]], 
+[[[30.0, -35.0, 10.0, -15.0], [10.0, 20.0, -35.0, -15.0], [-30.0, 0.0, -30.0, -30.0]], [[-5.0, -35.0, 15.0, 15.0], [-25.0, 
+20.0, 5.0, -25.0], [35.0, 30.0, -30.0, 15.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank0_offset0(self):
+      arg0=numpy.array([6.0, 7.0])
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([6.0, 7.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-18.0, -21.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[-1.0, -3.0, -6.0], [0.0, -7.0, -5.0]]),self.functionspace)
-      arg1=Data(numpy.array([6.0, -1.0, 1.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[-4.0, -7.0, 7.0], [0.0, 3.0, 7.0]])
+      arg1=Data(numpy.array([-7.0, 3.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, -2.0, -2.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([-9.0, 2.0]),self.functionspace)
+      ref=Data(numpy.array([-7.0, -5.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-24.0, -20.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[0.0, -1.0, 3.0], [4.0, 0.0, 1.0]], [[-7.0, 5.0, -3.0], [-3.0, -5.0, 0.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[7.0, 2.0, -5.0], [2.0, 5.0, -4.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[[-5.0, 5.0, 2.0], [5.0, -5.0, 1.0]], [[2.0, 2.0, 0.0], [-4.0, -3.0, 1.0]]])
+      arg1=Data(numpy.array([[0.0, 3.0, 3.0], [3.0, 0.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 1.0, 4.0], [6.0, -5.0, -5.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([-13.0, -55.0]),self.functionspace)
+      ref=Data(numpy.array([37.0, -5.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([28.0, 2.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[4.0, 0.0, -1.0], [5.0, -5.0, 0.0], [5.0, -7.0, -4.0], [-6.0, -6.0, 0.0]], [[4.0, 5.0, -1.0], 
-[1.0, -2.0, -3.0], [-7.0, -2.0, -3.0], [1.0, 0.0, -5.0]]], [[[-6.0, -2.0, 7.0], [6.0, -6.0, -1.0], [5.0, 7.0, -5.0], [6.0, 6.0, 
-1.0]], [[4.0, 4.0, -4.0], [0.0, 4.0, 0.0], [3.0, -7.0, -5.0], [3.0, 6.0, -7.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[4.0, 6.0, -3.0], [7.0, 7.0, -5.0], [-1.0, 3.0, 2.0], [-7.0, -7.0, 7.0]], [[3.0, -6.0, -6.0], 
-[0.0, -5.0, 0.0], [-4.0, -3.0, 0.0], [-5.0, -1.0, 1.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank3_offset3(self):
+      arg0=numpy.array([[[[3.0, -5.0, -6.0], [-7.0, -7.0, 6.0], [-1.0, -2.0, 4.0], [2.0, 5.0, 0.0]], [[1.0, 1.0, 0.0], [-4.0, 
+4.0, 4.0], [-1.0, -3.0, -5.0], [5.0, -4.0, 0.0]]], [[[-3.0, -4.0, -5.0], [1.0, -4.0, 6.0], [-1.0, -6.0, -4.0], [-4.0, -1.0, 
+2.0]], [[5.0, -1.0, -6.0], [-5.0, -2.0, 0.0], [0.0, -7.0, 1.0], [-5.0, 6.0, -3.0]]]])
+      arg1=Data(numpy.array([[[-1.0, 0.0, 3.0], [0.0, -7.0, -4.0], [-4.0, 1.0, 0.0], [-6.0, -4.0, 6.0]], [[-5.0, -3.0, 7.0], 
+[6.0, 4.0, -2.0], [-3.0, 7.0, 7.0], [-7.0, 5.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -7.0, 6.0], [7.0, -3.0, -6.0], [5.0, -3.0, 0.0], [0.0, 4.0, 0.0]], [[-3.0, 0.0, 
+0.0], [1.0, 1.0, -6.0], [-7.0, -3.0, -2.0], [2.0, -2.0, 1.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([91.0, -150.0]),self.functionspace)
+      ref=Data(numpy.array([-158.0, -40.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-27.0, -38.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([0.0, 1.0]),self.functionspace)
-      arg1=Data(numpy.array([5.0, -6.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank1_offset0(self):
+      arg0=numpy.array([-6.0, 0.0])
+      arg1=Data(numpy.array([-4.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, 3.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[0.0, 0.0], [5.0, -6.0]]),self.functionspace)
+      ref=Data(numpy.array([[24.0, -12.0], [0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-6.0, -18.0], [0.0, 0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[-6.0, -1.0, 4.0], [0.0, -3.0, -2.0]]),self.functionspace)
-      arg1=Data(numpy.array([[3.0, -6.0, 7.0], [2.0, 1.0, 0.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[-7.0, 0.0, 1.0], [7.0, 1.0, 5.0]])
+      arg1=Data(numpy.array([[-3.0, 3.0, 3.0], [-4.0, 3.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, -4.0, -3.0], [-1.0, 6.0, -5.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[16.0, -13.0], [4.0, -3.0]]),self.functionspace)
+      ref=Data(numpy.array([[24.0, 33.0], [-3.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[39.0, 2.0], [-61.0, -26.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[[-7.0, -1.0, -5.0], [4.0, -3.0, -3.0]], [[0.0, 7.0, 0.0], [7.0, 1.0, 0.0]]])
+      arg1=Data(numpy.array([[[5.0, -4.0, -2.0], [7.0, -5.0, -5.0]], [[1.0, -2.0, 2.0], [-2.0, 1.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, -5.0, 5.0], [6.0, -4.0, 6.0]], [[-3.0, 1.0, -4.0], [0.0, -4.0, 2.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[37.0, -41.0], [16.0, -27.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[5.0, 46.0], [3.0, 3.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
       arg0=arg0*1j
       arg1=arg1*1j
       ref=-ref
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[2.0, 0.0, 2.0], [0.0, 0.0, 5.0]], [[1.0, 4.0, 0.0], [-7.0, 2.0, 3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[-2.0, 0.0, 0.0], [0.0, 3.0, -5.0]], [[2.0, -3.0, 3.0], [-5.0, 1.0, 4.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[-29.0, 30.0], [-11.0, 39.0]]),self.functionspace)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[0.0, -1.0, 7.0], [4.0, 0.0, 2.0], [7.0, 0.0, 7.0], [6.0, -3.0, -4.0]], [[-7.0, 0.0, 1.0], 
-[-2.0, -3.0, -6.0], [-4.0, 7.0, 5.0], [6.0, 5.0, 0.0]]], [[[7.0, -6.0, 2.0], [7.0, 5.0, 4.0], [4.0, 2.0, 0.0], [-7.0, 7.0, 
-0.0]], [[7.0, 6.0, 5.0], [7.0, -5.0, 6.0], [6.0, -7.0, -7.0], [-2.0, -2.0, -4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[-6.0, -5.0, -7.0], [5.0, 2.0, 4.0], [5.0, 0.0, 0.0], [0.0, 5.0, -3.0]], [[0.0, 0.0, -2.0], 
-[-5.0, -1.0, -3.0], [2.0, 5.0, 3.0], [6.0, -6.0, -6.0]]], [[[7.0, -7.0, 5.0], [-5.0, -7.0, -5.0], [6.0, -1.0, 0.0], [6.0, -5.0, 
--7.0]], [[-1.0, 7.0, 0.0], [7.0, -2.0, 6.0], [2.0, -3.0, 4.0], [0.0, -5.0, -3.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank4_offset3(self):
+      arg0=numpy.array([[[[4.0, -3.0, -4.0], [-5.0, -3.0, -6.0], [-1.0, -6.0, -4.0], [1.0, -7.0, -4.0]], [[4.0, -5.0, 1.0], 
+[-2.0, -3.0, 0.0], [-7.0, 6.0, -7.0], [-4.0, -6.0, -2.0]]], [[[4.0, 5.0, -5.0], [2.0, 4.0, 3.0], [3.0, 3.0, 4.0], [-3.0, 2.0, 
+-6.0]], [[6.0, -4.0, 5.0], [-4.0, 6.0, 4.0], [4.0, 6.0, 6.0], [1.0, -1.0, -7.0]]]])
+      arg1=Data(numpy.array([[[[-4.0, -3.0, 1.0], [2.0, -7.0, -2.0], [5.0, -3.0, -1.0], [6.0, -3.0, 0.0]], [[1.0, -5.0, -4.0], 
+[-5.0, 2.0, 5.0], [1.0, 4.0, -7.0], [7.0, -3.0, -6.0]]], [[[-1.0, -4.0, -7.0], [2.0, -1.0, 4.0], [0.0, 3.0, 6.0], [3.0, -7.0, 
+7.0]], [[1.0, -6.0, -5.0], [-4.0, -5.0, 3.0], [1.0, 7.0, 6.0], [-4.0, 7.0, -2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 6.0, 7.0], [-2.0, -1.0, -5.0], [0.0, 1.0, -1.0], [4.0, 4.0, 1.0]], [[0.0, 
+-3.0, -7.0], [2.0, -7.0, 4.0], [-7.0, -2.0, -7.0], [-2.0, 5.0, 0.0]]], [[[0.0, 7.0, 3.0], [5.0, 0.0, 7.0], [2.0, -1.0, 5.0], 
+[2.0, -1.0, 0.0]], [[7.0, -7.0, 0.0], [-2.0, 0.0, 0.0], [-4.0, 1.0, -3.0], [0.0, -4.0, 0.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      ref=Data(numpy.array([[93.0, 62.0], [12.0, 113.0]]),self.functionspace)
+      ref=Data(numpy.array([[153.0, 10.0], [8.0, 79.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[60.0, 39.0], [-181.0, 120.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank2_offset0(self):
-      arg0=Data(numpy.array([1.0, -7.0]),self.functionspace)
-      arg1=Data(numpy.array([[7.0, -4.0, 1.0, 4.0, 7.0], [4.0, 1.0, -2.0, 5.0, -4.0], [2.0, -3.0, 2.0, 5.0, 6.0], [-7.0, -4.0, 
-0.0, -1.0, 0.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank2_offset0(self):
+      arg0=numpy.array([6.0, 7.0])
+      arg1=Data(numpy.array([[2.0, -5.0, 0.0, 0.0, 4.0], [-2.0, -1.0, 0.0, -3.0, 3.0], [0.0, -2.0, 0.0, -7.0, 4.0], [1.0, -6.0, 
+7.0, 6.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, 7.0, -4.0, 6.0, -2.0], [-4.0, 2.0, 2.0, 2.0, -5.0], [2.0, -2.0, 6.0, -1.0, 
+-5.0], [1.0, 0.0, -4.0, -7.0, -1.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[7.0, -4.0, 1.0, 4.0, 7.0], [4.0, 1.0, -2.0, 5.0, -4.0], [2.0, -3.0, 2.0, 5.0, 6.0], [-7.0, -4.0, 
-0.0, -1.0, 0.0]], [[-49.0, 28.0, -7.0, -28.0, -49.0], [-28.0, -7.0, 14.0, -35.0, 28.0], [-14.0, 21.0, -14.0, -35.0, -42.0], 
-[49.0, 28.0, 0.0, 7.0, 0.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[12.0, -30.0, 0.0, 0.0, 24.0], [-12.0, -6.0, 0.0, -18.0, 18.0], [0.0, -12.0, 0.0, -42.0, 24.0], 
+[6.0, -36.0, 42.0, 36.0, -30.0]], [[14.0, -35.0, 0.0, 0.0, 28.0], [-14.0, -7.0, 0.0, -21.0, 21.0], [0.0, -14.0, 0.0, -49.0, 
+28.0], [7.0, -42.0, 49.0, 42.0, -35.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-36.0, 42.0, -24.0, 36.0, -12.0], [-24.0, 12.0, 12.0, 12.0, -30.0], [12.0, -12.0, 
+36.0, -6.0, -30.0], [6.0, 0.0, -24.0, -42.0, -6.0]], [[-42.0, 49.0, -28.0, 42.0, -14.0], [-28.0, 14.0, 14.0, 14.0, -35.0], 
+[14.0, -14.0, 42.0, -7.0, -35.0], [7.0, 0.0, -28.0, -49.0, -7.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([[7.0, 5.0, 3.0], [0.0, 2.0, -3.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[6.0, 5.0, -2.0], [6.0, 6.0, 2.0], [0.0, -2.0, -2.0], [-6.0, -4.0, 7.0], [4.0, 2.0, 2.0]], [[0.0, 
--6.0, -4.0], [-2.0, -5.0, 2.0], [4.0, -7.0, -4.0], [-6.0, 3.0, -2.0], [-2.0, -3.0, 1.0]], [[-1.0, 5.0, 0.0], [-4.0, -6.0, 
--3.0], [-1.0, -3.0, 2.0], [-5.0, 3.0, 1.0], [3.0, -5.0, -5.0]], [[-5.0, 0.0, 7.0], [0.0, -5.0, -5.0], [3.0, 0.0, 4.0], [0.0, 
--3.0, 7.0], [-4.0, 7.0, 1.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank3_offset1(self):
+      arg0=numpy.array([[-1.0, -4.0, -2.0], [1.0, -3.0, 2.0]])
+      arg1=Data(numpy.array([[[0.0, 3.0, 0.0], [5.0, 0.0, 5.0], [1.0, 0.0, 4.0], [0.0, -3.0, -6.0], [-6.0, 3.0, 4.0]], [[-3.0, 
+-1.0, -5.0], [7.0, -4.0, 1.0], [-7.0, 3.0, 1.0], [-1.0, -5.0, -5.0], [-5.0, 3.0, 7.0]], [[5.0, -7.0, 4.0], [7.0, -6.0, -6.0], 
+[-2.0, 2.0, -4.0], [-4.0, 2.0, -1.0], [6.0, -6.0, 4.0]], [[5.0, -4.0, -5.0], [-5.0, -1.0, -3.0], [7.0, 4.0, -6.0], [7.0, 3.0, 
+-2.0], [-3.0, 0.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, -6.0, 3.0], [2.0, 1.0, 0.0], [-1.0, 4.0, -2.0], [6.0, -6.0, -7.0], [-3.0, -1.0, 
+1.0]], [[-6.0, 1.0, -4.0], [5.0, -7.0, -7.0], [-3.0, 0.0, 5.0], [0.0, 0.0, 0.0], [1.0, -5.0, -7.0]], [[-4.0, 7.0, 5.0], [-3.0, 
+-7.0, -2.0], [-5.0, -3.0, -1.0], [5.0, -2.0, -6.0], [6.0, -6.0, -7.0]], [[-1.0, -2.0, -7.0], [-5.0, -5.0, -6.0], [0.0, -7.0, 
+-4.0], [3.0, -5.0, 2.0], [4.0, 6.0, 3.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[61.0, 78.0, -16.0, -41.0, 44.0], [-42.0, -33.0, -19.0, -33.0, -26.0], [18.0, -67.0, -16.0, -17.0, 
--19.0], [-14.0, -40.0, 33.0, 6.0, 10.0]], [[16.0, 6.0, 2.0, -29.0, -2.0], [0.0, -16.0, -2.0, 12.0, -9.0], [10.0, -3.0, -12.0, 
-3.0, 5.0], [-21.0, 5.0, -12.0, -27.0, 11.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[-12.0, -15.0, -9.0, 24.0, -14.0], [17.0, 7.0, -7.0, 31.0, -21.0], [15.0, 29.0, 2.0, -2.0, 10.0], 
+[21.0, 15.0, -11.0, -15.0, 13.0]], [[-9.0, 15.0, 9.0, -3.0, -7.0], [-10.0, 21.0, -14.0, 4.0, 0.0], [34.0, 13.0, -16.0, -12.0, 
+32.0], [7.0, -8.0, -17.0, -6.0, -13.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[12.0, -6.0, -11.0, 32.0, 5.0], [10.0, 37.0, -7.0, 0.0, 33.0], [-34.0, 35.0, 19.0, 
+15.0, 32.0], [23.0, 37.0, 36.0, 13.0, -34.0]], [[30.0, -1.0, -17.0, 10.0, 2.0], [-17.0, 12.0, 7.0, 0.0, 2.0], [-15.0, 14.0, 
+2.0, -1.0, 10.0], [-9.0, -2.0, 13.0, 22.0, -8.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[0.0, 1.0, 3.0], [-5.0, -1.0, -3.0]], [[-3.0, 1.0, -3.0], [-6.0, -5.0, 2.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[7.0, 0.0, -2.0], [0.0, -3.0, 1.0]], [[1.0, 4.0, 5.0], [6.0, -2.0, 1.0]], [[-1.0, -7.0, -2.0], 
-[-1.0, 1.0, 6.0]], [[-2.0, 1.0, -1.0], [-7.0, 2.0, 0.0]], [[-4.0, 1.0, 6.0], [3.0, -7.0, -6.0]]], [[[-5.0, -5.0, 4.0], [-1.0, 
-5.0, 1.0]], [[-4.0, -6.0, 4.0], [-7.0, -4.0, 1.0]], [[-3.0, 3.0, -7.0], [5.0, 0.0, 5.0]], [[1.0, -2.0, -4.0], [0.0, 0.0, 
--3.0]], [[-2.0, 4.0, 4.0], [7.0, -6.0, 0.0]]], [[[2.0, 5.0, -4.0], [4.0, -2.0, -5.0]], [[-7.0, 2.0, -7.0], [-3.0, 0.0, 1.0]], 
-[[0.0, -1.0, -5.0], [-1.0, -1.0, 0.0]], [[0.0, 6.0, -3.0], [4.0, -7.0, 4.0]], [[0.0, 1.0, -6.0], [0.0, -6.0, -1.0]]], [[[-7.0, 
--1.0, 5.0], [-6.0, -2.0, 2.0]], [[0.0, 3.0, -4.0], [2.0, 2.0, 6.0]], [[-2.0, 4.0, -3.0], [4.0, 4.0, 1.0]], [[3.0, -6.0, 6.0], 
-[3.0, -1.0, -4.0]], [[7.0, -4.0, 7.0], [2.0, 3.0, -6.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[[0.0, 0.0, -4.0], [4.0, 5.0, -5.0]], [[5.0, 1.0, 4.0], [-6.0, 5.0, 4.0]]])
+      arg1=Data(numpy.array([[[[-3.0, 4.0, 5.0], [-6.0, -4.0, -2.0]], [[0.0, 7.0, -5.0], [-2.0, -2.0, -6.0]], [[-4.0, 0.0, 
+-6.0], [-5.0, 7.0, 0.0]], [[2.0, -7.0, -7.0], [1.0, 3.0, -1.0]], [[5.0, 4.0, -5.0], [7.0, 2.0, 5.0]]], [[[6.0, 4.0, -6.0], 
+[1.0, 7.0, -7.0]], [[0.0, 0.0, 2.0], [-5.0, 4.0, 5.0]], [[0.0, 7.0, 6.0], [2.0, 2.0, -7.0]], [[-6.0, 0.0, 1.0], [1.0, 1.0, 
+7.0]], [[1.0, 1.0, 0.0], [3.0, 5.0, 6.0]]], [[[0.0, 2.0, 6.0], [-7.0, 2.0, 1.0]], [[2.0, -5.0, 3.0], [6.0, -7.0, 0.0]], [[-6.0, 
+6.0, -2.0], [-7.0, -4.0, -1.0]], [[5.0, 0.0, -2.0], [5.0, 0.0, -2.0]], [[-3.0, -5.0, -1.0], [1.0, -3.0, -4.0]]], [[[5.0, 3.0, 
+0.0], [-4.0, -2.0, -2.0]], [[-2.0, 0.0, -7.0], [3.0, 2.0, -5.0]], [[-7.0, -2.0, 6.0], [-2.0, -1.0, -6.0]], [[1.0, 5.0, 2.0], 
+[-2.0, -5.0, -1.0]], [[-2.0, -1.0, 7.0], [-7.0, -6.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, 2.0, 6.0], [6.0, -1.0, 6.0]], [[2.0, -1.0, -2.0], [3.0, -3.0, 0.0]], [[0.0, 
+0.0, 3.0], [7.0, 0.0, -6.0]], [[-2.0, -6.0, -7.0], [5.0, 2.0, 1.0]], [[5.0, 0.0, -7.0], [-7.0, 1.0, 7.0]]], [[[3.0, 0.0, -4.0], 
+[2.0, 7.0, -1.0]], [[-1.0, 7.0, -2.0], [-1.0, 2.0, 1.0]], [[-1.0, 0.0, -3.0], [5.0, 1.0, 0.0]], [[1.0, -2.0, 2.0], [7.0, -4.0, 
+0.0]], [[-4.0, 0.0, 3.0], [7.0, 2.0, -4.0]]], [[[-5.0, 1.0, -5.0], [2.0, -2.0, 1.0]], [[-3.0, -1.0, 0.0], [3.0, 1.0, -5.0]], 
+[[6.0, -6.0, -3.0], [-1.0, 4.0, -1.0]], [[-5.0, -1.0, -5.0], [5.0, 3.0, 5.0]], [[-6.0, 0.0, -5.0], [-3.0, -3.0, 2.0]]], 
+[[[-2.0, 4.0, -2.0], [7.0, -2.0, -5.0]], [[-6.0, -6.0, 7.0], [-6.0, 4.0, -2.0]], [[-5.0, -3.0, 6.0], [4.0, -6.0, -7.0]], [[0.0, 
+-4.0, -7.0], [5.0, -7.0, 0.0]], [[0.0, -7.0, -6.0], [-5.0, -6.0, 4.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-6.0, -12.0, -27.0, 31.0, 29.0], [4.0, 42.0, -58.0, -5.0, -13.0], [-10.0, -7.0, -10.0, -28.0, 
--8.0], [40.0, -39.0, -32.0, 10.0, 22.0]], [[2.0, -38.0, 15.0, 42.0, 0.0], [-19.0, 58.0, 13.0, 1.0, -14.0], [-13.0, 64.0, 25.0, 
-34.0, 47.0], [55.0, 5.0, -23.0, -54.0, -85.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[-54.0, 32.0, 39.0, 52.0, 33.0], [98.0, -33.0, 29.0, -30.0, 7.0], [-47.0, -23.0, -35.0, 38.0, 
+13.0], [-16.0, 75.0, -7.0, -36.0, -86.0]], [[17.0, -35.0, 21.0, -20.0, -3.0], [11.0, 78.0, 1.0, 1.0, 37.0], [82.0, -54.0, 
+-14.0, -21.0, -61.0], [34.0, -66.0, -30.0, 1.0, 29.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-35.0, 5.0, 46.0, 53.0, -30.0], [64.0, 9.0, 37.0, 0.0, 46.0], [13.0, 42.0, 33.0, 
+30.0, -17.0], [51.0, -22.0, -3.0, 13.0, -46.0]], [[29.0, -32.0, -54.0, -60.0, 72.0], [18.0, 14.0, -42.0, -51.0, -56.0], [-62.0, 
+-49.0, 34.0, -41.0, -39.0], [-86.0, 40.0, -86.0, -97.0, -15.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_constData_rank3_offset0(self):
-      arg0=Data(numpy.array([0.0, 2.0]),self.functionspace)
-      arg1=Data(numpy.array([[[0.0, 0.0], [5.0, 0.0]], [[5.0, -4.0], [-4.0, 7.0]], [[-5.0, -2.0], [2.0, 0.0]], [[-6.0, -6.0], 
-[1.0, -4.0]], [[5.0, 1.0], [-1.0, -4.0]], [[-2.0, -2.0], [6.0, -5.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank1_taggedData_rank3_offset0(self):
+      arg0=numpy.array([-5.0, 7.0])
+      arg1=Data(numpy.array([[[5.0, 0.0], [-4.0, 0.0]], [[6.0, -2.0], [1.0, -3.0]], [[-2.0, -3.0], [-6.0, 3.0]], [[-4.0, 2.0], 
+[-2.0, -5.0]], [[-5.0, 7.0], [1.0, -7.0]], [[-3.0, 7.0], [3.0, 7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -6.0], [0.0, -2.0]], [[1.0, -5.0], [-7.0, 1.0]], [[-3.0, 0.0], [0.0, -6.0]], 
+[[4.0, -5.0], [0.0, 0.0]], [[-7.0, 3.0], [4.0, 0.0]], [[0.0, -4.0], [4.0, 1.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
-0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [10.0, 0.0]], [[10.0, -8.0], [-8.0, 14.0]], [[-10.0, 
--4.0], [4.0, 0.0]], [[-12.0, -12.0], [2.0, -8.0]], [[10.0, 2.0], [-2.0, -8.0]], [[-4.0, -4.0], [12.0, 
--10.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[[-25.0, 0.0], [20.0, 0.0]], [[-30.0, 10.0], [-5.0, 15.0]], [[10.0, 15.0], [30.0, -15.0]], [[20.0, 
+-10.0], [10.0, 25.0]], [[25.0, -35.0], [-5.0, 35.0]], [[15.0, -35.0], [-15.0, -35.0]]], [[[35.0, 0.0], [-28.0, 0.0]], [[42.0, 
+-14.0], [7.0, -21.0]], [[-14.0, -21.0], [-42.0, 21.0]], [[-28.0, 14.0], [-14.0, -35.0]], [[-35.0, 49.0], [7.0, -49.0]], 
+[[-21.0, 49.0], [21.0, 49.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[35.0, 30.0], [0.0, 10.0]], [[-5.0, 25.0], [35.0, -5.0]], [[15.0, 0.0], [0.0, 30.0]], 
+[[-20.0, 25.0], [0.0, 0.0]], [[35.0, -15.0], [-20.0, 0.0]], [[0.0, 20.0], [-20.0, -5.0]]], [[[-49.0, -42.0], [0.0, -14.0]], 
+[[7.0, -35.0], [-49.0, 7.0]], [[-21.0, 0.0], [0.0, -42.0]], [[28.0, -35.0], [0.0, 0.0]], [[-49.0, 21.0], [28.0, 0.0]], [[0.0, 
+-28.0], [28.0, 7.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank4_offset1(self):
-      arg0=Data(numpy.array([[-4.0, -4.0, -2.0], [1.0, -6.0, -2.0]]),self.functionspace)
-      arg1=Data(numpy.array([[[[3.0, -7.0, 4.0], [2.0, 2.0, 2.0]], [[0.0, -6.0, -1.0], [-5.0, -5.0, 2.0]]], [[[-2.0, -3.0, 
--2.0], [4.0, 0.0, 4.0]], [[-1.0, -1.0, -3.0], [-1.0, -6.0, 3.0]]], [[[5.0, -6.0, -3.0], [4.0, 2.0, -4.0]], [[-7.0, 7.0, -7.0], 
-[-2.0, 7.0, 1.0]]], [[[6.0, 2.0, 4.0], [-3.0, 5.0, 1.0]], [[-3.0, -1.0, 6.0], [-5.0, 0.0, 0.0]]], [[[-7.0, 0.0, 0.0], [0.0, 
--7.0, -6.0]], [[-4.0, -2.0, 0.0], [-6.0, 7.0, -5.0]]], [[[5.0, 4.0, 0.0], [-7.0, -1.0, -7.0]], [[0.0, 2.0, -5.0], [-3.0, 3.0, 
-5.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank4_offset1(self):
+      arg0=numpy.array([[3.0, 0.0, 1.0], [1.0, -2.0, 0.0]])
+      arg1=Data(numpy.array([[[[-2.0, 0.0, 1.0], [-3.0, 5.0, -3.0]], [[-7.0, -2.0, 4.0], [-6.0, 5.0, 2.0]]], [[[2.0, 7.0, 7.0], 
+[-1.0, 2.0, -3.0]], [[-2.0, -4.0, -4.0], [1.0, -2.0, 5.0]]], [[[-1.0, 0.0, 0.0], [0.0, 5.0, 0.0]], [[-5.0, -3.0, 7.0], [1.0, 
+0.0, -4.0]]], [[[-5.0, 3.0, -1.0], [-7.0, -4.0, 0.0]], [[-6.0, -7.0, 5.0], [2.0, 0.0, 4.0]]], [[[-3.0, 4.0, -3.0], [7.0, 1.0, 
+-5.0]], [[-5.0, -7.0, -5.0], [4.0, 2.0, 7.0]]], [[[6.0, -4.0, -1.0], [-5.0, -3.0, 2.0]], [[-5.0, 0.0, -2.0], [7.0, -5.0, 
+-2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, 2.0, 2.0], [-2.0, 6.0, 1.0]], [[0.0, -7.0, -6.0], [-4.0, 3.0, 0.0]]], [[[7.0, 
+-5.0, -5.0], [3.0, -6.0, 7.0]], [[7.0, 5.0, 7.0], [2.0, 3.0, -7.0]]], [[[-5.0, -4.0, -4.0], [5.0, -4.0, 5.0]], [[-6.0, 3.0, 
+-1.0], [-5.0, 2.0, 5.0]]], [[[3.0, 3.0, 0.0], [5.0, 7.0, -5.0]], [[-4.0, 2.0, 7.0], [-5.0, 7.0, 6.0]]], [[[0.0, -4.0, -2.0], 
+[-6.0, -5.0, -7.0]], [[4.0, 0.0, -5.0], [-1.0, 2.0, 4.0]]], [[[-5.0, 0.0, -7.0], [-4.0, 7.0, -7.0]], [[-2.0, 3.0, 6.0], [-7.0, 
+-6.0, 5.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[8.0, -20.0], [26.0, 36.0]], [[24.0, -24.0], [14.0, 22.0]], [[10.0, -16.0], [14.0, -22.0]], 
-[[-40.0, -10.0], [4.0, 20.0]], [[28.0, 40.0], [24.0, 6.0]], [[-36.0, 46.0], [2.0, -10.0]]], [[[37.0, -14.0], [38.0, 21.0]], 
-[[20.0, -4.0], [11.0, 29.0]], [[47.0, 0.0], [-35.0, -46.0]], [[-14.0, -35.0], [-9.0, -5.0]], [[-7.0, 54.0], [8.0, -38.0]], 
-[[-19.0, 13.0], [-2.0, -31.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[[-5.0, -12.0], [-17.0, -16.0]], [[13.0, -6.0], [-10.0, 8.0]], [[-3.0, 0.0], [-8.0, -1.0]], 
+[[-16.0, -21.0], [-13.0, 10.0]], [[-12.0, 16.0], [-20.0, 19.0]], [[17.0, -13.0], [-17.0, 19.0]]], [[[-2.0, -13.0], [-3.0, 
+-16.0]], [[-12.0, -5.0], [6.0, 5.0]], [[-1.0, -10.0], [1.0, 1.0]], [[-11.0, 1.0], [8.0, 2.0]], [[-11.0, 5.0], [9.0, 0.0]], 
+[[14.0, 1.0], [-5.0, 17.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[17.0, -5.0], [-6.0, -12.0]], [[16.0, 16.0], [28.0, -1.0]], [[-19.0, 20.0], [-19.0, 
+-10.0]], [[9.0, 10.0], [-5.0, -9.0]], [[-2.0, -25.0], [7.0, 1.0]], [[-22.0, -19.0], [0.0, -16.0]]], [[[1.0, -14.0], [14.0, 
+-10.0]], [[17.0, 15.0], [-3.0, -4.0]], [[3.0, 13.0], [-12.0, -9.0]], [[-3.0, -9.0], [-8.0, -19.0]], [[8.0, 4.0], [4.0, -5.0]], 
+[[-5.0, -18.0], [-8.0, 5.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([0.0, 5.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-1.0)
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[-3.0, -4.0, 3.0, 0.0, -6.0], [-2.0, -7.0, 1.0, 6.0, -4.0], [1.0, 4.0, -4.0, 0.0, 6.0], [3.0, -5.0, 
+2.0, 2.0, 6.0]])
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,0.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-0.0, -15.0])+(1.-msk_ref)*numpy.array([-0.0, -5.0])
+      ref=Data(numpy.array([[6.0, 8.0, -6.0, -0.0, 12.0], [4.0, 14.0, -2.0, -12.0, 8.0], [-2.0, -8.0, 8.0, -0.0, -12.0], [-6.0, 
+10.0, -4.0, -4.0, -12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-0.0, -0.0, 0.0, 0.0, -0.0], [-0.0, -0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0, 0.0], 
+[0.0, -0.0, 0.0, 0.0, 0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[4.0, -5.0, -3.0], [0.0, -4.0, -2.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 0.0, -7.0])+(1.-msk_arg1)*numpy.array([-6.0, 6.0, 4.0])
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[[0.0, -3.0, -5.0], [-4.0, 7.0, -2.0], [7.0, 4.0, 1.0], [5.0, 6.0, 3.0], [-1.0, -3.0, -3.0]], [[-6.0, 
+6.0, -7.0], [-3.0, 7.0, 7.0], [1.0, -3.0, -1.0], [3.0, 6.0, 2.0], [2.0, -7.0, 5.0]], [[-5.0, 6.0, 5.0], [6.0, 2.0, -1.0], [6.0, 
+-2.0, 0.0], [-4.0, -2.0, -4.0], [4.0, 2.0, 2.0]], [[0.0, -4.0, 2.0], [-3.0, -7.0, 6.0], [-7.0, 3.0, -2.0], [5.0, -4.0, -7.0], 
+[7.0, 5.0, 5.0]]])
+      arg1=Data(numpy.array([0.0, 2.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 6.0, 0.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([21.0, 14.0])+(1.-msk_ref)*numpy.array([-66.0, -32.0])
+      ref=Data(numpy.array([[4.0, 18.0, 6.0, 6.0, 0.0], [26.0, 0.0, -4.0, 8.0, -24.0], [2.0, 6.0, -4.0, 4.0, 0.0], [-12.0, 
+-26.0, 10.0, 6.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-18.0, 66.0, -18.0, 6.0, -12.0], [72.0, 60.0, -24.0, 18.0, -54.0], [66.0, -24.0, 
+-48.0, 12.0, -12.0], [-24.0, -24.0, 60.0, -54.0, -12.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[4.0, -6.0, 1.0], [6.0, -7.0, -4.0]], [[-1.0, 0.0, -2.0], [-3.0, 0.0, -7.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[0.0, 6.0, 3.0], [0.0, -5.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -7.0, 7.0], [6.0, -7.0, 
-6.0]])
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank2_offset2(self):
+      arg0=numpy.array([[[[0.0, 1.0, -4.0], [-3.0, -5.0, 3.0]], [[6.0, -2.0, 0.0], [2.0, -1.0, 7.0]], [[7.0, -2.0, 0.0], [0.0, 
+-4.0, -6.0]], [[-5.0, 3.0, 3.0], [7.0, 0.0, -2.0]], [[1.0, -4.0, -5.0], [0.0, 7.0, 0.0]]], [[[3.0, -3.0, -7.0], [0.0, 0.0, 
+7.0]], [[6.0, 0.0, 7.0], [-4.0, 5.0, -1.0]], [[-5.0, -2.0, -5.0], [1.0, -5.0, -7.0]], [[3.0, 0.0, -3.0], [6.0, 0.0, 5.0]], 
+[[3.0, 2.0, -5.0], [0.0, -5.0, -6.0]]], [[[3.0, 0.0, -1.0], [-7.0, -4.0, 1.0]], [[1.0, 2.0, 6.0], [-7.0, 2.0, 0.0]], [[-2.0, 
+3.0, -7.0], [-7.0, 0.0, 5.0]], [[-3.0, 3.0, 2.0], [-5.0, 1.0, -3.0]], [[-6.0, 7.0, 5.0], [-7.0, 0.0, 6.0]]], [[[-6.0, 1.0, 
+1.0], [2.0, 0.0, 3.0]], [[-2.0, -6.0, -2.0], [2.0, 0.0, 0.0]], [[4.0, -3.0, 2.0], [0.0, -1.0, -7.0]], [[2.0, -5.0, -6.0], [3.0, 
+-4.0, 0.0]], [[-6.0, -2.0, 4.0], [-6.0, 0.0, 0.0]]]])
+      arg1=Data(numpy.array([[0.0, -5.0, -5.0], [-1.0, 6.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, -2.0, 4.0], [4.0, -5.0, 7.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([18.0, 22.0])+(1.-msk_ref)*numpy.array([82.0, -67.0])
+      ref=Data(numpy.array([[6.0, 44.0, -50.0, -49.0, 87.0], [92.0, -7.0, -38.0, 39.0, -51.0], [-6.0, -21.0, 57.0, -32.0, 
+-17.0], [6.0, 38.0, -43.0, 28.0, -4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[16.0, 84.0, 3.0, 5.0, -44.0], [36.0, -2.0, -51.0, 56.0, -32.0], [4.0, -15.0, -33.0, 
+-53.0, 2.0], [13.0, 6.0, -18.0, 24.0, -22.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank3_offset3(self):
-      arg0=Data(numpy.array([[[[-1.0, -3.0, 7.0], [-7.0, -6.0, -3.0], [0.0, 1.0, 0.0], [7.0, 7.0, 3.0]], [[2.0, -4.0, 6.0], 
-[3.0, -2.0, 0.0], [5.0, 7.0, 4.0], [-1.0, -1.0, 7.0]]], [[[-3.0, 0.0, 0.0], [3.0, 0.0, -6.0], [0.0, 4.0, -6.0], [-4.0, 1.0, 
--1.0]], [[0.0, 2.0, 6.0], [0.0, 3.0, 2.0], [4.0, -6.0, -5.0], [-6.0, -7.0, 5.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, 2.0, 6.0], [6.0, -5.0, 0.0], [-1.0, -4.0, 5.0], [7.0, 0.0, -5.0]], [[-7.0, -3.0, -3.0], 
-[-4.0, 0.0, -3.0], [0.0, 3.0, 6.0], [-1.0, 0.0, -5.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, 2.0, -6.0], [-4.0, 6.0, -4.0], 
-[6.0, 2.0, -4.0], [3.0, 7.0, 7.0]], [[5.0, -7.0, -3.0], [-2.0, -7.0, 2.0], [7.0, 6.0, 0.0], [-1.0, -1.0, 1.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([26.0, -169.0])+(1.-msk_ref)*numpy.array([170.0, 14.0])
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank1_offset0(self):
+      arg0=numpy.array([[-7.0, 0.0, -2.0, 4.0, -1.0], [-4.0, 7.0, -3.0, -5.0, 0.0], [-2.0, -3.0, -2.0, -7.0, 5.0], [2.0, -6.0, 
+-2.0, -5.0, -2.0]])
+      arg1=Data(numpy.array([-3.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -6.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[21.0, 21.0], [0.0, 0.0], [6.0, 6.0], [-12.0, -12.0], [3.0, 3.0]], [[12.0, 12.0], [-21.0, -21.0], 
+[9.0, 9.0], [15.0, 15.0], [0.0, 0.0]], [[6.0, 6.0], [9.0, 9.0], [6.0, 6.0], [21.0, 21.0], [-15.0, -15.0]], [[-6.0, -6.0], 
+[18.0, 18.0], [6.0, 6.0], [15.0, 15.0], [6.0, 6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-14.0, 42.0], [0.0, 0.0], [-4.0, 12.0], [8.0, -24.0], [-2.0, 6.0]], [[-8.0, 24.0], 
+[14.0, -42.0], [-6.0, 18.0], [-10.0, 30.0], [0.0, 0.0]], [[-4.0, 12.0], [-6.0, 18.0], [-4.0, 12.0], [-14.0, 42.0], [10.0, 
+-30.0]], [[4.0, -12.0], [-12.0, 36.0], [-4.0, 12.0], [-10.0, 30.0], [-4.0, 12.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([2.0, 1.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, 4.0])+(1.-msk_arg1)*numpy.array([2.0, 7.0])
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[[-4.0, -5.0, 7.0], [-7.0, 3.0, -3.0], [-5.0, -5.0, -6.0], [2.0, 0.0, -5.0], [1.0, -3.0, -1.0]], 
+[[-3.0, 3.0, -1.0], [-7.0, -6.0, 5.0], [2.0, -2.0, 4.0], [0.0, -6.0, 3.0], [3.0, -5.0, 4.0]], [[0.0, -2.0, 7.0], [-3.0, 1.0, 
+5.0], [7.0, -2.0, -6.0], [6.0, 0.0, 0.0], [7.0, 4.0, -4.0]], [[0.0, -3.0, 0.0], [0.0, 5.0, 6.0], [7.0, -5.0, 2.0], [3.0, -5.0, 
+4.0], [1.0, -5.0, -7.0]]])
+      arg1=Data(numpy.array([[-4.0, 0.0, -1.0], [1.0, 3.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, -6.0, 2.0], [-6.0, -5.0, 2.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[9.0, -68.0], [31.0, 23.0], [26.0, 22.0], [-3.0, 37.0], [-3.0, -1.0]], [[13.0, 13.0], [23.0, 
+-60.0], [-12.0, -32.0], [-3.0, -39.0], [-16.0, -40.0]], [[-7.0, -55.0], [7.0, -35.0], [-22.0, 43.0], [-24.0, 6.0], [-24.0, 
+47.0]], [[0.0, -9.0], [-6.0, -27.0], [-30.0, -22.0], [-16.0, -40.0], [3.0, 35.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[48.0, 63.0], [-17.0, 21.0], [23.0, 43.0], [-12.0, -22.0], [15.0, 7.0]], [[-17.0, 
+1.0], [53.0, 82.0], [18.0, 6.0], [42.0, 36.0], [35.0, 15.0]], [[26.0, 24.0], [7.0, 23.0], [-7.0, -44.0], [-6.0, -36.0], [-39.0, 
+-70.0]], [[18.0, 15.0], [-18.0, -13.0], [27.0, -13.0], [35.0, 15.0], [15.0, 5.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank3_offset2(self):
+      arg0=numpy.array([[[[0.0, 7.0, 0.0], [-1.0, -1.0, 7.0]], [[4.0, -1.0, 1.0], [-5.0, 1.0, 6.0]], [[0.0, -6.0, 2.0], [-6.0, 
+0.0, -7.0]], [[-1.0, -3.0, 0.0], [-7.0, -5.0, 0.0]], [[-2.0, -4.0, 3.0], [-6.0, 5.0, 6.0]]], [[[0.0, -1.0, -5.0], [3.0, 7.0, 
+-6.0]], [[1.0, 5.0, -3.0], [-2.0, -2.0, 6.0]], [[0.0, 0.0, 5.0], [-1.0, -6.0, -1.0]], [[2.0, -2.0, -6.0], [7.0, 7.0, -7.0]], 
+[[4.0, -2.0, 7.0], [3.0, -7.0, 1.0]]], [[[2.0, 6.0, 3.0], [-7.0, -2.0, 3.0]], [[4.0, -2.0, -6.0], [6.0, 0.0, -7.0]], [[3.0, 
+-1.0, -7.0], [0.0, 3.0, 3.0]], [[0.0, 3.0, -1.0], [1.0, -3.0, -5.0]], [[7.0, -7.0, -4.0], [-7.0, -7.0, 7.0]]], [[[-2.0, -6.0, 
+-1.0], [-3.0, 7.0, -4.0]], [[-6.0, 4.0, 2.0], [6.0, -1.0, -4.0]], [[0.0, 5.0, -5.0], [7.0, 0.0, 4.0]], [[5.0, -2.0, -1.0], 
+[1.0, 5.0, -1.0]], [[-1.0, 2.0, -7.0], [-2.0, -1.0, -2.0]]]])
+      arg1=Data(numpy.array([[[1.0, 6.0, -4.0], [5.0, -1.0, 2.0]], [[1.0, -3.0, 6.0], [-5.0, -7.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, 1.0, 3.0], [2.0, -2.0, -5.0]], [[1.0, 5.0, -1.0], [-5.0, -6.0, -1.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[52.0, -23.0], [-20.0, 19.0], [-88.0, 74.0], [-49.0, 78.0], [-61.0, 11.0]], [[10.0, -79.0], [47.0, 
+-20.0], [-21.0, 79.0], [28.0, -98.0], [-12.0, 84.0]], [[-1.0, 45.0], [32.0, -42.0], [28.0, -63.0], [20.0, 11.0], [-33.0, 
+74.0]], [[-64.0, -16.0], [33.0, -21.0], [93.0, -88.0], [-5.0, -33.0], [26.0, -28.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-28.0, 39.0], [-56.0, 11.0], [23.0, 5.0], [-3.0, 49.0], [-39.0, -31.0]], [[6.0, 
+-51.0], [-38.0, 45.0], [30.0, 37.0], [7.0, -72.0], [18.0, 13.0]], [[-18.0, 73.0], [11.0, -23.0], [-55.0, -16.0], [33.0, 34.0], 
+[-82.0, 46.0]], [[-1.0, -54.0], [68.0, -8.0], [-16.0, -9.0], [-28.0, -38.0], [-7.0, 34.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank2_taggedData_rank2_offset0(self):
+      arg0=numpy.array([[1.0, -4.0, -2.0, 7.0, 7.0], [7.0, -7.0, -5.0, -2.0, 4.0], [-5.0, 1.0, -3.0, 1.0, 7.0], [2.0, 3.0, 3.0, 
+-6.0, 1.0]])
+      arg1=Data(numpy.array([[3.0, -1.0, -6.0, 6.0, 2.0], [5.0, -3.0, -1.0, -7.0, -4.0], [-5.0, -3.0, -4.0, -3.0, -5.0], [1.0, 
+3.0, -7.0, -4.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, 2.0, 2.0, 4.0, -1.0], [-7.0, 5.0, -2.0, 1.0, -3.0], [-2.0, 0.0, 3.0, -1.0, 
+4.0], [2.0, -3.0, -6.0, 6.0, 0.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[12.0, 8.0], [6.0, 4.0]])+(1.-msk_ref)*numpy.array([[4.0, 14.0], [2.0, 7.0]])
+      ref=Data(numpy.array([[[[3.0, -1.0, -6.0, 6.0, 2.0], [5.0, -3.0, -1.0, -7.0, -4.0], [-5.0, -3.0, -4.0, -3.0, -5.0], [1.0, 
+3.0, -7.0, -4.0, -7.0]], [[-12.0, 4.0, 24.0, -24.0, -8.0], [-20.0, 12.0, 4.0, 28.0, 16.0], [20.0, 12.0, 16.0, 12.0, 20.0], 
+[-4.0, -12.0, 28.0, 16.0, 28.0]], [[-6.0, 2.0, 12.0, -12.0, -4.0], [-10.0, 6.0, 2.0, 14.0, 8.0], [10.0, 6.0, 8.0, 6.0, 10.0], 
+[-2.0, -6.0, 14.0, 8.0, 14.0]], [[21.0, -7.0, -42.0, 42.0, 14.0], [35.0, -21.0, -7.0, -49.0, -28.0], [-35.0, -21.0, -28.0, 
+-21.0, -35.0], [7.0, 21.0, -49.0, -28.0, -49.0]], [[21.0, -7.0, -42.0, 42.0, 14.0], [35.0, -21.0, -7.0, -49.0, -28.0], [-35.0, 
+-21.0, -28.0, -21.0, -35.0], [7.0, 21.0, -49.0, -28.0, -49.0]]], [[[21.0, -7.0, -42.0, 42.0, 14.0], [35.0, -21.0, -7.0, -49.0, 
+-28.0], [-35.0, -21.0, -28.0, -21.0, -35.0], [7.0, 21.0, -49.0, -28.0, -49.0]], [[-21.0, 7.0, 42.0, -42.0, -14.0], [-35.0, 
+21.0, 7.0, 49.0, 28.0], [35.0, 21.0, 28.0, 21.0, 35.0], [-7.0, -21.0, 49.0, 28.0, 49.0]], [[-15.0, 5.0, 30.0, -30.0, -10.0], 
+[-25.0, 15.0, 5.0, 35.0, 20.0], [25.0, 15.0, 20.0, 15.0, 25.0], [-5.0, -15.0, 35.0, 20.0, 35.0]], [[-6.0, 2.0, 12.0, -12.0, 
+-4.0], [-10.0, 6.0, 2.0, 14.0, 8.0], [10.0, 6.0, 8.0, 6.0, 10.0], [-2.0, -6.0, 14.0, 8.0, 14.0]], [[12.0, -4.0, -24.0, 24.0, 
+8.0], [20.0, -12.0, -4.0, -28.0, -16.0], [-20.0, -12.0, -16.0, -12.0, -20.0], [4.0, 12.0, -28.0, -16.0, -28.0]]], [[[-15.0, 
+5.0, 30.0, -30.0, -10.0], [-25.0, 15.0, 5.0, 35.0, 20.0], [25.0, 15.0, 20.0, 15.0, 25.0], [-5.0, -15.0, 35.0, 20.0, 35.0]], 
+[[3.0, -1.0, -6.0, 6.0, 2.0], [5.0, -3.0, -1.0, -7.0, -4.0], [-5.0, -3.0, -4.0, -3.0, -5.0], [1.0, 3.0, -7.0, -4.0, -7.0]], 
+[[-9.0, 3.0, 18.0, -18.0, -6.0], [-15.0, 9.0, 3.0, 21.0, 12.0], [15.0, 9.0, 12.0, 9.0, 15.0], [-3.0, -9.0, 21.0, 12.0, 21.0]], 
+[[3.0, -1.0, -6.0, 6.0, 2.0], [5.0, -3.0, -1.0, -7.0, -4.0], [-5.0, -3.0, -4.0, -3.0, -5.0], [1.0, 3.0, -7.0, -4.0, -7.0]], 
+[[21.0, -7.0, -42.0, 42.0, 14.0], [35.0, -21.0, -7.0, -49.0, -28.0], [-35.0, -21.0, -28.0, -21.0, -35.0], [7.0, 21.0, -49.0, 
+-28.0, -49.0]]], [[[6.0, -2.0, -12.0, 12.0, 4.0], [10.0, -6.0, -2.0, -14.0, -8.0], [-10.0, -6.0, -8.0, -6.0, -10.0], [2.0, 6.0, 
+-14.0, -8.0, -14.0]], [[9.0, -3.0, -18.0, 18.0, 6.0], [15.0, -9.0, -3.0, -21.0, -12.0], [-15.0, -9.0, -12.0, -9.0, -15.0], 
+[3.0, 9.0, -21.0, -12.0, -21.0]], [[9.0, -3.0, -18.0, 18.0, 6.0], [15.0, -9.0, -3.0, -21.0, -12.0], [-15.0, -9.0, -12.0, -9.0, 
+-15.0], [3.0, 9.0, -21.0, -12.0, -21.0]], [[-18.0, 6.0, 36.0, -36.0, -12.0], [-30.0, 18.0, 6.0, 42.0, 24.0], [30.0, 18.0, 24.0, 
+18.0, 30.0], [-6.0, -18.0, 42.0, 24.0, 42.0]], [[3.0, -1.0, -6.0, 6.0, 2.0], [5.0, -3.0, -1.0, -7.0, -4.0], [-5.0, -3.0, -4.0, 
+-3.0, -5.0], [1.0, 3.0, -7.0, -4.0, -7.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-1.0, 2.0, 2.0, 4.0, -1.0], [-7.0, 5.0, -2.0, 1.0, -3.0], [-2.0, 0.0, 3.0, -1.0, 
+4.0], [2.0, -3.0, -6.0, 6.0, 0.0]], [[4.0, -8.0, -8.0, -16.0, 4.0], [28.0, -20.0, 8.0, -4.0, 12.0], [8.0, 0.0, -12.0, 4.0, 
+-16.0], [-8.0, 12.0, 24.0, -24.0, 0.0]], [[2.0, -4.0, -4.0, -8.0, 2.0], [14.0, -10.0, 4.0, -2.0, 6.0], [4.0, 0.0, -6.0, 2.0, 
+-8.0], [-4.0, 6.0, 12.0, -12.0, 0.0]], [[-7.0, 14.0, 14.0, 28.0, -7.0], [-49.0, 35.0, -14.0, 7.0, -21.0], [-14.0, 0.0, 21.0, 
+-7.0, 28.0], [14.0, -21.0, -42.0, 42.0, 0.0]], [[-7.0, 14.0, 14.0, 28.0, -7.0], [-49.0, 35.0, -14.0, 7.0, -21.0], [-14.0, 0.0, 
+21.0, -7.0, 28.0], [14.0, -21.0, -42.0, 42.0, 0.0]]], [[[-7.0, 14.0, 14.0, 28.0, -7.0], [-49.0, 35.0, -14.0, 7.0, -21.0], 
+[-14.0, 0.0, 21.0, -7.0, 28.0], [14.0, -21.0, -42.0, 42.0, 0.0]], [[7.0, -14.0, -14.0, -28.0, 7.0], [49.0, -35.0, 14.0, -7.0, 
+21.0], [14.0, 0.0, -21.0, 7.0, -28.0], [-14.0, 21.0, 42.0, -42.0, 0.0]], [[5.0, -10.0, -10.0, -20.0, 5.0], [35.0, -25.0, 10.0, 
+-5.0, 15.0], [10.0, 0.0, -15.0, 5.0, -20.0], [-10.0, 15.0, 30.0, -30.0, 0.0]], [[2.0, -4.0, -4.0, -8.0, 2.0], [14.0, -10.0, 
+4.0, -2.0, 6.0], [4.0, 0.0, -6.0, 2.0, -8.0], [-4.0, 6.0, 12.0, -12.0, 0.0]], [[-4.0, 8.0, 8.0, 16.0, -4.0], [-28.0, 20.0, 
+-8.0, 4.0, -12.0], [-8.0, 0.0, 12.0, -4.0, 16.0], [8.0, -12.0, -24.0, 24.0, 0.0]]], [[[5.0, -10.0, -10.0, -20.0, 5.0], [35.0, 
+-25.0, 10.0, -5.0, 15.0], [10.0, 0.0, -15.0, 5.0, -20.0], [-10.0, 15.0, 30.0, -30.0, 0.0]], [[-1.0, 2.0, 2.0, 4.0, -1.0], 
+[-7.0, 5.0, -2.0, 1.0, -3.0], [-2.0, 0.0, 3.0, -1.0, 4.0], [2.0, -3.0, -6.0, 6.0, 0.0]], [[3.0, -6.0, -6.0, -12.0, 3.0], [21.0, 
+-15.0, 6.0, -3.0, 9.0], [6.0, 0.0, -9.0, 3.0, -12.0], [-6.0, 9.0, 18.0, -18.0, 0.0]], [[-1.0, 2.0, 2.0, 4.0, -1.0], [-7.0, 5.0, 
+-2.0, 1.0, -3.0], [-2.0, 0.0, 3.0, -1.0, 4.0], [2.0, -3.0, -6.0, 6.0, 0.0]], [[-7.0, 14.0, 14.0, 28.0, -7.0], [-49.0, 35.0, 
+-14.0, 7.0, -21.0], [-14.0, 0.0, 21.0, -7.0, 28.0], [14.0, -21.0, -42.0, 42.0, 0.0]]], [[[-2.0, 4.0, 4.0, 8.0, -2.0], [-14.0, 
+10.0, -4.0, 2.0, -6.0], [-4.0, 0.0, 6.0, -2.0, 8.0], [4.0, -6.0, -12.0, 12.0, 0.0]], [[-3.0, 6.0, 6.0, 12.0, -3.0], [-21.0, 
+15.0, -6.0, 3.0, -9.0], [-6.0, 0.0, 9.0, -3.0, 12.0], [6.0, -9.0, -18.0, 18.0, 0.0]], [[-3.0, 6.0, 6.0, 12.0, -3.0], [-21.0, 
+15.0, -6.0, 3.0, -9.0], [-6.0, 0.0, 9.0, -3.0, 12.0], [6.0, -9.0, -18.0, 18.0, 0.0]], [[6.0, -12.0, -12.0, -24.0, 6.0], [42.0, 
+-30.0, 12.0, -6.0, 18.0], [12.0, 0.0, -18.0, 6.0, -24.0], [-12.0, 18.0, 36.0, -36.0, 0.0]], [[-1.0, 2.0, 2.0, 4.0, -1.0], 
+[-7.0, 5.0, -2.0, 1.0, -3.0], [-2.0, 0.0, 3.0, -1.0, 4.0], [2.0, -3.0, -6.0, 6.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[-1.0, -4.0, -3.0], [4.0, -2.0, 4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, 2.0, -5.0], [3.0, 4.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-5.0, -6.0, 4.0], [3.0, 6.0, 
-6.0]])
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank3_offset1(self):
+      arg0=numpy.array([[[2.0, 6.0, 0.0], [-1.0, -2.0, -5.0], [6.0, 0.0, -4.0], [2.0, 7.0, 7.0], [-6.0, 2.0, 4.0]], [[0.0, 
+-2.0, -2.0], [-7.0, 4.0, -2.0], [4.0, -1.0, 0.0], [-5.0, -2.0, 2.0], [-1.0, 7.0, -6.0]], [[-6.0, -7.0, 7.0], [6.0, 2.0, -7.0], 
+[-3.0, -2.0, 6.0], [5.0, 7.0, 0.0], [6.0, -3.0, 6.0]], [[6.0, 0.0, -7.0], [2.0, 0.0, 0.0], [-5.0, 4.0, -3.0], [-5.0, 5.0, 
+-1.0], [-3.0, -5.0, 5.0]]])
+      arg1=Data(numpy.array([[[-2.0, -7.0, -5.0], [2.0, -1.0, -3.0], [6.0, -6.0, -3.0], [7.0, 7.0, 2.0], [5.0, -4.0, 1.0]], 
+[[-7.0, 7.0, 5.0], [-1.0, -7.0, 0.0], [1.0, -4.0, -3.0], [1.0, 5.0, -1.0], [5.0, 7.0, 6.0]], [[0.0, -4.0, -7.0], [5.0, -4.0, 
+2.0], [-2.0, 1.0, -7.0], [-6.0, -4.0, 1.0], [-3.0, 6.0, 6.0]], [[-4.0, 2.0, 2.0], [-5.0, 7.0, 2.0], [1.0, -5.0, -2.0], [0.0, 
+0.0, 6.0], [-3.0, -1.0, -6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, -6.0, -1.0], [2.0, -5.0, 4.0], [-1.0, 4.0, 5.0], [0.0, 6.0, -4.0], [3.0, 0.0, 
+6.0]], [[-6.0, -5.0, 0.0], [1.0, -5.0, 3.0], [-1.0, -5.0, 6.0], [3.0, 1.0, 6.0], [5.0, -7.0, -5.0]], [[1.0, -4.0, -6.0], [-2.0, 
+-6.0, -7.0], [-5.0, 6.0, 3.0], [0.0, 0.0, 1.0], [1.0, 6.0, 6.0]], [[6.0, -3.0, 5.0], [-6.0, 6.0, 6.0], [-3.0, 4.0, -2.0], [3.0, 
+-7.0, 4.0], [-2.0, -4.0, 6.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[11.0, -19.0], [-40.0, 4.0]])+(1.-msk_ref)*numpy.array([[17.0, -45.0], [8.0, 24.0]])
+      ref=Data(numpy.array([[[[-46.0, -2.0, -24.0, 56.0, -14.0], [28.0, -44.0, -22.0, 32.0, 52.0], [-24.0, -14.0, 2.0, -36.0, 
+30.0], [4.0, 32.0, -28.0, 0.0, -12.0]], [[41.0, 15.0, 21.0, -31.0, -2.0], [-32.0, 15.0, 22.0, -6.0, -49.0], [43.0, -7.0, 35.0, 
+9.0, -39.0], [-10.0, -19.0, 19.0, -30.0, 35.0]], [[8.0, 24.0, 48.0, 34.0, 26.0], [-62.0, -6.0, 18.0, 10.0, 6.0], [28.0, 22.0, 
+16.0, -40.0, -42.0], [-32.0, -38.0, 14.0, -24.0, 6.0]], [[-88.0, -24.0, -51.0, 77.0, -11.0], [70.0, -51.0, -47.0, 30.0, 101.0], 
+[-77.0, -4.0, -46.0, -33.0, 78.0], [20.0, 53.0, -47.0, 42.0, -55.0]], [[-22.0, -26.0, -60.0, -20.0, -34.0], [76.0, -8.0, -26.0, 
+0.0, 8.0], [-36.0, -30.0, -14.0, 32.0, 54.0], [36.0, 52.0, -24.0, 24.0, -8.0]]], [[[24.0, 8.0, 18.0, -18.0, 6.0], [-24.0, 14.0, 
+14.0, -8.0, -26.0], [22.0, 4.0, 12.0, 6.0, -24.0], [-8.0, -18.0, 14.0, -12.0, 14.0]], [[-4.0, -12.0, -60.0, -25.0, -53.0], 
+[67.0, -21.0, -17.0, 15.0, -19.0], [-2.0, -55.0, 32.0, 24.0, 33.0], [32.0, 59.0, -23.0, -12.0, 29.0]], [[-1.0, 9.0, 30.0, 21.0, 
+24.0], [-35.0, 3.0, 8.0, -1.0, 13.0], [4.0, 24.0, -9.0, -20.0, -18.0], [-18.0, -27.0, 9.0, 0.0, -11.0]], [[14.0, -14.0, -24.0, 
+-45.0, -15.0], [31.0, 19.0, -3.0, -17.0, -27.0], [-6.0, -13.0, -6.0, 40.0, 15.0], [20.0, 15.0, 1.0, 12.0, 5.0]], [[-17.0, 9.0, 
+-30.0, 30.0, -39.0], [26.0, -48.0, -11.0, 40.0, 8.0], [14.0, -45.0, 51.0, -28.0, 9.0], [6.0, 42.0, -24.0, -36.0, 32.0]]], 
+[[[26.0, -26.0, -15.0, -77.0, 5.0], [28.0, 55.0, 1.0, -48.0, -37.0], [-21.0, 12.0, -44.0, 71.0, 18.0], [24.0, -5.0, 15.0, 42.0, 
+-17.0]], [[9.0, 31.0, 45.0, 42.0, 15.0], [-63.0, -20.0, 19.0, 23.0, 2.0], [41.0, 8.0, 39.0, -51.0, -48.0], [-34.0, -30.0, 10.0, 
+-42.0, 22.0]], [[-10.0, -22.0, -24.0, -23.0, -1.0], [37.0, 17.0, -13.0, -19.0, 7.0], [-34.0, 5.0, -38.0, 32.0, 33.0], [20.0, 
+13.0, -5.0, 36.0, -25.0]], [[-59.0, 3.0, -12.0, 84.0, -3.0], [14.0, -54.0, -23.0, 40.0, 74.0], [-28.0, -3.0, -3.0, -58.0, 
+27.0], [-6.0, 24.0, -30.0, 0.0, -22.0]], [[-21.0, -3.0, 36.0, 33.0, 48.0], [-33.0, 15.0, 0.0, -15.0, 45.0], [-30.0, 54.0, 
+-57.0, -18.0, 0.0], [-18.0, -39.0, 9.0, 36.0, -51.0]]], [[[23.0, 33.0, 57.0, 28.0, 23.0], [-77.0, -6.0, 27.0, 13.0, -12.0], 
+[49.0, 16.0, 37.0, -43.0, -60.0], [-38.0, -44.0, 20.0, -42.0, 24.0]], [[-4.0, 4.0, 12.0, 14.0, 10.0], [-14.0, -2.0, 2.0, 2.0, 
+10.0], [0.0, 10.0, -4.0, -12.0, -6.0], [-8.0, -10.0, 2.0, 0.0, -6.0]], [[-3.0, -5.0, -45.0, -13.0, -44.0], [48.0, -23.0, -12.0, 
+18.0, -15.0], [5.0, -47.0, 35.0, 11.0, 21.0], [22.0, 47.0, -19.0, -18.0, 29.0]], [[-20.0, -12.0, -57.0, -2.0, -46.0], [65.0, 
+-30.0, -22.0, 21.0, 4.0], [-13.0, -47.0, 22.0, 9.0, 39.0], [28.0, 58.0, -28.0, -6.0, 16.0]], [[16.0, -16.0, -3.0, -46.0, 10.0], 
+[11.0, 38.0, 2.0, -33.0, -20.0], [-15.0, 15.0, -34.0, 43.0, 9.0], [12.0, -10.0, 12.0, 30.0, -16.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-24.0, -26.0, 22.0, 36.0, 6.0], [-42.0, -28.0, -32.0, 12.0, -32.0], [-22.0, -40.0, 
+26.0, 0.0, 38.0], [-6.0, 24.0, 18.0, -36.0, -28.0]], [[11.0, -12.0, -32.0, 8.0, -33.0], [16.0, -6.0, -19.0, -35.0, 34.0], 
+[37.0, 49.0, -22.0, -5.0, -43.0], [-25.0, -36.0, 5.0, -9.0, -20.0]], [[40.0, -4.0, -26.0, 16.0, -6.0], [-36.0, -6.0, -30.0, 
+-6.0, 50.0], [30.0, 16.0, -42.0, -4.0, -18.0], [16.0, -60.0, -10.0, 2.0, -36.0]], [[-37.0, -3.0, 61.0, 14.0, 48.0], [-47.0, 
+-12.0, 5.0, 55.0, -74.0], [-68.0, -95.0, 53.0, 7.0, 86.0], [26.0, 72.0, 8.0, -15.0, 10.0]], [[-52.0, -6.0, 34.0, -4.0, 6.0], 
+[26.0, -4.0, 20.0, 8.0, -64.0], [-38.0, -28.0, 54.0, 4.0, 30.0], [-22.0, 72.0, 18.0, -16.0, 28.0]]], [[[14.0, 2.0, -18.0, -4.0, 
+-12.0], [10.0, 4.0, -2.0, -14.0, 24.0], [20.0, 26.0, -18.0, -2.0, -24.0], [-4.0, -24.0, -4.0, 6.0, -4.0]], [[-64.0, -42.0, 
+13.0, 32.0, -33.0], [22.0, -33.0, -25.0, -29.0, -53.0], [-11.0, 4.0, 53.0, -2.0, 5.0], [-64.0, 54.0, 41.0, -57.0, -14.0]], 
+[[30.0, 13.0, -8.0, -6.0, 12.0], [-19.0, 9.0, 1.0, 11.0, 27.0], [8.0, -2.0, -26.0, 0.0, -2.0], [27.0, -30.0, -16.0, 19.0, 
+-4.0]], [[-20.0, 8.0, 7.0, -20.0, -3.0], [40.0, 11.0, 27.0, -5.0, -21.0], [-9.0, 8.0, 19.0, 2.0, -5.0], [-14.0, 30.0, 3.0, 7.0, 
+30.0]], [[-42.0, -61.0, -1.0, 66.0, -39.0], [-29.0, -54.0, -70.0, -32.0, -24.0], [7.0, 2.0, 29.0, -6.0, 5.0], [-57.0, 12.0, 
+43.0, -76.0, -62.0]]], [[[-1.0, 51.0, 13.0, -70.0, 24.0], [71.0, 50.0, 83.0, 17.0, -16.0], [-20.0, 5.0, 9.0, 7.0, -6.0], [20.0, 
+36.0, -24.0, 59.0, 82.0]], [[31.0, -26.0, -33.0, 40.0, -24.0], [-46.0, -25.0, -58.0, -22.0, 51.0], [40.0, 25.0, -39.0, -7.0, 
+-24.0], [-5.0, -66.0, 4.0, -24.0, -62.0]], [[-12.0, 28.0, 25.0, -36.0, 27.0], [28.0, 25.0, 49.0, 25.0, -31.0], [-31.0, -24.0, 
+21.0, 6.0, 21.0], [18.0, 42.0, -11.0, 29.0, 50.0]], [[-12.0, -25.0, 23.0, 42.0, 15.0], [-65.0, -30.0, -40.0, 22.0, -24.0], 
+[-23.0, -52.0, 17.0, 0.0, 47.0], [9.0, 12.0, 13.0, -34.0, -38.0]], [[48.0, 51.0, 12.0, -42.0, 54.0], [-21.0, 39.0, 45.0, 51.0, 
+21.0], [-18.0, -36.0, -30.0, 6.0, 24.0], [75.0, -18.0, -42.0, 63.0, 36.0]]], [[[43.0, -16.0, -41.0, 28.0, -24.0], [-36.0, 
+-15.0, -48.0, -24.0, 65.0], [48.0, 37.0, -51.0, -7.0, -36.0], [1.0, -78.0, -4.0, -10.0, -54.0]], [[12.0, 4.0, -2.0, 0.0, 6.0], 
+[-12.0, 2.0, -2.0, 6.0, 10.0], [2.0, -4.0, -10.0, 0.0, 2.0], [12.0, -12.0, -6.0, 6.0, -4.0]], [[-51.0, -42.0, 6.0, 36.0, 
+-33.0], [10.0, -34.0, -33.0, -29.0, -38.0], [-3.0, 7.0, 40.0, -3.0, 1.0], [-57.0, 36.0, 37.0, -55.0, -24.0]], [[-59.0, -39.0, 
+20.0, 34.0, -21.0], [5.0, -33.0, -26.0, -16.0, -55.0], [-19.0, -13.0, 52.0, -1.0, 19.0], [-50.0, 54.0, 37.0, -54.0, -16.0]], 
+[[7.0, 39.0, 8.0, -50.0, 21.0], [43.0, 37.0, 58.0, 16.0, -5.0], [-13.0, 1.0, 0.0, 5.0, -3.0], [22.0, 18.0, -21.0, 46.0, 
+56.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[-3.0, -7.0, 4.0], [6.0, 3.0, -5.0]], [[3.0, -6.0, -1.0], [-2.0, -5.0, 
--1.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, 6.0, -6.0], [4.0, 7.0, -3.0]], [[1.0, 2.0, 1.0], [2.0, 0.0, 
--7.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, 2.0, -1.0], [1.0, -4.0, -1.0]], [[-5.0, 2.0, 4.0], [-6.0, 3.0, 3.0]]])
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank4_offset2(self):
+      arg0=numpy.array([[[[-5.0, 0.0, 0.0], [-7.0, -3.0, 7.0]], [[-5.0, -2.0, 4.0], [3.0, -2.0, -1.0]], [[0.0, 3.0, 1.0], [4.0, 
+0.0, 3.0]], [[3.0, 7.0, 6.0], [-7.0, 1.0, 6.0]], [[-7.0, 4.0, 5.0], [5.0, -5.0, 7.0]]], [[[3.0, 4.0, 2.0], [-4.0, 6.0, 0.0]], 
+[[6.0, -5.0, -2.0], [-5.0, 6.0, 2.0]], [[-7.0, 0.0, 5.0], [-7.0, 0.0, 6.0]], [[-6.0, -4.0, -1.0], [2.0, 3.0, -1.0]], [[-5.0, 
+-1.0, -3.0], [-7.0, -5.0, -3.0]]], [[[5.0, 6.0, -7.0], [3.0, 4.0, 5.0]], [[6.0, 0.0, -1.0], [7.0, 0.0, 2.0]], [[3.0, 4.0, 3.0], 
+[4.0, 7.0, 6.0]], [[4.0, 0.0, -2.0], [2.0, 6.0, -7.0]], [[5.0, -7.0, 1.0], [6.0, 0.0, 0.0]]], [[[1.0, 3.0, 2.0], [2.0, -7.0, 
+5.0]], [[-2.0, 5.0, -5.0], [4.0, 5.0, 5.0]], [[6.0, -1.0, 4.0], [0.0, 0.0, 2.0]], [[-7.0, 0.0, -4.0], [6.0, -3.0, 2.0]], [[7.0, 
+2.0, -4.0], [-7.0, -4.0, -2.0]]]])
+      arg1=Data(numpy.array([[[[2.0, 0.0, -1.0], [-7.0, 0.0, 4.0]], [[5.0, 6.0, 7.0], [0.0, -2.0, 2.0]], [[-1.0, -3.0, -7.0], 
+[-1.0, 2.0, 1.0]], [[-2.0, 3.0, 7.0], [0.0, -6.0, 1.0]], [[0.0, 7.0, -2.0], [3.0, -7.0, -3.0]]], [[[0.0, 2.0, -7.0], [-4.0, 
+5.0, -3.0]], [[3.0, -5.0, 6.0], [0.0, 6.0, -2.0]], [[6.0, 2.0, 2.0], [6.0, -1.0, 2.0]], [[0.0, 0.0, 7.0], [3.0, 1.0, 0.0]], 
+[[1.0, -2.0, -5.0], [7.0, 0.0, 2.0]]], [[[2.0, -3.0, -6.0], [-2.0, -3.0, 0.0]], [[1.0, -1.0, -2.0], [6.0, 2.0, -2.0]], [[-6.0, 
+0.0, -5.0], [-1.0, 3.0, -2.0]], [[-7.0, -1.0, 1.0], [-2.0, 0.0, -4.0]], [[-5.0, -3.0, 4.0], [0.0, -6.0, 1.0]]], [[[6.0, 0.0, 
+5.0], [3.0, -1.0, -2.0]], [[-6.0, -1.0, 7.0], [-1.0, -5.0, 7.0]], [[7.0, -6.0, -7.0], [5.0, -4.0, -1.0]], [[7.0, 2.0, 7.0], 
+[-4.0, -1.0, -4.0]], [[-3.0, -1.0, -6.0], [-4.0, -4.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, -2.0, 6.0], [7.0, 0.0, -7.0]], [[6.0, 3.0, 2.0], [-5.0, 5.0, -5.0]], [[1.0, 
+1.0, -2.0], [1.0, -1.0, -4.0]], [[0.0, 0.0, 7.0], [-5.0, 6.0, -7.0]], [[4.0, 2.0, 1.0], [-7.0, 4.0, 4.0]]], [[[-2.0, 3.0, 
+-5.0], [-6.0, 6.0, 4.0]], [[0.0, -4.0, 4.0], [0.0, 7.0, -1.0]], [[2.0, -7.0, 4.0], [-7.0, 5.0, 5.0]], [[-6.0, -6.0, 4.0], 
+[-6.0, 3.0, -5.0]], [[6.0, -1.0, 0.0], [3.0, -5.0, -7.0]]], [[[-2.0, 7.0, 5.0], [3.0, 5.0, 1.0]], [[-6.0, 0.0, 0.0], [0.0, 6.0, 
+7.0]], [[5.0, 1.0, 2.0], [0.0, -1.0, -6.0]], [[7.0, -1.0, 5.0], [-1.0, 1.0, 4.0]], [[7.0, 5.0, 7.0], [7.0, 5.0, 4.0]]], [[[0.0, 
+2.0, -7.0], [7.0, 2.0, 7.0]], [[-7.0, -5.0, -3.0], [-3.0, -5.0, 6.0]], [[5.0, -5.0, 0.0], [3.0, 3.0, -1.0]], [[-1.0, -3.0, 
+-5.0], [0.0, 3.0, 7.0]], [[3.0, 5.0, -2.0], [4.0, 0.0, -4.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[9.0, 34.0], [-85.0, -7.0]])+(1.-msk_ref)*numpy.array([[-16.0, -25.0], [5.0, -37.0]])
+      ref=Data(numpy.array([[[[67.0, -5.0, 13.0, 35.0, -21.0], [-8.0, -47.0, -55.0, -24.0, -40.0], [13.0, -67.0, 14.0, 21.0, 
+50.0], [-62.0, 101.0, -65.0, -32.0, 55.0]], [[-39.0, -7.0, -25.0, 43.0, 4.0], [-51.0, 9.0, -8.0, 35.0, -2.0], [-28.0, 5.0, 3.0, 
+39.0, 58.0], [3.0, 60.0, -27.0, -17.0, -11.0]], [[-17.0, 31.0, -17.0, 19.0, 22.0], [-26.0, -15.0, 38.0, 19.0, 23.0], [-23.0, 
+13.0, -15.0, -22.0, -2.0], [11.0, 21.0, -8.0, -15.0, -25.0]], [[73.0, 109.0, -51.0, 57.0, -9.0], [-13.0, 4.0, 13.0, 22.0, 
+-78.0], [-40.0, -68.0, -50.0, -32.0, -12.0], [14.0, 61.0, -108.0, 80.0, -28.0]], [[-26.0, 48.0, -48.0, 98.0, 47.0], [-93.0, 
+-55.0, 25.0, 45.0, 9.0], [-51.0, -15.0, -17.0, 12.0, 80.0], [-11.0, 142.0, -70.0, -49.0, -13.0]]], [[[32.0, 41.0, -13.0, -16.0, 
+-30.0], [40.0, 37.0, 0.0, 8.0, -43.0], [-28.0, -17.0, -6.0, -15.0, -55.0], [10.0, -34.0, -61.0, 53.0, -33.0]], [[57.0, -22.0, 
+42.0, -75.0, -94.0], [48.0, 63.0, -10.0, -23.0, -5.0], [31.0, -7.0, -7.0, -37.0, -57.0], [1.0, -56.0, 35.0, 24.0, -5.0]], 
+[[54.0, 12.0, -15.0, 55.0, -49.0], [-25.0, -3.0, -62.0, 14.0, -69.0], [-30.0, -71.0, 12.0, 44.0, 61.0], [-50.0, 126.0, -125.0, 
+-10.0, 19.0]], [[-29.0, -69.0, 28.0, -26.0, -38.0], [9.0, 16.0, -39.0, 2.0, 19.0], [-7.0, 20.0, 50.0, 45.0, 19.0], [-36.0, 9.0, 
+-12.0, -64.0, 8.0]], [[30.0, -48.0, 23.0, 13.0, 22.0], [31.0, -52.0, -81.0, -47.0, -43.0], [40.0, -44.0, 43.0, 59.0, 43.0], 
+[-55.0, 21.0, -20.0, -13.0, 82.0]]], [[[16.0, 14.0, 36.0, -60.0, 22.0], [54.0, -43.0, 52.0, -36.0, 59.0], [16.0, 29.0, 4.0, 
+-74.0, -90.0], [-10.0, -73.0, 42.0, -38.0, -7.0]], [[-28.0, 27.0, -4.0, -17.0, 17.0], [-27.0, 8.0, 80.0, 14.0, 64.0], [4.0, 
+46.0, -42.0, -65.0, -32.0], [48.0, -36.0, 82.0, -1.0, -40.0]], [[-1.0, 58.0, -20.0, -9.0, -33.0], [-12.0, 37.0, 61.0, 40.0, 
+20.0], [-53.0, 19.0, -28.0, -54.0, -51.0], [26.0, 2.0, -38.0, 3.0, -75.0]], [[-32.0, -20.0, 13.0, -65.0, -11.0], [57.0, 50.0, 
+12.0, -2.0, 14.0], [-2.0, 46.0, 16.0, -6.0, -71.0], [28.0, -119.0, 35.0, 28.0, -32.0]], [[-33.0, -10.0, 3.0, -24.0, -33.0], 
+[-45.0, 56.0, 54.0, 25.0, 56.0], [13.0, 46.0, -41.0, -39.0, 0.0], [53.0, -22.0, 100.0, 4.0, -38.0]]], [[[6.0, 61.0, -35.0, 
+68.0, 57.0], [-66.0, -52.0, 45.0, 13.0, 9.0], [-2.0, -18.0, -49.0, -32.0, 41.0], [19.0, 73.0, 8.0, 6.0, 2.0]], [[-7.0, -15.0, 
+33.0, -41.0, 7.0], [39.0, -41.0, 17.0, -18.0, 51.0], [-12.0, 27.0, 38.0, -24.0, -50.0], [-40.0, -22.0, -14.0, -80.0, -5.0]], 
+[[16.0, 56.0, -29.0, 15.0, -21.0], [-36.0, 43.0, 46.0, 28.0, -8.0], [-9.0, -5.0, -60.0, -45.0, -9.0], [52.0, 7.0, 18.0, 60.0, 
+-41.0]], [[-44.0, -53.0, 25.0, 6.0, 41.0], [-17.0, -67.0, -7.0, -13.0, 59.0], [7.0, 27.0, 43.0, 25.0, 39.0], [-45.0, 37.0, 
+19.0, -106.0, 33.0]], [[59.0, 23.0, 12.0, -14.0, 35.0], [46.0, -33.0, -4.0, -53.0, -30.0], [58.0, -33.0, -23.0, -33.0, -35.0], 
+[9.0, -59.0, 48.0, 65.0, 45.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-88.0, -45.0, -37.0, -32.0, 45.0], [62.0, -28.0, 59.0, 28.0, -85.0], [-19.0, 61.0, 
+-64.0, -3.0, -71.0], [-6.0, 113.0, -62.0, 45.0, -71.0]], [[66.0, -48.0, -6.0, 8.0, -53.0], [-50.0, 11.0, -16.0, 39.0, -2.0], 
+[14.0, 11.0, -11.0, -22.0, -10.0], [-22.0, 28.0, -11.0, -22.0, -17.0]], [[7.0, -24.0, -7.0, -34.0, -9.0], [-8.0, -11.0, -30.0, 
+-53.0, -12.0], [41.0, 21.0, -13.0, 10.0, 62.0], [48.0, -12.0, -6.0, 7.0, 17.0]], [[-75.0, 61.0, -34.0, 41.0, 109.0], [57.0, 
+-3.0, 65.0, -21.0, -57.0], [63.0, 30.0, -3.0, 76.0, 78.0], [-33.0, -22.0, -44.0, -9.0, -20.0]], [[22.0, -105.0, -31.0, -69.0, 
+-42.0], [-31.0, -38.0, -47.0, -42.0, -55.0], [64.0, 61.0, -58.0, -10.0, 44.0], [47.0, 66.0, -62.0, 4.0, -19.0]]], [[[-30.0, 
+84.0, -7.0, 70.0, 74.0], [56.0, 34.0, 44.0, 8.0, -28.0], [50.0, 18.0, 17.0, 37.0, 57.0], [-22.0, -65.0, 1.0, -7.0, 9.0]], 
+[[-63.0, 62.0, -14.0, 33.0, 79.0], [57.0, 52.0, 114.0, 24.0, -18.0], [-40.0, 14.0, 3.0, 56.0, 6.0], [-5.0, -14.0, 56.0, 51.0, 
+-31.0]], [[-47.0, -27.0, -48.0, 28.0, 50.0], [55.0, 14.0, 85.0, 74.0, -105.0], [24.0, 84.0, -61.0, 7.0, -39.0], [-42.0, 91.0, 
+-62.0, 24.0, -83.0]], [[35.0, -40.0, -5.0, 8.0, -39.0], [7.0, 34.0, 8.0, 58.0, -34.0], [-1.0, 47.0, -33.0, -46.0, -44.0], 
+[12.0, 38.0, 6.0, 25.0, -24.0]], [[-34.0, -14.0, 10.0, 5.0, -8.0], [22.0, -40.0, -6.0, 66.0, -4.0], [-61.0, -21.0, -9.0, -59.0, 
+-147.0], [-61.0, 77.0, -53.0, -13.0, -30.0]]], [[[-78.0, 14.0, 4.0, -75.0, 40.0], [69.0, -29.0, -36.0, -125.0, -22.0], [31.0, 
+29.0, -17.0, 15.0, 77.0], [125.0, -43.0, 11.0, 59.0, 51.0]], [[17.0, -11.0, 7.0, -56.0, -18.0], [-41.0, -6.0, -31.0, -92.0, 
+43.0], [6.0, -22.0, 16.0, 38.0, 92.0], [70.0, -48.0, 49.0, 13.0, 40.0]], [[-10.0, 21.0, -26.0, 1.0, 47.0], [33.0, 39.0, 27.0, 
+-63.0, -51.0], [90.0, 66.0, -18.0, 59.0, 149.0], [71.0, -61.0, 22.0, 33.0, 15.0]], [[43.0, 75.0, 32.0, 61.0, -4.0], [-2.0, 
+41.0, -19.0, 9.0, 49.0], [11.0, -37.0, 52.0, -6.0, 30.0], [-9.0, -100.0, 51.0, -25.0, 52.0]], [[52.0, -19.0, 2.0, -23.0, 
+-35.0], [-72.0, 32.0, 21.0, -20.0, 55.0], [-36.0, -30.0, 20.0, 41.0, 49.0], [21.0, -21.0, 78.0, 11.0, 2.0]]], [[[-17.0, -51.0, 
+-11.0, -73.0, -10.0], [-37.0, -58.0, -35.0, -74.0, 9.0], [5.0, -13.0, -11.0, 25.0, 35.0], [27.0, 31.0, -30.0, -6.0, 2.0]], 
+[[-43.0, -27.0, -8.0, -60.0, 9.0], [70.0, -10.0, -37.0, -72.0, -65.0], [56.0, 77.0, -50.0, -23.0, 49.0], [118.0, -3.0, -13.0, 
+62.0, 25.0]], [[0.0, 31.0, -11.0, 14.0, 34.0], [-27.0, 18.0, 45.0, -24.0, 23.0], [3.0, -22.0, 25.0, 71.0, 73.0], [-16.0, -37.0, 
+33.0, -9.0, -3.0]], [[18.0, -105.0, 2.0, -90.0, -78.0], [-12.0, -39.0, -77.0, -29.0, -23.0], [-1.0, 38.0, -52.0, -70.0, -42.0], 
+[78.0, 70.0, -28.0, 32.0, 3.0]], [[-77.0, 65.0, 22.0, -3.0, 53.0], [22.0, -50.0, 3.0, -30.0, 53.0], [-63.0, -80.0, 45.0, 22.0, 
+-46.0], [-39.0, -18.0, -6.0, -19.0, 19.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank4_offset3(self):
-      arg0=Data(numpy.array([[[[0.0, 5.0, -3.0], [-4.0, 7.0, 4.0], [0.0, 5.0, 7.0], [-7.0, 0.0, -4.0]], [[-4.0, -6.0, -5.0], 
-[5.0, 3.0, -6.0], [0.0, 7.0, -3.0], [-1.0, 7.0, -7.0]]], [[[5.0, 5.0, -5.0], [-1.0, 7.0, -5.0], [-7.0, 7.0, -7.0], [3.0, -6.0, 
-7.0]], [[1.0, -7.0, -5.0], [5.0, 5.0, -6.0], [0.0, 5.0, 7.0], [-6.0, 6.0, 4.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[2.0, -4.0, 2.0], [6.0, -2.0, 4.0], [6.0, -6.0, -6.0], [-5.0, -1.0, 2.0]], [[6.0, 5.0, 
--6.0], [-6.0, 2.0, 4.0], [2.0, 4.0, 0.0], [3.0, 1.0, 2.0]]], [[[1.0, 1.0, 6.0], [-4.0, 4.0, 1.0], [-4.0, 6.0, -4.0], [6.0, 
--3.0, -3.0]], [[-4.0, 7.0, 7.0], [0.0, -3.0, 5.0], [-1.0, 7.0, -7.0], [-5.0, 6.0, 3.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 
--3.0, -1.0], [2.0, 7.0, -1.0], [-3.0, 4.0, -2.0], [-5.0, 4.0, 6.0]], [[-7.0, -4.0, -2.0], [4.0, -3.0, -1.0], [1.0, 0.0, -5.0], 
-[-6.0, -3.0, 7.0]]], [[[-4.0, -2.0, 3.0], [4.0, 0.0, 3.0], [0.0, 0.0, 6.0], [-6.0, -4.0, -2.0]], [[-3.0, 2.0, 0.0], [-6.0, 
--1.0, -5.0], [-4.0, -5.0, 5.0], [-1.0, -7.0, 5.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-147.0, 3.0], [-124.0, 51.0]])+(1.-msk_ref)*numpy.array([[72.0, -67.0], [161.0, -142.0]])
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[[-2.0, -3.0], [6.0, 0.0]], [[-7.0, -6.0], [5.0, 6.0]], [[-4.0, -1.0], [-3.0, 4.0]], [[-1.0, -5.0], 
+[-4.0, 0.0]], [[-1.0, 0.0], [7.0, 0.0]], [[3.0, -2.0], [-1.0, -3.0]]])
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-2.0, -3.0], [6.0, 0.0]], [[-7.0, -6.0], [5.0, 6.0]], [[-4.0, -1.0], [-3.0, 4.0]], [[-1.0, -5.0], 
+[-4.0, 0.0]], [[-1.0, 0.0], [7.0, 0.0]], [[3.0, -2.0], [-1.0, -3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[6.0, 9.0], [-18.0, -0.0]], [[21.0, 18.0], [-15.0, -18.0]], [[12.0, 3.0], [9.0, 
+-12.0]], [[3.0, 15.0], [12.0, -0.0]], [[3.0, -0.0], [-21.0, -0.0]], [[-9.0, 6.0], [3.0, 9.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank2_offset0(self):
-      arg0=Data(numpy.array([-5.0, -4.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, 3.0, -2.0, -5.0, -5.0], [5.0, -7.0, 3.0, -1.0, -1.0], [7.0, -7.0, -4.0, -1.0, 3.0], 
-[1.0, 3.0, 4.0, -5.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-3.0, 4.0, -5.0, -5.0, 0.0], [2.0, 4.0, 0.0, 5.0, 3.0], [-7.0, 1.0, 
-5.0, 0.0, 6.0], [-2.0, 0.0, 5.0, 1.0, 7.0]])
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank1_offset1(self):
+      arg0=numpy.array([[[[-7.0, -6.0, 0.0], [5.0, -7.0, 7.0]], [[-5.0, 3.0, 1.0], [-6.0, 0.0, -3.0]]], [[[4.0, 6.0, -1.0], 
+[4.0, 0.0, 0.0]], [[6.0, -6.0, 0.0], [-7.0, -4.0, -5.0]]], [[[0.0, 2.0, 0.0], [0.0, 1.0, -5.0]], [[-7.0, -2.0, -4.0], [-1.0, 
+2.0, -6.0]]], [[[2.0, -7.0, -5.0], [1.0, 7.0, -6.0]], [[0.0, 2.0, -3.0], [-3.0, -5.0, 0.0]]], [[[1.0, 6.0, 4.0], [1.0, 7.0, 
+7.0]], [[3.0, -1.0, 1.0], [0.0, 6.0, 4.0]]], [[[1.0, 4.0, 5.0], [4.0, 0.0, 6.0]], [[-1.0, 6.0, 5.0], [7.0, -1.0, -4.0]]]])
+      arg1=Data(numpy.array([6.0, 5.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 3.0, -3.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-72.0, 44.0], [-8.0, -57.0]], [[47.0, 24.0], [6.0, -97.0]], [[10.0, -30.0], [-80.0, -38.0]], 
+[[-58.0, -1.0], [-11.0, -43.0]], [[64.0, 90.0], [20.0, 58.0]], [[61.0, 66.0], [59.0, 9.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-39.0, -27.0], [-9.0, -9.0]], [[33.0, 12.0], [0.0, -18.0]], [[6.0, 18.0], [-15.0, 
+21.0]], [[0.0, 42.0], [15.0, -24.0]], [[9.0, 3.0], [3.0, 6.0]], [[0.0, -6.0], [0.0, 30.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_array_rank3_taggedData_rank1_offset0(self):
+      arg0=numpy.array([[[3.0, -7.0], [-2.0, 7.0]], [[4.0, 6.0], [-4.0, -1.0]], [[-4.0, -7.0], [0.0, -3.0]], [[5.0, -6.0], 
+[6.0, -4.0]], [[3.0, 2.0], [1.0, 5.0]], [[-1.0, 5.0], [1.0, -5.0]]])
+      arg1=Data(numpy.array([4.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, -6.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[30.0, -15.0, 10.0, 25.0, 25.0], [-25.0, 35.0, -15.0, 5.0, 5.0], [-35.0, 35.0, 20.0, 5.0, 
--15.0], [-5.0, -15.0, -20.0, 25.0, 0.0]], [[24.0, -12.0, 8.0, 20.0, 20.0], [-20.0, 28.0, -12.0, 4.0, 4.0], [-28.0, 28.0, 16.0, 
-4.0, -12.0], [-4.0, -12.0, -16.0, 20.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[15.0, -20.0, 25.0, 25.0, 0.0], [-10.0, -20.0, 0.0, 
--25.0, -15.0], [35.0, -5.0, -25.0, 0.0, -30.0], [10.0, 0.0, -25.0, -5.0, -35.0]], [[12.0, -16.0, 20.0, 20.0, 0.0], [-8.0, 
--16.0, 0.0, -20.0, -12.0], [28.0, -4.0, -20.0, 0.0, -24.0], [8.0, 0.0, -20.0, -4.0, -28.0]]])
+      ref=Data(numpy.array([[[[12.0, 3.0], [-28.0, -7.0]], [[-8.0, -2.0], [28.0, 7.0]]], [[[16.0, 4.0], [24.0, 6.0]], [[-16.0, 
+-4.0], [-4.0, -1.0]]], [[[-16.0, -4.0], [-28.0, -7.0]], [[0.0, 0.0], [-12.0, -3.0]]], [[[20.0, 5.0], [-24.0, -6.0]], [[24.0, 
+6.0], [-16.0, -4.0]]], [[[12.0, 3.0], [8.0, 2.0]], [[4.0, 1.0], [20.0, 5.0]]], [[[-4.0, -1.0], [20.0, 5.0]], [[4.0, 1.0], 
+[-20.0, -5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[15.0, -18.0], [-35.0, 42.0]], [[-10.0, 12.0], [35.0, -42.0]]], [[[20.0, -24.0], 
+[30.0, -36.0]], [[-20.0, 24.0], [-5.0, 6.0]]], [[[-20.0, 24.0], [-35.0, 42.0]], [[0.0, 0.0], [-15.0, 18.0]]], [[[25.0, -30.0], 
+[-30.0, 36.0]], [[30.0, -36.0], [-20.0, 24.0]]], [[[15.0, -18.0], [10.0, -12.0]], [[5.0, -6.0], [25.0, -30.0]]], [[[-5.0, 6.0], 
+[25.0, -30.0]], [[5.0, -6.0], [-25.0, 30.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([[-5.0, -1.0, 5.0], [-1.0, 6.0, -4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, -2.0, -3.0], [-7.0, -4.0, -6.0], [5.0, 0.0, 4.0], [-5.0, 2.0, 2.0], [1.0, -7.0, 4.0]], 
-[[-4.0, 7.0, -1.0], [-4.0, -2.0, 2.0], [-1.0, -5.0, -6.0], [0.0, -3.0, 7.0], [2.0, 3.0, -7.0]], [[0.0, -7.0, -2.0], [2.0, 0.0, 
--7.0], [4.0, 5.0, -4.0], [7.0, 4.0, -2.0], [4.0, -3.0, -2.0]], [[0.0, 1.0, 2.0], [0.0, 1.0, 2.0], [-5.0, 4.0, 4.0], [3.0, 6.0, 
-1.0], [6.0, -7.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -6.0, 4.0], [-7.0, 6.0, -2.0], [-4.0, -6.0, -7.0], [2.0, -2.0, 
-2.0], [-4.0, -6.0, -3.0]], [[-3.0, 0.0, -7.0], [-5.0, 0.0, 5.0], [-5.0, 6.0, 3.0], [-3.0, 3.0, -1.0], [7.0, 4.0, 2.0]], [[-2.0, 
-6.0, -5.0], [6.0, 7.0, -3.0], [-6.0, -1.0, -5.0], [6.0, 6.0, -4.0], [3.0, 1.0, 2.0]], [[7.0, 2.0, 5.0], [-3.0, -3.0, 4.0], 
-[-7.0, 3.0, 0.0], [-2.0, -5.0, -2.0], [0.0, -2.0, 1.0]]])
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank2_offset1(self):
+      arg0=numpy.array([[[[-2.0, 5.0, 5.0], [6.0, 5.0, 6.0]], [[2.0, 2.0, 5.0], [-1.0, 4.0, 1.0]]], [[[0.0, 3.0, -2.0], [-2.0, 
+-4.0, 1.0]], [[4.0, 7.0, -4.0], [-2.0, -3.0, -7.0]]], [[[3.0, 3.0, 3.0], [3.0, 0.0, 6.0]], [[-7.0, 7.0, -4.0], [-6.0, 0.0, 
+6.0]]], [[[-3.0, 1.0, 4.0], [2.0, 1.0, -1.0]], [[2.0, 5.0, 0.0], [3.0, -7.0, 0.0]]], [[[6.0, -2.0, 0.0], [-5.0, -4.0, 4.0]], 
+[[6.0, -7.0, 6.0], [0.0, 0.0, 7.0]]], [[[-1.0, -5.0, -5.0], [1.0, 2.0, 0.0]], [[-7.0, 5.0, -7.0], [6.0, -7.0, -4.0]]]])
+      arg1=Data(numpy.array([[-3.0, -6.0, 0.0], [-5.0, 6.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -3.0, 0.0], [-1.0, 0.0, -4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-23.0, 9.0, -5.0, 33.0, 22.0], [8.0, 32.0, -20.0, 38.0, -48.0], [-3.0, -45.0, -45.0, -49.0, 
--27.0], [9.0, 9.0, 41.0, -16.0, -23.0]], [[-2.0, 7.0, -21.0, 9.0, -59.0], [50.0, -16.0, -5.0, -46.0, 44.0], [-34.0, 26.0, 42.0, 
-25.0, -14.0], [-2.0, -2.0, 13.0, 29.0, -48.0]]])+(1.-msk_ref)*numpy.array([[[21.0, 19.0, -9.0, 2.0, 11.0], [-20.0, 50.0, 34.0, 
-7.0, -29.0], [-21.0, -52.0, 6.0, -56.0, -6.0], [-12.0, 38.0, 32.0, 5.0, 7.0]], [[-53.0, 51.0, -4.0, -22.0, -20.0], [31.0, 
--15.0, 29.0, 25.0, 9.0], [58.0, 48.0, 20.0, 46.0, -5.0], [-15.0, -31.0, 25.0, -20.0, -16.0]]])
+      ref=Data(numpy.array([[[[-24.0, 50.0], [-48.0, 12.0]], [[-18.0, 12.0], [-21.0, 31.0]]], [[[-18.0, 14.0], [30.0, -12.0]], 
+[[-54.0, 14.0], [24.0, -22.0]]], [[[-27.0, 9.0], [-9.0, -3.0]], [[-21.0, 69.0], [18.0, 42.0]]], [[[3.0, 29.0], [-12.0, -6.0]], 
+[[-36.0, 20.0], [33.0, -57.0]]], [[[-6.0, -42.0], [39.0, 9.0]], [[24.0, -60.0], [0.0, 14.0]]], [[[33.0, -35.0], [-15.0, 7.0]], 
+[[-9.0, 51.0], [24.0, -80.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-9.0, -18.0], [-33.0, -30.0]], [[-12.0, -22.0], [-9.0, -3.0]]], [[[-9.0, 8.0], 
+[18.0, -2.0]], [[-33.0, 12.0], [15.0, 30.0]]], [[[-18.0, -15.0], [-9.0, -27.0]], [[0.0, 23.0], [18.0, -18.0]]], [[[6.0, -13.0], 
+[-9.0, 2.0]], [[-21.0, -2.0], [12.0, -3.0]]], [[[-12.0, -6.0], [27.0, -11.0]], [[3.0, -30.0], [0.0, -28.0]]], [[[18.0, 21.0], 
+[-9.0, -1.0]], [[6.0, 35.0], [3.0, 10.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg1.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[-5.0, 6.0, 1.0], [-5.0, 6.0, 5.0]], [[-4.0, 5.0, 3.0], [4.0, -6.0, 0.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -6.0, 5.0], [-4.0, -1.0, 2.0]], [[0.0, 2.0, 5.0], [-3.0, 6.0, -1.0]], [[0.0, 0.0, 
--7.0], [-1.0, -7.0, 2.0]], [[0.0, -6.0, 0.0], [-7.0, -2.0, 6.0]], [[-7.0, -4.0, -5.0], [2.0, 6.0, 0.0]]], [[[-4.0, 4.0, -4.0], 
-[-2.0, -2.0, 0.0]], [[-4.0, -7.0, 0.0], [-3.0, 0.0, 0.0]], [[4.0, -4.0, 7.0], [4.0, 4.0, 5.0]], [[4.0, 7.0, 6.0], [-6.0, 1.0, 
-3.0]], [[1.0, -2.0, 3.0], [-7.0, 2.0, -3.0]]], [[[-5.0, -5.0, -5.0], [5.0, 5.0, 6.0]], [[1.0, -3.0, -3.0], [0.0, -2.0, 0.0]], 
-[[6.0, 6.0, -2.0], [0.0, -4.0, -6.0]], [[4.0, -7.0, 5.0], [3.0, 7.0, -5.0]], [[-7.0, 4.0, -4.0], [-3.0, 2.0, -6.0]]], [[[0.0, 
-5.0, 7.0], [0.0, -3.0, 2.0]], [[2.0, 0.0, -2.0], [-5.0, 0.0, 5.0]], [[3.0, -3.0, 6.0], [0.0, 0.0, 7.0]], [[-1.0, -2.0, -1.0], 
-[0.0, 7.0, -6.0]], [[6.0, -3.0, 2.0], [3.0, -7.0, -7.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, -5.0, 5.0], [6.0, 7.0, 0.0]], 
-[[0.0, -2.0, -2.0], [-4.0, -2.0, -3.0]], [[6.0, 0.0, 1.0], [-7.0, 6.0, -2.0]], [[7.0, -7.0, 6.0], [3.0, 5.0, -7.0]], [[-5.0, 
-0.0, 4.0], [-5.0, -3.0, 6.0]]], [[[6.0, 3.0, 1.0], [7.0, 6.0, 6.0]], [[1.0, 0.0, 5.0], [-3.0, 3.0, -4.0]], [[-2.0, -5.0, 2.0], 
-[-7.0, 5.0, -4.0]], [[0.0, 5.0, -3.0], [4.0, 0.0, 7.0]], [[-2.0, 4.0, -3.0], [0.0, -1.0, -5.0]]], [[[5.0, 5.0, 3.0], [-6.0, 
-1.0, 4.0]], [[6.0, -5.0, 1.0], [-4.0, -1.0, 0.0]], [[2.0, 2.0, -2.0], [-4.0, -2.0, 5.0]], [[0.0, 1.0, 7.0], [-4.0, 4.0, -5.0]], 
-[[-7.0, -7.0, -7.0], [4.0, 7.0, 0.0]]], [[[1.0, 7.0, -1.0], [0.0, 2.0, 1.0]], [[6.0, 2.0, -2.0], [3.0, 0.0, 6.0]], [[3.0, -6.0, 
-1.0], [-4.0, -1.0, 5.0]], [[6.0, -4.0, -5.0], [-3.0, 5.0, 3.0]], [[7.0, 7.0, 0.0], [0.0, 3.0, -2.0]]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[3.0, 63.0, -34.0, 17.0, 32.0], [38.0, -7.0, -8.0, 79.0, 18.0], [25.0, -38.0, -50.0, -55.0, 
-52.0], [29.0, 38.0, 8.0, 4.0, -138.0]], [[-17.0, -23.0, 17.0, -46.0, -35.0], [28.0, -31.0, -23.0, 7.0, -45.0], [-30.0, -16.0, 
-24.0, -66.0, 12.0], [64.0, -34.0, -9.0, -51.0, 21.0]]])+(1.-msk_ref)*numpy.array([[[-13.0, -21.0, 32.0, -91.0, 66.0], [20.0, 
-13.0, 27.0, 42.0, 0.0], [64.0, -45.0, 33.0, 32.0, 8.0], [53.0, -5.0, -11.0, 1.0, 15.0]], [[-28.0, -20.0, -85.0, -63.0, 30.0], 
-[-14.0, -19.0, -69.0, 32.0, 25.0], [-16.0, -56.0, -8.0, -14.0, -54.0], [16.0, -8.0, -49.0, -101.0, -11.0]]])
+   def test_generalTensorTransposedProduct_array_rank4_taggedData_rank0_offset0(self):
+      arg0=numpy.array([[[[-5.0, -4.0, 1.0, 1.0], [-7.0, -6.0, -3.0, 4.0], [6.0, 7.0, -3.0, 5.0]], [[6.0, 7.0, -4.0, -1.0], 
+[0.0, -6.0, 6.0, 1.0], [4.0, -5.0, 3.0, -4.0]]], [[[6.0, 2.0, -5.0, -7.0], [4.0, 3.0, -7.0, -4.0], [-3.0, 5.0, 1.0, -1.0]], 
+[[7.0, 3.0, 0.0, -3.0], [-3.0, -7.0, 4.0, 1.0], [-3.0, 1.0, -3.0, 7.0]]], [[[4.0, 4.0, 1.0, -5.0], [-2.0, 0.0, -3.0, 0.0], 
+[2.0, 1.0, 0.0, -4.0]], [[-4.0, 1.0, 6.0, 0.0], [0.0, -5.0, -4.0, -7.0], [-7.0, -6.0, 4.0, -3.0]]]])
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,-1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[15.0, 12.0, -3.0, -3.0], [21.0, 18.0, 9.0, -12.0], [-18.0, -21.0, 9.0, -15.0]], [[-18.0, -21.0, 
+12.0, 3.0], [-0.0, 18.0, -18.0, -3.0], [-12.0, 15.0, -9.0, 12.0]]], [[[-18.0, -6.0, 15.0, 21.0], [-12.0, -9.0, 21.0, 12.0], 
+[9.0, -15.0, -3.0, 3.0]], [[-21.0, -9.0, -0.0, 9.0], [9.0, 21.0, -12.0, -3.0], [9.0, -3.0, 9.0, -21.0]]], [[[-12.0, -12.0, 
+-3.0, 15.0], [6.0, -0.0, 9.0, -0.0], [-6.0, -3.0, -0.0, 12.0]], [[12.0, -3.0, -18.0, -0.0], [-0.0, 15.0, 12.0, 21.0], [21.0, 
+18.0, -12.0, 9.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[5.0, 4.0, -1.0, -1.0], [7.0, 6.0, 3.0, -4.0], [-6.0, -7.0, 3.0, -5.0]], [[-6.0, 
+-7.0, 4.0, 1.0], [-0.0, 6.0, -6.0, -1.0], [-4.0, 5.0, -3.0, 4.0]]], [[[-6.0, -2.0, 5.0, 7.0], [-4.0, -3.0, 7.0, 4.0], [3.0, 
+-5.0, -1.0, 1.0]], [[-7.0, -3.0, -0.0, 3.0], [3.0, 7.0, -4.0, -1.0], [3.0, -1.0, 3.0, -7.0]]], [[[-4.0, -4.0, -1.0, 5.0], [2.0, 
+-0.0, 3.0, -0.0], [-2.0, -1.0, -0.0, 4.0]], [[4.0, -1.0, -6.0, -0.0], [-0.0, 5.0, 4.0, 7.0], [7.0, 6.0, -4.0, 3.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg1=Data(4.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(0.0,self.functionspace)
+      ref.setTaggedValue(1,0.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-1.0, -3.0, 5.0]),self.functionspace)
+      arg1=Data(numpy.array([5.0, 0.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, -6.0, -4.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-35.0,self.functionspace)
+      ref.setTaggedValue(1,-7.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")     
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[3.0, -7.0, -1.0], [-4.0, 2.0, 3.0]]),self.functionspace)
+      arg1=Data(numpy.array([[6.0, -3.0, 0.0], [-4.0, -2.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, -4.0, 3.0], [-3.0, -7.0, -1.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(45.0,self.functionspace)
+      ref.setTaggedValue(1,14.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank1_expandedData_rank3_offset0(self):
-      arg0=Data(numpy.array([-5.0, 1.0]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-2.0, 0.0], [1.0, 4.0]], [[-3.0, -1.0], [-7.0, 3.0]], [[-2.0, 6.0], [7.0, -3.0]], [[0.0, 
--2.0], [0.0, -6.0]], [[2.0, -3.0], [5.0, 0.0]], [[1.0, 0.0], [1.0, 2.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, 2.0], [1.0, 
--5.0]], [[6.0, 7.0], [7.0, 3.0]], [[2.0, -2.0], [3.0, -5.0]], [[-2.0, 0.0], [-1.0, -5.0]], [[-7.0, -4.0], [-5.0, 3.0]], [[0.0, 
-4.0], [2.0, 2.0]]])
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-4.0, -7.0, -3.0], [2.0, 0.0, -5.0], [-7.0, -5.0, -3.0], [-6.0, 6.0, 2.0]], [[7.0, 4.0, 7.0], 
+[5.0, -6.0, 3.0], [1.0, 6.0, -4.0], [-2.0, 1.0, 2.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, -4.0, -7.0], [2.0, 1.0, -5.0], [5.0, -6.0, -4.0], [0.0, 6.0, 6.0]], [[2.0, 0.0, 1.0], 
+[6.0, 7.0, 3.0], [2.0, -1.0, 7.0], [-6.0, -4.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, 1.0, -7.0], [5.0, 4.0, -7.0], [4.0, -4.0, 6.0], [-4.0, 4.0, 3.0]], [[-2.0, 
+-6.0, -3.0], [-2.0, -7.0, -3.0], [0.0, 0.0, 4.0], [0.0, -7.0, 5.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(143.0,self.functionspace)
+      ref.setTaggedValue(1,58.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-2.0, -6.0], [-6.0, 5.0], [-3.0, 4.0]], [[3.0, -4.0], [-1.0, -4.0], [5.0, 7.0]]], [[[-5.0, 
+6.0], [6.0, -7.0], [4.0, 5.0]], [[2.0, -5.0], [-1.0, 6.0], [3.0, 1.0]]], [[[2.0, -7.0], [-4.0, 0.0], [-7.0, -7.0]], [[7.0, 
+-7.0], [7.0, -2.0], [1.0, 3.0]]], [[[4.0, -6.0], [7.0, -6.0], [6.0, -7.0]], [[7.0, 5.0], [6.0, 1.0], [1.0, 
+0.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[2.0, -2.0], [4.0, -7.0], [5.0, 0.0]], [[7.0, 1.0], [-3.0, -7.0], [3.0, -7.0]]], [[[-2.0, -2.0], 
+[-2.0, -4.0], [0.0, -1.0]], [[3.0, 3.0], [0.0, 4.0], [5.0, 0.0]]], [[[5.0, 7.0], [-5.0, -6.0], [1.0, -3.0]], [[6.0, -3.0], 
+[2.0, -1.0], [-5.0, 4.0]]], [[[2.0, -1.0], [-1.0, 5.0], [-6.0, -2.0]], [[4.0, -3.0], [1.0, -4.0], [0.0, 
+-4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, -5.0], [3.0, 3.0], [1.0, 2.0]], [[6.0, -1.0], [0.0, -2.0], [7.0, 0.0]]], 
+[[[-6.0, -5.0], [-5.0, 3.0], [0.0, 7.0]], [[-6.0, -2.0], [3.0, 7.0], [4.0, 6.0]]], [[[-1.0, -2.0], [7.0, -5.0], [-5.0, 0.0]], 
+[[4.0, 3.0], [1.0, 0.0], [-2.0, 7.0]]], [[[6.0, -7.0], [4.0, -4.0], [6.0, -7.0]], [[5.0, -5.0], [2.0, -3.0], [7.0, 2.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=Data(38.0,self.functionspace)
+      ref.setTaggedValue(1,407.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      arg1=Data(numpy.array([-3.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-2.0, 4.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 0.0], [-5.0, -20.0]], [[15.0, 5.0], [35.0, -15.0]], [[10.0, -30.0], [-35.0, 15.0]], 
-[[0.0, 10.0], [0.0, 30.0]], [[-10.0, 15.0], [-25.0, 0.0]], [[-5.0, 0.0], [-5.0, -10.0]]], [[[-2.0, 0.0], [1.0, 4.0]], [[-3.0, 
--1.0], [-7.0, 3.0]], [[-2.0, 6.0], [7.0, -3.0]], [[0.0, -2.0], [0.0, -6.0]], [[2.0, -3.0], [5.0, 0.0]], [[1.0, 0.0], [1.0, 
-2.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, -10.0], [-5.0, 25.0]], [[-30.0, -35.0], [-35.0, -15.0]], [[-10.0, 10.0], [-15.0, 
-25.0]], [[10.0, 0.0], [5.0, 25.0]], [[35.0, 20.0], [25.0, -15.0]], [[0.0, -20.0], [-10.0, -10.0]]], [[[1.0, 2.0], [1.0, -5.0]], 
-[[6.0, 7.0], [7.0, 3.0]], [[2.0, -2.0], [3.0, -5.0]], [[-2.0, 0.0], [-1.0, -5.0]], [[-7.0, -4.0], [-5.0, 3.0]], [[0.0, 4.0], 
-[2.0, 2.0]]]])
+      ref=Data(numpy.array([-12.0, -4.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-8.0, 16.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank4_offset1(self):
-      arg0=Data(numpy.array([[5.0, -5.0, -4.0], [2.0, 1.0, 0.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-1.0, 7.0, -5.0], [-3.0, 1.0, 1.0]], [[-1.0, 1.0, 7.0], [2.0, 4.0, -1.0]]], [[[0.0, -7.0, 
--6.0], [-1.0, 1.0, 6.0]], [[-7.0, 6.0, 4.0], [3.0, -4.0, -1.0]]], [[[-4.0, -1.0, 6.0], [-4.0, -2.0, 4.0]], [[7.0, -6.0, -6.0], 
-[0.0, -4.0, -1.0]]], [[[-5.0, 4.0, 4.0], [0.0, 5.0, -3.0]], [[-1.0, -7.0, 7.0], [-6.0, 3.0, 4.0]]], [[[-6.0, 4.0, -3.0], [-5.0, 
--6.0, 0.0]], [[3.0, 0.0, 4.0], [-2.0, 5.0, 6.0]]], [[[-3.0, -3.0, 2.0], [0.0, 0.0, -6.0]], [[7.0, -1.0, -4.0], [-6.0, 5.0, 
-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-4.0, -7.0, 1.0], [2.0, 6.0, -3.0]], [[4.0, 5.0, -6.0], [0.0, 1.0, -3.0]]], [[[-3.0, 
--7.0, 2.0], [-3.0, -6.0, 6.0]], [[1.0, 1.0, 5.0], [7.0, -6.0, 1.0]]], [[[7.0, 1.0, -6.0], [4.0, 5.0, -3.0]], [[1.0, -4.0, 1.0], 
-[-2.0, 5.0, 5.0]]], [[[-5.0, 3.0, -5.0], [0.0, 7.0, 3.0]], [[7.0, 2.0, -7.0], [-2.0, 2.0, 3.0]]], [[[1.0, -6.0, -3.0], [-1.0, 
--7.0, 1.0]], [[-6.0, 5.0, 0.0], [7.0, 1.0, 5.0]]], [[[-6.0, 1.0, -6.0], [-3.0, 0.0, 1.0]], [[-4.0, 2.0, -3.0], [-2.0, 0.0, 
-4.0]]]])
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-4.0, 3.0, 1.0]),self.functionspace)
+      arg1=Data(numpy.array([[3.0, -2.0, -4.0], [5.0, 2.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, 0.0, 5.0], [-4.0, 4.0, 3.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-20.0, -24.0], [-38.0, -6.0]], [[59.0, -34.0], [-81.0, 39.0]], [[-39.0, -26.0], [89.0, 
-24.0]], [[-61.0, -13.0], [2.0, -61.0]], [[-38.0, 5.0], [-1.0, -59.0]], [[-8.0, 24.0], [56.0, -83.0]]], [[[5.0, -5.0], [-1.0, 
-8.0]], [[-7.0, -1.0], [-8.0, 2.0]], [[-9.0, -10.0], [8.0, -4.0]], [[-6.0, 5.0], [-9.0, -9.0]], [[-8.0, -16.0], [6.0, 1.0]], 
-[[-9.0, 0.0], [13.0, -7.0]]]])+(1.-msk_ref)*numpy.array([[[[11.0, -8.0], [19.0, 7.0]], [[12.0, -9.0], [-20.0, 61.0]], [[54.0, 
-7.0], [21.0, -55.0]], [[-20.0, -47.0], [53.0, -32.0]], [[47.0, 26.0], [-55.0, 10.0]], [[-11.0, -19.0], [-18.0, -26.0]]], 
-[[[-15.0, 10.0], [13.0, 1.0]], [[-13.0, -12.0], [3.0, 8.0]], [[15.0, 13.0], [-2.0, 1.0]], [[-7.0, 7.0], [16.0, -2.0]], [[-4.0, 
--9.0], [-7.0, 15.0]], [[-11.0, -6.0], [-6.0, -4.0]]]])
+      ref=Data(numpy.array([-22.0, -7.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([29.0, 31.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[0.0, 5.0, -1.0, -1.0, -2.0], [7.0, -7.0, 3.0, -4.0, -5.0], [5.0, -6.0, 1.0, 7.0, -1.0], [7.0, 
--1.0, -5.0, -2.0, -6.0]]),self.functionspace)
-      arg1=1.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[0.0, 5.0, -1.0, -1.0, -2.0], [7.0, -7.0, 3.0, -4.0, -5.0], [5.0, -6.0, 1.0, 7.0, -1.0], [7.0, 
--1.0, -5.0, -2.0, -6.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[7.0, -4.0, -1.0], [-6.0, 0.0, -2.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, -6.0, -2.0], [-1.0, -6.0, 1.0]], [[0.0, 6.0, -1.0], [-4.0, -7.0, 
+5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -7.0, 0.0], [3.0, 4.0, 4.0]], [[1.0, -7.0, 5.0], [-6.0, -7.0, 4.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-12.0, -9.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-40.0, 58.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[1.0, -2.0, 5.0, 7.0, 7.0], [2.0, 2.0, 0.0, -2.0, -7.0], [-2.0, -7.0, 3.0, 4.0, -7.0], [0.0, -3.0, 
-2.0, -3.0, -7.0]]),self.functionspace)
-      arg1=numpy.array(-2.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[-2.0, 4.0, -10.0, -14.0, -14.0], [-4.0, -4.0, -0.0, 4.0, 14.0], [4.0, 14.0, -6.0, -8.0, 14.0], 
-[-0.0, 6.0, -4.0, 6.0, 14.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-6.0, -1.0, 7.0], [2.0, -3.0, 4.0], [-1.0, 6.0, 5.0], [7.0, 3.0, 1.0]], [[5.0, -3.0, -2.0], 
+[0.0, -5.0, 0.0], [-3.0, -3.0, -3.0], [2.0, 2.0, 6.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, -2.0, 4.0], [2.0, 2.0, 7.0], [1.0, 7.0, 7.0], [-1.0, -7.0, 0.0]], [[1.0, -2.0, -1.0], 
+[4.0, 7.0, -2.0], [-1.0, 6.0, 6.0], [1.0, 7.0, -7.0]]], [[[0.0, -6.0, 1.0], [7.0, 1.0, 0.0], [-6.0, 4.0, -5.0], [1.0, -4.0, 
+6.0]], [[0.0, 1.0, 2.0], [0.0, 2.0, -1.0], [1.0, 7.0, 6.0], [3.0, -6.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, -3.0, 2.0], [-4.0, 6.0, -1.0], [3.0, -5.0, -7.0], [3.0, -2.0, 5.0]], [[-4.0, 
+1.0, 1.0], [4.0, 0.0, 2.0], [-5.0, 6.0, -4.0], [-6.0, 5.0, 7.0]]], [[[-4.0, 1.0, 6.0], [6.0, -4.0, 3.0], [2.0, -4.0, 3.0], 
+[-5.0, 6.0, -4.0]], [[0.0, 4.0, 0.0], [6.0, -6.0, 0.0], [5.0, 0.0, -5.0], [7.0, 0.0, 1.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([23.0, -53.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-67.0, 107.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[[-3.0, -3.0, 7.0], [-3.0, 0.0, 3.0], [4.0, 5.0, 7.0], [3.0, 3.0, 0.0], [2.0, 5.0, 3.0]], [[-3.0, 
-2.0, -5.0], [-4.0, 1.0, 0.0], [1.0, -5.0, -5.0], [1.0, -7.0, 2.0], [4.0, 7.0, 3.0]], [[7.0, 0.0, 7.0], [-1.0, -3.0, -5.0], 
-[-3.0, -6.0, 7.0], [-4.0, 7.0, -7.0], [2.0, 7.0, 4.0]], [[-4.0, 0.0, -3.0], [7.0, 6.0, -2.0], [7.0, -4.0, 0.0], [2.0, 3.0, 
--1.0], [3.0, -2.0, -2.0]]]),self.functionspace)
-      arg1=numpy.array([-2.0, 6.0, -3.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[-33.0, -3.0, 1.0, 12.0, 17.0], [33.0, 14.0, -17.0, -50.0, 25.0], [-35.0, -1.0, -51.0, 71.0, 26.0], 
-[17.0, 28.0, -38.0, 17.0, -12.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(7.0,self.functionspace)
+      arg1=Data(numpy.array([[0.0, -5.0, 0.0, 2.0, -5.0], [-6.0, 2.0, 6.0, -2.0, -3.0], [-3.0, -7.0, 2.0, 0.0, 2.0], [7.0, 0.0, 
+1.0, -2.0, 3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, 7.0, 3.0, -5.0, -3.0], [4.0, -1.0, -1.0, -2.0, 6.0], [4.0, 7.0, 5.0, 3.0, -4.0], 
+[6.0, -2.0, -1.0, -1.0, -5.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[0.0, -35.0, 0.0, 14.0, -35.0], [-42.0, 14.0, 42.0, -14.0, -21.0], [-21.0, -49.0, 14.0, 0.0, 14.0], 
+[49.0, 0.0, 7.0, -14.0, 21.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[42.0, 49.0, 21.0, -35.0, -21.0], [28.0, -7.0, -7.0, -14.0, 42.0], [28.0, 49.0, 35.0, 
+21.0, -28.0], [42.0, -14.0, -7.0, -7.0, -35.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[4.0, 2.0, -5.0], [0.0, 5.0, 0.0]], [[-1.0, 3.0, 7.0], [-1.0, 6.0, 2.0]], [[5.0, -2.0, 6.0], 
-[3.0, 3.0, -5.0]], [[-7.0, -1.0, 4.0], [6.0, 0.0, -6.0]], [[-5.0, -5.0, -2.0], [4.0, -2.0, 1.0]]], [[[-3.0, -3.0, -1.0], [-5.0, 
--3.0, 6.0]], [[-4.0, -2.0, 0.0], [5.0, -6.0, 0.0]], [[6.0, -7.0, -5.0], [0.0, -5.0, -7.0]], [[-7.0, 4.0, 2.0], [2.0, -5.0, 
--1.0]], [[0.0, 5.0, -5.0], [-6.0, -3.0, -3.0]]], [[[0.0, 0.0, 5.0], [0.0, 0.0, 0.0]], [[-7.0, 2.0, -4.0], [5.0, 6.0, -6.0]], 
-[[4.0, 6.0, -1.0], [0.0, -6.0, -7.0]], [[-2.0, 3.0, -4.0], [5.0, 4.0, -4.0]], [[-1.0, 0.0, -7.0], [-5.0, 2.0, -5.0]]], [[[4.0, 
-4.0, -5.0], [1.0, -2.0, -7.0]], [[6.0, 5.0, -4.0], [7.0, 7.0, -2.0]], [[7.0, 0.0, -7.0], [-5.0, -7.0, 0.0]], [[-3.0, 4.0, 0.0], 
-[0.0, 5.0, 2.0]], [[7.0, -4.0, -1.0], [-2.0, -1.0, -1.0]]]]),self.functionspace)
-      arg1=numpy.array([[-7.0, -5.0, -6.0], [-6.0, 3.0, -2.0]])
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([2.0, 7.0, -2.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, 4.0, -2.0], [6.0, 7.0, 0.0], [1.0, 5.0, -6.0], [-4.0, 6.0, -7.0], [-7.0, 5.0, -5.0]], 
+[[-1.0, -4.0, 3.0], [7.0, 2.0, -3.0], [-1.0, -2.0, 2.0], [-7.0, 3.0, 0.0], [-4.0, -7.0, 5.0]], [[-7.0, 0.0, 6.0], [1.0, -4.0, 
+3.0], [-5.0, 1.0, 1.0], [4.0, 0.0, 3.0], [1.0, 4.0, 2.0]], [[4.0, 0.0, -6.0], [3.0, 1.0, -5.0], [7.0, -3.0, 2.0], [0.0, 0.0, 
+4.0], [5.0, 4.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, -7.0, -4.0], [-7.0, 0.0, 5.0], [6.0, 1.0, 2.0], [3.0, 0.0, 2.0], [-4.0, 0.0, 
+-7.0]], [[5.0, -2.0, 7.0], [4.0, -3.0, -7.0], [-4.0, 7.0, 5.0], [3.0, 5.0, -5.0], [-2.0, 2.0, 4.0]], [[1.0, 6.0, 0.0], [-3.0, 
+2.0, -2.0], [4.0, -5.0, 5.0], [-4.0, -5.0, -2.0], [7.0, 6.0, -1.0]], [[-2.0, -3.0, -7.0], [1.0, 3.0, -5.0], [4.0, -1.0, 0.0], 
+[0.0, 2.0, -6.0], [1.0, 0.0, -1.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[20.0, 61.0, 49.0, 48.0, 31.0], [-36.0, 34.0, -20.0, 7.0, -67.0], [-26.0, -32.0, -5.0, 2.0, 26.0], 
+[20.0, 23.0, -11.0, -8.0, 48.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-51.0, -24.0, 15.0, 2.0, 6.0], [-18.0, 1.0, 31.0, 51.0, 2.0], [44.0, 12.0, -37.0, 
+-39.0, 58.0], [-11.0, 33.0, 1.0, 26.0, 4.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-3.0, 0.0, 5.0], [-1.0, -6.0, -6.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[5.0, 7.0, 1.0], [6.0, 5.0, 6.0]], [[0.0, -3.0, 7.0], [7.0, -5.0, 5.0]], [[-2.0, 0.0, 2.0], 
+[-6.0, -3.0, -4.0]], [[5.0, -2.0, 6.0], [-7.0, 6.0, 7.0]], [[5.0, -3.0, 6.0], [6.0, -4.0, 2.0]]], [[[-4.0, 7.0, -6.0], [-3.0, 
+0.0, 0.0]], [[-1.0, 2.0, -6.0], [-1.0, 5.0, 6.0]], [[7.0, 5.0, -6.0], [-1.0, 0.0, 2.0]], [[-5.0, 6.0, -5.0], [-5.0, -2.0, 
+4.0]], [[6.0, -4.0, 2.0], [-4.0, 1.0, 3.0]]], [[[-6.0, 4.0, 3.0], [-6.0, -2.0, 0.0]], [[-2.0, 4.0, -1.0], [-5.0, 7.0, 2.0]], 
+[[4.0, 7.0, -1.0], [-2.0, 0.0, 0.0]], [[-4.0, 3.0, 6.0], [6.0, 7.0, 7.0]], [[-6.0, 3.0, -4.0], [0.0, -4.0, -1.0]]], [[[0.0, 
+-4.0, 3.0], [3.0, -5.0, 4.0]], [[-7.0, 1.0, 3.0], [5.0, 5.0, 3.0]], [[2.0, -5.0, -4.0], [3.0, -7.0, 4.0]], [[7.0, 3.0, 1.0], 
+[2.0, -3.0, 1.0]], [[1.0, -3.0, -7.0], [1.0, -2.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, -3.0, -3.0], [6.0, 5.0, -6.0]], [[-6.0, -5.0, -4.0], [-7.0, 6.0, 3.0]], 
+[[0.0, -5.0, 4.0], [7.0, 7.0, -4.0]], [[-4.0, 1.0, -6.0], [7.0, 3.0, 4.0]], [[-2.0, -2.0, 0.0], [-2.0, 6.0, 3.0]]], [[[3.0, 
+-1.0, 0.0], [-5.0, 1.0, -1.0]], [[6.0, 1.0, 6.0], [-4.0, -7.0, 4.0]], [[3.0, -6.0, 4.0], [0.0, -4.0, 2.0]], [[-2.0, 2.0, 2.0], 
+[7.0, -3.0, 0.0]], [[-7.0, -5.0, -7.0], [-1.0, 0.0, -5.0]]], [[[-2.0, -3.0, 5.0], [4.0, 1.0, 7.0]], [[3.0, 2.0, -3.0], [7.0, 
+-7.0, -6.0]], [[-4.0, 0.0, -5.0], [5.0, -7.0, 5.0]], [[5.0, 2.0, 7.0], [4.0, 0.0, -7.0]], [[-7.0, 0.0, -2.0], [-6.0, 1.0, 
+6.0]]], [[[3.0, 1.0, 0.0], [-7.0, 7.0, -4.0]], [[6.0, -4.0, 7.0], [6.0, -7.0, 3.0]], [[-5.0, 3.0, 2.0], [-2.0, -1.0, -4.0]], 
+[[7.0, 0.0, 5.0], [5.0, -7.0, 4.0]], [[-7.0, -4.0, 2.0], [3.0, -2.0, 7.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[7.0, -30.0, -60.0, 6.0, 40.0], [51.0, -10.0, 22.0, -8.0, 38.0], [-30.0, 63.0, -56.0, 13.0, 95.0], 
-[-16.0, -60.0, 2.0, 12.0, -12.0]]),self.functionspace)
+      ref=Data(numpy.array([[-82.0, 28.0, 64.0, -56.0, 21.0], [-15.0, -92.0, -62.0, -17.0, -28.0], [51.0, -48.0, -15.0, -48.0, 
+28.0], [18.0, -17.0, -11.0, -6.0, -69.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[3.0, -49.0, -5.0, -67.0, -46.0], [-4.0, 34.0, 23.0, 27.0, 17.0], [-21.0, 47.0, -6.0, 
+58.0, -25.0], [-20.0, 35.0, 57.0, 17.0, -2.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank1_offset0(self):
-      arg0=Data(numpy.array([[-1.0, 3.0, -6.0, -5.0, -7.0], [7.0, 0.0, -2.0, -5.0, -1.0], [3.0, 5.0, 7.0, 6.0, 3.0], [2.0, 3.0, 
--3.0, 0.0, 5.0]]),self.functionspace)
-      arg1=numpy.array([0.0, -2.0])
+   def test_generalTensorTransposedProduct_constData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(7.0,self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, 0.0], [-5.0, 1.0]], [[-3.0, -5.0], [-4.0, 4.0]], [[2.0, 5.0], [2.0, -7.0]], [[5.0, 6.0], 
+[3.0, 1.0]], [[-6.0, -1.0], [-5.0, -4.0]], [[-2.0, 4.0], [-6.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, 0.0], [-3.0, 0.0]], [[4.0, -1.0], [4.0, 4.0]], [[-1.0, 7.0], [6.0, 0.0]], 
+[[-2.0, -1.0], [1.0, 0.0]], [[7.0, -2.0], [-3.0, -7.0]], [[4.0, -2.0], [3.0, 3.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, 2.0], [0.0, -6.0], [0.0, 12.0], [0.0, 10.0], [0.0, 14.0]], [[0.0, -14.0], [0.0, 0.0], [0.0, 
-4.0], [0.0, 10.0], [0.0, 2.0]], [[0.0, -6.0], [0.0, -10.0], [0.0, -14.0], [0.0, -12.0], [0.0, -6.0]], [[0.0, -4.0], [0.0, 
--6.0], [0.0, 6.0], [0.0, 0.0], [0.0, -10.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[-28.0, 0.0], [-35.0, 7.0]], [[-21.0, -35.0], [-28.0, 28.0]], [[14.0, 35.0], [14.0, -49.0]], 
+[[35.0, 42.0], [21.0, 7.0]], [[-42.0, -7.0], [-35.0, -28.0]], [[-14.0, 28.0], [-42.0, -35.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-21.0, 0.0], [-21.0, 0.0]], [[28.0, -7.0], [28.0, 28.0]], [[-7.0, 49.0], [42.0, 
+0.0]], [[-14.0, -7.0], [7.0, 0.0]], [[49.0, -14.0], [-21.0, -49.0]], [[28.0, -14.0], [21.0, 21.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[[4.0, -1.0, -4.0], [-5.0, -1.0, 5.0], [5.0, 0.0, 3.0], [7.0, 1.0, 1.0], [-2.0, 0.0, 5.0]], 
-[[-3.0, -2.0, 1.0], [6.0, 2.0, -5.0], [-1.0, -1.0, 2.0], [0.0, 4.0, -4.0], [-6.0, 5.0, 6.0]], [[3.0, -7.0, -4.0], [-7.0, -2.0, 
--5.0], [1.0, -6.0, 0.0], [4.0, 4.0, -7.0], [-3.0, 7.0, -3.0]], [[-2.0, -7.0, 7.0], [-6.0, -4.0, 6.0], [-7.0, -1.0, -3.0], [5.0, 
--3.0, 5.0], [3.0, 2.0, 2.0]]]),self.functionspace)
-      arg1=numpy.array([[7.0, -6.0, -7.0], [-7.0, 0.0, 2.0]])
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([3.0, 6.0, -2.0]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, -3.0, -7.0], [-2.0, 6.0, -5.0]], [[-2.0, 5.0, -5.0], [-5.0, -5.0, 2.0]]], [[[-3.0, -1.0, 
+-3.0], [6.0, 0.0, -4.0]], [[1.0, 4.0, 2.0], [2.0, 4.0, 1.0]]], [[[5.0, 4.0, 4.0], [-6.0, 6.0, -5.0]], [[-4.0, 6.0, -5.0], [3.0, 
+-1.0, 7.0]]], [[[2.0, 0.0, 0.0], [-1.0, -7.0, -2.0]], [[4.0, 2.0, -1.0], [-6.0, 4.0, -1.0]]], [[[-6.0, -2.0, 0.0], [2.0, 7.0, 
+-7.0]], [[3.0, 3.0, 6.0], [5.0, 0.0, 1.0]]], [[[-6.0, -6.0, 6.0], [2.0, 4.0, -6.0]], [[7.0, -1.0, 5.0], [0.0, 7.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-7.0, 6.0, 4.0], [3.0, -2.0, -7.0]], [[1.0, -5.0, -4.0], [2.0, -1.0, -5.0]]], 
+[[[7.0, 0.0, -7.0], [5.0, 3.0, 3.0]], [[3.0, 5.0, -5.0], [-3.0, -3.0, 5.0]]], [[[4.0, -7.0, -3.0], [5.0, 6.0, 0.0]], [[-4.0, 
+-3.0, 7.0], [3.0, -1.0, 7.0]]], [[[-2.0, 6.0, 0.0], [7.0, 2.0, -1.0]], [[-2.0, -2.0, -6.0], [6.0, -4.0, 5.0]]], [[[0.0, -5.0, 
+-4.0], [-7.0, 4.0, 7.0]], [[-6.0, 6.0, 4.0], [-5.0, -5.0, -5.0]]], [[[7.0, -7.0, -5.0], [-2.0, 0.0, -3.0]], [[-2.0, -6.0, 1.0], 
+[3.0, 7.0, -4.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[62.0, -36.0], [-64.0, 45.0], [14.0, -29.0], [36.0, -47.0], [-49.0, 24.0]], [[-16.0, 23.0], [65.0, 
--52.0], [-15.0, 11.0], [4.0, -8.0], [-114.0, 54.0]], [[91.0, -29.0], [-2.0, 39.0], [43.0, -7.0], [53.0, -42.0], [-42.0, 15.0]], 
-[[-21.0, 28.0], [-60.0, 54.0], [-22.0, 43.0], [18.0, -25.0], [-5.0, -17.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[-4.0, 40.0], [34.0, -49.0]], [[-9.0, 26.0], [23.0, 28.0]], [[31.0, 28.0], [34.0, -11.0]], [[6.0, 
+-41.0], [26.0, 8.0]], [[-30.0, 62.0], [15.0, 13.0]], [[-66.0, 42.0], [5.0, 54.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[7.0, 11.0], [-19.0, 10.0]], [[35.0, 27.0], [49.0, -37.0]], [[-24.0, 51.0], [-44.0, 
+-11.0]], [[30.0, 35.0], [-6.0, -16.0]], [[-22.0, -11.0], [10.0, -35.0]], [[-11.0, 0.0], [-44.0, 59.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[1.0, 2.0, 4.0], [0.0, -2.0, -1.0]], [[4.0, -2.0, 0.0], [4.0, -4.0, 4.0]], [[1.0, 1.0, -2.0], 
-[3.0, 6.0, 6.0]], [[5.0, -5.0, -1.0], [4.0, -6.0, 4.0]], [[-7.0, 0.0, 0.0], [-3.0, -6.0, -2.0]]], [[[0.0, 7.0, -3.0], [-1.0, 
--4.0, 0.0]], [[2.0, 1.0, 2.0], [7.0, 0.0, 3.0]], [[3.0, 1.0, 0.0], [-6.0, 0.0, 7.0]], [[-4.0, -7.0, -4.0], [-2.0, 0.0, -7.0]], 
-[[-6.0, -4.0, 5.0], [3.0, 6.0, -5.0]]], [[[-6.0, 5.0, 5.0], [0.0, 7.0, -3.0]], [[7.0, -1.0, 6.0], [7.0, 7.0, 7.0]], [[5.0, 5.0, 
-1.0], [0.0, 1.0, 6.0]], [[7.0, 4.0, 0.0], [2.0, 6.0, 5.0]], [[-1.0, -6.0, -1.0], [6.0, -3.0, -1.0]]], [[[-7.0, -7.0, -5.0], 
-[-2.0, -3.0, 6.0]], [[4.0, 0.0, -6.0], [4.0, 0.0, 0.0]], [[3.0, 0.0, 5.0], [0.0, 0.0, 4.0]], [[6.0, -3.0, 3.0], [-6.0, 0.0, 
--7.0]], [[1.0, -4.0, -1.0], [7.0, -6.0, -3.0]]]]),self.functionspace)
-      arg1=numpy.array([[[6.0, 0.0, -2.0], [6.0, 5.0, 5.0]], [[0.0, 5.0, 6.0], [0.0, 7.0, 6.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-17.0, 14.0], [48.0, -14.0], [88.0, 71.0], [46.0, -49.0], [-100.0, -54.0]], [[-20.0, -11.0], 
-[65.0, 35.0], [17.0, 47.0], [-63.0, -101.0], [-23.0, 22.0]], [[-26.0, 86.0], [142.0, 122.0], [63.0, 74.0], [109.0, 92.0], 
-[12.0, -63.0]], [[-29.0, -50.0], [60.0, -36.0], [28.0, 54.0], [-41.0, -39.0], [5.0, -86.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, -1.0, 1.0, -7.0], [-2.0, -7.0, 0.0, -3.0], [6.0, 3.0, 5.0, 1.0]], [[0.0, 0.0, -5.0, -7.0], 
+[4.0, 0.0, 3.0, -5.0], [1.0, 7.0, -5.0, -2.0]]], [[[5.0, 3.0, 0.0, -4.0], [-5.0, 7.0, -4.0, -5.0], [-1.0, 6.0, -2.0, 6.0]], 
+[[0.0, 3.0, 0.0, -2.0], [1.0, -6.0, 3.0, 6.0], [-5.0, -5.0, -2.0, -4.0]]], [[[-1.0, -2.0, -5.0, -1.0], [-4.0, 0.0, 1.0, 7.0], 
+[-3.0, -5.0, 6.0, -7.0]], [[6.0, -3.0, -7.0, 0.0], [-4.0, 4.0, -5.0, 5.0], [0.0, 1.0, 2.0, -4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 1.0, 0.0, -6.0], [4.0, -6.0, 1.0, 7.0], [-4.0, 2.0, 1.0, 0.0]], [[4.0, -6.0, 
+-6.0, 3.0], [-4.0, 3.0, -2.0, 7.0], [6.0, -3.0, 4.0, 0.0]]], [[[0.0, -1.0, -3.0, 1.0], [6.0, -1.0, -1.0, -3.0], [-6.0, -7.0, 
+1.0, 0.0]], [[5.0, 1.0, -7.0, -7.0], [-3.0, 0.0, 5.0, -1.0], [-7.0, 2.0, 0.0, -5.0]]], [[[1.0, -2.0, 6.0, -5.0], [-4.0, -2.0, 
+-5.0, -6.0], [-3.0, -6.0, -5.0, -3.0]], [[5.0, -6.0, -3.0, -4.0], [-6.0, 3.0, -7.0, -3.0], [5.0, 1.0, -2.0, -1.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, -4.0, 4.0, -28.0], [-8.0, -28.0, 0.0, -12.0], [24.0, 12.0, 20.0, 4.0]], [[0.0, 0.0, -20.0, 
+-28.0], [16.0, 0.0, 12.0, -20.0], [4.0, 28.0, -20.0, -8.0]]], [[[20.0, 12.0, 0.0, -16.0], [-20.0, 28.0, -16.0, -20.0], [-4.0, 
+24.0, -8.0, 24.0]], [[0.0, 12.0, 0.0, -8.0], [4.0, -24.0, 12.0, 24.0], [-20.0, -20.0, -8.0, -16.0]]], [[[-4.0, -8.0, -20.0, 
+-4.0], [-16.0, 0.0, 4.0, 28.0], [-12.0, -20.0, 24.0, -28.0]], [[24.0, -12.0, -28.0, 0.0], [-16.0, 16.0, -20.0, 20.0], [0.0, 
+4.0, 8.0, -16.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 4.0, 0.0, -24.0], [16.0, -24.0, 4.0, 28.0], [-16.0, 8.0, 4.0, 0.0]], [[16.0, 
+-24.0, -24.0, 12.0], [-16.0, 12.0, -8.0, 28.0], [24.0, -12.0, 16.0, 0.0]]], [[[0.0, -4.0, -12.0, 4.0], [24.0, -4.0, -4.0, 
+-12.0], [-24.0, -28.0, 4.0, 0.0]], [[20.0, 4.0, -28.0, -28.0], [-12.0, 0.0, 20.0, -4.0], [-28.0, 8.0, 0.0, -20.0]]], [[[4.0, 
+-8.0, 24.0, -20.0], [-16.0, -8.0, -20.0, -24.0], [-12.0, -24.0, -20.0, -12.0]], [[20.0, -24.0, -12.0, -16.0], [-24.0, 12.0, 
+-28.0, -12.0], [20.0, 4.0, -8.0, -4.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_array_rank2_offset0(self):
-      arg0=Data(numpy.array([[-4.0, -1.0, -3.0, 3.0, 6.0], [5.0, 1.0, -2.0, 0.0, -6.0], [-1.0, -6.0, 0.0, -3.0, 0.0], [5.0, 
--7.0, 4.0, 3.0, 0.0]]),self.functionspace)
-      arg1=numpy.array([[0.0, -2.0, 5.0, 0.0, 3.0], [1.0, -3.0, -4.0, -2.0, 2.0], [4.0, 6.0, -4.0, 7.0, -1.0], [5.0, -7.0, 
--1.0, 4.0, 4.0]])
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([6.0, -7.0]),self.functionspace)
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,-1.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 8.0, -20.0, 0.0, -12.0], [-4.0, 12.0, 16.0, 8.0, -8.0], [-16.0, -24.0, 16.0, -28.0, 4.0], 
-[-20.0, 28.0, 4.0, -16.0, -16.0]], [[0.0, 2.0, -5.0, 0.0, -3.0], [-1.0, 3.0, 4.0, 2.0, -2.0], [-4.0, -6.0, 4.0, -7.0, 1.0], 
-[-5.0, 7.0, 1.0, -4.0, -4.0]], [[0.0, 6.0, -15.0, 0.0, -9.0], [-3.0, 9.0, 12.0, 6.0, -6.0], [-12.0, -18.0, 12.0, -21.0, 3.0], 
-[-15.0, 21.0, 3.0, -12.0, -12.0]], [[0.0, -6.0, 15.0, 0.0, 9.0], [3.0, -9.0, -12.0, -6.0, 6.0], [12.0, 18.0, -12.0, 21.0, 
--3.0], [15.0, -21.0, -3.0, 12.0, 12.0]], [[0.0, -12.0, 30.0, 0.0, 18.0], [6.0, -18.0, -24.0, -12.0, 12.0], [24.0, 36.0, -24.0, 
-42.0, -6.0], [30.0, -42.0, -6.0, 24.0, 24.0]]], [[[0.0, -10.0, 25.0, 0.0, 15.0], [5.0, -15.0, -20.0, -10.0, 10.0], [20.0, 30.0, 
--20.0, 35.0, -5.0], [25.0, -35.0, -5.0, 20.0, 20.0]], [[0.0, -2.0, 5.0, 0.0, 3.0], [1.0, -3.0, -4.0, -2.0, 2.0], [4.0, 6.0, 
--4.0, 7.0, -1.0], [5.0, -7.0, -1.0, 4.0, 4.0]], [[0.0, 4.0, -10.0, 0.0, -6.0], [-2.0, 6.0, 8.0, 4.0, -4.0], [-8.0, -12.0, 8.0, 
--14.0, 2.0], [-10.0, 14.0, 2.0, -8.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 12.0, -30.0, 0.0, -18.0], [-6.0, 18.0, 24.0, 12.0, -12.0], [-24.0, -36.0, 24.0, -42.0, 6.0], 
-[-30.0, 42.0, 6.0, -24.0, -24.0]]], [[[0.0, 2.0, -5.0, 0.0, -3.0], [-1.0, 3.0, 4.0, 2.0, -2.0], [-4.0, -6.0, 4.0, -7.0, 1.0], 
-[-5.0, 7.0, 1.0, -4.0, -4.0]], [[0.0, 12.0, -30.0, 0.0, -18.0], [-6.0, 18.0, 24.0, 12.0, -12.0], [-24.0, -36.0, 24.0, -42.0, 
-6.0], [-30.0, 42.0, 6.0, -24.0, -24.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 6.0, -15.0, 0.0, -9.0], [-3.0, 9.0, 12.0, 6.0, -6.0], [-12.0, -18.0, 12.0, -21.0, 3.0], 
-[-15.0, 21.0, 3.0, -12.0, -12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]]], [[[0.0, -10.0, 25.0, 0.0, 15.0], [5.0, -15.0, -20.0, -10.0, 10.0], [20.0, 30.0, -20.0, 35.0, -5.0], [25.0, 
--35.0, -5.0, 20.0, 20.0]], [[0.0, 14.0, -35.0, 0.0, -21.0], [-7.0, 21.0, 28.0, 14.0, -14.0], [-28.0, -42.0, 28.0, -49.0, 7.0], 
-[-35.0, 49.0, 7.0, -28.0, -28.0]], [[0.0, -8.0, 20.0, 0.0, 12.0], [4.0, -12.0, -16.0, -8.0, 8.0], [16.0, 24.0, -16.0, 28.0, 
--4.0], [20.0, -28.0, -4.0, 16.0, 16.0]], [[0.0, -6.0, 15.0, 0.0, 9.0], [3.0, -9.0, -12.0, -6.0, 6.0], [12.0, 18.0, -12.0, 21.0, 
--3.0], [15.0, -21.0, -3.0, 12.0, 12.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+      ref=Data(numpy.array([6.0, -7.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-6.0, 7.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank3_offset1(self):
-      arg0=Data(numpy.array([[[0.0, 1.0, -3.0], [5.0, -1.0, 0.0], [-2.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 6.0, 7.0]], [[0.0, 
-5.0, 0.0], [3.0, 4.0, -6.0], [-3.0, 5.0, 6.0], [-7.0, 0.0, -6.0], [-3.0, -2.0, 3.0]], [[2.0, -3.0, 1.0], [-4.0, 7.0, -4.0], 
-[-5.0, 6.0, 1.0], [-1.0, 3.0, -1.0], [-7.0, 2.0, -3.0]], [[0.0, 5.0, 4.0], [1.0, 1.0, 0.0], [4.0, 1.0, 6.0], [0.0, -4.0, -6.0], 
-[6.0, -7.0, -4.0]]]),self.functionspace)
-      arg1=numpy.array([[[6.0, 0.0, 4.0], [5.0, -4.0, 4.0], [-5.0, -7.0, 5.0], [-6.0, 3.0, -4.0], [-5.0, 4.0, 2.0]], [[6.0, 
-4.0, 1.0], [6.0, -7.0, 0.0], [-5.0, -1.0, -4.0], [4.0, -5.0, -6.0], [1.0, 7.0, 0.0]], [[-3.0, -5.0, 5.0], [5.0, -4.0, -2.0], 
-[2.0, 6.0, -2.0], [-2.0, -6.0, 3.0], [-5.0, 5.0, -2.0]], [[-1.0, 1.0, 4.0], [0.0, -6.0, 5.0], [-4.0, -6.0, 5.0], [0.0, 5.0, 
-2.0], [-2.0, -1.0, -1.0]]])
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[0.0, 0.0, 4.0], [-7.0, -1.0, 2.0]]),self.functionspace)
+      arg1=Data(numpy.array([-2.0, 4.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 5.0, -3.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-12.0, -16.0, -22.0, 15.0, -2.0], [1.0, -7.0, 11.0, 13.0, 7.0], [-20.0, 2.0, 12.0, -15.0, 11.0], 
-[-11.0, -21.0, -21.0, -1.0, 2.0]], [[30.0, 29.0, -18.0, -33.0, -29.0], [26.0, 37.0, -24.0, 25.0, -2.0], [-10.0, 29.0, 4.0, 
--4.0, -30.0], [-6.0, 6.0, -14.0, -5.0, -9.0]], [[-12.0, -10.0, 10.0, 12.0, 10.0], [-12.0, -12.0, 10.0, -8.0, -2.0], [6.0, 
--10.0, -4.0, 4.0, 10.0], [2.0, 0.0, 8.0, 0.0, 4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[28.0, 4.0, -7.0, -10.0, 38.0], [31.0, -42.0, -34.0, -72.0, 42.0], [5.0, -38.0, 22.0, 
--15.0, 16.0], [34.0, -1.0, -1.0, 44.0, -13.0]]], [[[0.0, -20.0, -35.0, 15.0, 20.0], [20.0, -35.0, -5.0, -25.0, 35.0], [-25.0, 
--20.0, 30.0, -30.0, 25.0], [5.0, -30.0, -30.0, 25.0, -5.0]], [[-6.0, -25.0, -73.0, 18.0, -11.0], [28.0, -10.0, 5.0, 28.0, 
-31.0], [-59.0, 11.0, 42.0, -48.0, 17.0], [-23.0, -54.0, -66.0, 8.0, -4.0]], [[6.0, -11.0, 10.0, 9.0, 47.0], [8.0, -53.0, -14.0, 
--73.0, 32.0], [14.0, -47.0, 12.0, -6.0, 28.0], [32.0, 0.0, 12.0, 37.0, -5.0]], [[-66.0, -59.0, 5.0, 66.0, 23.0], [-48.0, -42.0, 
-59.0, 8.0, -7.0], [-9.0, -23.0, -2.0, -4.0, 47.0], [-17.0, -30.0, -2.0, -12.0, 20.0]], [[-6.0, 5.0, 44.0, 0.0, 13.0], [-23.0, 
--4.0, 5.0, -20.0, -17.0], [34.0, -13.0, -24.0, 27.0, -1.0], [13.0, 27.0, 39.0, -4.0, 5.0]]], [[[16.0, 26.0, 16.0, -25.0, 
--20.0], [1.0, 33.0, -11.0, 17.0, -19.0], [14.0, 20.0, -16.0, 17.0, -27.0], [-1.0, 23.0, 15.0, -13.0, -2.0]], [[-40.0, -64.0, 
--49.0, 61.0, 40.0], [0.0, -73.0, 29.0, -27.0, 45.0], [-43.0, -40.0, 42.0, -46.0, 63.0], [-5.0, -62.0, -46.0, 27.0, 5.0]], 
-[[-26.0, -45.0, -12.0, 44.0, 51.0], [-5.0, -72.0, 15.0, -56.0, 37.0], [-10.0, -51.0, 24.0, -23.0, 53.0], [15.0, -31.0, -11.0, 
-32.0, 3.0]], [[-10.0, -21.0, -21.0, 19.0, 15.0], [5.0, -27.0, 6.0, -13.0, 20.0], [-17.0, -15.0, 18.0, -19.0, 22.0], [0.0, 
--23.0, -19.0, 13.0, 0.0]], [[-54.0, -55.0, 6.0, 60.0, 37.0], [-37.0, -56.0, 45.0, -20.0, 7.0], [-4.0, -37.0, 4.0, -7.0, 51.0], 
-[-3.0, -27.0, 1.0, 4.0, 15.0]]], [[[16.0, -4.0, -15.0, -1.0, 28.0], [24.0, -35.0, -21.0, -49.0, 35.0], [-5.0, -28.0, 22.0, 
--18.0, 17.0], [21.0, -10.0, -10.0, 33.0, -9.0]], [[6.0, 1.0, -12.0, -3.0, -1.0], [10.0, -1.0, -6.0, -1.0, 8.0], [-8.0, 1.0, 
-8.0, -8.0, 0.0], [0.0, -6.0, -10.0, 5.0, -3.0]], [[48.0, 40.0, 3.0, -45.0, -4.0], [34.0, 17.0, -45.0, -25.0, 11.0], [13.0, 4.0, 
-2.0, 4.0, -27.0], [21.0, 24.0, 8.0, 17.0, -15.0]], [[-24.0, -8.0, -2.0, 12.0, -28.0], [-22.0, 28.0, 28.0, 56.0, -28.0], [-10.0, 
-28.0, -12.0, 6.0, -8.0], [-28.0, -6.0, -6.0, -32.0, 10.0]], [[20.0, 42.0, -1.0, -41.0, -66.0], [4.0, 85.0, -7.0, 83.0, -43.0], 
-[-3.0, 66.0, -22.0, 18.0, -57.0], [-29.0, 22.0, -2.0, -43.0, -1.0]]]]),self.functionspace)
+      ref=Data(numpy.array([-16.0, 2.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-12.0, -53.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[-2.0, 6.0, 1.0], [6.0, 1.0, 5.0]], [[-5.0, 3.0, 0.0], [4.0, 3.0, 7.0]], [[-7.0, -7.0, 1.0], 
-[7.0, 0.0, -7.0]], [[-1.0, 6.0, -5.0], [-5.0, 3.0, -7.0]], [[-3.0, -1.0, 7.0], [-5.0, -4.0, 0.0]]], [[[-1.0, -2.0, -1.0], [3.0, 
-5.0, 3.0]], [[-6.0, -2.0, 6.0], [2.0, -7.0, 7.0]], [[0.0, 6.0, -4.0], [3.0, -5.0, 1.0]], [[3.0, -5.0, 7.0], [-4.0, 7.0, -2.0]], 
-[[-6.0, 5.0, -1.0], [-4.0, 4.0, 3.0]]], [[[4.0, 0.0, -5.0], [4.0, 7.0, 4.0]], [[-6.0, 3.0, 5.0], [0.0, 4.0, -5.0]], [[-7.0, 
-4.0, -3.0], [-5.0, 4.0, -3.0]], [[-7.0, -7.0, -6.0], [7.0, 6.0, 0.0]], [[-6.0, 4.0, 4.0], [2.0, -5.0, -7.0]]], [[[7.0, 0.0, 
-4.0], [-3.0, 0.0, 3.0]], [[-2.0, -5.0, 3.0], [0.0, -3.0, -6.0]], [[-6.0, 7.0, -1.0], [-7.0, -2.0, 2.0]], [[1.0, 5.0, 4.0], 
-[7.0, 6.0, -3.0]], [[0.0, 3.0, -3.0], [0.0, -6.0, -3.0]]]]),self.functionspace)
-      arg1=numpy.array([[[[0.0, -2.0, -1.0], [-2.0, 0.0, -2.0]], [[1.0, -3.0, -1.0], [3.0, -7.0, -3.0]], [[-1.0, -7.0, 0.0], 
-[2.0, -2.0, 1.0]], [[-2.0, 4.0, 2.0], [-3.0, 7.0, 7.0]], [[3.0, 1.0, -6.0], [-3.0, 0.0, 1.0]]], [[[4.0, 5.0, -4.0], [-3.0, 
--2.0, 0.0]], [[-4.0, 3.0, -7.0], [-6.0, -4.0, 6.0]], [[-4.0, 3.0, -4.0], [2.0, 0.0, 7.0]], [[5.0, -3.0, 6.0], [-3.0, -5.0, 
-1.0]], [[0.0, 7.0, -4.0], [5.0, 5.0, 5.0]]], [[[-3.0, 0.0, 0.0], [4.0, 3.0, -2.0]], [[0.0, 4.0, 3.0], [-1.0, -2.0, 1.0]], 
-[[6.0, -5.0, -2.0], [-5.0, 0.0, 6.0]], [[0.0, 3.0, 6.0], [-5.0, -5.0, -6.0]], [[-2.0, -1.0, -1.0], [4.0, 6.0, 2.0]]], [[[4.0, 
--3.0, 7.0], [-1.0, 5.0, 3.0]], [[-4.0, 4.0, -3.0], [4.0, -5.0, 0.0]], [[-6.0, 2.0, -7.0], [5.0, 7.0, 6.0]], [[5.0, -6.0, -7.0], 
-[3.0, 4.0, -2.0]], [[-7.0, 5.0, 5.0], [7.0, -3.0, 1.0]]]])
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, 3.0, 6.0], [-6.0, -5.0, -2.0]], [[-3.0, -5.0, 7.0], [1.0, 6.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, -5.0, -2.0], [-6.0, -7.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -7.0, 3.0], [-7.0, -2.0, 0.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[-35.0, -25.0, -25.0, 54.0, -19.0], [-2.0, 9.0, 69.0, -40.0, 98.0], [23.0, 24.0, -44.0, -41.0, 
-37.0], [-5.0, 48.0, 84.0, -41.0, 93.0]], [[-28.0, -44.0, -7.0, 80.0, -17.0], [-23.0, 35.0, 86.0, -54.0, 91.0], [26.0, 9.0, 
--23.0, -68.0, 55.0], [3.0, 33.0, 119.0, -33.0, 76.0]], [[13.0, 55.0, 63.0, -82.0, -62.0], [-88.0, -84.0, -32.0, -36.0, -53.0], 
-[63.0, -39.0, -86.0, -8.0, 34.0], [-28.0, 25.0, 14.0, 35.0, 61.0]], [[17.0, -29.0, -64.0, 3.0, 41.0], [55.0, 33.0, -17.0, 
--60.0, 17.0], [6.0, 1.0, -43.0, 40.0, -15.0], [-58.0, 8.0, 7.0, 5.0, -39.0]], [[5.0, 6.0, 8.0, 3.0, -37.0], [-22.0, 6.0, -29.0, 
-65.0, -80.0], [-23.0, 30.0, -2.0, 84.0, -44.0], [25.0, -13.0, -86.0, -89.0, 28.0]]], [[[-7.0, -29.0, 14.0, 39.0, -5.0], [-29.0, 
--15.0, 29.0, -36.0, 45.0], [24.0, -21.0, 9.0, -70.0, 53.0], [26.0, -14.0, 77.0, 37.0, 1.0]], [[-20.0, 28.0, 45.0, 10.0, -55.0], 
-[-50.0, 34.0, 47.0, 48.0, -28.0], [-9.0, 29.0, -6.0, 13.0, -12.0], [8.0, 41.0, -7.0, -96.0, 104.0]], [[-16.0, 27.0, -25.0, 
--21.0, 22.0], [47.0, 54.0, 47.0, -25.0, 53.0], [-5.0, 20.0, -31.0, -2.0, -18.0], [-71.0, 73.0, 26.0, -21.0, 47.0]], [[15.0, 
--44.0, 8.0, 35.0, -28.0], [-43.0, -92.0, -77.0, 47.0, -58.0], [0.0, -11.0, 37.0, 24.0, 14.0], [109.0, -104.0, -60.0, 16.0, 
--62.0]], [[-7.0, -69.0, -42.0, 91.0, 8.0], [9.0, 72.0, 56.0, -56.0, 54.0], [8.0, 16.0, -21.0, -9.0, 22.0], [-13.0, 11.0, 79.0, 
--55.0, 25.0]]], [[[-11.0, -40.0, -6.0, 47.0, 34.0], [10.0, -9.0, 40.0, -53.0, 95.0], [17.0, -29.0, 38.0, -109.0, 63.0], [24.0, 
--20.0, 104.0, 87.0, -42.0]], [[-1.0, -33.0, -28.0, 27.0, -50.0], [-37.0, -48.0, -22.0, -34.0, -4.0], [40.0, 14.0, -91.0, 49.0, 
-18.0], [7.0, 1.0, 5.0, -57.0, 65.0]], [[11.0, -50.0, -42.0, 46.0, 13.0], [11.0, 57.0, 21.0, -73.0, 20.0], [19.0, 1.0, -49.0, 
-17.0, 11.0], [-45.0, 13.0, 56.0, -31.0, 4.0]], [[6.0, -1.0, 58.0, -5.0, -13.0], [-72.0, -17.0, 45.0, -101.0, 40.0], [67.0, 
--65.0, -30.0, -122.0, 91.0], [-26.0, 16.0, 147.0, 94.0, 15.0]], [[-2.0, 40.0, -15.0, -54.0, -51.0], [-16.0, -26.0, -25.0, -6.0, 
--38.0], [25.0, 29.0, -116.0, 93.0, -32.0], [-56.0, 61.0, -51.0, -82.0, 104.0]]], [[[-4.0, -15.0, -10.0, 24.0, 9.0], [21.0, 
--20.0, -29.0, 71.0, -16.0], [-39.0, 18.0, 67.0, 21.0, -24.0], [68.0, -52.0, -67.0, -8.0, -47.0]], [[19.0, 49.0, 37.0, -73.0, 
--35.0], [-39.0, -52.0, -61.0, 32.0, -92.0], [9.0, -11.0, -29.0, 54.0, -24.0], [-5.0, -6.0, -76.0, -1.0, 7.0]], [[-3.0, -39.0, 
--51.0, 59.0, 18.0], [40.0, 114.0, 49.0, -24.0, 18.0], [-20.0, 38.0, -22.0, 48.0, -30.0], [-49.0, 37.0, 20.0, -98.0, 31.0]], 
-[[-22.0, -30.0, -37.0, 26.0, -40.0], [-20.0, -101.0, -12.0, -40.0, 69.0], [49.0, 10.0, -80.0, -8.0, 47.0], [31.0, 2.0, 35.0, 
--2.0, 66.0]], [[3.0, 45.0, -12.0, -57.0, 18.0], [39.0, 36.0, 0.0, 0.0, -12.0], [-12.0, 12.0, -27.0, 39.0, -42.0], [-69.0, 51.0, 
--33.0, -15.0, 15.0]]]]),self.functionspace)
+      ref=Data(numpy.array([51.0, -34.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([7.0, 19.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[7.0, 7.0, -3.0, -6.0, -4.0], [2.0, 1.0, 5.0, 1.0, -3.0], [3.0, 0.0, 1.0, -2.0, -7.0], [6.0, -1.0, 
-3.0, 4.0, 1.0]]),self.functionspace)
-      arg1=Data(3.0,self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-3.0, 5.0, -4.0], [0.0, -5.0, 7.0], [0.0, 5.0, -7.0], [-4.0, 7.0, -7.0]], [[5.0, 2.0, -2.0], 
+[-4.0, -6.0, -3.0], [0.0, -3.0, 2.0], [-4.0, 3.0, -1.0]]], [[[-4.0, 1.0, 5.0], [5.0, -5.0, 3.0], [-4.0, 0.0, -3.0], [-7.0, 0.0, 
+2.0]], [[-2.0, 1.0, -5.0], [4.0, 0.0, -2.0], [-5.0, -7.0, -5.0], [-3.0, -2.0, 4.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[1.0, 5.0, -6.0], [7.0, 0.0, -7.0], [7.0, -2.0, 1.0], [6.0, 0.0, 2.0]], [[3.0, -1.0, -6.0], 
+[-4.0, -2.0, 0.0], [-6.0, -4.0, 5.0], [-5.0, -5.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -6.0, 0.0], [-1.0, 6.0, 7.0], [-3.0, 1.0, -4.0], [-7.0, -3.0, 6.0]], [[-1.0, 
+3.0, -7.0], [7.0, 0.0, 3.0], [7.0, -2.0, -6.0], [6.0, 1.0, -4.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([20.0, -11.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-70.0, 84.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([7.0, 6.0]),self.functionspace)
+      arg1=Data(numpy.array([-4.0, -3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-5.0, 0.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[21.0, 21.0, -9.0, -18.0, -12.0], [6.0, 3.0, 15.0, 3.0, -9.0], [9.0, 0.0, 3.0, -6.0, -21.0], [18.0, 
--3.0, 9.0, 12.0, 3.0]]),self.functionspace)
+      ref=Data(numpy.array([[-28.0, -21.0], [-24.0, -18.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-35.0, 0.0], [-30.0, 0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[-4.0, 0.0, -3.0], [-3.0, 3.0, 7.0], [3.0, -2.0, -5.0], [7.0, -2.0, -4.0], [-7.0, -5.0, 5.0]], 
-[[-1.0, 0.0, -7.0], [5.0, 2.0, 2.0], [-4.0, 5.0, 3.0], [-5.0, 6.0, 7.0], [2.0, 2.0, 3.0]], [[-5.0, -6.0, -2.0], [-7.0, 0.0, 
-6.0], [-7.0, 0.0, -4.0], [-5.0, 1.0, 1.0], [0.0, -1.0, -1.0]], [[-7.0, 4.0, 4.0], [-4.0, 5.0, 3.0], [0.0, 3.0, 7.0], [-1.0, 
--4.0, 5.0], [0.0, -2.0, -3.0]]]),self.functionspace)
-      arg1=Data(numpy.array([-6.0, 3.0, -5.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[1.0, 3.0, 1.0], [-5.0, 0.0, 7.0]]),self.functionspace)
+      arg1=Data(numpy.array([[2.0, 3.0, -5.0], [1.0, -1.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 1.0, 7.0], [-6.0, 2.0, -1.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[39.0, -8.0, 1.0, -28.0, 2.0], [41.0, -34.0, 24.0, 13.0, -21.0], [22.0, 12.0, 62.0, 28.0, 2.0], 
-[34.0, 24.0, -26.0, -31.0, 9.0]]),self.functionspace)
+      ref=Data(numpy.array([[6.0, -7.0], [-45.0, -40.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[13.0, -1.0], [34.0, 23.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[1.0, 4.0, -6.0], [-3.0, 2.0, 1.0]], [[-3.0, 1.0, -5.0], [-3.0, -2.0, 0.0]], [[0.0, 7.0, -6.0], 
-[-3.0, 0.0, -7.0]], [[-6.0, 7.0, -3.0], [6.0, 4.0, 1.0]], [[3.0, 2.0, -2.0], [0.0, 7.0, -1.0]]], [[[-1.0, -2.0, 0.0], [7.0, 
-4.0, -6.0]], [[1.0, -6.0, 5.0], [7.0, 6.0, 1.0]], [[0.0, 2.0, 4.0], [3.0, 3.0, -1.0]], [[-3.0, 0.0, 4.0], [1.0, -2.0, 3.0]], 
-[[-3.0, -3.0, -4.0], [-7.0, 7.0, 2.0]]], [[[-7.0, 3.0, 2.0], [-4.0, 4.0, 4.0]], [[-3.0, -6.0, 3.0], [7.0, -4.0, 3.0]], [[5.0, 
-1.0, 0.0], [-6.0, -3.0, -6.0]], [[-6.0, -1.0, -2.0], [-5.0, 6.0, 3.0]], [[5.0, -6.0, -5.0], [-1.0, 5.0, -5.0]]], [[[3.0, 4.0, 
--6.0], [6.0, 2.0, -3.0]], [[3.0, 6.0, 5.0], [3.0, 0.0, -7.0]], [[0.0, -3.0, -7.0], [-6.0, -4.0, 4.0]], [[1.0, 4.0, 2.0], [-3.0, 
-7.0, -7.0]], [[6.0, 0.0, 4.0], [5.0, 0.0, -1.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[6.0, -5.0, -7.0], [3.0, 6.0, -6.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-5.0, 0.0, 0.0], [-5.0, 4.0, -2.0]], [[-6.0, 2.0, -5.0], [7.0, -2.0, 6.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[0.0, -6.0, 0.0], [-3.0, 0.0, 4.0]], [[0.0, 6.0, 0.0], [-1.0, 0.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 0.0, -6.0], [-7.0, 2.0, -2.0]], [[2.0, 0.0, 0.0], [-5.0, -5.0, 2.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[25.0, -9.0, 40.0, -14.0, 70.0], [85.0, 52.0, -5.0, -73.0, 34.0], [-83.0, -30.0, 25.0, -14.0, 
-152.0], [88.0, 4.0, -2.0, 47.0, 29.0]]),self.functionspace)
+      ref=Data(numpy.array([[7.0, 11.0], [-9.0, -13.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[42.0, -9.0], [-41.0, -25.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([[0.0, -7.0, -5.0, -3.0, 0.0], [5.0, -3.0, 3.0, -6.0, 0.0], [-3.0, -4.0, 6.0, 7.0, 6.0], [2.0, 
--2.0, -4.0, -5.0, 0.0]]),self.functionspace)
-      arg1=Data(numpy.array([-7.0, -2.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[0.0, -6.0, -2.0], [0.0, 0.0, 4.0], [-3.0, -6.0, -4.0], [1.0, -4.0, 0.0]], [[0.0, -2.0, 0.0], 
+[7.0, 3.0, -1.0], [7.0, -4.0, 4.0], [0.0, 0.0, -1.0]]], [[[-5.0, 1.0, 1.0], [5.0, -6.0, -6.0], [6.0, 6.0, -7.0], [4.0, 2.0, 
+-2.0]], [[-4.0, -5.0, 6.0], [-6.0, 4.0, 6.0], [-5.0, 0.0, 5.0], [0.0, 5.0, -3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[3.0, -6.0, 0.0], [0.0, -7.0, -6.0], [-6.0, 1.0, 7.0], [-7.0, -5.0, 7.0]], [[4.0, 7.0, -2.0], 
+[2.0, 1.0, 0.0], [-7.0, -2.0, 2.0], [7.0, 4.0, 4.0]]], [[[-4.0, -2.0, -7.0], [-6.0, 3.0, -6.0], [3.0, -5.0, -2.0], [7.0, -5.0, 
+2.0]], [[2.0, -7.0, -3.0], [0.0, 1.0, -6.0], [-2.0, -7.0, 0.0], [3.0, 5.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -2.0, -7.0], [-1.0, 3.0, -3.0], [4.0, 1.0, -1.0], [-5.0, 4.0, 2.0]], [[5.0, 
+-6.0, -5.0], [-5.0, 5.0, -1.0], [-4.0, 1.0, -2.0], [-5.0, 5.0, 1.0]]], [[[3.0, 1.0, 4.0], [-5.0, -6.0, 6.0], [-5.0, 2.0, -3.0], 
+[4.0, -1.0, 6.0]], [[-4.0, 2.0, -5.0], [3.0, 0.0, 6.0], [-4.0, -2.0, 4.0], [0.0, -2.0, 2.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[-25.0, 98.0], [-92.0, 36.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-69.0, 38.0], [63.0, -12.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([2.0, 2.0]),self.functionspace)
+      arg1=Data(numpy.array([[6.0, 0.0, 5.0, -6.0, 7.0], [6.0, 6.0, 1.0, -1.0, 3.0], [-7.0, 5.0, 2.0, 0.0, -5.0], [-4.0, 2.0, 
+-5.0, -5.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, -4.0, 5.0, -6.0, 2.0], [6.0, -5.0, -3.0, -3.0, 0.0], [2.0, 0.0, -5.0, -4.0, 
+4.0], [-6.0, 5.0, -7.0, -3.0, 4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[0.0, 0.0], [49.0, 14.0], [35.0, 10.0], [21.0, 6.0], [0.0, 0.0]], [[-35.0, -10.0], [21.0, 6.0], 
-[-21.0, -6.0], [42.0, 12.0], [0.0, 0.0]], [[21.0, 6.0], [28.0, 8.0], [-42.0, -12.0], [-49.0, -14.0], [-42.0, -12.0]], [[-14.0, 
--4.0], [14.0, 4.0], [28.0, 8.0], [35.0, 10.0], [0.0, 0.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[12.0, 0.0, 10.0, -12.0, 14.0], [12.0, 12.0, 2.0, -2.0, 6.0], [-14.0, 10.0, 4.0, 0.0, -10.0], 
+[-8.0, 4.0, -10.0, -10.0, -12.0]], [[12.0, 0.0, 10.0, -12.0, 14.0], [12.0, 12.0, 2.0, -2.0, 6.0], [-14.0, 10.0, 4.0, 0.0, 
+-10.0], [-8.0, 4.0, -10.0, -10.0, -12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[6.0, -8.0, 10.0, -12.0, 4.0], [12.0, -10.0, -6.0, -6.0, 0.0], [4.0, 0.0, -10.0, -8.0, 
+8.0], [-12.0, 10.0, -14.0, -6.0, 8.0]], [[6.0, -8.0, 10.0, -12.0, 4.0], [12.0, -10.0, -6.0, -6.0, 0.0], [4.0, 0.0, -10.0, -8.0, 
+8.0], [-12.0, 10.0, -14.0, -6.0, 8.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[0.0, -4.0, -3.0], [1.0, 0.0, 5.0], [5.0, -7.0, -6.0], [3.0, -6.0, 4.0], [1.0, 0.0, -7.0]], 
-[[-2.0, -2.0, 3.0], [-7.0, 0.0, 0.0], [5.0, 0.0, 0.0], [7.0, 6.0, -5.0], [-6.0, -4.0, 0.0]], [[0.0, 5.0, -2.0], [6.0, -1.0, 
--7.0], [2.0, 7.0, -3.0], [0.0, 1.0, 2.0], [6.0, 7.0, -7.0]], [[-4.0, -5.0, 1.0], [-4.0, 4.0, 1.0], [-5.0, -5.0, 0.0], [6.0, 
--7.0, 0.0], [2.0, 0.0, -1.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[4.0, -4.0, -5.0], [-4.0, 2.0, -4.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[4.0, -2.0, -4.0], [-2.0, 2.0, 1.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[-4.0, 3.0, -6.0], [0.0, -1.0, 7.0], [6.0, -2.0, 6.0], [4.0, -4.0, 1.0], [-6.0, -6.0, 2.0]], 
+[[-3.0, -7.0, 5.0], [0.0, 2.0, -3.0], [4.0, 5.0, 2.0], [3.0, -4.0, 0.0], [6.0, 2.0, 5.0]], [[5.0, 7.0, 4.0], [3.0, 3.0, 0.0], 
+[-5.0, -7.0, -4.0], [-2.0, -1.0, -6.0], [-7.0, 1.0, -3.0]], [[0.0, 0.0, -1.0], [-1.0, 1.0, 4.0], [-5.0, -4.0, 5.0], [7.0, -3.0, 
+-4.0], [2.0, -4.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, -4.0, 6.0], [0.0, -3.0, 1.0], [0.0, 5.0, 2.0], [5.0, -5.0, -1.0], [0.0, 0.0, 
+-1.0]], [[3.0, 4.0, -2.0], [-5.0, 4.0, 7.0], [3.0, 1.0, 3.0], [7.0, -2.0, -2.0], [-5.0, 3.0, 0.0]], [[6.0, 3.0, -6.0], [-5.0, 
+1.0, -4.0], [-6.0, 0.0, -3.0], [6.0, 4.0, 5.0], [0.0, -2.0, 1.0]], [[-4.0, 0.0, -5.0], [6.0, 7.0, 6.0], [3.0, -2.0, 0.0], 
+[-4.0, -2.0, -7.0], [5.0, 3.0, 5.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[31.0, 4.0], [-21.0, -24.0], [78.0, -10.0], [16.0, -40.0], [39.0, 24.0]], [[-15.0, -8.0], [-28.0, 
-28.0], [20.0, -20.0], [29.0, 4.0], [-8.0, 16.0]], [[-10.0, 18.0], [63.0, 2.0], [-5.0, 18.0], [-14.0, -6.0], [31.0, 18.0]], 
-[[-1.0, 2.0], [-37.0, 20.0], [0.0, 10.0], [52.0, -38.0], [13.0, -4.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[2.0, -26.0, 4.0, 20.0, -20.0], [-18.0, 8.0, -2.0, 20.0, 0.0], [-10.0, 6.0, 10.0, 18.0, -18.0], 
+[4.0, -22.0, -32.0, 50.0, 16.0]], [[8.0, 5.0, -10.0, -15.0, 2.0], [-3.0, 1.0, 4.0, -14.0, -3.0], [8.0, 0.0, -8.0, -4.0, 13.0], 
+[-1.0, 8.0, 7.0, -24.0, -12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-4.0, 2.0, -18.0, 34.0, 4.0], [12.0, -56.0, -2.0, 40.0, -26.0], [42.0, -6.0, -12.0, 
+-4.0, 0.0], [4.0, -14.0, 16.0, 16.0, -6.0]], [[-8.0, -5.0, 12.0, -21.0, -1.0], [0.0, 25.0, -1.0, -20.0, 16.0], [-12.0, 8.0, 
+9.0, 1.0, -3.0], [3.0, 8.0, -10.0, -3.0, 1.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[-3.0, -6.0, 4.0], [5.0, 7.0, -5.0]], [[4.0, 1.0, -4.0], [3.0, -5.0, 6.0]], [[0.0, -6.0, 4.0], 
-[0.0, 0.0, -3.0]], [[7.0, -2.0, -7.0], [-5.0, 2.0, -3.0]], [[-3.0, -1.0, -5.0], [1.0, 3.0, 4.0]]], [[[1.0, -4.0, 2.0], [-3.0, 
-3.0, -2.0]], [[-7.0, 2.0, 0.0], [-2.0, 5.0, 7.0]], [[7.0, 0.0, -5.0], [4.0, -2.0, -6.0]], [[0.0, -7.0, -4.0], [3.0, -3.0, 
--4.0]], [[0.0, -6.0, 4.0], [-2.0, 0.0, -5.0]]], [[[7.0, 5.0, -5.0], [6.0, 5.0, 4.0]], [[5.0, -1.0, 3.0], [7.0, 5.0, 3.0]], 
-[[0.0, 1.0, -5.0], [-1.0, -1.0, 0.0]], [[-3.0, -1.0, -2.0], [5.0, -2.0, 4.0]], [[-4.0, 3.0, 4.0], [-4.0, -1.0, 2.0]]], [[[5.0, 
-0.0, 0.0], [-5.0, 5.0, 5.0]], [[-7.0, -7.0, -6.0], [2.0, -3.0, 7.0]], [[-3.0, -1.0, 2.0], [-2.0, -7.0, 2.0]], [[-5.0, -7.0, 
-0.0], [-1.0, -4.0, 2.0]], [[-2.0, 0.0, 0.0], [-4.0, 0.0, -7.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[5.0, -6.0, 3.0], [-4.0, -3.0, 3.0]], [[7.0, 1.0, 5.0], [7.0, 7.0, 6.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, 6.0, 6.0], [-6.0, -2.0, 0.0]], [[7.0, -3.0, -4.0], [-3.0, 0.0, 0.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[4.0, 4.0, -3.0], [3.0, 0.0, 5.0]], [[-6.0, -5.0, -6.0], [-1.0, -7.0, -1.0]], [[0.0, 4.0, 2.0], 
+[-2.0, -3.0, 5.0]], [[-1.0, -2.0, -3.0], [-2.0, 1.0, 5.0]], [[3.0, 5.0, -4.0], [4.0, 3.0, -6.0]]], [[[-4.0, 1.0, -5.0], [-7.0, 
+0.0, -1.0]], [[4.0, 5.0, -4.0], [-7.0, -5.0, -5.0]], [[6.0, -1.0, 5.0], [-2.0, -7.0, 0.0]], [[5.0, -1.0, -4.0], [0.0, 1.0, 
+-6.0]], [[0.0, -2.0, -5.0], [6.0, -3.0, -5.0]]], [[[-1.0, -3.0, -1.0], [-4.0, 1.0, -1.0]], [[3.0, 4.0, 7.0], [0.0, -1.0, 2.0]], 
+[[-6.0, 5.0, 2.0], [-2.0, 0.0, -3.0]], [[-4.0, 1.0, -1.0], [1.0, 1.0, 3.0]], [[0.0, 7.0, -1.0], [-4.0, 0.0, -4.0]]], [[[6.0, 
+0.0, -6.0], [7.0, 0.0, 2.0]], [[0.0, -4.0, -5.0], [3.0, 6.0, 2.0]], [[5.0, -5.0, 4.0], [-7.0, 2.0, -6.0]], [[4.0, -2.0, -1.0], 
+[0.0, -1.0, 2.0]], [[5.0, 2.0, 0.0], [7.0, 0.0, 6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, -6.0, 5.0], [7.0, -1.0, 0.0]], [[3.0, -4.0, -5.0], [1.0, 0.0, 0.0]], [[4.0, 
+-5.0, 4.0], [4.0, 0.0, 0.0]], [[0.0, 4.0, 0.0], [6.0, 3.0, -7.0]], [[0.0, -5.0, -4.0], [-3.0, 3.0, 5.0]]], [[[-1.0, 7.0, -4.0], 
+[-3.0, -5.0, 1.0]], [[6.0, -7.0, 0.0], [-5.0, 2.0, -5.0]], [[4.0, 1.0, 0.0], [6.0, -1.0, 6.0]], [[-1.0, 1.0, 2.0], [-7.0, 3.0, 
+-6.0]], [[4.0, 4.0, 6.0], [6.0, -4.0, 0.0]]], [[[2.0, 2.0, 7.0], [-3.0, 5.0, 1.0]], [[3.0, 7.0, -2.0], [-5.0, 0.0, 2.0]], 
+[[4.0, 0.0, 2.0], [2.0, -5.0, 1.0]], [[4.0, -4.0, 4.0], [6.0, 6.0, -4.0]], [[-2.0, 0.0, -3.0], [5.0, -7.0, 1.0]]], [[[5.0, 7.0, 
+3.0], [5.0, 5.0, 6.0]], [[2.0, 3.0, -7.0], [4.0, -4.0, 1.0]], [[-2.0, 7.0, 1.0], [-7.0, 2.0, -4.0]], [[4.0, 1.0, -3.0], [-5.0, 
+7.0, 2.0]], [[7.0, -1.0, 3.0], [-6.0, 5.0, 0.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[-23.0, 47.0], [23.0, 31.0], [39.0, -4.0], [31.0, -27.0], [-25.0, 5.0]], [[32.0, 1.0], [-33.0, 
-16.0], [-8.0, 2.0], [15.0, -51.0], [41.0, -30.0]], [[-37.0, 130.0], [6.0, 151.0], [-14.0, -38.0], [-17.0, 13.0], [-1.0, 
--28.0]], [[45.0, 65.0], [11.0, -51.0], [32.0, -63.0], [39.0, -65.0], [-15.0, -84.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[-40.0, -4.0, 54.0, -13.0, -45.0], [46.0, 30.0, 8.0, -67.0, -72.0], [5.0, 47.0, 96.0, 20.0, 60.0], 
+[-120.0, -84.0, -3.0, -44.0, -65.0]], [[19.0, 0.0, -14.0, 17.0, 10.0], [10.0, 50.0, 31.0, 54.0, 8.0], [18.0, -19.0, -59.0, 
+-30.0, -5.0], [45.0, 23.0, 55.0, 38.0, 8.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-18.0, -81.0, -58.0, -18.0, -42.0], [53.0, -58.0, -56.0, 61.0, 4.0], [48.0, 39.0, 
+-18.0, -76.0, -20.0], [-15.0, -54.0, 100.0, -24.0, -11.0]], [[-51.0, 50.0, 15.0, -30.0, 40.0], [-3.0, 78.0, 7.0, 3.0, -26.0], 
+[-11.0, 23.0, 14.0, 6.0, -17.0], [-13.0, 21.0, -18.0, 52.0, 58.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_constData_rank2_offset0(self):
-      arg0=Data(numpy.array([[4.0, 0.0, 4.0, -2.0, -5.0], [-6.0, -7.0, 0.0, 0.0, 2.0], [-4.0, 5.0, 7.0, -7.0, 0.0], [0.0, 0.0, 
--1.0, 0.0, -6.0]]),self.functionspace)
-      arg1=Data(numpy.array([[5.0, 1.0, -6.0, -4.0, 1.0], [-3.0, -1.0, 0.0, -4.0, -5.0], [2.0, 4.0, 1.0, 4.0, 4.0], [-2.0, 4.0, 
-6.0, -4.0, -2.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([1.0, -1.0]),self.functionspace)
+      arg1=Data(numpy.array([[[-7.0, -4.0], [0.0, 4.0]], [[-7.0, -7.0], [0.0, 1.0]], [[0.0, 2.0], [5.0, 6.0]], [[0.0, -1.0], 
+[-5.0, -5.0]], [[0.0, 7.0], [2.0, -6.0]], [[-6.0, -6.0], [5.0, -4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, -1.0], [2.0, -6.0]], [[-2.0, 0.0], [5.0, 6.0]], [[-7.0, -2.0], [-6.0, 6.0]], 
+[[-2.0, 4.0], [-7.0, 4.0]], [[-3.0, 7.0], [-4.0, -7.0]], [[2.0, -4.0], [-1.0, 1.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[20.0, 4.0, -24.0, -16.0, 4.0], [-12.0, -4.0, 0.0, -16.0, -20.0], [8.0, 16.0, 4.0, 16.0, 16.0], 
-[-8.0, 16.0, 24.0, -16.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[20.0, 4.0, -24.0, -16.0, 4.0], [-12.0, -4.0, 0.0, -16.0, -20.0], [8.0, 16.0, 4.0, 16.0, 16.0], [-8.0, 16.0, 
-24.0, -16.0, -8.0]], [[-10.0, -2.0, 12.0, 8.0, -2.0], [6.0, 2.0, 0.0, 8.0, 10.0], [-4.0, -8.0, -2.0, -8.0, -8.0], [4.0, -8.0, 
--12.0, 8.0, 4.0]], [[-25.0, -5.0, 30.0, 20.0, -5.0], [15.0, 5.0, 0.0, 20.0, 25.0], [-10.0, -20.0, -5.0, -20.0, -20.0], [10.0, 
--20.0, -30.0, 20.0, 10.0]]], [[[-30.0, -6.0, 36.0, 24.0, -6.0], [18.0, 6.0, 0.0, 24.0, 30.0], [-12.0, -24.0, -6.0, -24.0, 
--24.0], [12.0, -24.0, -36.0, 24.0, 12.0]], [[-35.0, -7.0, 42.0, 28.0, -7.0], [21.0, 7.0, 0.0, 28.0, 35.0], [-14.0, -28.0, -7.0, 
--28.0, -28.0], [14.0, -28.0, -42.0, 28.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[10.0, 2.0, -12.0, -8.0, 2.0], [-6.0, -2.0, 0.0, -8.0, -10.0], [4.0, 8.0, 2.0, 8.0, 8.0], [-4.0, 8.0, 12.0, 
--8.0, -4.0]]], [[[-20.0, -4.0, 24.0, 16.0, -4.0], [12.0, 4.0, 0.0, 16.0, 20.0], [-8.0, -16.0, -4.0, -16.0, -16.0], [8.0, -16.0, 
--24.0, 16.0, 8.0]], [[25.0, 5.0, -30.0, -20.0, 5.0], [-15.0, -5.0, 0.0, -20.0, -25.0], [10.0, 20.0, 5.0, 20.0, 20.0], [-10.0, 
-20.0, 30.0, -20.0, -10.0]], [[35.0, 7.0, -42.0, -28.0, 7.0], [-21.0, -7.0, 0.0, -28.0, -35.0], [14.0, 28.0, 7.0, 28.0, 28.0], 
-[-14.0, 28.0, 42.0, -28.0, -14.0]], [[-35.0, -7.0, 42.0, 28.0, -7.0], [21.0, 7.0, 0.0, 28.0, 35.0], [-14.0, -28.0, -7.0, -28.0, 
--28.0], [14.0, -28.0, -42.0, 28.0, 14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
-[[-5.0, -1.0, 6.0, 4.0, -1.0], [3.0, 1.0, 0.0, 4.0, 5.0], [-2.0, -4.0, -1.0, -4.0, -4.0], [2.0, -4.0, -6.0, 4.0, 2.0]], [[0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, -6.0, 36.0, 
-24.0, -6.0], [18.0, 6.0, 0.0, 24.0, 30.0], [-12.0, -24.0, -6.0, -24.0, -24.0], [12.0, -24.0, -36.0, 24.0, 
-12.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[[-7.0, -4.0], [0.0, 4.0]], [[-7.0, -7.0], [0.0, 1.0]], [[0.0, 2.0], [5.0, 6.0]], [[0.0, -1.0], 
+[-5.0, -5.0]], [[0.0, 7.0], [2.0, -6.0]], [[-6.0, -6.0], [5.0, -4.0]]], [[[7.0, 4.0], [0.0, -4.0]], [[7.0, 7.0], [0.0, -1.0]], 
+[[0.0, -2.0], [-5.0, -6.0]], [[0.0, 1.0], [5.0, 5.0]], [[0.0, -7.0], [-2.0, 6.0]], [[6.0, 6.0], [-5.0, 
+4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-5.0, -1.0], [2.0, -6.0]], [[-2.0, 0.0], [5.0, 6.0]], [[-7.0, -2.0], [-6.0, 6.0]], 
+[[-2.0, 4.0], [-7.0, 4.0]], [[-3.0, 7.0], [-4.0, -7.0]], [[2.0, -4.0], [-1.0, 1.0]]], [[[5.0, 1.0], [-2.0, 6.0]], [[2.0, 0.0], 
+[-5.0, -6.0]], [[7.0, 2.0], [6.0, -6.0]], [[2.0, -4.0], [7.0, -4.0]], [[3.0, -7.0], [4.0, 7.0]], [[-2.0, 4.0], [1.0, -1.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank3_offset1(self):
-      arg0=Data(numpy.array([[[-1.0, 3.0, 1.0], [-3.0, 6.0, 2.0], [3.0, -4.0, -6.0], [3.0, -3.0, 4.0], [-1.0, -4.0, -1.0]], 
-[[3.0, 0.0, 6.0], [5.0, 2.0, -4.0], [5.0, 4.0, 0.0], [1.0, 7.0, -6.0], [5.0, 0.0, -1.0]], [[-1.0, -7.0, 0.0], [-3.0, 7.0, 
--2.0], [-4.0, 0.0, 0.0], [-3.0, -4.0, 3.0], [2.0, -1.0, -3.0]], [[0.0, -4.0, -3.0], [0.0, 0.0, -6.0], [2.0, -1.0, -2.0], [-4.0, 
-7.0, 5.0], [0.0, 0.0, 2.0]]]),self.functionspace)
-      arg1=Data(numpy.array([[[3.0, -5.0, 0.0], [6.0, -2.0, -5.0], [-3.0, -7.0, 4.0], [-2.0, 7.0, 0.0], [0.0, -5.0, 7.0]], 
-[[-4.0, -5.0, 0.0], [3.0, -4.0, 1.0], [4.0, 7.0, 4.0], [-2.0, -4.0, -5.0], [5.0, 0.0, 4.0]], [[-6.0, 5.0, -1.0], [4.0, -7.0, 
--2.0], [2.0, -7.0, 1.0], [0.0, 0.0, 5.0], [-7.0, 7.0, 0.0]], [[6.0, 6.0, 2.0], [-5.0, -1.0, 6.0], [-7.0, -4.0, -3.0], [-7.0, 
--6.0, -6.0], [-2.0, 6.0, 1.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[7.0, 1.0, 2.0], [-2.0, 2.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([[[[-3.0, -2.0, -6.0], [-6.0, -3.0, -2.0]], [[3.0, -4.0, -3.0], [0.0, 3.0, 1.0]]], [[[3.0, -1.0, 
+6.0], [3.0, -7.0, 2.0]], [[0.0, -4.0, -3.0], [4.0, -7.0, -6.0]]], [[[-2.0, 1.0, -2.0], [0.0, 1.0, -4.0]], [[-6.0, -1.0, -6.0], 
+[-2.0, 3.0, 3.0]]], [[[-2.0, 5.0, -7.0], [-7.0, -4.0, -6.0]], [[-1.0, 2.0, 5.0], [-4.0, 6.0, 3.0]]], [[[2.0, 5.0, -2.0], [-3.0, 
+-3.0, -7.0]], [[6.0, -5.0, 4.0], [-2.0, -1.0, 6.0]]], [[[4.0, 5.0, 7.0], [0.0, -2.0, -6.0]], [[6.0, -3.0, -5.0], [3.0, -7.0, 
+3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, -6.0, -4.0], [0.0, -4.0, 6.0]], [[5.0, -4.0, -3.0], [0.0, -3.0, 4.0]]], 
+[[[-6.0, 4.0, -4.0], [3.0, 6.0, -4.0]], [[4.0, 6.0, 2.0], [-4.0, 2.0, -6.0]]], [[[2.0, 4.0, -5.0], [-5.0, -1.0, 3.0]], [[4.0, 
+-1.0, 0.0], [5.0, 6.0, -3.0]]], [[[-3.0, -4.0, 3.0], [6.0, 7.0, 1.0]], [[3.0, -1.0, -3.0], [6.0, 0.0, -2.0]]], [[[-7.0, -2.0, 
+1.0], [-2.0, 4.0, 0.0]], [[-5.0, 2.0, 0.0], [3.0, 6.0, 7.0]]], [[[6.0, 7.0, -1.0], [-4.0, 6.0, -3.0]], [[-6.0, -3.0, 6.0], 
+[-7.0, -2.0, 3.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-18.0, -17.0, -14.0, 23.0, -8.0], [-11.0, -14.0, 21.0, -15.0, -1.0], [20.0, -27.0, -22.0, 5.0, 
-28.0], [14.0, 8.0, -8.0, -17.0, 21.0]], [[-39.0, -40.0, -25.0, 48.0, -16.0], [-18.0, -31.0, 38.0, -28.0, -7.0], [46.0, -58.0, 
--46.0, 10.0, 63.0], [22.0, 21.0, -9.0, -27.0, 44.0]], [[29.0, 56.0, -5.0, -34.0, -22.0], [8.0, 19.0, -40.0, 40.0, -9.0], 
-[-32.0, 52.0, 28.0, -30.0, -49.0], [-18.0, -47.0, 13.0, 39.0, -36.0]], [[24.0, 4.0, 28.0, -27.0, 43.0], [3.0, 25.0, 7.0, -14.0, 
-31.0], [-37.0, 25.0, 31.0, 20.0, -42.0], [8.0, 12.0, -21.0, -27.0, -20.0]], [[17.0, 7.0, 27.0, -26.0, 13.0], [24.0, 12.0, 
--36.0, 23.0, -9.0], [-13.0, 26.0, 25.0, -5.0, -21.0], [-32.0, 3.0, 26.0, 37.0, -23.0]]], [[[9.0, -12.0, 15.0, -6.0, 42.0], 
-[-12.0, 15.0, 36.0, -36.0, 39.0], [-24.0, 0.0, 12.0, 30.0, -21.0], [30.0, 21.0, -39.0, -57.0, 0.0]], [[5.0, 46.0, -45.0, 4.0, 
--38.0], [-30.0, 3.0, 18.0, 2.0, 9.0], [-16.0, 14.0, -8.0, -20.0, -21.0], [34.0, -51.0, -31.0, -23.0, -2.0]], [[-5.0, 22.0, 
--43.0, 18.0, -20.0], [-40.0, -1.0, 48.0, -26.0, 25.0], [-10.0, -8.0, -18.0, 0.0, -7.0], [54.0, -29.0, -51.0, -59.0, 14.0]], 
-[[-32.0, 22.0, -76.0, 47.0, -77.0], [-39.0, -31.0, 29.0, 0.0, -19.0], [35.0, -33.0, -53.0, -30.0, 42.0], [36.0, -48.0, -17.0, 
--13.0, 34.0]], [[15.0, 35.0, -19.0, -10.0, -7.0], [-20.0, 14.0, 16.0, -5.0, 21.0], [-29.0, 22.0, 9.0, -5.0, -35.0], [28.0, 
--31.0, -32.0, -29.0, -11.0]]], [[[32.0, 8.0, 52.0, -47.0, 35.0], [39.0, 25.0, -53.0, 30.0, -5.0], [-29.0, 45.0, 47.0, 0.0, 
--42.0], [-48.0, 12.0, 35.0, 49.0, -40.0]], [[-44.0, -22.0, -48.0, 55.0, -49.0], [-23.0, -39.0, 29.0, -12.0, -23.0], [55.0, 
--57.0, -57.0, -10.0, 70.0], [20.0, -4.0, -1.0, -9.0, 46.0]], [[-12.0, -24.0, 12.0, 8.0, 0.0], [16.0, -12.0, -16.0, 8.0, -20.0], 
-[24.0, -16.0, -8.0, 0.0, 28.0], [-24.0, 20.0, 28.0, 28.0, 8.0]], [[11.0, -25.0, 49.0, -22.0, 41.0], [32.0, 10.0, -28.0, 7.0, 
--3.0], [-5.0, 10.0, 25.0, 15.0, -7.0], [-36.0, 37.0, 28.0, 27.0, -15.0]], [[11.0, 29.0, -11.0, -11.0, -16.0], [-3.0, 7.0, 
--11.0, 15.0, -2.0], [-14.0, 21.0, 8.0, -15.0, -21.0], [0.0, -27.0, -1.0, 10.0, -13.0]]], [[[20.0, 23.0, 16.0, -28.0, -1.0], 
-[20.0, 13.0, -40.0, 31.0, -12.0], [-17.0, 34.0, 25.0, -15.0, -28.0], [-30.0, -14.0, 25.0, 42.0, -27.0]], [[0.0, 30.0, -24.0, 
-0.0, -42.0], [0.0, -6.0, -24.0, 30.0, -24.0], [6.0, 12.0, -6.0, -30.0, 0.0], [-12.0, -36.0, 18.0, 36.0, -6.0]], [[11.0, 24.0, 
--7.0, -11.0, -9.0], [-3.0, 8.0, -7.0, 10.0, 2.0], [-15.0, 19.0, 9.0, -10.0, -21.0], [2.0, -21.0, -4.0, 4.0, -12.0]], [[-47.0, 
--63.0, -17.0, 57.0, 0.0], [-19.0, -35.0, 53.0, -45.0, 0.0], [54.0, -75.0, -52.0, 25.0, 77.0], [28.0, 43.0, -15.0, -44.0, 
-55.0]], [[0.0, -10.0, 8.0, 0.0, 14.0], [0.0, 2.0, 8.0, -10.0, 8.0], [-2.0, -4.0, 2.0, 10.0, 0.0], [4.0, 12.0, -6.0, -12.0, 
-2.0]]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[1.0, -3.0, 4.0], [1.0, 0.0, -4.0]], [[-4.0, 0.0, 1.0], [1.0, -3.0, 1.0]], [[6.0, 5.0, -4.0], 
-[6.0, -1.0, -2.0]], [[-7.0, 1.0, 6.0], [0.0, 1.0, -1.0]], [[6.0, 3.0, 7.0], [0.0, 4.0, -7.0]]], [[[5.0, 3.0, 5.0], [5.0, -7.0, 
-7.0]], [[0.0, -2.0, -4.0], [6.0, -3.0, 3.0]], [[6.0, -5.0, -1.0], [-7.0, -1.0, -5.0]], [[6.0, 1.0, -3.0], [5.0, -3.0, -1.0]], 
-[[-3.0, -1.0, -4.0], [1.0, -7.0, 0.0]]], [[[7.0, 2.0, -1.0], [1.0, 7.0, -5.0]], [[5.0, -2.0, -3.0], [-3.0, 1.0, 5.0]], [[0.0, 
--7.0, 2.0], [2.0, 5.0, -2.0]], [[7.0, -6.0, -6.0], [-3.0, 0.0, 2.0]], [[-3.0, -5.0, -7.0], [0.0, -5.0, -2.0]]], [[[0.0, -1.0, 
--6.0], [0.0, -1.0, 1.0]], [[-2.0, -1.0, -5.0], [4.0, 0.0, 4.0]], [[-1.0, 6.0, -3.0], [1.0, -1.0, 4.0]], [[-7.0, 2.0, 2.0], 
-[-3.0, -6.0, 7.0]], [[0.0, 3.0, -5.0], [4.0, -6.0, 0.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[[[0.0, 0.0, 4.0], [3.0, 2.0, 5.0]], [[-1.0, -5.0, -3.0], [6.0, -7.0, 1.0]], [[2.0, -4.0, -2.0], 
-[-4.0, 0.0, 4.0]], [[4.0, -2.0, 5.0], [5.0, 1.0, 5.0]], [[0.0, -6.0, -5.0], [5.0, 0.0, -3.0]]], [[[3.0, 7.0, 5.0], [7.0, 5.0, 
--5.0]], [[6.0, -5.0, -3.0], [-4.0, -4.0, -3.0]], [[-5.0, -5.0, 0.0], [-7.0, -1.0, -2.0]], [[4.0, 1.0, 1.0], [0.0, 7.0, 5.0]], 
-[[0.0, 0.0, -6.0], [0.0, -4.0, -4.0]]], [[[4.0, 6.0, -3.0], [6.0, -4.0, -2.0]], [[-5.0, 2.0, 5.0], [6.0, -6.0, 7.0]], [[0.0, 
-5.0, -5.0], [-1.0, 4.0, 2.0]], [[-5.0, -7.0, -6.0], [4.0, 0.0, 4.0]], [[-3.0, -2.0, 6.0], [-1.0, -7.0, -4.0]]], [[[0.0, 6.0, 
-5.0], [1.0, 1.0, 7.0]], [[-1.0, 4.0, -5.0], [-3.0, 0.0, 7.0]], [[-4.0, -4.0, 5.0], [3.0, -3.0, -3.0]], [[-7.0, 2.0, -4.0], 
-[-4.0, 0.0, -1.0]], [[-5.0, 2.0, -2.0], [-3.0, -1.0, -5.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      ref=Data(numpy.array([[[[-1.0, 4.0, -14.0, 15.0, 15.0], [29.0, 17.0, 11.0, -15.0, -8.0], [-12.0, -13.0, -44.0, -20.0, 
-42.0], [-25.0, -64.0, 43.0, -29.0, -2.0]], [[6.0, 29.0, -10.0, -4.0, -3.0], [-20.0, -22.0, 14.0, -31.0, 2.0], [-3.0, 56.0, 
--16.0, 22.0, 34.0], [10.0, 3.0, 30.0, 19.0, 13.0]], [[-10.0, 22.0, -32.0, 13.0, 26.0], [80.0, 9.0, -92.0, 8.0, 36.0], [110.0, 
--12.0, 31.0, -25.0, -43.0], [1.0, 2.0, -37.0, -38.0, -19.0]], [[21.0, -24.0, -34.0, -4.0, -33.0], [26.0, -66.0, 31.0, -19.0, 
--36.0], [-42.0, 54.0, -23.0, -12.0, 52.0], [30.0, -26.0, 54.0, 28.0, 29.0]], [[1.0, -77.0, -42.0, 22.0, -32.0], [129.0, 5.0, 
--35.0, 27.0, -30.0], [19.0, -62.0, -18.0, -121.0, 18.0], [8.0, -78.0, 8.0, -57.0, -7.0]]], [[[56.0, 51.0, -4.0, 92.0, -39.0], 
-[26.0, -13.0, -82.0, 14.0, -30.0], [67.0, 127.0, -29.0, -28.0, 25.0], [90.0, 16.0, 8.0, -76.0, -72.0]], [[11.0, 82.0, 4.0, 
-26.0, 53.0], [-22.0, 1.0, -35.0, -12.0, 24.0], [42.0, 51.0, -2.0, 74.0, -17.0], [-8.0, 15.0, 6.0, -15.0, -26.0]], [[-52.0, 
--18.0, 42.0, -32.0, 15.0], [-51.0, 111.0, 55.0, -14.0, 30.0], [-31.0, -116.0, -27.0, -37.0, 20.0], [-78.0, -35.0, -12.0, -15.0, 
-9.0]], [[-8.0, 48.0, -10.0, 24.0, 37.0], [35.0, 35.0, -65.0, -4.0, 34.0], [83.0, -2.0, 1.0, -3.0, -18.0], [-14.0, -9.0, -16.0, 
--47.0, -29.0]], [[-27.0, 75.0, 2.0, -32.0, 31.0], [-64.0, 23.0, 20.0, -66.0, 52.0], [28.0, 41.0, -14.0, 50.0, 35.0], [-32.0, 
-16.0, 20.0, 31.0, 25.0]]], [[[-12.0, -62.0, -16.0, 6.0, 13.0], [97.0, 18.0, -49.0, 53.0, -2.0], [31.0, -107.0, 32.0, -59.0, 
--61.0], [-20.0, -32.0, -44.0, -40.0, -14.0]], [[6.0, -6.0, 56.0, 20.0, -3.0], [-55.0, 42.0, -5.0, 47.0, -6.0], [-15.0, -33.0, 
-22.0, 15.0, -53.0], [6.0, 46.0, -54.0, -20.0, -40.0]], [[14.0, 4.0, 8.0, 29.0, 48.0], [10.0, 7.0, 20.0, 20.0, -24.0], [-52.0, 
--36.0, -31.0, 37.0, -3.0], [-39.0, -58.0, 35.0, -28.0, -19.0]], [[-23.0, 25.0, 70.0, 5.0, 45.0], [-82.0, 96.0, 12.0, 26.0, 
-28.0], [-12.0, -81.0, 7.0, 39.0, -50.0], [-55.0, 22.0, -49.0, -27.0, -36.0]], [[-48.0, 82.0, 20.0, -52.0, 71.0], [-94.0, 54.0, 
-49.0, -69.0, 70.0], [3.0, -14.0, -14.0, 84.0, 20.0], [-84.0, 4.0, 18.0, 41.0, 34.0]]], [[[-21.0, 31.0, 20.0, -24.0, 33.0], 
-[-47.0, 24.0, 4.0, -9.0, 36.0], [14.0, -19.0, 23.0, 47.0, -31.0], [-30.0, 33.0, -26.0, 21.0, 6.0]], [[12.0, 50.0, 10.0, 9.0, 
-39.0], [-30.0, -20.0, -21.0, 6.0, 14.0], [17.0, 35.0, 24.0, 79.0, -42.0], [1.0, 39.0, -13.0, 12.0, -14.0]], [[9.0, -3.0, -8.0, 
--7.0, -28.0], [6.0, -39.0, -39.0, 12.0, 6.0], [43.0, 42.0, 48.0, 1.0, -37.0], [49.0, 65.0, -41.0, 23.0, 1.0]], [[22.0, 22.0, 
-14.0, -8.0, -58.0], [-83.0, -43.0, 38.0, -31.0, -16.0], [-30.0, 116.0, -7.0, 25.0, 46.0], [62.0, 63.0, 18.0, 50.0, 15.0]], 
-[[-20.0, 66.0, -18.0, -17.0, 27.0], [-6.0, 8.0, -37.0, -44.0, 54.0], [81.0, 41.0, 12.0, 25.0, 2.0], [-9.0, 25.0, -7.0, 10.0, 
-10.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[[-35.0, -49.0], [11.0, 5.0]], [[32.0, 18.0], [-10.0, 9.0]], [[-17.0, -7.0], [-55.0, -5.0]], 
+[[-23.0, -65.0], [5.0, -16.0]], [[15.0, -38.0], [45.0, -3.0]], [[47.0, -14.0], [29.0, 20.0]]], [[[2.0, 6.0], [-14.0, 6.0]], 
+[[-8.0, -20.0], [-8.0, -22.0]], [[6.0, 2.0], [10.0, 10.0]], [[14.0, 6.0], [6.0, 20.0]], [[6.0, 0.0], [-22.0, 2.0]], [[2.0, 
+-4.0], [-18.0, -20.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 8.0], [25.0, 5.0]], [[-46.0, 19.0], [38.0, -38.0]], [[8.0, -30.0], [27.0, 
+35.0]], [[-19.0, 51.0], [14.0, 38.0]], [[-49.0, -10.0], [-33.0, 41.0]], [[47.0, -28.0], [-33.0, -45.0]]], [[[-16.0, -8.0], 
+[-18.0, -6.0]], [[20.0, 6.0], [4.0, 12.0]], [[4.0, 8.0], [-10.0, 2.0]], [[-2.0, 2.0], [-8.0, -12.0]], [[10.0, 12.0], [14.0, 
+6.0]], [[2.0, 20.0], [6.0, 10.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[-7.0, -2.0, -2.0, -6.0, -1.0], [-6.0, 1.0, -6.0, 0.0, 3.0], [-2.0, 1.0, -3.0, -7.0, 1.0], [1.0, 
--6.0, -6.0, 6.0, -4.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(7.0)+(1-msk_arg1)*(2.0)
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[7.0, 2.0, 4.0, 0.0, -2.0], [2.0, -4.0, -3.0, -2.0, 0.0], [-3.0, -2.0, 4.0, -7.0, -1.0], [-5.0, 
+0.0, -6.0, 0.0, -1.0]]),self.functionspace)
+      arg1=Data(-5.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-49.0, -14.0, -14.0, -42.0, -7.0], [-42.0, 7.0, -42.0, 0.0, 21.0], [-14.0, 7.0, -21.0, -49.0, 
-7.0], [7.0, -42.0, -42.0, 42.0, -28.0]])+(1.-msk_ref)*numpy.array([[-14.0, -4.0, -4.0, -12.0, -2.0], [-12.0, 2.0, -12.0, 0.0, 
-6.0], [-4.0, 2.0, -6.0, -14.0, 2.0], [2.0, -12.0, -12.0, 12.0, -8.0]])
+      ref=Data(numpy.array([[-35.0, -10.0, -20.0, -0.0, 10.0], [-10.0, 20.0, 15.0, 10.0, -0.0], [15.0, 10.0, -20.0, 35.0, 5.0], 
+[25.0, -0.0, 30.0, -0.0, 5.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-21.0, -6.0, -12.0, -0.0, 6.0], [-6.0, 12.0, 9.0, 6.0, -0.0], [9.0, 6.0, -12.0, 21.0, 
+3.0], [15.0, -0.0, 18.0, -0.0, 3.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[3.0, -3.0, 5.0], [-1.0, -7.0, -3.0], [1.0, -3.0, 1.0], [0.0, 0.0, 6.0], [0.0, 7.0, 7.0]], [[5.0, 
-3.0, -1.0], [1.0, 2.0, 1.0], [-5.0, -7.0, -2.0], [0.0, -6.0, -3.0], [0.0, 3.0, 6.0]], [[-1.0, 3.0, 0.0], [6.0, 0.0, -5.0], 
-[7.0, -6.0, 0.0], [-2.0, 0.0, 0.0], [-4.0, -4.0, -3.0]], [[-3.0, 7.0, -7.0], [6.0, -1.0, 7.0], [-1.0, -6.0, -2.0], [-6.0, 4.0, 
--2.0], [1.0, -2.0, -3.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, -1.0, -4.0])+(1.-msk_arg1)*numpy.array([7.0, -6.0, 5.0])
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-5.0, -2.0, -4.0], [1.0, 5.0, -3.0], [-4.0, 7.0, 6.0], [6.0, 3.0, 0.0], [4.0, 2.0, -7.0]], 
+[[0.0, 2.0, -3.0], [-1.0, 1.0, -7.0], [-7.0, 7.0, -2.0], [2.0, 7.0, -6.0], [7.0, -2.0, 2.0]], [[-6.0, 3.0, -1.0], [-2.0, -6.0, 
+7.0], [-2.0, 4.0, 5.0], [0.0, 4.0, 4.0], [1.0, -7.0, 4.0]], [[3.0, 0.0, 0.0], [5.0, 1.0, 7.0], [-1.0, 6.0, -5.0], [2.0, 3.0, 
+0.0], [-5.0, 6.0, -5.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-1.0, 6.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 0.0, -5.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[1.0, 13.0, 5.0, -24.0, -35.0], [31.0, 0.0, -15.0, 18.0, -27.0], [-9.0, 56.0, 48.0, -12.0, 
--8.0], [3.0, 9.0, 8.0, -32.0, 20.0]])+(1.-msk_ref)*numpy.array([[64.0, 20.0, 30.0, 30.0, -7.0], [12.0, 0.0, -3.0, 21.0, 12.0], 
-[-25.0, 17.0, 85.0, -14.0, -19.0], [-98.0, 83.0, 19.0, -76.0, 4.0]])
+      ref=Data(numpy.array([[-31.0, 11.0, 82.0, 12.0, -34.0], [-6.0, -35.0, 37.0, 4.0, -7.0], [18.0, 8.0, 56.0, 48.0, -19.0], 
+[-3.0, 43.0, 7.0, 16.0, 11.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[50.0, 9.0, -6.0, -36.0, 11.0], [15.0, 41.0, 52.0, 18.0, -52.0], [41.0, -23.0, -13.0, 
+-20.0, -26.0], [-18.0, -65.0, 31.0, -12.0, 55.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank2_offset2(self):
-      arg0=Data(numpy.array([[[[4.0, 4.0, 1.0], [-1.0, -7.0, 6.0]], [[-5.0, -2.0, -5.0], [0.0, -1.0, 6.0]], [[-4.0, -4.0, 3.0], 
-[-5.0, -6.0, 4.0]], [[7.0, -7.0, 0.0], [0.0, 4.0, -6.0]], [[-3.0, 7.0, -5.0], [0.0, 2.0, 0.0]]], [[[-2.0, -4.0, 0.0], [2.0, 
-2.0, -6.0]], [[6.0, 3.0, 3.0], [2.0, 7.0, 2.0]], [[-7.0, -1.0, -6.0], [-3.0, -4.0, 3.0]], [[7.0, 0.0, -4.0], [3.0, -6.0, 3.0]], 
-[[-5.0, -6.0, -4.0], [4.0, -7.0, -7.0]]], [[[-6.0, -1.0, 0.0], [1.0, 3.0, -1.0]], [[-4.0, 2.0, 0.0], [-1.0, -5.0, 0.0]], [[5.0, 
-0.0, -4.0], [3.0, -5.0, 0.0]], [[-4.0, 0.0, 5.0], [4.0, -1.0, -3.0]], [[6.0, -7.0, 5.0], [-5.0, 7.0, -7.0]]], [[[-5.0, 1.0, 
-0.0], [3.0, -1.0, 0.0]], [[1.0, -4.0, 1.0], [6.0, 1.0, 7.0]], [[-7.0, -5.0, -5.0], [6.0, 0.0, 0.0]], [[2.0, -4.0, 0.0], [2.0, 
-7.0, -3.0]], [[-2.0, -1.0, 5.0], [-7.0, 1.0, 3.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-5.0, 0.0, 0.0], [0.0, 4.0, 4.0]])+(1.-msk_arg1)*numpy.array([[-1.0, -7.0, -3.0], [-3.0, 
--2.0, 3.0]])
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, 0.0, -4.0], [5.0, 2.0, 5.0]], [[5.0, 1.0, 3.0], [-7.0, 2.0, -1.0]], [[-1.0, 7.0, 0.0], 
+[-2.0, 5.0, 4.0]], [[0.0, -4.0, -7.0], [1.0, -4.0, 0.0]], [[4.0, -1.0, 6.0], [5.0, 4.0, 3.0]]], [[[1.0, -1.0, 7.0], [-1.0, 
+-2.0, -4.0]], [[-5.0, -3.0, 3.0], [0.0, 4.0, -6.0]], [[-4.0, 6.0, 2.0], [-2.0, -7.0, 5.0]], [[-4.0, 0.0, -1.0], [-4.0, -7.0, 
+4.0]], [[0.0, -2.0, 2.0], [4.0, 3.0, -3.0]]], [[[3.0, 0.0, 2.0], [4.0, 6.0, -4.0]], [[2.0, 5.0, 5.0], [6.0, -3.0, 3.0]], [[0.0, 
+-7.0, -1.0], [-7.0, -4.0, 7.0]], [[-1.0, 0.0, 6.0], [-1.0, 3.0, -4.0]], [[6.0, 0.0, -4.0], [-3.0, 0.0, 0.0]]], [[[-4.0, 0.0, 
+-3.0], [4.0, 2.0, -1.0]], [[-7.0, 5.0, 4.0], [6.0, 2.0, -5.0]], [[0.0, 7.0, -7.0], [7.0, 3.0, 0.0]], [[2.0, 0.0, 5.0], [3.0, 
+0.0, 7.0]], [[6.0, 1.0, 2.0], [1.0, 2.0, -3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[7.0, -2.0, -7.0], [0.0, -2.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, -5.0, 1.0], [-4.0, -3.0, -3.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, 45.0, 12.0, -43.0, 23.0], [-6.0, 6.0, 31.0, -47.0, -31.0], [38.0, 0.0, -45.0, 4.0, 
--30.0], [21.0, 27.0, 35.0, 6.0, 26.0]])+(1.-msk_ref)*numpy.array([[0.0, 54.0, 62.0, 16.0, -35.0], [2.0, -50.0, 58.0, 17.0, 
-40.0], [1.0, 3.0, 8.0, -30.0, 8.0], [-9.0, 25.0, 39.0, -3.0, 22.0]])
+      ref=Data(numpy.array([[37.0, 11.0, -43.0, 65.0, -29.0], [-24.0, -40.0, -55.0, -19.0, -7.0], [7.0, -34.0, 8.0, -43.0, 
+70.0], [-8.0, -76.0, 29.0, -42.0, 31.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-37.0, 33.0, -56.0, 21.0, -22.0], [36.0, 14.0, -22.0, 16.0, -4.0], [-14.0, -40.0, 
+53.0, 11.0, 20.0], [-30.0, -50.0, -79.0, -24.0, 8.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([[-3.0, 0.0, 0.0, -3.0, -6.0], [1.0, -7.0, 0.0, 0.0, 3.0], [-1.0, -1.0, 5.0, -4.0, 0.0], [-5.0, 
-0.0, -7.0, 6.0, -3.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, -4.0])+(1.-msk_arg1)*numpy.array([7.0, 5.0])
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[1.0, 4.0, -2.0, 0.0, -3.0], [-4.0, 1.0, 5.0, -6.0, -7.0], [-2.0, 6.0, 1.0, -6.0, -7.0], [-3.0, 
+-2.0, 2.0, 2.0, 0.0]]),self.functionspace)
+      arg1=Data(numpy.array([5.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, 6.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-18.0, 12.0], [0.0, 0.0], [0.0, 0.0], [-18.0, 12.0], [-36.0, 24.0]], [[6.0, -4.0], [-42.0, 
-28.0], [0.0, 0.0], [0.0, 0.0], [18.0, -12.0]], [[-6.0, 4.0], [-6.0, 4.0], [30.0, -20.0], [-24.0, 16.0], [0.0, 0.0]], [[-30.0, 
-20.0], [0.0, 0.0], [-42.0, 28.0], [36.0, -24.0], [-18.0, 12.0]]])+(1.-msk_ref)*numpy.array([[[-21.0, -15.0], [0.0, 0.0], [0.0, 
-0.0], [-21.0, -15.0], [-42.0, -30.0]], [[7.0, 5.0], [-49.0, -35.0], [0.0, 0.0], [0.0, 0.0], [21.0, 15.0]], [[-7.0, -5.0], 
-[-7.0, -5.0], [35.0, 25.0], [-28.0, -20.0], [0.0, 0.0]], [[-35.0, -25.0], [0.0, 0.0], [-49.0, -35.0], [42.0, 30.0], [-21.0, 
--15.0]]])
+      ref=Data(numpy.array([[[5.0, 2.0], [20.0, 8.0], [-10.0, -4.0], [0.0, 0.0], [-15.0, -6.0]], [[-20.0, -8.0], [5.0, 2.0], 
+[25.0, 10.0], [-30.0, -12.0], [-35.0, -14.0]], [[-10.0, -4.0], [30.0, 12.0], [5.0, 2.0], [-30.0, -12.0], [-35.0, -14.0]], 
+[[-15.0, -6.0], [-10.0, -4.0], [10.0, 4.0], [10.0, 4.0], [0.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[3.0, 6.0], [12.0, 24.0], [-6.0, -12.0], [0.0, 0.0], [-9.0, -18.0]], [[-12.0, -24.0], 
+[3.0, 6.0], [15.0, 30.0], [-18.0, -36.0], [-21.0, -42.0]], [[-6.0, -12.0], [18.0, 36.0], [3.0, 6.0], [-18.0, -36.0], [-21.0, 
+-42.0]], [[-9.0, -18.0], [-6.0, -12.0], [6.0, 12.0], [6.0, 12.0], [0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[-2.0, 7.0, -4.0], [6.0, -2.0, -5.0], [-5.0, 2.0, 7.0], [4.0, 5.0, -7.0], [-2.0, 3.0, 2.0]], 
-[[4.0, 3.0, -3.0], [7.0, -5.0, 2.0], [-5.0, 5.0, -6.0], [1.0, -5.0, -4.0], [-5.0, -3.0, 5.0]], [[-5.0, 6.0, -1.0], [4.0, 4.0, 
-6.0], [-6.0, 0.0, -2.0], [-5.0, -4.0, -1.0], [0.0, 6.0, -1.0]], [[-5.0, 4.0, 5.0], [3.0, -2.0, 4.0], [5.0, 0.0, -5.0], [5.0, 
--4.0, -6.0], [0.0, 6.0, 5.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-7.0, 3.0, 7.0], [3.0, 7.0, 2.0]])+(1.-msk_arg1)*numpy.array([[1.0, 7.0, -4.0], [3.0, -6.0, 
--4.0]])
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, 7.0, -1.0], [-3.0, -7.0, -1.0], [1.0, -2.0, -5.0], [-5.0, 1.0, 5.0], [1.0, -1.0, 2.0]], 
+[[5.0, -6.0, 5.0], [0.0, 0.0, 7.0], [6.0, 4.0, 4.0], [-7.0, -4.0, 7.0], [-4.0, 7.0, 0.0]], [[0.0, 0.0, 3.0], [-6.0, -6.0, 2.0], 
+[-7.0, 5.0, -5.0], [7.0, 4.0, -7.0], [1.0, 0.0, 4.0]], [[-3.0, -2.0, -1.0], [3.0, 1.0, 1.0], [-2.0, -4.0, -6.0], [5.0, -4.0, 
+-1.0], [-4.0, -2.0, -7.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[-4.0, -1.0, 0.0], [-3.0, 2.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-7.0, 2.0, 4.0], [5.0, -2.0, 4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[7.0, 35.0], [-83.0, -6.0], [90.0, 13.0], [-62.0, 33.0], [37.0, 19.0]], [[-40.0, 27.0], [-50.0, 
--10.0], [8.0, 8.0], [-50.0, -40.0], [61.0, -26.0]], [[46.0, 25.0], [26.0, 52.0], [28.0, -22.0], [16.0, -45.0], [11.0, 40.0]], 
-[[82.0, 23.0], [1.0, 3.0], [-70.0, 5.0], [-89.0, -25.0], [53.0, 52.0]]])+(1.-msk_ref)*numpy.array([[[63.0, -32.0], [12.0, 
-50.0], [-19.0, -55.0], [67.0, 10.0], [11.0, -32.0]], [[37.0, 6.0], [-36.0, 43.0], [54.0, -21.0], [-18.0, 49.0], [-46.0, 
--17.0]], [[41.0, -47.0], [8.0, -36.0], [2.0, -10.0], [-29.0, 13.0], [46.0, -32.0]], [[3.0, -59.0], [-27.0, 5.0], [25.0, 35.0], 
-[1.0, 63.0], [22.0, -56.0]]])
+      ref=Data(numpy.array([[[-7.0, 12.0], [19.0, -7.0], [-2.0, -17.0], [19.0, 27.0], [-3.0, -1.0]], [[-14.0, -17.0], [0.0, 
+14.0], [-28.0, -2.0], [32.0, 27.0], [9.0, 26.0]], [[0.0, 6.0], [30.0, 10.0], [23.0, 21.0], [-32.0, -27.0], [-4.0, 5.0]], 
+[[14.0, 3.0], [-13.0, -5.0], [12.0, -14.0], [-16.0, -25.0], [18.0, -6.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[10.0, -18.0], [3.0, -5.0], [-31.0, -11.0], [57.0, -7.0], [-1.0, 15.0]], [[-27.0, 
+57.0], [28.0, 28.0], [-18.0, 38.0], [69.0, 1.0], [42.0, -34.0]], [[12.0, 12.0], [38.0, -10.0], [39.0, -65.0], [-69.0, -1.0], 
+[9.0, 21.0]], [[13.0, -15.0], [-15.0, 17.0], [-18.0, -26.0], [-47.0, 29.0], [-4.0, -44.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank3_offset2(self):
-      arg0=Data(numpy.array([[[[-4.0, 7.0, 3.0], [-1.0, -1.0, 0.0]], [[3.0, 1.0, -5.0], [-4.0, 0.0, 2.0]], [[6.0, 2.0, 3.0], 
-[2.0, 0.0, 7.0]], [[0.0, 5.0, 3.0], [7.0, 5.0, -4.0]], [[2.0, -3.0, -1.0], [-2.0, -3.0, 1.0]]], [[[1.0, 0.0, 4.0], [4.0, 3.0, 
-2.0]], [[3.0, 0.0, 6.0], [5.0, 0.0, -2.0]], [[-2.0, -7.0, 6.0], [3.0, 1.0, 0.0]], [[-5.0, 2.0, -1.0], [-5.0, -4.0, -2.0]], 
-[[-4.0, -1.0, -2.0], [-5.0, 3.0, 4.0]]], [[[4.0, 7.0, -1.0], [-7.0, 3.0, 0.0]], [[4.0, -4.0, -4.0], [-6.0, 1.0, 7.0]], [[-1.0, 
-4.0, -1.0], [-2.0, 2.0, 2.0]], [[-1.0, 2.0, 3.0], [-5.0, 2.0, 7.0]], [[-6.0, 4.0, -5.0], [1.0, 0.0, 6.0]]], [[[-5.0, 0.0, 
--2.0], [-1.0, 2.0, 6.0]], [[-4.0, 4.0, 5.0], [-2.0, -4.0, 1.0]], [[4.0, 5.0, -7.0], [4.0, 7.0, -2.0]], [[-1.0, 2.0, 0.0], [3.0, 
-6.0, 7.0]], [[7.0, 2.0, 6.0], [2.0, -5.0, 6.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[7.0, 0.0, -3.0], [3.0, 4.0, -5.0]], [[0.0, 4.0, -7.0], [6.0, 6.0, 
-4.0]]])+(1.-msk_arg1)*numpy.array([[[-7.0, -1.0, -3.0], [-6.0, 6.0, 7.0]], [[-2.0, 0.0, -7.0], [-6.0, 4.0, -6.0]]])
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[3.0, 3.0, 0.0], [5.0, 7.0, 1.0]], [[1.0, 4.0, 6.0], [3.0, -6.0, -6.0]], [[6.0, 6.0, -6.0], 
+[7.0, 2.0, 7.0]], [[0.0, 7.0, -1.0], [7.0, 0.0, -5.0]], [[2.0, -4.0, -5.0], [-5.0, 0.0, 3.0]]], [[[-7.0, -1.0, 3.0], [-3.0, 
+-4.0, 4.0]], [[2.0, 1.0, 6.0], [1.0, -1.0, 0.0]], [[-4.0, 7.0, 7.0], [-7.0, 7.0, 5.0]], [[0.0, 4.0, -6.0], [3.0, 5.0, -7.0]], 
+[[-4.0, -6.0, -2.0], [5.0, -7.0, 6.0]]], [[[2.0, 0.0, -3.0], [2.0, -1.0, 0.0]], [[7.0, 3.0, -3.0], [0.0, 0.0, 7.0]], [[4.0, 
+6.0, 4.0], [-5.0, 2.0, 6.0]], [[-7.0, 5.0, -7.0], [-5.0, 0.0, 0.0]], [[-1.0, 5.0, -4.0], [-6.0, -1.0, 3.0]]], [[[-1.0, 1.0, 
+-3.0], [3.0, 0.0, -5.0]], [[2.0, -2.0, -1.0], [-4.0, -3.0, -4.0]], [[6.0, 2.0, 3.0], [-5.0, -6.0, -4.0]], [[2.0, -6.0, -5.0], 
+[7.0, -7.0, -5.0]], [[6.0, -1.0, -2.0], [0.0, -2.0, -3.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[-6.0, 2.0, 6.0], [0.0, -2.0, 7.0]], [[5.0, -1.0, -3.0], [-6.0, 6.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -2.0, 5.0], [4.0, 3.0, 0.0]], [[-1.0, -4.0, 7.0], [-6.0, 5.0, 2.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-44.0, -5.0], [14.0, 23.0], [4.0, 27.0], [52.0, 55.0], [-6.0, -31.0]], [[9.0, 22.0], [28.0, 
--20.0], [-19.0, -46.0], [-53.0, -47.0], [-45.0, 14.0]], [[22.0, 11.0], [-9.0, 10.0], [-12.0, 31.0], [-58.0, -3.0], [-54.0, 
-81.0]], [[-54.0, 44.0], [-70.0, -51.0], [99.0, 127.0], [-9.0, 90.0], [-13.0, -28.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 
--11.0], [31.0, 41.0], [-16.0, -87.0], [-54.0, -19.0], [-7.0, -3.0]], [[-11.0, -54.0], [-83.0, -66.0], [-9.0, -52.0], [28.0, 
-43.0], [111.0, 40.0]], [[28.0, 53.0], [79.0, 18.0], [44.0, 17.0], [87.0, -23.0], [89.0, 5.0]], [[101.0, 2.0], [4.0, -37.0], 
-[-8.0, 57.0], [72.0, -34.0], [-69.0, -124.0]]])
+      ref=Data(numpy.array([[[-19.0, 27.0], [8.0, -89.0], [-15.0, 33.0], [-27.0, -61.0], [-29.0, 68.0]], [[94.0, -37.0], [28.0, 
+-21.0], [101.0, 51.0], [-87.0, 5.0], [56.0, -62.0]], [[-28.0, 1.0], [-5.0, 62.0], [50.0, 62.0], [10.0, 11.0], [15.0, 41.0]], 
+[[-45.0, -30.0], [-44.0, 9.0], [-30.0, 1.0], [-75.0, -68.0], [-67.0, 16.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[14.0, -8.0], [9.0, -35.0], [-50.0, -90.0], [9.0, -87.0], [-51.0, 15.0]], [[42.0, 
+38.0], [15.0, 25.0], [42.0, 112.0], [-11.0, -65.0], [29.0, -39.0]], [[-24.0, -40.0], [-70.0, -26.0], [-34.0, 52.0], [-16.0, 
+-32.0], [-50.0, -10.0]], [[2.0, -52.0], [-40.0, 0.0], [-69.0, -1.0], [-20.0, -100.0], [-56.0, -32.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank2_expandedData_rank2_offset0(self):
-      arg0=Data(numpy.array([[-1.0, 6.0, 2.0, 5.0, 3.0], [6.0, -7.0, 0.0, -6.0, 6.0], [5.0, -4.0, 7.0, 0.0, 2.0], [0.0, 3.0, 
-0.0, 0.0, -2.0]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[4.0, 4.0, -7.0, -7.0, -6.0], [-1.0, -7.0, 2.0, 0.0, -2.0], [5.0, 0.0, -2.0, 1.0, -7.0], [4.0, 
-1.0, 0.0, 1.0, 0.0]])+(1.-msk_arg1)*numpy.array([[-1.0, 6.0, 5.0, 0.0, -1.0], [-7.0, -7.0, 2.0, -3.0, 2.0], [5.0, -2.0, 4.0, 
-1.0, -2.0], [3.0, 3.0, 1.0, 7.0, -3.0]])
+   def test_generalTensorTransposedProduct_constData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[1.0, -3.0, -2.0, -4.0, -1.0], [3.0, 7.0, -5.0, -7.0, 7.0], [-2.0, 3.0, -3.0, -5.0, -5.0], [2.0, 
+-1.0, 4.0, 7.0, -5.0]]),self.functionspace)
+      arg1=Data(numpy.array([[-1.0, 2.0, -1.0, 3.0, -1.0], [5.0, 0.0, 0.0, -2.0, 4.0], [0.0, 3.0, 2.0, 5.0, 5.0], [4.0, 6.0, 
+-4.0, -5.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, -3.0, 2.0, 1.0, 4.0], [-3.0, 0.0, -1.0, 0.0, -6.0], [2.0, -6.0, -6.0, 0.0, 
+0.0], [4.0, 4.0, 5.0, 7.0, 4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-4.0, -4.0, 7.0, 7.0, 6.0], [1.0, 7.0, -2.0, 0.0, 2.0], [-5.0, 0.0, 2.0, -1.0, 7.0], [-4.0, 
--1.0, 0.0, -1.0, 0.0]], [[24.0, 24.0, -42.0, -42.0, -36.0], [-6.0, -42.0, 12.0, 0.0, -12.0], [30.0, 0.0, -12.0, 6.0, -42.0], 
-[24.0, 6.0, 0.0, 6.0, 0.0]], [[8.0, 8.0, -14.0, -14.0, -12.0], [-2.0, -14.0, 4.0, 0.0, -4.0], [10.0, 0.0, -4.0, 2.0, -14.0], 
-[8.0, 2.0, 0.0, 2.0, 0.0]], [[20.0, 20.0, -35.0, -35.0, -30.0], [-5.0, -35.0, 10.0, 0.0, -10.0], [25.0, 0.0, -10.0, 5.0, 
--35.0], [20.0, 5.0, 0.0, 5.0, 0.0]], [[12.0, 12.0, -21.0, -21.0, -18.0], [-3.0, -21.0, 6.0, 0.0, -6.0], [15.0, 0.0, -6.0, 3.0, 
--21.0], [12.0, 3.0, 0.0, 3.0, 0.0]]], [[[24.0, 24.0, -42.0, -42.0, -36.0], [-6.0, -42.0, 12.0, 0.0, -12.0], [30.0, 0.0, -12.0, 
-6.0, -42.0], [24.0, 6.0, 0.0, 6.0, 0.0]], [[-28.0, -28.0, 49.0, 49.0, 42.0], [7.0, 49.0, -14.0, 0.0, 14.0], [-35.0, 0.0, 14.0, 
--7.0, 49.0], [-28.0, -7.0, 0.0, -7.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[-24.0, -24.0, 42.0, 42.0, 36.0], [6.0, 42.0, -12.0, 0.0, 12.0], [-30.0, 0.0, 12.0, -6.0, 42.0], 
-[-24.0, -6.0, 0.0, -6.0, 0.0]], [[24.0, 24.0, -42.0, -42.0, -36.0], [-6.0, -42.0, 12.0, 0.0, -12.0], [30.0, 0.0, -12.0, 6.0, 
--42.0], [24.0, 6.0, 0.0, 6.0, 0.0]]], [[[20.0, 20.0, -35.0, -35.0, -30.0], [-5.0, -35.0, 10.0, 0.0, -10.0], [25.0, 0.0, -10.0, 
-5.0, -35.0], [20.0, 5.0, 0.0, 5.0, 0.0]], [[-16.0, -16.0, 28.0, 28.0, 24.0], [4.0, 28.0, -8.0, 0.0, 8.0], [-20.0, 0.0, 8.0, 
--4.0, 28.0], [-16.0, -4.0, 0.0, -4.0, 0.0]], [[28.0, 28.0, -49.0, -49.0, -42.0], [-7.0, -49.0, 14.0, 0.0, -14.0], [35.0, 0.0, 
--14.0, 7.0, -49.0], [28.0, 7.0, 0.0, 7.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[8.0, 8.0, -14.0, -14.0, -12.0], [-2.0, -14.0, 4.0, 0.0, -4.0], [10.0, 0.0, -4.0, 2.0, 
--14.0], [8.0, 2.0, 0.0, 2.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[12.0, 12.0, -21.0, -21.0, -18.0], [-3.0, -21.0, 6.0, 0.0, -6.0], [15.0, 0.0, -6.0, 3.0, -21.0], [12.0, 
-3.0, 0.0, 3.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-8.0, 
--8.0, 14.0, 14.0, 12.0], [2.0, 14.0, -4.0, 0.0, 4.0], [-10.0, 0.0, 4.0, -2.0, 14.0], [-8.0, -2.0, 0.0, -2.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, -6.0, -5.0, 0.0, 1.0], [7.0, 7.0, -2.0, 3.0, -2.0], [-5.0, 2.0, -4.0, -1.0, 2.0], 
-[-3.0, -3.0, -1.0, -7.0, 3.0]], [[-6.0, 36.0, 30.0, 0.0, -6.0], [-42.0, -42.0, 12.0, -18.0, 12.0], [30.0, -12.0, 24.0, 6.0, 
--12.0], [18.0, 18.0, 6.0, 42.0, -18.0]], [[-2.0, 12.0, 10.0, 0.0, -2.0], [-14.0, -14.0, 4.0, -6.0, 4.0], [10.0, -4.0, 8.0, 2.0, 
--4.0], [6.0, 6.0, 2.0, 14.0, -6.0]], [[-5.0, 30.0, 25.0, 0.0, -5.0], [-35.0, -35.0, 10.0, -15.0, 10.0], [25.0, -10.0, 20.0, 
-5.0, -10.0], [15.0, 15.0, 5.0, 35.0, -15.0]], [[-3.0, 18.0, 15.0, 0.0, -3.0], [-21.0, -21.0, 6.0, -9.0, 6.0], [15.0, -6.0, 
-12.0, 3.0, -6.0], [9.0, 9.0, 3.0, 21.0, -9.0]]], [[[-6.0, 36.0, 30.0, 0.0, -6.0], [-42.0, -42.0, 12.0, -18.0, 12.0], [30.0, 
--12.0, 24.0, 6.0, -12.0], [18.0, 18.0, 6.0, 42.0, -18.0]], [[7.0, -42.0, -35.0, 0.0, 7.0], [49.0, 49.0, -14.0, 21.0, -14.0], 
-[-35.0, 14.0, -28.0, -7.0, 14.0], [-21.0, -21.0, -7.0, -49.0, 21.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[6.0, -36.0, -30.0, 0.0, 6.0], [42.0, 42.0, -12.0, 18.0, -12.0], 
-[-30.0, 12.0, -24.0, -6.0, 12.0], [-18.0, -18.0, -6.0, -42.0, 18.0]], [[-6.0, 36.0, 30.0, 0.0, -6.0], [-42.0, -42.0, 12.0, 
--18.0, 12.0], [30.0, -12.0, 24.0, 6.0, -12.0], [18.0, 18.0, 6.0, 42.0, -18.0]]], [[[-5.0, 30.0, 25.0, 0.0, -5.0], [-35.0, 
--35.0, 10.0, -15.0, 10.0], [25.0, -10.0, 20.0, 5.0, -10.0], [15.0, 15.0, 5.0, 35.0, -15.0]], [[4.0, -24.0, -20.0, 0.0, 4.0], 
-[28.0, 28.0, -8.0, 12.0, -8.0], [-20.0, 8.0, -16.0, -4.0, 8.0], [-12.0, -12.0, -4.0, -28.0, 12.0]], [[-7.0, 42.0, 35.0, 0.0, 
--7.0], [-49.0, -49.0, 14.0, -21.0, 14.0], [35.0, -14.0, 28.0, 7.0, -14.0], [21.0, 21.0, 7.0, 49.0, -21.0]], [[0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-2.0, 12.0, 10.0, 0.0, -2.0], 
-[-14.0, -14.0, 4.0, -6.0, 4.0], [10.0, -4.0, 8.0, 2.0, -4.0], [6.0, 6.0, 2.0, 14.0, -6.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-3.0, 18.0, 15.0, 0.0, -3.0], [-21.0, -21.0, 6.0, 
--9.0, 6.0], [15.0, -6.0, 12.0, 3.0, -6.0], [9.0, 9.0, 3.0, 21.0, -9.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[2.0, -12.0, -10.0, 0.0, 2.0], [14.0, 14.0, -4.0, 6.0, -4.0], [-10.0, 4.0, -8.0, -2.0, 
-4.0], [-6.0, -6.0, -2.0, -14.0, 6.0]]]])
+      ref=Data(numpy.array([[[[-1.0, 2.0, -1.0, 3.0, -1.0], [5.0, 0.0, 0.0, -2.0, 4.0], [0.0, 3.0, 2.0, 5.0, 5.0], [4.0, 6.0, 
+-4.0, -5.0, -7.0]], [[3.0, -6.0, 3.0, -9.0, 3.0], [-15.0, 0.0, 0.0, 6.0, -12.0], [0.0, -9.0, -6.0, -15.0, -15.0], [-12.0, 
+-18.0, 12.0, 15.0, 21.0]], [[2.0, -4.0, 2.0, -6.0, 2.0], [-10.0, 0.0, 0.0, 4.0, -8.0], [0.0, -6.0, -4.0, -10.0, -10.0], [-8.0, 
+-12.0, 8.0, 10.0, 14.0]], [[4.0, -8.0, 4.0, -12.0, 4.0], [-20.0, 0.0, 0.0, 8.0, -16.0], [0.0, -12.0, -8.0, -20.0, -20.0], 
+[-16.0, -24.0, 16.0, 20.0, 28.0]], [[1.0, -2.0, 1.0, -3.0, 1.0], [-5.0, 0.0, 0.0, 2.0, -4.0], [0.0, -3.0, -2.0, -5.0, -5.0], 
+[-4.0, -6.0, 4.0, 5.0, 7.0]]], [[[-3.0, 6.0, -3.0, 9.0, -3.0], [15.0, 0.0, 0.0, -6.0, 12.0], [0.0, 9.0, 6.0, 15.0, 15.0], 
+[12.0, 18.0, -12.0, -15.0, -21.0]], [[-7.0, 14.0, -7.0, 21.0, -7.0], [35.0, 0.0, 0.0, -14.0, 28.0], [0.0, 21.0, 14.0, 35.0, 
+35.0], [28.0, 42.0, -28.0, -35.0, -49.0]], [[5.0, -10.0, 5.0, -15.0, 5.0], [-25.0, 0.0, 0.0, 10.0, -20.0], [0.0, -15.0, -10.0, 
+-25.0, -25.0], [-20.0, -30.0, 20.0, 25.0, 35.0]], [[7.0, -14.0, 7.0, -21.0, 7.0], [-35.0, 0.0, 0.0, 14.0, -28.0], [0.0, -21.0, 
+-14.0, -35.0, -35.0], [-28.0, -42.0, 28.0, 35.0, 49.0]], [[-7.0, 14.0, -7.0, 21.0, -7.0], [35.0, 0.0, 0.0, -14.0, 28.0], [0.0, 
+21.0, 14.0, 35.0, 35.0], [28.0, 42.0, -28.0, -35.0, -49.0]]], [[[2.0, -4.0, 2.0, -6.0, 2.0], [-10.0, 0.0, 0.0, 4.0, -8.0], 
+[0.0, -6.0, -4.0, -10.0, -10.0], [-8.0, -12.0, 8.0, 10.0, 14.0]], [[-3.0, 6.0, -3.0, 9.0, -3.0], [15.0, 0.0, 0.0, -6.0, 12.0], 
+[0.0, 9.0, 6.0, 15.0, 15.0], [12.0, 18.0, -12.0, -15.0, -21.0]], [[3.0, -6.0, 3.0, -9.0, 3.0], [-15.0, 0.0, 0.0, 6.0, -12.0], 
+[0.0, -9.0, -6.0, -15.0, -15.0], [-12.0, -18.0, 12.0, 15.0, 21.0]], [[5.0, -10.0, 5.0, -15.0, 5.0], [-25.0, 0.0, 0.0, 10.0, 
+-20.0], [0.0, -15.0, -10.0, -25.0, -25.0], [-20.0, -30.0, 20.0, 25.0, 35.0]], [[5.0, -10.0, 5.0, -15.0, 5.0], [-25.0, 0.0, 0.0, 
+10.0, -20.0], [0.0, -15.0, -10.0, -25.0, -25.0], [-20.0, -30.0, 20.0, 25.0, 35.0]]], [[[-2.0, 4.0, -2.0, 6.0, -2.0], [10.0, 
+0.0, 0.0, -4.0, 8.0], [0.0, 6.0, 4.0, 10.0, 10.0], [8.0, 12.0, -8.0, -10.0, -14.0]], [[1.0, -2.0, 1.0, -3.0, 1.0], [-5.0, 0.0, 
+0.0, 2.0, -4.0], [0.0, -3.0, -2.0, -5.0, -5.0], [-4.0, -6.0, 4.0, 5.0, 7.0]], [[-4.0, 8.0, -4.0, 12.0, -4.0], [20.0, 0.0, 0.0, 
+-8.0, 16.0], [0.0, 12.0, 8.0, 20.0, 20.0], [16.0, 24.0, -16.0, -20.0, -28.0]], [[-7.0, 14.0, -7.0, 21.0, -7.0], [35.0, 0.0, 
+0.0, -14.0, 28.0], [0.0, 21.0, 14.0, 35.0, 35.0], [28.0, 42.0, -28.0, -35.0, -49.0]], [[5.0, -10.0, 5.0, -15.0, 5.0], [-25.0, 
+0.0, 0.0, 10.0, -20.0], [0.0, -15.0, -10.0, -25.0, -25.0], [-20.0, -30.0, 20.0, 25.0, 35.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-5.0, -3.0, 2.0, 1.0, 4.0], [-3.0, 0.0, -1.0, 0.0, -6.0], [2.0, -6.0, -6.0, 0.0, 
+0.0], [4.0, 4.0, 5.0, 7.0, 4.0]], [[15.0, 9.0, -6.0, -3.0, -12.0], [9.0, 0.0, 3.0, 0.0, 18.0], [-6.0, 18.0, 18.0, 0.0, 0.0], 
+[-12.0, -12.0, -15.0, -21.0, -12.0]], [[10.0, 6.0, -4.0, -2.0, -8.0], [6.0, 0.0, 2.0, 0.0, 12.0], [-4.0, 12.0, 12.0, 0.0, 0.0], 
+[-8.0, -8.0, -10.0, -14.0, -8.0]], [[20.0, 12.0, -8.0, -4.0, -16.0], [12.0, 0.0, 4.0, 0.0, 24.0], [-8.0, 24.0, 24.0, 0.0, 0.0], 
+[-16.0, -16.0, -20.0, -28.0, -16.0]], [[5.0, 3.0, -2.0, -1.0, -4.0], [3.0, 0.0, 1.0, 0.0, 6.0], [-2.0, 6.0, 6.0, 0.0, 0.0], 
+[-4.0, -4.0, -5.0, -7.0, -4.0]]], [[[-15.0, -9.0, 6.0, 3.0, 12.0], [-9.0, 0.0, -3.0, 0.0, -18.0], [6.0, -18.0, -18.0, 0.0, 
+0.0], [12.0, 12.0, 15.0, 21.0, 12.0]], [[-35.0, -21.0, 14.0, 7.0, 28.0], [-21.0, 0.0, -7.0, 0.0, -42.0], [14.0, -42.0, -42.0, 
+0.0, 0.0], [28.0, 28.0, 35.0, 49.0, 28.0]], [[25.0, 15.0, -10.0, -5.0, -20.0], [15.0, 0.0, 5.0, 0.0, 30.0], [-10.0, 30.0, 30.0, 
+0.0, 0.0], [-20.0, -20.0, -25.0, -35.0, -20.0]], [[35.0, 21.0, -14.0, -7.0, -28.0], [21.0, 0.0, 7.0, 0.0, 42.0], [-14.0, 42.0, 
+42.0, 0.0, 0.0], [-28.0, -28.0, -35.0, -49.0, -28.0]], [[-35.0, -21.0, 14.0, 7.0, 28.0], [-21.0, 0.0, -7.0, 0.0, -42.0], [14.0, 
+-42.0, -42.0, 0.0, 0.0], [28.0, 28.0, 35.0, 49.0, 28.0]]], [[[10.0, 6.0, -4.0, -2.0, -8.0], [6.0, 0.0, 2.0, 0.0, 12.0], [-4.0, 
+12.0, 12.0, 0.0, 0.0], [-8.0, -8.0, -10.0, -14.0, -8.0]], [[-15.0, -9.0, 6.0, 3.0, 12.0], [-9.0, 0.0, -3.0, 0.0, -18.0], [6.0, 
+-18.0, -18.0, 0.0, 0.0], [12.0, 12.0, 15.0, 21.0, 12.0]], [[15.0, 9.0, -6.0, -3.0, -12.0], [9.0, 0.0, 3.0, 0.0, 18.0], [-6.0, 
+18.0, 18.0, 0.0, 0.0], [-12.0, -12.0, -15.0, -21.0, -12.0]], [[25.0, 15.0, -10.0, -5.0, -20.0], [15.0, 0.0, 5.0, 0.0, 30.0], 
+[-10.0, 30.0, 30.0, 0.0, 0.0], [-20.0, -20.0, -25.0, -35.0, -20.0]], [[25.0, 15.0, -10.0, -5.0, -20.0], [15.0, 0.0, 5.0, 0.0, 
+30.0], [-10.0, 30.0, 30.0, 0.0, 0.0], [-20.0, -20.0, -25.0, -35.0, -20.0]]], [[[-10.0, -6.0, 4.0, 2.0, 8.0], [-6.0, 0.0, -2.0, 
+0.0, -12.0], [4.0, -12.0, -12.0, 0.0, 0.0], [8.0, 8.0, 10.0, 14.0, 8.0]], [[5.0, 3.0, -2.0, -1.0, -4.0], [3.0, 0.0, 1.0, 0.0, 
+6.0], [-2.0, 6.0, 6.0, 0.0, 0.0], [-4.0, -4.0, -5.0, -7.0, -4.0]], [[-20.0, -12.0, 8.0, 4.0, 16.0], [-12.0, 0.0, -4.0, 0.0, 
+-24.0], [8.0, -24.0, -24.0, 0.0, 0.0], [16.0, 16.0, 20.0, 28.0, 16.0]], [[-35.0, -21.0, 14.0, 7.0, 28.0], [-21.0, 0.0, -7.0, 
+0.0, -42.0], [14.0, -42.0, -42.0, 0.0, 0.0], [28.0, 28.0, 35.0, 49.0, 28.0]], [[25.0, 15.0, -10.0, -5.0, -20.0], [15.0, 0.0, 
+5.0, 0.0, 30.0], [-10.0, 30.0, 30.0, 0.0, 0.0], [-20.0, -20.0, -25.0, -35.0, -20.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank3_offset1(self):
-      arg0=Data(numpy.array([[[5.0, -7.0, 1.0], [7.0, -1.0, -4.0], [-5.0, 5.0, 0.0], [-7.0, 0.0, 6.0], [-7.0, -1.0, -2.0]], 
-[[1.0, 1.0, 1.0], [-2.0, 0.0, 1.0], [0.0, -1.0, 7.0], [4.0, 3.0, 0.0], [-1.0, 5.0, -3.0]], [[1.0, 3.0, -3.0], [6.0, -1.0, 5.0], 
-[-3.0, 5.0, 4.0], [4.0, -5.0, 1.0], [-2.0, -5.0, 6.0]], [[4.0, -7.0, 0.0], [-1.0, -6.0, 0.0], [0.0, 7.0, 0.0], [7.0, -6.0, 
-0.0], [6.0, 0.0, 0.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[4.0, 3.0, -3.0], [5.0, 0.0, -5.0], [-2.0, -1.0, 7.0], [7.0, 1.0, -6.0], [-6.0, -1.0, -3.0]], 
-[[-4.0, 6.0, 5.0], [6.0, -6.0, 7.0], [5.0, 4.0, -5.0], [1.0, 0.0, 2.0], [0.0, 0.0, -1.0]], [[1.0, -5.0, -6.0], [0.0, 0.0, 0.0], 
-[1.0, 0.0, 2.0], [-6.0, 4.0, 1.0], [3.0, 4.0, -1.0]], [[-2.0, 3.0, -5.0], [2.0, -2.0, -3.0], [-1.0, -6.0, 7.0], [4.0, 0.0, 
--7.0], [3.0, 0.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[2.0, 0.0, -7.0], [-2.0, -5.0, 3.0], [2.0, 7.0, 2.0], [2.0, 3.0, 2.0], 
-[6.0, -2.0, -6.0]], [[0.0, -1.0, -1.0], [5.0, -2.0, 1.0], [6.0, -5.0, 1.0], [-3.0, 1.0, 2.0], [0.0, -3.0, 5.0]], [[-5.0, 2.0, 
--7.0], [-6.0, 0.0, 0.0], [1.0, -6.0, -4.0], [2.0, -6.0, -2.0], [-2.0, 0.0, -2.0]], [[3.0, 3.0, -2.0], [-1.0, -4.0, 4.0], [-4.0, 
--1.0, 1.0], [0.0, -5.0, 1.0], [-5.0, -5.0, 2.0]]])
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-2.0, 3.0, 4.0], [-1.0, -2.0, 3.0], [-5.0, -4.0, -2.0], [-4.0, -7.0, -1.0], [-6.0, 0.0, 2.0]], 
+[[0.0, -3.0, -4.0], [1.0, -3.0, -5.0], [3.0, -3.0, -4.0], [2.0, 0.0, -3.0], [-3.0, 0.0, -2.0]], [[3.0, 7.0, -4.0], [6.0, 5.0, 
+-7.0], [-6.0, 0.0, -1.0], [6.0, 5.0, -7.0], [1.0, -6.0, 7.0]], [[-1.0, -1.0, 0.0], [-5.0, 6.0, 1.0], [-4.0, 0.0, 0.0], [7.0, 
+-1.0, -3.0], [-7.0, 0.0, 3.0]]]),self.functionspace)
+      arg1=Data(numpy.array([[[7.0, 4.0, 3.0], [-3.0, -4.0, 0.0], [6.0, 0.0, 7.0], [-4.0, -2.0, 4.0], [2.0, 7.0, 6.0]], [[4.0, 
+4.0, -7.0], [-4.0, 1.0, -5.0], [1.0, -3.0, -2.0], [0.0, 2.0, 7.0], [0.0, 0.0, -1.0]], [[6.0, -1.0, -2.0], [-2.0, -5.0, 3.0], 
+[7.0, -2.0, 1.0], [0.0, 4.0, -2.0], [-5.0, -4.0, -6.0]], [[-7.0, 4.0, 3.0], [-7.0, 7.0, 0.0], [-1.0, 6.0, 5.0], [4.0, 0.0, 
+5.0], [1.0, -3.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, -6.0, 0.0], [-4.0, 7.0, 0.0], [-7.0, -6.0, -2.0], [-3.0, 0.0, 2.0], [-4.0, 
+0.0, -5.0]], [[7.0, 7.0, 7.0], [-4.0, -2.0, 0.0], [0.0, 3.0, -6.0], [7.0, -1.0, 3.0], [5.0, 6.0, 1.0]], [[3.0, 4.0, 7.0], [4.0, 
+6.0, -7.0], [-2.0, 2.0, -1.0], [0.0, 5.0, 2.0], [2.0, 0.0, 4.0]], [[6.0, -2.0, -6.0], [3.0, -4.0, 7.0], [-3.0, -6.0, -7.0], 
+[7.0, 1.0, -5.0], [2.0, -6.0, -5.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-4.0, 20.0, 4.0, 22.0, -26.0], [-57.0, 79.0, -8.0, 7.0, -1.0], [34.0, 0.0, 7.0, -57.0, 
--14.0], [-36.0, 21.0, 44.0, 13.0, 22.0]], [[37.0, 55.0, -41.0, 72.0, -29.0], [-54.0, 20.0, 51.0, -1.0, 4.0], [36.0, 0.0, -1.0, 
--50.0, 21.0], [3.0, 28.0, -29.0, 56.0, -7.0]], [[-5.0, -25.0, 5.0, -30.0, 25.0], [50.0, -60.0, -5.0, -5.0, 0.0], [-30.0, 0.0, 
--5.0, 50.0, 5.0], [25.0, -20.0, -25.0, -20.0, -15.0]], [[-46.0, -65.0, 56.0, -85.0, 24.0], [58.0, 0.0, -65.0, 5.0, -6.0], 
-[-43.0, 0.0, 5.0, 48.0, -27.0], [-16.0, -32.0, 49.0, -70.0, 21.0]], [[-25.0, -25.0, 1.0, -38.0, 49.0], [12.0, -50.0, -29.0, 
--11.0, 2.0], [10.0, 0.0, -11.0, 36.0, -23.0], [21.0, -6.0, -1.0, -14.0, -35.0]]], [[[4.0, 0.0, 4.0, 2.0, -10.0], [7.0, 7.0, 
-4.0, 3.0, -1.0], [-10.0, 0.0, 3.0, -1.0, 6.0], [-4.0, -3.0, 0.0, -3.0, 10.0]], [[-11.0, -15.0, 11.0, -20.0, 9.0], [13.0, -5.0, 
--15.0, 0.0, -1.0], [-8.0, 0.0, 0.0, 13.0, -7.0], [-1.0, -7.0, 9.0, -15.0, 1.0]], [[-24.0, -35.0, 50.0, -43.0, -20.0], [29.0, 
-55.0, -39.0, 14.0, -7.0], [-37.0, 0.0, 14.0, 3.0, -11.0], [-38.0, -19.0, 55.0, -49.0, 49.0]], [[25.0, 20.0, -11.0, 31.0, 
--27.0], [2.0, 6.0, 32.0, 4.0, 0.0], [-11.0, 0.0, 4.0, -12.0, 24.0], [1.0, 2.0, -22.0, 16.0, 12.0]], [[20.0, 10.0, -24.0, 16.0, 
-10.0], [19.0, -57.0, 30.0, -7.0, 3.0], [-8.0, 0.0, -7.0, 23.0, 20.0], [32.0, -3.0, -50.0, 17.0, -24.0]]], [[[22.0, 20.0, -26.0, 
-28.0, 0.0], [-1.0, -33.0, 32.0, -5.0, 3.0], [4.0, 0.0, -5.0, 3.0, 18.0], [22.0, 5.0, -40.0, 25.0, -18.0]], [[6.0, 5.0, 24.0, 
-11.0, -50.0], [-5.0, 77.0, 1.0, 16.0, -5.0], [-19.0, 0.0, 16.0, -35.0, 9.0], [-40.0, -1.0, 35.0, -11.0, 53.0]], [[-9.0, -35.0, 
-29.0, -40.0, 1.0], [62.0, -20.0, -15.0, 5.0, -4.0], [-52.0, 0.0, 5.0, 42.0, 7.0], [1.0, -28.0, 1.0, -40.0, 19.0]], [[-2.0, 
-15.0, 4.0, 17.0, -22.0], [-41.0, 61.0, -5.0, 6.0, -1.0], [23.0, 0.0, 6.0, -43.0, -9.0], [-28.0, 15.0, 33.0, 9.0, 19.0]], 
-[[-41.0, -40.0, 51.0, -55.0, -1.0], [8.0, 60.0, -60.0, 10.0, -6.0], [-13.0, 0.0, 10.0, -2.0, -32.0], [-41.0, -12.0, 74.0, 
--50.0, 36.0]]], [[[-5.0, 20.0, -1.0, 21.0, -17.0], [-58.0, 66.0, -8.0, 4.0, 0.0], [39.0, 0.0, 4.0, -52.0, -16.0], [-29.0, 22.0, 
-38.0, 16.0, 12.0]], [[-22.0, -5.0, 8.0, -13.0, 12.0], [-32.0, 30.0, -29.0, -1.0, 0.0], [29.0, 0.0, -1.0, -18.0, -27.0], [-16.0, 
-10.0, 37.0, -4.0, -3.0]], [[21.0, 0.0, -7.0, 7.0, -7.0], [42.0, -42.0, 28.0, 0.0, 0.0], [-35.0, 0.0, 0.0, 28.0, 28.0], [21.0, 
--14.0, -42.0, 0.0, 0.0]], [[10.0, 35.0, -8.0, 43.0, -36.0], [-64.0, 78.0, 11.0, 7.0, 0.0], [37.0, 0.0, 7.0, -66.0, -3.0], 
-[-32.0, 26.0, 29.0, 28.0, 21.0]], [[24.0, 30.0, -12.0, 42.0, -36.0], [-24.0, 36.0, 30.0, 6.0, 0.0], [6.0, 0.0, 6.0, -36.0, 
-18.0], [-12.0, 12.0, -6.0, 24.0, 18.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 28.0, -37.0, -9.0, 38.0], [6.0, 40.0, 66.0, -20.0, 
-26.0], [-46.0, -30.0, 43.0, 50.0, -12.0], [-8.0, 27.0, -12.0, 36.0, 12.0]], [[42.0, -21.0, -1.0, 3.0, 68.0], [5.0, 33.0, 43.0, 
--30.0, -17.0], [-9.0, -42.0, 29.0, 28.0, -6.0], [26.0, -19.0, -31.0, 1.0, -38.0]], [[-10.0, -15.0, 25.0, 5.0, -40.0], [-5.0, 
--35.0, -55.0, 20.0, -15.0], [35.0, 30.0, -35.0, -40.0, 10.0], [0.0, -15.0, 15.0, -25.0, 0.0]], [[-56.0, 32.0, -2.0, -2.0, 
--78.0], [-6.0, -29.0, -36.0, 33.0, 30.0], [-7.0, 42.0, -31.0, -26.0, 2.0], [-33.0, 31.0, 34.0, 6.0, 47.0]], [[0.0, 13.0, -25.0, 
--21.0, -28.0], [3.0, -35.0, -39.0, 16.0, -7.0], [47.0, 42.0, 7.0, -4.0, 18.0], [-20.0, 3.0, 27.0, 3.0, 36.0]]], [[[-5.0, -4.0, 
-11.0, 7.0, -2.0], [-2.0, 4.0, 2.0, 0.0, 2.0], [-10.0, -6.0, -9.0, -6.0, -4.0], [4.0, -1.0, -4.0, -4.0, -8.0]], [[-11.0, 7.0, 
--2.0, -2.0, -18.0], [-1.0, -9.0, -11.0, 8.0, 5.0], [3.0, 12.0, -6.0, -6.0, 2.0], [-8.0, 6.0, 9.0, 1.0, 12.0]], [[-49.0, 26.0, 
-7.0, 11.0, -40.0], [-6.0, 9.0, 12.0, 13.0, 38.0], [-51.0, 0.0, -22.0, -8.0, -14.0], [-17.0, 32.0, 8.0, 12.0, 19.0]], [[8.0, 
--23.0, 29.0, 17.0, 18.0], [-3.0, 14.0, 9.0, -9.0, -9.0], [-14.0, -24.0, -14.0, -10.0, -8.0], [21.0, -16.0, -19.0, -15.0, 
--35.0]], [[19.0, -32.0, 27.0, 7.0, 2.0], [-2.0, -18.0, -34.0, 2.0, -30.0], [36.0, 6.0, -19.0, -26.0, 8.0], [18.0, -31.0, -4.0, 
--28.0, -26.0]]], [[[23.0, -26.0, 17.0, 5.0, 18.0], [0.0, -4.0, -12.0, -6.0, -24.0], [22.0, -6.0, -5.0, -10.0, 4.0], [18.0, 
--25.0, -10.0, -18.0, -26.0]], [[-23.0, 8.0, 15.0, 19.0, 8.0], [-4.0, 37.0, 46.0, -9.0, 28.0], [-67.0, -36.0, -8.0, 8.0, -22.0], 
-[5.0, 18.0, -18.0, 10.0, -15.0]], [[-34.0, -7.0, 37.0, 17.0, -52.0], [-9.0, -21.0, -39.0, 22.0, 5.0], [-3.0, 18.0, -49.0, 
--44.0, -2.0], [-2.0, -1.0, 11.0, -21.0, -2.0]], [[1.0, 20.0, -25.0, -5.0, 28.0], [4.0, 31.0, 50.0, -15.0, 20.0], [-37.0, -24.0, 
-30.0, 36.0, -10.0], [-5.0, 20.0, -10.0, 26.0, 7.0]], [[-46.0, 47.0, -27.0, -7.0, -38.0], [-1.0, 6.0, 19.0, 13.0, 45.0], [-42.0, 
-12.0, 4.0, 14.0, -8.0], [-33.0, 46.0, 19.0, 31.0, 47.0]]], [[[8.0, 27.0, -41.0, -13.0, 38.0], [7.0, 34.0, 59.0, -19.0, 21.0], 
-[-34.0, -24.0, 46.0, 50.0, -8.0], [-9.0, 24.0, -9.0, 35.0, 15.0]], [[-2.0, 32.0, -44.0, -20.0, 6.0], [6.0, 7.0, 24.0, -3.0, 
-18.0], [-7.0, 6.0, 35.0, 34.0, 2.0], [-21.0, 25.0, 10.0, 30.0, 35.0]], [[0.0, -35.0, 49.0, 21.0, -14.0], [-7.0, -14.0, -35.0, 
-7.0, -21.0], [14.0, 0.0, -42.0, -42.0, 0.0], [21.0, -28.0, -7.0, -35.0, -35.0]], [[14.0, 16.0, -28.0, -4.0, 54.0], [6.0, 47.0, 
-72.0, -27.0, 18.0], [-47.0, -42.0, 43.0, 50.0, -14.0], [3.0, 17.0, -22.0, 30.0, -5.0]], [[12.0, -12.0, 12.0, 12.0, 36.0], [0.0, 
-30.0, 36.0, -18.0, 0.0], [-30.0, -36.0, 6.0, 12.0, -12.0], [18.0, -6.0, -24.0, 0.0, -30.0]]]])
+      ref=Data(numpy.array([[[[10.0, -6.0, 16.0, 18.0, 41.0], [-24.0, -9.0, -19.0, 34.0, -4.0], [-23.0, 1.0, -16.0, 4.0, 
+-26.0], [38.0, 35.0, 40.0, 12.0, -39.0]], [[-6.0, 11.0, 15.0, 20.0, 2.0], [-33.0, -13.0, -1.0, 17.0, -3.0], [-10.0, 21.0, 0.0, 
+-14.0, -5.0], [8.0, -7.0, 4.0, 11.0, -16.0]], [[-57.0, 31.0, -44.0, 20.0, -50.0], [-22.0, 26.0, 11.0, -22.0, 2.0], [-22.0, 
+24.0, -29.0, -12.0, 53.0], [13.0, 7.0, -29.0, -30.0, 21.0]], [[-59.0, 40.0, -31.0, 26.0, -63.0], [-37.0, 14.0, 19.0, -21.0, 
+1.0], [-15.0, 40.0, -15.0, -26.0, 54.0], [-3.0, -21.0, -43.0, -21.0, 24.0]], [[-36.0, 18.0, -22.0, 32.0, 0.0], [-38.0, 14.0, 
+-10.0, 14.0, -2.0], [-40.0, 18.0, -40.0, -4.0, 18.0], [48.0, 42.0, 16.0, -14.0, -20.0]]], [[[-24.0, 12.0, -28.0, -10.0, -45.0], 
+[16.0, 17.0, 17.0, -34.0, 4.0], [11.0, 3.0, 2.0, -4.0, 36.0], [-24.0, -21.0, -38.0, -20.0, 37.0]], [[-20.0, 9.0, -29.0, -18.0, 
+-49.0], [27.0, 18.0, 20.0, -41.0, 5.0], [19.0, -2.0, 8.0, -2.0, 37.0], [-34.0, -28.0, -44.0, -21.0, 45.0]], [[-3.0, 3.0, -10.0, 
+-22.0, -39.0], [28.0, 5.0, 20.0, -34.0, 4.0], [29.0, -3.0, 23.0, -4.0, 21.0], [-45.0, -42.0, -41.0, -8.0, 40.0]], [[5.0, -6.0, 
+-9.0, -20.0, -14.0], [29.0, 7.0, 8.0, -21.0, 3.0], [18.0, -13.0, 11.0, 6.0, 8.0], [-23.0, -14.0, -17.0, -7.0, 23.0]], [[-27.0, 
+9.0, -32.0, 4.0, -18.0], [2.0, 22.0, 1.0, -14.0, 2.0], [-14.0, 0.0, -23.0, 4.0, 27.0], [15.0, 21.0, -7.0, -22.0, 11.0]]], 
+[[[37.0, -37.0, -10.0, -42.0, 31.0], [68.0, 15.0, -10.0, -14.0, 4.0], [19.0, -53.0, 3.0, 36.0, -19.0], [-5.0, 28.0, 19.0, -8.0, 
+10.0]], [[41.0, -38.0, -13.0, -62.0, 5.0], [93.0, 16.0, 5.0, -39.0, 7.0], [45.0, -58.0, 25.0, 34.0, -8.0], [-43.0, -7.0, -11.0, 
+-11.0, 40.0]], [[-45.0, 18.0, -43.0, 20.0, -18.0], [-17.0, 29.0, -4.0, -7.0, 1.0], [-34.0, 9.0, -43.0, 2.0, 36.0], [39.0, 42.0, 
+1.0, -29.0, 1.0]], [[41.0, -38.0, -13.0, -62.0, 5.0], [93.0, 16.0, 5.0, -39.0, 7.0], [45.0, -58.0, 25.0, 34.0, -8.0], [-43.0, 
+-7.0, -11.0, -11.0, 40.0]], [[4.0, 21.0, 55.0, 36.0, 2.0], [-69.0, -45.0, 5.0, 37.0, -7.0], [-2.0, 49.0, 26.0, -38.0, -23.0], 
+[-10.0, -49.0, -2.0, 39.0, -30.0]]], [[[-11.0, 7.0, -6.0, 6.0, -9.0], [-8.0, 3.0, 2.0, -2.0, 0.0], [-5.0, 7.0, -5.0, -4.0, 
+9.0], [3.0, 0.0, -5.0, -4.0, 2.0]], [[-8.0, -9.0, -23.0, 12.0, 38.0], [-3.0, 21.0, -25.0, 19.0, -1.0], [-38.0, -17.0, -46.0, 
+22.0, -5.0], [62.0, 77.0, 46.0, -15.0, -30.0]], [[-28.0, 12.0, -24.0, 16.0, -8.0], [-16.0, 16.0, -4.0, 0.0, 0.0], [-24.0, 8.0, 
+-28.0, 0.0, 20.0], [28.0, 28.0, 4.0, -16.0, -4.0]], [[36.0, -17.0, 21.0, -38.0, -11.0], [45.0, -14.0, 16.0, -23.0, 3.0], [49.0, 
+-18.0, 48.0, 2.0, -13.0], [-62.0, -56.0, -28.0, 13.0, 31.0]], [[-40.0, 21.0, -21.0, 40.0, 4.0], [-49.0, 13.0, -13.0, 21.0, 
+-3.0], [-48.0, 23.0, -46.0, -6.0, 17.0], [58.0, 49.0, 22.0, -13.0, -28.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-4.0, 29.0, -12.0, 14.0, -12.0], [35.0, 2.0, -15.0, -5.0, 12.0], [34.0, -18.0, 6.0, 
+23.0, 12.0], [-42.0, 10.0, -40.0, -31.0, -42.0]], [[19.0, -10.0, 13.0, 9.0, -11.0], [0.0, 8.0, -24.0, 4.0, -14.0], [10.0, 
+-37.0, -5.0, -4.0, 10.0], [-20.0, 26.0, -6.0, -24.0, -5.0]], [[59.0, -8.0, 63.0, 11.0, 30.0], [-77.0, 28.0, 0.0, -37.0, -51.0], 
+[-45.0, -30.0, 4.0, -24.0, -18.0], [-10.0, -13.0, 53.0, -29.0, 24.0]], [[70.0, -33.0, 72.0, 10.0, 21.0], [-84.0, 30.0, -15.0, 
+-24.0, -63.0], [-47.0, -51.0, -5.0, -37.0, -12.0], [-4.0, 9.0, 61.0, -30.0, 39.0]], [[42.0, 24.0, 38.0, 22.0, 14.0], [-28.0, 
+24.0, -12.0, -36.0, -28.0], [-4.0, -38.0, 10.0, 4.0, -4.0], [-48.0, -4.0, 4.0, -52.0, -22.0]]], [[[18.0, -21.0, 26.0, -8.0, 
+20.0], [-49.0, 6.0, 15.0, -9.0, -22.0], [-40.0, 10.0, -2.0, -23.0, -16.0], [30.0, -16.0, 46.0, 17.0, 38.0]], [[11.0, -25.0, 
+21.0, -13.0, 21.0], [-49.0, 2.0, 21.0, -5.0, -18.0], [-44.0, 21.0, -3.0, -25.0, -18.0], [42.0, -20.0, 50.0, 29.0, 45.0]], 
+[[-3.0, -33.0, 5.0, -17.0, 8.0], [-28.0, -6.0, 15.0, 12.0, -7.0], [-31.0, 22.0, -8.0, -23.0, -10.0], [48.0, -7.0, 37.0, 38.0, 
+44.0]], [[-14.0, -8.0, -8.0, -12.0, 7.0], [-7.0, -8.0, 18.0, 5.0, 7.0], [-15.0, 29.0, -1.0, -6.0, -8.0], [30.0, -15.0, 15.0, 
+29.0, 19.0]], [[21.0, 12.0, 25.0, 5.0, 22.0], [-35.0, 12.0, 12.0, -27.0, -17.0], [-23.0, 2.0, 8.0, -4.0, -14.0], [-6.0, -23.0, 
+23.0, -11.0, 4.0]]], [[[-63.0, 37.0, -55.0, -17.0, 8.0], [42.0, -26.0, 45.0, 2.0, 53.0], [9.0, 82.0, 12.0, 27.0, -10.0], [28.0, 
+-47.0, -23.0, 48.0, -16.0]], [[-72.0, 11.0, -58.0, -32.0, 11.0], [28.0, -34.0, 57.0, 16.0, 53.0], [-11.0, 103.0, 5.0, 11.0, 
+-16.0], [68.0, -51.0, 1.0, 82.0, 17.0]], [[42.0, 24.0, 44.0, 16.0, 29.0], [-49.0, 24.0, 6.0, -45.0, -31.0], [-25.0, -17.0, 
+13.0, -2.0, -16.0], [-30.0, -25.0, 25.0, -37.0, -7.0]], [[-72.0, 11.0, -58.0, -32.0, 11.0], [28.0, -34.0, 57.0, 16.0, 53.0], 
+[-11.0, 103.0, 5.0, 11.0, -16.0], [68.0, -51.0, 1.0, 82.0, 17.0]], [[29.0, -46.0, 15.0, 11.0, -39.0], [14.0, 8.0, -60.0, 34.0, 
+-24.0], [28.0, -81.0, -21.0, -16.0, 30.0], [-24.0, 76.0, -16.0, -34.0, 3.0]]], [[[13.0, -3.0, 13.0, 3.0, 4.0], [-14.0, 6.0, 
+-3.0, -6.0, -11.0], [-7.0, -10.0, 0.0, -5.0, -2.0], [-4.0, 1.0, 9.0, -8.0, 4.0]], [[-1.0, 62.0, -3.0, 17.0, 15.0], [14.0, 8.0, 
+12.0, -38.0, 12.0], [16.0, 9.0, 21.0, 32.0, -6.0], [-48.0, -32.0, -28.0, -34.0, -51.0]], [[28.0, 16.0, 28.0, 12.0, 16.0], 
+[-28.0, 16.0, 0.0, -28.0, -20.0], [-12.0, -16.0, 8.0, 0.0, -8.0], [-24.0, -12.0, 12.0, -28.0, -8.0]], [[-43.0, -35.0, -37.0, 
+-27.0, -13.0], [21.0, -26.0, 15.0, 41.0, 26.0], [-4.0, 43.0, -13.0, -11.0, 2.0], [62.0, 4.0, 6.0, 63.0, 35.0]], [[49.0, 28.0, 
+43.0, 27.0, 13.0], [-28.0, 28.0, -18.0, -40.0, -32.0], [0.0, -49.0, 11.0, 6.0, -2.0], [-60.0, 0.0, 0.0, -64.0, -29.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank4_offset2(self):
-      arg0=Data(numpy.array([[[[0.0, -1.0, 4.0], [5.0, 0.0, -7.0]], [[2.0, -6.0, -4.0], [0.0, 4.0, -7.0]], [[6.0, -6.0, 7.0], 
-[-3.0, 7.0, 1.0]], [[2.0, -4.0, 6.0], [5.0, 4.0, 2.0]], [[4.0, 5.0, 0.0], [7.0, -6.0, -3.0]]], [[[-2.0, -1.0, -6.0], [3.0, 
--2.0, 3.0]], [[-6.0, -2.0, 6.0], [0.0, -1.0, 0.0]], [[6.0, -2.0, 4.0], [4.0, 7.0, -4.0]], [[-5.0, -3.0, -2.0], [1.0, 6.0, 
--3.0]], [[-2.0, 0.0, 2.0], [-2.0, -2.0, 3.0]]], [[[7.0, 6.0, -5.0], [-5.0, 7.0, -6.0]], [[1.0, 2.0, -6.0], [-7.0, -5.0, -7.0]], 
-[[4.0, 4.0, -5.0], [-5.0, 6.0, 7.0]], [[-5.0, 4.0, -1.0], [0.0, 3.0, 1.0]], [[-3.0, 1.0, -5.0], [6.0, 3.0, 2.0]]], [[[-6.0, 
-1.0, -4.0], [2.0, 2.0, 4.0]], [[2.0, 4.0, -5.0], [-3.0, -4.0, -5.0]], [[3.0, 0.0, -6.0], [5.0, -6.0, 5.0]], [[-3.0, 6.0, -4.0], 
-[-5.0, 6.0, 5.0]], [[6.0, -1.0, -1.0], [-3.0, 3.0, -1.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -6.0, -7.0], [-3.0, 2.0, 7.0]], [[-4.0, 7.0, -1.0], [4.0, 4.0, 4.0]], [[-4.0, -3.0, 
-6.0], [1.0, 2.0, 4.0]], [[0.0, -6.0, -2.0], [-3.0, 4.0, -4.0]], [[-4.0, -1.0, 1.0], [2.0, 2.0, 0.0]]], [[[2.0, -2.0, 3.0], 
-[0.0, 5.0, 4.0]], [[0.0, 0.0, -2.0], [-1.0, -5.0, -6.0]], [[0.0, -3.0, 2.0], [4.0, -5.0, -5.0]], [[0.0, 3.0, -3.0], [2.0, -7.0, 
--5.0]], [[-1.0, 0.0, 7.0], [-1.0, -3.0, -2.0]]], [[[-2.0, -1.0, 3.0], [-2.0, 3.0, 0.0]], [[-3.0, -1.0, 2.0], [2.0, -5.0, 7.0]], 
-[[-4.0, 4.0, 3.0], [-4.0, 0.0, 0.0]], [[-3.0, 5.0, 3.0], [7.0, 4.0, 2.0]], [[0.0, -3.0, -2.0], [-1.0, -6.0, -3.0]]], [[[0.0, 
--6.0, 1.0], [-3.0, 3.0, 0.0]], [[0.0, -7.0, 7.0], [6.0, -7.0, 3.0]], [[-1.0, 2.0, -2.0], [3.0, -4.0, -6.0]], [[-7.0, 5.0, 
--3.0], [-6.0, 4.0, 3.0]], [[6.0, -5.0, -5.0], [1.0, -3.0, -4.0]]]])+(1.-msk_arg1)*numpy.array([[[[0.0, 4.0, 0.0], [1.0, -5.0, 
-0.0]], [[-6.0, -4.0, 4.0], [-7.0, 2.0, 7.0]], [[0.0, -5.0, -4.0], [4.0, 7.0, 0.0]], [[-7.0, -7.0, 0.0], [5.0, 0.0, -3.0]], 
-[[-7.0, -7.0, 7.0], [3.0, 1.0, 4.0]]], [[[1.0, 0.0, -5.0], [-3.0, -4.0, -1.0]], [[-1.0, 0.0, -1.0], [4.0, 0.0, 0.0]], [[-3.0, 
-0.0, 6.0], [-2.0, 3.0, 3.0]], [[-6.0, 0.0, 7.0], [-5.0, 1.0, 0.0]], [[4.0, 7.0, 0.0], [5.0, 7.0, -4.0]]], [[[-5.0, -6.0, 7.0], 
-[-7.0, -7.0, -2.0]], [[5.0, -4.0, -7.0], [-4.0, -4.0, -7.0]], [[0.0, 0.0, 6.0], [-4.0, -2.0, -6.0]], [[-7.0, 2.0, -6.0], [5.0, 
-2.0, -2.0]], [[3.0, 6.0, -7.0], [-1.0, -6.0, 6.0]]], [[[-4.0, -7.0, 7.0], [-1.0, 6.0, -7.0]], [[4.0, 6.0, 0.0], [7.0, -2.0, 
--1.0]], [[7.0, -7.0, -3.0], [3.0, 4.0, 1.0]], [[2.0, 6.0, 6.0], [-7.0, 5.0, -6.0]], [[-2.0, 0.0, -6.0], [0.0, -1.0, 0.0]]]])
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[0.0, 0.0, -2.0], [-1.0, 3.0, -7.0]], [[2.0, -7.0, 3.0], [-2.0, 5.0, 7.0]], [[0.0, -2.0, -6.0], 
+[7.0, 3.0, 1.0]], [[-2.0, 6.0, 1.0], [0.0, 7.0, 4.0]], [[2.0, 1.0, 5.0], [6.0, -7.0, 3.0]]], [[[5.0, -4.0, -1.0], [7.0, 6.0, 
+-5.0]], [[1.0, 0.0, 0.0], [5.0, -3.0, 4.0]], [[0.0, 2.0, 3.0], [-3.0, -2.0, -7.0]], [[7.0, -6.0, -5.0], [-5.0, 0.0, 5.0]], 
+[[2.0, 7.0, -6.0], [-3.0, 5.0, -5.0]]], [[[4.0, 3.0, -6.0], [3.0, 7.0, 6.0]], [[-3.0, 2.0, -7.0], [7.0, 3.0, -5.0]], [[-5.0, 
+-6.0, -2.0], [-4.0, 7.0, 7.0]], [[2.0, 3.0, -3.0], [-6.0, 7.0, 0.0]], [[-4.0, -3.0, -2.0], [1.0, 4.0, 0.0]]], [[[4.0, 2.0, 
+-1.0], [-1.0, -6.0, 6.0]], [[-5.0, 0.0, 4.0], [-6.0, 6.0, 5.0]], [[4.0, -3.0, -4.0], [-7.0, -1.0, 7.0]], [[4.0, 4.0, 5.0], 
+[7.0, -1.0, 2.0]], [[-2.0, 3.0, 3.0], [7.0, -6.0, -6.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([[[[0.0, 5.0, -1.0], [-5.0, 7.0, -4.0]], [[2.0, 0.0, 1.0], [-3.0, 4.0, -6.0]], [[-6.0, 3.0, -2.0], 
+[-3.0, 5.0, 5.0]], [[7.0, -2.0, -2.0], [-3.0, 0.0, -2.0]], [[-6.0, 6.0, -5.0], [-7.0, 2.0, -1.0]]], [[[4.0, -7.0, -1.0], [-6.0, 
+4.0, 7.0]], [[3.0, 3.0, 4.0], [6.0, -6.0, -1.0]], [[-4.0, 5.0, -1.0], [-2.0, -6.0, -5.0]], [[-6.0, 1.0, -1.0], [0.0, -5.0, 
+0.0]], [[-2.0, 0.0, 3.0], [-7.0, 6.0, 0.0]]], [[[3.0, 2.0, 0.0], [-4.0, -2.0, 6.0]], [[0.0, 2.0, 0.0], [2.0, 1.0, -1.0]], 
+[[3.0, 7.0, 3.0], [-2.0, 4.0, 0.0]], [[7.0, -7.0, 0.0], [1.0, 4.0, -3.0]], [[-5.0, 5.0, 0.0], [-6.0, 6.0, -4.0]]], [[[5.0, 
+-1.0, 0.0], [6.0, -2.0, 6.0]], [[3.0, 6.0, 0.0], [5.0, -5.0, -2.0]], [[-4.0, -7.0, 6.0], [0.0, 2.0, -1.0]], [[-1.0, 1.0, -6.0], 
+[4.0, 2.0, 6.0]], [[-4.0, 0.0, 2.0], [-6.0, 2.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 0.0, -5.0], [-4.0, -7.0, 7.0]], [[4.0, 1.0, 5.0], [2.0, 4.0, 2.0]], [[7.0, 
+2.0, 7.0], [7.0, 0.0, -5.0]], [[3.0, 2.0, 5.0], [-1.0, -4.0, -6.0]], [[7.0, 4.0, 5.0], [-6.0, 6.0, 6.0]]], [[[7.0, 5.0, 4.0], 
+[-6.0, -3.0, 2.0]], [[4.0, 0.0, -2.0], [4.0, 0.0, 1.0]], [[-1.0, -2.0, -1.0], [2.0, -6.0, 5.0]], [[0.0, -7.0, 3.0], [2.0, -2.0, 
+0.0]], [[-7.0, -1.0, -5.0], [4.0, 7.0, -2.0]]], [[[-3.0, -1.0, 3.0], [6.0, -1.0, 0.0]], [[0.0, 4.0, -7.0], [5.0, 5.0, 5.0]], 
+[[0.0, 0.0, 0.0], [1.0, -3.0, -1.0]], [[2.0, -4.0, -6.0], [4.0, 4.0, 3.0]], [[-4.0, 4.0, -3.0], [0.0, 7.0, -4.0]]], [[[-5.0, 
+4.0, 2.0], [-6.0, 0.0, 6.0]], [[-2.0, 7.0, -7.0], [-2.0, 7.0, -5.0]], [[3.0, 7.0, -1.0], [4.0, -3.0, 5.0]], [[1.0, -2.0, 0.0], 
+[-4.0, 6.0, 7.0]], [[-1.0, -5.0, 4.0], [-2.0, -1.0, -2.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-86.0, -19.0, 4.0, 11.0, 15.0], [-14.0, 29.0, 66.0, 30.0, 37.0], [3.0, -30.0, -12.0, 28.0, 
-11.0], [-5.0, 44.0, 47.0, -68.0, 18.0]], [[23.0, -58.0, -34.0, 88.0, 2.0], [-4.0, 30.0, 25.0, 1.0, -28.0], [2.0, -77.0, -44.0, 
--46.0, 23.0], [44.0, -35.0, 20.0, -37.0, 78.0]], [[17.0, -53.0, 51.0, 55.0, -3.0], [84.0, -52.0, -20.0, -99.0, 23.0], [42.0, 
--32.0, -15.0, -18.0, -38.0], [73.0, 27.0, -75.0, -44.0, 3.0]], [[-11.0, 2.0, 61.0, 5.0, 20.0], [58.0, -49.0, 14.0, -58.0, 
-19.0], [20.0, 14.0, -26.0, 47.0, -35.0], [27.0, 78.0, -35.0, -60.0, -13.0]], [[-84.0, 11.0, -48.0, -63.0, -19.0], [-44.0, 41.0, 
-58.0, 86.0, 13.0], [-45.0, 6.0, -24.0, 32.0, 23.0], [-69.0, 40.0, 69.0, -78.0, 36.0]]], [[[56.0, 23.0, -14.0, -11.0, 5.0], 
-[-18.0, 1.0, -2.0, 20.0, -43.0], [-25.0, 32.0, -26.0, 2.0, 15.0], [-15.0, 6.0, 11.0, 10.0, 20.0]], [[-32.0, 0.0, 64.0, -4.0, 
-30.0], [5.0, -7.0, 23.0, -17.0, 51.0], [29.0, 37.0, 34.0, 22.0, 0.0], [15.0, 63.0, -6.0, 10.0, -53.0]], [[-42.0, -14.0, 8.0, 
-36.0, 4.0], [47.0, -23.0, 15.0, -39.0, 5.0], [15.0, -63.0, -36.0, 32.0, -36.0], [25.0, 5.0, -10.0, -72.0, 25.0]], [[20.0, 17.0, 
-18.0, 55.0, 35.0], [8.0, -9.0, -6.0, -28.0, -22.0], [23.0, -35.0, -2.0, 19.0, -15.0], [31.0, -38.0, 0.0, 35.0, -10.0]], [[9.0, 
-2.0, 26.0, -18.0, 2.0], [4.0, -10.0, -9.0, -11.0, 18.0], [8.0, 37.0, 22.0, -4.0, 1.0], [2.0, 25.0, -18.0, 21.0, -30.0]]], 
-[[[-14.0, 3.0, -91.0, 41.0, -35.0], [-2.0, 16.0, -53.0, 4.0, -46.0], [-4.0, -124.0, 1.0, -25.0, -27.0], [-5.0, -174.0, 8.0, 
-36.0, 35.0]], [[-8.0, -60.0, -91.0, 29.0, -36.0], [-73.0, 86.0, 14.0, 80.0, -7.0], [-23.0, -55.0, 14.0, -94.0, 64.0], [-12.0, 
--84.0, 56.0, 22.0, 62.0]], [[87.0, 49.0, -23.0, -3.0, -23.0], [43.0, -57.0, -107.0, -60.0, -66.0], [1.0, -17.0, 5.0, -4.0, 
--54.0], [4.0, -114.0, -67.0, 82.0, -22.0]], [[-4.0, 65.0, 12.0, -14.0, 21.0], [-2.0, -19.0, -34.0, -11.0, -13.0], [12.0, 1.0, 
-33.0, 46.0, -31.0], [-16.0, -53.0, -3.0, 73.0, -58.0]], [[31.0, 68.0, -1.0, -10.0, 24.0], [0.0, -23.0, -14.0, -1.0, -51.0], 
-[-13.0, 9.0, -23.0, 57.0, -23.0], [-20.0, -21.0, 9.0, 23.0, -9.0]]], [[[48.0, 67.0, 19.0, -12.0, 27.0], [0.0, -28.0, -33.0, 
--15.0, -38.0], [1.0, 31.0, 8.0, 41.0, -21.0], [-10.0, -25.0, -10.0, 67.0, -41.0]], [[-23.0, -23.0, -81.0, -1.0, -31.0], [-59.0, 
-63.0, 11.0, 74.0, -12.0], [-29.0, -41.0, 5.0, -48.0, 40.0], [-32.0, -68.0, 53.0, 8.0, 46.0]], [[50.0, 10.0, -35.0, -47.0, 
--20.0], [-22.0, 7.0, 13.0, 45.0, -42.0], [-52.0, 54.0, -50.0, -6.0, 28.0], [-39.0, 45.0, 18.0, -42.0, 51.0]], [[54.0, 82.0, 
--3.0, -9.0, 4.0], [20.0, -47.0, -101.0, -47.0, -48.0], [16.0, -10.0, 44.0, 26.0, -56.0], [-7.0, -127.0, -46.0, 132.0, -71.0]], 
-[[21.0, -34.0, -28.0, 33.0, -24.0], [22.0, -4.0, -21.0, -22.0, -17.0], [1.0, -47.0, -19.0, -37.0, -7.0], [23.0, -42.0, -21.0, 
--17.0, 38.0]]]])+(1.-msk_ref)*numpy.array([[[[1.0, -64.0, 9.0, 53.0, 22.0], [-28.0, 16.0, -7.0, 3.0, 46.0], [13.0, 5.0, 46.0, 
-13.0, -81.0], [79.0, 36.0, 3.0, 25.0, -24.0]], [[-44.0, -45.0, 74.0, 49.0, -24.0], [13.0, 2.0, -39.0, -36.0, 22.0], [-16.0, 
-95.0, 10.0, 20.0, -68.0], [79.0, -29.0, 77.0, 6.0, 16.0]], [[-62.0, 58.0, 39.0, -18.0, 51.0], [-49.0, -25.0, 54.0, 35.0, 12.0], 
-[25.0, -18.0, 34.0, -99.0, -100.0], [105.0, -48.0, 83.0, 68.0, -61.0]], [[-31.0, 15.0, 44.0, 33.0, 83.0], [-61.0, 12.0, 38.0, 
-9.0, 25.0], [-11.0, -66.0, -4.0, -29.0, -77.0], [67.0, 9.0, 57.0, -11.0, -44.0]], [[57.0, -126.0, -39.0, -19.0, -60.0], [10.0, 
-24.0, -53.0, -65.0, 56.0], [-51.0, 17.0, 2.0, 11.0, 53.0], [-73.0, 110.0, -13.0, -23.0, -2.0]]], [[[9.0, -12.0, 27.0, 27.0, 
--2.0], [24.0, 20.0, -33.0, -47.0, -26.0], [-39.0, 11.0, -62.0, 53.0, 57.0], [-63.0, 8.0, 15.0, -95.0, 42.0]], [[-3.0, 66.0, 
--21.0, 56.0, 97.0], [-32.0, 0.0, 51.0, 77.0, -45.0], [91.0, -60.0, 38.0, 0.0, -66.0], [74.0, -34.0, -50.0, 7.0, -23.0]], 
-[[-39.0, -54.0, 59.0, 4.0, 3.0], [-50.0, 6.0, 7.0, -21.0, 95.0], [-59.0, -6.0, 18.0, -28.0, -92.0], [84.0, 30.0, 80.0, 55.0, 
--43.0]], [[-41.0, 18.0, 69.0, 70.0, 39.0], [-19.0, 11.0, 10.0, 17.0, 18.0], [-14.0, -6.0, -10.0, 64.0, -74.0], [83.0, -40.0, 
-16.0, 1.0, 16.0]], [[8.0, 51.0, -30.0, -5.0, 32.0], [-1.0, -8.0, 25.0, 34.0, -44.0], [46.0, -29.0, 6.0, -18.0, 12.0], [-9.0, 
--21.0, -31.0, -6.0, -6.0]]], [[[-16.0, -79.0, 19.0, -98.0, -158.0], [25.0, -22.0, -38.0, -45.0, 118.0], [-108.0, 80.0, 12.0, 
--6.0, 19.0], [-16.0, 21.0, 29.0, 126.0, 9.0]], [[26.0, -48.0, -49.0, -35.0, -117.0], [79.0, -23.0, -61.0, -18.0, -24.0], [39.0, 
-136.0, 44.0, 2.0, 52.0], [-34.0, -16.0, -37.0, 44.0, 39.0]], [[-19.0, 36.0, 22.0, -102.0, -72.0], [13.0, -19.0, 7.0, -28.0, 
-33.0], [-100.0, -14.0, -64.0, -17.0, 82.0], [-87.0, -14.0, 31.0, 25.0, 16.0]], [[1.0, 23.0, 5.0, 4.0, 7.0], [-13.0, 6.0, 21.0, 
-26.0, 25.0], [-29.0, -53.0, -18.0, 53.0, 4.0], [-4.0, -3.0, -47.0, 17.0, 13.0]], [[-5.0, -28.0, 60.0, 38.0, 8.0], [-10.0, 32.0, 
--18.0, -44.0, 38.0], [-93.0, -34.0, -72.0, 85.0, 20.0], [-32.0, 28.0, 19.0, -69.0, 33.0]]], [[[-4.0, 34.0, 33.0, 33.0, 31.0], 
-[-4.0, 18.0, 8.0, 0.0, -9.0], [-40.0, -50.0, -60.0, 74.0, 26.0], [-29.0, -12.0, -19.0, -58.0, 34.0]], [[33.0, -70.0, -40.0, 
--42.0, -110.0], [57.0, -9.0, -57.0, -36.0, 13.0], [-10.0, 92.0, 20.0, 11.0, 62.0], [-57.0, 24.0, -29.0, 29.0, 30.0]], [[35.0, 
--54.0, 2.0, -11.0, -34.0], [37.0, 23.0, -58.0, -91.0, -25.0], [-60.0, 26.0, -74.0, 18.0, 112.0], [-130.0, 54.0, 35.0, -125.0, 
-36.0]], [[-11.0, 60.0, 8.0, -61.0, -38.0], [3.0, -13.0, 28.0, 21.0, 27.0], [-66.0, -50.0, -46.0, 34.0, 54.0], [-52.0, -28.0, 
--37.0, 41.0, 24.0]], [[-22.0, -16.0, 18.0, -47.0, -52.0], [9.0, -17.0, -12.0, -25.0, 27.0], [-29.0, 48.0, 6.0, -45.0, -2.0], 
-[4.0, -8.0, 54.0, 42.0, -9.0]]]])
+      ref=Data(numpy.array([[[[56.0, 55.0, -13.0, 21.0, 30.0], [-29.0, -25.0, 21.0, -13.0, 19.0], [-44.0, 8.0, 8.0, 32.0, 
+52.0], [-54.0, -6.0, 1.0, -28.0, 1.0]], [[-21.0, -9.0, 27.0, 14.0, -52.0], [135.0, -52.0, -107.0, -47.0, 49.0], [32.0, -20.0, 
+-10.0, 60.0, -31.0], [37.0, -85.0, 62.0, 17.0, 27.0]], [[-22.0, -21.0, 5.0, -7.0, -26.0], [-3.0, -7.0, -41.0, -11.0, -49.0], 
+[-32.0, 12.0, -34.0, 30.0, -38.0], [44.0, 6.0, -17.0, 74.0, -47.0]], [[62.0, 1.0, 83.0, -36.0, 53.0], [5.0, -30.0, -25.0, 
+-18.0, 49.0], [16.0, 15.0, 67.0, -40.0, 66.0], [-6.0, -13.0, -18.0, 40.0, 28.0]], [[-91.0, -55.0, -57.0, -22.0, -90.0], [-47.0, 
+104.0, 7.0, 19.0, -73.0], [16.0, 4.0, -12.0, -24.0, -95.0], [77.0, 71.0, -2.0, -3.0, -45.0]]], [[[8.0, 42.0, -56.0, 34.0, 
+-81.0], [-4.0, 10.0, -64.0, -63.0, -26.0], [-63.0, 17.0, -6.0, 109.0, -31.0], [29.0, 6.0, 19.0, 7.0, -57.0]], [[-62.0, -49.0, 
+-16.0, -16.0, -51.0], [-10.0, 47.0, -16.0, 9.0, -55.0], [13.0, 3.0, -19.0, -12.0, -69.0], [65.0, 35.0, -14.0, 37.0, -36.0]], 
+[[36.0, 46.0, -36.0, 13.0, 21.0], [-56.0, 19.0, 60.0, 9.0, 18.0], [-22.0, 3.0, 21.0, -4.0, 44.0], [-58.0, 21.0, 7.0, -74.0, 
+13.0]], [[-20.0, -6.0, -10.0, 76.0, -23.0], [140.0, -52.0, -68.0, -43.0, 6.0], [59.0, -27.0, -26.0, 71.0, -55.0], [41.0, -50.0, 
+-21.0, 27.0, -3.0]], [[111.0, 57.0, 30.0, 31.0, 96.0], [-32.0, -40.0, 34.0, -24.0, 29.0], [-8.0, 18.0, 63.0, -3.0, 93.0], 
+[-55.0, 18.0, -78.0, 9.0, 3.0]]], [[[31.0, -15.0, 53.0, 13.0, 11.0], [53.0, -33.0, -73.0, -50.0, -5.0], [28.0, 13.0, 37.0, 
+20.0, -5.0], [57.0, -2.0, -65.0, 97.0, -26.0]], [[23.0, 8.0, 7.0, -22.0, 27.0], [-84.0, -2.0, 22.0, 12.0, -46.0], [-69.0, 26.0, 
+-18.0, -1.0, 21.0], [-11.0, 33.0, -33.0, 51.0, -43.0]], [[13.0, -14.0, 98.0, -21.0, 39.0], [125.0, -114.0, -77.0, -9.0, 74.0], 
+[17.0, -20.0, -27.0, 10.0, 33.0], [-15.0, -120.0, 57.0, 51.0, 61.0]], [[97.0, 47.0, 56.0, 32.0, 77.0], [54.0, -75.0, -20.0, 
+-41.0, 71.0], [22.0, 1.0, 58.0, 15.0, 83.0], [-43.0, -41.0, -33.0, 9.0, 36.0]], [[10.0, 3.0, 36.0, -21.0, 17.0], [17.0, -47.0, 
+-23.0, 3.0, 19.0], [-30.0, 0.0, -25.0, 10.0, 23.0], [-19.0, -45.0, 33.0, 25.0, 14.0]]], [[[-50.0, -50.0, -13.0, 17.0, -18.0], 
+[27.0, 38.0, 3.0, 9.0, -40.0], [68.0, -10.0, 1.0, -29.0, -64.0], [60.0, 37.0, -54.0, 24.0, -18.0]], [[48.0, 6.0, 95.0, -35.0, 
+59.0], [71.0, -76.0, -33.0, -4.0, 100.0], [27.0, -11.0, 33.0, -32.0, 77.0], [-43.0, -85.0, 51.0, -1.0, 81.0]], [[-11.0, -21.0, 
+26.0, 49.0, 18.0], [128.0, -56.0, -42.0, -18.0, 23.0], [78.0, -28.0, -11.0, 17.0, -27.0], [25.0, -50.0, -28.0, 29.0, 23.0]], 
+[[-35.0, -24.0, -38.0, -15.0, -78.0], [-49.0, 90.0, -19.0, -20.0, -48.0], [6.0, 19.0, 37.0, -3.0, -56.0], [72.0, 72.0, -18.0, 
+8.0, -48.0]], [[-41.0, -10.0, -66.0, -35.0, -40.0], [-140.0, 99.0, 72.0, 42.0, -72.0], [-52.0, 20.0, -14.0, -34.0, -29.0], 
+[5.0, 89.0, -1.0, -33.0, -46.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-56.0, -14.0, 14.0, 21.0, -28.0], [-25.0, -7.0, -53.0, -14.0, 41.0], [-15.0, -11.0, 
+-3.0, -1.0, 55.0], [-40.0, 72.0, -46.0, -27.0, 5.0]], [[7.0, 46.0, -28.0, -53.0, 85.0], [2.0, 1.0, 10.0, 44.0, -9.0], [-7.0, 
+1.0, -24.0, 47.0, -38.0], [22.0, -70.0, -34.0, 103.0, 30.0]], [[-12.0, -4.0, -2.0, -59.0, -56.0], [-83.0, 41.0, 11.0, 4.0, 
+79.0], [23.0, 89.0, -3.0, 87.0, 27.0], [-56.0, 30.0, 16.0, 1.0, -33.0]], [[-26.0, 39.0, -15.0, -41.0, 81.0], [7.0, -6.0, -33.0, 
+-53.0, 44.0], [-4.0, 72.0, -25.0, 6.0, 62.0], [60.0, 68.0, 34.0, 56.0, -39.0]], [[21.0, 24.0, 78.0, 37.0, -17.0], [30.0, 25.0, 
+60.0, 34.0, -71.0], [51.0, -21.0, 24.0, -25.0, -80.0], [-14.0, -108.0, 68.0, -45.0, 2.0]]], [[[-100.0, 39.0, 94.0, 1.0, -22.0], 
+[-59.0, 45.0, -43.0, 27.0, 54.0], [22.0, 31.0, -6.0, 69.0, 29.0], [-115.0, 22.0, -27.0, -14.0, 1.0]], [[29.0, 10.0, 22.0, 
+-14.0, -17.0], [-6.0, 28.0, 47.0, 16.0, -16.0], [30.0, 30.0, 10.0, 22.0, -41.0], [-11.0, -53.0, 52.0, -9.0, -16.0]], [[-38.0, 
+-11.0, 39.0, 72.0, -13.0], [32.0, -25.0, -36.0, -7.0, -29.0], [-9.0, -73.0, 10.0, -67.0, 13.0], [-10.0, 20.0, -30.0, -53.0, 
+24.0]], [[80.0, -3.0, -58.0, -41.0, 60.0], [39.0, 23.0, 25.0, 17.0, -48.0], [-60.0, 11.0, -10.0, 63.0, -57.0], [-9.0, -36.0, 
+-11.0, 74.0, 3.0]], [[-28.0, -11.0, -10.0, 3.0, 30.0], [18.0, 3.0, -71.0, -83.0, 42.0], [-54.0, 55.0, -13.0, 5.0, 93.0], [-6.0, 
+153.0, 9.0, -5.0, -50.0]]], [[[11.0, 35.0, -17.0, -79.0, 70.0], [-8.0, 46.0, -10.0, -47.0, 48.0], [-22.0, 134.0, -24.0, 90.0, 
+39.0], [-2.0, 68.0, 60.0, 70.0, -68.0]], [[-49.0, -29.0, 8.0, -29.0, -102.0], [-100.0, 25.0, -23.0, -27.0, 113.0], [25.0, 82.0, 
+3.0, 53.0, 82.0], [-63.0, 101.0, 6.0, -52.0, -42.0]], [[26.0, -2.0, -124.0, -103.0, 39.0], [-56.0, -25.0, 4.0, 14.0, 70.0], 
+[-16.0, 40.0, -32.0, 59.0, 23.0], [63.0, 4.0, -57.0, 114.0, 14.0]], [[-10.0, 12.0, -43.0, -25.0, 89.0], [32.0, -10.0, -59.0, 
+-56.0, 23.0], [-61.0, 38.0, -27.0, 14.0, 62.0], [32.0, 99.0, -15.0, 62.0, -24.0]], [[-22.0, -11.0, -41.0, -45.0, -32.0], 
+[-69.0, -8.0, -10.0, 9.0, 73.0], [11.0, 27.0, -11.0, 36.0, 38.0], [-2.0, 27.0, -39.0, 22.0, 5.0]]], [[[93.0, -1.0, -12.0, 0.0, 
+37.0], [70.0, 20.0, 57.0, -7.0, -83.0], [-17.0, 10.0, 11.0, -4.0, -71.0], [28.0, -57.0, 71.0, 10.0, -22.0]], [[-3.0, 22.0, 
+-74.0, -43.0, 87.0], [9.0, -47.0, -22.0, -12.0, 23.0], [-15.0, -3.0, -29.0, -19.0, 30.0], [99.0, 11.0, -36.0, 90.0, 17.0]], 
+[[104.0, -11.0, -90.0, -45.0, 74.0], [56.0, 3.0, 33.0, -3.0, -54.0], [-62.0, 11.0, -11.0, 33.0, -51.0], [44.0, -29.0, 5.0, 
+81.0, -4.0]], [[-32.0, 59.0, 110.0, 30.0, 33.0], [33.0, 36.0, 13.0, 3.0, -40.0], [42.0, 21.0, 8.0, -8.0, -30.0], [-24.0, -46.0, 
+76.0, -24.0, -21.0]], [[-43.0, -12.0, 92.0, 68.0, -101.0], [-23.0, 8.0, 13.0, 14.0, -6.0], [60.0, -34.0, 31.0, -48.0, -7.0], 
+[-50.0, -22.0, 28.0, -114.0, 3.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[[0.0, -6.0], [0.0, 5.0]], [[7.0, 3.0], [-1.0, 7.0]], [[5.0, -5.0], [2.0, -5.0]], [[7.0, 0.0], 
-[3.0, 0.0]], [[0.0, 2.0], [4.0, -4.0]], [[0.0, 5.0], [6.0, 5.0]]]),self.functionspace)
-      arg1=-2.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-0.0, 12.0], [-0.0, -10.0]], [[-14.0, -6.0], [2.0, -14.0]], [[-10.0, 10.0], [-4.0, 10.0]], 
-[[-14.0, -0.0], [-6.0, -0.0]], [[-0.0, -4.0], [-8.0, 8.0]], [[-0.0, -10.0], [-12.0, -10.0]]]),self.functionspace)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[[-5.0, -7.0], [7.0, 5.0]], [[-7.0, -1.0], [0.0, -3.0]], [[0.0, 7.0], [-4.0, -7.0]], [[0.0, 4.0], 
-[3.0, -2.0]], [[-2.0, 6.0], [-2.0, -6.0]], [[7.0, 1.0], [-2.0, 6.0]]]),self.functionspace)
-      arg1=numpy.array(-6.0)
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[2.0, -3.0], [0.0, 0.0]], [[4.0, 0.0], [0.0, -1.0]], [[7.0, 1.0], [0.0, -4.0]], [[6.0, -6.0], 
+[7.0, -2.0]], [[0.0, -5.0], [-5.0, -5.0]], [[4.0, 1.0], [-2.0, 1.0]]]),self.functionspace)
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[30.0, 42.0], [-42.0, -30.0]], [[42.0, 6.0], [-0.0, 18.0]], [[-0.0, -42.0], [24.0, 42.0]], [[-0.0, 
--24.0], [-18.0, 12.0]], [[12.0, -36.0], [12.0, 36.0]], [[-42.0, -6.0], [12.0, -36.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[-6.0, 9.0], [-0.0, -0.0]], [[-12.0, -0.0], [-0.0, 3.0]], [[-21.0, -3.0], [-0.0, 12.0]], [[-18.0, 
+18.0], [-21.0, 6.0]], [[-0.0, 15.0], [15.0, 15.0]], [[-12.0, -3.0], [6.0, -3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[10.0, -15.0], [0.0, 0.0]], [[20.0, 0.0], [0.0, -5.0]], [[35.0, 5.0], [0.0, -20.0]], 
+[[30.0, -30.0], [35.0, -10.0]], [[0.0, -25.0], [-25.0, -25.0]], [[20.0, 5.0], [-10.0, 5.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[1.0, -5.0, -6.0], [6.0, 1.0, -5.0]], [[1.0, -6.0, 3.0], [-1.0, 6.0, 3.0]]], [[[-5.0, 7.0, 
--6.0], [1.0, 5.0, 2.0]], [[-5.0, 0.0, 5.0], [-2.0, 3.0, 5.0]]], [[[3.0, -1.0, -3.0], [-6.0, 0.0, 2.0]], [[4.0, 2.0, -7.0], 
-[7.0, 1.0, -2.0]]], [[[-2.0, 0.0, 0.0], [2.0, -1.0, 6.0]], [[5.0, -3.0, -3.0], [-7.0, -1.0, -3.0]]], [[[-7.0, -2.0, -1.0], 
-[2.0, 3.0, 5.0]], [[4.0, 3.0, -1.0], [2.0, -5.0, 6.0]]], [[[2.0, -5.0, -3.0], [-5.0, -7.0, 5.0]], [[-3.0, 3.0, 0.0], [7.0, 4.0, 
--2.0]]]]),self.functionspace)
-      arg1=numpy.array([3.0, 0.0, 7.0])
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-3.0, 6.0, 6.0], [-2.0, 0.0, 6.0]], [[-2.0, 1.0, 5.0], [2.0, 5.0, -6.0]]], [[[6.0, 5.0, -5.0], 
+[6.0, -4.0, 0.0]], [[7.0, -2.0, 4.0], [-6.0, 1.0, -4.0]]], [[[-5.0, 5.0, 5.0], [-2.0, 4.0, -3.0]], [[4.0, 0.0, -4.0], [6.0, 
+4.0, 6.0]]], [[[-3.0, -1.0, 2.0], [7.0, 4.0, -3.0]], [[-2.0, 0.0, 4.0], [-1.0, 5.0, 7.0]]], [[[3.0, -7.0, -2.0], [-6.0, 3.0, 
+-1.0]], [[-3.0, 7.0, 4.0], [2.0, 7.0, -7.0]]], [[[1.0, 2.0, -3.0], [1.0, -3.0, 0.0]], [[-7.0, -3.0, -3.0], [-4.0, -7.0, 
+7.0]]]]),self.functionspace)
+      arg1=Data(numpy.array([-7.0, 2.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, 4.0, 3.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-39.0, -17.0], [24.0, 18.0]], [[-57.0, 17.0], [20.0, 29.0]], [[-12.0, -4.0], [-37.0, 7.0]], 
-[[-6.0, 48.0], [-6.0, -42.0]], [[-28.0, 41.0], [5.0, 48.0]], [[-15.0, 20.0], [-9.0, 7.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[33.0, 14.0], [16.0, -4.0]], [[-32.0, -50.0], [-53.0, 44.0]], [[45.0, 22.0], [-28.0, -34.0]], 
+[[19.0, -41.0], [14.0, 17.0]], [[-35.0, 48.0], [35.0, 0.0]], [[-3.0, -13.0], [43.0, 14.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[45.0, 20.0], [21.0, 0.0]], [[-1.0, -22.0], [-3.0, -2.0]], [[40.0, 9.0], [-16.0, 
+28.0]], [[5.0, 0.0], [14.0, 42.0]], [[-37.0, 15.0], [43.0, 5.0]], [[-2.0, -13.0], [-14.0, -3.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_array_rank1_offset0(self):
-      arg0=Data(numpy.array([[[-6.0, -7.0], [4.0, 4.0]], [[0.0, 7.0], [-5.0, 2.0]], [[2.0, -7.0], [-1.0, 0.0]], [[3.0, -1.0], 
-[-6.0, -7.0]], [[-5.0, -4.0], [-7.0, -7.0]], [[1.0, -4.0], [6.0, -5.0]]]),self.functionspace)
-      arg1=numpy.array([0.0, -7.0])
+   def test_generalTensorTransposedProduct_constData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[6.0, -4.0], [3.0, 2.0]], [[6.0, 3.0], [-3.0, 2.0]], [[-3.0, -2.0], [2.0, -7.0]], [[0.0, -3.0], 
+[0.0, 0.0]], [[-4.0, 0.0], [5.0, 0.0]], [[0.0, 0.0], [-5.0, 4.0]]]),self.functionspace)
+      arg1=Data(numpy.array([-4.0, 5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([7.0, 6.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, 42.0], [0.0, 49.0]], [[0.0, -28.0], [0.0, -28.0]]], [[[0.0, 0.0], [0.0, -49.0]], [[0.0, 
-35.0], [0.0, -14.0]]], [[[0.0, -14.0], [0.0, 49.0]], [[0.0, 7.0], [0.0, 0.0]]], [[[0.0, -21.0], [0.0, 7.0]], [[0.0, 42.0], 
-[0.0, 49.0]]], [[[0.0, 35.0], [0.0, 28.0]], [[0.0, 49.0], [0.0, 49.0]]], [[[0.0, -7.0], [0.0, 28.0]], [[0.0, -42.0], [0.0, 
-35.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[[-24.0, 30.0], [16.0, -20.0]], [[-12.0, 15.0], [-8.0, 10.0]]], [[[-24.0, 30.0], [-12.0, 15.0]], 
+[[12.0, -15.0], [-8.0, 10.0]]], [[[12.0, -15.0], [8.0, -10.0]], [[-8.0, 10.0], [28.0, -35.0]]], [[[0.0, 0.0], [12.0, -15.0]], 
+[[0.0, 0.0], [0.0, 0.0]]], [[[16.0, -20.0], [0.0, 0.0]], [[-20.0, 25.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[20.0, 
+-25.0], [-16.0, 20.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[42.0, 36.0], [-28.0, -24.0]], [[21.0, 18.0], [14.0, 12.0]]], [[[42.0, 36.0], [21.0, 
+18.0]], [[-21.0, -18.0], [14.0, 12.0]]], [[[-21.0, -18.0], [-14.0, -12.0]], [[14.0, 12.0], [-49.0, -42.0]]], [[[0.0, 0.0], 
+[-21.0, -18.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-28.0, -24.0], [0.0, 0.0]], [[35.0, 30.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[-35.0, -30.0], [28.0, 24.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[2.0, 1.0, 3.0], [-5.0, 6.0, 3.0]], [[-3.0, 4.0, -3.0], [0.0, -4.0, -7.0]]], [[[2.0, 6.0, 0.0], 
-[6.0, 2.0, 5.0]], [[0.0, 3.0, 0.0], [-7.0, 0.0, 7.0]]], [[[3.0, -3.0, 4.0], [5.0, 4.0, -6.0]], [[5.0, -2.0, -1.0], [-2.0, -3.0, 
-1.0]]], [[[0.0, -6.0, 5.0], [4.0, 5.0, 5.0]], [[7.0, 2.0, -5.0], [0.0, 1.0, 7.0]]], [[[-2.0, 0.0, 0.0], [-6.0, 3.0, 0.0]], 
-[[-6.0, 5.0, -2.0], [2.0, 6.0, 0.0]]], [[[0.0, -4.0, -2.0], [6.0, 2.0, 6.0]], [[1.0, 1.0, -6.0], [2.0, -2.0, 
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-3.0, 0.0, 5.0], [2.0, 7.0, 6.0]], [[-4.0, -7.0, 7.0], [-5.0, 3.0, 7.0]]], [[[6.0, 6.0, 2.0], 
+[-3.0, -4.0, -7.0]], [[-6.0, -7.0, -1.0], [4.0, 0.0, -6.0]]], [[[0.0, 0.0, -4.0], [-2.0, 0.0, 2.0]], [[4.0, -1.0, 5.0], [-7.0, 
+0.0, -3.0]]], [[[3.0, 0.0, 2.0], [-6.0, -5.0, -6.0]], [[-4.0, 6.0, -2.0], [-6.0, 3.0, -2.0]]], [[[1.0, -6.0, 2.0], [3.0, -5.0, 
+0.0]], [[1.0, 0.0, -2.0], [-7.0, -2.0, -7.0]]], [[[5.0, -3.0, -5.0], [0.0, -1.0, 0.0]], [[3.0, 7.0, 1.0], [5.0, -2.0, 
 5.0]]]]),self.functionspace)
-      arg1=numpy.array([[0.0, -3.0, 0.0], [-7.0, 3.0, -4.0]])
+      arg1=Data(numpy.array([[2.0, -1.0, 7.0], [7.0, 2.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, 3.0, 4.0], [-6.0, 0.0, -6.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-3.0, -23.0], [-18.0, 41.0]], [[-12.0, 45.0], [12.0, 16.0]]], [[[-18.0, 4.0], [-6.0, -56.0]], 
-[[-9.0, 9.0], [0.0, 21.0]]], [[[9.0, -46.0], [-12.0, 1.0]], [[6.0, -37.0], [9.0, 1.0]]], [[[18.0, -38.0], [-15.0, -33.0]], 
-[[-6.0, -23.0], [-3.0, -25.0]]], [[[0.0, 14.0], [-9.0, 51.0]], [[-15.0, 65.0], [-18.0, 4.0]]], [[[12.0, -4.0], [-6.0, -60.0]], 
-[[-3.0, 20.0], [6.0, -40.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[[29.0, 9.0], [39.0, 64.0]], [[48.0, 0.0], [36.0, 13.0]]], [[[20.0, 66.0], [-51.0, -71.0]], 
+[[-12.0, -62.0], [-34.0, -8.0]]], [[[-28.0, -24.0], [10.0, -2.0]], [[44.0, 56.0], [-35.0, -67.0]]], [[[20.0, 33.0], [-49.0, 
+-88.0]], [[-28.0, -28.0], [-29.0, -48.0]]], [[[22.0, 7.0], [11.0, 11.0]], [[-12.0, -5.0], [-61.0, -95.0]]], [[[-22.0, -1.0], 
+[1.0, -2.0]], [[6.0, 41.0], [47.0, 61.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[8.0, -12.0], [53.0, -48.0]], [[-9.0, -18.0], [17.0, -12.0]]], [[[50.0, -48.0], 
+[-52.0, 60.0]], [[-49.0, 42.0], [-8.0, 12.0]]], [[[-16.0, 24.0], [0.0, 0.0]], [[33.0, -54.0], [-40.0, 60.0]]], [[[20.0, -30.0], 
+[-63.0, 72.0]], [[-6.0, 36.0], [-23.0, 48.0]]], [[[-6.0, -18.0], [-3.0, -18.0]], [[-4.0, 6.0], [-62.0, 84.0]]], [[[-9.0, 0.0], 
+[-3.0, 0.0]], [[37.0, -24.0], [34.0, -60.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[2.0, 5.0], [-7.0, -4.0]], [[4.0, 2.0], [0.0, -4.0]], [[3.0, -1.0], [1.0, 1.0]], [[-7.0, -5.0], 
-[-6.0, 1.0]], [[3.0, -7.0], [-1.0, -2.0]], [[2.0, -5.0], [0.0, 5.0]]]),self.functionspace)
-      arg1=Data(-4.0,self.functionspace)
+   def test_generalTensorTransposedProduct_constData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[0.0, -1.0, 4.0, 7.0], [-5.0, -3.0, -3.0, -1.0], [-6.0, -6.0, 4.0, 6.0]], [[0.0, 5.0, 3.0, 6.0], 
+[3.0, 5.0, 0.0, 2.0], [4.0, 6.0, 6.0, -7.0]]], [[[4.0, -3.0, -6.0, -6.0], [-5.0, -2.0, -3.0, -5.0], [0.0, -4.0, -3.0, 6.0]], 
+[[0.0, 2.0, -6.0, 0.0], [-1.0, -7.0, 0.0, 3.0], [-3.0, 2.0, -7.0, -3.0]]], [[[3.0, 2.0, -1.0, 0.0], [-6.0, 3.0, 2.0, -1.0], 
+[1.0, 1.0, -1.0, 5.0]], [[-4.0, -2.0, -6.0, 4.0], [-2.0, 6.0, -3.0, 0.0], [-1.0, -5.0, 1.0, 2.0]]]]),self.functionspace)
+      arg1=Data(-5.0,self.functionspace)
+      arg1.setTaggedValue(1,0.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[-8.0, -20.0], [28.0, 16.0]], [[-16.0, -8.0], [-0.0, 16.0]], [[-12.0, 4.0], [-4.0, -4.0]], [[28.0, 
-20.0], [24.0, -4.0]], [[-12.0, 28.0], [4.0, 8.0]], [[-8.0, 20.0], [-0.0, -20.0]]]),self.functionspace)
+      ref=Data(numpy.array([[[[-0.0, 5.0, -20.0, -35.0], [25.0, 15.0, 15.0, 5.0], [30.0, 30.0, -20.0, -30.0]], [[-0.0, -25.0, 
+-15.0, -30.0], [-15.0, -25.0, -0.0, -10.0], [-20.0, -30.0, -30.0, 35.0]]], [[[-20.0, 15.0, 30.0, 30.0], [25.0, 10.0, 15.0, 
+25.0], [-0.0, 20.0, 15.0, -30.0]], [[-0.0, -10.0, 30.0, -0.0], [5.0, 35.0, -0.0, -15.0], [15.0, -10.0, 35.0, 15.0]]], [[[-15.0, 
+-10.0, 5.0, -0.0], [30.0, -15.0, -10.0, 5.0], [-5.0, -5.0, 5.0, -25.0]], [[20.0, 10.0, 30.0, -20.0], [10.0, -30.0, 15.0, -0.0], 
+[5.0, 25.0, -5.0, -10.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, 0.0, 0.0]], [[0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0]]], [[[0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, -0.0], [0.0, -0.0, 
+-0.0, 0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, -0.0]]], [[[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 
+0.0, -0.0], [0.0, 0.0, -0.0, 0.0]], [[-0.0, -0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank0_float_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg0.setTaggedValue(1,5.0)
+      arg1=-7.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(-14.0,self.functionspace)
+      ref.setTaggedValue(1,-35.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank0_array_rank0_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg0.setTaggedValue(1,-1.0)
+      arg1=numpy.array(7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(21.0,self.functionspace)
+      ref.setTaggedValue(1,-7.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank1_offset1(self):
+      arg0=Data(numpy.array([1.0, -2.0, 2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, -7.0, -3.0]))
+      arg1=numpy.array([-4.0, 0.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(-4.0,self.functionspace)
+      ref.setTaggedValue(1,20.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[-2.0, -4.0, -7.0], [-1.0, 0.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, 2.0, 2.0], [1.0, 2.0, -3.0]]))
+      arg1=numpy.array([[-5.0, 6.0, 3.0], [-1.0, -6.0, -7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(-69.0,self.functionspace)
+      ref.setTaggedValue(1,36.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[6.0, -3.0, 0.0], [2.0, -5.0, 3.0], [-1.0, -6.0, 0.0], [7.0, -7.0, 4.0]], [[1.0, -5.0, 4.0], 
+[-4.0, -7.0, -2.0], [-2.0, 2.0, 5.0], [1.0, -6.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, 7.0, 5.0], [-6.0, -2.0, 6.0], [-6.0, -7.0, 3.0], [3.0, -2.0, 4.0]], [[-7.0, 
+1.0, 0.0], [-4.0, 0.0, -1.0], [-4.0, 6.0, -3.0], [-4.0, 1.0, 3.0]]]))
+      arg1=numpy.array([[[6.0, 6.0, 0.0], [-7.0, 4.0, -6.0], [3.0, -5.0, -1.0], [-6.0, 2.0, 0.0]], [[-1.0, -5.0, 7.0], [7.0, 
+5.0, 0.0], [2.0, 4.0, -2.0], [-7.0, -6.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(-55.0,self.functionspace)
+      ref.setTaggedValue(1,86.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[-7.0, 2.0, 0.0], [3.0, 1.0, 3.0]], [[-5.0, -6.0, -4.0], [-1.0, 3.0, 0.0]]], [[[0.0, 4.0, 2.0], 
-[7.0, -2.0, 7.0]], [[3.0, 6.0, -6.0], [2.0, 4.0, -5.0]]], [[[0.0, -7.0, -6.0], [2.0, -6.0, -1.0]], [[7.0, 5.0, 2.0], [0.0, 2.0, 
-7.0]]], [[[-7.0, -6.0, 4.0], [-7.0, 2.0, 1.0]], [[5.0, 2.0, 2.0], [1.0, -5.0, -5.0]]], [[[0.0, 6.0, -2.0], [-5.0, 0.0, -3.0]], 
-[[6.0, 3.0, -5.0], [-5.0, -1.0, -6.0]]], [[[1.0, -7.0, -5.0], [2.0, 6.0, 7.0]], [[7.0, -5.0, 0.0], [-3.0, 3.0, 
--3.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([1.0, 2.0, 0.0]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[-3.0, 5.0], [-17.0, 5.0]], [[8.0, 3.0], [15.0, 10.0]], [[-14.0, -10.0], [17.0, 4.0]], [[-19.0, 
--3.0], [9.0, -9.0]], [[12.0, -5.0], [12.0, -7.0]], [[-13.0, 14.0], [-3.0, 3.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[3.0, 0.0], [7.0, -7.0], [0.0, 7.0]], [[-7.0, -7.0], [-1.0, -3.0], [-6.0, -1.0]]], [[[-3.0, 
+3.0], [0.0, -4.0], [-7.0, -6.0]], [[-3.0, 0.0], [2.0, -4.0], [0.0, 1.0]]], [[[1.0, -1.0], [4.0, -3.0], [5.0, -7.0]], [[3.0, 
+1.0], [6.0, 7.0], [0.0, -4.0]]], [[[5.0, -3.0], [-6.0, -6.0], [2.0, 0.0]], [[-5.0, -5.0], [-5.0, 0.0], [1.0, 
+6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 0.0], [-5.0, -1.0], [2.0, 7.0]], [[-6.0, 1.0], [0.0, -2.0], [5.0, -4.0]]], 
+[[[3.0, -5.0], [-3.0, -6.0], [-4.0, -3.0]], [[2.0, -4.0], [-2.0, 0.0], [3.0, -1.0]]], [[[-5.0, -7.0], [5.0, -5.0], [-1.0, 
+-5.0]], [[1.0, 3.0], [-2.0, 7.0], [1.0, 3.0]]], [[[-2.0, 0.0], [0.0, -3.0], [5.0, -7.0]], [[0.0, 7.0], [5.0, 1.0], [0.0, 
+6.0]]]]))
+      arg1=numpy.array([[[[6.0, -4.0], [4.0, -7.0], [-3.0, 7.0]], [[-5.0, -2.0], [-3.0, -7.0], [7.0, 7.0]]], [[[1.0, 5.0], 
+[0.0, -3.0], [-6.0, 3.0]], [[3.0, 0.0], [-4.0, -5.0], [6.0, -7.0]]], [[[-1.0, 1.0], [0.0, 7.0], [-7.0, 0.0]], [[7.0, -3.0], 
+[-1.0, 2.0], [1.0, -4.0]]], [[[-3.0, -6.0], [0.0, 2.0], [-3.0, -2.0]], [[4.0, 0.0], [3.0, 4.0], [5.0, 3.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
+      ref=Data(169.0,self.functionspace)
+      ref.setTaggedValue(1,174.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_constData_rank1_offset0(self):
-      arg0=Data(numpy.array([[[4.0, 3.0], [-7.0, 3.0]], [[2.0, 0.0], [5.0, 5.0]], [[7.0, 0.0], [6.0, -7.0]], [[-6.0, -1.0], 
-[7.0, -6.0]], [[4.0, -5.0], [1.0, 1.0]], [[-6.0, 0.0], [-6.0, 0.0]]]),self.functionspace)
-      arg1=Data(numpy.array([0.0, -7.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank0_array_rank1_offset0(self):
+      arg0=Data(-6.0,self.functionspace)
+      arg0.setTaggedValue(1,5.0)
+      arg1=numpy.array([3.0, -3.0])
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, -28.0], [0.0, -21.0]], [[0.0, 49.0], [0.0, -21.0]]], [[[0.0, -14.0], [0.0, 0.0]], [[0.0, 
--35.0], [0.0, -35.0]]], [[[0.0, -49.0], [0.0, 0.0]], [[0.0, -42.0], [0.0, 49.0]]], [[[0.0, 42.0], [0.0, 7.0]], [[0.0, -49.0], 
-[0.0, 42.0]]], [[[0.0, -28.0], [0.0, 35.0]], [[0.0, -7.0], [0.0, -7.0]]], [[[0.0, 42.0], [0.0, 0.0]], [[0.0, 42.0], [0.0, 
-0.0]]]]),self.functionspace)
+      ref=Data(numpy.array([-18.0, 18.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([15.0, -15.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[7.0, -7.0, 6.0], [-1.0, -1.0, -2.0]], [[7.0, 1.0, -1.0], [2.0, -1.0, -3.0]]], [[[3.0, 7.0, 
--5.0], [-1.0, -7.0, 2.0]], [[7.0, -7.0, 0.0], [-2.0, 0.0, -1.0]]], [[[7.0, 0.0, 0.0], [-5.0, -3.0, 4.0]], [[-6.0, -1.0, 4.0], 
-[2.0, 0.0, -2.0]]], [[[-2.0, -2.0, 6.0], [4.0, -6.0, 3.0]], [[0.0, -7.0, -6.0], [7.0, 3.0, -4.0]]], [[[6.0, 3.0, -1.0], [6.0, 
-0.0, 7.0]], [[2.0, -6.0, -7.0], [0.0, -6.0, 6.0]]], [[[-3.0, -5.0, 0.0], [3.0, 3.0, 5.0]], [[-4.0, -7.0, 1.0], [-7.0, 7.0, 
-4.0]]]]),self.functionspace)
-      arg1=Data(numpy.array([[-6.0, 5.0, 7.0], [-5.0, 3.0, 0.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank2_offset1(self):
+      arg0=Data(numpy.array([7.0, -7.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, -5.0, 2.0]))
+      arg1=numpy.array([[-3.0, 7.0, -4.0], [3.0, 1.0, -3.0]])
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      ref=Data(numpy.array([[[[-35.0, -56.0], [-13.0, 2.0]], [[-44.0, -32.0], [-38.0, -13.0]]], [[[-18.0, 6.0], [-15.0, 
--16.0]], [[-77.0, -56.0], [5.0, 10.0]]], [[[-42.0, -35.0], [43.0, 16.0]], [[59.0, 27.0], [-26.0, -10.0]]], [[[44.0, 4.0], 
-[-33.0, -38.0]], [[-77.0, -21.0], [-55.0, -26.0]]], [[[-28.0, -21.0], [13.0, -30.0]], [[-91.0, -28.0], [12.0, -18.0]]], 
-[[[-7.0, 0.0], [32.0, -6.0]], [[-4.0, -1.0], [105.0, 56.0]]]]),self.functionspace)
+      ref=Data(numpy.array([-42.0, 35.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-22.0, -32.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[5.0, 1.0], [4.0, -1.0]], [[6.0, -3.0], [1.0, 3.0]], [[-2.0, -6.0], [2.0, 1.0]], [[-5.0, 5.0], 
-[2.0, -1.0]], [[0.0, 4.0], [1.0, -1.0]], [[6.0, 0.0], [-1.0, 1.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(3.0)+(1-msk_arg1)*(-4.0)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[15.0, 3.0], [12.0, -3.0]], [[18.0, -9.0], [3.0, 9.0]], [[-6.0, -18.0], [6.0, 3.0]], [[-15.0, 
-15.0], [6.0, -3.0]], [[0.0, 12.0], [3.0, -3.0]], [[18.0, 0.0], [-3.0, 3.0]]])+(1.-msk_ref)*numpy.array([[[-20.0, -4.0], [-16.0, 
-4.0]], [[-24.0, 12.0], [-4.0, -12.0]], [[8.0, 24.0], [-8.0, -4.0]], [[20.0, -20.0], [-8.0, 4.0]], [[-0.0, -16.0], [-4.0, 4.0]], 
-[[-24.0, -0.0], [4.0, -4.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[-6.0, 2.0, 4.0], [5.0, 4.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, 5.0, 0.0], [0.0, 4.0, 0.0]]))
+      arg1=numpy.array([[[-3.0, 1.0, -2.0], [-2.0, 1.0, 1.0]], [[-3.0, 5.0, 3.0], [-7.0, -5.0, 1.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([10.0, -11.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-6.0, -10.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank1_offset1(self):
-      arg0=Data(numpy.array([[[[0.0, -1.0, 0.0], [3.0, 6.0, 1.0]], [[0.0, -3.0, 5.0], [-4.0, -4.0, -4.0]]], [[[-4.0, 4.0, 5.0], 
-[-4.0, -4.0, 5.0]], [[-5.0, 3.0, -6.0], [-4.0, 0.0, 2.0]]], [[[-1.0, -2.0, 5.0], [2.0, 7.0, -4.0]], [[-6.0, -2.0, 1.0], [-7.0, 
-5.0, -4.0]]], [[[-5.0, 3.0, 2.0], [-2.0, -4.0, 5.0]], [[6.0, 7.0, -7.0], [4.0, 1.0, -6.0]]], [[[2.0, 0.0, 7.0], [6.0, -2.0, 
-3.0]], [[-6.0, 7.0, 0.0], [6.0, -5.0, -4.0]]], [[[4.0, -4.0, -5.0], [2.0, 0.0, 5.0]], [[1.0, 2.0, 2.0], [6.0, -2.0, 
-1.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, 4.0, -6.0])+(1.-msk_arg1)*numpy.array([0.0, 6.0, -4.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-4.0, 0.0], [-42.0, 32.0]], [[10.0, -22.0], [78.0, 12.0]], [[-32.0, 40.0], [22.0, 86.0]], 
-[[30.0, -34.0], [34.0, 16.0]], [[-54.0, -62.0], [64.0, -32.0]], [[-10.0, -42.0], [-10.0, 
--50.0]]])+(1.-msk_ref)*numpy.array([[[-6.0, 32.0], [-38.0, -8.0]], [[4.0, -44.0], [42.0, -8.0]], [[-32.0, 58.0], [-16.0, 
-46.0]], [[10.0, -44.0], [70.0, 30.0]], [[-28.0, -24.0], [42.0, -14.0]], [[-4.0, -20.0], [4.0, -16.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[-5.0, -5.0, 1.0], [1.0, -6.0, 6.0], [1.0, -4.0, 7.0], [3.0, 6.0, 0.0]], [[-6.0, 0.0, 1.0], [7.0, 
+-5.0, 7.0], [-4.0, 1.0, 3.0], [0.0, -7.0, 0.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, 4.0, 0.0], [-1.0, -4.0, -3.0], [-7.0, 7.0, 1.0], [7.0, -6.0, 7.0]], [[2.0, 
+-2.0, 7.0], [5.0, 7.0, 4.0], [2.0, 0.0, 2.0], [4.0, -7.0, -1.0]]]))
+      arg1=numpy.array([[[[0.0, 7.0, -7.0], [-3.0, 5.0, 3.0], [-2.0, -1.0, -5.0], [3.0, -5.0, -4.0]], [[-4.0, -6.0, 2.0], 
+[-7.0, 4.0, 6.0], [2.0, -4.0, 1.0], [-2.0, 2.0, -4.0]]], [[[7.0, -3.0, 2.0], [-4.0, -2.0, 0.0], [4.0, 0.0, 2.0], [6.0, -5.0, 
+0.0]], [[4.0, 0.0, 2.0], [6.0, -6.0, 5.0], [-2.0, 7.0, 0.0], [-7.0, -2.0, 7.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([-135.0, 110.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([50.0, 58.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank3_expandedData_rank1_offset0(self):
-      arg0=Data(numpy.array([[[0.0, 7.0], [-6.0, 0.0]], [[-5.0, 2.0], [5.0, 7.0]], [[-3.0, 5.0], [0.0, 7.0]], [[4.0, 3.0], 
-[0.0, 1.0]], [[7.0, -5.0], [6.0, -1.0]], [[-5.0, -7.0], [-1.0, -6.0]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([7.0, 7.0])+(1.-msk_arg1)*numpy.array([5.0, 0.0])
+   def test_generalTensorTransposedProduct_taggedData_rank0_array_rank2_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg0.setTaggedValue(1,1.0)
+      arg1=numpy.array([[2.0, -1.0, 4.0, 1.0, 0.0], [-5.0, -6.0, 6.0, 3.0, 3.0], [-7.0, 1.0, -7.0, 0.0, 4.0], [-4.0, 3.0, 6.0, 
+7.0, 6.0]])
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [49.0, 49.0]], [[-42.0, -42.0], [0.0, 0.0]]], [[[-35.0, -35.0], [14.0, 14.0]], 
-[[35.0, 35.0], [49.0, 49.0]]], [[[-21.0, -21.0], [35.0, 35.0]], [[0.0, 0.0], [49.0, 49.0]]], [[[28.0, 28.0], [21.0, 21.0]], 
-[[0.0, 0.0], [7.0, 7.0]]], [[[49.0, 49.0], [-35.0, -35.0]], [[42.0, 42.0], [-7.0, -7.0]]], [[[-35.0, -35.0], [-49.0, -49.0]], 
-[[-7.0, -7.0], [-42.0, -42.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0], [35.0, 0.0]], [[-30.0, 0.0], [0.0, 0.0]]], [[[-25.0, 
-0.0], [10.0, 0.0]], [[25.0, 0.0], [35.0, 0.0]]], [[[-15.0, 0.0], [25.0, 0.0]], [[0.0, 0.0], [35.0, 0.0]]], [[[20.0, 0.0], 
-[15.0, 0.0]], [[0.0, 0.0], [5.0, 0.0]]], [[[35.0, 0.0], [-25.0, 0.0]], [[30.0, 0.0], [-5.0, 0.0]]], [[[-25.0, 0.0], [-35.0, 
-0.0]], [[-5.0, 0.0], [-30.0, 0.0]]]])
+      ref=Data(numpy.array([[-10.0, 5.0, -20.0, -5.0, -0.0], [25.0, 30.0, -30.0, -15.0, -15.0], [35.0, -5.0, 35.0, -0.0, 
+-20.0], [20.0, -15.0, -30.0, -35.0, -30.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[2.0, -1.0, 4.0, 1.0, 0.0], [-5.0, -6.0, 6.0, 3.0, 3.0], [-7.0, 1.0, -7.0, 0.0, 4.0], 
+[-4.0, 3.0, 6.0, 7.0, 6.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank2_offset1(self):
-      arg0=Data(numpy.array([[[[3.0, -6.0, -6.0], [6.0, -4.0, -2.0]], [[4.0, -4.0, 5.0], [-5.0, -5.0, 1.0]]], [[[3.0, -2.0, 
-3.0], [-3.0, -5.0, -3.0]], [[0.0, 4.0, -1.0], [-7.0, 2.0, 7.0]]], [[[4.0, -1.0, 4.0], [1.0, -4.0, 1.0]], [[-6.0, 4.0, 1.0], 
-[2.0, 0.0, -4.0]]], [[[5.0, 6.0, 5.0], [0.0, -6.0, -1.0]], [[2.0, 7.0, -2.0], [4.0, 7.0, -1.0]]], [[[6.0, 2.0, 0.0], [7.0, 6.0, 
-1.0]], [[1.0, -6.0, 5.0], [4.0, -4.0, -3.0]]], [[[0.0, 5.0, 0.0], [-4.0, -3.0, 0.0]], [[3.0, -5.0, 5.0], [4.0, 0.0, 
--1.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[2.0, -4.0, 7.0], [-1.0, 7.0, -1.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 0.0, -2.0], [0.0, 7.0, 
-1.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank3_offset1(self):
+      arg0=Data(numpy.array([4.0, 4.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, 0.0, -5.0]))
+      arg1=numpy.array([[[0.0, 5.0, 0.0], [0.0, -5.0, 1.0], [-4.0, 1.0, 5.0], [-5.0, 1.0, -4.0], [-7.0, -3.0, -5.0]], [[3.0, 
+-7.0, -4.0], [0.0, -7.0, -6.0], [-5.0, -2.0, 0.0], [7.0, 0.0, -7.0], [0.0, 0.0, 7.0]], [[-3.0, 4.0, 7.0], [-3.0, -1.0, -5.0], 
+[4.0, 6.0, 7.0], [-6.0, 6.0, 1.0], [-2.0, -5.0, 6.0]], [[-2.0, -5.0, 1.0], [6.0, 0.0, 0.0], [1.0, 6.0, -7.0], [0.0, 6.0, -6.0], 
+[-5.0, -5.0, 2.0]]])
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-12.0, -39.0], [14.0, -32.0]], [[59.0, -37.0], [17.0, -31.0]]], [[[35.0, -20.0], [-7.0, 
--29.0]], [[-23.0, 29.0], [27.0, 14.0]]], [[[40.0, -15.0], [25.0, -30.0]], [[-21.0, 33.0], [-24.0, 2.0]]], [[[21.0, 32.0], 
-[17.0, -41.0]], [[-38.0, 49.0], [-27.0, 46.0]]], [[[4.0, 8.0], [-3.0, 34.0]], [[61.0, -48.0], [3.0, -29.0]]], [[[-20.0, 35.0], 
-[4.0, -17.0]], [[61.0, -43.0], [1.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -48.0], [-32.0, -30.0]], [[-34.0, -23.0], 
-[28.0, -34.0]]], [[[-24.0, -11.0], [24.0, -38.0]], [[2.0, 27.0], [28.0, 21.0]]], [[[-32.0, -3.0], [-8.0, -27.0]], [[34.0, 
-29.0], [-4.0, -4.0]]], [[[-40.0, 47.0], [2.0, -43.0]], [[-8.0, 47.0], [-22.0, 48.0]]], [[[-36.0, 14.0], [-44.0, 43.0]], 
-[[-16.0, -37.0], [-18.0, -31.0]]], [[[0.0, 35.0], [24.0, -21.0]], [[-28.0, -30.0], [-22.0, -1.0]]]])
+      ref=Data(numpy.array([[20.0, -26.0, -42.0, 8.0, -10.0], [8.0, 8.0, -28.0, 70.0, -42.0], [-38.0, 14.0, -2.0, -6.0, -64.0], 
+[-34.0, 24.0, 70.0, 60.0, -52.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[0.0, -5.0, -49.0, -10.0, -17.0], [38.0, 30.0, -30.0, 77.0, -35.0], [-53.0, 7.0, -11.0, 
+-41.0, -42.0], [-17.0, 36.0, 41.0, 30.0, -40.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_float_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[7.0, 7.0, -6.0, 7.0], [5.0, 7.0, 4.0, 6.0], [0.0, 5.0, -3.0, -4.0]], [[5.0, 2.0, 6.0, 0.0], 
-[0.0, 6.0, -6.0, -3.0], [-3.0, 6.0, 4.0, 4.0]]], [[[4.0, 1.0, 5.0, -3.0], [2.0, 3.0, 2.0, 5.0], [5.0, 0.0, 7.0, 0.0]], [[7.0, 
--6.0, -3.0, 3.0], [-3.0, 0.0, 2.0, -5.0], [-5.0, 5.0, -7.0, -1.0]]], [[[3.0, 3.0, 4.0, -6.0], [2.0, -6.0, 5.0, 6.0], [3.0, 
--4.0, 5.0, 0.0]], [[-3.0, -6.0, 4.0, 6.0], [6.0, -2.0, -3.0, -7.0], [5.0, 3.0, 7.0, 2.0]]]]),self.functionspace)
-      arg1=4.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[28.0, 28.0, -24.0, 28.0], [20.0, 28.0, 16.0, 24.0], [0.0, 20.0, -12.0, -16.0]], [[20.0, 8.0, 
-24.0, 0.0], [0.0, 24.0, -24.0, -12.0], [-12.0, 24.0, 16.0, 16.0]]], [[[16.0, 4.0, 20.0, -12.0], [8.0, 12.0, 8.0, 20.0], [20.0, 
-0.0, 28.0, 0.0]], [[28.0, -24.0, -12.0, 12.0], [-12.0, 0.0, 8.0, -20.0], [-20.0, 20.0, -28.0, -4.0]]], [[[12.0, 12.0, 16.0, 
--24.0], [8.0, -24.0, 20.0, 24.0], [12.0, -16.0, 20.0, 0.0]], [[-12.0, -24.0, 16.0, 24.0], [24.0, -8.0, -12.0, -28.0], [20.0, 
-12.0, 28.0, 8.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[0.0, -1.0, -3.0], [7.0, 6.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, -3.0, 3.0], [0.0, 5.0, 4.0]]))
+      arg1=numpy.array([[[[2.0, 5.0, 6.0], [-6.0, 3.0, 7.0]], [[-7.0, 0.0, -3.0], [-4.0, 7.0, -6.0]], [[2.0, -2.0, 6.0], [-5.0, 
+7.0, -7.0]], [[2.0, -2.0, -3.0], [-1.0, -7.0, -1.0]], [[5.0, 1.0, 6.0], [-3.0, 3.0, 6.0]]], [[[-5.0, 3.0, 0.0], [3.0, 7.0, 
+-5.0]], [[4.0, 3.0, -1.0], [-3.0, 1.0, 1.0]], [[1.0, 5.0, -3.0], [3.0, -7.0, 2.0]], [[2.0, 1.0, 6.0], [1.0, 0.0, 4.0]], [[-6.0, 
+-6.0, 1.0], [-7.0, 5.0, 7.0]]], [[[5.0, -2.0, -5.0], [-2.0, -3.0, 2.0]], [[6.0, 4.0, 5.0], [1.0, -5.0, 1.0]], [[4.0, -6.0, 
+0.0], [3.0, -7.0, 2.0]], [[-2.0, 0.0, 2.0], [-7.0, -2.0, -3.0]], [[-7.0, 6.0, 2.0], [0.0, -5.0, 4.0]]], [[[6.0, 1.0, -5.0], 
+[-4.0, -1.0, -5.0]], [[-6.0, -7.0, -5.0], [-4.0, 1.0, 6.0]], [[-7.0, 3.0, -1.0], [0.0, 3.0, -7.0]], [[5.0, -4.0, -1.0], [5.0, 
+0.0, -1.0]], [[3.0, -5.0, -1.0], [2.0, 2.0, 2.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-89.0, 59.0, 33.0, -32.0, -58.0], [90.0, -21.0, -29.0, -36.0, -58.0], [-27.0, -48.0, -27.0, -49.0, 
+-66.0], [10.0, -36.0, 60.0, 48.0, 22.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[34.0, 44.0, 19.0, -54.0, 24.0], [36.0, -27.0, -57.0, 19.0, 110.0], [-46.0, -54.0, 
+-33.0, -4.0, 21.0], [-79.0, 71.0, 17.0, -25.0, 12.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_array_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[2.0, 7.0, -1.0, 1.0], [5.0, 6.0, -6.0, -7.0], [7.0, -6.0, -6.0, 0.0]], [[-2.0, 5.0, 0.0, 1.0], 
-[3.0, 0.0, 0.0, -1.0], [-3.0, -6.0, 1.0, -5.0]]], [[[-1.0, 0.0, -6.0, 2.0], [2.0, 1.0, -7.0, -6.0], [-7.0, -1.0, -3.0, 4.0]], 
-[[1.0, -5.0, 4.0, 4.0], [-4.0, 5.0, 1.0, 2.0], [-7.0, 1.0, 0.0, 1.0]]], [[[4.0, -1.0, -6.0, 7.0], [0.0, 7.0, 2.0, -6.0], [1.0, 
--5.0, -3.0, 0.0]], [[5.0, 4.0, -7.0, 2.0], [2.0, -4.0, 0.0, 0.0], [-6.0, -7.0, 1.0, -6.0]]]]),self.functionspace)
-      arg1=numpy.array(2.0)
+   def test_generalTensorTransposedProduct_taggedData_rank0_array_rank3_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=numpy.array([[[-3.0, -1.0], [0.0, -5.0]], [[-3.0, 5.0], [7.0, 3.0]], [[-2.0, -2.0], [4.0, -3.0]], [[0.0, 7.0], 
+[-1.0, -4.0]], [[-5.0, -4.0], [-3.0, 7.0]], [[-4.0, -6.0], [-4.0, 2.0]]])
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[4.0, 14.0, -2.0, 2.0], [10.0, 12.0, -12.0, -14.0], [14.0, -12.0, -12.0, 0.0]], [[-4.0, 10.0, 
-0.0, 2.0], [6.0, 0.0, 0.0, -2.0], [-6.0, -12.0, 2.0, -10.0]]], [[[-2.0, 0.0, -12.0, 4.0], [4.0, 2.0, -14.0, -12.0], [-14.0, 
--2.0, -6.0, 8.0]], [[2.0, -10.0, 8.0, 8.0], [-8.0, 10.0, 2.0, 4.0], [-14.0, 2.0, 0.0, 2.0]]], [[[8.0, -2.0, -12.0, 14.0], [0.0, 
-14.0, 4.0, -12.0], [2.0, -10.0, -6.0, 0.0]], [[10.0, 8.0, -14.0, 4.0], [4.0, -8.0, 0.0, 0.0], [-12.0, -14.0, 2.0, 
--12.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[[3.0, 1.0], [-0.0, 5.0]], [[3.0, -5.0], [-7.0, -3.0]], [[2.0, 2.0], [-4.0, 3.0]], [[-0.0, -7.0], 
+[1.0, 4.0]], [[5.0, 4.0], [3.0, -7.0]], [[4.0, 6.0], [4.0, -2.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], [0.0, 0.0]], [[-0.0, -0.0], [0.0, -0.0]], 
+[[0.0, 0.0], [-0.0, -0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[-0.0, -0.0], [-0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_constData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[5.0, -4.0, 0.0, -4.0], [-6.0, -1.0, -6.0, 4.0], [-7.0, -3.0, 4.0, 3.0]], [[-5.0, -3.0, 5.0, 
--2.0], [7.0, 7.0, -7.0, -6.0], [-4.0, 0.0, -6.0, 0.0]]], [[[1.0, -3.0, -4.0, 6.0], [1.0, 2.0, 2.0, -6.0], [4.0, -3.0, -5.0, 
--1.0]], [[3.0, 0.0, 6.0, -3.0], [0.0, 0.0, 4.0, -5.0], [0.0, -2.0, 4.0, -6.0]]], [[[-7.0, -3.0, -7.0, 4.0], [3.0, -3.0, -6.0, 
-6.0], [7.0, -3.0, -5.0, 2.0]], [[-4.0, 3.0, 0.0, -7.0], [-3.0, 3.0, -4.0, 0.0], [6.0, 5.0, -6.0, -3.0]]]]),self.functionspace)
-      arg1=Data(0.0,self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      ref=Data(numpy.array([[[[0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, 0.0]], [[-0.0, -0.0, 0.0, 
--0.0], [0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0]]], [[[0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 
--0.0]], [[0.0, 0.0, 0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, -0.0]]], [[[-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, 
-0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, 0.0, 0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank4_offset1(self):
+      arg0=Data(numpy.array([4.0, -1.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([3.0, -3.0, 6.0]))
+      arg1=numpy.array([[[[-5.0, -5.0, 5.0], [-3.0, -1.0, -1.0]], [[2.0, 1.0, -7.0], [7.0, -1.0, -7.0]]], [[[-5.0, 6.0, -5.0], 
+[1.0, 2.0, 6.0]], [[5.0, 4.0, -1.0], [-3.0, -5.0, 7.0]]], [[[0.0, 6.0, 6.0], [6.0, -5.0, 1.0]], [[-7.0, -3.0, 4.0], [-3.0, 
+-1.0, -4.0]]], [[[-1.0, -7.0, 5.0], [-5.0, 5.0, -6.0]], [[-6.0, 4.0, 4.0], [-6.0, 0.0, 2.0]]], [[[4.0, 0.0, 2.0], [2.0, -6.0, 
+-3.0]], [[1.0, 0.0, 3.0], [-4.0, 3.0, -1.0]]], [[[7.0, -5.0, 7.0], [-4.0, 7.0, 7.0]], [[1.0, -3.0, 2.0], [-1.0, 3.0, -1.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-30.0, -8.0], [28.0, 50.0]], [[-11.0, -16.0], [19.0, -28.0]], [[-24.0, 26.0], [-37.0, 1.0]], 
+[[-12.0, -7.0], [-40.0, -30.0]], [[10.0, 23.0], [-5.0, -16.0]], [[12.0, -44.0], [1.0, -4.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[30.0, -12.0], [-39.0, -18.0]], [[-63.0, 33.0], [-3.0, 48.0]], [[18.0, 39.0], [12.0, 
+-30.0]], [[48.0, -66.0], [-6.0, -6.0]], [[24.0, 6.0], [21.0, -27.0]], [[78.0, 9.0], [24.0, -18.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_constData_rank4_expandedData_rank0_offset0(self):
-      arg0=Data(numpy.array([[[[1.0, 3.0, -7.0, -4.0], [-2.0, -3.0, 6.0, -6.0], [-7.0, -4.0, -1.0, 3.0]], [[-1.0, 0.0, 0.0, 
-1.0], [-1.0, -7.0, 3.0, 5.0], [-3.0, 2.0, 1.0, 5.0]]], [[[-1.0, 1.0, -4.0, 6.0], [0.0, 2.0, -6.0, -5.0], [-2.0, -5.0, -3.0, 
-0.0]], [[-4.0, -3.0, 0.0, -5.0], [-2.0, -1.0, 6.0, 0.0], [0.0, 7.0, 5.0, 0.0]]], [[[3.0, -5.0, -6.0, -4.0], [-7.0, 0.0, -4.0, 
-4.0], [-4.0, 3.0, -1.0, 7.0]], [[4.0, 7.0, 5.0, -2.0], [-4.0, -1.0, 7.0, 6.0], [-7.0, 1.0, -4.0, -6.0]]]]),self.functionspace)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(-6.0)
+   def test_generalTensorTransposedProduct_taggedData_rank0_array_rank4_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg0.setTaggedValue(1,1.0)
+      arg1=numpy.array([[[[-4.0, 1.0, -4.0, 2.0], [-5.0, -6.0, 2.0, 7.0], [0.0, -1.0, 1.0, 7.0]], [[2.0, 0.0, -6.0, -7.0], 
+[-4.0, 3.0, 7.0, -5.0], [-7.0, 3.0, -1.0, 3.0]]], [[[-1.0, 5.0, 2.0, 1.0], [6.0, 5.0, -2.0, -6.0], [1.0, -4.0, -3.0, -1.0]], 
+[[0.0, 0.0, 1.0, -7.0], [3.0, 6.0, 0.0, 7.0], [5.0, -2.0, -7.0, 3.0]]], [[[0.0, -3.0, 0.0, 4.0], [3.0, -3.0, -7.0, 0.0], [-7.0, 
+-1.0, -4.0, 7.0]], [[3.0, 4.0, 6.0, -4.0], [-5.0, -6.0, -1.0, -4.0], [-7.0, 5.0, -7.0, 0.0]]]])
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[1.0, 3.0, -7.0, -4.0], [-2.0, -3.0, 6.0, -6.0], [-7.0, -4.0, -1.0, 3.0]], [[-1.0, 0.0, 0.0, 
-1.0], [-1.0, -7.0, 3.0, 5.0], [-3.0, 2.0, 1.0, 5.0]]], [[[-1.0, 1.0, -4.0, 6.0], [0.0, 2.0, -6.0, -5.0], [-2.0, -5.0, -3.0, 
-0.0]], [[-4.0, -3.0, 0.0, -5.0], [-2.0, -1.0, 6.0, 0.0], [0.0, 7.0, 5.0, 0.0]]], [[[3.0, -5.0, -6.0, -4.0], [-7.0, 0.0, -4.0, 
-4.0], [-4.0, 3.0, -1.0, 7.0]], [[4.0, 7.0, 5.0, -2.0], [-4.0, -1.0, 7.0, 6.0], [-7.0, 1.0, -4.0, 
--6.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -18.0, 42.0, 24.0], [12.0, 18.0, -36.0, 36.0], [42.0, 24.0, 6.0, -18.0]], [[6.0, 
--0.0, -0.0, -6.0], [6.0, 42.0, -18.0, -30.0], [18.0, -12.0, -6.0, -30.0]]], [[[6.0, -6.0, 24.0, -36.0], [-0.0, -12.0, 36.0, 
-30.0], [12.0, 30.0, 18.0, -0.0]], [[24.0, 18.0, -0.0, 30.0], [12.0, 6.0, -36.0, -0.0], [-0.0, -42.0, -30.0, -0.0]]], [[[-18.0, 
-30.0, 36.0, 24.0], [42.0, -0.0, 24.0, -24.0], [24.0, -18.0, 6.0, -42.0]], [[-24.0, -42.0, -30.0, 12.0], [24.0, 6.0, -42.0, 
--36.0], [42.0, -6.0, 24.0, 36.0]]]])
+      ref=Data(numpy.array([[[[-4.0, 1.0, -4.0, 2.0], [-5.0, -6.0, 2.0, 7.0], [0.0, -1.0, 1.0, 7.0]], [[2.0, 0.0, -6.0, -7.0], 
+[-4.0, 3.0, 7.0, -5.0], [-7.0, 3.0, -1.0, 3.0]]], [[[-1.0, 5.0, 2.0, 1.0], [6.0, 5.0, -2.0, -6.0], [1.0, -4.0, -3.0, -1.0]], 
+[[0.0, 0.0, 1.0, -7.0], [3.0, 6.0, 0.0, 7.0], [5.0, -2.0, -7.0, 3.0]]], [[[0.0, -3.0, 0.0, 4.0], [3.0, -3.0, -7.0, 0.0], [-7.0, 
+-1.0, -4.0, 7.0]], [[3.0, 4.0, 6.0, -4.0], [-5.0, -6.0, -1.0, -4.0], [-7.0, 5.0, -7.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-4.0, 1.0, -4.0, 2.0], [-5.0, -6.0, 2.0, 7.0], [0.0, -1.0, 1.0, 7.0]], [[2.0, 0.0, 
+-6.0, -7.0], [-4.0, 3.0, 7.0, -5.0], [-7.0, 3.0, -1.0, 3.0]]], [[[-1.0, 5.0, 2.0, 1.0], [6.0, 5.0, -2.0, -6.0], [1.0, -4.0, 
+-3.0, -1.0]], [[0.0, 0.0, 1.0, -7.0], [3.0, 6.0, 0.0, 7.0], [5.0, -2.0, -7.0, 3.0]]], [[[0.0, -3.0, 0.0, 4.0], [3.0, -3.0, 
+-7.0, 0.0], [-7.0, -1.0, -4.0, 7.0]], [[3.0, 4.0, 6.0, -4.0], [-5.0, -6.0, -1.0, -4.0], [-7.0, 5.0, -7.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-7.0)+(1-msk_arg0)*(7.0)
-      arg1=-2.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(14.0)+(1.-msk_ref)*numpy.array(-14.0)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(6.0)+(1-msk_arg0)*(0.0)
-      arg1=numpy.array(1.0)
+   def test_generalTensorTransposedProduct_taggedData_rank0_constData_rank0_offset0(self):
+      arg0=Data(-2.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=Data(5.0,self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(6.0)+(1.-msk_ref)*numpy.array(0.0)
+      ref=Data(-10.0,self.functionspace)
+      ref.setTaggedValue(1,0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([3.0, 0.0, 4.0])+(1.-msk_arg0)*numpy.array([1.0, 4.0, 1.0])
-      arg1=numpy.array([3.0, 7.0, -7.0])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([4.0, -4.0, 5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 6.0, 7.0]))
+      arg1=Data(numpy.array([-6.0, 0.0, 1.0]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-19.0)+(1.-msk_ref)*numpy.array(24.0)
+      ref=Data(-19.0,self.functionspace)
+      ref.setTaggedValue(1,7.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, 6.0, 5.0], [3.0, 6.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-7.0, -4.0, -2.0], [-3.0, 5.0, 
-0.0]])
-      arg1=numpy.array([[-5.0, 4.0, -2.0], [-2.0, -1.0, 0.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-4.0, 3.0, -7.0], [5.0, 2.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 1.0, 7.0], [3.0, -1.0, 0.0]]))
+      arg1=Data(numpy.array([[-6.0, 5.0, 2.0], [-6.0, 4.0, -6.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-13.0)+(1.-msk_ref)*numpy.array(24.0)
+      ref=Data(45.0,self.functionspace)
+      ref.setTaggedValue(1,33.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 5.0, -3.0], [-2.0, 4.0, 0.0], [-5.0, -3.0, 6.0], [-4.0, 0.0, -5.0]], [[-4.0, -1.0, 
--1.0], [-4.0, 4.0, 4.0], [-3.0, 0.0, -2.0], [-6.0, -5.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 2.0, 0.0], [-6.0, -6.0, 
--3.0], [0.0, 6.0, -1.0], [7.0, 5.0, -7.0]], [[7.0, 5.0, 6.0], [-4.0, -1.0, -1.0], [0.0, 0.0, 0.0], [6.0, -4.0, -5.0]]])
-      arg1=numpy.array([[[5.0, -6.0, 2.0], [3.0, 2.0, 2.0], [2.0, 5.0, 2.0], [-2.0, -6.0, -1.0]], [[-4.0, 0.0, 1.0], [1.0, 3.0, 
-3.0], [-4.0, -1.0, -3.0], [-1.0, 2.0, -3.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-2.0, -4.0, -4.0], [-7.0, -4.0, 2.0], [-2.0, 3.0, -7.0], [-1.0, 5.0, -7.0]], [[2.0, 7.0, 2.0], 
+[-6.0, 6.0, 0.0], [-6.0, -4.0, -1.0], [-4.0, -6.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, 3.0, 3.0], [0.0, -2.0, -4.0], [1.0, 6.0, 3.0], [6.0, -6.0, 7.0]], [[-3.0, 5.0, 
+-2.0], [-3.0, 3.0, 4.0], [7.0, -6.0, -1.0], [-7.0, -3.0, 6.0]]]))
+      arg1=Data(numpy.array([[[-7.0, 7.0, 6.0], [-6.0, -4.0, 2.0], [3.0, 0.0, 2.0], [5.0, 7.0, -5.0]], [[0.0, 5.0, 0.0], [5.0, 
+4.0, 5.0], [2.0, 7.0, -3.0], [5.0, 6.0, 6.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(15.0)+(1.-msk_ref)*numpy.array(-88.0)
+      ref=Data(-19.0,self.functionspace)
+      ref.setTaggedValue(1,-20.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, 6.0], [3.0, 0.0], [2.0, 1.0]], [[-1.0, -2.0], [1.0, -5.0], [-1.0, -3.0]]], [[[0.0, 
--3.0], [-3.0, 1.0], [5.0, 7.0]], [[6.0, 2.0], [-2.0, 6.0], [1.0, 1.0]]], [[[0.0, -6.0], [-4.0, 3.0], [2.0, 1.0]], [[-5.0, 
--2.0], [-2.0, 1.0], [2.0, -1.0]]], [[[6.0, -3.0], [0.0, -1.0], [0.0, 5.0]], [[6.0, -6.0], [-5.0, 1.0], [0.0, 
--4.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, -6.0], [-5.0, 3.0], [-2.0, 4.0]], [[6.0, 5.0], [2.0, 1.0], [6.0, -4.0]]], [[[-3.0, 
--3.0], [-5.0, -5.0], [0.0, -4.0]], [[3.0, -3.0], [0.0, -3.0], [-1.0, -2.0]]], [[[3.0, 3.0], [6.0, 4.0], [0.0, 3.0]], [[7.0, 
--2.0], [5.0, 0.0], [6.0, 7.0]]], [[[1.0, 2.0], [3.0, 0.0], [7.0, -1.0]], [[4.0, 4.0], [4.0, -1.0], [-5.0, 6.0]]]])
-      arg1=numpy.array([[[[-5.0, -7.0], [7.0, 4.0], [-7.0, 5.0]], [[0.0, 3.0], [0.0, 4.0], [-7.0, 6.0]]], [[[2.0, 0.0], [-2.0, 
-2.0], [2.0, -3.0]], [[-4.0, -3.0], [6.0, 6.0], [0.0, 0.0]]], [[[-6.0, 7.0], [-6.0, 7.0], [0.0, 7.0]], [[2.0, 0.0], [4.0, 6.0], 
-[-4.0, 0.0]]], [[[0.0, 0.0], [1.0, -1.0], [-2.0, 4.0]], [[-2.0, 0.0], [1.0, 2.0], [-7.0, 6.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[5.0, -5.0], [-4.0, 3.0], [0.0, 7.0]], [[1.0, 7.0], [0.0, -3.0], [-1.0, -3.0]]], [[[-4.0, -1.0], 
+[-1.0, -7.0], [-3.0, 5.0]], [[4.0, -3.0], [7.0, 7.0], [-2.0, 0.0]]], [[[6.0, -5.0], [6.0, -7.0], [5.0, 0.0]], [[7.0, 6.0], 
+[-2.0, -5.0], [2.0, 1.0]]], [[[-2.0, 4.0], [2.0, 5.0], [0.0, 0.0]], [[3.0, -2.0], [-4.0, -3.0], [0.0, 
+6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 2.0], [1.0, 1.0], [-7.0, 6.0]], [[-3.0, -7.0], [0.0, -7.0], [1.0, -7.0]]], 
+[[[7.0, 4.0], [5.0, -5.0], [-2.0, 5.0]], [[-1.0, 2.0], [6.0, -7.0], [-5.0, -1.0]]], [[[0.0, -6.0], [2.0, -4.0], [-5.0, -3.0]], 
+[[0.0, -2.0], [1.0, 3.0], [5.0, -4.0]]], [[[-2.0, -7.0], [3.0, 2.0], [0.0, 6.0]], [[6.0, 3.0], [0.0, -3.0], [-2.0, 6.0]]]]))
+      arg1=Data(numpy.array([[[[6.0, -4.0], [0.0, 6.0], [4.0, 0.0]], [[6.0, -7.0], [-7.0, 7.0], [-1.0, 3.0]]], [[[2.0, 1.0], 
+[4.0, 4.0], [-4.0, 5.0]], [[1.0, -5.0], [6.0, 0.0], [6.0, -2.0]]], [[[7.0, -1.0], [-3.0, -2.0], [0.0, 7.0]], [[-1.0, -5.0], 
+[-4.0, -2.0], [-1.0, 6.0]]], [[[-4.0, 3.0], [1.0, -1.0], [7.0, -7.0]], [[-7.0, -1.0], [-6.0, 0.0], [6.0, 
+-7.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-74.0)+(1.-msk_ref)*numpy.array(47.0)
+      ref=Data(49.0,self.functionspace)
+      ref.setTaggedValue(1,-253.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-1.0)+(1-msk_arg0)*(-4.0)
-      arg1=numpy.array([-3.0, -2.0])
+   def test_generalTensorTransposedProduct_taggedData_rank0_constData_rank1_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg0.setTaggedValue(1,-3.0)
+      arg1=Data(numpy.array([2.0, 4.0]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([3.0, 2.0])+(1.-msk_ref)*numpy.array([12.0, 8.0])
+      ref=Data(numpy.array([4.0, 8.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-6.0, -12.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([5.0, -5.0, -6.0])+(1.-msk_arg0)*numpy.array([-5.0, 1.0, 6.0])
-      arg1=numpy.array([[4.0, 3.0, 5.0], [5.0, 4.0, -4.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([0.0, 1.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, -4.0, 3.0]))
+      arg1=Data(numpy.array([[0.0, -6.0, -3.0], [0.0, 1.0, 5.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-25.0, 29.0])+(1.-msk_ref)*numpy.array([13.0, -45.0])
+      ref=Data(numpy.array([0.0, -9.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([15.0, 11.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 6.0, -5.0], [-6.0, -4.0, -3.0]])+(1.-msk_arg0)*numpy.array([[3.0, 0.0, 4.0], [7.0, 4.0, 
--1.0]])
-      arg1=numpy.array([[[-4.0, 1.0, 3.0], [0.0, 4.0, 0.0]], [[1.0, -7.0, -3.0], [0.0, -6.0, -1.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-3.0, -1.0, 5.0], [6.0, 5.0, 3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -5.0, -3.0], [1.0, -4.0, -3.0]]))
+      arg1=Data(numpy.array([[[-1.0, 0.0, -1.0], [-3.0, 3.0, 4.0]], [[-4.0, 0.0, -4.0], [-4.0, 2.0, 2.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-25.0, 0.0])+(1.-msk_ref)*numpy.array([16.0, -32.0])
+      ref=Data(numpy.array([7.0, -16.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-31.0, -34.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -5.0, -4.0], [5.0, -3.0, 0.0], [-1.0, 0.0, -6.0], [6.0, 0.0, 2.0]], [[6.0, -7.0, -1.0], 
-[-3.0, 4.0, 5.0], [4.0, 4.0, -2.0], [4.0, -7.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, -3.0, -1.0], [-7.0, -1.0, 1.0], 
-[6.0, 4.0, 3.0], [-5.0, -5.0, 0.0]], [[5.0, 3.0, 3.0], [-3.0, 5.0, -4.0], [-5.0, 0.0, 4.0], [2.0, 7.0, 5.0]]])
-      arg1=numpy.array([[[[5.0, -4.0, -4.0], [-4.0, 5.0, -5.0], [6.0, -4.0, -5.0], [3.0, 1.0, -4.0]], [[-7.0, -1.0, -7.0], 
-[3.0, -2.0, -4.0], [-5.0, 5.0, 0.0], [6.0, -6.0, -2.0]]], [[[-5.0, 3.0, 1.0], [1.0, 7.0, 1.0], [6.0, -5.0, 0.0], [-4.0, 1.0, 
--5.0]], [[0.0, -7.0, -7.0], [-1.0, 0.0, 4.0], [0.0, 3.0, -4.0], [1.0, -7.0, 2.0]]]])
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[7.0, 4.0, 4.0], [-6.0, 4.0, 6.0], [7.0, 1.0, -7.0], [1.0, -4.0, -1.0]], [[-3.0, 5.0, -4.0], 
+[6.0, -2.0, 7.0], [3.0, -5.0, 5.0], [0.0, 3.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, 3.0, -7.0], [5.0, 2.0, -4.0], [-6.0, 3.0, 0.0], [4.0, -1.0, 7.0]], [[0.0, 2.0, 
+6.0], [0.0, 3.0, -6.0], [-4.0, 2.0, -3.0], [0.0, 1.0, -2.0]]]))
+      arg1=Data(numpy.array([[[[-4.0, 0.0, 3.0], [-6.0, -5.0, 0.0], [-1.0, -6.0, -1.0], [-5.0, -7.0, 0.0]], [[1.0, -1.0, 4.0], 
+[-4.0, 3.0, 3.0], [1.0, -1.0, 5.0], [-1.0, 2.0, -7.0]]], [[[0.0, -6.0, -7.0], [-2.0, -1.0, 4.0], [-1.0, 3.0, -3.0], [-3.0, 6.0, 
+7.0]], [[2.0, -3.0, 6.0], [0.0, -5.0, 7.0], [5.0, 5.0, -4.0], [2.0, -7.0, 0.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([44.0, 69.0])+(1.-msk_ref)*numpy.array([-78.0, -80.0])
+      ref=Data(numpy.array([9.0, -74.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-58.0, 17.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(6.0)
-      arg1=numpy.array([[-6.0, 4.0, -2.0, -2.0, -5.0], [-7.0, -5.0, -4.0, -7.0, 7.0], [-1.0, -7.0, -2.0, 4.0, 1.0], [-7.0, 0.0, 
-0.0, 1.0, -5.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank0_constData_rank2_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg0.setTaggedValue(1,3.0)
+      arg1=Data(numpy.array([[-3.0, 5.0, -7.0, 3.0, 6.0], [0.0, -2.0, -4.0, 0.0, 3.0], [4.0, 5.0, 5.0, -3.0, 0.0], [-6.0, 1.0, 
+0.0, 6.0, -6.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[30.0, -20.0, 10.0, 10.0, 25.0], [35.0, 25.0, 20.0, 35.0, -35.0], [5.0, 35.0, 10.0, -20.0, 
--5.0], [35.0, -0.0, -0.0, -5.0, 25.0]])+(1.-msk_ref)*numpy.array([[-36.0, 24.0, -12.0, -12.0, -30.0], [-42.0, -30.0, -24.0, 
--42.0, 42.0], [-6.0, -42.0, -12.0, 24.0, 6.0], [-42.0, 0.0, 0.0, 6.0, -30.0]])
+      ref=Data(numpy.array([[15.0, -25.0, 35.0, -15.0, -30.0], [-0.0, 10.0, 20.0, -0.0, -15.0], [-20.0, -25.0, -25.0, 15.0, 
+-0.0], [30.0, -5.0, -0.0, -30.0, 30.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-9.0, 15.0, -21.0, 9.0, 18.0], [0.0, -6.0, -12.0, 0.0, 9.0], [12.0, 15.0, 15.0, -9.0, 
+0.0], [-18.0, 3.0, 0.0, 18.0, -18.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([0.0, 3.0, 4.0])+(1.-msk_arg0)*numpy.array([-7.0, 0.0, -4.0])
-      arg1=numpy.array([[[-6.0, 5.0, -7.0], [2.0, 5.0, 3.0], [1.0, -2.0, -7.0], [0.0, 6.0, -7.0], [-7.0, -7.0, -4.0]], [[-5.0, 
-7.0, 7.0], [-1.0, -7.0, -2.0], [2.0, 5.0, -7.0], [-2.0, -1.0, 4.0], [3.0, -7.0, -3.0]], [[7.0, 5.0, 2.0], [2.0, -7.0, -6.0], 
-[-1.0, 4.0, -1.0], [4.0, -1.0, 7.0], [2.0, -3.0, -4.0]], [[7.0, -2.0, 4.0], [-2.0, 6.0, 1.0], [0.0, 3.0, 0.0], [-3.0, 5.0, 
-3.0], [-2.0, 2.0, 1.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([-3.0, 0.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, -7.0, 1.0]))
+      arg1=Data(numpy.array([[[7.0, 5.0, -4.0], [0.0, -2.0, 7.0], [2.0, 5.0, 6.0], [4.0, 6.0, 0.0], [0.0, -2.0, 4.0]], [[-6.0, 
+-5.0, -1.0], [2.0, -5.0, -1.0], [2.0, -1.0, -1.0], [4.0, 2.0, -4.0], [0.0, -6.0, -5.0]], [[7.0, 5.0, 6.0], [7.0, -3.0, 6.0], 
+[1.0, 7.0, -6.0], [-4.0, 1.0, -2.0], [-5.0, -4.0, 0.0]], [[1.0, -1.0, 1.0], [6.0, 0.0, 4.0], [0.0, 4.0, -1.0], [-4.0, -7.0, 
+-3.0], [3.0, -7.0, 3.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-13.0, 27.0, -34.0, -10.0, -37.0], [49.0, -29.0, -13.0, 13.0, -33.0], [23.0, -45.0, 8.0, 25.0, 
--25.0], [10.0, 22.0, 9.0, 27.0, 10.0]])+(1.-msk_ref)*numpy.array([[70.0, -26.0, 21.0, 28.0, 65.0], [7.0, 15.0, 14.0, -2.0, 
--9.0], [-57.0, 10.0, 11.0, -56.0, 2.0], [-65.0, 10.0, 0.0, 9.0, 10.0]])
+      ref=Data(numpy.array([[7.0, -49.0, -48.0, -12.0, -28.0], [25.0, 1.0, 1.0, 16.0, 35.0], [-63.0, -63.0, 39.0, 26.0, 15.0], 
+[-10.0, -46.0, 7.0, 33.0, -30.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-88.0, 21.0, -43.0, -70.0, 18.0], [76.0, 20.0, -8.0, -46.0, 37.0], [-78.0, -22.0, 
+-62.0, 19.0, 63.0], [1.0, -38.0, -29.0, 74.0, 31.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, 7.0, 6.0], [1.0, 4.0, -3.0]])+(1.-msk_arg0)*numpy.array([[-5.0, -2.0, -6.0], [-6.0, 
-7.0, 3.0]])
-      arg1=numpy.array([[[[5.0, 2.0, 4.0], [0.0, -1.0, 2.0]], [[1.0, 7.0, -4.0], [6.0, 0.0, 1.0]], [[3.0, 6.0, -5.0], [2.0, 
-5.0, 7.0]], [[0.0, 5.0, -3.0], [0.0, -4.0, -3.0]], [[4.0, -4.0, -2.0], [-6.0, 0.0, -2.0]]], [[[-5.0, 7.0, -4.0], [0.0, 3.0, 
--7.0]], [[-4.0, 6.0, 0.0], [2.0, -6.0, -6.0]], [[-7.0, -1.0, -7.0], [7.0, 0.0, 6.0]], [[-1.0, -7.0, -1.0], [-5.0, 7.0, -3.0]], 
-[[-6.0, -4.0, 5.0], [-6.0, -4.0, 0.0]]], [[[-1.0, 3.0, -2.0], [-7.0, -4.0, 0.0]], [[-2.0, 6.0, 1.0], [-7.0, 5.0, -4.0]], [[5.0, 
-5.0, -6.0], [1.0, -6.0, 7.0]], [[-2.0, 4.0, 0.0], [3.0, -3.0, -6.0]], [[-2.0, 2.0, -1.0], [0.0, -5.0, 4.0]]], [[[-5.0, 5.0, 
-4.0], [7.0, -3.0, -7.0]], [[3.0, 5.0, -2.0], [-1.0, -4.0, 1.0]], [[4.0, -2.0, -2.0], [7.0, -7.0, 2.0]], [[2.0, -2.0, -6.0], 
-[4.0, -4.0, -4.0]], [[-5.0, 4.0, -2.0], [4.0, 0.0, 0.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[4.0, 1.0, 6.0], [-2.0, -6.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, -2.0, 0.0], [-4.0, 1.0, -7.0]]))
+      arg1=Data(numpy.array([[[[6.0, 5.0, 0.0], [-2.0, 7.0, 4.0]], [[-4.0, 6.0, -6.0], [7.0, 2.0, -2.0]], [[2.0, -5.0, 7.0], 
+[2.0, -5.0, 0.0]], [[-5.0, 6.0, -2.0], [-5.0, 5.0, -3.0]], [[0.0, -3.0, 0.0], [2.0, -6.0, -5.0]]], [[[4.0, 1.0, 2.0], [0.0, 
+-5.0, 0.0]], [[-3.0, -5.0, -3.0], [-6.0, 7.0, 3.0]], [[3.0, -6.0, 4.0], [4.0, -6.0, 2.0]], [[0.0, 1.0, -2.0], [-5.0, -2.0, 
+-1.0]], [[7.0, 3.0, -4.0], [0.0, -7.0, 6.0]]], [[[5.0, 3.0, -6.0], [-5.0, 7.0, 4.0]], [[2.0, -6.0, 7.0], [-3.0, 1.0, 2.0]], 
+[[2.0, -2.0, 7.0], [1.0, 6.0, -7.0]], [[6.0, 6.0, 4.0], [-3.0, -2.0, 6.0]], [[0.0, -2.0, -4.0], [-2.0, 6.0, -7.0]]], [[[0.0, 
+-5.0, 3.0], [-3.0, 4.0, -4.0]], [[4.0, 0.0, 1.0], [7.0, -6.0, 2.0]], [[7.0, 4.0, 0.0], [-3.0, -2.0, -4.0]], [[-1.0, -1.0, 1.0], 
+[-2.0, -4.0, -2.0]], [[-2.0, -5.0, 1.0], [-6.0, 6.0, 4.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[8.0, 24.0, 1.0, 10.0, -56.0], [78.0, 54.0, -32.0, -19.0, 4.0], [-10.0, 81.0, -65.0, 45.0, 
--16.0], [95.0, -9.0, -69.0, -58.0, 40.0]])+(1.-msk_ref)*numpy.array([[-54.0, -28.0, 47.0, -29.0, 30.0], [35.0, -64.0, 55.0, 
-95.0, 16.0], [25.0, 57.0, -26.0, -55.0, -11.0], [-93.0, -32.0, -89.0, -34.0, 5.0]])
+      ref=Data(numpy.array([[-9.0, -72.0, 71.0, -46.0, 29.0], [59.0, -65.0, 58.0, 11.0, 49.0], [-45.0, 44.0, 10.0, 72.0, 
+-58.0], [-5.0, 44.0, 50.0, 29.0, -31.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-47.0, -8.0, -11.0, 54.0, 27.0], [-23.0, 32.0, -36.0, 23.0, -83.0], [-27.0, 3.0, 47.0, 
+-68.0, 67.0], [54.0, -64.0, 2.0, 24.0, 20.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-4.0)+(1-msk_arg0)*(-7.0)
-      arg1=numpy.array([[[-4.0, -1.0], [-7.0, 2.0]], [[-1.0, 7.0], [7.0, 6.0]], [[5.0, 0.0], [-3.0, -5.0]], [[-2.0, 6.0], 
-[-6.0, 3.0]], [[-2.0, -4.0], [4.0, 6.0]], [[-7.0, -6.0], [3.0, 0.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank0_constData_rank3_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,-1.0)
+      arg1=Data(numpy.array([[[5.0, 1.0], [0.0, 5.0]], [[-5.0, 4.0], [-2.0, -4.0]], [[-1.0, -1.0], [3.0, 2.0]], [[2.0, -2.0], 
+[-2.0, -5.0]], [[-6.0, -3.0], [2.0, 0.0]], [[0.0, 5.0], [4.0, -1.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[16.0, 4.0], [28.0, -8.0]], [[4.0, -28.0], [-28.0, -24.0]], [[-20.0, -0.0], [12.0, 20.0]], 
-[[8.0, -24.0], [24.0, -12.0]], [[8.0, 16.0], [-16.0, -24.0]], [[28.0, 24.0], [-12.0, -0.0]]])+(1.-msk_ref)*numpy.array([[[28.0, 
-7.0], [49.0, -14.0]], [[7.0, -49.0], [-49.0, -42.0]], [[-35.0, -0.0], [21.0, 35.0]], [[14.0, -42.0], [42.0, -21.0]], [[14.0, 
-28.0], [-28.0, -42.0]], [[49.0, 42.0], [-21.0, -0.0]]])
+      ref=Data(numpy.array([[[-5.0, -1.0], [-0.0, -5.0]], [[5.0, -4.0], [2.0, 4.0]], [[1.0, 1.0], [-3.0, -2.0]], [[-2.0, 2.0], 
+[2.0, 5.0]], [[6.0, 3.0], [-2.0, -0.0]], [[-0.0, -5.0], [-4.0, 1.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-5.0, -1.0], [-0.0, -5.0]], [[5.0, -4.0], [2.0, 4.0]], [[1.0, 1.0], [-3.0, -2.0]], 
+[[-2.0, 2.0], [2.0, 5.0]], [[6.0, 3.0], [-2.0, -0.0]], [[-0.0, -5.0], [-4.0, 1.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-4.0, -3.0, 7.0])+(1.-msk_arg0)*numpy.array([-1.0, 5.0, 5.0])
-      arg1=numpy.array([[[[2.0, 1.0, -5.0], [-1.0, -1.0, -7.0]], [[3.0, -7.0, -6.0], [-3.0, 0.0, -5.0]]], [[[7.0, 7.0, -4.0], 
-[1.0, 5.0, -4.0]], [[-5.0, 7.0, 3.0], [0.0, 3.0, 7.0]]], [[[-4.0, -6.0, 7.0], [7.0, 4.0, 2.0]], [[-2.0, 1.0, 3.0], [-2.0, 4.0, 
-3.0]]], [[[7.0, 4.0, 2.0], [6.0, -6.0, -5.0]], [[6.0, -1.0, 2.0], [-2.0, -6.0, -7.0]]], [[[-1.0, 7.0, 3.0], [4.0, 0.0, 2.0]], 
-[[7.0, -1.0, -1.0], [1.0, -2.0, 2.0]]], [[[-2.0, 4.0, 3.0], [3.0, 6.0, 1.0]], [[1.0, -1.0, -4.0], [4.0, 2.0, 1.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([-2.0, 3.0, 3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([2.0, 2.0, 6.0]))
+      arg1=Data(numpy.array([[[[-5.0, 0.0, 6.0], [-4.0, 1.0, -1.0]], [[2.0, -1.0, 7.0], [7.0, 5.0, -6.0]]], [[[-6.0, -4.0, 
+0.0], [4.0, 2.0, -1.0]], [[0.0, -6.0, 3.0], [6.0, 0.0, -6.0]]], [[[2.0, 6.0, 6.0], [7.0, 7.0, -7.0]], [[0.0, -5.0, -6.0], [6.0, 
+2.0, -5.0]]], [[[2.0, 6.0, -2.0], [6.0, 7.0, 0.0]], [[-2.0, 0.0, 0.0], [1.0, 1.0, 3.0]]], [[[-4.0, -7.0, 7.0], [2.0, -5.0, 
+1.0]], [[3.0, 4.0, -5.0], [5.0, -2.0, 1.0]]], [[[-4.0, 0.0, -1.0], [2.0, 5.0, -2.0]], [[0.0, -7.0, 7.0], [-5.0, 4.0, 
+4.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-46.0, -42.0], [-33.0, -23.0]], [[-77.0, -47.0], [20.0, 40.0]], [[83.0, -26.0], [26.0, 17.0]], 
-[[-26.0, -41.0], [-7.0, -23.0]], [[4.0, -2.0], [-32.0, 16.0]], [[17.0, -23.0], [-29.0, 
--15.0]]])+(1.-msk_ref)*numpy.array([[[-22.0, -39.0], [-68.0, -22.0]], [[8.0, 4.0], [55.0, 50.0]], [[9.0, 23.0], [22.0, 37.0]], 
-[[23.0, -61.0], [-1.0, -63.0]], [[51.0, 6.0], [-17.0, -1.0]], [[37.0, 32.0], [-26.0, 11.0]]])
+      ref=Data(numpy.array([[[28.0, 8.0], [14.0, -17.0]], [[0.0, -5.0], [-9.0, -30.0]], [[32.0, -14.0], [-33.0, -21.0]], [[8.0, 
+9.0], [4.0, 10.0]], [[8.0, -16.0], [-9.0, -13.0]], [[5.0, 5.0], [0.0, 34.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[26.0, -12.0], [44.0, -12.0]], [[-20.0, 6.0], [6.0, -24.0]], [[52.0, -14.0], [-46.0, 
+-14.0]], [[4.0, 26.0], [-4.0, 22.0]], [[20.0, 0.0], [-16.0, 12.0]], [[-14.0, 2.0], [28.0, 22.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_array_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-5.0)+(1-msk_arg0)*(1.0)
-      arg1=numpy.array([[[[-2.0, -2.0, -5.0, 5.0], [-2.0, -5.0, 6.0, -6.0], [-2.0, -4.0, 2.0, 7.0]], [[5.0, -7.0, 0.0, -2.0], 
-[-7.0, -4.0, 7.0, 3.0], [0.0, 4.0, -3.0, 7.0]]], [[[2.0, 1.0, -4.0, -1.0], [-4.0, 0.0, 2.0, 4.0], [7.0, 5.0, 2.0, -7.0]], 
-[[-2.0, -1.0, 0.0, -4.0], [3.0, 2.0, 3.0, -5.0], [4.0, 5.0, 0.0, -1.0]]], [[[-6.0, 7.0, -7.0, -1.0], [3.0, 6.0, -1.0, 7.0], 
-[-2.0, 2.0, -2.0, -3.0]], [[4.0, 6.0, 7.0, -5.0], [7.0, -4.0, -3.0, -7.0], [-7.0, -6.0, -4.0, -4.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank0_constData_rank4_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg1=Data(numpy.array([[[[-5.0, -3.0, -2.0, 1.0], [2.0, 1.0, 4.0, 5.0], [0.0, -5.0, -5.0, 3.0]], [[-2.0, -5.0, 5.0, 
+-2.0], [0.0, 6.0, 5.0, -5.0], [7.0, -1.0, -1.0, 7.0]]], [[[3.0, 0.0, 0.0, -4.0], [5.0, -7.0, 7.0, 7.0], [-7.0, -5.0, 2.0, 
+-1.0]], [[-4.0, -6.0, 0.0, 4.0], [-2.0, 5.0, -3.0, -3.0], [0.0, -6.0, 1.0, -4.0]]], [[[4.0, 0.0, 6.0, 5.0], [-5.0, -7.0, -4.0, 
+-5.0], [-2.0, 0.0, -4.0, -6.0]], [[0.0, 6.0, 6.0, 6.0], [-4.0, 6.0, 7.0, -5.0], [2.0, 2.0, -3.0, 4.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 10.0, 25.0, -25.0], [10.0, 25.0, -30.0, 30.0], [10.0, 20.0, -10.0, -35.0]], [[-25.0, 
-35.0, -0.0, 10.0], [35.0, 20.0, -35.0, -15.0], [-0.0, -20.0, 15.0, -35.0]]], [[[-10.0, -5.0, 20.0, 5.0], [20.0, -0.0, -10.0, 
--20.0], [-35.0, -25.0, -10.0, 35.0]], [[10.0, 5.0, -0.0, 20.0], [-15.0, -10.0, -15.0, 25.0], [-20.0, -25.0, -0.0, 5.0]]], 
-[[[30.0, -35.0, 35.0, 5.0], [-15.0, -30.0, 5.0, -35.0], [10.0, -10.0, 10.0, 15.0]], [[-20.0, -30.0, -35.0, 25.0], [-35.0, 20.0, 
-15.0, 35.0], [35.0, 30.0, 20.0, 20.0]]]])+(1.-msk_ref)*numpy.array([[[[-2.0, -2.0, -5.0, 5.0], [-2.0, -5.0, 6.0, -6.0], [-2.0, 
--4.0, 2.0, 7.0]], [[5.0, -7.0, 0.0, -2.0], [-7.0, -4.0, 7.0, 3.0], [0.0, 4.0, -3.0, 7.0]]], [[[2.0, 1.0, -4.0, -1.0], [-4.0, 
-0.0, 2.0, 4.0], [7.0, 5.0, 2.0, -7.0]], [[-2.0, -1.0, 0.0, -4.0], [3.0, 2.0, 3.0, -5.0], [4.0, 5.0, 0.0, -1.0]]], [[[-6.0, 7.0, 
--7.0, -1.0], [3.0, 6.0, -1.0, 7.0], [-2.0, 2.0, -2.0, -3.0]], [[4.0, 6.0, 7.0, -5.0], [7.0, -4.0, -3.0, -7.0], [-7.0, -6.0, 
--4.0, -4.0]]]])
+      ref=Data(numpy.array([[[[-5.0, -3.0, -2.0, 1.0], [2.0, 1.0, 4.0, 5.0], [0.0, -5.0, -5.0, 3.0]], [[-2.0, -5.0, 5.0, -2.0], 
+[0.0, 6.0, 5.0, -5.0], [7.0, -1.0, -1.0, 7.0]]], [[[3.0, 0.0, 0.0, -4.0], [5.0, -7.0, 7.0, 7.0], [-7.0, -5.0, 2.0, -1.0]], 
+[[-4.0, -6.0, 0.0, 4.0], [-2.0, 5.0, -3.0, -3.0], [0.0, -6.0, 1.0, -4.0]]], [[[4.0, 0.0, 6.0, 5.0], [-5.0, -7.0, -4.0, -5.0], 
+[-2.0, 0.0, -4.0, -6.0]], [[0.0, 6.0, 6.0, 6.0], [-4.0, 6.0, 7.0, -5.0], [2.0, 2.0, -3.0, 4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, -0.0, 
+0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, 
+-0.0]], [[-0.0, -0.0, 0.0, 0.0], [-0.0, 0.0, -0.0, -0.0], [0.0, -0.0, 0.0, -0.0]]], [[[0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, 
+-0.0], [-0.0, 0.0, -0.0, -0.0]], [[0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-7.0)+(1-msk_arg0)*(7.0)
-      arg1=Data(-2.0,self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,2.0)
+      arg1=Data(-6.0,self.functionspace)
+      arg1.setTaggedValue(1,2.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(14.0)+(1.-msk_ref)*numpy.array(-14.0)
+      ref=Data(6.0,self.functionspace)
+      ref.setTaggedValue(1,4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-3.0, -1.0, 4.0])+(1.-msk_arg0)*numpy.array([1.0, 6.0, 5.0])
-      arg1=Data(numpy.array([-6.0, 5.0, -5.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([-1.0, 6.0, 7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([7.0, 5.0, -1.0]))
+      arg1=Data(numpy.array([-2.0, 4.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, -1.0, 7.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-7.0)+(1.-msk_ref)*numpy.array(-1.0)
+      ref=Data(68.0,self.functionspace)
+      ref.setTaggedValue(1,23.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 1.0, -4.0], [0.0, 7.0, 6.0]])+(1.-msk_arg0)*numpy.array([[0.0, -3.0, -7.0], [6.0, 2.0, 
-0.0]])
-      arg1=Data(numpy.array([[-4.0, 7.0, -7.0], [1.0, 6.0, -7.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[3.0, 0.0, 0.0], [-3.0, -3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, 5.0, -3.0], [0.0, 0.0, -2.0]]))
+      arg1=Data(numpy.array([[4.0, -1.0, -7.0], [4.0, -7.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, 0.0, 3.0], [-4.0, -6.0, 0.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(19.0)+(1.-msk_ref)*numpy.array(46.0)
+      ref=Data(21.0,self.functionspace)
+      ref.setTaggedValue(1,0.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[3.0, 7.0, -3.0], [2.0, 3.0, 2.0], [1.0, 1.0, 7.0], [7.0, -7.0, 0.0]], [[-1.0, 1.0, -4.0], 
-[6.0, -4.0, 4.0], [-6.0, -3.0, 0.0], [3.0, 1.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, -2.0, -7.0], [0.0, 3.0, -7.0], 
-[-3.0, -6.0, 5.0], [5.0, 5.0, 0.0]], [[0.0, -2.0, -7.0], [0.0, 4.0, 0.0], [5.0, -1.0, -6.0], [-3.0, 0.0, -7.0]]])
-      arg1=Data(numpy.array([[[3.0, -7.0, -2.0], [-7.0, 6.0, 6.0], [0.0, 7.0, -3.0], [-4.0, 5.0, -2.0]], [[4.0, 0.0, 0.0], 
-[2.0, -6.0, 0.0], [-1.0, -3.0, 0.0], [0.0, 0.0, -6.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-3.0, 0.0, -1.0], [5.0, 7.0, 1.0], [7.0, 6.0, 1.0], [3.0, -5.0, 7.0]], [[0.0, 2.0, 6.0], [-3.0, 
+-3.0, 7.0], [7.0, 0.0, -1.0], [2.0, -6.0, -5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, -3.0, 7.0], [0.0, 0.0, 0.0], [6.0, 1.0, 6.0], [0.0, -6.0, -1.0]], [[4.0, -4.0, 
+-5.0], [4.0, -1.0, -7.0], [-5.0, 3.0, 0.0], [3.0, 1.0, -4.0]]]))
+      arg1=Data(numpy.array([[[4.0, 4.0, 0.0], [3.0, -7.0, -7.0], [-1.0, 5.0, -7.0], [-1.0, 4.0, 5.0]], [[-7.0, -3.0, 0.0], 
+[0.0, -1.0, -3.0], [6.0, -5.0, 7.0], [3.0, -1.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[6.0, -7.0, 4.0], [-1.0, -4.0, 3.0], [-5.0, 6.0, 6.0], [7.0, 6.0, -4.0]], [[7.0, 
+-3.0, -2.0], [-7.0, 1.0, -3.0], [3.0, -1.0, 7.0], [-4.0, -1.0, 0.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-66.0)+(1.-msk_ref)*numpy.array(-53.0)
+      ref=Data(8.0,self.functionspace)
+      ref.setTaggedValue(1,4.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, -1.0], [-4.0, 1.0], [0.0, -2.0]], [[2.0, 6.0], [7.0, -2.0], [1.0, -3.0]]], [[[-5.0, 
--1.0], [1.0, 0.0], [1.0, -3.0]], [[-6.0, -7.0], [-2.0, 3.0], [5.0, -7.0]]], [[[-4.0, 5.0], [-6.0, -4.0], [1.0, 6.0]], [[-7.0, 
-6.0], [-3.0, 6.0], [-1.0, -1.0]]], [[[7.0, -5.0], [-4.0, -2.0], [-3.0, 0.0]], [[3.0, 3.0], [1.0, 6.0], [1.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, 2.0], [7.0, -6.0], [-1.0, 2.0]], [[-3.0, 1.0], [6.0, 0.0], [-7.0, 5.0]]], [[[-2.0, 
-1.0], [3.0, -5.0], [-5.0, 5.0]], [[-3.0, 0.0], [-3.0, 3.0], [4.0, 4.0]]], [[[3.0, -6.0], [4.0, -2.0], [7.0, 0.0]], [[-6.0, 
-7.0], [3.0, -6.0], [6.0, 1.0]]], [[[-6.0, 0.0], [0.0, 5.0], [6.0, 3.0]], [[0.0, -5.0], [-7.0, -3.0], [-4.0, -5.0]]]])
-      arg1=Data(numpy.array([[[[-7.0, 5.0], [2.0, -4.0], [2.0, -2.0]], [[6.0, 2.0], [7.0, 0.0], [5.0, 7.0]]], [[[-3.0, 2.0], 
-[-5.0, 1.0], [-5.0, 4.0]], [[5.0, -4.0], [-7.0, -5.0], [6.0, -7.0]]], [[[7.0, 7.0], [5.0, 1.0], [6.0, 4.0]], [[3.0, 6.0], [5.0, 
-3.0], [5.0, -5.0]]], [[[7.0, -3.0], [-7.0, -3.0], [-1.0, 6.0]], [[6.0, 7.0], [6.0, -5.0], [-4.0, 0.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[4.0, -5.0], [3.0, -2.0], [6.0, -6.0]], [[3.0, -2.0], [-2.0, 6.0], [-5.0, -7.0]]], [[[-3.0, 
+-5.0], [-4.0, 4.0], [-2.0, -2.0]], [[-7.0, 1.0], [4.0, 1.0], [-1.0, 2.0]]], [[[7.0, -3.0], [3.0, -1.0], [-3.0, 4.0]], [[-3.0, 
+0.0], [3.0, 6.0], [-1.0, 7.0]]], [[[1.0, 2.0], [6.0, 4.0], [7.0, 0.0]], [[0.0, 3.0], [7.0, 1.0], [4.0, 
+-5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, -7.0], [-2.0, 3.0], [-1.0, 6.0]], [[0.0, -4.0], [0.0, 3.0], [-7.0, 7.0]]], 
+[[[2.0, -7.0], [-4.0, -3.0], [5.0, -7.0]], [[6.0, -7.0], [-5.0, 1.0], [-5.0, -3.0]]], [[[6.0, 0.0], [2.0, -2.0], [2.0, 7.0]], 
+[[7.0, -1.0], [6.0, 6.0], [-7.0, 2.0]]], [[[6.0, 7.0], [-5.0, 0.0], [-6.0, 6.0]], [[7.0, -6.0], [1.0, -7.0], [6.0, -6.0]]]]))
+      arg1=Data(numpy.array([[[[6.0, 2.0], [1.0, -2.0], [6.0, -3.0]], [[-1.0, -1.0], [-7.0, -6.0], [5.0, -6.0]]], [[[3.0, 
+-7.0], [-2.0, -4.0], [-5.0, 0.0]], [[4.0, -3.0], [6.0, 1.0], [2.0, -5.0]]], [[[-6.0, -5.0], [-6.0, -1.0], [5.0, -1.0]], [[-7.0, 
+0.0], [4.0, -2.0], [0.0, -7.0]]], [[[-2.0, -2.0], [-1.0, -3.0], [-5.0, 3.0]], [[-3.0, -4.0], [2.0, 7.0], [3.0, 
+-6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-5.0, 0.0], [-1.0, 0.0], [2.0, 7.0]], [[6.0, 0.0], [0.0, 0.0], [-6.0, -4.0]]], 
+[[[0.0, 2.0], [-7.0, -4.0], [0.0, 5.0]], [[7.0, -7.0], [-1.0, 0.0], [0.0, -5.0]]], [[[1.0, -4.0], [3.0, 0.0], [-1.0, -3.0]], 
+[[0.0, -5.0], [-6.0, -4.0], [0.0, -1.0]]], [[[6.0, 0.0], [-3.0, -3.0], [6.0, 2.0]], [[6.0, 0.0], [6.0, -1.0], [7.0, -4.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(195.0)+(1.-msk_ref)*numpy.array(117.0)
+      ref=Data(-20.0,self.functionspace)
+      ref.setTaggedValue(1,238.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(4.0)+(1-msk_arg0)*(-6.0)
-      arg1=Data(numpy.array([3.0, 7.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(-5.0,self.functionspace)
+      arg0.setTaggedValue(1,-5.0)
+      arg1=Data(numpy.array([7.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, -4.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([12.0, 28.0])+(1.-msk_ref)*numpy.array([-18.0, -42.0])
+      ref=Data(numpy.array([-35.0, -30.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-5.0, 20.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-2.0, 0.0, -7.0])+(1.-msk_arg0)*numpy.array([-1.0, 5.0, -1.0])
-      arg1=Data(numpy.array([[-5.0, -5.0, 3.0], [-5.0, 4.0, -3.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-5.0, -4.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, 0.0, 2.0]))
+      arg1=Data(numpy.array([[6.0, -4.0, -7.0], [-3.0, -5.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, 7.0, -1.0], [-7.0, 3.0, 6.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([21.0, 5.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-8.0, 19.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-11.0, 31.0])+(1.-msk_ref)*numpy.array([-23.0, 28.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, 7.0, 7.0], [7.0, -5.0, 4.0]])+(1.-msk_arg0)*numpy.array([[1.0, -5.0, -6.0], [0.0, -1.0, 
-6.0]])
-      arg1=Data(numpy.array([[[-4.0, -7.0, 6.0], [-7.0, 4.0, -5.0]], [[6.0, 0.0, 3.0], [-5.0, 0.0, -5.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[-1.0, -5.0, -5.0], [6.0, -5.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, 0.0, 0.0], [-1.0, 1.0, 2.0]]))
+      arg1=Data(numpy.array([[[6.0, 6.0, -2.0], [-4.0, 5.0, 2.0]], [[7.0, 2.0, 0.0], [4.0, 4.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, -3.0, 0.0], [0.0, -6.0, 3.0]], [[6.0, -3.0, 7.0], [3.0, 6.0, -5.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-108.0, -16.0])+(1.-msk_ref)*numpy.array([-39.0, -42.0])
+      ref=Data(numpy.array([-79.0, -13.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-7.0, 35.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[3.0, 1.0, 7.0], [-1.0, 6.0, -1.0], [5.0, -1.0, -7.0], [5.0, -6.0, 7.0]], [[-5.0, 3.0, 6.0], 
-[-4.0, 3.0, -4.0], [2.0, 7.0, 1.0], [-7.0, -3.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[-6.0, 0.0, 0.0], [4.0, -3.0, -6.0], [6.0, 
--3.0, -4.0], [2.0, 3.0, 3.0]], [[-6.0, 1.0, -7.0], [-6.0, 0.0, 2.0], [-6.0, 1.0, 1.0], [-4.0, 0.0, 2.0]]])
-      arg1=Data(numpy.array([[[[2.0, 4.0, -5.0], [6.0, -2.0, -1.0], [6.0, 6.0, -3.0], [-2.0, 7.0, -7.0]], [[6.0, 7.0, 4.0], 
-[-6.0, -1.0, -6.0], [-5.0, -7.0, -7.0], [1.0, 0.0, -7.0]]], [[[-5.0, -6.0, -6.0], [0.0, -7.0, 7.0], [2.0, 5.0, 6.0], [3.0, 2.0, 
-0.0]], [[-6.0, 2.0, 5.0], [-5.0, -1.0, 0.0], [-5.0, 4.0, -2.0], [-1.0, 1.0, 6.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[4.0, -6.0, 2.0], [-3.0, 0.0, 3.0], [-1.0, -5.0, -6.0], [-5.0, -5.0, 6.0]], [[-7.0, -2.0, -3.0], 
+[7.0, -2.0, -6.0], [-4.0, -4.0, -7.0], [6.0, 0.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, -7.0, -3.0], [-1.0, 5.0, 4.0], [-2.0, 5.0, 7.0], [6.0, 2.0, 0.0]], [[5.0, -1.0, 
+-2.0], [1.0, -7.0, -5.0], [2.0, 0.0, 3.0], [1.0, 0.0, -2.0]]]))
+      arg1=Data(numpy.array([[[[-3.0, 6.0, -4.0], [-7.0, 4.0, -7.0], [-6.0, 6.0, 1.0], [-4.0, 7.0, -5.0]], [[0.0, 2.0, 0.0], 
+[-6.0, -1.0, -5.0], [0.0, 4.0, 3.0], [-2.0, -6.0, -2.0]]], [[[6.0, -4.0, -4.0], [-6.0, -1.0, -6.0], [1.0, -6.0, 5.0], [-2.0, 
+-6.0, -5.0]], [[-1.0, -7.0, -5.0], [-1.0, -6.0, -4.0], [-3.0, -4.0, 3.0], [-7.0, 7.0, -7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[3.0, -2.0, -2.0], [7.0, 2.0, -2.0], [-3.0, 7.0, 0.0], [-5.0, 4.0, 0.0]], [[-6.0, 
+-6.0, -3.0], [2.0, -4.0, 5.0], [3.0, 2.0, -5.0], [6.0, 2.0, -7.0]]], [[[7.0, 0.0, -3.0], [3.0, 2.0, 6.0], [0.0, 2.0, 2.0], 
+[-3.0, 3.0, -3.0]], [[0.0, 5.0, 0.0], [-4.0, 7.0, 0.0], [0.0, 0.0, 0.0], [-2.0, -7.0, 5.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-153.0, -7.0])+(1.-msk_ref)*numpy.array([15.0, 75.0])
+      ref=Data(numpy.array([-188.0, 100.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([44.0, 10.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-1.0)+(1-msk_arg0)*(-5.0)
-      arg1=Data(numpy.array([[-3.0, -2.0, 0.0, -6.0, -6.0], [-1.0, 6.0, -5.0, -1.0, 6.0], [6.0, 0.0, 3.0, -6.0, -4.0], [-4.0, 
-0.0, 6.0, 4.0, -5.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg0.setTaggedValue(1,-2.0)
+      arg1=Data(numpy.array([[0.0, 6.0, 6.0, -3.0, -6.0], [7.0, -1.0, -1.0, -1.0, -1.0], [-1.0, -1.0, -2.0, 5.0, 2.0], [-4.0, 
+-7.0, 2.0, -4.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 7.0, -3.0, 3.0, 0.0], [5.0, 2.0, -6.0, 0.0, -4.0], [6.0, -7.0, 3.0, 7.0, -5.0], 
+[7.0, 4.0, -2.0, 3.0, -1.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[3.0, 2.0, -0.0, 6.0, 6.0], [1.0, -6.0, 5.0, 1.0, -6.0], [-6.0, -0.0, -3.0, 6.0, 4.0], [4.0, 
--0.0, -6.0, -4.0, 5.0]])+(1.-msk_ref)*numpy.array([[15.0, 10.0, -0.0, 30.0, 30.0], [5.0, -30.0, 25.0, 5.0, -30.0], [-30.0, 
--0.0, -15.0, 30.0, 20.0], [20.0, -0.0, -30.0, -20.0, 25.0]])
+      ref=Data(numpy.array([[0.0, 6.0, 6.0, -3.0, -6.0], [7.0, -1.0, -1.0, -1.0, -1.0], [-1.0, -1.0, -2.0, 5.0, 2.0], [-4.0, 
+-7.0, 2.0, -4.0, -2.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-14.0, -14.0, 6.0, -6.0, -0.0], [-10.0, -4.0, 12.0, -0.0, 8.0], [-12.0, 14.0, -6.0, 
+-14.0, 10.0], [-14.0, -8.0, 4.0, -6.0, 2.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, -2.0, -4.0])+(1.-msk_arg0)*numpy.array([-2.0, -3.0, -6.0])
-      arg1=Data(numpy.array([[[-1.0, 0.0, -5.0], [6.0, 3.0, 3.0], [0.0, -5.0, 7.0], [3.0, 3.0, 3.0], [2.0, -7.0, 0.0]], [[2.0, 
-6.0, -2.0], [0.0, 6.0, -4.0], [-3.0, -4.0, 0.0], [-4.0, -7.0, -3.0], [-4.0, 4.0, 0.0]], [[1.0, -1.0, -2.0], [5.0, 3.0, -3.0], 
-[-6.0, 3.0, 3.0], [2.0, 2.0, 6.0], [-5.0, -6.0, 6.0]], [[-7.0, -1.0, -1.0], [7.0, 4.0, 0.0], [6.0, -3.0, 3.0], [-4.0, 2.0, 
-4.0], [-4.0, -2.0, 4.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-6.0, 6.0, 3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, 4.0, 0.0]))
+      arg1=Data(numpy.array([[[5.0, -2.0, -2.0], [7.0, 7.0, -5.0], [4.0, 0.0, 3.0], [5.0, 6.0, -6.0], [0.0, -3.0, 4.0]], 
+[[-3.0, -5.0, -3.0], [7.0, 6.0, 0.0], [-7.0, 0.0, 0.0], [0.0, -4.0, -7.0], [6.0, 5.0, 7.0]], [[-7.0, 1.0, 1.0], [-5.0, -3.0, 
+1.0], [0.0, -2.0, 2.0], [-2.0, 2.0, -5.0], [-5.0, 7.0, 1.0]], [[1.0, 0.0, 0.0], [6.0, -6.0, 7.0], [0.0, -1.0, 0.0], [6.0, -1.0, 
+0.0], [6.0, 4.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, 5.0, 0.0], [4.0, 3.0, -3.0], [3.0, -1.0, 0.0], [6.0, -2.0, -7.0], [4.0, -2.0, 
+-6.0]], [[7.0, -3.0, -4.0], [-4.0, -4.0, -2.0], [-1.0, 2.0, 4.0], [-7.0, -2.0, 7.0], [0.0, 5.0, 2.0]], [[6.0, 4.0, 5.0], [-5.0, 
+-5.0, 5.0], [-7.0, 3.0, 2.0], [-3.0, 5.0, 0.0], [-6.0, -6.0, 7.0]], [[5.0, 0.0, 1.0], [-6.0, 4.0, -5.0], [-7.0, -5.0, 4.0], 
+[0.0, 3.0, -6.0], [-1.0, -1.0, -6.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[25.0, -48.0, -18.0, -33.0, 4.0], [-14.0, 4.0, 23.0, 46.0, 12.0], [5.0, -19.0, 12.0, -38.0, 
-13.0], [41.0, -43.0, -36.0, 0.0, 8.0]])+(1.-msk_ref)*numpy.array([[32.0, -39.0, -27.0, -33.0, 17.0], [-10.0, 6.0, 18.0, 47.0, 
--4.0], [13.0, -1.0, -15.0, -46.0, -8.0], [23.0, -26.0, -21.0, -22.0, -10.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[3.0, -7.0, -7.0], [-1.0, 6.0, 5.0]])+(1.-msk_arg0)*numpy.array([[4.0, 0.0, 0.0], [-3.0, 1.0, 
-2.0]])
-      arg1=Data(numpy.array([[[[-5.0, 2.0, 5.0], [3.0, -1.0, 3.0]], [[6.0, -4.0, -1.0], [-1.0, -3.0, -2.0]], [[4.0, 0.0, -1.0], 
-[-7.0, -2.0, 6.0]], [[-5.0, 5.0, -5.0], [-7.0, 3.0, 6.0]], [[4.0, 7.0, -7.0], [-6.0, 1.0, 7.0]]], [[[-4.0, 5.0, -6.0], [-7.0, 
-2.0, 0.0]], [[1.0, -7.0, -5.0], [-1.0, 3.0, -7.0]], [[2.0, 4.0, 7.0], [-7.0, 7.0, -7.0]], [[0.0, 6.0, -6.0], [7.0, 6.0, 1.0]], 
-[[4.0, -1.0, -2.0], [5.0, 7.0, -1.0]]], [[[-4.0, 7.0, -1.0], [-2.0, 3.0, -6.0]], [[-6.0, 5.0, -2.0], [-7.0, 3.0, -4.0]], 
-[[-2.0, -7.0, -4.0], [0.0, -2.0, 3.0]], [[-6.0, 5.0, -2.0], [-2.0, -3.0, -2.0]], [[5.0, 0.0, 4.0], [0.0, 3.0, -2.0]]], [[[6.0, 
-6.0, 3.0], [-5.0, 4.0, 0.0]], [[-3.0, 5.0, 0.0], [6.0, 6.0, -7.0]], [[7.0, -1.0, 2.0], [0.0, -3.0, 3.0]], [[-7.0, 5.0, -6.0], 
-[7.0, -6.0, 1.0]], [[7.0, 5.0, 0.0], [4.0, 5.0, -5.0]]]]),self.functionspace)
+      ref=Data(numpy.array([[-48.0, -15.0, -15.0, -12.0, -6.0], [-21.0, -6.0, 42.0, -45.0, 15.0], [51.0, 15.0, -6.0, 9.0, 
+75.0], [-6.0, -51.0, -6.0, -42.0, -6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-29.0, -16.0, -25.0, -50.0, -36.0], [-61.0, 12.0, 15.0, 41.0, 20.0], [-26.0, 15.0, 
+61.0, 41.0, 18.0], [-35.0, 58.0, 29.0, 12.0, 3.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-4.0, 3.0, 0.0], [-5.0, 1.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, 6.0, -5.0], [-5.0, -1.0, -1.0]]))
+      arg1=Data(numpy.array([[[[-5.0, 2.0, 3.0], [-5.0, 6.0, 6.0]], [[7.0, -4.0, -5.0], [4.0, -1.0, 1.0]], [[2.0, 6.0, 6.0], 
+[-6.0, -1.0, 2.0]], [[-1.0, 4.0, 3.0], [0.0, -3.0, 0.0]], [[-5.0, -3.0, 1.0], [-7.0, 3.0, 4.0]]], [[[-6.0, -5.0, -4.0], [6.0, 
+5.0, 1.0]], [[-6.0, 7.0, 5.0], [-1.0, 7.0, 3.0]], [[0.0, -5.0, 5.0], [0.0, 5.0, -5.0]], [[-2.0, 7.0, 7.0], [-7.0, 7.0, 2.0]], 
+[[3.0, 1.0, -4.0], [-4.0, -4.0, 1.0]]], [[[7.0, 7.0, 0.0], [-3.0, 0.0, 7.0]], [[4.0, -7.0, 3.0], [5.0, 5.0, 1.0]], [[3.0, 3.0, 
+0.0], [6.0, 7.0, -3.0]], [[-2.0, 5.0, 7.0], [-3.0, -7.0, 5.0]], [[-6.0, 0.0, -4.0], [-4.0, -4.0, 0.0]]], [[[5.0, 6.0, -7.0], 
+[-7.0, 4.0, -4.0]], [[1.0, -5.0, -1.0], [4.0, 3.0, 6.0]], [[-1.0, 0.0, -2.0], [7.0, -3.0, 3.0]], [[-3.0, -4.0, -2.0], [1.0, 
+-3.0, 2.0]], [[3.0, -7.0, 1.0], [5.0, -2.0, 0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, -4.0, -5.0], [-5.0, -1.0, 1.0]], [[-2.0, 5.0, 4.0], [-6.0, 0.0, -2.0]], 
+[[-3.0, -4.0, 6.0], [1.0, -2.0, -6.0]], [[1.0, -3.0, 3.0], [-1.0, -7.0, 3.0]], [[0.0, -5.0, 6.0], [4.0, 3.0, -3.0]]], [[[5.0, 
+-6.0, -7.0], [3.0, 7.0, -1.0]], [[7.0, 6.0, 6.0], [-1.0, 2.0, -1.0]], [[-1.0, -1.0, -3.0], [-3.0, 3.0, 2.0]], [[7.0, -2.0, 
+7.0], [-4.0, -4.0, -4.0]], [[2.0, -3.0, 2.0], [-4.0, 0.0, 0.0]]], [[[5.0, 0.0, 0.0], [2.0, 0.0, 2.0]], [[2.0, -2.0, 1.0], [4.0, 
+-6.0, 0.0]], [[-5.0, 3.0, -2.0], [7.0, 6.0, -4.0]], [[-4.0, 1.0, 0.0], [-3.0, -7.0, -4.0]], [[-4.0, -3.0, 4.0], [4.0, 6.0, 
+6.0]]], [[[0.0, 4.0, 1.0], [6.0, 5.0, -3.0]], [[-6.0, 7.0, 1.0], [-1.0, -7.0, 2.0]], [[-3.0, -2.0, -4.0], [3.0, 0.0, 3.0]], 
+[[-3.0, 7.0, -7.0], [2.0, 0.0, -3.0]], [[-1.0, 3.0, -6.0], [-2.0, -6.0, -1.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-58.0, 26.0, 44.0, 40.0, 59.0], [14.0, 71.0, -57.0, 34.0, 65.0], [-64.0, -34.0, 74.0, -65.0, 
--5.0], [-16.0, -49.0, 11.0, -52.0, -13.0]])+(1.-msk_ref)*numpy.array([[-24.0, 20.0, 47.0, 16.0, 49.0], [7.0, -4.0, 22.0, -13.0, 
-6.0], [-19.0, -8.0, -4.0, -25.0, 19.0], [43.0, -38.0, 31.0, -53.0, 11.0]])
+      ref=Data(numpy.array([[87.0, -56.0, 49.0, 13.0, 69.0], [-11.0, 72.0, -35.0, 81.0, 12.0], [43.0, -52.0, -41.0, 56.0, 
+40.0], [17.0, -6.0, -19.0, 2.0, -60.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[36.0, 38.0, -57.0, -22.0, -80.0], [-12.0, 24.0, 17.0, -5.0, -4.0], [-2.0, -27.0, 
+-19.0, 24.0, -78.0], [-13.0, 35.0, -16.0, 64.0, 63.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(3.0)+(1-msk_arg0)*(2.0)
-      arg1=Data(numpy.array([[[-3.0, -1.0], [-4.0, -6.0]], [[4.0, 7.0], [-7.0, 3.0]], [[1.0, -6.0], [0.0, 3.0]], [[-5.0, 5.0], 
-[0.0, -6.0]], [[3.0, 2.0], [-7.0, 6.0]], [[5.0, -3.0], [4.0, -5.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(4.0,self.functionspace)
+      arg0.setTaggedValue(1,-7.0)
+      arg1=Data(numpy.array([[[-2.0, -3.0], [-4.0, 0.0]], [[0.0, -4.0], [0.0, 7.0]], [[-1.0, -6.0], [1.0, 7.0]], [[-7.0, -5.0], 
+[3.0, -3.0]], [[1.0, 2.0], [-7.0, -3.0]], [[6.0, -6.0], [-7.0, -4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, 0.0], [-2.0, -7.0]], [[-1.0, 5.0], [0.0, 3.0]], [[4.0, -4.0], [-3.0, 2.0]], 
+[[-2.0, 3.0], [-2.0, 2.0]], [[-6.0, -5.0], [-5.0, -5.0]], [[6.0, 0.0], [-4.0, 5.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-9.0, -3.0], [-12.0, -18.0]], [[12.0, 21.0], [-21.0, 9.0]], [[3.0, -18.0], [0.0, 9.0]], 
-[[-15.0, 15.0], [0.0, -18.0]], [[9.0, 6.0], [-21.0, 18.0]], [[15.0, -9.0], [12.0, -15.0]]])+(1.-msk_ref)*numpy.array([[[-6.0, 
--2.0], [-8.0, -12.0]], [[8.0, 14.0], [-14.0, 6.0]], [[2.0, -12.0], [0.0, 6.0]], [[-10.0, 10.0], [0.0, -12.0]], [[6.0, 4.0], 
-[-14.0, 12.0]], [[10.0, -6.0], [8.0, -10.0]]])
+      ref=Data(numpy.array([[[-8.0, -12.0], [-16.0, 0.0]], [[0.0, -16.0], [0.0, 28.0]], [[-4.0, -24.0], [4.0, 28.0]], [[-28.0, 
+-20.0], [12.0, -12.0]], [[4.0, 8.0], [-28.0, -12.0]], [[24.0, -24.0], [-28.0, -16.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-21.0, -0.0], [14.0, 49.0]], [[7.0, -35.0], [-0.0, -21.0]], [[-28.0, 28.0], [21.0, 
+-14.0]], [[14.0, -21.0], [14.0, -14.0]], [[42.0, 35.0], [35.0, 35.0]], [[-42.0, -0.0], [28.0, -35.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-2.0, 4.0, 0.0])+(1.-msk_arg0)*numpy.array([-3.0, 0.0, -4.0])
-      arg1=Data(numpy.array([[[[1.0, -5.0, 5.0], [2.0, -2.0, -7.0]], [[3.0, -2.0, -7.0], [5.0, 0.0, -5.0]]], [[[6.0, 4.0, 
--6.0], [0.0, 1.0, 5.0]], [[-7.0, 3.0, -2.0], [5.0, -4.0, 3.0]]], [[[7.0, 1.0, -5.0], [-3.0, 2.0, -5.0]], [[-5.0, -6.0, 0.0], 
-[-4.0, -5.0, 6.0]]], [[[-6.0, -7.0, 2.0], [-1.0, 4.0, -7.0]], [[7.0, -7.0, 6.0], [-3.0, 5.0, -4.0]]], [[[1.0, 0.0, -1.0], 
-[-6.0, 2.0, 7.0]], [[2.0, 6.0, -4.0], [-6.0, 7.0, -1.0]]], [[[0.0, 3.0, 5.0], [0.0, 5.0, -7.0]], [[-4.0, 6.0, -3.0], [-5.0, 
-7.0, -2.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([4.0, -3.0, 6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([5.0, 0.0, 2.0]))
+      arg1=Data(numpy.array([[[[6.0, -6.0, -1.0], [1.0, 6.0, -3.0]], [[-5.0, -4.0, -4.0], [6.0, 3.0, -7.0]]], [[[-2.0, -2.0, 
+-1.0], [-3.0, 1.0, -4.0]], [[-6.0, -2.0, -1.0], [-2.0, 0.0, 4.0]]], [[[6.0, 7.0, 0.0], [-3.0, -7.0, -2.0]], [[-4.0, 6.0, 4.0], 
+[-1.0, 5.0, 0.0]]], [[[-3.0, 7.0, 5.0], [6.0, -2.0, 1.0]], [[-4.0, 4.0, -5.0], [-3.0, -3.0, 6.0]]], [[[-6.0, 6.0, 0.0], [3.0, 
+-6.0, -4.0]], [[-4.0, 7.0, -6.0], [-7.0, 3.0, 3.0]]], [[[0.0, -4.0, 6.0], [4.0, -1.0, -1.0]], [[-4.0, 3.0, 0.0], [1.0, -6.0, 
+0.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-1.0, -5.0, -4.0], [-6.0, 2.0, -1.0]], [[-3.0, -2.0, 4.0], [1.0, -4.0, -7.0]]], 
+[[[0.0, -7.0, 7.0], [-5.0, -4.0, 6.0]], [[-3.0, 6.0, 0.0], [-2.0, 5.0, -4.0]]], [[[-1.0, 5.0, 7.0], [7.0, 0.0, -4.0]], [[0.0, 
+-5.0, 2.0], [3.0, -4.0, 0.0]]], [[[0.0, 6.0, 4.0], [0.0, 2.0, 0.0]], [[0.0, 7.0, 0.0], [3.0, 6.0, -6.0]]], [[[6.0, 7.0, -4.0], 
+[0.0, 5.0, 0.0]], [[-2.0, -6.0, 0.0], [-3.0, -1.0, 1.0]]], [[[-7.0, 2.0, 3.0], [3.0, 0.0, 5.0]], [[2.0, -3.0, 7.0], [-4.0, 2.0, 
+3.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-22.0, -12.0], [-14.0, -10.0]], [[4.0, 4.0], [26.0, -26.0]], [[-10.0, 14.0], [-14.0, -12.0]], 
-[[-16.0, 18.0], [-42.0, 26.0]], [[-2.0, 20.0], [20.0, 40.0]], [[12.0, 20.0], [32.0, 38.0]]])+(1.-msk_ref)*numpy.array([[[-23.0, 
-22.0], [19.0, 5.0]], [[6.0, -20.0], [29.0, -27.0]], [[-1.0, 29.0], [15.0, -12.0]], [[10.0, 31.0], [-45.0, 25.0]], [[1.0, 
--10.0], [10.0, 22.0]], [[-20.0, 28.0], [24.0, 23.0]]])
+      ref=Data(numpy.array([[[36.0, -32.0], [-32.0, -27.0]], [[-8.0, -39.0], [-24.0, 16.0]], [[3.0, -3.0], [-10.0, -19.0]], 
+[[-3.0, 36.0], [-58.0, 33.0]], [[-42.0, 6.0], [-73.0, -19.0]], [[48.0, 13.0], [-25.0, 22.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-13.0, -32.0], [-7.0, -9.0]], [[14.0, -13.0], [-15.0, -18.0]], [[9.0, 27.0], [4.0, 
+15.0]], [[8.0, 0.0], [0.0, 3.0]], [[22.0, 0.0], [-10.0, -13.0]], [[-29.0, 25.0], [24.0, -14.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_constData_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-2.0)+(1-msk_arg0)*(6.0)
-      arg1=Data(numpy.array([[[[-1.0, 4.0, 5.0, -5.0], [6.0, 5.0, 6.0, 2.0], [-5.0, 4.0, -4.0, -1.0]], [[-1.0, 0.0, 1.0, -2.0], 
-[-3.0, 5.0, -2.0, 4.0], [7.0, 4.0, 5.0, -7.0]]], [[[-5.0, -6.0, -2.0, 0.0], [7.0, 2.0, 5.0, 2.0], [-2.0, 1.0, -4.0, -6.0]], 
-[[7.0, -7.0, 2.0, 7.0], [-4.0, -7.0, -4.0, 3.0], [2.0, 6.0, 3.0, 0.0]]], [[[0.0, -4.0, -2.0, 2.0], [-1.0, 3.0, 4.0, 0.0], 
-[-6.0, -5.0, 3.0, -1.0]], [[7.0, -3.0, -1.0, -4.0], [0.0, 1.0, -4.0, 1.0], [5.0, 7.0, -3.0, 4.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg1=Data(numpy.array([[[[3.0, 6.0, -5.0, 0.0], [1.0, 2.0, -7.0, -5.0], [-2.0, -3.0, -3.0, 1.0]], [[-4.0, -4.0, 3.0, 
+2.0], [-3.0, 3.0, -1.0, -7.0], [0.0, -7.0, -4.0, -4.0]]], [[[3.0, -7.0, -2.0, 0.0], [-5.0, 1.0, -6.0, 2.0], [3.0, -5.0, -3.0, 
+2.0]], [[1.0, 7.0, 0.0, 3.0], [-3.0, 5.0, -1.0, 1.0], [4.0, 0.0, 7.0, 6.0]]], [[[-2.0, -2.0, 4.0, 6.0], [-5.0, 3.0, 2.0, 5.0], 
+[0.0, 1.0, -5.0, 0.0]], [[-4.0, 0.0, 0.0, 6.0], [4.0, 0.0, 0.0, -5.0], [2.0, -6.0, -5.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -4.0, 4.0, -7.0], [0.0, -2.0, 2.0, -5.0], [-7.0, -7.0, 7.0, 5.0]], [[-1.0, 
+0.0, -4.0, -6.0], [-5.0, 0.0, 0.0, 2.0], [2.0, -2.0, 0.0, 2.0]]], [[[-3.0, -5.0, -1.0, 4.0], [-1.0, -1.0, 0.0, -5.0], [5.0, 
+3.0, 1.0, 1.0]], [[4.0, -1.0, 1.0, -5.0], [5.0, 0.0, -4.0, -3.0], [4.0, -5.0, 2.0, -6.0]]], [[[5.0, 3.0, -5.0, -7.0], [3.0, 
+-4.0, 4.0, 1.0], [4.0, -2.0, 1.0, 5.0]], [[6.0, 0.0, 0.0, -1.0], [-1.0, 2.0, -4.0, 1.0], [0.0, 4.0, -2.0, 7.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[2.0, -8.0, -10.0, 10.0], [-12.0, -10.0, -12.0, -4.0], [10.0, -8.0, 8.0, 2.0]], [[2.0, -0.0, 
--2.0, 4.0], [6.0, -10.0, 4.0, -8.0], [-14.0, -8.0, -10.0, 14.0]]], [[[10.0, 12.0, 4.0, -0.0], [-14.0, -4.0, -10.0, -4.0], [4.0, 
--2.0, 8.0, 12.0]], [[-14.0, 14.0, -4.0, -14.0], [8.0, 14.0, 8.0, -6.0], [-4.0, -12.0, -6.0, -0.0]]], [[[-0.0, 8.0, 4.0, -4.0], 
-[2.0, -6.0, -8.0, -0.0], [12.0, 10.0, -6.0, 2.0]], [[-14.0, 6.0, 2.0, 8.0], [-0.0, -2.0, 8.0, -2.0], [-10.0, -14.0, 6.0, 
--8.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, 24.0, 30.0, -30.0], [36.0, 30.0, 36.0, 12.0], [-30.0, 24.0, -24.0, -6.0]], [[-6.0, 
-0.0, 6.0, -12.0], [-18.0, 30.0, -12.0, 24.0], [42.0, 24.0, 30.0, -42.0]]], [[[-30.0, -36.0, -12.0, 0.0], [42.0, 12.0, 30.0, 
-12.0], [-12.0, 6.0, -24.0, -36.0]], [[42.0, -42.0, 12.0, 42.0], [-24.0, -42.0, -24.0, 18.0], [12.0, 36.0, 18.0, 0.0]]], [[[0.0, 
--24.0, -12.0, 12.0], [-6.0, 18.0, 24.0, 0.0], [-36.0, -30.0, 18.0, -6.0]], [[42.0, -18.0, -6.0, -24.0], [0.0, 6.0, -24.0, 6.0], 
-[30.0, 42.0, -18.0, 24.0]]]])
+      ref=Data(numpy.array([[[[-12.0, -24.0, 20.0, -0.0], [-4.0, -8.0, 28.0, 20.0], [8.0, 12.0, 12.0, -4.0]], [[16.0, 16.0, 
+-12.0, -8.0], [12.0, -12.0, 4.0, 28.0], [-0.0, 28.0, 16.0, 16.0]]], [[[-12.0, 28.0, 8.0, -0.0], [20.0, -4.0, 24.0, -8.0], 
+[-12.0, 20.0, 12.0, -8.0]], [[-4.0, -28.0, -0.0, -12.0], [12.0, -20.0, 4.0, -4.0], [-16.0, -0.0, -28.0, -24.0]]], [[[8.0, 8.0, 
+-16.0, -24.0], [20.0, -12.0, -8.0, -20.0], [-0.0, -4.0, 20.0, -0.0]], [[16.0, -0.0, -0.0, -24.0], [-16.0, -0.0, -0.0, 20.0], 
+[-8.0, 24.0, 20.0, -16.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-0.0, 16.0, -16.0, 28.0], [-0.0, 8.0, -8.0, 20.0], [28.0, 28.0, -28.0, -20.0]], 
+[[4.0, -0.0, 16.0, 24.0], [20.0, -0.0, -0.0, -8.0], [-8.0, 8.0, -0.0, -8.0]]], [[[12.0, 20.0, 4.0, -16.0], [4.0, 4.0, -0.0, 
+20.0], [-20.0, -12.0, -4.0, -4.0]], [[-16.0, 4.0, -4.0, 20.0], [-20.0, -0.0, 16.0, 12.0], [-16.0, 20.0, -8.0, 24.0]]], 
+[[[-20.0, -12.0, 20.0, 28.0], [-12.0, 16.0, -16.0, -4.0], [-16.0, 8.0, -4.0, -20.0]], [[-24.0, -0.0, -0.0, 4.0], [4.0, -8.0, 
+16.0, -4.0], [-0.0, -16.0, 8.0, -28.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(1.0)+(1-msk_arg0)*(0.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(-6.0)
+   def test_generalTensorTransposedProduct_taggedData_rank0_expandedData_rank0_offset0(self):
+      arg0=Data(2.0,self.functionspace)
+      arg0.setTaggedValue(1,-5.0)
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,6.0)
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(0.0)+(1.-msk_ref)*numpy.array(-0.0)
+      ref=msk_ref*numpy.array(2.0)+(1.-msk_ref)*numpy.array(-30.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-4.0, 0.0, -5.0])+(1.-msk_arg0)*numpy.array([2.0, 0.0, 1.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, 6.0, -5.0])+(1.-msk_arg1)*numpy.array([0.0, 7.0, -6.0])
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([4.0, -5.0, 1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, -1.0, 0.0]))
+      arg1=Data(numpy.array([6.0, 6.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, -6.0, 2.0]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(49.0)+(1.-msk_ref)*numpy.array(-6.0)
+      ref=msk_ref*numpy.array(-5.0)+(1.-msk_ref)*numpy.array(13.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 2.0, -4.0], [0.0, 7.0, -7.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 4.0, 7.0], [-4.0, -4.0, 
-3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[5.0, -3.0, -3.0], [0.0, -3.0, -6.0]])+(1.-msk_arg1)*numpy.array([[4.0, 3.0, 0.0], [-3.0, 
--7.0, -5.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-4.0, -5.0, 1.0], [0.0, 2.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, 2.0, 0.0], [6.0, -2.0, 6.0]]))
+      arg1=Data(numpy.array([[4.0, -7.0, 5.0], [3.0, 0.0, 7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -5.0, -3.0], [-5.0, 7.0, 4.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(47.0)+(1.-msk_ref)*numpy.array(33.0)
+      ref=msk_ref*numpy.array(-18.0)+(1.-msk_ref)*numpy.array(-51.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, 0.0, 7.0], [-6.0, -3.0, -7.0], [-5.0, 4.0, -1.0], [-3.0, -3.0, -5.0]], [[-2.0, 3.0, 
--7.0], [-6.0, 6.0, -2.0], [0.0, -4.0, 7.0], [2.0, 5.0, -7.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, -2.0, -7.0], [4.0, 5.0, 3.0], 
-[0.0, -5.0, -5.0], [1.0, 0.0, 4.0]], [[1.0, -6.0, 6.0], [2.0, 7.0, 2.0], [-7.0, 5.0, 4.0], [0.0, 6.0, 0.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, 0.0, 1.0], [-5.0, -2.0, -4.0], [6.0, 0.0, 4.0], [3.0, -6.0, -6.0]], [[2.0, -7.0, 6.0], 
-[5.0, -4.0, -1.0], [6.0, 6.0, 0.0], [-4.0, -4.0, 0.0]]])+(1.-msk_arg1)*numpy.array([[[-5.0, -4.0, 5.0], [1.0, 7.0, 3.0], [0.0, 
--7.0, 4.0], [-7.0, -3.0, -7.0]], [[0.0, -5.0, 0.0], [3.0, -7.0, -7.0], [-1.0, -1.0, 7.0], [4.0, -4.0, 6.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[2.0, 7.0, 4.0], [0.0, 0.0, -7.0], [7.0, -7.0, 1.0], [6.0, 0.0, -5.0]], [[-5.0, 7.0, 0.0], [-1.0, 
+0.0, 0.0], [-2.0, 5.0, 4.0], [-5.0, -5.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 0.0, 2.0], [0.0, 6.0, -4.0], [3.0, -3.0, -3.0], [-2.0, 4.0, 5.0]], [[2.0, -7.0, 
+5.0], [-4.0, 5.0, -5.0], [0.0, 7.0, 2.0], [-1.0, 7.0, -7.0]]]))
+      arg1=Data(numpy.array([[[-7.0, 7.0, -4.0], [-6.0, -3.0, 5.0], [7.0, 6.0, 6.0], [-2.0, 7.0, -1.0]], [[-3.0, 4.0, -3.0], 
+[6.0, -4.0, -7.0], [-1.0, 0.0, 7.0], [7.0, 7.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[5.0, 2.0, 3.0], [1.0, -4.0, -7.0], [0.0, 1.0, -5.0], [-4.0, 0.0, 4.0]], [[-4.0, 4.0, 
+2.0], [-6.0, -6.0, 2.0], [0.0, -2.0, -2.0], [6.0, 0.0, -1.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-96.0)+(1.-msk_ref)*numpy.array(-20.0)
+      ref=msk_ref*numpy.array(22.0)+(1.-msk_ref)*numpy.array(21.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank4_offset4(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-5.0, -5.0], [-4.0, -6.0], [-5.0, -7.0]], [[0.0, 1.0], [-7.0, -4.0], [6.0, 0.0]]], [[[-3.0, 
--2.0], [2.0, 5.0], [2.0, 7.0]], [[-5.0, 0.0], [-3.0, 3.0], [0.0, -3.0]]], [[[1.0, -1.0], [-2.0, -6.0], [0.0, 4.0]], [[-6.0, 
-0.0], [5.0, -2.0], [3.0, 3.0]]], [[[0.0, -2.0], [-3.0, -1.0], [1.0, 7.0]], [[-1.0, 2.0], [5.0, -3.0], [2.0, 
-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, 0.0], [5.0, 7.0], [0.0, 6.0]], [[3.0, -3.0], [3.0, -5.0], [5.0, 2.0]]], [[[0.0, 
-5.0], [-6.0, -6.0], [7.0, -4.0]], [[7.0, 7.0], [1.0, -1.0], [0.0, 4.0]]], [[[6.0, 4.0], [-6.0, -4.0], [3.0, -7.0]], [[7.0, 
--4.0], [-2.0, 0.0], [-4.0, 5.0]]], [[[0.0, 2.0], [7.0, -1.0], [-7.0, 3.0]], [[-7.0, 0.0], [-3.0, 7.0], [0.0, 1.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[5.0, 6.0], [6.0, 4.0], [-7.0, 2.0]], [[3.0, -3.0], [4.0, -1.0], [-2.0, 2.0]]], [[[-7.0, 
-0.0], [-7.0, 1.0], [-4.0, -5.0]], [[1.0, 0.0], [-5.0, 3.0], [-2.0, 2.0]]], [[[-2.0, 5.0], [4.0, 7.0], [-5.0, -1.0]], [[7.0, 
-6.0], [-5.0, -5.0], [1.0, -5.0]]], [[[0.0, -2.0], [7.0, -4.0], [7.0, 3.0]], [[-5.0, 1.0], [3.0, 0.0], [-6.0, 
-3.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, -5.0], [5.0, 3.0], [1.0, 5.0]], [[-1.0, 0.0], [2.0, 6.0], [4.0, 1.0]]], [[[-1.0, 
--2.0], [1.0, 1.0], [-3.0, 6.0]], [[3.0, -3.0], [-4.0, -2.0], [-4.0, 4.0]]], [[[-6.0, 1.0], [5.0, 0.0], [-1.0, -7.0]], [[0.0, 
--1.0], [-2.0, 0.0], [-5.0, -6.0]]], [[[3.0, 4.0], [1.0, 3.0], [-6.0, -6.0]], [[0.0, -3.0], [-3.0, -6.0], [0.0, 3.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[4.0, -6.0], [5.0, 4.0], [4.0, 4.0]], [[4.0, -2.0], [7.0, 3.0], [-3.0, -6.0]]], [[[-5.0, -6.0], 
+[-1.0, 1.0], [5.0, -4.0]], [[-6.0, -3.0], [-3.0, -2.0], [-2.0, -3.0]]], [[[-1.0, -5.0], [-6.0, 0.0], [-7.0, 2.0]], [[-7.0, 
+1.0], [-7.0, 7.0], [2.0, 0.0]]], [[[-1.0, -5.0], [0.0, -7.0], [5.0, 1.0]], [[4.0, 0.0], [0.0, -1.0], [5.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 7.0], [6.0, -3.0], [-2.0, 0.0]], [[0.0, -3.0], [6.0, -1.0], [-2.0, 1.0]]], 
+[[[-2.0, -7.0], [4.0, -4.0], [-3.0, 3.0]], [[1.0, 1.0], [-7.0, -5.0], [-5.0, -3.0]]], [[[5.0, 7.0], [6.0, 6.0], [-6.0, 2.0]], 
+[[-2.0, -7.0], [5.0, 4.0], [6.0, -7.0]]], [[[-6.0, -6.0], [0.0, -2.0], [2.0, 6.0]], [[-6.0, 5.0], [-3.0, 5.0], [1.0, 5.0]]]]))
+      arg1=Data(numpy.array([[[[-2.0, -1.0], [3.0, 7.0], [-4.0, 0.0]], [[5.0, -3.0], [0.0, 1.0], [0.0, -2.0]]], [[[2.0, -7.0], 
+[-5.0, -7.0], [-7.0, 0.0]], [[1.0, -2.0], [4.0, 2.0], [2.0, 0.0]]], [[[2.0, -4.0], [2.0, -4.0], [-7.0, 4.0]], [[4.0, 0.0], 
+[7.0, -1.0], [-5.0, 0.0]]], [[[7.0, -6.0], [1.0, 1.0], [0.0, 1.0]], [[-4.0, -2.0], [-7.0, 2.0], [4.0, 
+4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-4.0, 1.0], [-6.0, -6.0], [4.0, 2.0]], [[0.0, 4.0], [1.0, 6.0], [6.0, 6.0]]], 
+[[[-2.0, 0.0], [-2.0, 6.0], [3.0, 3.0]], [[-3.0, 7.0], [0.0, 7.0], [7.0, 0.0]]], [[[-1.0, -4.0], [1.0, 5.0], [-7.0, 3.0]], 
+[[-6.0, -7.0], [-7.0, 2.0], [1.0, 0.0]]], [[[0.0, 1.0], [0.0, -3.0], [7.0, 0.0]], [[2.0, 6.0], [-5.0, -4.0], [0.0, 2.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array(-229.0)+(1.-msk_ref)*numpy.array(1.0)
+      ref=msk_ref*numpy.array(29.0)+(1.-msk_ref)*numpy.array(1.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(3.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-4.0, 4.0])+(1.-msk_arg1)*numpy.array([5.0, -7.0])
+   def test_generalTensorTransposedProduct_taggedData_rank0_expandedData_rank1_offset0(self):
+      arg0=Data(-7.0,self.functionspace)
+      arg0.setTaggedValue(1,-4.0)
+      arg1=Data(numpy.array([-5.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-6.0, 0.0]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-0.0, 0.0])+(1.-msk_ref)*numpy.array([15.0, -21.0])
+      ref=msk_ref*numpy.array([35.0, -0.0])+(1.-msk_ref)*numpy.array([24.0, -0.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not res.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([0.0, 7.0, 4.0])+(1.-msk_arg0)*numpy.array([-3.0, 3.0, 3.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[7.0, 0.0, -3.0], [-5.0, 6.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-6.0, 1.0, 3.0], [-2.0, 6.0, 
-3.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([0.0, 2.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, 7.0, -7.0]))
+      arg1=Data(numpy.array([[0.0, 0.0, 6.0], [5.0, -5.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[3.0, 6.0, -3.0], [7.0, -7.0, -7.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-12.0, 62.0])+(1.-msk_ref)*numpy.array([30.0, 33.0])
+      ref=msk_ref*numpy.array([24.0, -30.0])+(1.-msk_ref)*numpy.array([81.0, 42.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[6.0, 5.0, 2.0], [-1.0, 5.0, -2.0]])+(1.-msk_arg0)*numpy.array([[5.0, -6.0, -6.0], [4.0, 0.0, 
--7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-1.0, 4.0, -3.0], [-2.0, 4.0, 2.0]], [[-2.0, 3.0, -5.0], [-2.0, 4.0, 
-0.0]]])+(1.-msk_arg1)*numpy.array([[[3.0, 5.0, -2.0], [0.0, -1.0, -4.0]], [[-1.0, -1.0, 4.0], [-7.0, -1.0, 6.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[7.0, 0.0, -4.0], [0.0, -6.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[5.0, 2.0, 0.0], [0.0, 6.0, 3.0]]))
+      arg1=Data(numpy.array([[[0.0, 2.0, 6.0], [4.0, -1.0, 0.0]], [[-6.0, 5.0, -5.0], [0.0, 1.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, 7.0, 0.0], [0.0, 5.0, -3.0]], [[4.0, 3.0, 5.0], [0.0, 3.0, 0.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([26.0, 15.0])+(1.-msk_ref)*numpy.array([25.0, -93.0])
+      ref=msk_ref*numpy.array([-18.0, -16.0])+(1.-msk_ref)*numpy.array([15.0, 44.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-3.0, -6.0, -4.0], [0.0, 1.0, 7.0], [6.0, 3.0, 1.0], [0.0, -6.0, 5.0]], [[5.0, 0.0, -6.0], 
-[4.0, 0.0, 0.0], [7.0, -5.0, 0.0], [-5.0, 6.0, 1.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, -3.0, 3.0], [-7.0, 6.0, -3.0], [-4.0, 
-5.0, 7.0], [-2.0, 6.0, 3.0]], [[2.0, -2.0, -6.0], [4.0, 4.0, 0.0], [0.0, 2.0, 2.0], [-5.0, 0.0, 1.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-4.0, -6.0, -1.0], [-1.0, -3.0, 6.0], [-4.0, -2.0, -4.0], [-6.0, 2.0, 5.0]], [[-7.0, -6.0, 
--4.0], [-6.0, -1.0, 2.0], [-7.0, -1.0, -5.0], [1.0, 6.0, 5.0]]], [[[5.0, 5.0, -7.0], [3.0, 7.0, -5.0], [-4.0, -7.0, 4.0], [1.0, 
-4.0, -3.0]], [[2.0, -6.0, 7.0], [0.0, 6.0, 2.0], [2.0, 0.0, 7.0], [-5.0, -5.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-2.0, 
-0.0, 4.0], [-5.0, 3.0, -3.0], [-4.0, 5.0, -6.0], [-4.0, -2.0, 1.0]], [[1.0, 0.0, -1.0], [-7.0, 4.0, 3.0], [0.0, -5.0, 4.0], 
-[-3.0, -4.0, -2.0]]], [[[1.0, -3.0, 2.0], [-1.0, -1.0, -7.0], [-1.0, 7.0, -6.0], [0.0, -2.0, 1.0]], [[-5.0, 0.0, 7.0], [5.0, 
-5.0, -1.0], [-5.0, -5.0, -6.0], [0.0, -6.0, 4.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[1.0, -5.0, -6.0], [-1.0, 4.0, 7.0], [0.0, 5.0, 4.0], [2.0, 2.0, 3.0]], [[1.0, -7.0, -1.0], [2.0, 
+1.0, -2.0], [-4.0, 4.0, -4.0], [2.0, 4.0, -5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 1.0, -3.0], [-3.0, 0.0, 3.0], [2.0, 1.0, -1.0], [4.0, -2.0, 6.0]], [[1.0, 0.0, 
+0.0], [0.0, 0.0, 5.0], [7.0, -7.0, 0.0], [3.0, 4.0, -3.0]]]))
+      arg1=Data(numpy.array([[[[-5.0, -7.0, -7.0], [-3.0, -1.0, 4.0], [1.0, 7.0, -6.0], [0.0, 1.0, 4.0]], [[-3.0, 5.0, -3.0], 
+[2.0, 0.0, -3.0], [5.0, 1.0, 3.0], [5.0, 6.0, -2.0]]], [[[4.0, 6.0, 5.0], [-4.0, -3.0, -1.0], [-3.0, -7.0, 3.0], [3.0, 3.0, 
+7.0]], [[-5.0, 2.0, -7.0], [5.0, 0.0, -6.0], [1.0, 3.0, -3.0], [6.0, -6.0, -3.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 0.0, -1.0], [5.0, 6.0, 2.0], [-2.0, -2.0, 4.0], [-3.0, -6.0, -2.0]], [[4.0, 
+-2.0, 0.0], [-2.0, 2.0, 6.0], [-6.0, -1.0, 6.0], [4.0, 0.0, -1.0]]], [[[0.0, 1.0, -1.0], [1.0, 7.0, 0.0], [7.0, -6.0, 3.0], 
+[-2.0, -6.0, 1.0]], [[1.0, -7.0, 6.0], [1.0, 5.0, 4.0], [1.0, -4.0, 7.0], [-1.0, 0.0, 7.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([27.0, -144.0])+(1.-msk_ref)*numpy.array([65.0, 2.0])
+      ref=msk_ref*numpy.array([115.0, -28.0])+(1.-msk_ref)*numpy.array([-14.0, 48.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(-7.0)+(1-msk_arg0)*(-1.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, 0.0, -6.0, 1.0, -6.0], [0.0, -5.0, 0.0, -3.0, -2.0], [-6.0, 1.0, 4.0, 7.0, 7.0], [0.0, 
-1.0, -1.0, 0.0, 4.0]])+(1.-msk_arg1)*numpy.array([[4.0, -4.0, 0.0, 0.0, -3.0], [2.0, 7.0, -6.0, 0.0, -6.0], [1.0, 3.0, 7.0, 
--7.0, -3.0], [4.0, 7.0, 3.0, -5.0, -4.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank0_expandedData_rank2_offset0(self):
+      arg0=Data(-3.0,self.functionspace)
+      arg0.setTaggedValue(1,3.0)
+      arg1=Data(numpy.array([[-6.0, 2.0, -3.0, -2.0, 3.0], [-6.0, 3.0, 5.0, 5.0, 3.0], [-3.0, -4.0, -6.0, 3.0, -5.0], [-6.0, 
+-3.0, -6.0, 0.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-7.0, 7.0, -6.0, 5.0, -2.0], [-1.0, 3.0, 4.0, 2.0, 5.0], [1.0, -6.0, -6.0, -3.0, 
+-7.0], [0.0, -5.0, 1.0, 7.0, -3.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[14.0, -0.0, 42.0, -7.0, 42.0], [-0.0, 35.0, -0.0, 21.0, 14.0], [42.0, -7.0, -28.0, -49.0, 
--49.0], [-0.0, -7.0, 7.0, -0.0, -28.0]])+(1.-msk_ref)*numpy.array([[-4.0, 4.0, -0.0, -0.0, 3.0], [-2.0, -7.0, 6.0, -0.0, 6.0], 
-[-1.0, -3.0, -7.0, 7.0, 3.0], [-4.0, -7.0, -3.0, 5.0, 4.0]])
+      ref=msk_ref*numpy.array([[18.0, -6.0, 9.0, 6.0, -9.0], [18.0, -9.0, -15.0, -15.0, -9.0], [9.0, 12.0, 18.0, -9.0, 15.0], 
+[18.0, 9.0, 18.0, -0.0, -6.0]])+(1.-msk_ref)*numpy.array([[-21.0, 21.0, -18.0, 15.0, -6.0], [-3.0, 9.0, 12.0, 6.0, 15.0], [3.0, 
+-18.0, -18.0, -9.0, -21.0], [0.0, -15.0, 3.0, 21.0, -9.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([7.0, -4.0, -6.0])+(1.-msk_arg0)*numpy.array([-5.0, 1.0, -1.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[6.0, -4.0, 7.0], [-2.0, 1.0, -5.0], [4.0, -4.0, 1.0], [-1.0, -4.0, -1.0], [4.0, 6.0, -5.0]], 
-[[-2.0, -5.0, 1.0], [6.0, -6.0, 7.0], [-2.0, 3.0, 7.0], [7.0, 6.0, -2.0], [-5.0, 2.0, -4.0]], [[6.0, -1.0, 1.0], [-3.0, 7.0, 
--1.0], [-1.0, 0.0, 2.0], [5.0, -7.0, -2.0], [-1.0, -5.0, 0.0]], [[0.0, 1.0, -3.0], [-6.0, 0.0, -6.0], [4.0, -5.0, 6.0], [4.0, 
--6.0, -7.0], [-3.0, -3.0, 7.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 0.0, 0.0], [5.0, -3.0, -3.0], [-3.0, -3.0, 6.0], [1.0, 
-7.0, -7.0], [-1.0, -5.0, 7.0]], [[2.0, 0.0, 0.0], [0.0, -6.0, 0.0], [-5.0, -3.0, -5.0], [6.0, -3.0, 1.0], [2.0, 4.0, -6.0]], 
-[[-4.0, 7.0, -4.0], [5.0, 0.0, 0.0], [6.0, 2.0, -4.0], [5.0, -6.0, 5.0], [1.0, 0.0, 5.0]], [[6.0, 4.0, 7.0], [3.0, -2.0, 1.0], 
-[0.0, -3.0, -7.0], [-6.0, 5.0, -4.0], [-3.0, 0.0, -6.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([-5.0, -4.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, 2.0, 6.0]))
+      arg1=Data(numpy.array([[[-5.0, -1.0, 7.0], [-7.0, 4.0, 0.0], [0.0, 3.0, 5.0], [-7.0, 6.0, -1.0], [0.0, 3.0, 1.0]], [[2.0, 
+0.0, -4.0], [-5.0, 3.0, 0.0], [-5.0, -5.0, 1.0], [0.0, 5.0, 5.0], [2.0, 3.0, 2.0]], [[-5.0, -2.0, 1.0], [-2.0, -7.0, 5.0], 
+[7.0, -3.0, 5.0], [-5.0, 5.0, -2.0], [7.0, -2.0, -6.0]], [[4.0, -5.0, -2.0], [2.0, 0.0, -7.0], [4.0, 4.0, -3.0], [6.0, -6.0, 
+0.0], [5.0, -3.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -1.0, -4.0], [-3.0, 5.0, 2.0], [-7.0, 1.0, 3.0], [2.0, 0.0, -2.0], [7.0, -3.0, 
+-3.0]], [[-2.0, -5.0, 6.0], [5.0, -7.0, -6.0], [-4.0, -5.0, -3.0], [-2.0, -1.0, -4.0], [3.0, 1.0, -4.0]], [[1.0, 3.0, -4.0], 
+[3.0, -3.0, 3.0], [-5.0, -4.0, -1.0], [-7.0, -4.0, -1.0], [1.0, -5.0, 1.0]], [[5.0, -5.0, -1.0], [1.0, -1.0, -3.0], [-3.0, 0.0, 
+6.0], [7.0, -4.0, 7.0], [4.0, -1.0, -4.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[16.0, 12.0, 38.0, 15.0, 34.0], [0.0, 24.0, -68.0, 37.0, -19.0], [40.0, -43.0, -19.0, 75.0, 
-13.0], [14.0, -6.0, 12.0, 94.0, -51.0]])+(1.-msk_ref)*numpy.array([[15.0, -25.0, 6.0, 9.0, -7.0], [-10.0, -6.0, 27.0, -34.0, 
-0.0], [31.0, -25.0, -24.0, -36.0, -10.0], [-33.0, -18.0, 4.0, 39.0, 21.0]])
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-2.0, -4.0, 5.0], [-7.0, 0.0, -6.0]])+(1.-msk_arg0)*numpy.array([[-6.0, 5.0, 1.0], [1.0, 
--1.0, 2.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[3.0, 5.0, -6.0], [0.0, -1.0, 0.0]], [[3.0, -2.0, 7.0], [-7.0, -3.0, 0.0]], [[-3.0, 4.0, 
--5.0], [6.0, 0.0, -2.0]], [[2.0, 0.0, -6.0], [-4.0, -1.0, -5.0]], [[-7.0, 1.0, -5.0], [-1.0, 0.0, 6.0]]], [[[-3.0, 0.0, 1.0], 
-[0.0, 6.0, -3.0]], [[-7.0, -6.0, 7.0], [4.0, 4.0, -4.0]], [[4.0, 4.0, 4.0], [0.0, -6.0, 0.0]], [[-5.0, 0.0, -2.0], [-1.0, -1.0, 
-7.0]], [[-3.0, -2.0, 2.0], [0.0, -4.0, 2.0]]], [[[-4.0, 3.0, -4.0], [3.0, -5.0, -1.0]], [[3.0, 4.0, 5.0], [-1.0, 2.0, 7.0]], 
-[[6.0, 6.0, -1.0], [0.0, -2.0, -5.0]], [[5.0, 0.0, 2.0], [-7.0, 2.0, 3.0]], [[-4.0, 4.0, 2.0], [-1.0, -6.0, 2.0]]], [[[3.0, 
--4.0, 1.0], [6.0, 7.0, 5.0]], [[-5.0, 6.0, 1.0], [1.0, 4.0, 4.0]], [[-3.0, 2.0, -5.0], [0.0, -7.0, -7.0]], [[-2.0, -6.0, -1.0], 
-[-2.0, -2.0, 6.0]], [[1.0, 1.0, -7.0], [1.0, -3.0, 7.0]]]])+(1.-msk_arg1)*numpy.array([[[[-1.0, -6.0, -1.0], [-7.0, -1.0, 
--5.0]], [[7.0, 0.0, -2.0], [-2.0, -6.0, 6.0]], [[-5.0, 5.0, -4.0], [3.0, 2.0, 3.0]], [[1.0, -4.0, 0.0], [-1.0, -2.0, -6.0]], 
-[[-2.0, -1.0, -3.0], [4.0, -4.0, -6.0]]], [[[6.0, 7.0, -7.0], [-6.0, 0.0, -7.0]], [[-5.0, -3.0, -1.0], [1.0, 7.0, -3.0]], 
-[[-6.0, 4.0, 0.0], [6.0, 7.0, 1.0]], [[6.0, -2.0, 0.0], [7.0, 4.0, -7.0]], [[-5.0, -3.0, -3.0], [1.0, 4.0, 0.0]]], [[[-4.0, 
-1.0, 7.0], [-4.0, 4.0, -5.0]], [[-2.0, 0.0, -5.0], [-4.0, -1.0, -1.0]], [[-3.0, -3.0, 6.0], [-5.0, -7.0, -3.0]], [[-5.0, 0.0, 
--3.0], [0.0, -5.0, 6.0]], [[6.0, 6.0, -1.0], [0.0, 3.0, 0.0]]], [[[7.0, 1.0, 0.0], [-4.0, 0.0, 1.0]], [[3.0, -3.0, -7.0], 
-[-4.0, 1.0, -6.0]], [[6.0, 6.0, -5.0], [4.0, 6.0, -5.0]], [[2.0, -3.0, 1.0], [-2.0, 2.0, 0.0]], [[0.0, 2.0, -7.0], [7.0, 1.0, 
-6.0]]]])
+      ref=msk_ref*numpy.array([[8.0, 19.0, -27.0, 14.0, -15.0], [2.0, 13.0, 42.0, -35.0, -28.0], [30.0, 23.0, -38.0, 11.0, 
+-9.0], [6.0, 11.0, -27.0, -6.0, -13.0]])+(1.-msk_ref)*numpy.array([[10.0, 40.0, 62.0, -24.0, -66.0], [38.0, -80.0, -4.0, -14.0, 
+-40.0], [-24.0, -6.0, 16.0, 28.0, -10.0], [-46.0, -26.0, 54.0, -8.0, -50.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-7.0, -6.0, -4.0], [6.0, 3.0, 3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 7.0, -1.0], [-1.0, 1.0, -6.0]]))
+      arg1=Data(numpy.array([[[[-5.0, -7.0, 0.0], [-7.0, -2.0, 1.0]], [[0.0, -5.0, -7.0], [3.0, 4.0, -4.0]], [[-5.0, -1.0, 
+-7.0], [-4.0, 3.0, -1.0]], [[-3.0, -6.0, 2.0], [4.0, 6.0, -7.0]], [[-7.0, -6.0, 7.0], [7.0, -4.0, 2.0]]], [[[4.0, 0.0, 7.0], 
+[0.0, 7.0, 7.0]], [[-5.0, -3.0, -6.0], [-6.0, 0.0, 0.0]], [[-3.0, 1.0, 4.0], [-3.0, 1.0, 4.0]], [[-1.0, 6.0, 3.0], [0.0, -2.0, 
+7.0]], [[-1.0, -7.0, 6.0], [-4.0, 2.0, 0.0]]], [[[-2.0, -6.0, 1.0], [4.0, -2.0, 4.0]], [[0.0, -2.0, 5.0], [6.0, -2.0, -3.0]], 
+[[-3.0, -6.0, 0.0], [4.0, -7.0, -3.0]], [[0.0, -3.0, 4.0], [4.0, 5.0, 2.0]], [[6.0, -2.0, 0.0], [0.0, 5.0, -4.0]]], [[[4.0, 
+-3.0, 7.0], [2.0, 7.0, 0.0]], [[-2.0, 0.0, -3.0], [3.0, -7.0, 7.0]], [[0.0, -5.0, 6.0], [3.0, 3.0, 1.0]], [[-6.0, 4.0, -5.0], 
+[-6.0, -1.0, -3.0]], [[0.0, 0.0, -6.0], [-1.0, -3.0, 5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -3.0, 3.0], [3.0, -2.0, -7.0]], [[0.0, 5.0, -3.0], [-5.0, -3.0, 7.0]], [[-6.0, 
+-2.0, 2.0], [-3.0, -6.0, 3.0]], [[-6.0, -6.0, -4.0], [5.0, 2.0, 7.0]], [[7.0, -3.0, -1.0], [0.0, -2.0, 5.0]]], [[[1.0, -1.0, 
+-1.0], [3.0, -3.0, 4.0]], [[-3.0, 2.0, 0.0], [7.0, 0.0, -5.0]], [[5.0, 7.0, 6.0], [-5.0, -5.0, 6.0]], [[-3.0, -7.0, 2.0], 
+[-4.0, -3.0, 6.0]], [[-1.0, -5.0, -4.0], [4.0, 0.0, -2.0]]], [[[-1.0, 6.0, 0.0], [7.0, 0.0, -7.0]], [[2.0, 1.0, -7.0], [0.0, 
+-3.0, -7.0]], [[3.0, -2.0, -2.0], [-2.0, -1.0, -6.0]], [[-5.0, -7.0, -2.0], [-6.0, -7.0, 4.0]], [[0.0, 1.0, -2.0], [2.0, 6.0, 
+0.0]]], [[[4.0, 0.0, 0.0], [2.0, -6.0, 7.0]], [[-5.0, 7.0, -3.0], [-7.0, 7.0, 2.0]], [[-7.0, 4.0, 0.0], [3.0, -2.0, 5.0]], 
+[[-5.0, -2.0, 7.0], [2.0, -1.0, -6.0]], [[6.0, -3.0, 2.0], [1.0, 2.0, -1.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-56.0, 86.0, -65.0, 24.0, -44.0], [29.0, 69.0, -4.0, -35.0, 12.0], [-39.0, -32.0, -11.0, 31.0, 
--3.0], [-57.0, -40.0, 15.0, 1.0, -90.0]])+(1.-msk_ref)*numpy.array([[-41.0, -28.0, 58.0, -37.0, 0.0], [-28.0, 2.0, 57.0, -57.0, 
-9.0], [18.0, 2.0, 5.0, 44.0, -10.0], [-39.0, -57.0, -23.0, -30.0, 21.0]])
+      ref=msk_ref*numpy.array([[32.0, 76.0, 51.0, 70.0, 93.0], [-14.0, 41.0, -4.0, -26.0, 7.0], [76.0, 13.0, 51.0, 47.0, 
+-27.0], [-5.0, 44.0, 36.0, -10.0, 24.0]])+(1.-msk_ref)*numpy.array([[13.0, -2.0, -37.0, -83.0, -52.0], [-36.0, 37.0, 7.0, 
+-86.0, -23.0], [77.0, 53.0, 25.0, -72.0, 13.0], [-50.0, 54.0, -7.0, 12.0, -16.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(0.0)+(1-msk_arg0)*(-5.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[0.0, 7.0], [0.0, -2.0]], [[-5.0, 2.0], [-7.0, 2.0]], [[3.0, -7.0], [0.0, 1.0]], [[5.0, 7.0], 
-[7.0, 2.0]], [[0.0, -1.0], [3.0, 4.0]], [[-7.0, 0.0], [5.0, -6.0]]])+(1.-msk_arg1)*numpy.array([[[-3.0, 7.0], [-7.0, 1.0]], 
-[[2.0, 0.0], [5.0, 3.0]], [[6.0, -5.0], [-4.0, -5.0]], [[0.0, 7.0], [-7.0, -4.0]], [[7.0, -6.0], [-7.0, 1.0]], [[0.0, -7.0], 
-[7.0, -6.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank0_expandedData_rank3_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg0.setTaggedValue(1,-2.0)
+      arg1=Data(numpy.array([[[-3.0, 4.0], [5.0, 3.0]], [[-6.0, 4.0], [6.0, -3.0]], [[4.0, -6.0], [-4.0, 0.0]], [[-7.0, -1.0], 
+[-4.0, 0.0]], [[2.0, -5.0], [1.0, 3.0]], [[0.0, -7.0], [5.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, -1.0], [-6.0, 3.0]], [[7.0, 3.0], [-1.0, 5.0]], [[-4.0, 5.0], [-4.0, -4.0]], 
+[[7.0, -3.0], [-7.0, -7.0]], [[2.0, 6.0], [5.0, 4.0]], [[0.0, 0.0], [5.0, -6.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 0.0], [0.0, -0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[0.0, -0.0], [0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]]])+(1.-msk_ref)*numpy.array([[[15.0, -35.0], [35.0, -5.0]], 
-[[-10.0, -0.0], [-25.0, -15.0]], [[-30.0, 25.0], [20.0, 25.0]], [[-0.0, -35.0], [35.0, 20.0]], [[-35.0, 30.0], [35.0, -5.0]], 
-[[-0.0, 35.0], [-35.0, 30.0]]])
+      ref=msk_ref*numpy.array([[[-9.0, 12.0], [15.0, 9.0]], [[-18.0, 12.0], [18.0, -9.0]], [[12.0, -18.0], [-12.0, 0.0]], 
+[[-21.0, -3.0], [-12.0, 0.0]], [[6.0, -15.0], [3.0, 9.0]], [[0.0, -21.0], [15.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[8.0, 2.0], 
+[12.0, -6.0]], [[-14.0, -6.0], [2.0, -10.0]], [[8.0, -10.0], [8.0, 8.0]], [[-14.0, 6.0], [14.0, 14.0]], [[-4.0, -12.0], [-10.0, 
+-8.0]], [[-0.0, -0.0], [-10.0, 12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-4.0, 3.0, -3.0])+(1.-msk_arg0)*numpy.array([6.0, 1.0, 7.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, -2.0], [4.0, -2.0, 1.0]], [[-3.0, 0.0, 7.0], [4.0, 0.0, -1.0]]], [[[5.0, 6.0, 
-7.0], [1.0, -4.0, -7.0]], [[-5.0, 4.0, 4.0], [0.0, 1.0, -1.0]]], [[[-7.0, 2.0, -5.0], [-3.0, -6.0, -4.0]], [[-7.0, 4.0, 6.0], 
-[5.0, -2.0, -2.0]]], [[[6.0, 6.0, -7.0], [4.0, 1.0, -7.0]], [[-7.0, 2.0, 2.0], [1.0, -2.0, 7.0]]], [[[-6.0, 2.0, -6.0], [0.0, 
--3.0, -5.0]], [[-2.0, 0.0, -6.0], [-6.0, -6.0, 0.0]]], [[[7.0, 0.0, 0.0], [0.0, 0.0, 7.0]], [[-1.0, -2.0, -1.0], [-2.0, 0.0, 
--4.0]]]])+(1.-msk_arg1)*numpy.array([[[[1.0, 6.0, -2.0], [-1.0, 5.0, 7.0]], [[-4.0, -5.0, 7.0], [-1.0, 1.0, 1.0]]], [[[-3.0, 
--2.0, 2.0], [-3.0, -3.0, -2.0]], [[-3.0, -1.0, 1.0], [6.0, 2.0, 1.0]]], [[[0.0, -7.0, -7.0], [0.0, 6.0, 3.0]], [[5.0, -2.0, 
-7.0], [5.0, 0.0, 7.0]]], [[[4.0, 3.0, 1.0], [-5.0, 0.0, 5.0]], [[5.0, -1.0, 2.0], [-6.0, -3.0, -4.0]]], [[[3.0, -3.0, -5.0], 
-[0.0, -4.0, 2.0]], [[-6.0, -1.0, -5.0], [-2.0, 7.0, -4.0]]], [[[-2.0, 3.0, 1.0], [-2.0, 6.0, 5.0]], [[3.0, 0.0, 3.0], [5.0, 
-3.0, -5.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([1.0, -5.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([6.0, 7.0, 2.0]))
+      arg1=Data(numpy.array([[[[-6.0, 2.0, 0.0], [-6.0, -5.0, -2.0]], [[-3.0, -5.0, 3.0], [5.0, 0.0, 5.0]]], [[[-5.0, -2.0, 
+3.0], [-1.0, -1.0, 4.0]], [[1.0, -3.0, 3.0], [0.0, 0.0, -2.0]]], [[[3.0, 3.0, -2.0], [-5.0, -4.0, 4.0]], [[-7.0, -2.0, -3.0], 
+[-7.0, 5.0, 0.0]]], [[[7.0, -3.0, 0.0], [-1.0, 4.0, 4.0]], [[1.0, 3.0, -5.0], [-6.0, 0.0, -1.0]]], [[[7.0, 6.0, 0.0], [-1.0, 
+2.0, -1.0]], [[-5.0, 3.0, 4.0], [-4.0, 6.0, 3.0]]], [[[-2.0, 1.0, -4.0], [7.0, -3.0, -3.0]], [[6.0, -4.0, -2.0], [0.0, -2.0, 
+-7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, -7.0, 3.0], [5.0, 0.0, 2.0]], [[0.0, 7.0, 6.0], [3.0, -3.0, -5.0]]], [[[0.0, 
+-1.0, -2.0], [-1.0, -4.0, -1.0]], [[-4.0, -3.0, -2.0], [1.0, 2.0, 2.0]]], [[[5.0, 7.0, 3.0], [0.0, 4.0, 2.0]], [[6.0, 2.0, 
+2.0], [-4.0, 7.0, 4.0]]], [[[0.0, -6.0, 2.0], [0.0, -3.0, -1.0]], [[-3.0, 0.0, 0.0], [-7.0, -5.0, -5.0]]], [[[0.0, -6.0, -6.0], 
+[4.0, 3.0, 2.0]], [[5.0, -3.0, -1.0], [5.0, -2.0, -1.0]]], [[[-7.0, 4.0, 5.0], [-1.0, 4.0, 0.0]], [[1.0, -7.0, 5.0], [-7.0, 
+4.0, -1.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[6.0, -25.0], [-9.0, -13.0]], [[-23.0, 5.0], [20.0, 6.0]], [[49.0, 6.0], [22.0, -20.0]], 
-[[15.0, 8.0], [28.0, -31.0]], [[48.0, 6.0], [26.0, 6.0]], [[-28.0, -21.0], [1.0, 20.0]]])+(1.-msk_ref)*numpy.array([[[-2.0, 
-48.0], [20.0, 2.0]], [[-6.0, -35.0], [-12.0, 45.0]], [[-56.0, 27.0], [77.0, 79.0]], [[34.0, 5.0], [43.0, -67.0]], [[-20.0, 
-10.0], [-72.0, -33.0]], [[-2.0, 29.0], [39.0, -2.0]]])
+      ref=msk_ref*numpy.array([[[-16.0, 33.0], [1.0, -30.0]], [[-16.0, -24.0], [-5.0, 14.0]], [[2.0, -13.0], [24.0, -32.0]], 
+[[22.0, -49.0], [21.0, 1.0]], [[-23.0, -4.0], [-48.0, -55.0]], [[21.0, 43.0], [40.0, 
+59.0]]])+(1.-msk_ref)*numpy.array([[[-55.0, 34.0], [61.0, -13.0]], [[-11.0, -36.0], [-49.0, 24.0]], [[85.0, 32.0], [54.0, 
+33.0]], [[-38.0, -23.0], [-18.0, -87.0]], [[-54.0, 49.0], [7.0, 14.0]], [[-4.0, 22.0], [-33.0, -16.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank0_expandedData_rank4_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*(1.0)+(1-msk_arg0)*(-3.0)
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, 0.0, 2.0, 5.0], [-1.0, -5.0, 3.0, -3.0], [-4.0, 7.0, 6.0, -3.0]], [[-2.0, 3.0, 3.0, 
-2.0], [6.0, -4.0, 6.0, -5.0], [7.0, 3.0, -6.0, 3.0]]], [[[-4.0, 5.0, 2.0, 0.0], [6.0, -4.0, 0.0, 6.0], [-5.0, -2.0, 7.0, 
--5.0]], [[1.0, 0.0, 5.0, -4.0], [5.0, -3.0, 7.0, -7.0], [0.0, 6.0, 0.0, 0.0]]], [[[-1.0, -6.0, 0.0, -2.0], [3.0, -7.0, 6.0, 
--6.0], [0.0, -7.0, -7.0, -2.0]], [[-7.0, -7.0, 6.0, 6.0], [0.0, -3.0, 1.0, 0.0], [0.0, 0.0, -2.0, 
-7.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, 0.0, 6.0, 7.0], [0.0, -6.0, 1.0, 3.0], [7.0, -6.0, -5.0, 5.0]], [[-1.0, 0.0, 4.0, 
--6.0], [2.0, -6.0, -5.0, 0.0], [5.0, 2.0, 1.0, 3.0]]], [[[1.0, -5.0, 7.0, -2.0], [4.0, -6.0, -5.0, 7.0], [-3.0, -7.0, 5.0, 
-1.0]], [[-3.0, 0.0, 0.0, -4.0], [1.0, 0.0, -5.0, 2.0], [6.0, -3.0, 7.0, -3.0]]], [[[0.0, 2.0, -2.0, 2.0], [-5.0, 3.0, 2.0, 
--2.0], [3.0, 3.0, -4.0, -2.0]], [[-3.0, -4.0, 5.0, -4.0], [0.0, -6.0, -2.0, -7.0], [-1.0, 1.0, 1.0, 2.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank0_expandedData_rank4_offset0(self):
+      arg0=Data(-1.0,self.functionspace)
+      arg0.setTaggedValue(1,6.0)
+      arg1=Data(numpy.array([[[[0.0, -6.0, -4.0, -1.0], [5.0, 6.0, 0.0, -1.0], [7.0, 7.0, -6.0, 0.0]], [[3.0, -4.0, 2.0, 5.0], 
+[-6.0, -1.0, 2.0, 3.0], [1.0, -5.0, 4.0, 4.0]]], [[[-5.0, 1.0, 1.0, -5.0], [-7.0, 0.0, -7.0, 0.0], [-4.0, -3.0, -1.0, -6.0]], 
+[[5.0, 6.0, -7.0, 6.0], [-6.0, -3.0, -3.0, 7.0], [-5.0, 1.0, -1.0, -5.0]]], [[[2.0, 0.0, 1.0, 4.0], [6.0, -6.0, 6.0, -7.0], 
+[0.0, 1.0, 4.0, -4.0]], [[-7.0, -7.0, 5.0, -2.0], [0.0, 4.0, 4.0, 4.0], [-3.0, 4.0, 6.0, -7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, 0.0, 7.0, -5.0], [-3.0, 6.0, 5.0, 5.0], [6.0, -4.0, 0.0, -6.0]], [[-1.0, 7.0, 
+-4.0, 7.0], [-4.0, 7.0, -7.0, 4.0], [6.0, 1.0, -1.0, 6.0]]], [[[-5.0, 3.0, 7.0, 7.0], [-5.0, -4.0, -7.0, -6.0], [-1.0, -5.0, 
+-7.0, 1.0]], [[-1.0, -4.0, 3.0, -6.0], [6.0, 3.0, 0.0, -1.0], [2.0, -5.0, -6.0, 3.0]]], [[[3.0, 0.0, -1.0, 5.0], [3.0, 7.0, 
+5.0, 3.0], [-7.0, -6.0, 5.0, -2.0]], [[1.0, 0.0, -6.0, 0.0], [-6.0, -1.0, 0.0, 0.0], [3.0, -5.0, -7.0, 0.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0, 2.0, 5.0], [-1.0, -5.0, 3.0, -3.0], [-4.0, 7.0, 6.0, -3.0]], [[-2.0, 3.0, 3.0, 
-2.0], [6.0, -4.0, 6.0, -5.0], [7.0, 3.0, -6.0, 3.0]]], [[[-4.0, 5.0, 2.0, 0.0], [6.0, -4.0, 0.0, 6.0], [-5.0, -2.0, 7.0, 
--5.0]], [[1.0, 0.0, 5.0, -4.0], [5.0, -3.0, 7.0, -7.0], [0.0, 6.0, 0.0, 0.0]]], [[[-1.0, -6.0, 0.0, -2.0], [3.0, -7.0, 6.0, 
--6.0], [0.0, -7.0, -7.0, -2.0]], [[-7.0, -7.0, 6.0, 6.0], [0.0, -3.0, 1.0, 0.0], [0.0, 0.0, -2.0, 
-7.0]]]])+(1.-msk_ref)*numpy.array([[[[-21.0, -0.0, -18.0, -21.0], [-0.0, 18.0, -3.0, -9.0], [-21.0, 18.0, 15.0, -15.0]], [[3.0, 
--0.0, -12.0, 18.0], [-6.0, 18.0, 15.0, -0.0], [-15.0, -6.0, -3.0, -9.0]]], [[[-3.0, 15.0, -21.0, 6.0], [-12.0, 18.0, 15.0, 
--21.0], [9.0, 21.0, -15.0, -3.0]], [[9.0, -0.0, -0.0, 12.0], [-3.0, -0.0, 15.0, -6.0], [-18.0, 9.0, -21.0, 9.0]]], [[[-0.0, 
--6.0, 6.0, -6.0], [15.0, -9.0, -6.0, 6.0], [-9.0, -9.0, 12.0, 6.0]], [[9.0, 12.0, -15.0, 12.0], [-0.0, 18.0, 6.0, 21.0], [3.0, 
--3.0, -3.0, -6.0]]]])
+      ref=msk_ref*numpy.array([[[[-0.0, 6.0, 4.0, 1.0], [-5.0, -6.0, -0.0, 1.0], [-7.0, -7.0, 6.0, -0.0]], [[-3.0, 4.0, -2.0, 
+-5.0], [6.0, 1.0, -2.0, -3.0], [-1.0, 5.0, -4.0, -4.0]]], [[[5.0, -1.0, -1.0, 5.0], [7.0, -0.0, 7.0, -0.0], [4.0, 3.0, 1.0, 
+6.0]], [[-5.0, -6.0, 7.0, -6.0], [6.0, 3.0, 3.0, -7.0], [5.0, -1.0, 1.0, 5.0]]], [[[-2.0, -0.0, -1.0, -4.0], [-6.0, 6.0, -6.0, 
+7.0], [-0.0, -1.0, -4.0, 4.0]], [[7.0, 7.0, -5.0, 2.0], [-0.0, -4.0, -4.0, -4.0], [3.0, -4.0, -6.0, 
+7.0]]]])+(1.-msk_ref)*numpy.array([[[[-12.0, 0.0, 42.0, -30.0], [-18.0, 36.0, 30.0, 30.0], [36.0, -24.0, 0.0, -36.0]], [[-6.0, 
+42.0, -24.0, 42.0], [-24.0, 42.0, -42.0, 24.0], [36.0, 6.0, -6.0, 36.0]]], [[[-30.0, 18.0, 42.0, 42.0], [-30.0, -24.0, -42.0, 
+-36.0], [-6.0, -30.0, -42.0, 6.0]], [[-6.0, -24.0, 18.0, -36.0], [36.0, 18.0, 0.0, -6.0], [12.0, -30.0, -36.0, 18.0]]], 
+[[[18.0, 0.0, -6.0, 30.0], [18.0, 42.0, 30.0, 18.0], [-42.0, -36.0, 30.0, -12.0]], [[6.0, 0.0, -36.0, 0.0], [-36.0, -6.0, 0.0, 
+0.0], [18.0, -30.0, -42.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([5.0, 2.0])+(1.-msk_arg0)*numpy.array([1.0, 5.0])
+   def test_generalTensorTransposedProduct_taggedData_rank1_float_rank0_offset0(self):
+      arg0=Data(numpy.array([6.0, 7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, -6.0]))
       arg1=3.0
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([15.0, 6.0])+(1.-msk_ref)*numpy.array([3.0, 15.0])
+      ref=Data(numpy.array([18.0, 21.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-18.0, -18.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank0_offset0(self):
+      arg0=Data(numpy.array([-4.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, -3.0]))
+      arg1=numpy.array(0.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([-0.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-0.0, -0.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[-3.0, 4.0, 0.0], [3.0, -7.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, 0.0, -7.0], [-7.0, -6.0, -4.0]]))
+      arg1=numpy.array([-6.0, -2.0, 7.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([10.0, -25.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-7.0, 26.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[5.0, -2.0, 5.0], [-7.0, 2.0, -5.0]], [[1.0, 3.0, 7.0], [0.0, -1.0, -2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, -4.0, -7.0], [5.0, -6.0, 2.0]], [[-5.0, -1.0, -4.0], [3.0, -1.0, -4.0]]]))
+      arg1=numpy.array([[0.0, 4.0, 0.0], [3.0, 3.0, -2.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([-13.0, 13.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-23.0, 10.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-4.0, 5.0, -5.0], [-4.0, -4.0, 7.0], [-2.0, 0.0, 2.0], [0.0, 0.0, 4.0]], [[5.0, 1.0, -3.0], 
+[-4.0, -4.0, -5.0], [-3.0, 1.0, 3.0], [5.0, -3.0, -1.0]]], [[[5.0, -5.0, -7.0], [-6.0, 1.0, -5.0], [0.0, 6.0, 0.0], [0.0, -4.0, 
+1.0]], [[-3.0, 4.0, -3.0], [1.0, -4.0, -6.0], [-6.0, -2.0, 6.0], [-6.0, 6.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, -4.0, -1.0], [3.0, 0.0, 5.0], [-2.0, -4.0, 0.0], [-3.0, -2.0, -4.0]], [[-4.0, 
+3.0, -3.0], [-2.0, 4.0, 3.0], [0.0, -3.0, -1.0], [-6.0, -2.0, -3.0]]], [[[-5.0, 6.0, -5.0], [4.0, -5.0, -6.0], [5.0, 3.0, 
+-7.0], [-7.0, 5.0, -4.0]], [[2.0, 1.0, 2.0], [-7.0, -5.0, -5.0], [-1.0, 2.0, 6.0], [1.0, 5.0, -4.0]]]]))
+      arg1=numpy.array([[[-5.0, -4.0, -3.0], [-3.0, 0.0, 1.0], [-2.0, -4.0, -7.0], [0.0, 2.0, 2.0]], [[-5.0, 4.0, -3.0], [3.0, 
+4.0, -3.0], [0.0, 4.0, -5.0], [4.0, 2.0, 6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([4.0, 24.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-8.0, -43.0]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank1_offset0(self):
+      arg0=Data(numpy.array([-4.0, -4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, 1.0]))
+      arg1=numpy.array([-5.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[20.0, 0.0], [20.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[30.0, 0.0], [-5.0, 0.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[1.0, -1.0, 0.0], [-6.0, 4.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, -1.0, -6.0], [-4.0, -4.0, -6.0]]))
+      arg1=numpy.array([[0.0, -6.0, -1.0], [-6.0, -6.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[6.0, 0.0], [-21.0, 12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[12.0, 12.0], [30.0, 48.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[2.0, -4.0, 6.0], [0.0, 5.0, 7.0]], [[-1.0, -6.0, 2.0], [6.0, 1.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, -3.0, 3.0], [-5.0, 0.0, -2.0]], [[-5.0, 0.0, -5.0], [-4.0, 7.0, -3.0]]]))
+      arg1=numpy.array([[[6.0, -1.0, 4.0], [7.0, -6.0, 0.0]], [[7.0, 2.0, 5.0], [-2.0, -1.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[10.0, 45.0], [44.0, -10.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-26.0, 8.0], [-120.0, -65.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-4.0, 0.0, -1.0], [-6.0, 0.0, 7.0], [0.0, 3.0, -4.0], [0.0, 3.0, -4.0]], [[-5.0, 1.0, 4.0], 
+[-2.0, -7.0, -4.0], [1.0, 0.0, 0.0], [3.0, 3.0, 7.0]]], [[[7.0, -5.0, -2.0], [0.0, 4.0, -5.0], [0.0, 2.0, -1.0], [4.0, 2.0, 
+7.0]], [[5.0, 2.0, -1.0], [2.0, 2.0, -7.0], [-7.0, 0.0, 5.0], [-4.0, -7.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 3.0, 3.0], [-1.0, 7.0, -6.0], [1.0, -1.0, 3.0], [-2.0, 6.0, -5.0]], [[-1.0, 
+-4.0, 0.0], [5.0, 5.0, -1.0], [7.0, -4.0, 0.0], [0.0, -2.0, 3.0]]], [[[6.0, -6.0, -7.0], [-5.0, 1.0, -7.0], [7.0, 4.0, 1.0], 
+[-2.0, -6.0, 2.0]], [[-7.0, -3.0, 2.0], [-7.0, -4.0, -5.0], [-3.0, -2.0, -4.0], [1.0, -7.0, -1.0]]]]))
+      arg1=numpy.array([[[[-5.0, -1.0, 5.0], [-1.0, 0.0, -3.0], [0.0, 0.0, 2.0], [-4.0, 5.0, -4.0]], [[2.0, 4.0, -7.0], [-1.0, 
+-3.0, -6.0], [-3.0, 6.0, 0.0], [-7.0, 5.0, -2.0]]], [[[5.0, 0.0, 0.0], [-6.0, 4.0, -3.0], [-4.0, 3.0, -1.0], [2.0, -6.0, 6.0]], 
+[[-5.0, 5.0, 7.0], [-5.0, -4.0, 4.0], [6.0, 0.0, 4.0], [4.0, 2.0, 4.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      ref=Data(numpy.array([[13.0, 98.0], [24.0, -33.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[7.0, -47.0], [-95.0, 129.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank2_offset0(self):
+      arg0=Data(numpy.array([-6.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 7.0]))
+      arg1=numpy.array([[-1.0, -6.0, -6.0, -7.0, 4.0], [-6.0, -3.0, -6.0, -5.0, 3.0], [-5.0, -2.0, -6.0, 5.0, 2.0], [5.0, 0.0, 
+4.0, -7.0, 0.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[6.0, 36.0, 36.0, 42.0, -24.0], [36.0, 18.0, 36.0, 30.0, -18.0], [30.0, 12.0, 36.0, -30.0, -12.0], 
+[-30.0, 0.0, -24.0, 42.0, 0.0]], [[3.0, 18.0, 18.0, 21.0, -12.0], [18.0, 9.0, 18.0, 15.0, -9.0], [15.0, 6.0, 18.0, -15.0, 
+-6.0], [-15.0, 0.0, -12.0, 21.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[-7.0, -42.0, -42.0, -49.0, 28.0], [-42.0, -21.0, -42.0, -35.0, 21.0], [-35.0, -14.0, -42.0, 35.0, 
+14.0], [35.0, 0.0, 28.0, -49.0, 0.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[0.0, -7.0, -4.0], [1.0, -7.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, -7.0, 0.0], [6.0, 0.0, -7.0]]))
+      arg1=numpy.array([[[1.0, 0.0, -7.0], [-4.0, -4.0, 0.0], [4.0, -1.0, 5.0], [-6.0, 2.0, 2.0], [3.0, 6.0, 1.0]], [[-4.0, 
+2.0, -5.0], [6.0, 7.0, 5.0], [1.0, -5.0, -3.0], [-7.0, -1.0, -7.0], [1.0, 4.0, -5.0]], [[2.0, 5.0, 2.0], [-3.0, -4.0, -4.0], 
+[5.0, 0.0, -1.0], [5.0, 7.0, -3.0], [3.0, 3.0, 5.0]], [[6.0, 4.0, 4.0], [-4.0, 1.0, 6.0], [5.0, -4.0, 5.0], [0.0, 1.0, -3.0], 
+[-7.0, 0.0, 2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[28.0, 28.0, -13.0, -22.0, -46.0], [6.0, -69.0, 47.0, 35.0, -8.0], [-43.0, 44.0, 4.0, -37.0, 
+-41.0], [-44.0, -31.0, 8.0, 5.0, -8.0]], [[-48.0, 24.0, 46.0, -6.0, -32.0], [-53.0, -8.0, 15.0, -49.0, -62.0], [-19.0, -3.0, 
+-2.0, -65.0, 17.0], [6.0, 31.0, 68.0, -28.0, 7.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[4.0, 12.0, 23.0, -38.0, -30.0], [-30.0, -25.0, 39.0, -21.0, -24.0], [-27.0, 16.0, 
+20.0, -29.0, -9.0], [-4.0, -23.0, 48.0, -7.0, -28.0]], [[55.0, -24.0, -11.0, -50.0, 11.0], [11.0, 1.0, 27.0, 7.0, 41.0], [-2.0, 
+10.0, 37.0, 51.0, -17.0], [8.0, -66.0, -5.0, 21.0, -56.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[-7.0, -1.0, 1.0], [-5.0, -6.0, -3.0]], [[0.0, -1.0, 3.0], [4.0, 4.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, -6.0, 6.0], [0.0, 2.0, 2.0]], [[-6.0, 4.0, -7.0], [-4.0, -3.0, -5.0]]]))
+      arg1=numpy.array([[[[2.0, 1.0, -6.0], [-5.0, 6.0, -4.0]], [[1.0, -5.0, 1.0], [-6.0, 4.0, -5.0]], [[-7.0, 1.0, 1.0], 
+[-7.0, 2.0, 7.0]], [[6.0, 0.0, 0.0], [7.0, 2.0, 0.0]], [[1.0, -4.0, 1.0], [-4.0, -7.0, -2.0]]], [[[4.0, 7.0, 1.0], [4.0, 1.0, 
+1.0]], [[3.0, -5.0, 5.0], [-1.0, 6.0, 2.0]], [[-4.0, -4.0, -5.0], [-3.0, -6.0, -3.0]], [[-2.0, -5.0, -4.0], [5.0, 2.0, -4.0]], 
+[[-4.0, -2.0, -5.0], [-2.0, 0.0, 0.0]]], [[[-5.0, 6.0, -3.0], [-5.0, -3.0, 1.0]], [[1.0, 0.0, -3.0], [0.0, -6.0, 0.0]], [[2.0, 
+-3.0, 1.0], [7.0, -3.0, 3.0]], [[-1.0, 7.0, 5.0], [-2.0, -5.0, -5.0]], [[-6.0, -1.0, -1.0], [4.0, -4.0, 2.0]]], [[[3.0, 4.0, 
+-1.0], [5.0, 3.0, -4.0]], [[1.0, -1.0, 3.0], [5.0, 2.0, -1.0]], [[-5.0, 4.0, -3.0], [-5.0, 6.0, -4.0]], [[-7.0, 6.0, 0.0], 
+[0.0, 7.0, 6.0]], [[-5.0, 2.0, -1.0], [-2.0, 3.0, -6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-20.0, 20.0, 51.0, -89.0, 66.0], [-63.0, -48.0, 87.0, -10.0, 35.0], [66.0, 26.0, -36.0, 60.0, 
+40.0], [-57.0, -37.0, 29.0, -17.0, 42.0]], [[-31.0, -20.0, 10.0, 36.0, -45.0], [20.0, 48.0, -59.0, 5.0, -21.0], [-43.0, -33.0, 
+34.0, -40.0, 6.0], [9.0, 34.0, -25.0, 46.0, -25.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-48.0, 29.0, 53.0, -26.0, 7.0], [-52.0, 61.0, -4.0, 12.0, 2.0], [-33.0, -35.0, 14.0, 
+-27.0, 26.0], [-47.0, 21.0, -13.0, 25.0, 1.0]], [[56.0, 4.0, 26.0, -70.0, 18.0], [-27.0, -97.0, 88.0, 14.0, 59.0], [99.0, 33.0, 
+-65.0, 47.0, 25.0], [-4.0, -52.0, 89.0, 15.0, 74.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_array_rank3_offset0(self):
+      arg0=Data(numpy.array([3.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-7.0, 0.0]))
+      arg1=numpy.array([[[-5.0, -2.0], [7.0, -1.0]], [[-4.0, -4.0], [-7.0, 3.0]], [[2.0, 4.0], [5.0, -7.0]], [[4.0, 1.0], [4.0, 
+-4.0]], [[6.0, -4.0], [-3.0, -2.0]], [[7.0, -4.0], [0.0, 0.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-15.0, -6.0], [21.0, -3.0]], [[-12.0, -12.0], [-21.0, 9.0]], [[6.0, 12.0], [15.0, -21.0]], 
+[[12.0, 3.0], [12.0, -12.0]], [[18.0, -12.0], [-9.0, -6.0]], [[21.0, -12.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[35.0, 14.0], [-49.0, 7.0]], [[28.0, 28.0], [49.0, -21.0]], [[-14.0, -28.0], [-35.0, 
+49.0]], [[-28.0, -7.0], [-28.0, 28.0]], [[-42.0, 28.0], [21.0, 14.0]], [[-49.0, 28.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 0.0]], 
+[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, -7.0])+(1.-msk_arg0)*numpy.array([6.0, -7.0])
-      arg1=numpy.array(2.0)
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank4_offset1(self):
+      arg0=Data(numpy.array([[-2.0, 7.0, 4.0], [1.0, 0.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 0.0, 3.0], [3.0, -7.0, -6.0]]))
+      arg1=numpy.array([[[[-6.0, -1.0, -4.0], [6.0, 1.0, 1.0]], [[6.0, -4.0, -5.0], [0.0, 1.0, -7.0]]], [[[3.0, 3.0, 6.0], 
+[5.0, 5.0, 0.0]], [[-4.0, 2.0, 0.0], [6.0, -4.0, 0.0]]], [[[0.0, -1.0, 0.0], [-3.0, -7.0, 7.0]], [[0.0, -1.0, 0.0], [4.0, 1.0, 
+0.0]]], [[[-7.0, -3.0, -1.0], [2.0, 2.0, 1.0]], [[-1.0, -4.0, -6.0], [6.0, -2.0, -1.0]]], [[[-4.0, 6.0, 5.0], [6.0, 0.0, 
+-3.0]], [[4.0, 2.0, -6.0], [0.0, 4.0, 7.0]]], [[[-5.0, -5.0, 5.0], [1.0, 2.0, 3.0]], [[1.0, 6.0, -6.0], [-4.0, 7.0, 0.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-11.0, -1.0], [-60.0, -21.0]], [[39.0, 25.0], [22.0, -40.0]], [[-7.0, -15.0], [-7.0, -1.0]], 
+[[-11.0, 14.0], [-50.0, -30.0]], [[70.0, -24.0], [-18.0, 56.0]], [[-5.0, 24.0], [16.0, 57.0]]], [[[22.0, -1.0], [41.0, 49.0]], 
+[[-39.0, 5.0], [-4.0, 6.0]], [[0.0, -52.0], [0.0, 4.0]], [[0.0, -5.0], [41.0, 13.0]], [[-39.0, 27.0], [46.0, -49.0]], [[-40.0, 
+-20.0], [43.0, -4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-48.0, 39.0], [21.0, -21.0]], [[36.0, 30.0], [-24.0, 36.0]], [[0.0, 3.0], [0.0, 
+24.0]], [[-45.0, 15.0], [-24.0, 33.0]], [[-9.0, 27.0], [6.0, 21.0]], [[-15.0, 15.0], [-12.0, -24.0]]], [[[13.0, 5.0], [76.0, 
+35.0]], [[-48.0, -20.0], [-26.0, 46.0]], [[7.0, -2.0], [7.0, 5.0]], [[6.0, -14.0], [61.0, 38.0]], [[-84.0, 36.0], [34.0, 
+-70.0]], [[-10.0, -29.0], [-3.0, -61.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([5.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 2.0]))
+      arg1=Data(0.0,self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-10.0, -14.0])+(1.-msk_ref)*numpy.array([12.0, -14.0])
+      ref=Data(numpy.array([0.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-0.0, 0.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-5.0, -6.0, -6.0], [1.0, -5.0, 0.0]])+(1.-msk_arg0)*numpy.array([[4.0, 6.0, -6.0], [-6.0, 
--5.0, 6.0]])
-      arg1=numpy.array([-2.0, -1.0, 1.0])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[7.0, -7.0, 4.0], [-5.0, 7.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, -5.0, -2.0], [0.0, 1.0, -7.0]]))
+      arg1=Data(numpy.array([5.0, -3.0, 0.0]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([10.0, 3.0])+(1.-msk_ref)*numpy.array([-20.0, 23.0])
+      ref=Data(numpy.array([56.0, -46.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([20.0, -3.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, 3.0, 1.0], [3.0, 2.0, 4.0]], [[3.0, -1.0, -5.0], [-7.0, 0.0, 
-6.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 5.0, -1.0], [-5.0, -6.0, -2.0]], [[-3.0, -3.0, 4.0], [5.0, 0.0, 3.0]]])
-      arg1=numpy.array([[1.0, -7.0, -7.0], [-5.0, 0.0, 1.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, -3.0, 4.0], [-4.0, 0.0, 5.0]], [[5.0, 0.0, 3.0], [7.0, -6.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, 0.0, 2.0], [7.0, 3.0, 3.0]], [[1.0, 0.0, -4.0], [-1.0, 2.0, 1.0]]]))
+      arg1=Data(numpy.array([[7.0, -1.0, 2.0], [6.0, -6.0, 2.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-35.0, 86.0])+(1.-msk_ref)*numpy.array([-5.0, -32.0])
+      ref=Data(numpy.array([-3.0, 125.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([83.0, -17.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-3.0, 0.0, 6.0], [7.0, 4.0, 3.0], [-2.0, 4.0, -4.0], [-3.0, -6.0, 7.0]], [[-2.0, 1.0, 
--4.0], [3.0, -5.0, -1.0], [-3.0, -3.0, 6.0], [0.0, 3.0, 4.0]]], [[[-3.0, -4.0, 2.0], [-7.0, -5.0, -6.0], [6.0, 2.0, 4.0], 
-[-7.0, 7.0, -1.0]], [[5.0, -6.0, 0.0], [0.0, -5.0, -4.0], [2.0, 0.0, 1.0], [-3.0, 7.0, 
-6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, 3.0, 4.0], [5.0, -3.0, 3.0], [-7.0, 4.0, -5.0], [-7.0, -6.0, 2.0]], [[-5.0, 6.0, 
-5.0], [4.0, 3.0, -3.0], [0.0, -3.0, -3.0], [7.0, -3.0, 1.0]]], [[[3.0, 0.0, 7.0], [-7.0, 4.0, 6.0], [0.0, 4.0, 2.0], [-5.0, 
--3.0, 0.0]], [[-6.0, -5.0, -6.0], [2.0, 6.0, 3.0], [0.0, -6.0, -3.0], [2.0, 2.0, 0.0]]]])
-      arg1=numpy.array([[[-2.0, 6.0, -2.0], [3.0, -7.0, 0.0], [-7.0, 4.0, 4.0], [0.0, -2.0, -5.0]], [[-4.0, 0.0, 3.0], [0.0, 
--7.0, 1.0], [7.0, -6.0, -5.0], [-1.0, 4.0, -1.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-4.0, 1.0, -7.0], [1.0, 5.0, 2.0], [4.0, -4.0, 7.0], [4.0, 4.0, 6.0]], [[-6.0, 2.0, 4.0], [5.0, 
+-2.0, -7.0], [-1.0, -5.0, -5.0], [2.0, -1.0, -5.0]]], [[[-4.0, 0.0, 1.0], [2.0, -1.0, 3.0], [5.0, -7.0, -1.0], [-7.0, 1.0, 
+4.0]], [[-4.0, -1.0, -6.0], [-3.0, -5.0, 4.0], [7.0, -3.0, 5.0], [-5.0, 7.0, -3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, -4.0, -6.0], [7.0, 5.0, -1.0], [-5.0, -6.0, -2.0], [-1.0, -2.0, -6.0]], 
+[[5.0, 0.0, -3.0], [3.0, 0.0, 7.0], [7.0, -7.0, 6.0], [0.0, -6.0, 1.0]]], [[[-2.0, 0.0, -5.0], [4.0, -6.0, -6.0], [3.0, -4.0, 
+-1.0], [0.0, 3.0, 6.0]], [[1.0, -1.0, 7.0], [-5.0, 0.0, 0.0], [7.0, 1.0, 0.0], [0.0, 3.0, 4.0]]]]))
+      arg1=Data(numpy.array([[[-7.0, 0.0, -5.0], [-4.0, 1.0, -7.0], [0.0, 2.0, 2.0], [5.0, -3.0, -6.0]], [[-3.0, 4.0, -6.0], 
+[-2.0, -3.0, 3.0], [0.0, -6.0, -4.0], [0.0, 5.0, -1.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-17.0, 10.0])+(1.-msk_ref)*numpy.array([129.0, -15.0])
+      ref=Data(numpy.array([55.0, 28.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([54.0, -30.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-7.0, -2.0])+(1.-msk_arg0)*numpy.array([7.0, 4.0])
-      arg1=numpy.array([-1.0, 1.0])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([4.0, -6.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-4.0, 0.0]))
+      arg1=Data(numpy.array([-3.0, -2.0]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[7.0, -7.0], [2.0, -2.0]])+(1.-msk_ref)*numpy.array([[-7.0, 7.0], [-4.0, 4.0]])
+      ref=Data(numpy.array([[-12.0, -8.0], [18.0, 12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[12.0, 8.0], [0.0, 0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[7.0, -5.0, -2.0], [-1.0, 0.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-7.0, 0.0, -4.0], [-7.0, 
--4.0, 6.0]])
-      arg1=numpy.array([[-3.0, -3.0, 1.0], [6.0, 2.0, 6.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[5.0, 0.0, 3.0], [2.0, 7.0, -4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, -3.0, 3.0], [4.0, 3.0, -3.0]]))
+      arg1=Data(numpy.array([[-7.0, 5.0, 0.0], [0.0, -4.0, -4.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-8.0, 20.0], [3.0, -6.0]])+(1.-msk_ref)*numpy.array([[17.0, -66.0], [39.0, -14.0]])
+      ref=Data(numpy.array([[-35.0, -12.0], [21.0, -12.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-29.0, 0.0], [-13.0, 0.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 6.0, 0.0], [1.0, -4.0, -2.0]], [[-4.0, 6.0, -6.0], [5.0, 0.0, 
-5.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 5.0, 3.0], [0.0, -5.0, 5.0]], [[1.0, -5.0, 4.0], [-4.0, 7.0, -5.0]]])
-      arg1=numpy.array([[[4.0, -5.0, -3.0], [-5.0, -3.0, 6.0]], [[3.0, 7.0, -1.0], [0.0, -3.0, 0.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-1.0, 5.0, -6.0], [-3.0, 4.0, -6.0]], [[1.0, 5.0, -7.0], [-3.0, 3.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 6.0, -7.0], [4.0, 0.0, 2.0]], [[-1.0, -4.0, 0.0], [1.0, -4.0, -6.0]]]))
+      arg1=Data(numpy.array([[[7.0, 4.0, -7.0], [-6.0, 2.0, 7.0]], [[6.0, 2.0, -3.0], [5.0, 1.0, -4.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-55.0, 39.0], [-23.0, 36.0]])+(1.-msk_ref)*numpy.array([[-17.0, 26.0], [-14.0, -57.0]])
+      ref=Data(numpy.array([[39.0, 35.0], [93.0, 29.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[63.0, 45.0], [-79.0, 11.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, -3.0, -2.0], [-3.0, 2.0, -7.0], [0.0, 2.0, 6.0], [-2.0, 2.0, -1.0]], [[-7.0, -4.0, 
-3.0], [0.0, -3.0, -1.0], [-1.0, 5.0, 0.0], [-4.0, 6.0, -1.0]]], [[[2.0, 0.0, 6.0], [5.0, 3.0, -1.0], [-6.0, 5.0, -1.0], [3.0, 
--2.0, -5.0]], [[-2.0, 0.0, -5.0], [-4.0, 6.0, 6.0], [-5.0, 1.0, -5.0], [0.0, 6.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[4.0, 
-7.0, 0.0], [0.0, -4.0, 5.0], [-7.0, -2.0, 0.0], [2.0, 4.0, 2.0]], [[5.0, -5.0, -2.0], [1.0, -7.0, -7.0], [-1.0, -7.0, 7.0], 
-[-3.0, 0.0, -6.0]]], [[[-7.0, -4.0, 1.0], [0.0, -6.0, -6.0], [0.0, 2.0, 6.0], [5.0, -2.0, -2.0]], [[5.0, -4.0, -1.0], [-3.0, 
--3.0, 0.0], [0.0, 1.0, 2.0], [1.0, 5.0, -4.0]]]])
-      arg1=numpy.array([[[[-3.0, 0.0, 1.0], [-7.0, 0.0, 0.0], [5.0, 3.0, -4.0], [7.0, 2.0, 0.0]], [[3.0, -2.0, 5.0], [4.0, 7.0, 
-5.0], [0.0, 5.0, -5.0], [6.0, -1.0, -7.0]]], [[[7.0, -5.0, 4.0], [0.0, 6.0, 5.0], [3.0, 0.0, -7.0], [0.0, 0.0, 7.0]], [[-6.0, 
-5.0, 1.0], [-2.0, -4.0, -1.0], [-2.0, -7.0, -4.0], [-5.0, 0.0, -2.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[1.0, -5.0, 0.0], [-6.0, -4.0, -4.0], [-6.0, 2.0, 1.0], [0.0, 4.0, 0.0]], [[2.0, 7.0, -1.0], 
+[4.0, -2.0, 2.0], [4.0, -3.0, 4.0], [6.0, 1.0, -4.0]]], [[[-4.0, -2.0, 5.0], [2.0, -6.0, -3.0], [4.0, 7.0, -2.0], [-4.0, -1.0, 
+2.0]], [[-2.0, -5.0, 1.0], [-7.0, 0.0, -5.0], [-6.0, -6.0, -4.0], [3.0, 1.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 1.0, 5.0], [5.0, -7.0, 2.0], [-5.0, 5.0, -4.0], [-2.0, -4.0, 4.0]], [[-5.0, 
+7.0, -7.0], [-4.0, -1.0, -4.0], [0.0, 1.0, -6.0], [4.0, -2.0, -3.0]]], [[[-1.0, 0.0, -3.0], [-4.0, -1.0, 1.0], [1.0, 0.0, 4.0], 
+[-5.0, 4.0, -3.0]], [[-6.0, 6.0, -3.0], [-6.0, 3.0, -1.0], [-6.0, -6.0, 1.0], [4.0, -5.0, -4.0]]]]))
+      arg1=Data(numpy.array([[[[0.0, -4.0, -2.0], [-3.0, 0.0, 7.0], [2.0, 5.0, -6.0], [-7.0, 0.0, -6.0]], [[-4.0, 6.0, 5.0], 
+[1.0, 6.0, -5.0], [-4.0, -7.0, 2.0], [-7.0, -2.0, -7.0]]], [[[7.0, 6.0, -5.0], [4.0, 4.0, -1.0], [-6.0, 1.0, 3.0], [1.0, -6.0, 
+-7.0]], [[-7.0, -4.0, 4.0], [-6.0, -1.0, -5.0], [1.0, 0.0, 6.0], [-6.0, -6.0, 0.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-31.0, -38.0], [-29.0, -1.0]])+(1.-msk_ref)*numpy.array([[-142.0, 13.0], [44.0, -192.0]])
+      ref=Data(numpy.array([[10.0, -134.0], [85.0, -62.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[29.0, -85.0], [196.0, 35.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-4.0, -6.0])+(1.-msk_arg0)*numpy.array([5.0, 0.0])
-      arg1=numpy.array([[4.0, -5.0, 5.0, -3.0, 0.0], [0.0, -5.0, 3.0, -3.0, -4.0], [4.0, -6.0, -6.0, 7.0, 1.0], [-6.0, 1.0, 
-7.0, 4.0, -6.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([6.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, 0.0]))
+      arg1=Data(numpy.array([[0.0, -7.0, 5.0, -3.0, 5.0], [-2.0, 5.0, -6.0, -7.0, 7.0], [7.0, -2.0, -1.0, 3.0, 6.0], [7.0, 
+-1.0, 1.0, 0.0, -1.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-16.0, 20.0, -20.0, 12.0, 0.0], [0.0, 20.0, -12.0, 12.0, 16.0], [-16.0, 24.0, 24.0, -28.0, 
--4.0], [24.0, -4.0, -28.0, -16.0, 24.0]], [[-24.0, 30.0, -30.0, 18.0, 0.0], [0.0, 30.0, -18.0, 18.0, 24.0], [-24.0, 36.0, 36.0, 
--42.0, -6.0], [36.0, -6.0, -42.0, -24.0, 36.0]]])+(1.-msk_ref)*numpy.array([[[20.0, -25.0, 25.0, -15.0, 0.0], [0.0, -25.0, 
-15.0, -15.0, -20.0], [20.0, -30.0, -30.0, 35.0, 5.0], [-30.0, 5.0, 35.0, 20.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]])
+      ref=Data(numpy.array([[[0.0, -42.0, 30.0, -18.0, 30.0], [-12.0, 30.0, -36.0, -42.0, 42.0], [42.0, -12.0, -6.0, 18.0, 
+36.0], [42.0, -6.0, 6.0, 0.0, -6.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, -28.0, 20.0, -12.0, 20.0], [-8.0, 20.0, -24.0, -28.0, 28.0], [28.0, -8.0, -4.0, 
+12.0, 24.0], [28.0, -4.0, 4.0, 0.0, -4.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 5.0, 5.0], [1.0, 6.0, -1.0]])+(1.-msk_arg0)*numpy.array([[2.0, 3.0, 5.0], [-4.0, -6.0, 
--2.0]])
-      arg1=numpy.array([[[1.0, 7.0, -7.0], [7.0, -4.0, 1.0], [5.0, -5.0, 2.0], [5.0, -5.0, -7.0], [5.0, -4.0, -4.0]], [[-6.0, 
--1.0, -4.0], [4.0, -5.0, 7.0], [0.0, 4.0, 2.0], [2.0, -2.0, -2.0], [6.0, 4.0, 3.0]], [[-7.0, -7.0, 2.0], [-4.0, -5.0, 0.0], 
-[-7.0, 0.0, -6.0], [-6.0, 0.0, 7.0], [3.0, -6.0, 7.0]], [[-1.0, 1.0, 7.0], [-2.0, -2.0, 1.0], [-4.0, -3.0, 3.0], [3.0, 3.0, 
-1.0], [3.0, -6.0, -7.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[0.0, 0.0, 4.0], [-1.0, -3.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 4.0, -4.0], [5.0, -3.0, 6.0]]))
+      arg1=Data(numpy.array([[[-7.0, 1.0, 3.0], [3.0, -1.0, 3.0], [2.0, -5.0, -7.0], [-3.0, 5.0, -4.0], [-6.0, 0.0, 1.0]], 
+[[7.0, 7.0, -4.0], [-3.0, 5.0, -6.0], [3.0, -6.0, 7.0], [2.0, -2.0, 2.0], [4.0, 0.0, 3.0]], [[0.0, -6.0, -5.0], [7.0, -3.0, 
+-3.0], [3.0, -4.0, 1.0], [0.0, 0.0, 4.0], [-2.0, 7.0, -7.0]], [[-2.0, 3.0, 3.0], [-4.0, -7.0, 2.0], [-3.0, -6.0, -6.0], [-7.0, 
+-5.0, 0.0], [2.0, 4.0, 4.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, -15.0, -15.0, -60.0, -40.0], [-25.0, 10.0, 30.0, -20.0, 35.0], [-25.0, -25.0, -30.0, 
-35.0, 5.0], [40.0, -5.0, 0.0, 20.0, -65.0]], [[50.0, -18.0, -27.0, -18.0, -15.0], [-8.0, -33.0, 22.0, -8.0, 27.0], [-51.0, 
--34.0, -1.0, -13.0, -40.0], [-2.0, -15.0, -25.0, 20.0, -26.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, 7.0, 5.0, -40.0, -22.0], 
-[-35.0, 28.0, 22.0, -12.0, 39.0], [-25.0, -23.0, -44.0, 23.0, 23.0], [36.0, -5.0, -2.0, 20.0, -47.0]], [[-32.0, -6.0, 6.0, 
-24.0, 12.0], [38.0, 0.0, -28.0, 8.0, -54.0], [66.0, 46.0, 40.0, 10.0, 10.0], [-16.0, 18.0, 28.0, -32.0, 38.0]]])
+      ref=Data(numpy.array([[[12.0, 12.0, -28.0, -16.0, 4.0], [-16.0, -24.0, 28.0, 8.0, 12.0], [-20.0, -12.0, 4.0, 16.0, 
+-28.0], [12.0, 8.0, -24.0, 0.0, 16.0]], [[-2.0, -6.0, 27.0, -4.0, 4.0], [-20.0, 0.0, 1.0, 0.0, -10.0], [28.0, 8.0, 7.0, -8.0, 
+-5.0], [-13.0, 21.0, 33.0, 22.0, -22.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-1.0, -19.0, 6.0, 39.0, 2.0], [37.0, 47.0, -55.0, -18.0, -16.0], [-4.0, -7.0, -23.0, 
+-16.0, 58.0], [2.0, -32.0, 3.0, -13.0, -2.0]], [[-20.0, 36.0, -17.0, -54.0, -24.0], [-10.0, -66.0, 75.0, 28.0, 38.0], [-12.0, 
+26.0, 33.0, 24.0, -73.0], [-1.0, 13.0, -33.0, -20.0, 22.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, 7.0, 0.0], [2.0, -6.0, 7.0]], [[0.0, 2.0, 1.0], [3.0, 5.0, 
-0.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 5.0, -6.0], [2.0, 4.0, 0.0]], [[-3.0, 0.0, -2.0], [7.0, 6.0, 2.0]]])
-      arg1=numpy.array([[[[-6.0, 0.0, -5.0], [2.0, -2.0, -2.0]], [[-2.0, 1.0, 5.0], [-1.0, 0.0, 4.0]], [[6.0, 7.0, -3.0], 
-[-1.0, -6.0, -4.0]], [[-7.0, 2.0, 1.0], [-6.0, -7.0, 2.0]], [[-2.0, 7.0, -3.0], [-4.0, 0.0, -6.0]]], [[[3.0, -3.0, -4.0], 
-[-3.0, 2.0, -6.0]], [[0.0, 7.0, -1.0], [-6.0, 0.0, 2.0]], [[-5.0, -5.0, 1.0], [3.0, -6.0, 6.0]], [[-2.0, 1.0, -5.0], [-6.0, 
--6.0, 1.0]], [[-5.0, 1.0, 0.0], [-5.0, 3.0, 5.0]]], [[[4.0, 2.0, -3.0], [1.0, 3.0, 6.0]], [[0.0, 7.0, 4.0], [0.0, 5.0, -3.0]], 
-[[-6.0, -5.0, 0.0], [4.0, 0.0, -2.0]], [[7.0, 1.0, 5.0], [6.0, 0.0, -6.0]], [[-6.0, 0.0, 6.0], [-2.0, 6.0, 1.0]]], [[[-7.0, 
-0.0, -2.0], [-5.0, -1.0, -4.0]], [[4.0, -5.0, -3.0], [5.0, -5.0, 0.0]], [[0.0, 4.0, 6.0], [2.0, 0.0, -4.0]], [[0.0, 7.0, -6.0], 
-[6.0, -7.0, -2.0]], [[-6.0, -1.0, 7.0], [4.0, 4.0, -1.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[6.0, -2.0, 4.0], [0.0, 4.0, -5.0]], [[-2.0, 0.0, -7.0], [-1.0, 7.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 6.0, 3.0], [7.0, -5.0, -7.0]], [[4.0, -5.0, 7.0], [-2.0, -5.0, 1.0]]]))
+      arg1=Data(numpy.array([[[[7.0, 0.0, 2.0], [3.0, 0.0, 5.0]], [[4.0, -3.0, 2.0], [-4.0, 6.0, -7.0]], [[3.0, 3.0, 1.0], 
+[4.0, -2.0, 3.0]], [[7.0, 3.0, -3.0], [-3.0, -6.0, 7.0]], [[-7.0, 5.0, -4.0], [7.0, -7.0, 7.0]]], [[[-6.0, 4.0, -7.0], [6.0, 
+7.0, -1.0]], [[-1.0, 0.0, 1.0], [7.0, -2.0, -6.0]], [[7.0, 0.0, 5.0], [-3.0, 6.0, -5.0]], [[-2.0, 7.0, -1.0], [-6.0, -4.0, 
+6.0]], [[-6.0, 5.0, 1.0], [5.0, 3.0, 3.0]]], [[[2.0, 0.0, 3.0], [5.0, -1.0, -6.0]], [[6.0, -4.0, 5.0], [4.0, -6.0, 6.0]], 
+[[4.0, 0.0, 4.0], [-6.0, -5.0, -3.0]], [[2.0, 6.0, 0.0], [-1.0, -6.0, -4.0]], [[4.0, -2.0, 0.0], [1.0, 6.0, -4.0]]], [[[7.0, 
+0.0, 1.0], [-6.0, -1.0, 1.0]], [[0.0, 1.0, 3.0], [-5.0, 4.0, 0.0]], [[-4.0, -6.0, -1.0], [-5.0, -6.0, 0.0]], [[6.0, 0.0, -1.0], 
+[0.0, 4.0, 3.0]], [[0.0, 2.0, 0.0], [4.0, 0.0, 1.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[44.0, 47.0, 13.0, 107.0, 13.0], [-102.0, 51.0, 84.0, 52.0, 49.0], [12.0, -2.0, 1.0, -72.0, 
-9.0], [17.0, -23.0, 4.0, 89.0, 12.0]], [[-9.0, 4.0, -22.0, -48.0, -1.0], [-9.0, -5.0, -30.0, -51.0, 2.0], [19.0, 43.0, 2.0, 
-25.0, 30.0], [-22.0, -23.0, 20.0, -9.0, 37.0]]])+(1.-msk_ref)*numpy.array([[[-16.0, -41.0, 69.0, -85.0, 31.0], [32.0, 29.0, 
--84.0, -15.0, -28.0], [70.0, 31.0, -59.0, 36.0, -58.0], [-51.0, 11.0, -12.0, 55.0, -65.0]], [[26.0, -3.0, -63.0, -61.0, -28.0], 
-[-22.0, -36.0, 10.0, -60.0, 8.0], [31.0, 16.0, 42.0, -1.0, 30.0], [-24.0, -1.0, -6.0, 8.0, 54.0]]])
+      ref=Data(numpy.array([[[25.0, 97.0, -7.0, -35.0, -131.0], [-39.0, 20.0, 111.0, -76.0, -45.0], [50.0, 10.0, 35.0, -4.0, 
+72.0], [37.0, 26.0, -40.0, 33.0, -9.0]], [[-66.0, 73.0, -52.0, -81.0, -63.0], [111.0, 16.0, 31.0, -53.0, 0.0], [5.0, -135.0, 
+-44.0, -17.0, 61.0], [-29.0, 12.0, -22.0, 2.0, -11.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-50.0, -45.0, 20.0, -73.0, 95.0], [53.0, 110.0, -43.0, -13.0, 68.0], [79.0, -29.0, 
+-8.0, 75.0, -31.0], [-83.0, -40.0, -20.0, -80.0, 33.0]], [[41.0, 16.0, 9.0, 35.0, -53.0], [-141.0, -7.0, 34.0, -12.0, -64.0], 
+[18.0, 107.0, 78.0, 6.0, -10.0], [53.0, 6.0, 47.0, 0.0, -17.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_array_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-5.0, 5.0])+(1.-msk_arg0)*numpy.array([-5.0, 7.0])
-      arg1=numpy.array([[[-2.0, 0.0], [7.0, 7.0]], [[6.0, 4.0], [0.0, -5.0]], [[0.0, -6.0], [-5.0, -3.0]], [[-1.0, 1.0], [4.0, 
-4.0]], [[5.0, -1.0], [5.0, -6.0]], [[-6.0, -7.0], [-5.0, -2.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_constData_rank3_offset0(self):
+      arg0=Data(numpy.array([-6.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -2.0]))
+      arg1=Data(numpy.array([[[0.0, -6.0], [0.0, 5.0]], [[5.0, -1.0], [-3.0, -6.0]], [[7.0, 4.0], [-7.0, 5.0]], [[2.0, -2.0], 
+[2.0, -1.0]], [[6.0, 0.0], [-2.0, 3.0]], [[-6.0, 4.0], [-5.0, -2.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 0.0], [-35.0, -35.0]], [[-30.0, -20.0], [0.0, 25.0]], [[0.0, 30.0], [25.0, 15.0]], 
-[[5.0, -5.0], [-20.0, -20.0]], [[-25.0, 5.0], [-25.0, 30.0]], [[30.0, 35.0], [25.0, 10.0]]], [[[-10.0, 0.0], [35.0, 35.0]], 
-[[30.0, 20.0], [0.0, -25.0]], [[0.0, -30.0], [-25.0, -15.0]], [[-5.0, 5.0], [20.0, 20.0]], [[25.0, -5.0], [25.0, -30.0]], 
-[[-30.0, -35.0], [-25.0, -10.0]]]])+(1.-msk_ref)*numpy.array([[[[10.0, 0.0], [-35.0, -35.0]], [[-30.0, -20.0], [0.0, 25.0]], 
-[[0.0, 30.0], [25.0, 15.0]], [[5.0, -5.0], [-20.0, -20.0]], [[-25.0, 5.0], [-25.0, 30.0]], [[30.0, 35.0], [25.0, 10.0]]], 
-[[[-14.0, 0.0], [49.0, 49.0]], [[42.0, 28.0], [0.0, -35.0]], [[0.0, -42.0], [-35.0, -21.0]], [[-7.0, 7.0], [28.0, 28.0]], 
-[[35.0, -7.0], [35.0, -42.0]], [[-42.0, -49.0], [-35.0, -14.0]]]])
+      ref=Data(numpy.array([[[[0.0, 36.0], [0.0, -30.0]], [[-30.0, 6.0], [18.0, 36.0]], [[-42.0, -24.0], [42.0, -30.0]], 
+[[-12.0, 12.0], [-12.0, 6.0]], [[-36.0, 0.0], [12.0, -18.0]], [[36.0, -24.0], [30.0, 12.0]]], [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, -6.0], [0.0, 5.0]], [[5.0, -1.0], [-3.0, -6.0]], [[7.0, 4.0], [-7.0, 5.0]], 
+[[2.0, -2.0], [2.0, -1.0]], [[6.0, 0.0], [-2.0, 3.0]], [[-6.0, 4.0], [-5.0, -2.0]]], [[[0.0, 12.0], [0.0, -10.0]], [[-10.0, 
+2.0], [6.0, 12.0]], [[-14.0, -8.0], [14.0, -10.0]], [[-4.0, 4.0], [-4.0, 2.0]], [[-12.0, 0.0], [4.0, -6.0]], [[12.0, -8.0], 
+[10.0, 4.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[2.0, 6.0, -7.0], [0.0, 4.0, 3.0]])+(1.-msk_arg0)*numpy.array([[-3.0, -2.0, 7.0], [7.0, 3.0, 
--1.0]])
-      arg1=numpy.array([[[[-5.0, -2.0, -6.0], [3.0, 6.0, -4.0]], [[0.0, -2.0, 5.0], [-5.0, -6.0, -5.0]]], [[[5.0, 1.0, -3.0], 
-[7.0, 2.0, 2.0]], [[-2.0, 4.0, 0.0], [-6.0, 2.0, 2.0]]], [[[5.0, -2.0, 0.0], [-1.0, 1.0, -7.0]], [[-3.0, -7.0, 6.0], [-4.0, 
--7.0, 7.0]]], [[[0.0, -4.0, 4.0], [-3.0, 1.0, -4.0]], [[4.0, -1.0, -4.0], [-6.0, 0.0, 1.0]]], [[[-4.0, 1.0, 7.0], [6.0, -5.0, 
--3.0]], [[-7.0, 0.0, 0.0], [0.0, -3.0, -1.0]]], [[[3.0, -4.0, 2.0], [3.0, -5.0, 4.0]], [[3.0, 0.0, 2.0], [-1.0, 7.0, -4.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank4_offset1(self):
+      arg0=Data(numpy.array([[7.0, 4.0, 3.0], [-2.0, -1.0, -7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, 4.0, -2.0], [5.0, -3.0, -1.0]]))
+      arg1=Data(numpy.array([[[[-5.0, 0.0, -2.0], [4.0, 6.0, -1.0]], [[0.0, 1.0, -5.0], [1.0, -4.0, 3.0]]], [[[2.0, -5.0, 0.0], 
+[2.0, 6.0, -7.0]], [[3.0, -7.0, 5.0], [-6.0, 4.0, 3.0]]], [[[5.0, 7.0, -1.0], [7.0, 5.0, 6.0]], [[-4.0, -4.0, -1.0], [-6.0, 
+-4.0, 7.0]]], [[[6.0, -1.0, -6.0], [-2.0, -4.0, 3.0]], [[4.0, 2.0, -7.0], [5.0, -1.0, -4.0]]], [[[3.0, -7.0, -5.0], [-3.0, 0.0, 
+-2.0]], [[5.0, -3.0, -4.0], [0.0, 2.0, 7.0]]], [[[-1.0, 2.0, 1.0], [-5.0, 0.0, 5.0]], [[-5.0, 5.0, 4.0], [-4.0, 2.0, 
+5.0]]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[20.0, 70.0], [-47.0, -11.0]], [[37.0, 12.0], [20.0, -14.0]], [[-2.0, 53.0], [-90.0, -99.0]], 
-[[-52.0, 28.0], [30.0, -19.0]], [[-51.0, 3.0], [-14.0, -11.0]], [[-32.0, -52.0], [-8.0, 68.0]]], [[[-26.0, 12.0], [7.0, 
--39.0]], [[-5.0, 14.0], [16.0, 14.0]], [[-8.0, -17.0], [-10.0, -7.0]], [[-4.0, -8.0], [-16.0, 3.0]], [[25.0, -29.0], [0.0, 
--15.0]], [[-10.0, -8.0], [6.0, 16.0]]]])+(1.-msk_ref)*numpy.array([[[[-23.0, -49.0], [39.0, -8.0]], [[-38.0, -11.0], [-2.0, 
-28.0]], [[-11.0, -48.0], [65.0, 75.0]], [[36.0, -21.0], [-38.0, 25.0]], [[59.0, -29.0], [21.0, -1.0]], [[13.0, 29.0], [5.0, 
--39.0]]], [[[-35.0, 43.0], [-11.0, -48.0]], [[41.0, 53.0], [-2.0, -38.0]], [[29.0, 3.0], [-48.0, -56.0]], [[-16.0, -14.0], 
-[29.0, -43.0]], [[-32.0, 30.0], [-49.0, -8.0]], [[7.0, 2.0], [19.0, 18.0]]]])
+      ref=Data(numpy.array([[[[-41.0, 49.0], [-11.0, 0.0]], [[-6.0, 17.0], [8.0, -17.0]], [[60.0, 87.0], [-47.0, -37.0]], 
+[[20.0, -21.0], [15.0, 19.0]], [[-22.0, -27.0], [11.0, 29.0]], [[4.0, -20.0], [-3.0, -5.0]]], [[[24.0, -7.0], [34.0, -19.0]], 
+[[1.0, 39.0], [-34.0, -13.0]], [[-10.0, -61.0], [19.0, -33.0]], [[31.0, -13.0], [39.0, 19.0]], [[36.0, 20.0], [21.0, -51.0]], 
+[[-7.0, -25.0], [-23.0, -29.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[39.0, -2.0], [14.0, -29.0]], [[-34.0, 24.0], [-59.0, 52.0]], [[-5.0, -41.0], [14.0, 
+12.0]], [[-34.0, -8.0], [-6.0, -31.0]], [[-39.0, 25.0], [-39.0, -6.0]], [[13.0, 25.0], [47.0, 26.0]]], [[[-23.0, 3.0], [2.0, 
+14.0]], [[25.0, -1.0], [31.0, -45.0]], [[5.0, 14.0], [-7.0, -25.0]], [[39.0, -1.0], [21.0, 32.0]], [[41.0, -13.0], [38.0, 
+-13.0]], [[-12.0, -30.0], [-44.0, -31.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([0.0, 2.0])+(1.-msk_arg0)*numpy.array([3.0, 1.0])
-      arg1=Data(-7.0,self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([0.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-6.0, 7.0]))
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,2.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-0.0, -14.0])+(1.-msk_ref)*numpy.array([-21.0, -7.0])
+      ref=Data(numpy.array([0.0, -0.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-12.0, 14.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, 2.0, 7.0], [5.0, -7.0, 0.0]])+(1.-msk_arg0)*numpy.array([[3.0, -5.0, 4.0], [-2.0, -5.0, 
--6.0]])
-      arg1=Data(numpy.array([-2.0, -7.0, 0.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[-1.0, -3.0, -6.0], [-7.0, 7.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 7.0, -2.0], [3.0, -4.0, 0.0]]))
+      arg1=Data(numpy.array([4.0, -4.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, -2.0, -5.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-6.0, 39.0])+(1.-msk_ref)*numpy.array([29.0, 39.0])
+      ref=Data(numpy.array([-4.0, -68.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([32.0, 26.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, 4.0, 6.0], [0.0, -7.0, 4.0]], [[-3.0, 1.0, -3.0], [1.0, 4.0, 
--1.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 7.0, -3.0], [-1.0, 6.0, -4.0]], [[-3.0, 0.0, -1.0], [3.0, 2.0, 1.0]]])
-      arg1=Data(numpy.array([[-2.0, 1.0, 1.0], [-4.0, -6.0, -4.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[-2.0, 0.0, -2.0], [-1.0, 1.0, -3.0]], [[-6.0, -3.0, 5.0], [0.0, 2.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, 0.0, 7.0], [2.0, 1.0, -4.0]], [[0.0, 1.0, 6.0], [-7.0, 5.0, 7.0]]]))
+      arg1=Data(numpy.array([[-3.0, -2.0, 1.0], [-3.0, -3.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, -6.0, 3.0], [0.0, 6.0, -1.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([32.0, -20.0])+(1.-msk_ref)*numpy.array([-4.0, -23.0])
+      ref=Data(numpy.array([10.0, 31.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([1.0, 35.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, 7.0, -2.0], [6.0, 3.0, 5.0], [7.0, 4.0, -6.0], [-7.0, -7.0, 5.0]], [[-1.0, -5.0, 0.0], 
-[-7.0, -3.0, 0.0], [0.0, 2.0, -6.0], [-5.0, 4.0, 7.0]]], [[[4.0, 2.0, -4.0], [6.0, 7.0, -3.0], [7.0, -7.0, 1.0], [-1.0, 7.0, 
-3.0]], [[-4.0, 1.0, 5.0], [7.0, 3.0, -6.0], [6.0, 3.0, -2.0], [-7.0, 7.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, 0.0, 
-4.0], [-3.0, 7.0, -1.0], [4.0, 7.0, -4.0], [2.0, -7.0, 5.0]], [[7.0, -1.0, -2.0], [-5.0, 4.0, 3.0], [-2.0, -6.0, -5.0], [-4.0, 
--4.0, 2.0]]], [[[-4.0, -6.0, 0.0], [-6.0, -3.0, -7.0], [3.0, -7.0, -3.0], [6.0, 7.0, 0.0]], [[1.0, -4.0, 0.0], [7.0, 1.0, 
--6.0], [-4.0, 3.0, 1.0], [1.0, 2.0, -2.0]]]])
-      arg1=Data(numpy.array([[[-5.0, -3.0, -4.0], [-3.0, -2.0, -1.0], [7.0, 6.0, 6.0], [4.0, 4.0, -4.0]], [[-3.0, 1.0, -3.0], 
-[-4.0, -7.0, 4.0], [0.0, 2.0, 7.0], [6.0, -6.0, -7.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[7.0, -2.0, 5.0], [3.0, -2.0, 3.0], [1.0, -4.0, 0.0], [-4.0, 0.0, -6.0]], [[-1.0, -5.0, -1.0], 
+[-7.0, 2.0, 2.0], [-5.0, 2.0, 4.0], [-3.0, -5.0, 0.0]]], [[[-2.0, 4.0, -1.0], [-3.0, 1.0, -7.0], [-3.0, -6.0, -3.0], [-4.0, 
+0.0, 6.0]], [[4.0, 6.0, -5.0], [-7.0, -6.0, 5.0], [-4.0, -6.0, 2.0], [-6.0, -1.0, -5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -5.0, -7.0], [6.0, 5.0, 4.0], [4.0, -6.0, -4.0], [-7.0, -4.0, 6.0]], [[0.0, 
+-2.0, -4.0], [4.0, 6.0, 6.0], [-5.0, 7.0, 1.0], [7.0, 6.0, -5.0]]], [[[0.0, 0.0, 7.0], [1.0, 6.0, 0.0], [5.0, 7.0, 4.0], [-2.0, 
+7.0, -6.0]], [[5.0, 4.0, 7.0], [2.0, -3.0, 0.0], [0.0, 1.0, 5.0], [2.0, -6.0, 6.0]]]]))
+      arg1=Data(numpy.array([[[-4.0, -2.0, 1.0], [4.0, 2.0, 0.0], [-4.0, 0.0, -6.0], [6.0, 2.0, -7.0]], [[3.0, -5.0, -7.0], 
+[0.0, 5.0, 4.0], [-7.0, 0.0, 0.0], [0.0, -2.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 1.0, 7.0], [1.0, 7.0, -6.0], [2.0, 2.0, -3.0], [7.0, 3.0, 3.0]], [[-5.0, -6.0, 
+0.0], [4.0, -5.0, -4.0], [5.0, -4.0, 7.0], [6.0, 4.0, -3.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-195.0, -132.0])+(1.-msk_ref)*numpy.array([-102.0, 37.0])
+      ref=Data(numpy.array([95.0, -40.0]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([-63.0, 68.0]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-1.0, 3.0])+(1.-msk_arg0)*numpy.array([-7.0, -1.0])
-      arg1=Data(numpy.array([-6.0, 6.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([7.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, 5.0]))
+      arg1=Data(numpy.array([-6.0, 5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, 3.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[6.0, -6.0], [-18.0, 18.0]])+(1.-msk_ref)*numpy.array([[42.0, -42.0], [6.0, -6.0]])
+      ref=Data(numpy.array([[-42.0, 35.0], [0.0, 0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[8.0, 12.0], [10.0, 15.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-1.0, -5.0, -1.0], [3.0, 5.0, 4.0]])+(1.-msk_arg0)*numpy.array([[3.0, 0.0, -6.0], [1.0, 0.0, 
--7.0]])
-      arg1=Data(numpy.array([[-3.0, 1.0, -7.0], [3.0, -1.0, 0.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-1.0, 0.0, -1.0], [1.0, 4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, 3.0, 4.0], [-7.0, -4.0, 1.0]]))
+      arg1=Data(numpy.array([[3.0, 2.0, 0.0], [-3.0, 2.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, 4.0, -2.0], [-7.0, -1.0, 7.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[5.0, 2.0], [-32.0, 4.0]])+(1.-msk_ref)*numpy.array([[33.0, 9.0], [46.0, 3.0]])
+      ref=Data(numpy.array([[-3.0, 4.0], [11.0, 5.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[4.0, 46.0], [-18.0, 60.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 1.0, 0.0], [-2.0, 3.0, -4.0]], [[0.0, 3.0, -3.0], [0.0, 1.0, 
-7.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 3.0, -2.0], [0.0, 7.0, -1.0]], [[3.0, -1.0, -7.0], [-3.0, -6.0, -1.0]]])
-      arg1=Data(numpy.array([[[6.0, 1.0, -2.0], [3.0, 1.0, -2.0]], [[-5.0, 5.0, -4.0], [6.0, 3.0, -4.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[2.0, 5.0, -6.0], [-3.0, -4.0, -1.0]], [[0.0, 5.0, 6.0], [4.0, -1.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 6.0, 0.0], [3.0, 1.0, 0.0]], [[-3.0, 5.0, -3.0], [2.0, -4.0, -6.0]]]))
+      arg1=Data(numpy.array([[[6.0, 4.0, 6.0], [4.0, -7.0, 1.0]], [[-5.0, -7.0, 0.0], [7.0, 3.0, 7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[7.0, -1.0, -1.0], [-4.0, 0.0, 0.0]], [[2.0, 7.0, -2.0], [-4.0, -7.0, 5.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-24.0, 43.0], [-4.0, 2.0]])+(1.-msk_ref)*numpy.array([[28.0, 38.0], [18.0, -24.0]])
+      ref=Data(numpy.array([[11.0, -85.0], [80.0, -3.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-18.0, 23.0], [-31.0, 25.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 5.0, -4.0], [7.0, 0.0, 0.0], [0.0, -1.0, 4.0], [6.0, 3.0, -1.0]], [[7.0, -6.0, 2.0], 
-[0.0, -4.0, 3.0], [-3.0, 0.0, 3.0], [4.0, 0.0, -5.0]]], [[[-4.0, -6.0, -6.0], [-5.0, -3.0, 3.0], [-1.0, -2.0, 3.0], [7.0, -4.0, 
-4.0]], [[1.0, -4.0, 2.0], [7.0, 0.0, -6.0], [4.0, -3.0, 0.0], [-5.0, 6.0, -1.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, -6.0, 
-0.0], [7.0, -2.0, -2.0], [3.0, 3.0, -7.0], [3.0, 2.0, -7.0]], [[3.0, -6.0, -1.0], [0.0, -1.0, 4.0], [1.0, -1.0, 2.0], [-4.0, 
-5.0, 2.0]]], [[[-7.0, 4.0, 1.0], [0.0, -5.0, -1.0], [-4.0, -2.0, 4.0], [2.0, -3.0, 2.0]], [[1.0, 6.0, 7.0], [6.0, -3.0, 2.0], 
-[-1.0, -4.0, -7.0], [-5.0, -2.0, 2.0]]]])
-      arg1=Data(numpy.array([[[[-6.0, 1.0, 6.0], [4.0, 7.0, -7.0], [-5.0, 5.0, -1.0], [4.0, -1.0, -1.0]], [[1.0, -5.0, 7.0], 
-[0.0, -3.0, 2.0], [-1.0, -1.0, -6.0], [0.0, -6.0, -4.0]]], [[[-6.0, 3.0, -6.0], [-7.0, -6.0, 4.0], [0.0, -2.0, 6.0], [0.0, 0.0, 
-1.0]], [[1.0, 0.0, 5.0], [-7.0, 5.0, 0.0], [-2.0, 2.0, 2.0], [-2.0, -4.0, 3.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[-5.0, -6.0, -1.0], [-2.0, -5.0, 4.0], [4.0, 2.0, 2.0], [5.0, -7.0, -7.0]], [[3.0, 5.0, -1.0], 
+[7.0, 1.0, 4.0], [2.0, -5.0, 6.0], [4.0, 4.0, 6.0]]], [[[3.0, -7.0, 5.0], [0.0, 6.0, -4.0], [4.0, -6.0, 6.0], [6.0, -5.0, 
+6.0]], [[6.0, 4.0, -2.0], [-1.0, 1.0, -1.0], [7.0, 0.0, -5.0], [6.0, -3.0, 4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, 2.0, -4.0], [7.0, 5.0, -6.0], [7.0, -1.0, 2.0], [-6.0, -1.0, 6.0]], [[-7.0, 
+-3.0, 0.0], [3.0, 4.0, 5.0], [0.0, -5.0, 6.0], [5.0, 6.0, 7.0]]], [[[3.0, 0.0, -1.0], [-3.0, 3.0, 7.0], [0.0, 1.0, 6.0], [-6.0, 
+-2.0, 5.0]], [[-3.0, 0.0, 7.0], [6.0, -7.0, 0.0], [-5.0, -4.0, -2.0], [5.0, 0.0, -7.0]]]]))
+      arg1=Data(numpy.array([[[[0.0, -2.0, -4.0], [-1.0, 3.0, 3.0], [-2.0, -5.0, -7.0], [7.0, -2.0, -4.0]], [[0.0, -3.0, 7.0], 
+[5.0, 6.0, 6.0], [4.0, 5.0, -1.0], [-1.0, -1.0, -2.0]]], [[[-4.0, -3.0, -7.0], [6.0, -2.0, 6.0], [1.0, 1.0, 2.0], [-3.0, -6.0, 
+-7.0]], [[3.0, -4.0, 3.0], [0.0, -3.0, -6.0], [-1.0, -7.0, -4.0], [-1.0, -3.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, -2.0, 0.0], [-5.0, -7.0, -3.0], [-5.0, -4.0, 5.0], [0.0, -5.0, -6.0]], [[-1.0, 
+-2.0, 0.0], [0.0, -7.0, -5.0], [0.0, 2.0, 2.0], [3.0, -4.0, -3.0]]], [[[0.0, 6.0, -1.0], [-2.0, 1.0, 2.0], [-4.0, -2.0, 7.0], 
+[-5.0, -7.0, 5.0]], [[3.0, 3.0, -1.0], [3.0, -3.0, 1.0], [-1.0, -4.0, 4.0], [-2.0, -2.0, 0.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[66.0, -29.0], [-70.0, 64.0]])+(1.-msk_ref)*numpy.array([[57.0, -107.0], [123.0, 87.0]])
+      ref=Data(numpy.array([[60.0, 111.0], [-1.0, -63.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-184.0, 44.0], [67.0, 159.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-2.0, 0.0])+(1.-msk_arg0)*numpy.array([-1.0, -4.0])
-      arg1=Data(numpy.array([[3.0, 0.0, 3.0, -3.0, 4.0], [1.0, 1.0, -3.0, 3.0, 0.0], [4.0, 0.0, -7.0, -1.0, 1.0], [-5.0, 0.0, 
-5.0, -4.0, -5.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([-5.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-5.0, 2.0]))
+      arg1=Data(numpy.array([[7.0, -6.0, 0.0, 6.0, 7.0], [-6.0, 4.0, 1.0, 2.0, -7.0], [-7.0, 0.0, 6.0, 7.0, 4.0], [3.0, 6.0, 
+6.0, 3.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[0.0, -1.0, 6.0, 0.0, 0.0], [5.0, -5.0, 1.0, -2.0, -4.0], [-2.0, 6.0, -4.0, 5.0, 
+-7.0], [7.0, 5.0, -2.0, -2.0, -7.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, 0.0, -6.0, 6.0, -8.0], [-2.0, -2.0, 6.0, -6.0, 0.0], [-8.0, 0.0, 14.0, 2.0, -2.0], 
-[10.0, 0.0, -10.0, 8.0, 10.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, 0.0, -3.0, 3.0, -4.0], [-1.0, -1.0, 3.0, -3.0, 0.0], [-4.0, 0.0, 7.0, 1.0, 
--1.0], [5.0, 0.0, -5.0, 4.0, 5.0]], [[-12.0, 0.0, -12.0, 12.0, -16.0], [-4.0, -4.0, 12.0, -12.0, 0.0], [-16.0, 0.0, 28.0, 4.0, 
--4.0], [20.0, 0.0, -20.0, 16.0, 20.0]]])
+      ref=Data(numpy.array([[[-35.0, 30.0, 0.0, -30.0, -35.0], [30.0, -20.0, -5.0, -10.0, 35.0], [35.0, 0.0, -30.0, -35.0, 
+-20.0], [-15.0, -30.0, -30.0, -15.0, -25.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[0.0, 5.0, -30.0, 0.0, 0.0], [-25.0, 25.0, -5.0, 10.0, 20.0], [10.0, -30.0, 20.0, 
+-25.0, 35.0], [-35.0, -25.0, 10.0, 10.0, 35.0]], [[0.0, -2.0, 12.0, 0.0, 0.0], [10.0, -10.0, 2.0, -4.0, -8.0], [-4.0, 12.0, 
+-8.0, 10.0, -14.0], [14.0, 10.0, -4.0, -4.0, -14.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-7.0, 2.0, -5.0], [6.0, -5.0, 0.0]])+(1.-msk_arg0)*numpy.array([[0.0, 0.0, -4.0], [7.0, 0.0, 
--4.0]])
-      arg1=Data(numpy.array([[[-5.0, 7.0, -3.0], [0.0, -1.0, -1.0], [7.0, 4.0, -6.0], [4.0, -7.0, -2.0], [-7.0, 1.0, 5.0]], 
-[[-5.0, -5.0, 5.0], [-6.0, 5.0, 0.0], [4.0, 5.0, -1.0], [6.0, 6.0, 3.0], [4.0, 7.0, -7.0]], [[1.0, -7.0, 2.0], [3.0, 6.0, 
--5.0], [0.0, 2.0, -6.0], [0.0, 0.0, 5.0], [2.0, 0.0, -1.0]], [[4.0, -4.0, 1.0], [0.0, 2.0, 4.0], [5.0, 1.0, -6.0], [-3.0, -7.0, 
-7.0], [1.0, 1.0, -6.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[64.0, 3.0, -11.0, -32.0, 26.0], [0.0, 52.0, -13.0, -45.0, 21.0], [-31.0, 16.0, 34.0, -25.0, 
--9.0], [-41.0, -16.0, -3.0, -28.0, 25.0]], [[-65.0, 5.0, 22.0, 59.0, -47.0], [-5.0, -61.0, -1.0, 6.0, -11.0], [41.0, -12.0, 
--10.0, 0.0, 12.0], [44.0, -10.0, 25.0, 17.0, 1.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 4.0, 24.0, 8.0, -20.0], [-20.0, 0.0, 
-4.0, -12.0, 28.0], [-8.0, 20.0, 24.0, -20.0, 4.0], [-4.0, -16.0, 24.0, -28.0, 24.0]], [[-23.0, 4.0, 73.0, 36.0, -69.0], [-55.0, 
--42.0, 32.0, 30.0, 56.0], [-1.0, 41.0, 24.0, -20.0, 18.0], [24.0, -16.0, 59.0, -49.0, 31.0]]])
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-3.0, 7.0, 0.0], [-6.0, -1.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 7.0, -6.0], [-4.0, 1.0, -5.0]]))
+      arg1=Data(numpy.array([[[2.0, -6.0, 5.0], [0.0, -1.0, 1.0], [4.0, 5.0, -7.0], [-4.0, -5.0, -6.0], [7.0, -2.0, 4.0]], 
+[[-4.0, 0.0, -3.0], [6.0, 5.0, -4.0], [-5.0, -6.0, 3.0], [-6.0, 3.0, -3.0], [-4.0, -1.0, 6.0]], [[-6.0, 3.0, -3.0], [1.0, -6.0, 
+-1.0], [5.0, -4.0, -4.0], [3.0, -2.0, 5.0], [-4.0, -1.0, -1.0]], [[5.0, 6.0, 0.0], [-3.0, 3.0, -4.0], [-7.0, 3.0, -7.0], [-4.0, 
+-3.0, -1.0], [-4.0, 1.0, -6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[4.0, -5.0, 7.0], [-6.0, -5.0, -7.0], [5.0, 7.0, 2.0], [-5.0, -2.0, 2.0], [0.0, -6.0, 
+-3.0]], [[-4.0, -4.0, -1.0], [0.0, -2.0, -6.0], [-1.0, 0.0, 6.0], [0.0, 0.0, -2.0], [-2.0, 3.0, -7.0]], [[2.0, 5.0, -6.0], 
+[-5.0, 0.0, -7.0], [7.0, -4.0, -5.0], [6.0, 2.0, -6.0], [0.0, -5.0, 3.0]], [[-2.0, 7.0, 3.0], [7.0, -3.0, -2.0], [-3.0, -5.0, 
+-3.0], [-5.0, 0.0, -5.0], [-4.0, -3.0, -7.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[-48.0, -7.0, 23.0, -23.0, -35.0], [12.0, 17.0, -27.0, 39.0, 5.0], [39.0, -45.0, -43.0, -23.0, 
+5.0], [27.0, 30.0, 42.0, -9.0, 19.0]], [[-6.0, 1.0, -29.0, 29.0, -40.0], [24.0, -41.0, 36.0, 33.0, 25.0], [33.0, 0.0, -26.0, 
+-16.0, 25.0], [-36.0, 15.0, 39.0, 27.0, 23.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-77.0, 7.0, 37.0, -26.0, -24.0], [-22.0, 22.0, -36.0, 12.0, 63.0], [71.0, 42.0, 2.0, 
+50.0, -53.0], [31.0, -9.0, -17.0, 30.0, 21.0]], [[-56.0, 54.0, -23.0, 8.0, 9.0], [17.0, 28.0, -26.0, 10.0, 46.0], [27.0, 55.0, 
+-7.0, 8.0, -20.0], [0.0, -21.0, 22.0, 45.0, 48.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 7.0, 0.0], [-1.0, -6.0, -7.0]], [[3.0, -3.0, 1.0], [-5.0, -6.0, 
-4.0]]])+(1.-msk_arg0)*numpy.array([[[7.0, 2.0, -7.0], [-2.0, 2.0, 7.0]], [[2.0, 3.0, -3.0], [7.0, -5.0, 3.0]]])
-      arg1=Data(numpy.array([[[[-2.0, 3.0, -2.0], [-5.0, -6.0, 0.0]], [[-3.0, -2.0, -6.0], [-6.0, -7.0, -2.0]], [[-6.0, -2.0, 
--6.0], [-7.0, -5.0, 7.0]], [[-1.0, 6.0, 2.0], [-2.0, -3.0, -7.0]], [[-2.0, -1.0, 5.0], [-7.0, 2.0, -7.0]]], [[[4.0, 0.0, 5.0], 
-[-2.0, 5.0, -2.0]], [[-7.0, 0.0, 5.0], [5.0, -5.0, -4.0]], [[3.0, -7.0, 0.0], [-1.0, 7.0, -2.0]], [[0.0, -6.0, 0.0], [4.0, 2.0, 
--5.0]], [[0.0, -5.0, -3.0], [-7.0, 4.0, 6.0]]], [[[-6.0, 0.0, 4.0], [-7.0, 6.0, 0.0]], [[-1.0, 1.0, 0.0], [4.0, -7.0, 2.0]], 
-[[-6.0, 5.0, 4.0], [4.0, -4.0, -6.0]], [[-1.0, -1.0, -4.0], [4.0, 6.0, -5.0]], [[5.0, -2.0, 1.0], [2.0, -7.0, 1.0]]], [[[2.0, 
-0.0, 4.0], [-1.0, 5.0, -4.0]], [[-3.0, 3.0, 6.0], [0.0, -7.0, 2.0]], [[-7.0, -7.0, -3.0], [3.0, -5.0, 2.0]], [[1.0, 1.0, -5.0], 
-[-2.0, 1.0, -1.0]], [[-5.0, 4.0, -2.0], [7.0, 6.0, 7.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[1.0, -3.0, 0.0], [-6.0, 1.0, -7.0]], [[-5.0, 7.0, 3.0], [5.0, 2.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, -1.0, 3.0], [-4.0, 7.0, 4.0]], [[-6.0, -1.0, 7.0], [0.0, 3.0, 0.0]]]))
+      arg1=Data(numpy.array([[[[5.0, -5.0, 7.0], [7.0, 6.0, 0.0]], [[-2.0, 1.0, 7.0], [-2.0, 0.0, 0.0]], [[3.0, 6.0, 5.0], 
+[-4.0, 5.0, 4.0]], [[6.0, -6.0, 0.0], [-7.0, -7.0, 7.0]], [[-6.0, -1.0, 0.0], [0.0, -6.0, 0.0]]], [[[-3.0, -3.0, -3.0], [3.0, 
+-5.0, 7.0]], [[7.0, -7.0, -1.0], [-1.0, 3.0, 2.0]], [[6.0, 2.0, 4.0], [4.0, 0.0, 7.0]], [[1.0, 0.0, 7.0], [3.0, -5.0, 4.0]], 
+[[5.0, 0.0, -7.0], [-1.0, 0.0, -6.0]]], [[[4.0, -6.0, 0.0], [-5.0, 0.0, -7.0]], [[0.0, -2.0, 5.0], [5.0, 6.0, 4.0]], [[4.0, 
+7.0, -5.0], [2.0, -2.0, 3.0]], [[5.0, -3.0, 4.0], [6.0, -1.0, 4.0]], [[4.0, -3.0, 5.0], [4.0, -2.0, -7.0]]], [[[3.0, -6.0, 
+-7.0], [2.0, 0.0, 0.0]], [[2.0, 3.0, 2.0], [3.0, 3.0, -1.0]], [[-5.0, -5.0, 0.0], [3.0, 2.0, 0.0]], [[-7.0, 6.0, -2.0], [0.0, 
+0.0, -7.0]], [[-7.0, -4.0, 3.0], [-4.0, -5.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, 5.0, 1.0], [0.0, -3.0, 7.0]], [[2.0, 0.0, -2.0], [-4.0, 4.0, 1.0]], [[7.0, 
+-2.0, 2.0], [4.0, -7.0, 2.0]], [[2.0, 1.0, 0.0], [-2.0, 5.0, 6.0]], [[7.0, -1.0, -7.0], [5.0, 3.0, -5.0]]], [[[3.0, 0.0, -1.0], 
+[-2.0, -5.0, -5.0]], [[1.0, -6.0, 6.0], [6.0, 0.0, 7.0]], [[2.0, 1.0, 7.0], [5.0, -1.0, 1.0]], [[-6.0, 2.0, 0.0], [-2.0, 0.0, 
+5.0]], [[-5.0, 0.0, -2.0], [5.0, -7.0, 2.0]]], [[[7.0, 7.0, 3.0], [-4.0, 1.0, 2.0]], [[2.0, 3.0, 7.0], [0.0, 3.0, 7.0]], [[6.0, 
+-2.0, -7.0], [-2.0, -3.0, -3.0]], [[2.0, 0.0, -3.0], [-5.0, 1.0, 5.0]], [[-1.0, 0.0, 5.0], [4.0, 0.0, -4.0]]], [[[7.0, 1.0, 
+6.0], [-5.0, 2.0, -7.0]], [[7.0, 2.0, 0.0], [7.0, 1.0, -5.0]], [[5.0, -7.0, 4.0], [3.0, 3.0, 1.0]], [[7.0, -6.0, 5.0], [6.0, 
+3.0, 4.0]], [[5.0, 3.0, 4.0], [0.0, 1.0, -7.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[62.0, 48.0, -26.0, 111.0, 37.0], [-14.0, 53.0, -76.0, -23.0, -94.0], [-29.0, 31.0, 97.0, 
--12.0, 19.0], [-1.0, 49.0, -36.0, 10.0, -64.0]], [[44.0, 55.0, 75.0, -19.0, -3.0], [-11.0, -27.0, -15.0, -34.0, 47.0], [-15.0, 
-24.0, -49.0, -80.0, 58.0], [-31.0, 38.0, 20.0, -5.0, -72.0]]])+(1.-msk_ref)*numpy.array([[[4.0, 1.0, 49.0, -60.0, -82.0], 
-[-7.0, -132.0, 9.0, -51.0, 75.0], [-44.0, -13.0, -118.0, -12.0, 13.0], [-30.0, -57.0, -44.0, 43.0, 34.0]], [[6.0, -7.0, -3.0, 
--10.0, -102.0], [-52.0, 19.0, -63.0, -15.0, -57.0], [-103.0, 70.0, 21.0, -10.0, 53.0], [-52.0, 26.0, 26.0, -2.0, 48.0]]])
+      ref=Data(numpy.array([[[-16.0, 7.0, -14.0, 10.0, -9.0], [-66.0, 23.0, -73.0, -50.0, 53.0], [101.0, -46.0, -52.0, -51.0, 
+36.0], [9.0, -15.0, -6.0, 24.0, 17.0]], [[8.0, 28.0, 60.0, -72.0, 11.0], [39.0, -72.0, 65.0, 49.0, -93.0], [-136.0, 66.0, 41.0, 
+22.0, -59.0], [-68.0, 31.0, 9.0, 22.0, -7.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[25.0, 50.0, -21.0, 74.0, -11.0], [-38.0, 32.0, 5.0, 2.0, -87.0], [61.0, 75.0, -20.0, 
+46.0, -21.0], [51.0, -15.0, 52.0, 62.0, 8.0]], [[-37.0, -14.0, -47.0, 2.0, -81.0], [-40.0, 42.0, 33.0, 34.0, -5.0], [-25.0, 
+43.0, -92.0, -30.0, 41.0], [5.0, -41.0, 14.0, 8.0, -2.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_constData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-1.0, -2.0])+(1.-msk_arg0)*numpy.array([-1.0, 5.0])
-      arg1=Data(numpy.array([[[-7.0, 5.0], [-5.0, -1.0]], [[4.0, 3.0], [7.0, -3.0]], [[6.0, 0.0], [0.0, -1.0]], [[2.0, 5.0], 
-[-3.0, 6.0]], [[0.0, -6.0], [-5.0, 6.0]], [[-7.0, 1.0], [-1.0, -2.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-5.0, -3.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, -1.0]))
+      arg1=Data(numpy.array([[[-1.0, -1.0], [-2.0, -1.0]], [[2.0, 7.0], [-5.0, 3.0]], [[4.0, 7.0], [5.0, -2.0]], [[0.0, 3.0], 
+[6.0, 3.0]], [[-3.0, -3.0], [3.0, -7.0]], [[7.0, -1.0], [1.0, 4.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -5.0], [-1.0, -4.0]], [[-5.0, 7.0], [7.0, -4.0]], [[2.0, 2.0], [-4.0, -5.0]], 
+[[-5.0, 0.0], [-5.0, 3.0]], [[2.0, 2.0], [-4.0, 1.0]], [[7.0, -3.0], [-6.0, -5.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[7.0, -5.0], [5.0, 1.0]], [[-4.0, -3.0], [-7.0, 3.0]], [[-6.0, 0.0], [0.0, 1.0]], [[-2.0, 
--5.0], [3.0, -6.0]], [[0.0, 6.0], [5.0, -6.0]], [[7.0, -1.0], [1.0, 2.0]]], [[[14.0, -10.0], [10.0, 2.0]], [[-8.0, -6.0], 
-[-14.0, 6.0]], [[-12.0, 0.0], [0.0, 2.0]], [[-4.0, -10.0], [6.0, -12.0]], [[0.0, 12.0], [10.0, -12.0]], [[14.0, -2.0], [2.0, 
-4.0]]]])+(1.-msk_ref)*numpy.array([[[[7.0, -5.0], [5.0, 1.0]], [[-4.0, -3.0], [-7.0, 3.0]], [[-6.0, 0.0], [0.0, 1.0]], [[-2.0, 
--5.0], [3.0, -6.0]], [[0.0, 6.0], [5.0, -6.0]], [[7.0, -1.0], [1.0, 2.0]]], [[[-35.0, 25.0], [-25.0, -5.0]], [[20.0, 15.0], 
-[35.0, -15.0]], [[30.0, 0.0], [0.0, -5.0]], [[10.0, 25.0], [-15.0, 30.0]], [[0.0, -30.0], [-25.0, 30.0]], [[-35.0, 5.0], [-5.0, 
--10.0]]]])
+      ref=Data(numpy.array([[[[5.0, 5.0], [10.0, 5.0]], [[-10.0, -35.0], [25.0, -15.0]], [[-20.0, -35.0], [-25.0, 10.0]], 
+[[0.0, -15.0], [-30.0, -15.0]], [[15.0, 15.0], [-15.0, 35.0]], [[-35.0, 5.0], [-5.0, -20.0]]], [[[3.0, 3.0], [6.0, 3.0]], 
+[[-6.0, -21.0], [15.0, -9.0]], [[-12.0, -21.0], [-15.0, 6.0]], [[0.0, -9.0], [-18.0, -9.0]], [[9.0, 9.0], [-9.0, 21.0]], 
+[[-21.0, 3.0], [-3.0, -12.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 
+0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[6.0, 5.0], [1.0, 4.0]], [[5.0, -7.0], [-7.0, 4.0]], 
+[[-2.0, -2.0], [4.0, 5.0]], [[5.0, 0.0], [5.0, -3.0]], [[-2.0, -2.0], [4.0, -1.0]], [[-7.0, 3.0], [6.0, 5.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, -3.0, -6.0], [4.0, -5.0, -4.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 7.0, 5.0], [3.0, 0.0, 
-0.0]])
-      arg1=Data(numpy.array([[[[1.0, -6.0, 3.0], [0.0, -7.0, 0.0]], [[1.0, -1.0, -5.0], [-2.0, 4.0, 7.0]]], [[[4.0, -7.0, 6.0], 
-[3.0, -3.0, 3.0]], [[3.0, -4.0, -3.0], [2.0, -2.0, 6.0]]], [[[1.0, -2.0, 0.0], [4.0, -1.0, 6.0]], [[3.0, 3.0, -1.0], [-1.0, 
-6.0, 4.0]]], [[[3.0, 2.0, -7.0], [2.0, -5.0, 7.0]], [[6.0, 1.0, 1.0], [5.0, 5.0, -2.0]]], [[[1.0, 1.0, -3.0], [6.0, -5.0, 
--5.0]], [[-6.0, -6.0, -2.0], [-1.0, 0.0, 0.0]]], [[[-2.0, -7.0, -7.0], [4.0, 3.0, 0.0]], [[2.0, -1.0, -1.0], [2.0, 3.0, 
--1.0]]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[5.0, -1.0, -3.0], [1.0, 4.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 1.0, 7.0], [7.0, -6.0, 2.0]]))
+      arg1=Data(numpy.array([[[[4.0, 6.0, 1.0], [4.0, -6.0, 0.0]], [[-5.0, 5.0, 4.0], [-4.0, 5.0, -7.0]]], [[[0.0, 1.0, -5.0], 
+[-2.0, 1.0, -4.0]], [[-6.0, -7.0, 0.0], [0.0, 3.0, -6.0]]], [[[4.0, -6.0, 3.0], [7.0, -4.0, -4.0]], [[6.0, 7.0, 2.0], [-4.0, 
+2.0, -4.0]]], [[[-1.0, 0.0, 2.0], [-5.0, 0.0, -2.0]], [[3.0, 3.0, 1.0], [-6.0, 0.0, -3.0]]], [[[6.0, 0.0, 0.0], [2.0, -6.0, 
+-4.0]], [[3.0, 0.0, -2.0], [1.0, 4.0, 6.0]]], [[[-5.0, 3.0, 5.0], [-4.0, -1.0, 0.0]], [[-7.0, -3.0, 5.0], [-2.0, 1.0, 
+-4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 0.0, -2.0], [4.0, -3.0, -6.0]], [[-6.0, -3.0, 7.0], [0.0, -5.0, -1.0]]], 
+[[[7.0, -6.0, 0.0], [-4.0, -6.0, -5.0]], [[-5.0, 0.0, -6.0], [-1.0, 5.0, 5.0]]], [[[-7.0, 7.0, 6.0], [-3.0, 0.0, 5.0]], [[4.0, 
+3.0, -4.0], [-2.0, 7.0, 0.0]]], [[[0.0, -5.0, 4.0], [-1.0, 0.0, -1.0]], [[-4.0, -6.0, 0.0], [-1.0, -5.0, -5.0]]], [[[5.0, -7.0, 
+4.0], [3.0, -1.0, 3.0]], [[-3.0, -1.0, -3.0], [-7.0, 2.0, -4.0]]], [[[4.0, 7.0, 0.0], [2.0, 0.0, 6.0]], [[-4.0, 0.0, 7.0], 
+[-3.0, -7.0, 7.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[4.0, 21.0], [37.0, -62.0]], [[1.0, 3.0], [42.0, -22.0]], [[10.0, -17.0], [9.0, -46.0]], 
-[[48.0, -19.0], [15.0, 17.0]], [[19.0, 69.0], [6.0, -4.0]], [[55.0, 7.0], [17.0, 5.0]]], [[[22.0, 35.0], [29.0, -56.0]], 
-[[27.0, 15.0], [44.0, -6.0]], [[14.0, -3.0], [1.0, -50.0]], [[30.0, 5.0], [15.0, 3.0]], [[11.0, 69.0], [14.0, -4.0]], [[55.0, 
-1.0], [17.0, -3.0]]]])+(1.-msk_ref)*numpy.array([[[[-29.0, -49.0], [-34.0, 67.0]], [[-27.0, -12.0], [-49.0, 12.0]], [[-16.0, 
-15.0], [10.0, 64.0]], [[-27.0, -4.0], [0.0, 15.0]], [[-10.0, -72.0], [-40.0, 2.0]], [[-80.0, 13.0], [-16.0, 12.0]]], [[[3.0, 
-0.0], [3.0, -6.0]], [[12.0, 9.0], [9.0, 6.0]], [[3.0, 12.0], [9.0, -3.0]], [[9.0, 6.0], [18.0, 15.0]], [[3.0, 18.0], [-18.0, 
--3.0]], [[-6.0, 12.0], [6.0, 6.0]]]])
+      ref=Data(numpy.array([[[[11.0, 26.0], [-42.0, -4.0]], [[14.0, 1.0], [-23.0, 15.0]], [[17.0, 51.0], [17.0, -10.0]], 
+[[-11.0, -19.0], [9.0, -21.0]], [[30.0, 28.0], [21.0, -17.0]], [[-43.0, -19.0], [-47.0, 1.0]]], [[[34.0, -20.0], [39.0, 
+-26.0]], [[-26.0, -22.0], [-34.0, -24.0]], [[-2.0, -33.0], [46.0, -20.0]], [[11.0, -17.0], [21.0, -24.0]], [[6.0, -46.0], 
+[-9.0, 53.0]], [[37.0, -8.0], [11.0, -22.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-19.0, -65.0], [76.0, -12.0]], [[-41.0, -21.0], [-17.0, 45.0]], [[84.0, 50.0], 
+[-45.0, 17.0]], [[23.0, -2.0], [14.0, -35.0]], [[-4.0, 5.0], [-7.0, 9.0]], [[-13.0, 32.0], [69.0, 57.0]]], [[[3.0, 34.0], 
+[-10.0, 28.0]], [[85.0, -2.0], [-47.0, -27.0]], [[-79.0, -11.0], [2.0, -56.0]], [[38.0, -9.0], [8.0, 13.0]], [[85.0, 33.0], 
+[-21.0, -69.0]], [[-14.0, 26.0], [-14.0, 35.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([6.0, 0.0])+(1.-msk_arg0)*numpy.array([6.0, 5.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(0.0)+(1-msk_arg1)*(1.0)
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([2.0, 7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, 1.0]))
+      arg1=Data(7.0,self.functionspace)
+      arg1.setTaggedValue(1,-4.0)
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([0.0, 0.0])+(1.-msk_ref)*numpy.array([6.0, 5.0])
+      ref=msk_ref*numpy.array([14.0, 49.0])+(1.-msk_ref)*numpy.array([12.0, -4.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 1.0, 3.0], [-7.0, -4.0, 0.0]])+(1.-msk_arg0)*numpy.array([[3.0, -4.0, 5.0], [-5.0, 5.0, 
-1.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-5.0, 1.0, -7.0])+(1.-msk_arg1)*numpy.array([2.0, -3.0, 0.0])
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[4.0, 7.0, 5.0], [6.0, 3.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 1.0, -4.0], [1.0, 6.0, -5.0]]))
+      arg1=Data(numpy.array([-5.0, -5.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, 5.0, 5.0]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([-20.0, 31.0])+(1.-msk_ref)*numpy.array([18.0, -25.0])
+      ref=msk_ref*numpy.array([-20.0, -45.0])+(1.-msk_ref)*numpy.array([-40.0, 10.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-4.0, -7.0, -6.0], [-5.0, -6.0, -1.0]], [[-2.0, -6.0, 6.0], [5.0, 7.0, 
--7.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, -7.0, 0.0], [2.0, 0.0, 5.0]], [[4.0, 5.0, 0.0], [2.0, -2.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[1.0, -6.0, -2.0], [0.0, 2.0, 0.0]])+(1.-msk_arg1)*numpy.array([[4.0, 3.0, 5.0], [-7.0, 3.0, 
-5.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 4.0, 5.0], [0.0, -2.0, -7.0]], [[3.0, -5.0, -3.0], [7.0, -1.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, 7.0, -4.0], [-4.0, -7.0, -7.0]], [[-1.0, 4.0, 1.0], [3.0, -3.0, 1.0]]]))
+      arg1=Data(numpy.array([[-6.0, 5.0, 1.0], [-6.0, -5.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 6.0, -3.0], [-5.0, -3.0, 0.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([38.0, 36.0])+(1.-msk_ref)*numpy.array([-38.0, -19.0])
+      ref=msk_ref*numpy.array([21.0, -79.0])+(1.-msk_ref)*numpy.array([101.0, 13.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank3_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, -6.0, 0.0], [-5.0, -4.0, 1.0], [7.0, -6.0, -3.0], [-4.0, -2.0, -5.0]], [[3.0, -1.0, 
-3.0], [3.0, 3.0, -3.0], [-2.0, 5.0, -2.0], [-2.0, 0.0, 5.0]]], [[[6.0, 5.0, 7.0], [1.0, 2.0, 4.0], [5.0, -6.0, 0.0], [2.0, 1.0, 
-0.0]], [[-4.0, -2.0, 4.0], [5.0, 1.0, 3.0], [4.0, 2.0, 6.0], [-6.0, 4.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-4.0, 5.0, 
--4.0], [-7.0, 5.0, 1.0], [4.0, -1.0, 4.0], [-6.0, 5.0, 2.0]], [[-7.0, -6.0, 0.0], [-3.0, -7.0, 0.0], [-6.0, 4.0, 0.0], [-4.0, 
-2.0, -3.0]]], [[[-5.0, 0.0, 4.0], [1.0, -4.0, -5.0], [-3.0, 5.0, 1.0], [7.0, 0.0, 4.0]], [[7.0, 4.0, 2.0], [5.0, 4.0, -4.0], 
-[-3.0, 0.0, -2.0], [3.0, -6.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[3.0, 4.0, -1.0], [6.0, 0.0, -2.0], [7.0, 5.0, -4.0], [-3.0, -2.0, 7.0]], [[-2.0, 0.0, 1.0], 
-[-4.0, 7.0, -7.0], [-3.0, 4.0, -3.0], [2.0, 5.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[1.0, -7.0, 6.0], [-6.0, 4.0, -4.0], [7.0, 
-0.0, 6.0], [-1.0, -7.0, -7.0]], [[2.0, 1.0, -1.0], [-4.0, 6.0, 0.0], [-3.0, -6.0, -1.0], [3.0, -3.0, 4.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[6.0, -7.0, 0.0], [-3.0, -7.0, 6.0], [-3.0, 0.0, -1.0], [3.0, 4.0, -6.0]], [[-6.0, -3.0, -5.0], 
+[0.0, -5.0, 5.0], [1.0, 4.0, 5.0], [6.0, -4.0, 5.0]]], [[[7.0, 2.0, 2.0], [7.0, 2.0, 2.0], [3.0, -2.0, -3.0], [-2.0, 4.0, 
+2.0]], [[-7.0, 7.0, 6.0], [4.0, -3.0, -4.0], [-2.0, 2.0, 3.0], [0.0, 7.0, 4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, 0.0, 3.0], [0.0, 5.0, 5.0], [-3.0, 0.0, 0.0], [5.0, 6.0, -6.0]], [[-3.0, 
+-7.0, -6.0], [0.0, 4.0, 3.0], [1.0, 1.0, -1.0], [-2.0, 5.0, 3.0]]], [[[0.0, 4.0, -1.0], [6.0, 2.0, -7.0], [-6.0, 5.0, 4.0], 
+[-2.0, -2.0, 7.0]], [[5.0, -3.0, 1.0], [-5.0, 0.0, 4.0], [-7.0, 2.0, -5.0], [6.0, -7.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[0.0, 0.0, 4.0], [-1.0, 1.0, -1.0], [-3.0, -3.0, 5.0], [-2.0, -7.0, 6.0]], [[-4.0, -2.0, 1.0], 
+[2.0, -6.0, 2.0], [2.0, -5.0, 0.0], [-5.0, -4.0, -6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 0.0, 5.0], [-6.0, 0.0, 6.0], [0.0, 0.0, -7.0], [-6.0, 0.0, 7.0]], [[-5.0, -4.0, 
+-1.0], [-2.0, -6.0, 6.0], [-6.0, -7.0, 2.0], [7.0, -1.0, 0.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([20.0, 20.0])+(1.-msk_ref)*numpy.array([-82.0, 5.0])
+      ref=msk_ref*numpy.array([-73.0, -57.0])+(1.-msk_ref)*numpy.array([-24.0, 37.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([-2.0, 0.0])+(1.-msk_arg0)*numpy.array([7.0, -3.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([6.0, 5.0])+(1.-msk_arg1)*numpy.array([-6.0, 7.0])
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([0.0, -7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 5.0]))
+      arg1=Data(numpy.array([0.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, -7.0]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-12.0, -10.0], [0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-42.0, 49.0], [18.0, -21.0]])
+      ref=msk_ref*numpy.array([[0.0, 0.0], [0.0, 49.0]])+(1.-msk_ref)*numpy.array([[0.0, 0.0], [30.0, -35.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-7.0, 6.0, -3.0], [0.0, -3.0, 0.0]])+(1.-msk_arg0)*numpy.array([[5.0, -4.0, -3.0], [-7.0, 
-0.0, 0.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-4.0, -1.0, 5.0], [3.0, -4.0, 5.0]])+(1.-msk_arg1)*numpy.array([[1.0, -6.0, 5.0], [-2.0, 0.0, 
-6.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[3.0, 4.0, -4.0], [-6.0, -1.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[3.0, -2.0, 4.0], [-3.0, -5.0, 0.0]]))
+      arg1=Data(numpy.array([[5.0, -1.0, 2.0], [2.0, -2.0, 6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-2.0, 0.0, -5.0], [-5.0, -6.0, 1.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[7.0, -60.0], [3.0, 12.0]])+(1.-msk_ref)*numpy.array([[14.0, -28.0], [-7.0, 14.0]])
+      ref=msk_ref*numpy.array([[3.0, -26.0], [-15.0, 32.0]])+(1.-msk_ref)*numpy.array([[-26.0, 1.0], [6.0, 45.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, 0.0, -6.0], [3.0, -7.0, -4.0]], [[6.0, -4.0, 4.0], [-3.0, -1.0, 
-7.0]]])+(1.-msk_arg0)*numpy.array([[[0.0, 0.0, -2.0], [-1.0, -3.0, 0.0]], [[0.0, -5.0, 3.0], [-2.0, 0.0, -5.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[1.0, 6.0, -6.0], [-6.0, 3.0, 1.0]], [[7.0, 4.0, 6.0], [7.0, -2.0, 
--3.0]]])+(1.-msk_arg1)*numpy.array([[[-4.0, 4.0, 2.0], [2.0, 0.0, -5.0]], [[6.0, -1.0, 3.0], [5.0, -4.0, 7.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[0.0, 4.0, -5.0], [1.0, 0.0, -4.0]], [[4.0, 6.0, 4.0], [6.0, 2.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, 4.0, 0.0], [1.0, -7.0, 0.0]], [[4.0, 7.0, -7.0], [2.0, -1.0, 2.0]]]))
+      arg1=Data(numpy.array([[[-2.0, 0.0, 0.0], [1.0, 2.0, -4.0]], [[0.0, -6.0, -7.0], [5.0, 2.0, 1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, -6.0, 4.0], [-7.0, 0.0, 2.0]], [[5.0, -5.0, 1.0], [-2.0, -2.0, 4.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-14.0, -38.0], [-20.0, 10.0]])+(1.-msk_ref)*numpy.array([[-6.0, 1.0], [7.0, -31.0]])
+      ref=msk_ref*numpy.array([[17.0, 12.0], [6.0, -31.0]])+(1.-msk_ref)*numpy.array([[-31.0, -3.0], [-80.0, -16.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank4_offset3(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[5.0, 0.0, 4.0], [-1.0, 1.0, 2.0], [5.0, 7.0, 7.0], [-7.0, -7.0, 4.0]], [[2.0, 0.0, -7.0], 
-[6.0, 0.0, -4.0], [0.0, 7.0, 2.0], [-3.0, -2.0, 7.0]]], [[[7.0, 2.0, -2.0], [-2.0, -1.0, 0.0], [-3.0, -6.0, 6.0], [-7.0, -7.0, 
-3.0]], [[0.0, 3.0, 0.0], [-5.0, 0.0, 5.0], [-3.0, -7.0, 0.0], [2.0, 4.0, -2.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, -2.0, 
-5.0], [0.0, 0.0, -5.0], [3.0, 1.0, -4.0], [-7.0, -4.0, 6.0]], [[-6.0, -1.0, 0.0], [3.0, 6.0, 2.0], [4.0, -4.0, 0.0], [-2.0, 
-1.0, 2.0]]], [[[0.0, -1.0, -3.0], [6.0, 6.0, -7.0], [1.0, 1.0, 2.0], [0.0, -5.0, -6.0]], [[-4.0, 4.0, -5.0], [-7.0, 6.0, -4.0], 
-[7.0, -5.0, 7.0], [-2.0, -7.0, -6.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[4.0, -2.0, 3.0], [-5.0, 3.0, -2.0], [-4.0, 4.0, 2.0], [-4.0, 4.0, 5.0]], [[5.0, -7.0, 7.0], 
-[0.0, 2.0, 7.0], [6.0, 3.0, 3.0], [-6.0, 2.0, 7.0]]], [[[3.0, -7.0, 5.0], [5.0, -6.0, 6.0], [-5.0, 7.0, 0.0], [2.0, 5.0, 1.0]], 
-[[0.0, 1.0, 7.0], [-4.0, -6.0, -1.0], [-5.0, 3.0, -7.0], [0.0, -7.0, -1.0]]]])+(1.-msk_arg1)*numpy.array([[[[-7.0, 6.0, -3.0], 
-[2.0, 4.0, -7.0], [-3.0, 2.0, 4.0], [7.0, 0.0, 6.0]], [[2.0, 0.0, 3.0], [0.0, 3.0, -1.0], [2.0, -4.0, -3.0], [-6.0, 1.0, 
--1.0]]], [[[4.0, -4.0, 7.0], [5.0, 0.0, -5.0], [-6.0, -5.0, 3.0], [-5.0, 0.0, 0.0]], [[-5.0, 6.0, 0.0], [-6.0, 1.0, 5.0], [7.0, 
-6.0, -2.0], [6.0, -4.0, -5.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[7.0, 4.0, -7.0], [2.0, -4.0, 5.0], [2.0, -1.0, 4.0], [4.0, -3.0, 0.0]], [[-4.0, 5.0, 0.0], 
+[-5.0, 0.0, -1.0], [-7.0, 0.0, 0.0], [-5.0, 5.0, -5.0]]], [[[-7.0, 0.0, -2.0], [-5.0, 6.0, 2.0], [1.0, -1.0, 2.0], [-6.0, 0.0, 
+5.0]], [[4.0, 0.0, 4.0], [4.0, -2.0, -4.0], [-6.0, 5.0, -4.0], [-7.0, -7.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, 1.0, 2.0], [5.0, 7.0, 5.0], [-3.0, -6.0, -7.0], [-3.0, 4.0, 0.0]], [[3.0, 
+0.0, 0.0], [-3.0, 3.0, 0.0], [-4.0, 7.0, 5.0], [-4.0, 7.0, 0.0]]], [[[-2.0, 5.0, 3.0], [-1.0, -4.0, -6.0], [-7.0, -6.0, 7.0], 
+[3.0, 0.0, -4.0]], [[-6.0, 4.0, 1.0], [4.0, 3.0, 5.0], [3.0, 1.0, -6.0], [-3.0, -5.0, -6.0]]]]))
+      arg1=Data(numpy.array([[[[-1.0, 1.0, 3.0], [-1.0, 5.0, 0.0], [0.0, 5.0, -6.0], [3.0, 0.0, 0.0]], [[-5.0, 0.0, 3.0], [0.0, 
+-6.0, -7.0], [-7.0, 2.0, 0.0], [6.0, 2.0, -7.0]]], [[[-3.0, 2.0, 4.0], [0.0, 0.0, 0.0], [-6.0, 5.0, 0.0], [1.0, 0.0, 0.0]], 
+[[7.0, 6.0, 7.0], [1.0, -5.0, 6.0], [3.0, 6.0, 3.0], [1.0, 0.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, -4.0, -6.0], [4.0, -1.0, -1.0], [3.0, 7.0, -1.0], [-4.0, 1.0, -1.0]], [[-1.0, 
+2.0, -1.0], [0.0, 7.0, -7.0], [0.0, 2.0, 2.0], [-7.0, -2.0, 6.0]]], [[[-6.0, -1.0, -7.0], [-6.0, 0.0, 4.0], [2.0, 2.0, 6.0], 
+[6.0, 0.0, 5.0]], [[7.0, 6.0, 0.0], [-4.0, 1.0, 2.0], [-6.0, -1.0, -7.0], [3.0, 4.0, -2.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[101.0, -40.0], [-3.0, -94.0]])+(1.-msk_ref)*numpy.array([[11.0, 68.0], [82.0, 166.0]])
+      ref=msk_ref*numpy.array([[28.0, -94.0], [15.0, 37.0]])+(1.-msk_ref)*numpy.array([[20.0, -33.0], [-126.0, -33.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([1.0, 5.0])+(1.-msk_arg0)*numpy.array([-2.0, -2.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-6.0, 1.0, -4.0, 5.0, -6.0], [0.0, -2.0, 7.0, 5.0, -4.0], [-3.0, 0.0, 7.0, 0.0, -4.0], [-1.0, 
--4.0, 4.0, 3.0, 1.0]])+(1.-msk_arg1)*numpy.array([[-7.0, -7.0, 2.0, 5.0, -4.0], [-7.0, 3.0, -7.0, -4.0, -6.0], [6.0, 7.0, -6.0, 
-3.0, 1.0], [6.0, 2.0, -2.0, 5.0, 5.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([-2.0, 2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-2.0, -2.0]))
+      arg1=Data(numpy.array([[1.0, -7.0, -1.0, 7.0, 0.0], [0.0, -5.0, 0.0, -2.0, 1.0], [2.0, -1.0, 1.0, 5.0, 4.0], [-3.0, -1.0, 
+3.0, 0.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, 7.0, 1.0, 3.0, -6.0], [1.0, 6.0, 3.0, 2.0, -1.0], [6.0, 4.0, 1.0, 2.0, 0.0], 
+[-4.0, 4.0, 7.0, -4.0, 0.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, 1.0, -4.0, 5.0, -6.0], [0.0, -2.0, 7.0, 5.0, -4.0], [-3.0, 0.0, 7.0, 0.0, -4.0], [-1.0, 
--4.0, 4.0, 3.0, 1.0]], [[-30.0, 5.0, -20.0, 25.0, -30.0], [0.0, -10.0, 35.0, 25.0, -20.0], [-15.0, 0.0, 35.0, 0.0, -20.0], 
-[-5.0, -20.0, 20.0, 15.0, 5.0]]])+(1.-msk_ref)*numpy.array([[[14.0, 14.0, -4.0, -10.0, 8.0], [14.0, -6.0, 14.0, 8.0, 12.0], 
-[-12.0, -14.0, 12.0, -6.0, -2.0], [-12.0, -4.0, 4.0, -10.0, -10.0]], [[14.0, 14.0, -4.0, -10.0, 8.0], [14.0, -6.0, 14.0, 8.0, 
-12.0], [-12.0, -14.0, 12.0, -6.0, -2.0], [-12.0, -4.0, 4.0, -10.0, -10.0]]])
+      ref=msk_ref*numpy.array([[[-2.0, 14.0, 2.0, -14.0, 0.0], [0.0, 10.0, 0.0, 4.0, -2.0], [-4.0, 2.0, -2.0, -10.0, -8.0], 
+[6.0, 2.0, -6.0, 0.0, 6.0]], [[2.0, -14.0, -2.0, 14.0, 0.0], [0.0, -10.0, 0.0, -4.0, 2.0], [4.0, -2.0, 2.0, 10.0, 8.0], [-6.0, 
+-2.0, 6.0, 0.0, -6.0]]])+(1.-msk_ref)*numpy.array([[[8.0, -14.0, -2.0, -6.0, 12.0], [-2.0, -12.0, -6.0, -4.0, 2.0], [-12.0, 
+-8.0, -2.0, -4.0, 0.0], [8.0, -8.0, -14.0, 8.0, 0.0]], [[8.0, -14.0, -2.0, -6.0, 12.0], [-2.0, -12.0, -6.0, -4.0, 2.0], [-12.0, 
+-8.0, -2.0, -4.0, 0.0], [8.0, -8.0, -14.0, 8.0, 0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 7.0, -4.0], [3.0, 3.0, -2.0]])+(1.-msk_arg0)*numpy.array([[0.0, 1.0, 4.0], [-6.0, 2.0, 
-3.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-5.0, -5.0, -5.0], [-5.0, -3.0, 0.0], [5.0, -4.0, 5.0], [7.0, -2.0, 2.0], [0.0, 3.0, -2.0]], 
-[[-6.0, -3.0, 2.0], [4.0, 1.0, 6.0], [0.0, -6.0, 0.0], [3.0, 6.0, -5.0], [6.0, -4.0, 3.0]], [[6.0, 2.0, 7.0], [0.0, 5.0, 0.0], 
-[4.0, 4.0, 1.0], [3.0, 7.0, -1.0], [3.0, 7.0, -1.0]], [[0.0, -1.0, 6.0], [-7.0, -7.0, 6.0], [-4.0, 1.0, 7.0], [-4.0, -5.0, 
--3.0], [0.0, 5.0, -7.0]]])+(1.-msk_arg1)*numpy.array([[[7.0, 5.0, 6.0], [6.0, -7.0, 7.0], [0.0, -4.0, -2.0], [7.0, -5.0, 6.0], 
-[6.0, -3.0, 0.0]], [[-3.0, 5.0, 2.0], [-7.0, -6.0, -7.0], [2.0, -3.0, -4.0], [-4.0, -6.0, 0.0], [1.0, 3.0, -3.0]], [[0.0, 0.0, 
--7.0], [-3.0, 2.0, -6.0], [1.0, 1.0, -3.0], [-4.0, -3.0, -6.0], [2.0, 6.0, 4.0]], [[0.0, 1.0, -1.0], [2.0, 7.0, 2.0], [-1.0, 
-1.0, 1.0], [6.0, 7.0, 3.0], [-3.0, 0.0, 2.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[1.0, 6.0, 1.0], [5.0, 0.0, 3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-3.0, -7.0, -2.0], [4.0, 7.0, 0.0]]))
+      arg1=Data(numpy.array([[[0.0, -4.0, -5.0], [2.0, -6.0, 5.0], [1.0, 7.0, -5.0], [0.0, 0.0, 3.0], [2.0, 0.0, -6.0]], [[0.0, 
+-5.0, 4.0], [0.0, -6.0, -2.0], [-3.0, -7.0, -5.0], [0.0, 1.0, 7.0], [-7.0, 6.0, -7.0]], [[2.0, -1.0, 5.0], [-2.0, -2.0, -6.0], 
+[-5.0, -7.0, -7.0], [5.0, -7.0, 0.0], [0.0, -3.0, 7.0]], [[-6.0, 1.0, 5.0], [3.0, -3.0, 4.0], [-2.0, -7.0, 7.0], [0.0, 6.0, 
+-4.0], [4.0, -3.0, 3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-5.0, 5.0, 5.0], [5.0, -3.0, 6.0], [6.0, 5.0, 5.0], [4.0, -3.0, 0.0], [4.0, 5.0, 
+0.0]], [[0.0, 0.0, 5.0], [5.0, 0.0, 5.0], [2.0, 7.0, 2.0], [7.0, -7.0, 7.0], [0.0, 0.0, 4.0]], [[0.0, 7.0, -4.0], [3.0, 1.0, 
+-7.0], [3.0, -3.0, 1.0], [4.0, 0.0, 3.0], [-4.0, -2.0, 0.0]], [[-6.0, -5.0, -5.0], [1.0, -4.0, 7.0], [5.0, -1.0, -5.0], [3.0, 
+0.0, 5.0], [2.0, 0.0, -7.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-40.0, -46.0, -23.0, 13.0, 29.0], [-59.0, 3.0, -42.0, 77.0, -10.0], [16.0, 35.0, 44.0, 68.0, 
-68.0], [-31.0, -108.0, -41.0, -43.0, 63.0]], [[-20.0, -24.0, -7.0, 11.0, 13.0], [-31.0, 3.0, -18.0, 37.0, 0.0], [10.0, 15.0, 
-22.0, 32.0, 32.0], [-15.0, -54.0, -23.0, -21.0, 29.0]]])+(1.-msk_ref)*numpy.array([[[29.0, 21.0, -12.0, 19.0, -3.0], [13.0, 
--34.0, -19.0, -6.0, -9.0], [-28.0, -22.0, -11.0, -27.0, 22.0], [-3.0, 15.0, 5.0, 19.0, 8.0]], [[-14.0, -29.0, -14.0, -34.0, 
--42.0], [34.0, 9.0, -30.0, 12.0, -9.0], [-21.0, 4.0, -13.0, 0.0, 12.0], [-1.0, 8.0, 11.0, -13.0, 24.0]]])
+      ref=msk_ref*numpy.array([[[-29.0, -29.0, 38.0, 3.0, -4.0], [-26.0, -38.0, -50.0, 13.0, 22.0], [1.0, -20.0, -54.0, -37.0, 
+-11.0], [5.0, -11.0, -37.0, 32.0, -11.0]], [[-15.0, 25.0, -10.0, 9.0, -8.0], [12.0, -6.0, -30.0, 21.0, -56.0], [25.0, -28.0, 
+-46.0, 25.0, 21.0], [-15.0, 27.0, 11.0, -12.0, 29.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, -6.0, -63.0, 9.0, -47.0], [-10.0, 
+-25.0, -59.0, 14.0, -8.0], [-41.0, -2.0, 10.0, -18.0, 26.0], [63.0, 11.0, 2.0, -19.0, 8.0]], [[15.0, -1.0, 59.0, -5.0, 51.0], 
+[0.0, 20.0, 57.0, -21.0, 0.0], [49.0, 19.0, -9.0, 16.0, -30.0], [-59.0, -24.0, 13.0, 12.0, 8.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, 4.0, 7.0], [0.0, -5.0, 0.0]], [[-7.0, -6.0, -2.0], [3.0, 6.0, 
--2.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 5.0, 5.0], [4.0, 4.0, -7.0]], [[5.0, 2.0, 3.0], [-5.0, -3.0, -1.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[-2.0, -2.0, -3.0], [4.0, 7.0, 0.0]], [[2.0, 4.0, 3.0], [-5.0, 0.0, -7.0]], [[4.0, -7.0, 
-3.0], [-6.0, 4.0, 6.0]], [[-2.0, -7.0, -4.0], [0.0, -3.0, 4.0]], [[4.0, 2.0, 0.0], [3.0, 6.0, 3.0]]], [[[-1.0, -6.0, 3.0], 
-[-1.0, -5.0, -5.0]], [[3.0, -7.0, 5.0], [-7.0, -7.0, -3.0]], [[-1.0, -7.0, 2.0], [5.0, -7.0, 6.0]], [[-2.0, -3.0, 4.0], [-1.0, 
--7.0, 0.0]], [[4.0, -6.0, 3.0], [5.0, -5.0, -4.0]]], [[[-3.0, -1.0, 4.0], [-7.0, 5.0, 4.0]], [[-6.0, -5.0, 0.0], [7.0, -3.0, 
--1.0]], [[7.0, -7.0, -1.0], [3.0, -3.0, -2.0]], [[-2.0, -3.0, 3.0], [0.0, -4.0, -5.0]], [[5.0, -6.0, -5.0], [-6.0, 6.0, 
--4.0]]], [[[-3.0, 0.0, -6.0], [-5.0, -1.0, 3.0]], [[-5.0, -5.0, 2.0], [7.0, -3.0, 5.0]], [[0.0, 5.0, 7.0], [-2.0, -7.0, 0.0]], 
-[[7.0, 3.0, 0.0], [-4.0, 6.0, 3.0]], [[0.0, 3.0, 2.0], [-3.0, -6.0, 0.0]]]])+(1.-msk_arg1)*numpy.array([[[[7.0, -2.0, -2.0], 
-[3.0, 0.0, 1.0]], [[-2.0, -3.0, -4.0], [-6.0, 1.0, 3.0]], [[-2.0, 3.0, 0.0], [7.0, -2.0, -5.0]], [[-5.0, 0.0, 2.0], [0.0, 2.0, 
--5.0]], [[2.0, 5.0, -6.0], [-4.0, 5.0, -1.0]]], [[[-4.0, 4.0, -5.0], [-2.0, 6.0, 6.0]], [[0.0, -6.0, 3.0], [5.0, 4.0, 3.0]], 
-[[5.0, 3.0, 1.0], [4.0, -1.0, -4.0]], [[-5.0, -6.0, 0.0], [6.0, -1.0, -6.0]], [[5.0, -6.0, 2.0], [1.0, 7.0, 5.0]]], [[[4.0, 
-7.0, 3.0], [-4.0, -2.0, -1.0]], [[0.0, 0.0, -2.0], [4.0, -7.0, 3.0]], [[5.0, 6.0, -3.0], [6.0, -4.0, 4.0]], [[4.0, -6.0, -4.0], 
-[-7.0, 3.0, 2.0]], [[-2.0, 5.0, -5.0], [-6.0, -5.0, 2.0]]], [[[0.0, -6.0, -7.0], [-3.0, 1.0, 4.0]], [[-3.0, -3.0, 3.0], [3.0, 
--1.0, 1.0]], [[5.0, 0.0, 6.0], [1.0, 5.0, 2.0]], [[6.0, 6.0, 0.0], [7.0, 6.0, -2.0]], [[-1.0, 4.0, 6.0], [1.0, 0.0, 6.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[1.0, 5.0, -7.0], [-5.0, 2.0, 0.0]], [[-4.0, 1.0, 0.0], [0.0, 1.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, -2.0, -2.0], [-5.0, -3.0, -1.0]], [[3.0, -1.0, -4.0], [-5.0, 1.0, -6.0]]]))
+      arg1=Data(numpy.array([[[[0.0, -7.0, 0.0], [-1.0, 5.0, 6.0]], [[5.0, 4.0, 4.0], [-5.0, 0.0, 5.0]], [[-3.0, 4.0, 0.0], 
+[-3.0, -4.0, -5.0]], [[7.0, 7.0, 0.0], [-3.0, -3.0, 5.0]], [[4.0, 3.0, -1.0], [4.0, 1.0, -6.0]]], [[[-4.0, -7.0, -4.0], [4.0, 
+-6.0, 0.0]], [[3.0, -1.0, 0.0], [-1.0, -3.0, 3.0]], [[-5.0, 1.0, -1.0], [1.0, 5.0, 3.0]], [[-6.0, -6.0, -4.0], [2.0, 7.0, 
+-7.0]], [[6.0, 0.0, -4.0], [1.0, -6.0, 2.0]]], [[[0.0, -2.0, 7.0], [1.0, 5.0, 6.0]], [[4.0, -7.0, 3.0], [-4.0, 0.0, 6.0]], 
+[[5.0, 6.0, 3.0], [-3.0, -4.0, 0.0]], [[-5.0, -1.0, 4.0], [1.0, 5.0, 4.0]], [[0.0, 6.0, 2.0], [-3.0, -4.0, -3.0]]], [[[0.0, 
+4.0, 5.0], [7.0, -5.0, -6.0]], [[0.0, -3.0, -5.0], [5.0, -7.0, -2.0]], [[2.0, -7.0, 4.0], [-2.0, 0.0, -3.0]], [[2.0, -4.0, 
+2.0], [6.0, -5.0, -7.0]], [[-4.0, 6.0, 0.0], [-1.0, -1.0, 7.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, 0.0, -5.0], [5.0, 4.0, -5.0]], [[4.0, 3.0, 2.0], [4.0, -2.0, 0.0]], [[-5.0, 
+0.0, 1.0], [5.0, -3.0, 4.0]], [[-6.0, -2.0, -7.0], [0.0, 1.0, 3.0]], [[4.0, 3.0, 6.0], [7.0, 2.0, 3.0]]], [[[-5.0, 3.0, 1.0], 
+[0.0, 0.0, 4.0]], [[-4.0, -5.0, 0.0], [1.0, -5.0, 0.0]], [[0.0, 4.0, 5.0], [5.0, 3.0, -5.0]], [[4.0, 6.0, -1.0], [1.0, -5.0, 
+4.0]], [[6.0, 0.0, 7.0], [5.0, 6.0, -1.0]]], [[[1.0, -1.0, 0.0], [-4.0, 5.0, -1.0]], [[-2.0, 6.0, 6.0], [-5.0, -1.0, 1.0]], 
+[[-7.0, -2.0, 0.0], [0.0, 5.0, -7.0]], [[4.0, 0.0, 0.0], [1.0, -2.0, -7.0]], [[0.0, -5.0, 4.0], [2.0, 7.0, -7.0]]], [[[4.0, 
+0.0, 2.0], [-7.0, 3.0, 0.0]], [[-2.0, 5.0, 0.0], [-5.0, -3.0, 2.0]], [[7.0, 7.0, 0.0], [-2.0, 0.0, -3.0]], [[-2.0, 6.0, 0.0], 
+[2.0, 0.0, -1.0]], [[0.0, 0.0, 6.0], [-3.0, -6.0, -1.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-54.0, 27.0, -47.0, -31.0, -42.0], [27.0, 27.0, 26.0, 61.0, 2.0], [14.0, 25.0, -55.0, 39.0, 
--114.0], [-22.0, 34.0, 104.0, -53.0, 56.0]], [[86.0, -45.0, 2.0, 38.0, -1.0], [14.0, -46.0, 6.0, -21.0, -5.0], [20.0, 77.0, 
--10.0, 12.0, 37.0], [6.0, 54.0, -92.0, -49.0, -67.0]]])+(1.-msk_ref)*numpy.array([[[-36.0, -70.0, 76.0, 68.0, 0.0], [-19.0, 
-0.0, 45.0, 47.0, -38.0], [21.0, -43.0, -20.0, -92.0, -52.0], [-101.0, 10.0, 25.0, 78.0, 15.0]], [[9.0, -4.0, -28.0, -20.0, 
-8.0], [-41.0, -43.0, 21.0, -58.0, -12.0], [70.0, -8.0, 6.0, 20.0, 28.0], [-25.0, -25.0, 21.0, -9.0, 10.0]]])
+      ref=msk_ref*numpy.array([[[-20.0, 22.0, 24.0, 51.0, 8.0], [-43.0, -3.0, 12.0, -4.0, 17.0], [-54.0, -32.0, 21.0, -33.0, 
+23.0], [-60.0, -19.0, -51.0, -72.0, 29.0]], [[4.0, -11.0, 7.0, -19.0, -18.0], [3.0, -13.0, 29.0, 18.0, -28.0], [9.0, -17.0, 
+-18.0, 28.0, -1.0], [-7.0, -12.0, -18.0, -24.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[13.0, 4.0, -57.0, -30.0, -34.0], [-47.0, 
+-8.0, -47.0, 24.0, -14.0], [15.0, -11.0, -53.0, 36.0, -22.0], [50.0, 8.0, 48.0, -35.0, 22.0]], [[44.0, -21.0, -71.0, -5.0, 
+-66.0], [-46.0, -17.0, -16.0, -24.0, -23.0], [35.0, -18.0, 28.0, 47.0, 28.0], [42.0, -1.0, 42.0, -16.0, -9.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank1_expandedData_rank3_offset0(self):
+      arg0=Data(numpy.array([7.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([4.0, -5.0]))
+      arg1=Data(numpy.array([[[-2.0, -5.0], [1.0, 4.0]], [[7.0, -7.0], [2.0, -7.0]], [[1.0, 1.0], [-1.0, -3.0]], [[-1.0, 6.0], 
+[0.0, 2.0]], [[-3.0, 6.0], [-6.0, -3.0]], [[0.0, 6.0], [-5.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, -2.0], [7.0, 0.0]], [[-3.0, -3.0], [-6.0, 1.0]], [[0.0, 0.0], [1.0, -4.0]], 
+[[5.0, -2.0], [0.0, 0.0]], [[0.0, 7.0], [5.0, 7.0]], [[-7.0, -7.0], [-7.0, 0.0]]]))
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-14.0, -35.0], [7.0, 28.0]], [[49.0, -49.0], [14.0, -49.0]], [[7.0, 7.0], [-7.0, -21.0]], 
+[[-7.0, 42.0], [0.0, 14.0]], [[-21.0, 42.0], [-42.0, -21.0]], [[0.0, 42.0], [-35.0, 42.0]]], [[[10.0, 25.0], [-5.0, -20.0]], 
+[[-35.0, 35.0], [-10.0, 35.0]], [[-5.0, -5.0], [5.0, 15.0]], [[5.0, -30.0], [0.0, -10.0]], [[15.0, -30.0], [30.0, 15.0]], 
+[[0.0, -30.0], [25.0, -30.0]]]])+(1.-msk_ref)*numpy.array([[[[-4.0, -8.0], [28.0, 0.0]], [[-12.0, -12.0], [-24.0, 4.0]], [[0.0, 
+0.0], [4.0, -16.0]], [[20.0, -8.0], [0.0, 0.0]], [[0.0, 28.0], [20.0, 28.0]], [[-28.0, -28.0], [-28.0, 0.0]]], [[[5.0, 10.0], 
+[-35.0, 0.0]], [[15.0, 15.0], [30.0, -5.0]], [[0.0, 0.0], [-5.0, 20.0]], [[-25.0, 10.0], [0.0, 0.0]], [[0.0, -35.0], [-25.0, 
+-35.0]], [[35.0, 35.0], [35.0, 0.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[-5.0, 5.0, -4.0], [7.0, 1.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, 4.0, 0.0], [-2.0, -7.0, -5.0]]))
+      arg1=Data(numpy.array([[[[4.0, 2.0, 6.0], [1.0, -3.0, -1.0]], [[-2.0, -7.0, -1.0], [-7.0, -6.0, 5.0]]], [[[2.0, 3.0, 
+-3.0], [0.0, 2.0, -1.0]], [[4.0, 4.0, -7.0], [6.0, 1.0, 4.0]]], [[[-1.0, 0.0, 5.0], [-2.0, 2.0, 4.0]], [[-7.0, -6.0, -3.0], 
+[6.0, 6.0, 0.0]]], [[[1.0, 0.0, -1.0], [1.0, 3.0, -4.0]], [[6.0, -2.0, -2.0], [-1.0, 0.0, -3.0]]], [[[-5.0, -7.0, 1.0], [-6.0, 
+7.0, 7.0]], [[-3.0, -2.0, -4.0], [0.0, 2.0, -5.0]]], [[[0.0, 7.0, -5.0], [-5.0, 4.0, 1.0]], [[-1.0, -3.0, 2.0], [-7.0, -2.0, 
+-5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, 2.0, 7.0], [-2.0, -5.0, 0.0]], [[-7.0, 0.0, -3.0], [2.0, 1.0, 7.0]]], [[[-2.0, 
+0.0, 4.0], [6.0, -6.0, 7.0]], [[-1.0, 0.0, 0.0], [4.0, -6.0, 0.0]]], [[[6.0, 4.0, 7.0], [-7.0, -1.0, -5.0]], [[4.0, -7.0, 5.0], 
+[-1.0, -4.0, -7.0]]], [[[0.0, -4.0, -4.0], [1.0, -6.0, -4.0]], [[-1.0, -2.0, 0.0], [0.0, 6.0, -7.0]]], [[[5.0, -2.0, -6.0], 
+[-2.0, -4.0, -6.0]], [[0.0, -2.0, -1.0], [-2.0, -6.0, 4.0]]], [[[-4.0, 0.0, -6.0], [1.0, -4.0, 7.0]], [[0.0, -7.0, -7.0], [1.0, 
+-2.0, -1.0]]]]))
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-34.0, -16.0], [-21.0, -15.0]], [[17.0, 14.0], [28.0, -41.0]], [[-15.0, 4.0], [17.0, 0.0]], 
+[[-1.0, 26.0], [-32.0, 17.0]], [[-14.0, 37.0], [21.0, 30.0]], [[55.0, 41.0], [-18.0, 45.0]]], [[[12.0, 7.0], [-18.0, -70.0]], 
+[[26.0, 5.0], [53.0, 31.0]], [[-22.0, -24.0], [-46.0, 48.0]], [[10.0, 22.0], [46.0, 2.0]], [[-45.0, -56.0], [-11.0, 17.0]], 
+[[22.0, -34.0], [-16.0, -36.0]]]])+(1.-msk_ref)*numpy.array([[[[9.0, -22.0], [-7.0, 6.0]], [[-2.0, -18.0], [-1.0, -20.0]], 
+[[22.0, -11.0], [-24.0, -17.0]], [[-16.0, -23.0], [-9.0, 24.0]], [[-3.0, -18.0], [-8.0, -26.0]], [[-4.0, -15.0], [-28.0, 
+-7.0]]], [[[-51.0, 39.0], [29.0, -46.0]], [[-16.0, -5.0], [2.0, 34.0]], [[-75.0, 46.0], [16.0, 65.0]], [[48.0, 60.0], [16.0, 
+-7.0]], [[34.0, 62.0], [19.0, 26.0]], [[38.0, -9.0], [84.0, 17.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not res.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[0.0, -4.0, 2.0, 2.0, -1.0], [6.0, -6.0, 4.0, -2.0, 0.0], [-5.0, -2.0, 0.0, -1.0, -2.0], [6.0, 
+-2.0, 0.0, 1.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[6.0, 0.0, -1.0, -6.0, 0.0], [2.0, -6.0, 1.0, 7.0, -6.0], [-1.0, -6.0, 0.0, 7.0, 7.0], 
+[6.0, 3.0, 5.0, 0.0, 0.0]]))
+      arg1=-4.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-0.0, 16.0, -8.0, -8.0, 4.0], [-24.0, 24.0, -16.0, 8.0, -0.0], [20.0, 8.0, -0.0, 4.0, 8.0], 
+[-24.0, 8.0, -0.0, -4.0, 8.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-24.0, -0.0, 4.0, 24.0, -0.0], [-8.0, 24.0, -4.0, -28.0, 24.0], [4.0, 24.0, -0.0, 
+-28.0, -28.0], [-24.0, -12.0, -20.0, -0.0, -0.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[6.0, 0.0, -6.0, 3.0, -2.0], [-1.0, -7.0, 0.0, -4.0, 0.0], [3.0, 3.0, -5.0, -7.0, 1.0], [7.0, 
+-2.0, 6.0, -7.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 0.0, -3.0, 0.0, 5.0], [-1.0, 3.0, 3.0, 0.0, 3.0], [3.0, -3.0, -5.0, 0.0, -2.0], 
+[5.0, 2.0, 7.0, -1.0, 5.0]]))
+      arg1=numpy.array(-2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-12.0, -0.0, 12.0, -6.0, 4.0], [2.0, 14.0, -0.0, 8.0, -0.0], [-6.0, -6.0, 10.0, 14.0, -2.0], 
+[-14.0, 4.0, -12.0, 14.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[10.0, -0.0, 6.0, -0.0, -10.0], [2.0, -6.0, -6.0, -0.0, -6.0], [-6.0, 6.0, 10.0, -0.0, 
+4.0], [-10.0, -4.0, -14.0, 2.0, -10.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[5.0, -3.0, -1.0], [6.0, 0.0, -2.0], [2.0, -2.0, 0.0], [0.0, -1.0, -4.0], [5.0, -3.0, 5.0]], 
+[[3.0, 0.0, 0.0], [7.0, 2.0, -5.0], [-5.0, 6.0, 3.0], [-7.0, 2.0, -2.0], [7.0, -3.0, 3.0]], [[0.0, 2.0, -1.0], [-2.0, 0.0, 
+-6.0], [-6.0, 0.0, -5.0], [4.0, 0.0, 0.0], [0.0, 3.0, 2.0]], [[2.0, 4.0, -5.0], [-2.0, 2.0, 3.0], [4.0, 0.0, -2.0], [-7.0, 4.0, 
+3.0], [7.0, -4.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, 2.0, 7.0], [0.0, -3.0, -7.0], [-5.0, 1.0, -6.0], [0.0, 3.0, -5.0], [6.0, 4.0, 
+2.0]], [[4.0, 2.0, -7.0], [4.0, 6.0, 7.0], [-7.0, 0.0, 2.0], [0.0, -3.0, -5.0], [6.0, 7.0, -1.0]], [[1.0, 1.0, 5.0], [0.0, 2.0, 
+0.0], [-5.0, 1.0, 5.0], [0.0, 4.0, 0.0], [-3.0, 4.0, 6.0]], [[-1.0, 6.0, 2.0], [3.0, 3.0, -6.0], [-2.0, 2.0, 4.0], [-2.0, -6.0, 
+5.0], [1.0, -1.0, -2.0]]]))
+      arg1=numpy.array([1.0, -5.0, 2.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[18.0, 2.0, 12.0, -3.0, 30.0], [3.0, -13.0, -29.0, -21.0, 28.0], [-12.0, -14.0, -16.0, 4.0, -11.0], 
+[-28.0, -6.0, 0.0, -21.0, 37.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[5.0, 1.0, -22.0, -25.0, -10.0], [-20.0, -12.0, -3.0, 5.0, -31.0], [6.0, -10.0, 0.0, 
+-20.0, -11.0], [-27.0, -24.0, -4.0, 38.0, 2.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-5.0, -2.0, 2.0], [3.0, -3.0, -4.0]], [[-7.0, 5.0, 4.0], [-5.0, 7.0, 5.0]], [[2.0, -6.0, 3.0], 
+[1.0, -1.0, -2.0]], [[-4.0, -2.0, -6.0], [4.0, 7.0, 3.0]], [[-5.0, 4.0, 0.0], [5.0, 2.0, 5.0]]], [[[-1.0, 2.0, 2.0], [1.0, 0.0, 
+-6.0]], [[0.0, -1.0, -5.0], [-7.0, -3.0, -6.0]], [[6.0, -2.0, -4.0], [7.0, -5.0, 2.0]], [[-6.0, -6.0, 0.0], [-3.0, -3.0, 
+-4.0]], [[0.0, 5.0, -7.0], [1.0, 7.0, 0.0]]], [[[-3.0, 4.0, 4.0], [5.0, 1.0, 0.0]], [[-4.0, -2.0, 2.0], [-1.0, 5.0, 6.0]], 
+[[1.0, -6.0, 0.0], [7.0, 7.0, 2.0]], [[1.0, -4.0, 3.0], [3.0, 0.0, -4.0]], [[-2.0, 7.0, 0.0], [-7.0, 5.0, 1.0]]], [[[-5.0, 5.0, 
+7.0], [1.0, 4.0, 0.0]], [[4.0, 4.0, -6.0], [-4.0, 0.0, 6.0]], [[0.0, -6.0, -5.0], [-3.0, 7.0, 5.0]], [[2.0, 4.0, 7.0], [-4.0, 
+0.0, 1.0]], [[0.0, 5.0, 4.0], [6.0, 2.0, 6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-3.0, -6.0, 3.0], [6.0, 0.0, -3.0]], [[-3.0, -4.0, -1.0], [-6.0, 4.0, 0.0]], 
+[[-2.0, -6.0, -5.0], [0.0, 7.0, 0.0]], [[-5.0, -5.0, 3.0], [-2.0, 1.0, 0.0]], [[-4.0, 7.0, 4.0], [-5.0, -3.0, -3.0]]], [[[4.0, 
+0.0, 7.0], [7.0, 4.0, 2.0]], [[-7.0, -6.0, 6.0], [7.0, 4.0, -7.0]], [[-4.0, -6.0, 4.0], [0.0, -3.0, 2.0]], [[-2.0, 3.0, 5.0], 
+[-6.0, 3.0, 0.0]], [[-3.0, -4.0, -3.0], [6.0, -2.0, 2.0]]], [[[6.0, -7.0, -5.0], [-4.0, 4.0, -5.0]], [[-2.0, 7.0, 2.0], [-6.0, 
+5.0, -2.0]], [[1.0, 3.0, 3.0], [-7.0, -5.0, 4.0]], [[-3.0, -2.0, -4.0], [4.0, 4.0, -7.0]], [[-5.0, -1.0, 7.0], [0.0, 0.0, 
+-1.0]]], [[[-1.0, -2.0, 0.0], [-2.0, 2.0, -7.0]], [[7.0, -4.0, -1.0], [-5.0, 3.0, 3.0]], [[5.0, 1.0, -3.0], [5.0, -3.0, -6.0]], 
+[[4.0, 2.0, -4.0], [2.0, -7.0, 5.0]], [[2.0, 4.0, -5.0], [1.0, 4.0, -4.0]]]]))
+      arg1=numpy.array([[2.0, -2.0, 6.0], [3.0, 4.0, 1.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[-1.0, 18.0, 31.0, 3.0, 10.0], [3.0, -67.0, -5.0, -25.0, -21.0], [29.0, 31.0, 65.0, 33.0, -18.0], 
+[41.0, -42.0, 6.0, 27.0, 46.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[39.0, -6.0, 6.0, 16.0, -28.0], [89.0, 64.0, 18.0, 14.0, -4.0], [-5.0, -6.0, -23.0, 
+-5.0, 33.0], [-3.0, 16.0, -13.0, -37.0, -19.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[2.0, 7.0, -5.0, -4.0, -7.0], [-1.0, -6.0, 0.0, -5.0, -6.0], [2.0, 1.0, 7.0, 0.0, 7.0], [2.0, 2.0, 
+-5.0, -4.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[2.0, -3.0, -6.0, 5.0, 4.0], [1.0, 5.0, 7.0, 2.0, 0.0], [4.0, 3.0, -2.0, 4.0, 1.0], 
+[-1.0, 3.0, 1.0, 4.0, 1.0]]))
+      arg1=numpy.array([-5.0, -3.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-10.0, -6.0], [-35.0, -21.0], [25.0, 15.0], [20.0, 12.0], [35.0, 21.0]], [[5.0, 3.0], [30.0, 
+18.0], [0.0, 0.0], [25.0, 15.0], [30.0, 18.0]], [[-10.0, -6.0], [-5.0, -3.0], [-35.0, -21.0], [0.0, 0.0], [-35.0, -21.0]], 
+[[-10.0, -6.0], [-10.0, -6.0], [25.0, 15.0], [20.0, 12.0], [-35.0, -21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-10.0, -6.0], [15.0, 9.0], [30.0, 18.0], [-25.0, -15.0], [-20.0, -12.0]], [[-5.0, 
+-3.0], [-25.0, -15.0], [-35.0, -21.0], [-10.0, -6.0], [0.0, 0.0]], [[-20.0, -12.0], [-15.0, -9.0], [10.0, 6.0], [-20.0, -12.0], 
+[-5.0, -3.0]], [[5.0, 3.0], [-15.0, -9.0], [-5.0, -3.0], [-20.0, -12.0], [-5.0, -3.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-3.0, 4.0, -4.0], [-2.0, 2.0, 4.0], [6.0, -1.0, -3.0], [-6.0, 3.0, -7.0], [-1.0, 4.0, 6.0]], 
+[[3.0, -5.0, 5.0], [0.0, -6.0, 6.0], [4.0, 2.0, 2.0], [-3.0, 7.0, -4.0], [-7.0, -4.0, 0.0]], [[0.0, -3.0, 3.0], [-2.0, -1.0, 
+7.0], [-6.0, 2.0, 5.0], [-2.0, 1.0, 3.0], [2.0, 6.0, 5.0]], [[4.0, 4.0, 2.0], [-5.0, 2.0, 3.0], [-5.0, -6.0, 5.0], [-3.0, 4.0, 
+-2.0], [6.0, 6.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, 6.0, -3.0], [-7.0, 7.0, 3.0], [0.0, -1.0, -3.0], [6.0, 4.0, 5.0], [-2.0, -4.0, 
+5.0]], [[7.0, -1.0, -6.0], [3.0, -3.0, 0.0], [6.0, -1.0, 6.0], [-2.0, 6.0, -6.0], [-7.0, 4.0, 2.0]], [[2.0, 4.0, 6.0], [7.0, 
+0.0, 0.0], [-2.0, 0.0, 5.0], [-1.0, 4.0, -5.0], [0.0, -7.0, 3.0]], [[-1.0, -7.0, -1.0], [7.0, 5.0, 3.0], [1.0, 3.0, -4.0], 
+[-5.0, -4.0, -1.0], [6.0, 0.0, 3.0]]]))
+      arg1=numpy.array([[-2.0, 5.0, -3.0], [1.0, 4.0, 7.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[38.0, -15.0], [2.0, 34.0], [-8.0, -19.0], [48.0, -43.0], [4.0, 57.0]], [[-46.0, 18.0], [-48.0, 
+18.0], [-4.0, 26.0], [53.0, -3.0], [-6.0, -23.0]], [[-24.0, 9.0], [-22.0, 43.0], [7.0, 37.0], [0.0, 23.0], [11.0, 61.0]], 
+[[6.0, 34.0], [11.0, 24.0], [-35.0, 6.0], [32.0, -1.0], [27.0, 9.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[25.0, 10.0], [40.0, 42.0], [4.0, -25.0], [-7.0, 57.0], [-31.0, 17.0]], [[-1.0, 
+-39.0], [-21.0, -9.0], [-35.0, 44.0], [52.0, -20.0], [28.0, 23.0]], [[-2.0, 60.0], [-14.0, 7.0], [-11.0, 33.0], [37.0, -20.0], 
+[-44.0, -7.0]], [[-30.0, -36.0], [2.0, 48.0], [25.0, -15.0], [-7.0, -28.0], [-21.0, 27.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[2.0, 7.0, -6.0], [-6.0, 1.0, 6.0]], [[1.0, 6.0, -1.0], [-5.0, 1.0, 2.0]], [[-3.0, -2.0, -6.0], 
+[-6.0, -4.0, -2.0]], [[-3.0, 2.0, -7.0], [6.0, 0.0, 4.0]], [[-5.0, -4.0, -7.0], [4.0, 1.0, -7.0]]], [[[6.0, -4.0, -3.0], [0.0, 
+4.0, 6.0]], [[6.0, 4.0, -5.0], [1.0, 7.0, 0.0]], [[-2.0, -2.0, 1.0], [-1.0, 6.0, 0.0]], [[-4.0, 5.0, -6.0], [-3.0, 6.0, 0.0]], 
+[[-5.0, 3.0, 1.0], [2.0, 0.0, -7.0]]], [[[-1.0, 5.0, -2.0], [1.0, 5.0, -1.0]], [[-5.0, 5.0, 2.0], [2.0, -2.0, 0.0]], [[-6.0, 
+-5.0, -5.0], [0.0, 3.0, 7.0]], [[4.0, -7.0, 0.0], [0.0, 1.0, -4.0]], [[-4.0, 0.0, 7.0], [-7.0, 6.0, 7.0]]], [[[6.0, 1.0, 1.0], 
+[3.0, -6.0, 1.0]], [[1.0, -6.0, -6.0], [7.0, -1.0, 3.0]], [[-4.0, -4.0, -4.0], [6.0, 4.0, 3.0]], [[0.0, -7.0, 5.0], [6.0, -7.0, 
+-4.0]], [[-2.0, 0.0, -4.0], [4.0, -3.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, -5.0, 5.0], [3.0, 0.0, 7.0]], [[7.0, 0.0, -2.0], [-7.0, -2.0, 1.0]], [[-2.0, 
+2.0, -4.0], [1.0, 1.0, 0.0]], [[4.0, 2.0, 0.0], [0.0, -2.0, 5.0]], [[0.0, 0.0, -5.0], [6.0, 2.0, 0.0]]], [[[-6.0, -3.0, -3.0], 
+[2.0, 3.0, 7.0]], [[-3.0, -2.0, -7.0], [-2.0, -2.0, 0.0]], [[-1.0, 6.0, 2.0], [-5.0, 4.0, -4.0]], [[6.0, -4.0, 0.0], [2.0, 
+-5.0, -3.0]], [[0.0, 7.0, -7.0], [-5.0, 7.0, 4.0]]], [[[-2.0, 4.0, 6.0], [5.0, 3.0, -4.0]], [[-2.0, 6.0, 0.0], [0.0, 6.0, 
+-7.0]], [[0.0, 5.0, -6.0], [1.0, 7.0, -4.0]], [[3.0, 5.0, 0.0], [5.0, 5.0, -3.0]], [[-3.0, 5.0, 0.0], [2.0, -2.0, -2.0]]], 
+[[[-2.0, 0.0, -6.0], [-4.0, -6.0, 2.0]], [[0.0, -2.0, 2.0], [5.0, 0.0, 0.0]], [[6.0, 4.0, 1.0], [-2.0, 7.0, -2.0]], [[5.0, 
+-3.0, 0.0], [-6.0, -5.0, -5.0]], [[3.0, 7.0, -5.0], [6.0, 6.0, -3.0]]]]))
+      arg1=numpy.array([[[-2.0, -2.0, 2.0], [3.0, -1.0, 1.0]], [[0.0, 4.0, 2.0], [-6.0, 5.0, -6.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[-43.0, 21.0], [-30.0, 45.0], [-18.0, 8.0], [10.0, -66.0], [8.0, -7.0]], [[-8.0, -38.0], [-34.0, 
+35.0], [1.0, 30.0], [-29.0, 56.0], [5.0, 44.0]], [[-15.0, 41.0], [12.0, 2.0], [16.0, -57.0], [1.0, 1.0], [2.0, 44.0]], [[4.0, 
+-48.0], [23.0, -101.0], [25.0, -58.0], [45.0, -65.0], [13.0, -59.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[38.0, -70.0], [-36.0, 22.0], [-6.0, -1.0], [-5.0, -32.0], [6.0, -36.0]], [[22.0, 
+-57.0], [-8.0, -20.0], [-29.0, 102.0], [4.0, -35.0], [-46.0, 55.0]], [[16.0, 37.0], [-21.0, 96.0], [-30.0, 61.0], [-9.0, 33.0], 
+[2.0, 10.0]], [[-12.0, -30.0], [23.0, -34.0], [-33.0, 77.0], [-22.0, 29.0], [-21.0, 30.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_array_rank2_offset0(self):
+      arg0=Data(numpy.array([[0.0, 1.0, 7.0, -3.0, 0.0], [1.0, 6.0, -3.0, 0.0, 0.0], [5.0, -2.0, 4.0, 1.0, 2.0], [0.0, 6.0, 
+-2.0, 5.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[1.0, -1.0, -2.0, 6.0, -6.0], [1.0, -5.0, -3.0, 4.0, -1.0], [0.0, -4.0, -7.0, 2.0, 
+-3.0], [0.0, -3.0, 3.0, 0.0, 2.0]]))
+      arg1=numpy.array([[0.0, 0.0, 5.0, 3.0, -2.0], [-7.0, 5.0, -2.0, -6.0, 5.0], [0.0, 0.0, 6.0, 1.0, 3.0], [3.0, 0.0, 6.0, 
+4.0, -6.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0]], [[0.0, 0.0, 5.0, 3.0, -2.0], [-7.0, 5.0, -2.0, -6.0, 5.0], [0.0, 0.0, 6.0, 1.0, 3.0], [3.0, 0.0, 6.0, 4.0, -6.0]], 
+[[0.0, 0.0, 35.0, 21.0, -14.0], [-49.0, 35.0, -14.0, -42.0, 35.0], [0.0, 0.0, 42.0, 7.0, 21.0], [21.0, 0.0, 42.0, 28.0, 
+-42.0]], [[0.0, 0.0, -15.0, -9.0, 6.0], [21.0, -15.0, 6.0, 18.0, -15.0], [0.0, 0.0, -18.0, -3.0, -9.0], [-9.0, 0.0, -18.0, 
+-12.0, 18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
+[[[0.0, 0.0, 5.0, 3.0, -2.0], [-7.0, 5.0, -2.0, -6.0, 5.0], [0.0, 0.0, 6.0, 1.0, 3.0], [3.0, 0.0, 6.0, 4.0, -6.0]], [[0.0, 0.0, 
+30.0, 18.0, -12.0], [-42.0, 30.0, -12.0, -36.0, 30.0], [0.0, 0.0, 36.0, 6.0, 18.0], [18.0, 0.0, 36.0, 24.0, -36.0]], [[0.0, 
+0.0, -15.0, -9.0, 6.0], [21.0, -15.0, 6.0, 18.0, -15.0], [0.0, 0.0, -18.0, -3.0, -9.0], [-9.0, 0.0, -18.0, -12.0, 18.0]], 
+[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[0.0, 0.0, 25.0, 15.0, -10.0], 
+[-35.0, 25.0, -10.0, -30.0, 25.0], [0.0, 0.0, 30.0, 5.0, 15.0], [15.0, 0.0, 30.0, 20.0, -30.0]], [[0.0, 0.0, -10.0, -6.0, 4.0], 
+[14.0, -10.0, 4.0, 12.0, -10.0], [0.0, 0.0, -12.0, -2.0, -6.0], [-6.0, 0.0, -12.0, -8.0, 12.0]], [[0.0, 0.0, 20.0, 12.0, -8.0], 
+[-28.0, 20.0, -8.0, -24.0, 20.0], [0.0, 0.0, 24.0, 4.0, 12.0], [12.0, 0.0, 24.0, 16.0, -24.0]], [[0.0, 0.0, 5.0, 3.0, -2.0], 
+[-7.0, 5.0, -2.0, -6.0, 5.0], [0.0, 0.0, 6.0, 1.0, 3.0], [3.0, 0.0, 6.0, 4.0, -6.0]], [[0.0, 0.0, 10.0, 6.0, -4.0], [-14.0, 
+10.0, -4.0, -12.0, 10.0], [0.0, 0.0, 12.0, 2.0, 6.0], [6.0, 0.0, 12.0, 8.0, -12.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 30.0, 18.0, -12.0], [-42.0, 30.0, -12.0, 
+-36.0, 30.0], [0.0, 0.0, 36.0, 6.0, 18.0], [18.0, 0.0, 36.0, 24.0, -36.0]], [[0.0, 0.0, -10.0, -6.0, 4.0], [14.0, -10.0, 4.0, 
+12.0, -10.0], [0.0, 0.0, -12.0, -2.0, -6.0], [-6.0, 0.0, -12.0, -8.0, 12.0]], [[0.0, 0.0, 25.0, 15.0, -10.0], [-35.0, 25.0, 
+-10.0, -30.0, 25.0], [0.0, 0.0, 30.0, 5.0, 15.0], [15.0, 0.0, 30.0, 20.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[0.0, 0.0, 5.0, 3.0, -2.0], [-7.0, 5.0, -2.0, -6.0, 5.0], [0.0, 0.0, 6.0, 1.0, 3.0], 
+[3.0, 0.0, 6.0, 4.0, -6.0]], [[0.0, 0.0, -5.0, -3.0, 2.0], [7.0, -5.0, 2.0, 6.0, -5.0], [0.0, 0.0, -6.0, -1.0, -3.0], [-3.0, 
+0.0, -6.0, -4.0, 6.0]], [[0.0, 0.0, -10.0, -6.0, 4.0], [14.0, -10.0, 4.0, 12.0, -10.0], [0.0, 0.0, -12.0, -2.0, -6.0], [-6.0, 
+0.0, -12.0, -8.0, 12.0]], [[0.0, 0.0, 30.0, 18.0, -12.0], [-42.0, 30.0, -12.0, -36.0, 30.0], [0.0, 0.0, 36.0, 6.0, 18.0], 
+[18.0, 0.0, 36.0, 24.0, -36.0]], [[0.0, 0.0, -30.0, -18.0, 12.0], [42.0, -30.0, 12.0, 36.0, -30.0], [0.0, 0.0, -36.0, -6.0, 
+-18.0], [-18.0, 0.0, -36.0, -24.0, 36.0]]], [[[0.0, 0.0, 5.0, 3.0, -2.0], [-7.0, 5.0, -2.0, -6.0, 5.0], [0.0, 0.0, 6.0, 1.0, 
+3.0], [3.0, 0.0, 6.0, 4.0, -6.0]], [[0.0, 0.0, -25.0, -15.0, 10.0], [35.0, -25.0, 10.0, 30.0, -25.0], [0.0, 0.0, -30.0, -5.0, 
+-15.0], [-15.0, 0.0, -30.0, -20.0, 30.0]], [[0.0, 0.0, -15.0, -9.0, 6.0], [21.0, -15.0, 6.0, 18.0, -15.0], [0.0, 0.0, -18.0, 
+-3.0, -9.0], [-9.0, 0.0, -18.0, -12.0, 18.0]], [[0.0, 0.0, 20.0, 12.0, -8.0], [-28.0, 20.0, -8.0, -24.0, 20.0], [0.0, 0.0, 
+24.0, 4.0, 12.0], [12.0, 0.0, 24.0, 16.0, -24.0]], [[0.0, 0.0, -5.0, -3.0, 2.0], [7.0, -5.0, 2.0, 6.0, -5.0], [0.0, 0.0, -6.0, 
+-1.0, -3.0], [-3.0, 0.0, -6.0, -4.0, 6.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, -20.0, -12.0, 8.0], [28.0, -20.0, 8.0, 24.0, -20.0], [0.0, 0.0, -24.0, -4.0, -12.0], 
+[-12.0, 0.0, -24.0, -16.0, 24.0]], [[0.0, 0.0, -35.0, -21.0, 14.0], [49.0, -35.0, 14.0, 42.0, -35.0], [0.0, 0.0, -42.0, -7.0, 
+-21.0], [-21.0, 0.0, -42.0, -28.0, 42.0]], [[0.0, 0.0, 10.0, 6.0, -4.0], [-14.0, 10.0, -4.0, -12.0, 10.0], [0.0, 0.0, 12.0, 
+2.0, 6.0], [6.0, 0.0, 12.0, 8.0, -12.0]], [[0.0, 0.0, -15.0, -9.0, 6.0], [21.0, -15.0, 6.0, 18.0, -15.0], [0.0, 0.0, -18.0, 
+-3.0, -9.0], [-9.0, 0.0, -18.0, -12.0, 18.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, -15.0, -9.0, 6.0], [21.0, -15.0, 6.0, 18.0, -15.0], [0.0, 0.0, -18.0, -3.0, 
+-9.0], [-9.0, 0.0, -18.0, -12.0, 18.0]], [[0.0, 0.0, 15.0, 9.0, -6.0], [-21.0, 15.0, -6.0, -18.0, 15.0], [0.0, 0.0, 18.0, 3.0, 
+9.0], [9.0, 0.0, 18.0, 12.0, -18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 10.0, 6.0, -4.0], [-14.0, 10.0, -4.0, -12.0, 10.0], [0.0, 0.0, 12.0, 2.0, 6.0], [6.0, 0.0, 
+12.0, 8.0, -12.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-7.0, 0.0, -3.0], [2.0, 1.0, -6.0], [-7.0, 5.0, 5.0], [1.0, 6.0, -4.0], [-3.0, 2.0, 1.0]], 
+[[6.0, -3.0, -6.0], [-1.0, -7.0, 1.0], [0.0, 1.0, -7.0], [0.0, 1.0, -2.0], [3.0, 2.0, 5.0]], [[0.0, 5.0, 7.0], [-5.0, 1.0, 
+4.0], [4.0, 0.0, 6.0], [0.0, 4.0, 0.0], [0.0, 7.0, 6.0]], [[-7.0, 0.0, -5.0], [-1.0, -3.0, -3.0], [0.0, 6.0, -2.0], [0.0, 6.0, 
+-2.0], [-5.0, 4.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[2.0, -5.0, 3.0], [7.0, -6.0, 6.0], [-3.0, 7.0, 0.0], [3.0, 3.0, 3.0], [3.0, 1.0, 
+2.0]], [[0.0, -6.0, 0.0], [-7.0, -5.0, 6.0], [-6.0, -4.0, 0.0], [4.0, 2.0, -2.0], [-3.0, 0.0, -6.0]], [[3.0, 0.0, 3.0], [0.0, 
+-1.0, 2.0], [2.0, -7.0, 3.0], [-6.0, -5.0, 6.0], [-1.0, 5.0, 1.0]], [[6.0, 7.0, 7.0], [7.0, 3.0, 0.0], [-6.0, -4.0, -7.0], 
+[1.0, 3.0, -7.0], [-6.0, -2.0, 1.0]]]))
+      arg1=numpy.array([[[-1.0, 0.0, -5.0], [7.0, 6.0, -4.0], [-7.0, 6.0, 0.0], [1.0, 2.0, 1.0], [2.0, 0.0, 0.0]], [[-6.0, 0.0, 
+-3.0], [-5.0, 0.0, 0.0], [-7.0, -6.0, -4.0], [-5.0, 7.0, 3.0], [4.0, 2.0, -6.0]], [[1.0, -4.0, 0.0], [-1.0, 4.0, -3.0], [6.0, 
+-4.0, 1.0], [0.0, 7.0, -2.0], [6.0, 0.0, 3.0]], [[5.0, 0.0, 0.0], [2.0, 4.0, -6.0], [1.0, 2.0, -2.0], [-7.0, 5.0, -2.0], [2.0, 
+3.0, -2.0]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[22.0, -37.0, 49.0, -10.0, -14.0], [51.0, 35.0, 61.0, 26.0, -10.0], [-7.0, 16.0, -45.0, 6.0, 
+-51.0], [-35.0, 4.0, -1.0, 55.0, -8.0]], [[28.0, 44.0, -8.0, -2.0, 4.0], [6.0, -10.0, 4.0, -21.0, 46.0], [-2.0, 20.0, 2.0, 
+19.0, -6.0], [10.0, 44.0, 16.0, 3.0, 19.0]], [[-18.0, -39.0, 79.0, 8.0, -14.0], [27.0, 35.0, -1.0, 85.0, -48.0], [-27.0, 12.0, 
+-57.0, 25.0, -27.0], [-35.0, -24.0, -7.0, 64.0, -9.0]], [[19.0, 59.0, 29.0, 9.0, 2.0], [6.0, -5.0, -27.0, 25.0, 40.0], [-23.0, 
+35.0, -22.0, 50.0, -6.0], [5.0, 50.0, 21.0, 31.0, 28.0]], [[-2.0, -13.0, 33.0, 2.0, -6.0], [15.0, 15.0, 5.0, 32.0, -14.0], 
+[-11.0, 8.0, -25.0, 12.0, -15.0], [-15.0, -4.0, -1.0, 29.0, -2.0]]], [[[24.0, 48.0, -60.0, -6.0, 12.0], [-18.0, -30.0, 0.0, 
+-69.0, 54.0], [18.0, 0.0, 42.0, -9.0, 18.0], [30.0, 36.0, 12.0, -45.0, 15.0]], [[-4.0, -53.0, -35.0, -14.0, -2.0], [3.0, 5.0, 
+45.0, -41.0, -24.0], [27.0, -30.0, 23.0, -51.0, -3.0], [-5.0, -36.0, -17.0, -30.0, -25.0]], [[35.0, 34.0, 6.0, -5.0, 0.0], 
+[21.0, 0.0, 22.0, -14.0, 44.0], [-4.0, 25.0, -11.0, 21.0, -21.0], [0.0, 46.0, 16.0, 19.0, 17.0]], [[10.0, 14.0, 6.0, 0.0, 0.0], 
+[6.0, 0.0, 2.0, 1.0, 14.0], [-4.0, 10.0, -6.0, 11.0, -6.0], [0.0, 16.0, 6.0, 9.0, 7.0]], [[-28.0, 13.0, -9.0, 12.0, 6.0], 
+[-33.0, -15.0, -53.0, 14.0, -14.0], [-5.0, -10.0, 15.0, 4.0, 33.0], [15.0, -16.0, -3.0, -21.0, 2.0]]], [[[-35.0, 2.0, 30.0, 
+17.0, 0.0], [-21.0, 0.0, -58.0, 56.0, -32.0], [-20.0, -1.0, -13.0, 21.0, 21.0], [0.0, -22.0, -4.0, 11.0, 1.0]], [[-15.0, -45.0, 
+41.0, 1.0, -10.0], [18.0, 25.0, 13.0, 44.0, -42.0], [-9.0, -3.0, -30.0, -1.0, -18.0], [-25.0, -30.0, -11.0, 32.0, -15.0]], 
+[[-34.0, 4.0, -28.0, 10.0, 8.0], [-42.0, -20.0, -52.0, -2.0, -20.0], [4.0, -22.0, 30.0, -12.0, 42.0], [20.0, -28.0, -8.0, 
+-40.0, -4.0]], [[0.0, 24.0, 24.0, 8.0, 0.0], [0.0, 0.0, -24.0, 28.0, 8.0], [-16.0, 16.0, -16.0, 28.0, 0.0], [0.0, 16.0, 8.0, 
+20.0, 12.0]], [[-30.0, 18.0, 42.0, 20.0, 0.0], [-18.0, 0.0, -66.0, 67.0, -22.0], [-28.0, 10.0, -22.0, 37.0, 18.0], [0.0, -8.0, 
+2.0, 23.0, 9.0]]], [[[32.0, -29.0, 49.0, -12.0, -14.0], [57.0, 35.0, 69.0, 20.0, 2.0], [-7.0, 22.0, -47.0, 10.0, -57.0], 
+[-35.0, 16.0, 3.0, 59.0, -4.0]], [[16.0, -13.0, -11.0, -10.0, -2.0], [15.0, 5.0, 37.0, -25.0, 8.0], [11.0, -2.0, 3.0, -15.0, 
+-15.0], [-5.0, 4.0, -1.0, -2.0, -5.0]], [[10.0, 44.0, 36.0, 10.0, 0.0], [6.0, 0.0, -28.0, 36.0, 24.0], [-24.0, 30.0, -26.0, 
+46.0, -6.0], [0.0, 36.0, 16.0, 34.0, 22.0]], [[10.0, 44.0, 36.0, 10.0, 0.0], [6.0, 0.0, -28.0, 36.0, 24.0], [-24.0, 30.0, 
+-26.0, 46.0, -6.0], [0.0, 36.0, 16.0, 34.0, 22.0]], [[-5.0, -19.0, 59.0, 5.0, -10.0], [24.0, 25.0, 3.0, 59.0, -24.0], [-21.0, 
+15.0, -44.0, 24.0, -24.0], [-25.0, -6.0, -1.0, 51.0, -2.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-17.0, -28.0, -44.0, -5.0, 4.0], [-21.0, -10.0, 4.0, -36.0, -20.0], [22.0, -31.0, 
+35.0, -41.0, 21.0], [10.0, -34.0, -14.0, -45.0, -17.0]], [[-37.0, -11.0, -85.0, 1.0, 14.0], [-60.0, -35.0, -37.0, -59.0, 
+-20.0], [31.0, -49.0, 72.0, -54.0, 60.0], [35.0, -46.0, -17.0, -91.0, -16.0]], [[3.0, 21.0, 63.0, 11.0, -6.0], [18.0, 15.0, 
+-21.0, 64.0, 2.0], [-31.0, 31.0, -46.0, 49.0, -18.0], [-15.0, 22.0, 11.0, 56.0, 15.0]], [[-18.0, 27.0, -3.0, 12.0, 6.0], 
+[-27.0, -15.0, -51.0, 15.0, 0.0], [-9.0, 0.0, 9.0, 15.0, 27.0], [15.0, 0.0, 3.0, -12.0, 9.0]], [[-13.0, 19.0, -15.0, 7.0, 6.0], 
+[-24.0, -15.0, -35.0, -2.0, 2.0], [-1.0, -5.0, 16.0, 3.0, 24.0], [15.0, -2.0, 1.0, -20.0, 5.0]]], [[[0.0, -36.0, -36.0, -12.0, 
+0.0], [0.0, 0.0, 36.0, -42.0, -12.0], [24.0, -24.0, 24.0, -42.0, 0.0], [0.0, -24.0, -12.0, -30.0, -18.0]], [[-23.0, -103.0, 
+19.0, -11.0, -14.0], [24.0, 35.0, 55.0, 18.0, -74.0], [13.0, -31.0, -16.0, -47.0, -24.0], [-35.0, -70.0, -29.0, 12.0, -41.0]], 
+[[6.0, -66.0, 18.0, -14.0, -12.0], [36.0, 30.0, 66.0, 2.0, -32.0], [10.0, -10.0, -20.0, -28.0, -36.0], [-30.0, -28.0, -14.0, 
+22.0, -24.0]], [[6.0, 48.0, -16.0, 6.0, 8.0], [-18.0, -20.0, -32.0, -12.0, 32.0], [-4.0, 10.0, 14.0, 18.0, 18.0], [20.0, 28.0, 
+12.0, -14.0, 18.0]], [[33.0, 3.0, 21.0, -9.0, -6.0], [36.0, 15.0, 45.0, -3.0, 24.0], [-3.0, 21.0, -24.0, 12.0, -36.0], [-15.0, 
+30.0, 9.0, 33.0, 6.0]]], [[[-18.0, 9.0, -21.0, 6.0, 6.0], [-27.0, -15.0, -33.0, -6.0, -6.0], [3.0, -12.0, 21.0, -6.0, 27.0], 
+[15.0, -12.0, -3.0, -27.0, 0.0]], [[-10.0, -14.0, -6.0, 0.0, 0.0], [-6.0, 0.0, -2.0, -1.0, -14.0], [4.0, -10.0, 6.0, -11.0, 
+6.0], [0.0, -16.0, -6.0, -9.0, -7.0]], [[-17.0, -40.0, -56.0, -9.0, 4.0], [-21.0, -10.0, 16.0, -50.0, -24.0], [30.0, -39.0, 
+43.0, -55.0, 21.0], [10.0, -42.0, -18.0, -55.0, -23.0]], [[-24.0, -96.0, 12.0, -10.0, -12.0], [18.0, 30.0, 48.0, 13.0, -70.0], 
+[14.0, -32.0, -10.0, -47.0, -18.0], [-30.0, -68.0, -28.0, 5.0, -39.0]], [[-4.0, 19.0, 37.0, 10.0, -2.0], [3.0, 5.0, -27.0, 
+43.0, 0.0], [-21.0, 18.0, -25.0, 33.0, -3.0], [-5.0, 12.0, 7.0, 30.0, 11.0]]], [[[-41.0, 56.0, 0.0, 27.0, 12.0], [-57.0, -30.0, 
+-112.0, 40.0, -4.0], [-22.0, 1.0, 15.0, 35.0, 57.0], [30.0, -2.0, 6.0, -21.0, 19.0]], [[-7.0, 67.0, -31.0, 13.0, 14.0], [-42.0, 
+-35.0, -67.0, -14.0, 34.0], [-5.0, 5.0, 30.0, 21.0, 42.0], [35.0, 26.0, 13.0, -34.0, 23.0]], [[41.0, -38.0, 18.0, -21.0, 
+-12.0], [57.0, 30.0, 94.0, -19.0, 10.0], [10.0, 11.0, -27.0, -14.0, -57.0], [-30.0, 14.0, 0.0, 36.0, -10.0]], [[34.0, 53.0, 
+11.0, 0.0, 2.0], [15.0, -5.0, 3.0, -5.0, 52.0], [-11.0, 32.0, -13.0, 35.0, -15.0], [5.0, 56.0, 21.0, 22.0, 25.0]], [[1.0, 
+-58.0, 30.0, -9.0, -12.0], [33.0, 30.0, 50.0, 19.0, -34.0], [2.0, -5.0, -27.0, -16.0, -33.0], [-30.0, -26.0, -12.0, 30.0, 
+-20.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[3.0, -7.0, 7.0], [-7.0, -7.0, 7.0]], [[5.0, 7.0, 1.0], [-4.0, 3.0, 6.0]], [[-6.0, -5.0, 6.0], 
+[0.0, -3.0, -5.0]], [[-7.0, -5.0, 0.0], [3.0, 1.0, 5.0]], [[6.0, 7.0, 0.0], [5.0, -2.0, 0.0]]], [[[3.0, -7.0, 0.0], [1.0, -4.0, 
+6.0]], [[7.0, -7.0, -2.0], [-3.0, -1.0, 3.0]], [[3.0, 2.0, 3.0], [-6.0, 1.0, -6.0]], [[7.0, 6.0, 5.0], [-2.0, 7.0, -6.0]], 
+[[5.0, 0.0, -2.0], [2.0, -3.0, -7.0]]], [[[7.0, -1.0, -5.0], [0.0, -1.0, -7.0]], [[-2.0, 0.0, 3.0], [-7.0, 5.0, 0.0]], [[-6.0, 
+4.0, -6.0], [4.0, -7.0, -1.0]], [[0.0, 3.0, 7.0], [3.0, -4.0, 0.0]], [[4.0, 6.0, 6.0], [-7.0, 3.0, -7.0]]], [[[-1.0, 4.0, 0.0], 
+[-5.0, -5.0, -3.0]], [[-7.0, 7.0, 0.0], [-5.0, 3.0, -3.0]], [[2.0, 1.0, -2.0], [-3.0, -1.0, -7.0]], [[7.0, -6.0, 2.0], [-1.0, 
+2.0, -3.0]], [[-4.0, 3.0, -7.0], [-4.0, 7.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 3.0, 2.0], [-5.0, -1.0, 0.0]], [[-7.0, 4.0, -1.0], [1.0, -4.0, 2.0]], [[0.0, 
+5.0, -1.0], [2.0, -1.0, -3.0]], [[7.0, -7.0, 5.0], [-3.0, 2.0, 4.0]], [[5.0, -4.0, -1.0], [-4.0, -2.0, -5.0]]], [[[-3.0, -5.0, 
+2.0], [-4.0, 0.0, -2.0]], [[-7.0, -6.0, 5.0], [4.0, -4.0, 4.0]], [[7.0, 7.0, 5.0], [-4.0, -3.0, 5.0]], [[0.0, 0.0, -1.0], 
+[-3.0, 0.0, 4.0]], [[3.0, 4.0, 0.0], [2.0, -4.0, 2.0]]], [[[0.0, 0.0, -3.0], [6.0, 0.0, 2.0]], [[0.0, 5.0, -1.0], [-1.0, 0.0, 
+-4.0]], [[-3.0, -4.0, 2.0], [4.0, 0.0, 3.0]], [[-5.0, -6.0, 3.0], [-3.0, -6.0, -7.0]], [[2.0, -2.0, 0.0], [5.0, -6.0, -7.0]]], 
+[[[0.0, 0.0, -1.0], [2.0, 0.0, -1.0]], [[0.0, 7.0, -7.0], [-1.0, 0.0, 5.0]], [[5.0, -7.0, 3.0], [-2.0, 3.0, 2.0]], [[5.0, -6.0, 
+7.0], [4.0, 5.0, -1.0]], [[0.0, 4.0, 4.0], [0.0, -3.0, -1.0]]]]))
+      arg1=numpy.array([[[[6.0, 1.0, 0.0], [-6.0, 5.0, 2.0]], [[3.0, 7.0, -1.0], [0.0, -2.0, -6.0]], [[-5.0, -1.0, -3.0], [2.0, 
+6.0, 4.0]], [[-1.0, -4.0, 6.0], [6.0, 7.0, -2.0]], [[4.0, 5.0, 7.0], [2.0, -7.0, 4.0]]], [[[7.0, 2.0, 7.0], [-2.0, 3.0, 5.0]], 
+[[4.0, 1.0, -3.0], [-3.0, 5.0, -3.0]], [[-4.0, 0.0, -1.0], [2.0, 3.0, 0.0]], [[-6.0, -5.0, -7.0], [-7.0, -6.0, 0.0]], [[0.0, 
+-2.0, -5.0], [-2.0, 7.0, 3.0]]], [[[-5.0, -3.0, 6.0], [-5.0, 5.0, -3.0]], [[-2.0, -5.0, 1.0], [5.0, 0.0, 4.0]], [[5.0, -1.0, 
+0.0], [4.0, -4.0, 4.0]], [[-3.0, 3.0, 1.0], [1.0, -1.0, -7.0]], [[-5.0, 4.0, 4.0], [4.0, 3.0, 6.0]]], [[[0.0, 1.0, 5.0], [5.0, 
+6.0, -4.0]], [[0.0, 2.0, 7.0], [5.0, 4.0, 6.0]], [[0.0, -4.0, 0.0], [0.0, 3.0, 3.0]], [[3.0, 0.0, -5.0], [4.0, 2.0, -3.0]], 
+[[0.0, 0.0, -6.0], [2.0, -1.0, -6.0]]]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[32.0, -75.0, -57.0, -38.0, 89.0], [84.0, -51.0, -54.0, 59.0, -35.0], [27.0, 29.0, 50.0, -72.0, 
+-22.0], [-77.0, 14.0, 28.0, -89.0, -91.0]], [[88.0, 21.0, -1.0, -42.0, 57.0], [103.0, 33.0, -20.0, -62.0, 28.0], [-23.0, -40.0, 
+14.0, -42.0, 36.0], [-14.0, 49.0, -1.0, -18.0, -53.0]], [[-66.0, -23.0, -21.0, 51.0, -6.0], [-44.0, -47.0, 9.0, 37.0, -56.0], 
+[81.0, 23.0, -33.0, 47.0, -5.0], [27.0, -10.0, -4.0, -39.0, -3.0]], [[-50.0, -88.0, 72.0, 42.0, -34.0], [-37.0, -52.0, 37.0, 
+40.0, 26.0], [25.0, 74.0, -2.0, -27.0, 60.0], [-4.0, 39.0, 38.0, -22.0, -25.0]], [[3.0, 71.0, -39.0, -18.0, 83.0], [40.0, 6.0, 
+-20.0, -94.0, -38.0], [-86.0, -22.0, 51.0, 10.0, 12.0], [20.0, 31.0, -34.0, 34.0, 12.0]]], [[[-3.0, -68.0, -6.0, -9.0, 31.0], 
+[23.0, -36.0, -22.0, 34.0, 2.0], [-37.0, 58.0, 66.0, -67.0, -15.0], [-50.0, 11.0, 34.0, -13.0, -30.0]], [[54.0, -42.0, -22.0, 
+-22.0, -8.0], [39.0, 22.0, -35.0, 34.0, 32.0], [-25.0, 16.0, 46.0, -67.0, -68.0], [-50.0, -29.0, 34.0, 8.0, -11.0]], [[49.0, 
+54.0, -56.0, -10.0, 0.0], [31.0, 46.0, -24.0, -13.0, -18.0], [50.0, -67.0, -39.0, 35.0, -52.0], [17.0, -37.0, -23.0, -10.0, 
+5.0]], [[83.0, 80.0, -42.0, 48.0, 16.0], [91.0, 78.0, -16.0, -135.0, -2.0], [40.0, -73.0, -31.0, 35.0, -14.0], [87.0, 29.0, 
+-21.0, 20.0, -5.0]], [[-11.0, 65.0, -61.0, -12.0, 3.0], [-27.0, 26.0, -23.0, -12.0, -36.0], [-41.0, -30.0, 17.0, 37.0, -76.0], 
+[10.0, -58.0, -30.0, 48.0, 61.0]]], [[[22.0, 63.0, -53.0, -26.0, -33.0], [-26.0, 58.0, -26.0, 4.0, -1.0], [-46.0, -42.0, 12.0, 
+21.0, -104.0], [-4.0, -83.0, -20.0, 65.0, 73.0]], [[55.0, -19.0, 17.0, 13.0, -36.0], [36.0, 29.0, 6.0, 10.0, 34.0], [88.0, 
+-28.0, -58.0, -3.0, 9.0], [10.0, 6.0, 15.0, -39.0, -37.0]], [[-93.0, 36.0, 6.0, -69.0, 7.0], [-110.0, -46.0, 17.0, 72.0, 
+-38.0], [-70.0, 2.0, 6.0, 42.0, 11.0], [-44.0, -48.0, -40.0, 17.0, 57.0]], [[-35.0, 22.0, -42.0, 20.0, 98.0], [37.0, -47.0, 
+-13.0, -61.0, -75.0], [-2.0, 7.0, 25.0, 23.0, 40.0], [29.0, 54.0, -24.0, -31.0, -32.0]], [[73.0, 84.0, -68.0, 1.0, 25.0], 
+[70.0, 61.0, -27.0, -65.0, -28.0], [69.0, -95.0, -54.0, 51.0, -33.0], [47.0, -11.0, -36.0, -19.0, -11.0]]], [[[-3.0, 53.0, 
+-51.0, -74.0, 29.0], [-19.0, -1.0, -21.0, 51.0, -42.0], [2.0, -55.0, -21.0, 36.0, -32.0], [-39.0, -55.0, -40.0, -24.0, 13.0]], 
+[[4.0, 40.0, 24.0, -24.0, -36.0], [-31.0, 18.0, 27.0, 24.0, 8.0], [63.0, -58.0, -86.0, 55.0, 34.0], [12.0, -17.0, -28.0, -26.0, 
+5.0]], [[12.0, 59.0, -45.0, -29.0, -28.0], [-30.0, 40.0, -15.0, 24.0, -14.0], [6.0, -54.0, -27.0, 42.0, -71.0], [-2.0, -73.0, 
+-28.0, 23.0, 49.0]], [[46.0, -9.0, -37.0, 43.0, -16.0], [44.0, 38.0, -26.0, -31.0, 9.0], [19.0, 1.0, 17.0, -19.0, -67.0], 
+[23.0, -13.0, 21.0, 20.0, 2.0]], [[42.0, -10.0, 80.0, -29.0, -99.0], [-32.0, 49.0, 36.0, 44.0, 92.0], [18.0, -26.0, -59.0, 
+-11.0, 21.0], [-18.0, -23.0, 15.0, 15.0, 15.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[64.0, 39.0, -55.0, -43.0, 50.0], [69.0, 31.0, -39.0, -24.0, -13.0], [-7.0, -50.0, 
+11.0, -11.0, -33.0], [-18.0, -9.0, -15.0, -14.0, -21.0]], [[-60.0, 4.0, 20.0, -41.0, 23.0], [-52.0, -50.0, 19.0, 46.0, -27.0], 
+[-14.0, 6.0, -11.0, 23.0, 51.0], [-28.0, 2.0, -22.0, -26.0, 0.0]], [[-18.0, 56.0, -16.0, -15.0, 17.0], [-19.0, 6.0, 2.0, -26.0, 
+-25.0], [-27.0, -28.0, -5.0, 38.0, 3.0], [16.0, -9.0, -32.0, 20.0, 29.0]], [[71.0, -61.0, -21.0, 39.0, 24.0], [102.0, 13.0, 
+-33.0, -33.0, 21.0], [29.0, 27.0, 38.0, -70.0, -25.0], [-1.0, 38.0, 46.0, -24.0, -62.0]], [[30.0, 22.0, -58.0, -23.0, -21.0], 
+[-3.0, 36.0, -33.0, 37.0, -8.0], [6.0, -31.0, 1.0, 5.0, -97.0], [-21.0, -73.0, -5.0, 15.0, 30.0]]], [[[-3.0, -34.0, -2.0, 15.0, 
+-39.0], [-19.0, -5.0, 2.0, 57.0, 2.0], [68.0, 5.0, -34.0, 6.0, -25.0], [-7.0, -28.0, 14.0, -29.0, -8.0]], [[-84.0, -84.0, 26.0, 
+49.0, 29.0], [-26.0, -93.0, 19.0, 33.0, -37.0], [31.0, 85.0, 19.0, -12.0, 59.0], [-1.0, 51.0, 24.0, -50.0, -42.0]], [[68.0, 
+41.0, -63.0, -60.0, 131.0], [122.0, 2.0, -50.0, -66.0, -37.0], [-36.0, -44.0, 44.0, -31.0, 18.0], [-26.0, 47.0, -22.0, -41.0, 
+-65.0]], [[26.0, -23.0, 13.0, -32.0, 3.0], [19.0, 0.0, -5.0, 28.0, 23.0], [-3.0, 0.0, 4.0, -32.0, 8.0], [-36.0, 2.0, 12.0, 
+-19.0, -24.0]], [[-6.0, 33.0, -31.0, -39.0, 72.0], [23.0, -16.0, -20.0, -28.0, -34.0], [-63.0, -8.0, 43.0, -5.0, 9.0], [-18.0, 
+14.0, -22.0, 3.0, -4.0]]], [[[-32.0, -9.0, 29.0, 14.0, -1.0], [-23.0, -15.0, 15.0, -21.0, 9.0], [-54.0, 35.0, 32.0, -11.0, 
+24.0], [7.0, 21.0, 6.0, 33.0, 18.0]], [[3.0, 60.0, -20.0, -24.0, 0.0], [-15.0, 23.0, -1.0, -11.0, -15.0], [-4.0, -47.0, -25.0, 
+41.0, -12.0], [11.0, -26.0, -32.0, 13.0, 28.0]], [[-40.0, -57.0, 33.0, 49.0, 2.0], [-8.0, -43.0, 18.0, -4.0, -1.0], [10.0, 
+60.0, 17.0, -18.0, 41.0], [14.0, 44.0, 25.0, -12.0, -22.0]], [[-62.0, -6.0, -48.0, 1.0, -21.0], [-73.0, -35.0, -7.0, 96.0, 
+-60.0], [67.0, 0.0, -35.0, 52.0, -59.0], [-14.0, -72.0, -15.0, -33.0, 24.0]], [[-64.0, 46.0, -62.0, 8.0, 22.0], [-53.0, -18.0, 
+-16.0, -1.0, -69.0], [-38.0, 3.0, 28.0, 48.0, -58.0], [15.0, -45.0, -31.0, 35.0, 58.0]]], [[[-14.0, 7.0, 3.0, 8.0, -7.0], 
+[-16.0, 0.0, 5.0, -7.0, -2.0], [-13.0, 5.0, 4.0, 8.0, -2.0], [9.0, -3.0, -3.0, 16.0, 16.0]], [[23.0, 26.0, 32.0, -86.0, 4.0], 
+[-8.0, 16.0, 5.0, 21.0, 38.0], [-73.0, -27.0, 9.0, -22.0, 26.0], [-53.0, -10.0, -13.0, 16.0, 10.0]], [[54.0, -55.0, -5.0, 46.0, 
+-11.0], [65.0, 19.0, -18.0, -20.0, 30.0], [33.0, 26.0, 20.0, -52.0, -28.0], [8.0, 21.0, 43.0, -8.0, -37.0]], [[23.0, -38.0, 
+-6.0, 122.0, 8.0], [74.0, 9.0, -4.0, -107.0, 1.0], [43.0, 43.0, 23.0, -20.0, 4.0], [83.0, 71.0, 36.0, 9.0, -33.0]], [[-13.0, 
+36.0, -38.0, -11.0, 65.0], [22.0, -20.0, -13.0, -30.0, -52.0], [0.0, -20.0, 4.0, 26.0, 17.0], [10.0, 18.0, -28.0, -23.0, 
+-15.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[5.0, -4.0, 1.0, -3.0, -5.0], [1.0, -6.0, -7.0, 4.0, 3.0], [0.0, 0.0, 2.0, -2.0, 5.0], [3.0, 1.0, 
+-1.0, 7.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -6.0, -2.0, 2.0, 7.0], [4.0, 7.0, 0.0, -2.0, -4.0], [1.0, 6.0, 6.0, 0.0, 0.0], 
+[0.0, -7.0, 7.0, -2.0, -4.0]]))
+      arg1=Data(-5.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[-25.0, 20.0, -5.0, 15.0, 25.0], [-5.0, 30.0, 35.0, -20.0, -15.0], [-0.0, -0.0, -10.0, 10.0, 
+-25.0], [-15.0, -5.0, 5.0, -35.0, -0.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-0.0, 30.0, 10.0, -10.0, -35.0], [-20.0, -35.0, -0.0, 10.0, 20.0], [-5.0, -30.0, 
+-30.0, -0.0, -0.0], [-0.0, 35.0, -35.0, 10.0, 20.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[4.0, 2.0, -6.0], [-3.0, -2.0, -1.0], [4.0, 0.0, -4.0], [3.0, -5.0, 5.0], [0.0, 0.0, -1.0]], 
+[[-7.0, -5.0, -5.0], [7.0, -5.0, -1.0], [-4.0, -2.0, 3.0], [-5.0, -6.0, 0.0], [6.0, 0.0, -4.0]], [[-6.0, 3.0, -2.0], [-7.0, 
+-2.0, 4.0], [-4.0, -4.0, 6.0], [1.0, 7.0, 6.0], [4.0, -3.0, -7.0]], [[6.0, 0.0, 0.0], [0.0, -2.0, 0.0], [-1.0, -4.0, -3.0], 
+[-2.0, 5.0, -1.0], [3.0, -3.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, -3.0, -2.0], [-2.0, -1.0, -1.0], [-7.0, -3.0, 0.0], [0.0, -4.0, -3.0], [5.0, 
+3.0, 0.0]], [[4.0, -6.0, 0.0], [4.0, 0.0, 0.0], [-4.0, -6.0, -1.0], [-4.0, -2.0, 0.0], [-5.0, -3.0, -4.0]], [[3.0, 3.0, -4.0], 
+[5.0, 4.0, 6.0], [-3.0, -7.0, 7.0], [6.0, -4.0, -5.0], [-3.0, -4.0, 2.0]], [[0.0, 7.0, -5.0], [-1.0, 7.0, 2.0], [-1.0, -6.0, 
+3.0], [-5.0, -3.0, 1.0], [-6.0, 7.0, 2.0]]]))
+      arg1=Data(numpy.array([-7.0, -6.0, 3.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-58.0, 30.0, -40.0, 24.0, -3.0], [64.0, -22.0, 49.0, 71.0, -54.0], [18.0, 73.0, 70.0, -31.0, 
+-31.0], [-42.0, 12.0, 22.0, -19.0, 18.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[54.0, 17.0, 67.0, 15.0, -53.0], [8.0, -28.0, 61.0, 40.0, 41.0], [-51.0, -41.0, 84.0, 
+-33.0, 51.0], [-57.0, -29.0, 52.0, 56.0, 6.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[3.0, 0.0, -1.0], [4.0, 7.0, -6.0]], [[-2.0, -3.0, -5.0], [7.0, 7.0, -3.0]], [[-1.0, -2.0, 
+-1.0], [0.0, -4.0, -1.0]], [[3.0, -5.0, -2.0], [0.0, -7.0, 6.0]], [[1.0, 1.0, -6.0], [-6.0, -5.0, -5.0]]], [[[0.0, 1.0, -3.0], 
+[-1.0, 4.0, 1.0]], [[-6.0, -7.0, 3.0], [-4.0, -1.0, -1.0]], [[1.0, 2.0, 5.0], [-6.0, 4.0, 6.0]], [[2.0, 5.0, -4.0], [3.0, 0.0, 
+1.0]], [[-6.0, 5.0, -2.0], [7.0, 3.0, -3.0]]], [[[7.0, -3.0, 2.0], [-1.0, 5.0, -5.0]], [[1.0, 1.0, -6.0], [-3.0, -2.0, 1.0]], 
+[[-2.0, 1.0, -2.0], [-1.0, -2.0, 6.0]], [[3.0, -4.0, -4.0], [4.0, -3.0, 4.0]], [[-4.0, 6.0, -5.0], [7.0, -7.0, 0.0]]], [[[7.0, 
+4.0, 0.0], [6.0, -2.0, 0.0]], [[3.0, -5.0, -4.0], [-4.0, 0.0, -6.0]], [[0.0, 4.0, 0.0], [7.0, -2.0, -5.0]], [[-1.0, 6.0, 6.0], 
+[4.0, 6.0, 4.0]], [[-1.0, 0.0, -1.0], [3.0, -1.0, 7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 3.0, 4.0], [3.0, 3.0, 0.0]], [[7.0, -6.0, 0.0], [-3.0, 0.0, -3.0]], [[2.0, 
+-6.0, 5.0], [7.0, -6.0, 0.0]], [[-2.0, -4.0, 0.0], [2.0, -6.0, 7.0]], [[-1.0, 6.0, 0.0], [-5.0, 0.0, -4.0]]], [[[4.0, 4.0, 
+4.0], [0.0, 4.0, 0.0]], [[-2.0, -1.0, 1.0], [2.0, 7.0, -1.0]], [[0.0, 1.0, -5.0], [7.0, -4.0, 0.0]], [[-6.0, -5.0, 1.0], [-5.0, 
+0.0, 4.0]], [[-5.0, -2.0, 6.0], [0.0, -2.0, 0.0]]], [[[-1.0, 6.0, 2.0], [7.0, 1.0, 0.0]], [[-4.0, -7.0, 3.0], [-7.0, -1.0, 
+3.0]], [[1.0, 2.0, 1.0], [6.0, 2.0, 0.0]], [[7.0, -1.0, -5.0], [-5.0, -1.0, -4.0]], [[-5.0, 7.0, 7.0], [-7.0, -6.0, 6.0]]], 
+[[[-6.0, -2.0, 0.0], [4.0, -6.0, 4.0]], [[1.0, -7.0, 4.0], [0.0, -3.0, 6.0]], [[1.0, 7.0, 1.0], [-7.0, 4.0, -2.0]], [[6.0, 
+-5.0, 0.0], [2.0, 4.0, -5.0]], [[-6.0, 4.0, -3.0], [0.0, 4.0, -7.0]]]]))
+      arg1=Data(numpy.array([[4.0, 2.0, 0.0], [3.0, 6.0, 1.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[60.0, 46.0, -33.0, -34.0, -47.0], [24.0, -57.0, 20.0, 28.0, 22.0], [44.0, -14.0, -15.0, 2.0, 
+-25.0], [42.0, -16.0, 12.0, 60.0, 6.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[49.0, 4.0, -19.0, -39.0, -11.0], [48.0, 37.0, -1.0, -45.0, -36.0], [35.0, -54.0, 38.0, 
+1.0, -57.0], [-48.0, -22.0, 19.0, 39.0, 1.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank1_expandedData_rank3_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([3.0, -1.0])+(1.-msk_arg0)*numpy.array([-4.0, -7.0])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[2.0, -2.0], [-7.0, 6.0]], [[0.0, 0.0], [0.0, 0.0]], [[7.0, -3.0], [7.0, 2.0]], [[3.0, 3.0], 
-[-4.0, 5.0]], [[0.0, -2.0], [-2.0, 6.0]], [[-4.0, 2.0], [0.0, 6.0]]])+(1.-msk_arg1)*numpy.array([[[5.0, 6.0], [-5.0, 3.0]], 
-[[-5.0, -5.0], [-4.0, 7.0]], [[-3.0, 5.0], [4.0, 7.0]], [[3.0, 0.0], [0.0, -6.0]], [[-5.0, -1.0], [1.0, 1.0]], [[4.0, 0.0], 
-[0.0, 2.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[3.0, -4.0, -1.0, 0.0, 2.0], [6.0, -3.0, 7.0, 2.0, 7.0], [1.0, 4.0, 0.0, -1.0, 6.0], [3.0, 0.0, 
+-4.0, -4.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -3.0, -6.0, 1.0, -2.0], [-5.0, -3.0, 0.0, 2.0, -5.0], [1.0, 3.0, 0.0, 4.0, 
+0.0], [0.0, -1.0, 2.0, 1.0, -3.0]]))
+      arg1=Data(numpy.array([4.0, -3.0]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[6.0, -6.0], [-21.0, 18.0]], [[0.0, 0.0], [0.0, 0.0]], [[21.0, -9.0], [21.0, 6.0]], [[9.0, 
-9.0], [-12.0, 15.0]], [[0.0, -6.0], [-6.0, 18.0]], [[-12.0, 6.0], [0.0, 18.0]]], [[[-2.0, 2.0], [7.0, -6.0]], [[0.0, 0.0], 
-[0.0, 0.0]], [[-7.0, 3.0], [-7.0, -2.0]], [[-3.0, -3.0], [4.0, -5.0]], [[0.0, 2.0], [2.0, -6.0]], [[4.0, -2.0], [0.0, 
--6.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -24.0], [20.0, -12.0]], [[20.0, 20.0], [16.0, -28.0]], [[12.0, -20.0], [-16.0, 
--28.0]], [[-12.0, 0.0], [0.0, 24.0]], [[20.0, 4.0], [-4.0, -4.0]], [[-16.0, 0.0], [0.0, -8.0]]], [[[-35.0, -42.0], [35.0, 
--21.0]], [[35.0, 35.0], [28.0, -49.0]], [[21.0, -35.0], [-28.0, -49.0]], [[-21.0, 0.0], [0.0, 42.0]], [[35.0, 7.0], [-7.0, 
--7.0]], [[-28.0, 0.0], [0.0, -14.0]]]])
+      ref=Data(numpy.array([[[12.0, -9.0], [-16.0, 12.0], [-4.0, 3.0], [0.0, 0.0], [8.0, -6.0]], [[24.0, -18.0], [-12.0, 9.0], 
+[28.0, -21.0], [8.0, -6.0], [28.0, -21.0]], [[4.0, -3.0], [16.0, -12.0], [0.0, 0.0], [-4.0, 3.0], [24.0, -18.0]], [[12.0, 
+-9.0], [0.0, 0.0], [-16.0, 12.0], [-16.0, 12.0], [28.0, -21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-28.0, 21.0], [-12.0, 9.0], [-24.0, 18.0], [4.0, -3.0], [-8.0, 6.0]], [[-20.0, 15.0], 
+[-12.0, 9.0], [0.0, 0.0], [8.0, -6.0], [-20.0, 15.0]], [[4.0, -3.0], [12.0, -9.0], [0.0, 0.0], [16.0, -12.0], [0.0, 0.0]], 
+[[0.0, 0.0], [-4.0, 3.0], [8.0, -6.0], [4.0, -3.0], [-12.0, 9.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      arg0=arg0*1j
+      arg1=arg1*1j
+      ref=-ref 
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank4_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[5.0, 0.0, 7.0], [3.0, -6.0, -4.0]])+(1.-msk_arg0)*numpy.array([[3.0, 0.0, 3.0], [5.0, 2.0, 
-6.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[2.0, -5.0, -6.0], [1.0, -6.0, 5.0]], [[-3.0, 5.0, -2.0], [4.0, 6.0, -7.0]]], [[[-5.0, 6.0, 
--4.0], [4.0, -7.0, 2.0]], [[0.0, 2.0, 2.0], [6.0, -4.0, 0.0]]], [[[5.0, -3.0, -3.0], [4.0, -5.0, -2.0]], [[6.0, -3.0, 4.0], 
-[-1.0, 2.0, -3.0]]], [[[3.0, -2.0, -7.0], [-1.0, 6.0, -4.0]], [[0.0, 6.0, 7.0], [-7.0, 0.0, 4.0]]], [[[-3.0, 0.0, 1.0], [-2.0, 
--4.0, -7.0]], [[7.0, -4.0, 0.0], [-1.0, -3.0, -3.0]]], [[[5.0, -3.0, 2.0], [0.0, -7.0, 4.0]], [[6.0, -2.0, 1.0], [-2.0, 0.0, 
-0.0]]]])+(1.-msk_arg1)*numpy.array([[[[4.0, -3.0, -6.0], [-6.0, -4.0, 3.0]], [[0.0, 3.0, 0.0], [-4.0, 5.0, -1.0]]], [[[0.0, 
--1.0, -6.0], [-3.0, -7.0, 6.0]], [[-2.0, 2.0, 6.0], [1.0, 6.0, 5.0]]], [[[6.0, 4.0, 5.0], [-1.0, -3.0, -4.0]], [[-7.0, 2.0, 
--3.0], [6.0, -5.0, 3.0]]], [[[-1.0, -1.0, 4.0], [-5.0, 5.0, 2.0]], [[1.0, -4.0, 7.0], [3.0, 2.0, -1.0]]], [[[-3.0, -4.0, 3.0], 
-[4.0, -7.0, -3.0]], [[-5.0, 0.0, 1.0], [0.0, 4.0, 6.0]]], [[[4.0, 2.0, -5.0], [5.0, -5.0, -3.0]], [[5.0, 2.0, -4.0], [0.0, 
--6.0, -6.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-7.0, -4.0, 7.0], [3.0, 6.0, 0.0], [-1.0, 3.0, 2.0], [4.0, 4.0, 2.0], [0.0, 1.0, 6.0]], [[-6.0, 
+3.0, -2.0], [5.0, -1.0, 2.0], [4.0, -5.0, 1.0], [6.0, -2.0, 6.0], [0.0, -6.0, 1.0]], [[1.0, 0.0, -4.0], [-4.0, -1.0, -6.0], 
+[-6.0, -1.0, 4.0], [5.0, 5.0, -4.0], [-7.0, -1.0, 7.0]], [[-6.0, -6.0, 0.0], [-1.0, 0.0, 0.0], [5.0, 0.0, -3.0], [3.0, -4.0, 
+-2.0], [-2.0, 0.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 7.0, 6.0], [-5.0, -6.0, -5.0], [0.0, -5.0, 7.0], [-1.0, -3.0, 1.0], [4.0, 7.0, 
+0.0]], [[0.0, 6.0, 0.0], [-2.0, -3.0, 0.0], [4.0, -6.0, 4.0], [6.0, 7.0, 5.0], [-7.0, 1.0, -3.0]], [[-4.0, 5.0, 4.0], [-6.0, 
+0.0, 6.0], [2.0, 2.0, -3.0], [0.0, 2.0, 3.0], [0.0, 7.0, -2.0]], [[6.0, -4.0, 0.0], [3.0, -1.0, -4.0], [4.0, 6.0, 5.0], [2.0, 
+0.0, -5.0], [0.0, -1.0, -4.0]]]))
+      arg1=Data(numpy.array([[-2.0, 5.0, -7.0], [4.0, -5.0, -3.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-32.0, 40.0], [-29.0, -29.0]], [[-53.0, 34.0], [14.0, 30.0]], [[4.0, 6.0], [58.0, -26.0]], 
-[[-34.0, -33.0], [49.0, -7.0]], [[-8.0, -59.0], [35.0, -26.0]], [[39.0, 28.0], [37.0, -10.0]]], [[[60.0, 19.0], [-31.0, 4.0]], 
-[[-35.0, 46.0], [-20.0, 42.0]], [[45.0, 50.0], [20.0, -3.0]], [[49.0, -23.0], [-64.0, -37.0]], [[-13.0, 46.0], [45.0, 27.0]], 
-[[25.0, 26.0], [26.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, -9.0], [0.0, -15.0]], [[-18.0, 9.0], [12.0, 18.0]], [[33.0, 
--15.0], [-30.0, 27.0]], [[9.0, -9.0], [24.0, 6.0]], [[0.0, 3.0], [-12.0, 18.0]], [[-3.0, 6.0], [3.0, -18.0]]], [[[-22.0, 
--20.0], [6.0, -16.0]], [[-38.0, 7.0], [30.0, 47.0]], [[68.0, -35.0], [-49.0, 38.0]], [[17.0, -3.0], [39.0, 13.0]], [[-5.0, 
--12.0], [-19.0, 44.0]], [[-6.0, -3.0], [5.0, -48.0]]]])
+      ref=Data(numpy.array([[[-55.0, -29.0], [24.0, -18.0], [3.0, -25.0], [-2.0, -10.0], [-37.0, -23.0]], [[41.0, -33.0], 
+[-29.0, 19.0], [-40.0, 38.0], [-64.0, 16.0], [-37.0, 27.0]], [[26.0, 16.0], [45.0, 7.0], [-21.0, -31.0], [43.0, 7.0], [-40.0, 
+-44.0]], [[-18.0, 6.0], [2.0, -4.0], [11.0, 29.0], [-12.0, 38.0], [11.0, -5.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-15.0, -37.0], [15.0, 25.0], [-74.0, 4.0], [-20.0, 8.0], [27.0, -19.0]], [[30.0, 
+-30.0], [-11.0, 7.0], [-66.0, 34.0], [-12.0, -26.0], [40.0, -24.0]], [[5.0, -53.0], [-30.0, -42.0], [27.0, 7.0], [-11.0, 
+-19.0], [49.0, -29.0]], [[-32.0, 44.0], [17.0, 29.0], [-13.0, -29.0], [31.0, 23.0], [23.0, 17.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[0.0, 0.0, 2.0, 0.0, 0.0], [0.0, 4.0, -7.0, 3.0, -3.0], [1.0, 7.0, 0.0, -5.0, 5.0], [4.0, 
--2.0, 2.0, -2.0, 0.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 1.0, -5.0, 2.0, 4.0], [-1.0, 1.0, 3.0, -6.0, -1.0], [-4.0, 7.0, -5.0, 
--5.0, -4.0], [7.0, 3.0, 3.0, 3.0, 0.0]])
-      arg1=7.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[0.0, 0.0, 14.0, 0.0, 0.0], [0.0, 28.0, -49.0, 21.0, -21.0], [7.0, 49.0, 0.0, -35.0, 35.0], 
-[28.0, -14.0, 14.0, -14.0, 0.0]])+(1.-msk_ref)*numpy.array([[-14.0, 7.0, -35.0, 14.0, 28.0], [-7.0, 7.0, 21.0, -42.0, -7.0], 
-[-28.0, 49.0, -35.0, -35.0, -28.0], [49.0, 21.0, 21.0, 21.0, 0.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 5.0, 6.0], [-3.0, 2.0, -2.0]], [[-6.0, -4.0, 2.0], [-3.0, 3.0, -4.0]], [[7.0, 0.0, 4.0], 
+[-6.0, -5.0, 7.0]], [[-6.0, -6.0, -4.0], [-1.0, -3.0, 2.0]], [[6.0, -4.0, -6.0], [-3.0, 0.0, -5.0]]], [[[-1.0, 3.0, -7.0], 
+[0.0, -6.0, 3.0]], [[0.0, 2.0, -1.0], [-6.0, -1.0, -3.0]], [[-6.0, 6.0, 6.0], [0.0, -3.0, 7.0]], [[7.0, 1.0, -5.0], [2.0, -5.0, 
+1.0]], [[2.0, -2.0, 7.0], [-5.0, -1.0, 4.0]]], [[[-4.0, 4.0, -5.0], [-6.0, 1.0, -4.0]], [[-1.0, -4.0, 0.0], [-5.0, 1.0, 3.0]], 
+[[0.0, 1.0, 5.0], [7.0, 7.0, 7.0]], [[-1.0, 7.0, -2.0], [4.0, -4.0, -2.0]], [[1.0, 1.0, 6.0], [-4.0, 3.0, 6.0]]], [[[5.0, 3.0, 
+-7.0], [6.0, 0.0, -7.0]], [[-4.0, -4.0, 3.0], [-7.0, 0.0, -3.0]], [[3.0, -3.0, -1.0], [6.0, 4.0, -5.0]], [[0.0, -3.0, -2.0], 
+[-4.0, -5.0, 5.0]], [[-5.0, -2.0, 1.0], [0.0, -5.0, 2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 0.0, 5.0], [-4.0, 7.0, -2.0]], [[2.0, -7.0, -5.0], [-4.0, -2.0, -2.0]], [[6.0, 
+-1.0, 3.0], [3.0, -2.0, -2.0]], [[6.0, 4.0, 2.0], [0.0, 2.0, -7.0]], [[0.0, 4.0, 5.0], [0.0, 5.0, -6.0]]], [[[6.0, 4.0, -6.0], 
+[5.0, 2.0, -3.0]], [[3.0, 4.0, 1.0], [7.0, 1.0, -6.0]], [[1.0, 0.0, 4.0], [-3.0, 3.0, 0.0]], [[7.0, 6.0, 5.0], [2.0, -4.0, 
+7.0]], [[0.0, -1.0, -4.0], [1.0, -7.0, 4.0]]], [[[0.0, 1.0, 4.0], [0.0, -6.0, -1.0]], [[-1.0, 0.0, 5.0], [-3.0, -2.0, -7.0]], 
+[[0.0, -7.0, 5.0], [2.0, -5.0, 5.0]], [[0.0, 7.0, 3.0], [7.0, -4.0, -3.0]], [[0.0, 6.0, 7.0], [-2.0, 6.0, 3.0]]], [[[2.0, -2.0, 
+1.0], [7.0, -5.0, 0.0]], [[3.0, 4.0, 6.0], [4.0, -1.0, 3.0]], [[-5.0, 4.0, -4.0], [-2.0, -4.0, 0.0]], [[-4.0, -5.0, -2.0], 
+[-2.0, -3.0, -1.0]], [[4.0, -5.0, -3.0], [6.0, 6.0, 0.0]]]]))
+      arg1=Data(numpy.array([[[-1.0, 3.0, 4.0], [3.0, 2.0, -7.0]], [[-3.0, 5.0, 1.0], [-3.0, -5.0, -4.0]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[43.0, 23.0], [27.0, 10.0], [-68.0, -2.0], [-51.0, -6.0], [-16.0, -15.0]], [[-51.0, 29.0], [3.0, 
+44.0], [-7.0, 41.0], [-35.0, -6.0], [-25.0, -5.0]], [[8.0, 56.0], [-45.0, -19.0], [9.0, -74.0], [32.0, 52.0], [-22.0, -19.0]], 
+[[43.0, 3.0], [4.0, 28.0], [45.0, -43.0], [-74.0, 0.0], [-21.0, 23.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[30.0, -28.0], [-45.0, -16.0], [22.0, -11.0], [67.0, 22.0], [84.0, 24.0]], [[22.0, 
+-17.0], [78.0, 10.0], [12.0, -5.0], [-20.0, 0.0], [-58.0, 7.0]], [[14.0, 43.0], [57.0, 55.0], [-40.0, -31.0], [67.0, 49.0], 
+[31.0, 1.0]], [[7.0, -11.0], [22.0, -2.0], [-13.0, 57.0], [-24.0, 10.0], [-1.0, -88.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, -4.0, 0.0, -1.0, 3.0], [1.0, 6.0, 7.0, -5.0, -5.0], [4.0, -2.0, 1.0, -1.0, -2.0], [0.0, 
--5.0, 0.0, -1.0, 2.0]])+(1.-msk_arg0)*numpy.array([[5.0, -5.0, 5.0, -6.0, 2.0], [1.0, -2.0, 0.0, -5.0, 5.0], [0.0, 7.0, 7.0, 
--3.0, -4.0], [5.0, -1.0, -4.0, 0.0, 6.0]])
-      arg1=numpy.array(3.0)
+   def test_generalTensorTransposedProduct_taggedData_rank2_constData_rank2_offset0(self):
+      arg0=Data(numpy.array([[6.0, 2.0, 0.0, -4.0, -6.0], [-5.0, 7.0, 0.0, -7.0, -3.0], [-2.0, -6.0, 4.0, -4.0, 2.0], [6.0, 
+-4.0, -3.0, 0.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 5.0, 2.0, -6.0, 6.0], [-5.0, 2.0, 3.0, -2.0, 0.0], [-1.0, 3.0, -6.0, -7.0, 
+-4.0], [7.0, 7.0, 7.0, 7.0, 7.0]]))
+      arg1=Data(numpy.array([[7.0, -2.0, -5.0, 0.0, -1.0], [-1.0, -7.0, 2.0, 5.0, -6.0], [5.0, -4.0, 2.0, 7.0, 0.0], [-2.0, 
+-3.0, -3.0, 0.0, 0.0]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[12.0, -12.0, 0.0, -3.0, 9.0], [3.0, 18.0, 21.0, -15.0, -15.0], [12.0, -6.0, 3.0, -3.0, -6.0], 
-[0.0, -15.0, 0.0, -3.0, 6.0]])+(1.-msk_ref)*numpy.array([[15.0, -15.0, 15.0, -18.0, 6.0], [3.0, -6.0, 0.0, -15.0, 15.0], [0.0, 
-21.0, 21.0, -9.0, -12.0], [15.0, -3.0, -12.0, 0.0, 18.0]])
+      ref=Data(numpy.array([[[[42.0, -12.0, -30.0, 0.0, -6.0], [-6.0, -42.0, 12.0, 30.0, -36.0], [30.0, -24.0, 12.0, 42.0, 
+0.0], [-12.0, -18.0, -18.0, 0.0, 0.0]], [[14.0, -4.0, -10.0, 0.0, -2.0], [-2.0, -14.0, 4.0, 10.0, -12.0], [10.0, -8.0, 4.0, 
+14.0, 0.0], [-4.0, -6.0, -6.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-28.0, 8.0, 20.0, 0.0, 4.0], [4.0, 28.0, -8.0, -20.0, 24.0], [-20.0, 16.0, -8.0, -28.0, 0.0], 
+[8.0, 12.0, 12.0, 0.0, 0.0]], [[-42.0, 12.0, 30.0, 0.0, 6.0], [6.0, 42.0, -12.0, -30.0, 36.0], [-30.0, 24.0, -12.0, -42.0, 
+0.0], [12.0, 18.0, 18.0, 0.0, 0.0]]], [[[-35.0, 10.0, 25.0, 0.0, 5.0], [5.0, 35.0, -10.0, -25.0, 30.0], [-25.0, 20.0, -10.0, 
+-35.0, 0.0], [10.0, 15.0, 15.0, 0.0, 0.0]], [[49.0, -14.0, -35.0, 0.0, -7.0], [-7.0, -49.0, 14.0, 35.0, -42.0], [35.0, -28.0, 
+14.0, 49.0, 0.0], [-14.0, -21.0, -21.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-49.0, 14.0, 35.0, 0.0, 7.0], [7.0, 49.0, -14.0, -35.0, 42.0], [-35.0, 28.0, -14.0, -49.0, 
+0.0], [14.0, 21.0, 21.0, 0.0, 0.0]], [[-21.0, 6.0, 15.0, 0.0, 3.0], [3.0, 21.0, -6.0, -15.0, 18.0], [-15.0, 12.0, -6.0, -21.0, 
+0.0], [6.0, 9.0, 9.0, 0.0, 0.0]]], [[[-14.0, 4.0, 10.0, 0.0, 2.0], [2.0, 14.0, -4.0, -10.0, 12.0], [-10.0, 8.0, -4.0, -14.0, 
+0.0], [4.0, 6.0, 6.0, 0.0, 0.0]], [[-42.0, 12.0, 30.0, 0.0, 6.0], [6.0, 42.0, -12.0, -30.0, 36.0], [-30.0, 24.0, -12.0, -42.0, 
+0.0], [12.0, 18.0, 18.0, 0.0, 0.0]], [[28.0, -8.0, -20.0, 0.0, -4.0], [-4.0, -28.0, 8.0, 20.0, -24.0], [20.0, -16.0, 8.0, 28.0, 
+0.0], [-8.0, -12.0, -12.0, 0.0, 0.0]], [[-28.0, 8.0, 20.0, 0.0, 4.0], [4.0, 28.0, -8.0, -20.0, 24.0], [-20.0, 16.0, -8.0, 
+-28.0, 0.0], [8.0, 12.0, 12.0, 0.0, 0.0]], [[14.0, -4.0, -10.0, 0.0, -2.0], [-2.0, -14.0, 4.0, 10.0, -12.0], [10.0, -8.0, 4.0, 
+14.0, 0.0], [-4.0, -6.0, -6.0, 0.0, 0.0]]], [[[42.0, -12.0, -30.0, 0.0, -6.0], [-6.0, -42.0, 12.0, 30.0, -36.0], [30.0, -24.0, 
+12.0, 42.0, 0.0], [-12.0, -18.0, -18.0, 0.0, 0.0]], [[-28.0, 8.0, 20.0, 0.0, 4.0], [4.0, 28.0, -8.0, -20.0, 24.0], [-20.0, 
+16.0, -8.0, -28.0, 0.0], [8.0, 12.0, 12.0, 0.0, 0.0]], [[-21.0, 6.0, 15.0, 0.0, 3.0], [3.0, 21.0, -6.0, -15.0, 18.0], [-15.0, 
+12.0, -6.0, -21.0, 0.0], [6.0, 9.0, 9.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[42.0, -12.0, -30.0, 0.0, -6.0], [-6.0, -42.0, 12.0, 30.0, -36.0], [30.0, -24.0, 12.0, 
+42.0, 0.0], [-12.0, -18.0, -18.0, 0.0, 0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-35.0, 10.0, 25.0, 0.0, 5.0], [5.0, 35.0, -10.0, -25.0, 30.0], [-25.0, 20.0, -10.0, 
+-35.0, 0.0], [10.0, 15.0, 15.0, 0.0, 0.0]], [[35.0, -10.0, -25.0, 0.0, -5.0], [-5.0, -35.0, 10.0, 25.0, -30.0], [25.0, -20.0, 
+10.0, 35.0, 0.0], [-10.0, -15.0, -15.0, 0.0, 0.0]], [[14.0, -4.0, -10.0, 0.0, -2.0], [-2.0, -14.0, 4.0, 10.0, -12.0], [10.0, 
+-8.0, 4.0, 14.0, 0.0], [-4.0, -6.0, -6.0, 0.0, 0.0]], [[-42.0, 12.0, 30.0, 0.0, 6.0], [6.0, 42.0, -12.0, -30.0, 36.0], [-30.0, 
+24.0, -12.0, -42.0, 0.0], [12.0, 18.0, 18.0, 0.0, 0.0]], [[42.0, -12.0, -30.0, 0.0, -6.0], [-6.0, -42.0, 12.0, 30.0, -36.0], 
+[30.0, -24.0, 12.0, 42.0, 0.0], [-12.0, -18.0, -18.0, 0.0, 0.0]]], [[[-35.0, 10.0, 25.0, 0.0, 5.0], [5.0, 35.0, -10.0, -25.0, 
+30.0], [-25.0, 20.0, -10.0, -35.0, 0.0], [10.0, 15.0, 15.0, 0.0, 0.0]], [[14.0, -4.0, -10.0, 0.0, -2.0], [-2.0, -14.0, 4.0, 
+10.0, -12.0], [10.0, -8.0, 4.0, 14.0, 0.0], [-4.0, -6.0, -6.0, 0.0, 0.0]], [[21.0, -6.0, -15.0, 0.0, -3.0], [-3.0, -21.0, 6.0, 
+15.0, -18.0], [15.0, -12.0, 6.0, 21.0, 0.0], [-6.0, -9.0, -9.0, 0.0, 0.0]], [[-14.0, 4.0, 10.0, 0.0, 2.0], [2.0, 14.0, -4.0, 
+-10.0, 12.0], [-10.0, 8.0, -4.0, -14.0, 0.0], [4.0, 6.0, 6.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], [[[-7.0, 2.0, 5.0, 0.0, 1.0], [1.0, 7.0, -2.0, -5.0, 6.0], [-5.0, 
+4.0, -2.0, -7.0, 0.0], [2.0, 3.0, 3.0, 0.0, 0.0]], [[21.0, -6.0, -15.0, 0.0, -3.0], [-3.0, -21.0, 6.0, 15.0, -18.0], [15.0, 
+-12.0, 6.0, 21.0, 0.0], [-6.0, -9.0, -9.0, 0.0, 0.0]], [[-42.0, 12.0, 30.0, 0.0, 6.0], [6.0, 42.0, -12.0, -30.0, 36.0], [-30.0, 
+24.0, -12.0, -42.0, 0.0], [12.0, 18.0, 18.0, 0.0, 0.0]], [[-49.0, 14.0, 35.0, 0.0, 7.0], [7.0, 49.0, -14.0, -35.0, 42.0], 
+[-35.0, 28.0, -14.0, -49.0, 0.0], [14.0, 21.0, 21.0, 0.0, 0.0]], [[-28.0, 8.0, 20.0, 0.0, 4.0], [4.0, 28.0, -8.0, -20.0, 24.0], 
+[-20.0, 16.0, -8.0, -28.0, 0.0], [8.0, 12.0, 12.0, 0.0, 0.0]]], [[[49.0, -14.0, -35.0, 0.0, -7.0], [-7.0, -49.0, 14.0, 35.0, 
+-42.0], [35.0, -28.0, 14.0, 49.0, 0.0], [-14.0, -21.0, -21.0, 0.0, 0.0]], [[49.0, -14.0, -35.0, 0.0, -7.0], [-7.0, -49.0, 14.0, 
+35.0, -42.0], [35.0, -28.0, 14.0, 49.0, 0.0], [-14.0, -21.0, -21.0, 0.0, 0.0]], [[49.0, -14.0, -35.0, 0.0, -7.0], [-7.0, -49.0, 
+14.0, 35.0, -42.0], [35.0, -28.0, 14.0, 49.0, 0.0], [-14.0, -21.0, -21.0, 0.0, 0.0]], [[49.0, -14.0, -35.0, 0.0, -7.0], [-7.0, 
+-49.0, 14.0, 35.0, -42.0], [35.0, -28.0, 14.0, 49.0, 0.0], [-14.0, -21.0, -21.0, 0.0, 0.0]], [[49.0, -14.0, -35.0, 0.0, -7.0], 
+[-7.0, -49.0, 14.0, 35.0, -42.0], [35.0, -28.0, 14.0, 49.0, 0.0], [-14.0, -21.0, -21.0, 0.0, 0.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 6.0, 0.0], [2.0, 1.0, -4.0], [4.0, 6.0, 4.0], [6.0, 3.0, -6.0], [2.0, 4.0, 4.0]], 
-[[-2.0, 2.0, 4.0], [-4.0, 2.0, 6.0], [6.0, -7.0, 0.0], [4.0, 0.0, 1.0], [-7.0, -5.0, -1.0]], [[6.0, -1.0, 5.0], [5.0, -7.0, 
-5.0], [-2.0, -4.0, 4.0], [0.0, -3.0, 5.0], [-6.0, -5.0, 2.0]], [[-4.0, 1.0, 6.0], [4.0, 1.0, 5.0], [-2.0, -3.0, 0.0], [-6.0, 
--7.0, -1.0], [2.0, -1.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 0.0, 0.0], [-2.0, 1.0, 0.0], [0.0, 0.0, -6.0], [-2.0, 0.0, 
--4.0], [-6.0, -3.0, 0.0]], [[3.0, 7.0, -4.0], [6.0, -3.0, 5.0], [6.0, 4.0, -6.0], [0.0, -7.0, -6.0], [7.0, 0.0, 7.0]], [[4.0, 
-5.0, 0.0], [-4.0, 2.0, 5.0], [6.0, 3.0, 0.0], [-1.0, -3.0, -5.0], [5.0, -7.0, -4.0]], [[6.0, 4.0, 2.0], [-3.0, 0.0, 5.0], [6.0, 
-6.0, -4.0], [5.0, 6.0, -1.0], [7.0, 4.0, -7.0]]])
-      arg1=numpy.array([4.0, 3.0, -5.0])
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[0.0, 6.0, -1.0], [-4.0, -3.0, 0.0], [2.0, 4.0, -5.0], [0.0, -5.0, -5.0], [1.0, 5.0, 1.0]], 
+[[-2.0, -6.0, -6.0], [0.0, -1.0, -4.0], [-1.0, -7.0, 1.0], [5.0, -6.0, -6.0], [-7.0, 4.0, -7.0]], [[-1.0, 1.0, 4.0], [-2.0, 
+0.0, -2.0], [1.0, -4.0, 2.0], [1.0, 6.0, -7.0], [-6.0, 4.0, -6.0]], [[5.0, -6.0, 4.0], [-6.0, 4.0, 3.0], [1.0, -3.0, 0.0], 
+[-1.0, -1.0, -3.0], [-7.0, -4.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, 4.0, 0.0], [4.0, 0.0, -2.0], [2.0, 2.0, 1.0], [-2.0, -5.0, 7.0], [0.0, 0.0, 
+-7.0]], [[0.0, 7.0, 6.0], [5.0, 6.0, 0.0], [5.0, 2.0, -2.0], [5.0, 7.0, -5.0], [-1.0, -7.0, 1.0]], [[5.0, -6.0, 3.0], [-1.0, 
+-4.0, 6.0], [-6.0, 4.0, 3.0], [-5.0, 2.0, -1.0], [6.0, -2.0, 4.0]], [[-7.0, 2.0, 4.0], [-4.0, 6.0, 4.0], [-5.0, -4.0, 5.0], 
+[-3.0, -7.0, 6.0], [6.0, 1.0, -2.0]]]))
+      arg1=Data(numpy.array([[[2.0, -5.0, 7.0], [1.0, 1.0, 0.0], [4.0, -5.0, 0.0], [0.0, 6.0, 3.0], [-1.0, 6.0, 0.0]], [[-4.0, 
+-1.0, -7.0], [5.0, -3.0, 3.0], [0.0, -6.0, 3.0], [-7.0, -4.0, -3.0], [1.0, 5.0, 0.0]], [[7.0, -2.0, -2.0], [0.0, 0.0, 0.0], 
+[0.0, 4.0, 7.0], [0.0, 1.0, 3.0], [-6.0, 2.0, 5.0]], [[7.0, 0.0, -5.0], [5.0, 3.0, 1.0], [-7.0, 3.0, -7.0], [-2.0, 0.0, -7.0], 
+[3.0, -1.0, -5.0]]]),self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[18.0, 31.0, 14.0, 63.0, 0.0], [-22.0, -40.0, 3.0, 11.0, -38.0], [-4.0, -26.0, -40.0, -34.0, 
--49.0], [-43.0, -6.0, -17.0, -40.0, 5.0]])+(1.-msk_ref)*numpy.array([[8.0, -5.0, 30.0, 12.0, -33.0], [53.0, -10.0, 66.0, 9.0, 
--7.0], [31.0, -35.0, 33.0, 12.0, 19.0], [26.0, -37.0, 62.0, 43.0, 75.0]])
+      ref=Data(numpy.array([[[[-37.0, 6.0, -30.0, 33.0, 36.0], [1.0, -21.0, -39.0, -21.0, 30.0], [-10.0, 0.0, 17.0, 3.0, 7.0], 
+[5.0, 17.0, 25.0, 7.0, -1.0]], [[7.0, -7.0, -1.0, -18.0, -14.0], [19.0, -11.0, 18.0, 40.0, -19.0], [-22.0, 0.0, -12.0, -3.0, 
+18.0], [-28.0, -29.0, 19.0, 8.0, -9.0]], [[-51.0, 6.0, -12.0, 9.0, 22.0], [23.0, -17.0, -39.0, -15.0, 22.0], [16.0, 0.0, -19.0, 
+-11.0, -29.0], [39.0, 17.0, 33.0, 31.0, 27.0]], [[-10.0, -5.0, 25.0, -45.0, -30.0], [40.0, 0.0, 15.0, 35.0, -25.0], [20.0, 0.0, 
+-55.0, -20.0, -35.0], [25.0, -20.0, 20.0, 35.0, 30.0]], [[-16.0, 6.0, -21.0, 33.0, 29.0], [-16.0, -7.0, -27.0, -30.0, 26.0], 
+[-5.0, 0.0, 27.0, 8.0, 9.0], [2.0, 21.0, 1.0, -9.0, -7.0]]], [[[-16.0, -8.0, 22.0, -54.0, -34.0], [56.0, -10.0, 18.0, 56.0, 
+-32.0], [10.0, 0.0, -66.0, -24.0, -30.0], [16.0, -34.0, 38.0, 46.0, 30.0]], [[-23.0, -1.0, 5.0, -18.0, -6.0], [29.0, -9.0, 
+-6.0, 16.0, -5.0], [10.0, 0.0, -32.0, -13.0, -22.0], [20.0, -7.0, 25.0, 28.0, 21.0]], [[40.0, -8.0, 31.0, -39.0, -41.0], [4.0, 
+19.0, 45.0, 32.0, -36.0], [5.0, 0.0, -21.0, -4.0, -3.0], [-12.0, -25.0, -21.0, -5.0, -1.0]], [[-2.0, -1.0, 50.0, -54.0, -41.0], 
+[28.0, 25.0, 18.0, 7.0, -25.0], [59.0, 0.0, -66.0, -24.0, -72.0], [65.0, 1.0, -11.0, 32.0, 51.0]], [[-83.0, -3.0, -48.0, 3.0, 
+31.0], [73.0, -68.0, -45.0, 54.0, 13.0], [-43.0, 0.0, -33.0, -17.0, 15.0], [-14.0, -30.0, 110.0, 63.0, 10.0]]], [[[21.0, 0.0, 
+-9.0, 18.0, 7.0], [-25.0, 4.0, 6.0, -9.0, 4.0], [-17.0, 0.0, 32.0, 13.0, 28.0], [-27.0, 2.0, -18.0, -26.0, -24.0]], [[-18.0, 
+-2.0, -8.0, -6.0, 2.0], [22.0, -16.0, -6.0, 20.0, -2.0], [-10.0, 0.0, -14.0, -6.0, 2.0], [-4.0, -12.0, 28.0, 18.0, 4.0]], 
+[[36.0, -3.0, 24.0, -18.0, -25.0], [-14.0, 23.0, 30.0, 3.0, -19.0], [11.0, 0.0, -2.0, 2.0, -4.0], [-3.0, -5.0, -33.0, -16.0, 
+-3.0]], [[-77.0, 7.0, -26.0, 15.0, 35.0], [39.0, -34.0, -57.0, -10.0, 31.0], [9.0, 0.0, -25.0, -15.0, -29.0], [42.0, 16.0, 
+60.0, 47.0, 32.0]], [[-74.0, -2.0, -44.0, 6.0, 30.0], [62.0, -60.0, -42.0, 44.0, 14.0], [-38.0, 0.0, -26.0, -14.0, 14.0], 
+[-12.0, -24.0, 96.0, 54.0, 8.0]]], [[[68.0, -1.0, 50.0, -24.0, -41.0], [-42.0, 55.0, 48.0, -23.0, -25.0], [39.0, 0.0, 4.0, 6.0, 
+-22.0], [15.0, 11.0, -81.0, -38.0, 1.0]], [[-11.0, -2.0, -44.0, 33.0, 30.0], [-1.0, -33.0, -15.0, 17.0, 14.0], [-56.0, 0.0, 
+37.0, 13.0, 59.0], [-57.0, -15.0, 33.0, -9.0, -37.0]], [[17.0, -2.0, 19.0, -18.0, -19.0], [-1.0, 14.0, 18.0, 5.0, -14.0], 
+[13.0, 0.0, -12.0, -3.0, -12.0], [7.0, -4.0, -16.0, -2.0, 6.0]], [[-18.0, -2.0, 1.0, -15.0, -5.0], [26.0, -11.0, -3.0, 20.0, 
+-6.0], [1.0, 0.0, -25.0, -10.0, -11.0], [8.0, -11.0, 25.0, 23.0, 13.0]], [[-43.0, -11.0, -8.0, -45.0, -17.0], [81.0, -44.0, 
+3.0, 86.0, -27.0], [-27.0, 0.0, -65.0, -25.0, -1.0], [-14.0, -54.0, 86.0, 63.0, 18.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-20.0, 4.0, -20.0, 24.0, 24.0], [-4.0, -12.0, -24.0, -16.0, 20.0], [-8.0, 0.0, 16.0, 
+4.0, 8.0], [0.0, 12.0, 12.0, 0.0, -4.0]], [[-6.0, 4.0, 16.0, -6.0, -4.0], [-2.0, 14.0, -6.0, -22.0, 4.0], [32.0, 0.0, -14.0, 
+-6.0, -34.0], [38.0, 18.0, -14.0, 6.0, 22.0]], [[1.0, 4.0, -2.0, 15.0, 10.0], [-17.0, 7.0, -9.0, -25.0, 12.0], [8.0, 0.0, 15.0, 
+5.0, -3.0], [9.0, 17.0, -15.0, -11.0, -1.0]], [[70.0, -7.0, 17.0, -9.0, -28.0], [-36.0, 26.0, 51.0, 13.0, -27.0], [-18.0, 0.0, 
+29.0, 16.0, 37.0], [-49.0, -18.0, -50.0, -45.0, -36.0]], [[-49.0, 0.0, 0.0, -21.0, 0.0], [49.0, -21.0, -21.0, 21.0, 0.0], 
+[14.0, 0.0, -49.0, -21.0, -35.0], [35.0, -7.0, 49.0, 49.0, 35.0]]], [[[7.0, 7.0, -35.0, 60.0, 42.0], [-49.0, -3.0, -24.0, 
+-46.0, 35.0], [-26.0, 0.0, 70.0, 25.0, 44.0], [-30.0, 27.0, -21.0, -42.0, -37.0]], [[-20.0, 11.0, -10.0, 36.0, 31.0], [-26.0, 
+7.0, -36.0, -59.0, 35.0], [23.0, 0.0, 24.0, 6.0, -18.0], [35.0, 43.0, -17.0, -10.0, 9.0]], [[-14.0, 7.0, 10.0, 6.0, 7.0], 
+[-8.0, 13.0, -18.0, -37.0, 15.0], [35.0, 0.0, -6.0, -4.0, -36.0], [45.0, 29.0, -15.0, 4.0, 23.0]], [[-60.0, 12.0, -15.0, 27.0, 
+37.0], [8.0, -11.0, -57.0, -48.0, 40.0], [31.0, 0.0, -7.0, -8.0, -41.0], [60.0, 41.0, 21.0, 25.0, 33.0]], [[40.0, -8.0, 31.0, 
+-39.0, -41.0], [4.0, 19.0, 45.0, 32.0, -36.0], [5.0, 0.0, -21.0, -4.0, -3.0], [-12.0, -25.0, -21.0, -5.0, -1.0]]], [[[61.0, 
+-1.0, 50.0, -27.0, -41.0], [-35.0, 52.0, 45.0, -20.0, -25.0], [41.0, 0.0, -3.0, 3.0, -27.0], [20.0, 10.0, -74.0, -31.0, 6.0]], 
+[[60.0, -5.0, 16.0, -6.0, -23.0], [-34.0, 25.0, 42.0, 5.0, -21.0], [-11.0, 0.0, 26.0, 14.0, 28.0], [-37.0, -11.0, -47.0, -40.0, 
+-29.0]], [[-11.0, -2.0, -44.0, 33.0, 30.0], [-1.0, -33.0, -15.0, 17.0, 14.0], [-56.0, 0.0, 37.0, 13.0, 59.0], [-57.0, -15.0, 
+33.0, -9.0, -37.0]], [[-27.0, -3.0, -30.0, 9.0, 17.0], [25.0, -34.0, -15.0, 30.0, 5.0], [-37.0, 0.0, 1.0, -1.0, 29.0], [-30.0, 
+-20.0, 48.0, 17.0, -12.0]], [[50.0, 4.0, 34.0, 0.0, -18.0], [-50.0, 48.0, 24.0, -46.0, -4.0], [38.0, 0.0, 20.0, 10.0, -20.0], 
+[22.0, 28.0, -76.0, -40.0, 0.0]]], [[[4.0, -5.0, -38.0, 24.0, 19.0], [-2.0, -29.0, 0.0, 29.0, 3.0], [-61.0, 0.0, 36.0, 14.0, 
+66.0], [-69.0, -25.0, 27.0, -14.0, -43.0]], [[-10.0, 2.0, -46.0, 48.0, 40.0], [-18.0, -26.0, -24.0, -8.0, 26.0], [-48.0, 0.0, 
+52.0, 18.0, 56.0], [-48.0, 2.0, 18.0, -20.0, -38.0]], [[45.0, -9.0, 0.0, -9.0, -19.0], [-11.0, 2.0, 39.0, 36.0, -25.0], [-37.0, 
+0.0, 19.0, 11.0, 47.0], [-60.0, -32.0, -12.0, -25.0, -36.0]], [[71.0, -10.0, 23.0, -24.0, -39.0], [-23.0, 24.0, 60.0, 31.0, 
+-38.0], [-19.0, 0.0, 14.0, 11.0, 34.0], [-51.0, -30.0, -42.0, -36.0, -32.0]], [[-7.0, 7.0, 19.0, 0.0, 0.0], [-11.0, 21.0, 
+-12.0, -40.0, 11.0], [44.0, 0.0, -10.0, -5.0, -44.0], [52.0, 31.0, -25.0, 2.0, 27.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[7.0, -4.0, -4.0], [5.0, 7.0, -5.0]], [[3.0, 0.0, -7.0], [-1.0, -2.0, -3.0]], [[7.0, 6.0, 0.0], 
+[1.0, -1.0, 4.0]], [[-6.0, -6.0, -2.0], [0.0, 7.0, 7.0]], [[7.0, -7.0, -6.0], [4.0, -5.0, 5.0]]], [[[-3.0, 7.0, 1.0], [2.0, 
+6.0, -4.0]], [[-1.0, 0.0, 3.0], [6.0, -7.0, -3.0]], [[-5.0, 7.0, -5.0], [-3.0, -1.0, -1.0]], [[7.0, 1.0, 1.0], [-7.0, 3.0, 
+0.0]], [[-3.0, 2.0, -5.0], [-6.0, -7.0, 5.0]]], [[[-6.0, -1.0, -1.0], [3.0, 2.0, 7.0]], [[-4.0, -2.0, 6.0], [-5.0, -3.0, 
+-1.0]], [[3.0, -1.0, 6.0], [5.0, 4.0, 0.0]], [[6.0, -1.0, -6.0], [-5.0, 2.0, 5.0]], [[1.0, 4.0, 5.0], [-6.0, 3.0, 6.0]]], 
+[[[-6.0, 3.0, 5.0], [1.0, 3.0, -2.0]], [[3.0, -4.0, 1.0], [-3.0, 7.0, -6.0]], [[-1.0, 0.0, 1.0], [0.0, 3.0, -1.0]], [[0.0, 3.0, 
+-1.0], [-1.0, -6.0, 7.0]], [[-2.0, 1.0, 1.0], [7.0, 3.0, -2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, -4.0, -1.0], [-3.0, -4.0, -2.0]], [[-6.0, 0.0, 2.0], [-5.0, 2.0, 3.0]], 
+[[-5.0, -3.0, 1.0], [-1.0, 6.0, 7.0]], [[-1.0, -2.0, 0.0], [2.0, -5.0, 2.0]], [[-4.0, -1.0, 0.0], [0.0, 1.0, -2.0]]], [[[-5.0, 
+0.0, 2.0], [-2.0, -1.0, -5.0]], [[-2.0, 0.0, 5.0], [-6.0, -2.0, 2.0]], [[-7.0, -2.0, 1.0], [1.0, 7.0, 0.0]], [[-7.0, -1.0, 
+1.0], [-1.0, -7.0, 2.0]], [[-6.0, 5.0, -6.0], [-6.0, 0.0, -7.0]]], [[[-1.0, 4.0, -2.0], [-6.0, -4.0, -6.0]], [[3.0, 0.0, 5.0], 
+[0.0, -4.0, 0.0]], [[4.0, -4.0, -7.0], [-2.0, -5.0, -7.0]], [[-2.0, -3.0, -4.0], [-3.0, -2.0, 0.0]], [[7.0, 4.0, 6.0], [7.0, 
+2.0, -7.0]]], [[[4.0, -6.0, -3.0], [2.0, 0.0, 5.0]], [[2.0, 0.0, 5.0], [0.0, -2.0, 4.0]], [[-5.0, 5.0, 0.0], [5.0, -2.0, 
+-4.0]], [[5.0, -1.0, 7.0], [-4.0, 6.0, -2.0]], [[2.0, -2.0, 0.0], [1.0, -2.0, -5.0]]]]))
+      arg1=Data(numpy.array([[[[1.0, -3.0, -5.0], [3.0, 6.0, 7.0]], [[-5.0, -5.0, -4.0], [-1.0, 0.0, 0.0]], [[0.0, -2.0, -1.0], 
+[0.0, -1.0, -2.0]], [[0.0, 6.0, -2.0], [-2.0, 3.0, -5.0]], [[6.0, -2.0, 2.0], [-3.0, 4.0, 2.0]]], [[[-5.0, -5.0, 6.0], [2.0, 
+-5.0, 5.0]], [[7.0, 5.0, -1.0], [-5.0, -7.0, -3.0]], [[-5.0, -3.0, -1.0], [-7.0, -6.0, -1.0]], [[-3.0, 1.0, 0.0], [0.0, 0.0, 
+6.0]], [[7.0, 1.0, -4.0], [2.0, -5.0, -1.0]]], [[[-4.0, 5.0, 6.0], [0.0, -6.0, 1.0]], [[-3.0, -1.0, -5.0], [2.0, -5.0, -4.0]], 
+[[6.0, -3.0, -7.0], [4.0, -5.0, 0.0]], [[6.0, 0.0, 7.0], [-1.0, -4.0, -6.0]], [[6.0, -6.0, 6.0], [3.0, 3.0, -2.0]]], [[[2.0, 
+0.0, 3.0], [0.0, 5.0, 5.0]], [[1.0, 0.0, 5.0], [-6.0, 6.0, 5.0]], [[5.0, -1.0, 5.0], [0.0, 1.0, 4.0]], [[7.0, 0.0, 5.0], [2.0, 
+0.0, -1.0]], [[-6.0, 0.0, -1.0], [-3.0, -3.0, 4.0]]]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[61.0, -4.0, 15.0, 20.0, 45.0], [-89.0, -26.0, -91.0, -55.0, 41.0], [-119.0, -2.0, 67.0, 11.0, 
+88.0], [12.0, -26.0, 6.0, 44.0, -94.0]], [[2.0, 14.0, 15.0, 25.0, -7.0], [-64.0, 56.0, 14.0, -27.0, 60.0], [-45.0, 46.0, 73.0, 
+-4.0, -27.0], [-40.0, -53.0, -34.0, -13.0, -14.0]], [[14.0, -66.0, -19.0, 11.0, 31.0], [-38.0, 69.0, -58.0, 9.0, 58.0], [12.0, 
+-36.0, 33.0, 21.0, -2.0], [29.0, 15.0, 44.0, 47.0, -26.0]], [[113.0, 68.0, -7.0, -46.0, 14.0], [48.0, -140.0, 1.0, 54.0, 
+-82.0], [-53.0, -29.0, -39.0, -120.0, -5.0], [52.0, 61.0, 1.0, -59.0, 45.0]], [[75.0, 20.0, 15.0, -78.0, 22.0], [22.0, 20.0, 
+-11.0, 2.0, 94.0], [-64.0, 29.0, 146.0, -14.0, 35.0], [-4.0, -52.0, 27.0, 22.0, -13.0]]], [[[-15.0, -26.0, -13.0, 74.0, -20.0], 
+[-60.0, -27.0, -53.0, -8.0, -40.0], [13.0, -13.0, -68.0, -13.0, -22.0], [7.0, 6.0, -27.0, -8.0, -23.0]], [[-61.0, -13.0, 10.0, 
+-24.0, -52.0], [55.0, 18.0, 5.0, -15.0, 31.0], [61.0, 47.0, 32.0, 55.0, 15.0], [-43.0, -79.0, -9.0, 23.0, -6.0]], [[-23.0, 
+13.0, -6.0, 60.0, -51.0], [-46.0, 30.0, 37.0, 16.0, -8.0], [30.0, 36.0, -23.0, -52.0, -112.0], [-35.0, -23.0, -62.0, -65.0, 
+43.0]], [[-4.0, -37.0, -6.0, 27.0, 75.0], [-63.0, 67.0, -8.0, -20.0, 17.0], [-35.0, -56.0, -11.0, 44.0, 30.0], [32.0, 72.0, 
+42.0, 40.0, -31.0]], [[-9.0, 31.0, -2.0, -12.0, -32.0], [23.0, 58.0, 93.0, 41.0, 19.0], [39.0, 35.0, 22.0, -49.0, -109.0], 
+[-31.0, -9.0, -29.0, -63.0, 82.0]]], [[[72.0, 36.0, -13.0, -39.0, -23.0], [60.0, -96.0, -6.0, 59.0, -50.0], [8.0, -8.0, -24.0, 
+-96.0, -35.0], [30.0, 18.0, -4.0, -48.0, 50.0]], [[-68.0, 11.0, 3.0, -18.0, -7.0], [66.0, 5.0, 74.0, 4.0, -48.0], [59.0, -7.0, 
+-65.0, 41.0, 2.0], [-10.0, 33.0, 5.0, -7.0, 38.0]], [[15.0, -39.0, -8.0, -16.0, 33.0], [16.0, -43.0, -77.0, -10.0, -14.0], 
+[-5.0, -48.0, -21.0, 39.0, 87.0], [44.0, 27.0, 50.0, 61.0, -51.0]], [[71.0, 4.0, -4.0, -3.0, 59.0], [-56.0, 39.0, -3.0, 11.0, 
+40.0], [-72.0, -27.0, 51.0, -39.0, -13.0], [29.0, 43.0, 23.0, -3.0, -1.0]], [[6.0, -39.0, -28.0, 5.0, 50.0], [8.0, 13.0, -4.0, 
+37.0, -42.0], [34.0, -83.0, -80.0, -1.0, -9.0], [62.0, 110.0, 53.0, 14.0, 22.0]]], [[[-33.0, -6.0, -10.0, 25.0, -27.0], [22.0, 
+-52.0, -7.0, 9.0, -70.0], [49.0, -15.0, -91.0, -2.0, -8.0], [8.0, 21.0, -13.0, -13.0, 11.0]], [[1.0, 4.0, 12.0, 31.0, 53.0], 
+[-60.0, -16.0, -19.0, -49.0, -22.0], [-74.0, -27.0, -24.0, 36.0, 72.0], [14.0, 38.0, 7.0, 26.0, -55.0]], [[5.0, 1.0, -2.0, 
+12.0, 6.0], [-9.0, -26.0, -13.0, -3.0, -25.0], [-9.0, -13.0, -28.0, -5.0, 11.0], [11.0, 17.0, -1.0, -1.0, -8.0]], [[6.0, -10.0, 
+-13.0, -31.0, -15.0], [42.0, 42.0, 28.0, 45.0, 28.0], [52.0, 2.0, 24.0, -24.0, -59.0], [2.0, 0.0, 14.0, -14.0, 50.0]], [[15.0, 
+-6.0, -2.0, 9.0, -25.0], [0.0, -60.0, -59.0, -5.0, -16.0], [-1.0, 7.0, -9.0, -12.0, 22.0], [4.0, -31.0, -11.0, 7.0, 
+-27.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-25.0, 2.0, 17.0, -18.0, 25.0], [-7.0, 65.0, 35.0, -31.0, 51.0], [-24.0, 16.0, 57.0, 
+54.0, 31.0], [-23.0, -16.0, 12.0, 26.0, -16.0]], [[2.0, 27.0, -10.0, -3.0, -3.0], [37.0, -42.0, 48.0, 36.0, -73.0], [27.0, 
+-24.0, -80.0, -43.0, -39.0], [19.0, 61.0, -6.0, -45.0, 55.0]], [[81.0, 37.0, -15.0, -35.0, 19.0], [49.0, -109.0, -3.0, 54.0, 
+-81.0], [-18.0, -47.0, -62.0, -88.0, -5.0], [58.0, 77.0, 17.0, -39.0, 42.0]], [[-5.0, 13.0, 5.0, -41.0, -24.0], [54.0, 2.0, 
+25.0, 13.0, 18.0], [26.0, 26.0, 33.0, 0.0, -7.0], [-17.0, -33.0, 0.0, -5.0, 23.0]], [[-9.0, 25.0, 5.0, 7.0, -22.0], [10.0, 
+-34.0, 19.0, -1.0, -32.0], [3.0, 16.0, -26.0, -16.0, -11.0], [-13.0, -8.0, -26.0, -26.0, 13.0]]], [[[-62.0, 19.0, 9.0, 22.0, 
+-34.0], [13.0, -5.0, 48.0, -15.0, -37.0], [33.0, 26.0, -47.0, 20.0, -17.0], [-34.0, -14.0, -36.0, -24.0, 17.0]], [[-43.0, -4.0, 
+-7.0, -14.0, 12.0], [48.0, 19.0, 57.0, 18.0, -38.0], [52.0, -29.0, -61.0, 25.0, -10.0], [11.0, 57.0, 21.0, -3.0, 39.0]], 
+[[39.0, 40.0, -4.0, 5.0, -11.0], [18.0, -114.0, -9.0, 19.0, -88.0], [-18.0, -15.0, -74.0, -64.0, 0.0], [24.0, 34.0, -21.0, 
+-42.0, 17.0]], [[-40.0, 37.0, 4.0, -37.0, -59.0], [89.0, -7.0, 84.0, 32.0, -23.0], [73.0, 42.0, -15.0, -18.0, -58.0], [-36.0, 
+-28.0, -28.0, -48.0, 73.0]], [[-58.0, 35.0, 10.0, 89.0, -54.0], [-78.0, 40.0, 70.0, -19.0, -18.0], [6.0, 59.0, -33.0, -30.0, 
+-106.0], [-65.0, -35.0, -93.0, -77.0, 32.0]]], [[[-87.0, -1.0, 10.0, 58.0, -28.0], [-49.0, 91.0, 67.0, -29.0, 19.0], [30.0, 
+41.0, -8.0, 38.0, -60.0], [-58.0, -29.0, -47.0, -23.0, 14.0]], [[-46.0, -35.0, -1.0, -22.0, 12.0], [35.0, 44.0, 4.0, -9.0, 
+21.0], [42.0, -14.0, 3.0, 69.0, 36.0], [1.0, 4.0, 36.0, 46.0, -11.0]], [[-34.0, 30.0, 34.0, 14.0, -10.0], [-56.0, 81.0, 50.0, 
+-58.0, 80.0], [-55.0, 76.0, 102.0, 39.0, -1.0], [-73.0, -84.0, -44.0, -4.0, -24.0]], [[6.0, 44.0, 12.0, -10.0, -13.0], [5.0, 
+4.0, 56.0, 3.0, 3.0], [-19.0, 33.0, 23.0, -29.0, -33.0], [-26.0, -16.0, -29.0, -40.0, 31.0]], [[-51.0, -86.0, -2.0, 39.0, 
+19.0], [-50.0, 35.0, -107.0, -59.0, 40.0], [9.0, -23.0, 6.0, 111.0, 95.0], [7.0, -28.0, 35.0, 100.0, -103.0]]], [[[78.0, 20.0, 
+5.0, -59.0, 34.0], [21.0, -24.0, -18.0, 12.0, 33.0], [-59.0, -7.0, 71.0, -29.0, 38.0], [24.0, 2.0, 31.0, 12.0, -7.0]], [[-7.0, 
+-30.0, -11.0, -36.0, 22.0], [50.0, 11.0, -7.0, 18.0, 0.0], [38.0, -37.0, -13.0, 31.0, 28.0], [29.0, 35.0, 49.0, 35.0, 5.0]], 
+[[-45.0, -5.0, 0.0, 34.0, -71.0], [0.0, -9.0, -9.0, -4.0, -6.0], [53.0, 46.0, -15.0, -3.0, -43.0], [-40.0, -67.0, -48.0, -21.0, 
+5.0]], [[-17.0, -44.0, -7.0, 16.0, 78.0], [-26.0, 7.0, -35.0, -28.0, -30.0], [-21.0, -79.0, -62.0, 71.0, 88.0], [51.0, 90.0, 
+59.0, 64.0, -51.0]], [[-36.0, -1.0, 16.0, 5.0, -5.0], [-13.0, 28.0, 6.0, -38.0, 29.0], [-11.0, 28.0, 32.0, 49.0, 31.0], [-31.0, 
+-41.0, -10.0, 21.0, -29.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, 0.0, -5.0, 1.0, 4.0], [1.0, 7.0, 1.0, -7.0, 3.0], [-2.0, 0.0, -6.0, -7.0, -7.0], [-4.0, 
+6.0, 3.0, 3.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-7.0, -6.0, 0.0, 0.0, 7.0], [-7.0, -2.0, -7.0, -5.0, 2.0], [-5.0, 4.0, -6.0, 4.0, 
+-6.0], [1.0, -6.0, -6.0, -4.0, -3.0]]))
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[14.0, -0.0, 10.0, -2.0, -8.0], [-2.0, -14.0, -2.0, 14.0, -6.0], [4.0, -0.0, 12.0, 14.0, 14.0], 
+[8.0, -12.0, -6.0, -6.0, -4.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-49.0, -42.0, 0.0, 0.0, 49.0], [-49.0, -14.0, -49.0, -35.0, 14.0], [-35.0, 28.0, 
+-42.0, 28.0, -42.0], [7.0, -42.0, -42.0, -28.0, -21.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-2.0, -3.0, 0.0], [0.0, -3.0, -3.0]], [[0.0, 6.0, 5.0], [-2.0, 0.0, -3.0]], [[0.0, -5.0, 
--5.0], [-5.0, 2.0, 3.0]], [[-1.0, 6.0, 0.0], [-4.0, 5.0, 0.0]], [[-5.0, 2.0, 1.0], [0.0, 6.0, 5.0]]], [[[-6.0, 5.0, -1.0], 
-[0.0, 3.0, -6.0]], [[2.0, 2.0, 7.0], [0.0, 0.0, 2.0]], [[-6.0, -1.0, -2.0], [4.0, 0.0, 3.0]], [[3.0, 1.0, 0.0], [-4.0, 0.0, 
-1.0]], [[-2.0, 0.0, 2.0], [7.0, -4.0, -5.0]]], [[[7.0, 1.0, -1.0], [7.0, 5.0, -5.0]], [[-4.0, 1.0, -3.0], [5.0, -4.0, 0.0]], 
-[[-4.0, 6.0, -7.0], [6.0, -2.0, 0.0]], [[1.0, 1.0, -1.0], [-7.0, -4.0, -6.0]], [[-5.0, 4.0, -4.0], [-7.0, 0.0, -1.0]]], 
-[[[-3.0, 7.0, 7.0], [3.0, -1.0, -1.0]], [[4.0, 0.0, -5.0], [-2.0, 7.0, -4.0]], [[2.0, 4.0, 7.0], [2.0, 6.0, 5.0]], [[-1.0, 
--7.0, -2.0], [-6.0, 0.0, 5.0]], [[3.0, 7.0, 0.0], [-3.0, 0.0, -5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, 4.0, 7.0], [3.0, 
-7.0, 4.0]], [[-1.0, -5.0, -6.0], [4.0, -4.0, -4.0]], [[6.0, 1.0, 0.0], [4.0, 5.0, -2.0]], [[4.0, 7.0, -7.0], [3.0, 5.0, 4.0]], 
-[[6.0, -5.0, 6.0], [-1.0, -5.0, 1.0]]], [[[-4.0, 0.0, 5.0], [4.0, -6.0, 1.0]], [[7.0, 2.0, 0.0], [-4.0, -7.0, 7.0]], [[1.0, 
-0.0, -2.0], [-1.0, -2.0, -7.0]], [[7.0, 0.0, -3.0], [4.0, 2.0, -1.0]], [[-3.0, -4.0, 3.0], [2.0, 0.0, 0.0]]], [[[-4.0, -5.0, 
--1.0], [-4.0, 3.0, 2.0]], [[0.0, 2.0, 0.0], [-3.0, 2.0, 7.0]], [[-4.0, 2.0, 0.0], [-3.0, -5.0, -2.0]], [[3.0, 5.0, -7.0], [7.0, 
-7.0, -5.0]], [[6.0, 0.0, 6.0], [5.0, 0.0, 3.0]]], [[[-1.0, 5.0, 4.0], [-7.0, -7.0, 7.0]], [[3.0, 0.0, 0.0], [1.0, -3.0, 4.0]], 
-[[-6.0, -3.0, 4.0], [6.0, 5.0, -1.0]], [[-2.0, 4.0, 0.0], [-6.0, 7.0, -6.0]], [[-5.0, 0.0, 4.0], [-1.0, -1.0, 0.0]]]])
-      arg1=numpy.array([[-6.0, -5.0, 6.0], [6.0, 7.0, 0.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[4.0, -2.0, -7.0], [4.0, 1.0, 2.0], [-7.0, -5.0, 7.0], [-7.0, 0.0, -5.0], [7.0, 2.0, -4.0]], 
+[[7.0, -6.0, 0.0], [-7.0, -5.0, 5.0], [2.0, -4.0, -1.0], [-6.0, -7.0, 3.0], [5.0, -1.0, -4.0]], [[-5.0, 2.0, -7.0], [2.0, -5.0, 
+3.0], [5.0, -6.0, -7.0], [-2.0, -3.0, -3.0], [0.0, -2.0, -6.0]], [[0.0, -7.0, -3.0], [3.0, 7.0, -4.0], [-3.0, -2.0, 6.0], [4.0, 
+0.0, -4.0], [-1.0, -6.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-2.0, -4.0, 0.0], [0.0, 3.0, 0.0], [-6.0, 3.0, -1.0], [7.0, -3.0, -4.0], [0.0, -7.0, 
+-6.0]], [[4.0, -5.0, 1.0], [1.0, -1.0, -3.0], [0.0, 4.0, -7.0], [-1.0, 0.0, -5.0], [0.0, 5.0, 1.0]], [[5.0, -3.0, 0.0], [-4.0, 
+3.0, -3.0], [-5.0, -2.0, -3.0], [-5.0, -4.0, -5.0], [6.0, 0.0, -5.0]], [[-3.0, -4.0, -6.0], [-4.0, 4.0, -7.0], [4.0, 4.0, 
+-7.0], [2.0, -5.0, -1.0], [5.0, 2.0, -4.0]]]))
+      arg1=Data(numpy.array([2.0, 0.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-3.0, 0.0, 2.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[-13.0, 14.0, 7.0, -29.0, 2.0], [14.0, 1.0, 1.0, -3.0, -2.0], [-31.0, 13.0, -11.0, -13.0, -18.0], 
+[-9.0, -6.0, 12.0, -4.0, 13.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[6.0, 0.0, 16.0, -29.0, -12.0], [-10.0, -9.0, -14.0, -7.0, 2.0], [-15.0, 6.0, 9.0, 5.0, 
+-28.0], [-3.0, -2.0, -26.0, -8.0, -23.0]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 3.0, -6.0], [2.0, 0.0, -4.0]], [[-4.0, 0.0, 1.0], [-1.0, -6.0, 7.0]], [[0.0, 1.0, 5.0], 
+[-3.0, 2.0, -3.0]], [[0.0, 2.0, 0.0], [-6.0, 4.0, 4.0]], [[-3.0, 1.0, -7.0], [2.0, 2.0, 0.0]]], [[[4.0, -2.0, 4.0], [-2.0, 
+-6.0, -5.0]], [[1.0, -6.0, -1.0], [6.0, 2.0, 1.0]], [[2.0, -6.0, 2.0], [2.0, 2.0, 4.0]], [[6.0, 5.0, 0.0], [2.0, 4.0, -6.0]], 
+[[3.0, 0.0, 6.0], [-3.0, -6.0, -3.0]]], [[[7.0, -3.0, 3.0], [3.0, 4.0, 2.0]], [[5.0, 2.0, 3.0], [-3.0, 0.0, -5.0]], [[2.0, 4.0, 
+6.0], [-1.0, -1.0, 4.0]], [[0.0, -5.0, -1.0], [-3.0, -1.0, -5.0]], [[3.0, 0.0, -6.0], [6.0, -5.0, -4.0]]], [[[-3.0, 5.0, 0.0], 
+[7.0, -2.0, 6.0]], [[-4.0, 6.0, 2.0], [-3.0, -1.0, 0.0]], [[-3.0, 4.0, 2.0], [-4.0, 2.0, 5.0]], [[0.0, 4.0, 1.0], [3.0, 3.0, 
+6.0]], [[-2.0, -4.0, 2.0], [-3.0, -5.0, -7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 6.0, -2.0], [4.0, -5.0, 2.0]], [[0.0, 5.0, -1.0], [-7.0, -3.0, -5.0]], [[-3.0, 
+-6.0, 1.0], [0.0, 0.0, 1.0]], [[-6.0, -7.0, 0.0], [2.0, 7.0, 0.0]], [[-3.0, 4.0, 6.0], [-5.0, -3.0, -2.0]]], [[[5.0, -7.0, 
+6.0], [1.0, 2.0, -2.0]], [[-1.0, 0.0, 0.0], [-1.0, -1.0, 1.0]], [[0.0, -1.0, 0.0], [5.0, -7.0, 6.0]], [[7.0, 6.0, 0.0], [0.0, 
+-7.0, -4.0]], [[0.0, -4.0, 2.0], [0.0, 0.0, 1.0]]], [[[2.0, -5.0, -4.0], [-3.0, 5.0, 0.0]], [[-5.0, 7.0, -7.0], [-7.0, 0.0, 
+-1.0]], [[6.0, 1.0, -7.0], [6.0, 0.0, -3.0]], [[0.0, -5.0, -7.0], [-3.0, -4.0, -4.0]], [[-3.0, -3.0, 3.0], [7.0, 4.0, -6.0]]], 
+[[[-6.0, -2.0, -6.0], [-7.0, 2.0, 6.0]], [[3.0, 1.0, 7.0], [1.0, -4.0, -1.0]], [[6.0, 1.0, 2.0], [-4.0, -5.0, 4.0]], [[0.0, 
+0.0, 1.0], [-1.0, 4.0, 5.0]], [[5.0, 1.0, 7.0], [-3.0, 3.0, 7.0]]]]))
+      arg1=Data(numpy.array([[-6.0, 7.0, 3.0], [1.0, -6.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[7.0, 1.0, -5.0], [-7.0, 0.0, -4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[6.0, -12.0, -21.0, -13.0, 68.0], [26.0, 20.0, 53.0, -47.0, 38.0], [24.0, 3.0, -26.0, -87.0, 
--56.0], [36.0, -17.0, 64.0, -7.0, -71.0]])+(1.-msk_ref)*numpy.array([[119.0, -9.0, 18.0, -48.0, -16.0], [36.0, -125.0, -38.0, 
--22.0, 68.0], [40.0, -14.0, -39.0, 6.0, 30.0], [-86.0, -33.0, 146.0, 5.0, 41.0]])
+      ref=Data(numpy.array([[-33.0, 76.0, 1.0, -8.0, -6.0], [-2.0, -55.0, -50.0, -35.0, 27.0], [-71.0, -20.0, 47.0, -45.0, 
+-8.0], [84.0, 75.0, 46.0, 28.0, 3.0]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[-6.0, 79.0, -36.0, -63.0, -4.0], [-1.0, -4.0, -60.0, 71.0, -18.0], [50.0, 60.0, 48.0, 
+67.0, -64.0], [11.0, -16.0, 45.0, -18.0, -6.0]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[6.0, -4.0, 3.0, 5.0, -7.0], [3.0, 0.0, 5.0, -2.0, 5.0], [2.0, 1.0, 0.0, -6.0, -7.0], [-2.0, 
-2.0, -3.0, 3.0, 3.0]])+(1.-msk_arg0)*numpy.array([[6.0, -6.0, -6.0, -1.0, -5.0], [7.0, 0.0, 6.0, 2.0, -2.0], [-2.0, 7.0, -1.0, 
--1.0, -3.0], [1.0, 0.0, 1.0, 4.0, -2.0]])
-      arg1=numpy.array([-5.0, 5.0])
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-4.0, 7.0, 4.0, -1.0, 0.0], [0.0, -3.0, -6.0, 4.0, -1.0], [-4.0, -7.0, 0.0, 7.0, -6.0], [1.0, 
+0.0, 1.0, 7.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-2.0, -5.0, 5.0, -1.0, 4.0], [-2.0, -5.0, 2.0, 6.0, -6.0], [-6.0, -2.0, 3.0, -6.0, 
+0.0], [5.0, 4.0, 0.0, -2.0, 7.0]]))
+      arg1=Data(numpy.array([-3.0, -6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, -2.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-30.0, 30.0], [20.0, -20.0], [-15.0, 15.0], [-25.0, 25.0], [35.0, -35.0]], [[-15.0, 15.0], 
-[0.0, 0.0], [-25.0, 25.0], [10.0, -10.0], [-25.0, 25.0]], [[-10.0, 10.0], [-5.0, 5.0], [0.0, 0.0], [30.0, -30.0], [35.0, 
--35.0]], [[10.0, -10.0], [-10.0, 10.0], [15.0, -15.0], [-15.0, 15.0], [-15.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[-30.0, 
-30.0], [30.0, -30.0], [30.0, -30.0], [5.0, -5.0], [25.0, -25.0]], [[-35.0, 35.0], [0.0, 0.0], [-30.0, 30.0], [-10.0, 10.0], 
-[10.0, -10.0]], [[10.0, -10.0], [-35.0, 35.0], [5.0, -5.0], [5.0, -5.0], [15.0, -15.0]], [[-5.0, 5.0], [0.0, 0.0], [-5.0, 5.0], 
-[-20.0, 20.0], [10.0, -10.0]]])
+      ref=Data(numpy.array([[[12.0, 24.0], [-21.0, -42.0], [-12.0, -24.0], [3.0, 6.0], [0.0, 0.0]], [[0.0, 0.0], [9.0, 18.0], 
+[18.0, 36.0], [-12.0, -24.0], [3.0, 6.0]], [[12.0, 24.0], [21.0, 42.0], [0.0, 0.0], [-21.0, -42.0], [18.0, 36.0]], [[-3.0, 
+-6.0], [0.0, 0.0], [-3.0, -6.0], [-21.0, -42.0], [-18.0, -36.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-10.0, 4.0], [-25.0, 10.0], [25.0, -10.0], [-5.0, 2.0], [20.0, -8.0]], [[-10.0, 4.0], 
+[-25.0, 10.0], [10.0, -4.0], [30.0, -12.0], [-30.0, 12.0]], [[-30.0, 12.0], [-10.0, 4.0], [15.0, -6.0], [-30.0, 12.0], [0.0, 
+0.0]], [[25.0, -10.0], [20.0, -8.0], [0.0, 0.0], [-10.0, 4.0], [35.0, -14.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-5.0, -6.0, 5.0], [5.0, 5.0, -6.0], [-6.0, 2.0, 2.0], [7.0, 4.0, -1.0], [-2.0, -3.0, -5.0]], 
-[[5.0, -4.0, -5.0], [-6.0, -6.0, 3.0], [5.0, 2.0, -7.0], [3.0, 4.0, 0.0], [2.0, -2.0, 0.0]], [[-1.0, 1.0, 3.0], [3.0, -7.0, 
-2.0], [-5.0, -4.0, 5.0], [2.0, -4.0, 5.0], [0.0, 5.0, 1.0]], [[-5.0, 3.0, 2.0], [0.0, -3.0, -6.0], [7.0, -1.0, 3.0], [7.0, 2.0, 
--4.0], [4.0, -2.0, 3.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 5.0, 1.0], [-2.0, -4.0, 3.0], [-6.0, 5.0, 5.0], [0.0, -4.0, 0.0], 
-[-7.0, -1.0, 4.0]], [[6.0, 5.0, 3.0], [5.0, -1.0, 2.0], [0.0, 7.0, 1.0], [-3.0, -2.0, 6.0], [0.0, -7.0, 6.0]], [[-4.0, -4.0, 
-3.0], [-5.0, -1.0, 6.0], [-1.0, -4.0, 4.0], [-3.0, -4.0, -4.0], [1.0, 1.0, 1.0]], [[5.0, -3.0, 7.0], [3.0, -4.0, 1.0], [3.0, 
-7.0, 5.0], [0.0, -4.0, 5.0], [-7.0, 0.0, -4.0]]])
-      arg1=numpy.array([[5.0, 6.0, -1.0], [-4.0, 4.0, 0.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[3.0, 4.0, 4.0], [6.0, 0.0, 0.0], [-3.0, -1.0, 1.0], [-7.0, -2.0, 7.0], [4.0, 0.0, -3.0]], [[1.0, 
+5.0, -4.0], [-1.0, -2.0, 3.0], [6.0, 6.0, 6.0], [-7.0, 0.0, 2.0], [1.0, -3.0, -2.0]], [[-5.0, 5.0, 0.0], [-5.0, -5.0, 0.0], 
+[-3.0, -6.0, 0.0], [4.0, -6.0, 3.0], [-6.0, 5.0, -6.0]], [[-4.0, 3.0, -1.0], [2.0, -5.0, 3.0], [-3.0, 1.0, 7.0], [0.0, 0.0, 
+-5.0], [3.0, 0.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, -6.0, -1.0], [-3.0, 3.0, -3.0], [-3.0, 5.0, 0.0], [-4.0, 0.0, 0.0], [-2.0, 
+-3.0, 3.0]], [[-7.0, 0.0, 3.0], [1.0, 0.0, 3.0], [-3.0, 2.0, 1.0], [-5.0, 6.0, 2.0], [7.0, -6.0, 2.0]], [[-6.0, -3.0, -5.0], 
+[-4.0, -7.0, 6.0], [-4.0, 2.0, 0.0], [1.0, 4.0, 6.0], [2.0, -6.0, 4.0]], [[1.0, -5.0, -6.0], [3.0, -3.0, -5.0], [2.0, 2.0, 
+7.0], [1.0, -7.0, 0.0], [-1.0, -3.0, 1.0]]]))
+      arg1=Data(numpy.array([[-1.0, 5.0, 5.0], [-7.0, -3.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-7.0, -1.0, 3.0], [2.0, -2.0, -4.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-66.0, -4.0], [61.0, 0.0], [-20.0, 32.0], [60.0, -12.0], [-23.0, -4.0]], [[6.0, -36.0], 
-[-69.0, 0.0], [44.0, -12.0], [39.0, 4.0], [-2.0, -16.0]], [[-2.0, 8.0], [-29.0, -40.0], [-54.0, 4.0], [-19.0, -24.0], [29.0, 
-20.0]], [[-9.0, 32.0], [-12.0, -12.0], [26.0, -32.0], [51.0, -20.0], [5.0, -24.0]]])+(1.-msk_ref)*numpy.array([[[39.0, 12.0], 
-[-37.0, -8.0], [-5.0, 44.0], [-24.0, -16.0], [-45.0, 24.0]], [[57.0, -4.0], [17.0, -24.0], [41.0, 28.0], [-33.0, 4.0], [-48.0, 
--28.0]], [[-47.0, 0.0], [-37.0, 16.0], [-33.0, -12.0], [-35.0, -4.0], [10.0, 0.0]], [[0.0, -32.0], [-10.0, -28.0], [52.0, 
-16.0], [-29.0, -16.0], [-31.0, 28.0]]])
+      ref=Data(numpy.array([[[37.0, -33.0], [-6.0, -42.0], [3.0, 24.0], [32.0, 55.0], [-19.0, -28.0]], [[4.0, -22.0], [6.0, 
+13.0], [54.0, -60.0], [17.0, 49.0], [-26.0, 2.0]], [[30.0, 20.0], [-20.0, 50.0], [-27.0, 39.0], [-19.0, -10.0], [1.0, 27.0]], 
+[[14.0, 19.0], [-12.0, 1.0], [43.0, 18.0], [-25.0, 0.0], [22.0, -21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[38.0, 6.0], [9.0, 0.0], [16.0, -16.0], [28.0, -8.0], [26.0, -10.0]], [[58.0, -26.0], 
+[2.0, -10.0], [22.0, -14.0], [35.0, -30.0], [-37.0, 18.0]], [[30.0, 14.0], [53.0, -18.0], [26.0, -12.0], [7.0, -30.0], [4.0, 
+0.0]], [[-20.0, 36.0], [-33.0, 32.0], [5.0, -28.0], [0.0, 16.0], [13.0, 0.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-2.0, -2.0, 5.0], [-7.0, 1.0, 4.0]], [[-6.0, -4.0, 3.0], [1.0, -5.0, -4.0]], [[0.0, 0.0, 
--3.0], [-3.0, 5.0, 7.0]], [[-7.0, -2.0, 0.0], [0.0, 4.0, -2.0]], [[4.0, -5.0, -7.0], [-5.0, 3.0, -7.0]]], [[[3.0, -2.0, -3.0], 
-[-2.0, -5.0, -7.0]], [[6.0, -4.0, -4.0], [0.0, -6.0, 0.0]], [[-3.0, 1.0, -7.0], [-4.0, 1.0, 5.0]], [[2.0, 3.0, 6.0], [-5.0, 
-4.0, 6.0]], [[-5.0, -2.0, -5.0], [4.0, -2.0, 5.0]]], [[[3.0, -3.0, -7.0], [-2.0, 1.0, 2.0]], [[6.0, 3.0, 7.0], [3.0, 5.0, 
--5.0]], [[0.0, -3.0, -5.0], [-1.0, -7.0, 5.0]], [[6.0, 4.0, 0.0], [1.0, 5.0, 3.0]], [[-2.0, -6.0, 1.0], [5.0, -6.0, 0.0]]], 
-[[[-1.0, 3.0, 2.0], [-6.0, 6.0, 0.0]], [[0.0, 5.0, 6.0], [-6.0, 0.0, 2.0]], [[1.0, 2.0, 3.0], [7.0, -5.0, -1.0]], [[0.0, 2.0, 
--6.0], [0.0, 4.0, -1.0]], [[6.0, 6.0, -1.0], [3.0, 5.0, -6.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 0.0, 0.0], [4.0, 2.0, 
-6.0]], [[-5.0, -3.0, 7.0], [3.0, 6.0, 6.0]], [[5.0, 0.0, 4.0], [0.0, 6.0, -1.0]], [[3.0, -3.0, -7.0], [-5.0, 2.0, -5.0]], 
-[[3.0, 7.0, 3.0], [-3.0, 3.0, 3.0]]], [[[3.0, -4.0, 7.0], [0.0, 7.0, -2.0]], [[0.0, -3.0, 1.0], [-6.0, -4.0, 0.0]], [[4.0, 
--7.0, -6.0], [6.0, -6.0, -2.0]], [[-6.0, -5.0, -5.0], [-2.0, 1.0, 3.0]], [[0.0, 7.0, 0.0], [-5.0, -2.0, -6.0]]], [[[7.0, 6.0, 
--1.0], [0.0, -4.0, -3.0]], [[6.0, 0.0, 2.0], [0.0, -7.0, -7.0]], [[0.0, 4.0, 0.0], [-7.0, -2.0, -6.0]], [[1.0, 3.0, 7.0], [4.0, 
-0.0, -3.0]], [[-7.0, -1.0, 6.0], [6.0, 0.0, -3.0]]], [[[0.0, -7.0, 0.0], [-4.0, 4.0, -2.0]], [[-2.0, -5.0, 6.0], [-1.0, 2.0, 
-0.0]], [[-6.0, -3.0, -4.0], [-5.0, 0.0, 0.0]], [[-6.0, 0.0, 2.0], [-3.0, 4.0, 7.0]], [[-1.0, 7.0, 4.0], [-4.0, 0.0, 0.0]]]])
-      arg1=numpy.array([[[5.0, -1.0, -3.0], [1.0, 1.0, 0.0]], [[0.0, -7.0, -1.0], [-5.0, 5.0, 2.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-7.0, 4.0, 0.0], [5.0, -3.0, 0.0]], [[3.0, 7.0, 0.0], [0.0, -2.0, 0.0]], [[-6.0, 1.0, 0.0], 
+[-5.0, 7.0, -5.0]], [[5.0, -7.0, 6.0], [0.0, 1.0, -6.0]], [[1.0, -2.0, -5.0], [-4.0, -1.0, 2.0]]], [[[3.0, 0.0, -6.0], [-5.0, 
+1.0, -3.0]], [[-4.0, -3.0, 3.0], [0.0, 3.0, 0.0]], [[4.0, 7.0, -3.0], [1.0, -1.0, -6.0]], [[6.0, 0.0, 5.0], [5.0, 0.0, -7.0]], 
+[[7.0, 0.0, -6.0], [-6.0, 0.0, 5.0]]], [[[0.0, -6.0, 5.0], [4.0, -2.0, -7.0]], [[6.0, 2.0, -7.0], [2.0, 1.0, 0.0]], [[-2.0, 
+5.0, -2.0], [-5.0, 1.0, -6.0]], [[-1.0, -4.0, -4.0], [0.0, -5.0, -2.0]], [[6.0, -7.0, 3.0], [-7.0, 4.0, -7.0]]], [[[2.0, 0.0, 
+-7.0], [-3.0, 7.0, 7.0]], [[4.0, 6.0, 6.0], [3.0, 3.0, 4.0]], [[-7.0, -4.0, 7.0], [4.0, 4.0, -1.0]], [[5.0, -3.0, 7.0], [5.0, 
+-5.0, 3.0]], [[-2.0, 5.0, 7.0], [5.0, 7.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-6.0, -4.0, 1.0], [-2.0, -6.0, 5.0]], [[-2.0, -2.0, -3.0], [1.0, 2.0, -2.0]], 
+[[-1.0, 6.0, -3.0], [-4.0, 7.0, -5.0]], [[-1.0, -2.0, 7.0], [2.0, 3.0, 0.0]], [[0.0, -4.0, 2.0], [6.0, 5.0, 4.0]]], [[[-7.0, 
+-6.0, 1.0], [1.0, -6.0, 3.0]], [[2.0, 1.0, -3.0], [1.0, -6.0, -1.0]], [[-2.0, 0.0, 0.0], [3.0, 1.0, 0.0]], [[-2.0, -1.0, 1.0], 
+[-3.0, 1.0, -4.0]], [[-4.0, -2.0, -6.0], [1.0, 6.0, -3.0]]], [[[0.0, 4.0, -4.0], [-1.0, 6.0, 4.0]], [[-6.0, -7.0, 0.0], [-3.0, 
+-3.0, -5.0]], [[-1.0, -7.0, 7.0], [-7.0, 6.0, 7.0]], [[6.0, 6.0, -5.0], [-1.0, 5.0, 4.0]], [[6.0, 3.0, 4.0], [3.0, -5.0, 
+4.0]]], [[[5.0, 1.0, 4.0], [4.0, -6.0, 0.0]], [[-7.0, 0.0, -2.0], [-1.0, -5.0, -6.0]], [[-6.0, 6.0, 7.0], [-4.0, -4.0, -4.0]], 
+[[2.0, 7.0, 4.0], [0.0, 7.0, -3.0]], [[6.0, 0.0, 7.0], [-4.0, 0.0, -3.0]]]]))
+      arg1=Data(numpy.array([[[0.0, 7.0, 4.0], [4.0, -4.0, 5.0]], [[0.0, -3.0, -1.0], [-7.0, -4.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, -3.0, -3.0], [-1.0, 7.0, 1.0]], [[0.0, 1.0, 7.0], [-4.0, 3.0, 1.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-29.0, 57.0], [-39.0, -13.0], [11.0, 57.0], [-29.0, 30.0], [44.0, 68.0]], [[19.0, -12.0], 
-[40.0, 2.0], [2.0, 35.0], [-12.0, 30.0], [-6.0, -1.0]], [[38.0, 47.0], [14.0, -28.0], [10.0, 6.0], [32.0, -2.0], [-8.0, 
--14.0]], [[-14.0, 37.0], [-29.0, -7.0], [-4.0, -79.0], [20.0, 10.0], [35.0, -43.0]]])+(1.-msk_ref)*numpy.array([[[11.0, 2.0], 
-[-34.0, 41.0], [19.0, 24.0], [36.0, 53.0], [-1.0, -16.0]], [[5.0, 52.0], [-10.0, 30.0], [45.0, -9.0], [-11.0, 61.0], [-14.0, 
--46.0]], [[28.0, -67.0], [17.0, -51.0], [-13.0, -15.0], [-15.0, -54.0], [-46.0, -35.0]], [[7.0, 85.0], [-22.0, 44.0], [-20.0, 
-50.0], [-35.0, 47.0], [-28.0, -33.0]]])
+      ref=Data(numpy.array([[[60.0, -35.0], [57.0, -13.0], [-66.0, 39.0], [-59.0, 53.0], [-36.0, 29.0]], [[-63.0, 58.0], 
+[-21.0, -6.0], [15.0, 21.0], [5.0, 9.0], [-23.0, 13.0]], [[-33.0, 42.0], [-10.0, -17.0], [-27.0, 60.0], [-34.0, 50.0], [-116.0, 
+100.0]], [[-33.0, -49.0], [86.0, -85.0], [-5.0, -32.0], [62.0, -34.0], [50.0, -78.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-44.0, -2.0], [20.0, -23.0], [36.0, 17.0], [1.0, 48.0], [39.0, 5.0]], [[-46.0, 
+-18.0], [-32.0, -43.0], [-2.0, -9.0], [0.0, 17.0], [50.0, -33.0]], [[47.0, 2.0], [-20.0, -9.0], [53.0, 95.0], [55.0, -6.0], 
+[-37.0, 8.0]], [[-46.0, -5.0], [-55.0, -31.0], [-85.0, 55.0], [19.0, 53.0], [-2.0, 62.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_array_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 5.0, 2.0, -5.0, -5.0], [6.0, -7.0, 6.0, -1.0, 2.0], [3.0, 3.0, 0.0, 0.0, -1.0], [-3.0, 
--4.0, 5.0, 1.0, 6.0]])+(1.-msk_arg0)*numpy.array([[-1.0, 7.0, 0.0, 0.0, -4.0], [4.0, 2.0, 0.0, 4.0, 2.0], [-7.0, 7.0, -3.0, 
--7.0, 3.0], [-6.0, -1.0, 1.0, 0.0, 0.0]])
-      arg1=numpy.array([[6.0, -1.0, 0.0, -3.0, -4.0], [-7.0, 7.0, -6.0, 0.0, 5.0], [-5.0, -1.0, -7.0, -2.0, 4.0], [-1.0, -7.0, 
--2.0, 4.0, -7.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-5.0, 2.0, -6.0, -2.0, 5.0], [7.0, 0.0, 4.0, 3.0, -5.0], [5.0, -7.0, 2.0, -6.0, -7.0], [3.0, 0.0, 
+2.0, -2.0, 5.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, -7.0, -2.0, -3.0, -5.0], [-7.0, 3.0, 2.0, 0.0, 6.0], [-3.0, 6.0, 0.0, -4.0, 
+5.0], [-3.0, 0.0, 4.0, -1.0, 1.0]]))
+      arg1=Data(numpy.array([[-2.0, -1.0, 2.0, 0.0, 0.0], [3.0, -6.0, -1.0, -6.0, -2.0], [-6.0, 4.0, 0.0, 0.0, -4.0], [3.0, 
+-6.0, -1.0, 7.0, -1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 6.0, -5.0, 0.0, -5.0], [5.0, -2.0, 0.0, 5.0, -4.0], [1.0, -3.0, 4.0, -2.0, 
+5.0], [3.0, -5.0, 7.0, -7.0, 5.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[10.0, 5.0, -10.0, 0.0, 0.0], [-15.0, 30.0, 5.0, 30.0, 10.0], [30.0, -20.0, 0.0, 0.0, 20.0], 
+[-15.0, 30.0, 5.0, -35.0, 5.0]], [[-4.0, -2.0, 4.0, 0.0, 0.0], [6.0, -12.0, -2.0, -12.0, -4.0], [-12.0, 8.0, 0.0, 0.0, -8.0], 
+[6.0, -12.0, -2.0, 14.0, -2.0]], [[12.0, 6.0, -12.0, 0.0, 0.0], [-18.0, 36.0, 6.0, 36.0, 12.0], [36.0, -24.0, 0.0, 0.0, 24.0], 
+[-18.0, 36.0, 6.0, -42.0, 6.0]], [[4.0, 2.0, -4.0, 0.0, 0.0], [-6.0, 12.0, 2.0, 12.0, 4.0], [12.0, -8.0, 0.0, 0.0, 8.0], [-6.0, 
+12.0, 2.0, -14.0, 2.0]], [[-10.0, -5.0, 10.0, 0.0, 0.0], [15.0, -30.0, -5.0, -30.0, -10.0], [-30.0, 20.0, 0.0, 0.0, -20.0], 
+[15.0, -30.0, -5.0, 35.0, -5.0]]], [[[-14.0, -7.0, 14.0, 0.0, 0.0], [21.0, -42.0, -7.0, -42.0, -14.0], [-42.0, 28.0, 0.0, 0.0, 
+-28.0], [21.0, -42.0, -7.0, 49.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-8.0, -4.0, 8.0, 0.0, 0.0], [12.0, -24.0, -4.0, -24.0, -8.0], [-24.0, 16.0, 0.0, 0.0, -16.0], 
+[12.0, -24.0, -4.0, 28.0, -4.0]], [[-6.0, -3.0, 6.0, 0.0, 0.0], [9.0, -18.0, -3.0, -18.0, -6.0], [-18.0, 12.0, 0.0, 0.0, 
+-12.0], [9.0, -18.0, -3.0, 21.0, -3.0]], [[10.0, 5.0, -10.0, 0.0, 0.0], [-15.0, 30.0, 5.0, 30.0, 10.0], [30.0, -20.0, 0.0, 0.0, 
+20.0], [-15.0, 30.0, 5.0, -35.0, 5.0]]], [[[-10.0, -5.0, 10.0, 0.0, 0.0], [15.0, -30.0, -5.0, -30.0, -10.0], [-30.0, 20.0, 0.0, 
+0.0, -20.0], [15.0, -30.0, -5.0, 35.0, -5.0]], [[14.0, 7.0, -14.0, 0.0, 0.0], [-21.0, 42.0, 7.0, 42.0, 14.0], [42.0, -28.0, 
+0.0, 0.0, 28.0], [-21.0, 42.0, 7.0, -49.0, 7.0]], [[-4.0, -2.0, 4.0, 0.0, 0.0], [6.0, -12.0, -2.0, -12.0, -4.0], [-12.0, 8.0, 
+0.0, 0.0, -8.0], [6.0, -12.0, -2.0, 14.0, -2.0]], [[12.0, 6.0, -12.0, 0.0, 0.0], [-18.0, 36.0, 6.0, 36.0, 12.0], [36.0, -24.0, 
+0.0, 0.0, 24.0], [-18.0, 36.0, 6.0, -42.0, 6.0]], [[14.0, 7.0, -14.0, 0.0, 0.0], [-21.0, 42.0, 7.0, 42.0, 14.0], [42.0, -28.0, 
+0.0, 0.0, 28.0], [-21.0, 42.0, 7.0, -49.0, 7.0]]], [[[-6.0, -3.0, 6.0, 0.0, 0.0], [9.0, -18.0, -3.0, -18.0, -6.0], [-18.0, 
+12.0, 0.0, 0.0, -12.0], [9.0, -18.0, -3.0, 21.0, -3.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-4.0, -2.0, 4.0, 0.0, 0.0], [6.0, -12.0, -2.0, -12.0, -4.0], [-12.0, 8.0, 0.0, 0.0, 
+-8.0], [6.0, -12.0, -2.0, 14.0, -2.0]], [[4.0, 2.0, -4.0, 0.0, 0.0], [-6.0, 12.0, 2.0, 12.0, 4.0], [12.0, -8.0, 0.0, 0.0, 8.0], 
+[-6.0, 12.0, 2.0, -14.0, 2.0]], [[-10.0, -5.0, 10.0, 0.0, 0.0], [15.0, -30.0, -5.0, -30.0, -10.0], [-30.0, 20.0, 0.0, 0.0, 
+-20.0], [15.0, -30.0, -5.0, 35.0, -5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[25.0, -30.0, 25.0, 0.0, 25.0], [-25.0, 10.0, 0.0, -25.0, 20.0], [-5.0, 15.0, -20.0, 
+10.0, -25.0], [-15.0, 25.0, -35.0, 35.0, -25.0]], [[35.0, -42.0, 35.0, 0.0, 35.0], [-35.0, 14.0, 0.0, -35.0, 28.0], [-7.0, 
+21.0, -28.0, 14.0, -35.0], [-21.0, 35.0, -49.0, 49.0, -35.0]], [[10.0, -12.0, 10.0, 0.0, 10.0], [-10.0, 4.0, 0.0, -10.0, 8.0], 
+[-2.0, 6.0, -8.0, 4.0, -10.0], [-6.0, 10.0, -14.0, 14.0, -10.0]], [[15.0, -18.0, 15.0, 0.0, 15.0], [-15.0, 6.0, 0.0, -15.0, 
+12.0], [-3.0, 9.0, -12.0, 6.0, -15.0], [-9.0, 15.0, -21.0, 21.0, -15.0]], [[25.0, -30.0, 25.0, 0.0, 25.0], [-25.0, 10.0, 0.0, 
+-25.0, 20.0], [-5.0, 15.0, -20.0, 10.0, -25.0], [-15.0, 25.0, -35.0, 35.0, -25.0]]], [[[35.0, -42.0, 35.0, 0.0, 35.0], [-35.0, 
+14.0, 0.0, -35.0, 28.0], [-7.0, 21.0, -28.0, 14.0, -35.0], [-21.0, 35.0, -49.0, 49.0, -35.0]], [[-15.0, 18.0, -15.0, 0.0, 
+-15.0], [15.0, -6.0, 0.0, 15.0, -12.0], [3.0, -9.0, 12.0, -6.0, 15.0], [9.0, -15.0, 21.0, -21.0, 15.0]], [[-10.0, 12.0, -10.0, 
+0.0, -10.0], [10.0, -4.0, 0.0, 10.0, -8.0], [2.0, -6.0, 8.0, -4.0, 10.0], [6.0, -10.0, 14.0, -14.0, 10.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-30.0, 36.0, -30.0, 0.0, -30.0], 
+[30.0, -12.0, 0.0, 30.0, -24.0], [6.0, -18.0, 24.0, -12.0, 30.0], [18.0, -30.0, 42.0, -42.0, 30.0]]], [[[15.0, -18.0, 15.0, 
+0.0, 15.0], [-15.0, 6.0, 0.0, -15.0, 12.0], [-3.0, 9.0, -12.0, 6.0, -15.0], [-9.0, 15.0, -21.0, 21.0, -15.0]], [[-30.0, 36.0, 
+-30.0, 0.0, -30.0], [30.0, -12.0, 0.0, 30.0, -24.0], [6.0, -18.0, 24.0, -12.0, 30.0], [18.0, -30.0, 42.0, -42.0, 30.0]], [[0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[20.0, -24.0, 20.0, 
+0.0, 20.0], [-20.0, 8.0, 0.0, -20.0, 16.0], [-4.0, 12.0, -16.0, 8.0, -20.0], [-12.0, 20.0, -28.0, 28.0, -20.0]], [[-25.0, 30.0, 
+-25.0, 0.0, -25.0], [25.0, -10.0, 0.0, 25.0, -20.0], [5.0, -15.0, 20.0, -10.0, 25.0], [15.0, -25.0, 35.0, -35.0, 25.0]]], 
+[[[15.0, -18.0, 15.0, 0.0, 15.0], [-15.0, 6.0, 0.0, -15.0, 12.0], [-3.0, 9.0, -12.0, 6.0, -15.0], [-9.0, 15.0, -21.0, 21.0, 
+-15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-20.0, 
+24.0, -20.0, 0.0, -20.0], [20.0, -8.0, 0.0, 20.0, -16.0], [4.0, -12.0, 16.0, -8.0, 20.0], [12.0, -20.0, 28.0, -28.0, 20.0]], 
+[[5.0, -6.0, 5.0, 0.0, 5.0], [-5.0, 2.0, 0.0, -5.0, 4.0], [-1.0, 3.0, -4.0, 2.0, -5.0], [-3.0, 5.0, -7.0, 7.0, -5.0]], [[-5.0, 
+6.0, -5.0, 0.0, -5.0], [5.0, -2.0, 0.0, 5.0, -4.0], [1.0, -3.0, 4.0, -2.0, 5.0], [3.0, -5.0, 7.0, -7.0, 5.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[1.0, -1.0, 0.0], [4.0, 0.0, -4.0], [1.0, 0.0, -1.0], [2.0, 5.0, -7.0], [-3.0, 1.0, -2.0]], 
+[[-1.0, 4.0, -6.0], [-3.0, 4.0, 0.0], [2.0, 0.0, -1.0], [-3.0, 3.0, 7.0], [-5.0, -3.0, -5.0]], [[5.0, -2.0, 1.0], [-2.0, 1.0, 
+3.0], [-5.0, -4.0, 5.0], [-2.0, 5.0, -4.0], [-3.0, -5.0, 4.0]], [[-6.0, 7.0, 2.0], [-1.0, -5.0, 0.0], [4.0, -1.0, 7.0], [2.0, 
+7.0, 0.0], [-4.0, 0.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[7.0, 6.0, -6.0], [4.0, -5.0, 0.0], [1.0, -6.0, -1.0], [-4.0, 2.0, 1.0], [5.0, 2.0, 
+0.0]], [[-5.0, -5.0, 1.0], [-5.0, -6.0, -5.0], [5.0, 0.0, 7.0], [6.0, 0.0, 0.0], [0.0, -4.0, 0.0]], [[2.0, 2.0, 0.0], [6.0, 
+-1.0, 1.0], [0.0, -5.0, 0.0], [-6.0, 7.0, 0.0], [-2.0, 7.0, -7.0]], [[-3.0, 4.0, 5.0], [1.0, 2.0, 6.0], [3.0, -7.0, 6.0], [0.0, 
+5.0, 3.0], [3.0, 0.0, 7.0]]]))
+      arg1=Data(numpy.array([[[-3.0, 1.0, 1.0], [-6.0, 6.0, 7.0], [2.0, -1.0, 0.0], [4.0, -6.0, -7.0], [-5.0, 2.0, -4.0]], 
+[[3.0, 7.0, 2.0], [-1.0, -6.0, -2.0], [-5.0, 2.0, -4.0], [-1.0, 7.0, 0.0], [-4.0, 7.0, 1.0]], [[-2.0, -7.0, -4.0], [2.0, -4.0, 
+-4.0], [-5.0, 6.0, 5.0], [-7.0, 0.0, -3.0], [-4.0, 0.0, 7.0]], [[6.0, 1.0, -3.0], [6.0, 2.0, -3.0], [1.0, 4.0, 1.0], [-2.0, 
+4.0, -6.0], [-3.0, -4.0, 2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, 2.0, -3.0], [2.0, 0.0, 3.0], [4.0, 7.0, -2.0], [-4.0, -5.0, -6.0], [1.0, -6.0, 
+-3.0]], [[-2.0, -3.0, 6.0], [7.0, -1.0, 0.0], [4.0, 5.0, 5.0], [-6.0, -6.0, -7.0], [1.0, 0.0, 5.0]], [[-5.0, -2.0, -2.0], 
+[-2.0, -5.0, -4.0], [-6.0, -6.0, 0.0], [3.0, -3.0, -6.0], [-6.0, -4.0, -5.0]], [[-3.0, 0.0, -3.0], [-4.0, -5.0, -5.0], [-6.0, 
+3.0, -1.0], [-7.0, 7.0, -4.0], [2.0, 5.0, -3.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-4.0, -12.0, 3.0, 10.0, -7.0], [-4.0, 5.0, -7.0, -8.0, -11.0], [5.0, 6.0, -11.0, -7.0, -4.0], 
+[5.0, 4.0, -3.0, -6.0, 1.0]], [[-16.0, -52.0, 8.0, 44.0, -4.0], [4.0, 4.0, -4.0, -4.0, -20.0], [8.0, 24.0, -40.0, -16.0, 
+-44.0], [36.0, 36.0, 0.0, 16.0, -20.0]], [[-4.0, -13.0, 2.0, 11.0, -1.0], [1.0, 1.0, -1.0, -1.0, -5.0], [2.0, 6.0, -10.0, -4.0, 
+-11.0], [9.0, 9.0, 0.0, 4.0, -5.0]], [[-8.0, -31.0, -1.0, 27.0, 28.0], [27.0, -18.0, 28.0, 33.0, 20.0], [-11.0, 12.0, -15.0, 
+7.0, -57.0], [38.0, 43.0, 15.0, 58.0, -40.0]], [[8.0, 10.0, -7.0, -4.0, 25.0], [-6.0, 1.0, 25.0, 10.0, 17.0], [7.0, -2.0, 11.0, 
+27.0, -2.0], [-11.0, -10.0, -1.0, 22.0, 1.0]]], [[[1.0, -12.0, -6.0, 14.0, 37.0], [13.0, -11.0, 37.0, 29.0, 26.0], [-2.0, 6.0, 
+-1.0, 25.0, -38.0], [16.0, 20.0, 9.0, 54.0, -25.0]], [[13.0, 42.0, -10.0, -36.0, 23.0], [19.0, -21.0, 23.0, 31.0, 40.0], 
+[-22.0, -22.0, 39.0, 21.0, 12.0], [-14.0, -10.0, 13.0, 22.0, -7.0]], [[-7.0, -19.0, 4.0, 15.0, -6.0], [4.0, 0.0, -6.0, -2.0, 
+-9.0], [0.0, 8.0, -15.0, -11.0, -15.0], [15.0, 15.0, 1.0, 2.0, -8.0]], [[19.0, 85.0, -9.0, -79.0, -7.0], [26.0, -29.0, -7.0, 
+24.0, 40.0], [-43.0, -46.0, 68.0, 0.0, 61.0], [-36.0, -33.0, 16.0, -24.0, 11.0]], [[7.0, -23.0, -7.0, 33.0, 39.0], [-46.0, 
+33.0, 39.0, -16.0, -6.0], [51.0, 22.0, -18.0, 50.0, -15.0], [-18.0, -21.0, -22.0, 28.0, 17.0]]], [[[-16.0, -35.0, 12.0, 25.0, 
+-33.0], [3.0, 5.0, -33.0, -19.0, -33.0], [0.0, 14.0, -32.0, -38.0, -13.0], [25.0, 23.0, -2.0, -24.0, -5.0]], [[10.0, 39.0, 
+-5.0, -35.0, 0.0], [7.0, -10.0, 0.0, 9.0, 18.0], [-15.0, -20.0, 31.0, 5.0, 29.0], [-20.0, -19.0, 5.0, -10.0, 8.0]], [[16.0, 
+41.0, -6.0, -31.0, -3.0], [-33.0, 19.0, -3.0, -23.0, -3.0], [18.0, -14.0, 26.0, 20.0, 55.0], [-49.0, -53.0, -16.0, -36.0, 
+41.0]], [[7.0, 14.0, -9.0, -10.0, 36.0], [21.0, -20.0, 36.0, 37.0, 39.0], [-15.0, -8.0, 20.0, 26.0, -20.0], [5.0, 10.0, 14.0, 
+48.0, -22.0]], [[8.0, 16.0, -1.0, -10.0, -11.0], [-36.0, 25.0, -11.0, -32.0, -19.0], [25.0, -2.0, 5.0, 9.0, 40.0], [-35.0, 
+-40.0, -19.0, -38.0, 37.0]]], [[[27.0, 92.0, -19.0, -80.0, 36.0], [35.0, -40.0, 36.0, 55.0, 75.0], [-45.0, -48.0, 82.0, 36.0, 
+38.0], [-35.0, -28.0, 24.0, 28.0, -6.0]], [[-2.0, -24.0, 3.0, 26.0, -5.0], [-38.0, 31.0, -5.0, -34.0, -31.0], [37.0, 18.0, 
+-25.0, 7.0, 4.0], [-11.0, -16.0, -21.0, -18.0, 23.0]], [[-6.0, 19.0, 9.0, -27.0, -50.0], [19.0, -12.0, -50.0, -11.0, -16.0], 
+[-29.0, -16.0, 9.0, -49.0, 33.0], [2.0, 1.0, 7.0, -54.0, 6.0]], [[1.0, 30.0, -3.0, -34.0, 4.0], [55.0, -44.0, 4.0, 47.0, 41.0], 
+[-53.0, -24.0, 32.0, -14.0, -8.0], [19.0, 26.0, 30.0, 24.0, -34.0]], [[15.0, 45.0, -8.0, -37.0, 8.0], [-6.0, -2.0, 8.0, 4.0, 
+19.0], [-4.0, -20.0, 35.0, 19.0, 37.0], [-33.0, -33.0, -1.0, -10.0, 18.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[51.0, -4.0, 82.0, -22.0, -11.0], [-68.0, 43.0, 28.0, -36.0, -23.0], [-35.0, -20.0, 
+-78.0, 39.0, -36.0], [-3.0, -28.0, -18.0, 17.0, 62.0]], [[2.0, 8.0, -19.0, 9.0, 34.0], [7.0, 33.0, -9.0, 6.0, 4.0], [-10.0, 
+17.0, 6.0, 27.0, -4.0], [-12.0, 9.0, -39.0, -63.0, -17.0]], [[-6.0, -1.0, -36.0, 32.0, 40.0], [10.0, 13.0, -31.0, 37.0, -4.0], 
+[9.0, 32.0, 30.0, 27.0, 23.0], [0.0, 31.0, -23.0, -45.0, -25.0]], [[-11.0, -5.0, -4.0, 0.0, -19.0], [8.0, -30.0, -1.0, 5.0, 
+1.0], [14.0, -6.0, 12.0, -24.0, 11.0], [9.0, 1.0, 29.0, 38.0, -1.0]], [[19.0, 10.0, 34.0, -30.0, -7.0], [-16.0, 33.0, 30.0, 
+-42.0, 5.0], [-29.0, -20.0, -42.0, 9.0, -38.0], [-15.0, -30.0, -24.0, -21.0, 20.0]]], [[[-28.0, -7.0, -57.0, 39.0, 22.0], 
+[31.0, -30.0, -40.0, 53.0, 0.0], [33.0, 31.0, 60.0, -6.0, 45.0], [12.0, 40.0, 14.0, -4.0, -38.0]], [[-12.0, -25.0, -52.0, 80.0, 
+46.0], [-2.0, -29.0, -75.0, 101.0, -30.0], [47.0, 60.0, 66.0, 33.0, 79.0], [30.0, 75.0, 17.0, 13.0, -25.0]], [[-6.0, 31.0, 6.0, 
+-62.0, -16.0], [32.0, 35.0, 55.0, -79.0, 40.0], [-39.0, -38.0, -30.0, -27.0, -65.0], [-36.0, -55.0, -37.0, -63.0, -11.0]], 
+[[18.0, 12.0, 24.0, -24.0, 6.0], [-12.0, 42.0, 24.0, -36.0, 6.0], [-30.0, -12.0, -36.0, 18.0, -36.0], [-18.0, -24.0, -36.0, 
+-42.0, 12.0]], [[-8.0, 0.0, -28.0, 20.0, 24.0], [12.0, 4.0, -20.0, 24.0, 0.0], [8.0, 20.0, 24.0, 12.0, 16.0], [0.0, 20.0, 
+-12.0, -28.0, -20.0]]], [[[10.0, 4.0, 22.0, -18.0, -10.0], [-10.0, 12.0, 18.0, -24.0, 2.0], [-14.0, -14.0, -24.0, 0.0, -20.0], 
+[-6.0, -18.0, -6.0, 0.0, 14.0]], [[13.0, 15.0, 15.0, -25.0, 9.0], [-3.0, 43.0, 24.0, -37.0, 11.0], [-30.0, -11.0, -30.0, 15.0, 
+-37.0], [-21.0, -24.0, -40.0, -53.0, 4.0]], [[-10.0, 0.0, -35.0, 25.0, 30.0], [15.0, 5.0, -25.0, 30.0, 0.0], [10.0, 25.0, 30.0, 
+15.0, 20.0], [0.0, 25.0, -15.0, -35.0, -25.0]], [[-4.0, -12.0, 25.0, -11.0, -48.0], [-9.0, -49.0, 11.0, -6.0, -6.0], [16.0, 
+-23.0, -6.0, -39.0, 8.0], [18.0, -11.0, 57.0, 91.0, 23.0]], [[29.0, -25.0, 55.0, 15.0, -23.0], [-59.0, -21.0, -8.0, 19.0, 
+-37.0], [10.0, -3.0, -30.0, 15.0, 19.0], [27.0, 8.0, 40.0, 91.0, 52.0]]], [[[-16.0, 9.0, 6.0, -38.0, -42.0], [24.0, -25.0, 
+33.0, -41.0, 22.0], [-3.0, -34.0, -6.0, -51.0, -23.0], [-6.0, -33.0, 25.0, 29.0, -1.0]], [[-11.0, 20.0, 6.0, -50.0, -29.0], 
+[28.0, 5.0, 44.0, -60.0, 31.0], [-21.0, -36.0, -18.0, -39.0, -44.0], [-21.0, -44.0, -6.0, -17.0, -6.0]], [[-23.0, 24.0, -49.0, 
+-13.0, 27.0], [51.0, 28.0, 7.0, -18.0, 33.0], [-13.0, 5.0, 24.0, -6.0, -20.0], [-27.0, -7.0, -45.0, -94.0, -47.0]], [[1.0, 9.0, 
+29.0, -43.0, -39.0], [3.0, -5.0, 40.0, -51.0, 15.0], [-16.0, -37.0, -30.0, -33.0, -35.0], [-9.0, -40.0, 12.0, 23.0, 16.0]], 
+[[-12.0, 27.0, -2.0, -54.0, -18.0], [36.0, 21.0, 47.0, -67.0, 38.0], [-29.0, -34.0, -18.0, -33.0, -53.0], [-30.0, -47.0, -25.0, 
+-49.0, -15.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, -3.0, 6.0], [3.0, -7.0, 1.0]], [[-1.0, -5.0, -1.0], [3.0, 7.0, 1.0]], [[4.0, -4.0, 7.0], 
+[-2.0, -1.0, -5.0]], [[2.0, -2.0, 5.0], [-4.0, 1.0, 1.0]], [[0.0, 6.0, 2.0], [-4.0, 5.0, 2.0]]], [[[3.0, 6.0, 5.0], [-5.0, 
+-3.0, 1.0]], [[3.0, 3.0, 1.0], [4.0, 1.0, 7.0]], [[4.0, 1.0, -2.0], [-4.0, -2.0, 6.0]], [[-3.0, 7.0, 0.0], [2.0, 6.0, 5.0]], 
+[[3.0, 6.0, 0.0], [-1.0, -2.0, 1.0]]], [[[1.0, -1.0, 7.0], [-3.0, 3.0, -6.0]], [[-6.0, 6.0, -5.0], [-4.0, 0.0, 3.0]], [[-2.0, 
+-5.0, 4.0], [-1.0, -5.0, -1.0]], [[5.0, 4.0, 7.0], [7.0, -4.0, 6.0]], [[-1.0, -5.0, 7.0], [-4.0, -1.0, -6.0]]], [[[-1.0, 0.0, 
+1.0], [-7.0, 2.0, -1.0]], [[-5.0, 0.0, 0.0], [3.0, 0.0, 0.0]], [[0.0, 5.0, 0.0], [0.0, 1.0, 6.0]], [[0.0, 5.0, 0.0], [6.0, 
+-3.0, -3.0]], [[4.0, 0.0, -2.0], [4.0, 0.0, -4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[6.0, 1.0, -6.0], [0.0, 1.0, 3.0]], [[2.0, 0.0, 6.0], [-3.0, -5.0, 6.0]], [[4.0, 
+5.0, 6.0], [-2.0, 0.0, 0.0]], [[-3.0, -2.0, -4.0], [0.0, -1.0, -4.0]], [[1.0, -7.0, 1.0], [-4.0, 1.0, -6.0]]], [[[4.0, 7.0, 
+7.0], [3.0, -4.0, -6.0]], [[0.0, 6.0, 0.0], [5.0, -6.0, 0.0]], [[-3.0, 2.0, -3.0], [-7.0, -2.0, 6.0]], [[0.0, 5.0, 3.0], [-6.0, 
+0.0, 7.0]], [[0.0, -6.0, 1.0], [-6.0, -4.0, -7.0]]], [[[4.0, -1.0, -3.0], [7.0, 6.0, -4.0]], [[3.0, 5.0, 3.0], [-6.0, -4.0, 
+-4.0]], [[-2.0, -1.0, -1.0], [-1.0, -6.0, -6.0]], [[-5.0, -4.0, 0.0], [0.0, 1.0, 0.0]], [[2.0, 6.0, 4.0], [-3.0, 3.0, -6.0]]], 
+[[[7.0, 7.0, 6.0], [-4.0, 0.0, 7.0]], [[3.0, -1.0, -6.0], [0.0, -2.0, 4.0]], [[0.0, 5.0, 4.0], [-1.0, -7.0, 7.0]], [[6.0, 2.0, 
+0.0], [3.0, -6.0, -1.0]], [[0.0, 6.0, 5.0], [3.0, 1.0, -6.0]]]]))
+      arg1=Data(numpy.array([[[[7.0, 4.0, -2.0], [3.0, 3.0, 4.0]], [[-7.0, 2.0, 0.0], [3.0, 0.0, 6.0]], [[3.0, 0.0, 4.0], [0.0, 
+3.0, 7.0]], [[0.0, 4.0, -6.0], [-7.0, 0.0, -1.0]], [[0.0, -6.0, -1.0], [-7.0, 7.0, 3.0]]], [[[6.0, 0.0, 4.0], [4.0, -6.0, 
+-5.0]], [[5.0, -5.0, 0.0], [4.0, 0.0, 0.0]], [[4.0, -5.0, 5.0], [1.0, -3.0, 0.0]], [[-6.0, 3.0, 3.0], [0.0, 3.0, 7.0]], [[0.0, 
+2.0, 6.0], [0.0, -7.0, 1.0]]], [[[-3.0, -2.0, -3.0], [2.0, 5.0, -4.0]], [[-4.0, -3.0, -1.0], [7.0, 5.0, -2.0]], [[7.0, -6.0, 
+7.0], [1.0, 1.0, 0.0]], [[0.0, 0.0, -1.0], [-1.0, -7.0, 6.0]], [[-1.0, -5.0, -2.0], [1.0, 7.0, -6.0]]], [[[-4.0, 0.0, -3.0], 
+[1.0, -6.0, -6.0]], [[-3.0, 1.0, 7.0], [0.0, 6.0, -3.0]], [[0.0, 4.0, -5.0], [3.0, -3.0, 1.0]], [[3.0, 6.0, 2.0], [-7.0, -2.0, 
+2.0]], [[-1.0, 2.0, -5.0], [-1.0, -1.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-6.0, -3.0, 7.0], [2.0, -7.0, 1.0]], [[0.0, 0.0, -6.0], [-6.0, 4.0, -6.0]], [[-5.0, 
+5.0, 2.0], [-3.0, 3.0, 2.0]], [[0.0, 5.0, 2.0], [3.0, -6.0, 3.0]], [[-1.0, -5.0, 5.0], [0.0, 0.0, -3.0]]], [[[-5.0, 4.0, -6.0], 
+[-7.0, 6.0, 1.0]], [[-5.0, 1.0, -3.0], [-6.0, 7.0, 3.0]], [[-3.0, -3.0, 0.0], [-2.0, -4.0, 3.0]], [[-4.0, 2.0, 1.0], [-1.0, 
+4.0, -6.0]], [[-3.0, -5.0, -6.0], [7.0, 7.0, -2.0]]], [[[-5.0, -2.0, -5.0], [0.0, 1.0, 3.0]], [[-3.0, -7.0, 0.0], [1.0, 5.0, 
+-1.0]], [[-5.0, -4.0, 0.0], [2.0, -6.0, 1.0]], [[-4.0, -6.0, 2.0], [5.0, 7.0, 7.0]], [[4.0, -2.0, 6.0], [6.0, -6.0, 1.0]]], 
+[[[0.0, 3.0, -6.0], [5.0, 6.0, 3.0]], [[-6.0, -6.0, -3.0], [5.0, -4.0, 0.0]], [[3.0, 5.0, 6.0], [7.0, -2.0, 2.0]], [[-3.0, 
+-7.0, -3.0], [-4.0, -1.0, 3.0]], [[-3.0, 0.0, 4.0], [-7.0, 7.0, 2.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      ref=Data(numpy.array([[[[-39.0, 16.0, 7.0, -70.0, -55.0], [67.0, 22.0, 65.0, 1.0, 80.0], [-42.0, -9.0, 49.0, 46.0, 
+-48.0], [25.0, -3.0, -11.0, -14.0, -30.0]], [[9.0, 12.0, 21.0, -36.0, 62.0], [-45.0, 32.0, -2.0, 16.0, -64.0], [53.0, 74.0, 
+26.0, -45.0, 74.0], [-38.0, 30.0, -26.0, -68.0, -13.0]], [[-31.0, -72.0, 2.0, -39.0, 9.0], [75.0, 32.0, 72.0, -53.0, 36.0], 
+[-14.0, -20.0, 98.0, -28.0, 23.0], [-3.0, 42.0, -59.0, 8.0, -49.0]], [[-9.0, -24.0, 36.0, -11.0, 45.0], [5.0, 4.0, 36.0, 7.0, 
+20.0], [-24.0, -32.0, 58.0, -2.0, -5.0], [-39.0, 30.0, -47.0, 32.0, -27.0]], [[31.0, 12.0, 37.0, 38.0, 31.0], [-48.0, -46.0, 
+-39.0, 53.0, -9.0], [-9.0, -27.0, -21.0, -21.0, -15.0], [-52.0, 44.0, -11.0, 62.0, 3.0]]], [[[15.0, -18.0, 27.0, 28.0, -24.0], 
+[31.0, -35.0, 11.0, 13.0, 64.0], [-65.0, -87.0, 12.0, 27.0, -75.0], [-20.0, 11.0, -6.0, 98.0, -7.0]], [[74.0, 39.0, 65.0, 
+-29.0, -19.0], [-3.0, 16.0, 3.0, 46.0, 12.0], [-33.0, -3.0, 15.0, 30.0, -51.0], [-59.0, -14.0, 23.0, 13.0, 0.0]], [[42.0, -2.0, 
+40.0, 38.0, 28.0], [-18.0, -1.0, 3.0, 9.0, 10.0], [-50.0, -67.0, 2.0, 56.0, -59.0], [-38.0, -55.0, 14.0, 58.0, 20.0]], [[51.0, 
+71.0, 44.0, 9.0, 1.0], [-71.0, -42.0, -63.0, 92.0, -23.0], [9.0, 25.0, -55.0, -14.0, -18.0], [-52.0, 37.0, 21.0, 17.0, 14.0]], 
+[[40.0, -6.0, 10.0, 30.0, -40.0], [21.0, -19.0, -13.0, 1.0, 27.0], [-37.0, -49.0, -18.0, 21.0, -54.0], [-7.0, -18.0, 28.0, 
+58.0, 13.0]]], [[[-35.0, -54.0, -2.0, -19.0, 23.0], [34.0, -2.0, 32.0, -21.0, 13.0], [11.0, -2.0, 62.0, -61.0, 44.0], [-10.0, 
+81.0, -63.0, 14.0, -44.0]], [[-8.0, 60.0, -17.0, 79.0, 6.0], [-87.0, -76.0, -83.0, 60.0, -15.0], [1.0, -23.0, -117.0, 27.0, 
+-36.0], [17.0, -20.0, 40.0, 42.0, 50.0]], [[-64.0, -5.0, -12.0, -36.0, -5.0], [35.0, 11.0, 51.0, -13.0, 48.0], [-19.0, -11.0, 
+38.0, 26.0, -11.0], [31.0, 2.0, -29.0, -13.0, -23.0]], [[70.0, 30.0, 73.0, -81.0, -90.0], [80.0, 33.0, 54.0, 33.0, 84.0], 
+[-74.0, -22.0, 63.0, 50.0, -96.0], [-46.0, -4.0, 20.0, 24.0, -29.0]], [[-80.0, -51.0, -20.0, -28.0, 26.0], [42.0, 4.0, 55.0, 
+-33.0, 33.0], [3.0, -9.0, 67.0, -32.0, 37.0], [21.0, 59.0, -70.0, -1.0, -45.0]]], [[[-28.0, -20.0, 0.0, 44.0, 59.0], [-37.0, 
+-33.0, -12.0, 8.0, -9.0], [0.0, -34.0, -5.0, -14.0, 12.0], [-12.0, 25.0, -33.0, 42.0, 0.0]], [[-26.0, 44.0, -15.0, -21.0, 
+-21.0], [-18.0, -13.0, -17.0, 30.0, 0.0], [21.0, 41.0, -32.0, -3.0, 8.0], [23.0, 15.0, 9.0, -36.0, 2.0]], [[47.0, 46.0, 45.0, 
+14.0, -5.0], [-36.0, -25.0, -28.0, 60.0, 9.0], [-29.0, -22.0, -29.0, 29.0, -54.0], [-42.0, -7.0, 23.0, 40.0, 15.0]], [[17.0, 
+10.0, -30.0, -19.0, -102.0], [57.0, -1.0, -10.0, -15.0, 28.0], [-1.0, 18.0, -27.0, -3.0, -22.0], [42.0, -4.0, 44.0, -12.0, 
+4.0]], [[28.0, -40.0, -24.0, -12.0, -38.0], [52.0, 36.0, 10.0, -58.0, -16.0], [18.0, 22.0, 18.0, -26.0, 28.0], [18.0, -14.0, 
+18.0, -28.0, -2.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-85.0, 22.0, -28.0, -4.0, -50.0], [19.0, 5.0, -16.0, -42.0, 14.0], [8.0, -23.0, 
+-37.0, -14.0, -17.0], [54.0, -28.0, -9.0, 1.0, -29.0]], [[65.0, -74.0, 8.0, 51.0, 10.0], [-49.0, -27.0, 38.0, -55.0, -110.0], 
+[-27.0, -40.0, 20.0, -4.0, 62.0], [-63.0, -25.0, 43.0, 11.0, 16.0]], [[-1.0, -24.0, 23.0, 31.0, 1.0], [-22.0, -21.0, -23.0, 
+2.0, -87.0], [-60.0, -49.0, -44.0, -44.0, 30.0], [-31.0, -82.0, 59.0, -57.0, 26.0]], [[-1.0, 44.0, -14.0, -24.0, 5.0], [21.0, 
+6.0, 7.0, 24.0, 44.0], [26.0, 22.0, 25.0, -19.0, -30.0], [0.0, 46.0, -49.0, 24.0, -22.0]], [[1.0, 58.0, -35.0, -69.0, 57.0], 
+[-11.0, -2.0, 4.0, 27.0, 17.0], [-13.0, 53.0, 3.0, -15.0, -12.0], [-59.0, 9.0, -68.0, 40.0, 24.0]]], [[[32.0, -40.0, -4.0, 
+64.0, 14.0], [-85.0, -98.0, -41.0, 22.0, -84.0], [-91.0, -72.0, -24.0, -99.0, 80.0], [-48.0, -56.0, 106.0, -108.0, -45.0]], 
+[[34.0, -54.0, -3.0, 81.0, -30.0], [-47.0, -66.0, -4.0, -17.0, -37.0], [-18.0, -67.0, 22.0, -53.0, 54.0], [7.0, 13.0, 77.0, 
+-56.0, -77.0]], [[-3.0, 16.0, 46.0, 13.0, -40.0], [84.0, 72.0, 43.0, -24.0, -58.0], [42.0, -28.0, 11.0, -13.0, -58.0], [-5.0, 
+-12.0, -50.0, 52.0, 44.0]], [[1.0, -24.0, 63.0, 34.0, -31.0], [51.0, 53.0, 18.0, -23.0, -99.0], [-4.0, -48.0, -25.0, -5.0, 
+-21.0], [-12.0, -69.0, 15.0, 1.0, 68.0]], [[34.0, 56.0, -36.0, -43.0, 56.0], [-19.0, -22.0, 25.0, 21.0, -32.0], [-18.0, 23.0, 
+29.0, -69.0, -1.0], [-99.0, 19.0, -72.0, 46.0, 4.0]]], [[[-74.0, 24.0, -42.0, -38.0, -2.0], [-23.0, -24.0, -59.0, 20.0, 110.0], 
+[-9.0, 36.0, -42.0, 33.0, 2.0], [74.0, 2.0, 18.0, -42.0, -39.0]], [[0.0, 26.0, 14.0, 25.0, -1.0], [1.0, -23.0, -8.0, 15.0, 
+-114.0], [-56.0, -66.0, -27.0, -122.0, 4.0], [-69.0, -71.0, 10.0, -37.0, 9.0]], [[42.0, 24.0, -24.0, 8.0, 20.0], [-23.0, -42.0, 
+17.0, 18.0, -20.0], [-7.0, -12.0, 42.0, -77.0, 12.0], [-56.0, 40.0, -24.0, 8.0, -45.0]], [[35.0, 4.0, 8.0, -26.0, 25.0], [15.0, 
+28.0, 23.0, 16.0, 42.0], [34.0, 48.0, 35.0, 51.0, -18.0], [-6.0, 50.0, -37.0, 42.0, 22.0]], [[-35.0, 42.0, 34.0, -7.0, 6.0], 
+[23.0, 5.0, -48.0, 59.0, -48.0], [-57.0, -30.0, -64.0, -72.0, -22.0], [-21.0, -87.0, 21.0, -69.0, 40.0]]], [[[-22.0, -54.0, 
+38.0, 56.0, -33.0], [-8.0, -1.0, -13.0, -46.0, -134.0], [-58.0, -81.0, -64.0, -29.0, 33.0], [-14.0, -122.0, 78.0, -51.0, 
+45.0]], [[-39.0, 4.0, -30.0, 7.0, -40.0], [9.0, 0.0, 14.0, -52.0, 10.0], [27.0, -16.0, 5.0, -4.0, -6.0], [33.0, 14.0, -20.0, 
+30.0, -39.0]], [[67.0, -88.0, 29.0, 93.0, -26.0], [-32.0, -29.0, 36.0, -55.0, -119.0], [-16.0, -78.0, 27.0, -27.0, 57.0], 
+[-35.0, -19.0, 70.0, -15.0, -12.0]], [[5.0, -36.0, -49.0, 52.0, -13.0], [-80.0, -91.0, -9.0, -41.0, -47.0], [-43.0, -58.0, 3.0, 
+-70.0, 73.0], [-18.0, -9.0, 59.0, -41.0, -83.0]], [[10.0, -8.0, 22.0, 25.0, 13.0], [-27.0, -38.0, -46.0, 54.0, -20.0], [-54.0, 
+-28.0, -30.0, -46.0, 24.0], [-9.0, -40.0, 67.0, -88.0, -6.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -6.0, -4.0, 5.0, 0.0], [2.0, -4.0, 4.0, 6.0, 2.0], [-4.0, 3.0, 2.0, 5.0, -7.0], [-6.0, 3.0, 
+6.0, 1.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[7.0, -1.0, 5.0, -4.0, 1.0], [2.0, 2.0, 0.0, 3.0, 2.0], [-1.0, 0.0, 5.0, -1.0, 5.0], 
+[-3.0, -1.0, 2.0, -3.0, 0.0]]))
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,2.0)
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, -4.0, 0.0, -12.0, -16.0], [-28.0, 28.0, -24.0, 0.0, 20.0], [-20.0, -4.0, -28.0, -8.0, 
-16.0], [-4.0, -28.0, -8.0, 16.0, -28.0]], [[30.0, -5.0, 0.0, -15.0, -20.0], [-35.0, 35.0, -30.0, 0.0, 25.0], [-25.0, -5.0, 
--35.0, -10.0, 20.0], [-5.0, -35.0, -10.0, 20.0, -35.0]], [[12.0, -2.0, 0.0, -6.0, -8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], 
-[-10.0, -2.0, -14.0, -4.0, 8.0], [-2.0, -14.0, -4.0, 8.0, -14.0]], [[-30.0, 5.0, 0.0, 15.0, 20.0], [35.0, -35.0, 30.0, 0.0, 
--25.0], [25.0, 5.0, 35.0, 10.0, -20.0], [5.0, 35.0, 10.0, -20.0, 35.0]], [[-30.0, 5.0, 0.0, 15.0, 20.0], [35.0, -35.0, 30.0, 
-0.0, -25.0], [25.0, 5.0, 35.0, 10.0, -20.0], [5.0, 35.0, 10.0, -20.0, 35.0]]], [[[36.0, -6.0, 0.0, -18.0, -24.0], [-42.0, 42.0, 
--36.0, 0.0, 30.0], [-30.0, -6.0, -42.0, -12.0, 24.0], [-6.0, -42.0, -12.0, 24.0, -42.0]], [[-42.0, 7.0, 0.0, 21.0, 28.0], 
-[49.0, -49.0, 42.0, 0.0, -35.0], [35.0, 7.0, 49.0, 14.0, -28.0], [7.0, 49.0, 14.0, -28.0, 49.0]], [[36.0, -6.0, 0.0, -18.0, 
--24.0], [-42.0, 42.0, -36.0, 0.0, 30.0], [-30.0, -6.0, -42.0, -12.0, 24.0], [-6.0, -42.0, -12.0, 24.0, -42.0]], [[-6.0, 1.0, 
-0.0, 3.0, 4.0], [7.0, -7.0, 6.0, 0.0, -5.0], [5.0, 1.0, 7.0, 2.0, -4.0], [1.0, 7.0, 2.0, -4.0, 7.0]], [[12.0, -2.0, 0.0, -6.0, 
--8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], [-10.0, -2.0, -14.0, -4.0, 8.0], [-2.0, -14.0, -4.0, 8.0, -14.0]]], [[[18.0, -3.0, 0.0, 
--9.0, -12.0], [-21.0, 21.0, -18.0, 0.0, 15.0], [-15.0, -3.0, -21.0, -6.0, 12.0], [-3.0, -21.0, -6.0, 12.0, -21.0]], [[18.0, 
--3.0, 0.0, -9.0, -12.0], [-21.0, 21.0, -18.0, 0.0, 15.0], [-15.0, -3.0, -21.0, -6.0, 12.0], [-3.0, -21.0, -6.0, 12.0, -21.0]], 
-[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 1.0, 0.0, 3.0, 4.0], [7.0, 
--7.0, 6.0, 0.0, -5.0], [5.0, 1.0, 7.0, 2.0, -4.0], [1.0, 7.0, 2.0, -4.0, 7.0]]], [[[-18.0, 3.0, 0.0, 9.0, 12.0], [21.0, -21.0, 
-18.0, 0.0, -15.0], [15.0, 3.0, 21.0, 6.0, -12.0], [3.0, 21.0, 6.0, -12.0, 21.0]], [[-24.0, 4.0, 0.0, 12.0, 16.0], [28.0, -28.0, 
-24.0, 0.0, -20.0], [20.0, 4.0, 28.0, 8.0, -16.0], [4.0, 28.0, 8.0, -16.0, 28.0]], [[30.0, -5.0, 0.0, -15.0, -20.0], [-35.0, 
-35.0, -30.0, 0.0, 25.0], [-25.0, -5.0, -35.0, -10.0, 20.0], [-5.0, -35.0, -10.0, 20.0, -35.0]], [[6.0, -1.0, 0.0, -3.0, -4.0], 
-[-7.0, 7.0, -6.0, 0.0, 5.0], [-5.0, -1.0, -7.0, -2.0, 4.0], [-1.0, -7.0, -2.0, 4.0, -7.0]], [[36.0, -6.0, 0.0, -18.0, -24.0], 
-[-42.0, 42.0, -36.0, 0.0, 30.0], [-30.0, -6.0, -42.0, -12.0, 24.0], [-6.0, -42.0, -12.0, 24.0, 
--42.0]]]])+(1.-msk_ref)*numpy.array([[[[-6.0, 1.0, 0.0, 3.0, 4.0], [7.0, -7.0, 6.0, 0.0, -5.0], [5.0, 1.0, 7.0, 2.0, -4.0], 
-[1.0, 7.0, 2.0, -4.0, 7.0]], [[42.0, -7.0, 0.0, -21.0, -28.0], [-49.0, 49.0, -42.0, 0.0, 35.0], [-35.0, -7.0, -49.0, -14.0, 
-28.0], [-7.0, -49.0, -14.0, 28.0, -49.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0]], [[-24.0, 4.0, 0.0, 12.0, 16.0], [28.0, -28.0, 24.0, 0.0, -20.0], [20.0, 4.0, 28.0, 8.0, -16.0], [4.0, 28.0, 8.0, 
--16.0, 28.0]]], [[[24.0, -4.0, 0.0, -12.0, -16.0], [-28.0, 28.0, -24.0, 0.0, 20.0], [-20.0, -4.0, -28.0, -8.0, 16.0], [-4.0, 
--28.0, -8.0, 16.0, -28.0]], [[12.0, -2.0, 0.0, -6.0, -8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], [-10.0, -2.0, -14.0, -4.0, 8.0], 
-[-2.0, -14.0, -4.0, 8.0, -14.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0]], [[24.0, -4.0, 0.0, -12.0, -16.0], [-28.0, 28.0, -24.0, 0.0, 20.0], [-20.0, -4.0, -28.0, -8.0, 16.0], [-4.0, 
--28.0, -8.0, 16.0, -28.0]], [[12.0, -2.0, 0.0, -6.0, -8.0], [-14.0, 14.0, -12.0, 0.0, 10.0], [-10.0, -2.0, -14.0, -4.0, 8.0], 
-[-2.0, -14.0, -4.0, 8.0, -14.0]]], [[[-42.0, 7.0, 0.0, 21.0, 28.0], [49.0, -49.0, 42.0, 0.0, -35.0], [35.0, 7.0, 49.0, 14.0, 
--28.0], [7.0, 49.0, 14.0, -28.0, 49.0]], [[42.0, -7.0, 0.0, -21.0, -28.0], [-49.0, 49.0, -42.0, 0.0, 35.0], [-35.0, -7.0, 
--49.0, -14.0, 28.0], [-7.0, -49.0, -14.0, 28.0, -49.0]], [[-18.0, 3.0, 0.0, 9.0, 12.0], [21.0, -21.0, 18.0, 0.0, -15.0], [15.0, 
-3.0, 21.0, 6.0, -12.0], [3.0, 21.0, 6.0, -12.0, 21.0]], [[-42.0, 7.0, 0.0, 21.0, 28.0], [49.0, -49.0, 42.0, 0.0, -35.0], [35.0, 
-7.0, 49.0, 14.0, -28.0], [7.0, 49.0, 14.0, -28.0, 49.0]], [[18.0, -3.0, 0.0, -9.0, -12.0], [-21.0, 21.0, -18.0, 0.0, 15.0], 
-[-15.0, -3.0, -21.0, -6.0, 12.0], [-3.0, -21.0, -6.0, 12.0, -21.0]]], [[[-36.0, 6.0, 0.0, 18.0, 24.0], [42.0, -42.0, 36.0, 0.0, 
--30.0], [30.0, 6.0, 42.0, 12.0, -24.0], [6.0, 42.0, 12.0, -24.0, 42.0]], [[-6.0, 1.0, 0.0, 3.0, 4.0], [7.0, -7.0, 6.0, 0.0, 
--5.0], [5.0, 1.0, 7.0, 2.0, -4.0], [1.0, 7.0, 2.0, -4.0, 7.0]], [[6.0, -1.0, 0.0, -3.0, -4.0], [-7.0, 7.0, -6.0, 0.0, 5.0], 
-[-5.0, -1.0, -7.0, -2.0, 4.0], [-1.0, -7.0, -2.0, 4.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[14.0, 12.0, 8.0, -10.0, -0.0], [-4.0, 8.0, -8.0, -12.0, -4.0], [8.0, -6.0, -4.0, -10.0, 14.0], 
+[12.0, -6.0, -12.0, -2.0, 6.0]])+(1.-msk_ref)*numpy.array([[14.0, -2.0, 10.0, -8.0, 2.0], [4.0, 4.0, 0.0, 6.0, 4.0], [-2.0, 
+0.0, 10.0, -2.0, 10.0], [-6.0, -2.0, 4.0, -6.0, 0.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-4.0, 1.0, -7.0], [-5.0, 0.0, -4.0], [-3.0, 2.0, -3.0], [-2.0, 1.0, 2.0], [7.0, 3.0, 4.0]], 
+[[2.0, 6.0, -5.0], [6.0, 0.0, 0.0], [-3.0, -3.0, 5.0], [-1.0, 0.0, 4.0], [0.0, 3.0, 7.0]], [[-2.0, -2.0, -7.0], [-4.0, -5.0, 
+6.0], [1.0, -3.0, 5.0], [2.0, 6.0, 0.0], [-3.0, 4.0, -6.0]], [[0.0, -4.0, -1.0], [5.0, -4.0, 7.0], [-6.0, 1.0, 0.0], [-6.0, 
+-1.0, -2.0], [4.0, 1.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, 1.0, -5.0], [1.0, -4.0, 7.0], [-5.0, 1.0, -5.0], [1.0, 1.0, -6.0], [3.0, 2.0, 
+-6.0]], [[3.0, 3.0, -7.0], [1.0, -3.0, -7.0], [-7.0, -3.0, 0.0], [3.0, -3.0, 1.0], [0.0, 3.0, 3.0]], [[-5.0, -1.0, 6.0], [-6.0, 
+-1.0, -6.0], [6.0, -1.0, 1.0], [0.0, 7.0, 7.0], [5.0, -7.0, -4.0]], [[-1.0, 6.0, -4.0], [-2.0, 1.0, -4.0], [-6.0, 1.0, -7.0], 
+[0.0, -5.0, 7.0], [0.0, 1.0, -4.0]]]))
+      arg1=Data(numpy.array([1.0, -2.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, 3.0, 6.0]))
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[43.0, 23.0, 14.0, -18.0, -27.0], [25.0, 6.0, -32.0, -29.0, -55.0], [51.0, -36.0, -28.0, -10.0, 
+31.0], [15.0, -36.0, -8.0, 10.0, -5.0]])+(1.-msk_ref)*numpy.array([[-30.0, 31.0, -32.0, -32.0, -27.0], [-30.0, -50.0, -16.0, 
+0.0, 27.0], [28.0, -45.0, 9.0, 63.0, -40.0], [-7.0, -23.0, -45.0, 27.0, -21.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-2.0, -5.0, 2.0], [4.0, -4.0, 2.0]], [[-2.0, 4.0, 7.0], [0.0, 6.0, -4.0]], [[-1.0, -2.0, 4.0], 
+[4.0, -4.0, -5.0]], [[0.0, -7.0, -4.0], [5.0, 4.0, 4.0]], [[0.0, -4.0, 0.0], [6.0, 2.0, 6.0]]], [[[1.0, -3.0, -1.0], [-5.0, 
+6.0, -6.0]], [[4.0, -4.0, -7.0], [-2.0, -3.0, -6.0]], [[0.0, 3.0, 5.0], [0.0, 6.0, 3.0]], [[-5.0, -6.0, 2.0], [-2.0, 4.0, 
+-5.0]], [[-1.0, 5.0, -6.0], [-6.0, -5.0, -7.0]]], [[[-5.0, 0.0, -4.0], [7.0, -3.0, -3.0]], [[-7.0, 1.0, 4.0], [0.0, 6.0, 
+-2.0]], [[3.0, -1.0, 7.0], [4.0, 3.0, -4.0]], [[2.0, 2.0, 5.0], [1.0, 6.0, -6.0]], [[0.0, -7.0, 5.0], [0.0, -3.0, 5.0]]], 
+[[[4.0, -5.0, -4.0], [7.0, 6.0, -2.0]], [[-7.0, 4.0, -6.0], [7.0, 4.0, 2.0]], [[1.0, -1.0, -7.0], [-1.0, 6.0, -6.0]], [[3.0, 
+-3.0, 4.0], [5.0, 2.0, 2.0]], [[3.0, -4.0, 7.0], [-6.0, 6.0, -5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[3.0, 4.0, 7.0], [-5.0, 3.0, 0.0]], [[0.0, 3.0, 7.0], [5.0, -4.0, -3.0]], [[-3.0, 
+3.0, 0.0], [0.0, 1.0, -3.0]], [[7.0, -3.0, -3.0], [2.0, -3.0, -2.0]], [[-1.0, 0.0, 7.0], [6.0, -7.0, 0.0]]], [[[-5.0, 3.0, 
+-6.0], [3.0, 1.0, -4.0]], [[3.0, 2.0, 6.0], [5.0, 6.0, 0.0]], [[-7.0, -4.0, 2.0], [3.0, 0.0, 0.0]], [[-5.0, 0.0, 5.0], [-2.0, 
+4.0, 4.0]], [[-2.0, 2.0, -5.0], [5.0, -7.0, -2.0]]], [[[5.0, 4.0, -1.0], [-7.0, 0.0, -1.0]], [[-3.0, 0.0, 4.0], [-1.0, 7.0, 
+-7.0]], [[-1.0, 5.0, 2.0], [6.0, -1.0, -2.0]], [[1.0, -3.0, -6.0], [2.0, 5.0, -5.0]], [[-6.0, 5.0, -2.0], [4.0, -1.0, 0.0]]], 
+[[[1.0, 0.0, 1.0], [2.0, 0.0, 1.0]], [[3.0, -6.0, 1.0], [1.0, -5.0, 6.0]], [[-7.0, 4.0, 2.0], [3.0, 2.0, -1.0]], [[0.0, 7.0, 
+-3.0], [1.0, -7.0, -3.0]], [[-7.0, 0.0, -7.0], [2.0, 7.0, 2.0]]]]))
+      arg1=Data(numpy.array([[2.0, 0.0, 6.0], [-5.0, -5.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, 3.0, 0.0], [5.0, 0.0, 0.0]]))
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[4.0, 16.0, 32.0, -77.0, -52.0], [3.0, 3.0, -6.0, 2.0, 31.0], [-48.0, -16.0, 21.0, 11.0, 35.0], 
+[-77.0, -109.0, -53.0, -9.0, 58.0]])+(1.-msk_ref)*numpy.array([[-28.0, 34.0, 24.0, -34.0, 35.0], [49.0, 16.0, 38.0, 15.0, 
+41.0], [-48.0, 10.0, 50.0, -4.0, 65.0], [5.0, -28.0, 62.0, 26.0, 45.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 3.0, 2.0], [1.0, 0.0, 0.0], [-1.0, 3.0, -2.0], [1.0, -1.0, -6.0], [-3.0, -2.0, -1.0]], 
-[[0.0, -7.0, 3.0], [5.0, 3.0, 4.0], [2.0, -1.0, -2.0], [-4.0, -5.0, 0.0], [0.0, 2.0, -3.0]], [[-7.0, 6.0, -2.0], [-5.0, 3.0, 
--2.0], [-2.0, 5.0, -4.0], [1.0, -3.0, 4.0], [1.0, 3.0, 0.0]], [[-3.0, 7.0, 5.0], [-1.0, 4.0, 4.0], [5.0, -7.0, 0.0], [5.0, 4.0, 
-0.0], [-4.0, 0.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 6.0, 7.0], [-4.0, 4.0, 1.0], [5.0, -6.0, 0.0], [-5.0, 0.0, 3.0], 
-[-3.0, -2.0, 4.0]], [[0.0, -2.0, 6.0], [7.0, 3.0, -5.0], [5.0, 0.0, 6.0], [-1.0, -3.0, -1.0], [-7.0, 1.0, 4.0]], [[-6.0, -5.0, 
-5.0], [-1.0, -5.0, -3.0], [3.0, 4.0, 2.0], [-1.0, 3.0, -4.0], [0.0, -6.0, -4.0]], [[2.0, 1.0, 7.0], [0.0, 5.0, -4.0], [-7.0, 
-3.0, -6.0], [-4.0, 3.0, -3.0], [-4.0, -5.0, 0.0]]])
-      arg1=numpy.array([[[1.0, -7.0, -7.0], [6.0, 6.0, 1.0], [-6.0, -4.0, -4.0], [6.0, -3.0, -3.0], [7.0, 4.0, 0.0]], [[0.0, 
--4.0, 7.0], [4.0, -5.0, -2.0], [6.0, 2.0, -7.0], [-6.0, -5.0, -2.0], [-5.0, 0.0, -7.0]], [[0.0, -1.0, 7.0], [4.0, 3.0, 6.0], 
-[-6.0, 1.0, 0.0], [6.0, 0.0, -1.0], [2.0, -4.0, 2.0]], [[4.0, 2.0, 4.0], [-1.0, 2.0, 6.0], [1.0, 7.0, 2.0], [-2.0, 1.0, -6.0], 
-[7.0, -6.0, -5.0]]])
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[0.0, 6.0, -1.0, -5.0, 4.0], [-2.0, -5.0, 3.0, 4.0, 4.0], [-3.0, -7.0, -4.0, -2.0, 5.0], [3.0, 
+7.0, 2.0, 4.0, 7.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 5.0, 6.0, 0.0, 2.0], [2.0, -3.0, -4.0, 6.0, -6.0], [-4.0, 0.0, -4.0, 7.0, 0.0], 
+[-2.0, 5.0, 3.0, -5.0, 3.0]]))
+      arg1=Data(numpy.array([-1.0, 7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([0.0, 3.0]))
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[0.0, 0.0], [-6.0, 42.0], [1.0, -7.0], [5.0, -35.0], [-4.0, 28.0]], [[2.0, -14.0], [5.0, 
+-35.0], [-3.0, 21.0], [-4.0, 28.0], [-4.0, 28.0]], [[3.0, -21.0], [7.0, -49.0], [4.0, -28.0], [2.0, -14.0], [-5.0, 35.0]], 
+[[-3.0, 21.0], [-7.0, 49.0], [-2.0, 14.0], [-4.0, 28.0], [-7.0, 49.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -3.0], [0.0, 15.0], 
+[0.0, 18.0], [0.0, 0.0], [0.0, 6.0]], [[0.0, 6.0], [0.0, -9.0], [0.0, -12.0], [0.0, 18.0], [0.0, -18.0]], [[0.0, -12.0], [0.0, 
+0.0], [0.0, -12.0], [0.0, 21.0], [0.0, 0.0]], [[0.0, -6.0], [0.0, 15.0], [0.0, 9.0], [0.0, -15.0], [0.0, 9.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[-3.0, 4.0, -5.0], [-7.0, -6.0, -7.0], [-6.0, -3.0, 0.0], [1.0, 3.0, -2.0], [-1.0, -7.0, 3.0]], 
+[[-5.0, -5.0, 0.0], [-4.0, 1.0, -7.0], [0.0, 1.0, 6.0], [2.0, -3.0, 1.0], [0.0, 7.0, 6.0]], [[-3.0, -2.0, 7.0], [-7.0, 1.0, 
+-5.0], [1.0, 0.0, -4.0], [3.0, 1.0, 2.0], [0.0, -3.0, -3.0]], [[-2.0, -6.0, -4.0], [3.0, 7.0, -1.0], [-3.0, -5.0, 4.0], [1.0, 
+0.0, 7.0], [6.0, -4.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, 4.0, 4.0], [5.0, -3.0, 7.0], [0.0, -7.0, -2.0], [6.0, 5.0, 2.0], [3.0, 4.0, 
+-1.0]], [[7.0, 6.0, 4.0], [-2.0, -1.0, 7.0], [-4.0, -6.0, 5.0], [4.0, -2.0, 2.0], [0.0, -3.0, 0.0]], [[-6.0, 6.0, -7.0], [-2.0, 
+-4.0, 5.0], [-7.0, -6.0, 0.0], [0.0, 0.0, -3.0], [4.0, 0.0, 3.0]], [[-7.0, 0.0, -1.0], [-4.0, 1.0, 0.0], [2.0, 0.0, -2.0], 
+[-6.0, -1.0, -1.0], [-4.0, 1.0, 0.0]]]))
+      arg1=Data(numpy.array([[-7.0, -4.0, 3.0], [0.0, -4.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, -3.0, 2.0], [0.0, -3.0, 0.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-35.0, 20.0, -20.0, -15.0, 12.0], [2.0, -19.0, -8.0, -19.0, -14.0], [11.0, 21.0, 3.0, -2.0, 
--8.0], [14.0, 18.0, 25.0, -9.0, -28.0]], [[1.0, 6.0, -6.0, 6.0, 7.0], [0.0, 4.0, 6.0, -6.0, -5.0], [0.0, 4.0, -6.0, 6.0, 2.0], 
-[4.0, -1.0, 1.0, -2.0, 7.0]], [[-8.0, 10.0, 2.0, -9.0, 5.0], [-26.0, -15.0, 14.0, -5.0, 19.0], [-17.0, -7.0, 9.0, -4.0, -18.0], 
-[-6.0, -5.0, 16.0, 17.0, -15.0]], [[50.0, -6.0, 22.0, 27.0, 3.0], [-38.0, 21.0, 46.0, 11.0, 37.0], [-41.0, -35.0, -7.0, 12.0, 
--6.0], [-22.0, -39.0, -18.0, 33.0, 43.0]], [[18.0, -31.0, 30.0, -9.0, -29.0], [1.0, 0.0, -15.0, 30.0, 22.0], [-5.0, -24.0, 
-16.0, -17.0, 0.0], [-20.0, -7.0, -19.0, 10.0, -4.0]]], [[[28.0, -39.0, 16.0, 12.0, -28.0], [49.0, 29.0, -35.0, 29.0, -21.0], 
-[28.0, -3.0, -7.0, -3.0, 34.0], [-2.0, 4.0, -43.0, -25.0, 27.0]], [[-44.0, 52.0, -58.0, 9.0, 47.0], [16.0, -3.0, 8.0, -53.0, 
--53.0], [25.0, 53.0, -27.0, 26.0, 6.0], [42.0, 25.0, 34.0, -31.0, -3.0]], [[23.0, 4.0, 0.0, 21.0, 10.0], [-10.0, 17.0, 24.0, 
--3.0, 4.0], [-13.0, -7.0, -13.0, 14.0, 4.0], [-2.0, -16.0, -9.0, 7.0, 30.0]], [[31.0, -54.0, 44.0, -9.0, -48.0], [20.0, 9.0, 
--34.0, 49.0, 20.0], [5.0, -31.0, 19.0, -24.0, 12.0], [-26.0, -6.0, -39.0, 3.0, 2.0]], [[7.0, 9.0, 4.0, 3.0, 8.0], [-29.0, -4.0, 
-25.0, -4.0, 21.0], [-23.0, -12.0, 2.0, 3.0, -14.0], [-8.0, -14.0, 8.0, 20.0, 3.0]]], [[[-35.0, -8.0, 26.0, -54.0, -25.0], 
-[-38.0, -54.0, -16.0, 16.0, 49.0], [-20.0, -22.0, 48.0, -40.0, -42.0], [-24.0, 7.0, 31.0, 32.0, -75.0]], [[-12.0, -14.0, 26.0, 
--33.0, -23.0], [-26.0, -31.0, -10.0, 19.0, 39.0], [-17.0, -23.0, 33.0, -28.0, -26.0], [-22.0, -1.0, 12.0, 25.0, -43.0]], 
-[[-9.0, 14.0, 8.0, -15.0, 6.0], [-48.0, -25.0, 26.0, -5.0, 38.0], [-33.0, -17.0, 17.0, -8.0, -32.0], [-14.0, -12.0, 25.0, 33.0, 
--24.0]], [[-6.0, -8.0, -10.0, 3.0, -5.0], [40.0, 11.0, -28.0, 1.0, -33.0], [31.0, 19.0, -9.0, 2.0, 22.0], [14.0, 17.0, -12.0, 
--29.0, 5.0]], [[-20.0, 24.0, -18.0, -3.0, 19.0], [-12.0, -11.0, 12.0, -21.0, -5.0], [-3.0, 13.0, -3.0, 6.0, -10.0], [10.0, 5.0, 
-22.0, 1.0, -11.0]]], [[[-87.0, 29.0, -30.0, -54.0, 7.0], [7.0, -57.0, -39.0, -27.0, -20.0], [28.0, 39.0, 25.0, -23.0, -24.0], 
-[22.0, 47.0, 56.0, -17.0, -88.0]], [[-57.0, 22.0, -26.0, -30.0, 9.0], [12.0, -32.0, -26.0, -22.0, -23.0], [24.0, 32.0, 10.0, 
--10.0, -10.0], [20.0, 33.0, 35.0, -18.0, -51.0]], [[54.0, -12.0, -2.0, 51.0, 7.0], [28.0, 55.0, 16.0, 5.0, -25.0], [7.0, -1.0, 
--37.0, 30.0, 38.0], [6.0, -19.0, -44.0, -17.0, 77.0]], [[-23.0, 54.0, -46.0, 18.0, 51.0], [-16.0, 0.0, 38.0, -50.0, -25.0], 
-[-4.0, 32.0, -26.0, 30.0, -6.0], [28.0, 3.0, 33.0, -6.0, 11.0]], [[-39.0, -19.0, 4.0, -39.0, -28.0], [35.0, -26.0, -59.0, 14.0, 
--15.0], [35.0, 14.0, 24.0, -29.0, 2.0], [4.0, 34.0, 6.0, -22.0, -53.0]]]])+(1.-msk_ref)*numpy.array([[[[-94.0, 25.0, -34.0, 
--57.0, 3.0], [25.0, -56.0, -55.0, -26.0, -34.0], [43.0, 48.0, 24.0, -25.0, -16.0], [28.0, 57.0, 53.0, -30.0, -92.0]], [[-39.0, 
-1.0, 4.0, -39.0, -12.0], [-9.0, -38.0, -23.0, 2.0, 13.0], [3.0, 2.0, 28.0, -25.0, -22.0], [-4.0, 18.0, 26.0, 6.0, -57.0]], 
-[[47.0, -6.0, -6.0, 48.0, 11.0], [24.0, 50.0, 18.0, 0.0, -25.0], [6.0, 2.0, -36.0, 30.0, 34.0], [8.0, -17.0, -37.0, -16.0, 
-71.0]], [[-26.0, -27.0, 18.0, -39.0, -35.0], [21.0, -26.0, -51.0, 24.0, 4.0], [21.0, -2.0, 30.0, -33.0, -4.0], [-8.0, 23.0, 
-1.0, -8.0, -50.0]], [[-17.0, -26.0, 10.0, -24.0, -29.0], [36.0, -10.0, -50.0, 20.0, -13.0], [30.0, 6.0, 16.0, -22.0, 10.0], 
-[0.0, 23.0, -9.0, -20.0, -29.0]]], [[[-28.0, -6.0, -16.0, -12.0, -8.0], [50.0, -2.0, -46.0, -2.0, -42.0], [44.0, 30.0, -2.0, 
--6.0, 20.0], [20.0, 32.0, -2.0, -38.0, -18.0]], [[21.0, 55.0, -34.0, 48.0, 61.0], [-47.0, 23.0, 83.0, -47.0, 0.0], [-38.0, 7.0, 
--39.0, 47.0, -8.0], [14.0, -31.0, 18.0, 19.0, 56.0]], [[-37.0, 36.0, -54.0, 12.0, 35.0], [42.0, 8.0, -12.0, -42.0, -67.0], 
-[42.0, 56.0, -30.0, 24.0, 22.0], [44.0, 31.0, 17.0, -46.0, 5.0]], [[27.0, -25.0, 22.0, 6.0, -19.0], [5.0, 13.0, -5.0, 23.0, 
-12.0], [-4.0, -19.0, 3.0, -5.0, 8.0], [-14.0, -11.0, -24.0, 5.0, 16.0]], [[-42.0, -32.0, 22.0, -57.0, -45.0], [24.0, -41.0, 
--68.0, 29.0, 7.0], [27.0, -1.0, 43.0, -46.0, -10.0], [-10.0, 33.0, 8.0, -9.0, -75.0]]], [[[-6.0, -61.0, 36.0, -36.0, -62.0], 
-[55.0, -9.0, -81.0, 51.0, -5.0], [40.0, -9.0, 31.0, -41.0, 18.0], [-14.0, 26.0, -31.0, -23.0, -37.0]], [[55.0, -39.0, 38.0, 
-18.0, -27.0], [-1.0, 27.0, 5.0, 37.0, 26.0], [-16.0, -37.0, 1.0, -3.0, 12.0], [-26.0, -27.0, -42.0, 15.0, 38.0]], [[-39.0, 
-44.0, -42.0, 0.0, 37.0], [-2.0, -12.0, 12.0, -42.0, -29.0], [10.0, 36.0, -14.0, 16.0, -6.0], [28.0, 17.0, 35.0, -14.0, -13.0]], 
-[[6.0, 8.0, 10.0, -3.0, 5.0], [-40.0, -11.0, 28.0, -1.0, 33.0], [-31.0, -19.0, 9.0, -2.0, -22.0], [-14.0, -17.0, 12.0, 29.0, 
--5.0]], [[70.0, -40.0, 40.0, 30.0, -24.0], [-4.0, 38.0, 16.0, 38.0, 28.0], [-22.0, -42.0, -6.0, 4.0, 16.0], [-28.0, -36.0, 
--50.0, 18.0, 56.0]]], [[[-54.0, 25.0, -44.0, -12.0, 18.0], [45.0, -11.0, -35.0, -31.0, -59.0], [48.0, 53.0, -11.0, 5.0, 14.0], 
-[38.0, 42.0, 23.0, -45.0, -27.0]], [[-7.0, 26.0, -4.0, -3.0, 20.0], [-48.0, -17.0, 38.0, -17.0, 28.0], [-33.0, -9.0, 5.0, 4.0, 
--28.0], [-6.0, -14.0, 27.0, 29.0, -10.0]], [[14.0, -30.0, 54.0, -33.0, -37.0], [-54.0, -31.0, 6.0, 39.0, 77.0], [-45.0, -55.0, 
-45.0, -36.0, -38.0], [-46.0, -23.0, 2.0, 53.0, -37.0]], [[-4.0, -9.0, 24.0, -24.0, -16.0], [-33.0, -25.0, 3.0, 15.0, 41.0], 
-[-24.0, -25.0, 27.0, -21.0, -26.0], [-22.0, -8.0, 11.0, 29.0, -31.0]], [[31.0, -54.0, 44.0, -9.0, -48.0], [20.0, 9.0, -34.0, 
-49.0, 20.0], [5.0, -31.0, 19.0, -24.0, 12.0], [-26.0, -6.0, -39.0, 3.0, 2.0]]]])
+      ref=msk_ref*numpy.array([[[-10.0, -26.0], [52.0, 10.0], [54.0, 12.0], [-25.0, -16.0], [44.0, 34.0]], [[55.0, 20.0], [3.0, 
+-18.0], [14.0, 8.0], [1.0, 14.0], [-10.0, -16.0]], [[50.0, 22.0], [30.0, -14.0], [-19.0, -8.0], [-19.0, 0.0], [3.0, 6.0]], 
+[[26.0, 16.0], [-52.0, -30.0], [53.0, 28.0], [14.0, 14.0], [-5.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[-9.0, -12.0], [28.0, 
+9.0], [17.0, 21.0], [-5.0, -15.0], [-11.0, -12.0]], [[-3.0, -18.0], [15.0, 3.0], [24.0, 18.0], [14.0, 6.0], [9.0, 9.0]], 
+[[-38.0, -18.0], [20.0, 12.0], [11.0, 18.0], [-6.0, 0.0], [10.0, 0.0]], [[-9.0, 0.0], [-7.0, -3.0], [-2.0, 0.0], [-5.0, 3.0], 
+[-7.0, -3.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, 4.0, 0.0], [-4.0, -5.0, 7.0]], [[-3.0, 3.0, -6.0], [1.0, 5.0, -4.0]], [[2.0, -5.0, 
--6.0], [6.0, 4.0, -5.0]], [[7.0, -5.0, -5.0], [-5.0, -5.0, -6.0]], [[-2.0, -4.0, 7.0], [7.0, 3.0, -5.0]]], [[[-6.0, 2.0, 3.0], 
-[3.0, 7.0, 1.0]], [[-7.0, -2.0, 5.0], [5.0, -1.0, 7.0]], [[2.0, 6.0, 1.0], [1.0, -1.0, 6.0]], [[-4.0, -1.0, 6.0], [0.0, 1.0, 
--3.0]], [[-4.0, -6.0, -4.0], [-1.0, 0.0, -6.0]]], [[[-2.0, 7.0, -5.0], [3.0, 4.0, -2.0]], [[2.0, -7.0, -6.0], [-1.0, -7.0, 
-0.0]], [[-3.0, -7.0, -7.0], [-2.0, -1.0, -2.0]], [[0.0, 3.0, -7.0], [3.0, 2.0, 1.0]], [[3.0, 0.0, -1.0], [-3.0, 5.0, -5.0]]], 
-[[[0.0, -5.0, 0.0], [2.0, 6.0, -3.0]], [[7.0, 1.0, -4.0], [-4.0, 7.0, -3.0]], [[-3.0, 7.0, -4.0], [7.0, -3.0, 0.0]], [[-3.0, 
--6.0, -4.0], [2.0, 7.0, -7.0]], [[1.0, 1.0, 1.0], [-5.0, -1.0, 5.0]]]])+(1.-msk_arg0)*numpy.array([[[[3.0, 5.0, 0.0], [6.0, 
-0.0, 2.0]], [[2.0, 5.0, 4.0], [-1.0, 3.0, 6.0]], [[-1.0, -7.0, 3.0], [7.0, 3.0, 6.0]], [[6.0, -2.0, 0.0], [7.0, 2.0, 6.0]], 
-[[-7.0, -3.0, -2.0], [-7.0, -4.0, -5.0]]], [[[-5.0, -6.0, 1.0], [-6.0, -5.0, 6.0]], [[-6.0, 2.0, -6.0], [0.0, 1.0, -1.0]], 
-[[-3.0, -6.0, 1.0], [-1.0, 5.0, -2.0]], [[4.0, 1.0, 0.0], [-1.0, -2.0, 0.0]], [[5.0, -4.0, 1.0], [6.0, 3.0, -3.0]]], [[[7.0, 
--5.0, 5.0], [0.0, 2.0, -7.0]], [[2.0, -5.0, -5.0], [1.0, -2.0, -1.0]], [[3.0, 0.0, 7.0], [0.0, -1.0, 0.0]], [[6.0, -2.0, -3.0], 
-[-3.0, 6.0, -2.0]], [[0.0, 1.0, -1.0], [3.0, 3.0, 2.0]]], [[[-5.0, -1.0, 3.0], [-7.0, 7.0, -1.0]], [[-2.0, 5.0, -7.0], [7.0, 
--7.0, -1.0]], [[-2.0, 3.0, -6.0], [-2.0, -1.0, 1.0]], [[-5.0, 7.0, -5.0], [-2.0, 5.0, 4.0]], [[0.0, -6.0, -2.0], [7.0, 5.0, 
--6.0]]]])
-      arg1=numpy.array([[[[2.0, -2.0, 3.0], [-1.0, 2.0, 7.0]], [[7.0, 6.0, 5.0], [1.0, -6.0, 0.0]], [[-1.0, 2.0, -2.0], [-1.0, 
-5.0, -5.0]], [[-4.0, 4.0, -7.0], [1.0, -1.0, -2.0]], [[0.0, -1.0, -3.0], [-3.0, 2.0, -6.0]]], [[[-4.0, -3.0, -3.0], [-3.0, 
--1.0, 0.0]], [[-7.0, -7.0, 0.0], [5.0, 2.0, 4.0]], [[-2.0, 1.0, -2.0], [-4.0, 0.0, -6.0]], [[-3.0, -1.0, 3.0], [7.0, 7.0, 
-7.0]], [[-6.0, 0.0, -5.0], [-7.0, 0.0, -4.0]]], [[[6.0, 2.0, -4.0], [-1.0, -3.0, 4.0]], [[0.0, 0.0, 0.0], [-6.0, -2.0, -1.0]], 
-[[-1.0, 5.0, 1.0], [-4.0, -2.0, 1.0]], [[5.0, -7.0, 3.0], [1.0, -5.0, -7.0]], [[6.0, 2.0, -6.0], [1.0, 3.0, -7.0]]], [[[7.0, 
-1.0, 1.0], [7.0, 0.0, 2.0]], [[-7.0, -3.0, -5.0], [6.0, -5.0, -2.0]], [[0.0, 0.0, -1.0], [-1.0, 4.0, -3.0]], [[2.0, 7.0, 0.0], 
-[-1.0, 0.0, 0.0]], [[-7.0, 2.0, 1.0], [0.0, -7.0, -3.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-1.0, 2.0, 5.0], [-3.0, 3.0, -3.0]], [[-4.0, -5.0, -6.0], [5.0, 3.0, 3.0]], [[1.0, 5.0, 3.0], 
+[0.0, -7.0, 0.0]], [[2.0, -6.0, -3.0], [-5.0, 0.0, 7.0]], [[5.0, -3.0, 7.0], [2.0, 5.0, 0.0]]], [[[-7.0, -5.0, -5.0], [-1.0, 
+4.0, 0.0]], [[1.0, -1.0, -2.0], [-1.0, -4.0, 1.0]], [[-4.0, 0.0, -3.0], [-6.0, 5.0, 5.0]], [[-4.0, -7.0, -4.0], [2.0, -4.0, 
+3.0]], [[4.0, -4.0, 0.0], [-1.0, 7.0, 5.0]]], [[[3.0, -1.0, 3.0], [-6.0, -3.0, 0.0]], [[0.0, 6.0, -5.0], [-3.0, 0.0, 5.0]], 
+[[7.0, 7.0, -4.0], [-3.0, 1.0, 5.0]], [[-6.0, -2.0, -1.0], [-2.0, 0.0, 3.0]], [[0.0, 1.0, -2.0], [5.0, -6.0, 2.0]]], [[[-3.0, 
+4.0, -1.0], [-1.0, -3.0, -4.0]], [[0.0, 0.0, -5.0], [4.0, 0.0, 0.0]], [[-3.0, -5.0, 5.0], [6.0, 1.0, 0.0]], [[4.0, -2.0, -2.0], 
+[0.0, 1.0, 7.0]], [[-4.0, -6.0, -7.0], [1.0, -2.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, -4.0, -3.0], [2.0, 0.0, 5.0]], [[2.0, -5.0, 0.0], [0.0, 1.0, 4.0]], [[6.0, 
+0.0, -5.0], [4.0, -3.0, -5.0]], [[7.0, -2.0, -2.0], [-2.0, -1.0, 5.0]], [[3.0, 5.0, 2.0], [-7.0, 7.0, 0.0]]], [[[0.0, -7.0, 
+6.0], [2.0, 7.0, -3.0]], [[-5.0, 7.0, -7.0], [4.0, 1.0, 7.0]], [[0.0, -4.0, 1.0], [0.0, -5.0, -6.0]], [[-1.0, -3.0, 5.0], [3.0, 
+6.0, 2.0]], [[1.0, -3.0, 2.0], [-6.0, 6.0, 0.0]]], [[[5.0, -1.0, -5.0], [3.0, -7.0, 5.0]], [[0.0, -4.0, 1.0], [0.0, 4.0, 4.0]], 
+[[0.0, -4.0, -6.0], [7.0, -5.0, 0.0]], [[4.0, 3.0, 6.0], [5.0, -2.0, 6.0]], [[-5.0, -1.0, -5.0], [-1.0, 4.0, 4.0]]], [[[5.0, 
+2.0, 5.0], [-5.0, 2.0, 3.0]], [[0.0, 0.0, 3.0], [-7.0, 6.0, -4.0]], [[0.0, 6.0, 3.0], [-4.0, 2.0, -7.0]], [[6.0, 0.0, -5.0], 
+[0.0, -2.0, -4.0]], [[2.0, -3.0, 3.0], [-2.0, -3.0, -2.0]]]]))
+      arg1=Data(numpy.array([[[-7.0, 3.0, 1.0], [-1.0, 1.0, -5.0]], [[-1.0, 5.0, 0.0], [5.0, 7.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[2.0, 0.0, -7.0], [1.0, 2.0, 4.0]], [[-7.0, -7.0, -6.0], [-6.0, -1.0, 4.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[21.0, 1.0, -41.0, 31.0, -44.0], [33.0, 19.0, -8.0, 3.0, 42.0], [13.0, 27.0, 60.0, -91.0, 
--102.0], [-59.0, 24.0, -37.0, 18.0, 71.0]], [[-49.0, -62.0, 65.0, 70.0, 46.0], [13.0, -1.0, 41.0, 2.0, 57.0], [-20.0, -12.0, 
--6.0, -50.0, 68.0], [-25.0, 31.0, 37.0, 14.0, -2.0]], [[-37.0, -64.0, 39.0, 26.0, 43.0], [3.0, 39.0, 9.0, 16.0, -4.0], [-12.0, 
--39.0, -70.0, 48.0, 91.0], [35.0, 57.0, 31.0, -37.0, -43.0]], [[-38.0, 19.0, 3.0, -1.0, 61.0], [22.0, -73.0, 47.0, -143.0, 
-42.0], [48.0, 46.0, -13.0, 117.0, 84.0], [-8.0, -2.0, 8.0, -16.0, -11.0]], [[-11.0, -14.0, 13.0, -43.0, -2.0], [-25.0, 63.0, 
--12.0, 66.0, -52.0], [-84.0, -43.0, -50.0, 66.0, -11.0], [28.0, 28.0, 13.0, -39.0, 7.0]]], [[[11.0, -54.0, 31.0, 5.0, -12.0], 
-[-7.0, 61.0, -10.0, 102.0, -4.0], [-64.0, -33.0, -6.0, -74.0, -33.0], [-14.0, 2.0, 19.0, -1.0, -3.0]], [[47.0, -25.0, -52.0, 
--23.0, -72.0], [5.0, 114.0, -60.0, 115.0, -46.0], [-40.0, -35.0, -9.0, -45.0, -123.0], [3.0, 51.0, -35.0, -33.0, 36.0]], 
-[[34.0, 62.0, -28.0, -1.0, -50.0], [-31.0, -29.0, -40.0, 33.0, -48.0], [46.0, -10.0, 33.0, -65.0, -26.0], [40.0, -38.0, -24.0, 
-45.0, -12.0]], [[-7.0, -10.0, 10.0, -25.0, 3.0], [0.0, 25.0, 13.0, 17.0, 6.0], [-65.0, 1.0, 0.0, 21.0, -38.0], [-29.0, 2.0, 
-7.0, -15.0, 34.0]], [[-49.0, -85.0, 31.0, 31.0, 57.0], [49.0, 41.0, 50.0, -43.0, 75.0], [-43.0, 12.0, -32.0, 51.0, 29.0], 
-[-57.0, 72.0, 23.0, -49.0, 30.0]]], [[[-42.0, -18.0, 53.0, 74.0, 19.0], [-11.0, -20.0, 21.0, 19.0, 24.0], [-1.0, -24.0, 10.0, 
--77.0, 61.0], [5.0, 20.0, 24.0, 42.0, 1.0]], [[-13.0, -17.0, -38.0, 12.0, 14.0], [41.0, 16.0, 5.0, -73.0, 25.0], [44.0, 20.0, 
--25.0, 75.0, 12.0], [-6.0, 66.0, -21.0, -44.0, 15.0]], [[-27.0, -94.0, 10.0, 36.0, 44.0], [61.0, 50.0, 33.0, -40.0, 75.0], 
-[-7.0, 16.0, -31.0, 30.0, 19.0], [-53.0, 74.0, 11.0, -53.0, 13.0]], [[-19.0, -26.0, 22.0, 60.0, 7.0], [1.0, 2.0, -1.0, 18.0, 
-10.0], [29.0, -23.0, -7.0, -56.0, 50.0], [19.0, 32.0, 9.0, 18.0, -18.0]], [[-19.0, -17.0, 52.0, -3.0, 52.0], [-5.0, -46.0, 
-38.0, -33.0, 28.0], [-10.0, 13.0, -7.0, 19.0, 71.0], [-11.0, -49.0, 39.0, 9.0, -42.0]]], [[[-1.0, -64.0, 33.0, -18.0, 29.0], 
-[3.0, 45.0, 5.0, 40.0, -2.0], [-42.0, -21.0, -48.0, 28.0, 31.0], [3.0, 3.0, 31.0, -37.0, -43.0]], [[-3.0, -11.0, 57.0, -1.0, 
-55.0], [-14.0, -74.0, 29.0, -34.0, 18.0], [31.0, 13.0, -7.0, -2.0, 106.0], [12.0, -85.0, 45.0, 25.0, -91.0]], [[-45.0, 26.0, 
-3.0, 78.0, -22.0], [-15.0, 1.0, -7.0, 18.0, -11.0], [14.0, -36.0, 12.0, -54.0, 18.0], [31.0, 77.0, -15.0, 36.0, 52.0]], 
-[[-43.0, -117.0, 67.0, 25.0, 68.0], [29.0, 59.0, 42.0, 17.0, 52.0], [-65.0, -19.0, -60.0, 31.0, 66.0], [-31.0, 50.0, 51.0, 
--50.0, -23.0]], [[41.0, 19.0, -26.0, -21.0, -21.0], [6.0, -21.0, -13.0, -8.0, 4.0], [32.0, 27.0, 32.0, -34.0, -41.0], [-16.0, 
--50.0, -15.0, 14.0, -12.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 57.0, -9.0, 10.0, -35.0], [-45.0, -18.0, -37.0, 42.0, -68.0], 
-[30.0, -38.0, 0.0, -28.0, 20.0], [72.0, -4.0, -12.0, 35.0, -17.0]], [[55.0, 45.0, -14.0, -32.0, -44.0], [-35.0, -24.0, -39.0, 
-57.0, -49.0], [22.0, -6.0, 31.0, -71.0, -36.0], [28.0, -82.0, -9.0, 40.0, -39.0]], [[62.0, -45.0, -41.0, -53.0, -53.0], [-8.0, 
-121.0, -75.0, 131.0, -82.0], [-24.0, -54.0, -59.0, 3.0, -64.0], [50.0, 28.0, -16.0, -58.0, -43.0]], [[55.0, 25.0, -37.0, -39.0, 
--51.0], [-41.0, 35.0, -78.0, 89.0, -109.0], [43.0, -52.0, -42.0, -1.0, 3.0], [101.0, -16.0, -17.0, -9.0, -78.0]], [[-50.0, 
--60.0, 17.0, 37.0, 52.0], [68.0, 7.0, 73.0, -94.0, 121.0], [-41.0, 55.0, 21.0, 28.0, -20.0], [-113.0, 56.0, 8.0, -28.0, 
-84.0]]], [[[43.0, -42.0, -58.0, -24.0, -25.0], [58.0, 61.0, -10.0, -11.0, 43.0], [-1.0, 40.0, 16.0, -3.0, -111.0], [-70.0, 
-25.0, -33.0, -46.0, 41.0]], [[-39.0, -66.0, 32.0, 75.0, 24.0], [35.0, 26.0, 32.0, -2.0, 70.0], [-15.0, -1.0, 7.0, -60.0, 14.0], 
-[-48.0, 63.0, 13.0, 2.0, 36.0]], [[6.0, -83.0, 25.0, -21.0, 28.0], [25.0, 60.0, 14.0, 32.0, 28.0], [-56.0, -2.0, -34.0, 18.0, 
--8.0], [-37.0, 7.0, 26.0, -47.0, -19.0]], [[3.0, 45.0, -11.0, -11.0, -2.0], [-14.0, -44.0, -3.0, -34.0, -17.0], [33.0, 10.0, 
-9.0, 22.0, 19.0], [22.0, -27.0, -7.0, 16.0, -12.0]], [[0.0, 4.0, 9.0, -34.0, 7.0], [-32.0, 17.0, -22.0, 34.0, -65.0], [-9.0, 
--39.0, -57.0, 68.0, 52.0], [68.0, -1.0, 14.0, -24.0, -54.0]]], [[[-6.0, 32.0, 18.0, -71.0, 36.0], [-30.0, -38.0, 13.0, -36.0, 
--39.0], [-22.0, 3.0, -38.0, 124.0, 57.0], [35.0, -55.0, 24.0, -21.0, -47.0]], [[-13.0, -28.0, -8.0, 12.0, 19.0], [21.0, 18.0, 
-3.0, -30.0, 10.0], [23.0, -1.0, -33.0, 48.0, 34.0], [9.0, 44.0, -1.0, -32.0, -12.0]], [[25.0, 62.0, -22.0, -60.0, -23.0], 
-[-32.0, -23.0, -20.0, 5.0, -53.0], [-7.0, 2.0, 6.0, 41.0, -27.0], [28.0, -51.0, -11.0, 6.0, -7.0]], [[8.0, -24.0, 39.0, -16.0, 
-44.0], [-6.0, -39.0, 16.0, -18.0, 8.0], [21.0, 8.0, -21.0, 16.0, 79.0], [12.0, -65.0, 36.0, 1.0, -85.0]], [[12.0, -14.0, 6.0, 
-7.0, -13.0], [-12.0, 22.0, -21.0, 52.0, -24.0], [2.0, -26.0, -12.0, -36.0, 6.0], [25.0, 1.0, 4.0, 4.0, -26.0]]], [[[15.0, 
--75.0, 44.0, -17.0, 33.0], [28.0, 17.0, 37.0, 18.0, 68.0], [-62.0, 29.0, 16.0, -44.0, -29.0], [-84.0, -52.0, 35.0, -10.0, 
--10.0]], [[-63.0, 30.0, -11.0, 93.0, -13.0], [0.0, -4.0, 1.0, -27.0, 2.0], [36.0, -27.0, 5.0, -17.0, 33.0], [31.0, 113.0, 
--25.0, 24.0, 69.0]], [[-21.0, -22.0, 12.0, 59.0, 13.0], [24.0, -15.0, 21.0, -29.0, 52.0], [27.0, 13.0, 22.0, -53.0, 18.0], 
-[-29.0, 26.0, 1.0, 19.0, 18.0]], [[1.0, -50.0, 36.0, 68.0, 0.0], [15.0, 2.0, 11.0, 42.0, 53.0], [7.0, -2.0, 37.0, -144.0, 
--1.0], [-39.0, -6.0, 15.0, 41.0, -3.0]], [[-33.0, -69.0, 40.0, 4.0, 37.0], [-2.0, 63.0, 6.0, 42.0, -15.0], [-50.0, -46.0, 
--76.0, 60.0, 64.0], [29.0, 57.0, 33.0, -49.0, -31.0]]]])
+      ref=msk_ref*numpy.array([[[39.0, 26.0], [-10.0, 16.0], [4.0, -25.0], [-65.0, -78.0], [-34.0, 25.0]], [[34.0, 5.0], 
+[-20.0, -42.0], [11.0, -6.0], [-18.0, -58.0], [-57.0, 5.0]], [[-18.0, -59.0], [-9.0, 0.0], [-53.0, 5.0], [22.0, -23.0], [-20.0, 
+-18.0]], [[50.0, 9.0], [-9.0, 20.0], [6.0, 15.0], [-70.0, -28.0], [30.0, -17.0]]])+(1.-msk_ref)*numpy.array([[[51.0, 26.0], 
+[22.0, 36.0], [25.0, -53.0], [44.0, 10.0], [-1.0, -33.0]], [[-38.0, -18.0], [73.0, 31.0], [-41.0, 3.0], [-14.0, -18.0], [-6.0, 
+32.0]], [[54.0, 11.0], [17.0, 34.0], [39.0, 27.0], [-9.0, -89.0], [48.0, 90.0]], [[-14.0, -39.0], [-32.0, 2.0], [-49.0, -66.0], 
+[27.0, -26.0], [-33.0, -4.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 0.0, 6.0, -7.0, 2.0], [7.0, 0.0, 7.0, -4.0, -4.0], [-5.0, -2.0, 0.0, -4.0, -7.0], [6.0, 
--5.0, -6.0, 2.0, 7.0]])+(1.-msk_arg0)*numpy.array([[-3.0, 7.0, -3.0, -7.0, 7.0], [6.0, 6.0, 2.0, 0.0, -5.0], [3.0, 1.0, 2.0, 
-0.0, 7.0], [-2.0, 1.0, 5.0, 0.0, -6.0]])
-      arg1=Data(-2.0,self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank2_expandedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[-1.0, 7.0, -5.0, 0.0, 0.0], [6.0, 0.0, 3.0, -5.0, -3.0], [-6.0, -6.0, -4.0, -1.0, 4.0], [4.0, 
+-5.0, -1.0, -7.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[4.0, -5.0, 4.0, 3.0, 7.0], [0.0, -6.0, 0.0, 6.0, -6.0], [-3.0, 2.0, 5.0, 2.0, 2.0], 
+[0.0, -3.0, -5.0, -1.0, 7.0]]))
+      arg1=Data(numpy.array([[7.0, 1.0, -5.0, -4.0, 0.0], [1.0, 2.0, 4.0, 3.0, 0.0], [1.0, 4.0, 0.0, -3.0, -3.0], [-5.0, 1.0, 
+-3.0, -5.0, 3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[2.0, 6.0, -3.0, 3.0, -7.0], [-1.0, 4.0, 5.0, -2.0, 1.0], [-4.0, 6.0, -7.0, 3.0, 
+-4.0], [-6.0, -3.0, 1.0, -6.0, 0.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-8.0, -0.0, -12.0, 14.0, -4.0], [-14.0, -0.0, -14.0, 8.0, 8.0], [10.0, 4.0, -0.0, 8.0, 14.0], 
-[-12.0, 10.0, 12.0, -4.0, -14.0]])+(1.-msk_ref)*numpy.array([[6.0, -14.0, 6.0, 14.0, -14.0], [-12.0, -12.0, -4.0, -0.0, 10.0], 
-[-6.0, -2.0, -4.0, -0.0, -14.0], [4.0, -2.0, -10.0, -0.0, 12.0]])
+      ref=msk_ref*numpy.array([[[[-7.0, -1.0, 5.0, 4.0, 0.0], [-1.0, -2.0, -4.0, -3.0, 0.0], [-1.0, -4.0, 0.0, 3.0, 3.0], [5.0, 
+-1.0, 3.0, 5.0, -3.0]], [[49.0, 7.0, -35.0, -28.0, 0.0], [7.0, 14.0, 28.0, 21.0, 0.0], [7.0, 28.0, 0.0, -21.0, -21.0], [-35.0, 
+7.0, -21.0, -35.0, 21.0]], [[-35.0, -5.0, 25.0, 20.0, 0.0], [-5.0, -10.0, -20.0, -15.0, 0.0], [-5.0, -20.0, 0.0, 15.0, 15.0], 
+[25.0, -5.0, 15.0, 25.0, -15.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]], 
+[[[42.0, 6.0, -30.0, -24.0, 0.0], [6.0, 12.0, 24.0, 18.0, 0.0], [6.0, 24.0, 0.0, -18.0, -18.0], [-30.0, 6.0, -18.0, -30.0, 
+18.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[21.0, 
+3.0, -15.0, -12.0, 0.0], [3.0, 6.0, 12.0, 9.0, 0.0], [3.0, 12.0, 0.0, -9.0, -9.0], [-15.0, 3.0, -9.0, -15.0, 9.0]], [[-35.0, 
+-5.0, 25.0, 20.0, 0.0], [-5.0, -10.0, -20.0, -15.0, 0.0], [-5.0, -20.0, 0.0, 15.0, 15.0], [25.0, -5.0, 15.0, 25.0, -15.0]], 
+[[-21.0, -3.0, 15.0, 12.0, 0.0], [-3.0, -6.0, -12.0, -9.0, 0.0], [-3.0, -12.0, 0.0, 9.0, 9.0], [15.0, -3.0, 9.0, 15.0, -9.0]]], 
+[[[-42.0, -6.0, 30.0, 24.0, 0.0], [-6.0, -12.0, -24.0, -18.0, 0.0], [-6.0, -24.0, 0.0, 18.0, 18.0], [30.0, -6.0, 18.0, 30.0, 
+-18.0]], [[-42.0, -6.0, 30.0, 24.0, 0.0], [-6.0, -12.0, -24.0, -18.0, 0.0], [-6.0, -24.0, 0.0, 18.0, 18.0], [30.0, -6.0, 18.0, 
+30.0, -18.0]], [[-28.0, -4.0, 20.0, 16.0, 0.0], [-4.0, -8.0, -16.0, -12.0, 0.0], [-4.0, -16.0, 0.0, 12.0, 12.0], [20.0, -4.0, 
+12.0, 20.0, -12.0]], [[-7.0, -1.0, 5.0, 4.0, 0.0], [-1.0, -2.0, -4.0, -3.0, 0.0], [-1.0, -4.0, 0.0, 3.0, 3.0], [5.0, -1.0, 3.0, 
+5.0, -3.0]], [[28.0, 4.0, -20.0, -16.0, 0.0], [4.0, 8.0, 16.0, 12.0, 0.0], [4.0, 16.0, 0.0, -12.0, -12.0], [-20.0, 4.0, -12.0, 
+-20.0, 12.0]]], [[[28.0, 4.0, -20.0, -16.0, 0.0], [4.0, 8.0, 16.0, 12.0, 0.0], [4.0, 16.0, 0.0, -12.0, -12.0], [-20.0, 4.0, 
+-12.0, -20.0, 12.0]], [[-35.0, -5.0, 25.0, 20.0, 0.0], [-5.0, -10.0, -20.0, -15.0, 0.0], [-5.0, -20.0, 0.0, 15.0, 15.0], [25.0, 
+-5.0, 15.0, 25.0, -15.0]], [[-7.0, -1.0, 5.0, 4.0, 0.0], [-1.0, -2.0, -4.0, -3.0, 0.0], [-1.0, -4.0, 0.0, 3.0, 3.0], [5.0, 
+-1.0, 3.0, 5.0, -3.0]], [[-49.0, -7.0, 35.0, 28.0, 0.0], [-7.0, -14.0, -28.0, -21.0, 0.0], [-7.0, -28.0, 0.0, 21.0, 21.0], 
+[35.0, -7.0, 21.0, 35.0, -21.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[8.0, 24.0, -12.0, 12.0, -28.0], [-4.0, 16.0, 20.0, -8.0, 4.0], [-16.0, 24.0, 
+-28.0, 12.0, -16.0], [-24.0, -12.0, 4.0, -24.0, 0.0]], [[-10.0, -30.0, 15.0, -15.0, 35.0], [5.0, -20.0, -25.0, 10.0, -5.0], 
+[20.0, -30.0, 35.0, -15.0, 20.0], [30.0, 15.0, -5.0, 30.0, 0.0]], [[8.0, 24.0, -12.0, 12.0, -28.0], [-4.0, 16.0, 20.0, -8.0, 
+4.0], [-16.0, 24.0, -28.0, 12.0, -16.0], [-24.0, -12.0, 4.0, -24.0, 0.0]], [[6.0, 18.0, -9.0, 9.0, -21.0], [-3.0, 12.0, 15.0, 
+-6.0, 3.0], [-12.0, 18.0, -21.0, 9.0, -12.0], [-18.0, -9.0, 3.0, -18.0, 0.0]], [[14.0, 42.0, -21.0, 21.0, -49.0], [-7.0, 28.0, 
+35.0, -14.0, 7.0], [-28.0, 42.0, -49.0, 21.0, -28.0], [-42.0, -21.0, 7.0, -42.0, 0.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
+0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-12.0, -36.0, 18.0, -18.0, 42.0], [6.0, -24.0, 
+-30.0, 12.0, -6.0], [24.0, -36.0, 42.0, -18.0, 24.0], [36.0, 18.0, -6.0, 36.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[12.0, 36.0, -18.0, 18.0, -42.0], [-6.0, 24.0, 30.0, 
+-12.0, 6.0], [-24.0, 36.0, -42.0, 18.0, -24.0], [-36.0, -18.0, 6.0, -36.0, 0.0]], [[-12.0, -36.0, 18.0, -18.0, 42.0], [6.0, 
+-24.0, -30.0, 12.0, -6.0], [24.0, -36.0, 42.0, -18.0, 24.0], [36.0, 18.0, -6.0, 36.0, 0.0]]], [[[-6.0, -18.0, 9.0, -9.0, 21.0], 
+[3.0, -12.0, -15.0, 6.0, -3.0], [12.0, -18.0, 21.0, -9.0, 12.0], [18.0, 9.0, -3.0, 18.0, 0.0]], [[4.0, 12.0, -6.0, 6.0, -14.0], 
+[-2.0, 8.0, 10.0, -4.0, 2.0], [-8.0, 12.0, -14.0, 6.0, -8.0], [-12.0, -6.0, 2.0, -12.0, 0.0]], [[10.0, 30.0, -15.0, 15.0, 
+-35.0], [-5.0, 20.0, 25.0, -10.0, 5.0], [-20.0, 30.0, -35.0, 15.0, -20.0], [-30.0, -15.0, 5.0, -30.0, 0.0]], [[4.0, 12.0, -6.0, 
+6.0, -14.0], [-2.0, 8.0, 10.0, -4.0, 2.0], [-8.0, 12.0, -14.0, 6.0, -8.0], [-12.0, -6.0, 2.0, -12.0, 0.0]], [[4.0, 12.0, -6.0, 
+6.0, -14.0], [-2.0, 8.0, 10.0, -4.0, 2.0], [-8.0, 12.0, -14.0, 6.0, -8.0], [-12.0, -6.0, 2.0, -12.0, 0.0]]], [[[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, -18.0, 9.0, -9.0, 21.0], 
+[3.0, -12.0, -15.0, 6.0, -3.0], [12.0, -18.0, 21.0, -9.0, 12.0], [18.0, 9.0, -3.0, 18.0, 0.0]], [[-10.0, -30.0, 15.0, -15.0, 
+35.0], [5.0, -20.0, -25.0, 10.0, -5.0], [20.0, -30.0, 35.0, -15.0, 20.0], [30.0, 15.0, -5.0, 30.0, 0.0]], [[-2.0, -6.0, 3.0, 
+-3.0, 7.0], [1.0, -4.0, -5.0, 2.0, -1.0], [4.0, -6.0, 7.0, -3.0, 4.0], [6.0, 3.0, -1.0, 6.0, 0.0]], [[14.0, 42.0, -21.0, 21.0, 
+-49.0], [-7.0, 28.0, 35.0, -14.0, 7.0], [-28.0, 42.0, -49.0, 21.0, -28.0], [-42.0, -21.0, 7.0, -42.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[3.0, 4.0, 0.0], [-2.0, -4.0, 5.0], [-7.0, -4.0, 1.0], [2.0, 7.0, -3.0], [-3.0, -7.0, 6.0]], 
-[[1.0, 6.0, -6.0], [3.0, 0.0, -2.0], [-3.0, -5.0, 2.0], [3.0, 6.0, -5.0], [0.0, 7.0, 4.0]], [[5.0, -5.0, -5.0], [5.0, 1.0, 
--2.0], [-3.0, 6.0, 0.0], [-4.0, -6.0, -6.0], [0.0, -6.0, -5.0]], [[-5.0, -5.0, -2.0], [2.0, 3.0, -4.0], [-1.0, -4.0, -6.0], 
-[-1.0, 7.0, 6.0], [-1.0, 1.0, -5.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, -4.0, -1.0], [2.0, -1.0, -5.0], [-1.0, 5.0, 0.0], 
-[0.0, 5.0, 7.0], [3.0, 2.0, 1.0]], [[0.0, 4.0, -3.0], [5.0, 2.0, -1.0], [1.0, -2.0, 3.0], [-6.0, -3.0, 7.0], [-3.0, -4.0, 
-0.0]], [[-2.0, -7.0, 3.0], [1.0, -2.0, -4.0], [5.0, -3.0, 3.0], [-6.0, 1.0, -2.0], [-3.0, 0.0, 7.0]], [[6.0, 0.0, 1.0], [2.0, 
-7.0, -6.0], [-7.0, -7.0, -1.0], [-4.0, 5.0, 0.0], [-3.0, 6.0, -2.0]]])
-      arg1=Data(numpy.array([7.0, 4.0, 0.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[-5.0, 1.0, 5.0], [4.0, -6.0, 6.0], [7.0, -4.0, 3.0], [7.0, -3.0, 4.0], [1.0, -2.0, 6.0]], [[3.0, 
+7.0, -7.0], [5.0, -4.0, 6.0], [-4.0, -2.0, -4.0], [-2.0, 6.0, 5.0], [0.0, -1.0, 2.0]], [[-1.0, -2.0, 4.0], [-4.0, 5.0, 1.0], 
+[5.0, 5.0, 5.0], [-6.0, -5.0, 1.0], [-3.0, -7.0, 1.0]], [[-7.0, -4.0, 4.0], [0.0, -1.0, 2.0], [3.0, -5.0, 2.0], [-6.0, 4.0, 
+-5.0], [4.0, 4.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, 1.0, 3.0], [3.0, -6.0, -6.0], [5.0, -2.0, 6.0], [5.0, 7.0, 4.0], [-5.0, -2.0, 
+-2.0]], [[0.0, 4.0, -2.0], [3.0, 0.0, 6.0], [-3.0, -5.0, -3.0], [4.0, 2.0, 5.0], [3.0, 4.0, -4.0]], [[-1.0, -1.0, 1.0], [-1.0, 
+0.0, 7.0], [3.0, 7.0, -5.0], [3.0, -4.0, -3.0], [-3.0, 1.0, 1.0]], [[-3.0, -2.0, 6.0], [4.0, -5.0, -1.0], [3.0, 6.0, -3.0], 
+[-3.0, 1.0, 5.0], [6.0, 1.0, 4.0]]]))
+      arg1=Data(numpy.array([[[3.0, 4.0, 0.0], [7.0, -5.0, 0.0], [2.0, 7.0, -6.0], [5.0, 7.0, -4.0], [-1.0, 2.0, -7.0]], [[3.0, 
+6.0, 7.0], [7.0, 6.0, -4.0], [3.0, -7.0, 7.0], [5.0, 0.0, 0.0], [6.0, -7.0, 6.0]], [[-3.0, -7.0, 0.0], [-2.0, 7.0, -1.0], [1.0, 
+-7.0, -5.0], [3.0, -7.0, 4.0], [-3.0, 0.0, -2.0]], [[3.0, -3.0, 5.0], [5.0, -1.0, -4.0], [3.0, 5.0, -5.0], [-7.0, -2.0, -4.0], 
+[5.0, -7.0, -5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-7.0, 1.0, 4.0], [-3.0, -7.0, 6.0], [4.0, 4.0, 1.0], [7.0, 3.0, 0.0], [-7.0, 0.0, 
+0.0]], [[-1.0, 7.0, 7.0], [5.0, 0.0, -4.0], [3.0, 5.0, 2.0], [-5.0, -2.0, -1.0], [2.0, 4.0, -4.0]], [[-5.0, -7.0, -4.0], [5.0, 
+0.0, 0.0], [1.0, -3.0, 4.0], [-3.0, 4.0, 6.0], [0.0, -4.0, 0.0]], [[-2.0, 7.0, -7.0], [-7.0, -4.0, 6.0], [-3.0, -5.0, -1.0], 
+[-4.0, 2.0, -3.0], [-5.0, 4.0, -6.0]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[37.0, -30.0, -65.0, 42.0, -49.0], [31.0, 21.0, -41.0, 45.0, 28.0], [15.0, 39.0, 3.0, -52.0, 
--24.0], [-55.0, 26.0, -23.0, 21.0, -3.0]])+(1.-msk_ref)*numpy.array([[-30.0, 10.0, 13.0, 20.0, 29.0], [16.0, 43.0, -1.0, -54.0, 
--37.0], [-42.0, -1.0, 23.0, -38.0, -21.0], [42.0, 42.0, -77.0, -8.0, 3.0]])
+      ref=msk_ref*numpy.array([[[[-11.0, -40.0, -33.0, -38.0, -28.0], [26.0, -49.0, 13.0, -25.0, -7.0], [8.0, 12.0, -37.0, 
+-2.0, 5.0], [7.0, -46.0, -35.0, 13.0, -57.0]], [[-12.0, 58.0, -70.0, -46.0, -58.0], [18.0, -32.0, 96.0, 20.0, 102.0], [30.0, 
+-56.0, 16.0, 78.0, -24.0], [60.0, 2.0, -48.0, -40.0, 32.0]], [[5.0, 69.0, -32.0, -5.0, -36.0], [18.0, 13.0, 70.0, 35.0, 88.0], 
+[7.0, -45.0, 20.0, 61.0, -27.0], [48.0, 27.0, -14.0, -53.0, 48.0]], [[9.0, 64.0, -31.0, -2.0, -41.0], [31.0, 15.0, 70.0, 35.0, 
+87.0], [0.0, -39.0, 8.0, 58.0, -29.0], [50.0, 22.0, -14.0, -59.0, 36.0]], [[-5.0, 17.0, -48.0, -33.0, -47.0], [33.0, -29.0, 
+59.0, 5.0, 56.0], [11.0, -22.0, -15.0, 41.0, -15.0], [39.0, -17.0, -37.0, -27.0, -11.0]]], [[[37.0, -14.0, 97.0, 92.0, 60.0], 
+[2.0, 91.0, -89.0, 15.0, -73.0], [-58.0, 50.0, -11.0, -68.0, 5.0], [-47.0, 36.0, 79.0, -7.0, 1.0]], [[-1.0, 55.0, -54.0, -27.0, 
+-55.0], [33.0, -13.0, 85.0, 25.0, 94.0], [13.0, -44.0, 3.0, 67.0, -27.0], [57.0, 5.0, -35.0, -51.0, 23.0]], [[-20.0, -18.0, 
+2.0, -18.0, 28.0], [-52.0, -24.0, -26.0, -20.0, -34.0], [26.0, -2.0, 30.0, -14.0, 20.0], [-26.0, -2.0, -2.0, 48.0, 14.0]], 
+[[18.0, -44.0, 8.0, 12.0, -21.0], [65.0, 2.0, -13.0, -10.0, -24.0], [-36.0, 41.0, -69.0, -28.0, -4.0], [1.0, -36.0, -1.0, 
+-18.0, -77.0]], [[-4.0, 5.0, -19.0, -15.0, -16.0], [8.0, -14.0, 21.0, 0.0, 19.0], [7.0, -9.0, -3.0, 15.0, -4.0], [13.0, -7.0, 
+-15.0, -6.0, -3.0]]], [[[-11.0, 3.0, -40.0, -35.0, -31.0], [13.0, -35.0, 39.0, -5.0, 32.0], [17.0, -16.0, -7.0, 27.0, -5.0], 
+[23.0, -19.0, -33.0, -5.0, -11.0]], [[8.0, -53.0, 21.0, 11.0, 7.0], [25.0, -2.0, -40.0, -20.0, -53.0], [-23.0, 42.0, -44.0, 
+-43.0, 10.0], [-22.0, -29.0, 8.0, 14.0, -60.0]], [[35.0, 10.0, 15.0, 40.0, -30.0], [80.0, 45.0, 15.0, 25.0, 25.0], [-50.0, 
+20.0, -55.0, 0.0, -25.0], [25.0, 0.0, 15.0, -65.0, -35.0]], [[-38.0, -17.0, -53.0, -69.0, -11.0], [-41.0, -76.0, 24.0, -30.0, 
+5.0], [53.0, -24.0, 24.0, 21.0, 16.0], [2.0, -29.0, -48.0, 48.0, 0.0]], [[-37.0, 14.0, -61.0, -68.0, -18.0], [-44.0, -67.0, 
+47.0, -15.0, 37.0], [58.0, -44.0, 41.0, 44.0, 7.0], [17.0, -12.0, -49.0, 31.0, 29.0]]], [[[-37.0, -29.0, -66.0, -79.0, -29.0], 
+[-17.0, -89.0, 35.0, -35.0, 10.0], [49.0, -18.0, 1.0, 23.0, 13.0], [11.0, -47.0, -61.0, 41.0, -27.0]], [[-4.0, 5.0, -19.0, 
+-15.0, -16.0], [8.0, -14.0, 21.0, 0.0, 19.0], [7.0, -9.0, -3.0, 15.0, -4.0], [13.0, -7.0, -15.0, -6.0, -3.0]], [[-11.0, 46.0, 
+-41.0, -28.0, -27.0], [-7.0, -17.0, 58.0, 15.0, 65.0], [26.0, -43.0, 28.0, 52.0, -13.0], [34.0, 12.0, -26.0, -19.0, 40.0]], 
+[[-2.0, -62.0, 46.0, 18.0, 49.0], [-29.0, 2.0, -81.0, -30.0, -94.0], [-10.0, 45.0, -9.0, -66.0, 28.0], [-55.0, -14.0, 27.0, 
+54.0, -33.0]], [[28.0, 8.0, 54.0, 60.0, 25.0], [15.0, 64.0, -37.0, 20.0, -22.0], [-40.0, 23.0, -9.0, -28.0, -6.0], [-15.0, 
+28.0, 47.0, -24.0, 7.0]]]])+(1.-msk_ref)*numpy.array([[[[34.0, 20.0, -5.0, -18.0, 21.0], [31.0, -27.0, 2.0, 10.0, -14.0], 
+[-4.0, -15.0, 6.0, 31.0, -4.0], [-8.0, 35.0, 1.0, 5.0, 1.0]], [[-51.0, -3.0, -18.0, 3.0, -21.0], [-87.0, 39.0, -33.0, 3.0, 
+6.0], [51.0, 15.0, -3.0, -69.0, 24.0], [-6.0, -33.0, 27.0, -6.0, -3.0]], [[-13.0, 35.0, 18.0, 29.0, -35.0], [23.0, 1.0, 17.0, 
+-27.0, -22.0], [-35.0, 25.0, 35.0, 13.0, 8.0], [-66.0, 9.0, -11.0, -42.0, -69.0]], [[-12.0, -40.0, 52.0, 56.0, -35.0], [72.0, 
+9.0, 58.0, -43.0, 22.0], [-90.0, 25.0, 0.0, 37.0, -28.0], [11.0, -39.0, -54.0, -18.0, -21.0]], [[25.0, 17.0, -30.0, -41.0, 
+35.0], [-23.0, -17.0, -29.0, 31.0, -10.0], [47.0, -25.0, -7.0, -5.0, 8.0], [10.0, 31.0, 27.0, 22.0, 29.0]]], [[[-4.0, -40.0, 
+14.0, 12.0, 0.0], [14.0, 8.0, 16.0, -6.0, 24.0], [-20.0, 0.0, -20.0, 4.0, -16.0], [42.0, -28.0, -18.0, 14.0, 28.0]], [[3.0, 
+27.0, 18.0, 21.0, -21.0], [39.0, -9.0, 21.0, -21.0, -18.0], [-39.0, 15.0, 27.0, 27.0, 0.0], [-48.0, 15.0, -15.0, -30.0, 
+-51.0]], [[4.0, 26.0, -35.0, -36.0, 21.0], [-53.0, -3.0, -40.0, 28.0, -14.0], [62.0, -15.0, 0.0, -29.0, 20.0], [-8.0, 23.0, 
+37.0, 11.0, 13.0]], [[-6.0, 4.0, 29.0, 34.0, -28.0], [45.0, 0.0, 32.0, -29.0, -4.0], [-54.0, 20.0, 18.0, 26.0, -8.0], [-29.0, 
+-6.0, -27.0, -27.0, -42.0]], [[-33.0, -61.0, 24.0, 33.0, -21.0], [-3.0, 31.0, 21.0, -19.0, 38.0], [-27.0, 15.0, -25.0, -17.0, 
+-16.0], [50.0, -61.0, -25.0, 8.0, 25.0]]], [[[10.0, 16.0, -7.0, -10.0, 7.0], [1.0, -9.0, -6.0, 6.0, -10.0], [8.0, -5.0, 6.0, 
+5.0, 4.0], [-12.0, 17.0, 7.0, -1.0, -5.0]], [[35.0, 45.0, 3.0, -7.0, 7.0], [50.0, -33.0, 11.0, -2.0, -30.0], [-23.0, -5.0, 
+27.0, 45.0, 0.0], [-47.0, 49.0, -4.0, -17.0, -37.0]], [[-34.0, -88.0, 35.0, 42.0, -21.0], [11.0, 35.0, 34.0, -24.0, 54.0], 
+[-44.0, 15.0, -38.0, -11.0, -28.0], [78.0, -79.0, -39.0, 17.0, 43.0]], [[-37.0, 1.0, -7.0, 9.0, -21.0], [-52.0, 27.0, -17.0, 
+-4.0, 2.0], [25.0, 15.0, 3.0, -43.0, 16.0], [-13.0, -23.0, 14.0, -11.0, -13.0]], [[26.0, 8.0, -7.0, -18.0, 21.0], [17.0, -19.0, 
+-2.0, 12.0, -6.0], [4.0, -15.0, -2.0, 19.0, -4.0], [6.0, 23.0, 3.0, 11.0, 13.0]]], [[[43.0, 59.0, -14.0, -27.0, 21.0], [31.0, 
+-39.0, -7.0, 13.0, -38.0], [5.0, -15.0, 27.0, 37.0, 8.0], [-50.0, 65.0, 13.0, -10.0, -29.0]], [[-37.0, 17.0, -5.0, 13.0, 
+-28.0], [-46.0, 24.0, -15.0, -9.0, -8.0], [19.0, 20.0, 15.0, -38.0, 20.0], [-36.0, -14.0, 14.0, -23.0, -34.0]], [[-27.0, -69.0, 
+33.0, 39.0, -21.0], [18.0, 27.0, 33.0, -24.0, 42.0], [-45.0, 15.0, -27.0, -3.0, -24.0], [57.0, -63.0, -36.0, 9.0, 27.0]], 
+[[42.0, 32.0, -3.0, -18.0, 21.0], [45.0, -35.0, 6.0, 8.0, -22.0], [-12.0, -15.0, 14.0, 43.0, -4.0], [-22.0, 47.0, -1.0, -1.0, 
+-11.0]], [[-25.0, -1.0, 32.0, 45.0, -42.0], [29.0, 14.0, 31.0, -36.0, 0.0], [-53.0, 30.0, 19.0, 10.0, -4.0], [-33.0, -22.0, 
+-27.0, -34.0, -50.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-5.0, 2.0, 0.0], [-5.0, -1.0, -4.0]], [[-4.0, -5.0, -3.0], [7.0, 5.0, 1.0]], [[-6.0, 2.0, 
-1.0], [6.0, -2.0, -6.0]], [[-1.0, 3.0, 4.0], [0.0, -5.0, -7.0]], [[-1.0, -6.0, 4.0], [-1.0, -6.0, 2.0]]], [[[3.0, 2.0, -3.0], 
-[7.0, -7.0, 6.0]], [[0.0, 5.0, -3.0], [-1.0, -7.0, -4.0]], [[6.0, 0.0, 2.0], [7.0, -2.0, 6.0]], [[5.0, 1.0, 1.0], [-2.0, 7.0, 
-7.0]], [[-2.0, -1.0, -4.0], [2.0, 2.0, -5.0]]], [[[-1.0, 6.0, 3.0], [3.0, -5.0, 1.0]], [[3.0, 5.0, 6.0], [-7.0, 5.0, 4.0]], 
-[[3.0, 6.0, -3.0], [6.0, 5.0, 2.0]], [[-5.0, 0.0, 6.0], [-3.0, 0.0, -6.0]], [[-7.0, -6.0, 6.0], [-4.0, 2.0, -6.0]]], [[[-6.0, 
-7.0, 2.0], [-6.0, -6.0, 1.0]], [[2.0, 0.0, -1.0], [2.0, 0.0, 6.0]], [[-6.0, 4.0, 0.0], [3.0, 0.0, 5.0]], [[-2.0, 5.0, 7.0], 
-[2.0, -6.0, 0.0]], [[-1.0, 2.0, 2.0], [-4.0, -7.0, 6.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 2.0, -2.0], [-3.0, -7.0, 0.0]], 
-[[2.0, 2.0, -3.0], [-7.0, -7.0, 3.0]], [[3.0, 4.0, 5.0], [-2.0, 0.0, 5.0]], [[3.0, -4.0, 0.0], [-3.0, -3.0, -7.0]], [[7.0, 0.0, 
--4.0], [3.0, 7.0, 2.0]]], [[[-4.0, 1.0, 5.0], [5.0, 0.0, -3.0]], [[7.0, -3.0, 0.0], [-4.0, -2.0, 6.0]], [[3.0, -7.0, 0.0], 
-[0.0, 3.0, 1.0]], [[-2.0, -5.0, -3.0], [-2.0, -1.0, -6.0]], [[2.0, 0.0, 1.0], [6.0, -4.0, 7.0]]], [[[3.0, -1.0, -1.0], [-6.0, 
-7.0, -3.0]], [[-7.0, 7.0, -3.0], [0.0, -7.0, 3.0]], [[-2.0, -7.0, -5.0], [2.0, 2.0, 7.0]], [[3.0, -3.0, -3.0], [0.0, -6.0, 
-2.0]], [[4.0, 1.0, 7.0], [0.0, 5.0, 4.0]]], [[[6.0, -7.0, 6.0], [-5.0, 6.0, -2.0]], [[4.0, -7.0, 5.0], [-3.0, -7.0, -2.0]], 
-[[5.0, -1.0, -4.0], [4.0, 5.0, 1.0]], [[-1.0, 0.0, 5.0], [-6.0, -7.0, 6.0]], [[1.0, -6.0, -3.0], [-3.0, 2.0, -7.0]]]])
-      arg1=Data(numpy.array([[3.0, 5.0, -7.0], [0.0, -2.0, -4.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[5.0, 7.0, 2.0], [0.0, -3.0, -5.0]], [[3.0, 0.0, -7.0], [0.0, 0.0, 4.0]], [[2.0, 7.0, -6.0], 
+[-4.0, 3.0, 3.0]], [[-6.0, 7.0, -1.0], [4.0, 1.0, 0.0]], [[-3.0, -3.0, -5.0], [2.0, 1.0, -5.0]]], [[[-7.0, -7.0, -4.0], [3.0, 
+-1.0, 6.0]], [[-4.0, -4.0, -7.0], [6.0, 5.0, -5.0]], [[4.0, 0.0, 0.0], [6.0, -2.0, 1.0]], [[7.0, 4.0, -2.0], [-4.0, 4.0, 
+-3.0]], [[6.0, 0.0, -7.0], [-5.0, 0.0, -7.0]]], [[[-3.0, 7.0, 5.0], [0.0, 1.0, 2.0]], [[-6.0, 0.0, 3.0], [-6.0, 5.0, -5.0]], 
+[[4.0, 2.0, -1.0], [7.0, 3.0, 6.0]], [[-3.0, 7.0, 4.0], [4.0, -7.0, -6.0]], [[2.0, -4.0, 0.0], [0.0, -2.0, 1.0]]], [[[-3.0, 
+3.0, -2.0], [4.0, -7.0, 3.0]], [[-5.0, -7.0, -4.0], [5.0, 0.0, -4.0]], [[-7.0, -5.0, 1.0], [-2.0, 6.0, -5.0]], [[-2.0, -4.0, 
+-4.0], [0.0, 0.0, -1.0]], [[7.0, 0.0, 4.0], [3.0, 7.0, -4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, -2.0, -5.0], [-4.0, -5.0, 4.0]], [[3.0, 7.0, -3.0], [-1.0, 4.0, 3.0]], [[-4.0, 
+-2.0, 7.0], [6.0, -4.0, -7.0]], [[3.0, -3.0, -6.0], [-1.0, -5.0, -2.0]], [[-2.0, -5.0, 0.0], [-7.0, -3.0, -4.0]]], [[[1.0, 7.0, 
+0.0], [-6.0, -2.0, 7.0]], [[-7.0, 1.0, 0.0], [0.0, -4.0, -5.0]], [[0.0, -5.0, 7.0], [6.0, -4.0, 5.0]], [[0.0, -5.0, 4.0], [0.0, 
+4.0, 0.0]], [[-4.0, 4.0, 0.0], [3.0, -2.0, 2.0]]], [[[2.0, -1.0, -6.0], [2.0, 2.0, -5.0]], [[1.0, -3.0, -5.0], [-3.0, -6.0, 
+7.0]], [[-6.0, -3.0, -4.0], [-1.0, -2.0, 0.0]], [[0.0, 6.0, 7.0], [-1.0, 4.0, -2.0]], [[1.0, -4.0, 0.0], [-6.0, 2.0, -5.0]]], 
+[[[-4.0, 2.0, 2.0], [-1.0, 1.0, -5.0]], [[-6.0, -2.0, 6.0], [0.0, -6.0, -1.0]], [[-1.0, -7.0, 4.0], [4.0, 3.0, -2.0]], [[3.0, 
+-1.0, -3.0], [-3.0, 5.0, 3.0]], [[0.0, 5.0, -3.0], [7.0, 0.0, -1.0]]]]))
+      arg1=Data(numpy.array([[[[-4.0, 7.0, -1.0], [-6.0, 0.0, 6.0]], [[-7.0, -4.0, -2.0], [-7.0, 6.0, -4.0]], [[2.0, 6.0, 
+-4.0], [3.0, 0.0, -6.0]], [[-5.0, -6.0, -1.0], [5.0, -5.0, 2.0]], [[-5.0, 6.0, 6.0], [-2.0, -5.0, 7.0]]], [[[2.0, -3.0, -3.0], 
+[-5.0, -2.0, 4.0]], [[-7.0, 4.0, 1.0], [-7.0, 0.0, 1.0]], [[6.0, 0.0, -2.0], [1.0, -4.0, 4.0]], [[0.0, 6.0, -1.0], [3.0, 2.0, 
+-5.0]], [[-3.0, 5.0, 7.0], [0.0, -2.0, -6.0]]], [[[-6.0, 2.0, -7.0], [-5.0, -3.0, -6.0]], [[0.0, -7.0, -4.0], [5.0, -1.0, 
+-1.0]], [[-3.0, -1.0, -7.0], [6.0, 5.0, 0.0]], [[4.0, 2.0, -5.0], [5.0, 3.0, -2.0]], [[-7.0, 0.0, -2.0], [-4.0, 2.0, 5.0]]], 
+[[[7.0, 4.0, 6.0], [-4.0, -1.0, 1.0]], [[2.0, -7.0, 5.0], [-3.0, 5.0, 7.0]], [[-5.0, -6.0, -4.0], [4.0, 2.0, 0.0]], [[3.0, 
+-3.0, 2.0], [3.0, -5.0, -1.0]], [[0.0, -2.0, -2.0], [0.0, -4.0, -4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 5.0, 5.0], [1.0, -5.0, 4.0]], [[-3.0, -2.0, 0.0], [-2.0, -3.0, -4.0]], [[0.0, 
+4.0, 6.0], [-7.0, 0.0, -2.0]], [[-3.0, -4.0, 6.0], [-6.0, -3.0, 6.0]], [[7.0, -7.0, 6.0], [-2.0, 3.0, -5.0]]], [[[-1.0, -7.0, 
+7.0], [0.0, 0.0, 6.0]], [[0.0, -3.0, -1.0], [-4.0, -7.0, -6.0]], [[6.0, 2.0, -4.0], [6.0, 2.0, 3.0]], [[-3.0, -7.0, -5.0], 
+[-4.0, -3.0, -2.0]], [[-1.0, 2.0, -3.0], [-3.0, -7.0, -1.0]]], [[[-6.0, 5.0, 1.0], [0.0, 0.0, 5.0]], [[7.0, 2.0, -6.0], [-5.0, 
+-1.0, 1.0]], [[-7.0, -1.0, 0.0], [5.0, 3.0, -3.0]], [[4.0, 5.0, -7.0], [0.0, -7.0, 6.0]], [[3.0, -2.0, -5.0], [0.0, 6.0, 
+-2.0]]], [[[-2.0, -2.0, 2.0], [-5.0, -4.0, -4.0]], [[-1.0, 1.0, 0.0], [0.0, 6.0, 0.0]], [[7.0, 0.0, 1.0], [-7.0, 0.0, -3.0]], 
+[[2.0, 1.0, -4.0], [2.0, 7.0, -4.0]], [[-2.0, -7.0, -4.0], [-3.0, 5.0, 5.0]]]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[13.0, -30.0, 13.0, 22.0, -57.0], [30.0, 76.0, -16.0, -29.0, 33.0], [12.0, -34.0, 42.0, -33.0, 
--73.0], [11.0, -11.0, -18.0, -18.0, -17.0]])+(1.-msk_ref)*numpy.array([[35.0, 39.0, -26.0, 23.0, 27.0], [-30.0, -14.0, -36.0, 
-16.0, -21.0], [9.0, 37.0, -38.0, 19.0, -58.0], [-63.0, -36.0, 24.0, -48.0, 18.0]])
+      ref=msk_ref*numpy.array([[[[-3.0, -65.0, 74.0, -64.0, 9.0], [-31.0, -10.0, 18.0, 59.0, 70.0], [9.0, -49.0, -51.0, 25.0, 
+-70.0], [73.0, -79.0, -81.0, 18.0, 14.0]], [[19.0, -23.0, 10.0, 0.0, -29.0], [43.0, -24.0, 48.0, -13.0, -82.0], [7.0, 24.0, 
+40.0, 39.0, 13.0], [-17.0, -1.0, 13.0, -9.0, -2.0]], [[89.0, 4.0, 40.0, -75.0, 10.0], [27.0, 39.0, 20.0, 27.0, -37.0], [37.0, 
+-51.0, 20.0, 35.0, 35.0], [22.0, -27.0, -38.0, -57.0, -26.0]], [[50.0, -6.0, 46.0, 4.0, 53.0], [-52.0, 41.0, -34.0, 57.0, 
+44.0], [34.0, -26.0, 47.0, 18.0, 30.0], [-37.0, -73.0, 10.0, -34.0, -16.0]], [[-46.0, 55.0, 32.0, 33.0, -77.0], [-14.0, -15.0, 
+-30.0, 20.0, -13.0], [64.0, 55.0, 64.0, 30.0, 0.0], [-77.0, -46.0, 63.0, -4.0, 32.0]]], [[[1.0, 34.0, -67.0, 113.0, 10.0], 
+[30.0, 2.0, -3.0, -61.0, -76.0], [8.0, 75.0, 69.0, -22.0, 73.0], [-106.0, 43.0, 103.0, 0.0, 2.0]], [[-71.0, 66.0, 44.0, 46.0, 
+-118.0], [-35.0, -42.0, -44.0, 36.0, -37.0], [50.0, 86.0, 126.0, 66.0, 3.0], [-120.0, -43.0, 106.0, -16.0, 22.0]], [[-46.0, 
+-86.0, 20.0, 22.0, -15.0], [-14.0, -69.0, 42.0, 9.0, -14.0], [-54.0, 31.0, 14.0, 38.0, -51.0], [7.0, -13.0, 0.0, 39.0, 4.0]], 
+[[8.0, 3.0, 52.0, -103.0, -56.0], [8.0, -10.0, 14.0, 37.0, -5.0], [6.0, -41.0, -15.0, 44.0, -36.0], [62.0, -13.0, -59.0, -24.0, 
+-8.0]], [[-29.0, 35.0, 67.0, -62.0, -111.0], [30.0, -21.0, 17.0, 27.0, -25.0], [80.0, 10.0, 1.0, 48.0, -43.0], [13.0, -57.0, 
+-22.0, -4.0, 42.0]]], [[[68.0, -19.0, 4.0, -33.0, 96.0], [-36.0, 56.0, -24.0, 29.0, 65.0], [-18.0, -72.0, -28.0, -24.0, 23.0], 
+[38.0, -11.0, -45.0, -27.0, -36.0]], [[27.0, 128.0, -12.0, -38.0, 0.0], [-21.0, 82.0, -88.0, 14.0, 59.0], [60.0, -42.0, -14.0, 
+-44.0, 45.0], [-10.0, 11.0, 4.0, -50.0, -6.0]], [[-7.0, -89.0, 9.0, 1.0, -1.0], [-12.0, -64.0, 45.0, 10.0, -51.0], [-93.0, 
+16.0, 50.0, 57.0, -18.0], [5.0, 25.0, 6.0, 4.0, -38.0]], [[-3.0, -61.0, 68.0, 12.0, 66.0], [-69.0, 19.0, -18.0, 66.0, 122.0], 
+[41.0, -32.0, -37.0, -7.0, -47.0], [16.0, -124.0, -41.0, 31.0, 30.0]], [[-30.0, -14.0, -26.0, 26.0, -17.0], [24.0, -29.0, 24.0, 
+-33.0, -28.0], [-20.0, 29.0, -12.0, -8.0, -13.0], [1.0, 29.0, 10.0, 27.0, 12.0]]], [[[29.0, -69.0, 14.0, 60.0, 69.0], [-3.0, 
+6.0, 30.0, 3.0, 6.0], [21.0, 11.0, 9.0, -3.0, 10.0], [-27.0, -63.0, 7.0, 22.0, 14.0]], [[-79.0, 52.0, 3.0, 88.0, -79.0], 
+[-18.0, -36.0, -33.0, -3.0, -24.0], [43.0, 94.0, 80.0, 19.0, 3.0], [-111.0, -24.0, 103.0, 17.0, 38.0]], [[-26.0, 137.0, -24.0, 
+14.0, -50.0], [-24.0, 39.0, -90.0, 0.0, 21.0], [47.0, 20.0, 37.0, -25.0, 42.0], [-66.0, 27.0, 65.0, -35.0, 4.0]], [[-22.0, 
+42.0, -6.0, 36.0, -45.0], [16.0, -7.0, -8.0, -15.0, -36.0], [38.0, 45.0, 38.0, 6.0, 17.0], [-55.0, -3.0, 50.0, -1.0, 20.0]], 
+[[-74.0, -20.0, 31.0, -67.0, -80.0], [-43.0, -70.0, -7.0, 39.0, 17.0], [-82.0, -4.0, 4.0, 52.0, -75.0], [50.0, 32.0, -25.0, 
+7.0, -20.0]]]])+(1.-msk_ref)*numpy.array([[[[2.0, -1.0, -18.0, 29.0, -15.0], [-1.0, 38.0, 18.0, 50.0, 50.0], [-19.0, 83.0, 
+-73.0, 100.0, 3.0], [10.0, -36.0, 39.0, -33.0, 33.0]], [[11.0, -45.0, 11.0, -43.0, -47.0], [-55.0, -60.0, 55.0, -57.0, -8.0], 
+[29.0, 57.0, -30.0, 58.0, 28.0], [-49.0, 28.0, 16.0, 39.0, -5.0]], [[23.0, 44.0, 6.0, -4.0, 39.0], [25.0, 45.0, -49.0, -7.0, 
+-4.0], [-14.0, -107.0, 69.0, -89.0, -53.0], [40.0, -22.0, -42.0, -26.0, -79.0]], [[-29.0, 22.0, -37.0, -24.0, 3.0], [-36.0, 
+66.0, 14.0, 65.0, 49.0], [-49.0, 59.0, -32.0, 62.0, 19.0], [21.0, -36.0, 28.0, -2.0, 7.0]], [[-33.0, 55.0, 37.0, 53.0, 46.0], 
+[13.0, 88.0, -82.0, 86.0, 38.0], [-33.0, 10.0, -13.0, -36.0, -6.0], [77.0, -21.0, 47.0, -28.0, 25.0]]], [[[67.0, -27.0, 56.0, 
+53.0, -71.0], [-8.0, -25.0, 1.0, -36.0, 38.0], [64.0, 60.0, -71.0, 95.0, -37.0], [-6.0, -6.0, 28.0, -45.0, -8.0]], [[5.0, 51.0, 
+14.0, -1.0, -43.0], [-30.0, 55.0, -63.0, 36.0, 42.0], [22.0, -48.0, 51.0, -25.0, -37.0], [48.0, -16.0, -34.0, -21.0, -38.0]], 
+[[56.0, -10.0, -30.0, 68.0, 28.0], [114.0, -18.0, 5.0, -22.0, -26.0], [7.0, -73.0, 8.0, -16.0, -59.0], [-10.0, -29.0, -50.0, 
+-69.0, -6.0]], [[-25.0, -2.0, 4.0, 32.0, 71.0], [63.0, -17.0, -18.0, 3.0, -50.0], [-21.0, -38.0, 17.0, -81.0, 14.0], [2.0, 
+19.0, 4.0, 7.0, 39.0]], [[41.0, -4.0, -9.0, -4.0, -78.0], [-12.0, -22.0, 4.0, -26.0, 15.0], [54.0, -31.0, 27.0, 30.0, -36.0], 
+[-15.0, -4.0, -55.0, -20.0, -29.0]]], [[[-63.0, 6.0, -44.0, -86.0, 12.0], [-67.0, 17.0, 35.0, 27.0, -1.0], [-48.0, 31.0, 18.0, 
+1.0, 60.0], [-12.0, 9.0, 9.0, 65.0, 6.0]], [[15.0, -1.0, -35.0, 57.0, -49.0], [27.0, 26.0, 11.0, 59.0, 52.0], [9.0, 59.0, 
+-58.0, 108.0, -16.0], [5.0, -40.0, 2.0, -57.0, 53.0]], [[-26.0, 32.0, -29.0, 18.0, -49.0], [-1.0, 31.0, -36.0, 69.0, 29.0], 
+[17.0, -17.0, 34.0, 3.0, -4.0], [23.0, -9.0, -39.0, -15.0, 42.0]], [[36.0, -14.0, 77.0, 0.0, 24.0], [-5.0, -37.0, -20.0, -81.0, 
+-32.0], [27.0, -31.0, 7.0, -59.0, -19.0], [-1.0, 30.0, 20.0, 12.0, -57.0]], [[-56.0, 31.0, 36.0, 13.0, 78.0], [-3.0, 52.0, 
+-49.0, 53.0, 0.0], [-51.0, 22.0, -12.0, -60.0, 33.0], [48.0, 7.0, 64.0, 20.0, 29.0]]], [[[-6.0, 27.0, 37.0, -11.0, 0.0], 
+[-26.0, 19.0, -47.0, -1.0, 3.0], [11.0, -37.0, 39.0, -57.0, -10.0], [29.0, 12.0, -4.0, 11.0, -31.0]], [[46.0, 44.0, 30.0, 74.0, 
+-5.0], [56.0, 48.0, -79.0, 22.0, 27.0], [27.0, -77.0, 29.0, -40.0, -78.0], [56.0, -32.0, -33.0, -76.0, -33.0]], [[-34.0, 8.0, 
+-28.0, 10.0, 77.0], [66.0, -8.0, -12.0, 11.0, -56.0], [-35.0, -70.0, 49.0, -100.0, 13.0], [0.0, 12.0, -25.0, 12.0, 28.0]], 
+[[-36.0, -28.0, -7.0, -2.0, 16.0], [1.0, -35.0, 29.0, 4.0, -25.0], [-11.0, 50.0, -29.0, 11.0, 50.0], [-27.0, 26.0, 30.0, 34.0, 
+62.0]], [[13.0, -20.0, -45.0, -86.0, -62.0], [-62.0, -34.0, 61.0, -46.0, -1.0], [17.0, -8.0, 33.0, 40.0, 7.0], [-47.0, 5.0, 
+-49.0, 35.0, -49.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-6.0, 0.0], [-1.0, -2.0]], [[-4.0, 5.0], [5.0, -4.0]], [[6.0, -7.0], [1.0, 0.0]], [[-1.0, 2.0], 
+[7.0, -1.0]], [[0.0, 3.0], [-5.0, 1.0]], [[-5.0, 5.0], [0.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -7.0], [-1.0, 5.0]], [[7.0, 0.0], [3.0, -1.0]], [[-5.0, 0.0], [0.0, -4.0]], 
+[[-1.0, 1.0], [-3.0, -2.0]], [[0.0, 0.0], [5.0, 0.0]], [[-1.0, -5.0], [0.0, -2.0]]]))
+      arg1=3.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-18.0, 0.0], [-3.0, -6.0]], [[-12.0, 15.0], [15.0, -12.0]], [[18.0, -21.0], [3.0, 0.0]], [[-3.0, 
+6.0], [21.0, -3.0]], [[0.0, 9.0], [-15.0, 3.0]], [[-15.0, 15.0], [0.0, 12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-9.0, -21.0], [-3.0, 15.0]], [[21.0, 0.0], [9.0, -3.0]], [[-15.0, 0.0], [0.0, 
+-12.0]], [[-3.0, 3.0], [-9.0, -6.0]], [[0.0, 0.0], [15.0, 0.0]], [[-3.0, -15.0], [0.0, -6.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[6.0, 1.0], [5.0, 0.0]], [[-3.0, 0.0], [1.0, -3.0]], [[-7.0, 7.0], [2.0, 2.0]], [[6.0, -6.0], 
+[-1.0, 1.0]], [[-2.0, 5.0], [7.0, -3.0]], [[-6.0, -1.0], [2.0, -7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 4.0], [-7.0, 0.0]], [[-1.0, 4.0], [4.0, 1.0]], [[-6.0, 7.0], [7.0, 1.0]], 
+[[0.0, -6.0], [0.0, 6.0]], [[2.0, 0.0], [-1.0, 1.0]], [[-1.0, 1.0], [-7.0, 3.0]]]))
+      arg1=numpy.array(-3.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-18.0, -3.0], [-15.0, -0.0]], [[9.0, -0.0], [-3.0, 9.0]], [[21.0, -21.0], [-6.0, -6.0]], [[-18.0, 
+18.0], [3.0, -3.0]], [[6.0, -15.0], [-21.0, 9.0]], [[18.0, 3.0], [-6.0, 21.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-18.0, -12.0], [21.0, -0.0]], [[3.0, -12.0], [-12.0, -3.0]], [[18.0, -21.0], [-21.0, 
+-3.0]], [[-0.0, 18.0], [-0.0, -18.0]], [[-6.0, -0.0], [3.0, -3.0]], [[3.0, -3.0], [21.0, -9.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-1.0, -2.0, 1.0], [0.0, 6.0, 0.0]], [[-4.0, 2.0, 1.0], [-7.0, 4.0, -5.0]]], [[[-2.0, 4.0, 0.0], 
+[-4.0, 5.0, 2.0]], [[0.0, -2.0, 7.0], [-3.0, -1.0, -5.0]]], [[[-2.0, -6.0, 0.0], [3.0, -4.0, 2.0]], [[-2.0, 0.0, -1.0], [-2.0, 
+-3.0, 4.0]]], [[[4.0, -2.0, 2.0], [-4.0, 0.0, -2.0]], [[0.0, 4.0, 4.0], [-2.0, -6.0, -1.0]]], [[[6.0, -3.0, -6.0], [-1.0, 2.0, 
+1.0]], [[-4.0, 1.0, -1.0], [6.0, -7.0, 1.0]]], [[[-3.0, 3.0, -2.0], [-4.0, -2.0, 5.0]], [[-6.0, 3.0, 1.0], [5.0, -6.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 6.0, 4.0], [-2.0, -6.0, 1.0]], [[6.0, 3.0, -6.0], [7.0, -2.0, -7.0]]], [[[4.0, 
+-7.0, 0.0], [-5.0, 5.0, 0.0]], [[0.0, 6.0, 5.0], [-5.0, -3.0, 0.0]]], [[[-6.0, -1.0, -4.0], [-7.0, 6.0, -3.0]], [[4.0, 5.0, 
+0.0], [6.0, 4.0, 0.0]]], [[[5.0, -6.0, -3.0], [0.0, 3.0, 2.0]], [[5.0, 4.0, -5.0], [6.0, 2.0, 7.0]]], [[[0.0, 6.0, -7.0], [2.0, 
+4.0, -5.0]], [[1.0, -4.0, -4.0], [7.0, 2.0, -4.0]]], [[[5.0, -3.0, -7.0], [2.0, 5.0, 0.0]], [[-7.0, 4.0, -3.0], [-4.0, 7.0, 
+-7.0]]]]))
+      arg1=numpy.array([0.0, -2.0, 0.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[4.0, -12.0], [-4.0, -8.0]], [[-8.0, -10.0], [4.0, 2.0]], [[12.0, 8.0], [0.0, 6.0]], [[4.0, 0.0], 
+[-8.0, 12.0]], [[6.0, -4.0], [-2.0, 14.0]], [[-6.0, 4.0], [-6.0, 12.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-12.0, 12.0], [-6.0, 4.0]], [[14.0, -10.0], [-12.0, 6.0]], [[2.0, -12.0], [-10.0, 
+-8.0]], [[12.0, -6.0], [-8.0, -4.0]], [[-12.0, -8.0], [8.0, -4.0]], [[6.0, -10.0], [-8.0, -14.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_array_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, 7.0], [2.0, 0.0]], [[2.0, -4.0], [7.0, 2.0]], [[1.0, 1.0], [0.0, 0.0]], [[2.0, 0.0], [-1.0, 
+2.0]], [[6.0, 7.0], [-5.0, -1.0]], [[0.0, -1.0], [6.0, 4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-5.0, -7.0], [1.0, -5.0]], [[4.0, 4.0], [-2.0, 3.0]], [[1.0, -5.0], [-3.0, 7.0]], 
+[[-7.0, -7.0], [5.0, -4.0]], [[-7.0, 5.0], [6.0, 5.0]], [[5.0, -2.0], [-6.0, -2.0]]]))
+      arg1=numpy.array([-5.0, -1.0])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 0.0], [-35.0, -7.0]], [[-10.0, -2.0], [0.0, 0.0]]], [[[-10.0, -2.0], [20.0, 4.0]], [[-35.0, 
+-7.0], [-10.0, -2.0]]], [[[-5.0, -1.0], [-5.0, -1.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-10.0, -2.0], [0.0, 0.0]], [[5.0, 1.0], 
+[-10.0, -2.0]]], [[[-30.0, -6.0], [-35.0, -7.0]], [[25.0, 5.0], [5.0, 1.0]]], [[[0.0, 0.0], [5.0, 1.0]], [[-30.0, -6.0], 
+[-20.0, -4.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[25.0, 5.0], [35.0, 7.0]], [[-5.0, -1.0], [25.0, 5.0]]], [[[-20.0, -4.0], [-20.0, 
+-4.0]], [[10.0, 2.0], [-15.0, -3.0]]], [[[-5.0, -1.0], [25.0, 5.0]], [[15.0, 3.0], [-35.0, -7.0]]], [[[35.0, 7.0], [35.0, 
+7.0]], [[-25.0, -5.0], [20.0, 4.0]]], [[[35.0, 7.0], [-25.0, -5.0]], [[-30.0, -6.0], [-25.0, -5.0]]], [[[-25.0, -5.0], [10.0, 
+2.0]], [[30.0, 6.0], [10.0, 2.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, -3.0, -7.0], [4.0, 5.0, 3.0]], [[3.0, 3.0, 5.0], [-5.0, 5.0, 4.0]]], [[[0.0, 0.0, 7.0], 
+[-6.0, -7.0, 7.0]], [[1.0, -5.0, -3.0], [-3.0, -2.0, 7.0]]], [[[-4.0, 6.0, 4.0], [-2.0, -5.0, 7.0]], [[-6.0, -4.0, -3.0], 
+[-2.0, -2.0, -4.0]]], [[[-2.0, -5.0, 0.0], [2.0, -2.0, 0.0]], [[4.0, -2.0, 6.0], [-5.0, 6.0, -2.0]]], [[[-2.0, -3.0, 0.0], 
+[-3.0, 5.0, -2.0]], [[-6.0, -3.0, 1.0], [2.0, 2.0, -5.0]]], [[[7.0, 5.0, -7.0], [-6.0, 2.0, 5.0]], [[-1.0, 3.0, -4.0], [-5.0, 
+-3.0, 6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 2.0, 0.0], [-7.0, -4.0, 7.0]], [[0.0, 6.0, 1.0], [-6.0, 6.0, -6.0]]], 
+[[[-3.0, 0.0, 6.0], [6.0, 3.0, -5.0]], [[-1.0, -3.0, 0.0], [5.0, -7.0, -6.0]]], [[[-6.0, -5.0, -5.0], [7.0, 1.0, 2.0]], [[2.0, 
+-3.0, -7.0], [5.0, 6.0, 5.0]]], [[[1.0, -2.0, 3.0], [6.0, -7.0, -6.0]], [[-4.0, -7.0, 3.0], [-5.0, 0.0, -6.0]]], [[[3.0, 2.0, 
+4.0], [6.0, -3.0, -1.0]], [[5.0, -4.0, 4.0], [0.0, 4.0, -1.0]]], [[[2.0, 2.0, 4.0], [3.0, -3.0, 0.0]], [[1.0, 2.0, 0.0], [0.0, 
+2.0, -5.0]]]]))
+      arg1=numpy.array([[6.0, 0.0, 3.0], [5.0, 6.0, 4.0]])
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-21.0, -46.0], [33.0, 62.0]], [[33.0, 53.0], [-18.0, 21.0]]], [[[21.0, 28.0], [-15.0, -44.0]], 
+[[-3.0, -37.0], [3.0, 1.0]]], [[[-12.0, 32.0], [9.0, -12.0]], [[-45.0, -66.0], [-24.0, -38.0]]], [[[-12.0, -40.0], [12.0, 
+-2.0]], [[42.0, 32.0], [-36.0, 3.0]]], [[[-12.0, -28.0], [-24.0, 7.0]], [[-33.0, -44.0], [-3.0, 2.0]]], [[[21.0, 37.0], [-21.0, 
+2.0]], [[-18.0, -3.0], [-12.0, -19.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-6.0, 7.0], [-21.0, -31.0]], [[3.0, 40.0], [-54.0, -18.0]]], [[[0.0, 9.0], [21.0, 
+28.0]], [[-6.0, -23.0], [12.0, -41.0]]], [[[-51.0, -80.0], [48.0, 49.0]], [[-9.0, -36.0], [45.0, 81.0]]], [[[15.0, 5.0], [18.0, 
+-36.0]], [[-15.0, -50.0], [-48.0, -49.0]]], [[[30.0, 43.0], [33.0, 8.0]], [[42.0, 17.0], [-3.0, 20.0]]], [[[24.0, 38.0], [18.0, 
+-3.0]], [[6.0, 17.0], [-15.0, -8.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[5.0, -6.0], [6.0, -5.0]], [[-4.0, 0.0], [-4.0, 0.0]], [[-3.0, -4.0], [0.0, 3.0]], [[1.0, 3.0], 
+[-7.0, -7.0]], [[-5.0, -3.0], [4.0, -7.0]], [[7.0, -6.0], [-4.0, 5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-3.0, -1.0], [5.0, 6.0]], [[-5.0, -3.0], [-7.0, 7.0]], [[0.0, -5.0], [-6.0, 7.0]], 
+[[5.0, 3.0], [7.0, -5.0]], [[-6.0, 4.0], [-1.0, -3.0]], [[0.0, -6.0], [2.0, 4.0]]]))
+      arg1=Data(6.0,self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[30.0, -36.0], [36.0, -30.0]], [[-24.0, 0.0], [-24.0, 0.0]], [[-18.0, -24.0], [0.0, 18.0]], [[6.0, 
+18.0], [-42.0, -42.0]], [[-30.0, -18.0], [24.0, -42.0]], [[42.0, -36.0], [-24.0, 30.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-18.0, -6.0], [30.0, 36.0]], [[-30.0, -18.0], [-42.0, 42.0]], [[0.0, -30.0], [-36.0, 
+42.0]], [[30.0, 18.0], [42.0, -30.0]], [[-36.0, 24.0], [-6.0, -18.0]], [[0.0, -36.0], [12.0, 24.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 7.0, 3.0], [3.0, -1.0, 4.0]], [[-6.0, -5.0, 5.0], [3.0, 0.0, 1.0]]], [[[0.0, -3.0, -7.0], 
+[3.0, 1.0, 5.0]], [[-2.0, 7.0, 3.0], [-6.0, -6.0, -2.0]]], [[[5.0, 2.0, 5.0], [-6.0, 5.0, -7.0]], [[-4.0, -6.0, 5.0], [-7.0, 
+2.0, 6.0]]], [[[6.0, -2.0, 4.0], [7.0, 7.0, -2.0]], [[6.0, 5.0, 3.0], [6.0, -4.0, -4.0]]], [[[2.0, -2.0, 6.0], [5.0, -5.0, 
+6.0]], [[5.0, -4.0, 4.0], [-1.0, 7.0, 1.0]]], [[[-4.0, 3.0, 0.0], [4.0, 0.0, 0.0]], [[-7.0, 3.0, -6.0], [-4.0, -7.0, 
+0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[5.0, -5.0, -6.0], [-7.0, 7.0, -4.0]], [[-1.0, 5.0, 0.0], [-3.0, 7.0, 3.0]]], 
+[[[6.0, 2.0, 4.0], [2.0, -6.0, 0.0]], [[-2.0, 2.0, 2.0], [-2.0, 0.0, -3.0]]], [[[5.0, 7.0, 6.0], [3.0, 4.0, -5.0]], [[4.0, 
+-3.0, -6.0], [0.0, -4.0, 4.0]]], [[[0.0, 1.0, 6.0], [0.0, 0.0, 3.0]], [[1.0, 0.0, 2.0], [5.0, 5.0, 3.0]]], [[[5.0, -4.0, 1.0], 
+[4.0, 4.0, -2.0]], [[-7.0, 4.0, 5.0], [7.0, -6.0, -7.0]]], [[[-2.0, 3.0, 0.0], [1.0, -1.0, -3.0]], [[0.0, 3.0, 0.0], [-1.0, 
+4.0, 7.0]]]]))
+      arg1=Data(numpy.array([7.0, 3.0, -4.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[9.0, 2.0], [-77.0, 17.0]], [[19.0, 4.0], [-5.0, -52.0]], [[21.0, 1.0], [-66.0, -67.0]], [[20.0, 
+78.0], [45.0, 46.0]], [[-16.0, -4.0], [7.0, 10.0]], [[-19.0, 28.0], [-16.0, -49.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[44.0, -12.0], [8.0, -12.0]], [[32.0, -4.0], [-16.0, -2.0]], [[32.0, 53.0], [43.0, 
+-28.0]], [[-21.0, -12.0], [-1.0, 38.0]], [[19.0, 48.0], [-57.0, 59.0]], [[-5.0, 16.0], [9.0, -23.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_constData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-4.0, 4.0], [-2.0, -5.0]], [[3.0, -5.0], [1.0, -6.0]], [[-5.0, 5.0], [0.0, 0.0]], [[-1.0, 6.0], 
+[6.0, -6.0]], [[-4.0, 3.0], [-7.0, 1.0]], [[4.0, 6.0], [1.0, 3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 0.0], [2.0, 0.0]], [[0.0, 1.0], [-6.0, 0.0]], [[2.0, -1.0], [7.0, 7.0]], 
+[[5.0, -3.0], [3.0, 3.0]], [[3.0, -5.0], [2.0, 7.0]], [[-2.0, 0.0], [0.0, -3.0]]]))
+      arg1=Data(numpy.array([2.0, 0.0]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-8.0, 0.0], [8.0, 0.0]], [[-4.0, 0.0], [-10.0, 0.0]]], [[[6.0, 0.0], [-10.0, 0.0]], [[2.0, 0.0], 
+[-12.0, 0.0]]], [[[-10.0, 0.0], [10.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]], [[[-2.0, 0.0], [12.0, 0.0]], [[12.0, 0.0], [-12.0, 
+0.0]]], [[[-8.0, 0.0], [6.0, 0.0]], [[-14.0, 0.0], [2.0, 0.0]]], [[[8.0, 0.0], [12.0, 0.0]], [[2.0, 0.0], [6.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-12.0, 0.0], [0.0, 0.0]], [[4.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [2.0, 0.0]], 
+[[-12.0, 0.0], [0.0, 0.0]]], [[[4.0, 0.0], [-2.0, 0.0]], [[14.0, 0.0], [14.0, 0.0]]], [[[10.0, 0.0], [-6.0, 0.0]], [[6.0, 0.0], 
+[6.0, 0.0]]], [[[6.0, 0.0], [-10.0, 0.0]], [[4.0, 0.0], [14.0, 0.0]]], [[[-4.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [-6.0, 0.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-3.0, 4.0, 3.0], [-7.0, 1.0, 2.0]], [[2.0, 1.0, 5.0], [-7.0, 0.0, 7.0]]], [[[2.0, -7.0, 0.0], 
+[7.0, 4.0, -2.0]], [[4.0, -4.0, 1.0], [0.0, -2.0, -1.0]]], [[[-6.0, 5.0, -7.0], [1.0, -6.0, 6.0]], [[0.0, -2.0, 5.0], [-7.0, 
+6.0, -3.0]]], [[[2.0, -4.0, -4.0], [2.0, 0.0, 6.0]], [[0.0, -5.0, 0.0], [6.0, -5.0, 0.0]]], [[[1.0, -7.0, 2.0], [5.0, -3.0, 
+-4.0]], [[-6.0, 7.0, -5.0], [-6.0, -7.0, -5.0]]], [[[1.0, 3.0, 0.0], [-1.0, 0.0, 4.0]], [[-7.0, 5.0, 1.0], [2.0, -3.0, 
+-1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-7.0, 0.0, 7.0], [-7.0, 1.0, -4.0]], [[-6.0, -7.0, 1.0], [1.0, -7.0, 5.0]]], 
+[[[6.0, 3.0, -5.0], [2.0, -5.0, 4.0]], [[7.0, 3.0, 1.0], [7.0, -4.0, 4.0]]], [[[-3.0, 0.0, -4.0], [-4.0, -3.0, -3.0]], [[1.0, 
+0.0, 0.0], [-1.0, 7.0, 5.0]]], [[[0.0, 0.0, 2.0], [0.0, -4.0, 2.0]], [[0.0, 2.0, -6.0], [-7.0, -5.0, 2.0]]], [[[1.0, -5.0, 
+0.0], [4.0, -2.0, 1.0]], [[5.0, 0.0, -2.0], [-5.0, 4.0, 3.0]]], [[[7.0, 2.0, -1.0], [1.0, 4.0, 0.0]], [[-6.0, -1.0, 7.0], 
+[-1.0, -2.0, -7.0]]]]))
+      arg1=Data(numpy.array([[-7.0, 5.0, -1.0], [1.0, 0.0, 3.0]]),self.functionspace)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[38.0, 6.0], [52.0, -1.0]], [[-14.0, 17.0], [42.0, 14.0]]], [[[-49.0, 2.0], [-27.0, 1.0]], 
+[[-49.0, 7.0], [-9.0, -3.0]]], [[[74.0, -27.0], [-43.0, 19.0]], [[-15.0, 15.0], [82.0, -16.0]]], [[[-30.0, -10.0], [-20.0, 
+20.0]], [[-25.0, 0.0], [-67.0, 6.0]]], [[[-44.0, 7.0], [-46.0, -7.0]], [[82.0, -21.0], [12.0, -21.0]]], [[[8.0, 1.0], [3.0, 
+11.0]], [[73.0, -4.0], [-28.0, -1.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[42.0, 14.0], [58.0, -19.0]], [[6.0, -3.0], [-47.0, 16.0]]], [[[-22.0, -9.0], [-43.0, 
+14.0]], [[-35.0, 10.0], [-73.0, 19.0]]], [[[25.0, -15.0], [16.0, -13.0]], [[-7.0, 1.0], [37.0, 14.0]]], [[[-2.0, 6.0], [-22.0, 
+6.0]], [[16.0, -18.0], [22.0, -1.0]]], [[[-32.0, 1.0], [-39.0, 7.0]], [[-33.0, -1.0], [52.0, 4.0]]], [[[-38.0, 4.0], [13.0, 
+1.0]], [[30.0, 15.0], [4.0, -22.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[7.0, 0.0], [-4.0, -3.0]], [[5.0, -6.0], [-6.0, -7.0]], [[0.0, 0.0], [-5.0, 1.0]], [[6.0, -2.0], 
+[4.0, 6.0]], [[-1.0, -6.0], [3.0, -1.0]], [[-4.0, -6.0], [4.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 7.0], [0.0, 6.0]], [[-6.0, 2.0], [-1.0, -3.0]], [[3.0, -7.0], [-7.0, -2.0]], 
+[[-5.0, -3.0], [-5.0, 0.0]], [[3.0, -3.0], [-6.0, -3.0]], [[4.0, -1.0], [0.0, 0.0]]]))
+      arg1=Data(-4.0,self.functionspace)
+      arg1.setTaggedValue(1,-5.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[-28.0, -0.0], [16.0, 12.0]], [[-20.0, 24.0], [24.0, 28.0]], [[-0.0, -0.0], [20.0, -4.0]], 
+[[-24.0, 8.0], [-16.0, -24.0]], [[4.0, 24.0], [-12.0, 4.0]], [[16.0, 24.0], [-16.0, -24.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-30.0, -35.0], [-0.0, -30.0]], [[30.0, -10.0], [5.0, 15.0]], [[-15.0, 35.0], [35.0, 
+10.0]], [[25.0, 15.0], [25.0, -0.0]], [[-15.0, 15.0], [30.0, 15.0]], [[-20.0, 5.0], [-0.0, -0.0]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-2.0, 4.0, 5.0], [3.0, 7.0, 6.0]], [[4.0, 3.0, 7.0], [0.0, -7.0, -6.0]]], [[[1.0, -6.0, -3.0], 
+[-1.0, 0.0, 0.0]], [[-4.0, -1.0, -2.0], [-5.0, -7.0, 3.0]]], [[[2.0, 3.0, 2.0], [4.0, 3.0, 4.0]], [[4.0, 0.0, 3.0], [-7.0, 0.0, 
+-7.0]]], [[[6.0, 2.0, 1.0], [3.0, -6.0, -4.0]], [[-7.0, -7.0, 0.0], [-4.0, 7.0, 0.0]]], [[[-4.0, 0.0, -7.0], [4.0, 2.0, -2.0]], 
+[[-5.0, -5.0, 5.0], [-5.0, 4.0, -2.0]]], [[[7.0, 4.0, 4.0], [5.0, -4.0, 6.0]], [[0.0, -4.0, 1.0], [0.0, -6.0, 
+1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[0.0, 4.0, 7.0], [1.0, 0.0, -4.0]], [[-3.0, 1.0, 1.0], [-4.0, -5.0, 7.0]]], [[[6.0, 
+-2.0, -6.0], [7.0, 6.0, 0.0]], [[-5.0, 0.0, 7.0], [-2.0, -7.0, -2.0]]], [[[5.0, 0.0, -3.0], [0.0, -4.0, 4.0]], [[-7.0, -4.0, 
+7.0], [-7.0, 7.0, 1.0]]], [[[7.0, 4.0, -6.0], [-4.0, 7.0, 1.0]], [[-5.0, 0.0, 5.0], [7.0, -2.0, -7.0]]], [[[3.0, -5.0, 2.0], 
+[6.0, -6.0, 0.0]], [[0.0, -7.0, -4.0], [4.0, 7.0, 4.0]]], [[[5.0, -2.0, -2.0], [6.0, -2.0, 4.0]], [[6.0, -4.0, 7.0], [-1.0, 
+7.0, 4.0]]]]))
+      arg1=Data(numpy.array([-7.0, 1.0, 3.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([3.0, -3.0, 1.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[33.0, 4.0], [-4.0, -25.0]], [[-22.0, 7.0], [21.0, 37.0]], [[-5.0, -13.0], [-19.0, 28.0]], 
+[[-37.0, -39.0], [42.0, 35.0]], [[7.0, -32.0], [45.0, 33.0]], [[-33.0, -21.0], [-1.0, -3.0]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[-5.0, -1.0], [-11.0, 10.0]], [[18.0, 3.0], [-8.0, 13.0]], [[12.0, 16.0], [-2.0, 
+-41.0]], [[3.0, -32.0], [-10.0, 20.0]], [[26.0, 36.0], [17.0, -5.0]], [[19.0, 28.0], [37.0, -20.0]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-2.0, 3.0, 6.0, 0.0, 6.0], [5.0, -1.0, 6.0, -3.0, 4.0], [-7.0, -7.0, 1.0, 3.0, 3.0], [6.0, 
--2.0, 6.0, 1.0, -2.0]])+(1.-msk_arg0)*numpy.array([[-2.0, 0.0, -7.0, -7.0, -1.0], [6.0, 2.0, -1.0, -3.0, 6.0], [4.0, -1.0, 0.0, 
-3.0, 6.0], [-1.0, 1.0, 3.0, 5.0, 4.0]])
-      arg1=Data(numpy.array([5.0, 3.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-2.0, 6.0], [-6.0, 0.0]], [[0.0, -7.0], [5.0, -1.0]], [[6.0, -5.0], [6.0, 0.0]], [[-1.0, -7.0], 
+[5.0, -3.0]], [[2.0, -4.0], [5.0, 5.0]], [[7.0, 7.0], [-1.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[4.0, 3.0], [-6.0, 4.0]], [[-6.0, -2.0], [4.0, -1.0]], [[-6.0, -2.0], [-2.0, 0.0]], 
+[[0.0, 0.0], [-3.0, 5.0]], [[0.0, -4.0], [-1.0, 5.0]], [[-2.0, -1.0], [0.0, 3.0]]]))
+      arg1=Data(numpy.array([6.0, 0.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, 6.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-10.0, -6.0], [15.0, 9.0], [30.0, 18.0], [0.0, 0.0], [30.0, 18.0]], [[25.0, 15.0], [-5.0, 
--3.0], [30.0, 18.0], [-15.0, -9.0], [20.0, 12.0]], [[-35.0, -21.0], [-35.0, -21.0], [5.0, 3.0], [15.0, 9.0], [15.0, 9.0]], 
-[[30.0, 18.0], [-10.0, -6.0], [30.0, 18.0], [5.0, 3.0], [-10.0, -6.0]]])+(1.-msk_ref)*numpy.array([[[-10.0, -6.0], [0.0, 0.0], 
-[-35.0, -21.0], [-35.0, -21.0], [-5.0, -3.0]], [[30.0, 18.0], [10.0, 6.0], [-5.0, -3.0], [-15.0, -9.0], [30.0, 18.0]], [[20.0, 
-12.0], [-5.0, -3.0], [0.0, 0.0], [15.0, 9.0], [30.0, 18.0]], [[-5.0, -3.0], [5.0, 3.0], [15.0, 9.0], [25.0, 15.0], [20.0, 
-12.0]]])
+      ref=Data(numpy.array([[[[-12.0, 0.0], [36.0, 0.0]], [[-36.0, 0.0], [0.0, 0.0]]], [[[0.0, 0.0], [-42.0, 0.0]], [[30.0, 
+0.0], [-6.0, 0.0]]], [[[36.0, 0.0], [-30.0, 0.0]], [[36.0, 0.0], [0.0, 0.0]]], [[[-6.0, 0.0], [-42.0, 0.0]], [[30.0, 0.0], 
+[-18.0, 0.0]]], [[[12.0, 0.0], [-24.0, 0.0]], [[30.0, 0.0], [30.0, 0.0]]], [[[42.0, 0.0], [42.0, 0.0]], [[-6.0, 0.0], [6.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[8.0, 24.0], [6.0, 18.0]], [[-12.0, -36.0], [8.0, 24.0]]], [[[-12.0, -36.0], [-4.0, 
+-12.0]], [[8.0, 24.0], [-2.0, -6.0]]], [[[-12.0, -36.0], [-4.0, -12.0]], [[-4.0, -12.0], [0.0, 0.0]]], [[[0.0, 0.0], [0.0, 
+0.0]], [[-6.0, -18.0], [10.0, 30.0]]], [[[0.0, 0.0], [-8.0, -24.0]], [[-2.0, -6.0], [10.0, 30.0]]], [[[-4.0, -12.0], [-2.0, 
+-6.0]], [[0.0, 0.0], [6.0, 18.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, 2.0, -2.0], [-3.0, -6.0, -1.0], [-6.0, 6.0, -3.0], [0.0, -1.0, 0.0], [-7.0, 1.0, 
--1.0]], [[-3.0, 6.0, -6.0], [2.0, 5.0, -1.0], [-2.0, 5.0, -7.0], [0.0, 0.0, 3.0], [-3.0, 3.0, -6.0]], [[-1.0, 2.0, 4.0], [-6.0, 
-0.0, -4.0], [3.0, -7.0, 2.0], [-5.0, 2.0, -4.0], [0.0, 0.0, -1.0]], [[-2.0, 0.0, -1.0], [-5.0, -4.0, 7.0], [0.0, 5.0, 0.0], 
-[-4.0, -2.0, 0.0], [3.0, 6.0, 0.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -1.0, -1.0], [4.0, 3.0, -1.0], [-4.0, -2.0, -1.0], 
-[-6.0, -5.0, 1.0], [7.0, -3.0, 1.0]], [[2.0, 0.0, 0.0], [0.0, 0.0, 7.0], [0.0, -6.0, 2.0], [-5.0, -3.0, 0.0], [-4.0, 6.0, 
--2.0]], [[-3.0, 1.0, 0.0], [3.0, -1.0, -6.0], [3.0, 2.0, -6.0], [-7.0, 5.0, -1.0], [6.0, 1.0, 1.0]], [[-4.0, -4.0, 2.0], [-4.0, 
--3.0, -7.0], [-6.0, -5.0, -6.0], [6.0, 5.0, 4.0], [-2.0, 1.0, 0.0]]])
-      arg1=Data(numpy.array([[3.0, 2.0, 4.0], [-6.0, -4.0, 3.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[0.0, 4.0, 2.0], [5.0, 3.0, 2.0]], [[-5.0, 6.0, 7.0], [-6.0, 2.0, -5.0]]], [[[5.0, -4.0, 5.0], 
+[-7.0, 7.0, 3.0]], [[0.0, 3.0, -5.0], [3.0, -6.0, -4.0]]], [[[-5.0, 7.0, -3.0], [3.0, 6.0, -2.0]], [[-7.0, -6.0, 3.0], [2.0, 
+-4.0, -6.0]]], [[[4.0, 3.0, -7.0], [-4.0, 6.0, -6.0]], [[3.0, -4.0, 7.0], [3.0, 5.0, -6.0]]], [[[-2.0, 0.0, -7.0], [-6.0, -2.0, 
+-6.0]], [[7.0, 0.0, 7.0], [4.0, -2.0, 7.0]]], [[[-6.0, 1.0, 7.0], [0.0, 3.0, -5.0]], [[5.0, -2.0, -5.0], [3.0, 5.0, 
+-7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, -1.0, 5.0], [-1.0, -2.0, -6.0]], [[-6.0, 2.0, -1.0], [0.0, -4.0, 5.0]]], 
+[[[1.0, -6.0, 2.0], [7.0, -5.0, -3.0]], [[4.0, 0.0, 1.0], [7.0, 5.0, 1.0]]], [[[7.0, -3.0, -7.0], [-4.0, 7.0, -7.0]], [[-7.0, 
+6.0, 7.0], [-5.0, -3.0, 0.0]]], [[[-1.0, -4.0, -1.0], [-3.0, 0.0, -2.0]], [[7.0, -7.0, 6.0], [3.0, -6.0, -7.0]]], [[[-3.0, 2.0, 
+-6.0], [-6.0, 3.0, -3.0]], [[6.0, 2.0, -2.0], [6.0, 0.0, -4.0]]], [[[-7.0, 1.0, -7.0], [-4.0, 0.0, 2.0]], [[-1.0, 5.0, 3.0], 
+[7.0, -4.0, 1.0]]]]))
+      arg1=Data(numpy.array([[5.0, -2.0, -5.0], [1.0, 5.0, -7.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-5.0, -2.0, 2.0], [-2.0, 1.0, 3.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      ref=Data(numpy.array([[[[-18.0, 6.0], [9.0, 6.0]], [[-72.0, -24.0], [-9.0, 39.0]]], [[[8.0, -50.0], [-64.0, 7.0]], 
+[[19.0, 50.0], [47.0, 1.0]]], [[[-24.0, 51.0], [13.0, 47.0]], [[-38.0, -58.0], [48.0, 24.0]]], [[[49.0, 68.0], [-2.0, 68.0]], 
+[[-12.0, -66.0], [35.0, 70.0]]], [[[25.0, 47.0], [4.0, 26.0]], [[0.0, -42.0], [-11.0, -55.0]]], [[[-67.0, -50.0], [19.0, 
+50.0]], [[54.0, 30.0], [40.0, 77.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[37.0, 24.0], [-3.0, -18.0]], [[24.0, 11.0], [18.0, 11.0]]], [[[11.0, -2.0], [-31.0, 
+-28.0]], [[-18.0, -5.0], [-43.0, -6.0]]], [[[-43.0, -38.0], [-8.0, -6.0]], [[37.0, 41.0], [31.0, 7.0]]], [[[11.0, -5.0], [11.0, 
+0.0]], [[-9.0, -3.0], [-17.0, -33.0]]], [[[-1.0, -10.0], [18.0, 6.0]], [[-38.0, -16.0], [-38.0, -24.0]]], [[[19.0, -6.0], 
+[24.0, 14.0]], [[1.0, 16.0], [-25.0, -15.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[-6.0, 6.0], [-6.0, 5.0]], [[-2.0, -7.0], [-1.0, 7.0]], [[1.0, 2.0], [4.0, 0.0]], [[-5.0, 1.0], 
+[-1.0, 1.0]], [[-7.0, -5.0], [-7.0, 1.0]], [[0.0, -7.0], [6.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, -1.0], [7.0, -7.0]], [[7.0, 7.0], [5.0, 1.0]], [[-4.0, -5.0], [5.0, 7.0]], 
+[[-4.0, -7.0], [-6.0, 2.0]], [[-3.0, -4.0], [7.0, 5.0]], [[-1.0, 3.0], [7.0, 4.0]]]))
+      arg1=Data(-6.0,self.functionspace)
+      arg1.setTaggedValue(1,3.0)
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-25.0, 28.0], [-25.0, 39.0], [-18.0, 3.0], [-2.0, 4.0], [-23.0, 35.0]], [[-21.0, -24.0], 
-[12.0, -35.0], [-24.0, -29.0], [12.0, 9.0], [-27.0, -12.0]], [[17.0, 10.0], [-34.0, 24.0], [3.0, 16.0], [-27.0, 10.0], [-4.0, 
--3.0]], [[-10.0, 9.0], [5.0, 67.0], [10.0, -20.0], [-16.0, 32.0], [21.0, -42.0]]])+(1.-msk_ref)*numpy.array([[[0.0, -11.0], 
-[14.0, -39.0], [-20.0, 29.0], [-24.0, 59.0], [19.0, -27.0]], [[6.0, -12.0], [28.0, 21.0], [-4.0, 30.0], [-21.0, 42.0], [-8.0, 
--6.0]], [[-7.0, 14.0], [-17.0, -32.0], [-11.0, -44.0], [-15.0, 19.0], [24.0, -37.0]], [[-12.0, 46.0], [-46.0, 15.0], [-52.0, 
-38.0], [44.0, -44.0], [-4.0, 8.0]]])
+      ref=msk_ref*numpy.array([[[36.0, -36.0], [36.0, -30.0]], [[12.0, 42.0], [6.0, -42.0]], [[-6.0, -12.0], [-24.0, -0.0]], 
+[[30.0, -6.0], [6.0, -6.0]], [[42.0, 30.0], [42.0, -6.0]], [[-0.0, 42.0], [-36.0, 36.0]]])+(1.-msk_ref)*numpy.array([[[-3.0, 
+-3.0], [21.0, -21.0]], [[21.0, 21.0], [15.0, 3.0]], [[-12.0, -15.0], [15.0, 21.0]], [[-12.0, -21.0], [-18.0, 6.0]], [[-9.0, 
+-12.0], [21.0, 15.0]], [[-3.0, 9.0], [21.0, 12.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[4.0, 0.0, -5.0], [-3.0, 0.0, 0.0]], [[-3.0, 4.0, -7.0], [-6.0, -5.0, 4.0]], [[-5.0, -7.0, 
--7.0], [3.0, -6.0, -3.0]], [[3.0, -1.0, 0.0], [-6.0, -5.0, -1.0]], [[1.0, 2.0, -7.0], [-1.0, -6.0, 4.0]]], [[[5.0, -3.0, -2.0], 
-[0.0, 0.0, -2.0]], [[0.0, -5.0, 1.0], [-2.0, -6.0, 1.0]], [[2.0, -4.0, -4.0], [-5.0, -4.0, 7.0]], [[1.0, 0.0, 6.0], [7.0, -1.0, 
--5.0]], [[-7.0, 5.0, -6.0], [7.0, -6.0, 7.0]]], [[[0.0, -6.0, 4.0], [0.0, 1.0, 1.0]], [[-5.0, -5.0, -3.0], [-2.0, 0.0, 0.0]], 
-[[-3.0, -6.0, -7.0], [3.0, 3.0, -6.0]], [[0.0, -5.0, 1.0], [-4.0, -3.0, 4.0]], [[6.0, 4.0, -4.0], [-6.0, -6.0, 5.0]]], [[[-5.0, 
-2.0, -7.0], [4.0, 0.0, -5.0]], [[7.0, -1.0, 5.0], [-4.0, -2.0, 2.0]], [[5.0, 0.0, 4.0], [-4.0, 0.0, -6.0]], [[1.0, -1.0, 7.0], 
-[-7.0, -7.0, 2.0]], [[6.0, -3.0, 0.0], [-1.0, 2.0, 3.0]]]])+(1.-msk_arg0)*numpy.array([[[[5.0, 3.0, 0.0], [5.0, 1.0, 3.0]], 
-[[4.0, -3.0, 7.0], [5.0, 5.0, 7.0]], [[6.0, -1.0, 7.0], [-1.0, -2.0, 7.0]], [[-2.0, -7.0, 2.0], [-3.0, -5.0, -2.0]], [[6.0, 
-5.0, 2.0], [-1.0, 7.0, 1.0]]], [[[-6.0, 7.0, 6.0], [-6.0, 6.0, -5.0]], [[1.0, -5.0, 1.0], [-5.0, 0.0, -1.0]], [[3.0, 1.0, 7.0], 
-[5.0, 0.0, 1.0]], [[0.0, -4.0, -3.0], [5.0, 5.0, 7.0]], [[-5.0, -5.0, 3.0], [-1.0, -2.0, -6.0]]], [[[3.0, -4.0, -4.0], [0.0, 
-3.0, 5.0]], [[0.0, 5.0, 3.0], [-3.0, -7.0, -7.0]], [[-3.0, 5.0, -3.0], [7.0, -2.0, 4.0]], [[-2.0, 1.0, 0.0], [7.0, 1.0, 7.0]], 
-[[-7.0, 3.0, 0.0], [5.0, -1.0, -5.0]]], [[[3.0, 0.0, 2.0], [-1.0, -6.0, -5.0]], [[-7.0, 5.0, 0.0], [0.0, 0.0, -4.0]], [[-1.0, 
--6.0, 3.0], [4.0, -3.0, -4.0]], [[4.0, -7.0, -3.0], [5.0, -2.0, 5.0]], [[-2.0, 0.0, 4.0], [5.0, -5.0, 4.0]]]])
-      arg1=Data(numpy.array([[[6.0, 0.0, 2.0], [-1.0, 0.0, 6.0]], [[1.0, -2.0, 5.0], [1.0, 5.0, 3.0]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-1.0, -2.0, 0.0], [4.0, -5.0, -2.0]], [[-7.0, 2.0, 0.0], [4.0, -2.0, -3.0]]], [[[2.0, -6.0, 
+7.0], [-7.0, 2.0, -4.0]], [[-2.0, -3.0, 2.0], [-4.0, 4.0, 6.0]]], [[[1.0, 0.0, 0.0], [6.0, 0.0, 7.0]], [[-4.0, 4.0, 0.0], [0.0, 
+-1.0, -2.0]]], [[[1.0, -3.0, 3.0], [-4.0, 0.0, -2.0]], [[-3.0, 0.0, 3.0], [0.0, -5.0, 4.0]]], [[[-4.0, 1.0, -2.0], [-7.0, 5.0, 
+3.0]], [[3.0, -2.0, -6.0], [0.0, 5.0, 4.0]]], [[[-4.0, -1.0, 3.0], [1.0, -3.0, -6.0]], [[1.0, -2.0, 0.0], [2.0, 1.0, 
+-3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, 7.0, -4.0], [0.0, 0.0, -6.0]], [[0.0, -5.0, 5.0], [6.0, -5.0, -6.0]]], 
+[[[5.0, 4.0, -3.0], [-2.0, 0.0, 3.0]], [[5.0, 5.0, 3.0], [-7.0, -4.0, -2.0]]], [[[-5.0, 2.0, -1.0], [-1.0, 3.0, -1.0]], [[2.0, 
+1.0, -5.0], [-5.0, -6.0, -3.0]]], [[[1.0, 2.0, -6.0], [0.0, 0.0, -3.0]], [[6.0, -1.0, -1.0], [0.0, 1.0, -6.0]]], [[[4.0, 6.0, 
+2.0], [6.0, -2.0, 5.0]], [[-5.0, -7.0, 5.0], [6.0, -3.0, -5.0]]], [[[5.0, 3.0, -7.0], [2.0, 4.0, 0.0]], [[-6.0, -6.0, 0.0], 
+[3.0, -5.0, -4.0]]]]))
+      arg1=Data(numpy.array([5.0, -2.0, -5.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([1.0, -5.0, -1.0]))
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[17.0, -24.0], [-2.0, -65.0], [-65.0, -62.0], [18.0, -29.0], [17.0, -57.0]], [[14.0, -5.0], 
-[10.0, -14.0], [51.0, -14.0], [-19.0, 18.0], [-19.0, -49.0]], [[14.0, 40.0], [-34.0, -12.0], [-71.0, -26.0], [30.0, 8.0], 
-[64.0, -43.0]], [[-78.0, -55.0], [68.0, 26.0], [6.0, 3.0], [39.0, 2.0], [55.0, 30.0]]])+(1.-msk_ref)*numpy.array([[[43.0, 
-18.0], [75.0, 96.0], [93.0, 53.0], [-17.0, -12.0], [47.0, 43.0]], [[-48.0, 19.0], [7.0, 8.0], [33.0, 44.0], [31.0, 44.0], 
-[-59.0, -9.0]], [[40.0, 21.0], [-33.0, -54.0], [-7.0, -19.0], [23.0, 29.0], [-77.0, -28.0]], [[-7.0, -33.0], [-66.0, -29.0], 
-[-28.0, 3.0], [43.0, 13.0], [15.0, 10.0]]])
+      ref=msk_ref*numpy.array([[[-1.0, 40.0], [-39.0, 39.0]], [[-13.0, -19.0], [-14.0, -58.0]], [[5.0, -5.0], [-28.0, 12.0]], 
+[[-4.0, -10.0], [-30.0, -10.0]], [[-12.0, -60.0], [49.0, -30.0]], [[-33.0, 41.0], [9.0, 
+23.0]]])+(1.-msk_ref)*numpy.array([[[-35.0, 6.0], [20.0, 37.0]], [[-12.0, -5.0], [-23.0, 15.0]], [[-14.0, -15.0], [2.0, 28.0]], 
+[[-3.0, 3.0], [12.0, 1.0]], [[-28.0, 11.0], [25.0, 26.0]], [[-3.0, -18.0], [24.0, 32.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_constData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[4.0, 0.0, 6.0, -6.0, 7.0], [6.0, 1.0, -4.0, 0.0, -3.0], [-2.0, 0.0, 3.0, -5.0, 6.0], [4.0, 
-0.0, -4.0, -4.0, 1.0]])+(1.-msk_arg0)*numpy.array([[6.0, 0.0, -6.0, -4.0, -2.0], [3.0, 7.0, -6.0, 3.0, -4.0], [1.0, -3.0, -3.0, 
-1.0, 7.0], [7.0, 3.0, -1.0, 7.0, 5.0]])
-      arg1=Data(numpy.array([[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 
-5.0, -3.0, 4.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank3_expandedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[0.0, 2.0], [-3.0, 2.0]], [[2.0, 0.0], [2.0, 6.0]], [[-1.0, 3.0], [-2.0, 0.0]], [[-7.0, -5.0], 
+[1.0, -6.0]], [[0.0, 2.0], [5.0, 0.0]], [[7.0, 5.0], [-1.0, -6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[1.0, -7.0], [5.0, 2.0]], [[6.0, 5.0], [0.0, 1.0]], [[-5.0, -7.0], [3.0, 7.0]], 
+[[-5.0, -4.0], [-5.0, -6.0]], [[6.0, -1.0], [-1.0, 3.0]], [[0.0, -5.0], [0.0, 4.0]]]))
+      arg1=Data(numpy.array([-5.0, -4.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -3.0]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[4.0, -28.0, 4.0, 24.0, 16.0], [-16.0, -20.0, 0.0, -28.0, 4.0], [16.0, -8.0, -16.0, 0.0, 
-28.0], [28.0, 28.0, 20.0, -12.0, 16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[6.0, -42.0, 6.0, 36.0, 24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], [24.0, -12.0, -24.0, 0.0, 42.0], 
-[42.0, 42.0, 30.0, -18.0, 24.0]], [[-6.0, 42.0, -6.0, -36.0, -24.0], [24.0, 30.0, 0.0, 42.0, -6.0], [-24.0, 12.0, 24.0, 0.0, 
--42.0], [-42.0, -42.0, -30.0, 18.0, -24.0]], [[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, 
--28.0, 0.0, 49.0], [49.0, 49.0, 35.0, -21.0, 28.0]]], [[[6.0, -42.0, 6.0, 36.0, 24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], [24.0, 
--12.0, -24.0, 0.0, 42.0], [42.0, 42.0, 30.0, -18.0, 24.0]], [[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, 
--2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 5.0, -3.0, 4.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, -4.0], [-16.0, 
-8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-3.0, 21.0, -3.0, -18.0, -12.0], [12.0, 15.0, 0.0, 21.0, -3.0], [-12.0, 6.0, 
-12.0, 0.0, -21.0], [-21.0, -21.0, -15.0, 9.0, -12.0]]], [[[-2.0, 14.0, -2.0, -12.0, -8.0], [8.0, 10.0, 0.0, 14.0, -2.0], [-8.0, 
-4.0, 8.0, 0.0, -14.0], [-14.0, -14.0, -10.0, 6.0, -8.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
-0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[3.0, -21.0, 3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, 
--12.0, 0.0, 21.0], [21.0, 21.0, 15.0, -9.0, 12.0]], [[-5.0, 35.0, -5.0, -30.0, -20.0], [20.0, 25.0, 0.0, 35.0, -5.0], [-20.0, 
-10.0, 20.0, 0.0, -35.0], [-35.0, -35.0, -25.0, 15.0, -20.0]], [[6.0, -42.0, 6.0, 36.0, 24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], 
-[24.0, -12.0, -24.0, 0.0, 42.0], [42.0, 42.0, 30.0, -18.0, 24.0]]], [[[4.0, -28.0, 4.0, 24.0, 16.0], [-16.0, -20.0, 0.0, -28.0, 
-4.0], [16.0, -8.0, -16.0, 0.0, 28.0], [28.0, 28.0, 20.0, -12.0, 16.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, -4.0], 
-[-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, 
--4.0], [-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, 
--7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 5.0, -3.0, 4.0]]]])+(1.-msk_ref)*numpy.array([[[[6.0, -42.0, 6.0, 36.0, 
-24.0], [-24.0, -30.0, 0.0, -42.0, 6.0], [24.0, -12.0, -24.0, 0.0, 42.0], [42.0, 42.0, 30.0, -18.0, 24.0]], [[0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-6.0, 42.0, -6.0, -36.0, -24.0], 
-[24.0, 30.0, 0.0, 42.0, -6.0], [-24.0, 12.0, 24.0, 0.0, -42.0], [-42.0, -42.0, -30.0, 18.0, -24.0]], [[-4.0, 28.0, -4.0, -24.0, 
--16.0], [16.0, 20.0, 0.0, 28.0, -4.0], [-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, -20.0, 12.0, -16.0]], [[-2.0, 14.0, -2.0, 
--12.0, -8.0], [8.0, 10.0, 0.0, 14.0, -2.0], [-8.0, 4.0, 8.0, 0.0, -14.0], [-14.0, -14.0, -10.0, 6.0, -8.0]]], [[[3.0, -21.0, 
-3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, -12.0, 0.0, 21.0], [21.0, 21.0, 15.0, -9.0, 12.0]], [[7.0, 
--49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 0.0, 49.0], [49.0, 49.0, 35.0, -21.0, 28.0]], 
-[[-6.0, 42.0, -6.0, -36.0, -24.0], [24.0, 30.0, 0.0, 42.0, -6.0], [-24.0, 12.0, 24.0, 0.0, -42.0], [-42.0, -42.0, -30.0, 18.0, 
--24.0]], [[3.0, -21.0, 3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, -12.0, 0.0, 21.0], [21.0, 21.0, 15.0, 
--9.0, 12.0]], [[-4.0, 28.0, -4.0, -24.0, -16.0], [16.0, 20.0, 0.0, 28.0, -4.0], [-16.0, 8.0, 16.0, 0.0, -28.0], [-28.0, -28.0, 
--20.0, 12.0, -16.0]]], [[[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 5.0, 
--3.0, 4.0]], [[-3.0, 21.0, -3.0, -18.0, -12.0], [12.0, 15.0, 0.0, 21.0, -3.0], [-12.0, 6.0, 12.0, 0.0, -21.0], [-21.0, -21.0, 
--15.0, 9.0, -12.0]], [[-3.0, 21.0, -3.0, -18.0, -12.0], [12.0, 15.0, 0.0, 21.0, -3.0], [-12.0, 6.0, 12.0, 0.0, -21.0], [-21.0, 
--21.0, -15.0, 9.0, -12.0]], [[1.0, -7.0, 1.0, 6.0, 4.0], [-4.0, -5.0, 0.0, -7.0, 1.0], [4.0, -2.0, -4.0, 0.0, 7.0], [7.0, 7.0, 
-5.0, -3.0, 4.0]], [[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 0.0, 49.0], [49.0, 
-49.0, 35.0, -21.0, 28.0]]], [[[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 0.0, 49.0], 
-[49.0, 49.0, 35.0, -21.0, 28.0]], [[3.0, -21.0, 3.0, 18.0, 12.0], [-12.0, -15.0, 0.0, -21.0, 3.0], [12.0, -6.0, -12.0, 0.0, 
-21.0], [21.0, 21.0, 15.0, -9.0, 12.0]], [[-1.0, 7.0, -1.0, -6.0, -4.0], [4.0, 5.0, 0.0, 7.0, -1.0], [-4.0, 2.0, 4.0, 0.0, 
--7.0], [-7.0, -7.0, -5.0, 3.0, -4.0]], [[7.0, -49.0, 7.0, 42.0, 28.0], [-28.0, -35.0, 0.0, -49.0, 7.0], [28.0, -14.0, -28.0, 
-0.0, 49.0], [49.0, 49.0, 35.0, -21.0, 28.0]], [[5.0, -35.0, 5.0, 30.0, 20.0], [-20.0, -25.0, 0.0, -35.0, 5.0], [20.0, -10.0, 
--20.0, 0.0, 35.0], [35.0, 35.0, 25.0, -15.0, 20.0]]]])
+      ref=msk_ref*numpy.array([[[[0.0, 0.0], [-10.0, -8.0]], [[15.0, 12.0], [-10.0, -8.0]]], [[[-10.0, -8.0], [0.0, 0.0]], 
+[[-10.0, -8.0], [-30.0, -24.0]]], [[[5.0, 4.0], [-15.0, -12.0]], [[10.0, 8.0], [0.0, 0.0]]], [[[35.0, 28.0], [25.0, 20.0]], 
+[[-5.0, -4.0], [30.0, 24.0]]], [[[0.0, 0.0], [-10.0, -8.0]], [[-25.0, -20.0], [0.0, 0.0]]], [[[-35.0, -28.0], [-25.0, -20.0]], 
+[[5.0, 4.0], [30.0, 24.0]]]])+(1.-msk_ref)*numpy.array([[[[2.0, -3.0], [-14.0, 21.0]], [[10.0, -15.0], [4.0, -6.0]]], [[[12.0, 
+-18.0], [10.0, -15.0]], [[0.0, 0.0], [2.0, -3.0]]], [[[-10.0, 15.0], [-14.0, 21.0]], [[6.0, -9.0], [14.0, -21.0]]], [[[-10.0, 
+15.0], [-8.0, 12.0]], [[-10.0, 15.0], [-12.0, 18.0]]], [[[12.0, -18.0], [-2.0, 3.0]], [[-2.0, 3.0], [6.0, -9.0]]], [[[0.0, 
+0.0], [-10.0, 15.0]], [[0.0, 0.0], [8.0, -12.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 1.0, 0.0], [1.0, -3.0, 0.0], [4.0, 0.0, 2.0], [0.0, 7.0, -5.0], [0.0, 2.0, -3.0]], 
-[[-5.0, -4.0, -6.0], [3.0, 4.0, 6.0], [3.0, 0.0, -1.0], [-3.0, -2.0, 5.0], [-1.0, -4.0, 0.0]], [[-2.0, -4.0, -2.0], [1.0, -4.0, 
--1.0], [-1.0, -2.0, 6.0], [6.0, 0.0, 5.0], [-7.0, -3.0, -3.0]], [[3.0, -2.0, -1.0], [0.0, 6.0, 0.0], [-4.0, -3.0, 0.0], [3.0, 
--7.0, 7.0], [2.0, -5.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[1.0, -1.0, -3.0], [4.0, -5.0, 5.0], [7.0, -2.0, 0.0], [4.0, -3.0, 
-7.0], [3.0, 4.0, -5.0]], [[4.0, 3.0, 0.0], [-5.0, -1.0, -2.0], [-7.0, -2.0, 6.0], [-4.0, 6.0, 5.0], [-5.0, 0.0, 5.0]], [[-2.0, 
--6.0, 4.0], [7.0, -2.0, -1.0], [6.0, 3.0, -2.0], [0.0, -5.0, 0.0], [3.0, 2.0, -4.0]], [[1.0, -3.0, 6.0], [6.0, -3.0, 0.0], 
-[0.0, -4.0, -5.0], [6.0, -3.0, -4.0], [6.0, 0.0, 5.0]]])
-      arg1=Data(numpy.array([[[-2.0, 3.0, 5.0], [-6.0, 5.0, 3.0], [6.0, -5.0, -7.0], [2.0, -4.0, 5.0], [4.0, 1.0, -2.0]], 
-[[-5.0, -7.0, 4.0], [0.0, 2.0, -3.0], [2.0, 0.0, 6.0], [4.0, 1.0, -3.0], [-6.0, 7.0, 5.0]], [[-7.0, 0.0, -2.0], [6.0, 5.0, 
-7.0], [2.0, -7.0, -5.0], [5.0, -5.0, -4.0], [-7.0, -6.0, 0.0]], [[-3.0, 6.0, 6.0], [5.0, 2.0, 0.0], [1.0, -1.0, 3.0], [7.0, 
-0.0, 2.0], [-7.0, -7.0, -3.0]]]),self.functionspace)
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-5.0, -3.0, 2.0], [6.0, 3.0, 7.0]], [[-2.0, 5.0, -7.0], [-4.0, 6.0, 0.0]]], [[[1.0, 6.0, 5.0], 
+[0.0, -1.0, -4.0]], [[-4.0, 1.0, -5.0], [-1.0, 0.0, -2.0]]], [[[1.0, -5.0, 3.0], [-6.0, -3.0, 2.0]], [[-1.0, 7.0, 4.0], [-7.0, 
+1.0, -2.0]]], [[[-1.0, -2.0, -7.0], [2.0, -5.0, 4.0]], [[6.0, 4.0, -1.0], [-4.0, 5.0, -5.0]]], [[[-3.0, -7.0, 2.0], [6.0, -2.0, 
+-2.0]], [[5.0, -5.0, -4.0], [-4.0, -1.0, 4.0]]], [[[-2.0, 1.0, 2.0], [6.0, 5.0, -2.0]], [[1.0, -2.0, 1.0], [-6.0, 5.0, 
+3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-4.0, -4.0, 7.0], [1.0, -3.0, -7.0]], [[-7.0, 3.0, -3.0], [-4.0, 4.0, 5.0]]], 
+[[[-4.0, 2.0, 4.0], [5.0, 4.0, -4.0]], [[0.0, -2.0, 4.0], [1.0, -7.0, 4.0]]], [[[0.0, 0.0, -3.0], [6.0, 4.0, 1.0]], [[1.0, 7.0, 
+-1.0], [-7.0, 3.0, 0.0]]], [[[-7.0, 4.0, 2.0], [-5.0, 1.0, 3.0]], [[3.0, 5.0, 0.0], [0.0, 6.0, -2.0]]], [[[5.0, 4.0, 4.0], 
+[2.0, 0.0, -6.0]], [[1.0, 2.0, 5.0], [-1.0, 4.0, -7.0]]], [[[3.0, -6.0, 7.0], [-4.0, 7.0, 3.0]], [[2.0, 0.0, 5.0], [-6.0, 1.0, 
+-7.0]]]]))
+      arg1=Data(numpy.array([[5.0, 0.0, -1.0], [3.0, -5.0, 5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[5.0, -1.0, -2.0], [-4.0, -2.0, 0.0]]))
+      arg1.expand()
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[3.0, 5.0, -5.0, -4.0, 1.0], [-7.0, 2.0, 0.0, 1.0, 7.0], [0.0, 5.0, -7.0, -5.0, -6.0], [6.0, 
-2.0, -1.0, 0.0, -7.0]], [[-11.0, -21.0, 21.0, 14.0, 1.0], [16.0, -6.0, 2.0, 1.0, -27.0], [-7.0, -9.0, 23.0, 20.0, 11.0], 
-[-21.0, -1.0, 4.0, 7.0, 14.0]], [[2.0, -18.0, 10.0, 18.0, 12.0], [-12.0, -6.0, 20.0, 10.0, -14.0], [-32.0, 38.0, -2.0, 12.0, 
--28.0], [0.0, 20.0, 10.0, 32.0, -34.0]], [[-4.0, 20.0, 0.0, -53.0, 17.0], [-69.0, 29.0, -30.0, 22.0, 24.0], [10.0, 0.0, -24.0, 
--15.0, -42.0], [12.0, 14.0, -22.0, -10.0, -34.0]], [[-9.0, 1.0, 11.0, -23.0, 8.0], [-26.0, 13.0, -18.0, 11.0, -1.0], [6.0, 
--11.0, 1.0, 2.0, -12.0], [-6.0, 4.0, -11.0, -6.0, -5.0]]], [[[-32.0, -8.0, 32.0, -24.0, -12.0], [29.0, 10.0, -46.0, -6.0, 
--28.0], [47.0, -92.0, 48.0, 19.0, 59.0], [-45.0, -33.0, -19.0, -47.0, 81.0]], [[36.0, 20.0, -44.0, 20.0, 4.0], [-19.0, -10.0, 
-42.0, -2.0, 40.0], [-33.0, 80.0, -52.0, -29.0, -45.0], [51.0, 23.0, 17.0, 33.0, -67.0]], [[-11.0, -21.0, 25.0, 1.0, 14.0], 
-[-19.0, 3.0, 0.0, 15.0, -23.0], [-19.0, 11.0, 11.0, 19.0, -21.0], [-15.0, 15.0, 0.0, 19.0, -18.0]], [[25.0, 23.0, -43.0, 27.0, 
--24.0], [49.0, -19.0, 24.0, -29.0, 29.0], [11.0, 7.0, -17.0, -25.0, 33.0], [27.0, -19.0, 14.0, -11.0, 20.0]], [[-10.0, -14.0, 
-14.0, 14.0, -8.0], [33.0, -8.0, -2.0, -8.0, -22.0], [7.0, -26.0, 26.0, 15.0, 31.0], [-21.0, -13.0, 3.0, -7.0, 35.0]]], 
-[[[-18.0, -14.0, 22.0, 2.0, -8.0], [30.0, -2.0, -16.0, -6.0, -26.0], [18.0, -46.0, 34.0, 18.0, 38.0], [-30.0, -18.0, -4.0, 
--18.0, 48.0]], [[-19.0, -29.0, 33.0, 13.0, 2.0], [19.0, -5.0, -4.0, 3.0, -39.0], [-5.0, -21.0, 35.0, 29.0, 17.0], [-33.0, -3.0, 
-2.0, 5.0, 24.0]], [[26.0, 14.0, -38.0, 36.0, -18.0], [43.0, -22.0, 34.0, -24.0, 22.0], [-5.0, 26.0, -18.0, -19.0, 19.0], [27.0, 
--9.0, 19.0, 5.0, 3.0]], [[13.0, -21.0, 1.0, 37.0, 14.0], [-10.0, -15.0, 42.0, 9.0, -11.0], [-52.0, 71.0, -13.0, 10.0, -42.0], 
-[12.0, 30.0, 21.0, 52.0, -57.0]], [[-10.0, 18.0, -6.0, -17.0, -25.0], [44.0, 3.0, -32.0, -22.0, 6.0], [55.0, -78.0, 22.0, -8.0, 
-67.0], [-15.0, -41.0, -13.0, -55.0, 79.0]]], [[[-17.0, -31.0, 35.0, 9.0, 12.0], [-5.0, -1.0, 0.0, 13.0, -37.0], [-19.0, 1.0, 
-25.0, 29.0, -9.0], [-27.0, 11.0, 2.0, 19.0, -4.0]], [[18.0, 30.0, -30.0, -24.0, 6.0], [-42.0, 12.0, 0.0, 6.0, 42.0], [0.0, 
-30.0, -42.0, -30.0, -36.0], [36.0, 12.0, -6.0, 0.0, -42.0]], [[-1.0, 9.0, -9.0, 4.0, -19.0], [41.0, -6.0, -8.0, -19.0, 3.0], 
-[28.0, -39.0, 13.0, -5.0, 46.0], [-6.0, -26.0, -1.0, -28.0, 49.0]], [[8.0, -32.0, 4.0, 69.0, -9.0], [62.0, -35.0, 48.0, -16.0, 
--32.0], [-35.0, 32.0, 20.0, 22.0, 21.0], [-9.0, 1.0, 31.0, 35.0, 7.0]], [[-39.0, -49.0, 65.0, 4.0, 11.0], [9.0, 2.0, -20.0, 
-15.0, -67.0], [-6.0, -41.0, 59.0, 51.0, 16.0], [-60.0, 0.0, -5.0, 6.0, 33.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -20.0, 
-32.0, -9.0, 9.0], [-10.0, 7.0, -16.0, 12.0, -28.0], [-1.0, -20.0, 24.0, 22.0, -1.0], [-27.0, 3.0, -7.0, 1.0, 9.0]], [[2.0, 
--34.0, 14.0, 53.0, 1.0], [35.0, -25.0, 38.0, -4.0, -34.0], [-38.0, 34.0, 18.0, 25.0, 2.0], [-12.0, 10.0, 24.0, 38.0, -8.0]], 
-[[-20.0, -52.0, 52.0, 22.0, 26.0], [-21.0, -4.0, 14.0, 26.0, -56.0], [-49.0, 32.0, 28.0, 45.0, -37.0], [-33.0, 31.0, 9.0, 49.0, 
--35.0]], [[18.0, -18.0, -10.0, 55.0, -1.0], [29.0, -27.0, 50.0, -8.0, -10.0], [-42.0, 58.0, -6.0, 7.0, -10.0], [12.0, 14.0, 
-28.0, 42.0, -28.0]], [[-19.0, -13.0, 33.0, -35.0, 26.0], [-63.0, 23.0, -24.0, 31.0, -15.0], [-11.0, 3.0, 3.0, 15.0, -45.0], 
-[-15.0, 23.0, -16.0, 11.0, -34.0]]], [[[1.0, -9.0, 9.0, -4.0, 19.0], [-41.0, 6.0, 8.0, 19.0, -3.0], [-28.0, 39.0, -13.0, 5.0, 
--46.0], [6.0, 26.0, 1.0, 28.0, -49.0]], [[-3.0, 19.0, -11.0, -16.0, -17.0], [24.0, 4.0, -22.0, -15.0, 13.0], [39.0, -49.0, 7.0, 
--12.0, 41.0], [-3.0, -27.0, -10.0, -39.0, 48.0]], [[38.0, 50.0, -74.0, 24.0, -42.0], [73.0, -22.0, 22.0, -48.0, 58.0], [37.0, 
--10.0, -30.0, -49.0, 61.0], [45.0, -39.0, 13.0, -37.0, 45.0]], [[51.0, 69.0, -89.0, -7.0, -20.0], [-2.0, -3.0, 22.0, -25.0, 
-91.0], [18.0, 41.0, -75.0, -70.0, -8.0], [78.0, -8.0, 5.0, -18.0, -29.0]], [[35.0, 45.0, -65.0, 15.0, -30.0], [45.0, -15.0, 
-20.0, -35.0, 55.0], [25.0, 5.0, -35.0, -45.0, 35.0], [45.0, -25.0, 10.0, -25.0, 20.0]]], [[[6.0, -6.0, -10.0, 40.0, -22.0], 
-[68.0, -24.0, 20.0, -26.0, -10.0], [6.0, -14.0, 18.0, 4.0, 50.0], [-6.0, -22.0, 16.0, -6.0, 44.0]], [[-25.0, -55.0, 59.0, 17.0, 
-28.0], [-25.0, -1.0, 8.0, 29.0, -61.0], [-47.0, 25.0, 33.0, 49.0, -37.0], [-39.0, 31.0, 6.0, 47.0, -32.0]], [[-13.0, -27.0, 
-35.0, -10.0, 31.0], [-59.0, 12.0, 0.0, 33.0, -25.0], [-38.0, 37.0, 1.0, 23.0, -60.0], [-12.0, 36.0, -3.0, 38.0, -57.0]], 
-[[-15.0, -25.0, 25.0, 20.0, -5.0], [35.0, -10.0, 0.0, -5.0, -35.0], [0.0, -25.0, 35.0, 25.0, 30.0], [-30.0, -10.0, 5.0, 0.0, 
-35.0]], [[-20.0, -20.0, 36.0, -22.0, 22.0], [-45.0, 16.0, -18.0, 26.0, -24.0], [-13.0, 0.0, 12.0, 21.0, -33.0], [-21.0, 19.0, 
--11.0, 13.0, -23.0]]], [[[19.0, -3.0, -21.0, 44.0, -11.0], [40.0, -24.0, 38.0, -17.0, 3.0], [-19.0, 33.0, -7.0, -4.0, 11.0], 
-[15.0, -1.0, 22.0, 19.0, -4.0]], [[-21.0, -51.0, 51.0, 24.0, 21.0], [-9.0, -6.0, 12.0, 21.0, -57.0], [-42.0, 21.0, 33.0, 45.0, 
--24.0], [-36.0, 24.0, 9.0, 42.0, -21.0]], [[-37.0, -35.0, 55.0, -9.0, 6.0], [8.0, 7.0, -30.0, 11.0, -53.0], [10.0, -55.0, 53.0, 
-40.0, 24.0], [-54.0, -8.0, -11.0, -10.0, 43.0]], [[-41.0, -63.0, 79.0, 4.0, 29.0], [-25.0, 6.0, -12.0, 33.0, -77.0], [-34.0, 
--7.0, 53.0, 61.0, -24.0], [-60.0, 24.0, -3.0, 34.0, -9.0]], [[13.0, -21.0, 1.0, 37.0, 14.0], [-10.0, -15.0, 42.0, 9.0, -11.0], 
-[-52.0, 71.0, -13.0, 10.0, -42.0], [12.0, 30.0, 21.0, 52.0, -57.0]]]])
+      ref=msk_ref*numpy.array([[[[-27.0, 10.0], [23.0, 38.0]], [[-3.0, -66.0], [-20.0, -42.0]]], [[[0.0, -2.0], [4.0, -15.0]], 
+[[-15.0, -42.0], [-3.0, -13.0]]], [[[2.0, 43.0], [-32.0, 7.0]], [[-9.0, -18.0], [-33.0, -36.0]]], [[[2.0, -28.0], [6.0, 51.0]], 
+[[31.0, -7.0], [-15.0, -62.0]]], [[[-17.0, 36.0], [32.0, 18.0]], [[29.0, 20.0], [-24.0, 13.0]]], [[[-12.0, -1.0], [32.0, 
+-17.0]], [[4.0, 18.0], [-33.0, -28.0]]]])+(1.-msk_ref)*numpy.array([[[[-30.0, 24.0], [22.0, 2.0]], [[-32.0, 22.0], [-34.0, 
+8.0]]], [[[-30.0, 12.0], [29.0, -28.0]], [[-6.0, 4.0], [4.0, 10.0]]], [[[6.0, 0.0], [24.0, -32.0]], [[0.0, -18.0], [-38.0, 
+22.0]]], [[[-43.0, 20.0], [-32.0, 18.0]], [[10.0, -22.0], [-2.0, -12.0]]], [[[13.0, -28.0], [22.0, -8.0]], [[-7.0, -8.0], [5.0, 
+-4.0]]], [[[7.0, 0.0], [-33.0, 2.0]], [[0.0, -8.0], [-17.0, 22.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[1.0, 0.0, 0.0], [-5.0, -7.0, 0.0]], [[-5.0, -3.0, 2.0], [2.0, -5.0, -6.0]], [[-6.0, -2.0, 
-2.0], [5.0, 1.0, -2.0]], [[-3.0, 3.0, 6.0], [-5.0, 6.0, 6.0]], [[-7.0, -4.0, 5.0], [3.0, 0.0, -4.0]]], [[[4.0, 5.0, -5.0], 
-[7.0, 4.0, 1.0]], [[-4.0, -6.0, -1.0], [-6.0, 1.0, 2.0]], [[7.0, 7.0, 7.0], [-6.0, -1.0, 7.0]], [[1.0, 6.0, -7.0], [3.0, -1.0, 
-7.0]], [[7.0, 3.0, 3.0], [-6.0, -1.0, 0.0]]], [[[-3.0, 5.0, 1.0], [-6.0, -5.0, 3.0]], [[-2.0, -4.0, 7.0], [0.0, -7.0, 1.0]], 
-[[0.0, 2.0, -6.0], [3.0, -1.0, -2.0]], [[-2.0, 4.0, 7.0], [-3.0, 0.0, 0.0]], [[-1.0, 0.0, -1.0], [0.0, 0.0, -7.0]]], [[[4.0, 
-7.0, -7.0], [3.0, 2.0, 5.0]], [[-7.0, 5.0, 6.0], [6.0, -2.0, -4.0]], [[1.0, 5.0, 5.0], [6.0, 0.0, 0.0]], [[2.0, -4.0, -6.0], 
-[-7.0, -2.0, 4.0]], [[0.0, 0.0, 3.0], [-3.0, 4.0, -6.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 5.0, -6.0], [6.0, -6.0, 3.0]], 
-[[6.0, 0.0, 6.0], [1.0, -3.0, -1.0]], [[1.0, 0.0, -4.0], [-5.0, -3.0, -6.0]], [[7.0, 5.0, 4.0], [-5.0, -1.0, 5.0]], [[-3.0, 
-4.0, -5.0], [-3.0, -2.0, -3.0]]], [[[0.0, 3.0, -7.0], [-7.0, -2.0, 2.0]], [[-1.0, -6.0, -4.0], [7.0, -5.0, 6.0]], [[5.0, 0.0, 
-1.0], [2.0, 4.0, 1.0]], [[1.0, 0.0, 6.0], [-6.0, 0.0, 1.0]], [[6.0, 6.0, -3.0], [0.0, 0.0, 2.0]]], [[[5.0, -6.0, -4.0], [-4.0, 
-4.0, -5.0]], [[0.0, 6.0, 4.0], [-5.0, 3.0, 3.0]], [[2.0, 1.0, -1.0], [1.0, 4.0, -5.0]], [[6.0, 2.0, -5.0], [1.0, -6.0, -1.0]], 
-[[6.0, 5.0, -6.0], [6.0, -1.0, -4.0]]], [[[5.0, -7.0, 1.0], [6.0, -7.0, -4.0]], [[2.0, 2.0, -4.0], [0.0, 6.0, 0.0]], [[-4.0, 
--5.0, -1.0], [4.0, 2.0, -2.0]], [[5.0, -4.0, 3.0], [7.0, -1.0, -4.0]], [[7.0, 4.0, 0.0], [2.0, 5.0, -2.0]]]])
-      arg1=Data(numpy.array([[[[-4.0, -7.0, 7.0], [-2.0, 0.0, 4.0]], [[-3.0, -1.0, -5.0], [-5.0, -5.0, 6.0]], [[4.0, -3.0, 
-3.0], [4.0, 1.0, 6.0]], [[1.0, 4.0, -1.0], [5.0, 5.0, 1.0]], [[-1.0, 1.0, 5.0], [5.0, -1.0, 5.0]]], [[[4.0, -2.0, -6.0], [0.0, 
-3.0, -2.0]], [[4.0, 2.0, 1.0], [-3.0, 0.0, 6.0]], [[4.0, -4.0, -7.0], [6.0, -2.0, -4.0]], [[-3.0, -3.0, -2.0], [-2.0, 1.0, 
--4.0]], [[-3.0, -4.0, -5.0], [-4.0, 6.0, -2.0]]], [[[4.0, -4.0, 5.0], [-7.0, 4.0, -2.0]], [[-5.0, 0.0, -6.0], [3.0, -6.0, 
-2.0]], [[7.0, -5.0, 1.0], [0.0, -6.0, 1.0]], [[-5.0, 0.0, -3.0], [3.0, -6.0, 1.0]], [[5.0, 7.0, 1.0], [-2.0, -2.0, -6.0]]], 
-[[[5.0, 5.0, 7.0], [-4.0, -5.0, -3.0]], [[-2.0, 0.0, 0.0], [0.0, -7.0, 4.0]], [[-2.0, -2.0, 0.0], [-4.0, 4.0, 0.0]], [[2.0, 
--2.0, -1.0], [-3.0, -3.0, 6.0]], [[4.0, -3.0, -6.0], [6.0, 3.0, 6.0]]]]),self.functionspace)
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[6.0, 57.0, -23.0, -59.0, -19.0], [-17.0, 19.0, -12.0, 0.0, -25.0], [11.0, 22.0, 49.0, 22.0, 
-29.0], [60.0, 47.0, -10.0, 38.0, -47.0]], [[27.0, -13.0, -38.0, -40.0, -3.0], [-29.0, -66.0, 24.0, 35.0, -9.0], [-20.0, 37.0, 
-6.0, 49.0, -2.0], [9.0, 21.0, -12.0, -33.0, -62.0]], [[34.0, -32.0, -3.0, 12.0, 28.0], [-25.0, -53.0, 6.0, 19.0, 6.0], [-33.0, 
-23.0, -38.0, 31.0, -42.0], [-45.0, -3.0, 0.0, -40.0, -9.0]], [[67.0, 7.0, 19.0, 14.0, 35.0], [-48.0, 51.0, -132.0, -20.0, 
-11.0], [53.0, -60.0, -60.0, -48.0, -26.0], [14.0, -12.0, 44.0, 15.0, -33.0]], [[69.0, -39.0, -13.0, -17.0, 23.0], [-42.0, 
--64.0, -13.0, 33.0, 8.0], [0.0, 6.0, -28.0, 25.0, -40.0], [-20.0, -2.0, 10.0, -44.0, -52.0]]], [[[-96.0, -41.0, 24.0, 85.0, 
-12.0], [46.0, 6.0, 61.0, -31.0, -13.0], [-64.0, 9.0, -25.0, -7.0, 22.0], [-41.0, -32.0, -30.0, -24.0, 91.0]], [[71.0, 60.0, 
--12.0, -50.0, -28.0], [1.0, 1.0, -31.0, 37.0, 67.0], [45.0, 6.0, -3.0, 1.0, -65.0], [-44.0, 9.0, 48.0, 32.0, -13.0]], [[12.0, 
-14.0, 45.0, 0.0, 41.0], [-45.0, 109.0, -111.0, -73.0, -80.0], [59.0, -75.0, 34.0, -61.0, 63.0], [127.0, 21.0, -8.0, 56.0, 
--32.0]], [[-73.0, 58.0, 18.0, 49.0, 21.0], [17.0, 42.0, 21.0, -42.0, -24.0], [-94.0, 66.0, -17.0, 38.0, -6.0], [-42.0, 33.0, 
--30.0, 33.0, 85.0]], [[-16.0, -4.0, 3.0, -19.0, -18.0], [1.0, 55.0, -39.0, -25.0, -30.0], [69.0, -65.0, 43.0, -56.0, 73.0], 
-[100.0, -7.0, 0.0, 26.0, -38.0]]], [[[8.0, 72.0, -35.0, -36.0, 3.0], [-49.0, 35.0, -77.0, -13.0, -28.0], [-11.0, 27.0, -12.0, 
-27.0, 25.0], [57.0, 53.0, 0.0, 34.0, -66.0]], [[89.0, 16.0, 24.0, -59.0, 45.0], [-65.0, -3.0, -31.0, -7.0, -57.0], [13.0, 12.0, 
-56.0, 32.0, -23.0], [51.0, 57.0, -16.0, 24.0, -53.0]], [[-70.0, 6.0, -25.0, 22.0, -22.0], [33.0, -23.0, 62.0, 7.0, 8.0], 
-[-59.0, 47.0, -12.0, 31.0, 16.0], [-33.0, -1.0, -20.0, -16.0, 33.0]], [[35.0, -18.0, -11.0, -8.0, 26.0], [-58.0, 16.0, -91.0, 
--14.0, -33.0], [32.0, -41.0, -27.0, -20.0, 31.0], [71.0, 4.0, 8.0, -10.0, -80.0]], [[-31.0, -34.0, -49.0, -7.0, -39.0], [16.0, 
--47.0, 31.0, 33.0, 22.0], [5.0, -3.0, -15.0, 1.0, 36.0], [9.0, -26.0, 2.0, -43.0, -40.0]]], [[[-100.0, 21.0, 18.0, 69.0, 6.0], 
-[40.0, 44.0, 31.0, -43.0, -15.0], [-70.0, 29.0, -21.0, 3.0, 22.0], [-31.0, -2.0, -26.0, 16.0, 91.0]], [[7.0, -58.0, -27.0, 
-23.0, 54.0], [-72.0, -54.0, -34.0, -4.0, -57.0], [-60.0, 21.0, -60.0, 43.0, 22.0], [30.0, 12.0, -28.0, -66.0, -73.0]], [[-16.0, 
--63.0, 28.0, 46.0, 59.0], [-36.0, 1.0, -15.0, -40.0, -72.0], [-33.0, -17.0, -13.0, -2.0, 33.0], [41.0, -2.0, -36.0, -31.0, 
--5.0]], [[8.0, 97.0, -4.0, -49.0, -49.0], [38.0, 39.0, 12.0, 14.0, 48.0], [27.0, 25.0, 44.0, 3.0, -30.0], [-26.0, 26.0, 24.0, 
-69.0, 32.0]], [[3.0, -56.0, -35.0, -4.0, -34.0], [6.0, -24.0, -23.0, 28.0, 33.0], [64.0, -63.0, -27.0, -48.0, 37.0], [31.0, 
--52.0, 28.0, -42.0, -60.0]]]])+(1.-msk_ref)*numpy.array([[[[-81.0, 40.0, 7.0, 30.0, 25.0], [6.0, 8.0, 62.0, -36.0, -59.0], 
-[-118.0, 91.0, 15.0, 70.0, 16.0], [-15.0, 52.0, -60.0, 16.0, 61.0]], [[12.0, -44.0, 37.0, -11.0, 27.0], [-19.0, 21.0, -2.0, 
--31.0, -68.0], [37.0, -47.0, 65.0, -28.0, 46.0], [86.0, 5.0, -28.0, 6.0, -21.0]], [[-46.0, 21.0, -67.0, -41.0, -73.0], [31.0, 
--21.0, 32.0, 36.0, 31.0], [19.0, 10.0, 15.0, 4.0, 53.0], [30.0, -5.0, 6.0, -6.0, -47.0]], [[-5.0, 14.0, 34.0, -2.0, 19.0], 
-[-19.0, 87.0, -68.0, -55.0, -57.0], [49.0, -58.0, 39.0, -51.0, 56.0], [98.0, 13.0, -8.0, 48.0, -14.0]], [[-57.0, 37.0, -71.0, 
--10.0, -46.0], [10.0, -18.0, 5.0, 23.0, 24.0], [-34.0, 42.0, -37.0, 30.0, 36.0], [1.0, 8.0, 2.0, -12.0, -36.0]]], [[[-48.0, 
-89.0, -48.0, -24.0, -55.0], [26.0, 32.0, -9.0, 9.0, 35.0], [-10.0, 37.0, -8.0, 14.0, 20.0], [-2.0, 22.0, 14.0, 40.0, -3.0]], 
-[[28.0, 55.0, 61.0, -5.0, 45.0], [5.0, -5.0, 76.0, -14.0, -23.0], [-81.0, 92.0, 55.0, 74.0, -91.0], [-84.0, 61.0, -34.0, 44.0, 
-101.0]], [[-13.0, -44.0, 41.0, 35.0, 11.0], [24.0, 21.0, 13.0, -21.0, -6.0], [25.0, -47.0, 13.0, -45.0, 8.0], [1.0, -34.0, 
--2.0, -3.0, 44.0]], [[54.0, 3.0, 4.0, -34.0, 4.0], [-34.0, 34.0, -78.0, -7.0, -11.0], [74.0, -57.0, 14.0, -40.0, 17.0], [68.0, 
-2.0, 22.0, 20.0, -62.0]], [[-79.0, 3.0, 9.0, 35.0, -5.0], [26.0, 45.0, 13.0, -38.0, -31.0], [-19.0, -8.0, 11.0, -19.0, 57.0], 
-[33.0, -4.0, -24.0, 15.0, 36.0]]], [[[-18.0, -19.0, -16.0, -20.0, -80.0], [78.0, -14.0, 60.0, 43.0, 79.0], [78.0, -47.0, 32.0, 
--54.0, 9.0], [-22.0, -58.0, 34.0, -4.0, 20.0]], [[8.0, 2.0, -5.0, 13.0, 13.0], [-33.0, 49.0, -100.0, -25.0, -12.0], [37.0, 
--51.0, -41.0, -42.0, 32.0], [54.0, -9.0, 20.0, 8.0, -45.0]], [[-44.0, -57.0, -20.0, 27.0, -30.0], [34.0, -24.0, 29.0, 15.0, 
-25.0], [18.0, -35.0, -21.0, -33.0, 36.0], [-1.0, -52.0, 6.0, -42.0, -1.0]], [[-79.0, 24.0, -5.0, -7.0, -23.0], [34.0, 14.0, 
-73.0, -18.0, -39.0], [-38.0, 37.0, 62.0, 23.0, 55.0], [34.0, 26.0, -44.0, 22.0, 30.0]], [[-129.0, -42.0, -10.0, 53.0, -20.0], 
-[55.0, -14.0, 100.0, -18.0, -30.0], [-64.0, 22.0, 13.0, 8.0, 73.0], [6.0, -21.0, -50.0, -31.0, 54.0]]], [[[8.0, -32.0, 37.0, 
--33.0, 10.0], [15.0, -35.0, 107.0, 1.0, -50.0], [-9.0, 21.0, 109.0, 28.0, 3.0], [20.0, 23.0, -48.0, 2.0, 26.0]], [[-50.0, 
--18.0, -4.0, 44.0, -26.0], [46.0, 8.0, 16.0, 2.0, 42.0], [4.0, -22.0, -36.0, -34.0, 8.0], [-38.0, -46.0, 16.0, -14.0, 44.0]], 
-[[28.0, -20.0, 2.0, 5.0, 2.0], [10.0, -51.0, 39.0, 31.0, 37.0], [-17.0, 22.0, -18.0, 21.0, -56.0], [-72.0, -14.0, 10.0, -27.0, 
-23.0]], [[-1.0, -80.0, 44.0, 12.0, 22.0], [15.0, -30.0, 75.0, -8.0, -40.0], [6.0, -24.0, 60.0, -11.0, 12.0], [15.0, -19.0, 
--34.0, -27.0, 29.0]], [[-68.0, -72.0, 17.0, 56.0, -8.0], [39.0, 18.0, 22.0, -24.0, -11.0], [22.0, -63.0, -3.0, -61.0, 61.0], 
-[28.0, -57.0, -10.0, -27.0, 31.0]]]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_float_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[0.0, 3.0, -1.0, 0.0], [-4.0, 1.0, 0.0, -7.0], [2.0, -3.0, 4.0, -2.0]], [[0.0, 3.0, -5.0, 3.0], 
+[-1.0, 1.0, 0.0, -7.0], [-5.0, -4.0, -5.0, -1.0]]], [[[-2.0, 7.0, -1.0, 6.0], [4.0, -3.0, -2.0, 7.0], [-3.0, -7.0, -6.0, 5.0]], 
+[[-4.0, 0.0, 5.0, 0.0], [-4.0, 0.0, 7.0, -7.0], [-5.0, -1.0, -1.0, 1.0]]], [[[-4.0, 6.0, 4.0, 0.0], [1.0, -3.0, 6.0, 7.0], 
+[0.0, 6.0, 7.0, 6.0]], [[-4.0, -7.0, -4.0, -5.0], [3.0, -6.0, -7.0, 7.0], [-1.0, 0.0, 5.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 5.0, 3.0, 1.0], [7.0, -1.0, 0.0, 5.0], [-5.0, -5.0, -1.0, 0.0]], [[0.0, -1.0, 
+4.0, -2.0], [-3.0, 4.0, -2.0, -6.0], [0.0, -1.0, 1.0, 0.0]]], [[[5.0, -6.0, -7.0, 0.0], [-2.0, 2.0, 5.0, 4.0], [5.0, 2.0, 0.0, 
+4.0]], [[3.0, -3.0, -6.0, -5.0], [3.0, 4.0, 6.0, 5.0], [-4.0, -6.0, 7.0, 3.0]]], [[[6.0, 0.0, -2.0, -3.0], [0.0, -6.0, 6.0, 
+6.0], [-5.0, 4.0, 4.0, 0.0]], [[-2.0, 2.0, 7.0, 0.0], [-6.0, 3.0, 4.0, 0.0], [-4.0, 7.0, 0.0, 4.0]]]]))
+      arg1=1.0
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[0.0, 3.0, -1.0, 0.0], [-4.0, 1.0, 0.0, -7.0], [2.0, -3.0, 4.0, -2.0]], [[0.0, 3.0, -5.0, 3.0], 
+[-1.0, 1.0, 0.0, -7.0], [-5.0, -4.0, -5.0, -1.0]]], [[[-2.0, 7.0, -1.0, 6.0], [4.0, -3.0, -2.0, 7.0], [-3.0, -7.0, -6.0, 5.0]], 
+[[-4.0, 0.0, 5.0, 0.0], [-4.0, 0.0, 7.0, -7.0], [-5.0, -1.0, -1.0, 1.0]]], [[[-4.0, 6.0, 4.0, 0.0], [1.0, -3.0, 6.0, 7.0], 
+[0.0, 6.0, 7.0, 6.0]], [[-4.0, -7.0, -4.0, -5.0], [3.0, -6.0, -7.0, 7.0], [-1.0, 0.0, 5.0, 5.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[4.0, 5.0, 3.0, 1.0], [7.0, -1.0, 0.0, 5.0], [-5.0, -5.0, -1.0, 0.0]], [[0.0, -1.0, 
+4.0, -2.0], [-3.0, 4.0, -2.0, -6.0], [0.0, -1.0, 1.0, 0.0]]], [[[5.0, -6.0, -7.0, 0.0], [-2.0, 2.0, 5.0, 4.0], [5.0, 2.0, 0.0, 
+4.0]], [[3.0, -3.0, -6.0, -5.0], [3.0, 4.0, 6.0, 5.0], [-4.0, -6.0, 7.0, 3.0]]], [[[6.0, 0.0, -2.0, -3.0], [0.0, -6.0, 6.0, 
+6.0], [-5.0, 4.0, 4.0, 0.0]], [[-2.0, 2.0, 7.0, 0.0], [-6.0, 3.0, 4.0, 0.0], [-4.0, 7.0, 0.0, 4.0]]]]))
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_taggedData_rank4_array_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[1.0, 0.0, 3.0, 7.0], [-2.0, 1.0, -3.0, 7.0], [-4.0, -1.0, -5.0, 0.0]], [[-1.0, 6.0, 2.0, -2.0], 
+[-7.0, 3.0, 1.0, 6.0], [0.0, -7.0, -7.0, -6.0]]], [[[7.0, 1.0, -2.0, 3.0], [6.0, 5.0, 3.0, 4.0], [0.0, -2.0, 0.0, 1.0]], 
+[[-6.0, -3.0, -5.0, 5.0], [5.0, 1.0, 1.0, 0.0], [-1.0, -4.0, -6.0, -4.0]]], [[[-6.0, -1.0, -2.0, 6.0], [6.0, 2.0, -5.0, 4.0], 
+[6.0, 4.0, -2.0, 0.0]], [[-5.0, 3.0, 0.0, -3.0], [1.0, 0.0, -6.0, 6.0], [-2.0, 0.0, 6.0, 0.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 3.0, -4.0, 7.0], [1.0, -4.0, 3.0, -4.0], [0.0, -7.0, 0.0, -4.0]], [[7.0, 0.0, 
+0.0, 0.0], [1.0, -7.0, -5.0, -6.0], [-1.0, 5.0, -6.0, 4.0]]], [[[0.0, 7.0, 5.0, 5.0], [6.0, -3.0, 2.0, -2.0], [0.0, 1.0, -5.0, 
+0.0]], [[2.0, 0.0, -5.0, -6.0], [0.0, -7.0, -2.0, -1.0], [1.0, 4.0, -2.0, -2.0]]], [[[-2.0, 6.0, -1.0, 4.0], [2.0, 3.0, 7.0, 
+3.0], [2.0, -3.0, -2.0, 0.0]], [[6.0, 2.0, 3.0, -6.0], [-1.0, -5.0, 3.0, -3.0], [-6.0, 7.0, 1.0, 2.0]]]]))
+      arg1=numpy.array(4.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[4.0, 0.0, 12.0, 28.0], [-8.0, 4.0, -12.0, 28.0], [-16.0, -4.0, -20.0, 0.0]], [[-4.0, 24.0, 8.0, 
+-8.0], [-28.0, 12.0, 4.0, 24.0], [0.0, -28.0, -28.0, -24.0]]], [[[28.0, 4.0, -8.0, 12.0], [24.0, 20.0, 12.0, 16.0], [0.0, -8.0, 
+0.0, 4.0]], [[-24.0, -12.0, -20.0, 20.0], [20.0, 4.0, 4.0, 0.0], [-4.0, -16.0, -24.0, -16.0]]], [[[-24.0, -4.0, -8.0, 24.0], 
+[24.0, 8.0, -20.0, 16.0], [24.0, 16.0, -8.0, 0.0]], [[-20.0, 12.0, 0.0, -12.0], [4.0, 0.0, -24.0, 24.0], [-8.0, 0.0, 24.0, 
+0.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[28.0, 12.0, -16.0, 28.0], [4.0, -16.0, 12.0, -16.0], [0.0, -28.0, 0.0, -16.0]], 
+[[28.0, 0.0, 0.0, 0.0], [4.0, -28.0, -20.0, -24.0], [-4.0, 20.0, -24.0, 16.0]]], [[[0.0, 28.0, 20.0, 20.0], [24.0, -12.0, 8.0, 
+-8.0], [0.0, 4.0, -20.0, 0.0]], [[8.0, 0.0, -20.0, -24.0], [0.0, -28.0, -8.0, -4.0], [4.0, 16.0, -8.0, -8.0]]], [[[-8.0, 24.0, 
+-4.0, 16.0], [8.0, 12.0, 28.0, 12.0], [8.0, -12.0, -8.0, 0.0]], [[24.0, 8.0, 12.0, -24.0], [-4.0, -20.0, 12.0, -12.0], [-24.0, 
+28.0, 4.0, 8.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-3.0, -2.0, 1.0, 5.0, 2.0], [-7.0, -1.0, -5.0, -7.0, 0.0], [3.0, -7.0, 1.0, 5.0, 6.0], [5.0, 
--4.0, -3.0, -7.0, -5.0]])+(1.-msk_arg0)*numpy.array([[5.0, -7.0, 5.0, -1.0, 2.0], [0.0, -3.0, 0.0, -2.0, 3.0], [-2.0, 3.0, 5.0, 
-0.0, -2.0], [-3.0, -3.0, 0.0, -5.0, 1.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(-3.0)+(1-msk_arg1)*(-5.0)
+   def test_generalTensorTransposedProduct_taggedData_rank4_constData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[6.0, -3.0, 0.0, 7.0], [-5.0, 3.0, 7.0, 2.0], [3.0, -3.0, -1.0, 3.0]], [[6.0, 6.0, -6.0, 0.0], 
+[7.0, 5.0, -1.0, 7.0], [-1.0, -6.0, 4.0, 0.0]]], [[[-7.0, 1.0, 1.0, 0.0], [-6.0, 7.0, -7.0, -7.0], [2.0, -2.0, 0.0, 3.0]], 
+[[4.0, -4.0, 2.0, 3.0], [6.0, -6.0, 4.0, 0.0], [6.0, 3.0, -2.0, -7.0]]], [[[2.0, -3.0, 4.0, 1.0], [-1.0, 1.0, 4.0, -4.0], [5.0, 
+-5.0, -2.0, 3.0]], [[1.0, -7.0, 0.0, 0.0], [1.0, 7.0, -2.0, 3.0], [0.0, -4.0, 5.0, -4.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, 2.0, 7.0, 7.0], [5.0, -2.0, -7.0, -3.0], [2.0, -7.0, 2.0, 4.0]], [[-2.0, 7.0, 
+5.0, -7.0], [1.0, 5.0, 0.0, 2.0], [-5.0, 1.0, -1.0, 0.0]]], [[[0.0, -7.0, -1.0, -5.0], [-2.0, 0.0, 6.0, -1.0], [6.0, -5.0, 
+-4.0, 1.0]], [[4.0, 5.0, 4.0, 7.0], [3.0, -7.0, 7.0, 4.0], [-4.0, 4.0, 2.0, 6.0]]], [[[-6.0, -6.0, -4.0, 6.0], [4.0, -5.0, 
+-3.0, -1.0], [6.0, -7.0, -1.0, -4.0]], [[7.0, -6.0, -5.0, 6.0], [1.0, 0.0, 7.0, 6.0], [-6.0, 3.0, -1.0, -5.0]]]]))
+      arg1=Data(-6.0,self.functionspace)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[9.0, 6.0, -3.0, -15.0, -6.0], [21.0, 3.0, 15.0, 21.0, -0.0], [-9.0, 21.0, -3.0, -15.0, -18.0], 
-[-15.0, 12.0, 9.0, 21.0, 15.0]])+(1.-msk_ref)*numpy.array([[-25.0, 35.0, -25.0, 5.0, -10.0], [-0.0, 15.0, -0.0, 10.0, -15.0], 
-[10.0, -15.0, -25.0, -0.0, 10.0], [15.0, 15.0, -0.0, 25.0, -5.0]])
+      ref=Data(numpy.array([[[[-36.0, 18.0, -0.0, -42.0], [30.0, -18.0, -42.0, -12.0], [-18.0, 18.0, 6.0, -18.0]], [[-36.0, 
+-36.0, 36.0, -0.0], [-42.0, -30.0, 6.0, -42.0], [6.0, 36.0, -24.0, -0.0]]], [[[42.0, -6.0, -6.0, -0.0], [36.0, -42.0, 42.0, 
+42.0], [-12.0, 12.0, -0.0, -18.0]], [[-24.0, 24.0, -12.0, -18.0], [-36.0, 36.0, -24.0, -0.0], [-36.0, -18.0, 12.0, 42.0]]], 
+[[[-12.0, 18.0, -24.0, -6.0], [6.0, -6.0, -24.0, 24.0], [-30.0, 30.0, 12.0, -18.0]], [[-6.0, 42.0, -0.0, -0.0], [-6.0, -42.0, 
+12.0, -18.0], [-0.0, 24.0, -30.0, 24.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[-12.0, -12.0, -42.0, -42.0], [-30.0, 12.0, 42.0, 18.0], [-12.0, 42.0, -12.0, 
+-24.0]], [[12.0, -42.0, -30.0, 42.0], [-6.0, -30.0, -0.0, -12.0], [30.0, -6.0, 6.0, -0.0]]], [[[-0.0, 42.0, 6.0, 30.0], [12.0, 
+-0.0, -36.0, 6.0], [-36.0, 30.0, 24.0, -6.0]], [[-24.0, -30.0, -24.0, -42.0], [-18.0, 42.0, -42.0, -24.0], [24.0, -24.0, -12.0, 
+-36.0]]], [[[36.0, 36.0, 24.0, -36.0], [-24.0, 30.0, 18.0, 6.0], [-36.0, 42.0, 6.0, 24.0]], [[-42.0, 36.0, 30.0, -36.0], [-6.0, 
+-0.0, -42.0, -36.0], [36.0, -18.0, 6.0, 30.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[4.0, -6.0, 2.0], [2.0, -7.0, 2.0], [0.0, 7.0, -1.0], [5.0, 6.0, -6.0], [-3.0, -5.0, 2.0]], 
-[[3.0, -7.0, -4.0], [3.0, 3.0, -3.0], [0.0, 7.0, -7.0], [-5.0, -7.0, -7.0], [6.0, -1.0, 3.0]], [[-1.0, -2.0, -5.0], [5.0, 6.0, 
--6.0], [-3.0, -1.0, 4.0], [7.0, 0.0, -4.0], [-1.0, 0.0, -3.0]], [[6.0, -2.0, 2.0], [-1.0, 1.0, 0.0], [-2.0, -5.0, 0.0], [1.0, 
-0.0, -4.0], [-2.0, 0.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[4.0, -6.0, -3.0], [6.0, -1.0, 0.0], [6.0, 7.0, 0.0], [-7.0, 1.0, 
--6.0], [-6.0, 0.0, -3.0]], [[0.0, -2.0, -7.0], [0.0, 2.0, 1.0], [-4.0, 7.0, 0.0], [6.0, 6.0, -7.0], [5.0, 0.0, -1.0]], [[-4.0, 
-7.0, -5.0], [-5.0, -3.0, -7.0], [-5.0, -4.0, -4.0], [-6.0, 7.0, 3.0], [0.0, 5.0, -5.0]], [[3.0, 4.0, 1.0], [3.0, 4.0, -3.0], 
-[6.0, 6.0, -6.0], [5.0, 1.0, -3.0], [7.0, 4.0, 3.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-4.0, 0.0, 0.0])+(1.-msk_arg1)*numpy.array([6.0, 7.0, -7.0])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
-      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[-16.0, -8.0, 0.0, -20.0, 12.0], [-12.0, -12.0, 0.0, 20.0, -24.0], [4.0, -20.0, 12.0, -28.0, 
-4.0], [-24.0, 4.0, 8.0, -4.0, 8.0]])+(1.-msk_ref)*numpy.array([[3.0, 29.0, 85.0, 7.0, -15.0], [35.0, 7.0, 25.0, 127.0, 37.0], 
-[60.0, -2.0, -30.0, -8.0, 70.0], [39.0, 67.0, 120.0, 58.0, 49.0]])
+   def test_generalTensorTransposedProduct_taggedData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[-5.0, 0.0, -3.0, 0.0], [-1.0, 5.0, 0.0, 1.0], [2.0, -6.0, 6.0, 6.0]], [[-5.0, -4.0, 4.0, -6.0], 
+[0.0, 5.0, 1.0, 0.0], [5.0, 2.0, 6.0, -5.0]]], [[[-1.0, -1.0, 6.0, 2.0], [-7.0, 3.0, 0.0, 0.0], [-4.0, -6.0, -7.0, -2.0]], 
+[[-7.0, 6.0, -7.0, 0.0], [-2.0, 3.0, 6.0, 0.0], [7.0, -4.0, -4.0, 2.0]]], [[[-1.0, 7.0, 3.0, -6.0], [2.0, 4.0, 2.0, -2.0], 
+[-5.0, 2.0, 2.0, 3.0]], [[2.0, -6.0, 0.0, -7.0], [-2.0, -1.0, 4.0, -4.0], [-3.0, -5.0, -4.0, -2.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-1.0, 7.0, -2.0, -5.0], [-2.0, 2.0, -6.0, 0.0], [3.0, 5.0, -7.0, 4.0]], [[-1.0, 
+-3.0, -4.0, 0.0], [5.0, 7.0, -3.0, 2.0], [7.0, -1.0, 4.0, 1.0]]], [[[-5.0, -4.0, -2.0, 7.0], [0.0, 4.0, -4.0, -4.0], [4.0, 3.0, 
+-7.0, -2.0]], [[2.0, 7.0, -1.0, 0.0], [0.0, 7.0, 0.0, 7.0], [5.0, -4.0, 0.0, 7.0]]], [[[-7.0, 3.0, -1.0, 6.0], [-7.0, 5.0, 
+-4.0, -5.0], [0.0, -6.0, -3.0, 5.0]], [[-3.0, 3.0, -1.0, 5.0], [7.0, 4.0, 3.0, 0.0], [-3.0, 7.0, 0.0, -5.0]]]]))
+      arg1=Data(4.0,self.functionspace)
+      arg1.setTaggedValue(1,-2.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      ref=Data(numpy.array([[[[-20.0, 0.0, -12.0, 0.0], [-4.0, 20.0, 0.0, 4.0], [8.0, -24.0, 24.0, 24.0]], [[-20.0, -16.0, 
+16.0, -24.0], [0.0, 20.0, 4.0, 0.0], [20.0, 8.0, 24.0, -20.0]]], [[[-4.0, -4.0, 24.0, 8.0], [-28.0, 12.0, 0.0, 0.0], [-16.0, 
+-24.0, -28.0, -8.0]], [[-28.0, 24.0, -28.0, 0.0], [-8.0, 12.0, 24.0, 0.0], [28.0, -16.0, -16.0, 8.0]]], [[[-4.0, 28.0, 12.0, 
+-24.0], [8.0, 16.0, 8.0, -8.0], [-20.0, 8.0, 8.0, 12.0]], [[8.0, -24.0, 0.0, -28.0], [-8.0, -4.0, 16.0, -16.0], [-12.0, -20.0, 
+-16.0, -8.0]]]]),self.functionspace)
+      ref.setTaggedValue(1,numpy.array([[[[2.0, -14.0, 4.0, 10.0], [4.0, -4.0, 12.0, -0.0], [-6.0, -10.0, 14.0, -8.0]], [[2.0, 
+6.0, 8.0, -0.0], [-10.0, -14.0, 6.0, -4.0], [-14.0, 2.0, -8.0, -2.0]]], [[[10.0, 8.0, 4.0, -14.0], [-0.0, -8.0, 8.0, 8.0], 
+[-8.0, -6.0, 14.0, 4.0]], [[-4.0, -14.0, 2.0, -0.0], [-0.0, -14.0, -0.0, -14.0], [-10.0, 8.0, -0.0, -14.0]]], [[[14.0, -6.0, 
+2.0, -12.0], [14.0, -10.0, 8.0, 10.0], [-0.0, 12.0, 6.0, -10.0]], [[6.0, -6.0, 2.0, -10.0], [-14.0, -8.0, -6.0, -0.0], [6.0, 
+-14.0, -0.0, 10.0]]]]))
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank2_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, 0.0, 1.0], [-4.0, -2.0, -2.0]], [[-6.0, 5.0, -5.0], [-1.0, 7.0, 2.0]], [[4.0, 2.0, 
--2.0], [-4.0, 6.0, 6.0]], [[2.0, 7.0, 5.0], [-5.0, -3.0, -4.0]], [[-7.0, -5.0, 2.0], [3.0, -1.0, 5.0]]], [[[5.0, 5.0, 0.0], 
-[-5.0, 5.0, -1.0]], [[4.0, 3.0, 0.0], [5.0, 0.0, 0.0]], [[-4.0, -2.0, -3.0], [4.0, -3.0, 5.0]], [[2.0, -3.0, 1.0], [-4.0, -2.0, 
-5.0]], [[3.0, -7.0, -3.0], [0.0, -1.0, 4.0]]], [[[-5.0, -5.0, -6.0], [0.0, -6.0, -6.0]], [[7.0, 2.0, -5.0], [-6.0, 0.0, -2.0]], 
-[[0.0, 7.0, -5.0], [-3.0, 2.0, 5.0]], [[0.0, -3.0, 1.0], [0.0, -1.0, 5.0]], [[-7.0, -6.0, 7.0], [0.0, 0.0, -4.0]]], [[[4.0, 
-5.0, 6.0], [-6.0, -4.0, -7.0]], [[-2.0, -4.0, 1.0], [-6.0, -7.0, 3.0]], [[6.0, 2.0, 7.0], [-1.0, 0.0, 1.0]], [[0.0, 0.0, -1.0], 
-[-3.0, 0.0, 7.0]], [[-2.0, 2.0, 4.0], [1.0, -5.0, 7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 3.0, -5.0], [7.0, 0.0, 4.0]], 
-[[7.0, -6.0, 0.0], [-5.0, 4.0, 3.0]], [[0.0, 0.0, 0.0], [6.0, 7.0, -6.0]], [[-4.0, 5.0, -5.0], [-7.0, 0.0, 6.0]], [[1.0, -4.0, 
--3.0], [-2.0, 5.0, -2.0]]], [[[1.0, 5.0, -6.0], [3.0, -2.0, -3.0]], [[7.0, 3.0, 0.0], [2.0, 6.0, -6.0]], [[2.0, -4.0, -3.0], 
-[7.0, 7.0, -7.0]], [[7.0, -7.0, 0.0], [-1.0, 0.0, 7.0]], [[0.0, 4.0, 6.0], [0.0, -4.0, -2.0]]], [[[5.0, 0.0, 1.0], [-5.0, 3.0, 
--3.0]], [[-3.0, 4.0, 0.0], [1.0, 6.0, -3.0]], [[-1.0, 5.0, 4.0], [0.0, 1.0, 7.0]], [[3.0, -6.0, 4.0], [-5.0, -5.0, -5.0]], 
-[[-3.0, -1.0, -2.0], [4.0, 0.0, 0.0]]], [[[-3.0, -3.0, -2.0], [-6.0, 1.0, -3.0]], [[-3.0, 4.0, 1.0], [-2.0, 4.0, 2.0]], [[-1.0, 
-3.0, 5.0], [2.0, 7.0, 4.0]], [[-4.0, 0.0, -1.0], [-2.0, 0.0, 3.0]], [[-6.0, -3.0, -1.0], [6.0, -6.0, -5.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[7.0, 0.0, 0.0], [5.0, 0.0, 3.0]])+(1.-msk_arg1)*numpy.array([[7.0, 3.0, -5.0], [6.0, -5.0, 
--2.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+   def test_generalTensorTransposedProduct_taggedData_rank4_expandedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[3.0, -7.0, 0.0, 6.0], [-7.0, -1.0, 2.0, 0.0], [0.0, 6.0, 0.0, -1.0]], [[3.0, -7.0, -4.0, 6.0], 
+[-7.0, 2.0, -7.0, 3.0], [2.0, 6.0, -3.0, -4.0]]], [[[6.0, 3.0, 6.0, 7.0], [-7.0, -2.0, 0.0, 7.0], [4.0, 5.0, 5.0, 3.0]], [[6.0, 
+-4.0, -6.0, -4.0], [-1.0, 3.0, 2.0, 1.0], [5.0, -4.0, -7.0, 1.0]]], [[[-2.0, 5.0, -2.0, -7.0], [-6.0, 0.0, 0.0, 2.0], [-7.0, 
+3.0, -3.0, 3.0]], [[0.0, -5.0, 6.0, 0.0], [-1.0, -3.0, 0.0, 1.0], [1.0, -1.0, 5.0, 6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, -1.0, -2.0, -7.0], [3.0, 7.0, 5.0, -5.0], [1.0, -3.0, 2.0, 0.0]], [[5.0, 6.0, 
+-4.0, -7.0], [1.0, 7.0, -6.0, -6.0], [4.0, 5.0, -7.0, -3.0]]], [[[-7.0, -3.0, -3.0, -3.0], [6.0, -5.0, -1.0, -7.0], [-3.0, 
+-4.0, 5.0, -1.0]], [[0.0, 6.0, 6.0, -2.0], [-5.0, 1.0, 0.0, 1.0], [-1.0, 1.0, 4.0, 7.0]]], [[[3.0, -5.0, 1.0, -5.0], [4.0, 
+-3.0, -1.0, 7.0], [5.0, 2.0, -2.0, 2.0]], [[2.0, -3.0, 4.0, -2.0], [5.0, -5.0, 5.0, -7.0], [-2.0, 5.0, -6.0, -2.0]]]]))
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,7.0)
+      arg1.expand()
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[16.0, -41.0, 26.0, -23.0, -19.0], [7.0, 53.0, 7.0, 9.0, 33.0], [-53.0, 13.0, 0.0, 15.0, -61.0], 
-[-23.0, -35.0, 40.0, 6.0, 12.0]])+(1.-msk_ref)*numpy.array([[75.0, -25.0, 13.0, -42.0, -23.0], [86.0, 52.0, 38.0, 8.0, 6.0], 
-[-9.0, -27.0, -31.0, -12.0, 10.0], [-55.0, -50.0, -54.0, -41.0, 30.0]])
+      ref=msk_ref*numpy.array([[[[-9.0, 21.0, -0.0, -18.0], [21.0, 3.0, -6.0, -0.0], [-0.0, -18.0, -0.0, 3.0]], [[-9.0, 21.0, 
+12.0, -18.0], [21.0, -6.0, 21.0, -9.0], [-6.0, -18.0, 9.0, 12.0]]], [[[-18.0, -9.0, -18.0, -21.0], [21.0, 6.0, -0.0, -21.0], 
+[-12.0, -15.0, -15.0, -9.0]], [[-18.0, 12.0, 18.0, 12.0], [3.0, -9.0, -6.0, -3.0], [-15.0, 12.0, 21.0, -3.0]]], [[[6.0, -15.0, 
+6.0, 21.0], [18.0, -0.0, -0.0, -6.0], [21.0, -9.0, 9.0, -9.0]], [[-0.0, 15.0, -18.0, -0.0], [3.0, 9.0, -0.0, -3.0], [-3.0, 3.0, 
+-15.0, -18.0]]]])+(1.-msk_ref)*numpy.array([[[[14.0, -7.0, -14.0, -49.0], [21.0, 49.0, 35.0, -35.0], [7.0, -21.0, 14.0, 0.0]], 
+[[35.0, 42.0, -28.0, -49.0], [7.0, 49.0, -42.0, -42.0], [28.0, 35.0, -49.0, -21.0]]], [[[-49.0, -21.0, -21.0, -21.0], [42.0, 
+-35.0, -7.0, -49.0], [-21.0, -28.0, 35.0, -7.0]], [[0.0, 42.0, 42.0, -14.0], [-35.0, 7.0, 0.0, 7.0], [-7.0, 7.0, 28.0, 49.0]]], 
+[[[21.0, -35.0, 7.0, -35.0], [28.0, -21.0, -7.0, 49.0], [35.0, 14.0, -14.0, 14.0]], [[14.0, -21.0, 28.0, -14.0], [35.0, -35.0, 
+35.0, -49.0], [-14.0, 35.0, -42.0, -14.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[-4.0, 6.0, 6.0, 7.0, 7.0], [3.0, -4.0, 2.0, -6.0, -4.0], [2.0, -7.0, 4.0, -5.0, 0.0], [3.0, 
-6.0, -3.0, 0.0, 4.0]])+(1.-msk_arg0)*numpy.array([[5.0, 0.0, -5.0, -1.0, -1.0], [-1.0, 0.0, 1.0, -3.0, 6.0], [1.0, -5.0, 1.0, 
--6.0, 6.0], [0.0, -1.0, -2.0, 5.0, 4.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([7.0, 7.0])+(1.-msk_arg1)*numpy.array([4.0, 7.0])
+   def test_generalTensorTransposedProduct_expandedData_rank0_taggedData_rank0_offset0(self):
+      arg0=Data(-4.0,self.functionspace)
+      arg0.setTaggedValue(1,2.0)
+      arg0.expand()
+      arg1=Data(0.0,self.functionspace)
+      arg1.setTaggedValue(1,-3.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-28.0, -28.0], [42.0, 42.0], [42.0, 42.0], [49.0, 49.0], [49.0, 49.0]], [[21.0, 21.0], [-28.0, 
--28.0], [14.0, 14.0], [-42.0, -42.0], [-28.0, -28.0]], [[14.0, 14.0], [-49.0, -49.0], [28.0, 28.0], [-35.0, -35.0], [0.0, 
-0.0]], [[21.0, 21.0], [42.0, 42.0], [-21.0, -21.0], [0.0, 0.0], [28.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[20.0, 35.0], [0.0, 
-0.0], [-20.0, -35.0], [-4.0, -7.0], [-4.0, -7.0]], [[-4.0, -7.0], [0.0, 0.0], [4.0, 7.0], [-12.0, -21.0], [24.0, 42.0]], [[4.0, 
-7.0], [-20.0, -35.0], [4.0, 7.0], [-24.0, -42.0], [24.0, 42.0]], [[0.0, 0.0], [-4.0, -7.0], [-8.0, -14.0], [20.0, 35.0], [16.0, 
-28.0]]])
+      ref=msk_ref*numpy.array(-0.0)+(1.-msk_ref)*numpy.array(-6.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-3.0, -1.0, 6.0], [3.0, 5.0, -6.0], [7.0, 3.0, 5.0], [0.0, -2.0, -6.0], [7.0, -5.0, 7.0]], 
-[[-7.0, 7.0, 0.0], [2.0, 0.0, -4.0], [-3.0, 2.0, 0.0], [7.0, -1.0, 0.0], [-4.0, -4.0, -5.0]], [[7.0, -2.0, 1.0], [0.0, 3.0, 
--7.0], [-5.0, 3.0, 7.0], [-3.0, -1.0, 0.0], [0.0, -5.0, -2.0]], [[-2.0, -5.0, 3.0], [-4.0, -6.0, 6.0], [-1.0, 0.0, 0.0], [-5.0, 
--1.0, -1.0], [7.0, 3.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, 2.0, -7.0], [0.0, -1.0, 3.0], [4.0, -4.0, 1.0], [-6.0, -5.0, 
-0.0], [5.0, -4.0, -5.0]], [[-5.0, -6.0, -7.0], [-7.0, -4.0, 4.0], [3.0, 0.0, -5.0], [-6.0, 1.0, -5.0], [1.0, 4.0, 6.0]], [[5.0, 
--7.0, 2.0], [3.0, 1.0, 4.0], [-1.0, -7.0, -6.0], [4.0, -7.0, -3.0], [7.0, 0.0, -2.0]], [[-3.0, -5.0, 7.0], [5.0, -1.0, -7.0], 
-[0.0, -2.0, 2.0], [4.0, 6.0, 7.0], [3.0, -3.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[6.0, 3.0, -3.0], [6.0, 1.0, 5.0]])+(1.-msk_arg1)*numpy.array([[-3.0, -3.0, 7.0], [-1.0, 6.0, 
-7.0]])
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([0.0, 0.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([1.0, -2.0, 3.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([3.0, -5.0, 6.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 0.0, 3.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-39.0, 11.0], [51.0, -7.0], [36.0, 70.0], [12.0, -32.0], [6.0, 72.0]], [[-21.0, -35.0], [24.0, 
--8.0], [-12.0, -16.0], [39.0, 41.0], [-21.0, -53.0]], [[33.0, 45.0], [30.0, -32.0], [-42.0, 8.0], [-21.0, -19.0], [-9.0, 
--15.0]], [[-36.0, -2.0], [-60.0, 0.0], [-6.0, -6.0], [-30.0, -36.0], [54.0, 40.0]]])+(1.-msk_ref)*numpy.array([[[-61.0, -39.0], 
-[24.0, 15.0], [7.0, -21.0], [33.0, -24.0], [-38.0, -64.0]], [[-16.0, -80.0], [61.0, 11.0], [-44.0, -38.0], [-20.0, -23.0], 
-[27.0, 65.0]], [[20.0, -33.0], [16.0, 31.0], [-18.0, -83.0], [-12.0, -67.0], [-35.0, -21.0]], [[73.0, 22.0], [-61.0, -60.0], 
-[20.0, 2.0], [19.0, 81.0], [-42.0, -63.0]]])
+      ref=msk_ref*numpy.array(-30.0)+(1.-msk_ref)*numpy.array(15.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank3_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, 5.0, 7.0], [-4.0, -1.0, 4.0]], [[5.0, 2.0, -2.0], [5.0, 1.0, 1.0]], [[4.0, -5.0, 3.0], 
-[1.0, -4.0, -7.0]], [[5.0, 0.0, 4.0], [-6.0, 0.0, -2.0]], [[-3.0, 7.0, -4.0], [3.0, 0.0, 0.0]]], [[[5.0, 7.0, -7.0], [-7.0, 
--1.0, 5.0]], [[1.0, 0.0, -3.0], [5.0, -6.0, 7.0]], [[-3.0, -7.0, 4.0], [-2.0, 0.0, 0.0]], [[3.0, -1.0, 0.0], [2.0, 3.0, -2.0]], 
-[[3.0, -7.0, -7.0], [-5.0, 4.0, 3.0]]], [[[6.0, -4.0, -4.0], [-5.0, -6.0, -4.0]], [[2.0, 2.0, 1.0], [-4.0, -1.0, 3.0]], [[2.0, 
-0.0, 4.0], [-7.0, 0.0, 0.0]], [[-6.0, 5.0, 0.0], [-1.0, 1.0, -5.0]], [[-5.0, -2.0, 0.0], [-6.0, -5.0, 4.0]]], [[[7.0, 1.0, 
-3.0], [6.0, 2.0, -1.0]], [[2.0, 0.0, 0.0], [3.0, 0.0, 1.0]], [[-1.0, 7.0, -1.0], [2.0, -3.0, -4.0]], [[7.0, 6.0, 4.0], [-6.0, 
-2.0, 7.0]], [[-4.0, 0.0, -7.0], [6.0, -7.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -2.0, -2.0], [2.0, -5.0, 7.0]], 
-[[-6.0, -6.0, 3.0], [1.0, 1.0, -7.0]], [[4.0, -3.0, 4.0], [-7.0, 3.0, 1.0]], [[2.0, 3.0, -1.0], [-6.0, 1.0, 1.0]], [[3.0, 1.0, 
-4.0], [3.0, -4.0, 3.0]]], [[[0.0, 7.0, -2.0], [-4.0, 6.0, 0.0]], [[4.0, -6.0, 0.0], [-6.0, 3.0, -4.0]], [[0.0, 5.0, -6.0], 
-[0.0, -1.0, 6.0]], [[-5.0, -5.0, -5.0], [6.0, 0.0, -7.0]], [[-7.0, -7.0, 0.0], [-6.0, 3.0, -1.0]]], [[[0.0, -4.0, -6.0], [-7.0, 
-3.0, 6.0]], [[0.0, 4.0, 0.0], [-4.0, 7.0, 5.0]], [[4.0, -2.0, 7.0], [1.0, 0.0, 6.0]], [[-2.0, 5.0, -4.0], [0.0, -2.0, -2.0]], 
-[[6.0, 2.0, -4.0], [-7.0, -5.0, -1.0]]], [[[0.0, -2.0, 1.0], [3.0, -5.0, 4.0]], [[-7.0, 0.0, 0.0], [-5.0, 6.0, -2.0]], [[0.0, 
-0.0, 3.0], [-6.0, 1.0, -5.0]], [[-5.0, -1.0, 7.0], [0.0, 5.0, -1.0]], [[1.0, -3.0, -6.0], [-7.0, -6.0, -3.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[-1.0, 3.0, -2.0], [6.0, 1.0, 5.0]], [[1.0, 6.0, -3.0], [2.0, -1.0, 
-0.0]]])+(1.-msk_arg1)*numpy.array([[[-1.0, 0.0, 0.0], [2.0, -2.0, 6.0]], [[5.0, -7.0, 0.0], [0.0, 4.0, 7.0]]])
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[-5.0, 0.0, 6.0], [-5.0, -3.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 1.0, 7.0], [-6.0, -2.0, 4.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[7.0, 2.0, 7.0], [6.0, 0.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, 0.0, -6.0], [0.0, -4.0, 7.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, 4.0], [41.0, 32.0], [-58.0, -29.0], [-59.0, -19.0], [50.0, 57.0]], [[12.0, 55.0], [64.0, 
-26.0], [-38.0, -61.0], [-1.0, -2.0], [-21.0, -32.0]], [[-66.0, -10.0], [-8.0, 4.0], [-52.0, -24.0], [-9.0, 21.0], [-22.0, 
--24.0]], [[23.0, 14.0], [21.0, 8.0], [13.0, 51.0], [4.0, 17.0], [47.0, 36.0]]])+(1.-msk_ref)*numpy.array([[[62.0, 13.0], 
-[-36.0, -33.0], [-18.0, 60.0], [-10.0, 0.0], [29.0, 13.0]], [[-20.0, -25.0], [-46.0, 46.0], [38.0, 3.0], [-25.0, -39.0], 
-[-17.0, 19.0]], [[16.0, 82.0], [8.0, 35.0], [34.0, 76.0], [-6.0, -67.0], [-16.0, -11.0]], [[40.0, 22.0], [-27.0, -25.0], 
-[-44.0, -31.0], [-11.0, -5.0], [-21.0, -19.0]]])
+      ref=msk_ref*numpy.array(-23.0)+(1.-msk_ref)*numpy.array(-6.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank2_expandedData_rank2_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[7.0, 0.0, 5.0, 1.0, -2.0], [-2.0, -6.0, 0.0, 0.0, 2.0], [-6.0, -5.0, 0.0, -5.0, -3.0], [-3.0, 
--5.0, -6.0, -5.0, -7.0]])+(1.-msk_arg0)*numpy.array([[0.0, 6.0, 7.0, 5.0, -4.0], [0.0, 7.0, 2.0, 6.0, -3.0], [3.0, 5.0, 2.0, 
--6.0, -2.0], [-3.0, 0.0, 4.0, 7.0, 7.0]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[-2.0, 2.0, -1.0, -7.0, 2.0], [-6.0, 7.0, -5.0, 6.0, 0.0], [2.0, -6.0, 3.0, 4.0, -5.0], [-5.0, 
--4.0, 4.0, 3.0, 5.0]])+(1.-msk_arg1)*numpy.array([[5.0, -3.0, 4.0, -5.0, -3.0], [-3.0, -1.0, -2.0, -2.0, 6.0], [-6.0, 1.0, 3.0, 
-0.0, -1.0], [7.0, 1.0, -4.0, -7.0, 6.0]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[-6.0, -6.0, -7.0], [1.0, 1.0, -6.0], [-4.0, -5.0, 1.0], [0.0, -2.0, 6.0]], [[-1.0, 2.0, -4.0], 
+[2.0, 1.0, 1.0], [1.0, 0.0, 7.0], [-1.0, 6.0, -5.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-4.0, -2.0, -4.0], [-4.0, 6.0, -5.0], [3.0, 5.0, -2.0], [2.0, 1.0, 1.0]], [[0.0, 
+-7.0, 0.0], [-6.0, -4.0, 7.0], [1.0, 5.0, 2.0], [7.0, 0.0, 2.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[2.0, 0.0, 0.0], [4.0, 3.0, -7.0], [5.0, 1.0, -5.0], [-6.0, -7.0, 2.0]], [[5.0, 1.0, 1.0], [-5.0, 
+7.0, -1.0], [-5.0, -2.0, -1.0], [0.0, -7.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, -7.0, -3.0], [-3.0, -2.0, 4.0], [7.0, -3.0, 6.0], [5.0, -4.0, -3.0]], [[6.0, 
+-1.0, 5.0], [-5.0, -2.0, 0.0], [2.0, 1.0, 6.0], [2.0, 4.0, 2.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-14.0, 14.0, -7.0, -49.0, 14.0], [-42.0, 49.0, -35.0, 42.0, 0.0], [14.0, -42.0, 21.0, 28.0, 
--35.0], [-35.0, -28.0, 28.0, 21.0, 35.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0]], [[-10.0, 10.0, -5.0, -35.0, 10.0], [-30.0, 35.0, -25.0, 30.0, 0.0], [10.0, -30.0, 15.0, 20.0, 
--25.0], [-25.0, -20.0, 20.0, 15.0, 25.0]], [[-2.0, 2.0, -1.0, -7.0, 2.0], [-6.0, 7.0, -5.0, 6.0, 0.0], [2.0, -6.0, 3.0, 4.0, 
--5.0], [-5.0, -4.0, 4.0, 3.0, 5.0]], [[4.0, -4.0, 2.0, 14.0, -4.0], [12.0, -14.0, 10.0, -12.0, 0.0], [-4.0, 12.0, -6.0, -8.0, 
-10.0], [10.0, 8.0, -8.0, -6.0, -10.0]]], [[[4.0, -4.0, 2.0, 14.0, -4.0], [12.0, -14.0, 10.0, -12.0, 0.0], [-4.0, 12.0, -6.0, 
--8.0, 10.0], [10.0, 8.0, -8.0, -6.0, -10.0]], [[12.0, -12.0, 6.0, 42.0, -12.0], [36.0, -42.0, 30.0, -36.0, 0.0], [-12.0, 36.0, 
--18.0, -24.0, 30.0], [30.0, 24.0, -24.0, -18.0, -30.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 
-0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[-4.0, 4.0, -2.0, -14.0, 4.0], [-12.0, 14.0, -10.0, 12.0, 0.0], [4.0, -12.0, 6.0, 8.0, -10.0], [-10.0, 
--8.0, 8.0, 6.0, 10.0]]], [[[12.0, -12.0, 6.0, 42.0, -12.0], [36.0, -42.0, 30.0, -36.0, 0.0], [-12.0, 36.0, -18.0, -24.0, 30.0], 
-[30.0, 24.0, -24.0, -18.0, -30.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, -35.0, 25.0, -30.0, 0.0], [-10.0, 30.0, -15.0, 
--20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, -35.0, 25.0, -30.0, 0.0], [-10.0, 30.0, -15.0, 
--20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[6.0, -6.0, 3.0, 21.0, -6.0], [18.0, -21.0, 15.0, -18.0, 0.0], [-6.0, 18.0, 
--9.0, -12.0, 15.0], [15.0, 12.0, -12.0, -9.0, -15.0]]], [[[6.0, -6.0, 3.0, 21.0, -6.0], [18.0, -21.0, 15.0, -18.0, 0.0], [-6.0, 
-18.0, -9.0, -12.0, 15.0], [15.0, 12.0, -12.0, -9.0, -15.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, -35.0, 25.0, -30.0, 0.0], 
-[-10.0, 30.0, -15.0, -20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[12.0, -12.0, 6.0, 42.0, -12.0], [36.0, -42.0, 30.0, 
--36.0, 0.0], [-12.0, 36.0, -18.0, -24.0, 30.0], [30.0, 24.0, -24.0, -18.0, -30.0]], [[10.0, -10.0, 5.0, 35.0, -10.0], [30.0, 
--35.0, 25.0, -30.0, 0.0], [-10.0, 30.0, -15.0, -20.0, 25.0], [25.0, 20.0, -20.0, -15.0, -25.0]], [[14.0, -14.0, 7.0, 49.0, 
--14.0], [42.0, -49.0, 35.0, -42.0, 0.0], [-14.0, 42.0, -21.0, -28.0, 35.0], [35.0, 28.0, -28.0, -21.0, 
--35.0]]]])+(1.-msk_ref)*numpy.array([[[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 
-0.0, 0.0, 0.0, 0.0]], [[30.0, -18.0, 24.0, -30.0, -18.0], [-18.0, -6.0, -12.0, -12.0, 36.0], [-36.0, 6.0, 18.0, 0.0, -6.0], 
-[42.0, 6.0, -24.0, -42.0, 36.0]], [[35.0, -21.0, 28.0, -35.0, -21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], [-42.0, 7.0, 21.0, 
-0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]], [[25.0, -15.0, 20.0, -25.0, -15.0], [-15.0, -5.0, -10.0, -10.0, 30.0], [-30.0, 
-5.0, 15.0, 0.0, -5.0], [35.0, 5.0, -20.0, -35.0, 30.0]], [[-20.0, 12.0, -16.0, 20.0, 12.0], [12.0, 4.0, 8.0, 8.0, -24.0], 
-[24.0, -4.0, -12.0, 0.0, 4.0], [-28.0, -4.0, 16.0, 28.0, -24.0]]], [[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
-[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[35.0, -21.0, 28.0, -35.0, -21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], 
-[-42.0, 7.0, 21.0, 0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]], [[10.0, -6.0, 8.0, -10.0, -6.0], [-6.0, -2.0, -4.0, -4.0, 
-12.0], [-12.0, 2.0, 6.0, 0.0, -2.0], [14.0, 2.0, -8.0, -14.0, 12.0]], [[30.0, -18.0, 24.0, -30.0, -18.0], [-18.0, -6.0, -12.0, 
--12.0, 36.0], [-36.0, 6.0, 18.0, 0.0, -6.0], [42.0, 6.0, -24.0, -42.0, 36.0]], [[-15.0, 9.0, -12.0, 15.0, 9.0], [9.0, 3.0, 6.0, 
-6.0, -18.0], [18.0, -3.0, -9.0, 0.0, 3.0], [-21.0, -3.0, 12.0, 21.0, -18.0]]], [[[15.0, -9.0, 12.0, -15.0, -9.0], [-9.0, -3.0, 
--6.0, -6.0, 18.0], [-18.0, 3.0, 9.0, 0.0, -3.0], [21.0, 3.0, -12.0, -21.0, 18.0]], [[25.0, -15.0, 20.0, -25.0, -15.0], [-15.0, 
--5.0, -10.0, -10.0, 30.0], [-30.0, 5.0, 15.0, 0.0, -5.0], [35.0, 5.0, -20.0, -35.0, 30.0]], [[10.0, -6.0, 8.0, -10.0, -6.0], 
-[-6.0, -2.0, -4.0, -4.0, 12.0], [-12.0, 2.0, 6.0, 0.0, -2.0], [14.0, 2.0, -8.0, -14.0, 12.0]], [[-30.0, 18.0, -24.0, 30.0, 
-18.0], [18.0, 6.0, 12.0, 12.0, -36.0], [36.0, -6.0, -18.0, 0.0, 6.0], [-42.0, -6.0, 24.0, 42.0, -36.0]], [[-10.0, 6.0, -8.0, 
-10.0, 6.0], [6.0, 2.0, 4.0, 4.0, -12.0], [12.0, -2.0, -6.0, 0.0, 2.0], [-14.0, -2.0, 8.0, 14.0, -12.0]]], [[[-15.0, 9.0, -12.0, 
-15.0, 9.0], [9.0, 3.0, 6.0, 6.0, -18.0], [18.0, -3.0, -9.0, 0.0, 3.0], [-21.0, -3.0, 12.0, 21.0, -18.0]], [[0.0, 0.0, 0.0, 0.0, 
-0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[20.0, -12.0, 16.0, -20.0, -12.0], 
-[-12.0, -4.0, -8.0, -8.0, 24.0], [-24.0, 4.0, 12.0, 0.0, -4.0], [28.0, 4.0, -16.0, -28.0, 24.0]], [[35.0, -21.0, 28.0, -35.0, 
--21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], [-42.0, 7.0, 21.0, 0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]], [[35.0, -21.0, 
-28.0, -35.0, -21.0], [-21.0, -7.0, -14.0, -14.0, 42.0], [-42.0, 7.0, 21.0, 0.0, -7.0], [49.0, 7.0, -28.0, -49.0, 42.0]]]])
+      ref=msk_ref*numpy.array(-62.0)+(1.-msk_ref)*numpy.array(81.0)
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank3_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, 3.0, 7.0], [-6.0, -5.0, 1.0], [-2.0, 6.0, -1.0], [-7.0, -2.0, 6.0], [3.0, 4.0, 6.0]], 
-[[-4.0, 6.0, 6.0], [4.0, -5.0, -6.0], [1.0, -1.0, 7.0], [-7.0, 7.0, 0.0], [4.0, 5.0, 2.0]], [[1.0, 2.0, 0.0], [4.0, 3.0, -4.0], 
-[-7.0, 1.0, 0.0], [3.0, 0.0, 4.0], [0.0, -3.0, -1.0]], [[0.0, -7.0, -6.0], [2.0, 7.0, -1.0], [0.0, -3.0, -3.0], [-4.0, 3.0, 
-2.0], [6.0, 4.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[2.0, -4.0, -1.0], [-6.0, -6.0, 4.0], [4.0, 6.0, -6.0], [-7.0, -1.0, 7.0], 
-[0.0, -1.0, -1.0]], [[5.0, 4.0, 7.0], [3.0, -2.0, 4.0], [-7.0, -3.0, -7.0], [2.0, 3.0, -7.0], [-5.0, 7.0, 0.0]], [[-4.0, 0.0, 
--7.0], [-1.0, 5.0, -1.0], [-3.0, -4.0, -1.0], [-1.0, 5.0, 0.0], [2.0, -5.0, -5.0]], [[-1.0, -5.0, -3.0], [-6.0, 1.0, -1.0], 
-[6.0, -5.0, -1.0], [5.0, -4.0, 3.0], [-3.0, -6.0, -6.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[5.0, 4.0, -3.0], [-7.0, -4.0, 3.0], [4.0, -5.0, 0.0], [-2.0, 0.0, 7.0], [-2.0, 1.0, 7.0]], 
-[[5.0, 2.0, 2.0], [-1.0, 3.0, -6.0], [-3.0, 7.0, 6.0], [5.0, 4.0, 7.0], [2.0, -2.0, -1.0]], [[0.0, 0.0, 5.0], [3.0, 4.0, -5.0], 
-[-7.0, 6.0, -7.0], [0.0, -7.0, 2.0], [3.0, -4.0, 5.0]], [[-4.0, -5.0, 6.0], [-5.0, -2.0, -4.0], [-4.0, -1.0, -2.0], [5.0, 0.0, 
--6.0], [-2.0, -5.0, 4.0]]])+(1.-msk_arg1)*numpy.array([[[-6.0, 6.0, 4.0], [5.0, 6.0, -2.0], [0.0, 3.0, 1.0], [6.0, -3.0, -4.0], 
-[2.0, 3.0, -5.0]], [[-7.0, -1.0, -1.0], [-7.0, 6.0, 3.0], [-6.0, -2.0, 1.0], [2.0, -6.0, 3.0], [-5.0, 3.0, -5.0]], [[-5.0, 
--2.0, 0.0], [-7.0, -1.0, 0.0], [-3.0, -7.0, -5.0], [-3.0, -3.0, 0.0], [0.0, -7.0, 6.0]], [[5.0, 5.0, -1.0], [-7.0, 0.0, -1.0], 
-[7.0, 1.0, -3.0], [-1.0, -3.0, -4.0], [-2.0, -1.0, -7.0]]])
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank4_offset4(self):
+      arg0=Data(numpy.array([[[[-2.0, -6.0], [-4.0, 5.0], [4.0, -4.0]], [[-3.0, -5.0], [-4.0, 0.0], [4.0, -1.0]]], [[[6.0, 
+6.0], [6.0, 7.0], [7.0, 0.0]], [[7.0, 0.0], [-2.0, -2.0], [4.0, -4.0]]], [[[2.0, 6.0], [-7.0, 5.0], [4.0, -5.0]], [[-4.0, 
+-3.0], [1.0, -6.0], [4.0, -6.0]]], [[[-1.0, -7.0], [-1.0, -5.0], [-6.0, -7.0]], [[-1.0, 7.0], [0.0, 7.0], [1.0, 
+7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-2.0, 0.0], [1.0, -5.0], [-7.0, 3.0]], [[4.0, 1.0], [-4.0, -4.0], [4.0, -3.0]]], 
+[[[-2.0, -5.0], [3.0, -4.0], [-4.0, -1.0]], [[2.0, -1.0], [-3.0, 2.0], [6.0, 0.0]]], [[[-4.0, 6.0], [-7.0, -3.0], [-5.0, 2.0]], 
+[[2.0, -1.0], [1.0, -1.0], [-1.0, -1.0]]], [[[-6.0, -1.0], [-6.0, 1.0], [-2.0, 2.0]], [[0.0, -2.0], [4.0, 3.0], [5.0, 7.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-7.0, 5.0], [4.0, -2.0], [5.0, 5.0]], [[0.0, 2.0], [0.0, -4.0], [6.0, -4.0]]], [[[3.0, -6.0], 
+[-2.0, -1.0], [4.0, 5.0]], [[-6.0, -4.0], [7.0, 0.0], [-4.0, 1.0]]], [[[-5.0, -6.0], [-1.0, 3.0], [-4.0, 4.0]], [[1.0, -7.0], 
+[-1.0, 6.0], [-5.0, 2.0]]], [[[5.0, 0.0], [0.0, -3.0], [0.0, -3.0]], [[1.0, 3.0], [0.0, 0.0], [-6.0, 
+-1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[1.0, -4.0], [-2.0, -5.0], [3.0, -6.0]], [[3.0, 7.0], [0.0, -1.0], [3.0, 3.0]]], 
+[[[-7.0, -6.0], [-5.0, -4.0], [-5.0, -3.0]], [[6.0, -7.0], [-7.0, -7.0], [2.0, -3.0]]], [[[-7.0, 3.0], [0.0, 4.0], [6.0, 0.0]], 
+[[0.0, 6.0], [-7.0, 4.0], [-7.0, 0.0]]], [[[5.0, -2.0], [4.0, -1.0], [-4.0, -3.0]], [[-7.0, 7.0], [7.0, -1.0], [1.0, -4.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=4)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-44.0, 58.0, -43.0, 63.0, 66.0], [-15.0, -26.0, 84.0, 26.0, -27.0], [35.0, -44.0, 18.0, -7.0, 
-2.0], [55.0, 1.0, 11.0, -77.0, 27.0]], [[-53.0, 65.0, 1.0, 19.0, 14.0], [-38.0, -15.0, -11.0, -43.0, -3.0], [5.0, -43.0, 5.0, 
-37.0, 7.0], [55.0, 36.0, 27.0, -36.0, 41.0]], [[17.0, -13.0, -38.0, -3.0, 3.0], [0.0, 26.0, 42.0, 7.0, -15.0], [-5.0, 23.0, 
-57.0, -44.0, -35.0], [-28.0, 2.0, 4.0, -4.0, -30.0]], [[-61.0, 75.0, -18.0, 56.0, 54.0], [-27.0, -35.0, 43.0, -1.0, -16.0], 
-[30.0, -59.0, -5.0, 26.0, 17.0], [74.0, 15.0, 18.0, -71.0, 48.0]], [[13.0, -19.0, -8.0, 36.0, 40.0], [35.0, -27.0, 55.0, 73.0, 
--8.0], [30.0, -5.0, -39.0, -16.0, 23.0], [4.0, -47.0, -28.0, -21.0, -2.0]]], [[[-14.0, 22.0, -46.0, 50.0, 56.0], [4.0, -14.0, 
-90.0, 46.0, -26.0], [30.0, -18.0, 22.0, -30.0, -6.0], [22.0, -16.0, -2.0, -56.0, 2.0]], [[18.0, -26.0, 41.0, -50.0, -55.0], 
-[-2.0, 17.0, -83.0, -42.0, 24.0], [-30.0, 22.0, -16.0, 23.0, 2.0], [-27.0, 14.0, 1.0, 56.0, -7.0]], [[-20.0, 18.0, 9.0, 47.0, 
-46.0], [17.0, -46.0, 32.0, 50.0, -3.0], [35.0, -36.0, -62.0, 21.0, 42.0], [43.0, -31.0, -17.0, -37.0, 31.0]], [[-7.0, 21.0, 
--63.0, 14.0, 21.0], [-21.0, 28.0, 70.0, -7.0, -28.0], [0.0, 7.0, 91.0, -49.0, -49.0], [-7.0, 21.0, 21.0, -35.0, -21.0]], 
-[[34.0, -42.0, -9.0, 6.0, 11.0], [34.0, -1.0, 35.0, 54.0, -4.0], [10.0, 22.0, -12.0, -31.0, 2.0], [-29.0, -38.0, -25.0, 8.0, 
--25.0]]], [[[13.0, -15.0, -6.0, -2.0, 0.0], [9.0, 5.0, 11.0, 13.0, -2.0], [0.0, 11.0, 5.0, -14.0, -5.0], [-14.0, -9.0, -6.0, 
-5.0, -12.0]], [[44.0, -52.0, 1.0, -36.0, -33.0], [18.0, 29.0, -15.0, 4.0, 6.0], [-20.0, 44.0, 18.0, -29.0, -20.0], [-55.0, 
--10.0, -11.0, 44.0, -39.0]], [[-31.0, 45.0, -33.0, 14.0, 15.0], [-33.0, 10.0, 28.0, -31.0, -16.0], [0.0, -17.0, 55.0, -7.0, 
--25.0], [23.0, 33.0, 27.0, -35.0, 9.0]], [[3.0, -9.0, 12.0, 22.0, 22.0], [23.0, -27.0, 15.0, 43.0, 2.0], [20.0, -11.0, -49.0, 
-8.0, 29.0], [12.0, -31.0, -20.0, -9.0, 10.0]], [[-9.0, 9.0, 15.0, -7.0, -10.0], [-8.0, -3.0, -27.0, -19.0, 7.0], [-5.0, -7.0, 
--11.0, 19.0, 7.0], [9.0, 10.0, 5.0, 6.0, 11.0]]], [[[-10.0, 10.0, 35.0, -42.0, -49.0], [-26.0, 15.0, -85.0, -70.0, 20.0], 
-[-30.0, 2.0, 0.0, 37.0, -2.0], [-1.0, 38.0, 19.0, 36.0, 11.0]], [[41.0, -45.0, -27.0, -11.0, -4.0], [22.0, 25.0, 37.0, 31.0, 
--9.0], [-5.0, 39.0, 35.0, -51.0, -27.0], [-49.0, -20.0, -13.0, 16.0, -43.0]], [[-3.0, 3.0, 15.0, -21.0, -24.0], [-12.0, 9.0, 
--39.0, -33.0, 9.0], [-15.0, 3.0, 3.0, 15.0, -3.0], [-3.0, 18.0, 9.0, 18.0, 3.0]], [[-14.0, 22.0, -31.0, 22.0, 25.0], [-10.0, 
-1.0, 45.0, 6.0, -16.0], [10.0, -10.0, 32.0, -17.0, -14.0], [13.0, 6.0, 9.0, -32.0, 1.0]], [[25.0, -37.0, 4.0, 37.0, 41.0], 
-[52.0, -36.0, 52.0, 95.0, -3.0], [35.0, -1.0, -67.0, -14.0, 37.0], [-2.0, -66.0, -42.0, -12.0, 
--4.0]]]])+(1.-msk_ref)*numpy.array([[[[-40.0, -12.0, -13.0, 28.0, -3.0], [-9.0, -41.0, -5.0, 25.0, -17.0], [-2.0, -10.0, 27.0, 
-6.0, 22.0], [-9.0, -13.0, 13.0, 14.0, 7.0]], [[16.0, -74.0, -14.0, -34.0, -50.0], [44.0, 18.0, 52.0, 36.0, -8.0], [42.0, 48.0, 
-40.0, 36.0, 66.0], [-64.0, 38.0, -60.0, 8.0, -10.0]], [[-12.0, 68.0, 12.0, 30.0, 56.0], [-28.0, -10.0, -42.0, -46.0, 28.0], 
-[-32.0, -34.0, -24.0, -30.0, -78.0], [56.0, -22.0, 52.0, 2.0, 28.0]], [[64.0, -55.0, 4.0, -67.0, -52.0], [43.0, 64.0, 51.0, 
-13.0, -3.0], [37.0, 50.0, -7.0, 24.0, 49.0], [-47.0, 42.0, -71.0, -18.0, -34.0]], [[-10.0, -4.0, -4.0, 7.0, 2.0], [2.0, -9.0, 
-1.0, 3.0, 2.0], [2.0, 1.0, 12.0, 3.0, 1.0], [-4.0, 1.0, 2.0, 7.0, 8.0]]], [[[22.0, 35.0, 19.0, -10.0, -13.0], [-46.0, 10.0, 
--31.0, 7.0, -48.0], [-33.0, -39.0, -78.0, -27.0, 14.0], [38.0, -42.0, 18.0, -45.0, -63.0]], [[-14.0, -5.0, -2.0, 8.0, -20.0], 
-[-23.0, -21.0, -10.0, 30.0, -41.0], [-11.0, -19.0, -15.0, -3.0, 38.0], [1.0, -25.0, 7.0, -13.0, -32.0]], [[-4.0, -39.0, -16.0, 
--5.0, 12.0], [59.0, 10.0, 41.0, -17.0, 61.0], [41.0, 52.0, 77.0, 30.0, -21.0], [-43.0, 56.0, -31.0, 44.0, 66.0]], [[-22.0, 
-42.0, 2.0, 31.0, 48.0], [-10.0, -17.0, -25.0, -35.0, 34.0], [-16.0, -17.0, 8.0, -15.0, -63.0], [32.0, -7.0, 38.0, 17.0, 42.0]], 
-[[72.0, 17.0, 21.0, -51.0, 11.0], [28.0, 77.0, 16.0, -52.0, 46.0], [11.0, 28.0, -34.0, -6.0, -49.0], [10.0, 35.0, -28.0, -16.0, 
-3.0]]], [[[-4.0, -6.0, -7.0, 4.0, 27.0], [35.0, 7.0, 17.0, -29.0, 55.0], [20.0, 28.0, 47.0, 12.0, -42.0], [-13.0, 35.0, -7.0, 
-32.0, 57.0]], [[32.0, 27.0, 14.0, -17.0, 18.0], [3.0, 34.0, -5.0, -35.0, 25.0], [-5.0, 2.0, -27.0, -12.0, -41.0], [21.0, 8.0, 
-1.0, -10.0, 4.0]], [[-10.0, -37.0, -13.0, -2.0, -13.0], [26.0, -6.0, 25.0, 15.0, 8.0], [23.0, 25.0, 42.0, 21.0, 22.0], [-34.0, 
-22.0, -22.0, 19.0, 17.0]], [[36.0, 25.0, 15.0, -21.0, 13.0], [2.0, 37.0, -4.0, -32.0, 20.0], [-5.0, 2.0, -32.0, -12.0, -35.0], 
-[20.0, 7.0, -2.0, -14.0, -3.0]], [[-62.0, -10.0, -20.0, 47.0, 14.0], [-4.0, -59.0, -7.0, 19.0, 0.0], [0.0, -9.0, 54.0, 9.0, 
-5.0], [-10.0, -9.0, 24.0, 33.0, 36.0]]], [[[-36.0, -29.0, -18.0, 21.0, -2.0], [15.0, -32.0, 13.0, 19.0, 5.0], [15.0, 12.0, 
-53.0, 18.0, 17.0], [-27.0, 10.0, -3.0, 28.0, 28.0]], [[38.0, -22.0, 2.0, -35.0, -4.0], [42.0, 45.0, 33.0, -21.0, 38.0], [28.0, 
-41.0, 16.0, 15.0, -13.0], [-24.0, 43.0, -38.0, 7.0, 18.0]], [[-70.0, 2.0, -16.0, 55.0, 2.0], [-36.0, -75.0, -27.0, 39.0, 
--40.0], [-20.0, -37.0, 22.0, -3.0, 29.0], [6.0, -41.0, 40.0, 13.0, 0.0]], [[-42.0, -5.0, -9.0, 30.0, -17.0], [-34.0, -50.0, 
--19.0, 43.0, -52.0], [-17.0, -31.0, -2.0, -3.0, 46.0], [2.0, -38.0, 22.0, -5.0, -27.0]], [[-42.0, -39.0, -24.0, 24.0, 6.0], 
-[33.0, -33.0, 24.0, 12.0, 27.0], [27.0, 27.0, 81.0, 27.0, 6.0], [-39.0, 27.0, -9.0, 45.0, 54.0]]]])
+      ref=msk_ref*numpy.array(-183.0)+(1.-msk_ref)*numpy.array(45.0)
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_taggedData_rank1_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg0.expand()
+      arg1=Data(numpy.array([-4.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([2.0, -4.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-0.0, 0.0])+(1.-msk_ref)*numpy.array([0.0, -0.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([-2.0, -7.0, 7.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 4.0, 0.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[7.0, -1.0, 7.0], [2.0, -3.0, 1.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, 0.0, -1.0], [-7.0, -5.0, -2.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([42.0, 24.0])+(1.-msk_ref)*numpy.array([0.0, -20.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank4_offset2(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, 4.0, 0.0], [0.0, -5.0, 0.0]], [[0.0, -2.0, -2.0], [-7.0, 4.0, 2.0]], [[6.0, -7.0, 
-2.0], [4.0, 1.0, -2.0]], [[-6.0, 3.0, 0.0], [0.0, -3.0, 6.0]], [[-5.0, 1.0, 4.0], [-7.0, -6.0, 6.0]]], [[[0.0, 5.0, 2.0], [3.0, 
--1.0, 3.0]], [[7.0, -1.0, 0.0], [-1.0, 4.0, 0.0]], [[-1.0, 0.0, -2.0], [7.0, -4.0, 1.0]], [[-3.0, 7.0, 0.0], [7.0, -3.0, 7.0]], 
-[[-7.0, -3.0, -7.0], [4.0, 4.0, -5.0]]], [[[-5.0, -1.0, 7.0], [0.0, -6.0, -5.0]], [[-2.0, 3.0, -6.0], [2.0, 0.0, 5.0]], [[0.0, 
--6.0, 6.0], [1.0, 1.0, 3.0]], [[1.0, -6.0, 0.0], [2.0, 0.0, -3.0]], [[4.0, 6.0, 7.0], [-5.0, 5.0, -2.0]]], [[[0.0, 3.0, -2.0], 
-[2.0, -2.0, 5.0]], [[-4.0, 2.0, -1.0], [-1.0, -2.0, 7.0]], [[1.0, -7.0, -4.0], [-4.0, 5.0, 2.0]], [[-5.0, 2.0, -1.0], [-2.0, 
-0.0, 5.0]], [[0.0, -5.0, 4.0], [4.0, 0.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[-5.0, -6.0, 5.0], [-6.0, 0.0, -3.0]], [[2.0, 
-0.0, 4.0], [-7.0, 0.0, 7.0]], [[5.0, -2.0, -5.0], [-6.0, 0.0, 1.0]], [[0.0, 6.0, 4.0], [7.0, -2.0, 5.0]], [[-7.0, 2.0, -7.0], 
-[4.0, -3.0, 6.0]]], [[[5.0, -3.0, 1.0], [-3.0, -1.0, 5.0]], [[-1.0, 0.0, -4.0], [-5.0, -5.0, -1.0]], [[-3.0, -4.0, -3.0], [5.0, 
-5.0, -1.0]], [[-4.0, 0.0, 2.0], [-4.0, -7.0, -1.0]], [[1.0, -6.0, 2.0], [5.0, 0.0, -3.0]]], [[[-2.0, 0.0, -7.0], [2.0, -4.0, 
-3.0]], [[-1.0, -6.0, 1.0], [-7.0, -2.0, -4.0]], [[1.0, -2.0, 0.0], [-7.0, 5.0, -5.0]], [[4.0, -4.0, 0.0], [3.0, 0.0, 4.0]], 
-[[0.0, -7.0, 7.0], [2.0, -7.0, -4.0]]], [[[-6.0, -6.0, 3.0], [0.0, -6.0, -7.0]], [[5.0, -6.0, -1.0], [7.0, -5.0, 2.0]], [[0.0, 
-1.0, 5.0], [5.0, -6.0, 3.0]], [[-2.0, 4.0, 1.0], [-4.0, -2.0, -7.0]], [[-3.0, 3.0, -4.0], [5.0, -6.0, -2.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[[[0.0, -3.0, -2.0], [5.0, 7.0, 6.0]], [[1.0, 5.0, 1.0], [-1.0, 5.0, -3.0]], [[0.0, 1.0, 6.0], 
-[-2.0, 6.0, 5.0]], [[0.0, -5.0, 5.0], [-2.0, 4.0, -7.0]], [[-3.0, -4.0, 6.0], [1.0, 6.0, -7.0]]], [[[-3.0, 1.0, 3.0], [7.0, 
--2.0, -5.0]], [[6.0, 3.0, -3.0], [4.0, 6.0, 4.0]], [[0.0, 0.0, 5.0], [-6.0, 0.0, 2.0]], [[0.0, -6.0, -3.0], [4.0, -2.0, -2.0]], 
-[[-2.0, -2.0, 3.0], [5.0, 7.0, -5.0]]], [[[-3.0, -4.0, -2.0], [-5.0, -6.0, -3.0]], [[1.0, 7.0, 6.0], [-5.0, 3.0, -6.0]], 
-[[-2.0, 1.0, 2.0], [2.0, 5.0, 0.0]], [[2.0, -6.0, 6.0], [6.0, 2.0, 1.0]], [[7.0, 6.0, -5.0], [2.0, 2.0, -7.0]]], [[[2.0, -3.0, 
--6.0], [5.0, 0.0, 3.0]], [[-5.0, -4.0, 7.0], [3.0, -6.0, -1.0]], [[-5.0, -4.0, 7.0], [-6.0, -3.0, 0.0]], [[-4.0, 0.0, 1.0], 
-[0.0, -6.0, -7.0]], [[-7.0, 0.0, 0.0], [7.0, 1.0, 4.0]]]])+(1.-msk_arg1)*numpy.array([[[[-6.0, -6.0, -5.0], [2.0, -3.0, 3.0]], 
-[[1.0, 4.0, 2.0], [-4.0, 1.0, 7.0]], [[-6.0, 2.0, -2.0], [7.0, -7.0, -7.0]], [[6.0, -1.0, 0.0], [0.0, 0.0, -3.0]], [[-1.0, 5.0, 
-2.0], [-7.0, -1.0, 7.0]]], [[[-6.0, -2.0, 6.0], [6.0, 3.0, -5.0]], [[-2.0, -7.0, -5.0], [6.0, 5.0, -5.0]], [[0.0, -2.0, 3.0], 
-[0.0, 3.0, 1.0]], [[6.0, -3.0, 1.0], [4.0, -4.0, 6.0]], [[1.0, 7.0, 4.0], [-7.0, -7.0, 3.0]]], [[[-7.0, -5.0, 0.0], [4.0, 1.0, 
-1.0]], [[-7.0, 1.0, -2.0], [1.0, 2.0, -3.0]], [[3.0, 0.0, 6.0], [-6.0, 2.0, 7.0]], [[6.0, 3.0, -5.0], [-1.0, -6.0, -4.0]], 
-[[5.0, -5.0, 2.0], [-2.0, -3.0, 7.0]]], [[[7.0, -6.0, -4.0], [-5.0, 5.0, -1.0]], [[4.0, 6.0, 5.0], [3.0, -6.0, -6.0]], [[4.0, 
-6.0, -1.0], [-5.0, -7.0, -4.0]], [[6.0, 6.0, 1.0], [5.0, -1.0, 2.0]], [[-7.0, -1.0, -5.0], [6.0, 7.0, -4.0]]]])
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[5.0, 0.0, 6.0], [1.0, 2.0, 4.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 1.0, 2.0], [0.0, 5.0, -1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[1.0, 6.0, 4.0], [1.0, -4.0, 7.0]], [[3.0, 0.0, -3.0], [-6.0, -4.0, 1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, 0.0, 2.0], [5.0, -4.0, 1.0]], [[5.0, -5.0, -6.0], [-4.0, 5.0, 2.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-47.0, -3.0, -26.0, -40.0, -52.0], [8.0, -6.0, 0.0, -14.0, -47.0], [8.0, 15.0, -25.0, -30.0, 
-28.0], [-8.0, 4.0, -11.0, 22.0, -19.0]], [[15.0, 9.0, 34.0, 16.0, -1.0], [-75.0, 4.0, 36.0, -22.0, -19.0], [17.0, 9.0, 0.0, 
--32.0, -22.0], [-11.0, -53.0, 24.0, -40.0, -37.0]], [[32.0, -20.0, -7.0, 55.0, 46.0], [17.0, 23.0, -18.0, 54.0, 45.0], [-14.0, 
--36.0, -2.0, 90.0, 14.0], [35.0, 20.0, -15.0, -14.0, -21.0]], [[6.0, -24.0, 15.0, -69.0, -54.0], [-3.0, -21.0, 12.0, -24.0, 
--45.0], [6.0, -30.0, 0.0, -30.0, -72.0], [-3.0, 30.0, 27.0, 0.0, 63.0]], [[-52.0, -37.0, 33.0, -37.0, -50.0], [-39.0, -79.0, 
-74.0, -46.0, -87.0], [56.0, 7.0, -25.0, -40.0, -117.0], [-54.0, 58.0, 109.0, 18.0, 4.0]]], [[[7.0, 10.0, 20.0, -46.0, -32.0], 
-[19.0, 27.0, -2.0, -28.0, -11.0], [-42.0, 11.0, 10.0, 1.0, 3.0], [-3.0, 6.0, -21.0, -13.0, 32.0]], [[26.0, 23.0, 25.0, 23.0, 
-6.0], [-37.0, 59.0, 6.0, -6.0, 11.0], [-36.0, 17.0, 3.0, 22.0, 49.0], [12.0, -58.0, -37.0, -52.0, -52.0]], [[17.0, -33.0, 
--45.0, -47.0, -33.0], [49.0, 8.0, -50.0, 40.0, -2.0], [-7.0, -66.0, -8.0, 21.0, 2.0], [48.0, 35.0, -39.0, 19.0, 56.0]], [[35.0, 
--11.0, 10.0, -110.0, -79.0], [36.0, 41.0, -28.0, -22.0, -29.0], [-57.0, -40.0, 12.0, -5.0, -20.0], [29.0, 19.0, -46.0, -19.0, 
-95.0]], [[41.0, 2.0, -54.0, 23.0, 54.0], [42.0, -10.0, -69.0, 57.0, 72.0], [18.0, -48.0, 25.0, -11.0, 19.0], [42.0, -9.0, 
--38.0, 32.0, 61.0]]], [[[-83.0, -18.0, -20.0, 51.0, 60.0], [72.0, -110.0, 25.0, 7.0, 16.0], [56.0, 42.0, -7.0, 21.0, -53.0], 
-[-64.0, 119.0, 96.0, 98.0, 9.0]], [[43.0, -10.0, -12.0, -84.0, -75.0], [-20.0, 43.0, -32.0, -2.0, -35.0], [-19.0, -57.0, -1.0, 
--41.0, 3.0], [48.0, -43.0, -56.0, -33.0, 48.0]], [[36.0, -29.0, 49.0, 41.0, 46.0], [2.0, -14.0, 30.0, 14.0, 27.0], [-8.0, 
--26.0, 13.0, 83.0, -83.0], [-4.0, 60.0, 57.0, -21.0, 20.0]], [[10.0, -22.0, -25.0, 47.0, 44.0], [20.0, -16.0, -18.0, 50.0, 
-35.0], [20.0, -33.0, -4.0, 47.0, -4.0], [21.0, 28.0, 7.0, 17.0, -5.0]], [[-34.0, 77.0, 78.0, 49.0, 45.0], [-20.0, 23.0, 61.0, 
--83.0, 21.0], [-49.0, 140.0, 27.0, -8.0, 43.0], [-83.0, -38.0, 20.0, -25.0, -66.0]]], [[[21.0, -14.0, 0.0, -72.0, -69.0], 
-[-10.0, 31.0, -12.0, -10.0, -41.0], [-21.0, -37.0, -7.0, -17.0, -7.0], [28.0, -13.0, -32.0, -25.0, 32.0]], [[19.0, -25.0, 21.0, 
--70.0, -64.0], [-27.0, -3.0, 15.0, -23.0, -53.0], [2.0, -39.0, -4.0, -29.0, -66.0], [8.0, 7.0, 17.0, -22.0, 47.0]], [[56.0, 
--15.0, 17.0, 29.0, 13.0], [-70.0, 19.0, 8.0, 24.0, 5.0], [17.0, -49.0, 0.0, 8.0, -27.0], [33.0, -49.0, 4.0, -52.0, -22.0]], 
-[[16.0, -9.0, 25.0, -46.0, -36.0], [-25.0, -9.0, 17.0, -27.0, -32.0], [4.0, -17.0, 6.0, -35.0, -57.0], [-5.0, -1.0, 22.0, 
--16.0, 41.0]], [[-15.0, -4.0, -24.0, 86.0, 97.0], [70.0, -39.0, -18.0, 48.0, 77.0], [13.0, 11.0, 11.0, 71.0, 7.0], [-10.0, 
-67.0, 24.0, 53.0, 0.0]]]])+(1.-msk_ref)*numpy.array([[[[20.0, -16.0, -13.0, -15.0, 6.0], [51.0, 6.0, 24.0, -49.0, 6.0], [38.0, 
-22.0, 30.0, -55.0, 6.0], [14.0, -31.0, -19.0, -97.0, -8.0]], [[-25.0, 87.0, -118.0, -9.0, 104.0], [-65.0, -101.0, 19.0, 30.0, 
-88.0], [-35.0, -50.0, 121.0, -29.0, 81.0], [26.0, -35.0, 11.0, -5.0, -104.0]], [[-2.0, 18.0, -73.0, 29.0, 24.0], [-97.0, -12.0, 
--10.0, 13.0, 16.0], [-48.0, -36.0, 28.0, 51.0, 44.0], [96.0, -41.0, 39.0, -15.0, -48.0]], [[-21.0, 37.0, 32.0, -21.0, 26.0], 
-[23.0, -55.0, -1.0, 52.0, 38.0], [1.0, -14.0, 13.0, -17.0, 5.0], [-102.0, 59.0, -9.0, 87.0, -18.0]], [[100.0, 10.0, 67.0, 
--62.0, 20.0], [-19.0, 14.0, -28.0, 9.0, -10.0], [58.0, 45.0, -51.0, -11.0, -16.0], [-74.0, -57.0, -32.0, -2.0, 61.0]]], 
-[[[-5.0, 41.0, -87.0, 18.0, 39.0], [-64.0, -42.0, 11.0, 62.0, 31.0], [-28.0, -60.0, 72.0, 5.0, 86.0], [54.0, -26.0, 3.0, 9.0, 
--82.0]], [[28.0, -1.0, 21.0, -3.0, 26.0], [-58.0, -28.0, -28.0, -16.0, 50.0], [-19.0, 3.0, -14.0, 53.0, 5.0], [10.0, -3.0, 
-64.0, -32.0, -34.0]], [[49.0, -47.0, 23.0, -11.0, -70.0], [58.0, 109.0, 13.0, -15.0, -116.0], [65.0, 41.0, -54.0, -46.0, 
--33.0], [16.0, -60.0, -89.0, -27.0, 109.0]], [[24.0, 2.0, 48.0, -21.0, 36.0], [-4.0, -56.0, -16.0, -16.0, 78.0], [4.0, 9.0, 
-3.0, 16.0, 6.0], [-50.0, 30.0, 55.0, -37.0, -51.0]], [[21.0, -60.0, 34.0, 21.0, -83.0], [63.0, 75.0, 15.0, 28.0, -77.0], [40.0, 
--3.0, -36.0, -15.0, 8.0], [13.0, 11.0, -47.0, -9.0, 31.0]]], [[[72.0, -7.0, 47.0, -21.0, -1.0], [-45.0, 16.0, -30.0, 23.0, 
--7.0], [21.0, 13.0, -47.0, 33.0, 5.0], [-19.0, -31.0, 5.0, 1.0, 21.0]], [[17.0, -25.0, -15.0, 12.0, -4.0], [-4.0, 7.0, 5.0, 
--31.0, 12.0], [3.0, 0.0, 13.0, 6.0, 19.0], [54.0, -20.0, 24.0, -82.0, -32.0]], [[-38.0, -9.0, -59.0, 23.0, -2.0], [-4.0, 20.0, 
-14.0, -66.0, -14.0], [-25.0, 9.0, 20.0, -3.0, -21.0], [84.0, -29.0, 12.0, -56.0, 8.0]], [[18.0, 4.0, -39.0, 16.0, -17.0], 
-[-18.0, 18.0, 12.0, 72.0, -33.0], [8.0, -41.0, 22.0, -7.0, 62.0], [33.0, -23.0, -39.0, 23.0, -22.0]], [[20.0, -57.0, 63.0, 
-19.0, -56.0], [67.0, 11.0, 10.0, 40.0, 2.0], [32.0, -21.0, -12.0, 0.0, 38.0], [-27.0, 65.0, 6.0, -26.0, -49.0]]], [[[54.0, 
--79.0, 109.0, -9.0, -61.0], [83.0, 44.0, -4.0, -33.0, -15.0], [59.0, 39.0, -61.0, -5.0, -25.0], [-41.0, 33.0, 7.0, -77.0, 
-19.0]], [[46.0, -40.0, 30.0, 30.0, -67.0], [-7.0, 44.0, -4.0, 107.0, -49.0], [20.0, -48.0, -29.0, 32.0, 68.0], [13.0, 18.0, 
--23.0, 37.0, -25.0]], [[6.0, 9.0, 48.0, -10.0, 7.0], [25.0, -47.0, -2.0, 64.0, 43.0], [12.0, -25.0, 9.0, -3.0, 34.0], [-84.0, 
-64.0, 6.0, 48.0, -50.0]], [[-40.0, -19.0, 53.0, 5.0, 5.0], [15.0, -28.0, -18.0, -73.0, 51.0], [-31.0, 29.0, -29.0, 39.0, 
--63.0], [-25.0, 63.0, 77.0, -19.0, -5.0]], [[42.0, -39.0, 123.0, -15.0, -33.0], [10.0, 15.0, -38.0, 1.0, 3.0], [18.0, 31.0, 
--89.0, 50.0, -44.0], [-76.0, 49.0, 35.0, 23.0, 34.0]]]])
+      ref=msk_ref*numpy.array([50.0, -13.0])+(1.-msk_ref)*numpy.array([-16.0, 1.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-1.0, 0.0], [-1.0, 0.0]], [[-4.0, -4.0], [-2.0, -4.0]], [[-2.0, 1.0], [-4.0, -6.0]], [[0.0, 
-5.0], [-4.0, 2.0]], [[-3.0, -3.0], [0.0, -3.0]], [[3.0, 0.0], [4.0, -4.0]]])+(1.-msk_arg0)*numpy.array([[[-3.0, 1.0], [2.0, 
--1.0]], [[2.0, 0.0], [7.0, -7.0]], [[6.0, 3.0], [-1.0, 6.0]], [[-4.0, 0.0], [7.0, 5.0]], [[-2.0, 1.0], [7.0, 4.0]], [[-1.0, 
-5.0], [2.0, 0.0]]])
-      arg1=6.0
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[7.0, -3.0, -5.0], [1.0, 4.0, 1.0], [-7.0, 0.0, -3.0], [4.0, -1.0, -5.0]], [[1.0, 6.0, 1.0], 
+[-4.0, -6.0, 4.0], [0.0, -5.0, 2.0], [-1.0, -5.0, -1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, -4.0, 5.0], [-1.0, -5.0, 0.0], [-5.0, 6.0, 0.0], [5.0, -4.0, -3.0]], [[1.0, 
+1.0, 4.0], [1.0, 0.0, -4.0], [-1.0, -2.0, -5.0], [0.0, 1.0, -5.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[6.0, 7.0, 0.0], [-1.0, 4.0, 5.0], [-3.0, -1.0, -2.0], [5.0, 0.0, -1.0]], [[2.0, 2.0, -1.0], 
+[7.0, 5.0, 7.0], [4.0, 7.0, -5.0], [1.0, -3.0, 4.0]]], [[[-2.0, -4.0, 7.0], [2.0, 3.0, -2.0], [3.0, 5.0, 7.0], [-5.0, -4.0, 
+6.0]], [[-3.0, -4.0, 2.0], [-1.0, -6.0, -3.0], [2.0, -1.0, 5.0], [3.0, -5.0, 1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[7.0, 4.0, 3.0], [-3.0, -6.0, 2.0], [4.0, -1.0, -3.0], [7.0, 1.0, 4.0]], [[-7.0, 
+-1.0, -1.0], [-6.0, 7.0, -4.0], [-7.0, -1.0, -4.0], [-5.0, 5.0, 2.0]]], [[[0.0, 0.0, -7.0], [-7.0, -3.0, 1.0], [0.0, -6.0, 
+3.0], [-4.0, -7.0, 0.0]], [[-5.0, -4.0, -4.0], [-1.0, 0.0, -5.0], [6.0, -2.0, 0.0], [-5.0, -7.0, -4.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([41.0, -74.0])+(1.-msk_ref)*numpy.array([82.0, -36.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_taggedData_rank2_offset0(self):
+      arg0=Data(0.0,self.functionspace)
+      arg0.setTaggedValue(1,4.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[2.0, 0.0, 5.0, 0.0, -4.0], [6.0, -5.0, 7.0, 0.0, 4.0], [-7.0, -4.0, 0.0, -2.0, -5.0], [-1.0, 0.0, 
+5.0, -1.0, -6.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -1.0, 3.0, -7.0, 0.0], [-2.0, 0.0, -5.0, 5.0, 7.0], [0.0, 0.0, 3.0, -1.0, 7.0], 
+[3.0, -6.0, 6.0, 4.0, 1.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-6.0, 0.0], [-6.0, 0.0]], [[-24.0, -24.0], [-12.0, -24.0]], [[-12.0, 6.0], [-24.0, -36.0]], 
-[[0.0, 30.0], [-24.0, 12.0]], [[-18.0, -18.0], [0.0, -18.0]], [[18.0, 0.0], [24.0, -24.0]]])+(1.-msk_ref)*numpy.array([[[-18.0, 
-6.0], [12.0, -6.0]], [[12.0, 0.0], [42.0, -42.0]], [[36.0, 18.0], [-6.0, 36.0]], [[-24.0, 0.0], [42.0, 30.0]], [[-12.0, 6.0], 
-[42.0, 24.0]], [[-6.0, 30.0], [12.0, 0.0]]])
+      ref=msk_ref*numpy.array([[0.0, 0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0, 0.0], [-0.0, -0.0, 0.0, -0.0, -0.0], [-0.0, 
+0.0, 0.0, -0.0, -0.0]])+(1.-msk_ref)*numpy.array([[24.0, -4.0, 12.0, -28.0, 0.0], [-8.0, 0.0, -20.0, 20.0, 28.0], [0.0, 0.0, 
+12.0, -4.0, 28.0], [12.0, -24.0, 24.0, 16.0, 4.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[-7.0, -2.0], [1.0, -5.0]], [[-1.0, -4.0], [-6.0, 4.0]], [[-5.0, 1.0], [-1.0, -7.0]], [[1.0, 
-5.0], [-4.0, 4.0]], [[0.0, 0.0], [3.0, 4.0]], [[-4.0, -1.0], [-5.0, -7.0]]])+(1.-msk_arg0)*numpy.array([[[-6.0, -6.0], [-4.0, 
-0.0]], [[4.0, 6.0], [6.0, -3.0]], [[-2.0, 7.0], [-3.0, -3.0]], [[3.0, 2.0], [4.0, 6.0]], [[4.0, 4.0], [3.0, -1.0]], [[3.0, 
-7.0], [0.0, 0.0]]])
-      arg1=numpy.array(-4.0)
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([0.0, -3.0, -2.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, 1.0, 5.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[6.0, -5.0, 0.0], [-1.0, -6.0, -3.0], [5.0, -5.0, 1.0], [0.0, 4.0, -3.0], [-4.0, -7.0, 2.0]], 
+[[-6.0, -2.0, -4.0], [2.0, 3.0, 0.0], [1.0, 5.0, 3.0], [6.0, 2.0, -6.0], [-3.0, 2.0, -7.0]], [[-3.0, 0.0, -1.0], [2.0, -6.0, 
+5.0], [-2.0, -4.0, -2.0], [-1.0, -1.0, -3.0], [-1.0, 6.0, 2.0]], [[-4.0, -7.0, -3.0], [0.0, -3.0, -7.0], [0.0, -2.0, -7.0], 
+[0.0, 5.0, 4.0], [7.0, 4.0, -2.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-2.0, -5.0, -1.0], [3.0, 0.0, 6.0], [-2.0, -2.0, -7.0], [0.0, 3.0, 2.0], [-4.0, 0.0, 
+-4.0]], [[5.0, -4.0, -2.0], [-3.0, 3.0, -4.0], [0.0, -1.0, 4.0], [2.0, -5.0, -1.0], [-1.0, 4.0, 2.0]], [[-6.0, 2.0, 3.0], [1.0, 
+4.0, -4.0], [6.0, -5.0, -7.0], [1.0, -1.0, 5.0], [-5.0, 2.0, 4.0]], [[-3.0, -6.0, -3.0], [0.0, -5.0, -5.0], [3.0, 5.0, -4.0], 
+[-3.0, -1.0, 4.0], [5.0, -5.0, 5.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[15.0, 24.0, 13.0, -6.0, 17.0], [14.0, -9.0, -21.0, 6.0, 8.0], [2.0, 8.0, 16.0, 9.0, -22.0], 
+[27.0, 23.0, 20.0, -23.0, -8.0]])+(1.-msk_ref)*numpy.array([[-4.0, 21.0, -31.0, 13.0, -8.0], [-29.0, -8.0, 19.0, -16.0, 17.0], 
+[35.0, -19.0, -58.0, 21.0, 37.0], [-12.0, -30.0, -24.0, 28.0, 5.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[-6.0, -3.0, 0.0], [-3.0, -4.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-4.0, -5.0, 3.0], [0.0, 3.0, 7.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[5.0, 0.0, -4.0], [-3.0, -1.0, 0.0]], [[6.0, -1.0, 7.0], [7.0, -1.0, -2.0]], [[4.0, -5.0, 2.0], 
+[-5.0, -6.0, -5.0]], [[0.0, 4.0, -7.0], [7.0, 2.0, -5.0]], [[-7.0, -1.0, -4.0], [0.0, -4.0, 0.0]]], [[[2.0, 4.0, -2.0], [-4.0, 
+5.0, -7.0]], [[-2.0, -4.0, -4.0], [-5.0, 4.0, 0.0]], [[2.0, 5.0, -7.0], [2.0, 4.0, -7.0]], [[-7.0, 0.0, -4.0], [-3.0, 0.0, 
+2.0]], [[-4.0, -2.0, 5.0], [-5.0, -3.0, 6.0]]], [[[-3.0, 5.0, 2.0], [0.0, -1.0, 7.0]], [[1.0, 0.0, -5.0], [3.0, -6.0, 5.0]], 
+[[0.0, 5.0, 0.0], [0.0, 2.0, -6.0]], [[-1.0, 2.0, 4.0], [-1.0, 0.0, 0.0]], [[0.0, 7.0, 5.0], [3.0, -2.0, 4.0]]], [[[0.0, 7.0, 
+2.0], [-5.0, 0.0, 1.0]], [[-4.0, -2.0, 0.0], [1.0, 4.0, -4.0]], [[0.0, 2.0, 6.0], [5.0, 2.0, 6.0]], [[0.0, -7.0, 7.0], [-4.0, 
+0.0, -5.0]], [[-1.0, -4.0, 2.0], [-3.0, -5.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, 7.0, 4.0], [-3.0, 4.0, 7.0]], [[6.0, 6.0, 5.0], [5.0, 4.0, -6.0]], [[0.0, 
+-6.0, 1.0], [7.0, 0.0, 7.0]], [[0.0, 5.0, 6.0], [-1.0, 6.0, 2.0]], [[3.0, -1.0, -7.0], [-1.0, 0.0, 0.0]]], [[[-4.0, 5.0, -1.0], 
+[-1.0, 4.0, -5.0]], [[-6.0, 1.0, 7.0], [3.0, 7.0, 1.0]], [[6.0, -3.0, -1.0], [2.0, 2.0, -3.0]], [[0.0, 0.0, -5.0], [-2.0, 0.0, 
+7.0]], [[2.0, -5.0, 5.0], [4.0, -4.0, 5.0]]], [[[4.0, -5.0, -6.0], [0.0, -7.0, -7.0]], [[-2.0, -7.0, 6.0], [-6.0, 0.0, 2.0]], 
+[[6.0, -3.0, 5.0], [-6.0, 3.0, -5.0]], [[1.0, 6.0, 2.0], [7.0, 5.0, -4.0]], [[-3.0, 0.0, 7.0], [2.0, 7.0, -4.0]]], [[[7.0, 
+-4.0, -6.0], [1.0, -2.0, 4.0]], [[-2.0, 5.0, 0.0], [-6.0, 0.0, 0.0]], [[0.0, -3.0, -5.0], [-6.0, -6.0, 6.0]], [[5.0, 2.0, 6.0], 
+[6.0, -2.0, 6.0]], [[1.0, 1.0, -1.0], [-3.0, 2.0, 1.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-17.0, -50.0, 30.0, -41.0, 61.0], [-32.0, 23.0, -49.0, 51.0, 57.0], [7.0, 9.0, -23.0, 3.0, 
+-22.0], [-6.0, 11.0, -29.0, 33.0, 47.0]])+(1.-msk_ref)*numpy.array([[46.0, -69.0, 82.0, 25.0, -28.0], [-35.0, 68.0, -27.0, 
+34.0, 55.0], [-79.0, 75.0, -20.0, -41.0, 26.0], [-4.0, -17.0, 24.0, 24.0, 1.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank0_taggedData_rank3_offset0(self):
+      arg0=Data(1.0,self.functionspace)
+      arg0.setTaggedValue(1,0.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[[5.0, -2.0], [-1.0, 0.0]], [[0.0, -3.0], [0.0, 7.0]], [[-3.0, -1.0], [-4.0, 0.0]], [[-3.0, -4.0], 
+[-6.0, 6.0]], [[0.0, 0.0], [0.0, 1.0]], [[2.0, 0.0], [6.0, -1.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[3.0, 1.0], [-7.0, -6.0]], [[-5.0, -4.0], [-2.0, -1.0]], [[0.0, 0.0], [-7.0, -7.0]], 
+[[-1.0, 4.0], [-7.0, 6.0]], [[-5.0, 2.0], [4.0, -4.0]], [[3.0, -1.0], [-3.0, -4.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[28.0, 8.0], [-4.0, 20.0]], [[4.0, 16.0], [24.0, -16.0]], [[20.0, -4.0], [4.0, 28.0]], [[-4.0, 
--20.0], [16.0, -16.0]], [[-0.0, -0.0], [-12.0, -16.0]], [[16.0, 4.0], [20.0, 28.0]]])+(1.-msk_ref)*numpy.array([[[24.0, 24.0], 
-[16.0, -0.0]], [[-16.0, -24.0], [-24.0, 12.0]], [[8.0, -28.0], [12.0, 12.0]], [[-12.0, -8.0], [-16.0, -24.0]], [[-16.0, -16.0], 
-[-12.0, 4.0]], [[-12.0, -28.0], [-0.0, -0.0]]])
+      ref=msk_ref*numpy.array([[[5.0, -2.0], [-1.0, 0.0]], [[0.0, -3.0], [0.0, 7.0]], [[-3.0, -1.0], [-4.0, 0.0]], [[-3.0, 
+-4.0], [-6.0, 6.0]], [[0.0, 0.0], [0.0, 1.0]], [[2.0, 0.0], [6.0, -1.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0], [-0.0, 
+-0.0]], [[-0.0, -0.0], [-0.0, -0.0]], [[0.0, 0.0], [-0.0, -0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [0.0, -0.0]], 
+[[0.0, -0.0], [-0.0, -0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-1.0, 0.0, 4.0], [-5.0, 1.0, -5.0]], [[-7.0, -5.0, 3.0], [6.0, 7.0, 7.0]]], [[[-4.0, -6.0, 
--6.0], [0.0, 4.0, 6.0]], [[6.0, -1.0, 5.0], [2.0, 7.0, -4.0]]], [[[5.0, 7.0, 7.0], [5.0, 1.0, -5.0]], [[-6.0, -6.0, -3.0], 
-[-4.0, 6.0, 0.0]]], [[[0.0, -5.0, 7.0], [7.0, 7.0, -6.0]], [[3.0, 3.0, 0.0], [-7.0, -3.0, -3.0]]], [[[0.0, -7.0, -4.0], [-7.0, 
--4.0, -1.0]], [[-6.0, 0.0, -5.0], [0.0, -4.0, 0.0]]], [[[7.0, -7.0, 0.0], [2.0, 4.0, 6.0]], [[0.0, 7.0, 0.0], [-7.0, -1.0, 
-5.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, -6.0, 0.0], [5.0, -4.0, 2.0]], [[1.0, -5.0, -6.0], [-4.0, -4.0, -1.0]]], [[[4.0, 
--4.0, -5.0], [-3.0, -5.0, -3.0]], [[6.0, 1.0, 4.0], [1.0, -3.0, 4.0]]], [[[6.0, 0.0, 6.0], [2.0, 1.0, 3.0]], [[-2.0, 2.0, 1.0], 
-[0.0, 1.0, 4.0]]], [[[-6.0, 5.0, 0.0], [-4.0, -7.0, -3.0]], [[-2.0, -5.0, -6.0], [4.0, 5.0, -1.0]]], [[[7.0, 0.0, 5.0], [-2.0, 
-7.0, 5.0]], [[-1.0, 5.0, -7.0], [6.0, 3.0, 4.0]]], [[[-6.0, -5.0, 4.0], [0.0, -4.0, 1.0]], [[5.0, 5.0, 6.0], [0.0, -5.0, 
-7.0]]]])
-      arg1=numpy.array([5.0, 0.0, 6.0])
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([-1.0, -5.0, -5.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([7.0, -5.0, 7.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[1.0, -7.0, 7.0], [0.0, 3.0, -3.0]], [[7.0, -1.0, -4.0], [-5.0, -5.0, 3.0]]], [[[-2.0, 0.0, 
+0.0], [7.0, -1.0, -4.0]], [[4.0, 7.0, 5.0], [-4.0, -4.0, 3.0]]], [[[-4.0, -1.0, 0.0], [6.0, 1.0, -5.0]], [[-5.0, -4.0, 0.0], 
+[0.0, -5.0, -3.0]]], [[[7.0, 4.0, 0.0], [6.0, 2.0, -4.0]], [[-6.0, -4.0, -6.0], [-2.0, -2.0, -1.0]]], [[[1.0, 0.0, 6.0], [1.0, 
+3.0, -6.0]], [[-3.0, -3.0, 2.0], [-7.0, 6.0, 3.0]]], [[[5.0, 4.0, 4.0], [0.0, -1.0, 0.0]], [[0.0, -7.0, -3.0], [-4.0, -4.0, 
+-5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-2.0, -7.0, -7.0], [3.0, 1.0, 1.0]], [[-2.0, 7.0, -5.0], [6.0, -5.0, 0.0]]], 
+[[[5.0, -1.0, 4.0], [-3.0, -4.0, 2.0]], [[5.0, 1.0, 1.0], [-4.0, -2.0, -2.0]]], [[[-6.0, 3.0, 7.0], [0.0, -1.0, 6.0]], [[-7.0, 
+-5.0, 6.0], [4.0, -1.0, -1.0]]], [[[-2.0, -7.0, -1.0], [4.0, 2.0, 7.0]], [[6.0, 0.0, -4.0], [-5.0, -3.0, 0.0]]], [[[-7.0, 6.0, 
+1.0], [-7.0, -3.0, 0.0]], [[-3.0, 3.0, -3.0], [0.0, -4.0, -1.0]]], [[[-2.0, -7.0, -4.0], [-1.0, -1.0, 1.0]], [[4.0, 0.0, -7.0], 
+[-5.0, 0.0, -2.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[19.0, -55.0], [-17.0, 72.0]], [[-56.0, 36.0], [60.0, -14.0]], [[67.0, -5.0], [-48.0, -20.0]], 
-[[42.0, -1.0], [15.0, -53.0]], [[-24.0, -41.0], [-60.0, 0.0]], [[35.0, 46.0], [0.0, -5.0]]])+(1.-msk_ref)*numpy.array([[[-15.0, 
-37.0], [-31.0, -26.0]], [[-10.0, -33.0], [54.0, 29.0]], [[66.0, 28.0], [-4.0, 24.0]], [[-30.0, -38.0], [-46.0, 14.0]], [[65.0, 
-20.0], [-47.0, 54.0]], [[-6.0, 6.0], [61.0, 42.0]]])
+      ref=msk_ref*numpy.array([[[-1.0, 0.0], [18.0, 15.0]], [[2.0, 18.0], [-64.0, 9.0]], [[9.0, 14.0], [25.0, 40.0]], [[-27.0, 
+4.0], [56.0, 17.0]], [[-31.0, 14.0], [8.0, -38.0]], [[-45.0, 5.0], [50.0, 49.0]]])+(1.-msk_ref)*numpy.array([[[-28.0, 23.0], 
+[-84.0, 67.0]], [[68.0, 13.0], [37.0, -32.0]], [[-8.0, 47.0], [18.0, 26.0]], [[14.0, 67.0], [14.0, -20.0]], [[-72.0, -34.0], 
+[-57.0, 13.0]], [[-7.0, 5.0], [-21.0, -49.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_array_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, -6.0], [1.0, 3.0]], [[-4.0, 4.0], [5.0, 4.0]], [[2.0, -3.0], [-2.0, 3.0]], [[-5.0, 
--7.0], [4.0, 3.0]], [[6.0, -7.0], [2.0, 5.0]], [[4.0, 1.0], [4.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-5.0, -4.0], [0.0, 
-2.0]], [[0.0, 5.0], [-3.0, 6.0]], [[-7.0, 7.0], [-4.0, 7.0]], [[-3.0, -1.0], [6.0, 6.0]], [[0.0, -1.0], [5.0, 5.0]], [[2.0, 
-3.0], [4.0, 3.0]]])
-      arg1=numpy.array([-1.0, -4.0])
+   def test_generalTensorTransposedProduct_expandedData_rank0_taggedData_rank4_offset0(self):
+      arg0=Data(3.0,self.functionspace)
+      arg0.setTaggedValue(1,3.0)
+      arg0.expand()
+      arg1=Data(numpy.array([[[[6.0, -6.0, -5.0, -6.0], [-1.0, -6.0, 5.0, 2.0], [-1.0, 0.0, 0.0, 7.0]], [[1.0, 2.0, -7.0, 3.0], 
+[7.0, 6.0, 3.0, 1.0], [5.0, 0.0, -4.0, 0.0]]], [[[6.0, -1.0, 6.0, 4.0], [0.0, 5.0, -5.0, -2.0], [0.0, 2.0, 0.0, -6.0]], [[3.0, 
+4.0, -1.0, -5.0], [-3.0, 5.0, -4.0, 1.0], [5.0, -7.0, 5.0, 3.0]]], [[[2.0, 5.0, 7.0, -6.0], [-3.0, 0.0, -6.0, 0.0], [7.0, 7.0, 
+4.0, -2.0]], [[1.0, -4.0, 7.0, -2.0], [0.0, 5.0, 3.0, -4.0], [-5.0, 6.0, -7.0, 4.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[-3.0, 0.0, 7.0, 2.0], [-5.0, 3.0, 7.0, 7.0], [-1.0, -7.0, -2.0, 1.0]], [[0.0, 7.0, 
+-5.0, 3.0], [1.0, 7.0, -6.0, -3.0], [1.0, -2.0, 1.0, 3.0]]], [[[1.0, 1.0, -6.0, -2.0], [4.0, 5.0, 0.0, 3.0], [-4.0, 4.0, -6.0, 
+6.0]], [[1.0, 6.0, -6.0, 5.0], [4.0, -5.0, 4.0, -6.0], [-4.0, 2.0, -5.0, 3.0]]], [[[0.0, 1.0, -6.0, 3.0], [-2.0, 0.0, -1.0, 
+-2.0], [5.0, -6.0, 0.0, -6.0]], [[-7.0, 6.0, -7.0, 0.0], [-2.0, 2.0, 4.0, 3.0], [-7.0, 1.0, -4.0, 0.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[0.0, 0.0], [6.0, 24.0]], [[-1.0, -4.0], [-3.0, -12.0]]], [[[4.0, 16.0], [-4.0, -16.0]], 
-[[-5.0, -20.0], [-4.0, -16.0]]], [[[-2.0, -8.0], [3.0, 12.0]], [[2.0, 8.0], [-3.0, -12.0]]], [[[5.0, 20.0], [7.0, 28.0]], 
-[[-4.0, -16.0], [-3.0, -12.0]]], [[[-6.0, -24.0], [7.0, 28.0]], [[-2.0, -8.0], [-5.0, -20.0]]], [[[-4.0, -16.0], [-1.0, -4.0]], 
-[[-4.0, -16.0], [-5.0, -20.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, 20.0], [4.0, 16.0]], [[0.0, 0.0], [-2.0, -8.0]]], [[[0.0, 
-0.0], [-5.0, -20.0]], [[3.0, 12.0], [-6.0, -24.0]]], [[[7.0, 28.0], [-7.0, -28.0]], [[4.0, 16.0], [-7.0, -28.0]]], [[[3.0, 
-12.0], [1.0, 4.0]], [[-6.0, -24.0], [-6.0, -24.0]]], [[[0.0, 0.0], [1.0, 4.0]], [[-5.0, -20.0], [-5.0, -20.0]]], [[[-2.0, 
--8.0], [-3.0, -12.0]], [[-4.0, -16.0], [-3.0, -12.0]]]])
+      ref=msk_ref*numpy.array([[[[18.0, -18.0, -15.0, -18.0], [-3.0, -18.0, 15.0, 6.0], [-3.0, 0.0, 0.0, 21.0]], [[3.0, 6.0, 
+-21.0, 9.0], [21.0, 18.0, 9.0, 3.0], [15.0, 0.0, -12.0, 0.0]]], [[[18.0, -3.0, 18.0, 12.0], [0.0, 15.0, -15.0, -6.0], [0.0, 
+6.0, 0.0, -18.0]], [[9.0, 12.0, -3.0, -15.0], [-9.0, 15.0, -12.0, 3.0], [15.0, -21.0, 15.0, 9.0]]], [[[6.0, 15.0, 21.0, -18.0], 
+[-9.0, 0.0, -18.0, 0.0], [21.0, 21.0, 12.0, -6.0]], [[3.0, -12.0, 21.0, -6.0], [0.0, 15.0, 9.0, -12.0], [-15.0, 18.0, -21.0, 
+12.0]]]])+(1.-msk_ref)*numpy.array([[[[-9.0, 0.0, 21.0, 6.0], [-15.0, 9.0, 21.0, 21.0], [-3.0, -21.0, -6.0, 3.0]], [[0.0, 21.0, 
+-15.0, 9.0], [3.0, 21.0, -18.0, -9.0], [3.0, -6.0, 3.0, 9.0]]], [[[3.0, 3.0, -18.0, -6.0], [12.0, 15.0, 0.0, 9.0], [-12.0, 
+12.0, -18.0, 18.0]], [[3.0, 18.0, -18.0, 15.0], [12.0, -15.0, 12.0, -18.0], [-12.0, 6.0, -15.0, 9.0]]], [[[0.0, 3.0, -18.0, 
+9.0], [-6.0, 0.0, -3.0, -6.0], [15.0, -18.0, 0.0, -18.0]], [[-21.0, 18.0, -21.0, 0.0], [-6.0, 6.0, 12.0, 9.0], [-21.0, 3.0, 
+-12.0, 0.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[0.0, 4.0, 5.0], [-7.0, 3.0, 1.0]], [[1.0, 0.0, -7.0], [2.0, 0.0, -5.0]]], [[[4.0, -2.0, 
-0.0], [-5.0, -7.0, -4.0]], [[2.0, 7.0, 7.0], [5.0, 7.0, -5.0]]], [[[1.0, 4.0, 0.0], [-4.0, -5.0, 2.0]], [[-3.0, 0.0, 7.0], 
-[-5.0, 6.0, 1.0]]], [[[-6.0, 1.0, 1.0], [-7.0, 3.0, 3.0]], [[-7.0, -1.0, 3.0], [0.0, 0.0, -5.0]]], [[[3.0, 5.0, 6.0], [3.0, 
--1.0, 2.0]], [[-3.0, -6.0, 5.0], [-2.0, 0.0, 6.0]]], [[[3.0, 0.0, -3.0], [6.0, 5.0, 1.0]], [[-1.0, 2.0, -4.0], [2.0, -1.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -2.0, 2.0], [-6.0, 7.0, 3.0]], [[-7.0, 6.0, 1.0], [-6.0, 4.0, -3.0]]], [[[6.0, 
-0.0, -5.0], [3.0, 4.0, 0.0]], [[0.0, -6.0, -2.0], [1.0, 6.0, -6.0]]], [[[-5.0, -4.0, -3.0], [-7.0, 0.0, 5.0]], [[-2.0, -5.0, 
-1.0], [-1.0, 6.0, 4.0]]], [[[1.0, -6.0, 6.0], [-5.0, -4.0, -6.0]], [[6.0, -6.0, 0.0], [2.0, 2.0, 6.0]]], [[[0.0, 0.0, 0.0], 
-[-7.0, 0.0, -6.0]], [[4.0, -1.0, -5.0], [-5.0, 5.0, 0.0]]], [[[-4.0, 2.0, 5.0], [-3.0, -2.0, -6.0]], [[4.0, 2.0, -1.0], [2.0, 
-0.0, 2.0]]]])
-      arg1=numpy.array([[0.0, 7.0, 3.0], [4.0, -3.0, 0.0]])
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([7.0, -1.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-1.0, 1.0]))
+      arg0.expand()
+      arg1=Data(-3.0,self.functionspace)
+      arg1.setTaggedValue(1,1.0)
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-21.0, 3.0])+(1.-msk_ref)*numpy.array([-1.0, 1.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[0.0, 1.0, 1.0], [-2.0, 2.0, -6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, -2.0, 4.0], [-1.0, -1.0, -6.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-3.0, 1.0, 2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 6.0, 1.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[43.0, -12.0], [24.0, -37.0]], [[-21.0, 4.0], [-15.0, 8.0]]], [[[-14.0, 22.0], [-61.0, 1.0]], 
-[[70.0, -13.0], [34.0, -1.0]]], [[[28.0, -8.0], [-29.0, -1.0]], [[21.0, -12.0], [45.0, -38.0]]], [[[10.0, -27.0], [30.0, 
--37.0]], [[2.0, -25.0], [-15.0, 0.0]]], [[[53.0, -3.0], [-1.0, 15.0]], [[-27.0, 6.0], [18.0, -8.0]]], [[[-9.0, 12.0], [38.0, 
-9.0]], [[2.0, -10.0], [-7.0, 11.0]]]])+(1.-msk_ref)*numpy.array([[[[-8.0, -18.0], [58.0, -45.0]], [[45.0, -46.0], [19.0, 
--36.0]]], [[[-15.0, 24.0], [28.0, 0.0]], [[-48.0, 18.0], [24.0, -14.0]]], [[[-37.0, -8.0], [15.0, -28.0]], [[-32.0, 7.0], 
-[54.0, -22.0]]], [[[-24.0, 22.0], [-46.0, -8.0]], [[-42.0, 42.0], [32.0, 2.0]]], [[[0.0, 0.0], [-18.0, -28.0]], [[-22.0, 19.0], 
-[35.0, -35.0]]], [[[29.0, -22.0], [-32.0, -6.0]], [[11.0, 10.0], [6.0, 8.0]]]])
+      ref=msk_ref*numpy.array([3.0, -4.0])+(1.-msk_ref)*numpy.array([-8.0, -18.0])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, 7.0], [-7.0, 7.0]], [[3.0, 7.0], [-2.0, -5.0]], [[-6.0, -5.0], [-4.0, 1.0]], [[-7.0, 
-1.0], [-1.0, 2.0]], [[-3.0, -1.0], [-6.0, -1.0]], [[5.0, 1.0], [-1.0, -1.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 3.0], [-7.0, 
-4.0]], [[-3.0, 0.0], [-1.0, 3.0]], [[-4.0, 4.0], [-4.0, -7.0]], [[7.0, -7.0], [4.0, -1.0]], [[-3.0, 3.0], [0.0, -2.0]], [[4.0, 
--7.0], [0.0, 3.0]]])
-      arg1=Data(0.0,self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[7.0, 4.0, 6.0], [0.0, -1.0, -4.0]], [[1.0, -2.0, -4.0], [-7.0, -1.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 0.0, 2.0], [-4.0, -2.0, 0.0]], [[6.0, -4.0, 5.0], [-2.0, 0.0, -2.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[2.0, 7.0, -7.0], [-1.0, -7.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-3.0, -4.0, 0.0], [-4.0, 3.0, 1.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([-1.0, 44.0])+(1.-msk_ref)*numpy.array([-8.0, 4.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank3_offset3(self):
+      arg0=Data(numpy.array([[[[-3.0, 3.0, 1.0], [-7.0, -5.0, 7.0], [-1.0, 1.0, 6.0], [0.0, -4.0, 3.0]], [[-3.0, 4.0, -4.0], 
+[4.0, -6.0, 7.0], [7.0, 0.0, -2.0], [1.0, -7.0, -7.0]]], [[[-1.0, -1.0, -6.0], [0.0, 0.0, 7.0], [0.0, -7.0, 0.0], [0.0, 6.0, 
+-7.0]], [[-1.0, 2.0, 5.0], [6.0, -1.0, -2.0], [4.0, -2.0, -7.0], [-1.0, -5.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[-5.0, 5.0, 4.0], [0.0, -4.0, 0.0], [1.0, -2.0, 0.0], [-1.0, 7.0, -1.0]], [[-5.0, 
+-4.0, 0.0], [-1.0, 6.0, 6.0], [3.0, 3.0, -4.0], [6.0, 4.0, 7.0]]], [[[0.0, -4.0, 1.0], [5.0, -3.0, -2.0], [-4.0, -6.0, 0.0], 
+[2.0, -5.0, 2.0]], [[0.0, -2.0, 2.0], [3.0, 3.0, 4.0], [-4.0, 1.0, -7.0], [0.0, -5.0, -5.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-3.0, 0.0, 4.0], [0.0, 2.0, -6.0], [-4.0, -5.0, 4.0], [3.0, -2.0, 7.0]], [[2.0, -7.0, 1.0], 
+[3.0, -7.0, 3.0], [2.0, -6.0, 4.0], [-1.0, 3.0, -7.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-3.0, -2.0, -1.0], [-6.0, 5.0, 6.0], [4.0, 6.0, 3.0], [-4.0, 0.0, 7.0]], [[5.0, 1.0, 
+-1.0], [-4.0, -1.0, 3.0], [3.0, -3.0, 6.0], [4.0, -6.0, -6.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([83.0, -138.0])+(1.-msk_ref)*numpy.array([-109.0, -100.0])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+      if not ref.isLazy():
+        arg0=arg0*1j
+        arg1=arg1*1j
+        ref=-ref
+        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+        self.assertTrue(isinstance(res,Data),"wrong type of result.")
+        self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
+        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")      
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([3.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([2.0, 4.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([-7.0, -7.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-1.0, -1.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 0.0], [-0.0, 0.0]], [[0.0, 0.0], [-0.0, -0.0]], [[-0.0, -0.0], [-0.0, 0.0]], [[-0.0, 
-0.0], [-0.0, 0.0]], [[-0.0, -0.0], [-0.0, -0.0]], [[0.0, 0.0], [-0.0, -0.0]]])+(1.-msk_ref)*numpy.array([[[-0.0, 0.0], [-0.0, 
-0.0]], [[-0.0, 0.0], [-0.0, 0.0]], [[-0.0, 0.0], [-0.0, -0.0]], [[0.0, -0.0], [0.0, -0.0]], [[-0.0, 0.0], [0.0, -0.0]], [[0.0, 
--0.0], [0.0, 0.0]]])
+      ref=msk_ref*numpy.array([[-21.0, -21.0], [0.0, 0.0]])+(1.-msk_ref)*numpy.array([[-2.0, -2.0], [-4.0, -4.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[-7.0, -5.0, -3.0], [0.0, -5.0, 2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 7.0, -6.0], [0.0, -7.0, 3.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-3.0, -6.0, -3.0], [-1.0, -2.0, -2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-1.0, -1.0, -1.0], [4.0, -6.0, -2.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[60.0, 23.0], [24.0, 6.0]])+(1.-msk_ref)*numpy.array([[4.0, -50.0], [4.0, 36.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[-5.0, -2.0, 4.0], [-5.0, -5.0, 2.0]], [[6.0, -6.0, 0.0], [2.0, -5.0, 6.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[0.0, -1.0, -1.0], [7.0, -1.0, -3.0]], [[2.0, 5.0, 5.0], [0.0, -2.0, -4.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[5.0, 0.0, 3.0], [-2.0, 6.0, 2.0]], [[5.0, 2.0, 7.0], [6.0, -7.0, 0.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-4.0, 7.0, -7.0], [3.0, -7.0, -5.0]], [[5.0, 1.0, 5.0], [4.0, 1.0, 0.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-29.0, 4.0], [8.0, 65.0]])+(1.-msk_ref)*numpy.array([[43.0, 21.0], [26.0, 38.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank4_offset3(self):
+      arg0=Data(numpy.array([[[[4.0, 6.0, 3.0], [-7.0, -4.0, 7.0], [-4.0, -7.0, 3.0], [-2.0, 4.0, -7.0]], [[0.0, -6.0, 1.0], 
+[7.0, 5.0, 6.0], [-1.0, 0.0, 6.0], [6.0, -1.0, -4.0]]], [[[-5.0, 1.0, -5.0], [3.0, -3.0, -3.0], [-4.0, -5.0, -4.0], [4.0, 4.0, 
+-1.0]], [[3.0, -7.0, 1.0], [-2.0, 6.0, -7.0], [7.0, -6.0, 0.0], [-2.0, -5.0, 5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 1.0, 4.0], [4.0, -4.0, -5.0], [3.0, -7.0, 0.0], [2.0, -1.0, -5.0]], [[-6.0, 
+1.0, -6.0], [6.0, -7.0, 4.0], [1.0, 5.0, 0.0], [2.0, -4.0, -6.0]]], [[[1.0, -3.0, 0.0], [-5.0, 7.0, 6.0], [1.0, 5.0, -6.0], 
+[-1.0, 0.0, 0.0]], [[-4.0, 4.0, 2.0], [7.0, -5.0, 7.0], [-1.0, -1.0, -6.0], [2.0, 6.0, -1.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-7.0, -6.0, 0.0], [3.0, 7.0, 3.0], [3.0, 0.0, -7.0], [-7.0, 2.0, 3.0]], [[-1.0, 1.0, -4.0], 
+[-3.0, 2.0, 7.0], [-7.0, 4.0, -3.0], [3.0, -1.0, 2.0]]], [[[2.0, -6.0, -2.0], [6.0, 5.0, 3.0], [-2.0, 5.0, -4.0], [1.0, 5.0, 
+-5.0]], [[5.0, -6.0, -2.0], [6.0, -2.0, -5.0], [-6.0, -4.0, 3.0], [3.0, 0.0, -6.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[4.0, -1.0, -5.0], [1.0, -5.0, -6.0], [7.0, -3.0, -2.0], [4.0, -4.0, 6.0]], [[2.0, 
+-7.0, 3.0], [-3.0, 7.0, -4.0], [-1.0, 4.0, 5.0], [6.0, 1.0, -6.0]]], [[[3.0, 4.0, -5.0], [-7.0, -5.0, 2.0], [-5.0, 6.0, -7.0], 
+[6.0, -3.0, -2.0]], [[5.0, 3.0, 1.0], [1.0, -7.0, 4.0], [5.0, 0.0, -5.0], [-3.0, 4.0, 0.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=3)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-103.0, 41.0], [-108.0, 28.0]])+(1.-msk_ref)*numpy.array([[16.0, -33.0], [-192.0, 171.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([1.0, 0.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([0.0, 5.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-2.0, 1.0, 0.0, 0.0, 2.0], [0.0, 0.0, 5.0, -5.0, -6.0], [6.0, 0.0, 6.0, -7.0, 6.0], [-1.0, 1.0, 
+-3.0, 7.0, 3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[4.0, -6.0, -1.0, -4.0, 6.0], [7.0, 1.0, -6.0, 7.0, 1.0], [-6.0, 7.0, 1.0, 5.0, -2.0], 
+[1.0, 7.0, 0.0, -3.0, -6.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-2.0, 1.0, 0.0, 0.0, 2.0], [0.0, 0.0, 5.0, -5.0, -6.0], [6.0, 0.0, 6.0, -7.0, 6.0], [-1.0, 
+1.0, -3.0, 7.0, 3.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 
+0.0]]])+(1.-msk_ref)*numpy.array([[[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[20.0, -30.0, -5.0, -20.0, 30.0], [35.0, 5.0, -30.0, 35.0, 5.0], [-30.0, 35.0, 5.0, 25.0, -10.0], [5.0, 35.0, 
+0.0, -15.0, -30.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[-4.0, 3.0, 3.0], [-1.0, 5.0, 0.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-6.0, 2.0, 4.0], [0.0, -4.0, -5.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[2.0, 4.0, 5.0], [-6.0, -3.0, -2.0], [-2.0, 2.0, -3.0], [-4.0, -6.0, -5.0], [1.0, 0.0, 3.0]], 
+[[-6.0, 5.0, -7.0], [0.0, -1.0, 6.0], [5.0, -5.0, -4.0], [5.0, 3.0, 7.0], [-5.0, 5.0, 4.0]], [[-1.0, 0.0, 4.0], [0.0, 4.0, 
+6.0], [-6.0, -5.0, -6.0], [2.0, -1.0, 7.0], [1.0, -1.0, -6.0]], [[-4.0, -2.0, -3.0], [5.0, 0.0, 6.0], [4.0, 1.0, 1.0], [0.0, 
+-4.0, -5.0], [6.0, -3.0, 6.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-1.0, -1.0, 0.0], [-4.0, 3.0, -4.0], [1.0, 4.0, 3.0], [-5.0, 5.0, -6.0], [-7.0, 0.0, 
+-3.0]], [[-3.0, 7.0, 2.0], [-3.0, -1.0, -1.0], [0.0, -1.0, -3.0], [7.0, -1.0, 7.0], [3.0, -1.0, -4.0]], [[0.0, -5.0, 7.0], 
+[0.0, -3.0, -6.0], [6.0, 6.0, 4.0], [0.0, -2.0, -4.0], [-5.0, -6.0, -3.0]], [[4.0, -4.0, -5.0], [2.0, -2.0, -3.0], [1.0, 5.0, 
+-3.0], [6.0, 3.0, 2.0], [5.0, 5.0, 4.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[19.0, 9.0, 5.0, -17.0, 5.0], [18.0, 15.0, -47.0, 10.0, 47.0], [16.0, 30.0, -9.0, 10.0, -25.0], 
+[1.0, -2.0, -10.0, -27.0, -15.0]], [[18.0, -9.0, 12.0, -26.0, -1.0], [31.0, -5.0, -30.0, 10.0, 30.0], [1.0, 20.0, -19.0, -7.0, 
+-6.0], [-6.0, -5.0, 1.0, -20.0, -21.0]]])+(1.-msk_ref)*numpy.array([[[4.0, 14.0, 14.0, 16.0, 30.0], [40.0, 12.0, -14.0, -16.0, 
+-36.0], [18.0, -30.0, -8.0, -20.0, 6.0], [-52.0, -28.0, -8.0, -22.0, -4.0]], [[4.0, 8.0, -31.0, 10.0, 15.0], [-38.0, 9.0, 19.0, 
+-31.0, 24.0], [-15.0, 42.0, -44.0, 28.0, 39.0], [41.0, 23.0, -5.0, -22.0, -40.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[3.0, 6.0, -7.0], [7.0, 0.0, 0.0]], [[-4.0, -7.0, 2.0], [-5.0, 6.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[6.0, 2.0, 6.0], [-7.0, 7.0, -5.0]], [[-5.0, 7.0, -2.0], [-6.0, 3.0, 7.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[-3.0, 0.0, 0.0], [5.0, -7.0, 1.0]], [[1.0, 0.0, 5.0], [-2.0, 0.0, -1.0]], [[7.0, -2.0, 2.0], 
+[-3.0, 6.0, 5.0]], [[-6.0, -2.0, 0.0], [2.0, 4.0, -2.0]], [[-4.0, 4.0, -6.0], [4.0, 6.0, 6.0]]], [[[-6.0, 1.0, -2.0], [3.0, 
+4.0, 1.0]], [[2.0, -2.0, -5.0], [-1.0, 7.0, -5.0]], [[-2.0, 1.0, 0.0], [3.0, 3.0, -1.0]], [[-5.0, 4.0, 2.0], [0.0, 6.0, 5.0]], 
+[[-2.0, -3.0, -7.0], [-3.0, 2.0, 7.0]]], [[[-1.0, -5.0, 4.0], [0.0, 6.0, -7.0]], [[0.0, 1.0, -6.0], [-6.0, 5.0, -2.0]], [[-7.0, 
+-2.0, 5.0], [-7.0, 1.0, -7.0]], [[-4.0, -5.0, 7.0], [2.0, -6.0, -3.0]], [[0.0, -1.0, -2.0], [4.0, -6.0, 7.0]]], [[[2.0, 2.0, 
+0.0], [5.0, 6.0, 4.0]], [[0.0, 5.0, -3.0], [-2.0, 7.0, -2.0]], [[0.0, -7.0, -1.0], [1.0, 5.0, 0.0]], [[-2.0, -7.0, -7.0], 
+[-1.0, 0.0, 1.0]], [[-2.0, -2.0, 1.0], [5.0, 7.0, 2.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[2.0, -6.0, 0.0], [3.0, -2.0, 5.0]], [[1.0, 0.0, -6.0], [7.0, 6.0, 1.0]], [[4.0, 
+5.0, 4.0], [3.0, 3.0, 3.0]], [[0.0, -6.0, -2.0], [-1.0, 6.0, 1.0]], [[-1.0, -5.0, 4.0], [2.0, -1.0, 2.0]]], [[[3.0, 7.0, -4.0], 
+[2.0, -6.0, -3.0]], [[0.0, 7.0, 3.0], [6.0, 0.0, -4.0]], [[-3.0, 2.0, 7.0], [-4.0, 1.0, 7.0]], [[-7.0, -3.0, 7.0], [-1.0, 6.0, 
+-4.0]], [[3.0, 3.0, 5.0], [6.0, 3.0, -6.0]]], [[[7.0, -1.0, -7.0], [-1.0, 0.0, -1.0]], [[-7.0, -6.0, 5.0], [2.0, 1.0, 3.0]], 
+[[-7.0, -1.0, 4.0], [4.0, 5.0, 7.0]], [[-5.0, 5.0, 1.0], [0.0, 3.0, 5.0]], [[3.0, 3.0, -1.0], [7.0, -2.0, -4.0]]], [[[-4.0, 
+0.0, -3.0], [-1.0, 2.0, -2.0]], [[-1.0, -2.0, 5.0], [6.0, 3.0, 7.0]], [[4.0, 5.0, -4.0], [-4.0, 4.0, 5.0]], [[1.0, 3.0, 1.0], 
+[-1.0, -4.0, -5.0]], [[-3.0, 0.0, 7.0], [-7.0, 2.0, 7.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[26.0, -46.0, -26.0, -16.0, 82.0], [23.0, 22.0, 21.0, -5.0, 4.0], [-61.0, 6.0, -117.0, -77.0, 
+36.0], [53.0, 37.0, -28.0, -6.0, 10.0]], [[-48.0, 9.0, 76.0, 38.0, 34.0], [29.0, 8.0, -3.0, 67.0, 91.0], [34.0, 27.0, 44.0, 
+-2.0, -4.0], [17.0, -3.0, 72.0, 55.0, 55.0]]])+(1.-msk_ref)*numpy.array([[[-60.0, -42.0, 43.0, 20.0, -23.0], [-33.0, 10.0, 
+28.0, 63.0, 63.0], [10.0, -46.0, -48.0, -18.0, -25.0], [-11.0, -36.0, 41.0, 22.0, 52.0]], [[-41.0, -10.0, 19.0, -7.0, -39.0], 
+[-9.0, -21.0, 91.0, -4.0, -73.0], [-29.0, -5.0, 60.0, 102.0, -68.0], [24.0, 3.0, 94.0, -27.0, 98.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank1_taggedData_rank3_offset0(self):
+      arg0=Data(numpy.array([-2.0, 4.0]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([-3.0, -1.0]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[2.0, -6.0], [0.0, -7.0]], [[0.0, -2.0], [-2.0, 0.0]], [[2.0, 1.0], [-3.0, 6.0]], [[-3.0, 2.0], 
+[6.0, 1.0]], [[0.0, -2.0], [0.0, 5.0]], [[-5.0, 0.0], [0.0, -3.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[-6.0, -3.0], [-2.0, -4.0]], [[3.0, 0.0], [-7.0, -1.0]], [[4.0, 4.0], [0.0, -7.0]], 
+[[-6.0, -4.0], [0.0, 6.0]], [[3.0, 1.0], [-3.0, -7.0]], [[-5.0, -7.0], [-2.0, -3.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[-4.0, 12.0], [0.0, 14.0]], [[0.0, 4.0], [4.0, 0.0]], [[-4.0, -2.0], [6.0, -12.0]], [[6.0, 
+-4.0], [-12.0, -2.0]], [[0.0, 4.0], [0.0, -10.0]], [[10.0, 0.0], [0.0, 6.0]]], [[[8.0, -24.0], [0.0, -28.0]], [[0.0, -8.0], 
+[-8.0, 0.0]], [[8.0, 4.0], [-12.0, 24.0]], [[-12.0, 8.0], [24.0, 4.0]], [[0.0, -8.0], [0.0, 20.0]], [[-20.0, 0.0], [0.0, 
+-12.0]]]])+(1.-msk_ref)*numpy.array([[[[18.0, 9.0], [6.0, 12.0]], [[-9.0, 0.0], [21.0, 3.0]], [[-12.0, -12.0], [0.0, 21.0]], 
+[[18.0, 12.0], [0.0, -18.0]], [[-9.0, -3.0], [9.0, 21.0]], [[15.0, 21.0], [6.0, 9.0]]], [[[6.0, 3.0], [2.0, 4.0]], [[-3.0, 
+0.0], [7.0, 1.0]], [[-4.0, -4.0], [0.0, 7.0]], [[6.0, 4.0], [0.0, -6.0]], [[-3.0, -1.0], [3.0, 7.0]], [[5.0, 7.0], [2.0, 
+3.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[2.0, -4.0, -7.0], [-6.0, -5.0, -4.0]], [[5.0, 1.0, -6.0], [-6.0, 0.0, -6.0]]], [[[6.0, 6.0, 
-4.0], [3.0, -3.0, -2.0]], [[4.0, -2.0, 7.0], [2.0, 1.0, 4.0]]], [[[-7.0, 5.0, -5.0], [1.0, 0.0, -3.0]], [[0.0, 7.0, 4.0], 
-[-6.0, -5.0, 1.0]]], [[[-2.0, -7.0, 4.0], [7.0, -5.0, 0.0]], [[-1.0, 6.0, 2.0], [-7.0, 0.0, 7.0]]], [[[0.0, -2.0, 3.0], [1.0, 
--2.0, 7.0]], [[-5.0, -5.0, -4.0], [7.0, 3.0, -7.0]]], [[[1.0, 6.0, -6.0], [2.0, 6.0, 1.0]], [[-3.0, -6.0, 0.0], [0.0, -1.0, 
-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 1.0, -3.0], [-7.0, -1.0, -4.0]], [[1.0, 0.0, -5.0], [5.0, 1.0, -5.0]]], [[[-5.0, 
--5.0, -3.0], [-3.0, -5.0, -3.0]], [[-5.0, 3.0, 4.0], [-6.0, 3.0, -1.0]]], [[[2.0, -2.0, 1.0], [6.0, 0.0, 0.0]], [[1.0, -1.0, 
-7.0], [-3.0, -3.0, -2.0]]], [[[-3.0, -5.0, -4.0], [-6.0, 0.0, 0.0]], [[-6.0, -4.0, -5.0], [-5.0, 5.0, -4.0]]], [[[5.0, -5.0, 
-1.0], [5.0, 0.0, 4.0]], [[2.0, 0.0, -6.0], [4.0, -1.0, -7.0]]], [[[0.0, -6.0, -4.0], [2.0, 1.0, -6.0]], [[3.0, -1.0, -6.0], 
-[-2.0, 1.0, -5.0]]]])
-      arg1=Data(numpy.array([5.0, -2.0, 6.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank4_offset1(self):
+      arg0=Data(numpy.array([[0.0, 3.0, 4.0], [-3.0, 2.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[0.0, 2.0, 3.0], [3.0, -4.0, -1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[0.0, -4.0, 3.0], [6.0, -2.0, 2.0]], [[7.0, -3.0, -4.0], [-1.0, 4.0, 1.0]]], [[[6.0, -7.0, 2.0], 
+[7.0, -1.0, -3.0]], [[7.0, -6.0, 6.0], [0.0, 0.0, 3.0]]], [[[3.0, -4.0, -5.0], [4.0, -6.0, 0.0]], [[5.0, 1.0, -2.0], [-3.0, 
+0.0, -5.0]]], [[[-7.0, 1.0, 0.0], [-2.0, -2.0, -7.0]], [[4.0, 3.0, 1.0], [-5.0, -4.0, -7.0]]], [[[-2.0, 2.0, 1.0], [7.0, 0.0, 
+7.0]], [[1.0, 7.0, -7.0], [3.0, 4.0, 2.0]]], [[[6.0, -3.0, 4.0], [4.0, 7.0, -7.0]], [[1.0, -2.0, -2.0], [-5.0, -4.0, 
+1.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[5.0, 6.0, -3.0], [5.0, -1.0, 1.0]], [[6.0, -7.0, -3.0], [-5.0, 1.0, 4.0]]], 
+[[[-7.0, -3.0, 6.0], [-4.0, 0.0, -2.0]], [[1.0, 3.0, 2.0], [-3.0, 5.0, 2.0]]], [[[-3.0, 0.0, -7.0], [6.0, -3.0, -1.0]], [[2.0, 
+-2.0, 4.0], [7.0, 3.0, -1.0]]], [[[-2.0, -6.0, 7.0], [-5.0, -4.0, 2.0]], [[-2.0, -3.0, 0.0], [0.0, -5.0, 2.0]]], [[[1.0, 2.0, 
+-1.0], [0.0, -2.0, 0.0]], [[2.0, 1.0, -6.0], [3.0, -4.0, -7.0]]], [[[7.0, -2.0, 5.0], [-7.0, 2.0, 4.0]], [[1.0, 0.0, 2.0], 
+[7.0, 7.0, 0.0]]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[-24.0, -44.0], [-13.0, -66.0]], [[42.0, 9.0], [66.0, 32.0]], [[-75.0, -13.0], [10.0, -14.0]], 
-[[28.0, 45.0], [-5.0, 7.0]], [[22.0, 51.0], [-39.0, -13.0]], [[-43.0, 4.0], [-3.0, 20.0]]])+(1.-msk_ref)*numpy.array([[[-15.0, 
--57.0], [-25.0, -7.0]], [[-33.0, -23.0], [-7.0, -42.0]], [[20.0, 30.0], [49.0, -21.0]], [[-29.0, -30.0], [-52.0, -59.0]], 
-[[41.0, 49.0], [-26.0, -20.0]], [[-12.0, -28.0], [-19.0, -42.0]]])
+      ref=msk_ref*numpy.array([[[[0.0, 2.0], [-25.0, 16.0]], [[-13.0, -15.0], [6.0, 12.0]], [[-32.0, -18.0], [-5.0, -20.0]], 
+[[3.0, -34.0], [13.0, -40.0]], [[10.0, 28.0], [-7.0, 20.0]], [[7.0, -7.0], [-14.0, -8.0]]], [[[10.0, -10.0], [-51.0, 17.0]], 
+[[-20.0, -41.0], [3.0, 18.0]], [[-47.0, -24.0], [-25.0, -21.0]], [[23.0, -40.0], [0.0, -35.0]], [[16.0, 21.0], [-31.0, 11.0]], 
+[[0.0, -40.0], [-19.0, 13.0]]]])+(1.-msk_ref)*numpy.array([[[[3.0, 1.0], [-23.0, 14.0]], [[12.0, -6.0], [12.0, 16.0]], [[-21.0, 
+-9.0], [8.0, 3.0]], [[9.0, -2.0], [-6.0, -4.0]], [[1.0, -4.0], [-16.0, -29.0]], [[11.0, 16.0], [6.0, 14.0]]], [[[-6.0, 18.0], 
+[49.0, -23.0]], [[-15.0, -10.0], [-11.0, -31.0]], [[-2.0, 31.0], [10.0, 10.0]], [[11.0, -1.0], [6.0, 18.0]], [[-4.0, 8.0], 
+[8.0, 32.0]], [[24.0, -33.0], [1.0, -7.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_constData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[2.0, 5.0], [5.0, -2.0]], [[-3.0, 5.0], [0.0, -1.0]], [[-3.0, -2.0], [-6.0, 0.0]], [[7.0, 
--3.0], [-4.0, 7.0]], [[-3.0, 7.0], [3.0, -6.0]], [[-5.0, -4.0], [-4.0, 7.0]]])+(1.-msk_arg0)*numpy.array([[[-4.0, 1.0], [2.0, 
--2.0]], [[-7.0, -5.0], [-4.0, -5.0]], [[1.0, -4.0], [-7.0, 0.0]], [[-7.0, 6.0], [2.0, -2.0]], [[-4.0, 1.0], [-1.0, 5.0]], 
-[[-5.0, 2.0], [2.0, -1.0]]])
-      arg1=Data(numpy.array([5.0, 5.0]),self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[-7.0, -5.0, 0.0, -5.0, 1.0], [4.0, -4.0, -5.0, -2.0, -3.0], [5.0, 6.0, -6.0, 0.0, 2.0], [-4.0, 
+-7.0, -6.0, 1.0, -2.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 7.0, 0.0, 6.0, 7.0], [3.0, -5.0, -1.0, -7.0, 4.0], [0.0, 1.0, 2.0, -3.0, -6.0], 
+[2.0, 0.0, -5.0, -2.0, -6.0]]))
+      arg0.expand()
+      arg1=Data(3.0,self.functionspace)
+      arg1.setTaggedValue(1,5.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[10.0, 10.0], [25.0, 25.0]], [[25.0, 25.0], [-10.0, -10.0]]], [[[-15.0, -15.0], [25.0, 25.0]], 
-[[0.0, 0.0], [-5.0, -5.0]]], [[[-15.0, -15.0], [-10.0, -10.0]], [[-30.0, -30.0], [0.0, 0.0]]], [[[35.0, 35.0], [-15.0, -15.0]], 
-[[-20.0, -20.0], [35.0, 35.0]]], [[[-15.0, -15.0], [35.0, 35.0]], [[15.0, 15.0], [-30.0, -30.0]]], [[[-25.0, -25.0], [-20.0, 
--20.0]], [[-20.0, -20.0], [35.0, 35.0]]]])+(1.-msk_ref)*numpy.array([[[[-20.0, -20.0], [5.0, 5.0]], [[10.0, 10.0], [-10.0, 
--10.0]]], [[[-35.0, -35.0], [-25.0, -25.0]], [[-20.0, -20.0], [-25.0, -25.0]]], [[[5.0, 5.0], [-20.0, -20.0]], [[-35.0, -35.0], 
-[0.0, 0.0]]], [[[-35.0, -35.0], [30.0, 30.0]], [[10.0, 10.0], [-10.0, -10.0]]], [[[-20.0, -20.0], [5.0, 5.0]], [[-5.0, -5.0], 
-[25.0, 25.0]]], [[[-25.0, -25.0], [10.0, 10.0]], [[10.0, 10.0], [-5.0, -5.0]]]])
+      ref=msk_ref*numpy.array([[-21.0, -15.0, 0.0, -15.0, 3.0], [12.0, -12.0, -15.0, -6.0, -9.0], [15.0, 18.0, -18.0, 0.0, 
+6.0], [-12.0, -21.0, -18.0, 3.0, -6.0]])+(1.-msk_ref)*numpy.array([[-5.0, 35.0, 0.0, 30.0, 35.0], [15.0, -25.0, -5.0, -35.0, 
+20.0], [0.0, 5.0, 10.0, -15.0, -30.0], [10.0, 0.0, -25.0, -10.0, -30.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-6.0, -7.0, 7.0], [4.0, -2.0, -5.0]], [[5.0, 7.0, 0.0], [5.0, -3.0, 6.0]]], [[[5.0, 0.0, 
--6.0], [-3.0, -2.0, 7.0]], [[0.0, -6.0, -1.0], [-6.0, 0.0, -3.0]]], [[[2.0, 2.0, 4.0], [-3.0, -5.0, -5.0]], [[-5.0, 2.0, 0.0], 
-[-6.0, 0.0, -2.0]]], [[[-7.0, -2.0, -5.0], [-6.0, 0.0, -4.0]], [[-1.0, 5.0, -7.0], [-2.0, 0.0, 0.0]]], [[[-6.0, -2.0, -5.0], 
-[4.0, 4.0, -1.0]], [[-5.0, 7.0, 4.0], [4.0, -5.0, 2.0]]], [[[1.0, -7.0, -1.0], [0.0, -7.0, -4.0]], [[-5.0, 5.0, -6.0], [-2.0, 
-0.0, 0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -3.0, 7.0], [-3.0, 0.0, -6.0]], [[4.0, 4.0, 3.0], [5.0, -7.0, 4.0]]], [[[2.0, 
--3.0, -1.0], [2.0, 3.0, -3.0]], [[-2.0, -5.0, -1.0], [-1.0, 7.0, -1.0]]], [[[0.0, -3.0, 5.0], [-2.0, 1.0, 7.0]], [[0.0, 2.0, 
-0.0], [7.0, 2.0, 0.0]]], [[[0.0, 7.0, 2.0], [7.0, -3.0, -5.0]], [[1.0, 3.0, -6.0], [-4.0, -6.0, -5.0]]], [[[-2.0, 6.0, 5.0], 
-[1.0, -2.0, -2.0]], [[2.0, 1.0, 1.0], [-2.0, -4.0, -2.0]]], [[[0.0, 4.0, 3.0], [-7.0, -2.0, -4.0]], [[-4.0, 5.0, 3.0], [-3.0, 
--5.0, -7.0]]]])
-      arg1=Data(numpy.array([[-7.0, 3.0, -4.0], [2.0, 4.0, -4.0]]),self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[-4.0, -1.0, -4.0], [7.0, -6.0, 6.0], [2.0, 0.0, -1.0], [1.0, 0.0, 3.0], [2.0, 4.0, 3.0]], [[7.0, 
+-2.0, -5.0], [0.0, 5.0, -2.0], [-5.0, 3.0, 2.0], [-2.0, 4.0, 0.0], [-1.0, -4.0, 6.0]], [[-5.0, 5.0, -2.0], [-7.0, -6.0, -4.0], 
+[2.0, -7.0, -6.0], [3.0, -4.0, -6.0], [-5.0, -4.0, 6.0]], [[6.0, -7.0, 0.0], [5.0, 0.0, -5.0], [-2.0, -4.0, 3.0], [4.0, -3.0, 
+-7.0], [-6.0, -7.0, -3.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[2.0, -1.0, 0.0], [0.0, 0.0, 0.0], [3.0, -7.0, -1.0], [-5.0, 2.0, -7.0], [5.0, -1.0, 
+7.0]], [[5.0, -6.0, 2.0], [5.0, -5.0, 4.0], [5.0, 0.0, -1.0], [-7.0, -6.0, 5.0], [-5.0, 5.0, 3.0]], [[0.0, 1.0, 0.0], [-3.0, 
+0.0, -4.0], [1.0, 6.0, 1.0], [3.0, 0.0, -2.0], [4.0, -3.0, -4.0]], [[-6.0, 4.0, 7.0], [-6.0, 6.0, 3.0], [1.0, 0.0, -2.0], 
+[-4.0, 0.0, 6.0], [1.0, 4.0, 3.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-7.0, 5.0, -2.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 1.0, 0.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-7.0, -68.0], [-14.0, 20.0]], [[-14.0, 38.0], [-68.0, -26.0]]], [[[-11.0, 34.0], [-13.0, 
--42.0]], [[-14.0, -20.0], [54.0, 0.0]]], [[[-24.0, -4.0], [26.0, -6.0]], [[41.0, -2.0], [50.0, -4.0]]], [[[63.0, -2.0], [58.0, 
-4.0]], [[50.0, 46.0], [14.0, -4.0]]], [[[56.0, 0.0], [-12.0, 28.0]], [[40.0, 2.0], [-51.0, -20.0]]], [[[-24.0, -22.0], [-5.0, 
--12.0]], [[74.0, 34.0], [14.0, -4.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, -52.0], [45.0, 18.0]], [[-28.0, 12.0], [-72.0, 
--34.0]]], [[[-19.0, -4.0], [7.0, 28.0]], [[3.0, -20.0], [32.0, 30.0]]], [[[-29.0, -32.0], [-11.0, -28.0]], [[6.0, 8.0], [-43.0, 
-22.0]]], [[[13.0, 20.0], [-38.0, 22.0]], [[26.0, 38.0], [30.0, -12.0]]], [[[12.0, 0.0], [-5.0, 2.0]], [[-15.0, 4.0], [10.0, 
--12.0]]], [[[0.0, 4.0], [59.0, -6.0]], [[31.0, 0.0], [34.0, 2.0]]]])
+      ref=msk_ref*numpy.array([[31.0, -91.0, -12.0, -13.0, 0.0], [-49.0, 29.0, 46.0, 34.0, -25.0], [64.0, 27.0, -37.0, -29.0, 
+3.0], [-77.0, -25.0, -12.0, -29.0, 13.0]])+(1.-msk_ref)*numpy.array([[11.0, 0.0, 11.0, -28.0, 29.0], [24.0, 25.0, 30.0, -48.0, 
+-25.0], [1.0, -18.0, 12.0, 18.0, 21.0], [-32.0, -30.0, 6.0, -24.0, 10.0]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank2_offset2(self):
+      arg0=Data(numpy.array([[[[-7.0, -5.0, 6.0], [-7.0, 0.0, 6.0]], [[-5.0, -6.0, 2.0], [-5.0, 7.0, -7.0]], [[-7.0, 3.0, 
+-1.0], [3.0, 2.0, -1.0]], [[7.0, -2.0, 0.0], [0.0, -2.0, 2.0]], [[1.0, -3.0, 6.0], [3.0, -5.0, 0.0]]], [[[-4.0, 0.0, 0.0], 
+[7.0, -1.0, -4.0]], [[1.0, 6.0, -7.0], [-4.0, -4.0, -6.0]], [[4.0, -4.0, 4.0], [1.0, 3.0, -1.0]], [[2.0, 6.0, 2.0], [3.0, -6.0, 
+5.0]], [[4.0, -3.0, 5.0], [2.0, 7.0, -6.0]]], [[[0.0, -4.0, -7.0], [-7.0, 7.0, -4.0]], [[-5.0, 2.0, -7.0], [-1.0, 5.0, 5.0]], 
+[[-1.0, -1.0, -4.0], [-1.0, 0.0, -6.0]], [[2.0, -3.0, 2.0], [-2.0, 1.0, 6.0]], [[0.0, -4.0, 5.0], [5.0, 5.0, 7.0]]], [[[-4.0, 
+-5.0, -7.0], [-4.0, 4.0, -7.0]], [[-1.0, -4.0, 0.0], [-3.0, 1.0, -7.0]], [[-7.0, 0.0, 0.0], [-5.0, -7.0, 3.0]], [[6.0, 2.0, 
+3.0], [4.0, 5.0, 7.0]], [[2.0, -6.0, 0.0], [2.0, -2.0, -1.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[1.0, -5.0, 4.0], [0.0, -2.0, 7.0]], [[-5.0, -5.0, 1.0], [-2.0, 0.0, 6.0]], [[-5.0, 
+0.0, 0.0], [0.0, 7.0, -4.0]], [[7.0, -3.0, 7.0], [-7.0, -1.0, -4.0]], [[1.0, 7.0, 7.0], [2.0, -2.0, 0.0]]], [[[2.0, -7.0, 
+-2.0], [2.0, 6.0, -5.0]], [[1.0, 3.0, -5.0], [4.0, 7.0, -1.0]], [[-4.0, 4.0, 1.0], [0.0, 2.0, -6.0]], [[-1.0, 4.0, 3.0], [4.0, 
+1.0, -2.0]], [[-2.0, 1.0, 4.0], [1.0, -5.0, -2.0]]], [[[1.0, -7.0, 0.0], [3.0, 6.0, 1.0]], [[-4.0, -3.0, -2.0], [2.0, 0.0, 
+-3.0]], [[-3.0, 6.0, 0.0], [2.0, 7.0, 1.0]], [[-7.0, 0.0, -2.0], [2.0, -4.0, 6.0]], [[6.0, 7.0, 0.0], [6.0, 0.0, -1.0]]], 
+[[[-7.0, -6.0, -4.0], [-5.0, -4.0, 2.0]], [[7.0, -6.0, -6.0], [-4.0, -6.0, -7.0]], [[3.0, -3.0, 4.0], [-4.0, 5.0, 5.0]], [[3.0, 
+0.0, 0.0], [7.0, -5.0, -3.0]], [[-3.0, 0.0, 1.0], [2.0, -4.0, -2.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[6.0, 4.0, 0.0], [-1.0, 4.0, 2.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-6.0, 7.0, 2.0], [0.0, 4.0, 3.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[-43.0, -35.0, -27.0, 30.0, -29.0], [-43.0, 6.0, 17.0, 19.0, 26.0], [11.0, 9.0, -21.0, 18.0, 
+13.0], [-38.0, -29.0, -59.0, 74.0, -24.0]])+(1.-msk_ref)*numpy.array([[-20.0, 15.0, 46.0, -65.0, 49.0], [-56.0, 30.0, 44.0, 
+38.0, 1.0], [-28.0, -10.0, 91.0, 40.0, 10.0], [-18.0, -141.0, 4.0, -47.0, -2.0]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[0.0, 2.0], [-2.0, -6.0]], [[2.0, 0.0], [4.0, -3.0]], [[0.0, 6.0], [1.0, -6.0]], [[3.0, 
--5.0], [-2.0, -5.0]], [[6.0, -6.0], [-7.0, -4.0]], [[0.0, -4.0], [-5.0, 5.0]]])+(1.-msk_arg0)*numpy.array([[[-7.0, 6.0], [-3.0, 
--1.0]], [[1.0, -6.0], [0.0, 6.0]], [[0.0, 0.0], [2.0, 1.0]], [[-1.0, 4.0], [6.0, 0.0]], [[6.0, 6.0], [-6.0, -2.0]], [[-3.0, 
-0.0], [4.0, 0.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(3.0)+(1-msk_arg1)*(6.0)
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[-4.0, -5.0, 6.0, 0.0, 6.0], [0.0, -3.0, 0.0, 5.0, -1.0], [-2.0, 0.0, -5.0, -4.0, 6.0], [1.0, 3.0, 
+-1.0, 0.0, -3.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-5.0, 5.0, -2.0, -6.0, -3.0], [-4.0, -2.0, -5.0, 0.0, 1.0], [0.0, 1.0, 6.0, -3.0, 
+7.0], [3.0, -6.0, 1.0, -5.0, -1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([1.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([5.0, -5.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[0.0, 6.0], [-6.0, -18.0]], [[6.0, 0.0], [12.0, -9.0]], [[0.0, 18.0], [3.0, -18.0]], [[9.0, 
--15.0], [-6.0, -15.0]], [[18.0, -18.0], [-21.0, -12.0]], [[0.0, -12.0], [-15.0, 15.0]]])+(1.-msk_ref)*numpy.array([[[-42.0, 
-36.0], [-18.0, -6.0]], [[6.0, -36.0], [0.0, 36.0]], [[0.0, 0.0], [12.0, 6.0]], [[-6.0, 24.0], [36.0, 0.0]], [[36.0, 36.0], 
-[-36.0, -12.0]], [[-18.0, 0.0], [24.0, 0.0]]])
+      ref=msk_ref*numpy.array([[[-4.0, -4.0], [-5.0, -5.0], [6.0, 6.0], [0.0, 0.0], [6.0, 6.0]], [[0.0, 0.0], [-3.0, -3.0], 
+[0.0, 0.0], [5.0, 5.0], [-1.0, -1.0]], [[-2.0, -2.0], [0.0, 0.0], [-5.0, -5.0], [-4.0, -4.0], [6.0, 6.0]], [[1.0, 1.0], [3.0, 
+3.0], [-1.0, -1.0], [0.0, 0.0], [-3.0, -3.0]]])+(1.-msk_ref)*numpy.array([[[-25.0, 25.0], [25.0, -25.0], [-10.0, 10.0], [-30.0, 
+30.0], [-15.0, 15.0]], [[-20.0, 20.0], [-10.0, 10.0], [-25.0, 25.0], [0.0, 0.0], [5.0, -5.0]], [[0.0, 0.0], [5.0, -5.0], [30.0, 
+-30.0], [-15.0, 15.0], [35.0, -35.0]], [[15.0, -15.0], [-30.0, 30.0], [5.0, -5.0], [-25.0, 25.0], [-5.0, 5.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank1_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, 7.0, -6.0], [-2.0, 7.0, -1.0]], [[7.0, -3.0, -3.0], [-7.0, 3.0, -3.0]]], [[[-1.0, 0.0, 
--6.0], [2.0, 1.0, 3.0]], [[-5.0, -4.0, 6.0], [-1.0, 2.0, -2.0]]], [[[3.0, 1.0, -6.0], [7.0, -6.0, 6.0]], [[0.0, -1.0, -3.0], 
-[-7.0, -3.0, 4.0]]], [[[3.0, -2.0, -1.0], [-6.0, -7.0, 0.0]], [[-5.0, 5.0, 3.0], [-4.0, 1.0, -5.0]]], [[[-7.0, -6.0, 7.0], 
-[4.0, 3.0, 0.0]], [[-1.0, -4.0, -7.0], [3.0, -3.0, 0.0]]], [[[0.0, -7.0, 7.0], [2.0, -7.0, 6.0]], [[-1.0, -4.0, -2.0], [0.0, 
-4.0, -7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 1.0, 0.0], [-6.0, -7.0, -3.0]], [[3.0, 0.0, 2.0], [-5.0, 7.0, -1.0]]], 
-[[[3.0, 3.0, 6.0], [6.0, -2.0, 1.0]], [[0.0, 6.0, 7.0], [4.0, -7.0, 1.0]]], [[[-4.0, 4.0, 3.0], [3.0, -1.0, -7.0]], [[-3.0, 
--2.0, -6.0], [-4.0, 0.0, 5.0]]], [[[-1.0, -7.0, 6.0], [2.0, -7.0, -2.0]], [[-6.0, -1.0, -7.0], [-2.0, 6.0, 0.0]]], [[[0.0, 
--2.0, -3.0], [-1.0, 0.0, -7.0]], [[0.0, -4.0, 7.0], [-1.0, 6.0, -6.0]]], [[[-1.0, 7.0, 0.0], [0.0, 1.0, -5.0]], [[1.0, -2.0, 
-5.0], [-7.0, 0.0, 0.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([0.0, 6.0, 2.0])+(1.-msk_arg1)*numpy.array([0.0, -1.0, -3.0])
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[0.0, 3.0, 2.0], [5.0, -7.0, -4.0], [-3.0, -7.0, 0.0], [-3.0, 0.0, 0.0], [-3.0, -3.0, 2.0]], 
+[[-1.0, -5.0, 1.0], [4.0, -6.0, 2.0], [-1.0, -6.0, 1.0], [3.0, 5.0, -7.0], [0.0, 5.0, -4.0]], [[-5.0, 7.0, -6.0], [-2.0, 7.0, 
+2.0], [-3.0, -6.0, 1.0], [6.0, -3.0, 3.0], [-5.0, 6.0, 4.0]], [[-4.0, -4.0, 2.0], [6.0, -1.0, 3.0], [-2.0, 1.0, 5.0], [5.0, 
+1.0, 4.0], [-7.0, -6.0, -4.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[5.0, -1.0, 1.0], [0.0, 4.0, -4.0], [0.0, 7.0, 4.0], [-5.0, 1.0, -1.0], [-7.0, -4.0, 
+-2.0]], [[-7.0, -7.0, 4.0], [-2.0, 0.0, 3.0], [-7.0, 0.0, 5.0], [4.0, -3.0, -2.0], [-6.0, -5.0, -1.0]], [[-7.0, -1.0, 7.0], 
+[-3.0, 2.0, 0.0], [-4.0, 4.0, -4.0], [6.0, 0.0, 2.0], [1.0, 3.0, -3.0]], [[-2.0, 3.0, 1.0], [-7.0, 1.0, 3.0], [-5.0, 4.0, 
+-4.0], [-6.0, 5.0, 0.0], [5.0, 6.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[7.0, -6.0, 0.0], [2.0, -2.0, -5.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[1.0, -4.0, 3.0], [5.0, 4.0, -5.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[30.0, 40.0], [-24.0, 12.0]], [[-12.0, 12.0], [-12.0, 8.0]], [[-6.0, -24.0], [-12.0, -10.0]], 
-[[-14.0, -42.0], [36.0, -4.0]], [[-22.0, 18.0], [-38.0, -18.0]], [[-28.0, -30.0], [-28.0, 
-10.0]]])+(1.-msk_ref)*numpy.array([[[-1.0, 16.0], [-6.0, -4.0]], [[-21.0, -1.0], [-27.0, 4.0]], [[-13.0, 22.0], [20.0, -15.0]], 
-[[-11.0, 13.0], [22.0, -6.0]], [[11.0, 21.0], [-17.0, 12.0]], [[-7.0, 14.0], [-13.0, 0.0]]])
+      ref=msk_ref*numpy.array([[[-18.0, -16.0], [77.0, 44.0], [21.0, 8.0], [-21.0, -6.0], [-3.0, -10.0]], [[23.0, 3.0], [64.0, 
+10.0], [29.0, 5.0], [-9.0, 31.0], [-30.0, 10.0]], [[-77.0, 6.0], [-56.0, -28.0], [15.0, 1.0], [60.0, 3.0], [-71.0, -42.0]], 
+[[-4.0, -10.0], [48.0, -1.0], [-20.0, -31.0], [29.0, -12.0], [-13.0, 18.0]]])+(1.-msk_ref)*numpy.array([[[12.0, 16.0], [-28.0, 
+36.0], [-16.0, 8.0], [-12.0, -16.0], [3.0, -41.0]], [[33.0, -83.0], [7.0, -25.0], [8.0, -60.0], [10.0, 18.0], [11.0, -45.0]], 
+[[18.0, -74.0], [-11.0, -7.0], [-32.0, 16.0], [12.0, 20.0], [-20.0, 32.0]], [[-11.0, -3.0], [-2.0, -46.0], [-33.0, 11.0], 
+[-26.0, -10.0], [-19.0, 49.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank3_expandedData_rank1_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[3.0, 0.0], [3.0, -2.0]], [[2.0, 0.0], [-6.0, 3.0]], [[0.0, 7.0], [0.0, -4.0]], [[-4.0, 
--5.0], [-3.0, -4.0]], [[2.0, 6.0], [2.0, 2.0]], [[1.0, 1.0], [0.0, 6.0]]])+(1.-msk_arg0)*numpy.array([[[-2.0, 2.0], [0.0, 
-4.0]], [[-2.0, 1.0], [-6.0, -2.0]], [[-3.0, 4.0], [0.0, -3.0]], [[5.0, -2.0], [-5.0, 1.0]], [[3.0, 2.0], [2.0, -3.0]], [[-5.0, 
-3.0], [7.0, 0.0]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([-6.0, -1.0])+(1.-msk_arg1)*numpy.array([4.0, -4.0])
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank3_offset2(self):
+      arg0=Data(numpy.array([[[[-3.0, 6.0, 0.0], [-2.0, 6.0, 2.0]], [[6.0, 7.0, 6.0], [1.0, 2.0, 4.0]], [[4.0, -6.0, 3.0], 
+[4.0, -7.0, -1.0]], [[-3.0, -3.0, 4.0], [3.0, -5.0, -2.0]], [[7.0, -7.0, -6.0], [2.0, -3.0, -7.0]]], [[[-7.0, -5.0, 4.0], [7.0, 
+7.0, 6.0]], [[-2.0, 0.0, 5.0], [-2.0, 3.0, -7.0]], [[7.0, -4.0, 3.0], [5.0, 1.0, 7.0]], [[6.0, -7.0, 2.0], [-5.0, 6.0, 2.0]], 
+[[-2.0, -7.0, 1.0], [3.0, -2.0, -2.0]]], [[[2.0, -3.0, -1.0], [-7.0, 5.0, 2.0]], [[7.0, -4.0, 0.0], [-3.0, -2.0, 7.0]], [[-3.0, 
+0.0, -3.0], [-2.0, 0.0, -1.0]], [[5.0, -5.0, 3.0], [2.0, 1.0, -1.0]], [[4.0, 1.0, 6.0], [-5.0, 2.0, -5.0]]], [[[6.0, -5.0, 
+0.0], [0.0, -6.0, -6.0]], [[-7.0, 6.0, 6.0], [1.0, 2.0, -5.0]], [[-7.0, 7.0, -4.0], [3.0, -5.0, 5.0]], [[-7.0, -2.0, 0.0], 
+[4.0, 0.0, 3.0]], [[-3.0, -6.0, -4.0], [3.0, -6.0, -6.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[4.0, 3.0, 5.0], [-3.0, 5.0, -1.0]], [[6.0, 7.0, 4.0], [-1.0, 1.0, 0.0]], [[-7.0, 
+2.0, -3.0], [7.0, 2.0, 0.0]], [[3.0, -3.0, 4.0], [-4.0, 1.0, 1.0]], [[0.0, 1.0, -6.0], [5.0, -2.0, 5.0]]], [[[-4.0, 3.0, 1.0], 
+[3.0, -2.0, -3.0]], [[-5.0, -2.0, -6.0], [3.0, -5.0, -1.0]], [[-5.0, -7.0, 7.0], [-7.0, 4.0, 2.0]], [[6.0, -1.0, -6.0], [-7.0, 
+6.0, 0.0]], [[4.0, -4.0, -3.0], [-1.0, 7.0, 6.0]]], [[[7.0, -6.0, 0.0], [0.0, 0.0, 2.0]], [[1.0, 5.0, -2.0], [5.0, 5.0, -7.0]], 
+[[-5.0, 6.0, 7.0], [1.0, 4.0, -3.0]], [[0.0, 4.0, 0.0], [3.0, 0.0, -7.0]], [[6.0, 0.0, 0.0], [0.0, 3.0, 5.0]]], [[[0.0, 0.0, 
+-5.0], [-2.0, 4.0, 3.0]], [[-7.0, 1.0, 5.0], [0.0, 0.0, 3.0]], [[1.0, 7.0, 1.0], [3.0, -7.0, -7.0]], [[6.0, 5.0, 7.0], [-5.0, 
+-6.0, -4.0]], [[-5.0, -3.0, -6.0], [-4.0, -3.0, -5.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[0.0, -3.0, -3.0], [6.0, -7.0, -5.0]], [[3.0, 0.0, 0.0], [2.0, 5.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[1.0, 2.0, -7.0], [6.0, 5.0, -2.0]], [[-4.0, -2.0, -5.0], [0.0, -1.0, -2.0]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[-82.0, 27.0], [-67.0, 50.0], [87.0, -20.0], [60.0, -38.0], [107.0, -25.0]], [[-34.0, 58.0], 
+[-13.0, -30.0], [-9.0, 71.0], [-67.0, 48.0], [60.0, -20.0]], [[-75.0, 27.0], [-27.0, 40.0], [2.0, -18.0], [16.0, 19.0], [-40.0, 
+-13.0]], [[87.0, -42.0], [-19.0, -34.0], [19.0, -15.0], [15.0, 2.0], [120.0, -63.0]]])+(1.-msk_ref)*numpy.array([[[-16.0, 
+-50.0], [-9.0, -59.0], [70.0, 37.0], [-52.0, -29.0], [54.0, 20.0]], [[9.0, 13.0], [28.0, 61.0], [-94.0, -9.0], [34.0, 2.0], 
+[34.0, -12.0]], [[-9.0, -20.0], [94.0, 5.0], [-10.0, -25.0], [40.0, 6.0], [11.0, -37.0]], [[37.0, 15.0], [-46.0, -5.0], [5.0, 
+-2.0], [-85.0, -55.0], [2.0, 69.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank2_taggedData_rank2_offset0(self):
+      arg0=Data(numpy.array([[4.0, 5.0, -2.0, -4.0, 5.0], [-3.0, -6.0, 7.0, 7.0, -3.0], [0.0, 7.0, 0.0, -7.0, 5.0], [-7.0, 
+-2.0, 0.0, -5.0, 6.0]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[-1.0, 0.0, 0.0, -2.0, -5.0], [5.0, -3.0, 1.0, 7.0, 2.0], [-2.0, 1.0, 1.0, 7.0, 3.0], 
+[-5.0, 0.0, 2.0, 7.0, 1.0]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-7.0, 6.0, 6.0, -5.0, -7.0], [0.0, 0.0, -5.0, 7.0, -1.0], [-3.0, -2.0, -4.0, 0.0, -7.0], [-7.0, 
+-4.0, 2.0, 4.0, -3.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[-4.0, -7.0, 2.0, 1.0, -3.0], [4.0, 7.0, 4.0, -2.0, 7.0], [-5.0, 1.0, 0.0, -4.0, 1.0], 
+[1.0, 1.0, 3.0, -7.0, -7.0]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-18.0, -3.0], [0.0, 0.0]], [[-18.0, -3.0], [12.0, 2.0]]], [[[-12.0, -2.0], [0.0, 0.0]], 
-[[36.0, 6.0], [-18.0, -3.0]]], [[[0.0, 0.0], [-42.0, -7.0]], [[0.0, 0.0], [24.0, 4.0]]], [[[24.0, 4.0], [30.0, 5.0]], [[18.0, 
-3.0], [24.0, 4.0]]], [[[-12.0, -2.0], [-36.0, -6.0]], [[-12.0, -2.0], [-12.0, -2.0]]], [[[-6.0, -1.0], [-6.0, -1.0]], [[0.0, 
-0.0], [-36.0, -6.0]]]])+(1.-msk_ref)*numpy.array([[[[-8.0, 8.0], [8.0, -8.0]], [[0.0, 0.0], [16.0, -16.0]]], [[[-8.0, 8.0], 
-[4.0, -4.0]], [[-24.0, 24.0], [-8.0, 8.0]]], [[[-12.0, 12.0], [16.0, -16.0]], [[0.0, 0.0], [-12.0, 12.0]]], [[[20.0, -20.0], 
-[-8.0, 8.0]], [[-20.0, 20.0], [4.0, -4.0]]], [[[12.0, -12.0], [8.0, -8.0]], [[8.0, -8.0], [-12.0, 12.0]]], [[[-20.0, 20.0], 
-[12.0, -12.0]], [[28.0, -28.0], [0.0, 0.0]]]])
+      ref=msk_ref*numpy.array([[[[-28.0, 24.0, 24.0, -20.0, -28.0], [0.0, 0.0, -20.0, 28.0, -4.0], [-12.0, -8.0, -16.0, 0.0, 
+-28.0], [-28.0, -16.0, 8.0, 16.0, -12.0]], [[-35.0, 30.0, 30.0, -25.0, -35.0], [0.0, 0.0, -25.0, 35.0, -5.0], [-15.0, -10.0, 
+-20.0, 0.0, -35.0], [-35.0, -20.0, 10.0, 20.0, -15.0]], [[14.0, -12.0, -12.0, 10.0, 14.0], [0.0, 0.0, 10.0, -14.0, 2.0], [6.0, 
+4.0, 8.0, 0.0, 14.0], [14.0, 8.0, -4.0, -8.0, 6.0]], [[28.0, -24.0, -24.0, 20.0, 28.0], [0.0, 0.0, 20.0, -28.0, 4.0], [12.0, 
+8.0, 16.0, 0.0, 28.0], [28.0, 16.0, -8.0, -16.0, 12.0]], [[-35.0, 30.0, 30.0, -25.0, -35.0], [0.0, 0.0, -25.0, 35.0, -5.0], 
+[-15.0, -10.0, -20.0, 0.0, -35.0], [-35.0, -20.0, 10.0, 20.0, -15.0]]], [[[21.0, -18.0, -18.0, 15.0, 21.0], [0.0, 0.0, 15.0, 
+-21.0, 3.0], [9.0, 6.0, 12.0, 0.0, 21.0], [21.0, 12.0, -6.0, -12.0, 9.0]], [[42.0, -36.0, -36.0, 30.0, 42.0], [0.0, 0.0, 30.0, 
+-42.0, 6.0], [18.0, 12.0, 24.0, 0.0, 42.0], [42.0, 24.0, -12.0, -24.0, 18.0]], [[-49.0, 42.0, 42.0, -35.0, -49.0], [0.0, 0.0, 
+-35.0, 49.0, -7.0], [-21.0, -14.0, -28.0, 0.0, -49.0], [-49.0, -28.0, 14.0, 28.0, -21.0]], [[-49.0, 42.0, 42.0, -35.0, -49.0], 
+[0.0, 0.0, -35.0, 49.0, -7.0], [-21.0, -14.0, -28.0, 0.0, -49.0], [-49.0, -28.0, 14.0, 28.0, -21.0]], [[21.0, -18.0, -18.0, 
+15.0, 21.0], [0.0, 0.0, 15.0, -21.0, 3.0], [9.0, 6.0, 12.0, 0.0, 21.0], [21.0, 12.0, -6.0, -12.0, 9.0]]], [[[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-49.0, 42.0, 42.0, -35.0, 
+-49.0], [0.0, 0.0, -35.0, 49.0, -7.0], [-21.0, -14.0, -28.0, 0.0, -49.0], [-49.0, -28.0, 14.0, 28.0, -21.0]], [[0.0, 0.0, 0.0, 
+0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[49.0, -42.0, -42.0, 35.0, 49.0], 
+[0.0, 0.0, 35.0, -49.0, 7.0], [21.0, 14.0, 28.0, 0.0, 49.0], [49.0, 28.0, -14.0, -28.0, 21.0]], [[-35.0, 30.0, 30.0, -25.0, 
+-35.0], [0.0, 0.0, -25.0, 35.0, -5.0], [-15.0, -10.0, -20.0, 0.0, -35.0], [-35.0, -20.0, 10.0, 20.0, -15.0]]], [[[49.0, -42.0, 
+-42.0, 35.0, 49.0], [0.0, 0.0, 35.0, -49.0, 7.0], [21.0, 14.0, 28.0, 0.0, 49.0], [49.0, 28.0, -14.0, -28.0, 21.0]], [[14.0, 
+-12.0, -12.0, 10.0, 14.0], [0.0, 0.0, 10.0, -14.0, 2.0], [6.0, 4.0, 8.0, 0.0, 14.0], [14.0, 8.0, -4.0, -8.0, 6.0]], [[0.0, 0.0, 
+0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[35.0, -30.0, -30.0, 25.0, 
+35.0], [0.0, 0.0, 25.0, -35.0, 5.0], [15.0, 10.0, 20.0, 0.0, 35.0], [35.0, 20.0, -10.0, -20.0, 15.0]], [[-42.0, 36.0, 36.0, 
+-30.0, -42.0], [0.0, 0.0, -30.0, 42.0, -6.0], [-18.0, -12.0, -24.0, 0.0, -42.0], [-42.0, -24.0, 12.0, 24.0, 
+-18.0]]]])+(1.-msk_ref)*numpy.array([[[[4.0, 7.0, -2.0, -1.0, 3.0], [-4.0, -7.0, -4.0, 2.0, -7.0], [5.0, -1.0, 0.0, 4.0, -1.0], 
+[-1.0, -1.0, -3.0, 7.0, 7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 
+0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], 
+[[8.0, 14.0, -4.0, -2.0, 6.0], [-8.0, -14.0, -8.0, 4.0, -14.0], [10.0, -2.0, 0.0, 8.0, -2.0], [-2.0, -2.0, -6.0, 14.0, 14.0]], 
+[[20.0, 35.0, -10.0, -5.0, 15.0], [-20.0, -35.0, -20.0, 10.0, -35.0], [25.0, -5.0, 0.0, 20.0, -5.0], [-5.0, -5.0, -15.0, 35.0, 
+35.0]]], [[[-20.0, -35.0, 10.0, 5.0, -15.0], [20.0, 35.0, 20.0, -10.0, 35.0], [-25.0, 5.0, 0.0, -20.0, 5.0], [5.0, 5.0, 15.0, 
+-35.0, -35.0]], [[12.0, 21.0, -6.0, -3.0, 9.0], [-12.0, -21.0, -12.0, 6.0, -21.0], [15.0, -3.0, 0.0, 12.0, -3.0], [-3.0, -3.0, 
+-9.0, 21.0, 21.0]], [[-4.0, -7.0, 2.0, 1.0, -3.0], [4.0, 7.0, 4.0, -2.0, 7.0], [-5.0, 1.0, 0.0, -4.0, 1.0], [1.0, 1.0, 3.0, 
+-7.0, -7.0]], [[-28.0, -49.0, 14.0, 7.0, -21.0], [28.0, 49.0, 28.0, -14.0, 49.0], [-35.0, 7.0, 0.0, -28.0, 7.0], [7.0, 7.0, 
+21.0, -49.0, -49.0]], [[-8.0, -14.0, 4.0, 2.0, -6.0], [8.0, 14.0, 8.0, -4.0, 14.0], [-10.0, 2.0, 0.0, -8.0, 2.0], [2.0, 2.0, 
+6.0, -14.0, -14.0]]], [[[8.0, 14.0, -4.0, -2.0, 6.0], [-8.0, -14.0, -8.0, 4.0, -14.0], [10.0, -2.0, 0.0, 8.0, -2.0], [-2.0, 
+-2.0, -6.0, 14.0, 14.0]], [[-4.0, -7.0, 2.0, 1.0, -3.0], [4.0, 7.0, 4.0, -2.0, 7.0], [-5.0, 1.0, 0.0, -4.0, 1.0], [1.0, 1.0, 
+3.0, -7.0, -7.0]], [[-4.0, -7.0, 2.0, 1.0, -3.0], [4.0, 7.0, 4.0, -2.0, 7.0], [-5.0, 1.0, 0.0, -4.0, 1.0], [1.0, 1.0, 3.0, 
+-7.0, -7.0]], [[-28.0, -49.0, 14.0, 7.0, -21.0], [28.0, 49.0, 28.0, -14.0, 49.0], [-35.0, 7.0, 0.0, -28.0, 7.0], [7.0, 7.0, 
+21.0, -49.0, -49.0]], [[-12.0, -21.0, 6.0, 3.0, -9.0], [12.0, 21.0, 12.0, -6.0, 21.0], [-15.0, 3.0, 0.0, -12.0, 3.0], [3.0, 
+3.0, 9.0, -21.0, -21.0]]], [[[20.0, 35.0, -10.0, -5.0, 15.0], [-20.0, -35.0, -20.0, 10.0, -35.0], [25.0, -5.0, 0.0, 20.0, 
+-5.0], [-5.0, -5.0, -15.0, 35.0, 35.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], 
+[0.0, 0.0, 0.0, 0.0, 0.0]], [[-8.0, -14.0, 4.0, 2.0, -6.0], [8.0, 14.0, 8.0, -4.0, 14.0], [-10.0, 2.0, 0.0, -8.0, 2.0], [2.0, 
+2.0, 6.0, -14.0, -14.0]], [[-28.0, -49.0, 14.0, 7.0, -21.0], [28.0, 49.0, 28.0, -14.0, 49.0], [-35.0, 7.0, 0.0, -28.0, 7.0], 
+[7.0, 7.0, 21.0, -49.0, -49.0]], [[-4.0, -7.0, 2.0, 1.0, -3.0], [4.0, 7.0, 4.0, -2.0, 7.0], [-5.0, 1.0, 0.0, -4.0, 1.0], [1.0, 
+1.0, 3.0, -7.0, -7.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-      if not arg0.isLazy():
-        arg0=arg0*1j
-        arg1=arg1*1j
-        ref=-ref
-        res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
-        self.assertTrue(isinstance(res,Data),"wrong type of result.")
-        self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
-        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank2_offset1(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-2.0, -2.0, 6.0], [6.0, 6.0, 2.0]], [[-4.0, 2.0, 3.0], [4.0, -6.0, 6.0]]], [[[6.0, 2.0, 
-3.0], [2.0, -4.0, -1.0]], [[-6.0, -7.0, 1.0], [-6.0, 3.0, -7.0]]], [[[0.0, 3.0, 0.0], [-2.0, 4.0, -4.0]], [[2.0, 0.0, -1.0], 
-[1.0, 2.0, -4.0]]], [[[0.0, 4.0, 0.0], [2.0, -2.0, -7.0]], [[1.0, 2.0, -5.0], [-4.0, -6.0, -7.0]]], [[[6.0, -1.0, -4.0], [5.0, 
-7.0, 5.0]], [[-1.0, -2.0, 7.0], [7.0, 3.0, -5.0]]], [[[-5.0, 5.0, 3.0], [-6.0, -2.0, 0.0]], [[-3.0, 0.0, 6.0], [1.0, 4.0, 
--5.0]]]])+(1.-msk_arg0)*numpy.array([[[[0.0, 4.0, 6.0], [4.0, 5.0, -2.0]], [[-3.0, 4.0, 7.0], [4.0, -7.0, 2.0]]], [[[3.0, 7.0, 
-0.0], [0.0, -7.0, 0.0]], [[5.0, -6.0, -3.0], [0.0, -5.0, -1.0]]], [[[3.0, 0.0, 1.0], [2.0, -3.0, -3.0]], [[-2.0, 2.0, 1.0], 
-[-4.0, 7.0, -2.0]]], [[[4.0, 1.0, -4.0], [-5.0, -1.0, -2.0]], [[7.0, -2.0, 2.0], [-4.0, -6.0, 1.0]]], [[[5.0, 2.0, -3.0], [2.0, 
-5.0, 4.0]], [[-1.0, -4.0, -4.0], [-6.0, 3.0, 7.0]]], [[[4.0, -2.0, 5.0], [-6.0, -1.0, -5.0]], [[4.0, 0.0, 2.0], [2.0, -7.0, 
--4.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*numpy.array([[7.0, -1.0, 6.0], [1.0, 0.0, -4.0]])+(1.-msk_arg1)*numpy.array([[-5.0, 5.0, 1.0], [1.0, 6.0, 
-2.0]])
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank3_offset1(self):
+      arg0=Data(numpy.array([[[3.0, -5.0, -1.0], [-4.0, -4.0, -7.0], [-3.0, 3.0, 3.0], [-1.0, -2.0, 1.0], [-5.0, -6.0, 5.0]], 
+[[0.0, 3.0, -2.0], [3.0, 5.0, 4.0], [-1.0, 2.0, 2.0], [7.0, -6.0, 7.0], [-7.0, -3.0, -1.0]], [[5.0, 7.0, 4.0], [-6.0, -2.0, 
+0.0], [-6.0, -1.0, -4.0], [7.0, -3.0, 0.0], [-7.0, -3.0, 6.0]], [[0.0, 6.0, 4.0], [-2.0, 6.0, 1.0], [-1.0, 3.0, 6.0], [2.0, 
+-7.0, 5.0], [-1.0, 6.0, 1.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-1.0, 5.0, 2.0], [4.0, 3.0, 6.0], [-4.0, 1.0, -5.0], [-6.0, -3.0, 7.0], [-4.0, 3.0, 
+6.0]], [[2.0, -3.0, -4.0], [-5.0, 3.0, -3.0], [7.0, 2.0, -1.0], [1.0, 1.0, 0.0], [0.0, 5.0, 5.0]], [[3.0, 1.0, -2.0], [2.0, 
+4.0, -5.0], [-6.0, -2.0, 0.0], [-6.0, 3.0, -2.0], [-5.0, -1.0, 3.0]], [[2.0, 6.0, -4.0], [5.0, -2.0, 2.0], [0.0, -4.0, 0.0], 
+[0.0, 3.0, 2.0], [6.0, -5.0, -5.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[-2.0, -7.0, 0.0], [0.0, 3.0, -4.0], [3.0, -5.0, 1.0], [-2.0, 0.0, 3.0], [-7.0, -4.0, -2.0]], 
+[[-1.0, 1.0, 0.0], [-2.0, 3.0, -6.0], [-3.0, -3.0, 5.0], [-6.0, 6.0, 3.0], [-5.0, 4.0, -5.0]], [[0.0, -7.0, -1.0], [0.0, -3.0, 
+7.0], [6.0, -7.0, 5.0], [1.0, -5.0, -2.0], [0.0, 0.0, 0.0]], [[-6.0, 6.0, -3.0], [-5.0, 1.0, -6.0], [2.0, 0.0, -7.0], [-2.0, 
+-2.0, -2.0], [2.0, -4.0, 5.0]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[0.0, 1.0, -5.0], [-5.0, 1.0, 6.0], [-5.0, -3.0, -7.0], [0.0, -3.0, -7.0], [0.0, 3.0, 
+3.0]], [[-7.0, -5.0, -3.0], [-7.0, 3.0, -7.0], [1.0, -1.0, -6.0], [0.0, 7.0, -3.0], [1.0, 4.0, -1.0]], [[-7.0, -2.0, 1.0], 
+[-1.0, -5.0, 5.0], [2.0, -3.0, 7.0], [4.0, 4.0, 3.0], [-7.0, -2.0, 6.0]], [[-4.0, 0.0, 0.0], [3.0, 1.0, 0.0], [2.0, 0.0, 6.0], 
+[-6.0, -5.0, 7.0], [-4.0, 0.0, -7.0]]]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[24.0, -26.0], [48.0, -2.0]], [[-12.0, -16.0], [70.0, -20.0]]], [[[58.0, -6.0], [12.0, 6.0]], 
-[[-29.0, -10.0], [-87.0, 22.0]]], [[[-3.0, 0.0], [-42.0, 14.0]], [[8.0, 6.0], [-19.0, 17.0]]], [[[-4.0, 0.0], [-26.0, 30.0]], 
-[[-25.0, 21.0], [-64.0, 24.0]]], [[[19.0, 22.0], [58.0, -15.0]], [[37.0, -29.0], [16.0, 27.0]]], [[[-22.0, -17.0], [-40.0, 
--6.0]], [[15.0, -27.0], [-27.0, 21.0]]]])+(1.-msk_ref)*numpy.array([[[[26.0, 36.0], [3.0, 30.0]], [[42.0, 35.0], [-53.0, 
--34.0]]], [[[20.0, 45.0], [-35.0, -42.0]], [[-58.0, -37.0], [-26.0, -32.0]]], [[[-14.0, 5.0], [-28.0, -22.0]], [[21.0, 12.0], 
-[53.0, 34.0]]], [[[-19.0, 2.0], [18.0, -15.0]], [[-43.0, -1.0], [-9.0, -38.0]]], [[[-18.0, 11.0], [19.0, 40.0]], [[-19.0, 
--33.0], [52.0, 26.0]]], [[[-25.0, 2.0], [20.0, -22.0]], [[-18.0, 8.0], [-49.0, -48.0]]]])
+      ref=msk_ref*numpy.array([[[[29.0, -11.0, 33.0, -9.0, 1.0], [-8.0, -15.0, 1.0, -51.0, -30.0], [36.0, 8.0, 48.0, 30.0, 
+0.0], [-45.0, -14.0, 13.0, 6.0, 21.0]], [[36.0, 16.0, 1.0, -13.0, 58.0], [0.0, 38.0, -11.0, -21.0, 39.0], [35.0, -37.0, -31.0, 
+30.0, 0.0], [21.0, 58.0, 41.0, 30.0, -27.0]], [[-15.0, -3.0, -21.0, 15.0, 3.0], [6.0, -3.0, 15.0, 45.0, 12.0], [-24.0, 12.0, 
+-24.0, -24.0, 0.0], [27.0, 0.0, -27.0, -6.0, -3.0]], [[16.0, -10.0, 8.0, 5.0, 13.0], [-1.0, -10.0, 14.0, -3.0, -8.0], [13.0, 
+13.0, 13.0, 7.0, 0.0], [-9.0, -3.0, -9.0, 4.0, 11.0]], [[52.0, -38.0, 20.0, 25.0, 49.0], [-1.0, -38.0, 58.0, 9.0, -24.0], 
+[37.0, 53.0, 37.0, 15.0, 0.0], [-21.0, -11.0, -45.0, 12.0, 39.0]]], [[[-21.0, 17.0, -17.0, -6.0, -8.0], [3.0, 21.0, -19.0, 
+12.0, 22.0], [-19.0, -23.0, -31.0, -11.0, 0.0], [24.0, 15.0, 14.0, -2.0, -22.0]], [[-41.0, -1.0, -12.0, 6.0, -49.0], [2.0, 
+-15.0, -4.0, 24.0, -15.0], [-39.0, 13.0, 3.0, -30.0, 0.0], [0.0, -34.0, -22.0, -24.0, 6.0]], [[-12.0, -2.0, -11.0, 8.0, -5.0], 
+[3.0, -4.0, 7.0, 24.0, 3.0], [-16.0, 8.0, -10.0, -15.0, 0.0], [12.0, -5.0, -16.0, -6.0, 0.0]], [[28.0, -46.0, 58.0, 7.0, 
+-39.0], [-13.0, -74.0, 32.0, -57.0, -94.0], [35.0, 67.0, 119.0, 23.0, 0.0], [-99.0, -83.0, -35.0, -16.0, 73.0]], [[35.0, -5.0, 
+-7.0, 11.0, 63.0], [4.0, 11.0, 25.0, 21.0, 28.0], [22.0, 2.0, -26.0, 10.0, 0.0], [27.0, 38.0, -7.0, 22.0, -7.0]]], [[[-59.0, 
+5.0, -16.0, 2.0, -71.0], [2.0, -13.0, -16.0, 24.0, -17.0], [-53.0, 7.0, 1.0, -38.0, 0.0], [0.0, -42.0, -18.0, -32.0, 2.0]], 
+[[26.0, -6.0, -8.0, 12.0, 50.0], [4.0, 6.0, 24.0, 24.0, 22.0], [14.0, 6.0, -22.0, 4.0, 0.0], [24.0, 28.0, -12.0, 16.0, -4.0]], 
+[[19.0, 13.0, -17.0, 0.0, 54.0], [5.0, 33.0, 1.0, 18.0, 46.0], [11.0, -25.0, -49.0, 7.0, 0.0], [42.0, 53.0, 16.0, 22.0, 
+-28.0]], [[7.0, -9.0, 36.0, -14.0, -37.0], [-10.0, -23.0, -12.0, -60.0, -47.0], [21.0, 9.0, 63.0, 22.0, 0.0], [-60.0, -38.0, 
+14.0, -8.0, 26.0]], [[35.0, -33.0, 0.0, 32.0, 49.0], [4.0, -31.0, 60.0, 42.0, -7.0], [15.0, 51.0, 9.0, -4.0, 0.0], [6.0, -4.0, 
+-56.0, 8.0, 28.0]]], [[[-42.0, 2.0, -26.0, 12.0, -32.0], [6.0, -6.0, 2.0, 48.0, 4.0], [-46.0, 10.0, -22.0, -38.0, 0.0], [24.0, 
+-18.0, -28.0, -20.0, -4.0]], [[-38.0, 14.0, -35.0, 7.0, -12.0], [8.0, 16.0, -7.0, 51.0, 29.0], [-43.0, -11.0, -49.0, -34.0, 
+0.0], [45.0, 10.0, -11.0, -10.0, -23.0]], [[-19.0, -15.0, -12.0, 20.0, -17.0], [4.0, -25.0, 24.0, 42.0, -13.0], [-27.0, 33.0, 
+3.0, -28.0, 0.0], [6.0, -28.0, -44.0, -16.0, 16.0]], [[45.0, -41.0, 46.0, 11.0, 4.0], [-9.0, -55.0, 40.0, -39.0, -63.0], [44.0, 
+56.0, 86.0, 27.0, 0.0], [-69.0, -47.0, -31.0, 0.0, 57.0]], [[-40.0, 14.0, -32.0, 5.0, -19.0], [7.0, 14.0, -10.0, 45.0, 24.0], 
+[-43.0, -11.0, -43.0, -33.0, 0.0], [39.0, 5.0, -9.0, -12.0, -21.0]]]])+(1.-msk_ref)*numpy.array([[[[-5.0, 22.0, -24.0, -29.0, 
+21.0], [-24.0, 8.0, -18.0, 29.0, 17.0], [-1.0, -14.0, -3.0, 22.0, 9.0], [4.0, 2.0, 10.0, -5.0, -10.0]], [[-27.0, 19.0, -71.0, 
+-51.0, 27.0], [-61.0, -61.0, -35.0, 3.0, 10.0], [-28.0, 11.0, 41.0, 46.0, 2.0], [-16.0, 15.0, 44.0, 3.0, -58.0]], [[26.0, -9.0, 
+52.0, 32.0, -12.0], [38.0, 66.0, 25.0, 22.0, 5.0], [21.0, -26.0, -46.0, -27.0, -4.0], [16.0, -11.0, -38.0, -16.0, 51.0]], 
+[[-38.0, 69.0, -10.0, -40.0, 12.0], [36.0, -16.0, -45.0, -42.0, -25.0], [55.0, 56.0, 46.0, -15.0, 90.0], [24.0, -21.0, 30.0, 
+100.0, -25.0]], [[-27.0, 59.0, -31.0, -51.0, 27.0], [-5.0, -5.0, -43.0, 3.0, 2.0], [28.0, 19.0, 25.0, 14.0, 58.0], [16.0, -9.0, 
+28.0, 51.0, -26.0]]], [[[17.0, -37.0, 27.0, 37.0, -21.0], [13.0, 5.0, 29.0, -9.0, -6.0], [-12.0, -7.0, -15.0, -16.0, -32.0], 
+[-8.0, 3.0, -20.0, -25.0, 20.0]], [[18.0, 10.0, 37.0, 12.0, 0.0], [29.0, 65.0, 10.0, 30.0, 10.0], [26.0, -25.0, -40.0, -17.0, 
+11.0], [20.0, -12.0, -28.0, -6.0, 41.0]], [[7.0, -39.0, -34.0, 1.0, 3.0], [-56.0, -36.0, 11.0, 17.0, 16.0], [-54.0, -22.0, 1.0, 
+33.0, -59.0], [-28.0, 23.0, 8.0, -59.0, -21.0]], [[1.0, -4.0, -8.0, -3.0, 3.0], [-12.0, -4.0, 0.0, 7.0, 5.0], [-9.0, -6.0, 
+-1.0, 8.0, -9.0], [-4.0, 4.0, 2.0, -11.0, -4.0]], [[-20.0, 35.0, -50.0, -50.0, 30.0], [-40.0, -20.0, -35.0, 20.0, 15.0], [-5.0, 
+0.0, 20.0, 35.0, 20.0], [0.0, 5.0, 30.0, 10.0, -35.0]]], [[[11.0, -26.0, -4.0, 11.0, -3.0], [-20.0, -4.0, 14.0, 13.0, 9.0], 
+[-25.0, -18.0, -11.0, 10.0, -35.0], [-12.0, 10.0, -6.0, -37.0, 2.0]], [[29.0, -36.0, 13.0, 23.0, -3.0], [-19.0, 33.0, 28.0, 
+43.0, 23.0], [-27.0, -47.0, -43.0, 9.0, -52.0], [-8.0, 10.0, -26.0, -67.0, 27.0]], [[-2.0, 28.0, 36.0, 6.0, -6.0], [52.0, 36.0, 
+-4.0, -14.0, -14.0], [46.0, 16.0, -6.0, -32.0, 46.0], [24.0, -20.0, -12.0, 46.0, 24.0]], [[13.0, 21.0, 35.0, 5.0, 3.0], [33.0, 
+65.0, 3.0, 27.0, 8.0], [34.0, -19.0, -35.0, -18.0, 24.0], [24.0, -15.0, -24.0, 7.0, 38.0]], [[-16.0, 42.0, 7.0, -18.0, 6.0], 
+[31.0, 11.0, -22.0, -16.0, -12.0], [40.0, 25.0, 14.0, -15.0, 55.0], [20.0, -16.0, 8.0, 56.0, -1.0]]], [[[26.0, -28.0, 0.0, 
+10.0, 6.0], [-32.0, 32.0, 20.0, 54.0, 30.0], [-30.0, -52.0, -42.0, 20.0, -50.0], [-8.0, 12.0, -20.0, -70.0, 20.0]], [[-12.0, 
+-15.0, -33.0, -8.0, 0.0], [-31.0, -55.0, -5.0, -20.0, -5.0], [-29.0, 15.0, 30.0, 18.0, -19.0], [-20.0, 13.0, 22.0, -6.0, 
+-34.0]], [[-4.0, -4.0, 12.0, 12.0, -12.0], [20.0, -12.0, 4.0, -28.0, -16.0], [8.0, 20.0, 12.0, -16.0, 8.0], [0.0, -4.0, 0.0, 
+20.0, 0.0]], [[-7.0, 15.0, -23.0, -23.0, 15.0], [-21.0, -5.0, -15.0, 15.0, 10.0], [-4.0, -5.0, 5.0, 18.0, 6.0], [0.0, 3.0, 
+12.0, -1.0, -14.0]], [[20.0, -65.0, 20.0, 50.0, -30.0], [-2.0, -22.0, 41.0, -20.0, -9.0], [-37.0, -6.0, -8.0, -11.0, -62.0], 
+[-24.0, 13.0, -18.0, -46.0, 11.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_float_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-3.0, 6.0, 0.0, 0.0], [6.0, 2.0, 6.0, -7.0], [5.0, -7.0, -2.0, -2.0]], [[-1.0, 5.0, 4.0, 
--2.0], [7.0, 0.0, 4.0, -5.0], [-3.0, 1.0, 5.0, 4.0]]], [[[4.0, 7.0, -5.0, -6.0], [5.0, 4.0, 6.0, -1.0], [-4.0, 1.0, 7.0, 6.0]], 
-[[0.0, 0.0, -1.0, 0.0], [0.0, -4.0, 6.0, 4.0], [0.0, 6.0, 3.0, -4.0]]], [[[7.0, 6.0, 0.0, 6.0], [-7.0, 2.0, 6.0, 0.0], [-4.0, 
-2.0, 4.0, -1.0]], [[-2.0, -5.0, 5.0, 6.0], [-1.0, 6.0, -7.0, 7.0], [6.0, 6.0, 1.0, 
--4.0]]]])+(1.-msk_arg0)*numpy.array([[[[-1.0, 4.0, -2.0, -5.0], [7.0, 2.0, 0.0, 0.0], [7.0, 1.0, -2.0, -2.0]], [[7.0, 7.0, 5.0, 
-4.0], [-5.0, -6.0, 5.0, 6.0], [1.0, 4.0, 1.0, 2.0]]], [[[-2.0, -1.0, -3.0, -7.0], [0.0, -6.0, -1.0, 7.0], [3.0, 4.0, -3.0, 
-0.0]], [[-7.0, 5.0, -6.0, -4.0], [1.0, 4.0, 7.0, 0.0], [-7.0, -2.0, -3.0, 2.0]]], [[[3.0, -7.0, -6.0, -6.0], [-2.0, 6.0, 0.0, 
--7.0], [-6.0, -4.0, 6.0, -5.0]], [[-7.0, 0.0, 0.0, 6.0], [0.0, -6.0, 5.0, 0.0], [-1.0, -2.0, -2.0, 5.0]]]])
-      arg1=-6.0
-      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank4_offset2(self):
+      arg0=Data(numpy.array([[[[4.0, 3.0, -1.0], [-5.0, 4.0, -3.0]], [[0.0, -7.0, -5.0], [-7.0, -4.0, -7.0]], [[2.0, -1.0, 
+-3.0], [-4.0, 2.0, -5.0]], [[4.0, 0.0, -7.0], [7.0, 2.0, -3.0]], [[0.0, 3.0, 3.0], [2.0, -2.0, 5.0]]], [[[3.0, -6.0, -6.0], 
+[5.0, 0.0, -7.0]], [[-7.0, -1.0, 2.0], [-1.0, 0.0, 2.0]], [[-6.0, 4.0, -2.0], [3.0, -3.0, 0.0]], [[-4.0, -7.0, 2.0], [6.0, 
+-5.0, 7.0]], [[1.0, -7.0, -3.0], [-5.0, 3.0, -1.0]]], [[[-3.0, 5.0, -2.0], [-6.0, 3.0, -2.0]], [[2.0, 0.0, -3.0], [3.0, -3.0, 
+-4.0]], [[-4.0, -2.0, -4.0], [7.0, 7.0, 5.0]], [[-6.0, -6.0, 4.0], [0.0, 0.0, 6.0]], [[-2.0, -5.0, 5.0], [5.0, -1.0, 1.0]]], 
+[[[2.0, -7.0, 3.0], [-7.0, 5.0, 3.0]], [[4.0, -6.0, 5.0], [1.0, -3.0, 6.0]], [[0.0, -5.0, 0.0], [0.0, 4.0, 7.0]], [[6.0, -7.0, 
+-5.0], [5.0, -7.0, 5.0]], [[1.0, -6.0, 6.0], [-3.0, 4.0, -5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 6.0, 3.0], [-7.0, 7.0, 0.0]], [[5.0, 0.0, -5.0], [0.0, 6.0, 7.0]], [[6.0, 
+-1.0, 4.0], [-4.0, 6.0, -3.0]], [[-5.0, 6.0, 0.0], [0.0, -3.0, -4.0]], [[4.0, -1.0, 3.0], [4.0, 3.0, -4.0]]], [[[3.0, 3.0, 
+5.0], [-7.0, -2.0, -5.0]], [[7.0, -7.0, -2.0], [5.0, 5.0, 2.0]], [[0.0, 6.0, 2.0], [4.0, 4.0, -6.0]], [[4.0, 4.0, 5.0], [-2.0, 
+6.0, 1.0]], [[5.0, -5.0, -3.0], [6.0, 0.0, -7.0]]], [[[-5.0, -1.0, -2.0], [4.0, -2.0, 1.0]], [[0.0, 4.0, 5.0], [4.0, -1.0, 
+5.0]], [[-5.0, 1.0, -4.0], [0.0, 4.0, 5.0]], [[2.0, -4.0, 6.0], [-1.0, -6.0, -2.0]], [[-7.0, -2.0, 7.0], [6.0, 4.0, -5.0]]], 
+[[[6.0, -6.0, -4.0], [-3.0, 3.0, 2.0]], [[4.0, 0.0, 6.0], [-3.0, 2.0, -1.0]], [[0.0, -7.0, 7.0], [-4.0, 3.0, 5.0]], [[-1.0, 
+2.0, 3.0], [5.0, -3.0, -2.0]], [[3.0, -7.0, 6.0], [6.0, 7.0, -1.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[[[7.0, -1.0, 5.0], [0.0, -6.0, -2.0]], [[0.0, 5.0, -7.0], [-2.0, 1.0, 5.0]], [[-5.0, -4.0, 6.0], 
+[6.0, 0.0, 1.0]], [[-7.0, 2.0, -2.0], [-4.0, -2.0, -4.0]], [[6.0, 7.0, -1.0], [3.0, -7.0, -4.0]]], [[[-4.0, 1.0, -7.0], [-1.0, 
+0.0, -1.0]], [[-5.0, 1.0, -3.0], [-1.0, -4.0, 0.0]], [[3.0, 1.0, -4.0], [5.0, -3.0, -7.0]], [[3.0, -4.0, -4.0], [-5.0, 0.0, 
+5.0]], [[5.0, 2.0, -6.0], [-2.0, -7.0, 1.0]]], [[[-5.0, 5.0, -2.0], [-5.0, 7.0, 4.0]], [[7.0, -6.0, 1.0], [1.0, 0.0, 3.0]], 
+[[0.0, 7.0, -3.0], [1.0, 5.0, 7.0]], [[4.0, 2.0, -7.0], [-2.0, 7.0, 0.0]], [[3.0, 0.0, 6.0], [6.0, -6.0, -2.0]]], [[[-3.0, 
+-3.0, 0.0], [3.0, 6.0, 5.0]], [[2.0, 2.0, -1.0], [0.0, 4.0, -6.0]], [[3.0, -1.0, 6.0], [4.0, -4.0, -2.0]], [[3.0, 4.0, -4.0], 
+[0.0, 3.0, 4.0]], [[-3.0, 6.0, -3.0], [3.0, -6.0, -5.0]]]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[[[0.0, 1.0, -6.0], [-2.0, -5.0, -1.0]], [[-2.0, -6.0, -1.0], [-1.0, -2.0, -6.0]], 
+[[-5.0, -3.0, 1.0], [-3.0, -5.0, -6.0]], [[0.0, -3.0, 3.0], [6.0, 1.0, -1.0]], [[-6.0, -2.0, 7.0], [3.0, -1.0, -6.0]]], [[[0.0, 
+2.0, -1.0], [-5.0, -3.0, 0.0]], [[-6.0, 6.0, -4.0], [3.0, 5.0, 5.0]], [[0.0, 4.0, -5.0], [0.0, 0.0, -4.0]], [[-1.0, -3.0, 
+-6.0], [-7.0, 2.0, 0.0]], [[1.0, 1.0, 2.0], [4.0, -6.0, 0.0]]], [[[3.0, -2.0, 6.0], [-1.0, 0.0, 1.0]], [[-3.0, 2.0, -3.0], 
+[-7.0, 0.0, 3.0]], [[-7.0, -3.0, -3.0], [-3.0, -3.0, 0.0]], [[6.0, -7.0, 3.0], [-6.0, -1.0, -4.0]], [[4.0, 0.0, 0.0], [3.0, 
+4.0, 7.0]]], [[[0.0, 0.0, -6.0], [6.0, -2.0, -6.0]], [[-4.0, 5.0, 6.0], [7.0, -5.0, -4.0]], [[7.0, -6.0, 4.0], [7.0, -6.0, 
+-3.0]], [[-6.0, 3.0, 0.0], [1.0, 4.0, 6.0]], [[3.0, 6.0, -7.0], [-3.0, -4.0, 3.0]]]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=2)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[18.0, -36.0, -0.0, -0.0], [-36.0, -12.0, -36.0, 42.0], [-30.0, 42.0, 12.0, 12.0]], [[6.0, 
--30.0, -24.0, 12.0], [-42.0, -0.0, -24.0, 30.0], [18.0, -6.0, -30.0, -24.0]]], [[[-24.0, -42.0, 30.0, 36.0], [-30.0, -24.0, 
--36.0, 6.0], [24.0, -6.0, -42.0, -36.0]], [[-0.0, -0.0, 6.0, -0.0], [-0.0, 24.0, -36.0, -24.0], [-0.0, -36.0, -18.0, 24.0]]], 
-[[[-42.0, -36.0, -0.0, -36.0], [42.0, -12.0, -36.0, -0.0], [24.0, -12.0, -24.0, 6.0]], [[12.0, 30.0, -30.0, -36.0], [6.0, 
--36.0, 42.0, -42.0], [-36.0, -36.0, -6.0, 24.0]]]])+(1.-msk_ref)*numpy.array([[[[6.0, -24.0, 12.0, 30.0], [-42.0, -12.0, -0.0, 
--0.0], [-42.0, -6.0, 12.0, 12.0]], [[-42.0, -42.0, -30.0, -24.0], [30.0, 36.0, -30.0, -36.0], [-6.0, -24.0, -6.0, -12.0]]], 
-[[[12.0, 6.0, 18.0, 42.0], [-0.0, 36.0, 6.0, -42.0], [-18.0, -24.0, 18.0, -0.0]], [[42.0, -30.0, 36.0, 24.0], [-6.0, -24.0, 
--42.0, -0.0], [42.0, 12.0, 18.0, -12.0]]], [[[-18.0, 42.0, 36.0, 36.0], [12.0, -36.0, -0.0, 42.0], [36.0, 24.0, -36.0, 30.0]], 
-[[42.0, -0.0, -0.0, -36.0], [-0.0, 36.0, -30.0, -0.0], [6.0, 12.0, 12.0, -30.0]]]])
+      ref=msk_ref*numpy.array([[[[2.0, 21.0, -71.0, 4.0, 15.0], [2.0, -25.0, 3.0, 14.0, 11.0], [38.0, -5.0, 18.0, 67.0, -42.0], 
+[-27.0, 49.0, -27.0, 28.0, -15.0]], [[20.0, -25.0, -51.0, 60.0, -9.0], [42.0, 31.0, 39.0, 48.0, 51.0], [-46.0, 9.0, -110.0, 
+7.0, -34.0], [-59.0, 17.0, -21.0, -48.0, 11.0]], [[-2.0, 1.0, -53.0, 22.0, 2.0], [21.0, -6.0, 26.0, 17.0, 15.0], [5.0, -2.0, 
+-27.0, 49.0, -38.0], [-28.0, 43.0, -25.0, 0.0, -2.0]], [[-13.0, 22.0, -23.0, -34.0, 50.0], [29.0, -14.0, 90.0, -10.0, 31.0], 
+[-39.0, 19.0, 17.0, 65.0, 6.0], [6.0, 41.0, -4.0, 34.0, 33.0]], [[14.0, 13.0, 23.0, -24.0, 18.0], [-25.0, 0.0, -28.0, -9.0, 
+3.0], [5.0, 2.0, 39.0, -33.0, 32.0], [10.0, -35.0, 21.0, 14.0, 2.0]]], [[[11.0, -33.0, -4.0, -13.0, 25.0], [26.0, -8.0, 101.0, 
+-3.0, 22.0], [-86.0, 35.0, -68.0, 32.0, 17.0], [-11.0, 42.0, 13.0, -19.0, 23.0]], [[-42.0, -7.0, 47.0, 39.0, -62.0], [12.0, 
+29.0, -49.0, -10.0, -45.0], [39.0, -36.0, 0.0, -42.0, -19.0], [31.0, -30.0, -16.0, -25.0, -4.0]], [[-38.0, 25.0, 20.0, 48.0, 
+24.0], [39.0, 49.0, 18.0, -41.0, 5.0], [18.0, -65.0, 22.0, -29.0, 6.0], [-3.0, -14.0, -10.0, -3.0, 75.0]], [[5.0, -31.0, 103.0, 
+-32.0, -50.0], [-18.0, 21.0, -31.0, 13.0, -16.0], [-56.0, 43.0, -25.0, -91.0, 52.0], [56.0, -86.0, 37.0, -35.0, -23.0]], 
+[[-17.0, -6.0, -26.0, 3.0, -72.0], [16.0, -10.0, -19.0, 63.0, -3.0], [8.0, 38.0, -37.0, 42.0, -61.0], [16.0, 9.0, -38.0, -8.0, 
+-64.0]]], [[[-50.0, 44.0, -55.0, 61.0, -12.0], [39.0, 20.0, -21.0, -1.0, -4.0], [87.0, -65.0, 36.0, 45.0, -71.0], [-16.0, 30.0, 
+-58.0, 20.0, 19.0]], [[25.0, -8.0, -14.0, 2.0, 61.0], [14.0, 8.0, 70.0, -17.0, 39.0], [-56.0, 2.0, -31.0, 2.0, 32.0], [-35.0, 
+19.0, 20.0, -7.0, 50.0]], [[-98.0, 36.0, 51.0, -30.0, -82.0], [30.0, -5.0, -19.0, 2.0, -58.0], [52.0, 2.0, 75.0, 43.0, -46.0], 
+[106.0, -10.0, -44.0, 37.0, -34.0]], [[-28.0, -28.0, 84.0, -2.0, -106.0], [-16.0, 12.0, -82.0, 20.0, -60.0], [16.0, 16.0, 
+-12.0, -64.0, -6.0], [66.0, -64.0, 0.0, -34.0, -60.0]], [[20.0, -66.0, 91.0, -28.0, -34.0], [-38.0, -11.0, -10.0, -26.0, 
+-52.0], [-53.0, 29.0, -43.0, -70.0, 58.0], [35.0, -29.0, 51.0, -45.0, -23.0]]], [[[0.0, -22.0, -3.0, -28.0, -108.0], [-32.0, 
+-39.0, -84.0, 72.0, -40.0], [31.0, 61.0, -19.0, 22.0, -54.0], [39.0, -11.0, -23.0, -7.0, -123.0]], [[65.0, -40.0, 46.0, -72.0, 
+-23.0], [-64.0, -30.0, -42.0, 41.0, 3.0], [-62.0, 88.0, -29.0, -54.0, 54.0], [21.0, -57.0, 52.0, -17.0, -72.0]], [[-33.0, 14.0, 
+27.0, -46.0, -91.0], [-12.0, -21.0, -66.0, 55.0, -31.0], [31.0, 51.0, 34.0, 18.0, -38.0], [74.0, -36.0, -25.0, 20.0, -89.0]], 
+[[56.0, 8.0, 3.0, -72.0, 36.0], [-6.0, 1.0, 42.0, 66.0, 90.0], [-109.0, 99.0, -29.0, -14.0, 50.0], [1.0, -55.0, 33.0, 9.0, 
+-13.0]], [[29.0, -87.0, 32.0, -7.0, -59.0], [-44.0, -42.0, -19.0, -7.0, -70.0], [-24.0, 31.0, -78.0, -16.0, 7.0], [5.0, 30.0, 
+27.0, -53.0, -65.0]]]])+(1.-msk_ref)*numpy.array([[[[-33.0, -60.0, -64.0, -44.0, -61.0], [23.0, -4.0, 9.0, 20.0, -51.0], [34.0, 
+31.0, -76.0, 44.0, 35.0], [-74.0, -64.0, -66.0, -3.0, 29.0]], [[-7.0, -59.0, -102.0, -16.0, -113.0], [-13.0, 55.0, -3.0, 37.0, 
+-41.0], [-8.0, 21.0, -38.0, -19.0, 93.0], [-24.0, -108.0, -42.0, 36.0, 47.0]], [[-44.0, 0.0, -23.0, 0.0, -6.0], [-4.0, -55.0, 
+-12.0, 13.0, -39.0], [45.0, -13.0, -57.0, 85.0, 15.0], [-42.0, -51.0, 9.0, -37.0, -37.0]], [[25.0, 4.0, 46.0, -17.0, 45.0], 
+[21.0, 31.0, 40.0, -19.0, 19.0], [-31.0, 15.0, 26.0, -53.0, -60.0], [30.0, 81.0, -41.0, 12.0, 21.0]], [[-38.0, 9.0, -17.0, 
+43.0, 32.0], [-34.0, -35.0, -3.0, -41.0, 7.0], [24.0, -63.0, -55.0, 29.0, 12.0], [24.0, 26.0, 68.0, -35.0, -51.0]]], [[[2.0, 
+12.0, 42.0, -33.0, 22.0], [42.0, -76.0, 7.0, 3.0, 0.0], [35.0, 16.0, -18.0, 76.0, -52.0], [-38.0, 14.0, 1.0, -54.0, 6.0]], 
+[[-32.0, 3.0, -68.0, 48.0, -44.0], [-52.0, -26.0, -26.0, 1.0, -14.0], [20.0, -58.0, -52.0, 42.0, 77.0], [20.0, -73.0, 82.0, 
+-26.0, -36.0]], [[-28.0, -14.0, -12.0, 22.0, 46.0], [-22.0, 30.0, 38.0, -50.0, 2.0], [-10.0, -40.0, -48.0, -40.0, -14.0], 
+[40.0, 74.0, -6.0, 2.0, -24.0]], [[-53.0, -53.0, -57.0, -4.0, -15.0], [-5.0, 9.0, -13.0, -20.0, -26.0], [37.0, -2.0, -67.0, 
+13.0, 41.0], [-60.0, -14.0, -29.0, 16.0, -14.0]], [[8.0, 59.0, 11.0, 49.0, 19.0], [-37.0, -65.0, 23.0, -14.0, 18.0], [-6.0, 
+-79.0, -29.0, 48.0, -11.0], [96.0, 7.0, 116.0, -81.0, -33.0]]], [[[12.0, 12.0, 18.0, 18.0, 26.0], [-14.0, 39.0, 2.0, -12.0, 
+18.0], [-28.0, -6.0, 38.0, -55.0, -9.0], [34.0, 37.0, 0.0, 29.0, -8.0]], [[-34.0, -61.0, -44.0, 21.0, 10.0], [-14.0, 36.0, 
+-29.0, -72.0, 36.0], [23.0, -20.0, -36.0, -56.0, 43.0], [-34.0, 63.0, 15.0, 42.0, -4.0]], [[0.0, -30.0, -32.0, -16.0, -34.0], 
+[-6.0, 97.0, 4.0, 34.0, -36.0], [-36.0, 44.0, 32.0, -73.0, 31.0], [-14.0, -39.0, -96.0, 79.0, 18.0]], [[-6.0, 39.0, 53.0, 20.0, 
+53.0], [9.0, -103.0, -38.0, -31.0, 42.0], [49.0, -31.0, 1.0, 78.0, -33.0], [-18.0, 39.0, 97.0, -61.0, -39.0]], [[-71.0, 35.0, 
+40.0, 72.0, 139.0], [-53.0, 15.0, -23.0, -63.0, 5.0], [14.0, -61.0, 4.0, -27.0, -29.0], [16.0, 102.0, 24.0, 28.0, -131.0]]], 
+[[[7.0, 13.0, -34.0, -11.0, -76.0], [-2.0, -40.0, -12.0, 63.0, -38.0], [11.0, 9.0, -12.0, 73.0, 41.0], [-12.0, -122.0, 17.0, 
+-33.0, 13.0]], [[-39.0, -9.0, -9.0, 3.0, 13.0], [3.0, -52.0, -26.0, -15.0, -8.0], [50.0, -12.0, -43.0, 62.0, 8.0], [-52.0, 
+-7.0, 22.0, -25.0, -32.0]], [[-61.0, 3.0, -5.0, 16.0, 18.0], [-10.0, -42.0, -83.0, 13.0, -27.0], [65.0, 8.0, 3.0, 71.0, 35.0], 
+[-102.0, -56.0, 9.0, 17.0, -76.0]], [[-9.0, 0.0, 14.0, 32.0, 53.0], [-15.0, -4.0, 1.0, -64.0, 45.0], [4.0, -43.0, -14.0, -30.0, 
+-15.0], [30.0, 90.0, 52.0, -7.0, -21.0]], [[-89.0, 16.0, -35.0, 83.0, 55.0], [-71.0, -36.0, -54.0, -46.0, -10.0], [52.0, -86.0, 
+-57.0, 46.0, 51.0], [-8.0, 0.0, 90.0, -11.0, -124.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_array_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[-7.0, 7.0, 3.0, 0.0], [-1.0, 2.0, 4.0, 2.0], [2.0, -6.0, -5.0, 0.0]], [[-1.0, -1.0, 7.0, 
--1.0], [2.0, -4.0, 7.0, 2.0], [2.0, 7.0, -2.0, -5.0]]], [[[-6.0, 0.0, 1.0, 3.0], [4.0, 7.0, 2.0, 6.0], [-2.0, 4.0, 5.0, 7.0]], 
-[[1.0, 1.0, 7.0, 0.0], [3.0, 1.0, 0.0, -3.0], [2.0, -5.0, 3.0, 2.0]]], [[[3.0, -4.0, -2.0, -5.0], [-5.0, 3.0, -6.0, 1.0], [4.0, 
-0.0, 5.0, -4.0]], [[0.0, -7.0, 7.0, -1.0], [-2.0, -4.0, -2.0, 2.0], [-1.0, -3.0, -5.0, 
-0.0]]]])+(1.-msk_arg0)*numpy.array([[[[-3.0, 7.0, -6.0, -5.0], [4.0, 5.0, -1.0, 0.0], [-4.0, 4.0, 7.0, -5.0]], [[6.0, -3.0, 
-0.0, 3.0], [4.0, 4.0, -1.0, 1.0], [5.0, -2.0, 0.0, 3.0]]], [[[4.0, 6.0, -6.0, -1.0], [-7.0, 7.0, -7.0, 4.0], [6.0, -5.0, 1.0, 
-1.0]], [[7.0, -2.0, -7.0, -5.0], [-2.0, -2.0, -5.0, 6.0], [3.0, -6.0, -6.0, -6.0]]], [[[6.0, 5.0, 1.0, -5.0], [0.0, -2.0, -5.0, 
--4.0], [1.0, -3.0, -6.0, 0.0]], [[-1.0, -3.0, 5.0, -6.0], [1.0, -5.0, -2.0, -5.0], [3.0, 4.0, 6.0, -7.0]]]])
-      arg1=numpy.array(0.0)
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[1.0, 2.0], [7.0, 7.0]], [[1.0, -3.0], [4.0, -3.0]], [[-7.0, 3.0], [5.0, 2.0]], [[-4.0, -3.0], 
+[-3.0, 2.0]], [[-1.0, -5.0], [-3.0, -1.0]], [[6.0, 5.0], [1.0, 2.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[3.0, -3.0], [-4.0, 2.0]], [[1.0, -2.0], [5.0, -2.0]], [[7.0, 4.0], [0.0, -2.0]], 
+[[7.0, 5.0], [-5.0, 0.0]], [[1.0, 5.0], [-7.0, 7.0]], [[-7.0, -2.0], [-1.0, 0.0]]]))
+      arg0.expand()
+      arg1=Data(1.0,self.functionspace)
+      arg1.setTaggedValue(1,-7.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], [0.0, -0.0, -0.0, 0.0]], [[-0.0, -0.0, 0.0, 
--0.0], [0.0, -0.0, 0.0, 0.0], [0.0, 0.0, -0.0, -0.0]]], [[[-0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0]], 
-[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, 0.0, 0.0]]], [[[0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 
-0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, -0.0], [-0.0, -0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 
-0.0]]]])+(1.-msk_ref)*numpy.array([[[[-0.0, 0.0, -0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, 0.0, 
-0.0], [0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]]], [[[0.0, 0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, -0.0, 0.0, 0.0]], 
-[[0.0, -0.0, -0.0, -0.0], [-0.0, -0.0, -0.0, 0.0], [0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, -0.0], 
-[0.0, -0.0, -0.0, 0.0]], [[-0.0, -0.0, 0.0, -0.0], [0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0]]]])
+      ref=msk_ref*numpy.array([[[1.0, 2.0], [7.0, 7.0]], [[1.0, -3.0], [4.0, -3.0]], [[-7.0, 3.0], [5.0, 2.0]], [[-4.0, -3.0], 
+[-3.0, 2.0]], [[-1.0, -5.0], [-3.0, -1.0]], [[6.0, 5.0], [1.0, 2.0]]])+(1.-msk_ref)*numpy.array([[[-21.0, 21.0], [28.0, 
+-14.0]], [[-7.0, 14.0], [-35.0, 14.0]], [[-49.0, -28.0], [-0.0, 14.0]], [[-49.0, -35.0], [35.0, -0.0]], [[-7.0, -35.0], [49.0, 
+-49.0]], [[49.0, 14.0], [7.0, -0.0]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_constData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[7.0, 0.0, 3.0, -2.0], [0.0, 0.0, 1.0, 3.0], [-3.0, -1.0, 7.0, 4.0]], [[-6.0, 5.0, -7.0, 
-5.0], [6.0, 1.0, -1.0, 3.0], [4.0, 3.0, 0.0, 4.0]]], [[[-3.0, -2.0, 5.0, -4.0], [3.0, 3.0, -1.0, 0.0], [4.0, -3.0, -1.0, 6.0]], 
-[[-1.0, -6.0, 4.0, 6.0], [7.0, 7.0, 4.0, 0.0], [-2.0, -1.0, -2.0, 6.0]]], [[[-3.0, -4.0, -1.0, 6.0], [0.0, 2.0, -3.0, 5.0], 
-[1.0, -3.0, -6.0, -3.0]], [[5.0, -2.0, -7.0, 0.0], [0.0, 4.0, 7.0, 2.0], [-1.0, 4.0, 1.0, 
--7.0]]]])+(1.-msk_arg0)*numpy.array([[[[1.0, 6.0, 5.0, -1.0], [-5.0, -2.0, 2.0, 6.0], [7.0, 7.0, -2.0, 2.0]], [[-7.0, 0.0, 4.0, 
-4.0], [-7.0, -2.0, -5.0, 5.0], [-1.0, -3.0, -7.0, -3.0]]], [[[4.0, -5.0, -6.0, 2.0], [2.0, 0.0, -5.0, -3.0], [-6.0, -2.0, 2.0, 
--6.0]], [[-5.0, -5.0, -5.0, 0.0], [0.0, -3.0, 5.0, 7.0], [-6.0, -1.0, 6.0, 5.0]]], [[[-4.0, -5.0, 6.0, 4.0], [0.0, 6.0, -6.0, 
--7.0], [3.0, -3.0, 0.0, 6.0]], [[3.0, 0.0, 7.0, 7.0], [-3.0, 0.0, -5.0, 0.0], [-3.0, 0.0, 4.0, 7.0]]]])
-      arg1=Data(5.0,self.functionspace)
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank1_offset1(self):
+      arg0=Data(numpy.array([[[[-6.0, 6.0, -1.0], [0.0, 3.0, -3.0]], [[2.0, 7.0, -2.0], [3.0, -7.0, -7.0]]], [[[1.0, 0.0, 
+-3.0], [0.0, 1.0, 1.0]], [[0.0, 4.0, 0.0], [-2.0, 4.0, 3.0]]], [[[-6.0, -2.0, 5.0], [7.0, 6.0, 4.0]], [[5.0, 2.0, -5.0], [0.0, 
+0.0, -3.0]]], [[[6.0, 0.0, -7.0], [-1.0, 5.0, 7.0]], [[7.0, 6.0, 4.0], [3.0, 4.0, 2.0]]], [[[2.0, 5.0, -6.0], [-7.0, -3.0, 
+-3.0]], [[-6.0, -2.0, 4.0], [-4.0, 2.0, 6.0]]], [[[2.0, 3.0, 3.0], [2.0, 7.0, 5.0]], [[0.0, -6.0, -6.0], [5.0, -7.0, 
+5.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[2.0, -7.0, -6.0], [-3.0, 2.0, -4.0]], [[0.0, -2.0, 3.0], [1.0, -1.0, 6.0]]], 
+[[[-3.0, 2.0, 2.0], [-1.0, -7.0, -1.0]], [[-4.0, 5.0, 6.0], [-3.0, 7.0, -1.0]]], [[[-2.0, 7.0, 7.0], [0.0, -5.0, 2.0]], [[1.0, 
+-7.0, 3.0], [0.0, -3.0, -6.0]]], [[[-1.0, -6.0, -6.0], [5.0, 0.0, -2.0]], [[2.0, 1.0, 2.0], [0.0, 5.0, 4.0]]], [[[-6.0, -1.0, 
+0.0], [-6.0, 7.0, 5.0]], [[6.0, 7.0, 7.0], [0.0, -4.0, 0.0]]], [[[-2.0, -3.0, -1.0], [-3.0, -1.0, -4.0]], [[2.0, -6.0, -7.0], 
+[0.0, 4.0, -5.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([0.0, 5.0, 1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([6.0, 0.0, 4.0]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[29.0, 12.0], [33.0, -42.0]], [[-3.0, 6.0], [20.0, 23.0]], [[-5.0, 34.0], [5.0, -3.0]], [[-7.0, 
+32.0], [34.0, 22.0]], [[19.0, -18.0], [-6.0, 16.0]], [[18.0, 40.0], [-36.0, -30.0]]])+(1.-msk_ref)*numpy.array([[[-12.0, 
+-34.0], [12.0, 30.0]], [[-10.0, -10.0], [0.0, -22.0]], [[16.0, 8.0], [18.0, -24.0]], [[-30.0, 22.0], [20.0, 16.0]], [[-36.0, 
+-16.0], [64.0, 0.0]], [[-16.0, -34.0], [-16.0, -20.0]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank3_taggedData_rank1_offset0(self):
+      arg0=Data(numpy.array([[[-1.0, -6.0], [-1.0, 7.0]], [[3.0, 7.0], [-1.0, -4.0]], [[3.0, -3.0], [5.0, -3.0]], [[3.0, 1.0], 
+[-5.0, 2.0]], [[5.0, -7.0], [-3.0, 1.0]], [[0.0, -5.0], [-2.0, 7.0]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[-6.0, 2.0], [2.0, 7.0]], [[0.0, 1.0], [0.0, 0.0]], [[7.0, 1.0], [4.0, -6.0]], [[5.0, 
+4.0], [0.0, -5.0]], [[0.0, -5.0], [3.0, 1.0]], [[7.0, -5.0], [2.0, -2.0]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([-1.0, -1.0]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([-7.0, 2.0]))
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[35.0, 0.0, 15.0, -10.0], [0.0, 0.0, 5.0, 15.0], [-15.0, -5.0, 35.0, 20.0]], [[-30.0, 25.0, 
--35.0, 25.0], [30.0, 5.0, -5.0, 15.0], [20.0, 15.0, 0.0, 20.0]]], [[[-15.0, -10.0, 25.0, -20.0], [15.0, 15.0, -5.0, 0.0], 
-[20.0, -15.0, -5.0, 30.0]], [[-5.0, -30.0, 20.0, 30.0], [35.0, 35.0, 20.0, 0.0], [-10.0, -5.0, -10.0, 30.0]]], [[[-15.0, -20.0, 
--5.0, 30.0], [0.0, 10.0, -15.0, 25.0], [5.0, -15.0, -30.0, -15.0]], [[25.0, -10.0, -35.0, 0.0], [0.0, 20.0, 35.0, 10.0], [-5.0, 
-20.0, 5.0, -35.0]]]])+(1.-msk_ref)*numpy.array([[[[5.0, 30.0, 25.0, -5.0], [-25.0, -10.0, 10.0, 30.0], [35.0, 35.0, -10.0, 
-10.0]], [[-35.0, 0.0, 20.0, 20.0], [-35.0, -10.0, -25.0, 25.0], [-5.0, -15.0, -35.0, -15.0]]], [[[20.0, -25.0, -30.0, 10.0], 
-[10.0, 0.0, -25.0, -15.0], [-30.0, -10.0, 10.0, -30.0]], [[-25.0, -25.0, -25.0, 0.0], [0.0, -15.0, 25.0, 35.0], [-30.0, -5.0, 
-30.0, 25.0]]], [[[-20.0, -25.0, 30.0, 20.0], [0.0, 30.0, -30.0, -35.0], [15.0, -15.0, 0.0, 30.0]], [[15.0, 0.0, 35.0, 35.0], 
-[-15.0, 0.0, -25.0, 0.0], [-15.0, 0.0, 20.0, 35.0]]]])
+      ref=msk_ref*numpy.array([[[[1.0, 1.0], [6.0, 6.0]], [[1.0, 1.0], [-7.0, -7.0]]], [[[-3.0, -3.0], [-7.0, -7.0]], [[1.0, 
+1.0], [4.0, 4.0]]], [[[-3.0, -3.0], [3.0, 3.0]], [[-5.0, -5.0], [3.0, 3.0]]], [[[-3.0, -3.0], [-1.0, -1.0]], [[5.0, 5.0], 
+[-2.0, -2.0]]], [[[-5.0, -5.0], [7.0, 7.0]], [[3.0, 3.0], [-1.0, -1.0]]], [[[0.0, 0.0], [5.0, 5.0]], [[2.0, 2.0], [-7.0, 
+-7.0]]]])+(1.-msk_ref)*numpy.array([[[[42.0, -12.0], [-14.0, 4.0]], [[-14.0, 4.0], [-49.0, 14.0]]], [[[0.0, 0.0], [-7.0, 2.0]], 
+[[0.0, 0.0], [0.0, 0.0]]], [[[-49.0, 14.0], [-7.0, 2.0]], [[-28.0, 8.0], [42.0, -12.0]]], [[[-35.0, 10.0], [-28.0, 8.0]], 
+[[0.0, 0.0], [35.0, -10.0]]], [[[0.0, 0.0], [35.0, -10.0]], [[-21.0, 6.0], [-7.0, 2.0]]], [[[-49.0, 14.0], [35.0, -10.0]], 
+[[-14.0, 4.0], [14.0, -4.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_generalTensorTransposedProduct_expandedData_rank4_expandedData_rank0_offset0(self):
-      msk_arg0=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg0=msk_arg0*numpy.array([[[[6.0, -3.0, -3.0, -3.0], [1.0, -2.0, 6.0, -6.0], [4.0, -1.0, -7.0, 7.0]], [[0.0, 6.0, 6.0, 
-5.0], [2.0, 7.0, 6.0, 6.0], [-3.0, -5.0, 1.0, -3.0]]], [[[-2.0, -1.0, 0.0, 0.0], [0.0, 7.0, 1.0, 4.0], [-6.0, -4.0, -3.0, 
--1.0]], [[0.0, 6.0, 4.0, 1.0], [-6.0, -5.0, -6.0, 1.0], [-6.0, -5.0, 5.0, 0.0]]], [[[4.0, -1.0, -2.0, -7.0], [-6.0, 5.0, -1.0, 
--4.0], [2.0, -3.0, -4.0, 2.0]], [[0.0, 1.0, 5.0, 4.0], [1.0, -1.0, -5.0, 1.0], [6.0, -3.0, -4.0, 
-3.0]]]])+(1.-msk_arg0)*numpy.array([[[[-6.0, -3.0, -5.0, -5.0], [-1.0, 7.0, -3.0, 3.0], [0.0, 2.0, 0.0, 3.0]], [[3.0, 6.0, 5.0, 
--4.0], [-4.0, 6.0, -4.0, 0.0], [0.0, 0.0, 0.0, -3.0]]], [[[-7.0, -4.0, -6.0, 7.0], [-6.0, 3.0, -5.0, -2.0], [-5.0, 4.0, 4.0, 
-7.0]], [[-2.0, 4.0, 3.0, 4.0], [-5.0, 0.0, 0.0, 7.0], [4.0, -3.0, -3.0, 2.0]]], [[[2.0, 3.0, 7.0, -5.0], [4.0, -5.0, 7.0, 4.0], 
-[-6.0, -3.0, 1.0, 0.0]], [[-3.0, 5.0, 0.0, 4.0], [-1.0, -7.0, 6.0, -3.0], [-6.0, -6.0, -6.0, 7.0]]]])
-      msk_arg1=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      arg1=msk_arg1*(1.0)+(1-msk_arg1)*(7.0)
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank2_offset1(self):
+      arg0=Data(numpy.array([[[[-7.0, -2.0, -1.0], [0.0, 7.0, -7.0]], [[-2.0, 4.0, -3.0], [-1.0, 6.0, 0.0]]], [[[-4.0, -6.0, 
+2.0], [-7.0, 7.0, -3.0]], [[0.0, -3.0, 7.0], [0.0, -6.0, 2.0]]], [[[1.0, 3.0, 0.0], [3.0, 1.0, -1.0]], [[-1.0, 0.0, -4.0], 
+[-7.0, -1.0, 7.0]]], [[[0.0, 5.0, 4.0], [-6.0, -3.0, 0.0]], [[3.0, 2.0, 5.0], [1.0, -1.0, -2.0]]], [[[-7.0, 0.0, 1.0], [4.0, 
+-6.0, 5.0]], [[-5.0, -3.0, 4.0], [4.0, -2.0, 6.0]]], [[[2.0, -5.0, 3.0], [1.0, -1.0, 4.0]], [[5.0, -4.0, -3.0], [0.0, 2.0, 
+-3.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, -3.0, -4.0], [0.0, 6.0, 7.0]], [[-2.0, -7.0, 0.0], [7.0, 0.0, 1.0]]], [[[-3.0, 
+6.0, 0.0], [-6.0, -2.0, -2.0]], [[7.0, -7.0, -5.0], [4.0, 0.0, 2.0]]], [[[-7.0, 0.0, 1.0], [1.0, -3.0, -7.0]], [[7.0, -7.0, 
+3.0], [-6.0, -7.0, -4.0]]], [[[6.0, 1.0, 0.0], [-1.0, -4.0, 5.0]], [[-4.0, 6.0, 4.0], [2.0, -7.0, -6.0]]], [[[-6.0, -6.0, 3.0], 
+[-5.0, -6.0, 2.0]], [[7.0, -1.0, -1.0], [2.0, 7.0, 0.0]]], [[[-2.0, -4.0, -2.0], [-6.0, -4.0, -4.0]], [[0.0, 5.0, -2.0], [6.0, 
+-5.0, -1.0]]]]))
+      arg0.expand()
+      arg1=Data(numpy.array([[-7.0, 5.0, 3.0], [0.0, -4.0, 0.0]]),self.functionspace)
+      arg1.setTaggedValue(1,numpy.array([[6.0, -1.0, -3.0], [-2.0, 5.0, -7.0]]))
+      res=generalTensorTransposedProduct(arg0,arg1,axis_offset=1)
+      msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
+      ref=msk_ref*numpy.array([[[[36.0, 8.0], [14.0, -28.0]], [[25.0, -16.0], [37.0, -24.0]]], [[[4.0, 24.0], [75.0, -28.0]], 
+[[6.0, 12.0], [-24.0, 24.0]]], [[[8.0, -12.0], [-19.0, -4.0]], [[-5.0, 0.0], [65.0, 4.0]]], [[[37.0, -20.0], [27.0, 12.0]], 
+[[4.0, -8.0], [-18.0, 4.0]]], [[[52.0, 0.0], [-43.0, 24.0]], [[32.0, 12.0], [-20.0, 8.0]]], [[[-30.0, 20.0], [0.0, 4.0]], 
+[[-64.0, 16.0], [1.0, -8.0]]]])+(1.-msk_ref)*numpy.array([[[[57.0, -1.0], [-27.0, -19.0]], [[-5.0, -31.0], [39.0, -21.0]]], 
+[[[-24.0, 36.0], [-28.0, 16.0]], [[64.0, -14.0], [18.0, -22.0]]], [[[-45.0, 7.0], [30.0, 32.0]], [[40.0, -70.0], [-17.0, 
+5.0]]], [[[35.0, -7.0], [-17.0, -53.0]], [[-42.0, 10.0], [37.0, 3.0]]], [[[-39.0, -39.0], [-30.0, -34.0]], [[46.0, -12.0], 
+[5.0, 31.0]]], [[[-2.0, -2.0], [-20.0, 20.0]], [[1.0, 39.0], [44.0, -30.0]]]])
+      self.assertTrue(isinstance(res,Data),"wrong type of result.")
+      self.assertEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
+      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_generalTensorTransposedProduct_expandedData_rank4_taggedData_rank0_offset0(self):
+      arg0=Data(numpy.array([[[[1.0, -5.0, -6.0, -3.0], [-5.0, -2.0, 4.0, 5.0], [3.0, -5.0, 0.0, 6.0]], [[-3.0, 7.0, 0.0, 3.0], 
+[-7.0, 3.0, 5.0, -4.0], [3.0, 0.0, 0.0, 0.0]]], [[[-5.0, 0.0, 1.0, -2.0], [-3.0, -6.0, -4.0, 5.0], [5.0, -3.0, 0.0, -2.0]], 
+[[7.0, 7.0, 4.0, 5.0], [3.0, -7.0, -6.0, -2.0], [7.0, 0.0, 4.0, -6.0]]], [[[4.0, -6.0, -3.0, 1.0], [0.0, 3.0, 2.0, 0.0], [5.0, 
+2.0, -1.0, 0.0]], [[6.0, 3.0, -3.0, 1.0], [-1.0, -7.0, -6.0, 1.0], [-7.0, 1.0, -7.0, -7.0]]]]),self.functionspace)
+      arg0.setTaggedValue(1,numpy.array([[[[7.0, 2.0, 4.0, 0.0], [7.0, 5.0, 6.0, -6.0], [-5.0, 4.0, 4.0, -7.0]], [[-6.0, -1.0, 
+5.0, -6.0], [4.0, 0.0, 1.0, 3.0], [-2.0, 6.0, -5.0, -4.0]]], [[[-4.0, -1.0, -3.0, -4.0], [2.0, -7.0, -5.0, 5.0], [7.0, 5.0, 
+1.0, -3.0]], [[0.0, 3.0, 7.0, 4.0], [0.0, 4.0, 7.0, -3.0], [-4.0, 3.0, -6.0, -3.0]]], [[[3.0, 0.0, -5.0, 1.0], [6.0, -4.0, 
+-7.0, -5.0], [3.0, -4.0, -1.0, -1.0]], [[-6.0, -2.0, 0.0, -5.0], [-6.0, 5.0, -4.0, 5.0], [-7.0, -6.0, 5.0, 6.0]]]]))
+      arg0.expand()
+      arg1=Data(-2.0,self.functionspace)
+      arg1.setTaggedValue(1,-1.0)
       res=generalTensorTransposedProduct(arg0,arg1,axis_offset=0)
       msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
-      ref=msk_ref*numpy.array([[[[6.0, -3.0, -3.0, -3.0], [1.0, -2.0, 6.0, -6.0], [4.0, -1.0, -7.0, 7.0]], [[0.0, 6.0, 6.0, 
-5.0], [2.0, 7.0, 6.0, 6.0], [-3.0, -5.0, 1.0, -3.0]]], [[[-2.0, -1.0, 0.0, 0.0], [0.0, 7.0, 1.0, 4.0], [-6.0, -4.0, -3.0, 
--1.0]], [[0.0, 6.0, 4.0, 1.0], [-6.0, -5.0, -6.0, 1.0], [-6.0, -5.0, 5.0, 0.0]]], [[[4.0, -1.0, -2.0, -7.0], [-6.0, 5.0, -1.0, 
--4.0], [2.0, -3.0, -4.0, 2.0]], [[0.0, 1.0, 5.0, 4.0], [1.0, -1.0, -5.0, 1.0], [6.0, -3.0, -4.0, 
-3.0]]]])+(1.-msk_ref)*numpy.array([[[[-42.0, -21.0, -35.0, -35.0], [-7.0, 49.0, -21.0, 21.0], [0.0, 14.0, 0.0, 21.0]], [[21.0, 
-42.0, 35.0, -28.0], [-28.0, 42.0, -28.0, 0.0], [0.0, 0.0, 0.0, -21.0]]], [[[-49.0, -28.0, -42.0, 49.0], [-42.0, 21.0, -35.0, 
--14.0], [-35.0, 28.0, 28.0, 49.0]], [[-14.0, 28.0, 21.0, 28.0], [-35.0, 0.0, 0.0, 49.0], [28.0, -21.0, -21.0, 14.0]]], [[[14.0, 
-21.0, 49.0, -35.0], [28.0, -35.0, 49.0, 28.0], [-42.0, -21.0, 7.0, 0.0]], [[-21.0, 35.0, 0.0, 28.0], [-7.0, -49.0, 42.0, 
--21.0], [-42.0, -42.0, -42.0, 49.0]]]])
+      ref=msk_ref*numpy.array([[[[-2.0, 10.0, 12.0, 6.0], [10.0, 4.0, -8.0, -10.0], [-6.0, 10.0, -0.0, -12.0]], [[6.0, -14.0, 
+-0.0, -6.0], [14.0, -6.0, -10.0, 8.0], [-6.0, -0.0, -0.0, -0.0]]], [[[10.0, -0.0, -2.0, 4.0], [6.0, 12.0, 8.0, -10.0], [-10.0, 
+6.0, -0.0, 4.0]], [[-14.0, -14.0, -8.0, -10.0], [-6.0, 14.0, 12.0, 4.0], [-14.0, -0.0, -8.0, 12.0]]], [[[-8.0, 12.0, 6.0, 
+-2.0], [-0.0, -6.0, -4.0, -0.0], [-10.0, -4.0, 2.0, -0.0]], [[-12.0, -6.0, 6.0, -2.0], [2.0, 14.0, 12.0, -2.0], [14.0, -2.0, 
+14.0, 14.0]]]])+(1.-msk_ref)*numpy.array([[[[-7.0, -2.0, -4.0, -0.0], [-7.0, -5.0, -6.0, 6.0], [5.0, -4.0, -4.0, 7.0]], [[6.0, 
+1.0, -5.0, 6.0], [-4.0, -0.0, -1.0, -3.0], [2.0, -6.0, 5.0, 4.0]]], [[[4.0, 1.0, 3.0, 4.0], [-2.0, 7.0, 5.0, -5.0], [-7.0, 
+-5.0, -1.0, 3.0]], [[-0.0, -3.0, -7.0, -4.0], [-0.0, -4.0, -7.0, 3.0], [4.0, -3.0, 6.0, 3.0]]], [[[-3.0, -0.0, 5.0, -1.0], 
+[-6.0, 4.0, 7.0, 5.0], [-3.0, 4.0, 1.0, 1.0]], [[6.0, 2.0, -0.0, 5.0], [6.0, -5.0, 4.0, -5.0], [7.0, 6.0, -5.0, -6.0]]]])
       self.assertTrue(isinstance(res,Data),"wrong type of result.")
       self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
       self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
diff --git a/escriptcore/test/python/test_util_binary_new.py b/escriptcore/test/python/test_util_binary_new.py
new file mode 100644
index 0000000..4f045aa
--- /dev/null
+++ b/escriptcore/test/python/test_util_binary_new.py
@@ -0,0 +1,245 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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-2017 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"
+
+"""
+test for non-overloaded binary operations
+
+:remark: use see `test_util`
+:var __author__: name of author
+:var __copyright__: copyrights
+:var __license__: licence agreement
+:var __url__: url entry point on documentation
+:var __version__: version
+:var __date__: date of the version
+"""
+
+__author__="Joel Fenwick, joelfenwick at uq.edu.au"
+
+import esys.escriptcore.utestselect as unittest
+import numpy
+from esys.escript import *
+from test_util_base import Test_util_values
+
+
+
+
+        
+    
+
+class Test_util_binary_new(Test_util_values):
+    
+   def generate_indices(self, shape):
+        res=[0]*len(shape)
+        l=len(shape)
+        done=False
+        while not done:
+            yield tuple(res)
+            res[0]+=1
+            for i in range(l-1):
+                if res[i]>=shape[i]:
+                    res[i]=0
+                    res[i+1]+=1
+                else:
+                    break
+            # now we check the last digit
+            if res[l-1]>=shape[l-1]:
+                done=True
+        
+
+   def subst_outer(self, a, b):
+        if isinstance(a,float) or isinstance(a, complex):
+            a=(a,)
+        if isinstance(b,float) or isinstance(b, complex):
+            b=(b,)            
+        sa=getShape(a)
+        sb=getShape(b)
+        a=numpy.array(a)
+        b=numpy.array(b)
+        targettype=a.dtype if a.dtype.kind=='c' else b.dtype
+        if sa==():
+            if sb==():
+                return a*b
+            resshape=sb
+            res=numpy.zeros(resshape, dtype=targettype)            
+            for xb in self.generate_indices(sb):
+                res.itemset(xb,a*b.item(xb))  
+            return res
+        elif sb==():
+            resshape=sa
+            res=numpy.zeros(resshape, dtype=targettype)            
+            for xa in self.generate_indices(sa):
+                res.itemset(xa,a.item(xa)*b)            
+            return res
+        else:
+            resshape=sa+sb
+            res=numpy.zeros(resshape, dtype=targettype)            
+        for xa in self.generate_indices(sa):
+            for xb in self.generate_indices(sb):
+                res.itemset(xa+xb,a.item(xa)*b.item(xb))
+        return res    
+    
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_add_combined(self):
+       opstring='a+b'
+       misccheck='isinstance(res, Data) if isinstance(a, Data) or isinstance(b, Data) else True' # doesn't cover all cases;
+       oraclecheck="refa+refb"
+       opname="+ operator"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       permit_array_op_data=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, permit_array_op_data=permit_array_op_data)   
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_div_combined(self):
+       opstring='a/b'
+       misccheck='isinstance(res, Data) if isinstance(a, Data) or isinstance(b, Data) else True' # doesn't cover all cases;
+       oraclecheck="refa/refb"
+       opname="/ operator"
+       no_second_arg_zeros=True
+       noshapemismatch=True
+       permitscalarmismatch=True
+       permit_array_op_data=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, permit_array_op_data=permit_array_op_data, no_second_arg_zeros=no_second_arg_zeros)     
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_mul_combined(self):
+       opstring='a*b'
+       misccheck='isinstance(res, Data) if isinstance(a, Data) or isinstance(b, Data) else True' # doesn't cover all cases;
+       oraclecheck="refa*refb"
+       opname="* operator"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       permit_array_op_data=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, permit_array_op_data=permit_array_op_data)          
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_pow_combined(self):
+       opstring='a**b'
+       misccheck='isinstance(res, Data) if isinstance(a, Data) or isinstance(b, Data) else True' # doesn't cover all cases;
+       oraclecheck="refa**refb"
+       opname="** operator"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       permit_array_op_data=False
+       no_first_arg_negative=True
+       no_first_arg_zeros=False
+       second_large_args=False
+       first_large_args=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, permit_array_op_data=permit_array_op_data, no_first_arg_negative=no_first_arg_negative, no_first_arg_zeros=no_first_arg_zeros, 
+                                                 second_large_args=second_large_args, first_large_args=first_large_args)          
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_sub_combined(self):
+       opstring='a-b'
+       misccheck='isinstance(res, Data) if isinstance(a, Data) or isinstance(b, Data) else True' # doesn't cover all cases;
+       oraclecheck="refa-refb"
+       opname="- operator"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       permit_array_op_data=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, permit_array_op_data=permit_array_op_data)          
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_inner_combined(self):
+       opstring='inner(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.tensordot(refa, refb, axes=getRank(refa))"
+       opname="inner"
+       noshapemismatch=True
+       permitscalarmismatch=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_outer_combined(self):
+       opstring='outer(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="self.subst_outer(refa,refb)"
+       opname="outer"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       capcombinedrank=True
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, cap_combined_rank=capcombinedrank)           
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_matrix_minimum_combined(self):
+       opstring='minimum(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.minimum(refa,refb)"
+       opname="minimum"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       cplx=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, support_cplx=cplx)         
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_matrix_maximum_combined(self):
+       opstring='maximum(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.maximum(refa,refb)"
+       opname="maximum"
+       noshapemismatch=True
+       permitscalarmismatch=True
+       cplx=False
+       self.generate_binary_operation_test_batch(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch, support_cplx=cplx)         
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_matrix_mult_combined(self):
+       opstring='matrix_mult(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.dot(refa,refb)"
+       opname="matrix_mult"
+       aranks=(2,)
+       self.generate_binary_matrixlike_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, aranks=aranks)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transpose_matrix_mult_combined(self):
+       opstring='transposed_matrix_mult(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.dot(numpy.transpose(refa),refb)"
+       opname="transposed_matrix_mult"
+       aranks=(2,)
+       self.generate_binary_matrixlike_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, aranks=aranks)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_matrix_transposed_mult_combined(self):
+       opstring='matrix_transposed_mult(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.dot(refa,numpy.transpose(refb))"
+       opname="matrix_transposed_mult"
+       aranks=(2,)
+       self.generate_binary_matrixlike_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, aranks=aranks)       
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_mult_combined(self):
+       opstring='tensor_mult(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.dot(refa,refb) if getRank(refa)==2 else numpy.tensordot(refa,refb)"
+       opname="tensor_mult"
+       aranks=(2,4)
+       self.generate_binary_matrixlike_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, aranks=aranks)
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transposed_tensor_mult_combined(self):
+       opstring='transposed_tensor_mult(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.dot(transpose(refa),refb) if getRank(refa)==2 else numpy.tensordot(transpose(refa),refb)"
+       opname="transposed_tensor_mult"
+       aranks=(2,4)
+       self.generate_binary_matrixlike_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, aranks=aranks) 
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tensor_transposed_mult_combined(self):
+       opstring='tensor_transposed_mult(a,b)'
+       misccheck=None   # How to work out what the result of type should be
+       oraclecheck="numpy.dot(refa,transpose(refb)) if getRank(refa)==2 else numpy.tensordot(refa,transpose(refb))"
+       opname="tensor_tranposed_mult"
+       aranks=(2,4)
+       self.generate_binary_matrixlike_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, aranks=aranks)         
diff --git a/escriptcore/test/python/test_util_binary_no_tagged_data.py b/escriptcore/test/python/test_util_binary_no_tagged_data.py
index ad6915b..4da92b1 100644
--- a/escriptcore/test/python/test_util_binary_no_tagged_data.py
+++ b/escriptcore/test/python/test_util_binary_no_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_binary_with_tagged_data.py b/escriptcore/test/python/test_util_binary_with_tagged_data.py
index 74dfc7b..b84a595 100644
--- a/escriptcore/test/python/test_util_binary_with_tagged_data.py
+++ b/escriptcore/test/python/test_util_binary_with_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_grad.py b/escriptcore/test/python/test_util_grad.py
new file mode 100644
index 0000000..c09cb8f
--- /dev/null
+++ b/escriptcore/test/python/test_util_grad.py
@@ -0,0 +1,18964 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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-2017 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 gradient 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_Gradient_noBoundary(unittest.TestCase):
+    RES_TOL=1.e-8
+
+    def test_gradC_onFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.0371363921473+0.039406396558j)*x[0]**o+((0.922271132962+0.387331725454j))*x[0]+((0.458592850688-0.875658600458j))*x[1]**o+((0.273117118072+0.558507121065j))*x[1]
+        ref[0]=(-0.0371363921473+0.039406396558j)*o*x_ref[0]**(o-1)+((0.922271132962+0.387331725454j))
+        ref[1]=(0.458592850688-0.875658600458j)*o*x_ref[1]**(o-1)+((0.273117118072+0.558507121065j))
+        if dim==3:
+            arg+=((-0.904127861676+0.811040340281j))*x[2]**o+((0.928644826364+0.912132297048j))*x[2]
+            ref[2]=(-0.904127861676+0.811040340281j)*o*x_ref[2]**(o-1)+((0.928644826364+0.912132297048j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(-0.0498682946292-0.861052235484j)*x[0]**o+((-0.228220078889-0.905278636322j))*x[0]+((0.240748344011-0.488349121417j))*x[1]**o+((-0.686346911532-0.381562003189j))*x[1]
+        ref[0, 0]=(-0.0498682946292-0.861052235484j)*o*x_ref[0]**(o-1)+((-0.228220078889-0.905278636322j))
+        ref[0, 1]=(0.240748344011-0.488349121417j)*o*x_ref[1]**(o-1)+((-0.686346911532-0.381562003189j))
+        arg[1,]=(0.619607513828-0.927031827589j)*x[0]**o+((0.39757843009-0.596931996454j))*x[0]+((0.0309682836785-0.406842142554j))*x[1]**o+((-0.502809771082-0.220371192172j))*x[1]
+        ref[1, 0]=(0.619607513828-0.927031827589j)*o*x_ref[0]**(o-1)+((0.39757843009-0.596931996454j))
+        ref[1, 1]=(0.0309682836785-0.406842142554j)*o*x_ref[1]**(o-1)+((-0.502809771082-0.220371192172j))
+        arg[2,]=(0.734950357029-0.809793915892j)*x[0]**o+((0.983994034628+0.547335347832j))*x[0]+((0.64407483857-0.825858220043j))*x[1]**o+((-0.756371335536-0.945837663906j))*x[1]
+        ref[2, 0]=(0.734950357029-0.809793915892j)*o*x_ref[0]**(o-1)+((0.983994034628+0.547335347832j))
+        ref[2, 1]=(0.64407483857-0.825858220043j)*o*x_ref[1]**(o-1)+((-0.756371335536-0.945837663906j))
+        arg[3,]=(-0.568010469326-0.619507294635j)*x[0]**o+((-0.0486816509292+0.933113363453j))*x[0]+((-0.720166218223+0.354851757538j))*x[1]**o+((-0.261194173537+0.561702705361j))*x[1]
+        ref[3, 0]=(-0.568010469326-0.619507294635j)*o*x_ref[0]**(o-1)+((-0.0486816509292+0.933113363453j))
+        ref[3, 1]=(-0.720166218223+0.354851757538j)*o*x_ref[1]**(o-1)+((-0.261194173537+0.561702705361j))
+        if dim==3:
+            arg[0,]+=(-0.894558476368+0.586009771614j)*x[2]**o+((0.568201762517-0.0764380298403j))*x[2]
+            ref[0, 2]=(-0.894558476368+0.586009771614j)*o*x_ref[2]**(o-1)+((0.568201762517-0.0764380298403j))
+            arg[1,]+=(-0.393542851276+0.11427099534j)*x[2]**o+((0.606231200435+0.147114747395j))*x[2]
+            ref[1, 2]=(-0.393542851276+0.11427099534j)*o*x_ref[2]**(o-1)+((0.606231200435+0.147114747395j))
+            arg[2,]+=(0.106607519044+0.669436250333j)*x[2]**o+((-0.410870065882+0.0825007188042j))*x[2]
+            ref[2, 2]=(0.106607519044+0.669436250333j)*o*x_ref[2]**(o-1)+((-0.410870065882+0.0825007188042j))
+            arg[3,]+=(0.848042270094-0.455528210072j)*x[2]**o+((-0.979000943886-0.415058830156j))*x[2]
+            ref[3, 2]=(0.848042270094-0.455528210072j)*o*x_ref[2]**(o-1)+((-0.979000943886-0.415058830156j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.400938292374+0.0210009422042j)*x[0]**o+((0.0942464955001+0.205256199722j))*x[0]+((0.04997532574-0.857171541113j))*x[1]**o+((-0.880605945119+0.0069905996259j))*x[1]
+        ref[0, 0, 0]=(-0.400938292374+0.0210009422042j)*o*x_ref[0]**(o-1)+((0.0942464955001+0.205256199722j))
+        ref[0, 0, 1]=(0.04997532574-0.857171541113j)*o*x_ref[1]**(o-1)+((-0.880605945119+0.0069905996259j))
+        arg[0, 1]=(0.690354218204-0.516539234083j)*x[0]**o+((0.806630250612+0.216914603195j))*x[0]+((0.639858699236+0.00184536915463j))*x[1]**o+((-0.0889442185699-0.617957414106j))*x[1]
+        ref[0, 1, 0]=(0.690354218204-0.516539234083j)*o*x_ref[0]**(o-1)+((0.806630250612+0.216914603195j))
+        ref[0, 1, 1]=(0.639858699236+0.00184536915463j)*o*x_ref[1]**(o-1)+((-0.0889442185699-0.617957414106j))
+        arg[1, 0]=(0.628319286941+0.751306212044j)*x[0]**o+((0.420785768642-0.221826650077j))*x[0]+((0.503424570888+0.308345608481j))*x[1]**o+((-0.999856622716-0.170788135544j))*x[1]
+        ref[1, 0, 0]=(0.628319286941+0.751306212044j)*o*x_ref[0]**(o-1)+((0.420785768642-0.221826650077j))
+        ref[1, 0, 1]=(0.503424570888+0.308345608481j)*o*x_ref[1]**(o-1)+((-0.999856622716-0.170788135544j))
+        arg[1, 1]=(-0.907531434349-0.0426171114286j)*x[0]**o+((-0.52716814744-0.550205721607j))*x[0]+((0.695042123006-0.214050430492j))*x[1]**o+((0.108255076635+0.357180353435j))*x[1]
+        ref[1, 1, 0]=(-0.907531434349-0.0426171114286j)*o*x_ref[0]**(o-1)+((-0.52716814744-0.550205721607j))
+        ref[1, 1, 1]=(0.695042123006-0.214050430492j)*o*x_ref[1]**(o-1)+((0.108255076635+0.357180353435j))
+        if dim==3:
+            arg[0, 0]+=(-0.687742272482+0.997837455305j)*x[2]**o+((0.382615141789-0.557750470251j))*x[2]
+            ref[0, 0, 2]=(-0.687742272482+0.997837455305j)*o*x_ref[2]**(o-1)+((0.382615141789-0.557750470251j))
+            arg[0, 1]+=(-0.475315415326-0.926707969323j)*x[2]**o+((0.981552231453-0.973252280327j))*x[2]
+            ref[0, 1, 2]=(-0.475315415326-0.926707969323j)*o*x_ref[2]**(o-1)+((0.981552231453-0.973252280327j))
+            arg[1, 0]+=(0.374358189811+0.226692918176j)*x[2]**o+((-0.52894556414-0.90501380512j))*x[2]
+            ref[1, 0, 2]=(0.374358189811+0.226692918176j)*o*x_ref[2]**(o-1)+((-0.52894556414-0.90501380512j))
+            arg[1, 1]+=(-0.371690533559-0.615210901823j)*x[2]**o+((0.897164244728+0.627059348943j))*x[2]
+            ref[1, 1, 2]=(-0.371690533559-0.615210901823j)*o*x_ref[2]**(o-1)+((0.897164244728+0.627059348943j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3),w)
+        ref = Data(0,(2, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.686545863137-0.195182177585j)*x[0]**o+((-0.621925417051-0.0298316051422j))*x[0]+((0.718145394246-0.898509438376j))*x[1]**o+((-0.103440380012-0.863327388375j))*x[1]
+        ref[0, 0, 0, 0]=(-0.686545863137-0.195182177585j)*o*x_ref[0]**(o-1)+((-0.621925417051-0.0298316051422j))
+        ref[0, 0, 0, 1]=(0.718145394246-0.898509438376j)*o*x_ref[1]**(o-1)+((-0.103440380012-0.863327388375j))
+        arg[0, 0, 1]=(0.11223294674+0.175413475218j)*x[0]**o+((0.26088291445-0.292928701489j))*x[0]+((0.0362445251514-0.936388845129j))*x[1]**o+((-0.237482949457-0.0426081669353j))*x[1]
+        ref[0, 0, 1, 0]=(0.11223294674+0.175413475218j)*o*x_ref[0]**(o-1)+((0.26088291445-0.292928701489j))
+        ref[0, 0, 1, 1]=(0.0362445251514-0.936388845129j)*o*x_ref[1]**(o-1)+((-0.237482949457-0.0426081669353j))
+        arg[0, 0, 2]=(0.338543846282-0.211720878363j)*x[0]**o+((0.373090094782+0.742520331957j))*x[0]+((0.907776776998-0.06437207165j))*x[1]**o+((-0.579131618093+0.86066703124j))*x[1]
+        ref[0, 0, 2, 0]=(0.338543846282-0.211720878363j)*o*x_ref[0]**(o-1)+((0.373090094782+0.742520331957j))
+        ref[0, 0, 2, 1]=(0.907776776998-0.06437207165j)*o*x_ref[1]**(o-1)+((-0.579131618093+0.86066703124j))
+        arg[0, 1, 0]=(0.96097437478+0.713965141654j)*x[0]**o+((-0.988577234363+0.497658969577j))*x[0]+((0.962227087385+0.897204522444j))*x[1]**o+((-0.0823186675378-0.910393832654j))*x[1]
+        ref[0, 1, 0, 0]=(0.96097437478+0.713965141654j)*o*x_ref[0]**(o-1)+((-0.988577234363+0.497658969577j))
+        ref[0, 1, 0, 1]=(0.962227087385+0.897204522444j)*o*x_ref[1]**(o-1)+((-0.0823186675378-0.910393832654j))
+        arg[0, 1, 1]=(0.0608858163792-0.506288104368j)*x[0]**o+((-0.809774297043-0.80168096953j))*x[0]+((-0.339910489239-0.790636836752j))*x[1]**o+((0.822736231674-0.469912488219j))*x[1]
+        ref[0, 1, 1, 0]=(0.0608858163792-0.506288104368j)*o*x_ref[0]**(o-1)+((-0.809774297043-0.80168096953j))
+        ref[0, 1, 1, 1]=(-0.339910489239-0.790636836752j)*o*x_ref[1]**(o-1)+((0.822736231674-0.469912488219j))
+        arg[0, 1, 2]=(-0.273921800145-0.82796104564j)*x[0]**o+((-0.437509022805+0.599480900683j))*x[0]+((-0.217234456033-0.669206325315j))*x[1]**o+((0.901853049517-0.46456055909j))*x[1]
+        ref[0, 1, 2, 0]=(-0.273921800145-0.82796104564j)*o*x_ref[0]**(o-1)+((-0.437509022805+0.599480900683j))
+        ref[0, 1, 2, 1]=(-0.217234456033-0.669206325315j)*o*x_ref[1]**(o-1)+((0.901853049517-0.46456055909j))
+        arg[0, 2, 0]=(-0.00750983499033+0.810986160859j)*x[0]**o+((0.044151077838+0.399748079958j))*x[0]+((-0.553214291667+0.559789129637j))*x[1]**o+((-0.0571596871381-0.165669950852j))*x[1]
+        ref[0, 2, 0, 0]=(-0.00750983499033+0.810986160859j)*o*x_ref[0]**(o-1)+((0.044151077838+0.399748079958j))
+        ref[0, 2, 0, 1]=(-0.553214291667+0.559789129637j)*o*x_ref[1]**(o-1)+((-0.0571596871381-0.165669950852j))
+        arg[0, 2, 1]=(-0.457289891595-0.253363111301j)*x[0]**o+((-0.0190169524221+0.579294582967j))*x[0]+((0.568172643396+0.230092797763j))*x[1]**o+((0.655848239055+0.238359092719j))*x[1]
+        ref[0, 2, 1, 0]=(-0.457289891595-0.253363111301j)*o*x_ref[0]**(o-1)+((-0.0190169524221+0.579294582967j))
+        ref[0, 2, 1, 1]=(0.568172643396+0.230092797763j)*o*x_ref[1]**(o-1)+((0.655848239055+0.238359092719j))
+        arg[0, 2, 2]=(0.41178184284-0.808623218432j)*x[0]**o+((0.260907822163-0.188854294882j))*x[0]+((0.478496306594-0.240132409214j))*x[1]**o+((-0.940332437367+0.817847161936j))*x[1]
+        ref[0, 2, 2, 0]=(0.41178184284-0.808623218432j)*o*x_ref[0]**(o-1)+((0.260907822163-0.188854294882j))
+        ref[0, 2, 2, 1]=(0.478496306594-0.240132409214j)*o*x_ref[1]**(o-1)+((-0.940332437367+0.817847161936j))
+        arg[0, 3, 0]=(-0.364799099328+0.641530137102j)*x[0]**o+((0.6065078974+0.369695477794j))*x[0]+((0.980495093934+0.191486895418j))*x[1]**o+((-0.635574621618-0.247196286875j))*x[1]
+        ref[0, 3, 0, 0]=(-0.364799099328+0.641530137102j)*o*x_ref[0]**(o-1)+((0.6065078974+0.369695477794j))
+        ref[0, 3, 0, 1]=(0.980495093934+0.191486895418j)*o*x_ref[1]**(o-1)+((-0.635574621618-0.247196286875j))
+        arg[0, 3, 1]=(0.405606783292-0.12303483135j)*x[0]**o+((0.0185273358693+0.459381706618j))*x[0]+((0.598996979187-0.0557859468527j))*x[1]**o+((0.873998483614+0.479415765827j))*x[1]
+        ref[0, 3, 1, 0]=(0.405606783292-0.12303483135j)*o*x_ref[0]**(o-1)+((0.0185273358693+0.459381706618j))
+        ref[0, 3, 1, 1]=(0.598996979187-0.0557859468527j)*o*x_ref[1]**(o-1)+((0.873998483614+0.479415765827j))
+        arg[0, 3, 2]=(-0.738859638564-0.239886727616j)*x[0]**o+((-0.711965065303-0.541473175685j))*x[0]+((-0.0752180568666+0.113303153964j))*x[1]**o+((-0.142689827205+0.769392040008j))*x[1]
+        ref[0, 3, 2, 0]=(-0.738859638564-0.239886727616j)*o*x_ref[0]**(o-1)+((-0.711965065303-0.541473175685j))
+        ref[0, 3, 2, 1]=(-0.0752180568666+0.113303153964j)*o*x_ref[1]**(o-1)+((-0.142689827205+0.769392040008j))
+        arg[1, 0, 0]=(-0.493496549109-0.552164696676j)*x[0]**o+((-0.709540377456+0.112449521038j))*x[0]+((-0.538783599671+0.248870250157j))*x[1]**o+((0.815110945148+0.191740144379j))*x[1]
+        ref[1, 0, 0, 0]=(-0.493496549109-0.552164696676j)*o*x_ref[0]**(o-1)+((-0.709540377456+0.112449521038j))
+        ref[1, 0, 0, 1]=(-0.538783599671+0.248870250157j)*o*x_ref[1]**(o-1)+((0.815110945148+0.191740144379j))
+        arg[1, 0, 1]=(-0.00171846494896+0.39330456112j)*x[0]**o+((-0.253811523956-0.441272551132j))*x[0]+((0.0121673129717-0.262206567308j))*x[1]**o+((0.0922018361726+0.495662331126j))*x[1]
+        ref[1, 0, 1, 0]=(-0.00171846494896+0.39330456112j)*o*x_ref[0]**(o-1)+((-0.253811523956-0.441272551132j))
+        ref[1, 0, 1, 1]=(0.0121673129717-0.262206567308j)*o*x_ref[1]**(o-1)+((0.0922018361726+0.495662331126j))
+        arg[1, 0, 2]=(0.426969738126+0.382056563859j)*x[0]**o+((-0.259995926226-0.0939463746681j))*x[0]+((-0.49264287414+0.384987448577j))*x[1]**o+((-0.018987089908-0.204942187559j))*x[1]
+        ref[1, 0, 2, 0]=(0.426969738126+0.382056563859j)*o*x_ref[0]**(o-1)+((-0.259995926226-0.0939463746681j))
+        ref[1, 0, 2, 1]=(-0.49264287414+0.384987448577j)*o*x_ref[1]**(o-1)+((-0.018987089908-0.204942187559j))
+        arg[1, 1, 0]=(-0.673405202558-0.617156362987j)*x[0]**o+((-0.0473044208881-0.355425397445j))*x[0]+((0.103315270076-0.833952219206j))*x[1]**o+((0.640574134642-0.0005917387782j))*x[1]
+        ref[1, 1, 0, 0]=(-0.673405202558-0.617156362987j)*o*x_ref[0]**(o-1)+((-0.0473044208881-0.355425397445j))
+        ref[1, 1, 0, 1]=(0.103315270076-0.833952219206j)*o*x_ref[1]**(o-1)+((0.640574134642-0.0005917387782j))
+        arg[1, 1, 1]=(0.863832970664+0.525075520192j)*x[0]**o+((0.303909427821-0.224241565975j))*x[0]+((0.0240775460044-0.18412459405j))*x[1]**o+((0.235522955443-0.165854382053j))*x[1]
+        ref[1, 1, 1, 0]=(0.863832970664+0.525075520192j)*o*x_ref[0]**(o-1)+((0.303909427821-0.224241565975j))
+        ref[1, 1, 1, 1]=(0.0240775460044-0.18412459405j)*o*x_ref[1]**(o-1)+((0.235522955443-0.165854382053j))
+        arg[1, 1, 2]=(0.217944524067-0.664868501171j)*x[0]**o+((0.196759480662+0.852986461285j))*x[0]+((0.236653935966-0.160284451476j))*x[1]**o+((-0.700689312636-0.0314987484264j))*x[1]
+        ref[1, 1, 2, 0]=(0.217944524067-0.664868501171j)*o*x_ref[0]**(o-1)+((0.196759480662+0.852986461285j))
+        ref[1, 1, 2, 1]=(0.236653935966-0.160284451476j)*o*x_ref[1]**(o-1)+((-0.700689312636-0.0314987484264j))
+        arg[1, 2, 0]=(0.832257463577+0.53499843286j)*x[0]**o+((-0.321736751074+0.738530462002j))*x[0]+((0.977393578417-0.421040004545j))*x[1]**o+((-0.499794103096+0.52086894234j))*x[1]
+        ref[1, 2, 0, 0]=(0.832257463577+0.53499843286j)*o*x_ref[0]**(o-1)+((-0.321736751074+0.738530462002j))
+        ref[1, 2, 0, 1]=(0.977393578417-0.421040004545j)*o*x_ref[1]**(o-1)+((-0.499794103096+0.52086894234j))
+        arg[1, 2, 1]=(-0.0225106073262+0.916891579705j)*x[0]**o+((-0.704432501309-0.555104126484j))*x[0]+((0.914381878375-0.0831963870148j))*x[1]**o+((-0.666846436319-0.588868817559j))*x[1]
+        ref[1, 2, 1, 0]=(-0.0225106073262+0.916891579705j)*o*x_ref[0]**(o-1)+((-0.704432501309-0.555104126484j))
+        ref[1, 2, 1, 1]=(0.914381878375-0.0831963870148j)*o*x_ref[1]**(o-1)+((-0.666846436319-0.588868817559j))
+        arg[1, 2, 2]=(0.523268170768-0.723915749887j)*x[0]**o+((0.428201382553-0.524355080199j))*x[0]+((-0.248440309924+0.652118189664j))*x[1]**o+((-0.996019245714-0.390083550615j))*x[1]
+        ref[1, 2, 2, 0]=(0.523268170768-0.723915749887j)*o*x_ref[0]**(o-1)+((0.428201382553-0.524355080199j))
+        ref[1, 2, 2, 1]=(-0.248440309924+0.652118189664j)*o*x_ref[1]**(o-1)+((-0.996019245714-0.390083550615j))
+        arg[1, 3, 0]=(-0.36808493828-0.548058611785j)*x[0]**o+((-0.341171766561-0.444336652416j))*x[0]+((-0.0209092618637-0.09087486242j))*x[1]**o+((0.202772167168-0.126338126322j))*x[1]
+        ref[1, 3, 0, 0]=(-0.36808493828-0.548058611785j)*o*x_ref[0]**(o-1)+((-0.341171766561-0.444336652416j))
+        ref[1, 3, 0, 1]=(-0.0209092618637-0.09087486242j)*o*x_ref[1]**(o-1)+((0.202772167168-0.126338126322j))
+        arg[1, 3, 1]=(-0.516110531558+0.0603038494706j)*x[0]**o+((-0.457621901844+0.849344769973j))*x[0]+((0.611697287552-0.827443901489j))*x[1]**o+((0.459482507616+0.672818364203j))*x[1]
+        ref[1, 3, 1, 0]=(-0.516110531558+0.0603038494706j)*o*x_ref[0]**(o-1)+((-0.457621901844+0.849344769973j))
+        ref[1, 3, 1, 1]=(0.611697287552-0.827443901489j)*o*x_ref[1]**(o-1)+((0.459482507616+0.672818364203j))
+        arg[1, 3, 2]=(-0.649211651312-0.999767696405j)*x[0]**o+((-0.374328492264-0.429228674222j))*x[0]+((-0.72439824951-0.132019089029j))*x[1]**o+((-0.810520412756-0.824692599688j))*x[1]
+        ref[1, 3, 2, 0]=(-0.649211651312-0.999767696405j)*o*x_ref[0]**(o-1)+((-0.374328492264-0.429228674222j))
+        ref[1, 3, 2, 1]=(-0.72439824951-0.132019089029j)*o*x_ref[1]**(o-1)+((-0.810520412756-0.824692599688j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.581730999753-0.927412318264j)*x[2]**o+((-0.2200807186-0.552169765955j))*x[2]
+            ref[0, 0, 0, 2]=(0.581730999753-0.927412318264j)*o*x_ref[2]**(o-1)+((-0.2200807186-0.552169765955j))
+            arg[0, 0, 1]+=(-0.981780189769+0.808554474312j)*x[2]**o+((-0.681723016102-0.372738650796j))*x[2]
+            ref[0, 0, 1, 2]=(-0.981780189769+0.808554474312j)*o*x_ref[2]**(o-1)+((-0.681723016102-0.372738650796j))
+            arg[0, 0, 2]+=(0.788511367677+0.107554962667j)*x[2]**o+((-0.0617322922741-0.517080452894j))*x[2]
+            ref[0, 0, 2, 2]=(0.788511367677+0.107554962667j)*o*x_ref[2]**(o-1)+((-0.0617322922741-0.517080452894j))
+            arg[0, 1, 0]+=(-0.637957317644-0.800902157558j)*x[2]**o+((-0.855915959816+0.165227986482j))*x[2]
+            ref[0, 1, 0, 2]=(-0.637957317644-0.800902157558j)*o*x_ref[2]**(o-1)+((-0.855915959816+0.165227986482j))
+            arg[0, 1, 1]+=(-0.935438137112+0.397148185534j)*x[2]**o+((-0.733436377914+0.314662434528j))*x[2]
+            ref[0, 1, 1, 2]=(-0.935438137112+0.397148185534j)*o*x_ref[2]**(o-1)+((-0.733436377914+0.314662434528j))
+            arg[0, 1, 2]+=(0.685834086302+0.232059839949j)*x[2]**o+((0.155466891869+0.127028974668j))*x[2]
+            ref[0, 1, 2, 2]=(0.685834086302+0.232059839949j)*o*x_ref[2]**(o-1)+((0.155466891869+0.127028974668j))
+            arg[0, 2, 0]+=(-0.431023064722+0.0758308913635j)*x[2]**o+((-0.434440855728-0.895938443865j))*x[2]
+            ref[0, 2, 0, 2]=(-0.431023064722+0.0758308913635j)*o*x_ref[2]**(o-1)+((-0.434440855728-0.895938443865j))
+            arg[0, 2, 1]+=(-0.572176677155-0.208259554318j)*x[2]**o+((-0.913081614989-0.776598870063j))*x[2]
+            ref[0, 2, 1, 2]=(-0.572176677155-0.208259554318j)*o*x_ref[2]**(o-1)+((-0.913081614989-0.776598870063j))
+            arg[0, 2, 2]+=(-0.832853209615+0.630726257316j)*x[2]**o+((0.697634376814-0.159423689827j))*x[2]
+            ref[0, 2, 2, 2]=(-0.832853209615+0.630726257316j)*o*x_ref[2]**(o-1)+((0.697634376814-0.159423689827j))
+            arg[0, 3, 0]+=(0.0685680250985-0.739758054394j)*x[2]**o+((-0.819387007279+0.560663687362j))*x[2]
+            ref[0, 3, 0, 2]=(0.0685680250985-0.739758054394j)*o*x_ref[2]**(o-1)+((-0.819387007279+0.560663687362j))
+            arg[0, 3, 1]+=(0.915470793255-0.118595194855j)*x[2]**o+((0.556224797004+0.191784813774j))*x[2]
+            ref[0, 3, 1, 2]=(0.915470793255-0.118595194855j)*o*x_ref[2]**(o-1)+((0.556224797004+0.191784813774j))
+            arg[0, 3, 2]+=(-0.00314897207549-0.508837174843j)*x[2]**o+((0.746832371357-0.0505837137662j))*x[2]
+            ref[0, 3, 2, 2]=(-0.00314897207549-0.508837174843j)*o*x_ref[2]**(o-1)+((0.746832371357-0.0505837137662j))
+            arg[1, 0, 0]+=(-0.377718695978-0.526847105278j)*x[2]**o+((-0.0231478579132-0.609578014293j))*x[2]
+            ref[1, 0, 0, 2]=(-0.377718695978-0.526847105278j)*o*x_ref[2]**(o-1)+((-0.0231478579132-0.609578014293j))
+            arg[1, 0, 1]+=(0.355792914999+0.359583097969j)*x[2]**o+((-0.0223995385949+0.914584512488j))*x[2]
+            ref[1, 0, 1, 2]=(0.355792914999+0.359583097969j)*o*x_ref[2]**(o-1)+((-0.0223995385949+0.914584512488j))
+            arg[1, 0, 2]+=(-0.75260991693-0.272107376398j)*x[2]**o+((0.666796400547-0.694706039504j))*x[2]
+            ref[1, 0, 2, 2]=(-0.75260991693-0.272107376398j)*o*x_ref[2]**(o-1)+((0.666796400547-0.694706039504j))
+            arg[1, 1, 0]+=(0.687021021067+0.0223090887296j)*x[2]**o+((-0.751020732874-0.62419565323j))*x[2]
+            ref[1, 1, 0, 2]=(0.687021021067+0.0223090887296j)*o*x_ref[2]**(o-1)+((-0.751020732874-0.62419565323j))
+            arg[1, 1, 1]+=(0.446568136072+0.304525533582j)*x[2]**o+((-0.810264345322-0.24192798029j))*x[2]
+            ref[1, 1, 1, 2]=(0.446568136072+0.304525533582j)*o*x_ref[2]**(o-1)+((-0.810264345322-0.24192798029j))
+            arg[1, 1, 2]+=(-0.49625103387+0.730587850854j)*x[2]**o+((-0.197812213232+0.594317817567j))*x[2]
+            ref[1, 1, 2, 2]=(-0.49625103387+0.730587850854j)*o*x_ref[2]**(o-1)+((-0.197812213232+0.594317817567j))
+            arg[1, 2, 0]+=(-0.889922499277+0.568203363884j)*x[2]**o+((-0.988952863486-0.462206439161j))*x[2]
+            ref[1, 2, 0, 2]=(-0.889922499277+0.568203363884j)*o*x_ref[2]**(o-1)+((-0.988952863486-0.462206439161j))
+            arg[1, 2, 1]+=(-0.685644181922-0.311007477822j)*x[2]**o+((-0.551705343525+0.686520333996j))*x[2]
+            ref[1, 2, 1, 2]=(-0.685644181922-0.311007477822j)*o*x_ref[2]**(o-1)+((-0.551705343525+0.686520333996j))
+            arg[1, 2, 2]+=(0.246748830112-0.249276341323j)*x[2]**o+((0.0215438361859-0.684749171137j))*x[2]
+            ref[1, 2, 2, 2]=(0.246748830112-0.249276341323j)*o*x_ref[2]**(o-1)+((0.0215438361859-0.684749171137j))
+            arg[1, 3, 0]+=(0.962126945727-0.433827405701j)*x[2]**o+((0.697463501724+0.232857741746j))*x[2]
+            ref[1, 3, 0, 2]=(0.962126945727-0.433827405701j)*o*x_ref[2]**(o-1)+((0.697463501724+0.232857741746j))
+            arg[1, 3, 1]+=(-0.89613054965-0.0676037628803j)*x[2]**o+((0.00994625478613-0.665670624015j))*x[2]
+            ref[1, 3, 1, 2]=(-0.89613054965-0.0676037628803j)*o*x_ref[2]**(o-1)+((0.00994625478613-0.665670624015j))
+            arg[1, 3, 2]+=(-0.523059273101-0.824871486859j)*x[2]**o+((0.332375340134-0.920313103015j))*x[2]
+            ref[1, 3, 2, 2]=(-0.523059273101-0.824871486859j)*o*x_ref[2]**(o-1)+((0.332375340134-0.920313103015j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.0796587626057-0.265868758046j)*x[0]**o+((-0.451747577068+0.891601883503j))*x[0]+((-0.767296803804+0.5857199557j))*x[1]**o+((-0.195738757371+0.456525432749j))*x[1]
+        ref[0]=(-0.0796587626057-0.265868758046j)*o*x_ref[0]**(o-1)+((-0.451747577068+0.891601883503j))
+        ref[1]=(-0.767296803804+0.5857199557j)*o*x_ref[1]**(o-1)+((-0.195738757371+0.456525432749j))
+        if dim==3:
+            arg+=((0.203905363904-0.266767393453j))*x[2]**o+((0.121190320936-0.997153159271j))*x[2]
+            ref[2]=(0.203905363904-0.266767393453j)*o*x_ref[2]**(o-1)+((0.121190320936-0.997153159271j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(0.201306743613-0.612532774331j)*x[0]**o+((-0.204305708097-0.70143659738j))*x[0]+((0.212898392552+0.094824216568j))*x[1]**o+((0.1958325331-0.665530865299j))*x[1]
+        ref[0, 0]=(0.201306743613-0.612532774331j)*o*x_ref[0]**(o-1)+((-0.204305708097-0.70143659738j))
+        ref[0, 1]=(0.212898392552+0.094824216568j)*o*x_ref[1]**(o-1)+((0.1958325331-0.665530865299j))
+        arg[1,]=(-0.862853874988-0.939740820632j)*x[0]**o+((0.0722069491807+0.511508631442j))*x[0]+((0.674896254273+0.885888036036j))*x[1]**o+((-0.437836648773+0.53279718288j))*x[1]
+        ref[1, 0]=(-0.862853874988-0.939740820632j)*o*x_ref[0]**(o-1)+((0.0722069491807+0.511508631442j))
+        ref[1, 1]=(0.674896254273+0.885888036036j)*o*x_ref[1]**(o-1)+((-0.437836648773+0.53279718288j))
+        arg[2,]=(-0.248977577997+0.490520297839j)*x[0]**o+((0.0452207224173+0.933066025971j))*x[0]+((-0.286505328672+0.886463934459j))*x[1]**o+((-0.109226895442-0.37822696448j))*x[1]
+        ref[2, 0]=(-0.248977577997+0.490520297839j)*o*x_ref[0]**(o-1)+((0.0452207224173+0.933066025971j))
+        ref[2, 1]=(-0.286505328672+0.886463934459j)*o*x_ref[1]**(o-1)+((-0.109226895442-0.37822696448j))
+        if dim==3:
+            arg[0,]+=(-0.807378489994+0.013780444822j)*x[2]**o+((0.598831449788-0.983507969647j))*x[2]
+            ref[0, 2]=(-0.807378489994+0.013780444822j)*o*x_ref[2]**(o-1)+((0.598831449788-0.983507969647j))
+            arg[1,]+=(-0.0128573396373+0.846692007924j)*x[2]**o+((0.214465753193-0.265808088162j))*x[2]
+            ref[1, 2]=(-0.0128573396373+0.846692007924j)*o*x_ref[2]**(o-1)+((0.214465753193-0.265808088162j))
+            arg[2,]+=(-0.281223573806+0.609319596765j)*x[2]**o+((-0.80778096645-0.831543572803j))*x[2]
+            ref[2, 2]=(-0.281223573806+0.609319596765j)*o*x_ref[2]**(o-1)+((-0.80778096645-0.831543572803j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.0720568095368-0.646670579857j)*x[0]**o+((0.602375230589+0.0631332247877j))*x[0]+((0.626824916592-0.959105033969j))*x[1]**o+((0.0886238314815-0.464127056901j))*x[1]
+        ref[0, 0, 0]=(-0.0720568095368-0.646670579857j)*o*x_ref[0]**(o-1)+((0.602375230589+0.0631332247877j))
+        ref[0, 0, 1]=(0.626824916592-0.959105033969j)*o*x_ref[1]**(o-1)+((0.0886238314815-0.464127056901j))
+        arg[0, 1]=(-0.553953659567+0.761339220842j)*x[0]**o+((-0.260221474477+0.0947897326054j))*x[0]+((0.916523659149+0.628463066875j))*x[1]**o+((0.387326255267+0.879765031316j))*x[1]
+        ref[0, 1, 0]=(-0.553953659567+0.761339220842j)*o*x_ref[0]**(o-1)+((-0.260221474477+0.0947897326054j))
+        ref[0, 1, 1]=(0.916523659149+0.628463066875j)*o*x_ref[1]**(o-1)+((0.387326255267+0.879765031316j))
+        arg[0, 2]=(-0.238804989379+0.390968169271j)*x[0]**o+((-0.156262792628+0.129110603752j))*x[0]+((-0.124770030315+0.592895316376j))*x[1]**o+((0.260013464011+0.912219077906j))*x[1]
+        ref[0, 2, 0]=(-0.238804989379+0.390968169271j)*o*x_ref[0]**(o-1)+((-0.156262792628+0.129110603752j))
+        ref[0, 2, 1]=(-0.124770030315+0.592895316376j)*o*x_ref[1]**(o-1)+((0.260013464011+0.912219077906j))
+        arg[0, 3]=(-0.295456225706-0.430734421295j)*x[0]**o+((0.140573828827-0.281006512643j))*x[0]+((-0.410988710031-0.531085145552j))*x[1]**o+((0.0425244833675+0.946002246207j))*x[1]
+        ref[0, 3, 0]=(-0.295456225706-0.430734421295j)*o*x_ref[0]**(o-1)+((0.140573828827-0.281006512643j))
+        ref[0, 3, 1]=(-0.410988710031-0.531085145552j)*o*x_ref[1]**(o-1)+((0.0425244833675+0.946002246207j))
+        arg[1, 0]=(0.679151610952+0.752324344859j)*x[0]**o+((-0.169447224941-0.62527173305j))*x[0]+((0.87527478022+0.839708179791j))*x[1]**o+((-0.532882317906-0.126913551661j))*x[1]
+        ref[1, 0, 0]=(0.679151610952+0.752324344859j)*o*x_ref[0]**(o-1)+((-0.169447224941-0.62527173305j))
+        ref[1, 0, 1]=(0.87527478022+0.839708179791j)*o*x_ref[1]**(o-1)+((-0.532882317906-0.126913551661j))
+        arg[1, 1]=(0.684348904647+0.296981076546j)*x[0]**o+((-0.317246185312+0.542009389971j))*x[0]+((0.372717027523-0.319983295507j))*x[1]**o+((-0.770103138256+0.14502510545j))*x[1]
+        ref[1, 1, 0]=(0.684348904647+0.296981076546j)*o*x_ref[0]**(o-1)+((-0.317246185312+0.542009389971j))
+        ref[1, 1, 1]=(0.372717027523-0.319983295507j)*o*x_ref[1]**(o-1)+((-0.770103138256+0.14502510545j))
+        arg[1, 2]=(-0.0957048898522-0.896073501087j)*x[0]**o+((-0.705781847987+0.46814919372j))*x[0]+((-0.904717502258-0.958788289995j))*x[1]**o+((-0.305303697915-0.38138773293j))*x[1]
+        ref[1, 2, 0]=(-0.0957048898522-0.896073501087j)*o*x_ref[0]**(o-1)+((-0.705781847987+0.46814919372j))
+        ref[1, 2, 1]=(-0.904717502258-0.958788289995j)*o*x_ref[1]**(o-1)+((-0.305303697915-0.38138773293j))
+        arg[1, 3]=(-0.951488669345-0.850545364533j)*x[0]**o+((-0.641524150098-0.584058500452j))*x[0]+((0.1776178347-0.153009337254j))*x[1]**o+((-0.511793080791-0.82629572475j))*x[1]
+        ref[1, 3, 0]=(-0.951488669345-0.850545364533j)*o*x_ref[0]**(o-1)+((-0.641524150098-0.584058500452j))
+        ref[1, 3, 1]=(0.1776178347-0.153009337254j)*o*x_ref[1]**(o-1)+((-0.511793080791-0.82629572475j))
+        arg[2, 0]=(0.39968180042+0.8087229587j)*x[0]**o+((0.916438061102-0.901067813306j))*x[0]+((-0.108856934254+0.706244440142j))*x[1]**o+((-0.858911700051-0.718614125535j))*x[1]
+        ref[2, 0, 0]=(0.39968180042+0.8087229587j)*o*x_ref[0]**(o-1)+((0.916438061102-0.901067813306j))
+        ref[2, 0, 1]=(-0.108856934254+0.706244440142j)*o*x_ref[1]**(o-1)+((-0.858911700051-0.718614125535j))
+        arg[2, 1]=(0.113269471306+0.627703460648j)*x[0]**o+((-0.0813822638783-0.541231906429j))*x[0]+((-0.689904575951-0.786026982979j))*x[1]**o+((-0.651822218968-0.886583830224j))*x[1]
+        ref[2, 1, 0]=(0.113269471306+0.627703460648j)*o*x_ref[0]**(o-1)+((-0.0813822638783-0.541231906429j))
+        ref[2, 1, 1]=(-0.689904575951-0.786026982979j)*o*x_ref[1]**(o-1)+((-0.651822218968-0.886583830224j))
+        arg[2, 2]=(-0.886083827825-0.330437554763j)*x[0]**o+((0.613412203096-0.372666382735j))*x[0]+((-0.176757399195+0.0490574925038j))*x[1]**o+((-0.0905581600327+0.203869420218j))*x[1]
+        ref[2, 2, 0]=(-0.886083827825-0.330437554763j)*o*x_ref[0]**(o-1)+((0.613412203096-0.372666382735j))
+        ref[2, 2, 1]=(-0.176757399195+0.0490574925038j)*o*x_ref[1]**(o-1)+((-0.0905581600327+0.203869420218j))
+        arg[2, 3]=(0.296939838912-0.19605432089j)*x[0]**o+((-0.678150865207-0.853282224191j))*x[0]+((0.231304715017-0.794844609563j))*x[1]**o+((0.599110092245-0.525920882232j))*x[1]
+        ref[2, 3, 0]=(0.296939838912-0.19605432089j)*o*x_ref[0]**(o-1)+((-0.678150865207-0.853282224191j))
+        ref[2, 3, 1]=(0.231304715017-0.794844609563j)*o*x_ref[1]**(o-1)+((0.599110092245-0.525920882232j))
+        if dim==3:
+            arg[0, 0]+=(-0.803892908508+0.0489032202926j)*x[2]**o+((-0.388040079799-0.260457839045j))*x[2]
+            ref[0, 0, 2]=(-0.803892908508+0.0489032202926j)*o*x_ref[2]**(o-1)+((-0.388040079799-0.260457839045j))
+            arg[0, 1]+=(-0.681550090044+0.443814376618j)*x[2]**o+((0.327763957925+0.100557460089j))*x[2]
+            ref[0, 1, 2]=(-0.681550090044+0.443814376618j)*o*x_ref[2]**(o-1)+((0.327763957925+0.100557460089j))
+            arg[0, 2]+=(-0.558404271+0.201131640328j)*x[2]**o+((0.515170389531+0.182955800275j))*x[2]
+            ref[0, 2, 2]=(-0.558404271+0.201131640328j)*o*x_ref[2]**(o-1)+((0.515170389531+0.182955800275j))
+            arg[0, 3]+=(-0.682960917762+0.875465615597j)*x[2]**o+((0.706803884405-0.874601218771j))*x[2]
+            ref[0, 3, 2]=(-0.682960917762+0.875465615597j)*o*x_ref[2]**(o-1)+((0.706803884405-0.874601218771j))
+            arg[1, 0]+=(-0.245817617262-0.919491793386j)*x[2]**o+((-0.326813976424+0.494174596178j))*x[2]
+            ref[1, 0, 2]=(-0.245817617262-0.919491793386j)*o*x_ref[2]**(o-1)+((-0.326813976424+0.494174596178j))
+            arg[1, 1]+=(0.386669055239+0.795094100885j)*x[2]**o+((-0.550221682302+0.0255384294161j))*x[2]
+            ref[1, 1, 2]=(0.386669055239+0.795094100885j)*o*x_ref[2]**(o-1)+((-0.550221682302+0.0255384294161j))
+            arg[1, 2]+=(0.883679901916-0.609626268127j)*x[2]**o+((0.990102623896-0.48660402885j))*x[2]
+            ref[1, 2, 2]=(0.883679901916-0.609626268127j)*o*x_ref[2]**(o-1)+((0.990102623896-0.48660402885j))
+            arg[1, 3]+=(0.146162567848+0.555061002164j)*x[2]**o+((-0.9803815589+0.38771788493j))*x[2]
+            ref[1, 3, 2]=(0.146162567848+0.555061002164j)*o*x_ref[2]**(o-1)+((-0.9803815589+0.38771788493j))
+            arg[2, 0]+=(-0.324379616876+0.0335771582878j)*x[2]**o+((-0.784511570383-0.620402998982j))*x[2]
+            ref[2, 0, 2]=(-0.324379616876+0.0335771582878j)*o*x_ref[2]**(o-1)+((-0.784511570383-0.620402998982j))
+            arg[2, 1]+=(0.360654937611+0.123618830511j)*x[2]**o+((0.187148122061+0.366871788326j))*x[2]
+            ref[2, 1, 2]=(0.360654937611+0.123618830511j)*o*x_ref[2]**(o-1)+((0.187148122061+0.366871788326j))
+            arg[2, 2]+=(-0.114386156873+0.335028689862j)*x[2]**o+((-0.0857038206927+0.549958505488j))*x[2]
+            ref[2, 2, 2]=(-0.114386156873+0.335028689862j)*o*x_ref[2]**(o-1)+((-0.0857038206927+0.549958505488j))
+            arg[2, 3]+=(-0.586837647955-0.157037978786j)*x[2]**o+((0.932957586328+0.544491864566j))*x[2]
+            ref[2, 3, 2]=(-0.586837647955-0.157037978786j)*o*x_ref[2]**(o-1)+((0.932957586328+0.544491864566j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2),w)
+        ref = Data(0,(4, 2, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.487094933057-0.252103871619j)*x[0]**o+((-0.745477030858+0.667944276165j))*x[0]+((-0.0682151984309+0.465637389201j))*x[1]**o+((0.888653353811+0.0209267542944j))*x[1]
+        ref[0, 0, 0, 0]=(-0.487094933057-0.252103871619j)*o*x_ref[0]**(o-1)+((-0.745477030858+0.667944276165j))
+        ref[0, 0, 0, 1]=(-0.0682151984309+0.465637389201j)*o*x_ref[1]**(o-1)+((0.888653353811+0.0209267542944j))
+        arg[0, 0, 1]=(-0.848733960473-0.296172236188j)*x[0]**o+((-0.807242288726-0.593720266228j))*x[0]+((-0.693433030299-0.0520663627863j))*x[1]**o+((-0.547399346731+0.488848492224j))*x[1]
+        ref[0, 0, 1, 0]=(-0.848733960473-0.296172236188j)*o*x_ref[0]**(o-1)+((-0.807242288726-0.593720266228j))
+        ref[0, 0, 1, 1]=(-0.693433030299-0.0520663627863j)*o*x_ref[1]**(o-1)+((-0.547399346731+0.488848492224j))
+        arg[0, 1, 0]=(-0.47714505255+0.897078276361j)*x[0]**o+((0.992785727726-0.757597256183j))*x[0]+((0.878866093707+0.275226765494j))*x[1]**o+((-0.600131842692+0.0359087632548j))*x[1]
+        ref[0, 1, 0, 0]=(-0.47714505255+0.897078276361j)*o*x_ref[0]**(o-1)+((0.992785727726-0.757597256183j))
+        ref[0, 1, 0, 1]=(0.878866093707+0.275226765494j)*o*x_ref[1]**(o-1)+((-0.600131842692+0.0359087632548j))
+        arg[0, 1, 1]=(0.641309072956-0.452732228202j)*x[0]**o+((-0.392180539273+0.767069464788j))*x[0]+((0.529558430089-0.737462092265j))*x[1]**o+((-0.371885801157+0.864765713625j))*x[1]
+        ref[0, 1, 1, 0]=(0.641309072956-0.452732228202j)*o*x_ref[0]**(o-1)+((-0.392180539273+0.767069464788j))
+        ref[0, 1, 1, 1]=(0.529558430089-0.737462092265j)*o*x_ref[1]**(o-1)+((-0.371885801157+0.864765713625j))
+        arg[1, 0, 0]=(0.52327795772+0.266723128485j)*x[0]**o+((0.877452906187+0.541122224532j))*x[0]+((-0.451959741147+0.698976395961j))*x[1]**o+((-0.0932563848823-0.125885481746j))*x[1]
+        ref[1, 0, 0, 0]=(0.52327795772+0.266723128485j)*o*x_ref[0]**(o-1)+((0.877452906187+0.541122224532j))
+        ref[1, 0, 0, 1]=(-0.451959741147+0.698976395961j)*o*x_ref[1]**(o-1)+((-0.0932563848823-0.125885481746j))
+        arg[1, 0, 1]=(-0.713203668019-0.334536381585j)*x[0]**o+((-0.610240269584+0.347147816905j))*x[0]+((0.840154748086-0.513540576057j))*x[1]**o+((0.0857689654088-0.0361518591369j))*x[1]
+        ref[1, 0, 1, 0]=(-0.713203668019-0.334536381585j)*o*x_ref[0]**(o-1)+((-0.610240269584+0.347147816905j))
+        ref[1, 0, 1, 1]=(0.840154748086-0.513540576057j)*o*x_ref[1]**(o-1)+((0.0857689654088-0.0361518591369j))
+        arg[1, 1, 0]=(0.186842062885+0.87110128235j)*x[0]**o+((-0.259417137694-0.241763907442j))*x[0]+((-0.381077807275+0.0545560509106j))*x[1]**o+((-0.682315828483-0.53550881827j))*x[1]
+        ref[1, 1, 0, 0]=(0.186842062885+0.87110128235j)*o*x_ref[0]**(o-1)+((-0.259417137694-0.241763907442j))
+        ref[1, 1, 0, 1]=(-0.381077807275+0.0545560509106j)*o*x_ref[1]**(o-1)+((-0.682315828483-0.53550881827j))
+        arg[1, 1, 1]=(0.994304127682-0.539595127942j)*x[0]**o+((-0.0894207439214-0.439795238469j))*x[0]+((-0.336962784111+0.942727304706j))*x[1]**o+((0.535881348658-0.531484505762j))*x[1]
+        ref[1, 1, 1, 0]=(0.994304127682-0.539595127942j)*o*x_ref[0]**(o-1)+((-0.0894207439214-0.439795238469j))
+        ref[1, 1, 1, 1]=(-0.336962784111+0.942727304706j)*o*x_ref[1]**(o-1)+((0.535881348658-0.531484505762j))
+        arg[2, 0, 0]=(-0.0445419324672+0.851678980722j)*x[0]**o+((-0.792540040141-0.278526037611j))*x[0]+((-0.598711142452-0.297622780097j))*x[1]**o+((0.857174328656+0.494724775548j))*x[1]
+        ref[2, 0, 0, 0]=(-0.0445419324672+0.851678980722j)*o*x_ref[0]**(o-1)+((-0.792540040141-0.278526037611j))
+        ref[2, 0, 0, 1]=(-0.598711142452-0.297622780097j)*o*x_ref[1]**(o-1)+((0.857174328656+0.494724775548j))
+        arg[2, 0, 1]=(-0.303042125199-0.79318205319j)*x[0]**o+((-0.997142395497+0.896731713595j))*x[0]+((0.0670725411258+0.947887216331j))*x[1]**o+((-0.512517531672-0.703746382517j))*x[1]
+        ref[2, 0, 1, 0]=(-0.303042125199-0.79318205319j)*o*x_ref[0]**(o-1)+((-0.997142395497+0.896731713595j))
+        ref[2, 0, 1, 1]=(0.0670725411258+0.947887216331j)*o*x_ref[1]**(o-1)+((-0.512517531672-0.703746382517j))
+        arg[2, 1, 0]=(0.01926463145-0.990967885299j)*x[0]**o+((0.513730195704-0.177205255872j))*x[0]+((-0.691160252136+0.53391926824j))*x[1]**o+((0.707804892018-0.355751565312j))*x[1]
+        ref[2, 1, 0, 0]=(0.01926463145-0.990967885299j)*o*x_ref[0]**(o-1)+((0.513730195704-0.177205255872j))
+        ref[2, 1, 0, 1]=(-0.691160252136+0.53391926824j)*o*x_ref[1]**(o-1)+((0.707804892018-0.355751565312j))
+        arg[2, 1, 1]=(0.99863208717-0.364286879888j)*x[0]**o+((-0.669101406772+0.883766215443j))*x[0]+((0.790786346841+0.220054254106j))*x[1]**o+((0.421639101551-0.262052071221j))*x[1]
+        ref[2, 1, 1, 0]=(0.99863208717-0.364286879888j)*o*x_ref[0]**(o-1)+((-0.669101406772+0.883766215443j))
+        ref[2, 1, 1, 1]=(0.790786346841+0.220054254106j)*o*x_ref[1]**(o-1)+((0.421639101551-0.262052071221j))
+        arg[3, 0, 0]=(-0.254448135275-0.655525360757j)*x[0]**o+((0.661448581061-0.846286882101j))*x[0]+((-0.404089751189-0.759842457143j))*x[1]**o+((0.0649770959136-0.653112155272j))*x[1]
+        ref[3, 0, 0, 0]=(-0.254448135275-0.655525360757j)*o*x_ref[0]**(o-1)+((0.661448581061-0.846286882101j))
+        ref[3, 0, 0, 1]=(-0.404089751189-0.759842457143j)*o*x_ref[1]**(o-1)+((0.0649770959136-0.653112155272j))
+        arg[3, 0, 1]=(0.137041011156-0.512416634249j)*x[0]**o+((0.994538536365-0.821142427435j))*x[0]+((-0.0969158813022+0.1351388886j))*x[1]**o+((0.202474592633+0.852003741186j))*x[1]
+        ref[3, 0, 1, 0]=(0.137041011156-0.512416634249j)*o*x_ref[0]**(o-1)+((0.994538536365-0.821142427435j))
+        ref[3, 0, 1, 1]=(-0.0969158813022+0.1351388886j)*o*x_ref[1]**(o-1)+((0.202474592633+0.852003741186j))
+        arg[3, 1, 0]=(-0.197373238079-0.335069641975j)*x[0]**o+((-0.207264262086+0.405145650104j))*x[0]+((0.924028073961+0.536045047679j))*x[1]**o+((0.42883166151+0.169425585465j))*x[1]
+        ref[3, 1, 0, 0]=(-0.197373238079-0.335069641975j)*o*x_ref[0]**(o-1)+((-0.207264262086+0.405145650104j))
+        ref[3, 1, 0, 1]=(0.924028073961+0.536045047679j)*o*x_ref[1]**(o-1)+((0.42883166151+0.169425585465j))
+        arg[3, 1, 1]=(-0.368768179159+0.426431518475j)*x[0]**o+((-0.161421845543-0.487202907092j))*x[0]+((-0.43544316043+0.681074055684j))*x[1]**o+((-0.518678440603-0.507741763899j))*x[1]
+        ref[3, 1, 1, 0]=(-0.368768179159+0.426431518475j)*o*x_ref[0]**(o-1)+((-0.161421845543-0.487202907092j))
+        ref[3, 1, 1, 1]=(-0.43544316043+0.681074055684j)*o*x_ref[1]**(o-1)+((-0.518678440603-0.507741763899j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.289105667668+0.57232492275j)*x[2]**o+((0.508142706768-0.438122145859j))*x[2]
+            ref[0, 0, 0, 2]=(-0.289105667668+0.57232492275j)*o*x_ref[2]**(o-1)+((0.508142706768-0.438122145859j))
+            arg[0, 0, 1]+=(0.68223635658-0.0750831970474j)*x[2]**o+((0.441864103265+0.30007200463j))*x[2]
+            ref[0, 0, 1, 2]=(0.68223635658-0.0750831970474j)*o*x_ref[2]**(o-1)+((0.441864103265+0.30007200463j))
+            arg[0, 1, 0]+=(0.376888383496-0.971061337234j)*x[2]**o+((-0.23338772323+0.837593658232j))*x[2]
+            ref[0, 1, 0, 2]=(0.376888383496-0.971061337234j)*o*x_ref[2]**(o-1)+((-0.23338772323+0.837593658232j))
+            arg[0, 1, 1]+=(0.722320470275-0.867213760569j)*x[2]**o+((0.920990940013+0.117968473315j))*x[2]
+            ref[0, 1, 1, 2]=(0.722320470275-0.867213760569j)*o*x_ref[2]**(o-1)+((0.920990940013+0.117968473315j))
+            arg[1, 0, 0]+=(-0.635987991973+0.0248747398904j)*x[2]**o+((0.204593810609-0.906304603279j))*x[2]
+            ref[1, 0, 0, 2]=(-0.635987991973+0.0248747398904j)*o*x_ref[2]**(o-1)+((0.204593810609-0.906304603279j))
+            arg[1, 0, 1]+=(0.498407751838-0.0396043252771j)*x[2]**o+((-0.539415848248+0.194695197553j))*x[2]
+            ref[1, 0, 1, 2]=(0.498407751838-0.0396043252771j)*o*x_ref[2]**(o-1)+((-0.539415848248+0.194695197553j))
+            arg[1, 1, 0]+=(0.921415625859-0.00797615144579j)*x[2]**o+((-0.154349102061+0.273164906237j))*x[2]
+            ref[1, 1, 0, 2]=(0.921415625859-0.00797615144579j)*o*x_ref[2]**(o-1)+((-0.154349102061+0.273164906237j))
+            arg[1, 1, 1]+=(-0.491523437501-0.684687081408j)*x[2]**o+((0.810459134362-0.632165263521j))*x[2]
+            ref[1, 1, 1, 2]=(-0.491523437501-0.684687081408j)*o*x_ref[2]**(o-1)+((0.810459134362-0.632165263521j))
+            arg[2, 0, 0]+=(-0.903279322768+0.185922891434j)*x[2]**o+((-0.998088830564+0.407433720455j))*x[2]
+            ref[2, 0, 0, 2]=(-0.903279322768+0.185922891434j)*o*x_ref[2]**(o-1)+((-0.998088830564+0.407433720455j))
+            arg[2, 0, 1]+=(0.393596699876-0.145221455836j)*x[2]**o+((-0.53979634469-0.210246925287j))*x[2]
+            ref[2, 0, 1, 2]=(0.393596699876-0.145221455836j)*o*x_ref[2]**(o-1)+((-0.53979634469-0.210246925287j))
+            arg[2, 1, 0]+=(0.902728582057-0.84463072432j)*x[2]**o+((0.862750089398-0.596268409091j))*x[2]
+            ref[2, 1, 0, 2]=(0.902728582057-0.84463072432j)*o*x_ref[2]**(o-1)+((0.862750089398-0.596268409091j))
+            arg[2, 1, 1]+=(0.389087134192-0.293597358787j)*x[2]**o+((0.06238289741-0.1797091042j))*x[2]
+            ref[2, 1, 1, 2]=(0.389087134192-0.293597358787j)*o*x_ref[2]**(o-1)+((0.06238289741-0.1797091042j))
+            arg[3, 0, 0]+=(-0.0936132003633+0.328816475631j)*x[2]**o+((-0.983231860099-0.724787379049j))*x[2]
+            ref[3, 0, 0, 2]=(-0.0936132003633+0.328816475631j)*o*x_ref[2]**(o-1)+((-0.983231860099-0.724787379049j))
+            arg[3, 0, 1]+=(-0.401999025956+0.108215813531j)*x[2]**o+((-0.0447740634564-0.189886005779j))*x[2]
+            ref[3, 0, 1, 2]=(-0.401999025956+0.108215813531j)*o*x_ref[2]**(o-1)+((-0.0447740634564-0.189886005779j))
+            arg[3, 1, 0]+=(-0.156906874809+0.268448361403j)*x[2]**o+((-0.618143029537+0.269041399781j))*x[2]
+            ref[3, 1, 0, 2]=(-0.156906874809+0.268448361403j)*o*x_ref[2]**(o-1)+((-0.618143029537+0.269041399781j))
+            arg[3, 1, 1]+=(-0.704206178089+0.7778702086j)*x[2]**o+((-0.254114834781-0.674387808896j))*x[2]
+            ref[3, 1, 1, 2]=(-0.704206178089+0.7778702086j)*o*x_ref[2]**(o-1)+((-0.254114834781-0.674387808896j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.354635914456+0.859546352125j)*x[0]+((0.718056215127+0.924873803027j))*x[1]
+        ref[0]=(-0.354635914456+0.859546352125j)
+        ref[1]=(0.718056215127+0.924873803027j)
+        if dim==3:
+            arg+=((0.30621457076+0.206998401648j))*x[2]
+            ref[2]=(0.30621457076+0.206998401648j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(0.700391923494-0.274381324435j)*x[0]+((-0.895754111055+0.5236744156j))*x[1]
+        ref[0, 0]=(0.700391923494-0.274381324435j)
+        ref[0, 1]=(-0.895754111055+0.5236744156j)
+        arg[1,]=(-0.652254350627-0.976716709706j)*x[0]+((0.228234537881-0.157115399267j))*x[1]
+        ref[1, 0]=(-0.652254350627-0.976716709706j)
+        ref[1, 1]=(0.228234537881-0.157115399267j)
+        if dim==3:
+            arg[0,]+=(0.378316057133-0.940449224323j)*x[2]
+            ref[0, 2]=(0.378316057133-0.940449224323j)
+            arg[1,]+=(-0.479772353939+0.0656880114768j)*x[2]
+            ref[1, 2]=(-0.479772353939+0.0656880114768j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=(0.0505999972447+0.487396800897j)*x[0]+((0.476185146399+0.157350648796j))*x[1]
+        ref[0, 0, 0]=(0.0505999972447+0.487396800897j)
+        ref[0, 0, 1]=(0.476185146399+0.157350648796j)
+        arg[0, 1]=(-0.440376760295+0.825894266457j)*x[0]+((0.669268519911+0.680243806807j))*x[1]
+        ref[0, 1, 0]=(-0.440376760295+0.825894266457j)
+        ref[0, 1, 1]=(0.669268519911+0.680243806807j)
+        arg[0, 2]=(-0.144309049034+0.0481974873293j)*x[0]+((-0.086973510846-0.342820130583j))*x[1]
+        ref[0, 2, 0]=(-0.144309049034+0.0481974873293j)
+        ref[0, 2, 1]=(-0.086973510846-0.342820130583j)
+        arg[1, 0]=(-0.268514488606+0.137771019068j)*x[0]+((0.58261053121-0.394041821795j))*x[1]
+        ref[1, 0, 0]=(-0.268514488606+0.137771019068j)
+        ref[1, 0, 1]=(0.58261053121-0.394041821795j)
+        arg[1, 1]=(-0.727272642756+0.425375555991j)*x[0]+((-0.854420767122-0.94076765872j))*x[1]
+        ref[1, 1, 0]=(-0.727272642756+0.425375555991j)
+        ref[1, 1, 1]=(-0.854420767122-0.94076765872j)
+        arg[1, 2]=(0.0483648031444-0.301810847896j)*x[0]+((0.132915885592+0.496737710312j))*x[1]
+        ref[1, 2, 0]=(0.0483648031444-0.301810847896j)
+        ref[1, 2, 1]=(0.132915885592+0.496737710312j)
+        arg[2, 0]=(0.308444140035+0.383181931722j)*x[0]+((0.0456941760156+0.897344594777j))*x[1]
+        ref[2, 0, 0]=(0.308444140035+0.383181931722j)
+        ref[2, 0, 1]=(0.0456941760156+0.897344594777j)
+        arg[2, 1]=(-0.501560926775-0.662909033585j)*x[0]+((-0.538246542283+0.846344798317j))*x[1]
+        ref[2, 1, 0]=(-0.501560926775-0.662909033585j)
+        ref[2, 1, 1]=(-0.538246542283+0.846344798317j)
+        arg[2, 2]=(-0.442303950174-0.22454674108j)*x[0]+((-0.391167949173-0.746423777153j))*x[1]
+        ref[2, 2, 0]=(-0.442303950174-0.22454674108j)
+        ref[2, 2, 1]=(-0.391167949173-0.746423777153j)
+        arg[3, 0]=(-0.868676351331-0.782658127882j)*x[0]+((0.870173452006-0.0441653464923j))*x[1]
+        ref[3, 0, 0]=(-0.868676351331-0.782658127882j)
+        ref[3, 0, 1]=(0.870173452006-0.0441653464923j)
+        arg[3, 1]=(0.00325447682944-0.370990862165j)*x[0]+((0.404565955083+0.59622684438j))*x[1]
+        ref[3, 1, 0]=(0.00325447682944-0.370990862165j)
+        ref[3, 1, 1]=(0.404565955083+0.59622684438j)
+        arg[3, 2]=(-0.909376585977-0.217911317998j)*x[0]+((0.723838950072+0.896746561383j))*x[1]
+        ref[3, 2, 0]=(-0.909376585977-0.217911317998j)
+        ref[3, 2, 1]=(0.723838950072+0.896746561383j)
+        if dim==3:
+            arg[0, 0]+=(0.077070962989+0.659053282472j)*x[2]
+            ref[0, 0, 2]=(0.077070962989+0.659053282472j)
+            arg[0, 1]+=(-0.830171227869+0.00256472350496j)*x[2]
+            ref[0, 1, 2]=(-0.830171227869+0.00256472350496j)
+            arg[0, 2]+=(-0.615052629429+0.802297666308j)*x[2]
+            ref[0, 2, 2]=(-0.615052629429+0.802297666308j)
+            arg[1, 0]+=(0.695294649278+0.700420022782j)*x[2]
+            ref[1, 0, 2]=(0.695294649278+0.700420022782j)
+            arg[1, 1]+=(-0.816949021838+0.796533413441j)*x[2]
+            ref[1, 1, 2]=(-0.816949021838+0.796533413441j)
+            arg[1, 2]+=(-0.164267317826+0.833929486906j)*x[2]
+            ref[1, 2, 2]=(-0.164267317826+0.833929486906j)
+            arg[2, 0]+=(-0.630098065839+0.0483961969486j)*x[2]
+            ref[2, 0, 2]=(-0.630098065839+0.0483961969486j)
+            arg[2, 1]+=(-0.518415823427+0.878609619952j)*x[2]
+            ref[2, 1, 2]=(-0.518415823427+0.878609619952j)
+            arg[2, 2]+=(0.926704462615-0.996861468354j)*x[2]
+            ref[2, 2, 2]=(0.926704462615-0.996861468354j)
+            arg[3, 0]+=(-0.814081312544-0.937618963472j)*x[2]
+            ref[3, 0, 2]=(-0.814081312544-0.937618963472j)
+            arg[3, 1]+=(-0.465250416275-0.173583164942j)*x[2]
+            ref[3, 1, 2]=(-0.465250416275-0.173583164942j)
+            arg[3, 2]+=(0.183237191102+0.0183513939043j)*x[2]
+            ref[3, 2, 2]=(0.183237191102+0.0183513939043j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2),w)
+        ref = Data(0,(3, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.634998021609-0.766822015956j)*x[0]+((-0.54886528939+0.707744875345j))*x[1]
+        ref[0, 0, 0, 0]=(0.634998021609-0.766822015956j)
+        ref[0, 0, 0, 1]=(-0.54886528939+0.707744875345j)
+        arg[0, 0, 1]=(0.486187690167-0.63259229135j)*x[0]+((0.222278503414+0.422976629137j))*x[1]
+        ref[0, 0, 1, 0]=(0.486187690167-0.63259229135j)
+        ref[0, 0, 1, 1]=(0.222278503414+0.422976629137j)
+        arg[0, 1, 0]=(-0.407612969908-0.478189605989j)*x[0]+((-0.538207684641-0.904810174576j))*x[1]
+        ref[0, 1, 0, 0]=(-0.407612969908-0.478189605989j)
+        ref[0, 1, 0, 1]=(-0.538207684641-0.904810174576j)
+        arg[0, 1, 1]=(0.896959968092+0.677077526955j)*x[0]+((0.529875463706-0.540187579854j))*x[1]
+        ref[0, 1, 1, 0]=(0.896959968092+0.677077526955j)
+        ref[0, 1, 1, 1]=(0.529875463706-0.540187579854j)
+        arg[0, 2, 0]=(0.143022684963+0.191627425862j)*x[0]+((0.697134368953+0.0252658842402j))*x[1]
+        ref[0, 2, 0, 0]=(0.143022684963+0.191627425862j)
+        ref[0, 2, 0, 1]=(0.697134368953+0.0252658842402j)
+        arg[0, 2, 1]=(0.510015802357+0.539925843085j)*x[0]+((0.564438036788+0.68572434421j))*x[1]
+        ref[0, 2, 1, 0]=(0.510015802357+0.539925843085j)
+        ref[0, 2, 1, 1]=(0.564438036788+0.68572434421j)
+        arg[0, 3, 0]=(-0.748679717878+0.471017765979j)*x[0]+((-0.386954058286-0.823611093822j))*x[1]
+        ref[0, 3, 0, 0]=(-0.748679717878+0.471017765979j)
+        ref[0, 3, 0, 1]=(-0.386954058286-0.823611093822j)
+        arg[0, 3, 1]=(-0.987030731889+0.196788441872j)*x[0]+((0.483562202852+0.328288632644j))*x[1]
+        ref[0, 3, 1, 0]=(-0.987030731889+0.196788441872j)
+        ref[0, 3, 1, 1]=(0.483562202852+0.328288632644j)
+        arg[1, 0, 0]=(0.809110844546-0.459611692106j)*x[0]+((0.849253527112-0.651002546217j))*x[1]
+        ref[1, 0, 0, 0]=(0.809110844546-0.459611692106j)
+        ref[1, 0, 0, 1]=(0.849253527112-0.651002546217j)
+        arg[1, 0, 1]=(-0.386984271529-0.851112469582j)*x[0]+((0.72146187331-0.472386313839j))*x[1]
+        ref[1, 0, 1, 0]=(-0.386984271529-0.851112469582j)
+        ref[1, 0, 1, 1]=(0.72146187331-0.472386313839j)
+        arg[1, 1, 0]=(-0.343755756621-0.193851953488j)*x[0]+((0.00998192804603-0.38407119432j))*x[1]
+        ref[1, 1, 0, 0]=(-0.343755756621-0.193851953488j)
+        ref[1, 1, 0, 1]=(0.00998192804603-0.38407119432j)
+        arg[1, 1, 1]=(-0.608564691922-0.95910308416j)*x[0]+((-0.996863626738+0.260709730379j))*x[1]
+        ref[1, 1, 1, 0]=(-0.608564691922-0.95910308416j)
+        ref[1, 1, 1, 1]=(-0.996863626738+0.260709730379j)
+        arg[1, 2, 0]=(0.537132159856+0.454524871089j)*x[0]+((0.438575772574+0.270383608978j))*x[1]
+        ref[1, 2, 0, 0]=(0.537132159856+0.454524871089j)
+        ref[1, 2, 0, 1]=(0.438575772574+0.270383608978j)
+        arg[1, 2, 1]=(-0.117544142729-0.555957980988j)*x[0]+((0.355193041203+0.445021372968j))*x[1]
+        ref[1, 2, 1, 0]=(-0.117544142729-0.555957980988j)
+        ref[1, 2, 1, 1]=(0.355193041203+0.445021372968j)
+        arg[1, 3, 0]=(0.15511801186+0.0443492976276j)*x[0]+((-0.980585010055-0.306165547413j))*x[1]
+        ref[1, 3, 0, 0]=(0.15511801186+0.0443492976276j)
+        ref[1, 3, 0, 1]=(-0.980585010055-0.306165547413j)
+        arg[1, 3, 1]=(0.563434059453+0.053705347468j)*x[0]+((0.279637646324+0.748815152857j))*x[1]
+        ref[1, 3, 1, 0]=(0.563434059453+0.053705347468j)
+        ref[1, 3, 1, 1]=(0.279637646324+0.748815152857j)
+        arg[2, 0, 0]=(0.857440650121+0.0516482287367j)*x[0]+((0.42518571949-0.594588549749j))*x[1]
+        ref[2, 0, 0, 0]=(0.857440650121+0.0516482287367j)
+        ref[2, 0, 0, 1]=(0.42518571949-0.594588549749j)
+        arg[2, 0, 1]=(-0.716690266193+0.846526011236j)*x[0]+((0.501397715903-0.91139668077j))*x[1]
+        ref[2, 0, 1, 0]=(-0.716690266193+0.846526011236j)
+        ref[2, 0, 1, 1]=(0.501397715903-0.91139668077j)
+        arg[2, 1, 0]=(-0.919384699272+0.168997095494j)*x[0]+((-0.702124992574+0.735903650831j))*x[1]
+        ref[2, 1, 0, 0]=(-0.919384699272+0.168997095494j)
+        ref[2, 1, 0, 1]=(-0.702124992574+0.735903650831j)
+        arg[2, 1, 1]=(0.229368768257-0.303965768008j)*x[0]+((0.675969651246-0.367386145701j))*x[1]
+        ref[2, 1, 1, 0]=(0.229368768257-0.303965768008j)
+        ref[2, 1, 1, 1]=(0.675969651246-0.367386145701j)
+        arg[2, 2, 0]=(0.931626779456-0.839386284018j)*x[0]+((-0.755634992604+0.87478760879j))*x[1]
+        ref[2, 2, 0, 0]=(0.931626779456-0.839386284018j)
+        ref[2, 2, 0, 1]=(-0.755634992604+0.87478760879j)
+        arg[2, 2, 1]=(0.0490568052272+0.71154384317j)*x[0]+((-0.309711309216-0.623273428668j))*x[1]
+        ref[2, 2, 1, 0]=(0.0490568052272+0.71154384317j)
+        ref[2, 2, 1, 1]=(-0.309711309216-0.623273428668j)
+        arg[2, 3, 0]=(-0.920213390358+0.593469718692j)*x[0]+((-0.470979044925+0.88184046006j))*x[1]
+        ref[2, 3, 0, 0]=(-0.920213390358+0.593469718692j)
+        ref[2, 3, 0, 1]=(-0.470979044925+0.88184046006j)
+        arg[2, 3, 1]=(0.810312198206+0.612264828172j)*x[0]+((0.371148434417-0.0354436886991j))*x[1]
+        ref[2, 3, 1, 0]=(0.810312198206+0.612264828172j)
+        ref[2, 3, 1, 1]=(0.371148434417-0.0354436886991j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.86782968994-0.684306050454j)*x[2]
+            ref[0, 0, 0, 2]=(0.86782968994-0.684306050454j)
+            arg[0, 0, 1]+=(0.561235697448+0.462237459077j)*x[2]
+            ref[0, 0, 1, 2]=(0.561235697448+0.462237459077j)
+            arg[0, 1, 0]+=(0.00553293116804-0.806631996682j)*x[2]
+            ref[0, 1, 0, 2]=(0.00553293116804-0.806631996682j)
+            arg[0, 1, 1]+=(-0.553200649605-0.86703547324j)*x[2]
+            ref[0, 1, 1, 2]=(-0.553200649605-0.86703547324j)
+            arg[0, 2, 0]+=(-0.252000218321-0.0452245645595j)*x[2]
+            ref[0, 2, 0, 2]=(-0.252000218321-0.0452245645595j)
+            arg[0, 2, 1]+=(0.281746402602+0.629291154842j)*x[2]
+            ref[0, 2, 1, 2]=(0.281746402602+0.629291154842j)
+            arg[0, 3, 0]+=(0.501382586674-0.616944349919j)*x[2]
+            ref[0, 3, 0, 2]=(0.501382586674-0.616944349919j)
+            arg[0, 3, 1]+=(0.404830971996+0.0134230705565j)*x[2]
+            ref[0, 3, 1, 2]=(0.404830971996+0.0134230705565j)
+            arg[1, 0, 0]+=(0.397876327971-0.16257044245j)*x[2]
+            ref[1, 0, 0, 2]=(0.397876327971-0.16257044245j)
+            arg[1, 0, 1]+=(-0.143743464908+0.6247669042j)*x[2]
+            ref[1, 0, 1, 2]=(-0.143743464908+0.6247669042j)
+            arg[1, 1, 0]+=(-0.46672629226+0.488699580473j)*x[2]
+            ref[1, 1, 0, 2]=(-0.46672629226+0.488699580473j)
+            arg[1, 1, 1]+=(-0.903708040344+0.584354246306j)*x[2]
+            ref[1, 1, 1, 2]=(-0.903708040344+0.584354246306j)
+            arg[1, 2, 0]+=(0.0164232871037-0.380058947002j)*x[2]
+            ref[1, 2, 0, 2]=(0.0164232871037-0.380058947002j)
+            arg[1, 2, 1]+=(-0.71040266838+0.114370134499j)*x[2]
+            ref[1, 2, 1, 2]=(-0.71040266838+0.114370134499j)
+            arg[1, 3, 0]+=(-0.450757657542-0.118182756152j)*x[2]
+            ref[1, 3, 0, 2]=(-0.450757657542-0.118182756152j)
+            arg[1, 3, 1]+=(0.917608624913-0.270217824338j)*x[2]
+            ref[1, 3, 1, 2]=(0.917608624913-0.270217824338j)
+            arg[2, 0, 0]+=(0.206928065134+0.256696143385j)*x[2]
+            ref[2, 0, 0, 2]=(0.206928065134+0.256696143385j)
+            arg[2, 0, 1]+=(0.292157721928-0.641551427492j)*x[2]
+            ref[2, 0, 1, 2]=(0.292157721928-0.641551427492j)
+            arg[2, 1, 0]+=(0.356731147-0.250900956454j)*x[2]
+            ref[2, 1, 0, 2]=(0.356731147-0.250900956454j)
+            arg[2, 1, 1]+=(0.279991446515+0.948855917231j)*x[2]
+            ref[2, 1, 1, 2]=(0.279991446515+0.948855917231j)
+            arg[2, 2, 0]+=(-0.252146701348-0.249593191169j)*x[2]
+            ref[2, 2, 0, 2]=(-0.252146701348-0.249593191169j)
+            arg[2, 2, 1]+=(0.742608258752+0.303555922167j)*x[2]
+            ref[2, 2, 1, 2]=(0.742608258752+0.303555922167j)
+            arg[2, 3, 0]+=(-0.372415240859-0.724742392509j)*x[2]
+            ref[2, 3, 0, 2]=(-0.372415240859-0.724742392509j)
+            arg[2, 3, 1]+=(0.892231361812-0.284405439369j)*x[2]
+            ref[2, 3, 1, 2]=(0.892231361812-0.284405439369j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.835588911107-0.186037808402j)*x[0]+((0.799341404352-0.912460415984j))*x[1]
+        ref[0]=(-0.835588911107-0.186037808402j)
+        ref[1]=(0.799341404352-0.912460415984j)
+        if dim==3:
+            arg+=((0.0934890726532-0.0202519432984j))*x[2]
+            ref[2]=(0.0934890726532-0.0202519432984j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(-0.608003929878+0.61457688657j)*x[0]+((-0.740040094238-0.906211146905j))*x[1]
+        ref[0, 0]=(-0.608003929878+0.61457688657j)
+        ref[0, 1]=(-0.740040094238-0.906211146905j)
+        arg[1,]=(-0.950648504354+0.934591098738j)*x[0]+((0.766366341592-0.574208025647j))*x[1]
+        ref[1, 0]=(-0.950648504354+0.934591098738j)
+        ref[1, 1]=(0.766366341592-0.574208025647j)
+        if dim==3:
+            arg[0,]+=(-0.887025989843+0.748907587418j)*x[2]
+            ref[0, 2]=(-0.887025989843+0.748907587418j)
+            arg[1,]+=(0.73832182871+0.993725440946j)*x[2]
+            ref[1, 2]=(0.73832182871+0.993725440946j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.420462668757+0.0148434132435j)*x[0]+((0.287979082552+0.689097618309j))*x[1]
+        ref[0, 0, 0]=(-0.420462668757+0.0148434132435j)
+        ref[0, 0, 1]=(0.287979082552+0.689097618309j)
+        arg[0, 1]=(-0.775897588065+0.977659833422j)*x[0]+((0.968688774935-0.700192388511j))*x[1]
+        ref[0, 1, 0]=(-0.775897588065+0.977659833422j)
+        ref[0, 1, 1]=(0.968688774935-0.700192388511j)
+        arg[1, 0]=(-0.486375999353+0.73871076968j)*x[0]+((0.139963820539+0.28716898727j))*x[1]
+        ref[1, 0, 0]=(-0.486375999353+0.73871076968j)
+        ref[1, 0, 1]=(0.139963820539+0.28716898727j)
+        arg[1, 1]=(0.13077294594-0.371644916405j)*x[0]+((0.206313136624-0.195210676199j))*x[1]
+        ref[1, 1, 0]=(0.13077294594-0.371644916405j)
+        ref[1, 1, 1]=(0.206313136624-0.195210676199j)
+        arg[2, 0]=(-0.706327282633-0.21982166408j)*x[0]+((0.330135950181-0.871881760985j))*x[1]
+        ref[2, 0, 0]=(-0.706327282633-0.21982166408j)
+        ref[2, 0, 1]=(0.330135950181-0.871881760985j)
+        arg[2, 1]=(-0.971013443702+0.140967162384j)*x[0]+((0.336084099247-0.926381503492j))*x[1]
+        ref[2, 1, 0]=(-0.971013443702+0.140967162384j)
+        ref[2, 1, 1]=(0.336084099247-0.926381503492j)
+        arg[3, 0]=(0.460625064533+0.863044176748j)*x[0]+((-0.888378888248-0.418646213936j))*x[1]
+        ref[3, 0, 0]=(0.460625064533+0.863044176748j)
+        ref[3, 0, 1]=(-0.888378888248-0.418646213936j)
+        arg[3, 1]=(0.765538056946+0.598331198032j)*x[0]+((-0.461571108343-0.853298239305j))*x[1]
+        ref[3, 1, 0]=(0.765538056946+0.598331198032j)
+        ref[3, 1, 1]=(-0.461571108343-0.853298239305j)
+        if dim==3:
+            arg[0, 0]+=(0.130958645807-0.848335345137j)*x[2]
+            ref[0, 0, 2]=(0.130958645807-0.848335345137j)
+            arg[0, 1]+=(0.149412855005+0.624168785192j)*x[2]
+            ref[0, 1, 2]=(0.149412855005+0.624168785192j)
+            arg[1, 0]+=(-0.230251300666-0.995065833415j)*x[2]
+            ref[1, 0, 2]=(-0.230251300666-0.995065833415j)
+            arg[1, 1]+=(-0.826661389817-0.830171243107j)*x[2]
+            ref[1, 1, 2]=(-0.826661389817-0.830171243107j)
+            arg[2, 0]+=(-0.284693129878-0.0304690467914j)*x[2]
+            ref[2, 0, 2]=(-0.284693129878-0.0304690467914j)
+            arg[2, 1]+=(0.674214037992+0.646602201108j)*x[2]
+            ref[2, 1, 2]=(0.674214037992+0.646602201108j)
+            arg[3, 0]+=(0.958314145397-0.579327383235j)*x[2]
+            ref[3, 0, 2]=(0.958314145397-0.579327383235j)
+            arg[3, 1]+=(-0.750733793432-0.872776200752j)*x[2]
+            ref[3, 1, 2]=(-0.750733793432-0.872776200752j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.856554484574-0.266273084072j)*x[0]+((-0.942253191451+0.816783266829j))*x[1]
+        ref[0, 0, 0, 0]=(0.856554484574-0.266273084072j)
+        ref[0, 0, 0, 1]=(-0.942253191451+0.816783266829j)
+        arg[0, 0, 1]=(0.602870815428+0.366561759667j)*x[0]+((0.233569790827-0.418456224995j))*x[1]
+        ref[0, 0, 1, 0]=(0.602870815428+0.366561759667j)
+        ref[0, 0, 1, 1]=(0.233569790827-0.418456224995j)
+        arg[0, 0, 2]=(0.492349256818+0.610281150624j)*x[0]+((-0.514951499872+0.818368105355j))*x[1]
+        ref[0, 0, 2, 0]=(0.492349256818+0.610281150624j)
+        ref[0, 0, 2, 1]=(-0.514951499872+0.818368105355j)
+        arg[0, 1, 0]=(0.677677034868+0.393239256955j)*x[0]+((0.0403723454648-0.7490176652j))*x[1]
+        ref[0, 1, 0, 0]=(0.677677034868+0.393239256955j)
+        ref[0, 1, 0, 1]=(0.0403723454648-0.7490176652j)
+        arg[0, 1, 1]=(-0.323414893206+0.761064780042j)*x[0]+((0.794793697688+0.250925923685j))*x[1]
+        ref[0, 1, 1, 0]=(-0.323414893206+0.761064780042j)
+        ref[0, 1, 1, 1]=(0.794793697688+0.250925923685j)
+        arg[0, 1, 2]=(0.319107843441+0.235206604037j)*x[0]+((-0.0142319543543+0.441469626659j))*x[1]
+        ref[0, 1, 2, 0]=(0.319107843441+0.235206604037j)
+        ref[0, 1, 2, 1]=(-0.0142319543543+0.441469626659j)
+        arg[1, 0, 0]=(-0.998384607937+0.977726846035j)*x[0]+((-0.411972307205+0.0190645688526j))*x[1]
+        ref[1, 0, 0, 0]=(-0.998384607937+0.977726846035j)
+        ref[1, 0, 0, 1]=(-0.411972307205+0.0190645688526j)
+        arg[1, 0, 1]=(-0.0810693822136-0.207153572907j)*x[0]+((0.153778095211-0.156073842115j))*x[1]
+        ref[1, 0, 1, 0]=(-0.0810693822136-0.207153572907j)
+        ref[1, 0, 1, 1]=(0.153778095211-0.156073842115j)
+        arg[1, 0, 2]=(-0.423827070616-0.436039169545j)*x[0]+((0.578503395639+0.229653213051j))*x[1]
+        ref[1, 0, 2, 0]=(-0.423827070616-0.436039169545j)
+        ref[1, 0, 2, 1]=(0.578503395639+0.229653213051j)
+        arg[1, 1, 0]=(0.270679358512+0.545944783635j)*x[0]+((-0.978110979715+0.716919103204j))*x[1]
+        ref[1, 1, 0, 0]=(0.270679358512+0.545944783635j)
+        ref[1, 1, 0, 1]=(-0.978110979715+0.716919103204j)
+        arg[1, 1, 1]=(0.12649234375-0.565048920953j)*x[0]+((-0.262280471424-0.7578955585j))*x[1]
+        ref[1, 1, 1, 0]=(0.12649234375-0.565048920953j)
+        ref[1, 1, 1, 1]=(-0.262280471424-0.7578955585j)
+        arg[1, 1, 2]=(-0.390902729531-0.72497049369j)*x[0]+((-0.339843867577+0.879493896644j))*x[1]
+        ref[1, 1, 2, 0]=(-0.390902729531-0.72497049369j)
+        ref[1, 1, 2, 1]=(-0.339843867577+0.879493896644j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.416308892567-0.29126159232j)*x[2]
+            ref[0, 0, 0, 2]=(-0.416308892567-0.29126159232j)
+            arg[0, 0, 1]+=(-0.378204744522+0.762008586041j)*x[2]
+            ref[0, 0, 1, 2]=(-0.378204744522+0.762008586041j)
+            arg[0, 0, 2]+=(0.807144556673-0.688098367709j)*x[2]
+            ref[0, 0, 2, 2]=(0.807144556673-0.688098367709j)
+            arg[0, 1, 0]+=(-0.491010007167+0.209118319419j)*x[2]
+            ref[0, 1, 0, 2]=(-0.491010007167+0.209118319419j)
+            arg[0, 1, 1]+=(0.656896732899-0.294666481401j)*x[2]
+            ref[0, 1, 1, 2]=(0.656896732899-0.294666481401j)
+            arg[0, 1, 2]+=(0.189302482725-0.105093496046j)*x[2]
+            ref[0, 1, 2, 2]=(0.189302482725-0.105093496046j)
+            arg[1, 0, 0]+=(-0.567907641237-0.349394418124j)*x[2]
+            ref[1, 0, 0, 2]=(-0.567907641237-0.349394418124j)
+            arg[1, 0, 1]+=(-0.746336203559-0.0373776835972j)*x[2]
+            ref[1, 0, 1, 2]=(-0.746336203559-0.0373776835972j)
+            arg[1, 0, 2]+=(-0.542371746271+0.409150975715j)*x[2]
+            ref[1, 0, 2, 2]=(-0.542371746271+0.409150975715j)
+            arg[1, 1, 0]+=(-0.590735157932-0.846331241546j)*x[2]
+            ref[1, 1, 0, 2]=(-0.590735157932-0.846331241546j)
+            arg[1, 1, 1]+=(0.913619678157+0.126549843079j)*x[2]
+            ref[1, 1, 1, 2]=(0.913619678157+0.126549843079j)
+            arg[1, 1, 2]+=(-0.948252565312-0.682866903724j)*x[2]
+            ref[1, 1, 2, 2]=(-0.948252565312-0.682866903724j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.491363741803-0.0193960668289j)*x[0]**o+((0.24658779359+0.387789313407j))*x[0]+((-0.356440654801-0.766779384539j))*x[1]**o+((-0.526426404978-0.786033185768j))*x[1]
+        ref[0]=(-0.491363741803-0.0193960668289j)*o*x_ref[0]**(o-1)+((0.24658779359+0.387789313407j))
+        ref[1]=(-0.356440654801-0.766779384539j)*o*x_ref[1]**(o-1)+((-0.526426404978-0.786033185768j))
+        if dim==3:
+            arg+=((0.371482985742-0.543346345754j))*x[2]**o+((-0.94806394186-0.63056462724j))*x[2]
+            ref[2]=(0.371482985742-0.543346345754j)*o*x_ref[2]**(o-1)+((-0.94806394186-0.63056462724j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(0.39257292439+0.720410925286j)*x[0]**o+((0.895905403205+0.433545875422j))*x[0]+((0.579567660964+0.712233868012j))*x[1]**o+((0.078576850049-0.102775091126j))*x[1]
+        ref[0, 0]=(0.39257292439+0.720410925286j)*o*x_ref[0]**(o-1)+((0.895905403205+0.433545875422j))
+        ref[0, 1]=(0.579567660964+0.712233868012j)*o*x_ref[1]**(o-1)+((0.078576850049-0.102775091126j))
+        arg[1,]=(0.966016255157+0.276759840284j)*x[0]**o+((0.534754020494-0.150563540988j))*x[0]+((-0.110371285747-0.0717660935892j))*x[1]**o+((-0.462822650364-0.549262824533j))*x[1]
+        ref[1, 0]=(0.966016255157+0.276759840284j)*o*x_ref[0]**(o-1)+((0.534754020494-0.150563540988j))
+        ref[1, 1]=(-0.110371285747-0.0717660935892j)*o*x_ref[1]**(o-1)+((-0.462822650364-0.549262824533j))
+        arg[2,]=(-0.663735323998+0.714240353789j)*x[0]**o+((-0.459056100497+0.653265478688j))*x[0]+((-0.997310876025-0.79455572513j))*x[1]**o+((0.185183104516-0.808013782477j))*x[1]
+        ref[2, 0]=(-0.663735323998+0.714240353789j)*o*x_ref[0]**(o-1)+((-0.459056100497+0.653265478688j))
+        ref[2, 1]=(-0.997310876025-0.79455572513j)*o*x_ref[1]**(o-1)+((0.185183104516-0.808013782477j))
+        if dim==3:
+            arg[0,]+=(0.329234258248+0.688827228486j)*x[2]**o+((0.74442808996+0.857573237604j))*x[2]
+            ref[0, 2]=(0.329234258248+0.688827228486j)*o*x_ref[2]**(o-1)+((0.74442808996+0.857573237604j))
+            arg[1,]+=(-0.0837820523517+0.852419107914j)*x[2]**o+((-0.931403918088-0.653576035076j))*x[2]
+            ref[1, 2]=(-0.0837820523517+0.852419107914j)*o*x_ref[2]**(o-1)+((-0.931403918088-0.653576035076j))
+            arg[2,]+=(-0.452407692047-0.435896686319j)*x[2]**o+((-0.372012265607-0.975743323945j))*x[2]
+            ref[2, 2]=(-0.452407692047-0.435896686319j)*o*x_ref[2]**(o-1)+((-0.372012265607-0.975743323945j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3)+(dim,),w_ref)
+        arg[0, 0]=(-0.558250003422-0.484642505861j)*x[0]**o+((-0.139650577046-0.722101859723j))*x[0]+((0.252281631959-0.48444786419j))*x[1]**o+((-0.429474289046-0.110122764225j))*x[1]
+        ref[0, 0, 0]=(-0.558250003422-0.484642505861j)*o*x_ref[0]**(o-1)+((-0.139650577046-0.722101859723j))
+        ref[0, 0, 1]=(0.252281631959-0.48444786419j)*o*x_ref[1]**(o-1)+((-0.429474289046-0.110122764225j))
+        arg[0, 1]=(-0.980144797654-0.0826288195567j)*x[0]**o+((-0.96925356135-0.125689330825j))*x[0]+((0.144677687192-0.23104814925j))*x[1]**o+((0.470989318866+0.754329013758j))*x[1]
+        ref[0, 1, 0]=(-0.980144797654-0.0826288195567j)*o*x_ref[0]**(o-1)+((-0.96925356135-0.125689330825j))
+        ref[0, 1, 1]=(0.144677687192-0.23104814925j)*o*x_ref[1]**(o-1)+((0.470989318866+0.754329013758j))
+        arg[0, 2]=(-0.354722845434-0.784461292127j)*x[0]**o+((0.907928870175-0.157287781068j))*x[0]+((0.0457346185313+0.711772670795j))*x[1]**o+((-0.306866907164+0.100612316049j))*x[1]
+        ref[0, 2, 0]=(-0.354722845434-0.784461292127j)*o*x_ref[0]**(o-1)+((0.907928870175-0.157287781068j))
+        ref[0, 2, 1]=(0.0457346185313+0.711772670795j)*o*x_ref[1]**(o-1)+((-0.306866907164+0.100612316049j))
+        arg[1, 0]=(-0.531378582875+0.118711598183j)*x[0]**o+((0.180750612905+0.78891242896j))*x[0]+((-0.350281000549+0.141805011269j))*x[1]**o+((0.437365961202-0.380051246542j))*x[1]
+        ref[1, 0, 0]=(-0.531378582875+0.118711598183j)*o*x_ref[0]**(o-1)+((0.180750612905+0.78891242896j))
+        ref[1, 0, 1]=(-0.350281000549+0.141805011269j)*o*x_ref[1]**(o-1)+((0.437365961202-0.380051246542j))
+        arg[1, 1]=(-0.871943184702+0.604097305003j)*x[0]**o+((-0.819546772049-0.617854145707j))*x[0]+((0.579759274356+0.0807292429875j))*x[1]**o+((0.578807690672+0.648124996755j))*x[1]
+        ref[1, 1, 0]=(-0.871943184702+0.604097305003j)*o*x_ref[0]**(o-1)+((-0.819546772049-0.617854145707j))
+        ref[1, 1, 1]=(0.579759274356+0.0807292429875j)*o*x_ref[1]**(o-1)+((0.578807690672+0.648124996755j))
+        arg[1, 2]=(-0.0385631250672-0.8898248636j)*x[0]**o+((0.210370900964-0.435632007955j))*x[0]+((0.146967904632+0.908534834406j))*x[1]**o+((0.627909984041+0.583014646344j))*x[1]
+        ref[1, 2, 0]=(-0.0385631250672-0.8898248636j)*o*x_ref[0]**(o-1)+((0.210370900964-0.435632007955j))
+        ref[1, 2, 1]=(0.146967904632+0.908534834406j)*o*x_ref[1]**(o-1)+((0.627909984041+0.583014646344j))
+        arg[2, 0]=(-0.405899907913+0.420930413399j)*x[0]**o+((0.310658384665+0.393572336894j))*x[0]+((-0.778048357014-0.152245086291j))*x[1]**o+((0.0158889671973+0.357298355805j))*x[1]
+        ref[2, 0, 0]=(-0.405899907913+0.420930413399j)*o*x_ref[0]**(o-1)+((0.310658384665+0.393572336894j))
+        ref[2, 0, 1]=(-0.778048357014-0.152245086291j)*o*x_ref[1]**(o-1)+((0.0158889671973+0.357298355805j))
+        arg[2, 1]=(0.272434865488+0.937366362447j)*x[0]**o+((-0.117261913095-0.247576229543j))*x[0]+((-0.726381522765+0.586382608565j))*x[1]**o+((0.54304643527-0.857361810484j))*x[1]
+        ref[2, 1, 0]=(0.272434865488+0.937366362447j)*o*x_ref[0]**(o-1)+((-0.117261913095-0.247576229543j))
+        ref[2, 1, 1]=(-0.726381522765+0.586382608565j)*o*x_ref[1]**(o-1)+((0.54304643527-0.857361810484j))
+        arg[2, 2]=(-0.838022613303-0.483944901613j)*x[0]**o+((0.00500057392554+0.0479163735759j))*x[0]+((0.114003648768+0.978272721586j))*x[1]**o+((-0.707533203043-0.805534197128j))*x[1]
+        ref[2, 2, 0]=(-0.838022613303-0.483944901613j)*o*x_ref[0]**(o-1)+((0.00500057392554+0.0479163735759j))
+        ref[2, 2, 1]=(0.114003648768+0.978272721586j)*o*x_ref[1]**(o-1)+((-0.707533203043-0.805534197128j))
+        if dim==3:
+            arg[0, 0]+=(-0.781734478156+0.671889821962j)*x[2]**o+((-0.670809698636-0.00741648643013j))*x[2]
+            ref[0, 0, 2]=(-0.781734478156+0.671889821962j)*o*x_ref[2]**(o-1)+((-0.670809698636-0.00741648643013j))
+            arg[0, 1]+=(-0.881302271408-0.607502546773j)*x[2]**o+((-0.115267961295+0.992586031894j))*x[2]
+            ref[0, 1, 2]=(-0.881302271408-0.607502546773j)*o*x_ref[2]**(o-1)+((-0.115267961295+0.992586031894j))
+            arg[0, 2]+=(0.651996269972+0.90270158982j)*x[2]**o+((0.143774075967+0.449853638908j))*x[2]
+            ref[0, 2, 2]=(0.651996269972+0.90270158982j)*o*x_ref[2]**(o-1)+((0.143774075967+0.449853638908j))
+            arg[1, 0]+=(-0.568251211162-0.135232763834j)*x[2]**o+((-0.993391412237+0.302369148056j))*x[2]
+            ref[1, 0, 2]=(-0.568251211162-0.135232763834j)*o*x_ref[2]**(o-1)+((-0.993391412237+0.302369148056j))
+            arg[1, 1]+=(-0.6830259085-0.774153790496j)*x[2]**o+((0.554842631929+0.759595088266j))*x[2]
+            ref[1, 1, 2]=(-0.6830259085-0.774153790496j)*o*x_ref[2]**(o-1)+((0.554842631929+0.759595088266j))
+            arg[1, 2]+=(-0.610088835867-0.920440108615j)*x[2]**o+((0.0875743315215+0.571305101153j))*x[2]
+            ref[1, 2, 2]=(-0.610088835867-0.920440108615j)*o*x_ref[2]**(o-1)+((0.0875743315215+0.571305101153j))
+            arg[2, 0]+=(-0.54289086921-0.396025236083j)*x[2]**o+((-0.9993836589+0.314023125043j))*x[2]
+            ref[2, 0, 2]=(-0.54289086921-0.396025236083j)*o*x_ref[2]**(o-1)+((-0.9993836589+0.314023125043j))
+            arg[2, 1]+=(0.920831458284+0.0903118247337j)*x[2]**o+((-0.692102437229+0.811889001428j))*x[2]
+            ref[2, 1, 2]=(0.920831458284+0.0903118247337j)*o*x_ref[2]**(o-1)+((-0.692102437229+0.811889001428j))
+            arg[2, 2]+=(0.647466664315+0.175031006227j)*x[2]**o+((0.330237368848+0.110359826288j))*x[2]
+            ref[2, 2, 2]=(0.647466664315+0.175031006227j)*o*x_ref[2]**(o-1)+((0.330237368848+0.110359826288j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.508850898527+0.58414735738j)*x[0]**o+((-0.103517629449-0.222968070673j))*x[0]+((-0.762081981865+0.774865123857j))*x[1]**o+((-0.0727494292159+0.132338605838j))*x[1]
+        ref[0, 0, 0, 0]=(-0.508850898527+0.58414735738j)*o*x_ref[0]**(o-1)+((-0.103517629449-0.222968070673j))
+        ref[0, 0, 0, 1]=(-0.762081981865+0.774865123857j)*o*x_ref[1]**(o-1)+((-0.0727494292159+0.132338605838j))
+        arg[0, 0, 1]=(-0.880530358004-0.276322156353j)*x[0]**o+((0.348475981646-0.450364203472j))*x[0]+((-0.543898903968-0.0991188196791j))*x[1]**o+((0.546054308578+0.619194982569j))*x[1]
+        ref[0, 0, 1, 0]=(-0.880530358004-0.276322156353j)*o*x_ref[0]**(o-1)+((0.348475981646-0.450364203472j))
+        ref[0, 0, 1, 1]=(-0.543898903968-0.0991188196791j)*o*x_ref[1]**(o-1)+((0.546054308578+0.619194982569j))
+        arg[0, 1, 0]=(-0.307645130698+0.880518707569j)*x[0]**o+((0.262883203802+0.231526172157j))*x[0]+((0.979288456043+0.717985954954j))*x[1]**o+((0.300961230073-0.317826607073j))*x[1]
+        ref[0, 1, 0, 0]=(-0.307645130698+0.880518707569j)*o*x_ref[0]**(o-1)+((0.262883203802+0.231526172157j))
+        ref[0, 1, 0, 1]=(0.979288456043+0.717985954954j)*o*x_ref[1]**(o-1)+((0.300961230073-0.317826607073j))
+        arg[0, 1, 1]=(0.880821656279-0.521677867758j)*x[0]**o+((-0.570885503497+0.923164748854j))*x[0]+((0.00971805305223-0.423518204276j))*x[1]**o+((-0.45567930775-0.567177448055j))*x[1]
+        ref[0, 1, 1, 0]=(0.880821656279-0.521677867758j)*o*x_ref[0]**(o-1)+((-0.570885503497+0.923164748854j))
+        ref[0, 1, 1, 1]=(0.00971805305223-0.423518204276j)*o*x_ref[1]**(o-1)+((-0.45567930775-0.567177448055j))
+        arg[0, 2, 0]=(-0.073270041854+0.27046894336j)*x[0]**o+((0.542343016577-0.708375725238j))*x[0]+((0.138232709404+0.57637158584j))*x[1]**o+((-0.830215608153+0.890155862891j))*x[1]
+        ref[0, 2, 0, 0]=(-0.073270041854+0.27046894336j)*o*x_ref[0]**(o-1)+((0.542343016577-0.708375725238j))
+        ref[0, 2, 0, 1]=(0.138232709404+0.57637158584j)*o*x_ref[1]**(o-1)+((-0.830215608153+0.890155862891j))
+        arg[0, 2, 1]=(0.837539252006+0.0170037926436j)*x[0]**o+((0.885542606228+0.325716100253j))*x[0]+((0.177218113973+0.437433200587j))*x[1]**o+((-0.27042679195+0.981773275603j))*x[1]
+        ref[0, 2, 1, 0]=(0.837539252006+0.0170037926436j)*o*x_ref[0]**(o-1)+((0.885542606228+0.325716100253j))
+        ref[0, 2, 1, 1]=(0.177218113973+0.437433200587j)*o*x_ref[1]**(o-1)+((-0.27042679195+0.981773275603j))
+        arg[1, 0, 0]=(0.813424321468-0.703763596655j)*x[0]**o+((0.0280709538046-0.835374864903j))*x[0]+((0.279125408674-0.510031606481j))*x[1]**o+((0.332608410443-0.195020546871j))*x[1]
+        ref[1, 0, 0, 0]=(0.813424321468-0.703763596655j)*o*x_ref[0]**(o-1)+((0.0280709538046-0.835374864903j))
+        ref[1, 0, 0, 1]=(0.279125408674-0.510031606481j)*o*x_ref[1]**(o-1)+((0.332608410443-0.195020546871j))
+        arg[1, 0, 1]=(0.340173193994+0.0987787601786j)*x[0]**o+((0.338508736733-0.960218522527j))*x[0]+((0.306295447634-0.204250024643j))*x[1]**o+((-0.905262061105+0.880715025041j))*x[1]
+        ref[1, 0, 1, 0]=(0.340173193994+0.0987787601786j)*o*x_ref[0]**(o-1)+((0.338508736733-0.960218522527j))
+        ref[1, 0, 1, 1]=(0.306295447634-0.204250024643j)*o*x_ref[1]**(o-1)+((-0.905262061105+0.880715025041j))
+        arg[1, 1, 0]=(-0.160125995121+0.0144987696969j)*x[0]**o+((0.981475537537-0.0323919932235j))*x[0]+((-0.854086584075-0.0155723035202j))*x[1]**o+((-0.97951573431+0.924294086547j))*x[1]
+        ref[1, 1, 0, 0]=(-0.160125995121+0.0144987696969j)*o*x_ref[0]**(o-1)+((0.981475537537-0.0323919932235j))
+        ref[1, 1, 0, 1]=(-0.854086584075-0.0155723035202j)*o*x_ref[1]**(o-1)+((-0.97951573431+0.924294086547j))
+        arg[1, 1, 1]=(-0.524848626153-0.448569070686j)*x[0]**o+((0.820237441755-0.760352830937j))*x[0]+((0.7986186397+0.555373975198j))*x[1]**o+((-0.287823565341+0.0495911891658j))*x[1]
+        ref[1, 1, 1, 0]=(-0.524848626153-0.448569070686j)*o*x_ref[0]**(o-1)+((0.820237441755-0.760352830937j))
+        ref[1, 1, 1, 1]=(0.7986186397+0.555373975198j)*o*x_ref[1]**(o-1)+((-0.287823565341+0.0495911891658j))
+        arg[1, 2, 0]=(0.904141298909+0.346746729311j)*x[0]**o+((-0.395533648588+0.880443927853j))*x[0]+((-0.60572486897+0.472264998147j))*x[1]**o+((-0.501388602809-0.750668857293j))*x[1]
+        ref[1, 2, 0, 0]=(0.904141298909+0.346746729311j)*o*x_ref[0]**(o-1)+((-0.395533648588+0.880443927853j))
+        ref[1, 2, 0, 1]=(-0.60572486897+0.472264998147j)*o*x_ref[1]**(o-1)+((-0.501388602809-0.750668857293j))
+        arg[1, 2, 1]=(0.177951567725-0.407343317974j)*x[0]**o+((0.3720170927+0.301846284524j))*x[0]+((0.948513245306+0.180135803612j))*x[1]**o+((-0.162805633592-0.59924149103j))*x[1]
+        ref[1, 2, 1, 0]=(0.177951567725-0.407343317974j)*o*x_ref[0]**(o-1)+((0.3720170927+0.301846284524j))
+        ref[1, 2, 1, 1]=(0.948513245306+0.180135803612j)*o*x_ref[1]**(o-1)+((-0.162805633592-0.59924149103j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.952817650912-0.557725300495j)*x[2]**o+((-0.51330137511+0.423511364948j))*x[2]
+            ref[0, 0, 0, 2]=(-0.952817650912-0.557725300495j)*o*x_ref[2]**(o-1)+((-0.51330137511+0.423511364948j))
+            arg[0, 0, 1]+=(0.619441898365-0.354453350131j)*x[2]**o+((0.0730321168774-0.00272833336049j))*x[2]
+            ref[0, 0, 1, 2]=(0.619441898365-0.354453350131j)*o*x_ref[2]**(o-1)+((0.0730321168774-0.00272833336049j))
+            arg[0, 1, 0]+=(0.653440463008+0.0760461787528j)*x[2]**o+((0.0663059149092+0.496010609147j))*x[2]
+            ref[0, 1, 0, 2]=(0.653440463008+0.0760461787528j)*o*x_ref[2]**(o-1)+((0.0663059149092+0.496010609147j))
+            arg[0, 1, 1]+=(-0.524595842953+0.043156722802j)*x[2]**o+((0.798945408179-0.331482825082j))*x[2]
+            ref[0, 1, 1, 2]=(-0.524595842953+0.043156722802j)*o*x_ref[2]**(o-1)+((0.798945408179-0.331482825082j))
+            arg[0, 2, 0]+=(-0.313802253057+0.928019472402j)*x[2]**o+((0.0285843564702-0.0367142531975j))*x[2]
+            ref[0, 2, 0, 2]=(-0.313802253057+0.928019472402j)*o*x_ref[2]**(o-1)+((0.0285843564702-0.0367142531975j))
+            arg[0, 2, 1]+=(-0.877935420002+0.28732923293j)*x[2]**o+((0.137595187618+0.197673065455j))*x[2]
+            ref[0, 2, 1, 2]=(-0.877935420002+0.28732923293j)*o*x_ref[2]**(o-1)+((0.137595187618+0.197673065455j))
+            arg[1, 0, 0]+=(-0.995248748099-0.853372723756j)*x[2]**o+((0.861400102984+0.0958199034098j))*x[2]
+            ref[1, 0, 0, 2]=(-0.995248748099-0.853372723756j)*o*x_ref[2]**(o-1)+((0.861400102984+0.0958199034098j))
+            arg[1, 0, 1]+=(0.862966366346-0.720398701313j)*x[2]**o+((0.786101391302-0.906848028927j))*x[2]
+            ref[1, 0, 1, 2]=(0.862966366346-0.720398701313j)*o*x_ref[2]**(o-1)+((0.786101391302-0.906848028927j))
+            arg[1, 1, 0]+=(-0.619458105953-0.766728036668j)*x[2]**o+((-0.926557320012-0.699062296842j))*x[2]
+            ref[1, 1, 0, 2]=(-0.619458105953-0.766728036668j)*o*x_ref[2]**(o-1)+((-0.926557320012-0.699062296842j))
+            arg[1, 1, 1]+=(0.387930014901-0.807041462415j)*x[2]**o+((-0.407815624517+0.195955014326j))*x[2]
+            ref[1, 1, 1, 2]=(0.387930014901-0.807041462415j)*o*x_ref[2]**(o-1)+((-0.407815624517+0.195955014326j))
+            arg[1, 2, 0]+=(-0.485064717654-0.157169744261j)*x[2]**o+((-0.299004257769-0.862701769733j))*x[2]
+            ref[1, 2, 0, 2]=(-0.485064717654-0.157169744261j)*o*x_ref[2]**(o-1)+((-0.299004257769-0.862701769733j))
+            arg[1, 2, 1]+=(-0.784598456335-0.904323053275j)*x[2]**o+((-0.756465164181+0.14471877815j))*x[2]
+            ref[1, 2, 1, 2]=(-0.784598456335-0.904323053275j)*o*x_ref[2]**(o-1)+((-0.756465164181+0.14471877815j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.87080502854-0.737568251019j)*x[0]**o+((-0.96108023183-0.483981760011j))*x[0]+((0.226440213722+0.0508162732642j))*x[1]**o+((-0.129171636116-0.0661092204487j))*x[1]
+        ref[0]=(0.87080502854-0.737568251019j)*o*x_ref[0]**(o-1)+((-0.96108023183-0.483981760011j))
+        ref[1]=(0.226440213722+0.0508162732642j)*o*x_ref[1]**(o-1)+((-0.129171636116-0.0661092204487j))
+        if dim==3:
+            arg+=((0.862033430479-0.315759302395j))*x[2]**o+((0.164855365557-0.406798171618j))*x[2]
+            ref[2]=(0.862033430479-0.315759302395j)*o*x_ref[2]**(o-1)+((0.164855365557-0.406798171618j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(0.194438334359-0.327620388224j)*x[0]**o+((0.720886667807-0.973713727771j))*x[0]+((0.508404712326+0.505105845351j))*x[1]**o+((0.554325401704-0.920179055264j))*x[1]
+        ref[0, 0]=(0.194438334359-0.327620388224j)*o*x_ref[0]**(o-1)+((0.720886667807-0.973713727771j))
+        ref[0, 1]=(0.508404712326+0.505105845351j)*o*x_ref[1]**(o-1)+((0.554325401704-0.920179055264j))
+        arg[1,]=(0.97649113174+0.145489075612j)*x[0]**o+((0.335799599358+0.764772502255j))*x[0]+((0.833401508403+0.491533220625j))*x[1]**o+((0.532055484772-0.89503418978j))*x[1]
+        ref[1, 0]=(0.97649113174+0.145489075612j)*o*x_ref[0]**(o-1)+((0.335799599358+0.764772502255j))
+        ref[1, 1]=(0.833401508403+0.491533220625j)*o*x_ref[1]**(o-1)+((0.532055484772-0.89503418978j))
+        arg[2,]=(0.916860488164-0.553215857153j)*x[0]**o+((0.65830558845-0.493094736225j))*x[0]+((-0.228314425595+0.446883165379j))*x[1]**o+((-0.766968355575-0.77875915965j))*x[1]
+        ref[2, 0]=(0.916860488164-0.553215857153j)*o*x_ref[0]**(o-1)+((0.65830558845-0.493094736225j))
+        ref[2, 1]=(-0.228314425595+0.446883165379j)*o*x_ref[1]**(o-1)+((-0.766968355575-0.77875915965j))
+        arg[3,]=(0.806986206852-0.274462440157j)*x[0]**o+((-0.0445456277877+0.564077556088j))*x[0]+((-0.740985377322+0.00672300862475j))*x[1]**o+((0.2788988705-0.220122219689j))*x[1]
+        ref[3, 0]=(0.806986206852-0.274462440157j)*o*x_ref[0]**(o-1)+((-0.0445456277877+0.564077556088j))
+        ref[3, 1]=(-0.740985377322+0.00672300862475j)*o*x_ref[1]**(o-1)+((0.2788988705-0.220122219689j))
+        if dim==3:
+            arg[0,]+=(-0.887307078342+0.327124486523j)*x[2]**o+((-0.465216546837+0.666668791874j))*x[2]
+            ref[0, 2]=(-0.887307078342+0.327124486523j)*o*x_ref[2]**(o-1)+((-0.465216546837+0.666668791874j))
+            arg[1,]+=(0.296682286457+0.995551848866j)*x[2]**o+((0.685609007042-0.660478645002j))*x[2]
+            ref[1, 2]=(0.296682286457+0.995551848866j)*o*x_ref[2]**(o-1)+((0.685609007042-0.660478645002j))
+            arg[2,]+=(-0.724462155732-0.199639085033j)*x[2]**o+((-0.609820597546+0.238944595318j))*x[2]
+            ref[2, 2]=(-0.724462155732-0.199639085033j)*o*x_ref[2]**(o-1)+((-0.609820597546+0.238944595318j))
+            arg[3,]+=(0.839262595376+0.911660331215j)*x[2]**o+((-0.156006388303-0.818830031082j))*x[2]
+            ref[3, 2]=(0.839262595376+0.911660331215j)*o*x_ref[2]**(o-1)+((-0.156006388303-0.818830031082j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.556531135031-0.909167517939j)*x[0]**o+((0.248342737569+0.276491270689j))*x[0]+((-0.195519236376-0.247573979301j))*x[1]**o+((0.5464415633+0.0456016181973j))*x[1]
+        ref[0, 0, 0]=(-0.556531135031-0.909167517939j)*o*x_ref[0]**(o-1)+((0.248342737569+0.276491270689j))
+        ref[0, 0, 1]=(-0.195519236376-0.247573979301j)*o*x_ref[1]**(o-1)+((0.5464415633+0.0456016181973j))
+        arg[0, 1]=(-0.808523933076+0.0107207517483j)*x[0]**o+((-0.47411095199+0.852158691003j))*x[0]+((0.974372258574+0.22001688171j))*x[1]**o+((0.0764523657176+0.658512859218j))*x[1]
+        ref[0, 1, 0]=(-0.808523933076+0.0107207517483j)*o*x_ref[0]**(o-1)+((-0.47411095199+0.852158691003j))
+        ref[0, 1, 1]=(0.974372258574+0.22001688171j)*o*x_ref[1]**(o-1)+((0.0764523657176+0.658512859218j))
+        arg[1, 0]=(-0.944389467766-0.357241481185j)*x[0]**o+((-0.00536079906634-0.969630392413j))*x[0]+((0.0902761505038+0.60711732022j))*x[1]**o+((0.291714116799-0.99467578293j))*x[1]
+        ref[1, 0, 0]=(-0.944389467766-0.357241481185j)*o*x_ref[0]**(o-1)+((-0.00536079906634-0.969630392413j))
+        ref[1, 0, 1]=(0.0902761505038+0.60711732022j)*o*x_ref[1]**(o-1)+((0.291714116799-0.99467578293j))
+        arg[1, 1]=(0.628894997718+0.98133861231j)*x[0]**o+((0.27057337365+0.812978313021j))*x[0]+((-0.492565507776-0.35762094169j))*x[1]**o+((-0.493827075489-0.477602542392j))*x[1]
+        ref[1, 1, 0]=(0.628894997718+0.98133861231j)*o*x_ref[0]**(o-1)+((0.27057337365+0.812978313021j))
+        ref[1, 1, 1]=(-0.492565507776-0.35762094169j)*o*x_ref[1]**(o-1)+((-0.493827075489-0.477602542392j))
+        arg[2, 0]=(0.633266046529+0.715532133579j)*x[0]**o+((0.673739190537+0.907877123206j))*x[0]+((-0.660296557569-0.635445437701j))*x[1]**o+((-0.550246015874+0.503660307538j))*x[1]
+        ref[2, 0, 0]=(0.633266046529+0.715532133579j)*o*x_ref[0]**(o-1)+((0.673739190537+0.907877123206j))
+        ref[2, 0, 1]=(-0.660296557569-0.635445437701j)*o*x_ref[1]**(o-1)+((-0.550246015874+0.503660307538j))
+        arg[2, 1]=(0.192451673395-0.320352421988j)*x[0]**o+((-0.736535863076+0.934962004045j))*x[0]+((-0.130108728086-0.518785105881j))*x[1]**o+((-0.471953998498-0.193648817702j))*x[1]
+        ref[2, 1, 0]=(0.192451673395-0.320352421988j)*o*x_ref[0]**(o-1)+((-0.736535863076+0.934962004045j))
+        ref[2, 1, 1]=(-0.130108728086-0.518785105881j)*o*x_ref[1]**(o-1)+((-0.471953998498-0.193648817702j))
+        arg[3, 0]=(-0.33803306596+0.462955440104j)*x[0]**o+((-0.776778516465-0.117110385592j))*x[0]+((0.716079067781+0.0209615328981j))*x[1]**o+((-0.480642224263+0.631194415829j))*x[1]
+        ref[3, 0, 0]=(-0.33803306596+0.462955440104j)*o*x_ref[0]**(o-1)+((-0.776778516465-0.117110385592j))
+        ref[3, 0, 1]=(0.716079067781+0.0209615328981j)*o*x_ref[1]**(o-1)+((-0.480642224263+0.631194415829j))
+        arg[3, 1]=(-0.647035148057-0.962992419036j)*x[0]**o+((0.939884221215+0.68104933872j))*x[0]+((0.574309756563+0.99439174352j))*x[1]**o+((-0.00102968022204-0.0995251404578j))*x[1]
+        ref[3, 1, 0]=(-0.647035148057-0.962992419036j)*o*x_ref[0]**(o-1)+((0.939884221215+0.68104933872j))
+        ref[3, 1, 1]=(0.574309756563+0.99439174352j)*o*x_ref[1]**(o-1)+((-0.00102968022204-0.0995251404578j))
+        if dim==3:
+            arg[0, 0]+=(0.758068636638+0.572316652437j)*x[2]**o+((-0.688370618825+0.681760168174j))*x[2]
+            ref[0, 0, 2]=(0.758068636638+0.572316652437j)*o*x_ref[2]**(o-1)+((-0.688370618825+0.681760168174j))
+            arg[0, 1]+=(-0.788117977255-0.586397175652j)*x[2]**o+((0.164716746199-0.990375054881j))*x[2]
+            ref[0, 1, 2]=(-0.788117977255-0.586397175652j)*o*x_ref[2]**(o-1)+((0.164716746199-0.990375054881j))
+            arg[1, 0]+=(-0.366308271495+0.427156714972j)*x[2]**o+((-0.163447543978+0.0660175779154j))*x[2]
+            ref[1, 0, 2]=(-0.366308271495+0.427156714972j)*o*x_ref[2]**(o-1)+((-0.163447543978+0.0660175779154j))
+            arg[1, 1]+=(0.95465245773+0.0307852010689j)*x[2]**o+((0.41252118091-0.111620925093j))*x[2]
+            ref[1, 1, 2]=(0.95465245773+0.0307852010689j)*o*x_ref[2]**(o-1)+((0.41252118091-0.111620925093j))
+            arg[2, 0]+=(-0.853423031003-0.43872459357j)*x[2]**o+((0.235438953001-0.454181635407j))*x[2]
+            ref[2, 0, 2]=(-0.853423031003-0.43872459357j)*o*x_ref[2]**(o-1)+((0.235438953001-0.454181635407j))
+            arg[2, 1]+=(-0.0493700393565+0.20893455509j)*x[2]**o+((0.165734900586-0.0847077322862j))*x[2]
+            ref[2, 1, 2]=(-0.0493700393565+0.20893455509j)*o*x_ref[2]**(o-1)+((0.165734900586-0.0847077322862j))
+            arg[3, 0]+=(-0.538955607492-0.411032403148j)*x[2]**o+((-0.952474380265-0.83046295592j))*x[2]
+            ref[3, 0, 2]=(-0.538955607492-0.411032403148j)*o*x_ref[2]**(o-1)+((-0.952474380265-0.83046295592j))
+            arg[3, 1]+=(0.0388093721327-0.532086550799j)*x[2]**o+((-0.709128881619-0.400264829629j))*x[2]
+            ref[3, 1, 2]=(0.0388093721327-0.532086550799j)*o*x_ref[2]**(o-1)+((-0.709128881619-0.400264829629j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.0964435817647+0.690803177614j)*x[0]**o+((0.599127266733-0.976598675907j))*x[0]+((-0.249604336434+0.678203632582j))*x[1]**o+((-0.87719294678+0.908292371305j))*x[1]
+        ref[0, 0, 0, 0]=(0.0964435817647+0.690803177614j)*o*x_ref[0]**(o-1)+((0.599127266733-0.976598675907j))
+        ref[0, 0, 0, 1]=(-0.249604336434+0.678203632582j)*o*x_ref[1]**(o-1)+((-0.87719294678+0.908292371305j))
+        arg[0, 0, 1]=(-0.531156528126+0.933515701838j)*x[0]**o+((-0.65178019366+0.725988225661j))*x[0]+((0.98009838723-0.944057222111j))*x[1]**o+((0.451284429492-0.639566359496j))*x[1]
+        ref[0, 0, 1, 0]=(-0.531156528126+0.933515701838j)*o*x_ref[0]**(o-1)+((-0.65178019366+0.725988225661j))
+        ref[0, 0, 1, 1]=(0.98009838723-0.944057222111j)*o*x_ref[1]**(o-1)+((0.451284429492-0.639566359496j))
+        arg[0, 0, 2]=(-0.841025823378-0.498742679755j)*x[0]**o+((0.141922802533-0.206296116386j))*x[0]+((0.87081354593-0.173556470897j))*x[1]**o+((0.792147244443+0.23309721255j))*x[1]
+        ref[0, 0, 2, 0]=(-0.841025823378-0.498742679755j)*o*x_ref[0]**(o-1)+((0.141922802533-0.206296116386j))
+        ref[0, 0, 2, 1]=(0.87081354593-0.173556470897j)*o*x_ref[1]**(o-1)+((0.792147244443+0.23309721255j))
+        arg[0, 0, 3]=(0.548788109322-0.512443968226j)*x[0]**o+((-0.375203257663-0.924641295334j))*x[0]+((-0.563106539745-0.797821022477j))*x[1]**o+((-0.211288662234-0.411052241324j))*x[1]
+        ref[0, 0, 3, 0]=(0.548788109322-0.512443968226j)*o*x_ref[0]**(o-1)+((-0.375203257663-0.924641295334j))
+        ref[0, 0, 3, 1]=(-0.563106539745-0.797821022477j)*o*x_ref[1]**(o-1)+((-0.211288662234-0.411052241324j))
+        arg[0, 1, 0]=(-0.484355616462-0.210998091408j)*x[0]**o+((-0.260837611257+0.864910371051j))*x[0]+((-0.0236270620603+0.0979145727234j))*x[1]**o+((-0.0387996708993-0.898180173034j))*x[1]
+        ref[0, 1, 0, 0]=(-0.484355616462-0.210998091408j)*o*x_ref[0]**(o-1)+((-0.260837611257+0.864910371051j))
+        ref[0, 1, 0, 1]=(-0.0236270620603+0.0979145727234j)*o*x_ref[1]**(o-1)+((-0.0387996708993-0.898180173034j))
+        arg[0, 1, 1]=(-0.612002725008+0.550338866461j)*x[0]**o+((0.749741403311+0.208381671343j))*x[0]+((0.144628036255-0.687683521962j))*x[1]**o+((0.334801718224-0.778764064059j))*x[1]
+        ref[0, 1, 1, 0]=(-0.612002725008+0.550338866461j)*o*x_ref[0]**(o-1)+((0.749741403311+0.208381671343j))
+        ref[0, 1, 1, 1]=(0.144628036255-0.687683521962j)*o*x_ref[1]**(o-1)+((0.334801718224-0.778764064059j))
+        arg[0, 1, 2]=(-0.620950164764-0.340431587156j)*x[0]**o+((0.332623011834+0.458582959736j))*x[0]+((-0.740068905743+0.105973965448j))*x[1]**o+((0.427855739855+0.742888276911j))*x[1]
+        ref[0, 1, 2, 0]=(-0.620950164764-0.340431587156j)*o*x_ref[0]**(o-1)+((0.332623011834+0.458582959736j))
+        ref[0, 1, 2, 1]=(-0.740068905743+0.105973965448j)*o*x_ref[1]**(o-1)+((0.427855739855+0.742888276911j))
+        arg[0, 1, 3]=(0.544489984637+0.314807774935j)*x[0]**o+((-0.453796885217+0.554847566071j))*x[0]+((-0.611847325066+0.182001591038j))*x[1]**o+((0.607907397821-0.890215096626j))*x[1]
+        ref[0, 1, 3, 0]=(0.544489984637+0.314807774935j)*o*x_ref[0]**(o-1)+((-0.453796885217+0.554847566071j))
+        ref[0, 1, 3, 1]=(-0.611847325066+0.182001591038j)*o*x_ref[1]**(o-1)+((0.607907397821-0.890215096626j))
+        arg[0, 2, 0]=(-0.0886467797292-0.0246663416295j)*x[0]**o+((-0.923856560817+0.948731323512j))*x[0]+((-0.815566726253-0.748700095721j))*x[1]**o+((-0.840158394741+0.174190551898j))*x[1]
+        ref[0, 2, 0, 0]=(-0.0886467797292-0.0246663416295j)*o*x_ref[0]**(o-1)+((-0.923856560817+0.948731323512j))
+        ref[0, 2, 0, 1]=(-0.815566726253-0.748700095721j)*o*x_ref[1]**(o-1)+((-0.840158394741+0.174190551898j))
+        arg[0, 2, 1]=(-0.634526271437-0.0605392703225j)*x[0]**o+((-0.163510079742-0.596028661852j))*x[0]+((0.852952452445+0.0763517117418j))*x[1]**o+((-0.118649820273-0.0654521274963j))*x[1]
+        ref[0, 2, 1, 0]=(-0.634526271437-0.0605392703225j)*o*x_ref[0]**(o-1)+((-0.163510079742-0.596028661852j))
+        ref[0, 2, 1, 1]=(0.852952452445+0.0763517117418j)*o*x_ref[1]**(o-1)+((-0.118649820273-0.0654521274963j))
+        arg[0, 2, 2]=(-0.876627188866-0.866992648995j)*x[0]**o+((-0.561946026976-0.419667499353j))*x[0]+((-0.555656549998+0.932345377936j))*x[1]**o+((0.0964683031012+0.438566840492j))*x[1]
+        ref[0, 2, 2, 0]=(-0.876627188866-0.866992648995j)*o*x_ref[0]**(o-1)+((-0.561946026976-0.419667499353j))
+        ref[0, 2, 2, 1]=(-0.555656549998+0.932345377936j)*o*x_ref[1]**(o-1)+((0.0964683031012+0.438566840492j))
+        arg[0, 2, 3]=(0.694326701016-0.881223225504j)*x[0]**o+((-0.000790340201206+0.994304893341j))*x[0]+((0.00337063201176+0.332919118028j))*x[1]**o+((0.740215101914+0.675078645574j))*x[1]
+        ref[0, 2, 3, 0]=(0.694326701016-0.881223225504j)*o*x_ref[0]**(o-1)+((-0.000790340201206+0.994304893341j))
+        ref[0, 2, 3, 1]=(0.00337063201176+0.332919118028j)*o*x_ref[1]**(o-1)+((0.740215101914+0.675078645574j))
+        arg[0, 3, 0]=(0.0120504821966+0.775381653742j)*x[0]**o+((-0.63619417096-0.418002801655j))*x[0]+((-0.155869282932-0.566787216868j))*x[1]**o+((-0.997318817082+0.0777265652309j))*x[1]
+        ref[0, 3, 0, 0]=(0.0120504821966+0.775381653742j)*o*x_ref[0]**(o-1)+((-0.63619417096-0.418002801655j))
+        ref[0, 3, 0, 1]=(-0.155869282932-0.566787216868j)*o*x_ref[1]**(o-1)+((-0.997318817082+0.0777265652309j))
+        arg[0, 3, 1]=(0.350102204983+0.173263679157j)*x[0]**o+((-0.264821353327-0.87485988676j))*x[0]+((-0.844118766347+0.903988892762j))*x[1]**o+((0.240287396442+0.151142585631j))*x[1]
+        ref[0, 3, 1, 0]=(0.350102204983+0.173263679157j)*o*x_ref[0]**(o-1)+((-0.264821353327-0.87485988676j))
+        ref[0, 3, 1, 1]=(-0.844118766347+0.903988892762j)*o*x_ref[1]**(o-1)+((0.240287396442+0.151142585631j))
+        arg[0, 3, 2]=(0.046543298863+0.637432086945j)*x[0]**o+((0.810782729494+0.647565562664j))*x[0]+((0.147423241954-0.502477352252j))*x[1]**o+((0.525136398441-0.108432877226j))*x[1]
+        ref[0, 3, 2, 0]=(0.046543298863+0.637432086945j)*o*x_ref[0]**(o-1)+((0.810782729494+0.647565562664j))
+        ref[0, 3, 2, 1]=(0.147423241954-0.502477352252j)*o*x_ref[1]**(o-1)+((0.525136398441-0.108432877226j))
+        arg[0, 3, 3]=(-0.370352015827+0.805999835482j)*x[0]**o+((-0.20706855706-0.588332405959j))*x[0]+((-0.879257972237-0.00384144130882j))*x[1]**o+((0.845304844341-0.228519755858j))*x[1]
+        ref[0, 3, 3, 0]=(-0.370352015827+0.805999835482j)*o*x_ref[0]**(o-1)+((-0.20706855706-0.588332405959j))
+        ref[0, 3, 3, 1]=(-0.879257972237-0.00384144130882j)*o*x_ref[1]**(o-1)+((0.845304844341-0.228519755858j))
+        arg[1, 0, 0]=(0.831467292319+0.417946900231j)*x[0]**o+((0.304753553787-0.826632073333j))*x[0]+((-0.022922312503+0.940481432985j))*x[1]**o+((0.545778646125-0.211331177747j))*x[1]
+        ref[1, 0, 0, 0]=(0.831467292319+0.417946900231j)*o*x_ref[0]**(o-1)+((0.304753553787-0.826632073333j))
+        ref[1, 0, 0, 1]=(-0.022922312503+0.940481432985j)*o*x_ref[1]**(o-1)+((0.545778646125-0.211331177747j))
+        arg[1, 0, 1]=(-0.419270492718-0.970514745353j)*x[0]**o+((-0.802151182059+0.755314838092j))*x[0]+((0.291032943924+0.703070587106j))*x[1]**o+((-0.842306794282-0.413031492092j))*x[1]
+        ref[1, 0, 1, 0]=(-0.419270492718-0.970514745353j)*o*x_ref[0]**(o-1)+((-0.802151182059+0.755314838092j))
+        ref[1, 0, 1, 1]=(0.291032943924+0.703070587106j)*o*x_ref[1]**(o-1)+((-0.842306794282-0.413031492092j))
+        arg[1, 0, 2]=(0.0779985831783-0.822447476474j)*x[0]**o+((0.864171449353-0.999627063523j))*x[0]+((-0.0900330157978-0.138491968548j))*x[1]**o+((-0.269503289786-0.702531955286j))*x[1]
+        ref[1, 0, 2, 0]=(0.0779985831783-0.822447476474j)*o*x_ref[0]**(o-1)+((0.864171449353-0.999627063523j))
+        ref[1, 0, 2, 1]=(-0.0900330157978-0.138491968548j)*o*x_ref[1]**(o-1)+((-0.269503289786-0.702531955286j))
+        arg[1, 0, 3]=(-0.123633530779+0.874555235941j)*x[0]**o+((-0.708453453541+0.620506973431j))*x[0]+((-0.192961519583+0.787769076966j))*x[1]**o+((0.385275775578-0.971177488348j))*x[1]
+        ref[1, 0, 3, 0]=(-0.123633530779+0.874555235941j)*o*x_ref[0]**(o-1)+((-0.708453453541+0.620506973431j))
+        ref[1, 0, 3, 1]=(-0.192961519583+0.787769076966j)*o*x_ref[1]**(o-1)+((0.385275775578-0.971177488348j))
+        arg[1, 1, 0]=(0.278519209236+0.195444195216j)*x[0]**o+((0.572276297093+0.0644066828787j))*x[0]+((0.857510743452-0.0497650673575j))*x[1]**o+((0.0124083095965-0.713402227922j))*x[1]
+        ref[1, 1, 0, 0]=(0.278519209236+0.195444195216j)*o*x_ref[0]**(o-1)+((0.572276297093+0.0644066828787j))
+        ref[1, 1, 0, 1]=(0.857510743452-0.0497650673575j)*o*x_ref[1]**(o-1)+((0.0124083095965-0.713402227922j))
+        arg[1, 1, 1]=(0.373708876772-0.957420401418j)*x[0]**o+((0.61888236989-0.925591249954j))*x[0]+((0.595595257508-0.386736977659j))*x[1]**o+((0.769138119269-0.100155305888j))*x[1]
+        ref[1, 1, 1, 0]=(0.373708876772-0.957420401418j)*o*x_ref[0]**(o-1)+((0.61888236989-0.925591249954j))
+        ref[1, 1, 1, 1]=(0.595595257508-0.386736977659j)*o*x_ref[1]**(o-1)+((0.769138119269-0.100155305888j))
+        arg[1, 1, 2]=(-0.0849573057349+0.213461161904j)*x[0]**o+((0.739764088897-0.559287179833j))*x[0]+((0.876186712668-0.719851229482j))*x[1]**o+((-0.0418520932186-0.903251731971j))*x[1]
+        ref[1, 1, 2, 0]=(-0.0849573057349+0.213461161904j)*o*x_ref[0]**(o-1)+((0.739764088897-0.559287179833j))
+        ref[1, 1, 2, 1]=(0.876186712668-0.719851229482j)*o*x_ref[1]**(o-1)+((-0.0418520932186-0.903251731971j))
+        arg[1, 1, 3]=(0.649784302433+0.14721158913j)*x[0]**o+((-0.63473568662-0.0469458560751j))*x[0]+((0.451468078835+0.808244505846j))*x[1]**o+((0.159238467945+0.649670994594j))*x[1]
+        ref[1, 1, 3, 0]=(0.649784302433+0.14721158913j)*o*x_ref[0]**(o-1)+((-0.63473568662-0.0469458560751j))
+        ref[1, 1, 3, 1]=(0.451468078835+0.808244505846j)*o*x_ref[1]**(o-1)+((0.159238467945+0.649670994594j))
+        arg[1, 2, 0]=(0.0969300862668-0.224905292243j)*x[0]**o+((0.420403501854+0.424737526682j))*x[0]+((0.0360620753593+0.250239690551j))*x[1]**o+((0.55333125129+0.390835741918j))*x[1]
+        ref[1, 2, 0, 0]=(0.0969300862668-0.224905292243j)*o*x_ref[0]**(o-1)+((0.420403501854+0.424737526682j))
+        ref[1, 2, 0, 1]=(0.0360620753593+0.250239690551j)*o*x_ref[1]**(o-1)+((0.55333125129+0.390835741918j))
+        arg[1, 2, 1]=(0.260394224048-0.911236680073j)*x[0]**o+((-0.86516462459+0.839567700505j))*x[0]+((0.661519189971-0.0555407540623j))*x[1]**o+((-0.648040057822-0.694336690302j))*x[1]
+        ref[1, 2, 1, 0]=(0.260394224048-0.911236680073j)*o*x_ref[0]**(o-1)+((-0.86516462459+0.839567700505j))
+        ref[1, 2, 1, 1]=(0.661519189971-0.0555407540623j)*o*x_ref[1]**(o-1)+((-0.648040057822-0.694336690302j))
+        arg[1, 2, 2]=(-0.480576275414+0.447920042147j)*x[0]**o+((-0.605261100172+0.89842859881j))*x[0]+((-0.818363300526+0.418490820939j))*x[1]**o+((0.00287507581597-0.75359277732j))*x[1]
+        ref[1, 2, 2, 0]=(-0.480576275414+0.447920042147j)*o*x_ref[0]**(o-1)+((-0.605261100172+0.89842859881j))
+        ref[1, 2, 2, 1]=(-0.818363300526+0.418490820939j)*o*x_ref[1]**(o-1)+((0.00287507581597-0.75359277732j))
+        arg[1, 2, 3]=(0.894132391685-0.513060671229j)*x[0]**o+((-0.639636882965-0.621957965459j))*x[0]+((-0.53644365793-0.449183164947j))*x[1]**o+((-0.510334198816+0.190475827601j))*x[1]
+        ref[1, 2, 3, 0]=(0.894132391685-0.513060671229j)*o*x_ref[0]**(o-1)+((-0.639636882965-0.621957965459j))
+        ref[1, 2, 3, 1]=(-0.53644365793-0.449183164947j)*o*x_ref[1]**(o-1)+((-0.510334198816+0.190475827601j))
+        arg[1, 3, 0]=(-0.247773648361+0.507940803235j)*x[0]**o+((0.186314552007-0.403536733023j))*x[0]+((-0.33724520734+0.19794611724j))*x[1]**o+((-0.491020430506-0.696227495976j))*x[1]
+        ref[1, 3, 0, 0]=(-0.247773648361+0.507940803235j)*o*x_ref[0]**(o-1)+((0.186314552007-0.403536733023j))
+        ref[1, 3, 0, 1]=(-0.33724520734+0.19794611724j)*o*x_ref[1]**(o-1)+((-0.491020430506-0.696227495976j))
+        arg[1, 3, 1]=(-0.49302882648-0.355524413882j)*x[0]**o+((0.996803574843-0.649240696769j))*x[0]+((-0.371736027703+0.693070725123j))*x[1]**o+((-0.662022788148+0.957794965411j))*x[1]
+        ref[1, 3, 1, 0]=(-0.49302882648-0.355524413882j)*o*x_ref[0]**(o-1)+((0.996803574843-0.649240696769j))
+        ref[1, 3, 1, 1]=(-0.371736027703+0.693070725123j)*o*x_ref[1]**(o-1)+((-0.662022788148+0.957794965411j))
+        arg[1, 3, 2]=(0.422122904037+0.168043368036j)*x[0]**o+((0.400382428333-0.855840089849j))*x[0]+((-0.419123884002-0.847318108111j))*x[1]**o+((-0.958861402105+0.105172348284j))*x[1]
+        ref[1, 3, 2, 0]=(0.422122904037+0.168043368036j)*o*x_ref[0]**(o-1)+((0.400382428333-0.855840089849j))
+        ref[1, 3, 2, 1]=(-0.419123884002-0.847318108111j)*o*x_ref[1]**(o-1)+((-0.958861402105+0.105172348284j))
+        arg[1, 3, 3]=(-0.166642271376-0.846642780276j)*x[0]**o+((-0.271889707552-0.00300123755479j))*x[0]+((-0.93255775397-0.581800185355j))*x[1]**o+((0.219166962253+0.67836568524j))*x[1]
+        ref[1, 3, 3, 0]=(-0.166642271376-0.846642780276j)*o*x_ref[0]**(o-1)+((-0.271889707552-0.00300123755479j))
+        ref[1, 3, 3, 1]=(-0.93255775397-0.581800185355j)*o*x_ref[1]**(o-1)+((0.219166962253+0.67836568524j))
+        arg[2, 0, 0]=(-0.414081309736+0.939200293633j)*x[0]**o+((0.17061484919+0.540552439051j))*x[0]+((-0.29957026604+0.493355879957j))*x[1]**o+((-0.468222149428-0.257700710886j))*x[1]
+        ref[2, 0, 0, 0]=(-0.414081309736+0.939200293633j)*o*x_ref[0]**(o-1)+((0.17061484919+0.540552439051j))
+        ref[2, 0, 0, 1]=(-0.29957026604+0.493355879957j)*o*x_ref[1]**(o-1)+((-0.468222149428-0.257700710886j))
+        arg[2, 0, 1]=(-0.811737579686-0.659643523209j)*x[0]**o+((-0.0499320108321+0.200132792503j))*x[0]+((-0.993300275398-0.436956387483j))*x[1]**o+((-0.711063612313+0.108985262833j))*x[1]
+        ref[2, 0, 1, 0]=(-0.811737579686-0.659643523209j)*o*x_ref[0]**(o-1)+((-0.0499320108321+0.200132792503j))
+        ref[2, 0, 1, 1]=(-0.993300275398-0.436956387483j)*o*x_ref[1]**(o-1)+((-0.711063612313+0.108985262833j))
+        arg[2, 0, 2]=(-0.985401191917-0.343263862722j)*x[0]**o+((0.188437188892-0.275238766941j))*x[0]+((-0.75833870531-0.000417808693758j))*x[1]**o+((0.109009318554+0.905292098224j))*x[1]
+        ref[2, 0, 2, 0]=(-0.985401191917-0.343263862722j)*o*x_ref[0]**(o-1)+((0.188437188892-0.275238766941j))
+        ref[2, 0, 2, 1]=(-0.75833870531-0.000417808693758j)*o*x_ref[1]**(o-1)+((0.109009318554+0.905292098224j))
+        arg[2, 0, 3]=(0.208432376892-0.287897528752j)*x[0]**o+((0.876959797542-0.856011012941j))*x[0]+((-0.300786684427+0.844850557817j))*x[1]**o+((-0.83462888016+0.200300121558j))*x[1]
+        ref[2, 0, 3, 0]=(0.208432376892-0.287897528752j)*o*x_ref[0]**(o-1)+((0.876959797542-0.856011012941j))
+        ref[2, 0, 3, 1]=(-0.300786684427+0.844850557817j)*o*x_ref[1]**(o-1)+((-0.83462888016+0.200300121558j))
+        arg[2, 1, 0]=(0.686790592362+0.801882427505j)*x[0]**o+((0.68668285117-0.764258448963j))*x[0]+((-0.496067737825+0.359387528126j))*x[1]**o+((0.499073924369+0.232821833853j))*x[1]
+        ref[2, 1, 0, 0]=(0.686790592362+0.801882427505j)*o*x_ref[0]**(o-1)+((0.68668285117-0.764258448963j))
+        ref[2, 1, 0, 1]=(-0.496067737825+0.359387528126j)*o*x_ref[1]**(o-1)+((0.499073924369+0.232821833853j))
+        arg[2, 1, 1]=(0.0576310412855+0.0312829639504j)*x[0]**o+((-0.136391338809+0.320439861421j))*x[0]+((-0.183257798371+0.961853896256j))*x[1]**o+((-0.539356115819-0.486544563245j))*x[1]
+        ref[2, 1, 1, 0]=(0.0576310412855+0.0312829639504j)*o*x_ref[0]**(o-1)+((-0.136391338809+0.320439861421j))
+        ref[2, 1, 1, 1]=(-0.183257798371+0.961853896256j)*o*x_ref[1]**(o-1)+((-0.539356115819-0.486544563245j))
+        arg[2, 1, 2]=(0.580436225198-0.708819139185j)*x[0]**o+((-0.878351361184+0.0869483460784j))*x[0]+((-0.390588701432-0.523321330889j))*x[1]**o+((-0.0899183597325-0.899127628192j))*x[1]
+        ref[2, 1, 2, 0]=(0.580436225198-0.708819139185j)*o*x_ref[0]**(o-1)+((-0.878351361184+0.0869483460784j))
+        ref[2, 1, 2, 1]=(-0.390588701432-0.523321330889j)*o*x_ref[1]**(o-1)+((-0.0899183597325-0.899127628192j))
+        arg[2, 1, 3]=(0.966403732801+0.0471967175503j)*x[0]**o+((0.85657366067-0.194093933117j))*x[0]+((-0.864027808932-0.681068567581j))*x[1]**o+((-0.315845587099-0.445452884809j))*x[1]
+        ref[2, 1, 3, 0]=(0.966403732801+0.0471967175503j)*o*x_ref[0]**(o-1)+((0.85657366067-0.194093933117j))
+        ref[2, 1, 3, 1]=(-0.864027808932-0.681068567581j)*o*x_ref[1]**(o-1)+((-0.315845587099-0.445452884809j))
+        arg[2, 2, 0]=(-0.955275174983-0.438995506935j)*x[0]**o+((0.611603121335+0.365547649058j))*x[0]+((0.911864820623-0.117735380805j))*x[1]**o+((0.211715716051-0.125997329657j))*x[1]
+        ref[2, 2, 0, 0]=(-0.955275174983-0.438995506935j)*o*x_ref[0]**(o-1)+((0.611603121335+0.365547649058j))
+        ref[2, 2, 0, 1]=(0.911864820623-0.117735380805j)*o*x_ref[1]**(o-1)+((0.211715716051-0.125997329657j))
+        arg[2, 2, 1]=(0.29472293596+0.885103545838j)*x[0]**o+((-0.057433999599-0.64890773558j))*x[0]+((0.730124259489-0.0246484775104j))*x[1]**o+((0.593173039478+0.413415534841j))*x[1]
+        ref[2, 2, 1, 0]=(0.29472293596+0.885103545838j)*o*x_ref[0]**(o-1)+((-0.057433999599-0.64890773558j))
+        ref[2, 2, 1, 1]=(0.730124259489-0.0246484775104j)*o*x_ref[1]**(o-1)+((0.593173039478+0.413415534841j))
+        arg[2, 2, 2]=(0.957451810997-0.183104002632j)*x[0]**o+((-0.851870779736-0.326738013058j))*x[0]+((0.976601050801-0.249438348536j))*x[1]**o+((-0.349719401254-0.661571429226j))*x[1]
+        ref[2, 2, 2, 0]=(0.957451810997-0.183104002632j)*o*x_ref[0]**(o-1)+((-0.851870779736-0.326738013058j))
+        ref[2, 2, 2, 1]=(0.976601050801-0.249438348536j)*o*x_ref[1]**(o-1)+((-0.349719401254-0.661571429226j))
+        arg[2, 2, 3]=(-0.0903383019784+0.14212005584j)*x[0]**o+((-0.539579775168+0.902221327293j))*x[0]+((-0.801525559374+0.566074627323j))*x[1]**o+((0.157535333032-0.664523821545j))*x[1]
+        ref[2, 2, 3, 0]=(-0.0903383019784+0.14212005584j)*o*x_ref[0]**(o-1)+((-0.539579775168+0.902221327293j))
+        ref[2, 2, 3, 1]=(-0.801525559374+0.566074627323j)*o*x_ref[1]**(o-1)+((0.157535333032-0.664523821545j))
+        arg[2, 3, 0]=(-0.546005682133-0.634813616881j)*x[0]**o+((0.825235827486+0.0360035174605j))*x[0]+((-0.368797118244+0.577634542495j))*x[1]**o+((0.958146433944+0.141152648035j))*x[1]
+        ref[2, 3, 0, 0]=(-0.546005682133-0.634813616881j)*o*x_ref[0]**(o-1)+((0.825235827486+0.0360035174605j))
+        ref[2, 3, 0, 1]=(-0.368797118244+0.577634542495j)*o*x_ref[1]**(o-1)+((0.958146433944+0.141152648035j))
+        arg[2, 3, 1]=(0.934674266698-0.773256871745j)*x[0]**o+((-0.469546089703-0.900680613408j))*x[0]+((0.766600704148+0.547682838138j))*x[1]**o+((0.4206888771-0.921370914818j))*x[1]
+        ref[2, 3, 1, 0]=(0.934674266698-0.773256871745j)*o*x_ref[0]**(o-1)+((-0.469546089703-0.900680613408j))
+        ref[2, 3, 1, 1]=(0.766600704148+0.547682838138j)*o*x_ref[1]**(o-1)+((0.4206888771-0.921370914818j))
+        arg[2, 3, 2]=(-0.10899745268+0.295676703801j)*x[0]**o+((0.0531742653915-0.613349266869j))*x[0]+((-0.318912375945+0.335978135966j))*x[1]**o+((0.142841830551-0.435645907379j))*x[1]
+        ref[2, 3, 2, 0]=(-0.10899745268+0.295676703801j)*o*x_ref[0]**(o-1)+((0.0531742653915-0.613349266869j))
+        ref[2, 3, 2, 1]=(-0.318912375945+0.335978135966j)*o*x_ref[1]**(o-1)+((0.142841830551-0.435645907379j))
+        arg[2, 3, 3]=(-0.469220078479-0.738890942345j)*x[0]**o+((-0.201026974122-0.346531853351j))*x[0]+((0.339292384985+0.116026473782j))*x[1]**o+((-0.860583703777+0.168827001406j))*x[1]
+        ref[2, 3, 3, 0]=(-0.469220078479-0.738890942345j)*o*x_ref[0]**(o-1)+((-0.201026974122-0.346531853351j))
+        ref[2, 3, 3, 1]=(0.339292384985+0.116026473782j)*o*x_ref[1]**(o-1)+((-0.860583703777+0.168827001406j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.548123968234+0.67647307833j)*x[2]**o+((-0.118110618062-0.0209230588935j))*x[2]
+            ref[0, 0, 0, 2]=(-0.548123968234+0.67647307833j)*o*x_ref[2]**(o-1)+((-0.118110618062-0.0209230588935j))
+            arg[0, 0, 1]+=(0.0528065413048+0.377423914688j)*x[2]**o+((-0.0806036692377-0.443881579874j))*x[2]
+            ref[0, 0, 1, 2]=(0.0528065413048+0.377423914688j)*o*x_ref[2]**(o-1)+((-0.0806036692377-0.443881579874j))
+            arg[0, 0, 2]+=(-0.800295409014+0.0798880708898j)*x[2]**o+((0.450076782279-0.095460811127j))*x[2]
+            ref[0, 0, 2, 2]=(-0.800295409014+0.0798880708898j)*o*x_ref[2]**(o-1)+((0.450076782279-0.095460811127j))
+            arg[0, 0, 3]+=(-0.437523270971+0.379650451513j)*x[2]**o+((0.255050849683+0.636143277959j))*x[2]
+            ref[0, 0, 3, 2]=(-0.437523270971+0.379650451513j)*o*x_ref[2]**(o-1)+((0.255050849683+0.636143277959j))
+            arg[0, 1, 0]+=(0.93127649487-0.248974520326j)*x[2]**o+((0.0379472281242-0.0466512708843j))*x[2]
+            ref[0, 1, 0, 2]=(0.93127649487-0.248974520326j)*o*x_ref[2]**(o-1)+((0.0379472281242-0.0466512708843j))
+            arg[0, 1, 1]+=(-0.34734976177+0.277706072563j)*x[2]**o+((0.0893071596905+0.176604223038j))*x[2]
+            ref[0, 1, 1, 2]=(-0.34734976177+0.277706072563j)*o*x_ref[2]**(o-1)+((0.0893071596905+0.176604223038j))
+            arg[0, 1, 2]+=(0.352139966179-0.000322563319353j)*x[2]**o+((0.429358855716+0.38264350846j))*x[2]
+            ref[0, 1, 2, 2]=(0.352139966179-0.000322563319353j)*o*x_ref[2]**(o-1)+((0.429358855716+0.38264350846j))
+            arg[0, 1, 3]+=(-0.283325625964-0.356545079145j)*x[2]**o+((-0.165909744558-0.000401864086318j))*x[2]
+            ref[0, 1, 3, 2]=(-0.283325625964-0.356545079145j)*o*x_ref[2]**(o-1)+((-0.165909744558-0.000401864086318j))
+            arg[0, 2, 0]+=(-0.105169958162+0.100296792819j)*x[2]**o+((-0.474186655314+0.267330694715j))*x[2]
+            ref[0, 2, 0, 2]=(-0.105169958162+0.100296792819j)*o*x_ref[2]**(o-1)+((-0.474186655314+0.267330694715j))
+            arg[0, 2, 1]+=(-0.366984882295+0.332800812688j)*x[2]**o+((-0.915648016797+0.0487985067352j))*x[2]
+            ref[0, 2, 1, 2]=(-0.366984882295+0.332800812688j)*o*x_ref[2]**(o-1)+((-0.915648016797+0.0487985067352j))
+            arg[0, 2, 2]+=(0.164559920175-0.0955892419419j)*x[2]**o+((0.217336516081-0.542372472997j))*x[2]
+            ref[0, 2, 2, 2]=(0.164559920175-0.0955892419419j)*o*x_ref[2]**(o-1)+((0.217336516081-0.542372472997j))
+            arg[0, 2, 3]+=(-0.965602869053+0.464749447864j)*x[2]**o+((0.159794363385-0.585931436516j))*x[2]
+            ref[0, 2, 3, 2]=(-0.965602869053+0.464749447864j)*o*x_ref[2]**(o-1)+((0.159794363385-0.585931436516j))
+            arg[0, 3, 0]+=(-0.038439468629-0.176742907529j)*x[2]**o+((-0.95166126268+0.0133427521302j))*x[2]
+            ref[0, 3, 0, 2]=(-0.038439468629-0.176742907529j)*o*x_ref[2]**(o-1)+((-0.95166126268+0.0133427521302j))
+            arg[0, 3, 1]+=(0.388027285913-0.665498296575j)*x[2]**o+((0.0379666138848+0.765059531036j))*x[2]
+            ref[0, 3, 1, 2]=(0.388027285913-0.665498296575j)*o*x_ref[2]**(o-1)+((0.0379666138848+0.765059531036j))
+            arg[0, 3, 2]+=(0.810461252959+0.579957545376j)*x[2]**o+((0.0847557095968+0.694903354797j))*x[2]
+            ref[0, 3, 2, 2]=(0.810461252959+0.579957545376j)*o*x_ref[2]**(o-1)+((0.0847557095968+0.694903354797j))
+            arg[0, 3, 3]+=(-0.0588198858351-0.642009752742j)*x[2]**o+((0.693347974788+0.808999921937j))*x[2]
+            ref[0, 3, 3, 2]=(-0.0588198858351-0.642009752742j)*o*x_ref[2]**(o-1)+((0.693347974788+0.808999921937j))
+            arg[1, 0, 0]+=(0.811304148935-0.491938563637j)*x[2]**o+((0.283962631325+0.208553956501j))*x[2]
+            ref[1, 0, 0, 2]=(0.811304148935-0.491938563637j)*o*x_ref[2]**(o-1)+((0.283962631325+0.208553956501j))
+            arg[1, 0, 1]+=(0.780631368478+0.0386182470453j)*x[2]**o+((0.486363010067-0.0841857805445j))*x[2]
+            ref[1, 0, 1, 2]=(0.780631368478+0.0386182470453j)*o*x_ref[2]**(o-1)+((0.486363010067-0.0841857805445j))
+            arg[1, 0, 2]+=(-0.862041867942-0.358230855076j)*x[2]**o+((0.641989177787-0.45373011475j))*x[2]
+            ref[1, 0, 2, 2]=(-0.862041867942-0.358230855076j)*o*x_ref[2]**(o-1)+((0.641989177787-0.45373011475j))
+            arg[1, 0, 3]+=(0.509532781422+0.191634568338j)*x[2]**o+((-0.702950389143-0.323932358809j))*x[2]
+            ref[1, 0, 3, 2]=(0.509532781422+0.191634568338j)*o*x_ref[2]**(o-1)+((-0.702950389143-0.323932358809j))
+            arg[1, 1, 0]+=(0.300170630574-0.431382596636j)*x[2]**o+((0.579018801024+0.805382569815j))*x[2]
+            ref[1, 1, 0, 2]=(0.300170630574-0.431382596636j)*o*x_ref[2]**(o-1)+((0.579018801024+0.805382569815j))
+            arg[1, 1, 1]+=(-0.642350499073-0.358282621992j)*x[2]**o+((0.510472415939+0.547111169402j))*x[2]
+            ref[1, 1, 1, 2]=(-0.642350499073-0.358282621992j)*o*x_ref[2]**(o-1)+((0.510472415939+0.547111169402j))
+            arg[1, 1, 2]+=(0.0777716656097+0.761326478558j)*x[2]**o+((-0.999718393847+0.0504804259488j))*x[2]
+            ref[1, 1, 2, 2]=(0.0777716656097+0.761326478558j)*o*x_ref[2]**(o-1)+((-0.999718393847+0.0504804259488j))
+            arg[1, 1, 3]+=(-0.289230504817+0.128082939519j)*x[2]**o+((0.168305459814-0.00970492299782j))*x[2]
+            ref[1, 1, 3, 2]=(-0.289230504817+0.128082939519j)*o*x_ref[2]**(o-1)+((0.168305459814-0.00970492299782j))
+            arg[1, 2, 0]+=(-0.229321040707-0.179384929309j)*x[2]**o+((0.719562472363-0.300119675157j))*x[2]
+            ref[1, 2, 0, 2]=(-0.229321040707-0.179384929309j)*o*x_ref[2]**(o-1)+((0.719562472363-0.300119675157j))
+            arg[1, 2, 1]+=(0.879749453868-0.30492229855j)*x[2]**o+((-0.755033239533-0.760053712187j))*x[2]
+            ref[1, 2, 1, 2]=(0.879749453868-0.30492229855j)*o*x_ref[2]**(o-1)+((-0.755033239533-0.760053712187j))
+            arg[1, 2, 2]+=(0.634593495053-0.285043069102j)*x[2]**o+((-0.195265175627-0.742562143681j))*x[2]
+            ref[1, 2, 2, 2]=(0.634593495053-0.285043069102j)*o*x_ref[2]**(o-1)+((-0.195265175627-0.742562143681j))
+            arg[1, 2, 3]+=(0.764096689454+0.0956079010723j)*x[2]**o+((-0.524402158733+0.829625251167j))*x[2]
+            ref[1, 2, 3, 2]=(0.764096689454+0.0956079010723j)*o*x_ref[2]**(o-1)+((-0.524402158733+0.829625251167j))
+            arg[1, 3, 0]+=(-0.953685213362+0.036752979562j)*x[2]**o+((0.108814642543+0.54961828675j))*x[2]
+            ref[1, 3, 0, 2]=(-0.953685213362+0.036752979562j)*o*x_ref[2]**(o-1)+((0.108814642543+0.54961828675j))
+            arg[1, 3, 1]+=(0.114374631987-0.32695251984j)*x[2]**o+((-0.860949236478+0.343909195916j))*x[2]
+            ref[1, 3, 1, 2]=(0.114374631987-0.32695251984j)*o*x_ref[2]**(o-1)+((-0.860949236478+0.343909195916j))
+            arg[1, 3, 2]+=(-0.177501183533+0.342271936784j)*x[2]**o+((-0.304073937675-0.207569158881j))*x[2]
+            ref[1, 3, 2, 2]=(-0.177501183533+0.342271936784j)*o*x_ref[2]**(o-1)+((-0.304073937675-0.207569158881j))
+            arg[1, 3, 3]+=(0.607624686169-0.135191923576j)*x[2]**o+((-0.418697981965+0.644505511835j))*x[2]
+            ref[1, 3, 3, 2]=(0.607624686169-0.135191923576j)*o*x_ref[2]**(o-1)+((-0.418697981965+0.644505511835j))
+            arg[2, 0, 0]+=(-0.927416865472+0.217196242318j)*x[2]**o+((0.936671190022+0.510279570778j))*x[2]
+            ref[2, 0, 0, 2]=(-0.927416865472+0.217196242318j)*o*x_ref[2]**(o-1)+((0.936671190022+0.510279570778j))
+            arg[2, 0, 1]+=(0.883440131653+0.300212149869j)*x[2]**o+((0.232995958836-0.878705396556j))*x[2]
+            ref[2, 0, 1, 2]=(0.883440131653+0.300212149869j)*o*x_ref[2]**(o-1)+((0.232995958836-0.878705396556j))
+            arg[2, 0, 2]+=(0.892853918547+0.174729094644j)*x[2]**o+((-0.768082643579+0.815593401938j))*x[2]
+            ref[2, 0, 2, 2]=(0.892853918547+0.174729094644j)*o*x_ref[2]**(o-1)+((-0.768082643579+0.815593401938j))
+            arg[2, 0, 3]+=(0.701635683101-0.917603719241j)*x[2]**o+((0.527199924053-0.59561757016j))*x[2]
+            ref[2, 0, 3, 2]=(0.701635683101-0.917603719241j)*o*x_ref[2]**(o-1)+((0.527199924053-0.59561757016j))
+            arg[2, 1, 0]+=(0.438813144178+0.304299303539j)*x[2]**o+((0.664039607776+0.717153926072j))*x[2]
+            ref[2, 1, 0, 2]=(0.438813144178+0.304299303539j)*o*x_ref[2]**(o-1)+((0.664039607776+0.717153926072j))
+            arg[2, 1, 1]+=(-0.660640272041-0.491091834635j)*x[2]**o+((-0.325655108313+0.555961459321j))*x[2]
+            ref[2, 1, 1, 2]=(-0.660640272041-0.491091834635j)*o*x_ref[2]**(o-1)+((-0.325655108313+0.555961459321j))
+            arg[2, 1, 2]+=(0.827953429572+0.0301165389935j)*x[2]**o+((-0.503442590432+0.351539933002j))*x[2]
+            ref[2, 1, 2, 2]=(0.827953429572+0.0301165389935j)*o*x_ref[2]**(o-1)+((-0.503442590432+0.351539933002j))
+            arg[2, 1, 3]+=(-0.627113927132-0.226944038897j)*x[2]**o+((-0.372279554335+0.344626105687j))*x[2]
+            ref[2, 1, 3, 2]=(-0.627113927132-0.226944038897j)*o*x_ref[2]**(o-1)+((-0.372279554335+0.344626105687j))
+            arg[2, 2, 0]+=(0.192230927808+0.927298893319j)*x[2]**o+((0.91449367675+0.51854517849j))*x[2]
+            ref[2, 2, 0, 2]=(0.192230927808+0.927298893319j)*o*x_ref[2]**(o-1)+((0.91449367675+0.51854517849j))
+            arg[2, 2, 1]+=(0.386936918642-0.407697994971j)*x[2]**o+((-0.5571163275+0.785470170308j))*x[2]
+            ref[2, 2, 1, 2]=(0.386936918642-0.407697994971j)*o*x_ref[2]**(o-1)+((-0.5571163275+0.785470170308j))
+            arg[2, 2, 2]+=(0.499855910842+0.993815399656j)*x[2]**o+((-0.698919546358-0.48047163554j))*x[2]
+            ref[2, 2, 2, 2]=(0.499855910842+0.993815399656j)*o*x_ref[2]**(o-1)+((-0.698919546358-0.48047163554j))
+            arg[2, 2, 3]+=(-0.0490700622497+0.141365098807j)*x[2]**o+((-0.538540534365+0.69655270412j))*x[2]
+            ref[2, 2, 3, 2]=(-0.0490700622497+0.141365098807j)*o*x_ref[2]**(o-1)+((-0.538540534365+0.69655270412j))
+            arg[2, 3, 0]+=(-0.502843306119+0.855018517894j)*x[2]**o+((-0.534049830444+0.473106337165j))*x[2]
+            ref[2, 3, 0, 2]=(-0.502843306119+0.855018517894j)*o*x_ref[2]**(o-1)+((-0.534049830444+0.473106337165j))
+            arg[2, 3, 1]+=(-0.197118030526-0.248228579893j)*x[2]**o+((-0.297686853057+0.259893953951j))*x[2]
+            ref[2, 3, 1, 2]=(-0.197118030526-0.248228579893j)*o*x_ref[2]**(o-1)+((-0.297686853057+0.259893953951j))
+            arg[2, 3, 2]+=(-0.419082223083+0.918282128724j)*x[2]**o+((0.852533886815+0.259401067221j))*x[2]
+            ref[2, 3, 2, 2]=(-0.419082223083+0.918282128724j)*o*x_ref[2]**(o-1)+((0.852533886815+0.259401067221j))
+            arg[2, 3, 3]+=(0.92069773213-0.146940397632j)*x[2]**o+((0.00277961038062+0.942317046517j))*x[2]
+            ref[2, 3, 3, 2]=(0.92069773213-0.146940397632j)*o*x_ref[2]**(o-1)+((0.00277961038062+0.942317046517j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.0847910893018+0.3039055724j)*x[0]+((0.0271516729638+0.0125022694181j))*x[1]
+        ref[0]=(-0.0847910893018+0.3039055724j)
+        ref[1]=(0.0271516729638+0.0125022694181j)
+        if dim==3:
+            arg+=((0.113306733744+0.774559065202j))*x[2]
+            ref[2]=(0.113306733744+0.774559065202j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(0.175969777823-0.396470606331j)*x[0]+((0.503130267819-0.52760224332j))*x[1]
+        ref[0, 0]=(0.175969777823-0.396470606331j)
+        ref[0, 1]=(0.503130267819-0.52760224332j)
+        arg[1,]=(-0.799641670938-0.606052664479j)*x[0]+((0.975223458992+0.437214707769j))*x[1]
+        ref[1, 0]=(-0.799641670938-0.606052664479j)
+        ref[1, 1]=(0.975223458992+0.437214707769j)
+        arg[2,]=(-0.342724529673+0.327034344117j)*x[0]+((0.0763936473994-0.0298133668704j))*x[1]
+        ref[2, 0]=(-0.342724529673+0.327034344117j)
+        ref[2, 1]=(0.0763936473994-0.0298133668704j)
+        arg[3,]=(-0.307951807028-0.249802186019j)*x[0]+((-0.394470912254-0.289012846083j))*x[1]
+        ref[3, 0]=(-0.307951807028-0.249802186019j)
+        ref[3, 1]=(-0.394470912254-0.289012846083j)
+        if dim==3:
+            arg[0,]+=(0.669894000201+0.708319970364j)*x[2]
+            ref[0, 2]=(0.669894000201+0.708319970364j)
+            arg[1,]+=(0.884060695197+0.87827132764j)*x[2]
+            ref[1, 2]=(0.884060695197+0.87827132764j)
+            arg[2,]+=(-0.674711978982+0.0535289864238j)*x[2]
+            ref[2, 2]=(-0.674711978982+0.0535289864238j)
+            arg[3,]+=(-0.571678288084+0.300965361255j)*x[2]
+            ref[3, 2]=(-0.571678288084+0.300965361255j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=(0.0414430379442+0.156245407637j)*x[0]+((-0.284721881387-0.323430284096j))*x[1]
+        ref[0, 0, 0]=(0.0414430379442+0.156245407637j)
+        ref[0, 0, 1]=(-0.284721881387-0.323430284096j)
+        arg[0, 1]=(0.88010403697+0.907019507351j)*x[0]+((-0.207940208083-0.0952855695814j))*x[1]
+        ref[0, 1, 0]=(0.88010403697+0.907019507351j)
+        ref[0, 1, 1]=(-0.207940208083-0.0952855695814j)
+        arg[0, 2]=(-0.262128906556-0.914694010336j)*x[0]+((0.980702524238+0.968933176948j))*x[1]
+        ref[0, 2, 0]=(-0.262128906556-0.914694010336j)
+        ref[0, 2, 1]=(0.980702524238+0.968933176948j)
+        arg[1, 0]=(-0.684420811362+0.606300179654j)*x[0]+((0.0193768251941+0.0231605000644j))*x[1]
+        ref[1, 0, 0]=(-0.684420811362+0.606300179654j)
+        ref[1, 0, 1]=(0.0193768251941+0.0231605000644j)
+        arg[1, 1]=(0.387612382501+0.808739736502j)*x[0]+((0.729455406359+0.591749119458j))*x[1]
+        ref[1, 1, 0]=(0.387612382501+0.808739736502j)
+        ref[1, 1, 1]=(0.729455406359+0.591749119458j)
+        arg[1, 2]=(0.614083110957+0.0590752521229j)*x[0]+((-0.889506123621+0.395621727218j))*x[1]
+        ref[1, 2, 0]=(0.614083110957+0.0590752521229j)
+        ref[1, 2, 1]=(-0.889506123621+0.395621727218j)
+        arg[2, 0]=(0.088663496486-0.537171595045j)*x[0]+((-0.231296118406+0.888801119506j))*x[1]
+        ref[2, 0, 0]=(0.088663496486-0.537171595045j)
+        ref[2, 0, 1]=(-0.231296118406+0.888801119506j)
+        arg[2, 1]=(0.163356863452-0.980541888552j)*x[0]+((0.921548914176+0.476762577755j))*x[1]
+        ref[2, 1, 0]=(0.163356863452-0.980541888552j)
+        ref[2, 1, 1]=(0.921548914176+0.476762577755j)
+        arg[2, 2]=(0.827666310768+0.0286197252685j)*x[0]+((-0.540777651838-0.015068323872j))*x[1]
+        ref[2, 2, 0]=(0.827666310768+0.0286197252685j)
+        ref[2, 2, 1]=(-0.540777651838-0.015068323872j)
+        arg[3, 0]=(-0.542712373016+0.0179199468853j)*x[0]+((0.869233445791+0.320840262597j))*x[1]
+        ref[3, 0, 0]=(-0.542712373016+0.0179199468853j)
+        ref[3, 0, 1]=(0.869233445791+0.320840262597j)
+        arg[3, 1]=(-0.641769535948-0.447741342625j)*x[0]+((-0.67381375887-0.860214229166j))*x[1]
+        ref[3, 1, 0]=(-0.641769535948-0.447741342625j)
+        ref[3, 1, 1]=(-0.67381375887-0.860214229166j)
+        arg[3, 2]=(-0.383296639844-0.879979466288j)*x[0]+((0.310080267606-0.970463354209j))*x[1]
+        ref[3, 2, 0]=(-0.383296639844-0.879979466288j)
+        ref[3, 2, 1]=(0.310080267606-0.970463354209j)
+        if dim==3:
+            arg[0, 0]+=(-0.969301037365+0.884322170264j)*x[2]
+            ref[0, 0, 2]=(-0.969301037365+0.884322170264j)
+            arg[0, 1]+=(0.185787804295+0.575742948269j)*x[2]
+            ref[0, 1, 2]=(0.185787804295+0.575742948269j)
+            arg[0, 2]+=(0.796467996987-0.414315810224j)*x[2]
+            ref[0, 2, 2]=(0.796467996987-0.414315810224j)
+            arg[1, 0]+=(0.401409219876+0.417296143246j)*x[2]
+            ref[1, 0, 2]=(0.401409219876+0.417296143246j)
+            arg[1, 1]+=(0.648813050019+0.281351554608j)*x[2]
+            ref[1, 1, 2]=(0.648813050019+0.281351554608j)
+            arg[1, 2]+=(-0.966924916085+0.661534439947j)*x[2]
+            ref[1, 2, 2]=(-0.966924916085+0.661534439947j)
+            arg[2, 0]+=(0.754822893201-0.829166977786j)*x[2]
+            ref[2, 0, 2]=(0.754822893201-0.829166977786j)
+            arg[2, 1]+=(-0.625549642606-0.618979657982j)*x[2]
+            ref[2, 1, 2]=(-0.625549642606-0.618979657982j)
+            arg[2, 2]+=(-0.976398315506+0.355106461306j)*x[2]
+            ref[2, 2, 2]=(-0.976398315506+0.355106461306j)
+            arg[3, 0]+=(0.286141321376-0.79822170197j)*x[2]
+            ref[3, 0, 2]=(0.286141321376-0.79822170197j)
+            arg[3, 1]+=(0.81453918528-0.377120151349j)*x[2]
+            ref[3, 1, 2]=(0.81453918528-0.377120151349j)
+            arg[3, 2]+=(0.21402967168+0.868480566125j)*x[2]
+            ref[3, 2, 2]=(0.21402967168+0.868480566125j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4),w)
+        ref = Data(0,(2, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.298530121956+0.893779729875j)*x[0]+((-0.908224662987-0.63848487272j))*x[1]
+        ref[0, 0, 0, 0]=(0.298530121956+0.893779729875j)
+        ref[0, 0, 0, 1]=(-0.908224662987-0.63848487272j)
+        arg[0, 0, 1]=(-0.615050060174+0.466406600996j)*x[0]+((0.83967709753-0.0609723397183j))*x[1]
+        ref[0, 0, 1, 0]=(-0.615050060174+0.466406600996j)
+        ref[0, 0, 1, 1]=(0.83967709753-0.0609723397183j)
+        arg[0, 0, 2]=(-0.367647468755-0.621171450211j)*x[0]+((-0.99102615825+0.938633167846j))*x[1]
+        ref[0, 0, 2, 0]=(-0.367647468755-0.621171450211j)
+        ref[0, 0, 2, 1]=(-0.99102615825+0.938633167846j)
+        arg[0, 0, 3]=(0.809552022097+0.497732233879j)*x[0]+((-0.485376156114-0.345582896324j))*x[1]
+        ref[0, 0, 3, 0]=(0.809552022097+0.497732233879j)
+        ref[0, 0, 3, 1]=(-0.485376156114-0.345582896324j)
+        arg[0, 1, 0]=(-0.695074025386+0.879636010586j)*x[0]+((0.536026159456+0.472434743965j))*x[1]
+        ref[0, 1, 0, 0]=(-0.695074025386+0.879636010586j)
+        ref[0, 1, 0, 1]=(0.536026159456+0.472434743965j)
+        arg[0, 1, 1]=(0.911924878765-0.0121819289427j)*x[0]+((0.912727690963-0.593655723594j))*x[1]
+        ref[0, 1, 1, 0]=(0.911924878765-0.0121819289427j)
+        ref[0, 1, 1, 1]=(0.912727690963-0.593655723594j)
+        arg[0, 1, 2]=(-0.795295984459-0.544589386495j)*x[0]+((0.779257825134+0.767217666439j))*x[1]
+        ref[0, 1, 2, 0]=(-0.795295984459-0.544589386495j)
+        ref[0, 1, 2, 1]=(0.779257825134+0.767217666439j)
+        arg[0, 1, 3]=(-0.433349109221-0.540752525287j)*x[0]+((0.275221835054+0.653703937861j))*x[1]
+        ref[0, 1, 3, 0]=(-0.433349109221-0.540752525287j)
+        ref[0, 1, 3, 1]=(0.275221835054+0.653703937861j)
+        arg[0, 2, 0]=(0.744613298255+0.750922657035j)*x[0]+((0.440565888695-0.547901272099j))*x[1]
+        ref[0, 2, 0, 0]=(0.744613298255+0.750922657035j)
+        ref[0, 2, 0, 1]=(0.440565888695-0.547901272099j)
+        arg[0, 2, 1]=(-0.968513622804+0.138373831093j)*x[0]+((-0.21352662283+0.381571550775j))*x[1]
+        ref[0, 2, 1, 0]=(-0.968513622804+0.138373831093j)
+        ref[0, 2, 1, 1]=(-0.21352662283+0.381571550775j)
+        arg[0, 2, 2]=(-0.78652071111+0.805635535669j)*x[0]+((-0.486742949831-0.515064836329j))*x[1]
+        ref[0, 2, 2, 0]=(-0.78652071111+0.805635535669j)
+        ref[0, 2, 2, 1]=(-0.486742949831-0.515064836329j)
+        arg[0, 2, 3]=(0.428369401857-0.752497295679j)*x[0]+((-0.96287182655+0.150773374543j))*x[1]
+        ref[0, 2, 3, 0]=(0.428369401857-0.752497295679j)
+        ref[0, 2, 3, 1]=(-0.96287182655+0.150773374543j)
+        arg[0, 3, 0]=(0.738116269434-0.978524331724j)*x[0]+((-0.486633420859+0.614712485526j))*x[1]
+        ref[0, 3, 0, 0]=(0.738116269434-0.978524331724j)
+        ref[0, 3, 0, 1]=(-0.486633420859+0.614712485526j)
+        arg[0, 3, 1]=(0.131667663971+0.325952715107j)*x[0]+((-0.227842582083-0.5096253116j))*x[1]
+        ref[0, 3, 1, 0]=(0.131667663971+0.325952715107j)
+        ref[0, 3, 1, 1]=(-0.227842582083-0.5096253116j)
+        arg[0, 3, 2]=(0.225081092398-0.314190426482j)*x[0]+((0.901977247683-0.725557905844j))*x[1]
+        ref[0, 3, 2, 0]=(0.225081092398-0.314190426482j)
+        ref[0, 3, 2, 1]=(0.901977247683-0.725557905844j)
+        arg[0, 3, 3]=(-0.961443129121-0.0878213217316j)*x[0]+((-0.93525002348-0.698174302806j))*x[1]
+        ref[0, 3, 3, 0]=(-0.961443129121-0.0878213217316j)
+        ref[0, 3, 3, 1]=(-0.93525002348-0.698174302806j)
+        arg[1, 0, 0]=(-0.624708589486+0.8820181828j)*x[0]+((0.68898011176+0.54613963365j))*x[1]
+        ref[1, 0, 0, 0]=(-0.624708589486+0.8820181828j)
+        ref[1, 0, 0, 1]=(0.68898011176+0.54613963365j)
+        arg[1, 0, 1]=(-0.988324751173+0.935949289521j)*x[0]+((-0.522100443287+0.529294297572j))*x[1]
+        ref[1, 0, 1, 0]=(-0.988324751173+0.935949289521j)
+        ref[1, 0, 1, 1]=(-0.522100443287+0.529294297572j)
+        arg[1, 0, 2]=(-0.247563036634+0.891032054141j)*x[0]+((-0.950619980792-0.959307915321j))*x[1]
+        ref[1, 0, 2, 0]=(-0.247563036634+0.891032054141j)
+        ref[1, 0, 2, 1]=(-0.950619980792-0.959307915321j)
+        arg[1, 0, 3]=(0.831953590869+0.0898296444445j)*x[0]+((-0.562226021319-0.911307925883j))*x[1]
+        ref[1, 0, 3, 0]=(0.831953590869+0.0898296444445j)
+        ref[1, 0, 3, 1]=(-0.562226021319-0.911307925883j)
+        arg[1, 1, 0]=(0.238298531577+0.459699682691j)*x[0]+((-0.43393949551+0.373233889627j))*x[1]
+        ref[1, 1, 0, 0]=(0.238298531577+0.459699682691j)
+        ref[1, 1, 0, 1]=(-0.43393949551+0.373233889627j)
+        arg[1, 1, 1]=(-0.610540605342+0.852150232057j)*x[0]+((-0.205056825525+0.571513118437j))*x[1]
+        ref[1, 1, 1, 0]=(-0.610540605342+0.852150232057j)
+        ref[1, 1, 1, 1]=(-0.205056825525+0.571513118437j)
+        arg[1, 1, 2]=(0.573263180022-0.135589572711j)*x[0]+((0.773623385046-0.678399048337j))*x[1]
+        ref[1, 1, 2, 0]=(0.573263180022-0.135589572711j)
+        ref[1, 1, 2, 1]=(0.773623385046-0.678399048337j)
+        arg[1, 1, 3]=(0.569202844176-0.921476516976j)*x[0]+((-0.606543677065-0.269349664255j))*x[1]
+        ref[1, 1, 3, 0]=(0.569202844176-0.921476516976j)
+        ref[1, 1, 3, 1]=(-0.606543677065-0.269349664255j)
+        arg[1, 2, 0]=(-0.501265139795+0.536195222257j)*x[0]+((-0.0751330579914+0.880772512772j))*x[1]
+        ref[1, 2, 0, 0]=(-0.501265139795+0.536195222257j)
+        ref[1, 2, 0, 1]=(-0.0751330579914+0.880772512772j)
+        arg[1, 2, 1]=(0.42103957507-0.00855816845993j)*x[0]+((0.672597544173+0.325051952099j))*x[1]
+        ref[1, 2, 1, 0]=(0.42103957507-0.00855816845993j)
+        ref[1, 2, 1, 1]=(0.672597544173+0.325051952099j)
+        arg[1, 2, 2]=(0.197268920706-0.817564527023j)*x[0]+((0.708010644038-0.308918522937j))*x[1]
+        ref[1, 2, 2, 0]=(0.197268920706-0.817564527023j)
+        ref[1, 2, 2, 1]=(0.708010644038-0.308918522937j)
+        arg[1, 2, 3]=(0.069410195265+0.631952180943j)*x[0]+((0.478945340054+0.0185836528035j))*x[1]
+        ref[1, 2, 3, 0]=(0.069410195265+0.631952180943j)
+        ref[1, 2, 3, 1]=(0.478945340054+0.0185836528035j)
+        arg[1, 3, 0]=(0.622821483634-0.348755094023j)*x[0]+((-0.703910479168-0.224001999913j))*x[1]
+        ref[1, 3, 0, 0]=(0.622821483634-0.348755094023j)
+        ref[1, 3, 0, 1]=(-0.703910479168-0.224001999913j)
+        arg[1, 3, 1]=(0.256849948537+0.269238793211j)*x[0]+((-0.330932134329+0.425361773339j))*x[1]
+        ref[1, 3, 1, 0]=(0.256849948537+0.269238793211j)
+        ref[1, 3, 1, 1]=(-0.330932134329+0.425361773339j)
+        arg[1, 3, 2]=(-0.473829084079-0.210808804851j)*x[0]+((0.392241833542+0.460804019561j))*x[1]
+        ref[1, 3, 2, 0]=(-0.473829084079-0.210808804851j)
+        ref[1, 3, 2, 1]=(0.392241833542+0.460804019561j)
+        arg[1, 3, 3]=(-0.612013365328+0.265424693889j)*x[0]+((0.286004070766+0.107925480017j))*x[1]
+        ref[1, 3, 3, 0]=(-0.612013365328+0.265424693889j)
+        ref[1, 3, 3, 1]=(0.286004070766+0.107925480017j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.578535965904-0.565948204003j)*x[2]
+            ref[0, 0, 0, 2]=(-0.578535965904-0.565948204003j)
+            arg[0, 0, 1]+=(0.54054018252+0.402920940293j)*x[2]
+            ref[0, 0, 1, 2]=(0.54054018252+0.402920940293j)
+            arg[0, 0, 2]+=(0.0444523412365-0.918721998693j)*x[2]
+            ref[0, 0, 2, 2]=(0.0444523412365-0.918721998693j)
+            arg[0, 0, 3]+=(0.607740111314-0.921658646496j)*x[2]
+            ref[0, 0, 3, 2]=(0.607740111314-0.921658646496j)
+            arg[0, 1, 0]+=(-0.535594367818-0.98604680339j)*x[2]
+            ref[0, 1, 0, 2]=(-0.535594367818-0.98604680339j)
+            arg[0, 1, 1]+=(0.0358567206502+0.402883239847j)*x[2]
+            ref[0, 1, 1, 2]=(0.0358567206502+0.402883239847j)
+            arg[0, 1, 2]+=(0.177059276364-0.516421414127j)*x[2]
+            ref[0, 1, 2, 2]=(0.177059276364-0.516421414127j)
+            arg[0, 1, 3]+=(0.0683305391378+0.661196515134j)*x[2]
+            ref[0, 1, 3, 2]=(0.0683305391378+0.661196515134j)
+            arg[0, 2, 0]+=(0.165100784889+0.317158002603j)*x[2]
+            ref[0, 2, 0, 2]=(0.165100784889+0.317158002603j)
+            arg[0, 2, 1]+=(0.0877168405479+0.898240139182j)*x[2]
+            ref[0, 2, 1, 2]=(0.0877168405479+0.898240139182j)
+            arg[0, 2, 2]+=(-0.874369264356+0.31256040361j)*x[2]
+            ref[0, 2, 2, 2]=(-0.874369264356+0.31256040361j)
+            arg[0, 2, 3]+=(-0.875237745701-0.507028668879j)*x[2]
+            ref[0, 2, 3, 2]=(-0.875237745701-0.507028668879j)
+            arg[0, 3, 0]+=(0.147104911721+0.0975851771951j)*x[2]
+            ref[0, 3, 0, 2]=(0.147104911721+0.0975851771951j)
+            arg[0, 3, 1]+=(-0.882841147136-0.234498112447j)*x[2]
+            ref[0, 3, 1, 2]=(-0.882841147136-0.234498112447j)
+            arg[0, 3, 2]+=(-0.769218800761+0.962183942873j)*x[2]
+            ref[0, 3, 2, 2]=(-0.769218800761+0.962183942873j)
+            arg[0, 3, 3]+=(-0.676887977968+0.0962170012104j)*x[2]
+            ref[0, 3, 3, 2]=(-0.676887977968+0.0962170012104j)
+            arg[1, 0, 0]+=(0.696883568982+0.363978693499j)*x[2]
+            ref[1, 0, 0, 2]=(0.696883568982+0.363978693499j)
+            arg[1, 0, 1]+=(0.581480421424-0.298132960985j)*x[2]
+            ref[1, 0, 1, 2]=(0.581480421424-0.298132960985j)
+            arg[1, 0, 2]+=(-0.862102530349+0.637061433797j)*x[2]
+            ref[1, 0, 2, 2]=(-0.862102530349+0.637061433797j)
+            arg[1, 0, 3]+=(0.135485836754-0.606798334597j)*x[2]
+            ref[1, 0, 3, 2]=(0.135485836754-0.606798334597j)
+            arg[1, 1, 0]+=(0.570959050839+0.71126388999j)*x[2]
+            ref[1, 1, 0, 2]=(0.570959050839+0.71126388999j)
+            arg[1, 1, 1]+=(-0.025629693932-0.908912467647j)*x[2]
+            ref[1, 1, 1, 2]=(-0.025629693932-0.908912467647j)
+            arg[1, 1, 2]+=(0.0887326823869+0.244814078264j)*x[2]
+            ref[1, 1, 2, 2]=(0.0887326823869+0.244814078264j)
+            arg[1, 1, 3]+=(-0.425626389764+0.90657489931j)*x[2]
+            ref[1, 1, 3, 2]=(-0.425626389764+0.90657489931j)
+            arg[1, 2, 0]+=(-0.640581573526-0.387744117102j)*x[2]
+            ref[1, 2, 0, 2]=(-0.640581573526-0.387744117102j)
+            arg[1, 2, 1]+=(0.578956624246-0.231997332486j)*x[2]
+            ref[1, 2, 1, 2]=(0.578956624246-0.231997332486j)
+            arg[1, 2, 2]+=(0.482062544356-0.112636928606j)*x[2]
+            ref[1, 2, 2, 2]=(0.482062544356-0.112636928606j)
+            arg[1, 2, 3]+=(0.276975010562+0.244480352013j)*x[2]
+            ref[1, 2, 3, 2]=(0.276975010562+0.244480352013j)
+            arg[1, 3, 0]+=(0.303100734765+0.248741424634j)*x[2]
+            ref[1, 3, 0, 2]=(0.303100734765+0.248741424634j)
+            arg[1, 3, 1]+=(0.302850658661+0.135246156782j)*x[2]
+            ref[1, 3, 1, 2]=(0.302850658661+0.135246156782j)
+            arg[1, 3, 2]+=(-0.711996637996+0.0244576231765j)*x[2]
+            ref[1, 3, 2, 2]=(-0.711996637996+0.0244576231765j)
+            arg[1, 3, 3]+=(0.933846079368+0.804711281967j)*x[2]
+            ref[1, 3, 3, 2]=(0.933846079368+0.804711281967j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.0669964060288-0.870224412138j)*x[0]+((-0.435527996335+0.54613677796j))*x[1]
+        ref[0]=(-0.0669964060288-0.870224412138j)
+        ref[1]=(-0.435527996335+0.54613677796j)
+        if dim==3:
+            arg+=((0.662727461794-0.395371380813j))*x[2]
+            ref[2]=(0.662727461794-0.395371380813j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(-0.248906303254-0.250465732124j)*x[0]+((-0.0215588940403-0.576566942595j))*x[1]
+        ref[0, 0]=(-0.248906303254-0.250465732124j)
+        ref[0, 1]=(-0.0215588940403-0.576566942595j)
+        arg[1,]=(-0.616698426766-0.86800196328j)*x[0]+((0.406932309566-0.207579436574j))*x[1]
+        ref[1, 0]=(-0.616698426766-0.86800196328j)
+        ref[1, 1]=(0.406932309566-0.207579436574j)
+        arg[2,]=(-0.823081994097+0.216041706916j)*x[0]+((-0.805359856206+0.570345342925j))*x[1]
+        ref[2, 0]=(-0.823081994097+0.216041706916j)
+        ref[2, 1]=(-0.805359856206+0.570345342925j)
+        if dim==3:
+            arg[0,]+=(0.956780202488-0.869274886881j)*x[2]
+            ref[0, 2]=(0.956780202488-0.869274886881j)
+            arg[1,]+=(-0.114869072474-0.503901726748j)*x[2]
+            ref[1, 2]=(-0.114869072474-0.503901726748j)
+            arg[2,]+=(0.156709697663-0.686038762321j)*x[2]
+            ref[2, 2]=(0.156709697663-0.686038762321j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3)+(dim,),w_ref)
+        arg[0, 0]=(0.471633467706-0.649642055322j)*x[0]+((0.608380321337+0.615710295862j))*x[1]
+        ref[0, 0, 0]=(0.471633467706-0.649642055322j)
+        ref[0, 0, 1]=(0.608380321337+0.615710295862j)
+        arg[0, 1]=(0.160170067703+0.408156138444j)*x[0]+((0.272493528919+0.317853846976j))*x[1]
+        ref[0, 1, 0]=(0.160170067703+0.408156138444j)
+        ref[0, 1, 1]=(0.272493528919+0.317853846976j)
+        arg[0, 2]=(-0.0202362919582+0.966344952907j)*x[0]+((-0.798234319165-0.225010671907j))*x[1]
+        ref[0, 2, 0]=(-0.0202362919582+0.966344952907j)
+        ref[0, 2, 1]=(-0.798234319165-0.225010671907j)
+        arg[1, 0]=(0.246904505398-0.168903353276j)*x[0]+((0.630639911113-0.683086783109j))*x[1]
+        ref[1, 0, 0]=(0.246904505398-0.168903353276j)
+        ref[1, 0, 1]=(0.630639911113-0.683086783109j)
+        arg[1, 1]=(-0.759834373385+0.94278805267j)*x[0]+((-0.402547271503+0.198539441107j))*x[1]
+        ref[1, 1, 0]=(-0.759834373385+0.94278805267j)
+        ref[1, 1, 1]=(-0.402547271503+0.198539441107j)
+        arg[1, 2]=(0.364316166338+0.678297971475j)*x[0]+((-0.834536258889-0.283213774497j))*x[1]
+        ref[1, 2, 0]=(0.364316166338+0.678297971475j)
+        ref[1, 2, 1]=(-0.834536258889-0.283213774497j)
+        arg[2, 0]=(-0.421936520075-0.613085960986j)*x[0]+((0.464065710303+0.0423957081744j))*x[1]
+        ref[2, 0, 0]=(-0.421936520075-0.613085960986j)
+        ref[2, 0, 1]=(0.464065710303+0.0423957081744j)
+        arg[2, 1]=(0.814636977967-0.187756983173j)*x[0]+((0.665304445367-0.336972935499j))*x[1]
+        ref[2, 1, 0]=(0.814636977967-0.187756983173j)
+        ref[2, 1, 1]=(0.665304445367-0.336972935499j)
+        arg[2, 2]=(0.117566289846+0.999373152103j)*x[0]+((-0.683868335888-0.730772020322j))*x[1]
+        ref[2, 2, 0]=(0.117566289846+0.999373152103j)
+        ref[2, 2, 1]=(-0.683868335888-0.730772020322j)
+        if dim==3:
+            arg[0, 0]+=(-0.25091745187+0.51731506933j)*x[2]
+            ref[0, 0, 2]=(-0.25091745187+0.51731506933j)
+            arg[0, 1]+=(-0.163233034967+0.591839707918j)*x[2]
+            ref[0, 1, 2]=(-0.163233034967+0.591839707918j)
+            arg[0, 2]+=(-0.26675155965+0.0461230061222j)*x[2]
+            ref[0, 2, 2]=(-0.26675155965+0.0461230061222j)
+            arg[1, 0]+=(0.3982160461+0.677545637225j)*x[2]
+            ref[1, 0, 2]=(0.3982160461+0.677545637225j)
+            arg[1, 1]+=(-0.988896905758+0.43633678427j)*x[2]
+            ref[1, 1, 2]=(-0.988896905758+0.43633678427j)
+            arg[1, 2]+=(-0.342988475546+0.349303376517j)*x[2]
+            ref[1, 2, 2]=(-0.342988475546+0.349303376517j)
+            arg[2, 0]+=(0.252751184973+0.981343915638j)*x[2]
+            ref[2, 0, 2]=(0.252751184973+0.981343915638j)
+            arg[2, 1]+=(0.509492487967+0.157784091376j)*x[2]
+            ref[2, 1, 2]=(0.509492487967+0.157784091376j)
+            arg[2, 2]+=(-0.424657464634-0.883749772362j)*x[2]
+            ref[2, 2, 2]=(-0.424657464634-0.883749772362j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 4),w)
+        ref = Data(0,(3, 3, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.984934436158+0.709378749773j)*x[0]+((0.475633872308+0.0487125853386j))*x[1]
+        ref[0, 0, 0, 0]=(-0.984934436158+0.709378749773j)
+        ref[0, 0, 0, 1]=(0.475633872308+0.0487125853386j)
+        arg[0, 0, 1]=(-0.739141093563-0.841550747926j)*x[0]+((0.939253140589+0.976664303537j))*x[1]
+        ref[0, 0, 1, 0]=(-0.739141093563-0.841550747926j)
+        ref[0, 0, 1, 1]=(0.939253140589+0.976664303537j)
+        arg[0, 0, 2]=(-0.18310993864+0.423917597263j)*x[0]+((0.25371351502-0.473587316351j))*x[1]
+        ref[0, 0, 2, 0]=(-0.18310993864+0.423917597263j)
+        ref[0, 0, 2, 1]=(0.25371351502-0.473587316351j)
+        arg[0, 0, 3]=(-0.729632257309-0.741135449556j)*x[0]+((-0.56186551022-0.687643880644j))*x[1]
+        ref[0, 0, 3, 0]=(-0.729632257309-0.741135449556j)
+        ref[0, 0, 3, 1]=(-0.56186551022-0.687643880644j)
+        arg[0, 1, 0]=(0.369944431402+0.119967061588j)*x[0]+((0.329313028911+0.727116975342j))*x[1]
+        ref[0, 1, 0, 0]=(0.369944431402+0.119967061588j)
+        ref[0, 1, 0, 1]=(0.329313028911+0.727116975342j)
+        arg[0, 1, 1]=(-0.766335971499-0.545076426177j)*x[0]+((0.0704875489923-0.983391284396j))*x[1]
+        ref[0, 1, 1, 0]=(-0.766335971499-0.545076426177j)
+        ref[0, 1, 1, 1]=(0.0704875489923-0.983391284396j)
+        arg[0, 1, 2]=(0.0136058679845-0.995529419845j)*x[0]+((0.21714345565-0.0777064861024j))*x[1]
+        ref[0, 1, 2, 0]=(0.0136058679845-0.995529419845j)
+        ref[0, 1, 2, 1]=(0.21714345565-0.0777064861024j)
+        arg[0, 1, 3]=(-0.244439765409+0.767573522593j)*x[0]+((-0.750486135048+0.366040073468j))*x[1]
+        ref[0, 1, 3, 0]=(-0.244439765409+0.767573522593j)
+        ref[0, 1, 3, 1]=(-0.750486135048+0.366040073468j)
+        arg[0, 2, 0]=(0.965171949608-0.614020917897j)*x[0]+((-0.966177280752-0.57637285474j))*x[1]
+        ref[0, 2, 0, 0]=(0.965171949608-0.614020917897j)
+        ref[0, 2, 0, 1]=(-0.966177280752-0.57637285474j)
+        arg[0, 2, 1]=(0.645354704342+0.440004891076j)*x[0]+((-0.587018586365+0.764164378191j))*x[1]
+        ref[0, 2, 1, 0]=(0.645354704342+0.440004891076j)
+        ref[0, 2, 1, 1]=(-0.587018586365+0.764164378191j)
+        arg[0, 2, 2]=(-0.0923620266015-0.234204770958j)*x[0]+((-0.58357190894+0.524153612264j))*x[1]
+        ref[0, 2, 2, 0]=(-0.0923620266015-0.234204770958j)
+        ref[0, 2, 2, 1]=(-0.58357190894+0.524153612264j)
+        arg[0, 2, 3]=(-0.165467294048+0.598996615663j)*x[0]+((-0.897680029816-0.339595821372j))*x[1]
+        ref[0, 2, 3, 0]=(-0.165467294048+0.598996615663j)
+        ref[0, 2, 3, 1]=(-0.897680029816-0.339595821372j)
+        arg[1, 0, 0]=(-0.448445280581-0.345626263896j)*x[0]+((-0.124423547665-0.737955603456j))*x[1]
+        ref[1, 0, 0, 0]=(-0.448445280581-0.345626263896j)
+        ref[1, 0, 0, 1]=(-0.124423547665-0.737955603456j)
+        arg[1, 0, 1]=(-0.204535531965+0.195606819138j)*x[0]+((0.703283329178+0.763853467698j))*x[1]
+        ref[1, 0, 1, 0]=(-0.204535531965+0.195606819138j)
+        ref[1, 0, 1, 1]=(0.703283329178+0.763853467698j)
+        arg[1, 0, 2]=(-0.133037701965+0.463017585354j)*x[0]+((0.877505186485+0.473809164007j))*x[1]
+        ref[1, 0, 2, 0]=(-0.133037701965+0.463017585354j)
+        ref[1, 0, 2, 1]=(0.877505186485+0.473809164007j)
+        arg[1, 0, 3]=(0.809679299802+0.372606554784j)*x[0]+((0.997210646256+0.887613484544j))*x[1]
+        ref[1, 0, 3, 0]=(0.809679299802+0.372606554784j)
+        ref[1, 0, 3, 1]=(0.997210646256+0.887613484544j)
+        arg[1, 1, 0]=(0.21940906299+0.792131868489j)*x[0]+((-0.613144971646+0.777699327239j))*x[1]
+        ref[1, 1, 0, 0]=(0.21940906299+0.792131868489j)
+        ref[1, 1, 0, 1]=(-0.613144971646+0.777699327239j)
+        arg[1, 1, 1]=(0.576426723641-0.541425994378j)*x[0]+((-0.72895620084-0.771398345754j))*x[1]
+        ref[1, 1, 1, 0]=(0.576426723641-0.541425994378j)
+        ref[1, 1, 1, 1]=(-0.72895620084-0.771398345754j)
+        arg[1, 1, 2]=(-0.624667924086-0.275374893233j)*x[0]+((0.0869685917415+0.640316350315j))*x[1]
+        ref[1, 1, 2, 0]=(-0.624667924086-0.275374893233j)
+        ref[1, 1, 2, 1]=(0.0869685917415+0.640316350315j)
+        arg[1, 1, 3]=(-0.286177626893+0.148670801727j)*x[0]+((-0.542687662616+0.400936889101j))*x[1]
+        ref[1, 1, 3, 0]=(-0.286177626893+0.148670801727j)
+        ref[1, 1, 3, 1]=(-0.542687662616+0.400936889101j)
+        arg[1, 2, 0]=(-0.189655123566+0.693306400228j)*x[0]+((-0.88027071803+0.809330980545j))*x[1]
+        ref[1, 2, 0, 0]=(-0.189655123566+0.693306400228j)
+        ref[1, 2, 0, 1]=(-0.88027071803+0.809330980545j)
+        arg[1, 2, 1]=(0.767555800917+0.713832633358j)*x[0]+((0.993249480607+0.825617147891j))*x[1]
+        ref[1, 2, 1, 0]=(0.767555800917+0.713832633358j)
+        ref[1, 2, 1, 1]=(0.993249480607+0.825617147891j)
+        arg[1, 2, 2]=(-0.674817234368+0.866657116559j)*x[0]+((0.611072073004+0.997449645603j))*x[1]
+        ref[1, 2, 2, 0]=(-0.674817234368+0.866657116559j)
+        ref[1, 2, 2, 1]=(0.611072073004+0.997449645603j)
+        arg[1, 2, 3]=(-0.555363310899-0.915167184343j)*x[0]+((-0.37318370517+0.537944219226j))*x[1]
+        ref[1, 2, 3, 0]=(-0.555363310899-0.915167184343j)
+        ref[1, 2, 3, 1]=(-0.37318370517+0.537944219226j)
+        arg[2, 0, 0]=(-0.921090616447+0.324650070047j)*x[0]+((-0.838006946582-0.124467745809j))*x[1]
+        ref[2, 0, 0, 0]=(-0.921090616447+0.324650070047j)
+        ref[2, 0, 0, 1]=(-0.838006946582-0.124467745809j)
+        arg[2, 0, 1]=(-0.303047300297+0.264652618982j)*x[0]+((0.445957981098+0.874977405267j))*x[1]
+        ref[2, 0, 1, 0]=(-0.303047300297+0.264652618982j)
+        ref[2, 0, 1, 1]=(0.445957981098+0.874977405267j)
+        arg[2, 0, 2]=(-0.743163529313+0.368887628308j)*x[0]+((-0.968866872504-0.281992359065j))*x[1]
+        ref[2, 0, 2, 0]=(-0.743163529313+0.368887628308j)
+        ref[2, 0, 2, 1]=(-0.968866872504-0.281992359065j)
+        arg[2, 0, 3]=(-0.565665185976+0.220756935391j)*x[0]+((-0.952630735303+0.259679802716j))*x[1]
+        ref[2, 0, 3, 0]=(-0.565665185976+0.220756935391j)
+        ref[2, 0, 3, 1]=(-0.952630735303+0.259679802716j)
+        arg[2, 1, 0]=(-0.794856870253+0.481331847058j)*x[0]+((0.143395732532-0.908850460685j))*x[1]
+        ref[2, 1, 0, 0]=(-0.794856870253+0.481331847058j)
+        ref[2, 1, 0, 1]=(0.143395732532-0.908850460685j)
+        arg[2, 1, 1]=(-0.851275141963+0.32710787754j)*x[0]+((0.358153976593+0.912255683583j))*x[1]
+        ref[2, 1, 1, 0]=(-0.851275141963+0.32710787754j)
+        ref[2, 1, 1, 1]=(0.358153976593+0.912255683583j)
+        arg[2, 1, 2]=(-0.523159386095+0.59837518663j)*x[0]+((-0.525816461031+0.585718629966j))*x[1]
+        ref[2, 1, 2, 0]=(-0.523159386095+0.59837518663j)
+        ref[2, 1, 2, 1]=(-0.525816461031+0.585718629966j)
+        arg[2, 1, 3]=(0.365007555923+0.0418189578196j)*x[0]+((-0.688119230356-0.441968552904j))*x[1]
+        ref[2, 1, 3, 0]=(0.365007555923+0.0418189578196j)
+        ref[2, 1, 3, 1]=(-0.688119230356-0.441968552904j)
+        arg[2, 2, 0]=(0.254679256622-0.985867267827j)*x[0]+((-0.222006088357+0.603217654969j))*x[1]
+        ref[2, 2, 0, 0]=(0.254679256622-0.985867267827j)
+        ref[2, 2, 0, 1]=(-0.222006088357+0.603217654969j)
+        arg[2, 2, 1]=(0.499819660681-0.634617773092j)*x[0]+((0.00771541848036-0.398660479918j))*x[1]
+        ref[2, 2, 1, 0]=(0.499819660681-0.634617773092j)
+        ref[2, 2, 1, 1]=(0.00771541848036-0.398660479918j)
+        arg[2, 2, 2]=(-0.676672492894-0.672931741893j)*x[0]+((-0.0912505852546-0.0490443585719j))*x[1]
+        ref[2, 2, 2, 0]=(-0.676672492894-0.672931741893j)
+        ref[2, 2, 2, 1]=(-0.0912505852546-0.0490443585719j)
+        arg[2, 2, 3]=(-0.0990723865707+0.336372075975j)*x[0]+((0.952480080838+0.679664583337j))*x[1]
+        ref[2, 2, 3, 0]=(-0.0990723865707+0.336372075975j)
+        ref[2, 2, 3, 1]=(0.952480080838+0.679664583337j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.324272072782+0.701582292364j)*x[2]
+            ref[0, 0, 0, 2]=(-0.324272072782+0.701582292364j)
+            arg[0, 0, 1]+=(0.713909195234+0.132054599874j)*x[2]
+            ref[0, 0, 1, 2]=(0.713909195234+0.132054599874j)
+            arg[0, 0, 2]+=(0.606512246486+0.061213734855j)*x[2]
+            ref[0, 0, 2, 2]=(0.606512246486+0.061213734855j)
+            arg[0, 0, 3]+=(0.269079048331-0.855252045108j)*x[2]
+            ref[0, 0, 3, 2]=(0.269079048331-0.855252045108j)
+            arg[0, 1, 0]+=(-0.969327553275-0.362541329692j)*x[2]
+            ref[0, 1, 0, 2]=(-0.969327553275-0.362541329692j)
+            arg[0, 1, 1]+=(0.429240074357+0.575701451806j)*x[2]
+            ref[0, 1, 1, 2]=(0.429240074357+0.575701451806j)
+            arg[0, 1, 2]+=(0.340240559087+0.985980377012j)*x[2]
+            ref[0, 1, 2, 2]=(0.340240559087+0.985980377012j)
+            arg[0, 1, 3]+=(-0.510856544555-0.964977685209j)*x[2]
+            ref[0, 1, 3, 2]=(-0.510856544555-0.964977685209j)
+            arg[0, 2, 0]+=(0.0225233624534+0.788938763766j)*x[2]
+            ref[0, 2, 0, 2]=(0.0225233624534+0.788938763766j)
+            arg[0, 2, 1]+=(0.6212588898-0.575840520872j)*x[2]
+            ref[0, 2, 1, 2]=(0.6212588898-0.575840520872j)
+            arg[0, 2, 2]+=(0.392495902389-0.976772686158j)*x[2]
+            ref[0, 2, 2, 2]=(0.392495902389-0.976772686158j)
+            arg[0, 2, 3]+=(0.461437801954-0.487093043457j)*x[2]
+            ref[0, 2, 3, 2]=(0.461437801954-0.487093043457j)
+            arg[1, 0, 0]+=(0.442376678895-0.833852968704j)*x[2]
+            ref[1, 0, 0, 2]=(0.442376678895-0.833852968704j)
+            arg[1, 0, 1]+=(-0.201509626327-0.427448758643j)*x[2]
+            ref[1, 0, 1, 2]=(-0.201509626327-0.427448758643j)
+            arg[1, 0, 2]+=(-0.208774968753-0.794206624036j)*x[2]
+            ref[1, 0, 2, 2]=(-0.208774968753-0.794206624036j)
+            arg[1, 0, 3]+=(0.949078579382-0.133954413166j)*x[2]
+            ref[1, 0, 3, 2]=(0.949078579382-0.133954413166j)
+            arg[1, 1, 0]+=(-0.942230385934-0.90446873363j)*x[2]
+            ref[1, 1, 0, 2]=(-0.942230385934-0.90446873363j)
+            arg[1, 1, 1]+=(0.00787628869236-0.461613400823j)*x[2]
+            ref[1, 1, 1, 2]=(0.00787628869236-0.461613400823j)
+            arg[1, 1, 2]+=(0.694184632232+0.447549796561j)*x[2]
+            ref[1, 1, 2, 2]=(0.694184632232+0.447549796561j)
+            arg[1, 1, 3]+=(0.818492698228-0.33209031663j)*x[2]
+            ref[1, 1, 3, 2]=(0.818492698228-0.33209031663j)
+            arg[1, 2, 0]+=(0.137431964296-0.44092737001j)*x[2]
+            ref[1, 2, 0, 2]=(0.137431964296-0.44092737001j)
+            arg[1, 2, 1]+=(0.621342573702+0.0873249243444j)*x[2]
+            ref[1, 2, 1, 2]=(0.621342573702+0.0873249243444j)
+            arg[1, 2, 2]+=(-0.259960976404+0.800985694074j)*x[2]
+            ref[1, 2, 2, 2]=(-0.259960976404+0.800985694074j)
+            arg[1, 2, 3]+=(0.402442921063-0.223933023935j)*x[2]
+            ref[1, 2, 3, 2]=(0.402442921063-0.223933023935j)
+            arg[2, 0, 0]+=(-0.741271054735-0.0116505480621j)*x[2]
+            ref[2, 0, 0, 2]=(-0.741271054735-0.0116505480621j)
+            arg[2, 0, 1]+=(-0.692409563395-0.443112227766j)*x[2]
+            ref[2, 0, 1, 2]=(-0.692409563395-0.443112227766j)
+            arg[2, 0, 2]+=(-0.467610766979+0.17320797956j)*x[2]
+            ref[2, 0, 2, 2]=(-0.467610766979+0.17320797956j)
+            arg[2, 0, 3]+=(-0.266027300625-0.508760858026j)*x[2]
+            ref[2, 0, 3, 2]=(-0.266027300625-0.508760858026j)
+            arg[2, 1, 0]+=(-0.537363292917-0.740893191598j)*x[2]
+            ref[2, 1, 0, 2]=(-0.537363292917-0.740893191598j)
+            arg[2, 1, 1]+=(0.983685366192+0.185576244243j)*x[2]
+            ref[2, 1, 1, 2]=(0.983685366192+0.185576244243j)
+            arg[2, 1, 2]+=(-0.714525480247+0.532962770674j)*x[2]
+            ref[2, 1, 2, 2]=(-0.714525480247+0.532962770674j)
+            arg[2, 1, 3]+=(0.530519426331+0.548643417076j)*x[2]
+            ref[2, 1, 3, 2]=(0.530519426331+0.548643417076j)
+            arg[2, 2, 0]+=(0.360274785034+0.785715382532j)*x[2]
+            ref[2, 2, 0, 2]=(0.360274785034+0.785715382532j)
+            arg[2, 2, 1]+=(0.310989397952-0.698444682671j)*x[2]
+            ref[2, 2, 1, 2]=(0.310989397952-0.698444682671j)
+            arg[2, 2, 2]+=(-0.549247109742-0.38976365586j)*x[2]
+            ref[2, 2, 2, 2]=(-0.549247109742-0.38976365586j)
+            arg[2, 2, 3]+=(-0.975575292475-0.664748863166j)*x[2]
+            ref[2, 2, 3, 2]=(-0.975575292475-0.664748863166j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.774476228794*x[0]**o+(-0.335208260553)*x[0]+(-0.422051185595)*x[1]**o+(0.222234501459)*x[1]
+        ref[0]=-0.774476228794*o*x_ref[0]**(o-1)+(-0.335208260553)
+        ref[1]=-0.422051185595*o*x_ref[1]**(o-1)+(0.222234501459)
+        if dim==3:
+            arg+=(-0.394394282218)*x[2]**o+(-0.524604355279)*x[2]
+            ref[2]=-0.394394282218*o*x_ref[2]**(o-1)+(-0.524604355279)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.178009729537*x[0]**o+(0.482980366706)*x[0]+(0.275740650798)*x[1]**o+(-0.832078573704)*x[1]
+        ref[0, 0]=-0.178009729537*o*x_ref[0]**(o-1)+(0.482980366706)
+        ref[0, 1]=0.275740650798*o*x_ref[1]**(o-1)+(-0.832078573704)
+        arg[1,]=0.959519041717*x[0]**o+(-0.148431528967)*x[0]+(-0.739421813025)*x[1]**o+(-0.636515249598)*x[1]
+        ref[1, 0]=0.959519041717*o*x_ref[0]**(o-1)+(-0.148431528967)
+        ref[1, 1]=-0.739421813025*o*x_ref[1]**(o-1)+(-0.636515249598)
+        if dim==3:
+            arg[0,]+=-0.264848115022*x[2]**o+(-0.859606832101)*x[2]
+            ref[0, 2]=-0.264848115022*o*x_ref[2]**(o-1)+(-0.859606832101)
+            arg[1,]+=0.373225152189*x[2]**o+(0.792629380381)*x[2]
+            ref[1, 2]=0.373225152189*o*x_ref[2]**(o-1)+(0.792629380381)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.289370595843*x[0]**o+(0.81460644718)*x[0]+(0.954820590936)*x[1]**o+(0.152030533729)*x[1]
+        ref[0, 0, 0]=-0.289370595843*o*x_ref[0]**(o-1)+(0.81460644718)
+        ref[0, 0, 1]=0.954820590936*o*x_ref[1]**(o-1)+(0.152030533729)
+        arg[0, 1]=0.481008568709*x[0]**o+(-0.338154048371)*x[0]+(0.582413024393)*x[1]**o+(0.929338364217)*x[1]
+        ref[0, 1, 0]=0.481008568709*o*x_ref[0]**(o-1)+(-0.338154048371)
+        ref[0, 1, 1]=0.582413024393*o*x_ref[1]**(o-1)+(0.929338364217)
+        arg[1, 0]=0.332452465962*x[0]**o+(0.18244657585)*x[0]+(-0.986875807598)*x[1]**o+(0.17271571457)*x[1]
+        ref[1, 0, 0]=0.332452465962*o*x_ref[0]**(o-1)+(0.18244657585)
+        ref[1, 0, 1]=-0.986875807598*o*x_ref[1]**(o-1)+(0.17271571457)
+        arg[1, 1]=0.392252090679*x[0]**o+(0.701501870225)*x[0]+(0.569514662318)*x[1]**o+(0.751078132921)*x[1]
+        ref[1, 1, 0]=0.392252090679*o*x_ref[0]**(o-1)+(0.701501870225)
+        ref[1, 1, 1]=0.569514662318*o*x_ref[1]**(o-1)+(0.751078132921)
+        arg[2, 0]=0.684681293569*x[0]**o+(-0.907752274036)*x[0]+(-0.971332995432)*x[1]**o+(-0.383198421579)*x[1]
+        ref[2, 0, 0]=0.684681293569*o*x_ref[0]**(o-1)+(-0.907752274036)
+        ref[2, 0, 1]=-0.971332995432*o*x_ref[1]**(o-1)+(-0.383198421579)
+        arg[2, 1]=-0.786431856728*x[0]**o+(-0.255543454726)*x[0]+(-0.218326663436)*x[1]**o+(0.599074370907)*x[1]
+        ref[2, 1, 0]=-0.786431856728*o*x_ref[0]**(o-1)+(-0.255543454726)
+        ref[2, 1, 1]=-0.218326663436*o*x_ref[1]**(o-1)+(0.599074370907)
+        if dim==3:
+            arg[0, 0]+=0.330913147588*x[2]**o+(-0.893122997744)*x[2]
+            ref[0, 0, 2]=0.330913147588*o*x_ref[2]**(o-1)+(-0.893122997744)
+            arg[0, 1]+=-0.576416432924*x[2]**o+(-0.416818467199)*x[2]
+            ref[0, 1, 2]=-0.576416432924*o*x_ref[2]**(o-1)+(-0.416818467199)
+            arg[1, 0]+=0.106134883103*x[2]**o+(-0.534915677603)*x[2]
+            ref[1, 0, 2]=0.106134883103*o*x_ref[2]**(o-1)+(-0.534915677603)
+            arg[1, 1]+=-0.543809259282*x[2]**o+(0.38023818215)*x[2]
+            ref[1, 1, 2]=-0.543809259282*o*x_ref[2]**(o-1)+(0.38023818215)
+            arg[2, 0]+=-0.818715649307*x[2]**o+(0.995715372285)*x[2]
+            ref[2, 0, 2]=-0.818715649307*o*x_ref[2]**(o-1)+(0.995715372285)
+            arg[2, 1]+=-0.106099438151*x[2]**o+(-0.413583233333)*x[2]
+            ref[2, 1, 2]=-0.106099438151*o*x_ref[2]**(o-1)+(-0.413583233333)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2),w)
+        ref = Data(0,(4, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.560059271134*x[0]**o+(0.467330614018)*x[0]+(0.500286819312)*x[1]**o+(0.879822761487)*x[1]
+        ref[0, 0, 0, 0]=-0.560059271134*o*x_ref[0]**(o-1)+(0.467330614018)
+        ref[0, 0, 0, 1]=0.500286819312*o*x_ref[1]**(o-1)+(0.879822761487)
+        arg[0, 0, 1]=-0.587744166251*x[0]**o+(-0.360722417953)*x[0]+(-0.789003689052)*x[1]**o+(0.915174026678)*x[1]
+        ref[0, 0, 1, 0]=-0.587744166251*o*x_ref[0]**(o-1)+(-0.360722417953)
+        ref[0, 0, 1, 1]=-0.789003689052*o*x_ref[1]**(o-1)+(0.915174026678)
+        arg[0, 1, 0]=-0.208033143398*x[0]**o+(0.490574720567)*x[0]+(-0.852621459697)*x[1]**o+(0.198461737568)*x[1]
+        ref[0, 1, 0, 0]=-0.208033143398*o*x_ref[0]**(o-1)+(0.490574720567)
+        ref[0, 1, 0, 1]=-0.852621459697*o*x_ref[1]**(o-1)+(0.198461737568)
+        arg[0, 1, 1]=-0.190589798406*x[0]**o+(0.461832949691)*x[0]+(-0.0166489134899)*x[1]**o+(-0.515947638446)*x[1]
+        ref[0, 1, 1, 0]=-0.190589798406*o*x_ref[0]**(o-1)+(0.461832949691)
+        ref[0, 1, 1, 1]=-0.0166489134899*o*x_ref[1]**(o-1)+(-0.515947638446)
+        arg[0, 2, 0]=-0.754775172753*x[0]**o+(0.263770308638)*x[0]+(0.479146646467)*x[1]**o+(0.943631062779)*x[1]
+        ref[0, 2, 0, 0]=-0.754775172753*o*x_ref[0]**(o-1)+(0.263770308638)
+        ref[0, 2, 0, 1]=0.479146646467*o*x_ref[1]**(o-1)+(0.943631062779)
+        arg[0, 2, 1]=-0.769727078522*x[0]**o+(-0.457169629697)*x[0]+(-0.363190101952)*x[1]**o+(-0.829982374066)*x[1]
+        ref[0, 2, 1, 0]=-0.769727078522*o*x_ref[0]**(o-1)+(-0.457169629697)
+        ref[0, 2, 1, 1]=-0.363190101952*o*x_ref[1]**(o-1)+(-0.829982374066)
+        arg[0, 3, 0]=-0.111983175293*x[0]**o+(-0.836292142909)*x[0]+(0.574044836659)*x[1]**o+(0.0990920931255)*x[1]
+        ref[0, 3, 0, 0]=-0.111983175293*o*x_ref[0]**(o-1)+(-0.836292142909)
+        ref[0, 3, 0, 1]=0.574044836659*o*x_ref[1]**(o-1)+(0.0990920931255)
+        arg[0, 3, 1]=-0.704744719527*x[0]**o+(-0.480030447763)*x[0]+(-0.23773017583)*x[1]**o+(0.703581654481)*x[1]
+        ref[0, 3, 1, 0]=-0.704744719527*o*x_ref[0]**(o-1)+(-0.480030447763)
+        ref[0, 3, 1, 1]=-0.23773017583*o*x_ref[1]**(o-1)+(0.703581654481)
+        arg[1, 0, 0]=-0.819028727425*x[0]**o+(-0.688125197606)*x[0]+(0.816332741094)*x[1]**o+(-0.33400450236)*x[1]
+        ref[1, 0, 0, 0]=-0.819028727425*o*x_ref[0]**(o-1)+(-0.688125197606)
+        ref[1, 0, 0, 1]=0.816332741094*o*x_ref[1]**(o-1)+(-0.33400450236)
+        arg[1, 0, 1]=0.293096940498*x[0]**o+(-0.105404689691)*x[0]+(0.808926761855)*x[1]**o+(-0.314227421885)*x[1]
+        ref[1, 0, 1, 0]=0.293096940498*o*x_ref[0]**(o-1)+(-0.105404689691)
+        ref[1, 0, 1, 1]=0.808926761855*o*x_ref[1]**(o-1)+(-0.314227421885)
+        arg[1, 1, 0]=-0.0332552004508*x[0]**o+(0.0572917579595)*x[0]+(0.419904667536)*x[1]**o+(0.764145311614)*x[1]
+        ref[1, 1, 0, 0]=-0.0332552004508*o*x_ref[0]**(o-1)+(0.0572917579595)
+        ref[1, 1, 0, 1]=0.419904667536*o*x_ref[1]**(o-1)+(0.764145311614)
+        arg[1, 1, 1]=0.611276649696*x[0]**o+(-0.879272473841)*x[0]+(-0.436809968546)*x[1]**o+(-0.612012642965)*x[1]
+        ref[1, 1, 1, 0]=0.611276649696*o*x_ref[0]**(o-1)+(-0.879272473841)
+        ref[1, 1, 1, 1]=-0.436809968546*o*x_ref[1]**(o-1)+(-0.612012642965)
+        arg[1, 2, 0]=-0.353099487437*x[0]**o+(0.125210444616)*x[0]+(-0.573867534033)*x[1]**o+(-0.310703566101)*x[1]
+        ref[1, 2, 0, 0]=-0.353099487437*o*x_ref[0]**(o-1)+(0.125210444616)
+        ref[1, 2, 0, 1]=-0.573867534033*o*x_ref[1]**(o-1)+(-0.310703566101)
+        arg[1, 2, 1]=0.814400846116*x[0]**o+(0.748303540115)*x[0]+(0.411492847381)*x[1]**o+(-0.0285735368845)*x[1]
+        ref[1, 2, 1, 0]=0.814400846116*o*x_ref[0]**(o-1)+(0.748303540115)
+        ref[1, 2, 1, 1]=0.411492847381*o*x_ref[1]**(o-1)+(-0.0285735368845)
+        arg[1, 3, 0]=0.834777078093*x[0]**o+(-0.51401245016)*x[0]+(0.771992988564)*x[1]**o+(0.492859805246)*x[1]
+        ref[1, 3, 0, 0]=0.834777078093*o*x_ref[0]**(o-1)+(-0.51401245016)
+        ref[1, 3, 0, 1]=0.771992988564*o*x_ref[1]**(o-1)+(0.492859805246)
+        arg[1, 3, 1]=0.509859930717*x[0]**o+(-0.495422013232)*x[0]+(0.351512804696)*x[1]**o+(-0.103690228103)*x[1]
+        ref[1, 3, 1, 0]=0.509859930717*o*x_ref[0]**(o-1)+(-0.495422013232)
+        ref[1, 3, 1, 1]=0.351512804696*o*x_ref[1]**(o-1)+(-0.103690228103)
+        arg[2, 0, 0]=-0.124678310195*x[0]**o+(-0.80631191296)*x[0]+(-0.693019389705)*x[1]**o+(-0.0049969418003)*x[1]
+        ref[2, 0, 0, 0]=-0.124678310195*o*x_ref[0]**(o-1)+(-0.80631191296)
+        ref[2, 0, 0, 1]=-0.693019389705*o*x_ref[1]**(o-1)+(-0.0049969418003)
+        arg[2, 0, 1]=0.354961225564*x[0]**o+(0.812420878576)*x[0]+(0.719725844579)*x[1]**o+(0.511817360278)*x[1]
+        ref[2, 0, 1, 0]=0.354961225564*o*x_ref[0]**(o-1)+(0.812420878576)
+        ref[2, 0, 1, 1]=0.719725844579*o*x_ref[1]**(o-1)+(0.511817360278)
+        arg[2, 1, 0]=0.0089408273924*x[0]**o+(-0.398439872347)*x[0]+(-0.751942865955)*x[1]**o+(-0.308729062684)*x[1]
+        ref[2, 1, 0, 0]=0.0089408273924*o*x_ref[0]**(o-1)+(-0.398439872347)
+        ref[2, 1, 0, 1]=-0.751942865955*o*x_ref[1]**(o-1)+(-0.308729062684)
+        arg[2, 1, 1]=0.335094624851*x[0]**o+(-0.646506309902)*x[0]+(0.699657532338)*x[1]**o+(0.102120252889)*x[1]
+        ref[2, 1, 1, 0]=0.335094624851*o*x_ref[0]**(o-1)+(-0.646506309902)
+        ref[2, 1, 1, 1]=0.699657532338*o*x_ref[1]**(o-1)+(0.102120252889)
+        arg[2, 2, 0]=-0.171926443345*x[0]**o+(-0.253110776045)*x[0]+(0.607769382776)*x[1]**o+(-0.108506583463)*x[1]
+        ref[2, 2, 0, 0]=-0.171926443345*o*x_ref[0]**(o-1)+(-0.253110776045)
+        ref[2, 2, 0, 1]=0.607769382776*o*x_ref[1]**(o-1)+(-0.108506583463)
+        arg[2, 2, 1]=-0.866147075866*x[0]**o+(-0.961057476614)*x[0]+(-0.991743445632)*x[1]**o+(0.482009025463)*x[1]
+        ref[2, 2, 1, 0]=-0.866147075866*o*x_ref[0]**(o-1)+(-0.961057476614)
+        ref[2, 2, 1, 1]=-0.991743445632*o*x_ref[1]**(o-1)+(0.482009025463)
+        arg[2, 3, 0]=0.493987126599*x[0]**o+(-0.368594082243)*x[0]+(-0.779832635841)*x[1]**o+(-0.413020359005)*x[1]
+        ref[2, 3, 0, 0]=0.493987126599*o*x_ref[0]**(o-1)+(-0.368594082243)
+        ref[2, 3, 0, 1]=-0.779832635841*o*x_ref[1]**(o-1)+(-0.413020359005)
+        arg[2, 3, 1]=0.205584678173*x[0]**o+(0.0675892272466)*x[0]+(-0.711618971148)*x[1]**o+(0.369349682308)*x[1]
+        ref[2, 3, 1, 0]=0.205584678173*o*x_ref[0]**(o-1)+(0.0675892272466)
+        ref[2, 3, 1, 1]=-0.711618971148*o*x_ref[1]**(o-1)+(0.369349682308)
+        arg[3, 0, 0]=-0.87900179321*x[0]**o+(0.446017574306)*x[0]+(-0.598313678822)*x[1]**o+(-0.797856102598)*x[1]
+        ref[3, 0, 0, 0]=-0.87900179321*o*x_ref[0]**(o-1)+(0.446017574306)
+        ref[3, 0, 0, 1]=-0.598313678822*o*x_ref[1]**(o-1)+(-0.797856102598)
+        arg[3, 0, 1]=0.997227101462*x[0]**o+(0.381502617042)*x[0]+(0.629674142356)*x[1]**o+(-0.00993720052916)*x[1]
+        ref[3, 0, 1, 0]=0.997227101462*o*x_ref[0]**(o-1)+(0.381502617042)
+        ref[3, 0, 1, 1]=0.629674142356*o*x_ref[1]**(o-1)+(-0.00993720052916)
+        arg[3, 1, 0]=0.0957865931193*x[0]**o+(0.585486533033)*x[0]+(0.180280230344)*x[1]**o+(-0.249664018942)*x[1]
+        ref[3, 1, 0, 0]=0.0957865931193*o*x_ref[0]**(o-1)+(0.585486533033)
+        ref[3, 1, 0, 1]=0.180280230344*o*x_ref[1]**(o-1)+(-0.249664018942)
+        arg[3, 1, 1]=0.739475402105*x[0]**o+(-0.203646175828)*x[0]+(0.128839845644)*x[1]**o+(0.555486588979)*x[1]
+        ref[3, 1, 1, 0]=0.739475402105*o*x_ref[0]**(o-1)+(-0.203646175828)
+        ref[3, 1, 1, 1]=0.128839845644*o*x_ref[1]**(o-1)+(0.555486588979)
+        arg[3, 2, 0]=-0.718917249684*x[0]**o+(0.589966781662)*x[0]+(0.877230184976)*x[1]**o+(-0.11707907659)*x[1]
+        ref[3, 2, 0, 0]=-0.718917249684*o*x_ref[0]**(o-1)+(0.589966781662)
+        ref[3, 2, 0, 1]=0.877230184976*o*x_ref[1]**(o-1)+(-0.11707907659)
+        arg[3, 2, 1]=-0.535015463143*x[0]**o+(0.179503372656)*x[0]+(-0.0953679958815)*x[1]**o+(0.294110512546)*x[1]
+        ref[3, 2, 1, 0]=-0.535015463143*o*x_ref[0]**(o-1)+(0.179503372656)
+        ref[3, 2, 1, 1]=-0.0953679958815*o*x_ref[1]**(o-1)+(0.294110512546)
+        arg[3, 3, 0]=-0.650416970146*x[0]**o+(-0.337758796699)*x[0]+(0.0337320883746)*x[1]**o+(-0.536778875653)*x[1]
+        ref[3, 3, 0, 0]=-0.650416970146*o*x_ref[0]**(o-1)+(-0.337758796699)
+        ref[3, 3, 0, 1]=0.0337320883746*o*x_ref[1]**(o-1)+(-0.536778875653)
+        arg[3, 3, 1]=-0.0104326760324*x[0]**o+(0.936922830375)*x[0]+(-0.945917355892)*x[1]**o+(-0.809762493804)*x[1]
+        ref[3, 3, 1, 0]=-0.0104326760324*o*x_ref[0]**(o-1)+(0.936922830375)
+        ref[3, 3, 1, 1]=-0.945917355892*o*x_ref[1]**(o-1)+(-0.809762493804)
+        if dim==3:
+            arg[0, 0, 0]+=0.26027072994*x[2]**o+(0.438949053279)*x[2]
+            ref[0, 0, 0, 2]=0.26027072994*o*x_ref[2]**(o-1)+(0.438949053279)
+            arg[0, 0, 1]+=-0.402417614846*x[2]**o+(0.938356997894)*x[2]
+            ref[0, 0, 1, 2]=-0.402417614846*o*x_ref[2]**(o-1)+(0.938356997894)
+            arg[0, 1, 0]+=-0.458200239068*x[2]**o+(0.410102740608)*x[2]
+            ref[0, 1, 0, 2]=-0.458200239068*o*x_ref[2]**(o-1)+(0.410102740608)
+            arg[0, 1, 1]+=0.516084662087*x[2]**o+(0.802447381815)*x[2]
+            ref[0, 1, 1, 2]=0.516084662087*o*x_ref[2]**(o-1)+(0.802447381815)
+            arg[0, 2, 0]+=-0.616131347455*x[2]**o+(-0.580348367297)*x[2]
+            ref[0, 2, 0, 2]=-0.616131347455*o*x_ref[2]**(o-1)+(-0.580348367297)
+            arg[0, 2, 1]+=-0.877377947317*x[2]**o+(-0.219704006371)*x[2]
+            ref[0, 2, 1, 2]=-0.877377947317*o*x_ref[2]**(o-1)+(-0.219704006371)
+            arg[0, 3, 0]+=-0.256093843604*x[2]**o+(-0.310404388672)*x[2]
+            ref[0, 3, 0, 2]=-0.256093843604*o*x_ref[2]**(o-1)+(-0.310404388672)
+            arg[0, 3, 1]+=-0.478113594287*x[2]**o+(-0.907401607145)*x[2]
+            ref[0, 3, 1, 2]=-0.478113594287*o*x_ref[2]**(o-1)+(-0.907401607145)
+            arg[1, 0, 0]+=-0.680490152814*x[2]**o+(0.424925315576)*x[2]
+            ref[1, 0, 0, 2]=-0.680490152814*o*x_ref[2]**(o-1)+(0.424925315576)
+            arg[1, 0, 1]+=0.11021633108*x[2]**o+(-0.744065013118)*x[2]
+            ref[1, 0, 1, 2]=0.11021633108*o*x_ref[2]**(o-1)+(-0.744065013118)
+            arg[1, 1, 0]+=0.435355894999*x[2]**o+(0.0104037183736)*x[2]
+            ref[1, 1, 0, 2]=0.435355894999*o*x_ref[2]**(o-1)+(0.0104037183736)
+            arg[1, 1, 1]+=-0.653998144962*x[2]**o+(-0.831658649559)*x[2]
+            ref[1, 1, 1, 2]=-0.653998144962*o*x_ref[2]**(o-1)+(-0.831658649559)
+            arg[1, 2, 0]+=-0.736061461272*x[2]**o+(-0.5152156695)*x[2]
+            ref[1, 2, 0, 2]=-0.736061461272*o*x_ref[2]**(o-1)+(-0.5152156695)
+            arg[1, 2, 1]+=0.0708328135449*x[2]**o+(-0.0296100628202)*x[2]
+            ref[1, 2, 1, 2]=0.0708328135449*o*x_ref[2]**(o-1)+(-0.0296100628202)
+            arg[1, 3, 0]+=0.149941548102*x[2]**o+(0.98810766842)*x[2]
+            ref[1, 3, 0, 2]=0.149941548102*o*x_ref[2]**(o-1)+(0.98810766842)
+            arg[1, 3, 1]+=0.970289135501*x[2]**o+(-0.0757872190773)*x[2]
+            ref[1, 3, 1, 2]=0.970289135501*o*x_ref[2]**(o-1)+(-0.0757872190773)
+            arg[2, 0, 0]+=0.684626130251*x[2]**o+(-0.77134106879)*x[2]
+            ref[2, 0, 0, 2]=0.684626130251*o*x_ref[2]**(o-1)+(-0.77134106879)
+            arg[2, 0, 1]+=-0.499582849902*x[2]**o+(-0.223376358713)*x[2]
+            ref[2, 0, 1, 2]=-0.499582849902*o*x_ref[2]**(o-1)+(-0.223376358713)
+            arg[2, 1, 0]+=-0.422623930429*x[2]**o+(0.726923080473)*x[2]
+            ref[2, 1, 0, 2]=-0.422623930429*o*x_ref[2]**(o-1)+(0.726923080473)
+            arg[2, 1, 1]+=-0.4850266656*x[2]**o+(-0.42766216707)*x[2]
+            ref[2, 1, 1, 2]=-0.4850266656*o*x_ref[2]**(o-1)+(-0.42766216707)
+            arg[2, 2, 0]+=0.255402543515*x[2]**o+(-0.88832307078)*x[2]
+            ref[2, 2, 0, 2]=0.255402543515*o*x_ref[2]**(o-1)+(-0.88832307078)
+            arg[2, 2, 1]+=0.255382966902*x[2]**o+(0.121550865217)*x[2]
+            ref[2, 2, 1, 2]=0.255382966902*o*x_ref[2]**(o-1)+(0.121550865217)
+            arg[2, 3, 0]+=-0.667817721605*x[2]**o+(0.261441731609)*x[2]
+            ref[2, 3, 0, 2]=-0.667817721605*o*x_ref[2]**(o-1)+(0.261441731609)
+            arg[2, 3, 1]+=0.0880711595685*x[2]**o+(0.110882359161)*x[2]
+            ref[2, 3, 1, 2]=0.0880711595685*o*x_ref[2]**(o-1)+(0.110882359161)
+            arg[3, 0, 0]+=-0.908423788171*x[2]**o+(0.184468633466)*x[2]
+            ref[3, 0, 0, 2]=-0.908423788171*o*x_ref[2]**(o-1)+(0.184468633466)
+            arg[3, 0, 1]+=-0.91624454956*x[2]**o+(-0.132574190416)*x[2]
+            ref[3, 0, 1, 2]=-0.91624454956*o*x_ref[2]**(o-1)+(-0.132574190416)
+            arg[3, 1, 0]+=-0.875711878542*x[2]**o+(0.261579513602)*x[2]
+            ref[3, 1, 0, 2]=-0.875711878542*o*x_ref[2]**(o-1)+(0.261579513602)
+            arg[3, 1, 1]+=-0.96847823677*x[2]**o+(0.34701835653)*x[2]
+            ref[3, 1, 1, 2]=-0.96847823677*o*x_ref[2]**(o-1)+(0.34701835653)
+            arg[3, 2, 0]+=0.573773825826*x[2]**o+(-0.105568586878)*x[2]
+            ref[3, 2, 0, 2]=0.573773825826*o*x_ref[2]**(o-1)+(-0.105568586878)
+            arg[3, 2, 1]+=0.913501958506*x[2]**o+(0.0795196523555)*x[2]
+            ref[3, 2, 1, 2]=0.913501958506*o*x_ref[2]**(o-1)+(0.0795196523555)
+            arg[3, 3, 0]+=-0.346875786666*x[2]**o+(0.43422981074)*x[2]
+            ref[3, 3, 0, 2]=-0.346875786666*o*x_ref[2]**(o-1)+(0.43422981074)
+            arg[3, 3, 1]+=0.864861278036*x[2]**o+(-0.822461059376)*x[2]
+            ref[3, 3, 1, 2]=0.864861278036*o*x_ref[2]**(o-1)+(-0.822461059376)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.439884476763*x[0]**o+(0.990190131361)*x[0]+(0.0539437719919)*x[1]**o+(0.611188258043)*x[1]
+        ref[0]=0.439884476763*o*x_ref[0]**(o-1)+(0.990190131361)
+        ref[1]=0.0539437719919*o*x_ref[1]**(o-1)+(0.611188258043)
+        if dim==3:
+            arg+=(-0.617109409745)*x[2]**o+(0.1528803613)*x[2]
+            ref[2]=-0.617109409745*o*x_ref[2]**(o-1)+(0.1528803613)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.167649380653*x[0]**o+(-0.489900975603)*x[0]+(-0.682244457611)*x[1]**o+(-0.47198375801)*x[1]
+        ref[0, 0]=-0.167649380653*o*x_ref[0]**(o-1)+(-0.489900975603)
+        ref[0, 1]=-0.682244457611*o*x_ref[1]**(o-1)+(-0.47198375801)
+        arg[1,]=0.970694263663*x[0]**o+(-0.745479797507)*x[0]+(0.774233609942)*x[1]**o+(0.0967852429488)*x[1]
+        ref[1, 0]=0.970694263663*o*x_ref[0]**(o-1)+(-0.745479797507)
+        ref[1, 1]=0.774233609942*o*x_ref[1]**(o-1)+(0.0967852429488)
+        if dim==3:
+            arg[0,]+=0.142525266956*x[2]**o+(0.346179299632)*x[2]
+            ref[0, 2]=0.142525266956*o*x_ref[2]**(o-1)+(0.346179299632)
+            arg[1,]+=0.129405215689*x[2]**o+(-0.630843537766)*x[2]
+            ref[1, 2]=0.129405215689*o*x_ref[2]**(o-1)+(-0.630843537766)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4)+(dim,),w_ref)
+        arg[0, 0]=-0.877909015805*x[0]**o+(-0.701241315038)*x[0]+(0.636771243683)*x[1]**o+(0.0498307996992)*x[1]
+        ref[0, 0, 0]=-0.877909015805*o*x_ref[0]**(o-1)+(-0.701241315038)
+        ref[0, 0, 1]=0.636771243683*o*x_ref[1]**(o-1)+(0.0498307996992)
+        arg[0, 1]=-0.375828465529*x[0]**o+(-0.4241501204)*x[0]+(0.385257265081)*x[1]**o+(0.929329910547)*x[1]
+        ref[0, 1, 0]=-0.375828465529*o*x_ref[0]**(o-1)+(-0.4241501204)
+        ref[0, 1, 1]=0.385257265081*o*x_ref[1]**(o-1)+(0.929329910547)
+        arg[0, 2]=0.308106406176*x[0]**o+(0.349379482977)*x[0]+(0.60959538763)*x[1]**o+(-0.0159887763805)*x[1]
+        ref[0, 2, 0]=0.308106406176*o*x_ref[0]**(o-1)+(0.349379482977)
+        ref[0, 2, 1]=0.60959538763*o*x_ref[1]**(o-1)+(-0.0159887763805)
+        arg[0, 3]=-0.984631861097*x[0]**o+(0.95560144925)*x[0]+(0.941615054331)*x[1]**o+(0.93914410792)*x[1]
+        ref[0, 3, 0]=-0.984631861097*o*x_ref[0]**(o-1)+(0.95560144925)
+        ref[0, 3, 1]=0.941615054331*o*x_ref[1]**(o-1)+(0.93914410792)
+        arg[1, 0]=0.362420587404*x[0]**o+(-0.314490312925)*x[0]+(0.472107414497)*x[1]**o+(0.990030947269)*x[1]
+        ref[1, 0, 0]=0.362420587404*o*x_ref[0]**(o-1)+(-0.314490312925)
+        ref[1, 0, 1]=0.472107414497*o*x_ref[1]**(o-1)+(0.990030947269)
+        arg[1, 1]=-0.513476982666*x[0]**o+(-0.929576586763)*x[0]+(0.993908090696)*x[1]**o+(-0.247111208969)*x[1]
+        ref[1, 1, 0]=-0.513476982666*o*x_ref[0]**(o-1)+(-0.929576586763)
+        ref[1, 1, 1]=0.993908090696*o*x_ref[1]**(o-1)+(-0.247111208969)
+        arg[1, 2]=0.94121877766*x[0]**o+(0.861883326619)*x[0]+(0.023099826123)*x[1]**o+(0.242430403313)*x[1]
+        ref[1, 2, 0]=0.94121877766*o*x_ref[0]**(o-1)+(0.861883326619)
+        ref[1, 2, 1]=0.023099826123*o*x_ref[1]**(o-1)+(0.242430403313)
+        arg[1, 3]=-0.538399605983*x[0]**o+(0.122831164124)*x[0]+(0.514011345939)*x[1]**o+(-0.21501548208)*x[1]
+        ref[1, 3, 0]=-0.538399605983*o*x_ref[0]**(o-1)+(0.122831164124)
+        ref[1, 3, 1]=0.514011345939*o*x_ref[1]**(o-1)+(-0.21501548208)
+        arg[2, 0]=-0.894262635206*x[0]**o+(0.859532247868)*x[0]+(-0.504491940894)*x[1]**o+(0.0898204501868)*x[1]
+        ref[2, 0, 0]=-0.894262635206*o*x_ref[0]**(o-1)+(0.859532247868)
+        ref[2, 0, 1]=-0.504491940894*o*x_ref[1]**(o-1)+(0.0898204501868)
+        arg[2, 1]=-0.33797599881*x[0]**o+(0.542783030309)*x[0]+(-0.341250110731)*x[1]**o+(-0.281667685625)*x[1]
+        ref[2, 1, 0]=-0.33797599881*o*x_ref[0]**(o-1)+(0.542783030309)
+        ref[2, 1, 1]=-0.341250110731*o*x_ref[1]**(o-1)+(-0.281667685625)
+        arg[2, 2]=0.912029440167*x[0]**o+(0.072066178499)*x[0]+(-0.428610785915)*x[1]**o+(-0.624038257148)*x[1]
+        ref[2, 2, 0]=0.912029440167*o*x_ref[0]**(o-1)+(0.072066178499)
+        ref[2, 2, 1]=-0.428610785915*o*x_ref[1]**(o-1)+(-0.624038257148)
+        arg[2, 3]=0.0248401317943*x[0]**o+(-0.621945174919)*x[0]+(0.508194555737)*x[1]**o+(-0.638413987005)*x[1]
+        ref[2, 3, 0]=0.0248401317943*o*x_ref[0]**(o-1)+(-0.621945174919)
+        ref[2, 3, 1]=0.508194555737*o*x_ref[1]**(o-1)+(-0.638413987005)
+        if dim==3:
+            arg[0, 0]+=-0.342397894303*x[2]**o+(0.670839515657)*x[2]
+            ref[0, 0, 2]=-0.342397894303*o*x_ref[2]**(o-1)+(0.670839515657)
+            arg[0, 1]+=0.187284074365*x[2]**o+(0.906838791867)*x[2]
+            ref[0, 1, 2]=0.187284074365*o*x_ref[2]**(o-1)+(0.906838791867)
+            arg[0, 2]+=0.296960337964*x[2]**o+(-0.931687167041)*x[2]
+            ref[0, 2, 2]=0.296960337964*o*x_ref[2]**(o-1)+(-0.931687167041)
+            arg[0, 3]+=0.854444088934*x[2]**o+(0.712737209268)*x[2]
+            ref[0, 3, 2]=0.854444088934*o*x_ref[2]**(o-1)+(0.712737209268)
+            arg[1, 0]+=-0.743094938445*x[2]**o+(0.00935880069884)*x[2]
+            ref[1, 0, 2]=-0.743094938445*o*x_ref[2]**(o-1)+(0.00935880069884)
+            arg[1, 1]+=-0.813680649986*x[2]**o+(-0.722341542011)*x[2]
+            ref[1, 1, 2]=-0.813680649986*o*x_ref[2]**(o-1)+(-0.722341542011)
+            arg[1, 2]+=-0.814091165054*x[2]**o+(0.124642733994)*x[2]
+            ref[1, 2, 2]=-0.814091165054*o*x_ref[2]**(o-1)+(0.124642733994)
+            arg[1, 3]+=-0.604603713925*x[2]**o+(-0.797120174811)*x[2]
+            ref[1, 3, 2]=-0.604603713925*o*x_ref[2]**(o-1)+(-0.797120174811)
+            arg[2, 0]+=0.1106554727*x[2]**o+(0.333872848172)*x[2]
+            ref[2, 0, 2]=0.1106554727*o*x_ref[2]**(o-1)+(0.333872848172)
+            arg[2, 1]+=-0.699040188494*x[2]**o+(0.0940641539417)*x[2]
+            ref[2, 1, 2]=-0.699040188494*o*x_ref[2]**(o-1)+(0.0940641539417)
+            arg[2, 2]+=-0.593056912794*x[2]**o+(0.0676558011581)*x[2]
+            ref[2, 2, 2]=-0.593056912794*o*x_ref[2]**(o-1)+(0.0676558011581)
+            arg[2, 3]+=-0.623553620932*x[2]**o+(-0.577867791072)*x[2]
+            ref[2, 3, 2]=-0.623553620932*o*x_ref[2]**(o-1)+(-0.577867791072)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2),w)
+        ref = Data(0,(4, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.963433720038*x[0]**o+(0.690703294085)*x[0]+(-0.528338774054)*x[1]**o+(-0.000929054478231)*x[1]
+        ref[0, 0, 0, 0]=-0.963433720038*o*x_ref[0]**(o-1)+(0.690703294085)
+        ref[0, 0, 0, 1]=-0.528338774054*o*x_ref[1]**(o-1)+(-0.000929054478231)
+        arg[0, 0, 1]=0.290837954081*x[0]**o+(0.510461586029)*x[0]+(0.583038162572)*x[1]**o+(0.269328399234)*x[1]
+        ref[0, 0, 1, 0]=0.290837954081*o*x_ref[0]**(o-1)+(0.510461586029)
+        ref[0, 0, 1, 1]=0.583038162572*o*x_ref[1]**(o-1)+(0.269328399234)
+        arg[0, 1, 0]=-0.862294844801*x[0]**o+(0.185019671546)*x[0]+(0.33538067428)*x[1]**o+(-0.959433117649)*x[1]
+        ref[0, 1, 0, 0]=-0.862294844801*o*x_ref[0]**(o-1)+(0.185019671546)
+        ref[0, 1, 0, 1]=0.33538067428*o*x_ref[1]**(o-1)+(-0.959433117649)
+        arg[0, 1, 1]=0.347516801439*x[0]**o+(0.370751629707)*x[0]+(-0.213982639699)*x[1]**o+(-0.330956135944)*x[1]
+        ref[0, 1, 1, 0]=0.347516801439*o*x_ref[0]**(o-1)+(0.370751629707)
+        ref[0, 1, 1, 1]=-0.213982639699*o*x_ref[1]**(o-1)+(-0.330956135944)
+        arg[0, 2, 0]=0.534784538502*x[0]**o+(0.00529173963882)*x[0]+(0.215524829602)*x[1]**o+(0.347659803907)*x[1]
+        ref[0, 2, 0, 0]=0.534784538502*o*x_ref[0]**(o-1)+(0.00529173963882)
+        ref[0, 2, 0, 1]=0.215524829602*o*x_ref[1]**(o-1)+(0.347659803907)
+        arg[0, 2, 1]=0.732684374677*x[0]**o+(0.290907026947)*x[0]+(-0.912873112158)*x[1]**o+(0.0737792695313)*x[1]
+        ref[0, 2, 1, 0]=0.732684374677*o*x_ref[0]**(o-1)+(0.290907026947)
+        ref[0, 2, 1, 1]=-0.912873112158*o*x_ref[1]**(o-1)+(0.0737792695313)
+        arg[0, 3, 0]=-0.345625773448*x[0]**o+(0.51118339689)*x[0]+(0.176231322122)*x[1]**o+(0.617313026203)*x[1]
+        ref[0, 3, 0, 0]=-0.345625773448*o*x_ref[0]**(o-1)+(0.51118339689)
+        ref[0, 3, 0, 1]=0.176231322122*o*x_ref[1]**(o-1)+(0.617313026203)
+        arg[0, 3, 1]=-0.534673783976*x[0]**o+(-0.63346612824)*x[0]+(0.291460623751)*x[1]**o+(-0.700186963967)*x[1]
+        ref[0, 3, 1, 0]=-0.534673783976*o*x_ref[0]**(o-1)+(-0.63346612824)
+        ref[0, 3, 1, 1]=0.291460623751*o*x_ref[1]**(o-1)+(-0.700186963967)
+        arg[1, 0, 0]=0.700419553322*x[0]**o+(0.52465111145)*x[0]+(0.818846885832)*x[1]**o+(0.671152138595)*x[1]
+        ref[1, 0, 0, 0]=0.700419553322*o*x_ref[0]**(o-1)+(0.52465111145)
+        ref[1, 0, 0, 1]=0.818846885832*o*x_ref[1]**(o-1)+(0.671152138595)
+        arg[1, 0, 1]=-0.196465779422*x[0]**o+(-0.279205960084)*x[0]+(0.116908353082)*x[1]**o+(0.530042515906)*x[1]
+        ref[1, 0, 1, 0]=-0.196465779422*o*x_ref[0]**(o-1)+(-0.279205960084)
+        ref[1, 0, 1, 1]=0.116908353082*o*x_ref[1]**(o-1)+(0.530042515906)
+        arg[1, 1, 0]=0.0589254897125*x[0]**o+(-0.601860854033)*x[0]+(0.726687832296)*x[1]**o+(0.464257902159)*x[1]
+        ref[1, 1, 0, 0]=0.0589254897125*o*x_ref[0]**(o-1)+(-0.601860854033)
+        ref[1, 1, 0, 1]=0.726687832296*o*x_ref[1]**(o-1)+(0.464257902159)
+        arg[1, 1, 1]=0.367224744517*x[0]**o+(-0.875588247176)*x[0]+(0.865348055743)*x[1]**o+(0.00437553598118)*x[1]
+        ref[1, 1, 1, 0]=0.367224744517*o*x_ref[0]**(o-1)+(-0.875588247176)
+        ref[1, 1, 1, 1]=0.865348055743*o*x_ref[1]**(o-1)+(0.00437553598118)
+        arg[1, 2, 0]=0.281114257229*x[0]**o+(-0.714229553815)*x[0]+(-0.460812024605)*x[1]**o+(-0.81496968221)*x[1]
+        ref[1, 2, 0, 0]=0.281114257229*o*x_ref[0]**(o-1)+(-0.714229553815)
+        ref[1, 2, 0, 1]=-0.460812024605*o*x_ref[1]**(o-1)+(-0.81496968221)
+        arg[1, 2, 1]=0.320929593439*x[0]**o+(-0.565412117745)*x[0]+(-0.802462422575)*x[1]**o+(-0.360784966717)*x[1]
+        ref[1, 2, 1, 0]=0.320929593439*o*x_ref[0]**(o-1)+(-0.565412117745)
+        ref[1, 2, 1, 1]=-0.802462422575*o*x_ref[1]**(o-1)+(-0.360784966717)
+        arg[1, 3, 0]=-0.0636311610228*x[0]**o+(0.346476771004)*x[0]+(0.589566226147)*x[1]**o+(-0.584976950801)*x[1]
+        ref[1, 3, 0, 0]=-0.0636311610228*o*x_ref[0]**(o-1)+(0.346476771004)
+        ref[1, 3, 0, 1]=0.589566226147*o*x_ref[1]**(o-1)+(-0.584976950801)
+        arg[1, 3, 1]=0.882974278377*x[0]**o+(0.73725502277)*x[0]+(0.27240735972)*x[1]**o+(0.74536293339)*x[1]
+        ref[1, 3, 1, 0]=0.882974278377*o*x_ref[0]**(o-1)+(0.73725502277)
+        ref[1, 3, 1, 1]=0.27240735972*o*x_ref[1]**(o-1)+(0.74536293339)
+        arg[2, 0, 0]=0.690879975022*x[0]**o+(0.0646549059385)*x[0]+(0.557006914962)*x[1]**o+(-0.316475837995)*x[1]
+        ref[2, 0, 0, 0]=0.690879975022*o*x_ref[0]**(o-1)+(0.0646549059385)
+        ref[2, 0, 0, 1]=0.557006914962*o*x_ref[1]**(o-1)+(-0.316475837995)
+        arg[2, 0, 1]=0.86712273663*x[0]**o+(0.885670720908)*x[0]+(0.482452181956)*x[1]**o+(0.715887566235)*x[1]
+        ref[2, 0, 1, 0]=0.86712273663*o*x_ref[0]**(o-1)+(0.885670720908)
+        ref[2, 0, 1, 1]=0.482452181956*o*x_ref[1]**(o-1)+(0.715887566235)
+        arg[2, 1, 0]=-0.944687389763*x[0]**o+(0.352507615121)*x[0]+(0.265037683371)*x[1]**o+(-0.592464969)*x[1]
+        ref[2, 1, 0, 0]=-0.944687389763*o*x_ref[0]**(o-1)+(0.352507615121)
+        ref[2, 1, 0, 1]=0.265037683371*o*x_ref[1]**(o-1)+(-0.592464969)
+        arg[2, 1, 1]=-0.31893056484*x[0]**o+(0.936437558154)*x[0]+(0.404413231261)*x[1]**o+(0.957049028844)*x[1]
+        ref[2, 1, 1, 0]=-0.31893056484*o*x_ref[0]**(o-1)+(0.936437558154)
+        ref[2, 1, 1, 1]=0.404413231261*o*x_ref[1]**(o-1)+(0.957049028844)
+        arg[2, 2, 0]=-0.42621390283*x[0]**o+(-0.577415698514)*x[0]+(-0.600598325854)*x[1]**o+(-0.789261748588)*x[1]
+        ref[2, 2, 0, 0]=-0.42621390283*o*x_ref[0]**(o-1)+(-0.577415698514)
+        ref[2, 2, 0, 1]=-0.600598325854*o*x_ref[1]**(o-1)+(-0.789261748588)
+        arg[2, 2, 1]=0.00622634992062*x[0]**o+(0.72140210957)*x[0]+(-0.265000853404)*x[1]**o+(0.551143731636)*x[1]
+        ref[2, 2, 1, 0]=0.00622634992062*o*x_ref[0]**(o-1)+(0.72140210957)
+        ref[2, 2, 1, 1]=-0.265000853404*o*x_ref[1]**(o-1)+(0.551143731636)
+        arg[2, 3, 0]=-0.344964961772*x[0]**o+(-0.583471536835)*x[0]+(0.901567041116)*x[1]**o+(0.296415365106)*x[1]
+        ref[2, 3, 0, 0]=-0.344964961772*o*x_ref[0]**(o-1)+(-0.583471536835)
+        ref[2, 3, 0, 1]=0.901567041116*o*x_ref[1]**(o-1)+(0.296415365106)
+        arg[2, 3, 1]=0.180635752886*x[0]**o+(0.420621026567)*x[0]+(0.00321984032041)*x[1]**o+(-0.818081368138)*x[1]
+        ref[2, 3, 1, 0]=0.180635752886*o*x_ref[0]**(o-1)+(0.420621026567)
+        ref[2, 3, 1, 1]=0.00321984032041*o*x_ref[1]**(o-1)+(-0.818081368138)
+        arg[3, 0, 0]=-0.206554656465*x[0]**o+(0.806787858413)*x[0]+(0.499125291457)*x[1]**o+(-0.429505778364)*x[1]
+        ref[3, 0, 0, 0]=-0.206554656465*o*x_ref[0]**(o-1)+(0.806787858413)
+        ref[3, 0, 0, 1]=0.499125291457*o*x_ref[1]**(o-1)+(-0.429505778364)
+        arg[3, 0, 1]=-0.768380479995*x[0]**o+(-0.708446960254)*x[0]+(-0.395179418841)*x[1]**o+(0.0992926454252)*x[1]
+        ref[3, 0, 1, 0]=-0.768380479995*o*x_ref[0]**(o-1)+(-0.708446960254)
+        ref[3, 0, 1, 1]=-0.395179418841*o*x_ref[1]**(o-1)+(0.0992926454252)
+        arg[3, 1, 0]=-0.702281896971*x[0]**o+(-0.953225968208)*x[0]+(-0.122131740714)*x[1]**o+(0.0225162247151)*x[1]
+        ref[3, 1, 0, 0]=-0.702281896971*o*x_ref[0]**(o-1)+(-0.953225968208)
+        ref[3, 1, 0, 1]=-0.122131740714*o*x_ref[1]**(o-1)+(0.0225162247151)
+        arg[3, 1, 1]=-0.876318314045*x[0]**o+(-0.0733169407283)*x[0]+(0.677317361226)*x[1]**o+(0.0183393847194)*x[1]
+        ref[3, 1, 1, 0]=-0.876318314045*o*x_ref[0]**(o-1)+(-0.0733169407283)
+        ref[3, 1, 1, 1]=0.677317361226*o*x_ref[1]**(o-1)+(0.0183393847194)
+        arg[3, 2, 0]=0.639331303474*x[0]**o+(-0.757191795984)*x[0]+(-0.990547428689)*x[1]**o+(0.293773540598)*x[1]
+        ref[3, 2, 0, 0]=0.639331303474*o*x_ref[0]**(o-1)+(-0.757191795984)
+        ref[3, 2, 0, 1]=-0.990547428689*o*x_ref[1]**(o-1)+(0.293773540598)
+        arg[3, 2, 1]=-0.931707390605*x[0]**o+(-0.855186110334)*x[0]+(0.37848333903)*x[1]**o+(-0.908339766807)*x[1]
+        ref[3, 2, 1, 0]=-0.931707390605*o*x_ref[0]**(o-1)+(-0.855186110334)
+        ref[3, 2, 1, 1]=0.37848333903*o*x_ref[1]**(o-1)+(-0.908339766807)
+        arg[3, 3, 0]=-0.481041626286*x[0]**o+(0.63098305856)*x[0]+(0.427173507638)*x[1]**o+(-0.865640639603)*x[1]
+        ref[3, 3, 0, 0]=-0.481041626286*o*x_ref[0]**(o-1)+(0.63098305856)
+        ref[3, 3, 0, 1]=0.427173507638*o*x_ref[1]**(o-1)+(-0.865640639603)
+        arg[3, 3, 1]=0.738062959132*x[0]**o+(0.843988411974)*x[0]+(0.139882030468)*x[1]**o+(0.790284107371)*x[1]
+        ref[3, 3, 1, 0]=0.738062959132*o*x_ref[0]**(o-1)+(0.843988411974)
+        ref[3, 3, 1, 1]=0.139882030468*o*x_ref[1]**(o-1)+(0.790284107371)
+        if dim==3:
+            arg[0, 0, 0]+=-0.0473865990366*x[2]**o+(-0.286323299436)*x[2]
+            ref[0, 0, 0, 2]=-0.0473865990366*o*x_ref[2]**(o-1)+(-0.286323299436)
+            arg[0, 0, 1]+=-0.76232885191*x[2]**o+(0.049153831827)*x[2]
+            ref[0, 0, 1, 2]=-0.76232885191*o*x_ref[2]**(o-1)+(0.049153831827)
+            arg[0, 1, 0]+=0.815930656833*x[2]**o+(-0.848560724134)*x[2]
+            ref[0, 1, 0, 2]=0.815930656833*o*x_ref[2]**(o-1)+(-0.848560724134)
+            arg[0, 1, 1]+=-0.147932934094*x[2]**o+(-0.767377455465)*x[2]
+            ref[0, 1, 1, 2]=-0.147932934094*o*x_ref[2]**(o-1)+(-0.767377455465)
+            arg[0, 2, 0]+=-0.106884323422*x[2]**o+(-0.461807946827)*x[2]
+            ref[0, 2, 0, 2]=-0.106884323422*o*x_ref[2]**(o-1)+(-0.461807946827)
+            arg[0, 2, 1]+=0.399383779914*x[2]**o+(-0.0490647846722)*x[2]
+            ref[0, 2, 1, 2]=0.399383779914*o*x_ref[2]**(o-1)+(-0.0490647846722)
+            arg[0, 3, 0]+=-0.301739970048*x[2]**o+(0.248373184231)*x[2]
+            ref[0, 3, 0, 2]=-0.301739970048*o*x_ref[2]**(o-1)+(0.248373184231)
+            arg[0, 3, 1]+=-0.0856708923663*x[2]**o+(0.62829202076)*x[2]
+            ref[0, 3, 1, 2]=-0.0856708923663*o*x_ref[2]**(o-1)+(0.62829202076)
+            arg[1, 0, 0]+=0.636715500377*x[2]**o+(0.619109964001)*x[2]
+            ref[1, 0, 0, 2]=0.636715500377*o*x_ref[2]**(o-1)+(0.619109964001)
+            arg[1, 0, 1]+=-0.672542263488*x[2]**o+(-0.914919195557)*x[2]
+            ref[1, 0, 1, 2]=-0.672542263488*o*x_ref[2]**(o-1)+(-0.914919195557)
+            arg[1, 1, 0]+=0.404341313868*x[2]**o+(-0.12316123684)*x[2]
+            ref[1, 1, 0, 2]=0.404341313868*o*x_ref[2]**(o-1)+(-0.12316123684)
+            arg[1, 1, 1]+=0.78362077898*x[2]**o+(0.542574821529)*x[2]
+            ref[1, 1, 1, 2]=0.78362077898*o*x_ref[2]**(o-1)+(0.542574821529)
+            arg[1, 2, 0]+=-0.679498482439*x[2]**o+(-0.00796531353047)*x[2]
+            ref[1, 2, 0, 2]=-0.679498482439*o*x_ref[2]**(o-1)+(-0.00796531353047)
+            arg[1, 2, 1]+=0.448809085029*x[2]**o+(0.0600402496632)*x[2]
+            ref[1, 2, 1, 2]=0.448809085029*o*x_ref[2]**(o-1)+(0.0600402496632)
+            arg[1, 3, 0]+=0.0357244916407*x[2]**o+(-0.178546405085)*x[2]
+            ref[1, 3, 0, 2]=0.0357244916407*o*x_ref[2]**(o-1)+(-0.178546405085)
+            arg[1, 3, 1]+=-0.142048644813*x[2]**o+(0.187193889686)*x[2]
+            ref[1, 3, 1, 2]=-0.142048644813*o*x_ref[2]**(o-1)+(0.187193889686)
+            arg[2, 0, 0]+=0.842422815101*x[2]**o+(0.997494454453)*x[2]
+            ref[2, 0, 0, 2]=0.842422815101*o*x_ref[2]**(o-1)+(0.997494454453)
+            arg[2, 0, 1]+=-0.206140040496*x[2]**o+(-0.904065562201)*x[2]
+            ref[2, 0, 1, 2]=-0.206140040496*o*x_ref[2]**(o-1)+(-0.904065562201)
+            arg[2, 1, 0]+=0.158036840028*x[2]**o+(0.34833321395)*x[2]
+            ref[2, 1, 0, 2]=0.158036840028*o*x_ref[2]**(o-1)+(0.34833321395)
+            arg[2, 1, 1]+=-0.258260874221*x[2]**o+(-0.485189285612)*x[2]
+            ref[2, 1, 1, 2]=-0.258260874221*o*x_ref[2]**(o-1)+(-0.485189285612)
+            arg[2, 2, 0]+=0.547407150391*x[2]**o+(-0.303707227432)*x[2]
+            ref[2, 2, 0, 2]=0.547407150391*o*x_ref[2]**(o-1)+(-0.303707227432)
+            arg[2, 2, 1]+=-0.643965243932*x[2]**o+(-0.324360034339)*x[2]
+            ref[2, 2, 1, 2]=-0.643965243932*o*x_ref[2]**(o-1)+(-0.324360034339)
+            arg[2, 3, 0]+=0.792163574278*x[2]**o+(0.113017104167)*x[2]
+            ref[2, 3, 0, 2]=0.792163574278*o*x_ref[2]**(o-1)+(0.113017104167)
+            arg[2, 3, 1]+=0.204800642807*x[2]**o+(0.0734575916362)*x[2]
+            ref[2, 3, 1, 2]=0.204800642807*o*x_ref[2]**(o-1)+(0.0734575916362)
+            arg[3, 0, 0]+=0.709913419966*x[2]**o+(0.699576417978)*x[2]
+            ref[3, 0, 0, 2]=0.709913419966*o*x_ref[2]**(o-1)+(0.699576417978)
+            arg[3, 0, 1]+=0.279915228229*x[2]**o+(0.285073449055)*x[2]
+            ref[3, 0, 1, 2]=0.279915228229*o*x_ref[2]**(o-1)+(0.285073449055)
+            arg[3, 1, 0]+=0.899063500198*x[2]**o+(0.619510427001)*x[2]
+            ref[3, 1, 0, 2]=0.899063500198*o*x_ref[2]**(o-1)+(0.619510427001)
+            arg[3, 1, 1]+=-0.301127396753*x[2]**o+(-0.647815405766)*x[2]
+            ref[3, 1, 1, 2]=-0.301127396753*o*x_ref[2]**(o-1)+(-0.647815405766)
+            arg[3, 2, 0]+=-0.12379455373*x[2]**o+(0.123003825669)*x[2]
+            ref[3, 2, 0, 2]=-0.12379455373*o*x_ref[2]**(o-1)+(0.123003825669)
+            arg[3, 2, 1]+=0.0301207542112*x[2]**o+(-0.850448329599)*x[2]
+            ref[3, 2, 1, 2]=0.0301207542112*o*x_ref[2]**(o-1)+(-0.850448329599)
+            arg[3, 3, 0]+=0.432092957765*x[2]**o+(0.269816383191)*x[2]
+            ref[3, 3, 0, 2]=0.432092957765*o*x_ref[2]**(o-1)+(0.269816383191)
+            arg[3, 3, 1]+=0.150942607463*x[2]**o+(-0.587332089465)*x[2]
+            ref[3, 3, 1, 2]=0.150942607463*o*x_ref[2]**(o-1)+(-0.587332089465)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.25755193466*x[0]+(-0.931125362247)*x[1]
+        ref[0]=-0.25755193466
+        ref[1]=-0.931125362247
+        if dim==3:
+            arg+=(0.233926255584)*x[2]
+            ref[2]=0.233926255584
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.0975093105545*x[0]+(0.744608196184)*x[1]
+        ref[0, 0]=-0.0975093105545
+        ref[0, 1]=0.744608196184
+        arg[1,]=-0.245069789185*x[0]+(0.326152420109)*x[1]
+        ref[1, 0]=-0.245069789185
+        ref[1, 1]=0.326152420109
+        if dim==3:
+            arg[0,]+=0.662905362362*x[2]
+            ref[0, 2]=0.662905362362
+            arg[1,]+=0.137343025568*x[2]
+            ref[1, 2]=0.137343025568
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.864878319222*x[0]+(0.349704559138)*x[1]
+        ref[0, 0, 0]=-0.864878319222
+        ref[0, 0, 1]=0.349704559138
+        arg[0, 1]=-0.50313026256*x[0]+(0.275493364722)*x[1]
+        ref[0, 1, 0]=-0.50313026256
+        ref[0, 1, 1]=0.275493364722
+        arg[1, 0]=-0.632340647936*x[0]+(0.702954591372)*x[1]
+        ref[1, 0, 0]=-0.632340647936
+        ref[1, 0, 1]=0.702954591372
+        arg[1, 1]=-0.125274091672*x[0]+(-0.63556159771)*x[1]
+        ref[1, 1, 0]=-0.125274091672
+        ref[1, 1, 1]=-0.63556159771
+        arg[2, 0]=-0.160029176375*x[0]+(-0.213188325396)*x[1]
+        ref[2, 0, 0]=-0.160029176375
+        ref[2, 0, 1]=-0.213188325396
+        arg[2, 1]=-0.564382409405*x[0]+(-0.115211700347)*x[1]
+        ref[2, 1, 0]=-0.564382409405
+        ref[2, 1, 1]=-0.115211700347
+        arg[3, 0]=0.811427457091*x[0]+(0.0517121636369)*x[1]
+        ref[3, 0, 0]=0.811427457091
+        ref[3, 0, 1]=0.0517121636369
+        arg[3, 1]=-0.198538639727*x[0]+(0.590913870444)*x[1]
+        ref[3, 1, 0]=-0.198538639727
+        ref[3, 1, 1]=0.590913870444
+        if dim==3:
+            arg[0, 0]+=-0.622765253183*x[2]
+            ref[0, 0, 2]=-0.622765253183
+            arg[0, 1]+=0.652462662507*x[2]
+            ref[0, 1, 2]=0.652462662507
+            arg[1, 0]+=0.026518880036*x[2]
+            ref[1, 0, 2]=0.026518880036
+            arg[1, 1]+=0.453807500484*x[2]
+            ref[1, 1, 2]=0.453807500484
+            arg[2, 0]+=-0.627475500209*x[2]
+            ref[2, 0, 2]=-0.627475500209
+            arg[2, 1]+=-0.68658307312*x[2]
+            ref[2, 1, 2]=-0.68658307312
+            arg[3, 0]+=-0.38505617241*x[2]
+            ref[3, 0, 2]=-0.38505617241
+            arg[3, 1]+=0.201836339109*x[2]
+            ref[3, 1, 2]=0.201836339109
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2),w)
+        ref = Data(0,(3, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=0.176337429765*x[0]+(-0.407598648354)*x[1]
+        ref[0, 0, 0, 0]=0.176337429765
+        ref[0, 0, 0, 1]=-0.407598648354
+        arg[0, 0, 1]=-0.600097136002*x[0]+(-0.194483400528)*x[1]
+        ref[0, 0, 1, 0]=-0.600097136002
+        ref[0, 0, 1, 1]=-0.194483400528
+        arg[0, 1, 0]=0.00797044349094*x[0]+(0.610665424646)*x[1]
+        ref[0, 1, 0, 0]=0.00797044349094
+        ref[0, 1, 0, 1]=0.610665424646
+        arg[0, 1, 1]=-0.974767119676*x[0]+(0.661161160578)*x[1]
+        ref[0, 1, 1, 0]=-0.974767119676
+        ref[0, 1, 1, 1]=0.661161160578
+        arg[0, 2, 0]=-0.954478812236*x[0]+(0.265972128103)*x[1]
+        ref[0, 2, 0, 0]=-0.954478812236
+        ref[0, 2, 0, 1]=0.265972128103
+        arg[0, 2, 1]=-0.49538623906*x[0]+(-0.727103608573)*x[1]
+        ref[0, 2, 1, 0]=-0.49538623906
+        ref[0, 2, 1, 1]=-0.727103608573
+        arg[0, 3, 0]=-0.655233353937*x[0]+(0.986611024914)*x[1]
+        ref[0, 3, 0, 0]=-0.655233353937
+        ref[0, 3, 0, 1]=0.986611024914
+        arg[0, 3, 1]=-0.472387160309*x[0]+(-0.703929752054)*x[1]
+        ref[0, 3, 1, 0]=-0.472387160309
+        ref[0, 3, 1, 1]=-0.703929752054
+        arg[1, 0, 0]=-0.766206833336*x[0]+(0.811610037578)*x[1]
+        ref[1, 0, 0, 0]=-0.766206833336
+        ref[1, 0, 0, 1]=0.811610037578
+        arg[1, 0, 1]=0.616457270059*x[0]+(-0.773576713097)*x[1]
+        ref[1, 0, 1, 0]=0.616457270059
+        ref[1, 0, 1, 1]=-0.773576713097
+        arg[1, 1, 0]=0.993052706147*x[0]+(0.0999793433202)*x[1]
+        ref[1, 1, 0, 0]=0.993052706147
+        ref[1, 1, 0, 1]=0.0999793433202
+        arg[1, 1, 1]=0.508007011785*x[0]+(0.113179622038)*x[1]
+        ref[1, 1, 1, 0]=0.508007011785
+        ref[1, 1, 1, 1]=0.113179622038
+        arg[1, 2, 0]=0.77851413527*x[0]+(-0.71841866296)*x[1]
+        ref[1, 2, 0, 0]=0.77851413527
+        ref[1, 2, 0, 1]=-0.71841866296
+        arg[1, 2, 1]=-0.0132793372764*x[0]+(-0.609163111882)*x[1]
+        ref[1, 2, 1, 0]=-0.0132793372764
+        ref[1, 2, 1, 1]=-0.609163111882
+        arg[1, 3, 0]=0.0848755937694*x[0]+(0.617462287846)*x[1]
+        ref[1, 3, 0, 0]=0.0848755937694
+        ref[1, 3, 0, 1]=0.617462287846
+        arg[1, 3, 1]=-0.889783221209*x[0]+(0.891017760494)*x[1]
+        ref[1, 3, 1, 0]=-0.889783221209
+        ref[1, 3, 1, 1]=0.891017760494
+        arg[2, 0, 0]=0.42074534728*x[0]+(-0.791763596312)*x[1]
+        ref[2, 0, 0, 0]=0.42074534728
+        ref[2, 0, 0, 1]=-0.791763596312
+        arg[2, 0, 1]=-0.0158059546901*x[0]+(0.907801200744)*x[1]
+        ref[2, 0, 1, 0]=-0.0158059546901
+        ref[2, 0, 1, 1]=0.907801200744
+        arg[2, 1, 0]=0.248625820986*x[0]+(-0.390974519532)*x[1]
+        ref[2, 1, 0, 0]=0.248625820986
+        ref[2, 1, 0, 1]=-0.390974519532
+        arg[2, 1, 1]=0.88389945068*x[0]+(0.425934088097)*x[1]
+        ref[2, 1, 1, 0]=0.88389945068
+        ref[2, 1, 1, 1]=0.425934088097
+        arg[2, 2, 0]=-0.39991516759*x[0]+(-0.474567591681)*x[1]
+        ref[2, 2, 0, 0]=-0.39991516759
+        ref[2, 2, 0, 1]=-0.474567591681
+        arg[2, 2, 1]=0.686196023144*x[0]+(0.822245199054)*x[1]
+        ref[2, 2, 1, 0]=0.686196023144
+        ref[2, 2, 1, 1]=0.822245199054
+        arg[2, 3, 0]=-0.785488114514*x[0]+(0.561237530726)*x[1]
+        ref[2, 3, 0, 0]=-0.785488114514
+        ref[2, 3, 0, 1]=0.561237530726
+        arg[2, 3, 1]=-0.745823193772*x[0]+(0.748998991329)*x[1]
+        ref[2, 3, 1, 0]=-0.745823193772
+        ref[2, 3, 1, 1]=0.748998991329
+        if dim==3:
+            arg[0, 0, 0]+=0.254341001782*x[2]
+            ref[0, 0, 0, 2]=0.254341001782
+            arg[0, 0, 1]+=-0.916057483232*x[2]
+            ref[0, 0, 1, 2]=-0.916057483232
+            arg[0, 1, 0]+=0.34334838574*x[2]
+            ref[0, 1, 0, 2]=0.34334838574
+            arg[0, 1, 1]+=0.584311704677*x[2]
+            ref[0, 1, 1, 2]=0.584311704677
+            arg[0, 2, 0]+=-0.738575464898*x[2]
+            ref[0, 2, 0, 2]=-0.738575464898
+            arg[0, 2, 1]+=0.571095239438*x[2]
+            ref[0, 2, 1, 2]=0.571095239438
+            arg[0, 3, 0]+=0.63915009572*x[2]
+            ref[0, 3, 0, 2]=0.63915009572
+            arg[0, 3, 1]+=0.230590731176*x[2]
+            ref[0, 3, 1, 2]=0.230590731176
+            arg[1, 0, 0]+=-0.598936692001*x[2]
+            ref[1, 0, 0, 2]=-0.598936692001
+            arg[1, 0, 1]+=0.712364496728*x[2]
+            ref[1, 0, 1, 2]=0.712364496728
+            arg[1, 1, 0]+=0.440152566777*x[2]
+            ref[1, 1, 0, 2]=0.440152566777
+            arg[1, 1, 1]+=-0.720075856642*x[2]
+            ref[1, 1, 1, 2]=-0.720075856642
+            arg[1, 2, 0]+=0.0532698924365*x[2]
+            ref[1, 2, 0, 2]=0.0532698924365
+            arg[1, 2, 1]+=-0.73190419219*x[2]
+            ref[1, 2, 1, 2]=-0.73190419219
+            arg[1, 3, 0]+=0.230131323715*x[2]
+            ref[1, 3, 0, 2]=0.230131323715
+            arg[1, 3, 1]+=0.578964142672*x[2]
+            ref[1, 3, 1, 2]=0.578964142672
+            arg[2, 0, 0]+=-0.178352795942*x[2]
+            ref[2, 0, 0, 2]=-0.178352795942
+            arg[2, 0, 1]+=0.885677632743*x[2]
+            ref[2, 0, 1, 2]=0.885677632743
+            arg[2, 1, 0]+=0.947524880016*x[2]
+            ref[2, 1, 0, 2]=0.947524880016
+            arg[2, 1, 1]+=0.783065136041*x[2]
+            ref[2, 1, 1, 2]=0.783065136041
+            arg[2, 2, 0]+=-0.22373896648*x[2]
+            ref[2, 2, 0, 2]=-0.22373896648
+            arg[2, 2, 1]+=-0.716291343165*x[2]
+            ref[2, 2, 1, 2]=-0.716291343165
+            arg[2, 3, 0]+=-0.372451679394*x[2]
+            ref[2, 3, 0, 2]=-0.372451679394
+            arg[2, 3, 1]+=0.425434883578*x[2]
+            ref[2, 3, 1, 2]=0.425434883578
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.943660817814*x[0]+(-0.825797749216)*x[1]
+        ref[0]=0.943660817814
+        ref[1]=-0.825797749216
+        if dim==3:
+            arg+=(-0.879699808579)*x[2]
+            ref[2]=-0.879699808579
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=0.891434956189*x[0]+(0.30725398501)*x[1]
+        ref[0, 0]=0.891434956189
+        ref[0, 1]=0.30725398501
+        arg[1,]=-0.452207493175*x[0]+(-0.583639494709)*x[1]
+        ref[1, 0]=-0.452207493175
+        ref[1, 1]=-0.583639494709
+        if dim==3:
+            arg[0,]+=0.662329435442*x[2]
+            ref[0, 2]=0.662329435442
+            arg[1,]+=-0.346257085383*x[2]
+            ref[1, 2]=-0.346257085383
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=-0.793012689363*x[0]+(0.562315030947)*x[1]
+        ref[0, 0, 0]=-0.793012689363
+        ref[0, 0, 1]=0.562315030947
+        arg[0, 1]=-0.370076704027*x[0]+(0.608009465404)*x[1]
+        ref[0, 1, 0]=-0.370076704027
+        ref[0, 1, 1]=0.608009465404
+        arg[0, 2]=0.66676116873*x[0]+(-0.331142538407)*x[1]
+        ref[0, 2, 0]=0.66676116873
+        ref[0, 2, 1]=-0.331142538407
+        arg[1, 0]=-0.840272499433*x[0]+(0.95343195438)*x[1]
+        ref[1, 0, 0]=-0.840272499433
+        ref[1, 0, 1]=0.95343195438
+        arg[1, 1]=-0.597275842725*x[0]+(0.945899722894)*x[1]
+        ref[1, 1, 0]=-0.597275842725
+        ref[1, 1, 1]=0.945899722894
+        arg[1, 2]=0.341522109872*x[0]+(-0.0252291008602)*x[1]
+        ref[1, 2, 0]=0.341522109872
+        ref[1, 2, 1]=-0.0252291008602
+        arg[2, 0]=-0.204367952377*x[0]+(-0.713173363011)*x[1]
+        ref[2, 0, 0]=-0.204367952377
+        ref[2, 0, 1]=-0.713173363011
+        arg[2, 1]=-0.444913228559*x[0]+(0.975862851627)*x[1]
+        ref[2, 1, 0]=-0.444913228559
+        ref[2, 1, 1]=0.975862851627
+        arg[2, 2]=0.148372488253*x[0]+(0.34567732677)*x[1]
+        ref[2, 2, 0]=0.148372488253
+        ref[2, 2, 1]=0.34567732677
+        arg[3, 0]=0.922565930037*x[0]+(-0.0428471571473)*x[1]
+        ref[3, 0, 0]=0.922565930037
+        ref[3, 0, 1]=-0.0428471571473
+        arg[3, 1]=-0.76819492434*x[0]+(0.868429660002)*x[1]
+        ref[3, 1, 0]=-0.76819492434
+        ref[3, 1, 1]=0.868429660002
+        arg[3, 2]=0.974467189747*x[0]+(-0.0917575668586)*x[1]
+        ref[3, 2, 0]=0.974467189747
+        ref[3, 2, 1]=-0.0917575668586
+        if dim==3:
+            arg[0, 0]+=-0.817620528149*x[2]
+            ref[0, 0, 2]=-0.817620528149
+            arg[0, 1]+=-0.105143309177*x[2]
+            ref[0, 1, 2]=-0.105143309177
+            arg[0, 2]+=-0.0265954047012*x[2]
+            ref[0, 2, 2]=-0.0265954047012
+            arg[1, 0]+=0.360234367928*x[2]
+            ref[1, 0, 2]=0.360234367928
+            arg[1, 1]+=-0.0551503688134*x[2]
+            ref[1, 1, 2]=-0.0551503688134
+            arg[1, 2]+=0.0794740200493*x[2]
+            ref[1, 2, 2]=0.0794740200493
+            arg[2, 0]+=-0.994696495987*x[2]
+            ref[2, 0, 2]=-0.994696495987
+            arg[2, 1]+=0.526649029745*x[2]
+            ref[2, 1, 2]=0.526649029745
+            arg[2, 2]+=-0.0439081350232*x[2]
+            ref[2, 2, 2]=-0.0439081350232
+            arg[3, 0]+=-0.0449813596418*x[2]
+            ref[3, 0, 2]=-0.0449813596418
+            arg[3, 1]+=0.405709428978*x[2]
+            ref[3, 1, 2]=0.405709428978
+            arg[3, 2]+=-0.32464047502*x[2]
+            ref[3, 2, 2]=-0.32464047502
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3),w)
+        ref = Data(0,(4, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.801824897505*x[0]+(0.78435094044)*x[1]
+        ref[0, 0, 0, 0]=-0.801824897505
+        ref[0, 0, 0, 1]=0.78435094044
+        arg[0, 0, 1]=0.468401213026*x[0]+(0.914369935092)*x[1]
+        ref[0, 0, 1, 0]=0.468401213026
+        ref[0, 0, 1, 1]=0.914369935092
+        arg[0, 0, 2]=-0.881884343355*x[0]+(-0.451818330647)*x[1]
+        ref[0, 0, 2, 0]=-0.881884343355
+        ref[0, 0, 2, 1]=-0.451818330647
+        arg[0, 1, 0]=-0.0614936728245*x[0]+(0.423843538607)*x[1]
+        ref[0, 1, 0, 0]=-0.0614936728245
+        ref[0, 1, 0, 1]=0.423843538607
+        arg[0, 1, 1]=0.52171688526*x[0]+(-0.86698207793)*x[1]
+        ref[0, 1, 1, 0]=0.52171688526
+        ref[0, 1, 1, 1]=-0.86698207793
+        arg[0, 1, 2]=-0.704188035418*x[0]+(-0.920597047941)*x[1]
+        ref[0, 1, 2, 0]=-0.704188035418
+        ref[0, 1, 2, 1]=-0.920597047941
+        arg[0, 2, 0]=-0.965115321749*x[0]+(-0.314857611389)*x[1]
+        ref[0, 2, 0, 0]=-0.965115321749
+        ref[0, 2, 0, 1]=-0.314857611389
+        arg[0, 2, 1]=-0.821086928861*x[0]+(0.916743211012)*x[1]
+        ref[0, 2, 1, 0]=-0.821086928861
+        ref[0, 2, 1, 1]=0.916743211012
+        arg[0, 2, 2]=-0.00727873467722*x[0]+(0.474362745932)*x[1]
+        ref[0, 2, 2, 0]=-0.00727873467722
+        ref[0, 2, 2, 1]=0.474362745932
+        arg[0, 3, 0]=0.629811050206*x[0]+(0.826539898874)*x[1]
+        ref[0, 3, 0, 0]=0.629811050206
+        ref[0, 3, 0, 1]=0.826539898874
+        arg[0, 3, 1]=-0.48920794622*x[0]+(-0.241275210023)*x[1]
+        ref[0, 3, 1, 0]=-0.48920794622
+        ref[0, 3, 1, 1]=-0.241275210023
+        arg[0, 3, 2]=0.305073334812*x[0]+(0.711895045394)*x[1]
+        ref[0, 3, 2, 0]=0.305073334812
+        ref[0, 3, 2, 1]=0.711895045394
+        arg[1, 0, 0]=0.782237609669*x[0]+(0.767432946562)*x[1]
+        ref[1, 0, 0, 0]=0.782237609669
+        ref[1, 0, 0, 1]=0.767432946562
+        arg[1, 0, 1]=-0.35978944982*x[0]+(-0.668501614981)*x[1]
+        ref[1, 0, 1, 0]=-0.35978944982
+        ref[1, 0, 1, 1]=-0.668501614981
+        arg[1, 0, 2]=0.995727603555*x[0]+(0.739913483158)*x[1]
+        ref[1, 0, 2, 0]=0.995727603555
+        ref[1, 0, 2, 1]=0.739913483158
+        arg[1, 1, 0]=-0.572950466828*x[0]+(0.247450173589)*x[1]
+        ref[1, 1, 0, 0]=-0.572950466828
+        ref[1, 1, 0, 1]=0.247450173589
+        arg[1, 1, 1]=0.97939698122*x[0]+(0.518600406576)*x[1]
+        ref[1, 1, 1, 0]=0.97939698122
+        ref[1, 1, 1, 1]=0.518600406576
+        arg[1, 1, 2]=0.998012406274*x[0]+(0.763664525975)*x[1]
+        ref[1, 1, 2, 0]=0.998012406274
+        ref[1, 1, 2, 1]=0.763664525975
+        arg[1, 2, 0]=0.103040062189*x[0]+(-0.714742676547)*x[1]
+        ref[1, 2, 0, 0]=0.103040062189
+        ref[1, 2, 0, 1]=-0.714742676547
+        arg[1, 2, 1]=0.192565122109*x[0]+(0.952754722528)*x[1]
+        ref[1, 2, 1, 0]=0.192565122109
+        ref[1, 2, 1, 1]=0.952754722528
+        arg[1, 2, 2]=0.59670626617*x[0]+(0.187284235942)*x[1]
+        ref[1, 2, 2, 0]=0.59670626617
+        ref[1, 2, 2, 1]=0.187284235942
+        arg[1, 3, 0]=-0.413717005014*x[0]+(-0.775530551426)*x[1]
+        ref[1, 3, 0, 0]=-0.413717005014
+        ref[1, 3, 0, 1]=-0.775530551426
+        arg[1, 3, 1]=-0.924246965097*x[0]+(0.773102645428)*x[1]
+        ref[1, 3, 1, 0]=-0.924246965097
+        ref[1, 3, 1, 1]=0.773102645428
+        arg[1, 3, 2]=0.506445457809*x[0]+(0.184695265552)*x[1]
+        ref[1, 3, 2, 0]=0.506445457809
+        ref[1, 3, 2, 1]=0.184695265552
+        arg[2, 0, 0]=-0.576479985626*x[0]+(-0.121587655664)*x[1]
+        ref[2, 0, 0, 0]=-0.576479985626
+        ref[2, 0, 0, 1]=-0.121587655664
+        arg[2, 0, 1]=-0.496091397544*x[0]+(-0.988559059419)*x[1]
+        ref[2, 0, 1, 0]=-0.496091397544
+        ref[2, 0, 1, 1]=-0.988559059419
+        arg[2, 0, 2]=0.349238653488*x[0]+(0.416073382068)*x[1]
+        ref[2, 0, 2, 0]=0.349238653488
+        ref[2, 0, 2, 1]=0.416073382068
+        arg[2, 1, 0]=-0.524030188715*x[0]+(0.583652886972)*x[1]
+        ref[2, 1, 0, 0]=-0.524030188715
+        ref[2, 1, 0, 1]=0.583652886972
+        arg[2, 1, 1]=-0.356600245095*x[0]+(-0.182166887424)*x[1]
+        ref[2, 1, 1, 0]=-0.356600245095
+        ref[2, 1, 1, 1]=-0.182166887424
+        arg[2, 1, 2]=0.294153024102*x[0]+(-0.863202237355)*x[1]
+        ref[2, 1, 2, 0]=0.294153024102
+        ref[2, 1, 2, 1]=-0.863202237355
+        arg[2, 2, 0]=-0.555613325314*x[0]+(0.72040922524)*x[1]
+        ref[2, 2, 0, 0]=-0.555613325314
+        ref[2, 2, 0, 1]=0.72040922524
+        arg[2, 2, 1]=0.844195817115*x[0]+(0.836887967781)*x[1]
+        ref[2, 2, 1, 0]=0.844195817115
+        ref[2, 2, 1, 1]=0.836887967781
+        arg[2, 2, 2]=0.0243033923985*x[0]+(0.219169176871)*x[1]
+        ref[2, 2, 2, 0]=0.0243033923985
+        ref[2, 2, 2, 1]=0.219169176871
+        arg[2, 3, 0]=-0.394086332407*x[0]+(-0.51647855535)*x[1]
+        ref[2, 3, 0, 0]=-0.394086332407
+        ref[2, 3, 0, 1]=-0.51647855535
+        arg[2, 3, 1]=0.800718917849*x[0]+(0.0383636152068)*x[1]
+        ref[2, 3, 1, 0]=0.800718917849
+        ref[2, 3, 1, 1]=0.0383636152068
+        arg[2, 3, 2]=-0.844316872609*x[0]+(0.408808541251)*x[1]
+        ref[2, 3, 2, 0]=-0.844316872609
+        ref[2, 3, 2, 1]=0.408808541251
+        arg[3, 0, 0]=0.304953263612*x[0]+(-0.795872759257)*x[1]
+        ref[3, 0, 0, 0]=0.304953263612
+        ref[3, 0, 0, 1]=-0.795872759257
+        arg[3, 0, 1]=-0.931419086093*x[0]+(-0.792096507419)*x[1]
+        ref[3, 0, 1, 0]=-0.931419086093
+        ref[3, 0, 1, 1]=-0.792096507419
+        arg[3, 0, 2]=0.493736497156*x[0]+(-0.0446054257634)*x[1]
+        ref[3, 0, 2, 0]=0.493736497156
+        ref[3, 0, 2, 1]=-0.0446054257634
+        arg[3, 1, 0]=0.056130159111*x[0]+(0.298846207201)*x[1]
+        ref[3, 1, 0, 0]=0.056130159111
+        ref[3, 1, 0, 1]=0.298846207201
+        arg[3, 1, 1]=-0.263061196138*x[0]+(-0.90446760279)*x[1]
+        ref[3, 1, 1, 0]=-0.263061196138
+        ref[3, 1, 1, 1]=-0.90446760279
+        arg[3, 1, 2]=0.902228942739*x[0]+(0.775246080038)*x[1]
+        ref[3, 1, 2, 0]=0.902228942739
+        ref[3, 1, 2, 1]=0.775246080038
+        arg[3, 2, 0]=-0.0536740903208*x[0]+(-0.798275491935)*x[1]
+        ref[3, 2, 0, 0]=-0.0536740903208
+        ref[3, 2, 0, 1]=-0.798275491935
+        arg[3, 2, 1]=-0.136462095195*x[0]+(-0.438508965129)*x[1]
+        ref[3, 2, 1, 0]=-0.136462095195
+        ref[3, 2, 1, 1]=-0.438508965129
+        arg[3, 2, 2]=0.0671381300721*x[0]+(0.269874893668)*x[1]
+        ref[3, 2, 2, 0]=0.0671381300721
+        ref[3, 2, 2, 1]=0.269874893668
+        arg[3, 3, 0]=0.594321349829*x[0]+(-0.586075641025)*x[1]
+        ref[3, 3, 0, 0]=0.594321349829
+        ref[3, 3, 0, 1]=-0.586075641025
+        arg[3, 3, 1]=0.984455884822*x[0]+(-0.954592327975)*x[1]
+        ref[3, 3, 1, 0]=0.984455884822
+        ref[3, 3, 1, 1]=-0.954592327975
+        arg[3, 3, 2]=-0.377410901546*x[0]+(-0.881715737848)*x[1]
+        ref[3, 3, 2, 0]=-0.377410901546
+        ref[3, 3, 2, 1]=-0.881715737848
+        if dim==3:
+            arg[0, 0, 0]+=-0.879802031979*x[2]
+            ref[0, 0, 0, 2]=-0.879802031979
+            arg[0, 0, 1]+=0.314115879654*x[2]
+            ref[0, 0, 1, 2]=0.314115879654
+            arg[0, 0, 2]+=0.236628418115*x[2]
+            ref[0, 0, 2, 2]=0.236628418115
+            arg[0, 1, 0]+=0.583941563782*x[2]
+            ref[0, 1, 0, 2]=0.583941563782
+            arg[0, 1, 1]+=0.996937662655*x[2]
+            ref[0, 1, 1, 2]=0.996937662655
+            arg[0, 1, 2]+=-0.118784266658*x[2]
+            ref[0, 1, 2, 2]=-0.118784266658
+            arg[0, 2, 0]+=-0.323178223561*x[2]
+            ref[0, 2, 0, 2]=-0.323178223561
+            arg[0, 2, 1]+=0.0709746887447*x[2]
+            ref[0, 2, 1, 2]=0.0709746887447
+            arg[0, 2, 2]+=0.0801935426249*x[2]
+            ref[0, 2, 2, 2]=0.0801935426249
+            arg[0, 3, 0]+=0.553524621989*x[2]
+            ref[0, 3, 0, 2]=0.553524621989
+            arg[0, 3, 1]+=0.25330451367*x[2]
+            ref[0, 3, 1, 2]=0.25330451367
+            arg[0, 3, 2]+=0.434245434854*x[2]
+            ref[0, 3, 2, 2]=0.434245434854
+            arg[1, 0, 0]+=-0.361862821128*x[2]
+            ref[1, 0, 0, 2]=-0.361862821128
+            arg[1, 0, 1]+=0.95269780009*x[2]
+            ref[1, 0, 1, 2]=0.95269780009
+            arg[1, 0, 2]+=0.487959249811*x[2]
+            ref[1, 0, 2, 2]=0.487959249811
+            arg[1, 1, 0]+=-0.873997851777*x[2]
+            ref[1, 1, 0, 2]=-0.873997851777
+            arg[1, 1, 1]+=0.45507102741*x[2]
+            ref[1, 1, 1, 2]=0.45507102741
+            arg[1, 1, 2]+=0.266670854518*x[2]
+            ref[1, 1, 2, 2]=0.266670854518
+            arg[1, 2, 0]+=0.943223500304*x[2]
+            ref[1, 2, 0, 2]=0.943223500304
+            arg[1, 2, 1]+=0.697795898607*x[2]
+            ref[1, 2, 1, 2]=0.697795898607
+            arg[1, 2, 2]+=0.295956276413*x[2]
+            ref[1, 2, 2, 2]=0.295956276413
+            arg[1, 3, 0]+=0.566944827256*x[2]
+            ref[1, 3, 0, 2]=0.566944827256
+            arg[1, 3, 1]+=-0.296475212288*x[2]
+            ref[1, 3, 1, 2]=-0.296475212288
+            arg[1, 3, 2]+=0.852952557628*x[2]
+            ref[1, 3, 2, 2]=0.852952557628
+            arg[2, 0, 0]+=-0.854941500472*x[2]
+            ref[2, 0, 0, 2]=-0.854941500472
+            arg[2, 0, 1]+=-0.750432492905*x[2]
+            ref[2, 0, 1, 2]=-0.750432492905
+            arg[2, 0, 2]+=-0.264967973443*x[2]
+            ref[2, 0, 2, 2]=-0.264967973443
+            arg[2, 1, 0]+=-0.969270412679*x[2]
+            ref[2, 1, 0, 2]=-0.969270412679
+            arg[2, 1, 1]+=0.0298108316415*x[2]
+            ref[2, 1, 1, 2]=0.0298108316415
+            arg[2, 1, 2]+=-0.411268046716*x[2]
+            ref[2, 1, 2, 2]=-0.411268046716
+            arg[2, 2, 0]+=0.227355937338*x[2]
+            ref[2, 2, 0, 2]=0.227355937338
+            arg[2, 2, 1]+=-0.655810282624*x[2]
+            ref[2, 2, 1, 2]=-0.655810282624
+            arg[2, 2, 2]+=-0.127208292716*x[2]
+            ref[2, 2, 2, 2]=-0.127208292716
+            arg[2, 3, 0]+=-0.393843531318*x[2]
+            ref[2, 3, 0, 2]=-0.393843531318
+            arg[2, 3, 1]+=-0.290796681063*x[2]
+            ref[2, 3, 1, 2]=-0.290796681063
+            arg[2, 3, 2]+=-0.684403257724*x[2]
+            ref[2, 3, 2, 2]=-0.684403257724
+            arg[3, 0, 0]+=0.350497716725*x[2]
+            ref[3, 0, 0, 2]=0.350497716725
+            arg[3, 0, 1]+=0.580248845235*x[2]
+            ref[3, 0, 1, 2]=0.580248845235
+            arg[3, 0, 2]+=-0.17789441705*x[2]
+            ref[3, 0, 2, 2]=-0.17789441705
+            arg[3, 1, 0]+=-0.868229227664*x[2]
+            ref[3, 1, 0, 2]=-0.868229227664
+            arg[3, 1, 1]+=-0.954415792026*x[2]
+            ref[3, 1, 1, 2]=-0.954415792026
+            arg[3, 1, 2]+=-0.738789760298*x[2]
+            ref[3, 1, 2, 2]=-0.738789760298
+            arg[3, 2, 0]+=-0.360264870445*x[2]
+            ref[3, 2, 0, 2]=-0.360264870445
+            arg[3, 2, 1]+=0.76009100246*x[2]
+            ref[3, 2, 1, 2]=0.76009100246
+            arg[3, 2, 2]+=-0.387127883303*x[2]
+            ref[3, 2, 2, 2]=-0.387127883303
+            arg[3, 3, 0]+=-0.391842262105*x[2]
+            ref[3, 3, 0, 2]=-0.391842262105
+            arg[3, 3, 1]+=0.272817577846*x[2]
+            ref[3, 3, 1, 2]=0.272817577846
+            arg[3, 3, 2]+=0.73038168039*x[2]
+            ref[3, 3, 2, 2]=0.73038168039
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.737092219698*x[0]**o+(0.80886346694)*x[0]+(-0.896006953991)*x[1]**o+(0.841258349305)*x[1]
+        ref[0]=0.737092219698*o*x_ref[0]**(o-1)+(0.80886346694)
+        ref[1]=-0.896006953991*o*x_ref[1]**(o-1)+(0.841258349305)
+        if dim==3:
+            arg+=(0.864821140528)*x[2]**o+(-0.714745520202)*x[2]
+            ref[2]=0.864821140528*o*x_ref[2]**(o-1)+(-0.714745520202)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=0.587822204965*x[0]**o+(0.606667493057)*x[0]+(0.6210197366)*x[1]**o+(0.780486585494)*x[1]
+        ref[0, 0]=0.587822204965*o*x_ref[0]**(o-1)+(0.606667493057)
+        ref[0, 1]=0.6210197366*o*x_ref[1]**(o-1)+(0.780486585494)
+        arg[1,]=-0.246347362186*x[0]**o+(-0.397687690746)*x[0]+(-0.899622638243)*x[1]**o+(0.695956623238)*x[1]
+        ref[1, 0]=-0.246347362186*o*x_ref[0]**(o-1)+(-0.397687690746)
+        ref[1, 1]=-0.899622638243*o*x_ref[1]**(o-1)+(0.695956623238)
+        if dim==3:
+            arg[0,]+=0.169236063745*x[2]**o+(0.750331034237)*x[2]
+            ref[0, 2]=0.169236063745*o*x_ref[2]**(o-1)+(0.750331034237)
+            arg[1,]+=0.626410254607*x[2]**o+(0.117687091489)*x[2]
+            ref[1, 2]=0.626410254607*o*x_ref[2]**(o-1)+(0.117687091489)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4)+(dim,),w_ref)
+        arg[0, 0]=0.41881405307*x[0]**o+(0.718008031489)*x[0]+(-0.108606502632)*x[1]**o+(0.0351745163837)*x[1]
+        ref[0, 0, 0]=0.41881405307*o*x_ref[0]**(o-1)+(0.718008031489)
+        ref[0, 0, 1]=-0.108606502632*o*x_ref[1]**(o-1)+(0.0351745163837)
+        arg[0, 1]=-0.841657493849*x[0]**o+(0.118946969279)*x[0]+(0.554015408311)*x[1]**o+(0.527624594012)*x[1]
+        ref[0, 1, 0]=-0.841657493849*o*x_ref[0]**(o-1)+(0.118946969279)
+        ref[0, 1, 1]=0.554015408311*o*x_ref[1]**(o-1)+(0.527624594012)
+        arg[0, 2]=0.664244653624*x[0]**o+(0.255163450904)*x[0]+(-0.469920420869)*x[1]**o+(-0.482013474516)*x[1]
+        ref[0, 2, 0]=0.664244653624*o*x_ref[0]**(o-1)+(0.255163450904)
+        ref[0, 2, 1]=-0.469920420869*o*x_ref[1]**(o-1)+(-0.482013474516)
+        arg[0, 3]=-0.266892461656*x[0]**o+(-0.985834220524)*x[0]+(0.503103817812)*x[1]**o+(0.356104802826)*x[1]
+        ref[0, 3, 0]=-0.266892461656*o*x_ref[0]**(o-1)+(-0.985834220524)
+        ref[0, 3, 1]=0.503103817812*o*x_ref[1]**(o-1)+(0.356104802826)
+        arg[1, 0]=-0.890268375709*x[0]**o+(0.521257583281)*x[0]+(-0.618712421049)*x[1]**o+(0.0722915186417)*x[1]
+        ref[1, 0, 0]=-0.890268375709*o*x_ref[0]**(o-1)+(0.521257583281)
+        ref[1, 0, 1]=-0.618712421049*o*x_ref[1]**(o-1)+(0.0722915186417)
+        arg[1, 1]=0.235521028527*x[0]**o+(-0.175746743282)*x[0]+(0.254196037214)*x[1]**o+(-0.435071068229)*x[1]
+        ref[1, 1, 0]=0.235521028527*o*x_ref[0]**(o-1)+(-0.175746743282)
+        ref[1, 1, 1]=0.254196037214*o*x_ref[1]**(o-1)+(-0.435071068229)
+        arg[1, 2]=0.310102703027*x[0]**o+(0.569839657949)*x[0]+(0.346270816481)*x[1]**o+(0.624247885024)*x[1]
+        ref[1, 2, 0]=0.310102703027*o*x_ref[0]**(o-1)+(0.569839657949)
+        ref[1, 2, 1]=0.346270816481*o*x_ref[1]**(o-1)+(0.624247885024)
+        arg[1, 3]=0.439450032292*x[0]**o+(-0.125265960927)*x[0]+(0.024033558049)*x[1]**o+(0.826521680848)*x[1]
+        ref[1, 3, 0]=0.439450032292*o*x_ref[0]**(o-1)+(-0.125265960927)
+        ref[1, 3, 1]=0.024033558049*o*x_ref[1]**(o-1)+(0.826521680848)
+        arg[2, 0]=0.679772176428*x[0]**o+(0.171122993959)*x[0]+(-0.118504901153)*x[1]**o+(0.190575901898)*x[1]
+        ref[2, 0, 0]=0.679772176428*o*x_ref[0]**(o-1)+(0.171122993959)
+        ref[2, 0, 1]=-0.118504901153*o*x_ref[1]**(o-1)+(0.190575901898)
+        arg[2, 1]=0.65072213244*x[0]**o+(-0.347240247411)*x[0]+(0.460039204466)*x[1]**o+(-0.00334678883019)*x[1]
+        ref[2, 1, 0]=0.65072213244*o*x_ref[0]**(o-1)+(-0.347240247411)
+        ref[2, 1, 1]=0.460039204466*o*x_ref[1]**(o-1)+(-0.00334678883019)
+        arg[2, 2]=0.0166252279295*x[0]**o+(-0.717711144238)*x[0]+(0.269542944657)*x[1]**o+(0.226941804109)*x[1]
+        ref[2, 2, 0]=0.0166252279295*o*x_ref[0]**(o-1)+(-0.717711144238)
+        ref[2, 2, 1]=0.269542944657*o*x_ref[1]**(o-1)+(0.226941804109)
+        arg[2, 3]=0.326155251368*x[0]**o+(-0.955332689596)*x[0]+(0.239888672939)*x[1]**o+(-0.895343309953)*x[1]
+        ref[2, 3, 0]=0.326155251368*o*x_ref[0]**(o-1)+(-0.955332689596)
+        ref[2, 3, 1]=0.239888672939*o*x_ref[1]**(o-1)+(-0.895343309953)
+        if dim==3:
+            arg[0, 0]+=0.735464436183*x[2]**o+(0.0306248811798)*x[2]
+            ref[0, 0, 2]=0.735464436183*o*x_ref[2]**(o-1)+(0.0306248811798)
+            arg[0, 1]+=0.723088286701*x[2]**o+(0.357398587576)*x[2]
+            ref[0, 1, 2]=0.723088286701*o*x_ref[2]**(o-1)+(0.357398587576)
+            arg[0, 2]+=-0.420033296562*x[2]**o+(-0.665549399788)*x[2]
+            ref[0, 2, 2]=-0.420033296562*o*x_ref[2]**(o-1)+(-0.665549399788)
+            arg[0, 3]+=-0.449378543227*x[2]**o+(-0.0936499291086)*x[2]
+            ref[0, 3, 2]=-0.449378543227*o*x_ref[2]**(o-1)+(-0.0936499291086)
+            arg[1, 0]+=0.46136620838*x[2]**o+(-0.135583684348)*x[2]
+            ref[1, 0, 2]=0.46136620838*o*x_ref[2]**(o-1)+(-0.135583684348)
+            arg[1, 1]+=0.15542223617*x[2]**o+(0.0608142847587)*x[2]
+            ref[1, 1, 2]=0.15542223617*o*x_ref[2]**(o-1)+(0.0608142847587)
+            arg[1, 2]+=-0.705150694707*x[2]**o+(0.0241084468942)*x[2]
+            ref[1, 2, 2]=-0.705150694707*o*x_ref[2]**(o-1)+(0.0241084468942)
+            arg[1, 3]+=0.431539138279*x[2]**o+(0.0135671916901)*x[2]
+            ref[1, 3, 2]=0.431539138279*o*x_ref[2]**(o-1)+(0.0135671916901)
+            arg[2, 0]+=0.592653028209*x[2]**o+(-0.164592712406)*x[2]
+            ref[2, 0, 2]=0.592653028209*o*x_ref[2]**(o-1)+(-0.164592712406)
+            arg[2, 1]+=0.726385973336*x[2]**o+(-0.542345560728)*x[2]
+            ref[2, 1, 2]=0.726385973336*o*x_ref[2]**(o-1)+(-0.542345560728)
+            arg[2, 2]+=0.130919851822*x[2]**o+(0.803549095131)*x[2]
+            ref[2, 2, 2]=0.130919851822*o*x_ref[2]**(o-1)+(0.803549095131)
+            arg[2, 3]+=0.889660613407*x[2]**o+(0.132339500744)*x[2]
+            ref[2, 3, 2]=0.889660613407*o*x_ref[2]**(o-1)+(0.132339500744)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=0.248781639974*x[0]**o+(-0.238059158344)*x[0]+(-0.0815073449941)*x[1]**o+(-0.690619383396)*x[1]
+        ref[0, 0, 0, 0]=0.248781639974*o*x_ref[0]**(o-1)+(-0.238059158344)
+        ref[0, 0, 0, 1]=-0.0815073449941*o*x_ref[1]**(o-1)+(-0.690619383396)
+        arg[0, 0, 1]=0.920030542532*x[0]**o+(0.549538055276)*x[0]+(0.453976436321)*x[1]**o+(0.744345278083)*x[1]
+        ref[0, 0, 1, 0]=0.920030542532*o*x_ref[0]**(o-1)+(0.549538055276)
+        ref[0, 0, 1, 1]=0.453976436321*o*x_ref[1]**(o-1)+(0.744345278083)
+        arg[0, 0, 2]=0.561414837961*x[0]**o+(0.963113410712)*x[0]+(-0.358701328815)*x[1]**o+(-0.83213636169)*x[1]
+        ref[0, 0, 2, 0]=0.561414837961*o*x_ref[0]**(o-1)+(0.963113410712)
+        ref[0, 0, 2, 1]=-0.358701328815*o*x_ref[1]**(o-1)+(-0.83213636169)
+        arg[0, 0, 3]=0.600390133653*x[0]**o+(0.757051902239)*x[0]+(-0.011100251559)*x[1]**o+(-0.00747473377824)*x[1]
+        ref[0, 0, 3, 0]=0.600390133653*o*x_ref[0]**(o-1)+(0.757051902239)
+        ref[0, 0, 3, 1]=-0.011100251559*o*x_ref[1]**(o-1)+(-0.00747473377824)
+        arg[0, 1, 0]=0.985806821671*x[0]**o+(0.211802821783)*x[0]+(-0.082000329353)*x[1]**o+(0.534567230177)*x[1]
+        ref[0, 1, 0, 0]=0.985806821671*o*x_ref[0]**(o-1)+(0.211802821783)
+        ref[0, 1, 0, 1]=-0.082000329353*o*x_ref[1]**(o-1)+(0.534567230177)
+        arg[0, 1, 1]=-0.629648102152*x[0]**o+(0.17866568735)*x[0]+(0.84091137084)*x[1]**o+(-0.348898650619)*x[1]
+        ref[0, 1, 1, 0]=-0.629648102152*o*x_ref[0]**(o-1)+(0.17866568735)
+        ref[0, 1, 1, 1]=0.84091137084*o*x_ref[1]**(o-1)+(-0.348898650619)
+        arg[0, 1, 2]=-0.278495259926*x[0]**o+(-0.886895804343)*x[0]+(0.412457288474)*x[1]**o+(0.929284709843)*x[1]
+        ref[0, 1, 2, 0]=-0.278495259926*o*x_ref[0]**(o-1)+(-0.886895804343)
+        ref[0, 1, 2, 1]=0.412457288474*o*x_ref[1]**(o-1)+(0.929284709843)
+        arg[0, 1, 3]=0.679911226409*x[0]**o+(-0.538685582423)*x[0]+(-0.498974236385)*x[1]**o+(-0.543050282346)*x[1]
+        ref[0, 1, 3, 0]=0.679911226409*o*x_ref[0]**(o-1)+(-0.538685582423)
+        ref[0, 1, 3, 1]=-0.498974236385*o*x_ref[1]**(o-1)+(-0.543050282346)
+        arg[0, 2, 0]=-0.133269589645*x[0]**o+(-0.521490067085)*x[0]+(-0.470507869048)*x[1]**o+(-0.195993261556)*x[1]
+        ref[0, 2, 0, 0]=-0.133269589645*o*x_ref[0]**(o-1)+(-0.521490067085)
+        ref[0, 2, 0, 1]=-0.470507869048*o*x_ref[1]**(o-1)+(-0.195993261556)
+        arg[0, 2, 1]=0.068155508654*x[0]**o+(0.191062183217)*x[0]+(-0.382370929119)*x[1]**o+(0.305850925352)*x[1]
+        ref[0, 2, 1, 0]=0.068155508654*o*x_ref[0]**(o-1)+(0.191062183217)
+        ref[0, 2, 1, 1]=-0.382370929119*o*x_ref[1]**(o-1)+(0.305850925352)
+        arg[0, 2, 2]=-0.771696474911*x[0]**o+(-0.00764821918108)*x[0]+(-0.0801266753371)*x[1]**o+(0.527152995017)*x[1]
+        ref[0, 2, 2, 0]=-0.771696474911*o*x_ref[0]**(o-1)+(-0.00764821918108)
+        ref[0, 2, 2, 1]=-0.0801266753371*o*x_ref[1]**(o-1)+(0.527152995017)
+        arg[0, 2, 3]=-0.705997909702*x[0]**o+(0.971187261998)*x[0]+(-0.841873792477)*x[1]**o+(0.194224658033)*x[1]
+        ref[0, 2, 3, 0]=-0.705997909702*o*x_ref[0]**(o-1)+(0.971187261998)
+        ref[0, 2, 3, 1]=-0.841873792477*o*x_ref[1]**(o-1)+(0.194224658033)
+        arg[0, 3, 0]=-0.0464881756423*x[0]**o+(0.0375302765887)*x[0]+(0.0148568753128)*x[1]**o+(-0.226034621134)*x[1]
+        ref[0, 3, 0, 0]=-0.0464881756423*o*x_ref[0]**(o-1)+(0.0375302765887)
+        ref[0, 3, 0, 1]=0.0148568753128*o*x_ref[1]**(o-1)+(-0.226034621134)
+        arg[0, 3, 1]=-0.525804375198*x[0]**o+(0.69074202893)*x[0]+(0.187602634489)*x[1]**o+(-0.568089322045)*x[1]
+        ref[0, 3, 1, 0]=-0.525804375198*o*x_ref[0]**(o-1)+(0.69074202893)
+        ref[0, 3, 1, 1]=0.187602634489*o*x_ref[1]**(o-1)+(-0.568089322045)
+        arg[0, 3, 2]=-0.511947368054*x[0]**o+(-0.463338804694)*x[0]+(0.899314074302)*x[1]**o+(-0.728179195856)*x[1]
+        ref[0, 3, 2, 0]=-0.511947368054*o*x_ref[0]**(o-1)+(-0.463338804694)
+        ref[0, 3, 2, 1]=0.899314074302*o*x_ref[1]**(o-1)+(-0.728179195856)
+        arg[0, 3, 3]=0.573782010874*x[0]**o+(0.637726624764)*x[0]+(-0.369778590369)*x[1]**o+(0.240568206839)*x[1]
+        ref[0, 3, 3, 0]=0.573782010874*o*x_ref[0]**(o-1)+(0.637726624764)
+        ref[0, 3, 3, 1]=-0.369778590369*o*x_ref[1]**(o-1)+(0.240568206839)
+        arg[1, 0, 0]=0.17497277886*x[0]**o+(0.127296628246)*x[0]+(0.296811682365)*x[1]**o+(-0.448990146071)*x[1]
+        ref[1, 0, 0, 0]=0.17497277886*o*x_ref[0]**(o-1)+(0.127296628246)
+        ref[1, 0, 0, 1]=0.296811682365*o*x_ref[1]**(o-1)+(-0.448990146071)
+        arg[1, 0, 1]=-0.769485000536*x[0]**o+(0.220784709468)*x[0]+(-0.62406194198)*x[1]**o+(-0.53631590544)*x[1]
+        ref[1, 0, 1, 0]=-0.769485000536*o*x_ref[0]**(o-1)+(0.220784709468)
+        ref[1, 0, 1, 1]=-0.62406194198*o*x_ref[1]**(o-1)+(-0.53631590544)
+        arg[1, 0, 2]=-0.268928560315*x[0]**o+(0.9270476958)*x[0]+(-0.226599181601)*x[1]**o+(0.577493050858)*x[1]
+        ref[1, 0, 2, 0]=-0.268928560315*o*x_ref[0]**(o-1)+(0.9270476958)
+        ref[1, 0, 2, 1]=-0.226599181601*o*x_ref[1]**(o-1)+(0.577493050858)
+        arg[1, 0, 3]=-0.465799942562*x[0]**o+(-0.49232903903)*x[0]+(-0.670495155568)*x[1]**o+(0.0480742920114)*x[1]
+        ref[1, 0, 3, 0]=-0.465799942562*o*x_ref[0]**(o-1)+(-0.49232903903)
+        ref[1, 0, 3, 1]=-0.670495155568*o*x_ref[1]**(o-1)+(0.0480742920114)
+        arg[1, 1, 0]=-0.0829901942771*x[0]**o+(-0.677405783448)*x[0]+(-0.232233179805)*x[1]**o+(-0.878585232044)*x[1]
+        ref[1, 1, 0, 0]=-0.0829901942771*o*x_ref[0]**(o-1)+(-0.677405783448)
+        ref[1, 1, 0, 1]=-0.232233179805*o*x_ref[1]**(o-1)+(-0.878585232044)
+        arg[1, 1, 1]=-0.428594352271*x[0]**o+(-0.487452402687)*x[0]+(-0.56521288012)*x[1]**o+(-0.208688823368)*x[1]
+        ref[1, 1, 1, 0]=-0.428594352271*o*x_ref[0]**(o-1)+(-0.487452402687)
+        ref[1, 1, 1, 1]=-0.56521288012*o*x_ref[1]**(o-1)+(-0.208688823368)
+        arg[1, 1, 2]=0.178009408445*x[0]**o+(-0.0170168047441)*x[0]+(0.623756510102)*x[1]**o+(-0.422009855586)*x[1]
+        ref[1, 1, 2, 0]=0.178009408445*o*x_ref[0]**(o-1)+(-0.0170168047441)
+        ref[1, 1, 2, 1]=0.623756510102*o*x_ref[1]**(o-1)+(-0.422009855586)
+        arg[1, 1, 3]=0.352894782884*x[0]**o+(0.656598704705)*x[0]+(0.528471251847)*x[1]**o+(0.191705229933)*x[1]
+        ref[1, 1, 3, 0]=0.352894782884*o*x_ref[0]**(o-1)+(0.656598704705)
+        ref[1, 1, 3, 1]=0.528471251847*o*x_ref[1]**(o-1)+(0.191705229933)
+        arg[1, 2, 0]=0.0980116016865*x[0]**o+(-0.525092807843)*x[0]+(0.647253297391)*x[1]**o+(-0.87703688463)*x[1]
+        ref[1, 2, 0, 0]=0.0980116016865*o*x_ref[0]**(o-1)+(-0.525092807843)
+        ref[1, 2, 0, 1]=0.647253297391*o*x_ref[1]**(o-1)+(-0.87703688463)
+        arg[1, 2, 1]=0.647267538024*x[0]**o+(-0.380655967843)*x[0]+(0.724426392823)*x[1]**o+(0.0313324940667)*x[1]
+        ref[1, 2, 1, 0]=0.647267538024*o*x_ref[0]**(o-1)+(-0.380655967843)
+        ref[1, 2, 1, 1]=0.724426392823*o*x_ref[1]**(o-1)+(0.0313324940667)
+        arg[1, 2, 2]=0.991943970062*x[0]**o+(-0.326495948622)*x[0]+(0.06653468572)*x[1]**o+(-0.706576582437)*x[1]
+        ref[1, 2, 2, 0]=0.991943970062*o*x_ref[0]**(o-1)+(-0.326495948622)
+        ref[1, 2, 2, 1]=0.06653468572*o*x_ref[1]**(o-1)+(-0.706576582437)
+        arg[1, 2, 3]=0.317356696337*x[0]**o+(-0.484689216709)*x[0]+(-0.654225619519)*x[1]**o+(-0.177035371712)*x[1]
+        ref[1, 2, 3, 0]=0.317356696337*o*x_ref[0]**(o-1)+(-0.484689216709)
+        ref[1, 2, 3, 1]=-0.654225619519*o*x_ref[1]**(o-1)+(-0.177035371712)
+        arg[1, 3, 0]=-0.919906282891*x[0]**o+(-0.220258859624)*x[0]+(0.573634356161)*x[1]**o+(0.427610605468)*x[1]
+        ref[1, 3, 0, 0]=-0.919906282891*o*x_ref[0]**(o-1)+(-0.220258859624)
+        ref[1, 3, 0, 1]=0.573634356161*o*x_ref[1]**(o-1)+(0.427610605468)
+        arg[1, 3, 1]=-0.00417917174463*x[0]**o+(-0.910661364218)*x[0]+(0.93426839231)*x[1]**o+(0.258376224828)*x[1]
+        ref[1, 3, 1, 0]=-0.00417917174463*o*x_ref[0]**(o-1)+(-0.910661364218)
+        ref[1, 3, 1, 1]=0.93426839231*o*x_ref[1]**(o-1)+(0.258376224828)
+        arg[1, 3, 2]=-0.728191179178*x[0]**o+(-0.131324333553)*x[0]+(0.0686982665418)*x[1]**o+(0.738699756977)*x[1]
+        ref[1, 3, 2, 0]=-0.728191179178*o*x_ref[0]**(o-1)+(-0.131324333553)
+        ref[1, 3, 2, 1]=0.0686982665418*o*x_ref[1]**(o-1)+(0.738699756977)
+        arg[1, 3, 3]=-0.655289973694*x[0]**o+(0.687641461714)*x[0]+(-0.746847271494)*x[1]**o+(0.913798694509)*x[1]
+        ref[1, 3, 3, 0]=-0.655289973694*o*x_ref[0]**(o-1)+(0.687641461714)
+        ref[1, 3, 3, 1]=-0.746847271494*o*x_ref[1]**(o-1)+(0.913798694509)
+        arg[2, 0, 0]=0.683367462192*x[0]**o+(0.000867896927055)*x[0]+(-0.203355713541)*x[1]**o+(-0.520230555011)*x[1]
+        ref[2, 0, 0, 0]=0.683367462192*o*x_ref[0]**(o-1)+(0.000867896927055)
+        ref[2, 0, 0, 1]=-0.203355713541*o*x_ref[1]**(o-1)+(-0.520230555011)
+        arg[2, 0, 1]=0.697747240913*x[0]**o+(0.925651598956)*x[0]+(-0.237177509445)*x[1]**o+(-0.540771424201)*x[1]
+        ref[2, 0, 1, 0]=0.697747240913*o*x_ref[0]**(o-1)+(0.925651598956)
+        ref[2, 0, 1, 1]=-0.237177509445*o*x_ref[1]**(o-1)+(-0.540771424201)
+        arg[2, 0, 2]=0.103995639201*x[0]**o+(-0.427785570485)*x[0]+(-0.793743416776)*x[1]**o+(0.399898913838)*x[1]
+        ref[2, 0, 2, 0]=0.103995639201*o*x_ref[0]**(o-1)+(-0.427785570485)
+        ref[2, 0, 2, 1]=-0.793743416776*o*x_ref[1]**(o-1)+(0.399898913838)
+        arg[2, 0, 3]=0.926107311217*x[0]**o+(-0.409082618651)*x[0]+(-0.669349218611)*x[1]**o+(-0.647119064264)*x[1]
+        ref[2, 0, 3, 0]=0.926107311217*o*x_ref[0]**(o-1)+(-0.409082618651)
+        ref[2, 0, 3, 1]=-0.669349218611*o*x_ref[1]**(o-1)+(-0.647119064264)
+        arg[2, 1, 0]=0.810534036705*x[0]**o+(-0.434754590585)*x[0]+(0.797516455773)*x[1]**o+(-0.186773843181)*x[1]
+        ref[2, 1, 0, 0]=0.810534036705*o*x_ref[0]**(o-1)+(-0.434754590585)
+        ref[2, 1, 0, 1]=0.797516455773*o*x_ref[1]**(o-1)+(-0.186773843181)
+        arg[2, 1, 1]=-0.851110437401*x[0]**o+(-0.117906921064)*x[0]+(0.776246008781)*x[1]**o+(0.498190907433)*x[1]
+        ref[2, 1, 1, 0]=-0.851110437401*o*x_ref[0]**(o-1)+(-0.117906921064)
+        ref[2, 1, 1, 1]=0.776246008781*o*x_ref[1]**(o-1)+(0.498190907433)
+        arg[2, 1, 2]=-0.245922237623*x[0]**o+(0.394303859672)*x[0]+(-0.0902809657716)*x[1]**o+(0.691205444329)*x[1]
+        ref[2, 1, 2, 0]=-0.245922237623*o*x_ref[0]**(o-1)+(0.394303859672)
+        ref[2, 1, 2, 1]=-0.0902809657716*o*x_ref[1]**(o-1)+(0.691205444329)
+        arg[2, 1, 3]=0.124197323764*x[0]**o+(0.545488478913)*x[0]+(-0.58401231205)*x[1]**o+(0.744063287683)*x[1]
+        ref[2, 1, 3, 0]=0.124197323764*o*x_ref[0]**(o-1)+(0.545488478913)
+        ref[2, 1, 3, 1]=-0.58401231205*o*x_ref[1]**(o-1)+(0.744063287683)
+        arg[2, 2, 0]=-0.593944177098*x[0]**o+(0.927065884016)*x[0]+(-0.446860404334)*x[1]**o+(0.959427981842)*x[1]
+        ref[2, 2, 0, 0]=-0.593944177098*o*x_ref[0]**(o-1)+(0.927065884016)
+        ref[2, 2, 0, 1]=-0.446860404334*o*x_ref[1]**(o-1)+(0.959427981842)
+        arg[2, 2, 1]=0.977253490291*x[0]**o+(0.310711704751)*x[0]+(0.946846725723)*x[1]**o+(0.465272065684)*x[1]
+        ref[2, 2, 1, 0]=0.977253490291*o*x_ref[0]**(o-1)+(0.310711704751)
+        ref[2, 2, 1, 1]=0.946846725723*o*x_ref[1]**(o-1)+(0.465272065684)
+        arg[2, 2, 2]=0.931503539781*x[0]**o+(-0.277374441254)*x[0]+(-0.442351604964)*x[1]**o+(0.813384699611)*x[1]
+        ref[2, 2, 2, 0]=0.931503539781*o*x_ref[0]**(o-1)+(-0.277374441254)
+        ref[2, 2, 2, 1]=-0.442351604964*o*x_ref[1]**(o-1)+(0.813384699611)
+        arg[2, 2, 3]=-0.340005635696*x[0]**o+(-0.271026224141)*x[0]+(-0.983312826044)*x[1]**o+(0.399694538662)*x[1]
+        ref[2, 2, 3, 0]=-0.340005635696*o*x_ref[0]**(o-1)+(-0.271026224141)
+        ref[2, 2, 3, 1]=-0.983312826044*o*x_ref[1]**(o-1)+(0.399694538662)
+        arg[2, 3, 0]=0.938598701928*x[0]**o+(-0.610155573277)*x[0]+(-0.423699252913)*x[1]**o+(-0.971998264119)*x[1]
+        ref[2, 3, 0, 0]=0.938598701928*o*x_ref[0]**(o-1)+(-0.610155573277)
+        ref[2, 3, 0, 1]=-0.423699252913*o*x_ref[1]**(o-1)+(-0.971998264119)
+        arg[2, 3, 1]=0.692791075271*x[0]**o+(0.3768950788)*x[0]+(-0.976160912062)*x[1]**o+(-0.78326062973)*x[1]
+        ref[2, 3, 1, 0]=0.692791075271*o*x_ref[0]**(o-1)+(0.3768950788)
+        ref[2, 3, 1, 1]=-0.976160912062*o*x_ref[1]**(o-1)+(-0.78326062973)
+        arg[2, 3, 2]=-0.547576290971*x[0]**o+(-0.406516454564)*x[0]+(-0.12382235162)*x[1]**o+(0.978351615071)*x[1]
+        ref[2, 3, 2, 0]=-0.547576290971*o*x_ref[0]**(o-1)+(-0.406516454564)
+        ref[2, 3, 2, 1]=-0.12382235162*o*x_ref[1]**(o-1)+(0.978351615071)
+        arg[2, 3, 3]=0.659739006764*x[0]**o+(0.967266140077)*x[0]+(-0.485297784748)*x[1]**o+(-0.843434887911)*x[1]
+        ref[2, 3, 3, 0]=0.659739006764*o*x_ref[0]**(o-1)+(0.967266140077)
+        ref[2, 3, 3, 1]=-0.485297784748*o*x_ref[1]**(o-1)+(-0.843434887911)
+        if dim==3:
+            arg[0, 0, 0]+=-0.237001064047*x[2]**o+(-0.679698964345)*x[2]
+            ref[0, 0, 0, 2]=-0.237001064047*o*x_ref[2]**(o-1)+(-0.679698964345)
+            arg[0, 0, 1]+=0.200657795817*x[2]**o+(-0.0546123212034)*x[2]
+            ref[0, 0, 1, 2]=0.200657795817*o*x_ref[2]**(o-1)+(-0.0546123212034)
+            arg[0, 0, 2]+=0.724319470054*x[2]**o+(-0.51951773839)*x[2]
+            ref[0, 0, 2, 2]=0.724319470054*o*x_ref[2]**(o-1)+(-0.51951773839)
+            arg[0, 0, 3]+=0.253904117303*x[2]**o+(-0.374211090927)*x[2]
+            ref[0, 0, 3, 2]=0.253904117303*o*x_ref[2]**(o-1)+(-0.374211090927)
+            arg[0, 1, 0]+=-0.865165895746*x[2]**o+(-0.214304242227)*x[2]
+            ref[0, 1, 0, 2]=-0.865165895746*o*x_ref[2]**(o-1)+(-0.214304242227)
+            arg[0, 1, 1]+=-0.898767453636*x[2]**o+(0.444108033102)*x[2]
+            ref[0, 1, 1, 2]=-0.898767453636*o*x_ref[2]**(o-1)+(0.444108033102)
+            arg[0, 1, 2]+=0.293046216854*x[2]**o+(-0.0803960511794)*x[2]
+            ref[0, 1, 2, 2]=0.293046216854*o*x_ref[2]**(o-1)+(-0.0803960511794)
+            arg[0, 1, 3]+=0.351107725194*x[2]**o+(0.452074342873)*x[2]
+            ref[0, 1, 3, 2]=0.351107725194*o*x_ref[2]**(o-1)+(0.452074342873)
+            arg[0, 2, 0]+=0.435816558313*x[2]**o+(0.043064921932)*x[2]
+            ref[0, 2, 0, 2]=0.435816558313*o*x_ref[2]**(o-1)+(0.043064921932)
+            arg[0, 2, 1]+=-0.136587816885*x[2]**o+(0.286329646355)*x[2]
+            ref[0, 2, 1, 2]=-0.136587816885*o*x_ref[2]**(o-1)+(0.286329646355)
+            arg[0, 2, 2]+=-0.408304969375*x[2]**o+(0.678381126987)*x[2]
+            ref[0, 2, 2, 2]=-0.408304969375*o*x_ref[2]**(o-1)+(0.678381126987)
+            arg[0, 2, 3]+=0.596485344115*x[2]**o+(-0.421964692876)*x[2]
+            ref[0, 2, 3, 2]=0.596485344115*o*x_ref[2]**(o-1)+(-0.421964692876)
+            arg[0, 3, 0]+=0.214388943927*x[2]**o+(0.289272339116)*x[2]
+            ref[0, 3, 0, 2]=0.214388943927*o*x_ref[2]**(o-1)+(0.289272339116)
+            arg[0, 3, 1]+=0.784923494486*x[2]**o+(0.441666291202)*x[2]
+            ref[0, 3, 1, 2]=0.784923494486*o*x_ref[2]**(o-1)+(0.441666291202)
+            arg[0, 3, 2]+=0.61266319611*x[2]**o+(-0.0227373540544)*x[2]
+            ref[0, 3, 2, 2]=0.61266319611*o*x_ref[2]**(o-1)+(-0.0227373540544)
+            arg[0, 3, 3]+=0.894468357814*x[2]**o+(0.21416535986)*x[2]
+            ref[0, 3, 3, 2]=0.894468357814*o*x_ref[2]**(o-1)+(0.21416535986)
+            arg[1, 0, 0]+=0.837980628694*x[2]**o+(-0.755819243934)*x[2]
+            ref[1, 0, 0, 2]=0.837980628694*o*x_ref[2]**(o-1)+(-0.755819243934)
+            arg[1, 0, 1]+=0.201038262282*x[2]**o+(-0.36712853617)*x[2]
+            ref[1, 0, 1, 2]=0.201038262282*o*x_ref[2]**(o-1)+(-0.36712853617)
+            arg[1, 0, 2]+=-0.0530151577496*x[2]**o+(-0.858333271294)*x[2]
+            ref[1, 0, 2, 2]=-0.0530151577496*o*x_ref[2]**(o-1)+(-0.858333271294)
+            arg[1, 0, 3]+=-0.224671926105*x[2]**o+(-0.372162591489)*x[2]
+            ref[1, 0, 3, 2]=-0.224671926105*o*x_ref[2]**(o-1)+(-0.372162591489)
+            arg[1, 1, 0]+=-0.304642260931*x[2]**o+(-0.424475157691)*x[2]
+            ref[1, 1, 0, 2]=-0.304642260931*o*x_ref[2]**(o-1)+(-0.424475157691)
+            arg[1, 1, 1]+=-0.376683118286*x[2]**o+(-0.782146507114)*x[2]
+            ref[1, 1, 1, 2]=-0.376683118286*o*x_ref[2]**(o-1)+(-0.782146507114)
+            arg[1, 1, 2]+=-0.0884171806612*x[2]**o+(0.198822979803)*x[2]
+            ref[1, 1, 2, 2]=-0.0884171806612*o*x_ref[2]**(o-1)+(0.198822979803)
+            arg[1, 1, 3]+=0.0896104489248*x[2]**o+(-0.262921532144)*x[2]
+            ref[1, 1, 3, 2]=0.0896104489248*o*x_ref[2]**(o-1)+(-0.262921532144)
+            arg[1, 2, 0]+=-0.862394114381*x[2]**o+(-0.274126738578)*x[2]
+            ref[1, 2, 0, 2]=-0.862394114381*o*x_ref[2]**(o-1)+(-0.274126738578)
+            arg[1, 2, 1]+=-0.581696061928*x[2]**o+(-0.10110023816)*x[2]
+            ref[1, 2, 1, 2]=-0.581696061928*o*x_ref[2]**(o-1)+(-0.10110023816)
+            arg[1, 2, 2]+=-0.746054244533*x[2]**o+(-0.388319625983)*x[2]
+            ref[1, 2, 2, 2]=-0.746054244533*o*x_ref[2]**(o-1)+(-0.388319625983)
+            arg[1, 2, 3]+=-0.941156742343*x[2]**o+(0.635707298062)*x[2]
+            ref[1, 2, 3, 2]=-0.941156742343*o*x_ref[2]**(o-1)+(0.635707298062)
+            arg[1, 3, 0]+=-0.485742319955*x[2]**o+(0.273295466272)*x[2]
+            ref[1, 3, 0, 2]=-0.485742319955*o*x_ref[2]**(o-1)+(0.273295466272)
+            arg[1, 3, 1]+=0.755842531877*x[2]**o+(-0.085940978802)*x[2]
+            ref[1, 3, 1, 2]=0.755842531877*o*x_ref[2]**(o-1)+(-0.085940978802)
+            arg[1, 3, 2]+=-0.670700934099*x[2]**o+(0.569489523477)*x[2]
+            ref[1, 3, 2, 2]=-0.670700934099*o*x_ref[2]**(o-1)+(0.569489523477)
+            arg[1, 3, 3]+=0.341930523809*x[2]**o+(-0.19684395882)*x[2]
+            ref[1, 3, 3, 2]=0.341930523809*o*x_ref[2]**(o-1)+(-0.19684395882)
+            arg[2, 0, 0]+=-0.88460946352*x[2]**o+(-0.953766710828)*x[2]
+            ref[2, 0, 0, 2]=-0.88460946352*o*x_ref[2]**(o-1)+(-0.953766710828)
+            arg[2, 0, 1]+=-0.156744341067*x[2]**o+(0.50169327835)*x[2]
+            ref[2, 0, 1, 2]=-0.156744341067*o*x_ref[2]**(o-1)+(0.50169327835)
+            arg[2, 0, 2]+=-0.690124252277*x[2]**o+(-0.0541140976202)*x[2]
+            ref[2, 0, 2, 2]=-0.690124252277*o*x_ref[2]**(o-1)+(-0.0541140976202)
+            arg[2, 0, 3]+=-0.481808314191*x[2]**o+(-0.410491944335)*x[2]
+            ref[2, 0, 3, 2]=-0.481808314191*o*x_ref[2]**(o-1)+(-0.410491944335)
+            arg[2, 1, 0]+=-0.0658414258249*x[2]**o+(-0.357785093977)*x[2]
+            ref[2, 1, 0, 2]=-0.0658414258249*o*x_ref[2]**(o-1)+(-0.357785093977)
+            arg[2, 1, 1]+=-0.194714756861*x[2]**o+(-0.38611091308)*x[2]
+            ref[2, 1, 1, 2]=-0.194714756861*o*x_ref[2]**(o-1)+(-0.38611091308)
+            arg[2, 1, 2]+=-0.864136522859*x[2]**o+(0.184896646788)*x[2]
+            ref[2, 1, 2, 2]=-0.864136522859*o*x_ref[2]**(o-1)+(0.184896646788)
+            arg[2, 1, 3]+=-0.409132400811*x[2]**o+(-0.477965316045)*x[2]
+            ref[2, 1, 3, 2]=-0.409132400811*o*x_ref[2]**(o-1)+(-0.477965316045)
+            arg[2, 2, 0]+=0.327906541985*x[2]**o+(-0.98313616629)*x[2]
+            ref[2, 2, 0, 2]=0.327906541985*o*x_ref[2]**(o-1)+(-0.98313616629)
+            arg[2, 2, 1]+=0.815088496192*x[2]**o+(-0.404789424535)*x[2]
+            ref[2, 2, 1, 2]=0.815088496192*o*x_ref[2]**(o-1)+(-0.404789424535)
+            arg[2, 2, 2]+=-0.738596269531*x[2]**o+(-0.651871064495)*x[2]
+            ref[2, 2, 2, 2]=-0.738596269531*o*x_ref[2]**(o-1)+(-0.651871064495)
+            arg[2, 2, 3]+=-0.492848963439*x[2]**o+(0.381118599796)*x[2]
+            ref[2, 2, 3, 2]=-0.492848963439*o*x_ref[2]**(o-1)+(0.381118599796)
+            arg[2, 3, 0]+=-0.755714213522*x[2]**o+(-0.49787613725)*x[2]
+            ref[2, 3, 0, 2]=-0.755714213522*o*x_ref[2]**(o-1)+(-0.49787613725)
+            arg[2, 3, 1]+=0.589571004674*x[2]**o+(-0.934085572504)*x[2]
+            ref[2, 3, 1, 2]=0.589571004674*o*x_ref[2]**(o-1)+(-0.934085572504)
+            arg[2, 3, 2]+=0.265270696335*x[2]**o+(-0.662032789357)*x[2]
+            ref[2, 3, 2, 2]=0.265270696335*o*x_ref[2]**(o-1)+(-0.662032789357)
+            arg[2, 3, 3]+=-0.864049964987*x[2]**o+(0.596180959552)*x[2]
+            ref[2, 3, 3, 2]=-0.864049964987*o*x_ref[2]**(o-1)+(0.596180959552)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.0726837738806*x[0]**o+(0.777968181025)*x[0]+(-0.557134856822)*x[1]**o+(0.180673106459)*x[1]
+        ref[0]=0.0726837738806*o*x_ref[0]**(o-1)+(0.777968181025)
+        ref[1]=-0.557134856822*o*x_ref[1]**(o-1)+(0.180673106459)
+        if dim==3:
+            arg+=(-0.950679335775)*x[2]**o+(-0.289133051123)*x[2]
+            ref[2]=-0.950679335775*o*x_ref[2]**(o-1)+(-0.289133051123)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=-0.696164174885*x[0]**o+(0.856167514053)*x[0]+(0.0657123288504)*x[1]**o+(-0.998686592749)*x[1]
+        ref[0, 0]=-0.696164174885*o*x_ref[0]**(o-1)+(0.856167514053)
+        ref[0, 1]=0.0657123288504*o*x_ref[1]**(o-1)+(-0.998686592749)
+        arg[1,]=-0.441594351987*x[0]**o+(-0.869787102603)*x[0]+(0.453167049537)*x[1]**o+(-0.994480181798)*x[1]
+        ref[1, 0]=-0.441594351987*o*x_ref[0]**(o-1)+(-0.869787102603)
+        ref[1, 1]=0.453167049537*o*x_ref[1]**(o-1)+(-0.994480181798)
+        arg[2,]=-0.490574343073*x[0]**o+(-0.961657806717)*x[0]+(0.308464705727)*x[1]**o+(-0.680804116705)*x[1]
+        ref[2, 0]=-0.490574343073*o*x_ref[0]**(o-1)+(-0.961657806717)
+        ref[2, 1]=0.308464705727*o*x_ref[1]**(o-1)+(-0.680804116705)
+        arg[3,]=-0.189904034988*x[0]**o+(-0.650114090432)*x[0]+(0.523291218569)*x[1]**o+(0.338852412448)*x[1]
+        ref[3, 0]=-0.189904034988*o*x_ref[0]**(o-1)+(-0.650114090432)
+        ref[3, 1]=0.523291218569*o*x_ref[1]**(o-1)+(0.338852412448)
+        if dim==3:
+            arg[0,]+=0.0899014993799*x[2]**o+(0.0743571579567)*x[2]
+            ref[0, 2]=0.0899014993799*o*x_ref[2]**(o-1)+(0.0743571579567)
+            arg[1,]+=0.477928022455*x[2]**o+(-0.190040112028)*x[2]
+            ref[1, 2]=0.477928022455*o*x_ref[2]**(o-1)+(-0.190040112028)
+            arg[2,]+=-0.488171239162*x[2]**o+(-0.745196703218)*x[2]
+            ref[2, 2]=-0.488171239162*o*x_ref[2]**(o-1)+(-0.745196703218)
+            arg[3,]+=0.951582933836*x[2]**o+(-0.75299500436)*x[2]
+            ref[3, 2]=0.951582933836*o*x_ref[2]**(o-1)+(-0.75299500436)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=0.865784545599*x[0]**o+(-0.54513382524)*x[0]+(-0.571448957672)*x[1]**o+(0.929923236032)*x[1]
+        ref[0, 0, 0]=0.865784545599*o*x_ref[0]**(o-1)+(-0.54513382524)
+        ref[0, 0, 1]=-0.571448957672*o*x_ref[1]**(o-1)+(0.929923236032)
+        arg[0, 1]=0.676657142109*x[0]**o+(0.987548850225)*x[0]+(-0.370320596588)*x[1]**o+(-0.414269803532)*x[1]
+        ref[0, 1, 0]=0.676657142109*o*x_ref[0]**(o-1)+(0.987548850225)
+        ref[0, 1, 1]=-0.370320596588*o*x_ref[1]**(o-1)+(-0.414269803532)
+        arg[0, 2]=-0.233699621407*x[0]**o+(-0.8680467727)*x[0]+(-0.137949398755)*x[1]**o+(-0.463885424036)*x[1]
+        ref[0, 2, 0]=-0.233699621407*o*x_ref[0]**(o-1)+(-0.8680467727)
+        ref[0, 2, 1]=-0.137949398755*o*x_ref[1]**(o-1)+(-0.463885424036)
+        arg[0, 3]=-0.296810994896*x[0]**o+(-0.708305727014)*x[0]+(-0.538048423108)*x[1]**o+(-0.905829517925)*x[1]
+        ref[0, 3, 0]=-0.296810994896*o*x_ref[0]**(o-1)+(-0.708305727014)
+        ref[0, 3, 1]=-0.538048423108*o*x_ref[1]**(o-1)+(-0.905829517925)
+        arg[1, 0]=-0.255097631461*x[0]**o+(0.769395362787)*x[0]+(0.105528433687)*x[1]**o+(-0.616730492933)*x[1]
+        ref[1, 0, 0]=-0.255097631461*o*x_ref[0]**(o-1)+(0.769395362787)
+        ref[1, 0, 1]=0.105528433687*o*x_ref[1]**(o-1)+(-0.616730492933)
+        arg[1, 1]=0.614470946833*x[0]**o+(-0.6589661182)*x[0]+(-0.280908785772)*x[1]**o+(-0.555566228524)*x[1]
+        ref[1, 1, 0]=0.614470946833*o*x_ref[0]**(o-1)+(-0.6589661182)
+        ref[1, 1, 1]=-0.280908785772*o*x_ref[1]**(o-1)+(-0.555566228524)
+        arg[1, 2]=-0.464803507034*x[0]**o+(-0.366440713591)*x[0]+(-0.407094872473)*x[1]**o+(0.786952704428)*x[1]
+        ref[1, 2, 0]=-0.464803507034*o*x_ref[0]**(o-1)+(-0.366440713591)
+        ref[1, 2, 1]=-0.407094872473*o*x_ref[1]**(o-1)+(0.786952704428)
+        arg[1, 3]=0.873162481339*x[0]**o+(0.437782693112)*x[0]+(0.625423562618)*x[1]**o+(0.817147604728)*x[1]
+        ref[1, 3, 0]=0.873162481339*o*x_ref[0]**(o-1)+(0.437782693112)
+        ref[1, 3, 1]=0.625423562618*o*x_ref[1]**(o-1)+(0.817147604728)
+        arg[2, 0]=-0.126947310333*x[0]**o+(0.712865273801)*x[0]+(0.339582565163)*x[1]**o+(-0.707462720673)*x[1]
+        ref[2, 0, 0]=-0.126947310333*o*x_ref[0]**(o-1)+(0.712865273801)
+        ref[2, 0, 1]=0.339582565163*o*x_ref[1]**(o-1)+(-0.707462720673)
+        arg[2, 1]=-0.174436692934*x[0]**o+(0.337586385684)*x[0]+(-0.700820207733)*x[1]**o+(0.821175718763)*x[1]
+        ref[2, 1, 0]=-0.174436692934*o*x_ref[0]**(o-1)+(0.337586385684)
+        ref[2, 1, 1]=-0.700820207733*o*x_ref[1]**(o-1)+(0.821175718763)
+        arg[2, 2]=-0.815158522651*x[0]**o+(0.165757349141)*x[0]+(0.913551373708)*x[1]**o+(-0.966924696273)*x[1]
+        ref[2, 2, 0]=-0.815158522651*o*x_ref[0]**(o-1)+(0.165757349141)
+        ref[2, 2, 1]=0.913551373708*o*x_ref[1]**(o-1)+(-0.966924696273)
+        arg[2, 3]=-0.467617908158*x[0]**o+(-0.409148268416)*x[0]+(-0.953985332165)*x[1]**o+(0.293598495541)*x[1]
+        ref[2, 3, 0]=-0.467617908158*o*x_ref[0]**(o-1)+(-0.409148268416)
+        ref[2, 3, 1]=-0.953985332165*o*x_ref[1]**(o-1)+(0.293598495541)
+        arg[3, 0]=-0.67876744337*x[0]**o+(-0.0154663671456)*x[0]+(0.485586969394)*x[1]**o+(-0.526553593268)*x[1]
+        ref[3, 0, 0]=-0.67876744337*o*x_ref[0]**(o-1)+(-0.0154663671456)
+        ref[3, 0, 1]=0.485586969394*o*x_ref[1]**(o-1)+(-0.526553593268)
+        arg[3, 1]=-0.0508078077741*x[0]**o+(-0.0545467688374)*x[0]+(0.311058235876)*x[1]**o+(-0.582666222298)*x[1]
+        ref[3, 1, 0]=-0.0508078077741*o*x_ref[0]**(o-1)+(-0.0545467688374)
+        ref[3, 1, 1]=0.311058235876*o*x_ref[1]**(o-1)+(-0.582666222298)
+        arg[3, 2]=0.961229012546*x[0]**o+(0.120856686419)*x[0]+(-0.810691453221)*x[1]**o+(0.80371874244)*x[1]
+        ref[3, 2, 0]=0.961229012546*o*x_ref[0]**(o-1)+(0.120856686419)
+        ref[3, 2, 1]=-0.810691453221*o*x_ref[1]**(o-1)+(0.80371874244)
+        arg[3, 3]=-0.0451637489016*x[0]**o+(0.717749081458)*x[0]+(-0.955707517164)*x[1]**o+(-0.453903744805)*x[1]
+        ref[3, 3, 0]=-0.0451637489016*o*x_ref[0]**(o-1)+(0.717749081458)
+        ref[3, 3, 1]=-0.955707517164*o*x_ref[1]**(o-1)+(-0.453903744805)
+        if dim==3:
+            arg[0, 0]+=-0.282959662013*x[2]**o+(0.235710527656)*x[2]
+            ref[0, 0, 2]=-0.282959662013*o*x_ref[2]**(o-1)+(0.235710527656)
+            arg[0, 1]+=-0.107736108161*x[2]**o+(0.42888129889)*x[2]
+            ref[0, 1, 2]=-0.107736108161*o*x_ref[2]**(o-1)+(0.42888129889)
+            arg[0, 2]+=0.0247441262166*x[2]**o+(-0.350614242913)*x[2]
+            ref[0, 2, 2]=0.0247441262166*o*x_ref[2]**(o-1)+(-0.350614242913)
+            arg[0, 3]+=-0.785883813639*x[2]**o+(0.982828623081)*x[2]
+            ref[0, 3, 2]=-0.785883813639*o*x_ref[2]**(o-1)+(0.982828623081)
+            arg[1, 0]+=-0.330233417206*x[2]**o+(0.966431127843)*x[2]
+            ref[1, 0, 2]=-0.330233417206*o*x_ref[2]**(o-1)+(0.966431127843)
+            arg[1, 1]+=-0.184167817834*x[2]**o+(-0.404750146883)*x[2]
+            ref[1, 1, 2]=-0.184167817834*o*x_ref[2]**(o-1)+(-0.404750146883)
+            arg[1, 2]+=-0.566544855907*x[2]**o+(0.532353717488)*x[2]
+            ref[1, 2, 2]=-0.566544855907*o*x_ref[2]**(o-1)+(0.532353717488)
+            arg[1, 3]+=-0.0262099960824*x[2]**o+(0.367207650072)*x[2]
+            ref[1, 3, 2]=-0.0262099960824*o*x_ref[2]**(o-1)+(0.367207650072)
+            arg[2, 0]+=0.389037050288*x[2]**o+(-0.221755578535)*x[2]
+            ref[2, 0, 2]=0.389037050288*o*x_ref[2]**(o-1)+(-0.221755578535)
+            arg[2, 1]+=-0.0876562486571*x[2]**o+(-0.405254835995)*x[2]
+            ref[2, 1, 2]=-0.0876562486571*o*x_ref[2]**(o-1)+(-0.405254835995)
+            arg[2, 2]+=0.408304066402*x[2]**o+(-0.142503798933)*x[2]
+            ref[2, 2, 2]=0.408304066402*o*x_ref[2]**(o-1)+(-0.142503798933)
+            arg[2, 3]+=0.358905937388*x[2]**o+(-0.144745683941)*x[2]
+            ref[2, 3, 2]=0.358905937388*o*x_ref[2]**(o-1)+(-0.144745683941)
+            arg[3, 0]+=-0.770790546693*x[2]**o+(0.218547337487)*x[2]
+            ref[3, 0, 2]=-0.770790546693*o*x_ref[2]**(o-1)+(0.218547337487)
+            arg[3, 1]+=0.969456328177*x[2]**o+(-0.159214566908)*x[2]
+            ref[3, 1, 2]=0.969456328177*o*x_ref[2]**(o-1)+(-0.159214566908)
+            arg[3, 2]+=-0.927170231243*x[2]**o+(-0.431254112778)*x[2]
+            ref[3, 2, 2]=-0.927170231243*o*x_ref[2]**(o-1)+(-0.431254112778)
+            arg[3, 3]+=-0.462242047455*x[2]**o+(-0.874976606509)*x[2]
+            ref[3, 3, 2]=-0.462242047455*o*x_ref[2]**(o-1)+(-0.874976606509)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.425750205965*x[0]**o+(-0.384916371384)*x[0]+(-0.77590671538)*x[1]**o+(0.696759532206)*x[1]
+        ref[0, 0, 0, 0]=-0.425750205965*o*x_ref[0]**(o-1)+(-0.384916371384)
+        ref[0, 0, 0, 1]=-0.77590671538*o*x_ref[1]**(o-1)+(0.696759532206)
+        arg[0, 0, 1]=-0.616189100978*x[0]**o+(0.600039175007)*x[0]+(0.255339394418)*x[1]**o+(0.209882041587)*x[1]
+        ref[0, 0, 1, 0]=-0.616189100978*o*x_ref[0]**(o-1)+(0.600039175007)
+        ref[0, 0, 1, 1]=0.255339394418*o*x_ref[1]**(o-1)+(0.209882041587)
+        arg[0, 1, 0]=-0.85730900908*x[0]**o+(0.0207648837791)*x[0]+(-0.0444942092326)*x[1]**o+(-0.800909520106)*x[1]
+        ref[0, 1, 0, 0]=-0.85730900908*o*x_ref[0]**(o-1)+(0.0207648837791)
+        ref[0, 1, 0, 1]=-0.0444942092326*o*x_ref[1]**(o-1)+(-0.800909520106)
+        arg[0, 1, 1]=0.871215936724*x[0]**o+(-0.515248392023)*x[0]+(0.0646566322368)*x[1]**o+(0.497397537908)*x[1]
+        ref[0, 1, 1, 0]=0.871215936724*o*x_ref[0]**(o-1)+(-0.515248392023)
+        ref[0, 1, 1, 1]=0.0646566322368*o*x_ref[1]**(o-1)+(0.497397537908)
+        arg[0, 2, 0]=0.319954455749*x[0]**o+(0.409819054953)*x[0]+(0.340440405964)*x[1]**o+(0.871674346978)*x[1]
+        ref[0, 2, 0, 0]=0.319954455749*o*x_ref[0]**(o-1)+(0.409819054953)
+        ref[0, 2, 0, 1]=0.340440405964*o*x_ref[1]**(o-1)+(0.871674346978)
+        arg[0, 2, 1]=0.267724071195*x[0]**o+(-0.735583458929)*x[0]+(-0.0772023983432)*x[1]**o+(-0.212203498931)*x[1]
+        ref[0, 2, 1, 0]=0.267724071195*o*x_ref[0]**(o-1)+(-0.735583458929)
+        ref[0, 2, 1, 1]=-0.0772023983432*o*x_ref[1]**(o-1)+(-0.212203498931)
+        arg[1, 0, 0]=0.0913437733668*x[0]**o+(-0.120164009587)*x[0]+(0.467993733656)*x[1]**o+(-0.679774366976)*x[1]
+        ref[1, 0, 0, 0]=0.0913437733668*o*x_ref[0]**(o-1)+(-0.120164009587)
+        ref[1, 0, 0, 1]=0.467993733656*o*x_ref[1]**(o-1)+(-0.679774366976)
+        arg[1, 0, 1]=0.670041574952*x[0]**o+(0.808047219332)*x[0]+(0.427541644709)*x[1]**o+(0.972734940177)*x[1]
+        ref[1, 0, 1, 0]=0.670041574952*o*x_ref[0]**(o-1)+(0.808047219332)
+        ref[1, 0, 1, 1]=0.427541644709*o*x_ref[1]**(o-1)+(0.972734940177)
+        arg[1, 1, 0]=0.999730157952*x[0]**o+(0.486767467685)*x[0]+(-0.238306984712)*x[1]**o+(0.423556131901)*x[1]
+        ref[1, 1, 0, 0]=0.999730157952*o*x_ref[0]**(o-1)+(0.486767467685)
+        ref[1, 1, 0, 1]=-0.238306984712*o*x_ref[1]**(o-1)+(0.423556131901)
+        arg[1, 1, 1]=0.294230750879*x[0]**o+(-0.238744084784)*x[0]+(0.128022000861)*x[1]**o+(0.433848018569)*x[1]
+        ref[1, 1, 1, 0]=0.294230750879*o*x_ref[0]**(o-1)+(-0.238744084784)
+        ref[1, 1, 1, 1]=0.128022000861*o*x_ref[1]**(o-1)+(0.433848018569)
+        arg[1, 2, 0]=-0.722501861189*x[0]**o+(-0.193360264938)*x[0]+(0.0585876948151)*x[1]**o+(0.0108016755269)*x[1]
+        ref[1, 2, 0, 0]=-0.722501861189*o*x_ref[0]**(o-1)+(-0.193360264938)
+        ref[1, 2, 0, 1]=0.0585876948151*o*x_ref[1]**(o-1)+(0.0108016755269)
+        arg[1, 2, 1]=0.0658011634963*x[0]**o+(0.646842145904)*x[0]+(-0.917808320866)*x[1]**o+(-0.911889726734)*x[1]
+        ref[1, 2, 1, 0]=0.0658011634963*o*x_ref[0]**(o-1)+(0.646842145904)
+        ref[1, 2, 1, 1]=-0.917808320866*o*x_ref[1]**(o-1)+(-0.911889726734)
+        if dim==3:
+            arg[0, 0, 0]+=0.75038734622*x[2]**o+(-0.0588998929253)*x[2]
+            ref[0, 0, 0, 2]=0.75038734622*o*x_ref[2]**(o-1)+(-0.0588998929253)
+            arg[0, 0, 1]+=-0.337746691569*x[2]**o+(0.257095364013)*x[2]
+            ref[0, 0, 1, 2]=-0.337746691569*o*x_ref[2]**(o-1)+(0.257095364013)
+            arg[0, 1, 0]+=-0.578684377398*x[2]**o+(-0.903072642317)*x[2]
+            ref[0, 1, 0, 2]=-0.578684377398*o*x_ref[2]**(o-1)+(-0.903072642317)
+            arg[0, 1, 1]+=0.449508242738*x[2]**o+(-0.344020181001)*x[2]
+            ref[0, 1, 1, 2]=0.449508242738*o*x_ref[2]**(o-1)+(-0.344020181001)
+            arg[0, 2, 0]+=0.535975714119*x[2]**o+(-0.510980917684)*x[2]
+            ref[0, 2, 0, 2]=0.535975714119*o*x_ref[2]**(o-1)+(-0.510980917684)
+            arg[0, 2, 1]+=0.231032469725*x[2]**o+(-0.616718445255)*x[2]
+            ref[0, 2, 1, 2]=0.231032469725*o*x_ref[2]**(o-1)+(-0.616718445255)
+            arg[1, 0, 0]+=-0.95628677931*x[2]**o+(0.747195118179)*x[2]
+            ref[1, 0, 0, 2]=-0.95628677931*o*x_ref[2]**(o-1)+(0.747195118179)
+            arg[1, 0, 1]+=-0.631844708571*x[2]**o+(0.262290916261)*x[2]
+            ref[1, 0, 1, 2]=-0.631844708571*o*x_ref[2]**(o-1)+(0.262290916261)
+            arg[1, 1, 0]+=-0.753034922695*x[2]**o+(-0.883925050351)*x[2]
+            ref[1, 1, 0, 2]=-0.753034922695*o*x_ref[2]**(o-1)+(-0.883925050351)
+            arg[1, 1, 1]+=0.986499110193*x[2]**o+(-0.146839188563)*x[2]
+            ref[1, 1, 1, 2]=0.986499110193*o*x_ref[2]**(o-1)+(-0.146839188563)
+            arg[1, 2, 0]+=0.615923885454*x[2]**o+(-0.404665326741)*x[2]
+            ref[1, 2, 0, 2]=0.615923885454*o*x_ref[2]**(o-1)+(-0.404665326741)
+            arg[1, 2, 1]+=0.0982095475317*x[2]**o+(0.23924342296)*x[2]
+            ref[1, 2, 1, 2]=0.0982095475317*o*x_ref[2]**(o-1)+(0.23924342296)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.329262306178*x[0]+(-0.442757038839)*x[1]
+        ref[0]=-0.329262306178
+        ref[1]=-0.442757038839
+        if dim==3:
+            arg+=(0.0594179088573)*x[2]
+            ref[2]=0.0594179088573
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=0.630528213558*x[0]+(-0.483257658448)*x[1]
+        ref[0, 0]=0.630528213558
+        ref[0, 1]=-0.483257658448
+        arg[1,]=-0.607860783755*x[0]+(0.123726195958)*x[1]
+        ref[1, 0]=-0.607860783755
+        ref[1, 1]=0.123726195958
+        arg[2,]=-0.153450478274*x[0]+(-0.777215020749)*x[1]
+        ref[2, 0]=-0.153450478274
+        ref[2, 1]=-0.777215020749
+        arg[3,]=0.504655325218*x[0]+(0.301600710571)*x[1]
+        ref[3, 0]=0.504655325218
+        ref[3, 1]=0.301600710571
+        if dim==3:
+            arg[0,]+=0.833217554051*x[2]
+            ref[0, 2]=0.833217554051
+            arg[1,]+=-0.481686480879*x[2]
+            ref[1, 2]=-0.481686480879
+            arg[2,]+=-0.146796145879*x[2]
+            ref[2, 2]=-0.146796145879
+            arg[3,]+=0.0985700428026*x[2]
+            ref[3, 2]=0.0985700428026
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=0.818500331902*x[0]+(-0.85048459677)*x[1]
+        ref[0, 0, 0]=0.818500331902
+        ref[0, 0, 1]=-0.85048459677
+        arg[0, 1]=-0.766131710313*x[0]+(0.153812326163)*x[1]
+        ref[0, 1, 0]=-0.766131710313
+        ref[0, 1, 1]=0.153812326163
+        arg[1, 0]=0.339311907759*x[0]+(-0.767515816822)*x[1]
+        ref[1, 0, 0]=0.339311907759
+        ref[1, 0, 1]=-0.767515816822
+        arg[1, 1]=-0.15511849687*x[0]+(-0.739692610794)*x[1]
+        ref[1, 1, 0]=-0.15511849687
+        ref[1, 1, 1]=-0.739692610794
+        arg[2, 0]=0.23201398459*x[0]+(0.205876236273)*x[1]
+        ref[2, 0, 0]=0.23201398459
+        ref[2, 0, 1]=0.205876236273
+        arg[2, 1]=-0.125248386373*x[0]+(-0.745296503965)*x[1]
+        ref[2, 1, 0]=-0.125248386373
+        ref[2, 1, 1]=-0.745296503965
+        if dim==3:
+            arg[0, 0]+=-0.567318904342*x[2]
+            ref[0, 0, 2]=-0.567318904342
+            arg[0, 1]+=0.615335789536*x[2]
+            ref[0, 1, 2]=0.615335789536
+            arg[1, 0]+=-0.58015451196*x[2]
+            ref[1, 0, 2]=-0.58015451196
+            arg[1, 1]+=-0.64806108588*x[2]
+            ref[1, 1, 2]=-0.64806108588
+            arg[2, 0]+=0.210812642632*x[2]
+            ref[2, 0, 2]=0.210812642632
+            arg[2, 1]+=-0.737485568126*x[2]
+            ref[2, 1, 2]=-0.737485568126
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=0.595282922743*x[0]+(-0.477277742583)*x[1]
+        ref[0, 0, 0, 0]=0.595282922743
+        ref[0, 0, 0, 1]=-0.477277742583
+        arg[0, 0, 1]=0.188617609969*x[0]+(0.100549577526)*x[1]
+        ref[0, 0, 1, 0]=0.188617609969
+        ref[0, 0, 1, 1]=0.100549577526
+        arg[0, 0, 2]=0.0476965917023*x[0]+(-0.341432752817)*x[1]
+        ref[0, 0, 2, 0]=0.0476965917023
+        ref[0, 0, 2, 1]=-0.341432752817
+        arg[0, 0, 3]=0.186581367353*x[0]+(0.636978715681)*x[1]
+        ref[0, 0, 3, 0]=0.186581367353
+        ref[0, 0, 3, 1]=0.636978715681
+        arg[0, 1, 0]=-0.902954014828*x[0]+(0.868625591418)*x[1]
+        ref[0, 1, 0, 0]=-0.902954014828
+        ref[0, 1, 0, 1]=0.868625591418
+        arg[0, 1, 1]=-0.538965481483*x[0]+(-0.20653899971)*x[1]
+        ref[0, 1, 1, 0]=-0.538965481483
+        ref[0, 1, 1, 1]=-0.20653899971
+        arg[0, 1, 2]=0.945242842611*x[0]+(0.0359439781214)*x[1]
+        ref[0, 1, 2, 0]=0.945242842611
+        ref[0, 1, 2, 1]=0.0359439781214
+        arg[0, 1, 3]=-0.882718763415*x[0]+(-0.222626329984)*x[1]
+        ref[0, 1, 3, 0]=-0.882718763415
+        ref[0, 1, 3, 1]=-0.222626329984
+        arg[0, 2, 0]=0.264844064395*x[0]+(-0.900145622721)*x[1]
+        ref[0, 2, 0, 0]=0.264844064395
+        ref[0, 2, 0, 1]=-0.900145622721
+        arg[0, 2, 1]=-0.884102770531*x[0]+(-0.176678018823)*x[1]
+        ref[0, 2, 1, 0]=-0.884102770531
+        ref[0, 2, 1, 1]=-0.176678018823
+        arg[0, 2, 2]=-0.0587768700655*x[0]+(-0.482370167509)*x[1]
+        ref[0, 2, 2, 0]=-0.0587768700655
+        ref[0, 2, 2, 1]=-0.482370167509
+        arg[0, 2, 3]=-0.670617476433*x[0]+(0.630652638669)*x[1]
+        ref[0, 2, 3, 0]=-0.670617476433
+        ref[0, 2, 3, 1]=0.630652638669
+        arg[0, 3, 0]=0.548516409906*x[0]+(-0.00647941996481)*x[1]
+        ref[0, 3, 0, 0]=0.548516409906
+        ref[0, 3, 0, 1]=-0.00647941996481
+        arg[0, 3, 1]=-0.734969712337*x[0]+(0.961891924549)*x[1]
+        ref[0, 3, 1, 0]=-0.734969712337
+        ref[0, 3, 1, 1]=0.961891924549
+        arg[0, 3, 2]=-0.683736448396*x[0]+(-0.447791242531)*x[1]
+        ref[0, 3, 2, 0]=-0.683736448396
+        ref[0, 3, 2, 1]=-0.447791242531
+        arg[0, 3, 3]=-0.383036839627*x[0]+(0.803838076609)*x[1]
+        ref[0, 3, 3, 0]=-0.383036839627
+        ref[0, 3, 3, 1]=0.803838076609
+        arg[1, 0, 0]=0.201102106784*x[0]+(0.583668040451)*x[1]
+        ref[1, 0, 0, 0]=0.201102106784
+        ref[1, 0, 0, 1]=0.583668040451
+        arg[1, 0, 1]=-0.311279747211*x[0]+(-0.938340818998)*x[1]
+        ref[1, 0, 1, 0]=-0.311279747211
+        ref[1, 0, 1, 1]=-0.938340818998
+        arg[1, 0, 2]=-0.789943677164*x[0]+(0.0792761015181)*x[1]
+        ref[1, 0, 2, 0]=-0.789943677164
+        ref[1, 0, 2, 1]=0.0792761015181
+        arg[1, 0, 3]=-0.320262724063*x[0]+(-0.158866903673)*x[1]
+        ref[1, 0, 3, 0]=-0.320262724063
+        ref[1, 0, 3, 1]=-0.158866903673
+        arg[1, 1, 0]=-0.0783335537919*x[0]+(0.357108458)*x[1]
+        ref[1, 1, 0, 0]=-0.0783335537919
+        ref[1, 1, 0, 1]=0.357108458
+        arg[1, 1, 1]=0.423130858241*x[0]+(0.520669173899)*x[1]
+        ref[1, 1, 1, 0]=0.423130858241
+        ref[1, 1, 1, 1]=0.520669173899
+        arg[1, 1, 2]=-0.358050459622*x[0]+(-0.0695843561037)*x[1]
+        ref[1, 1, 2, 0]=-0.358050459622
+        ref[1, 1, 2, 1]=-0.0695843561037
+        arg[1, 1, 3]=0.170855030149*x[0]+(-0.957469229031)*x[1]
+        ref[1, 1, 3, 0]=0.170855030149
+        ref[1, 1, 3, 1]=-0.957469229031
+        arg[1, 2, 0]=-0.513224465477*x[0]+(0.355987481169)*x[1]
+        ref[1, 2, 0, 0]=-0.513224465477
+        ref[1, 2, 0, 1]=0.355987481169
+        arg[1, 2, 1]=0.422056944868*x[0]+(0.364913399709)*x[1]
+        ref[1, 2, 1, 0]=0.422056944868
+        ref[1, 2, 1, 1]=0.364913399709
+        arg[1, 2, 2]=-0.266676114811*x[0]+(-0.0862847476421)*x[1]
+        ref[1, 2, 2, 0]=-0.266676114811
+        ref[1, 2, 2, 1]=-0.0862847476421
+        arg[1, 2, 3]=-0.213125833426*x[0]+(-0.512636401526)*x[1]
+        ref[1, 2, 3, 0]=-0.213125833426
+        ref[1, 2, 3, 1]=-0.512636401526
+        arg[1, 3, 0]=-0.301232063866*x[0]+(0.0127914776905)*x[1]
+        ref[1, 3, 0, 0]=-0.301232063866
+        ref[1, 3, 0, 1]=0.0127914776905
+        arg[1, 3, 1]=-0.327201756395*x[0]+(0.611994157692)*x[1]
+        ref[1, 3, 1, 0]=-0.327201756395
+        ref[1, 3, 1, 1]=0.611994157692
+        arg[1, 3, 2]=-0.354878005799*x[0]+(0.739248041075)*x[1]
+        ref[1, 3, 2, 0]=-0.354878005799
+        ref[1, 3, 2, 1]=0.739248041075
+        arg[1, 3, 3]=0.0638747703559*x[0]+(-0.459896775525)*x[1]
+        ref[1, 3, 3, 0]=0.0638747703559
+        ref[1, 3, 3, 1]=-0.459896775525
+        arg[2, 0, 0]=-0.0541637096707*x[0]+(0.553790290541)*x[1]
+        ref[2, 0, 0, 0]=-0.0541637096707
+        ref[2, 0, 0, 1]=0.553790290541
+        arg[2, 0, 1]=-0.112686537474*x[0]+(-0.797251912516)*x[1]
+        ref[2, 0, 1, 0]=-0.112686537474
+        ref[2, 0, 1, 1]=-0.797251912516
+        arg[2, 0, 2]=0.361556987009*x[0]+(-0.087318937709)*x[1]
+        ref[2, 0, 2, 0]=0.361556987009
+        ref[2, 0, 2, 1]=-0.087318937709
+        arg[2, 0, 3]=-0.563788060557*x[0]+(-0.547181742765)*x[1]
+        ref[2, 0, 3, 0]=-0.563788060557
+        ref[2, 0, 3, 1]=-0.547181742765
+        arg[2, 1, 0]=0.843132200023*x[0]+(0.211664462446)*x[1]
+        ref[2, 1, 0, 0]=0.843132200023
+        ref[2, 1, 0, 1]=0.211664462446
+        arg[2, 1, 1]=0.144139335985*x[0]+(-0.188418165539)*x[1]
+        ref[2, 1, 1, 0]=0.144139335985
+        ref[2, 1, 1, 1]=-0.188418165539
+        arg[2, 1, 2]=-0.55125432682*x[0]+(-0.723148817814)*x[1]
+        ref[2, 1, 2, 0]=-0.55125432682
+        ref[2, 1, 2, 1]=-0.723148817814
+        arg[2, 1, 3]=-0.664823534717*x[0]+(-0.602641680822)*x[1]
+        ref[2, 1, 3, 0]=-0.664823534717
+        ref[2, 1, 3, 1]=-0.602641680822
+        arg[2, 2, 0]=-0.808683472353*x[0]+(0.630526609126)*x[1]
+        ref[2, 2, 0, 0]=-0.808683472353
+        ref[2, 2, 0, 1]=0.630526609126
+        arg[2, 2, 1]=-0.555691082219*x[0]+(-0.873848545871)*x[1]
+        ref[2, 2, 1, 0]=-0.555691082219
+        ref[2, 2, 1, 1]=-0.873848545871
+        arg[2, 2, 2]=0.5806328757*x[0]+(-0.383518380087)*x[1]
+        ref[2, 2, 2, 0]=0.5806328757
+        ref[2, 2, 2, 1]=-0.383518380087
+        arg[2, 2, 3]=0.599209716714*x[0]+(0.129043558001)*x[1]
+        ref[2, 2, 3, 0]=0.599209716714
+        ref[2, 2, 3, 1]=0.129043558001
+        arg[2, 3, 0]=0.646264830587*x[0]+(0.474719238136)*x[1]
+        ref[2, 3, 0, 0]=0.646264830587
+        ref[2, 3, 0, 1]=0.474719238136
+        arg[2, 3, 1]=0.819916491736*x[0]+(0.784226978413)*x[1]
+        ref[2, 3, 1, 0]=0.819916491736
+        ref[2, 3, 1, 1]=0.784226978413
+        arg[2, 3, 2]=-0.546437358806*x[0]+(-0.99104551023)*x[1]
+        ref[2, 3, 2, 0]=-0.546437358806
+        ref[2, 3, 2, 1]=-0.99104551023
+        arg[2, 3, 3]=-0.162089166098*x[0]+(0.445334924536)*x[1]
+        ref[2, 3, 3, 0]=-0.162089166098
+        ref[2, 3, 3, 1]=0.445334924536
+        if dim==3:
+            arg[0, 0, 0]+=-0.369259522861*x[2]
+            ref[0, 0, 0, 2]=-0.369259522861
+            arg[0, 0, 1]+=0.603078388981*x[2]
+            ref[0, 0, 1, 2]=0.603078388981
+            arg[0, 0, 2]+=-0.756548791268*x[2]
+            ref[0, 0, 2, 2]=-0.756548791268
+            arg[0, 0, 3]+=-0.892864486279*x[2]
+            ref[0, 0, 3, 2]=-0.892864486279
+            arg[0, 1, 0]+=0.716282446565*x[2]
+            ref[0, 1, 0, 2]=0.716282446565
+            arg[0, 1, 1]+=-0.604149097208*x[2]
+            ref[0, 1, 1, 2]=-0.604149097208
+            arg[0, 1, 2]+=0.426585487378*x[2]
+            ref[0, 1, 2, 2]=0.426585487378
+            arg[0, 1, 3]+=0.916803193531*x[2]
+            ref[0, 1, 3, 2]=0.916803193531
+            arg[0, 2, 0]+=0.582739329789*x[2]
+            ref[0, 2, 0, 2]=0.582739329789
+            arg[0, 2, 1]+=0.102325603447*x[2]
+            ref[0, 2, 1, 2]=0.102325603447
+            arg[0, 2, 2]+=-0.497430756215*x[2]
+            ref[0, 2, 2, 2]=-0.497430756215
+            arg[0, 2, 3]+=-0.34294752334*x[2]
+            ref[0, 2, 3, 2]=-0.34294752334
+            arg[0, 3, 0]+=0.679049493455*x[2]
+            ref[0, 3, 0, 2]=0.679049493455
+            arg[0, 3, 1]+=-0.102068456364*x[2]
+            ref[0, 3, 1, 2]=-0.102068456364
+            arg[0, 3, 2]+=0.987942467335*x[2]
+            ref[0, 3, 2, 2]=0.987942467335
+            arg[0, 3, 3]+=-0.441333493273*x[2]
+            ref[0, 3, 3, 2]=-0.441333493273
+            arg[1, 0, 0]+=-0.195853225037*x[2]
+            ref[1, 0, 0, 2]=-0.195853225037
+            arg[1, 0, 1]+=-0.245264022466*x[2]
+            ref[1, 0, 1, 2]=-0.245264022466
+            arg[1, 0, 2]+=-0.710934568472*x[2]
+            ref[1, 0, 2, 2]=-0.710934568472
+            arg[1, 0, 3]+=0.221027562645*x[2]
+            ref[1, 0, 3, 2]=0.221027562645
+            arg[1, 1, 0]+=0.632223428033*x[2]
+            ref[1, 1, 0, 2]=0.632223428033
+            arg[1, 1, 1]+=0.883262204803*x[2]
+            ref[1, 1, 1, 2]=0.883262204803
+            arg[1, 1, 2]+=-0.0904577744293*x[2]
+            ref[1, 1, 2, 2]=-0.0904577744293
+            arg[1, 1, 3]+=0.201985614855*x[2]
+            ref[1, 1, 3, 2]=0.201985614855
+            arg[1, 2, 0]+=-0.112086301984*x[2]
+            ref[1, 2, 0, 2]=-0.112086301984
+            arg[1, 2, 1]+=0.133177209857*x[2]
+            ref[1, 2, 1, 2]=0.133177209857
+            arg[1, 2, 2]+=0.122990135283*x[2]
+            ref[1, 2, 2, 2]=0.122990135283
+            arg[1, 2, 3]+=-0.319519847869*x[2]
+            ref[1, 2, 3, 2]=-0.319519847869
+            arg[1, 3, 0]+=0.393361898724*x[2]
+            ref[1, 3, 0, 2]=0.393361898724
+            arg[1, 3, 1]+=0.922760267886*x[2]
+            ref[1, 3, 1, 2]=0.922760267886
+            arg[1, 3, 2]+=-0.417956597945*x[2]
+            ref[1, 3, 2, 2]=-0.417956597945
+            arg[1, 3, 3]+=-0.622310154621*x[2]
+            ref[1, 3, 3, 2]=-0.622310154621
+            arg[2, 0, 0]+=-0.11134150221*x[2]
+            ref[2, 0, 0, 2]=-0.11134150221
+            arg[2, 0, 1]+=0.395987153772*x[2]
+            ref[2, 0, 1, 2]=0.395987153772
+            arg[2, 0, 2]+=0.489477280827*x[2]
+            ref[2, 0, 2, 2]=0.489477280827
+            arg[2, 0, 3]+=0.581058771272*x[2]
+            ref[2, 0, 3, 2]=0.581058771272
+            arg[2, 1, 0]+=-0.948070607724*x[2]
+            ref[2, 1, 0, 2]=-0.948070607724
+            arg[2, 1, 1]+=0.49246936707*x[2]
+            ref[2, 1, 1, 2]=0.49246936707
+            arg[2, 1, 2]+=0.166917961694*x[2]
+            ref[2, 1, 2, 2]=0.166917961694
+            arg[2, 1, 3]+=-0.364721956565*x[2]
+            ref[2, 1, 3, 2]=-0.364721956565
+            arg[2, 2, 0]+=0.114731488592*x[2]
+            ref[2, 2, 0, 2]=0.114731488592
+            arg[2, 2, 1]+=0.883662720366*x[2]
+            ref[2, 2, 1, 2]=0.883662720366
+            arg[2, 2, 2]+=0.264831985839*x[2]
+            ref[2, 2, 2, 2]=0.264831985839
+            arg[2, 2, 3]+=-0.969514559943*x[2]
+            ref[2, 2, 3, 2]=-0.969514559943
+            arg[2, 3, 0]+=0.878691270626*x[2]
+            ref[2, 3, 0, 2]=0.878691270626
+            arg[2, 3, 1]+=-0.641161163837*x[2]
+            ref[2, 3, 1, 2]=-0.641161163837
+            arg[2, 3, 2]+=-0.0962679159631*x[2]
+            ref[2, 3, 2, 2]=-0.0962679159631
+            arg[2, 3, 3]+=-0.134429531287*x[2]
+            ref[2, 3, 3, 2]=-0.134429531287
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.39710061225*x[0]+(0.743062673115)*x[1]
+        ref[0]=0.39710061225
+        ref[1]=0.743062673115
+        if dim==3:
+            arg+=(0.788299310708)*x[2]
+            ref[2]=0.788299310708
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=-0.804717093503*x[0]+(0.589710182847)*x[1]
+        ref[0, 0]=-0.804717093503
+        ref[0, 1]=0.589710182847
+        arg[1,]=-0.867279269485*x[0]+(0.870964663368)*x[1]
+        ref[1, 0]=-0.867279269485
+        ref[1, 1]=0.870964663368
+        arg[2,]=0.465235074891*x[0]+(-0.673371884283)*x[1]
+        ref[2, 0]=0.465235074891
+        ref[2, 1]=-0.673371884283
+        arg[3,]=0.513232645165*x[0]+(0.36456045292)*x[1]
+        ref[3, 0]=0.513232645165
+        ref[3, 1]=0.36456045292
+        if dim==3:
+            arg[0,]+=-0.511222788658*x[2]
+            ref[0, 2]=-0.511222788658
+            arg[1,]+=0.180350472234*x[2]
+            ref[1, 2]=0.180350472234
+            arg[2,]+=-0.194104422166*x[2]
+            ref[2, 2]=-0.194104422166
+            arg[3,]+=-0.539719331402*x[2]
+            ref[3, 2]=-0.539719331402
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=0.000565612178797*x[0]+(0.0530918532702)*x[1]
+        ref[0, 0, 0]=0.000565612178797
+        ref[0, 0, 1]=0.0530918532702
+        arg[0, 1]=-0.542649232756*x[0]+(-0.49281404613)*x[1]
+        ref[0, 1, 0]=-0.542649232756
+        ref[0, 1, 1]=-0.49281404613
+        arg[0, 2]=-0.943146557559*x[0]+(0.891397164634)*x[1]
+        ref[0, 2, 0]=-0.943146557559
+        ref[0, 2, 1]=0.891397164634
+        arg[0, 3]=-0.353264802772*x[0]+(0.978090605133)*x[1]
+        ref[0, 3, 0]=-0.353264802772
+        ref[0, 3, 1]=0.978090605133
+        arg[1, 0]=0.266334539925*x[0]+(-0.201926560641)*x[1]
+        ref[1, 0, 0]=0.266334539925
+        ref[1, 0, 1]=-0.201926560641
+        arg[1, 1]=-0.629370666897*x[0]+(0.971381303153)*x[1]
+        ref[1, 1, 0]=-0.629370666897
+        ref[1, 1, 1]=0.971381303153
+        arg[1, 2]=-0.871833549935*x[0]+(-0.579280358296)*x[1]
+        ref[1, 2, 0]=-0.871833549935
+        ref[1, 2, 1]=-0.579280358296
+        arg[1, 3]=0.612482869718*x[0]+(-0.192416213744)*x[1]
+        ref[1, 3, 0]=0.612482869718
+        ref[1, 3, 1]=-0.192416213744
+        arg[2, 0]=-0.751948892697*x[0]+(-0.344769204341)*x[1]
+        ref[2, 0, 0]=-0.751948892697
+        ref[2, 0, 1]=-0.344769204341
+        arg[2, 1]=0.787265642852*x[0]+(-0.807584574151)*x[1]
+        ref[2, 1, 0]=0.787265642852
+        ref[2, 1, 1]=-0.807584574151
+        arg[2, 2]=0.194920521043*x[0]+(0.456402061818)*x[1]
+        ref[2, 2, 0]=0.194920521043
+        ref[2, 2, 1]=0.456402061818
+        arg[2, 3]=-0.132151221218*x[0]+(0.432082738134)*x[1]
+        ref[2, 3, 0]=-0.132151221218
+        ref[2, 3, 1]=0.432082738134
+        arg[3, 0]=-0.515279891704*x[0]+(0.304250537586)*x[1]
+        ref[3, 0, 0]=-0.515279891704
+        ref[3, 0, 1]=0.304250537586
+        arg[3, 1]=-0.200477241819*x[0]+(-0.205854697776)*x[1]
+        ref[3, 1, 0]=-0.200477241819
+        ref[3, 1, 1]=-0.205854697776
+        arg[3, 2]=-0.454994088797*x[0]+(0.712689398229)*x[1]
+        ref[3, 2, 0]=-0.454994088797
+        ref[3, 2, 1]=0.712689398229
+        arg[3, 3]=0.0621925456673*x[0]+(0.156519779973)*x[1]
+        ref[3, 3, 0]=0.0621925456673
+        ref[3, 3, 1]=0.156519779973
+        if dim==3:
+            arg[0, 0]+=0.81671071543*x[2]
+            ref[0, 0, 2]=0.81671071543
+            arg[0, 1]+=0.610069715708*x[2]
+            ref[0, 1, 2]=0.610069715708
+            arg[0, 2]+=-0.171349203959*x[2]
+            ref[0, 2, 2]=-0.171349203959
+            arg[0, 3]+=-0.389957554417*x[2]
+            ref[0, 3, 2]=-0.389957554417
+            arg[1, 0]+=0.841363838655*x[2]
+            ref[1, 0, 2]=0.841363838655
+            arg[1, 1]+=-0.125942861476*x[2]
+            ref[1, 1, 2]=-0.125942861476
+            arg[1, 2]+=0.771980956846*x[2]
+            ref[1, 2, 2]=0.771980956846
+            arg[1, 3]+=-0.0988689497763*x[2]
+            ref[1, 3, 2]=-0.0988689497763
+            arg[2, 0]+=-0.824174435376*x[2]
+            ref[2, 0, 2]=-0.824174435376
+            arg[2, 1]+=0.724867599618*x[2]
+            ref[2, 1, 2]=0.724867599618
+            arg[2, 2]+=0.389729564602*x[2]
+            ref[2, 2, 2]=0.389729564602
+            arg[2, 3]+=0.190133520975*x[2]
+            ref[2, 3, 2]=0.190133520975
+            arg[3, 0]+=0.907855727556*x[2]
+            ref[3, 0, 2]=0.907855727556
+            arg[3, 1]+=-0.115918079257*x[2]
+            ref[3, 1, 2]=-0.115918079257
+            arg[3, 2]+=-0.617187947016*x[2]
+            ref[3, 2, 2]=-0.617187947016
+            arg[3, 3]+=0.111462162934*x[2]
+            ref[3, 3, 2]=0.111462162934
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2),w)
+        ref = Data(0,(4, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=0.756380744095*x[0]+(-0.193631360561)*x[1]
+        ref[0, 0, 0, 0]=0.756380744095
+        ref[0, 0, 0, 1]=-0.193631360561
+        arg[0, 0, 1]=0.933161099282*x[0]+(-0.00324281523084)*x[1]
+        ref[0, 0, 1, 0]=0.933161099282
+        ref[0, 0, 1, 1]=-0.00324281523084
+        arg[0, 1, 0]=0.118976911092*x[0]+(0.0297995483052)*x[1]
+        ref[0, 1, 0, 0]=0.118976911092
+        ref[0, 1, 0, 1]=0.0297995483052
+        arg[0, 1, 1]=-0.319222564794*x[0]+(-0.318320409092)*x[1]
+        ref[0, 1, 1, 0]=-0.319222564794
+        ref[0, 1, 1, 1]=-0.318320409092
+        arg[0, 2, 0]=-0.812319312365*x[0]+(-0.807915892811)*x[1]
+        ref[0, 2, 0, 0]=-0.812319312365
+        ref[0, 2, 0, 1]=-0.807915892811
+        arg[0, 2, 1]=-0.457757798076*x[0]+(0.87756743222)*x[1]
+        ref[0, 2, 1, 0]=-0.457757798076
+        ref[0, 2, 1, 1]=0.87756743222
+        arg[0, 3, 0]=-0.738090024647*x[0]+(0.609412540748)*x[1]
+        ref[0, 3, 0, 0]=-0.738090024647
+        ref[0, 3, 0, 1]=0.609412540748
+        arg[0, 3, 1]=-0.911278061746*x[0]+(0.172891881635)*x[1]
+        ref[0, 3, 1, 0]=-0.911278061746
+        ref[0, 3, 1, 1]=0.172891881635
+        arg[1, 0, 0]=-0.908458485222*x[0]+(0.0974756115077)*x[1]
+        ref[1, 0, 0, 0]=-0.908458485222
+        ref[1, 0, 0, 1]=0.0974756115077
+        arg[1, 0, 1]=0.366489945833*x[0]+(-0.626232652078)*x[1]
+        ref[1, 0, 1, 0]=0.366489945833
+        ref[1, 0, 1, 1]=-0.626232652078
+        arg[1, 1, 0]=-0.205270439231*x[0]+(-0.120280236187)*x[1]
+        ref[1, 1, 0, 0]=-0.205270439231
+        ref[1, 1, 0, 1]=-0.120280236187
+        arg[1, 1, 1]=-0.85173139672*x[0]+(-0.688853177824)*x[1]
+        ref[1, 1, 1, 0]=-0.85173139672
+        ref[1, 1, 1, 1]=-0.688853177824
+        arg[1, 2, 0]=0.982412562369*x[0]+(-0.153036762478)*x[1]
+        ref[1, 2, 0, 0]=0.982412562369
+        ref[1, 2, 0, 1]=-0.153036762478
+        arg[1, 2, 1]=-0.695113017954*x[0]+(-0.0038096927793)*x[1]
+        ref[1, 2, 1, 0]=-0.695113017954
+        ref[1, 2, 1, 1]=-0.0038096927793
+        arg[1, 3, 0]=0.18353125369*x[0]+(0.738532941523)*x[1]
+        ref[1, 3, 0, 0]=0.18353125369
+        ref[1, 3, 0, 1]=0.738532941523
+        arg[1, 3, 1]=-0.266291190053*x[0]+(0.88343966004)*x[1]
+        ref[1, 3, 1, 0]=-0.266291190053
+        ref[1, 3, 1, 1]=0.88343966004
+        arg[2, 0, 0]=-0.545843557736*x[0]+(0.557959730294)*x[1]
+        ref[2, 0, 0, 0]=-0.545843557736
+        ref[2, 0, 0, 1]=0.557959730294
+        arg[2, 0, 1]=0.0595454566454*x[0]+(-0.633395052091)*x[1]
+        ref[2, 0, 1, 0]=0.0595454566454
+        ref[2, 0, 1, 1]=-0.633395052091
+        arg[2, 1, 0]=-0.206091715477*x[0]+(-0.212488258098)*x[1]
+        ref[2, 1, 0, 0]=-0.206091715477
+        ref[2, 1, 0, 1]=-0.212488258098
+        arg[2, 1, 1]=-0.439122981192*x[0]+(-0.757880851237)*x[1]
+        ref[2, 1, 1, 0]=-0.439122981192
+        ref[2, 1, 1, 1]=-0.757880851237
+        arg[2, 2, 0]=-0.58971590124*x[0]+(-0.424252048958)*x[1]
+        ref[2, 2, 0, 0]=-0.58971590124
+        ref[2, 2, 0, 1]=-0.424252048958
+        arg[2, 2, 1]=-0.739388713511*x[0]+(-0.52034829574)*x[1]
+        ref[2, 2, 1, 0]=-0.739388713511
+        ref[2, 2, 1, 1]=-0.52034829574
+        arg[2, 3, 0]=-0.931739422342*x[0]+(0.525456170598)*x[1]
+        ref[2, 3, 0, 0]=-0.931739422342
+        ref[2, 3, 0, 1]=0.525456170598
+        arg[2, 3, 1]=0.702347423198*x[0]+(0.298131957138)*x[1]
+        ref[2, 3, 1, 0]=0.702347423198
+        ref[2, 3, 1, 1]=0.298131957138
+        arg[3, 0, 0]=-0.552815043739*x[0]+(-0.422643547912)*x[1]
+        ref[3, 0, 0, 0]=-0.552815043739
+        ref[3, 0, 0, 1]=-0.422643547912
+        arg[3, 0, 1]=-0.213162521606*x[0]+(-0.160393654351)*x[1]
+        ref[3, 0, 1, 0]=-0.213162521606
+        ref[3, 0, 1, 1]=-0.160393654351
+        arg[3, 1, 0]=-0.409656890997*x[0]+(-0.709245562782)*x[1]
+        ref[3, 1, 0, 0]=-0.409656890997
+        ref[3, 1, 0, 1]=-0.709245562782
+        arg[3, 1, 1]=-0.425694184679*x[0]+(0.962857427994)*x[1]
+        ref[3, 1, 1, 0]=-0.425694184679
+        ref[3, 1, 1, 1]=0.962857427994
+        arg[3, 2, 0]=-0.668734012609*x[0]+(0.466097040286)*x[1]
+        ref[3, 2, 0, 0]=-0.668734012609
+        ref[3, 2, 0, 1]=0.466097040286
+        arg[3, 2, 1]=-0.992713076436*x[0]+(0.443296970475)*x[1]
+        ref[3, 2, 1, 0]=-0.992713076436
+        ref[3, 2, 1, 1]=0.443296970475
+        arg[3, 3, 0]=0.214165268358*x[0]+(-0.281882379427)*x[1]
+        ref[3, 3, 0, 0]=0.214165268358
+        ref[3, 3, 0, 1]=-0.281882379427
+        arg[3, 3, 1]=-0.723288455783*x[0]+(0.487305324804)*x[1]
+        ref[3, 3, 1, 0]=-0.723288455783
+        ref[3, 3, 1, 1]=0.487305324804
+        if dim==3:
+            arg[0, 0, 0]+=-0.664761574456*x[2]
+            ref[0, 0, 0, 2]=-0.664761574456
+            arg[0, 0, 1]+=-0.781837611435*x[2]
+            ref[0, 0, 1, 2]=-0.781837611435
+            arg[0, 1, 0]+=0.610306976899*x[2]
+            ref[0, 1, 0, 2]=0.610306976899
+            arg[0, 1, 1]+=-0.279264903882*x[2]
+            ref[0, 1, 1, 2]=-0.279264903882
+            arg[0, 2, 0]+=0.400026661132*x[2]
+            ref[0, 2, 0, 2]=0.400026661132
+            arg[0, 2, 1]+=-0.059334500964*x[2]
+            ref[0, 2, 1, 2]=-0.059334500964
+            arg[0, 3, 0]+=0.729774253025*x[2]
+            ref[0, 3, 0, 2]=0.729774253025
+            arg[0, 3, 1]+=0.682132875935*x[2]
+            ref[0, 3, 1, 2]=0.682132875935
+            arg[1, 0, 0]+=0.927307898534*x[2]
+            ref[1, 0, 0, 2]=0.927307898534
+            arg[1, 0, 1]+=-0.688936056593*x[2]
+            ref[1, 0, 1, 2]=-0.688936056593
+            arg[1, 1, 0]+=0.622223829383*x[2]
+            ref[1, 1, 0, 2]=0.622223829383
+            arg[1, 1, 1]+=-0.480689581507*x[2]
+            ref[1, 1, 1, 2]=-0.480689581507
+            arg[1, 2, 0]+=-0.302887927553*x[2]
+            ref[1, 2, 0, 2]=-0.302887927553
+            arg[1, 2, 1]+=0.661511216006*x[2]
+            ref[1, 2, 1, 2]=0.661511216006
+            arg[1, 3, 0]+=-0.43823495396*x[2]
+            ref[1, 3, 0, 2]=-0.43823495396
+            arg[1, 3, 1]+=-0.554281264563*x[2]
+            ref[1, 3, 1, 2]=-0.554281264563
+            arg[2, 0, 0]+=0.609173162479*x[2]
+            ref[2, 0, 0, 2]=0.609173162479
+            arg[2, 0, 1]+=-0.824972765873*x[2]
+            ref[2, 0, 1, 2]=-0.824972765873
+            arg[2, 1, 0]+=-0.261453577608*x[2]
+            ref[2, 1, 0, 2]=-0.261453577608
+            arg[2, 1, 1]+=0.399978034844*x[2]
+            ref[2, 1, 1, 2]=0.399978034844
+            arg[2, 2, 0]+=0.468956169674*x[2]
+            ref[2, 2, 0, 2]=0.468956169674
+            arg[2, 2, 1]+=0.91330882499*x[2]
+            ref[2, 2, 1, 2]=0.91330882499
+            arg[2, 3, 0]+=-0.549885049895*x[2]
+            ref[2, 3, 0, 2]=-0.549885049895
+            arg[2, 3, 1]+=0.442582945783*x[2]
+            ref[2, 3, 1, 2]=0.442582945783
+            arg[3, 0, 0]+=0.794612589673*x[2]
+            ref[3, 0, 0, 2]=0.794612589673
+            arg[3, 0, 1]+=0.920683902436*x[2]
+            ref[3, 0, 1, 2]=0.920683902436
+            arg[3, 1, 0]+=-0.386627972574*x[2]
+            ref[3, 1, 0, 2]=-0.386627972574
+            arg[3, 1, 1]+=-0.871605332762*x[2]
+            ref[3, 1, 1, 2]=-0.871605332762
+            arg[3, 2, 0]+=-0.986799043547*x[2]
+            ref[3, 2, 0, 2]=-0.986799043547
+            arg[3, 2, 1]+=-0.689296475444*x[2]
+            ref[3, 2, 1, 2]=-0.689296475444
+            arg[3, 3, 0]+=-0.75165841011*x[2]
+            ref[3, 3, 0, 2]=-0.75165841011
+            arg[3, 3, 1]+=-0.925778480127*x[2]
+            ref[3, 3, 1, 2]=-0.925778480127
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Test_Util_Gradient(Test_Util_Gradient_noBoundary):
+    RES_TOL=1.e-8
+
+    def test_gradC_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.922806844009+0.435941856733j)*x[0]**o+((-0.35846655342-0.594080934074j))*x[0]+((-0.285322068906-0.798924174387j))*x[1]**o+((-0.059454005799+0.98265629945j))*x[1]
+        ref[0]=(-0.922806844009+0.435941856733j)*o*x_ref[0]**(o-1)+((-0.35846655342-0.594080934074j))
+        ref[1]=(-0.285322068906-0.798924174387j)*o*x_ref[1]**(o-1)+((-0.059454005799+0.98265629945j))
+        if dim==3:
+            arg+=((-0.708133822731-0.566925576405j))*x[2]**o+((-0.945315219781-0.988477174824j))*x[2]
+            ref[2]=(-0.708133822731-0.566925576405j)*o*x_ref[2]**(o-1)+((-0.945315219781-0.988477174824j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(-0.0647120628435-0.893186651906j)*x[0]**o+((-0.883738822207-0.913305723944j))*x[0]+((0.0530375167833+0.798326136304j))*x[1]**o+((-0.0970852024091-0.0827613786987j))*x[1]
+        ref[0, 0]=(-0.0647120628435-0.893186651906j)*o*x_ref[0]**(o-1)+((-0.883738822207-0.913305723944j))
+        ref[0, 1]=(0.0530375167833+0.798326136304j)*o*x_ref[1]**(o-1)+((-0.0970852024091-0.0827613786987j))
+        arg[1,]=(-0.07500613091-0.370226425239j)*x[0]**o+((-0.611242078508-0.669266177296j))*x[0]+((-0.075309154696-0.581390118796j))*x[1]**o+((0.0520550596683-0.120968094284j))*x[1]
+        ref[1, 0]=(-0.07500613091-0.370226425239j)*o*x_ref[0]**(o-1)+((-0.611242078508-0.669266177296j))
+        ref[1, 1]=(-0.075309154696-0.581390118796j)*o*x_ref[1]**(o-1)+((0.0520550596683-0.120968094284j))
+        arg[2,]=(0.118668018253+0.427384212631j)*x[0]**o+((-0.341740234573+0.975819830738j))*x[0]+((-0.555850053717+0.243427969271j))*x[1]**o+((0.678884281188+0.0269896045673j))*x[1]
+        ref[2, 0]=(0.118668018253+0.427384212631j)*o*x_ref[0]**(o-1)+((-0.341740234573+0.975819830738j))
+        ref[2, 1]=(-0.555850053717+0.243427969271j)*o*x_ref[1]**(o-1)+((0.678884281188+0.0269896045673j))
+        arg[3,]=(0.0990321884322-0.468576015211j)*x[0]**o+((0.934428377287+0.790778644225j))*x[0]+((-0.941593655282+0.237685064281j))*x[1]**o+((-0.127806199978-0.443931281801j))*x[1]
+        ref[3, 0]=(0.0990321884322-0.468576015211j)*o*x_ref[0]**(o-1)+((0.934428377287+0.790778644225j))
+        ref[3, 1]=(-0.941593655282+0.237685064281j)*o*x_ref[1]**(o-1)+((-0.127806199978-0.443931281801j))
+        if dim==3:
+            arg[0,]+=(-0.801716303798+0.0133974639381j)*x[2]**o+((-0.0276222689186+0.860268820244j))*x[2]
+            ref[0, 2]=(-0.801716303798+0.0133974639381j)*o*x_ref[2]**(o-1)+((-0.0276222689186+0.860268820244j))
+            arg[1,]+=(0.466263923425+0.826611964818j)*x[2]**o+((0.514961176512+0.804421290442j))*x[2]
+            ref[1, 2]=(0.466263923425+0.826611964818j)*o*x_ref[2]**(o-1)+((0.514961176512+0.804421290442j))
+            arg[2,]+=(0.459637164683-0.190282200974j)*x[2]**o+((0.581246367337-0.17589050071j))*x[2]
+            ref[2, 2]=(0.459637164683-0.190282200974j)*o*x_ref[2]**(o-1)+((0.581246367337-0.17589050071j))
+            arg[3,]+=(-0.907032043617-0.106094590736j)*x[2]**o+((-0.366862110747+0.542222434649j))*x[2]
+            ref[3, 2]=(-0.907032043617-0.106094590736j)*o*x_ref[2]**(o-1)+((-0.366862110747+0.542222434649j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=(0.0377325931987-0.533191435935j)*x[0]**o+((0.519409392539+0.458792414901j))*x[0]+((-0.974794742175+0.0535674732094j))*x[1]**o+((0.853178999406-0.4518054755j))*x[1]
+        ref[0, 0, 0]=(0.0377325931987-0.533191435935j)*o*x_ref[0]**(o-1)+((0.519409392539+0.458792414901j))
+        ref[0, 0, 1]=(-0.974794742175+0.0535674732094j)*o*x_ref[1]**(o-1)+((0.853178999406-0.4518054755j))
+        arg[0, 1]=(0.378901596846+0.10870026205j)*x[0]**o+((0.465984454063-0.428646414911j))*x[0]+((-0.646069030617+0.631319980722j))*x[1]**o+((-0.677639920148+0.87141325477j))*x[1]
+        ref[0, 1, 0]=(0.378901596846+0.10870026205j)*o*x_ref[0]**(o-1)+((0.465984454063-0.428646414911j))
+        ref[0, 1, 1]=(-0.646069030617+0.631319980722j)*o*x_ref[1]**(o-1)+((-0.677639920148+0.87141325477j))
+        arg[1, 0]=(-0.588115952939+0.855184441449j)*x[0]**o+((-0.368408585854+0.595410878147j))*x[0]+((0.375225632433+0.92034104212j))*x[1]**o+((-0.926605702139+0.48924523859j))*x[1]
+        ref[1, 0, 0]=(-0.588115952939+0.855184441449j)*o*x_ref[0]**(o-1)+((-0.368408585854+0.595410878147j))
+        ref[1, 0, 1]=(0.375225632433+0.92034104212j)*o*x_ref[1]**(o-1)+((-0.926605702139+0.48924523859j))
+        arg[1, 1]=(0.555759369145-0.74477028372j)*x[0]**o+((-0.740846772007+0.19209221943j))*x[0]+((-0.679861846448-0.281626848801j))*x[1]**o+((-0.593378163673+0.538098348783j))*x[1]
+        ref[1, 1, 0]=(0.555759369145-0.74477028372j)*o*x_ref[0]**(o-1)+((-0.740846772007+0.19209221943j))
+        ref[1, 1, 1]=(-0.679861846448-0.281626848801j)*o*x_ref[1]**(o-1)+((-0.593378163673+0.538098348783j))
+        arg[2, 0]=(0.706843947975+0.0101280158788j)*x[0]**o+((-0.986665886843+0.94413250954j))*x[0]+((-0.401885906-0.365183975806j))*x[1]**o+((-0.379417848112+0.407467981556j))*x[1]
+        ref[2, 0, 0]=(0.706843947975+0.0101280158788j)*o*x_ref[0]**(o-1)+((-0.986665886843+0.94413250954j))
+        ref[2, 0, 1]=(-0.401885906-0.365183975806j)*o*x_ref[1]**(o-1)+((-0.379417848112+0.407467981556j))
+        arg[2, 1]=(-0.759562367306+0.0536729641886j)*x[0]**o+((-0.439938569513-0.166996449878j))*x[0]+((0.718393982568-0.605895294468j))*x[1]**o+((0.595098906293+0.83543915919j))*x[1]
+        ref[2, 1, 0]=(-0.759562367306+0.0536729641886j)*o*x_ref[0]**(o-1)+((-0.439938569513-0.166996449878j))
+        ref[2, 1, 1]=(0.718393982568-0.605895294468j)*o*x_ref[1]**(o-1)+((0.595098906293+0.83543915919j))
+        arg[3, 0]=(-0.766189632684-0.950992999291j)*x[0]**o+((-0.0802734876203-0.370589303799j))*x[0]+((-0.124943042765+0.353529467351j))*x[1]**o+((0.738567198497+0.313617607834j))*x[1]
+        ref[3, 0, 0]=(-0.766189632684-0.950992999291j)*o*x_ref[0]**(o-1)+((-0.0802734876203-0.370589303799j))
+        ref[3, 0, 1]=(-0.124943042765+0.353529467351j)*o*x_ref[1]**(o-1)+((0.738567198497+0.313617607834j))
+        arg[3, 1]=(-0.31321259047-0.615563446659j)*x[0]**o+((-0.891975184584-0.449446180416j))*x[0]+((-0.581565210931-0.155980104216j))*x[1]**o+((-0.760100136101-0.344466428459j))*x[1]
+        ref[3, 1, 0]=(-0.31321259047-0.615563446659j)*o*x_ref[0]**(o-1)+((-0.891975184584-0.449446180416j))
+        ref[3, 1, 1]=(-0.581565210931-0.155980104216j)*o*x_ref[1]**(o-1)+((-0.760100136101-0.344466428459j))
+        if dim==3:
+            arg[0, 0]+=(-0.544497425081+0.770890680224j)*x[2]**o+((0.060562171079-0.443787477389j))*x[2]
+            ref[0, 0, 2]=(-0.544497425081+0.770890680224j)*o*x_ref[2]**(o-1)+((0.060562171079-0.443787477389j))
+            arg[0, 1]+=(0.630332628364-0.818095623006j)*x[2]**o+((-0.993228219696+0.199076205073j))*x[2]
+            ref[0, 1, 2]=(0.630332628364-0.818095623006j)*o*x_ref[2]**(o-1)+((-0.993228219696+0.199076205073j))
+            arg[1, 0]+=(0.451270765907-0.583557646061j)*x[2]**o+((-0.380067652493+0.743558085572j))*x[2]
+            ref[1, 0, 2]=(0.451270765907-0.583557646061j)*o*x_ref[2]**(o-1)+((-0.380067652493+0.743558085572j))
+            arg[1, 1]+=(-0.334316965777-0.228576713717j)*x[2]**o+((-0.309093780747+0.409484708658j))*x[2]
+            ref[1, 1, 2]=(-0.334316965777-0.228576713717j)*o*x_ref[2]**(o-1)+((-0.309093780747+0.409484708658j))
+            arg[2, 0]+=(0.124898202963+0.222856289545j)*x[2]**o+((0.824098757584+0.337591801417j))*x[2]
+            ref[2, 0, 2]=(0.124898202963+0.222856289545j)*o*x_ref[2]**(o-1)+((0.824098757584+0.337591801417j))
+            arg[2, 1]+=(0.653672492775+0.464277456287j)*x[2]**o+((0.0420739073059+0.917884208569j))*x[2]
+            ref[2, 1, 2]=(0.653672492775+0.464277456287j)*o*x_ref[2]**(o-1)+((0.0420739073059+0.917884208569j))
+            arg[3, 0]+=(0.0988267972099-0.80757052561j)*x[2]**o+((0.088135949423-0.39592708915j))*x[2]
+            ref[3, 0, 2]=(0.0988267972099-0.80757052561j)*o*x_ref[2]**(o-1)+((0.088135949423-0.39592708915j))
+            arg[3, 1]+=(0.947142956484+0.909422751822j)*x[2]**o+((-0.479690618394-0.213651268862j))*x[2]
+            ref[3, 1, 2]=(0.947142956484+0.909422751822j)*o*x_ref[2]**(o-1)+((-0.479690618394-0.213651268862j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 2),w)
+        ref = Data(0,(3, 2, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.973809891078+0.555173742097j)*x[0]**o+((-0.828356046582-0.0628862563956j))*x[0]+((0.125594818429+0.925468645317j))*x[1]**o+((0.392169450389-0.558866081155j))*x[1]
+        ref[0, 0, 0, 0]=(-0.973809891078+0.555173742097j)*o*x_ref[0]**(o-1)+((-0.828356046582-0.0628862563956j))
+        ref[0, 0, 0, 1]=(0.125594818429+0.925468645317j)*o*x_ref[1]**(o-1)+((0.392169450389-0.558866081155j))
+        arg[0, 0, 1]=(0.27639605649+0.182057949853j)*x[0]**o+((0.797129739851-0.513215807126j))*x[0]+((0.348329349305-0.358588438313j))*x[1]**o+((0.469193755137-0.413042474031j))*x[1]
+        ref[0, 0, 1, 0]=(0.27639605649+0.182057949853j)*o*x_ref[0]**(o-1)+((0.797129739851-0.513215807126j))
+        ref[0, 0, 1, 1]=(0.348329349305-0.358588438313j)*o*x_ref[1]**(o-1)+((0.469193755137-0.413042474031j))
+        arg[0, 1, 0]=(-0.128717726325+0.307228950241j)*x[0]**o+((-0.412804122551+0.0270750053796j))*x[0]+((-0.898280120262+0.959901192309j))*x[1]**o+((0.584664554792-0.499840303064j))*x[1]
+        ref[0, 1, 0, 0]=(-0.128717726325+0.307228950241j)*o*x_ref[0]**(o-1)+((-0.412804122551+0.0270750053796j))
+        ref[0, 1, 0, 1]=(-0.898280120262+0.959901192309j)*o*x_ref[1]**(o-1)+((0.584664554792-0.499840303064j))
+        arg[0, 1, 1]=(0.216038664506+0.199383145347j)*x[0]**o+((0.804823134415-0.0605114568052j))*x[0]+((-0.250750100984-0.949287957631j))*x[1]**o+((-0.281724233275+0.210640072273j))*x[1]
+        ref[0, 1, 1, 0]=(0.216038664506+0.199383145347j)*o*x_ref[0]**(o-1)+((0.804823134415-0.0605114568052j))
+        ref[0, 1, 1, 1]=(-0.250750100984-0.949287957631j)*o*x_ref[1]**(o-1)+((-0.281724233275+0.210640072273j))
+        arg[1, 0, 0]=(0.0358271001374-0.230669702877j)*x[0]**o+((0.22289525611+0.228083191183j))*x[0]+((-0.485529080798-0.235909305306j))*x[1]**o+((-0.976996077828-0.921107750937j))*x[1]
+        ref[1, 0, 0, 0]=(0.0358271001374-0.230669702877j)*o*x_ref[0]**(o-1)+((0.22289525611+0.228083191183j))
+        ref[1, 0, 0, 1]=(-0.485529080798-0.235909305306j)*o*x_ref[1]**(o-1)+((-0.976996077828-0.921107750937j))
+        arg[1, 0, 1]=(0.980228534329+0.103535832677j)*x[0]**o+((-0.356624537329-0.593327580961j))*x[0]+((-0.289235169343-0.143021240115j))*x[1]**o+((0.114125605359+0.354129491881j))*x[1]
+        ref[1, 0, 1, 0]=(0.980228534329+0.103535832677j)*o*x_ref[0]**(o-1)+((-0.356624537329-0.593327580961j))
+        ref[1, 0, 1, 1]=(-0.289235169343-0.143021240115j)*o*x_ref[1]**(o-1)+((0.114125605359+0.354129491881j))
+        arg[1, 1, 0]=(-0.124104458905+0.702763161131j)*x[0]**o+((0.304307313234-0.105282354406j))*x[0]+((-0.996801084648-0.29101280662j))*x[1]**o+((0.181908436866-0.573019363806j))*x[1]
+        ref[1, 1, 0, 0]=(-0.124104458905+0.702763161131j)*o*x_ref[0]**(o-1)+((0.304307313234-0.105282354406j))
+        ref[1, 1, 0, 1]=(-0.996801084648-0.29101280662j)*o*x_ref[1]**(o-1)+((0.181908436866-0.573019363806j))
+        arg[1, 1, 1]=(0.877547254672+0.352753145453j)*x[0]**o+((0.843167297652-0.159399767809j))*x[0]+((-0.733393313757-0.75649834205j))*x[1]**o+((0.509736945118-0.920892842438j))*x[1]
+        ref[1, 1, 1, 0]=(0.877547254672+0.352753145453j)*o*x_ref[0]**(o-1)+((0.843167297652-0.159399767809j))
+        ref[1, 1, 1, 1]=(-0.733393313757-0.75649834205j)*o*x_ref[1]**(o-1)+((0.509736945118-0.920892842438j))
+        arg[2, 0, 0]=(0.423415147999-0.426057072389j)*x[0]**o+((0.944042836508-0.789101226784j))*x[0]+((0.0547055269791+0.472915026694j))*x[1]**o+((0.00286989180349+0.278698866306j))*x[1]
+        ref[2, 0, 0, 0]=(0.423415147999-0.426057072389j)*o*x_ref[0]**(o-1)+((0.944042836508-0.789101226784j))
+        ref[2, 0, 0, 1]=(0.0547055269791+0.472915026694j)*o*x_ref[1]**(o-1)+((0.00286989180349+0.278698866306j))
+        arg[2, 0, 1]=(0.707288527098+0.0569085160615j)*x[0]**o+((-0.887676159914+0.765861091021j))*x[0]+((-0.615767702962+0.150420688096j))*x[1]**o+((0.227437312074-0.447889386939j))*x[1]
+        ref[2, 0, 1, 0]=(0.707288527098+0.0569085160615j)*o*x_ref[0]**(o-1)+((-0.887676159914+0.765861091021j))
+        ref[2, 0, 1, 1]=(-0.615767702962+0.150420688096j)*o*x_ref[1]**(o-1)+((0.227437312074-0.447889386939j))
+        arg[2, 1, 0]=(-0.195578506822+0.648525556944j)*x[0]**o+((0.563348815168+0.484474196133j))*x[0]+((-0.535320672808+0.267955840311j))*x[1]**o+((-0.647359056151-0.288748556484j))*x[1]
+        ref[2, 1, 0, 0]=(-0.195578506822+0.648525556944j)*o*x_ref[0]**(o-1)+((0.563348815168+0.484474196133j))
+        ref[2, 1, 0, 1]=(-0.535320672808+0.267955840311j)*o*x_ref[1]**(o-1)+((-0.647359056151-0.288748556484j))
+        arg[2, 1, 1]=(0.770547909301-0.873675918554j)*x[0]**o+((0.303832873223-0.274797704697j))*x[0]+((-0.307070318593-0.650287037086j))*x[1]**o+((0.779411597088+0.0904718722945j))*x[1]
+        ref[2, 1, 1, 0]=(0.770547909301-0.873675918554j)*o*x_ref[0]**(o-1)+((0.303832873223-0.274797704697j))
+        ref[2, 1, 1, 1]=(-0.307070318593-0.650287037086j)*o*x_ref[1]**(o-1)+((0.779411597088+0.0904718722945j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.0383456340772-0.257915041615j)*x[2]**o+((0.369437370311+0.219855249149j))*x[2]
+            ref[0, 0, 0, 2]=(0.0383456340772-0.257915041615j)*o*x_ref[2]**(o-1)+((0.369437370311+0.219855249149j))
+            arg[0, 0, 1]+=(0.41064878064-0.71545454766j)*x[2]**o+((0.709313232075+0.85215879214j))*x[2]
+            ref[0, 0, 1, 2]=(0.41064878064-0.71545454766j)*o*x_ref[2]**(o-1)+((0.709313232075+0.85215879214j))
+            arg[0, 1, 0]+=(0.878045134027-0.601620090392j)*x[2]**o+((0.498703510653-0.931894517614j))*x[2]
+            ref[0, 1, 0, 2]=(0.878045134027-0.601620090392j)*o*x_ref[2]**(o-1)+((0.498703510653-0.931894517614j))
+            arg[0, 1, 1]+=(0.256937127824+0.0812824394107j)*x[2]**o+((0.0787553207236-0.91842302655j))*x[2]
+            ref[0, 1, 1, 2]=(0.256937127824+0.0812824394107j)*o*x_ref[2]**(o-1)+((0.0787553207236-0.91842302655j))
+            arg[1, 0, 0]+=(-0.365790409606-0.171484497074j)*x[2]**o+((-0.597111917377+0.378412148742j))*x[2]
+            ref[1, 0, 0, 2]=(-0.365790409606-0.171484497074j)*o*x_ref[2]**(o-1)+((-0.597111917377+0.378412148742j))
+            arg[1, 0, 1]+=(-0.151252072668-0.0700652296251j)*x[2]**o+((-0.246826720895-0.693051813047j))*x[2]
+            ref[1, 0, 1, 2]=(-0.151252072668-0.0700652296251j)*o*x_ref[2]**(o-1)+((-0.246826720895-0.693051813047j))
+            arg[1, 1, 0]+=(0.462157545749+0.630684161721j)*x[2]**o+((-0.261644373748+0.895109564653j))*x[2]
+            ref[1, 1, 0, 2]=(0.462157545749+0.630684161721j)*o*x_ref[2]**(o-1)+((-0.261644373748+0.895109564653j))
+            arg[1, 1, 1]+=(-0.513524827254-0.739050600329j)*x[2]**o+((-0.798708731499-0.983420344466j))*x[2]
+            ref[1, 1, 1, 2]=(-0.513524827254-0.739050600329j)*o*x_ref[2]**(o-1)+((-0.798708731499-0.983420344466j))
+            arg[2, 0, 0]+=(0.7060953069-0.396276374626j)*x[2]**o+((-0.145957486332+0.450693396436j))*x[2]
+            ref[2, 0, 0, 2]=(0.7060953069-0.396276374626j)*o*x_ref[2]**(o-1)+((-0.145957486332+0.450693396436j))
+            arg[2, 0, 1]+=(0.215388878608-0.585959318206j)*x[2]**o+((-0.436522130746-0.738615374952j))*x[2]
+            ref[2, 0, 1, 2]=(0.215388878608-0.585959318206j)*o*x_ref[2]**(o-1)+((-0.436522130746-0.738615374952j))
+            arg[2, 1, 0]+=(0.0442743133629+0.983229179037j)*x[2]**o+((0.230621482946-0.288043001472j))*x[2]
+            ref[2, 1, 0, 2]=(0.0442743133629+0.983229179037j)*o*x_ref[2]**(o-1)+((0.230621482946-0.288043001472j))
+            arg[2, 1, 1]+=(-0.767252705737-0.857444629301j)*x[2]**o+((-0.548533149201+0.657541599614j))*x[2]
+            ref[2, 1, 1, 2]=(-0.767252705737-0.857444629301j)*o*x_ref[2]**(o-1)+((-0.548533149201+0.657541599614j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.590931346148+0.694091789156j)*x[0]**o+((0.922551444926+0.940019722427j))*x[0]+((0.295358871078+0.909557672198j))*x[1]**o+((0.953870526353-0.346617732007j))*x[1]
+        ref[0]=(-0.590931346148+0.694091789156j)*o*x_ref[0]**(o-1)+((0.922551444926+0.940019722427j))
+        ref[1]=(0.295358871078+0.909557672198j)*o*x_ref[1]**(o-1)+((0.953870526353-0.346617732007j))
+        if dim==3:
+            arg+=((-0.565642336941-0.192709218661j))*x[2]**o+((0.852713563755+0.00873774880446j))*x[2]
+            ref[2]=(-0.565642336941-0.192709218661j)*o*x_ref[2]**(o-1)+((0.852713563755+0.00873774880446j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(-0.646298389643+0.407102816399j)*x[0]**o+((-0.378100814793-0.81169671534j))*x[0]+((-0.961954418425+0.62785783252j))*x[1]**o+((0.265731794962+0.235538263711j))*x[1]
+        ref[0, 0]=(-0.646298389643+0.407102816399j)*o*x_ref[0]**(o-1)+((-0.378100814793-0.81169671534j))
+        ref[0, 1]=(-0.961954418425+0.62785783252j)*o*x_ref[1]**(o-1)+((0.265731794962+0.235538263711j))
+        arg[1,]=(0.0327349529061-0.644310687518j)*x[0]**o+((-0.859441406597-0.97343451792j))*x[0]+((0.395743978365-0.722886847108j))*x[1]**o+((0.159034671832-0.527755252629j))*x[1]
+        ref[1, 0]=(0.0327349529061-0.644310687518j)*o*x_ref[0]**(o-1)+((-0.859441406597-0.97343451792j))
+        ref[1, 1]=(0.395743978365-0.722886847108j)*o*x_ref[1]**(o-1)+((0.159034671832-0.527755252629j))
+        if dim==3:
+            arg[0,]+=(-0.00385026404304-0.736859069018j)*x[2]**o+((-0.139051967205-0.863543550475j))*x[2]
+            ref[0, 2]=(-0.00385026404304-0.736859069018j)*o*x_ref[2]**(o-1)+((-0.139051967205-0.863543550475j))
+            arg[1,]+=(0.897168452908-0.538028382978j)*x[2]**o+((0.874850294987-0.325247637207j))*x[2]
+            ref[1, 2]=(0.897168452908-0.538028382978j)*o*x_ref[2]**(o-1)+((0.874850294987-0.325247637207j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3)+(dim,),w_ref)
+        arg[0, 0]=(-0.652498974703-0.57155734412j)*x[0]**o+((-0.06830685412-0.609496873841j))*x[0]+((-0.864807403266-0.514235856698j))*x[1]**o+((0.588659062035+0.0754414027649j))*x[1]
+        ref[0, 0, 0]=(-0.652498974703-0.57155734412j)*o*x_ref[0]**(o-1)+((-0.06830685412-0.609496873841j))
+        ref[0, 0, 1]=(-0.864807403266-0.514235856698j)*o*x_ref[1]**(o-1)+((0.588659062035+0.0754414027649j))
+        arg[0, 1]=(-0.17347095133-0.171961686705j)*x[0]**o+((-0.837807985221-0.993010709548j))*x[0]+((-0.147008766373+0.819372090189j))*x[1]**o+((-0.495300030064+0.237331490969j))*x[1]
+        ref[0, 1, 0]=(-0.17347095133-0.171961686705j)*o*x_ref[0]**(o-1)+((-0.837807985221-0.993010709548j))
+        ref[0, 1, 1]=(-0.147008766373+0.819372090189j)*o*x_ref[1]**(o-1)+((-0.495300030064+0.237331490969j))
+        arg[0, 2]=(0.165333950654-0.0082193570422j)*x[0]**o+((-0.309902992798-0.165230198015j))*x[0]+((-0.34335680136-0.77127088815j))*x[1]**o+((0.23808555508-0.511059474582j))*x[1]
+        ref[0, 2, 0]=(0.165333950654-0.0082193570422j)*o*x_ref[0]**(o-1)+((-0.309902992798-0.165230198015j))
+        ref[0, 2, 1]=(-0.34335680136-0.77127088815j)*o*x_ref[1]**(o-1)+((0.23808555508-0.511059474582j))
+        arg[1, 0]=(0.912005737227+0.965779138076j)*x[0]**o+((-0.636823732031+0.575068502657j))*x[0]+((0.896274543248-0.289797235513j))*x[1]**o+((-0.121556255746+0.988435164766j))*x[1]
+        ref[1, 0, 0]=(0.912005737227+0.965779138076j)*o*x_ref[0]**(o-1)+((-0.636823732031+0.575068502657j))
+        ref[1, 0, 1]=(0.896274543248-0.289797235513j)*o*x_ref[1]**(o-1)+((-0.121556255746+0.988435164766j))
+        arg[1, 1]=(0.567671777851+0.308656777432j)*x[0]**o+((-0.963353140711-0.613068927029j))*x[0]+((-0.173556908757-0.0494550767172j))*x[1]**o+((0.0493992336612+0.0740932042799j))*x[1]
+        ref[1, 1, 0]=(0.567671777851+0.308656777432j)*o*x_ref[0]**(o-1)+((-0.963353140711-0.613068927029j))
+        ref[1, 1, 1]=(-0.173556908757-0.0494550767172j)*o*x_ref[1]**(o-1)+((0.0493992336612+0.0740932042799j))
+        arg[1, 2]=(0.748987250678-0.636669116493j)*x[0]**o+((0.401589857064-0.120957943163j))*x[0]+((0.102596382373-0.696914579082j))*x[1]**o+((0.934956874255-0.599617696659j))*x[1]
+        ref[1, 2, 0]=(0.748987250678-0.636669116493j)*o*x_ref[0]**(o-1)+((0.401589857064-0.120957943163j))
+        ref[1, 2, 1]=(0.102596382373-0.696914579082j)*o*x_ref[1]**(o-1)+((0.934956874255-0.599617696659j))
+        arg[2, 0]=(-0.707382452152+0.272428851221j)*x[0]**o+((0.157023805949-0.894655159219j))*x[0]+((-0.940676738715+0.444802489653j))*x[1]**o+((-0.701956007323+0.808099869429j))*x[1]
+        ref[2, 0, 0]=(-0.707382452152+0.272428851221j)*o*x_ref[0]**(o-1)+((0.157023805949-0.894655159219j))
+        ref[2, 0, 1]=(-0.940676738715+0.444802489653j)*o*x_ref[1]**(o-1)+((-0.701956007323+0.808099869429j))
+        arg[2, 1]=(-0.381693723957-0.0490291489321j)*x[0]**o+((0.172398182222+0.48014028938j))*x[0]+((0.656500012961+0.622817770851j))*x[1]**o+((-0.9422338137-0.0500599712609j))*x[1]
+        ref[2, 1, 0]=(-0.381693723957-0.0490291489321j)*o*x_ref[0]**(o-1)+((0.172398182222+0.48014028938j))
+        ref[2, 1, 1]=(0.656500012961+0.622817770851j)*o*x_ref[1]**(o-1)+((-0.9422338137-0.0500599712609j))
+        arg[2, 2]=(0.535242471085+0.608113486979j)*x[0]**o+((-0.708259804094-0.690401618323j))*x[0]+((0.0870127802725-0.291979027676j))*x[1]**o+((0.227431909074-0.903400053231j))*x[1]
+        ref[2, 2, 0]=(0.535242471085+0.608113486979j)*o*x_ref[0]**(o-1)+((-0.708259804094-0.690401618323j))
+        ref[2, 2, 1]=(0.0870127802725-0.291979027676j)*o*x_ref[1]**(o-1)+((0.227431909074-0.903400053231j))
+        if dim==3:
+            arg[0, 0]+=(0.824827584823-0.545024985749j)*x[2]**o+((0.380259969367+0.0247361429212j))*x[2]
+            ref[0, 0, 2]=(0.824827584823-0.545024985749j)*o*x_ref[2]**(o-1)+((0.380259969367+0.0247361429212j))
+            arg[0, 1]+=(0.811899468948+0.994919112177j)*x[2]**o+((-0.808636933415-0.245263889718j))*x[2]
+            ref[0, 1, 2]=(0.811899468948+0.994919112177j)*o*x_ref[2]**(o-1)+((-0.808636933415-0.245263889718j))
+            arg[0, 2]+=(-0.938191091332+0.908760730291j)*x[2]**o+((0.378568221649+0.662079670342j))*x[2]
+            ref[0, 2, 2]=(-0.938191091332+0.908760730291j)*o*x_ref[2]**(o-1)+((0.378568221649+0.662079670342j))
+            arg[1, 0]+=(0.752759630593+0.12440348j)*x[2]**o+((-0.0643028990759-0.51458681758j))*x[2]
+            ref[1, 0, 2]=(0.752759630593+0.12440348j)*o*x_ref[2]**(o-1)+((-0.0643028990759-0.51458681758j))
+            arg[1, 1]+=(-0.0161785327559-0.6785293112j)*x[2]**o+((-0.220108130908+0.172639209507j))*x[2]
+            ref[1, 1, 2]=(-0.0161785327559-0.6785293112j)*o*x_ref[2]**(o-1)+((-0.220108130908+0.172639209507j))
+            arg[1, 2]+=(0.507080928159+0.384478778319j)*x[2]**o+((-0.020337831644+0.870478941815j))*x[2]
+            ref[1, 2, 2]=(0.507080928159+0.384478778319j)*o*x_ref[2]**(o-1)+((-0.020337831644+0.870478941815j))
+            arg[2, 0]+=(0.253943447823-0.903449290672j)*x[2]**o+((-0.744054984665-0.018847946177j))*x[2]
+            ref[2, 0, 2]=(0.253943447823-0.903449290672j)*o*x_ref[2]**(o-1)+((-0.744054984665-0.018847946177j))
+            arg[2, 1]+=(-0.0601041195461-0.132469406497j)*x[2]**o+((-0.0141698465531+0.134311210678j))*x[2]
+            ref[2, 1, 2]=(-0.0601041195461-0.132469406497j)*o*x_ref[2]**(o-1)+((-0.0141698465531+0.134311210678j))
+            arg[2, 2]+=(-0.0946378377448-0.97822288558j)*x[2]**o+((-0.806261790634+0.335323573718j))*x[2]
+            ref[2, 2, 2]=(-0.0946378377448-0.97822288558j)*o*x_ref[2]**(o-1)+((-0.806261790634+0.335323573718j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.410511086899-0.499667454384j)*x[0]**o+((-0.0153062770408+0.193588688735j))*x[0]+((0.000583112208866+0.975622771785j))*x[1]**o+((-0.0393747243729-0.238628724484j))*x[1]
+        ref[0, 0, 0, 0]=(-0.410511086899-0.499667454384j)*o*x_ref[0]**(o-1)+((-0.0153062770408+0.193588688735j))
+        ref[0, 0, 0, 1]=(0.000583112208866+0.975622771785j)*o*x_ref[1]**(o-1)+((-0.0393747243729-0.238628724484j))
+        arg[0, 0, 1]=(0.134886235767-0.763731276242j)*x[0]**o+((0.982636540081-0.358558331828j))*x[0]+((-0.715928560595-0.733017012802j))*x[1]**o+((-0.416666046952-0.864738313562j))*x[1]
+        ref[0, 0, 1, 0]=(0.134886235767-0.763731276242j)*o*x_ref[0]**(o-1)+((0.982636540081-0.358558331828j))
+        ref[0, 0, 1, 1]=(-0.715928560595-0.733017012802j)*o*x_ref[1]**(o-1)+((-0.416666046952-0.864738313562j))
+        arg[0, 1, 0]=(0.656807425649+0.217814098453j)*x[0]**o+((0.779886473334-0.886441062103j))*x[0]+((-0.02397297544-0.585401795602j))*x[1]**o+((-0.951517904496-0.821558637809j))*x[1]
+        ref[0, 1, 0, 0]=(0.656807425649+0.217814098453j)*o*x_ref[0]**(o-1)+((0.779886473334-0.886441062103j))
+        ref[0, 1, 0, 1]=(-0.02397297544-0.585401795602j)*o*x_ref[1]**(o-1)+((-0.951517904496-0.821558637809j))
+        arg[0, 1, 1]=(-0.906602421431-0.568705801591j)*x[0]**o+((-0.426588553444+0.849844545199j))*x[0]+((0.0501855046407-0.617310803233j))*x[1]**o+((-0.937536711126+0.375605092894j))*x[1]
+        ref[0, 1, 1, 0]=(-0.906602421431-0.568705801591j)*o*x_ref[0]**(o-1)+((-0.426588553444+0.849844545199j))
+        ref[0, 1, 1, 1]=(0.0501855046407-0.617310803233j)*o*x_ref[1]**(o-1)+((-0.937536711126+0.375605092894j))
+        arg[1, 0, 0]=(-0.57442671038+0.747443470066j)*x[0]**o+((0.0142344916093-0.551622359657j))*x[0]+((-0.974067431244-0.358807894264j))*x[1]**o+((-0.01237002021-0.852042097331j))*x[1]
+        ref[1, 0, 0, 0]=(-0.57442671038+0.747443470066j)*o*x_ref[0]**(o-1)+((0.0142344916093-0.551622359657j))
+        ref[1, 0, 0, 1]=(-0.974067431244-0.358807894264j)*o*x_ref[1]**(o-1)+((-0.01237002021-0.852042097331j))
+        arg[1, 0, 1]=(0.893471346844-0.342645150657j)*x[0]**o+((-0.109342320443-0.133229903002j))*x[0]+((0.895766221676-0.755815560253j))*x[1]**o+((-0.566064654887+0.316086506835j))*x[1]
+        ref[1, 0, 1, 0]=(0.893471346844-0.342645150657j)*o*x_ref[0]**(o-1)+((-0.109342320443-0.133229903002j))
+        ref[1, 0, 1, 1]=(0.895766221676-0.755815560253j)*o*x_ref[1]**(o-1)+((-0.566064654887+0.316086506835j))
+        arg[1, 1, 0]=(-0.685139555523-0.684958935987j)*x[0]**o+((0.843971371906+0.626067820387j))*x[0]+((-0.0968974923475-0.222084147422j))*x[1]**o+((0.757254422411-0.568306452645j))*x[1]
+        ref[1, 1, 0, 0]=(-0.685139555523-0.684958935987j)*o*x_ref[0]**(o-1)+((0.843971371906+0.626067820387j))
+        ref[1, 1, 0, 1]=(-0.0968974923475-0.222084147422j)*o*x_ref[1]**(o-1)+((0.757254422411-0.568306452645j))
+        arg[1, 1, 1]=(0.879735324576-0.948406602766j)*x[0]**o+((0.22376540654-0.108046653724j))*x[0]+((0.22047261593+0.935954832312j))*x[1]**o+((0.111751999033-0.0608848273226j))*x[1]
+        ref[1, 1, 1, 0]=(0.879735324576-0.948406602766j)*o*x_ref[0]**(o-1)+((0.22376540654-0.108046653724j))
+        ref[1, 1, 1, 1]=(0.22047261593+0.935954832312j)*o*x_ref[1]**(o-1)+((0.111751999033-0.0608848273226j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.0446061573373+0.14662947318j)*x[2]**o+((-0.804103760411+0.723879623116j))*x[2]
+            ref[0, 0, 0, 2]=(0.0446061573373+0.14662947318j)*o*x_ref[2]**(o-1)+((-0.804103760411+0.723879623116j))
+            arg[0, 0, 1]+=(-0.873929910736-0.171837822651j)*x[2]**o+((0.373961755212+0.534396275362j))*x[2]
+            ref[0, 0, 1, 2]=(-0.873929910736-0.171837822651j)*o*x_ref[2]**(o-1)+((0.373961755212+0.534396275362j))
+            arg[0, 1, 0]+=(-0.206126984036+0.0852507023825j)*x[2]**o+((-0.73326939186+0.924098396103j))*x[2]
+            ref[0, 1, 0, 2]=(-0.206126984036+0.0852507023825j)*o*x_ref[2]**(o-1)+((-0.73326939186+0.924098396103j))
+            arg[0, 1, 1]+=(0.576239011548-0.998801958938j)*x[2]**o+((0.299286126038+0.936191854044j))*x[2]
+            ref[0, 1, 1, 2]=(0.576239011548-0.998801958938j)*o*x_ref[2]**(o-1)+((0.299286126038+0.936191854044j))
+            arg[1, 0, 0]+=(0.266601497408-0.929208294662j)*x[2]**o+((0.276508302979-0.327835881973j))*x[2]
+            ref[1, 0, 0, 2]=(0.266601497408-0.929208294662j)*o*x_ref[2]**(o-1)+((0.276508302979-0.327835881973j))
+            arg[1, 0, 1]+=(-0.869850539892-0.120807327318j)*x[2]**o+((-0.222829626005+0.74564409048j))*x[2]
+            ref[1, 0, 1, 2]=(-0.869850539892-0.120807327318j)*o*x_ref[2]**(o-1)+((-0.222829626005+0.74564409048j))
+            arg[1, 1, 0]+=(-0.5596356227-0.641252727451j)*x[2]**o+((-0.197107346247-0.182199488023j))*x[2]
+            ref[1, 1, 0, 2]=(-0.5596356227-0.641252727451j)*o*x_ref[2]**(o-1)+((-0.197107346247-0.182199488023j))
+            arg[1, 1, 1]+=(-0.483318251334+0.20263271444j)*x[2]**o+((0.308846241436+0.0605328585231j))*x[2]
+            ref[1, 1, 1, 2]=(-0.483318251334+0.20263271444j)*o*x_ref[2]**(o-1)+((0.308846241436+0.0605328585231j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.396000759416-0.40309451929j)*x[0]+((0.177041737883+0.599834423692j))*x[1]
+        ref[0]=(0.396000759416-0.40309451929j)
+        ref[1]=(0.177041737883+0.599834423692j)
+        if dim==3:
+            arg+=((0.925994114172+0.0133036763164j))*x[2]
+            ref[2]=(0.925994114172+0.0133036763164j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(-0.877746500915-0.479756479038j)*x[0]+((-0.536281328855+0.0449819971131j))*x[1]
+        ref[0, 0]=(-0.877746500915-0.479756479038j)
+        ref[0, 1]=(-0.536281328855+0.0449819971131j)
+        arg[1,]=(0.380474551868-0.00123097049293j)*x[0]+((0.567371303949-0.257576519808j))*x[1]
+        ref[1, 0]=(0.380474551868-0.00123097049293j)
+        ref[1, 1]=(0.567371303949-0.257576519808j)
+        arg[2,]=(-0.885790304943+0.374814512372j)*x[0]+((-0.0664262535372-0.381504825267j))*x[1]
+        ref[2, 0]=(-0.885790304943+0.374814512372j)
+        ref[2, 1]=(-0.0664262535372-0.381504825267j)
+        arg[3,]=(-0.177666668374-0.33014620832j)*x[0]+((-0.488513709195+0.0590012144647j))*x[1]
+        ref[3, 0]=(-0.177666668374-0.33014620832j)
+        ref[3, 1]=(-0.488513709195+0.0590012144647j)
+        if dim==3:
+            arg[0,]+=(0.656441282833+0.393619903331j)*x[2]
+            ref[0, 2]=(0.656441282833+0.393619903331j)
+            arg[1,]+=(-0.607951922034-0.926116176417j)*x[2]
+            ref[1, 2]=(-0.607951922034-0.926116176417j)
+            arg[2,]+=(-0.31366245821-0.50426991289j)*x[2]
+            ref[2, 2]=(-0.31366245821-0.50426991289j)
+            arg[3,]+=(-0.63446578347+0.793949998496j)*x[2]
+            ref[3, 2]=(-0.63446578347+0.793949998496j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4)+(dim,),w_ref)
+        arg[0, 0]=(0.0391240039814-0.426479121156j)*x[0]+((-0.168823086721-0.822661982119j))*x[1]
+        ref[0, 0, 0]=(0.0391240039814-0.426479121156j)
+        ref[0, 0, 1]=(-0.168823086721-0.822661982119j)
+        arg[0, 1]=(-0.938225792445+0.909400005524j)*x[0]+((0.675244141044-0.874431808677j))*x[1]
+        ref[0, 1, 0]=(-0.938225792445+0.909400005524j)
+        ref[0, 1, 1]=(0.675244141044-0.874431808677j)
+        arg[0, 2]=(0.853975629741+0.0446015902877j)*x[0]+((0.364163547872+0.705343403735j))*x[1]
+        ref[0, 2, 0]=(0.853975629741+0.0446015902877j)
+        ref[0, 2, 1]=(0.364163547872+0.705343403735j)
+        arg[0, 3]=(-0.463421908902+0.896997658293j)*x[0]+((-0.298646331808-0.0999440551672j))*x[1]
+        ref[0, 3, 0]=(-0.463421908902+0.896997658293j)
+        ref[0, 3, 1]=(-0.298646331808-0.0999440551672j)
+        arg[1, 0]=(-0.3623828179+0.308365117696j)*x[0]+((0.922114489257+0.0451083931849j))*x[1]
+        ref[1, 0, 0]=(-0.3623828179+0.308365117696j)
+        ref[1, 0, 1]=(0.922114489257+0.0451083931849j)
+        arg[1, 1]=(-0.15359177238+0.948159540189j)*x[0]+((-0.430501700578+0.963125622708j))*x[1]
+        ref[1, 1, 0]=(-0.15359177238+0.948159540189j)
+        ref[1, 1, 1]=(-0.430501700578+0.963125622708j)
+        arg[1, 2]=(-0.945832184059+0.0101687331884j)*x[0]+((-0.0192750244289-0.138859242362j))*x[1]
+        ref[1, 2, 0]=(-0.945832184059+0.0101687331884j)
+        ref[1, 2, 1]=(-0.0192750244289-0.138859242362j)
+        arg[1, 3]=(0.0398896348177-0.585863142446j)*x[0]+((0.975198386115-0.391198148832j))*x[1]
+        ref[1, 3, 0]=(0.0398896348177-0.585863142446j)
+        ref[1, 3, 1]=(0.975198386115-0.391198148832j)
+        arg[2, 0]=(-0.471416486262-0.454809543905j)*x[0]+((-0.81070986811-0.125937896187j))*x[1]
+        ref[2, 0, 0]=(-0.471416486262-0.454809543905j)
+        ref[2, 0, 1]=(-0.81070986811-0.125937896187j)
+        arg[2, 1]=(0.533435570337-0.318770201642j)*x[0]+((0.00903270697074-0.275996767944j))*x[1]
+        ref[2, 1, 0]=(0.533435570337-0.318770201642j)
+        ref[2, 1, 1]=(0.00903270697074-0.275996767944j)
+        arg[2, 2]=(0.732701409973-0.520281676325j)*x[0]+((-0.79583987648-0.0550018983441j))*x[1]
+        ref[2, 2, 0]=(0.732701409973-0.520281676325j)
+        ref[2, 2, 1]=(-0.79583987648-0.0550018983441j)
+        arg[2, 3]=(-0.44498976891+0.55335332841j)*x[0]+((0.873105143095-0.665006364139j))*x[1]
+        ref[2, 3, 0]=(-0.44498976891+0.55335332841j)
+        ref[2, 3, 1]=(0.873105143095-0.665006364139j)
+        if dim==3:
+            arg[0, 0]+=(0.849928819809-0.832780645951j)*x[2]
+            ref[0, 0, 2]=(0.849928819809-0.832780645951j)
+            arg[0, 1]+=(-0.547453389021-0.341176676307j)*x[2]
+            ref[0, 1, 2]=(-0.547453389021-0.341176676307j)
+            arg[0, 2]+=(-0.723571910169+0.152301894691j)*x[2]
+            ref[0, 2, 2]=(-0.723571910169+0.152301894691j)
+            arg[0, 3]+=(0.112575319585-0.929833134226j)*x[2]
+            ref[0, 3, 2]=(0.112575319585-0.929833134226j)
+            arg[1, 0]+=(-0.225096115828-0.670374757709j)*x[2]
+            ref[1, 0, 2]=(-0.225096115828-0.670374757709j)
+            arg[1, 1]+=(0.871894631613+0.801862377113j)*x[2]
+            ref[1, 1, 2]=(0.871894631613+0.801862377113j)
+            arg[1, 2]+=(-0.660434289677-0.731817611161j)*x[2]
+            ref[1, 2, 2]=(-0.660434289677-0.731817611161j)
+            arg[1, 3]+=(0.643829156994-0.641862810126j)*x[2]
+            ref[1, 3, 2]=(0.643829156994-0.641862810126j)
+            arg[2, 0]+=(0.441660226319-0.0427340184302j)*x[2]
+            ref[2, 0, 2]=(0.441660226319-0.0427340184302j)
+            arg[2, 1]+=(0.565068591785-0.110037552348j)*x[2]
+            ref[2, 1, 2]=(0.565068591785-0.110037552348j)
+            arg[2, 2]+=(0.484226067979-0.504889016886j)*x[2]
+            ref[2, 2, 2]=(0.484226067979-0.504889016886j)
+            arg[2, 3]+=(-0.83858787361-0.479759402087j)*x[2]
+            ref[2, 3, 2]=(-0.83858787361-0.479759402087j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3),w)
+        ref = Data(0,(2, 3, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.381773025828+0.890666746511j)*x[0]+((0.73031489001+0.442091371305j))*x[1]
+        ref[0, 0, 0, 0]=(0.381773025828+0.890666746511j)
+        ref[0, 0, 0, 1]=(0.73031489001+0.442091371305j)
+        arg[0, 0, 1]=(0.0236629897178+0.382557436299j)*x[0]+((-0.28193988497+0.0916590799877j))*x[1]
+        ref[0, 0, 1, 0]=(0.0236629897178+0.382557436299j)
+        ref[0, 0, 1, 1]=(-0.28193988497+0.0916590799877j)
+        arg[0, 0, 2]=(-0.277770631767+0.339586560716j)*x[0]+((0.599121763213-0.708584703056j))*x[1]
+        ref[0, 0, 2, 0]=(-0.277770631767+0.339586560716j)
+        ref[0, 0, 2, 1]=(0.599121763213-0.708584703056j)
+        arg[0, 1, 0]=(-0.0739053724469-0.251426172528j)*x[0]+((0.0271974353242+0.2867699308j))*x[1]
+        ref[0, 1, 0, 0]=(-0.0739053724469-0.251426172528j)
+        ref[0, 1, 0, 1]=(0.0271974353242+0.2867699308j)
+        arg[0, 1, 1]=(-0.960416041255+0.430811815116j)*x[0]+((0.356353747455+0.0625891659394j))*x[1]
+        ref[0, 1, 1, 0]=(-0.960416041255+0.430811815116j)
+        ref[0, 1, 1, 1]=(0.356353747455+0.0625891659394j)
+        arg[0, 1, 2]=(-0.51260510163+0.276172152265j)*x[0]+((-0.519007835681+0.929637186942j))*x[1]
+        ref[0, 1, 2, 0]=(-0.51260510163+0.276172152265j)
+        ref[0, 1, 2, 1]=(-0.519007835681+0.929637186942j)
+        arg[0, 2, 0]=(-0.112977154088-0.642077287418j)*x[0]+((0.0483095423544+0.207530167073j))*x[1]
+        ref[0, 2, 0, 0]=(-0.112977154088-0.642077287418j)
+        ref[0, 2, 0, 1]=(0.0483095423544+0.207530167073j)
+        arg[0, 2, 1]=(-0.170076907489+0.534527212412j)*x[0]+((-0.385923584392-0.671677472834j))*x[1]
+        ref[0, 2, 1, 0]=(-0.170076907489+0.534527212412j)
+        ref[0, 2, 1, 1]=(-0.385923584392-0.671677472834j)
+        arg[0, 2, 2]=(0.030713467272-0.178051484869j)*x[0]+((0.471995111846-0.0244682439942j))*x[1]
+        ref[0, 2, 2, 0]=(0.030713467272-0.178051484869j)
+        ref[0, 2, 2, 1]=(0.471995111846-0.0244682439942j)
+        arg[1, 0, 0]=(-0.400180171128+0.932482838065j)*x[0]+((-0.84310560723-0.603340243023j))*x[1]
+        ref[1, 0, 0, 0]=(-0.400180171128+0.932482838065j)
+        ref[1, 0, 0, 1]=(-0.84310560723-0.603340243023j)
+        arg[1, 0, 1]=(0.68750990574-0.864920136169j)*x[0]+((-0.348690930005-0.410123319832j))*x[1]
+        ref[1, 0, 1, 0]=(0.68750990574-0.864920136169j)
+        ref[1, 0, 1, 1]=(-0.348690930005-0.410123319832j)
+        arg[1, 0, 2]=(-0.407477799796-0.545500610485j)*x[0]+((-0.620244945671+0.039990402211j))*x[1]
+        ref[1, 0, 2, 0]=(-0.407477799796-0.545500610485j)
+        ref[1, 0, 2, 1]=(-0.620244945671+0.039990402211j)
+        arg[1, 1, 0]=(0.557448230327-0.360632429805j)*x[0]+((-0.46147426156+0.540596211317j))*x[1]
+        ref[1, 1, 0, 0]=(0.557448230327-0.360632429805j)
+        ref[1, 1, 0, 1]=(-0.46147426156+0.540596211317j)
+        arg[1, 1, 1]=(0.996940918783+0.574246460022j)*x[0]+((-0.195129751668-0.235012925118j))*x[1]
+        ref[1, 1, 1, 0]=(0.996940918783+0.574246460022j)
+        ref[1, 1, 1, 1]=(-0.195129751668-0.235012925118j)
+        arg[1, 1, 2]=(-0.503665134645-0.675147765815j)*x[0]+((-0.311503097366-0.516148925041j))*x[1]
+        ref[1, 1, 2, 0]=(-0.503665134645-0.675147765815j)
+        ref[1, 1, 2, 1]=(-0.311503097366-0.516148925041j)
+        arg[1, 2, 0]=(0.411461324797+0.189521164042j)*x[0]+((-0.570243841387+0.75639561732j))*x[1]
+        ref[1, 2, 0, 0]=(0.411461324797+0.189521164042j)
+        ref[1, 2, 0, 1]=(-0.570243841387+0.75639561732j)
+        arg[1, 2, 1]=(0.883339316652+0.690758719796j)*x[0]+((-0.326493176415-0.38086891447j))*x[1]
+        ref[1, 2, 1, 0]=(0.883339316652+0.690758719796j)
+        ref[1, 2, 1, 1]=(-0.326493176415-0.38086891447j)
+        arg[1, 2, 2]=(0.988218674239-0.0676182632276j)*x[0]+((-0.690712992444-0.0481543281459j))*x[1]
+        ref[1, 2, 2, 0]=(0.988218674239-0.0676182632276j)
+        ref[1, 2, 2, 1]=(-0.690712992444-0.0481543281459j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.699087081376-0.420117146247j)*x[2]
+            ref[0, 0, 0, 2]=(0.699087081376-0.420117146247j)
+            arg[0, 0, 1]+=(0.785226878491-0.842180089616j)*x[2]
+            ref[0, 0, 1, 2]=(0.785226878491-0.842180089616j)
+            arg[0, 0, 2]+=(0.0344799688957-0.134353420626j)*x[2]
+            ref[0, 0, 2, 2]=(0.0344799688957-0.134353420626j)
+            arg[0, 1, 0]+=(-0.621605366157-0.540159770254j)*x[2]
+            ref[0, 1, 0, 2]=(-0.621605366157-0.540159770254j)
+            arg[0, 1, 1]+=(0.686189424295-0.162223104702j)*x[2]
+            ref[0, 1, 1, 2]=(0.686189424295-0.162223104702j)
+            arg[0, 1, 2]+=(0.195145272134+0.846965460704j)*x[2]
+            ref[0, 1, 2, 2]=(0.195145272134+0.846965460704j)
+            arg[0, 2, 0]+=(-0.627971857086+0.920693650308j)*x[2]
+            ref[0, 2, 0, 2]=(-0.627971857086+0.920693650308j)
+            arg[0, 2, 1]+=(0.960899482171-0.683806943231j)*x[2]
+            ref[0, 2, 1, 2]=(0.960899482171-0.683806943231j)
+            arg[0, 2, 2]+=(0.85395491456+0.127603010481j)*x[2]
+            ref[0, 2, 2, 2]=(0.85395491456+0.127603010481j)
+            arg[1, 0, 0]+=(-0.511516980316+0.657071064463j)*x[2]
+            ref[1, 0, 0, 2]=(-0.511516980316+0.657071064463j)
+            arg[1, 0, 1]+=(-0.263277208002-0.152968213117j)*x[2]
+            ref[1, 0, 1, 2]=(-0.263277208002-0.152968213117j)
+            arg[1, 0, 2]+=(0.437162717136+0.219329918404j)*x[2]
+            ref[1, 0, 2, 2]=(0.437162717136+0.219329918404j)
+            arg[1, 1, 0]+=(-0.206351185436+0.916569904091j)*x[2]
+            ref[1, 1, 0, 2]=(-0.206351185436+0.916569904091j)
+            arg[1, 1, 1]+=(-0.477610368653-0.332668990217j)*x[2]
+            ref[1, 1, 1, 2]=(-0.477610368653-0.332668990217j)
+            arg[1, 1, 2]+=(-0.931191450573-0.586371710141j)*x[2]
+            ref[1, 1, 2, 2]=(-0.931191450573-0.586371710141j)
+            arg[1, 2, 0]+=(0.662881134268-0.571762835504j)*x[2]
+            ref[1, 2, 0, 2]=(0.662881134268-0.571762835504j)
+            arg[1, 2, 1]+=(-0.441540035819+0.614934971072j)*x[2]
+            ref[1, 2, 1, 2]=(-0.441540035819+0.614934971072j)
+            arg[1, 2, 2]+=(-0.749338243418-0.728957625144j)*x[2]
+            ref[1, 2, 2, 2]=(-0.749338243418-0.728957625144j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.86372268671+0.0230865392856j)*x[0]+((-0.341267903673+0.102611959851j))*x[1]
+        ref[0]=(-0.86372268671+0.0230865392856j)
+        ref[1]=(-0.341267903673+0.102611959851j)
+        if dim==3:
+            arg+=((0.0617991126703-0.0909633757985j))*x[2]
+            ref[2]=(0.0617991126703-0.0909633757985j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(0.767733366125-0.84664970333j)*x[0]+((0.484433882574+0.84972852728j))*x[1]
+        ref[0, 0]=(0.767733366125-0.84664970333j)
+        ref[0, 1]=(0.484433882574+0.84972852728j)
+        arg[1,]=(0.965703661433+0.866501477962j)*x[0]+((0.0131111502873+0.515440903159j))*x[1]
+        ref[1, 0]=(0.965703661433+0.866501477962j)
+        ref[1, 1]=(0.0131111502873+0.515440903159j)
+        if dim==3:
+            arg[0,]+=(0.455259426654-0.410017171051j)*x[2]
+            ref[0, 2]=(0.455259426654-0.410017171051j)
+            arg[1,]+=(-0.0485789973188+0.599947001325j)*x[2]
+            ref[1, 2]=(-0.0485789973188+0.599947001325j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=(0.489169497271-0.0623131575293j)*x[0]+((-0.387793695971+0.4477179645j))*x[1]
+        ref[0, 0, 0]=(0.489169497271-0.0623131575293j)
+        ref[0, 0, 1]=(-0.387793695971+0.4477179645j)
+        arg[0, 1]=(-0.031149320009-0.956287799853j)*x[0]+((-0.188555663502-0.734655751119j))*x[1]
+        ref[0, 1, 0]=(-0.031149320009-0.956287799853j)
+        ref[0, 1, 1]=(-0.188555663502-0.734655751119j)
+        arg[1, 0]=(-0.652770356311+0.591489677433j)*x[0]+((0.745911054323+0.108301867093j))*x[1]
+        ref[1, 0, 0]=(-0.652770356311+0.591489677433j)
+        ref[1, 0, 1]=(0.745911054323+0.108301867093j)
+        arg[1, 1]=(-0.775387834252+0.746249165362j)*x[0]+((0.644368315028+0.240768941426j))*x[1]
+        ref[1, 1, 0]=(-0.775387834252+0.746249165362j)
+        ref[1, 1, 1]=(0.644368315028+0.240768941426j)
+        if dim==3:
+            arg[0, 0]+=(0.45641470821+0.911671710189j)*x[2]
+            ref[0, 0, 2]=(0.45641470821+0.911671710189j)
+            arg[0, 1]+=(0.090208602319-0.609711238055j)*x[2]
+            ref[0, 1, 2]=(0.090208602319-0.609711238055j)
+            arg[1, 0]+=(-0.61226155946+0.744562701708j)*x[2]
+            ref[1, 0, 2]=(-0.61226155946+0.744562701708j)
+            arg[1, 1]+=(-0.337267208011-0.792807646524j)*x[2]
+            ref[1, 1, 2]=(-0.337267208011-0.792807646524j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.218662603333-0.997810946086j)*x[0]+((0.133667462453+0.860407094006j))*x[1]
+        ref[0, 0, 0, 0]=(0.218662603333-0.997810946086j)
+        ref[0, 0, 0, 1]=(0.133667462453+0.860407094006j)
+        arg[0, 0, 1]=(-0.534356548501-0.261334108226j)*x[0]+((0.504553712506-0.360302065862j))*x[1]
+        ref[0, 0, 1, 0]=(-0.534356548501-0.261334108226j)
+        ref[0, 0, 1, 1]=(0.504553712506-0.360302065862j)
+        arg[0, 0, 2]=(-0.764247536231-0.073831761413j)*x[0]+((-0.763443969911-0.037081440708j))*x[1]
+        ref[0, 0, 2, 0]=(-0.764247536231-0.073831761413j)
+        ref[0, 0, 2, 1]=(-0.763443969911-0.037081440708j)
+        arg[0, 0, 3]=(0.565574609006-0.695119905313j)*x[0]+((0.0215375906984-0.829204295619j))*x[1]
+        ref[0, 0, 3, 0]=(0.565574609006-0.695119905313j)
+        ref[0, 0, 3, 1]=(0.0215375906984-0.829204295619j)
+        arg[0, 1, 0]=(-0.531748219889+0.458141498397j)*x[0]+((0.859820630293+0.130551767296j))*x[1]
+        ref[0, 1, 0, 0]=(-0.531748219889+0.458141498397j)
+        ref[0, 1, 0, 1]=(0.859820630293+0.130551767296j)
+        arg[0, 1, 1]=(0.486214969151+0.970541596359j)*x[0]+((0.545583833891-0.127985076767j))*x[1]
+        ref[0, 1, 1, 0]=(0.486214969151+0.970541596359j)
+        ref[0, 1, 1, 1]=(0.545583833891-0.127985076767j)
+        arg[0, 1, 2]=(-0.953569739842-0.0539929617482j)*x[0]+((0.136464822765+0.700029213134j))*x[1]
+        ref[0, 1, 2, 0]=(-0.953569739842-0.0539929617482j)
+        ref[0, 1, 2, 1]=(0.136464822765+0.700029213134j)
+        arg[0, 1, 3]=(0.744619923316+0.559407659804j)*x[0]+((0.824263297924-0.308922859874j))*x[1]
+        ref[0, 1, 3, 0]=(0.744619923316+0.559407659804j)
+        ref[0, 1, 3, 1]=(0.824263297924-0.308922859874j)
+        arg[1, 0, 0]=(-0.950311667962+0.480609707299j)*x[0]+((0.774444770404-0.123358290455j))*x[1]
+        ref[1, 0, 0, 0]=(-0.950311667962+0.480609707299j)
+        ref[1, 0, 0, 1]=(0.774444770404-0.123358290455j)
+        arg[1, 0, 1]=(-0.147896895082-0.574930530222j)*x[0]+((-0.53985722301-0.223065180736j))*x[1]
+        ref[1, 0, 1, 0]=(-0.147896895082-0.574930530222j)
+        ref[1, 0, 1, 1]=(-0.53985722301-0.223065180736j)
+        arg[1, 0, 2]=(0.622198557541+0.271126598368j)*x[0]+((-0.158332043851+0.402590040509j))*x[1]
+        ref[1, 0, 2, 0]=(0.622198557541+0.271126598368j)
+        ref[1, 0, 2, 1]=(-0.158332043851+0.402590040509j)
+        arg[1, 0, 3]=(-0.369151673484-0.941493764772j)*x[0]+((-0.735648272114-0.440735345817j))*x[1]
+        ref[1, 0, 3, 0]=(-0.369151673484-0.941493764772j)
+        ref[1, 0, 3, 1]=(-0.735648272114-0.440735345817j)
+        arg[1, 1, 0]=(0.405942628655+0.13471150342j)*x[0]+((0.0943558522284+0.557247273646j))*x[1]
+        ref[1, 1, 0, 0]=(0.405942628655+0.13471150342j)
+        ref[1, 1, 0, 1]=(0.0943558522284+0.557247273646j)
+        arg[1, 1, 1]=(0.740351938069-0.405700202948j)*x[0]+((0.556533593504-0.631255184756j))*x[1]
+        ref[1, 1, 1, 0]=(0.740351938069-0.405700202948j)
+        ref[1, 1, 1, 1]=(0.556533593504-0.631255184756j)
+        arg[1, 1, 2]=(-0.95790285997-0.0583519327547j)*x[0]+((0.943728411576-0.182027082558j))*x[1]
+        ref[1, 1, 2, 0]=(-0.95790285997-0.0583519327547j)
+        ref[1, 1, 2, 1]=(0.943728411576-0.182027082558j)
+        arg[1, 1, 3]=(-0.422300868354+0.857089917587j)*x[0]+((0.700072149664+0.440848084503j))*x[1]
+        ref[1, 1, 3, 0]=(-0.422300868354+0.857089917587j)
+        ref[1, 1, 3, 1]=(0.700072149664+0.440848084503j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.983899363537-0.646778584838j)*x[2]
+            ref[0, 0, 0, 2]=(0.983899363537-0.646778584838j)
+            arg[0, 0, 1]+=(-0.371943963703+0.300896427782j)*x[2]
+            ref[0, 0, 1, 2]=(-0.371943963703+0.300896427782j)
+            arg[0, 0, 2]+=(0.542625687137-0.674940304963j)*x[2]
+            ref[0, 0, 2, 2]=(0.542625687137-0.674940304963j)
+            arg[0, 0, 3]+=(0.256638183374+0.801906670639j)*x[2]
+            ref[0, 0, 3, 2]=(0.256638183374+0.801906670639j)
+            arg[0, 1, 0]+=(0.636377082891+0.386481562843j)*x[2]
+            ref[0, 1, 0, 2]=(0.636377082891+0.386481562843j)
+            arg[0, 1, 1]+=(0.907503025953-0.871197770333j)*x[2]
+            ref[0, 1, 1, 2]=(0.907503025953-0.871197770333j)
+            arg[0, 1, 2]+=(-0.145124294152-0.359930981206j)*x[2]
+            ref[0, 1, 2, 2]=(-0.145124294152-0.359930981206j)
+            arg[0, 1, 3]+=(-0.848971617658+0.77240073938j)*x[2]
+            ref[0, 1, 3, 2]=(-0.848971617658+0.77240073938j)
+            arg[1, 0, 0]+=(-0.90632160126+0.897603117755j)*x[2]
+            ref[1, 0, 0, 2]=(-0.90632160126+0.897603117755j)
+            arg[1, 0, 1]+=(-0.186541437376-0.707738187631j)*x[2]
+            ref[1, 0, 1, 2]=(-0.186541437376-0.707738187631j)
+            arg[1, 0, 2]+=(-0.267003171458+0.121499625477j)*x[2]
+            ref[1, 0, 2, 2]=(-0.267003171458+0.121499625477j)
+            arg[1, 0, 3]+=(0.759074321865+0.954912554672j)*x[2]
+            ref[1, 0, 3, 2]=(0.759074321865+0.954912554672j)
+            arg[1, 1, 0]+=(0.337837965329-0.300770241049j)*x[2]
+            ref[1, 1, 0, 2]=(0.337837965329-0.300770241049j)
+            arg[1, 1, 1]+=(-0.282646515939-0.152142304359j)*x[2]
+            ref[1, 1, 1, 2]=(-0.282646515939-0.152142304359j)
+            arg[1, 1, 2]+=(0.665708601387-0.41852567827j)*x[2]
+            ref[1, 1, 2, 2]=(0.665708601387-0.41852567827j)
+            arg[1, 1, 3]+=(0.523578468775-0.109514447694j)*x[2]
+            ref[1, 1, 3, 2]=(0.523578468775-0.109514447694j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.257408702226+0.782350106857j)*x[0]**o+((0.644205252174-0.99335078721j))*x[0]+((0.232593492656+0.404539810861j))*x[1]**o+((-0.0866554806373-0.711136063691j))*x[1]
+        ref[0]=(0.257408702226+0.782350106857j)*o*x_ref[0]**(o-1)+((0.644205252174-0.99335078721j))
+        ref[1]=(0.232593492656+0.404539810861j)*o*x_ref[1]**(o-1)+((-0.0866554806373-0.711136063691j))
+        if dim==3:
+            arg+=((-0.216377801105-0.777311948529j))*x[2]**o+((-0.781849818382+0.245231446353j))*x[2]
+            ref[2]=(-0.216377801105-0.777311948529j)*o*x_ref[2]**(o-1)+((-0.781849818382+0.245231446353j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(0.992913911427-0.269142458007j)*x[0]**o+((-0.851341554934+0.109695134246j))*x[0]+((0.597505455179+0.597596136134j))*x[1]**o+((-0.568861510899+0.418828406475j))*x[1]
+        ref[0, 0]=(0.992913911427-0.269142458007j)*o*x_ref[0]**(o-1)+((-0.851341554934+0.109695134246j))
+        ref[0, 1]=(0.597505455179+0.597596136134j)*o*x_ref[1]**(o-1)+((-0.568861510899+0.418828406475j))
+        arg[1,]=(0.415902917541+0.300536196835j)*x[0]**o+((0.164504595432-0.643633524312j))*x[0]+((-0.92711614196+0.855404227952j))*x[1]**o+((0.366549422747+0.992856004788j))*x[1]
+        ref[1, 0]=(0.415902917541+0.300536196835j)*o*x_ref[0]**(o-1)+((0.164504595432-0.643633524312j))
+        ref[1, 1]=(-0.92711614196+0.855404227952j)*o*x_ref[1]**(o-1)+((0.366549422747+0.992856004788j))
+        if dim==3:
+            arg[0,]+=(0.818001848269-0.247065387851j)*x[2]**o+((-0.111252642736+0.104889927657j))*x[2]
+            ref[0, 2]=(0.818001848269-0.247065387851j)*o*x_ref[2]**(o-1)+((-0.111252642736+0.104889927657j))
+            arg[1,]+=(-0.755154157187-0.718631818125j)*x[2]**o+((-0.00368207061686-0.951307340728j))*x[2]
+            ref[1, 2]=(-0.755154157187-0.718631818125j)*o*x_ref[2]**(o-1)+((-0.00368207061686-0.951307340728j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=(0.839297015231-0.157004176515j)*x[0]**o+((0.177468209384-0.996811547873j))*x[0]+((0.227428943391-0.232790542531j))*x[1]**o+((-0.456203623769+0.821339629813j))*x[1]
+        ref[0, 0, 0]=(0.839297015231-0.157004176515j)*o*x_ref[0]**(o-1)+((0.177468209384-0.996811547873j))
+        ref[0, 0, 1]=(0.227428943391-0.232790542531j)*o*x_ref[1]**(o-1)+((-0.456203623769+0.821339629813j))
+        arg[0, 1]=(-0.490034404956+0.406698669405j)*x[0]**o+((-0.554808574024-0.200168401314j))*x[0]+((-0.304510455316-0.826415424669j))*x[1]**o+((0.142959410573+0.506397951978j))*x[1]
+        ref[0, 1, 0]=(-0.490034404956+0.406698669405j)*o*x_ref[0]**(o-1)+((-0.554808574024-0.200168401314j))
+        ref[0, 1, 1]=(-0.304510455316-0.826415424669j)*o*x_ref[1]**(o-1)+((0.142959410573+0.506397951978j))
+        arg[1, 0]=(-0.774928971277+0.638113217748j)*x[0]**o+((0.172248291292-0.175608607379j))*x[0]+((0.155706612611+0.72631401915j))*x[1]**o+((0.415505721007+0.989647135775j))*x[1]
+        ref[1, 0, 0]=(-0.774928971277+0.638113217748j)*o*x_ref[0]**(o-1)+((0.172248291292-0.175608607379j))
+        ref[1, 0, 1]=(0.155706612611+0.72631401915j)*o*x_ref[1]**(o-1)+((0.415505721007+0.989647135775j))
+        arg[1, 1]=(0.737323110117+0.50297646524j)*x[0]**o+((0.752470656148-0.947374467253j))*x[0]+((0.603006049614-0.27941277176j))*x[1]**o+((-0.361540707223+0.532637222322j))*x[1]
+        ref[1, 1, 0]=(0.737323110117+0.50297646524j)*o*x_ref[0]**(o-1)+((0.752470656148-0.947374467253j))
+        ref[1, 1, 1]=(0.603006049614-0.27941277176j)*o*x_ref[1]**(o-1)+((-0.361540707223+0.532637222322j))
+        if dim==3:
+            arg[0, 0]+=(-0.419284762635-0.988681336342j)*x[2]**o+((-0.346846411943+0.41059841489j))*x[2]
+            ref[0, 0, 2]=(-0.419284762635-0.988681336342j)*o*x_ref[2]**(o-1)+((-0.346846411943+0.41059841489j))
+            arg[0, 1]+=(0.772677164264-0.0656504549952j)*x[2]**o+((0.215606708033-0.47806956376j))*x[2]
+            ref[0, 1, 2]=(0.772677164264-0.0656504549952j)*o*x_ref[2]**(o-1)+((0.215606708033-0.47806956376j))
+            arg[1, 0]+=(-0.0654483950885+0.475990400976j)*x[2]**o+((-0.2931015768-0.466601041035j))*x[2]
+            ref[1, 0, 2]=(-0.0654483950885+0.475990400976j)*o*x_ref[2]**(o-1)+((-0.2931015768-0.466601041035j))
+            arg[1, 1]+=(0.448497189519-0.174736544266j)*x[2]**o+((-0.556357971884-0.273378201094j))*x[2]
+            ref[1, 1, 2]=(0.448497189519-0.174736544266j)*o*x_ref[2]**(o-1)+((-0.556357971884-0.273378201094j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.25584273689+0.371594765786j)*x[0]**o+((0.799146736463-0.320422915573j))*x[0]+((-0.77516982502-0.0123931866741j))*x[1]**o+((-0.818765535234+0.763628764052j))*x[1]
+        ref[0, 0, 0, 0]=(0.25584273689+0.371594765786j)*o*x_ref[0]**(o-1)+((0.799146736463-0.320422915573j))
+        ref[0, 0, 0, 1]=(-0.77516982502-0.0123931866741j)*o*x_ref[1]**(o-1)+((-0.818765535234+0.763628764052j))
+        arg[0, 0, 1]=(-0.483210343407-0.434321573413j)*x[0]**o+((0.191312712515-0.504165023254j))*x[0]+((-0.491585345119+0.628712913607j))*x[1]**o+((0.167824207032+0.875606539103j))*x[1]
+        ref[0, 0, 1, 0]=(-0.483210343407-0.434321573413j)*o*x_ref[0]**(o-1)+((0.191312712515-0.504165023254j))
+        ref[0, 0, 1, 1]=(-0.491585345119+0.628712913607j)*o*x_ref[1]**(o-1)+((0.167824207032+0.875606539103j))
+        arg[0, 0, 2]=(-0.812535547164-0.748436520276j)*x[0]**o+((0.000591219950602+0.579100915416j))*x[0]+((-0.0198374012105-0.464045942409j))*x[1]**o+((-0.820510651024-0.390009476654j))*x[1]
+        ref[0, 0, 2, 0]=(-0.812535547164-0.748436520276j)*o*x_ref[0]**(o-1)+((0.000591219950602+0.579100915416j))
+        ref[0, 0, 2, 1]=(-0.0198374012105-0.464045942409j)*o*x_ref[1]**(o-1)+((-0.820510651024-0.390009476654j))
+        arg[0, 1, 0]=(0.623278251558-0.439460621037j)*x[0]**o+((0.613007939267-0.987937512809j))*x[0]+((-0.8748147183+0.172577093254j))*x[1]**o+((-0.469520887523-0.700723569452j))*x[1]
+        ref[0, 1, 0, 0]=(0.623278251558-0.439460621037j)*o*x_ref[0]**(o-1)+((0.613007939267-0.987937512809j))
+        ref[0, 1, 0, 1]=(-0.8748147183+0.172577093254j)*o*x_ref[1]**(o-1)+((-0.469520887523-0.700723569452j))
+        arg[0, 1, 1]=(0.4028884667-0.53227518602j)*x[0]**o+((0.567520730304-0.016729122602j))*x[0]+((-0.442230656721-0.0139631755598j))*x[1]**o+((0.728127864739+0.90455633901j))*x[1]
+        ref[0, 1, 1, 0]=(0.4028884667-0.53227518602j)*o*x_ref[0]**(o-1)+((0.567520730304-0.016729122602j))
+        ref[0, 1, 1, 1]=(-0.442230656721-0.0139631755598j)*o*x_ref[1]**(o-1)+((0.728127864739+0.90455633901j))
+        arg[0, 1, 2]=(-0.540663679392-0.13360314834j)*x[0]**o+((0.812745106944+0.661944207608j))*x[0]+((-0.760725464337-0.0904797769459j))*x[1]**o+((0.0848666447156-0.893658600209j))*x[1]
+        ref[0, 1, 2, 0]=(-0.540663679392-0.13360314834j)*o*x_ref[0]**(o-1)+((0.812745106944+0.661944207608j))
+        ref[0, 1, 2, 1]=(-0.760725464337-0.0904797769459j)*o*x_ref[1]**(o-1)+((0.0848666447156-0.893658600209j))
+        arg[1, 0, 0]=(-0.694385257876+0.897109790158j)*x[0]**o+((-0.290143475533+0.242561483255j))*x[0]+((0.577160434836+0.12295511204j))*x[1]**o+((-0.700960092606-0.979540833962j))*x[1]
+        ref[1, 0, 0, 0]=(-0.694385257876+0.897109790158j)*o*x_ref[0]**(o-1)+((-0.290143475533+0.242561483255j))
+        ref[1, 0, 0, 1]=(0.577160434836+0.12295511204j)*o*x_ref[1]**(o-1)+((-0.700960092606-0.979540833962j))
+        arg[1, 0, 1]=(0.03616994352-0.696324145965j)*x[0]**o+((0.816255707051+0.519772933832j))*x[0]+((-0.174867848065+0.171429528863j))*x[1]**o+((0.672534087329+0.716588987167j))*x[1]
+        ref[1, 0, 1, 0]=(0.03616994352-0.696324145965j)*o*x_ref[0]**(o-1)+((0.816255707051+0.519772933832j))
+        ref[1, 0, 1, 1]=(-0.174867848065+0.171429528863j)*o*x_ref[1]**(o-1)+((0.672534087329+0.716588987167j))
+        arg[1, 0, 2]=(-0.725537599362-0.302189924687j)*x[0]**o+((0.856373627426-0.741865048692j))*x[0]+((0.129099839866+0.784933511424j))*x[1]**o+((0.62406729188-0.558739950829j))*x[1]
+        ref[1, 0, 2, 0]=(-0.725537599362-0.302189924687j)*o*x_ref[0]**(o-1)+((0.856373627426-0.741865048692j))
+        ref[1, 0, 2, 1]=(0.129099839866+0.784933511424j)*o*x_ref[1]**(o-1)+((0.62406729188-0.558739950829j))
+        arg[1, 1, 0]=(0.345704306511-0.754050957195j)*x[0]**o+((-0.198780842682+0.763553303091j))*x[0]+((0.410648218306-0.0939480470708j))*x[1]**o+((0.944980315438-0.886698545506j))*x[1]
+        ref[1, 1, 0, 0]=(0.345704306511-0.754050957195j)*o*x_ref[0]**(o-1)+((-0.198780842682+0.763553303091j))
+        ref[1, 1, 0, 1]=(0.410648218306-0.0939480470708j)*o*x_ref[1]**(o-1)+((0.944980315438-0.886698545506j))
+        arg[1, 1, 1]=(0.286975457072-0.299538050182j)*x[0]**o+((0.212592781882+0.117156653417j))*x[0]+((0.19647906058+0.863920516041j))*x[1]**o+((-0.0556507847004+0.507616760643j))*x[1]
+        ref[1, 1, 1, 0]=(0.286975457072-0.299538050182j)*o*x_ref[0]**(o-1)+((0.212592781882+0.117156653417j))
+        ref[1, 1, 1, 1]=(0.19647906058+0.863920516041j)*o*x_ref[1]**(o-1)+((-0.0556507847004+0.507616760643j))
+        arg[1, 1, 2]=(-0.140021720973-0.940057618827j)*x[0]**o+((-0.999371366689-0.453649847078j))*x[0]+((0.82433269888+0.418440194291j))*x[1]**o+((-0.943596038591-0.850291638137j))*x[1]
+        ref[1, 1, 2, 0]=(-0.140021720973-0.940057618827j)*o*x_ref[0]**(o-1)+((-0.999371366689-0.453649847078j))
+        ref[1, 1, 2, 1]=(0.82433269888+0.418440194291j)*o*x_ref[1]**(o-1)+((-0.943596038591-0.850291638137j))
+        arg[2, 0, 0]=(0.506201071042+0.980251720091j)*x[0]**o+((-0.538825608374-0.144444226823j))*x[0]+((0.283129481657-0.951815244635j))*x[1]**o+((0.370141537711+0.976153408267j))*x[1]
+        ref[2, 0, 0, 0]=(0.506201071042+0.980251720091j)*o*x_ref[0]**(o-1)+((-0.538825608374-0.144444226823j))
+        ref[2, 0, 0, 1]=(0.283129481657-0.951815244635j)*o*x_ref[1]**(o-1)+((0.370141537711+0.976153408267j))
+        arg[2, 0, 1]=(-0.550187349738-0.574541353901j)*x[0]**o+((-0.469362846815+0.881927244446j))*x[0]+((-0.746384694224+0.87557601922j))*x[1]**o+((0.885029111185-0.721672439652j))*x[1]
+        ref[2, 0, 1, 0]=(-0.550187349738-0.574541353901j)*o*x_ref[0]**(o-1)+((-0.469362846815+0.881927244446j))
+        ref[2, 0, 1, 1]=(-0.746384694224+0.87557601922j)*o*x_ref[1]**(o-1)+((0.885029111185-0.721672439652j))
+        arg[2, 0, 2]=(0.555201167431+0.283631243542j)*x[0]**o+((0.326334221487-0.28338434602j))*x[0]+((0.0263400723297-0.0712327668617j))*x[1]**o+((0.560739414811-0.852321028512j))*x[1]
+        ref[2, 0, 2, 0]=(0.555201167431+0.283631243542j)*o*x_ref[0]**(o-1)+((0.326334221487-0.28338434602j))
+        ref[2, 0, 2, 1]=(0.0263400723297-0.0712327668617j)*o*x_ref[1]**(o-1)+((0.560739414811-0.852321028512j))
+        arg[2, 1, 0]=(0.615006918598-0.0383639443995j)*x[0]**o+((0.892317953552-0.98905036692j))*x[0]+((0.15933626136-0.309488077502j))*x[1]**o+((-0.179408528881+0.839941303478j))*x[1]
+        ref[2, 1, 0, 0]=(0.615006918598-0.0383639443995j)*o*x_ref[0]**(o-1)+((0.892317953552-0.98905036692j))
+        ref[2, 1, 0, 1]=(0.15933626136-0.309488077502j)*o*x_ref[1]**(o-1)+((-0.179408528881+0.839941303478j))
+        arg[2, 1, 1]=(0.23181076167-0.341964190703j)*x[0]**o+((0.911458159287-0.486769291812j))*x[0]+((-0.427690872207+0.323693058251j))*x[1]**o+((0.433743375854-0.583779979186j))*x[1]
+        ref[2, 1, 1, 0]=(0.23181076167-0.341964190703j)*o*x_ref[0]**(o-1)+((0.911458159287-0.486769291812j))
+        ref[2, 1, 1, 1]=(-0.427690872207+0.323693058251j)*o*x_ref[1]**(o-1)+((0.433743375854-0.583779979186j))
+        arg[2, 1, 2]=(0.58445801196-0.15923414793j)*x[0]**o+((0.793041823429-0.793280728299j))*x[0]+((0.437148196826+0.763717252365j))*x[1]**o+((-0.116369573848-0.863357477893j))*x[1]
+        ref[2, 1, 2, 0]=(0.58445801196-0.15923414793j)*o*x_ref[0]**(o-1)+((0.793041823429-0.793280728299j))
+        ref[2, 1, 2, 1]=(0.437148196826+0.763717252365j)*o*x_ref[1]**(o-1)+((-0.116369573848-0.863357477893j))
+        arg[3, 0, 0]=(0.857966413285-0.32814855294j)*x[0]**o+((-0.266482072225-0.00994968472402j))*x[0]+((0.854355401645+0.024725385605j))*x[1]**o+((0.718444433016+0.321354374975j))*x[1]
+        ref[3, 0, 0, 0]=(0.857966413285-0.32814855294j)*o*x_ref[0]**(o-1)+((-0.266482072225-0.00994968472402j))
+        ref[3, 0, 0, 1]=(0.854355401645+0.024725385605j)*o*x_ref[1]**(o-1)+((0.718444433016+0.321354374975j))
+        arg[3, 0, 1]=(0.826178327196+0.134342954659j)*x[0]**o+((-0.227863183618-0.855727666349j))*x[0]+((0.610122327597-0.497021985773j))*x[1]**o+((-0.930083581582+0.587735953254j))*x[1]
+        ref[3, 0, 1, 0]=(0.826178327196+0.134342954659j)*o*x_ref[0]**(o-1)+((-0.227863183618-0.855727666349j))
+        ref[3, 0, 1, 1]=(0.610122327597-0.497021985773j)*o*x_ref[1]**(o-1)+((-0.930083581582+0.587735953254j))
+        arg[3, 0, 2]=(-0.700570011704-0.835022608876j)*x[0]**o+((0.290383149017-0.562064221794j))*x[0]+((0.739505848353+0.275895671982j))*x[1]**o+((0.203084920955-0.976197937731j))*x[1]
+        ref[3, 0, 2, 0]=(-0.700570011704-0.835022608876j)*o*x_ref[0]**(o-1)+((0.290383149017-0.562064221794j))
+        ref[3, 0, 2, 1]=(0.739505848353+0.275895671982j)*o*x_ref[1]**(o-1)+((0.203084920955-0.976197937731j))
+        arg[3, 1, 0]=(-0.0815718410174-0.693967675537j)*x[0]**o+((0.684378909132-0.106904096875j))*x[0]+((-0.0304616986569+0.500857305894j))*x[1]**o+((-0.588687763887-0.447358310386j))*x[1]
+        ref[3, 1, 0, 0]=(-0.0815718410174-0.693967675537j)*o*x_ref[0]**(o-1)+((0.684378909132-0.106904096875j))
+        ref[3, 1, 0, 1]=(-0.0304616986569+0.500857305894j)*o*x_ref[1]**(o-1)+((-0.588687763887-0.447358310386j))
+        arg[3, 1, 1]=(-0.114985716611+0.661115655448j)*x[0]**o+((0.439688796497-0.825944846639j))*x[0]+((0.963955054731-0.203457401529j))*x[1]**o+((-0.389322132673-0.668083281943j))*x[1]
+        ref[3, 1, 1, 0]=(-0.114985716611+0.661115655448j)*o*x_ref[0]**(o-1)+((0.439688796497-0.825944846639j))
+        ref[3, 1, 1, 1]=(0.963955054731-0.203457401529j)*o*x_ref[1]**(o-1)+((-0.389322132673-0.668083281943j))
+        arg[3, 1, 2]=(0.37456231794+0.67670132734j)*x[0]**o+((-0.510960723841+0.557086117757j))*x[0]+((0.311394885356-0.176507639899j))*x[1]**o+((0.961100570912+0.995592522194j))*x[1]
+        ref[3, 1, 2, 0]=(0.37456231794+0.67670132734j)*o*x_ref[0]**(o-1)+((-0.510960723841+0.557086117757j))
+        ref[3, 1, 2, 1]=(0.311394885356-0.176507639899j)*o*x_ref[1]**(o-1)+((0.961100570912+0.995592522194j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.479507917814-0.416623501714j)*x[2]**o+((-0.537710719748-0.0960143442828j))*x[2]
+            ref[0, 0, 0, 2]=(-0.479507917814-0.416623501714j)*o*x_ref[2]**(o-1)+((-0.537710719748-0.0960143442828j))
+            arg[0, 0, 1]+=(-0.986300074328-0.406420668165j)*x[2]**o+((0.233560388785+0.26403667604j))*x[2]
+            ref[0, 0, 1, 2]=(-0.986300074328-0.406420668165j)*o*x_ref[2]**(o-1)+((0.233560388785+0.26403667604j))
+            arg[0, 0, 2]+=(-0.348667693122-0.444952151698j)*x[2]**o+((0.936947825014-0.941338610095j))*x[2]
+            ref[0, 0, 2, 2]=(-0.348667693122-0.444952151698j)*o*x_ref[2]**(o-1)+((0.936947825014-0.941338610095j))
+            arg[0, 1, 0]+=(0.254149436975+0.929311082644j)*x[2]**o+((0.518994507843+0.577140735728j))*x[2]
+            ref[0, 1, 0, 2]=(0.254149436975+0.929311082644j)*o*x_ref[2]**(o-1)+((0.518994507843+0.577140735728j))
+            arg[0, 1, 1]+=(-0.020454072399-0.0975783872315j)*x[2]**o+((0.880170392526-0.405778936532j))*x[2]
+            ref[0, 1, 1, 2]=(-0.020454072399-0.0975783872315j)*o*x_ref[2]**(o-1)+((0.880170392526-0.405778936532j))
+            arg[0, 1, 2]+=(-0.201323844358+0.784597357634j)*x[2]**o+((0.607035602699+0.241491767784j))*x[2]
+            ref[0, 1, 2, 2]=(-0.201323844358+0.784597357634j)*o*x_ref[2]**(o-1)+((0.607035602699+0.241491767784j))
+            arg[1, 0, 0]+=(-0.0187991551647+0.938117334219j)*x[2]**o+((-0.878271980481-0.567930930812j))*x[2]
+            ref[1, 0, 0, 2]=(-0.0187991551647+0.938117334219j)*o*x_ref[2]**(o-1)+((-0.878271980481-0.567930930812j))
+            arg[1, 0, 1]+=(-0.574187963571-0.320386537533j)*x[2]**o+((-0.599472338638-0.336866488136j))*x[2]
+            ref[1, 0, 1, 2]=(-0.574187963571-0.320386537533j)*o*x_ref[2]**(o-1)+((-0.599472338638-0.336866488136j))
+            arg[1, 0, 2]+=(-0.292839942762+0.174632466425j)*x[2]**o+((0.218179618551-0.678161302497j))*x[2]
+            ref[1, 0, 2, 2]=(-0.292839942762+0.174632466425j)*o*x_ref[2]**(o-1)+((0.218179618551-0.678161302497j))
+            arg[1, 1, 0]+=(-0.874754147094-0.0891109279021j)*x[2]**o+((0.183917187044-0.454390292651j))*x[2]
+            ref[1, 1, 0, 2]=(-0.874754147094-0.0891109279021j)*o*x_ref[2]**(o-1)+((0.183917187044-0.454390292651j))
+            arg[1, 1, 1]+=(0.39802765828-0.29870449866j)*x[2]**o+((-0.844017117158-0.636000437063j))*x[2]
+            ref[1, 1, 1, 2]=(0.39802765828-0.29870449866j)*o*x_ref[2]**(o-1)+((-0.844017117158-0.636000437063j))
+            arg[1, 1, 2]+=(-0.686013459484+0.668117506782j)*x[2]**o+((0.11363503128+0.664492655269j))*x[2]
+            ref[1, 1, 2, 2]=(-0.686013459484+0.668117506782j)*o*x_ref[2]**(o-1)+((0.11363503128+0.664492655269j))
+            arg[2, 0, 0]+=(0.894012958653+0.85556945229j)*x[2]**o+((0.976132432513+0.103121572646j))*x[2]
+            ref[2, 0, 0, 2]=(0.894012958653+0.85556945229j)*o*x_ref[2]**(o-1)+((0.976132432513+0.103121572646j))
+            arg[2, 0, 1]+=(0.851035309568+0.158063739565j)*x[2]**o+((-0.684575376711+0.84671469361j))*x[2]
+            ref[2, 0, 1, 2]=(0.851035309568+0.158063739565j)*o*x_ref[2]**(o-1)+((-0.684575376711+0.84671469361j))
+            arg[2, 0, 2]+=(0.991790873585+0.477084187714j)*x[2]**o+((0.931302139797-0.437660010871j))*x[2]
+            ref[2, 0, 2, 2]=(0.991790873585+0.477084187714j)*o*x_ref[2]**(o-1)+((0.931302139797-0.437660010871j))
+            arg[2, 1, 0]+=(0.605619021172-0.944370479174j)*x[2]**o+((-0.645977095066+0.156583420869j))*x[2]
+            ref[2, 1, 0, 2]=(0.605619021172-0.944370479174j)*o*x_ref[2]**(o-1)+((-0.645977095066+0.156583420869j))
+            arg[2, 1, 1]+=(0.304407498429+0.549049700275j)*x[2]**o+((-0.191392332616+0.464936725594j))*x[2]
+            ref[2, 1, 1, 2]=(0.304407498429+0.549049700275j)*o*x_ref[2]**(o-1)+((-0.191392332616+0.464936725594j))
+            arg[2, 1, 2]+=(-0.784775353616+0.666759029942j)*x[2]**o+((-0.690558976987+0.863560591168j))*x[2]
+            ref[2, 1, 2, 2]=(-0.784775353616+0.666759029942j)*o*x_ref[2]**(o-1)+((-0.690558976987+0.863560591168j))
+            arg[3, 0, 0]+=(-0.191470684951+0.0995143241027j)*x[2]**o+((-0.504953905471-0.263213349832j))*x[2]
+            ref[3, 0, 0, 2]=(-0.191470684951+0.0995143241027j)*o*x_ref[2]**(o-1)+((-0.504953905471-0.263213349832j))
+            arg[3, 0, 1]+=(0.380112919589-0.350302692836j)*x[2]**o+((-0.516583558434+0.882241965239j))*x[2]
+            ref[3, 0, 1, 2]=(0.380112919589-0.350302692836j)*o*x_ref[2]**(o-1)+((-0.516583558434+0.882241965239j))
+            arg[3, 0, 2]+=(-0.466187411914+0.660829785848j)*x[2]**o+((0.655696198752+0.131855296618j))*x[2]
+            ref[3, 0, 2, 2]=(-0.466187411914+0.660829785848j)*o*x_ref[2]**(o-1)+((0.655696198752+0.131855296618j))
+            arg[3, 1, 0]+=(0.322269433737+0.976510572651j)*x[2]**o+((0.421938522728-0.780369796961j))*x[2]
+            ref[3, 1, 0, 2]=(0.322269433737+0.976510572651j)*o*x_ref[2]**(o-1)+((0.421938522728-0.780369796961j))
+            arg[3, 1, 1]+=(-0.410888240663-0.792654908877j)*x[2]**o+((-0.137012595657-0.605133440205j))*x[2]
+            ref[3, 1, 1, 2]=(-0.410888240663-0.792654908877j)*o*x_ref[2]**(o-1)+((-0.137012595657-0.605133440205j))
+            arg[3, 1, 2]+=(0.508401686122-0.351266424387j)*x[2]**o+((0.228842078214-0.322764270447j))*x[2]
+            ref[3, 1, 2, 2]=(0.508401686122-0.351266424387j)*o*x_ref[2]**(o-1)+((0.228842078214-0.322764270447j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.0357206952394+0.79697007626j)*x[0]**o+((0.0883468374497+0.604506426471j))*x[0]+((0.26345801919+0.401311911213j))*x[1]**o+((-0.778680555282-0.278210721796j))*x[1]
+        ref[0]=(-0.0357206952394+0.79697007626j)*o*x_ref[0]**(o-1)+((0.0883468374497+0.604506426471j))
+        ref[1]=(0.26345801919+0.401311911213j)*o*x_ref[1]**(o-1)+((-0.778680555282-0.278210721796j))
+        if dim==3:
+            arg+=((-0.980706625806+0.385734040741j))*x[2]**o+((-0.0141693532817+0.198283953512j))*x[2]
+            ref[2]=(-0.980706625806+0.385734040741j)*o*x_ref[2]**(o-1)+((-0.0141693532817+0.198283953512j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(0.599422349904+0.206696279896j)*x[0]**o+((-0.737883913326+0.858222353759j))*x[0]+((0.231316078054+0.630159734784j))*x[1]**o+((0.655959214438+0.114400373055j))*x[1]
+        ref[0, 0]=(0.599422349904+0.206696279896j)*o*x_ref[0]**(o-1)+((-0.737883913326+0.858222353759j))
+        ref[0, 1]=(0.231316078054+0.630159734784j)*o*x_ref[1]**(o-1)+((0.655959214438+0.114400373055j))
+        arg[1,]=(0.238258392384+0.251982227746j)*x[0]**o+((0.470803876829-0.980096492722j))*x[0]+((0.940777752396-0.786041735441j))*x[1]**o+((0.564247116857-0.541553233565j))*x[1]
+        ref[1, 0]=(0.238258392384+0.251982227746j)*o*x_ref[0]**(o-1)+((0.470803876829-0.980096492722j))
+        ref[1, 1]=(0.940777752396-0.786041735441j)*o*x_ref[1]**(o-1)+((0.564247116857-0.541553233565j))
+        arg[2,]=(0.967923458504+0.0722604589464j)*x[0]**o+((0.807186014726-0.956144129591j))*x[0]+((-0.795182576453+0.929440590363j))*x[1]**o+((0.757357054162-0.266349979263j))*x[1]
+        ref[2, 0]=(0.967923458504+0.0722604589464j)*o*x_ref[0]**(o-1)+((0.807186014726-0.956144129591j))
+        ref[2, 1]=(-0.795182576453+0.929440590363j)*o*x_ref[1]**(o-1)+((0.757357054162-0.266349979263j))
+        arg[3,]=(-0.189361592693-0.129535794999j)*x[0]**o+((0.607223019058+0.718521078347j))*x[0]+((-0.69903215647-0.62533202686j))*x[1]**o+((0.594363271098+0.898468945833j))*x[1]
+        ref[3, 0]=(-0.189361592693-0.129535794999j)*o*x_ref[0]**(o-1)+((0.607223019058+0.718521078347j))
+        ref[3, 1]=(-0.69903215647-0.62533202686j)*o*x_ref[1]**(o-1)+((0.594363271098+0.898468945833j))
+        if dim==3:
+            arg[0,]+=(0.81102615007+0.577032683812j)*x[2]**o+((-0.783025634863-0.313615701661j))*x[2]
+            ref[0, 2]=(0.81102615007+0.577032683812j)*o*x_ref[2]**(o-1)+((-0.783025634863-0.313615701661j))
+            arg[1,]+=(0.712531272355-0.570996796403j)*x[2]**o+((-0.627783863098+0.535462259198j))*x[2]
+            ref[1, 2]=(0.712531272355-0.570996796403j)*o*x_ref[2]**(o-1)+((-0.627783863098+0.535462259198j))
+            arg[2,]+=(0.615268523031-0.429917866518j)*x[2]**o+((-0.380288841227+0.379159540438j))*x[2]
+            ref[2, 2]=(0.615268523031-0.429917866518j)*o*x_ref[2]**(o-1)+((-0.380288841227+0.379159540438j))
+            arg[3,]+=(-0.267970990236+0.275161537749j)*x[2]**o+((0.487061536906+0.908323269854j))*x[2]
+            ref[3, 2]=(-0.267970990236+0.275161537749j)*o*x_ref[2]**(o-1)+((0.487061536906+0.908323269854j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.787802739012+0.165050382782j)*x[0]**o+((0.286120426632+0.52003491086j))*x[0]+((0.405811182601+0.828279363136j))*x[1]**o+((-0.265021251218-0.705627690476j))*x[1]
+        ref[0, 0, 0]=(-0.787802739012+0.165050382782j)*o*x_ref[0]**(o-1)+((0.286120426632+0.52003491086j))
+        ref[0, 0, 1]=(0.405811182601+0.828279363136j)*o*x_ref[1]**(o-1)+((-0.265021251218-0.705627690476j))
+        arg[0, 1]=(0.513273676115+0.771988712727j)*x[0]**o+((0.984013857846-0.287786849679j))*x[0]+((-0.458375789972+0.157286736091j))*x[1]**o+((0.39557844107-0.853795140107j))*x[1]
+        ref[0, 1, 0]=(0.513273676115+0.771988712727j)*o*x_ref[0]**(o-1)+((0.984013857846-0.287786849679j))
+        ref[0, 1, 1]=(-0.458375789972+0.157286736091j)*o*x_ref[1]**(o-1)+((0.39557844107-0.853795140107j))
+        arg[1, 0]=(0.856123501116+0.280243020347j)*x[0]**o+((-0.0823837505423-0.8371080653j))*x[0]+((-0.643412873383-0.00865739579688j))*x[1]**o+((0.207761042925+0.470141021762j))*x[1]
+        ref[1, 0, 0]=(0.856123501116+0.280243020347j)*o*x_ref[0]**(o-1)+((-0.0823837505423-0.8371080653j))
+        ref[1, 0, 1]=(-0.643412873383-0.00865739579688j)*o*x_ref[1]**(o-1)+((0.207761042925+0.470141021762j))
+        arg[1, 1]=(-0.131010703809-0.941126038538j)*x[0]**o+((0.352602311493-0.0960237526643j))*x[0]+((-0.293844265274-0.618619096844j))*x[1]**o+((-0.783213724701-0.774675117458j))*x[1]
+        ref[1, 1, 0]=(-0.131010703809-0.941126038538j)*o*x_ref[0]**(o-1)+((0.352602311493-0.0960237526643j))
+        ref[1, 1, 1]=(-0.293844265274-0.618619096844j)*o*x_ref[1]**(o-1)+((-0.783213724701-0.774675117458j))
+        arg[2, 0]=(-0.892388894137-0.469660703357j)*x[0]**o+((0.839470524642-0.860435082808j))*x[0]+((-0.340981185026-0.428985550434j))*x[1]**o+((0.456546151699-0.136072127825j))*x[1]
+        ref[2, 0, 0]=(-0.892388894137-0.469660703357j)*o*x_ref[0]**(o-1)+((0.839470524642-0.860435082808j))
+        ref[2, 0, 1]=(-0.340981185026-0.428985550434j)*o*x_ref[1]**(o-1)+((0.456546151699-0.136072127825j))
+        arg[2, 1]=(0.443914221534+0.763547693981j)*x[0]**o+((-0.458619338785-0.242163532083j))*x[0]+((0.493144409228-0.486480922386j))*x[1]**o+((-0.56356169486-0.503744219881j))*x[1]
+        ref[2, 1, 0]=(0.443914221534+0.763547693981j)*o*x_ref[0]**(o-1)+((-0.458619338785-0.242163532083j))
+        ref[2, 1, 1]=(0.493144409228-0.486480922386j)*o*x_ref[1]**(o-1)+((-0.56356169486-0.503744219881j))
+        if dim==3:
+            arg[0, 0]+=(-0.893606575023-0.439536422295j)*x[2]**o+((0.187615941268-0.385628219458j))*x[2]
+            ref[0, 0, 2]=(-0.893606575023-0.439536422295j)*o*x_ref[2]**(o-1)+((0.187615941268-0.385628219458j))
+            arg[0, 1]+=(-0.790956572469+0.418644926877j)*x[2]**o+((0.684300482459-0.844144609353j))*x[2]
+            ref[0, 1, 2]=(-0.790956572469+0.418644926877j)*o*x_ref[2]**(o-1)+((0.684300482459-0.844144609353j))
+            arg[1, 0]+=(0.59131973456-0.568087631625j)*x[2]**o+((0.225319671688+0.266338996481j))*x[2]
+            ref[1, 0, 2]=(0.59131973456-0.568087631625j)*o*x_ref[2]**(o-1)+((0.225319671688+0.266338996481j))
+            arg[1, 1]+=(-0.753057144348+0.20977698141j)*x[2]**o+((-0.369387420239+0.28301685328j))*x[2]
+            ref[1, 1, 2]=(-0.753057144348+0.20977698141j)*o*x_ref[2]**(o-1)+((-0.369387420239+0.28301685328j))
+            arg[2, 0]+=(-0.371628632065-0.411636989624j)*x[2]**o+((-0.785514299194+0.651449753025j))*x[2]
+            ref[2, 0, 2]=(-0.371628632065-0.411636989624j)*o*x_ref[2]**(o-1)+((-0.785514299194+0.651449753025j))
+            arg[2, 1]+=(0.469692005079-0.924495671604j)*x[2]**o+((-0.0212296150048+0.186550557388j))*x[2]
+            ref[2, 1, 2]=(0.469692005079-0.924495671604j)*o*x_ref[2]**(o-1)+((-0.0212296150048+0.186550557388j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2),w)
+        ref = Data(0,(4, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.083172570342-0.700618951915j)*x[0]**o+((-0.477142189003+0.343387515152j))*x[0]+((0.103260026788+0.410478101437j))*x[1]**o+((-0.142277954017+0.783719410149j))*x[1]
+        ref[0, 0, 0, 0]=(0.083172570342-0.700618951915j)*o*x_ref[0]**(o-1)+((-0.477142189003+0.343387515152j))
+        ref[0, 0, 0, 1]=(0.103260026788+0.410478101437j)*o*x_ref[1]**(o-1)+((-0.142277954017+0.783719410149j))
+        arg[0, 0, 1]=(0.0411225211423+0.245323823668j)*x[0]**o+((0.54974505581-0.446557933945j))*x[0]+((-0.903200537406+0.660195538061j))*x[1]**o+((0.590576895356-0.605979515237j))*x[1]
+        ref[0, 0, 1, 0]=(0.0411225211423+0.245323823668j)*o*x_ref[0]**(o-1)+((0.54974505581-0.446557933945j))
+        ref[0, 0, 1, 1]=(-0.903200537406+0.660195538061j)*o*x_ref[1]**(o-1)+((0.590576895356-0.605979515237j))
+        arg[0, 1, 0]=(0.716270879882-0.113317544257j)*x[0]**o+((-0.424088241921-0.173861337606j))*x[0]+((-0.405689655298-0.712418988106j))*x[1]**o+((-0.956693446252-0.696826152724j))*x[1]
+        ref[0, 1, 0, 0]=(0.716270879882-0.113317544257j)*o*x_ref[0]**(o-1)+((-0.424088241921-0.173861337606j))
+        ref[0, 1, 0, 1]=(-0.405689655298-0.712418988106j)*o*x_ref[1]**(o-1)+((-0.956693446252-0.696826152724j))
+        arg[0, 1, 1]=(-0.302663879577-0.944983742295j)*x[0]**o+((-0.971363141991-0.299630404088j))*x[0]+((0.705134533893+0.946855438454j))*x[1]**o+((0.976869163927-0.606516211742j))*x[1]
+        ref[0, 1, 1, 0]=(-0.302663879577-0.944983742295j)*o*x_ref[0]**(o-1)+((-0.971363141991-0.299630404088j))
+        ref[0, 1, 1, 1]=(0.705134533893+0.946855438454j)*o*x_ref[1]**(o-1)+((0.976869163927-0.606516211742j))
+        arg[0, 2, 0]=(0.604453313209-0.864768517068j)*x[0]**o+((-0.81351423358-0.68790578225j))*x[0]+((-0.44172643519-0.0782990628871j))*x[1]**o+((0.756407433623-0.403922756916j))*x[1]
+        ref[0, 2, 0, 0]=(0.604453313209-0.864768517068j)*o*x_ref[0]**(o-1)+((-0.81351423358-0.68790578225j))
+        ref[0, 2, 0, 1]=(-0.44172643519-0.0782990628871j)*o*x_ref[1]**(o-1)+((0.756407433623-0.403922756916j))
+        arg[0, 2, 1]=(-0.466246039639-0.0933743024383j)*x[0]**o+((-0.100757519293+0.43699960662j))*x[0]+((0.590800995206+0.0469733326444j))*x[1]**o+((0.159186455158+0.0284019342224j))*x[1]
+        ref[0, 2, 1, 0]=(-0.466246039639-0.0933743024383j)*o*x_ref[0]**(o-1)+((-0.100757519293+0.43699960662j))
+        ref[0, 2, 1, 1]=(0.590800995206+0.0469733326444j)*o*x_ref[1]**(o-1)+((0.159186455158+0.0284019342224j))
+        arg[0, 3, 0]=(-0.961922694254+0.463420781116j)*x[0]**o+((0.18315101057+0.569372180403j))*x[0]+((-0.258551485068-0.653865266602j))*x[1]**o+((0.872905468263+0.208952047022j))*x[1]
+        ref[0, 3, 0, 0]=(-0.961922694254+0.463420781116j)*o*x_ref[0]**(o-1)+((0.18315101057+0.569372180403j))
+        ref[0, 3, 0, 1]=(-0.258551485068-0.653865266602j)*o*x_ref[1]**(o-1)+((0.872905468263+0.208952047022j))
+        arg[0, 3, 1]=(-0.290851213313-0.124807730776j)*x[0]**o+((0.658711315077-0.873387082982j))*x[0]+((-0.980228380863+0.599919733905j))*x[1]**o+((0.181039906274-0.0354593573011j))*x[1]
+        ref[0, 3, 1, 0]=(-0.290851213313-0.124807730776j)*o*x_ref[0]**(o-1)+((0.658711315077-0.873387082982j))
+        ref[0, 3, 1, 1]=(-0.980228380863+0.599919733905j)*o*x_ref[1]**(o-1)+((0.181039906274-0.0354593573011j))
+        arg[1, 0, 0]=(-0.725086978583-0.0130641901011j)*x[0]**o+((0.522676000105-0.492241114869j))*x[0]+((0.865656791211-0.847816324694j))*x[1]**o+((0.38881053906+0.615232774698j))*x[1]
+        ref[1, 0, 0, 0]=(-0.725086978583-0.0130641901011j)*o*x_ref[0]**(o-1)+((0.522676000105-0.492241114869j))
+        ref[1, 0, 0, 1]=(0.865656791211-0.847816324694j)*o*x_ref[1]**(o-1)+((0.38881053906+0.615232774698j))
+        arg[1, 0, 1]=(0.252164389347-0.330320019311j)*x[0]**o+((0.378365682643-0.23527814392j))*x[0]+((0.921143721123+0.0184386786551j))*x[1]**o+((-0.562962887108+0.360361870028j))*x[1]
+        ref[1, 0, 1, 0]=(0.252164389347-0.330320019311j)*o*x_ref[0]**(o-1)+((0.378365682643-0.23527814392j))
+        ref[1, 0, 1, 1]=(0.921143721123+0.0184386786551j)*o*x_ref[1]**(o-1)+((-0.562962887108+0.360361870028j))
+        arg[1, 1, 0]=(0.910897841416+0.0473623060888j)*x[0]**o+((0.803988859428+0.80751670191j))*x[0]+((-0.0339537684625+0.0259286551861j))*x[1]**o+((-0.412148343312+0.0786598618443j))*x[1]
+        ref[1, 1, 0, 0]=(0.910897841416+0.0473623060888j)*o*x_ref[0]**(o-1)+((0.803988859428+0.80751670191j))
+        ref[1, 1, 0, 1]=(-0.0339537684625+0.0259286551861j)*o*x_ref[1]**(o-1)+((-0.412148343312+0.0786598618443j))
+        arg[1, 1, 1]=(0.585571241007+0.136786327295j)*x[0]**o+((-0.924419968844-0.35482093073j))*x[0]+((-0.170273341071+0.96350837274j))*x[1]**o+((0.412059788459+0.773649691577j))*x[1]
+        ref[1, 1, 1, 0]=(0.585571241007+0.136786327295j)*o*x_ref[0]**(o-1)+((-0.924419968844-0.35482093073j))
+        ref[1, 1, 1, 1]=(-0.170273341071+0.96350837274j)*o*x_ref[1]**(o-1)+((0.412059788459+0.773649691577j))
+        arg[1, 2, 0]=(0.160103156419+0.320452935716j)*x[0]**o+((-0.22514561446+0.526484102142j))*x[0]+((-0.199805911348-0.797001943137j))*x[1]**o+((0.914373826675+0.306537509453j))*x[1]
+        ref[1, 2, 0, 0]=(0.160103156419+0.320452935716j)*o*x_ref[0]**(o-1)+((-0.22514561446+0.526484102142j))
+        ref[1, 2, 0, 1]=(-0.199805911348-0.797001943137j)*o*x_ref[1]**(o-1)+((0.914373826675+0.306537509453j))
+        arg[1, 2, 1]=(0.69770521178-0.569924864125j)*x[0]**o+((-0.21781273078-0.513501729188j))*x[0]+((-0.78152129835+0.17731116268j))*x[1]**o+((0.404324059665+0.476313066414j))*x[1]
+        ref[1, 2, 1, 0]=(0.69770521178-0.569924864125j)*o*x_ref[0]**(o-1)+((-0.21781273078-0.513501729188j))
+        ref[1, 2, 1, 1]=(-0.78152129835+0.17731116268j)*o*x_ref[1]**(o-1)+((0.404324059665+0.476313066414j))
+        arg[1, 3, 0]=(0.857404363795-0.800517941825j)*x[0]**o+((-0.790214353545-0.754347031575j))*x[0]+((0.776456783705+0.64805641233j))*x[1]**o+((0.552309779648+0.459052131256j))*x[1]
+        ref[1, 3, 0, 0]=(0.857404363795-0.800517941825j)*o*x_ref[0]**(o-1)+((-0.790214353545-0.754347031575j))
+        ref[1, 3, 0, 1]=(0.776456783705+0.64805641233j)*o*x_ref[1]**(o-1)+((0.552309779648+0.459052131256j))
+        arg[1, 3, 1]=(-0.836653332665-0.608797287355j)*x[0]**o+((-0.0538886491753-0.27515993931j))*x[0]+((0.269333157965+0.855766847147j))*x[1]**o+((0.455358612481+0.37194729806j))*x[1]
+        ref[1, 3, 1, 0]=(-0.836653332665-0.608797287355j)*o*x_ref[0]**(o-1)+((-0.0538886491753-0.27515993931j))
+        ref[1, 3, 1, 1]=(0.269333157965+0.855766847147j)*o*x_ref[1]**(o-1)+((0.455358612481+0.37194729806j))
+        arg[2, 0, 0]=(0.484618996764-0.0919303719971j)*x[0]**o+((0.485167483685-0.389189935126j))*x[0]+((-0.764674114315+0.0902305434367j))*x[1]**o+((0.802306132336+0.24026818244j))*x[1]
+        ref[2, 0, 0, 0]=(0.484618996764-0.0919303719971j)*o*x_ref[0]**(o-1)+((0.485167483685-0.389189935126j))
+        ref[2, 0, 0, 1]=(-0.764674114315+0.0902305434367j)*o*x_ref[1]**(o-1)+((0.802306132336+0.24026818244j))
+        arg[2, 0, 1]=(-0.0147991398348-0.64590662076j)*x[0]**o+((-0.157064696014-0.151494487816j))*x[0]+((-0.548490211519-0.937977800924j))*x[1]**o+((0.886813250157-0.501219168054j))*x[1]
+        ref[2, 0, 1, 0]=(-0.0147991398348-0.64590662076j)*o*x_ref[0]**(o-1)+((-0.157064696014-0.151494487816j))
+        ref[2, 0, 1, 1]=(-0.548490211519-0.937977800924j)*o*x_ref[1]**(o-1)+((0.886813250157-0.501219168054j))
+        arg[2, 1, 0]=(-0.0023007913641-0.00712432504431j)*x[0]**o+((-0.736802080897-0.664137929527j))*x[0]+((0.535386621446+0.614247641387j))*x[1]**o+((-0.891621881428-0.413006859625j))*x[1]
+        ref[2, 1, 0, 0]=(-0.0023007913641-0.00712432504431j)*o*x_ref[0]**(o-1)+((-0.736802080897-0.664137929527j))
+        ref[2, 1, 0, 1]=(0.535386621446+0.614247641387j)*o*x_ref[1]**(o-1)+((-0.891621881428-0.413006859625j))
+        arg[2, 1, 1]=(0.459044627223+0.713025321989j)*x[0]**o+((0.0243749816416+0.399776701482j))*x[0]+((-0.0258594674622+0.886214570341j))*x[1]**o+((0.603309810104+0.816391380841j))*x[1]
+        ref[2, 1, 1, 0]=(0.459044627223+0.713025321989j)*o*x_ref[0]**(o-1)+((0.0243749816416+0.399776701482j))
+        ref[2, 1, 1, 1]=(-0.0258594674622+0.886214570341j)*o*x_ref[1]**(o-1)+((0.603309810104+0.816391380841j))
+        arg[2, 2, 0]=(-0.48458049697-0.242591455911j)*x[0]**o+((0.00197330287047+0.0694303238795j))*x[0]+((-0.0987419671875-0.159022249369j))*x[1]**o+((0.216334857821+0.0290765904728j))*x[1]
+        ref[2, 2, 0, 0]=(-0.48458049697-0.242591455911j)*o*x_ref[0]**(o-1)+((0.00197330287047+0.0694303238795j))
+        ref[2, 2, 0, 1]=(-0.0987419671875-0.159022249369j)*o*x_ref[1]**(o-1)+((0.216334857821+0.0290765904728j))
+        arg[2, 2, 1]=(0.516394020409+0.0547859500105j)*x[0]**o+((0.161718093044-0.195739464177j))*x[0]+((0.737859832529-0.938671869577j))*x[1]**o+((-0.348256898051-0.989435772286j))*x[1]
+        ref[2, 2, 1, 0]=(0.516394020409+0.0547859500105j)*o*x_ref[0]**(o-1)+((0.161718093044-0.195739464177j))
+        ref[2, 2, 1, 1]=(0.737859832529-0.938671869577j)*o*x_ref[1]**(o-1)+((-0.348256898051-0.989435772286j))
+        arg[2, 3, 0]=(-0.545095594352+0.67132625255j)*x[0]**o+((-0.101583530873+0.360481199654j))*x[0]+((-0.118324790717-0.392925537343j))*x[1]**o+((0.590228243164-0.45938496413j))*x[1]
+        ref[2, 3, 0, 0]=(-0.545095594352+0.67132625255j)*o*x_ref[0]**(o-1)+((-0.101583530873+0.360481199654j))
+        ref[2, 3, 0, 1]=(-0.118324790717-0.392925537343j)*o*x_ref[1]**(o-1)+((0.590228243164-0.45938496413j))
+        arg[2, 3, 1]=(-0.112513914176-0.332000468986j)*x[0]**o+((-0.823634101644-0.0385483680359j))*x[0]+((0.675704298817-0.0661430935894j))*x[1]**o+((-0.596018418434-0.0475113326502j))*x[1]
+        ref[2, 3, 1, 0]=(-0.112513914176-0.332000468986j)*o*x_ref[0]**(o-1)+((-0.823634101644-0.0385483680359j))
+        ref[2, 3, 1, 1]=(0.675704298817-0.0661430935894j)*o*x_ref[1]**(o-1)+((-0.596018418434-0.0475113326502j))
+        arg[3, 0, 0]=(-0.504749317447+0.054247837761j)*x[0]**o+((-0.883603628794+0.137965574031j))*x[0]+((-0.297762754695+0.240138624631j))*x[1]**o+((0.998926710662+0.783520473783j))*x[1]
+        ref[3, 0, 0, 0]=(-0.504749317447+0.054247837761j)*o*x_ref[0]**(o-1)+((-0.883603628794+0.137965574031j))
+        ref[3, 0, 0, 1]=(-0.297762754695+0.240138624631j)*o*x_ref[1]**(o-1)+((0.998926710662+0.783520473783j))
+        arg[3, 0, 1]=(-0.699096249913-0.57568326774j)*x[0]**o+((-0.975286863777-0.680646651286j))*x[0]+((0.489966586987+0.133551445694j))*x[1]**o+((-0.989415997263-0.785098848725j))*x[1]
+        ref[3, 0, 1, 0]=(-0.699096249913-0.57568326774j)*o*x_ref[0]**(o-1)+((-0.975286863777-0.680646651286j))
+        ref[3, 0, 1, 1]=(0.489966586987+0.133551445694j)*o*x_ref[1]**(o-1)+((-0.989415997263-0.785098848725j))
+        arg[3, 1, 0]=(0.64126510336-0.541320730449j)*x[0]**o+((-0.35423059661-0.0664713671658j))*x[0]+((-0.833328300981-0.162463573899j))*x[1]**o+((-0.415306781545+0.515371880153j))*x[1]
+        ref[3, 1, 0, 0]=(0.64126510336-0.541320730449j)*o*x_ref[0]**(o-1)+((-0.35423059661-0.0664713671658j))
+        ref[3, 1, 0, 1]=(-0.833328300981-0.162463573899j)*o*x_ref[1]**(o-1)+((-0.415306781545+0.515371880153j))
+        arg[3, 1, 1]=(0.838552797573-0.981328620833j)*x[0]**o+((0.148449508048+0.94596170266j))*x[0]+((-0.749696232929+0.47475264037j))*x[1]**o+((-0.272005616615-0.475333742994j))*x[1]
+        ref[3, 1, 1, 0]=(0.838552797573-0.981328620833j)*o*x_ref[0]**(o-1)+((0.148449508048+0.94596170266j))
+        ref[3, 1, 1, 1]=(-0.749696232929+0.47475264037j)*o*x_ref[1]**(o-1)+((-0.272005616615-0.475333742994j))
+        arg[3, 2, 0]=(-0.122087305998+0.559553232327j)*x[0]**o+((0.440198490194-0.620348054694j))*x[0]+((0.309953736006-0.877475533251j))*x[1]**o+((0.684451221454-0.323981343706j))*x[1]
+        ref[3, 2, 0, 0]=(-0.122087305998+0.559553232327j)*o*x_ref[0]**(o-1)+((0.440198490194-0.620348054694j))
+        ref[3, 2, 0, 1]=(0.309953736006-0.877475533251j)*o*x_ref[1]**(o-1)+((0.684451221454-0.323981343706j))
+        arg[3, 2, 1]=(0.347877070343-0.769266653133j)*x[0]**o+((-0.994001038546+0.343735148208j))*x[0]+((0.11782638854-0.318878084828j))*x[1]**o+((0.542398867512+0.60895622743j))*x[1]
+        ref[3, 2, 1, 0]=(0.347877070343-0.769266653133j)*o*x_ref[0]**(o-1)+((-0.994001038546+0.343735148208j))
+        ref[3, 2, 1, 1]=(0.11782638854-0.318878084828j)*o*x_ref[1]**(o-1)+((0.542398867512+0.60895622743j))
+        arg[3, 3, 0]=(-0.356419308762+0.0876459223219j)*x[0]**o+((0.744481624517+0.0921399236724j))*x[0]+((0.533817049488+0.711411207222j))*x[1]**o+((-0.950214358452-0.695109316976j))*x[1]
+        ref[3, 3, 0, 0]=(-0.356419308762+0.0876459223219j)*o*x_ref[0]**(o-1)+((0.744481624517+0.0921399236724j))
+        ref[3, 3, 0, 1]=(0.533817049488+0.711411207222j)*o*x_ref[1]**(o-1)+((-0.950214358452-0.695109316976j))
+        arg[3, 3, 1]=(0.912324745211-0.23199376618j)*x[0]**o+((-0.296011357792-0.702655513732j))*x[0]+((0.00142372874638+0.0712269276197j))*x[1]**o+((0.795948058708-0.494629641166j))*x[1]
+        ref[3, 3, 1, 0]=(0.912324745211-0.23199376618j)*o*x_ref[0]**(o-1)+((-0.296011357792-0.702655513732j))
+        ref[3, 3, 1, 1]=(0.00142372874638+0.0712269276197j)*o*x_ref[1]**(o-1)+((0.795948058708-0.494629641166j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.62471697835+0.249783193786j)*x[2]**o+((-0.153161804542+0.496949694597j))*x[2]
+            ref[0, 0, 0, 2]=(0.62471697835+0.249783193786j)*o*x_ref[2]**(o-1)+((-0.153161804542+0.496949694597j))
+            arg[0, 0, 1]+=(-0.948743604827+0.575809428052j)*x[2]**o+((-0.740262919106-0.810928437948j))*x[2]
+            ref[0, 0, 1, 2]=(-0.948743604827+0.575809428052j)*o*x_ref[2]**(o-1)+((-0.740262919106-0.810928437948j))
+            arg[0, 1, 0]+=(-0.707611941191-0.645095811659j)*x[2]**o+((-0.451015429566+0.610661027908j))*x[2]
+            ref[0, 1, 0, 2]=(-0.707611941191-0.645095811659j)*o*x_ref[2]**(o-1)+((-0.451015429566+0.610661027908j))
+            arg[0, 1, 1]+=(-0.0990878542448+0.724406621022j)*x[2]**o+((-0.722566026698-0.388650255053j))*x[2]
+            ref[0, 1, 1, 2]=(-0.0990878542448+0.724406621022j)*o*x_ref[2]**(o-1)+((-0.722566026698-0.388650255053j))
+            arg[0, 2, 0]+=(0.443702599897-0.0658011265341j)*x[2]**o+((-0.659761709883+0.592346564254j))*x[2]
+            ref[0, 2, 0, 2]=(0.443702599897-0.0658011265341j)*o*x_ref[2]**(o-1)+((-0.659761709883+0.592346564254j))
+            arg[0, 2, 1]+=(-0.876202669774+0.783304159891j)*x[2]**o+((-0.82268656174-0.380644748684j))*x[2]
+            ref[0, 2, 1, 2]=(-0.876202669774+0.783304159891j)*o*x_ref[2]**(o-1)+((-0.82268656174-0.380644748684j))
+            arg[0, 3, 0]+=(0.572737051088-0.624796059658j)*x[2]**o+((-0.405025322084+0.576945491063j))*x[2]
+            ref[0, 3, 0, 2]=(0.572737051088-0.624796059658j)*o*x_ref[2]**(o-1)+((-0.405025322084+0.576945491063j))
+            arg[0, 3, 1]+=(0.871986574497-0.844499994007j)*x[2]**o+((0.594181321917-0.501296173044j))*x[2]
+            ref[0, 3, 1, 2]=(0.871986574497-0.844499994007j)*o*x_ref[2]**(o-1)+((0.594181321917-0.501296173044j))
+            arg[1, 0, 0]+=(-0.0883044708954+0.83532350068j)*x[2]**o+((0.539817747876+0.617377535299j))*x[2]
+            ref[1, 0, 0, 2]=(-0.0883044708954+0.83532350068j)*o*x_ref[2]**(o-1)+((0.539817747876+0.617377535299j))
+            arg[1, 0, 1]+=(0.34142193363-0.670205169529j)*x[2]**o+((0.238164161891+0.890662125553j))*x[2]
+            ref[1, 0, 1, 2]=(0.34142193363-0.670205169529j)*o*x_ref[2]**(o-1)+((0.238164161891+0.890662125553j))
+            arg[1, 1, 0]+=(-0.473489378112+0.041610554343j)*x[2]**o+((-0.149851058618-0.361435184436j))*x[2]
+            ref[1, 1, 0, 2]=(-0.473489378112+0.041610554343j)*o*x_ref[2]**(o-1)+((-0.149851058618-0.361435184436j))
+            arg[1, 1, 1]+=(-0.836702883608-0.921755153001j)*x[2]**o+((-0.0309699799645-0.623000595882j))*x[2]
+            ref[1, 1, 1, 2]=(-0.836702883608-0.921755153001j)*o*x_ref[2]**(o-1)+((-0.0309699799645-0.623000595882j))
+            arg[1, 2, 0]+=(-0.118043599615-0.0384582653234j)*x[2]**o+((-0.31072868108+0.910214838652j))*x[2]
+            ref[1, 2, 0, 2]=(-0.118043599615-0.0384582653234j)*o*x_ref[2]**(o-1)+((-0.31072868108+0.910214838652j))
+            arg[1, 2, 1]+=(0.998466425602+0.916256763847j)*x[2]**o+((-0.770558558565+0.0845818444348j))*x[2]
+            ref[1, 2, 1, 2]=(0.998466425602+0.916256763847j)*o*x_ref[2]**(o-1)+((-0.770558558565+0.0845818444348j))
+            arg[1, 3, 0]+=(-0.595030417589-0.255328381826j)*x[2]**o+((0.226638615937+0.910529227819j))*x[2]
+            ref[1, 3, 0, 2]=(-0.595030417589-0.255328381826j)*o*x_ref[2]**(o-1)+((0.226638615937+0.910529227819j))
+            arg[1, 3, 1]+=(0.337521126562-0.768465673253j)*x[2]**o+((0.329764729145+0.263285881094j))*x[2]
+            ref[1, 3, 1, 2]=(0.337521126562-0.768465673253j)*o*x_ref[2]**(o-1)+((0.329764729145+0.263285881094j))
+            arg[2, 0, 0]+=(0.0558485829528-0.268272073532j)*x[2]**o+((0.361270791328-0.887147611675j))*x[2]
+            ref[2, 0, 0, 2]=(0.0558485829528-0.268272073532j)*o*x_ref[2]**(o-1)+((0.361270791328-0.887147611675j))
+            arg[2, 0, 1]+=(-0.375122992941-0.403769487733j)*x[2]**o+((0.658621468217-0.501535308709j))*x[2]
+            ref[2, 0, 1, 2]=(-0.375122992941-0.403769487733j)*o*x_ref[2]**(o-1)+((0.658621468217-0.501535308709j))
+            arg[2, 1, 0]+=(-0.459856711779-0.979222903032j)*x[2]**o+((0.41922399329+0.278651923968j))*x[2]
+            ref[2, 1, 0, 2]=(-0.459856711779-0.979222903032j)*o*x_ref[2]**(o-1)+((0.41922399329+0.278651923968j))
+            arg[2, 1, 1]+=(0.761550869278+0.194517240038j)*x[2]**o+((-0.367872461852+0.119505489876j))*x[2]
+            ref[2, 1, 1, 2]=(0.761550869278+0.194517240038j)*o*x_ref[2]**(o-1)+((-0.367872461852+0.119505489876j))
+            arg[2, 2, 0]+=(0.635294708343-0.657936080119j)*x[2]**o+((0.866623221884+0.819445555557j))*x[2]
+            ref[2, 2, 0, 2]=(0.635294708343-0.657936080119j)*o*x_ref[2]**(o-1)+((0.866623221884+0.819445555557j))
+            arg[2, 2, 1]+=(-0.377835691984-0.06107560841j)*x[2]**o+((-0.964515416994+0.434884476708j))*x[2]
+            ref[2, 2, 1, 2]=(-0.377835691984-0.06107560841j)*o*x_ref[2]**(o-1)+((-0.964515416994+0.434884476708j))
+            arg[2, 3, 0]+=(0.915493569266+0.753254776416j)*x[2]**o+((0.158950160024+0.852382195016j))*x[2]
+            ref[2, 3, 0, 2]=(0.915493569266+0.753254776416j)*o*x_ref[2]**(o-1)+((0.158950160024+0.852382195016j))
+            arg[2, 3, 1]+=(-0.0336712113531-0.281977712001j)*x[2]**o+((0.998272592598-0.267716392545j))*x[2]
+            ref[2, 3, 1, 2]=(-0.0336712113531-0.281977712001j)*o*x_ref[2]**(o-1)+((0.998272592598-0.267716392545j))
+            arg[3, 0, 0]+=(-0.746314816729-0.271070503153j)*x[2]**o+((0.641933054+0.172727219748j))*x[2]
+            ref[3, 0, 0, 2]=(-0.746314816729-0.271070503153j)*o*x_ref[2]**(o-1)+((0.641933054+0.172727219748j))
+            arg[3, 0, 1]+=(0.626930130229+0.450668764912j)*x[2]**o+((0.00363258739025+0.937938288359j))*x[2]
+            ref[3, 0, 1, 2]=(0.626930130229+0.450668764912j)*o*x_ref[2]**(o-1)+((0.00363258739025+0.937938288359j))
+            arg[3, 1, 0]+=(0.777722519214-0.413968499749j)*x[2]**o+((-0.405303226092-0.870837750053j))*x[2]
+            ref[3, 1, 0, 2]=(0.777722519214-0.413968499749j)*o*x_ref[2]**(o-1)+((-0.405303226092-0.870837750053j))
+            arg[3, 1, 1]+=(0.373626610237-0.371907896136j)*x[2]**o+((0.675703422966-0.179300927113j))*x[2]
+            ref[3, 1, 1, 2]=(0.373626610237-0.371907896136j)*o*x_ref[2]**(o-1)+((0.675703422966-0.179300927113j))
+            arg[3, 2, 0]+=(0.19628269306-0.51222739068j)*x[2]**o+((-0.112798761373+0.897166507885j))*x[2]
+            ref[3, 2, 0, 2]=(0.19628269306-0.51222739068j)*o*x_ref[2]**(o-1)+((-0.112798761373+0.897166507885j))
+            arg[3, 2, 1]+=(0.583597890607+0.928948902499j)*x[2]**o+((0.01592010134-0.0340342377627j))*x[2]
+            ref[3, 2, 1, 2]=(0.583597890607+0.928948902499j)*o*x_ref[2]**(o-1)+((0.01592010134-0.0340342377627j))
+            arg[3, 3, 0]+=(-0.0108155283379+0.0627685443159j)*x[2]**o+((-0.745847015315-0.160662642043j))*x[2]
+            ref[3, 3, 0, 2]=(-0.0108155283379+0.0627685443159j)*o*x_ref[2]**(o-1)+((-0.745847015315-0.160662642043j))
+            arg[3, 3, 1]+=(-0.484349243614-0.986016286478j)*x[2]**o+((-0.185796615459-0.507781016901j))*x[2]
+            ref[3, 3, 1, 2]=(-0.484349243614-0.986016286478j)*o*x_ref[2]**(o-1)+((-0.185796615459-0.507781016901j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.83875569196-0.833045746712j)*x[0]+((0.419351769008+0.375234029371j))*x[1]
+        ref[0]=(0.83875569196-0.833045746712j)
+        ref[1]=(0.419351769008+0.375234029371j)
+        if dim==3:
+            arg+=((0.0946854490599+0.196920808611j))*x[2]
+            ref[2]=(0.0946854490599+0.196920808611j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(-0.303363494278-0.102755261612j)*x[0]+((0.706398623753-0.578839582503j))*x[1]
+        ref[0, 0]=(-0.303363494278-0.102755261612j)
+        ref[0, 1]=(0.706398623753-0.578839582503j)
+        arg[1,]=(0.816280052249+0.0816444445569j)*x[0]+((-0.978244695555+0.149696371463j))*x[1]
+        ref[1, 0]=(0.816280052249+0.0816444445569j)
+        ref[1, 1]=(-0.978244695555+0.149696371463j)
+        if dim==3:
+            arg[0,]+=(-0.224098560559-0.367545732548j)*x[2]
+            ref[0, 2]=(-0.224098560559-0.367545732548j)
+            arg[1,]+=(-0.125250069314+0.00260144155324j)*x[2]
+            ref[1, 2]=(-0.125250069314+0.00260144155324j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=(-0.984805087698-0.995423687891j)*x[0]+((0.375153370178+0.492577963445j))*x[1]
+        ref[0, 0, 0]=(-0.984805087698-0.995423687891j)
+        ref[0, 0, 1]=(0.375153370178+0.492577963445j)
+        arg[0, 1]=(0.981220811106+0.278498296256j)*x[0]+((0.119501899974-0.503096254675j))*x[1]
+        ref[0, 1, 0]=(0.981220811106+0.278498296256j)
+        ref[0, 1, 1]=(0.119501899974-0.503096254675j)
+        arg[0, 2]=(0.875424739874-0.244644385813j)*x[0]+((-0.480843911504-0.0173402306472j))*x[1]
+        ref[0, 2, 0]=(0.875424739874-0.244644385813j)
+        ref[0, 2, 1]=(-0.480843911504-0.0173402306472j)
+        arg[1, 0]=(-0.466924770218-0.474945773812j)*x[0]+((0.991100396664-0.609675281778j))*x[1]
+        ref[1, 0, 0]=(-0.466924770218-0.474945773812j)
+        ref[1, 0, 1]=(0.991100396664-0.609675281778j)
+        arg[1, 1]=(0.512233261583+0.457880364149j)*x[0]+((0.914376842639-0.215644919332j))*x[1]
+        ref[1, 1, 0]=(0.512233261583+0.457880364149j)
+        ref[1, 1, 1]=(0.914376842639-0.215644919332j)
+        arg[1, 2]=(-0.247491715047+0.662254086682j)*x[0]+((-0.338053787052-0.666510037158j))*x[1]
+        ref[1, 2, 0]=(-0.247491715047+0.662254086682j)
+        ref[1, 2, 1]=(-0.338053787052-0.666510037158j)
+        arg[2, 0]=(0.170682919285+0.313695742023j)*x[0]+((-0.602000473747+0.541131818905j))*x[1]
+        ref[2, 0, 0]=(0.170682919285+0.313695742023j)
+        ref[2, 0, 1]=(-0.602000473747+0.541131818905j)
+        arg[2, 1]=(-0.444693155175+0.251846744235j)*x[0]+((0.998558873231-0.769585066704j))*x[1]
+        ref[2, 1, 0]=(-0.444693155175+0.251846744235j)
+        ref[2, 1, 1]=(0.998558873231-0.769585066704j)
+        arg[2, 2]=(0.701898709567+0.185554847551j)*x[0]+((0.274890392232-0.0582694982802j))*x[1]
+        ref[2, 2, 0]=(0.701898709567+0.185554847551j)
+        ref[2, 2, 1]=(0.274890392232-0.0582694982802j)
+        arg[3, 0]=(-0.176995259418+0.813022289006j)*x[0]+((0.528172415064+0.467651076955j))*x[1]
+        ref[3, 0, 0]=(-0.176995259418+0.813022289006j)
+        ref[3, 0, 1]=(0.528172415064+0.467651076955j)
+        arg[3, 1]=(-0.803166399519-0.121041754054j)*x[0]+((-0.44874749652-0.600931231256j))*x[1]
+        ref[3, 1, 0]=(-0.803166399519-0.121041754054j)
+        ref[3, 1, 1]=(-0.44874749652-0.600931231256j)
+        arg[3, 2]=(-0.0278320034263+0.758942371254j)*x[0]+((0.313740025128-0.741097931838j))*x[1]
+        ref[3, 2, 0]=(-0.0278320034263+0.758942371254j)
+        ref[3, 2, 1]=(0.313740025128-0.741097931838j)
+        if dim==3:
+            arg[0, 0]+=(0.0392909758569-0.943635642263j)*x[2]
+            ref[0, 0, 2]=(0.0392909758569-0.943635642263j)
+            arg[0, 1]+=(0.378359148631-0.00410500155272j)*x[2]
+            ref[0, 1, 2]=(0.378359148631-0.00410500155272j)
+            arg[0, 2]+=(-0.388123061805-0.779046218782j)*x[2]
+            ref[0, 2, 2]=(-0.388123061805-0.779046218782j)
+            arg[1, 0]+=(0.484150814418+0.622823842615j)*x[2]
+            ref[1, 0, 2]=(0.484150814418+0.622823842615j)
+            arg[1, 1]+=(0.290189538724-0.983309165484j)*x[2]
+            ref[1, 1, 2]=(0.290189538724-0.983309165484j)
+            arg[1, 2]+=(-0.0976007320658-0.506926129688j)*x[2]
+            ref[1, 2, 2]=(-0.0976007320658-0.506926129688j)
+            arg[2, 0]+=(-0.805582330993-0.990518517991j)*x[2]
+            ref[2, 0, 2]=(-0.805582330993-0.990518517991j)
+            arg[2, 1]+=(-0.894717608643-0.610723393799j)*x[2]
+            ref[2, 1, 2]=(-0.894717608643-0.610723393799j)
+            arg[2, 2]+=(-0.908872875428+0.921859147743j)*x[2]
+            ref[2, 2, 2]=(-0.908872875428+0.921859147743j)
+            arg[3, 0]+=(0.951333094754+0.00554706429199j)*x[2]
+            ref[3, 0, 2]=(0.951333094754+0.00554706429199j)
+            arg[3, 1]+=(-0.728441902117+0.502112245085j)*x[2]
+            ref[3, 1, 2]=(-0.728441902117+0.502112245085j)
+            arg[3, 2]+=(0.0302892208785+0.0137209659976j)*x[2]
+            ref[3, 2, 2]=(0.0302892208785+0.0137209659976j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 2),w)
+        ref = Data(0,(2, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.26993546754-0.077615339859j)*x[0]+((-0.463175136761-0.774332614662j))*x[1]
+        ref[0, 0, 0, 0]=(0.26993546754-0.077615339859j)
+        ref[0, 0, 0, 1]=(-0.463175136761-0.774332614662j)
+        arg[0, 0, 1]=(0.485183570678-0.436054557961j)*x[0]+((-0.0906630498804-0.761295751639j))*x[1]
+        ref[0, 0, 1, 0]=(0.485183570678-0.436054557961j)
+        ref[0, 0, 1, 1]=(-0.0906630498804-0.761295751639j)
+        arg[0, 1, 0]=(-0.226085662553-0.857715624064j)*x[0]+((-0.851224999103+0.402253783065j))*x[1]
+        ref[0, 1, 0, 0]=(-0.226085662553-0.857715624064j)
+        ref[0, 1, 0, 1]=(-0.851224999103+0.402253783065j)
+        arg[0, 1, 1]=(-0.264055034123-0.168701349448j)*x[0]+((-0.0766576644492+0.453886558298j))*x[1]
+        ref[0, 1, 1, 0]=(-0.264055034123-0.168701349448j)
+        ref[0, 1, 1, 1]=(-0.0766576644492+0.453886558298j)
+        arg[0, 2, 0]=(0.599790536357-0.582533208681j)*x[0]+((-0.941888732239-0.868587510552j))*x[1]
+        ref[0, 2, 0, 0]=(0.599790536357-0.582533208681j)
+        ref[0, 2, 0, 1]=(-0.941888732239-0.868587510552j)
+        arg[0, 2, 1]=(0.887401108098+0.911893537967j)*x[0]+((-0.159397399328-0.197248946791j))*x[1]
+        ref[0, 2, 1, 0]=(0.887401108098+0.911893537967j)
+        ref[0, 2, 1, 1]=(-0.159397399328-0.197248946791j)
+        arg[0, 3, 0]=(0.041522943594-0.642753746116j)*x[0]+((-0.7368920436+0.943458816974j))*x[1]
+        ref[0, 3, 0, 0]=(0.041522943594-0.642753746116j)
+        ref[0, 3, 0, 1]=(-0.7368920436+0.943458816974j)
+        arg[0, 3, 1]=(0.0403465780193-0.194720837411j)*x[0]+((0.49122184483+0.55102914398j))*x[1]
+        ref[0, 3, 1, 0]=(0.0403465780193-0.194720837411j)
+        ref[0, 3, 1, 1]=(0.49122184483+0.55102914398j)
+        arg[1, 0, 0]=(-0.0479000801604-0.633066410238j)*x[0]+((-0.467713049227+0.905719323153j))*x[1]
+        ref[1, 0, 0, 0]=(-0.0479000801604-0.633066410238j)
+        ref[1, 0, 0, 1]=(-0.467713049227+0.905719323153j)
+        arg[1, 0, 1]=(-0.625242928232+0.780141061862j)*x[0]+((0.8894801783+0.334349902991j))*x[1]
+        ref[1, 0, 1, 0]=(-0.625242928232+0.780141061862j)
+        ref[1, 0, 1, 1]=(0.8894801783+0.334349902991j)
+        arg[1, 1, 0]=(-0.334126319599-0.899368205306j)*x[0]+((0.249297956332+0.992499818198j))*x[1]
+        ref[1, 1, 0, 0]=(-0.334126319599-0.899368205306j)
+        ref[1, 1, 0, 1]=(0.249297956332+0.992499818198j)
+        arg[1, 1, 1]=(-0.202234616264-0.918455142068j)*x[0]+((-0.987747722441-0.0530739637505j))*x[1]
+        ref[1, 1, 1, 0]=(-0.202234616264-0.918455142068j)
+        ref[1, 1, 1, 1]=(-0.987747722441-0.0530739637505j)
+        arg[1, 2, 0]=(-0.600586492901-0.834483694491j)*x[0]+((0.774230546373+0.262589388545j))*x[1]
+        ref[1, 2, 0, 0]=(-0.600586492901-0.834483694491j)
+        ref[1, 2, 0, 1]=(0.774230546373+0.262589388545j)
+        arg[1, 2, 1]=(0.588240565361+0.357801963233j)*x[0]+((0.212449824911+0.949533835957j))*x[1]
+        ref[1, 2, 1, 0]=(0.588240565361+0.357801963233j)
+        ref[1, 2, 1, 1]=(0.212449824911+0.949533835957j)
+        arg[1, 3, 0]=(0.320782287909-0.314115199391j)*x[0]+((-0.477693883758+0.208123849056j))*x[1]
+        ref[1, 3, 0, 0]=(0.320782287909-0.314115199391j)
+        ref[1, 3, 0, 1]=(-0.477693883758+0.208123849056j)
+        arg[1, 3, 1]=(0.41958912835+0.388475800215j)*x[0]+((0.340946707061-0.534335828982j))*x[1]
+        ref[1, 3, 1, 0]=(0.41958912835+0.388475800215j)
+        ref[1, 3, 1, 1]=(0.340946707061-0.534335828982j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.433923824262+0.280531869006j)*x[2]
+            ref[0, 0, 0, 2]=(-0.433923824262+0.280531869006j)
+            arg[0, 0, 1]+=(-0.490196714-0.221138312022j)*x[2]
+            ref[0, 0, 1, 2]=(-0.490196714-0.221138312022j)
+            arg[0, 1, 0]+=(-0.415240880116-0.316126652374j)*x[2]
+            ref[0, 1, 0, 2]=(-0.415240880116-0.316126652374j)
+            arg[0, 1, 1]+=(-0.609877337787-0.116682623492j)*x[2]
+            ref[0, 1, 1, 2]=(-0.609877337787-0.116682623492j)
+            arg[0, 2, 0]+=(-0.601715797108+0.778480758102j)*x[2]
+            ref[0, 2, 0, 2]=(-0.601715797108+0.778480758102j)
+            arg[0, 2, 1]+=(-0.173397445754-0.646427091292j)*x[2]
+            ref[0, 2, 1, 2]=(-0.173397445754-0.646427091292j)
+            arg[0, 3, 0]+=(-0.946545960007-0.620818232638j)*x[2]
+            ref[0, 3, 0, 2]=(-0.946545960007-0.620818232638j)
+            arg[0, 3, 1]+=(0.877468441559+0.199595992162j)*x[2]
+            ref[0, 3, 1, 2]=(0.877468441559+0.199595992162j)
+            arg[1, 0, 0]+=(-0.516592581675-0.185859903738j)*x[2]
+            ref[1, 0, 0, 2]=(-0.516592581675-0.185859903738j)
+            arg[1, 0, 1]+=(-0.929676578027-0.386238466357j)*x[2]
+            ref[1, 0, 1, 2]=(-0.929676578027-0.386238466357j)
+            arg[1, 1, 0]+=(0.800835977959+0.51226926888j)*x[2]
+            ref[1, 1, 0, 2]=(0.800835977959+0.51226926888j)
+            arg[1, 1, 1]+=(0.42202119668-0.21277436338j)*x[2]
+            ref[1, 1, 1, 2]=(0.42202119668-0.21277436338j)
+            arg[1, 2, 0]+=(0.027046316004+0.746798455322j)*x[2]
+            ref[1, 2, 0, 2]=(0.027046316004+0.746798455322j)
+            arg[1, 2, 1]+=(-0.627537361628+0.780096028638j)*x[2]
+            ref[1, 2, 1, 2]=(-0.627537361628+0.780096028638j)
+            arg[1, 3, 0]+=(-0.932744969977+0.530560868284j)*x[2]
+            ref[1, 3, 0, 2]=(-0.932744969977+0.530560868284j)
+            arg[1, 3, 1]+=(-0.415803007672+0.444790357114j)*x[2]
+            ref[1, 3, 1, 2]=(-0.415803007672+0.444790357114j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.645353801993+0.0750834942935j)*x[0]+((0.269820070954-0.588214596224j))*x[1]
+        ref[0]=(-0.645353801993+0.0750834942935j)
+        ref[1]=(0.269820070954-0.588214596224j)
+        if dim==3:
+            arg+=((-0.910355658458+0.23690453526j))*x[2]
+            ref[2]=(-0.910355658458+0.23690453526j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(0.616205880518-0.810906327597j)*x[0]+((0.398778504735+0.607212072606j))*x[1]
+        ref[0, 0]=(0.616205880518-0.810906327597j)
+        ref[0, 1]=(0.398778504735+0.607212072606j)
+        arg[1,]=(-0.730075022372-0.497878122995j)*x[0]+((-0.653778569674+0.903092140077j))*x[1]
+        ref[1, 0]=(-0.730075022372-0.497878122995j)
+        ref[1, 1]=(-0.653778569674+0.903092140077j)
+        if dim==3:
+            arg[0,]+=(-0.207009476275-0.482399508067j)*x[2]
+            ref[0, 2]=(-0.207009476275-0.482399508067j)
+            arg[1,]+=(-0.309978893311-0.929588601198j)*x[2]
+            ref[1, 2]=(-0.309978893311-0.929588601198j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.933970556706-0.545245457596j)*x[0]+((-0.0878249857783+0.940874676968j))*x[1]
+        ref[0, 0, 0]=(-0.933970556706-0.545245457596j)
+        ref[0, 0, 1]=(-0.0878249857783+0.940874676968j)
+        arg[0, 1]=(0.21088554412+0.0995719225291j)*x[0]+((-0.615620097031-0.906600847251j))*x[1]
+        ref[0, 1, 0]=(0.21088554412+0.0995719225291j)
+        ref[0, 1, 1]=(-0.615620097031-0.906600847251j)
+        arg[0, 2]=(-0.0740699850475-0.0591327877302j)*x[0]+((0.704495553828+0.830712711436j))*x[1]
+        ref[0, 2, 0]=(-0.0740699850475-0.0591327877302j)
+        ref[0, 2, 1]=(0.704495553828+0.830712711436j)
+        arg[0, 3]=(0.451645187409-0.189813339937j)*x[0]+((0.530121304149-0.551921508632j))*x[1]
+        ref[0, 3, 0]=(0.451645187409-0.189813339937j)
+        ref[0, 3, 1]=(0.530121304149-0.551921508632j)
+        arg[1, 0]=(0.748120194164-0.603302273778j)*x[0]+((0.864620124057-0.478603150184j))*x[1]
+        ref[1, 0, 0]=(0.748120194164-0.603302273778j)
+        ref[1, 0, 1]=(0.864620124057-0.478603150184j)
+        arg[1, 1]=(0.837599317108-0.302686972019j)*x[0]+((-0.628546580309-0.600460026068j))*x[1]
+        ref[1, 1, 0]=(0.837599317108-0.302686972019j)
+        ref[1, 1, 1]=(-0.628546580309-0.600460026068j)
+        arg[1, 2]=(0.17734320674-0.433815686162j)*x[0]+((-0.821037747989+0.89121102281j))*x[1]
+        ref[1, 2, 0]=(0.17734320674-0.433815686162j)
+        ref[1, 2, 1]=(-0.821037747989+0.89121102281j)
+        arg[1, 3]=(-0.965918995325-0.994230038346j)*x[0]+((-0.282616764917-0.0225769868612j))*x[1]
+        ref[1, 3, 0]=(-0.965918995325-0.994230038346j)
+        ref[1, 3, 1]=(-0.282616764917-0.0225769868612j)
+        arg[2, 0]=(0.123927051004-0.775734597253j)*x[0]+((0.474150600741-0.194985008084j))*x[1]
+        ref[2, 0, 0]=(0.123927051004-0.775734597253j)
+        ref[2, 0, 1]=(0.474150600741-0.194985008084j)
+        arg[2, 1]=(0.286071351066-0.537563667013j)*x[0]+((-0.126101618085-0.710374385623j))*x[1]
+        ref[2, 1, 0]=(0.286071351066-0.537563667013j)
+        ref[2, 1, 1]=(-0.126101618085-0.710374385623j)
+        arg[2, 2]=(-0.706662080506+0.214544401843j)*x[0]+((-0.50219225692-0.997936397914j))*x[1]
+        ref[2, 2, 0]=(-0.706662080506+0.214544401843j)
+        ref[2, 2, 1]=(-0.50219225692-0.997936397914j)
+        arg[2, 3]=(-0.259362522488-0.328658316441j)*x[0]+((0.744003104892-0.405508028734j))*x[1]
+        ref[2, 3, 0]=(-0.259362522488-0.328658316441j)
+        ref[2, 3, 1]=(0.744003104892-0.405508028734j)
+        if dim==3:
+            arg[0, 0]+=(-0.755350090876+0.876093424007j)*x[2]
+            ref[0, 0, 2]=(-0.755350090876+0.876093424007j)
+            arg[0, 1]+=(-0.510235258815-0.875233311766j)*x[2]
+            ref[0, 1, 2]=(-0.510235258815-0.875233311766j)
+            arg[0, 2]+=(-0.588106293677-0.657133092101j)*x[2]
+            ref[0, 2, 2]=(-0.588106293677-0.657133092101j)
+            arg[0, 3]+=(0.427157156219+0.442393485535j)*x[2]
+            ref[0, 3, 2]=(0.427157156219+0.442393485535j)
+            arg[1, 0]+=(0.780175822593-0.543832780992j)*x[2]
+            ref[1, 0, 2]=(0.780175822593-0.543832780992j)
+            arg[1, 1]+=(0.205427099451+0.144519832635j)*x[2]
+            ref[1, 1, 2]=(0.205427099451+0.144519832635j)
+            arg[1, 2]+=(0.0415713282972-0.219385148291j)*x[2]
+            ref[1, 2, 2]=(0.0415713282972-0.219385148291j)
+            arg[1, 3]+=(-0.659942294649-0.885270720799j)*x[2]
+            ref[1, 3, 2]=(-0.659942294649-0.885270720799j)
+            arg[2, 0]+=(0.215101180173+0.545270644139j)*x[2]
+            ref[2, 0, 2]=(0.215101180173+0.545270644139j)
+            arg[2, 1]+=(0.0466856929156-0.394775847435j)*x[2]
+            ref[2, 1, 2]=(0.0466856929156-0.394775847435j)
+            arg[2, 2]+=(-0.492447001103-0.359849095796j)*x[2]
+            ref[2, 2, 2]=(-0.492447001103-0.359849095796j)
+            arg[2, 3]+=(0.185298080161-0.265643955371j)*x[2]
+            ref[2, 3, 2]=(0.185298080161-0.265643955371j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.248384195202-0.358127191016j)*x[0]+((0.919258345101+0.26164347035j))*x[1]
+        ref[0, 0, 0, 0]=(0.248384195202-0.358127191016j)
+        ref[0, 0, 0, 1]=(0.919258345101+0.26164347035j)
+        arg[0, 0, 1]=(-0.793676017424+0.0351559789424j)*x[0]+((-0.231817362437-0.785549007468j))*x[1]
+        ref[0, 0, 1, 0]=(-0.793676017424+0.0351559789424j)
+        ref[0, 0, 1, 1]=(-0.231817362437-0.785549007468j)
+        arg[0, 1, 0]=(-0.0737826652792+0.851309604072j)*x[0]+((-0.0906749196398-0.00707135847665j))*x[1]
+        ref[0, 1, 0, 0]=(-0.0737826652792+0.851309604072j)
+        ref[0, 1, 0, 1]=(-0.0906749196398-0.00707135847665j)
+        arg[0, 1, 1]=(0.78245337134-0.444106274686j)*x[0]+((0.945052234817-0.837532609369j))*x[1]
+        ref[0, 1, 1, 0]=(0.78245337134-0.444106274686j)
+        ref[0, 1, 1, 1]=(0.945052234817-0.837532609369j)
+        arg[1, 0, 0]=(0.625040367237-0.367418245589j)*x[0]+((0.406469971842+0.578761075422j))*x[1]
+        ref[1, 0, 0, 0]=(0.625040367237-0.367418245589j)
+        ref[1, 0, 0, 1]=(0.406469971842+0.578761075422j)
+        arg[1, 0, 1]=(0.53580252501-0.460981645495j)*x[0]+((-0.850220252886-0.612536274466j))*x[1]
+        ref[1, 0, 1, 0]=(0.53580252501-0.460981645495j)
+        ref[1, 0, 1, 1]=(-0.850220252886-0.612536274466j)
+        arg[1, 1, 0]=(0.924310218328-0.274633438178j)*x[0]+((-0.338995980678+0.284309518448j))*x[1]
+        ref[1, 1, 0, 0]=(0.924310218328-0.274633438178j)
+        ref[1, 1, 0, 1]=(-0.338995980678+0.284309518448j)
+        arg[1, 1, 1]=(-0.334969712588+0.354283921779j)*x[0]+((-0.564735417245-0.964915448245j))*x[1]
+        ref[1, 1, 1, 0]=(-0.334969712588+0.354283921779j)
+        ref[1, 1, 1, 1]=(-0.564735417245-0.964915448245j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.635703830569-0.445699633609j)*x[2]
+            ref[0, 0, 0, 2]=(0.635703830569-0.445699633609j)
+            arg[0, 0, 1]+=(0.695629941179-0.286496096054j)*x[2]
+            ref[0, 0, 1, 2]=(0.695629941179-0.286496096054j)
+            arg[0, 1, 0]+=(-0.608399098328-0.457837555966j)*x[2]
+            ref[0, 1, 0, 2]=(-0.608399098328-0.457837555966j)
+            arg[0, 1, 1]+=(-0.316502862561-0.803781398294j)*x[2]
+            ref[0, 1, 1, 2]=(-0.316502862561-0.803781398294j)
+            arg[1, 0, 0]+=(0.0344787831141+0.910929644711j)*x[2]
+            ref[1, 0, 0, 2]=(0.0344787831141+0.910929644711j)
+            arg[1, 0, 1]+=(0.493062211467+0.211354229234j)*x[2]
+            ref[1, 0, 1, 2]=(0.493062211467+0.211354229234j)
+            arg[1, 1, 0]+=(-0.655701515158+0.865947758184j)*x[2]
+            ref[1, 1, 0, 2]=(-0.655701515158+0.865947758184j)
+            arg[1, 1, 1]+=(-0.665146490301+0.153258270639j)*x[2]
+            ref[1, 1, 1, 2]=(-0.665146490301+0.153258270639j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.0487891867951-0.0352000781064j)*x[0]**o+((0.573667257227+0.78575343786j))*x[0]+((0.36322351576+0.955286718299j))*x[1]**o+((-0.37961368593+0.789376497645j))*x[1]
+        ref[0]=(0.0487891867951-0.0352000781064j)*o*x_ref[0]**(o-1)+((0.573667257227+0.78575343786j))
+        ref[1]=(0.36322351576+0.955286718299j)*o*x_ref[1]**(o-1)+((-0.37961368593+0.789376497645j))
+        if dim==3:
+            arg+=((-0.899701626701-0.360045233241j))*x[2]**o+((-0.515739908416-0.653336903379j))*x[2]
+            ref[2]=(-0.899701626701-0.360045233241j)*o*x_ref[2]**(o-1)+((-0.515739908416-0.653336903379j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(-0.840682910665+0.405991069347j)*x[0]**o+((0.387220760459-0.349338555499j))*x[0]+((-0.798307126197+0.34500367147j))*x[1]**o+((0.883281378828-0.538475772601j))*x[1]
+        ref[0, 0]=(-0.840682910665+0.405991069347j)*o*x_ref[0]**(o-1)+((0.387220760459-0.349338555499j))
+        ref[0, 1]=(-0.798307126197+0.34500367147j)*o*x_ref[1]**(o-1)+((0.883281378828-0.538475772601j))
+        arg[1,]=(-0.384854918745+0.0965796091868j)*x[0]**o+((-0.134920065574-0.0639367307563j))*x[0]+((-0.848337984459-0.234292670853j))*x[1]**o+((0.940044017244-0.0359622112741j))*x[1]
+        ref[1, 0]=(-0.384854918745+0.0965796091868j)*o*x_ref[0]**(o-1)+((-0.134920065574-0.0639367307563j))
+        ref[1, 1]=(-0.848337984459-0.234292670853j)*o*x_ref[1]**(o-1)+((0.940044017244-0.0359622112741j))
+        arg[2,]=(-0.955856495254+0.167145322333j)*x[0]**o+((0.700891838539-0.0323631591738j))*x[0]+((-0.0783539862891-0.259666755962j))*x[1]**o+((-0.0769301542047-0.603439263644j))*x[1]
+        ref[2, 0]=(-0.955856495254+0.167145322333j)*o*x_ref[0]**(o-1)+((0.700891838539-0.0323631591738j))
+        ref[2, 1]=(-0.0783539862891-0.259666755962j)*o*x_ref[1]**(o-1)+((-0.0769301542047-0.603439263644j))
+        if dim==3:
+            arg[0,]+=(0.717053331404-0.333966380786j)*x[2]**o+((-0.768579902275+0.350405437811j))*x[2]
+            ref[0, 2]=(0.717053331404-0.333966380786j)*o*x_ref[2]**(o-1)+((-0.768579902275+0.350405437811j))
+            arg[1,]+=(-0.205699591462+0.235772694265j)*x[2]**o+((0.965811233662+0.0629181173263j))*x[2]
+            ref[1, 2]=(-0.205699591462+0.235772694265j)*o*x_ref[2]**(o-1)+((0.965811233662+0.0629181173263j))
+            arg[2,]+=(-0.576068179764-0.553034246083j)*x[2]**o+((-0.730669961182-0.455489557576j))*x[2]
+            ref[2, 2]=(-0.576068179764-0.553034246083j)*o*x_ref[2]**(o-1)+((-0.730669961182-0.455489557576j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3)+(dim,),w_ref)
+        arg[0, 0]=(-0.694855573838+0.875314896735j)*x[0]**o+((0.0787055338539+0.993512664542j))*x[0]+((-0.426789133098+0.584610274293j))*x[1]**o+((0.275167279128-0.480917275166j))*x[1]
+        ref[0, 0, 0]=(-0.694855573838+0.875314896735j)*o*x_ref[0]**(o-1)+((0.0787055338539+0.993512664542j))
+        ref[0, 0, 1]=(-0.426789133098+0.584610274293j)*o*x_ref[1]**(o-1)+((0.275167279128-0.480917275166j))
+        arg[0, 1]=(-0.709079420004-0.625323503921j)*x[0]**o+((0.317738638049+0.214642449702j))*x[0]+((0.362916595976-0.607314176076j))*x[1]**o+((0.129714529828+0.176586108946j))*x[1]
+        ref[0, 1, 0]=(-0.709079420004-0.625323503921j)*o*x_ref[0]**(o-1)+((0.317738638049+0.214642449702j))
+        ref[0, 1, 1]=(0.362916595976-0.607314176076j)*o*x_ref[1]**(o-1)+((0.129714529828+0.176586108946j))
+        arg[0, 2]=(-0.0977726470834-0.604522234951j)*x[0]**o+((-0.230421162368+0.15324778677j))*x[0]+((0.311946662835-0.782470995165j))*x[1]**o+((-0.486017870692-0.201863210483j))*x[1]
+        ref[0, 2, 0]=(-0.0977726470834-0.604522234951j)*o*x_ref[0]**(o-1)+((-0.230421162368+0.15324778677j))
+        ref[0, 2, 1]=(0.311946662835-0.782470995165j)*o*x_ref[1]**(o-1)+((-0.486017870692-0.201863210483j))
+        arg[1, 0]=(0.422073187806+0.0668089358052j)*x[0]**o+((-0.44566468205+0.559804006361j))*x[0]+((0.701374482392+0.470460306852j))*x[1]**o+((0.547796408816+0.904578960094j))*x[1]
+        ref[1, 0, 0]=(0.422073187806+0.0668089358052j)*o*x_ref[0]**(o-1)+((-0.44566468205+0.559804006361j))
+        ref[1, 0, 1]=(0.701374482392+0.470460306852j)*o*x_ref[1]**(o-1)+((0.547796408816+0.904578960094j))
+        arg[1, 1]=(0.821433331851-0.541539681869j)*x[0]**o+((0.0826061357499+0.853069872294j))*x[0]+((0.849999640188+0.550879274859j))*x[1]**o+((0.81815161742-0.591479037747j))*x[1]
+        ref[1, 1, 0]=(0.821433331851-0.541539681869j)*o*x_ref[0]**(o-1)+((0.0826061357499+0.853069872294j))
+        ref[1, 1, 1]=(0.849999640188+0.550879274859j)*o*x_ref[1]**(o-1)+((0.81815161742-0.591479037747j))
+        arg[1, 2]=(-0.92201677932-0.073596004636j)*x[0]**o+((-0.911446656557+0.173764546384j))*x[0]+((0.441945870187-0.489375650466j))*x[1]**o+((0.0985931037914-0.255181446845j))*x[1]
+        ref[1, 2, 0]=(-0.92201677932-0.073596004636j)*o*x_ref[0]**(o-1)+((-0.911446656557+0.173764546384j))
+        ref[1, 2, 1]=(0.441945870187-0.489375650466j)*o*x_ref[1]**(o-1)+((0.0985931037914-0.255181446845j))
+        if dim==3:
+            arg[0, 0]+=(-0.185343115182-0.46221413796j)*x[2]**o+((0.0983798583096+0.842451303963j))*x[2]
+            ref[0, 0, 2]=(-0.185343115182-0.46221413796j)*o*x_ref[2]**(o-1)+((0.0983798583096+0.842451303963j))
+            arg[0, 1]+=(-0.972428162428+0.447611482174j)*x[2]**o+((0.255725705306-0.498547050433j))*x[2]
+            ref[0, 1, 2]=(-0.972428162428+0.447611482174j)*o*x_ref[2]**(o-1)+((0.255725705306-0.498547050433j))
+            arg[0, 2]+=(-0.92446056036-0.726700807242j)*x[2]**o+((0.450470831717-0.098808914465j))*x[2]
+            ref[0, 2, 2]=(-0.92446056036-0.726700807242j)*o*x_ref[2]**(o-1)+((0.450470831717-0.098808914465j))
+            arg[1, 0]+=(0.931997208406+0.0300825306349j)*x[2]**o+((-0.40250575593-0.406803826642j))*x[2]
+            ref[1, 0, 2]=(0.931997208406+0.0300825306349j)*o*x_ref[2]**(o-1)+((-0.40250575593-0.406803826642j))
+            arg[1, 1]+=(0.286837508839+0.449483920594j)*x[2]**o+((0.500201964367+0.902576545839j))*x[2]
+            ref[1, 1, 2]=(0.286837508839+0.449483920594j)*o*x_ref[2]**(o-1)+((0.500201964367+0.902576545839j))
+            arg[1, 2]+=(-0.452134542171-0.517246041427j)*x[2]**o+((-0.292455566783-0.240814193067j))*x[2]
+            ref[1, 2, 2]=(-0.452134542171-0.517246041427j)*o*x_ref[2]**(o-1)+((-0.292455566783-0.240814193067j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2),w)
+        ref = Data(0,(3, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.838425189343-0.378017917487j)*x[0]**o+((0.989976885971-0.0442352687838j))*x[0]+((0.426791996893+0.392256379111j))*x[1]**o+((0.124603477318-0.430308447053j))*x[1]
+        ref[0, 0, 0, 0]=(0.838425189343-0.378017917487j)*o*x_ref[0]**(o-1)+((0.989976885971-0.0442352687838j))
+        ref[0, 0, 0, 1]=(0.426791996893+0.392256379111j)*o*x_ref[1]**(o-1)+((0.124603477318-0.430308447053j))
+        arg[0, 0, 1]=(-0.0764903928517-0.73475174197j)*x[0]**o+((-0.766663725697+0.192648199481j))*x[0]+((-0.254909959766+0.158778536586j))*x[1]**o+((0.0295165340753-0.489753006223j))*x[1]
+        ref[0, 0, 1, 0]=(-0.0764903928517-0.73475174197j)*o*x_ref[0]**(o-1)+((-0.766663725697+0.192648199481j))
+        ref[0, 0, 1, 1]=(-0.254909959766+0.158778536586j)*o*x_ref[1]**(o-1)+((0.0295165340753-0.489753006223j))
+        arg[0, 1, 0]=(0.475670783307+0.166827776133j)*x[0]**o+((-0.540473695936-0.497401746662j))*x[0]+((-0.961235613225-0.159389083473j))*x[1]**o+((0.487659350999-0.548812621685j))*x[1]
+        ref[0, 1, 0, 0]=(0.475670783307+0.166827776133j)*o*x_ref[0]**(o-1)+((-0.540473695936-0.497401746662j))
+        ref[0, 1, 0, 1]=(-0.961235613225-0.159389083473j)*o*x_ref[1]**(o-1)+((0.487659350999-0.548812621685j))
+        arg[0, 1, 1]=(-0.157608615921+0.415281531783j)*x[0]**o+((-0.23799727162-0.0229940700833j))*x[0]+((-0.0312379704116-0.531041390018j))*x[1]**o+((-0.34676191445+0.124410872947j))*x[1]
+        ref[0, 1, 1, 0]=(-0.157608615921+0.415281531783j)*o*x_ref[0]**(o-1)+((-0.23799727162-0.0229940700833j))
+        ref[0, 1, 1, 1]=(-0.0312379704116-0.531041390018j)*o*x_ref[1]**(o-1)+((-0.34676191445+0.124410872947j))
+        arg[0, 2, 0]=(-0.838858350232-0.634601245455j)*x[0]**o+((0.924125802808-0.618360088357j))*x[0]+((0.39344124848+0.983330181769j))*x[1]**o+((0.650704479859+0.857845316347j))*x[1]
+        ref[0, 2, 0, 0]=(-0.838858350232-0.634601245455j)*o*x_ref[0]**(o-1)+((0.924125802808-0.618360088357j))
+        ref[0, 2, 0, 1]=(0.39344124848+0.983330181769j)*o*x_ref[1]**(o-1)+((0.650704479859+0.857845316347j))
+        arg[0, 2, 1]=(0.0873166675676-0.381197718083j)*x[0]**o+((-0.585802281362-0.164857144241j))*x[0]+((-0.220175132218+0.726690413159j))*x[1]**o+((-0.656046667375+0.494368306731j))*x[1]
+        ref[0, 2, 1, 0]=(0.0873166675676-0.381197718083j)*o*x_ref[0]**(o-1)+((-0.585802281362-0.164857144241j))
+        ref[0, 2, 1, 1]=(-0.220175132218+0.726690413159j)*o*x_ref[1]**(o-1)+((-0.656046667375+0.494368306731j))
+        arg[1, 0, 0]=(-0.294446649631+0.593988168791j)*x[0]**o+((-0.220687374797+0.592813736748j))*x[0]+((-0.668408665058+0.498085370141j))*x[1]**o+((-0.0195109605137-0.264409790904j))*x[1]
+        ref[1, 0, 0, 0]=(-0.294446649631+0.593988168791j)*o*x_ref[0]**(o-1)+((-0.220687374797+0.592813736748j))
+        ref[1, 0, 0, 1]=(-0.668408665058+0.498085370141j)*o*x_ref[1]**(o-1)+((-0.0195109605137-0.264409790904j))
+        arg[1, 0, 1]=(-0.788837464094-0.155643071755j)*x[0]**o+((0.941234532593-0.41298711429j))*x[0]+((0.344716767917-0.751657643484j))*x[1]**o+((0.090957648793+0.83664626649j))*x[1]
+        ref[1, 0, 1, 0]=(-0.788837464094-0.155643071755j)*o*x_ref[0]**(o-1)+((0.941234532593-0.41298711429j))
+        ref[1, 0, 1, 1]=(0.344716767917-0.751657643484j)*o*x_ref[1]**(o-1)+((0.090957648793+0.83664626649j))
+        arg[1, 1, 0]=(-0.189349509098-0.0105006219791j)*x[0]**o+((0.445919936002+0.804559529219j))*x[0]+((-0.738940314823-0.952466428103j))*x[1]**o+((-0.774509627005+0.779910805204j))*x[1]
+        ref[1, 1, 0, 0]=(-0.189349509098-0.0105006219791j)*o*x_ref[0]**(o-1)+((0.445919936002+0.804559529219j))
+        ref[1, 1, 0, 1]=(-0.738940314823-0.952466428103j)*o*x_ref[1]**(o-1)+((-0.774509627005+0.779910805204j))
+        arg[1, 1, 1]=(-0.970288554019-0.947558575666j)*x[0]**o+((0.131203645032-0.105988370676j))*x[0]+((-0.198543583036+0.682639501425j))*x[1]**o+((-0.689321544399+0.959313367484j))*x[1]
+        ref[1, 1, 1, 0]=(-0.970288554019-0.947558575666j)*o*x_ref[0]**(o-1)+((0.131203645032-0.105988370676j))
+        ref[1, 1, 1, 1]=(-0.198543583036+0.682639501425j)*o*x_ref[1]**(o-1)+((-0.689321544399+0.959313367484j))
+        arg[1, 2, 0]=(-0.178304784379-0.89320935119j)*x[0]**o+((0.970378948476-0.814984432867j))*x[0]+((0.0888539996745-0.275277935736j))*x[1]**o+((-0.0172411610696-0.877711693873j))*x[1]
+        ref[1, 2, 0, 0]=(-0.178304784379-0.89320935119j)*o*x_ref[0]**(o-1)+((0.970378948476-0.814984432867j))
+        ref[1, 2, 0, 1]=(0.0888539996745-0.275277935736j)*o*x_ref[1]**(o-1)+((-0.0172411610696-0.877711693873j))
+        arg[1, 2, 1]=(-0.819196405446-0.349517051962j)*x[0]**o+((-0.885950085356-0.201843625824j))*x[0]+((0.448220715818+0.100343473873j))*x[1]**o+((0.248466266656+0.0429243899428j))*x[1]
+        ref[1, 2, 1, 0]=(-0.819196405446-0.349517051962j)*o*x_ref[0]**(o-1)+((-0.885950085356-0.201843625824j))
+        ref[1, 2, 1, 1]=(0.448220715818+0.100343473873j)*o*x_ref[1]**(o-1)+((0.248466266656+0.0429243899428j))
+        arg[2, 0, 0]=(-0.434152893383+0.599041204065j)*x[0]**o+((-0.416124200773-0.462016017606j))*x[0]+((0.551086633399-0.508729468214j))*x[1]**o+((0.896310851384-0.212971516826j))*x[1]
+        ref[2, 0, 0, 0]=(-0.434152893383+0.599041204065j)*o*x_ref[0]**(o-1)+((-0.416124200773-0.462016017606j))
+        ref[2, 0, 0, 1]=(0.551086633399-0.508729468214j)*o*x_ref[1]**(o-1)+((0.896310851384-0.212971516826j))
+        arg[2, 0, 1]=(-0.821377973756-0.170985733599j)*x[0]**o+((-0.106192794798+0.620325161326j))*x[0]+((0.000641717078262-0.285041938635j))*x[1]**o+((0.633981477371+0.335328591255j))*x[1]
+        ref[2, 0, 1, 0]=(-0.821377973756-0.170985733599j)*o*x_ref[0]**(o-1)+((-0.106192794798+0.620325161326j))
+        ref[2, 0, 1, 1]=(0.000641717078262-0.285041938635j)*o*x_ref[1]**(o-1)+((0.633981477371+0.335328591255j))
+        arg[2, 1, 0]=(0.383111244715+0.0066341978789j)*x[0]**o+((0.444592471768-0.560135251847j))*x[0]+((0.595661044164-0.68537461525j))*x[1]**o+((-0.0681351287079+0.134199306265j))*x[1]
+        ref[2, 1, 0, 0]=(0.383111244715+0.0066341978789j)*o*x_ref[0]**(o-1)+((0.444592471768-0.560135251847j))
+        ref[2, 1, 0, 1]=(0.595661044164-0.68537461525j)*o*x_ref[1]**(o-1)+((-0.0681351287079+0.134199306265j))
+        arg[2, 1, 1]=(0.291396424228-0.961975662662j)*x[0]**o+((0.255156011061+0.720751041681j))*x[0]+((0.417592809515-0.903301852766j))*x[1]**o+((-0.396045491163-0.435008009376j))*x[1]
+        ref[2, 1, 1, 0]=(0.291396424228-0.961975662662j)*o*x_ref[0]**(o-1)+((0.255156011061+0.720751041681j))
+        ref[2, 1, 1, 1]=(0.417592809515-0.903301852766j)*o*x_ref[1]**(o-1)+((-0.396045491163-0.435008009376j))
+        arg[2, 2, 0]=(-0.964145245118-0.875142737017j)*x[0]**o+((0.793872908348+0.106335707703j))*x[0]+((-0.0272847022517-0.128780990968j))*x[1]**o+((0.531665149466+0.479089352573j))*x[1]
+        ref[2, 2, 0, 0]=(-0.964145245118-0.875142737017j)*o*x_ref[0]**(o-1)+((0.793872908348+0.106335707703j))
+        ref[2, 2, 0, 1]=(-0.0272847022517-0.128780990968j)*o*x_ref[1]**(o-1)+((0.531665149466+0.479089352573j))
+        arg[2, 2, 1]=(-0.611839941186-0.515189702231j)*x[0]**o+((0.671523400253+0.325126978597j))*x[0]+((0.223509829836-0.0216706271836j))*x[1]**o+((-0.755661310824+0.945122070807j))*x[1]
+        ref[2, 2, 1, 0]=(-0.611839941186-0.515189702231j)*o*x_ref[0]**(o-1)+((0.671523400253+0.325126978597j))
+        ref[2, 2, 1, 1]=(0.223509829836-0.0216706271836j)*o*x_ref[1]**(o-1)+((-0.755661310824+0.945122070807j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.287988685944-0.817645515036j)*x[2]**o+((-0.965670393949-0.0861526502309j))*x[2]
+            ref[0, 0, 0, 2]=(0.287988685944-0.817645515036j)*o*x_ref[2]**(o-1)+((-0.965670393949-0.0861526502309j))
+            arg[0, 0, 1]+=(-0.770536929404-0.515939304189j)*x[2]**o+((-0.434196284917-0.787219548694j))*x[2]
+            ref[0, 0, 1, 2]=(-0.770536929404-0.515939304189j)*o*x_ref[2]**(o-1)+((-0.434196284917-0.787219548694j))
+            arg[0, 1, 0]+=(-0.563489181733-0.194856963537j)*x[2]**o+((0.662859194964+0.264122962633j))*x[2]
+            ref[0, 1, 0, 2]=(-0.563489181733-0.194856963537j)*o*x_ref[2]**(o-1)+((0.662859194964+0.264122962633j))
+            arg[0, 1, 1]+=(0.000422853131611-0.666018317053j)*x[2]**o+((0.793093505155+0.578570462689j))*x[2]
+            ref[0, 1, 1, 2]=(0.000422853131611-0.666018317053j)*o*x_ref[2]**(o-1)+((0.793093505155+0.578570462689j))
+            arg[0, 2, 0]+=(-0.483554404977-0.964655915708j)*x[2]**o+((0.755652284235+0.385639000645j))*x[2]
+            ref[0, 2, 0, 2]=(-0.483554404977-0.964655915708j)*o*x_ref[2]**(o-1)+((0.755652284235+0.385639000645j))
+            arg[0, 2, 1]+=(-0.984683384266+0.181414168519j)*x[2]**o+((0.621966072423+0.191794773526j))*x[2]
+            ref[0, 2, 1, 2]=(-0.984683384266+0.181414168519j)*o*x_ref[2]**(o-1)+((0.621966072423+0.191794773526j))
+            arg[1, 0, 0]+=(-0.701609402146-0.549125724089j)*x[2]**o+((0.707104630106-0.160855345916j))*x[2]
+            ref[1, 0, 0, 2]=(-0.701609402146-0.549125724089j)*o*x_ref[2]**(o-1)+((0.707104630106-0.160855345916j))
+            arg[1, 0, 1]+=(-0.496211025774-0.840050120013j)*x[2]**o+((0.889622929643-0.228871242854j))*x[2]
+            ref[1, 0, 1, 2]=(-0.496211025774-0.840050120013j)*o*x_ref[2]**(o-1)+((0.889622929643-0.228871242854j))
+            arg[1, 1, 0]+=(0.959412623109+0.906121652205j)*x[2]**o+((-0.921183888462-0.804660863247j))*x[2]
+            ref[1, 1, 0, 2]=(0.959412623109+0.906121652205j)*o*x_ref[2]**(o-1)+((-0.921183888462-0.804660863247j))
+            arg[1, 1, 1]+=(0.189826806185-0.599811878107j)*x[2]**o+((-0.977544504884+0.477203360773j))*x[2]
+            ref[1, 1, 1, 2]=(0.189826806185-0.599811878107j)*o*x_ref[2]**(o-1)+((-0.977544504884+0.477203360773j))
+            arg[1, 2, 0]+=(0.680475645765-0.171979924777j)*x[2]**o+((-0.445455972294-0.574368112376j))*x[2]
+            ref[1, 2, 0, 2]=(0.680475645765-0.171979924777j)*o*x_ref[2]**(o-1)+((-0.445455972294-0.574368112376j))
+            arg[1, 2, 1]+=(-0.071948775719+0.558043369134j)*x[2]**o+((-0.866769682107+0.500657878152j))*x[2]
+            ref[1, 2, 1, 2]=(-0.071948775719+0.558043369134j)*o*x_ref[2]**(o-1)+((-0.866769682107+0.500657878152j))
+            arg[2, 0, 0]+=(0.0827382468907+0.971204711699j)*x[2]**o+((-0.848429246807-0.537508462607j))*x[2]
+            ref[2, 0, 0, 2]=(0.0827382468907+0.971204711699j)*o*x_ref[2]**(o-1)+((-0.848429246807-0.537508462607j))
+            arg[2, 0, 1]+=(-0.40035340487+0.263111160445j)*x[2]**o+((0.469048555107-0.582559989787j))*x[2]
+            ref[2, 0, 1, 2]=(-0.40035340487+0.263111160445j)*o*x_ref[2]**(o-1)+((0.469048555107-0.582559989787j))
+            arg[2, 1, 0]+=(-0.153539882149+0.865252672199j)*x[2]**o+((-0.260875955853-0.998869264604j))*x[2]
+            ref[2, 1, 0, 2]=(-0.153539882149+0.865252672199j)*o*x_ref[2]**(o-1)+((-0.260875955853-0.998869264604j))
+            arg[2, 1, 1]+=(-0.0972659239365-0.492727822661j)*x[2]**o+((0.0994421320829-0.651299832169j))*x[2]
+            ref[2, 1, 1, 2]=(-0.0972659239365-0.492727822661j)*o*x_ref[2]**(o-1)+((0.0994421320829-0.651299832169j))
+            arg[2, 2, 0]+=(0.400402461349-0.200552627028j)*x[2]**o+((-0.141312098009+0.80038784878j))*x[2]
+            ref[2, 2, 0, 2]=(0.400402461349-0.200552627028j)*o*x_ref[2]**(o-1)+((-0.141312098009+0.80038784878j))
+            arg[2, 2, 1]+=(0.255233371084+0.313486910131j)*x[2]**o+((0.576459447176+0.496656576083j))*x[2]
+            ref[2, 2, 1, 2]=(0.255233371084+0.313486910131j)*o*x_ref[2]**(o-1)+((0.576459447176+0.496656576083j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.616412811444-0.091195015284j)*x[0]**o+((0.433478781351+0.341960961428j))*x[0]+((0.104942851948+0.183580804099j))*x[1]**o+((0.0505626422691-0.0838012008693j))*x[1]
+        ref[0]=(0.616412811444-0.091195015284j)*o*x_ref[0]**(o-1)+((0.433478781351+0.341960961428j))
+        ref[1]=(0.104942851948+0.183580804099j)*o*x_ref[1]**(o-1)+((0.0505626422691-0.0838012008693j))
+        if dim==3:
+            arg+=((0.941542557455-0.214468474019j))*x[2]**o+((0.963786947968-0.0577472603129j))*x[2]
+            ref[2]=(0.941542557455-0.214468474019j)*o*x_ref[2]**(o-1)+((0.963786947968-0.0577472603129j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(0.0633638591159+0.42309396414j)*x[0]**o+((-0.708344870752-0.508207557447j))*x[0]+((0.966530285926+0.598182692923j))*x[1]**o+((-0.365723700457+0.0722484579452j))*x[1]
+        ref[0, 0]=(0.0633638591159+0.42309396414j)*o*x_ref[0]**(o-1)+((-0.708344870752-0.508207557447j))
+        ref[0, 1]=(0.966530285926+0.598182692923j)*o*x_ref[1]**(o-1)+((-0.365723700457+0.0722484579452j))
+        arg[1,]=(0.852391997678-0.770092197816j)*x[0]**o+((0.140581791415-0.651396285885j))*x[0]+((-0.596865942372-0.921763735988j))*x[1]**o+((-0.500761490236-0.506898626654j))*x[1]
+        ref[1, 0]=(0.852391997678-0.770092197816j)*o*x_ref[0]**(o-1)+((0.140581791415-0.651396285885j))
+        ref[1, 1]=(-0.596865942372-0.921763735988j)*o*x_ref[1]**(o-1)+((-0.500761490236-0.506898626654j))
+        arg[2,]=(-0.360774124839-0.501121172881j)*x[0]**o+((0.297467838614+0.642408681777j))*x[0]+((-0.736205499922+0.0172349128125j))*x[1]**o+((-0.113840751702+0.492195008468j))*x[1]
+        ref[2, 0]=(-0.360774124839-0.501121172881j)*o*x_ref[0]**(o-1)+((0.297467838614+0.642408681777j))
+        ref[2, 1]=(-0.736205499922+0.0172349128125j)*o*x_ref[1]**(o-1)+((-0.113840751702+0.492195008468j))
+        if dim==3:
+            arg[0,]+=(-0.358584332133+0.833344206053j)*x[2]**o+((0.208947443023-0.174422250142j))*x[2]
+            ref[0, 2]=(-0.358584332133+0.833344206053j)*o*x_ref[2]**(o-1)+((0.208947443023-0.174422250142j))
+            arg[1,]+=(0.240427736689+0.845419098264j)*x[2]**o+((-0.533174429226-0.0726771036321j))*x[2]
+            ref[1, 2]=(0.240427736689+0.845419098264j)*o*x_ref[2]**(o-1)+((-0.533174429226-0.0726771036321j))
+            arg[2,]+=(0.531770998973+0.99024081463j)*x[2]**o+((0.985462299062+0.309464847991j))*x[2]
+            ref[2, 2]=(0.531770998973+0.99024081463j)*o*x_ref[2]**(o-1)+((0.985462299062+0.309464847991j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.0253684198806-0.347823864287j)*x[0]**o+((0.0122710000412-0.655380075016j))*x[0]+((0.637868202725-0.062324875184j))*x[1]**o+((0.426312779891-0.984400068874j))*x[1]
+        ref[0, 0, 0]=(-0.0253684198806-0.347823864287j)*o*x_ref[0]**(o-1)+((0.0122710000412-0.655380075016j))
+        ref[0, 0, 1]=(0.637868202725-0.062324875184j)*o*x_ref[1]**(o-1)+((0.426312779891-0.984400068874j))
+        arg[0, 1]=(0.730021550005+0.708731389262j)*x[0]**o+((-0.754339811758+0.902770344227j))*x[0]+((0.48181089457-0.711472599504j))*x[1]**o+((-0.45895315933+0.738515064132j))*x[1]
+        ref[0, 1, 0]=(0.730021550005+0.708731389262j)*o*x_ref[0]**(o-1)+((-0.754339811758+0.902770344227j))
+        ref[0, 1, 1]=(0.48181089457-0.711472599504j)*o*x_ref[1]**(o-1)+((-0.45895315933+0.738515064132j))
+        arg[1, 0]=(-0.439052275674+0.887445039099j)*x[0]**o+((0.490355320054+0.147019733463j))*x[0]+((-0.0544462253941-0.402711932469j))*x[1]**o+((0.279665247245-0.52393570559j))*x[1]
+        ref[1, 0, 0]=(-0.439052275674+0.887445039099j)*o*x_ref[0]**(o-1)+((0.490355320054+0.147019733463j))
+        ref[1, 0, 1]=(-0.0544462253941-0.402711932469j)*o*x_ref[1]**(o-1)+((0.279665247245-0.52393570559j))
+        arg[1, 1]=(0.374994059279+0.770360981241j)*x[0]**o+((0.419159735125+0.819848526952j))*x[0]+((0.0983548697632-0.703969277986j))*x[1]**o+((-0.341614671672-0.502202146799j))*x[1]
+        ref[1, 1, 0]=(0.374994059279+0.770360981241j)*o*x_ref[0]**(o-1)+((0.419159735125+0.819848526952j))
+        ref[1, 1, 1]=(0.0983548697632-0.703969277986j)*o*x_ref[1]**(o-1)+((-0.341614671672-0.502202146799j))
+        arg[2, 0]=(-0.811184894011-0.846399714821j)*x[0]**o+((-0.167542705836-0.387744468718j))*x[0]+((0.832430676789-0.0848158204701j))*x[1]**o+((0.540378905943-0.218018482881j))*x[1]
+        ref[2, 0, 0]=(-0.811184894011-0.846399714821j)*o*x_ref[0]**(o-1)+((-0.167542705836-0.387744468718j))
+        ref[2, 0, 1]=(0.832430676789-0.0848158204701j)*o*x_ref[1]**(o-1)+((0.540378905943-0.218018482881j))
+        arg[2, 1]=(-0.20271803314+0.726693808112j)*x[0]**o+((0.161698725122+0.799830259226j))*x[0]+((-0.765052818146+0.0708839398851j))*x[1]**o+((-0.490680837198-0.30256024753j))*x[1]
+        ref[2, 1, 0]=(-0.20271803314+0.726693808112j)*o*x_ref[0]**(o-1)+((0.161698725122+0.799830259226j))
+        ref[2, 1, 1]=(-0.765052818146+0.0708839398851j)*o*x_ref[1]**(o-1)+((-0.490680837198-0.30256024753j))
+        if dim==3:
+            arg[0, 0]+=(0.0703936607491+0.839574944663j)*x[2]**o+((-0.610394066597-0.696211556006j))*x[2]
+            ref[0, 0, 2]=(0.0703936607491+0.839574944663j)*o*x_ref[2]**(o-1)+((-0.610394066597-0.696211556006j))
+            arg[0, 1]+=(-0.531408947122-0.249456482307j)*x[2]**o+((-0.9921515019-0.465459308201j))*x[2]
+            ref[0, 1, 2]=(-0.531408947122-0.249456482307j)*o*x_ref[2]**(o-1)+((-0.9921515019-0.465459308201j))
+            arg[1, 0]+=(-0.396590558906+0.586325226412j)*x[2]**o+((0.320135489111-0.984890826299j))*x[2]
+            ref[1, 0, 2]=(-0.396590558906+0.586325226412j)*o*x_ref[2]**(o-1)+((0.320135489111-0.984890826299j))
+            arg[1, 1]+=(0.597750023672+0.560596132779j)*x[2]**o+((-0.926962356792+0.54006476661j))*x[2]
+            ref[1, 1, 2]=(0.597750023672+0.560596132779j)*o*x_ref[2]**(o-1)+((-0.926962356792+0.54006476661j))
+            arg[2, 0]+=(0.593336387467+0.413083528675j)*x[2]**o+((-0.711436430181-0.334559908619j))*x[2]
+            ref[2, 0, 2]=(0.593336387467+0.413083528675j)*o*x_ref[2]**(o-1)+((-0.711436430181-0.334559908619j))
+            arg[2, 1]+=(-0.173638004667+0.409708236569j)*x[2]**o+((0.550694308044-0.615754135691j))*x[2]
+            ref[2, 1, 2]=(-0.173638004667+0.409708236569j)*o*x_ref[2]**(o-1)+((0.550694308044-0.615754135691j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.960039341476+0.46269827758j)*x[0]**o+((0.78822933019-0.684328065878j))*x[0]+((0.767820764439+0.734999891143j))*x[1]**o+((-0.103455553038+0.379859647321j))*x[1]
+        ref[0, 0, 0, 0]=(-0.960039341476+0.46269827758j)*o*x_ref[0]**(o-1)+((0.78822933019-0.684328065878j))
+        ref[0, 0, 0, 1]=(0.767820764439+0.734999891143j)*o*x_ref[1]**(o-1)+((-0.103455553038+0.379859647321j))
+        arg[0, 0, 1]=(-0.825777967079-0.342123174308j)*x[0]**o+((-0.324411484251-0.757049233433j))*x[0]+((-0.524156833126-0.00473202396789j))*x[1]**o+((0.957048880323+0.813787017502j))*x[1]
+        ref[0, 0, 1, 0]=(-0.825777967079-0.342123174308j)*o*x_ref[0]**(o-1)+((-0.324411484251-0.757049233433j))
+        ref[0, 0, 1, 1]=(-0.524156833126-0.00473202396789j)*o*x_ref[1]**(o-1)+((0.957048880323+0.813787017502j))
+        arg[0, 1, 0]=(0.842409576545+0.402572469621j)*x[0]**o+((-0.554093745007+0.749099878089j))*x[0]+((0.221465634754-0.83060292727j))*x[1]**o+((0.268002715129-0.153639835793j))*x[1]
+        ref[0, 1, 0, 0]=(0.842409576545+0.402572469621j)*o*x_ref[0]**(o-1)+((-0.554093745007+0.749099878089j))
+        ref[0, 1, 0, 1]=(0.221465634754-0.83060292727j)*o*x_ref[1]**(o-1)+((0.268002715129-0.153639835793j))
+        arg[0, 1, 1]=(-0.787856379789+0.5015035365j)*x[0]**o+((0.325286093828+0.226384894093j))*x[0]+((-0.780570763279-0.519444068981j))*x[1]**o+((0.533973909988-0.599280537898j))*x[1]
+        ref[0, 1, 1, 0]=(-0.787856379789+0.5015035365j)*o*x_ref[0]**(o-1)+((0.325286093828+0.226384894093j))
+        ref[0, 1, 1, 1]=(-0.780570763279-0.519444068981j)*o*x_ref[1]**(o-1)+((0.533973909988-0.599280537898j))
+        arg[0, 2, 0]=(0.255569556775-0.893629500723j)*x[0]**o+((0.48604866693-0.688099850954j))*x[0]+((-0.920073512817+0.137948550637j))*x[1]**o+((-0.518299100622-0.649279952606j))*x[1]
+        ref[0, 2, 0, 0]=(0.255569556775-0.893629500723j)*o*x_ref[0]**(o-1)+((0.48604866693-0.688099850954j))
+        ref[0, 2, 0, 1]=(-0.920073512817+0.137948550637j)*o*x_ref[1]**(o-1)+((-0.518299100622-0.649279952606j))
+        arg[0, 2, 1]=(-0.20825271768+0.697992266258j)*x[0]**o+((0.964724676097+0.464373666955j))*x[0]+((-0.715551986424-0.356098261343j))*x[1]**o+((0.556768033901-0.526192657061j))*x[1]
+        ref[0, 2, 1, 0]=(-0.20825271768+0.697992266258j)*o*x_ref[0]**(o-1)+((0.964724676097+0.464373666955j))
+        ref[0, 2, 1, 1]=(-0.715551986424-0.356098261343j)*o*x_ref[1]**(o-1)+((0.556768033901-0.526192657061j))
+        arg[1, 0, 0]=(-0.979678373731+0.627298310431j)*x[0]**o+((0.569557504583+0.0991859357945j))*x[0]+((-0.825730820486-0.69194700262j))*x[1]**o+((0.134917810158+0.129498412865j))*x[1]
+        ref[1, 0, 0, 0]=(-0.979678373731+0.627298310431j)*o*x_ref[0]**(o-1)+((0.569557504583+0.0991859357945j))
+        ref[1, 0, 0, 1]=(-0.825730820486-0.69194700262j)*o*x_ref[1]**(o-1)+((0.134917810158+0.129498412865j))
+        arg[1, 0, 1]=(0.860243578956-0.771209509502j)*x[0]**o+((-0.782783957891-0.860799811222j))*x[0]+((-0.283891493053-0.831888949678j))*x[1]**o+((0.0843026389252+0.0883641019458j))*x[1]
+        ref[1, 0, 1, 0]=(0.860243578956-0.771209509502j)*o*x_ref[0]**(o-1)+((-0.782783957891-0.860799811222j))
+        ref[1, 0, 1, 1]=(-0.283891493053-0.831888949678j)*o*x_ref[1]**(o-1)+((0.0843026389252+0.0883641019458j))
+        arg[1, 1, 0]=(-0.452843274726+0.497386542792j)*x[0]**o+((-0.593920731512-0.991287699768j))*x[0]+((0.912279849721+0.30286103967j))*x[1]**o+((0.791461669093-0.719330844581j))*x[1]
+        ref[1, 1, 0, 0]=(-0.452843274726+0.497386542792j)*o*x_ref[0]**(o-1)+((-0.593920731512-0.991287699768j))
+        ref[1, 1, 0, 1]=(0.912279849721+0.30286103967j)*o*x_ref[1]**(o-1)+((0.791461669093-0.719330844581j))
+        arg[1, 1, 1]=(0.558248240096-0.230509104277j)*x[0]**o+((0.702602717477-0.761644055565j))*x[0]+((0.678189139464-0.855204242437j))*x[1]**o+((0.653683632306-0.217137610126j))*x[1]
+        ref[1, 1, 1, 0]=(0.558248240096-0.230509104277j)*o*x_ref[0]**(o-1)+((0.702602717477-0.761644055565j))
+        ref[1, 1, 1, 1]=(0.678189139464-0.855204242437j)*o*x_ref[1]**(o-1)+((0.653683632306-0.217137610126j))
+        arg[1, 2, 0]=(0.375727648976-0.122393609163j)*x[0]**o+((0.244355606736-0.47642633595j))*x[0]+((0.217336348313+0.488923479418j))*x[1]**o+((-0.599340999264-0.826186354726j))*x[1]
+        ref[1, 2, 0, 0]=(0.375727648976-0.122393609163j)*o*x_ref[0]**(o-1)+((0.244355606736-0.47642633595j))
+        ref[1, 2, 0, 1]=(0.217336348313+0.488923479418j)*o*x_ref[1]**(o-1)+((-0.599340999264-0.826186354726j))
+        arg[1, 2, 1]=(0.897927422562-0.0519397581788j)*x[0]**o+((-0.207712564694+0.623614551154j))*x[0]+((-0.438691499588+0.625198920369j))*x[1]**o+((-0.109043961519-0.796250973302j))*x[1]
+        ref[1, 2, 1, 0]=(0.897927422562-0.0519397581788j)*o*x_ref[0]**(o-1)+((-0.207712564694+0.623614551154j))
+        ref[1, 2, 1, 1]=(-0.438691499588+0.625198920369j)*o*x_ref[1]**(o-1)+((-0.109043961519-0.796250973302j))
+        arg[2, 0, 0]=(0.18339207601-0.776835850244j)*x[0]**o+((-0.79575702711-0.583228693119j))*x[0]+((-0.578072471255-0.606924845786j))*x[1]**o+((0.62974770604-0.597880793165j))*x[1]
+        ref[2, 0, 0, 0]=(0.18339207601-0.776835850244j)*o*x_ref[0]**(o-1)+((-0.79575702711-0.583228693119j))
+        ref[2, 0, 0, 1]=(-0.578072471255-0.606924845786j)*o*x_ref[1]**(o-1)+((0.62974770604-0.597880793165j))
+        arg[2, 0, 1]=(0.710729002663+0.192333621517j)*x[0]**o+((0.184240604126+0.207747308141j))*x[0]+((0.284515710576-0.496624514021j))*x[1]**o+((0.522757245259+0.492772723591j))*x[1]
+        ref[2, 0, 1, 0]=(0.710729002663+0.192333621517j)*o*x_ref[0]**(o-1)+((0.184240604126+0.207747308141j))
+        ref[2, 0, 1, 1]=(0.284515710576-0.496624514021j)*o*x_ref[1]**(o-1)+((0.522757245259+0.492772723591j))
+        arg[2, 1, 0]=(-0.476809530569+0.501071609515j)*x[0]**o+((-0.983631136917+0.956615083211j))*x[0]+((0.515689009695-0.810937637827j))*x[1]**o+((0.614659031783+0.812481792196j))*x[1]
+        ref[2, 1, 0, 0]=(-0.476809530569+0.501071609515j)*o*x_ref[0]**(o-1)+((-0.983631136917+0.956615083211j))
+        ref[2, 1, 0, 1]=(0.515689009695-0.810937637827j)*o*x_ref[1]**(o-1)+((0.614659031783+0.812481792196j))
+        arg[2, 1, 1]=(-0.42993761268-0.42474406769j)*x[0]**o+((0.152978556998+0.709885564037j))*x[0]+((0.624360504816+0.778610401192j))*x[1]**o+((-0.508700858123-0.363954235263j))*x[1]
+        ref[2, 1, 1, 0]=(-0.42993761268-0.42474406769j)*o*x_ref[0]**(o-1)+((0.152978556998+0.709885564037j))
+        ref[2, 1, 1, 1]=(0.624360504816+0.778610401192j)*o*x_ref[1]**(o-1)+((-0.508700858123-0.363954235263j))
+        arg[2, 2, 0]=(-0.302821076674+0.214386302462j)*x[0]**o+((0.104577320592-0.137790859795j))*x[0]+((0.526451734781+0.762176744337j))*x[1]**o+((-0.0586267211044-0.475086759824j))*x[1]
+        ref[2, 2, 0, 0]=(-0.302821076674+0.214386302462j)*o*x_ref[0]**(o-1)+((0.104577320592-0.137790859795j))
+        ref[2, 2, 0, 1]=(0.526451734781+0.762176744337j)*o*x_ref[1]**(o-1)+((-0.0586267211044-0.475086759824j))
+        arg[2, 2, 1]=(0.488953944115+0.367496193161j)*x[0]**o+((-0.342016120716-0.31630457113j))*x[0]+((0.431290304916-0.156229616877j))*x[1]**o+((-0.733270989246+0.510455647114j))*x[1]
+        ref[2, 2, 1, 0]=(0.488953944115+0.367496193161j)*o*x_ref[0]**(o-1)+((-0.342016120716-0.31630457113j))
+        ref[2, 2, 1, 1]=(0.431290304916-0.156229616877j)*o*x_ref[1]**(o-1)+((-0.733270989246+0.510455647114j))
+        arg[3, 0, 0]=(0.491346674494-0.157570569113j)*x[0]**o+((-0.770392061202+0.131512281366j))*x[0]+((-0.668607177663+0.793400865467j))*x[1]**o+((-0.976698250624+0.0527066718652j))*x[1]
+        ref[3, 0, 0, 0]=(0.491346674494-0.157570569113j)*o*x_ref[0]**(o-1)+((-0.770392061202+0.131512281366j))
+        ref[3, 0, 0, 1]=(-0.668607177663+0.793400865467j)*o*x_ref[1]**(o-1)+((-0.976698250624+0.0527066718652j))
+        arg[3, 0, 1]=(-0.0619204873105+0.0482848060224j)*x[0]**o+((0.400325893744-0.824007513048j))*x[0]+((0.525195261199-0.629828838714j))*x[1]**o+((0.458947709752+0.963525860354j))*x[1]
+        ref[3, 0, 1, 0]=(-0.0619204873105+0.0482848060224j)*o*x_ref[0]**(o-1)+((0.400325893744-0.824007513048j))
+        ref[3, 0, 1, 1]=(0.525195261199-0.629828838714j)*o*x_ref[1]**(o-1)+((0.458947709752+0.963525860354j))
+        arg[3, 1, 0]=(-0.915547646353-0.620654448633j)*x[0]**o+((-0.846113424543+0.394021961357j))*x[0]+((0.177448450134-0.718067012123j))*x[1]**o+((-0.528042137155-0.987473748715j))*x[1]
+        ref[3, 1, 0, 0]=(-0.915547646353-0.620654448633j)*o*x_ref[0]**(o-1)+((-0.846113424543+0.394021961357j))
+        ref[3, 1, 0, 1]=(0.177448450134-0.718067012123j)*o*x_ref[1]**(o-1)+((-0.528042137155-0.987473748715j))
+        arg[3, 1, 1]=(-0.219664456819+0.551892467182j)*x[0]**o+((-0.613082801257-0.585132795854j))*x[0]+((0.213961578473-0.995491368699j))*x[1]**o+((0.384353918616-0.244965616484j))*x[1]
+        ref[3, 1, 1, 0]=(-0.219664456819+0.551892467182j)*o*x_ref[0]**(o-1)+((-0.613082801257-0.585132795854j))
+        ref[3, 1, 1, 1]=(0.213961578473-0.995491368699j)*o*x_ref[1]**(o-1)+((0.384353918616-0.244965616484j))
+        arg[3, 2, 0]=(-0.265001056188+0.667794963918j)*x[0]**o+((0.336942390541+0.96587876002j))*x[0]+((0.822924175852-0.901948975159j))*x[1]**o+((0.574649512226-0.783075232163j))*x[1]
+        ref[3, 2, 0, 0]=(-0.265001056188+0.667794963918j)*o*x_ref[0]**(o-1)+((0.336942390541+0.96587876002j))
+        ref[3, 2, 0, 1]=(0.822924175852-0.901948975159j)*o*x_ref[1]**(o-1)+((0.574649512226-0.783075232163j))
+        arg[3, 2, 1]=(0.639477096732+0.807963708751j)*x[0]**o+((-0.426351148837+0.315557559618j))*x[0]+((-0.0652011541463-0.323979031494j))*x[1]**o+((0.636564689595+0.255987593268j))*x[1]
+        ref[3, 2, 1, 0]=(0.639477096732+0.807963708751j)*o*x_ref[0]**(o-1)+((-0.426351148837+0.315557559618j))
+        ref[3, 2, 1, 1]=(-0.0652011541463-0.323979031494j)*o*x_ref[1]**(o-1)+((0.636564689595+0.255987593268j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.662533239389+0.573369324895j)*x[2]**o+((-0.66685083459-0.750648542226j))*x[2]
+            ref[0, 0, 0, 2]=(-0.662533239389+0.573369324895j)*o*x_ref[2]**(o-1)+((-0.66685083459-0.750648542226j))
+            arg[0, 0, 1]+=(0.488476249128+0.835754672465j)*x[2]**o+((0.850199326216-0.504560394309j))*x[2]
+            ref[0, 0, 1, 2]=(0.488476249128+0.835754672465j)*o*x_ref[2]**(o-1)+((0.850199326216-0.504560394309j))
+            arg[0, 1, 0]+=(-0.345343119565+0.688625696212j)*x[2]**o+((0.501966557817-0.149462916046j))*x[2]
+            ref[0, 1, 0, 2]=(-0.345343119565+0.688625696212j)*o*x_ref[2]**(o-1)+((0.501966557817-0.149462916046j))
+            arg[0, 1, 1]+=(0.0351804445506+0.0687760317914j)*x[2]**o+((0.598713256-0.956074196154j))*x[2]
+            ref[0, 1, 1, 2]=(0.0351804445506+0.0687760317914j)*o*x_ref[2]**(o-1)+((0.598713256-0.956074196154j))
+            arg[0, 2, 0]+=(0.524634633954+0.640745600371j)*x[2]**o+((-0.631297276285-0.169037772843j))*x[2]
+            ref[0, 2, 0, 2]=(0.524634633954+0.640745600371j)*o*x_ref[2]**(o-1)+((-0.631297276285-0.169037772843j))
+            arg[0, 2, 1]+=(-0.503034963893+0.712722882005j)*x[2]**o+((0.389292532661-0.563525409676j))*x[2]
+            ref[0, 2, 1, 2]=(-0.503034963893+0.712722882005j)*o*x_ref[2]**(o-1)+((0.389292532661-0.563525409676j))
+            arg[1, 0, 0]+=(0.432602105389-0.708149218497j)*x[2]**o+((0.857773490227+0.982512131798j))*x[2]
+            ref[1, 0, 0, 2]=(0.432602105389-0.708149218497j)*o*x_ref[2]**(o-1)+((0.857773490227+0.982512131798j))
+            arg[1, 0, 1]+=(0.991433529008+0.769378690074j)*x[2]**o+((-0.751211836307-0.284150195503j))*x[2]
+            ref[1, 0, 1, 2]=(0.991433529008+0.769378690074j)*o*x_ref[2]**(o-1)+((-0.751211836307-0.284150195503j))
+            arg[1, 1, 0]+=(0.245538629579-0.856346439669j)*x[2]**o+((0.670127130457-0.520137831819j))*x[2]
+            ref[1, 1, 0, 2]=(0.245538629579-0.856346439669j)*o*x_ref[2]**(o-1)+((0.670127130457-0.520137831819j))
+            arg[1, 1, 1]+=(0.295935614496+0.849967281993j)*x[2]**o+((0.0835118240775+0.153808190031j))*x[2]
+            ref[1, 1, 1, 2]=(0.295935614496+0.849967281993j)*o*x_ref[2]**(o-1)+((0.0835118240775+0.153808190031j))
+            arg[1, 2, 0]+=(0.629370770436-0.458509213977j)*x[2]**o+((-0.314667372265-0.748332589185j))*x[2]
+            ref[1, 2, 0, 2]=(0.629370770436-0.458509213977j)*o*x_ref[2]**(o-1)+((-0.314667372265-0.748332589185j))
+            arg[1, 2, 1]+=(-0.832243458831-0.760078710786j)*x[2]**o+((0.365596004534-0.720480950457j))*x[2]
+            ref[1, 2, 1, 2]=(-0.832243458831-0.760078710786j)*o*x_ref[2]**(o-1)+((0.365596004534-0.720480950457j))
+            arg[2, 0, 0]+=(0.93452260645+0.287575454339j)*x[2]**o+((0.100108933033-0.421884809666j))*x[2]
+            ref[2, 0, 0, 2]=(0.93452260645+0.287575454339j)*o*x_ref[2]**(o-1)+((0.100108933033-0.421884809666j))
+            arg[2, 0, 1]+=(-0.63455953166+0.893465328996j)*x[2]**o+((0.835001998343+0.150005342251j))*x[2]
+            ref[2, 0, 1, 2]=(-0.63455953166+0.893465328996j)*o*x_ref[2]**(o-1)+((0.835001998343+0.150005342251j))
+            arg[2, 1, 0]+=(-0.631839283655+0.499857028479j)*x[2]**o+((-0.937462012422+0.54866619262j))*x[2]
+            ref[2, 1, 0, 2]=(-0.631839283655+0.499857028479j)*o*x_ref[2]**(o-1)+((-0.937462012422+0.54866619262j))
+            arg[2, 1, 1]+=(0.470039103556+0.0399619122114j)*x[2]**o+((0.168734521815-0.0926863478719j))*x[2]
+            ref[2, 1, 1, 2]=(0.470039103556+0.0399619122114j)*o*x_ref[2]**(o-1)+((0.168734521815-0.0926863478719j))
+            arg[2, 2, 0]+=(-0.39241100971-0.578745195982j)*x[2]**o+((0.504346307416-0.108210128876j))*x[2]
+            ref[2, 2, 0, 2]=(-0.39241100971-0.578745195982j)*o*x_ref[2]**(o-1)+((0.504346307416-0.108210128876j))
+            arg[2, 2, 1]+=(-0.634424783834-0.793387848993j)*x[2]**o+((-0.26991002198+0.105544545079j))*x[2]
+            ref[2, 2, 1, 2]=(-0.634424783834-0.793387848993j)*o*x_ref[2]**(o-1)+((-0.26991002198+0.105544545079j))
+            arg[3, 0, 0]+=(-0.462161399319+0.910311400359j)*x[2]**o+((-0.013958514263-0.160727819434j))*x[2]
+            ref[3, 0, 0, 2]=(-0.462161399319+0.910311400359j)*o*x_ref[2]**(o-1)+((-0.013958514263-0.160727819434j))
+            arg[3, 0, 1]+=(-0.0751618273084-0.599332134531j)*x[2]**o+((-0.754694907707-0.637658345318j))*x[2]
+            ref[3, 0, 1, 2]=(-0.0751618273084-0.599332134531j)*o*x_ref[2]**(o-1)+((-0.754694907707-0.637658345318j))
+            arg[3, 1, 0]+=(0.936961963702-0.51042385577j)*x[2]**o+((-0.799409771222+0.641845555394j))*x[2]
+            ref[3, 1, 0, 2]=(0.936961963702-0.51042385577j)*o*x_ref[2]**(o-1)+((-0.799409771222+0.641845555394j))
+            arg[3, 1, 1]+=(-0.967322087006+0.365099022192j)*x[2]**o+((-0.267352925701-0.0199637470112j))*x[2]
+            ref[3, 1, 1, 2]=(-0.967322087006+0.365099022192j)*o*x_ref[2]**(o-1)+((-0.267352925701-0.0199637470112j))
+            arg[3, 2, 0]+=(-0.419349855967+0.0182677935657j)*x[2]**o+((-0.859668986795-0.127861296527j))*x[2]
+            ref[3, 2, 0, 2]=(-0.419349855967+0.0182677935657j)*o*x_ref[2]**(o-1)+((-0.859668986795-0.127861296527j))
+            arg[3, 2, 1]+=(-0.94621163835-0.845614407011j)*x[2]**o+((-0.961767678568-0.806437797957j))*x[2]
+            ref[3, 2, 1, 2]=(-0.94621163835-0.845614407011j)*o*x_ref[2]**(o-1)+((-0.961767678568-0.806437797957j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.764791191104-0.556832200489j)*x[0]+((0.810207633568-0.594978349408j))*x[1]
+        ref[0]=(0.764791191104-0.556832200489j)
+        ref[1]=(0.810207633568-0.594978349408j)
+        if dim==3:
+            arg+=((0.117737240779+0.114448110892j))*x[2]
+            ref[2]=(0.117737240779+0.114448110892j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(-0.806578595831-0.661577903754j)*x[0]+((0.832098318261-0.912515065035j))*x[1]
+        ref[0, 0]=(-0.806578595831-0.661577903754j)
+        ref[0, 1]=(0.832098318261-0.912515065035j)
+        arg[1,]=(0.530504930676-0.888236095155j)*x[0]+((-0.324088952505+0.618908647792j))*x[1]
+        ref[1, 0]=(0.530504930676-0.888236095155j)
+        ref[1, 1]=(-0.324088952505+0.618908647792j)
+        arg[2,]=(-0.380435014166-0.957165574398j)*x[0]+((0.394835515301-0.545238640654j))*x[1]
+        ref[2, 0]=(-0.380435014166-0.957165574398j)
+        ref[2, 1]=(0.394835515301-0.545238640654j)
+        if dim==3:
+            arg[0,]+=(0.45453604398-0.167464458223j)*x[2]
+            ref[0, 2]=(0.45453604398-0.167464458223j)
+            arg[1,]+=(0.517343771561-0.00626834079677j)*x[2]
+            ref[1, 2]=(0.517343771561-0.00626834079677j)
+            arg[2,]+=(0.368444129454-0.551194080108j)*x[2]
+            ref[2, 2]=(0.368444129454-0.551194080108j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.879182094085-0.922091121985j)*x[0]+((0.327862807272+0.832397929588j))*x[1]
+        ref[0, 0, 0]=(-0.879182094085-0.922091121985j)
+        ref[0, 0, 1]=(0.327862807272+0.832397929588j)
+        arg[0, 1]=(-0.152261819653-0.139784746694j)*x[0]+((-0.932522737122-0.602564360511j))*x[1]
+        ref[0, 1, 0]=(-0.152261819653-0.139784746694j)
+        ref[0, 1, 1]=(-0.932522737122-0.602564360511j)
+        arg[0, 2]=(0.227150114304+0.942571242949j)*x[0]+((0.812936200119-0.55254008665j))*x[1]
+        ref[0, 2, 0]=(0.227150114304+0.942571242949j)
+        ref[0, 2, 1]=(0.812936200119-0.55254008665j)
+        arg[0, 3]=(0.244196467213+0.978657132804j)*x[0]+((0.608264628854+0.665858291991j))*x[1]
+        ref[0, 3, 0]=(0.244196467213+0.978657132804j)
+        ref[0, 3, 1]=(0.608264628854+0.665858291991j)
+        arg[1, 0]=(0.0736386791122+0.899113559526j)*x[0]+((0.0601755131235+0.599129384328j))*x[1]
+        ref[1, 0, 0]=(0.0736386791122+0.899113559526j)
+        ref[1, 0, 1]=(0.0601755131235+0.599129384328j)
+        arg[1, 1]=(-0.9949376022-0.994712986834j)*x[0]+((0.750176651358+0.963811676864j))*x[1]
+        ref[1, 1, 0]=(-0.9949376022-0.994712986834j)
+        ref[1, 1, 1]=(0.750176651358+0.963811676864j)
+        arg[1, 2]=(-0.825001025519-0.874905297367j)*x[0]+((-0.30910191519-0.2571891576j))*x[1]
+        ref[1, 2, 0]=(-0.825001025519-0.874905297367j)
+        ref[1, 2, 1]=(-0.30910191519-0.2571891576j)
+        arg[1, 3]=(-0.403982695288-0.147460339691j)*x[0]+((0.975465216179+0.129457048394j))*x[1]
+        ref[1, 3, 0]=(-0.403982695288-0.147460339691j)
+        ref[1, 3, 1]=(0.975465216179+0.129457048394j)
+        arg[2, 0]=(0.375790983056-0.680303037491j)*x[0]+((0.250070438957+0.457073332768j))*x[1]
+        ref[2, 0, 0]=(0.375790983056-0.680303037491j)
+        ref[2, 0, 1]=(0.250070438957+0.457073332768j)
+        arg[2, 1]=(0.824783951674-0.377071251108j)*x[0]+((0.663190299495-0.24155766475j))*x[1]
+        ref[2, 1, 0]=(0.824783951674-0.377071251108j)
+        ref[2, 1, 1]=(0.663190299495-0.24155766475j)
+        arg[2, 2]=(0.719632573405+0.569207439157j)*x[0]+((-0.3063574067+0.673727452186j))*x[1]
+        ref[2, 2, 0]=(0.719632573405+0.569207439157j)
+        ref[2, 2, 1]=(-0.3063574067+0.673727452186j)
+        arg[2, 3]=(-0.719430186804+0.156718943018j)*x[0]+((0.477176533653+0.0572187957196j))*x[1]
+        ref[2, 3, 0]=(-0.719430186804+0.156718943018j)
+        ref[2, 3, 1]=(0.477176533653+0.0572187957196j)
+        arg[3, 0]=(-0.158303280096-0.636590199785j)*x[0]+((-0.41378484152-0.777363701068j))*x[1]
+        ref[3, 0, 0]=(-0.158303280096-0.636590199785j)
+        ref[3, 0, 1]=(-0.41378484152-0.777363701068j)
+        arg[3, 1]=(-0.406579797314-0.186616369419j)*x[0]+((-0.867207560938-0.138502865759j))*x[1]
+        ref[3, 1, 0]=(-0.406579797314-0.186616369419j)
+        ref[3, 1, 1]=(-0.867207560938-0.138502865759j)
+        arg[3, 2]=(0.574496203056-0.372132490784j)*x[0]+((-0.700262987785-0.472195229493j))*x[1]
+        ref[3, 2, 0]=(0.574496203056-0.372132490784j)
+        ref[3, 2, 1]=(-0.700262987785-0.472195229493j)
+        arg[3, 3]=(0.0170537849199+0.444932895649j)*x[0]+((0.4324664108-0.336294478804j))*x[1]
+        ref[3, 3, 0]=(0.0170537849199+0.444932895649j)
+        ref[3, 3, 1]=(0.4324664108-0.336294478804j)
+        if dim==3:
+            arg[0, 0]+=(-0.645350230978-0.18305715218j)*x[2]
+            ref[0, 0, 2]=(-0.645350230978-0.18305715218j)
+            arg[0, 1]+=(0.466020229114-0.861325019202j)*x[2]
+            ref[0, 1, 2]=(0.466020229114-0.861325019202j)
+            arg[0, 2]+=(0.315430903982+0.0808288343865j)*x[2]
+            ref[0, 2, 2]=(0.315430903982+0.0808288343865j)
+            arg[0, 3]+=(-0.462476833364-0.413826354265j)*x[2]
+            ref[0, 3, 2]=(-0.462476833364-0.413826354265j)
+            arg[1, 0]+=(-0.329150987778-0.125428074937j)*x[2]
+            ref[1, 0, 2]=(-0.329150987778-0.125428074937j)
+            arg[1, 1]+=(0.750668665705+0.360091930742j)*x[2]
+            ref[1, 1, 2]=(0.750668665705+0.360091930742j)
+            arg[1, 2]+=(-0.168753218825-0.650710035034j)*x[2]
+            ref[1, 2, 2]=(-0.168753218825-0.650710035034j)
+            arg[1, 3]+=(0.314916495361+0.417151655316j)*x[2]
+            ref[1, 3, 2]=(0.314916495361+0.417151655316j)
+            arg[2, 0]+=(-0.900052055281+0.042171285763j)*x[2]
+            ref[2, 0, 2]=(-0.900052055281+0.042171285763j)
+            arg[2, 1]+=(-0.279716781283-0.292922519583j)*x[2]
+            ref[2, 1, 2]=(-0.279716781283-0.292922519583j)
+            arg[2, 2]+=(-0.81077217778-0.18759482826j)*x[2]
+            ref[2, 2, 2]=(-0.81077217778-0.18759482826j)
+            arg[2, 3]+=(0.600635921357+0.208597166462j)*x[2]
+            ref[2, 3, 2]=(0.600635921357+0.208597166462j)
+            arg[3, 0]+=(-0.14751109548+0.214879961788j)*x[2]
+            ref[3, 0, 2]=(-0.14751109548+0.214879961788j)
+            arg[3, 1]+=(0.152656513493+0.686217769255j)*x[2]
+            ref[3, 1, 2]=(0.152656513493+0.686217769255j)
+            arg[3, 2]+=(-0.491234050973-0.362183574699j)*x[2]
+            ref[3, 2, 2]=(-0.491234050973-0.362183574699j)
+            arg[3, 3]+=(0.723434950166+0.61502854585j)*x[2]
+            ref[3, 3, 2]=(0.723434950166+0.61502854585j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3),w)
+        ref = Data(0,(3, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.468284333114-0.92640478288j)*x[0]+((0.316151603524-0.0113781781865j))*x[1]
+        ref[0, 0, 0, 0]=(0.468284333114-0.92640478288j)
+        ref[0, 0, 0, 1]=(0.316151603524-0.0113781781865j)
+        arg[0, 0, 1]=(0.443517382327-0.444841721154j)*x[0]+((-0.637304820112+0.659176577599j))*x[1]
+        ref[0, 0, 1, 0]=(0.443517382327-0.444841721154j)
+        ref[0, 0, 1, 1]=(-0.637304820112+0.659176577599j)
+        arg[0, 0, 2]=(0.884267003309+0.709756818381j)*x[0]+((0.879955772589-0.182058618686j))*x[1]
+        ref[0, 0, 2, 0]=(0.884267003309+0.709756818381j)
+        ref[0, 0, 2, 1]=(0.879955772589-0.182058618686j)
+        arg[0, 1, 0]=(0.933241439406-0.770495761191j)*x[0]+((-0.704387959309-0.975103037342j))*x[1]
+        ref[0, 1, 0, 0]=(0.933241439406-0.770495761191j)
+        ref[0, 1, 0, 1]=(-0.704387959309-0.975103037342j)
+        arg[0, 1, 1]=(0.0513294217705+0.444831325531j)*x[0]+((0.161756943347+0.883985161779j))*x[1]
+        ref[0, 1, 1, 0]=(0.0513294217705+0.444831325531j)
+        ref[0, 1, 1, 1]=(0.161756943347+0.883985161779j)
+        arg[0, 1, 2]=(0.353365519091+0.970932500651j)*x[0]+((-0.833221834194-0.606032595561j))*x[1]
+        ref[0, 1, 2, 0]=(0.353365519091+0.970932500651j)
+        ref[0, 1, 2, 1]=(-0.833221834194-0.606032595561j)
+        arg[0, 2, 0]=(0.395116156532-0.0359110641202j)*x[0]+((-0.513582692084+0.517863667073j))*x[1]
+        ref[0, 2, 0, 0]=(0.395116156532-0.0359110641202j)
+        ref[0, 2, 0, 1]=(-0.513582692084+0.517863667073j)
+        arg[0, 2, 1]=(-0.528913646601-0.674821109586j)*x[0]+((-0.652355063103-0.643478136104j))*x[1]
+        ref[0, 2, 1, 0]=(-0.528913646601-0.674821109586j)
+        ref[0, 2, 1, 1]=(-0.652355063103-0.643478136104j)
+        arg[0, 2, 2]=(-0.709742942124+0.580057300051j)*x[0]+((-0.503657281993+0.0839447052578j))*x[1]
+        ref[0, 2, 2, 0]=(-0.709742942124+0.580057300051j)
+        ref[0, 2, 2, 1]=(-0.503657281993+0.0839447052578j)
+        arg[0, 3, 0]=(0.510591339616+0.623703596254j)*x[0]+((-0.0731226524959-0.39651611245j))*x[1]
+        ref[0, 3, 0, 0]=(0.510591339616+0.623703596254j)
+        ref[0, 3, 0, 1]=(-0.0731226524959-0.39651611245j)
+        arg[0, 3, 1]=(0.836205641785-0.638730259454j)*x[0]+((0.819722020799+0.788686232478j))*x[1]
+        ref[0, 3, 1, 0]=(0.836205641785-0.638730259454j)
+        ref[0, 3, 1, 1]=(0.819722020799+0.788686232478j)
+        arg[0, 3, 2]=(0.508965280446-0.534003225917j)*x[0]+((-0.913038820037-0.605117384163j))*x[1]
+        ref[0, 3, 2, 0]=(0.508965280446-0.534003225917j)
+        ref[0, 3, 2, 1]=(-0.913038820037-0.605117384163j)
+        arg[1, 0, 0]=(0.177060104917-0.14145962283j)*x[0]+((-0.620699701288+0.453635096919j))*x[1]
+        ref[1, 0, 0, 0]=(0.177060104917-0.14145962283j)
+        ref[1, 0, 0, 1]=(-0.620699701288+0.453635096919j)
+        arg[1, 0, 1]=(0.148316128604-0.542612455539j)*x[0]+((-0.0557715190378-0.397282046971j))*x[1]
+        ref[1, 0, 1, 0]=(0.148316128604-0.542612455539j)
+        ref[1, 0, 1, 1]=(-0.0557715190378-0.397282046971j)
+        arg[1, 0, 2]=(0.914821510379-0.339375425208j)*x[0]+((0.659835392892-0.284764126615j))*x[1]
+        ref[1, 0, 2, 0]=(0.914821510379-0.339375425208j)
+        ref[1, 0, 2, 1]=(0.659835392892-0.284764126615j)
+        arg[1, 1, 0]=(0.796619473462+0.0715912556094j)*x[0]+((-0.377823624066+0.569776434191j))*x[1]
+        ref[1, 1, 0, 0]=(0.796619473462+0.0715912556094j)
+        ref[1, 1, 0, 1]=(-0.377823624066+0.569776434191j)
+        arg[1, 1, 1]=(0.743563472581+0.507833158399j)*x[0]+((-0.501177587664+0.656794583694j))*x[1]
+        ref[1, 1, 1, 0]=(0.743563472581+0.507833158399j)
+        ref[1, 1, 1, 1]=(-0.501177587664+0.656794583694j)
+        arg[1, 1, 2]=(-0.377553679874-0.984257879015j)*x[0]+((0.353552695189+0.516463808779j))*x[1]
+        ref[1, 1, 2, 0]=(-0.377553679874-0.984257879015j)
+        ref[1, 1, 2, 1]=(0.353552695189+0.516463808779j)
+        arg[1, 2, 0]=(-0.382438807119+0.861232491466j)*x[0]+((0.461980285397+0.911527193096j))*x[1]
+        ref[1, 2, 0, 0]=(-0.382438807119+0.861232491466j)
+        ref[1, 2, 0, 1]=(0.461980285397+0.911527193096j)
+        arg[1, 2, 1]=(0.428806374074-0.213648699204j)*x[0]+((-0.121165778985+0.169030920555j))*x[1]
+        ref[1, 2, 1, 0]=(0.428806374074-0.213648699204j)
+        ref[1, 2, 1, 1]=(-0.121165778985+0.169030920555j)
+        arg[1, 2, 2]=(-0.081917283383-0.74417037969j)*x[0]+((0.875964757259-0.343086909423j))*x[1]
+        ref[1, 2, 2, 0]=(-0.081917283383-0.74417037969j)
+        ref[1, 2, 2, 1]=(0.875964757259-0.343086909423j)
+        arg[1, 3, 0]=(0.787080048129-0.354340211793j)*x[0]+((0.875000000968-0.3049434585j))*x[1]
+        ref[1, 3, 0, 0]=(0.787080048129-0.354340211793j)
+        ref[1, 3, 0, 1]=(0.875000000968-0.3049434585j)
+        arg[1, 3, 1]=(0.704124994087-0.528901691521j)*x[0]+((-0.112611562586+0.366387186487j))*x[1]
+        ref[1, 3, 1, 0]=(0.704124994087-0.528901691521j)
+        ref[1, 3, 1, 1]=(-0.112611562586+0.366387186487j)
+        arg[1, 3, 2]=(-0.354128925927+0.870448596728j)*x[0]+((-0.626580914192-0.421320575852j))*x[1]
+        ref[1, 3, 2, 0]=(-0.354128925927+0.870448596728j)
+        ref[1, 3, 2, 1]=(-0.626580914192-0.421320575852j)
+        arg[2, 0, 0]=(-0.832523493125-0.827021990746j)*x[0]+((-0.152344911997+0.0334857663831j))*x[1]
+        ref[2, 0, 0, 0]=(-0.832523493125-0.827021990746j)
+        ref[2, 0, 0, 1]=(-0.152344911997+0.0334857663831j)
+        arg[2, 0, 1]=(-0.291192038648+0.306703089998j)*x[0]+((0.726078023153-0.850614193506j))*x[1]
+        ref[2, 0, 1, 0]=(-0.291192038648+0.306703089998j)
+        ref[2, 0, 1, 1]=(0.726078023153-0.850614193506j)
+        arg[2, 0, 2]=(0.962955520135+0.356934712577j)*x[0]+((-0.289907949037-0.583159173447j))*x[1]
+        ref[2, 0, 2, 0]=(0.962955520135+0.356934712577j)
+        ref[2, 0, 2, 1]=(-0.289907949037-0.583159173447j)
+        arg[2, 1, 0]=(-0.76097963792+0.299848494293j)*x[0]+((-0.519323514901+0.389048839424j))*x[1]
+        ref[2, 1, 0, 0]=(-0.76097963792+0.299848494293j)
+        ref[2, 1, 0, 1]=(-0.519323514901+0.389048839424j)
+        arg[2, 1, 1]=(-0.925356871658-0.411677376962j)*x[0]+((-0.475760821111-0.232593525101j))*x[1]
+        ref[2, 1, 1, 0]=(-0.925356871658-0.411677376962j)
+        ref[2, 1, 1, 1]=(-0.475760821111-0.232593525101j)
+        arg[2, 1, 2]=(-0.0853116395133+0.893982193595j)*x[0]+((-0.133937810739+0.499175134582j))*x[1]
+        ref[2, 1, 2, 0]=(-0.0853116395133+0.893982193595j)
+        ref[2, 1, 2, 1]=(-0.133937810739+0.499175134582j)
+        arg[2, 2, 0]=(0.776051133069+0.927221145193j)*x[0]+((-0.236119478582-0.336848533312j))*x[1]
+        ref[2, 2, 0, 0]=(0.776051133069+0.927221145193j)
+        ref[2, 2, 0, 1]=(-0.236119478582-0.336848533312j)
+        arg[2, 2, 1]=(0.927460292169-0.228923959325j)*x[0]+((0.0965656559703-0.136360413958j))*x[1]
+        ref[2, 2, 1, 0]=(0.927460292169-0.228923959325j)
+        ref[2, 2, 1, 1]=(0.0965656559703-0.136360413958j)
+        arg[2, 2, 2]=(-0.180944474124+0.678272323322j)*x[0]+((0.766578064175+0.74747408286j))*x[1]
+        ref[2, 2, 2, 0]=(-0.180944474124+0.678272323322j)
+        ref[2, 2, 2, 1]=(0.766578064175+0.74747408286j)
+        arg[2, 3, 0]=(-0.941764976103+0.317438646316j)*x[0]+((-0.623021200166-0.154983540483j))*x[1]
+        ref[2, 3, 0, 0]=(-0.941764976103+0.317438646316j)
+        ref[2, 3, 0, 1]=(-0.623021200166-0.154983540483j)
+        arg[2, 3, 1]=(0.108097826644-0.999150602318j)*x[0]+((0.878330514471-0.892014422241j))*x[1]
+        ref[2, 3, 1, 0]=(0.108097826644-0.999150602318j)
+        ref[2, 3, 1, 1]=(0.878330514471-0.892014422241j)
+        arg[2, 3, 2]=(-0.624291744827+0.38729282139j)*x[0]+((0.971210579476-0.759886466317j))*x[1]
+        ref[2, 3, 2, 0]=(-0.624291744827+0.38729282139j)
+        ref[2, 3, 2, 1]=(0.971210579476-0.759886466317j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.342597280132-0.0876853220686j)*x[2]
+            ref[0, 0, 0, 2]=(-0.342597280132-0.0876853220686j)
+            arg[0, 0, 1]+=(-0.224531717762-0.661945550024j)*x[2]
+            ref[0, 0, 1, 2]=(-0.224531717762-0.661945550024j)
+            arg[0, 0, 2]+=(-0.602013067168+0.651586519688j)*x[2]
+            ref[0, 0, 2, 2]=(-0.602013067168+0.651586519688j)
+            arg[0, 1, 0]+=(0.453557615201+0.751710091847j)*x[2]
+            ref[0, 1, 0, 2]=(0.453557615201+0.751710091847j)
+            arg[0, 1, 1]+=(0.10157529508-0.32883219354j)*x[2]
+            ref[0, 1, 1, 2]=(0.10157529508-0.32883219354j)
+            arg[0, 1, 2]+=(0.168438650197-0.0938560397286j)*x[2]
+            ref[0, 1, 2, 2]=(0.168438650197-0.0938560397286j)
+            arg[0, 2, 0]+=(-0.571176039668-0.124655557841j)*x[2]
+            ref[0, 2, 0, 2]=(-0.571176039668-0.124655557841j)
+            arg[0, 2, 1]+=(-0.0560380673318+0.534806242964j)*x[2]
+            ref[0, 2, 1, 2]=(-0.0560380673318+0.534806242964j)
+            arg[0, 2, 2]+=(-0.133672521891+0.668001681549j)*x[2]
+            ref[0, 2, 2, 2]=(-0.133672521891+0.668001681549j)
+            arg[0, 3, 0]+=(0.455513548969+0.326588419456j)*x[2]
+            ref[0, 3, 0, 2]=(0.455513548969+0.326588419456j)
+            arg[0, 3, 1]+=(-0.765606505924+0.894104201624j)*x[2]
+            ref[0, 3, 1, 2]=(-0.765606505924+0.894104201624j)
+            arg[0, 3, 2]+=(-0.398517621269-0.577493483599j)*x[2]
+            ref[0, 3, 2, 2]=(-0.398517621269-0.577493483599j)
+            arg[1, 0, 0]+=(-0.380586719716+0.711357409596j)*x[2]
+            ref[1, 0, 0, 2]=(-0.380586719716+0.711357409596j)
+            arg[1, 0, 1]+=(0.679482727426+0.336401813592j)*x[2]
+            ref[1, 0, 1, 2]=(0.679482727426+0.336401813592j)
+            arg[1, 0, 2]+=(-0.514885238635+0.625736379565j)*x[2]
+            ref[1, 0, 2, 2]=(-0.514885238635+0.625736379565j)
+            arg[1, 1, 0]+=(0.363968298936+0.486457523j)*x[2]
+            ref[1, 1, 0, 2]=(0.363968298936+0.486457523j)
+            arg[1, 1, 1]+=(-0.478305784334-0.735900001684j)*x[2]
+            ref[1, 1, 1, 2]=(-0.478305784334-0.735900001684j)
+            arg[1, 1, 2]+=(0.479864634057+0.826120969173j)*x[2]
+            ref[1, 1, 2, 2]=(0.479864634057+0.826120969173j)
+            arg[1, 2, 0]+=(0.503069580733+0.282854034338j)*x[2]
+            ref[1, 2, 0, 2]=(0.503069580733+0.282854034338j)
+            arg[1, 2, 1]+=(-0.151594408772+0.048468622358j)*x[2]
+            ref[1, 2, 1, 2]=(-0.151594408772+0.048468622358j)
+            arg[1, 2, 2]+=(-0.313028708038+0.104858611973j)*x[2]
+            ref[1, 2, 2, 2]=(-0.313028708038+0.104858611973j)
+            arg[1, 3, 0]+=(0.576636599364+0.993166426468j)*x[2]
+            ref[1, 3, 0, 2]=(0.576636599364+0.993166426468j)
+            arg[1, 3, 1]+=(-0.064315052257-0.14231271784j)*x[2]
+            ref[1, 3, 1, 2]=(-0.064315052257-0.14231271784j)
+            arg[1, 3, 2]+=(-0.302145930686+0.371553110768j)*x[2]
+            ref[1, 3, 2, 2]=(-0.302145930686+0.371553110768j)
+            arg[2, 0, 0]+=(-0.154677845742+0.669648343799j)*x[2]
+            ref[2, 0, 0, 2]=(-0.154677845742+0.669648343799j)
+            arg[2, 0, 1]+=(-0.716768047205-0.982041739027j)*x[2]
+            ref[2, 0, 1, 2]=(-0.716768047205-0.982041739027j)
+            arg[2, 0, 2]+=(-0.240334003123+0.614325961223j)*x[2]
+            ref[2, 0, 2, 2]=(-0.240334003123+0.614325961223j)
+            arg[2, 1, 0]+=(-0.704016662603-0.258980681807j)*x[2]
+            ref[2, 1, 0, 2]=(-0.704016662603-0.258980681807j)
+            arg[2, 1, 1]+=(0.602194587923+0.321396055263j)*x[2]
+            ref[2, 1, 1, 2]=(0.602194587923+0.321396055263j)
+            arg[2, 1, 2]+=(0.724907696828-0.587027142949j)*x[2]
+            ref[2, 1, 2, 2]=(0.724907696828-0.587027142949j)
+            arg[2, 2, 0]+=(-0.944243011751-0.341856062623j)*x[2]
+            ref[2, 2, 0, 2]=(-0.944243011751-0.341856062623j)
+            arg[2, 2, 1]+=(-0.568797984988+0.700960449507j)*x[2]
+            ref[2, 2, 1, 2]=(-0.568797984988+0.700960449507j)
+            arg[2, 2, 2]+=(-0.305211562296+0.934789115012j)*x[2]
+            ref[2, 2, 2, 2]=(-0.305211562296+0.934789115012j)
+            arg[2, 3, 0]+=(0.540472648256-0.243011824381j)*x[2]
+            ref[2, 3, 0, 2]=(0.540472648256-0.243011824381j)
+            arg[2, 3, 1]+=(-0.147192078451-0.717037848369j)*x[2]
+            ref[2, 3, 1, 2]=(-0.147192078451-0.717037848369j)
+            arg[2, 3, 2]+=(-0.312855297009-0.854214776132j)*x[2]
+            ref[2, 3, 2, 2]=(-0.312855297009-0.854214776132j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.663146636926-0.648679178189j)*x[0]+((0.931614880867+0.636616453321j))*x[1]
+        ref[0]=(0.663146636926-0.648679178189j)
+        ref[1]=(0.931614880867+0.636616453321j)
+        if dim==3:
+            arg+=((0.973004556098-0.837761416254j))*x[2]
+            ref[2]=(0.973004556098-0.837761416254j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(0.920060493066-0.288094807866j)*x[0]+((-0.64877519684+0.226538980166j))*x[1]
+        ref[0, 0]=(0.920060493066-0.288094807866j)
+        ref[0, 1]=(-0.64877519684+0.226538980166j)
+        arg[1,]=(-0.517468847815-0.815399525512j)*x[0]+((0.670626650081-0.534114740539j))*x[1]
+        ref[1, 0]=(-0.517468847815-0.815399525512j)
+        ref[1, 1]=(0.670626650081-0.534114740539j)
+        arg[2,]=(-0.897345376815+0.781568869652j)*x[0]+((0.790795232473-0.8065828475j))*x[1]
+        ref[2, 0]=(-0.897345376815+0.781568869652j)
+        ref[2, 1]=(0.790795232473-0.8065828475j)
+        if dim==3:
+            arg[0,]+=(-0.750192286387+0.53988353112j)*x[2]
+            ref[0, 2]=(-0.750192286387+0.53988353112j)
+            arg[1,]+=(0.737000239324+0.830274731899j)*x[2]
+            ref[1, 2]=(0.737000239324+0.830274731899j)
+            arg[2,]+=(0.198530934104-0.296502310841j)*x[2]
+            ref[2, 2]=(0.198530934104-0.296502310841j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.591446576467-0.705556423428j)*x[0]+((-0.375690162551+0.0343451849027j))*x[1]
+        ref[0, 0, 0]=(-0.591446576467-0.705556423428j)
+        ref[0, 0, 1]=(-0.375690162551+0.0343451849027j)
+        arg[0, 1]=(-0.933456326673-0.771724745114j)*x[0]+((-0.18641397473+0.0741459268436j))*x[1]
+        ref[0, 1, 0]=(-0.933456326673-0.771724745114j)
+        ref[0, 1, 1]=(-0.18641397473+0.0741459268436j)
+        arg[1, 0]=(-0.585142723008+0.324861983966j)*x[0]+((-0.531023120964-0.00104070677075j))*x[1]
+        ref[1, 0, 0]=(-0.585142723008+0.324861983966j)
+        ref[1, 0, 1]=(-0.531023120964-0.00104070677075j)
+        arg[1, 1]=(0.414565202503-0.450262051328j)*x[0]+((0.591460136191+0.857062484029j))*x[1]
+        ref[1, 1, 0]=(0.414565202503-0.450262051328j)
+        ref[1, 1, 1]=(0.591460136191+0.857062484029j)
+        arg[2, 0]=(0.714623319235+0.619606727483j)*x[0]+((-0.0342879724767-0.646550047006j))*x[1]
+        ref[2, 0, 0]=(0.714623319235+0.619606727483j)
+        ref[2, 0, 1]=(-0.0342879724767-0.646550047006j)
+        arg[2, 1]=(0.174607589535+0.242028024091j)*x[0]+((-0.252929222026+0.78432536967j))*x[1]
+        ref[2, 1, 0]=(0.174607589535+0.242028024091j)
+        ref[2, 1, 1]=(-0.252929222026+0.78432536967j)
+        arg[3, 0]=(-0.820411609982-0.819609298324j)*x[0]+((-0.539839415378+0.727863780736j))*x[1]
+        ref[3, 0, 0]=(-0.820411609982-0.819609298324j)
+        ref[3, 0, 1]=(-0.539839415378+0.727863780736j)
+        arg[3, 1]=(-0.839888499703-0.387836912586j)*x[0]+((-0.640267126087+0.0635376551479j))*x[1]
+        ref[3, 1, 0]=(-0.839888499703-0.387836912586j)
+        ref[3, 1, 1]=(-0.640267126087+0.0635376551479j)
+        if dim==3:
+            arg[0, 0]+=(-0.922875585514-0.210701222079j)*x[2]
+            ref[0, 0, 2]=(-0.922875585514-0.210701222079j)
+            arg[0, 1]+=(0.374374702689-0.683819765152j)*x[2]
+            ref[0, 1, 2]=(0.374374702689-0.683819765152j)
+            arg[1, 0]+=(-0.971209697816-0.976199973256j)*x[2]
+            ref[1, 0, 2]=(-0.971209697816-0.976199973256j)
+            arg[1, 1]+=(0.78206822081+0.760771549983j)*x[2]
+            ref[1, 1, 2]=(0.78206822081+0.760771549983j)
+            arg[2, 0]+=(-0.0284559468736+0.0195936549888j)*x[2]
+            ref[2, 0, 2]=(-0.0284559468736+0.0195936549888j)
+            arg[2, 1]+=(-0.601348031812+0.35397418517j)*x[2]
+            ref[2, 1, 2]=(-0.601348031812+0.35397418517j)
+            arg[3, 0]+=(-0.926369749401-0.252910743481j)*x[2]
+            ref[3, 0, 2]=(-0.926369749401-0.252910743481j)
+            arg[3, 1]+=(0.922867675282+0.507203850806j)*x[2]
+            ref[3, 1, 2]=(0.922867675282+0.507203850806j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 4),w)
+        ref = Data(0,(2, 3, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.33909434847+0.506258930659j)*x[0]+((0.990472263532+0.281182982789j))*x[1]
+        ref[0, 0, 0, 0]=(0.33909434847+0.506258930659j)
+        ref[0, 0, 0, 1]=(0.990472263532+0.281182982789j)
+        arg[0, 0, 1]=(-0.130821750923+0.334653251274j)*x[0]+((0.74056221034+0.108168811583j))*x[1]
+        ref[0, 0, 1, 0]=(-0.130821750923+0.334653251274j)
+        ref[0, 0, 1, 1]=(0.74056221034+0.108168811583j)
+        arg[0, 0, 2]=(-0.0162321613542-0.440014394139j)*x[0]+((0.514400786391+0.382876627733j))*x[1]
+        ref[0, 0, 2, 0]=(-0.0162321613542-0.440014394139j)
+        ref[0, 0, 2, 1]=(0.514400786391+0.382876627733j)
+        arg[0, 0, 3]=(-0.164194327801+0.706200897477j)*x[0]+((-0.580280111466+0.520188117331j))*x[1]
+        ref[0, 0, 3, 0]=(-0.164194327801+0.706200897477j)
+        ref[0, 0, 3, 1]=(-0.580280111466+0.520188117331j)
+        arg[0, 1, 0]=(0.731660521073+0.728581123973j)*x[0]+((0.0547142705663-0.446547943151j))*x[1]
+        ref[0, 1, 0, 0]=(0.731660521073+0.728581123973j)
+        ref[0, 1, 0, 1]=(0.0547142705663-0.446547943151j)
+        arg[0, 1, 1]=(0.958439894575-0.731454884233j)*x[0]+((-0.925218362741-0.493574596704j))*x[1]
+        ref[0, 1, 1, 0]=(0.958439894575-0.731454884233j)
+        ref[0, 1, 1, 1]=(-0.925218362741-0.493574596704j)
+        arg[0, 1, 2]=(-0.100939595788+0.579327374623j)*x[0]+((-0.691554392557+0.740606883177j))*x[1]
+        ref[0, 1, 2, 0]=(-0.100939595788+0.579327374623j)
+        ref[0, 1, 2, 1]=(-0.691554392557+0.740606883177j)
+        arg[0, 1, 3]=(0.792215952561+0.719396260734j)*x[0]+((-0.275664010357+0.85545571528j))*x[1]
+        ref[0, 1, 3, 0]=(0.792215952561+0.719396260734j)
+        ref[0, 1, 3, 1]=(-0.275664010357+0.85545571528j)
+        arg[0, 2, 0]=(-0.210351099617-0.587045477818j)*x[0]+((-0.559390482241+0.896635018111j))*x[1]
+        ref[0, 2, 0, 0]=(-0.210351099617-0.587045477818j)
+        ref[0, 2, 0, 1]=(-0.559390482241+0.896635018111j)
+        arg[0, 2, 1]=(-0.397249750124-0.0518888515937j)*x[0]+((0.33834718774+0.593657335983j))*x[1]
+        ref[0, 2, 1, 0]=(-0.397249750124-0.0518888515937j)
+        ref[0, 2, 1, 1]=(0.33834718774+0.593657335983j)
+        arg[0, 2, 2]=(-0.868526252058+0.521704001433j)*x[0]+((0.21032561413+0.796463676649j))*x[1]
+        ref[0, 2, 2, 0]=(-0.868526252058+0.521704001433j)
+        ref[0, 2, 2, 1]=(0.21032561413+0.796463676649j)
+        arg[0, 2, 3]=(0.450823460186-0.272153689406j)*x[0]+((0.345070703495-0.33945383803j))*x[1]
+        ref[0, 2, 3, 0]=(0.450823460186-0.272153689406j)
+        ref[0, 2, 3, 1]=(0.345070703495-0.33945383803j)
+        arg[1, 0, 0]=(0.306632488994+0.728234721458j)*x[0]+((0.507713109663+0.702903924014j))*x[1]
+        ref[1, 0, 0, 0]=(0.306632488994+0.728234721458j)
+        ref[1, 0, 0, 1]=(0.507713109663+0.702903924014j)
+        arg[1, 0, 1]=(-0.929699104402-0.0496256665819j)*x[0]+((-0.139926873574-0.66415564908j))*x[1]
+        ref[1, 0, 1, 0]=(-0.929699104402-0.0496256665819j)
+        ref[1, 0, 1, 1]=(-0.139926873574-0.66415564908j)
+        arg[1, 0, 2]=(0.429672985213-0.993792994164j)*x[0]+((0.413939864522+0.577952823355j))*x[1]
+        ref[1, 0, 2, 0]=(0.429672985213-0.993792994164j)
+        ref[1, 0, 2, 1]=(0.413939864522+0.577952823355j)
+        arg[1, 0, 3]=(0.447583040887-0.0587186811174j)*x[0]+((-0.648549670302+0.282598356968j))*x[1]
+        ref[1, 0, 3, 0]=(0.447583040887-0.0587186811174j)
+        ref[1, 0, 3, 1]=(-0.648549670302+0.282598356968j)
+        arg[1, 1, 0]=(0.562025643048-0.0468618265833j)*x[0]+((-0.719309004339+0.0895327314239j))*x[1]
+        ref[1, 1, 0, 0]=(0.562025643048-0.0468618265833j)
+        ref[1, 1, 0, 1]=(-0.719309004339+0.0895327314239j)
+        arg[1, 1, 1]=(-0.88992939818+0.302926572182j)*x[0]+((0.385774361343+0.0221300326472j))*x[1]
+        ref[1, 1, 1, 0]=(-0.88992939818+0.302926572182j)
+        ref[1, 1, 1, 1]=(0.385774361343+0.0221300326472j)
+        arg[1, 1, 2]=(0.123922876908+0.443041020971j)*x[0]+((0.450647375034-0.358660049594j))*x[1]
+        ref[1, 1, 2, 0]=(0.123922876908+0.443041020971j)
+        ref[1, 1, 2, 1]=(0.450647375034-0.358660049594j)
+        arg[1, 1, 3]=(-0.735436699546-0.154480709119j)*x[0]+((0.139471875572-0.97031269531j))*x[1]
+        ref[1, 1, 3, 0]=(-0.735436699546-0.154480709119j)
+        ref[1, 1, 3, 1]=(0.139471875572-0.97031269531j)
+        arg[1, 2, 0]=(-0.15552100075-0.426762344776j)*x[0]+((-0.124080654884-0.919255895233j))*x[1]
+        ref[1, 2, 0, 0]=(-0.15552100075-0.426762344776j)
+        ref[1, 2, 0, 1]=(-0.124080654884-0.919255895233j)
+        arg[1, 2, 1]=(0.146829146375+0.908357506026j)*x[0]+((-0.118915589765-0.841141526958j))*x[1]
+        ref[1, 2, 1, 0]=(0.146829146375+0.908357506026j)
+        ref[1, 2, 1, 1]=(-0.118915589765-0.841141526958j)
+        arg[1, 2, 2]=(-0.0733653924135+0.655059559238j)*x[0]+((-0.438492130872-0.0287702782709j))*x[1]
+        ref[1, 2, 2, 0]=(-0.0733653924135+0.655059559238j)
+        ref[1, 2, 2, 1]=(-0.438492130872-0.0287702782709j)
+        arg[1, 2, 3]=(-0.806389948271+0.0701795789675j)*x[0]+((-0.0173474645732+0.42804891998j))*x[1]
+        ref[1, 2, 3, 0]=(-0.806389948271+0.0701795789675j)
+        ref[1, 2, 3, 1]=(-0.0173474645732+0.42804891998j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.517443070189+0.860870114139j)*x[2]
+            ref[0, 0, 0, 2]=(-0.517443070189+0.860870114139j)
+            arg[0, 0, 1]+=(0.758396798818-0.48229656983j)*x[2]
+            ref[0, 0, 1, 2]=(0.758396798818-0.48229656983j)
+            arg[0, 0, 2]+=(-0.799647839144-0.727812758634j)*x[2]
+            ref[0, 0, 2, 2]=(-0.799647839144-0.727812758634j)
+            arg[0, 0, 3]+=(0.685354292215+0.68563870371j)*x[2]
+            ref[0, 0, 3, 2]=(0.685354292215+0.68563870371j)
+            arg[0, 1, 0]+=(0.401369215416+0.861507686193j)*x[2]
+            ref[0, 1, 0, 2]=(0.401369215416+0.861507686193j)
+            arg[0, 1, 1]+=(-0.476395416284+0.769675166326j)*x[2]
+            ref[0, 1, 1, 2]=(-0.476395416284+0.769675166326j)
+            arg[0, 1, 2]+=(0.217650204876+0.927453570545j)*x[2]
+            ref[0, 1, 2, 2]=(0.217650204876+0.927453570545j)
+            arg[0, 1, 3]+=(-0.577358824963+0.976654134039j)*x[2]
+            ref[0, 1, 3, 2]=(-0.577358824963+0.976654134039j)
+            arg[0, 2, 0]+=(0.748406261341-0.089385323646j)*x[2]
+            ref[0, 2, 0, 2]=(0.748406261341-0.089385323646j)
+            arg[0, 2, 1]+=(-0.0507087425319-0.0189746015338j)*x[2]
+            ref[0, 2, 1, 2]=(-0.0507087425319-0.0189746015338j)
+            arg[0, 2, 2]+=(0.45003582344+0.306706846831j)*x[2]
+            ref[0, 2, 2, 2]=(0.45003582344+0.306706846831j)
+            arg[0, 2, 3]+=(-0.602485799943+0.40838158064j)*x[2]
+            ref[0, 2, 3, 2]=(-0.602485799943+0.40838158064j)
+            arg[1, 0, 0]+=(-0.498376035388-0.654425221426j)*x[2]
+            ref[1, 0, 0, 2]=(-0.498376035388-0.654425221426j)
+            arg[1, 0, 1]+=(-0.0174588162035+0.531557691361j)*x[2]
+            ref[1, 0, 1, 2]=(-0.0174588162035+0.531557691361j)
+            arg[1, 0, 2]+=(0.21805791368-0.119716794985j)*x[2]
+            ref[1, 0, 2, 2]=(0.21805791368-0.119716794985j)
+            arg[1, 0, 3]+=(-0.827996485141+0.86296500774j)*x[2]
+            ref[1, 0, 3, 2]=(-0.827996485141+0.86296500774j)
+            arg[1, 1, 0]+=(0.156971033508+0.471010279499j)*x[2]
+            ref[1, 1, 0, 2]=(0.156971033508+0.471010279499j)
+            arg[1, 1, 1]+=(-0.30823849674+0.0955259907658j)*x[2]
+            ref[1, 1, 1, 2]=(-0.30823849674+0.0955259907658j)
+            arg[1, 1, 2]+=(0.551105013885-0.413110484803j)*x[2]
+            ref[1, 1, 2, 2]=(0.551105013885-0.413110484803j)
+            arg[1, 1, 3]+=(-0.397348216786+0.960108548161j)*x[2]
+            ref[1, 1, 3, 2]=(-0.397348216786+0.960108548161j)
+            arg[1, 2, 0]+=(0.855644280728-0.436772406866j)*x[2]
+            ref[1, 2, 0, 2]=(0.855644280728-0.436772406866j)
+            arg[1, 2, 1]+=(-0.449732204088-0.71404899721j)*x[2]
+            ref[1, 2, 1, 2]=(-0.449732204088-0.71404899721j)
+            arg[1, 2, 2]+=(-0.2060747398+0.262595878902j)*x[2]
+            ref[1, 2, 2, 2]=(-0.2060747398+0.262595878902j)
+            arg[1, 2, 3]+=(-0.18146206035+0.9751930445j)*x[2]
+            ref[1, 2, 3, 2]=(-0.18146206035+0.9751930445j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.331710936653+0.822427080856j)*x[0]**o+((0.0400204558133-0.713282211845j))*x[0]+((0.777891791565+0.111009967605j))*x[1]**o+((-0.656378590107+0.575005104886j))*x[1]
+        ref[0]=(-0.331710936653+0.822427080856j)*o*x_ref[0]**(o-1)+((0.0400204558133-0.713282211845j))
+        ref[1]=(0.777891791565+0.111009967605j)*o*x_ref[1]**(o-1)+((-0.656378590107+0.575005104886j))
+        if dim==3:
+            arg+=((-0.302576432199-0.219479242929j))*x[2]**o+((0.765376145821+0.863429069356j))*x[2]
+            ref[2]=(-0.302576432199-0.219479242929j)*o*x_ref[2]**(o-1)+((0.765376145821+0.863429069356j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(0.607225442216+0.159319850706j)*x[0]**o+((-0.439732598084+0.329495521018j))*x[0]+((-0.691426718532+0.605431464025j))*x[1]**o+((0.179543323189+0.49405457044j))*x[1]
+        ref[0, 0]=(0.607225442216+0.159319850706j)*o*x_ref[0]**(o-1)+((-0.439732598084+0.329495521018j))
+        ref[0, 1]=(-0.691426718532+0.605431464025j)*o*x_ref[1]**(o-1)+((0.179543323189+0.49405457044j))
+        arg[1,]=(0.0476503398076+0.919060670648j)*x[0]**o+((-0.701406421084+0.494768491994j))*x[0]+((0.033810605187+0.904512743954j))*x[1]**o+((-0.606676771196-0.370960718484j))*x[1]
+        ref[1, 0]=(0.0476503398076+0.919060670648j)*o*x_ref[0]**(o-1)+((-0.701406421084+0.494768491994j))
+        ref[1, 1]=(0.033810605187+0.904512743954j)*o*x_ref[1]**(o-1)+((-0.606676771196-0.370960718484j))
+        arg[2,]=(0.756944662358+0.820597232321j)*x[0]**o+((0.956837370192-0.812081978247j))*x[0]+((0.642242933272-0.644438491296j))*x[1]**o+((0.959102228084+0.136671714665j))*x[1]
+        ref[2, 0]=(0.756944662358+0.820597232321j)*o*x_ref[0]**(o-1)+((0.956837370192-0.812081978247j))
+        ref[2, 1]=(0.642242933272-0.644438491296j)*o*x_ref[1]**(o-1)+((0.959102228084+0.136671714665j))
+        arg[3,]=(-0.952165818298-0.925992329284j)*x[0]**o+((0.38541285164-0.546411541135j))*x[0]+((-0.553810960369+0.80076433806j))*x[1]**o+((0.258270473756+0.979471172052j))*x[1]
+        ref[3, 0]=(-0.952165818298-0.925992329284j)*o*x_ref[0]**(o-1)+((0.38541285164-0.546411541135j))
+        ref[3, 1]=(-0.553810960369+0.80076433806j)*o*x_ref[1]**(o-1)+((0.258270473756+0.979471172052j))
+        if dim==3:
+            arg[0,]+=(0.709404696707-0.51593350297j)*x[2]**o+((-0.851597364136-0.0369980930476j))*x[2]
+            ref[0, 2]=(0.709404696707-0.51593350297j)*o*x_ref[2]**(o-1)+((-0.851597364136-0.0369980930476j))
+            arg[1,]+=(0.0700081424002+0.0822827372477j)*x[2]**o+((0.672290757443+0.813448998497j))*x[2]
+            ref[1, 2]=(0.0700081424002+0.0822827372477j)*o*x_ref[2]**(o-1)+((0.672290757443+0.813448998497j))
+            arg[2,]+=(0.7121418205-0.841874772663j)*x[2]**o+((-0.446117428639-0.0289404617841j))*x[2]
+            ref[2, 2]=(0.7121418205-0.841874772663j)*o*x_ref[2]**(o-1)+((-0.446117428639-0.0289404617841j))
+            arg[3,]+=(-0.259549626251+0.5941670264j)*x[2]**o+((-0.0145534833194+0.828007341432j))*x[2]
+            ref[3, 2]=(-0.259549626251+0.5941670264j)*o*x_ref[2]**(o-1)+((-0.0145534833194+0.828007341432j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3)+(dim,),w_ref)
+        arg[0, 0]=(0.409382603363+0.736613257269j)*x[0]**o+((-0.451454054703-0.880504202393j))*x[0]+((0.5460458537-0.0663609825575j))*x[1]**o+((0.968403629974-0.486114105275j))*x[1]
+        ref[0, 0, 0]=(0.409382603363+0.736613257269j)*o*x_ref[0]**(o-1)+((-0.451454054703-0.880504202393j))
+        ref[0, 0, 1]=(0.5460458537-0.0663609825575j)*o*x_ref[1]**(o-1)+((0.968403629974-0.486114105275j))
+        arg[0, 1]=(-0.208126588683+0.81594032232j)*x[0]**o+((0.560625472786-0.456798473946j))*x[0]+((0.226947355927+0.0729145311672j))*x[1]**o+((0.297008821206+0.774443236204j))*x[1]
+        ref[0, 1, 0]=(-0.208126588683+0.81594032232j)*o*x_ref[0]**(o-1)+((0.560625472786-0.456798473946j))
+        ref[0, 1, 1]=(0.226947355927+0.0729145311672j)*o*x_ref[1]**(o-1)+((0.297008821206+0.774443236204j))
+        arg[0, 2]=(-0.179308188955-0.787143249071j)*x[0]**o+((-0.271717146134+0.715296479036j))*x[0]+((-0.881042852416-0.712038467582j))*x[1]**o+((-0.980243385781+0.538764164872j))*x[1]
+        ref[0, 2, 0]=(-0.179308188955-0.787143249071j)*o*x_ref[0]**(o-1)+((-0.271717146134+0.715296479036j))
+        ref[0, 2, 1]=(-0.881042852416-0.712038467582j)*o*x_ref[1]**(o-1)+((-0.980243385781+0.538764164872j))
+        arg[1, 0]=(0.01657119637+0.405615771267j)*x[0]**o+((-0.736361306918-0.385731714218j))*x[0]+((-0.694578945904-0.796933402623j))*x[1]**o+((-0.0789581468245+0.0520250748905j))*x[1]
+        ref[1, 0, 0]=(0.01657119637+0.405615771267j)*o*x_ref[0]**(o-1)+((-0.736361306918-0.385731714218j))
+        ref[1, 0, 1]=(-0.694578945904-0.796933402623j)*o*x_ref[1]**(o-1)+((-0.0789581468245+0.0520250748905j))
+        arg[1, 1]=(0.443624482941-0.608816147782j)*x[0]**o+((-0.571672471999-0.343645012103j))*x[0]+((0.717828711558+0.909336773897j))*x[1]**o+((0.815981773473+0.961200965236j))*x[1]
+        ref[1, 1, 0]=(0.443624482941-0.608816147782j)*o*x_ref[0]**(o-1)+((-0.571672471999-0.343645012103j))
+        ref[1, 1, 1]=(0.717828711558+0.909336773897j)*o*x_ref[1]**(o-1)+((0.815981773473+0.961200965236j))
+        arg[1, 2]=(-0.407469598213+0.510670400505j)*x[0]**o+((0.648594723178+0.390343792448j))*x[0]+((0.771589847626+0.918519939203j))*x[1]**o+((0.127215005526-0.3944311563j))*x[1]
+        ref[1, 2, 0]=(-0.407469598213+0.510670400505j)*o*x_ref[0]**(o-1)+((0.648594723178+0.390343792448j))
+        ref[1, 2, 1]=(0.771589847626+0.918519939203j)*o*x_ref[1]**(o-1)+((0.127215005526-0.3944311563j))
+        if dim==3:
+            arg[0, 0]+=(-0.720976149435-0.161401447998j)*x[2]**o+((-0.395901432905-0.244188695281j))*x[2]
+            ref[0, 0, 2]=(-0.720976149435-0.161401447998j)*o*x_ref[2]**(o-1)+((-0.395901432905-0.244188695281j))
+            arg[0, 1]+=(-0.0292490505004-0.507058115346j)*x[2]**o+((-0.672035182145-0.635462675431j))*x[2]
+            ref[0, 1, 2]=(-0.0292490505004-0.507058115346j)*o*x_ref[2]**(o-1)+((-0.672035182145-0.635462675431j))
+            arg[0, 2]+=(-0.607227652901-0.225509432871j)*x[2]**o+((-0.865796898419+0.611923775415j))*x[2]
+            ref[0, 2, 2]=(-0.607227652901-0.225509432871j)*o*x_ref[2]**(o-1)+((-0.865796898419+0.611923775415j))
+            arg[1, 0]+=(0.640318168685+0.164532619241j)*x[2]**o+((-0.96561053301-0.656587424001j))*x[2]
+            ref[1, 0, 2]=(0.640318168685+0.164532619241j)*o*x_ref[2]**(o-1)+((-0.96561053301-0.656587424001j))
+            arg[1, 1]+=(-0.143218339472-0.656085842423j)*x[2]**o+((0.972566330107-0.0358928508718j))*x[2]
+            ref[1, 1, 2]=(-0.143218339472-0.656085842423j)*o*x_ref[2]**(o-1)+((0.972566330107-0.0358928508718j))
+            arg[1, 2]+=(-0.878426386407-0.503389260968j)*x[2]**o+((0.983216777667-0.0718699635764j))*x[2]
+            ref[1, 2, 2]=(-0.878426386407-0.503389260968j)*o*x_ref[2]**(o-1)+((0.983216777667-0.0718699635764j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 3),w)
+        ref = Data(0,(3, 2, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.705302468295-0.876674765423j)*x[0]**o+((0.233334949318-0.899742253597j))*x[0]+((0.600274057784-0.413396441591j))*x[1]**o+((0.225514684389-0.405181783528j))*x[1]
+        ref[0, 0, 0, 0]=(0.705302468295-0.876674765423j)*o*x_ref[0]**(o-1)+((0.233334949318-0.899742253597j))
+        ref[0, 0, 0, 1]=(0.600274057784-0.413396441591j)*o*x_ref[1]**(o-1)+((0.225514684389-0.405181783528j))
+        arg[0, 0, 1]=(-0.982546683311-0.354515518737j)*x[0]**o+((0.76901397349+0.437597251828j))*x[0]+((-0.702497689145-0.372820091257j))*x[1]**o+((-0.832996300363-0.196444254707j))*x[1]
+        ref[0, 0, 1, 0]=(-0.982546683311-0.354515518737j)*o*x_ref[0]**(o-1)+((0.76901397349+0.437597251828j))
+        ref[0, 0, 1, 1]=(-0.702497689145-0.372820091257j)*o*x_ref[1]**(o-1)+((-0.832996300363-0.196444254707j))
+        arg[0, 0, 2]=(0.24518188859-0.238596936834j)*x[0]**o+((-0.895961233659+0.139767316211j))*x[0]+((-0.526533175438+0.444561071796j))*x[1]**o+((-0.633287586945+0.075028643707j))*x[1]
+        ref[0, 0, 2, 0]=(0.24518188859-0.238596936834j)*o*x_ref[0]**(o-1)+((-0.895961233659+0.139767316211j))
+        ref[0, 0, 2, 1]=(-0.526533175438+0.444561071796j)*o*x_ref[1]**(o-1)+((-0.633287586945+0.075028643707j))
+        arg[0, 1, 0]=(0.797473589289-0.680314142417j)*x[0]**o+((0.0475109207052-0.385164353755j))*x[0]+((-0.938954854371+0.6243995758j))*x[1]**o+((-0.349599827093+0.374506886702j))*x[1]
+        ref[0, 1, 0, 0]=(0.797473589289-0.680314142417j)*o*x_ref[0]**(o-1)+((0.0475109207052-0.385164353755j))
+        ref[0, 1, 0, 1]=(-0.938954854371+0.6243995758j)*o*x_ref[1]**(o-1)+((-0.349599827093+0.374506886702j))
+        arg[0, 1, 1]=(0.622643747609+0.156595625229j)*x[0]**o+((0.994204587757+0.629841995301j))*x[0]+((-0.947960826902-0.823761812059j))*x[1]**o+((-0.185337223233+0.838270962832j))*x[1]
+        ref[0, 1, 1, 0]=(0.622643747609+0.156595625229j)*o*x_ref[0]**(o-1)+((0.994204587757+0.629841995301j))
+        ref[0, 1, 1, 1]=(-0.947960826902-0.823761812059j)*o*x_ref[1]**(o-1)+((-0.185337223233+0.838270962832j))
+        arg[0, 1, 2]=(-0.110487283359+0.213852025878j)*x[0]**o+((0.522270903318-0.444187827709j))*x[0]+((0.145419584083-0.281684914289j))*x[1]**o+((-0.338829599954+0.535719461491j))*x[1]
+        ref[0, 1, 2, 0]=(-0.110487283359+0.213852025878j)*o*x_ref[0]**(o-1)+((0.522270903318-0.444187827709j))
+        ref[0, 1, 2, 1]=(0.145419584083-0.281684914289j)*o*x_ref[1]**(o-1)+((-0.338829599954+0.535719461491j))
+        arg[1, 0, 0]=(0.0667804345299-0.459198877792j)*x[0]**o+((-0.258829465584+0.470348226519j))*x[0]+((0.0218513356933+0.329416401216j))*x[1]**o+((0.234038897453-0.335130297593j))*x[1]
+        ref[1, 0, 0, 0]=(0.0667804345299-0.459198877792j)*o*x_ref[0]**(o-1)+((-0.258829465584+0.470348226519j))
+        ref[1, 0, 0, 1]=(0.0218513356933+0.329416401216j)*o*x_ref[1]**(o-1)+((0.234038897453-0.335130297593j))
+        arg[1, 0, 1]=(0.263676890936-0.795317647425j)*x[0]**o+((0.0114032068696+0.899155756416j))*x[0]+((-0.376332659612+0.426914123932j))*x[1]**o+((0.897727160832+0.905454471992j))*x[1]
+        ref[1, 0, 1, 0]=(0.263676890936-0.795317647425j)*o*x_ref[0]**(o-1)+((0.0114032068696+0.899155756416j))
+        ref[1, 0, 1, 1]=(-0.376332659612+0.426914123932j)*o*x_ref[1]**(o-1)+((0.897727160832+0.905454471992j))
+        arg[1, 0, 2]=(-0.641151959273+0.648360393184j)*x[0]**o+((0.673559843251+0.926251381774j))*x[0]+((0.913863440616+0.0152024594711j))*x[1]**o+((0.671168037555+0.394462846037j))*x[1]
+        ref[1, 0, 2, 0]=(-0.641151959273+0.648360393184j)*o*x_ref[0]**(o-1)+((0.673559843251+0.926251381774j))
+        ref[1, 0, 2, 1]=(0.913863440616+0.0152024594711j)*o*x_ref[1]**(o-1)+((0.671168037555+0.394462846037j))
+        arg[1, 1, 0]=(-0.742540333791+0.836237975294j)*x[0]**o+((0.242045543057+0.0952748018478j))*x[0]+((-0.497056772179+0.279707447749j))*x[1]**o+((-0.21860945138-0.266765722912j))*x[1]
+        ref[1, 1, 0, 0]=(-0.742540333791+0.836237975294j)*o*x_ref[0]**(o-1)+((0.242045543057+0.0952748018478j))
+        ref[1, 1, 0, 1]=(-0.497056772179+0.279707447749j)*o*x_ref[1]**(o-1)+((-0.21860945138-0.266765722912j))
+        arg[1, 1, 1]=(-0.0788597239944+0.812698744368j)*x[0]**o+((0.982958760056-0.890797218086j))*x[0]+((0.0394666580418-0.26989768447j))*x[1]**o+((0.381641750559+0.630655036417j))*x[1]
+        ref[1, 1, 1, 0]=(-0.0788597239944+0.812698744368j)*o*x_ref[0]**(o-1)+((0.982958760056-0.890797218086j))
+        ref[1, 1, 1, 1]=(0.0394666580418-0.26989768447j)*o*x_ref[1]**(o-1)+((0.381641750559+0.630655036417j))
+        arg[1, 1, 2]=(0.0333894021927+0.667001526233j)*x[0]**o+((0.673373759092-0.611051378334j))*x[0]+((0.204845136841-0.172098183003j))*x[1]**o+((0.468453023413+0.381339712256j))*x[1]
+        ref[1, 1, 2, 0]=(0.0333894021927+0.667001526233j)*o*x_ref[0]**(o-1)+((0.673373759092-0.611051378334j))
+        ref[1, 1, 2, 1]=(0.204845136841-0.172098183003j)*o*x_ref[1]**(o-1)+((0.468453023413+0.381339712256j))
+        arg[2, 0, 0]=(-0.786350784977-0.67929682892j)*x[0]**o+((0.515280905572+0.0984575492047j))*x[0]+((0.306329586324+0.390136186199j))*x[1]**o+((0.535243423828-0.675126648992j))*x[1]
+        ref[2, 0, 0, 0]=(-0.786350784977-0.67929682892j)*o*x_ref[0]**(o-1)+((0.515280905572+0.0984575492047j))
+        ref[2, 0, 0, 1]=(0.306329586324+0.390136186199j)*o*x_ref[1]**(o-1)+((0.535243423828-0.675126648992j))
+        arg[2, 0, 1]=(-0.983855733476+0.221004090867j)*x[0]**o+((-0.35653689231-0.488198161593j))*x[0]+((0.782382354629+0.593095880452j))*x[1]**o+((-0.428950888629+0.720340853513j))*x[1]
+        ref[2, 0, 1, 0]=(-0.983855733476+0.221004090867j)*o*x_ref[0]**(o-1)+((-0.35653689231-0.488198161593j))
+        ref[2, 0, 1, 1]=(0.782382354629+0.593095880452j)*o*x_ref[1]**(o-1)+((-0.428950888629+0.720340853513j))
+        arg[2, 0, 2]=(-0.753989380251-0.821820019836j)*x[0]**o+((-0.625234091527+0.594203692822j))*x[0]+((0.229422586327+0.875204143166j))*x[1]**o+((0.91576408018+0.0196348080783j))*x[1]
+        ref[2, 0, 2, 0]=(-0.753989380251-0.821820019836j)*o*x_ref[0]**(o-1)+((-0.625234091527+0.594203692822j))
+        ref[2, 0, 2, 1]=(0.229422586327+0.875204143166j)*o*x_ref[1]**(o-1)+((0.91576408018+0.0196348080783j))
+        arg[2, 1, 0]=(0.476210728295-0.536242092762j)*x[0]**o+((0.794925396016-0.764459687073j))*x[0]+((-0.445932394509-0.905143242316j))*x[1]**o+((0.614347996325-0.741626998286j))*x[1]
+        ref[2, 1, 0, 0]=(0.476210728295-0.536242092762j)*o*x_ref[0]**(o-1)+((0.794925396016-0.764459687073j))
+        ref[2, 1, 0, 1]=(-0.445932394509-0.905143242316j)*o*x_ref[1]**(o-1)+((0.614347996325-0.741626998286j))
+        arg[2, 1, 1]=(0.0394952793542+0.287944119559j)*x[0]**o+((-0.84334413738-0.478865488756j))*x[0]+((0.509207703561-0.691216613644j))*x[1]**o+((-0.797283078322+0.4855800865j))*x[1]
+        ref[2, 1, 1, 0]=(0.0394952793542+0.287944119559j)*o*x_ref[0]**(o-1)+((-0.84334413738-0.478865488756j))
+        ref[2, 1, 1, 1]=(0.509207703561-0.691216613644j)*o*x_ref[1]**(o-1)+((-0.797283078322+0.4855800865j))
+        arg[2, 1, 2]=(-0.402621740918+0.393093085951j)*x[0]**o+((0.523487832582+0.993591476915j))*x[0]+((-0.161023989087-0.768350278039j))*x[1]**o+((0.529090187802+0.992733449639j))*x[1]
+        ref[2, 1, 2, 0]=(-0.402621740918+0.393093085951j)*o*x_ref[0]**(o-1)+((0.523487832582+0.993591476915j))
+        ref[2, 1, 2, 1]=(-0.161023989087-0.768350278039j)*o*x_ref[1]**(o-1)+((0.529090187802+0.992733449639j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.400208463684+0.709775519869j)*x[2]**o+((0.738741613457+0.251548310664j))*x[2]
+            ref[0, 0, 0, 2]=(0.400208463684+0.709775519869j)*o*x_ref[2]**(o-1)+((0.738741613457+0.251548310664j))
+            arg[0, 0, 1]+=(0.921766408457-0.57384133045j)*x[2]**o+((-0.376368396374+0.729311642003j))*x[2]
+            ref[0, 0, 1, 2]=(0.921766408457-0.57384133045j)*o*x_ref[2]**(o-1)+((-0.376368396374+0.729311642003j))
+            arg[0, 0, 2]+=(0.62434867216-0.662476092487j)*x[2]**o+((0.281817578275-0.36329916185j))*x[2]
+            ref[0, 0, 2, 2]=(0.62434867216-0.662476092487j)*o*x_ref[2]**(o-1)+((0.281817578275-0.36329916185j))
+            arg[0, 1, 0]+=(-0.178576780861+0.511249640663j)*x[2]**o+((-0.773371661952+0.279333514687j))*x[2]
+            ref[0, 1, 0, 2]=(-0.178576780861+0.511249640663j)*o*x_ref[2]**(o-1)+((-0.773371661952+0.279333514687j))
+            arg[0, 1, 1]+=(0.316027039775+0.836800828103j)*x[2]**o+((0.498393246078-0.805669740312j))*x[2]
+            ref[0, 1, 1, 2]=(0.316027039775+0.836800828103j)*o*x_ref[2]**(o-1)+((0.498393246078-0.805669740312j))
+            arg[0, 1, 2]+=(0.257652873774-0.416882660503j)*x[2]**o+((0.267395038533-0.346441532407j))*x[2]
+            ref[0, 1, 2, 2]=(0.257652873774-0.416882660503j)*o*x_ref[2]**(o-1)+((0.267395038533-0.346441532407j))
+            arg[1, 0, 0]+=(-0.258200376682+0.412838221367j)*x[2]**o+((0.625412442992-0.68524085424j))*x[2]
+            ref[1, 0, 0, 2]=(-0.258200376682+0.412838221367j)*o*x_ref[2]**(o-1)+((0.625412442992-0.68524085424j))
+            arg[1, 0, 1]+=(0.0149634519184+0.0957410439427j)*x[2]**o+((0.911939144601+0.719024796568j))*x[2]
+            ref[1, 0, 1, 2]=(0.0149634519184+0.0957410439427j)*o*x_ref[2]**(o-1)+((0.911939144601+0.719024796568j))
+            arg[1, 0, 2]+=(-0.95580220336+0.577524062531j)*x[2]**o+((-0.285162814521+0.636484347897j))*x[2]
+            ref[1, 0, 2, 2]=(-0.95580220336+0.577524062531j)*o*x_ref[2]**(o-1)+((-0.285162814521+0.636484347897j))
+            arg[1, 1, 0]+=(0.856438745698-0.888074095231j)*x[2]**o+((-0.391010650485-0.856536736074j))*x[2]
+            ref[1, 1, 0, 2]=(0.856438745698-0.888074095231j)*o*x_ref[2]**(o-1)+((-0.391010650485-0.856536736074j))
+            arg[1, 1, 1]+=(0.927854033875-0.404762152916j)*x[2]**o+((0.871918714414-0.800705978002j))*x[2]
+            ref[1, 1, 1, 2]=(0.927854033875-0.404762152916j)*o*x_ref[2]**(o-1)+((0.871918714414-0.800705978002j))
+            arg[1, 1, 2]+=(0.658072941929-0.0644303603602j)*x[2]**o+((0.156003941246+0.0392777846643j))*x[2]
+            ref[1, 1, 2, 2]=(0.658072941929-0.0644303603602j)*o*x_ref[2]**(o-1)+((0.156003941246+0.0392777846643j))
+            arg[2, 0, 0]+=(-0.829447839444-0.183216704967j)*x[2]**o+((0.0943520373067-0.0409974564804j))*x[2]
+            ref[2, 0, 0, 2]=(-0.829447839444-0.183216704967j)*o*x_ref[2]**(o-1)+((0.0943520373067-0.0409974564804j))
+            arg[2, 0, 1]+=(-0.211745356064-0.947876049423j)*x[2]**o+((0.531587835451-0.0106212185956j))*x[2]
+            ref[2, 0, 1, 2]=(-0.211745356064-0.947876049423j)*o*x_ref[2]**(o-1)+((0.531587835451-0.0106212185956j))
+            arg[2, 0, 2]+=(0.350800705664+0.229779355585j)*x[2]**o+((-0.996356077741-0.20549045699j))*x[2]
+            ref[2, 0, 2, 2]=(0.350800705664+0.229779355585j)*o*x_ref[2]**(o-1)+((-0.996356077741-0.20549045699j))
+            arg[2, 1, 0]+=(0.780816204981-0.100038007735j)*x[2]**o+((-0.89434413395-0.292258050324j))*x[2]
+            ref[2, 1, 0, 2]=(0.780816204981-0.100038007735j)*o*x_ref[2]**(o-1)+((-0.89434413395-0.292258050324j))
+            arg[2, 1, 1]+=(-0.749563545119+0.960626807741j)*x[2]**o+((0.538319830239+0.273493699154j))*x[2]
+            ref[2, 1, 1, 2]=(-0.749563545119+0.960626807741j)*o*x_ref[2]**(o-1)+((0.538319830239+0.273493699154j))
+            arg[2, 1, 2]+=(0.372202207971-0.867254836776j)*x[2]**o+((-0.632095906131-0.292481731548j))*x[2]
+            ref[2, 1, 2, 2]=(0.372202207971-0.867254836776j)*o*x_ref[2]**(o-1)+((-0.632095906131-0.292481731548j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.221945822089+0.21236081892j)*x[0]**o+((-0.0939887115211-0.0940417697508j))*x[0]+((0.57412600241-0.804626451041j))*x[1]**o+((-0.960690342726+0.494489697187j))*x[1]
+        ref[0]=(0.221945822089+0.21236081892j)*o*x_ref[0]**(o-1)+((-0.0939887115211-0.0940417697508j))
+        ref[1]=(0.57412600241-0.804626451041j)*o*x_ref[1]**(o-1)+((-0.960690342726+0.494489697187j))
+        if dim==3:
+            arg+=((-0.775650978247-0.660549912188j))*x[2]**o+((-0.899227248955+0.372392411639j))*x[2]
+            ref[2]=(-0.775650978247-0.660549912188j)*o*x_ref[2]**(o-1)+((-0.899227248955+0.372392411639j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(-0.0450204740836+0.677225958527j)*x[0]**o+((-0.781113982314+0.460942951561j))*x[0]+((-0.529428466425-0.578355030336j))*x[1]**o+((0.523179853195-0.477055504077j))*x[1]
+        ref[0, 0]=(-0.0450204740836+0.677225958527j)*o*x_ref[0]**(o-1)+((-0.781113982314+0.460942951561j))
+        ref[0, 1]=(-0.529428466425-0.578355030336j)*o*x_ref[1]**(o-1)+((0.523179853195-0.477055504077j))
+        arg[1,]=(-0.0666004928494-0.752313123492j)*x[0]**o+((-0.937533024753-0.258743862902j))*x[0]+((-0.481063871391+0.562178043992j))*x[1]**o+((-0.93655466245-0.142194520644j))*x[1]
+        ref[1, 0]=(-0.0666004928494-0.752313123492j)*o*x_ref[0]**(o-1)+((-0.937533024753-0.258743862902j))
+        ref[1, 1]=(-0.481063871391+0.562178043992j)*o*x_ref[1]**(o-1)+((-0.93655466245-0.142194520644j))
+        arg[2,]=(-0.636706112693-0.63915204177j)*x[0]**o+((0.464435576488+0.0638923664866j))*x[0]+((0.717897949907-0.148781200253j))*x[1]**o+((0.711072278338-0.876161130254j))*x[1]
+        ref[2, 0]=(-0.636706112693-0.63915204177j)*o*x_ref[0]**(o-1)+((0.464435576488+0.0638923664866j))
+        ref[2, 1]=(0.717897949907-0.148781200253j)*o*x_ref[1]**(o-1)+((0.711072278338-0.876161130254j))
+        if dim==3:
+            arg[0,]+=(0.642031957937+0.282329285385j)*x[2]**o+((-0.250380768279+0.797471479027j))*x[2]
+            ref[0, 2]=(0.642031957937+0.282329285385j)*o*x_ref[2]**(o-1)+((-0.250380768279+0.797471479027j))
+            arg[1,]+=(0.659199107336+0.827137371477j)*x[2]**o+((-0.273163514387-0.580247002328j))*x[2]
+            ref[1, 2]=(0.659199107336+0.827137371477j)*o*x_ref[2]**(o-1)+((-0.273163514387-0.580247002328j))
+            arg[2,]+=(0.749703916389-0.254265103342j)*x[2]**o+((0.0608617223402+0.0740725306816j))*x[2]
+            ref[2, 2]=(0.749703916389-0.254265103342j)*o*x_ref[2]**(o-1)+((0.0608617223402+0.0740725306816j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=(0.470861832989+0.907503919912j)*x[0]**o+((0.594875658934+0.620355031009j))*x[0]+((-0.319618778117+0.200959409122j))*x[1]**o+((-0.0996820157805+0.0485612580191j))*x[1]
+        ref[0, 0, 0]=(0.470861832989+0.907503919912j)*o*x_ref[0]**(o-1)+((0.594875658934+0.620355031009j))
+        ref[0, 0, 1]=(-0.319618778117+0.200959409122j)*o*x_ref[1]**(o-1)+((-0.0996820157805+0.0485612580191j))
+        arg[0, 1]=(-0.663867463948+0.322417115447j)*x[0]**o+((-0.311816597718+0.561014077066j))*x[0]+((0.71606193654+0.0296531889368j))*x[1]**o+((0.620743338912-0.917401858103j))*x[1]
+        ref[0, 1, 0]=(-0.663867463948+0.322417115447j)*o*x_ref[0]**(o-1)+((-0.311816597718+0.561014077066j))
+        ref[0, 1, 1]=(0.71606193654+0.0296531889368j)*o*x_ref[1]**(o-1)+((0.620743338912-0.917401858103j))
+        arg[1, 0]=(-0.0076100790045-0.462704346756j)*x[0]**o+((-0.0595890896785-0.988588334125j))*x[0]+((-0.47147711373+0.628198574473j))*x[1]**o+((-0.262378906169+0.751023748957j))*x[1]
+        ref[1, 0, 0]=(-0.0076100790045-0.462704346756j)*o*x_ref[0]**(o-1)+((-0.0595890896785-0.988588334125j))
+        ref[1, 0, 1]=(-0.47147711373+0.628198574473j)*o*x_ref[1]**(o-1)+((-0.262378906169+0.751023748957j))
+        arg[1, 1]=(0.323900198194+0.423693958027j)*x[0]**o+((0.81789464547+0.00210023045087j))*x[0]+((0.831863740962-0.238682945168j))*x[1]**o+((0.876035924169-0.0103590576138j))*x[1]
+        ref[1, 1, 0]=(0.323900198194+0.423693958027j)*o*x_ref[0]**(o-1)+((0.81789464547+0.00210023045087j))
+        ref[1, 1, 1]=(0.831863740962-0.238682945168j)*o*x_ref[1]**(o-1)+((0.876035924169-0.0103590576138j))
+        arg[2, 0]=(0.81349854136+0.376907589411j)*x[0]**o+((0.0078801343041-0.129802085006j))*x[0]+((-0.37765270235+0.768628751704j))*x[1]**o+((0.37207833379-0.0299555565605j))*x[1]
+        ref[2, 0, 0]=(0.81349854136+0.376907589411j)*o*x_ref[0]**(o-1)+((0.0078801343041-0.129802085006j))
+        ref[2, 0, 1]=(-0.37765270235+0.768628751704j)*o*x_ref[1]**(o-1)+((0.37207833379-0.0299555565605j))
+        arg[2, 1]=(0.596947083915-0.412634282571j)*x[0]**o+((0.0594626901762+0.390027689389j))*x[0]+((0.743256659229+0.818553346508j))*x[1]**o+((-0.903375769284+0.456110995155j))*x[1]
+        ref[2, 1, 0]=(0.596947083915-0.412634282571j)*o*x_ref[0]**(o-1)+((0.0594626901762+0.390027689389j))
+        ref[2, 1, 1]=(0.743256659229+0.818553346508j)*o*x_ref[1]**(o-1)+((-0.903375769284+0.456110995155j))
+        arg[3, 0]=(-0.633357827137+0.718277415184j)*x[0]**o+((0.188983560641+0.612320487682j))*x[0]+((0.836147116678-0.519870652314j))*x[1]**o+((-0.38378258798-0.259634910553j))*x[1]
+        ref[3, 0, 0]=(-0.633357827137+0.718277415184j)*o*x_ref[0]**(o-1)+((0.188983560641+0.612320487682j))
+        ref[3, 0, 1]=(0.836147116678-0.519870652314j)*o*x_ref[1]**(o-1)+((-0.38378258798-0.259634910553j))
+        arg[3, 1]=(-0.612780960792-0.731734375764j)*x[0]**o+((0.711332990611+0.936386113758j))*x[0]+((-0.841612460317+0.444487526953j))*x[1]**o+((-0.0398461832744+0.387784857695j))*x[1]
+        ref[3, 1, 0]=(-0.612780960792-0.731734375764j)*o*x_ref[0]**(o-1)+((0.711332990611+0.936386113758j))
+        ref[3, 1, 1]=(-0.841612460317+0.444487526953j)*o*x_ref[1]**(o-1)+((-0.0398461832744+0.387784857695j))
+        if dim==3:
+            arg[0, 0]+=(-0.419596277501-0.656738680309j)*x[2]**o+((-0.832242880948+0.0706731842717j))*x[2]
+            ref[0, 0, 2]=(-0.419596277501-0.656738680309j)*o*x_ref[2]**(o-1)+((-0.832242880948+0.0706731842717j))
+            arg[0, 1]+=(-0.96578297918-0.420465175562j)*x[2]**o+((0.369278740393+0.158668223808j))*x[2]
+            ref[0, 1, 2]=(-0.96578297918-0.420465175562j)*o*x_ref[2]**(o-1)+((0.369278740393+0.158668223808j))
+            arg[1, 0]+=(-0.61149001034+0.345142168368j)*x[2]**o+((0.286339549093-0.330937474218j))*x[2]
+            ref[1, 0, 2]=(-0.61149001034+0.345142168368j)*o*x_ref[2]**(o-1)+((0.286339549093-0.330937474218j))
+            arg[1, 1]+=(-0.32465462931+0.394581441235j)*x[2]**o+((0.0429982213379-0.434950770656j))*x[2]
+            ref[1, 1, 2]=(-0.32465462931+0.394581441235j)*o*x_ref[2]**(o-1)+((0.0429982213379-0.434950770656j))
+            arg[2, 0]+=(-0.381594971515+0.491715900685j)*x[2]**o+((-0.388248091329+0.487934592297j))*x[2]
+            ref[2, 0, 2]=(-0.381594971515+0.491715900685j)*o*x_ref[2]**(o-1)+((-0.388248091329+0.487934592297j))
+            arg[2, 1]+=(-0.959860409265-0.481852865608j)*x[2]**o+((-0.444709175897+0.0813459458717j))*x[2]
+            ref[2, 1, 2]=(-0.959860409265-0.481852865608j)*o*x_ref[2]**(o-1)+((-0.444709175897+0.0813459458717j))
+            arg[3, 0]+=(-0.778577635738-0.693883472238j)*x[2]**o+((-0.971172086806-0.184230321134j))*x[2]
+            ref[3, 0, 2]=(-0.778577635738-0.693883472238j)*o*x_ref[2]**(o-1)+((-0.971172086806-0.184230321134j))
+            arg[3, 1]+=(0.692481326654-0.873384896308j)*x[2]**o+((0.194766277944-0.0250191516508j))*x[2]
+            ref[3, 1, 2]=(0.692481326654-0.873384896308j)*o*x_ref[2]**(o-1)+((0.194766277944-0.0250191516508j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 4),w)
+        ref = Data(0,(3, 3, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.420044923012+0.83839959924j)*x[0]**o+((0.441371142871-0.289342014305j))*x[0]+((0.589405959686-0.609588661392j))*x[1]**o+((-0.584492964454+0.479398497401j))*x[1]
+        ref[0, 0, 0, 0]=(0.420044923012+0.83839959924j)*o*x_ref[0]**(o-1)+((0.441371142871-0.289342014305j))
+        ref[0, 0, 0, 1]=(0.589405959686-0.609588661392j)*o*x_ref[1]**(o-1)+((-0.584492964454+0.479398497401j))
+        arg[0, 0, 1]=(0.66106782354-0.369983655191j)*x[0]**o+((0.975229131059+0.171991366908j))*x[0]+((-0.567391403686-0.00232862230899j))*x[1]**o+((-0.0410002552709+0.817484308957j))*x[1]
+        ref[0, 0, 1, 0]=(0.66106782354-0.369983655191j)*o*x_ref[0]**(o-1)+((0.975229131059+0.171991366908j))
+        ref[0, 0, 1, 1]=(-0.567391403686-0.00232862230899j)*o*x_ref[1]**(o-1)+((-0.0410002552709+0.817484308957j))
+        arg[0, 0, 2]=(0.375722355431-0.113109742434j)*x[0]**o+((0.857485019436-0.0964712383894j))*x[0]+((-0.724028395387-0.332523534036j))*x[1]**o+((-0.850761039134-0.188610879259j))*x[1]
+        ref[0, 0, 2, 0]=(0.375722355431-0.113109742434j)*o*x_ref[0]**(o-1)+((0.857485019436-0.0964712383894j))
+        ref[0, 0, 2, 1]=(-0.724028395387-0.332523534036j)*o*x_ref[1]**(o-1)+((-0.850761039134-0.188610879259j))
+        arg[0, 0, 3]=(-0.355485649257-0.168199821682j)*x[0]**o+((0.473398726685+0.252924203547j))*x[0]+((0.106776073026+0.886524899572j))*x[1]**o+((-0.619377043899+0.881617503752j))*x[1]
+        ref[0, 0, 3, 0]=(-0.355485649257-0.168199821682j)*o*x_ref[0]**(o-1)+((0.473398726685+0.252924203547j))
+        ref[0, 0, 3, 1]=(0.106776073026+0.886524899572j)*o*x_ref[1]**(o-1)+((-0.619377043899+0.881617503752j))
+        arg[0, 1, 0]=(0.780561897099-0.587673091521j)*x[0]**o+((-0.895514346963+0.96550411259j))*x[0]+((0.59031888228-0.622772506063j))*x[1]**o+((-0.476044669144-0.0767239350201j))*x[1]
+        ref[0, 1, 0, 0]=(0.780561897099-0.587673091521j)*o*x_ref[0]**(o-1)+((-0.895514346963+0.96550411259j))
+        ref[0, 1, 0, 1]=(0.59031888228-0.622772506063j)*o*x_ref[1]**(o-1)+((-0.476044669144-0.0767239350201j))
+        arg[0, 1, 1]=(-0.466065530629-0.640358822822j)*x[0]**o+((0.0900828727482+0.1687639607j))*x[0]+((0.23633831817-0.647848008722j))*x[1]**o+((-0.56254056535-0.0604585969633j))*x[1]
+        ref[0, 1, 1, 0]=(-0.466065530629-0.640358822822j)*o*x_ref[0]**(o-1)+((0.0900828727482+0.1687639607j))
+        ref[0, 1, 1, 1]=(0.23633831817-0.647848008722j)*o*x_ref[1]**(o-1)+((-0.56254056535-0.0604585969633j))
+        arg[0, 1, 2]=(0.867901439053-0.583345730038j)*x[0]**o+((0.13543618842-0.0459701879174j))*x[0]+((-0.219461305606-0.904642030648j))*x[1]**o+((-0.887013625856+0.376445335041j))*x[1]
+        ref[0, 1, 2, 0]=(0.867901439053-0.583345730038j)*o*x_ref[0]**(o-1)+((0.13543618842-0.0459701879174j))
+        ref[0, 1, 2, 1]=(-0.219461305606-0.904642030648j)*o*x_ref[1]**(o-1)+((-0.887013625856+0.376445335041j))
+        arg[0, 1, 3]=(0.108196501739-0.410181821624j)*x[0]**o+((0.476005739738-0.740326817204j))*x[0]+((0.141314993312-0.727274365161j))*x[1]**o+((-0.230208059942-0.384556849683j))*x[1]
+        ref[0, 1, 3, 0]=(0.108196501739-0.410181821624j)*o*x_ref[0]**(o-1)+((0.476005739738-0.740326817204j))
+        ref[0, 1, 3, 1]=(0.141314993312-0.727274365161j)*o*x_ref[1]**(o-1)+((-0.230208059942-0.384556849683j))
+        arg[0, 2, 0]=(-0.548465271281-0.123745760815j)*x[0]**o+((-0.068902149285+0.115038451673j))*x[0]+((-0.229372209505+0.285151514056j))*x[1]**o+((0.146193120458-0.781028174447j))*x[1]
+        ref[0, 2, 0, 0]=(-0.548465271281-0.123745760815j)*o*x_ref[0]**(o-1)+((-0.068902149285+0.115038451673j))
+        ref[0, 2, 0, 1]=(-0.229372209505+0.285151514056j)*o*x_ref[1]**(o-1)+((0.146193120458-0.781028174447j))
+        arg[0, 2, 1]=(0.209555811044+0.3282639744j)*x[0]**o+((0.847431043493+0.12527375942j))*x[0]+((0.665706618451-0.926911769726j))*x[1]**o+((0.61945777336-0.594606758239j))*x[1]
+        ref[0, 2, 1, 0]=(0.209555811044+0.3282639744j)*o*x_ref[0]**(o-1)+((0.847431043493+0.12527375942j))
+        ref[0, 2, 1, 1]=(0.665706618451-0.926911769726j)*o*x_ref[1]**(o-1)+((0.61945777336-0.594606758239j))
+        arg[0, 2, 2]=(-0.831945453306+0.214584029942j)*x[0]**o+((0.445028558661-0.340854805608j))*x[0]+((-0.877830769204-0.033456991626j))*x[1]**o+((0.688478467048-0.921909930895j))*x[1]
+        ref[0, 2, 2, 0]=(-0.831945453306+0.214584029942j)*o*x_ref[0]**(o-1)+((0.445028558661-0.340854805608j))
+        ref[0, 2, 2, 1]=(-0.877830769204-0.033456991626j)*o*x_ref[1]**(o-1)+((0.688478467048-0.921909930895j))
+        arg[0, 2, 3]=(0.136594549637+0.934739032551j)*x[0]**o+((0.0397325645255-0.624295352301j))*x[0]+((-0.634561212095-0.106494292487j))*x[1]**o+((-0.8151719565+0.222201021328j))*x[1]
+        ref[0, 2, 3, 0]=(0.136594549637+0.934739032551j)*o*x_ref[0]**(o-1)+((0.0397325645255-0.624295352301j))
+        ref[0, 2, 3, 1]=(-0.634561212095-0.106494292487j)*o*x_ref[1]**(o-1)+((-0.8151719565+0.222201021328j))
+        arg[1, 0, 0]=(-0.228857353432+0.146599504649j)*x[0]**o+((0.634431785674-0.720314694688j))*x[0]+((0.54175707534+0.16861360194j))*x[1]**o+((-0.724820722247-0.0470340773344j))*x[1]
+        ref[1, 0, 0, 0]=(-0.228857353432+0.146599504649j)*o*x_ref[0]**(o-1)+((0.634431785674-0.720314694688j))
+        ref[1, 0, 0, 1]=(0.54175707534+0.16861360194j)*o*x_ref[1]**(o-1)+((-0.724820722247-0.0470340773344j))
+        arg[1, 0, 1]=(-0.239758948971-0.73109460981j)*x[0]**o+((0.745147456565+0.21285984724j))*x[0]+((-0.774771461721+0.459043074612j))*x[1]**o+((0.689981054099+0.0459344886674j))*x[1]
+        ref[1, 0, 1, 0]=(-0.239758948971-0.73109460981j)*o*x_ref[0]**(o-1)+((0.745147456565+0.21285984724j))
+        ref[1, 0, 1, 1]=(-0.774771461721+0.459043074612j)*o*x_ref[1]**(o-1)+((0.689981054099+0.0459344886674j))
+        arg[1, 0, 2]=(0.372679273591+0.821495460405j)*x[0]**o+((-0.999158573554-0.320693196703j))*x[0]+((0.649317283027-0.0778786185005j))*x[1]**o+((-0.953169632377-0.621792864176j))*x[1]
+        ref[1, 0, 2, 0]=(0.372679273591+0.821495460405j)*o*x_ref[0]**(o-1)+((-0.999158573554-0.320693196703j))
+        ref[1, 0, 2, 1]=(0.649317283027-0.0778786185005j)*o*x_ref[1]**(o-1)+((-0.953169632377-0.621792864176j))
+        arg[1, 0, 3]=(-0.666062293671-0.744218940703j)*x[0]**o+((0.0347618111628-0.230894203076j))*x[0]+((0.209606495444-0.629756866852j))*x[1]**o+((0.188366916738-0.51661293316j))*x[1]
+        ref[1, 0, 3, 0]=(-0.666062293671-0.744218940703j)*o*x_ref[0]**(o-1)+((0.0347618111628-0.230894203076j))
+        ref[1, 0, 3, 1]=(0.209606495444-0.629756866852j)*o*x_ref[1]**(o-1)+((0.188366916738-0.51661293316j))
+        arg[1, 1, 0]=(-0.94807326014-0.691464394106j)*x[0]**o+((0.601214185783-0.352763211315j))*x[0]+((-0.147200196705-0.353268345157j))*x[1]**o+((-0.754784268767+0.2312751974j))*x[1]
+        ref[1, 1, 0, 0]=(-0.94807326014-0.691464394106j)*o*x_ref[0]**(o-1)+((0.601214185783-0.352763211315j))
+        ref[1, 1, 0, 1]=(-0.147200196705-0.353268345157j)*o*x_ref[1]**(o-1)+((-0.754784268767+0.2312751974j))
+        arg[1, 1, 1]=(-0.362894065668-0.757707566772j)*x[0]**o+((-0.569117679259-0.154107832719j))*x[0]+((-0.752765799806-0.90417803338j))*x[1]**o+((-0.271096538032-0.843049511511j))*x[1]
+        ref[1, 1, 1, 0]=(-0.362894065668-0.757707566772j)*o*x_ref[0]**(o-1)+((-0.569117679259-0.154107832719j))
+        ref[1, 1, 1, 1]=(-0.752765799806-0.90417803338j)*o*x_ref[1]**(o-1)+((-0.271096538032-0.843049511511j))
+        arg[1, 1, 2]=(-0.857845704616+0.716839018752j)*x[0]**o+((0.64349560012+0.719948931243j))*x[0]+((-0.348013346776-0.941483236138j))*x[1]**o+((0.635096270481+0.999984261664j))*x[1]
+        ref[1, 1, 2, 0]=(-0.857845704616+0.716839018752j)*o*x_ref[0]**(o-1)+((0.64349560012+0.719948931243j))
+        ref[1, 1, 2, 1]=(-0.348013346776-0.941483236138j)*o*x_ref[1]**(o-1)+((0.635096270481+0.999984261664j))
+        arg[1, 1, 3]=(-0.892741264316+0.0247757455519j)*x[0]**o+((0.466833487607-0.985995231467j))*x[0]+((0.67135129222-0.701352568242j))*x[1]**o+((-0.229551807404+0.0127174125109j))*x[1]
+        ref[1, 1, 3, 0]=(-0.892741264316+0.0247757455519j)*o*x_ref[0]**(o-1)+((0.466833487607-0.985995231467j))
+        ref[1, 1, 3, 1]=(0.67135129222-0.701352568242j)*o*x_ref[1]**(o-1)+((-0.229551807404+0.0127174125109j))
+        arg[1, 2, 0]=(0.273789466262-0.998682545961j)*x[0]**o+((0.0791149633248+0.399775250203j))*x[0]+((-0.995506329179+0.14744671359j))*x[1]**o+((-0.368352699298-0.41251248065j))*x[1]
+        ref[1, 2, 0, 0]=(0.273789466262-0.998682545961j)*o*x_ref[0]**(o-1)+((0.0791149633248+0.399775250203j))
+        ref[1, 2, 0, 1]=(-0.995506329179+0.14744671359j)*o*x_ref[1]**(o-1)+((-0.368352699298-0.41251248065j))
+        arg[1, 2, 1]=(-0.945672502235+0.393279552093j)*x[0]**o+((0.55842609883+0.787038260464j))*x[0]+((-0.57047495988+0.187103384501j))*x[1]**o+((0.843466896905+0.1605983117j))*x[1]
+        ref[1, 2, 1, 0]=(-0.945672502235+0.393279552093j)*o*x_ref[0]**(o-1)+((0.55842609883+0.787038260464j))
+        ref[1, 2, 1, 1]=(-0.57047495988+0.187103384501j)*o*x_ref[1]**(o-1)+((0.843466896905+0.1605983117j))
+        arg[1, 2, 2]=(-0.739395802988-0.902410358784j)*x[0]**o+((0.323601338606+0.539132837253j))*x[0]+((0.538065508802+0.685558056679j))*x[1]**o+((-0.41017756114-0.794721828177j))*x[1]
+        ref[1, 2, 2, 0]=(-0.739395802988-0.902410358784j)*o*x_ref[0]**(o-1)+((0.323601338606+0.539132837253j))
+        ref[1, 2, 2, 1]=(0.538065508802+0.685558056679j)*o*x_ref[1]**(o-1)+((-0.41017756114-0.794721828177j))
+        arg[1, 2, 3]=(-0.725606965961-0.341273265464j)*x[0]**o+((0.763261410069+0.968261760945j))*x[0]+((0.572616745698-0.95412085768j))*x[1]**o+((-0.488059251924+0.818606738348j))*x[1]
+        ref[1, 2, 3, 0]=(-0.725606965961-0.341273265464j)*o*x_ref[0]**(o-1)+((0.763261410069+0.968261760945j))
+        ref[1, 2, 3, 1]=(0.572616745698-0.95412085768j)*o*x_ref[1]**(o-1)+((-0.488059251924+0.818606738348j))
+        arg[2, 0, 0]=(-0.213367699199+0.444663255313j)*x[0]**o+((-0.320466223728-0.612750184746j))*x[0]+((0.267091376318+0.529402843774j))*x[1]**o+((-0.649646595101-0.888680569871j))*x[1]
+        ref[2, 0, 0, 0]=(-0.213367699199+0.444663255313j)*o*x_ref[0]**(o-1)+((-0.320466223728-0.612750184746j))
+        ref[2, 0, 0, 1]=(0.267091376318+0.529402843774j)*o*x_ref[1]**(o-1)+((-0.649646595101-0.888680569871j))
+        arg[2, 0, 1]=(0.453210622915-0.586354618319j)*x[0]**o+((-0.0334821575949-0.228951192906j))*x[0]+((0.882753716461-0.803937288564j))*x[1]**o+((0.0333224926795+0.680401795653j))*x[1]
+        ref[2, 0, 1, 0]=(0.453210622915-0.586354618319j)*o*x_ref[0]**(o-1)+((-0.0334821575949-0.228951192906j))
+        ref[2, 0, 1, 1]=(0.882753716461-0.803937288564j)*o*x_ref[1]**(o-1)+((0.0333224926795+0.680401795653j))
+        arg[2, 0, 2]=(-0.983258242998+0.29999009634j)*x[0]**o+((-0.600145203647+0.77677687675j))*x[0]+((0.160075822693-0.307356137771j))*x[1]**o+((-0.526520667011+0.58978334707j))*x[1]
+        ref[2, 0, 2, 0]=(-0.983258242998+0.29999009634j)*o*x_ref[0]**(o-1)+((-0.600145203647+0.77677687675j))
+        ref[2, 0, 2, 1]=(0.160075822693-0.307356137771j)*o*x_ref[1]**(o-1)+((-0.526520667011+0.58978334707j))
+        arg[2, 0, 3]=(0.414044912275-0.366810703714j)*x[0]**o+((0.180600782308-0.170313230028j))*x[0]+((-0.227231711623+0.181844754256j))*x[1]**o+((-0.65314649168+0.911740156721j))*x[1]
+        ref[2, 0, 3, 0]=(0.414044912275-0.366810703714j)*o*x_ref[0]**(o-1)+((0.180600782308-0.170313230028j))
+        ref[2, 0, 3, 1]=(-0.227231711623+0.181844754256j)*o*x_ref[1]**(o-1)+((-0.65314649168+0.911740156721j))
+        arg[2, 1, 0]=(0.463805552579-0.779617179304j)*x[0]**o+((0.933509346356+0.895333841812j))*x[0]+((0.992928112108-0.93209172517j))*x[1]**o+((0.386641398988+0.0339556973108j))*x[1]
+        ref[2, 1, 0, 0]=(0.463805552579-0.779617179304j)*o*x_ref[0]**(o-1)+((0.933509346356+0.895333841812j))
+        ref[2, 1, 0, 1]=(0.992928112108-0.93209172517j)*o*x_ref[1]**(o-1)+((0.386641398988+0.0339556973108j))
+        arg[2, 1, 1]=(0.972826896729-0.850087057618j)*x[0]**o+((-0.705231070681-0.838493346971j))*x[0]+((0.581267426045-0.933373731784j))*x[1]**o+((-0.381357065637-0.911338052533j))*x[1]
+        ref[2, 1, 1, 0]=(0.972826896729-0.850087057618j)*o*x_ref[0]**(o-1)+((-0.705231070681-0.838493346971j))
+        ref[2, 1, 1, 1]=(0.581267426045-0.933373731784j)*o*x_ref[1]**(o-1)+((-0.381357065637-0.911338052533j))
+        arg[2, 1, 2]=(-0.25328748871+0.219989199856j)*x[0]**o+((0.67957845759+0.698574222539j))*x[0]+((-0.543427546702+0.917142934851j))*x[1]**o+((-0.193404990713+0.905485192841j))*x[1]
+        ref[2, 1, 2, 0]=(-0.25328748871+0.219989199856j)*o*x_ref[0]**(o-1)+((0.67957845759+0.698574222539j))
+        ref[2, 1, 2, 1]=(-0.543427546702+0.917142934851j)*o*x_ref[1]**(o-1)+((-0.193404990713+0.905485192841j))
+        arg[2, 1, 3]=(-0.183315672486+0.636108650163j)*x[0]**o+((0.574489526072-0.124891781972j))*x[0]+((-0.461136143837+0.261258329126j))*x[1]**o+((-0.144060831173+0.324788717448j))*x[1]
+        ref[2, 1, 3, 0]=(-0.183315672486+0.636108650163j)*o*x_ref[0]**(o-1)+((0.574489526072-0.124891781972j))
+        ref[2, 1, 3, 1]=(-0.461136143837+0.261258329126j)*o*x_ref[1]**(o-1)+((-0.144060831173+0.324788717448j))
+        arg[2, 2, 0]=(-0.205305231162-0.043616094504j)*x[0]**o+((-0.479591473555-0.909625874984j))*x[0]+((0.833902164725+0.271523798843j))*x[1]**o+((-0.9833232856-0.405272689501j))*x[1]
+        ref[2, 2, 0, 0]=(-0.205305231162-0.043616094504j)*o*x_ref[0]**(o-1)+((-0.479591473555-0.909625874984j))
+        ref[2, 2, 0, 1]=(0.833902164725+0.271523798843j)*o*x_ref[1]**(o-1)+((-0.9833232856-0.405272689501j))
+        arg[2, 2, 1]=(-0.465754054521-0.0988515849241j)*x[0]**o+((0.233253948268-0.161392387762j))*x[0]+((0.702126310971-0.324186337759j))*x[1]**o+((-0.593981028444+0.389619301989j))*x[1]
+        ref[2, 2, 1, 0]=(-0.465754054521-0.0988515849241j)*o*x_ref[0]**(o-1)+((0.233253948268-0.161392387762j))
+        ref[2, 2, 1, 1]=(0.702126310971-0.324186337759j)*o*x_ref[1]**(o-1)+((-0.593981028444+0.389619301989j))
+        arg[2, 2, 2]=(0.701515981572+0.824670956073j)*x[0]**o+((0.0284327764992-0.316085794051j))*x[0]+((-0.896353370623-0.410599486361j))*x[1]**o+((0.756654993449+0.0273001669851j))*x[1]
+        ref[2, 2, 2, 0]=(0.701515981572+0.824670956073j)*o*x_ref[0]**(o-1)+((0.0284327764992-0.316085794051j))
+        ref[2, 2, 2, 1]=(-0.896353370623-0.410599486361j)*o*x_ref[1]**(o-1)+((0.756654993449+0.0273001669851j))
+        arg[2, 2, 3]=(-0.329808379113-0.403887159509j)*x[0]**o+((-0.597809777809+0.227304983198j))*x[0]+((0.150738153481+0.732623125968j))*x[1]**o+((0.805361055158-0.310503615541j))*x[1]
+        ref[2, 2, 3, 0]=(-0.329808379113-0.403887159509j)*o*x_ref[0]**(o-1)+((-0.597809777809+0.227304983198j))
+        ref[2, 2, 3, 1]=(0.150738153481+0.732623125968j)*o*x_ref[1]**(o-1)+((0.805361055158-0.310503615541j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.184545831975+0.407518214998j)*x[2]**o+((0.12214595314+0.735093368997j))*x[2]
+            ref[0, 0, 0, 2]=(0.184545831975+0.407518214998j)*o*x_ref[2]**(o-1)+((0.12214595314+0.735093368997j))
+            arg[0, 0, 1]+=(0.00526705634855+0.716462194051j)*x[2]**o+((-0.952704024558+0.813529600304j))*x[2]
+            ref[0, 0, 1, 2]=(0.00526705634855+0.716462194051j)*o*x_ref[2]**(o-1)+((-0.952704024558+0.813529600304j))
+            arg[0, 0, 2]+=(-0.351480922714-0.629893229523j)*x[2]**o+((0.259758144504-0.829902898433j))*x[2]
+            ref[0, 0, 2, 2]=(-0.351480922714-0.629893229523j)*o*x_ref[2]**(o-1)+((0.259758144504-0.829902898433j))
+            arg[0, 0, 3]+=(-0.650916005273-0.362031724657j)*x[2]**o+((-0.304009123457-0.869388101014j))*x[2]
+            ref[0, 0, 3, 2]=(-0.650916005273-0.362031724657j)*o*x_ref[2]**(o-1)+((-0.304009123457-0.869388101014j))
+            arg[0, 1, 0]+=(0.894938730243+0.370595957764j)*x[2]**o+((-0.573048316875-0.211754271103j))*x[2]
+            ref[0, 1, 0, 2]=(0.894938730243+0.370595957764j)*o*x_ref[2]**(o-1)+((-0.573048316875-0.211754271103j))
+            arg[0, 1, 1]+=(-0.409741610438-0.653690491439j)*x[2]**o+((-0.766021199894+0.53396480866j))*x[2]
+            ref[0, 1, 1, 2]=(-0.409741610438-0.653690491439j)*o*x_ref[2]**(o-1)+((-0.766021199894+0.53396480866j))
+            arg[0, 1, 2]+=(-0.316346716591-0.184985717439j)*x[2]**o+((-0.294209009397-0.293777866262j))*x[2]
+            ref[0, 1, 2, 2]=(-0.316346716591-0.184985717439j)*o*x_ref[2]**(o-1)+((-0.294209009397-0.293777866262j))
+            arg[0, 1, 3]+=(0.23858627747+0.79778010557j)*x[2]**o+((-0.496715863592+0.946805194911j))*x[2]
+            ref[0, 1, 3, 2]=(0.23858627747+0.79778010557j)*o*x_ref[2]**(o-1)+((-0.496715863592+0.946805194911j))
+            arg[0, 2, 0]+=(0.525718541994+0.725935607547j)*x[2]**o+((0.161408625948+0.978018213583j))*x[2]
+            ref[0, 2, 0, 2]=(0.525718541994+0.725935607547j)*o*x_ref[2]**(o-1)+((0.161408625948+0.978018213583j))
+            arg[0, 2, 1]+=(-0.247513582264+0.438287782496j)*x[2]**o+((-0.924288658515+0.882743829342j))*x[2]
+            ref[0, 2, 1, 2]=(-0.247513582264+0.438287782496j)*o*x_ref[2]**(o-1)+((-0.924288658515+0.882743829342j))
+            arg[0, 2, 2]+=(-0.622757424793-0.162549674471j)*x[2]**o+((-0.924457368312-0.833684247326j))*x[2]
+            ref[0, 2, 2, 2]=(-0.622757424793-0.162549674471j)*o*x_ref[2]**(o-1)+((-0.924457368312-0.833684247326j))
+            arg[0, 2, 3]+=(-0.657521961331-0.791525099874j)*x[2]**o+((-0.976667562515-0.861398225392j))*x[2]
+            ref[0, 2, 3, 2]=(-0.657521961331-0.791525099874j)*o*x_ref[2]**(o-1)+((-0.976667562515-0.861398225392j))
+            arg[1, 0, 0]+=(-0.988710840363+0.0929395282047j)*x[2]**o+((0.986766561869-0.812844955671j))*x[2]
+            ref[1, 0, 0, 2]=(-0.988710840363+0.0929395282047j)*o*x_ref[2]**(o-1)+((0.986766561869-0.812844955671j))
+            arg[1, 0, 1]+=(-0.367404484399+0.662617168063j)*x[2]**o+((0.614520098099-0.703733997473j))*x[2]
+            ref[1, 0, 1, 2]=(-0.367404484399+0.662617168063j)*o*x_ref[2]**(o-1)+((0.614520098099-0.703733997473j))
+            arg[1, 0, 2]+=(-0.600416690486+0.0840588654304j)*x[2]**o+((0.20078217998-0.393601907455j))*x[2]
+            ref[1, 0, 2, 2]=(-0.600416690486+0.0840588654304j)*o*x_ref[2]**(o-1)+((0.20078217998-0.393601907455j))
+            arg[1, 0, 3]+=(0.577645517175-0.382586439193j)*x[2]**o+((0.860117994475-0.117634786365j))*x[2]
+            ref[1, 0, 3, 2]=(0.577645517175-0.382586439193j)*o*x_ref[2]**(o-1)+((0.860117994475-0.117634786365j))
+            arg[1, 1, 0]+=(-0.543415728799+0.412385644284j)*x[2]**o+((-0.186063351424-0.463394669344j))*x[2]
+            ref[1, 1, 0, 2]=(-0.543415728799+0.412385644284j)*o*x_ref[2]**(o-1)+((-0.186063351424-0.463394669344j))
+            arg[1, 1, 1]+=(-0.955100191196+0.938520968699j)*x[2]**o+((-0.876423028759+0.725769674389j))*x[2]
+            ref[1, 1, 1, 2]=(-0.955100191196+0.938520968699j)*o*x_ref[2]**(o-1)+((-0.876423028759+0.725769674389j))
+            arg[1, 1, 2]+=(-0.260306456861+0.905015572372j)*x[2]**o+((-0.0129189746235-0.379209214707j))*x[2]
+            ref[1, 1, 2, 2]=(-0.260306456861+0.905015572372j)*o*x_ref[2]**(o-1)+((-0.0129189746235-0.379209214707j))
+            arg[1, 1, 3]+=(-0.474890102174+0.902187016263j)*x[2]**o+((0.35290508829-0.515362512325j))*x[2]
+            ref[1, 1, 3, 2]=(-0.474890102174+0.902187016263j)*o*x_ref[2]**(o-1)+((0.35290508829-0.515362512325j))
+            arg[1, 2, 0]+=(-0.266542693991+0.987503202185j)*x[2]**o+((0.717253257704+0.705039317592j))*x[2]
+            ref[1, 2, 0, 2]=(-0.266542693991+0.987503202185j)*o*x_ref[2]**(o-1)+((0.717253257704+0.705039317592j))
+            arg[1, 2, 1]+=(-0.32942250917+0.709227406453j)*x[2]**o+((-0.588498914898-0.919236982004j))*x[2]
+            ref[1, 2, 1, 2]=(-0.32942250917+0.709227406453j)*o*x_ref[2]**(o-1)+((-0.588498914898-0.919236982004j))
+            arg[1, 2, 2]+=(0.893128952287-0.240251767367j)*x[2]**o+((-0.220168523865-0.783188161552j))*x[2]
+            ref[1, 2, 2, 2]=(0.893128952287-0.240251767367j)*o*x_ref[2]**(o-1)+((-0.220168523865-0.783188161552j))
+            arg[1, 2, 3]+=(-0.396709361867+0.52213334735j)*x[2]**o+((-0.655670325681+0.93282862837j))*x[2]
+            ref[1, 2, 3, 2]=(-0.396709361867+0.52213334735j)*o*x_ref[2]**(o-1)+((-0.655670325681+0.93282862837j))
+            arg[2, 0, 0]+=(0.831013459624-0.102650643243j)*x[2]**o+((-0.200588535537+0.0440785606302j))*x[2]
+            ref[2, 0, 0, 2]=(0.831013459624-0.102650643243j)*o*x_ref[2]**(o-1)+((-0.200588535537+0.0440785606302j))
+            arg[2, 0, 1]+=(-0.9084762263+0.0645099454302j)*x[2]**o+((-0.957332497845+0.788610341193j))*x[2]
+            ref[2, 0, 1, 2]=(-0.9084762263+0.0645099454302j)*o*x_ref[2]**(o-1)+((-0.957332497845+0.788610341193j))
+            arg[2, 0, 2]+=(-0.564052533795+0.849627571143j)*x[2]**o+((-0.605654877642-0.585058782294j))*x[2]
+            ref[2, 0, 2, 2]=(-0.564052533795+0.849627571143j)*o*x_ref[2]**(o-1)+((-0.605654877642-0.585058782294j))
+            arg[2, 0, 3]+=(0.760044280878-0.791340370507j)*x[2]**o+((-0.460991811873+0.800767889253j))*x[2]
+            ref[2, 0, 3, 2]=(0.760044280878-0.791340370507j)*o*x_ref[2]**(o-1)+((-0.460991811873+0.800767889253j))
+            arg[2, 1, 0]+=(-0.954917427458+0.165648181605j)*x[2]**o+((-0.106224193256+0.27615564869j))*x[2]
+            ref[2, 1, 0, 2]=(-0.954917427458+0.165648181605j)*o*x_ref[2]**(o-1)+((-0.106224193256+0.27615564869j))
+            arg[2, 1, 1]+=(-0.600734693796+0.128099920813j)*x[2]**o+((0.214241486309-0.499260769778j))*x[2]
+            ref[2, 1, 1, 2]=(-0.600734693796+0.128099920813j)*o*x_ref[2]**(o-1)+((0.214241486309-0.499260769778j))
+            arg[2, 1, 2]+=(-0.157265610897+0.430710279379j)*x[2]**o+((0.935861010752-0.058038187552j))*x[2]
+            ref[2, 1, 2, 2]=(-0.157265610897+0.430710279379j)*o*x_ref[2]**(o-1)+((0.935861010752-0.058038187552j))
+            arg[2, 1, 3]+=(-0.928232213261-0.330073069968j)*x[2]**o+((-0.727355429358+0.286903946857j))*x[2]
+            ref[2, 1, 3, 2]=(-0.928232213261-0.330073069968j)*o*x_ref[2]**(o-1)+((-0.727355429358+0.286903946857j))
+            arg[2, 2, 0]+=(0.146826236002+0.0164745024399j)*x[2]**o+((0.982249325989+0.64581073998j))*x[2]
+            ref[2, 2, 0, 2]=(0.146826236002+0.0164745024399j)*o*x_ref[2]**(o-1)+((0.982249325989+0.64581073998j))
+            arg[2, 2, 1]+=(0.374179789392-0.279538266543j)*x[2]**o+((-0.0270228405349-0.756324897451j))*x[2]
+            ref[2, 2, 1, 2]=(0.374179789392-0.279538266543j)*o*x_ref[2]**(o-1)+((-0.0270228405349-0.756324897451j))
+            arg[2, 2, 2]+=(-0.778588426262+0.470689779097j)*x[2]**o+((-0.978873087838+0.0536553556742j))*x[2]
+            ref[2, 2, 2, 2]=(-0.778588426262+0.470689779097j)*o*x_ref[2]**(o-1)+((-0.978873087838+0.0536553556742j))
+            arg[2, 2, 3]+=(-0.0303324616423+0.419028519621j)*x[2]**o+((-0.220820248439+0.624520472493j))*x[2]
+            ref[2, 2, 3, 2]=(-0.0303324616423+0.419028519621j)*o*x_ref[2]**(o-1)+((-0.220820248439+0.624520472493j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.872608912596-0.229245343761j)*x[0]+((0.736938523324+0.569724984617j))*x[1]
+        ref[0]=(0.872608912596-0.229245343761j)
+        ref[1]=(0.736938523324+0.569724984617j)
+        if dim==3:
+            arg+=((0.872341449967-0.563549676327j))*x[2]
+            ref[2]=(0.872341449967-0.563549676327j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(-0.272982620784-0.921729185182j)*x[0]+((0.804304453555+0.848454065352j))*x[1]
+        ref[0, 0]=(-0.272982620784-0.921729185182j)
+        ref[0, 1]=(0.804304453555+0.848454065352j)
+        arg[1,]=(-0.270638292779-0.293532969845j)*x[0]+((-0.662205329517-0.600042489103j))*x[1]
+        ref[1, 0]=(-0.270638292779-0.293532969845j)
+        ref[1, 1]=(-0.662205329517-0.600042489103j)
+        if dim==3:
+            arg[0,]+=(0.587948324358+0.971912312766j)*x[2]
+            ref[0, 2]=(0.587948324358+0.971912312766j)
+            arg[1,]+=(-0.563019718532-0.450863024044j)*x[2]
+            ref[1, 2]=(-0.563019718532-0.450863024044j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.992624944062-0.506160492452j)*x[0]+((0.993947860022-0.291805239396j))*x[1]
+        ref[0, 0, 0]=(-0.992624944062-0.506160492452j)
+        ref[0, 0, 1]=(0.993947860022-0.291805239396j)
+        arg[0, 1]=(0.544810756787-0.0460566883991j)*x[0]+((-0.031911168892-0.625161075131j))*x[1]
+        ref[0, 1, 0]=(0.544810756787-0.0460566883991j)
+        ref[0, 1, 1]=(-0.031911168892-0.625161075131j)
+        arg[0, 2]=(-0.0237688932677-0.304025609639j)*x[0]+((-0.73268334973+0.102756037855j))*x[1]
+        ref[0, 2, 0]=(-0.0237688932677-0.304025609639j)
+        ref[0, 2, 1]=(-0.73268334973+0.102756037855j)
+        arg[0, 3]=(0.916283074781+0.651416043694j)*x[0]+((0.744524657758-0.227703596112j))*x[1]
+        ref[0, 3, 0]=(0.916283074781+0.651416043694j)
+        ref[0, 3, 1]=(0.744524657758-0.227703596112j)
+        arg[1, 0]=(-0.811995912199+0.619169910909j)*x[0]+((-0.473680758868+0.464137649799j))*x[1]
+        ref[1, 0, 0]=(-0.811995912199+0.619169910909j)
+        ref[1, 0, 1]=(-0.473680758868+0.464137649799j)
+        arg[1, 1]=(-0.575468206508-0.20339103381j)*x[0]+((-0.89093325568-0.556767426478j))*x[1]
+        ref[1, 1, 0]=(-0.575468206508-0.20339103381j)
+        ref[1, 1, 1]=(-0.89093325568-0.556767426478j)
+        arg[1, 2]=(0.552955963483-0.388017506513j)*x[0]+((0.34254442114-0.67350137706j))*x[1]
+        ref[1, 2, 0]=(0.552955963483-0.388017506513j)
+        ref[1, 2, 1]=(0.34254442114-0.67350137706j)
+        arg[1, 3]=(0.888475065314-0.257255312662j)*x[0]+((0.22224755301-0.92480899064j))*x[1]
+        ref[1, 3, 0]=(0.888475065314-0.257255312662j)
+        ref[1, 3, 1]=(0.22224755301-0.92480899064j)
+        arg[2, 0]=(-0.124150866337-0.987261122673j)*x[0]+((0.120703791223-0.255566459852j))*x[1]
+        ref[2, 0, 0]=(-0.124150866337-0.987261122673j)
+        ref[2, 0, 1]=(0.120703791223-0.255566459852j)
+        arg[2, 1]=(0.0601669349296+0.408913322793j)*x[0]+((0.184120921971-0.581650045992j))*x[1]
+        ref[2, 1, 0]=(0.0601669349296+0.408913322793j)
+        ref[2, 1, 1]=(0.184120921971-0.581650045992j)
+        arg[2, 2]=(0.803526144148-0.271262623561j)*x[0]+((-0.875851698041+0.991600057149j))*x[1]
+        ref[2, 2, 0]=(0.803526144148-0.271262623561j)
+        ref[2, 2, 1]=(-0.875851698041+0.991600057149j)
+        arg[2, 3]=(-0.540636474751-0.0162936507954j)*x[0]+((0.773904270149+0.760316497943j))*x[1]
+        ref[2, 3, 0]=(-0.540636474751-0.0162936507954j)
+        ref[2, 3, 1]=(0.773904270149+0.760316497943j)
+        arg[3, 0]=(-0.415474815661+0.681509668113j)*x[0]+((-0.0694443765619+0.0828004792102j))*x[1]
+        ref[3, 0, 0]=(-0.415474815661+0.681509668113j)
+        ref[3, 0, 1]=(-0.0694443765619+0.0828004792102j)
+        arg[3, 1]=(-0.0965098765217+0.0640786097262j)*x[0]+((0.73608826396+0.223717921512j))*x[1]
+        ref[3, 1, 0]=(-0.0965098765217+0.0640786097262j)
+        ref[3, 1, 1]=(0.73608826396+0.223717921512j)
+        arg[3, 2]=(-0.343554303362+0.108610496556j)*x[0]+((0.0167085935155-0.285109984976j))*x[1]
+        ref[3, 2, 0]=(-0.343554303362+0.108610496556j)
+        ref[3, 2, 1]=(0.0167085935155-0.285109984976j)
+        arg[3, 3]=(-0.149178367895+0.998064408977j)*x[0]+((0.54841633497+0.871597027676j))*x[1]
+        ref[3, 3, 0]=(-0.149178367895+0.998064408977j)
+        ref[3, 3, 1]=(0.54841633497+0.871597027676j)
+        if dim==3:
+            arg[0, 0]+=(0.706085810135+0.123954460572j)*x[2]
+            ref[0, 0, 2]=(0.706085810135+0.123954460572j)
+            arg[0, 1]+=(-0.220246374918+0.237599974348j)*x[2]
+            ref[0, 1, 2]=(-0.220246374918+0.237599974348j)
+            arg[0, 2]+=(-0.750110968316-0.0519036999682j)*x[2]
+            ref[0, 2, 2]=(-0.750110968316-0.0519036999682j)
+            arg[0, 3]+=(-0.791338069284+0.410497470629j)*x[2]
+            ref[0, 3, 2]=(-0.791338069284+0.410497470629j)
+            arg[1, 0]+=(0.325657453032+0.978657742315j)*x[2]
+            ref[1, 0, 2]=(0.325657453032+0.978657742315j)
+            arg[1, 1]+=(0.0734790450542-0.722752834406j)*x[2]
+            ref[1, 1, 2]=(0.0734790450542-0.722752834406j)
+            arg[1, 2]+=(-0.177960848142-0.521445303176j)*x[2]
+            ref[1, 2, 2]=(-0.177960848142-0.521445303176j)
+            arg[1, 3]+=(-0.401224865075+0.0225801954061j)*x[2]
+            ref[1, 3, 2]=(-0.401224865075+0.0225801954061j)
+            arg[2, 0]+=(-0.0539807436726+0.64504893525j)*x[2]
+            ref[2, 0, 2]=(-0.0539807436726+0.64504893525j)
+            arg[2, 1]+=(-0.217169480465+0.275027738018j)*x[2]
+            ref[2, 1, 2]=(-0.217169480465+0.275027738018j)
+            arg[2, 2]+=(0.397193509631-0.699096284598j)*x[2]
+            ref[2, 2, 2]=(0.397193509631-0.699096284598j)
+            arg[2, 3]+=(-0.275415467183+0.897103727263j)*x[2]
+            ref[2, 3, 2]=(-0.275415467183+0.897103727263j)
+            arg[3, 0]+=(-0.883131254737+0.910945953212j)*x[2]
+            ref[3, 0, 2]=(-0.883131254737+0.910945953212j)
+            arg[3, 1]+=(-0.370931763143+0.930786800151j)*x[2]
+            ref[3, 1, 2]=(-0.370931763143+0.930786800151j)
+            arg[3, 2]+=(0.955489705234+0.480710010831j)*x[2]
+            ref[3, 2, 2]=(0.955489705234+0.480710010831j)
+            arg[3, 3]+=(-0.732714813181-0.352584131135j)*x[2]
+            ref[3, 3, 2]=(-0.732714813181-0.352584131135j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.629838778216-0.253689259181j)*x[0]+((-0.873452118998-0.28768786892j))*x[1]
+        ref[0, 0, 0, 0]=(-0.629838778216-0.253689259181j)
+        ref[0, 0, 0, 1]=(-0.873452118998-0.28768786892j)
+        arg[0, 0, 1]=(-0.189610260493-0.35587674441j)*x[0]+((0.435424885989+0.887566353994j))*x[1]
+        ref[0, 0, 1, 0]=(-0.189610260493-0.35587674441j)
+        ref[0, 0, 1, 1]=(0.435424885989+0.887566353994j)
+        arg[0, 1, 0]=(-0.627553479262+0.547776144663j)*x[0]+((-0.0901070110929+0.52021289509j))*x[1]
+        ref[0, 1, 0, 0]=(-0.627553479262+0.547776144663j)
+        ref[0, 1, 0, 1]=(-0.0901070110929+0.52021289509j)
+        arg[0, 1, 1]=(-0.602976036426-0.400846619885j)*x[0]+((0.142701798559-0.464563620787j))*x[1]
+        ref[0, 1, 1, 0]=(-0.602976036426-0.400846619885j)
+        ref[0, 1, 1, 1]=(0.142701798559-0.464563620787j)
+        arg[0, 2, 0]=(-0.121108949564+0.613805963618j)*x[0]+((-0.0124905645882-0.350621952466j))*x[1]
+        ref[0, 2, 0, 0]=(-0.121108949564+0.613805963618j)
+        ref[0, 2, 0, 1]=(-0.0124905645882-0.350621952466j)
+        arg[0, 2, 1]=(-0.436408166879-0.109297450756j)*x[0]+((0.265513502844+0.36202973073j))*x[1]
+        ref[0, 2, 1, 0]=(-0.436408166879-0.109297450756j)
+        ref[0, 2, 1, 1]=(0.265513502844+0.36202973073j)
+        arg[1, 0, 0]=(0.548661863702-0.168631311729j)*x[0]+((-0.624460109765+0.0886135160735j))*x[1]
+        ref[1, 0, 0, 0]=(0.548661863702-0.168631311729j)
+        ref[1, 0, 0, 1]=(-0.624460109765+0.0886135160735j)
+        arg[1, 0, 1]=(-0.18860554479+0.963455542841j)*x[0]+((-0.402624701816+0.528581923862j))*x[1]
+        ref[1, 0, 1, 0]=(-0.18860554479+0.963455542841j)
+        ref[1, 0, 1, 1]=(-0.402624701816+0.528581923862j)
+        arg[1, 1, 0]=(-0.528384716836-0.784941460507j)*x[0]+((-0.416796040865-0.611907240503j))*x[1]
+        ref[1, 1, 0, 0]=(-0.528384716836-0.784941460507j)
+        ref[1, 1, 0, 1]=(-0.416796040865-0.611907240503j)
+        arg[1, 1, 1]=(0.875938591042-0.658832211124j)*x[0]+((0.97474758379+0.0156078743566j))*x[1]
+        ref[1, 1, 1, 0]=(0.875938591042-0.658832211124j)
+        ref[1, 1, 1, 1]=(0.97474758379+0.0156078743566j)
+        arg[1, 2, 0]=(0.348895637029-0.685686486263j)*x[0]+((0.849084921182+0.242215770566j))*x[1]
+        ref[1, 2, 0, 0]=(0.348895637029-0.685686486263j)
+        ref[1, 2, 0, 1]=(0.849084921182+0.242215770566j)
+        arg[1, 2, 1]=(-0.236753377065-0.837892980864j)*x[0]+((-0.908371706232-0.254023049151j))*x[1]
+        ref[1, 2, 1, 0]=(-0.236753377065-0.837892980864j)
+        ref[1, 2, 1, 1]=(-0.908371706232-0.254023049151j)
+        arg[2, 0, 0]=(-0.169399612396+0.801170800478j)*x[0]+((0.647701199485-0.29867950439j))*x[1]
+        ref[2, 0, 0, 0]=(-0.169399612396+0.801170800478j)
+        ref[2, 0, 0, 1]=(0.647701199485-0.29867950439j)
+        arg[2, 0, 1]=(0.83618534837+0.768387690015j)*x[0]+((-0.655382434032-0.383274275353j))*x[1]
+        ref[2, 0, 1, 0]=(0.83618534837+0.768387690015j)
+        ref[2, 0, 1, 1]=(-0.655382434032-0.383274275353j)
+        arg[2, 1, 0]=(-0.779804203393-0.201507613905j)*x[0]+((0.991510302218+0.52086639022j))*x[1]
+        ref[2, 1, 0, 0]=(-0.779804203393-0.201507613905j)
+        ref[2, 1, 0, 1]=(0.991510302218+0.52086639022j)
+        arg[2, 1, 1]=(0.40254064808-0.575491792215j)*x[0]+((-0.220699599805-0.980884492648j))*x[1]
+        ref[2, 1, 1, 0]=(0.40254064808-0.575491792215j)
+        ref[2, 1, 1, 1]=(-0.220699599805-0.980884492648j)
+        arg[2, 2, 0]=(0.409911317562+0.0619362552194j)*x[0]+((-0.320565636303+0.672491534559j))*x[1]
+        ref[2, 2, 0, 0]=(0.409911317562+0.0619362552194j)
+        ref[2, 2, 0, 1]=(-0.320565636303+0.672491534559j)
+        arg[2, 2, 1]=(0.892065905506+0.7619452602j)*x[0]+((-0.424858109263+0.307726484131j))*x[1]
+        ref[2, 2, 1, 0]=(0.892065905506+0.7619452602j)
+        ref[2, 2, 1, 1]=(-0.424858109263+0.307726484131j)
+        arg[3, 0, 0]=(0.227808874318-0.925470046574j)*x[0]+((0.331103316164+0.0390893714891j))*x[1]
+        ref[3, 0, 0, 0]=(0.227808874318-0.925470046574j)
+        ref[3, 0, 0, 1]=(0.331103316164+0.0390893714891j)
+        arg[3, 0, 1]=(0.0424669575759-0.82904143786j)*x[0]+((0.0153180125242+0.948626726372j))*x[1]
+        ref[3, 0, 1, 0]=(0.0424669575759-0.82904143786j)
+        ref[3, 0, 1, 1]=(0.0153180125242+0.948626726372j)
+        arg[3, 1, 0]=(-0.404490428585+0.739199593333j)*x[0]+((0.606640878595+0.85359965584j))*x[1]
+        ref[3, 1, 0, 0]=(-0.404490428585+0.739199593333j)
+        ref[3, 1, 0, 1]=(0.606640878595+0.85359965584j)
+        arg[3, 1, 1]=(0.365970988023+0.853989559732j)*x[0]+((0.57222882236-0.348277471259j))*x[1]
+        ref[3, 1, 1, 0]=(0.365970988023+0.853989559732j)
+        ref[3, 1, 1, 1]=(0.57222882236-0.348277471259j)
+        arg[3, 2, 0]=(-0.470366463139-0.946045072962j)*x[0]+((0.0217109825981-0.974169664945j))*x[1]
+        ref[3, 2, 0, 0]=(-0.470366463139-0.946045072962j)
+        ref[3, 2, 0, 1]=(0.0217109825981-0.974169664945j)
+        arg[3, 2, 1]=(-0.639980320113-0.942932189472j)*x[0]+((-0.720465436299-0.870411541265j))*x[1]
+        ref[3, 2, 1, 0]=(-0.639980320113-0.942932189472j)
+        ref[3, 2, 1, 1]=(-0.720465436299-0.870411541265j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.575960465865-0.810364800886j)*x[2]
+            ref[0, 0, 0, 2]=(-0.575960465865-0.810364800886j)
+            arg[0, 0, 1]+=(-0.177286661261+0.205477593493j)*x[2]
+            ref[0, 0, 1, 2]=(-0.177286661261+0.205477593493j)
+            arg[0, 1, 0]+=(-0.420404095912+0.29569300931j)*x[2]
+            ref[0, 1, 0, 2]=(-0.420404095912+0.29569300931j)
+            arg[0, 1, 1]+=(0.286334540967-0.330413461645j)*x[2]
+            ref[0, 1, 1, 2]=(0.286334540967-0.330413461645j)
+            arg[0, 2, 0]+=(-0.785676292623-0.88709241948j)*x[2]
+            ref[0, 2, 0, 2]=(-0.785676292623-0.88709241948j)
+            arg[0, 2, 1]+=(0.266208449466-0.199970544098j)*x[2]
+            ref[0, 2, 1, 2]=(0.266208449466-0.199970544098j)
+            arg[1, 0, 0]+=(-0.413496564959+0.664791160904j)*x[2]
+            ref[1, 0, 0, 2]=(-0.413496564959+0.664791160904j)
+            arg[1, 0, 1]+=(0.20860085263+0.0484603909819j)*x[2]
+            ref[1, 0, 1, 2]=(0.20860085263+0.0484603909819j)
+            arg[1, 1, 0]+=(-0.449879954934-0.849360162657j)*x[2]
+            ref[1, 1, 0, 2]=(-0.449879954934-0.849360162657j)
+            arg[1, 1, 1]+=(0.210615713348+0.0736284208872j)*x[2]
+            ref[1, 1, 1, 2]=(0.210615713348+0.0736284208872j)
+            arg[1, 2, 0]+=(-0.431168311417+0.468373515748j)*x[2]
+            ref[1, 2, 0, 2]=(-0.431168311417+0.468373515748j)
+            arg[1, 2, 1]+=(0.294087784081-0.10236792863j)*x[2]
+            ref[1, 2, 1, 2]=(0.294087784081-0.10236792863j)
+            arg[2, 0, 0]+=(-0.710784554697-0.320990089568j)*x[2]
+            ref[2, 0, 0, 2]=(-0.710784554697-0.320990089568j)
+            arg[2, 0, 1]+=(0.669714527834-0.929394457986j)*x[2]
+            ref[2, 0, 1, 2]=(0.669714527834-0.929394457986j)
+            arg[2, 1, 0]+=(-0.155290742538+0.589850699362j)*x[2]
+            ref[2, 1, 0, 2]=(-0.155290742538+0.589850699362j)
+            arg[2, 1, 1]+=(-0.0229377814611+0.0234221999202j)*x[2]
+            ref[2, 1, 1, 2]=(-0.0229377814611+0.0234221999202j)
+            arg[2, 2, 0]+=(-0.930733407776-0.404133132279j)*x[2]
+            ref[2, 2, 0, 2]=(-0.930733407776-0.404133132279j)
+            arg[2, 2, 1]+=(-0.978941776505+0.760874131402j)*x[2]
+            ref[2, 2, 1, 2]=(-0.978941776505+0.760874131402j)
+            arg[3, 0, 0]+=(-0.0392196655234-0.236752909509j)*x[2]
+            ref[3, 0, 0, 2]=(-0.0392196655234-0.236752909509j)
+            arg[3, 0, 1]+=(0.35135533249+0.923409498333j)*x[2]
+            ref[3, 0, 1, 2]=(0.35135533249+0.923409498333j)
+            arg[3, 1, 0]+=(0.175063504772-0.286649392852j)*x[2]
+            ref[3, 1, 0, 2]=(0.175063504772-0.286649392852j)
+            arg[3, 1, 1]+=(-0.697230611235+0.395112539529j)*x[2]
+            ref[3, 1, 1, 2]=(-0.697230611235+0.395112539529j)
+            arg[3, 2, 0]+=(0.838382103955-0.911949238917j)*x[2]
+            ref[3, 2, 0, 2]=(0.838382103955-0.911949238917j)
+            arg[3, 2, 1]+=(-0.218983554844+0.308644545025j)*x[2]
+            ref[3, 2, 1, 2]=(-0.218983554844+0.308644545025j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.568135493446-0.158709197692j)*x[0]+((0.957224351388+0.980352625493j))*x[1]
+        ref[0]=(0.568135493446-0.158709197692j)
+        ref[1]=(0.957224351388+0.980352625493j)
+        if dim==3:
+            arg+=((-0.028596280885+0.308788365068j))*x[2]
+            ref[2]=(-0.028596280885+0.308788365068j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(-0.642023299564-0.139324023141j)*x[0]+((-0.58149693349-0.0895954786309j))*x[1]
+        ref[0, 0]=(-0.642023299564-0.139324023141j)
+        ref[0, 1]=(-0.58149693349-0.0895954786309j)
+        arg[1,]=(-0.532576164885+0.49596688529j)*x[0]+((0.871101657477+0.589326061599j))*x[1]
+        ref[1, 0]=(-0.532576164885+0.49596688529j)
+        ref[1, 1]=(0.871101657477+0.589326061599j)
+        arg[2,]=(-0.484955823272+0.104745513999j)*x[0]+((-0.397961611422-0.287185035181j))*x[1]
+        ref[2, 0]=(-0.484955823272+0.104745513999j)
+        ref[2, 1]=(-0.397961611422-0.287185035181j)
+        if dim==3:
+            arg[0,]+=(-0.235870348739-0.581255966119j)*x[2]
+            ref[0, 2]=(-0.235870348739-0.581255966119j)
+            arg[1,]+=(0.0748155206692+0.0696817711676j)*x[2]
+            ref[1, 2]=(0.0748155206692+0.0696817711676j)
+            arg[2,]+=(0.486577894495-0.966642858615j)*x[2]
+            ref[2, 2]=(0.486577894495-0.966642858615j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.52390866493-0.191251514902j)*x[0]+((0.501017816766+0.749633582797j))*x[1]
+        ref[0, 0, 0]=(-0.52390866493-0.191251514902j)
+        ref[0, 0, 1]=(0.501017816766+0.749633582797j)
+        arg[0, 1]=(0.955891275056+0.375020844574j)*x[0]+((-0.16876373765+0.778350447263j))*x[1]
+        ref[0, 1, 0]=(0.955891275056+0.375020844574j)
+        ref[0, 1, 1]=(-0.16876373765+0.778350447263j)
+        arg[0, 2]=(0.670842161496+0.545714481198j)*x[0]+((-0.192903248524-0.899557684731j))*x[1]
+        ref[0, 2, 0]=(0.670842161496+0.545714481198j)
+        ref[0, 2, 1]=(-0.192903248524-0.899557684731j)
+        arg[0, 3]=(-0.818183867084+0.267073347785j)*x[0]+((0.237694236764+0.627512683829j))*x[1]
+        ref[0, 3, 0]=(-0.818183867084+0.267073347785j)
+        ref[0, 3, 1]=(0.237694236764+0.627512683829j)
+        arg[1, 0]=(0.455613474149-0.112254890543j)*x[0]+((-0.00726667074008-0.0985489071198j))*x[1]
+        ref[1, 0, 0]=(0.455613474149-0.112254890543j)
+        ref[1, 0, 1]=(-0.00726667074008-0.0985489071198j)
+        arg[1, 1]=(-0.827574103983+0.16439676583j)*x[0]+((-0.116468059214-0.189929153994j))*x[1]
+        ref[1, 1, 0]=(-0.827574103983+0.16439676583j)
+        ref[1, 1, 1]=(-0.116468059214-0.189929153994j)
+        arg[1, 2]=(-0.0360208932746+0.539276411973j)*x[0]+((0.885791973127-0.866136686789j))*x[1]
+        ref[1, 2, 0]=(-0.0360208932746+0.539276411973j)
+        ref[1, 2, 1]=(0.885791973127-0.866136686789j)
+        arg[1, 3]=(-0.473886816803-0.450485662148j)*x[0]+((0.411102220916+0.741278400074j))*x[1]
+        ref[1, 3, 0]=(-0.473886816803-0.450485662148j)
+        ref[1, 3, 1]=(0.411102220916+0.741278400074j)
+        arg[2, 0]=(0.647637645131+0.644452756547j)*x[0]+((0.106632867545-0.0736540776084j))*x[1]
+        ref[2, 0, 0]=(0.647637645131+0.644452756547j)
+        ref[2, 0, 1]=(0.106632867545-0.0736540776084j)
+        arg[2, 1]=(-0.744797535462-0.453047079253j)*x[0]+((-0.225665473756+0.259288361222j))*x[1]
+        ref[2, 1, 0]=(-0.744797535462-0.453047079253j)
+        ref[2, 1, 1]=(-0.225665473756+0.259288361222j)
+        arg[2, 2]=(-0.501183250002-0.550049001174j)*x[0]+((0.247119625096+0.205743278812j))*x[1]
+        ref[2, 2, 0]=(-0.501183250002-0.550049001174j)
+        ref[2, 2, 1]=(0.247119625096+0.205743278812j)
+        arg[2, 3]=(-0.183503417424-0.561903610842j)*x[0]+((-0.304440258904-0.00356578494441j))*x[1]
+        ref[2, 3, 0]=(-0.183503417424-0.561903610842j)
+        ref[2, 3, 1]=(-0.304440258904-0.00356578494441j)
+        arg[3, 0]=(0.0657998609263-0.874488766297j)*x[0]+((0.836442809008-0.15500997935j))*x[1]
+        ref[3, 0, 0]=(0.0657998609263-0.874488766297j)
+        ref[3, 0, 1]=(0.836442809008-0.15500997935j)
+        arg[3, 1]=(-0.976502965102+0.325283932315j)*x[0]+((0.451154010085+0.836450843889j))*x[1]
+        ref[3, 1, 0]=(-0.976502965102+0.325283932315j)
+        ref[3, 1, 1]=(0.451154010085+0.836450843889j)
+        arg[3, 2]=(-0.765320762346+0.527937071931j)*x[0]+((0.017055706682-0.857264251708j))*x[1]
+        ref[3, 2, 0]=(-0.765320762346+0.527937071931j)
+        ref[3, 2, 1]=(0.017055706682-0.857264251708j)
+        arg[3, 3]=(0.298681117617-0.742845374019j)*x[0]+((0.0685530111304-0.488339149209j))*x[1]
+        ref[3, 3, 0]=(0.298681117617-0.742845374019j)
+        ref[3, 3, 1]=(0.0685530111304-0.488339149209j)
+        if dim==3:
+            arg[0, 0]+=(0.898105918017-0.50908054438j)*x[2]
+            ref[0, 0, 2]=(0.898105918017-0.50908054438j)
+            arg[0, 1]+=(0.971460528382-0.913297079187j)*x[2]
+            ref[0, 1, 2]=(0.971460528382-0.913297079187j)
+            arg[0, 2]+=(0.553102891142+0.392110186527j)*x[2]
+            ref[0, 2, 2]=(0.553102891142+0.392110186527j)
+            arg[0, 3]+=(-0.0761813268684-0.34471059777j)*x[2]
+            ref[0, 3, 2]=(-0.0761813268684-0.34471059777j)
+            arg[1, 0]+=(-0.254335557654+0.0925044281101j)*x[2]
+            ref[1, 0, 2]=(-0.254335557654+0.0925044281101j)
+            arg[1, 1]+=(0.488611261533-0.637033487197j)*x[2]
+            ref[1, 1, 2]=(0.488611261533-0.637033487197j)
+            arg[1, 2]+=(0.291340156577+0.670777317205j)*x[2]
+            ref[1, 2, 2]=(0.291340156577+0.670777317205j)
+            arg[1, 3]+=(0.919298099735+0.008858094689j)*x[2]
+            ref[1, 3, 2]=(0.919298099735+0.008858094689j)
+            arg[2, 0]+=(0.267460287827-0.00432982578537j)*x[2]
+            ref[2, 0, 2]=(0.267460287827-0.00432982578537j)
+            arg[2, 1]+=(0.850044815235-0.2297598102j)*x[2]
+            ref[2, 1, 2]=(0.850044815235-0.2297598102j)
+            arg[2, 2]+=(-0.243753688982-0.122324819356j)*x[2]
+            ref[2, 2, 2]=(-0.243753688982-0.122324819356j)
+            arg[2, 3]+=(-0.686005842116-0.238918822992j)*x[2]
+            ref[2, 3, 2]=(-0.686005842116-0.238918822992j)
+            arg[3, 0]+=(-0.209526809499+0.897256776286j)*x[2]
+            ref[3, 0, 2]=(-0.209526809499+0.897256776286j)
+            arg[3, 1]+=(-0.376315774146-0.32636606686j)*x[2]
+            ref[3, 1, 2]=(-0.376315774146-0.32636606686j)
+            arg[3, 2]+=(-0.841771699145+0.964114324616j)*x[2]
+            ref[3, 2, 2]=(-0.841771699145+0.964114324616j)
+            arg[3, 3]+=(0.296524089522-0.547342639569j)*x[2]
+            ref[3, 3, 2]=(0.296524089522-0.547342639569j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.0475403657803+0.721281819266j)*x[0]+((-0.348223671721+0.484336881331j))*x[1]
+        ref[0, 0, 0, 0]=(0.0475403657803+0.721281819266j)
+        ref[0, 0, 0, 1]=(-0.348223671721+0.484336881331j)
+        arg[0, 0, 1]=(0.0152262784762+0.554805554096j)*x[0]+((-0.840822048189-0.139773761722j))*x[1]
+        ref[0, 0, 1, 0]=(0.0152262784762+0.554805554096j)
+        ref[0, 0, 1, 1]=(-0.840822048189-0.139773761722j)
+        arg[0, 0, 2]=(-0.975190638587-0.683312865417j)*x[0]+((-0.170798568843+0.450575535059j))*x[1]
+        ref[0, 0, 2, 0]=(-0.975190638587-0.683312865417j)
+        ref[0, 0, 2, 1]=(-0.170798568843+0.450575535059j)
+        arg[0, 0, 3]=(-0.389040852334+0.0707754188654j)*x[0]+((0.856409819716-0.390840619794j))*x[1]
+        ref[0, 0, 3, 0]=(-0.389040852334+0.0707754188654j)
+        ref[0, 0, 3, 1]=(0.856409819716-0.390840619794j)
+        arg[0, 1, 0]=(0.647634031122-0.602689129604j)*x[0]+((-0.39887302447-0.562687007238j))*x[1]
+        ref[0, 1, 0, 0]=(0.647634031122-0.602689129604j)
+        ref[0, 1, 0, 1]=(-0.39887302447-0.562687007238j)
+        arg[0, 1, 1]=(0.102863379424+0.26658110439j)*x[0]+((0.311155218931-0.958345149485j))*x[1]
+        ref[0, 1, 1, 0]=(0.102863379424+0.26658110439j)
+        ref[0, 1, 1, 1]=(0.311155218931-0.958345149485j)
+        arg[0, 1, 2]=(0.732028911374-0.126400526444j)*x[0]+((0.222553514537+0.570161936059j))*x[1]
+        ref[0, 1, 2, 0]=(0.732028911374-0.126400526444j)
+        ref[0, 1, 2, 1]=(0.222553514537+0.570161936059j)
+        arg[0, 1, 3]=(-0.0249679421446+0.41160124049j)*x[0]+((0.291103372161+0.861147847998j))*x[1]
+        ref[0, 1, 3, 0]=(-0.0249679421446+0.41160124049j)
+        ref[0, 1, 3, 1]=(0.291103372161+0.861147847998j)
+        arg[1, 0, 0]=(0.856567475477+0.0112692019084j)*x[0]+((-0.855256203439-0.754755450445j))*x[1]
+        ref[1, 0, 0, 0]=(0.856567475477+0.0112692019084j)
+        ref[1, 0, 0, 1]=(-0.855256203439-0.754755450445j)
+        arg[1, 0, 1]=(-0.278276941083+0.39928641703j)*x[0]+((0.471715593051+0.0391273282665j))*x[1]
+        ref[1, 0, 1, 0]=(-0.278276941083+0.39928641703j)
+        ref[1, 0, 1, 1]=(0.471715593051+0.0391273282665j)
+        arg[1, 0, 2]=(-0.82296960595-0.520461819259j)*x[0]+((-0.506522116683+0.788547707969j))*x[1]
+        ref[1, 0, 2, 0]=(-0.82296960595-0.520461819259j)
+        ref[1, 0, 2, 1]=(-0.506522116683+0.788547707969j)
+        arg[1, 0, 3]=(-0.681978937539+0.397683349775j)*x[0]+((0.54821165263-0.251771322682j))*x[1]
+        ref[1, 0, 3, 0]=(-0.681978937539+0.397683349775j)
+        ref[1, 0, 3, 1]=(0.54821165263-0.251771322682j)
+        arg[1, 1, 0]=(-0.827039162203+0.143928885791j)*x[0]+((0.180674764706-0.969265640811j))*x[1]
+        ref[1, 1, 0, 0]=(-0.827039162203+0.143928885791j)
+        ref[1, 1, 0, 1]=(0.180674764706-0.969265640811j)
+        arg[1, 1, 1]=(-0.739242393864+0.691472047882j)*x[0]+((0.0268635920225+0.542155546427j))*x[1]
+        ref[1, 1, 1, 0]=(-0.739242393864+0.691472047882j)
+        ref[1, 1, 1, 1]=(0.0268635920225+0.542155546427j)
+        arg[1, 1, 2]=(0.708012953543+0.905959654066j)*x[0]+((-0.604010085565+0.66311717232j))*x[1]
+        ref[1, 1, 2, 0]=(0.708012953543+0.905959654066j)
+        ref[1, 1, 2, 1]=(-0.604010085565+0.66311717232j)
+        arg[1, 1, 3]=(0.211018655626-0.458435406904j)*x[0]+((0.521397394004+0.193310205946j))*x[1]
+        ref[1, 1, 3, 0]=(0.211018655626-0.458435406904j)
+        ref[1, 1, 3, 1]=(0.521397394004+0.193310205946j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.0646144016708+0.809774815073j)*x[2]
+            ref[0, 0, 0, 2]=(0.0646144016708+0.809774815073j)
+            arg[0, 0, 1]+=(0.617519174507+0.166679565782j)*x[2]
+            ref[0, 0, 1, 2]=(0.617519174507+0.166679565782j)
+            arg[0, 0, 2]+=(-0.841286204178-0.941928749464j)*x[2]
+            ref[0, 0, 2, 2]=(-0.841286204178-0.941928749464j)
+            arg[0, 0, 3]+=(-0.80117837805-0.811592521373j)*x[2]
+            ref[0, 0, 3, 2]=(-0.80117837805-0.811592521373j)
+            arg[0, 1, 0]+=(0.282169834712-0.662931914568j)*x[2]
+            ref[0, 1, 0, 2]=(0.282169834712-0.662931914568j)
+            arg[0, 1, 1]+=(0.903257468146-0.541435329313j)*x[2]
+            ref[0, 1, 1, 2]=(0.903257468146-0.541435329313j)
+            arg[0, 1, 2]+=(-0.742635694566+0.310673192753j)*x[2]
+            ref[0, 1, 2, 2]=(-0.742635694566+0.310673192753j)
+            arg[0, 1, 3]+=(0.0827489131954+0.855038935169j)*x[2]
+            ref[0, 1, 3, 2]=(0.0827489131954+0.855038935169j)
+            arg[1, 0, 0]+=(-0.315375524058-0.577943467343j)*x[2]
+            ref[1, 0, 0, 2]=(-0.315375524058-0.577943467343j)
+            arg[1, 0, 1]+=(0.0247041795427-0.742204365872j)*x[2]
+            ref[1, 0, 1, 2]=(0.0247041795427-0.742204365872j)
+            arg[1, 0, 2]+=(-0.557239406252+0.225495326143j)*x[2]
+            ref[1, 0, 2, 2]=(-0.557239406252+0.225495326143j)
+            arg[1, 0, 3]+=(-0.345023289254-0.536249949718j)*x[2]
+            ref[1, 0, 3, 2]=(-0.345023289254-0.536249949718j)
+            arg[1, 1, 0]+=(0.172056535266+0.0150749193857j)*x[2]
+            ref[1, 1, 0, 2]=(0.172056535266+0.0150749193857j)
+            arg[1, 1, 1]+=(-0.265434576469+0.34296838458j)*x[2]
+            ref[1, 1, 1, 2]=(-0.265434576469+0.34296838458j)
+            arg[1, 1, 2]+=(-0.806376175945+0.540158295447j)*x[2]
+            ref[1, 1, 2, 2]=(-0.806376175945+0.540158295447j)
+            arg[1, 1, 3]+=(-0.199055239441+0.197683206619j)*x[2]
+            ref[1, 1, 3, 2]=(-0.199055239441+0.197683206619j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.466152647578-0.133295489569j)*x[0]**o+((0.770012876582-0.315067632431j))*x[0]+((0.37472108293+0.916815506118j))*x[1]**o+((0.344970238016+0.616409102446j))*x[1]
+        ref[0]=(0.466152647578-0.133295489569j)*o*x_ref[0]**(o-1)+((0.770012876582-0.315067632431j))
+        ref[1]=(0.37472108293+0.916815506118j)*o*x_ref[1]**(o-1)+((0.344970238016+0.616409102446j))
+        if dim==3:
+            arg+=((-0.700089355064+0.243895831542j))*x[2]**o+((-0.333158795144-0.25836431213j))*x[2]
+            ref[2]=(-0.700089355064+0.243895831542j)*o*x_ref[2]**(o-1)+((-0.333158795144-0.25836431213j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(-0.0840045031987-0.851369911762j)*x[0]**o+((-0.080968689999+0.223516269562j))*x[0]+((0.364268703417+0.679378267275j))*x[1]**o+((0.387055875118-0.163133139455j))*x[1]
+        ref[0, 0]=(-0.0840045031987-0.851369911762j)*o*x_ref[0]**(o-1)+((-0.080968689999+0.223516269562j))
+        ref[0, 1]=(0.364268703417+0.679378267275j)*o*x_ref[1]**(o-1)+((0.387055875118-0.163133139455j))
+        arg[1,]=(-0.791434892995+0.815202912876j)*x[0]**o+((-0.203599063148+0.32409250444j))*x[0]+((-0.897023249254-0.851426173081j))*x[1]**o+((-0.70838522916-0.195657648539j))*x[1]
+        ref[1, 0]=(-0.791434892995+0.815202912876j)*o*x_ref[0]**(o-1)+((-0.203599063148+0.32409250444j))
+        ref[1, 1]=(-0.897023249254-0.851426173081j)*o*x_ref[1]**(o-1)+((-0.70838522916-0.195657648539j))
+        if dim==3:
+            arg[0,]+=(0.252586102305+0.571588126583j)*x[2]**o+((-0.850183310841+0.528602215765j))*x[2]
+            ref[0, 2]=(0.252586102305+0.571588126583j)*o*x_ref[2]**(o-1)+((-0.850183310841+0.528602215765j))
+            arg[1,]+=(0.511620295331+0.899154532427j)*x[2]**o+((0.746255927406+0.856195738638j))*x[2]
+            ref[1, 2]=(0.511620295331+0.899154532427j)*o*x_ref[2]**(o-1)+((0.746255927406+0.856195738638j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=(-0.356698832214-0.134093743163j)*x[0]**o+((0.755515268467+0.0183758010074j))*x[0]+((0.889421455714-0.541567297622j))*x[1]**o+((0.446368674886+0.561159243708j))*x[1]
+        ref[0, 0, 0]=(-0.356698832214-0.134093743163j)*o*x_ref[0]**(o-1)+((0.755515268467+0.0183758010074j))
+        ref[0, 0, 1]=(0.889421455714-0.541567297622j)*o*x_ref[1]**(o-1)+((0.446368674886+0.561159243708j))
+        arg[0, 1]=(0.275666864555+0.446559816269j)*x[0]**o+((-0.241805534981+0.942565430802j))*x[0]+((-0.582576755281-0.552423646435j))*x[1]**o+((-0.760233317243-0.385883728257j))*x[1]
+        ref[0, 1, 0]=(0.275666864555+0.446559816269j)*o*x_ref[0]**(o-1)+((-0.241805534981+0.942565430802j))
+        ref[0, 1, 1]=(-0.582576755281-0.552423646435j)*o*x_ref[1]**(o-1)+((-0.760233317243-0.385883728257j))
+        arg[0, 2]=(0.717075745616-0.128652487417j)*x[0]**o+((-0.531748105278-0.638775987471j))*x[0]+((0.405528682188+0.709907629426j))*x[1]**o+((0.515769490161+0.339622487792j))*x[1]
+        ref[0, 2, 0]=(0.717075745616-0.128652487417j)*o*x_ref[0]**(o-1)+((-0.531748105278-0.638775987471j))
+        ref[0, 2, 1]=(0.405528682188+0.709907629426j)*o*x_ref[1]**(o-1)+((0.515769490161+0.339622487792j))
+        arg[1, 0]=(-0.445424582735-0.592713994831j)*x[0]**o+((0.562763020784+0.997570324944j))*x[0]+((-0.540735781508-0.336264347784j))*x[1]**o+((0.0468128900778-0.220059777575j))*x[1]
+        ref[1, 0, 0]=(-0.445424582735-0.592713994831j)*o*x_ref[0]**(o-1)+((0.562763020784+0.997570324944j))
+        ref[1, 0, 1]=(-0.540735781508-0.336264347784j)*o*x_ref[1]**(o-1)+((0.0468128900778-0.220059777575j))
+        arg[1, 1]=(0.192655647878-0.664137566637j)*x[0]**o+((0.0718084165544+0.0969735474631j))*x[0]+((-0.307565567567-0.540948710921j))*x[1]**o+((-0.502249892497+0.0285477206522j))*x[1]
+        ref[1, 1, 0]=(0.192655647878-0.664137566637j)*o*x_ref[0]**(o-1)+((0.0718084165544+0.0969735474631j))
+        ref[1, 1, 1]=(-0.307565567567-0.540948710921j)*o*x_ref[1]**(o-1)+((-0.502249892497+0.0285477206522j))
+        arg[1, 2]=(0.621644051077-0.290339452827j)*x[0]**o+((-0.979994686227-0.440549121473j))*x[0]+((0.0909936859345-0.574795132185j))*x[1]**o+((-0.876940949903+0.388658257437j))*x[1]
+        ref[1, 2, 0]=(0.621644051077-0.290339452827j)*o*x_ref[0]**(o-1)+((-0.979994686227-0.440549121473j))
+        ref[1, 2, 1]=(0.0909936859345-0.574795132185j)*o*x_ref[1]**(o-1)+((-0.876940949903+0.388658257437j))
+        arg[2, 0]=(-0.861303981929-0.00800677362157j)*x[0]**o+((0.272766996112+0.0630573245514j))*x[0]+((-0.258082444866+0.0363461161035j))*x[1]**o+((0.168679291128+0.831884814176j))*x[1]
+        ref[2, 0, 0]=(-0.861303981929-0.00800677362157j)*o*x_ref[0]**(o-1)+((0.272766996112+0.0630573245514j))
+        ref[2, 0, 1]=(-0.258082444866+0.0363461161035j)*o*x_ref[1]**(o-1)+((0.168679291128+0.831884814176j))
+        arg[2, 1]=(-0.5084712979+0.757011642356j)*x[0]**o+((0.76360301089+0.528440562313j))*x[0]+((-0.307276890566-0.328753943908j))*x[1]**o+((-0.255568669804-0.504972757102j))*x[1]
+        ref[2, 1, 0]=(-0.5084712979+0.757011642356j)*o*x_ref[0]**(o-1)+((0.76360301089+0.528440562313j))
+        ref[2, 1, 1]=(-0.307276890566-0.328753943908j)*o*x_ref[1]**(o-1)+((-0.255568669804-0.504972757102j))
+        arg[2, 2]=(-0.613315602195-0.45543220564j)*x[0]**o+((-0.94169943171+0.334037181283j))*x[0]+((-0.318388080917+0.952564892053j))*x[1]**o+((-0.209039676549+0.748580007515j))*x[1]
+        ref[2, 2, 0]=(-0.613315602195-0.45543220564j)*o*x_ref[0]**(o-1)+((-0.94169943171+0.334037181283j))
+        ref[2, 2, 1]=(-0.318388080917+0.952564892053j)*o*x_ref[1]**(o-1)+((-0.209039676549+0.748580007515j))
+        arg[3, 0]=(-0.510879509601+0.470092979342j)*x[0]**o+((-0.613593153447+0.946639276904j))*x[0]+((-0.334904718443-0.363503240847j))*x[1]**o+((0.375541102495+0.547813982437j))*x[1]
+        ref[3, 0, 0]=(-0.510879509601+0.470092979342j)*o*x_ref[0]**(o-1)+((-0.613593153447+0.946639276904j))
+        ref[3, 0, 1]=(-0.334904718443-0.363503240847j)*o*x_ref[1]**(o-1)+((0.375541102495+0.547813982437j))
+        arg[3, 1]=(0.592945995457+0.459846681968j)*x[0]**o+((-0.461289005392+0.826717461289j))*x[0]+((0.949106133114-0.754061298116j))*x[1]**o+((0.742661160295+0.0494562619451j))*x[1]
+        ref[3, 1, 0]=(0.592945995457+0.459846681968j)*o*x_ref[0]**(o-1)+((-0.461289005392+0.826717461289j))
+        ref[3, 1, 1]=(0.949106133114-0.754061298116j)*o*x_ref[1]**(o-1)+((0.742661160295+0.0494562619451j))
+        arg[3, 2]=(0.217356286201-0.0307762246585j)*x[0]**o+((-0.309479217903-0.842338224388j))*x[0]+((-0.227278853173+0.687557842431j))*x[1]**o+((0.837177374341+0.465866004805j))*x[1]
+        ref[3, 2, 0]=(0.217356286201-0.0307762246585j)*o*x_ref[0]**(o-1)+((-0.309479217903-0.842338224388j))
+        ref[3, 2, 1]=(-0.227278853173+0.687557842431j)*o*x_ref[1]**(o-1)+((0.837177374341+0.465866004805j))
+        if dim==3:
+            arg[0, 0]+=(0.985770567254+0.802477847851j)*x[2]**o+((0.00656836580105-0.0886627125498j))*x[2]
+            ref[0, 0, 2]=(0.985770567254+0.802477847851j)*o*x_ref[2]**(o-1)+((0.00656836580105-0.0886627125498j))
+            arg[0, 1]+=(0.167859634301-0.957161097573j)*x[2]**o+((-0.121453672154-0.543246258249j))*x[2]
+            ref[0, 1, 2]=(0.167859634301-0.957161097573j)*o*x_ref[2]**(o-1)+((-0.121453672154-0.543246258249j))
+            arg[0, 2]+=(0.937564214987+0.684795387319j)*x[2]**o+((0.749117836713-0.223631172566j))*x[2]
+            ref[0, 2, 2]=(0.937564214987+0.684795387319j)*o*x_ref[2]**(o-1)+((0.749117836713-0.223631172566j))
+            arg[1, 0]+=(0.208958208531+0.804205608307j)*x[2]**o+((0.835957745874-0.891830026158j))*x[2]
+            ref[1, 0, 2]=(0.208958208531+0.804205608307j)*o*x_ref[2]**(o-1)+((0.835957745874-0.891830026158j))
+            arg[1, 1]+=(-0.729880820753-0.011928231697j)*x[2]**o+((-0.814074817888+0.856423840897j))*x[2]
+            ref[1, 1, 2]=(-0.729880820753-0.011928231697j)*o*x_ref[2]**(o-1)+((-0.814074817888+0.856423840897j))
+            arg[1, 2]+=(-0.424575932794-0.856639560753j)*x[2]**o+((-0.539026850898+0.0324609045402j))*x[2]
+            ref[1, 2, 2]=(-0.424575932794-0.856639560753j)*o*x_ref[2]**(o-1)+((-0.539026850898+0.0324609045402j))
+            arg[2, 0]+=(-0.651081242088+0.237607703277j)*x[2]**o+((0.139374320777+0.790078409599j))*x[2]
+            ref[2, 0, 2]=(-0.651081242088+0.237607703277j)*o*x_ref[2]**(o-1)+((0.139374320777+0.790078409599j))
+            arg[2, 1]+=(0.605469155519+0.552927771039j)*x[2]**o+((-0.86989521541-0.815937434908j))*x[2]
+            ref[2, 1, 2]=(0.605469155519+0.552927771039j)*o*x_ref[2]**(o-1)+((-0.86989521541-0.815937434908j))
+            arg[2, 2]+=(-0.168508232356-0.637385763768j)*x[2]**o+((0.0287601660577-0.48709910008j))*x[2]
+            ref[2, 2, 2]=(-0.168508232356-0.637385763768j)*o*x_ref[2]**(o-1)+((0.0287601660577-0.48709910008j))
+            arg[3, 0]+=(0.923963817415-0.3003397646j)*x[2]**o+((0.380383034-0.451311993616j))*x[2]
+            ref[3, 0, 2]=(0.923963817415-0.3003397646j)*o*x_ref[2]**(o-1)+((0.380383034-0.451311993616j))
+            arg[3, 1]+=(0.794297177217+0.169051990407j)*x[2]**o+((-0.367004126261-0.803390560195j))*x[2]
+            ref[3, 1, 2]=(0.794297177217+0.169051990407j)*o*x_ref[2]**(o-1)+((-0.367004126261-0.803390560195j))
+            arg[3, 2]+=(-0.986876983229-0.0429793856422j)*x[2]**o+((-0.535214007538-0.232131236674j))*x[2]
+            ref[3, 2, 2]=(-0.986876983229-0.0429793856422j)*o*x_ref[2]**(o-1)+((-0.535214007538-0.232131236674j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3),w)
+        ref = Data(0,(3, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.887451866206+0.848604863034j)*x[0]**o+((0.518155880313-0.208874961069j))*x[0]+((-0.707121131389-0.311400637167j))*x[1]**o+((-0.41596135207-0.381505119114j))*x[1]
+        ref[0, 0, 0, 0]=(-0.887451866206+0.848604863034j)*o*x_ref[0]**(o-1)+((0.518155880313-0.208874961069j))
+        ref[0, 0, 0, 1]=(-0.707121131389-0.311400637167j)*o*x_ref[1]**(o-1)+((-0.41596135207-0.381505119114j))
+        arg[0, 0, 1]=(0.781826325112+0.333334390815j)*x[0]**o+((-0.36310828734-0.873326165515j))*x[0]+((-0.922539619029-0.0340687596874j))*x[1]**o+((-0.934789042093+0.833914028755j))*x[1]
+        ref[0, 0, 1, 0]=(0.781826325112+0.333334390815j)*o*x_ref[0]**(o-1)+((-0.36310828734-0.873326165515j))
+        ref[0, 0, 1, 1]=(-0.922539619029-0.0340687596874j)*o*x_ref[1]**(o-1)+((-0.934789042093+0.833914028755j))
+        arg[0, 0, 2]=(-0.794384377659-0.129548723761j)*x[0]**o+((0.234007538581+0.743835309587j))*x[0]+((0.742519406427+0.0951768250433j))*x[1]**o+((0.416525547179-0.0652308464478j))*x[1]
+        ref[0, 0, 2, 0]=(-0.794384377659-0.129548723761j)*o*x_ref[0]**(o-1)+((0.234007538581+0.743835309587j))
+        ref[0, 0, 2, 1]=(0.742519406427+0.0951768250433j)*o*x_ref[1]**(o-1)+((0.416525547179-0.0652308464478j))
+        arg[0, 1, 0]=(-0.648004349909-0.0915006972594j)*x[0]**o+((-0.27309791943-0.254189441354j))*x[0]+((-0.536563593661-0.820832856979j))*x[1]**o+((0.507767267827+0.95972465842j))*x[1]
+        ref[0, 1, 0, 0]=(-0.648004349909-0.0915006972594j)*o*x_ref[0]**(o-1)+((-0.27309791943-0.254189441354j))
+        ref[0, 1, 0, 1]=(-0.536563593661-0.820832856979j)*o*x_ref[1]**(o-1)+((0.507767267827+0.95972465842j))
+        arg[0, 1, 1]=(-0.0486241680827-0.634998142512j)*x[0]**o+((-0.751824463636+0.725983618338j))*x[0]+((-0.92547130139+0.958124321292j))*x[1]**o+((0.287931700527-0.9188894354j))*x[1]
+        ref[0, 1, 1, 0]=(-0.0486241680827-0.634998142512j)*o*x_ref[0]**(o-1)+((-0.751824463636+0.725983618338j))
+        ref[0, 1, 1, 1]=(-0.92547130139+0.958124321292j)*o*x_ref[1]**(o-1)+((0.287931700527-0.9188894354j))
+        arg[0, 1, 2]=(-0.408886869143-0.896099909137j)*x[0]**o+((-0.115880022131-0.3929524357j))*x[0]+((-0.981377279548+0.167386958767j))*x[1]**o+((0.752982625838-0.847912216282j))*x[1]
+        ref[0, 1, 2, 0]=(-0.408886869143-0.896099909137j)*o*x_ref[0]**(o-1)+((-0.115880022131-0.3929524357j))
+        ref[0, 1, 2, 1]=(-0.981377279548+0.167386958767j)*o*x_ref[1]**(o-1)+((0.752982625838-0.847912216282j))
+        arg[0, 2, 0]=(0.674165015758+0.94771068119j)*x[0]**o+((0.815537804192-0.247906436911j))*x[0]+((0.769531643387+0.668962635823j))*x[1]**o+((-0.535764262179-0.323914834769j))*x[1]
+        ref[0, 2, 0, 0]=(0.674165015758+0.94771068119j)*o*x_ref[0]**(o-1)+((0.815537804192-0.247906436911j))
+        ref[0, 2, 0, 1]=(0.769531643387+0.668962635823j)*o*x_ref[1]**(o-1)+((-0.535764262179-0.323914834769j))
+        arg[0, 2, 1]=(0.303835489816-0.214754865965j)*x[0]**o+((0.92609912441-0.5198878249j))*x[0]+((-0.841702439159-0.439048827673j))*x[1]**o+((0.257502462666+0.414975788935j))*x[1]
+        ref[0, 2, 1, 0]=(0.303835489816-0.214754865965j)*o*x_ref[0]**(o-1)+((0.92609912441-0.5198878249j))
+        ref[0, 2, 1, 1]=(-0.841702439159-0.439048827673j)*o*x_ref[1]**(o-1)+((0.257502462666+0.414975788935j))
+        arg[0, 2, 2]=(-0.420498604126-0.342002123497j)*x[0]**o+((0.132475948112+0.909461498912j))*x[0]+((-0.439296053033-0.397333124645j))*x[1]**o+((-0.948787550527+0.415672736171j))*x[1]
+        ref[0, 2, 2, 0]=(-0.420498604126-0.342002123497j)*o*x_ref[0]**(o-1)+((0.132475948112+0.909461498912j))
+        ref[0, 2, 2, 1]=(-0.439296053033-0.397333124645j)*o*x_ref[1]**(o-1)+((-0.948787550527+0.415672736171j))
+        arg[0, 3, 0]=(0.24321903201-0.82889922118j)*x[0]**o+((0.756504866943+0.338828865414j))*x[0]+((0.754652126022-0.409771188829j))*x[1]**o+((0.0630745787172-0.184487123558j))*x[1]
+        ref[0, 3, 0, 0]=(0.24321903201-0.82889922118j)*o*x_ref[0]**(o-1)+((0.756504866943+0.338828865414j))
+        ref[0, 3, 0, 1]=(0.754652126022-0.409771188829j)*o*x_ref[1]**(o-1)+((0.0630745787172-0.184487123558j))
+        arg[0, 3, 1]=(-0.150726249226-0.941767134708j)*x[0]**o+((0.339616441313+0.55102609105j))*x[0]+((-0.103586791666+0.84438032215j))*x[1]**o+((0.954860821998+0.59524306281j))*x[1]
+        ref[0, 3, 1, 0]=(-0.150726249226-0.941767134708j)*o*x_ref[0]**(o-1)+((0.339616441313+0.55102609105j))
+        ref[0, 3, 1, 1]=(-0.103586791666+0.84438032215j)*o*x_ref[1]**(o-1)+((0.954860821998+0.59524306281j))
+        arg[0, 3, 2]=(-0.911828438274+0.538846462053j)*x[0]**o+((-0.873707906083+0.298609560387j))*x[0]+((-0.67373944448-0.388773323835j))*x[1]**o+((0.788847191951-0.884650693805j))*x[1]
+        ref[0, 3, 2, 0]=(-0.911828438274+0.538846462053j)*o*x_ref[0]**(o-1)+((-0.873707906083+0.298609560387j))
+        ref[0, 3, 2, 1]=(-0.67373944448-0.388773323835j)*o*x_ref[1]**(o-1)+((0.788847191951-0.884650693805j))
+        arg[1, 0, 0]=(0.334965067553-0.728596570927j)*x[0]**o+((0.775745730611-0.881192892879j))*x[0]+((0.782856081029+0.492775219716j))*x[1]**o+((-0.956512701805-0.516882372047j))*x[1]
+        ref[1, 0, 0, 0]=(0.334965067553-0.728596570927j)*o*x_ref[0]**(o-1)+((0.775745730611-0.881192892879j))
+        ref[1, 0, 0, 1]=(0.782856081029+0.492775219716j)*o*x_ref[1]**(o-1)+((-0.956512701805-0.516882372047j))
+        arg[1, 0, 1]=(0.280952567561-0.580939238454j)*x[0]**o+((-0.536939741302-0.189299532584j))*x[0]+((-0.567029110337-0.41824036524j))*x[1]**o+((-0.61507510422-0.400137966216j))*x[1]
+        ref[1, 0, 1, 0]=(0.280952567561-0.580939238454j)*o*x_ref[0]**(o-1)+((-0.536939741302-0.189299532584j))
+        ref[1, 0, 1, 1]=(-0.567029110337-0.41824036524j)*o*x_ref[1]**(o-1)+((-0.61507510422-0.400137966216j))
+        arg[1, 0, 2]=(0.113101487685+0.427369406658j)*x[0]**o+((0.0157689414167-0.718998108196j))*x[0]+((-0.388184450579+0.929552295809j))*x[1]**o+((0.108258427532+0.147980424476j))*x[1]
+        ref[1, 0, 2, 0]=(0.113101487685+0.427369406658j)*o*x_ref[0]**(o-1)+((0.0157689414167-0.718998108196j))
+        ref[1, 0, 2, 1]=(-0.388184450579+0.929552295809j)*o*x_ref[1]**(o-1)+((0.108258427532+0.147980424476j))
+        arg[1, 1, 0]=(-0.910403893761-0.105114310824j)*x[0]**o+((0.883369357221+0.0507155164867j))*x[0]+((0.557060612109-0.935233371167j))*x[1]**o+((-0.415118360213-0.741191656183j))*x[1]
+        ref[1, 1, 0, 0]=(-0.910403893761-0.105114310824j)*o*x_ref[0]**(o-1)+((0.883369357221+0.0507155164867j))
+        ref[1, 1, 0, 1]=(0.557060612109-0.935233371167j)*o*x_ref[1]**(o-1)+((-0.415118360213-0.741191656183j))
+        arg[1, 1, 1]=(-0.489313765855+0.534220829049j)*x[0]**o+((-0.418673040961+0.858649801308j))*x[0]+((0.828484765863-0.0118369506701j))*x[1]**o+((0.345908753229+0.779634649921j))*x[1]
+        ref[1, 1, 1, 0]=(-0.489313765855+0.534220829049j)*o*x_ref[0]**(o-1)+((-0.418673040961+0.858649801308j))
+        ref[1, 1, 1, 1]=(0.828484765863-0.0118369506701j)*o*x_ref[1]**(o-1)+((0.345908753229+0.779634649921j))
+        arg[1, 1, 2]=(-0.467486120307+0.0724295996823j)*x[0]**o+((0.699146124162+0.849100816009j))*x[0]+((0.388411629191+0.275935100334j))*x[1]**o+((0.641309815926-0.142156628326j))*x[1]
+        ref[1, 1, 2, 0]=(-0.467486120307+0.0724295996823j)*o*x_ref[0]**(o-1)+((0.699146124162+0.849100816009j))
+        ref[1, 1, 2, 1]=(0.388411629191+0.275935100334j)*o*x_ref[1]**(o-1)+((0.641309815926-0.142156628326j))
+        arg[1, 2, 0]=(0.60246250175+0.553994019495j)*x[0]**o+((-0.0191960518297-0.637263495031j))*x[0]+((0.599467457768+0.203841425884j))*x[1]**o+((-0.0767499773342-0.0114074219597j))*x[1]
+        ref[1, 2, 0, 0]=(0.60246250175+0.553994019495j)*o*x_ref[0]**(o-1)+((-0.0191960518297-0.637263495031j))
+        ref[1, 2, 0, 1]=(0.599467457768+0.203841425884j)*o*x_ref[1]**(o-1)+((-0.0767499773342-0.0114074219597j))
+        arg[1, 2, 1]=(-0.334688862232-0.428653146609j)*x[0]**o+((-0.0175340557335+0.230004302137j))*x[0]+((-0.40291768267-0.178399434099j))*x[1]**o+((-0.854070876318-0.729084250459j))*x[1]
+        ref[1, 2, 1, 0]=(-0.334688862232-0.428653146609j)*o*x_ref[0]**(o-1)+((-0.0175340557335+0.230004302137j))
+        ref[1, 2, 1, 1]=(-0.40291768267-0.178399434099j)*o*x_ref[1]**(o-1)+((-0.854070876318-0.729084250459j))
+        arg[1, 2, 2]=(-0.994249681489+0.0161234940403j)*x[0]**o+((-0.171574977153-0.0709814752135j))*x[0]+((0.374974490215-0.913233771118j))*x[1]**o+((0.955487086732+0.199427461744j))*x[1]
+        ref[1, 2, 2, 0]=(-0.994249681489+0.0161234940403j)*o*x_ref[0]**(o-1)+((-0.171574977153-0.0709814752135j))
+        ref[1, 2, 2, 1]=(0.374974490215-0.913233771118j)*o*x_ref[1]**(o-1)+((0.955487086732+0.199427461744j))
+        arg[1, 3, 0]=(0.066599875338+0.536612513862j)*x[0]**o+((-0.722405094941-0.330259331664j))*x[0]+((-0.368360526954-0.0297118533995j))*x[1]**o+((-0.13274251293+0.958236201883j))*x[1]
+        ref[1, 3, 0, 0]=(0.066599875338+0.536612513862j)*o*x_ref[0]**(o-1)+((-0.722405094941-0.330259331664j))
+        ref[1, 3, 0, 1]=(-0.368360526954-0.0297118533995j)*o*x_ref[1]**(o-1)+((-0.13274251293+0.958236201883j))
+        arg[1, 3, 1]=(0.0275476067102+0.00532676918277j)*x[0]**o+((0.930439275331+0.58323815079j))*x[0]+((0.505322456549+0.487918150277j))*x[1]**o+((-0.92803263819+0.421068289283j))*x[1]
+        ref[1, 3, 1, 0]=(0.0275476067102+0.00532676918277j)*o*x_ref[0]**(o-1)+((0.930439275331+0.58323815079j))
+        ref[1, 3, 1, 1]=(0.505322456549+0.487918150277j)*o*x_ref[1]**(o-1)+((-0.92803263819+0.421068289283j))
+        arg[1, 3, 2]=(-0.40836318005+0.393834013973j)*x[0]**o+((-0.195544080751-0.763252500438j))*x[0]+((0.703628420826-0.942055436446j))*x[1]**o+((-0.977253949841+0.8696172547j))*x[1]
+        ref[1, 3, 2, 0]=(-0.40836318005+0.393834013973j)*o*x_ref[0]**(o-1)+((-0.195544080751-0.763252500438j))
+        ref[1, 3, 2, 1]=(0.703628420826-0.942055436446j)*o*x_ref[1]**(o-1)+((-0.977253949841+0.8696172547j))
+        arg[2, 0, 0]=(0.772524600353-0.0747444798428j)*x[0]**o+((-0.94965869632+0.152085651213j))*x[0]+((-0.666960093338-0.319735257649j))*x[1]**o+((0.0603327005313-0.842759757187j))*x[1]
+        ref[2, 0, 0, 0]=(0.772524600353-0.0747444798428j)*o*x_ref[0]**(o-1)+((-0.94965869632+0.152085651213j))
+        ref[2, 0, 0, 1]=(-0.666960093338-0.319735257649j)*o*x_ref[1]**(o-1)+((0.0603327005313-0.842759757187j))
+        arg[2, 0, 1]=(0.966410341879+0.389110018456j)*x[0]**o+((-0.0163229867526+0.527241979879j))*x[0]+((-0.826781973635+0.0451531327999j))*x[1]**o+((0.0158439995604-0.0447905175039j))*x[1]
+        ref[2, 0, 1, 0]=(0.966410341879+0.389110018456j)*o*x_ref[0]**(o-1)+((-0.0163229867526+0.527241979879j))
+        ref[2, 0, 1, 1]=(-0.826781973635+0.0451531327999j)*o*x_ref[1]**(o-1)+((0.0158439995604-0.0447905175039j))
+        arg[2, 0, 2]=(-0.141923477434+0.248468770646j)*x[0]**o+((0.466682994167-0.656737785665j))*x[0]+((-0.428654143353+0.556964774066j))*x[1]**o+((0.481883019719-0.528132248786j))*x[1]
+        ref[2, 0, 2, 0]=(-0.141923477434+0.248468770646j)*o*x_ref[0]**(o-1)+((0.466682994167-0.656737785665j))
+        ref[2, 0, 2, 1]=(-0.428654143353+0.556964774066j)*o*x_ref[1]**(o-1)+((0.481883019719-0.528132248786j))
+        arg[2, 1, 0]=(0.788019865213+0.479688834341j)*x[0]**o+((-0.723802171917-0.930175434974j))*x[0]+((-0.572694160847-0.42631465272j))*x[1]**o+((0.179890148533+0.189468498685j))*x[1]
+        ref[2, 1, 0, 0]=(0.788019865213+0.479688834341j)*o*x_ref[0]**(o-1)+((-0.723802171917-0.930175434974j))
+        ref[2, 1, 0, 1]=(-0.572694160847-0.42631465272j)*o*x_ref[1]**(o-1)+((0.179890148533+0.189468498685j))
+        arg[2, 1, 1]=(-0.213430036081-0.978412397523j)*x[0]**o+((0.601997042011-0.804403504294j))*x[0]+((-0.273080716913-0.228077908823j))*x[1]**o+((-0.233433106314-0.999364383748j))*x[1]
+        ref[2, 1, 1, 0]=(-0.213430036081-0.978412397523j)*o*x_ref[0]**(o-1)+((0.601997042011-0.804403504294j))
+        ref[2, 1, 1, 1]=(-0.273080716913-0.228077908823j)*o*x_ref[1]**(o-1)+((-0.233433106314-0.999364383748j))
+        arg[2, 1, 2]=(0.194611580598-0.0113323557231j)*x[0]**o+((0.481248019047-0.928818261525j))*x[0]+((-0.183152055881-0.496423583599j))*x[1]**o+((-0.472270903474+0.311569186769j))*x[1]
+        ref[2, 1, 2, 0]=(0.194611580598-0.0113323557231j)*o*x_ref[0]**(o-1)+((0.481248019047-0.928818261525j))
+        ref[2, 1, 2, 1]=(-0.183152055881-0.496423583599j)*o*x_ref[1]**(o-1)+((-0.472270903474+0.311569186769j))
+        arg[2, 2, 0]=(0.858397315791+0.0282373908212j)*x[0]**o+((0.237817071541+0.376268113225j))*x[0]+((0.708839568625+0.699967498015j))*x[1]**o+((0.980096069709+0.773008059432j))*x[1]
+        ref[2, 2, 0, 0]=(0.858397315791+0.0282373908212j)*o*x_ref[0]**(o-1)+((0.237817071541+0.376268113225j))
+        ref[2, 2, 0, 1]=(0.708839568625+0.699967498015j)*o*x_ref[1]**(o-1)+((0.980096069709+0.773008059432j))
+        arg[2, 2, 1]=(-0.468632650243-0.236789741859j)*x[0]**o+((-0.191536068479+0.599247754669j))*x[0]+((-0.977360261703+0.469001455205j))*x[1]**o+((-0.559796478216+0.457720603197j))*x[1]
+        ref[2, 2, 1, 0]=(-0.468632650243-0.236789741859j)*o*x_ref[0]**(o-1)+((-0.191536068479+0.599247754669j))
+        ref[2, 2, 1, 1]=(-0.977360261703+0.469001455205j)*o*x_ref[1]**(o-1)+((-0.559796478216+0.457720603197j))
+        arg[2, 2, 2]=(0.228485398392-0.954121036955j)*x[0]**o+((0.275975282655+0.792507003914j))*x[0]+((-0.0418206977573-0.558568384126j))*x[1]**o+((-0.778451325083-0.671159443385j))*x[1]
+        ref[2, 2, 2, 0]=(0.228485398392-0.954121036955j)*o*x_ref[0]**(o-1)+((0.275975282655+0.792507003914j))
+        ref[2, 2, 2, 1]=(-0.0418206977573-0.558568384126j)*o*x_ref[1]**(o-1)+((-0.778451325083-0.671159443385j))
+        arg[2, 3, 0]=(-0.800046847054+0.592612870318j)*x[0]**o+((-0.654432796862-0.796778827457j))*x[0]+((0.510613750484-0.792381468447j))*x[1]**o+((-0.288264864718+0.519398656966j))*x[1]
+        ref[2, 3, 0, 0]=(-0.800046847054+0.592612870318j)*o*x_ref[0]**(o-1)+((-0.654432796862-0.796778827457j))
+        ref[2, 3, 0, 1]=(0.510613750484-0.792381468447j)*o*x_ref[1]**(o-1)+((-0.288264864718+0.519398656966j))
+        arg[2, 3, 1]=(0.0718566894414-0.820406256474j)*x[0]**o+((-0.137446721466+0.05134935879j))*x[0]+((-0.962384322694+0.276197510336j))*x[1]**o+((0.0813188346713+0.0510351916858j))*x[1]
+        ref[2, 3, 1, 0]=(0.0718566894414-0.820406256474j)*o*x_ref[0]**(o-1)+((-0.137446721466+0.05134935879j))
+        ref[2, 3, 1, 1]=(-0.962384322694+0.276197510336j)*o*x_ref[1]**(o-1)+((0.0813188346713+0.0510351916858j))
+        arg[2, 3, 2]=(0.626080405851-0.998375593112j)*x[0]**o+((-0.302497596709+0.129942812055j))*x[0]+((-0.112721791763+0.770640506182j))*x[1]**o+((0.501930020015+0.542177095051j))*x[1]
+        ref[2, 3, 2, 0]=(0.626080405851-0.998375593112j)*o*x_ref[0]**(o-1)+((-0.302497596709+0.129942812055j))
+        ref[2, 3, 2, 1]=(-0.112721791763+0.770640506182j)*o*x_ref[1]**(o-1)+((0.501930020015+0.542177095051j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.865737789331-0.83289722826j)*x[2]**o+((0.485483533173+0.0349783447226j))*x[2]
+            ref[0, 0, 0, 2]=(-0.865737789331-0.83289722826j)*o*x_ref[2]**(o-1)+((0.485483533173+0.0349783447226j))
+            arg[0, 0, 1]+=(-0.343633534698-0.691626270705j)*x[2]**o+((0.668928663402+0.108996443069j))*x[2]
+            ref[0, 0, 1, 2]=(-0.343633534698-0.691626270705j)*o*x_ref[2]**(o-1)+((0.668928663402+0.108996443069j))
+            arg[0, 0, 2]+=(0.529262985508+0.370077484851j)*x[2]**o+((-0.615275140751+0.784698154816j))*x[2]
+            ref[0, 0, 2, 2]=(0.529262985508+0.370077484851j)*o*x_ref[2]**(o-1)+((-0.615275140751+0.784698154816j))
+            arg[0, 1, 0]+=(0.548483439229+0.784655668577j)*x[2]**o+((0.812794579681-0.932890626291j))*x[2]
+            ref[0, 1, 0, 2]=(0.548483439229+0.784655668577j)*o*x_ref[2]**(o-1)+((0.812794579681-0.932890626291j))
+            arg[0, 1, 1]+=(-0.323534471624+0.928289479674j)*x[2]**o+((-0.614047326675+0.559236585227j))*x[2]
+            ref[0, 1, 1, 2]=(-0.323534471624+0.928289479674j)*o*x_ref[2]**(o-1)+((-0.614047326675+0.559236585227j))
+            arg[0, 1, 2]+=(-0.209423712084-0.300303739831j)*x[2]**o+((0.992770693656-0.0633682201521j))*x[2]
+            ref[0, 1, 2, 2]=(-0.209423712084-0.300303739831j)*o*x_ref[2]**(o-1)+((0.992770693656-0.0633682201521j))
+            arg[0, 2, 0]+=(0.835786305548+0.753938598888j)*x[2]**o+((0.261022764732-0.0316326421428j))*x[2]
+            ref[0, 2, 0, 2]=(0.835786305548+0.753938598888j)*o*x_ref[2]**(o-1)+((0.261022764732-0.0316326421428j))
+            arg[0, 2, 1]+=(-0.634079708548-0.059783275632j)*x[2]**o+((-0.463407362678+0.00989361966211j))*x[2]
+            ref[0, 2, 1, 2]=(-0.634079708548-0.059783275632j)*o*x_ref[2]**(o-1)+((-0.463407362678+0.00989361966211j))
+            arg[0, 2, 2]+=(-0.324338511379+0.944156663437j)*x[2]**o+((0.274105289703+0.612714529644j))*x[2]
+            ref[0, 2, 2, 2]=(-0.324338511379+0.944156663437j)*o*x_ref[2]**(o-1)+((0.274105289703+0.612714529644j))
+            arg[0, 3, 0]+=(-0.825188039405+0.183032984404j)*x[2]**o+((-0.417870813595-0.345196652084j))*x[2]
+            ref[0, 3, 0, 2]=(-0.825188039405+0.183032984404j)*o*x_ref[2]**(o-1)+((-0.417870813595-0.345196652084j))
+            arg[0, 3, 1]+=(0.958337332072+0.754077195346j)*x[2]**o+((0.124158082361+0.399861914791j))*x[2]
+            ref[0, 3, 1, 2]=(0.958337332072+0.754077195346j)*o*x_ref[2]**(o-1)+((0.124158082361+0.399861914791j))
+            arg[0, 3, 2]+=(0.0997258251508-0.184747969597j)*x[2]**o+((-0.274237562769+0.602200285966j))*x[2]
+            ref[0, 3, 2, 2]=(0.0997258251508-0.184747969597j)*o*x_ref[2]**(o-1)+((-0.274237562769+0.602200285966j))
+            arg[1, 0, 0]+=(-0.599074841251+0.454999104565j)*x[2]**o+((-0.455415595281+0.949884212881j))*x[2]
+            ref[1, 0, 0, 2]=(-0.599074841251+0.454999104565j)*o*x_ref[2]**(o-1)+((-0.455415595281+0.949884212881j))
+            arg[1, 0, 1]+=(0.474826850831+0.72234465839j)*x[2]**o+((-0.57744596139+0.17326893558j))*x[2]
+            ref[1, 0, 1, 2]=(0.474826850831+0.72234465839j)*o*x_ref[2]**(o-1)+((-0.57744596139+0.17326893558j))
+            arg[1, 0, 2]+=(-0.747601159816-0.852321876431j)*x[2]**o+((0.312211641507+0.729587770869j))*x[2]
+            ref[1, 0, 2, 2]=(-0.747601159816-0.852321876431j)*o*x_ref[2]**(o-1)+((0.312211641507+0.729587770869j))
+            arg[1, 1, 0]+=(0.486331277864+0.408366153357j)*x[2]**o+((0.193809948436+0.837924684705j))*x[2]
+            ref[1, 1, 0, 2]=(0.486331277864+0.408366153357j)*o*x_ref[2]**(o-1)+((0.193809948436+0.837924684705j))
+            arg[1, 1, 1]+=(-0.682730480625+0.574028592063j)*x[2]**o+((0.101366169486+0.175497043925j))*x[2]
+            ref[1, 1, 1, 2]=(-0.682730480625+0.574028592063j)*o*x_ref[2]**(o-1)+((0.101366169486+0.175497043925j))
+            arg[1, 1, 2]+=(0.221460519129+0.0920204406129j)*x[2]**o+((0.975112877498+0.64203337622j))*x[2]
+            ref[1, 1, 2, 2]=(0.221460519129+0.0920204406129j)*o*x_ref[2]**(o-1)+((0.975112877498+0.64203337622j))
+            arg[1, 2, 0]+=(0.426479140195-0.325732321031j)*x[2]**o+((0.0332194458267-0.014362232889j))*x[2]
+            ref[1, 2, 0, 2]=(0.426479140195-0.325732321031j)*o*x_ref[2]**(o-1)+((0.0332194458267-0.014362232889j))
+            arg[1, 2, 1]+=(0.5923606257+0.615073514964j)*x[2]**o+((-0.198705856827+0.128612751367j))*x[2]
+            ref[1, 2, 1, 2]=(0.5923606257+0.615073514964j)*o*x_ref[2]**(o-1)+((-0.198705856827+0.128612751367j))
+            arg[1, 2, 2]+=(0.910290334683+0.451650364798j)*x[2]**o+((-0.0144704668587+0.294476920447j))*x[2]
+            ref[1, 2, 2, 2]=(0.910290334683+0.451650364798j)*o*x_ref[2]**(o-1)+((-0.0144704668587+0.294476920447j))
+            arg[1, 3, 0]+=(-0.0821665644627-0.464147448488j)*x[2]**o+((0.204143769775+0.161616390105j))*x[2]
+            ref[1, 3, 0, 2]=(-0.0821665644627-0.464147448488j)*o*x_ref[2]**(o-1)+((0.204143769775+0.161616390105j))
+            arg[1, 3, 1]+=(-0.138542562937+0.562829612883j)*x[2]**o+((-0.380252525607-0.157299446143j))*x[2]
+            ref[1, 3, 1, 2]=(-0.138542562937+0.562829612883j)*o*x_ref[2]**(o-1)+((-0.380252525607-0.157299446143j))
+            arg[1, 3, 2]+=(-0.763411501417-0.983141979497j)*x[2]**o+((0.95708986001-0.785940668152j))*x[2]
+            ref[1, 3, 2, 2]=(-0.763411501417-0.983141979497j)*o*x_ref[2]**(o-1)+((0.95708986001-0.785940668152j))
+            arg[2, 0, 0]+=(0.281822108807-0.51448829523j)*x[2]**o+((-0.701183905902+0.360547701408j))*x[2]
+            ref[2, 0, 0, 2]=(0.281822108807-0.51448829523j)*o*x_ref[2]**(o-1)+((-0.701183905902+0.360547701408j))
+            arg[2, 0, 1]+=(0.594871148133-0.307286901222j)*x[2]**o+((0.141143132844+0.421789661633j))*x[2]
+            ref[2, 0, 1, 2]=(0.594871148133-0.307286901222j)*o*x_ref[2]**(o-1)+((0.141143132844+0.421789661633j))
+            arg[2, 0, 2]+=(-0.897956949572-0.685593546961j)*x[2]**o+((-0.295857807535-0.644697433797j))*x[2]
+            ref[2, 0, 2, 2]=(-0.897956949572-0.685593546961j)*o*x_ref[2]**(o-1)+((-0.295857807535-0.644697433797j))
+            arg[2, 1, 0]+=(-0.953490364572-0.397879445311j)*x[2]**o+((0.669296314895-0.0547372724533j))*x[2]
+            ref[2, 1, 0, 2]=(-0.953490364572-0.397879445311j)*o*x_ref[2]**(o-1)+((0.669296314895-0.0547372724533j))
+            arg[2, 1, 1]+=(0.143303948879-0.0507478666524j)*x[2]**o+((0.143704283871+0.335703742986j))*x[2]
+            ref[2, 1, 1, 2]=(0.143303948879-0.0507478666524j)*o*x_ref[2]**(o-1)+((0.143704283871+0.335703742986j))
+            arg[2, 1, 2]+=(-0.329144861791+0.00301549935115j)*x[2]**o+((-0.572939218076-0.0758467624886j))*x[2]
+            ref[2, 1, 2, 2]=(-0.329144861791+0.00301549935115j)*o*x_ref[2]**(o-1)+((-0.572939218076-0.0758467624886j))
+            arg[2, 2, 0]+=(-0.932430494609-0.658040417185j)*x[2]**o+((-0.78462160145+0.913553428063j))*x[2]
+            ref[2, 2, 0, 2]=(-0.932430494609-0.658040417185j)*o*x_ref[2]**(o-1)+((-0.78462160145+0.913553428063j))
+            arg[2, 2, 1]+=(0.320614421353+0.154542748466j)*x[2]**o+((-0.446484962644+0.879796820991j))*x[2]
+            ref[2, 2, 1, 2]=(0.320614421353+0.154542748466j)*o*x_ref[2]**(o-1)+((-0.446484962644+0.879796820991j))
+            arg[2, 2, 2]+=(-0.151774836488-0.325067254116j)*x[2]**o+((0.588225079265-0.102343303843j))*x[2]
+            ref[2, 2, 2, 2]=(-0.151774836488-0.325067254116j)*o*x_ref[2]**(o-1)+((0.588225079265-0.102343303843j))
+            arg[2, 3, 0]+=(-0.161978675784+0.117876646358j)*x[2]**o+((-0.957371688484+0.828501114028j))*x[2]
+            ref[2, 3, 0, 2]=(-0.161978675784+0.117876646358j)*o*x_ref[2]**(o-1)+((-0.957371688484+0.828501114028j))
+            arg[2, 3, 1]+=(-0.551442643755+0.736914632186j)*x[2]**o+((-0.324890773681-0.739023732167j))*x[2]
+            ref[2, 3, 1, 2]=(-0.551442643755+0.736914632186j)*o*x_ref[2]**(o-1)+((-0.324890773681-0.739023732167j))
+            arg[2, 3, 2]+=(-0.953509247678+0.611032512811j)*x[2]**o+((-0.0883200954415-0.808908060516j))*x[2]
+            ref[2, 3, 2, 2]=(-0.953509247678+0.611032512811j)*o*x_ref[2]**(o-1)+((-0.0883200954415-0.808908060516j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.128150012782+0.852436798738j)*x[0]**o+((0.148293479119-0.794840489559j))*x[0]+((-0.101879588786-0.46329366497j))*x[1]**o+((0.179669324914+0.724327924344j))*x[1]
+        ref[0]=(0.128150012782+0.852436798738j)*o*x_ref[0]**(o-1)+((0.148293479119-0.794840489559j))
+        ref[1]=(-0.101879588786-0.46329366497j)*o*x_ref[1]**(o-1)+((0.179669324914+0.724327924344j))
+        if dim==3:
+            arg+=((0.715443637088-0.752370133913j))*x[2]**o+((0.699135612481+0.586774180924j))*x[2]
+            ref[2]=(0.715443637088-0.752370133913j)*o*x_ref[2]**(o-1)+((0.699135612481+0.586774180924j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(-0.683029941473-0.67999284049j)*x[0]**o+((-0.593978889741+0.786705650697j))*x[0]+((0.988763025914-0.776809944858j))*x[1]**o+((0.617995889981+0.00763369825642j))*x[1]
+        ref[0, 0]=(-0.683029941473-0.67999284049j)*o*x_ref[0]**(o-1)+((-0.593978889741+0.786705650697j))
+        ref[0, 1]=(0.988763025914-0.776809944858j)*o*x_ref[1]**(o-1)+((0.617995889981+0.00763369825642j))
+        arg[1,]=(-0.565434612634+0.865782554835j)*x[0]**o+((0.726997094956+0.214293883771j))*x[0]+((-0.399838274848+0.619323698381j))*x[1]**o+((0.207838811752+0.525644448843j))*x[1]
+        ref[1, 0]=(-0.565434612634+0.865782554835j)*o*x_ref[0]**(o-1)+((0.726997094956+0.214293883771j))
+        ref[1, 1]=(-0.399838274848+0.619323698381j)*o*x_ref[1]**(o-1)+((0.207838811752+0.525644448843j))
+        arg[2,]=(-0.781828818778+0.444178529411j)*x[0]**o+((-0.201196417855-0.246876157366j))*x[0]+((0.295515097911-0.858661586622j))*x[1]**o+((0.27555111254+0.542498719078j))*x[1]
+        ref[2, 0]=(-0.781828818778+0.444178529411j)*o*x_ref[0]**(o-1)+((-0.201196417855-0.246876157366j))
+        ref[2, 1]=(0.295515097911-0.858661586622j)*o*x_ref[1]**(o-1)+((0.27555111254+0.542498719078j))
+        arg[3,]=(-0.011949525403+0.0128759348256j)*x[0]**o+((-0.734757684461-0.0473501109544j))*x[0]+((-0.907872063794+0.557786687299j))*x[1]**o+((-0.423928201095-0.894458615359j))*x[1]
+        ref[3, 0]=(-0.011949525403+0.0128759348256j)*o*x_ref[0]**(o-1)+((-0.734757684461-0.0473501109544j))
+        ref[3, 1]=(-0.907872063794+0.557786687299j)*o*x_ref[1]**(o-1)+((-0.423928201095-0.894458615359j))
+        if dim==3:
+            arg[0,]+=(-0.507012839477-0.448318775123j)*x[2]**o+((-0.162305958897+0.930995074441j))*x[2]
+            ref[0, 2]=(-0.507012839477-0.448318775123j)*o*x_ref[2]**(o-1)+((-0.162305958897+0.930995074441j))
+            arg[1,]+=(0.260692519239+0.0181724207872j)*x[2]**o+((0.976341984832-0.0179344299955j))*x[2]
+            ref[1, 2]=(0.260692519239+0.0181724207872j)*o*x_ref[2]**(o-1)+((0.976341984832-0.0179344299955j))
+            arg[2,]+=(-0.936541891988+0.85213118034j)*x[2]**o+((0.951722748402-0.887136066187j))*x[2]
+            ref[2, 2]=(-0.936541891988+0.85213118034j)*o*x_ref[2]**(o-1)+((0.951722748402-0.887136066187j))
+            arg[3,]+=(-0.901170207648-0.217299769789j)*x[2]**o+((0.394680645565-0.693281317504j))*x[2]
+            ref[3, 2]=(-0.901170207648-0.217299769789j)*o*x_ref[2]**(o-1)+((0.394680645565-0.693281317504j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=(-0.855115339189+0.356758279725j)*x[0]**o+((-0.84528477855-0.916520277015j))*x[0]+((0.595815508391+0.973697356098j))*x[1]**o+((0.829955303334-0.74845028629j))*x[1]
+        ref[0, 0, 0]=(-0.855115339189+0.356758279725j)*o*x_ref[0]**(o-1)+((-0.84528477855-0.916520277015j))
+        ref[0, 0, 1]=(0.595815508391+0.973697356098j)*o*x_ref[1]**(o-1)+((0.829955303334-0.74845028629j))
+        arg[0, 1]=(-0.887708098991+0.682981681076j)*x[0]**o+((-0.887264419281-0.590750642068j))*x[0]+((0.146177857944-0.0833353946395j))*x[1]**o+((-0.34261374962+0.796904345609j))*x[1]
+        ref[0, 1, 0]=(-0.887708098991+0.682981681076j)*o*x_ref[0]**(o-1)+((-0.887264419281-0.590750642068j))
+        ref[0, 1, 1]=(0.146177857944-0.0833353946395j)*o*x_ref[1]**(o-1)+((-0.34261374962+0.796904345609j))
+        arg[1, 0]=(-0.376865158166+0.70464925748j)*x[0]**o+((-0.170920889562+0.0737168175382j))*x[0]+((-0.158248076995-0.902486084131j))*x[1]**o+((-0.295433363141-0.754700643445j))*x[1]
+        ref[1, 0, 0]=(-0.376865158166+0.70464925748j)*o*x_ref[0]**(o-1)+((-0.170920889562+0.0737168175382j))
+        ref[1, 0, 1]=(-0.158248076995-0.902486084131j)*o*x_ref[1]**(o-1)+((-0.295433363141-0.754700643445j))
+        arg[1, 1]=(0.579991868391-0.602817111655j)*x[0]**o+((-0.00426232068316-0.363902992711j))*x[0]+((0.867701241217+0.592536994402j))*x[1]**o+((0.230421606856+0.0642753799197j))*x[1]
+        ref[1, 1, 0]=(0.579991868391-0.602817111655j)*o*x_ref[0]**(o-1)+((-0.00426232068316-0.363902992711j))
+        ref[1, 1, 1]=(0.867701241217+0.592536994402j)*o*x_ref[1]**(o-1)+((0.230421606856+0.0642753799197j))
+        if dim==3:
+            arg[0, 0]+=(0.678563355215+0.858117982155j)*x[2]**o+((-0.851776864844-0.362997697774j))*x[2]
+            ref[0, 0, 2]=(0.678563355215+0.858117982155j)*o*x_ref[2]**(o-1)+((-0.851776864844-0.362997697774j))
+            arg[0, 1]+=(0.815409375563-0.746944604491j)*x[2]**o+((0.55132119213+0.730390500256j))*x[2]
+            ref[0, 1, 2]=(0.815409375563-0.746944604491j)*o*x_ref[2]**(o-1)+((0.55132119213+0.730390500256j))
+            arg[1, 0]+=(0.338320436402-0.935282397146j)*x[2]**o+((0.469340932744+0.0727935734823j))*x[2]
+            ref[1, 0, 2]=(0.338320436402-0.935282397146j)*o*x_ref[2]**(o-1)+((0.469340932744+0.0727935734823j))
+            arg[1, 1]+=(0.777055818612-0.383542999269j)*x[2]**o+((0.414337157137+0.29618859452j))*x[2]
+            ref[1, 1, 2]=(0.777055818612-0.383542999269j)*o*x_ref[2]**(o-1)+((0.414337157137+0.29618859452j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.0834339553863+0.481925008594j)*x[0]**o+((-0.685389026584-0.213843905798j))*x[0]+((0.716691846526-0.3604154716j))*x[1]**o+((-0.707830852417-0.273208382395j))*x[1]
+        ref[0, 0, 0, 0]=(-0.0834339553863+0.481925008594j)*o*x_ref[0]**(o-1)+((-0.685389026584-0.213843905798j))
+        ref[0, 0, 0, 1]=(0.716691846526-0.3604154716j)*o*x_ref[1]**(o-1)+((-0.707830852417-0.273208382395j))
+        arg[0, 0, 1]=(0.528345674401-0.570715314427j)*x[0]**o+((0.661617852326-0.418995856803j))*x[0]+((-0.974462971351-0.416310030409j))*x[1]**o+((-0.672824540614+0.316462078226j))*x[1]
+        ref[0, 0, 1, 0]=(0.528345674401-0.570715314427j)*o*x_ref[0]**(o-1)+((0.661617852326-0.418995856803j))
+        ref[0, 0, 1, 1]=(-0.974462971351-0.416310030409j)*o*x_ref[1]**(o-1)+((-0.672824540614+0.316462078226j))
+        arg[0, 1, 0]=(0.443942339187-0.261272206302j)*x[0]**o+((0.440947713599-0.245656526193j))*x[0]+((-0.0722631086443+0.235753823815j))*x[1]**o+((0.812725262343-0.958229753236j))*x[1]
+        ref[0, 1, 0, 0]=(0.443942339187-0.261272206302j)*o*x_ref[0]**(o-1)+((0.440947713599-0.245656526193j))
+        ref[0, 1, 0, 1]=(-0.0722631086443+0.235753823815j)*o*x_ref[1]**(o-1)+((0.812725262343-0.958229753236j))
+        arg[0, 1, 1]=(0.442626972589+0.0553509785645j)*x[0]**o+((0.652178838172+0.467299117572j))*x[0]+((-0.923628871567-0.734236114702j))*x[1]**o+((0.471589123284+0.485381969381j))*x[1]
+        ref[0, 1, 1, 0]=(0.442626972589+0.0553509785645j)*o*x_ref[0]**(o-1)+((0.652178838172+0.467299117572j))
+        ref[0, 1, 1, 1]=(-0.923628871567-0.734236114702j)*o*x_ref[1]**(o-1)+((0.471589123284+0.485381969381j))
+        arg[0, 2, 0]=(0.419922007778-0.330132773268j)*x[0]**o+((-0.21680631096-0.634102402466j))*x[0]+((-0.806514782075-0.274226646045j))*x[1]**o+((0.104572268435-0.0015253232772j))*x[1]
+        ref[0, 2, 0, 0]=(0.419922007778-0.330132773268j)*o*x_ref[0]**(o-1)+((-0.21680631096-0.634102402466j))
+        ref[0, 2, 0, 1]=(-0.806514782075-0.274226646045j)*o*x_ref[1]**(o-1)+((0.104572268435-0.0015253232772j))
+        arg[0, 2, 1]=(0.0638977024333+0.815528700867j)*x[0]**o+((-0.478602803265-0.218010339345j))*x[0]+((-0.341075283553+0.614478772542j))*x[1]**o+((-0.253210735429-0.46899487917j))*x[1]
+        ref[0, 2, 1, 0]=(0.0638977024333+0.815528700867j)*o*x_ref[0]**(o-1)+((-0.478602803265-0.218010339345j))
+        ref[0, 2, 1, 1]=(-0.341075283553+0.614478772542j)*o*x_ref[1]**(o-1)+((-0.253210735429-0.46899487917j))
+        arg[1, 0, 0]=(0.443144659263-0.070070799261j)*x[0]**o+((0.20564754826+0.958138560787j))*x[0]+((0.187208153405-0.0274259553889j))*x[1]**o+((-0.722034801166-0.657751278806j))*x[1]
+        ref[1, 0, 0, 0]=(0.443144659263-0.070070799261j)*o*x_ref[0]**(o-1)+((0.20564754826+0.958138560787j))
+        ref[1, 0, 0, 1]=(0.187208153405-0.0274259553889j)*o*x_ref[1]**(o-1)+((-0.722034801166-0.657751278806j))
+        arg[1, 0, 1]=(-0.0440674842115-0.868393549421j)*x[0]**o+((-0.852472120259-0.0514555160263j))*x[0]+((0.871016268659-0.691522686304j))*x[1]**o+((0.633783948334+0.395407401743j))*x[1]
+        ref[1, 0, 1, 0]=(-0.0440674842115-0.868393549421j)*o*x_ref[0]**(o-1)+((-0.852472120259-0.0514555160263j))
+        ref[1, 0, 1, 1]=(0.871016268659-0.691522686304j)*o*x_ref[1]**(o-1)+((0.633783948334+0.395407401743j))
+        arg[1, 1, 0]=(0.00503227266519+0.0252361664942j)*x[0]**o+((0.658474682155+0.382611134097j))*x[0]+((-0.211225607786+0.102592160828j))*x[1]**o+((0.871206310039-0.925155993231j))*x[1]
+        ref[1, 1, 0, 0]=(0.00503227266519+0.0252361664942j)*o*x_ref[0]**(o-1)+((0.658474682155+0.382611134097j))
+        ref[1, 1, 0, 1]=(-0.211225607786+0.102592160828j)*o*x_ref[1]**(o-1)+((0.871206310039-0.925155993231j))
+        arg[1, 1, 1]=(-0.932097813708+0.252973668027j)*x[0]**o+((0.462787457668-0.170987911628j))*x[0]+((-0.181526207968+0.529168582502j))*x[1]**o+((-0.904837196822+0.747007092573j))*x[1]
+        ref[1, 1, 1, 0]=(-0.932097813708+0.252973668027j)*o*x_ref[0]**(o-1)+((0.462787457668-0.170987911628j))
+        ref[1, 1, 1, 1]=(-0.181526207968+0.529168582502j)*o*x_ref[1]**(o-1)+((-0.904837196822+0.747007092573j))
+        arg[1, 2, 0]=(-0.373285583796-0.497612016581j)*x[0]**o+((0.831104538519+0.388873269514j))*x[0]+((0.486890401035-0.445994507409j))*x[1]**o+((0.0103806800085-0.384792701649j))*x[1]
+        ref[1, 2, 0, 0]=(-0.373285583796-0.497612016581j)*o*x_ref[0]**(o-1)+((0.831104538519+0.388873269514j))
+        ref[1, 2, 0, 1]=(0.486890401035-0.445994507409j)*o*x_ref[1]**(o-1)+((0.0103806800085-0.384792701649j))
+        arg[1, 2, 1]=(0.0788768332117-0.538008848818j)*x[0]**o+((0.137003463012-0.858369782196j))*x[0]+((0.277035842591+0.869312196852j))*x[1]**o+((-0.705555645029-0.0543753351912j))*x[1]
+        ref[1, 2, 1, 0]=(0.0788768332117-0.538008848818j)*o*x_ref[0]**(o-1)+((0.137003463012-0.858369782196j))
+        ref[1, 2, 1, 1]=(0.277035842591+0.869312196852j)*o*x_ref[1]**(o-1)+((-0.705555645029-0.0543753351912j))
+        arg[2, 0, 0]=(-0.29186334004-0.601558735601j)*x[0]**o+((-0.463842737603-0.119133424304j))*x[0]+((-0.837363799806-0.895794239669j))*x[1]**o+((-0.0957456392975+0.611335631339j))*x[1]
+        ref[2, 0, 0, 0]=(-0.29186334004-0.601558735601j)*o*x_ref[0]**(o-1)+((-0.463842737603-0.119133424304j))
+        ref[2, 0, 0, 1]=(-0.837363799806-0.895794239669j)*o*x_ref[1]**(o-1)+((-0.0957456392975+0.611335631339j))
+        arg[2, 0, 1]=(-0.994191629511-0.500079521154j)*x[0]**o+((0.778522094362+0.996693924568j))*x[0]+((-0.628884020159+0.501151501805j))*x[1]**o+((0.925433918429+0.193391469101j))*x[1]
+        ref[2, 0, 1, 0]=(-0.994191629511-0.500079521154j)*o*x_ref[0]**(o-1)+((0.778522094362+0.996693924568j))
+        ref[2, 0, 1, 1]=(-0.628884020159+0.501151501805j)*o*x_ref[1]**(o-1)+((0.925433918429+0.193391469101j))
+        arg[2, 1, 0]=(0.239963267985-0.447028376715j)*x[0]**o+((0.410121537887+0.0314310175841j))*x[0]+((-0.212315390012-0.178261483946j))*x[1]**o+((-0.241457885906+0.200027577195j))*x[1]
+        ref[2, 1, 0, 0]=(0.239963267985-0.447028376715j)*o*x_ref[0]**(o-1)+((0.410121537887+0.0314310175841j))
+        ref[2, 1, 0, 1]=(-0.212315390012-0.178261483946j)*o*x_ref[1]**(o-1)+((-0.241457885906+0.200027577195j))
+        arg[2, 1, 1]=(0.484067604506+0.922140094476j)*x[0]**o+((0.381057883874+0.0572476875614j))*x[0]+((0.388947949057+0.618459880591j))*x[1]**o+((-0.79482947261+0.805607121948j))*x[1]
+        ref[2, 1, 1, 0]=(0.484067604506+0.922140094476j)*o*x_ref[0]**(o-1)+((0.381057883874+0.0572476875614j))
+        ref[2, 1, 1, 1]=(0.388947949057+0.618459880591j)*o*x_ref[1]**(o-1)+((-0.79482947261+0.805607121948j))
+        arg[2, 2, 0]=(-0.317259860816-0.831758829298j)*x[0]**o+((-0.170470440985-0.409699709887j))*x[0]+((0.101267843368-0.20692314726j))*x[1]**o+((0.476367494227-0.344159575663j))*x[1]
+        ref[2, 2, 0, 0]=(-0.317259860816-0.831758829298j)*o*x_ref[0]**(o-1)+((-0.170470440985-0.409699709887j))
+        ref[2, 2, 0, 1]=(0.101267843368-0.20692314726j)*o*x_ref[1]**(o-1)+((0.476367494227-0.344159575663j))
+        arg[2, 2, 1]=(0.78642714046+0.450497126531j)*x[0]**o+((0.316122061729-0.971652256058j))*x[0]+((0.765353267796+0.277718383554j))*x[1]**o+((-0.982847273684+0.759993601421j))*x[1]
+        ref[2, 2, 1, 0]=(0.78642714046+0.450497126531j)*o*x_ref[0]**(o-1)+((0.316122061729-0.971652256058j))
+        ref[2, 2, 1, 1]=(0.765353267796+0.277718383554j)*o*x_ref[1]**(o-1)+((-0.982847273684+0.759993601421j))
+        arg[3, 0, 0]=(-0.311586095721-0.179876128448j)*x[0]**o+((0.726857210676-0.137574603024j))*x[0]+((-0.364325593985-0.737509146862j))*x[1]**o+((0.354285436471-0.633330657455j))*x[1]
+        ref[3, 0, 0, 0]=(-0.311586095721-0.179876128448j)*o*x_ref[0]**(o-1)+((0.726857210676-0.137574603024j))
+        ref[3, 0, 0, 1]=(-0.364325593985-0.737509146862j)*o*x_ref[1]**(o-1)+((0.354285436471-0.633330657455j))
+        arg[3, 0, 1]=(0.885830493899-0.54174908145j)*x[0]**o+((-0.389274929045-0.165318257701j))*x[0]+((-0.812862616241-0.265847961044j))*x[1]**o+((-0.506312360018+0.16317625839j))*x[1]
+        ref[3, 0, 1, 0]=(0.885830493899-0.54174908145j)*o*x_ref[0]**(o-1)+((-0.389274929045-0.165318257701j))
+        ref[3, 0, 1, 1]=(-0.812862616241-0.265847961044j)*o*x_ref[1]**(o-1)+((-0.506312360018+0.16317625839j))
+        arg[3, 1, 0]=(0.124007324299-0.372249642308j)*x[0]**o+((-0.763851858862-0.42972083939j))*x[0]+((0.534268037321-0.642040255413j))*x[1]**o+((0.511114791791-0.0345070309554j))*x[1]
+        ref[3, 1, 0, 0]=(0.124007324299-0.372249642308j)*o*x_ref[0]**(o-1)+((-0.763851858862-0.42972083939j))
+        ref[3, 1, 0, 1]=(0.534268037321-0.642040255413j)*o*x_ref[1]**(o-1)+((0.511114791791-0.0345070309554j))
+        arg[3, 1, 1]=(-0.684156079075+0.593202371889j)*x[0]**o+((-0.77430661573-0.04072716533j))*x[0]+((0.291443933661-0.870571739027j))*x[1]**o+((-0.323826183244+0.67278479991j))*x[1]
+        ref[3, 1, 1, 0]=(-0.684156079075+0.593202371889j)*o*x_ref[0]**(o-1)+((-0.77430661573-0.04072716533j))
+        ref[3, 1, 1, 1]=(0.291443933661-0.870571739027j)*o*x_ref[1]**(o-1)+((-0.323826183244+0.67278479991j))
+        arg[3, 2, 0]=(0.638112614548+0.542395068386j)*x[0]**o+((0.551501566548-0.493580691495j))*x[0]+((0.971445126639-0.637986683271j))*x[1]**o+((-0.89801342124-0.0953463033184j))*x[1]
+        ref[3, 2, 0, 0]=(0.638112614548+0.542395068386j)*o*x_ref[0]**(o-1)+((0.551501566548-0.493580691495j))
+        ref[3, 2, 0, 1]=(0.971445126639-0.637986683271j)*o*x_ref[1]**(o-1)+((-0.89801342124-0.0953463033184j))
+        arg[3, 2, 1]=(-0.0752158077935+0.33805216747j)*x[0]**o+((-0.230612958823-0.412915579j))*x[0]+((-0.439717129733-0.512220814865j))*x[1]**o+((0.573585550711-0.377205427074j))*x[1]
+        ref[3, 2, 1, 0]=(-0.0752158077935+0.33805216747j)*o*x_ref[0]**(o-1)+((-0.230612958823-0.412915579j))
+        ref[3, 2, 1, 1]=(-0.439717129733-0.512220814865j)*o*x_ref[1]**(o-1)+((0.573585550711-0.377205427074j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.652493539123-0.485985806521j)*x[2]**o+((0.193499329932+0.224708836442j))*x[2]
+            ref[0, 0, 0, 2]=(-0.652493539123-0.485985806521j)*o*x_ref[2]**(o-1)+((0.193499329932+0.224708836442j))
+            arg[0, 0, 1]+=(0.954968153573-0.616051239505j)*x[2]**o+((-0.954861083659-0.623911743465j))*x[2]
+            ref[0, 0, 1, 2]=(0.954968153573-0.616051239505j)*o*x_ref[2]**(o-1)+((-0.954861083659-0.623911743465j))
+            arg[0, 1, 0]+=(0.756340423699+0.397228951652j)*x[2]**o+((0.649540231262+0.549959158975j))*x[2]
+            ref[0, 1, 0, 2]=(0.756340423699+0.397228951652j)*o*x_ref[2]**(o-1)+((0.649540231262+0.549959158975j))
+            arg[0, 1, 1]+=(-0.342907114243+0.973396511249j)*x[2]**o+((-0.046111692497+0.564042834123j))*x[2]
+            ref[0, 1, 1, 2]=(-0.342907114243+0.973396511249j)*o*x_ref[2]**(o-1)+((-0.046111692497+0.564042834123j))
+            arg[0, 2, 0]+=(0.174268648277+0.153845403565j)*x[2]**o+((0.738185752805+0.541901209137j))*x[2]
+            ref[0, 2, 0, 2]=(0.174268648277+0.153845403565j)*o*x_ref[2]**(o-1)+((0.738185752805+0.541901209137j))
+            arg[0, 2, 1]+=(0.329577691489+0.498677615639j)*x[2]**o+((-0.33409688166-0.556872576673j))*x[2]
+            ref[0, 2, 1, 2]=(0.329577691489+0.498677615639j)*o*x_ref[2]**(o-1)+((-0.33409688166-0.556872576673j))
+            arg[1, 0, 0]+=(-0.653795251089+0.991885530447j)*x[2]**o+((0.678542195142-0.00611203661149j))*x[2]
+            ref[1, 0, 0, 2]=(-0.653795251089+0.991885530447j)*o*x_ref[2]**(o-1)+((0.678542195142-0.00611203661149j))
+            arg[1, 0, 1]+=(-0.0274350262108-0.355785561164j)*x[2]**o+((0.355320825869-0.183254713502j))*x[2]
+            ref[1, 0, 1, 2]=(-0.0274350262108-0.355785561164j)*o*x_ref[2]**(o-1)+((0.355320825869-0.183254713502j))
+            arg[1, 1, 0]+=(0.899768935485+0.836834851112j)*x[2]**o+((-0.142189336199-0.228458860116j))*x[2]
+            ref[1, 1, 0, 2]=(0.899768935485+0.836834851112j)*o*x_ref[2]**(o-1)+((-0.142189336199-0.228458860116j))
+            arg[1, 1, 1]+=(0.652523552061-0.696376927456j)*x[2]**o+((-0.0855734443721+0.886554337325j))*x[2]
+            ref[1, 1, 1, 2]=(0.652523552061-0.696376927456j)*o*x_ref[2]**(o-1)+((-0.0855734443721+0.886554337325j))
+            arg[1, 2, 0]+=(0.252628652934-0.0973793967772j)*x[2]**o+((-0.854145657969-0.368788224255j))*x[2]
+            ref[1, 2, 0, 2]=(0.252628652934-0.0973793967772j)*o*x_ref[2]**(o-1)+((-0.854145657969-0.368788224255j))
+            arg[1, 2, 1]+=(-0.443999395859-0.655691504232j)*x[2]**o+((-0.728246335807+0.43413151599j))*x[2]
+            ref[1, 2, 1, 2]=(-0.443999395859-0.655691504232j)*o*x_ref[2]**(o-1)+((-0.728246335807+0.43413151599j))
+            arg[2, 0, 0]+=(0.395217510601+0.46643933719j)*x[2]**o+((0.308511909167+0.162866094392j))*x[2]
+            ref[2, 0, 0, 2]=(0.395217510601+0.46643933719j)*o*x_ref[2]**(o-1)+((0.308511909167+0.162866094392j))
+            arg[2, 0, 1]+=(-0.841978277794+0.369777787132j)*x[2]**o+((0.282509314198-0.65802525686j))*x[2]
+            ref[2, 0, 1, 2]=(-0.841978277794+0.369777787132j)*o*x_ref[2]**(o-1)+((0.282509314198-0.65802525686j))
+            arg[2, 1, 0]+=(-0.661657117396+0.376480717225j)*x[2]**o+((0.955790295888-0.336434308903j))*x[2]
+            ref[2, 1, 0, 2]=(-0.661657117396+0.376480717225j)*o*x_ref[2]**(o-1)+((0.955790295888-0.336434308903j))
+            arg[2, 1, 1]+=(0.973294473607-0.207035750549j)*x[2]**o+((0.0449404964315-0.76114683969j))*x[2]
+            ref[2, 1, 1, 2]=(0.973294473607-0.207035750549j)*o*x_ref[2]**(o-1)+((0.0449404964315-0.76114683969j))
+            arg[2, 2, 0]+=(-0.188393080822-0.980339367334j)*x[2]**o+((0.688300697286+0.651459102632j))*x[2]
+            ref[2, 2, 0, 2]=(-0.188393080822-0.980339367334j)*o*x_ref[2]**(o-1)+((0.688300697286+0.651459102632j))
+            arg[2, 2, 1]+=(0.847264813216-0.56846528666j)*x[2]**o+((-0.934501949457+0.326087306288j))*x[2]
+            ref[2, 2, 1, 2]=(0.847264813216-0.56846528666j)*o*x_ref[2]**(o-1)+((-0.934501949457+0.326087306288j))
+            arg[3, 0, 0]+=(0.687629434166+0.549440578441j)*x[2]**o+((0.707042213082-0.459024346582j))*x[2]
+            ref[3, 0, 0, 2]=(0.687629434166+0.549440578441j)*o*x_ref[2]**(o-1)+((0.707042213082-0.459024346582j))
+            arg[3, 0, 1]+=(-0.821078018951-0.667138558427j)*x[2]**o+((-0.735206362907-0.482787308222j))*x[2]
+            ref[3, 0, 1, 2]=(-0.821078018951-0.667138558427j)*o*x_ref[2]**(o-1)+((-0.735206362907-0.482787308222j))
+            arg[3, 1, 0]+=(-0.408806591672+0.773313959736j)*x[2]**o+((0.473926680525-0.643038552794j))*x[2]
+            ref[3, 1, 0, 2]=(-0.408806591672+0.773313959736j)*o*x_ref[2]**(o-1)+((0.473926680525-0.643038552794j))
+            arg[3, 1, 1]+=(-0.372560249179+0.0173632293402j)*x[2]**o+((-0.542297729401-0.897635731397j))*x[2]
+            ref[3, 1, 1, 2]=(-0.372560249179+0.0173632293402j)*o*x_ref[2]**(o-1)+((-0.542297729401-0.897635731397j))
+            arg[3, 2, 0]+=(-0.749917567505+0.783855520936j)*x[2]**o+((0.616485885201+0.974412968295j))*x[2]
+            ref[3, 2, 0, 2]=(-0.749917567505+0.783855520936j)*o*x_ref[2]**(o-1)+((0.616485885201+0.974412968295j))
+            arg[3, 2, 1]+=(0.565417009897-0.507653220449j)*x[2]**o+((-0.045544247558-0.327636482584j))*x[2]
+            ref[3, 2, 1, 2]=(0.565417009897-0.507653220449j)*o*x_ref[2]**(o-1)+((-0.045544247558-0.327636482584j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.987999003917-0.435171194898j)*x[0]+((0.181753572832-0.583238251195j))*x[1]
+        ref[0]=(0.987999003917-0.435171194898j)
+        ref[1]=(0.181753572832-0.583238251195j)
+        if dim==3:
+            arg+=((-0.438763305336+0.424883598162j))*x[2]
+            ref[2]=(-0.438763305336+0.424883598162j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(0.391252338149+0.300200823706j)*x[0]+((0.931483795049+0.0832121355835j))*x[1]
+        ref[0, 0]=(0.391252338149+0.300200823706j)
+        ref[0, 1]=(0.931483795049+0.0832121355835j)
+        arg[1,]=(0.119392324946+0.778995928516j)*x[0]+((-0.501401777176+0.962819876145j))*x[1]
+        ref[1, 0]=(0.119392324946+0.778995928516j)
+        ref[1, 1]=(-0.501401777176+0.962819876145j)
+        arg[2,]=(-0.552426343999-0.400802850763j)*x[0]+((-0.229499687775-0.965170820744j))*x[1]
+        ref[2, 0]=(-0.552426343999-0.400802850763j)
+        ref[2, 1]=(-0.229499687775-0.965170820744j)
+        arg[3,]=(0.416209673003-0.142322935414j)*x[0]+((-0.661006629721-0.209692786342j))*x[1]
+        ref[3, 0]=(0.416209673003-0.142322935414j)
+        ref[3, 1]=(-0.661006629721-0.209692786342j)
+        if dim==3:
+            arg[0,]+=(-0.994828868311+0.762538871158j)*x[2]
+            ref[0, 2]=(-0.994828868311+0.762538871158j)
+            arg[1,]+=(0.708965563891-0.161879450473j)*x[2]
+            ref[1, 2]=(0.708965563891-0.161879450473j)
+            arg[2,]+=(0.625222984404-0.0792044184893j)*x[2]
+            ref[2, 2]=(0.625222984404-0.0792044184893j)
+            arg[3,]+=(0.135053053362-0.605463113612j)*x[2]
+            ref[3, 2]=(0.135053053362-0.605463113612j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.411789798842+0.356586191374j)*x[0]+((-0.701920883256+0.308008522717j))*x[1]
+        ref[0, 0, 0]=(-0.411789798842+0.356586191374j)
+        ref[0, 0, 1]=(-0.701920883256+0.308008522717j)
+        arg[0, 1]=(-0.197782710881-0.167382915013j)*x[0]+((0.650822673864-0.243300940878j))*x[1]
+        ref[0, 1, 0]=(-0.197782710881-0.167382915013j)
+        ref[0, 1, 1]=(0.650822673864-0.243300940878j)
+        arg[0, 2]=(0.191965747823-0.748955242434j)*x[0]+((0.168079121697+0.33658919055j))*x[1]
+        ref[0, 2, 0]=(0.191965747823-0.748955242434j)
+        ref[0, 2, 1]=(0.168079121697+0.33658919055j)
+        arg[0, 3]=(0.866984815841+0.941285027814j)*x[0]+((-0.331515543206+0.171502221323j))*x[1]
+        ref[0, 3, 0]=(0.866984815841+0.941285027814j)
+        ref[0, 3, 1]=(-0.331515543206+0.171502221323j)
+        arg[1, 0]=(0.214595749661-0.0617937077777j)*x[0]+((-0.329465652373-0.841623292158j))*x[1]
+        ref[1, 0, 0]=(0.214595749661-0.0617937077777j)
+        ref[1, 0, 1]=(-0.329465652373-0.841623292158j)
+        arg[1, 1]=(-0.528034521838-0.241681247203j)*x[0]+((0.85784857777-0.211937932851j))*x[1]
+        ref[1, 1, 0]=(-0.528034521838-0.241681247203j)
+        ref[1, 1, 1]=(0.85784857777-0.211937932851j)
+        arg[1, 2]=(0.415586714197+0.826245147979j)*x[0]+((-0.482390910814-0.238130818934j))*x[1]
+        ref[1, 2, 0]=(0.415586714197+0.826245147979j)
+        ref[1, 2, 1]=(-0.482390910814-0.238130818934j)
+        arg[1, 3]=(-0.663286224855+0.0704628670295j)*x[0]+((0.919754286484+0.0415108563317j))*x[1]
+        ref[1, 3, 0]=(-0.663286224855+0.0704628670295j)
+        ref[1, 3, 1]=(0.919754286484+0.0415108563317j)
+        if dim==3:
+            arg[0, 0]+=(0.334475810795+0.672324465447j)*x[2]
+            ref[0, 0, 2]=(0.334475810795+0.672324465447j)
+            arg[0, 1]+=(0.255973423873+0.156917571915j)*x[2]
+            ref[0, 1, 2]=(0.255973423873+0.156917571915j)
+            arg[0, 2]+=(0.752613682847-0.728752572252j)*x[2]
+            ref[0, 2, 2]=(0.752613682847-0.728752572252j)
+            arg[0, 3]+=(-0.673461852801-0.517806763323j)*x[2]
+            ref[0, 3, 2]=(-0.673461852801-0.517806763323j)
+            arg[1, 0]+=(-0.702111911777+0.131928677216j)*x[2]
+            ref[1, 0, 2]=(-0.702111911777+0.131928677216j)
+            arg[1, 1]+=(-0.350752120883+0.165819964807j)*x[2]
+            ref[1, 1, 2]=(-0.350752120883+0.165819964807j)
+            arg[1, 2]+=(-0.967993205423+0.480282455529j)*x[2]
+            ref[1, 2, 2]=(-0.967993205423+0.480282455529j)
+            arg[1, 3]+=(-0.0302939478577+0.742214695305j)*x[2]
+            ref[1, 3, 2]=(-0.0302939478577+0.742214695305j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3),w)
+        ref = Data(0,(4, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.207047196988-0.0296467641985j)*x[0]+((0.609026373929-0.337519094083j))*x[1]
+        ref[0, 0, 0, 0]=(-0.207047196988-0.0296467641985j)
+        ref[0, 0, 0, 1]=(0.609026373929-0.337519094083j)
+        arg[0, 0, 1]=(-0.425531955171-0.658364408916j)*x[0]+((-0.315510614304+0.125834379161j))*x[1]
+        ref[0, 0, 1, 0]=(-0.425531955171-0.658364408916j)
+        ref[0, 0, 1, 1]=(-0.315510614304+0.125834379161j)
+        arg[0, 0, 2]=(-0.563552425504-0.0715275813268j)*x[0]+((-0.450182023711+0.479720360122j))*x[1]
+        ref[0, 0, 2, 0]=(-0.563552425504-0.0715275813268j)
+        ref[0, 0, 2, 1]=(-0.450182023711+0.479720360122j)
+        arg[0, 1, 0]=(-0.455372972476+0.361763486586j)*x[0]+((-0.457132950802-0.531527730175j))*x[1]
+        ref[0, 1, 0, 0]=(-0.455372972476+0.361763486586j)
+        ref[0, 1, 0, 1]=(-0.457132950802-0.531527730175j)
+        arg[0, 1, 1]=(0.25099142982-0.0620558100922j)*x[0]+((-0.988620627348+0.608325874746j))*x[1]
+        ref[0, 1, 1, 0]=(0.25099142982-0.0620558100922j)
+        ref[0, 1, 1, 1]=(-0.988620627348+0.608325874746j)
+        arg[0, 1, 2]=(0.407437877563+0.57545620501j)*x[0]+((0.241684223176-0.432806352805j))*x[1]
+        ref[0, 1, 2, 0]=(0.407437877563+0.57545620501j)
+        ref[0, 1, 2, 1]=(0.241684223176-0.432806352805j)
+        arg[0, 2, 0]=(-0.050683739713-0.0405626783943j)*x[0]+((-0.638153418264+0.435551224448j))*x[1]
+        ref[0, 2, 0, 0]=(-0.050683739713-0.0405626783943j)
+        ref[0, 2, 0, 1]=(-0.638153418264+0.435551224448j)
+        arg[0, 2, 1]=(-0.505367350143-0.791699040987j)*x[0]+((-0.494475867177+0.802216398457j))*x[1]
+        ref[0, 2, 1, 0]=(-0.505367350143-0.791699040987j)
+        ref[0, 2, 1, 1]=(-0.494475867177+0.802216398457j)
+        arg[0, 2, 2]=(-0.0107142660312-0.95889390015j)*x[0]+((0.309203669663-0.973570546814j))*x[1]
+        ref[0, 2, 2, 0]=(-0.0107142660312-0.95889390015j)
+        ref[0, 2, 2, 1]=(0.309203669663-0.973570546814j)
+        arg[0, 3, 0]=(-0.293606365739+0.834894040064j)*x[0]+((0.365330759314-0.333901500678j))*x[1]
+        ref[0, 3, 0, 0]=(-0.293606365739+0.834894040064j)
+        ref[0, 3, 0, 1]=(0.365330759314-0.333901500678j)
+        arg[0, 3, 1]=(-0.794392145624+0.401645762161j)*x[0]+((0.134983369266-0.956010737852j))*x[1]
+        ref[0, 3, 1, 0]=(-0.794392145624+0.401645762161j)
+        ref[0, 3, 1, 1]=(0.134983369266-0.956010737852j)
+        arg[0, 3, 2]=(0.156977493255+0.302266004881j)*x[0]+((-0.195589525921-0.654690970755j))*x[1]
+        ref[0, 3, 2, 0]=(0.156977493255+0.302266004881j)
+        ref[0, 3, 2, 1]=(-0.195589525921-0.654690970755j)
+        arg[1, 0, 0]=(-0.589694632281+0.960754868756j)*x[0]+((0.213602969415+0.519186518062j))*x[1]
+        ref[1, 0, 0, 0]=(-0.589694632281+0.960754868756j)
+        ref[1, 0, 0, 1]=(0.213602969415+0.519186518062j)
+        arg[1, 0, 1]=(0.921831583948+0.899731205904j)*x[0]+((0.122218105223+0.786947434278j))*x[1]
+        ref[1, 0, 1, 0]=(0.921831583948+0.899731205904j)
+        ref[1, 0, 1, 1]=(0.122218105223+0.786947434278j)
+        arg[1, 0, 2]=(0.87366856132+0.230000243777j)*x[0]+((-0.0558227627646-0.44133776679j))*x[1]
+        ref[1, 0, 2, 0]=(0.87366856132+0.230000243777j)
+        ref[1, 0, 2, 1]=(-0.0558227627646-0.44133776679j)
+        arg[1, 1, 0]=(0.0543014463859-0.721324983918j)*x[0]+((0.208704447092-0.964470044119j))*x[1]
+        ref[1, 1, 0, 0]=(0.0543014463859-0.721324983918j)
+        ref[1, 1, 0, 1]=(0.208704447092-0.964470044119j)
+        arg[1, 1, 1]=(-0.649695440169+0.119109903183j)*x[0]+((0.0548341931302+0.10262378242j))*x[1]
+        ref[1, 1, 1, 0]=(-0.649695440169+0.119109903183j)
+        ref[1, 1, 1, 1]=(0.0548341931302+0.10262378242j)
+        arg[1, 1, 2]=(0.291263616563-0.241369394661j)*x[0]+((0.465237150685-0.87987027253j))*x[1]
+        ref[1, 1, 2, 0]=(0.291263616563-0.241369394661j)
+        ref[1, 1, 2, 1]=(0.465237150685-0.87987027253j)
+        arg[1, 2, 0]=(-0.681892510079+0.729299558827j)*x[0]+((0.821694810544-0.44326529967j))*x[1]
+        ref[1, 2, 0, 0]=(-0.681892510079+0.729299558827j)
+        ref[1, 2, 0, 1]=(0.821694810544-0.44326529967j)
+        arg[1, 2, 1]=(0.247926077133+0.0799270127076j)*x[0]+((-0.33818536855+0.478921618641j))*x[1]
+        ref[1, 2, 1, 0]=(0.247926077133+0.0799270127076j)
+        ref[1, 2, 1, 1]=(-0.33818536855+0.478921618641j)
+        arg[1, 2, 2]=(0.761939404014-0.109031696274j)*x[0]+((-0.970494356829-0.169098672611j))*x[1]
+        ref[1, 2, 2, 0]=(0.761939404014-0.109031696274j)
+        ref[1, 2, 2, 1]=(-0.970494356829-0.169098672611j)
+        arg[1, 3, 0]=(-0.357315313768+0.135971307801j)*x[0]+((0.0666784012317+0.422916007856j))*x[1]
+        ref[1, 3, 0, 0]=(-0.357315313768+0.135971307801j)
+        ref[1, 3, 0, 1]=(0.0666784012317+0.422916007856j)
+        arg[1, 3, 1]=(-0.145555417765-0.802278830095j)*x[0]+((0.82696009361-0.589436114524j))*x[1]
+        ref[1, 3, 1, 0]=(-0.145555417765-0.802278830095j)
+        ref[1, 3, 1, 1]=(0.82696009361-0.589436114524j)
+        arg[1, 3, 2]=(-0.712542425631-0.228617284222j)*x[0]+((0.0442340097361-0.633008593486j))*x[1]
+        ref[1, 3, 2, 0]=(-0.712542425631-0.228617284222j)
+        ref[1, 3, 2, 1]=(0.0442340097361-0.633008593486j)
+        arg[2, 0, 0]=(-0.511783440784+0.614367212756j)*x[0]+((0.920792515894+0.268193118395j))*x[1]
+        ref[2, 0, 0, 0]=(-0.511783440784+0.614367212756j)
+        ref[2, 0, 0, 1]=(0.920792515894+0.268193118395j)
+        arg[2, 0, 1]=(-0.450127362288+0.191121686588j)*x[0]+((-0.244225863298+0.0123580760522j))*x[1]
+        ref[2, 0, 1, 0]=(-0.450127362288+0.191121686588j)
+        ref[2, 0, 1, 1]=(-0.244225863298+0.0123580760522j)
+        arg[2, 0, 2]=(-0.447804564549+0.215565865678j)*x[0]+((0.64892271478+0.380534397906j))*x[1]
+        ref[2, 0, 2, 0]=(-0.447804564549+0.215565865678j)
+        ref[2, 0, 2, 1]=(0.64892271478+0.380534397906j)
+        arg[2, 1, 0]=(-0.147740956498+0.535821028548j)*x[0]+((0.490517891441+0.674743066083j))*x[1]
+        ref[2, 1, 0, 0]=(-0.147740956498+0.535821028548j)
+        ref[2, 1, 0, 1]=(0.490517891441+0.674743066083j)
+        arg[2, 1, 1]=(0.108979409514-0.602176957677j)*x[0]+((-0.186441385985+0.157735118893j))*x[1]
+        ref[2, 1, 1, 0]=(0.108979409514-0.602176957677j)
+        ref[2, 1, 1, 1]=(-0.186441385985+0.157735118893j)
+        arg[2, 1, 2]=(0.167851934796+0.533053655885j)*x[0]+((0.33137981284+0.828921505821j))*x[1]
+        ref[2, 1, 2, 0]=(0.167851934796+0.533053655885j)
+        ref[2, 1, 2, 1]=(0.33137981284+0.828921505821j)
+        arg[2, 2, 0]=(0.385803461201-0.310626367095j)*x[0]+((0.355730091888-0.95347651199j))*x[1]
+        ref[2, 2, 0, 0]=(0.385803461201-0.310626367095j)
+        ref[2, 2, 0, 1]=(0.355730091888-0.95347651199j)
+        arg[2, 2, 1]=(0.775539872265+0.266609096165j)*x[0]+((-0.763500492601-0.251297669205j))*x[1]
+        ref[2, 2, 1, 0]=(0.775539872265+0.266609096165j)
+        ref[2, 2, 1, 1]=(-0.763500492601-0.251297669205j)
+        arg[2, 2, 2]=(-0.829473823248-0.798529426073j)*x[0]+((-0.680660735656+0.786789625968j))*x[1]
+        ref[2, 2, 2, 0]=(-0.829473823248-0.798529426073j)
+        ref[2, 2, 2, 1]=(-0.680660735656+0.786789625968j)
+        arg[2, 3, 0]=(-0.62809567774+0.910927511338j)*x[0]+((-0.0139413581269-0.689415318463j))*x[1]
+        ref[2, 3, 0, 0]=(-0.62809567774+0.910927511338j)
+        ref[2, 3, 0, 1]=(-0.0139413581269-0.689415318463j)
+        arg[2, 3, 1]=(-0.18330134889+0.700653781193j)*x[0]+((-0.335410247132-0.647682105431j))*x[1]
+        ref[2, 3, 1, 0]=(-0.18330134889+0.700653781193j)
+        ref[2, 3, 1, 1]=(-0.335410247132-0.647682105431j)
+        arg[2, 3, 2]=(-0.235489585806+0.222059901269j)*x[0]+((-0.870343760529+0.528931508153j))*x[1]
+        ref[2, 3, 2, 0]=(-0.235489585806+0.222059901269j)
+        ref[2, 3, 2, 1]=(-0.870343760529+0.528931508153j)
+        arg[3, 0, 0]=(0.547192564488-0.900482692765j)*x[0]+((-0.922934944431-0.811880335448j))*x[1]
+        ref[3, 0, 0, 0]=(0.547192564488-0.900482692765j)
+        ref[3, 0, 0, 1]=(-0.922934944431-0.811880335448j)
+        arg[3, 0, 1]=(0.713783707188+0.428947729799j)*x[0]+((-0.893525966921+0.703486590186j))*x[1]
+        ref[3, 0, 1, 0]=(0.713783707188+0.428947729799j)
+        ref[3, 0, 1, 1]=(-0.893525966921+0.703486590186j)
+        arg[3, 0, 2]=(0.854086598905-0.447474485126j)*x[0]+((0.468477172649-0.127363858208j))*x[1]
+        ref[3, 0, 2, 0]=(0.854086598905-0.447474485126j)
+        ref[3, 0, 2, 1]=(0.468477172649-0.127363858208j)
+        arg[3, 1, 0]=(-0.148916999181-0.267034752214j)*x[0]+((-0.106114049694+0.194703361593j))*x[1]
+        ref[3, 1, 0, 0]=(-0.148916999181-0.267034752214j)
+        ref[3, 1, 0, 1]=(-0.106114049694+0.194703361593j)
+        arg[3, 1, 1]=(-0.246477893322+0.873575915224j)*x[0]+((-0.512553332837-0.756580303105j))*x[1]
+        ref[3, 1, 1, 0]=(-0.246477893322+0.873575915224j)
+        ref[3, 1, 1, 1]=(-0.512553332837-0.756580303105j)
+        arg[3, 1, 2]=(-0.980310769947+0.374708533626j)*x[0]+((0.320825647411-0.843434822281j))*x[1]
+        ref[3, 1, 2, 0]=(-0.980310769947+0.374708533626j)
+        ref[3, 1, 2, 1]=(0.320825647411-0.843434822281j)
+        arg[3, 2, 0]=(-0.810380796731-0.714928368185j)*x[0]+((-0.198722523915+0.219371253879j))*x[1]
+        ref[3, 2, 0, 0]=(-0.810380796731-0.714928368185j)
+        ref[3, 2, 0, 1]=(-0.198722523915+0.219371253879j)
+        arg[3, 2, 1]=(-0.833376853176+0.740645223268j)*x[0]+((-0.206948837481-0.496222048085j))*x[1]
+        ref[3, 2, 1, 0]=(-0.833376853176+0.740645223268j)
+        ref[3, 2, 1, 1]=(-0.206948837481-0.496222048085j)
+        arg[3, 2, 2]=(0.25626585613+0.839898052855j)*x[0]+((-0.306359443619+0.350516085521j))*x[1]
+        ref[3, 2, 2, 0]=(0.25626585613+0.839898052855j)
+        ref[3, 2, 2, 1]=(-0.306359443619+0.350516085521j)
+        arg[3, 3, 0]=(-0.0655746384726+0.441781832165j)*x[0]+((-0.374232096649-0.777591968824j))*x[1]
+        ref[3, 3, 0, 0]=(-0.0655746384726+0.441781832165j)
+        ref[3, 3, 0, 1]=(-0.374232096649-0.777591968824j)
+        arg[3, 3, 1]=(0.739533505036-0.639715608833j)*x[0]+((-0.927247314658+0.230452277901j))*x[1]
+        ref[3, 3, 1, 0]=(0.739533505036-0.639715608833j)
+        ref[3, 3, 1, 1]=(-0.927247314658+0.230452277901j)
+        arg[3, 3, 2]=(-0.490216529947-0.183770747101j)*x[0]+((0.359930469025+0.167175343843j))*x[1]
+        ref[3, 3, 2, 0]=(-0.490216529947-0.183770747101j)
+        ref[3, 3, 2, 1]=(0.359930469025+0.167175343843j)
+        if dim==3:
+            arg[0, 0, 0]+=(-0.980867230927+0.232120858787j)*x[2]
+            ref[0, 0, 0, 2]=(-0.980867230927+0.232120858787j)
+            arg[0, 0, 1]+=(-0.728871225867-0.389785387434j)*x[2]
+            ref[0, 0, 1, 2]=(-0.728871225867-0.389785387434j)
+            arg[0, 0, 2]+=(-0.283201368494+0.678337697452j)*x[2]
+            ref[0, 0, 2, 2]=(-0.283201368494+0.678337697452j)
+            arg[0, 1, 0]+=(-0.552882482436+0.212471805099j)*x[2]
+            ref[0, 1, 0, 2]=(-0.552882482436+0.212471805099j)
+            arg[0, 1, 1]+=(-0.742183270525-0.347890208005j)*x[2]
+            ref[0, 1, 1, 2]=(-0.742183270525-0.347890208005j)
+            arg[0, 1, 2]+=(0.842186696506+0.550049759485j)*x[2]
+            ref[0, 1, 2, 2]=(0.842186696506+0.550049759485j)
+            arg[0, 2, 0]+=(0.756599018509-0.999311621522j)*x[2]
+            ref[0, 2, 0, 2]=(0.756599018509-0.999311621522j)
+            arg[0, 2, 1]+=(0.893293457721+0.921469841188j)*x[2]
+            ref[0, 2, 1, 2]=(0.893293457721+0.921469841188j)
+            arg[0, 2, 2]+=(0.893697466529-0.993251431718j)*x[2]
+            ref[0, 2, 2, 2]=(0.893697466529-0.993251431718j)
+            arg[0, 3, 0]+=(-0.50029760198+0.928872465773j)*x[2]
+            ref[0, 3, 0, 2]=(-0.50029760198+0.928872465773j)
+            arg[0, 3, 1]+=(0.324167678379-0.764668403788j)*x[2]
+            ref[0, 3, 1, 2]=(0.324167678379-0.764668403788j)
+            arg[0, 3, 2]+=(-0.747575049282-0.516147243213j)*x[2]
+            ref[0, 3, 2, 2]=(-0.747575049282-0.516147243213j)
+            arg[1, 0, 0]+=(0.843724491724-0.518638119843j)*x[2]
+            ref[1, 0, 0, 2]=(0.843724491724-0.518638119843j)
+            arg[1, 0, 1]+=(0.810017146321-0.261731994139j)*x[2]
+            ref[1, 0, 1, 2]=(0.810017146321-0.261731994139j)
+            arg[1, 0, 2]+=(-0.703006384761+0.903313964432j)*x[2]
+            ref[1, 0, 2, 2]=(-0.703006384761+0.903313964432j)
+            arg[1, 1, 0]+=(0.814785186504-0.124829141797j)*x[2]
+            ref[1, 1, 0, 2]=(0.814785186504-0.124829141797j)
+            arg[1, 1, 1]+=(0.0695843837579-0.954549816747j)*x[2]
+            ref[1, 1, 1, 2]=(0.0695843837579-0.954549816747j)
+            arg[1, 1, 2]+=(0.57618830996-0.76327101858j)*x[2]
+            ref[1, 1, 2, 2]=(0.57618830996-0.76327101858j)
+            arg[1, 2, 0]+=(0.395067836669-0.442951070725j)*x[2]
+            ref[1, 2, 0, 2]=(0.395067836669-0.442951070725j)
+            arg[1, 2, 1]+=(-0.359588358068-0.575234219027j)*x[2]
+            ref[1, 2, 1, 2]=(-0.359588358068-0.575234219027j)
+            arg[1, 2, 2]+=(0.824008517933+0.807812663863j)*x[2]
+            ref[1, 2, 2, 2]=(0.824008517933+0.807812663863j)
+            arg[1, 3, 0]+=(0.205228149932-0.130343292666j)*x[2]
+            ref[1, 3, 0, 2]=(0.205228149932-0.130343292666j)
+            arg[1, 3, 1]+=(-0.400538401105-0.957149467934j)*x[2]
+            ref[1, 3, 1, 2]=(-0.400538401105-0.957149467934j)
+            arg[1, 3, 2]+=(0.620011589178+0.104912697205j)*x[2]
+            ref[1, 3, 2, 2]=(0.620011589178+0.104912697205j)
+            arg[2, 0, 0]+=(-0.427000666843-0.951795027168j)*x[2]
+            ref[2, 0, 0, 2]=(-0.427000666843-0.951795027168j)
+            arg[2, 0, 1]+=(-0.308394024056+0.00987524936907j)*x[2]
+            ref[2, 0, 1, 2]=(-0.308394024056+0.00987524936907j)
+            arg[2, 0, 2]+=(0.137773977717+0.802235423643j)*x[2]
+            ref[2, 0, 2, 2]=(0.137773977717+0.802235423643j)
+            arg[2, 1, 0]+=(-0.524454337337+0.215722654826j)*x[2]
+            ref[2, 1, 0, 2]=(-0.524454337337+0.215722654826j)
+            arg[2, 1, 1]+=(-0.443287154213+0.572760585659j)*x[2]
+            ref[2, 1, 1, 2]=(-0.443287154213+0.572760585659j)
+            arg[2, 1, 2]+=(-0.138518259214+0.0596323971305j)*x[2]
+            ref[2, 1, 2, 2]=(-0.138518259214+0.0596323971305j)
+            arg[2, 2, 0]+=(0.295519276915+0.512543875829j)*x[2]
+            ref[2, 2, 0, 2]=(0.295519276915+0.512543875829j)
+            arg[2, 2, 1]+=(0.58684183317+0.425397516062j)*x[2]
+            ref[2, 2, 1, 2]=(0.58684183317+0.425397516062j)
+            arg[2, 2, 2]+=(-0.0237216436149+0.0204215797224j)*x[2]
+            ref[2, 2, 2, 2]=(-0.0237216436149+0.0204215797224j)
+            arg[2, 3, 0]+=(0.837287912807-0.201346575682j)*x[2]
+            ref[2, 3, 0, 2]=(0.837287912807-0.201346575682j)
+            arg[2, 3, 1]+=(-0.159215370801+0.369717940181j)*x[2]
+            ref[2, 3, 1, 2]=(-0.159215370801+0.369717940181j)
+            arg[2, 3, 2]+=(-0.682494673819-0.218887193394j)*x[2]
+            ref[2, 3, 2, 2]=(-0.682494673819-0.218887193394j)
+            arg[3, 0, 0]+=(0.0306421185478-0.101237257598j)*x[2]
+            ref[3, 0, 0, 2]=(0.0306421185478-0.101237257598j)
+            arg[3, 0, 1]+=(-0.773603018974-0.200925704402j)*x[2]
+            ref[3, 0, 1, 2]=(-0.773603018974-0.200925704402j)
+            arg[3, 0, 2]+=(-0.101183449872+0.885036902566j)*x[2]
+            ref[3, 0, 2, 2]=(-0.101183449872+0.885036902566j)
+            arg[3, 1, 0]+=(-0.563657916531-0.415459716082j)*x[2]
+            ref[3, 1, 0, 2]=(-0.563657916531-0.415459716082j)
+            arg[3, 1, 1]+=(0.420330621491+0.531077290641j)*x[2]
+            ref[3, 1, 1, 2]=(0.420330621491+0.531077290641j)
+            arg[3, 1, 2]+=(-0.453514711727+0.0512863608666j)*x[2]
+            ref[3, 1, 2, 2]=(-0.453514711727+0.0512863608666j)
+            arg[3, 2, 0]+=(-0.180241873112+0.779151519774j)*x[2]
+            ref[3, 2, 0, 2]=(-0.180241873112+0.779151519774j)
+            arg[3, 2, 1]+=(0.0668053216632+0.446830146369j)*x[2]
+            ref[3, 2, 1, 2]=(0.0668053216632+0.446830146369j)
+            arg[3, 2, 2]+=(0.793054392246-0.270717052254j)*x[2]
+            ref[3, 2, 2, 2]=(0.793054392246-0.270717052254j)
+            arg[3, 3, 0]+=(-0.138552221551-0.95092128208j)*x[2]
+            ref[3, 3, 0, 2]=(-0.138552221551-0.95092128208j)
+            arg[3, 3, 1]+=(0.0873660317511+0.690857670406j)*x[2]
+            ref[3, 3, 1, 2]=(0.0873660317511+0.690857670406j)
+            arg[3, 3, 2]+=(-0.784966346658-0.649539240615j)*x[2]
+            ref[3, 3, 2, 2]=(-0.784966346658-0.649539240615j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.402119896754-0.58549226233j)*x[0]+((0.644785348819+0.0379756934615j))*x[1]
+        ref[0]=(-0.402119896754-0.58549226233j)
+        ref[1]=(0.644785348819+0.0379756934615j)
+        if dim==3:
+            arg+=((-0.267129663048+0.0677218432684j))*x[2]
+            ref[2]=(-0.267129663048+0.0677218432684j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(0.601516938676+0.268484366258j)*x[0]+((0.700332849911+0.0541977924917j))*x[1]
+        ref[0, 0]=(0.601516938676+0.268484366258j)
+        ref[0, 1]=(0.700332849911+0.0541977924917j)
+        arg[1,]=(-0.530251308746-0.203513887639j)*x[0]+((0.123486255194+0.835780087485j))*x[1]
+        ref[1, 0]=(-0.530251308746-0.203513887639j)
+        ref[1, 1]=(0.123486255194+0.835780087485j)
+        arg[2,]=(0.760397474234+0.62511781982j)*x[0]+((-0.696957564928+0.514393256625j))*x[1]
+        ref[2, 0]=(0.760397474234+0.62511781982j)
+        ref[2, 1]=(-0.696957564928+0.514393256625j)
+        if dim==3:
+            arg[0,]+=(0.755141896321-0.215489403872j)*x[2]
+            ref[0, 2]=(0.755141896321-0.215489403872j)
+            arg[1,]+=(-0.822481280973+0.666741313842j)*x[2]
+            ref[1, 2]=(-0.822481280973+0.666741313842j)
+            arg[2,]+=(0.939163350603-0.147730567049j)*x[2]
+            ref[2, 2]=(0.939163350603-0.147730567049j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=(0.484573903589-0.955768733071j)*x[0]+((-0.542340694026+0.883926229131j))*x[1]
+        ref[0, 0, 0]=(0.484573903589-0.955768733071j)
+        ref[0, 0, 1]=(-0.542340694026+0.883926229131j)
+        arg[0, 1]=(-0.0267587792662+0.149041761528j)*x[0]+((0.311464155737+0.982818064656j))*x[1]
+        ref[0, 1, 0]=(-0.0267587792662+0.149041761528j)
+        ref[0, 1, 1]=(0.311464155737+0.982818064656j)
+        arg[1, 0]=(0.942874231457-0.819401369317j)*x[0]+((-0.512937061847-0.429814665976j))*x[1]
+        ref[1, 0, 0]=(0.942874231457-0.819401369317j)
+        ref[1, 0, 1]=(-0.512937061847-0.429814665976j)
+        arg[1, 1]=(-0.730955257339-0.667284092821j)*x[0]+((-0.229866070132-0.483043240697j))*x[1]
+        ref[1, 1, 0]=(-0.730955257339-0.667284092821j)
+        ref[1, 1, 1]=(-0.229866070132-0.483043240697j)
+        arg[2, 0]=(0.620218890747-0.754076858658j)*x[0]+((0.120624063575-0.682661686327j))*x[1]
+        ref[2, 0, 0]=(0.620218890747-0.754076858658j)
+        ref[2, 0, 1]=(0.120624063575-0.682661686327j)
+        arg[2, 1]=(-0.309230457237+0.0588802803232j)*x[0]+((0.994728987727+0.359010764428j))*x[1]
+        ref[2, 1, 0]=(-0.309230457237+0.0588802803232j)
+        ref[2, 1, 1]=(0.994728987727+0.359010764428j)
+        if dim==3:
+            arg[0, 0]+=(0.671093547507-0.772398065276j)*x[2]
+            ref[0, 0, 2]=(0.671093547507-0.772398065276j)
+            arg[0, 1]+=(-0.539598055722+0.827305399189j)*x[2]
+            ref[0, 1, 2]=(-0.539598055722+0.827305399189j)
+            arg[1, 0]+=(-0.195362239572+0.0751141431016j)*x[2]
+            ref[1, 0, 2]=(-0.195362239572+0.0751141431016j)
+            arg[1, 1]+=(0.777886180586-0.474921929309j)*x[2]
+            ref[1, 1, 2]=(0.777886180586-0.474921929309j)
+            arg[2, 0]+=(-0.874831480065+0.589307053699j)*x[2]
+            ref[2, 0, 2]=(-0.874831480065+0.589307053699j)
+            arg[2, 1]+=(-0.314352705101-0.848560412321j)*x[2]
+            ref[2, 1, 2]=(-0.314352705101-0.848560412321j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.5558659098+0.779468181162j)*x[0]+((-0.29552386209-0.362686057713j))*x[1]
+        ref[0, 0, 0, 0]=(0.5558659098+0.779468181162j)
+        ref[0, 0, 0, 1]=(-0.29552386209-0.362686057713j)
+        arg[0, 0, 1]=(-0.34637657769-0.899492532583j)*x[0]+((0.689153592092+0.879524139051j))*x[1]
+        ref[0, 0, 1, 0]=(-0.34637657769-0.899492532583j)
+        ref[0, 0, 1, 1]=(0.689153592092+0.879524139051j)
+        arg[0, 0, 2]=(0.0623459507475-0.399308411587j)*x[0]+((-0.886502511065+0.542280798571j))*x[1]
+        ref[0, 0, 2, 0]=(0.0623459507475-0.399308411587j)
+        ref[0, 0, 2, 1]=(-0.886502511065+0.542280798571j)
+        arg[0, 0, 3]=(0.110351466512+0.439557507635j)*x[0]+((0.866251362068-0.935164218961j))*x[1]
+        ref[0, 0, 3, 0]=(0.110351466512+0.439557507635j)
+        ref[0, 0, 3, 1]=(0.866251362068-0.935164218961j)
+        arg[0, 1, 0]=(-0.859090156719-0.185605160012j)*x[0]+((0.398073578505+0.850470800762j))*x[1]
+        ref[0, 1, 0, 0]=(-0.859090156719-0.185605160012j)
+        ref[0, 1, 0, 1]=(0.398073578505+0.850470800762j)
+        arg[0, 1, 1]=(0.726494223851+0.0876392325541j)*x[0]+((0.366257777672-0.908373363941j))*x[1]
+        ref[0, 1, 1, 0]=(0.726494223851+0.0876392325541j)
+        ref[0, 1, 1, 1]=(0.366257777672-0.908373363941j)
+        arg[0, 1, 2]=(0.395848130781-0.0146457622081j)*x[0]+((0.790929100982-0.560682130399j))*x[1]
+        ref[0, 1, 2, 0]=(0.395848130781-0.0146457622081j)
+        ref[0, 1, 2, 1]=(0.790929100982-0.560682130399j)
+        arg[0, 1, 3]=(0.379098243624+0.276337000876j)*x[0]+((0.8569548691-0.807221271328j))*x[1]
+        ref[0, 1, 3, 0]=(0.379098243624+0.276337000876j)
+        ref[0, 1, 3, 1]=(0.8569548691-0.807221271328j)
+        arg[1, 0, 0]=(0.915800190597+0.99260277811j)*x[0]+((0.642303739426+0.929931098458j))*x[1]
+        ref[1, 0, 0, 0]=(0.915800190597+0.99260277811j)
+        ref[1, 0, 0, 1]=(0.642303739426+0.929931098458j)
+        arg[1, 0, 1]=(-0.220521603581-0.124177209268j)*x[0]+((-0.617055779566+0.43538651833j))*x[1]
+        ref[1, 0, 1, 0]=(-0.220521603581-0.124177209268j)
+        ref[1, 0, 1, 1]=(-0.617055779566+0.43538651833j)
+        arg[1, 0, 2]=(-0.63100568555+0.95161685966j)*x[0]+((-0.640211999563+0.221467464963j))*x[1]
+        ref[1, 0, 2, 0]=(-0.63100568555+0.95161685966j)
+        ref[1, 0, 2, 1]=(-0.640211999563+0.221467464963j)
+        arg[1, 0, 3]=(-0.273450134703+0.342409991704j)*x[0]+((-0.685883963709+0.782921485j))*x[1]
+        ref[1, 0, 3, 0]=(-0.273450134703+0.342409991704j)
+        ref[1, 0, 3, 1]=(-0.685883963709+0.782921485j)
+        arg[1, 1, 0]=(0.510834645642-0.702357061127j)*x[0]+((-0.545610470111-0.448238217308j))*x[1]
+        ref[1, 1, 0, 0]=(0.510834645642-0.702357061127j)
+        ref[1, 1, 0, 1]=(-0.545610470111-0.448238217308j)
+        arg[1, 1, 1]=(-0.458017249058+0.0124762885362j)*x[0]+((0.778042821704+0.706162634876j))*x[1]
+        ref[1, 1, 1, 0]=(-0.458017249058+0.0124762885362j)
+        ref[1, 1, 1, 1]=(0.778042821704+0.706162634876j)
+        arg[1, 1, 2]=(0.131803865305+0.83667403128j)*x[0]+((0.287073740951-0.795189447068j))*x[1]
+        ref[1, 1, 2, 0]=(0.131803865305+0.83667403128j)
+        ref[1, 1, 2, 1]=(0.287073740951-0.795189447068j)
+        arg[1, 1, 3]=(-0.744856003803+0.181229094649j)*x[0]+((-0.463693223901-0.146747415327j))*x[1]
+        ref[1, 1, 3, 0]=(-0.744856003803+0.181229094649j)
+        ref[1, 1, 3, 1]=(-0.463693223901-0.146747415327j)
+        arg[2, 0, 0]=(-0.293204646118+0.641738790091j)*x[0]+((-0.160312476383-0.0647965032025j))*x[1]
+        ref[2, 0, 0, 0]=(-0.293204646118+0.641738790091j)
+        ref[2, 0, 0, 1]=(-0.160312476383-0.0647965032025j)
+        arg[2, 0, 1]=(0.184201469056+0.108416929812j)*x[0]+((-0.910310165566+0.921513476343j))*x[1]
+        ref[2, 0, 1, 0]=(0.184201469056+0.108416929812j)
+        ref[2, 0, 1, 1]=(-0.910310165566+0.921513476343j)
+        arg[2, 0, 2]=(-0.821630088169+0.500870736602j)*x[0]+((0.0180242611159-0.972823754918j))*x[1]
+        ref[2, 0, 2, 0]=(-0.821630088169+0.500870736602j)
+        ref[2, 0, 2, 1]=(0.0180242611159-0.972823754918j)
+        arg[2, 0, 3]=(-0.0182912527802-0.535643349193j)*x[0]+((-0.090717749324+0.954476117554j))*x[1]
+        ref[2, 0, 3, 0]=(-0.0182912527802-0.535643349193j)
+        ref[2, 0, 3, 1]=(-0.090717749324+0.954476117554j)
+        arg[2, 1, 0]=(0.136786653228+0.681727230263j)*x[0]+((0.336529800859+0.30974874623j))*x[1]
+        ref[2, 1, 0, 0]=(0.136786653228+0.681727230263j)
+        ref[2, 1, 0, 1]=(0.336529800859+0.30974874623j)
+        arg[2, 1, 1]=(-0.00445590214132-0.280732928349j)*x[0]+((0.998267208071+0.601268334612j))*x[1]
+        ref[2, 1, 1, 0]=(-0.00445590214132-0.280732928349j)
+        ref[2, 1, 1, 1]=(0.998267208071+0.601268334612j)
+        arg[2, 1, 2]=(-0.538174511003+0.539082487136j)*x[0]+((0.553221262269-0.392265457071j))*x[1]
+        ref[2, 1, 2, 0]=(-0.538174511003+0.539082487136j)
+        ref[2, 1, 2, 1]=(0.553221262269-0.392265457071j)
+        arg[2, 1, 3]=(-0.417512196516-0.0999364747728j)*x[0]+((0.345406492751+0.772429911048j))*x[1]
+        ref[2, 1, 3, 0]=(-0.417512196516-0.0999364747728j)
+        ref[2, 1, 3, 1]=(0.345406492751+0.772429911048j)
+        arg[3, 0, 0]=(0.211907284978-0.889467622561j)*x[0]+((0.4167547058-0.806671466453j))*x[1]
+        ref[3, 0, 0, 0]=(0.211907284978-0.889467622561j)
+        ref[3, 0, 0, 1]=(0.4167547058-0.806671466453j)
+        arg[3, 0, 1]=(0.457580160709-0.93115934052j)*x[0]+((0.714480353438+0.350629129699j))*x[1]
+        ref[3, 0, 1, 0]=(0.457580160709-0.93115934052j)
+        ref[3, 0, 1, 1]=(0.714480353438+0.350629129699j)
+        arg[3, 0, 2]=(0.730638640898-0.0145406561529j)*x[0]+((0.444388427209-0.418363978814j))*x[1]
+        ref[3, 0, 2, 0]=(0.730638640898-0.0145406561529j)
+        ref[3, 0, 2, 1]=(0.444388427209-0.418363978814j)
+        arg[3, 0, 3]=(-0.848172263889-0.581484002801j)*x[0]+((0.0888008256355-0.663827301023j))*x[1]
+        ref[3, 0, 3, 0]=(-0.848172263889-0.581484002801j)
+        ref[3, 0, 3, 1]=(0.0888008256355-0.663827301023j)
+        arg[3, 1, 0]=(-0.447874378048+0.73417152882j)*x[0]+((-0.994810289374+0.176016906529j))*x[1]
+        ref[3, 1, 0, 0]=(-0.447874378048+0.73417152882j)
+        ref[3, 1, 0, 1]=(-0.994810289374+0.176016906529j)
+        arg[3, 1, 1]=(0.35996322349+0.130875262702j)*x[0]+((0.304609739129-0.116755841368j))*x[1]
+        ref[3, 1, 1, 0]=(0.35996322349+0.130875262702j)
+        ref[3, 1, 1, 1]=(0.304609739129-0.116755841368j)
+        arg[3, 1, 2]=(0.826369906595+0.119963818539j)*x[0]+((-0.972271478968-0.932407707086j))*x[1]
+        ref[3, 1, 2, 0]=(0.826369906595+0.119963818539j)
+        ref[3, 1, 2, 1]=(-0.972271478968-0.932407707086j)
+        arg[3, 1, 3]=(0.043730414977+0.764430807238j)*x[0]+((-0.725496553898+0.185430866416j))*x[1]
+        ref[3, 1, 3, 0]=(0.043730414977+0.764430807238j)
+        ref[3, 1, 3, 1]=(-0.725496553898+0.185430866416j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.970842311763+0.945884641332j)*x[2]
+            ref[0, 0, 0, 2]=(0.970842311763+0.945884641332j)
+            arg[0, 0, 1]+=(-0.934763996927+0.0399800651697j)*x[2]
+            ref[0, 0, 1, 2]=(-0.934763996927+0.0399800651697j)
+            arg[0, 0, 2]+=(-0.187877909923+0.186449357884j)*x[2]
+            ref[0, 0, 2, 2]=(-0.187877909923+0.186449357884j)
+            arg[0, 0, 3]+=(-0.446885444617-0.0416164438284j)*x[2]
+            ref[0, 0, 3, 2]=(-0.446885444617-0.0416164438284j)
+            arg[0, 1, 0]+=(0.545762297642-0.604967207286j)*x[2]
+            ref[0, 1, 0, 2]=(0.545762297642-0.604967207286j)
+            arg[0, 1, 1]+=(-0.376071119555-0.902307251976j)*x[2]
+            ref[0, 1, 1, 2]=(-0.376071119555-0.902307251976j)
+            arg[0, 1, 2]+=(0.760411837349+0.539678724605j)*x[2]
+            ref[0, 1, 2, 2]=(0.760411837349+0.539678724605j)
+            arg[0, 1, 3]+=(-0.699166638957-0.545420191024j)*x[2]
+            ref[0, 1, 3, 2]=(-0.699166638957-0.545420191024j)
+            arg[1, 0, 0]+=(0.33703355957+0.278755559293j)*x[2]
+            ref[1, 0, 0, 2]=(0.33703355957+0.278755559293j)
+            arg[1, 0, 1]+=(0.470425433129+0.579753204973j)*x[2]
+            ref[1, 0, 1, 2]=(0.470425433129+0.579753204973j)
+            arg[1, 0, 2]+=(-0.638964135536+0.747104786493j)*x[2]
+            ref[1, 0, 2, 2]=(-0.638964135536+0.747104786493j)
+            arg[1, 0, 3]+=(-0.0833966897857+0.570266873676j)*x[2]
+            ref[1, 0, 3, 2]=(-0.0833966897857+0.570266873676j)
+            arg[1, 1, 0]+=(-0.117290566472-0.433996701418j)*x[2]
+            ref[1, 1, 0, 2]=(-0.117290566472-0.433996701418j)
+            arg[1, 1, 1]+=(-0.953490457568+0.679044666904j)*x[2]
+            ref[1, 1, 1, 2]=(-0.953490457568+0.679044666904j)
+            arg[1, 1, 2]+=(-0.277852210567-0.901510087154j)*x[2]
+            ref[1, 1, 2, 2]=(-0.277852210567-0.901510087154j)
+            arg[1, 1, 3]+=(0.0140123766107-0.68949388903j)*x[2]
+            ref[1, 1, 3, 2]=(0.0140123766107-0.68949388903j)
+            arg[2, 0, 0]+=(-0.568673510179+0.199626247216j)*x[2]
+            ref[2, 0, 0, 2]=(-0.568673510179+0.199626247216j)
+            arg[2, 0, 1]+=(0.956890792844-0.243068723666j)*x[2]
+            ref[2, 0, 1, 2]=(0.956890792844-0.243068723666j)
+            arg[2, 0, 2]+=(-0.283577819023-0.660410594099j)*x[2]
+            ref[2, 0, 2, 2]=(-0.283577819023-0.660410594099j)
+            arg[2, 0, 3]+=(0.350933874453+0.635992950966j)*x[2]
+            ref[2, 0, 3, 2]=(0.350933874453+0.635992950966j)
+            arg[2, 1, 0]+=(-0.657540351284-0.999529431112j)*x[2]
+            ref[2, 1, 0, 2]=(-0.657540351284-0.999529431112j)
+            arg[2, 1, 1]+=(0.209544681991+0.329706800812j)*x[2]
+            ref[2, 1, 1, 2]=(0.209544681991+0.329706800812j)
+            arg[2, 1, 2]+=(-0.97598408666+0.224639862112j)*x[2]
+            ref[2, 1, 2, 2]=(-0.97598408666+0.224639862112j)
+            arg[2, 1, 3]+=(0.984559077784-0.266314472285j)*x[2]
+            ref[2, 1, 3, 2]=(0.984559077784-0.266314472285j)
+            arg[3, 0, 0]+=(0.201193702967-0.565643103525j)*x[2]
+            ref[3, 0, 0, 2]=(0.201193702967-0.565643103525j)
+            arg[3, 0, 1]+=(0.0995406795499-0.138393460972j)*x[2]
+            ref[3, 0, 1, 2]=(0.0995406795499-0.138393460972j)
+            arg[3, 0, 2]+=(0.684449467944+0.0206173669331j)*x[2]
+            ref[3, 0, 2, 2]=(0.684449467944+0.0206173669331j)
+            arg[3, 0, 3]+=(0.378081638342-0.333379084693j)*x[2]
+            ref[3, 0, 3, 2]=(0.378081638342-0.333379084693j)
+            arg[3, 1, 0]+=(-0.284275732898-0.344847174992j)*x[2]
+            ref[3, 1, 0, 2]=(-0.284275732898-0.344847174992j)
+            arg[3, 1, 1]+=(-0.706390755187-0.00925125817514j)*x[2]
+            ref[3, 1, 1, 2]=(-0.706390755187-0.00925125817514j)
+            arg[3, 1, 2]+=(0.615668673585+0.907451911177j)*x[2]
+            ref[3, 1, 2, 2]=(0.615668673585+0.907451911177j)
+            arg[3, 1, 3]+=(0.0237406983738-0.249944516276j)*x[2]
+            ref[3, 1, 3, 2]=(0.0237406983738-0.249944516276j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.64070657437+0.00567227574053j)*x[0]**o+((-0.916318138509-0.763439493706j))*x[0]+((0.267136153585+0.238905685527j))*x[1]**o+((-0.158086715903+0.0806356217707j))*x[1]
+        ref[0]=(0.64070657437+0.00567227574053j)*o*x_ref[0]**(o-1)+((-0.916318138509-0.763439493706j))
+        ref[1]=(0.267136153585+0.238905685527j)*o*x_ref[1]**(o-1)+((-0.158086715903+0.0806356217707j))
+        if dim==3:
+            arg+=((-0.889364477163+0.912088115851j))*x[2]**o+((-0.610809117638+0.0898835614699j))*x[2]
+            ref[2]=(-0.889364477163+0.912088115851j)*o*x_ref[2]**(o-1)+((-0.610809117638+0.0898835614699j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=(0.709372063928-0.16816930594j)*x[0]**o+((0.913635436231+0.0986293808756j))*x[0]+((-0.927817217277+0.900935388796j))*x[1]**o+((-0.413306842525-0.0111550985561j))*x[1]
+        ref[0, 0]=(0.709372063928-0.16816930594j)*o*x_ref[0]**(o-1)+((0.913635436231+0.0986293808756j))
+        ref[0, 1]=(-0.927817217277+0.900935388796j)*o*x_ref[1]**(o-1)+((-0.413306842525-0.0111550985561j))
+        arg[1,]=(-0.0267430024165+0.226612529173j)*x[0]**o+((0.996995355905+0.566724823408j))*x[0]+((0.284650691797+0.636171417202j))*x[1]**o+((0.396011323215-0.0642112729336j))*x[1]
+        ref[1, 0]=(-0.0267430024165+0.226612529173j)*o*x_ref[0]**(o-1)+((0.996995355905+0.566724823408j))
+        ref[1, 1]=(0.284650691797+0.636171417202j)*o*x_ref[1]**(o-1)+((0.396011323215-0.0642112729336j))
+        arg[2,]=(0.600382983688-0.735090915201j)*x[0]**o+((-0.200399066922+0.0515061388099j))*x[0]+((0.298224271085-0.0126732540395j))*x[1]**o+((0.798936187544-0.849779722782j))*x[1]
+        ref[2, 0]=(0.600382983688-0.735090915201j)*o*x_ref[0]**(o-1)+((-0.200399066922+0.0515061388099j))
+        ref[2, 1]=(0.298224271085-0.0126732540395j)*o*x_ref[1]**(o-1)+((0.798936187544-0.849779722782j))
+        if dim==3:
+            arg[0,]+=(0.256189769845-0.647186831051j)*x[2]**o+((0.565337316328+0.551049965614j))*x[2]
+            ref[0, 2]=(0.256189769845-0.647186831051j)*o*x_ref[2]**(o-1)+((0.565337316328+0.551049965614j))
+            arg[1,]+=(-0.91220261976-0.25253374754j)*x[2]**o+((0.977572814842-0.565532787995j))*x[2]
+            ref[1, 2]=(-0.91220261976-0.25253374754j)*o*x_ref[2]**(o-1)+((0.977572814842-0.565532787995j))
+            arg[2,]+=(0.512151229221+0.636110912236j)*x[2]**o+((-0.391990374141-0.529386298948j))*x[2]
+            ref[2, 2]=(0.512151229221+0.636110912236j)*o*x_ref[2]**(o-1)+((-0.391990374141-0.529386298948j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4)+(dim,),w_ref)
+        arg[0, 0]=(0.779713050886+0.353588714648j)*x[0]**o+((0.238176280855-0.115561344345j))*x[0]+((-0.341688113148+0.756720050213j))*x[1]**o+((0.0181241804676+0.759686212105j))*x[1]
+        ref[0, 0, 0]=(0.779713050886+0.353588714648j)*o*x_ref[0]**(o-1)+((0.238176280855-0.115561344345j))
+        ref[0, 0, 1]=(-0.341688113148+0.756720050213j)*o*x_ref[1]**(o-1)+((0.0181241804676+0.759686212105j))
+        arg[0, 1]=(0.580408292769+0.906287128704j)*x[0]**o+((-0.675510483364+0.67693227944j))*x[0]+((0.427263353603+0.758154981303j))*x[1]**o+((-0.0746437332086+0.079508987041j))*x[1]
+        ref[0, 1, 0]=(0.580408292769+0.906287128704j)*o*x_ref[0]**(o-1)+((-0.675510483364+0.67693227944j))
+        ref[0, 1, 1]=(0.427263353603+0.758154981303j)*o*x_ref[1]**(o-1)+((-0.0746437332086+0.079508987041j))
+        arg[0, 2]=(0.00907875823076+0.188695347676j)*x[0]**o+((-0.373306539337-0.376801845715j))*x[0]+((-0.99369319597+0.870124507041j))*x[1]**o+((-0.581865430634+0.558141747916j))*x[1]
+        ref[0, 2, 0]=(0.00907875823076+0.188695347676j)*o*x_ref[0]**(o-1)+((-0.373306539337-0.376801845715j))
+        ref[0, 2, 1]=(-0.99369319597+0.870124507041j)*o*x_ref[1]**(o-1)+((-0.581865430634+0.558141747916j))
+        arg[0, 3]=(-0.692645646517-0.320378388597j)*x[0]**o+((-0.899660342587-0.940709650131j))*x[0]+((-0.750113455841+0.544192378163j))*x[1]**o+((0.134931209894-0.262608307782j))*x[1]
+        ref[0, 3, 0]=(-0.692645646517-0.320378388597j)*o*x_ref[0]**(o-1)+((-0.899660342587-0.940709650131j))
+        ref[0, 3, 1]=(-0.750113455841+0.544192378163j)*o*x_ref[1]**(o-1)+((0.134931209894-0.262608307782j))
+        arg[1, 0]=(0.294941864324-0.697239316883j)*x[0]**o+((-0.97732119856+0.101380146802j))*x[0]+((-0.368786282866-0.446772739398j))*x[1]**o+((-0.023245143629+0.321584686436j))*x[1]
+        ref[1, 0, 0]=(0.294941864324-0.697239316883j)*o*x_ref[0]**(o-1)+((-0.97732119856+0.101380146802j))
+        ref[1, 0, 1]=(-0.368786282866-0.446772739398j)*o*x_ref[1]**(o-1)+((-0.023245143629+0.321584686436j))
+        arg[1, 1]=(-0.61026003734-0.162517061936j)*x[0]**o+((-0.696904668117-0.0176171626574j))*x[0]+((-0.182840289236+0.194229404458j))*x[1]**o+((-0.823958552908+0.363264372971j))*x[1]
+        ref[1, 1, 0]=(-0.61026003734-0.162517061936j)*o*x_ref[0]**(o-1)+((-0.696904668117-0.0176171626574j))
+        ref[1, 1, 1]=(-0.182840289236+0.194229404458j)*o*x_ref[1]**(o-1)+((-0.823958552908+0.363264372971j))
+        arg[1, 2]=(-0.186876099773-0.509575297418j)*x[0]**o+((-0.664334850297+0.810466038513j))*x[0]+((-0.742516502572-0.914519350796j))*x[1]**o+((0.00270805717601-0.841804377088j))*x[1]
+        ref[1, 2, 0]=(-0.186876099773-0.509575297418j)*o*x_ref[0]**(o-1)+((-0.664334850297+0.810466038513j))
+        ref[1, 2, 1]=(-0.742516502572-0.914519350796j)*o*x_ref[1]**(o-1)+((0.00270805717601-0.841804377088j))
+        arg[1, 3]=(-0.263307220221-0.0701119226344j)*x[0]**o+((0.193810257204-0.766725373051j))*x[0]+((0.156665482892-0.70241431776j))*x[1]**o+((0.678941628524+0.209604621653j))*x[1]
+        ref[1, 3, 0]=(-0.263307220221-0.0701119226344j)*o*x_ref[0]**(o-1)+((0.193810257204-0.766725373051j))
+        ref[1, 3, 1]=(0.156665482892-0.70241431776j)*o*x_ref[1]**(o-1)+((0.678941628524+0.209604621653j))
+        if dim==3:
+            arg[0, 0]+=(-0.646345092724-0.96064449017j)*x[2]**o+((-0.408790691407-0.0978933880844j))*x[2]
+            ref[0, 0, 2]=(-0.646345092724-0.96064449017j)*o*x_ref[2]**(o-1)+((-0.408790691407-0.0978933880844j))
+            arg[0, 1]+=(0.900558375104+0.516080513446j)*x[2]**o+((-0.301268365389-0.276896731322j))*x[2]
+            ref[0, 1, 2]=(0.900558375104+0.516080513446j)*o*x_ref[2]**(o-1)+((-0.301268365389-0.276896731322j))
+            arg[0, 2]+=(-0.301743923478+0.837118589085j)*x[2]**o+((-0.344981231414+0.629707368919j))*x[2]
+            ref[0, 2, 2]=(-0.301743923478+0.837118589085j)*o*x_ref[2]**(o-1)+((-0.344981231414+0.629707368919j))
+            arg[0, 3]+=(-0.83668254128+0.475580276889j)*x[2]**o+((-0.949548561142-0.592040354227j))*x[2]
+            ref[0, 3, 2]=(-0.83668254128+0.475580276889j)*o*x_ref[2]**(o-1)+((-0.949548561142-0.592040354227j))
+            arg[1, 0]+=(0.25160208599+0.434309370198j)*x[2]**o+((-0.82376800272+0.867422487403j))*x[2]
+            ref[1, 0, 2]=(0.25160208599+0.434309370198j)*o*x_ref[2]**(o-1)+((-0.82376800272+0.867422487403j))
+            arg[1, 1]+=(0.764460869857+0.551153332782j)*x[2]**o+((0.559711106167-0.582727789957j))*x[2]
+            ref[1, 1, 2]=(0.764460869857+0.551153332782j)*o*x_ref[2]**(o-1)+((0.559711106167-0.582727789957j))
+            arg[1, 2]+=(0.117039112936+0.776931610384j)*x[2]**o+((0.550092910839-0.0499970427032j))*x[2]
+            ref[1, 2, 2]=(0.117039112936+0.776931610384j)*o*x_ref[2]**(o-1)+((0.550092910839-0.0499970427032j))
+            arg[1, 3]+=(-0.457996503427+0.078899735515j)*x[2]**o+((0.0969505845386+0.717806422977j))*x[2]
+            ref[1, 3, 2]=(-0.457996503427+0.078899735515j)*o*x_ref[2]**(o-1)+((0.0969505845386+0.717806422977j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.89658140296-0.0421447740344j)*x[0]**o+((0.326575039049+0.354378363237j))*x[0]+((-0.608993198585-0.827357506951j))*x[1]**o+((-0.968155311355-0.736336469778j))*x[1]
+        ref[0, 0, 0, 0]=(0.89658140296-0.0421447740344j)*o*x_ref[0]**(o-1)+((0.326575039049+0.354378363237j))
+        ref[0, 0, 0, 1]=(-0.608993198585-0.827357506951j)*o*x_ref[1]**(o-1)+((-0.968155311355-0.736336469778j))
+        arg[0, 0, 1]=(-0.527791981472-0.562600472895j)*x[0]**o+((-0.405905515739+0.184294681661j))*x[0]+((0.590102555044+0.96185076837j))*x[1]**o+((-0.822542250091+0.263665208234j))*x[1]
+        ref[0, 0, 1, 0]=(-0.527791981472-0.562600472895j)*o*x_ref[0]**(o-1)+((-0.405905515739+0.184294681661j))
+        ref[0, 0, 1, 1]=(0.590102555044+0.96185076837j)*o*x_ref[1]**(o-1)+((-0.822542250091+0.263665208234j))
+        arg[0, 0, 2]=(0.304582835523-0.577151407715j)*x[0]**o+((-0.383821043989-0.415725509j))*x[0]+((-0.712058385229-0.842089892364j))*x[1]**o+((-0.585607271266-0.180921890807j))*x[1]
+        ref[0, 0, 2, 0]=(0.304582835523-0.577151407715j)*o*x_ref[0]**(o-1)+((-0.383821043989-0.415725509j))
+        ref[0, 0, 2, 1]=(-0.712058385229-0.842089892364j)*o*x_ref[1]**(o-1)+((-0.585607271266-0.180921890807j))
+        arg[0, 0, 3]=(-0.833609191197+0.393821112745j)*x[0]**o+((0.191689915065-0.994966147692j))*x[0]+((0.175168891557-0.321892159145j))*x[1]**o+((-0.722351727152+0.670974326565j))*x[1]
+        ref[0, 0, 3, 0]=(-0.833609191197+0.393821112745j)*o*x_ref[0]**(o-1)+((0.191689915065-0.994966147692j))
+        ref[0, 0, 3, 1]=(0.175168891557-0.321892159145j)*o*x_ref[1]**(o-1)+((-0.722351727152+0.670974326565j))
+        arg[0, 1, 0]=(-0.0666053958709+0.514098013931j)*x[0]**o+((-0.599947294436+0.327727230212j))*x[0]+((-0.28208846841-0.152688108799j))*x[1]**o+((0.297720914939+0.687997439477j))*x[1]
+        ref[0, 1, 0, 0]=(-0.0666053958709+0.514098013931j)*o*x_ref[0]**(o-1)+((-0.599947294436+0.327727230212j))
+        ref[0, 1, 0, 1]=(-0.28208846841-0.152688108799j)*o*x_ref[1]**(o-1)+((0.297720914939+0.687997439477j))
+        arg[0, 1, 1]=(0.852868911611-0.739862952512j)*x[0]**o+((-0.770259791067-0.661695158072j))*x[0]+((0.604880665799+0.321922807397j))*x[1]**o+((-0.0507807829452+0.955260479577j))*x[1]
+        ref[0, 1, 1, 0]=(0.852868911611-0.739862952512j)*o*x_ref[0]**(o-1)+((-0.770259791067-0.661695158072j))
+        ref[0, 1, 1, 1]=(0.604880665799+0.321922807397j)*o*x_ref[1]**(o-1)+((-0.0507807829452+0.955260479577j))
+        arg[0, 1, 2]=(-0.10681308389-0.946584375226j)*x[0]**o+((0.387450683477+0.0685461336249j))*x[0]+((-0.622241205641-0.624568468939j))*x[1]**o+((0.475759144532+0.554482253164j))*x[1]
+        ref[0, 1, 2, 0]=(-0.10681308389-0.946584375226j)*o*x_ref[0]**(o-1)+((0.387450683477+0.0685461336249j))
+        ref[0, 1, 2, 1]=(-0.622241205641-0.624568468939j)*o*x_ref[1]**(o-1)+((0.475759144532+0.554482253164j))
+        arg[0, 1, 3]=(0.852576815381-0.664960396095j)*x[0]**o+((-0.25523261867-0.689841645449j))*x[0]+((-0.510673760873+0.98066823349j))*x[1]**o+((0.838305175405-0.896335163121j))*x[1]
+        ref[0, 1, 3, 0]=(0.852576815381-0.664960396095j)*o*x_ref[0]**(o-1)+((-0.25523261867-0.689841645449j))
+        ref[0, 1, 3, 1]=(-0.510673760873+0.98066823349j)*o*x_ref[1]**(o-1)+((0.838305175405-0.896335163121j))
+        arg[0, 2, 0]=(-0.231488562057-0.586380477929j)*x[0]**o+((-0.572526291549+0.45991387448j))*x[0]+((0.579556123276+0.39864289252j))*x[1]**o+((0.697048658249+0.400035127479j))*x[1]
+        ref[0, 2, 0, 0]=(-0.231488562057-0.586380477929j)*o*x_ref[0]**(o-1)+((-0.572526291549+0.45991387448j))
+        ref[0, 2, 0, 1]=(0.579556123276+0.39864289252j)*o*x_ref[1]**(o-1)+((0.697048658249+0.400035127479j))
+        arg[0, 2, 1]=(0.722868688389+0.164167110731j)*x[0]**o+((0.666875110709+0.415924596207j))*x[0]+((0.18518936067-0.55278384103j))*x[1]**o+((0.0469237102467+0.56161646448j))*x[1]
+        ref[0, 2, 1, 0]=(0.722868688389+0.164167110731j)*o*x_ref[0]**(o-1)+((0.666875110709+0.415924596207j))
+        ref[0, 2, 1, 1]=(0.18518936067-0.55278384103j)*o*x_ref[1]**(o-1)+((0.0469237102467+0.56161646448j))
+        arg[0, 2, 2]=(0.155869090606+0.571596470339j)*x[0]**o+((0.46407263496-0.593070193832j))*x[0]+((0.512812371838+0.216812094832j))*x[1]**o+((-0.123894383921-0.505575796601j))*x[1]
+        ref[0, 2, 2, 0]=(0.155869090606+0.571596470339j)*o*x_ref[0]**(o-1)+((0.46407263496-0.593070193832j))
+        ref[0, 2, 2, 1]=(0.512812371838+0.216812094832j)*o*x_ref[1]**(o-1)+((-0.123894383921-0.505575796601j))
+        arg[0, 2, 3]=(-0.772507775367-0.12720916349j)*x[0]**o+((0.68108704591+0.878645008185j))*x[0]+((-0.511439079612+0.0962795354655j))*x[1]**o+((0.145707362154-0.540451684999j))*x[1]
+        ref[0, 2, 3, 0]=(-0.772507775367-0.12720916349j)*o*x_ref[0]**(o-1)+((0.68108704591+0.878645008185j))
+        ref[0, 2, 3, 1]=(-0.511439079612+0.0962795354655j)*o*x_ref[1]**(o-1)+((0.145707362154-0.540451684999j))
+        arg[0, 3, 0]=(0.619798100603+0.371847358141j)*x[0]**o+((0.18478437535-0.828193393221j))*x[0]+((0.201014189975+0.436291493374j))*x[1]**o+((-0.543517081776+0.498421308429j))*x[1]
+        ref[0, 3, 0, 0]=(0.619798100603+0.371847358141j)*o*x_ref[0]**(o-1)+((0.18478437535-0.828193393221j))
+        ref[0, 3, 0, 1]=(0.201014189975+0.436291493374j)*o*x_ref[1]**(o-1)+((-0.543517081776+0.498421308429j))
+        arg[0, 3, 1]=(0.196551093971+0.480382066567j)*x[0]**o+((0.186006542493-0.34487927842j))*x[0]+((-0.123459630964+0.637499036686j))*x[1]**o+((0.502034242724+0.507492501188j))*x[1]
+        ref[0, 3, 1, 0]=(0.196551093971+0.480382066567j)*o*x_ref[0]**(o-1)+((0.186006542493-0.34487927842j))
+        ref[0, 3, 1, 1]=(-0.123459630964+0.637499036686j)*o*x_ref[1]**(o-1)+((0.502034242724+0.507492501188j))
+        arg[0, 3, 2]=(0.290983731479-0.0927867113829j)*x[0]**o+((-0.737397562867+0.145131911546j))*x[0]+((-0.567184781577+0.151293410067j))*x[1]**o+((-0.31509295924+0.117973665664j))*x[1]
+        ref[0, 3, 2, 0]=(0.290983731479-0.0927867113829j)*o*x_ref[0]**(o-1)+((-0.737397562867+0.145131911546j))
+        ref[0, 3, 2, 1]=(-0.567184781577+0.151293410067j)*o*x_ref[1]**(o-1)+((-0.31509295924+0.117973665664j))
+        arg[0, 3, 3]=(0.89110973314-0.836919201627j)*x[0]**o+((-0.605674369948-0.0729219175644j))*x[0]+((0.808120913058-0.681607398321j))*x[1]**o+((0.815193305573+0.72503028326j))*x[1]
+        ref[0, 3, 3, 0]=(0.89110973314-0.836919201627j)*o*x_ref[0]**(o-1)+((-0.605674369948-0.0729219175644j))
+        ref[0, 3, 3, 1]=(0.808120913058-0.681607398321j)*o*x_ref[1]**(o-1)+((0.815193305573+0.72503028326j))
+        arg[1, 0, 0]=(0.0358979500807+0.380387254275j)*x[0]**o+((0.436813275994+0.43115644879j))*x[0]+((-0.698270531091+0.850512344848j))*x[1]**o+((-0.274390586475-0.224278835564j))*x[1]
+        ref[1, 0, 0, 0]=(0.0358979500807+0.380387254275j)*o*x_ref[0]**(o-1)+((0.436813275994+0.43115644879j))
+        ref[1, 0, 0, 1]=(-0.698270531091+0.850512344848j)*o*x_ref[1]**(o-1)+((-0.274390586475-0.224278835564j))
+        arg[1, 0, 1]=(-0.695885247732-0.178252176209j)*x[0]**o+((0.363972207325-0.441415029739j))*x[0]+((0.631184566721+0.366499790914j))*x[1]**o+((-0.953834697107+0.0780642492001j))*x[1]
+        ref[1, 0, 1, 0]=(-0.695885247732-0.178252176209j)*o*x_ref[0]**(o-1)+((0.363972207325-0.441415029739j))
+        ref[1, 0, 1, 1]=(0.631184566721+0.366499790914j)*o*x_ref[1]**(o-1)+((-0.953834697107+0.0780642492001j))
+        arg[1, 0, 2]=(-0.0810682790028-0.43000433724j)*x[0]**o+((-0.399539445724-0.681476550195j))*x[0]+((0.169859208762-0.272896289563j))*x[1]**o+((0.810848902398+0.434062940986j))*x[1]
+        ref[1, 0, 2, 0]=(-0.0810682790028-0.43000433724j)*o*x_ref[0]**(o-1)+((-0.399539445724-0.681476550195j))
+        ref[1, 0, 2, 1]=(0.169859208762-0.272896289563j)*o*x_ref[1]**(o-1)+((0.810848902398+0.434062940986j))
+        arg[1, 0, 3]=(0.865806531632-0.0420463801021j)*x[0]**o+((-0.221747860401+0.210534635693j))*x[0]+((-0.42167590465+0.964836534307j))*x[1]**o+((0.909782979995+0.89418751176j))*x[1]
+        ref[1, 0, 3, 0]=(0.865806531632-0.0420463801021j)*o*x_ref[0]**(o-1)+((-0.221747860401+0.210534635693j))
+        ref[1, 0, 3, 1]=(-0.42167590465+0.964836534307j)*o*x_ref[1]**(o-1)+((0.909782979995+0.89418751176j))
+        arg[1, 1, 0]=(0.225036841404-0.900147199976j)*x[0]**o+((0.600835168088+0.444228361036j))*x[0]+((0.512598372175+0.19415503316j))*x[1]**o+((0.525856705598-0.306513737713j))*x[1]
+        ref[1, 1, 0, 0]=(0.225036841404-0.900147199976j)*o*x_ref[0]**(o-1)+((0.600835168088+0.444228361036j))
+        ref[1, 1, 0, 1]=(0.512598372175+0.19415503316j)*o*x_ref[1]**(o-1)+((0.525856705598-0.306513737713j))
+        arg[1, 1, 1]=(-0.422339014006-0.814599177852j)*x[0]**o+((-0.233508484333+0.729203959133j))*x[0]+((-0.599484404943+0.0408907497162j))*x[1]**o+((0.0991589413896+0.324929301335j))*x[1]
+        ref[1, 1, 1, 0]=(-0.422339014006-0.814599177852j)*o*x_ref[0]**(o-1)+((-0.233508484333+0.729203959133j))
+        ref[1, 1, 1, 1]=(-0.599484404943+0.0408907497162j)*o*x_ref[1]**(o-1)+((0.0991589413896+0.324929301335j))
+        arg[1, 1, 2]=(-0.654113557564-0.141300626991j)*x[0]**o+((-0.0288309758811-0.442254578609j))*x[0]+((0.513061069543-0.821437022541j))*x[1]**o+((-0.634157735292-0.169397872671j))*x[1]
+        ref[1, 1, 2, 0]=(-0.654113557564-0.141300626991j)*o*x_ref[0]**(o-1)+((-0.0288309758811-0.442254578609j))
+        ref[1, 1, 2, 1]=(0.513061069543-0.821437022541j)*o*x_ref[1]**(o-1)+((-0.634157735292-0.169397872671j))
+        arg[1, 1, 3]=(-0.126628225671+0.852506367479j)*x[0]**o+((-0.0984281715229-0.308577642013j))*x[0]+((0.506928822549+0.729276199053j))*x[1]**o+((0.755931131244-0.644568525719j))*x[1]
+        ref[1, 1, 3, 0]=(-0.126628225671+0.852506367479j)*o*x_ref[0]**(o-1)+((-0.0984281715229-0.308577642013j))
+        ref[1, 1, 3, 1]=(0.506928822549+0.729276199053j)*o*x_ref[1]**(o-1)+((0.755931131244-0.644568525719j))
+        arg[1, 2, 0]=(-0.263862581946-0.930137826127j)*x[0]**o+((0.501693203707+0.876421741473j))*x[0]+((-0.326390450767-0.114412416844j))*x[1]**o+((-0.770599894895-0.297899938871j))*x[1]
+        ref[1, 2, 0, 0]=(-0.263862581946-0.930137826127j)*o*x_ref[0]**(o-1)+((0.501693203707+0.876421741473j))
+        ref[1, 2, 0, 1]=(-0.326390450767-0.114412416844j)*o*x_ref[1]**(o-1)+((-0.770599894895-0.297899938871j))
+        arg[1, 2, 1]=(0.860424742312-0.106820332406j)*x[0]**o+((0.219368481331+0.508638623212j))*x[0]+((0.417945790113-0.814536393136j))*x[1]**o+((-0.489360643455+0.690554465431j))*x[1]
+        ref[1, 2, 1, 0]=(0.860424742312-0.106820332406j)*o*x_ref[0]**(o-1)+((0.219368481331+0.508638623212j))
+        ref[1, 2, 1, 1]=(0.417945790113-0.814536393136j)*o*x_ref[1]**(o-1)+((-0.489360643455+0.690554465431j))
+        arg[1, 2, 2]=(0.327260568372+0.431032616004j)*x[0]**o+((-0.455951612535+0.487449625456j))*x[0]+((0.244374706518+0.429993234898j))*x[1]**o+((-0.04449678993-0.658900864063j))*x[1]
+        ref[1, 2, 2, 0]=(0.327260568372+0.431032616004j)*o*x_ref[0]**(o-1)+((-0.455951612535+0.487449625456j))
+        ref[1, 2, 2, 1]=(0.244374706518+0.429993234898j)*o*x_ref[1]**(o-1)+((-0.04449678993-0.658900864063j))
+        arg[1, 2, 3]=(-0.0662836632496-0.308225277686j)*x[0]**o+((-0.372777476575-0.154722753667j))*x[0]+((-0.480118265427+0.680353361977j))*x[1]**o+((-0.0961934484411-0.520850603515j))*x[1]
+        ref[1, 2, 3, 0]=(-0.0662836632496-0.308225277686j)*o*x_ref[0]**(o-1)+((-0.372777476575-0.154722753667j))
+        ref[1, 2, 3, 1]=(-0.480118265427+0.680353361977j)*o*x_ref[1]**(o-1)+((-0.0961934484411-0.520850603515j))
+        arg[1, 3, 0]=(0.719670605329+0.497103922192j)*x[0]**o+((0.541054855547-0.226257061848j))*x[0]+((-0.505788109323-0.87857192147j))*x[1]**o+((0.337097188715+0.751432863868j))*x[1]
+        ref[1, 3, 0, 0]=(0.719670605329+0.497103922192j)*o*x_ref[0]**(o-1)+((0.541054855547-0.226257061848j))
+        ref[1, 3, 0, 1]=(-0.505788109323-0.87857192147j)*o*x_ref[1]**(o-1)+((0.337097188715+0.751432863868j))
+        arg[1, 3, 1]=(0.317604135845+0.776112582915j)*x[0]**o+((0.443725353306-0.65289757484j))*x[0]+((0.367686851983-0.446428206936j))*x[1]**o+((-0.8178058788-0.960822372876j))*x[1]
+        ref[1, 3, 1, 0]=(0.317604135845+0.776112582915j)*o*x_ref[0]**(o-1)+((0.443725353306-0.65289757484j))
+        ref[1, 3, 1, 1]=(0.367686851983-0.446428206936j)*o*x_ref[1]**(o-1)+((-0.8178058788-0.960822372876j))
+        arg[1, 3, 2]=(0.627121297877-0.486279739737j)*x[0]**o+((0.843325601253-0.18474610421j))*x[0]+((0.206862366631-0.139238213403j))*x[1]**o+((0.763692769205+0.398027387844j))*x[1]
+        ref[1, 3, 2, 0]=(0.627121297877-0.486279739737j)*o*x_ref[0]**(o-1)+((0.843325601253-0.18474610421j))
+        ref[1, 3, 2, 1]=(0.206862366631-0.139238213403j)*o*x_ref[1]**(o-1)+((0.763692769205+0.398027387844j))
+        arg[1, 3, 3]=(0.913920564082+0.0216808317683j)*x[0]**o+((-0.944107720681+0.227221085967j))*x[0]+((-0.218444621204-0.0877541458011j))*x[1]**o+((0.552396804964+0.343631616879j))*x[1]
+        ref[1, 3, 3, 0]=(0.913920564082+0.0216808317683j)*o*x_ref[0]**(o-1)+((-0.944107720681+0.227221085967j))
+        ref[1, 3, 3, 1]=(-0.218444621204-0.0877541458011j)*o*x_ref[1]**(o-1)+((0.552396804964+0.343631616879j))
+        arg[2, 0, 0]=(-0.467469685142-0.898122509022j)*x[0]**o+((0.730011483745-0.832874359702j))*x[0]+((0.181679584924+0.108943082902j))*x[1]**o+((0.362041698305-0.288673058763j))*x[1]
+        ref[2, 0, 0, 0]=(-0.467469685142-0.898122509022j)*o*x_ref[0]**(o-1)+((0.730011483745-0.832874359702j))
+        ref[2, 0, 0, 1]=(0.181679584924+0.108943082902j)*o*x_ref[1]**(o-1)+((0.362041698305-0.288673058763j))
+        arg[2, 0, 1]=(-0.585264600687+0.615752985698j)*x[0]**o+((-0.14013449906+0.889099609496j))*x[0]+((-0.036325351586+0.221075137624j))*x[1]**o+((0.729812577962+0.686114081165j))*x[1]
+        ref[2, 0, 1, 0]=(-0.585264600687+0.615752985698j)*o*x_ref[0]**(o-1)+((-0.14013449906+0.889099609496j))
+        ref[2, 0, 1, 1]=(-0.036325351586+0.221075137624j)*o*x_ref[1]**(o-1)+((0.729812577962+0.686114081165j))
+        arg[2, 0, 2]=(0.254488937108+0.453583816175j)*x[0]**o+((-0.935926296837-0.761081647001j))*x[0]+((0.593130147367+0.908460705455j))*x[1]**o+((0.0884757830279+0.702800690062j))*x[1]
+        ref[2, 0, 2, 0]=(0.254488937108+0.453583816175j)*o*x_ref[0]**(o-1)+((-0.935926296837-0.761081647001j))
+        ref[2, 0, 2, 1]=(0.593130147367+0.908460705455j)*o*x_ref[1]**(o-1)+((0.0884757830279+0.702800690062j))
+        arg[2, 0, 3]=(0.193378740807+0.419665083781j)*x[0]**o+((-0.500897565529+0.746137535191j))*x[0]+((-0.636997165374-0.416678553992j))*x[1]**o+((-0.433168595271-0.014303586627j))*x[1]
+        ref[2, 0, 3, 0]=(0.193378740807+0.419665083781j)*o*x_ref[0]**(o-1)+((-0.500897565529+0.746137535191j))
+        ref[2, 0, 3, 1]=(-0.636997165374-0.416678553992j)*o*x_ref[1]**(o-1)+((-0.433168595271-0.014303586627j))
+        arg[2, 1, 0]=(0.21149180203-0.95268710409j)*x[0]**o+((0.425407243029-0.943757149395j))*x[0]+((-0.142472040932+0.236643673127j))*x[1]**o+((-0.980656130529+0.329723976088j))*x[1]
+        ref[2, 1, 0, 0]=(0.21149180203-0.95268710409j)*o*x_ref[0]**(o-1)+((0.425407243029-0.943757149395j))
+        ref[2, 1, 0, 1]=(-0.142472040932+0.236643673127j)*o*x_ref[1]**(o-1)+((-0.980656130529+0.329723976088j))
+        arg[2, 1, 1]=(0.361668423572-0.378220909483j)*x[0]**o+((-0.212507223588+0.940631196292j))*x[0]+((-0.0789585984449-0.84650741488j))*x[1]**o+((0.562786065779-0.476597515228j))*x[1]
+        ref[2, 1, 1, 0]=(0.361668423572-0.378220909483j)*o*x_ref[0]**(o-1)+((-0.212507223588+0.940631196292j))
+        ref[2, 1, 1, 1]=(-0.0789585984449-0.84650741488j)*o*x_ref[1]**(o-1)+((0.562786065779-0.476597515228j))
+        arg[2, 1, 2]=(-0.362403824564+0.597511578172j)*x[0]**o+((0.119573818485+0.772377122127j))*x[0]+((-0.683206537725+0.744210094338j))*x[1]**o+((-0.835832612321-0.129857225158j))*x[1]
+        ref[2, 1, 2, 0]=(-0.362403824564+0.597511578172j)*o*x_ref[0]**(o-1)+((0.119573818485+0.772377122127j))
+        ref[2, 1, 2, 1]=(-0.683206537725+0.744210094338j)*o*x_ref[1]**(o-1)+((-0.835832612321-0.129857225158j))
+        arg[2, 1, 3]=(0.376732260841+0.47720526704j)*x[0]**o+((-0.655959734845+0.0239351024166j))*x[0]+((0.135929069494-0.733981990819j))*x[1]**o+((0.00772286608938+0.639134116283j))*x[1]
+        ref[2, 1, 3, 0]=(0.376732260841+0.47720526704j)*o*x_ref[0]**(o-1)+((-0.655959734845+0.0239351024166j))
+        ref[2, 1, 3, 1]=(0.135929069494-0.733981990819j)*o*x_ref[1]**(o-1)+((0.00772286608938+0.639134116283j))
+        arg[2, 2, 0]=(0.409494146535-0.437976018088j)*x[0]**o+((0.942335845122-0.567610953611j))*x[0]+((0.117110977458+0.0331747243035j))*x[1]**o+((-0.0274032808154-0.59074538971j))*x[1]
+        ref[2, 2, 0, 0]=(0.409494146535-0.437976018088j)*o*x_ref[0]**(o-1)+((0.942335845122-0.567610953611j))
+        ref[2, 2, 0, 1]=(0.117110977458+0.0331747243035j)*o*x_ref[1]**(o-1)+((-0.0274032808154-0.59074538971j))
+        arg[2, 2, 1]=(-0.348850943198-0.604467535229j)*x[0]**o+((-0.831342741216+0.443162900379j))*x[0]+((-0.445220904025-0.0198633428151j))*x[1]**o+((-0.0397857626084+0.448037825689j))*x[1]
+        ref[2, 2, 1, 0]=(-0.348850943198-0.604467535229j)*o*x_ref[0]**(o-1)+((-0.831342741216+0.443162900379j))
+        ref[2, 2, 1, 1]=(-0.445220904025-0.0198633428151j)*o*x_ref[1]**(o-1)+((-0.0397857626084+0.448037825689j))
+        arg[2, 2, 2]=(-0.705019004607-0.472598403462j)*x[0]**o+((-0.682089146326-0.882062764639j))*x[0]+((-0.00980307511769-0.645970426123j))*x[1]**o+((-0.140479800972+0.102966331454j))*x[1]
+        ref[2, 2, 2, 0]=(-0.705019004607-0.472598403462j)*o*x_ref[0]**(o-1)+((-0.682089146326-0.882062764639j))
+        ref[2, 2, 2, 1]=(-0.00980307511769-0.645970426123j)*o*x_ref[1]**(o-1)+((-0.140479800972+0.102966331454j))
+        arg[2, 2, 3]=(-0.883378634418-0.961843503746j)*x[0]**o+((-0.611475060498+0.451572167622j))*x[0]+((0.067193322377+0.588061501263j))*x[1]**o+((-0.734943219811+0.889446475374j))*x[1]
+        ref[2, 2, 3, 0]=(-0.883378634418-0.961843503746j)*o*x_ref[0]**(o-1)+((-0.611475060498+0.451572167622j))
+        ref[2, 2, 3, 1]=(0.067193322377+0.588061501263j)*o*x_ref[1]**(o-1)+((-0.734943219811+0.889446475374j))
+        arg[2, 3, 0]=(0.0804349192393-0.660547763355j)*x[0]**o+((-0.350298068937-0.173171642207j))*x[0]+((-0.420866129125+0.888411960174j))*x[1]**o+((-0.293328680612-0.468816368194j))*x[1]
+        ref[2, 3, 0, 0]=(0.0804349192393-0.660547763355j)*o*x_ref[0]**(o-1)+((-0.350298068937-0.173171642207j))
+        ref[2, 3, 0, 1]=(-0.420866129125+0.888411960174j)*o*x_ref[1]**(o-1)+((-0.293328680612-0.468816368194j))
+        arg[2, 3, 1]=(-0.406166252938-0.763801656158j)*x[0]**o+((-0.304881990566-0.615934187178j))*x[0]+((0.157553735649+0.984538080804j))*x[1]**o+((-0.314434087118-0.55304036608j))*x[1]
+        ref[2, 3, 1, 0]=(-0.406166252938-0.763801656158j)*o*x_ref[0]**(o-1)+((-0.304881990566-0.615934187178j))
+        ref[2, 3, 1, 1]=(0.157553735649+0.984538080804j)*o*x_ref[1]**(o-1)+((-0.314434087118-0.55304036608j))
+        arg[2, 3, 2]=(0.426732432471+0.696063637205j)*x[0]**o+((0.568437785891-0.370710603701j))*x[0]+((0.289281105857+0.970477434692j))*x[1]**o+((0.501812645719+0.384173199517j))*x[1]
+        ref[2, 3, 2, 0]=(0.426732432471+0.696063637205j)*o*x_ref[0]**(o-1)+((0.568437785891-0.370710603701j))
+        ref[2, 3, 2, 1]=(0.289281105857+0.970477434692j)*o*x_ref[1]**(o-1)+((0.501812645719+0.384173199517j))
+        arg[2, 3, 3]=(0.345939433973-0.0858099190427j)*x[0]**o+((0.808562195062+0.199456284686j))*x[0]+((0.464119932595-0.657006018454j))*x[1]**o+((0.0895365659243+0.584512561404j))*x[1]
+        ref[2, 3, 3, 0]=(0.345939433973-0.0858099190427j)*o*x_ref[0]**(o-1)+((0.808562195062+0.199456284686j))
+        ref[2, 3, 3, 1]=(0.464119932595-0.657006018454j)*o*x_ref[1]**(o-1)+((0.0895365659243+0.584512561404j))
+        arg[3, 0, 0]=(0.44001374657-0.357407782819j)*x[0]**o+((0.821790552758+0.604349818322j))*x[0]+((0.981759623161-0.865281092042j))*x[1]**o+((-0.487400635636-0.785615875322j))*x[1]
+        ref[3, 0, 0, 0]=(0.44001374657-0.357407782819j)*o*x_ref[0]**(o-1)+((0.821790552758+0.604349818322j))
+        ref[3, 0, 0, 1]=(0.981759623161-0.865281092042j)*o*x_ref[1]**(o-1)+((-0.487400635636-0.785615875322j))
+        arg[3, 0, 1]=(0.66821095979+0.432534402464j)*x[0]**o+((-0.218144100822+0.634661685075j))*x[0]+((-0.730473618608-0.985748153948j))*x[1]**o+((0.0793271033202+0.767623155049j))*x[1]
+        ref[3, 0, 1, 0]=(0.66821095979+0.432534402464j)*o*x_ref[0]**(o-1)+((-0.218144100822+0.634661685075j))
+        ref[3, 0, 1, 1]=(-0.730473618608-0.985748153948j)*o*x_ref[1]**(o-1)+((0.0793271033202+0.767623155049j))
+        arg[3, 0, 2]=(-0.27985567163-0.580678039404j)*x[0]**o+((0.0229086775965-0.584065140308j))*x[0]+((0.277295603443-0.854471013245j))*x[1]**o+((-0.890175227633-0.976516471502j))*x[1]
+        ref[3, 0, 2, 0]=(-0.27985567163-0.580678039404j)*o*x_ref[0]**(o-1)+((0.0229086775965-0.584065140308j))
+        ref[3, 0, 2, 1]=(0.277295603443-0.854471013245j)*o*x_ref[1]**(o-1)+((-0.890175227633-0.976516471502j))
+        arg[3, 0, 3]=(0.967563637186-0.979840637689j)*x[0]**o+((-0.711581679059-0.534514276548j))*x[0]+((-0.291411670465-0.247506430114j))*x[1]**o+((0.579439500525+0.242371272207j))*x[1]
+        ref[3, 0, 3, 0]=(0.967563637186-0.979840637689j)*o*x_ref[0]**(o-1)+((-0.711581679059-0.534514276548j))
+        ref[3, 0, 3, 1]=(-0.291411670465-0.247506430114j)*o*x_ref[1]**(o-1)+((0.579439500525+0.242371272207j))
+        arg[3, 1, 0]=(-0.0466676351644-0.462985552749j)*x[0]**o+((0.116062809942+0.114940607682j))*x[0]+((-0.170638624617-0.873230918179j))*x[1]**o+((-0.748109666055+0.192167944347j))*x[1]
+        ref[3, 1, 0, 0]=(-0.0466676351644-0.462985552749j)*o*x_ref[0]**(o-1)+((0.116062809942+0.114940607682j))
+        ref[3, 1, 0, 1]=(-0.170638624617-0.873230918179j)*o*x_ref[1]**(o-1)+((-0.748109666055+0.192167944347j))
+        arg[3, 1, 1]=(-0.861397878967-0.788778037941j)*x[0]**o+((-0.419191361017+0.507157863865j))*x[0]+((0.190471171149+0.240828185147j))*x[1]**o+((0.186050565547+0.245228763625j))*x[1]
+        ref[3, 1, 1, 0]=(-0.861397878967-0.788778037941j)*o*x_ref[0]**(o-1)+((-0.419191361017+0.507157863865j))
+        ref[3, 1, 1, 1]=(0.190471171149+0.240828185147j)*o*x_ref[1]**(o-1)+((0.186050565547+0.245228763625j))
+        arg[3, 1, 2]=(-0.345468131905+0.833506887833j)*x[0]**o+((-0.73840036236+0.936046456528j))*x[0]+((0.409293738692-0.507331286787j))*x[1]**o+((-0.281216611939+0.0196815282597j))*x[1]
+        ref[3, 1, 2, 0]=(-0.345468131905+0.833506887833j)*o*x_ref[0]**(o-1)+((-0.73840036236+0.936046456528j))
+        ref[3, 1, 2, 1]=(0.409293738692-0.507331286787j)*o*x_ref[1]**(o-1)+((-0.281216611939+0.0196815282597j))
+        arg[3, 1, 3]=(0.322261681266+0.308221014568j)*x[0]**o+((-0.18393795035-0.181086786898j))*x[0]+((-0.779569687274+0.753561412405j))*x[1]**o+((0.911188848908+0.862211594977j))*x[1]
+        ref[3, 1, 3, 0]=(0.322261681266+0.308221014568j)*o*x_ref[0]**(o-1)+((-0.18393795035-0.181086786898j))
+        ref[3, 1, 3, 1]=(-0.779569687274+0.753561412405j)*o*x_ref[1]**(o-1)+((0.911188848908+0.862211594977j))
+        arg[3, 2, 0]=(-0.496629203826+0.39701079924j)*x[0]**o+((0.940787219028+0.979239514799j))*x[0]+((-0.808455147673+0.262855122262j))*x[1]**o+((-0.291349791544-0.775439489339j))*x[1]
+        ref[3, 2, 0, 0]=(-0.496629203826+0.39701079924j)*o*x_ref[0]**(o-1)+((0.940787219028+0.979239514799j))
+        ref[3, 2, 0, 1]=(-0.808455147673+0.262855122262j)*o*x_ref[1]**(o-1)+((-0.291349791544-0.775439489339j))
+        arg[3, 2, 1]=(0.319669414543+0.125234060245j)*x[0]**o+((0.402332400356-0.921712950595j))*x[0]+((-0.492392919435+0.0886651978397j))*x[1]**o+((0.760548126731+0.476918115978j))*x[1]
+        ref[3, 2, 1, 0]=(0.319669414543+0.125234060245j)*o*x_ref[0]**(o-1)+((0.402332400356-0.921712950595j))
+        ref[3, 2, 1, 1]=(-0.492392919435+0.0886651978397j)*o*x_ref[1]**(o-1)+((0.760548126731+0.476918115978j))
+        arg[3, 2, 2]=(0.0605603384169+0.700644609127j)*x[0]**o+((-0.0743695696762+0.141725914997j))*x[0]+((0.356853819201+0.460441913066j))*x[1]**o+((-0.331577243706-0.85020756978j))*x[1]
+        ref[3, 2, 2, 0]=(0.0605603384169+0.700644609127j)*o*x_ref[0]**(o-1)+((-0.0743695696762+0.141725914997j))
+        ref[3, 2, 2, 1]=(0.356853819201+0.460441913066j)*o*x_ref[1]**(o-1)+((-0.331577243706-0.85020756978j))
+        arg[3, 2, 3]=(-0.401686736408-0.0748478129769j)*x[0]**o+((0.843244563102-0.598907950631j))*x[0]+((0.889077837205-0.583439251363j))*x[1]**o+((0.120843272417-0.685098002948j))*x[1]
+        ref[3, 2, 3, 0]=(-0.401686736408-0.0748478129769j)*o*x_ref[0]**(o-1)+((0.843244563102-0.598907950631j))
+        ref[3, 2, 3, 1]=(0.889077837205-0.583439251363j)*o*x_ref[1]**(o-1)+((0.120843272417-0.685098002948j))
+        arg[3, 3, 0]=(-0.69321778257-0.447560736379j)*x[0]**o+((-0.905984427469+0.864411013717j))*x[0]+((0.876537518357-0.419156727844j))*x[1]**o+((0.516618819413+0.356905938822j))*x[1]
+        ref[3, 3, 0, 0]=(-0.69321778257-0.447560736379j)*o*x_ref[0]**(o-1)+((-0.905984427469+0.864411013717j))
+        ref[3, 3, 0, 1]=(0.876537518357-0.419156727844j)*o*x_ref[1]**(o-1)+((0.516618819413+0.356905938822j))
+        arg[3, 3, 1]=(-0.550516540289-0.591533526126j)*x[0]**o+((-0.139395866503-0.980202412463j))*x[0]+((-0.365021249574+0.782104316839j))*x[1]**o+((-0.348942770079-0.00709923810277j))*x[1]
+        ref[3, 3, 1, 0]=(-0.550516540289-0.591533526126j)*o*x_ref[0]**(o-1)+((-0.139395866503-0.980202412463j))
+        ref[3, 3, 1, 1]=(-0.365021249574+0.782104316839j)*o*x_ref[1]**(o-1)+((-0.348942770079-0.00709923810277j))
+        arg[3, 3, 2]=(0.567117047441-0.254635999544j)*x[0]**o+((0.31537876119+0.875962723513j))*x[0]+((0.58367320584-0.602586061219j))*x[1]**o+((0.794045645436-0.859873297881j))*x[1]
+        ref[3, 3, 2, 0]=(0.567117047441-0.254635999544j)*o*x_ref[0]**(o-1)+((0.31537876119+0.875962723513j))
+        ref[3, 3, 2, 1]=(0.58367320584-0.602586061219j)*o*x_ref[1]**(o-1)+((0.794045645436-0.859873297881j))
+        arg[3, 3, 3]=(0.434561074321-0.938083465069j)*x[0]**o+((0.752840872241+0.903603775781j))*x[0]+((0.325835838316-0.0427156240586j))*x[1]**o+((0.979165612713+0.111655709944j))*x[1]
+        ref[3, 3, 3, 0]=(0.434561074321-0.938083465069j)*o*x_ref[0]**(o-1)+((0.752840872241+0.903603775781j))
+        ref[3, 3, 3, 1]=(0.325835838316-0.0427156240586j)*o*x_ref[1]**(o-1)+((0.979165612713+0.111655709944j))
+        if dim==3:
+            arg[0, 0, 0]+=(-0.576554800038+0.760268685682j)*x[2]**o+((0.0454970237874-0.236856597563j))*x[2]
+            ref[0, 0, 0, 2]=(-0.576554800038+0.760268685682j)*o*x_ref[2]**(o-1)+((0.0454970237874-0.236856597563j))
+            arg[0, 0, 1]+=(-0.942425068112+0.918298114464j)*x[2]**o+((0.461251149997-0.737663822922j))*x[2]
+            ref[0, 0, 1, 2]=(-0.942425068112+0.918298114464j)*o*x_ref[2]**(o-1)+((0.461251149997-0.737663822922j))
+            arg[0, 0, 2]+=(0.72181006725-0.473218668238j)*x[2]**o+((-0.566180929085-0.233919437486j))*x[2]
+            ref[0, 0, 2, 2]=(0.72181006725-0.473218668238j)*o*x_ref[2]**(o-1)+((-0.566180929085-0.233919437486j))
+            arg[0, 0, 3]+=(-0.0172782093856-0.950245846457j)*x[2]**o+((0.153831336785-0.491501368549j))*x[2]
+            ref[0, 0, 3, 2]=(-0.0172782093856-0.950245846457j)*o*x_ref[2]**(o-1)+((0.153831336785-0.491501368549j))
+            arg[0, 1, 0]+=(0.382071593016+0.652773921546j)*x[2]**o+((-0.439639490379+0.8482873531j))*x[2]
+            ref[0, 1, 0, 2]=(0.382071593016+0.652773921546j)*o*x_ref[2]**(o-1)+((-0.439639490379+0.8482873531j))
+            arg[0, 1, 1]+=(0.568899142923-0.853140242949j)*x[2]**o+((-0.274792405346-0.275381237341j))*x[2]
+            ref[0, 1, 1, 2]=(0.568899142923-0.853140242949j)*o*x_ref[2]**(o-1)+((-0.274792405346-0.275381237341j))
+            arg[0, 1, 2]+=(0.456939275816-0.293833452349j)*x[2]**o+((0.32117175369+0.942508193353j))*x[2]
+            ref[0, 1, 2, 2]=(0.456939275816-0.293833452349j)*o*x_ref[2]**(o-1)+((0.32117175369+0.942508193353j))
+            arg[0, 1, 3]+=(-0.0295131126558+0.714085532571j)*x[2]**o+((-0.653232064823-0.015714322178j))*x[2]
+            ref[0, 1, 3, 2]=(-0.0295131126558+0.714085532571j)*o*x_ref[2]**(o-1)+((-0.653232064823-0.015714322178j))
+            arg[0, 2, 0]+=(-0.963651696521+0.00907964697542j)*x[2]**o+((-0.639348042816-0.0632632667611j))*x[2]
+            ref[0, 2, 0, 2]=(-0.963651696521+0.00907964697542j)*o*x_ref[2]**(o-1)+((-0.639348042816-0.0632632667611j))
+            arg[0, 2, 1]+=(-0.566285252004+0.868869133408j)*x[2]**o+((0.0814993531451+0.172996896915j))*x[2]
+            ref[0, 2, 1, 2]=(-0.566285252004+0.868869133408j)*o*x_ref[2]**(o-1)+((0.0814993531451+0.172996896915j))
+            arg[0, 2, 2]+=(0.741318095067+0.457004694443j)*x[2]**o+((0.893799302651+0.974663054391j))*x[2]
+            ref[0, 2, 2, 2]=(0.741318095067+0.457004694443j)*o*x_ref[2]**(o-1)+((0.893799302651+0.974663054391j))
+            arg[0, 2, 3]+=(0.545631977286-0.207939484948j)*x[2]**o+((0.626297574458+0.157651954293j))*x[2]
+            ref[0, 2, 3, 2]=(0.545631977286-0.207939484948j)*o*x_ref[2]**(o-1)+((0.626297574458+0.157651954293j))
+            arg[0, 3, 0]+=(0.736023273109+0.509305934094j)*x[2]**o+((-0.835246515412+0.733581209254j))*x[2]
+            ref[0, 3, 0, 2]=(0.736023273109+0.509305934094j)*o*x_ref[2]**(o-1)+((-0.835246515412+0.733581209254j))
+            arg[0, 3, 1]+=(0.212172423293-0.351633788549j)*x[2]**o+((-0.412882273142+0.50068821792j))*x[2]
+            ref[0, 3, 1, 2]=(0.212172423293-0.351633788549j)*o*x_ref[2]**(o-1)+((-0.412882273142+0.50068821792j))
+            arg[0, 3, 2]+=(-0.369495207958-0.970857220903j)*x[2]**o+((0.694723790694+0.104424698866j))*x[2]
+            ref[0, 3, 2, 2]=(-0.369495207958-0.970857220903j)*o*x_ref[2]**(o-1)+((0.694723790694+0.104424698866j))
+            arg[0, 3, 3]+=(-0.510670889947+0.358376747043j)*x[2]**o+((0.168351232419+0.802400972781j))*x[2]
+            ref[0, 3, 3, 2]=(-0.510670889947+0.358376747043j)*o*x_ref[2]**(o-1)+((0.168351232419+0.802400972781j))
+            arg[1, 0, 0]+=(-0.273508729416+0.433656784537j)*x[2]**o+((0.303293355641-0.474052445311j))*x[2]
+            ref[1, 0, 0, 2]=(-0.273508729416+0.433656784537j)*o*x_ref[2]**(o-1)+((0.303293355641-0.474052445311j))
+            arg[1, 0, 1]+=(-0.0836067792287-0.618179133282j)*x[2]**o+((0.450149934193-0.550349853179j))*x[2]
+            ref[1, 0, 1, 2]=(-0.0836067792287-0.618179133282j)*o*x_ref[2]**(o-1)+((0.450149934193-0.550349853179j))
+            arg[1, 0, 2]+=(-0.013545605535+0.138292254177j)*x[2]**o+((0.321764139851+0.187373473559j))*x[2]
+            ref[1, 0, 2, 2]=(-0.013545605535+0.138292254177j)*o*x_ref[2]**(o-1)+((0.321764139851+0.187373473559j))
+            arg[1, 0, 3]+=(0.974013805274-0.509817081362j)*x[2]**o+((-0.455651809011-0.691715372891j))*x[2]
+            ref[1, 0, 3, 2]=(0.974013805274-0.509817081362j)*o*x_ref[2]**(o-1)+((-0.455651809011-0.691715372891j))
+            arg[1, 1, 0]+=(-0.43464085947+0.620630134326j)*x[2]**o+((-0.190249697418+0.181392038801j))*x[2]
+            ref[1, 1, 0, 2]=(-0.43464085947+0.620630134326j)*o*x_ref[2]**(o-1)+((-0.190249697418+0.181392038801j))
+            arg[1, 1, 1]+=(-0.360003116459-0.0971823108049j)*x[2]**o+((0.00404672639388+0.271818147503j))*x[2]
+            ref[1, 1, 1, 2]=(-0.360003116459-0.0971823108049j)*o*x_ref[2]**(o-1)+((0.00404672639388+0.271818147503j))
+            arg[1, 1, 2]+=(0.246588172801+0.22431465349j)*x[2]**o+((-0.432085804015+0.407500017022j))*x[2]
+            ref[1, 1, 2, 2]=(0.246588172801+0.22431465349j)*o*x_ref[2]**(o-1)+((-0.432085804015+0.407500017022j))
+            arg[1, 1, 3]+=(-0.887400717837-0.621724575837j)*x[2]**o+((-0.137250763677+0.776464772321j))*x[2]
+            ref[1, 1, 3, 2]=(-0.887400717837-0.621724575837j)*o*x_ref[2]**(o-1)+((-0.137250763677+0.776464772321j))
+            arg[1, 2, 0]+=(0.579801270586+0.302016924141j)*x[2]**o+((0.926153226926-0.0151689695006j))*x[2]
+            ref[1, 2, 0, 2]=(0.579801270586+0.302016924141j)*o*x_ref[2]**(o-1)+((0.926153226926-0.0151689695006j))
+            arg[1, 2, 1]+=(0.266901119962-0.464047007593j)*x[2]**o+((-0.37461160819+0.994832480767j))*x[2]
+            ref[1, 2, 1, 2]=(0.266901119962-0.464047007593j)*o*x_ref[2]**(o-1)+((-0.37461160819+0.994832480767j))
+            arg[1, 2, 2]+=(0.360512924735+0.990659048384j)*x[2]**o+((-0.914458219671+0.783424064178j))*x[2]
+            ref[1, 2, 2, 2]=(0.360512924735+0.990659048384j)*o*x_ref[2]**(o-1)+((-0.914458219671+0.783424064178j))
+            arg[1, 2, 3]+=(-0.390756543085-0.867287906624j)*x[2]**o+((-0.273461403307+0.395673592947j))*x[2]
+            ref[1, 2, 3, 2]=(-0.390756543085-0.867287906624j)*o*x_ref[2]**(o-1)+((-0.273461403307+0.395673592947j))
+            arg[1, 3, 0]+=(0.760991025027+0.79518090006j)*x[2]**o+((0.308278406371-0.751981081962j))*x[2]
+            ref[1, 3, 0, 2]=(0.760991025027+0.79518090006j)*o*x_ref[2]**(o-1)+((0.308278406371-0.751981081962j))
+            arg[1, 3, 1]+=(0.587597241221+0.771885288978j)*x[2]**o+((-0.0567269481916+0.831923452167j))*x[2]
+            ref[1, 3, 1, 2]=(0.587597241221+0.771885288978j)*o*x_ref[2]**(o-1)+((-0.0567269481916+0.831923452167j))
+            arg[1, 3, 2]+=(-0.951268537674-0.124399411659j)*x[2]**o+((0.494906306747+0.494100425335j))*x[2]
+            ref[1, 3, 2, 2]=(-0.951268537674-0.124399411659j)*o*x_ref[2]**(o-1)+((0.494906306747+0.494100425335j))
+            arg[1, 3, 3]+=(-0.143656167406-0.220403874057j)*x[2]**o+((0.881530948012+0.742302840199j))*x[2]
+            ref[1, 3, 3, 2]=(-0.143656167406-0.220403874057j)*o*x_ref[2]**(o-1)+((0.881530948012+0.742302840199j))
+            arg[2, 0, 0]+=(-0.600399616961-0.812598661987j)*x[2]**o+((0.616642389422+0.571043523747j))*x[2]
+            ref[2, 0, 0, 2]=(-0.600399616961-0.812598661987j)*o*x_ref[2]**(o-1)+((0.616642389422+0.571043523747j))
+            arg[2, 0, 1]+=(-0.418564436291-0.201563402579j)*x[2]**o+((-0.0822665428415+0.807576463805j))*x[2]
+            ref[2, 0, 1, 2]=(-0.418564436291-0.201563402579j)*o*x_ref[2]**(o-1)+((-0.0822665428415+0.807576463805j))
+            arg[2, 0, 2]+=(-0.45898221693+0.0913040681226j)*x[2]**o+((-0.602297034163-0.742269418441j))*x[2]
+            ref[2, 0, 2, 2]=(-0.45898221693+0.0913040681226j)*o*x_ref[2]**(o-1)+((-0.602297034163-0.742269418441j))
+            arg[2, 0, 3]+=(-0.439847395901+0.200238240227j)*x[2]**o+((-0.624550789816+0.446010566643j))*x[2]
+            ref[2, 0, 3, 2]=(-0.439847395901+0.200238240227j)*o*x_ref[2]**(o-1)+((-0.624550789816+0.446010566643j))
+            arg[2, 1, 0]+=(0.636734129683+0.364757538435j)*x[2]**o+((0.165161901065+0.543271332863j))*x[2]
+            ref[2, 1, 0, 2]=(0.636734129683+0.364757538435j)*o*x_ref[2]**(o-1)+((0.165161901065+0.543271332863j))
+            arg[2, 1, 1]+=(0.86457665224+0.73427843993j)*x[2]**o+((0.916895580966+0.0164735864135j))*x[2]
+            ref[2, 1, 1, 2]=(0.86457665224+0.73427843993j)*o*x_ref[2]**(o-1)+((0.916895580966+0.0164735864135j))
+            arg[2, 1, 2]+=(-0.978092913166-0.592060359721j)*x[2]**o+((0.917742409387+0.0149068890041j))*x[2]
+            ref[2, 1, 2, 2]=(-0.978092913166-0.592060359721j)*o*x_ref[2]**(o-1)+((0.917742409387+0.0149068890041j))
+            arg[2, 1, 3]+=(-0.289236233706+0.782014999071j)*x[2]**o+((0.748236988384+0.209368392271j))*x[2]
+            ref[2, 1, 3, 2]=(-0.289236233706+0.782014999071j)*o*x_ref[2]**(o-1)+((0.748236988384+0.209368392271j))
+            arg[2, 2, 0]+=(-0.157963202092+0.199666829602j)*x[2]**o+((-0.730414899279-0.778871024719j))*x[2]
+            ref[2, 2, 0, 2]=(-0.157963202092+0.199666829602j)*o*x_ref[2]**(o-1)+((-0.730414899279-0.778871024719j))
+            arg[2, 2, 1]+=(0.199002460161-0.265832639219j)*x[2]**o+((0.613805856838-0.462576605725j))*x[2]
+            ref[2, 2, 1, 2]=(0.199002460161-0.265832639219j)*o*x_ref[2]**(o-1)+((0.613805856838-0.462576605725j))
+            arg[2, 2, 2]+=(0.648361802569-0.354105672665j)*x[2]**o+((-0.097863285453-0.882017007184j))*x[2]
+            ref[2, 2, 2, 2]=(0.648361802569-0.354105672665j)*o*x_ref[2]**(o-1)+((-0.097863285453-0.882017007184j))
+            arg[2, 2, 3]+=(-0.881458148127+0.2098940498j)*x[2]**o+((-0.220040276868-0.244049687223j))*x[2]
+            ref[2, 2, 3, 2]=(-0.881458148127+0.2098940498j)*o*x_ref[2]**(o-1)+((-0.220040276868-0.244049687223j))
+            arg[2, 3, 0]+=(0.929289791412+0.578041017177j)*x[2]**o+((0.383261188487+0.720628953191j))*x[2]
+            ref[2, 3, 0, 2]=(0.929289791412+0.578041017177j)*o*x_ref[2]**(o-1)+((0.383261188487+0.720628953191j))
+            arg[2, 3, 1]+=(0.708939905096-0.618339602652j)*x[2]**o+((-0.179414315461+0.907029203216j))*x[2]
+            ref[2, 3, 1, 2]=(0.708939905096-0.618339602652j)*o*x_ref[2]**(o-1)+((-0.179414315461+0.907029203216j))
+            arg[2, 3, 2]+=(-0.564615960535+0.801767639024j)*x[2]**o+((0.426492022801-0.420195761572j))*x[2]
+            ref[2, 3, 2, 2]=(-0.564615960535+0.801767639024j)*o*x_ref[2]**(o-1)+((0.426492022801-0.420195761572j))
+            arg[2, 3, 3]+=(0.585351825322+0.406929495047j)*x[2]**o+((-0.56028045222+0.750296519498j))*x[2]
+            ref[2, 3, 3, 2]=(0.585351825322+0.406929495047j)*o*x_ref[2]**(o-1)+((-0.56028045222+0.750296519498j))
+            arg[3, 0, 0]+=(0.842174820303-0.290815765298j)*x[2]**o+((-0.206910086572-0.389083534419j))*x[2]
+            ref[3, 0, 0, 2]=(0.842174820303-0.290815765298j)*o*x_ref[2]**(o-1)+((-0.206910086572-0.389083534419j))
+            arg[3, 0, 1]+=(-0.900023401813-0.727455447025j)*x[2]**o+((0.796969650366-0.378772883694j))*x[2]
+            ref[3, 0, 1, 2]=(-0.900023401813-0.727455447025j)*o*x_ref[2]**(o-1)+((0.796969650366-0.378772883694j))
+            arg[3, 0, 2]+=(-0.868281074495-0.49013436053j)*x[2]**o+((0.643693712482+0.211870994761j))*x[2]
+            ref[3, 0, 2, 2]=(-0.868281074495-0.49013436053j)*o*x_ref[2]**(o-1)+((0.643693712482+0.211870994761j))
+            arg[3, 0, 3]+=(0.603285620721-0.505626277483j)*x[2]**o+((0.399187172395+0.38014766368j))*x[2]
+            ref[3, 0, 3, 2]=(0.603285620721-0.505626277483j)*o*x_ref[2]**(o-1)+((0.399187172395+0.38014766368j))
+            arg[3, 1, 0]+=(0.813141102802+0.774282627709j)*x[2]**o+((-0.965623796639-0.0518692437286j))*x[2]
+            ref[3, 1, 0, 2]=(0.813141102802+0.774282627709j)*o*x_ref[2]**(o-1)+((-0.965623796639-0.0518692437286j))
+            arg[3, 1, 1]+=(-0.668264789933-0.194743432428j)*x[2]**o+((-0.17324410802+0.0608364845972j))*x[2]
+            ref[3, 1, 1, 2]=(-0.668264789933-0.194743432428j)*o*x_ref[2]**(o-1)+((-0.17324410802+0.0608364845972j))
+            arg[3, 1, 2]+=(-0.622063341472+0.195193936902j)*x[2]**o+((-0.612210513729-0.379005342999j))*x[2]
+            ref[3, 1, 2, 2]=(-0.622063341472+0.195193936902j)*o*x_ref[2]**(o-1)+((-0.612210513729-0.379005342999j))
+            arg[3, 1, 3]+=(0.604293283699+0.900898271301j)*x[2]**o+((-0.160490091807+0.469043060316j))*x[2]
+            ref[3, 1, 3, 2]=(0.604293283699+0.900898271301j)*o*x_ref[2]**(o-1)+((-0.160490091807+0.469043060316j))
+            arg[3, 2, 0]+=(-0.933030291602-0.536086703101j)*x[2]**o+((-0.898308449193+0.453661697331j))*x[2]
+            ref[3, 2, 0, 2]=(-0.933030291602-0.536086703101j)*o*x_ref[2]**(o-1)+((-0.898308449193+0.453661697331j))
+            arg[3, 2, 1]+=(-0.720156766667-0.335397697356j)*x[2]**o+((0.497740548177+0.980438459723j))*x[2]
+            ref[3, 2, 1, 2]=(-0.720156766667-0.335397697356j)*o*x_ref[2]**(o-1)+((0.497740548177+0.980438459723j))
+            arg[3, 2, 2]+=(-0.450979862598+0.999787378021j)*x[2]**o+((0.26571168215-0.756153773126j))*x[2]
+            ref[3, 2, 2, 2]=(-0.450979862598+0.999787378021j)*o*x_ref[2]**(o-1)+((0.26571168215-0.756153773126j))
+            arg[3, 2, 3]+=(0.526015354487-0.323349071287j)*x[2]**o+((-0.462676805231+0.809157091126j))*x[2]
+            ref[3, 2, 3, 2]=(0.526015354487-0.323349071287j)*o*x_ref[2]**(o-1)+((-0.462676805231+0.809157091126j))
+            arg[3, 3, 0]+=(-0.165436202081-0.135893118477j)*x[2]**o+((0.925051282681+0.430641152513j))*x[2]
+            ref[3, 3, 0, 2]=(-0.165436202081-0.135893118477j)*o*x_ref[2]**(o-1)+((0.925051282681+0.430641152513j))
+            arg[3, 3, 1]+=(-0.290021709748-0.712904869848j)*x[2]**o+((-0.57720947302+0.659138498291j))*x[2]
+            ref[3, 3, 1, 2]=(-0.290021709748-0.712904869848j)*o*x_ref[2]**(o-1)+((-0.57720947302+0.659138498291j))
+            arg[3, 3, 2]+=(0.898289225625+0.653956246437j)*x[2]**o+((-0.915742665122+0.238062088403j))*x[2]
+            ref[3, 3, 2, 2]=(0.898289225625+0.653956246437j)*o*x_ref[2]**(o-1)+((-0.915742665122+0.238062088403j))
+            arg[3, 3, 3]+=(0.752427230374-0.0508070122923j)*x[2]**o+((0.787943470083+0.669767524122j))*x[2]
+            ref[3, 3, 3, 2]=(0.752427230374-0.0508070122923j)*o*x_ref[2]**(o-1)+((0.787943470083+0.669767524122j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.303344873589+0.791951643615j)*x[0]**o+((-0.625759519734+0.678904200813j))*x[0]+((0.38903732123-0.0315335356467j))*x[1]**o+((0.589334123637-0.442655340859j))*x[1]
+        ref[0]=(0.303344873589+0.791951643615j)*o*x_ref[0]**(o-1)+((-0.625759519734+0.678904200813j))
+        ref[1]=(0.38903732123-0.0315335356467j)*o*x_ref[1]**(o-1)+((0.589334123637-0.442655340859j))
+        if dim==3:
+            arg+=((0.262284923073+0.551101170898j))*x[2]**o+((-0.292364765321-0.340247470549j))*x[2]
+            ref[2]=(0.262284923073+0.551101170898j)*o*x_ref[2]**(o-1)+((-0.292364765321-0.340247470549j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(-0.401961236288+0.738927358114j)*x[0]**o+((-0.145151129957+0.690395533763j))*x[0]+((-0.0606843527897+0.54859606798j))*x[1]**o+((-0.459662534987-0.471821903473j))*x[1]
+        ref[0, 0]=(-0.401961236288+0.738927358114j)*o*x_ref[0]**(o-1)+((-0.145151129957+0.690395533763j))
+        ref[0, 1]=(-0.0606843527897+0.54859606798j)*o*x_ref[1]**(o-1)+((-0.459662534987-0.471821903473j))
+        arg[1,]=(-0.0201726175893-0.904944378972j)*x[0]**o+((-0.782093022435+0.381473389072j))*x[0]+((-0.372644506614+0.188605241391j))*x[1]**o+((0.230981485353-0.00578873997808j))*x[1]
+        ref[1, 0]=(-0.0201726175893-0.904944378972j)*o*x_ref[0]**(o-1)+((-0.782093022435+0.381473389072j))
+        ref[1, 1]=(-0.372644506614+0.188605241391j)*o*x_ref[1]**(o-1)+((0.230981485353-0.00578873997808j))
+        if dim==3:
+            arg[0,]+=(-0.816762378927-0.297386563365j)*x[2]**o+((-0.906729030273+0.840185360695j))*x[2]
+            ref[0, 2]=(-0.816762378927-0.297386563365j)*o*x_ref[2]**(o-1)+((-0.906729030273+0.840185360695j))
+            arg[1,]+=(0.57347191196-0.707252605781j)*x[2]**o+((-0.824901739485+0.194329640968j))*x[2]
+            ref[1, 2]=(0.57347191196-0.707252605781j)*o*x_ref[2]**(o-1)+((-0.824901739485+0.194329640968j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3)+(dim,),w_ref)
+        arg[0, 0]=(-0.379677113311-0.363854806633j)*x[0]**o+((0.0261902394358-0.494183615873j))*x[0]+((0.445406397114+0.357634097586j))*x[1]**o+((0.837678622688+0.447782124256j))*x[1]
+        ref[0, 0, 0]=(-0.379677113311-0.363854806633j)*o*x_ref[0]**(o-1)+((0.0261902394358-0.494183615873j))
+        ref[0, 0, 1]=(0.445406397114+0.357634097586j)*o*x_ref[1]**(o-1)+((0.837678622688+0.447782124256j))
+        arg[0, 1]=(0.737375355555+0.945288965689j)*x[0]**o+((-0.168009576897-0.633829475991j))*x[0]+((-0.067358230129+0.806593602553j))*x[1]**o+((-0.844245219768+0.756418112398j))*x[1]
+        ref[0, 1, 0]=(0.737375355555+0.945288965689j)*o*x_ref[0]**(o-1)+((-0.168009576897-0.633829475991j))
+        ref[0, 1, 1]=(-0.067358230129+0.806593602553j)*o*x_ref[1]**(o-1)+((-0.844245219768+0.756418112398j))
+        arg[0, 2]=(-0.158167706243+0.473689791284j)*x[0]**o+((0.838640781071-0.656354499204j))*x[0]+((-0.976882430818+0.473396436095j))*x[1]**o+((0.649718501537+0.018896136829j))*x[1]
+        ref[0, 2, 0]=(-0.158167706243+0.473689791284j)*o*x_ref[0]**(o-1)+((0.838640781071-0.656354499204j))
+        ref[0, 2, 1]=(-0.976882430818+0.473396436095j)*o*x_ref[1]**(o-1)+((0.649718501537+0.018896136829j))
+        arg[1, 0]=(0.751464486533-0.942677160637j)*x[0]**o+((-0.357701101766+0.158013628237j))*x[0]+((-0.668229093144-0.965284257501j))*x[1]**o+((0.216204809424+0.458977690095j))*x[1]
+        ref[1, 0, 0]=(0.751464486533-0.942677160637j)*o*x_ref[0]**(o-1)+((-0.357701101766+0.158013628237j))
+        ref[1, 0, 1]=(-0.668229093144-0.965284257501j)*o*x_ref[1]**(o-1)+((0.216204809424+0.458977690095j))
+        arg[1, 1]=(0.606684811512+0.869344076758j)*x[0]**o+((0.50590408061+0.803586098429j))*x[0]+((0.449488744012-0.770067744568j))*x[1]**o+((-0.896233254326-0.997316679464j))*x[1]
+        ref[1, 1, 0]=(0.606684811512+0.869344076758j)*o*x_ref[0]**(o-1)+((0.50590408061+0.803586098429j))
+        ref[1, 1, 1]=(0.449488744012-0.770067744568j)*o*x_ref[1]**(o-1)+((-0.896233254326-0.997316679464j))
+        arg[1, 2]=(0.487064162969+0.332696494981j)*x[0]**o+((-0.539421146201+0.272070498139j))*x[0]+((0.224773778808-0.354028212608j))*x[1]**o+((-0.708920442567+0.874252587994j))*x[1]
+        ref[1, 2, 0]=(0.487064162969+0.332696494981j)*o*x_ref[0]**(o-1)+((-0.539421146201+0.272070498139j))
+        ref[1, 2, 1]=(0.224773778808-0.354028212608j)*o*x_ref[1]**(o-1)+((-0.708920442567+0.874252587994j))
+        if dim==3:
+            arg[0, 0]+=(-0.721815238672+0.645249322562j)*x[2]**o+((0.967834138279-0.327411251505j))*x[2]
+            ref[0, 0, 2]=(-0.721815238672+0.645249322562j)*o*x_ref[2]**(o-1)+((0.967834138279-0.327411251505j))
+            arg[0, 1]+=(-0.00138585285253+0.340205355775j)*x[2]**o+((-0.471262213456-0.279757196792j))*x[2]
+            ref[0, 1, 2]=(-0.00138585285253+0.340205355775j)*o*x_ref[2]**(o-1)+((-0.471262213456-0.279757196792j))
+            arg[0, 2]+=(-0.902393998925-0.776573242589j)*x[2]**o+((-0.784220779654-0.25496010405j))*x[2]
+            ref[0, 2, 2]=(-0.902393998925-0.776573242589j)*o*x_ref[2]**(o-1)+((-0.784220779654-0.25496010405j))
+            arg[1, 0]+=(0.27550262707-0.709646997465j)*x[2]**o+((0.638978830041-0.793565423382j))*x[2]
+            ref[1, 0, 2]=(0.27550262707-0.709646997465j)*o*x_ref[2]**(o-1)+((0.638978830041-0.793565423382j))
+            arg[1, 1]+=(-0.14264930869+0.0902510647462j)*x[2]**o+((-0.572668028233+0.171412058696j))*x[2]
+            ref[1, 1, 2]=(-0.14264930869+0.0902510647462j)*o*x_ref[2]**(o-1)+((-0.572668028233+0.171412058696j))
+            arg[1, 2]+=(0.670423874322+0.14104054082j)*x[2]**o+((0.275465959512-0.878127877335j))*x[2]
+            ref[1, 2, 2]=(0.670423874322+0.14104054082j)*o*x_ref[2]**(o-1)+((0.275465959512-0.878127877335j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.135072678392-0.850192212743j)*x[0]**o+((-0.496049509877-0.0863355074132j))*x[0]+((0.69400204982+0.698127531707j))*x[1]**o+((-0.98195304039-0.978045514681j))*x[1]
+        ref[0, 0, 0, 0]=(-0.135072678392-0.850192212743j)*o*x_ref[0]**(o-1)+((-0.496049509877-0.0863355074132j))
+        ref[0, 0, 0, 1]=(0.69400204982+0.698127531707j)*o*x_ref[1]**(o-1)+((-0.98195304039-0.978045514681j))
+        arg[0, 0, 1]=(0.549004638882+0.526133749959j)*x[0]**o+((0.969868400327+0.0605116999361j))*x[0]+((0.690927845134-0.0200707515139j))*x[1]**o+((0.16309555756-0.996218750852j))*x[1]
+        ref[0, 0, 1, 0]=(0.549004638882+0.526133749959j)*o*x_ref[0]**(o-1)+((0.969868400327+0.0605116999361j))
+        ref[0, 0, 1, 1]=(0.690927845134-0.0200707515139j)*o*x_ref[1]**(o-1)+((0.16309555756-0.996218750852j))
+        arg[0, 0, 2]=(0.470021573316+0.725587270592j)*x[0]**o+((0.587844669169+0.330779525535j))*x[0]+((0.261574183166-0.649865786852j))*x[1]**o+((-0.246581296005+0.445756325841j))*x[1]
+        ref[0, 0, 2, 0]=(0.470021573316+0.725587270592j)*o*x_ref[0]**(o-1)+((0.587844669169+0.330779525535j))
+        ref[0, 0, 2, 1]=(0.261574183166-0.649865786852j)*o*x_ref[1]**(o-1)+((-0.246581296005+0.445756325841j))
+        arg[0, 0, 3]=(0.110021189946-0.255138785976j)*x[0]**o+((-0.585482985631-0.236677434195j))*x[0]+((0.515287117127+0.290833098867j))*x[1]**o+((0.604350258542+0.79519631517j))*x[1]
+        ref[0, 0, 3, 0]=(0.110021189946-0.255138785976j)*o*x_ref[0]**(o-1)+((-0.585482985631-0.236677434195j))
+        ref[0, 0, 3, 1]=(0.515287117127+0.290833098867j)*o*x_ref[1]**(o-1)+((0.604350258542+0.79519631517j))
+        arg[0, 1, 0]=(-0.234938202747+0.695922413236j)*x[0]**o+((-0.591314154922-0.470660959695j))*x[0]+((-0.355936387268+0.397182133797j))*x[1]**o+((0.972163175126-0.431655732239j))*x[1]
+        ref[0, 1, 0, 0]=(-0.234938202747+0.695922413236j)*o*x_ref[0]**(o-1)+((-0.591314154922-0.470660959695j))
+        ref[0, 1, 0, 1]=(-0.355936387268+0.397182133797j)*o*x_ref[1]**(o-1)+((0.972163175126-0.431655732239j))
+        arg[0, 1, 1]=(-0.143705319592+0.480420418127j)*x[0]**o+((0.716512647281+0.442452824877j))*x[0]+((0.309077481953-0.297629703762j))*x[1]**o+((-0.306163745231+0.317476976161j))*x[1]
+        ref[0, 1, 1, 0]=(-0.143705319592+0.480420418127j)*o*x_ref[0]**(o-1)+((0.716512647281+0.442452824877j))
+        ref[0, 1, 1, 1]=(0.309077481953-0.297629703762j)*o*x_ref[1]**(o-1)+((-0.306163745231+0.317476976161j))
+        arg[0, 1, 2]=(-0.277250044089-0.99297474939j)*x[0]**o+((0.590315836353+0.0691757555219j))*x[0]+((0.0473810153127-0.309060586987j))*x[1]**o+((-0.528175796102+0.249303029335j))*x[1]
+        ref[0, 1, 2, 0]=(-0.277250044089-0.99297474939j)*o*x_ref[0]**(o-1)+((0.590315836353+0.0691757555219j))
+        ref[0, 1, 2, 1]=(0.0473810153127-0.309060586987j)*o*x_ref[1]**(o-1)+((-0.528175796102+0.249303029335j))
+        arg[0, 1, 3]=(0.502476277902+0.746111975865j)*x[0]**o+((0.517214122199+0.563213034995j))*x[0]+((0.370899177885-0.995139476106j))*x[1]**o+((-0.545762610955+0.762065256441j))*x[1]
+        ref[0, 1, 3, 0]=(0.502476277902+0.746111975865j)*o*x_ref[0]**(o-1)+((0.517214122199+0.563213034995j))
+        ref[0, 1, 3, 1]=(0.370899177885-0.995139476106j)*o*x_ref[1]**(o-1)+((-0.545762610955+0.762065256441j))
+        arg[0, 2, 0]=(0.263627008683-0.174951666431j)*x[0]**o+((-0.821356228851+0.397050664859j))*x[0]+((0.844047068026+0.604144594162j))*x[1]**o+((0.122587091657+0.547917768069j))*x[1]
+        ref[0, 2, 0, 0]=(0.263627008683-0.174951666431j)*o*x_ref[0]**(o-1)+((-0.821356228851+0.397050664859j))
+        ref[0, 2, 0, 1]=(0.844047068026+0.604144594162j)*o*x_ref[1]**(o-1)+((0.122587091657+0.547917768069j))
+        arg[0, 2, 1]=(0.685112141782+0.221605296935j)*x[0]**o+((0.269234296012+0.102657792078j))*x[0]+((0.107533035361+0.216804524893j))*x[1]**o+((-0.714905057057+0.830482015134j))*x[1]
+        ref[0, 2, 1, 0]=(0.685112141782+0.221605296935j)*o*x_ref[0]**(o-1)+((0.269234296012+0.102657792078j))
+        ref[0, 2, 1, 1]=(0.107533035361+0.216804524893j)*o*x_ref[1]**(o-1)+((-0.714905057057+0.830482015134j))
+        arg[0, 2, 2]=(-0.459156953617+0.612439141626j)*x[0]**o+((-0.886765419848-0.249950978599j))*x[0]+((-0.813373471183-0.148004153741j))*x[1]**o+((0.963158576309+0.417935005814j))*x[1]
+        ref[0, 2, 2, 0]=(-0.459156953617+0.612439141626j)*o*x_ref[0]**(o-1)+((-0.886765419848-0.249950978599j))
+        ref[0, 2, 2, 1]=(-0.813373471183-0.148004153741j)*o*x_ref[1]**(o-1)+((0.963158576309+0.417935005814j))
+        arg[0, 2, 3]=(0.677653929204-0.972568156981j)*x[0]**o+((0.899473886176+0.273989554304j))*x[0]+((0.243389215082-0.788597206778j))*x[1]**o+((-0.441110569019+0.631092403405j))*x[1]
+        ref[0, 2, 3, 0]=(0.677653929204-0.972568156981j)*o*x_ref[0]**(o-1)+((0.899473886176+0.273989554304j))
+        ref[0, 2, 3, 1]=(0.243389215082-0.788597206778j)*o*x_ref[1]**(o-1)+((-0.441110569019+0.631092403405j))
+        arg[0, 3, 0]=(0.545373855784+0.461474637602j)*x[0]**o+((0.724081118844-0.340556871186j))*x[0]+((0.375780601357-0.506387828039j))*x[1]**o+((-0.805261202802-0.834187860344j))*x[1]
+        ref[0, 3, 0, 0]=(0.545373855784+0.461474637602j)*o*x_ref[0]**(o-1)+((0.724081118844-0.340556871186j))
+        ref[0, 3, 0, 1]=(0.375780601357-0.506387828039j)*o*x_ref[1]**(o-1)+((-0.805261202802-0.834187860344j))
+        arg[0, 3, 1]=(-0.742972740598-0.713066892709j)*x[0]**o+((0.620784546365-0.845091131936j))*x[0]+((-0.100599666666+0.92958342962j))*x[1]**o+((-0.864782501714+0.719189582344j))*x[1]
+        ref[0, 3, 1, 0]=(-0.742972740598-0.713066892709j)*o*x_ref[0]**(o-1)+((0.620784546365-0.845091131936j))
+        ref[0, 3, 1, 1]=(-0.100599666666+0.92958342962j)*o*x_ref[1]**(o-1)+((-0.864782501714+0.719189582344j))
+        arg[0, 3, 2]=(-0.295738818342+0.232417548677j)*x[0]**o+((-0.617867605863-0.205204550223j))*x[0]+((0.0791985552702+0.899263294899j))*x[1]**o+((0.682497198579-0.706691847468j))*x[1]
+        ref[0, 3, 2, 0]=(-0.295738818342+0.232417548677j)*o*x_ref[0]**(o-1)+((-0.617867605863-0.205204550223j))
+        ref[0, 3, 2, 1]=(0.0791985552702+0.899263294899j)*o*x_ref[1]**(o-1)+((0.682497198579-0.706691847468j))
+        arg[0, 3, 3]=(0.43647040078-0.878196922324j)*x[0]**o+((0.312221689957-0.795129752709j))*x[0]+((0.226002747606+0.370987419967j))*x[1]**o+((0.471013585591+0.837056319117j))*x[1]
+        ref[0, 3, 3, 0]=(0.43647040078-0.878196922324j)*o*x_ref[0]**(o-1)+((0.312221689957-0.795129752709j))
+        ref[0, 3, 3, 1]=(0.226002747606+0.370987419967j)*o*x_ref[1]**(o-1)+((0.471013585591+0.837056319117j))
+        arg[1, 0, 0]=(-0.479851838447+0.630842337198j)*x[0]**o+((0.246005323187-0.283839279058j))*x[0]+((0.862186293316+0.00368092218705j))*x[1]**o+((-0.264750103402-0.717761420688j))*x[1]
+        ref[1, 0, 0, 0]=(-0.479851838447+0.630842337198j)*o*x_ref[0]**(o-1)+((0.246005323187-0.283839279058j))
+        ref[1, 0, 0, 1]=(0.862186293316+0.00368092218705j)*o*x_ref[1]**(o-1)+((-0.264750103402-0.717761420688j))
+        arg[1, 0, 1]=(-0.0263575580933+0.783467306941j)*x[0]**o+((0.70874172922-0.122426785861j))*x[0]+((0.30948717457-0.935321258013j))*x[1]**o+((0.229437707865-0.999280477429j))*x[1]
+        ref[1, 0, 1, 0]=(-0.0263575580933+0.783467306941j)*o*x_ref[0]**(o-1)+((0.70874172922-0.122426785861j))
+        ref[1, 0, 1, 1]=(0.30948717457-0.935321258013j)*o*x_ref[1]**(o-1)+((0.229437707865-0.999280477429j))
+        arg[1, 0, 2]=(-0.911679393427+0.735000089962j)*x[0]**o+((0.232662995142+0.699301914617j))*x[0]+((0.156442158935+0.865349345842j))*x[1]**o+((-0.325114329315-0.642279973393j))*x[1]
+        ref[1, 0, 2, 0]=(-0.911679393427+0.735000089962j)*o*x_ref[0]**(o-1)+((0.232662995142+0.699301914617j))
+        ref[1, 0, 2, 1]=(0.156442158935+0.865349345842j)*o*x_ref[1]**(o-1)+((-0.325114329315-0.642279973393j))
+        arg[1, 0, 3]=(0.587425897109-0.249733068389j)*x[0]**o+((0.189018958088+0.150236179634j))*x[0]+((0.210152873111-0.141040283173j))*x[1]**o+((0.860188020356-0.646573684578j))*x[1]
+        ref[1, 0, 3, 0]=(0.587425897109-0.249733068389j)*o*x_ref[0]**(o-1)+((0.189018958088+0.150236179634j))
+        ref[1, 0, 3, 1]=(0.210152873111-0.141040283173j)*o*x_ref[1]**(o-1)+((0.860188020356-0.646573684578j))
+        arg[1, 1, 0]=(-0.63457658692+0.421432643732j)*x[0]**o+((0.189131252616-0.716818698164j))*x[0]+((0.830712138791+0.641147118682j))*x[1]**o+((0.0268546838012-0.530185851409j))*x[1]
+        ref[1, 1, 0, 0]=(-0.63457658692+0.421432643732j)*o*x_ref[0]**(o-1)+((0.189131252616-0.716818698164j))
+        ref[1, 1, 0, 1]=(0.830712138791+0.641147118682j)*o*x_ref[1]**(o-1)+((0.0268546838012-0.530185851409j))
+        arg[1, 1, 1]=(-0.208441598576+0.840051254705j)*x[0]**o+((-0.5059376123-0.405559107594j))*x[0]+((0.725953262619-0.470257574005j))*x[1]**o+((0.237317127181-0.937429520844j))*x[1]
+        ref[1, 1, 1, 0]=(-0.208441598576+0.840051254705j)*o*x_ref[0]**(o-1)+((-0.5059376123-0.405559107594j))
+        ref[1, 1, 1, 1]=(0.725953262619-0.470257574005j)*o*x_ref[1]**(o-1)+((0.237317127181-0.937429520844j))
+        arg[1, 1, 2]=(-0.155011924916-0.628243491606j)*x[0]**o+((0.219269044813+0.577264268752j))*x[0]+((0.381156185328+0.129258389195j))*x[1]**o+((-0.715672566943+0.645413943438j))*x[1]
+        ref[1, 1, 2, 0]=(-0.155011924916-0.628243491606j)*o*x_ref[0]**(o-1)+((0.219269044813+0.577264268752j))
+        ref[1, 1, 2, 1]=(0.381156185328+0.129258389195j)*o*x_ref[1]**(o-1)+((-0.715672566943+0.645413943438j))
+        arg[1, 1, 3]=(-0.628222966238-0.832145654453j)*x[0]**o+((-0.641175172989+0.343650991971j))*x[0]+((0.918995270141-0.207239552527j))*x[1]**o+((0.34272171363+0.144627887447j))*x[1]
+        ref[1, 1, 3, 0]=(-0.628222966238-0.832145654453j)*o*x_ref[0]**(o-1)+((-0.641175172989+0.343650991971j))
+        ref[1, 1, 3, 1]=(0.918995270141-0.207239552527j)*o*x_ref[1]**(o-1)+((0.34272171363+0.144627887447j))
+        arg[1, 2, 0]=(0.66872216261-0.782667574464j)*x[0]**o+((-0.139635281915+0.442641303869j))*x[0]+((-0.733611616122-0.491505163845j))*x[1]**o+((0.238807922009+0.72226601597j))*x[1]
+        ref[1, 2, 0, 0]=(0.66872216261-0.782667574464j)*o*x_ref[0]**(o-1)+((-0.139635281915+0.442641303869j))
+        ref[1, 2, 0, 1]=(-0.733611616122-0.491505163845j)*o*x_ref[1]**(o-1)+((0.238807922009+0.72226601597j))
+        arg[1, 2, 1]=(-0.469099879168-0.915773299198j)*x[0]**o+((-0.441558488393-0.0916036277028j))*x[0]+((0.751604349665+0.946337470787j))*x[1]**o+((-0.728293934151-0.248368486432j))*x[1]
+        ref[1, 2, 1, 0]=(-0.469099879168-0.915773299198j)*o*x_ref[0]**(o-1)+((-0.441558488393-0.0916036277028j))
+        ref[1, 2, 1, 1]=(0.751604349665+0.946337470787j)*o*x_ref[1]**(o-1)+((-0.728293934151-0.248368486432j))
+        arg[1, 2, 2]=(-0.670278224345-0.289566215726j)*x[0]**o+((0.8093097306+0.51395345137j))*x[0]+((0.105275760329+0.37712289309j))*x[1]**o+((-0.816781215645-0.364015351092j))*x[1]
+        ref[1, 2, 2, 0]=(-0.670278224345-0.289566215726j)*o*x_ref[0]**(o-1)+((0.8093097306+0.51395345137j))
+        ref[1, 2, 2, 1]=(0.105275760329+0.37712289309j)*o*x_ref[1]**(o-1)+((-0.816781215645-0.364015351092j))
+        arg[1, 2, 3]=(-0.384289154209+0.988009783314j)*x[0]**o+((0.447811029519+0.775901430055j))*x[0]+((0.578020044313+0.278850903664j))*x[1]**o+((0.527562244365+0.58568784272j))*x[1]
+        ref[1, 2, 3, 0]=(-0.384289154209+0.988009783314j)*o*x_ref[0]**(o-1)+((0.447811029519+0.775901430055j))
+        ref[1, 2, 3, 1]=(0.578020044313+0.278850903664j)*o*x_ref[1]**(o-1)+((0.527562244365+0.58568784272j))
+        arg[1, 3, 0]=(-0.134925912954-0.85417584632j)*x[0]**o+((0.500101343077+0.628981968634j))*x[0]+((0.229547777+0.437817713753j))*x[1]**o+((0.715506558878+0.564531801754j))*x[1]
+        ref[1, 3, 0, 0]=(-0.134925912954-0.85417584632j)*o*x_ref[0]**(o-1)+((0.500101343077+0.628981968634j))
+        ref[1, 3, 0, 1]=(0.229547777+0.437817713753j)*o*x_ref[1]**(o-1)+((0.715506558878+0.564531801754j))
+        arg[1, 3, 1]=(-0.864245937824+0.594538820342j)*x[0]**o+((-0.133376733947+0.44403552096j))*x[0]+((0.856981770363-0.42144442666j))*x[1]**o+((0.999123585718-0.123148997099j))*x[1]
+        ref[1, 3, 1, 0]=(-0.864245937824+0.594538820342j)*o*x_ref[0]**(o-1)+((-0.133376733947+0.44403552096j))
+        ref[1, 3, 1, 1]=(0.856981770363-0.42144442666j)*o*x_ref[1]**(o-1)+((0.999123585718-0.123148997099j))
+        arg[1, 3, 2]=(0.58370417325-0.884856537536j)*x[0]**o+((0.777621507828+0.798925360423j))*x[0]+((0.827177808699+0.386455276101j))*x[1]**o+((0.203059584468+0.968323551032j))*x[1]
+        ref[1, 3, 2, 0]=(0.58370417325-0.884856537536j)*o*x_ref[0]**(o-1)+((0.777621507828+0.798925360423j))
+        ref[1, 3, 2, 1]=(0.827177808699+0.386455276101j)*o*x_ref[1]**(o-1)+((0.203059584468+0.968323551032j))
+        arg[1, 3, 3]=(0.330353235933-0.948763987705j)*x[0]**o+((-0.158662420414+0.111395165126j))*x[0]+((0.50027804963-0.955158055027j))*x[1]**o+((-0.663358861929-0.600678732058j))*x[1]
+        ref[1, 3, 3, 0]=(0.330353235933-0.948763987705j)*o*x_ref[0]**(o-1)+((-0.158662420414+0.111395165126j))
+        ref[1, 3, 3, 1]=(0.50027804963-0.955158055027j)*o*x_ref[1]**(o-1)+((-0.663358861929-0.600678732058j))
+        arg[2, 0, 0]=(-0.589513987362+0.0751944811072j)*x[0]**o+((-0.792536690371-0.141185940372j))*x[0]+((0.857831118185+0.800826341611j))*x[1]**o+((0.443945094143-0.602464051447j))*x[1]
+        ref[2, 0, 0, 0]=(-0.589513987362+0.0751944811072j)*o*x_ref[0]**(o-1)+((-0.792536690371-0.141185940372j))
+        ref[2, 0, 0, 1]=(0.857831118185+0.800826341611j)*o*x_ref[1]**(o-1)+((0.443945094143-0.602464051447j))
+        arg[2, 0, 1]=(-0.390044378241-0.771719830134j)*x[0]**o+((-0.536283971101-0.131020727666j))*x[0]+((-0.60512345824-0.315553629161j))*x[1]**o+((-0.780917006307-0.254171729986j))*x[1]
+        ref[2, 0, 1, 0]=(-0.390044378241-0.771719830134j)*o*x_ref[0]**(o-1)+((-0.536283971101-0.131020727666j))
+        ref[2, 0, 1, 1]=(-0.60512345824-0.315553629161j)*o*x_ref[1]**(o-1)+((-0.780917006307-0.254171729986j))
+        arg[2, 0, 2]=(-0.626252845125+0.0623825221444j)*x[0]**o+((0.659835946818-0.124347601207j))*x[0]+((0.104448048685+0.321006823668j))*x[1]**o+((-0.613858287276+0.178758927377j))*x[1]
+        ref[2, 0, 2, 0]=(-0.626252845125+0.0623825221444j)*o*x_ref[0]**(o-1)+((0.659835946818-0.124347601207j))
+        ref[2, 0, 2, 1]=(0.104448048685+0.321006823668j)*o*x_ref[1]**(o-1)+((-0.613858287276+0.178758927377j))
+        arg[2, 0, 3]=(-0.866458010627-0.953801194794j)*x[0]**o+((0.408957987163+0.519638677638j))*x[0]+((0.447016390488-0.487671224021j))*x[1]**o+((0.79535632544-0.624052266802j))*x[1]
+        ref[2, 0, 3, 0]=(-0.866458010627-0.953801194794j)*o*x_ref[0]**(o-1)+((0.408957987163+0.519638677638j))
+        ref[2, 0, 3, 1]=(0.447016390488-0.487671224021j)*o*x_ref[1]**(o-1)+((0.79535632544-0.624052266802j))
+        arg[2, 1, 0]=(-0.698207388865+0.513035711977j)*x[0]**o+((0.151939610125+0.101911204198j))*x[0]+((-0.37105252042-0.732666670849j))*x[1]**o+((-0.832811856596-0.0659678795031j))*x[1]
+        ref[2, 1, 0, 0]=(-0.698207388865+0.513035711977j)*o*x_ref[0]**(o-1)+((0.151939610125+0.101911204198j))
+        ref[2, 1, 0, 1]=(-0.37105252042-0.732666670849j)*o*x_ref[1]**(o-1)+((-0.832811856596-0.0659678795031j))
+        arg[2, 1, 1]=(-0.592786714082+0.97649281527j)*x[0]**o+((0.424504001199+0.544662231003j))*x[0]+((-0.442252887214+0.480746508688j))*x[1]**o+((-0.0981156467383+0.33823767921j))*x[1]
+        ref[2, 1, 1, 0]=(-0.592786714082+0.97649281527j)*o*x_ref[0]**(o-1)+((0.424504001199+0.544662231003j))
+        ref[2, 1, 1, 1]=(-0.442252887214+0.480746508688j)*o*x_ref[1]**(o-1)+((-0.0981156467383+0.33823767921j))
+        arg[2, 1, 2]=(0.0368705570807-0.541817720606j)*x[0]**o+((0.742189475459-0.832467235559j))*x[0]+((0.224887508884+0.636026387915j))*x[1]**o+((-0.718608421654+0.866171118136j))*x[1]
+        ref[2, 1, 2, 0]=(0.0368705570807-0.541817720606j)*o*x_ref[0]**(o-1)+((0.742189475459-0.832467235559j))
+        ref[2, 1, 2, 1]=(0.224887508884+0.636026387915j)*o*x_ref[1]**(o-1)+((-0.718608421654+0.866171118136j))
+        arg[2, 1, 3]=(-0.766507320899+0.22821266777j)*x[0]**o+((-0.127987212586+0.447658679205j))*x[0]+((0.741381116556-0.00926292185458j))*x[1]**o+((0.625253683613+0.510794156599j))*x[1]
+        ref[2, 1, 3, 0]=(-0.766507320899+0.22821266777j)*o*x_ref[0]**(o-1)+((-0.127987212586+0.447658679205j))
+        ref[2, 1, 3, 1]=(0.741381116556-0.00926292185458j)*o*x_ref[1]**(o-1)+((0.625253683613+0.510794156599j))
+        arg[2, 2, 0]=(0.580552839851+0.0468253970591j)*x[0]**o+((0.385439807219+0.470992257676j))*x[0]+((-0.402834272252-0.197950098874j))*x[1]**o+((-0.415220534919-0.73710440094j))*x[1]
+        ref[2, 2, 0, 0]=(0.580552839851+0.0468253970591j)*o*x_ref[0]**(o-1)+((0.385439807219+0.470992257676j))
+        ref[2, 2, 0, 1]=(-0.402834272252-0.197950098874j)*o*x_ref[1]**(o-1)+((-0.415220534919-0.73710440094j))
+        arg[2, 2, 1]=(-0.0034839272923+0.763817833067j)*x[0]**o+((0.413441966766+0.353345647394j))*x[0]+((0.522711535457-0.481367337458j))*x[1]**o+((-0.830539187005-0.328629756633j))*x[1]
+        ref[2, 2, 1, 0]=(-0.0034839272923+0.763817833067j)*o*x_ref[0]**(o-1)+((0.413441966766+0.353345647394j))
+        ref[2, 2, 1, 1]=(0.522711535457-0.481367337458j)*o*x_ref[1]**(o-1)+((-0.830539187005-0.328629756633j))
+        arg[2, 2, 2]=(-0.659932757029+0.842673653255j)*x[0]**o+((-0.870646061932-0.466861927465j))*x[0]+((0.1058567206+0.456844198945j))*x[1]**o+((-0.0312042102579-0.851820274768j))*x[1]
+        ref[2, 2, 2, 0]=(-0.659932757029+0.842673653255j)*o*x_ref[0]**(o-1)+((-0.870646061932-0.466861927465j))
+        ref[2, 2, 2, 1]=(0.1058567206+0.456844198945j)*o*x_ref[1]**(o-1)+((-0.0312042102579-0.851820274768j))
+        arg[2, 2, 3]=(0.306730081076+0.211338743188j)*x[0]**o+((0.0390285580342+0.797252851298j))*x[0]+((0.989670226814+0.15003231193j))*x[1]**o+((0.976708610017+0.854062883809j))*x[1]
+        ref[2, 2, 3, 0]=(0.306730081076+0.211338743188j)*o*x_ref[0]**(o-1)+((0.0390285580342+0.797252851298j))
+        ref[2, 2, 3, 1]=(0.989670226814+0.15003231193j)*o*x_ref[1]**(o-1)+((0.976708610017+0.854062883809j))
+        arg[2, 3, 0]=(-0.15597252413+0.538552801247j)*x[0]**o+((-0.491469921241-0.0572243137173j))*x[0]+((0.331009519808+0.840089066768j))*x[1]**o+((0.863820431148-0.25529634845j))*x[1]
+        ref[2, 3, 0, 0]=(-0.15597252413+0.538552801247j)*o*x_ref[0]**(o-1)+((-0.491469921241-0.0572243137173j))
+        ref[2, 3, 0, 1]=(0.331009519808+0.840089066768j)*o*x_ref[1]**(o-1)+((0.863820431148-0.25529634845j))
+        arg[2, 3, 1]=(0.829766510233+0.000266525829664j)*x[0]**o+((-0.175023392204+0.890372709128j))*x[0]+((0.445508580461-0.234499680531j))*x[1]**o+((-0.594387449911+0.513961426085j))*x[1]
+        ref[2, 3, 1, 0]=(0.829766510233+0.000266525829664j)*o*x_ref[0]**(o-1)+((-0.175023392204+0.890372709128j))
+        ref[2, 3, 1, 1]=(0.445508580461-0.234499680531j)*o*x_ref[1]**(o-1)+((-0.594387449911+0.513961426085j))
+        arg[2, 3, 2]=(-0.417636047459-0.39985411436j)*x[0]**o+((0.229435990074-0.287550014747j))*x[0]+((-0.485595638035+0.278908601758j))*x[1]**o+((-0.673015034409+0.689828416569j))*x[1]
+        ref[2, 3, 2, 0]=(-0.417636047459-0.39985411436j)*o*x_ref[0]**(o-1)+((0.229435990074-0.287550014747j))
+        ref[2, 3, 2, 1]=(-0.485595638035+0.278908601758j)*o*x_ref[1]**(o-1)+((-0.673015034409+0.689828416569j))
+        arg[2, 3, 3]=(0.0296983323745-0.187155415986j)*x[0]**o+((-0.0876419585523+0.671792564336j))*x[0]+((0.0170126745491-0.666657384376j))*x[1]**o+((0.959993151133+0.231463342356j))*x[1]
+        ref[2, 3, 3, 0]=(0.0296983323745-0.187155415986j)*o*x_ref[0]**(o-1)+((-0.0876419585523+0.671792564336j))
+        ref[2, 3, 3, 1]=(0.0170126745491-0.666657384376j)*o*x_ref[1]**(o-1)+((0.959993151133+0.231463342356j))
+        arg[3, 0, 0]=(0.359000695233-0.317336164141j)*x[0]**o+((0.107463859369+0.845316832634j))*x[0]+((-0.124870193258-0.13703905767j))*x[1]**o+((0.40680292396+0.0292128899011j))*x[1]
+        ref[3, 0, 0, 0]=(0.359000695233-0.317336164141j)*o*x_ref[0]**(o-1)+((0.107463859369+0.845316832634j))
+        ref[3, 0, 0, 1]=(-0.124870193258-0.13703905767j)*o*x_ref[1]**(o-1)+((0.40680292396+0.0292128899011j))
+        arg[3, 0, 1]=(-0.182666487621-0.160383618991j)*x[0]**o+((-0.38376418386+0.279457191568j))*x[0]+((-0.160627149868+0.960645741252j))*x[1]**o+((-0.932503265681+0.432382374607j))*x[1]
+        ref[3, 0, 1, 0]=(-0.182666487621-0.160383618991j)*o*x_ref[0]**(o-1)+((-0.38376418386+0.279457191568j))
+        ref[3, 0, 1, 1]=(-0.160627149868+0.960645741252j)*o*x_ref[1]**(o-1)+((-0.932503265681+0.432382374607j))
+        arg[3, 0, 2]=(-0.0206625075876-0.711575680582j)*x[0]**o+((0.524026012252-0.805687899192j))*x[0]+((-0.880171582845+0.205634280546j))*x[1]**o+((0.637170791454+0.856446396121j))*x[1]
+        ref[3, 0, 2, 0]=(-0.0206625075876-0.711575680582j)*o*x_ref[0]**(o-1)+((0.524026012252-0.805687899192j))
+        ref[3, 0, 2, 1]=(-0.880171582845+0.205634280546j)*o*x_ref[1]**(o-1)+((0.637170791454+0.856446396121j))
+        arg[3, 0, 3]=(-0.566376484616-0.32579699656j)*x[0]**o+((0.56986644003+0.86977468637j))*x[0]+((-0.775279843108-0.038489692086j))*x[1]**o+((0.507865066249-0.322350532241j))*x[1]
+        ref[3, 0, 3, 0]=(-0.566376484616-0.32579699656j)*o*x_ref[0]**(o-1)+((0.56986644003+0.86977468637j))
+        ref[3, 0, 3, 1]=(-0.775279843108-0.038489692086j)*o*x_ref[1]**(o-1)+((0.507865066249-0.322350532241j))
+        arg[3, 1, 0]=(-0.341230202649-0.622853561228j)*x[0]**o+((-0.413183517738+0.738380255596j))*x[0]+((-0.551963130048+0.392356124296j))*x[1]**o+((0.259286212193-0.358113054737j))*x[1]
+        ref[3, 1, 0, 0]=(-0.341230202649-0.622853561228j)*o*x_ref[0]**(o-1)+((-0.413183517738+0.738380255596j))
+        ref[3, 1, 0, 1]=(-0.551963130048+0.392356124296j)*o*x_ref[1]**(o-1)+((0.259286212193-0.358113054737j))
+        arg[3, 1, 1]=(0.145278917277+0.127383612002j)*x[0]**o+((0.920998100344-0.443932965989j))*x[0]+((-0.575049608836+0.580925758767j))*x[1]**o+((0.759907813834-0.544362140377j))*x[1]
+        ref[3, 1, 1, 0]=(0.145278917277+0.127383612002j)*o*x_ref[0]**(o-1)+((0.920998100344-0.443932965989j))
+        ref[3, 1, 1, 1]=(-0.575049608836+0.580925758767j)*o*x_ref[1]**(o-1)+((0.759907813834-0.544362140377j))
+        arg[3, 1, 2]=(-0.58432491842-0.815402642363j)*x[0]**o+((-0.225480073175+0.304528165787j))*x[0]+((0.789082155256-0.170129627945j))*x[1]**o+((-0.66197060625+0.115507630165j))*x[1]
+        ref[3, 1, 2, 0]=(-0.58432491842-0.815402642363j)*o*x_ref[0]**(o-1)+((-0.225480073175+0.304528165787j))
+        ref[3, 1, 2, 1]=(0.789082155256-0.170129627945j)*o*x_ref[1]**(o-1)+((-0.66197060625+0.115507630165j))
+        arg[3, 1, 3]=(0.605210464048+0.861579072681j)*x[0]**o+((0.835048406129-0.137139628972j))*x[0]+((0.767547387077+0.183472123899j))*x[1]**o+((0.525132081781-0.792653161638j))*x[1]
+        ref[3, 1, 3, 0]=(0.605210464048+0.861579072681j)*o*x_ref[0]**(o-1)+((0.835048406129-0.137139628972j))
+        ref[3, 1, 3, 1]=(0.767547387077+0.183472123899j)*o*x_ref[1]**(o-1)+((0.525132081781-0.792653161638j))
+        arg[3, 2, 0]=(0.85192148153-0.57411156887j)*x[0]**o+((-0.606876948513-0.684542502522j))*x[0]+((-0.487011538892-0.743700383137j))*x[1]**o+((0.0118600244003-0.0565225492786j))*x[1]
+        ref[3, 2, 0, 0]=(0.85192148153-0.57411156887j)*o*x_ref[0]**(o-1)+((-0.606876948513-0.684542502522j))
+        ref[3, 2, 0, 1]=(-0.487011538892-0.743700383137j)*o*x_ref[1]**(o-1)+((0.0118600244003-0.0565225492786j))
+        arg[3, 2, 1]=(-0.905130268135-0.851318152117j)*x[0]**o+((-0.152724415554+0.0821897432395j))*x[0]+((0.726025311113+0.622662359095j))*x[1]**o+((-0.360407762961+0.887170473806j))*x[1]
+        ref[3, 2, 1, 0]=(-0.905130268135-0.851318152117j)*o*x_ref[0]**(o-1)+((-0.152724415554+0.0821897432395j))
+        ref[3, 2, 1, 1]=(0.726025311113+0.622662359095j)*o*x_ref[1]**(o-1)+((-0.360407762961+0.887170473806j))
+        arg[3, 2, 2]=(0.385253344311+0.542068880241j)*x[0]**o+((0.210691548021+0.246125270996j))*x[0]+((-0.758818076892-0.98074471828j))*x[1]**o+((-0.365874868371+0.0975479730516j))*x[1]
+        ref[3, 2, 2, 0]=(0.385253344311+0.542068880241j)*o*x_ref[0]**(o-1)+((0.210691548021+0.246125270996j))
+        ref[3, 2, 2, 1]=(-0.758818076892-0.98074471828j)*o*x_ref[1]**(o-1)+((-0.365874868371+0.0975479730516j))
+        arg[3, 2, 3]=(0.062901304424+0.713548508189j)*x[0]**o+((-0.118382305261+0.11715201007j))*x[0]+((-0.935385319964-0.653330735256j))*x[1]**o+((-0.725504244183-0.709800836344j))*x[1]
+        ref[3, 2, 3, 0]=(0.062901304424+0.713548508189j)*o*x_ref[0]**(o-1)+((-0.118382305261+0.11715201007j))
+        ref[3, 2, 3, 1]=(-0.935385319964-0.653330735256j)*o*x_ref[1]**(o-1)+((-0.725504244183-0.709800836344j))
+        arg[3, 3, 0]=(-0.835569923295+0.907768435909j)*x[0]**o+((0.246448598297+0.0143983198875j))*x[0]+((0.578580248925-0.93631216199j))*x[1]**o+((-0.361011550881-0.846573136246j))*x[1]
+        ref[3, 3, 0, 0]=(-0.835569923295+0.907768435909j)*o*x_ref[0]**(o-1)+((0.246448598297+0.0143983198875j))
+        ref[3, 3, 0, 1]=(0.578580248925-0.93631216199j)*o*x_ref[1]**(o-1)+((-0.361011550881-0.846573136246j))
+        arg[3, 3, 1]=(-0.281371667125-0.300923747853j)*x[0]**o+((0.0258435867219-0.385029755301j))*x[0]+((-0.896460452499+0.881639389707j))*x[1]**o+((0.31129002708-0.355758558367j))*x[1]
+        ref[3, 3, 1, 0]=(-0.281371667125-0.300923747853j)*o*x_ref[0]**(o-1)+((0.0258435867219-0.385029755301j))
+        ref[3, 3, 1, 1]=(-0.896460452499+0.881639389707j)*o*x_ref[1]**(o-1)+((0.31129002708-0.355758558367j))
+        arg[3, 3, 2]=(-0.778717051676-0.347930707456j)*x[0]**o+((-0.145134449076+0.0793442618963j))*x[0]+((-0.196474261713-0.0440077340874j))*x[1]**o+((0.976912250284+0.821888536984j))*x[1]
+        ref[3, 3, 2, 0]=(-0.778717051676-0.347930707456j)*o*x_ref[0]**(o-1)+((-0.145134449076+0.0793442618963j))
+        ref[3, 3, 2, 1]=(-0.196474261713-0.0440077340874j)*o*x_ref[1]**(o-1)+((0.976912250284+0.821888536984j))
+        arg[3, 3, 3]=(0.383109184895+0.713334560815j)*x[0]**o+((-0.506570136657+0.381950501657j))*x[0]+((0.930071951539-0.910351637284j))*x[1]**o+((-0.892194477138+0.455492190949j))*x[1]
+        ref[3, 3, 3, 0]=(0.383109184895+0.713334560815j)*o*x_ref[0]**(o-1)+((-0.506570136657+0.381950501657j))
+        ref[3, 3, 3, 1]=(0.930071951539-0.910351637284j)*o*x_ref[1]**(o-1)+((-0.892194477138+0.455492190949j))
+        if dim==3:
+            arg[0, 0, 0]+=(0.247536390313-0.471101182166j)*x[2]**o+((0.407489447074-0.192879394557j))*x[2]
+            ref[0, 0, 0, 2]=(0.247536390313-0.471101182166j)*o*x_ref[2]**(o-1)+((0.407489447074-0.192879394557j))
+            arg[0, 0, 1]+=(-0.493962960554+0.393637478491j)*x[2]**o+((-0.605491039326-0.537567664909j))*x[2]
+            ref[0, 0, 1, 2]=(-0.493962960554+0.393637478491j)*o*x_ref[2]**(o-1)+((-0.605491039326-0.537567664909j))
+            arg[0, 0, 2]+=(0.574246947597+0.869853031903j)*x[2]**o+((-0.726258055559-0.832511062595j))*x[2]
+            ref[0, 0, 2, 2]=(0.574246947597+0.869853031903j)*o*x_ref[2]**(o-1)+((-0.726258055559-0.832511062595j))
+            arg[0, 0, 3]+=(-0.872080792946-0.830560693983j)*x[2]**o+((0.657538814943-0.560025701488j))*x[2]
+            ref[0, 0, 3, 2]=(-0.872080792946-0.830560693983j)*o*x_ref[2]**(o-1)+((0.657538814943-0.560025701488j))
+            arg[0, 1, 0]+=(-0.732906678469-0.644265624383j)*x[2]**o+((-0.953778373741+0.692612507302j))*x[2]
+            ref[0, 1, 0, 2]=(-0.732906678469-0.644265624383j)*o*x_ref[2]**(o-1)+((-0.953778373741+0.692612507302j))
+            arg[0, 1, 1]+=(-0.823366118544+0.735346315809j)*x[2]**o+((-0.945421721921-0.589157227768j))*x[2]
+            ref[0, 1, 1, 2]=(-0.823366118544+0.735346315809j)*o*x_ref[2]**(o-1)+((-0.945421721921-0.589157227768j))
+            arg[0, 1, 2]+=(0.873937881535-0.80143995331j)*x[2]**o+((-0.585516606398+0.953193561419j))*x[2]
+            ref[0, 1, 2, 2]=(0.873937881535-0.80143995331j)*o*x_ref[2]**(o-1)+((-0.585516606398+0.953193561419j))
+            arg[0, 1, 3]+=(-0.916215551276-0.860714811675j)*x[2]**o+((0.525254617803-0.607344201264j))*x[2]
+            ref[0, 1, 3, 2]=(-0.916215551276-0.860714811675j)*o*x_ref[2]**(o-1)+((0.525254617803-0.607344201264j))
+            arg[0, 2, 0]+=(-0.426212504873+0.151441309828j)*x[2]**o+((-0.119916173053+0.994748070053j))*x[2]
+            ref[0, 2, 0, 2]=(-0.426212504873+0.151441309828j)*o*x_ref[2]**(o-1)+((-0.119916173053+0.994748070053j))
+            arg[0, 2, 1]+=(-0.378628230267-0.755455811546j)*x[2]**o+((-0.805381662645-0.830206184398j))*x[2]
+            ref[0, 2, 1, 2]=(-0.378628230267-0.755455811546j)*o*x_ref[2]**(o-1)+((-0.805381662645-0.830206184398j))
+            arg[0, 2, 2]+=(0.407140867128+0.766350631664j)*x[2]**o+((-0.405021122777-0.0303132926846j))*x[2]
+            ref[0, 2, 2, 2]=(0.407140867128+0.766350631664j)*o*x_ref[2]**(o-1)+((-0.405021122777-0.0303132926846j))
+            arg[0, 2, 3]+=(0.116876046283-0.22086999164j)*x[2]**o+((-0.971870769047+0.327417416912j))*x[2]
+            ref[0, 2, 3, 2]=(0.116876046283-0.22086999164j)*o*x_ref[2]**(o-1)+((-0.971870769047+0.327417416912j))
+            arg[0, 3, 0]+=(0.95910915872-0.666275773222j)*x[2]**o+((0.430814815283+0.72231770927j))*x[2]
+            ref[0, 3, 0, 2]=(0.95910915872-0.666275773222j)*o*x_ref[2]**(o-1)+((0.430814815283+0.72231770927j))
+            arg[0, 3, 1]+=(0.383330519422-0.152332456906j)*x[2]**o+((-0.497560974753-0.38187549882j))*x[2]
+            ref[0, 3, 1, 2]=(0.383330519422-0.152332456906j)*o*x_ref[2]**(o-1)+((-0.497560974753-0.38187549882j))
+            arg[0, 3, 2]+=(0.477512936713-0.294353758152j)*x[2]**o+((-0.437525679576+0.559033827242j))*x[2]
+            ref[0, 3, 2, 2]=(0.477512936713-0.294353758152j)*o*x_ref[2]**(o-1)+((-0.437525679576+0.559033827242j))
+            arg[0, 3, 3]+=(0.0492193463858+0.70812138943j)*x[2]**o+((0.372645245207-0.720997406906j))*x[2]
+            ref[0, 3, 3, 2]=(0.0492193463858+0.70812138943j)*o*x_ref[2]**(o-1)+((0.372645245207-0.720997406906j))
+            arg[1, 0, 0]+=(-0.51378066691+0.532842399898j)*x[2]**o+((-0.898865855392+0.83057413375j))*x[2]
+            ref[1, 0, 0, 2]=(-0.51378066691+0.532842399898j)*o*x_ref[2]**(o-1)+((-0.898865855392+0.83057413375j))
+            arg[1, 0, 1]+=(-0.594549758107+0.650561488916j)*x[2]**o+((0.0444539568476+0.177510261628j))*x[2]
+            ref[1, 0, 1, 2]=(-0.594549758107+0.650561488916j)*o*x_ref[2]**(o-1)+((0.0444539568476+0.177510261628j))
+            arg[1, 0, 2]+=(0.816206897878+0.344608582951j)*x[2]**o+((0.180773856597+0.288089755382j))*x[2]
+            ref[1, 0, 2, 2]=(0.816206897878+0.344608582951j)*o*x_ref[2]**(o-1)+((0.180773856597+0.288089755382j))
+            arg[1, 0, 3]+=(-0.5582654033-0.351786071392j)*x[2]**o+((-0.0256548429841+0.0904359119213j))*x[2]
+            ref[1, 0, 3, 2]=(-0.5582654033-0.351786071392j)*o*x_ref[2]**(o-1)+((-0.0256548429841+0.0904359119213j))
+            arg[1, 1, 0]+=(0.286700986447-0.956022687646j)*x[2]**o+((0.121449058017-0.288436729142j))*x[2]
+            ref[1, 1, 0, 2]=(0.286700986447-0.956022687646j)*o*x_ref[2]**(o-1)+((0.121449058017-0.288436729142j))
+            arg[1, 1, 1]+=(0.720134341969-0.505120751233j)*x[2]**o+((0.360498020959-0.784765090705j))*x[2]
+            ref[1, 1, 1, 2]=(0.720134341969-0.505120751233j)*o*x_ref[2]**(o-1)+((0.360498020959-0.784765090705j))
+            arg[1, 1, 2]+=(0.0169960013442-0.0340025572571j)*x[2]**o+((0.507659494466-0.216745652439j))*x[2]
+            ref[1, 1, 2, 2]=(0.0169960013442-0.0340025572571j)*o*x_ref[2]**(o-1)+((0.507659494466-0.216745652439j))
+            arg[1, 1, 3]+=(0.625592354503-0.959566188597j)*x[2]**o+((0.935302016321+0.795255326625j))*x[2]
+            ref[1, 1, 3, 2]=(0.625592354503-0.959566188597j)*o*x_ref[2]**(o-1)+((0.935302016321+0.795255326625j))
+            arg[1, 2, 0]+=(-0.919104396777-0.544160274063j)*x[2]**o+((0.0623496332865+0.55505779814j))*x[2]
+            ref[1, 2, 0, 2]=(-0.919104396777-0.544160274063j)*o*x_ref[2]**(o-1)+((0.0623496332865+0.55505779814j))
+            arg[1, 2, 1]+=(0.595973204175+0.735632140113j)*x[2]**o+((0.715223888624-0.190372262635j))*x[2]
+            ref[1, 2, 1, 2]=(0.595973204175+0.735632140113j)*o*x_ref[2]**(o-1)+((0.715223888624-0.190372262635j))
+            arg[1, 2, 2]+=(0.0433019786347+0.884559113827j)*x[2]**o+((-0.424092450068-0.761938004318j))*x[2]
+            ref[1, 2, 2, 2]=(0.0433019786347+0.884559113827j)*o*x_ref[2]**(o-1)+((-0.424092450068-0.761938004318j))
+            arg[1, 2, 3]+=(0.998096728527+0.994103931215j)*x[2]**o+((0.584688155023-0.589274334488j))*x[2]
+            ref[1, 2, 3, 2]=(0.998096728527+0.994103931215j)*o*x_ref[2]**(o-1)+((0.584688155023-0.589274334488j))
+            arg[1, 3, 0]+=(0.406725660388-0.722994919894j)*x[2]**o+((-0.260856299898-0.263178907397j))*x[2]
+            ref[1, 3, 0, 2]=(0.406725660388-0.722994919894j)*o*x_ref[2]**(o-1)+((-0.260856299898-0.263178907397j))
+            arg[1, 3, 1]+=(0.05411246465+0.156944822991j)*x[2]**o+((-0.613099873735-0.844706161087j))*x[2]
+            ref[1, 3, 1, 2]=(0.05411246465+0.156944822991j)*o*x_ref[2]**(o-1)+((-0.613099873735-0.844706161087j))
+            arg[1, 3, 2]+=(-0.12068933838+0.0635742795204j)*x[2]**o+((-0.954291823788-0.698763986043j))*x[2]
+            ref[1, 3, 2, 2]=(-0.12068933838+0.0635742795204j)*o*x_ref[2]**(o-1)+((-0.954291823788-0.698763986043j))
+            arg[1, 3, 3]+=(-0.383574181368-0.14677152042j)*x[2]**o+((0.45375777476-0.491192346976j))*x[2]
+            ref[1, 3, 3, 2]=(-0.383574181368-0.14677152042j)*o*x_ref[2]**(o-1)+((0.45375777476-0.491192346976j))
+            arg[2, 0, 0]+=(0.62929441392-0.304700086034j)*x[2]**o+((0.429195769088-0.229229194772j))*x[2]
+            ref[2, 0, 0, 2]=(0.62929441392-0.304700086034j)*o*x_ref[2]**(o-1)+((0.429195769088-0.229229194772j))
+            arg[2, 0, 1]+=(0.802619110886-0.270108385363j)*x[2]**o+((0.637048694147-0.826904170058j))*x[2]
+            ref[2, 0, 1, 2]=(0.802619110886-0.270108385363j)*o*x_ref[2]**(o-1)+((0.637048694147-0.826904170058j))
+            arg[2, 0, 2]+=(-0.15713726451-0.488043405048j)*x[2]**o+((-0.117631308976-0.66864274752j))*x[2]
+            ref[2, 0, 2, 2]=(-0.15713726451-0.488043405048j)*o*x_ref[2]**(o-1)+((-0.117631308976-0.66864274752j))
+            arg[2, 0, 3]+=(0.774325048864-0.0722606047027j)*x[2]**o+((0.302573780255-0.208255747763j))*x[2]
+            ref[2, 0, 3, 2]=(0.774325048864-0.0722606047027j)*o*x_ref[2]**(o-1)+((0.302573780255-0.208255747763j))
+            arg[2, 1, 0]+=(-0.157561482672-0.0794715623969j)*x[2]**o+((-0.47609524869-0.267335001172j))*x[2]
+            ref[2, 1, 0, 2]=(-0.157561482672-0.0794715623969j)*o*x_ref[2]**(o-1)+((-0.47609524869-0.267335001172j))
+            arg[2, 1, 1]+=(0.936429284394+0.393291725959j)*x[2]**o+((-0.692672637398+0.440916217609j))*x[2]
+            ref[2, 1, 1, 2]=(0.936429284394+0.393291725959j)*o*x_ref[2]**(o-1)+((-0.692672637398+0.440916217609j))
+            arg[2, 1, 2]+=(-0.183487922968+0.37889125623j)*x[2]**o+((0.502311680412+0.711219593228j))*x[2]
+            ref[2, 1, 2, 2]=(-0.183487922968+0.37889125623j)*o*x_ref[2]**(o-1)+((0.502311680412+0.711219593228j))
+            arg[2, 1, 3]+=(-0.584991349004-0.663671613957j)*x[2]**o+((0.14896626587-0.338994759792j))*x[2]
+            ref[2, 1, 3, 2]=(-0.584991349004-0.663671613957j)*o*x_ref[2]**(o-1)+((0.14896626587-0.338994759792j))
+            arg[2, 2, 0]+=(-0.116229621086-0.106553159367j)*x[2]**o+((0.853610578684+0.412084129905j))*x[2]
+            ref[2, 2, 0, 2]=(-0.116229621086-0.106553159367j)*o*x_ref[2]**(o-1)+((0.853610578684+0.412084129905j))
+            arg[2, 2, 1]+=(-0.982414295073+0.135094494252j)*x[2]**o+((0.492510771647+0.859305470483j))*x[2]
+            ref[2, 2, 1, 2]=(-0.982414295073+0.135094494252j)*o*x_ref[2]**(o-1)+((0.492510771647+0.859305470483j))
+            arg[2, 2, 2]+=(0.266891182135-0.577643575242j)*x[2]**o+((-0.303341967972-0.731404208801j))*x[2]
+            ref[2, 2, 2, 2]=(0.266891182135-0.577643575242j)*o*x_ref[2]**(o-1)+((-0.303341967972-0.731404208801j))
+            arg[2, 2, 3]+=(-0.164547699922-0.295713840784j)*x[2]**o+((-0.837475448535+0.636986085216j))*x[2]
+            ref[2, 2, 3, 2]=(-0.164547699922-0.295713840784j)*o*x_ref[2]**(o-1)+((-0.837475448535+0.636986085216j))
+            arg[2, 3, 0]+=(0.60272682729-0.34019279854j)*x[2]**o+((-0.487754169455+0.435191390782j))*x[2]
+            ref[2, 3, 0, 2]=(0.60272682729-0.34019279854j)*o*x_ref[2]**(o-1)+((-0.487754169455+0.435191390782j))
+            arg[2, 3, 1]+=(-0.731121444801-0.400467757244j)*x[2]**o+((0.477738605636-0.0128936892751j))*x[2]
+            ref[2, 3, 1, 2]=(-0.731121444801-0.400467757244j)*o*x_ref[2]**(o-1)+((0.477738605636-0.0128936892751j))
+            arg[2, 3, 2]+=(-0.569509226604-0.642241165255j)*x[2]**o+((-0.90137615674+0.857874212918j))*x[2]
+            ref[2, 3, 2, 2]=(-0.569509226604-0.642241165255j)*o*x_ref[2]**(o-1)+((-0.90137615674+0.857874212918j))
+            arg[2, 3, 3]+=(0.895905868548-0.584575623358j)*x[2]**o+((-0.659762149248+0.365407252957j))*x[2]
+            ref[2, 3, 3, 2]=(0.895905868548-0.584575623358j)*o*x_ref[2]**(o-1)+((-0.659762149248+0.365407252957j))
+            arg[3, 0, 0]+=(-0.430109617878+0.954829821575j)*x[2]**o+((0.979611610607+0.940290636492j))*x[2]
+            ref[3, 0, 0, 2]=(-0.430109617878+0.954829821575j)*o*x_ref[2]**(o-1)+((0.979611610607+0.940290636492j))
+            arg[3, 0, 1]+=(-0.127184355516+0.827804854529j)*x[2]**o+((-0.584769497286-0.734738830135j))*x[2]
+            ref[3, 0, 1, 2]=(-0.127184355516+0.827804854529j)*o*x_ref[2]**(o-1)+((-0.584769497286-0.734738830135j))
+            arg[3, 0, 2]+=(0.902081077428-0.57522174376j)*x[2]**o+((0.441826152399+0.57317898623j))*x[2]
+            ref[3, 0, 2, 2]=(0.902081077428-0.57522174376j)*o*x_ref[2]**(o-1)+((0.441826152399+0.57317898623j))
+            arg[3, 0, 3]+=(-0.265768088295-0.120725802124j)*x[2]**o+((0.043045125419-0.13170696763j))*x[2]
+            ref[3, 0, 3, 2]=(-0.265768088295-0.120725802124j)*o*x_ref[2]**(o-1)+((0.043045125419-0.13170696763j))
+            arg[3, 1, 0]+=(-0.732375858906-0.844741753134j)*x[2]**o+((0.186211163558+0.806378966308j))*x[2]
+            ref[3, 1, 0, 2]=(-0.732375858906-0.844741753134j)*o*x_ref[2]**(o-1)+((0.186211163558+0.806378966308j))
+            arg[3, 1, 1]+=(0.762149664255+0.46903474238j)*x[2]**o+((-0.903884362634+0.264811868965j))*x[2]
+            ref[3, 1, 1, 2]=(0.762149664255+0.46903474238j)*o*x_ref[2]**(o-1)+((-0.903884362634+0.264811868965j))
+            arg[3, 1, 2]+=(0.53859196676+0.922549393031j)*x[2]**o+((0.202741492186+0.511576360639j))*x[2]
+            ref[3, 1, 2, 2]=(0.53859196676+0.922549393031j)*o*x_ref[2]**(o-1)+((0.202741492186+0.511576360639j))
+            arg[3, 1, 3]+=(-0.441380536124-0.918562830191j)*x[2]**o+((0.439132745327+0.513985429257j))*x[2]
+            ref[3, 1, 3, 2]=(-0.441380536124-0.918562830191j)*o*x_ref[2]**(o-1)+((0.439132745327+0.513985429257j))
+            arg[3, 2, 0]+=(-0.0229122826294+0.968293761231j)*x[2]**o+((-0.289105501113+0.857589960344j))*x[2]
+            ref[3, 2, 0, 2]=(-0.0229122826294+0.968293761231j)*o*x_ref[2]**(o-1)+((-0.289105501113+0.857589960344j))
+            arg[3, 2, 1]+=(0.967562983336-0.942116524393j)*x[2]**o+((-0.48932265189+0.216931327914j))*x[2]
+            ref[3, 2, 1, 2]=(0.967562983336-0.942116524393j)*o*x_ref[2]**(o-1)+((-0.48932265189+0.216931327914j))
+            arg[3, 2, 2]+=(0.0364451201475-0.519754883299j)*x[2]**o+((-0.176096190391-0.314547207088j))*x[2]
+            ref[3, 2, 2, 2]=(0.0364451201475-0.519754883299j)*o*x_ref[2]**(o-1)+((-0.176096190391-0.314547207088j))
+            arg[3, 2, 3]+=(0.808317524565+0.140261484986j)*x[2]**o+((0.524484468733+0.617525711292j))*x[2]
+            ref[3, 2, 3, 2]=(0.808317524565+0.140261484986j)*o*x_ref[2]**(o-1)+((0.524484468733+0.617525711292j))
+            arg[3, 3, 0]+=(-0.72570203296-0.713789679584j)*x[2]**o+((-0.637119869663-0.200054224572j))*x[2]
+            ref[3, 3, 0, 2]=(-0.72570203296-0.713789679584j)*o*x_ref[2]**(o-1)+((-0.637119869663-0.200054224572j))
+            arg[3, 3, 1]+=(-0.870327513706+0.423892170854j)*x[2]**o+((0.181689627037+0.984903212835j))*x[2]
+            ref[3, 3, 1, 2]=(-0.870327513706+0.423892170854j)*o*x_ref[2]**(o-1)+((0.181689627037+0.984903212835j))
+            arg[3, 3, 2]+=(0.640407702374-0.0566120521824j)*x[2]**o+((-0.541368703513-0.714347399564j))*x[2]
+            ref[3, 3, 2, 2]=(0.640407702374-0.0566120521824j)*o*x_ref[2]**(o-1)+((-0.541368703513-0.714347399564j))
+            arg[3, 3, 3]+=(-0.75951562708+0.236227068191j)*x[2]**o+((-0.159891978339-0.506037118517j))*x[2]
+            ref[3, 3, 3, 2]=(-0.75951562708+0.236227068191j)*o*x_ref[2]**(o-1)+((-0.159891978339-0.506037118517j))
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(0.453253418313+0.331304151776j)*x[0]+((-0.69162922142+0.62486268007j))*x[1]
+        ref[0]=(0.453253418313+0.331304151776j)
+        ref[1]=(-0.69162922142+0.62486268007j)
+        if dim==3:
+            arg+=((-0.802006177857+0.833414184822j))*x[2]
+            ref[2]=(-0.802006177857+0.833414184822j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=(0.952692962255-0.357827689117j)*x[0]+((-0.458010109733-0.458002518462j))*x[1]
+        ref[0, 0]=(0.952692962255-0.357827689117j)
+        ref[0, 1]=(-0.458010109733-0.458002518462j)
+        arg[1,]=(0.403504366542-0.965927593128j)*x[0]+((-0.651102401316-0.234014101924j))*x[1]
+        ref[1, 0]=(0.403504366542-0.965927593128j)
+        ref[1, 1]=(-0.651102401316-0.234014101924j)
+        if dim==3:
+            arg[0,]+=(-0.468162307136+0.82195464742j)*x[2]
+            ref[0, 2]=(-0.468162307136+0.82195464742j)
+            arg[1,]+=(0.969144672194-0.975955609879j)*x[2]
+            ref[1, 2]=(0.969144672194-0.975955609879j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4)+(dim,),w_ref)
+        arg[0, 0]=(-0.588131392704-0.327998528972j)*x[0]+((0.0899587227752+0.197531491357j))*x[1]
+        ref[0, 0, 0]=(-0.588131392704-0.327998528972j)
+        ref[0, 0, 1]=(0.0899587227752+0.197531491357j)
+        arg[0, 1]=(-0.965106638453-0.00363545860889j)*x[0]+((0.994661561119+0.137923010873j))*x[1]
+        ref[0, 1, 0]=(-0.965106638453-0.00363545860889j)
+        ref[0, 1, 1]=(0.994661561119+0.137923010873j)
+        arg[0, 2]=(0.758429904564+0.418141612701j)*x[0]+((-0.178260960849-0.384860385323j))*x[1]
+        ref[0, 2, 0]=(0.758429904564+0.418141612701j)
+        ref[0, 2, 1]=(-0.178260960849-0.384860385323j)
+        arg[0, 3]=(-0.797063047851+0.161377831198j)*x[0]+((0.395592588514+0.16991132043j))*x[1]
+        ref[0, 3, 0]=(-0.797063047851+0.161377831198j)
+        ref[0, 3, 1]=(0.395592588514+0.16991132043j)
+        arg[1, 0]=(-0.689628525174-0.468458073717j)*x[0]+((0.209841444458-0.637717723773j))*x[1]
+        ref[1, 0, 0]=(-0.689628525174-0.468458073717j)
+        ref[1, 0, 1]=(0.209841444458-0.637717723773j)
+        arg[1, 1]=(0.884987718408-0.00407464817374j)*x[0]+((0.291358384492+0.973236343314j))*x[1]
+        ref[1, 1, 0]=(0.884987718408-0.00407464817374j)
+        ref[1, 1, 1]=(0.291358384492+0.973236343314j)
+        arg[1, 2]=(-0.607158956955-0.586965937695j)*x[0]+((-0.199288193673-0.883429325057j))*x[1]
+        ref[1, 2, 0]=(-0.607158956955-0.586965937695j)
+        ref[1, 2, 1]=(-0.199288193673-0.883429325057j)
+        arg[1, 3]=(0.805191511561-0.117940680412j)*x[0]+((-0.0514995981286-0.275305918521j))*x[1]
+        ref[1, 3, 0]=(0.805191511561-0.117940680412j)
+        ref[1, 3, 1]=(-0.0514995981286-0.275305918521j)
+        if dim==3:
+            arg[0, 0]+=(-0.167883367261-0.496083875143j)*x[2]
+            ref[0, 0, 2]=(-0.167883367261-0.496083875143j)
+            arg[0, 1]+=(-0.447161096331+0.514998108816j)*x[2]
+            ref[0, 1, 2]=(-0.447161096331+0.514998108816j)
+            arg[0, 2]+=(0.808133186247+0.196172936465j)*x[2]
+            ref[0, 2, 2]=(0.808133186247+0.196172936465j)
+            arg[0, 3]+=(-0.194508484723-0.656395889639j)*x[2]
+            ref[0, 3, 2]=(-0.194508484723-0.656395889639j)
+            arg[1, 0]+=(0.574034532846+0.352161223046j)*x[2]
+            ref[1, 0, 2]=(0.574034532846+0.352161223046j)
+            arg[1, 1]+=(-0.846400227712-0.67759665831j)*x[2]
+            ref[1, 1, 2]=(-0.846400227712-0.67759665831j)
+            arg[1, 2]+=(0.0615068678594+0.732161866584j)*x[2]
+            ref[1, 2, 2]=(0.0615068678594+0.732161866584j)
+            arg[1, 3]+=(0.469331276439-0.324235091576j)*x[2]
+            ref[1, 3, 2]=(0.469331276439-0.324235091576j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3),w)
+        ref = Data(0,(4, 3, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=(-0.795168924211-0.384448943908j)*x[0]+((-0.401318176153-0.432371528181j))*x[1]
+        ref[0, 0, 0, 0]=(-0.795168924211-0.384448943908j)
+        ref[0, 0, 0, 1]=(-0.401318176153-0.432371528181j)
+        arg[0, 0, 1]=(0.650720033446-0.412724448319j)*x[0]+((0.563446324338-0.783824857535j))*x[1]
+        ref[0, 0, 1, 0]=(0.650720033446-0.412724448319j)
+        ref[0, 0, 1, 1]=(0.563446324338-0.783824857535j)
+        arg[0, 0, 2]=(0.16329344984+0.914867597563j)*x[0]+((0.855362256244+0.443985114275j))*x[1]
+        ref[0, 0, 2, 0]=(0.16329344984+0.914867597563j)
+        ref[0, 0, 2, 1]=(0.855362256244+0.443985114275j)
+        arg[0, 1, 0]=(0.151202797595+0.896646596936j)*x[0]+((0.894181113467-0.600183307898j))*x[1]
+        ref[0, 1, 0, 0]=(0.151202797595+0.896646596936j)
+        ref[0, 1, 0, 1]=(0.894181113467-0.600183307898j)
+        arg[0, 1, 1]=(-0.973207432163-0.315538995279j)*x[0]+((0.777712202897+0.513750433542j))*x[1]
+        ref[0, 1, 1, 0]=(-0.973207432163-0.315538995279j)
+        ref[0, 1, 1, 1]=(0.777712202897+0.513750433542j)
+        arg[0, 1, 2]=(-0.856186088085-0.18100858857j)*x[0]+((-0.581843042671+0.372428441811j))*x[1]
+        ref[0, 1, 2, 0]=(-0.856186088085-0.18100858857j)
+        ref[0, 1, 2, 1]=(-0.581843042671+0.372428441811j)
+        arg[0, 2, 0]=(0.780985435493+0.748261075498j)*x[0]+((0.785111068424+0.026066408576j))*x[1]
+        ref[0, 2, 0, 0]=(0.780985435493+0.748261075498j)
+        ref[0, 2, 0, 1]=(0.785111068424+0.026066408576j)
+        arg[0, 2, 1]=(0.399534686602+0.0256401418344j)*x[0]+((-0.652915180379+0.322370573826j))*x[1]
+        ref[0, 2, 1, 0]=(0.399534686602+0.0256401418344j)
+        ref[0, 2, 1, 1]=(-0.652915180379+0.322370573826j)
+        arg[0, 2, 2]=(-0.695049670727-0.0126142167871j)*x[0]+((-0.835761842261-0.593650196085j))*x[1]
+        ref[0, 2, 2, 0]=(-0.695049670727-0.0126142167871j)
+        ref[0, 2, 2, 1]=(-0.835761842261-0.593650196085j)
+        arg[1, 0, 0]=(-0.0721096492033+0.613094510448j)*x[0]+((-0.568197938526+0.89858363354j))*x[1]
+        ref[1, 0, 0, 0]=(-0.0721096492033+0.613094510448j)
+        ref[1, 0, 0, 1]=(-0.568197938526+0.89858363354j)
+        arg[1, 0, 1]=(-0.873143607179-0.401692215095j)*x[0]+((-0.53801419+0.903972642767j))*x[1]
+        ref[1, 0, 1, 0]=(-0.873143607179-0.401692215095j)
+        ref[1, 0, 1, 1]=(-0.53801419+0.903972642767j)
+        arg[1, 0, 2]=(-0.370754361558-0.449558945868j)*x[0]+((-0.260863511908-0.112504768964j))*x[1]
+        ref[1, 0, 2, 0]=(-0.370754361558-0.449558945868j)
+        ref[1, 0, 2, 1]=(-0.260863511908-0.112504768964j)
+        arg[1, 1, 0]=(-0.964289133368+0.0265647717651j)*x[0]+((-0.999308562528-0.807576325786j))*x[1]
+        ref[1, 1, 0, 0]=(-0.964289133368+0.0265647717651j)
+        ref[1, 1, 0, 1]=(-0.999308562528-0.807576325786j)
+        arg[1, 1, 1]=(0.857391977422-0.0861833375792j)*x[0]+((-0.301032320383-0.735414777865j))*x[1]
+        ref[1, 1, 1, 0]=(0.857391977422-0.0861833375792j)
+        ref[1, 1, 1, 1]=(-0.301032320383-0.735414777865j)
+        arg[1, 1, 2]=(-0.267253403702-0.0497270560257j)*x[0]+((-0.817541554408+0.798627804659j))*x[1]
+        ref[1, 1, 2, 0]=(-0.267253403702-0.0497270560257j)
+        ref[1, 1, 2, 1]=(-0.817541554408+0.798627804659j)
+        arg[1, 2, 0]=(-0.231717620514-0.920941160873j)*x[0]+((-0.0984952955387-0.409566158519j))*x[1]
+        ref[1, 2, 0, 0]=(-0.231717620514-0.920941160873j)
+        ref[1, 2, 0, 1]=(-0.0984952955387-0.409566158519j)
+        arg[1, 2, 1]=(0.035272128981+0.443273090179j)*x[0]+((0.934479321623-0.0073799479509j))*x[1]
+        ref[1, 2, 1, 0]=(0.035272128981+0.443273090179j)
+        ref[1, 2, 1, 1]=(0.934479321623-0.0073799479509j)
+        arg[1, 2, 2]=(0.322742318349-0.516630935358j)*x[0]+((0.248545967011+0.890881036571j))*x[1]
+        ref[1, 2, 2, 0]=(0.322742318349-0.516630935358j)
+        ref[1, 2, 2, 1]=(0.248545967011+0.890881036571j)
+        arg[2, 0, 0]=(0.314647813389+0.689738563251j)*x[0]+((0.408450682037+0.911880392417j))*x[1]
+        ref[2, 0, 0, 0]=(0.314647813389+0.689738563251j)
+        ref[2, 0, 0, 1]=(0.408450682037+0.911880392417j)
+        arg[2, 0, 1]=(-0.824624156879-0.456120908398j)*x[0]+((-0.716429158827+0.0271075674677j))*x[1]
+        ref[2, 0, 1, 0]=(-0.824624156879-0.456120908398j)
+        ref[2, 0, 1, 1]=(-0.716429158827+0.0271075674677j)
+        arg[2, 0, 2]=(-0.999517522103+0.0611061736877j)*x[0]+((-0.335550289511-0.00348248113652j))*x[1]
+        ref[2, 0, 2, 0]=(-0.999517522103+0.0611061736877j)
+        ref[2, 0, 2, 1]=(-0.335550289511-0.00348248113652j)
+        arg[2, 1, 0]=(0.853567774894+0.241851221025j)*x[0]+((-0.572610228608-0.896559738096j))*x[1]
+        ref[2, 1, 0, 0]=(0.853567774894+0.241851221025j)
+        ref[2, 1, 0, 1]=(-0.572610228608-0.896559738096j)
+        arg[2, 1, 1]=(0.582761158084+0.821669855931j)*x[0]+((-0.342647797652+0.871608708356j))*x[1]
+        ref[2, 1, 1, 0]=(0.582761158084+0.821669855931j)
+        ref[2, 1, 1, 1]=(-0.342647797652+0.871608708356j)
+        arg[2, 1, 2]=(0.683359546581+0.527470900574j)*x[0]+((0.2994947947-0.20806796774j))*x[1]
+        ref[2, 1, 2, 0]=(0.683359546581+0.527470900574j)
+        ref[2, 1, 2, 1]=(0.2994947947-0.20806796774j)
+        arg[2, 2, 0]=(0.288173284833-0.683588294619j)*x[0]+((0.677737850815-0.402538608336j))*x[1]
+        ref[2, 2, 0, 0]=(0.288173284833-0.683588294619j)
+        ref[2, 2, 0, 1]=(0.677737850815-0.402538608336j)
+        arg[2, 2, 1]=(0.643792009424+0.990108195115j)*x[0]+((0.332219349288+0.833557856356j))*x[1]
+        ref[2, 2, 1, 0]=(0.643792009424+0.990108195115j)
+        ref[2, 2, 1, 1]=(0.332219349288+0.833557856356j)
+        arg[2, 2, 2]=(0.884389087946+0.815644787765j)*x[0]+((0.493848153004+0.613490446809j))*x[1]
+        ref[2, 2, 2, 0]=(0.884389087946+0.815644787765j)
+        ref[2, 2, 2, 1]=(0.493848153004+0.613490446809j)
+        arg[3, 0, 0]=(0.157232186856-0.909419767114j)*x[0]+((-0.533510850938+0.0388717760515j))*x[1]
+        ref[3, 0, 0, 0]=(0.157232186856-0.909419767114j)
+        ref[3, 0, 0, 1]=(-0.533510850938+0.0388717760515j)
+        arg[3, 0, 1]=(0.408715291545-0.171479713678j)*x[0]+((0.990835910677+0.719423478031j))*x[1]
+        ref[3, 0, 1, 0]=(0.408715291545-0.171479713678j)
+        ref[3, 0, 1, 1]=(0.990835910677+0.719423478031j)
+        arg[3, 0, 2]=(0.619805360283-0.566796138297j)*x[0]+((-0.309685870967-0.859974894717j))*x[1]
+        ref[3, 0, 2, 0]=(0.619805360283-0.566796138297j)
+        ref[3, 0, 2, 1]=(-0.309685870967-0.859974894717j)
+        arg[3, 1, 0]=(0.61357223275-0.952327686422j)*x[0]+((0.891713226846+0.132719644772j))*x[1]
+        ref[3, 1, 0, 0]=(0.61357223275-0.952327686422j)
+        ref[3, 1, 0, 1]=(0.891713226846+0.132719644772j)
+        arg[3, 1, 1]=(-0.775519187077-0.910982745767j)*x[0]+((0.0873144849149-0.992494747347j))*x[1]
+        ref[3, 1, 1, 0]=(-0.775519187077-0.910982745767j)
+        ref[3, 1, 1, 1]=(0.0873144849149-0.992494747347j)
+        arg[3, 1, 2]=(-0.0910450109383+0.507293905937j)*x[0]+((-0.35808449186+0.662429762454j))*x[1]
+        ref[3, 1, 2, 0]=(-0.0910450109383+0.507293905937j)
+        ref[3, 1, 2, 1]=(-0.35808449186+0.662429762454j)
+        arg[3, 2, 0]=(-0.961415687424-0.231281784584j)*x[0]+((-0.811758435649-0.525209712154j))*x[1]
+        ref[3, 2, 0, 0]=(-0.961415687424-0.231281784584j)
+        ref[3, 2, 0, 1]=(-0.811758435649-0.525209712154j)
+        arg[3, 2, 1]=(0.1220021683+0.852222220604j)*x[0]+((-0.690107341821-0.131110589645j))*x[1]
+        ref[3, 2, 1, 0]=(0.1220021683+0.852222220604j)
+        ref[3, 2, 1, 1]=(-0.690107341821-0.131110589645j)
+        arg[3, 2, 2]=(-0.293811153338-0.406880003073j)*x[0]+((0.0150473321543-0.5001647647j))*x[1]
+        ref[3, 2, 2, 0]=(-0.293811153338-0.406880003073j)
+        ref[3, 2, 2, 1]=(0.0150473321543-0.5001647647j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.223976662745-0.034997159451j)*x[2]
+            ref[0, 0, 0, 2]=(0.223976662745-0.034997159451j)
+            arg[0, 0, 1]+=(-0.183179018225-0.49659995064j)*x[2]
+            ref[0, 0, 1, 2]=(-0.183179018225-0.49659995064j)
+            arg[0, 0, 2]+=(-0.00536697837257-0.605019355012j)*x[2]
+            ref[0, 0, 2, 2]=(-0.00536697837257-0.605019355012j)
+            arg[0, 1, 0]+=(-0.29394616202-0.61778441132j)*x[2]
+            ref[0, 1, 0, 2]=(-0.29394616202-0.61778441132j)
+            arg[0, 1, 1]+=(-0.00854744914657-0.329977148385j)*x[2]
+            ref[0, 1, 1, 2]=(-0.00854744914657-0.329977148385j)
+            arg[0, 1, 2]+=(0.408005391019+0.654245103679j)*x[2]
+            ref[0, 1, 2, 2]=(0.408005391019+0.654245103679j)
+            arg[0, 2, 0]+=(0.701930523934-0.788752076646j)*x[2]
+            ref[0, 2, 0, 2]=(0.701930523934-0.788752076646j)
+            arg[0, 2, 1]+=(0.755159149152-0.741815510961j)*x[2]
+            ref[0, 2, 1, 2]=(0.755159149152-0.741815510961j)
+            arg[0, 2, 2]+=(0.75231929905+0.511725603814j)*x[2]
+            ref[0, 2, 2, 2]=(0.75231929905+0.511725603814j)
+            arg[1, 0, 0]+=(-0.592277520104+0.584986268684j)*x[2]
+            ref[1, 0, 0, 2]=(-0.592277520104+0.584986268684j)
+            arg[1, 0, 1]+=(0.360820378086+0.386759752707j)*x[2]
+            ref[1, 0, 1, 2]=(0.360820378086+0.386759752707j)
+            arg[1, 0, 2]+=(-0.522819822016-0.0877297640044j)*x[2]
+            ref[1, 0, 2, 2]=(-0.522819822016-0.0877297640044j)
+            arg[1, 1, 0]+=(0.246957302815-0.286057312514j)*x[2]
+            ref[1, 1, 0, 2]=(0.246957302815-0.286057312514j)
+            arg[1, 1, 1]+=(0.346172335188+0.699279409106j)*x[2]
+            ref[1, 1, 1, 2]=(0.346172335188+0.699279409106j)
+            arg[1, 1, 2]+=(0.314438499318+0.257271901613j)*x[2]
+            ref[1, 1, 2, 2]=(0.314438499318+0.257271901613j)
+            arg[1, 2, 0]+=(-0.56491050044-0.367160500259j)*x[2]
+            ref[1, 2, 0, 2]=(-0.56491050044-0.367160500259j)
+            arg[1, 2, 1]+=(0.77990889978+0.328566480434j)*x[2]
+            ref[1, 2, 1, 2]=(0.77990889978+0.328566480434j)
+            arg[1, 2, 2]+=(0.00725863471129+0.737235709476j)*x[2]
+            ref[1, 2, 2, 2]=(0.00725863471129+0.737235709476j)
+            arg[2, 0, 0]+=(0.367067029509+0.490530312075j)*x[2]
+            ref[2, 0, 0, 2]=(0.367067029509+0.490530312075j)
+            arg[2, 0, 1]+=(-0.235925400505+0.391426685681j)*x[2]
+            ref[2, 0, 1, 2]=(-0.235925400505+0.391426685681j)
+            arg[2, 0, 2]+=(-0.714431651698-0.108888387923j)*x[2]
+            ref[2, 0, 2, 2]=(-0.714431651698-0.108888387923j)
+            arg[2, 1, 0]+=(0.783668171495-0.860138666152j)*x[2]
+            ref[2, 1, 0, 2]=(0.783668171495-0.860138666152j)
+            arg[2, 1, 1]+=(-0.540629546044-0.914348856761j)*x[2]
+            ref[2, 1, 1, 2]=(-0.540629546044-0.914348856761j)
+            arg[2, 1, 2]+=(-0.713711875384+0.831964670804j)*x[2]
+            ref[2, 1, 2, 2]=(-0.713711875384+0.831964670804j)
+            arg[2, 2, 0]+=(-0.864244955703-0.394643871472j)*x[2]
+            ref[2, 2, 0, 2]=(-0.864244955703-0.394643871472j)
+            arg[2, 2, 1]+=(0.630355907131+0.79078988226j)*x[2]
+            ref[2, 2, 1, 2]=(0.630355907131+0.79078988226j)
+            arg[2, 2, 2]+=(-0.178287089118-0.847201469542j)*x[2]
+            ref[2, 2, 2, 2]=(-0.178287089118-0.847201469542j)
+            arg[3, 0, 0]+=(0.137980502106+0.583123150573j)*x[2]
+            ref[3, 0, 0, 2]=(0.137980502106+0.583123150573j)
+            arg[3, 0, 1]+=(-0.719813295164-0.987207922182j)*x[2]
+            ref[3, 0, 1, 2]=(-0.719813295164-0.987207922182j)
+            arg[3, 0, 2]+=(0.24029967022-0.196194075932j)*x[2]
+            ref[3, 0, 2, 2]=(0.24029967022-0.196194075932j)
+            arg[3, 1, 0]+=(0.562862255502+0.536331084159j)*x[2]
+            ref[3, 1, 0, 2]=(0.562862255502+0.536331084159j)
+            arg[3, 1, 1]+=(0.458516010173-0.045768650724j)*x[2]
+            ref[3, 1, 1, 2]=(0.458516010173-0.045768650724j)
+            arg[3, 1, 2]+=(0.358771442745+0.532940877868j)*x[2]
+            ref[3, 1, 2, 2]=(0.358771442745+0.532940877868j)
+            arg[3, 2, 0]+=(0.132246883121+0.443631270027j)*x[2]
+            ref[3, 2, 0, 2]=(0.132246883121+0.443631270027j)
+            arg[3, 2, 1]+=(0.445661887828+0.648020723611j)*x[2]
+            ref[3, 2, 1, 2]=(0.445661887828+0.648020723611j)
+            arg[3, 2, 2]+=(-0.933186417071-0.999955004209j)*x[2]
+            ref[3, 2, 2, 2]=(-0.933186417071-0.999955004209j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=(-0.0107864031318+0.931555773482j)*x[0]+((0.141825846162-0.817205635248j))*x[1]
+        ref[0]=(-0.0107864031318+0.931555773482j)
+        ref[1]=(0.141825846162-0.817205635248j)
+        if dim==3:
+            arg+=((0.224551233084-0.778811778471j))*x[2]
+            ref[2]=(0.224551233084-0.778811778471j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=(-0.350302982263+0.274877957202j)*x[0]+((0.61974597633-0.534630605911j))*x[1]
+        ref[0, 0]=(-0.350302982263+0.274877957202j)
+        ref[0, 1]=(0.61974597633-0.534630605911j)
+        arg[1,]=(-0.913780438687-0.0142515775489j)*x[0]+((0.505433625229-0.898451786291j))*x[1]
+        ref[1, 0]=(-0.913780438687-0.0142515775489j)
+        ref[1, 1]=(0.505433625229-0.898451786291j)
+        arg[2,]=(-0.687252535091-0.601225917424j)*x[0]+((0.23540523556-0.562841498025j))*x[1]
+        ref[2, 0]=(-0.687252535091-0.601225917424j)
+        ref[2, 1]=(0.23540523556-0.562841498025j)
+        arg[3,]=(-0.233643274243+0.946478800237j)*x[0]+((0.571907329859+0.17946569267j))*x[1]
+        ref[3, 0]=(-0.233643274243+0.946478800237j)
+        ref[3, 1]=(0.571907329859+0.17946569267j)
+        if dim==3:
+            arg[0,]+=(-0.736980222367-0.607186852666j)*x[2]
+            ref[0, 2]=(-0.736980222367-0.607186852666j)
+            arg[1,]+=(-0.163160012307+0.0513553190601j)*x[2]
+            ref[1, 2]=(-0.163160012307+0.0513553190601j)
+            arg[2,]+=(0.825614629685+0.476708472293j)*x[2]
+            ref[2, 2]=(0.825614629685+0.476708472293j)
+            arg[3,]+=(-0.721854307434-0.114602239933j)*x[2]
+            ref[3, 2]=(-0.721854307434-0.114602239933j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3)+(dim,),w_ref)
+        arg[0, 0]=(0.15737664091-0.724256530133j)*x[0]+((-0.690000197978+0.671275051795j))*x[1]
+        ref[0, 0, 0]=(0.15737664091-0.724256530133j)
+        ref[0, 0, 1]=(-0.690000197978+0.671275051795j)
+        arg[0, 1]=(0.168080043372+0.993565153192j)*x[0]+((0.964943767375+0.466932107715j))*x[1]
+        ref[0, 1, 0]=(0.168080043372+0.993565153192j)
+        ref[0, 1, 1]=(0.964943767375+0.466932107715j)
+        arg[0, 2]=(-0.416831344092-0.247518858479j)*x[0]+((-0.740817805861+0.682079928696j))*x[1]
+        ref[0, 2, 0]=(-0.416831344092-0.247518858479j)
+        ref[0, 2, 1]=(-0.740817805861+0.682079928696j)
+        arg[1, 0]=(0.432853392977+0.986126728342j)*x[0]+((0.864482269768-0.782199873165j))*x[1]
+        ref[1, 0, 0]=(0.432853392977+0.986126728342j)
+        ref[1, 0, 1]=(0.864482269768-0.782199873165j)
+        arg[1, 1]=(-0.697993674026-0.945299829006j)*x[0]+((0.644534716179+0.191659047176j))*x[1]
+        ref[1, 1, 0]=(-0.697993674026-0.945299829006j)
+        ref[1, 1, 1]=(0.644534716179+0.191659047176j)
+        arg[1, 2]=(-0.314744913315-0.243081770768j)*x[0]+((-0.546597761586+0.250718305139j))*x[1]
+        ref[1, 2, 0]=(-0.314744913315-0.243081770768j)
+        ref[1, 2, 1]=(-0.546597761586+0.250718305139j)
+        arg[2, 0]=(-0.572871947503+0.0231673804812j)*x[0]+((0.0154783370486-0.999295724646j))*x[1]
+        ref[2, 0, 0]=(-0.572871947503+0.0231673804812j)
+        ref[2, 0, 1]=(0.0154783370486-0.999295724646j)
+        arg[2, 1]=(0.467476459881+0.777265597374j)*x[0]+((-0.80789145438+0.124245832797j))*x[1]
+        ref[2, 1, 0]=(0.467476459881+0.777265597374j)
+        ref[2, 1, 1]=(-0.80789145438+0.124245832797j)
+        arg[2, 2]=(-0.174430786428+0.242028716717j)*x[0]+((0.955990400914-0.979510813213j))*x[1]
+        ref[2, 2, 0]=(-0.174430786428+0.242028716717j)
+        ref[2, 2, 1]=(0.955990400914-0.979510813213j)
+        if dim==3:
+            arg[0, 0]+=(0.915427356267-0.977403394903j)*x[2]
+            ref[0, 0, 2]=(0.915427356267-0.977403394903j)
+            arg[0, 1]+=(0.696658749798+0.428893550058j)*x[2]
+            ref[0, 1, 2]=(0.696658749798+0.428893550058j)
+            arg[0, 2]+=(0.201225351875+0.934238666633j)*x[2]
+            ref[0, 2, 2]=(0.201225351875+0.934238666633j)
+            arg[1, 0]+=(0.467478100697-0.00327930067269j)*x[2]
+            ref[1, 0, 2]=(0.467478100697-0.00327930067269j)
+            arg[1, 1]+=(-0.304769757825-0.879216613789j)*x[2]
+            ref[1, 1, 2]=(-0.304769757825-0.879216613789j)
+            arg[1, 2]+=(-0.451782824422-0.929162834256j)*x[2]
+            ref[1, 2, 2]=(-0.451782824422-0.929162834256j)
+            arg[2, 0]+=(0.14443444204+0.378854466798j)*x[2]
+            ref[2, 0, 2]=(0.14443444204+0.378854466798j)
+            arg[2, 1]+=(-0.65195564449-0.290611251933j)*x[2]
+            ref[2, 1, 2]=(-0.65195564449-0.290611251933j)
+            arg[2, 2]+=(-0.44132694257+0.543496599681j)*x[2]
+            ref[2, 2, 2]=(-0.44132694257+0.543496599681j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_gradC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=(0.337695874284+0.16592267312j)*x[0]+((-0.599511285491-0.45983809803j))*x[1]
+        ref[0, 0, 0, 0]=(0.337695874284+0.16592267312j)
+        ref[0, 0, 0, 1]=(-0.599511285491-0.45983809803j)
+        arg[0, 0, 1]=(0.71056360491+0.21427579913j)*x[0]+((0.277627671593+0.745828906668j))*x[1]
+        ref[0, 0, 1, 0]=(0.71056360491+0.21427579913j)
+        ref[0, 0, 1, 1]=(0.277627671593+0.745828906668j)
+        arg[0, 1, 0]=(0.72539953261+0.820317512764j)*x[0]+((0.873421998719+0.261591478198j))*x[1]
+        ref[0, 1, 0, 0]=(0.72539953261+0.820317512764j)
+        ref[0, 1, 0, 1]=(0.873421998719+0.261591478198j)
+        arg[0, 1, 1]=(-0.0150585601996-0.291877425046j)*x[0]+((-0.769227286725+0.714059406571j))*x[1]
+        ref[0, 1, 1, 0]=(-0.0150585601996-0.291877425046j)
+        ref[0, 1, 1, 1]=(-0.769227286725+0.714059406571j)
+        arg[0, 2, 0]=(-0.238386985906+0.272324846282j)*x[0]+((-0.316544340425-0.26354903668j))*x[1]
+        ref[0, 2, 0, 0]=(-0.238386985906+0.272324846282j)
+        ref[0, 2, 0, 1]=(-0.316544340425-0.26354903668j)
+        arg[0, 2, 1]=(0.428565487744+0.349510278032j)*x[0]+((-0.211604303491-0.280642432548j))*x[1]
+        ref[0, 2, 1, 0]=(0.428565487744+0.349510278032j)
+        ref[0, 2, 1, 1]=(-0.211604303491-0.280642432548j)
+        arg[1, 0, 0]=(0.368511951936+0.74168824693j)*x[0]+((0.935331165398+0.57331038597j))*x[1]
+        ref[1, 0, 0, 0]=(0.368511951936+0.74168824693j)
+        ref[1, 0, 0, 1]=(0.935331165398+0.57331038597j)
+        arg[1, 0, 1]=(-0.81482734385-0.958635729657j)*x[0]+((0.0509902509956-0.946602753076j))*x[1]
+        ref[1, 0, 1, 0]=(-0.81482734385-0.958635729657j)
+        ref[1, 0, 1, 1]=(0.0509902509956-0.946602753076j)
+        arg[1, 1, 0]=(0.949082384971+0.0787300595228j)*x[0]+((-0.620048743802-0.450171467398j))*x[1]
+        ref[1, 1, 0, 0]=(0.949082384971+0.0787300595228j)
+        ref[1, 1, 0, 1]=(-0.620048743802-0.450171467398j)
+        arg[1, 1, 1]=(-0.161887076524+0.917134432281j)*x[0]+((-0.54569580765+0.673102656524j))*x[1]
+        ref[1, 1, 1, 0]=(-0.161887076524+0.917134432281j)
+        ref[1, 1, 1, 1]=(-0.54569580765+0.673102656524j)
+        arg[1, 2, 0]=(0.045862497225+0.579045211895j)*x[0]+((-0.815532320742-0.156307331335j))*x[1]
+        ref[1, 2, 0, 0]=(0.045862497225+0.579045211895j)
+        ref[1, 2, 0, 1]=(-0.815532320742-0.156307331335j)
+        arg[1, 2, 1]=(-0.652335409264+0.466683417854j)*x[0]+((0.0151314173764-0.424417374401j))*x[1]
+        ref[1, 2, 1, 0]=(-0.652335409264+0.466683417854j)
+        ref[1, 2, 1, 1]=(0.0151314173764-0.424417374401j)
+        if dim==3:
+            arg[0, 0, 0]+=(0.700227490259-0.618398600213j)*x[2]
+            ref[0, 0, 0, 2]=(0.700227490259-0.618398600213j)
+            arg[0, 0, 1]+=(0.56367495616-0.814971531399j)*x[2]
+            ref[0, 0, 1, 2]=(0.56367495616-0.814971531399j)
+            arg[0, 1, 0]+=(-0.800829753388+0.65126907681j)*x[2]
+            ref[0, 1, 0, 2]=(-0.800829753388+0.65126907681j)
+            arg[0, 1, 1]+=(-0.669706384523-0.594751069339j)*x[2]
+            ref[0, 1, 1, 2]=(-0.669706384523-0.594751069339j)
+            arg[0, 2, 0]+=(0.614692494435-0.56118582725j)*x[2]
+            ref[0, 2, 0, 2]=(0.614692494435-0.56118582725j)
+            arg[0, 2, 1]+=(0.385753724578+0.0371634587648j)*x[2]
+            ref[0, 2, 1, 2]=(0.385753724578+0.0371634587648j)
+            arg[1, 0, 0]+=(0.889103744478+0.672609383416j)*x[2]
+            ref[1, 0, 0, 2]=(0.889103744478+0.672609383416j)
+            arg[1, 0, 1]+=(-0.306783518539+0.473445204286j)*x[2]
+            ref[1, 0, 1, 2]=(-0.306783518539+0.473445204286j)
+            arg[1, 1, 0]+=(-0.777811020005+0.252169530562j)*x[2]
+            ref[1, 1, 0, 2]=(-0.777811020005+0.252169530562j)
+            arg[1, 1, 1]+=(-0.498404270551+0.194459987866j)*x[2]
+            ref[1, 1, 1, 2]=(-0.498404270551+0.194459987866j)
+            arg[1, 2, 0]+=(-0.997058720934+0.758581907873j)*x[2]
+            ref[1, 2, 0, 2]=(-0.997058720934+0.758581907873j)
+            arg[1, 2, 1]+=(-0.683246241617-0.70876211378j)*x[2]
+            ref[1, 2, 1, 2]=(-0.683246241617-0.70876211378j)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.642983494129*x[0]**o+(0.588159997828)*x[0]+(0.275203024481)*x[1]**o+(0.0717888936012)*x[1]
+        ref[0]=-0.642983494129*o*x_ref[0]**(o-1)+(0.588159997828)
+        ref[1]=0.275203024481*o*x_ref[1]**(o-1)+(0.0717888936012)
+        if dim==3:
+            arg+=(0.858097814991)*x[2]**o+(-0.550332987458)*x[2]
+            ref[2]=0.858097814991*o*x_ref[2]**(o-1)+(-0.550332987458)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=0.448884133383*x[0]**o+(0.957869771265)*x[0]+(0.189283461872)*x[1]**o+(-0.805302362971)*x[1]
+        ref[0, 0]=0.448884133383*o*x_ref[0]**(o-1)+(0.957869771265)
+        ref[0, 1]=0.189283461872*o*x_ref[1]**(o-1)+(-0.805302362971)
+        arg[1,]=0.0282825124276*x[0]**o+(0.0368692844946)*x[0]+(0.326661058707)*x[1]**o+(-0.172860705226)*x[1]
+        ref[1, 0]=0.0282825124276*o*x_ref[0]**(o-1)+(0.0368692844946)
+        ref[1, 1]=0.326661058707*o*x_ref[1]**(o-1)+(-0.172860705226)
+        arg[2,]=0.298691375048*x[0]**o+(0.269935398339)*x[0]+(-0.813035280309)*x[1]**o+(0.789779508851)*x[1]
+        ref[2, 0]=0.298691375048*o*x_ref[0]**(o-1)+(0.269935398339)
+        ref[2, 1]=-0.813035280309*o*x_ref[1]**(o-1)+(0.789779508851)
+        arg[3,]=0.0109600857014*x[0]**o+(0.394279244195)*x[0]+(-0.746687373101)*x[1]**o+(-0.605565113946)*x[1]
+        ref[3, 0]=0.0109600857014*o*x_ref[0]**(o-1)+(0.394279244195)
+        ref[3, 1]=-0.746687373101*o*x_ref[1]**(o-1)+(-0.605565113946)
+        if dim==3:
+            arg[0,]+=-0.512966723617*x[2]**o+(-0.175892650288)*x[2]
+            ref[0, 2]=-0.512966723617*o*x_ref[2]**(o-1)+(-0.175892650288)
+            arg[1,]+=0.598140030605*x[2]**o+(-0.922067331148)*x[2]
+            ref[1, 2]=0.598140030605*o*x_ref[2]**(o-1)+(-0.922067331148)
+            arg[2,]+=0.955164679502*x[2]**o+(0.170554134918)*x[2]
+            ref[2, 2]=0.955164679502*o*x_ref[2]**(o-1)+(0.170554134918)
+            arg[3,]+=0.53169018607*x[2]**o+(0.477549966688)*x[2]
+            ref[3, 2]=0.53169018607*o*x_ref[2]**(o-1)+(0.477549966688)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=-0.411855280029*x[0]**o+(0.397032166995)*x[0]+(0.593691759921)*x[1]**o+(0.515455271833)*x[1]
+        ref[0, 0, 0]=-0.411855280029*o*x_ref[0]**(o-1)+(0.397032166995)
+        ref[0, 0, 1]=0.593691759921*o*x_ref[1]**(o-1)+(0.515455271833)
+        arg[0, 1]=-0.881874066901*x[0]**o+(0.412406579973)*x[0]+(0.29085363694)*x[1]**o+(-0.523566102314)*x[1]
+        ref[0, 1, 0]=-0.881874066901*o*x_ref[0]**(o-1)+(0.412406579973)
+        ref[0, 1, 1]=0.29085363694*o*x_ref[1]**(o-1)+(-0.523566102314)
+        arg[0, 2]=-0.502990417924*x[0]**o+(0.30928682494)*x[0]+(0.561874734026)*x[1]**o+(0.58115535525)*x[1]
+        ref[0, 2, 0]=-0.502990417924*o*x_ref[0]**(o-1)+(0.30928682494)
+        ref[0, 2, 1]=0.561874734026*o*x_ref[1]**(o-1)+(0.58115535525)
+        arg[0, 3]=-0.470818417102*x[0]**o+(0.818306867141)*x[0]+(0.826726104603)*x[1]**o+(-0.556096244599)*x[1]
+        ref[0, 3, 0]=-0.470818417102*o*x_ref[0]**(o-1)+(0.818306867141)
+        ref[0, 3, 1]=0.826726104603*o*x_ref[1]**(o-1)+(-0.556096244599)
+        arg[1, 0]=0.184542540303*x[0]**o+(0.940293660429)*x[0]+(-0.71786288627)*x[1]**o+(-0.00609166134939)*x[1]
+        ref[1, 0, 0]=0.184542540303*o*x_ref[0]**(o-1)+(0.940293660429)
+        ref[1, 0, 1]=-0.71786288627*o*x_ref[1]**(o-1)+(-0.00609166134939)
+        arg[1, 1]=0.590521314339*x[0]**o+(-0.98595365692)*x[0]+(0.903053999267)*x[1]**o+(0.659085787115)*x[1]
+        ref[1, 1, 0]=0.590521314339*o*x_ref[0]**(o-1)+(-0.98595365692)
+        ref[1, 1, 1]=0.903053999267*o*x_ref[1]**(o-1)+(0.659085787115)
+        arg[1, 2]=0.603256472248*x[0]**o+(-0.998567994431)*x[0]+(0.741928703316)*x[1]**o+(0.381828408173)*x[1]
+        ref[1, 2, 0]=0.603256472248*o*x_ref[0]**(o-1)+(-0.998567994431)
+        ref[1, 2, 1]=0.741928703316*o*x_ref[1]**(o-1)+(0.381828408173)
+        arg[1, 3]=0.527272811035*x[0]**o+(-0.910686540304)*x[0]+(-0.519865950291)*x[1]**o+(0.223137327326)*x[1]
+        ref[1, 3, 0]=0.527272811035*o*x_ref[0]**(o-1)+(-0.910686540304)
+        ref[1, 3, 1]=-0.519865950291*o*x_ref[1]**(o-1)+(0.223137327326)
+        arg[2, 0]=-0.666958015112*x[0]**o+(0.212945454735)*x[0]+(-0.458826227087)*x[1]**o+(-0.0879275042395)*x[1]
+        ref[2, 0, 0]=-0.666958015112*o*x_ref[0]**(o-1)+(0.212945454735)
+        ref[2, 0, 1]=-0.458826227087*o*x_ref[1]**(o-1)+(-0.0879275042395)
+        arg[2, 1]=0.547201123146*x[0]**o+(-0.959240884913)*x[0]+(-0.788102648342)*x[1]**o+(0.992008386471)*x[1]
+        ref[2, 1, 0]=0.547201123146*o*x_ref[0]**(o-1)+(-0.959240884913)
+        ref[2, 1, 1]=-0.788102648342*o*x_ref[1]**(o-1)+(0.992008386471)
+        arg[2, 2]=-0.91705984776*x[0]**o+(-0.382885786385)*x[0]+(0.674049245599)*x[1]**o+(0.802849748595)*x[1]
+        ref[2, 2, 0]=-0.91705984776*o*x_ref[0]**(o-1)+(-0.382885786385)
+        ref[2, 2, 1]=0.674049245599*o*x_ref[1]**(o-1)+(0.802849748595)
+        arg[2, 3]=0.40579530195*x[0]**o+(0.310148176347)*x[0]+(-0.452554138032)*x[1]**o+(0.469087665157)*x[1]
+        ref[2, 3, 0]=0.40579530195*o*x_ref[0]**(o-1)+(0.310148176347)
+        ref[2, 3, 1]=-0.452554138032*o*x_ref[1]**(o-1)+(0.469087665157)
+        arg[3, 0]=-0.211301930347*x[0]**o+(0.613911443846)*x[0]+(-0.862953365484)*x[1]**o+(-0.363996740553)*x[1]
+        ref[3, 0, 0]=-0.211301930347*o*x_ref[0]**(o-1)+(0.613911443846)
+        ref[3, 0, 1]=-0.862953365484*o*x_ref[1]**(o-1)+(-0.363996740553)
+        arg[3, 1]=-0.0533442679625*x[0]**o+(0.192408762209)*x[0]+(-0.370985654526)*x[1]**o+(0.237023044015)*x[1]
+        ref[3, 1, 0]=-0.0533442679625*o*x_ref[0]**(o-1)+(0.192408762209)
+        ref[3, 1, 1]=-0.370985654526*o*x_ref[1]**(o-1)+(0.237023044015)
+        arg[3, 2]=-0.90970854711*x[0]**o+(0.937900004511)*x[0]+(0.175995950397)*x[1]**o+(0.0912107377011)*x[1]
+        ref[3, 2, 0]=-0.90970854711*o*x_ref[0]**(o-1)+(0.937900004511)
+        ref[3, 2, 1]=0.175995950397*o*x_ref[1]**(o-1)+(0.0912107377011)
+        arg[3, 3]=-0.742378452583*x[0]**o+(0.399565933738)*x[0]+(-0.367841928119)*x[1]**o+(-0.329636193683)*x[1]
+        ref[3, 3, 0]=-0.742378452583*o*x_ref[0]**(o-1)+(0.399565933738)
+        ref[3, 3, 1]=-0.367841928119*o*x_ref[1]**(o-1)+(-0.329636193683)
+        if dim==3:
+            arg[0, 0]+=-0.166238779117*x[2]**o+(0.180535101541)*x[2]
+            ref[0, 0, 2]=-0.166238779117*o*x_ref[2]**(o-1)+(0.180535101541)
+            arg[0, 1]+=0.307947356549*x[2]**o+(-0.284416502016)*x[2]
+            ref[0, 1, 2]=0.307947356549*o*x_ref[2]**(o-1)+(-0.284416502016)
+            arg[0, 2]+=0.417698090357*x[2]**o+(0.928308790173)*x[2]
+            ref[0, 2, 2]=0.417698090357*o*x_ref[2]**(o-1)+(0.928308790173)
+            arg[0, 3]+=0.359433532496*x[2]**o+(-0.85069394479)*x[2]
+            ref[0, 3, 2]=0.359433532496*o*x_ref[2]**(o-1)+(-0.85069394479)
+            arg[1, 0]+=0.693709634809*x[2]**o+(0.350287345217)*x[2]
+            ref[1, 0, 2]=0.693709634809*o*x_ref[2]**(o-1)+(0.350287345217)
+            arg[1, 1]+=-0.186225995568*x[2]**o+(-0.0692858742043)*x[2]
+            ref[1, 1, 2]=-0.186225995568*o*x_ref[2]**(o-1)+(-0.0692858742043)
+            arg[1, 2]+=-0.940638216127*x[2]**o+(-0.289377373278)*x[2]
+            ref[1, 2, 2]=-0.940638216127*o*x_ref[2]**(o-1)+(-0.289377373278)
+            arg[1, 3]+=-0.564761249497*x[2]**o+(-0.796305888305)*x[2]
+            ref[1, 3, 2]=-0.564761249497*o*x_ref[2]**(o-1)+(-0.796305888305)
+            arg[2, 0]+=0.52496285649*x[2]**o+(0.860539767098)*x[2]
+            ref[2, 0, 2]=0.52496285649*o*x_ref[2]**(o-1)+(0.860539767098)
+            arg[2, 1]+=0.770294843521*x[2]**o+(0.0453603034663)*x[2]
+            ref[2, 1, 2]=0.770294843521*o*x_ref[2]**(o-1)+(0.0453603034663)
+            arg[2, 2]+=-0.113781337992*x[2]**o+(-0.784527990425)*x[2]
+            ref[2, 2, 2]=-0.113781337992*o*x_ref[2]**(o-1)+(-0.784527990425)
+            arg[2, 3]+=-0.560985176304*x[2]**o+(0.528824902912)*x[2]
+            ref[2, 3, 2]=-0.560985176304*o*x_ref[2]**(o-1)+(0.528824902912)
+            arg[3, 0]+=-0.362860384503*x[2]**o+(-0.0796148945099)*x[2]
+            ref[3, 0, 2]=-0.362860384503*o*x_ref[2]**(o-1)+(-0.0796148945099)
+            arg[3, 1]+=0.191034093687*x[2]**o+(0.988110360064)*x[2]
+            ref[3, 1, 2]=0.191034093687*o*x_ref[2]**(o-1)+(0.988110360064)
+            arg[3, 2]+=-0.731891383232*x[2]**o+(-0.0706627750449)*x[2]
+            ref[3, 2, 2]=-0.731891383232*o*x_ref[2]**(o-1)+(-0.0706627750449)
+            arg[3, 3]+=-0.668574244344*x[2]**o+(0.439962138531)*x[2]
+            ref[3, 3, 2]=-0.668574244344*o*x_ref[2]**(o-1)+(0.439962138531)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 4),w)
+        ref = Data(0,(3, 2, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.680288621249*x[0]**o+(0.926265460913)*x[0]+(-0.712591751279)*x[1]**o+(-0.443398514566)*x[1]
+        ref[0, 0, 0, 0]=-0.680288621249*o*x_ref[0]**(o-1)+(0.926265460913)
+        ref[0, 0, 0, 1]=-0.712591751279*o*x_ref[1]**(o-1)+(-0.443398514566)
+        arg[0, 0, 1]=0.644848523166*x[0]**o+(-0.253716397765)*x[0]+(-0.139341746476)*x[1]**o+(0.0822006122417)*x[1]
+        ref[0, 0, 1, 0]=0.644848523166*o*x_ref[0]**(o-1)+(-0.253716397765)
+        ref[0, 0, 1, 1]=-0.139341746476*o*x_ref[1]**(o-1)+(0.0822006122417)
+        arg[0, 0, 2]=0.285615894682*x[0]**o+(-0.821543027501)*x[0]+(0.89268278879)*x[1]**o+(-0.808446759436)*x[1]
+        ref[0, 0, 2, 0]=0.285615894682*o*x_ref[0]**(o-1)+(-0.821543027501)
+        ref[0, 0, 2, 1]=0.89268278879*o*x_ref[1]**(o-1)+(-0.808446759436)
+        arg[0, 0, 3]=-0.528520217863*x[0]**o+(0.596324099108)*x[0]+(-0.224063088736)*x[1]**o+(-0.786339647883)*x[1]
+        ref[0, 0, 3, 0]=-0.528520217863*o*x_ref[0]**(o-1)+(0.596324099108)
+        ref[0, 0, 3, 1]=-0.224063088736*o*x_ref[1]**(o-1)+(-0.786339647883)
+        arg[0, 1, 0]=0.270117670344*x[0]**o+(0.0590991251015)*x[0]+(0.142824577526)*x[1]**o+(-0.00102600734649)*x[1]
+        ref[0, 1, 0, 0]=0.270117670344*o*x_ref[0]**(o-1)+(0.0590991251015)
+        ref[0, 1, 0, 1]=0.142824577526*o*x_ref[1]**(o-1)+(-0.00102600734649)
+        arg[0, 1, 1]=-0.352739510458*x[0]**o+(-0.561722565836)*x[0]+(-0.277554885524)*x[1]**o+(-0.205381155318)*x[1]
+        ref[0, 1, 1, 0]=-0.352739510458*o*x_ref[0]**(o-1)+(-0.561722565836)
+        ref[0, 1, 1, 1]=-0.277554885524*o*x_ref[1]**(o-1)+(-0.205381155318)
+        arg[0, 1, 2]=-0.919550288607*x[0]**o+(-0.300608543714)*x[0]+(0.363043890329)*x[1]**o+(-0.591628881887)*x[1]
+        ref[0, 1, 2, 0]=-0.919550288607*o*x_ref[0]**(o-1)+(-0.300608543714)
+        ref[0, 1, 2, 1]=0.363043890329*o*x_ref[1]**(o-1)+(-0.591628881887)
+        arg[0, 1, 3]=-0.83047824844*x[0]**o+(-0.419438021731)*x[0]+(-0.629587566273)*x[1]**o+(0.199241967272)*x[1]
+        ref[0, 1, 3, 0]=-0.83047824844*o*x_ref[0]**(o-1)+(-0.419438021731)
+        ref[0, 1, 3, 1]=-0.629587566273*o*x_ref[1]**(o-1)+(0.199241967272)
+        arg[1, 0, 0]=0.00564265589531*x[0]**o+(-0.636269339213)*x[0]+(0.152139168534)*x[1]**o+(-0.269742506725)*x[1]
+        ref[1, 0, 0, 0]=0.00564265589531*o*x_ref[0]**(o-1)+(-0.636269339213)
+        ref[1, 0, 0, 1]=0.152139168534*o*x_ref[1]**(o-1)+(-0.269742506725)
+        arg[1, 0, 1]=0.917356931456*x[0]**o+(0.80543553787)*x[0]+(0.677110787736)*x[1]**o+(0.0750421581212)*x[1]
+        ref[1, 0, 1, 0]=0.917356931456*o*x_ref[0]**(o-1)+(0.80543553787)
+        ref[1, 0, 1, 1]=0.677110787736*o*x_ref[1]**(o-1)+(0.0750421581212)
+        arg[1, 0, 2]=-0.517325388228*x[0]**o+(-0.603241783024)*x[0]+(0.277173383393)*x[1]**o+(-0.815101491989)*x[1]
+        ref[1, 0, 2, 0]=-0.517325388228*o*x_ref[0]**(o-1)+(-0.603241783024)
+        ref[1, 0, 2, 1]=0.277173383393*o*x_ref[1]**(o-1)+(-0.815101491989)
+        arg[1, 0, 3]=0.389771683259*x[0]**o+(0.0639427502149)*x[0]+(0.463901131905)*x[1]**o+(0.59507243739)*x[1]
+        ref[1, 0, 3, 0]=0.389771683259*o*x_ref[0]**(o-1)+(0.0639427502149)
+        ref[1, 0, 3, 1]=0.463901131905*o*x_ref[1]**(o-1)+(0.59507243739)
+        arg[1, 1, 0]=-0.1605270667*x[0]**o+(-0.334783298325)*x[0]+(-0.125639693411)*x[1]**o+(-0.140304107222)*x[1]
+        ref[1, 1, 0, 0]=-0.1605270667*o*x_ref[0]**(o-1)+(-0.334783298325)
+        ref[1, 1, 0, 1]=-0.125639693411*o*x_ref[1]**(o-1)+(-0.140304107222)
+        arg[1, 1, 1]=0.70936903578*x[0]**o+(0.0725533313516)*x[0]+(-0.732487555755)*x[1]**o+(-0.259737054738)*x[1]
+        ref[1, 1, 1, 0]=0.70936903578*o*x_ref[0]**(o-1)+(0.0725533313516)
+        ref[1, 1, 1, 1]=-0.732487555755*o*x_ref[1]**(o-1)+(-0.259737054738)
+        arg[1, 1, 2]=0.243249694862*x[0]**o+(-0.1393680256)*x[0]+(-0.0611828102749)*x[1]**o+(-0.273389065968)*x[1]
+        ref[1, 1, 2, 0]=0.243249694862*o*x_ref[0]**(o-1)+(-0.1393680256)
+        ref[1, 1, 2, 1]=-0.0611828102749*o*x_ref[1]**(o-1)+(-0.273389065968)
+        arg[1, 1, 3]=-0.393822099711*x[0]**o+(-0.708822106402)*x[0]+(-0.724068062792)*x[1]**o+(-0.645026377852)*x[1]
+        ref[1, 1, 3, 0]=-0.393822099711*o*x_ref[0]**(o-1)+(-0.708822106402)
+        ref[1, 1, 3, 1]=-0.724068062792*o*x_ref[1]**(o-1)+(-0.645026377852)
+        arg[2, 0, 0]=-0.799639342512*x[0]**o+(-0.424730759944)*x[0]+(0.286433445209)*x[1]**o+(-0.125071556327)*x[1]
+        ref[2, 0, 0, 0]=-0.799639342512*o*x_ref[0]**(o-1)+(-0.424730759944)
+        ref[2, 0, 0, 1]=0.286433445209*o*x_ref[1]**(o-1)+(-0.125071556327)
+        arg[2, 0, 1]=-0.195936310835*x[0]**o+(-0.839191527941)*x[0]+(0.342015044794)*x[1]**o+(0.250175712115)*x[1]
+        ref[2, 0, 1, 0]=-0.195936310835*o*x_ref[0]**(o-1)+(-0.839191527941)
+        ref[2, 0, 1, 1]=0.342015044794*o*x_ref[1]**(o-1)+(0.250175712115)
+        arg[2, 0, 2]=0.480233070837*x[0]**o+(0.2900497341)*x[0]+(-0.993119234528)*x[1]**o+(-0.82208008397)*x[1]
+        ref[2, 0, 2, 0]=0.480233070837*o*x_ref[0]**(o-1)+(0.2900497341)
+        ref[2, 0, 2, 1]=-0.993119234528*o*x_ref[1]**(o-1)+(-0.82208008397)
+        arg[2, 0, 3]=-0.124926542048*x[0]**o+(0.560598275757)*x[0]+(0.716730686655)*x[1]**o+(-0.658448150984)*x[1]
+        ref[2, 0, 3, 0]=-0.124926542048*o*x_ref[0]**(o-1)+(0.560598275757)
+        ref[2, 0, 3, 1]=0.716730686655*o*x_ref[1]**(o-1)+(-0.658448150984)
+        arg[2, 1, 0]=0.41980999891*x[0]**o+(0.152703858656)*x[0]+(0.00740859397072)*x[1]**o+(-0.664998896861)*x[1]
+        ref[2, 1, 0, 0]=0.41980999891*o*x_ref[0]**(o-1)+(0.152703858656)
+        ref[2, 1, 0, 1]=0.00740859397072*o*x_ref[1]**(o-1)+(-0.664998896861)
+        arg[2, 1, 1]=0.726889869317*x[0]**o+(0.471385769669)*x[0]+(-0.977606332949)*x[1]**o+(0.467155485419)*x[1]
+        ref[2, 1, 1, 0]=0.726889869317*o*x_ref[0]**(o-1)+(0.471385769669)
+        ref[2, 1, 1, 1]=-0.977606332949*o*x_ref[1]**(o-1)+(0.467155485419)
+        arg[2, 1, 2]=-0.139095381901*x[0]**o+(0.0258966990481)*x[0]+(0.929233313602)*x[1]**o+(0.416629847129)*x[1]
+        ref[2, 1, 2, 0]=-0.139095381901*o*x_ref[0]**(o-1)+(0.0258966990481)
+        ref[2, 1, 2, 1]=0.929233313602*o*x_ref[1]**(o-1)+(0.416629847129)
+        arg[2, 1, 3]=-0.163077853233*x[0]**o+(0.396820354954)*x[0]+(0.531674902282)*x[1]**o+(-0.519381107418)*x[1]
+        ref[2, 1, 3, 0]=-0.163077853233*o*x_ref[0]**(o-1)+(0.396820354954)
+        ref[2, 1, 3, 1]=0.531674902282*o*x_ref[1]**(o-1)+(-0.519381107418)
+        if dim==3:
+            arg[0, 0, 0]+=-0.481218116732*x[2]**o+(-0.23780290923)*x[2]
+            ref[0, 0, 0, 2]=-0.481218116732*o*x_ref[2]**(o-1)+(-0.23780290923)
+            arg[0, 0, 1]+=-0.491735775647*x[2]**o+(0.951904848689)*x[2]
+            ref[0, 0, 1, 2]=-0.491735775647*o*x_ref[2]**(o-1)+(0.951904848689)
+            arg[0, 0, 2]+=0.557155959514*x[2]**o+(-0.520455489257)*x[2]
+            ref[0, 0, 2, 2]=0.557155959514*o*x_ref[2]**(o-1)+(-0.520455489257)
+            arg[0, 0, 3]+=0.321995748211*x[2]**o+(-0.309568727514)*x[2]
+            ref[0, 0, 3, 2]=0.321995748211*o*x_ref[2]**(o-1)+(-0.309568727514)
+            arg[0, 1, 0]+=0.880783341046*x[2]**o+(0.0665193262803)*x[2]
+            ref[0, 1, 0, 2]=0.880783341046*o*x_ref[2]**(o-1)+(0.0665193262803)
+            arg[0, 1, 1]+=-0.662139589449*x[2]**o+(-0.53171313226)*x[2]
+            ref[0, 1, 1, 2]=-0.662139589449*o*x_ref[2]**(o-1)+(-0.53171313226)
+            arg[0, 1, 2]+=-0.543900121866*x[2]**o+(-0.78066450282)*x[2]
+            ref[0, 1, 2, 2]=-0.543900121866*o*x_ref[2]**(o-1)+(-0.78066450282)
+            arg[0, 1, 3]+=-0.438789312721*x[2]**o+(0.182214020522)*x[2]
+            ref[0, 1, 3, 2]=-0.438789312721*o*x_ref[2]**(o-1)+(0.182214020522)
+            arg[1, 0, 0]+=-0.917913045703*x[2]**o+(0.404355477009)*x[2]
+            ref[1, 0, 0, 2]=-0.917913045703*o*x_ref[2]**(o-1)+(0.404355477009)
+            arg[1, 0, 1]+=-0.456986918435*x[2]**o+(0.77750901739)*x[2]
+            ref[1, 0, 1, 2]=-0.456986918435*o*x_ref[2]**(o-1)+(0.77750901739)
+            arg[1, 0, 2]+=-0.624918127411*x[2]**o+(-0.868958789217)*x[2]
+            ref[1, 0, 2, 2]=-0.624918127411*o*x_ref[2]**(o-1)+(-0.868958789217)
+            arg[1, 0, 3]+=-0.623323786019*x[2]**o+(-0.88463110387)*x[2]
+            ref[1, 0, 3, 2]=-0.623323786019*o*x_ref[2]**(o-1)+(-0.88463110387)
+            arg[1, 1, 0]+=0.3735030205*x[2]**o+(-0.0886794520272)*x[2]
+            ref[1, 1, 0, 2]=0.3735030205*o*x_ref[2]**(o-1)+(-0.0886794520272)
+            arg[1, 1, 1]+=0.135919447053*x[2]**o+(-0.912307643656)*x[2]
+            ref[1, 1, 1, 2]=0.135919447053*o*x_ref[2]**(o-1)+(-0.912307643656)
+            arg[1, 1, 2]+=0.276225193442*x[2]**o+(-0.309491177727)*x[2]
+            ref[1, 1, 2, 2]=0.276225193442*o*x_ref[2]**(o-1)+(-0.309491177727)
+            arg[1, 1, 3]+=-0.816050620741*x[2]**o+(-0.288855963408)*x[2]
+            ref[1, 1, 3, 2]=-0.816050620741*o*x_ref[2]**(o-1)+(-0.288855963408)
+            arg[2, 0, 0]+=0.147024625835*x[2]**o+(-0.00506306249632)*x[2]
+            ref[2, 0, 0, 2]=0.147024625835*o*x_ref[2]**(o-1)+(-0.00506306249632)
+            arg[2, 0, 1]+=0.613397332616*x[2]**o+(0.780268696982)*x[2]
+            ref[2, 0, 1, 2]=0.613397332616*o*x_ref[2]**(o-1)+(0.780268696982)
+            arg[2, 0, 2]+=0.12224192384*x[2]**o+(-0.363361981059)*x[2]
+            ref[2, 0, 2, 2]=0.12224192384*o*x_ref[2]**(o-1)+(-0.363361981059)
+            arg[2, 0, 3]+=-0.244990258607*x[2]**o+(0.479629573594)*x[2]
+            ref[2, 0, 3, 2]=-0.244990258607*o*x_ref[2]**(o-1)+(0.479629573594)
+            arg[2, 1, 0]+=-0.511864606323*x[2]**o+(-0.945800958233)*x[2]
+            ref[2, 1, 0, 2]=-0.511864606323*o*x_ref[2]**(o-1)+(-0.945800958233)
+            arg[2, 1, 1]+=0.899131622324*x[2]**o+(-0.214899478268)*x[2]
+            ref[2, 1, 1, 2]=0.899131622324*o*x_ref[2]**(o-1)+(-0.214899478268)
+            arg[2, 1, 2]+=-0.467090639135*x[2]**o+(0.0504534918183)*x[2]
+            ref[2, 1, 2, 2]=-0.467090639135*o*x_ref[2]**(o-1)+(0.0504534918183)
+            arg[2, 1, 3]+=-0.623034293567*x[2]**o+(0.193409436381)*x[2]
+            ref[2, 1, 3, 2]=-0.623034293567*o*x_ref[2]**(o-1)+(0.193409436381)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.249048404446*x[0]**o+(0.471571216551)*x[0]+(-0.492744401036)*x[1]**o+(0.537255847821)*x[1]
+        ref[0]=-0.249048404446*o*x_ref[0]**(o-1)+(0.471571216551)
+        ref[1]=-0.492744401036*o*x_ref[1]**(o-1)+(0.537255847821)
+        if dim==3:
+            arg+=(-0.532849735966)*x[2]**o+(0.211140284929)*x[2]
+            ref[2]=-0.532849735966*o*x_ref[2]**(o-1)+(0.211140284929)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=0.255519750739*x[0]**o+(0.679908930528)*x[0]+(0.85574850526)*x[1]**o+(0.924560679625)*x[1]
+        ref[0, 0]=0.255519750739*o*x_ref[0]**(o-1)+(0.679908930528)
+        ref[0, 1]=0.85574850526*o*x_ref[1]**(o-1)+(0.924560679625)
+        arg[1,]=-0.264685001526*x[0]**o+(0.97238058684)*x[0]+(-0.542844633883)*x[1]**o+(0.864686344867)*x[1]
+        ref[1, 0]=-0.264685001526*o*x_ref[0]**(o-1)+(0.97238058684)
+        ref[1, 1]=-0.542844633883*o*x_ref[1]**(o-1)+(0.864686344867)
+        arg[2,]=-0.825999401239*x[0]**o+(0.18632245907)*x[0]+(-0.123960032975)*x[1]**o+(-0.748517294279)*x[1]
+        ref[2, 0]=-0.825999401239*o*x_ref[0]**(o-1)+(0.18632245907)
+        ref[2, 1]=-0.123960032975*o*x_ref[1]**(o-1)+(-0.748517294279)
+        arg[3,]=0.197331207055*x[0]**o+(-0.346094591333)*x[0]+(0.051636406978)*x[1]**o+(0.251542894861)*x[1]
+        ref[3, 0]=0.197331207055*o*x_ref[0]**(o-1)+(-0.346094591333)
+        ref[3, 1]=0.051636406978*o*x_ref[1]**(o-1)+(0.251542894861)
+        if dim==3:
+            arg[0,]+=-0.805249445089*x[2]**o+(0.120719728825)*x[2]
+            ref[0, 2]=-0.805249445089*o*x_ref[2]**(o-1)+(0.120719728825)
+            arg[1,]+=0.262945471889*x[2]**o+(-0.159969476146)*x[2]
+            ref[1, 2]=0.262945471889*o*x_ref[2]**(o-1)+(-0.159969476146)
+            arg[2,]+=-0.555789122185*x[2]**o+(-0.0526130320355)*x[2]
+            ref[2, 2]=-0.555789122185*o*x_ref[2]**(o-1)+(-0.0526130320355)
+            arg[3,]+=-0.817032327647*x[2]**o+(0.212419299881)*x[2]
+            ref[3, 2]=-0.817032327647*o*x_ref[2]**(o-1)+(0.212419299881)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4)+(dim,),w_ref)
+        arg[0, 0]=0.435894522012*x[0]**o+(-0.343555718528)*x[0]+(0.678603420379)*x[1]**o+(-0.741317921755)*x[1]
+        ref[0, 0, 0]=0.435894522012*o*x_ref[0]**(o-1)+(-0.343555718528)
+        ref[0, 0, 1]=0.678603420379*o*x_ref[1]**(o-1)+(-0.741317921755)
+        arg[0, 1]=0.527033563987*x[0]**o+(-0.911575758307)*x[0]+(-0.821803441307)*x[1]**o+(0.542047477587)*x[1]
+        ref[0, 1, 0]=0.527033563987*o*x_ref[0]**(o-1)+(-0.911575758307)
+        ref[0, 1, 1]=-0.821803441307*o*x_ref[1]**(o-1)+(0.542047477587)
+        arg[0, 2]=0.608365709372*x[0]**o+(-0.35514291434)*x[0]+(0.486091926539)*x[1]**o+(-0.582407287297)*x[1]
+        ref[0, 2, 0]=0.608365709372*o*x_ref[0]**(o-1)+(-0.35514291434)
+        ref[0, 2, 1]=0.486091926539*o*x_ref[1]**(o-1)+(-0.582407287297)
+        arg[0, 3]=0.842540375528*x[0]**o+(0.49562365419)*x[0]+(-0.40687892174)*x[1]**o+(-0.742726592246)*x[1]
+        ref[0, 3, 0]=0.842540375528*o*x_ref[0]**(o-1)+(0.49562365419)
+        ref[0, 3, 1]=-0.40687892174*o*x_ref[1]**(o-1)+(-0.742726592246)
+        arg[1, 0]=0.724863331398*x[0]**o+(0.326042765396)*x[0]+(-0.0762054993783)*x[1]**o+(-0.0766917446248)*x[1]
+        ref[1, 0, 0]=0.724863331398*o*x_ref[0]**(o-1)+(0.326042765396)
+        ref[1, 0, 1]=-0.0762054993783*o*x_ref[1]**(o-1)+(-0.0766917446248)
+        arg[1, 1]=0.650253393002*x[0]**o+(-0.492389855698)*x[0]+(-0.385284261866)*x[1]**o+(-0.344215898989)*x[1]
+        ref[1, 1, 0]=0.650253393002*o*x_ref[0]**(o-1)+(-0.492389855698)
+        ref[1, 1, 1]=-0.385284261866*o*x_ref[1]**(o-1)+(-0.344215898989)
+        arg[1, 2]=0.859823794538*x[0]**o+(-0.00132778803236)*x[0]+(0.0506551602522)*x[1]**o+(-0.101813548422)*x[1]
+        ref[1, 2, 0]=0.859823794538*o*x_ref[0]**(o-1)+(-0.00132778803236)
+        ref[1, 2, 1]=0.0506551602522*o*x_ref[1]**(o-1)+(-0.101813548422)
+        arg[1, 3]=0.482635478404*x[0]**o+(0.0233352194476)*x[0]+(0.129621480181)*x[1]**o+(-0.684144456337)*x[1]
+        ref[1, 3, 0]=0.482635478404*o*x_ref[0]**(o-1)+(0.0233352194476)
+        ref[1, 3, 1]=0.129621480181*o*x_ref[1]**(o-1)+(-0.684144456337)
+        arg[2, 0]=0.234752479906*x[0]**o+(0.984892763468)*x[0]+(-0.193568454491)*x[1]**o+(0.7777405465)*x[1]
+        ref[2, 0, 0]=0.234752479906*o*x_ref[0]**(o-1)+(0.984892763468)
+        ref[2, 0, 1]=-0.193568454491*o*x_ref[1]**(o-1)+(0.7777405465)
+        arg[2, 1]=0.46180002666*x[0]**o+(0.17487342226)*x[0]+(0.453404128189)*x[1]**o+(0.135776943962)*x[1]
+        ref[2, 1, 0]=0.46180002666*o*x_ref[0]**(o-1)+(0.17487342226)
+        ref[2, 1, 1]=0.453404128189*o*x_ref[1]**(o-1)+(0.135776943962)
+        arg[2, 2]=0.729035027684*x[0]**o+(0.00516992703414)*x[0]+(0.956724006152)*x[1]**o+(0.154538043537)*x[1]
+        ref[2, 2, 0]=0.729035027684*o*x_ref[0]**(o-1)+(0.00516992703414)
+        ref[2, 2, 1]=0.956724006152*o*x_ref[1]**(o-1)+(0.154538043537)
+        arg[2, 3]=0.608254699567*x[0]**o+(-0.547911155657)*x[0]+(-0.611463471384)*x[1]**o+(-0.232563257197)*x[1]
+        ref[2, 3, 0]=0.608254699567*o*x_ref[0]**(o-1)+(-0.547911155657)
+        ref[2, 3, 1]=-0.611463471384*o*x_ref[1]**(o-1)+(-0.232563257197)
+        if dim==3:
+            arg[0, 0]+=-0.149644280479*x[2]**o+(0.377677269656)*x[2]
+            ref[0, 0, 2]=-0.149644280479*o*x_ref[2]**(o-1)+(0.377677269656)
+            arg[0, 1]+=-0.680888008955*x[2]**o+(0.521084465402)*x[2]
+            ref[0, 1, 2]=-0.680888008955*o*x_ref[2]**(o-1)+(0.521084465402)
+            arg[0, 2]+=-0.0572371923647*x[2]**o+(0.18815213321)*x[2]
+            ref[0, 2, 2]=-0.0572371923647*o*x_ref[2]**(o-1)+(0.18815213321)
+            arg[0, 3]+=0.524841688778*x[2]**o+(0.219355773865)*x[2]
+            ref[0, 3, 2]=0.524841688778*o*x_ref[2]**(o-1)+(0.219355773865)
+            arg[1, 0]+=-0.7106038064*x[2]**o+(-0.719860710901)*x[2]
+            ref[1, 0, 2]=-0.7106038064*o*x_ref[2]**(o-1)+(-0.719860710901)
+            arg[1, 1]+=-0.641354391864*x[2]**o+(-0.00485931407985)*x[2]
+            ref[1, 1, 2]=-0.641354391864*o*x_ref[2]**(o-1)+(-0.00485931407985)
+            arg[1, 2]+=0.678581850036*x[2]**o+(0.206032752729)*x[2]
+            ref[1, 2, 2]=0.678581850036*o*x_ref[2]**(o-1)+(0.206032752729)
+            arg[1, 3]+=-0.324990233249*x[2]**o+(0.53989751879)*x[2]
+            ref[1, 3, 2]=-0.324990233249*o*x_ref[2]**(o-1)+(0.53989751879)
+            arg[2, 0]+=-0.380670678947*x[2]**o+(0.955562536938)*x[2]
+            ref[2, 0, 2]=-0.380670678947*o*x_ref[2]**(o-1)+(0.955562536938)
+            arg[2, 1]+=-0.952040571015*x[2]**o+(-0.130444724898)*x[2]
+            ref[2, 1, 2]=-0.952040571015*o*x_ref[2]**(o-1)+(-0.130444724898)
+            arg[2, 2]+=0.222719685449*x[2]**o+(-0.058329852956)*x[2]
+            ref[2, 2, 2]=0.222719685449*o*x_ref[2]**(o-1)+(-0.058329852956)
+            arg[2, 3]+=-0.133448888013*x[2]**o+(-0.159701245103)*x[2]
+            ref[2, 3, 2]=-0.133448888013*o*x_ref[2]**(o-1)+(-0.159701245103)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3),w)
+        ref = Data(0,(4, 3, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.196558943546*x[0]**o+(-0.903988266507)*x[0]+(0.242366482889)*x[1]**o+(-0.83740764102)*x[1]
+        ref[0, 0, 0, 0]=-0.196558943546*o*x_ref[0]**(o-1)+(-0.903988266507)
+        ref[0, 0, 0, 1]=0.242366482889*o*x_ref[1]**(o-1)+(-0.83740764102)
+        arg[0, 0, 1]=0.340652712426*x[0]**o+(0.536989952808)*x[0]+(0.42207142386)*x[1]**o+(-0.919133240162)*x[1]
+        ref[0, 0, 1, 0]=0.340652712426*o*x_ref[0]**(o-1)+(0.536989952808)
+        ref[0, 0, 1, 1]=0.42207142386*o*x_ref[1]**(o-1)+(-0.919133240162)
+        arg[0, 0, 2]=0.644537927512*x[0]**o+(-0.954812104274)*x[0]+(-0.595828162654)*x[1]**o+(-0.497669139448)*x[1]
+        ref[0, 0, 2, 0]=0.644537927512*o*x_ref[0]**(o-1)+(-0.954812104274)
+        ref[0, 0, 2, 1]=-0.595828162654*o*x_ref[1]**(o-1)+(-0.497669139448)
+        arg[0, 1, 0]=-0.0195771283269*x[0]**o+(0.577869708671)*x[0]+(-0.986649634776)*x[1]**o+(0.413667385654)*x[1]
+        ref[0, 1, 0, 0]=-0.0195771283269*o*x_ref[0]**(o-1)+(0.577869708671)
+        ref[0, 1, 0, 1]=-0.986649634776*o*x_ref[1]**(o-1)+(0.413667385654)
+        arg[0, 1, 1]=-0.210023403449*x[0]**o+(-0.734516257395)*x[0]+(0.458670926671)*x[1]**o+(0.385916565324)*x[1]
+        ref[0, 1, 1, 0]=-0.210023403449*o*x_ref[0]**(o-1)+(-0.734516257395)
+        ref[0, 1, 1, 1]=0.458670926671*o*x_ref[1]**(o-1)+(0.385916565324)
+        arg[0, 1, 2]=-0.587250447291*x[0]**o+(-0.713878166078)*x[0]+(-0.108547486394)*x[1]**o+(-0.578400355559)*x[1]
+        ref[0, 1, 2, 0]=-0.587250447291*o*x_ref[0]**(o-1)+(-0.713878166078)
+        ref[0, 1, 2, 1]=-0.108547486394*o*x_ref[1]**(o-1)+(-0.578400355559)
+        arg[0, 2, 0]=0.138983472675*x[0]**o+(0.262146543969)*x[0]+(0.151708214446)*x[1]**o+(-0.056711722948)*x[1]
+        ref[0, 2, 0, 0]=0.138983472675*o*x_ref[0]**(o-1)+(0.262146543969)
+        ref[0, 2, 0, 1]=0.151708214446*o*x_ref[1]**(o-1)+(-0.056711722948)
+        arg[0, 2, 1]=0.84531357976*x[0]**o+(-0.502284834401)*x[0]+(-0.0871573544751)*x[1]**o+(0.397379322436)*x[1]
+        ref[0, 2, 1, 0]=0.84531357976*o*x_ref[0]**(o-1)+(-0.502284834401)
+        ref[0, 2, 1, 1]=-0.0871573544751*o*x_ref[1]**(o-1)+(0.397379322436)
+        arg[0, 2, 2]=-0.151552497153*x[0]**o+(0.917522050436)*x[0]+(0.875834662996)*x[1]**o+(-0.322357921624)*x[1]
+        ref[0, 2, 2, 0]=-0.151552497153*o*x_ref[0]**(o-1)+(0.917522050436)
+        ref[0, 2, 2, 1]=0.875834662996*o*x_ref[1]**(o-1)+(-0.322357921624)
+        arg[1, 0, 0]=-0.694914335037*x[0]**o+(0.807315513463)*x[0]+(0.674443086192)*x[1]**o+(0.443407692339)*x[1]
+        ref[1, 0, 0, 0]=-0.694914335037*o*x_ref[0]**(o-1)+(0.807315513463)
+        ref[1, 0, 0, 1]=0.674443086192*o*x_ref[1]**(o-1)+(0.443407692339)
+        arg[1, 0, 1]=0.269938852051*x[0]**o+(-0.246483884402)*x[0]+(0.621238574752)*x[1]**o+(-0.392112815183)*x[1]
+        ref[1, 0, 1, 0]=0.269938852051*o*x_ref[0]**(o-1)+(-0.246483884402)
+        ref[1, 0, 1, 1]=0.621238574752*o*x_ref[1]**(o-1)+(-0.392112815183)
+        arg[1, 0, 2]=0.126571455355*x[0]**o+(0.381370002951)*x[0]+(-0.10479626892)*x[1]**o+(-0.181179576079)*x[1]
+        ref[1, 0, 2, 0]=0.126571455355*o*x_ref[0]**(o-1)+(0.381370002951)
+        ref[1, 0, 2, 1]=-0.10479626892*o*x_ref[1]**(o-1)+(-0.181179576079)
+        arg[1, 1, 0]=0.438790317572*x[0]**o+(0.407308332487)*x[0]+(-0.244311402167)*x[1]**o+(-0.941184866857)*x[1]
+        ref[1, 1, 0, 0]=0.438790317572*o*x_ref[0]**(o-1)+(0.407308332487)
+        ref[1, 1, 0, 1]=-0.244311402167*o*x_ref[1]**(o-1)+(-0.941184866857)
+        arg[1, 1, 1]=0.274020347421*x[0]**o+(0.475443693953)*x[0]+(-0.690994782961)*x[1]**o+(0.278289852797)*x[1]
+        ref[1, 1, 1, 0]=0.274020347421*o*x_ref[0]**(o-1)+(0.475443693953)
+        ref[1, 1, 1, 1]=-0.690994782961*o*x_ref[1]**(o-1)+(0.278289852797)
+        arg[1, 1, 2]=0.706568101719*x[0]**o+(0.229370950892)*x[0]+(0.7745745781)*x[1]**o+(0.314586773152)*x[1]
+        ref[1, 1, 2, 0]=0.706568101719*o*x_ref[0]**(o-1)+(0.229370950892)
+        ref[1, 1, 2, 1]=0.7745745781*o*x_ref[1]**(o-1)+(0.314586773152)
+        arg[1, 2, 0]=-0.281825373149*x[0]**o+(-0.549622178109)*x[0]+(0.266418720636)*x[1]**o+(0.829346768406)*x[1]
+        ref[1, 2, 0, 0]=-0.281825373149*o*x_ref[0]**(o-1)+(-0.549622178109)
+        ref[1, 2, 0, 1]=0.266418720636*o*x_ref[1]**(o-1)+(0.829346768406)
+        arg[1, 2, 1]=-0.480833205791*x[0]**o+(-0.824144991237)*x[0]+(-0.847819149002)*x[1]**o+(-0.498663045664)*x[1]
+        ref[1, 2, 1, 0]=-0.480833205791*o*x_ref[0]**(o-1)+(-0.824144991237)
+        ref[1, 2, 1, 1]=-0.847819149002*o*x_ref[1]**(o-1)+(-0.498663045664)
+        arg[1, 2, 2]=-0.969175360974*x[0]**o+(-0.140473756762)*x[0]+(-0.429819798462)*x[1]**o+(0.349867967185)*x[1]
+        ref[1, 2, 2, 0]=-0.969175360974*o*x_ref[0]**(o-1)+(-0.140473756762)
+        ref[1, 2, 2, 1]=-0.429819798462*o*x_ref[1]**(o-1)+(0.349867967185)
+        arg[2, 0, 0]=0.732574455966*x[0]**o+(0.749735264957)*x[0]+(-0.894021192057)*x[1]**o+(-0.19448898741)*x[1]
+        ref[2, 0, 0, 0]=0.732574455966*o*x_ref[0]**(o-1)+(0.749735264957)
+        ref[2, 0, 0, 1]=-0.894021192057*o*x_ref[1]**(o-1)+(-0.19448898741)
+        arg[2, 0, 1]=-0.110509282425*x[0]**o+(0.767697081419)*x[0]+(-0.358513399098)*x[1]**o+(0.257495274322)*x[1]
+        ref[2, 0, 1, 0]=-0.110509282425*o*x_ref[0]**(o-1)+(0.767697081419)
+        ref[2, 0, 1, 1]=-0.358513399098*o*x_ref[1]**(o-1)+(0.257495274322)
+        arg[2, 0, 2]=-0.920090797575*x[0]**o+(-0.735680869677)*x[0]+(-0.638797057211)*x[1]**o+(-0.785441792129)*x[1]
+        ref[2, 0, 2, 0]=-0.920090797575*o*x_ref[0]**(o-1)+(-0.735680869677)
+        ref[2, 0, 2, 1]=-0.638797057211*o*x_ref[1]**(o-1)+(-0.785441792129)
+        arg[2, 1, 0]=0.038002144422*x[0]**o+(-0.618174508747)*x[0]+(0.633917490418)*x[1]**o+(0.648930404181)*x[1]
+        ref[2, 1, 0, 0]=0.038002144422*o*x_ref[0]**(o-1)+(-0.618174508747)
+        ref[2, 1, 0, 1]=0.633917490418*o*x_ref[1]**(o-1)+(0.648930404181)
+        arg[2, 1, 1]=0.794764004331*x[0]**o+(0.983864916633)*x[0]+(-0.46370828184)*x[1]**o+(-0.788162867861)*x[1]
+        ref[2, 1, 1, 0]=0.794764004331*o*x_ref[0]**(o-1)+(0.983864916633)
+        ref[2, 1, 1, 1]=-0.46370828184*o*x_ref[1]**(o-1)+(-0.788162867861)
+        arg[2, 1, 2]=-0.912896643244*x[0]**o+(-0.0133505464352)*x[0]+(-0.820476975801)*x[1]**o+(-0.50001591789)*x[1]
+        ref[2, 1, 2, 0]=-0.912896643244*o*x_ref[0]**(o-1)+(-0.0133505464352)
+        ref[2, 1, 2, 1]=-0.820476975801*o*x_ref[1]**(o-1)+(-0.50001591789)
+        arg[2, 2, 0]=-0.641790327479*x[0]**o+(0.703663438085)*x[0]+(-0.92573401981)*x[1]**o+(0.977525395704)*x[1]
+        ref[2, 2, 0, 0]=-0.641790327479*o*x_ref[0]**(o-1)+(0.703663438085)
+        ref[2, 2, 0, 1]=-0.92573401981*o*x_ref[1]**(o-1)+(0.977525395704)
+        arg[2, 2, 1]=0.280902921238*x[0]**o+(-0.844134958976)*x[0]+(-0.418735462574)*x[1]**o+(-0.754617589887)*x[1]
+        ref[2, 2, 1, 0]=0.280902921238*o*x_ref[0]**(o-1)+(-0.844134958976)
+        ref[2, 2, 1, 1]=-0.418735462574*o*x_ref[1]**(o-1)+(-0.754617589887)
+        arg[2, 2, 2]=0.257016495658*x[0]**o+(-0.343994638233)*x[0]+(0.432214873788)*x[1]**o+(-0.943985324414)*x[1]
+        ref[2, 2, 2, 0]=0.257016495658*o*x_ref[0]**(o-1)+(-0.343994638233)
+        ref[2, 2, 2, 1]=0.432214873788*o*x_ref[1]**(o-1)+(-0.943985324414)
+        arg[3, 0, 0]=-0.657834697631*x[0]**o+(0.447314669372)*x[0]+(-0.69780058203)*x[1]**o+(-0.435993369354)*x[1]
+        ref[3, 0, 0, 0]=-0.657834697631*o*x_ref[0]**(o-1)+(0.447314669372)
+        ref[3, 0, 0, 1]=-0.69780058203*o*x_ref[1]**(o-1)+(-0.435993369354)
+        arg[3, 0, 1]=0.224055773501*x[0]**o+(0.851615627504)*x[0]+(-0.299235624371)*x[1]**o+(0.0682800593858)*x[1]
+        ref[3, 0, 1, 0]=0.224055773501*o*x_ref[0]**(o-1)+(0.851615627504)
+        ref[3, 0, 1, 1]=-0.299235624371*o*x_ref[1]**(o-1)+(0.0682800593858)
+        arg[3, 0, 2]=0.886199419848*x[0]**o+(0.0765429072502)*x[0]+(0.454888191894)*x[1]**o+(-0.327924692334)*x[1]
+        ref[3, 0, 2, 0]=0.886199419848*o*x_ref[0]**(o-1)+(0.0765429072502)
+        ref[3, 0, 2, 1]=0.454888191894*o*x_ref[1]**(o-1)+(-0.327924692334)
+        arg[3, 1, 0]=0.613251124912*x[0]**o+(0.232352284867)*x[0]+(-0.524918262854)*x[1]**o+(0.617439572652)*x[1]
+        ref[3, 1, 0, 0]=0.613251124912*o*x_ref[0]**(o-1)+(0.232352284867)
+        ref[3, 1, 0, 1]=-0.524918262854*o*x_ref[1]**(o-1)+(0.617439572652)
+        arg[3, 1, 1]=-0.174373757715*x[0]**o+(-0.43028133843)*x[0]+(-0.762763558427)*x[1]**o+(-0.26346483132)*x[1]
+        ref[3, 1, 1, 0]=-0.174373757715*o*x_ref[0]**(o-1)+(-0.43028133843)
+        ref[3, 1, 1, 1]=-0.762763558427*o*x_ref[1]**(o-1)+(-0.26346483132)
+        arg[3, 1, 2]=0.699847486829*x[0]**o+(-0.326623134716)*x[0]+(-0.162677672737)*x[1]**o+(-0.452796803731)*x[1]
+        ref[3, 1, 2, 0]=0.699847486829*o*x_ref[0]**(o-1)+(-0.326623134716)
+        ref[3, 1, 2, 1]=-0.162677672737*o*x_ref[1]**(o-1)+(-0.452796803731)
+        arg[3, 2, 0]=-0.0282050465297*x[0]**o+(-0.517067637543)*x[0]+(-0.61780957879)*x[1]**o+(0.965336321447)*x[1]
+        ref[3, 2, 0, 0]=-0.0282050465297*o*x_ref[0]**(o-1)+(-0.517067637543)
+        ref[3, 2, 0, 1]=-0.61780957879*o*x_ref[1]**(o-1)+(0.965336321447)
+        arg[3, 2, 1]=0.964305823556*x[0]**o+(0.733179418742)*x[0]+(-0.243877200574)*x[1]**o+(-0.699707080414)*x[1]
+        ref[3, 2, 1, 0]=0.964305823556*o*x_ref[0]**(o-1)+(0.733179418742)
+        ref[3, 2, 1, 1]=-0.243877200574*o*x_ref[1]**(o-1)+(-0.699707080414)
+        arg[3, 2, 2]=-0.291775861137*x[0]**o+(-0.372056947787)*x[0]+(0.873658233925)*x[1]**o+(-0.271026209657)*x[1]
+        ref[3, 2, 2, 0]=-0.291775861137*o*x_ref[0]**(o-1)+(-0.372056947787)
+        ref[3, 2, 2, 1]=0.873658233925*o*x_ref[1]**(o-1)+(-0.271026209657)
+        if dim==3:
+            arg[0, 0, 0]+=-0.251260504608*x[2]**o+(0.251782733251)*x[2]
+            ref[0, 0, 0, 2]=-0.251260504608*o*x_ref[2]**(o-1)+(0.251782733251)
+            arg[0, 0, 1]+=0.111025038992*x[2]**o+(0.295156037124)*x[2]
+            ref[0, 0, 1, 2]=0.111025038992*o*x_ref[2]**(o-1)+(0.295156037124)
+            arg[0, 0, 2]+=-0.436639365273*x[2]**o+(0.710827504259)*x[2]
+            ref[0, 0, 2, 2]=-0.436639365273*o*x_ref[2]**(o-1)+(0.710827504259)
+            arg[0, 1, 0]+=0.940650973977*x[2]**o+(-0.207683811442)*x[2]
+            ref[0, 1, 0, 2]=0.940650973977*o*x_ref[2]**(o-1)+(-0.207683811442)
+            arg[0, 1, 1]+=-0.972280500761*x[2]**o+(-0.911834914157)*x[2]
+            ref[0, 1, 1, 2]=-0.972280500761*o*x_ref[2]**(o-1)+(-0.911834914157)
+            arg[0, 1, 2]+=0.621569169889*x[2]**o+(0.858671375507)*x[2]
+            ref[0, 1, 2, 2]=0.621569169889*o*x_ref[2]**(o-1)+(0.858671375507)
+            arg[0, 2, 0]+=-0.483808680261*x[2]**o+(-0.602771401107)*x[2]
+            ref[0, 2, 0, 2]=-0.483808680261*o*x_ref[2]**(o-1)+(-0.602771401107)
+            arg[0, 2, 1]+=-0.820559386711*x[2]**o+(0.285007701172)*x[2]
+            ref[0, 2, 1, 2]=-0.820559386711*o*x_ref[2]**(o-1)+(0.285007701172)
+            arg[0, 2, 2]+=-0.176972376623*x[2]**o+(-0.667157391204)*x[2]
+            ref[0, 2, 2, 2]=-0.176972376623*o*x_ref[2]**(o-1)+(-0.667157391204)
+            arg[1, 0, 0]+=-0.410345679463*x[2]**o+(-0.180086529417)*x[2]
+            ref[1, 0, 0, 2]=-0.410345679463*o*x_ref[2]**(o-1)+(-0.180086529417)
+            arg[1, 0, 1]+=-0.75109703744*x[2]**o+(-0.601514514326)*x[2]
+            ref[1, 0, 1, 2]=-0.75109703744*o*x_ref[2]**(o-1)+(-0.601514514326)
+            arg[1, 0, 2]+=-0.606514124007*x[2]**o+(0.677258036645)*x[2]
+            ref[1, 0, 2, 2]=-0.606514124007*o*x_ref[2]**(o-1)+(0.677258036645)
+            arg[1, 1, 0]+=-0.771602659551*x[2]**o+(-0.763088754447)*x[2]
+            ref[1, 1, 0, 2]=-0.771602659551*o*x_ref[2]**(o-1)+(-0.763088754447)
+            arg[1, 1, 1]+=0.695141224235*x[2]**o+(-0.231764298821)*x[2]
+            ref[1, 1, 1, 2]=0.695141224235*o*x_ref[2]**(o-1)+(-0.231764298821)
+            arg[1, 1, 2]+=0.765151983435*x[2]**o+(0.625127007229)*x[2]
+            ref[1, 1, 2, 2]=0.765151983435*o*x_ref[2]**(o-1)+(0.625127007229)
+            arg[1, 2, 0]+=-0.504733790317*x[2]**o+(-0.513280777824)*x[2]
+            ref[1, 2, 0, 2]=-0.504733790317*o*x_ref[2]**(o-1)+(-0.513280777824)
+            arg[1, 2, 1]+=-0.971998066124*x[2]**o+(-0.56138405784)*x[2]
+            ref[1, 2, 1, 2]=-0.971998066124*o*x_ref[2]**(o-1)+(-0.56138405784)
+            arg[1, 2, 2]+=0.591456430068*x[2]**o+(0.273432378296)*x[2]
+            ref[1, 2, 2, 2]=0.591456430068*o*x_ref[2]**(o-1)+(0.273432378296)
+            arg[2, 0, 0]+=-0.542974378343*x[2]**o+(0.368893773417)*x[2]
+            ref[2, 0, 0, 2]=-0.542974378343*o*x_ref[2]**(o-1)+(0.368893773417)
+            arg[2, 0, 1]+=0.0319433461809*x[2]**o+(-0.790171583456)*x[2]
+            ref[2, 0, 1, 2]=0.0319433461809*o*x_ref[2]**(o-1)+(-0.790171583456)
+            arg[2, 0, 2]+=0.328996988792*x[2]**o+(-0.917237513216)*x[2]
+            ref[2, 0, 2, 2]=0.328996988792*o*x_ref[2]**(o-1)+(-0.917237513216)
+            arg[2, 1, 0]+=-0.0654974867184*x[2]**o+(-0.40332495808)*x[2]
+            ref[2, 1, 0, 2]=-0.0654974867184*o*x_ref[2]**(o-1)+(-0.40332495808)
+            arg[2, 1, 1]+=0.559025031077*x[2]**o+(0.170368444494)*x[2]
+            ref[2, 1, 1, 2]=0.559025031077*o*x_ref[2]**(o-1)+(0.170368444494)
+            arg[2, 1, 2]+=0.497243303495*x[2]**o+(-0.557929999081)*x[2]
+            ref[2, 1, 2, 2]=0.497243303495*o*x_ref[2]**(o-1)+(-0.557929999081)
+            arg[2, 2, 0]+=-0.482726460223*x[2]**o+(0.792112526703)*x[2]
+            ref[2, 2, 0, 2]=-0.482726460223*o*x_ref[2]**(o-1)+(0.792112526703)
+            arg[2, 2, 1]+=0.513471320201*x[2]**o+(-0.598471800507)*x[2]
+            ref[2, 2, 1, 2]=0.513471320201*o*x_ref[2]**(o-1)+(-0.598471800507)
+            arg[2, 2, 2]+=0.579191469194*x[2]**o+(0.514696479498)*x[2]
+            ref[2, 2, 2, 2]=0.579191469194*o*x_ref[2]**(o-1)+(0.514696479498)
+            arg[3, 0, 0]+=-0.607764539537*x[2]**o+(0.360464512639)*x[2]
+            ref[3, 0, 0, 2]=-0.607764539537*o*x_ref[2]**(o-1)+(0.360464512639)
+            arg[3, 0, 1]+=0.889688134422*x[2]**o+(0.680457003077)*x[2]
+            ref[3, 0, 1, 2]=0.889688134422*o*x_ref[2]**(o-1)+(0.680457003077)
+            arg[3, 0, 2]+=-0.271666934724*x[2]**o+(-0.481574363031)*x[2]
+            ref[3, 0, 2, 2]=-0.271666934724*o*x_ref[2]**(o-1)+(-0.481574363031)
+            arg[3, 1, 0]+=0.263220557881*x[2]**o+(0.12977712035)*x[2]
+            ref[3, 1, 0, 2]=0.263220557881*o*x_ref[2]**(o-1)+(0.12977712035)
+            arg[3, 1, 1]+=0.689851844432*x[2]**o+(0.819825415201)*x[2]
+            ref[3, 1, 1, 2]=0.689851844432*o*x_ref[2]**(o-1)+(0.819825415201)
+            arg[3, 1, 2]+=-0.602482567719*x[2]**o+(0.447387386143)*x[2]
+            ref[3, 1, 2, 2]=-0.602482567719*o*x_ref[2]**(o-1)+(0.447387386143)
+            arg[3, 2, 0]+=-0.0567316965495*x[2]**o+(-0.573848397602)*x[2]
+            ref[3, 2, 0, 2]=-0.0567316965495*o*x_ref[2]**(o-1)+(-0.573848397602)
+            arg[3, 2, 1]+=0.464056767826*x[2]**o+(0.0734290656668)*x[2]
+            ref[3, 2, 1, 2]=0.464056767826*o*x_ref[2]**(o-1)+(0.0734290656668)
+            arg[3, 2, 2]+=-0.421964191631*x[2]**o+(-0.60782272194)*x[2]
+            ref[3, 2, 2, 2]=-0.421964191631*o*x_ref[2]**(o-1)+(-0.60782272194)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.799403448525*x[0]+(-0.926932895037)*x[1]
+        ref[0]=-0.799403448525
+        ref[1]=-0.926932895037
+        if dim==3:
+            arg+=(0.706675578171)*x[2]
+            ref[2]=0.706675578171
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=-0.886555398145*x[0]+(-0.316523933204)*x[1]
+        ref[0, 0]=-0.886555398145
+        ref[0, 1]=-0.316523933204
+        arg[1,]=0.0729731469621*x[0]+(0.410968206819)*x[1]
+        ref[1, 0]=0.0729731469621
+        ref[1, 1]=0.410968206819
+        arg[2,]=-0.974441226843*x[0]+(0.163434282991)*x[1]
+        ref[2, 0]=-0.974441226843
+        ref[2, 1]=0.163434282991
+        arg[3,]=-0.303121512047*x[0]+(-0.776582165854)*x[1]
+        ref[3, 0]=-0.303121512047
+        ref[3, 1]=-0.776582165854
+        if dim==3:
+            arg[0,]+=0.423867219292*x[2]
+            ref[0, 2]=0.423867219292
+            arg[1,]+=-0.471742705549*x[2]
+            ref[1, 2]=-0.471742705549
+            arg[2,]+=0.90651161019*x[2]
+            ref[2, 2]=0.90651161019
+            arg[3,]+=0.25487917854*x[2]
+            ref[3, 2]=0.25487917854
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=-0.0600919513286*x[0]+(0.382291062781)*x[1]
+        ref[0, 0, 0]=-0.0600919513286
+        ref[0, 0, 1]=0.382291062781
+        arg[0, 1]=-0.569482806955*x[0]+(0.188816757643)*x[1]
+        ref[0, 1, 0]=-0.569482806955
+        ref[0, 1, 1]=0.188816757643
+        arg[0, 2]=0.436024430139*x[0]+(0.825668239668)*x[1]
+        ref[0, 2, 0]=0.436024430139
+        ref[0, 2, 1]=0.825668239668
+        arg[0, 3]=0.186766217576*x[0]+(0.129493667339)*x[1]
+        ref[0, 3, 0]=0.186766217576
+        ref[0, 3, 1]=0.129493667339
+        arg[1, 0]=0.686204183448*x[0]+(0.739752622075)*x[1]
+        ref[1, 0, 0]=0.686204183448
+        ref[1, 0, 1]=0.739752622075
+        arg[1, 1]=0.493711632667*x[0]+(-0.172284590334)*x[1]
+        ref[1, 1, 0]=0.493711632667
+        ref[1, 1, 1]=-0.172284590334
+        arg[1, 2]=-0.563103565004*x[0]+(0.937358730894)*x[1]
+        ref[1, 2, 0]=-0.563103565004
+        ref[1, 2, 1]=0.937358730894
+        arg[1, 3]=-0.992087852443*x[0]+(0.440291695439)*x[1]
+        ref[1, 3, 0]=-0.992087852443
+        ref[1, 3, 1]=0.440291695439
+        arg[2, 0]=0.602840917084*x[0]+(-0.325130125023)*x[1]
+        ref[2, 0, 0]=0.602840917084
+        ref[2, 0, 1]=-0.325130125023
+        arg[2, 1]=0.354525830801*x[0]+(0.0732397205231)*x[1]
+        ref[2, 1, 0]=0.354525830801
+        ref[2, 1, 1]=0.0732397205231
+        arg[2, 2]=-0.16806447338*x[0]+(0.924835152033)*x[1]
+        ref[2, 2, 0]=-0.16806447338
+        ref[2, 2, 1]=0.924835152033
+        arg[2, 3]=0.237345897398*x[0]+(0.266266433417)*x[1]
+        ref[2, 3, 0]=0.237345897398
+        ref[2, 3, 1]=0.266266433417
+        arg[3, 0]=0.0883921978061*x[0]+(-0.594340487413)*x[1]
+        ref[3, 0, 0]=0.0883921978061
+        ref[3, 0, 1]=-0.594340487413
+        arg[3, 1]=-0.0257002143185*x[0]+(-0.995425476356)*x[1]
+        ref[3, 1, 0]=-0.0257002143185
+        ref[3, 1, 1]=-0.995425476356
+        arg[3, 2]=-0.451292820281*x[0]+(-0.655112178149)*x[1]
+        ref[3, 2, 0]=-0.451292820281
+        ref[3, 2, 1]=-0.655112178149
+        arg[3, 3]=-0.935637470377*x[0]+(0.397876301046)*x[1]
+        ref[3, 3, 0]=-0.935637470377
+        ref[3, 3, 1]=0.397876301046
+        if dim==3:
+            arg[0, 0]+=-0.46397140679*x[2]
+            ref[0, 0, 2]=-0.46397140679
+            arg[0, 1]+=-0.544939246696*x[2]
+            ref[0, 1, 2]=-0.544939246696
+            arg[0, 2]+=-0.901388187437*x[2]
+            ref[0, 2, 2]=-0.901388187437
+            arg[0, 3]+=-0.743687839654*x[2]
+            ref[0, 3, 2]=-0.743687839654
+            arg[1, 0]+=0.703779064471*x[2]
+            ref[1, 0, 2]=0.703779064471
+            arg[1, 1]+=0.804274767536*x[2]
+            ref[1, 1, 2]=0.804274767536
+            arg[1, 2]+=0.0100772327379*x[2]
+            ref[1, 2, 2]=0.0100772327379
+            arg[1, 3]+=0.759741354196*x[2]
+            ref[1, 3, 2]=0.759741354196
+            arg[2, 0]+=0.801700155036*x[2]
+            ref[2, 0, 2]=0.801700155036
+            arg[2, 1]+=-0.914090348825*x[2]
+            ref[2, 1, 2]=-0.914090348825
+            arg[2, 2]+=-0.252164210002*x[2]
+            ref[2, 2, 2]=-0.252164210002
+            arg[2, 3]+=-0.0769704239364*x[2]
+            ref[2, 3, 2]=-0.0769704239364
+            arg[3, 0]+=0.945421704275*x[2]
+            ref[3, 0, 2]=0.945421704275
+            arg[3, 1]+=0.189200359657*x[2]
+            ref[3, 1, 2]=0.189200359657
+            arg[3, 2]+=0.71706431582*x[2]
+            ref[3, 2, 2]=0.71706431582
+            arg[3, 3]+=0.0162652176717*x[2]
+            ref[3, 3, 2]=0.0162652176717
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.237067786719*x[0]+(0.605015094617)*x[1]
+        ref[0, 0, 0, 0]=-0.237067786719
+        ref[0, 0, 0, 1]=0.605015094617
+        arg[0, 0, 1]=-0.536888201101*x[0]+(0.595531719781)*x[1]
+        ref[0, 0, 1, 0]=-0.536888201101
+        ref[0, 0, 1, 1]=0.595531719781
+        arg[0, 0, 2]=-0.252210841606*x[0]+(0.379524542293)*x[1]
+        ref[0, 0, 2, 0]=-0.252210841606
+        ref[0, 0, 2, 1]=0.379524542293
+        arg[0, 0, 3]=0.827762742733*x[0]+(-0.274551422309)*x[1]
+        ref[0, 0, 3, 0]=0.827762742733
+        ref[0, 0, 3, 1]=-0.274551422309
+        arg[0, 1, 0]=-0.925699030764*x[0]+(0.741222065386)*x[1]
+        ref[0, 1, 0, 0]=-0.925699030764
+        ref[0, 1, 0, 1]=0.741222065386
+        arg[0, 1, 1]=0.778172474424*x[0]+(0.779304824725)*x[1]
+        ref[0, 1, 1, 0]=0.778172474424
+        ref[0, 1, 1, 1]=0.779304824725
+        arg[0, 1, 2]=-0.520906783311*x[0]+(-0.979005245945)*x[1]
+        ref[0, 1, 2, 0]=-0.520906783311
+        ref[0, 1, 2, 1]=-0.979005245945
+        arg[0, 1, 3]=0.645743845211*x[0]+(0.731348745156)*x[1]
+        ref[0, 1, 3, 0]=0.645743845211
+        ref[0, 1, 3, 1]=0.731348745156
+        arg[0, 2, 0]=0.496549514171*x[0]+(0.453553604783)*x[1]
+        ref[0, 2, 0, 0]=0.496549514171
+        ref[0, 2, 0, 1]=0.453553604783
+        arg[0, 2, 1]=-0.378634595711*x[0]+(0.0646329461742)*x[1]
+        ref[0, 2, 1, 0]=-0.378634595711
+        ref[0, 2, 1, 1]=0.0646329461742
+        arg[0, 2, 2]=-0.4861221847*x[0]+(0.796731079575)*x[1]
+        ref[0, 2, 2, 0]=-0.4861221847
+        ref[0, 2, 2, 1]=0.796731079575
+        arg[0, 2, 3]=-0.231831430714*x[0]+(0.878995603644)*x[1]
+        ref[0, 2, 3, 0]=-0.231831430714
+        ref[0, 2, 3, 1]=0.878995603644
+        arg[0, 3, 0]=-0.244798271235*x[0]+(-0.148613467964)*x[1]
+        ref[0, 3, 0, 0]=-0.244798271235
+        ref[0, 3, 0, 1]=-0.148613467964
+        arg[0, 3, 1]=0.459673884581*x[0]+(0.408166333319)*x[1]
+        ref[0, 3, 1, 0]=0.459673884581
+        ref[0, 3, 1, 1]=0.408166333319
+        arg[0, 3, 2]=-0.433060668874*x[0]+(-0.855647712614)*x[1]
+        ref[0, 3, 2, 0]=-0.433060668874
+        ref[0, 3, 2, 1]=-0.855647712614
+        arg[0, 3, 3]=0.121234149292*x[0]+(0.384017266782)*x[1]
+        ref[0, 3, 3, 0]=0.121234149292
+        ref[0, 3, 3, 1]=0.384017266782
+        arg[1, 0, 0]=0.436406034721*x[0]+(-0.543010380821)*x[1]
+        ref[1, 0, 0, 0]=0.436406034721
+        ref[1, 0, 0, 1]=-0.543010380821
+        arg[1, 0, 1]=0.282306697558*x[0]+(0.638032019066)*x[1]
+        ref[1, 0, 1, 0]=0.282306697558
+        ref[1, 0, 1, 1]=0.638032019066
+        arg[1, 0, 2]=-0.420219522583*x[0]+(0.779053081918)*x[1]
+        ref[1, 0, 2, 0]=-0.420219522583
+        ref[1, 0, 2, 1]=0.779053081918
+        arg[1, 0, 3]=-0.747742867554*x[0]+(0.662668448086)*x[1]
+        ref[1, 0, 3, 0]=-0.747742867554
+        ref[1, 0, 3, 1]=0.662668448086
+        arg[1, 1, 0]=0.623723696777*x[0]+(-0.128891582469)*x[1]
+        ref[1, 1, 0, 0]=0.623723696777
+        ref[1, 1, 0, 1]=-0.128891582469
+        arg[1, 1, 1]=0.913170388206*x[0]+(0.470092204606)*x[1]
+        ref[1, 1, 1, 0]=0.913170388206
+        ref[1, 1, 1, 1]=0.470092204606
+        arg[1, 1, 2]=0.00762891443288*x[0]+(-0.225074638184)*x[1]
+        ref[1, 1, 2, 0]=0.00762891443288
+        ref[1, 1, 2, 1]=-0.225074638184
+        arg[1, 1, 3]=0.709267287534*x[0]+(0.425960408608)*x[1]
+        ref[1, 1, 3, 0]=0.709267287534
+        ref[1, 1, 3, 1]=0.425960408608
+        arg[1, 2, 0]=0.564919246819*x[0]+(0.282531503515)*x[1]
+        ref[1, 2, 0, 0]=0.564919246819
+        ref[1, 2, 0, 1]=0.282531503515
+        arg[1, 2, 1]=0.527853219283*x[0]+(0.441117156808)*x[1]
+        ref[1, 2, 1, 0]=0.527853219283
+        ref[1, 2, 1, 1]=0.441117156808
+        arg[1, 2, 2]=0.346808372493*x[0]+(0.00359216487142)*x[1]
+        ref[1, 2, 2, 0]=0.346808372493
+        ref[1, 2, 2, 1]=0.00359216487142
+        arg[1, 2, 3]=0.707865155757*x[0]+(0.90505426057)*x[1]
+        ref[1, 2, 3, 0]=0.707865155757
+        ref[1, 2, 3, 1]=0.90505426057
+        arg[1, 3, 0]=0.394906972884*x[0]+(0.385429314799)*x[1]
+        ref[1, 3, 0, 0]=0.394906972884
+        ref[1, 3, 0, 1]=0.385429314799
+        arg[1, 3, 1]=0.73748040294*x[0]+(0.92311975959)*x[1]
+        ref[1, 3, 1, 0]=0.73748040294
+        ref[1, 3, 1, 1]=0.92311975959
+        arg[1, 3, 2]=-0.950541906897*x[0]+(-0.766322244138)*x[1]
+        ref[1, 3, 2, 0]=-0.950541906897
+        ref[1, 3, 2, 1]=-0.766322244138
+        arg[1, 3, 3]=-0.7836571975*x[0]+(0.453829711885)*x[1]
+        ref[1, 3, 3, 0]=-0.7836571975
+        ref[1, 3, 3, 1]=0.453829711885
+        arg[2, 0, 0]=-0.679609328897*x[0]+(-0.138183927062)*x[1]
+        ref[2, 0, 0, 0]=-0.679609328897
+        ref[2, 0, 0, 1]=-0.138183927062
+        arg[2, 0, 1]=-0.00153575789257*x[0]+(0.0300295333486)*x[1]
+        ref[2, 0, 1, 0]=-0.00153575789257
+        ref[2, 0, 1, 1]=0.0300295333486
+        arg[2, 0, 2]=-0.060488272834*x[0]+(-0.0995864156852)*x[1]
+        ref[2, 0, 2, 0]=-0.060488272834
+        ref[2, 0, 2, 1]=-0.0995864156852
+        arg[2, 0, 3]=0.40951711179*x[0]+(0.853803455453)*x[1]
+        ref[2, 0, 3, 0]=0.40951711179
+        ref[2, 0, 3, 1]=0.853803455453
+        arg[2, 1, 0]=-0.443035108917*x[0]+(0.0845644772221)*x[1]
+        ref[2, 1, 0, 0]=-0.443035108917
+        ref[2, 1, 0, 1]=0.0845644772221
+        arg[2, 1, 1]=0.650501059834*x[0]+(-0.389894162454)*x[1]
+        ref[2, 1, 1, 0]=0.650501059834
+        ref[2, 1, 1, 1]=-0.389894162454
+        arg[2, 1, 2]=-0.447741541709*x[0]+(-0.182644396299)*x[1]
+        ref[2, 1, 2, 0]=-0.447741541709
+        ref[2, 1, 2, 1]=-0.182644396299
+        arg[2, 1, 3]=-0.327762787774*x[0]+(0.535781871304)*x[1]
+        ref[2, 1, 3, 0]=-0.327762787774
+        ref[2, 1, 3, 1]=0.535781871304
+        arg[2, 2, 0]=0.620325798231*x[0]+(-0.202286963948)*x[1]
+        ref[2, 2, 0, 0]=0.620325798231
+        ref[2, 2, 0, 1]=-0.202286963948
+        arg[2, 2, 1]=0.0761876683671*x[0]+(-0.744668125784)*x[1]
+        ref[2, 2, 1, 0]=0.0761876683671
+        ref[2, 2, 1, 1]=-0.744668125784
+        arg[2, 2, 2]=-0.543746282477*x[0]+(-0.349405255019)*x[1]
+        ref[2, 2, 2, 0]=-0.543746282477
+        ref[2, 2, 2, 1]=-0.349405255019
+        arg[2, 2, 3]=-0.157949165669*x[0]+(-0.311031562031)*x[1]
+        ref[2, 2, 3, 0]=-0.157949165669
+        ref[2, 2, 3, 1]=-0.311031562031
+        arg[2, 3, 0]=-0.0269987446522*x[0]+(-0.459942346509)*x[1]
+        ref[2, 3, 0, 0]=-0.0269987446522
+        ref[2, 3, 0, 1]=-0.459942346509
+        arg[2, 3, 1]=-0.465285372077*x[0]+(-0.56766263336)*x[1]
+        ref[2, 3, 1, 0]=-0.465285372077
+        ref[2, 3, 1, 1]=-0.56766263336
+        arg[2, 3, 2]=0.0178217317622*x[0]+(0.557416148997)*x[1]
+        ref[2, 3, 2, 0]=0.0178217317622
+        ref[2, 3, 2, 1]=0.557416148997
+        arg[2, 3, 3]=0.953712295956*x[0]+(0.944174199137)*x[1]
+        ref[2, 3, 3, 0]=0.953712295956
+        ref[2, 3, 3, 1]=0.944174199137
+        if dim==3:
+            arg[0, 0, 0]+=0.114089839669*x[2]
+            ref[0, 0, 0, 2]=0.114089839669
+            arg[0, 0, 1]+=0.213925568899*x[2]
+            ref[0, 0, 1, 2]=0.213925568899
+            arg[0, 0, 2]+=0.112138871618*x[2]
+            ref[0, 0, 2, 2]=0.112138871618
+            arg[0, 0, 3]+=-0.108083352361*x[2]
+            ref[0, 0, 3, 2]=-0.108083352361
+            arg[0, 1, 0]+=-0.449154764502*x[2]
+            ref[0, 1, 0, 2]=-0.449154764502
+            arg[0, 1, 1]+=0.792386025396*x[2]
+            ref[0, 1, 1, 2]=0.792386025396
+            arg[0, 1, 2]+=-0.713531364889*x[2]
+            ref[0, 1, 2, 2]=-0.713531364889
+            arg[0, 1, 3]+=0.751726440362*x[2]
+            ref[0, 1, 3, 2]=0.751726440362
+            arg[0, 2, 0]+=0.863538887587*x[2]
+            ref[0, 2, 0, 2]=0.863538887587
+            arg[0, 2, 1]+=0.585426543963*x[2]
+            ref[0, 2, 1, 2]=0.585426543963
+            arg[0, 2, 2]+=-0.287784302353*x[2]
+            ref[0, 2, 2, 2]=-0.287784302353
+            arg[0, 2, 3]+=0.214870899533*x[2]
+            ref[0, 2, 3, 2]=0.214870899533
+            arg[0, 3, 0]+=0.56064479006*x[2]
+            ref[0, 3, 0, 2]=0.56064479006
+            arg[0, 3, 1]+=0.017222971673*x[2]
+            ref[0, 3, 1, 2]=0.017222971673
+            arg[0, 3, 2]+=-0.444736168237*x[2]
+            ref[0, 3, 2, 2]=-0.444736168237
+            arg[0, 3, 3]+=0.68256608579*x[2]
+            ref[0, 3, 3, 2]=0.68256608579
+            arg[1, 0, 0]+=0.395555351897*x[2]
+            ref[1, 0, 0, 2]=0.395555351897
+            arg[1, 0, 1]+=-0.751519845712*x[2]
+            ref[1, 0, 1, 2]=-0.751519845712
+            arg[1, 0, 2]+=0.863130792942*x[2]
+            ref[1, 0, 2, 2]=0.863130792942
+            arg[1, 0, 3]+=0.355320604074*x[2]
+            ref[1, 0, 3, 2]=0.355320604074
+            arg[1, 1, 0]+=-0.902306087969*x[2]
+            ref[1, 1, 0, 2]=-0.902306087969
+            arg[1, 1, 1]+=0.428546984457*x[2]
+            ref[1, 1, 1, 2]=0.428546984457
+            arg[1, 1, 2]+=-0.0773728147124*x[2]
+            ref[1, 1, 2, 2]=-0.0773728147124
+            arg[1, 1, 3]+=0.558674673393*x[2]
+            ref[1, 1, 3, 2]=0.558674673393
+            arg[1, 2, 0]+=-0.402665920057*x[2]
+            ref[1, 2, 0, 2]=-0.402665920057
+            arg[1, 2, 1]+=-0.778205136595*x[2]
+            ref[1, 2, 1, 2]=-0.778205136595
+            arg[1, 2, 2]+=-0.878069442535*x[2]
+            ref[1, 2, 2, 2]=-0.878069442535
+            arg[1, 2, 3]+=0.161572530415*x[2]
+            ref[1, 2, 3, 2]=0.161572530415
+            arg[1, 3, 0]+=-0.225943123912*x[2]
+            ref[1, 3, 0, 2]=-0.225943123912
+            arg[1, 3, 1]+=0.424124914331*x[2]
+            ref[1, 3, 1, 2]=0.424124914331
+            arg[1, 3, 2]+=0.449808405494*x[2]
+            ref[1, 3, 2, 2]=0.449808405494
+            arg[1, 3, 3]+=-0.888682168086*x[2]
+            ref[1, 3, 3, 2]=-0.888682168086
+            arg[2, 0, 0]+=-0.211271101499*x[2]
+            ref[2, 0, 0, 2]=-0.211271101499
+            arg[2, 0, 1]+=-0.830622438054*x[2]
+            ref[2, 0, 1, 2]=-0.830622438054
+            arg[2, 0, 2]+=0.471935036037*x[2]
+            ref[2, 0, 2, 2]=0.471935036037
+            arg[2, 0, 3]+=0.794656381695*x[2]
+            ref[2, 0, 3, 2]=0.794656381695
+            arg[2, 1, 0]+=0.754297549601*x[2]
+            ref[2, 1, 0, 2]=0.754297549601
+            arg[2, 1, 1]+=-0.984573092379*x[2]
+            ref[2, 1, 1, 2]=-0.984573092379
+            arg[2, 1, 2]+=-0.97450933437*x[2]
+            ref[2, 1, 2, 2]=-0.97450933437
+            arg[2, 1, 3]+=0.691331154158*x[2]
+            ref[2, 1, 3, 2]=0.691331154158
+            arg[2, 2, 0]+=-0.886253943391*x[2]
+            ref[2, 2, 0, 2]=-0.886253943391
+            arg[2, 2, 1]+=0.255699364477*x[2]
+            ref[2, 2, 1, 2]=0.255699364477
+            arg[2, 2, 2]+=-0.65276017437*x[2]
+            ref[2, 2, 2, 2]=-0.65276017437
+            arg[2, 2, 3]+=0.261471104256*x[2]
+            ref[2, 2, 3, 2]=0.261471104256
+            arg[2, 3, 0]+=0.555123750879*x[2]
+            ref[2, 3, 0, 2]=0.555123750879
+            arg[2, 3, 1]+=-0.493776533425*x[2]
+            ref[2, 3, 1, 2]=-0.493776533425
+            arg[2, 3, 2]+=-0.290119377253*x[2]
+            ref[2, 3, 2, 2]=-0.290119377253
+            arg[2, 3, 3]+=-0.0147632895648*x[2]
+            ref[2, 3, 3, 2]=-0.0147632895648
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.0601558040225*x[0]+(-0.397494727137)*x[1]
+        ref[0]=-0.0601558040225
+        ref[1]=-0.397494727137
+        if dim==3:
+            arg+=(0.0666565100163)*x[2]
+            ref[2]=0.0666565100163
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=0.177454285459*x[0]+(0.992533962996)*x[1]
+        ref[0, 0]=0.177454285459
+        ref[0, 1]=0.992533962996
+        arg[1,]=0.367762784884*x[0]+(0.378467034311)*x[1]
+        ref[1, 0]=0.367762784884
+        ref[1, 1]=0.378467034311
+        if dim==3:
+            arg[0,]+=0.534053347196*x[2]
+            ref[0, 2]=0.534053347196
+            arg[1,]+=0.875837330609*x[2]
+            ref[1, 2]=0.875837330609
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3)+(dim,),w_ref)
+        arg[0, 0]=-0.0738312768866*x[0]+(-0.763368600261)*x[1]
+        ref[0, 0, 0]=-0.0738312768866
+        ref[0, 0, 1]=-0.763368600261
+        arg[0, 1]=-0.903945384869*x[0]+(-0.293140877156)*x[1]
+        ref[0, 1, 0]=-0.903945384869
+        ref[0, 1, 1]=-0.293140877156
+        arg[0, 2]=0.45446030802*x[0]+(-0.445407767799)*x[1]
+        ref[0, 2, 0]=0.45446030802
+        ref[0, 2, 1]=-0.445407767799
+        arg[1, 0]=-0.533715429686*x[0]+(-0.464677354867)*x[1]
+        ref[1, 0, 0]=-0.533715429686
+        ref[1, 0, 1]=-0.464677354867
+        arg[1, 1]=0.760642911331*x[0]+(0.114249453846)*x[1]
+        ref[1, 1, 0]=0.760642911331
+        ref[1, 1, 1]=0.114249453846
+        arg[1, 2]=-0.240274767116*x[0]+(-0.538775789057)*x[1]
+        ref[1, 2, 0]=-0.240274767116
+        ref[1, 2, 1]=-0.538775789057
+        arg[2, 0]=0.451825083663*x[0]+(-0.10702609221)*x[1]
+        ref[2, 0, 0]=0.451825083663
+        ref[2, 0, 1]=-0.10702609221
+        arg[2, 1]=-0.627239184885*x[0]+(-0.826104506453)*x[1]
+        ref[2, 1, 0]=-0.627239184885
+        ref[2, 1, 1]=-0.826104506453
+        arg[2, 2]=0.761408499345*x[0]+(-0.917588055604)*x[1]
+        ref[2, 2, 0]=0.761408499345
+        ref[2, 2, 1]=-0.917588055604
+        if dim==3:
+            arg[0, 0]+=-0.403222239072*x[2]
+            ref[0, 0, 2]=-0.403222239072
+            arg[0, 1]+=0.649017201181*x[2]
+            ref[0, 1, 2]=0.649017201181
+            arg[0, 2]+=-0.233873501336*x[2]
+            ref[0, 2, 2]=-0.233873501336
+            arg[1, 0]+=-0.45052689362*x[2]
+            ref[1, 0, 2]=-0.45052689362
+            arg[1, 1]+=0.452454798139*x[2]
+            ref[1, 1, 2]=0.452454798139
+            arg[1, 2]+=0.411061950458*x[2]
+            ref[1, 2, 2]=0.411061950458
+            arg[2, 0]+=-0.129094903646*x[2]
+            ref[2, 0, 2]=-0.129094903646
+            arg[2, 1]+=-0.922353929347*x[2]
+            ref[2, 1, 2]=-0.922353929347
+            arg[2, 2]+=-0.862073746792*x[2]
+            ref[2, 2, 2]=-0.862073746792
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=0.379458562876*x[0]+(-0.958535103688)*x[1]
+        ref[0, 0, 0, 0]=0.379458562876
+        ref[0, 0, 0, 1]=-0.958535103688
+        arg[0, 0, 1]=0.926407979389*x[0]+(-0.522856783667)*x[1]
+        ref[0, 0, 1, 0]=0.926407979389
+        ref[0, 0, 1, 1]=-0.522856783667
+        arg[0, 0, 2]=-0.548742215126*x[0]+(0.0708774409098)*x[1]
+        ref[0, 0, 2, 0]=-0.548742215126
+        ref[0, 0, 2, 1]=0.0708774409098
+        arg[0, 0, 3]=-0.920835531365*x[0]+(0.993573096959)*x[1]
+        ref[0, 0, 3, 0]=-0.920835531365
+        ref[0, 0, 3, 1]=0.993573096959
+        arg[0, 1, 0]=-0.14759540662*x[0]+(-0.538877043308)*x[1]
+        ref[0, 1, 0, 0]=-0.14759540662
+        ref[0, 1, 0, 1]=-0.538877043308
+        arg[0, 1, 1]=0.668038715449*x[0]+(-0.471106017901)*x[1]
+        ref[0, 1, 1, 0]=0.668038715449
+        ref[0, 1, 1, 1]=-0.471106017901
+        arg[0, 1, 2]=0.694873701686*x[0]+(-0.515354689672)*x[1]
+        ref[0, 1, 2, 0]=0.694873701686
+        ref[0, 1, 2, 1]=-0.515354689672
+        arg[0, 1, 3]=0.846617352682*x[0]+(0.750229627377)*x[1]
+        ref[0, 1, 3, 0]=0.846617352682
+        ref[0, 1, 3, 1]=0.750229627377
+        arg[0, 2, 0]=-0.41469523515*x[0]+(-0.369341696823)*x[1]
+        ref[0, 2, 0, 0]=-0.41469523515
+        ref[0, 2, 0, 1]=-0.369341696823
+        arg[0, 2, 1]=0.530267245762*x[0]+(0.494713177846)*x[1]
+        ref[0, 2, 1, 0]=0.530267245762
+        ref[0, 2, 1, 1]=0.494713177846
+        arg[0, 2, 2]=0.368244470145*x[0]+(-0.297179133478)*x[1]
+        ref[0, 2, 2, 0]=0.368244470145
+        ref[0, 2, 2, 1]=-0.297179133478
+        arg[0, 2, 3]=0.940131707496*x[0]+(0.949129559156)*x[1]
+        ref[0, 2, 3, 0]=0.940131707496
+        ref[0, 2, 3, 1]=0.949129559156
+        arg[1, 0, 0]=0.994653685626*x[0]+(-0.753447776024)*x[1]
+        ref[1, 0, 0, 0]=0.994653685626
+        ref[1, 0, 0, 1]=-0.753447776024
+        arg[1, 0, 1]=-0.222696369254*x[0]+(-0.848052078996)*x[1]
+        ref[1, 0, 1, 0]=-0.222696369254
+        ref[1, 0, 1, 1]=-0.848052078996
+        arg[1, 0, 2]=0.615097691748*x[0]+(-0.00406987356212)*x[1]
+        ref[1, 0, 2, 0]=0.615097691748
+        ref[1, 0, 2, 1]=-0.00406987356212
+        arg[1, 0, 3]=-0.745135283943*x[0]+(0.835830705858)*x[1]
+        ref[1, 0, 3, 0]=-0.745135283943
+        ref[1, 0, 3, 1]=0.835830705858
+        arg[1, 1, 0]=-0.991532072675*x[0]+(-0.162954903585)*x[1]
+        ref[1, 1, 0, 0]=-0.991532072675
+        ref[1, 1, 0, 1]=-0.162954903585
+        arg[1, 1, 1]=0.371841734658*x[0]+(-0.876016077372)*x[1]
+        ref[1, 1, 1, 0]=0.371841734658
+        ref[1, 1, 1, 1]=-0.876016077372
+        arg[1, 1, 2]=-0.922309502585*x[0]+(0.481954789732)*x[1]
+        ref[1, 1, 2, 0]=-0.922309502585
+        ref[1, 1, 2, 1]=0.481954789732
+        arg[1, 1, 3]=0.214194335601*x[0]+(0.618986418208)*x[1]
+        ref[1, 1, 3, 0]=0.214194335601
+        ref[1, 1, 3, 1]=0.618986418208
+        arg[1, 2, 0]=-0.392598888816*x[0]+(-0.275278388557)*x[1]
+        ref[1, 2, 0, 0]=-0.392598888816
+        ref[1, 2, 0, 1]=-0.275278388557
+        arg[1, 2, 1]=-0.636907630692*x[0]+(-0.77704587733)*x[1]
+        ref[1, 2, 1, 0]=-0.636907630692
+        ref[1, 2, 1, 1]=-0.77704587733
+        arg[1, 2, 2]=0.96677035281*x[0]+(-0.795500930365)*x[1]
+        ref[1, 2, 2, 0]=0.96677035281
+        ref[1, 2, 2, 1]=-0.795500930365
+        arg[1, 2, 3]=0.15271150112*x[0]+(-0.711011386671)*x[1]
+        ref[1, 2, 3, 0]=0.15271150112
+        ref[1, 2, 3, 1]=-0.711011386671
+        arg[2, 0, 0]=0.713060570864*x[0]+(-0.629828009615)*x[1]
+        ref[2, 0, 0, 0]=0.713060570864
+        ref[2, 0, 0, 1]=-0.629828009615
+        arg[2, 0, 1]=-0.936517933183*x[0]+(0.818410077785)*x[1]
+        ref[2, 0, 1, 0]=-0.936517933183
+        ref[2, 0, 1, 1]=0.818410077785
+        arg[2, 0, 2]=0.22907161174*x[0]+(-0.724485312558)*x[1]
+        ref[2, 0, 2, 0]=0.22907161174
+        ref[2, 0, 2, 1]=-0.724485312558
+        arg[2, 0, 3]=0.779237230436*x[0]+(0.47662048081)*x[1]
+        ref[2, 0, 3, 0]=0.779237230436
+        ref[2, 0, 3, 1]=0.47662048081
+        arg[2, 1, 0]=-0.744897758982*x[0]+(-0.671192302261)*x[1]
+        ref[2, 1, 0, 0]=-0.744897758982
+        ref[2, 1, 0, 1]=-0.671192302261
+        arg[2, 1, 1]=-0.372142036896*x[0]+(-0.517894092164)*x[1]
+        ref[2, 1, 1, 0]=-0.372142036896
+        ref[2, 1, 1, 1]=-0.517894092164
+        arg[2, 1, 2]=0.0261240202948*x[0]+(0.639438323428)*x[1]
+        ref[2, 1, 2, 0]=0.0261240202948
+        ref[2, 1, 2, 1]=0.639438323428
+        arg[2, 1, 3]=0.939077408199*x[0]+(0.834677726343)*x[1]
+        ref[2, 1, 3, 0]=0.939077408199
+        ref[2, 1, 3, 1]=0.834677726343
+        arg[2, 2, 0]=-0.333842475646*x[0]+(-0.0392074897955)*x[1]
+        ref[2, 2, 0, 0]=-0.333842475646
+        ref[2, 2, 0, 1]=-0.0392074897955
+        arg[2, 2, 1]=-0.936015259767*x[0]+(-0.990388320532)*x[1]
+        ref[2, 2, 1, 0]=-0.936015259767
+        ref[2, 2, 1, 1]=-0.990388320532
+        arg[2, 2, 2]=-0.940471094157*x[0]+(-0.946609624311)*x[1]
+        ref[2, 2, 2, 0]=-0.940471094157
+        ref[2, 2, 2, 1]=-0.946609624311
+        arg[2, 2, 3]=0.698464033945*x[0]+(0.36014888056)*x[1]
+        ref[2, 2, 3, 0]=0.698464033945
+        ref[2, 2, 3, 1]=0.36014888056
+        arg[3, 0, 0]=0.387202280238*x[0]+(-0.0226366249627)*x[1]
+        ref[3, 0, 0, 0]=0.387202280238
+        ref[3, 0, 0, 1]=-0.0226366249627
+        arg[3, 0, 1]=0.468524660457*x[0]+(0.846912578148)*x[1]
+        ref[3, 0, 1, 0]=0.468524660457
+        ref[3, 0, 1, 1]=0.846912578148
+        arg[3, 0, 2]=-0.245687094138*x[0]+(0.00572724736656)*x[1]
+        ref[3, 0, 2, 0]=-0.245687094138
+        ref[3, 0, 2, 1]=0.00572724736656
+        arg[3, 0, 3]=0.717422363732*x[0]+(0.76795851425)*x[1]
+        ref[3, 0, 3, 0]=0.717422363732
+        ref[3, 0, 3, 1]=0.76795851425
+        arg[3, 1, 0]=0.597973711876*x[0]+(0.963501080843)*x[1]
+        ref[3, 1, 0, 0]=0.597973711876
+        ref[3, 1, 0, 1]=0.963501080843
+        arg[3, 1, 1]=0.146003877191*x[0]+(-0.869544026305)*x[1]
+        ref[3, 1, 1, 0]=0.146003877191
+        ref[3, 1, 1, 1]=-0.869544026305
+        arg[3, 1, 2]=0.794969561088*x[0]+(0.123806083488)*x[1]
+        ref[3, 1, 2, 0]=0.794969561088
+        ref[3, 1, 2, 1]=0.123806083488
+        arg[3, 1, 3]=0.363764558424*x[0]+(0.105564073384)*x[1]
+        ref[3, 1, 3, 0]=0.363764558424
+        ref[3, 1, 3, 1]=0.105564073384
+        arg[3, 2, 0]=0.12810439635*x[0]+(-0.583526572465)*x[1]
+        ref[3, 2, 0, 0]=0.12810439635
+        ref[3, 2, 0, 1]=-0.583526572465
+        arg[3, 2, 1]=0.14501837942*x[0]+(-0.739785883127)*x[1]
+        ref[3, 2, 1, 0]=0.14501837942
+        ref[3, 2, 1, 1]=-0.739785883127
+        arg[3, 2, 2]=0.653894417968*x[0]+(0.309361818477)*x[1]
+        ref[3, 2, 2, 0]=0.653894417968
+        ref[3, 2, 2, 1]=0.309361818477
+        arg[3, 2, 3]=0.375555031336*x[0]+(-0.405074127566)*x[1]
+        ref[3, 2, 3, 0]=0.375555031336
+        ref[3, 2, 3, 1]=-0.405074127566
+        if dim==3:
+            arg[0, 0, 0]+=-0.563073156496*x[2]
+            ref[0, 0, 0, 2]=-0.563073156496
+            arg[0, 0, 1]+=0.885795699351*x[2]
+            ref[0, 0, 1, 2]=0.885795699351
+            arg[0, 0, 2]+=-0.853513880466*x[2]
+            ref[0, 0, 2, 2]=-0.853513880466
+            arg[0, 0, 3]+=0.195208232054*x[2]
+            ref[0, 0, 3, 2]=0.195208232054
+            arg[0, 1, 0]+=0.566052910323*x[2]
+            ref[0, 1, 0, 2]=0.566052910323
+            arg[0, 1, 1]+=-0.470847348064*x[2]
+            ref[0, 1, 1, 2]=-0.470847348064
+            arg[0, 1, 2]+=-0.880190205329*x[2]
+            ref[0, 1, 2, 2]=-0.880190205329
+            arg[0, 1, 3]+=0.63747370374*x[2]
+            ref[0, 1, 3, 2]=0.63747370374
+            arg[0, 2, 0]+=-0.969252193985*x[2]
+            ref[0, 2, 0, 2]=-0.969252193985
+            arg[0, 2, 1]+=-0.261727988825*x[2]
+            ref[0, 2, 1, 2]=-0.261727988825
+            arg[0, 2, 2]+=0.184162835891*x[2]
+            ref[0, 2, 2, 2]=0.184162835891
+            arg[0, 2, 3]+=-0.875914350654*x[2]
+            ref[0, 2, 3, 2]=-0.875914350654
+            arg[1, 0, 0]+=-0.700000351505*x[2]
+            ref[1, 0, 0, 2]=-0.700000351505
+            arg[1, 0, 1]+=-0.94181504572*x[2]
+            ref[1, 0, 1, 2]=-0.94181504572
+            arg[1, 0, 2]+=-0.450072901448*x[2]
+            ref[1, 0, 2, 2]=-0.450072901448
+            arg[1, 0, 3]+=-0.913460982874*x[2]
+            ref[1, 0, 3, 2]=-0.913460982874
+            arg[1, 1, 0]+=0.849663000152*x[2]
+            ref[1, 1, 0, 2]=0.849663000152
+            arg[1, 1, 1]+=-0.0977336848529*x[2]
+            ref[1, 1, 1, 2]=-0.0977336848529
+            arg[1, 1, 2]+=0.503440388641*x[2]
+            ref[1, 1, 2, 2]=0.503440388641
+            arg[1, 1, 3]+=-0.731919802099*x[2]
+            ref[1, 1, 3, 2]=-0.731919802099
+            arg[1, 2, 0]+=-0.0045007740045*x[2]
+            ref[1, 2, 0, 2]=-0.0045007740045
+            arg[1, 2, 1]+=0.934148295682*x[2]
+            ref[1, 2, 1, 2]=0.934148295682
+            arg[1, 2, 2]+=0.653291500113*x[2]
+            ref[1, 2, 2, 2]=0.653291500113
+            arg[1, 2, 3]+=-0.479263004612*x[2]
+            ref[1, 2, 3, 2]=-0.479263004612
+            arg[2, 0, 0]+=-0.15781033089*x[2]
+            ref[2, 0, 0, 2]=-0.15781033089
+            arg[2, 0, 1]+=0.738821013142*x[2]
+            ref[2, 0, 1, 2]=0.738821013142
+            arg[2, 0, 2]+=-0.454028071709*x[2]
+            ref[2, 0, 2, 2]=-0.454028071709
+            arg[2, 0, 3]+=-0.536674115871*x[2]
+            ref[2, 0, 3, 2]=-0.536674115871
+            arg[2, 1, 0]+=0.584024619969*x[2]
+            ref[2, 1, 0, 2]=0.584024619969
+            arg[2, 1, 1]+=0.711669125977*x[2]
+            ref[2, 1, 1, 2]=0.711669125977
+            arg[2, 1, 2]+=-0.843783162489*x[2]
+            ref[2, 1, 2, 2]=-0.843783162489
+            arg[2, 1, 3]+=-0.999974816387*x[2]
+            ref[2, 1, 3, 2]=-0.999974816387
+            arg[2, 2, 0]+=-0.318365665792*x[2]
+            ref[2, 2, 0, 2]=-0.318365665792
+            arg[2, 2, 1]+=-0.224913215206*x[2]
+            ref[2, 2, 1, 2]=-0.224913215206
+            arg[2, 2, 2]+=-0.591523938658*x[2]
+            ref[2, 2, 2, 2]=-0.591523938658
+            arg[2, 2, 3]+=-0.472939079893*x[2]
+            ref[2, 2, 3, 2]=-0.472939079893
+            arg[3, 0, 0]+=0.39584063248*x[2]
+            ref[3, 0, 0, 2]=0.39584063248
+            arg[3, 0, 1]+=-0.0499937991492*x[2]
+            ref[3, 0, 1, 2]=-0.0499937991492
+            arg[3, 0, 2]+=-0.174430563659*x[2]
+            ref[3, 0, 2, 2]=-0.174430563659
+            arg[3, 0, 3]+=-0.972227349307*x[2]
+            ref[3, 0, 3, 2]=-0.972227349307
+            arg[3, 1, 0]+=0.303983199754*x[2]
+            ref[3, 1, 0, 2]=0.303983199754
+            arg[3, 1, 1]+=0.272867972539*x[2]
+            ref[3, 1, 1, 2]=0.272867972539
+            arg[3, 1, 2]+=-0.759222403303*x[2]
+            ref[3, 1, 2, 2]=-0.759222403303
+            arg[3, 1, 3]+=0.22527602324*x[2]
+            ref[3, 1, 3, 2]=0.22527602324
+            arg[3, 2, 0]+=-0.443873381508*x[2]
+            ref[3, 2, 0, 2]=-0.443873381508
+            arg[3, 2, 1]+=0.378256272572*x[2]
+            ref[3, 2, 1, 2]=0.378256272572
+            arg[3, 2, 2]+=-0.999518391365*x[2]
+            ref[3, 2, 2, 2]=-0.999518391365
+            arg[3, 2, 3]+=0.803609692815*x[2]
+            ref[3, 2, 3, 2]=0.803609692815
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.343551132995*x[0]**o+(-0.575567088698)*x[0]+(-0.761242668552)*x[1]**o+(-0.40460308283)*x[1]
+        ref[0]=0.343551132995*o*x_ref[0]**(o-1)+(-0.575567088698)
+        ref[1]=-0.761242668552*o*x_ref[1]**(o-1)+(-0.40460308283)
+        if dim==3:
+            arg+=(-0.0911753834201)*x[2]**o+(0.401965038351)*x[2]
+            ref[2]=-0.0911753834201*o*x_ref[2]**(o-1)+(0.401965038351)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=-0.374852418779*x[0]**o+(-0.794585992923)*x[0]+(-0.368018259459)*x[1]**o+(-0.108126793531)*x[1]
+        ref[0, 0]=-0.374852418779*o*x_ref[0]**(o-1)+(-0.794585992923)
+        ref[0, 1]=-0.368018259459*o*x_ref[1]**(o-1)+(-0.108126793531)
+        arg[1,]=-0.146459440493*x[0]**o+(-0.1268204543)*x[0]+(0.853850364896)*x[1]**o+(-0.450594275174)*x[1]
+        ref[1, 0]=-0.146459440493*o*x_ref[0]**(o-1)+(-0.1268204543)
+        ref[1, 1]=0.853850364896*o*x_ref[1]**(o-1)+(-0.450594275174)
+        arg[2,]=-0.792313729776*x[0]**o+(-0.97050665917)*x[0]+(-0.851925260299)*x[1]**o+(0.56435656635)*x[1]
+        ref[2, 0]=-0.792313729776*o*x_ref[0]**(o-1)+(-0.97050665917)
+        ref[2, 1]=-0.851925260299*o*x_ref[1]**(o-1)+(0.56435656635)
+        arg[3,]=0.209387836604*x[0]**o+(-0.0875212341261)*x[0]+(0.127408360582)*x[1]**o+(-0.514864284723)*x[1]
+        ref[3, 0]=0.209387836604*o*x_ref[0]**(o-1)+(-0.0875212341261)
+        ref[3, 1]=0.127408360582*o*x_ref[1]**(o-1)+(-0.514864284723)
+        if dim==3:
+            arg[0,]+=0.868433237157*x[2]**o+(-0.902685783924)*x[2]
+            ref[0, 2]=0.868433237157*o*x_ref[2]**(o-1)+(-0.902685783924)
+            arg[1,]+=0.718009528134*x[2]**o+(0.984030552569)*x[2]
+            ref[1, 2]=0.718009528134*o*x_ref[2]**(o-1)+(0.984030552569)
+            arg[2,]+=0.841643506934*x[2]**o+(0.632454709643)*x[2]
+            ref[2, 2]=0.841643506934*o*x_ref[2]**(o-1)+(0.632454709643)
+            arg[3,]+=0.222109256325*x[2]**o+(0.363947934888)*x[2]
+            ref[3, 2]=0.222109256325*o*x_ref[2]**(o-1)+(0.363947934888)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=0.204039941822*x[0]**o+(-0.44300583924)*x[0]+(-0.365232788045)*x[1]**o+(0.428316620611)*x[1]
+        ref[0, 0, 0]=0.204039941822*o*x_ref[0]**(o-1)+(-0.44300583924)
+        ref[0, 0, 1]=-0.365232788045*o*x_ref[1]**(o-1)+(0.428316620611)
+        arg[0, 1]=0.31095993463*x[0]**o+(0.598236945024)*x[0]+(0.646057477302)*x[1]**o+(0.340327151269)*x[1]
+        ref[0, 1, 0]=0.31095993463*o*x_ref[0]**(o-1)+(0.598236945024)
+        ref[0, 1, 1]=0.646057477302*o*x_ref[1]**(o-1)+(0.340327151269)
+        arg[1, 0]=-0.532887405787*x[0]**o+(-0.549743223467)*x[0]+(0.404280060172)*x[1]**o+(-0.964954629799)*x[1]
+        ref[1, 0, 0]=-0.532887405787*o*x_ref[0]**(o-1)+(-0.549743223467)
+        ref[1, 0, 1]=0.404280060172*o*x_ref[1]**(o-1)+(-0.964954629799)
+        arg[1, 1]=-0.84684040446*x[0]**o+(0.984516318766)*x[0]+(-0.288889417126)*x[1]**o+(-0.126791900274)*x[1]
+        ref[1, 1, 0]=-0.84684040446*o*x_ref[0]**(o-1)+(0.984516318766)
+        ref[1, 1, 1]=-0.288889417126*o*x_ref[1]**(o-1)+(-0.126791900274)
+        arg[2, 0]=0.842930084432*x[0]**o+(0.000847353485426)*x[0]+(-0.770029745351)*x[1]**o+(0.0502876050681)*x[1]
+        ref[2, 0, 0]=0.842930084432*o*x_ref[0]**(o-1)+(0.000847353485426)
+        ref[2, 0, 1]=-0.770029745351*o*x_ref[1]**(o-1)+(0.0502876050681)
+        arg[2, 1]=0.5854037193*x[0]**o+(0.464462365315)*x[0]+(-0.333705958468)*x[1]**o+(-0.543474795793)*x[1]
+        ref[2, 1, 0]=0.5854037193*o*x_ref[0]**(o-1)+(0.464462365315)
+        ref[2, 1, 1]=-0.333705958468*o*x_ref[1]**(o-1)+(-0.543474795793)
+        if dim==3:
+            arg[0, 0]+=0.613135040819*x[2]**o+(0.0538649862075)*x[2]
+            ref[0, 0, 2]=0.613135040819*o*x_ref[2]**(o-1)+(0.0538649862075)
+            arg[0, 1]+=0.861051840693*x[2]**o+(0.269730899337)*x[2]
+            ref[0, 1, 2]=0.861051840693*o*x_ref[2]**(o-1)+(0.269730899337)
+            arg[1, 0]+=-0.524019532604*x[2]**o+(0.58921985248)*x[2]
+            ref[1, 0, 2]=-0.524019532604*o*x_ref[2]**(o-1)+(0.58921985248)
+            arg[1, 1]+=0.214350792413*x[2]**o+(0.752599676423)*x[2]
+            ref[1, 1, 2]=0.214350792413*o*x_ref[2]**(o-1)+(0.752599676423)
+            arg[2, 0]+=-0.370633814791*x[2]**o+(-0.646744295462)*x[2]
+            ref[2, 0, 2]=-0.370633814791*o*x_ref[2]**(o-1)+(-0.646744295462)
+            arg[2, 1]+=0.766560807091*x[2]**o+(-0.723559484414)*x[2]
+            ref[2, 1, 2]=0.766560807091*o*x_ref[2]**(o-1)+(-0.723559484414)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.572932041102*x[0]**o+(-0.201693261057)*x[0]+(-0.417046977785)*x[1]**o+(0.093959830832)*x[1]
+        ref[0, 0, 0, 0]=-0.572932041102*o*x_ref[0]**(o-1)+(-0.201693261057)
+        ref[0, 0, 0, 1]=-0.417046977785*o*x_ref[1]**(o-1)+(0.093959830832)
+        arg[0, 0, 1]=-0.980911755091*x[0]**o+(-0.216814593961)*x[0]+(0.389999256692)*x[1]**o+(0.430950777469)*x[1]
+        ref[0, 0, 1, 0]=-0.980911755091*o*x_ref[0]**(o-1)+(-0.216814593961)
+        ref[0, 0, 1, 1]=0.389999256692*o*x_ref[1]**(o-1)+(0.430950777469)
+        arg[0, 1, 0]=0.130974999942*x[0]**o+(-0.195414424503)*x[0]+(-0.806454723719)*x[1]**o+(0.346907274957)*x[1]
+        ref[0, 1, 0, 0]=0.130974999942*o*x_ref[0]**(o-1)+(-0.195414424503)
+        ref[0, 1, 0, 1]=-0.806454723719*o*x_ref[1]**(o-1)+(0.346907274957)
+        arg[0, 1, 1]=0.750181116704*x[0]**o+(-0.0924437615757)*x[0]+(-0.939748369233)*x[1]**o+(-0.935119418921)*x[1]
+        ref[0, 1, 1, 0]=0.750181116704*o*x_ref[0]**(o-1)+(-0.0924437615757)
+        ref[0, 1, 1, 1]=-0.939748369233*o*x_ref[1]**(o-1)+(-0.935119418921)
+        arg[0, 2, 0]=0.338262030288*x[0]**o+(0.270152263291)*x[0]+(0.312797596006)*x[1]**o+(-0.537579853708)*x[1]
+        ref[0, 2, 0, 0]=0.338262030288*o*x_ref[0]**(o-1)+(0.270152263291)
+        ref[0, 2, 0, 1]=0.312797596006*o*x_ref[1]**(o-1)+(-0.537579853708)
+        arg[0, 2, 1]=-0.882891693982*x[0]**o+(0.632628509551)*x[0]+(-0.988782716655)*x[1]**o+(0.221891277864)*x[1]
+        ref[0, 2, 1, 0]=-0.882891693982*o*x_ref[0]**(o-1)+(0.632628509551)
+        ref[0, 2, 1, 1]=-0.988782716655*o*x_ref[1]**(o-1)+(0.221891277864)
+        arg[1, 0, 0]=-0.0843288921046*x[0]**o+(0.459024076714)*x[0]+(0.0778146504085)*x[1]**o+(-0.69823752189)*x[1]
+        ref[1, 0, 0, 0]=-0.0843288921046*o*x_ref[0]**(o-1)+(0.459024076714)
+        ref[1, 0, 0, 1]=0.0778146504085*o*x_ref[1]**(o-1)+(-0.69823752189)
+        arg[1, 0, 1]=0.331548529316*x[0]**o+(0.294902805428)*x[0]+(0.662254815768)*x[1]**o+(0.701446670345)*x[1]
+        ref[1, 0, 1, 0]=0.331548529316*o*x_ref[0]**(o-1)+(0.294902805428)
+        ref[1, 0, 1, 1]=0.662254815768*o*x_ref[1]**(o-1)+(0.701446670345)
+        arg[1, 1, 0]=-0.763002687978*x[0]**o+(-0.671329135297)*x[0]+(-0.503363837405)*x[1]**o+(-0.764584720596)*x[1]
+        ref[1, 1, 0, 0]=-0.763002687978*o*x_ref[0]**(o-1)+(-0.671329135297)
+        ref[1, 1, 0, 1]=-0.503363837405*o*x_ref[1]**(o-1)+(-0.764584720596)
+        arg[1, 1, 1]=-0.592859884586*x[0]**o+(-0.903888951796)*x[0]+(0.499853119995)*x[1]**o+(0.606364718074)*x[1]
+        ref[1, 1, 1, 0]=-0.592859884586*o*x_ref[0]**(o-1)+(-0.903888951796)
+        ref[1, 1, 1, 1]=0.499853119995*o*x_ref[1]**(o-1)+(0.606364718074)
+        arg[1, 2, 0]=-0.492582240254*x[0]**o+(-0.777074897565)*x[0]+(-0.215653284249)*x[1]**o+(0.2124829569)*x[1]
+        ref[1, 2, 0, 0]=-0.492582240254*o*x_ref[0]**(o-1)+(-0.777074897565)
+        ref[1, 2, 0, 1]=-0.215653284249*o*x_ref[1]**(o-1)+(0.2124829569)
+        arg[1, 2, 1]=-0.356387226515*x[0]**o+(-0.340341376721)*x[0]+(-0.858824936121)*x[1]**o+(0.725274427148)*x[1]
+        ref[1, 2, 1, 0]=-0.356387226515*o*x_ref[0]**(o-1)+(-0.340341376721)
+        ref[1, 2, 1, 1]=-0.858824936121*o*x_ref[1]**(o-1)+(0.725274427148)
+        arg[2, 0, 0]=0.763635332519*x[0]**o+(0.229287881671)*x[0]+(0.427204326684)*x[1]**o+(-0.307640649528)*x[1]
+        ref[2, 0, 0, 0]=0.763635332519*o*x_ref[0]**(o-1)+(0.229287881671)
+        ref[2, 0, 0, 1]=0.427204326684*o*x_ref[1]**(o-1)+(-0.307640649528)
+        arg[2, 0, 1]=0.695276807267*x[0]**o+(-0.459077978836)*x[0]+(-0.186332225366)*x[1]**o+(0.314547050148)*x[1]
+        ref[2, 0, 1, 0]=0.695276807267*o*x_ref[0]**(o-1)+(-0.459077978836)
+        ref[2, 0, 1, 1]=-0.186332225366*o*x_ref[1]**(o-1)+(0.314547050148)
+        arg[2, 1, 0]=-0.399638637263*x[0]**o+(-0.310540453436)*x[0]+(0.806701806887)*x[1]**o+(-0.104372115534)*x[1]
+        ref[2, 1, 0, 0]=-0.399638637263*o*x_ref[0]**(o-1)+(-0.310540453436)
+        ref[2, 1, 0, 1]=0.806701806887*o*x_ref[1]**(o-1)+(-0.104372115534)
+        arg[2, 1, 1]=-0.100549772791*x[0]**o+(0.282730603818)*x[0]+(0.389042408938)*x[1]**o+(-0.451516936753)*x[1]
+        ref[2, 1, 1, 0]=-0.100549772791*o*x_ref[0]**(o-1)+(0.282730603818)
+        ref[2, 1, 1, 1]=0.389042408938*o*x_ref[1]**(o-1)+(-0.451516936753)
+        arg[2, 2, 0]=-0.72269012729*x[0]**o+(-0.591356363415)*x[0]+(-0.55840034044)*x[1]**o+(0.576173544101)*x[1]
+        ref[2, 2, 0, 0]=-0.72269012729*o*x_ref[0]**(o-1)+(-0.591356363415)
+        ref[2, 2, 0, 1]=-0.55840034044*o*x_ref[1]**(o-1)+(0.576173544101)
+        arg[2, 2, 1]=0.45025492127*x[0]**o+(-0.00409207857738)*x[0]+(0.459565631229)*x[1]**o+(0.166490120148)*x[1]
+        ref[2, 2, 1, 0]=0.45025492127*o*x_ref[0]**(o-1)+(-0.00409207857738)
+        ref[2, 2, 1, 1]=0.459565631229*o*x_ref[1]**(o-1)+(0.166490120148)
+        arg[3, 0, 0]=-0.303298534834*x[0]**o+(0.260671352813)*x[0]+(-0.43399717331)*x[1]**o+(0.526760273346)*x[1]
+        ref[3, 0, 0, 0]=-0.303298534834*o*x_ref[0]**(o-1)+(0.260671352813)
+        ref[3, 0, 0, 1]=-0.43399717331*o*x_ref[1]**(o-1)+(0.526760273346)
+        arg[3, 0, 1]=-0.60515859546*x[0]**o+(-0.421292837119)*x[0]+(-0.319664907838)*x[1]**o+(-0.530657524636)*x[1]
+        ref[3, 0, 1, 0]=-0.60515859546*o*x_ref[0]**(o-1)+(-0.421292837119)
+        ref[3, 0, 1, 1]=-0.319664907838*o*x_ref[1]**(o-1)+(-0.530657524636)
+        arg[3, 1, 0]=0.159560305658*x[0]**o+(-0.590512237052)*x[0]+(-0.339544444728)*x[1]**o+(-0.456814824575)*x[1]
+        ref[3, 1, 0, 0]=0.159560305658*o*x_ref[0]**(o-1)+(-0.590512237052)
+        ref[3, 1, 0, 1]=-0.339544444728*o*x_ref[1]**(o-1)+(-0.456814824575)
+        arg[3, 1, 1]=-0.216137339533*x[0]**o+(-0.908149056067)*x[0]+(0.851471247283)*x[1]**o+(0.151864861976)*x[1]
+        ref[3, 1, 1, 0]=-0.216137339533*o*x_ref[0]**(o-1)+(-0.908149056067)
+        ref[3, 1, 1, 1]=0.851471247283*o*x_ref[1]**(o-1)+(0.151864861976)
+        arg[3, 2, 0]=-0.697756709675*x[0]**o+(-0.605676080348)*x[0]+(0.380134809347)*x[1]**o+(-0.4939919008)*x[1]
+        ref[3, 2, 0, 0]=-0.697756709675*o*x_ref[0]**(o-1)+(-0.605676080348)
+        ref[3, 2, 0, 1]=0.380134809347*o*x_ref[1]**(o-1)+(-0.4939919008)
+        arg[3, 2, 1]=0.451414114007*x[0]**o+(-0.455354664548)*x[0]+(-0.730825477513)*x[1]**o+(0.936671660271)*x[1]
+        ref[3, 2, 1, 0]=0.451414114007*o*x_ref[0]**(o-1)+(-0.455354664548)
+        ref[3, 2, 1, 1]=-0.730825477513*o*x_ref[1]**(o-1)+(0.936671660271)
+        if dim==3:
+            arg[0, 0, 0]+=0.788513067134*x[2]**o+(-0.823618707747)*x[2]
+            ref[0, 0, 0, 2]=0.788513067134*o*x_ref[2]**(o-1)+(-0.823618707747)
+            arg[0, 0, 1]+=-0.598992761178*x[2]**o+(-0.618228978033)*x[2]
+            ref[0, 0, 1, 2]=-0.598992761178*o*x_ref[2]**(o-1)+(-0.618228978033)
+            arg[0, 1, 0]+=-0.851235921052*x[2]**o+(-0.552231768935)*x[2]
+            ref[0, 1, 0, 2]=-0.851235921052*o*x_ref[2]**(o-1)+(-0.552231768935)
+            arg[0, 1, 1]+=0.133267292091*x[2]**o+(-0.946904897506)*x[2]
+            ref[0, 1, 1, 2]=0.133267292091*o*x_ref[2]**(o-1)+(-0.946904897506)
+            arg[0, 2, 0]+=0.27834957826*x[2]**o+(-0.576919411755)*x[2]
+            ref[0, 2, 0, 2]=0.27834957826*o*x_ref[2]**(o-1)+(-0.576919411755)
+            arg[0, 2, 1]+=-0.208126811531*x[2]**o+(-0.823664412179)*x[2]
+            ref[0, 2, 1, 2]=-0.208126811531*o*x_ref[2]**(o-1)+(-0.823664412179)
+            arg[1, 0, 0]+=0.372456348692*x[2]**o+(0.043038127891)*x[2]
+            ref[1, 0, 0, 2]=0.372456348692*o*x_ref[2]**(o-1)+(0.043038127891)
+            arg[1, 0, 1]+=0.870759123077*x[2]**o+(-0.546745391445)*x[2]
+            ref[1, 0, 1, 2]=0.870759123077*o*x_ref[2]**(o-1)+(-0.546745391445)
+            arg[1, 1, 0]+=0.357107936483*x[2]**o+(0.500138384655)*x[2]
+            ref[1, 1, 0, 2]=0.357107936483*o*x_ref[2]**(o-1)+(0.500138384655)
+            arg[1, 1, 1]+=-0.954334749025*x[2]**o+(0.24614344396)*x[2]
+            ref[1, 1, 1, 2]=-0.954334749025*o*x_ref[2]**(o-1)+(0.24614344396)
+            arg[1, 2, 0]+=-0.893161100509*x[2]**o+(-0.952795343909)*x[2]
+            ref[1, 2, 0, 2]=-0.893161100509*o*x_ref[2]**(o-1)+(-0.952795343909)
+            arg[1, 2, 1]+=-0.351420271775*x[2]**o+(-0.0567019836221)*x[2]
+            ref[1, 2, 1, 2]=-0.351420271775*o*x_ref[2]**(o-1)+(-0.0567019836221)
+            arg[2, 0, 0]+=-0.485519627785*x[2]**o+(-0.779830414409)*x[2]
+            ref[2, 0, 0, 2]=-0.485519627785*o*x_ref[2]**(o-1)+(-0.779830414409)
+            arg[2, 0, 1]+=0.597863316529*x[2]**o+(-0.711756498653)*x[2]
+            ref[2, 0, 1, 2]=0.597863316529*o*x_ref[2]**(o-1)+(-0.711756498653)
+            arg[2, 1, 0]+=-0.0289969144237*x[2]**o+(-0.180511855158)*x[2]
+            ref[2, 1, 0, 2]=-0.0289969144237*o*x_ref[2]**(o-1)+(-0.180511855158)
+            arg[2, 1, 1]+=0.844443217622*x[2]**o+(-0.595680483934)*x[2]
+            ref[2, 1, 1, 2]=0.844443217622*o*x_ref[2]**(o-1)+(-0.595680483934)
+            arg[2, 2, 0]+=-0.890161144413*x[2]**o+(0.410549971952)*x[2]
+            ref[2, 2, 0, 2]=-0.890161144413*o*x_ref[2]**(o-1)+(0.410549971952)
+            arg[2, 2, 1]+=0.0593427393622*x[2]**o+(-0.710738540825)*x[2]
+            ref[2, 2, 1, 2]=0.0593427393622*o*x_ref[2]**(o-1)+(-0.710738540825)
+            arg[3, 0, 0]+=-0.753840989544*x[2]**o+(0.0345445543035)*x[2]
+            ref[3, 0, 0, 2]=-0.753840989544*o*x_ref[2]**(o-1)+(0.0345445543035)
+            arg[3, 0, 1]+=-0.399902854152*x[2]**o+(0.608183881767)*x[2]
+            ref[3, 0, 1, 2]=-0.399902854152*o*x_ref[2]**(o-1)+(0.608183881767)
+            arg[3, 1, 0]+=0.149911796976*x[2]**o+(-0.0964613853676)*x[2]
+            ref[3, 1, 0, 2]=0.149911796976*o*x_ref[2]**(o-1)+(-0.0964613853676)
+            arg[3, 1, 1]+=-0.794172773392*x[2]**o+(-0.695198384444)*x[2]
+            ref[3, 1, 1, 2]=-0.794172773392*o*x_ref[2]**(o-1)+(-0.695198384444)
+            arg[3, 2, 0]+=-0.436844472898*x[2]**o+(-0.0794279663585)*x[2]
+            ref[3, 2, 0, 2]=-0.436844472898*o*x_ref[2]**(o-1)+(-0.0794279663585)
+            arg[3, 2, 1]+=0.604007024416*x[2]**o+(-0.270329764564)*x[2]
+            ref[3, 2, 1, 2]=0.604007024416*o*x_ref[2]**(o-1)+(-0.270329764564)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.0956103302315*x[0]**o+(-0.349042180559)*x[0]+(0.0771978641391)*x[1]**o+(0.636628816164)*x[1]
+        ref[0]=0.0956103302315*o*x_ref[0]**(o-1)+(-0.349042180559)
+        ref[1]=0.0771978641391*o*x_ref[1]**(o-1)+(0.636628816164)
+        if dim==3:
+            arg+=(0.604862339927)*x[2]**o+(-0.55136057563)*x[2]
+            ref[2]=0.604862339927*o*x_ref[2]**(o-1)+(-0.55136057563)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.743257230913*x[0]**o+(-0.119820048373)*x[0]+(0.597521890761)*x[1]**o+(0.846372258581)*x[1]
+        ref[0, 0]=-0.743257230913*o*x_ref[0]**(o-1)+(-0.119820048373)
+        ref[0, 1]=0.597521890761*o*x_ref[1]**(o-1)+(0.846372258581)
+        arg[1,]=-0.699648534337*x[0]**o+(0.0801752473086)*x[0]+(-0.212705096081)*x[1]**o+(0.96292197571)*x[1]
+        ref[1, 0]=-0.699648534337*o*x_ref[0]**(o-1)+(0.0801752473086)
+        ref[1, 1]=-0.212705096081*o*x_ref[1]**(o-1)+(0.96292197571)
+        if dim==3:
+            arg[0,]+=0.687895586006*x[2]**o+(-0.0459465493833)*x[2]
+            ref[0, 2]=0.687895586006*o*x_ref[2]**(o-1)+(-0.0459465493833)
+            arg[1,]+=-0.23069790106*x[2]**o+(0.350687331184)*x[2]
+            ref[1, 2]=-0.23069790106*o*x_ref[2]**(o-1)+(0.350687331184)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=-0.413351279006*x[0]**o+(0.560307497945)*x[0]+(0.570247898156)*x[1]**o+(-0.989411621049)*x[1]
+        ref[0, 0, 0]=-0.413351279006*o*x_ref[0]**(o-1)+(0.560307497945)
+        ref[0, 0, 1]=0.570247898156*o*x_ref[1]**(o-1)+(-0.989411621049)
+        arg[0, 1]=-0.664023787248*x[0]**o+(-0.237841693213)*x[0]+(-0.411863011087)*x[1]**o+(-0.489122224053)*x[1]
+        ref[0, 1, 0]=-0.664023787248*o*x_ref[0]**(o-1)+(-0.237841693213)
+        ref[0, 1, 1]=-0.411863011087*o*x_ref[1]**(o-1)+(-0.489122224053)
+        arg[0, 2]=0.754034815604*x[0]**o+(0.0512066925655)*x[0]+(0.445263832606)*x[1]**o+(-0.411980947055)*x[1]
+        ref[0, 2, 0]=0.754034815604*o*x_ref[0]**(o-1)+(0.0512066925655)
+        ref[0, 2, 1]=0.445263832606*o*x_ref[1]**(o-1)+(-0.411980947055)
+        arg[1, 0]=-0.65999715799*x[0]**o+(0.00557744634167)*x[0]+(0.436171315105)*x[1]**o+(0.230854019937)*x[1]
+        ref[1, 0, 0]=-0.65999715799*o*x_ref[0]**(o-1)+(0.00557744634167)
+        ref[1, 0, 1]=0.436171315105*o*x_ref[1]**(o-1)+(0.230854019937)
+        arg[1, 1]=0.701719652123*x[0]**o+(-0.86681839445)*x[0]+(-0.573939782086)*x[1]**o+(0.3750786426)*x[1]
+        ref[1, 1, 0]=0.701719652123*o*x_ref[0]**(o-1)+(-0.86681839445)
+        ref[1, 1, 1]=-0.573939782086*o*x_ref[1]**(o-1)+(0.3750786426)
+        arg[1, 2]=0.543753117759*x[0]**o+(0.203506210417)*x[0]+(-0.377157523236)*x[1]**o+(-0.624456505359)*x[1]
+        ref[1, 2, 0]=0.543753117759*o*x_ref[0]**(o-1)+(0.203506210417)
+        ref[1, 2, 1]=-0.377157523236*o*x_ref[1]**(o-1)+(-0.624456505359)
+        arg[2, 0]=0.71276801549*x[0]**o+(0.967627818617)*x[0]+(0.598462978156)*x[1]**o+(0.199996192682)*x[1]
+        ref[2, 0, 0]=0.71276801549*o*x_ref[0]**(o-1)+(0.967627818617)
+        ref[2, 0, 1]=0.598462978156*o*x_ref[1]**(o-1)+(0.199996192682)
+        arg[2, 1]=-0.908223294196*x[0]**o+(0.618714397022)*x[0]+(-0.61372781223)*x[1]**o+(-0.702746917237)*x[1]
+        ref[2, 1, 0]=-0.908223294196*o*x_ref[0]**(o-1)+(0.618714397022)
+        ref[2, 1, 1]=-0.61372781223*o*x_ref[1]**(o-1)+(-0.702746917237)
+        arg[2, 2]=-0.234625207402*x[0]**o+(-0.773446229484)*x[0]+(0.205927405928)*x[1]**o+(-0.561973047974)*x[1]
+        ref[2, 2, 0]=-0.234625207402*o*x_ref[0]**(o-1)+(-0.773446229484)
+        ref[2, 2, 1]=0.205927405928*o*x_ref[1]**(o-1)+(-0.561973047974)
+        arg[3, 0]=-0.765458524251*x[0]**o+(0.757972910722)*x[0]+(0.630987087795)*x[1]**o+(-0.562321154124)*x[1]
+        ref[3, 0, 0]=-0.765458524251*o*x_ref[0]**(o-1)+(0.757972910722)
+        ref[3, 0, 1]=0.630987087795*o*x_ref[1]**(o-1)+(-0.562321154124)
+        arg[3, 1]=-0.498683042481*x[0]**o+(-0.515814356823)*x[0]+(-0.41092766555)*x[1]**o+(0.100637098175)*x[1]
+        ref[3, 1, 0]=-0.498683042481*o*x_ref[0]**(o-1)+(-0.515814356823)
+        ref[3, 1, 1]=-0.41092766555*o*x_ref[1]**(o-1)+(0.100637098175)
+        arg[3, 2]=-0.550758139923*x[0]**o+(0.645714675654)*x[0]+(-0.171957043016)*x[1]**o+(0.291189585646)*x[1]
+        ref[3, 2, 0]=-0.550758139923*o*x_ref[0]**(o-1)+(0.645714675654)
+        ref[3, 2, 1]=-0.171957043016*o*x_ref[1]**(o-1)+(0.291189585646)
+        if dim==3:
+            arg[0, 0]+=-0.151576327024*x[2]**o+(0.437241747069)*x[2]
+            ref[0, 0, 2]=-0.151576327024*o*x_ref[2]**(o-1)+(0.437241747069)
+            arg[0, 1]+=0.964052516208*x[2]**o+(0.172771518743)*x[2]
+            ref[0, 1, 2]=0.964052516208*o*x_ref[2]**(o-1)+(0.172771518743)
+            arg[0, 2]+=0.53924169716*x[2]**o+(-0.932069772741)*x[2]
+            ref[0, 2, 2]=0.53924169716*o*x_ref[2]**(o-1)+(-0.932069772741)
+            arg[1, 0]+=-0.942483370471*x[2]**o+(0.193066052294)*x[2]
+            ref[1, 0, 2]=-0.942483370471*o*x_ref[2]**(o-1)+(0.193066052294)
+            arg[1, 1]+=-0.411981029246*x[2]**o+(0.660228559841)*x[2]
+            ref[1, 1, 2]=-0.411981029246*o*x_ref[2]**(o-1)+(0.660228559841)
+            arg[1, 2]+=0.873551074935*x[2]**o+(0.697214210541)*x[2]
+            ref[1, 2, 2]=0.873551074935*o*x_ref[2]**(o-1)+(0.697214210541)
+            arg[2, 0]+=-0.403600575791*x[2]**o+(0.33386443202)*x[2]
+            ref[2, 0, 2]=-0.403600575791*o*x_ref[2]**(o-1)+(0.33386443202)
+            arg[2, 1]+=-0.742123794145*x[2]**o+(-0.669481381348)*x[2]
+            ref[2, 1, 2]=-0.742123794145*o*x_ref[2]**(o-1)+(-0.669481381348)
+            arg[2, 2]+=0.102330678641*x[2]**o+(0.541472901757)*x[2]
+            ref[2, 2, 2]=0.102330678641*o*x_ref[2]**(o-1)+(0.541472901757)
+            arg[3, 0]+=0.965935178426*x[2]**o+(-0.814330923015)*x[2]
+            ref[3, 0, 2]=0.965935178426*o*x_ref[2]**(o-1)+(-0.814330923015)
+            arg[3, 1]+=-0.0782563251004*x[2]**o+(0.197594983536)*x[2]
+            ref[3, 1, 2]=-0.0782563251004*o*x_ref[2]**(o-1)+(0.197594983536)
+            arg[3, 2]+=-0.734264282021*x[2]**o+(0.557512935805)*x[2]
+            ref[3, 2, 2]=-0.734264282021*o*x_ref[2]**(o-1)+(0.557512935805)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=0.0147314378393*x[0]**o+(0.460219812054)*x[0]+(0.172764054987)*x[1]**o+(-0.102973728878)*x[1]
+        ref[0, 0, 0, 0]=0.0147314378393*o*x_ref[0]**(o-1)+(0.460219812054)
+        ref[0, 0, 0, 1]=0.172764054987*o*x_ref[1]**(o-1)+(-0.102973728878)
+        arg[0, 0, 1]=0.535374140425*x[0]**o+(0.636577858099)*x[0]+(-0.199343100227)*x[1]**o+(0.624293945174)*x[1]
+        ref[0, 0, 1, 0]=0.535374140425*o*x_ref[0]**(o-1)+(0.636577858099)
+        ref[0, 0, 1, 1]=-0.199343100227*o*x_ref[1]**(o-1)+(0.624293945174)
+        arg[0, 1, 0]=-0.581903799974*x[0]**o+(0.797339978818)*x[0]+(-0.848413229746)*x[1]**o+(-0.211687183954)*x[1]
+        ref[0, 1, 0, 0]=-0.581903799974*o*x_ref[0]**(o-1)+(0.797339978818)
+        ref[0, 1, 0, 1]=-0.848413229746*o*x_ref[1]**(o-1)+(-0.211687183954)
+        arg[0, 1, 1]=-0.818549971765*x[0]**o+(-0.140469834068)*x[0]+(0.960315389779)*x[1]**o+(0.797547833607)*x[1]
+        ref[0, 1, 1, 0]=-0.818549971765*o*x_ref[0]**(o-1)+(-0.140469834068)
+        ref[0, 1, 1, 1]=0.960315389779*o*x_ref[1]**(o-1)+(0.797547833607)
+        arg[0, 2, 0]=0.437213697126*x[0]**o+(0.316942428171)*x[0]+(0.0905308155118)*x[1]**o+(-0.876362991856)*x[1]
+        ref[0, 2, 0, 0]=0.437213697126*o*x_ref[0]**(o-1)+(0.316942428171)
+        ref[0, 2, 0, 1]=0.0905308155118*o*x_ref[1]**(o-1)+(-0.876362991856)
+        arg[0, 2, 1]=0.395202938192*x[0]**o+(0.561565729672)*x[0]+(0.35730249944)*x[1]**o+(0.996026816944)*x[1]
+        ref[0, 2, 1, 0]=0.395202938192*o*x_ref[0]**(o-1)+(0.561565729672)
+        ref[0, 2, 1, 1]=0.35730249944*o*x_ref[1]**(o-1)+(0.996026816944)
+        arg[1, 0, 0]=0.153602826434*x[0]**o+(0.216585570747)*x[0]+(-0.460505502621)*x[1]**o+(-0.890880299703)*x[1]
+        ref[1, 0, 0, 0]=0.153602826434*o*x_ref[0]**(o-1)+(0.216585570747)
+        ref[1, 0, 0, 1]=-0.460505502621*o*x_ref[1]**(o-1)+(-0.890880299703)
+        arg[1, 0, 1]=0.104800507346*x[0]**o+(-0.178523833165)*x[0]+(-0.665048025167)*x[1]**o+(-0.55036054478)*x[1]
+        ref[1, 0, 1, 0]=0.104800507346*o*x_ref[0]**(o-1)+(-0.178523833165)
+        ref[1, 0, 1, 1]=-0.665048025167*o*x_ref[1]**(o-1)+(-0.55036054478)
+        arg[1, 1, 0]=0.10667145945*x[0]**o+(0.396347899166)*x[0]+(-0.74544446896)*x[1]**o+(-0.178249159718)*x[1]
+        ref[1, 1, 0, 0]=0.10667145945*o*x_ref[0]**(o-1)+(0.396347899166)
+        ref[1, 1, 0, 1]=-0.74544446896*o*x_ref[1]**(o-1)+(-0.178249159718)
+        arg[1, 1, 1]=-0.118963734743*x[0]**o+(0.538083086763)*x[0]+(-0.909264514134)*x[1]**o+(0.0192470021851)*x[1]
+        ref[1, 1, 1, 0]=-0.118963734743*o*x_ref[0]**(o-1)+(0.538083086763)
+        ref[1, 1, 1, 1]=-0.909264514134*o*x_ref[1]**(o-1)+(0.0192470021851)
+        arg[1, 2, 0]=-0.686939150547*x[0]**o+(-0.109015824129)*x[0]+(0.380616886851)*x[1]**o+(-0.164062760753)*x[1]
+        ref[1, 2, 0, 0]=-0.686939150547*o*x_ref[0]**(o-1)+(-0.109015824129)
+        ref[1, 2, 0, 1]=0.380616886851*o*x_ref[1]**(o-1)+(-0.164062760753)
+        arg[1, 2, 1]=0.123713976558*x[0]**o+(0.723545452578)*x[0]+(-0.575519384499)*x[1]**o+(-0.291104585076)*x[1]
+        ref[1, 2, 1, 0]=0.123713976558*o*x_ref[0]**(o-1)+(0.723545452578)
+        ref[1, 2, 1, 1]=-0.575519384499*o*x_ref[1]**(o-1)+(-0.291104585076)
+        if dim==3:
+            arg[0, 0, 0]+=0.676762275042*x[2]**o+(-0.0843372480163)*x[2]
+            ref[0, 0, 0, 2]=0.676762275042*o*x_ref[2]**(o-1)+(-0.0843372480163)
+            arg[0, 0, 1]+=-0.341725965651*x[2]**o+(-0.776495585173)*x[2]
+            ref[0, 0, 1, 2]=-0.341725965651*o*x_ref[2]**(o-1)+(-0.776495585173)
+            arg[0, 1, 0]+=0.0735745589605*x[2]**o+(-0.158661442365)*x[2]
+            ref[0, 1, 0, 2]=0.0735745589605*o*x_ref[2]**(o-1)+(-0.158661442365)
+            arg[0, 1, 1]+=0.0635840411318*x[2]**o+(0.790015588645)*x[2]
+            ref[0, 1, 1, 2]=0.0635840411318*o*x_ref[2]**(o-1)+(0.790015588645)
+            arg[0, 2, 0]+=0.990789600091*x[2]**o+(-0.0708403801358)*x[2]
+            ref[0, 2, 0, 2]=0.990789600091*o*x_ref[2]**(o-1)+(-0.0708403801358)
+            arg[0, 2, 1]+=0.798774862868*x[2]**o+(0.916507233454)*x[2]
+            ref[0, 2, 1, 2]=0.798774862868*o*x_ref[2]**(o-1)+(0.916507233454)
+            arg[1, 0, 0]+=-0.516152349227*x[2]**o+(0.683192225401)*x[2]
+            ref[1, 0, 0, 2]=-0.516152349227*o*x_ref[2]**(o-1)+(0.683192225401)
+            arg[1, 0, 1]+=0.597673842738*x[2]**o+(0.946524782662)*x[2]
+            ref[1, 0, 1, 2]=0.597673842738*o*x_ref[2]**(o-1)+(0.946524782662)
+            arg[1, 1, 0]+=-0.945436658593*x[2]**o+(-0.326599392415)*x[2]
+            ref[1, 1, 0, 2]=-0.945436658593*o*x_ref[2]**(o-1)+(-0.326599392415)
+            arg[1, 1, 1]+=0.824752728117*x[2]**o+(0.754790967996)*x[2]
+            ref[1, 1, 1, 2]=0.824752728117*o*x_ref[2]**(o-1)+(0.754790967996)
+            arg[1, 2, 0]+=-0.0112282789735*x[2]**o+(0.695568792369)*x[2]
+            ref[1, 2, 0, 2]=-0.0112282789735*o*x_ref[2]**(o-1)+(0.695568792369)
+            arg[1, 2, 1]+=0.37342201804*x[2]**o+(-0.757936291998)*x[2]
+            ref[1, 2, 1, 2]=0.37342201804*o*x_ref[2]**(o-1)+(-0.757936291998)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.0860120610701*x[0]+(-0.216353350669)*x[1]
+        ref[0]=-0.0860120610701
+        ref[1]=-0.216353350669
+        if dim==3:
+            arg+=(-0.412025365365)*x[2]
+            ref[2]=-0.412025365365
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=-0.466942407217*x[0]+(0.409487050062)*x[1]
+        ref[0, 0]=-0.466942407217
+        ref[0, 1]=0.409487050062
+        arg[1,]=0.738477738507*x[0]+(-0.865744607542)*x[1]
+        ref[1, 0]=0.738477738507
+        ref[1, 1]=-0.865744607542
+        arg[2,]=0.41343782688*x[0]+(0.144193718717)*x[1]
+        ref[2, 0]=0.41343782688
+        ref[2, 1]=0.144193718717
+        arg[3,]=-0.216797508151*x[0]+(-0.981804772253)*x[1]
+        ref[3, 0]=-0.216797508151
+        ref[3, 1]=-0.981804772253
+        if dim==3:
+            arg[0,]+=-0.229509386491*x[2]
+            ref[0, 2]=-0.229509386491
+            arg[1,]+=0.297387443466*x[2]
+            ref[1, 2]=0.297387443466
+            arg[2,]+=0.175158672637*x[2]
+            ref[2, 2]=0.175158672637
+            arg[3,]+=-0.914816250259*x[2]
+            ref[3, 2]=-0.914816250259
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.510061205988*x[0]+(-0.372914943267)*x[1]
+        ref[0, 0, 0]=-0.510061205988
+        ref[0, 0, 1]=-0.372914943267
+        arg[0, 1]=-0.685247658797*x[0]+(0.464804317693)*x[1]
+        ref[0, 1, 0]=-0.685247658797
+        ref[0, 1, 1]=0.464804317693
+        arg[1, 0]=-0.592343755046*x[0]+(0.511501035706)*x[1]
+        ref[1, 0, 0]=-0.592343755046
+        ref[1, 0, 1]=0.511501035706
+        arg[1, 1]=-0.17031817386*x[0]+(0.95519706095)*x[1]
+        ref[1, 1, 0]=-0.17031817386
+        ref[1, 1, 1]=0.95519706095
+        arg[2, 0]=0.710889463423*x[0]+(-0.0820391237442)*x[1]
+        ref[2, 0, 0]=0.710889463423
+        ref[2, 0, 1]=-0.0820391237442
+        arg[2, 1]=-0.0291462758825*x[0]+(-0.594522865039)*x[1]
+        ref[2, 1, 0]=-0.0291462758825
+        ref[2, 1, 1]=-0.594522865039
+        if dim==3:
+            arg[0, 0]+=0.498039290095*x[2]
+            ref[0, 0, 2]=0.498039290095
+            arg[0, 1]+=0.0613329478502*x[2]
+            ref[0, 1, 2]=0.0613329478502
+            arg[1, 0]+=0.753831022198*x[2]
+            ref[1, 0, 2]=0.753831022198
+            arg[1, 1]+=0.738535346295*x[2]
+            ref[1, 1, 2]=0.738535346295
+            arg[2, 0]+=0.447438242385*x[2]
+            ref[2, 0, 2]=0.447438242385
+            arg[2, 1]+=-0.0525450579733*x[2]
+            ref[2, 1, 2]=-0.0525450579733
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2),w)
+        ref = Data(0,(3, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.843826695549*x[0]+(0.458675703035)*x[1]
+        ref[0, 0, 0, 0]=-0.843826695549
+        ref[0, 0, 0, 1]=0.458675703035
+        arg[0, 0, 1]=0.557092854253*x[0]+(0.98633748833)*x[1]
+        ref[0, 0, 1, 0]=0.557092854253
+        ref[0, 0, 1, 1]=0.98633748833
+        arg[0, 1, 0]=0.72407957026*x[0]+(0.479027521589)*x[1]
+        ref[0, 1, 0, 0]=0.72407957026
+        ref[0, 1, 0, 1]=0.479027521589
+        arg[0, 1, 1]=0.738515026954*x[0]+(-0.784508014421)*x[1]
+        ref[0, 1, 1, 0]=0.738515026954
+        ref[0, 1, 1, 1]=-0.784508014421
+        arg[0, 2, 0]=0.0901470939167*x[0]+(-0.226868299474)*x[1]
+        ref[0, 2, 0, 0]=0.0901470939167
+        ref[0, 2, 0, 1]=-0.226868299474
+        arg[0, 2, 1]=0.805089701709*x[0]+(0.596434482214)*x[1]
+        ref[0, 2, 1, 0]=0.805089701709
+        ref[0, 2, 1, 1]=0.596434482214
+        arg[0, 3, 0]=0.854447142988*x[0]+(-0.669778485)*x[1]
+        ref[0, 3, 0, 0]=0.854447142988
+        ref[0, 3, 0, 1]=-0.669778485
+        arg[0, 3, 1]=-0.355886982114*x[0]+(0.897260797985)*x[1]
+        ref[0, 3, 1, 0]=-0.355886982114
+        ref[0, 3, 1, 1]=0.897260797985
+        arg[1, 0, 0]=-0.211932047539*x[0]+(-0.493890521959)*x[1]
+        ref[1, 0, 0, 0]=-0.211932047539
+        ref[1, 0, 0, 1]=-0.493890521959
+        arg[1, 0, 1]=-0.545123593072*x[0]+(-0.449134040468)*x[1]
+        ref[1, 0, 1, 0]=-0.545123593072
+        ref[1, 0, 1, 1]=-0.449134040468
+        arg[1, 1, 0]=-0.221896781344*x[0]+(0.327313684647)*x[1]
+        ref[1, 1, 0, 0]=-0.221896781344
+        ref[1, 1, 0, 1]=0.327313684647
+        arg[1, 1, 1]=0.486479829223*x[0]+(0.906994944335)*x[1]
+        ref[1, 1, 1, 0]=0.486479829223
+        ref[1, 1, 1, 1]=0.906994944335
+        arg[1, 2, 0]=0.991137696273*x[0]+(0.735161052474)*x[1]
+        ref[1, 2, 0, 0]=0.991137696273
+        ref[1, 2, 0, 1]=0.735161052474
+        arg[1, 2, 1]=-0.632169998748*x[0]+(-0.72098644775)*x[1]
+        ref[1, 2, 1, 0]=-0.632169998748
+        ref[1, 2, 1, 1]=-0.72098644775
+        arg[1, 3, 0]=0.951076306617*x[0]+(0.411934507076)*x[1]
+        ref[1, 3, 0, 0]=0.951076306617
+        ref[1, 3, 0, 1]=0.411934507076
+        arg[1, 3, 1]=0.414008843305*x[0]+(-0.884779152212)*x[1]
+        ref[1, 3, 1, 0]=0.414008843305
+        ref[1, 3, 1, 1]=-0.884779152212
+        arg[2, 0, 0]=0.0636785320156*x[0]+(0.275765693171)*x[1]
+        ref[2, 0, 0, 0]=0.0636785320156
+        ref[2, 0, 0, 1]=0.275765693171
+        arg[2, 0, 1]=-0.566375997471*x[0]+(-0.735120770946)*x[1]
+        ref[2, 0, 1, 0]=-0.566375997471
+        ref[2, 0, 1, 1]=-0.735120770946
+        arg[2, 1, 0]=0.292524279805*x[0]+(0.82764310104)*x[1]
+        ref[2, 1, 0, 0]=0.292524279805
+        ref[2, 1, 0, 1]=0.82764310104
+        arg[2, 1, 1]=0.436312327028*x[0]+(0.0385638545917)*x[1]
+        ref[2, 1, 1, 0]=0.436312327028
+        ref[2, 1, 1, 1]=0.0385638545917
+        arg[2, 2, 0]=0.894269488493*x[0]+(-0.573509287614)*x[1]
+        ref[2, 2, 0, 0]=0.894269488493
+        ref[2, 2, 0, 1]=-0.573509287614
+        arg[2, 2, 1]=0.160876844826*x[0]+(0.159828516118)*x[1]
+        ref[2, 2, 1, 0]=0.160876844826
+        ref[2, 2, 1, 1]=0.159828516118
+        arg[2, 3, 0]=-0.486587861467*x[0]+(0.484541172857)*x[1]
+        ref[2, 3, 0, 0]=-0.486587861467
+        ref[2, 3, 0, 1]=0.484541172857
+        arg[2, 3, 1]=0.709651486982*x[0]+(0.747958628497)*x[1]
+        ref[2, 3, 1, 0]=0.709651486982
+        ref[2, 3, 1, 1]=0.747958628497
+        if dim==3:
+            arg[0, 0, 0]+=-0.972345994973*x[2]
+            ref[0, 0, 0, 2]=-0.972345994973
+            arg[0, 0, 1]+=0.0501373885356*x[2]
+            ref[0, 0, 1, 2]=0.0501373885356
+            arg[0, 1, 0]+=0.181077070791*x[2]
+            ref[0, 1, 0, 2]=0.181077070791
+            arg[0, 1, 1]+=-0.444530567727*x[2]
+            ref[0, 1, 1, 2]=-0.444530567727
+            arg[0, 2, 0]+=0.117329551034*x[2]
+            ref[0, 2, 0, 2]=0.117329551034
+            arg[0, 2, 1]+=0.100665080002*x[2]
+            ref[0, 2, 1, 2]=0.100665080002
+            arg[0, 3, 0]+=-0.880384911632*x[2]
+            ref[0, 3, 0, 2]=-0.880384911632
+            arg[0, 3, 1]+=-0.0340637018159*x[2]
+            ref[0, 3, 1, 2]=-0.0340637018159
+            arg[1, 0, 0]+=-0.688317226089*x[2]
+            ref[1, 0, 0, 2]=-0.688317226089
+            arg[1, 0, 1]+=-0.998908973153*x[2]
+            ref[1, 0, 1, 2]=-0.998908973153
+            arg[1, 1, 0]+=0.763201728002*x[2]
+            ref[1, 1, 0, 2]=0.763201728002
+            arg[1, 1, 1]+=0.36198815144*x[2]
+            ref[1, 1, 1, 2]=0.36198815144
+            arg[1, 2, 0]+=-0.401869857879*x[2]
+            ref[1, 2, 0, 2]=-0.401869857879
+            arg[1, 2, 1]+=-0.706944855987*x[2]
+            ref[1, 2, 1, 2]=-0.706944855987
+            arg[1, 3, 0]+=0.387679050701*x[2]
+            ref[1, 3, 0, 2]=0.387679050701
+            arg[1, 3, 1]+=-0.960619772094*x[2]
+            ref[1, 3, 1, 2]=-0.960619772094
+            arg[2, 0, 0]+=-0.996803438574*x[2]
+            ref[2, 0, 0, 2]=-0.996803438574
+            arg[2, 0, 1]+=0.562423495227*x[2]
+            ref[2, 0, 1, 2]=0.562423495227
+            arg[2, 1, 0]+=-0.18367815971*x[2]
+            ref[2, 1, 0, 2]=-0.18367815971
+            arg[2, 1, 1]+=-0.935518527854*x[2]
+            ref[2, 1, 1, 2]=-0.935518527854
+            arg[2, 2, 0]+=0.0415063523452*x[2]
+            ref[2, 2, 0, 2]=0.0415063523452
+            arg[2, 2, 1]+=0.555979082988*x[2]
+            ref[2, 2, 1, 2]=0.555979082988
+            arg[2, 3, 0]+=-0.166739357287*x[2]
+            ref[2, 3, 0, 2]=-0.166739357287
+            arg[2, 3, 1]+=-0.813330558127*x[2]
+            ref[2, 3, 1, 2]=-0.813330558127
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.0894314797604*x[0]+(0.982927049131)*x[1]
+        ref[0]=-0.0894314797604
+        ref[1]=0.982927049131
+        if dim==3:
+            arg+=(0.439996733823)*x[2]
+            ref[2]=0.439996733823
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=0.0471937495124*x[0]+(0.460439759255)*x[1]
+        ref[0, 0]=0.0471937495124
+        ref[0, 1]=0.460439759255
+        arg[1,]=-0.376444276719*x[0]+(0.933963269545)*x[1]
+        ref[1, 0]=-0.376444276719
+        ref[1, 1]=0.933963269545
+        arg[2,]=0.552304494575*x[0]+(-0.97391888996)*x[1]
+        ref[2, 0]=0.552304494575
+        ref[2, 1]=-0.97391888996
+        arg[3,]=0.0151854051156*x[0]+(-0.819627364488)*x[1]
+        ref[3, 0]=0.0151854051156
+        ref[3, 1]=-0.819627364488
+        if dim==3:
+            arg[0,]+=-0.635493406839*x[2]
+            ref[0, 2]=-0.635493406839
+            arg[1,]+=0.663474685195*x[2]
+            ref[1, 2]=0.663474685195
+            arg[2,]+=-0.70083619685*x[2]
+            ref[2, 2]=-0.70083619685
+            arg[3,]+=0.290671398342*x[2]
+            ref[3, 2]=0.290671398342
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2)+(dim,),w_ref)
+        arg[0, 0]=0.55092579825*x[0]+(0.631258112903)*x[1]
+        ref[0, 0, 0]=0.55092579825
+        ref[0, 0, 1]=0.631258112903
+        arg[0, 1]=0.739353669336*x[0]+(-0.44912893945)*x[1]
+        ref[0, 1, 0]=0.739353669336
+        ref[0, 1, 1]=-0.44912893945
+        arg[1, 0]=-0.165887143398*x[0]+(0.0526036727488)*x[1]
+        ref[1, 0, 0]=-0.165887143398
+        ref[1, 0, 1]=0.0526036727488
+        arg[1, 1]=-0.724657612432*x[0]+(-0.899590239719)*x[1]
+        ref[1, 1, 0]=-0.724657612432
+        ref[1, 1, 1]=-0.899590239719
+        arg[2, 0]=-0.924271185556*x[0]+(-0.021848003386)*x[1]
+        ref[2, 0, 0]=-0.924271185556
+        ref[2, 0, 1]=-0.021848003386
+        arg[2, 1]=-0.567290508371*x[0]+(0.64083385758)*x[1]
+        ref[2, 1, 0]=-0.567290508371
+        ref[2, 1, 1]=0.64083385758
+        arg[3, 0]=-0.144468704712*x[0]+(0.819864190775)*x[1]
+        ref[3, 0, 0]=-0.144468704712
+        ref[3, 0, 1]=0.819864190775
+        arg[3, 1]=-0.877712659123*x[0]+(-0.193874344109)*x[1]
+        ref[3, 1, 0]=-0.877712659123
+        ref[3, 1, 1]=-0.193874344109
+        if dim==3:
+            arg[0, 0]+=-0.68050398181*x[2]
+            ref[0, 0, 2]=-0.68050398181
+            arg[0, 1]+=-0.460979559786*x[2]
+            ref[0, 1, 2]=-0.460979559786
+            arg[1, 0]+=0.2365683597*x[2]
+            ref[1, 0, 2]=0.2365683597
+            arg[1, 1]+=-0.678581140092*x[2]
+            ref[1, 1, 2]=-0.678581140092
+            arg[2, 0]+=0.107231502596*x[2]
+            ref[2, 0, 2]=0.107231502596
+            arg[2, 1]+=-0.17424995204*x[2]
+            ref[2, 1, 2]=-0.17424995204
+            arg[3, 0]+=-0.639766719991*x[2]
+            ref[3, 0, 2]=-0.639766719991
+            arg[3, 1]+=-0.193406636814*x[2]
+            ref[3, 1, 2]=-0.193406636814
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=0.169391767977*x[0]+(-0.146226097318)*x[1]
+        ref[0, 0, 0, 0]=0.169391767977
+        ref[0, 0, 0, 1]=-0.146226097318
+        arg[0, 0, 1]=0.58775017592*x[0]+(-0.991257226527)*x[1]
+        ref[0, 0, 1, 0]=0.58775017592
+        ref[0, 0, 1, 1]=-0.991257226527
+        arg[0, 0, 2]=-0.425489754678*x[0]+(0.0801241478633)*x[1]
+        ref[0, 0, 2, 0]=-0.425489754678
+        ref[0, 0, 2, 1]=0.0801241478633
+        arg[0, 1, 0]=-0.363647825065*x[0]+(0.112092542125)*x[1]
+        ref[0, 1, 0, 0]=-0.363647825065
+        ref[0, 1, 0, 1]=0.112092542125
+        arg[0, 1, 1]=0.427487291437*x[0]+(-0.776705008278)*x[1]
+        ref[0, 1, 1, 0]=0.427487291437
+        ref[0, 1, 1, 1]=-0.776705008278
+        arg[0, 1, 2]=-0.414700483991*x[0]+(0.595060858842)*x[1]
+        ref[0, 1, 2, 0]=-0.414700483991
+        ref[0, 1, 2, 1]=0.595060858842
+        arg[1, 0, 0]=0.269570166886*x[0]+(-0.685353615083)*x[1]
+        ref[1, 0, 0, 0]=0.269570166886
+        ref[1, 0, 0, 1]=-0.685353615083
+        arg[1, 0, 1]=-0.0756637133198*x[0]+(-0.150933525092)*x[1]
+        ref[1, 0, 1, 0]=-0.0756637133198
+        ref[1, 0, 1, 1]=-0.150933525092
+        arg[1, 0, 2]=0.924146910494*x[0]+(0.0652401185693)*x[1]
+        ref[1, 0, 2, 0]=0.924146910494
+        ref[1, 0, 2, 1]=0.0652401185693
+        arg[1, 1, 0]=-0.385812186487*x[0]+(0.421806584714)*x[1]
+        ref[1, 1, 0, 0]=-0.385812186487
+        ref[1, 1, 0, 1]=0.421806584714
+        arg[1, 1, 1]=0.225345183019*x[0]+(0.936032853729)*x[1]
+        ref[1, 1, 1, 0]=0.225345183019
+        ref[1, 1, 1, 1]=0.936032853729
+        arg[1, 1, 2]=0.448251188413*x[0]+(-0.529365554607)*x[1]
+        ref[1, 1, 2, 0]=0.448251188413
+        ref[1, 1, 2, 1]=-0.529365554607
+        if dim==3:
+            arg[0, 0, 0]+=0.889560513213*x[2]
+            ref[0, 0, 0, 2]=0.889560513213
+            arg[0, 0, 1]+=-0.927192202109*x[2]
+            ref[0, 0, 1, 2]=-0.927192202109
+            arg[0, 0, 2]+=-0.108256846351*x[2]
+            ref[0, 0, 2, 2]=-0.108256846351
+            arg[0, 1, 0]+=-0.647627084547*x[2]
+            ref[0, 1, 0, 2]=-0.647627084547
+            arg[0, 1, 1]+=-0.711137203924*x[2]
+            ref[0, 1, 1, 2]=-0.711137203924
+            arg[0, 1, 2]+=-0.986824542834*x[2]
+            ref[0, 1, 2, 2]=-0.986824542834
+            arg[1, 0, 0]+=0.0250729337843*x[2]
+            ref[1, 0, 0, 2]=0.0250729337843
+            arg[1, 0, 1]+=-0.949408457996*x[2]
+            ref[1, 0, 1, 2]=-0.949408457996
+            arg[1, 0, 2]+=-0.547755763135*x[2]
+            ref[1, 0, 2, 2]=-0.547755763135
+            arg[1, 1, 0]+=0.0450643194931*x[2]
+            ref[1, 1, 0, 2]=0.0450643194931
+            arg[1, 1, 1]+=0.268087794112*x[2]
+            ref[1, 1, 1, 2]=0.268087794112
+            arg[1, 1, 2]+=0.289374770914*x[2]
+            ref[1, 1, 2, 2]=0.289374770914
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.424714859016*x[0]**o+(-0.0261753650612)*x[0]+(0.827487805697)*x[1]**o+(0.0868431786824)*x[1]
+        ref[0]=0.424714859016*o*x_ref[0]**(o-1)+(-0.0261753650612)
+        ref[1]=0.827487805697*o*x_ref[1]**(o-1)+(0.0868431786824)
+        if dim==3:
+            arg+=(-0.273827449804)*x[2]**o+(-0.0376479533054)*x[2]
+            ref[2]=-0.273827449804*o*x_ref[2]**(o-1)+(-0.0376479533054)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=0.768807753287*x[0]**o+(0.543035441861)*x[0]+(-0.100184746264)*x[1]**o+(0.504938825825)*x[1]
+        ref[0, 0]=0.768807753287*o*x_ref[0]**(o-1)+(0.543035441861)
+        ref[0, 1]=-0.100184746264*o*x_ref[1]**(o-1)+(0.504938825825)
+        arg[1,]=0.69937093009*x[0]**o+(0.606744283071)*x[0]+(-0.0367476687334)*x[1]**o+(0.37094447931)*x[1]
+        ref[1, 0]=0.69937093009*o*x_ref[0]**(o-1)+(0.606744283071)
+        ref[1, 1]=-0.0367476687334*o*x_ref[1]**(o-1)+(0.37094447931)
+        if dim==3:
+            arg[0,]+=-0.152405136438*x[2]**o+(0.928042440183)*x[2]
+            ref[0, 2]=-0.152405136438*o*x_ref[2]**(o-1)+(0.928042440183)
+            arg[1,]+=-0.611343305204*x[2]**o+(0.916784772147)*x[2]
+            ref[1, 2]=-0.611343305204*o*x_ref[2]**(o-1)+(0.916784772147)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=0.425970917395*x[0]**o+(-0.852212670078)*x[0]+(-0.523270427121)*x[1]**o+(0.478178600536)*x[1]
+        ref[0, 0, 0]=0.425970917395*o*x_ref[0]**(o-1)+(-0.852212670078)
+        ref[0, 0, 1]=-0.523270427121*o*x_ref[1]**(o-1)+(0.478178600536)
+        arg[0, 1]=0.860844871053*x[0]**o+(-0.350513646401)*x[0]+(-0.881460897657)*x[1]**o+(0.662783195287)*x[1]
+        ref[0, 1, 0]=0.860844871053*o*x_ref[0]**(o-1)+(-0.350513646401)
+        ref[0, 1, 1]=-0.881460897657*o*x_ref[1]**(o-1)+(0.662783195287)
+        arg[0, 2]=0.618294851706*x[0]**o+(-0.231898328367)*x[0]+(0.755933712847)*x[1]**o+(0.932406367466)*x[1]
+        ref[0, 2, 0]=0.618294851706*o*x_ref[0]**(o-1)+(-0.231898328367)
+        ref[0, 2, 1]=0.755933712847*o*x_ref[1]**(o-1)+(0.932406367466)
+        arg[0, 3]=-0.821803410379*x[0]**o+(-0.907322546416)*x[0]+(0.295641602284)*x[1]**o+(0.313509726279)*x[1]
+        ref[0, 3, 0]=-0.821803410379*o*x_ref[0]**(o-1)+(-0.907322546416)
+        ref[0, 3, 1]=0.295641602284*o*x_ref[1]**(o-1)+(0.313509726279)
+        arg[1, 0]=0.222634801277*x[0]**o+(0.429154019888)*x[0]+(0.967463123618)*x[1]**o+(0.800493998383)*x[1]
+        ref[1, 0, 0]=0.222634801277*o*x_ref[0]**(o-1)+(0.429154019888)
+        ref[1, 0, 1]=0.967463123618*o*x_ref[1]**(o-1)+(0.800493998383)
+        arg[1, 1]=0.642884084837*x[0]**o+(-0.586452217011)*x[0]+(-0.640865894856)*x[1]**o+(0.843626878897)*x[1]
+        ref[1, 1, 0]=0.642884084837*o*x_ref[0]**(o-1)+(-0.586452217011)
+        ref[1, 1, 1]=-0.640865894856*o*x_ref[1]**(o-1)+(0.843626878897)
+        arg[1, 2]=0.525458012461*x[0]**o+(-0.966750762104)*x[0]+(0.00777928422338)*x[1]**o+(0.333128162132)*x[1]
+        ref[1, 2, 0]=0.525458012461*o*x_ref[0]**(o-1)+(-0.966750762104)
+        ref[1, 2, 1]=0.00777928422338*o*x_ref[1]**(o-1)+(0.333128162132)
+        arg[1, 3]=-0.601297041681*x[0]**o+(0.143476337347)*x[0]+(-0.0942002963773)*x[1]**o+(0.0601761040271)*x[1]
+        ref[1, 3, 0]=-0.601297041681*o*x_ref[0]**(o-1)+(0.143476337347)
+        ref[1, 3, 1]=-0.0942002963773*o*x_ref[1]**(o-1)+(0.0601761040271)
+        arg[2, 0]=0.0516769671095*x[0]**o+(0.102451811372)*x[0]+(0.563309359776)*x[1]**o+(-0.970542788641)*x[1]
+        ref[2, 0, 0]=0.0516769671095*o*x_ref[0]**(o-1)+(0.102451811372)
+        ref[2, 0, 1]=0.563309359776*o*x_ref[1]**(o-1)+(-0.970542788641)
+        arg[2, 1]=-0.538564408377*x[0]**o+(0.667352537246)*x[0]+(-0.291761953629)*x[1]**o+(0.415294884258)*x[1]
+        ref[2, 1, 0]=-0.538564408377*o*x_ref[0]**(o-1)+(0.667352537246)
+        ref[2, 1, 1]=-0.291761953629*o*x_ref[1]**(o-1)+(0.415294884258)
+        arg[2, 2]=-0.42994646777*x[0]**o+(-0.616174400767)*x[0]+(0.59416216847)*x[1]**o+(0.0315898572066)*x[1]
+        ref[2, 2, 0]=-0.42994646777*o*x_ref[0]**(o-1)+(-0.616174400767)
+        ref[2, 2, 1]=0.59416216847*o*x_ref[1]**(o-1)+(0.0315898572066)
+        arg[2, 3]=-0.379777253181*x[0]**o+(-0.150242384273)*x[0]+(-0.783940669782)*x[1]**o+(-0.736969409467)*x[1]
+        ref[2, 3, 0]=-0.379777253181*o*x_ref[0]**(o-1)+(-0.150242384273)
+        ref[2, 3, 1]=-0.783940669782*o*x_ref[1]**(o-1)+(-0.736969409467)
+        arg[3, 0]=0.157038964858*x[0]**o+(-0.934513002288)*x[0]+(-0.906590749034)*x[1]**o+(-0.64417327378)*x[1]
+        ref[3, 0, 0]=0.157038964858*o*x_ref[0]**(o-1)+(-0.934513002288)
+        ref[3, 0, 1]=-0.906590749034*o*x_ref[1]**(o-1)+(-0.64417327378)
+        arg[3, 1]=0.914173464198*x[0]**o+(-0.202646405345)*x[0]+(0.0538412746238)*x[1]**o+(-0.855511687017)*x[1]
+        ref[3, 1, 0]=0.914173464198*o*x_ref[0]**(o-1)+(-0.202646405345)
+        ref[3, 1, 1]=0.0538412746238*o*x_ref[1]**(o-1)+(-0.855511687017)
+        arg[3, 2]=-0.856684018169*x[0]**o+(0.895350712651)*x[0]+(-0.497752163048)*x[1]**o+(0.83786460613)*x[1]
+        ref[3, 2, 0]=-0.856684018169*o*x_ref[0]**(o-1)+(0.895350712651)
+        ref[3, 2, 1]=-0.497752163048*o*x_ref[1]**(o-1)+(0.83786460613)
+        arg[3, 3]=-0.0782563587995*x[0]**o+(-0.0631861192016)*x[0]+(0.714647341904)*x[1]**o+(-0.39786376284)*x[1]
+        ref[3, 3, 0]=-0.0782563587995*o*x_ref[0]**(o-1)+(-0.0631861192016)
+        ref[3, 3, 1]=0.714647341904*o*x_ref[1]**(o-1)+(-0.39786376284)
+        if dim==3:
+            arg[0, 0]+=-0.270275128716*x[2]**o+(0.252590997375)*x[2]
+            ref[0, 0, 2]=-0.270275128716*o*x_ref[2]**(o-1)+(0.252590997375)
+            arg[0, 1]+=-0.230065958853*x[2]**o+(-0.262187518137)*x[2]
+            ref[0, 1, 2]=-0.230065958853*o*x_ref[2]**(o-1)+(-0.262187518137)
+            arg[0, 2]+=0.13274861413*x[2]**o+(0.0566680804669)*x[2]
+            ref[0, 2, 2]=0.13274861413*o*x_ref[2]**(o-1)+(0.0566680804669)
+            arg[0, 3]+=-0.659023152463*x[2]**o+(0.478977830825)*x[2]
+            ref[0, 3, 2]=-0.659023152463*o*x_ref[2]**(o-1)+(0.478977830825)
+            arg[1, 0]+=-0.23089272353*x[2]**o+(0.485997083161)*x[2]
+            ref[1, 0, 2]=-0.23089272353*o*x_ref[2]**(o-1)+(0.485997083161)
+            arg[1, 1]+=-0.00865203168765*x[2]**o+(0.607729759643)*x[2]
+            ref[1, 1, 2]=-0.00865203168765*o*x_ref[2]**(o-1)+(0.607729759643)
+            arg[1, 2]+=0.470824896888*x[2]**o+(0.329776808228)*x[2]
+            ref[1, 2, 2]=0.470824896888*o*x_ref[2]**(o-1)+(0.329776808228)
+            arg[1, 3]+=-0.682260823548*x[2]**o+(-0.033197124593)*x[2]
+            ref[1, 3, 2]=-0.682260823548*o*x_ref[2]**(o-1)+(-0.033197124593)
+            arg[2, 0]+=0.881062281995*x[2]**o+(-0.423138696469)*x[2]
+            ref[2, 0, 2]=0.881062281995*o*x_ref[2]**(o-1)+(-0.423138696469)
+            arg[2, 1]+=-0.566818643819*x[2]**o+(0.740904496452)*x[2]
+            ref[2, 1, 2]=-0.566818643819*o*x_ref[2]**(o-1)+(0.740904496452)
+            arg[2, 2]+=0.677131221246*x[2]**o+(0.857328462614)*x[2]
+            ref[2, 2, 2]=0.677131221246*o*x_ref[2]**(o-1)+(0.857328462614)
+            arg[2, 3]+=0.793028490216*x[2]**o+(-0.660506576192)*x[2]
+            ref[2, 3, 2]=0.793028490216*o*x_ref[2]**(o-1)+(-0.660506576192)
+            arg[3, 0]+=-0.145417275471*x[2]**o+(-0.476473993651)*x[2]
+            ref[3, 0, 2]=-0.145417275471*o*x_ref[2]**(o-1)+(-0.476473993651)
+            arg[3, 1]+=-0.590981814059*x[2]**o+(0.053103055012)*x[2]
+            ref[3, 1, 2]=-0.590981814059*o*x_ref[2]**(o-1)+(0.053103055012)
+            arg[3, 2]+=0.297765620821*x[2]**o+(-0.920264254369)*x[2]
+            ref[3, 2, 2]=0.297765620821*o*x_ref[2]**(o-1)+(-0.920264254369)
+            arg[3, 3]+=0.573092208469*x[2]**o+(0.226441576929)*x[2]
+            ref[3, 3, 2]=0.573092208469*o*x_ref[2]**(o-1)+(0.226441576929)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=0.207617848284*x[0]**o+(-0.998360236921)*x[0]+(-0.306164899462)*x[1]**o+(0.463274654373)*x[1]
+        ref[0, 0, 0, 0]=0.207617848284*o*x_ref[0]**(o-1)+(-0.998360236921)
+        ref[0, 0, 0, 1]=-0.306164899462*o*x_ref[1]**(o-1)+(0.463274654373)
+        arg[0, 0, 1]=0.173274379452*x[0]**o+(0.993071161757)*x[0]+(0.992737529226)*x[1]**o+(-0.149123485409)*x[1]
+        ref[0, 0, 1, 0]=0.173274379452*o*x_ref[0]**(o-1)+(0.993071161757)
+        ref[0, 0, 1, 1]=0.992737529226*o*x_ref[1]**(o-1)+(-0.149123485409)
+        arg[0, 0, 2]=-0.833400489834*x[0]**o+(-0.257039862038)*x[0]+(-0.858911334073)*x[1]**o+(-0.52115929996)*x[1]
+        ref[0, 0, 2, 0]=-0.833400489834*o*x_ref[0]**(o-1)+(-0.257039862038)
+        ref[0, 0, 2, 1]=-0.858911334073*o*x_ref[1]**(o-1)+(-0.52115929996)
+        arg[0, 0, 3]=-0.538062494236*x[0]**o+(0.563606922673)*x[0]+(0.781021139717)*x[1]**o+(0.12031133402)*x[1]
+        ref[0, 0, 3, 0]=-0.538062494236*o*x_ref[0]**(o-1)+(0.563606922673)
+        ref[0, 0, 3, 1]=0.781021139717*o*x_ref[1]**(o-1)+(0.12031133402)
+        arg[0, 1, 0]=-0.668738755622*x[0]**o+(-0.560147575633)*x[0]+(0.705965425309)*x[1]**o+(-0.42680193168)*x[1]
+        ref[0, 1, 0, 0]=-0.668738755622*o*x_ref[0]**(o-1)+(-0.560147575633)
+        ref[0, 1, 0, 1]=0.705965425309*o*x_ref[1]**(o-1)+(-0.42680193168)
+        arg[0, 1, 1]=0.441595733083*x[0]**o+(0.7430290044)*x[0]+(0.753243656008)*x[1]**o+(0.0698874849921)*x[1]
+        ref[0, 1, 1, 0]=0.441595733083*o*x_ref[0]**(o-1)+(0.7430290044)
+        ref[0, 1, 1, 1]=0.753243656008*o*x_ref[1]**(o-1)+(0.0698874849921)
+        arg[0, 1, 2]=-0.151288568201*x[0]**o+(-0.993475826429)*x[0]+(0.715249231477)*x[1]**o+(-0.944333284671)*x[1]
+        ref[0, 1, 2, 0]=-0.151288568201*o*x_ref[0]**(o-1)+(-0.993475826429)
+        ref[0, 1, 2, 1]=0.715249231477*o*x_ref[1]**(o-1)+(-0.944333284671)
+        arg[0, 1, 3]=-0.504499319533*x[0]**o+(0.0586866591994)*x[0]+(-0.52221991445)*x[1]**o+(-0.432760753906)*x[1]
+        ref[0, 1, 3, 0]=-0.504499319533*o*x_ref[0]**(o-1)+(0.0586866591994)
+        ref[0, 1, 3, 1]=-0.52221991445*o*x_ref[1]**(o-1)+(-0.432760753906)
+        arg[0, 2, 0]=0.620138595601*x[0]**o+(0.955451387272)*x[0]+(-0.680220350331)*x[1]**o+(-0.520703578712)*x[1]
+        ref[0, 2, 0, 0]=0.620138595601*o*x_ref[0]**(o-1)+(0.955451387272)
+        ref[0, 2, 0, 1]=-0.680220350331*o*x_ref[1]**(o-1)+(-0.520703578712)
+        arg[0, 2, 1]=-0.193967200798*x[0]**o+(-0.398177850058)*x[0]+(-0.115569618132)*x[1]**o+(0.843627660105)*x[1]
+        ref[0, 2, 1, 0]=-0.193967200798*o*x_ref[0]**(o-1)+(-0.398177850058)
+        ref[0, 2, 1, 1]=-0.115569618132*o*x_ref[1]**(o-1)+(0.843627660105)
+        arg[0, 2, 2]=-0.718453468374*x[0]**o+(0.475611561802)*x[0]+(-0.165932898536)*x[1]**o+(-0.364697990635)*x[1]
+        ref[0, 2, 2, 0]=-0.718453468374*o*x_ref[0]**(o-1)+(0.475611561802)
+        ref[0, 2, 2, 1]=-0.165932898536*o*x_ref[1]**(o-1)+(-0.364697990635)
+        arg[0, 2, 3]=-0.288499984984*x[0]**o+(0.278484019487)*x[0]+(0.13653946539)*x[1]**o+(-0.123904779944)*x[1]
+        ref[0, 2, 3, 0]=-0.288499984984*o*x_ref[0]**(o-1)+(0.278484019487)
+        ref[0, 2, 3, 1]=0.13653946539*o*x_ref[1]**(o-1)+(-0.123904779944)
+        arg[0, 3, 0]=-0.745958570591*x[0]**o+(0.666114379343)*x[0]+(0.46246673869)*x[1]**o+(0.691708891897)*x[1]
+        ref[0, 3, 0, 0]=-0.745958570591*o*x_ref[0]**(o-1)+(0.666114379343)
+        ref[0, 3, 0, 1]=0.46246673869*o*x_ref[1]**(o-1)+(0.691708891897)
+        arg[0, 3, 1]=0.279972279565*x[0]**o+(0.668447630908)*x[0]+(-0.584151680501)*x[1]**o+(0.655192825534)*x[1]
+        ref[0, 3, 1, 0]=0.279972279565*o*x_ref[0]**(o-1)+(0.668447630908)
+        ref[0, 3, 1, 1]=-0.584151680501*o*x_ref[1]**(o-1)+(0.655192825534)
+        arg[0, 3, 2]=0.293475427212*x[0]**o+(0.882328759425)*x[0]+(-0.129566863456)*x[1]**o+(0.161566936981)*x[1]
+        ref[0, 3, 2, 0]=0.293475427212*o*x_ref[0]**(o-1)+(0.882328759425)
+        ref[0, 3, 2, 1]=-0.129566863456*o*x_ref[1]**(o-1)+(0.161566936981)
+        arg[0, 3, 3]=0.401835130771*x[0]**o+(0.384282013226)*x[0]+(0.0611442445223)*x[1]**o+(0.991412488942)*x[1]
+        ref[0, 3, 3, 0]=0.401835130771*o*x_ref[0]**(o-1)+(0.384282013226)
+        ref[0, 3, 3, 1]=0.0611442445223*o*x_ref[1]**(o-1)+(0.991412488942)
+        arg[1, 0, 0]=-0.317026421124*x[0]**o+(0.492993058911)*x[0]+(0.129821190704)*x[1]**o+(-0.330428178559)*x[1]
+        ref[1, 0, 0, 0]=-0.317026421124*o*x_ref[0]**(o-1)+(0.492993058911)
+        ref[1, 0, 0, 1]=0.129821190704*o*x_ref[1]**(o-1)+(-0.330428178559)
+        arg[1, 0, 1]=-0.000874936809281*x[0]**o+(0.58092516307)*x[0]+(-0.27250405785)*x[1]**o+(-0.40740107801)*x[1]
+        ref[1, 0, 1, 0]=-0.000874936809281*o*x_ref[0]**(o-1)+(0.58092516307)
+        ref[1, 0, 1, 1]=-0.27250405785*o*x_ref[1]**(o-1)+(-0.40740107801)
+        arg[1, 0, 2]=0.551531565884*x[0]**o+(0.714657846241)*x[0]+(0.989543626837)*x[1]**o+(0.268554355623)*x[1]
+        ref[1, 0, 2, 0]=0.551531565884*o*x_ref[0]**(o-1)+(0.714657846241)
+        ref[1, 0, 2, 1]=0.989543626837*o*x_ref[1]**(o-1)+(0.268554355623)
+        arg[1, 0, 3]=-0.887740610204*x[0]**o+(-0.776568239087)*x[0]+(0.277108663931)*x[1]**o+(-0.55957899794)*x[1]
+        ref[1, 0, 3, 0]=-0.887740610204*o*x_ref[0]**(o-1)+(-0.776568239087)
+        ref[1, 0, 3, 1]=0.277108663931*o*x_ref[1]**(o-1)+(-0.55957899794)
+        arg[1, 1, 0]=0.949708937051*x[0]**o+(0.94638847187)*x[0]+(-0.975483315774)*x[1]**o+(0.94885465708)*x[1]
+        ref[1, 1, 0, 0]=0.949708937051*o*x_ref[0]**(o-1)+(0.94638847187)
+        ref[1, 1, 0, 1]=-0.975483315774*o*x_ref[1]**(o-1)+(0.94885465708)
+        arg[1, 1, 1]=-0.768298004874*x[0]**o+(0.625389640922)*x[0]+(0.113868840249)*x[1]**o+(0.124625092198)*x[1]
+        ref[1, 1, 1, 0]=-0.768298004874*o*x_ref[0]**(o-1)+(0.625389640922)
+        ref[1, 1, 1, 1]=0.113868840249*o*x_ref[1]**(o-1)+(0.124625092198)
+        arg[1, 1, 2]=-0.911670070595*x[0]**o+(0.973039440023)*x[0]+(0.156023161663)*x[1]**o+(0.378102354687)*x[1]
+        ref[1, 1, 2, 0]=-0.911670070595*o*x_ref[0]**(o-1)+(0.973039440023)
+        ref[1, 1, 2, 1]=0.156023161663*o*x_ref[1]**(o-1)+(0.378102354687)
+        arg[1, 1, 3]=0.0975562988776*x[0]**o+(-0.155544678741)*x[0]+(-0.72188137997)*x[1]**o+(-0.67505724366)*x[1]
+        ref[1, 1, 3, 0]=0.0975562988776*o*x_ref[0]**(o-1)+(-0.155544678741)
+        ref[1, 1, 3, 1]=-0.72188137997*o*x_ref[1]**(o-1)+(-0.67505724366)
+        arg[1, 2, 0]=0.395278023611*x[0]**o+(0.434000196119)*x[0]+(0.898051737635)*x[1]**o+(-0.729161790195)*x[1]
+        ref[1, 2, 0, 0]=0.395278023611*o*x_ref[0]**(o-1)+(0.434000196119)
+        ref[1, 2, 0, 1]=0.898051737635*o*x_ref[1]**(o-1)+(-0.729161790195)
+        arg[1, 2, 1]=0.409253728718*x[0]**o+(-0.145409718115)*x[0]+(0.958033983378)*x[1]**o+(0.398914142836)*x[1]
+        ref[1, 2, 1, 0]=0.409253728718*o*x_ref[0]**(o-1)+(-0.145409718115)
+        ref[1, 2, 1, 1]=0.958033983378*o*x_ref[1]**(o-1)+(0.398914142836)
+        arg[1, 2, 2]=0.47098252049*x[0]**o+(-0.547995871561)*x[0]+(0.170217358185)*x[1]**o+(0.210113918092)*x[1]
+        ref[1, 2, 2, 0]=0.47098252049*o*x_ref[0]**(o-1)+(-0.547995871561)
+        ref[1, 2, 2, 1]=0.170217358185*o*x_ref[1]**(o-1)+(0.210113918092)
+        arg[1, 2, 3]=0.57863270394*x[0]**o+(0.35195506276)*x[0]+(0.64083308559)*x[1]**o+(-0.972617452531)*x[1]
+        ref[1, 2, 3, 0]=0.57863270394*o*x_ref[0]**(o-1)+(0.35195506276)
+        ref[1, 2, 3, 1]=0.64083308559*o*x_ref[1]**(o-1)+(-0.972617452531)
+        arg[1, 3, 0]=0.246605242673*x[0]**o+(0.108731627367)*x[0]+(-0.523338602774)*x[1]**o+(-0.245472259843)*x[1]
+        ref[1, 3, 0, 0]=0.246605242673*o*x_ref[0]**(o-1)+(0.108731627367)
+        ref[1, 3, 0, 1]=-0.523338602774*o*x_ref[1]**(o-1)+(-0.245472259843)
+        arg[1, 3, 1]=0.68795602537*x[0]**o+(0.654971115025)*x[0]+(-0.769926717658)*x[1]**o+(-0.00907670337499)*x[1]
+        ref[1, 3, 1, 0]=0.68795602537*o*x_ref[0]**(o-1)+(0.654971115025)
+        ref[1, 3, 1, 1]=-0.769926717658*o*x_ref[1]**(o-1)+(-0.00907670337499)
+        arg[1, 3, 2]=-0.668556896729*x[0]**o+(0.081656342955)*x[0]+(0.925551697318)*x[1]**o+(0.742771629551)*x[1]
+        ref[1, 3, 2, 0]=-0.668556896729*o*x_ref[0]**(o-1)+(0.081656342955)
+        ref[1, 3, 2, 1]=0.925551697318*o*x_ref[1]**(o-1)+(0.742771629551)
+        arg[1, 3, 3]=0.178621560632*x[0]**o+(0.897779939742)*x[0]+(0.101973426058)*x[1]**o+(0.0613091690064)*x[1]
+        ref[1, 3, 3, 0]=0.178621560632*o*x_ref[0]**(o-1)+(0.897779939742)
+        ref[1, 3, 3, 1]=0.101973426058*o*x_ref[1]**(o-1)+(0.0613091690064)
+        arg[2, 0, 0]=-0.306988683345*x[0]**o+(0.634448216929)*x[0]+(0.415908447246)*x[1]**o+(0.856881441065)*x[1]
+        ref[2, 0, 0, 0]=-0.306988683345*o*x_ref[0]**(o-1)+(0.634448216929)
+        ref[2, 0, 0, 1]=0.415908447246*o*x_ref[1]**(o-1)+(0.856881441065)
+        arg[2, 0, 1]=0.140696641824*x[0]**o+(-0.631546156667)*x[0]+(0.998385631808)*x[1]**o+(0.291936267776)*x[1]
+        ref[2, 0, 1, 0]=0.140696641824*o*x_ref[0]**(o-1)+(-0.631546156667)
+        ref[2, 0, 1, 1]=0.998385631808*o*x_ref[1]**(o-1)+(0.291936267776)
+        arg[2, 0, 2]=-0.171263202161*x[0]**o+(-0.49793892211)*x[0]+(-0.673046709936)*x[1]**o+(-0.678965289097)*x[1]
+        ref[2, 0, 2, 0]=-0.171263202161*o*x_ref[0]**(o-1)+(-0.49793892211)
+        ref[2, 0, 2, 1]=-0.673046709936*o*x_ref[1]**(o-1)+(-0.678965289097)
+        arg[2, 0, 3]=-0.521067035514*x[0]**o+(0.138512471896)*x[0]+(-0.240448608683)*x[1]**o+(0.64420422401)*x[1]
+        ref[2, 0, 3, 0]=-0.521067035514*o*x_ref[0]**(o-1)+(0.138512471896)
+        ref[2, 0, 3, 1]=-0.240448608683*o*x_ref[1]**(o-1)+(0.64420422401)
+        arg[2, 1, 0]=0.212792792454*x[0]**o+(-0.0339015085997)*x[0]+(-0.900074963281)*x[1]**o+(0.725483017255)*x[1]
+        ref[2, 1, 0, 0]=0.212792792454*o*x_ref[0]**(o-1)+(-0.0339015085997)
+        ref[2, 1, 0, 1]=-0.900074963281*o*x_ref[1]**(o-1)+(0.725483017255)
+        arg[2, 1, 1]=0.405445609582*x[0]**o+(-0.0364889909685)*x[0]+(-0.0419399494191)*x[1]**o+(0.0189665444281)*x[1]
+        ref[2, 1, 1, 0]=0.405445609582*o*x_ref[0]**(o-1)+(-0.0364889909685)
+        ref[2, 1, 1, 1]=-0.0419399494191*o*x_ref[1]**(o-1)+(0.0189665444281)
+        arg[2, 1, 2]=0.64084343177*x[0]**o+(-0.332556274735)*x[0]+(0.729156946333)*x[1]**o+(0.381329986012)*x[1]
+        ref[2, 1, 2, 0]=0.64084343177*o*x_ref[0]**(o-1)+(-0.332556274735)
+        ref[2, 1, 2, 1]=0.729156946333*o*x_ref[1]**(o-1)+(0.381329986012)
+        arg[2, 1, 3]=0.39787765091*x[0]**o+(0.952729815214)*x[0]+(-0.0715694267453)*x[1]**o+(0.853667541121)*x[1]
+        ref[2, 1, 3, 0]=0.39787765091*o*x_ref[0]**(o-1)+(0.952729815214)
+        ref[2, 1, 3, 1]=-0.0715694267453*o*x_ref[1]**(o-1)+(0.853667541121)
+        arg[2, 2, 0]=-0.0959207791587*x[0]**o+(0.879997129641)*x[0]+(-0.420787149404)*x[1]**o+(-0.973408942161)*x[1]
+        ref[2, 2, 0, 0]=-0.0959207791587*o*x_ref[0]**(o-1)+(0.879997129641)
+        ref[2, 2, 0, 1]=-0.420787149404*o*x_ref[1]**(o-1)+(-0.973408942161)
+        arg[2, 2, 1]=-0.465176715448*x[0]**o+(-0.599270211021)*x[0]+(-0.0879510398917)*x[1]**o+(0.182404102467)*x[1]
+        ref[2, 2, 1, 0]=-0.465176715448*o*x_ref[0]**(o-1)+(-0.599270211021)
+        ref[2, 2, 1, 1]=-0.0879510398917*o*x_ref[1]**(o-1)+(0.182404102467)
+        arg[2, 2, 2]=0.543633424658*x[0]**o+(-0.307404058342)*x[0]+(0.514698762109)*x[1]**o+(0.846885550627)*x[1]
+        ref[2, 2, 2, 0]=0.543633424658*o*x_ref[0]**(o-1)+(-0.307404058342)
+        ref[2, 2, 2, 1]=0.514698762109*o*x_ref[1]**(o-1)+(0.846885550627)
+        arg[2, 2, 3]=-0.422340852091*x[0]**o+(-0.779448152531)*x[0]+(0.313639685589)*x[1]**o+(-0.79328311081)*x[1]
+        ref[2, 2, 3, 0]=-0.422340852091*o*x_ref[0]**(o-1)+(-0.779448152531)
+        ref[2, 2, 3, 1]=0.313639685589*o*x_ref[1]**(o-1)+(-0.79328311081)
+        arg[2, 3, 0]=0.549129241765*x[0]**o+(0.526655516918)*x[0]+(0.271137040653)*x[1]**o+(0.384512590475)*x[1]
+        ref[2, 3, 0, 0]=0.549129241765*o*x_ref[0]**(o-1)+(0.526655516918)
+        ref[2, 3, 0, 1]=0.271137040653*o*x_ref[1]**(o-1)+(0.384512590475)
+        arg[2, 3, 1]=0.00729974526116*x[0]**o+(-0.00659945360518)*x[0]+(-0.855712077197)*x[1]**o+(0.343761994135)*x[1]
+        ref[2, 3, 1, 0]=0.00729974526116*o*x_ref[0]**(o-1)+(-0.00659945360518)
+        ref[2, 3, 1, 1]=-0.855712077197*o*x_ref[1]**(o-1)+(0.343761994135)
+        arg[2, 3, 2]=0.667220319723*x[0]**o+(0.276214304284)*x[0]+(0.50551988537)*x[1]**o+(-0.555861488392)*x[1]
+        ref[2, 3, 2, 0]=0.667220319723*o*x_ref[0]**(o-1)+(0.276214304284)
+        ref[2, 3, 2, 1]=0.50551988537*o*x_ref[1]**(o-1)+(-0.555861488392)
+        arg[2, 3, 3]=-0.267985282497*x[0]**o+(-0.52893147399)*x[0]+(-0.613035426624)*x[1]**o+(0.208679413096)*x[1]
+        ref[2, 3, 3, 0]=-0.267985282497*o*x_ref[0]**(o-1)+(-0.52893147399)
+        ref[2, 3, 3, 1]=-0.613035426624*o*x_ref[1]**(o-1)+(0.208679413096)
+        if dim==3:
+            arg[0, 0, 0]+=-0.952899357969*x[2]**o+(0.86807286395)*x[2]
+            ref[0, 0, 0, 2]=-0.952899357969*o*x_ref[2]**(o-1)+(0.86807286395)
+            arg[0, 0, 1]+=-0.0247516376855*x[2]**o+(0.949961102712)*x[2]
+            ref[0, 0, 1, 2]=-0.0247516376855*o*x_ref[2]**(o-1)+(0.949961102712)
+            arg[0, 0, 2]+=0.685793784046*x[2]**o+(0.379594895529)*x[2]
+            ref[0, 0, 2, 2]=0.685793784046*o*x_ref[2]**(o-1)+(0.379594895529)
+            arg[0, 0, 3]+=0.459487238968*x[2]**o+(0.874836408593)*x[2]
+            ref[0, 0, 3, 2]=0.459487238968*o*x_ref[2]**(o-1)+(0.874836408593)
+            arg[0, 1, 0]+=0.271504412847*x[2]**o+(0.328004975529)*x[2]
+            ref[0, 1, 0, 2]=0.271504412847*o*x_ref[2]**(o-1)+(0.328004975529)
+            arg[0, 1, 1]+=0.391540063939*x[2]**o+(0.437127943973)*x[2]
+            ref[0, 1, 1, 2]=0.391540063939*o*x_ref[2]**(o-1)+(0.437127943973)
+            arg[0, 1, 2]+=0.854465657339*x[2]**o+(-0.30832262338)*x[2]
+            ref[0, 1, 2, 2]=0.854465657339*o*x_ref[2]**(o-1)+(-0.30832262338)
+            arg[0, 1, 3]+=-0.0932898955623*x[2]**o+(-0.181629658427)*x[2]
+            ref[0, 1, 3, 2]=-0.0932898955623*o*x_ref[2]**(o-1)+(-0.181629658427)
+            arg[0, 2, 0]+=-0.971485810872*x[2]**o+(0.919485497535)*x[2]
+            ref[0, 2, 0, 2]=-0.971485810872*o*x_ref[2]**(o-1)+(0.919485497535)
+            arg[0, 2, 1]+=0.045147599758*x[2]**o+(0.748001633758)*x[2]
+            ref[0, 2, 1, 2]=0.045147599758*o*x_ref[2]**(o-1)+(0.748001633758)
+            arg[0, 2, 2]+=0.669829944911*x[2]**o+(0.35297403778)*x[2]
+            ref[0, 2, 2, 2]=0.669829944911*o*x_ref[2]**(o-1)+(0.35297403778)
+            arg[0, 2, 3]+=-0.478478025043*x[2]**o+(-0.882865935479)*x[2]
+            ref[0, 2, 3, 2]=-0.478478025043*o*x_ref[2]**(o-1)+(-0.882865935479)
+            arg[0, 3, 0]+=-0.495578143237*x[2]**o+(0.451072988173)*x[2]
+            ref[0, 3, 0, 2]=-0.495578143237*o*x_ref[2]**(o-1)+(0.451072988173)
+            arg[0, 3, 1]+=-0.522060672614*x[2]**o+(-0.4949558519)*x[2]
+            ref[0, 3, 1, 2]=-0.522060672614*o*x_ref[2]**(o-1)+(-0.4949558519)
+            arg[0, 3, 2]+=-0.125515717805*x[2]**o+(-0.266322047408)*x[2]
+            ref[0, 3, 2, 2]=-0.125515717805*o*x_ref[2]**(o-1)+(-0.266322047408)
+            arg[0, 3, 3]+=0.27244238691*x[2]**o+(-0.0463977529908)*x[2]
+            ref[0, 3, 3, 2]=0.27244238691*o*x_ref[2]**(o-1)+(-0.0463977529908)
+            arg[1, 0, 0]+=-0.515361581835*x[2]**o+(0.581349888702)*x[2]
+            ref[1, 0, 0, 2]=-0.515361581835*o*x_ref[2]**(o-1)+(0.581349888702)
+            arg[1, 0, 1]+=-0.830005520983*x[2]**o+(0.0784541501802)*x[2]
+            ref[1, 0, 1, 2]=-0.830005520983*o*x_ref[2]**(o-1)+(0.0784541501802)
+            arg[1, 0, 2]+=-0.322833802307*x[2]**o+(-0.668274179765)*x[2]
+            ref[1, 0, 2, 2]=-0.322833802307*o*x_ref[2]**(o-1)+(-0.668274179765)
+            arg[1, 0, 3]+=-0.351259725532*x[2]**o+(-0.800142659834)*x[2]
+            ref[1, 0, 3, 2]=-0.351259725532*o*x_ref[2]**(o-1)+(-0.800142659834)
+            arg[1, 1, 0]+=0.95057487566*x[2]**o+(-0.75681354044)*x[2]
+            ref[1, 1, 0, 2]=0.95057487566*o*x_ref[2]**(o-1)+(-0.75681354044)
+            arg[1, 1, 1]+=0.215693965997*x[2]**o+(-0.647883705644)*x[2]
+            ref[1, 1, 1, 2]=0.215693965997*o*x_ref[2]**(o-1)+(-0.647883705644)
+            arg[1, 1, 2]+=0.114973152437*x[2]**o+(-0.216761450958)*x[2]
+            ref[1, 1, 2, 2]=0.114973152437*o*x_ref[2]**(o-1)+(-0.216761450958)
+            arg[1, 1, 3]+=-0.815063873341*x[2]**o+(0.772748439513)*x[2]
+            ref[1, 1, 3, 2]=-0.815063873341*o*x_ref[2]**(o-1)+(0.772748439513)
+            arg[1, 2, 0]+=-0.936856826192*x[2]**o+(-0.811321334489)*x[2]
+            ref[1, 2, 0, 2]=-0.936856826192*o*x_ref[2]**(o-1)+(-0.811321334489)
+            arg[1, 2, 1]+=0.516439740041*x[2]**o+(0.829590624169)*x[2]
+            ref[1, 2, 1, 2]=0.516439740041*o*x_ref[2]**(o-1)+(0.829590624169)
+            arg[1, 2, 2]+=-0.631285812508*x[2]**o+(-0.927529595804)*x[2]
+            ref[1, 2, 2, 2]=-0.631285812508*o*x_ref[2]**(o-1)+(-0.927529595804)
+            arg[1, 2, 3]+=0.132828389486*x[2]**o+(-0.989029556736)*x[2]
+            ref[1, 2, 3, 2]=0.132828389486*o*x_ref[2]**(o-1)+(-0.989029556736)
+            arg[1, 3, 0]+=0.0103543921716*x[2]**o+(-0.25444185405)*x[2]
+            ref[1, 3, 0, 2]=0.0103543921716*o*x_ref[2]**(o-1)+(-0.25444185405)
+            arg[1, 3, 1]+=-0.99876159291*x[2]**o+(0.483957216951)*x[2]
+            ref[1, 3, 1, 2]=-0.99876159291*o*x_ref[2]**(o-1)+(0.483957216951)
+            arg[1, 3, 2]+=-0.0351550663506*x[2]**o+(-0.742664405507)*x[2]
+            ref[1, 3, 2, 2]=-0.0351550663506*o*x_ref[2]**(o-1)+(-0.742664405507)
+            arg[1, 3, 3]+=0.569244733892*x[2]**o+(0.320128572862)*x[2]
+            ref[1, 3, 3, 2]=0.569244733892*o*x_ref[2]**(o-1)+(0.320128572862)
+            arg[2, 0, 0]+=0.30114849547*x[2]**o+(0.388714380235)*x[2]
+            ref[2, 0, 0, 2]=0.30114849547*o*x_ref[2]**(o-1)+(0.388714380235)
+            arg[2, 0, 1]+=0.735533351102*x[2]**o+(-0.146875550851)*x[2]
+            ref[2, 0, 1, 2]=0.735533351102*o*x_ref[2]**(o-1)+(-0.146875550851)
+            arg[2, 0, 2]+=0.241735743211*x[2]**o+(0.356986617499)*x[2]
+            ref[2, 0, 2, 2]=0.241735743211*o*x_ref[2]**(o-1)+(0.356986617499)
+            arg[2, 0, 3]+=0.876353131128*x[2]**o+(-0.192832068807)*x[2]
+            ref[2, 0, 3, 2]=0.876353131128*o*x_ref[2]**(o-1)+(-0.192832068807)
+            arg[2, 1, 0]+=0.0968975978895*x[2]**o+(0.712051949604)*x[2]
+            ref[2, 1, 0, 2]=0.0968975978895*o*x_ref[2]**(o-1)+(0.712051949604)
+            arg[2, 1, 1]+=-0.336589224375*x[2]**o+(-0.642065360205)*x[2]
+            ref[2, 1, 1, 2]=-0.336589224375*o*x_ref[2]**(o-1)+(-0.642065360205)
+            arg[2, 1, 2]+=-0.261029764898*x[2]**o+(-0.194100629525)*x[2]
+            ref[2, 1, 2, 2]=-0.261029764898*o*x_ref[2]**(o-1)+(-0.194100629525)
+            arg[2, 1, 3]+=-0.301248650768*x[2]**o+(0.324527929105)*x[2]
+            ref[2, 1, 3, 2]=-0.301248650768*o*x_ref[2]**(o-1)+(0.324527929105)
+            arg[2, 2, 0]+=0.0916329338717*x[2]**o+(-0.085620069349)*x[2]
+            ref[2, 2, 0, 2]=0.0916329338717*o*x_ref[2]**(o-1)+(-0.085620069349)
+            arg[2, 2, 1]+=-0.441767231806*x[2]**o+(0.0844131814455)*x[2]
+            ref[2, 2, 1, 2]=-0.441767231806*o*x_ref[2]**(o-1)+(0.0844131814455)
+            arg[2, 2, 2]+=0.678914683834*x[2]**o+(-0.449481639136)*x[2]
+            ref[2, 2, 2, 2]=0.678914683834*o*x_ref[2]**(o-1)+(-0.449481639136)
+            arg[2, 2, 3]+=-0.657177064155*x[2]**o+(-0.190404865718)*x[2]
+            ref[2, 2, 3, 2]=-0.657177064155*o*x_ref[2]**(o-1)+(-0.190404865718)
+            arg[2, 3, 0]+=-0.339829711295*x[2]**o+(0.273119713541)*x[2]
+            ref[2, 3, 0, 2]=-0.339829711295*o*x_ref[2]**(o-1)+(0.273119713541)
+            arg[2, 3, 1]+=0.830233198041*x[2]**o+(0.248660103158)*x[2]
+            ref[2, 3, 1, 2]=0.830233198041*o*x_ref[2]**(o-1)+(0.248660103158)
+            arg[2, 3, 2]+=-0.298446548001*x[2]**o+(0.223440635737)*x[2]
+            ref[2, 3, 2, 2]=-0.298446548001*o*x_ref[2]**(o-1)+(0.223440635737)
+            arg[2, 3, 3]+=-0.98939428025*x[2]**o+(-0.398739313055)*x[2]
+            ref[2, 3, 3, 2]=-0.98939428025*o*x_ref[2]**(o-1)+(-0.398739313055)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.215575087188*x[0]**o+(-0.840829956466)*x[0]+(0.65076414412)*x[1]**o+(0.00986520851266)*x[1]
+        ref[0]=0.215575087188*o*x_ref[0]**(o-1)+(-0.840829956466)
+        ref[1]=0.65076414412*o*x_ref[1]**(o-1)+(0.00986520851266)
+        if dim==3:
+            arg+=(0.640825012581)*x[2]**o+(-0.291294434329)*x[2]
+            ref[2]=0.640825012581*o*x_ref[2]**(o-1)+(-0.291294434329)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=0.0813390672028*x[0]**o+(-0.469847317674)*x[0]+(-0.98122332342)*x[1]**o+(0.18308268947)*x[1]
+        ref[0, 0]=0.0813390672028*o*x_ref[0]**(o-1)+(-0.469847317674)
+        ref[0, 1]=-0.98122332342*o*x_ref[1]**(o-1)+(0.18308268947)
+        arg[1,]=0.205988178962*x[0]**o+(-0.0857204270515)*x[0]+(0.311089378323)*x[1]**o+(0.659851793317)*x[1]
+        ref[1, 0]=0.205988178962*o*x_ref[0]**(o-1)+(-0.0857204270515)
+        ref[1, 1]=0.311089378323*o*x_ref[1]**(o-1)+(0.659851793317)
+        if dim==3:
+            arg[0,]+=0.0803915343111*x[2]**o+(0.768667484058)*x[2]
+            ref[0, 2]=0.0803915343111*o*x_ref[2]**(o-1)+(0.768667484058)
+            arg[1,]+=-0.804102569911*x[2]**o+(0.672963632637)*x[2]
+            ref[1, 2]=-0.804102569911*o*x_ref[2]**(o-1)+(0.672963632637)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.108718026187*x[0]**o+(0.0102144052123)*x[0]+(-0.504898499128)*x[1]**o+(0.643981582491)*x[1]
+        ref[0, 0, 0]=-0.108718026187*o*x_ref[0]**(o-1)+(0.0102144052123)
+        ref[0, 0, 1]=-0.504898499128*o*x_ref[1]**(o-1)+(0.643981582491)
+        arg[0, 1]=-0.764681842703*x[0]**o+(0.412791197717)*x[0]+(-0.623506005205)*x[1]**o+(0.273791365899)*x[1]
+        ref[0, 1, 0]=-0.764681842703*o*x_ref[0]**(o-1)+(0.412791197717)
+        ref[0, 1, 1]=-0.623506005205*o*x_ref[1]**(o-1)+(0.273791365899)
+        arg[1, 0]=0.643250165612*x[0]**o+(0.247890115843)*x[0]+(-0.389044371137)*x[1]**o+(-0.682550329515)*x[1]
+        ref[1, 0, 0]=0.643250165612*o*x_ref[0]**(o-1)+(0.247890115843)
+        ref[1, 0, 1]=-0.389044371137*o*x_ref[1]**(o-1)+(-0.682550329515)
+        arg[1, 1]=-0.127619093043*x[0]**o+(0.651297010153)*x[0]+(-0.335915986522)*x[1]**o+(-0.956776374132)*x[1]
+        ref[1, 1, 0]=-0.127619093043*o*x_ref[0]**(o-1)+(0.651297010153)
+        ref[1, 1, 1]=-0.335915986522*o*x_ref[1]**(o-1)+(-0.956776374132)
+        if dim==3:
+            arg[0, 0]+=-0.401518458745*x[2]**o+(-0.0639066130966)*x[2]
+            ref[0, 0, 2]=-0.401518458745*o*x_ref[2]**(o-1)+(-0.0639066130966)
+            arg[0, 1]+=0.392887796017*x[2]**o+(-0.87275969521)*x[2]
+            ref[0, 1, 2]=0.392887796017*o*x_ref[2]**(o-1)+(-0.87275969521)
+            arg[1, 0]+=-0.964678999254*x[2]**o+(0.892603412508)*x[2]
+            ref[1, 0, 2]=-0.964678999254*o*x_ref[2]**(o-1)+(0.892603412508)
+            arg[1, 1]+=-0.202342067761*x[2]**o+(0.179094158107)*x[2]
+            ref[1, 1, 2]=-0.202342067761*o*x_ref[2]**(o-1)+(0.179094158107)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3),w)
+        ref = Data(0,(2, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.754151764094*x[0]**o+(0.414800897323)*x[0]+(0.261042483229)*x[1]**o+(-0.826412796926)*x[1]
+        ref[0, 0, 0, 0]=-0.754151764094*o*x_ref[0]**(o-1)+(0.414800897323)
+        ref[0, 0, 0, 1]=0.261042483229*o*x_ref[1]**(o-1)+(-0.826412796926)
+        arg[0, 0, 1]=-0.239569193497*x[0]**o+(0.932836864243)*x[0]+(-0.287830466968)*x[1]**o+(-0.799401265581)*x[1]
+        ref[0, 0, 1, 0]=-0.239569193497*o*x_ref[0]**(o-1)+(0.932836864243)
+        ref[0, 0, 1, 1]=-0.287830466968*o*x_ref[1]**(o-1)+(-0.799401265581)
+        arg[0, 0, 2]=-0.0267960463653*x[0]**o+(0.986142541771)*x[0]+(-0.196068216083)*x[1]**o+(0.970303493799)*x[1]
+        ref[0, 0, 2, 0]=-0.0267960463653*o*x_ref[0]**(o-1)+(0.986142541771)
+        ref[0, 0, 2, 1]=-0.196068216083*o*x_ref[1]**(o-1)+(0.970303493799)
+        arg[0, 1, 0]=0.132253194021*x[0]**o+(-0.385826605991)*x[0]+(-0.821840055195)*x[1]**o+(0.479237757296)*x[1]
+        ref[0, 1, 0, 0]=0.132253194021*o*x_ref[0]**(o-1)+(-0.385826605991)
+        ref[0, 1, 0, 1]=-0.821840055195*o*x_ref[1]**(o-1)+(0.479237757296)
+        arg[0, 1, 1]=-0.257441391048*x[0]**o+(-0.47523373813)*x[0]+(0.303639383904)*x[1]**o+(0.893916294248)*x[1]
+        ref[0, 1, 1, 0]=-0.257441391048*o*x_ref[0]**(o-1)+(-0.47523373813)
+        ref[0, 1, 1, 1]=0.303639383904*o*x_ref[1]**(o-1)+(0.893916294248)
+        arg[0, 1, 2]=0.82406301928*x[0]**o+(0.38118873492)*x[0]+(0.988660465486)*x[1]**o+(-0.564765224601)*x[1]
+        ref[0, 1, 2, 0]=0.82406301928*o*x_ref[0]**(o-1)+(0.38118873492)
+        ref[0, 1, 2, 1]=0.988660465486*o*x_ref[1]**(o-1)+(-0.564765224601)
+        arg[0, 2, 0]=0.229180885377*x[0]**o+(0.347089008395)*x[0]+(0.93529745284)*x[1]**o+(-0.519791771948)*x[1]
+        ref[0, 2, 0, 0]=0.229180885377*o*x_ref[0]**(o-1)+(0.347089008395)
+        ref[0, 2, 0, 1]=0.93529745284*o*x_ref[1]**(o-1)+(-0.519791771948)
+        arg[0, 2, 1]=0.680896608134*x[0]**o+(-0.594205519388)*x[0]+(-0.305875847537)*x[1]**o+(-0.871243004369)*x[1]
+        ref[0, 2, 1, 0]=0.680896608134*o*x_ref[0]**(o-1)+(-0.594205519388)
+        ref[0, 2, 1, 1]=-0.305875847537*o*x_ref[1]**(o-1)+(-0.871243004369)
+        arg[0, 2, 2]=0.00738648291832*x[0]**o+(-0.0702804759297)*x[0]+(-0.393691467999)*x[1]**o+(0.335139281709)*x[1]
+        ref[0, 2, 2, 0]=0.00738648291832*o*x_ref[0]**(o-1)+(-0.0702804759297)
+        ref[0, 2, 2, 1]=-0.393691467999*o*x_ref[1]**(o-1)+(0.335139281709)
+        arg[0, 3, 0]=-0.599195896125*x[0]**o+(0.378581268628)*x[0]+(-0.656916889028)*x[1]**o+(0.2703863872)*x[1]
+        ref[0, 3, 0, 0]=-0.599195896125*o*x_ref[0]**(o-1)+(0.378581268628)
+        ref[0, 3, 0, 1]=-0.656916889028*o*x_ref[1]**(o-1)+(0.2703863872)
+        arg[0, 3, 1]=-0.549273004821*x[0]**o+(0.878293278761)*x[0]+(0.746315563735)*x[1]**o+(0.97901813831)*x[1]
+        ref[0, 3, 1, 0]=-0.549273004821*o*x_ref[0]**(o-1)+(0.878293278761)
+        ref[0, 3, 1, 1]=0.746315563735*o*x_ref[1]**(o-1)+(0.97901813831)
+        arg[0, 3, 2]=0.388749394739*x[0]**o+(-0.1271706251)*x[0]+(0.625487784315)*x[1]**o+(-0.512238017971)*x[1]
+        ref[0, 3, 2, 0]=0.388749394739*o*x_ref[0]**(o-1)+(-0.1271706251)
+        ref[0, 3, 2, 1]=0.625487784315*o*x_ref[1]**(o-1)+(-0.512238017971)
+        arg[1, 0, 0]=0.810922230975*x[0]**o+(-0.591679398976)*x[0]+(-0.407954643034)*x[1]**o+(-0.359970716612)*x[1]
+        ref[1, 0, 0, 0]=0.810922230975*o*x_ref[0]**(o-1)+(-0.591679398976)
+        ref[1, 0, 0, 1]=-0.407954643034*o*x_ref[1]**(o-1)+(-0.359970716612)
+        arg[1, 0, 1]=-0.468807830315*x[0]**o+(-0.88573137177)*x[0]+(0.500384384326)*x[1]**o+(0.637140394277)*x[1]
+        ref[1, 0, 1, 0]=-0.468807830315*o*x_ref[0]**(o-1)+(-0.88573137177)
+        ref[1, 0, 1, 1]=0.500384384326*o*x_ref[1]**(o-1)+(0.637140394277)
+        arg[1, 0, 2]=0.242664612226*x[0]**o+(-0.49594721928)*x[0]+(-0.781945808809)*x[1]**o+(-0.922256036875)*x[1]
+        ref[1, 0, 2, 0]=0.242664612226*o*x_ref[0]**(o-1)+(-0.49594721928)
+        ref[1, 0, 2, 1]=-0.781945808809*o*x_ref[1]**(o-1)+(-0.922256036875)
+        arg[1, 1, 0]=0.0563617724266*x[0]**o+(-0.0685225328364)*x[0]+(0.734045169037)*x[1]**o+(0.315289410826)*x[1]
+        ref[1, 1, 0, 0]=0.0563617724266*o*x_ref[0]**(o-1)+(-0.0685225328364)
+        ref[1, 1, 0, 1]=0.734045169037*o*x_ref[1]**(o-1)+(0.315289410826)
+        arg[1, 1, 1]=0.496221215688*x[0]**o+(-0.508670759126)*x[0]+(-0.819997751411)*x[1]**o+(0.916158615377)*x[1]
+        ref[1, 1, 1, 0]=0.496221215688*o*x_ref[0]**(o-1)+(-0.508670759126)
+        ref[1, 1, 1, 1]=-0.819997751411*o*x_ref[1]**(o-1)+(0.916158615377)
+        arg[1, 1, 2]=-0.13341411566*x[0]**o+(-0.130698550891)*x[0]+(-0.736143442096)*x[1]**o+(0.882087552805)*x[1]
+        ref[1, 1, 2, 0]=-0.13341411566*o*x_ref[0]**(o-1)+(-0.130698550891)
+        ref[1, 1, 2, 1]=-0.736143442096*o*x_ref[1]**(o-1)+(0.882087552805)
+        arg[1, 2, 0]=0.97200014769*x[0]**o+(-0.847737638053)*x[0]+(0.814266352307)*x[1]**o+(-0.531568627116)*x[1]
+        ref[1, 2, 0, 0]=0.97200014769*o*x_ref[0]**(o-1)+(-0.847737638053)
+        ref[1, 2, 0, 1]=0.814266352307*o*x_ref[1]**(o-1)+(-0.531568627116)
+        arg[1, 2, 1]=-0.150377471086*x[0]**o+(0.963446754346)*x[0]+(-0.220317495939)*x[1]**o+(0.0274275088301)*x[1]
+        ref[1, 2, 1, 0]=-0.150377471086*o*x_ref[0]**(o-1)+(0.963446754346)
+        ref[1, 2, 1, 1]=-0.220317495939*o*x_ref[1]**(o-1)+(0.0274275088301)
+        arg[1, 2, 2]=-0.460825576463*x[0]**o+(0.695041551723)*x[0]+(-0.093505800334)*x[1]**o+(0.0340298300761)*x[1]
+        ref[1, 2, 2, 0]=-0.460825576463*o*x_ref[0]**(o-1)+(0.695041551723)
+        ref[1, 2, 2, 1]=-0.093505800334*o*x_ref[1]**(o-1)+(0.0340298300761)
+        arg[1, 3, 0]=0.979953978744*x[0]**o+(-0.0277382338848)*x[0]+(0.0421799707771)*x[1]**o+(-0.376617792574)*x[1]
+        ref[1, 3, 0, 0]=0.979953978744*o*x_ref[0]**(o-1)+(-0.0277382338848)
+        ref[1, 3, 0, 1]=0.0421799707771*o*x_ref[1]**(o-1)+(-0.376617792574)
+        arg[1, 3, 1]=0.884095742643*x[0]**o+(0.31585555377)*x[0]+(-0.789887695454)*x[1]**o+(0.803335772399)*x[1]
+        ref[1, 3, 1, 0]=0.884095742643*o*x_ref[0]**(o-1)+(0.31585555377)
+        ref[1, 3, 1, 1]=-0.789887695454*o*x_ref[1]**(o-1)+(0.803335772399)
+        arg[1, 3, 2]=0.406074704457*x[0]**o+(-0.994839403641)*x[0]+(0.593269926873)*x[1]**o+(-0.0751205714874)*x[1]
+        ref[1, 3, 2, 0]=0.406074704457*o*x_ref[0]**(o-1)+(-0.994839403641)
+        ref[1, 3, 2, 1]=0.593269926873*o*x_ref[1]**(o-1)+(-0.0751205714874)
+        if dim==3:
+            arg[0, 0, 0]+=0.796068819916*x[2]**o+(-0.468008588056)*x[2]
+            ref[0, 0, 0, 2]=0.796068819916*o*x_ref[2]**(o-1)+(-0.468008588056)
+            arg[0, 0, 1]+=-0.685377500659*x[2]**o+(0.726560484154)*x[2]
+            ref[0, 0, 1, 2]=-0.685377500659*o*x_ref[2]**(o-1)+(0.726560484154)
+            arg[0, 0, 2]+=-0.978077489829*x[2]**o+(-0.708797478708)*x[2]
+            ref[0, 0, 2, 2]=-0.978077489829*o*x_ref[2]**(o-1)+(-0.708797478708)
+            arg[0, 1, 0]+=0.433442914932*x[2]**o+(-0.569453894106)*x[2]
+            ref[0, 1, 0, 2]=0.433442914932*o*x_ref[2]**(o-1)+(-0.569453894106)
+            arg[0, 1, 1]+=0.750101637746*x[2]**o+(0.114080046677)*x[2]
+            ref[0, 1, 1, 2]=0.750101637746*o*x_ref[2]**(o-1)+(0.114080046677)
+            arg[0, 1, 2]+=-0.756896549115*x[2]**o+(0.730948434619)*x[2]
+            ref[0, 1, 2, 2]=-0.756896549115*o*x_ref[2]**(o-1)+(0.730948434619)
+            arg[0, 2, 0]+=-0.16467036967*x[2]**o+(-0.318546809075)*x[2]
+            ref[0, 2, 0, 2]=-0.16467036967*o*x_ref[2]**(o-1)+(-0.318546809075)
+            arg[0, 2, 1]+=-0.0202840665901*x[2]**o+(0.354461678064)*x[2]
+            ref[0, 2, 1, 2]=-0.0202840665901*o*x_ref[2]**(o-1)+(0.354461678064)
+            arg[0, 2, 2]+=0.896884848903*x[2]**o+(-0.905933036497)*x[2]
+            ref[0, 2, 2, 2]=0.896884848903*o*x_ref[2]**(o-1)+(-0.905933036497)
+            arg[0, 3, 0]+=0.578087176107*x[2]**o+(0.725685400415)*x[2]
+            ref[0, 3, 0, 2]=0.578087176107*o*x_ref[2]**(o-1)+(0.725685400415)
+            arg[0, 3, 1]+=0.0154047000087*x[2]**o+(-0.946034906673)*x[2]
+            ref[0, 3, 1, 2]=0.0154047000087*o*x_ref[2]**(o-1)+(-0.946034906673)
+            arg[0, 3, 2]+=0.232490866142*x[2]**o+(-0.0280031528118)*x[2]
+            ref[0, 3, 2, 2]=0.232490866142*o*x_ref[2]**(o-1)+(-0.0280031528118)
+            arg[1, 0, 0]+=-0.2770474413*x[2]**o+(0.953288295997)*x[2]
+            ref[1, 0, 0, 2]=-0.2770474413*o*x_ref[2]**(o-1)+(0.953288295997)
+            arg[1, 0, 1]+=-0.332179945483*x[2]**o+(0.134859401388)*x[2]
+            ref[1, 0, 1, 2]=-0.332179945483*o*x_ref[2]**(o-1)+(0.134859401388)
+            arg[1, 0, 2]+=0.169635629407*x[2]**o+(0.554621279714)*x[2]
+            ref[1, 0, 2, 2]=0.169635629407*o*x_ref[2]**(o-1)+(0.554621279714)
+            arg[1, 1, 0]+=0.45592159005*x[2]**o+(0.442867336676)*x[2]
+            ref[1, 1, 0, 2]=0.45592159005*o*x_ref[2]**(o-1)+(0.442867336676)
+            arg[1, 1, 1]+=-0.270448964514*x[2]**o+(-0.601269767002)*x[2]
+            ref[1, 1, 1, 2]=-0.270448964514*o*x_ref[2]**(o-1)+(-0.601269767002)
+            arg[1, 1, 2]+=-0.934714885709*x[2]**o+(-0.572848864597)*x[2]
+            ref[1, 1, 2, 2]=-0.934714885709*o*x_ref[2]**(o-1)+(-0.572848864597)
+            arg[1, 2, 0]+=0.284887362148*x[2]**o+(0.369632671109)*x[2]
+            ref[1, 2, 0, 2]=0.284887362148*o*x_ref[2]**(o-1)+(0.369632671109)
+            arg[1, 2, 1]+=-0.188108516783*x[2]**o+(0.68901461811)*x[2]
+            ref[1, 2, 1, 2]=-0.188108516783*o*x_ref[2]**(o-1)+(0.68901461811)
+            arg[1, 2, 2]+=-0.644287412176*x[2]**o+(-0.113447883624)*x[2]
+            ref[1, 2, 2, 2]=-0.644287412176*o*x_ref[2]**(o-1)+(-0.113447883624)
+            arg[1, 3, 0]+=0.138130326586*x[2]**o+(-0.50137651357)*x[2]
+            ref[1, 3, 0, 2]=0.138130326586*o*x_ref[2]**(o-1)+(-0.50137651357)
+            arg[1, 3, 1]+=-0.0989254820064*x[2]**o+(0.0901507427879)*x[2]
+            ref[1, 3, 1, 2]=-0.0989254820064*o*x_ref[2]**(o-1)+(0.0901507427879)
+            arg[1, 3, 2]+=-0.840358249319*x[2]**o+(0.630046475957)*x[2]
+            ref[1, 3, 2, 2]=-0.840358249319*o*x_ref[2]**(o-1)+(0.630046475957)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.191128043578*x[0]+(-0.381953469339)*x[1]
+        ref[0]=-0.191128043578
+        ref[1]=-0.381953469339
+        if dim==3:
+            arg+=(-0.347152782223)*x[2]
+            ref[2]=-0.347152782223
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.484068241525*x[0]+(-0.276259496625)*x[1]
+        ref[0, 0]=-0.484068241525
+        ref[0, 1]=-0.276259496625
+        arg[1,]=-0.603576300839*x[0]+(0.150624973314)*x[1]
+        ref[1, 0]=-0.603576300839
+        ref[1, 1]=0.150624973314
+        if dim==3:
+            arg[0,]+=-0.142158862077*x[2]
+            ref[0, 2]=-0.142158862077
+            arg[1,]+=-0.312019564145*x[2]
+            ref[1, 2]=-0.312019564145
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.0445868643181*x[0]+(-0.399276689417)*x[1]
+        ref[0, 0, 0]=-0.0445868643181
+        ref[0, 0, 1]=-0.399276689417
+        arg[0, 1]=0.260878290434*x[0]+(0.509842361569)*x[1]
+        ref[0, 1, 0]=0.260878290434
+        ref[0, 1, 1]=0.509842361569
+        arg[1, 0]=-0.249065145414*x[0]+(0.447636327782)*x[1]
+        ref[1, 0, 0]=-0.249065145414
+        ref[1, 0, 1]=0.447636327782
+        arg[1, 1]=0.0639379191016*x[0]+(-0.486305679624)*x[1]
+        ref[1, 1, 0]=0.0639379191016
+        ref[1, 1, 1]=-0.486305679624
+        arg[2, 0]=0.893482432182*x[0]+(0.334170407032)*x[1]
+        ref[2, 0, 0]=0.893482432182
+        ref[2, 0, 1]=0.334170407032
+        arg[2, 1]=-0.680037544683*x[0]+(-0.181850364655)*x[1]
+        ref[2, 1, 0]=-0.680037544683
+        ref[2, 1, 1]=-0.181850364655
+        if dim==3:
+            arg[0, 0]+=0.224772093199*x[2]
+            ref[0, 0, 2]=0.224772093199
+            arg[0, 1]+=0.801156285784*x[2]
+            ref[0, 1, 2]=0.801156285784
+            arg[1, 0]+=0.831339861917*x[2]
+            ref[1, 0, 2]=0.831339861917
+            arg[1, 1]+=0.806055222568*x[2]
+            ref[1, 1, 2]=0.806055222568
+            arg[2, 0]+=-0.133510305699*x[2]
+            ref[2, 0, 2]=-0.133510305699
+            arg[2, 1]+=0.525084933366*x[2]
+            ref[2, 1, 2]=0.525084933366
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2),w)
+        ref = Data(0,(4, 4, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.0501878607747*x[0]+(-0.288159101827)*x[1]
+        ref[0, 0, 0, 0]=-0.0501878607747
+        ref[0, 0, 0, 1]=-0.288159101827
+        arg[0, 0, 1]=-0.616236885034*x[0]+(-0.0428465270712)*x[1]
+        ref[0, 0, 1, 0]=-0.616236885034
+        ref[0, 0, 1, 1]=-0.0428465270712
+        arg[0, 1, 0]=0.342987756582*x[0]+(-0.876188096504)*x[1]
+        ref[0, 1, 0, 0]=0.342987756582
+        ref[0, 1, 0, 1]=-0.876188096504
+        arg[0, 1, 1]=0.390289441798*x[0]+(0.138198631909)*x[1]
+        ref[0, 1, 1, 0]=0.390289441798
+        ref[0, 1, 1, 1]=0.138198631909
+        arg[0, 2, 0]=0.673258706403*x[0]+(0.0723874862885)*x[1]
+        ref[0, 2, 0, 0]=0.673258706403
+        ref[0, 2, 0, 1]=0.0723874862885
+        arg[0, 2, 1]=0.725739213435*x[0]+(-0.657806756426)*x[1]
+        ref[0, 2, 1, 0]=0.725739213435
+        ref[0, 2, 1, 1]=-0.657806756426
+        arg[0, 3, 0]=-0.123072968527*x[0]+(0.943811316871)*x[1]
+        ref[0, 3, 0, 0]=-0.123072968527
+        ref[0, 3, 0, 1]=0.943811316871
+        arg[0, 3, 1]=0.545033201499*x[0]+(-0.305608488999)*x[1]
+        ref[0, 3, 1, 0]=0.545033201499
+        ref[0, 3, 1, 1]=-0.305608488999
+        arg[1, 0, 0]=-0.453111012372*x[0]+(0.20679838799)*x[1]
+        ref[1, 0, 0, 0]=-0.453111012372
+        ref[1, 0, 0, 1]=0.20679838799
+        arg[1, 0, 1]=-0.455319942231*x[0]+(-0.82279799276)*x[1]
+        ref[1, 0, 1, 0]=-0.455319942231
+        ref[1, 0, 1, 1]=-0.82279799276
+        arg[1, 1, 0]=0.301160695965*x[0]+(0.239179290637)*x[1]
+        ref[1, 1, 0, 0]=0.301160695965
+        ref[1, 1, 0, 1]=0.239179290637
+        arg[1, 1, 1]=-0.152127083879*x[0]+(-0.184281798211)*x[1]
+        ref[1, 1, 1, 0]=-0.152127083879
+        ref[1, 1, 1, 1]=-0.184281798211
+        arg[1, 2, 0]=0.387469473375*x[0]+(-0.0820790332891)*x[1]
+        ref[1, 2, 0, 0]=0.387469473375
+        ref[1, 2, 0, 1]=-0.0820790332891
+        arg[1, 2, 1]=0.483803075378*x[0]+(0.564168402186)*x[1]
+        ref[1, 2, 1, 0]=0.483803075378
+        ref[1, 2, 1, 1]=0.564168402186
+        arg[1, 3, 0]=-0.803647177716*x[0]+(0.784264661865)*x[1]
+        ref[1, 3, 0, 0]=-0.803647177716
+        ref[1, 3, 0, 1]=0.784264661865
+        arg[1, 3, 1]=-0.223350471364*x[0]+(-0.525686833482)*x[1]
+        ref[1, 3, 1, 0]=-0.223350471364
+        ref[1, 3, 1, 1]=-0.525686833482
+        arg[2, 0, 0]=0.209228918125*x[0]+(-0.841144815306)*x[1]
+        ref[2, 0, 0, 0]=0.209228918125
+        ref[2, 0, 0, 1]=-0.841144815306
+        arg[2, 0, 1]=0.344371841353*x[0]+(0.0481456675265)*x[1]
+        ref[2, 0, 1, 0]=0.344371841353
+        ref[2, 0, 1, 1]=0.0481456675265
+        arg[2, 1, 0]=-0.67961294171*x[0]+(-0.938801459589)*x[1]
+        ref[2, 1, 0, 0]=-0.67961294171
+        ref[2, 1, 0, 1]=-0.938801459589
+        arg[2, 1, 1]=0.649471500413*x[0]+(0.590806265002)*x[1]
+        ref[2, 1, 1, 0]=0.649471500413
+        ref[2, 1, 1, 1]=0.590806265002
+        arg[2, 2, 0]=0.155211989613*x[0]+(-0.671440522764)*x[1]
+        ref[2, 2, 0, 0]=0.155211989613
+        ref[2, 2, 0, 1]=-0.671440522764
+        arg[2, 2, 1]=-0.614745860806*x[0]+(-0.193779786641)*x[1]
+        ref[2, 2, 1, 0]=-0.614745860806
+        ref[2, 2, 1, 1]=-0.193779786641
+        arg[2, 3, 0]=0.234038207075*x[0]+(-0.58047600642)*x[1]
+        ref[2, 3, 0, 0]=0.234038207075
+        ref[2, 3, 0, 1]=-0.58047600642
+        arg[2, 3, 1]=-0.0625743007426*x[0]+(0.464137892027)*x[1]
+        ref[2, 3, 1, 0]=-0.0625743007426
+        ref[2, 3, 1, 1]=0.464137892027
+        arg[3, 0, 0]=-0.949264251183*x[0]+(-0.956768457043)*x[1]
+        ref[3, 0, 0, 0]=-0.949264251183
+        ref[3, 0, 0, 1]=-0.956768457043
+        arg[3, 0, 1]=-0.207450666873*x[0]+(0.678065274717)*x[1]
+        ref[3, 0, 1, 0]=-0.207450666873
+        ref[3, 0, 1, 1]=0.678065274717
+        arg[3, 1, 0]=-0.417212754348*x[0]+(-0.842959516354)*x[1]
+        ref[3, 1, 0, 0]=-0.417212754348
+        ref[3, 1, 0, 1]=-0.842959516354
+        arg[3, 1, 1]=0.234977905293*x[0]+(-0.148185957947)*x[1]
+        ref[3, 1, 1, 0]=0.234977905293
+        ref[3, 1, 1, 1]=-0.148185957947
+        arg[3, 2, 0]=0.12852333173*x[0]+(-0.465911062913)*x[1]
+        ref[3, 2, 0, 0]=0.12852333173
+        ref[3, 2, 0, 1]=-0.465911062913
+        arg[3, 2, 1]=0.908880498284*x[0]+(-0.0795819983721)*x[1]
+        ref[3, 2, 1, 0]=0.908880498284
+        ref[3, 2, 1, 1]=-0.0795819983721
+        arg[3, 3, 0]=0.422692350893*x[0]+(-0.691591320221)*x[1]
+        ref[3, 3, 0, 0]=0.422692350893
+        ref[3, 3, 0, 1]=-0.691591320221
+        arg[3, 3, 1]=-0.246101704563*x[0]+(0.707067410053)*x[1]
+        ref[3, 3, 1, 0]=-0.246101704563
+        ref[3, 3, 1, 1]=0.707067410053
+        if dim==3:
+            arg[0, 0, 0]+=0.869710313801*x[2]
+            ref[0, 0, 0, 2]=0.869710313801
+            arg[0, 0, 1]+=0.616134329988*x[2]
+            ref[0, 0, 1, 2]=0.616134329988
+            arg[0, 1, 0]+=0.970595744402*x[2]
+            ref[0, 1, 0, 2]=0.970595744402
+            arg[0, 1, 1]+=0.839982526719*x[2]
+            ref[0, 1, 1, 2]=0.839982526719
+            arg[0, 2, 0]+=-0.364728721056*x[2]
+            ref[0, 2, 0, 2]=-0.364728721056
+            arg[0, 2, 1]+=-0.237052262981*x[2]
+            ref[0, 2, 1, 2]=-0.237052262981
+            arg[0, 3, 0]+=0.102069078262*x[2]
+            ref[0, 3, 0, 2]=0.102069078262
+            arg[0, 3, 1]+=-0.254898371394*x[2]
+            ref[0, 3, 1, 2]=-0.254898371394
+            arg[1, 0, 0]+=0.327374147*x[2]
+            ref[1, 0, 0, 2]=0.327374147
+            arg[1, 0, 1]+=-0.0566241008805*x[2]
+            ref[1, 0, 1, 2]=-0.0566241008805
+            arg[1, 1, 0]+=-0.571094161328*x[2]
+            ref[1, 1, 0, 2]=-0.571094161328
+            arg[1, 1, 1]+=-0.552072378751*x[2]
+            ref[1, 1, 1, 2]=-0.552072378751
+            arg[1, 2, 0]+=0.268802611392*x[2]
+            ref[1, 2, 0, 2]=0.268802611392
+            arg[1, 2, 1]+=0.407906878098*x[2]
+            ref[1, 2, 1, 2]=0.407906878098
+            arg[1, 3, 0]+=-0.814541261622*x[2]
+            ref[1, 3, 0, 2]=-0.814541261622
+            arg[1, 3, 1]+=-0.901311179456*x[2]
+            ref[1, 3, 1, 2]=-0.901311179456
+            arg[2, 0, 0]+=-0.557388656807*x[2]
+            ref[2, 0, 0, 2]=-0.557388656807
+            arg[2, 0, 1]+=-0.221520386143*x[2]
+            ref[2, 0, 1, 2]=-0.221520386143
+            arg[2, 1, 0]+=-0.387719989935*x[2]
+            ref[2, 1, 0, 2]=-0.387719989935
+            arg[2, 1, 1]+=0.620113711225*x[2]
+            ref[2, 1, 1, 2]=0.620113711225
+            arg[2, 2, 0]+=0.0955127189698*x[2]
+            ref[2, 2, 0, 2]=0.0955127189698
+            arg[2, 2, 1]+=-0.000527289884997*x[2]
+            ref[2, 2, 1, 2]=-0.000527289884997
+            arg[2, 3, 0]+=0.572520847582*x[2]
+            ref[2, 3, 0, 2]=0.572520847582
+            arg[2, 3, 1]+=0.647949340296*x[2]
+            ref[2, 3, 1, 2]=0.647949340296
+            arg[3, 0, 0]+=-0.318238966982*x[2]
+            ref[3, 0, 0, 2]=-0.318238966982
+            arg[3, 0, 1]+=0.0568746874518*x[2]
+            ref[3, 0, 1, 2]=0.0568746874518
+            arg[3, 1, 0]+=-0.135318485473*x[2]
+            ref[3, 1, 0, 2]=-0.135318485473
+            arg[3, 1, 1]+=0.0748012339475*x[2]
+            ref[3, 1, 1, 2]=0.0748012339475
+            arg[3, 2, 0]+=0.105999499896*x[2]
+            ref[3, 2, 0, 2]=0.105999499896
+            arg[3, 2, 1]+=0.168949360203*x[2]
+            ref[3, 2, 1, 2]=0.168949360203
+            arg[3, 3, 0]+=-0.541327561748*x[2]
+            ref[3, 3, 0, 2]=-0.541327561748
+            arg[3, 3, 1]+=-0.814191452343*x[2]
+            ref[3, 3, 1, 2]=-0.814191452343
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.250764299512*x[0]+(0.85034970528)*x[1]
+        ref[0]=-0.250764299512
+        ref[1]=0.85034970528
+        if dim==3:
+            arg+=(-0.155224207101)*x[2]
+            ref[2]=-0.155224207101
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=0.638543168422*x[0]+(0.474155221924)*x[1]
+        ref[0, 0]=0.638543168422
+        ref[0, 1]=0.474155221924
+        arg[1,]=0.20619270381*x[0]+(0.829762821452)*x[1]
+        ref[1, 0]=0.20619270381
+        ref[1, 1]=0.829762821452
+        arg[2,]=-0.742236621941*x[0]+(-0.28235654298)*x[1]
+        ref[2, 0]=-0.742236621941
+        ref[2, 1]=-0.28235654298
+        if dim==3:
+            arg[0,]+=-0.973313489422*x[2]
+            ref[0, 2]=-0.973313489422
+            arg[1,]+=0.521774459654*x[2]
+            ref[1, 2]=0.521774459654
+            arg[2,]+=0.151652352423*x[2]
+            ref[2, 2]=0.151652352423
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2)+(dim,),w_ref)
+        arg[0, 0]=0.142167389978*x[0]+(-0.729451498488)*x[1]
+        ref[0, 0, 0]=0.142167389978
+        ref[0, 0, 1]=-0.729451498488
+        arg[0, 1]=-0.898624216483*x[0]+(-0.0992056268892)*x[1]
+        ref[0, 1, 0]=-0.898624216483
+        ref[0, 1, 1]=-0.0992056268892
+        arg[1, 0]=0.171033958969*x[0]+(-0.105276871031)*x[1]
+        ref[1, 0, 0]=0.171033958969
+        ref[1, 0, 1]=-0.105276871031
+        arg[1, 1]=0.438313141368*x[0]+(0.349121831196)*x[1]
+        ref[1, 1, 0]=0.438313141368
+        ref[1, 1, 1]=0.349121831196
+        arg[2, 0]=-0.84592578331*x[0]+(-0.717605221617)*x[1]
+        ref[2, 0, 0]=-0.84592578331
+        ref[2, 0, 1]=-0.717605221617
+        arg[2, 1]=-0.28135419947*x[0]+(0.751183189711)*x[1]
+        ref[2, 1, 0]=-0.28135419947
+        ref[2, 1, 1]=0.751183189711
+        if dim==3:
+            arg[0, 0]+=0.647953928455*x[2]
+            ref[0, 0, 2]=0.647953928455
+            arg[0, 1]+=-0.176234810824*x[2]
+            ref[0, 1, 2]=-0.176234810824
+            arg[1, 0]+=0.762099134008*x[2]
+            ref[1, 0, 2]=0.762099134008
+            arg[1, 1]+=-0.710289790823*x[2]
+            ref[1, 1, 2]=-0.710289790823
+            arg[2, 0]+=0.547507292224*x[2]
+            ref[2, 0, 2]=0.547507292224
+            arg[2, 1]+=-0.554055952271*x[2]
+            ref[2, 1, 2]=-0.554055952271
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 4),w)
+        ref = Data(0,(2, 3, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.512558043623*x[0]+(-0.576970470662)*x[1]
+        ref[0, 0, 0, 0]=-0.512558043623
+        ref[0, 0, 0, 1]=-0.576970470662
+        arg[0, 0, 1]=0.608328016578*x[0]+(0.288432196095)*x[1]
+        ref[0, 0, 1, 0]=0.608328016578
+        ref[0, 0, 1, 1]=0.288432196095
+        arg[0, 0, 2]=0.516636084967*x[0]+(-0.602812036841)*x[1]
+        ref[0, 0, 2, 0]=0.516636084967
+        ref[0, 0, 2, 1]=-0.602812036841
+        arg[0, 0, 3]=0.809054367819*x[0]+(-0.285772321874)*x[1]
+        ref[0, 0, 3, 0]=0.809054367819
+        ref[0, 0, 3, 1]=-0.285772321874
+        arg[0, 1, 0]=0.255901822785*x[0]+(-0.205260054039)*x[1]
+        ref[0, 1, 0, 0]=0.255901822785
+        ref[0, 1, 0, 1]=-0.205260054039
+        arg[0, 1, 1]=-0.472043271209*x[0]+(-0.988547050165)*x[1]
+        ref[0, 1, 1, 0]=-0.472043271209
+        ref[0, 1, 1, 1]=-0.988547050165
+        arg[0, 1, 2]=0.843855902755*x[0]+(0.171934493388)*x[1]
+        ref[0, 1, 2, 0]=0.843855902755
+        ref[0, 1, 2, 1]=0.171934493388
+        arg[0, 1, 3]=0.605890170221*x[0]+(-0.226131862685)*x[1]
+        ref[0, 1, 3, 0]=0.605890170221
+        ref[0, 1, 3, 1]=-0.226131862685
+        arg[0, 2, 0]=-0.149494028013*x[0]+(0.34436364019)*x[1]
+        ref[0, 2, 0, 0]=-0.149494028013
+        ref[0, 2, 0, 1]=0.34436364019
+        arg[0, 2, 1]=0.685565464243*x[0]+(-0.165339739286)*x[1]
+        ref[0, 2, 1, 0]=0.685565464243
+        ref[0, 2, 1, 1]=-0.165339739286
+        arg[0, 2, 2]=-0.818816349093*x[0]+(-0.162142400931)*x[1]
+        ref[0, 2, 2, 0]=-0.818816349093
+        ref[0, 2, 2, 1]=-0.162142400931
+        arg[0, 2, 3]=-0.716946896065*x[0]+(-0.68302791467)*x[1]
+        ref[0, 2, 3, 0]=-0.716946896065
+        ref[0, 2, 3, 1]=-0.68302791467
+        arg[1, 0, 0]=0.474298280343*x[0]+(-0.87000842587)*x[1]
+        ref[1, 0, 0, 0]=0.474298280343
+        ref[1, 0, 0, 1]=-0.87000842587
+        arg[1, 0, 1]=0.0182712716756*x[0]+(0.579221143817)*x[1]
+        ref[1, 0, 1, 0]=0.0182712716756
+        ref[1, 0, 1, 1]=0.579221143817
+        arg[1, 0, 2]=0.598858070652*x[0]+(-0.482699031912)*x[1]
+        ref[1, 0, 2, 0]=0.598858070652
+        ref[1, 0, 2, 1]=-0.482699031912
+        arg[1, 0, 3]=-0.0985486333692*x[0]+(-0.467175813793)*x[1]
+        ref[1, 0, 3, 0]=-0.0985486333692
+        ref[1, 0, 3, 1]=-0.467175813793
+        arg[1, 1, 0]=-0.436423435139*x[0]+(-0.364444996694)*x[1]
+        ref[1, 1, 0, 0]=-0.436423435139
+        ref[1, 1, 0, 1]=-0.364444996694
+        arg[1, 1, 1]=0.0623536057651*x[0]+(0.244772532883)*x[1]
+        ref[1, 1, 1, 0]=0.0623536057651
+        ref[1, 1, 1, 1]=0.244772532883
+        arg[1, 1, 2]=-0.375703668493*x[0]+(0.59323631028)*x[1]
+        ref[1, 1, 2, 0]=-0.375703668493
+        ref[1, 1, 2, 1]=0.59323631028
+        arg[1, 1, 3]=0.465852190134*x[0]+(0.0311929033135)*x[1]
+        ref[1, 1, 3, 0]=0.465852190134
+        ref[1, 1, 3, 1]=0.0311929033135
+        arg[1, 2, 0]=-0.0197854136824*x[0]+(0.918797335283)*x[1]
+        ref[1, 2, 0, 0]=-0.0197854136824
+        ref[1, 2, 0, 1]=0.918797335283
+        arg[1, 2, 1]=-0.803084575516*x[0]+(0.268800504267)*x[1]
+        ref[1, 2, 1, 0]=-0.803084575516
+        ref[1, 2, 1, 1]=0.268800504267
+        arg[1, 2, 2]=0.160233963026*x[0]+(-0.175852156647)*x[1]
+        ref[1, 2, 2, 0]=0.160233963026
+        ref[1, 2, 2, 1]=-0.175852156647
+        arg[1, 2, 3]=-0.755909801181*x[0]+(-0.0292667691583)*x[1]
+        ref[1, 2, 3, 0]=-0.755909801181
+        ref[1, 2, 3, 1]=-0.0292667691583
+        if dim==3:
+            arg[0, 0, 0]+=-0.164674539562*x[2]
+            ref[0, 0, 0, 2]=-0.164674539562
+            arg[0, 0, 1]+=0.539385667861*x[2]
+            ref[0, 0, 1, 2]=0.539385667861
+            arg[0, 0, 2]+=0.874169356902*x[2]
+            ref[0, 0, 2, 2]=0.874169356902
+            arg[0, 0, 3]+=0.643349060554*x[2]
+            ref[0, 0, 3, 2]=0.643349060554
+            arg[0, 1, 0]+=0.331105011425*x[2]
+            ref[0, 1, 0, 2]=0.331105011425
+            arg[0, 1, 1]+=-0.592455716333*x[2]
+            ref[0, 1, 1, 2]=-0.592455716333
+            arg[0, 1, 2]+=-0.402971176363*x[2]
+            ref[0, 1, 2, 2]=-0.402971176363
+            arg[0, 1, 3]+=0.663792487584*x[2]
+            ref[0, 1, 3, 2]=0.663792487584
+            arg[0, 2, 0]+=-0.510755120201*x[2]
+            ref[0, 2, 0, 2]=-0.510755120201
+            arg[0, 2, 1]+=0.898993819975*x[2]
+            ref[0, 2, 1, 2]=0.898993819975
+            arg[0, 2, 2]+=-0.535245896925*x[2]
+            ref[0, 2, 2, 2]=-0.535245896925
+            arg[0, 2, 3]+=0.943279354934*x[2]
+            ref[0, 2, 3, 2]=0.943279354934
+            arg[1, 0, 0]+=-0.0808061573835*x[2]
+            ref[1, 0, 0, 2]=-0.0808061573835
+            arg[1, 0, 1]+=-0.63123485648*x[2]
+            ref[1, 0, 1, 2]=-0.63123485648
+            arg[1, 0, 2]+=0.0497888108096*x[2]
+            ref[1, 0, 2, 2]=0.0497888108096
+            arg[1, 0, 3]+=0.696556162749*x[2]
+            ref[1, 0, 3, 2]=0.696556162749
+            arg[1, 1, 0]+=-0.895692937345*x[2]
+            ref[1, 1, 0, 2]=-0.895692937345
+            arg[1, 1, 1]+=-0.952418963139*x[2]
+            ref[1, 1, 1, 2]=-0.952418963139
+            arg[1, 1, 2]+=0.393619183192*x[2]
+            ref[1, 1, 2, 2]=0.393619183192
+            arg[1, 1, 3]+=0.14420105697*x[2]
+            ref[1, 1, 3, 2]=0.14420105697
+            arg[1, 2, 0]+=-0.210080734061*x[2]
+            ref[1, 2, 0, 2]=-0.210080734061
+            arg[1, 2, 1]+=-0.930709582275*x[2]
+            ref[1, 2, 1, 2]=-0.930709582275
+            arg[1, 2, 2]+=0.78255967733*x[2]
+            ref[1, 2, 2, 2]=0.78255967733
+            arg[1, 2, 3]+=0.704160455481*x[2]
+            ref[1, 2, 3, 2]=0.704160455481
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.985524151364*x[0]**o+(-0.910880422828)*x[0]+(0.591035718598)*x[1]**o+(0.551197826442)*x[1]
+        ref[0]=0.985524151364*o*x_ref[0]**(o-1)+(-0.910880422828)
+        ref[1]=0.591035718598*o*x_ref[1]**(o-1)+(0.551197826442)
+        if dim==3:
+            arg+=(0.393960762915)*x[2]**o+(-0.907017238823)*x[2]
+            ref[2]=0.393960762915*o*x_ref[2]**(o-1)+(-0.907017238823)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=-0.885837522179*x[0]**o+(-0.221138519762)*x[0]+(-0.635855223577)*x[1]**o+(0.852455074186)*x[1]
+        ref[0, 0]=-0.885837522179*o*x_ref[0]**(o-1)+(-0.221138519762)
+        ref[0, 1]=-0.635855223577*o*x_ref[1]**(o-1)+(0.852455074186)
+        arg[1,]=0.0214132480024*x[0]**o+(0.753703918294)*x[0]+(-0.721196629207)*x[1]**o+(-0.199424050635)*x[1]
+        ref[1, 0]=0.0214132480024*o*x_ref[0]**(o-1)+(0.753703918294)
+        ref[1, 1]=-0.721196629207*o*x_ref[1]**(o-1)+(-0.199424050635)
+        arg[2,]=-0.0307547597093*x[0]**o+(-0.189411652205)*x[0]+(0.295622871464)*x[1]**o+(0.744252896525)*x[1]
+        ref[2, 0]=-0.0307547597093*o*x_ref[0]**(o-1)+(-0.189411652205)
+        ref[2, 1]=0.295622871464*o*x_ref[1]**(o-1)+(0.744252896525)
+        if dim==3:
+            arg[0,]+=-0.074521105554*x[2]**o+(-0.90756877274)*x[2]
+            ref[0, 2]=-0.074521105554*o*x_ref[2]**(o-1)+(-0.90756877274)
+            arg[1,]+=0.855357888303*x[2]**o+(-0.39722461872)*x[2]
+            ref[1, 2]=0.855357888303*o*x_ref[2]**(o-1)+(-0.39722461872)
+            arg[2,]+=-0.849571157787*x[2]**o+(0.220774899538)*x[2]
+            ref[2, 2]=-0.849571157787*o*x_ref[2]**(o-1)+(0.220774899538)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=-0.847539077502*x[0]**o+(-0.294201834342)*x[0]+(-0.0339547126233)*x[1]**o+(0.669410053069)*x[1]
+        ref[0, 0, 0]=-0.847539077502*o*x_ref[0]**(o-1)+(-0.294201834342)
+        ref[0, 0, 1]=-0.0339547126233*o*x_ref[1]**(o-1)+(0.669410053069)
+        arg[0, 1]=-0.669654806587*x[0]**o+(0.69211558426)*x[0]+(-0.802471746491)*x[1]**o+(0.8220868081)*x[1]
+        ref[0, 1, 0]=-0.669654806587*o*x_ref[0]**(o-1)+(0.69211558426)
+        ref[0, 1, 1]=-0.802471746491*o*x_ref[1]**(o-1)+(0.8220868081)
+        arg[0, 2]=0.656852986904*x[0]**o+(-0.288525838439)*x[0]+(0.962943958087)*x[1]**o+(0.798377683482)*x[1]
+        ref[0, 2, 0]=0.656852986904*o*x_ref[0]**(o-1)+(-0.288525838439)
+        ref[0, 2, 1]=0.962943958087*o*x_ref[1]**(o-1)+(0.798377683482)
+        arg[0, 3]=0.546747830082*x[0]**o+(0.403301964299)*x[0]+(0.321952120584)*x[1]**o+(-0.0612286046921)*x[1]
+        ref[0, 3, 0]=0.546747830082*o*x_ref[0]**(o-1)+(0.403301964299)
+        ref[0, 3, 1]=0.321952120584*o*x_ref[1]**(o-1)+(-0.0612286046921)
+        arg[1, 0]=-0.810664503171*x[0]**o+(-0.379375031733)*x[0]+(0.613545399137)*x[1]**o+(0.129452529835)*x[1]
+        ref[1, 0, 0]=-0.810664503171*o*x_ref[0]**(o-1)+(-0.379375031733)
+        ref[1, 0, 1]=0.613545399137*o*x_ref[1]**(o-1)+(0.129452529835)
+        arg[1, 1]=-0.941781261712*x[0]**o+(0.490060201775)*x[0]+(0.525762166218)*x[1]**o+(-0.76340806954)*x[1]
+        ref[1, 1, 0]=-0.941781261712*o*x_ref[0]**(o-1)+(0.490060201775)
+        ref[1, 1, 1]=0.525762166218*o*x_ref[1]**(o-1)+(-0.76340806954)
+        arg[1, 2]=0.885668442638*x[0]**o+(0.538835456424)*x[0]+(0.868707904959)*x[1]**o+(0.344741298271)*x[1]
+        ref[1, 2, 0]=0.885668442638*o*x_ref[0]**(o-1)+(0.538835456424)
+        ref[1, 2, 1]=0.868707904959*o*x_ref[1]**(o-1)+(0.344741298271)
+        arg[1, 3]=0.717303692305*x[0]**o+(-0.263386856645)*x[0]+(0.760279324081)*x[1]**o+(0.848639766409)*x[1]
+        ref[1, 3, 0]=0.717303692305*o*x_ref[0]**(o-1)+(-0.263386856645)
+        ref[1, 3, 1]=0.760279324081*o*x_ref[1]**(o-1)+(0.848639766409)
+        arg[2, 0]=0.717459324668*x[0]**o+(0.797302664562)*x[0]+(0.345688353459)*x[1]**o+(0.831483725596)*x[1]
+        ref[2, 0, 0]=0.717459324668*o*x_ref[0]**(o-1)+(0.797302664562)
+        ref[2, 0, 1]=0.345688353459*o*x_ref[1]**(o-1)+(0.831483725596)
+        arg[2, 1]=-0.885213019657*x[0]**o+(-0.624467387517)*x[0]+(0.787867324735)*x[1]**o+(0.61362226224)*x[1]
+        ref[2, 1, 0]=-0.885213019657*o*x_ref[0]**(o-1)+(-0.624467387517)
+        ref[2, 1, 1]=0.787867324735*o*x_ref[1]**(o-1)+(0.61362226224)
+        arg[2, 2]=0.47559514998*x[0]**o+(0.0367251494486)*x[0]+(-0.478834444486)*x[1]**o+(0.191749677668)*x[1]
+        ref[2, 2, 0]=0.47559514998*o*x_ref[0]**(o-1)+(0.0367251494486)
+        ref[2, 2, 1]=-0.478834444486*o*x_ref[1]**(o-1)+(0.191749677668)
+        arg[2, 3]=0.640667935674*x[0]**o+(-0.256408050852)*x[0]+(-0.124712993229)*x[1]**o+(0.532332331022)*x[1]
+        ref[2, 3, 0]=0.640667935674*o*x_ref[0]**(o-1)+(-0.256408050852)
+        ref[2, 3, 1]=-0.124712993229*o*x_ref[1]**(o-1)+(0.532332331022)
+        arg[3, 0]=-0.51733402399*x[0]**o+(-0.744579046402)*x[0]+(0.503716218115)*x[1]**o+(-0.228061469873)*x[1]
+        ref[3, 0, 0]=-0.51733402399*o*x_ref[0]**(o-1)+(-0.744579046402)
+        ref[3, 0, 1]=0.503716218115*o*x_ref[1]**(o-1)+(-0.228061469873)
+        arg[3, 1]=-0.0846184845252*x[0]**o+(0.649965039249)*x[0]+(-0.335315481287)*x[1]**o+(0.850665498163)*x[1]
+        ref[3, 1, 0]=-0.0846184845252*o*x_ref[0]**(o-1)+(0.649965039249)
+        ref[3, 1, 1]=-0.335315481287*o*x_ref[1]**(o-1)+(0.850665498163)
+        arg[3, 2]=-0.480844506341*x[0]**o+(-0.421571593174)*x[0]+(0.0311547159534)*x[1]**o+(-0.525547688399)*x[1]
+        ref[3, 2, 0]=-0.480844506341*o*x_ref[0]**(o-1)+(-0.421571593174)
+        ref[3, 2, 1]=0.0311547159534*o*x_ref[1]**(o-1)+(-0.525547688399)
+        arg[3, 3]=0.391394685468*x[0]**o+(-0.698857073173)*x[0]+(0.898261206202)*x[1]**o+(-0.339728368099)*x[1]
+        ref[3, 3, 0]=0.391394685468*o*x_ref[0]**(o-1)+(-0.698857073173)
+        ref[3, 3, 1]=0.898261206202*o*x_ref[1]**(o-1)+(-0.339728368099)
+        if dim==3:
+            arg[0, 0]+=-0.785739516287*x[2]**o+(-0.657023439784)*x[2]
+            ref[0, 0, 2]=-0.785739516287*o*x_ref[2]**(o-1)+(-0.657023439784)
+            arg[0, 1]+=-0.796323985317*x[2]**o+(0.264383845497)*x[2]
+            ref[0, 1, 2]=-0.796323985317*o*x_ref[2]**(o-1)+(0.264383845497)
+            arg[0, 2]+=0.93526416368*x[2]**o+(-0.750851590354)*x[2]
+            ref[0, 2, 2]=0.93526416368*o*x_ref[2]**(o-1)+(-0.750851590354)
+            arg[0, 3]+=-0.298463723493*x[2]**o+(0.856087357129)*x[2]
+            ref[0, 3, 2]=-0.298463723493*o*x_ref[2]**(o-1)+(0.856087357129)
+            arg[1, 0]+=-0.176290510767*x[2]**o+(0.399408057223)*x[2]
+            ref[1, 0, 2]=-0.176290510767*o*x_ref[2]**(o-1)+(0.399408057223)
+            arg[1, 1]+=-0.00205004059108*x[2]**o+(0.977040818236)*x[2]
+            ref[1, 1, 2]=-0.00205004059108*o*x_ref[2]**(o-1)+(0.977040818236)
+            arg[1, 2]+=0.661045818441*x[2]**o+(-0.647979700298)*x[2]
+            ref[1, 2, 2]=0.661045818441*o*x_ref[2]**(o-1)+(-0.647979700298)
+            arg[1, 3]+=0.668164696682*x[2]**o+(0.953020467915)*x[2]
+            ref[1, 3, 2]=0.668164696682*o*x_ref[2]**(o-1)+(0.953020467915)
+            arg[2, 0]+=0.391206986782*x[2]**o+(0.349684279334)*x[2]
+            ref[2, 0, 2]=0.391206986782*o*x_ref[2]**(o-1)+(0.349684279334)
+            arg[2, 1]+=-0.615505774986*x[2]**o+(-0.695714590782)*x[2]
+            ref[2, 1, 2]=-0.615505774986*o*x_ref[2]**(o-1)+(-0.695714590782)
+            arg[2, 2]+=0.258455328448*x[2]**o+(0.935810303733)*x[2]
+            ref[2, 2, 2]=0.258455328448*o*x_ref[2]**(o-1)+(0.935810303733)
+            arg[2, 3]+=0.820442632259*x[2]**o+(-0.206371527924)*x[2]
+            ref[2, 3, 2]=0.820442632259*o*x_ref[2]**(o-1)+(-0.206371527924)
+            arg[3, 0]+=0.0977236069357*x[2]**o+(-0.000614689807843)*x[2]
+            ref[3, 0, 2]=0.0977236069357*o*x_ref[2]**(o-1)+(-0.000614689807843)
+            arg[3, 1]+=0.575937258484*x[2]**o+(-0.645896303429)*x[2]
+            ref[3, 1, 2]=0.575937258484*o*x_ref[2]**(o-1)+(-0.645896303429)
+            arg[3, 2]+=0.756504032918*x[2]**o+(0.275018384091)*x[2]
+            ref[3, 2, 2]=0.756504032918*o*x_ref[2]**(o-1)+(0.275018384091)
+            arg[3, 3]+=-0.510622547983*x[2]**o+(0.317876722462)*x[2]
+            ref[3, 3, 2]=-0.510622547983*o*x_ref[2]**(o-1)+(0.317876722462)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=0.0615870290968*x[0]**o+(-0.860027386722)*x[0]+(0.992841266121)*x[1]**o+(0.11641677137)*x[1]
+        ref[0, 0, 0, 0]=0.0615870290968*o*x_ref[0]**(o-1)+(-0.860027386722)
+        ref[0, 0, 0, 1]=0.992841266121*o*x_ref[1]**(o-1)+(0.11641677137)
+        arg[0, 0, 1]=-0.590212488117*x[0]**o+(-0.602474633115)*x[0]+(0.846194527071)*x[1]**o+(-0.482402107557)*x[1]
+        ref[0, 0, 1, 0]=-0.590212488117*o*x_ref[0]**(o-1)+(-0.602474633115)
+        ref[0, 0, 1, 1]=0.846194527071*o*x_ref[1]**(o-1)+(-0.482402107557)
+        arg[0, 1, 0]=-0.346048771767*x[0]**o+(0.216229096014)*x[0]+(0.0101893829331)*x[1]**o+(0.913942241481)*x[1]
+        ref[0, 1, 0, 0]=-0.346048771767*o*x_ref[0]**(o-1)+(0.216229096014)
+        ref[0, 1, 0, 1]=0.0101893829331*o*x_ref[1]**(o-1)+(0.913942241481)
+        arg[0, 1, 1]=-0.690151919971*x[0]**o+(-0.124143917795)*x[0]+(-0.346793827704)*x[1]**o+(-0.0233664525131)*x[1]
+        ref[0, 1, 1, 0]=-0.690151919971*o*x_ref[0]**(o-1)+(-0.124143917795)
+        ref[0, 1, 1, 1]=-0.346793827704*o*x_ref[1]**(o-1)+(-0.0233664525131)
+        arg[0, 2, 0]=-0.815910924013*x[0]**o+(0.282061835174)*x[0]+(-0.730355280664)*x[1]**o+(-0.526245702062)*x[1]
+        ref[0, 2, 0, 0]=-0.815910924013*o*x_ref[0]**(o-1)+(0.282061835174)
+        ref[0, 2, 0, 1]=-0.730355280664*o*x_ref[1]**(o-1)+(-0.526245702062)
+        arg[0, 2, 1]=0.772751920459*x[0]**o+(-0.863601351204)*x[0]+(0.827668649135)*x[1]**o+(0.0283954096873)*x[1]
+        ref[0, 2, 1, 0]=0.772751920459*o*x_ref[0]**(o-1)+(-0.863601351204)
+        ref[0, 2, 1, 1]=0.827668649135*o*x_ref[1]**(o-1)+(0.0283954096873)
+        arg[1, 0, 0]=-0.449524641343*x[0]**o+(0.836683199028)*x[0]+(0.235918685141)*x[1]**o+(0.365381291717)*x[1]
+        ref[1, 0, 0, 0]=-0.449524641343*o*x_ref[0]**(o-1)+(0.836683199028)
+        ref[1, 0, 0, 1]=0.235918685141*o*x_ref[1]**(o-1)+(0.365381291717)
+        arg[1, 0, 1]=-0.109773400953*x[0]**o+(-0.118411048716)*x[0]+(0.482879702068)*x[1]**o+(-0.200742352953)*x[1]
+        ref[1, 0, 1, 0]=-0.109773400953*o*x_ref[0]**(o-1)+(-0.118411048716)
+        ref[1, 0, 1, 1]=0.482879702068*o*x_ref[1]**(o-1)+(-0.200742352953)
+        arg[1, 1, 0]=0.230552353434*x[0]**o+(0.229953526742)*x[0]+(-0.656243810617)*x[1]**o+(0.13793037696)*x[1]
+        ref[1, 1, 0, 0]=0.230552353434*o*x_ref[0]**(o-1)+(0.229953526742)
+        ref[1, 1, 0, 1]=-0.656243810617*o*x_ref[1]**(o-1)+(0.13793037696)
+        arg[1, 1, 1]=-0.360892070405*x[0]**o+(0.632982090135)*x[0]+(0.108609991356)*x[1]**o+(-0.839253986189)*x[1]
+        ref[1, 1, 1, 0]=-0.360892070405*o*x_ref[0]**(o-1)+(0.632982090135)
+        ref[1, 1, 1, 1]=0.108609991356*o*x_ref[1]**(o-1)+(-0.839253986189)
+        arg[1, 2, 0]=-0.331997956147*x[0]**o+(0.709568095917)*x[0]+(0.228673278005)*x[1]**o+(-0.527200680489)*x[1]
+        ref[1, 2, 0, 0]=-0.331997956147*o*x_ref[0]**(o-1)+(0.709568095917)
+        ref[1, 2, 0, 1]=0.228673278005*o*x_ref[1]**(o-1)+(-0.527200680489)
+        arg[1, 2, 1]=0.819116170682*x[0]**o+(0.544842952716)*x[0]+(0.145007293122)*x[1]**o+(-0.876380578186)*x[1]
+        ref[1, 2, 1, 0]=0.819116170682*o*x_ref[0]**(o-1)+(0.544842952716)
+        ref[1, 2, 1, 1]=0.145007293122*o*x_ref[1]**(o-1)+(-0.876380578186)
+        arg[2, 0, 0]=-0.0804019856712*x[0]**o+(-0.152491087926)*x[0]+(0.658886187996)*x[1]**o+(0.160162961897)*x[1]
+        ref[2, 0, 0, 0]=-0.0804019856712*o*x_ref[0]**(o-1)+(-0.152491087926)
+        ref[2, 0, 0, 1]=0.658886187996*o*x_ref[1]**(o-1)+(0.160162961897)
+        arg[2, 0, 1]=-0.823512922046*x[0]**o+(0.164929143551)*x[0]+(0.277298010505)*x[1]**o+(0.371727123322)*x[1]
+        ref[2, 0, 1, 0]=-0.823512922046*o*x_ref[0]**(o-1)+(0.164929143551)
+        ref[2, 0, 1, 1]=0.277298010505*o*x_ref[1]**(o-1)+(0.371727123322)
+        arg[2, 1, 0]=0.329336021694*x[0]**o+(0.124266053622)*x[0]+(0.707517170283)*x[1]**o+(0.883660215554)*x[1]
+        ref[2, 1, 0, 0]=0.329336021694*o*x_ref[0]**(o-1)+(0.124266053622)
+        ref[2, 1, 0, 1]=0.707517170283*o*x_ref[1]**(o-1)+(0.883660215554)
+        arg[2, 1, 1]=0.410240347972*x[0]**o+(0.427585475002)*x[0]+(0.0320841105487)*x[1]**o+(-0.20355395441)*x[1]
+        ref[2, 1, 1, 0]=0.410240347972*o*x_ref[0]**(o-1)+(0.427585475002)
+        ref[2, 1, 1, 1]=0.0320841105487*o*x_ref[1]**(o-1)+(-0.20355395441)
+        arg[2, 2, 0]=-0.285686701049*x[0]**o+(0.473538988552)*x[0]+(0.682786827396)*x[1]**o+(0.405749177468)*x[1]
+        ref[2, 2, 0, 0]=-0.285686701049*o*x_ref[0]**(o-1)+(0.473538988552)
+        ref[2, 2, 0, 1]=0.682786827396*o*x_ref[1]**(o-1)+(0.405749177468)
+        arg[2, 2, 1]=0.179363316849*x[0]**o+(-0.0550885103999)*x[0]+(-0.974123340281)*x[1]**o+(-0.974695368573)*x[1]
+        ref[2, 2, 1, 0]=0.179363316849*o*x_ref[0]**(o-1)+(-0.0550885103999)
+        ref[2, 2, 1, 1]=-0.974123340281*o*x_ref[1]**(o-1)+(-0.974695368573)
+        arg[3, 0, 0]=-0.991901383266*x[0]**o+(0.17700381199)*x[0]+(-0.427700183441)*x[1]**o+(-0.101629470728)*x[1]
+        ref[3, 0, 0, 0]=-0.991901383266*o*x_ref[0]**(o-1)+(0.17700381199)
+        ref[3, 0, 0, 1]=-0.427700183441*o*x_ref[1]**(o-1)+(-0.101629470728)
+        arg[3, 0, 1]=0.99924712422*x[0]**o+(0.123144934013)*x[0]+(0.874178971986)*x[1]**o+(0.231027694334)*x[1]
+        ref[3, 0, 1, 0]=0.99924712422*o*x_ref[0]**(o-1)+(0.123144934013)
+        ref[3, 0, 1, 1]=0.874178971986*o*x_ref[1]**(o-1)+(0.231027694334)
+        arg[3, 1, 0]=0.371046484415*x[0]**o+(0.273282595402)*x[0]+(0.436748918533)*x[1]**o+(0.130607801825)*x[1]
+        ref[3, 1, 0, 0]=0.371046484415*o*x_ref[0]**(o-1)+(0.273282595402)
+        ref[3, 1, 0, 1]=0.436748918533*o*x_ref[1]**(o-1)+(0.130607801825)
+        arg[3, 1, 1]=-0.25079791719*x[0]**o+(-0.709568266845)*x[0]+(-0.0365208032298)*x[1]**o+(-0.170942436012)*x[1]
+        ref[3, 1, 1, 0]=-0.25079791719*o*x_ref[0]**(o-1)+(-0.709568266845)
+        ref[3, 1, 1, 1]=-0.0365208032298*o*x_ref[1]**(o-1)+(-0.170942436012)
+        arg[3, 2, 0]=0.892260523929*x[0]**o+(0.594870221998)*x[0]+(-0.0789888177886)*x[1]**o+(0.13257977995)*x[1]
+        ref[3, 2, 0, 0]=0.892260523929*o*x_ref[0]**(o-1)+(0.594870221998)
+        ref[3, 2, 0, 1]=-0.0789888177886*o*x_ref[1]**(o-1)+(0.13257977995)
+        arg[3, 2, 1]=0.380346317146*x[0]**o+(0.939676704417)*x[0]+(0.485932139424)*x[1]**o+(0.103969624809)*x[1]
+        ref[3, 2, 1, 0]=0.380346317146*o*x_ref[0]**(o-1)+(0.939676704417)
+        ref[3, 2, 1, 1]=0.485932139424*o*x_ref[1]**(o-1)+(0.103969624809)
+        if dim==3:
+            arg[0, 0, 0]+=-0.856926111139*x[2]**o+(-0.760179154437)*x[2]
+            ref[0, 0, 0, 2]=-0.856926111139*o*x_ref[2]**(o-1)+(-0.760179154437)
+            arg[0, 0, 1]+=-0.249164283904*x[2]**o+(-0.251055266266)*x[2]
+            ref[0, 0, 1, 2]=-0.249164283904*o*x_ref[2]**(o-1)+(-0.251055266266)
+            arg[0, 1, 0]+=0.0507937453857*x[2]**o+(-0.815275665273)*x[2]
+            ref[0, 1, 0, 2]=0.0507937453857*o*x_ref[2]**(o-1)+(-0.815275665273)
+            arg[0, 1, 1]+=-0.797815354001*x[2]**o+(-0.565240064485)*x[2]
+            ref[0, 1, 1, 2]=-0.797815354001*o*x_ref[2]**(o-1)+(-0.565240064485)
+            arg[0, 2, 0]+=0.5851330887*x[2]**o+(-0.617160018128)*x[2]
+            ref[0, 2, 0, 2]=0.5851330887*o*x_ref[2]**(o-1)+(-0.617160018128)
+            arg[0, 2, 1]+=0.318841414037*x[2]**o+(-0.849444732373)*x[2]
+            ref[0, 2, 1, 2]=0.318841414037*o*x_ref[2]**(o-1)+(-0.849444732373)
+            arg[1, 0, 0]+=0.0170176299709*x[2]**o+(0.131372913533)*x[2]
+            ref[1, 0, 0, 2]=0.0170176299709*o*x_ref[2]**(o-1)+(0.131372913533)
+            arg[1, 0, 1]+=-0.924024948664*x[2]**o+(-0.587691263515)*x[2]
+            ref[1, 0, 1, 2]=-0.924024948664*o*x_ref[2]**(o-1)+(-0.587691263515)
+            arg[1, 1, 0]+=-0.620820620807*x[2]**o+(0.703503505129)*x[2]
+            ref[1, 1, 0, 2]=-0.620820620807*o*x_ref[2]**(o-1)+(0.703503505129)
+            arg[1, 1, 1]+=-0.782501853078*x[2]**o+(0.293636474274)*x[2]
+            ref[1, 1, 1, 2]=-0.782501853078*o*x_ref[2]**(o-1)+(0.293636474274)
+            arg[1, 2, 0]+=-0.735749308784*x[2]**o+(-0.00875195585518)*x[2]
+            ref[1, 2, 0, 2]=-0.735749308784*o*x_ref[2]**(o-1)+(-0.00875195585518)
+            arg[1, 2, 1]+=-0.0284767969508*x[2]**o+(0.582967944566)*x[2]
+            ref[1, 2, 1, 2]=-0.0284767969508*o*x_ref[2]**(o-1)+(0.582967944566)
+            arg[2, 0, 0]+=0.496208060664*x[2]**o+(0.686137011105)*x[2]
+            ref[2, 0, 0, 2]=0.496208060664*o*x_ref[2]**(o-1)+(0.686137011105)
+            arg[2, 0, 1]+=-0.809149230212*x[2]**o+(0.799598227879)*x[2]
+            ref[2, 0, 1, 2]=-0.809149230212*o*x_ref[2]**(o-1)+(0.799598227879)
+            arg[2, 1, 0]+=-0.201967923788*x[2]**o+(-0.438930655563)*x[2]
+            ref[2, 1, 0, 2]=-0.201967923788*o*x_ref[2]**(o-1)+(-0.438930655563)
+            arg[2, 1, 1]+=-0.0590065189613*x[2]**o+(0.791767980268)*x[2]
+            ref[2, 1, 1, 2]=-0.0590065189613*o*x_ref[2]**(o-1)+(0.791767980268)
+            arg[2, 2, 0]+=-0.945962609856*x[2]**o+(0.650685240357)*x[2]
+            ref[2, 2, 0, 2]=-0.945962609856*o*x_ref[2]**(o-1)+(0.650685240357)
+            arg[2, 2, 1]+=-0.6878877311*x[2]**o+(0.575842210937)*x[2]
+            ref[2, 2, 1, 2]=-0.6878877311*o*x_ref[2]**(o-1)+(0.575842210937)
+            arg[3, 0, 0]+=-0.472069454236*x[2]**o+(-0.742030760406)*x[2]
+            ref[3, 0, 0, 2]=-0.472069454236*o*x_ref[2]**(o-1)+(-0.742030760406)
+            arg[3, 0, 1]+=-0.336805350933*x[2]**o+(0.941756020176)*x[2]
+            ref[3, 0, 1, 2]=-0.336805350933*o*x_ref[2]**(o-1)+(0.941756020176)
+            arg[3, 1, 0]+=0.273002009*x[2]**o+(-0.550253685344)*x[2]
+            ref[3, 1, 0, 2]=0.273002009*o*x_ref[2]**(o-1)+(-0.550253685344)
+            arg[3, 1, 1]+=-0.313093356971*x[2]**o+(0.507254520719)*x[2]
+            ref[3, 1, 1, 2]=-0.313093356971*o*x_ref[2]**(o-1)+(0.507254520719)
+            arg[3, 2, 0]+=-0.309201654526*x[2]**o+(0.0361464415428)*x[2]
+            ref[3, 2, 0, 2]=-0.309201654526*o*x_ref[2]**(o-1)+(0.0361464415428)
+            arg[3, 2, 1]+=0.217397577314*x[2]**o+(-0.613072327755)*x[2]
+            ref[3, 2, 1, 2]=0.217397577314*o*x_ref[2]**(o-1)+(-0.613072327755)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.324366248632*x[0]**o+(0.0253708919618)*x[0]+(0.973094194363)*x[1]**o+(0.902747728354)*x[1]
+        ref[0]=-0.324366248632*o*x_ref[0]**(o-1)+(0.0253708919618)
+        ref[1]=0.973094194363*o*x_ref[1]**(o-1)+(0.902747728354)
+        if dim==3:
+            arg+=(-0.308995036966)*x[2]**o+(0.474567601009)*x[2]
+            ref[2]=-0.308995036966*o*x_ref[2]**(o-1)+(0.474567601009)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.378810422625*x[0]**o+(-0.7998270606)*x[0]+(-0.279378893963)*x[1]**o+(-0.296986077352)*x[1]
+        ref[0, 0]=-0.378810422625*o*x_ref[0]**(o-1)+(-0.7998270606)
+        ref[0, 1]=-0.279378893963*o*x_ref[1]**(o-1)+(-0.296986077352)
+        arg[1,]=0.65670616057*x[0]**o+(-0.857374768439)*x[0]+(-0.445050190712)*x[1]**o+(0.568489995876)*x[1]
+        ref[1, 0]=0.65670616057*o*x_ref[0]**(o-1)+(-0.857374768439)
+        ref[1, 1]=-0.445050190712*o*x_ref[1]**(o-1)+(0.568489995876)
+        if dim==3:
+            arg[0,]+=0.872106665341*x[2]**o+(0.976400896377)*x[2]
+            ref[0, 2]=0.872106665341*o*x_ref[2]**(o-1)+(0.976400896377)
+            arg[1,]+=0.0441070158093*x[2]**o+(-0.522460578573)*x[2]
+            ref[1, 2]=0.0441070158093*o*x_ref[2]**(o-1)+(-0.522460578573)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=-0.148434052559*x[0]**o+(0.0144321472695)*x[0]+(-0.410529577285)*x[1]**o+(0.714279655124)*x[1]
+        ref[0, 0, 0]=-0.148434052559*o*x_ref[0]**(o-1)+(0.0144321472695)
+        ref[0, 0, 1]=-0.410529577285*o*x_ref[1]**(o-1)+(0.714279655124)
+        arg[0, 1]=0.362340849418*x[0]**o+(0.885291743209)*x[0]+(-0.937200364699)*x[1]**o+(0.811470607533)*x[1]
+        ref[0, 1, 0]=0.362340849418*o*x_ref[0]**(o-1)+(0.885291743209)
+        ref[0, 1, 1]=-0.937200364699*o*x_ref[1]**(o-1)+(0.811470607533)
+        arg[0, 2]=0.560144103708*x[0]**o+(-0.298773836477)*x[0]+(-0.0858035667176)*x[1]**o+(-0.644026138942)*x[1]
+        ref[0, 2, 0]=0.560144103708*o*x_ref[0]**(o-1)+(-0.298773836477)
+        ref[0, 2, 1]=-0.0858035667176*o*x_ref[1]**(o-1)+(-0.644026138942)
+        arg[1, 0]=0.833972485375*x[0]**o+(0.501472659105)*x[0]+(0.0544376053665)*x[1]**o+(0.000522589686802)*x[1]
+        ref[1, 0, 0]=0.833972485375*o*x_ref[0]**(o-1)+(0.501472659105)
+        ref[1, 0, 1]=0.0544376053665*o*x_ref[1]**(o-1)+(0.000522589686802)
+        arg[1, 1]=0.784646179115*x[0]**o+(-0.746503348472)*x[0]+(0.0527157618057)*x[1]**o+(0.274203916524)*x[1]
+        ref[1, 1, 0]=0.784646179115*o*x_ref[0]**(o-1)+(-0.746503348472)
+        ref[1, 1, 1]=0.0527157618057*o*x_ref[1]**(o-1)+(0.274203916524)
+        arg[1, 2]=0.885764223155*x[0]**o+(-0.60706108669)*x[0]+(0.0407365352608)*x[1]**o+(-0.421220013291)*x[1]
+        ref[1, 2, 0]=0.885764223155*o*x_ref[0]**(o-1)+(-0.60706108669)
+        ref[1, 2, 1]=0.0407365352608*o*x_ref[1]**(o-1)+(-0.421220013291)
+        arg[2, 0]=0.379821929612*x[0]**o+(-0.746127913283)*x[0]+(-0.150718886595)*x[1]**o+(-0.17548750728)*x[1]
+        ref[2, 0, 0]=0.379821929612*o*x_ref[0]**(o-1)+(-0.746127913283)
+        ref[2, 0, 1]=-0.150718886595*o*x_ref[1]**(o-1)+(-0.17548750728)
+        arg[2, 1]=0.498328958071*x[0]**o+(-0.23720479146)*x[0]+(0.46281028547)*x[1]**o+(-0.924652530726)*x[1]
+        ref[2, 1, 0]=0.498328958071*o*x_ref[0]**(o-1)+(-0.23720479146)
+        ref[2, 1, 1]=0.46281028547*o*x_ref[1]**(o-1)+(-0.924652530726)
+        arg[2, 2]=-0.297676100558*x[0]**o+(0.227443500899)*x[0]+(0.325168683816)*x[1]**o+(0.578211673102)*x[1]
+        ref[2, 2, 0]=-0.297676100558*o*x_ref[0]**(o-1)+(0.227443500899)
+        ref[2, 2, 1]=0.325168683816*o*x_ref[1]**(o-1)+(0.578211673102)
+        arg[3, 0]=0.539663713198*x[0]**o+(-0.276408974538)*x[0]+(-0.571604418645)*x[1]**o+(0.931706697086)*x[1]
+        ref[3, 0, 0]=0.539663713198*o*x_ref[0]**(o-1)+(-0.276408974538)
+        ref[3, 0, 1]=-0.571604418645*o*x_ref[1]**(o-1)+(0.931706697086)
+        arg[3, 1]=-0.771695695506*x[0]**o+(0.571005948831)*x[0]+(0.659640644363)*x[1]**o+(-0.988509095687)*x[1]
+        ref[3, 1, 0]=-0.771695695506*o*x_ref[0]**(o-1)+(0.571005948831)
+        ref[3, 1, 1]=0.659640644363*o*x_ref[1]**(o-1)+(-0.988509095687)
+        arg[3, 2]=-0.37775222124*x[0]**o+(0.218246333747)*x[0]+(-0.746962103646)*x[1]**o+(-0.451087825051)*x[1]
+        ref[3, 2, 0]=-0.37775222124*o*x_ref[0]**(o-1)+(0.218246333747)
+        ref[3, 2, 1]=-0.746962103646*o*x_ref[1]**(o-1)+(-0.451087825051)
+        if dim==3:
+            arg[0, 0]+=0.799773956264*x[2]**o+(-0.338849298259)*x[2]
+            ref[0, 0, 2]=0.799773956264*o*x_ref[2]**(o-1)+(-0.338849298259)
+            arg[0, 1]+=0.307711343648*x[2]**o+(-0.561996665285)*x[2]
+            ref[0, 1, 2]=0.307711343648*o*x_ref[2]**(o-1)+(-0.561996665285)
+            arg[0, 2]+=-0.934039344517*x[2]**o+(-0.109785367019)*x[2]
+            ref[0, 2, 2]=-0.934039344517*o*x_ref[2]**(o-1)+(-0.109785367019)
+            arg[1, 0]+=-0.457184315737*x[2]**o+(0.246412586479)*x[2]
+            ref[1, 0, 2]=-0.457184315737*o*x_ref[2]**(o-1)+(0.246412586479)
+            arg[1, 1]+=-0.0543293313501*x[2]**o+(0.476834499113)*x[2]
+            ref[1, 1, 2]=-0.0543293313501*o*x_ref[2]**(o-1)+(0.476834499113)
+            arg[1, 2]+=0.945706130882*x[2]**o+(0.233926518783)*x[2]
+            ref[1, 2, 2]=0.945706130882*o*x_ref[2]**(o-1)+(0.233926518783)
+            arg[2, 0]+=0.987084565954*x[2]**o+(-0.0966973858886)*x[2]
+            ref[2, 0, 2]=0.987084565954*o*x_ref[2]**(o-1)+(-0.0966973858886)
+            arg[2, 1]+=0.606545134762*x[2]**o+(-0.344015988883)*x[2]
+            ref[2, 1, 2]=0.606545134762*o*x_ref[2]**(o-1)+(-0.344015988883)
+            arg[2, 2]+=-0.0815960867268*x[2]**o+(0.472573084146)*x[2]
+            ref[2, 2, 2]=-0.0815960867268*o*x_ref[2]**(o-1)+(0.472573084146)
+            arg[3, 0]+=0.248072344303*x[2]**o+(-0.997743519767)*x[2]
+            ref[3, 0, 2]=0.248072344303*o*x_ref[2]**(o-1)+(-0.997743519767)
+            arg[3, 1]+=0.348797534828*x[2]**o+(0.210330529732)*x[2]
+            ref[3, 1, 2]=0.348797534828*o*x_ref[2]**(o-1)+(0.210330529732)
+            arg[3, 2]+=0.222939876764*x[2]**o+(-0.587198505567)*x[2]
+            ref[3, 2, 2]=0.222939876764*o*x_ref[2]**(o-1)+(-0.587198505567)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.0650753475817*x[0]**o+(0.148154884519)*x[0]+(0.733926262305)*x[1]**o+(0.527193285649)*x[1]
+        ref[0, 0, 0, 0]=-0.0650753475817*o*x_ref[0]**(o-1)+(0.148154884519)
+        ref[0, 0, 0, 1]=0.733926262305*o*x_ref[1]**(o-1)+(0.527193285649)
+        arg[0, 0, 1]=-0.0118415421296*x[0]**o+(-0.0401712950095)*x[0]+(-0.520979108701)*x[1]**o+(-0.0516972177486)*x[1]
+        ref[0, 0, 1, 0]=-0.0118415421296*o*x_ref[0]**(o-1)+(-0.0401712950095)
+        ref[0, 0, 1, 1]=-0.520979108701*o*x_ref[1]**(o-1)+(-0.0516972177486)
+        arg[0, 1, 0]=-0.50426385195*x[0]**o+(-0.26156831717)*x[0]+(-0.587356334711)*x[1]**o+(-0.823596695992)*x[1]
+        ref[0, 1, 0, 0]=-0.50426385195*o*x_ref[0]**(o-1)+(-0.26156831717)
+        ref[0, 1, 0, 1]=-0.587356334711*o*x_ref[1]**(o-1)+(-0.823596695992)
+        arg[0, 1, 1]=-0.153768530182*x[0]**o+(0.507121592052)*x[0]+(0.24436149729)*x[1]**o+(0.681316564784)*x[1]
+        ref[0, 1, 1, 0]=-0.153768530182*o*x_ref[0]**(o-1)+(0.507121592052)
+        ref[0, 1, 1, 1]=0.24436149729*o*x_ref[1]**(o-1)+(0.681316564784)
+        arg[1, 0, 0]=-0.998848253883*x[0]**o+(0.84884062158)*x[0]+(-0.977859237646)*x[1]**o+(0.56129927529)*x[1]
+        ref[1, 0, 0, 0]=-0.998848253883*o*x_ref[0]**(o-1)+(0.84884062158)
+        ref[1, 0, 0, 1]=-0.977859237646*o*x_ref[1]**(o-1)+(0.56129927529)
+        arg[1, 0, 1]=-0.138369884276*x[0]**o+(-0.334050752769)*x[0]+(-0.0972917405148)*x[1]**o+(-0.376496546945)*x[1]
+        ref[1, 0, 1, 0]=-0.138369884276*o*x_ref[0]**(o-1)+(-0.334050752769)
+        ref[1, 0, 1, 1]=-0.0972917405148*o*x_ref[1]**(o-1)+(-0.376496546945)
+        arg[1, 1, 0]=-0.477276019636*x[0]**o+(0.00591713346153)*x[0]+(-0.935724008956)*x[1]**o+(0.233149044667)*x[1]
+        ref[1, 1, 0, 0]=-0.477276019636*o*x_ref[0]**(o-1)+(0.00591713346153)
+        ref[1, 1, 0, 1]=-0.935724008956*o*x_ref[1]**(o-1)+(0.233149044667)
+        arg[1, 1, 1]=0.905464034809*x[0]**o+(0.920163569687)*x[0]+(-0.911066595969)*x[1]**o+(-0.865129070829)*x[1]
+        ref[1, 1, 1, 0]=0.905464034809*o*x_ref[0]**(o-1)+(0.920163569687)
+        ref[1, 1, 1, 1]=-0.911066595969*o*x_ref[1]**(o-1)+(-0.865129070829)
+        if dim==3:
+            arg[0, 0, 0]+=-0.412806752304*x[2]**o+(0.44562039574)*x[2]
+            ref[0, 0, 0, 2]=-0.412806752304*o*x_ref[2]**(o-1)+(0.44562039574)
+            arg[0, 0, 1]+=0.784623967523*x[2]**o+(-0.498077297644)*x[2]
+            ref[0, 0, 1, 2]=0.784623967523*o*x_ref[2]**(o-1)+(-0.498077297644)
+            arg[0, 1, 0]+=-0.664046916406*x[2]**o+(0.682026693372)*x[2]
+            ref[0, 1, 0, 2]=-0.664046916406*o*x_ref[2]**(o-1)+(0.682026693372)
+            arg[0, 1, 1]+=0.282581537321*x[2]**o+(-0.723684584655)*x[2]
+            ref[0, 1, 1, 2]=0.282581537321*o*x_ref[2]**(o-1)+(-0.723684584655)
+            arg[1, 0, 0]+=-0.86261560029*x[2]**o+(0.258230983438)*x[2]
+            ref[1, 0, 0, 2]=-0.86261560029*o*x_ref[2]**(o-1)+(0.258230983438)
+            arg[1, 0, 1]+=-0.425271263636*x[2]**o+(-0.685977426978)*x[2]
+            ref[1, 0, 1, 2]=-0.425271263636*o*x_ref[2]**(o-1)+(-0.685977426978)
+            arg[1, 1, 0]+=0.954926476563*x[2]**o+(-0.833665046266)*x[2]
+            ref[1, 1, 0, 2]=0.954926476563*o*x_ref[2]**(o-1)+(-0.833665046266)
+            arg[1, 1, 1]+=-0.640537996475*x[2]**o+(-0.991706769568)*x[2]
+            ref[1, 1, 1, 2]=-0.640537996475*o*x_ref[2]**(o-1)+(-0.991706769568)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.801395382691*x[0]+(-0.989850633598)*x[1]
+        ref[0]=0.801395382691
+        ref[1]=-0.989850633598
+        if dim==3:
+            arg+=(-0.487648945444)*x[2]
+            ref[2]=-0.487648945444
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.400787545827*x[0]+(-0.978743736509)*x[1]
+        ref[0, 0]=-0.400787545827
+        ref[0, 1]=-0.978743736509
+        arg[1,]=0.0311953883753*x[0]+(-0.979159016276)*x[1]
+        ref[1, 0]=0.0311953883753
+        ref[1, 1]=-0.979159016276
+        if dim==3:
+            arg[0,]+=0.779213700205*x[2]
+            ref[0, 2]=0.779213700205
+            arg[1,]+=-0.451846010945*x[2]
+            ref[1, 2]=-0.451846010945
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.672943373152*x[0]+(-0.261305945861)*x[1]
+        ref[0, 0, 0]=-0.672943373152
+        ref[0, 0, 1]=-0.261305945861
+        arg[0, 1]=0.436496051289*x[0]+(-0.116944142243)*x[1]
+        ref[0, 1, 0]=0.436496051289
+        ref[0, 1, 1]=-0.116944142243
+        arg[1, 0]=-0.977192554173*x[0]+(0.586567545164)*x[1]
+        ref[1, 0, 0]=-0.977192554173
+        ref[1, 0, 1]=0.586567545164
+        arg[1, 1]=-0.663155125697*x[0]+(-0.292595867994)*x[1]
+        ref[1, 1, 0]=-0.663155125697
+        ref[1, 1, 1]=-0.292595867994
+        if dim==3:
+            arg[0, 0]+=-0.652846982967*x[2]
+            ref[0, 0, 2]=-0.652846982967
+            arg[0, 1]+=0.794828145011*x[2]
+            ref[0, 1, 2]=0.794828145011
+            arg[1, 0]+=-0.308949171591*x[2]
+            ref[1, 0, 2]=-0.308949171591
+            arg[1, 1]+=0.187438352984*x[2]
+            ref[1, 1, 2]=0.187438352984
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3),w)
+        ref = Data(0,(4, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=0.403646728824*x[0]+(0.304342711061)*x[1]
+        ref[0, 0, 0, 0]=0.403646728824
+        ref[0, 0, 0, 1]=0.304342711061
+        arg[0, 0, 1]=-0.930432144704*x[0]+(0.35005636148)*x[1]
+        ref[0, 0, 1, 0]=-0.930432144704
+        ref[0, 0, 1, 1]=0.35005636148
+        arg[0, 0, 2]=0.473927365535*x[0]+(0.409684335112)*x[1]
+        ref[0, 0, 2, 0]=0.473927365535
+        ref[0, 0, 2, 1]=0.409684335112
+        arg[0, 1, 0]=0.386757572872*x[0]+(-0.446040196831)*x[1]
+        ref[0, 1, 0, 0]=0.386757572872
+        ref[0, 1, 0, 1]=-0.446040196831
+        arg[0, 1, 1]=0.419462402339*x[0]+(-0.532735133993)*x[1]
+        ref[0, 1, 1, 0]=0.419462402339
+        ref[0, 1, 1, 1]=-0.532735133993
+        arg[0, 1, 2]=-0.447183517709*x[0]+(-0.0201912205897)*x[1]
+        ref[0, 1, 2, 0]=-0.447183517709
+        ref[0, 1, 2, 1]=-0.0201912205897
+        arg[0, 2, 0]=0.492863732553*x[0]+(0.235759369671)*x[1]
+        ref[0, 2, 0, 0]=0.492863732553
+        ref[0, 2, 0, 1]=0.235759369671
+        arg[0, 2, 1]=-0.873306585087*x[0]+(0.326728760261)*x[1]
+        ref[0, 2, 1, 0]=-0.873306585087
+        ref[0, 2, 1, 1]=0.326728760261
+        arg[0, 2, 2]=0.124757419602*x[0]+(-0.172400484034)*x[1]
+        ref[0, 2, 2, 0]=0.124757419602
+        ref[0, 2, 2, 1]=-0.172400484034
+        arg[0, 3, 0]=0.668133713338*x[0]+(0.953530982726)*x[1]
+        ref[0, 3, 0, 0]=0.668133713338
+        ref[0, 3, 0, 1]=0.953530982726
+        arg[0, 3, 1]=0.711475185748*x[0]+(-0.21710975491)*x[1]
+        ref[0, 3, 1, 0]=0.711475185748
+        ref[0, 3, 1, 1]=-0.21710975491
+        arg[0, 3, 2]=0.364571125875*x[0]+(0.849978237428)*x[1]
+        ref[0, 3, 2, 0]=0.364571125875
+        ref[0, 3, 2, 1]=0.849978237428
+        arg[1, 0, 0]=-0.700447498703*x[0]+(-0.263292591075)*x[1]
+        ref[1, 0, 0, 0]=-0.700447498703
+        ref[1, 0, 0, 1]=-0.263292591075
+        arg[1, 0, 1]=-0.844313457389*x[0]+(0.249341007889)*x[1]
+        ref[1, 0, 1, 0]=-0.844313457389
+        ref[1, 0, 1, 1]=0.249341007889
+        arg[1, 0, 2]=0.81594552903*x[0]+(0.945398527665)*x[1]
+        ref[1, 0, 2, 0]=0.81594552903
+        ref[1, 0, 2, 1]=0.945398527665
+        arg[1, 1, 0]=-0.586587983973*x[0]+(0.349111786689)*x[1]
+        ref[1, 1, 0, 0]=-0.586587983973
+        ref[1, 1, 0, 1]=0.349111786689
+        arg[1, 1, 1]=-0.875694958424*x[0]+(-0.276529376099)*x[1]
+        ref[1, 1, 1, 0]=-0.875694958424
+        ref[1, 1, 1, 1]=-0.276529376099
+        arg[1, 1, 2]=-0.836112688256*x[0]+(-0.417197262736)*x[1]
+        ref[1, 1, 2, 0]=-0.836112688256
+        ref[1, 1, 2, 1]=-0.417197262736
+        arg[1, 2, 0]=0.1446279204*x[0]+(0.278884547137)*x[1]
+        ref[1, 2, 0, 0]=0.1446279204
+        ref[1, 2, 0, 1]=0.278884547137
+        arg[1, 2, 1]=-0.416194799483*x[0]+(0.230336621602)*x[1]
+        ref[1, 2, 1, 0]=-0.416194799483
+        ref[1, 2, 1, 1]=0.230336621602
+        arg[1, 2, 2]=-0.212408575608*x[0]+(-0.573920325342)*x[1]
+        ref[1, 2, 2, 0]=-0.212408575608
+        ref[1, 2, 2, 1]=-0.573920325342
+        arg[1, 3, 0]=0.725376755022*x[0]+(0.0237331903657)*x[1]
+        ref[1, 3, 0, 0]=0.725376755022
+        ref[1, 3, 0, 1]=0.0237331903657
+        arg[1, 3, 1]=-0.954435595691*x[0]+(-0.270812661068)*x[1]
+        ref[1, 3, 1, 0]=-0.954435595691
+        ref[1, 3, 1, 1]=-0.270812661068
+        arg[1, 3, 2]=0.88661357304*x[0]+(0.730238273438)*x[1]
+        ref[1, 3, 2, 0]=0.88661357304
+        ref[1, 3, 2, 1]=0.730238273438
+        arg[2, 0, 0]=0.0333728178865*x[0]+(-0.961566779615)*x[1]
+        ref[2, 0, 0, 0]=0.0333728178865
+        ref[2, 0, 0, 1]=-0.961566779615
+        arg[2, 0, 1]=-0.444316786311*x[0]+(0.792134039835)*x[1]
+        ref[2, 0, 1, 0]=-0.444316786311
+        ref[2, 0, 1, 1]=0.792134039835
+        arg[2, 0, 2]=-0.958826730193*x[0]+(-0.168785153492)*x[1]
+        ref[2, 0, 2, 0]=-0.958826730193
+        ref[2, 0, 2, 1]=-0.168785153492
+        arg[2, 1, 0]=-0.715509218835*x[0]+(-0.634432060836)*x[1]
+        ref[2, 1, 0, 0]=-0.715509218835
+        ref[2, 1, 0, 1]=-0.634432060836
+        arg[2, 1, 1]=-0.700728098501*x[0]+(0.536537875669)*x[1]
+        ref[2, 1, 1, 0]=-0.700728098501
+        ref[2, 1, 1, 1]=0.536537875669
+        arg[2, 1, 2]=0.302000709902*x[0]+(-0.448124595967)*x[1]
+        ref[2, 1, 2, 0]=0.302000709902
+        ref[2, 1, 2, 1]=-0.448124595967
+        arg[2, 2, 0]=0.820166392719*x[0]+(-0.708503506037)*x[1]
+        ref[2, 2, 0, 0]=0.820166392719
+        ref[2, 2, 0, 1]=-0.708503506037
+        arg[2, 2, 1]=0.508915739915*x[0]+(0.466042012871)*x[1]
+        ref[2, 2, 1, 0]=0.508915739915
+        ref[2, 2, 1, 1]=0.466042012871
+        arg[2, 2, 2]=0.590478230855*x[0]+(-0.462285176295)*x[1]
+        ref[2, 2, 2, 0]=0.590478230855
+        ref[2, 2, 2, 1]=-0.462285176295
+        arg[2, 3, 0]=-0.650769932622*x[0]+(-0.891717964075)*x[1]
+        ref[2, 3, 0, 0]=-0.650769932622
+        ref[2, 3, 0, 1]=-0.891717964075
+        arg[2, 3, 1]=0.00651069601084*x[0]+(-0.897927642067)*x[1]
+        ref[2, 3, 1, 0]=0.00651069601084
+        ref[2, 3, 1, 1]=-0.897927642067
+        arg[2, 3, 2]=0.781676698627*x[0]+(-0.568399298208)*x[1]
+        ref[2, 3, 2, 0]=0.781676698627
+        ref[2, 3, 2, 1]=-0.568399298208
+        arg[3, 0, 0]=0.629384065403*x[0]+(-0.578379075133)*x[1]
+        ref[3, 0, 0, 0]=0.629384065403
+        ref[3, 0, 0, 1]=-0.578379075133
+        arg[3, 0, 1]=0.545494221227*x[0]+(-0.99010183745)*x[1]
+        ref[3, 0, 1, 0]=0.545494221227
+        ref[3, 0, 1, 1]=-0.99010183745
+        arg[3, 0, 2]=-0.681157043803*x[0]+(-0.114162224728)*x[1]
+        ref[3, 0, 2, 0]=-0.681157043803
+        ref[3, 0, 2, 1]=-0.114162224728
+        arg[3, 1, 0]=0.357309091858*x[0]+(0.486339970135)*x[1]
+        ref[3, 1, 0, 0]=0.357309091858
+        ref[3, 1, 0, 1]=0.486339970135
+        arg[3, 1, 1]=0.457857646083*x[0]+(0.525712842234)*x[1]
+        ref[3, 1, 1, 0]=0.457857646083
+        ref[3, 1, 1, 1]=0.525712842234
+        arg[3, 1, 2]=-0.342223005126*x[0]+(0.7605228747)*x[1]
+        ref[3, 1, 2, 0]=-0.342223005126
+        ref[3, 1, 2, 1]=0.7605228747
+        arg[3, 2, 0]=0.0906690935313*x[0]+(0.0324822955254)*x[1]
+        ref[3, 2, 0, 0]=0.0906690935313
+        ref[3, 2, 0, 1]=0.0324822955254
+        arg[3, 2, 1]=0.211571081417*x[0]+(-0.107824245856)*x[1]
+        ref[3, 2, 1, 0]=0.211571081417
+        ref[3, 2, 1, 1]=-0.107824245856
+        arg[3, 2, 2]=-0.942719818764*x[0]+(-0.85260948695)*x[1]
+        ref[3, 2, 2, 0]=-0.942719818764
+        ref[3, 2, 2, 1]=-0.85260948695
+        arg[3, 3, 0]=0.688654229021*x[0]+(0.142428779462)*x[1]
+        ref[3, 3, 0, 0]=0.688654229021
+        ref[3, 3, 0, 1]=0.142428779462
+        arg[3, 3, 1]=0.876694086615*x[0]+(0.983161978251)*x[1]
+        ref[3, 3, 1, 0]=0.876694086615
+        ref[3, 3, 1, 1]=0.983161978251
+        arg[3, 3, 2]=-0.800423298428*x[0]+(0.887030624754)*x[1]
+        ref[3, 3, 2, 0]=-0.800423298428
+        ref[3, 3, 2, 1]=0.887030624754
+        if dim==3:
+            arg[0, 0, 0]+=0.518019489416*x[2]
+            ref[0, 0, 0, 2]=0.518019489416
+            arg[0, 0, 1]+=0.30697823325*x[2]
+            ref[0, 0, 1, 2]=0.30697823325
+            arg[0, 0, 2]+=-0.648467212083*x[2]
+            ref[0, 0, 2, 2]=-0.648467212083
+            arg[0, 1, 0]+=-0.0693708349977*x[2]
+            ref[0, 1, 0, 2]=-0.0693708349977
+            arg[0, 1, 1]+=-0.341483847004*x[2]
+            ref[0, 1, 1, 2]=-0.341483847004
+            arg[0, 1, 2]+=0.242981251371*x[2]
+            ref[0, 1, 2, 2]=0.242981251371
+            arg[0, 2, 0]+=0.389676005118*x[2]
+            ref[0, 2, 0, 2]=0.389676005118
+            arg[0, 2, 1]+=0.448806907985*x[2]
+            ref[0, 2, 1, 2]=0.448806907985
+            arg[0, 2, 2]+=0.274784628831*x[2]
+            ref[0, 2, 2, 2]=0.274784628831
+            arg[0, 3, 0]+=-0.0160714149206*x[2]
+            ref[0, 3, 0, 2]=-0.0160714149206
+            arg[0, 3, 1]+=-0.187189542119*x[2]
+            ref[0, 3, 1, 2]=-0.187189542119
+            arg[0, 3, 2]+=-0.039543618828*x[2]
+            ref[0, 3, 2, 2]=-0.039543618828
+            arg[1, 0, 0]+=-0.981551691771*x[2]
+            ref[1, 0, 0, 2]=-0.981551691771
+            arg[1, 0, 1]+=0.240796432885*x[2]
+            ref[1, 0, 1, 2]=0.240796432885
+            arg[1, 0, 2]+=-0.0428444063893*x[2]
+            ref[1, 0, 2, 2]=-0.0428444063893
+            arg[1, 1, 0]+=0.0306165436401*x[2]
+            ref[1, 1, 0, 2]=0.0306165436401
+            arg[1, 1, 1]+=0.0654494882289*x[2]
+            ref[1, 1, 1, 2]=0.0654494882289
+            arg[1, 1, 2]+=0.203710069099*x[2]
+            ref[1, 1, 2, 2]=0.203710069099
+            arg[1, 2, 0]+=0.680379023398*x[2]
+            ref[1, 2, 0, 2]=0.680379023398
+            arg[1, 2, 1]+=0.105520035819*x[2]
+            ref[1, 2, 1, 2]=0.105520035819
+            arg[1, 2, 2]+=-0.0644894702853*x[2]
+            ref[1, 2, 2, 2]=-0.0644894702853
+            arg[1, 3, 0]+=-0.312515232773*x[2]
+            ref[1, 3, 0, 2]=-0.312515232773
+            arg[1, 3, 1]+=0.255986482605*x[2]
+            ref[1, 3, 1, 2]=0.255986482605
+            arg[1, 3, 2]+=0.662807670303*x[2]
+            ref[1, 3, 2, 2]=0.662807670303
+            arg[2, 0, 0]+=0.0450012794777*x[2]
+            ref[2, 0, 0, 2]=0.0450012794777
+            arg[2, 0, 1]+=0.049836839255*x[2]
+            ref[2, 0, 1, 2]=0.049836839255
+            arg[2, 0, 2]+=0.248064204654*x[2]
+            ref[2, 0, 2, 2]=0.248064204654
+            arg[2, 1, 0]+=-0.740552786822*x[2]
+            ref[2, 1, 0, 2]=-0.740552786822
+            arg[2, 1, 1]+=-0.163112542522*x[2]
+            ref[2, 1, 1, 2]=-0.163112542522
+            arg[2, 1, 2]+=-0.440936920502*x[2]
+            ref[2, 1, 2, 2]=-0.440936920502
+            arg[2, 2, 0]+=0.345610881315*x[2]
+            ref[2, 2, 0, 2]=0.345610881315
+            arg[2, 2, 1]+=-0.55404190568*x[2]
+            ref[2, 2, 1, 2]=-0.55404190568
+            arg[2, 2, 2]+=0.118055715411*x[2]
+            ref[2, 2, 2, 2]=0.118055715411
+            arg[2, 3, 0]+=0.981712541164*x[2]
+            ref[2, 3, 0, 2]=0.981712541164
+            arg[2, 3, 1]+=0.734337802084*x[2]
+            ref[2, 3, 1, 2]=0.734337802084
+            arg[2, 3, 2]+=-0.587373838162*x[2]
+            ref[2, 3, 2, 2]=-0.587373838162
+            arg[3, 0, 0]+=0.038094786177*x[2]
+            ref[3, 0, 0, 2]=0.038094786177
+            arg[3, 0, 1]+=0.0468194607289*x[2]
+            ref[3, 0, 1, 2]=0.0468194607289
+            arg[3, 0, 2]+=-0.697169904236*x[2]
+            ref[3, 0, 2, 2]=-0.697169904236
+            arg[3, 1, 0]+=0.538114859828*x[2]
+            ref[3, 1, 0, 2]=0.538114859828
+            arg[3, 1, 1]+=-0.941023894174*x[2]
+            ref[3, 1, 1, 2]=-0.941023894174
+            arg[3, 1, 2]+=0.319248691511*x[2]
+            ref[3, 1, 2, 2]=0.319248691511
+            arg[3, 2, 0]+=0.146743056352*x[2]
+            ref[3, 2, 0, 2]=0.146743056352
+            arg[3, 2, 1]+=-0.824668494729*x[2]
+            ref[3, 2, 1, 2]=-0.824668494729
+            arg[3, 2, 2]+=0.780741332121*x[2]
+            ref[3, 2, 2, 2]=0.780741332121
+            arg[3, 3, 0]+=-0.464192681784*x[2]
+            ref[3, 3, 0, 2]=-0.464192681784
+            arg[3, 3, 1]+=0.79203228074*x[2]
+            ref[3, 3, 1, 2]=0.79203228074
+            arg[3, 3, 2]+=-0.788139599167*x[2]
+            ref[3, 3, 2, 2]=-0.788139599167
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.139122560916*x[0]+(0.469323712757)*x[1]
+        ref[0]=-0.139122560916
+        ref[1]=0.469323712757
+        if dim==3:
+            arg+=(-0.0282998443726)*x[2]
+            ref[2]=-0.0282998443726
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=0.0193729633766*x[0]+(0.544319464066)*x[1]
+        ref[0, 0]=0.0193729633766
+        ref[0, 1]=0.544319464066
+        arg[1,]=0.642455585043*x[0]+(0.79069910319)*x[1]
+        ref[1, 0]=0.642455585043
+        ref[1, 1]=0.79069910319
+        if dim==3:
+            arg[0,]+=-0.6593549007*x[2]
+            ref[0, 2]=-0.6593549007
+            arg[1,]+=-0.47979156911*x[2]
+            ref[1, 2]=-0.47979156911
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3)+(dim,),w_ref)
+        arg[0, 0]=0.36860446162*x[0]+(-0.652718882739)*x[1]
+        ref[0, 0, 0]=0.36860446162
+        ref[0, 0, 1]=-0.652718882739
+        arg[0, 1]=0.506152187092*x[0]+(-0.635910214469)*x[1]
+        ref[0, 1, 0]=0.506152187092
+        ref[0, 1, 1]=-0.635910214469
+        arg[0, 2]=0.684118404161*x[0]+(0.146024135929)*x[1]
+        ref[0, 2, 0]=0.684118404161
+        ref[0, 2, 1]=0.146024135929
+        arg[1, 0]=0.536939569446*x[0]+(0.421212977683)*x[1]
+        ref[1, 0, 0]=0.536939569446
+        ref[1, 0, 1]=0.421212977683
+        arg[1, 1]=-0.823087108883*x[0]+(-0.984309108526)*x[1]
+        ref[1, 1, 0]=-0.823087108883
+        ref[1, 1, 1]=-0.984309108526
+        arg[1, 2]=0.755163501896*x[0]+(0.121161698281)*x[1]
+        ref[1, 2, 0]=0.755163501896
+        ref[1, 2, 1]=0.121161698281
+        if dim==3:
+            arg[0, 0]+=0.0814287482383*x[2]
+            ref[0, 0, 2]=0.0814287482383
+            arg[0, 1]+=0.537451964363*x[2]
+            ref[0, 1, 2]=0.537451964363
+            arg[0, 2]+=-0.76177285371*x[2]
+            ref[0, 2, 2]=-0.76177285371
+            arg[1, 0]+=-0.404936244164*x[2]
+            ref[1, 0, 2]=-0.404936244164
+            arg[1, 1]+=-0.191712201268*x[2]
+            ref[1, 1, 2]=-0.191712201268
+            arg[1, 2]+=-0.838202249911*x[2]
+            ref[1, 2, 2]=-0.838202249911
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=0.399320802529*x[0]+(0.156556264004)*x[1]
+        ref[0, 0, 0, 0]=0.399320802529
+        ref[0, 0, 0, 1]=0.156556264004
+        arg[0, 0, 1]=0.866720876412*x[0]+(-0.921104763318)*x[1]
+        ref[0, 0, 1, 0]=0.866720876412
+        ref[0, 0, 1, 1]=-0.921104763318
+        arg[0, 0, 2]=0.22627048055*x[0]+(0.512867129261)*x[1]
+        ref[0, 0, 2, 0]=0.22627048055
+        ref[0, 0, 2, 1]=0.512867129261
+        arg[0, 1, 0]=-0.237168552515*x[0]+(0.174934092511)*x[1]
+        ref[0, 1, 0, 0]=-0.237168552515
+        ref[0, 1, 0, 1]=0.174934092511
+        arg[0, 1, 1]=-0.948671206118*x[0]+(-0.00210043230628)*x[1]
+        ref[0, 1, 1, 0]=-0.948671206118
+        ref[0, 1, 1, 1]=-0.00210043230628
+        arg[0, 1, 2]=-0.764687849177*x[0]+(-0.147334599269)*x[1]
+        ref[0, 1, 2, 0]=-0.764687849177
+        ref[0, 1, 2, 1]=-0.147334599269
+        arg[1, 0, 0]=0.343409026321*x[0]+(-0.730583749332)*x[1]
+        ref[1, 0, 0, 0]=0.343409026321
+        ref[1, 0, 0, 1]=-0.730583749332
+        arg[1, 0, 1]=-0.609801578874*x[0]+(0.297288196611)*x[1]
+        ref[1, 0, 1, 0]=-0.609801578874
+        ref[1, 0, 1, 1]=0.297288196611
+        arg[1, 0, 2]=0.830435130643*x[0]+(-0.39971999405)*x[1]
+        ref[1, 0, 2, 0]=0.830435130643
+        ref[1, 0, 2, 1]=-0.39971999405
+        arg[1, 1, 0]=0.0372108953337*x[0]+(0.425007443117)*x[1]
+        ref[1, 1, 0, 0]=0.0372108953337
+        ref[1, 1, 0, 1]=0.425007443117
+        arg[1, 1, 1]=0.647924186491*x[0]+(0.00113188748307)*x[1]
+        ref[1, 1, 1, 0]=0.647924186491
+        ref[1, 1, 1, 1]=0.00113188748307
+        arg[1, 1, 2]=-0.0190190557395*x[0]+(-0.843442700178)*x[1]
+        ref[1, 1, 2, 0]=-0.0190190557395
+        ref[1, 1, 2, 1]=-0.843442700178
+        if dim==3:
+            arg[0, 0, 0]+=0.935006281165*x[2]
+            ref[0, 0, 0, 2]=0.935006281165
+            arg[0, 0, 1]+=0.274099727343*x[2]
+            ref[0, 0, 1, 2]=0.274099727343
+            arg[0, 0, 2]+=0.532953110851*x[2]
+            ref[0, 0, 2, 2]=0.532953110851
+            arg[0, 1, 0]+=-0.128417449407*x[2]
+            ref[0, 1, 0, 2]=-0.128417449407
+            arg[0, 1, 1]+=0.183066449052*x[2]
+            ref[0, 1, 1, 2]=0.183066449052
+            arg[0, 1, 2]+=-0.552120797529*x[2]
+            ref[0, 1, 2, 2]=-0.552120797529
+            arg[1, 0, 0]+=-0.353925099784*x[2]
+            ref[1, 0, 0, 2]=-0.353925099784
+            arg[1, 0, 1]+=-0.704831667165*x[2]
+            ref[1, 0, 1, 2]=-0.704831667165
+            arg[1, 0, 2]+=-0.187723719777*x[2]
+            ref[1, 0, 2, 2]=-0.187723719777
+            arg[1, 1, 0]+=0.846899376014*x[2]
+            ref[1, 1, 0, 2]=0.846899376014
+            arg[1, 1, 1]+=-0.865413768482*x[2]
+            ref[1, 1, 1, 2]=-0.865413768482
+            arg[1, 1, 2]+=0.0677151883884*x[2]
+            ref[1, 1, 2, 2]=0.0677151883884
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.475630545459*x[0]**o+(0.153884898984)*x[0]+(-0.901315440483)*x[1]**o+(-0.25949897973)*x[1]
+        ref[0]=0.475630545459*o*x_ref[0]**(o-1)+(0.153884898984)
+        ref[1]=-0.901315440483*o*x_ref[1]**(o-1)+(-0.25949897973)
+        if dim==3:
+            arg+=(-0.17740565695)*x[2]**o+(-0.0883676446262)*x[2]
+            ref[2]=-0.17740565695*o*x_ref[2]**(o-1)+(-0.0883676446262)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=0.706755189007*x[0]**o+(-0.657535591481)*x[0]+(0.850249449466)*x[1]**o+(-0.215949269552)*x[1]
+        ref[0, 0]=0.706755189007*o*x_ref[0]**(o-1)+(-0.657535591481)
+        ref[0, 1]=0.850249449466*o*x_ref[1]**(o-1)+(-0.215949269552)
+        arg[1,]=0.644342467917*x[0]**o+(0.0401679624667)*x[0]+(0.715217005623)*x[1]**o+(-0.665781700948)*x[1]
+        ref[1, 0]=0.644342467917*o*x_ref[0]**(o-1)+(0.0401679624667)
+        ref[1, 1]=0.715217005623*o*x_ref[1]**(o-1)+(-0.665781700948)
+        arg[2,]=0.408231163956*x[0]**o+(0.0483503034038)*x[0]+(-0.771378476827)*x[1]**o+(0.995962327124)*x[1]
+        ref[2, 0]=0.408231163956*o*x_ref[0]**(o-1)+(0.0483503034038)
+        ref[2, 1]=-0.771378476827*o*x_ref[1]**(o-1)+(0.995962327124)
+        if dim==3:
+            arg[0,]+=0.185276388628*x[2]**o+(0.860612592275)*x[2]
+            ref[0, 2]=0.185276388628*o*x_ref[2]**(o-1)+(0.860612592275)
+            arg[1,]+=-0.525548713262*x[2]**o+(-0.780334097001)*x[2]
+            ref[1, 2]=-0.525548713262*o*x_ref[2]**(o-1)+(-0.780334097001)
+            arg[2,]+=-0.731129076365*x[2]**o+(0.00454889425617)*x[2]
+            ref[2, 2]=-0.731129076365*o*x_ref[2]**(o-1)+(0.00454889425617)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3)+(dim,),w_ref)
+        arg[0, 0]=-0.612630697976*x[0]**o+(-0.454382642317)*x[0]+(0.0920180347022)*x[1]**o+(-0.715199525572)*x[1]
+        ref[0, 0, 0]=-0.612630697976*o*x_ref[0]**(o-1)+(-0.454382642317)
+        ref[0, 0, 1]=0.0920180347022*o*x_ref[1]**(o-1)+(-0.715199525572)
+        arg[0, 1]=-0.374233304652*x[0]**o+(0.376416002299)*x[0]+(0.574324198265)*x[1]**o+(0.79128445666)*x[1]
+        ref[0, 1, 0]=-0.374233304652*o*x_ref[0]**(o-1)+(0.376416002299)
+        ref[0, 1, 1]=0.574324198265*o*x_ref[1]**(o-1)+(0.79128445666)
+        arg[0, 2]=0.729951995791*x[0]**o+(0.266036035724)*x[0]+(-0.906963816723)*x[1]**o+(-0.80265300639)*x[1]
+        ref[0, 2, 0]=0.729951995791*o*x_ref[0]**(o-1)+(0.266036035724)
+        ref[0, 2, 1]=-0.906963816723*o*x_ref[1]**(o-1)+(-0.80265300639)
+        arg[1, 0]=0.133830682414*x[0]**o+(-0.0735887065681)*x[0]+(0.171796649789)*x[1]**o+(0.802061542414)*x[1]
+        ref[1, 0, 0]=0.133830682414*o*x_ref[0]**(o-1)+(-0.0735887065681)
+        ref[1, 0, 1]=0.171796649789*o*x_ref[1]**(o-1)+(0.802061542414)
+        arg[1, 1]=0.389564101753*x[0]**o+(0.592180051543)*x[0]+(0.938955962857)*x[1]**o+(0.53218178256)*x[1]
+        ref[1, 1, 0]=0.389564101753*o*x_ref[0]**(o-1)+(0.592180051543)
+        ref[1, 1, 1]=0.938955962857*o*x_ref[1]**(o-1)+(0.53218178256)
+        arg[1, 2]=0.225983939044*x[0]**o+(0.0801402685275)*x[0]+(0.209887033397)*x[1]**o+(-0.833705760988)*x[1]
+        ref[1, 2, 0]=0.225983939044*o*x_ref[0]**(o-1)+(0.0801402685275)
+        ref[1, 2, 1]=0.209887033397*o*x_ref[1]**(o-1)+(-0.833705760988)
+        arg[2, 0]=-0.544195465215*x[0]**o+(-0.652410256084)*x[0]+(-0.639148729057)*x[1]**o+(-0.368273837525)*x[1]
+        ref[2, 0, 0]=-0.544195465215*o*x_ref[0]**(o-1)+(-0.652410256084)
+        ref[2, 0, 1]=-0.639148729057*o*x_ref[1]**(o-1)+(-0.368273837525)
+        arg[2, 1]=-0.823853720698*x[0]**o+(-0.00848004040298)*x[0]+(0.642638359118)*x[1]**o+(-0.7869980666)*x[1]
+        ref[2, 1, 0]=-0.823853720698*o*x_ref[0]**(o-1)+(-0.00848004040298)
+        ref[2, 1, 1]=0.642638359118*o*x_ref[1]**(o-1)+(-0.7869980666)
+        arg[2, 2]=0.934200633754*x[0]**o+(0.949241568461)*x[0]+(0.706176466766)*x[1]**o+(0.554460776584)*x[1]
+        ref[2, 2, 0]=0.934200633754*o*x_ref[0]**(o-1)+(0.949241568461)
+        ref[2, 2, 1]=0.706176466766*o*x_ref[1]**(o-1)+(0.554460776584)
+        arg[3, 0]=0.761814478776*x[0]**o+(0.569315246894)*x[0]+(0.606629326737)*x[1]**o+(0.597520410674)*x[1]
+        ref[3, 0, 0]=0.761814478776*o*x_ref[0]**(o-1)+(0.569315246894)
+        ref[3, 0, 1]=0.606629326737*o*x_ref[1]**(o-1)+(0.597520410674)
+        arg[3, 1]=0.473237195051*x[0]**o+(0.714515217522)*x[0]+(-0.836357654173)*x[1]**o+(-0.697125350616)*x[1]
+        ref[3, 1, 0]=0.473237195051*o*x_ref[0]**(o-1)+(0.714515217522)
+        ref[3, 1, 1]=-0.836357654173*o*x_ref[1]**(o-1)+(-0.697125350616)
+        arg[3, 2]=-0.3270903954*x[0]**o+(0.752436294511)*x[0]+(-0.875207519587)*x[1]**o+(-0.46336107013)*x[1]
+        ref[3, 2, 0]=-0.3270903954*o*x_ref[0]**(o-1)+(0.752436294511)
+        ref[3, 2, 1]=-0.875207519587*o*x_ref[1]**(o-1)+(-0.46336107013)
+        if dim==3:
+            arg[0, 0]+=0.578567845788*x[2]**o+(0.489005411678)*x[2]
+            ref[0, 0, 2]=0.578567845788*o*x_ref[2]**(o-1)+(0.489005411678)
+            arg[0, 1]+=-0.793664020851*x[2]**o+(0.813700707255)*x[2]
+            ref[0, 1, 2]=-0.793664020851*o*x_ref[2]**(o-1)+(0.813700707255)
+            arg[0, 2]+=-0.282178273906*x[2]**o+(0.950272800571)*x[2]
+            ref[0, 2, 2]=-0.282178273906*o*x_ref[2]**(o-1)+(0.950272800571)
+            arg[1, 0]+=-0.532586635737*x[2]**o+(-0.313679638899)*x[2]
+            ref[1, 0, 2]=-0.532586635737*o*x_ref[2]**(o-1)+(-0.313679638899)
+            arg[1, 1]+=0.574281624511*x[2]**o+(-0.0430569775967)*x[2]
+            ref[1, 1, 2]=0.574281624511*o*x_ref[2]**(o-1)+(-0.0430569775967)
+            arg[1, 2]+=0.158488261385*x[2]**o+(-0.884362998276)*x[2]
+            ref[1, 2, 2]=0.158488261385*o*x_ref[2]**(o-1)+(-0.884362998276)
+            arg[2, 0]+=-0.546937459974*x[2]**o+(0.533903901691)*x[2]
+            ref[2, 0, 2]=-0.546937459974*o*x_ref[2]**(o-1)+(0.533903901691)
+            arg[2, 1]+=0.187947168743*x[2]**o+(-0.591715476826)*x[2]
+            ref[2, 1, 2]=0.187947168743*o*x_ref[2]**(o-1)+(-0.591715476826)
+            arg[2, 2]+=-0.26016232307*x[2]**o+(-0.107906644634)*x[2]
+            ref[2, 2, 2]=-0.26016232307*o*x_ref[2]**(o-1)+(-0.107906644634)
+            arg[3, 0]+=0.404596210918*x[2]**o+(-0.22834260297)*x[2]
+            ref[3, 0, 2]=0.404596210918*o*x_ref[2]**(o-1)+(-0.22834260297)
+            arg[3, 1]+=-0.784561316744*x[2]**o+(0.659986135569)*x[2]
+            ref[3, 1, 2]=-0.784561316744*o*x_ref[2]**(o-1)+(0.659986135569)
+            arg[3, 2]+=0.857826653001*x[2]**o+(0.579874709638)*x[2]
+            ref[3, 2, 2]=0.857826653001*o*x_ref[2]**(o-1)+(0.579874709638)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3),w)
+        ref = Data(0,(3, 4, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=0.626811685276*x[0]**o+(-0.241898406337)*x[0]+(-0.331416803397)*x[1]**o+(0.695367665378)*x[1]
+        ref[0, 0, 0, 0]=0.626811685276*o*x_ref[0]**(o-1)+(-0.241898406337)
+        ref[0, 0, 0, 1]=-0.331416803397*o*x_ref[1]**(o-1)+(0.695367665378)
+        arg[0, 0, 1]=0.0351420144576*x[0]**o+(0.536026529172)*x[0]+(0.904167553203)*x[1]**o+(-0.662290933799)*x[1]
+        ref[0, 0, 1, 0]=0.0351420144576*o*x_ref[0]**(o-1)+(0.536026529172)
+        ref[0, 0, 1, 1]=0.904167553203*o*x_ref[1]**(o-1)+(-0.662290933799)
+        arg[0, 0, 2]=0.985902878488*x[0]**o+(0.376732973696)*x[0]+(0.833548798696)*x[1]**o+(-0.229038836372)*x[1]
+        ref[0, 0, 2, 0]=0.985902878488*o*x_ref[0]**(o-1)+(0.376732973696)
+        ref[0, 0, 2, 1]=0.833548798696*o*x_ref[1]**(o-1)+(-0.229038836372)
+        arg[0, 1, 0]=-0.350294014561*x[0]**o+(-0.886090067786)*x[0]+(0.448350868439)*x[1]**o+(-0.877305623582)*x[1]
+        ref[0, 1, 0, 0]=-0.350294014561*o*x_ref[0]**(o-1)+(-0.886090067786)
+        ref[0, 1, 0, 1]=0.448350868439*o*x_ref[1]**(o-1)+(-0.877305623582)
+        arg[0, 1, 1]=-0.773492028012*x[0]**o+(-0.786320513384)*x[0]+(-0.651665656403)*x[1]**o+(0.784271507916)*x[1]
+        ref[0, 1, 1, 0]=-0.773492028012*o*x_ref[0]**(o-1)+(-0.786320513384)
+        ref[0, 1, 1, 1]=-0.651665656403*o*x_ref[1]**(o-1)+(0.784271507916)
+        arg[0, 1, 2]=-0.0579027906705*x[0]**o+(-0.616690938597)*x[0]+(-0.602527497133)*x[1]**o+(-0.264150978453)*x[1]
+        ref[0, 1, 2, 0]=-0.0579027906705*o*x_ref[0]**(o-1)+(-0.616690938597)
+        ref[0, 1, 2, 1]=-0.602527497133*o*x_ref[1]**(o-1)+(-0.264150978453)
+        arg[0, 2, 0]=-0.84492546121*x[0]**o+(0.571790105987)*x[0]+(-0.19449710862)*x[1]**o+(0.0360769520324)*x[1]
+        ref[0, 2, 0, 0]=-0.84492546121*o*x_ref[0]**(o-1)+(0.571790105987)
+        ref[0, 2, 0, 1]=-0.19449710862*o*x_ref[1]**(o-1)+(0.0360769520324)
+        arg[0, 2, 1]=-0.142735635955*x[0]**o+(0.579499782944)*x[0]+(-0.598367733838)*x[1]**o+(0.265026955008)*x[1]
+        ref[0, 2, 1, 0]=-0.142735635955*o*x_ref[0]**(o-1)+(0.579499782944)
+        ref[0, 2, 1, 1]=-0.598367733838*o*x_ref[1]**(o-1)+(0.265026955008)
+        arg[0, 2, 2]=0.980092028244*x[0]**o+(0.698207624063)*x[0]+(0.41503269022)*x[1]**o+(0.697991288604)*x[1]
+        ref[0, 2, 2, 0]=0.980092028244*o*x_ref[0]**(o-1)+(0.698207624063)
+        ref[0, 2, 2, 1]=0.41503269022*o*x_ref[1]**(o-1)+(0.697991288604)
+        arg[0, 3, 0]=0.0971043600634*x[0]**o+(0.663524456547)*x[0]+(-0.166112483171)*x[1]**o+(-0.601211253061)*x[1]
+        ref[0, 3, 0, 0]=0.0971043600634*o*x_ref[0]**(o-1)+(0.663524456547)
+        ref[0, 3, 0, 1]=-0.166112483171*o*x_ref[1]**(o-1)+(-0.601211253061)
+        arg[0, 3, 1]=0.659113411994*x[0]**o+(-0.496262630394)*x[0]+(0.489293896359)*x[1]**o+(-0.586951508518)*x[1]
+        ref[0, 3, 1, 0]=0.659113411994*o*x_ref[0]**(o-1)+(-0.496262630394)
+        ref[0, 3, 1, 1]=0.489293896359*o*x_ref[1]**(o-1)+(-0.586951508518)
+        arg[0, 3, 2]=-0.6725580715*x[0]**o+(0.100062742081)*x[0]+(-0.0248352188449)*x[1]**o+(0.322691878551)*x[1]
+        ref[0, 3, 2, 0]=-0.6725580715*o*x_ref[0]**(o-1)+(0.100062742081)
+        ref[0, 3, 2, 1]=-0.0248352188449*o*x_ref[1]**(o-1)+(0.322691878551)
+        arg[1, 0, 0]=-0.992138258242*x[0]**o+(-0.969365469205)*x[0]+(-0.0740762404696)*x[1]**o+(-0.136182809512)*x[1]
+        ref[1, 0, 0, 0]=-0.992138258242*o*x_ref[0]**(o-1)+(-0.969365469205)
+        ref[1, 0, 0, 1]=-0.0740762404696*o*x_ref[1]**(o-1)+(-0.136182809512)
+        arg[1, 0, 1]=-0.271277331095*x[0]**o+(-0.808949958536)*x[0]+(0.470306681657)*x[1]**o+(0.0287627488692)*x[1]
+        ref[1, 0, 1, 0]=-0.271277331095*o*x_ref[0]**(o-1)+(-0.808949958536)
+        ref[1, 0, 1, 1]=0.470306681657*o*x_ref[1]**(o-1)+(0.0287627488692)
+        arg[1, 0, 2]=0.508592910998*x[0]**o+(-0.720314672626)*x[0]+(0.678218222981)*x[1]**o+(-0.5536752642)*x[1]
+        ref[1, 0, 2, 0]=0.508592910998*o*x_ref[0]**(o-1)+(-0.720314672626)
+        ref[1, 0, 2, 1]=0.678218222981*o*x_ref[1]**(o-1)+(-0.5536752642)
+        arg[1, 1, 0]=0.508999199192*x[0]**o+(-0.596467394353)*x[0]+(-0.877697377112)*x[1]**o+(-0.54312479735)*x[1]
+        ref[1, 1, 0, 0]=0.508999199192*o*x_ref[0]**(o-1)+(-0.596467394353)
+        ref[1, 1, 0, 1]=-0.877697377112*o*x_ref[1]**(o-1)+(-0.54312479735)
+        arg[1, 1, 1]=-0.452985049323*x[0]**o+(-0.647668395808)*x[0]+(0.241201632277)*x[1]**o+(0.750795619064)*x[1]
+        ref[1, 1, 1, 0]=-0.452985049323*o*x_ref[0]**(o-1)+(-0.647668395808)
+        ref[1, 1, 1, 1]=0.241201632277*o*x_ref[1]**(o-1)+(0.750795619064)
+        arg[1, 1, 2]=0.617725845795*x[0]**o+(-0.755869935655)*x[0]+(-0.863345884343)*x[1]**o+(0.670080926145)*x[1]
+        ref[1, 1, 2, 0]=0.617725845795*o*x_ref[0]**(o-1)+(-0.755869935655)
+        ref[1, 1, 2, 1]=-0.863345884343*o*x_ref[1]**(o-1)+(0.670080926145)
+        arg[1, 2, 0]=0.314905188766*x[0]**o+(0.357494370894)*x[0]+(-0.141307890143)*x[1]**o+(0.282895393828)*x[1]
+        ref[1, 2, 0, 0]=0.314905188766*o*x_ref[0]**(o-1)+(0.357494370894)
+        ref[1, 2, 0, 1]=-0.141307890143*o*x_ref[1]**(o-1)+(0.282895393828)
+        arg[1, 2, 1]=-0.804159359133*x[0]**o+(0.0342196611766)*x[0]+(-0.43222350678)*x[1]**o+(-0.555697993629)*x[1]
+        ref[1, 2, 1, 0]=-0.804159359133*o*x_ref[0]**(o-1)+(0.0342196611766)
+        ref[1, 2, 1, 1]=-0.43222350678*o*x_ref[1]**(o-1)+(-0.555697993629)
+        arg[1, 2, 2]=-0.0302291558325*x[0]**o+(0.465934081725)*x[0]+(-0.703225050301)*x[1]**o+(-0.119531844317)*x[1]
+        ref[1, 2, 2, 0]=-0.0302291558325*o*x_ref[0]**(o-1)+(0.465934081725)
+        ref[1, 2, 2, 1]=-0.703225050301*o*x_ref[1]**(o-1)+(-0.119531844317)
+        arg[1, 3, 0]=-0.646828525961*x[0]**o+(-0.259968481739)*x[0]+(0.67986701888)*x[1]**o+(0.211588510568)*x[1]
+        ref[1, 3, 0, 0]=-0.646828525961*o*x_ref[0]**(o-1)+(-0.259968481739)
+        ref[1, 3, 0, 1]=0.67986701888*o*x_ref[1]**(o-1)+(0.211588510568)
+        arg[1, 3, 1]=-0.36217639642*x[0]**o+(-0.605370231824)*x[0]+(-0.988724524437)*x[1]**o+(-0.554680285188)*x[1]
+        ref[1, 3, 1, 0]=-0.36217639642*o*x_ref[0]**(o-1)+(-0.605370231824)
+        ref[1, 3, 1, 1]=-0.988724524437*o*x_ref[1]**(o-1)+(-0.554680285188)
+        arg[1, 3, 2]=-0.711148476575*x[0]**o+(0.239335003381)*x[0]+(-0.82809606305)*x[1]**o+(0.58382440089)*x[1]
+        ref[1, 3, 2, 0]=-0.711148476575*o*x_ref[0]**(o-1)+(0.239335003381)
+        ref[1, 3, 2, 1]=-0.82809606305*o*x_ref[1]**(o-1)+(0.58382440089)
+        arg[2, 0, 0]=-0.57001788736*x[0]**o+(0.196985269102)*x[0]+(-0.764720764922)*x[1]**o+(0.441163295933)*x[1]
+        ref[2, 0, 0, 0]=-0.57001788736*o*x_ref[0]**(o-1)+(0.196985269102)
+        ref[2, 0, 0, 1]=-0.764720764922*o*x_ref[1]**(o-1)+(0.441163295933)
+        arg[2, 0, 1]=-0.340100659665*x[0]**o+(-0.273462763948)*x[0]+(-0.239505252614)*x[1]**o+(-0.293281311298)*x[1]
+        ref[2, 0, 1, 0]=-0.340100659665*o*x_ref[0]**(o-1)+(-0.273462763948)
+        ref[2, 0, 1, 1]=-0.239505252614*o*x_ref[1]**(o-1)+(-0.293281311298)
+        arg[2, 0, 2]=0.145783748114*x[0]**o+(0.273014656066)*x[0]+(-0.656825666581)*x[1]**o+(0.403148494822)*x[1]
+        ref[2, 0, 2, 0]=0.145783748114*o*x_ref[0]**(o-1)+(0.273014656066)
+        ref[2, 0, 2, 1]=-0.656825666581*o*x_ref[1]**(o-1)+(0.403148494822)
+        arg[2, 1, 0]=0.950109660223*x[0]**o+(-0.893870655623)*x[0]+(-0.939025905745)*x[1]**o+(0.498664533333)*x[1]
+        ref[2, 1, 0, 0]=0.950109660223*o*x_ref[0]**(o-1)+(-0.893870655623)
+        ref[2, 1, 0, 1]=-0.939025905745*o*x_ref[1]**(o-1)+(0.498664533333)
+        arg[2, 1, 1]=-0.719377565121*x[0]**o+(-0.979648270102)*x[0]+(0.944330543461)*x[1]**o+(-0.613095245262)*x[1]
+        ref[2, 1, 1, 0]=-0.719377565121*o*x_ref[0]**(o-1)+(-0.979648270102)
+        ref[2, 1, 1, 1]=0.944330543461*o*x_ref[1]**(o-1)+(-0.613095245262)
+        arg[2, 1, 2]=0.895485824505*x[0]**o+(0.302570326594)*x[0]+(0.783590550067)*x[1]**o+(-0.334398176326)*x[1]
+        ref[2, 1, 2, 0]=0.895485824505*o*x_ref[0]**(o-1)+(0.302570326594)
+        ref[2, 1, 2, 1]=0.783590550067*o*x_ref[1]**(o-1)+(-0.334398176326)
+        arg[2, 2, 0]=-0.998919346697*x[0]**o+(-0.6304037838)*x[0]+(-0.509991755337)*x[1]**o+(-0.674146999472)*x[1]
+        ref[2, 2, 0, 0]=-0.998919346697*o*x_ref[0]**(o-1)+(-0.6304037838)
+        ref[2, 2, 0, 1]=-0.509991755337*o*x_ref[1]**(o-1)+(-0.674146999472)
+        arg[2, 2, 1]=-0.919927543262*x[0]**o+(-0.293151631956)*x[0]+(-0.859815755182)*x[1]**o+(-0.955429566895)*x[1]
+        ref[2, 2, 1, 0]=-0.919927543262*o*x_ref[0]**(o-1)+(-0.293151631956)
+        ref[2, 2, 1, 1]=-0.859815755182*o*x_ref[1]**(o-1)+(-0.955429566895)
+        arg[2, 2, 2]=0.736125139337*x[0]**o+(0.992500130921)*x[0]+(-0.184249968034)*x[1]**o+(0.218521822617)*x[1]
+        ref[2, 2, 2, 0]=0.736125139337*o*x_ref[0]**(o-1)+(0.992500130921)
+        ref[2, 2, 2, 1]=-0.184249968034*o*x_ref[1]**(o-1)+(0.218521822617)
+        arg[2, 3, 0]=-0.900744278695*x[0]**o+(-0.963644668225)*x[0]+(-0.0253825376861)*x[1]**o+(0.0868387972369)*x[1]
+        ref[2, 3, 0, 0]=-0.900744278695*o*x_ref[0]**(o-1)+(-0.963644668225)
+        ref[2, 3, 0, 1]=-0.0253825376861*o*x_ref[1]**(o-1)+(0.0868387972369)
+        arg[2, 3, 1]=-0.880002489207*x[0]**o+(0.179730276721)*x[0]+(0.269192652341)*x[1]**o+(-0.465424901048)*x[1]
+        ref[2, 3, 1, 0]=-0.880002489207*o*x_ref[0]**(o-1)+(0.179730276721)
+        ref[2, 3, 1, 1]=0.269192652341*o*x_ref[1]**(o-1)+(-0.465424901048)
+        arg[2, 3, 2]=0.292511729885*x[0]**o+(-0.861592303386)*x[0]+(-0.129750057201)*x[1]**o+(0.868250321122)*x[1]
+        ref[2, 3, 2, 0]=0.292511729885*o*x_ref[0]**(o-1)+(-0.861592303386)
+        ref[2, 3, 2, 1]=-0.129750057201*o*x_ref[1]**(o-1)+(0.868250321122)
+        if dim==3:
+            arg[0, 0, 0]+=-0.481547992961*x[2]**o+(0.898746201906)*x[2]
+            ref[0, 0, 0, 2]=-0.481547992961*o*x_ref[2]**(o-1)+(0.898746201906)
+            arg[0, 0, 1]+=0.596245582615*x[2]**o+(-0.587125179029)*x[2]
+            ref[0, 0, 1, 2]=0.596245582615*o*x_ref[2]**(o-1)+(-0.587125179029)
+            arg[0, 0, 2]+=-0.497963448991*x[2]**o+(-0.558891040369)*x[2]
+            ref[0, 0, 2, 2]=-0.497963448991*o*x_ref[2]**(o-1)+(-0.558891040369)
+            arg[0, 1, 0]+=-0.765593409777*x[2]**o+(0.966039393813)*x[2]
+            ref[0, 1, 0, 2]=-0.765593409777*o*x_ref[2]**(o-1)+(0.966039393813)
+            arg[0, 1, 1]+=0.828933871206*x[2]**o+(0.419603882023)*x[2]
+            ref[0, 1, 1, 2]=0.828933871206*o*x_ref[2]**(o-1)+(0.419603882023)
+            arg[0, 1, 2]+=-0.742312767767*x[2]**o+(0.487357605049)*x[2]
+            ref[0, 1, 2, 2]=-0.742312767767*o*x_ref[2]**(o-1)+(0.487357605049)
+            arg[0, 2, 0]+=0.451051664303*x[2]**o+(-0.289668186689)*x[2]
+            ref[0, 2, 0, 2]=0.451051664303*o*x_ref[2]**(o-1)+(-0.289668186689)
+            arg[0, 2, 1]+=-0.254000972595*x[2]**o+(0.81978998812)*x[2]
+            ref[0, 2, 1, 2]=-0.254000972595*o*x_ref[2]**(o-1)+(0.81978998812)
+            arg[0, 2, 2]+=-0.196650259052*x[2]**o+(0.773025937961)*x[2]
+            ref[0, 2, 2, 2]=-0.196650259052*o*x_ref[2]**(o-1)+(0.773025937961)
+            arg[0, 3, 0]+=-0.246364451974*x[2]**o+(0.503965262209)*x[2]
+            ref[0, 3, 0, 2]=-0.246364451974*o*x_ref[2]**(o-1)+(0.503965262209)
+            arg[0, 3, 1]+=-0.51513789282*x[2]**o+(-0.637354484594)*x[2]
+            ref[0, 3, 1, 2]=-0.51513789282*o*x_ref[2]**(o-1)+(-0.637354484594)
+            arg[0, 3, 2]+=0.863265484066*x[2]**o+(0.0632726041487)*x[2]
+            ref[0, 3, 2, 2]=0.863265484066*o*x_ref[2]**(o-1)+(0.0632726041487)
+            arg[1, 0, 0]+=-0.834847383218*x[2]**o+(0.264420406157)*x[2]
+            ref[1, 0, 0, 2]=-0.834847383218*o*x_ref[2]**(o-1)+(0.264420406157)
+            arg[1, 0, 1]+=-0.307474343021*x[2]**o+(-0.888621914015)*x[2]
+            ref[1, 0, 1, 2]=-0.307474343021*o*x_ref[2]**(o-1)+(-0.888621914015)
+            arg[1, 0, 2]+=0.425433565534*x[2]**o+(-0.96604201396)*x[2]
+            ref[1, 0, 2, 2]=0.425433565534*o*x_ref[2]**(o-1)+(-0.96604201396)
+            arg[1, 1, 0]+=-0.045024483243*x[2]**o+(0.904268744311)*x[2]
+            ref[1, 1, 0, 2]=-0.045024483243*o*x_ref[2]**(o-1)+(0.904268744311)
+            arg[1, 1, 1]+=0.187940730187*x[2]**o+(-0.566351155612)*x[2]
+            ref[1, 1, 1, 2]=0.187940730187*o*x_ref[2]**(o-1)+(-0.566351155612)
+            arg[1, 1, 2]+=-0.307183018315*x[2]**o+(-0.96525359086)*x[2]
+            ref[1, 1, 2, 2]=-0.307183018315*o*x_ref[2]**(o-1)+(-0.96525359086)
+            arg[1, 2, 0]+=0.224078208281*x[2]**o+(0.477177681752)*x[2]
+            ref[1, 2, 0, 2]=0.224078208281*o*x_ref[2]**(o-1)+(0.477177681752)
+            arg[1, 2, 1]+=-0.615010418381*x[2]**o+(-0.0430956444695)*x[2]
+            ref[1, 2, 1, 2]=-0.615010418381*o*x_ref[2]**(o-1)+(-0.0430956444695)
+            arg[1, 2, 2]+=0.604899974276*x[2]**o+(0.6607266217)*x[2]
+            ref[1, 2, 2, 2]=0.604899974276*o*x_ref[2]**(o-1)+(0.6607266217)
+            arg[1, 3, 0]+=-0.517069990285*x[2]**o+(0.515616571789)*x[2]
+            ref[1, 3, 0, 2]=-0.517069990285*o*x_ref[2]**(o-1)+(0.515616571789)
+            arg[1, 3, 1]+=-0.63583956217*x[2]**o+(0.00607552072397)*x[2]
+            ref[1, 3, 1, 2]=-0.63583956217*o*x_ref[2]**(o-1)+(0.00607552072397)
+            arg[1, 3, 2]+=0.847327613212*x[2]**o+(-0.642832555941)*x[2]
+            ref[1, 3, 2, 2]=0.847327613212*o*x_ref[2]**(o-1)+(-0.642832555941)
+            arg[2, 0, 0]+=-0.616351469964*x[2]**o+(0.290720725212)*x[2]
+            ref[2, 0, 0, 2]=-0.616351469964*o*x_ref[2]**(o-1)+(0.290720725212)
+            arg[2, 0, 1]+=0.439527213078*x[2]**o+(-0.946158910825)*x[2]
+            ref[2, 0, 1, 2]=0.439527213078*o*x_ref[2]**(o-1)+(-0.946158910825)
+            arg[2, 0, 2]+=0.387329177001*x[2]**o+(0.693060355403)*x[2]
+            ref[2, 0, 2, 2]=0.387329177001*o*x_ref[2]**(o-1)+(0.693060355403)
+            arg[2, 1, 0]+=0.0203399132539*x[2]**o+(-0.79753554115)*x[2]
+            ref[2, 1, 0, 2]=0.0203399132539*o*x_ref[2]**(o-1)+(-0.79753554115)
+            arg[2, 1, 1]+=-0.0192786176341*x[2]**o+(0.874588458419)*x[2]
+            ref[2, 1, 1, 2]=-0.0192786176341*o*x_ref[2]**(o-1)+(0.874588458419)
+            arg[2, 1, 2]+=0.0436312402411*x[2]**o+(0.503340631841)*x[2]
+            ref[2, 1, 2, 2]=0.0436312402411*o*x_ref[2]**(o-1)+(0.503340631841)
+            arg[2, 2, 0]+=0.619324916935*x[2]**o+(0.745403079997)*x[2]
+            ref[2, 2, 0, 2]=0.619324916935*o*x_ref[2]**(o-1)+(0.745403079997)
+            arg[2, 2, 1]+=0.945494715498*x[2]**o+(0.370685893014)*x[2]
+            ref[2, 2, 1, 2]=0.945494715498*o*x_ref[2]**(o-1)+(0.370685893014)
+            arg[2, 2, 2]+=0.187045259129*x[2]**o+(-0.145247890708)*x[2]
+            ref[2, 2, 2, 2]=0.187045259129*o*x_ref[2]**(o-1)+(-0.145247890708)
+            arg[2, 3, 0]+=-0.819021232185*x[2]**o+(-0.842595412693)*x[2]
+            ref[2, 3, 0, 2]=-0.819021232185*o*x_ref[2]**(o-1)+(-0.842595412693)
+            arg[2, 3, 1]+=0.781126099071*x[2]**o+(-0.997658047584)*x[2]
+            ref[2, 3, 1, 2]=0.781126099071*o*x_ref[2]**(o-1)+(-0.997658047584)
+            arg[2, 3, 2]+=0.186048725866*x[2]**o+(0.519740720119)*x[2]
+            ref[2, 3, 2, 2]=0.186048725866*o*x_ref[2]**(o-1)+(0.519740720119)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 4, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.801276466284*x[0]**o+(-0.203667169965)*x[0]+(0.696725780406)*x[1]**o+(0.336683534362)*x[1]
+        ref[0]=-0.801276466284*o*x_ref[0]**(o-1)+(-0.203667169965)
+        ref[1]=0.696725780406*o*x_ref[1]**(o-1)+(0.336683534362)
+        if dim==3:
+            arg+=(0.880609798255)*x[2]**o+(-0.384009626164)*x[2]
+            ref[2]=0.880609798255*o*x_ref[2]**(o-1)+(-0.384009626164)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=-0.319717294218*x[0]**o+(-0.953561349011)*x[0]+(0.565074037507)*x[1]**o+(-0.572400862081)*x[1]
+        ref[0, 0]=-0.319717294218*o*x_ref[0]**(o-1)+(-0.953561349011)
+        ref[0, 1]=0.565074037507*o*x_ref[1]**(o-1)+(-0.572400862081)
+        arg[1,]=-0.966593900519*x[0]**o+(-0.0897414034778)*x[0]+(0.403119257792)*x[1]**o+(-0.267913491338)*x[1]
+        ref[1, 0]=-0.966593900519*o*x_ref[0]**(o-1)+(-0.0897414034778)
+        ref[1, 1]=0.403119257792*o*x_ref[1]**(o-1)+(-0.267913491338)
+        arg[2,]=0.0506479991463*x[0]**o+(0.584114358342)*x[0]+(-0.910423074917)*x[1]**o+(0.380489007841)*x[1]
+        ref[2, 0]=0.0506479991463*o*x_ref[0]**(o-1)+(0.584114358342)
+        ref[2, 1]=-0.910423074917*o*x_ref[1]**(o-1)+(0.380489007841)
+        if dim==3:
+            arg[0,]+=0.868007611815*x[2]**o+(0.328664238737)*x[2]
+            ref[0, 2]=0.868007611815*o*x_ref[2]**(o-1)+(0.328664238737)
+            arg[1,]+=0.577887173315*x[2]**o+(0.244451493822)*x[2]
+            ref[1, 2]=0.577887173315*o*x_ref[2]**(o-1)+(0.244451493822)
+            arg[2,]+=-0.29149154705*x[2]**o+(0.963973929905)*x[2]
+            ref[2, 2]=-0.29149154705*o*x_ref[2]**(o-1)+(0.963973929905)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4)+(dim,),w_ref)
+        arg[0, 0]=-0.129805883807*x[0]**o+(0.309949605078)*x[0]+(0.226399747525)*x[1]**o+(0.874930960072)*x[1]
+        ref[0, 0, 0]=-0.129805883807*o*x_ref[0]**(o-1)+(0.309949605078)
+        ref[0, 0, 1]=0.226399747525*o*x_ref[1]**(o-1)+(0.874930960072)
+        arg[0, 1]=-0.721709817116*x[0]**o+(0.571226041168)*x[0]+(0.173209490911)*x[1]**o+(0.662964669423)*x[1]
+        ref[0, 1, 0]=-0.721709817116*o*x_ref[0]**(o-1)+(0.571226041168)
+        ref[0, 1, 1]=0.173209490911*o*x_ref[1]**(o-1)+(0.662964669423)
+        arg[0, 2]=0.806246080163*x[0]**o+(0.353336409942)*x[0]+(-0.818121551852)*x[1]**o+(0.976212261416)*x[1]
+        ref[0, 2, 0]=0.806246080163*o*x_ref[0]**(o-1)+(0.353336409942)
+        ref[0, 2, 1]=-0.818121551852*o*x_ref[1]**(o-1)+(0.976212261416)
+        arg[0, 3]=0.740523663486*x[0]**o+(-0.810219545691)*x[0]+(0.550516443725)*x[1]**o+(-0.244275628883)*x[1]
+        ref[0, 3, 0]=0.740523663486*o*x_ref[0]**(o-1)+(-0.810219545691)
+        ref[0, 3, 1]=0.550516443725*o*x_ref[1]**(o-1)+(-0.244275628883)
+        arg[1, 0]=-0.597042483369*x[0]**o+(0.0576177044189)*x[0]+(-0.212571826705)*x[1]**o+(-0.699297490952)*x[1]
+        ref[1, 0, 0]=-0.597042483369*o*x_ref[0]**(o-1)+(0.0576177044189)
+        ref[1, 0, 1]=-0.212571826705*o*x_ref[1]**(o-1)+(-0.699297490952)
+        arg[1, 1]=-0.703485785493*x[0]**o+(-0.225760979738)*x[0]+(-0.0468959167331)*x[1]**o+(-0.469618158879)*x[1]
+        ref[1, 1, 0]=-0.703485785493*o*x_ref[0]**(o-1)+(-0.225760979738)
+        ref[1, 1, 1]=-0.0468959167331*o*x_ref[1]**(o-1)+(-0.469618158879)
+        arg[1, 2]=-0.64764332584*x[0]**o+(0.951281110931)*x[0]+(0.574559958642)*x[1]**o+(0.213518145125)*x[1]
+        ref[1, 2, 0]=-0.64764332584*o*x_ref[0]**(o-1)+(0.951281110931)
+        ref[1, 2, 1]=0.574559958642*o*x_ref[1]**(o-1)+(0.213518145125)
+        arg[1, 3]=-0.067868607927*x[0]**o+(0.0409620745049)*x[0]+(-0.597570598041)*x[1]**o+(0.69083441317)*x[1]
+        ref[1, 3, 0]=-0.067868607927*o*x_ref[0]**(o-1)+(0.0409620745049)
+        ref[1, 3, 1]=-0.597570598041*o*x_ref[1]**(o-1)+(0.69083441317)
+        if dim==3:
+            arg[0, 0]+=-0.584428828973*x[2]**o+(-0.556584956238)*x[2]
+            ref[0, 0, 2]=-0.584428828973*o*x_ref[2]**(o-1)+(-0.556584956238)
+            arg[0, 1]+=-0.201980060032*x[2]**o+(-0.469787723424)*x[2]
+            ref[0, 1, 2]=-0.201980060032*o*x_ref[2]**(o-1)+(-0.469787723424)
+            arg[0, 2]+=-0.124423924185*x[2]**o+(0.348003475752)*x[2]
+            ref[0, 2, 2]=-0.124423924185*o*x_ref[2]**(o-1)+(0.348003475752)
+            arg[0, 3]+=-0.967625505701*x[2]**o+(0.634753694445)*x[2]
+            ref[0, 3, 2]=-0.967625505701*o*x_ref[2]**(o-1)+(0.634753694445)
+            arg[1, 0]+=-0.0350661477449*x[2]**o+(0.924446223823)*x[2]
+            ref[1, 0, 2]=-0.0350661477449*o*x_ref[2]**(o-1)+(0.924446223823)
+            arg[1, 1]+=-0.926304812611*x[2]**o+(-0.359568889546)*x[2]
+            ref[1, 1, 2]=-0.926304812611*o*x_ref[2]**(o-1)+(-0.359568889546)
+            arg[1, 2]+=0.88918827618*x[2]**o+(-0.393257808619)*x[2]
+            ref[1, 2, 2]=0.88918827618*o*x_ref[2]**(o-1)+(-0.393257808619)
+            arg[1, 3]+=-0.00351305133043*x[2]**o+(-0.433918595675)*x[2]
+            ref[1, 3, 2]=-0.00351305133043*o*x_ref[2]**(o-1)+(-0.433918595675)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3),w)
+        ref = Data(0,(4, 3, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.665858572415*x[0]**o+(-0.00879038216478)*x[0]+(-0.0211411473872)*x[1]**o+(0.305572262151)*x[1]
+        ref[0, 0, 0, 0]=-0.665858572415*o*x_ref[0]**(o-1)+(-0.00879038216478)
+        ref[0, 0, 0, 1]=-0.0211411473872*o*x_ref[1]**(o-1)+(0.305572262151)
+        arg[0, 0, 1]=-0.232481267523*x[0]**o+(0.400913763974)*x[0]+(0.387100448018)*x[1]**o+(0.40290622318)*x[1]
+        ref[0, 0, 1, 0]=-0.232481267523*o*x_ref[0]**(o-1)+(0.400913763974)
+        ref[0, 0, 1, 1]=0.387100448018*o*x_ref[1]**(o-1)+(0.40290622318)
+        arg[0, 0, 2]=0.889166129106*x[0]**o+(-0.224482856297)*x[0]+(0.198992912263)*x[1]**o+(-0.371927166745)*x[1]
+        ref[0, 0, 2, 0]=0.889166129106*o*x_ref[0]**(o-1)+(-0.224482856297)
+        ref[0, 0, 2, 1]=0.198992912263*o*x_ref[1]**(o-1)+(-0.371927166745)
+        arg[0, 1, 0]=-0.325237333927*x[0]**o+(0.109051016672)*x[0]+(0.456902883666)*x[1]**o+(0.411812492094)*x[1]
+        ref[0, 1, 0, 0]=-0.325237333927*o*x_ref[0]**(o-1)+(0.109051016672)
+        ref[0, 1, 0, 1]=0.456902883666*o*x_ref[1]**(o-1)+(0.411812492094)
+        arg[0, 1, 1]=-0.700814588452*x[0]**o+(-0.617365058256)*x[0]+(0.967930217765)*x[1]**o+(-0.484757095195)*x[1]
+        ref[0, 1, 1, 0]=-0.700814588452*o*x_ref[0]**(o-1)+(-0.617365058256)
+        ref[0, 1, 1, 1]=0.967930217765*o*x_ref[1]**(o-1)+(-0.484757095195)
+        arg[0, 1, 2]=0.242662168149*x[0]**o+(0.441398148755)*x[0]+(-0.456271935077)*x[1]**o+(0.514383296124)*x[1]
+        ref[0, 1, 2, 0]=0.242662168149*o*x_ref[0]**(o-1)+(0.441398148755)
+        ref[0, 1, 2, 1]=-0.456271935077*o*x_ref[1]**(o-1)+(0.514383296124)
+        arg[0, 2, 0]=0.68546770094*x[0]**o+(-0.921179050738)*x[0]+(-0.405053355407)*x[1]**o+(0.85025048676)*x[1]
+        ref[0, 2, 0, 0]=0.68546770094*o*x_ref[0]**(o-1)+(-0.921179050738)
+        ref[0, 2, 0, 1]=-0.405053355407*o*x_ref[1]**(o-1)+(0.85025048676)
+        arg[0, 2, 1]=-0.440752428199*x[0]**o+(-0.00695203971705)*x[0]+(0.0701162607342)*x[1]**o+(-0.132551064898)*x[1]
+        ref[0, 2, 1, 0]=-0.440752428199*o*x_ref[0]**(o-1)+(-0.00695203971705)
+        ref[0, 2, 1, 1]=0.0701162607342*o*x_ref[1]**(o-1)+(-0.132551064898)
+        arg[0, 2, 2]=0.946181178322*x[0]**o+(0.991962217483)*x[0]+(0.844256710039)*x[1]**o+(0.409748433907)*x[1]
+        ref[0, 2, 2, 0]=0.946181178322*o*x_ref[0]**(o-1)+(0.991962217483)
+        ref[0, 2, 2, 1]=0.844256710039*o*x_ref[1]**(o-1)+(0.409748433907)
+        arg[1, 0, 0]=0.642595307195*x[0]**o+(-0.718804473968)*x[0]+(-0.611717872534)*x[1]**o+(-0.774721523037)*x[1]
+        ref[1, 0, 0, 0]=0.642595307195*o*x_ref[0]**(o-1)+(-0.718804473968)
+        ref[1, 0, 0, 1]=-0.611717872534*o*x_ref[1]**(o-1)+(-0.774721523037)
+        arg[1, 0, 1]=0.507216444036*x[0]**o+(0.184084519941)*x[0]+(0.636779018433)*x[1]**o+(-0.577005572804)*x[1]
+        ref[1, 0, 1, 0]=0.507216444036*o*x_ref[0]**(o-1)+(0.184084519941)
+        ref[1, 0, 1, 1]=0.636779018433*o*x_ref[1]**(o-1)+(-0.577005572804)
+        arg[1, 0, 2]=0.835370376855*x[0]**o+(0.00649657962696)*x[0]+(-0.124425659785)*x[1]**o+(-0.967759402815)*x[1]
+        ref[1, 0, 2, 0]=0.835370376855*o*x_ref[0]**(o-1)+(0.00649657962696)
+        ref[1, 0, 2, 1]=-0.124425659785*o*x_ref[1]**(o-1)+(-0.967759402815)
+        arg[1, 1, 0]=-0.609370805848*x[0]**o+(0.502866426574)*x[0]+(0.885737118363)*x[1]**o+(0.880641217685)*x[1]
+        ref[1, 1, 0, 0]=-0.609370805848*o*x_ref[0]**(o-1)+(0.502866426574)
+        ref[1, 1, 0, 1]=0.885737118363*o*x_ref[1]**(o-1)+(0.880641217685)
+        arg[1, 1, 1]=-0.324607200311*x[0]**o+(-0.785178789928)*x[0]+(0.0255410071019)*x[1]**o+(0.587240795664)*x[1]
+        ref[1, 1, 1, 0]=-0.324607200311*o*x_ref[0]**(o-1)+(-0.785178789928)
+        ref[1, 1, 1, 1]=0.0255410071019*o*x_ref[1]**(o-1)+(0.587240795664)
+        arg[1, 1, 2]=-0.625539943188*x[0]**o+(0.912043654826)*x[0]+(0.856193272603)*x[1]**o+(-0.0157759452728)*x[1]
+        ref[1, 1, 2, 0]=-0.625539943188*o*x_ref[0]**(o-1)+(0.912043654826)
+        ref[1, 1, 2, 1]=0.856193272603*o*x_ref[1]**(o-1)+(-0.0157759452728)
+        arg[1, 2, 0]=0.936744293829*x[0]**o+(-0.980319937881)*x[0]+(0.331610968115)*x[1]**o+(-0.614065378669)*x[1]
+        ref[1, 2, 0, 0]=0.936744293829*o*x_ref[0]**(o-1)+(-0.980319937881)
+        ref[1, 2, 0, 1]=0.331610968115*o*x_ref[1]**(o-1)+(-0.614065378669)
+        arg[1, 2, 1]=0.354303807532*x[0]**o+(0.83128631866)*x[0]+(-0.5742984508)*x[1]**o+(0.833323309203)*x[1]
+        ref[1, 2, 1, 0]=0.354303807532*o*x_ref[0]**(o-1)+(0.83128631866)
+        ref[1, 2, 1, 1]=-0.5742984508*o*x_ref[1]**(o-1)+(0.833323309203)
+        arg[1, 2, 2]=0.534246814819*x[0]**o+(-0.766537609575)*x[0]+(0.0881146164839)*x[1]**o+(0.329281135417)*x[1]
+        ref[1, 2, 2, 0]=0.534246814819*o*x_ref[0]**(o-1)+(-0.766537609575)
+        ref[1, 2, 2, 1]=0.0881146164839*o*x_ref[1]**(o-1)+(0.329281135417)
+        arg[2, 0, 0]=-0.0663168103066*x[0]**o+(-0.278808510968)*x[0]+(0.736396672428)*x[1]**o+(-0.577341833203)*x[1]
+        ref[2, 0, 0, 0]=-0.0663168103066*o*x_ref[0]**(o-1)+(-0.278808510968)
+        ref[2, 0, 0, 1]=0.736396672428*o*x_ref[1]**(o-1)+(-0.577341833203)
+        arg[2, 0, 1]=0.118057523222*x[0]**o+(-0.476971727025)*x[0]+(0.931966590981)*x[1]**o+(-0.480070347285)*x[1]
+        ref[2, 0, 1, 0]=0.118057523222*o*x_ref[0]**(o-1)+(-0.476971727025)
+        ref[2, 0, 1, 1]=0.931966590981*o*x_ref[1]**(o-1)+(-0.480070347285)
+        arg[2, 0, 2]=-0.300683133346*x[0]**o+(-0.0716962449465)*x[0]+(0.156058801458)*x[1]**o+(-0.266323987947)*x[1]
+        ref[2, 0, 2, 0]=-0.300683133346*o*x_ref[0]**(o-1)+(-0.0716962449465)
+        ref[2, 0, 2, 1]=0.156058801458*o*x_ref[1]**(o-1)+(-0.266323987947)
+        arg[2, 1, 0]=0.174460679229*x[0]**o+(-0.161612623996)*x[0]+(0.684284012928)*x[1]**o+(-0.187085139844)*x[1]
+        ref[2, 1, 0, 0]=0.174460679229*o*x_ref[0]**(o-1)+(-0.161612623996)
+        ref[2, 1, 0, 1]=0.684284012928*o*x_ref[1]**(o-1)+(-0.187085139844)
+        arg[2, 1, 1]=-0.0363755951425*x[0]**o+(-0.412957567459)*x[0]+(0.835069230986)*x[1]**o+(-0.268532946396)*x[1]
+        ref[2, 1, 1, 0]=-0.0363755951425*o*x_ref[0]**(o-1)+(-0.412957567459)
+        ref[2, 1, 1, 1]=0.835069230986*o*x_ref[1]**(o-1)+(-0.268532946396)
+        arg[2, 1, 2]=0.815189420961*x[0]**o+(-0.365402210334)*x[0]+(0.857531785097)*x[1]**o+(0.887934272114)*x[1]
+        ref[2, 1, 2, 0]=0.815189420961*o*x_ref[0]**(o-1)+(-0.365402210334)
+        ref[2, 1, 2, 1]=0.857531785097*o*x_ref[1]**(o-1)+(0.887934272114)
+        arg[2, 2, 0]=0.534230800546*x[0]**o+(0.0441347682941)*x[0]+(-0.0186746717047)*x[1]**o+(-0.536928383682)*x[1]
+        ref[2, 2, 0, 0]=0.534230800546*o*x_ref[0]**(o-1)+(0.0441347682941)
+        ref[2, 2, 0, 1]=-0.0186746717047*o*x_ref[1]**(o-1)+(-0.536928383682)
+        arg[2, 2, 1]=-0.940313837828*x[0]**o+(0.259282543793)*x[0]+(-0.326649043566)*x[1]**o+(-0.549392838938)*x[1]
+        ref[2, 2, 1, 0]=-0.940313837828*o*x_ref[0]**(o-1)+(0.259282543793)
+        ref[2, 2, 1, 1]=-0.326649043566*o*x_ref[1]**(o-1)+(-0.549392838938)
+        arg[2, 2, 2]=-0.813866528211*x[0]**o+(0.978545505271)*x[0]+(-0.163075589037)*x[1]**o+(0.542423520638)*x[1]
+        ref[2, 2, 2, 0]=-0.813866528211*o*x_ref[0]**(o-1)+(0.978545505271)
+        ref[2, 2, 2, 1]=-0.163075589037*o*x_ref[1]**(o-1)+(0.542423520638)
+        arg[3, 0, 0]=0.706990871064*x[0]**o+(-0.568334477851)*x[0]+(0.421273988546)*x[1]**o+(-0.150726558052)*x[1]
+        ref[3, 0, 0, 0]=0.706990871064*o*x_ref[0]**(o-1)+(-0.568334477851)
+        ref[3, 0, 0, 1]=0.421273988546*o*x_ref[1]**(o-1)+(-0.150726558052)
+        arg[3, 0, 1]=0.907422198136*x[0]**o+(-0.290645507611)*x[0]+(0.856188954957)*x[1]**o+(0.501182867072)*x[1]
+        ref[3, 0, 1, 0]=0.907422198136*o*x_ref[0]**(o-1)+(-0.290645507611)
+        ref[3, 0, 1, 1]=0.856188954957*o*x_ref[1]**(o-1)+(0.501182867072)
+        arg[3, 0, 2]=0.106716507585*x[0]**o+(-0.0317968338442)*x[0]+(-0.494812952186)*x[1]**o+(0.392400990669)*x[1]
+        ref[3, 0, 2, 0]=0.106716507585*o*x_ref[0]**(o-1)+(-0.0317968338442)
+        ref[3, 0, 2, 1]=-0.494812952186*o*x_ref[1]**(o-1)+(0.392400990669)
+        arg[3, 1, 0]=-0.304582867079*x[0]**o+(0.30190107521)*x[0]+(-0.238306780538)*x[1]**o+(0.711784084707)*x[1]
+        ref[3, 1, 0, 0]=-0.304582867079*o*x_ref[0]**(o-1)+(0.30190107521)
+        ref[3, 1, 0, 1]=-0.238306780538*o*x_ref[1]**(o-1)+(0.711784084707)
+        arg[3, 1, 1]=0.0520023651603*x[0]**o+(0.742248532175)*x[0]+(0.262379817904)*x[1]**o+(-0.0952077479064)*x[1]
+        ref[3, 1, 1, 0]=0.0520023651603*o*x_ref[0]**(o-1)+(0.742248532175)
+        ref[3, 1, 1, 1]=0.262379817904*o*x_ref[1]**(o-1)+(-0.0952077479064)
+        arg[3, 1, 2]=-0.891621741064*x[0]**o+(0.711121505824)*x[0]+(0.587940602217)*x[1]**o+(-0.327536222608)*x[1]
+        ref[3, 1, 2, 0]=-0.891621741064*o*x_ref[0]**(o-1)+(0.711121505824)
+        ref[3, 1, 2, 1]=0.587940602217*o*x_ref[1]**(o-1)+(-0.327536222608)
+        arg[3, 2, 0]=0.195678299232*x[0]**o+(-0.0412287435142)*x[0]+(0.584552059798)*x[1]**o+(0.615316409267)*x[1]
+        ref[3, 2, 0, 0]=0.195678299232*o*x_ref[0]**(o-1)+(-0.0412287435142)
+        ref[3, 2, 0, 1]=0.584552059798*o*x_ref[1]**(o-1)+(0.615316409267)
+        arg[3, 2, 1]=0.0429199599862*x[0]**o+(-0.914148678178)*x[0]+(-0.435310806028)*x[1]**o+(0.240986488782)*x[1]
+        ref[3, 2, 1, 0]=0.0429199599862*o*x_ref[0]**(o-1)+(-0.914148678178)
+        ref[3, 2, 1, 1]=-0.435310806028*o*x_ref[1]**(o-1)+(0.240986488782)
+        arg[3, 2, 2]=0.976562737291*x[0]**o+(0.173646726536)*x[0]+(-0.0594604188692)*x[1]**o+(-0.844587352895)*x[1]
+        ref[3, 2, 2, 0]=0.976562737291*o*x_ref[0]**(o-1)+(0.173646726536)
+        ref[3, 2, 2, 1]=-0.0594604188692*o*x_ref[1]**(o-1)+(-0.844587352895)
+        if dim==3:
+            arg[0, 0, 0]+=0.412520209676*x[2]**o+(-0.928290033487)*x[2]
+            ref[0, 0, 0, 2]=0.412520209676*o*x_ref[2]**(o-1)+(-0.928290033487)
+            arg[0, 0, 1]+=-0.0976350244753*x[2]**o+(0.187651249676)*x[2]
+            ref[0, 0, 1, 2]=-0.0976350244753*o*x_ref[2]**(o-1)+(0.187651249676)
+            arg[0, 0, 2]+=-0.953269504233*x[2]**o+(0.154735240656)*x[2]
+            ref[0, 0, 2, 2]=-0.953269504233*o*x_ref[2]**(o-1)+(0.154735240656)
+            arg[0, 1, 0]+=-0.664308995386*x[2]**o+(0.35395608213)*x[2]
+            ref[0, 1, 0, 2]=-0.664308995386*o*x_ref[2]**(o-1)+(0.35395608213)
+            arg[0, 1, 1]+=-0.486908738985*x[2]**o+(0.33404248845)*x[2]
+            ref[0, 1, 1, 2]=-0.486908738985*o*x_ref[2]**(o-1)+(0.33404248845)
+            arg[0, 1, 2]+=0.0570397549329*x[2]**o+(-0.0263436229723)*x[2]
+            ref[0, 1, 2, 2]=0.0570397549329*o*x_ref[2]**(o-1)+(-0.0263436229723)
+            arg[0, 2, 0]+=0.573632130319*x[2]**o+(0.0376130463043)*x[2]
+            ref[0, 2, 0, 2]=0.573632130319*o*x_ref[2]**(o-1)+(0.0376130463043)
+            arg[0, 2, 1]+=0.537293663771*x[2]**o+(-0.526515036143)*x[2]
+            ref[0, 2, 1, 2]=0.537293663771*o*x_ref[2]**(o-1)+(-0.526515036143)
+            arg[0, 2, 2]+=0.921118685909*x[2]**o+(-0.140631441516)*x[2]
+            ref[0, 2, 2, 2]=0.921118685909*o*x_ref[2]**(o-1)+(-0.140631441516)
+            arg[1, 0, 0]+=-0.990406246952*x[2]**o+(-0.163487934095)*x[2]
+            ref[1, 0, 0, 2]=-0.990406246952*o*x_ref[2]**(o-1)+(-0.163487934095)
+            arg[1, 0, 1]+=-0.947451331136*x[2]**o+(-0.33608747378)*x[2]
+            ref[1, 0, 1, 2]=-0.947451331136*o*x_ref[2]**(o-1)+(-0.33608747378)
+            arg[1, 0, 2]+=-0.643129840822*x[2]**o+(0.759781950844)*x[2]
+            ref[1, 0, 2, 2]=-0.643129840822*o*x_ref[2]**(o-1)+(0.759781950844)
+            arg[1, 1, 0]+=0.501844221098*x[2]**o+(0.972380447054)*x[2]
+            ref[1, 1, 0, 2]=0.501844221098*o*x_ref[2]**(o-1)+(0.972380447054)
+            arg[1, 1, 1]+=-0.98959292097*x[2]**o+(0.589853367337)*x[2]
+            ref[1, 1, 1, 2]=-0.98959292097*o*x_ref[2]**(o-1)+(0.589853367337)
+            arg[1, 1, 2]+=-0.717127833925*x[2]**o+(0.168273730311)*x[2]
+            ref[1, 1, 2, 2]=-0.717127833925*o*x_ref[2]**(o-1)+(0.168273730311)
+            arg[1, 2, 0]+=-0.591974143402*x[2]**o+(-0.365434481092)*x[2]
+            ref[1, 2, 0, 2]=-0.591974143402*o*x_ref[2]**(o-1)+(-0.365434481092)
+            arg[1, 2, 1]+=-0.12849702098*x[2]**o+(-0.361797799338)*x[2]
+            ref[1, 2, 1, 2]=-0.12849702098*o*x_ref[2]**(o-1)+(-0.361797799338)
+            arg[1, 2, 2]+=-0.526007892666*x[2]**o+(0.0395838913274)*x[2]
+            ref[1, 2, 2, 2]=-0.526007892666*o*x_ref[2]**(o-1)+(0.0395838913274)
+            arg[2, 0, 0]+=0.384401574411*x[2]**o+(-0.892124284587)*x[2]
+            ref[2, 0, 0, 2]=0.384401574411*o*x_ref[2]**(o-1)+(-0.892124284587)
+            arg[2, 0, 1]+=-0.594255626442*x[2]**o+(-0.461756058402)*x[2]
+            ref[2, 0, 1, 2]=-0.594255626442*o*x_ref[2]**(o-1)+(-0.461756058402)
+            arg[2, 0, 2]+=-0.0179670873916*x[2]**o+(0.819819583966)*x[2]
+            ref[2, 0, 2, 2]=-0.0179670873916*o*x_ref[2]**(o-1)+(0.819819583966)
+            arg[2, 1, 0]+=-0.770098138742*x[2]**o+(0.460416640222)*x[2]
+            ref[2, 1, 0, 2]=-0.770098138742*o*x_ref[2]**(o-1)+(0.460416640222)
+            arg[2, 1, 1]+=0.406329270681*x[2]**o+(-0.184424805036)*x[2]
+            ref[2, 1, 1, 2]=0.406329270681*o*x_ref[2]**(o-1)+(-0.184424805036)
+            arg[2, 1, 2]+=-0.734315137932*x[2]**o+(-0.92047085623)*x[2]
+            ref[2, 1, 2, 2]=-0.734315137932*o*x_ref[2]**(o-1)+(-0.92047085623)
+            arg[2, 2, 0]+=-0.715008710765*x[2]**o+(0.528158811551)*x[2]
+            ref[2, 2, 0, 2]=-0.715008710765*o*x_ref[2]**(o-1)+(0.528158811551)
+            arg[2, 2, 1]+=-0.472632002025*x[2]**o+(-0.471994477385)*x[2]
+            ref[2, 2, 1, 2]=-0.472632002025*o*x_ref[2]**(o-1)+(-0.471994477385)
+            arg[2, 2, 2]+=-0.00229267163894*x[2]**o+(-0.0801812668091)*x[2]
+            ref[2, 2, 2, 2]=-0.00229267163894*o*x_ref[2]**(o-1)+(-0.0801812668091)
+            arg[3, 0, 0]+=0.28332447553*x[2]**o+(0.0282463159533)*x[2]
+            ref[3, 0, 0, 2]=0.28332447553*o*x_ref[2]**(o-1)+(0.0282463159533)
+            arg[3, 0, 1]+=0.625169531108*x[2]**o+(-0.831507651289)*x[2]
+            ref[3, 0, 1, 2]=0.625169531108*o*x_ref[2]**(o-1)+(-0.831507651289)
+            arg[3, 0, 2]+=-0.57863948745*x[2]**o+(0.439698086471)*x[2]
+            ref[3, 0, 2, 2]=-0.57863948745*o*x_ref[2]**(o-1)+(0.439698086471)
+            arg[3, 1, 0]+=0.347241683934*x[2]**o+(-0.59009695069)*x[2]
+            ref[3, 1, 0, 2]=0.347241683934*o*x_ref[2]**(o-1)+(-0.59009695069)
+            arg[3, 1, 1]+=0.908961719586*x[2]**o+(-0.646156229986)*x[2]
+            ref[3, 1, 1, 2]=0.908961719586*o*x_ref[2]**(o-1)+(-0.646156229986)
+            arg[3, 1, 2]+=0.414005928468*x[2]**o+(0.142640748346)*x[2]
+            ref[3, 1, 2, 2]=0.414005928468*o*x_ref[2]**(o-1)+(0.142640748346)
+            arg[3, 2, 0]+=0.857740031278*x[2]**o+(0.516440176303)*x[2]
+            ref[3, 2, 0, 2]=0.857740031278*o*x_ref[2]**(o-1)+(0.516440176303)
+            arg[3, 2, 1]+=-0.973660542938*x[2]**o+(0.348253925219)*x[2]
+            ref[3, 2, 1, 2]=-0.973660542938*o*x_ref[2]**(o-1)+(0.348253925219)
+            arg[3, 2, 2]+=0.168830271624*x[2]**o+(-0.2102593162)*x[2]
+            ref[3, 2, 2, 2]=0.168830271624*o*x_ref[2]**(o-1)+(-0.2102593162)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.417853581074*x[0]+(0.727101513772)*x[1]
+        ref[0]=0.417853581074
+        ref[1]=0.727101513772
+        if dim==3:
+            arg+=(0.125368445578)*x[2]
+            ref[2]=0.125368445578
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=-0.268543929171*x[0]+(-0.867348450326)*x[1]
+        ref[0, 0]=-0.268543929171
+        ref[0, 1]=-0.867348450326
+        arg[1,]=0.182786113728*x[0]+(0.63574122343)*x[1]
+        ref[1, 0]=0.182786113728
+        ref[1, 1]=0.63574122343
+        arg[2,]=-0.111015572545*x[0]+(0.418461499821)*x[1]
+        ref[2, 0]=-0.111015572545
+        ref[2, 1]=0.418461499821
+        if dim==3:
+            arg[0,]+=0.182531729675*x[2]
+            ref[0, 2]=0.182531729675
+            arg[1,]+=0.930770273746*x[2]
+            ref[1, 2]=0.930770273746
+            arg[2,]+=-0.0766795015963*x[2]
+            ref[2, 2]=-0.0766795015963
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4)+(dim,),w_ref)
+        arg[0, 0]=0.239008047772*x[0]+(0.714380655334)*x[1]
+        ref[0, 0, 0]=0.239008047772
+        ref[0, 0, 1]=0.714380655334
+        arg[0, 1]=0.163375312863*x[0]+(0.205276749122)*x[1]
+        ref[0, 1, 0]=0.163375312863
+        ref[0, 1, 1]=0.205276749122
+        arg[0, 2]=0.34393791618*x[0]+(0.0568326609947)*x[1]
+        ref[0, 2, 0]=0.34393791618
+        ref[0, 2, 1]=0.0568326609947
+        arg[0, 3]=0.185398330712*x[0]+(0.773994974374)*x[1]
+        ref[0, 3, 0]=0.185398330712
+        ref[0, 3, 1]=0.773994974374
+        arg[1, 0]=0.362739552435*x[0]+(0.178258760991)*x[1]
+        ref[1, 0, 0]=0.362739552435
+        ref[1, 0, 1]=0.178258760991
+        arg[1, 1]=0.894067424318*x[0]+(0.0555387710338)*x[1]
+        ref[1, 1, 0]=0.894067424318
+        ref[1, 1, 1]=0.0555387710338
+        arg[1, 2]=-0.39805806464*x[0]+(-0.0674756970241)*x[1]
+        ref[1, 2, 0]=-0.39805806464
+        ref[1, 2, 1]=-0.0674756970241
+        arg[1, 3]=-0.227647435344*x[0]+(0.22509124331)*x[1]
+        ref[1, 3, 0]=-0.227647435344
+        ref[1, 3, 1]=0.22509124331
+        if dim==3:
+            arg[0, 0]+=0.51552132541*x[2]
+            ref[0, 0, 2]=0.51552132541
+            arg[0, 1]+=-0.389921754802*x[2]
+            ref[0, 1, 2]=-0.389921754802
+            arg[0, 2]+=0.812931976385*x[2]
+            ref[0, 2, 2]=0.812931976385
+            arg[0, 3]+=0.105836862755*x[2]
+            ref[0, 3, 2]=0.105836862755
+            arg[1, 0]+=0.500884902379*x[2]
+            ref[1, 0, 2]=0.500884902379
+            arg[1, 1]+=-0.905801530225*x[2]
+            ref[1, 1, 2]=-0.905801530225
+            arg[1, 2]+=0.280546704618*x[2]
+            ref[1, 2, 2]=0.280546704618
+            arg[1, 3]+=0.577230258554*x[2]
+            ref[1, 3, 2]=0.577230258554
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.683922659764*x[0]+(0.519179438273)*x[1]
+        ref[0, 0, 0, 0]=-0.683922659764
+        ref[0, 0, 0, 1]=0.519179438273
+        arg[0, 0, 1]=0.284075204338*x[0]+(0.653530475175)*x[1]
+        ref[0, 0, 1, 0]=0.284075204338
+        ref[0, 0, 1, 1]=0.653530475175
+        arg[0, 1, 0]=-0.914028441947*x[0]+(0.187757994647)*x[1]
+        ref[0, 1, 0, 0]=-0.914028441947
+        ref[0, 1, 0, 1]=0.187757994647
+        arg[0, 1, 1]=-0.53952340669*x[0]+(-0.0430834298881)*x[1]
+        ref[0, 1, 1, 0]=-0.53952340669
+        ref[0, 1, 1, 1]=-0.0430834298881
+        arg[0, 2, 0]=0.615262045242*x[0]+(-0.880123918932)*x[1]
+        ref[0, 2, 0, 0]=0.615262045242
+        ref[0, 2, 0, 1]=-0.880123918932
+        arg[0, 2, 1]=0.395900337952*x[0]+(-0.825215636228)*x[1]
+        ref[0, 2, 1, 0]=0.395900337952
+        ref[0, 2, 1, 1]=-0.825215636228
+        arg[1, 0, 0]=0.783694959145*x[0]+(0.680964219489)*x[1]
+        ref[1, 0, 0, 0]=0.783694959145
+        ref[1, 0, 0, 1]=0.680964219489
+        arg[1, 0, 1]=0.00400688488306*x[0]+(0.330115371816)*x[1]
+        ref[1, 0, 1, 0]=0.00400688488306
+        ref[1, 0, 1, 1]=0.330115371816
+        arg[1, 1, 0]=0.30265083581*x[0]+(0.336394899065)*x[1]
+        ref[1, 1, 0, 0]=0.30265083581
+        ref[1, 1, 0, 1]=0.336394899065
+        arg[1, 1, 1]=0.366938236675*x[0]+(-0.646057481157)*x[1]
+        ref[1, 1, 1, 0]=0.366938236675
+        ref[1, 1, 1, 1]=-0.646057481157
+        arg[1, 2, 0]=-0.275627592694*x[0]+(-0.284040012939)*x[1]
+        ref[1, 2, 0, 0]=-0.275627592694
+        ref[1, 2, 0, 1]=-0.284040012939
+        arg[1, 2, 1]=0.556509563997*x[0]+(0.558858612748)*x[1]
+        ref[1, 2, 1, 0]=0.556509563997
+        ref[1, 2, 1, 1]=0.558858612748
+        arg[2, 0, 0]=0.76180033038*x[0]+(0.522305434245)*x[1]
+        ref[2, 0, 0, 0]=0.76180033038
+        ref[2, 0, 0, 1]=0.522305434245
+        arg[2, 0, 1]=0.0967673099314*x[0]+(-0.971876190139)*x[1]
+        ref[2, 0, 1, 0]=0.0967673099314
+        ref[2, 0, 1, 1]=-0.971876190139
+        arg[2, 1, 0]=0.512365546566*x[0]+(-0.258780308968)*x[1]
+        ref[2, 1, 0, 0]=0.512365546566
+        ref[2, 1, 0, 1]=-0.258780308968
+        arg[2, 1, 1]=0.0694281311726*x[0]+(0.406159438852)*x[1]
+        ref[2, 1, 1, 0]=0.0694281311726
+        ref[2, 1, 1, 1]=0.406159438852
+        arg[2, 2, 0]=-0.499203444643*x[0]+(0.510710662169)*x[1]
+        ref[2, 2, 0, 0]=-0.499203444643
+        ref[2, 2, 0, 1]=0.510710662169
+        arg[2, 2, 1]=0.973946947345*x[0]+(-0.344458910114)*x[1]
+        ref[2, 2, 1, 0]=0.973946947345
+        ref[2, 2, 1, 1]=-0.344458910114
+        arg[3, 0, 0]=0.888868389517*x[0]+(-0.476177722247)*x[1]
+        ref[3, 0, 0, 0]=0.888868389517
+        ref[3, 0, 0, 1]=-0.476177722247
+        arg[3, 0, 1]=0.226346748393*x[0]+(0.228243152465)*x[1]
+        ref[3, 0, 1, 0]=0.226346748393
+        ref[3, 0, 1, 1]=0.228243152465
+        arg[3, 1, 0]=-0.10861449602*x[0]+(-0.280173876451)*x[1]
+        ref[3, 1, 0, 0]=-0.10861449602
+        ref[3, 1, 0, 1]=-0.280173876451
+        arg[3, 1, 1]=0.517260448091*x[0]+(0.320069838895)*x[1]
+        ref[3, 1, 1, 0]=0.517260448091
+        ref[3, 1, 1, 1]=0.320069838895
+        arg[3, 2, 0]=0.0766353109084*x[0]+(0.426370526402)*x[1]
+        ref[3, 2, 0, 0]=0.0766353109084
+        ref[3, 2, 0, 1]=0.426370526402
+        arg[3, 2, 1]=0.0298435844975*x[0]+(0.403135174817)*x[1]
+        ref[3, 2, 1, 0]=0.0298435844975
+        ref[3, 2, 1, 1]=0.403135174817
+        if dim==3:
+            arg[0, 0, 0]+=-0.139347974222*x[2]
+            ref[0, 0, 0, 2]=-0.139347974222
+            arg[0, 0, 1]+=-0.433363522376*x[2]
+            ref[0, 0, 1, 2]=-0.433363522376
+            arg[0, 1, 0]+=0.429351834124*x[2]
+            ref[0, 1, 0, 2]=0.429351834124
+            arg[0, 1, 1]+=-0.246559896651*x[2]
+            ref[0, 1, 1, 2]=-0.246559896651
+            arg[0, 2, 0]+=0.0212314586167*x[2]
+            ref[0, 2, 0, 2]=0.0212314586167
+            arg[0, 2, 1]+=-0.0294561227763*x[2]
+            ref[0, 2, 1, 2]=-0.0294561227763
+            arg[1, 0, 0]+=0.62480717378*x[2]
+            ref[1, 0, 0, 2]=0.62480717378
+            arg[1, 0, 1]+=0.447561937909*x[2]
+            ref[1, 0, 1, 2]=0.447561937909
+            arg[1, 1, 0]+=-0.810147868468*x[2]
+            ref[1, 1, 0, 2]=-0.810147868468
+            arg[1, 1, 1]+=-0.346916794405*x[2]
+            ref[1, 1, 1, 2]=-0.346916794405
+            arg[1, 2, 0]+=-0.447673372363*x[2]
+            ref[1, 2, 0, 2]=-0.447673372363
+            arg[1, 2, 1]+=-0.745869677376*x[2]
+            ref[1, 2, 1, 2]=-0.745869677376
+            arg[2, 0, 0]+=0.342694225979*x[2]
+            ref[2, 0, 0, 2]=0.342694225979
+            arg[2, 0, 1]+=0.448732219394*x[2]
+            ref[2, 0, 1, 2]=0.448732219394
+            arg[2, 1, 0]+=-0.0733477923775*x[2]
+            ref[2, 1, 0, 2]=-0.0733477923775
+            arg[2, 1, 1]+=0.246504335723*x[2]
+            ref[2, 1, 1, 2]=0.246504335723
+            arg[2, 2, 0]+=0.461870351925*x[2]
+            ref[2, 2, 0, 2]=0.461870351925
+            arg[2, 2, 1]+=0.0889222372116*x[2]
+            ref[2, 2, 1, 2]=0.0889222372116
+            arg[3, 0, 0]+=0.604468365458*x[2]
+            ref[3, 0, 0, 2]=0.604468365458
+            arg[3, 0, 1]+=-0.0616651014635*x[2]
+            ref[3, 0, 1, 2]=-0.0616651014635
+            arg[3, 1, 0]+=0.159853791277*x[2]
+            ref[3, 1, 0, 2]=0.159853791277
+            arg[3, 1, 1]+=-0.0429105951958*x[2]
+            ref[3, 1, 1, 2]=-0.0429105951958
+            arg[3, 2, 0]+=-0.556652883609*x[2]
+            ref[3, 2, 0, 2]=-0.556652883609
+            arg[3, 2, 1]+=-0.630873328501*x[2]
+            ref[3, 2, 1, 2]=-0.630873328501
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.0582687449884*x[0]+(-0.831072863072)*x[1]
+        ref[0]=-0.0582687449884
+        ref[1]=-0.831072863072
+        if dim==3:
+            arg+=(0.950529449912)*x[2]
+            ref[2]=0.950529449912
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.949584640612*x[0]+(0.968816010553)*x[1]
+        ref[0, 0]=-0.949584640612
+        ref[0, 1]=0.968816010553
+        arg[1,]=0.253306085952*x[0]+(-0.52646811532)*x[1]
+        ref[1, 0]=0.253306085952
+        ref[1, 1]=-0.52646811532
+        if dim==3:
+            arg[0,]+=0.0444266638704*x[2]
+            ref[0, 2]=0.0444266638704
+            arg[1,]+=-0.16066671911*x[2]
+            ref[1, 2]=-0.16066671911
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=0.887464987227*x[0]+(0.780908978699)*x[1]
+        ref[0, 0, 0]=0.887464987227
+        ref[0, 0, 1]=0.780908978699
+        arg[0, 1]=-0.199743730721*x[0]+(-0.974212523158)*x[1]
+        ref[0, 1, 0]=-0.199743730721
+        ref[0, 1, 1]=-0.974212523158
+        arg[1, 0]=0.877710211207*x[0]+(-0.319439199813)*x[1]
+        ref[1, 0, 0]=0.877710211207
+        ref[1, 0, 1]=-0.319439199813
+        arg[1, 1]=-0.196109636946*x[0]+(0.899931619163)*x[1]
+        ref[1, 1, 0]=-0.196109636946
+        ref[1, 1, 1]=0.899931619163
+        if dim==3:
+            arg[0, 0]+=0.148676173659*x[2]
+            ref[0, 0, 2]=0.148676173659
+            arg[0, 1]+=0.853094198187*x[2]
+            ref[0, 1, 2]=0.853094198187
+            arg[1, 0]+=0.769104021704*x[2]
+            ref[1, 0, 2]=0.769104021704
+            arg[1, 1]+=0.140696971338*x[2]
+            ref[1, 1, 2]=0.140696971338
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on FunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on FunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3),w)
+        ref = Data(0,(4, 3, 3)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.469985069343*x[0]+(-0.929057422604)*x[1]
+        ref[0, 0, 0, 0]=-0.469985069343
+        ref[0, 0, 0, 1]=-0.929057422604
+        arg[0, 0, 1]=0.364005241895*x[0]+(0.979640228751)*x[1]
+        ref[0, 0, 1, 0]=0.364005241895
+        ref[0, 0, 1, 1]=0.979640228751
+        arg[0, 0, 2]=0.946159992299*x[0]+(0.271340326464)*x[1]
+        ref[0, 0, 2, 0]=0.946159992299
+        ref[0, 0, 2, 1]=0.271340326464
+        arg[0, 1, 0]=0.386877051144*x[0]+(0.865383665707)*x[1]
+        ref[0, 1, 0, 0]=0.386877051144
+        ref[0, 1, 0, 1]=0.865383665707
+        arg[0, 1, 1]=0.915091978071*x[0]+(0.287141627888)*x[1]
+        ref[0, 1, 1, 0]=0.915091978071
+        ref[0, 1, 1, 1]=0.287141627888
+        arg[0, 1, 2]=0.201267997491*x[0]+(0.405535977488)*x[1]
+        ref[0, 1, 2, 0]=0.201267997491
+        ref[0, 1, 2, 1]=0.405535977488
+        arg[0, 2, 0]=0.0457128529199*x[0]+(0.0999194404097)*x[1]
+        ref[0, 2, 0, 0]=0.0457128529199
+        ref[0, 2, 0, 1]=0.0999194404097
+        arg[0, 2, 1]=0.67630531454*x[0]+(-0.450139874082)*x[1]
+        ref[0, 2, 1, 0]=0.67630531454
+        ref[0, 2, 1, 1]=-0.450139874082
+        arg[0, 2, 2]=0.149776137375*x[0]+(0.912112236838)*x[1]
+        ref[0, 2, 2, 0]=0.149776137375
+        ref[0, 2, 2, 1]=0.912112236838
+        arg[1, 0, 0]=0.135428385729*x[0]+(-0.189262173188)*x[1]
+        ref[1, 0, 0, 0]=0.135428385729
+        ref[1, 0, 0, 1]=-0.189262173188
+        arg[1, 0, 1]=-0.763235432501*x[0]+(0.401048932591)*x[1]
+        ref[1, 0, 1, 0]=-0.763235432501
+        ref[1, 0, 1, 1]=0.401048932591
+        arg[1, 0, 2]=0.0529718990379*x[0]+(-0.46806906996)*x[1]
+        ref[1, 0, 2, 0]=0.0529718990379
+        ref[1, 0, 2, 1]=-0.46806906996
+        arg[1, 1, 0]=-0.0412028028157*x[0]+(-0.294305571448)*x[1]
+        ref[1, 1, 0, 0]=-0.0412028028157
+        ref[1, 1, 0, 1]=-0.294305571448
+        arg[1, 1, 1]=-0.0406827667548*x[0]+(-0.870435957857)*x[1]
+        ref[1, 1, 1, 0]=-0.0406827667548
+        ref[1, 1, 1, 1]=-0.870435957857
+        arg[1, 1, 2]=0.653639009923*x[0]+(0.625115162893)*x[1]
+        ref[1, 1, 2, 0]=0.653639009923
+        ref[1, 1, 2, 1]=0.625115162893
+        arg[1, 2, 0]=0.810727523765*x[0]+(-0.782903284608)*x[1]
+        ref[1, 2, 0, 0]=0.810727523765
+        ref[1, 2, 0, 1]=-0.782903284608
+        arg[1, 2, 1]=-0.294130273492*x[0]+(-0.8434101539)*x[1]
+        ref[1, 2, 1, 0]=-0.294130273492
+        ref[1, 2, 1, 1]=-0.8434101539
+        arg[1, 2, 2]=-0.263219944308*x[0]+(0.0595569053673)*x[1]
+        ref[1, 2, 2, 0]=-0.263219944308
+        ref[1, 2, 2, 1]=0.0595569053673
+        arg[2, 0, 0]=0.972253147882*x[0]+(0.914847310515)*x[1]
+        ref[2, 0, 0, 0]=0.972253147882
+        ref[2, 0, 0, 1]=0.914847310515
+        arg[2, 0, 1]=-0.542734237685*x[0]+(-0.667120316448)*x[1]
+        ref[2, 0, 1, 0]=-0.542734237685
+        ref[2, 0, 1, 1]=-0.667120316448
+        arg[2, 0, 2]=0.749353149772*x[0]+(0.780554176752)*x[1]
+        ref[2, 0, 2, 0]=0.749353149772
+        ref[2, 0, 2, 1]=0.780554176752
+        arg[2, 1, 0]=-0.266659433459*x[0]+(-0.136596605125)*x[1]
+        ref[2, 1, 0, 0]=-0.266659433459
+        ref[2, 1, 0, 1]=-0.136596605125
+        arg[2, 1, 1]=0.496915669778*x[0]+(0.958355122368)*x[1]
+        ref[2, 1, 1, 0]=0.496915669778
+        ref[2, 1, 1, 1]=0.958355122368
+        arg[2, 1, 2]=-0.583095583547*x[0]+(0.851415524653)*x[1]
+        ref[2, 1, 2, 0]=-0.583095583547
+        ref[2, 1, 2, 1]=0.851415524653
+        arg[2, 2, 0]=0.0667229127081*x[0]+(-0.638032339485)*x[1]
+        ref[2, 2, 0, 0]=0.0667229127081
+        ref[2, 2, 0, 1]=-0.638032339485
+        arg[2, 2, 1]=0.599237046866*x[0]+(0.27456473295)*x[1]
+        ref[2, 2, 1, 0]=0.599237046866
+        ref[2, 2, 1, 1]=0.27456473295
+        arg[2, 2, 2]=-0.394051182744*x[0]+(-0.304778801248)*x[1]
+        ref[2, 2, 2, 0]=-0.394051182744
+        ref[2, 2, 2, 1]=-0.304778801248
+        arg[3, 0, 0]=-0.625828603244*x[0]+(0.995883091392)*x[1]
+        ref[3, 0, 0, 0]=-0.625828603244
+        ref[3, 0, 0, 1]=0.995883091392
+        arg[3, 0, 1]=0.806181141595*x[0]+(-0.837811328932)*x[1]
+        ref[3, 0, 1, 0]=0.806181141595
+        ref[3, 0, 1, 1]=-0.837811328932
+        arg[3, 0, 2]=-0.846932964567*x[0]+(0.646206170687)*x[1]
+        ref[3, 0, 2, 0]=-0.846932964567
+        ref[3, 0, 2, 1]=0.646206170687
+        arg[3, 1, 0]=0.958841664586*x[0]+(-0.00780569130654)*x[1]
+        ref[3, 1, 0, 0]=0.958841664586
+        ref[3, 1, 0, 1]=-0.00780569130654
+        arg[3, 1, 1]=0.230215880122*x[0]+(0.0419027447263)*x[1]
+        ref[3, 1, 1, 0]=0.230215880122
+        ref[3, 1, 1, 1]=0.0419027447263
+        arg[3, 1, 2]=-0.950820190731*x[0]+(0.0557630967847)*x[1]
+        ref[3, 1, 2, 0]=-0.950820190731
+        ref[3, 1, 2, 1]=0.0557630967847
+        arg[3, 2, 0]=-0.823061054021*x[0]+(0.909169520961)*x[1]
+        ref[3, 2, 0, 0]=-0.823061054021
+        ref[3, 2, 0, 1]=0.909169520961
+        arg[3, 2, 1]=0.0956241716474*x[0]+(0.465725167601)*x[1]
+        ref[3, 2, 1, 0]=0.0956241716474
+        ref[3, 2, 1, 1]=0.465725167601
+        arg[3, 2, 2]=0.692109963217*x[0]+(-0.42663455404)*x[1]
+        ref[3, 2, 2, 0]=0.692109963217
+        ref[3, 2, 2, 1]=-0.42663455404
+        if dim==3:
+            arg[0, 0, 0]+=-0.130639115301*x[2]
+            ref[0, 0, 0, 2]=-0.130639115301
+            arg[0, 0, 1]+=0.0683712424513*x[2]
+            ref[0, 0, 1, 2]=0.0683712424513
+            arg[0, 0, 2]+=0.0403723115312*x[2]
+            ref[0, 0, 2, 2]=0.0403723115312
+            arg[0, 1, 0]+=-0.885941233604*x[2]
+            ref[0, 1, 0, 2]=-0.885941233604
+            arg[0, 1, 1]+=0.0447365366251*x[2]
+            ref[0, 1, 1, 2]=0.0447365366251
+            arg[0, 1, 2]+=-0.47059520375*x[2]
+            ref[0, 1, 2, 2]=-0.47059520375
+            arg[0, 2, 0]+=0.187792861208*x[2]
+            ref[0, 2, 0, 2]=0.187792861208
+            arg[0, 2, 1]+=0.0453587472202*x[2]
+            ref[0, 2, 1, 2]=0.0453587472202
+            arg[0, 2, 2]+=-0.765790443532*x[2]
+            ref[0, 2, 2, 2]=-0.765790443532
+            arg[1, 0, 0]+=0.690460049731*x[2]
+            ref[1, 0, 0, 2]=0.690460049731
+            arg[1, 0, 1]+=0.0035197229867*x[2]
+            ref[1, 0, 1, 2]=0.0035197229867
+            arg[1, 0, 2]+=0.980493562193*x[2]
+            ref[1, 0, 2, 2]=0.980493562193
+            arg[1, 1, 0]+=-0.503618591543*x[2]
+            ref[1, 1, 0, 2]=-0.503618591543
+            arg[1, 1, 1]+=-0.331982610876*x[2]
+            ref[1, 1, 1, 2]=-0.331982610876
+            arg[1, 1, 2]+=0.0889377290718*x[2]
+            ref[1, 1, 2, 2]=0.0889377290718
+            arg[1, 2, 0]+=0.173529588103*x[2]
+            ref[1, 2, 0, 2]=0.173529588103
+            arg[1, 2, 1]+=0.191684170459*x[2]
+            ref[1, 2, 1, 2]=0.191684170459
+            arg[1, 2, 2]+=-0.871557465034*x[2]
+            ref[1, 2, 2, 2]=-0.871557465034
+            arg[2, 0, 0]+=-0.845338438401*x[2]
+            ref[2, 0, 0, 2]=-0.845338438401
+            arg[2, 0, 1]+=0.370005274535*x[2]
+            ref[2, 0, 1, 2]=0.370005274535
+            arg[2, 0, 2]+=-0.891859566774*x[2]
+            ref[2, 0, 2, 2]=-0.891859566774
+            arg[2, 1, 0]+=-0.604777535956*x[2]
+            ref[2, 1, 0, 2]=-0.604777535956
+            arg[2, 1, 1]+=-0.198395230968*x[2]
+            ref[2, 1, 1, 2]=-0.198395230968
+            arg[2, 1, 2]+=0.888121170263*x[2]
+            ref[2, 1, 2, 2]=0.888121170263
+            arg[2, 2, 0]+=-0.409694827038*x[2]
+            ref[2, 2, 0, 2]=-0.409694827038
+            arg[2, 2, 1]+=-0.887532715678*x[2]
+            ref[2, 2, 1, 2]=-0.887532715678
+            arg[2, 2, 2]+=-0.751324348166*x[2]
+            ref[2, 2, 2, 2]=-0.751324348166
+            arg[3, 0, 0]+=0.844713499144*x[2]
+            ref[3, 0, 0, 2]=0.844713499144
+            arg[3, 0, 1]+=0.125469591722*x[2]
+            ref[3, 0, 1, 2]=0.125469591722
+            arg[3, 0, 2]+=0.699631875611*x[2]
+            ref[3, 0, 2, 2]=0.699631875611
+            arg[3, 1, 0]+=-0.0278716676433*x[2]
+            ref[3, 1, 0, 2]=-0.0278716676433
+            arg[3, 1, 1]+=0.346844941272*x[2]
+            ref[3, 1, 1, 2]=0.346844941272
+            arg[3, 1, 2]+=0.0373582934811*x[2]
+            ref[3, 1, 2, 2]=0.0373582934811
+            arg[3, 2, 0]+=-0.777795675535*x[2]
+            ref[3, 2, 0, 2]=-0.777795675535
+            arg[3, 2, 1]+=0.275049529898*x[2]
+            ref[3, 2, 1, 2]=0.275049529898
+            arg[3, 2, 2]+=0.205584871442*x[2]
+            ref[3, 2, 2, 2]=0.205584871442
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 3, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.152205136803*x[0]**o+(-0.249893491013)*x[0]+(0.508638855943)*x[1]**o+(0.830873228279)*x[1]
+        ref[0]=0.152205136803*o*x_ref[0]**(o-1)+(-0.249893491013)
+        ref[1]=0.508638855943*o*x_ref[1]**(o-1)+(0.830873228279)
+        if dim==3:
+            arg+=(-0.688607766108)*x[2]**o+(-0.746183669478)*x[2]
+            ref[2]=-0.688607766108*o*x_ref[2]**(o-1)+(-0.746183669478)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,)+(dim,),w_ref)
+        arg[0,]=-0.18827036647*x[0]**o+(-0.489162435035)*x[0]+(-0.448391899577)*x[1]**o+(0.577085470905)*x[1]
+        ref[0, 0]=-0.18827036647*o*x_ref[0]**(o-1)+(-0.489162435035)
+        ref[0, 1]=-0.448391899577*o*x_ref[1]**(o-1)+(0.577085470905)
+        arg[1,]=0.477450070753*x[0]**o+(0.819177909924)*x[0]+(0.195427894556)*x[1]**o+(0.436663812378)*x[1]
+        ref[1, 0]=0.477450070753*o*x_ref[0]**(o-1)+(0.819177909924)
+        ref[1, 1]=0.195427894556*o*x_ref[1]**(o-1)+(0.436663812378)
+        if dim==3:
+            arg[0,]+=-0.636477510329*x[2]**o+(0.145402393758)*x[2]
+            ref[0, 2]=-0.636477510329*o*x_ref[2]**(o-1)+(0.145402393758)
+            arg[1,]+=0.92533588672*x[2]**o+(-0.281956304723)*x[2]
+            ref[1, 2]=0.92533588672*o*x_ref[2]**(o-1)+(-0.281956304723)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4)+(dim,),w_ref)
+        arg[0, 0]=-0.0503140372337*x[0]**o+(-0.683714164039)*x[0]+(-0.838818536215)*x[1]**o+(0.683415348092)*x[1]
+        ref[0, 0, 0]=-0.0503140372337*o*x_ref[0]**(o-1)+(-0.683714164039)
+        ref[0, 0, 1]=-0.838818536215*o*x_ref[1]**(o-1)+(0.683415348092)
+        arg[0, 1]=0.985816174119*x[0]**o+(-0.982231917358)*x[0]+(0.161640995246)*x[1]**o+(-0.2787762421)*x[1]
+        ref[0, 1, 0]=0.985816174119*o*x_ref[0]**(o-1)+(-0.982231917358)
+        ref[0, 1, 1]=0.161640995246*o*x_ref[1]**(o-1)+(-0.2787762421)
+        arg[0, 2]=-0.136724632493*x[0]**o+(0.982575100908)*x[0]+(-0.308720821027)*x[1]**o+(0.997872376597)*x[1]
+        ref[0, 2, 0]=-0.136724632493*o*x_ref[0]**(o-1)+(0.982575100908)
+        ref[0, 2, 1]=-0.308720821027*o*x_ref[1]**(o-1)+(0.997872376597)
+        arg[0, 3]=0.610536710605*x[0]**o+(0.663718572042)*x[0]+(0.907463920817)*x[1]**o+(0.738918091944)*x[1]
+        ref[0, 3, 0]=0.610536710605*o*x_ref[0]**(o-1)+(0.663718572042)
+        ref[0, 3, 1]=0.907463920817*o*x_ref[1]**(o-1)+(0.738918091944)
+        arg[1, 0]=0.678308222165*x[0]**o+(-0.823105377776)*x[0]+(0.474083079239)*x[1]**o+(0.477188796587)*x[1]
+        ref[1, 0, 0]=0.678308222165*o*x_ref[0]**(o-1)+(-0.823105377776)
+        ref[1, 0, 1]=0.474083079239*o*x_ref[1]**(o-1)+(0.477188796587)
+        arg[1, 1]=0.654354585838*x[0]**o+(-0.235541025052)*x[0]+(-0.77140289643)*x[1]**o+(0.760863430172)*x[1]
+        ref[1, 1, 0]=0.654354585838*o*x_ref[0]**(o-1)+(-0.235541025052)
+        ref[1, 1, 1]=-0.77140289643*o*x_ref[1]**(o-1)+(0.760863430172)
+        arg[1, 2]=-0.648883163533*x[0]**o+(-0.165784083826)*x[0]+(0.61510504431)*x[1]**o+(0.483778197069)*x[1]
+        ref[1, 2, 0]=-0.648883163533*o*x_ref[0]**(o-1)+(-0.165784083826)
+        ref[1, 2, 1]=0.61510504431*o*x_ref[1]**(o-1)+(0.483778197069)
+        arg[1, 3]=0.547062399106*x[0]**o+(-0.0816304085131)*x[0]+(-0.175652653306)*x[1]**o+(0.581036307579)*x[1]
+        ref[1, 3, 0]=0.547062399106*o*x_ref[0]**(o-1)+(-0.0816304085131)
+        ref[1, 3, 1]=-0.175652653306*o*x_ref[1]**(o-1)+(0.581036307579)
+        if dim==3:
+            arg[0, 0]+=-0.572477002518*x[2]**o+(0.512562314945)*x[2]
+            ref[0, 0, 2]=-0.572477002518*o*x_ref[2]**(o-1)+(0.512562314945)
+            arg[0, 1]+=-0.43668027259*x[2]**o+(-0.479886622377)*x[2]
+            ref[0, 1, 2]=-0.43668027259*o*x_ref[2]**(o-1)+(-0.479886622377)
+            arg[0, 2]+=0.679455560369*x[2]**o+(-0.762756523976)*x[2]
+            ref[0, 2, 2]=0.679455560369*o*x_ref[2]**(o-1)+(-0.762756523976)
+            arg[0, 3]+=-0.866983456276*x[2]**o+(0.527887250813)*x[2]
+            ref[0, 3, 2]=-0.866983456276*o*x_ref[2]**(o-1)+(0.527887250813)
+            arg[1, 0]+=0.604912081374*x[2]**o+(0.0253216679413)*x[2]
+            ref[1, 0, 2]=0.604912081374*o*x_ref[2]**(o-1)+(0.0253216679413)
+            arg[1, 1]+=-0.00793393728994*x[2]**o+(0.141840876873)*x[2]
+            ref[1, 1, 2]=-0.00793393728994*o*x_ref[2]**(o-1)+(0.141840876873)
+            arg[1, 2]+=-0.163573114124*x[2]**o+(0.00458590477037)*x[2]
+            ref[1, 2, 2]=-0.163573114124*o*x_ref[2]**(o-1)+(0.00458590477037)
+            arg[1, 3]+=-0.443675249983*x[2]**o+(-0.428345832427)*x[2]
+            ref[1, 3, 2]=-0.443675249983*o*x_ref[2]**(o-1)+(-0.428345832427)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4),w)
+        ref = Data(0,(2, 4, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=0.374237986866*x[0]**o+(-0.20319421745)*x[0]+(-0.749688484582)*x[1]**o+(0.388062772564)*x[1]
+        ref[0, 0, 0, 0]=0.374237986866*o*x_ref[0]**(o-1)+(-0.20319421745)
+        ref[0, 0, 0, 1]=-0.749688484582*o*x_ref[1]**(o-1)+(0.388062772564)
+        arg[0, 0, 1]=0.0211464279908*x[0]**o+(0.908223406347)*x[0]+(0.622307561177)*x[1]**o+(0.742194238209)*x[1]
+        ref[0, 0, 1, 0]=0.0211464279908*o*x_ref[0]**(o-1)+(0.908223406347)
+        ref[0, 0, 1, 1]=0.622307561177*o*x_ref[1]**(o-1)+(0.742194238209)
+        arg[0, 0, 2]=-0.126618794894*x[0]**o+(-0.125131986781)*x[0]+(0.278645634063)*x[1]**o+(0.50630552644)*x[1]
+        ref[0, 0, 2, 0]=-0.126618794894*o*x_ref[0]**(o-1)+(-0.125131986781)
+        ref[0, 0, 2, 1]=0.278645634063*o*x_ref[1]**(o-1)+(0.50630552644)
+        arg[0, 0, 3]=-0.904347093914*x[0]**o+(0.839868771855)*x[0]+(-0.301944580267)*x[1]**o+(0.939999171635)*x[1]
+        ref[0, 0, 3, 0]=-0.904347093914*o*x_ref[0]**(o-1)+(0.839868771855)
+        ref[0, 0, 3, 1]=-0.301944580267*o*x_ref[1]**(o-1)+(0.939999171635)
+        arg[0, 1, 0]=-0.436367284387*x[0]**o+(0.547917978499)*x[0]+(0.0978203013238)*x[1]**o+(0.802278181664)*x[1]
+        ref[0, 1, 0, 0]=-0.436367284387*o*x_ref[0]**(o-1)+(0.547917978499)
+        ref[0, 1, 0, 1]=0.0978203013238*o*x_ref[1]**(o-1)+(0.802278181664)
+        arg[0, 1, 1]=-0.670210216299*x[0]**o+(0.0327979971375)*x[0]+(0.217042746035)*x[1]**o+(-0.589019518359)*x[1]
+        ref[0, 1, 1, 0]=-0.670210216299*o*x_ref[0]**(o-1)+(0.0327979971375)
+        ref[0, 1, 1, 1]=0.217042746035*o*x_ref[1]**(o-1)+(-0.589019518359)
+        arg[0, 1, 2]=-0.833106099126*x[0]**o+(0.375051504139)*x[0]+(-0.0529246068256)*x[1]**o+(-0.975818156357)*x[1]
+        ref[0, 1, 2, 0]=-0.833106099126*o*x_ref[0]**(o-1)+(0.375051504139)
+        ref[0, 1, 2, 1]=-0.0529246068256*o*x_ref[1]**(o-1)+(-0.975818156357)
+        arg[0, 1, 3]=0.89062611374*x[0]**o+(-0.623997040587)*x[0]+(0.546604935737)*x[1]**o+(0.142806238442)*x[1]
+        ref[0, 1, 3, 0]=0.89062611374*o*x_ref[0]**(o-1)+(-0.623997040587)
+        ref[0, 1, 3, 1]=0.546604935737*o*x_ref[1]**(o-1)+(0.142806238442)
+        arg[0, 2, 0]=-0.286053100891*x[0]**o+(-0.499419058399)*x[0]+(0.0448504018655)*x[1]**o+(-0.285139285184)*x[1]
+        ref[0, 2, 0, 0]=-0.286053100891*o*x_ref[0]**(o-1)+(-0.499419058399)
+        ref[0, 2, 0, 1]=0.0448504018655*o*x_ref[1]**(o-1)+(-0.285139285184)
+        arg[0, 2, 1]=0.935091095014*x[0]**o+(-0.83712461863)*x[0]+(-0.599210383015)*x[1]**o+(-0.0583535286311)*x[1]
+        ref[0, 2, 1, 0]=0.935091095014*o*x_ref[0]**(o-1)+(-0.83712461863)
+        ref[0, 2, 1, 1]=-0.599210383015*o*x_ref[1]**(o-1)+(-0.0583535286311)
+        arg[0, 2, 2]=-0.255862265852*x[0]**o+(0.955094517435)*x[0]+(-0.722975230895)*x[1]**o+(-0.00961036760862)*x[1]
+        ref[0, 2, 2, 0]=-0.255862265852*o*x_ref[0]**(o-1)+(0.955094517435)
+        ref[0, 2, 2, 1]=-0.722975230895*o*x_ref[1]**(o-1)+(-0.00961036760862)
+        arg[0, 2, 3]=-0.64842566641*x[0]**o+(0.989550244702)*x[0]+(-0.732093913759)*x[1]**o+(-0.0771060394438)*x[1]
+        ref[0, 2, 3, 0]=-0.64842566641*o*x_ref[0]**(o-1)+(0.989550244702)
+        ref[0, 2, 3, 1]=-0.732093913759*o*x_ref[1]**(o-1)+(-0.0771060394438)
+        arg[0, 3, 0]=-0.519955825608*x[0]**o+(0.240072825036)*x[0]+(0.602943834253)*x[1]**o+(0.202001953988)*x[1]
+        ref[0, 3, 0, 0]=-0.519955825608*o*x_ref[0]**(o-1)+(0.240072825036)
+        ref[0, 3, 0, 1]=0.602943834253*o*x_ref[1]**(o-1)+(0.202001953988)
+        arg[0, 3, 1]=-0.202428588722*x[0]**o+(-0.257641883747)*x[0]+(0.646901471835)*x[1]**o+(0.196859660107)*x[1]
+        ref[0, 3, 1, 0]=-0.202428588722*o*x_ref[0]**(o-1)+(-0.257641883747)
+        ref[0, 3, 1, 1]=0.646901471835*o*x_ref[1]**(o-1)+(0.196859660107)
+        arg[0, 3, 2]=-0.277421076484*x[0]**o+(-0.711486100063)*x[0]+(0.806096758509)*x[1]**o+(-0.464295938519)*x[1]
+        ref[0, 3, 2, 0]=-0.277421076484*o*x_ref[0]**(o-1)+(-0.711486100063)
+        ref[0, 3, 2, 1]=0.806096758509*o*x_ref[1]**(o-1)+(-0.464295938519)
+        arg[0, 3, 3]=0.560615806684*x[0]**o+(-0.18231549211)*x[0]+(0.841898385194)*x[1]**o+(0.823231178563)*x[1]
+        ref[0, 3, 3, 0]=0.560615806684*o*x_ref[0]**(o-1)+(-0.18231549211)
+        ref[0, 3, 3, 1]=0.841898385194*o*x_ref[1]**(o-1)+(0.823231178563)
+        arg[1, 0, 0]=0.174000727445*x[0]**o+(-0.363817445608)*x[0]+(0.52552875113)*x[1]**o+(0.373567960688)*x[1]
+        ref[1, 0, 0, 0]=0.174000727445*o*x_ref[0]**(o-1)+(-0.363817445608)
+        ref[1, 0, 0, 1]=0.52552875113*o*x_ref[1]**(o-1)+(0.373567960688)
+        arg[1, 0, 1]=-0.559735132587*x[0]**o+(0.870625653277)*x[0]+(0.356579621689)*x[1]**o+(-0.184311285488)*x[1]
+        ref[1, 0, 1, 0]=-0.559735132587*o*x_ref[0]**(o-1)+(0.870625653277)
+        ref[1, 0, 1, 1]=0.356579621689*o*x_ref[1]**(o-1)+(-0.184311285488)
+        arg[1, 0, 2]=0.979097564204*x[0]**o+(-0.343314339884)*x[0]+(-0.135532256646)*x[1]**o+(-0.676502141603)*x[1]
+        ref[1, 0, 2, 0]=0.979097564204*o*x_ref[0]**(o-1)+(-0.343314339884)
+        ref[1, 0, 2, 1]=-0.135532256646*o*x_ref[1]**(o-1)+(-0.676502141603)
+        arg[1, 0, 3]=-0.194292242811*x[0]**o+(-0.221984678326)*x[0]+(0.315332268101)*x[1]**o+(0.546448452457)*x[1]
+        ref[1, 0, 3, 0]=-0.194292242811*o*x_ref[0]**(o-1)+(-0.221984678326)
+        ref[1, 0, 3, 1]=0.315332268101*o*x_ref[1]**(o-1)+(0.546448452457)
+        arg[1, 1, 0]=-0.493749195601*x[0]**o+(-0.275480824937)*x[0]+(0.528690678627)*x[1]**o+(0.38981003723)*x[1]
+        ref[1, 1, 0, 0]=-0.493749195601*o*x_ref[0]**(o-1)+(-0.275480824937)
+        ref[1, 1, 0, 1]=0.528690678627*o*x_ref[1]**(o-1)+(0.38981003723)
+        arg[1, 1, 1]=0.117076790895*x[0]**o+(-0.179180500269)*x[0]+(-0.311895238896)*x[1]**o+(-0.843462468349)*x[1]
+        ref[1, 1, 1, 0]=0.117076790895*o*x_ref[0]**(o-1)+(-0.179180500269)
+        ref[1, 1, 1, 1]=-0.311895238896*o*x_ref[1]**(o-1)+(-0.843462468349)
+        arg[1, 1, 2]=0.881714708595*x[0]**o+(-0.475436385371)*x[0]+(-0.494249721885)*x[1]**o+(-0.25537612979)*x[1]
+        ref[1, 1, 2, 0]=0.881714708595*o*x_ref[0]**(o-1)+(-0.475436385371)
+        ref[1, 1, 2, 1]=-0.494249721885*o*x_ref[1]**(o-1)+(-0.25537612979)
+        arg[1, 1, 3]=-0.158900557348*x[0]**o+(0.022531188146)*x[0]+(0.686594513404)*x[1]**o+(-0.904165078136)*x[1]
+        ref[1, 1, 3, 0]=-0.158900557348*o*x_ref[0]**(o-1)+(0.022531188146)
+        ref[1, 1, 3, 1]=0.686594513404*o*x_ref[1]**(o-1)+(-0.904165078136)
+        arg[1, 2, 0]=-0.263285528073*x[0]**o+(0.0924373526433)*x[0]+(-0.82183476949)*x[1]**o+(-0.750861093409)*x[1]
+        ref[1, 2, 0, 0]=-0.263285528073*o*x_ref[0]**(o-1)+(0.0924373526433)
+        ref[1, 2, 0, 1]=-0.82183476949*o*x_ref[1]**(o-1)+(-0.750861093409)
+        arg[1, 2, 1]=-0.77535237113*x[0]**o+(-0.675567035154)*x[0]+(0.0427069632396)*x[1]**o+(0.952125596245)*x[1]
+        ref[1, 2, 1, 0]=-0.77535237113*o*x_ref[0]**(o-1)+(-0.675567035154)
+        ref[1, 2, 1, 1]=0.0427069632396*o*x_ref[1]**(o-1)+(0.952125596245)
+        arg[1, 2, 2]=-0.15318384488*x[0]**o+(0.662689254269)*x[0]+(-0.861847810839)*x[1]**o+(-0.425463043321)*x[1]
+        ref[1, 2, 2, 0]=-0.15318384488*o*x_ref[0]**(o-1)+(0.662689254269)
+        ref[1, 2, 2, 1]=-0.861847810839*o*x_ref[1]**(o-1)+(-0.425463043321)
+        arg[1, 2, 3]=-0.526636851919*x[0]**o+(-0.357288853851)*x[0]+(-0.717763554599)*x[1]**o+(-0.705804196144)*x[1]
+        ref[1, 2, 3, 0]=-0.526636851919*o*x_ref[0]**(o-1)+(-0.357288853851)
+        ref[1, 2, 3, 1]=-0.717763554599*o*x_ref[1]**(o-1)+(-0.705804196144)
+        arg[1, 3, 0]=-0.613799380834*x[0]**o+(-0.84165148019)*x[0]+(-0.916924522332)*x[1]**o+(0.491889205301)*x[1]
+        ref[1, 3, 0, 0]=-0.613799380834*o*x_ref[0]**(o-1)+(-0.84165148019)
+        ref[1, 3, 0, 1]=-0.916924522332*o*x_ref[1]**(o-1)+(0.491889205301)
+        arg[1, 3, 1]=-0.899170939182*x[0]**o+(0.441275110286)*x[0]+(0.944178607916)*x[1]**o+(0.00542220237275)*x[1]
+        ref[1, 3, 1, 0]=-0.899170939182*o*x_ref[0]**(o-1)+(0.441275110286)
+        ref[1, 3, 1, 1]=0.944178607916*o*x_ref[1]**(o-1)+(0.00542220237275)
+        arg[1, 3, 2]=-0.122317014233*x[0]**o+(-0.106749450798)*x[0]+(0.124746444683)*x[1]**o+(0.150740065959)*x[1]
+        ref[1, 3, 2, 0]=-0.122317014233*o*x_ref[0]**(o-1)+(-0.106749450798)
+        ref[1, 3, 2, 1]=0.124746444683*o*x_ref[1]**(o-1)+(0.150740065959)
+        arg[1, 3, 3]=-0.121902322033*x[0]**o+(-0.97478414073)*x[0]+(-0.310322759772)*x[1]**o+(0.307914860717)*x[1]
+        ref[1, 3, 3, 0]=-0.121902322033*o*x_ref[0]**(o-1)+(-0.97478414073)
+        ref[1, 3, 3, 1]=-0.310322759772*o*x_ref[1]**(o-1)+(0.307914860717)
+        if dim==3:
+            arg[0, 0, 0]+=0.143200623572*x[2]**o+(-0.830079071921)*x[2]
+            ref[0, 0, 0, 2]=0.143200623572*o*x_ref[2]**(o-1)+(-0.830079071921)
+            arg[0, 0, 1]+=-0.642827551686*x[2]**o+(-0.991193230774)*x[2]
+            ref[0, 0, 1, 2]=-0.642827551686*o*x_ref[2]**(o-1)+(-0.991193230774)
+            arg[0, 0, 2]+=0.732183146484*x[2]**o+(0.480955784272)*x[2]
+            ref[0, 0, 2, 2]=0.732183146484*o*x_ref[2]**(o-1)+(0.480955784272)
+            arg[0, 0, 3]+=-0.810523070944*x[2]**o+(-0.805600301234)*x[2]
+            ref[0, 0, 3, 2]=-0.810523070944*o*x_ref[2]**(o-1)+(-0.805600301234)
+            arg[0, 1, 0]+=-0.490530084448*x[2]**o+(-0.864838615739)*x[2]
+            ref[0, 1, 0, 2]=-0.490530084448*o*x_ref[2]**(o-1)+(-0.864838615739)
+            arg[0, 1, 1]+=-0.972043500327*x[2]**o+(-0.61984606393)*x[2]
+            ref[0, 1, 1, 2]=-0.972043500327*o*x_ref[2]**(o-1)+(-0.61984606393)
+            arg[0, 1, 2]+=-0.440849814147*x[2]**o+(0.311026192212)*x[2]
+            ref[0, 1, 2, 2]=-0.440849814147*o*x_ref[2]**(o-1)+(0.311026192212)
+            arg[0, 1, 3]+=0.881555027499*x[2]**o+(0.796164666398)*x[2]
+            ref[0, 1, 3, 2]=0.881555027499*o*x_ref[2]**(o-1)+(0.796164666398)
+            arg[0, 2, 0]+=0.578574692473*x[2]**o+(-0.676909315442)*x[2]
+            ref[0, 2, 0, 2]=0.578574692473*o*x_ref[2]**(o-1)+(-0.676909315442)
+            arg[0, 2, 1]+=-0.197470775719*x[2]**o+(-0.526301921412)*x[2]
+            ref[0, 2, 1, 2]=-0.197470775719*o*x_ref[2]**(o-1)+(-0.526301921412)
+            arg[0, 2, 2]+=-0.840761029722*x[2]**o+(0.480949561472)*x[2]
+            ref[0, 2, 2, 2]=-0.840761029722*o*x_ref[2]**(o-1)+(0.480949561472)
+            arg[0, 2, 3]+=-0.448725103527*x[2]**o+(-0.0841360477354)*x[2]
+            ref[0, 2, 3, 2]=-0.448725103527*o*x_ref[2]**(o-1)+(-0.0841360477354)
+            arg[0, 3, 0]+=-0.0205556409595*x[2]**o+(-0.172586199116)*x[2]
+            ref[0, 3, 0, 2]=-0.0205556409595*o*x_ref[2]**(o-1)+(-0.172586199116)
+            arg[0, 3, 1]+=0.468459103817*x[2]**o+(-0.558595365691)*x[2]
+            ref[0, 3, 1, 2]=0.468459103817*o*x_ref[2]**(o-1)+(-0.558595365691)
+            arg[0, 3, 2]+=0.512196325421*x[2]**o+(0.0100045049737)*x[2]
+            ref[0, 3, 2, 2]=0.512196325421*o*x_ref[2]**(o-1)+(0.0100045049737)
+            arg[0, 3, 3]+=-0.737253030254*x[2]**o+(0.54090580935)*x[2]
+            ref[0, 3, 3, 2]=-0.737253030254*o*x_ref[2]**(o-1)+(0.54090580935)
+            arg[1, 0, 0]+=0.386700799744*x[2]**o+(-0.762547853238)*x[2]
+            ref[1, 0, 0, 2]=0.386700799744*o*x_ref[2]**(o-1)+(-0.762547853238)
+            arg[1, 0, 1]+=0.724174748661*x[2]**o+(0.317771635382)*x[2]
+            ref[1, 0, 1, 2]=0.724174748661*o*x_ref[2]**(o-1)+(0.317771635382)
+            arg[1, 0, 2]+=-0.177301407285*x[2]**o+(-0.776626331686)*x[2]
+            ref[1, 0, 2, 2]=-0.177301407285*o*x_ref[2]**(o-1)+(-0.776626331686)
+            arg[1, 0, 3]+=0.240380280476*x[2]**o+(0.595795284915)*x[2]
+            ref[1, 0, 3, 2]=0.240380280476*o*x_ref[2]**(o-1)+(0.595795284915)
+            arg[1, 1, 0]+=0.356929130943*x[2]**o+(-0.359349136419)*x[2]
+            ref[1, 1, 0, 2]=0.356929130943*o*x_ref[2]**(o-1)+(-0.359349136419)
+            arg[1, 1, 1]+=0.11127463962*x[2]**o+(0.770188877763)*x[2]
+            ref[1, 1, 1, 2]=0.11127463962*o*x_ref[2]**(o-1)+(0.770188877763)
+            arg[1, 1, 2]+=0.976416563014*x[2]**o+(-0.388898218762)*x[2]
+            ref[1, 1, 2, 2]=0.976416563014*o*x_ref[2]**(o-1)+(-0.388898218762)
+            arg[1, 1, 3]+=0.361812662904*x[2]**o+(0.855244662093)*x[2]
+            ref[1, 1, 3, 2]=0.361812662904*o*x_ref[2]**(o-1)+(0.855244662093)
+            arg[1, 2, 0]+=0.782148167908*x[2]**o+(-0.394174746196)*x[2]
+            ref[1, 2, 0, 2]=0.782148167908*o*x_ref[2]**(o-1)+(-0.394174746196)
+            arg[1, 2, 1]+=-0.626947892042*x[2]**o+(0.208695841143)*x[2]
+            ref[1, 2, 1, 2]=-0.626947892042*o*x_ref[2]**(o-1)+(0.208695841143)
+            arg[1, 2, 2]+=0.219516038868*x[2]**o+(0.342780582479)*x[2]
+            ref[1, 2, 2, 2]=0.219516038868*o*x_ref[2]**(o-1)+(0.342780582479)
+            arg[1, 2, 3]+=0.52204384442*x[2]**o+(0.0994238159841)*x[2]
+            ref[1, 2, 3, 2]=0.52204384442*o*x_ref[2]**(o-1)+(0.0994238159841)
+            arg[1, 3, 0]+=-0.0797022969985*x[2]**o+(0.0370393707125)*x[2]
+            ref[1, 3, 0, 2]=-0.0797022969985*o*x_ref[2]**(o-1)+(0.0370393707125)
+            arg[1, 3, 1]+=0.69448610642*x[2]**o+(0.564350676192)*x[2]
+            ref[1, 3, 1, 2]=0.69448610642*o*x_ref[2]**(o-1)+(0.564350676192)
+            arg[1, 3, 2]+=-0.777632373328*x[2]**o+(0.502726901027)*x[2]
+            ref[1, 3, 2, 2]=-0.777632373328*o*x_ref[2]**(o-1)+(0.502726901027)
+            arg[1, 3, 3]+=-0.97672085703*x[2]**o+(0.480741076577)*x[2]
+            ref[1, 3, 3, 2]=-0.97672085703*o*x_ref[2]**(o-1)+(0.480741076577)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.857779444779*x[0]**o+(-0.548038559218)*x[0]+(-0.800916193226)*x[1]**o+(0.796994688901)*x[1]
+        ref[0]=0.857779444779*o*x_ref[0]**(o-1)+(-0.548038559218)
+        ref[1]=-0.800916193226*o*x_ref[1]**(o-1)+(0.796994688901)
+        if dim==3:
+            arg+=(0.150229194248)*x[2]**o+(0.82444093981)*x[2]
+            ref[2]=0.150229194248*o*x_ref[2]**(o-1)+(0.82444093981)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,)+(dim,),w_ref)
+        arg[0,]=0.217388977166*x[0]**o+(-0.739188201385)*x[0]+(0.817600520238)*x[1]**o+(-0.267496737975)*x[1]
+        ref[0, 0]=0.217388977166*o*x_ref[0]**(o-1)+(-0.739188201385)
+        ref[0, 1]=0.817600520238*o*x_ref[1]**(o-1)+(-0.267496737975)
+        arg[1,]=0.608601790537*x[0]**o+(-0.997757232187)*x[0]+(0.626588500112)*x[1]**o+(0.611345120093)*x[1]
+        ref[1, 0]=0.608601790537*o*x_ref[0]**(o-1)+(-0.997757232187)
+        ref[1, 1]=0.626588500112*o*x_ref[1]**(o-1)+(0.611345120093)
+        arg[2,]=0.291150057507*x[0]**o+(0.605234000418)*x[0]+(0.317523196412)*x[1]**o+(-0.13413423672)*x[1]
+        ref[2, 0]=0.291150057507*o*x_ref[0]**(o-1)+(0.605234000418)
+        ref[2, 1]=0.317523196412*o*x_ref[1]**(o-1)+(-0.13413423672)
+        if dim==3:
+            arg[0,]+=-0.675946497768*x[2]**o+(0.518003937116)*x[2]
+            ref[0, 2]=-0.675946497768*o*x_ref[2]**(o-1)+(0.518003937116)
+            arg[1,]+=-0.751128126631*x[2]**o+(0.413886335109)*x[2]
+            ref[1, 2]=-0.751128126631*o*x_ref[2]**(o-1)+(0.413886335109)
+            arg[2,]+=-0.446052611491*x[2]**o+(0.610849569162)*x[2]
+            ref[2, 2]=-0.446052611491*o*x_ref[2]**(o-1)+(0.610849569162)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4)+(dim,),w_ref)
+        arg[0, 0]=0.156384923886*x[0]**o+(0.48007010647)*x[0]+(0.156816268407)*x[1]**o+(-0.318376515498)*x[1]
+        ref[0, 0, 0]=0.156384923886*o*x_ref[0]**(o-1)+(0.48007010647)
+        ref[0, 0, 1]=0.156816268407*o*x_ref[1]**(o-1)+(-0.318376515498)
+        arg[0, 1]=-0.432036814843*x[0]**o+(0.94424111959)*x[0]+(-0.859585396035)*x[1]**o+(0.748137795064)*x[1]
+        ref[0, 1, 0]=-0.432036814843*o*x_ref[0]**(o-1)+(0.94424111959)
+        ref[0, 1, 1]=-0.859585396035*o*x_ref[1]**(o-1)+(0.748137795064)
+        arg[0, 2]=0.579105519531*x[0]**o+(0.271541550147)*x[0]+(0.611634555337)*x[1]**o+(0.162672162714)*x[1]
+        ref[0, 2, 0]=0.579105519531*o*x_ref[0]**(o-1)+(0.271541550147)
+        ref[0, 2, 1]=0.611634555337*o*x_ref[1]**(o-1)+(0.162672162714)
+        arg[0, 3]=0.509502942644*x[0]**o+(-0.941331234304)*x[0]+(-0.528709945414)*x[1]**o+(-0.676132707151)*x[1]
+        ref[0, 3, 0]=0.509502942644*o*x_ref[0]**(o-1)+(-0.941331234304)
+        ref[0, 3, 1]=-0.528709945414*o*x_ref[1]**(o-1)+(-0.676132707151)
+        arg[1, 0]=-0.849812895493*x[0]**o+(-0.993944072501)*x[0]+(-0.896212332689)*x[1]**o+(0.561417894332)*x[1]
+        ref[1, 0, 0]=-0.849812895493*o*x_ref[0]**(o-1)+(-0.993944072501)
+        ref[1, 0, 1]=-0.896212332689*o*x_ref[1]**(o-1)+(0.561417894332)
+        arg[1, 1]=-0.216324212867*x[0]**o+(-0.952818153472)*x[0]+(0.15075565189)*x[1]**o+(-0.489825824783)*x[1]
+        ref[1, 1, 0]=-0.216324212867*o*x_ref[0]**(o-1)+(-0.952818153472)
+        ref[1, 1, 1]=0.15075565189*o*x_ref[1]**(o-1)+(-0.489825824783)
+        arg[1, 2]=0.621211710421*x[0]**o+(-0.0697746902068)*x[0]+(0.416860388035)*x[1]**o+(0.971401564387)*x[1]
+        ref[1, 2, 0]=0.621211710421*o*x_ref[0]**(o-1)+(-0.0697746902068)
+        ref[1, 2, 1]=0.416860388035*o*x_ref[1]**(o-1)+(0.971401564387)
+        arg[1, 3]=0.420695352317*x[0]**o+(-0.421731078031)*x[0]+(-0.240452414931)*x[1]**o+(0.822894130127)*x[1]
+        ref[1, 3, 0]=0.420695352317*o*x_ref[0]**(o-1)+(-0.421731078031)
+        ref[1, 3, 1]=-0.240452414931*o*x_ref[1]**(o-1)+(0.822894130127)
+        arg[2, 0]=-0.145109857447*x[0]**o+(0.157321603252)*x[0]+(-0.210632520825)*x[1]**o+(0.399692931556)*x[1]
+        ref[2, 0, 0]=-0.145109857447*o*x_ref[0]**(o-1)+(0.157321603252)
+        ref[2, 0, 1]=-0.210632520825*o*x_ref[1]**(o-1)+(0.399692931556)
+        arg[2, 1]=0.0098606023182*x[0]**o+(0.368766521233)*x[0]+(0.216695921315)*x[1]**o+(0.35043308422)*x[1]
+        ref[2, 1, 0]=0.0098606023182*o*x_ref[0]**(o-1)+(0.368766521233)
+        ref[2, 1, 1]=0.216695921315*o*x_ref[1]**(o-1)+(0.35043308422)
+        arg[2, 2]=-0.872150126596*x[0]**o+(0.855636979727)*x[0]+(0.0454452921503)*x[1]**o+(-0.0414786437974)*x[1]
+        ref[2, 2, 0]=-0.872150126596*o*x_ref[0]**(o-1)+(0.855636979727)
+        ref[2, 2, 1]=0.0454452921503*o*x_ref[1]**(o-1)+(-0.0414786437974)
+        arg[2, 3]=-0.945644342699*x[0]**o+(-0.838614000792)*x[0]+(-0.340036472314)*x[1]**o+(0.585676925401)*x[1]
+        ref[2, 3, 0]=-0.945644342699*o*x_ref[0]**(o-1)+(-0.838614000792)
+        ref[2, 3, 1]=-0.340036472314*o*x_ref[1]**(o-1)+(0.585676925401)
+        arg[3, 0]=0.0535490853867*x[0]**o+(0.774433917244)*x[0]+(0.34663381261)*x[1]**o+(-0.366689621233)*x[1]
+        ref[3, 0, 0]=0.0535490853867*o*x_ref[0]**(o-1)+(0.774433917244)
+        ref[3, 0, 1]=0.34663381261*o*x_ref[1]**(o-1)+(-0.366689621233)
+        arg[3, 1]=-0.0437803009552*x[0]**o+(0.218352492755)*x[0]+(0.599998842243)*x[1]**o+(-0.478428747136)*x[1]
+        ref[3, 1, 0]=-0.0437803009552*o*x_ref[0]**(o-1)+(0.218352492755)
+        ref[3, 1, 1]=0.599998842243*o*x_ref[1]**(o-1)+(-0.478428747136)
+        arg[3, 2]=0.992963524126*x[0]**o+(-0.93555391238)*x[0]+(0.641532309316)*x[1]**o+(0.552474280655)*x[1]
+        ref[3, 2, 0]=0.992963524126*o*x_ref[0]**(o-1)+(-0.93555391238)
+        ref[3, 2, 1]=0.641532309316*o*x_ref[1]**(o-1)+(0.552474280655)
+        arg[3, 3]=0.467540560615*x[0]**o+(-0.845722239644)*x[0]+(-0.76218709754)*x[1]**o+(-0.0989313726012)*x[1]
+        ref[3, 3, 0]=0.467540560615*o*x_ref[0]**(o-1)+(-0.845722239644)
+        ref[3, 3, 1]=-0.76218709754*o*x_ref[1]**(o-1)+(-0.0989313726012)
+        if dim==3:
+            arg[0, 0]+=-0.602950355654*x[2]**o+(-0.200541706184)*x[2]
+            ref[0, 0, 2]=-0.602950355654*o*x_ref[2]**(o-1)+(-0.200541706184)
+            arg[0, 1]+=0.150690418165*x[2]**o+(-0.927223169769)*x[2]
+            ref[0, 1, 2]=0.150690418165*o*x_ref[2]**(o-1)+(-0.927223169769)
+            arg[0, 2]+=-0.30036708104*x[2]**o+(-0.666163652767)*x[2]
+            ref[0, 2, 2]=-0.30036708104*o*x_ref[2]**(o-1)+(-0.666163652767)
+            arg[0, 3]+=0.390274801649*x[2]**o+(0.821130004768)*x[2]
+            ref[0, 3, 2]=0.390274801649*o*x_ref[2]**(o-1)+(0.821130004768)
+            arg[1, 0]+=0.465067053587*x[2]**o+(0.645619812232)*x[2]
+            ref[1, 0, 2]=0.465067053587*o*x_ref[2]**(o-1)+(0.645619812232)
+            arg[1, 1]+=0.932870097311*x[2]**o+(-0.381149566381)*x[2]
+            ref[1, 1, 2]=0.932870097311*o*x_ref[2]**(o-1)+(-0.381149566381)
+            arg[1, 2]+=0.305892263973*x[2]**o+(0.450423525903)*x[2]
+            ref[1, 2, 2]=0.305892263973*o*x_ref[2]**(o-1)+(0.450423525903)
+            arg[1, 3]+=-0.222625450283*x[2]**o+(-0.702746816394)*x[2]
+            ref[1, 3, 2]=-0.222625450283*o*x_ref[2]**(o-1)+(-0.702746816394)
+            arg[2, 0]+=0.162637619269*x[2]**o+(0.0571995342994)*x[2]
+            ref[2, 0, 2]=0.162637619269*o*x_ref[2]**(o-1)+(0.0571995342994)
+            arg[2, 1]+=0.861710052229*x[2]**o+(0.024082419434)*x[2]
+            ref[2, 1, 2]=0.861710052229*o*x_ref[2]**(o-1)+(0.024082419434)
+            arg[2, 2]+=0.871824198203*x[2]**o+(-0.818509723893)*x[2]
+            ref[2, 2, 2]=0.871824198203*o*x_ref[2]**(o-1)+(-0.818509723893)
+            arg[2, 3]+=-0.667824549201*x[2]**o+(0.801307712959)*x[2]
+            ref[2, 3, 2]=-0.667824549201*o*x_ref[2]**(o-1)+(0.801307712959)
+            arg[3, 0]+=-0.263914529453*x[2]**o+(-0.160725797349)*x[2]
+            ref[3, 0, 2]=-0.263914529453*o*x_ref[2]**(o-1)+(-0.160725797349)
+            arg[3, 1]+=0.943094790356*x[2]**o+(0.00388090912234)*x[2]
+            ref[3, 1, 2]=0.943094790356*o*x_ref[2]**(o-1)+(0.00388090912234)
+            arg[3, 2]+=-0.859978246595*x[2]**o+(-0.0912332676457)*x[2]
+            ref[3, 2, 2]=-0.859978246595*o*x_ref[2]**(o-1)+(-0.0912332676457)
+            arg[3, 3]+=-0.494197817813*x[2]**o+(0.70598761404)*x[2]
+            ref[3, 3, 2]=-0.494197817813*o*x_ref[2]**(o-1)+(0.70598761404)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=0.279842204015*x[0]**o+(0.432374442336)*x[0]+(-0.45928681138)*x[1]**o+(0.403172811438)*x[1]
+        ref[0, 0, 0, 0]=0.279842204015*o*x_ref[0]**(o-1)+(0.432374442336)
+        ref[0, 0, 0, 1]=-0.45928681138*o*x_ref[1]**(o-1)+(0.403172811438)
+        arg[0, 0, 1]=0.390993669937*x[0]**o+(-0.307024727784)*x[0]+(-0.900959605563)*x[1]**o+(-0.618769783989)*x[1]
+        ref[0, 0, 1, 0]=0.390993669937*o*x_ref[0]**(o-1)+(-0.307024727784)
+        ref[0, 0, 1, 1]=-0.900959605563*o*x_ref[1]**(o-1)+(-0.618769783989)
+        arg[0, 0, 2]=0.426956507429*x[0]**o+(0.98427513491)*x[0]+(-0.0774578072718)*x[1]**o+(-0.00514939820762)*x[1]
+        ref[0, 0, 2, 0]=0.426956507429*o*x_ref[0]**(o-1)+(0.98427513491)
+        ref[0, 0, 2, 1]=-0.0774578072718*o*x_ref[1]**(o-1)+(-0.00514939820762)
+        arg[0, 0, 3]=0.295955734079*x[0]**o+(-0.805385136261)*x[0]+(-0.442772422159)*x[1]**o+(-0.812192091612)*x[1]
+        ref[0, 0, 3, 0]=0.295955734079*o*x_ref[0]**(o-1)+(-0.805385136261)
+        ref[0, 0, 3, 1]=-0.442772422159*o*x_ref[1]**(o-1)+(-0.812192091612)
+        arg[0, 1, 0]=-0.8840478349*x[0]**o+(0.717748526331)*x[0]+(0.993178314486)*x[1]**o+(-0.543161244734)*x[1]
+        ref[0, 1, 0, 0]=-0.8840478349*o*x_ref[0]**(o-1)+(0.717748526331)
+        ref[0, 1, 0, 1]=0.993178314486*o*x_ref[1]**(o-1)+(-0.543161244734)
+        arg[0, 1, 1]=0.455108444005*x[0]**o+(0.33909807476)*x[0]+(-0.624003150848)*x[1]**o+(0.253186176461)*x[1]
+        ref[0, 1, 1, 0]=0.455108444005*o*x_ref[0]**(o-1)+(0.33909807476)
+        ref[0, 1, 1, 1]=-0.624003150848*o*x_ref[1]**(o-1)+(0.253186176461)
+        arg[0, 1, 2]=-0.47804489895*x[0]**o+(0.587507153092)*x[0]+(-0.670326121958)*x[1]**o+(0.600036891537)*x[1]
+        ref[0, 1, 2, 0]=-0.47804489895*o*x_ref[0]**(o-1)+(0.587507153092)
+        ref[0, 1, 2, 1]=-0.670326121958*o*x_ref[1]**(o-1)+(0.600036891537)
+        arg[0, 1, 3]=-0.745683703802*x[0]**o+(-0.86200128413)*x[0]+(0.331562368155)*x[1]**o+(-0.282039102887)*x[1]
+        ref[0, 1, 3, 0]=-0.745683703802*o*x_ref[0]**(o-1)+(-0.86200128413)
+        ref[0, 1, 3, 1]=0.331562368155*o*x_ref[1]**(o-1)+(-0.282039102887)
+        arg[1, 0, 0]=0.285380154411*x[0]**o+(0.640321746409)*x[0]+(0.215567061799)*x[1]**o+(-0.380009444362)*x[1]
+        ref[1, 0, 0, 0]=0.285380154411*o*x_ref[0]**(o-1)+(0.640321746409)
+        ref[1, 0, 0, 1]=0.215567061799*o*x_ref[1]**(o-1)+(-0.380009444362)
+        arg[1, 0, 1]=-0.670929964499*x[0]**o+(0.85845577631)*x[0]+(0.611610082401)*x[1]**o+(0.45452362249)*x[1]
+        ref[1, 0, 1, 0]=-0.670929964499*o*x_ref[0]**(o-1)+(0.85845577631)
+        ref[1, 0, 1, 1]=0.611610082401*o*x_ref[1]**(o-1)+(0.45452362249)
+        arg[1, 0, 2]=-0.592447402712*x[0]**o+(0.320124500863)*x[0]+(0.0934144382564)*x[1]**o+(-0.526341040412)*x[1]
+        ref[1, 0, 2, 0]=-0.592447402712*o*x_ref[0]**(o-1)+(0.320124500863)
+        ref[1, 0, 2, 1]=0.0934144382564*o*x_ref[1]**(o-1)+(-0.526341040412)
+        arg[1, 0, 3]=0.100180060895*x[0]**o+(0.753492097865)*x[0]+(0.92677096795)*x[1]**o+(-0.218879794781)*x[1]
+        ref[1, 0, 3, 0]=0.100180060895*o*x_ref[0]**(o-1)+(0.753492097865)
+        ref[1, 0, 3, 1]=0.92677096795*o*x_ref[1]**(o-1)+(-0.218879794781)
+        arg[1, 1, 0]=0.681881894102*x[0]**o+(-0.137288516235)*x[0]+(-0.680574385669)*x[1]**o+(0.763695554177)*x[1]
+        ref[1, 1, 0, 0]=0.681881894102*o*x_ref[0]**(o-1)+(-0.137288516235)
+        ref[1, 1, 0, 1]=-0.680574385669*o*x_ref[1]**(o-1)+(0.763695554177)
+        arg[1, 1, 1]=-0.444260372486*x[0]**o+(0.937075771382)*x[0]+(-0.206614909823)*x[1]**o+(-0.0286328826804)*x[1]
+        ref[1, 1, 1, 0]=-0.444260372486*o*x_ref[0]**(o-1)+(0.937075771382)
+        ref[1, 1, 1, 1]=-0.206614909823*o*x_ref[1]**(o-1)+(-0.0286328826804)
+        arg[1, 1, 2]=-0.781421451324*x[0]**o+(0.572105630236)*x[0]+(-0.97823207707)*x[1]**o+(0.726170187682)*x[1]
+        ref[1, 1, 2, 0]=-0.781421451324*o*x_ref[0]**(o-1)+(0.572105630236)
+        ref[1, 1, 2, 1]=-0.97823207707*o*x_ref[1]**(o-1)+(0.726170187682)
+        arg[1, 1, 3]=0.379664089705*x[0]**o+(0.931011362477)*x[0]+(-0.540426672116)*x[1]**o+(0.692016517616)*x[1]
+        ref[1, 1, 3, 0]=0.379664089705*o*x_ref[0]**(o-1)+(0.931011362477)
+        ref[1, 1, 3, 1]=-0.540426672116*o*x_ref[1]**(o-1)+(0.692016517616)
+        arg[2, 0, 0]=0.270811998126*x[0]**o+(-0.933197212617)*x[0]+(0.161175008332)*x[1]**o+(0.675874976144)*x[1]
+        ref[2, 0, 0, 0]=0.270811998126*o*x_ref[0]**(o-1)+(-0.933197212617)
+        ref[2, 0, 0, 1]=0.161175008332*o*x_ref[1]**(o-1)+(0.675874976144)
+        arg[2, 0, 1]=-0.900277762774*x[0]**o+(-0.864229164956)*x[0]+(0.92799391381)*x[1]**o+(-0.79792696675)*x[1]
+        ref[2, 0, 1, 0]=-0.900277762774*o*x_ref[0]**(o-1)+(-0.864229164956)
+        ref[2, 0, 1, 1]=0.92799391381*o*x_ref[1]**(o-1)+(-0.79792696675)
+        arg[2, 0, 2]=0.949786383753*x[0]**o+(-0.363345089042)*x[0]+(-0.337479474324)*x[1]**o+(0.495290760701)*x[1]
+        ref[2, 0, 2, 0]=0.949786383753*o*x_ref[0]**(o-1)+(-0.363345089042)
+        ref[2, 0, 2, 1]=-0.337479474324*o*x_ref[1]**(o-1)+(0.495290760701)
+        arg[2, 0, 3]=0.599088347919*x[0]**o+(0.639768862725)*x[0]+(-0.693439045078)*x[1]**o+(0.693199906814)*x[1]
+        ref[2, 0, 3, 0]=0.599088347919*o*x_ref[0]**(o-1)+(0.639768862725)
+        ref[2, 0, 3, 1]=-0.693439045078*o*x_ref[1]**(o-1)+(0.693199906814)
+        arg[2, 1, 0]=0.341757872907*x[0]**o+(-0.471361250459)*x[0]+(0.379265224017)*x[1]**o+(-0.821456377333)*x[1]
+        ref[2, 1, 0, 0]=0.341757872907*o*x_ref[0]**(o-1)+(-0.471361250459)
+        ref[2, 1, 0, 1]=0.379265224017*o*x_ref[1]**(o-1)+(-0.821456377333)
+        arg[2, 1, 1]=0.446708248911*x[0]**o+(-0.981479287463)*x[0]+(-0.277039375939)*x[1]**o+(-0.434425295261)*x[1]
+        ref[2, 1, 1, 0]=0.446708248911*o*x_ref[0]**(o-1)+(-0.981479287463)
+        ref[2, 1, 1, 1]=-0.277039375939*o*x_ref[1]**(o-1)+(-0.434425295261)
+        arg[2, 1, 2]=0.0689172126951*x[0]**o+(0.79174459459)*x[0]+(-0.695414079965)*x[1]**o+(-0.352439193379)*x[1]
+        ref[2, 1, 2, 0]=0.0689172126951*o*x_ref[0]**(o-1)+(0.79174459459)
+        ref[2, 1, 2, 1]=-0.695414079965*o*x_ref[1]**(o-1)+(-0.352439193379)
+        arg[2, 1, 3]=0.0471378638325*x[0]**o+(0.198595953191)*x[0]+(0.694168622149)*x[1]**o+(-0.818161037889)*x[1]
+        ref[2, 1, 3, 0]=0.0471378638325*o*x_ref[0]**(o-1)+(0.198595953191)
+        ref[2, 1, 3, 1]=0.694168622149*o*x_ref[1]**(o-1)+(-0.818161037889)
+        arg[3, 0, 0]=-0.713079960668*x[0]**o+(0.52345306406)*x[0]+(0.0744554816422)*x[1]**o+(-0.460722571403)*x[1]
+        ref[3, 0, 0, 0]=-0.713079960668*o*x_ref[0]**(o-1)+(0.52345306406)
+        ref[3, 0, 0, 1]=0.0744554816422*o*x_ref[1]**(o-1)+(-0.460722571403)
+        arg[3, 0, 1]=-0.839686241538*x[0]**o+(-0.474904789316)*x[0]+(-0.736669970644)*x[1]**o+(0.803396799737)*x[1]
+        ref[3, 0, 1, 0]=-0.839686241538*o*x_ref[0]**(o-1)+(-0.474904789316)
+        ref[3, 0, 1, 1]=-0.736669970644*o*x_ref[1]**(o-1)+(0.803396799737)
+        arg[3, 0, 2]=-0.349384436458*x[0]**o+(0.121025278258)*x[0]+(-0.794071442883)*x[1]**o+(-0.872210973885)*x[1]
+        ref[3, 0, 2, 0]=-0.349384436458*o*x_ref[0]**(o-1)+(0.121025278258)
+        ref[3, 0, 2, 1]=-0.794071442883*o*x_ref[1]**(o-1)+(-0.872210973885)
+        arg[3, 0, 3]=0.443028482877*x[0]**o+(-0.617491277179)*x[0]+(0.725980714764)*x[1]**o+(0.730341607734)*x[1]
+        ref[3, 0, 3, 0]=0.443028482877*o*x_ref[0]**(o-1)+(-0.617491277179)
+        ref[3, 0, 3, 1]=0.725980714764*o*x_ref[1]**(o-1)+(0.730341607734)
+        arg[3, 1, 0]=-0.389412621537*x[0]**o+(-0.325028333391)*x[0]+(0.121184052895)*x[1]**o+(0.869116786334)*x[1]
+        ref[3, 1, 0, 0]=-0.389412621537*o*x_ref[0]**(o-1)+(-0.325028333391)
+        ref[3, 1, 0, 1]=0.121184052895*o*x_ref[1]**(o-1)+(0.869116786334)
+        arg[3, 1, 1]=0.313317224899*x[0]**o+(0.790454972484)*x[0]+(0.459325953255)*x[1]**o+(0.304510431167)*x[1]
+        ref[3, 1, 1, 0]=0.313317224899*o*x_ref[0]**(o-1)+(0.790454972484)
+        ref[3, 1, 1, 1]=0.459325953255*o*x_ref[1]**(o-1)+(0.304510431167)
+        arg[3, 1, 2]=-0.432938308212*x[0]**o+(0.417278035268)*x[0]+(0.501769583776)*x[1]**o+(-0.303511681512)*x[1]
+        ref[3, 1, 2, 0]=-0.432938308212*o*x_ref[0]**(o-1)+(0.417278035268)
+        ref[3, 1, 2, 1]=0.501769583776*o*x_ref[1]**(o-1)+(-0.303511681512)
+        arg[3, 1, 3]=-0.661801998998*x[0]**o+(-0.00964744849597)*x[0]+(-0.856756322759)*x[1]**o+(-0.123743950914)*x[1]
+        ref[3, 1, 3, 0]=-0.661801998998*o*x_ref[0]**(o-1)+(-0.00964744849597)
+        ref[3, 1, 3, 1]=-0.856756322759*o*x_ref[1]**(o-1)+(-0.123743950914)
+        if dim==3:
+            arg[0, 0, 0]+=-0.670187527138*x[2]**o+(-0.922488374839)*x[2]
+            ref[0, 0, 0, 2]=-0.670187527138*o*x_ref[2]**(o-1)+(-0.922488374839)
+            arg[0, 0, 1]+=0.664940028128*x[2]**o+(0.708295406309)*x[2]
+            ref[0, 0, 1, 2]=0.664940028128*o*x_ref[2]**(o-1)+(0.708295406309)
+            arg[0, 0, 2]+=0.877765852275*x[2]**o+(-0.973161021213)*x[2]
+            ref[0, 0, 2, 2]=0.877765852275*o*x_ref[2]**(o-1)+(-0.973161021213)
+            arg[0, 0, 3]+=0.402380496928*x[2]**o+(0.214861232063)*x[2]
+            ref[0, 0, 3, 2]=0.402380496928*o*x_ref[2]**(o-1)+(0.214861232063)
+            arg[0, 1, 0]+=-0.761655640082*x[2]**o+(0.62654371531)*x[2]
+            ref[0, 1, 0, 2]=-0.761655640082*o*x_ref[2]**(o-1)+(0.62654371531)
+            arg[0, 1, 1]+=-0.0473278179971*x[2]**o+(0.976544866546)*x[2]
+            ref[0, 1, 1, 2]=-0.0473278179971*o*x_ref[2]**(o-1)+(0.976544866546)
+            arg[0, 1, 2]+=-0.903695096392*x[2]**o+(-0.552107592429)*x[2]
+            ref[0, 1, 2, 2]=-0.903695096392*o*x_ref[2]**(o-1)+(-0.552107592429)
+            arg[0, 1, 3]+=0.404672740859*x[2]**o+(0.579072848896)*x[2]
+            ref[0, 1, 3, 2]=0.404672740859*o*x_ref[2]**(o-1)+(0.579072848896)
+            arg[1, 0, 0]+=-0.786652061724*x[2]**o+(-0.211629515903)*x[2]
+            ref[1, 0, 0, 2]=-0.786652061724*o*x_ref[2]**(o-1)+(-0.211629515903)
+            arg[1, 0, 1]+=-0.728137872361*x[2]**o+(-0.596772751222)*x[2]
+            ref[1, 0, 1, 2]=-0.728137872361*o*x_ref[2]**(o-1)+(-0.596772751222)
+            arg[1, 0, 2]+=0.404947825742*x[2]**o+(0.360878519973)*x[2]
+            ref[1, 0, 2, 2]=0.404947825742*o*x_ref[2]**(o-1)+(0.360878519973)
+            arg[1, 0, 3]+=-0.00337528908842*x[2]**o+(-0.454351350117)*x[2]
+            ref[1, 0, 3, 2]=-0.00337528908842*o*x_ref[2]**(o-1)+(-0.454351350117)
+            arg[1, 1, 0]+=-0.357888955883*x[2]**o+(-0.467183426903)*x[2]
+            ref[1, 1, 0, 2]=-0.357888955883*o*x_ref[2]**(o-1)+(-0.467183426903)
+            arg[1, 1, 1]+=-0.447073402995*x[2]**o+(-0.45433075558)*x[2]
+            ref[1, 1, 1, 2]=-0.447073402995*o*x_ref[2]**(o-1)+(-0.45433075558)
+            arg[1, 1, 2]+=0.500404713501*x[2]**o+(0.787654650427)*x[2]
+            ref[1, 1, 2, 2]=0.500404713501*o*x_ref[2]**(o-1)+(0.787654650427)
+            arg[1, 1, 3]+=-0.0445318156202*x[2]**o+(-0.16995283214)*x[2]
+            ref[1, 1, 3, 2]=-0.0445318156202*o*x_ref[2]**(o-1)+(-0.16995283214)
+            arg[2, 0, 0]+=-0.249876835977*x[2]**o+(0.150260182521)*x[2]
+            ref[2, 0, 0, 2]=-0.249876835977*o*x_ref[2]**(o-1)+(0.150260182521)
+            arg[2, 0, 1]+=0.178453499119*x[2]**o+(-0.220820129673)*x[2]
+            ref[2, 0, 1, 2]=0.178453499119*o*x_ref[2]**(o-1)+(-0.220820129673)
+            arg[2, 0, 2]+=0.302204129981*x[2]**o+(-0.364159434366)*x[2]
+            ref[2, 0, 2, 2]=0.302204129981*o*x_ref[2]**(o-1)+(-0.364159434366)
+            arg[2, 0, 3]+=0.385997581318*x[2]**o+(-0.352198636781)*x[2]
+            ref[2, 0, 3, 2]=0.385997581318*o*x_ref[2]**(o-1)+(-0.352198636781)
+            arg[2, 1, 0]+=0.698335572545*x[2]**o+(0.465100781114)*x[2]
+            ref[2, 1, 0, 2]=0.698335572545*o*x_ref[2]**(o-1)+(0.465100781114)
+            arg[2, 1, 1]+=0.219844753021*x[2]**o+(-0.619333040743)*x[2]
+            ref[2, 1, 1, 2]=0.219844753021*o*x_ref[2]**(o-1)+(-0.619333040743)
+            arg[2, 1, 2]+=-0.809500190962*x[2]**o+(0.491949054102)*x[2]
+            ref[2, 1, 2, 2]=-0.809500190962*o*x_ref[2]**(o-1)+(0.491949054102)
+            arg[2, 1, 3]+=0.63374995538*x[2]**o+(0.461465207545)*x[2]
+            ref[2, 1, 3, 2]=0.63374995538*o*x_ref[2]**(o-1)+(0.461465207545)
+            arg[3, 0, 0]+=-0.481686108139*x[2]**o+(0.619015058648)*x[2]
+            ref[3, 0, 0, 2]=-0.481686108139*o*x_ref[2]**(o-1)+(0.619015058648)
+            arg[3, 0, 1]+=0.0917318656633*x[2]**o+(0.649180638737)*x[2]
+            ref[3, 0, 1, 2]=0.0917318656633*o*x_ref[2]**(o-1)+(0.649180638737)
+            arg[3, 0, 2]+=-0.0573850216102*x[2]**o+(0.930338955148)*x[2]
+            ref[3, 0, 2, 2]=-0.0573850216102*o*x_ref[2]**(o-1)+(0.930338955148)
+            arg[3, 0, 3]+=0.713069034316*x[2]**o+(0.0893790548613)*x[2]
+            ref[3, 0, 3, 2]=0.713069034316*o*x_ref[2]**(o-1)+(0.0893790548613)
+            arg[3, 1, 0]+=-0.660746008964*x[2]**o+(-0.238380007274)*x[2]
+            ref[3, 1, 0, 2]=-0.660746008964*o*x_ref[2]**(o-1)+(-0.238380007274)
+            arg[3, 1, 1]+=-0.95502967996*x[2]**o+(-0.0648836944432)*x[2]
+            ref[3, 1, 1, 2]=-0.95502967996*o*x_ref[2]**(o-1)+(-0.0648836944432)
+            arg[3, 1, 2]+=0.460570962355*x[2]**o+(-0.567707167727)*x[2]
+            ref[3, 1, 2, 2]=0.460570962355*o*x_ref[2]**(o-1)+(-0.567707167727)
+            arg[3, 1, 3]+=-0.210910592925*x[2]**o+(-0.482831176954)*x[2]
+            ref[3, 1, 3, 2]=-0.210910592925*o*x_ref[2]**(o-1)+(-0.482831176954)
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=-0.629850895239*x[0]+(-0.669365357382)*x[1]
+        ref[0]=-0.629850895239
+        ref[1]=-0.669365357382
+        if dim==3:
+            arg+=(0.94750566857)*x[2]
+            ref[2]=0.94750566857
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=-0.0461328775845*x[0]+(-0.916293726545)*x[1]
+        ref[0, 0]=-0.0461328775845
+        ref[0, 1]=-0.916293726545
+        arg[1,]=0.89246691077*x[0]+(0.7811750368)*x[1]
+        ref[1, 0]=0.89246691077
+        ref[1, 1]=0.7811750368
+        arg[2,]=0.243757658504*x[0]+(0.456427378447)*x[1]
+        ref[2, 0]=0.243757658504
+        ref[2, 1]=0.456427378447
+        arg[3,]=-0.0483027240249*x[0]+(0.64881519385)*x[1]
+        ref[3, 0]=-0.0483027240249
+        ref[3, 1]=0.64881519385
+        if dim==3:
+            arg[0,]+=-0.802536683715*x[2]
+            ref[0, 2]=-0.802536683715
+            arg[1,]+=-0.0739541833607*x[2]
+            ref[1, 2]=-0.0739541833607
+            arg[2,]+=0.539488326999*x[2]
+            ref[2, 2]=0.539488326999
+            arg[3,]+=0.866057808123*x[2]
+            ref[3, 2]=0.866057808123
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2)+(dim,),w_ref)
+        arg[0, 0]=-0.481706913584*x[0]+(-0.224759994071)*x[1]
+        ref[0, 0, 0]=-0.481706913584
+        ref[0, 0, 1]=-0.224759994071
+        arg[0, 1]=-0.636474363429*x[0]+(-0.496203898234)*x[1]
+        ref[0, 1, 0]=-0.636474363429
+        ref[0, 1, 1]=-0.496203898234
+        arg[1, 0]=0.0106167236622*x[0]+(-0.450160566769)*x[1]
+        ref[1, 0, 0]=0.0106167236622
+        ref[1, 0, 1]=-0.450160566769
+        arg[1, 1]=0.800918604728*x[0]+(-0.340523063151)*x[1]
+        ref[1, 1, 0]=0.800918604728
+        ref[1, 1, 1]=-0.340523063151
+        if dim==3:
+            arg[0, 0]+=-0.231672193583*x[2]
+            ref[0, 0, 2]=-0.231672193583
+            arg[0, 1]+=-0.814847858171*x[2]
+            ref[0, 1, 2]=-0.814847858171
+            arg[1, 0]+=-0.869796414622*x[2]
+            ref[1, 0, 2]=-0.869796414622
+            arg[1, 1]+=-0.512817116277*x[2]
+            ref[1, 1, 2]=-0.512817116277
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4)+(dim,),w_ref)
+        arg[0, 0, 0]=-0.74092532765*x[0]+(0.859284405917)*x[1]
+        ref[0, 0, 0, 0]=-0.74092532765
+        ref[0, 0, 0, 1]=0.859284405917
+        arg[0, 0, 1]=0.246960112104*x[0]+(-0.326120118046)*x[1]
+        ref[0, 0, 1, 0]=0.246960112104
+        ref[0, 0, 1, 1]=-0.326120118046
+        arg[0, 0, 2]=-0.38433661103*x[0]+(0.256409101369)*x[1]
+        ref[0, 0, 2, 0]=-0.38433661103
+        ref[0, 0, 2, 1]=0.256409101369
+        arg[0, 0, 3]=-0.744339911556*x[0]+(0.745416751682)*x[1]
+        ref[0, 0, 3, 0]=-0.744339911556
+        ref[0, 0, 3, 1]=0.745416751682
+        arg[0, 1, 0]=0.0113214192538*x[0]+(0.729852765597)*x[1]
+        ref[0, 1, 0, 0]=0.0113214192538
+        ref[0, 1, 0, 1]=0.729852765597
+        arg[0, 1, 1]=0.125194096309*x[0]+(0.153898956988)*x[1]
+        ref[0, 1, 1, 0]=0.125194096309
+        ref[0, 1, 1, 1]=0.153898956988
+        arg[0, 1, 2]=-0.874497030062*x[0]+(0.480866448121)*x[1]
+        ref[0, 1, 2, 0]=-0.874497030062
+        ref[0, 1, 2, 1]=0.480866448121
+        arg[0, 1, 3]=0.658026926484*x[0]+(-0.171148330069)*x[1]
+        ref[0, 1, 3, 0]=0.658026926484
+        ref[0, 1, 3, 1]=-0.171148330069
+        arg[1, 0, 0]=-0.911052271092*x[0]+(-0.15194395193)*x[1]
+        ref[1, 0, 0, 0]=-0.911052271092
+        ref[1, 0, 0, 1]=-0.15194395193
+        arg[1, 0, 1]=0.351114668503*x[0]+(-0.861874892375)*x[1]
+        ref[1, 0, 1, 0]=0.351114668503
+        ref[1, 0, 1, 1]=-0.861874892375
+        arg[1, 0, 2]=0.493528148734*x[0]+(-0.903645048437)*x[1]
+        ref[1, 0, 2, 0]=0.493528148734
+        ref[1, 0, 2, 1]=-0.903645048437
+        arg[1, 0, 3]=-0.803674929052*x[0]+(-0.729911340728)*x[1]
+        ref[1, 0, 3, 0]=-0.803674929052
+        ref[1, 0, 3, 1]=-0.729911340728
+        arg[1, 1, 0]=-0.378704814397*x[0]+(-0.277524720765)*x[1]
+        ref[1, 1, 0, 0]=-0.378704814397
+        ref[1, 1, 0, 1]=-0.277524720765
+        arg[1, 1, 1]=-0.244473217803*x[0]+(0.418875717414)*x[1]
+        ref[1, 1, 1, 0]=-0.244473217803
+        ref[1, 1, 1, 1]=0.418875717414
+        arg[1, 1, 2]=0.790596436038*x[0]+(0.778750991388)*x[1]
+        ref[1, 1, 2, 0]=0.790596436038
+        ref[1, 1, 2, 1]=0.778750991388
+        arg[1, 1, 3]=0.537995752597*x[0]+(-0.323176661071)*x[1]
+        ref[1, 1, 3, 0]=0.537995752597
+        ref[1, 1, 3, 1]=-0.323176661071
+        arg[2, 0, 0]=0.421840388634*x[0]+(-0.529213275995)*x[1]
+        ref[2, 0, 0, 0]=0.421840388634
+        ref[2, 0, 0, 1]=-0.529213275995
+        arg[2, 0, 1]=0.592632411658*x[0]+(-0.86589146335)*x[1]
+        ref[2, 0, 1, 0]=0.592632411658
+        ref[2, 0, 1, 1]=-0.86589146335
+        arg[2, 0, 2]=0.515268913024*x[0]+(0.458650108159)*x[1]
+        ref[2, 0, 2, 0]=0.515268913024
+        ref[2, 0, 2, 1]=0.458650108159
+        arg[2, 0, 3]=-0.935627805539*x[0]+(-0.745828632912)*x[1]
+        ref[2, 0, 3, 0]=-0.935627805539
+        ref[2, 0, 3, 1]=-0.745828632912
+        arg[2, 1, 0]=0.752330009312*x[0]+(0.0206415213604)*x[1]
+        ref[2, 1, 0, 0]=0.752330009312
+        ref[2, 1, 0, 1]=0.0206415213604
+        arg[2, 1, 1]=-0.895444680276*x[0]+(-0.7107352526)*x[1]
+        ref[2, 1, 1, 0]=-0.895444680276
+        ref[2, 1, 1, 1]=-0.7107352526
+        arg[2, 1, 2]=0.0956173888887*x[0]+(-0.694012240657)*x[1]
+        ref[2, 1, 2, 0]=0.0956173888887
+        ref[2, 1, 2, 1]=-0.694012240657
+        arg[2, 1, 3]=0.378625210467*x[0]+(-0.671069117742)*x[1]
+        ref[2, 1, 3, 0]=0.378625210467
+        ref[2, 1, 3, 1]=-0.671069117742
+        arg[3, 0, 0]=-0.614718220674*x[0]+(0.920403651812)*x[1]
+        ref[3, 0, 0, 0]=-0.614718220674
+        ref[3, 0, 0, 1]=0.920403651812
+        arg[3, 0, 1]=-0.796965076238*x[0]+(0.292082801041)*x[1]
+        ref[3, 0, 1, 0]=-0.796965076238
+        ref[3, 0, 1, 1]=0.292082801041
+        arg[3, 0, 2]=-0.204125309757*x[0]+(-0.661715898821)*x[1]
+        ref[3, 0, 2, 0]=-0.204125309757
+        ref[3, 0, 2, 1]=-0.661715898821
+        arg[3, 0, 3]=-0.782331662998*x[0]+(0.21663793753)*x[1]
+        ref[3, 0, 3, 0]=-0.782331662998
+        ref[3, 0, 3, 1]=0.21663793753
+        arg[3, 1, 0]=-0.521091959753*x[0]+(-0.829569819651)*x[1]
+        ref[3, 1, 0, 0]=-0.521091959753
+        ref[3, 1, 0, 1]=-0.829569819651
+        arg[3, 1, 1]=0.287881373617*x[0]+(0.934952272466)*x[1]
+        ref[3, 1, 1, 0]=0.287881373617
+        ref[3, 1, 1, 1]=0.934952272466
+        arg[3, 1, 2]=0.0527328470647*x[0]+(0.76207592807)*x[1]
+        ref[3, 1, 2, 0]=0.0527328470647
+        ref[3, 1, 2, 1]=0.76207592807
+        arg[3, 1, 3]=0.581270281691*x[0]+(0.0713258209819)*x[1]
+        ref[3, 1, 3, 0]=0.581270281691
+        ref[3, 1, 3, 1]=0.0713258209819
+        if dim==3:
+            arg[0, 0, 0]+=0.131514004844*x[2]
+            ref[0, 0, 0, 2]=0.131514004844
+            arg[0, 0, 1]+=0.196295530735*x[2]
+            ref[0, 0, 1, 2]=0.196295530735
+            arg[0, 0, 2]+=0.713365868323*x[2]
+            ref[0, 0, 2, 2]=0.713365868323
+            arg[0, 0, 3]+=-0.464603739456*x[2]
+            ref[0, 0, 3, 2]=-0.464603739456
+            arg[0, 1, 0]+=-0.952417305233*x[2]
+            ref[0, 1, 0, 2]=-0.952417305233
+            arg[0, 1, 1]+=0.654553500323*x[2]
+            ref[0, 1, 1, 2]=0.654553500323
+            arg[0, 1, 2]+=-0.0507376192776*x[2]
+            ref[0, 1, 2, 2]=-0.0507376192776
+            arg[0, 1, 3]+=-0.672527209761*x[2]
+            ref[0, 1, 3, 2]=-0.672527209761
+            arg[1, 0, 0]+=-0.805964709184*x[2]
+            ref[1, 0, 0, 2]=-0.805964709184
+            arg[1, 0, 1]+=-0.427380468221*x[2]
+            ref[1, 0, 1, 2]=-0.427380468221
+            arg[1, 0, 2]+=0.158175970309*x[2]
+            ref[1, 0, 2, 2]=0.158175970309
+            arg[1, 0, 3]+=0.0219775296856*x[2]
+            ref[1, 0, 3, 2]=0.0219775296856
+            arg[1, 1, 0]+=-0.901430297369*x[2]
+            ref[1, 1, 0, 2]=-0.901430297369
+            arg[1, 1, 1]+=0.255422661116*x[2]
+            ref[1, 1, 1, 2]=0.255422661116
+            arg[1, 1, 2]+=-0.589442808924*x[2]
+            ref[1, 1, 2, 2]=-0.589442808924
+            arg[1, 1, 3]+=-0.975987241923*x[2]
+            ref[1, 1, 3, 2]=-0.975987241923
+            arg[2, 0, 0]+=0.581279824585*x[2]
+            ref[2, 0, 0, 2]=0.581279824585
+            arg[2, 0, 1]+=0.407218846612*x[2]
+            ref[2, 0, 1, 2]=0.407218846612
+            arg[2, 0, 2]+=0.52218977363*x[2]
+            ref[2, 0, 2, 2]=0.52218977363
+            arg[2, 0, 3]+=0.92567920452*x[2]
+            ref[2, 0, 3, 2]=0.92567920452
+            arg[2, 1, 0]+=-0.253233735925*x[2]
+            ref[2, 1, 0, 2]=-0.253233735925
+            arg[2, 1, 1]+=-0.653334315914*x[2]
+            ref[2, 1, 1, 2]=-0.653334315914
+            arg[2, 1, 2]+=-0.127962914913*x[2]
+            ref[2, 1, 2, 2]=-0.127962914913
+            arg[2, 1, 3]+=-0.852451850252*x[2]
+            ref[2, 1, 3, 2]=-0.852451850252
+            arg[3, 0, 0]+=-0.94438421367*x[2]
+            ref[3, 0, 0, 2]=-0.94438421367
+            arg[3, 0, 1]+=-0.737436373089*x[2]
+            ref[3, 0, 1, 2]=-0.737436373089
+            arg[3, 0, 2]+=0.281855351694*x[2]
+            ref[3, 0, 2, 2]=0.281855351694
+            arg[3, 0, 3]+=-0.93455614936*x[2]
+            ref[3, 0, 3, 2]=-0.93455614936
+            arg[3, 1, 0]+=-0.0939572527843*x[2]
+            ref[3, 1, 0, 2]=-0.0939572527843
+            arg[3, 1, 1]+=0.231239424975*x[2]
+            ref[3, 1, 1, 2]=0.231239424975
+            arg[3, 1, 2]+=0.667860861318*x[2]
+            ref[3, 1, 2, 2]=0.667860861318
+            arg[3, 1, 3]+=-0.0601146746677*x[2]
+            ref[3, 1, 3, 2]=-0.0601146746677
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4, 2, 4)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests gradient of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,()+(dim,),w_ref)
+        arg=0.071466142515*x[0]+(-0.804007717116)*x[1]
+        ref[0]=0.071466142515
+        ref[1]=-0.804007717116
+        if dim==3:
+            arg+=(0.728122097955)*x[2]
+            ref[2]=0.728122097955
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),()+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests gradient of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,)+(dim,),w_ref)
+        arg[0,]=0.585917888286*x[0]+(-0.415866470036)*x[1]
+        ref[0, 0]=0.585917888286
+        ref[0, 1]=-0.415866470036
+        arg[1,]=-0.847688063696*x[0]+(-0.490471986628)*x[1]
+        ref[1, 0]=-0.847688063696
+        ref[1, 1]=-0.490471986628
+        arg[2,]=0.96516322657*x[0]+(-0.432522078234)*x[1]
+        ref[2, 0]=0.96516322657
+        ref[2, 1]=-0.432522078234
+        arg[3,]=-0.501139902002*x[0]+(-0.81985357768)*x[1]
+        ref[3, 0]=-0.501139902002
+        ref[3, 1]=-0.81985357768
+        if dim==3:
+            arg[0,]+=0.65367533826*x[2]
+            ref[0, 2]=0.65367533826
+            arg[1,]+=-0.259807995538*x[2]
+            ref[1, 2]=-0.259807995538
+            arg[2,]+=0.839456966182*x[2]
+            ref[2, 2]=0.839456966182
+            arg[3,]+=0.716429848555*x[2]
+            ref[3, 2]=0.716429848555
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(4,)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests gradient of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3)+(dim,),w_ref)
+        arg[0, 0]=-0.525603824604*x[0]+(-0.982478991315)*x[1]
+        ref[0, 0, 0]=-0.525603824604
+        ref[0, 0, 1]=-0.982478991315
+        arg[0, 1]=0.696747739314*x[0]+(-0.179357785396)*x[1]
+        ref[0, 1, 0]=0.696747739314
+        ref[0, 1, 1]=-0.179357785396
+        arg[0, 2]=0.991869526403*x[0]+(0.0211534650745)*x[1]
+        ref[0, 2, 0]=0.991869526403
+        ref[0, 2, 1]=0.0211534650745
+        arg[1, 0]=-0.300043298*x[0]+(0.297552879521)*x[1]
+        ref[1, 0, 0]=-0.300043298
+        ref[1, 0, 1]=0.297552879521
+        arg[1, 1]=0.453290339385*x[0]+(0.218255948721)*x[1]
+        ref[1, 1, 0]=0.453290339385
+        ref[1, 1, 1]=0.218255948721
+        arg[1, 2]=-0.699766457831*x[0]+(0.313192286371)*x[1]
+        ref[1, 2, 0]=-0.699766457831
+        ref[1, 2, 1]=0.313192286371
+        if dim==3:
+            arg[0, 0]+=0.255333734889*x[2]
+            ref[0, 0, 2]=0.255333734889
+            arg[0, 1]+=0.00400958118547*x[2]
+            ref[0, 1, 2]=0.00400958118547
+            arg[0, 2]+=0.325040212609*x[2]
+            ref[0, 2, 2]=0.325040212609
+            arg[1, 0]+=-0.643383224643*x[2]
+            ref[1, 0, 2]=-0.643383224643
+            arg[1, 1]+=0.569414685683*x[2]
+            ref[1, 1, 2]=0.569414685683
+            arg[1, 2]+=0.0203075388016*x[2]
+            ref[1, 2, 2]=0.0203075388016
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(2, 3)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests gradient of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports gradient on ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 2),w)
+        ref = Data(0,(3, 2, 2)+(dim,),w_ref)
+        arg[0, 0, 0]=0.926690725115*x[0]+(0.266641948532)*x[1]
+        ref[0, 0, 0, 0]=0.926690725115
+        ref[0, 0, 0, 1]=0.266641948532
+        arg[0, 0, 1]=-0.626034341104*x[0]+(-0.992410086958)*x[1]
+        ref[0, 0, 1, 0]=-0.626034341104
+        ref[0, 0, 1, 1]=-0.992410086958
+        arg[0, 1, 0]=-0.751019821873*x[0]+(0.277418499939)*x[1]
+        ref[0, 1, 0, 0]=-0.751019821873
+        ref[0, 1, 0, 1]=0.277418499939
+        arg[0, 1, 1]=0.67483208491*x[0]+(-0.237479400088)*x[1]
+        ref[0, 1, 1, 0]=0.67483208491
+        ref[0, 1, 1, 1]=-0.237479400088
+        arg[1, 0, 0]=0.0405058221636*x[0]+(0.80653340734)*x[1]
+        ref[1, 0, 0, 0]=0.0405058221636
+        ref[1, 0, 0, 1]=0.80653340734
+        arg[1, 0, 1]=-0.530750298966*x[0]+(0.760843201431)*x[1]
+        ref[1, 0, 1, 0]=-0.530750298966
+        ref[1, 0, 1, 1]=0.760843201431
+        arg[1, 1, 0]=-0.477339823696*x[0]+(0.585093437295)*x[1]
+        ref[1, 1, 0, 0]=-0.477339823696
+        ref[1, 1, 0, 1]=0.585093437295
+        arg[1, 1, 1]=0.349290369209*x[0]+(-0.583565943126)*x[1]
+        ref[1, 1, 1, 0]=0.349290369209
+        ref[1, 1, 1, 1]=-0.583565943126
+        arg[2, 0, 0]=-0.260923981725*x[0]+(0.459542314304)*x[1]
+        ref[2, 0, 0, 0]=-0.260923981725
+        ref[2, 0, 0, 1]=0.459542314304
+        arg[2, 0, 1]=-0.661664033337*x[0]+(-0.655883291167)*x[1]
+        ref[2, 0, 1, 0]=-0.661664033337
+        ref[2, 0, 1, 1]=-0.655883291167
+        arg[2, 1, 0]=-0.584595139762*x[0]+(0.472556833374)*x[1]
+        ref[2, 1, 0, 0]=-0.584595139762
+        ref[2, 1, 0, 1]=0.472556833374
+        arg[2, 1, 1]=-0.215223701978*x[0]+(0.566917795405)*x[1]
+        ref[2, 1, 1, 0]=-0.215223701978
+        ref[2, 1, 1, 1]=0.566917795405
+        if dim==3:
+            arg[0, 0, 0]+=0.961005594199*x[2]
+            ref[0, 0, 0, 2]=0.961005594199
+            arg[0, 0, 1]+=0.709300463659*x[2]
+            ref[0, 0, 1, 2]=0.709300463659
+            arg[0, 1, 0]+=0.499830725018*x[2]
+            ref[0, 1, 0, 2]=0.499830725018
+            arg[0, 1, 1]+=-0.886299914241*x[2]
+            ref[0, 1, 1, 2]=-0.886299914241
+            arg[1, 0, 0]+=0.812359708497*x[2]
+            ref[1, 0, 0, 2]=0.812359708497
+            arg[1, 0, 1]+=-0.339945077662*x[2]
+            ref[1, 0, 1, 2]=-0.339945077662
+            arg[1, 1, 0]+=0.246679479732*x[2]
+            ref[1, 1, 0, 2]=0.246679479732
+            arg[1, 1, 1]+=0.00329635398056*x[2]
+            ref[1, 1, 1, 2]=0.00329635398056
+            arg[2, 0, 0]+=-0.231950986515*x[2]
+            ref[2, 0, 0, 2]=-0.231950986515
+            arg[2, 0, 1]+=0.715236593822*x[2]
+            ref[2, 0, 1, 2]=0.715236593822
+            arg[2, 1, 0]+=-0.576373779654*x[2]
+            ref[2, 1, 0, 2]=-0.576373779654
+            arg[2, 1, 1]+=-0.381583458323*x[2]
+            ref[2, 1, 1, 2]=-0.381583458323
+        res=grad(arg,where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(),(3, 2, 2)+(dim,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/escriptcore/test/python/test_util_integrals.py b/escriptcore/test/python/test_util_integrals.py
new file mode 100644
index 0000000..a12f73c
--- /dev/null
+++ b/escriptcore/test/python/test_util_integrals.py
@@ -0,0 +1,49150 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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-2017 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')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/escriptcore/test/python/test_util_interpolation.py b/escriptcore/test/python/test_util_interpolation.py
new file mode 100644
index 0000000..37e7159
--- /dev/null
+++ b/escriptcore/test/python/test_util_interpolation.py
@@ -0,0 +1,50162 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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-2017 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 interpolation 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_Interpolation_noContact(unittest.TestCase):
+    RES_TOL=1.e-8
+
+    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.189625580297+0.361216087009j)*x[0]**o + ((-0.0476116922474+0.00391800873429j))*x[0] + ((0.98236241877-0.564222937815j))*x[1]**o + ((-0.229349253987-0.664506784588j))*x[1]
+        ref=(-0.189625580297+0.361216087009j)*x_ref[0]**o + ((-0.0476116922474+0.00391800873429j))*x_ref[0] + ((0.98236241877-0.564222937815j))*x_ref[1]**o + ((-0.229349253987-0.664506784588j))*x_ref[1]
+        if dim==3:
+            arg+=((0.599750966654+0.291585131321j))*x[2]**o + ((-0.141763811987-0.816643592976j))*x[2]
+            ref+=((0.599750966654+0.291585131321j))*x_ref[2]**o + ((-0.141763811987-0.816643592976j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.0618446671571-0.726938407432j)*x[0]**o + ((-0.33515760696+0.683097756922j))*x[0] + ((-0.816137994377-0.165179129953j))*x[1]**o + ((-0.932695349229+0.739187942617j))*x[1]
+        ref[(0,)]=(-0.0618446671571-0.726938407432j)*x_ref[0]**o + ((-0.33515760696+0.683097756922j))*x_ref[0] + ((-0.816137994377-0.165179129953j))*x_ref[1]**o + ((-0.932695349229+0.739187942617j))*x_ref[1]
+        arg[(1,)]=(-0.626967113316-0.796260518314j)*x[0]**o + ((-0.361325667473-0.138264110069j))*x[0] + ((-0.686581069921-0.691962361366j))*x[1]**o + ((-0.957546781819-0.0583443186696j))*x[1]
+        ref[(1,)]=(-0.626967113316-0.796260518314j)*x_ref[0]**o + ((-0.361325667473-0.138264110069j))*x_ref[0] + ((-0.686581069921-0.691962361366j))*x_ref[1]**o + ((-0.957546781819-0.0583443186696j))*x_ref[1]
+        arg[(2,)]=(0.72648702661-0.365322864969j)*x[0]**o + ((-0.808311225431+0.84045028031j))*x[0] + ((-0.792638592797-0.0639931408925j))*x[1]**o + ((0.954608036457+0.428003995906j))*x[1]
+        ref[(2,)]=(0.72648702661-0.365322864969j)*x_ref[0]**o + ((-0.808311225431+0.84045028031j))*x_ref[0] + ((-0.792638592797-0.0639931408925j))*x_ref[1]**o + ((0.954608036457+0.428003995906j))*x_ref[1]
+        arg[(3,)]=(0.450634382495-0.112738627314j)*x[0]**o + ((-0.751020647342+0.835887227921j))*x[0] + ((0.926026179724-0.0816511354564j))*x[1]**o + ((-0.155289135548+0.580502757913j))*x[1]
+        ref[(3,)]=(0.450634382495-0.112738627314j)*x_ref[0]**o + ((-0.751020647342+0.835887227921j))*x_ref[0] + ((0.926026179724-0.0816511354564j))*x_ref[1]**o + ((-0.155289135548+0.580502757913j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.5325842815+0.401729375286j)*x[2]**o + ((0.0695760042965+0.328054853217j))*x[2]
+            ref[(0,)]+=(0.5325842815+0.401729375286j)*x_ref[2]**o + ((0.0695760042965+0.328054853217j))*x_ref[2]
+            arg[(1,)]+=(0.0210769773964+0.171108736948j)*x[2]**o + ((0.804228848131-0.303415361013j))*x[2]
+            ref[(1,)]+=(0.0210769773964+0.171108736948j)*x_ref[2]**o + ((0.804228848131-0.303415361013j))*x_ref[2]
+            arg[(2,)]+=(-0.367863986265+0.184793333699j)*x[2]**o + ((-0.740074861936+0.884197369108j))*x[2]
+            ref[(2,)]+=(-0.367863986265+0.184793333699j)*x_ref[2]**o + ((-0.740074861936+0.884197369108j))*x_ref[2]
+            arg[(3,)]+=(-0.657740759963+0.220178241986j)*x[2]**o + ((0.42402121892-0.852186509109j))*x[2]
+            ref[(3,)]+=(-0.657740759963+0.220178241986j)*x_ref[2]**o + ((0.42402121892-0.852186509109j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(-0.146866327912+0.313945712066j)*x[0]**o + ((-0.091058870998+0.156598930641j))*x[0] + ((-0.901225760031+0.302870487894j))*x[1]**o + ((-0.638016015001+0.127264707382j))*x[1]
+        ref[(0, 0)]=(-0.146866327912+0.313945712066j)*x_ref[0]**o + ((-0.091058870998+0.156598930641j))*x_ref[0] + ((-0.901225760031+0.302870487894j))*x_ref[1]**o + ((-0.638016015001+0.127264707382j))*x_ref[1]
+        arg[(0, 1)]=(-0.0435161877487+0.395136573305j)*x[0]**o + ((-0.97715793528+0.699195069328j))*x[0] + ((-0.0867635363436+0.354582345518j))*x[1]**o + ((-0.784568287346+0.515338987561j))*x[1]
+        ref[(0, 1)]=(-0.0435161877487+0.395136573305j)*x_ref[0]**o + ((-0.97715793528+0.699195069328j))*x_ref[0] + ((-0.0867635363436+0.354582345518j))*x_ref[1]**o + ((-0.784568287346+0.515338987561j))*x_ref[1]
+        arg[(1, 0)]=(-0.99365140645+0.183220895466j)*x[0]**o + ((-0.704722154302-0.737681298478j))*x[0] + ((0.982536994159+0.679722531672j))*x[1]**o + ((0.0836317897012-0.465373954323j))*x[1]
+        ref[(1, 0)]=(-0.99365140645+0.183220895466j)*x_ref[0]**o + ((-0.704722154302-0.737681298478j))*x_ref[0] + ((0.982536994159+0.679722531672j))*x_ref[1]**o + ((0.0836317897012-0.465373954323j))*x_ref[1]
+        arg[(1, 1)]=(0.0851002140156+0.814499635895j)*x[0]**o + ((-0.86564423205-0.429782764197j))*x[0] + ((-0.75212684569+0.226008321543j))*x[1]**o + ((-0.0858565684374-0.836862400829j))*x[1]
+        ref[(1, 1)]=(0.0851002140156+0.814499635895j)*x_ref[0]**o + ((-0.86564423205-0.429782764197j))*x_ref[0] + ((-0.75212684569+0.226008321543j))*x_ref[1]**o + ((-0.0858565684374-0.836862400829j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.405391250101+0.871177811717j)*x[2]**o + ((0.691286183226+0.0796615245385j))*x[2]
+            ref[(0, 0)]+=(-0.405391250101+0.871177811717j)*x_ref[2]**o + ((0.691286183226+0.0796615245385j))*x_ref[2]
+            arg[(0, 1)]+=(0.691222916568+0.707502072861j)*x[2]**o + ((0.890111189906-0.380861433169j))*x[2]
+            ref[(0, 1)]+=(0.691222916568+0.707502072861j)*x_ref[2]**o + ((0.890111189906-0.380861433169j))*x_ref[2]
+            arg[(1, 0)]+=(-0.369590578817+0.168582101947j)*x[2]**o + ((0.153582779597-0.929439609675j))*x[2]
+            ref[(1, 0)]+=(-0.369590578817+0.168582101947j)*x_ref[2]**o + ((0.153582779597-0.929439609675j))*x_ref[2]
+            arg[(1, 1)]+=(-0.597407189272+0.16376498267j)*x[2]**o + ((-0.827690080237-0.737197927469j))*x[2]
+            ref[(1, 1)]+=(-0.597407189272+0.16376498267j)*x_ref[2]**o + ((-0.827690080237-0.737197927469j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.356245851858+0.136902609671j)*x[0]**o + ((-0.695978256864-0.392429330318j))*x[0] + ((0.899656038024+0.976485455467j))*x[1]**o + ((-0.372000857991+0.0763618033716j))*x[1]
+        ref[(0, 0, 0)]=(-0.356245851858+0.136902609671j)*x_ref[0]**o + ((-0.695978256864-0.392429330318j))*x_ref[0] + ((0.899656038024+0.976485455467j))*x_ref[1]**o + ((-0.372000857991+0.0763618033716j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.143193549733+0.862804094316j)*x[0]**o + ((0.822022159598-0.427599265361j))*x[0] + ((0.642306232533+0.939720812231j))*x[1]**o + ((-0.695962173702-0.317830381106j))*x[1]
+        ref[(0, 0, 1)]=(-0.143193549733+0.862804094316j)*x_ref[0]**o + ((0.822022159598-0.427599265361j))*x_ref[0] + ((0.642306232533+0.939720812231j))*x_ref[1]**o + ((-0.695962173702-0.317830381106j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.428752467167-0.0500302658491j)*x[0]**o + ((-0.806462208802+0.707029633225j))*x[0] + ((0.312027970374+0.472767557077j))*x[1]**o + ((0.942326621211-0.774407683228j))*x[1]
+        ref[(0, 0, 2)]=(0.428752467167-0.0500302658491j)*x_ref[0]**o + ((-0.806462208802+0.707029633225j))*x_ref[0] + ((0.312027970374+0.472767557077j))*x_ref[1]**o + ((0.942326621211-0.774407683228j))*x_ref[1]
+        arg[(0, 0, 3)]=(-0.301669467553+0.154001822272j)*x[0]**o + ((0.641018554239+0.6729837662j))*x[0] + ((-0.0771780013081+0.824999143233j))*x[1]**o + ((0.0420634017229-0.106252127035j))*x[1]
+        ref[(0, 0, 3)]=(-0.301669467553+0.154001822272j)*x_ref[0]**o + ((0.641018554239+0.6729837662j))*x_ref[0] + ((-0.0771780013081+0.824999143233j))*x_ref[1]**o + ((0.0420634017229-0.106252127035j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.72752559449+0.0295024756512j)*x[0]**o + ((-0.448259317096+0.942552075176j))*x[0] + ((-0.684151539336+0.898251232472j))*x[1]**o + ((0.551596015245-0.24652392455j))*x[1]
+        ref[(0, 1, 0)]=(0.72752559449+0.0295024756512j)*x_ref[0]**o + ((-0.448259317096+0.942552075176j))*x_ref[0] + ((-0.684151539336+0.898251232472j))*x_ref[1]**o + ((0.551596015245-0.24652392455j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.682456140271-0.800858308271j)*x[0]**o + ((0.0128434868894-0.617545407453j))*x[0] + ((0.65909150227-0.868708698141j))*x[1]**o + ((0.0572287472569-0.269432625082j))*x[1]
+        ref[(0, 1, 1)]=(-0.682456140271-0.800858308271j)*x_ref[0]**o + ((0.0128434868894-0.617545407453j))*x_ref[0] + ((0.65909150227-0.868708698141j))*x_ref[1]**o + ((0.0572287472569-0.269432625082j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.408162421306+0.220938739503j)*x[0]**o + ((-0.732011977779-0.996086427354j))*x[0] + ((-0.575404056574+0.43201674029j))*x[1]**o + ((0.765675421855-0.296512759574j))*x[1]
+        ref[(0, 1, 2)]=(0.408162421306+0.220938739503j)*x_ref[0]**o + ((-0.732011977779-0.996086427354j))*x_ref[0] + ((-0.575404056574+0.43201674029j))*x_ref[1]**o + ((0.765675421855-0.296512759574j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.527860881193-0.483894210364j)*x[0]**o + ((0.202497904465-0.257404282256j))*x[0] + ((-0.355139264527-0.974107693632j))*x[1]**o + ((-0.796062156813-0.636338218532j))*x[1]
+        ref[(0, 1, 3)]=(0.527860881193-0.483894210364j)*x_ref[0]**o + ((0.202497904465-0.257404282256j))*x_ref[0] + ((-0.355139264527-0.974107693632j))*x_ref[1]**o + ((-0.796062156813-0.636338218532j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.691555894021+0.123021807158j)*x[0]**o + ((0.541038753818+0.389888130705j))*x[0] + ((0.422730537402+0.867595145633j))*x[1]**o + ((0.718766169201+0.380520548823j))*x[1]
+        ref[(1, 0, 0)]=(0.691555894021+0.123021807158j)*x_ref[0]**o + ((0.541038753818+0.389888130705j))*x_ref[0] + ((0.422730537402+0.867595145633j))*x_ref[1]**o + ((0.718766169201+0.380520548823j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.277987974071-0.484273866838j)*x[0]**o + ((0.395810783266+0.502255387873j))*x[0] + ((0.972789807445-0.783557988924j))*x[1]**o + ((0.648573848772-0.265248263469j))*x[1]
+        ref[(1, 0, 1)]=(-0.277987974071-0.484273866838j)*x_ref[0]**o + ((0.395810783266+0.502255387873j))*x_ref[0] + ((0.972789807445-0.783557988924j))*x_ref[1]**o + ((0.648573848772-0.265248263469j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.336301033171-0.379136384682j)*x[0]**o + ((-0.585808617287-0.295202655894j))*x[0] + ((-0.710491962237-0.0715530695281j))*x[1]**o + ((-0.926257401833+0.677671778398j))*x[1]
+        ref[(1, 0, 2)]=(-0.336301033171-0.379136384682j)*x_ref[0]**o + ((-0.585808617287-0.295202655894j))*x_ref[0] + ((-0.710491962237-0.0715530695281j))*x_ref[1]**o + ((-0.926257401833+0.677671778398j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.850868841162-0.580605618866j)*x[0]**o + ((0.965847210589+0.793471584633j))*x[0] + ((-0.920393993137+0.351752363316j))*x[1]**o + ((-0.0409905406465+0.286097865489j))*x[1]
+        ref[(1, 0, 3)]=(0.850868841162-0.580605618866j)*x_ref[0]**o + ((0.965847210589+0.793471584633j))*x_ref[0] + ((-0.920393993137+0.351752363316j))*x_ref[1]**o + ((-0.0409905406465+0.286097865489j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.730899406586-0.681874594525j)*x[0]**o + ((-0.297831013113+0.35285774602j))*x[0] + ((0.729635005211-0.124114567274j))*x[1]**o + ((0.125047432869+0.651208738202j))*x[1]
+        ref[(1, 1, 0)]=(0.730899406586-0.681874594525j)*x_ref[0]**o + ((-0.297831013113+0.35285774602j))*x_ref[0] + ((0.729635005211-0.124114567274j))*x_ref[1]**o + ((0.125047432869+0.651208738202j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.50055107582-0.3132897016j)*x[0]**o + ((-0.0401470141443-0.789393520521j))*x[0] + ((-0.856191513333+0.63562625875j))*x[1]**o + ((-0.820629352774-0.190745515318j))*x[1]
+        ref[(1, 1, 1)]=(-0.50055107582-0.3132897016j)*x_ref[0]**o + ((-0.0401470141443-0.789393520521j))*x_ref[0] + ((-0.856191513333+0.63562625875j))*x_ref[1]**o + ((-0.820629352774-0.190745515318j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.271416809213+0.550169460589j)*x[0]**o + ((0.465287208304+0.830585554201j))*x[0] + ((0.296535968019-0.761053252499j))*x[1]**o + ((0.430624373827-0.0133528340901j))*x[1]
+        ref[(1, 1, 2)]=(0.271416809213+0.550169460589j)*x_ref[0]**o + ((0.465287208304+0.830585554201j))*x_ref[0] + ((0.296535968019-0.761053252499j))*x_ref[1]**o + ((0.430624373827-0.0133528340901j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.415939766757-0.144938683887j)*x[0]**o + ((-0.16815155821-0.549474648277j))*x[0] + ((0.191845525852-0.93329972791j))*x[1]**o + ((0.359315185031-0.573379260849j))*x[1]
+        ref[(1, 1, 3)]=(-0.415939766757-0.144938683887j)*x_ref[0]**o + ((-0.16815155821-0.549474648277j))*x_ref[0] + ((0.191845525852-0.93329972791j))*x_ref[1]**o + ((0.359315185031-0.573379260849j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.417250675377-0.536476091711j)*x[0]**o + ((-0.755156602987-0.32417234387j))*x[0] + ((0.413973942323-0.266278194437j))*x[1]**o + ((-0.779980766874-0.659124334983j))*x[1]
+        ref[(2, 0, 0)]=(0.417250675377-0.536476091711j)*x_ref[0]**o + ((-0.755156602987-0.32417234387j))*x_ref[0] + ((0.413973942323-0.266278194437j))*x_ref[1]**o + ((-0.779980766874-0.659124334983j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.72203776903+0.408227383373j)*x[0]**o + ((-0.707814918811-0.240375766288j))*x[0] + ((-0.282733408103+0.0427443611231j))*x[1]**o + ((-0.388118170856+0.252348137222j))*x[1]
+        ref[(2, 0, 1)]=(-0.72203776903+0.408227383373j)*x_ref[0]**o + ((-0.707814918811-0.240375766288j))*x_ref[0] + ((-0.282733408103+0.0427443611231j))*x_ref[1]**o + ((-0.388118170856+0.252348137222j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.193287465553+0.405278809953j)*x[0]**o + ((-0.882984282394-0.816233940792j))*x[0] + ((0.905708640302+0.86904455945j))*x[1]**o + ((-0.897291622625-0.714664654723j))*x[1]
+        ref[(2, 0, 2)]=(-0.193287465553+0.405278809953j)*x_ref[0]**o + ((-0.882984282394-0.816233940792j))*x_ref[0] + ((0.905708640302+0.86904455945j))*x_ref[1]**o + ((-0.897291622625-0.714664654723j))*x_ref[1]
+        arg[(2, 0, 3)]=(0.957858374174+0.389824837754j)*x[0]**o + ((0.242785933625-0.0252989644947j))*x[0] + ((0.31977777439+0.538862947234j))*x[1]**o + ((0.946032274234+0.810999548915j))*x[1]
+        ref[(2, 0, 3)]=(0.957858374174+0.389824837754j)*x_ref[0]**o + ((0.242785933625-0.0252989644947j))*x_ref[0] + ((0.31977777439+0.538862947234j))*x_ref[1]**o + ((0.946032274234+0.810999548915j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.429976110798-0.572191161042j)*x[0]**o + ((0.489584401724-0.649071694922j))*x[0] + ((0.574255152421+0.0166446113426j))*x[1]**o + ((-0.0814263805689-0.161359682045j))*x[1]
+        ref[(2, 1, 0)]=(-0.429976110798-0.572191161042j)*x_ref[0]**o + ((0.489584401724-0.649071694922j))*x_ref[0] + ((0.574255152421+0.0166446113426j))*x_ref[1]**o + ((-0.0814263805689-0.161359682045j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.982898818281-0.854825047241j)*x[0]**o + ((0.951033881993-0.966662924321j))*x[0] + ((-0.606142266183-0.243784350306j))*x[1]**o + ((-0.973845270734-0.37301796735j))*x[1]
+        ref[(2, 1, 1)]=(-0.982898818281-0.854825047241j)*x_ref[0]**o + ((0.951033881993-0.966662924321j))*x_ref[0] + ((-0.606142266183-0.243784350306j))*x_ref[1]**o + ((-0.973845270734-0.37301796735j))*x_ref[1]
+        arg[(2, 1, 2)]=(-0.0231190535953-0.536419540809j)*x[0]**o + ((0.644955346821+0.569339932436j))*x[0] + ((0.509783151209-0.384623120759j))*x[1]**o + ((0.420119484196+0.0110721910033j))*x[1]
+        ref[(2, 1, 2)]=(-0.0231190535953-0.536419540809j)*x_ref[0]**o + ((0.644955346821+0.569339932436j))*x_ref[0] + ((0.509783151209-0.384623120759j))*x_ref[1]**o + ((0.420119484196+0.0110721910033j))*x_ref[1]
+        arg[(2, 1, 3)]=(0.248649217589-0.932635999558j)*x[0]**o + ((-0.436959244535+0.784919762159j))*x[0] + ((0.688528759372-0.564962395493j))*x[1]**o + ((-0.0527171258177-0.162698751114j))*x[1]
+        ref[(2, 1, 3)]=(0.248649217589-0.932635999558j)*x_ref[0]**o + ((-0.436959244535+0.784919762159j))*x_ref[0] + ((0.688528759372-0.564962395493j))*x_ref[1]**o + ((-0.0527171258177-0.162698751114j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.893675341844+0.325161852564j)*x[0]**o + ((0.338143953765+0.0966013375988j))*x[0] + ((-0.312241770923+0.667687842007j))*x[1]**o + ((-0.462479743428+0.986589423929j))*x[1]
+        ref[(3, 0, 0)]=(0.893675341844+0.325161852564j)*x_ref[0]**o + ((0.338143953765+0.0966013375988j))*x_ref[0] + ((-0.312241770923+0.667687842007j))*x_ref[1]**o + ((-0.462479743428+0.986589423929j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.53710911915+0.544078928707j)*x[0]**o + ((0.222732430627+0.361780506396j))*x[0] + ((-0.176096186969-0.575174940456j))*x[1]**o + ((0.723502384009+0.380698414678j))*x[1]
+        ref[(3, 0, 1)]=(0.53710911915+0.544078928707j)*x_ref[0]**o + ((0.222732430627+0.361780506396j))*x_ref[0] + ((-0.176096186969-0.575174940456j))*x_ref[1]**o + ((0.723502384009+0.380698414678j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.808537661056+0.158683181014j)*x[0]**o + ((-0.239876935469-0.0649393658006j))*x[0] + ((-0.603669208657-0.0959793148167j))*x[1]**o + ((0.418924724545-0.368636933909j))*x[1]
+        ref[(3, 0, 2)]=(0.808537661056+0.158683181014j)*x_ref[0]**o + ((-0.239876935469-0.0649393658006j))*x_ref[0] + ((-0.603669208657-0.0959793148167j))*x_ref[1]**o + ((0.418924724545-0.368636933909j))*x_ref[1]
+        arg[(3, 0, 3)]=(-0.000486194723323-0.695544300801j)*x[0]**o + ((-0.0905661036466-0.686603624296j))*x[0] + ((-0.468071017566+0.518956888717j))*x[1]**o + ((-0.456781600632+0.506218524472j))*x[1]
+        ref[(3, 0, 3)]=(-0.000486194723323-0.695544300801j)*x_ref[0]**o + ((-0.0905661036466-0.686603624296j))*x_ref[0] + ((-0.468071017566+0.518956888717j))*x_ref[1]**o + ((-0.456781600632+0.506218524472j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.658802334925+0.849162870711j)*x[0]**o + ((0.799056098579+0.400030808999j))*x[0] + ((0.136581443842+0.462612153223j))*x[1]**o + ((-0.820213453718-0.39376942722j))*x[1]
+        ref[(3, 1, 0)]=(-0.658802334925+0.849162870711j)*x_ref[0]**o + ((0.799056098579+0.400030808999j))*x_ref[0] + ((0.136581443842+0.462612153223j))*x_ref[1]**o + ((-0.820213453718-0.39376942722j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.872084305416+0.591539000792j)*x[0]**o + ((-0.0815085503048+0.356850146417j))*x[0] + ((-0.0785594225142+0.877092610643j))*x[1]**o + ((-0.755354153363+0.693517633706j))*x[1]
+        ref[(3, 1, 1)]=(0.872084305416+0.591539000792j)*x_ref[0]**o + ((-0.0815085503048+0.356850146417j))*x_ref[0] + ((-0.0785594225142+0.877092610643j))*x_ref[1]**o + ((-0.755354153363+0.693517633706j))*x_ref[1]
+        arg[(3, 1, 2)]=(0.123504494013-0.747186500211j)*x[0]**o + ((0.136435592334-0.522483238565j))*x[0] + ((-0.812901442877+0.712361200993j))*x[1]**o + ((0.230410704059-0.461515038916j))*x[1]
+        ref[(3, 1, 2)]=(0.123504494013-0.747186500211j)*x_ref[0]**o + ((0.136435592334-0.522483238565j))*x_ref[0] + ((-0.812901442877+0.712361200993j))*x_ref[1]**o + ((0.230410704059-0.461515038916j))*x_ref[1]
+        arg[(3, 1, 3)]=(-0.0523659359198-0.821255250153j)*x[0]**o + ((0.277815911649+0.569993359225j))*x[0] + ((0.775861008416-0.61098679754j))*x[1]**o + ((0.283021386965-0.606476804516j))*x[1]
+        ref[(3, 1, 3)]=(-0.0523659359198-0.821255250153j)*x_ref[0]**o + ((0.277815911649+0.569993359225j))*x_ref[0] + ((0.775861008416-0.61098679754j))*x_ref[1]**o + ((0.283021386965-0.606476804516j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.625145040135-0.44312825466j)*x[2]**o + ((-0.736132149101-0.240511449337j))*x[2]
+            ref[(0, 0, 0)]+=(-0.625145040135-0.44312825466j)*x_ref[2]**o + ((-0.736132149101-0.240511449337j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.494951833979+0.629192308364j)*x[2]**o + ((0.730334152158-0.82596679165j))*x[2]
+            ref[(0, 0, 1)]+=(0.494951833979+0.629192308364j)*x_ref[2]**o + ((0.730334152158-0.82596679165j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.158767129762-0.765624171447j)*x[2]**o + ((-0.815958919468+0.529122863448j))*x[2]
+            ref[(0, 0, 2)]+=(-0.158767129762-0.765624171447j)*x_ref[2]**o + ((-0.815958919468+0.529122863448j))*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.469791628308-0.337154846388j)*x[2]**o + ((-0.965721928006+0.310529989768j))*x[2]
+            ref[(0, 0, 3)]+=(-0.469791628308-0.337154846388j)*x_ref[2]**o + ((-0.965721928006+0.310529989768j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.0736346341166+0.544138990209j)*x[2]**o + ((0.095273786179+0.740366736734j))*x[2]
+            ref[(0, 1, 0)]+=(-0.0736346341166+0.544138990209j)*x_ref[2]**o + ((0.095273786179+0.740366736734j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.451084117885+0.450956612471j)*x[2]**o + ((0.163434712359-0.156487717798j))*x[2]
+            ref[(0, 1, 1)]+=(0.451084117885+0.450956612471j)*x_ref[2]**o + ((0.163434712359-0.156487717798j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.304771717952+0.221620390829j)*x[2]**o + ((0.488659789929-0.230518662473j))*x[2]
+            ref[(0, 1, 2)]+=(0.304771717952+0.221620390829j)*x_ref[2]**o + ((0.488659789929-0.230518662473j))*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.528909329679+0.271871076555j)*x[2]**o + ((0.234032707295+0.659980256863j))*x[2]
+            ref[(0, 1, 3)]+=(-0.528909329679+0.271871076555j)*x_ref[2]**o + ((0.234032707295+0.659980256863j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.220639026223+0.0311900862058j)*x[2]**o + ((-0.441924303608+0.875931873237j))*x[2]
+            ref[(1, 0, 0)]+=(-0.220639026223+0.0311900862058j)*x_ref[2]**o + ((-0.441924303608+0.875931873237j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.358724855379-0.637057554658j)*x[2]**o + ((-0.78475256462+0.949929171663j))*x[2]
+            ref[(1, 0, 1)]+=(-0.358724855379-0.637057554658j)*x_ref[2]**o + ((-0.78475256462+0.949929171663j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.565904372819+0.704679432955j)*x[2]**o + ((-0.458392306139+0.72964405793j))*x[2]
+            ref[(1, 0, 2)]+=(0.565904372819+0.704679432955j)*x_ref[2]**o + ((-0.458392306139+0.72964405793j))*x_ref[2]
+            arg[(1, 0, 3)]+=(0.143706580149-0.858500580248j)*x[2]**o + ((-0.135949602683-0.824812901942j))*x[2]
+            ref[(1, 0, 3)]+=(0.143706580149-0.858500580248j)*x_ref[2]**o + ((-0.135949602683-0.824812901942j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.312162763863+0.0546571116061j)*x[2]**o + ((0.0935365476569-0.292524697047j))*x[2]
+            ref[(1, 1, 0)]+=(0.312162763863+0.0546571116061j)*x_ref[2]**o + ((0.0935365476569-0.292524697047j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.176257962579-0.800402207679j)*x[2]**o + ((0.0318200968511-0.591982729239j))*x[2]
+            ref[(1, 1, 1)]+=(0.176257962579-0.800402207679j)*x_ref[2]**o + ((0.0318200968511-0.591982729239j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.272286493724-0.43853575527j)*x[2]**o + ((-0.867244914368-0.249432268267j))*x[2]
+            ref[(1, 1, 2)]+=(-0.272286493724-0.43853575527j)*x_ref[2]**o + ((-0.867244914368-0.249432268267j))*x_ref[2]
+            arg[(1, 1, 3)]+=(-0.403421216027+0.515692776908j)*x[2]**o + ((-0.575258466528+0.92697690415j))*x[2]
+            ref[(1, 1, 3)]+=(-0.403421216027+0.515692776908j)*x_ref[2]**o + ((-0.575258466528+0.92697690415j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.00560935110148-0.648140037588j)*x[2]**o + ((0.454473455946-0.855093919501j))*x[2]
+            ref[(2, 0, 0)]+=(0.00560935110148-0.648140037588j)*x_ref[2]**o + ((0.454473455946-0.855093919501j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.991825799504+0.972058164919j)*x[2]**o + ((0.157736350978-0.463460924479j))*x[2]
+            ref[(2, 0, 1)]+=(0.991825799504+0.972058164919j)*x_ref[2]**o + ((0.157736350978-0.463460924479j))*x_ref[2]
+            arg[(2, 0, 2)]+=(0.382241935531-0.643160609874j)*x[2]**o + ((-0.209628603188+0.126494019659j))*x[2]
+            ref[(2, 0, 2)]+=(0.382241935531-0.643160609874j)*x_ref[2]**o + ((-0.209628603188+0.126494019659j))*x_ref[2]
+            arg[(2, 0, 3)]+=(0.246565779774-0.783297370118j)*x[2]**o + ((-0.297551799207+0.161615055904j))*x[2]
+            ref[(2, 0, 3)]+=(0.246565779774-0.783297370118j)*x_ref[2]**o + ((-0.297551799207+0.161615055904j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.0546919094336-0.141684719379j)*x[2]**o + ((-0.845996137078-0.538194955448j))*x[2]
+            ref[(2, 1, 0)]+=(-0.0546919094336-0.141684719379j)*x_ref[2]**o + ((-0.845996137078-0.538194955448j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.695844880496+0.871251793739j)*x[2]**o + ((0.268574465013-0.933733090412j))*x[2]
+            ref[(2, 1, 1)]+=(0.695844880496+0.871251793739j)*x_ref[2]**o + ((0.268574465013-0.933733090412j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.197846305669-0.395117705101j)*x[2]**o + ((-0.299164764691+0.63485157644j))*x[2]
+            ref[(2, 1, 2)]+=(-0.197846305669-0.395117705101j)*x_ref[2]**o + ((-0.299164764691+0.63485157644j))*x_ref[2]
+            arg[(2, 1, 3)]+=(-0.814489194322+0.95513149791j)*x[2]**o + ((-0.0267355497747+0.637087538471j))*x[2]
+            ref[(2, 1, 3)]+=(-0.814489194322+0.95513149791j)*x_ref[2]**o + ((-0.0267355497747+0.637087538471j))*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.385376972885+0.375930436093j)*x[2]**o + ((-0.523848627658+0.557609290311j))*x[2]
+            ref[(3, 0, 0)]+=(-0.385376972885+0.375930436093j)*x_ref[2]**o + ((-0.523848627658+0.557609290311j))*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.958037615264-0.976863997605j)*x[2]**o + ((0.292745069001-0.321045723284j))*x[2]
+            ref[(3, 0, 1)]+=(-0.958037615264-0.976863997605j)*x_ref[2]**o + ((0.292745069001-0.321045723284j))*x_ref[2]
+            arg[(3, 0, 2)]+=(-0.744904228289+0.6221780442j)*x[2]**o + ((0.304545181902+0.273333166667j))*x[2]
+            ref[(3, 0, 2)]+=(-0.744904228289+0.6221780442j)*x_ref[2]**o + ((0.304545181902+0.273333166667j))*x_ref[2]
+            arg[(3, 0, 3)]+=(0.320985007603-0.328758618303j)*x[2]**o + ((0.291427853671-0.306435066353j))*x[2]
+            ref[(3, 0, 3)]+=(0.320985007603-0.328758618303j)*x_ref[2]**o + ((0.291427853671-0.306435066353j))*x_ref[2]
+            arg[(3, 1, 0)]+=(0.540192513873+0.0561342929962j)*x[2]**o + ((0.0704361833313-0.20292093524j))*x[2]
+            ref[(3, 1, 0)]+=(0.540192513873+0.0561342929962j)*x_ref[2]**o + ((0.0704361833313-0.20292093524j))*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.637571234274+0.289911795347j)*x[2]**o + ((0.146381368233-0.954590949695j))*x[2]
+            ref[(3, 1, 1)]+=(-0.637571234274+0.289911795347j)*x_ref[2]**o + ((0.146381368233-0.954590949695j))*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.362681248718+0.948439692186j)*x[2]**o + ((0.598375416358-0.644351012055j))*x[2]
+            ref[(3, 1, 2)]+=(-0.362681248718+0.948439692186j)*x_ref[2]**o + ((0.598375416358-0.644351012055j))*x_ref[2]
+            arg[(3, 1, 3)]+=(0.423629803506-0.612233105228j)*x[2]**o + ((-0.340619569016+0.89080475264j))*x[2]
+            ref[(3, 1, 3)]+=(0.423629803506-0.612233105228j)*x_ref[2]**o + ((-0.340619569016+0.89080475264j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2, 2),w)
+        ref = Data(0,(3, 4, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.400910094117-0.755603590897j)*x[0]**o + ((-0.749748964106+0.380424167862j))*x[0] + ((-0.856468672854+0.269761796621j))*x[1]**o + ((0.314116293166-0.0609172595618j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.400910094117-0.755603590897j)*x_ref[0]**o + ((-0.749748964106+0.380424167862j))*x_ref[0] + ((-0.856468672854+0.269761796621j))*x_ref[1]**o + ((0.314116293166-0.0609172595618j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.221969775416+0.652596260602j)*x[0]**o + ((-0.817189511455+0.28214149764j))*x[0] + ((-0.963321809549+0.0604550413082j))*x[1]**o + ((0.724007315464+0.532852524764j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.221969775416+0.652596260602j)*x_ref[0]**o + ((-0.817189511455+0.28214149764j))*x_ref[0] + ((-0.963321809549+0.0604550413082j))*x_ref[1]**o + ((0.724007315464+0.532852524764j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.728410848882+0.290360105147j)*x[0]**o + ((-0.739722633666+0.591418583118j))*x[0] + ((0.923155135199-0.455688815128j))*x[1]**o + ((-0.60650836073+0.0621925394518j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.728410848882+0.290360105147j)*x_ref[0]**o + ((-0.739722633666+0.591418583118j))*x_ref[0] + ((0.923155135199-0.455688815128j))*x_ref[1]**o + ((-0.60650836073+0.0621925394518j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.588291314788+0.787743018167j)*x[0]**o + ((-0.141626681622+0.640451593018j))*x[0] + ((-0.779128277872-0.185982257745j))*x[1]**o + ((0.289056266058+0.523039824368j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.588291314788+0.787743018167j)*x_ref[0]**o + ((-0.141626681622+0.640451593018j))*x_ref[0] + ((-0.779128277872-0.185982257745j))*x_ref[1]**o + ((0.289056266058+0.523039824368j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.804186889572+0.0863727034434j)*x[0]**o + ((0.741954277485+0.900401491778j))*x[0] + ((-0.125532610348+0.605459908741j))*x[1]**o + ((-0.386196078583+0.89729734019j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.804186889572+0.0863727034434j)*x_ref[0]**o + ((0.741954277485+0.900401491778j))*x_ref[0] + ((-0.125532610348+0.605459908741j))*x_ref[1]**o + ((-0.386196078583+0.89729734019j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.449199917072-0.1802601559j)*x[0]**o + ((-0.0682638278312+0.509543955211j))*x[0] + ((-0.499566399435+0.880125708668j))*x[1]**o + ((0.732987820758-0.465614121226j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.449199917072-0.1802601559j)*x_ref[0]**o + ((-0.0682638278312+0.509543955211j))*x_ref[0] + ((-0.499566399435+0.880125708668j))*x_ref[1]**o + ((0.732987820758-0.465614121226j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.833183980494+0.275102196499j)*x[0]**o + ((-0.309324140387+0.173583031647j))*x[0] + ((-0.1345022837-0.0368535295875j))*x[1]**o + ((0.0416211019992-0.844066342366j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.833183980494+0.275102196499j)*x_ref[0]**o + ((-0.309324140387+0.173583031647j))*x_ref[0] + ((-0.1345022837-0.0368535295875j))*x_ref[1]**o + ((0.0416211019992-0.844066342366j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.822412428623-0.776770548243j)*x[0]**o + ((0.273718525272-0.215586028686j))*x[0] + ((-0.462728270189+0.132881079021j))*x[1]**o + ((0.248126931923-0.077120745774j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.822412428623-0.776770548243j)*x_ref[0]**o + ((0.273718525272-0.215586028686j))*x_ref[0] + ((-0.462728270189+0.132881079021j))*x_ref[1]**o + ((0.248126931923-0.077120745774j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.559445128559+0.665975108244j)*x[0]**o + ((0.888523076484-0.775409222369j))*x[0] + ((-0.0689742233539-0.167959530386j))*x[1]**o + ((-0.790281763117+0.429626589238j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.559445128559+0.665975108244j)*x_ref[0]**o + ((0.888523076484-0.775409222369j))*x_ref[0] + ((-0.0689742233539-0.167959530386j))*x_ref[1]**o + ((-0.790281763117+0.429626589238j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.699329796832-0.48266106024j)*x[0]**o + ((-0.532830287761+0.785013013824j))*x[0] + ((-0.995889560252-0.643241009778j))*x[1]**o + ((0.197829170041+0.882637297547j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.699329796832-0.48266106024j)*x_ref[0]**o + ((-0.532830287761+0.785013013824j))*x_ref[0] + ((-0.995889560252-0.643241009778j))*x_ref[1]**o + ((0.197829170041+0.882637297547j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.447831484988-0.249091401695j)*x[0]**o + ((-0.153146346418-0.406861198016j))*x[0] + ((-0.247520418847-0.535695083613j))*x[1]**o + ((0.709754920098-0.276577440644j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.447831484988-0.249091401695j)*x_ref[0]**o + ((-0.153146346418-0.406861198016j))*x_ref[0] + ((-0.247520418847-0.535695083613j))*x_ref[1]**o + ((0.709754920098-0.276577440644j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.956272411697+0.0635268191803j)*x[0]**o + ((0.726547814057+0.942618169094j))*x[0] + ((0.170981031276-0.751969338546j))*x[1]**o + ((-0.781289031835+0.316151023402j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.956272411697+0.0635268191803j)*x_ref[0]**o + ((0.726547814057+0.942618169094j))*x_ref[0] + ((0.170981031276-0.751969338546j))*x_ref[1]**o + ((-0.781289031835+0.316151023402j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.342548312763+0.885005665756j)*x[0]**o + ((0.719249185996+0.120593565903j))*x[0] + ((-0.997147485825+0.197625890995j))*x[1]**o + ((-0.391415811862-0.687006549588j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.342548312763+0.885005665756j)*x_ref[0]**o + ((0.719249185996+0.120593565903j))*x_ref[0] + ((-0.997147485825+0.197625890995j))*x_ref[1]**o + ((-0.391415811862-0.687006549588j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.305418059964+0.253077589715j)*x[0]**o + ((-0.474690638456-0.779154037276j))*x[0] + ((0.368175887859-0.822764939084j))*x[1]**o + ((0.043465416009-0.739377165323j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.305418059964+0.253077589715j)*x_ref[0]**o + ((-0.474690638456-0.779154037276j))*x_ref[0] + ((0.368175887859-0.822764939084j))*x_ref[1]**o + ((0.043465416009-0.739377165323j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.17618516497+0.969764906706j)*x[0]**o + ((0.0919577289718+0.202331685338j))*x[0] + ((-0.71624960517-0.467281027924j))*x[1]**o + ((0.454587945692+0.923607563261j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.17618516497+0.969764906706j)*x_ref[0]**o + ((0.0919577289718+0.202331685338j))*x_ref[0] + ((-0.71624960517-0.467281027924j))*x_ref[1]**o + ((0.454587945692+0.923607563261j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(-0.704304862528+0.226173036172j)*x[0]**o + ((0.902737483067-0.385959636828j))*x[0] + ((0.21871842659+0.371250023918j))*x[1]**o + ((-0.71764414333-0.44542981289j))*x[1]
+        ref[(0, 3, 1, 1)]=(-0.704304862528+0.226173036172j)*x_ref[0]**o + ((0.902737483067-0.385959636828j))*x_ref[0] + ((0.21871842659+0.371250023918j))*x_ref[1]**o + ((-0.71764414333-0.44542981289j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.0877547650439-0.341365014575j)*x[0]**o + ((-0.803203709368-0.96447344994j))*x[0] + ((-0.896579365233-0.0728865512422j))*x[1]**o + ((0.87027257873-0.632193642513j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.0877547650439-0.341365014575j)*x_ref[0]**o + ((-0.803203709368-0.96447344994j))*x_ref[0] + ((-0.896579365233-0.0728865512422j))*x_ref[1]**o + ((0.87027257873-0.632193642513j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.103183345515+0.716002196958j)*x[0]**o + ((0.290850531792+0.112548000347j))*x[0] + ((-0.723954445749+0.00214307459462j))*x[1]**o + ((0.887368455277+0.555404176589j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.103183345515+0.716002196958j)*x_ref[0]**o + ((0.290850531792+0.112548000347j))*x_ref[0] + ((-0.723954445749+0.00214307459462j))*x_ref[1]**o + ((0.887368455277+0.555404176589j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.77492666812+0.405999401901j)*x[0]**o + ((0.218662604932-0.891234458884j))*x[0] + ((-0.6394894636-0.838468113905j))*x[1]**o + ((0.920576810662-0.351716420228j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.77492666812+0.405999401901j)*x_ref[0]**o + ((0.218662604932-0.891234458884j))*x_ref[0] + ((-0.6394894636-0.838468113905j))*x_ref[1]**o + ((0.920576810662-0.351716420228j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.848723231104-0.269754441071j)*x[0]**o + ((0.576311541195+0.451487410665j))*x[0] + ((-0.882648312829-0.154607537394j))*x[1]**o + ((0.312308869053+0.0275948675954j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.848723231104-0.269754441071j)*x_ref[0]**o + ((0.576311541195+0.451487410665j))*x_ref[0] + ((-0.882648312829-0.154607537394j))*x_ref[1]**o + ((0.312308869053+0.0275948675954j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.303455969237-0.930929254087j)*x[0]**o + ((-0.0850282772184+0.328535116887j))*x[0] + ((0.0904672487414+0.853814529892j))*x[1]**o + ((0.221367060727+0.644390613059j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.303455969237-0.930929254087j)*x_ref[0]**o + ((-0.0850282772184+0.328535116887j))*x_ref[0] + ((0.0904672487414+0.853814529892j))*x_ref[1]**o + ((0.221367060727+0.644390613059j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.740261834432+0.725828305568j)*x[0]**o + ((0.814632227496-0.727037270726j))*x[0] + ((0.270431026762+0.582176681323j))*x[1]**o + ((-0.947035077221+0.765913140778j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.740261834432+0.725828305568j)*x_ref[0]**o + ((0.814632227496-0.727037270726j))*x_ref[0] + ((0.270431026762+0.582176681323j))*x_ref[1]**o + ((-0.947035077221+0.765913140778j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.851981716793-0.217674760951j)*x[0]**o + ((-0.348765225271-0.673210902943j))*x[0] + ((0.864819861085-0.150696566437j))*x[1]**o + ((0.702276706931-0.431454810992j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.851981716793-0.217674760951j)*x_ref[0]**o + ((-0.348765225271-0.673210902943j))*x_ref[0] + ((0.864819861085-0.150696566437j))*x_ref[1]**o + ((0.702276706931-0.431454810992j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.77170947879-0.920808469895j)*x[0]**o + ((0.26268951482+0.815519407881j))*x[0] + ((0.603778142348-0.9370808498j))*x[1]**o + ((0.863297876064-0.464874519376j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.77170947879-0.920808469895j)*x_ref[0]**o + ((0.26268951482+0.815519407881j))*x_ref[0] + ((0.603778142348-0.9370808498j))*x_ref[1]**o + ((0.863297876064-0.464874519376j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.563130853193+0.22486163049j)*x[0]**o + ((-0.800491163004-0.355556915398j))*x[0] + ((0.418426801033-0.0245133279868j))*x[1]**o + ((0.114098442858-0.848242711065j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.563130853193+0.22486163049j)*x_ref[0]**o + ((-0.800491163004-0.355556915398j))*x_ref[0] + ((0.418426801033-0.0245133279868j))*x_ref[1]**o + ((0.114098442858-0.848242711065j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.312943147169-0.967276593722j)*x[0]**o + ((0.344395730475-0.832076562454j))*x[0] + ((-0.828605169277-0.0925613232536j))*x[1]**o + ((-0.464287808955+0.190330033908j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.312943147169-0.967276593722j)*x_ref[0]**o + ((0.344395730475-0.832076562454j))*x_ref[0] + ((-0.828605169277-0.0925613232536j))*x_ref[1]**o + ((-0.464287808955+0.190330033908j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.743701785782+0.667339547477j)*x[0]**o + ((-0.924826177095-0.99640149724j))*x[0] + ((0.210266636436+0.270305670366j))*x[1]**o + ((-0.835036427691-0.0281267595902j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.743701785782+0.667339547477j)*x_ref[0]**o + ((-0.924826177095-0.99640149724j))*x_ref[0] + ((0.210266636436+0.270305670366j))*x_ref[1]**o + ((-0.835036427691-0.0281267595902j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.965832136838+0.0426760024322j)*x[0]**o + ((-0.775971195026+0.87773447516j))*x[0] + ((0.482217874552+0.0579732695875j))*x[1]**o + ((-0.830451006681+0.194918600841j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.965832136838+0.0426760024322j)*x_ref[0]**o + ((-0.775971195026+0.87773447516j))*x_ref[0] + ((0.482217874552+0.0579732695875j))*x_ref[1]**o + ((-0.830451006681+0.194918600841j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.616660957287+0.804002417251j)*x[0]**o + ((-0.054416182167-0.239664107582j))*x[0] + ((-0.752069351341+0.585655316016j))*x[1]**o + ((-0.395437864192-0.153527752667j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.616660957287+0.804002417251j)*x_ref[0]**o + ((-0.054416182167-0.239664107582j))*x_ref[0] + ((-0.752069351341+0.585655316016j))*x_ref[1]**o + ((-0.395437864192-0.153527752667j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.381185611834-0.178329397887j)*x[0]**o + ((-0.316299612023-0.354621675856j))*x[0] + ((-0.769633262048+0.339207879546j))*x[1]**o + ((-0.613620481024+0.0600544482648j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.381185611834-0.178329397887j)*x_ref[0]**o + ((-0.316299612023-0.354621675856j))*x_ref[0] + ((-0.769633262048+0.339207879546j))*x_ref[1]**o + ((-0.613620481024+0.0600544482648j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.91724889886-0.569766366149j)*x[0]**o + ((-0.11158013131+0.775977181746j))*x[0] + ((0.518357501912+0.507932066287j))*x[1]**o + ((-0.454836974951-0.777732633891j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.91724889886-0.569766366149j)*x_ref[0]**o + ((-0.11158013131+0.775977181746j))*x_ref[0] + ((0.518357501912+0.507932066287j))*x_ref[1]**o + ((-0.454836974951-0.777732633891j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.502798779481+0.171215618801j)*x[0]**o + ((-0.473705820209+0.983198399768j))*x[0] + ((0.259923965882+0.907606387454j))*x[1]**o + ((-0.843213674522+0.970645034409j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.502798779481+0.171215618801j)*x_ref[0]**o + ((-0.473705820209+0.983198399768j))*x_ref[0] + ((0.259923965882+0.907606387454j))*x_ref[1]**o + ((-0.843213674522+0.970645034409j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.0881031287571+0.0324514816002j)*x[0]**o + ((0.111677260287+0.690320349934j))*x[0] + ((0.202182112529-0.452955966698j))*x[1]**o + ((-0.372841043276+0.570148676542j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.0881031287571+0.0324514816002j)*x_ref[0]**o + ((0.111677260287+0.690320349934j))*x_ref[0] + ((0.202182112529-0.452955966698j))*x_ref[1]**o + ((-0.372841043276+0.570148676542j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.341113755832-0.301057312304j)*x[0]**o + ((0.976486052435-0.798151779111j))*x[0] + ((0.75568032243+0.0719534486252j))*x[1]**o + ((0.470436333183+0.207411712733j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.341113755832-0.301057312304j)*x_ref[0]**o + ((0.976486052435-0.798151779111j))*x_ref[0] + ((0.75568032243+0.0719534486252j))*x_ref[1]**o + ((0.470436333183+0.207411712733j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.214189101513-0.735317928324j)*x[0]**o + ((-0.936463215522-0.227136828502j))*x[0] + ((0.398241616442-0.382362820583j))*x[1]**o + ((-0.950881505718-0.487667022374j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.214189101513-0.735317928324j)*x_ref[0]**o + ((-0.936463215522-0.227136828502j))*x_ref[0] + ((0.398241616442-0.382362820583j))*x_ref[1]**o + ((-0.950881505718-0.487667022374j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.595798467226+0.636682092829j)*x[0]**o + ((-0.862642022036-0.863799215432j))*x[0] + ((-0.891944937204+0.666732524077j))*x[1]**o + ((-0.541149035657-0.651974942853j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.595798467226+0.636682092829j)*x_ref[0]**o + ((-0.862642022036-0.863799215432j))*x_ref[0] + ((-0.891944937204+0.666732524077j))*x_ref[1]**o + ((-0.541149035657-0.651974942853j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.943632619479-0.352278650494j)*x[0]**o + ((0.620749799559+0.474742882493j))*x[0] + ((0.067613261406-0.32057277295j))*x[1]**o + ((-0.345666269127-0.141703777911j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.943632619479-0.352278650494j)*x_ref[0]**o + ((0.620749799559+0.474742882493j))*x_ref[0] + ((0.067613261406-0.32057277295j))*x_ref[1]**o + ((-0.345666269127-0.141703777911j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.0766423627876+0.117813396331j)*x[0]**o + ((-0.665437187661-0.784831124174j))*x[0] + ((-0.0988999936258+0.476681271146j))*x[1]**o + ((0.182018349721-0.493380662226j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.0766423627876+0.117813396331j)*x_ref[0]**o + ((-0.665437187661-0.784831124174j))*x_ref[0] + ((-0.0988999936258+0.476681271146j))*x_ref[1]**o + ((0.182018349721-0.493380662226j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.181937863019-0.100556129066j)*x[0]**o + ((0.697003962218-0.537513477782j))*x[0] + ((-0.0243813011192+0.384229482362j))*x[1]**o + ((-0.960967002404+0.537503449508j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.181937863019-0.100556129066j)*x_ref[0]**o + ((0.697003962218-0.537513477782j))*x_ref[0] + ((-0.0243813011192+0.384229482362j))*x_ref[1]**o + ((-0.960967002404+0.537503449508j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.851729159997-0.263906699509j)*x[0]**o + ((-0.573109839211-0.54193742468j))*x[0] + ((-0.0476760505953-0.879832217906j))*x[1]**o + ((0.693544417222-0.424319522653j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.851729159997-0.263906699509j)*x_ref[0]**o + ((-0.573109839211-0.54193742468j))*x_ref[0] + ((-0.0476760505953-0.879832217906j))*x_ref[1]**o + ((0.693544417222-0.424319522653j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(-0.0813247444359+0.84156855759j)*x[0]**o + ((-0.659532288631+0.651009736481j))*x[0] + ((0.770217342712+0.81460437576j))*x[1]**o + ((0.61204734161-0.487676337145j))*x[1]
+        ref[(2, 2, 0, 0)]=(-0.0813247444359+0.84156855759j)*x_ref[0]**o + ((-0.659532288631+0.651009736481j))*x_ref[0] + ((0.770217342712+0.81460437576j))*x_ref[1]**o + ((0.61204734161-0.487676337145j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.158463030009-0.396807599544j)*x[0]**o + ((0.751698745608-0.775977824853j))*x[0] + ((0.397095616916-0.26807693192j))*x[1]**o + ((-0.35440230517-0.123201908284j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.158463030009-0.396807599544j)*x_ref[0]**o + ((0.751698745608-0.775977824853j))*x_ref[0] + ((0.397095616916-0.26807693192j))*x_ref[1]**o + ((-0.35440230517-0.123201908284j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.863680723061-0.149366660257j)*x[0]**o + ((-0.367508453982+0.719956715554j))*x[0] + ((0.610656884647-0.0500431929376j))*x[1]**o + ((0.941667806408+0.118553902789j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.863680723061-0.149366660257j)*x_ref[0]**o + ((-0.367508453982+0.719956715554j))*x_ref[0] + ((0.610656884647-0.0500431929376j))*x_ref[1]**o + ((0.941667806408+0.118553902789j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.529915050458+0.567674844429j)*x[0]**o + ((0.0167152529425+0.319321046883j))*x[0] + ((-0.617076012511+0.814835581266j))*x[1]**o + ((-0.128518803428+0.380579797828j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.529915050458+0.567674844429j)*x_ref[0]**o + ((0.0167152529425+0.319321046883j))*x_ref[0] + ((-0.617076012511+0.814835581266j))*x_ref[1]**o + ((-0.128518803428+0.380579797828j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(-0.537924329326+0.101669060412j)*x[0]**o + ((0.85821806028-0.0712615073724j))*x[0] + ((-0.705129079345-0.545836511093j))*x[1]**o + ((0.804662403256-0.652474820867j))*x[1]
+        ref[(2, 3, 0, 0)]=(-0.537924329326+0.101669060412j)*x_ref[0]**o + ((0.85821806028-0.0712615073724j))*x_ref[0] + ((-0.705129079345-0.545836511093j))*x_ref[1]**o + ((0.804662403256-0.652474820867j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(-0.668249460687+0.418328265016j)*x[0]**o + ((-0.305542789067+0.733590021787j))*x[0] + ((-0.694290941086-0.263412875645j))*x[1]**o + ((0.402056141846-0.656503149127j))*x[1]
+        ref[(2, 3, 0, 1)]=(-0.668249460687+0.418328265016j)*x_ref[0]**o + ((-0.305542789067+0.733590021787j))*x_ref[0] + ((-0.694290941086-0.263412875645j))*x_ref[1]**o + ((0.402056141846-0.656503149127j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(-0.974487968292+0.0239992724819j)*x[0]**o + ((-0.764910185614-0.914340458313j))*x[0] + ((0.733067083421+0.383633837011j))*x[1]**o + ((-0.589581499092+0.141145078502j))*x[1]
+        ref[(2, 3, 1, 0)]=(-0.974487968292+0.0239992724819j)*x_ref[0]**o + ((-0.764910185614-0.914340458313j))*x_ref[0] + ((0.733067083421+0.383633837011j))*x_ref[1]**o + ((-0.589581499092+0.141145078502j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(-0.777438178027+0.947300075489j)*x[0]**o + ((0.543424730224+0.586506215521j))*x[0] + ((-0.38745924502-0.740374894176j))*x[1]**o + ((-0.338184656756+0.592440390376j))*x[1]
+        ref[(2, 3, 1, 1)]=(-0.777438178027+0.947300075489j)*x_ref[0]**o + ((0.543424730224+0.586506215521j))*x_ref[0] + ((-0.38745924502-0.740374894176j))*x_ref[1]**o + ((-0.338184656756+0.592440390376j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.766458978221-0.515191360758j)*x[2]**o + ((0.967149083187+0.976218303979j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.766458978221-0.515191360758j)*x_ref[2]**o + ((0.967149083187+0.976218303979j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.0804623459415-0.195795466929j)*x[2]**o + ((-0.384056075524-0.800376040037j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.0804623459415-0.195795466929j)*x_ref[2]**o + ((-0.384056075524-0.800376040037j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.56862854375+0.899029505724j)*x[2]**o + ((-0.887789327814+0.593079748093j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.56862854375+0.899029505724j)*x_ref[2]**o + ((-0.887789327814+0.593079748093j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.691044302058-0.273917896746j)*x[2]**o + ((-0.232150922178-0.580517199578j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.691044302058-0.273917896746j)*x_ref[2]**o + ((-0.232150922178-0.580517199578j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.681435076399+0.347018205131j)*x[2]**o + ((-0.280909387523+0.845738781432j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.681435076399+0.347018205131j)*x_ref[2]**o + ((-0.280909387523+0.845738781432j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.475420466317-0.712503125108j)*x[2]**o + ((-0.575784250225+0.672801524975j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.475420466317-0.712503125108j)*x_ref[2]**o + ((-0.575784250225+0.672801524975j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.665541569051+0.231588610233j)*x[2]**o + ((0.738475655477-0.549503591755j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.665541569051+0.231588610233j)*x_ref[2]**o + ((0.738475655477-0.549503591755j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.999974062004+0.214191668839j)*x[2]**o + ((0.0419350386982+0.883564485678j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.999974062004+0.214191668839j)*x_ref[2]**o + ((0.0419350386982+0.883564485678j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.968196924139-0.605302502132j)*x[2]**o + ((0.272276513477-0.383019105004j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.968196924139-0.605302502132j)*x_ref[2]**o + ((0.272276513477-0.383019105004j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.598053762737-0.441721767493j)*x[2]**o + ((0.0934363433702+0.865034069212j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.598053762737-0.441721767493j)*x_ref[2]**o + ((0.0934363433702+0.865034069212j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.261451895622+0.253813738553j)*x[2]**o + ((0.144120687739+0.958662939651j))*x[2]
+            ref[(0, 2, 1, 0)]+=(0.261451895622+0.253813738553j)*x_ref[2]**o + ((0.144120687739+0.958662939651j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.797188011834+0.314727389877j)*x[2]**o + ((0.735564017676+0.438640612196j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.797188011834+0.314727389877j)*x_ref[2]**o + ((0.735564017676+0.438640612196j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.390896799582+0.866243684211j)*x[2]**o + ((0.49628756292+0.488025856722j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.390896799582+0.866243684211j)*x_ref[2]**o + ((0.49628756292+0.488025856722j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.641066474048-0.709724194666j)*x[2]**o + ((0.274784581644+0.755004202019j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.641066474048-0.709724194666j)*x_ref[2]**o + ((0.274784581644+0.755004202019j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.188462320355+0.606492276553j)*x[2]**o + ((-0.658206456561-0.991897299399j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.188462320355+0.606492276553j)*x_ref[2]**o + ((-0.658206456561-0.991897299399j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.26833562462+0.198202154303j)*x[2]**o + ((-0.67805549444-0.518078444115j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.26833562462+0.198202154303j)*x_ref[2]**o + ((-0.67805549444-0.518078444115j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.258432290219-0.867161739418j)*x[2]**o + ((-0.608932417176+0.361320427272j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.258432290219-0.867161739418j)*x_ref[2]**o + ((-0.608932417176+0.361320427272j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.411799223813-0.721551859463j)*x[2]**o + ((0.0499053889867+0.793946046881j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.411799223813-0.721551859463j)*x_ref[2]**o + ((0.0499053889867+0.793946046881j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.688362139979+0.97216528124j)*x[2]**o + ((-0.696027660406-0.855656320571j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.688362139979+0.97216528124j)*x_ref[2]**o + ((-0.696027660406-0.855656320571j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.417067173222+0.760264051822j)*x[2]**o + ((-0.354467049091+0.949811591269j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.417067173222+0.760264051822j)*x_ref[2]**o + ((-0.354467049091+0.949811591269j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.502342293007-0.213021058335j)*x[2]**o + ((-0.38029330165+0.400891168344j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.502342293007-0.213021058335j)*x_ref[2]**o + ((-0.38029330165+0.400891168344j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.520491314061+0.767633981405j)*x[2]**o + ((-0.630210041521+0.731131623646j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.520491314061+0.767633981405j)*x_ref[2]**o + ((-0.630210041521+0.731131623646j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.51228336945+0.986836404454j)*x[2]**o + ((-0.12609572466-0.495568642128j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.51228336945+0.986836404454j)*x_ref[2]**o + ((-0.12609572466-0.495568642128j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.0562732941854+0.416656625744j)*x[2]**o + ((-0.0743926302896-0.598572576038j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.0562732941854+0.416656625744j)*x_ref[2]**o + ((-0.0743926302896-0.598572576038j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.923121415335-0.941678304748j)*x[2]**o + ((0.610339535753-0.382122247858j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.923121415335-0.941678304748j)*x_ref[2]**o + ((0.610339535753-0.382122247858j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.777595961713+0.177009012919j)*x[2]**o + ((0.14769303247+0.476433314358j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.777595961713+0.177009012919j)*x_ref[2]**o + ((0.14769303247+0.476433314358j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.692594996996+0.261597623254j)*x[2]**o + ((-0.874367110935-0.321041048417j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.692594996996+0.261597623254j)*x_ref[2]**o + ((-0.874367110935-0.321041048417j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.986172541459+0.612777665447j)*x[2]**o + ((0.832197461125-0.492721803402j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.986172541459+0.612777665447j)*x_ref[2]**o + ((0.832197461125-0.492721803402j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.0925069774129-0.176044848714j)*x[2]**o + ((0.710381963909-0.262837098271j))*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.0925069774129-0.176044848714j)*x_ref[2]**o + ((0.710381963909-0.262837098271j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.647781190364-0.631818906683j)*x[2]**o + ((0.573016391199-0.243345844178j))*x[2]
+            ref[(1, 3, 0, 1)]+=(0.647781190364-0.631818906683j)*x_ref[2]**o + ((0.573016391199-0.243345844178j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.638512029931+0.833662742434j)*x[2]**o + ((0.797081752477-0.983231581424j))*x[2]
+            ref[(1, 3, 1, 0)]+=(0.638512029931+0.833662742434j)*x_ref[2]**o + ((0.797081752477-0.983231581424j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.673714107177-0.875616873405j)*x[2]**o + ((-0.200042441671-0.852669286429j))*x[2]
+            ref[(1, 3, 1, 1)]+=(0.673714107177-0.875616873405j)*x_ref[2]**o + ((-0.200042441671-0.852669286429j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.273874811532+0.862892735801j)*x[2]**o + ((0.478328911502+0.79922586656j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.273874811532+0.862892735801j)*x_ref[2]**o + ((0.478328911502+0.79922586656j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.452106732965-0.549680829468j)*x[2]**o + ((-0.596529211657-0.477324105658j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.452106732965-0.549680829468j)*x_ref[2]**o + ((-0.596529211657-0.477324105658j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.223492426246-0.188237171785j)*x[2]**o + ((-0.264880063369+0.970258285352j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.223492426246-0.188237171785j)*x_ref[2]**o + ((-0.264880063369+0.970258285352j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.856342086625+0.614893249266j)*x[2]**o + ((0.717337553225-0.417802705087j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.856342086625+0.614893249266j)*x_ref[2]**o + ((0.717337553225-0.417802705087j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.179772922145-0.351263525952j)*x[2]**o + ((-0.480332804489+0.25145842277j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.179772922145-0.351263525952j)*x_ref[2]**o + ((-0.480332804489+0.25145842277j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.277579348071+0.998669102369j)*x[2]**o + ((0.727358339322+0.652026290907j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.277579348071+0.998669102369j)*x_ref[2]**o + ((0.727358339322+0.652026290907j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.75976646788+0.330779854979j)*x[2]**o + ((0.798028729114-0.527452580019j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.75976646788+0.330779854979j)*x_ref[2]**o + ((0.798028729114-0.527452580019j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.648892616468-0.390752960852j)*x[2]**o + ((-0.673395866481-0.32641878354j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.648892616468-0.390752960852j)*x_ref[2]**o + ((-0.673395866481-0.32641878354j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.0154516276186-0.712173065813j)*x[2]**o + ((0.629187497971+0.899107680254j))*x[2]
+            ref[(2, 2, 0, 0)]+=(0.0154516276186-0.712173065813j)*x_ref[2]**o + ((0.629187497971+0.899107680254j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.0945687684822+0.0887775495187j)*x[2]**o + ((-0.778553934333-0.469910176759j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.0945687684822+0.0887775495187j)*x_ref[2]**o + ((-0.778553934333-0.469910176759j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.980940048215-0.458388077173j)*x[2]**o + ((0.654782015653+0.0362461990281j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.980940048215-0.458388077173j)*x_ref[2]**o + ((0.654782015653+0.0362461990281j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.0655889309834-0.792401682413j)*x[2]**o + ((-0.0102761900182+0.182008893989j))*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.0655889309834-0.792401682413j)*x_ref[2]**o + ((-0.0102761900182+0.182008893989j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(0.68601435142+0.129055876411j)*x[2]**o + ((0.73288910109-0.730220116085j))*x[2]
+            ref[(2, 3, 0, 0)]+=(0.68601435142+0.129055876411j)*x_ref[2]**o + ((0.73288910109-0.730220116085j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(-0.134087597711-0.59034357238j)*x[2]**o + ((0.268530959326+0.0279936596314j))*x[2]
+            ref[(2, 3, 0, 1)]+=(-0.134087597711-0.59034357238j)*x_ref[2]**o + ((0.268530959326+0.0279936596314j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(0.997718058883+0.880452708227j)*x[2]**o + ((-0.0792984671025-0.547858741812j))*x[2]
+            ref[(2, 3, 1, 0)]+=(0.997718058883+0.880452708227j)*x_ref[2]**o + ((-0.0792984671025-0.547858741812j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(0.476303118761-0.193075272107j)*x[2]**o + ((-0.0513861491508-0.0190309458388j))*x[2]
+            ref[(2, 3, 1, 1)]+=(0.476303118761-0.193075272107j)*x_ref[2]**o + ((-0.0513861491508-0.0190309458388j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.52166128061-0.666122053521j)*x[0]**o + ((0.817622647431-0.152787756076j))*x[0] + ((-0.653077225262+0.0540888071949j))*x[1]**o + ((0.0869028851631+0.418520306248j))*x[1]
+        ref=(-0.52166128061-0.666122053521j)*x_ref[0]**o + ((0.817622647431-0.152787756076j))*x_ref[0] + ((-0.653077225262+0.0540888071949j))*x_ref[1]**o + ((0.0869028851631+0.418520306248j))*x_ref[1]
+        if dim==3:
+            arg+=((0.0771122192234+0.85112062096j))*x[2]**o + ((-0.370850112416-0.306069931246j))*x[2]
+            ref+=((0.0771122192234+0.85112062096j))*x_ref[2]**o + ((-0.370850112416-0.306069931246j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.944282507355-0.81767027796j)*x[0]**o + ((-0.04435023564-0.739402982165j))*x[0] + ((-0.574805380087+0.205993031107j))*x[1]**o + ((-0.887366335216+0.660905898346j))*x[1]
+        ref[(0,)]=(-0.944282507355-0.81767027796j)*x_ref[0]**o + ((-0.04435023564-0.739402982165j))*x_ref[0] + ((-0.574805380087+0.205993031107j))*x_ref[1]**o + ((-0.887366335216+0.660905898346j))*x_ref[1]
+        arg[(1,)]=(-0.629603087692-0.426559394146j)*x[0]**o + ((0.489345817778-0.00575642866589j))*x[0] + ((0.629647034727+0.651351916557j))*x[1]**o + ((0.934642318839-0.312642249161j))*x[1]
+        ref[(1,)]=(-0.629603087692-0.426559394146j)*x_ref[0]**o + ((0.489345817778-0.00575642866589j))*x_ref[0] + ((0.629647034727+0.651351916557j))*x_ref[1]**o + ((0.934642318839-0.312642249161j))*x_ref[1]
+        arg[(2,)]=(-0.49407717905-0.0191205941227j)*x[0]**o + ((-0.44317083379+0.5934872624j))*x[0] + ((-0.476929769407-0.763129426009j))*x[1]**o + ((-0.988623525301-0.50335083816j))*x[1]
+        ref[(2,)]=(-0.49407717905-0.0191205941227j)*x_ref[0]**o + ((-0.44317083379+0.5934872624j))*x_ref[0] + ((-0.476929769407-0.763129426009j))*x_ref[1]**o + ((-0.988623525301-0.50335083816j))*x_ref[1]
+        arg[(3,)]=(-0.852025031196+0.957232689728j)*x[0]**o + ((-0.0994079224085-0.490966928913j))*x[0] + ((-0.880205049883+0.467660557545j))*x[1]**o + ((0.881838369203-0.565811746767j))*x[1]
+        ref[(3,)]=(-0.852025031196+0.957232689728j)*x_ref[0]**o + ((-0.0994079224085-0.490966928913j))*x_ref[0] + ((-0.880205049883+0.467660557545j))*x_ref[1]**o + ((0.881838369203-0.565811746767j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.00835125220226-0.32310389024j)*x[2]**o + ((-0.0930098865533-0.181111334013j))*x[2]
+            ref[(0,)]+=(-0.00835125220226-0.32310389024j)*x_ref[2]**o + ((-0.0930098865533-0.181111334013j))*x_ref[2]
+            arg[(1,)]+=(0.347887461613-0.58371187594j)*x[2]**o + ((0.088035751189-0.0799547887745j))*x[2]
+            ref[(1,)]+=(0.347887461613-0.58371187594j)*x_ref[2]**o + ((0.088035751189-0.0799547887745j))*x_ref[2]
+            arg[(2,)]+=(0.487097106268-0.397891044027j)*x[2]**o + ((-0.472638752013-0.607096887206j))*x[2]
+            ref[(2,)]+=(0.487097106268-0.397891044027j)*x_ref[2]**o + ((-0.472638752013-0.607096887206j))*x_ref[2]
+            arg[(3,)]+=(-0.496743615048+0.676813728188j)*x[2]**o + ((0.377556230489+0.782923550638j))*x[2]
+            ref[(3,)]+=(-0.496743615048+0.676813728188j)*x_ref[2]**o + ((0.377556230489+0.782923550638j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(0.633658336971+0.696809306275j)*x[0]**o + ((0.534402413397+0.0357457835443j))*x[0] + ((0.768565580483-0.79991635855j))*x[1]**o + ((-0.822824769061-0.909651096227j))*x[1]
+        ref[(0, 0)]=(0.633658336971+0.696809306275j)*x_ref[0]**o + ((0.534402413397+0.0357457835443j))*x_ref[0] + ((0.768565580483-0.79991635855j))*x_ref[1]**o + ((-0.822824769061-0.909651096227j))*x_ref[1]
+        arg[(0, 1)]=(-0.737150893479-0.12821068086j)*x[0]**o + ((0.63340536188-0.379004247728j))*x[0] + ((-0.633574975416-0.343559815188j))*x[1]**o + ((-0.770705061152+0.851306055831j))*x[1]
+        ref[(0, 1)]=(-0.737150893479-0.12821068086j)*x_ref[0]**o + ((0.63340536188-0.379004247728j))*x_ref[0] + ((-0.633574975416-0.343559815188j))*x_ref[1]**o + ((-0.770705061152+0.851306055831j))*x_ref[1]
+        arg[(0, 2)]=(-0.233884560663+0.62442476977j)*x[0]**o + ((0.893070844807+0.828986178303j))*x[0] + ((-0.0602890351747-0.666989104194j))*x[1]**o + ((-0.696352529357+0.778163751838j))*x[1]
+        ref[(0, 2)]=(-0.233884560663+0.62442476977j)*x_ref[0]**o + ((0.893070844807+0.828986178303j))*x_ref[0] + ((-0.0602890351747-0.666989104194j))*x_ref[1]**o + ((-0.696352529357+0.778163751838j))*x_ref[1]
+        arg[(1, 0)]=(-0.440002493684-0.733564105325j)*x[0]**o + ((-0.317746496044+0.0209352950303j))*x[0] + ((-0.547266633267-0.435646036782j))*x[1]**o + ((-0.900426947127+0.747598574018j))*x[1]
+        ref[(1, 0)]=(-0.440002493684-0.733564105325j)*x_ref[0]**o + ((-0.317746496044+0.0209352950303j))*x_ref[0] + ((-0.547266633267-0.435646036782j))*x_ref[1]**o + ((-0.900426947127+0.747598574018j))*x_ref[1]
+        arg[(1, 1)]=(-0.0262173212192-0.130854881933j)*x[0]**o + ((-0.446022676536+0.141292366837j))*x[0] + ((0.740041825782+0.866505047656j))*x[1]**o + ((-0.652497223058+0.905405995821j))*x[1]
+        ref[(1, 1)]=(-0.0262173212192-0.130854881933j)*x_ref[0]**o + ((-0.446022676536+0.141292366837j))*x_ref[0] + ((0.740041825782+0.866505047656j))*x_ref[1]**o + ((-0.652497223058+0.905405995821j))*x_ref[1]
+        arg[(1, 2)]=(-0.306135777172+0.898694675195j)*x[0]**o + ((0.603922789239+0.234767993986j))*x[0] + ((-0.228190495363+0.326514478599j))*x[1]**o + ((-0.594277500924-0.024805760005j))*x[1]
+        ref[(1, 2)]=(-0.306135777172+0.898694675195j)*x_ref[0]**o + ((0.603922789239+0.234767993986j))*x_ref[0] + ((-0.228190495363+0.326514478599j))*x_ref[1]**o + ((-0.594277500924-0.024805760005j))*x_ref[1]
+        arg[(2, 0)]=(-0.931493537089+0.644195519742j)*x[0]**o + ((-0.252659924647+0.737164575147j))*x[0] + ((0.139310319943+0.144608653594j))*x[1]**o + ((-0.791470354047+0.32806890625j))*x[1]
+        ref[(2, 0)]=(-0.931493537089+0.644195519742j)*x_ref[0]**o + ((-0.252659924647+0.737164575147j))*x_ref[0] + ((0.139310319943+0.144608653594j))*x_ref[1]**o + ((-0.791470354047+0.32806890625j))*x_ref[1]
+        arg[(2, 1)]=(-0.108636803109+0.0355332623298j)*x[0]**o + ((-0.681349439951-0.738568692799j))*x[0] + ((0.601767506897-0.247336304284j))*x[1]**o + ((-0.655278870613-0.0206477001071j))*x[1]
+        ref[(2, 1)]=(-0.108636803109+0.0355332623298j)*x_ref[0]**o + ((-0.681349439951-0.738568692799j))*x_ref[0] + ((0.601767506897-0.247336304284j))*x_ref[1]**o + ((-0.655278870613-0.0206477001071j))*x_ref[1]
+        arg[(2, 2)]=(0.37657058979+0.547910854945j)*x[0]**o + ((-0.913324777551-0.325086848398j))*x[0] + ((0.742351258407+0.868123624479j))*x[1]**o + ((0.0777243248037-0.742902513973j))*x[1]
+        ref[(2, 2)]=(0.37657058979+0.547910854945j)*x_ref[0]**o + ((-0.913324777551-0.325086848398j))*x_ref[0] + ((0.742351258407+0.868123624479j))*x_ref[1]**o + ((0.0777243248037-0.742902513973j))*x_ref[1]
+        arg[(3, 0)]=(0.927961680134-0.270761160255j)*x[0]**o + ((0.0945404642457+0.272147207689j))*x[0] + ((-0.142245885528+0.420883781526j))*x[1]**o + ((0.197568183167-0.325520180653j))*x[1]
+        ref[(3, 0)]=(0.927961680134-0.270761160255j)*x_ref[0]**o + ((0.0945404642457+0.272147207689j))*x_ref[0] + ((-0.142245885528+0.420883781526j))*x_ref[1]**o + ((0.197568183167-0.325520180653j))*x_ref[1]
+        arg[(3, 1)]=(0.884744845614+0.606194699153j)*x[0]**o + ((-0.254520802555-0.478163667403j))*x[0] + ((-0.566285278876+0.609039713088j))*x[1]**o + ((-0.499268670623+0.702229073636j))*x[1]
+        ref[(3, 1)]=(0.884744845614+0.606194699153j)*x_ref[0]**o + ((-0.254520802555-0.478163667403j))*x_ref[0] + ((-0.566285278876+0.609039713088j))*x_ref[1]**o + ((-0.499268670623+0.702229073636j))*x_ref[1]
+        arg[(3, 2)]=(0.213528248043-0.604043182624j)*x[0]**o + ((0.0692090487552-0.334008043798j))*x[0] + ((-0.0739631485818-0.0540555613927j))*x[1]**o + ((-0.492922188362+0.812548088164j))*x[1]
+        ref[(3, 2)]=(0.213528248043-0.604043182624j)*x_ref[0]**o + ((0.0692090487552-0.334008043798j))*x_ref[0] + ((-0.0739631485818-0.0540555613927j))*x_ref[1]**o + ((-0.492922188362+0.812548088164j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.706270539623+0.0275540030817j)*x[2]**o + ((0.252194791074+0.551279450162j))*x[2]
+            ref[(0, 0)]+=(-0.706270539623+0.0275540030817j)*x_ref[2]**o + ((0.252194791074+0.551279450162j))*x_ref[2]
+            arg[(0, 1)]+=(0.64806221654-0.545182858379j)*x[2]**o + ((-0.836244106682+0.322544637561j))*x[2]
+            ref[(0, 1)]+=(0.64806221654-0.545182858379j)*x_ref[2]**o + ((-0.836244106682+0.322544637561j))*x_ref[2]
+            arg[(0, 2)]+=(-0.0676095346381-0.71890244719j)*x[2]**o + ((-0.16966098232+0.428192864243j))*x[2]
+            ref[(0, 2)]+=(-0.0676095346381-0.71890244719j)*x_ref[2]**o + ((-0.16966098232+0.428192864243j))*x_ref[2]
+            arg[(1, 0)]+=(-0.0681459172025-0.844799144557j)*x[2]**o + ((0.917521854127-0.67715432286j))*x[2]
+            ref[(1, 0)]+=(-0.0681459172025-0.844799144557j)*x_ref[2]**o + ((0.917521854127-0.67715432286j))*x_ref[2]
+            arg[(1, 1)]+=(-0.872585353212+0.133797404786j)*x[2]**o + ((-0.55288248792-0.136651616704j))*x[2]
+            ref[(1, 1)]+=(-0.872585353212+0.133797404786j)*x_ref[2]**o + ((-0.55288248792-0.136651616704j))*x_ref[2]
+            arg[(1, 2)]+=(0.0491178409957+0.687906600037j)*x[2]**o + ((0.363442777456+0.546501204814j))*x[2]
+            ref[(1, 2)]+=(0.0491178409957+0.687906600037j)*x_ref[2]**o + ((0.363442777456+0.546501204814j))*x_ref[2]
+            arg[(2, 0)]+=(0.262073682115-0.480256728331j)*x[2]**o + ((-0.803245213498-0.987393276649j))*x[2]
+            ref[(2, 0)]+=(0.262073682115-0.480256728331j)*x_ref[2]**o + ((-0.803245213498-0.987393276649j))*x_ref[2]
+            arg[(2, 1)]+=(0.391458464834-0.324751874184j)*x[2]**o + ((-0.0666463677376+0.630326400925j))*x[2]
+            ref[(2, 1)]+=(0.391458464834-0.324751874184j)*x_ref[2]**o + ((-0.0666463677376+0.630326400925j))*x_ref[2]
+            arg[(2, 2)]+=(0.290088968584+0.208361736108j)*x[2]**o + ((0.372399115731-0.391304995524j))*x[2]
+            ref[(2, 2)]+=(0.290088968584+0.208361736108j)*x_ref[2]**o + ((0.372399115731-0.391304995524j))*x_ref[2]
+            arg[(3, 0)]+=(-0.343307599136-0.196342454583j)*x[2]**o + ((0.246512239537-0.186076154553j))*x[2]
+            ref[(3, 0)]+=(-0.343307599136-0.196342454583j)*x_ref[2]**o + ((0.246512239537-0.186076154553j))*x_ref[2]
+            arg[(3, 1)]+=(-0.301412409075-0.117880293911j)*x[2]**o + ((0.241784118559+0.516641917996j))*x[2]
+            ref[(3, 1)]+=(-0.301412409075-0.117880293911j)*x_ref[2]**o + ((0.241784118559+0.516641917996j))*x_ref[2]
+            arg[(3, 2)]+=(-0.924705107871-0.0410573371669j)*x[2]**o + ((0.246158283098-0.670331040794j))*x[2]
+            ref[(3, 2)]+=(-0.924705107871-0.0410573371669j)*x_ref[2]**o + ((0.246158283098-0.670331040794j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.406894136991-0.620820396612j)*x[0]**o + ((0.655237444929-0.00192810883238j))*x[0] + ((0.662157633328-0.218826389545j))*x[1]**o + ((-0.66043361716-0.703754049544j))*x[1]
+        ref[(0, 0, 0)]=(-0.406894136991-0.620820396612j)*x_ref[0]**o + ((0.655237444929-0.00192810883238j))*x_ref[0] + ((0.662157633328-0.218826389545j))*x_ref[1]**o + ((-0.66043361716-0.703754049544j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.400827159819+0.886557465148j)*x[0]**o + ((-0.56291554093-0.810494866798j))*x[0] + ((-0.229932761918-0.747948244062j))*x[1]**o + ((0.0639391211776-0.834082049258j))*x[1]
+        ref[(0, 0, 1)]=(0.400827159819+0.886557465148j)*x_ref[0]**o + ((-0.56291554093-0.810494866798j))*x_ref[0] + ((-0.229932761918-0.747948244062j))*x_ref[1]**o + ((0.0639391211776-0.834082049258j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.0871688266878+0.795434670681j)*x[0]**o + ((0.256464798527-0.191531846859j))*x[0] + ((0.829972516105+0.124509414717j))*x[1]**o + ((-0.362185119344+0.622249557826j))*x[1]
+        ref[(0, 0, 2)]=(0.0871688266878+0.795434670681j)*x_ref[0]**o + ((0.256464798527-0.191531846859j))*x_ref[0] + ((0.829972516105+0.124509414717j))*x_ref[1]**o + ((-0.362185119344+0.622249557826j))*x_ref[1]
+        arg[(0, 0, 3)]=(-0.212737759431-0.173978308917j)*x[0]**o + ((0.994085877958-0.452406679413j))*x[0] + ((0.961643418989-0.92855569147j))*x[1]**o + ((-0.679921838927+0.735361253064j))*x[1]
+        ref[(0, 0, 3)]=(-0.212737759431-0.173978308917j)*x_ref[0]**o + ((0.994085877958-0.452406679413j))*x_ref[0] + ((0.961643418989-0.92855569147j))*x_ref[1]**o + ((-0.679921838927+0.735361253064j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.429033368092-0.847504628682j)*x[0]**o + ((-0.975917387206-0.353396161777j))*x[0] + ((0.959177061766+0.24376422556j))*x[1]**o + ((0.963066292557-0.692282025641j))*x[1]
+        ref[(0, 1, 0)]=(-0.429033368092-0.847504628682j)*x_ref[0]**o + ((-0.975917387206-0.353396161777j))*x_ref[0] + ((0.959177061766+0.24376422556j))*x_ref[1]**o + ((0.963066292557-0.692282025641j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.350930643993-0.130451475837j)*x[0]**o + ((0.280706020158-0.797659894868j))*x[0] + ((-0.635975954919-0.0309224520881j))*x[1]**o + ((-0.841383111195+0.869165244285j))*x[1]
+        ref[(0, 1, 1)]=(-0.350930643993-0.130451475837j)*x_ref[0]**o + ((0.280706020158-0.797659894868j))*x_ref[0] + ((-0.635975954919-0.0309224520881j))*x_ref[1]**o + ((-0.841383111195+0.869165244285j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.777770536476-0.770954257768j)*x[0]**o + ((0.136872667035+0.129143482171j))*x[0] + ((0.00826898905697+0.562983953953j))*x[1]**o + ((-0.422606788127+0.87695023674j))*x[1]
+        ref[(0, 1, 2)]=(-0.777770536476-0.770954257768j)*x_ref[0]**o + ((0.136872667035+0.129143482171j))*x_ref[0] + ((0.00826898905697+0.562983953953j))*x_ref[1]**o + ((-0.422606788127+0.87695023674j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.918915889921-0.243288940447j)*x[0]**o + ((0.493084508735+0.183959358226j))*x[0] + ((-0.90849574002+0.96627763565j))*x[1]**o + ((0.522677615902-0.254570541654j))*x[1]
+        ref[(0, 1, 3)]=(0.918915889921-0.243288940447j)*x_ref[0]**o + ((0.493084508735+0.183959358226j))*x_ref[0] + ((-0.90849574002+0.96627763565j))*x_ref[1]**o + ((0.522677615902-0.254570541654j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.114113521749-0.627141820445j)*x[0]**o + ((-0.912893231227+0.107368811733j))*x[0] + ((-0.151581042108-0.352256631151j))*x[1]**o + ((-0.0281375314334+0.441392748151j))*x[1]
+        ref[(0, 2, 0)]=(-0.114113521749-0.627141820445j)*x_ref[0]**o + ((-0.912893231227+0.107368811733j))*x_ref[0] + ((-0.151581042108-0.352256631151j))*x_ref[1]**o + ((-0.0281375314334+0.441392748151j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.2893154002-0.213712808085j)*x[0]**o + ((-0.56553049842+0.243306599538j))*x[0] + ((-0.271056371847-0.792808303568j))*x[1]**o + ((0.297138969446-0.220242348565j))*x[1]
+        ref[(0, 2, 1)]=(-0.2893154002-0.213712808085j)*x_ref[0]**o + ((-0.56553049842+0.243306599538j))*x_ref[0] + ((-0.271056371847-0.792808303568j))*x_ref[1]**o + ((0.297138969446-0.220242348565j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.414075415157+0.698775179936j)*x[0]**o + ((0.845288425345+0.213368395631j))*x[0] + ((-0.476413427586-0.887148692724j))*x[1]**o + ((0.0953002029411+0.628947561154j))*x[1]
+        ref[(0, 2, 2)]=(-0.414075415157+0.698775179936j)*x_ref[0]**o + ((0.845288425345+0.213368395631j))*x_ref[0] + ((-0.476413427586-0.887148692724j))*x_ref[1]**o + ((0.0953002029411+0.628947561154j))*x_ref[1]
+        arg[(0, 2, 3)]=(0.680646261635+0.578468254313j)*x[0]**o + ((0.222532030391-0.802966812388j))*x[0] + ((0.369969758217-0.993546003174j))*x[1]**o + ((-0.488158880908+0.818080233872j))*x[1]
+        ref[(0, 2, 3)]=(0.680646261635+0.578468254313j)*x_ref[0]**o + ((0.222532030391-0.802966812388j))*x_ref[0] + ((0.369969758217-0.993546003174j))*x_ref[1]**o + ((-0.488158880908+0.818080233872j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.815503362905-0.407215501126j)*x[0]**o + ((-0.318552579876-0.886011757171j))*x[0] + ((0.0610884123537-0.253668160199j))*x[1]**o + ((-0.657956789893+0.237924659503j))*x[1]
+        ref[(1, 0, 0)]=(0.815503362905-0.407215501126j)*x_ref[0]**o + ((-0.318552579876-0.886011757171j))*x_ref[0] + ((0.0610884123537-0.253668160199j))*x_ref[1]**o + ((-0.657956789893+0.237924659503j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.479455103177-0.132108552446j)*x[0]**o + ((-0.175690886036+0.446772592299j))*x[0] + ((0.739001982349-0.385441762672j))*x[1]**o + ((0.191664598737-0.0605664869337j))*x[1]
+        ref[(1, 0, 1)]=(-0.479455103177-0.132108552446j)*x_ref[0]**o + ((-0.175690886036+0.446772592299j))*x_ref[0] + ((0.739001982349-0.385441762672j))*x_ref[1]**o + ((0.191664598737-0.0605664869337j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.666239397084+0.609351492481j)*x[0]**o + ((-0.277769563556-0.411916682218j))*x[0] + ((-0.83787366169+0.391754469731j))*x[1]**o + ((-0.0275107858918+0.380919541126j))*x[1]
+        ref[(1, 0, 2)]=(0.666239397084+0.609351492481j)*x_ref[0]**o + ((-0.277769563556-0.411916682218j))*x_ref[0] + ((-0.83787366169+0.391754469731j))*x_ref[1]**o + ((-0.0275107858918+0.380919541126j))*x_ref[1]
+        arg[(1, 0, 3)]=(-0.0295178308593+0.932930154727j)*x[0]**o + ((-0.714021267975-0.82010909876j))*x[0] + ((0.379831267571-0.626564013657j))*x[1]**o + ((-0.224135852179-0.00334117952455j))*x[1]
+        ref[(1, 0, 3)]=(-0.0295178308593+0.932930154727j)*x_ref[0]**o + ((-0.714021267975-0.82010909876j))*x_ref[0] + ((0.379831267571-0.626564013657j))*x_ref[1]**o + ((-0.224135852179-0.00334117952455j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.576904141004+0.497245986909j)*x[0]**o + ((0.0456304748297-0.138731266431j))*x[0] + ((0.722391052801+0.2568605047j))*x[1]**o + ((0.64294446135-0.464082879797j))*x[1]
+        ref[(1, 1, 0)]=(-0.576904141004+0.497245986909j)*x_ref[0]**o + ((0.0456304748297-0.138731266431j))*x_ref[0] + ((0.722391052801+0.2568605047j))*x_ref[1]**o + ((0.64294446135-0.464082879797j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.0717768833866-0.642373217782j)*x[0]**o + ((-0.529618744283+0.0230675695259j))*x[0] + ((-0.802401176826-0.214766564777j))*x[1]**o + ((0.82363133706+0.56073088938j))*x[1]
+        ref[(1, 1, 1)]=(0.0717768833866-0.642373217782j)*x_ref[0]**o + ((-0.529618744283+0.0230675695259j))*x_ref[0] + ((-0.802401176826-0.214766564777j))*x_ref[1]**o + ((0.82363133706+0.56073088938j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.494006891437+0.516308483794j)*x[0]**o + ((0.366220392896+0.380880968547j))*x[0] + ((0.410137799272-0.408342935703j))*x[1]**o + ((0.211726481918+0.742575470046j))*x[1]
+        ref[(1, 1, 2)]=(-0.494006891437+0.516308483794j)*x_ref[0]**o + ((0.366220392896+0.380880968547j))*x_ref[0] + ((0.410137799272-0.408342935703j))*x_ref[1]**o + ((0.211726481918+0.742575470046j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.744172206395+0.414838209472j)*x[0]**o + ((-0.8887493087-0.893116913166j))*x[0] + ((0.557500440671-0.484171055477j))*x[1]**o + ((0.795044345237-0.229269762114j))*x[1]
+        ref[(1, 1, 3)]=(-0.744172206395+0.414838209472j)*x_ref[0]**o + ((-0.8887493087-0.893116913166j))*x_ref[0] + ((0.557500440671-0.484171055477j))*x_ref[1]**o + ((0.795044345237-0.229269762114j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.102739797827+0.46217692717j)*x[0]**o + ((-0.860145812945-0.472489324676j))*x[0] + ((-0.205839747265-0.0422646315404j))*x[1]**o + ((0.102821671326-0.0770738290895j))*x[1]
+        ref[(1, 2, 0)]=(-0.102739797827+0.46217692717j)*x_ref[0]**o + ((-0.860145812945-0.472489324676j))*x_ref[0] + ((-0.205839747265-0.0422646315404j))*x_ref[1]**o + ((0.102821671326-0.0770738290895j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.568262952399+0.228646811333j)*x[0]**o + ((0.849195128101+0.120495316685j))*x[0] + ((0.153043170175-0.45617207061j))*x[1]**o + ((-0.784751133956-0.249415492717j))*x[1]
+        ref[(1, 2, 1)]=(-0.568262952399+0.228646811333j)*x_ref[0]**o + ((0.849195128101+0.120495316685j))*x_ref[0] + ((0.153043170175-0.45617207061j))*x_ref[1]**o + ((-0.784751133956-0.249415492717j))*x_ref[1]
+        arg[(1, 2, 2)]=(-0.956173366484-0.940269390181j)*x[0]**o + ((-0.451558656076-0.474484457081j))*x[0] + ((0.727869099735+0.0332366832847j))*x[1]**o + ((-0.240645312638-0.428661080351j))*x[1]
+        ref[(1, 2, 2)]=(-0.956173366484-0.940269390181j)*x_ref[0]**o + ((-0.451558656076-0.474484457081j))*x_ref[0] + ((0.727869099735+0.0332366832847j))*x_ref[1]**o + ((-0.240645312638-0.428661080351j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.730004322838+0.123683107736j)*x[0]**o + ((0.393901311117+0.622398215297j))*x[0] + ((-0.585074258105+0.817198236856j))*x[1]**o + ((-0.496386017877-0.13726534368j))*x[1]
+        ref[(1, 2, 3)]=(-0.730004322838+0.123683107736j)*x_ref[0]**o + ((0.393901311117+0.622398215297j))*x_ref[0] + ((-0.585074258105+0.817198236856j))*x_ref[1]**o + ((-0.496386017877-0.13726534368j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.853913139843-0.826570115787j)*x[0]**o + ((-0.373353582165-0.998978800401j))*x[0] + ((0.227549884188-0.834676334843j))*x[1]**o + ((0.627135365192+0.164786667051j))*x[1]
+        ref[(2, 0, 0)]=(0.853913139843-0.826570115787j)*x_ref[0]**o + ((-0.373353582165-0.998978800401j))*x_ref[0] + ((0.227549884188-0.834676334843j))*x_ref[1]**o + ((0.627135365192+0.164786667051j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.837499258151+0.268212965116j)*x[0]**o + ((0.568488141871+0.12288922737j))*x[0] + ((-0.467336532173-0.446063443543j))*x[1]**o + ((0.482905504269+0.103111814342j))*x[1]
+        ref[(2, 0, 1)]=(0.837499258151+0.268212965116j)*x_ref[0]**o + ((0.568488141871+0.12288922737j))*x_ref[0] + ((-0.467336532173-0.446063443543j))*x_ref[1]**o + ((0.482905504269+0.103111814342j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.966630898134+0.0585255229507j)*x[0]**o + ((-0.60253528927+0.395710370213j))*x[0] + ((-0.106422893153+0.649370700694j))*x[1]**o + ((0.00716266071935+0.483603199652j))*x[1]
+        ref[(2, 0, 2)]=(-0.966630898134+0.0585255229507j)*x_ref[0]**o + ((-0.60253528927+0.395710370213j))*x_ref[0] + ((-0.106422893153+0.649370700694j))*x_ref[1]**o + ((0.00716266071935+0.483603199652j))*x_ref[1]
+        arg[(2, 0, 3)]=(0.26813568303-0.483896162522j)*x[0]**o + ((-0.489364816139+0.96482127475j))*x[0] + ((-0.900350341-0.505269389064j))*x[1]**o + ((-0.129138910773+0.949404440308j))*x[1]
+        ref[(2, 0, 3)]=(0.26813568303-0.483896162522j)*x_ref[0]**o + ((-0.489364816139+0.96482127475j))*x_ref[0] + ((-0.900350341-0.505269389064j))*x_ref[1]**o + ((-0.129138910773+0.949404440308j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.761912986708+0.788787682265j)*x[0]**o + ((0.197466170494+0.963367256044j))*x[0] + ((-0.821900712001+0.00992732124259j))*x[1]**o + ((-0.313336347646-0.512962073819j))*x[1]
+        ref[(2, 1, 0)]=(0.761912986708+0.788787682265j)*x_ref[0]**o + ((0.197466170494+0.963367256044j))*x_ref[0] + ((-0.821900712001+0.00992732124259j))*x_ref[1]**o + ((-0.313336347646-0.512962073819j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.80720755529+0.254765833502j)*x[0]**o + ((0.524668770682-0.352927027008j))*x[0] + ((0.801988419318+0.122594368537j))*x[1]**o + ((0.107942894557-0.61470559289j))*x[1]
+        ref[(2, 1, 1)]=(-0.80720755529+0.254765833502j)*x_ref[0]**o + ((0.524668770682-0.352927027008j))*x_ref[0] + ((0.801988419318+0.122594368537j))*x_ref[1]**o + ((0.107942894557-0.61470559289j))*x_ref[1]
+        arg[(2, 1, 2)]=(-0.605728893625+0.137686181924j)*x[0]**o + ((-0.564090210657-0.98722047374j))*x[0] + ((-0.366486861498+0.0264555401797j))*x[1]**o + ((-0.36668188006+0.478264410028j))*x[1]
+        ref[(2, 1, 2)]=(-0.605728893625+0.137686181924j)*x_ref[0]**o + ((-0.564090210657-0.98722047374j))*x_ref[0] + ((-0.366486861498+0.0264555401797j))*x_ref[1]**o + ((-0.36668188006+0.478264410028j))*x_ref[1]
+        arg[(2, 1, 3)]=(-0.441185219042+0.308783129688j)*x[0]**o + ((-0.242353513119+0.904754419081j))*x[0] + ((-0.547456461329-0.330746334794j))*x[1]**o + ((0.261824803147+0.554262910642j))*x[1]
+        ref[(2, 1, 3)]=(-0.441185219042+0.308783129688j)*x_ref[0]**o + ((-0.242353513119+0.904754419081j))*x_ref[0] + ((-0.547456461329-0.330746334794j))*x_ref[1]**o + ((0.261824803147+0.554262910642j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.171399878808+0.224703682323j)*x[0]**o + ((0.200461316211+0.514081470236j))*x[0] + ((0.985374487992+0.123681991755j))*x[1]**o + ((-0.516494255777-0.343085064557j))*x[1]
+        ref[(2, 2, 0)]=(-0.171399878808+0.224703682323j)*x_ref[0]**o + ((0.200461316211+0.514081470236j))*x_ref[0] + ((0.985374487992+0.123681991755j))*x_ref[1]**o + ((-0.516494255777-0.343085064557j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.303320471752+0.232262803063j)*x[0]**o + ((-0.55826879184+0.317626328382j))*x[0] + ((-0.0429805387236+0.443176198709j))*x[1]**o + ((-0.134932452937+0.116232617323j))*x[1]
+        ref[(2, 2, 1)]=(0.303320471752+0.232262803063j)*x_ref[0]**o + ((-0.55826879184+0.317626328382j))*x_ref[0] + ((-0.0429805387236+0.443176198709j))*x_ref[1]**o + ((-0.134932452937+0.116232617323j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.846600409576+0.181620902149j)*x[0]**o + ((-0.0442428330798+0.0302248722982j))*x[0] + ((0.236567603964-0.427038379098j))*x[1]**o + ((-0.371785397354+0.250893322915j))*x[1]
+        ref[(2, 2, 2)]=(0.846600409576+0.181620902149j)*x_ref[0]**o + ((-0.0442428330798+0.0302248722982j))*x_ref[0] + ((0.236567603964-0.427038379098j))*x_ref[1]**o + ((-0.371785397354+0.250893322915j))*x_ref[1]
+        arg[(2, 2, 3)]=(0.968854897449-0.826669903924j)*x[0]**o + ((0.323328756181-0.561890056303j))*x[0] + ((0.842657047911-0.877015213428j))*x[1]**o + ((0.0190299048544-0.353603466749j))*x[1]
+        ref[(2, 2, 3)]=(0.968854897449-0.826669903924j)*x_ref[0]**o + ((0.323328756181-0.561890056303j))*x_ref[0] + ((0.842657047911-0.877015213428j))*x_ref[1]**o + ((0.0190299048544-0.353603466749j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.888071693862-0.935654156662j)*x[0]**o + ((-0.42122794591-0.650407034956j))*x[0] + ((-0.845190739883+0.0837055793839j))*x[1]**o + ((0.370564114802-0.528157275907j))*x[1]
+        ref[(3, 0, 0)]=(0.888071693862-0.935654156662j)*x_ref[0]**o + ((-0.42122794591-0.650407034956j))*x_ref[0] + ((-0.845190739883+0.0837055793839j))*x_ref[1]**o + ((0.370564114802-0.528157275907j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.427767321647+0.803093364888j)*x[0]**o + ((0.508617152808-0.919194801779j))*x[0] + ((-0.276929166324-0.0224997214171j))*x[1]**o + ((0.684975477094+0.705392457659j))*x[1]
+        ref[(3, 0, 1)]=(-0.427767321647+0.803093364888j)*x_ref[0]**o + ((0.508617152808-0.919194801779j))*x_ref[0] + ((-0.276929166324-0.0224997214171j))*x_ref[1]**o + ((0.684975477094+0.705392457659j))*x_ref[1]
+        arg[(3, 0, 2)]=(-0.0296455601547+0.164516571054j)*x[0]**o + ((0.941865213333+0.45216953173j))*x[0] + ((0.412309482532+0.488106785467j))*x[1]**o + ((0.959490971775+0.535815221075j))*x[1]
+        ref[(3, 0, 2)]=(-0.0296455601547+0.164516571054j)*x_ref[0]**o + ((0.941865213333+0.45216953173j))*x_ref[0] + ((0.412309482532+0.488106785467j))*x_ref[1]**o + ((0.959490971775+0.535815221075j))*x_ref[1]
+        arg[(3, 0, 3)]=(-0.215401296432-0.0847298142128j)*x[0]**o + ((-0.147272621965-0.935034714248j))*x[0] + ((-0.730294200991-0.611496425185j))*x[1]**o + ((-0.324762812435+0.190139792114j))*x[1]
+        ref[(3, 0, 3)]=(-0.215401296432-0.0847298142128j)*x_ref[0]**o + ((-0.147272621965-0.935034714248j))*x_ref[0] + ((-0.730294200991-0.611496425185j))*x_ref[1]**o + ((-0.324762812435+0.190139792114j))*x_ref[1]
+        arg[(3, 1, 0)]=(0.702359222466+0.0701532187961j)*x[0]**o + ((0.843530842942+0.536645731843j))*x[0] + ((0.535616106344-0.446729545387j))*x[1]**o + ((0.662690906934+0.99748546846j))*x[1]
+        ref[(3, 1, 0)]=(0.702359222466+0.0701532187961j)*x_ref[0]**o + ((0.843530842942+0.536645731843j))*x_ref[0] + ((0.535616106344-0.446729545387j))*x_ref[1]**o + ((0.662690906934+0.99748546846j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.839033926301+0.690536448001j)*x[0]**o + ((-0.217288027787+0.715173481557j))*x[0] + ((-0.240973892479+0.247991266323j))*x[1]**o + ((0.707993294353+0.0789635239818j))*x[1]
+        ref[(3, 1, 1)]=(0.839033926301+0.690536448001j)*x_ref[0]**o + ((-0.217288027787+0.715173481557j))*x_ref[0] + ((-0.240973892479+0.247991266323j))*x_ref[1]**o + ((0.707993294353+0.0789635239818j))*x_ref[1]
+        arg[(3, 1, 2)]=(0.976072393025-0.278211043184j)*x[0]**o + ((0.428506326178-0.250456795629j))*x[0] + ((0.99548954181+0.503235176039j))*x[1]**o + ((0.818935976751-0.705215819768j))*x[1]
+        ref[(3, 1, 2)]=(0.976072393025-0.278211043184j)*x_ref[0]**o + ((0.428506326178-0.250456795629j))*x_ref[0] + ((0.99548954181+0.503235176039j))*x_ref[1]**o + ((0.818935976751-0.705215819768j))*x_ref[1]
+        arg[(3, 1, 3)]=(-0.941088457523+0.659489407926j)*x[0]**o + ((-0.349351545219+0.0899797403802j))*x[0] + ((0.392849985989-0.0833042858892j))*x[1]**o + ((-0.154894858037+0.705655105867j))*x[1]
+        ref[(3, 1, 3)]=(-0.941088457523+0.659489407926j)*x_ref[0]**o + ((-0.349351545219+0.0899797403802j))*x_ref[0] + ((0.392849985989-0.0833042858892j))*x_ref[1]**o + ((-0.154894858037+0.705655105867j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.276670996914+0.107983016386j)*x[0]**o + ((-0.895428465168-0.0647599157859j))*x[0] + ((0.165679970766-0.782730049629j))*x[1]**o + ((-0.27502736185+0.482072959426j))*x[1]
+        ref[(3, 2, 0)]=(0.276670996914+0.107983016386j)*x_ref[0]**o + ((-0.895428465168-0.0647599157859j))*x_ref[0] + ((0.165679970766-0.782730049629j))*x_ref[1]**o + ((-0.27502736185+0.482072959426j))*x_ref[1]
+        arg[(3, 2, 1)]=(0.32144471253-0.66629796217j)*x[0]**o + ((-0.325507634247-0.960940723583j))*x[0] + ((-0.839150488592-0.398402220116j))*x[1]**o + ((-0.568634956988+0.834327863895j))*x[1]
+        ref[(3, 2, 1)]=(0.32144471253-0.66629796217j)*x_ref[0]**o + ((-0.325507634247-0.960940723583j))*x_ref[0] + ((-0.839150488592-0.398402220116j))*x_ref[1]**o + ((-0.568634956988+0.834327863895j))*x_ref[1]
+        arg[(3, 2, 2)]=(-0.552476602842-0.642888388915j)*x[0]**o + ((-0.77717079441+0.223575330664j))*x[0] + ((-0.678223651264+0.375391298851j))*x[1]**o + ((0.535019512617-0.288171799757j))*x[1]
+        ref[(3, 2, 2)]=(-0.552476602842-0.642888388915j)*x_ref[0]**o + ((-0.77717079441+0.223575330664j))*x_ref[0] + ((-0.678223651264+0.375391298851j))*x_ref[1]**o + ((0.535019512617-0.288171799757j))*x_ref[1]
+        arg[(3, 2, 3)]=(0.132639112884-0.367758549671j)*x[0]**o + ((-0.531960013434+0.325181380449j))*x[0] + ((-0.307559657173+0.850472740709j))*x[1]**o + ((0.630213950867+0.400175264379j))*x[1]
+        ref[(3, 2, 3)]=(0.132639112884-0.367758549671j)*x_ref[0]**o + ((-0.531960013434+0.325181380449j))*x_ref[0] + ((-0.307559657173+0.850472740709j))*x_ref[1]**o + ((0.630213950867+0.400175264379j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.773983448671-0.883723831924j)*x[2]**o + ((0.275771022866+0.587153034525j))*x[2]
+            ref[(0, 0, 0)]+=(0.773983448671-0.883723831924j)*x_ref[2]**o + ((0.275771022866+0.587153034525j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.618193429622+0.322374212678j)*x[2]**o + ((-0.0254353857854+0.0975454893281j))*x[2]
+            ref[(0, 0, 1)]+=(0.618193429622+0.322374212678j)*x_ref[2]**o + ((-0.0254353857854+0.0975454893281j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.993129005939-0.636183882495j)*x[2]**o + ((-0.925872320951+0.58225504899j))*x[2]
+            ref[(0, 0, 2)]+=(-0.993129005939-0.636183882495j)*x_ref[2]**o + ((-0.925872320951+0.58225504899j))*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.0281713282193-0.428779060594j)*x[2]**o + ((-0.498498120661-0.559462665266j))*x[2]
+            ref[(0, 0, 3)]+=(-0.0281713282193-0.428779060594j)*x_ref[2]**o + ((-0.498498120661-0.559462665266j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.821259391162-0.756010244044j)*x[2]**o + ((-0.863127798935+0.0294991751895j))*x[2]
+            ref[(0, 1, 0)]+=(0.821259391162-0.756010244044j)*x_ref[2]**o + ((-0.863127798935+0.0294991751895j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.762908345076+0.611013877173j)*x[2]**o + ((-0.369576918801-0.00622467138883j))*x[2]
+            ref[(0, 1, 1)]+=(0.762908345076+0.611013877173j)*x_ref[2]**o + ((-0.369576918801-0.00622467138883j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.810208020719-0.863879583355j)*x[2]**o + ((-0.837535746869-0.601725176043j))*x[2]
+            ref[(0, 1, 2)]+=(0.810208020719-0.863879583355j)*x_ref[2]**o + ((-0.837535746869-0.601725176043j))*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.713039318925-0.113520615398j)*x[2]**o + ((-0.509178833766-0.345552406633j))*x[2]
+            ref[(0, 1, 3)]+=(-0.713039318925-0.113520615398j)*x_ref[2]**o + ((-0.509178833766-0.345552406633j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.975058790792+0.31932809718j)*x[2]**o + ((0.173359176035+0.839208872201j))*x[2]
+            ref[(0, 2, 0)]+=(-0.975058790792+0.31932809718j)*x_ref[2]**o + ((0.173359176035+0.839208872201j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.385905742269-0.196316785362j)*x[2]**o + ((-0.413672596336-0.362332937759j))*x[2]
+            ref[(0, 2, 1)]+=(-0.385905742269-0.196316785362j)*x_ref[2]**o + ((-0.413672596336-0.362332937759j))*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.222269632139+0.230510234517j)*x[2]**o + ((0.981789991558+0.541114808534j))*x[2]
+            ref[(0, 2, 2)]+=(-0.222269632139+0.230510234517j)*x_ref[2]**o + ((0.981789991558+0.541114808534j))*x_ref[2]
+            arg[(0, 2, 3)]+=(0.788158642075+0.0789563649002j)*x[2]**o + ((0.112739443349+0.444178729002j))*x[2]
+            ref[(0, 2, 3)]+=(0.788158642075+0.0789563649002j)*x_ref[2]**o + ((0.112739443349+0.444178729002j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.0492292230732-0.40228728359j)*x[2]**o + ((-0.514484263716-0.589613256872j))*x[2]
+            ref[(1, 0, 0)]+=(-0.0492292230732-0.40228728359j)*x_ref[2]**o + ((-0.514484263716-0.589613256872j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.587820603239-0.0350407886629j)*x[2]**o + ((0.880926039218+0.973284320364j))*x[2]
+            ref[(1, 0, 1)]+=(0.587820603239-0.0350407886629j)*x_ref[2]**o + ((0.880926039218+0.973284320364j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.802134600154-0.0343670982955j)*x[2]**o + ((-0.364263689539+0.369753003677j))*x[2]
+            ref[(1, 0, 2)]+=(0.802134600154-0.0343670982955j)*x_ref[2]**o + ((-0.364263689539+0.369753003677j))*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.287586056143-0.96882832573j)*x[2]**o + ((0.939411227939-0.905948195992j))*x[2]
+            ref[(1, 0, 3)]+=(-0.287586056143-0.96882832573j)*x_ref[2]**o + ((0.939411227939-0.905948195992j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.854357206026+0.00972299880944j)*x[2]**o + ((-0.961363478116+0.377852267062j))*x[2]
+            ref[(1, 1, 0)]+=(0.854357206026+0.00972299880944j)*x_ref[2]**o + ((-0.961363478116+0.377852267062j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.337510733135+0.0893241318366j)*x[2]**o + ((0.943743471615+0.290590111462j))*x[2]
+            ref[(1, 1, 1)]+=(-0.337510733135+0.0893241318366j)*x_ref[2]**o + ((0.943743471615+0.290590111462j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.784740107849+0.753788985695j)*x[2]**o + ((-0.10478703332-0.842184725413j))*x[2]
+            ref[(1, 1, 2)]+=(0.784740107849+0.753788985695j)*x_ref[2]**o + ((-0.10478703332-0.842184725413j))*x_ref[2]
+            arg[(1, 1, 3)]+=(0.766668132533+0.0222705162164j)*x[2]**o + ((0.613122705908+0.954359341449j))*x[2]
+            ref[(1, 1, 3)]+=(0.766668132533+0.0222705162164j)*x_ref[2]**o + ((0.613122705908+0.954359341449j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.846566928175-0.38177758803j)*x[2]**o + ((-0.745641648461+0.472958805915j))*x[2]
+            ref[(1, 2, 0)]+=(0.846566928175-0.38177758803j)*x_ref[2]**o + ((-0.745641648461+0.472958805915j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.754709896867+0.660762939679j)*x[2]**o + ((0.762834946308-0.894452061431j))*x[2]
+            ref[(1, 2, 1)]+=(0.754709896867+0.660762939679j)*x_ref[2]**o + ((0.762834946308-0.894452061431j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.246302287018-0.975502479175j)*x[2]**o + ((-0.143967386257-0.185852666777j))*x[2]
+            ref[(1, 2, 2)]+=(0.246302287018-0.975502479175j)*x_ref[2]**o + ((-0.143967386257-0.185852666777j))*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.881189014418+0.630552775253j)*x[2]**o + ((-0.75323195592+0.86353329102j))*x[2]
+            ref[(1, 2, 3)]+=(-0.881189014418+0.630552775253j)*x_ref[2]**o + ((-0.75323195592+0.86353329102j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.277166661762-0.236011752436j)*x[2]**o + ((0.297759958747-0.497339520195j))*x[2]
+            ref[(2, 0, 0)]+=(0.277166661762-0.236011752436j)*x_ref[2]**o + ((0.297759958747-0.497339520195j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.217529303748-0.914483705212j)*x[2]**o + ((-0.191091058203-0.347106402584j))*x[2]
+            ref[(2, 0, 1)]+=(0.217529303748-0.914483705212j)*x_ref[2]**o + ((-0.191091058203-0.347106402584j))*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.219814063641+0.403983387754j)*x[2]**o + ((0.655190352765+0.863015812437j))*x[2]
+            ref[(2, 0, 2)]+=(-0.219814063641+0.403983387754j)*x_ref[2]**o + ((0.655190352765+0.863015812437j))*x_ref[2]
+            arg[(2, 0, 3)]+=(-0.877481622515+0.970866944946j)*x[2]**o + ((-0.547253812772+0.112362095894j))*x[2]
+            ref[(2, 0, 3)]+=(-0.877481622515+0.970866944946j)*x_ref[2]**o + ((-0.547253812772+0.112362095894j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.733593700729-0.546742805431j)*x[2]**o + ((0.39285443719+0.570521442896j))*x[2]
+            ref[(2, 1, 0)]+=(-0.733593700729-0.546742805431j)*x_ref[2]**o + ((0.39285443719+0.570521442896j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.528860812856+0.0703307790549j)*x[2]**o + ((0.0920560343502-0.295616927153j))*x[2]
+            ref[(2, 1, 1)]+=(0.528860812856+0.0703307790549j)*x_ref[2]**o + ((0.0920560343502-0.295616927153j))*x_ref[2]
+            arg[(2, 1, 2)]+=(0.411671031004-0.9132542844j)*x[2]**o + ((0.742420766145+0.113410376945j))*x[2]
+            ref[(2, 1, 2)]+=(0.411671031004-0.9132542844j)*x_ref[2]**o + ((0.742420766145+0.113410376945j))*x_ref[2]
+            arg[(2, 1, 3)]+=(-0.644352393979-0.761110600007j)*x[2]**o + ((-0.59247403295-0.625184374865j))*x[2]
+            ref[(2, 1, 3)]+=(-0.644352393979-0.761110600007j)*x_ref[2]**o + ((-0.59247403295-0.625184374865j))*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.659458523848-0.726622337071j)*x[2]**o + ((0.0452578482987-0.247484190374j))*x[2]
+            ref[(2, 2, 0)]+=(-0.659458523848-0.726622337071j)*x_ref[2]**o + ((0.0452578482987-0.247484190374j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.979420225426+0.0883270654905j)*x[2]**o + ((-0.261980877523-0.0842475488393j))*x[2]
+            ref[(2, 2, 1)]+=(0.979420225426+0.0883270654905j)*x_ref[2]**o + ((-0.261980877523-0.0842475488393j))*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.698654025726-0.00141137551184j)*x[2]**o + ((0.260883003105-0.199260627391j))*x[2]
+            ref[(2, 2, 2)]+=(-0.698654025726-0.00141137551184j)*x_ref[2]**o + ((0.260883003105-0.199260627391j))*x_ref[2]
+            arg[(2, 2, 3)]+=(-0.408361036491-0.00680521377362j)*x[2]**o + ((0.931847741682-0.584396155039j))*x[2]
+            ref[(2, 2, 3)]+=(-0.408361036491-0.00680521377362j)*x_ref[2]**o + ((0.931847741682-0.584396155039j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.417250513284+0.0915293293225j)*x[2]**o + ((0.32325753074+0.941594366711j))*x[2]
+            ref[(3, 0, 0)]+=(0.417250513284+0.0915293293225j)*x_ref[2]**o + ((0.32325753074+0.941594366711j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.983573621748-0.11755595747j)*x[2]**o + ((0.392624960594+0.364523749558j))*x[2]
+            ref[(3, 0, 1)]+=(0.983573621748-0.11755595747j)*x_ref[2]**o + ((0.392624960594+0.364523749558j))*x_ref[2]
+            arg[(3, 0, 2)]+=(0.874577557037+0.742211639405j)*x[2]**o + ((0.900534761398+0.432369096979j))*x[2]
+            ref[(3, 0, 2)]+=(0.874577557037+0.742211639405j)*x_ref[2]**o + ((0.900534761398+0.432369096979j))*x_ref[2]
+            arg[(3, 0, 3)]+=(0.386318381264-0.711034765769j)*x[2]**o + ((-0.237804939809-0.889745855748j))*x[2]
+            ref[(3, 0, 3)]+=(0.386318381264-0.711034765769j)*x_ref[2]**o + ((-0.237804939809-0.889745855748j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.93969894953-0.415838599923j)*x[2]**o + ((-0.701934229394+0.940384600311j))*x[2]
+            ref[(3, 1, 0)]+=(-0.93969894953-0.415838599923j)*x_ref[2]**o + ((-0.701934229394+0.940384600311j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.278184362638+0.740888177223j)*x[2]**o + ((-0.180348528455-0.612499271303j))*x[2]
+            ref[(3, 1, 1)]+=(0.278184362638+0.740888177223j)*x_ref[2]**o + ((-0.180348528455-0.612499271303j))*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.362215622053-0.146590381652j)*x[2]**o + ((0.259747372036+0.51269389658j))*x[2]
+            ref[(3, 1, 2)]+=(-0.362215622053-0.146590381652j)*x_ref[2]**o + ((0.259747372036+0.51269389658j))*x_ref[2]
+            arg[(3, 1, 3)]+=(-0.00519288608366+0.0167759111858j)*x[2]**o + ((-0.244261592808+0.883904387347j))*x[2]
+            ref[(3, 1, 3)]+=(-0.00519288608366+0.0167759111858j)*x_ref[2]**o + ((-0.244261592808+0.883904387347j))*x_ref[2]
+            arg[(3, 2, 0)]+=(-0.452159278964-0.900491701785j)*x[2]**o + ((-0.215485571254+0.0477537686223j))*x[2]
+            ref[(3, 2, 0)]+=(-0.452159278964-0.900491701785j)*x_ref[2]**o + ((-0.215485571254+0.0477537686223j))*x_ref[2]
+            arg[(3, 2, 1)]+=(0.788880592647+0.734982350113j)*x[2]**o + ((0.137117701999+0.922696915687j))*x[2]
+            ref[(3, 2, 1)]+=(0.788880592647+0.734982350113j)*x_ref[2]**o + ((0.137117701999+0.922696915687j))*x_ref[2]
+            arg[(3, 2, 2)]+=(-0.836268085445-0.375894355965j)*x[2]**o + ((-0.611777439182+0.311378477709j))*x[2]
+            ref[(3, 2, 2)]+=(-0.836268085445-0.375894355965j)*x_ref[2]**o + ((-0.611777439182+0.311378477709j))*x_ref[2]
+            arg[(3, 2, 3)]+=(0.46037655089-0.44998579452j)*x[2]**o + ((0.660271363774-0.306066344182j))*x[2]
+            ref[(3, 2, 3)]+=(0.46037655089-0.44998579452j)*x_ref[2]**o + ((0.660271363774-0.306066344182j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3, 2),w)
+        ref = Data(0,(2, 4, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.433587586429-0.0617578297746j)*x[0]**o + ((-0.139736398322-0.550934391781j))*x[0] + ((-0.334640801849+0.377615827507j))*x[1]**o + ((0.661769800665+0.586854741167j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.433587586429-0.0617578297746j)*x_ref[0]**o + ((-0.139736398322-0.550934391781j))*x_ref[0] + ((-0.334640801849+0.377615827507j))*x_ref[1]**o + ((0.661769800665+0.586854741167j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.709619774534-0.620352575816j)*x[0]**o + ((-0.842600444951+0.574153718884j))*x[0] + ((-0.48171536393+0.434519306739j))*x[1]**o + ((-0.503375899665+0.567433242927j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.709619774534-0.620352575816j)*x_ref[0]**o + ((-0.842600444951+0.574153718884j))*x_ref[0] + ((-0.48171536393+0.434519306739j))*x_ref[1]**o + ((-0.503375899665+0.567433242927j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.379640873977+0.145301500785j)*x[0]**o + ((0.349215092901+0.398272095008j))*x[0] + ((-0.620468284089-0.599806686466j))*x[1]**o + ((0.433214812403+0.139233291011j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.379640873977+0.145301500785j)*x_ref[0]**o + ((0.349215092901+0.398272095008j))*x_ref[0] + ((-0.620468284089-0.599806686466j))*x_ref[1]**o + ((0.433214812403+0.139233291011j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.0804161349762-0.311430139943j)*x[0]**o + ((0.50349136001+0.418578792546j))*x[0] + ((-0.311775336547-0.129871317288j))*x[1]**o + ((0.0427477887677-0.568269908455j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.0804161349762-0.311430139943j)*x_ref[0]**o + ((0.50349136001+0.418578792546j))*x_ref[0] + ((-0.311775336547-0.129871317288j))*x_ref[1]**o + ((0.0427477887677-0.568269908455j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.78958354902+0.0571339415021j)*x[0]**o + ((0.736555454859+0.763379211766j))*x[0] + ((0.332481921323+0.437427036828j))*x[1]**o + ((-0.82386912652+0.817684610503j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.78958354902+0.0571339415021j)*x_ref[0]**o + ((0.736555454859+0.763379211766j))*x_ref[0] + ((0.332481921323+0.437427036828j))*x_ref[1]**o + ((-0.82386912652+0.817684610503j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.887451129215-0.92103598534j)*x[0]**o + ((0.268765374005-0.772116346646j))*x[0] + ((0.828186569776+0.0677014249038j))*x[1]**o + ((0.580065109775-0.56516843593j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.887451129215-0.92103598534j)*x_ref[0]**o + ((0.268765374005-0.772116346646j))*x_ref[0] + ((0.828186569776+0.0677014249038j))*x_ref[1]**o + ((0.580065109775-0.56516843593j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.994262077997+0.0573301199942j)*x[0]**o + ((0.318844450892+0.882354487138j))*x[0] + ((0.772012625284+0.203919261189j))*x[1]**o + ((0.453698635568+0.416047358508j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.994262077997+0.0573301199942j)*x_ref[0]**o + ((0.318844450892+0.882354487138j))*x_ref[0] + ((0.772012625284+0.203919261189j))*x_ref[1]**o + ((0.453698635568+0.416047358508j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.996318701445-0.319207945497j)*x[0]**o + ((0.937916821312-0.499253847379j))*x[0] + ((-0.879010978024-0.36548555273j))*x[1]**o + ((0.818554078963+0.528453131109j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.996318701445-0.319207945497j)*x_ref[0]**o + ((0.937916821312-0.499253847379j))*x_ref[0] + ((-0.879010978024-0.36548555273j))*x_ref[1]**o + ((0.818554078963+0.528453131109j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.0761128624888-0.924539006538j)*x[0]**o + ((-0.220179940931-0.986438125349j))*x[0] + ((-0.139127952844-0.221250958734j))*x[1]**o + ((0.156029546987-0.383308724895j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.0761128624888-0.924539006538j)*x_ref[0]**o + ((-0.220179940931-0.986438125349j))*x_ref[0] + ((-0.139127952844-0.221250958734j))*x_ref[1]**o + ((0.156029546987-0.383308724895j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.763263122858+0.647524977396j)*x[0]**o + ((0.704666922222+0.459911886619j))*x[0] + ((0.460817916915-0.807279160432j))*x[1]**o + ((0.155399674455-0.0676265505077j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.763263122858+0.647524977396j)*x_ref[0]**o + ((0.704666922222+0.459911886619j))*x_ref[0] + ((0.460817916915-0.807279160432j))*x_ref[1]**o + ((0.155399674455-0.0676265505077j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.651926119651+0.594451264865j)*x[0]**o + ((-0.451489644246-0.741844323049j))*x[0] + ((0.186743430443+0.209113134442j))*x[1]**o + ((-0.958551656811-0.64147355446j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.651926119651+0.594451264865j)*x_ref[0]**o + ((-0.451489644246-0.741844323049j))*x_ref[0] + ((0.186743430443+0.209113134442j))*x_ref[1]**o + ((-0.958551656811-0.64147355446j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.309488731635-0.584062739183j)*x[0]**o + ((-0.692771801491-0.737863499597j))*x[0] + ((0.146988529193+0.951954846763j))*x[1]**o + ((-0.0755441261106-0.328055412652j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.309488731635-0.584062739183j)*x_ref[0]**o + ((-0.692771801491-0.737863499597j))*x_ref[0] + ((0.146988529193+0.951954846763j))*x_ref[1]**o + ((-0.0755441261106-0.328055412652j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.958060965262-0.515225264131j)*x[0]**o + ((0.943932415772-0.986453160659j))*x[0] + ((0.479448481692-0.21436680202j))*x[1]**o + ((-0.664616699093-0.428361948135j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.958060965262-0.515225264131j)*x_ref[0]**o + ((0.943932415772-0.986453160659j))*x_ref[0] + ((0.479448481692-0.21436680202j))*x_ref[1]**o + ((-0.664616699093-0.428361948135j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.313198040166-0.415777899425j)*x[0]**o + ((0.159849905231-0.767304582721j))*x[0] + ((0.699117586066+0.350261200158j))*x[1]**o + ((0.0725015953372+0.98953980165j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.313198040166-0.415777899425j)*x_ref[0]**o + ((0.159849905231-0.767304582721j))*x_ref[0] + ((0.699117586066+0.350261200158j))*x_ref[1]**o + ((0.0725015953372+0.98953980165j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.954553071422-0.0194870311166j)*x[0]**o + ((-0.00882730255865-0.55563884748j))*x[0] + ((0.521941066674-0.903317973149j))*x[1]**o + ((0.0399340393193+0.335244205806j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.954553071422-0.0194870311166j)*x_ref[0]**o + ((-0.00882730255865-0.55563884748j))*x_ref[0] + ((0.521941066674-0.903317973149j))*x_ref[1]**o + ((0.0399340393193+0.335244205806j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.959870753247-0.653143690044j)*x[0]**o + ((-0.865493986867-0.76792578856j))*x[0] + ((0.201291789041+0.201606182453j))*x[1]**o + ((0.454261130909-0.981720396756j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.959870753247-0.653143690044j)*x_ref[0]**o + ((-0.865493986867-0.76792578856j))*x_ref[0] + ((0.201291789041+0.201606182453j))*x_ref[1]**o + ((0.454261130909-0.981720396756j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.115733946107-0.73266894071j)*x[0]**o + ((-0.846886914119+0.560770947569j))*x[0] + ((0.489747238148+0.154464757687j))*x[1]**o + ((-0.0938018880389-0.919078540461j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.115733946107-0.73266894071j)*x_ref[0]**o + ((-0.846886914119+0.560770947569j))*x_ref[0] + ((0.489747238148+0.154464757687j))*x_ref[1]**o + ((-0.0938018880389-0.919078540461j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.935209103341+0.493197647372j)*x[0]**o + ((-0.426679241274-0.981264273962j))*x[0] + ((-0.180290604141-0.8211923846j))*x[1]**o + ((-0.668866136516-0.726854835776j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.935209103341+0.493197647372j)*x_ref[0]**o + ((-0.426679241274-0.981264273962j))*x_ref[0] + ((-0.180290604141-0.8211923846j))*x_ref[1]**o + ((-0.668866136516-0.726854835776j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(-0.21711169363-0.106705753277j)*x[0]**o + ((0.670565810898-0.741292579745j))*x[0] + ((0.549838719463+0.407593983071j))*x[1]**o + ((-0.716480806373+0.962007510796j))*x[1]
+        ref[(0, 3, 0, 0)]=(-0.21711169363-0.106705753277j)*x_ref[0]**o + ((0.670565810898-0.741292579745j))*x_ref[0] + ((0.549838719463+0.407593983071j))*x_ref[1]**o + ((-0.716480806373+0.962007510796j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.206572382395+0.695425157051j)*x[0]**o + ((-0.220220184982-0.132458408951j))*x[0] + ((0.0787449129291-0.701084661703j))*x[1]**o + ((0.0228226175551-0.10517401455j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.206572382395+0.695425157051j)*x_ref[0]**o + ((-0.220220184982-0.132458408951j))*x_ref[0] + ((0.0787449129291-0.701084661703j))*x_ref[1]**o + ((0.0228226175551-0.10517401455j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.919310143495+0.938712403338j)*x[0]**o + ((0.400540299124-0.290734486265j))*x[0] + ((0.845230986812-0.385647167282j))*x[1]**o + ((0.027068221337-0.785557692105j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.919310143495+0.938712403338j)*x_ref[0]**o + ((0.400540299124-0.290734486265j))*x_ref[0] + ((0.845230986812-0.385647167282j))*x_ref[1]**o + ((0.027068221337-0.785557692105j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.240680617293-0.177634098538j)*x[0]**o + ((0.696975325362+0.890286647412j))*x[0] + ((-0.657298966493+0.772701155339j))*x[1]**o + ((0.429753557006-0.35728389891j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.240680617293-0.177634098538j)*x_ref[0]**o + ((0.696975325362+0.890286647412j))*x_ref[0] + ((-0.657298966493+0.772701155339j))*x_ref[1]**o + ((0.429753557006-0.35728389891j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.634608291805+0.344064662305j)*x[0]**o + ((-0.925728093441+0.84299737084j))*x[0] + ((0.842689205811+0.0733353239855j))*x[1]**o + ((-0.465134113067-0.25995054383j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.634608291805+0.344064662305j)*x_ref[0]**o + ((-0.925728093441+0.84299737084j))*x_ref[0] + ((0.842689205811+0.0733353239855j))*x_ref[1]**o + ((-0.465134113067-0.25995054383j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(0.947865937387+0.158938914861j)*x[0]**o + ((0.716928907283-0.53901457574j))*x[0] + ((-0.415996571465+0.28889926015j))*x[1]**o + ((0.705417341275+0.502382662094j))*x[1]
+        ref[(0, 3, 2, 1)]=(0.947865937387+0.158938914861j)*x_ref[0]**o + ((0.716928907283-0.53901457574j))*x_ref[0] + ((-0.415996571465+0.28889926015j))*x_ref[1]**o + ((0.705417341275+0.502382662094j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.850872143893-0.741174160803j)*x[0]**o + ((-0.110846221889-0.200910298046j))*x[0] + ((0.866436914459+0.33123556895j))*x[1]**o + ((-0.357847993222-0.703933719762j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.850872143893-0.741174160803j)*x_ref[0]**o + ((-0.110846221889-0.200910298046j))*x_ref[0] + ((0.866436914459+0.33123556895j))*x_ref[1]**o + ((-0.357847993222-0.703933719762j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.933032350169-0.455793916775j)*x[0]**o + ((0.0587612772948+0.364622262994j))*x[0] + ((0.497485474278-0.586106961051j))*x[1]**o + ((0.482095531483-0.882257001458j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.933032350169-0.455793916775j)*x_ref[0]**o + ((0.0587612772948+0.364622262994j))*x_ref[0] + ((0.497485474278-0.586106961051j))*x_ref[1]**o + ((0.482095531483-0.882257001458j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.543513731371-0.244767409262j)*x[0]**o + ((0.750977466374+0.864000252129j))*x[0] + ((-0.254050243486-0.227677535054j))*x[1]**o + ((-0.55131273111-0.876509995813j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.543513731371-0.244767409262j)*x_ref[0]**o + ((0.750977466374+0.864000252129j))*x_ref[0] + ((-0.254050243486-0.227677535054j))*x_ref[1]**o + ((-0.55131273111-0.876509995813j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.429596101093-0.33010546025j)*x[0]**o + ((0.326979105196-0.4730622492j))*x[0] + ((-0.972546021377-0.384805604481j))*x[1]**o + ((-0.889058898653+0.73753255502j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.429596101093-0.33010546025j)*x_ref[0]**o + ((0.326979105196-0.4730622492j))*x_ref[0] + ((-0.972546021377-0.384805604481j))*x_ref[1]**o + ((-0.889058898653+0.73753255502j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.24199135479-0.284955874771j)*x[0]**o + ((0.593124412123+0.260865527823j))*x[0] + ((-0.806078347878-0.246458438533j))*x[1]**o + ((-0.759001723451+0.747209288255j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.24199135479-0.284955874771j)*x_ref[0]**o + ((0.593124412123+0.260865527823j))*x_ref[0] + ((-0.806078347878-0.246458438533j))*x_ref[1]**o + ((-0.759001723451+0.747209288255j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.629977751719+0.343150811553j)*x[0]**o + ((0.571389988851+0.334414667653j))*x[0] + ((0.116508683523+0.194152509132j))*x[1]**o + ((0.890681673757+0.230509637349j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.629977751719+0.343150811553j)*x_ref[0]**o + ((0.571389988851+0.334414667653j))*x_ref[0] + ((0.116508683523+0.194152509132j))*x_ref[1]**o + ((0.890681673757+0.230509637349j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.576244255049-0.242826170252j)*x[0]**o + ((-0.195620366511-0.893680286979j))*x[0] + ((-0.969384288997-0.719301447444j))*x[1]**o + ((0.596088410631-0.539032768548j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.576244255049-0.242826170252j)*x_ref[0]**o + ((-0.195620366511-0.893680286979j))*x_ref[0] + ((-0.969384288997-0.719301447444j))*x_ref[1]**o + ((0.596088410631-0.539032768548j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.584133781943+0.563444986679j)*x[0]**o + ((0.448290541432+0.316690552703j))*x[0] + ((0.775009163944-0.99413172108j))*x[1]**o + ((0.763978312065-0.362500341119j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.584133781943+0.563444986679j)*x_ref[0]**o + ((0.448290541432+0.316690552703j))*x_ref[0] + ((0.775009163944-0.99413172108j))*x_ref[1]**o + ((0.763978312065-0.362500341119j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.456440554076+0.960058946359j)*x[0]**o + ((0.547682906857-0.735955592282j))*x[0] + ((-0.278232131934+0.749218887321j))*x[1]**o + ((0.901570231414+0.69366630402j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.456440554076+0.960058946359j)*x_ref[0]**o + ((0.547682906857-0.735955592282j))*x_ref[0] + ((-0.278232131934+0.749218887321j))*x_ref[1]**o + ((0.901570231414+0.69366630402j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.996821926409-0.0350444900503j)*x[0]**o + ((-0.751234138188+0.15140376671j))*x[0] + ((-0.294485387769-0.799235390621j))*x[1]**o + ((-0.0727877979488+0.139471408178j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.996821926409-0.0350444900503j)*x_ref[0]**o + ((-0.751234138188+0.15140376671j))*x_ref[0] + ((-0.294485387769-0.799235390621j))*x_ref[1]**o + ((-0.0727877979488+0.139471408178j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.990613572023+0.873775620209j)*x[0]**o + ((0.908095408407+0.891539261948j))*x[0] + ((0.839449909056-0.0493905965441j))*x[1]**o + ((0.385411807512-0.269993647141j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.990613572023+0.873775620209j)*x_ref[0]**o + ((0.908095408407+0.891539261948j))*x_ref[0] + ((0.839449909056-0.0493905965441j))*x_ref[1]**o + ((0.385411807512-0.269993647141j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.358308277127-0.0391937116794j)*x[0]**o + ((0.581134080015+0.321779023772j))*x[0] + ((-0.236317538644+0.284409377702j))*x[1]**o + ((-0.708068704153+0.734200162308j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.358308277127-0.0391937116794j)*x_ref[0]**o + ((0.581134080015+0.321779023772j))*x_ref[0] + ((-0.236317538644+0.284409377702j))*x_ref[1]**o + ((-0.708068704153+0.734200162308j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.918498591941-0.281778484401j)*x[0]**o + ((0.556331982079+0.0877099326468j))*x[0] + ((0.00338192322499-0.994643897618j))*x[1]**o + ((-0.301174877777+0.90424643171j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.918498591941-0.281778484401j)*x_ref[0]**o + ((0.556331982079+0.0877099326468j))*x_ref[0] + ((0.00338192322499-0.994643897618j))*x_ref[1]**o + ((-0.301174877777+0.90424643171j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.260891965984+0.573899368156j)*x[0]**o + ((-0.554529117048+0.25118082707j))*x[0] + ((0.0964766136902+0.393933842759j))*x[1]**o + ((-0.415196472878+0.641461283385j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.260891965984+0.573899368156j)*x_ref[0]**o + ((-0.554529117048+0.25118082707j))*x_ref[0] + ((0.0964766136902+0.393933842759j))*x_ref[1]**o + ((-0.415196472878+0.641461283385j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.583034048264-0.706193968115j)*x[0]**o + ((-0.941505664791-0.338502907269j))*x[0] + ((0.0434050218767+0.915056519447j))*x[1]**o + ((0.470893365177+0.612495652752j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.583034048264-0.706193968115j)*x_ref[0]**o + ((-0.941505664791-0.338502907269j))*x_ref[0] + ((0.0434050218767+0.915056519447j))*x_ref[1]**o + ((0.470893365177+0.612495652752j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.0285196444927-0.642394888578j)*x[0]**o + ((-0.972057703216-0.914315414507j))*x[0] + ((-0.189822211415-0.710807487277j))*x[1]**o + ((-0.789094970559-0.0171584790367j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.0285196444927-0.642394888578j)*x_ref[0]**o + ((-0.972057703216-0.914315414507j))*x_ref[0] + ((-0.189822211415-0.710807487277j))*x_ref[1]**o + ((-0.789094970559-0.0171584790367j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.658389023464+0.635319605323j)*x[0]**o + ((0.0330335565305+0.573981972782j))*x[0] + ((0.173523311967+0.614621673201j))*x[1]**o + ((-0.921255333807-0.851564364088j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.658389023464+0.635319605323j)*x_ref[0]**o + ((0.0330335565305+0.573981972782j))*x_ref[0] + ((0.173523311967+0.614621673201j))*x_ref[1]**o + ((-0.921255333807-0.851564364088j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.601292092109+0.747104184594j)*x[0]**o + ((-0.64125898163+0.630714780805j))*x[0] + ((0.410697730567-0.0821069237451j))*x[1]**o + ((-0.585526330171-0.0138340117604j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.601292092109+0.747104184594j)*x_ref[0]**o + ((-0.64125898163+0.630714780805j))*x_ref[0] + ((0.410697730567-0.0821069237451j))*x_ref[1]**o + ((-0.585526330171-0.0138340117604j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.170315721958-0.682879830938j)*x[0]**o + ((0.912587629149+0.812191993914j))*x[0] + ((0.508864463564+0.659242622032j))*x[1]**o + ((0.721980910987+0.272926344296j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.170315721958-0.682879830938j)*x_ref[0]**o + ((0.912587629149+0.812191993914j))*x_ref[0] + ((0.508864463564+0.659242622032j))*x_ref[1]**o + ((0.721980910987+0.272926344296j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.303789187913+0.336024136576j)*x[0]**o + ((-0.120179066739-0.645504034604j))*x[0] + ((0.308122406598+0.718429625891j))*x[1]**o + ((0.326203029094-0.291176757041j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.303789187913+0.336024136576j)*x_ref[0]**o + ((-0.120179066739-0.645504034604j))*x_ref[0] + ((0.308122406598+0.718429625891j))*x_ref[1]**o + ((0.326203029094-0.291176757041j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.241062289677-0.538508178587j)*x[0]**o + ((0.775977361618+0.0745216977405j))*x[0] + ((0.655356633868-0.455964097748j))*x[1]**o + ((0.239766203558-0.213240827201j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.241062289677-0.538508178587j)*x_ref[0]**o + ((0.775977361618+0.0745216977405j))*x_ref[0] + ((0.655356633868-0.455964097748j))*x_ref[1]**o + ((0.239766203558-0.213240827201j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.647140929233+0.436437714794j)*x[0]**o + ((0.645908970875+0.936111911792j))*x[0] + ((0.628461523811-0.596400827887j))*x[1]**o + ((0.848547006575+0.00348066694044j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.647140929233+0.436437714794j)*x_ref[0]**o + ((0.645908970875+0.936111911792j))*x_ref[0] + ((0.628461523811-0.596400827887j))*x_ref[1]**o + ((0.848547006575+0.00348066694044j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(0.804973918771-0.621473831426j)*x[0]**o + ((-0.155606834176+0.173289328855j))*x[0] + ((0.638239760855-0.909572824946j))*x[1]**o + ((0.0184104444699+0.0900337892725j))*x[1]
+        ref[(1, 3, 2, 0)]=(0.804973918771-0.621473831426j)*x_ref[0]**o + ((-0.155606834176+0.173289328855j))*x_ref[0] + ((0.638239760855-0.909572824946j))*x_ref[1]**o + ((0.0184104444699+0.0900337892725j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(-0.718385749463-0.811806506408j)*x[0]**o + ((0.937454599818-0.163875112608j))*x[0] + ((-0.162071290611+0.581098250077j))*x[1]**o + ((0.966946061355-0.774042455403j))*x[1]
+        ref[(1, 3, 2, 1)]=(-0.718385749463-0.811806506408j)*x_ref[0]**o + ((0.937454599818-0.163875112608j))*x_ref[0] + ((-0.162071290611+0.581098250077j))*x_ref[1]**o + ((0.966946061355-0.774042455403j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.317365559676+0.509450918212j)*x[2]**o + ((-0.864350668581-0.74804428982j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.317365559676+0.509450918212j)*x_ref[2]**o + ((-0.864350668581-0.74804428982j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.418583207521+0.839574918739j)*x[2]**o + ((0.846696670669-0.526890313405j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.418583207521+0.839574918739j)*x_ref[2]**o + ((0.846696670669-0.526890313405j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.484144800981+0.839787940536j)*x[2]**o + ((0.717697869338-0.62741767623j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.484144800981+0.839787940536j)*x_ref[2]**o + ((0.717697869338-0.62741767623j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.877720834384+0.664461945304j)*x[2]**o + ((-0.566287904719+0.274819055532j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.877720834384+0.664461945304j)*x_ref[2]**o + ((-0.566287904719+0.274819055532j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.712735188929-0.816103763594j)*x[2]**o + ((-0.241503283814-0.47524447512j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.712735188929-0.816103763594j)*x_ref[2]**o + ((-0.241503283814-0.47524447512j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.635884200522-0.454107543212j)*x[2]**o + ((-0.187964967935-0.931673861557j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.635884200522-0.454107543212j)*x_ref[2]**o + ((-0.187964967935-0.931673861557j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.357446752176-0.726559416219j)*x[2]**o + ((0.293566201033+0.456062297936j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.357446752176-0.726559416219j)*x_ref[2]**o + ((0.293566201033+0.456062297936j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.799076223642+0.540954145207j)*x[2]**o + ((0.727644379489+0.642870400774j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.799076223642+0.540954145207j)*x_ref[2]**o + ((0.727644379489+0.642870400774j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.0285881257684-0.595127122752j)*x[2]**o + ((0.707719771248-0.338270964078j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.0285881257684-0.595127122752j)*x_ref[2]**o + ((0.707719771248-0.338270964078j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.384812326209-0.7012432544j)*x[2]**o + ((-0.0454181347556+0.8806110846j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.384812326209-0.7012432544j)*x_ref[2]**o + ((-0.0454181347556+0.8806110846j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.510932890935+0.755509841682j)*x[2]**o + ((0.0493357741462-0.0976686465761j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.510932890935+0.755509841682j)*x_ref[2]**o + ((0.0493357741462-0.0976686465761j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.675063918649+0.747222608306j)*x[2]**o + ((0.891557200772+0.764610223617j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.675063918649+0.747222608306j)*x_ref[2]**o + ((0.891557200772+0.764610223617j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.670012928679+0.806508344253j)*x[2]**o + ((-0.218483466503-0.0572005990657j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.670012928679+0.806508344253j)*x_ref[2]**o + ((-0.218483466503-0.0572005990657j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.725818708093-0.429734609139j)*x[2]**o + ((0.612878179023-0.878527028923j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.725818708093-0.429734609139j)*x_ref[2]**o + ((0.612878179023-0.878527028923j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.421415207725-0.268072882652j)*x[2]**o + ((-0.354126017918+0.542191874307j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.421415207725-0.268072882652j)*x_ref[2]**o + ((-0.354126017918+0.542191874307j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.322599734061-0.182949926373j)*x[2]**o + ((-0.651210799272-0.831215173678j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.322599734061-0.182949926373j)*x_ref[2]**o + ((-0.651210799272-0.831215173678j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.664402248622-0.94126253661j)*x[2]**o + ((-0.476255563986+0.684293285347j))*x[2]
+            ref[(0, 2, 2, 0)]+=(0.664402248622-0.94126253661j)*x_ref[2]**o + ((-0.476255563986+0.684293285347j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.260526364769+0.506454446735j)*x[2]**o + ((0.990430758339+0.96387853647j))*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.260526364769+0.506454446735j)*x_ref[2]**o + ((0.990430758339+0.96387853647j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.647686342244+0.0637577282518j)*x[2]**o + ((0.862484365747-0.534272643474j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.647686342244+0.0637577282518j)*x_ref[2]**o + ((0.862484365747-0.534272643474j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.836698590004-0.941451295915j)*x[2]**o + ((0.86483380272-0.446761524723j))*x[2]
+            ref[(0, 3, 0, 1)]+=(0.836698590004-0.941451295915j)*x_ref[2]**o + ((0.86483380272-0.446761524723j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.355854851882-0.663213803151j)*x[2]**o + ((-0.0784004372339-0.10012455387j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.355854851882-0.663213803151j)*x_ref[2]**o + ((-0.0784004372339-0.10012455387j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.0420513100513+0.655633620241j)*x[2]**o + ((-0.539322105591+0.88467633978j))*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.0420513100513+0.655633620241j)*x_ref[2]**o + ((-0.539322105591+0.88467633978j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(-0.181894729494-0.564755240206j)*x[2]**o + ((-0.921179441749-0.221361751128j))*x[2]
+            ref[(0, 3, 2, 0)]+=(-0.181894729494-0.564755240206j)*x_ref[2]**o + ((-0.921179441749-0.221361751128j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(0.858180231922-0.46248185488j)*x[2]**o + ((0.421985636453-0.0515428093653j))*x[2]
+            ref[(0, 3, 2, 1)]+=(0.858180231922-0.46248185488j)*x_ref[2]**o + ((0.421985636453-0.0515428093653j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.504634191884-0.159844313285j)*x[2]**o + ((-0.409510075506+0.807987740997j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.504634191884-0.159844313285j)*x_ref[2]**o + ((-0.409510075506+0.807987740997j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.152782218538-0.252647571814j)*x[2]**o + ((-0.594744638223-0.169566314207j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.152782218538-0.252647571814j)*x_ref[2]**o + ((-0.594744638223-0.169566314207j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.033950774788+0.82548750763j)*x[2]**o + ((-0.266585866931-0.604786282411j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.033950774788+0.82548750763j)*x_ref[2]**o + ((-0.266585866931-0.604786282411j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.0724099306224+0.771740739375j)*x[2]**o + ((0.773093064432+0.412932461533j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.0724099306224+0.771740739375j)*x_ref[2]**o + ((0.773093064432+0.412932461533j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.0372295177639-0.256613092088j)*x[2]**o + ((-0.978072389863+0.825932419906j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.0372295177639-0.256613092088j)*x_ref[2]**o + ((-0.978072389863+0.825932419906j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.445732014723-0.0332618971149j)*x[2]**o + ((0.752696997516+0.515190525139j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.445732014723-0.0332618971149j)*x_ref[2]**o + ((0.752696997516+0.515190525139j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.174714226665+0.5408799383j)*x[2]**o + ((-0.875919505205+0.656198681723j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.174714226665+0.5408799383j)*x_ref[2]**o + ((-0.875919505205+0.656198681723j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.579853147485-0.62501378133j)*x[2]**o + ((0.31846361007-0.262562923523j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.579853147485-0.62501378133j)*x_ref[2]**o + ((0.31846361007-0.262562923523j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.427137898027-0.652375893602j)*x[2]**o + ((-0.359883430992+0.791898196632j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.427137898027-0.652375893602j)*x_ref[2]**o + ((-0.359883430992+0.791898196632j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.198529671583-0.955016541738j)*x[2]**o + ((-0.660648588595-0.167323019284j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.198529671583-0.955016541738j)*x_ref[2]**o + ((-0.660648588595-0.167323019284j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.105080666085+0.639149194487j)*x[2]**o + ((0.790382519265+0.134406049626j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.105080666085+0.639149194487j)*x_ref[2]**o + ((0.790382519265+0.134406049626j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.162806811177-0.523741495971j)*x[2]**o + ((0.94303861716-0.973262153965j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.162806811177-0.523741495971j)*x_ref[2]**o + ((0.94303861716-0.973262153965j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.635977618201+0.493282357854j)*x[2]**o + ((-0.229636798325-0.700174993683j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.635977618201+0.493282357854j)*x_ref[2]**o + ((-0.229636798325-0.700174993683j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.275464481064-0.370553374108j)*x[2]**o + ((-0.594734313451-0.31805152509j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.275464481064-0.370553374108j)*x_ref[2]**o + ((-0.594734313451-0.31805152509j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.427622483748-0.800042187677j)*x[2]**o + ((-0.125829140947-0.579124441863j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.427622483748-0.800042187677j)*x_ref[2]**o + ((-0.125829140947-0.579124441863j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.722378284332-0.0737673231555j)*x[2]**o + ((-0.25116467064-0.727772506035j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.722378284332-0.0737673231555j)*x_ref[2]**o + ((-0.25116467064-0.727772506035j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.516779848805-0.388748984318j)*x[2]**o + ((-0.847883977926+0.279141484371j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.516779848805-0.388748984318j)*x_ref[2]**o + ((-0.847883977926+0.279141484371j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.765616102346-0.391114782254j)*x[2]**o + ((0.900671778731+0.673321879475j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.765616102346-0.391114782254j)*x_ref[2]**o + ((0.900671778731+0.673321879475j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.3758553099+0.0145588839943j)*x[2]**o + ((0.708984228076-0.985796823608j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.3758553099+0.0145588839943j)*x_ref[2]**o + ((0.708984228076-0.985796823608j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.0453428065583-0.545746773092j)*x[2]**o + ((-0.52470593748-0.747841031272j))*x[2]
+            ref[(1, 3, 0, 1)]+=(0.0453428065583-0.545746773092j)*x_ref[2]**o + ((-0.52470593748-0.747841031272j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.952438209126+0.795953820108j)*x[2]**o + ((-0.830401005927-0.0706726740441j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.952438209126+0.795953820108j)*x_ref[2]**o + ((-0.830401005927-0.0706726740441j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.314533997617+0.158069568278j)*x[2]**o + ((0.843446209234-0.433802418861j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.314533997617+0.158069568278j)*x_ref[2]**o + ((0.843446209234-0.433802418861j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(0.862445365534+0.622755444812j)*x[2]**o + ((-0.584319135973-0.756523305413j))*x[2]
+            ref[(1, 3, 2, 0)]+=(0.862445365534+0.622755444812j)*x_ref[2]**o + ((-0.584319135973-0.756523305413j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.92072421511+0.841680466324j)*x[2]**o + ((-0.0247619733422-0.528592858047j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.92072421511+0.841680466324j)*x_ref[2]**o + ((-0.0247619733422-0.528592858047j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.438850259538+0.271938348589j)*x[0] + ((-0.54318957348+0.73599491086j))*x[1]
+        ref=(0.438850259538+0.271938348589j)*x_ref[0] + ((-0.54318957348+0.73599491086j))*x_ref[1]
+        if dim==3:
+            arg+=((0.655827311755-0.0407121842584j))*x[2]
+            ref+=((0.655827311755-0.0407121842584j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.66200232529+0.837750820678j)*x[0] + ((-0.227696244674-0.32118174033j))*x[1]
+        ref[(0,)]=(-0.66200232529+0.837750820678j)*x_ref[0] + ((-0.227696244674-0.32118174033j))*x_ref[1]
+        arg[(1,)]=(0.579274343307+0.793363511379j)*x[0] + ((0.699877695632-0.654353655504j))*x[1]
+        ref[(1,)]=(0.579274343307+0.793363511379j)*x_ref[0] + ((0.699877695632-0.654353655504j))*x_ref[1]
+        arg[(2,)]=(0.944280240843+0.266288560163j)*x[0] + ((0.55749903564-0.952010517544j))*x[1]
+        ref[(2,)]=(0.944280240843+0.266288560163j)*x_ref[0] + ((0.55749903564-0.952010517544j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.246834500892-0.726290329095j)*x[2]
+            ref[(0,)]+=(-0.246834500892-0.726290329095j)*x_ref[2]
+            arg[(1,)]+=(-0.533141565217-0.178124390405j)*x[2]
+            ref[(1,)]+=(-0.533141565217-0.178124390405j)*x_ref[2]
+            arg[(2,)]+=(-0.0100433160098+0.63065425183j)*x[2]
+            ref[(2,)]+=(-0.0100433160098+0.63065425183j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(-0.61506537007+0.373411884659j)*x[0] + ((0.881390473769+0.613868273933j))*x[1]
+        ref[(0, 0)]=(-0.61506537007+0.373411884659j)*x_ref[0] + ((0.881390473769+0.613868273933j))*x_ref[1]
+        arg[(0, 1)]=(-0.426574832973+0.994313238009j)*x[0] + ((-0.0161653251759+0.634314028344j))*x[1]
+        ref[(0, 1)]=(-0.426574832973+0.994313238009j)*x_ref[0] + ((-0.0161653251759+0.634314028344j))*x_ref[1]
+        arg[(1, 0)]=(0.580219178358-0.0973164626485j)*x[0] + ((0.188189356451+0.482888579143j))*x[1]
+        ref[(1, 0)]=(0.580219178358-0.0973164626485j)*x_ref[0] + ((0.188189356451+0.482888579143j))*x_ref[1]
+        arg[(1, 1)]=(0.672985057874-0.918221907369j)*x[0] + ((0.0880487759826-0.175527358938j))*x[1]
+        ref[(1, 1)]=(0.672985057874-0.918221907369j)*x_ref[0] + ((0.0880487759826-0.175527358938j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.461825943602-0.486928791497j)*x[2]
+            ref[(0, 0)]+=(0.461825943602-0.486928791497j)*x_ref[2]
+            arg[(0, 1)]+=(-0.518355081925-0.889581366677j)*x[2]
+            ref[(0, 1)]+=(-0.518355081925-0.889581366677j)*x_ref[2]
+            arg[(1, 0)]+=(-0.903478113139-0.174542019331j)*x[2]
+            ref[(1, 0)]+=(-0.903478113139-0.174542019331j)*x_ref[2]
+            arg[(1, 1)]+=(0.264679072593-0.0325214419041j)*x[2]
+            ref[(1, 1)]+=(0.264679072593-0.0325214419041j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.201117437878-0.525640262642j)*x[0] + ((-0.698328992611+0.483089407053j))*x[1]
+        ref[(0, 0, 0)]=(-0.201117437878-0.525640262642j)*x_ref[0] + ((-0.698328992611+0.483089407053j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.900658305126-0.359030553763j)*x[0] + ((-0.465331375535+0.433996472429j))*x[1]
+        ref[(0, 0, 1)]=(0.900658305126-0.359030553763j)*x_ref[0] + ((-0.465331375535+0.433996472429j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.956550937322-0.0080481260797j)*x[0] + ((-0.289264087273-0.773315720708j))*x[1]
+        ref[(0, 0, 2)]=(0.956550937322-0.0080481260797j)*x_ref[0] + ((-0.289264087273-0.773315720708j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.3014623331-0.155442401912j)*x[0] + ((0.26961227099-0.379808396274j))*x[1]
+        ref[(0, 0, 3)]=(0.3014623331-0.155442401912j)*x_ref[0] + ((0.26961227099-0.379808396274j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.558232962364+0.815491631689j)*x[0] + ((-0.481403903706-0.56880386468j))*x[1]
+        ref[(0, 1, 0)]=(0.558232962364+0.815491631689j)*x_ref[0] + ((-0.481403903706-0.56880386468j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.227811582644-0.0507980549015j)*x[0] + ((0.809472842011+0.83523879853j))*x[1]
+        ref[(0, 1, 1)]=(0.227811582644-0.0507980549015j)*x_ref[0] + ((0.809472842011+0.83523879853j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.692905690535+0.0244929956142j)*x[0] + ((-0.845113697699+0.111806951315j))*x[1]
+        ref[(0, 1, 2)]=(0.692905690535+0.0244929956142j)*x_ref[0] + ((-0.845113697699+0.111806951315j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.877153235157-0.118294035411j)*x[0] + ((-0.761851604868-0.427805394787j))*x[1]
+        ref[(0, 1, 3)]=(-0.877153235157-0.118294035411j)*x_ref[0] + ((-0.761851604868-0.427805394787j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.486082282782-0.57927127139j)*x[0] + ((-0.51797313149+0.994641346208j))*x[1]
+        ref[(0, 2, 0)]=(-0.486082282782-0.57927127139j)*x_ref[0] + ((-0.51797313149+0.994641346208j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.971962538338-0.400876437541j)*x[0] + ((-0.382883121394-0.857711418594j))*x[1]
+        ref[(0, 2, 1)]=(0.971962538338-0.400876437541j)*x_ref[0] + ((-0.382883121394-0.857711418594j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.354369323397+0.520919026423j)*x[0] + ((-0.836886009467-0.0159536288955j))*x[1]
+        ref[(0, 2, 2)]=(-0.354369323397+0.520919026423j)*x_ref[0] + ((-0.836886009467-0.0159536288955j))*x_ref[1]
+        arg[(0, 2, 3)]=(0.32400349137+0.404061669333j)*x[0] + ((0.940421212902-0.42695104245j))*x[1]
+        ref[(0, 2, 3)]=(0.32400349137+0.404061669333j)*x_ref[0] + ((0.940421212902-0.42695104245j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.847563481614-0.900740375368j)*x[0] + ((0.257426107773+0.439593477019j))*x[1]
+        ref[(1, 0, 0)]=(0.847563481614-0.900740375368j)*x_ref[0] + ((0.257426107773+0.439593477019j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.38867675237+0.311708999467j)*x[0] + ((-0.80590283936-0.9082348666j))*x[1]
+        ref[(1, 0, 1)]=(0.38867675237+0.311708999467j)*x_ref[0] + ((-0.80590283936-0.9082348666j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.444523332819+0.112466389861j)*x[0] + ((-0.77104876514-0.129109648248j))*x[1]
+        ref[(1, 0, 2)]=(0.444523332819+0.112466389861j)*x_ref[0] + ((-0.77104876514-0.129109648248j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.130606479363-0.0687778272659j)*x[0] + ((-0.599721462279-0.739005599749j))*x[1]
+        ref[(1, 0, 3)]=(0.130606479363-0.0687778272659j)*x_ref[0] + ((-0.599721462279-0.739005599749j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.022079819182-0.939516710548j)*x[0] + ((-0.689215629496+0.52235600102j))*x[1]
+        ref[(1, 1, 0)]=(-0.022079819182-0.939516710548j)*x_ref[0] + ((-0.689215629496+0.52235600102j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.803618062118-0.447719594924j)*x[0] + ((0.150221768828+0.745554596851j))*x[1]
+        ref[(1, 1, 1)]=(0.803618062118-0.447719594924j)*x_ref[0] + ((0.150221768828+0.745554596851j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.00351199113841+0.916800438674j)*x[0] + ((0.222856407385+0.456511274836j))*x[1]
+        ref[(1, 1, 2)]=(0.00351199113841+0.916800438674j)*x_ref[0] + ((0.222856407385+0.456511274836j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.379391566923-0.186801033837j)*x[0] + ((0.81977529917+0.755548606364j))*x[1]
+        ref[(1, 1, 3)]=(0.379391566923-0.186801033837j)*x_ref[0] + ((0.81977529917+0.755548606364j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.604381364862+0.36845285769j)*x[0] + ((-0.777630709188-0.278380801029j))*x[1]
+        ref[(1, 2, 0)]=(-0.604381364862+0.36845285769j)*x_ref[0] + ((-0.777630709188-0.278380801029j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.175412583375-0.761247678537j)*x[0] + ((0.594079746168-0.515267947708j))*x[1]
+        ref[(1, 2, 1)]=(0.175412583375-0.761247678537j)*x_ref[0] + ((0.594079746168-0.515267947708j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.023759997814-0.411749845799j)*x[0] + ((0.924871877104-0.753085378925j))*x[1]
+        ref[(1, 2, 2)]=(0.023759997814-0.411749845799j)*x_ref[0] + ((0.924871877104-0.753085378925j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.731705620368+0.632812981367j)*x[0] + ((-0.175340151594+0.913915266074j))*x[1]
+        ref[(1, 2, 3)]=(-0.731705620368+0.632812981367j)*x_ref[0] + ((-0.175340151594+0.913915266074j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.155544623574-0.539917908747j)*x[0] + ((-0.134690676783+0.76499635553j))*x[1]
+        ref[(2, 0, 0)]=(0.155544623574-0.539917908747j)*x_ref[0] + ((-0.134690676783+0.76499635553j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.652519009556-0.184985433409j)*x[0] + ((0.667281617647+0.888565708698j))*x[1]
+        ref[(2, 0, 1)]=(-0.652519009556-0.184985433409j)*x_ref[0] + ((0.667281617647+0.888565708698j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.691856472418+0.761700560617j)*x[0] + ((-0.391922092339-0.407374604027j))*x[1]
+        ref[(2, 0, 2)]=(0.691856472418+0.761700560617j)*x_ref[0] + ((-0.391922092339-0.407374604027j))*x_ref[1]
+        arg[(2, 0, 3)]=(0.0868436731063-0.0125656699377j)*x[0] + ((0.0941226974972-0.16261336441j))*x[1]
+        ref[(2, 0, 3)]=(0.0868436731063-0.0125656699377j)*x_ref[0] + ((0.0941226974972-0.16261336441j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.722795141635+0.330793135491j)*x[0] + ((-0.362507765237+0.797184090653j))*x[1]
+        ref[(2, 1, 0)]=(-0.722795141635+0.330793135491j)*x_ref[0] + ((-0.362507765237+0.797184090653j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.874748448314-0.0866805338178j)*x[0] + ((-0.543090090143+0.398214088355j))*x[1]
+        ref[(2, 1, 1)]=(0.874748448314-0.0866805338178j)*x_ref[0] + ((-0.543090090143+0.398214088355j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.773121985967+0.786540975537j)*x[0] + ((-0.358584016874+0.242891319787j))*x[1]
+        ref[(2, 1, 2)]=(0.773121985967+0.786540975537j)*x_ref[0] + ((-0.358584016874+0.242891319787j))*x_ref[1]
+        arg[(2, 1, 3)]=(0.346764990858-0.926099824469j)*x[0] + ((-0.874661786027-0.211864945935j))*x[1]
+        ref[(2, 1, 3)]=(0.346764990858-0.926099824469j)*x_ref[0] + ((-0.874661786027-0.211864945935j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.667809441392-0.888615229883j)*x[0] + ((0.850987873461-0.576499753624j))*x[1]
+        ref[(2, 2, 0)]=(-0.667809441392-0.888615229883j)*x_ref[0] + ((0.850987873461-0.576499753624j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.411525811916+0.460769484297j)*x[0] + ((-0.307884728267+0.612407762625j))*x[1]
+        ref[(2, 2, 1)]=(0.411525811916+0.460769484297j)*x_ref[0] + ((-0.307884728267+0.612407762625j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.643452198013-0.664578972087j)*x[0] + ((-0.663506788374+0.149975035065j))*x[1]
+        ref[(2, 2, 2)]=(0.643452198013-0.664578972087j)*x_ref[0] + ((-0.663506788374+0.149975035065j))*x_ref[1]
+        arg[(2, 2, 3)]=(-0.47421468164-0.436403884625j)*x[0] + ((0.293012627103-0.755420885345j))*x[1]
+        ref[(2, 2, 3)]=(-0.47421468164-0.436403884625j)*x_ref[0] + ((0.293012627103-0.755420885345j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.140374960003+0.556764015108j)*x[0] + ((0.036524363336-0.156370785876j))*x[1]
+        ref[(3, 0, 0)]=(-0.140374960003+0.556764015108j)*x_ref[0] + ((0.036524363336-0.156370785876j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.94394720643+0.040887288489j)*x[0] + ((0.54237504512+0.401204168437j))*x[1]
+        ref[(3, 0, 1)]=(-0.94394720643+0.040887288489j)*x_ref[0] + ((0.54237504512+0.401204168437j))*x_ref[1]
+        arg[(3, 0, 2)]=(-0.474464771417+0.842841769058j)*x[0] + ((0.374382236584+0.139023584278j))*x[1]
+        ref[(3, 0, 2)]=(-0.474464771417+0.842841769058j)*x_ref[0] + ((0.374382236584+0.139023584278j))*x_ref[1]
+        arg[(3, 0, 3)]=(-0.880144391468-0.442689696592j)*x[0] + ((-0.330516516652-0.74263285876j))*x[1]
+        ref[(3, 0, 3)]=(-0.880144391468-0.442689696592j)*x_ref[0] + ((-0.330516516652-0.74263285876j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.922182873126-0.732214481822j)*x[0] + ((0.19862157964-0.125426522556j))*x[1]
+        ref[(3, 1, 0)]=(-0.922182873126-0.732214481822j)*x_ref[0] + ((0.19862157964-0.125426522556j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.440552417896+0.575960994875j)*x[0] + ((0.288928575303-0.919146594346j))*x[1]
+        ref[(3, 1, 1)]=(0.440552417896+0.575960994875j)*x_ref[0] + ((0.288928575303-0.919146594346j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.175610287898+0.725673307029j)*x[0] + ((0.84052731212-0.361912851341j))*x[1]
+        ref[(3, 1, 2)]=(-0.175610287898+0.725673307029j)*x_ref[0] + ((0.84052731212-0.361912851341j))*x_ref[1]
+        arg[(3, 1, 3)]=(0.0328029619129+0.537478772224j)*x[0] + ((-0.331165655058-0.381699899502j))*x[1]
+        ref[(3, 1, 3)]=(0.0328029619129+0.537478772224j)*x_ref[0] + ((-0.331165655058-0.381699899502j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.835681549987+0.609090847269j)*x[0] + ((0.417460858906+0.727547479803j))*x[1]
+        ref[(3, 2, 0)]=(0.835681549987+0.609090847269j)*x_ref[0] + ((0.417460858906+0.727547479803j))*x_ref[1]
+        arg[(3, 2, 1)]=(0.757358824718+0.0452590174467j)*x[0] + ((0.620393733928+0.777033571385j))*x[1]
+        ref[(3, 2, 1)]=(0.757358824718+0.0452590174467j)*x_ref[0] + ((0.620393733928+0.777033571385j))*x_ref[1]
+        arg[(3, 2, 2)]=(0.131240595305-0.391048012534j)*x[0] + ((-0.0383323323861-0.757745435014j))*x[1]
+        ref[(3, 2, 2)]=(0.131240595305-0.391048012534j)*x_ref[0] + ((-0.0383323323861-0.757745435014j))*x_ref[1]
+        arg[(3, 2, 3)]=(0.691194456564-0.00789224555926j)*x[0] + ((-0.709103863715-0.813829353464j))*x[1]
+        ref[(3, 2, 3)]=(0.691194456564-0.00789224555926j)*x_ref[0] + ((-0.709103863715-0.813829353464j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.894073230389+0.347494291185j)*x[2]
+            ref[(0, 0, 0)]+=(-0.894073230389+0.347494291185j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.994543088163-0.626692537241j)*x[2]
+            ref[(0, 0, 1)]+=(0.994543088163-0.626692537241j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.230833900367-0.30361839933j)*x[2]
+            ref[(0, 0, 2)]+=(-0.230833900367-0.30361839933j)*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.227193925999-0.806095050177j)*x[2]
+            ref[(0, 0, 3)]+=(-0.227193925999-0.806095050177j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.423636633996+0.845031452635j)*x[2]
+            ref[(0, 1, 0)]+=(-0.423636633996+0.845031452635j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.779608183422-0.874469229721j)*x[2]
+            ref[(0, 1, 1)]+=(0.779608183422-0.874469229721j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.863157219858+0.86523117163j)*x[2]
+            ref[(0, 1, 2)]+=(0.863157219858+0.86523117163j)*x_ref[2]
+            arg[(0, 1, 3)]+=(0.473254188713+0.909601776315j)*x[2]
+            ref[(0, 1, 3)]+=(0.473254188713+0.909601776315j)*x_ref[2]
+            arg[(0, 2, 0)]+=(0.780754934488+0.733247756266j)*x[2]
+            ref[(0, 2, 0)]+=(0.780754934488+0.733247756266j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.298915004403+0.664228128127j)*x[2]
+            ref[(0, 2, 1)]+=(0.298915004403+0.664228128127j)*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.480451691163+0.606084557576j)*x[2]
+            ref[(0, 2, 2)]+=(-0.480451691163+0.606084557576j)*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.172076186611+0.15885114841j)*x[2]
+            ref[(0, 2, 3)]+=(-0.172076186611+0.15885114841j)*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.907293101823+0.582351061667j)*x[2]
+            ref[(1, 0, 0)]+=(-0.907293101823+0.582351061667j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.464129036589-0.993270709123j)*x[2]
+            ref[(1, 0, 1)]+=(0.464129036589-0.993270709123j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.681667612787+0.660462422182j)*x[2]
+            ref[(1, 0, 2)]+=(0.681667612787+0.660462422182j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.334975042756+0.21459179635j)*x[2]
+            ref[(1, 0, 3)]+=(-0.334975042756+0.21459179635j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.759700771377-0.550598017419j)*x[2]
+            ref[(1, 1, 0)]+=(-0.759700771377-0.550598017419j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.26429598458+0.806782356528j)*x[2]
+            ref[(1, 1, 1)]+=(0.26429598458+0.806782356528j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.751492880991-0.169931053241j)*x[2]
+            ref[(1, 1, 2)]+=(0.751492880991-0.169931053241j)*x_ref[2]
+            arg[(1, 1, 3)]+=(-0.741024425437+0.976809600265j)*x[2]
+            ref[(1, 1, 3)]+=(-0.741024425437+0.976809600265j)*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.967805540917+0.782385860474j)*x[2]
+            ref[(1, 2, 0)]+=(-0.967805540917+0.782385860474j)*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.542146388523+0.420274320153j)*x[2]
+            ref[(1, 2, 1)]+=(-0.542146388523+0.420274320153j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.889551808615+0.199947340565j)*x[2]
+            ref[(1, 2, 2)]+=(0.889551808615+0.199947340565j)*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.972895808658+0.318497177187j)*x[2]
+            ref[(1, 2, 3)]+=(-0.972895808658+0.318497177187j)*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.751614831024+0.348225736616j)*x[2]
+            ref[(2, 0, 0)]+=(-0.751614831024+0.348225736616j)*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.182943744241+0.176653147776j)*x[2]
+            ref[(2, 0, 1)]+=(-0.182943744241+0.176653147776j)*x_ref[2]
+            arg[(2, 0, 2)]+=(0.0190220404152+0.25229102775j)*x[2]
+            ref[(2, 0, 2)]+=(0.0190220404152+0.25229102775j)*x_ref[2]
+            arg[(2, 0, 3)]+=(0.151896223556-0.0378981083643j)*x[2]
+            ref[(2, 0, 3)]+=(0.151896223556-0.0378981083643j)*x_ref[2]
+            arg[(2, 1, 0)]+=(0.719940715911+0.0263520714957j)*x[2]
+            ref[(2, 1, 0)]+=(0.719940715911+0.0263520714957j)*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.876977492243+0.594955454631j)*x[2]
+            ref[(2, 1, 1)]+=(-0.876977492243+0.594955454631j)*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.355827616493+0.591593969601j)*x[2]
+            ref[(2, 1, 2)]+=(-0.355827616493+0.591593969601j)*x_ref[2]
+            arg[(2, 1, 3)]+=(-0.60462530033-0.332386782862j)*x[2]
+            ref[(2, 1, 3)]+=(-0.60462530033-0.332386782862j)*x_ref[2]
+            arg[(2, 2, 0)]+=(0.00608544215604+0.606369487317j)*x[2]
+            ref[(2, 2, 0)]+=(0.00608544215604+0.606369487317j)*x_ref[2]
+            arg[(2, 2, 1)]+=(0.190378453272-0.687688778835j)*x[2]
+            ref[(2, 2, 1)]+=(0.190378453272-0.687688778835j)*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.347413430172-0.47884653967j)*x[2]
+            ref[(2, 2, 2)]+=(-0.347413430172-0.47884653967j)*x_ref[2]
+            arg[(2, 2, 3)]+=(-0.708733584537-0.688720802763j)*x[2]
+            ref[(2, 2, 3)]+=(-0.708733584537-0.688720802763j)*x_ref[2]
+            arg[(3, 0, 0)]+=(0.868303696285+0.835302111266j)*x[2]
+            ref[(3, 0, 0)]+=(0.868303696285+0.835302111266j)*x_ref[2]
+            arg[(3, 0, 1)]+=(0.820367550937-0.0825205449279j)*x[2]
+            ref[(3, 0, 1)]+=(0.820367550937-0.0825205449279j)*x_ref[2]
+            arg[(3, 0, 2)]+=(0.191945737407-0.124996837387j)*x[2]
+            ref[(3, 0, 2)]+=(0.191945737407-0.124996837387j)*x_ref[2]
+            arg[(3, 0, 3)]+=(-0.877620105967-0.424985633685j)*x[2]
+            ref[(3, 0, 3)]+=(-0.877620105967-0.424985633685j)*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.936664542866-0.351581348584j)*x[2]
+            ref[(3, 1, 0)]+=(-0.936664542866-0.351581348584j)*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.216714569184+0.873637044367j)*x[2]
+            ref[(3, 1, 1)]+=(-0.216714569184+0.873637044367j)*x_ref[2]
+            arg[(3, 1, 2)]+=(0.466497283064-0.719190629822j)*x[2]
+            ref[(3, 1, 2)]+=(0.466497283064-0.719190629822j)*x_ref[2]
+            arg[(3, 1, 3)]+=(0.533755326363+0.781408698991j)*x[2]
+            ref[(3, 1, 3)]+=(0.533755326363+0.781408698991j)*x_ref[2]
+            arg[(3, 2, 0)]+=(-0.954039764947+0.718406570014j)*x[2]
+            ref[(3, 2, 0)]+=(-0.954039764947+0.718406570014j)*x_ref[2]
+            arg[(3, 2, 1)]+=(0.177434180919+0.175886193639j)*x[2]
+            ref[(3, 2, 1)]+=(0.177434180919+0.175886193639j)*x_ref[2]
+            arg[(3, 2, 2)]+=(0.0412376341343-0.753423056306j)*x[2]
+            ref[(3, 2, 2)]+=(0.0412376341343-0.753423056306j)*x_ref[2]
+            arg[(3, 2, 3)]+=(0.917717393151+0.683611621993j)*x[2]
+            ref[(3, 2, 3)]+=(0.917717393151+0.683611621993j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 4, 4),w)
+        ref = Data(0,(3, 3, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.890015522304-0.617427061869j)*x[0] + ((-0.712433750539+0.393943083991j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.890015522304-0.617427061869j)*x_ref[0] + ((-0.712433750539+0.393943083991j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.891966884729-0.482574034175j)*x[0] + ((0.499318626612-0.980847510708j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.891966884729-0.482574034175j)*x_ref[0] + ((0.499318626612-0.980847510708j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.443269251391-0.118643960038j)*x[0] + ((-0.908985029407-0.218828461012j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.443269251391-0.118643960038j)*x_ref[0] + ((-0.908985029407-0.218828461012j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.272623043968+0.373041253396j)*x[0] + ((-0.100547241465-0.170630682953j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.272623043968+0.373041253396j)*x_ref[0] + ((-0.100547241465-0.170630682953j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.0820083342215-0.525886609783j)*x[0] + ((0.965763377589+0.444392321691j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.0820083342215-0.525886609783j)*x_ref[0] + ((0.965763377589+0.444392321691j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.484752243259+0.946028552866j)*x[0] + ((-0.79657787747+0.0177008612294j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.484752243259+0.946028552866j)*x_ref[0] + ((-0.79657787747+0.0177008612294j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.940269517498+0.227260055861j)*x[0] + ((0.687511393172+0.902614609679j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.940269517498+0.227260055861j)*x_ref[0] + ((0.687511393172+0.902614609679j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.266336662322+0.451197553553j)*x[0] + ((0.00867652309578+0.158962114255j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.266336662322+0.451197553553j)*x_ref[0] + ((0.00867652309578+0.158962114255j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.0750427469302-0.422969320771j)*x[0] + ((-0.104795643565+0.829535545327j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.0750427469302-0.422969320771j)*x_ref[0] + ((-0.104795643565+0.829535545327j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.273397339695+0.494430088398j)*x[0] + ((0.828151450018+0.845740103018j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.273397339695+0.494430088398j)*x_ref[0] + ((0.828151450018+0.845740103018j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.692564672984+0.35833629249j)*x[0] + ((0.473297372771+0.142671962675j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.692564672984+0.35833629249j)*x_ref[0] + ((0.473297372771+0.142671962675j))*x_ref[1]
+        arg[(0, 0, 2, 3)]=(0.323603841366-0.932991177808j)*x[0] + ((0.563587988372+0.0626559181029j))*x[1]
+        ref[(0, 0, 2, 3)]=(0.323603841366-0.932991177808j)*x_ref[0] + ((0.563587988372+0.0626559181029j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(-0.914828758856+0.845993987228j)*x[0] + ((-0.254922798934+0.820962066227j))*x[1]
+        ref[(0, 0, 3, 0)]=(-0.914828758856+0.845993987228j)*x_ref[0] + ((-0.254922798934+0.820962066227j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(-0.88796417872-0.249820002731j)*x[0] + ((0.523572790713+0.539132500055j))*x[1]
+        ref[(0, 0, 3, 1)]=(-0.88796417872-0.249820002731j)*x_ref[0] + ((0.523572790713+0.539132500055j))*x_ref[1]
+        arg[(0, 0, 3, 2)]=(-0.962060113744+0.688822839222j)*x[0] + ((0.514985844514+0.124800939727j))*x[1]
+        ref[(0, 0, 3, 2)]=(-0.962060113744+0.688822839222j)*x_ref[0] + ((0.514985844514+0.124800939727j))*x_ref[1]
+        arg[(0, 0, 3, 3)]=(-0.617202691931+0.848401153062j)*x[0] + ((0.500067734292+0.50111474973j))*x[1]
+        ref[(0, 0, 3, 3)]=(-0.617202691931+0.848401153062j)*x_ref[0] + ((0.500067734292+0.50111474973j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.404588275527-0.736338835043j)*x[0] + ((-0.456809342921+0.207522957222j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.404588275527-0.736338835043j)*x_ref[0] + ((-0.456809342921+0.207522957222j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.445404653117-0.729037144184j)*x[0] + ((0.553401169135+0.0272260494943j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.445404653117-0.729037144184j)*x_ref[0] + ((0.553401169135+0.0272260494943j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.0973360418107+0.431664861397j)*x[0] + ((0.167111176542-0.341786138702j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.0973360418107+0.431664861397j)*x_ref[0] + ((0.167111176542-0.341786138702j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.559880419181+0.0730743253642j)*x[0] + ((0.260887273919-0.50919006712j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.559880419181+0.0730743253642j)*x_ref[0] + ((0.260887273919-0.50919006712j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.656598401632-0.894614766825j)*x[0] + ((-0.308271278131-0.70816542918j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.656598401632-0.894614766825j)*x_ref[0] + ((-0.308271278131-0.70816542918j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.333992428511-0.381502448261j)*x[0] + ((0.961350966944+0.160019735294j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.333992428511-0.381502448261j)*x_ref[0] + ((0.961350966944+0.160019735294j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.333568947236-0.539485819812j)*x[0] + ((-0.767468214396+0.376131033017j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.333568947236-0.539485819812j)*x_ref[0] + ((-0.767468214396+0.376131033017j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.886848447741-0.572364936164j)*x[0] + ((0.204681965246+0.183131655076j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.886848447741-0.572364936164j)*x_ref[0] + ((0.204681965246+0.183131655076j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.410797539008-0.00913697211464j)*x[0] + ((0.554084661557+0.35147963735j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.410797539008-0.00913697211464j)*x_ref[0] + ((0.554084661557+0.35147963735j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.889094556197-0.292993397226j)*x[0] + ((0.930796258751+0.111814575704j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.889094556197-0.292993397226j)*x_ref[0] + ((0.930796258751+0.111814575704j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.595987707658-0.282257408332j)*x[0] + ((-0.453579348188+0.994165204444j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.595987707658-0.282257408332j)*x_ref[0] + ((-0.453579348188+0.994165204444j))*x_ref[1]
+        arg[(0, 1, 2, 3)]=(0.748091676442-0.838398747241j)*x[0] + ((0.890276454035+0.912277026749j))*x[1]
+        ref[(0, 1, 2, 3)]=(0.748091676442-0.838398747241j)*x_ref[0] + ((0.890276454035+0.912277026749j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(-0.892794806281-0.140374077126j)*x[0] + ((-0.460405604549-0.0650866991359j))*x[1]
+        ref[(0, 1, 3, 0)]=(-0.892794806281-0.140374077126j)*x_ref[0] + ((-0.460405604549-0.0650866991359j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(0.905857384247+0.521710138164j)*x[0] + ((0.142945139003+0.275263724164j))*x[1]
+        ref[(0, 1, 3, 1)]=(0.905857384247+0.521710138164j)*x_ref[0] + ((0.142945139003+0.275263724164j))*x_ref[1]
+        arg[(0, 1, 3, 2)]=(-0.909313970645-0.318616336541j)*x[0] + ((-0.690144286759-0.19693307506j))*x[1]
+        ref[(0, 1, 3, 2)]=(-0.909313970645-0.318616336541j)*x_ref[0] + ((-0.690144286759-0.19693307506j))*x_ref[1]
+        arg[(0, 1, 3, 3)]=(0.928876965734-0.319349374802j)*x[0] + ((-0.600014996495+0.802990242194j))*x[1]
+        ref[(0, 1, 3, 3)]=(0.928876965734-0.319349374802j)*x_ref[0] + ((-0.600014996495+0.802990242194j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.88537382296+0.67984103142j)*x[0] + ((0.114916903294-0.509380299778j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.88537382296+0.67984103142j)*x_ref[0] + ((0.114916903294-0.509380299778j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.37358965353-0.544319460269j)*x[0] + ((-0.0676553699972-0.933792067723j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.37358965353-0.544319460269j)*x_ref[0] + ((-0.0676553699972-0.933792067723j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.12880136542-0.292396716663j)*x[0] + ((-0.842870847053+0.426433653519j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.12880136542-0.292396716663j)*x_ref[0] + ((-0.842870847053+0.426433653519j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(-0.460237750488-0.169111734852j)*x[0] + ((0.719668213572+0.541285430987j))*x[1]
+        ref[(0, 2, 0, 3)]=(-0.460237750488-0.169111734852j)*x_ref[0] + ((0.719668213572+0.541285430987j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.814781371892+0.621313155203j)*x[0] + ((0.0995538153298-0.83382200184j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.814781371892+0.621313155203j)*x_ref[0] + ((0.0995538153298-0.83382200184j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.909181820684+0.444597535406j)*x[0] + ((0.902276804721-0.6052999974j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.909181820684+0.444597535406j)*x_ref[0] + ((0.902276804721-0.6052999974j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.974532058365-0.317614618898j)*x[0] + ((-0.442837987314+0.66883253685j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.974532058365-0.317614618898j)*x_ref[0] + ((-0.442837987314+0.66883253685j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(0.730165105164+0.463459529572j)*x[0] + ((-0.62330979064+0.136894591022j))*x[1]
+        ref[(0, 2, 1, 3)]=(0.730165105164+0.463459529572j)*x_ref[0] + ((-0.62330979064+0.136894591022j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.0153522590439+0.721895584318j)*x[0] + ((-0.687514278719-0.564249087578j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.0153522590439+0.721895584318j)*x_ref[0] + ((-0.687514278719-0.564249087578j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.215365331322+0.41645089822j)*x[0] + ((0.382134034898-0.0419457251491j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.215365331322+0.41645089822j)*x_ref[0] + ((0.382134034898-0.0419457251491j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(-0.959083784071-0.32677701701j)*x[0] + ((-0.365713398281-0.783772596732j))*x[1]
+        ref[(0, 2, 2, 2)]=(-0.959083784071-0.32677701701j)*x_ref[0] + ((-0.365713398281-0.783772596732j))*x_ref[1]
+        arg[(0, 2, 2, 3)]=(0.158921028888+0.890114042945j)*x[0] + ((-0.103581662378-0.070037650996j))*x[1]
+        ref[(0, 2, 2, 3)]=(0.158921028888+0.890114042945j)*x_ref[0] + ((-0.103581662378-0.070037650996j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(0.815085929007+0.690774727106j)*x[0] + ((-0.109458382471+0.860513551593j))*x[1]
+        ref[(0, 2, 3, 0)]=(0.815085929007+0.690774727106j)*x_ref[0] + ((-0.109458382471+0.860513551593j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(0.891404619999+0.472288554375j)*x[0] + ((0.72296751007+0.763219429713j))*x[1]
+        ref[(0, 2, 3, 1)]=(0.891404619999+0.472288554375j)*x_ref[0] + ((0.72296751007+0.763219429713j))*x_ref[1]
+        arg[(0, 2, 3, 2)]=(-0.206975237227+0.881393477316j)*x[0] + ((0.195862305237-0.151559889784j))*x[1]
+        ref[(0, 2, 3, 2)]=(-0.206975237227+0.881393477316j)*x_ref[0] + ((0.195862305237-0.151559889784j))*x_ref[1]
+        arg[(0, 2, 3, 3)]=(-0.18484336868+0.908265862389j)*x[0] + ((-0.379960227072-0.943279460909j))*x[1]
+        ref[(0, 2, 3, 3)]=(-0.18484336868+0.908265862389j)*x_ref[0] + ((-0.379960227072-0.943279460909j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.799272153332+0.262094021913j)*x[0] + ((0.730140642712-0.948998592822j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.799272153332+0.262094021913j)*x_ref[0] + ((0.730140642712-0.948998592822j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.254866769606-0.315484974347j)*x[0] + ((-0.519268122785-0.944887970617j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.254866769606-0.315484974347j)*x_ref[0] + ((-0.519268122785-0.944887970617j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.289894411649+0.167333610533j)*x[0] + ((-0.672259928831+0.0200470203575j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.289894411649+0.167333610533j)*x_ref[0] + ((-0.672259928831+0.0200470203575j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.206387586245+0.707921717594j)*x[0] + ((-0.855724186215+0.599673161791j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.206387586245+0.707921717594j)*x_ref[0] + ((-0.855724186215+0.599673161791j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.458331887841-0.572315983541j)*x[0] + ((-0.433109719452-0.176553445894j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.458331887841-0.572315983541j)*x_ref[0] + ((-0.433109719452-0.176553445894j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.227137141768-0.381679870857j)*x[0] + ((0.845596661208+0.388802418463j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.227137141768-0.381679870857j)*x_ref[0] + ((0.845596661208+0.388802418463j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.057005519234+0.610960348251j)*x[0] + ((0.686467926482+0.159612602357j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.057005519234+0.610960348251j)*x_ref[0] + ((0.686467926482+0.159612602357j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(0.770467283545-0.290551401376j)*x[0] + ((-0.880529351495+0.836894496799j))*x[1]
+        ref[(1, 0, 1, 3)]=(0.770467283545-0.290551401376j)*x_ref[0] + ((-0.880529351495+0.836894496799j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.813813722086-0.138567605127j)*x[0] + ((0.76761137152-0.605782601267j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.813813722086-0.138567605127j)*x_ref[0] + ((0.76761137152-0.605782601267j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.0325525659166+0.46400763509j)*x[0] + ((-0.698211747245-0.754961382155j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.0325525659166+0.46400763509j)*x_ref[0] + ((-0.698211747245-0.754961382155j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.863176724816+0.407877262745j)*x[0] + ((0.9351733353-0.00317999702669j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.863176724816+0.407877262745j)*x_ref[0] + ((0.9351733353-0.00317999702669j))*x_ref[1]
+        arg[(1, 0, 2, 3)]=(0.0364958582067+0.536965943077j)*x[0] + ((-0.811309048736+0.927575478093j))*x[1]
+        ref[(1, 0, 2, 3)]=(0.0364958582067+0.536965943077j)*x_ref[0] + ((-0.811309048736+0.927575478093j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.897020640839-0.317920846559j)*x[0] + ((-0.373458307153-0.804676567557j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.897020640839-0.317920846559j)*x_ref[0] + ((-0.373458307153-0.804676567557j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.428492872267+0.200640909199j)*x[0] + ((0.953649026397+0.444676558884j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.428492872267+0.200640909199j)*x_ref[0] + ((0.953649026397+0.444676558884j))*x_ref[1]
+        arg[(1, 0, 3, 2)]=(-0.287479028391-0.625428409947j)*x[0] + ((-0.907936309919-0.00798646010879j))*x[1]
+        ref[(1, 0, 3, 2)]=(-0.287479028391-0.625428409947j)*x_ref[0] + ((-0.907936309919-0.00798646010879j))*x_ref[1]
+        arg[(1, 0, 3, 3)]=(0.764710447975+0.954111601611j)*x[0] + ((0.822455070628-0.455851098887j))*x[1]
+        ref[(1, 0, 3, 3)]=(0.764710447975+0.954111601611j)*x_ref[0] + ((0.822455070628-0.455851098887j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.569301013891+0.183838668993j)*x[0] + ((0.2063738691+0.0127520959793j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.569301013891+0.183838668993j)*x_ref[0] + ((0.2063738691+0.0127520959793j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.709510247795+0.510195720342j)*x[0] + ((-0.0736234427527+0.497438871084j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.709510247795+0.510195720342j)*x_ref[0] + ((-0.0736234427527+0.497438871084j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.0122623626754-0.379771969208j)*x[0] + ((-0.708275799859+0.72999242485j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.0122623626754-0.379771969208j)*x_ref[0] + ((-0.708275799859+0.72999242485j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.598450631871-0.814035202562j)*x[0] + ((0.034187294819+0.0245102680466j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.598450631871-0.814035202562j)*x_ref[0] + ((0.034187294819+0.0245102680466j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.025335725084-0.0123202694237j)*x[0] + ((0.697512243564-0.905190748668j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.025335725084-0.0123202694237j)*x_ref[0] + ((0.697512243564-0.905190748668j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.791593680776-0.276755285782j)*x[0] + ((0.48585039998+0.187604252672j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.791593680776-0.276755285782j)*x_ref[0] + ((0.48585039998+0.187604252672j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.104053941681+0.491272246935j)*x[0] + ((-0.548255467495+0.832724573371j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.104053941681+0.491272246935j)*x_ref[0] + ((-0.548255467495+0.832724573371j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.922144478476-0.902737675299j)*x[0] + ((0.062161215744-0.81949073255j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.922144478476-0.902737675299j)*x_ref[0] + ((0.062161215744-0.81949073255j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.23790615432+0.181568478168j)*x[0] + ((0.783862815764+0.330962033422j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.23790615432+0.181568478168j)*x_ref[0] + ((0.783862815764+0.330962033422j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.89124113109+0.250213719951j)*x[0] + ((-0.985768738609+0.162158142469j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.89124113109+0.250213719951j)*x_ref[0] + ((-0.985768738609+0.162158142469j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.963410029993+0.252323774734j)*x[0] + ((0.824336328656+0.303552968738j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.963410029993+0.252323774734j)*x_ref[0] + ((0.824336328656+0.303552968738j))*x_ref[1]
+        arg[(1, 1, 2, 3)]=(0.759890786939+0.272818361164j)*x[0] + ((-0.558978566311+0.343911198816j))*x[1]
+        ref[(1, 1, 2, 3)]=(0.759890786939+0.272818361164j)*x_ref[0] + ((-0.558978566311+0.343911198816j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(0.703866854473-0.0459433492647j)*x[0] + ((0.672637583524+0.54493001903j))*x[1]
+        ref[(1, 1, 3, 0)]=(0.703866854473-0.0459433492647j)*x_ref[0] + ((0.672637583524+0.54493001903j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.61423626411+0.0983613486092j)*x[0] + ((0.698688879283+0.602569828329j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.61423626411+0.0983613486092j)*x_ref[0] + ((0.698688879283+0.602569828329j))*x_ref[1]
+        arg[(1, 1, 3, 2)]=(0.15688665455-0.823583274309j)*x[0] + ((0.933154153205-0.901521457118j))*x[1]
+        ref[(1, 1, 3, 2)]=(0.15688665455-0.823583274309j)*x_ref[0] + ((0.933154153205-0.901521457118j))*x_ref[1]
+        arg[(1, 1, 3, 3)]=(0.511540583433-0.328291088461j)*x[0] + ((-0.736116831806+0.417225318913j))*x[1]
+        ref[(1, 1, 3, 3)]=(0.511540583433-0.328291088461j)*x_ref[0] + ((-0.736116831806+0.417225318913j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.373932184784-0.269129093299j)*x[0] + ((0.238837675903-0.877387557108j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.373932184784-0.269129093299j)*x_ref[0] + ((0.238837675903-0.877387557108j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.593526317187-0.0240630857317j)*x[0] + ((0.573907210605-0.189558519618j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.593526317187-0.0240630857317j)*x_ref[0] + ((0.573907210605-0.189558519618j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.505469653859-0.950817241589j)*x[0] + ((-0.0434582084242+0.807674276059j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.505469653859-0.950817241589j)*x_ref[0] + ((-0.0434582084242+0.807674276059j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(-0.48547984723-0.85800738835j)*x[0] + ((-0.02435641287-0.314256224594j))*x[1]
+        ref[(1, 2, 0, 3)]=(-0.48547984723-0.85800738835j)*x_ref[0] + ((-0.02435641287-0.314256224594j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.818937457705+0.943534714046j)*x[0] + ((0.205809629842-0.711639831726j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.818937457705+0.943534714046j)*x_ref[0] + ((0.205809629842-0.711639831726j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.987136055347-0.0212247849042j)*x[0] + ((0.529196297653+0.33770496929j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.987136055347-0.0212247849042j)*x_ref[0] + ((0.529196297653+0.33770496929j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(0.0630048552348+0.264723537738j)*x[0] + ((0.0855290124628+0.836424290276j))*x[1]
+        ref[(1, 2, 1, 2)]=(0.0630048552348+0.264723537738j)*x_ref[0] + ((0.0855290124628+0.836424290276j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(-0.49738033635-0.63492183915j)*x[0] + ((0.982142153542-0.585170449274j))*x[1]
+        ref[(1, 2, 1, 3)]=(-0.49738033635-0.63492183915j)*x_ref[0] + ((0.982142153542-0.585170449274j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.418112845142+0.383555105099j)*x[0] + ((0.971311424648+0.750244032449j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.418112845142+0.383555105099j)*x_ref[0] + ((0.971311424648+0.750244032449j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.133479124607-0.923087242631j)*x[0] + ((-0.275309408266+0.0395507379918j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.133479124607-0.923087242631j)*x_ref[0] + ((-0.275309408266+0.0395507379918j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(-0.319033927438-0.128740116505j)*x[0] + ((-0.264292232014+0.0588550981287j))*x[1]
+        ref[(1, 2, 2, 2)]=(-0.319033927438-0.128740116505j)*x_ref[0] + ((-0.264292232014+0.0588550981287j))*x_ref[1]
+        arg[(1, 2, 2, 3)]=(-0.419451930328+0.920552641782j)*x[0] + ((-0.668472702852-0.257593229651j))*x[1]
+        ref[(1, 2, 2, 3)]=(-0.419451930328+0.920552641782j)*x_ref[0] + ((-0.668472702852-0.257593229651j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(0.0381335836439-0.497156485128j)*x[0] + ((-0.929039843392+0.171470762583j))*x[1]
+        ref[(1, 2, 3, 0)]=(0.0381335836439-0.497156485128j)*x_ref[0] + ((-0.929039843392+0.171470762583j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(0.410042397298-0.105627587517j)*x[0] + ((0.411274467312+0.502159919713j))*x[1]
+        ref[(1, 2, 3, 1)]=(0.410042397298-0.105627587517j)*x_ref[0] + ((0.411274467312+0.502159919713j))*x_ref[1]
+        arg[(1, 2, 3, 2)]=(-0.881309332638-0.958620853317j)*x[0] + ((0.965088173348+0.503109712726j))*x[1]
+        ref[(1, 2, 3, 2)]=(-0.881309332638-0.958620853317j)*x_ref[0] + ((0.965088173348+0.503109712726j))*x_ref[1]
+        arg[(1, 2, 3, 3)]=(0.325676112212-0.447260066467j)*x[0] + ((0.766601810897-0.0345880587188j))*x[1]
+        ref[(1, 2, 3, 3)]=(0.325676112212-0.447260066467j)*x_ref[0] + ((0.766601810897-0.0345880587188j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.735474404597-0.627640649938j)*x[0] + ((-0.60355947123+0.103276018301j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.735474404597-0.627640649938j)*x_ref[0] + ((-0.60355947123+0.103276018301j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.98285902162+0.382831352941j)*x[0] + ((0.239280999106+0.0368077104788j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.98285902162+0.382831352941j)*x_ref[0] + ((0.239280999106+0.0368077104788j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(-0.885283429353+0.903101005056j)*x[0] + ((-8.18529433413e-05-0.248635489729j))*x[1]
+        ref[(2, 0, 0, 2)]=(-0.885283429353+0.903101005056j)*x_ref[0] + ((-8.18529433413e-05-0.248635489729j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.0673468995256-0.977169547577j)*x[0] + ((-0.662423284387+0.550090598821j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.0673468995256-0.977169547577j)*x_ref[0] + ((-0.662423284387+0.550090598821j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.946778322469+0.402540516609j)*x[0] + ((-0.19237256003-0.0273649534586j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.946778322469+0.402540516609j)*x_ref[0] + ((-0.19237256003-0.0273649534586j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.17050498153+0.754046703236j)*x[0] + ((-0.503338738911-0.436278917781j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.17050498153+0.754046703236j)*x_ref[0] + ((-0.503338738911-0.436278917781j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.294897790892+0.490383837004j)*x[0] + ((-0.156201705548-0.984315462887j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.294897790892+0.490383837004j)*x_ref[0] + ((-0.156201705548-0.984315462887j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(0.0544066420349+0.951193491229j)*x[0] + ((0.349334979013+0.97612649816j))*x[1]
+        ref[(2, 0, 1, 3)]=(0.0544066420349+0.951193491229j)*x_ref[0] + ((0.349334979013+0.97612649816j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(0.606504597607+0.76751426138j)*x[0] + ((0.00464227825875+0.166535837612j))*x[1]
+        ref[(2, 0, 2, 0)]=(0.606504597607+0.76751426138j)*x_ref[0] + ((0.00464227825875+0.166535837612j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.273662270481+0.740854179316j)*x[0] + ((-0.558517822737-0.554222958987j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.273662270481+0.740854179316j)*x_ref[0] + ((-0.558517822737-0.554222958987j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(0.93941629074-0.620913828581j)*x[0] + ((-0.935712467673-0.311250862183j))*x[1]
+        ref[(2, 0, 2, 2)]=(0.93941629074-0.620913828581j)*x_ref[0] + ((-0.935712467673-0.311250862183j))*x_ref[1]
+        arg[(2, 0, 2, 3)]=(-0.588533934225-0.508424901542j)*x[0] + ((-0.424007049548-0.18669388246j))*x[1]
+        ref[(2, 0, 2, 3)]=(-0.588533934225-0.508424901542j)*x_ref[0] + ((-0.424007049548-0.18669388246j))*x_ref[1]
+        arg[(2, 0, 3, 0)]=(0.408685593951+0.517036278245j)*x[0] + ((0.151503500874-0.731122726207j))*x[1]
+        ref[(2, 0, 3, 0)]=(0.408685593951+0.517036278245j)*x_ref[0] + ((0.151503500874-0.731122726207j))*x_ref[1]
+        arg[(2, 0, 3, 1)]=(0.999514529399-0.128843664134j)*x[0] + ((0.28550650218-0.681887238765j))*x[1]
+        ref[(2, 0, 3, 1)]=(0.999514529399-0.128843664134j)*x_ref[0] + ((0.28550650218-0.681887238765j))*x_ref[1]
+        arg[(2, 0, 3, 2)]=(-0.31653397804-0.716752452693j)*x[0] + ((0.547449396454+0.364767904069j))*x[1]
+        ref[(2, 0, 3, 2)]=(-0.31653397804-0.716752452693j)*x_ref[0] + ((0.547449396454+0.364767904069j))*x_ref[1]
+        arg[(2, 0, 3, 3)]=(-0.871449402207+0.263645811061j)*x[0] + ((-0.865829502819+0.871238084257j))*x[1]
+        ref[(2, 0, 3, 3)]=(-0.871449402207+0.263645811061j)*x_ref[0] + ((-0.865829502819+0.871238084257j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.980343745813+0.727833805059j)*x[0] + ((0.356222678105+0.92577102264j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.980343745813+0.727833805059j)*x_ref[0] + ((0.356222678105+0.92577102264j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.339011542219-0.901208320509j)*x[0] + ((-0.669770043416+0.344584086262j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.339011542219-0.901208320509j)*x_ref[0] + ((-0.669770043416+0.344584086262j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.719664578621+0.208266951948j)*x[0] + ((0.774556148163-0.251590350409j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.719664578621+0.208266951948j)*x_ref[0] + ((0.774556148163-0.251590350409j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.0962773550774+0.5350323185j)*x[0] + ((-0.427709957449-0.364221434632j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.0962773550774+0.5350323185j)*x_ref[0] + ((-0.427709957449-0.364221434632j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.470050646539-0.838215356692j)*x[0] + ((0.541896086051-0.120158957837j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.470050646539-0.838215356692j)*x_ref[0] + ((0.541896086051-0.120158957837j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.551339976303-0.848835426897j)*x[0] + ((0.196106410852-0.360385086049j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.551339976303-0.848835426897j)*x_ref[0] + ((0.196106410852-0.360385086049j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.251423492417+0.815353672561j)*x[0] + ((-0.635991865786-0.758822982164j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.251423492417+0.815353672561j)*x_ref[0] + ((-0.635991865786-0.758822982164j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(0.479707229485-0.88330000536j)*x[0] + ((0.00017921229431-0.663425699985j))*x[1]
+        ref[(2, 1, 1, 3)]=(0.479707229485-0.88330000536j)*x_ref[0] + ((0.00017921229431-0.663425699985j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.592026691834-0.323985876488j)*x[0] + ((-0.185321047742+0.38901855475j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.592026691834-0.323985876488j)*x_ref[0] + ((-0.185321047742+0.38901855475j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(0.34847474333+0.940908713299j)*x[0] + ((0.1248524293-0.887498446192j))*x[1]
+        ref[(2, 1, 2, 1)]=(0.34847474333+0.940908713299j)*x_ref[0] + ((0.1248524293-0.887498446192j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(-0.537257612257-0.709806003453j)*x[0] + ((-0.0823623293892+0.0122632208208j))*x[1]
+        ref[(2, 1, 2, 2)]=(-0.537257612257-0.709806003453j)*x_ref[0] + ((-0.0823623293892+0.0122632208208j))*x_ref[1]
+        arg[(2, 1, 2, 3)]=(-0.220773061393+0.957244020551j)*x[0] + ((0.51134687851-0.0670734506203j))*x[1]
+        ref[(2, 1, 2, 3)]=(-0.220773061393+0.957244020551j)*x_ref[0] + ((0.51134687851-0.0670734506203j))*x_ref[1]
+        arg[(2, 1, 3, 0)]=(0.0951107043888+0.539891221352j)*x[0] + ((0.827673226794-0.206065986249j))*x[1]
+        ref[(2, 1, 3, 0)]=(0.0951107043888+0.539891221352j)*x_ref[0] + ((0.827673226794-0.206065986249j))*x_ref[1]
+        arg[(2, 1, 3, 1)]=(-0.822585994588+0.909367506589j)*x[0] + ((-0.881149145277-0.785831318914j))*x[1]
+        ref[(2, 1, 3, 1)]=(-0.822585994588+0.909367506589j)*x_ref[0] + ((-0.881149145277-0.785831318914j))*x_ref[1]
+        arg[(2, 1, 3, 2)]=(0.972481085599+0.269225019762j)*x[0] + ((-0.323458184462+0.510988460759j))*x[1]
+        ref[(2, 1, 3, 2)]=(0.972481085599+0.269225019762j)*x_ref[0] + ((-0.323458184462+0.510988460759j))*x_ref[1]
+        arg[(2, 1, 3, 3)]=(-0.49700542416+0.0934627919805j)*x[0] + ((-0.216661636791+0.217509916585j))*x[1]
+        ref[(2, 1, 3, 3)]=(-0.49700542416+0.0934627919805j)*x_ref[0] + ((-0.216661636791+0.217509916585j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(-0.997645731976+0.251047443627j)*x[0] + ((0.661593651216+0.129986742414j))*x[1]
+        ref[(2, 2, 0, 0)]=(-0.997645731976+0.251047443627j)*x_ref[0] + ((0.661593651216+0.129986742414j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.0946725986346-0.0808654079043j)*x[0] + ((-0.840454879167-0.456063796456j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.0946725986346-0.0808654079043j)*x_ref[0] + ((-0.840454879167-0.456063796456j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(0.856252085172+0.452811165664j)*x[0] + ((-0.938081966749+0.855157873435j))*x[1]
+        ref[(2, 2, 0, 2)]=(0.856252085172+0.452811165664j)*x_ref[0] + ((-0.938081966749+0.855157873435j))*x_ref[1]
+        arg[(2, 2, 0, 3)]=(-0.278785997818+0.695340385278j)*x[0] + ((-0.55116946632-0.389251346924j))*x[1]
+        ref[(2, 2, 0, 3)]=(-0.278785997818+0.695340385278j)*x_ref[0] + ((-0.55116946632-0.389251346924j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.654313924646-0.109993625358j)*x[0] + ((-0.023033071988+0.39749121838j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.654313924646-0.109993625358j)*x_ref[0] + ((-0.023033071988+0.39749121838j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.396379688061+0.835899769589j)*x[0] + ((0.422830246359+0.995815749625j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.396379688061+0.835899769589j)*x_ref[0] + ((0.422830246359+0.995815749625j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(-0.262726261265-0.763907545309j)*x[0] + ((-0.98668559088+0.494038587804j))*x[1]
+        ref[(2, 2, 1, 2)]=(-0.262726261265-0.763907545309j)*x_ref[0] + ((-0.98668559088+0.494038587804j))*x_ref[1]
+        arg[(2, 2, 1, 3)]=(0.731993270734+0.347473946685j)*x[0] + ((0.561472240334+0.246096105641j))*x[1]
+        ref[(2, 2, 1, 3)]=(0.731993270734+0.347473946685j)*x_ref[0] + ((0.561472240334+0.246096105641j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(0.348748493441-0.92380462857j)*x[0] + ((0.811378842335+0.149013965165j))*x[1]
+        ref[(2, 2, 2, 0)]=(0.348748493441-0.92380462857j)*x_ref[0] + ((0.811378842335+0.149013965165j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(-0.280660518557+0.892577187348j)*x[0] + ((0.801013751239+0.798435210112j))*x[1]
+        ref[(2, 2, 2, 1)]=(-0.280660518557+0.892577187348j)*x_ref[0] + ((0.801013751239+0.798435210112j))*x_ref[1]
+        arg[(2, 2, 2, 2)]=(-0.460719706527+0.927587337043j)*x[0] + ((0.458534893225-0.335556831893j))*x[1]
+        ref[(2, 2, 2, 2)]=(-0.460719706527+0.927587337043j)*x_ref[0] + ((0.458534893225-0.335556831893j))*x_ref[1]
+        arg[(2, 2, 2, 3)]=(-0.156479115209-0.236164004708j)*x[0] + ((-0.808898414235-0.751628485309j))*x[1]
+        ref[(2, 2, 2, 3)]=(-0.156479115209-0.236164004708j)*x_ref[0] + ((-0.808898414235-0.751628485309j))*x_ref[1]
+        arg[(2, 2, 3, 0)]=(-0.0731770046143+0.15444069855j)*x[0] + ((0.924041126287+0.479834908712j))*x[1]
+        ref[(2, 2, 3, 0)]=(-0.0731770046143+0.15444069855j)*x_ref[0] + ((0.924041126287+0.479834908712j))*x_ref[1]
+        arg[(2, 2, 3, 1)]=(0.758161487044-0.594641526428j)*x[0] + ((0.0890721658528-0.529305243802j))*x[1]
+        ref[(2, 2, 3, 1)]=(0.758161487044-0.594641526428j)*x_ref[0] + ((0.0890721658528-0.529305243802j))*x_ref[1]
+        arg[(2, 2, 3, 2)]=(-0.931955464664-0.547843767513j)*x[0] + ((0.254616010899+0.762205305109j))*x[1]
+        ref[(2, 2, 3, 2)]=(-0.931955464664-0.547843767513j)*x_ref[0] + ((0.254616010899+0.762205305109j))*x_ref[1]
+        arg[(2, 2, 3, 3)]=(0.238418738588+0.797653465701j)*x[0] + ((0.709876405878-0.0900054803859j))*x[1]
+        ref[(2, 2, 3, 3)]=(0.238418738588+0.797653465701j)*x_ref[0] + ((0.709876405878-0.0900054803859j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.470642599779-0.0659889627355j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.470642599779-0.0659889627355j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.571887828428+0.844920938646j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.571887828428+0.844920938646j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.939567753148+0.0312213243843j)*x[2]
+            ref[(0, 0, 0, 2)]+=(0.939567753148+0.0312213243843j)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(-0.396775015264-0.530750182523j)*x[2]
+            ref[(0, 0, 0, 3)]+=(-0.396775015264-0.530750182523j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.303946916594-0.0768252984491j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.303946916594-0.0768252984491j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.534994164019-0.156084045567j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.534994164019-0.156084045567j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.251722333739+0.794307212376j)*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.251722333739+0.794307212376j)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(-0.05983759996+0.579098032013j)*x[2]
+            ref[(0, 0, 1, 3)]+=(-0.05983759996+0.579098032013j)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.82089014936+0.644024865359j)*x[2]
+            ref[(0, 0, 2, 0)]+=(0.82089014936+0.644024865359j)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.0611864218439+0.51127677276j)*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.0611864218439+0.51127677276j)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(0.871576310982-0.0353451062158j)*x[2]
+            ref[(0, 0, 2, 2)]+=(0.871576310982-0.0353451062158j)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=(0.477731913848+0.582105376886j)*x[2]
+            ref[(0, 0, 2, 3)]+=(0.477731913848+0.582105376886j)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(-0.503315972548+0.869153746948j)*x[2]
+            ref[(0, 0, 3, 0)]+=(-0.503315972548+0.869153746948j)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(0.918727058328-0.190067142695j)*x[2]
+            ref[(0, 0, 3, 1)]+=(0.918727058328-0.190067142695j)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=(0.906247649404+0.449557182549j)*x[2]
+            ref[(0, 0, 3, 2)]+=(0.906247649404+0.449557182549j)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=(-0.943836046033+0.767515530667j)*x[2]
+            ref[(0, 0, 3, 3)]+=(-0.943836046033+0.767515530667j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.860634680747+0.146848800239j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.860634680747+0.146848800239j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.126844361951+0.215962785234j)*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.126844361951+0.215962785234j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.424917682775+0.920981086791j)*x[2]
+            ref[(0, 1, 0, 2)]+=(0.424917682775+0.920981086791j)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.952687309351-0.694311438117j)*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.952687309351-0.694311438117j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.0994963640464-0.857954963399j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.0994963640464-0.857954963399j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.278333070739-0.746440880404j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.278333070739-0.746440880404j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.0968309548139+0.743084064028j)*x[2]
+            ref[(0, 1, 1, 2)]+=(0.0968309548139+0.743084064028j)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.652415415736+0.410558062845j)*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.652415415736+0.410558062845j)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.25996627249+0.251920103253j)*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.25996627249+0.251920103253j)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.925887225406+0.0325631166924j)*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.925887225406+0.0325631166924j)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(0.949792291023+0.826372064499j)*x[2]
+            ref[(0, 1, 2, 2)]+=(0.949792291023+0.826372064499j)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=(-0.517208316673-0.626658249836j)*x[2]
+            ref[(0, 1, 2, 3)]+=(-0.517208316673-0.626658249836j)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(-0.736740575588-0.970593307655j)*x[2]
+            ref[(0, 1, 3, 0)]+=(-0.736740575588-0.970593307655j)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(-0.195157740807+0.908561131604j)*x[2]
+            ref[(0, 1, 3, 1)]+=(-0.195157740807+0.908561131604j)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=(0.331728629656-0.694875378672j)*x[2]
+            ref[(0, 1, 3, 2)]+=(0.331728629656-0.694875378672j)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=(0.721061588711-0.930983642067j)*x[2]
+            ref[(0, 1, 3, 3)]+=(0.721061588711-0.930983642067j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.0949018671343+0.310095294379j)*x[2]
+            ref[(0, 2, 0, 0)]+=(0.0949018671343+0.310095294379j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.0854217974543+0.234636943416j)*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.0854217974543+0.234636943416j)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(0.145585515301+0.313192680718j)*x[2]
+            ref[(0, 2, 0, 2)]+=(0.145585515301+0.313192680718j)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(0.0143769538201+0.902570440876j)*x[2]
+            ref[(0, 2, 0, 3)]+=(0.0143769538201+0.902570440876j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.0387093359588+0.868877971497j)*x[2]
+            ref[(0, 2, 1, 0)]+=(0.0387093359588+0.868877971497j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.469204912333+0.891177503428j)*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.469204912333+0.891177503428j)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.267614710388-0.443086248665j)*x[2]
+            ref[(0, 2, 1, 2)]+=(0.267614710388-0.443086248665j)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(0.988377496413-0.19364716585j)*x[2]
+            ref[(0, 2, 1, 3)]+=(0.988377496413-0.19364716585j)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.132776443782+0.947644604589j)*x[2]
+            ref[(0, 2, 2, 0)]+=(0.132776443782+0.947644604589j)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.890237809924-0.698537244542j)*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.890237809924-0.698537244542j)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.364432239398-0.392327428696j)*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.364432239398-0.392327428696j)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=(-0.954195528903+0.598846200262j)*x[2]
+            ref[(0, 2, 2, 3)]+=(-0.954195528903+0.598846200262j)*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(-0.177366971864-0.312467358791j)*x[2]
+            ref[(0, 2, 3, 0)]+=(-0.177366971864-0.312467358791j)*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(0.542471603591-0.5231881612j)*x[2]
+            ref[(0, 2, 3, 1)]+=(0.542471603591-0.5231881612j)*x_ref[2]
+            arg[(0, 2, 3, 2)]+=(0.0203038898932+0.421119435822j)*x[2]
+            ref[(0, 2, 3, 2)]+=(0.0203038898932+0.421119435822j)*x_ref[2]
+            arg[(0, 2, 3, 3)]+=(-0.595784960208+0.915194965013j)*x[2]
+            ref[(0, 2, 3, 3)]+=(-0.595784960208+0.915194965013j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.222632270764-0.563467834128j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.222632270764-0.563467834128j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.909494400291-0.742117771591j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.909494400291-0.742117771591j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.308431396216-0.938764300284j)*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.308431396216-0.938764300284j)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.659276946085-0.139300621501j)*x[2]
+            ref[(1, 0, 0, 3)]+=(0.659276946085-0.139300621501j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.980909337027+0.262063039865j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.980909337027+0.262063039865j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.882197826511+0.739784974972j)*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.882197826511+0.739784974972j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.426919975697+0.79790971166j)*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.426919975697+0.79790971166j)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.658756365173+0.64066929361j)*x[2]
+            ref[(1, 0, 1, 3)]+=(0.658756365173+0.64066929361j)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.0996215885307+0.938498609512j)*x[2]
+            ref[(1, 0, 2, 0)]+=(0.0996215885307+0.938498609512j)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.287976133213-0.719307877039j)*x[2]
+            ref[(1, 0, 2, 1)]+=(0.287976133213-0.719307877039j)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(-0.84043776452-0.0632307134j)*x[2]
+            ref[(1, 0, 2, 2)]+=(-0.84043776452-0.0632307134j)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=(-0.828080578764+0.881264074127j)*x[2]
+            ref[(1, 0, 2, 3)]+=(-0.828080578764+0.881264074127j)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(-0.787546417849+0.224842996281j)*x[2]
+            ref[(1, 0, 3, 0)]+=(-0.787546417849+0.224842996281j)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(0.909495935982+0.466454072695j)*x[2]
+            ref[(1, 0, 3, 1)]+=(0.909495935982+0.466454072695j)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=(0.238831859984-0.981159373348j)*x[2]
+            ref[(1, 0, 3, 2)]+=(0.238831859984-0.981159373348j)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=(0.353540387447+0.16926251322j)*x[2]
+            ref[(1, 0, 3, 3)]+=(0.353540387447+0.16926251322j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.743621474829+0.6476504688j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.743621474829+0.6476504688j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.374105966749-0.245763062j)*x[2]
+            ref[(1, 1, 0, 1)]+=(0.374105966749-0.245763062j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.962808165853+0.567518321707j)*x[2]
+            ref[(1, 1, 0, 2)]+=(0.962808165853+0.567518321707j)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(0.98258881665-0.744670210851j)*x[2]
+            ref[(1, 1, 0, 3)]+=(0.98258881665-0.744670210851j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.332828568947-0.740172304206j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.332828568947-0.740172304206j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.752318040224-0.24702881403j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.752318040224-0.24702881403j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.701076837388-0.312398064557j)*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.701076837388-0.312398064557j)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(0.0706338875798+0.714541206435j)*x[2]
+            ref[(1, 1, 1, 3)]+=(0.0706338875798+0.714541206435j)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.447102537981+0.850417833175j)*x[2]
+            ref[(1, 1, 2, 0)]+=(0.447102537981+0.850417833175j)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.385783654628+0.274503501708j)*x[2]
+            ref[(1, 1, 2, 1)]+=(0.385783654628+0.274503501708j)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.103750898168-0.992276606136j)*x[2]
+            ref[(1, 1, 2, 2)]+=(0.103750898168-0.992276606136j)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=(0.00201527794632+0.22272648764j)*x[2]
+            ref[(1, 1, 2, 3)]+=(0.00201527794632+0.22272648764j)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(-0.48469951814+0.305104651582j)*x[2]
+            ref[(1, 1, 3, 0)]+=(-0.48469951814+0.305104651582j)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(-0.760786257454-0.719517774775j)*x[2]
+            ref[(1, 1, 3, 1)]+=(-0.760786257454-0.719517774775j)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=(0.781851772208-0.490289050732j)*x[2]
+            ref[(1, 1, 3, 2)]+=(0.781851772208-0.490289050732j)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=(0.664654350393+0.087911706329j)*x[2]
+            ref[(1, 1, 3, 3)]+=(0.664654350393+0.087911706329j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.501586783326+0.614840202998j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.501586783326+0.614840202998j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.115126844046+0.596155797426j)*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.115126844046+0.596155797426j)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.705673503555-0.700691917276j)*x[2]
+            ref[(1, 2, 0, 2)]+=(0.705673503555-0.700691917276j)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.464704395203-0.942050807519j)*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.464704395203-0.942050807519j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.513373155787-0.507486736444j)*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.513373155787-0.507486736444j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.958869679942+0.269386914234j)*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.958869679942+0.269386914234j)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(-0.0883313572046-0.198150300047j)*x[2]
+            ref[(1, 2, 1, 2)]+=(-0.0883313572046-0.198150300047j)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(0.555176097099-0.017987711124j)*x[2]
+            ref[(1, 2, 1, 3)]+=(0.555176097099-0.017987711124j)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.708697465398+0.942784483886j)*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.708697465398+0.942784483886j)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(-0.365139598127+0.452352667292j)*x[2]
+            ref[(1, 2, 2, 1)]+=(-0.365139598127+0.452352667292j)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(0.54893882003-0.904503847607j)*x[2]
+            ref[(1, 2, 2, 2)]+=(0.54893882003-0.904503847607j)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=(0.737477625279+0.22682937281j)*x[2]
+            ref[(1, 2, 2, 3)]+=(0.737477625279+0.22682937281j)*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(-0.869757993024-0.521641883872j)*x[2]
+            ref[(1, 2, 3, 0)]+=(-0.869757993024-0.521641883872j)*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(-0.524285086952+0.812928461143j)*x[2]
+            ref[(1, 2, 3, 1)]+=(-0.524285086952+0.812928461143j)*x_ref[2]
+            arg[(1, 2, 3, 2)]+=(0.552379730657+0.100293619405j)*x[2]
+            ref[(1, 2, 3, 2)]+=(0.552379730657+0.100293619405j)*x_ref[2]
+            arg[(1, 2, 3, 3)]+=(-0.718095853524-0.66994935933j)*x[2]
+            ref[(1, 2, 3, 3)]+=(-0.718095853524-0.66994935933j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.866826670601-0.329334559252j)*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.866826670601-0.329334559252j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.880290140914-0.42052742391j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.880290140914-0.42052742391j)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.463412506784+0.944845733058j)*x[2]
+            ref[(2, 0, 0, 2)]+=(0.463412506784+0.944845733058j)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(-0.865309236354-0.541388707336j)*x[2]
+            ref[(2, 0, 0, 3)]+=(-0.865309236354-0.541388707336j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.936893411439+0.791143311597j)*x[2]
+            ref[(2, 0, 1, 0)]+=(0.936893411439+0.791143311597j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.103943038232-0.0744164048341j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.103943038232-0.0744164048341j)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(0.604832726428+0.225458179288j)*x[2]
+            ref[(2, 0, 1, 2)]+=(0.604832726428+0.225458179288j)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(-0.576819865951-0.0452254742107j)*x[2]
+            ref[(2, 0, 1, 3)]+=(-0.576819865951-0.0452254742107j)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.289671376368+0.274945843729j)*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.289671376368+0.274945843729j)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(-0.353595627734+0.515152756614j)*x[2]
+            ref[(2, 0, 2, 1)]+=(-0.353595627734+0.515152756614j)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(-0.224961765455-0.416350648193j)*x[2]
+            ref[(2, 0, 2, 2)]+=(-0.224961765455-0.416350648193j)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=(-0.005712160621-0.0255149001203j)*x[2]
+            ref[(2, 0, 2, 3)]+=(-0.005712160621-0.0255149001203j)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=(-0.671636671066+0.205439133064j)*x[2]
+            ref[(2, 0, 3, 0)]+=(-0.671636671066+0.205439133064j)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=(0.967476704176+0.876372674045j)*x[2]
+            ref[(2, 0, 3, 1)]+=(0.967476704176+0.876372674045j)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=(0.782632430003-0.845063132132j)*x[2]
+            ref[(2, 0, 3, 2)]+=(0.782632430003-0.845063132132j)*x_ref[2]
+            arg[(2, 0, 3, 3)]+=(0.945433896934-0.0178902631483j)*x[2]
+            ref[(2, 0, 3, 3)]+=(0.945433896934-0.0178902631483j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.584305069564+0.266698333609j)*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.584305069564+0.266698333609j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.631504850342+0.74092587259j)*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.631504850342+0.74092587259j)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(0.181687725207-0.2773039321j)*x[2]
+            ref[(2, 1, 0, 2)]+=(0.181687725207-0.2773039321j)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(-0.126153635475-0.892852809033j)*x[2]
+            ref[(2, 1, 0, 3)]+=(-0.126153635475-0.892852809033j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.899519772134+0.791523904342j)*x[2]
+            ref[(2, 1, 1, 0)]+=(0.899519772134+0.791523904342j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.329504595315+0.762503292013j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.329504595315+0.762503292013j)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.576358606852+0.328946703388j)*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.576358606852+0.328946703388j)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(-0.480622825248+0.74244278639j)*x[2]
+            ref[(2, 1, 1, 3)]+=(-0.480622825248+0.74244278639j)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.654602956736-0.158372643238j)*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.654602956736-0.158372643238j)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.788791425048-0.0484743096931j)*x[2]
+            ref[(2, 1, 2, 1)]+=(0.788791425048-0.0484743096931j)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(-0.155402716217-0.536334434154j)*x[2]
+            ref[(2, 1, 2, 2)]+=(-0.155402716217-0.536334434154j)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=(-0.240936800921+0.0195977776438j)*x[2]
+            ref[(2, 1, 2, 3)]+=(-0.240936800921+0.0195977776438j)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=(-0.172544858562-0.548972749649j)*x[2]
+            ref[(2, 1, 3, 0)]+=(-0.172544858562-0.548972749649j)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=(-0.956491060803-0.148931984153j)*x[2]
+            ref[(2, 1, 3, 1)]+=(-0.956491060803-0.148931984153j)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=(0.13062255458-0.778412192811j)*x[2]
+            ref[(2, 1, 3, 2)]+=(0.13062255458-0.778412192811j)*x_ref[2]
+            arg[(2, 1, 3, 3)]+=(0.824713641361+0.368551240628j)*x[2]
+            ref[(2, 1, 3, 3)]+=(0.824713641361+0.368551240628j)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.600798900105+0.406146410335j)*x[2]
+            ref[(2, 2, 0, 0)]+=(0.600798900105+0.406146410335j)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.247219446697+0.0420449507j)*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.247219446697+0.0420449507j)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(-0.813369723412+0.866662091775j)*x[2]
+            ref[(2, 2, 0, 2)]+=(-0.813369723412+0.866662091775j)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=(0.155537379001+0.918260342754j)*x[2]
+            ref[(2, 2, 0, 3)]+=(0.155537379001+0.918260342754j)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.195288462921-0.189366498194j)*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.195288462921-0.189366498194j)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.4708229981+0.0195626557346j)*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.4708229981+0.0195626557346j)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(-0.359132119442-0.113155272402j)*x[2]
+            ref[(2, 2, 1, 2)]+=(-0.359132119442-0.113155272402j)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=(-0.564012399465+0.927818693393j)*x[2]
+            ref[(2, 2, 1, 3)]+=(-0.564012399465+0.927818693393j)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(-0.661575133014+0.215663832156j)*x[2]
+            ref[(2, 2, 2, 0)]+=(-0.661575133014+0.215663832156j)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(-0.298110035679-0.298451768574j)*x[2]
+            ref[(2, 2, 2, 1)]+=(-0.298110035679-0.298451768574j)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=(0.79247636569-0.0836147377465j)*x[2]
+            ref[(2, 2, 2, 2)]+=(0.79247636569-0.0836147377465j)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=(0.606402430362-0.873313898169j)*x[2]
+            ref[(2, 2, 2, 3)]+=(0.606402430362-0.873313898169j)*x_ref[2]
+            arg[(2, 2, 3, 0)]+=(0.367822916683-0.768977690587j)*x[2]
+            ref[(2, 2, 3, 0)]+=(0.367822916683-0.768977690587j)*x_ref[2]
+            arg[(2, 2, 3, 1)]+=(-0.919596343336+0.167728399067j)*x[2]
+            ref[(2, 2, 3, 1)]+=(-0.919596343336+0.167728399067j)*x_ref[2]
+            arg[(2, 2, 3, 2)]+=(-0.324158394456-0.0345522278457j)*x[2]
+            ref[(2, 2, 3, 2)]+=(-0.324158394456-0.0345522278457j)*x_ref[2]
+            arg[(2, 2, 3, 3)]+=(-0.690979437362+0.341321118865j)*x[2]
+            ref[(2, 2, 3, 3)]+=(-0.690979437362+0.341321118865j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.795883870454+0.452628709205j)*x[0] + ((0.328137296043+0.115669612606j))*x[1]
+        ref=(-0.795883870454+0.452628709205j)*x_ref[0] + ((0.328137296043+0.115669612606j))*x_ref[1]
+        if dim==3:
+            arg+=((0.595624998921-0.510298575735j))*x[2]
+            ref+=((0.595624998921-0.510298575735j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.456612180793-0.444688880635j)*x[0] + ((-0.939204666686+0.110827276344j))*x[1]
+        ref[(0,)]=(0.456612180793-0.444688880635j)*x_ref[0] + ((-0.939204666686+0.110827276344j))*x_ref[1]
+        arg[(1,)]=(-0.958690337768-0.852206801482j)*x[0] + ((-0.00752454112142+0.330448082906j))*x[1]
+        ref[(1,)]=(-0.958690337768-0.852206801482j)*x_ref[0] + ((-0.00752454112142+0.330448082906j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.0183028517792-0.0661922692878j)*x[2]
+            ref[(0,)]+=(-0.0183028517792-0.0661922692878j)*x_ref[2]
+            arg[(1,)]+=(-0.901969856681+0.437345813412j)*x[2]
+            ref[(1,)]+=(-0.901969856681+0.437345813412j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3),w_ref)
+        arg[(0, 0)]=(0.370685789206+0.37845139266j)*x[0] + ((0.327084918505-0.24750665582j))*x[1]
+        ref[(0, 0)]=(0.370685789206+0.37845139266j)*x_ref[0] + ((0.327084918505-0.24750665582j))*x_ref[1]
+        arg[(0, 1)]=(-0.278174341343+0.371481494743j)*x[0] + ((-0.143398547819+0.996836080842j))*x[1]
+        ref[(0, 1)]=(-0.278174341343+0.371481494743j)*x_ref[0] + ((-0.143398547819+0.996836080842j))*x_ref[1]
+        arg[(0, 2)]=(0.883687906965+0.449014438575j)*x[0] + ((-0.501750429249-0.446886685484j))*x[1]
+        ref[(0, 2)]=(0.883687906965+0.449014438575j)*x_ref[0] + ((-0.501750429249-0.446886685484j))*x_ref[1]
+        arg[(1, 0)]=(-0.828362528192-0.495066732496j)*x[0] + ((0.244641406808+0.196154122795j))*x[1]
+        ref[(1, 0)]=(-0.828362528192-0.495066732496j)*x_ref[0] + ((0.244641406808+0.196154122795j))*x_ref[1]
+        arg[(1, 1)]=(-0.141312019783+0.513754368965j)*x[0] + ((0.392387852823-0.203658898097j))*x[1]
+        ref[(1, 1)]=(-0.141312019783+0.513754368965j)*x_ref[0] + ((0.392387852823-0.203658898097j))*x_ref[1]
+        arg[(1, 2)]=(-0.882723824934-0.410675076709j)*x[0] + ((-0.982583526906+0.235964866764j))*x[1]
+        ref[(1, 2)]=(-0.882723824934-0.410675076709j)*x_ref[0] + ((-0.982583526906+0.235964866764j))*x_ref[1]
+        arg[(2, 0)]=(-0.225180635869+0.861936854971j)*x[0] + ((0.517543453491+0.383939255663j))*x[1]
+        ref[(2, 0)]=(-0.225180635869+0.861936854971j)*x_ref[0] + ((0.517543453491+0.383939255663j))*x_ref[1]
+        arg[(2, 1)]=(0.807374582257-0.97768570388j)*x[0] + ((0.361761213864-0.993703079041j))*x[1]
+        ref[(2, 1)]=(0.807374582257-0.97768570388j)*x_ref[0] + ((0.361761213864-0.993703079041j))*x_ref[1]
+        arg[(2, 2)]=(-0.367089989715+0.665146592781j)*x[0] + ((0.743060787819+0.312073093982j))*x[1]
+        ref[(2, 2)]=(-0.367089989715+0.665146592781j)*x_ref[0] + ((0.743060787819+0.312073093982j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.115797500607+0.526693885781j)*x[2]
+            ref[(0, 0)]+=(0.115797500607+0.526693885781j)*x_ref[2]
+            arg[(0, 1)]+=(-0.771143366695+0.456391541418j)*x[2]
+            ref[(0, 1)]+=(-0.771143366695+0.456391541418j)*x_ref[2]
+            arg[(0, 2)]+=(-0.0364636557826+0.841392987704j)*x[2]
+            ref[(0, 2)]+=(-0.0364636557826+0.841392987704j)*x_ref[2]
+            arg[(1, 0)]+=(0.322742379622-0.64438148516j)*x[2]
+            ref[(1, 0)]+=(0.322742379622-0.64438148516j)*x_ref[2]
+            arg[(1, 1)]+=(0.4065000133-0.797538461014j)*x[2]
+            ref[(1, 1)]+=(0.4065000133-0.797538461014j)*x_ref[2]
+            arg[(1, 2)]+=(0.944928964143-0.561239709477j)*x[2]
+            ref[(1, 2)]+=(0.944928964143-0.561239709477j)*x_ref[2]
+            arg[(2, 0)]+=(0.520038663207+0.195517531274j)*x[2]
+            ref[(2, 0)]+=(0.520038663207+0.195517531274j)*x_ref[2]
+            arg[(2, 1)]+=(0.290825285266-0.954471067848j)*x[2]
+            ref[(2, 1)]+=(0.290825285266-0.954471067848j)*x_ref[2]
+            arg[(2, 2)]+=(0.134768772744+0.914672898339j)*x[2]
+            ref[(2, 2)]+=(0.134768772744+0.914672898339j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3),w)
+        ref = Data(0,(2, 4, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.800885000513-0.723467008889j)*x[0] + ((0.63001606392+0.140240455371j))*x[1]
+        ref[(0, 0, 0)]=(-0.800885000513-0.723467008889j)*x_ref[0] + ((0.63001606392+0.140240455371j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.749357501776+0.0132566546659j)*x[0] + ((-0.260462033196-0.837875392457j))*x[1]
+        ref[(0, 0, 1)]=(-0.749357501776+0.0132566546659j)*x_ref[0] + ((-0.260462033196-0.837875392457j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.102521511045-0.64759347722j)*x[0] + ((-0.279286003437+0.471559727983j))*x[1]
+        ref[(0, 0, 2)]=(-0.102521511045-0.64759347722j)*x_ref[0] + ((-0.279286003437+0.471559727983j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.891187643916+0.783891509462j)*x[0] + ((-0.890488819635+0.473257631096j))*x[1]
+        ref[(0, 1, 0)]=(0.891187643916+0.783891509462j)*x_ref[0] + ((-0.890488819635+0.473257631096j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.525781136808+0.00984582818403j)*x[0] + ((-0.072356511506+0.404754063855j))*x[1]
+        ref[(0, 1, 1)]=(-0.525781136808+0.00984582818403j)*x_ref[0] + ((-0.072356511506+0.404754063855j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.180519179664-0.251260642191j)*x[0] + ((0.237551366383+0.139892863665j))*x[1]
+        ref[(0, 1, 2)]=(0.180519179664-0.251260642191j)*x_ref[0] + ((0.237551366383+0.139892863665j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.459328562632+0.135923416067j)*x[0] + ((0.768496402282-0.516999571456j))*x[1]
+        ref[(0, 2, 0)]=(-0.459328562632+0.135923416067j)*x_ref[0] + ((0.768496402282-0.516999571456j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.511386519054+0.742969361662j)*x[0] + ((-0.400480410784-0.156560045139j))*x[1]
+        ref[(0, 2, 1)]=(0.511386519054+0.742969361662j)*x_ref[0] + ((-0.400480410784-0.156560045139j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.320739877027-0.927002694343j)*x[0] + ((0.308253316432+0.513834338062j))*x[1]
+        ref[(0, 2, 2)]=(-0.320739877027-0.927002694343j)*x_ref[0] + ((0.308253316432+0.513834338062j))*x_ref[1]
+        arg[(0, 3, 0)]=(0.194130105552+0.971550743664j)*x[0] + ((0.496913952252+0.602685198747j))*x[1]
+        ref[(0, 3, 0)]=(0.194130105552+0.971550743664j)*x_ref[0] + ((0.496913952252+0.602685198747j))*x_ref[1]
+        arg[(0, 3, 1)]=(0.0943485394212+0.0721394722683j)*x[0] + ((0.772591063618-0.393838984291j))*x[1]
+        ref[(0, 3, 1)]=(0.0943485394212+0.0721394722683j)*x_ref[0] + ((0.772591063618-0.393838984291j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.543817013456+0.614275919352j)*x[0] + ((0.0920277943552+0.315104677922j))*x[1]
+        ref[(0, 3, 2)]=(0.543817013456+0.614275919352j)*x_ref[0] + ((0.0920277943552+0.315104677922j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.626949482653-0.676481002891j)*x[0] + ((0.337318644333+0.278278437488j))*x[1]
+        ref[(1, 0, 0)]=(-0.626949482653-0.676481002891j)*x_ref[0] + ((0.337318644333+0.278278437488j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.288525082679-0.787037682491j)*x[0] + ((-0.541370508022+0.982049660904j))*x[1]
+        ref[(1, 0, 1)]=(-0.288525082679-0.787037682491j)*x_ref[0] + ((-0.541370508022+0.982049660904j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.582142256218+0.0599773725086j)*x[0] + ((0.73051792889-0.745498073563j))*x[1]
+        ref[(1, 0, 2)]=(0.582142256218+0.0599773725086j)*x_ref[0] + ((0.73051792889-0.745498073563j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.641819606018+0.359942545368j)*x[0] + ((-0.456546662904-0.886637380399j))*x[1]
+        ref[(1, 1, 0)]=(-0.641819606018+0.359942545368j)*x_ref[0] + ((-0.456546662904-0.886637380399j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.456001881901+0.533244950906j)*x[0] + ((-0.93372951835-0.0671452303059j))*x[1]
+        ref[(1, 1, 1)]=(-0.456001881901+0.533244950906j)*x_ref[0] + ((-0.93372951835-0.0671452303059j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.393594373029-0.346842777665j)*x[0] + ((-0.848745797795-0.106879678186j))*x[1]
+        ref[(1, 1, 2)]=(-0.393594373029-0.346842777665j)*x_ref[0] + ((-0.848745797795-0.106879678186j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.294457504965-0.780538561582j)*x[0] + ((-0.487438042537-0.894464136075j))*x[1]
+        ref[(1, 2, 0)]=(0.294457504965-0.780538561582j)*x_ref[0] + ((-0.487438042537-0.894464136075j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.255386391587-0.183741948147j)*x[0] + ((-0.858623029843+0.86663645082j))*x[1]
+        ref[(1, 2, 1)]=(0.255386391587-0.183741948147j)*x_ref[0] + ((-0.858623029843+0.86663645082j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.514739780265-0.973201099651j)*x[0] + ((-0.929944118712+0.388193907912j))*x[1]
+        ref[(1, 2, 2)]=(0.514739780265-0.973201099651j)*x_ref[0] + ((-0.929944118712+0.388193907912j))*x_ref[1]
+        arg[(1, 3, 0)]=(-0.147519825777+0.063234437118j)*x[0] + ((0.59239279603+0.330635480214j))*x[1]
+        ref[(1, 3, 0)]=(-0.147519825777+0.063234437118j)*x_ref[0] + ((0.59239279603+0.330635480214j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.95698418029+0.835721396574j)*x[0] + ((0.647845690304+0.842246543389j))*x[1]
+        ref[(1, 3, 1)]=(0.95698418029+0.835721396574j)*x_ref[0] + ((0.647845690304+0.842246543389j))*x_ref[1]
+        arg[(1, 3, 2)]=(0.658447279545+0.447728602371j)*x[0] + ((0.599737672218-0.295980198243j))*x[1]
+        ref[(1, 3, 2)]=(0.658447279545+0.447728602371j)*x_ref[0] + ((0.599737672218-0.295980198243j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.602322860437+0.569699583898j)*x[2]
+            ref[(0, 0, 0)]+=(-0.602322860437+0.569699583898j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.595044445335-0.315246646735j)*x[2]
+            ref[(0, 0, 1)]+=(0.595044445335-0.315246646735j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.607142697527-0.958397194717j)*x[2]
+            ref[(0, 0, 2)]+=(-0.607142697527-0.958397194717j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.29514650053+0.514321906554j)*x[2]
+            ref[(0, 1, 0)]+=(0.29514650053+0.514321906554j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.358727103733-0.305163963167j)*x[2]
+            ref[(0, 1, 1)]+=(0.358727103733-0.305163963167j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.131967612556-0.401870306666j)*x[2]
+            ref[(0, 1, 2)]+=(0.131967612556-0.401870306666j)*x_ref[2]
+            arg[(0, 2, 0)]+=(0.0949277519034-0.121174117544j)*x[2]
+            ref[(0, 2, 0)]+=(0.0949277519034-0.121174117544j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.361720648541+0.86494341954j)*x[2]
+            ref[(0, 2, 1)]+=(0.361720648541+0.86494341954j)*x_ref[2]
+            arg[(0, 2, 2)]+=(0.710023861657+0.449150603433j)*x[2]
+            ref[(0, 2, 2)]+=(0.710023861657+0.449150603433j)*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.259456663319-0.944134095986j)*x[2]
+            ref[(0, 3, 0)]+=(-0.259456663319-0.944134095986j)*x_ref[2]
+            arg[(0, 3, 1)]+=(-0.0684534629832+0.673846633658j)*x[2]
+            ref[(0, 3, 1)]+=(-0.0684534629832+0.673846633658j)*x_ref[2]
+            arg[(0, 3, 2)]+=(0.548594650945+0.603667094716j)*x[2]
+            ref[(0, 3, 2)]+=(0.548594650945+0.603667094716j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.851918913807-0.871339130352j)*x[2]
+            ref[(1, 0, 0)]+=(0.851918913807-0.871339130352j)*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.348234252973-0.514311255915j)*x[2]
+            ref[(1, 0, 1)]+=(-0.348234252973-0.514311255915j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.91695157493+0.861921442561j)*x[2]
+            ref[(1, 0, 2)]+=(0.91695157493+0.861921442561j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.3702100668+0.811341867767j)*x[2]
+            ref[(1, 1, 0)]+=(-0.3702100668+0.811341867767j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.208023821436-0.216686525369j)*x[2]
+            ref[(1, 1, 1)]+=(-0.208023821436-0.216686525369j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.800827466366-0.396180395779j)*x[2]
+            ref[(1, 1, 2)]+=(0.800827466366-0.396180395779j)*x_ref[2]
+            arg[(1, 2, 0)]+=(0.0594460359847-0.528280681813j)*x[2]
+            ref[(1, 2, 0)]+=(0.0594460359847-0.528280681813j)*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.548580549417+0.0451163129415j)*x[2]
+            ref[(1, 2, 1)]+=(-0.548580549417+0.0451163129415j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.97585679895+0.906931599457j)*x[2]
+            ref[(1, 2, 2)]+=(0.97585679895+0.906931599457j)*x_ref[2]
+            arg[(1, 3, 0)]+=(-0.94014547208-0.350121664412j)*x[2]
+            ref[(1, 3, 0)]+=(-0.94014547208-0.350121664412j)*x_ref[2]
+            arg[(1, 3, 1)]+=(-0.468947055145+0.188938751084j)*x[2]
+            ref[(1, 3, 1)]+=(-0.468947055145+0.188938751084j)*x_ref[2]
+            arg[(1, 3, 2)]+=(0.340177268025-0.517085614531j)*x[2]
+            ref[(1, 3, 2)]+=(0.340177268025-0.517085614531j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3, 2),w)
+        ref = Data(0,(4, 2, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.560233793409-0.347435293874j)*x[0] + ((-0.738586297773+0.48299530183j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.560233793409-0.347435293874j)*x_ref[0] + ((-0.738586297773+0.48299530183j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.347689902753+0.844511464424j)*x[0] + ((0.637913619591-0.838057257811j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.347689902753+0.844511464424j)*x_ref[0] + ((0.637913619591-0.838057257811j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.633953500656-0.135054923747j)*x[0] + ((-0.3549152977+0.731492774206j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.633953500656-0.135054923747j)*x_ref[0] + ((-0.3549152977+0.731492774206j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.535203449113-0.674494553773j)*x[0] + ((0.738217558667-0.653562030005j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.535203449113-0.674494553773j)*x_ref[0] + ((0.738217558667-0.653562030005j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.942465830139+0.00170581061263j)*x[0] + ((0.0759383593326-0.616989278511j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.942465830139+0.00170581061263j)*x_ref[0] + ((0.0759383593326-0.616989278511j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.60270307062-0.180903560333j)*x[0] + ((-0.311169826178-0.594489636895j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.60270307062-0.180903560333j)*x_ref[0] + ((-0.311169826178-0.594489636895j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.650685412819+0.727198710504j)*x[0] + ((-0.666015702862+0.314144124628j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.650685412819+0.727198710504j)*x_ref[0] + ((-0.666015702862+0.314144124628j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.404788647539-0.190429635652j)*x[0] + ((-0.688681828202-0.540279134582j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.404788647539-0.190429635652j)*x_ref[0] + ((-0.688681828202-0.540279134582j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.404655814324-0.828356448668j)*x[0] + ((-0.216502268406+0.514470453286j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.404655814324-0.828356448668j)*x_ref[0] + ((-0.216502268406+0.514470453286j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.94118336971-0.241755758914j)*x[0] + ((0.469690022388+0.711978231758j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.94118336971-0.241755758914j)*x_ref[0] + ((0.469690022388+0.711978231758j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.542627683703+0.819126126477j)*x[0] + ((0.354974736285+0.0768657137585j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.542627683703+0.819126126477j)*x_ref[0] + ((0.354974736285+0.0768657137585j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.591256868537-0.81651487962j)*x[0] + ((0.701160314017-0.437053521797j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.591256868537-0.81651487962j)*x_ref[0] + ((0.701160314017-0.437053521797j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.767176149659-0.141606997871j)*x[0] + ((-0.0774018056996-0.96234045492j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.767176149659-0.141606997871j)*x_ref[0] + ((-0.0774018056996-0.96234045492j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.687602199463-0.606191991415j)*x[0] + ((-0.907201329003+0.891790149193j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.687602199463-0.606191991415j)*x_ref[0] + ((-0.907201329003+0.891790149193j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.647906505901+0.266237053688j)*x[0] + ((-0.337449578635-0.483545689972j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.647906505901+0.266237053688j)*x_ref[0] + ((-0.337449578635-0.483545689972j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.945071427607+0.51940179808j)*x[0] + ((-0.0138885727184-0.947990673409j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.945071427607+0.51940179808j)*x_ref[0] + ((-0.0138885727184-0.947990673409j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.665532497029+0.15976735083j)*x[0] + ((0.400808809832-0.321836053992j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.665532497029+0.15976735083j)*x_ref[0] + ((0.400808809832-0.321836053992j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.0709409426766-0.257172756436j)*x[0] + ((0.752009870138-0.491410175672j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.0709409426766-0.257172756436j)*x_ref[0] + ((0.752009870138-0.491410175672j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.85846339039-0.0681910557308j)*x[0] + ((-0.471159148254+0.2933280627j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.85846339039-0.0681910557308j)*x_ref[0] + ((-0.471159148254+0.2933280627j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.195507775938+0.640722855402j)*x[0] + ((0.236602852526+0.610931477707j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.195507775938+0.640722855402j)*x_ref[0] + ((0.236602852526+0.610931477707j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.0594250120379+0.962153544837j)*x[0] + ((0.436703067978-0.390255254816j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.0594250120379+0.962153544837j)*x_ref[0] + ((0.436703067978-0.390255254816j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.912156458215-0.166981400412j)*x[0] + ((-0.577282069472-0.0398892772684j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.912156458215-0.166981400412j)*x_ref[0] + ((-0.577282069472-0.0398892772684j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.763099902799-0.712722745773j)*x[0] + ((0.120451926665-0.448119725071j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.763099902799-0.712722745773j)*x_ref[0] + ((0.120451926665-0.448119725071j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.979498081379+0.6882626998j)*x[0] + ((0.389371527692-0.0239423675216j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.979498081379+0.6882626998j)*x_ref[0] + ((0.389371527692-0.0239423675216j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.223302705079+0.0464655434707j)*x[0] + ((0.522614752849-0.231259834696j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.223302705079+0.0464655434707j)*x_ref[0] + ((0.522614752849-0.231259834696j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.822041628409+0.77257991287j)*x[0] + ((-0.750002614071-0.827180686633j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.822041628409+0.77257991287j)*x_ref[0] + ((-0.750002614071-0.827180686633j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.323364625636+0.953559178139j)*x[0] + ((-0.709017479755-0.44168022443j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.323364625636+0.953559178139j)*x_ref[0] + ((-0.709017479755-0.44168022443j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.353101994466+0.366021504628j)*x[0] + ((-0.777732787184+0.607382951334j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.353101994466+0.366021504628j)*x_ref[0] + ((-0.777732787184+0.607382951334j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(0.917392340946-0.916199560261j)*x[0] + ((0.423957785087+0.708489667334j))*x[1]
+        ref[(2, 0, 2, 0)]=(0.917392340946-0.916199560261j)*x_ref[0] + ((0.423957785087+0.708489667334j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.704240199391+0.305173030818j)*x[0] + ((0.931192842428+0.550955767082j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.704240199391+0.305173030818j)*x_ref[0] + ((0.931192842428+0.550955767082j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.915238951479+0.4726519275j)*x[0] + ((-0.668111065291+0.918734731952j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.915238951479+0.4726519275j)*x_ref[0] + ((-0.668111065291+0.918734731952j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.457391904691-0.789696324265j)*x[0] + ((-0.348344320113-0.785572881437j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.457391904691-0.789696324265j)*x_ref[0] + ((-0.348344320113-0.785572881437j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.696741458553-0.525704315942j)*x[0] + ((0.673348780674-0.580887830265j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.696741458553-0.525704315942j)*x_ref[0] + ((0.673348780674-0.580887830265j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.678068187523+0.802065267019j)*x[0] + ((-0.215006361474+0.74082903649j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.678068187523+0.802065267019j)*x_ref[0] + ((-0.215006361474+0.74082903649j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.0663838070778+0.557161579478j)*x[0] + ((0.966935153883+0.827231931333j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.0663838070778+0.557161579478j)*x_ref[0] + ((0.966935153883+0.827231931333j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.528170207938+0.715267459948j)*x[0] + ((-0.919028219914-0.839105021728j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.528170207938+0.715267459948j)*x_ref[0] + ((-0.919028219914-0.839105021728j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.216589934028-0.270573094081j)*x[0] + ((0.795910921072+0.238373215056j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.216589934028-0.270573094081j)*x_ref[0] + ((0.795910921072+0.238373215056j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(-0.649309538731+0.303773394579j)*x[0] + ((0.533497673384-0.372224174803j))*x[1]
+        ref[(3, 0, 0, 1)]=(-0.649309538731+0.303773394579j)*x_ref[0] + ((0.533497673384-0.372224174803j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.9398963185+0.861587594762j)*x[0] + ((0.317766453043-0.344106846124j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.9398963185+0.861587594762j)*x_ref[0] + ((0.317766453043-0.344106846124j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(-0.967202679609-0.336386407542j)*x[0] + ((0.0105355981404-0.969173346677j))*x[1]
+        ref[(3, 0, 1, 1)]=(-0.967202679609-0.336386407542j)*x_ref[0] + ((0.0105355981404-0.969173346677j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(-0.0955853159691+0.756602373974j)*x[0] + ((-0.189460895151-0.871095076823j))*x[1]
+        ref[(3, 0, 2, 0)]=(-0.0955853159691+0.756602373974j)*x_ref[0] + ((-0.189460895151-0.871095076823j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(-0.844539666978-0.516168496716j)*x[0] + ((-0.325544754153+0.998935732416j))*x[1]
+        ref[(3, 0, 2, 1)]=(-0.844539666978-0.516168496716j)*x_ref[0] + ((-0.325544754153+0.998935732416j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.0955394280374+0.663423843183j)*x[0] + ((-0.300415577295-0.883432072144j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.0955394280374+0.663423843183j)*x_ref[0] + ((-0.300415577295-0.883432072144j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.6413590348-0.0762084386113j)*x[0] + ((-0.131962739342+0.194569092544j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.6413590348-0.0762084386113j)*x_ref[0] + ((-0.131962739342+0.194569092544j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(-0.585267760975+0.317943877729j)*x[0] + ((-0.622663134336+0.663720673501j))*x[1]
+        ref[(3, 1, 1, 0)]=(-0.585267760975+0.317943877729j)*x_ref[0] + ((-0.622663134336+0.663720673501j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.693598923314+0.418310083407j)*x[0] + ((-0.83561511298+0.107573095258j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.693598923314+0.418310083407j)*x_ref[0] + ((-0.83561511298+0.107573095258j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(-0.475128013356-0.624179896002j)*x[0] + ((0.985032233287-0.987814106592j))*x[1]
+        ref[(3, 1, 2, 0)]=(-0.475128013356-0.624179896002j)*x_ref[0] + ((0.985032233287-0.987814106592j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(0.049073444857-0.680132897642j)*x[0] + ((0.386125491977-0.409665810704j))*x[1]
+        ref[(3, 1, 2, 1)]=(0.049073444857-0.680132897642j)*x_ref[0] + ((0.386125491977-0.409665810704j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.453444706697-0.673603299714j)*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.453444706697-0.673603299714j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.0878578917045+0.839505238049j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.0878578917045+0.839505238049j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.881608240786-0.0453393971996j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.881608240786-0.0453393971996j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.782992328966+0.0547413497002j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.782992328966+0.0547413497002j)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.823607126718+0.825114494573j)*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.823607126718+0.825114494573j)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.225702122752+0.291336071004j)*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.225702122752+0.291336071004j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.710268884237-0.333446280132j)*x[2]
+            ref[(0, 1, 0, 0)]+=(0.710268884237-0.333446280132j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.331589597829+0.262792468498j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.331589597829+0.262792468498j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.924896517991-0.524471196605j)*x[2]
+            ref[(0, 1, 1, 0)]+=(0.924896517991-0.524471196605j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.240907771486-0.5837829947j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.240907771486-0.5837829947j)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.198261889232-0.87039585262j)*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.198261889232-0.87039585262j)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.143458780357-0.737711946336j)*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.143458780357-0.737711946336j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.513243181731-0.960964248275j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.513243181731-0.960964248275j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.152361429395+0.967697647258j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.152361429395+0.967697647258j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.0888235491749+0.273555094834j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.0888235491749+0.273555094834j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.692091740019+0.653595122294j)*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.692091740019+0.653595122294j)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.828975139207+0.349995433781j)*x[2]
+            ref[(1, 0, 2, 0)]+=(0.828975139207+0.349995433781j)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.937602384367-0.0227693096503j)*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.937602384367-0.0227693096503j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.99304330085-0.684293380824j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.99304330085-0.684293380824j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.564511052637+0.0455742244642j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.564511052637+0.0455742244642j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.180695878518+0.0346566825016j)*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.180695878518+0.0346566825016j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.891326510721-0.934972228956j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.891326510721-0.934972228956j)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.625105157341+0.856116885824j)*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.625105157341+0.856116885824j)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.264398534345+0.336721661648j)*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.264398534345+0.336721661648j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.834016289187+0.935874577227j)*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.834016289187+0.935874577227j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.834192734829+0.669631006587j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.834192734829+0.669631006587j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.951153750177-0.617112534255j)*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.951153750177-0.617112534255j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.468396288735-0.228858501731j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.468396288735-0.228858501731j)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.259080721748+0.460412677927j)*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.259080721748+0.460412677927j)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(-0.0524326671337+0.0622307139215j)*x[2]
+            ref[(2, 0, 2, 1)]+=(-0.0524326671337+0.0622307139215j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.754914323028+0.887147014362j)*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.754914323028+0.887147014362j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.13425710837+0.453048728793j)*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.13425710837+0.453048728793j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.650395471302+0.355360789908j)*x[2]
+            ref[(2, 1, 1, 0)]+=(0.650395471302+0.355360789908j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.814603055349+0.0432585217325j)*x[2]
+            ref[(2, 1, 1, 1)]+=(0.814603055349+0.0432585217325j)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.391012771009-0.388937334819j)*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.391012771009-0.388937334819j)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.919526666734-0.435358382297j)*x[2]
+            ref[(2, 1, 2, 1)]+=(0.919526666734-0.435358382297j)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.147403210503-0.684387005009j)*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.147403210503-0.684387005009j)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.969571112908-0.439491652075j)*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.969571112908-0.439491652075j)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.368194862706+0.862572035557j)*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.368194862706+0.862572035557j)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.529673295417-0.153221145546j)*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.529673295417-0.153221145546j)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(-0.819194509095+0.799206289059j)*x[2]
+            ref[(3, 0, 2, 0)]+=(-0.819194509095+0.799206289059j)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.0719582654344+0.37211771946j)*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.0719582654344+0.37211771946j)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.0301825906886-0.511273782012j)*x[2]
+            ref[(3, 1, 0, 0)]+=(0.0301825906886-0.511273782012j)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.81627105051-0.911452191365j)*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.81627105051-0.911452191365j)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.92178447552-0.219150799166j)*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.92178447552-0.219150799166j)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(-0.998099582242-0.760046301779j)*x[2]
+            ref[(3, 1, 1, 1)]+=(-0.998099582242-0.760046301779j)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(-0.23137510604+0.516613295652j)*x[2]
+            ref[(3, 1, 2, 0)]+=(-0.23137510604+0.516613295652j)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(-0.594071416649-0.65306573985j)*x[2]
+            ref[(3, 1, 2, 1)]+=(-0.594071416649-0.65306573985j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Function_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.472089537524+0.292931355344j)*x[0]**o + ((-0.904025322418-0.03457164945j))*x[0] + ((0.362872316398-0.29385678346j))*x[1]**o + ((-0.695675133554-0.934190272636j))*x[1]
+        ref=(-0.472089537524+0.292931355344j)*x_ref[0]**o + ((-0.904025322418-0.03457164945j))*x_ref[0] + ((0.362872316398-0.29385678346j))*x_ref[1]**o + ((-0.695675133554-0.934190272636j))*x_ref[1]
+        if dim==3:
+            arg+=((0.582500893114+0.840367664457j))*x[2]**o + ((0.0417675695754-0.254876208537j))*x[2]
+            ref+=((0.582500893114+0.840367664457j))*x_ref[2]**o + ((0.0417675695754-0.254876208537j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Function_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.896830355839+0.564002647023j)*x[0]**o + ((-0.842590934976-0.0555537119182j))*x[0] + ((-0.657587764228+0.326573630087j))*x[1]**o + ((-0.470908886329+0.465596706428j))*x[1]
+        ref[(0,)]=(-0.896830355839+0.564002647023j)*x_ref[0]**o + ((-0.842590934976-0.0555537119182j))*x_ref[0] + ((-0.657587764228+0.326573630087j))*x_ref[1]**o + ((-0.470908886329+0.465596706428j))*x_ref[1]
+        arg[(1,)]=(-0.22491021224+0.100376772045j)*x[0]**o + ((-0.434398811362-0.621898619665j))*x[0] + ((0.996230316444-0.479605351564j))*x[1]**o + ((0.9377274879-0.778385327552j))*x[1]
+        ref[(1,)]=(-0.22491021224+0.100376772045j)*x_ref[0]**o + ((-0.434398811362-0.621898619665j))*x_ref[0] + ((0.996230316444-0.479605351564j))*x_ref[1]**o + ((0.9377274879-0.778385327552j))*x_ref[1]
+        arg[(2,)]=(-0.268798954983+0.587481507534j)*x[0]**o + ((0.598273417428+0.59543182134j))*x[0] + ((-0.891753842523+0.7069739431j))*x[1]**o + ((0.141910587477+0.761576420638j))*x[1]
+        ref[(2,)]=(-0.268798954983+0.587481507534j)*x_ref[0]**o + ((0.598273417428+0.59543182134j))*x_ref[0] + ((-0.891753842523+0.7069739431j))*x_ref[1]**o + ((0.141910587477+0.761576420638j))*x_ref[1]
+        arg[(3,)]=(0.746517039323+0.760741509966j)*x[0]**o + ((0.297908948889-0.668636035844j))*x[0] + ((0.843097484814-0.71718250873j))*x[1]**o + ((-0.149763159457+0.944726506867j))*x[1]
+        ref[(3,)]=(0.746517039323+0.760741509966j)*x_ref[0]**o + ((0.297908948889-0.668636035844j))*x_ref[0] + ((0.843097484814-0.71718250873j))*x_ref[1]**o + ((-0.149763159457+0.944726506867j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.673710986481-0.0378910898241j)*x[2]**o + ((-0.480640903085-0.0979187484268j))*x[2]
+            ref[(0,)]+=(0.673710986481-0.0378910898241j)*x_ref[2]**o + ((-0.480640903085-0.0979187484268j))*x_ref[2]
+            arg[(1,)]+=(-0.740303569015-0.347774023835j)*x[2]**o + ((-0.897570083549+0.127925605023j))*x[2]
+            ref[(1,)]+=(-0.740303569015-0.347774023835j)*x_ref[2]**o + ((-0.897570083549+0.127925605023j))*x_ref[2]
+            arg[(2,)]+=(0.250163347777-0.914918872349j)*x[2]**o + ((0.626927498737+0.350088638373j))*x[2]
+            ref[(2,)]+=(0.250163347777-0.914918872349j)*x_ref[2]**o + ((0.626927498737+0.350088638373j))*x_ref[2]
+            arg[(3,)]+=(0.352557553189-0.739619715748j)*x[2]**o + ((0.192353808365-0.989291080622j))*x[2]
+            ref[(3,)]+=(0.352557553189-0.739619715748j)*x_ref[2]**o + ((0.192353808365-0.989291080622j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Function_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(0.25676677318+0.035359888882j)*x[0]**o + ((-0.276060935631-0.624334326852j))*x[0] + ((0.921634848601-0.748371620623j))*x[1]**o + ((0.395521521613+0.066575294628j))*x[1]
+        ref[(0, 0)]=(0.25676677318+0.035359888882j)*x_ref[0]**o + ((-0.276060935631-0.624334326852j))*x_ref[0] + ((0.921634848601-0.748371620623j))*x_ref[1]**o + ((0.395521521613+0.066575294628j))*x_ref[1]
+        arg[(0, 1)]=(0.296108857086+0.362409536217j)*x[0]**o + ((-0.731420091134-0.056581167705j))*x[0] + ((-0.147080436495+0.586622851619j))*x[1]**o + ((0.704167507455+0.570662574181j))*x[1]
+        ref[(0, 1)]=(0.296108857086+0.362409536217j)*x_ref[0]**o + ((-0.731420091134-0.056581167705j))*x_ref[0] + ((-0.147080436495+0.586622851619j))*x_ref[1]**o + ((0.704167507455+0.570662574181j))*x_ref[1]
+        arg[(1, 0)]=(0.00489203221104+0.989905265955j)*x[0]**o + ((-0.528316434304-0.129769244997j))*x[0] + ((-0.93928452216-0.441637765956j))*x[1]**o + ((0.735177517205-0.583852570633j))*x[1]
+        ref[(1, 0)]=(0.00489203221104+0.989905265955j)*x_ref[0]**o + ((-0.528316434304-0.129769244997j))*x_ref[0] + ((-0.93928452216-0.441637765956j))*x_ref[1]**o + ((0.735177517205-0.583852570633j))*x_ref[1]
+        arg[(1, 1)]=(0.195185036932-0.0751540215507j)*x[0]**o + ((0.0787061375057-0.520426282003j))*x[0] + ((-0.120054715555-0.177431217137j))*x[1]**o + ((0.273010831644-0.581930822429j))*x[1]
+        ref[(1, 1)]=(0.195185036932-0.0751540215507j)*x_ref[0]**o + ((0.0787061375057-0.520426282003j))*x_ref[0] + ((-0.120054715555-0.177431217137j))*x_ref[1]**o + ((0.273010831644-0.581930822429j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.0285991114692+0.031596714126j)*x[2]**o + ((-0.0886039807723-0.242871227684j))*x[2]
+            ref[(0, 0)]+=(0.0285991114692+0.031596714126j)*x_ref[2]**o + ((-0.0886039807723-0.242871227684j))*x_ref[2]
+            arg[(0, 1)]+=(-0.993728267283+0.880951257516j)*x[2]**o + ((0.220654487345-0.0942601002435j))*x[2]
+            ref[(0, 1)]+=(-0.993728267283+0.880951257516j)*x_ref[2]**o + ((0.220654487345-0.0942601002435j))*x_ref[2]
+            arg[(1, 0)]+=(-0.576049591181+0.0271496235762j)*x[2]**o + ((0.823306185288-0.251475599308j))*x[2]
+            ref[(1, 0)]+=(-0.576049591181+0.0271496235762j)*x_ref[2]**o + ((0.823306185288-0.251475599308j))*x_ref[2]
+            arg[(1, 1)]+=(0.688435354234-0.853338898012j)*x[2]**o + ((0.0430724766966+0.597527593355j))*x[2]
+            ref[(1, 1)]+=(0.688435354234-0.853338898012j)*x_ref[2]**o + ((0.0430724766966+0.597527593355j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Function_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.162997383394+0.0993245569141j)*x[0]**o + ((0.268515098926-0.976572562712j))*x[0] + ((-0.517849801008+0.7425411274j))*x[1]**o + ((-0.258121149579-0.208076169145j))*x[1]
+        ref[(0, 0, 0)]=(-0.162997383394+0.0993245569141j)*x_ref[0]**o + ((0.268515098926-0.976572562712j))*x_ref[0] + ((-0.517849801008+0.7425411274j))*x_ref[1]**o + ((-0.258121149579-0.208076169145j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.374147900186+0.983711515901j)*x[0]**o + ((-0.313680306032-0.43293613732j))*x[0] + ((-0.382688776834-0.962072417689j))*x[1]**o + ((-0.709214142697-0.182315750117j))*x[1]
+        ref[(0, 0, 1)]=(-0.374147900186+0.983711515901j)*x_ref[0]**o + ((-0.313680306032-0.43293613732j))*x_ref[0] + ((-0.382688776834-0.962072417689j))*x_ref[1]**o + ((-0.709214142697-0.182315750117j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.952146468539-0.62140927921j)*x[0]**o + ((0.691600333013-0.21031162281j))*x[0] + ((0.589443334046-0.265049642237j))*x[1]**o + ((-0.19854569552-0.0497521071673j))*x[1]
+        ref[(0, 0, 2)]=(0.952146468539-0.62140927921j)*x_ref[0]**o + ((0.691600333013-0.21031162281j))*x_ref[0] + ((0.589443334046-0.265049642237j))*x_ref[1]**o + ((-0.19854569552-0.0497521071673j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.61402048691+0.661990595283j)*x[0]**o + ((0.604184211118-0.521673192364j))*x[0] + ((0.782983023738-0.0274138416037j))*x[1]**o + ((0.941805804952-0.524563071071j))*x[1]
+        ref[(0, 1, 0)]=(-0.61402048691+0.661990595283j)*x_ref[0]**o + ((0.604184211118-0.521673192364j))*x_ref[0] + ((0.782983023738-0.0274138416037j))*x_ref[1]**o + ((0.941805804952-0.524563071071j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.685848766332-0.821964033264j)*x[0]**o + ((0.1411957359+0.513972101516j))*x[0] + ((-0.764769637632-0.701107935657j))*x[1]**o + ((-0.449609664724+0.79238311645j))*x[1]
+        ref[(0, 1, 1)]=(-0.685848766332-0.821964033264j)*x_ref[0]**o + ((0.1411957359+0.513972101516j))*x_ref[0] + ((-0.764769637632-0.701107935657j))*x_ref[1]**o + ((-0.449609664724+0.79238311645j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.790972510071-0.865833171714j)*x[0]**o + ((0.376087575796-0.791127152857j))*x[0] + ((0.2990774312-0.499929806646j))*x[1]**o + ((0.745023898599+0.868399076946j))*x[1]
+        ref[(0, 1, 2)]=(0.790972510071-0.865833171714j)*x_ref[0]**o + ((0.376087575796-0.791127152857j))*x_ref[0] + ((0.2990774312-0.499929806646j))*x_ref[1]**o + ((0.745023898599+0.868399076946j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.848498747415+0.329672873351j)*x[0]**o + ((-0.00418837783003+0.333494381074j))*x[0] + ((-0.703305128841-0.738867942143j))*x[1]**o + ((-0.932836324087-0.878257614744j))*x[1]
+        ref[(1, 0, 0)]=(0.848498747415+0.329672873351j)*x_ref[0]**o + ((-0.00418837783003+0.333494381074j))*x_ref[0] + ((-0.703305128841-0.738867942143j))*x_ref[1]**o + ((-0.932836324087-0.878257614744j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.813598481069+0.680790747542j)*x[0]**o + ((-0.875899905224+0.572841879962j))*x[0] + ((-0.943709225838-0.146039982359j))*x[1]**o + ((-0.455910919685+0.108720872672j))*x[1]
+        ref[(1, 0, 1)]=(-0.813598481069+0.680790747542j)*x_ref[0]**o + ((-0.875899905224+0.572841879962j))*x_ref[0] + ((-0.943709225838-0.146039982359j))*x_ref[1]**o + ((-0.455910919685+0.108720872672j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.748848032496+0.673910974757j)*x[0]**o + ((-0.486893179083-0.0512225042936j))*x[0] + ((-0.168814914296+0.530756528611j))*x[1]**o + ((-0.0508389532113-0.901165392049j))*x[1]
+        ref[(1, 0, 2)]=(0.748848032496+0.673910974757j)*x_ref[0]**o + ((-0.486893179083-0.0512225042936j))*x_ref[0] + ((-0.168814914296+0.530756528611j))*x_ref[1]**o + ((-0.0508389532113-0.901165392049j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.910207011353-0.0314743188652j)*x[0]**o + ((-0.107665601952+0.847549599405j))*x[0] + ((-0.268044170762-0.274362602391j))*x[1]**o + ((-0.696622851897-0.91765918462j))*x[1]
+        ref[(1, 1, 0)]=(0.910207011353-0.0314743188652j)*x_ref[0]**o + ((-0.107665601952+0.847549599405j))*x_ref[0] + ((-0.268044170762-0.274362602391j))*x_ref[1]**o + ((-0.696622851897-0.91765918462j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.293622749328+0.827617472513j)*x[0]**o + ((-0.0754794115619+0.33801117384j))*x[0] + ((-0.688852939437-0.88250540131j))*x[1]**o + ((0.881235468525+0.258218889194j))*x[1]
+        ref[(1, 1, 1)]=(-0.293622749328+0.827617472513j)*x_ref[0]**o + ((-0.0754794115619+0.33801117384j))*x_ref[0] + ((-0.688852939437-0.88250540131j))*x_ref[1]**o + ((0.881235468525+0.258218889194j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.91607817384+0.192237536375j)*x[0]**o + ((0.427853517709-0.915817219521j))*x[0] + ((-0.0411388625227-0.684988799846j))*x[1]**o + ((-0.956586253245+0.187624495245j))*x[1]
+        ref[(1, 1, 2)]=(-0.91607817384+0.192237536375j)*x_ref[0]**o + ((0.427853517709-0.915817219521j))*x_ref[0] + ((-0.0411388625227-0.684988799846j))*x_ref[1]**o + ((-0.956586253245+0.187624495245j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.646366268918+0.592611672754j)*x[0]**o + ((0.843416479954-0.396607236429j))*x[0] + ((-0.989564260952+0.419677893597j))*x[1]**o + ((-0.433072807208-0.637919607697j))*x[1]
+        ref[(2, 0, 0)]=(-0.646366268918+0.592611672754j)*x_ref[0]**o + ((0.843416479954-0.396607236429j))*x_ref[0] + ((-0.989564260952+0.419677893597j))*x_ref[1]**o + ((-0.433072807208-0.637919607697j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.152478003857+0.727728892841j)*x[0]**o + ((0.078366141188-0.994132421823j))*x[0] + ((-0.67289459082-0.911010012864j))*x[1]**o + ((0.13449533171-0.120123950382j))*x[1]
+        ref[(2, 0, 1)]=(0.152478003857+0.727728892841j)*x_ref[0]**o + ((0.078366141188-0.994132421823j))*x_ref[0] + ((-0.67289459082-0.911010012864j))*x_ref[1]**o + ((0.13449533171-0.120123950382j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.208969201256-0.692499676187j)*x[0]**o + ((-0.679431575754-0.796299017955j))*x[0] + ((0.2304237933+0.0972866623544j))*x[1]**o + ((0.73383274041-0.0201938957334j))*x[1]
+        ref[(2, 0, 2)]=(0.208969201256-0.692499676187j)*x_ref[0]**o + ((-0.679431575754-0.796299017955j))*x_ref[0] + ((0.2304237933+0.0972866623544j))*x_ref[1]**o + ((0.73383274041-0.0201938957334j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.274563782771-0.69417117282j)*x[0]**o + ((0.638534147242-0.680109969638j))*x[0] + ((-0.333059619717+0.687756738994j))*x[1]**o + ((-0.724218713771+0.557644671366j))*x[1]
+        ref[(2, 1, 0)]=(0.274563782771-0.69417117282j)*x_ref[0]**o + ((0.638534147242-0.680109969638j))*x_ref[0] + ((-0.333059619717+0.687756738994j))*x_ref[1]**o + ((-0.724218713771+0.557644671366j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.810482811446-0.221714568357j)*x[0]**o + ((-0.0908602823615-0.1182838411j))*x[0] + ((0.358868676153-0.533114332467j))*x[1]**o + ((0.751057206451+0.616956231562j))*x[1]
+        ref[(2, 1, 1)]=(0.810482811446-0.221714568357j)*x_ref[0]**o + ((-0.0908602823615-0.1182838411j))*x_ref[0] + ((0.358868676153-0.533114332467j))*x_ref[1]**o + ((0.751057206451+0.616956231562j))*x_ref[1]
+        arg[(2, 1, 2)]=(-0.955866701435-0.493674615981j)*x[0]**o + ((0.708987305614+0.789123463659j))*x[0] + ((0.973062215002+0.78148131142j))*x[1]**o + ((-0.609438840713-0.437501317435j))*x[1]
+        ref[(2, 1, 2)]=(-0.955866701435-0.493674615981j)*x_ref[0]**o + ((0.708987305614+0.789123463659j))*x_ref[0] + ((0.973062215002+0.78148131142j))*x_ref[1]**o + ((-0.609438840713-0.437501317435j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.601988853485-0.272024489896j)*x[0]**o + ((-0.436993209938-0.804708008952j))*x[0] + ((-0.713463155879-0.904950883229j))*x[1]**o + ((0.0818924608476-0.238357904917j))*x[1]
+        ref[(3, 0, 0)]=(-0.601988853485-0.272024489896j)*x_ref[0]**o + ((-0.436993209938-0.804708008952j))*x_ref[0] + ((-0.713463155879-0.904950883229j))*x_ref[1]**o + ((0.0818924608476-0.238357904917j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.0638121156946+0.985367359491j)*x[0]**o + ((-0.237540227648-0.945953938747j))*x[0] + ((0.0188071527727+0.114786147002j))*x[1]**o + ((-0.657052625026-0.975770573546j))*x[1]
+        ref[(3, 0, 1)]=(0.0638121156946+0.985367359491j)*x_ref[0]**o + ((-0.237540227648-0.945953938747j))*x_ref[0] + ((0.0188071527727+0.114786147002j))*x_ref[1]**o + ((-0.657052625026-0.975770573546j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.274322393782-0.57303001624j)*x[0]**o + ((-0.542790224866+0.532090757322j))*x[0] + ((-0.0804823058632-0.0960290659851j))*x[1]**o + ((-0.654790422321-0.135634649891j))*x[1]
+        ref[(3, 0, 2)]=(0.274322393782-0.57303001624j)*x_ref[0]**o + ((-0.542790224866+0.532090757322j))*x_ref[0] + ((-0.0804823058632-0.0960290659851j))*x_ref[1]**o + ((-0.654790422321-0.135634649891j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.564644459429-0.651580633065j)*x[0]**o + ((-0.693471989089+0.867352666387j))*x[0] + ((0.587672202288+0.884861405861j))*x[1]**o + ((0.128451647085+0.714713681103j))*x[1]
+        ref[(3, 1, 0)]=(-0.564644459429-0.651580633065j)*x_ref[0]**o + ((-0.693471989089+0.867352666387j))*x_ref[0] + ((0.587672202288+0.884861405861j))*x_ref[1]**o + ((0.128451647085+0.714713681103j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.765808221574-0.6765343734j)*x[0]**o + ((-0.535542382395+0.202669958368j))*x[0] + ((-0.334543565843+0.431999551531j))*x[1]**o + ((0.37934849797-0.767563035893j))*x[1]
+        ref[(3, 1, 1)]=(-0.765808221574-0.6765343734j)*x_ref[0]**o + ((-0.535542382395+0.202669958368j))*x_ref[0] + ((-0.334543565843+0.431999551531j))*x_ref[1]**o + ((0.37934849797-0.767563035893j))*x_ref[1]
+        arg[(3, 1, 2)]=(0.694116977841-0.204557055584j)*x[0]**o + ((0.653370369678+0.297614926334j))*x[0] + ((0.310357450886-0.335354743358j))*x[1]**o + ((-0.861201842455+0.624425576717j))*x[1]
+        ref[(3, 1, 2)]=(0.694116977841-0.204557055584j)*x_ref[0]**o + ((0.653370369678+0.297614926334j))*x_ref[0] + ((0.310357450886-0.335354743358j))*x_ref[1]**o + ((-0.861201842455+0.624425576717j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.890031816344-0.482167995098j)*x[2]**o + ((-0.141732860804-0.889426823313j))*x[2]
+            ref[(0, 0, 0)]+=(0.890031816344-0.482167995098j)*x_ref[2]**o + ((-0.141732860804-0.889426823313j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.784222772881-0.767257494518j)*x[2]**o + ((0.962106580861-0.267371828003j))*x[2]
+            ref[(0, 0, 1)]+=(-0.784222772881-0.767257494518j)*x_ref[2]**o + ((0.962106580861-0.267371828003j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.288785285616-0.726038195602j)*x[2]**o + ((-0.204828463332+0.536986101695j))*x[2]
+            ref[(0, 0, 2)]+=(-0.288785285616-0.726038195602j)*x_ref[2]**o + ((-0.204828463332+0.536986101695j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.0738236977175-0.595465692231j)*x[2]**o + ((0.264513516717-0.853862751525j))*x[2]
+            ref[(0, 1, 0)]+=(0.0738236977175-0.595465692231j)*x_ref[2]**o + ((0.264513516717-0.853862751525j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.446026429722+0.730634940385j)*x[2]**o + ((-0.698595670585+0.477818290585j))*x[2]
+            ref[(0, 1, 1)]+=(-0.446026429722+0.730634940385j)*x_ref[2]**o + ((-0.698595670585+0.477818290585j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.584663437383-0.477597543842j)*x[2]**o + ((-0.981194923069+0.570026811397j))*x[2]
+            ref[(0, 1, 2)]+=(0.584663437383-0.477597543842j)*x_ref[2]**o + ((-0.981194923069+0.570026811397j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.136640466319+0.139324413395j)*x[2]**o + ((0.802607350954-0.273498316487j))*x[2]
+            ref[(1, 0, 0)]+=(0.136640466319+0.139324413395j)*x_ref[2]**o + ((0.802607350954-0.273498316487j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.723777440902+0.626356241762j)*x[2]**o + ((0.0588152546395-0.929731400425j))*x[2]
+            ref[(1, 0, 1)]+=(-0.723777440902+0.626356241762j)*x_ref[2]**o + ((0.0588152546395-0.929731400425j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.934240682904-0.980025014198j)*x[2]**o + ((-0.705553686109+0.7744658202j))*x[2]
+            ref[(1, 0, 2)]+=(-0.934240682904-0.980025014198j)*x_ref[2]**o + ((-0.705553686109+0.7744658202j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.0743007958336-0.891918988303j)*x[2]**o + ((-0.150422306968-0.783695572292j))*x[2]
+            ref[(1, 1, 0)]+=(-0.0743007958336-0.891918988303j)*x_ref[2]**o + ((-0.150422306968-0.783695572292j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.890992725787-0.116001897695j)*x[2]**o + ((0.243629991238-0.428160724769j))*x[2]
+            ref[(1, 1, 1)]+=(-0.890992725787-0.116001897695j)*x_ref[2]**o + ((0.243629991238-0.428160724769j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.914762414172+0.147876172866j)*x[2]**o + ((-0.987564513217-0.484011554944j))*x[2]
+            ref[(1, 1, 2)]+=(0.914762414172+0.147876172866j)*x_ref[2]**o + ((-0.987564513217-0.484011554944j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.487013296082-0.908538126886j)*x[2]**o + ((0.946468098931+0.664602132181j))*x[2]
+            ref[(2, 0, 0)]+=(0.487013296082-0.908538126886j)*x_ref[2]**o + ((0.946468098931+0.664602132181j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.82086017344+0.192655455227j)*x[2]**o + ((0.234434476027-0.0483495624563j))*x[2]
+            ref[(2, 0, 1)]+=(-0.82086017344+0.192655455227j)*x_ref[2]**o + ((0.234434476027-0.0483495624563j))*x_ref[2]
+            arg[(2, 0, 2)]+=(0.653444596159-0.518508173434j)*x[2]**o + ((-0.980721938897+0.0329789671362j))*x[2]
+            ref[(2, 0, 2)]+=(0.653444596159-0.518508173434j)*x_ref[2]**o + ((-0.980721938897+0.0329789671362j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.466948232379+0.875635742007j)*x[2]**o + ((-0.67467479833-0.668580471969j))*x[2]
+            ref[(2, 1, 0)]+=(-0.466948232379+0.875635742007j)*x_ref[2]**o + ((-0.67467479833-0.668580471969j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.257474281959-0.573133600379j)*x[2]**o + ((0.115794115176+0.0846082777003j))*x[2]
+            ref[(2, 1, 1)]+=(0.257474281959-0.573133600379j)*x_ref[2]**o + ((0.115794115176+0.0846082777003j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.599863263253+0.714050043553j)*x[2]**o + ((-0.120204722675-0.265609756137j))*x[2]
+            ref[(2, 1, 2)]+=(-0.599863263253+0.714050043553j)*x_ref[2]**o + ((-0.120204722675-0.265609756137j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.436052943656-0.04861147262j)*x[2]**o + ((0.970918633399+0.502476538454j))*x[2]
+            ref[(3, 0, 0)]+=(0.436052943656-0.04861147262j)*x_ref[2]**o + ((0.970918633399+0.502476538454j))*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.242032678499+0.189318029754j)*x[2]**o + ((0.834562256509+0.0049898181356j))*x[2]
+            ref[(3, 0, 1)]+=(-0.242032678499+0.189318029754j)*x_ref[2]**o + ((0.834562256509+0.0049898181356j))*x_ref[2]
+            arg[(3, 0, 2)]+=(0.469711452717+0.442032960572j)*x[2]**o + ((0.415674609279+0.249723603128j))*x[2]
+            ref[(3, 0, 2)]+=(0.469711452717+0.442032960572j)*x_ref[2]**o + ((0.415674609279+0.249723603128j))*x_ref[2]
+            arg[(3, 1, 0)]+=(0.497817545199-0.439053854403j)*x[2]**o + ((-0.431831576327+0.352837425929j))*x[2]
+            ref[(3, 1, 0)]+=(0.497817545199-0.439053854403j)*x_ref[2]**o + ((-0.431831576327+0.352837425929j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.089433911351+0.202632664039j)*x[2]**o + ((-0.276849822362-0.152858013744j))*x[2]
+            ref[(3, 1, 1)]+=(0.089433911351+0.202632664039j)*x_ref[2]**o + ((-0.276849822362-0.152858013744j))*x_ref[2]
+            arg[(3, 1, 2)]+=(0.840389985065+0.253397710079j)*x[2]**o + ((-0.69142579962+0.135915640806j))*x[2]
+            ref[(3, 1, 2)]+=(0.840389985065+0.253397710079j)*x_ref[2]**o + ((-0.69142579962+0.135915640806j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunction_fromData_Function_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3, 3),w)
+        ref = Data(0,(4, 3, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.477409028512+0.161429757217j)*x[0]**o + ((-0.500708098344+0.8289277756j))*x[0] + ((-0.932234608826-0.561028582779j))*x[1]**o + ((0.00831685744855+0.953912696383j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.477409028512+0.161429757217j)*x_ref[0]**o + ((-0.500708098344+0.8289277756j))*x_ref[0] + ((-0.932234608826-0.561028582779j))*x_ref[1]**o + ((0.00831685744855+0.953912696383j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.705453900501+0.208190569869j)*x[0]**o + ((0.416884132708-0.883805507744j))*x[0] + ((0.14551091452+0.446779465092j))*x[1]**o + ((-0.424799896945+0.541804955265j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.705453900501+0.208190569869j)*x_ref[0]**o + ((0.416884132708-0.883805507744j))*x_ref[0] + ((0.14551091452+0.446779465092j))*x_ref[1]**o + ((-0.424799896945+0.541804955265j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.572508265952+0.514564926735j)*x[0]**o + ((0.446071800792-0.243332733656j))*x[0] + ((0.420018272214-0.158758810892j))*x[1]**o + ((0.103228931929+0.603877694073j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.572508265952+0.514564926735j)*x_ref[0]**o + ((0.446071800792-0.243332733656j))*x_ref[0] + ((0.420018272214-0.158758810892j))*x_ref[1]**o + ((0.103228931929+0.603877694073j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.397194469873+0.369532156802j)*x[0]**o + ((0.300475563808-0.127300844917j))*x[0] + ((-0.725974373353+0.663229335871j))*x[1]**o + ((0.997276090695-0.592403989356j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.397194469873+0.369532156802j)*x_ref[0]**o + ((0.300475563808-0.127300844917j))*x_ref[0] + ((-0.725974373353+0.663229335871j))*x_ref[1]**o + ((0.997276090695-0.592403989356j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.055597854028+0.392616611016j)*x[0]**o + ((0.107382334393+0.714870059539j))*x[0] + ((0.0499670219276-0.385783249414j))*x[1]**o + ((0.75133070042+0.783963292577j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.055597854028+0.392616611016j)*x_ref[0]**o + ((0.107382334393+0.714870059539j))*x_ref[0] + ((0.0499670219276-0.385783249414j))*x_ref[1]**o + ((0.75133070042+0.783963292577j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.429278319917-0.453255599169j)*x[0]**o + ((-0.468869878977-0.139830943696j))*x[0] + ((-0.691282525305-0.294763280858j))*x[1]**o + ((-0.70244122457+0.221979467023j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.429278319917-0.453255599169j)*x_ref[0]**o + ((-0.468869878977-0.139830943696j))*x_ref[0] + ((-0.691282525305-0.294763280858j))*x_ref[1]**o + ((-0.70244122457+0.221979467023j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.453033393005+0.323459617155j)*x[0]**o + ((0.745896721398-0.415203015668j))*x[0] + ((0.908493847812+0.240689104108j))*x[1]**o + ((0.183582900085+0.829242456037j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.453033393005+0.323459617155j)*x_ref[0]**o + ((0.745896721398-0.415203015668j))*x_ref[0] + ((0.908493847812+0.240689104108j))*x_ref[1]**o + ((0.183582900085+0.829242456037j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.838106748423-0.188119092551j)*x[0]**o + ((-0.240038762513+0.697104869727j))*x[0] + ((-0.864789940816-0.18231415347j))*x[1]**o + ((-0.275652236506-0.75000317555j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.838106748423-0.188119092551j)*x_ref[0]**o + ((-0.240038762513+0.697104869727j))*x_ref[0] + ((-0.864789940816-0.18231415347j))*x_ref[1]**o + ((-0.275652236506-0.75000317555j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.81835377964+0.672346999143j)*x[0]**o + ((0.161384511864+0.186872033905j))*x[0] + ((-0.470022446128-0.0307301620768j))*x[1]**o + ((0.887089783767+0.857774172777j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.81835377964+0.672346999143j)*x_ref[0]**o + ((0.161384511864+0.186872033905j))*x_ref[0] + ((-0.470022446128-0.0307301620768j))*x_ref[1]**o + ((0.887089783767+0.857774172777j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.642505189988-0.359774800198j)*x[0]**o + ((0.983052432909+0.219508437378j))*x[0] + ((-0.936607514743-0.188135878307j))*x[1]**o + ((-0.600824007311-0.265191989524j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.642505189988-0.359774800198j)*x_ref[0]**o + ((0.983052432909+0.219508437378j))*x_ref[0] + ((-0.936607514743-0.188135878307j))*x_ref[1]**o + ((-0.600824007311-0.265191989524j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.990015450885-0.776588182428j)*x[0]**o + ((-0.534457541141+0.601179528733j))*x[0] + ((-0.197017227119-0.683835368872j))*x[1]**o + ((-0.648633600533+0.440111393045j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.990015450885-0.776588182428j)*x_ref[0]**o + ((-0.534457541141+0.601179528733j))*x_ref[0] + ((-0.197017227119-0.683835368872j))*x_ref[1]**o + ((-0.648633600533+0.440111393045j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.0253833350483+0.979649264819j)*x[0]**o + ((0.0490845865689+0.818692534367j))*x[0] + ((-0.697400937856-0.0922981313929j))*x[1]**o + ((-0.618569025842+0.76149817828j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.0253833350483+0.979649264819j)*x_ref[0]**o + ((0.0490845865689+0.818692534367j))*x_ref[0] + ((-0.697400937856-0.0922981313929j))*x_ref[1]**o + ((-0.618569025842+0.76149817828j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.250732370132-0.00536560952489j)*x[0]**o + ((-0.0397659877456-0.79704118366j))*x[0] + ((0.214453808496-0.00238646220594j))*x[1]**o + ((-0.545392759693-0.158332895063j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.250732370132-0.00536560952489j)*x_ref[0]**o + ((-0.0397659877456-0.79704118366j))*x_ref[0] + ((0.214453808496-0.00238646220594j))*x_ref[1]**o + ((-0.545392759693-0.158332895063j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.700896085557-0.167077481295j)*x[0]**o + ((-0.721957303751-0.169727325559j))*x[0] + ((-0.609298937896-0.404741741018j))*x[1]**o + ((-0.246563483747-0.802217414483j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.700896085557-0.167077481295j)*x_ref[0]**o + ((-0.721957303751-0.169727325559j))*x_ref[0] + ((-0.609298937896-0.404741741018j))*x_ref[1]**o + ((-0.246563483747-0.802217414483j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.638384918363-0.598438273277j)*x[0]**o + ((0.0213765185135+0.616589541373j))*x[0] + ((-0.0572159752229-0.286125786807j))*x[1]**o + ((0.36996978136-0.563121775786j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.638384918363-0.598438273277j)*x_ref[0]**o + ((0.0213765185135+0.616589541373j))*x_ref[0] + ((-0.0572159752229-0.286125786807j))*x_ref[1]**o + ((0.36996978136-0.563121775786j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.168323444824-0.033874467092j)*x[0]**o + ((0.855351236665-0.762235120832j))*x[0] + ((0.618776433379+0.357835747789j))*x[1]**o + ((-0.92729622683+0.549081715225j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.168323444824-0.033874467092j)*x_ref[0]**o + ((0.855351236665-0.762235120832j))*x_ref[0] + ((0.618776433379+0.357835747789j))*x_ref[1]**o + ((-0.92729622683+0.549081715225j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.861164841049-0.306929519548j)*x[0]**o + ((-0.164123341515+0.514787797026j))*x[0] + ((-0.530431156998-0.54952695844j))*x[1]**o + ((-0.287256582449-0.329809797267j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.861164841049-0.306929519548j)*x_ref[0]**o + ((-0.164123341515+0.514787797026j))*x_ref[0] + ((-0.530431156998-0.54952695844j))*x_ref[1]**o + ((-0.287256582449-0.329809797267j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.641857696261-0.353489421406j)*x[0]**o + ((0.760218936018+0.895760152942j))*x[0] + ((0.607597565616-0.0582571816108j))*x[1]**o + ((0.999234607605+0.154277664891j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.641857696261-0.353489421406j)*x_ref[0]**o + ((0.760218936018+0.895760152942j))*x_ref[0] + ((0.607597565616-0.0582571816108j))*x_ref[1]**o + ((0.999234607605+0.154277664891j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.87342816967+0.269252455368j)*x[0]**o + ((0.262977652317-0.0679374676236j))*x[0] + ((0.774855028146+0.583172040759j))*x[1]**o + ((0.356667977044+0.466652727859j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.87342816967+0.269252455368j)*x_ref[0]**o + ((0.262977652317-0.0679374676236j))*x_ref[0] + ((0.774855028146+0.583172040759j))*x_ref[1]**o + ((0.356667977044+0.466652727859j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.583903991611+0.81161794499j)*x[0]**o + ((-0.1610085059+0.260663993474j))*x[0] + ((-0.711933904577-0.42282325877j))*x[1]**o + ((-0.102009061726-0.424227804554j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.583903991611+0.81161794499j)*x_ref[0]**o + ((-0.1610085059+0.260663993474j))*x_ref[0] + ((-0.711933904577-0.42282325877j))*x_ref[1]**o + ((-0.102009061726-0.424227804554j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(-0.610129696311+0.871419119437j)*x[0]**o + ((0.378448730698-0.998334592723j))*x[0] + ((0.332967262715+0.692255273852j))*x[1]**o + ((0.348268711044+0.0445349849115j))*x[1]
+        ref[(0, 2, 0, 2)]=(-0.610129696311+0.871419119437j)*x_ref[0]**o + ((0.378448730698-0.998334592723j))*x_ref[0] + ((0.332967262715+0.692255273852j))*x_ref[1]**o + ((0.348268711044+0.0445349849115j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.781559630397-0.284006562521j)*x[0]**o + ((-0.695045146323+0.123681677003j))*x[0] + ((0.318468976161-0.37841233625j))*x[1]**o + ((0.641124122573+0.136091344307j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.781559630397-0.284006562521j)*x_ref[0]**o + ((-0.695045146323+0.123681677003j))*x_ref[0] + ((0.318468976161-0.37841233625j))*x_ref[1]**o + ((0.641124122573+0.136091344307j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.936951688787+0.90360034771j)*x[0]**o + ((-0.943649173375-0.66606369104j))*x[0] + ((0.367793643796-0.366560174828j))*x[1]**o + ((0.209794946947-0.210998254263j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.936951688787+0.90360034771j)*x_ref[0]**o + ((-0.943649173375-0.66606369104j))*x_ref[0] + ((0.367793643796-0.366560174828j))*x_ref[1]**o + ((0.209794946947-0.210998254263j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(-0.527503503844+0.453337074072j)*x[0]**o + ((-0.466460268001+0.0978569567023j))*x[0] + ((-0.558984432295+0.915698764493j))*x[1]**o + ((-0.216035424894+0.529372842836j))*x[1]
+        ref[(0, 2, 1, 2)]=(-0.527503503844+0.453337074072j)*x_ref[0]**o + ((-0.466460268001+0.0978569567023j))*x_ref[0] + ((-0.558984432295+0.915698764493j))*x_ref[1]**o + ((-0.216035424894+0.529372842836j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(0.807529271879+0.0284495575221j)*x[0]**o + ((-0.681747162814-0.775301129129j))*x[0] + ((-0.988924199478-0.957723122063j))*x[1]**o + ((-0.931616830393+0.492273319141j))*x[1]
+        ref[(0, 2, 2, 0)]=(0.807529271879+0.0284495575221j)*x_ref[0]**o + ((-0.681747162814-0.775301129129j))*x_ref[0] + ((-0.988924199478-0.957723122063j))*x_ref[1]**o + ((-0.931616830393+0.492273319141j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.205422949863-0.667367357166j)*x[0]**o + ((0.944186321996+0.116747628871j))*x[0] + ((-0.502470951503+0.0158840889942j))*x[1]**o + ((-0.127244145439-0.307030191734j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.205422949863-0.667367357166j)*x_ref[0]**o + ((0.944186321996+0.116747628871j))*x_ref[0] + ((-0.502470951503+0.0158840889942j))*x_ref[1]**o + ((-0.127244145439-0.307030191734j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(0.194990224499+0.18063083046j)*x[0]**o + ((-0.514918146362-0.58020414648j))*x[0] + ((-0.756170482939+0.949760049091j))*x[1]**o + ((0.164787325605+0.103616278887j))*x[1]
+        ref[(0, 2, 2, 2)]=(0.194990224499+0.18063083046j)*x_ref[0]**o + ((-0.514918146362-0.58020414648j))*x_ref[0] + ((-0.756170482939+0.949760049091j))*x_ref[1]**o + ((0.164787325605+0.103616278887j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.898476904944+0.715810511234j)*x[0]**o + ((-0.635923568567-0.275698233353j))*x[0] + ((-0.52426451189+0.102053240303j))*x[1]**o + ((0.707865966699-0.739030450015j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.898476904944+0.715810511234j)*x_ref[0]**o + ((-0.635923568567-0.275698233353j))*x_ref[0] + ((-0.52426451189+0.102053240303j))*x_ref[1]**o + ((0.707865966699-0.739030450015j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.831245095501-0.733718218924j)*x[0]**o + ((-0.23513252882-0.134081972543j))*x[0] + ((-0.440238108902+0.506144458572j))*x[1]**o + ((-0.81919835715-0.343825081344j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.831245095501-0.733718218924j)*x_ref[0]**o + ((-0.23513252882-0.134081972543j))*x_ref[0] + ((-0.440238108902+0.506144458572j))*x_ref[1]**o + ((-0.81919835715-0.343825081344j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.842390138947-0.37068595119j)*x[0]**o + ((-0.442453140411+0.315301488813j))*x[0] + ((0.898976018267+0.130191618281j))*x[1]**o + ((-0.720741637821+0.881295764539j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.842390138947-0.37068595119j)*x_ref[0]**o + ((-0.442453140411+0.315301488813j))*x_ref[0] + ((0.898976018267+0.130191618281j))*x_ref[1]**o + ((-0.720741637821+0.881295764539j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.236165793749+0.950934286436j)*x[0]**o + ((0.339640196459-0.12746281235j))*x[0] + ((-0.453860694267-0.940392725856j))*x[1]**o + ((-0.851858885396-0.945941882234j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.236165793749+0.950934286436j)*x_ref[0]**o + ((0.339640196459-0.12746281235j))*x_ref[0] + ((-0.453860694267-0.940392725856j))*x_ref[1]**o + ((-0.851858885396-0.945941882234j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.0791747612221-0.895922282907j)*x[0]**o + ((0.926402970381-0.674356234313j))*x[0] + ((-0.969149643169-0.138912239366j))*x[1]**o + ((0.404449610156-0.709687626639j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.0791747612221-0.895922282907j)*x_ref[0]**o + ((0.926402970381-0.674356234313j))*x_ref[0] + ((-0.969149643169-0.138912239366j))*x_ref[1]**o + ((0.404449610156-0.709687626639j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.961238789826-0.362837861451j)*x[0]**o + ((-0.370163035732-0.67986542325j))*x[0] + ((0.619510817188+0.741311061352j))*x[1]**o + ((0.245133059781+0.30242378274j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.961238789826-0.362837861451j)*x_ref[0]**o + ((-0.370163035732-0.67986542325j))*x_ref[0] + ((0.619510817188+0.741311061352j))*x_ref[1]**o + ((0.245133059781+0.30242378274j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.709498986444-0.795764639887j)*x[0]**o + ((-0.234195005471+0.0073956404799j))*x[0] + ((-0.914985912459+0.996408304677j))*x[1]**o + ((0.726017048333+0.53913234935j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.709498986444-0.795764639887j)*x_ref[0]**o + ((-0.234195005471+0.0073956404799j))*x_ref[0] + ((-0.914985912459+0.996408304677j))*x_ref[1]**o + ((0.726017048333+0.53913234935j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.478683506095-0.860913627688j)*x[0]**o + ((0.798153185258+0.747082181118j))*x[0] + ((-0.587930534527-0.185672886389j))*x[1]**o + ((-0.38841366029-0.398816975052j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.478683506095-0.860913627688j)*x_ref[0]**o + ((0.798153185258+0.747082181118j))*x_ref[0] + ((-0.587930534527-0.185672886389j))*x_ref[1]**o + ((-0.38841366029-0.398816975052j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.746631342335+0.719902170746j)*x[0]**o + ((0.681185783551-0.885861847613j))*x[0] + ((0.0447028728609-0.147119202792j))*x[1]**o + ((-0.724974715238-0.147737342739j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.746631342335+0.719902170746j)*x_ref[0]**o + ((0.681185783551-0.885861847613j))*x_ref[0] + ((0.0447028728609-0.147119202792j))*x_ref[1]**o + ((-0.724974715238-0.147737342739j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.172187261241+0.790584525332j)*x[0]**o + ((0.461196261617+0.32341541967j))*x[0] + ((0.248250415555+0.518973181876j))*x[1]**o + ((-0.299079824784-0.0575843368022j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.172187261241+0.790584525332j)*x_ref[0]**o + ((0.461196261617+0.32341541967j))*x_ref[0] + ((0.248250415555+0.518973181876j))*x_ref[1]**o + ((-0.299079824784-0.0575843368022j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.798041138658+0.133619357837j)*x[0]**o + ((-0.105026409315+0.254994019992j))*x[0] + ((-0.502797745146-0.517638073483j))*x[1]**o + ((-0.588381174936+0.466134293012j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.798041138658+0.133619357837j)*x_ref[0]**o + ((-0.105026409315+0.254994019992j))*x_ref[0] + ((-0.502797745146-0.517638073483j))*x_ref[1]**o + ((-0.588381174936+0.466134293012j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.72637705708-0.535286448182j)*x[0]**o + ((-0.710062719373+0.207409227941j))*x[0] + ((0.90716228444+0.643171956084j))*x[1]**o + ((-0.257602865436-0.841866304983j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.72637705708-0.535286448182j)*x_ref[0]**o + ((-0.710062719373+0.207409227941j))*x_ref[0] + ((0.90716228444+0.643171956084j))*x_ref[1]**o + ((-0.257602865436-0.841866304983j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.550922821715+0.0177966024768j)*x[0]**o + ((-0.595801488735+0.17591712356j))*x[0] + ((-0.263275645676+0.369602272266j))*x[1]**o + ((-0.240417465803-0.69014661237j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.550922821715+0.0177966024768j)*x_ref[0]**o + ((-0.595801488735+0.17591712356j))*x_ref[0] + ((-0.263275645676+0.369602272266j))*x_ref[1]**o + ((-0.240417465803-0.69014661237j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.633632854523+0.964300530142j)*x[0]**o + ((0.963632854274+0.492594474153j))*x[0] + ((-0.745718630941+0.0319427326294j))*x[1]**o + ((-0.93918443234+0.635157960269j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.633632854523+0.964300530142j)*x_ref[0]**o + ((0.963632854274+0.492594474153j))*x_ref[0] + ((-0.745718630941+0.0319427326294j))*x_ref[1]**o + ((-0.93918443234+0.635157960269j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.381804361556+0.831778260322j)*x[0]**o + ((-0.539996817403-0.678552707741j))*x[0] + ((-0.108275172294-0.992170259777j))*x[1]**o + ((0.880579417501+0.138561245853j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.381804361556+0.831778260322j)*x_ref[0]**o + ((-0.539996817403-0.678552707741j))*x_ref[0] + ((-0.108275172294-0.992170259777j))*x_ref[1]**o + ((0.880579417501+0.138561245853j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.609365499934-0.15212538089j)*x[0]**o + ((0.951596405855-0.086369493036j))*x[0] + ((0.00574270400004-0.477554134561j))*x[1]**o + ((-0.499231411225-0.110811603921j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.609365499934-0.15212538089j)*x_ref[0]**o + ((0.951596405855-0.086369493036j))*x_ref[0] + ((0.00574270400004-0.477554134561j))*x_ref[1]**o + ((-0.499231411225-0.110811603921j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.720144443767+0.441601996289j)*x[0]**o + ((-0.461166341839-0.165631551592j))*x[0] + ((-0.308006976004+0.360257906652j))*x[1]**o + ((-0.960587923529-0.510960294129j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.720144443767+0.441601996289j)*x_ref[0]**o + ((-0.461166341839-0.165631551592j))*x_ref[0] + ((-0.308006976004+0.360257906652j))*x_ref[1]**o + ((-0.960587923529-0.510960294129j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(0.135640188052-0.952987018969j)*x[0]**o + ((0.927543638538+0.677711754746j))*x[0] + ((-0.140853405044-0.717469729225j))*x[1]**o + ((-0.820571013679-0.489291676156j))*x[1]
+        ref[(1, 1, 2, 2)]=(0.135640188052-0.952987018969j)*x_ref[0]**o + ((0.927543638538+0.677711754746j))*x_ref[0] + ((-0.140853405044-0.717469729225j))*x_ref[1]**o + ((-0.820571013679-0.489291676156j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.684810500571+0.105478761377j)*x[0]**o + ((-0.659094899019+0.698299775421j))*x[0] + ((-0.708971578983+0.444287121541j))*x[1]**o + ((0.909352492878+0.968239167625j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.684810500571+0.105478761377j)*x_ref[0]**o + ((-0.659094899019+0.698299775421j))*x_ref[0] + ((-0.708971578983+0.444287121541j))*x_ref[1]**o + ((0.909352492878+0.968239167625j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.506839832408-0.371130825106j)*x[0]**o + ((0.646802292781-0.1672065664j))*x[0] + ((0.592171296921+0.102635589084j))*x[1]**o + ((-0.342632889232-0.871365287612j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.506839832408-0.371130825106j)*x_ref[0]**o + ((0.646802292781-0.1672065664j))*x_ref[0] + ((0.592171296921+0.102635589084j))*x_ref[1]**o + ((-0.342632889232-0.871365287612j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(-0.392506495307-0.313856786184j)*x[0]**o + ((-0.551662501913-0.146160321224j))*x[0] + ((-0.794819726634+0.974146484655j))*x[1]**o + ((0.533220435397+0.372662412716j))*x[1]
+        ref[(1, 2, 0, 2)]=(-0.392506495307-0.313856786184j)*x_ref[0]**o + ((-0.551662501913-0.146160321224j))*x_ref[0] + ((-0.794819726634+0.974146484655j))*x_ref[1]**o + ((0.533220435397+0.372662412716j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.269978190445+0.859759193601j)*x[0]**o + ((0.16243269435+0.194980960228j))*x[0] + ((0.886695422699-0.177604535339j))*x[1]**o + ((0.913073860872+0.121813527113j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.269978190445+0.859759193601j)*x_ref[0]**o + ((0.16243269435+0.194980960228j))*x_ref[0] + ((0.886695422699-0.177604535339j))*x_ref[1]**o + ((0.913073860872+0.121813527113j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.145276024054-0.104400584325j)*x[0]**o + ((0.397252376284-0.732120703523j))*x[0] + ((-0.811490797747+0.0363740849427j))*x[1]**o + ((0.613369421527-0.868945810769j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.145276024054-0.104400584325j)*x_ref[0]**o + ((0.397252376284-0.732120703523j))*x_ref[0] + ((-0.811490797747+0.0363740849427j))*x_ref[1]**o + ((0.613369421527-0.868945810769j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.0149583280119-0.288463343826j)*x[0]**o + ((-0.409637991566+0.0191039514848j))*x[0] + ((0.124489405528-0.246757030415j))*x[1]**o + ((-0.906775232637+0.0236280883647j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.0149583280119-0.288463343826j)*x_ref[0]**o + ((-0.409637991566+0.0191039514848j))*x_ref[0] + ((0.124489405528-0.246757030415j))*x_ref[1]**o + ((-0.906775232637+0.0236280883647j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.474009460155+0.0948810973702j)*x[0]**o + ((-0.397024374418-0.234216143436j))*x[0] + ((0.593703365552-0.823306613424j))*x[1]**o + ((-0.93931529251+0.390173631644j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.474009460155+0.0948810973702j)*x_ref[0]**o + ((-0.397024374418-0.234216143436j))*x_ref[0] + ((0.593703365552-0.823306613424j))*x_ref[1]**o + ((-0.93931529251+0.390173631644j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.863580864084+0.15573914845j)*x[0]**o + ((-0.281780613623-0.755401126274j))*x[0] + ((0.440014295331+0.205370413269j))*x[1]**o + ((0.457412644711+0.169836227829j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.863580864084+0.15573914845j)*x_ref[0]**o + ((-0.281780613623-0.755401126274j))*x_ref[0] + ((0.440014295331+0.205370413269j))*x_ref[1]**o + ((0.457412644711+0.169836227829j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(-0.658935071085+0.362450352165j)*x[0]**o + ((-0.94047640887-0.380927900895j))*x[0] + ((-0.374698841743-0.419756650222j))*x[1]**o + ((-0.629169930763-0.868220648023j))*x[1]
+        ref[(1, 2, 2, 2)]=(-0.658935071085+0.362450352165j)*x_ref[0]**o + ((-0.94047640887-0.380927900895j))*x_ref[0] + ((-0.374698841743-0.419756650222j))*x_ref[1]**o + ((-0.629169930763-0.868220648023j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.94460742599-0.674288461354j)*x[0]**o + ((-0.611470484793-0.794247992932j))*x[0] + ((-0.137634186514-0.56885367593j))*x[1]**o + ((0.459410951401+0.341133750379j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.94460742599-0.674288461354j)*x_ref[0]**o + ((-0.611470484793-0.794247992932j))*x_ref[0] + ((-0.137634186514-0.56885367593j))*x_ref[1]**o + ((0.459410951401+0.341133750379j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.989964307578+0.218254432761j)*x[0]**o + ((-0.548016183373+0.936606879675j))*x[0] + ((-0.726765674008+0.43534822522j))*x[1]**o + ((-0.559928318227-0.969861335503j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.989964307578+0.218254432761j)*x_ref[0]**o + ((-0.548016183373+0.936606879675j))*x_ref[0] + ((-0.726765674008+0.43534822522j))*x_ref[1]**o + ((-0.559928318227-0.969861335503j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(-0.0166775721056-0.634973256725j)*x[0]**o + ((-0.0970410700065+0.560746166995j))*x[0] + ((0.179135369161-0.161448819008j))*x[1]**o + ((-0.796572240854+0.5306671016j))*x[1]
+        ref[(2, 0, 0, 2)]=(-0.0166775721056-0.634973256725j)*x_ref[0]**o + ((-0.0970410700065+0.560746166995j))*x_ref[0] + ((0.179135369161-0.161448819008j))*x_ref[1]**o + ((-0.796572240854+0.5306671016j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.1595247266-0.206123883619j)*x[0]**o + ((0.840836891872-0.96810466262j))*x[0] + ((-0.857577625909+0.975362717651j))*x[1]**o + ((0.760659610373+0.277578251439j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.1595247266-0.206123883619j)*x_ref[0]**o + ((0.840836891872-0.96810466262j))*x_ref[0] + ((-0.857577625909+0.975362717651j))*x_ref[1]**o + ((0.760659610373+0.277578251439j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.903319849966+0.337493059016j)*x[0]**o + ((-0.445274969973-0.605106909323j))*x[0] + ((-0.735905940037+0.206653255766j))*x[1]**o + ((-0.805673070834+0.828469658551j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.903319849966+0.337493059016j)*x_ref[0]**o + ((-0.445274969973-0.605106909323j))*x_ref[0] + ((-0.735905940037+0.206653255766j))*x_ref[1]**o + ((-0.805673070834+0.828469658551j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.0151868032948-0.368843809928j)*x[0]**o + ((-0.180923264156-0.990881492762j))*x[0] + ((-0.500368597781-0.302609401306j))*x[1]**o + ((0.319736367336+0.756320935598j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.0151868032948-0.368843809928j)*x_ref[0]**o + ((-0.180923264156-0.990881492762j))*x_ref[0] + ((-0.500368597781-0.302609401306j))*x_ref[1]**o + ((0.319736367336+0.756320935598j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(0.618981257789+0.659592059846j)*x[0]**o + ((-0.540934383969+0.501678145551j))*x[0] + ((-0.124163100895-0.260050668786j))*x[1]**o + ((-0.42979918326+0.312848967018j))*x[1]
+        ref[(2, 0, 2, 0)]=(0.618981257789+0.659592059846j)*x_ref[0]**o + ((-0.540934383969+0.501678145551j))*x_ref[0] + ((-0.124163100895-0.260050668786j))*x_ref[1]**o + ((-0.42979918326+0.312848967018j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.333305692825+0.760046717912j)*x[0]**o + ((-0.654814137665+0.561184020617j))*x[0] + ((-0.682967286341+0.980550290494j))*x[1]**o + ((0.752652999698-0.12644100558j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.333305692825+0.760046717912j)*x_ref[0]**o + ((-0.654814137665+0.561184020617j))*x_ref[0] + ((-0.682967286341+0.980550290494j))*x_ref[1]**o + ((0.752652999698-0.12644100558j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(-0.261185283336+0.866829048867j)*x[0]**o + ((0.806530601551+0.0247859433332j))*x[0] + ((0.393231630786-0.502668196726j))*x[1]**o + ((-0.241772331351-0.207251570556j))*x[1]
+        ref[(2, 0, 2, 2)]=(-0.261185283336+0.866829048867j)*x_ref[0]**o + ((0.806530601551+0.0247859433332j))*x_ref[0] + ((0.393231630786-0.502668196726j))*x_ref[1]**o + ((-0.241772331351-0.207251570556j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.185293379108+0.649141464961j)*x[0]**o + ((-0.535564385609+0.348294635913j))*x[0] + ((0.290146692787-0.652435601919j))*x[1]**o + ((0.204891916136-0.961219149848j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.185293379108+0.649141464961j)*x_ref[0]**o + ((-0.535564385609+0.348294635913j))*x_ref[0] + ((0.290146692787-0.652435601919j))*x_ref[1]**o + ((0.204891916136-0.961219149848j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.606031905674+0.28059986212j)*x[0]**o + ((-0.112223777167-0.546061572988j))*x[0] + ((0.220484631912-0.289660797034j))*x[1]**o + ((-0.427776515532+0.744028790402j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.606031905674+0.28059986212j)*x_ref[0]**o + ((-0.112223777167-0.546061572988j))*x_ref[0] + ((0.220484631912-0.289660797034j))*x_ref[1]**o + ((-0.427776515532+0.744028790402j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.849601421931+0.0798848633512j)*x[0]**o + ((0.514365058968+0.935273817723j))*x[0] + ((0.0202307066661+0.99051428205j))*x[1]**o + ((0.119705092577-0.988473300918j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.849601421931+0.0798848633512j)*x_ref[0]**o + ((0.514365058968+0.935273817723j))*x_ref[0] + ((0.0202307066661+0.99051428205j))*x_ref[1]**o + ((0.119705092577-0.988473300918j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.281711049671+0.328431904497j)*x[0]**o + ((-0.0593856205843+0.352462690458j))*x[0] + ((-0.952501981335+0.880227373503j))*x[1]**o + ((-0.749344101095+0.797444196229j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.281711049671+0.328431904497j)*x_ref[0]**o + ((-0.0593856205843+0.352462690458j))*x_ref[0] + ((-0.952501981335+0.880227373503j))*x_ref[1]**o + ((-0.749344101095+0.797444196229j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.774613190813-0.80410383806j)*x[0]**o + ((0.704467281691+0.927209617074j))*x[0] + ((0.343487597353-0.518775074099j))*x[1]**o + ((-0.186261558223-0.509654215231j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.774613190813-0.80410383806j)*x_ref[0]**o + ((0.704467281691+0.927209617074j))*x_ref[0] + ((0.343487597353-0.518775074099j))*x_ref[1]**o + ((-0.186261558223-0.509654215231j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.483771868833+0.959968268925j)*x[0]**o + ((0.406724040954-0.906811106546j))*x[0] + ((0.475857912395-0.278137031312j))*x[1]**o + ((-0.741364444162-0.805518697316j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.483771868833+0.959968268925j)*x_ref[0]**o + ((0.406724040954-0.906811106546j))*x_ref[0] + ((0.475857912395-0.278137031312j))*x_ref[1]**o + ((-0.741364444162-0.805518697316j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.47290464112-0.587621040078j)*x[0]**o + ((0.706976556076+0.29368759195j))*x[0] + ((-0.773890577631-0.530322819478j))*x[1]**o + ((-0.683796945878+0.466236271351j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.47290464112-0.587621040078j)*x_ref[0]**o + ((0.706976556076+0.29368759195j))*x_ref[0] + ((-0.773890577631-0.530322819478j))*x_ref[1]**o + ((-0.683796945878+0.466236271351j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(0.64974367663+0.775753084406j)*x[0]**o + ((0.877652064006+0.737811787771j))*x[0] + ((0.772602230957-0.308126809545j))*x[1]**o + ((0.278304928772+0.159387074968j))*x[1]
+        ref[(2, 1, 2, 1)]=(0.64974367663+0.775753084406j)*x_ref[0]**o + ((0.877652064006+0.737811787771j))*x_ref[0] + ((0.772602230957-0.308126809545j))*x_ref[1]**o + ((0.278304928772+0.159387074968j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(0.844774443019+0.929634715801j)*x[0]**o + ((-0.341079659949+0.692374772551j))*x[0] + ((0.0183077986093-0.902381906294j))*x[1]**o + ((-0.156921514459-0.966493029757j))*x[1]
+        ref[(2, 1, 2, 2)]=(0.844774443019+0.929634715801j)*x_ref[0]**o + ((-0.341079659949+0.692374772551j))*x_ref[0] + ((0.0183077986093-0.902381906294j))*x_ref[1]**o + ((-0.156921514459-0.966493029757j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.728381538206+0.449950254565j)*x[0]**o + ((-0.405015677314-0.139586299041j))*x[0] + ((0.448662850649+0.289932749478j))*x[1]**o + ((-0.422492447509+0.84068290559j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.728381538206+0.449950254565j)*x_ref[0]**o + ((-0.405015677314-0.139586299041j))*x_ref[0] + ((0.448662850649+0.289932749478j))*x_ref[1]**o + ((-0.422492447509+0.84068290559j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.270271116846+0.633018339944j)*x[0]**o + ((0.400725388829-0.481640297645j))*x[0] + ((0.865112148539+0.294714866248j))*x[1]**o + ((-0.410849785744-0.400288797676j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.270271116846+0.633018339944j)*x_ref[0]**o + ((0.400725388829-0.481640297645j))*x_ref[0] + ((0.865112148539+0.294714866248j))*x_ref[1]**o + ((-0.410849785744-0.400288797676j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(0.0558472153169-0.0535418805384j)*x[0]**o + ((0.855523078066+0.410089804372j))*x[0] + ((0.43827525166-0.315459011764j))*x[1]**o + ((0.441315855007-0.515102154001j))*x[1]
+        ref[(2, 2, 0, 2)]=(0.0558472153169-0.0535418805384j)*x_ref[0]**o + ((0.855523078066+0.410089804372j))*x_ref[0] + ((0.43827525166-0.315459011764j))*x_ref[1]**o + ((0.441315855007-0.515102154001j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.138636334186-0.339211514686j)*x[0]**o + ((-0.154794127445-0.362894097109j))*x[0] + ((0.833750625031+0.222636844459j))*x[1]**o + ((0.326263547841+0.210623717585j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.138636334186-0.339211514686j)*x_ref[0]**o + ((-0.154794127445-0.362894097109j))*x_ref[0] + ((0.833750625031+0.222636844459j))*x_ref[1]**o + ((0.326263547841+0.210623717585j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.690102771708-0.131842788483j)*x[0]**o + ((-0.656077658934-0.675936349527j))*x[0] + ((0.443775820471+0.328944102735j))*x[1]**o + ((0.738759024311-0.540520900611j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.690102771708-0.131842788483j)*x_ref[0]**o + ((-0.656077658934-0.675936349527j))*x_ref[0] + ((0.443775820471+0.328944102735j))*x_ref[1]**o + ((0.738759024311-0.540520900611j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(0.0728911648158-0.65931022005j)*x[0]**o + ((-0.196232959029-0.84144428115j))*x[0] + ((0.775688324524-0.625734866231j))*x[1]**o + ((0.562976971543-0.62422770679j))*x[1]
+        ref[(2, 2, 1, 2)]=(0.0728911648158-0.65931022005j)*x_ref[0]**o + ((-0.196232959029-0.84144428115j))*x_ref[0] + ((0.775688324524-0.625734866231j))*x_ref[1]**o + ((0.562976971543-0.62422770679j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(0.30027845402+0.615108229151j)*x[0]**o + ((-0.736338413656-0.18113730295j))*x[0] + ((0.983690331629-0.375179471685j))*x[1]**o + ((-0.70679025265+0.271454031909j))*x[1]
+        ref[(2, 2, 2, 0)]=(0.30027845402+0.615108229151j)*x_ref[0]**o + ((-0.736338413656-0.18113730295j))*x_ref[0] + ((0.983690331629-0.375179471685j))*x_ref[1]**o + ((-0.70679025265+0.271454031909j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.294251932932-0.204700916472j)*x[0]**o + ((-0.438238083386+0.206279290254j))*x[0] + ((0.77965009264-0.884336065573j))*x[1]**o + ((0.640752319748+0.865999032572j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.294251932932-0.204700916472j)*x_ref[0]**o + ((-0.438238083386+0.206279290254j))*x_ref[0] + ((0.77965009264-0.884336065573j))*x_ref[1]**o + ((0.640752319748+0.865999032572j))*x_ref[1]
+        arg[(2, 2, 2, 2)]=(-0.60682740367+0.0860762883271j)*x[0]**o + ((0.0209850123249-0.941040375583j))*x[0] + ((0.565639770754-0.839967204851j))*x[1]**o + ((0.387544510367+0.501399136286j))*x[1]
+        ref[(2, 2, 2, 2)]=(-0.60682740367+0.0860762883271j)*x_ref[0]**o + ((0.0209850123249-0.941040375583j))*x_ref[0] + ((0.565639770754-0.839967204851j))*x_ref[1]**o + ((0.387544510367+0.501399136286j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.63600748059-0.891693248684j)*x[0]**o + ((0.717402137615+0.342490677703j))*x[0] + ((-0.636654032686-0.458708410275j))*x[1]**o + ((0.946731495087+0.68193099948j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.63600748059-0.891693248684j)*x_ref[0]**o + ((0.717402137615+0.342490677703j))*x_ref[0] + ((-0.636654032686-0.458708410275j))*x_ref[1]**o + ((0.946731495087+0.68193099948j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.134195335958-0.0414603077563j)*x[0]**o + ((0.56007113598+0.332281595683j))*x[0] + ((0.298131112502+0.875245827918j))*x[1]**o + ((0.537942638023-0.100207622843j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.134195335958-0.0414603077563j)*x_ref[0]**o + ((0.56007113598+0.332281595683j))*x_ref[0] + ((0.298131112502+0.875245827918j))*x_ref[1]**o + ((0.537942638023-0.100207622843j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(-0.724236893998+0.806350220505j)*x[0]**o + ((-0.538292284203-0.977627332263j))*x[0] + ((-0.18227603301-0.933117670903j))*x[1]**o + ((-0.584496831887+0.578611623032j))*x[1]
+        ref[(3, 0, 0, 2)]=(-0.724236893998+0.806350220505j)*x_ref[0]**o + ((-0.538292284203-0.977627332263j))*x_ref[0] + ((-0.18227603301-0.933117670903j))*x_ref[1]**o + ((-0.584496831887+0.578611623032j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(-0.922351900993-0.227442359567j)*x[0]**o + ((0.00484746901732+0.740304968245j))*x[0] + ((0.66025239115-0.0614752939566j))*x[1]**o + ((0.726606546723+0.539602883351j))*x[1]
+        ref[(3, 0, 1, 0)]=(-0.922351900993-0.227442359567j)*x_ref[0]**o + ((0.00484746901732+0.740304968245j))*x_ref[0] + ((0.66025239115-0.0614752939566j))*x_ref[1]**o + ((0.726606546723+0.539602883351j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(-0.587384631535+0.691224408311j)*x[0]**o + ((0.576769344496+0.429752648181j))*x[0] + ((0.264095764881+0.625529273368j))*x[1]**o + ((0.713249125971+0.784452389952j))*x[1]
+        ref[(3, 0, 1, 1)]=(-0.587384631535+0.691224408311j)*x_ref[0]**o + ((0.576769344496+0.429752648181j))*x_ref[0] + ((0.264095764881+0.625529273368j))*x_ref[1]**o + ((0.713249125971+0.784452389952j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(0.743033713991-0.91098389533j)*x[0]**o + ((-0.72945068046-0.315472715298j))*x[0] + ((0.583492793882+0.628686469423j))*x[1]**o + ((-0.234688472379+0.252865248601j))*x[1]
+        ref[(3, 0, 1, 2)]=(0.743033713991-0.91098389533j)*x_ref[0]**o + ((-0.72945068046-0.315472715298j))*x_ref[0] + ((0.583492793882+0.628686469423j))*x_ref[1]**o + ((-0.234688472379+0.252865248601j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(0.765080176215+0.75054040309j)*x[0]**o + ((0.165005455421-0.597815783655j))*x[0] + ((-0.418823627936-0.300504088066j))*x[1]**o + ((0.585736451036-0.890880360503j))*x[1]
+        ref[(3, 0, 2, 0)]=(0.765080176215+0.75054040309j)*x_ref[0]**o + ((0.165005455421-0.597815783655j))*x_ref[0] + ((-0.418823627936-0.300504088066j))*x_ref[1]**o + ((0.585736451036-0.890880360503j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(0.397148928381+0.552091018367j)*x[0]**o + ((0.346439336415-0.158875076351j))*x[0] + ((-0.288850616781-0.809988841915j))*x[1]**o + ((-0.676264428783+0.143855848447j))*x[1]
+        ref[(3, 0, 2, 1)]=(0.397148928381+0.552091018367j)*x_ref[0]**o + ((0.346439336415-0.158875076351j))*x_ref[0] + ((-0.288850616781-0.809988841915j))*x_ref[1]**o + ((-0.676264428783+0.143855848447j))*x_ref[1]
+        arg[(3, 0, 2, 2)]=(-0.74522544408+0.153355242222j)*x[0]**o + ((0.390968822473+0.379996411697j))*x[0] + ((-0.564683361115+0.76565775961j))*x[1]**o + ((0.523447291717+0.830139551324j))*x[1]
+        ref[(3, 0, 2, 2)]=(-0.74522544408+0.153355242222j)*x_ref[0]**o + ((0.390968822473+0.379996411697j))*x_ref[0] + ((-0.564683361115+0.76565775961j))*x_ref[1]**o + ((0.523447291717+0.830139551324j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.166273012517+0.680850412272j)*x[0]**o + ((-0.0120702335245+0.849457419879j))*x[0] + ((0.219077974224-0.162461145709j))*x[1]**o + ((0.267382187742-0.705959844237j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.166273012517+0.680850412272j)*x_ref[0]**o + ((-0.0120702335245+0.849457419879j))*x_ref[0] + ((0.219077974224-0.162461145709j))*x_ref[1]**o + ((0.267382187742-0.705959844237j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.893011391637+0.825677749396j)*x[0]**o + ((-0.0238304966309-0.827885783038j))*x[0] + ((0.178584909959+0.95727247503j))*x[1]**o + ((0.0246529431075-0.986861195166j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.893011391637+0.825677749396j)*x_ref[0]**o + ((-0.0238304966309-0.827885783038j))*x_ref[0] + ((0.178584909959+0.95727247503j))*x_ref[1]**o + ((0.0246529431075-0.986861195166j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(-0.194818960382-0.164105381639j)*x[0]**o + ((0.124348925454-0.738590953328j))*x[0] + ((0.945020315618-0.276995091468j))*x[1]**o + ((-0.970158174021-0.599625918456j))*x[1]
+        ref[(3, 1, 0, 2)]=(-0.194818960382-0.164105381639j)*x_ref[0]**o + ((0.124348925454-0.738590953328j))*x_ref[0] + ((0.945020315618-0.276995091468j))*x_ref[1]**o + ((-0.970158174021-0.599625918456j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(-0.515964300584-0.102683717306j)*x[0]**o + ((0.895007117781-0.434848948595j))*x[0] + ((0.494331734098-0.959380516379j))*x[1]**o + ((-0.810298376313-0.147545517012j))*x[1]
+        ref[(3, 1, 1, 0)]=(-0.515964300584-0.102683717306j)*x_ref[0]**o + ((0.895007117781-0.434848948595j))*x_ref[0] + ((0.494331734098-0.959380516379j))*x_ref[1]**o + ((-0.810298376313-0.147545517012j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.0495697693277+0.296478147198j)*x[0]**o + ((0.850750563783+0.955092124033j))*x[0] + ((0.325060069141+0.590023136741j))*x[1]**o + ((0.0781053793921+0.480405465036j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.0495697693277+0.296478147198j)*x_ref[0]**o + ((0.850750563783+0.955092124033j))*x_ref[0] + ((0.325060069141+0.590023136741j))*x_ref[1]**o + ((0.0781053793921+0.480405465036j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(-0.942380665233+0.149540652715j)*x[0]**o + ((-0.83680533919-0.876449355218j))*x[0] + ((0.938622530665-0.503093259413j))*x[1]**o + ((0.745858743088-0.0182722607795j))*x[1]
+        ref[(3, 1, 1, 2)]=(-0.942380665233+0.149540652715j)*x_ref[0]**o + ((-0.83680533919-0.876449355218j))*x_ref[0] + ((0.938622530665-0.503093259413j))*x_ref[1]**o + ((0.745858743088-0.0182722607795j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(-0.105913656863+0.626316180947j)*x[0]**o + ((-0.850353423494-0.472480217477j))*x[0] + ((-0.173460175043-0.69359808763j))*x[1]**o + ((0.856054564607+0.798973471584j))*x[1]
+        ref[(3, 1, 2, 0)]=(-0.105913656863+0.626316180947j)*x_ref[0]**o + ((-0.850353423494-0.472480217477j))*x_ref[0] + ((-0.173460175043-0.69359808763j))*x_ref[1]**o + ((0.856054564607+0.798973471584j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(-0.901790712784+0.575944649964j)*x[0]**o + ((0.498977507312-0.22707875922j))*x[0] + ((0.262065136786+0.566730731149j))*x[1]**o + ((-0.487517082381-0.692499554385j))*x[1]
+        ref[(3, 1, 2, 1)]=(-0.901790712784+0.575944649964j)*x_ref[0]**o + ((0.498977507312-0.22707875922j))*x_ref[0] + ((0.262065136786+0.566730731149j))*x_ref[1]**o + ((-0.487517082381-0.692499554385j))*x_ref[1]
+        arg[(3, 1, 2, 2)]=(0.374340258227-0.365476937683j)*x[0]**o + ((-0.812782931259-0.370513661442j))*x[0] + ((0.0758838221474-0.51486712322j))*x[1]**o + ((-0.668313549017+0.462041977677j))*x[1]
+        ref[(3, 1, 2, 2)]=(0.374340258227-0.365476937683j)*x_ref[0]**o + ((-0.812782931259-0.370513661442j))*x_ref[0] + ((0.0758838221474-0.51486712322j))*x_ref[1]**o + ((-0.668313549017+0.462041977677j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(-0.517374482626-0.864167346669j)*x[0]**o + ((-0.83660748202+0.754315441345j))*x[0] + ((0.500658266329+0.692587541036j))*x[1]**o + ((0.980061035301+0.882385922317j))*x[1]
+        ref[(3, 2, 0, 0)]=(-0.517374482626-0.864167346669j)*x_ref[0]**o + ((-0.83660748202+0.754315441345j))*x_ref[0] + ((0.500658266329+0.692587541036j))*x_ref[1]**o + ((0.980061035301+0.882385922317j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(0.312152727908+0.900214082787j)*x[0]**o + ((0.975977360527+0.831184199741j))*x[0] + ((0.283517696121-0.836987553175j))*x[1]**o + ((-0.44917164541+0.263046133993j))*x[1]
+        ref[(3, 2, 0, 1)]=(0.312152727908+0.900214082787j)*x_ref[0]**o + ((0.975977360527+0.831184199741j))*x_ref[0] + ((0.283517696121-0.836987553175j))*x_ref[1]**o + ((-0.44917164541+0.263046133993j))*x_ref[1]
+        arg[(3, 2, 0, 2)]=(0.476528581893+0.769230799304j)*x[0]**o + ((0.237887787711-0.16330441602j))*x[0] + ((0.403269389241-0.558582151766j))*x[1]**o + ((-0.437466524692+0.186505022473j))*x[1]
+        ref[(3, 2, 0, 2)]=(0.476528581893+0.769230799304j)*x_ref[0]**o + ((0.237887787711-0.16330441602j))*x_ref[0] + ((0.403269389241-0.558582151766j))*x_ref[1]**o + ((-0.437466524692+0.186505022473j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.727774588308-0.980386088056j)*x[0]**o + ((-0.543535817468+0.0688694190941j))*x[0] + ((-0.044759504862-0.261662478406j))*x[1]**o + ((0.87387533582+0.816077783178j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.727774588308-0.980386088056j)*x_ref[0]**o + ((-0.543535817468+0.0688694190941j))*x_ref[0] + ((-0.044759504862-0.261662478406j))*x_ref[1]**o + ((0.87387533582+0.816077783178j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(-0.499795195496+0.381778106607j)*x[0]**o + ((0.888769505957-0.10828451644j))*x[0] + ((0.644213327918+0.580880262982j))*x[1]**o + ((0.0936772835273+0.461854484017j))*x[1]
+        ref[(3, 2, 1, 1)]=(-0.499795195496+0.381778106607j)*x_ref[0]**o + ((0.888769505957-0.10828451644j))*x_ref[0] + ((0.644213327918+0.580880262982j))*x_ref[1]**o + ((0.0936772835273+0.461854484017j))*x_ref[1]
+        arg[(3, 2, 1, 2)]=(-0.700049931248+0.282670489574j)*x[0]**o + ((-0.818712604051-0.877104147048j))*x[0] + ((-0.209177841087-0.638591948585j))*x[1]**o + ((-0.816012824357+0.249958806924j))*x[1]
+        ref[(3, 2, 1, 2)]=(-0.700049931248+0.282670489574j)*x_ref[0]**o + ((-0.818712604051-0.877104147048j))*x_ref[0] + ((-0.209177841087-0.638591948585j))*x_ref[1]**o + ((-0.816012824357+0.249958806924j))*x_ref[1]
+        arg[(3, 2, 2, 0)]=(-0.616764832686-0.994739587859j)*x[0]**o + ((0.548933638739+0.0990305932699j))*x[0] + ((0.0750603452356+0.161495728769j))*x[1]**o + ((0.00454607017837-0.604714001401j))*x[1]
+        ref[(3, 2, 2, 0)]=(-0.616764832686-0.994739587859j)*x_ref[0]**o + ((0.548933638739+0.0990305932699j))*x_ref[0] + ((0.0750603452356+0.161495728769j))*x_ref[1]**o + ((0.00454607017837-0.604714001401j))*x_ref[1]
+        arg[(3, 2, 2, 1)]=(0.351277812698+0.807996962825j)*x[0]**o + ((0.293432753647-0.639101570296j))*x[0] + ((0.847610485875-0.184249420854j))*x[1]**o + ((0.735243327467+0.970542964153j))*x[1]
+        ref[(3, 2, 2, 1)]=(0.351277812698+0.807996962825j)*x_ref[0]**o + ((0.293432753647-0.639101570296j))*x_ref[0] + ((0.847610485875-0.184249420854j))*x_ref[1]**o + ((0.735243327467+0.970542964153j))*x_ref[1]
+        arg[(3, 2, 2, 2)]=(0.808685254354-0.566069273307j)*x[0]**o + ((-0.985073147507-0.150059858681j))*x[0] + ((-0.88583283125-0.922387257846j))*x[1]**o + ((-0.153658633927+0.994335011676j))*x[1]
+        ref[(3, 2, 2, 2)]=(0.808685254354-0.566069273307j)*x_ref[0]**o + ((-0.985073147507-0.150059858681j))*x_ref[0] + ((-0.88583283125-0.922387257846j))*x_ref[1]**o + ((-0.153658633927+0.994335011676j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.670285049563+0.25282711999j)*x[2]**o + ((-0.970956125525-0.818411004394j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.670285049563+0.25282711999j)*x_ref[2]**o + ((-0.970956125525-0.818411004394j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.968988498784+0.825955575929j)*x[2]**o + ((0.691338407111-0.68599161857j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.968988498784+0.825955575929j)*x_ref[2]**o + ((0.691338407111-0.68599161857j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.450485713846-0.653496204237j)*x[2]**o + ((-0.847785835606-0.369722343057j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.450485713846-0.653496204237j)*x_ref[2]**o + ((-0.847785835606-0.369722343057j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.127634766279+0.434413652547j)*x[2]**o + ((-0.412880855381-0.0519884422404j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.127634766279+0.434413652547j)*x_ref[2]**o + ((-0.412880855381-0.0519884422404j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.534258568626-0.66468591408j)*x[2]**o + ((-0.105904436598+0.721482688879j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.534258568626-0.66468591408j)*x_ref[2]**o + ((-0.105904436598+0.721482688879j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.168031997745+0.876672317353j)*x[2]**o + ((-0.370622784969-0.204035166477j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.168031997745+0.876672317353j)*x_ref[2]**o + ((-0.370622784969-0.204035166477j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.490762007628+0.0274109903295j)*x[2]**o + ((0.471338325981-0.51692901139j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.490762007628+0.0274109903295j)*x_ref[2]**o + ((0.471338325981-0.51692901139j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.516639201589+0.217438649785j)*x[2]**o + ((0.247321514047+0.503479990639j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.516639201589+0.217438649785j)*x_ref[2]**o + ((0.247321514047+0.503479990639j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(0.609603998615+0.282872022261j)*x[2]**o + ((0.899067617491-0.26621499008j))*x[2]
+            ref[(0, 0, 2, 2)]+=(0.609603998615+0.282872022261j)*x_ref[2]**o + ((0.899067617491-0.26621499008j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.0554941597603+0.550601641964j)*x[2]**o + ((0.243526656105+0.957735070453j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.0554941597603+0.550601641964j)*x_ref[2]**o + ((0.243526656105+0.957735070453j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.502810542177+0.282940958222j)*x[2]**o + ((0.152960208+0.4217078156j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.502810542177+0.282940958222j)*x_ref[2]**o + ((0.152960208+0.4217078156j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.24910928249+0.247154780464j)*x[2]**o + ((0.0318604335598+0.025339184192j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.24910928249+0.247154780464j)*x_ref[2]**o + ((0.0318604335598+0.025339184192j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.398723825595+0.126186647495j)*x[2]**o + ((-0.219834650843-0.769869560267j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.398723825595+0.126186647495j)*x_ref[2]**o + ((-0.219834650843-0.769869560267j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.478720520751-0.0365175004477j)*x[2]**o + ((0.761890428422-0.461228190745j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.478720520751-0.0365175004477j)*x_ref[2]**o + ((0.761890428422-0.461228190745j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.928269223498+0.141007467213j)*x[2]**o + ((-0.502268648429+0.416943602654j))*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.928269223498+0.141007467213j)*x_ref[2]**o + ((-0.502268648429+0.416943602654j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.0245426545392+0.999781088275j)*x[2]**o + ((-0.478193336544-0.275296093256j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.0245426545392+0.999781088275j)*x_ref[2]**o + ((-0.478193336544-0.275296093256j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.0606339767294+0.507403478691j)*x[2]**o + ((-0.249611165395+0.71739182533j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.0606339767294+0.507403478691j)*x_ref[2]**o + ((-0.249611165395+0.71739182533j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(-0.499740220888+0.718648947479j)*x[2]**o + ((-0.656927590995+0.909688408249j))*x[2]
+            ref[(0, 1, 2, 2)]+=(-0.499740220888+0.718648947479j)*x_ref[2]**o + ((-0.656927590995+0.909688408249j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.869016529628+0.982619414404j)*x[2]**o + ((0.304164555666-0.870374237351j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.869016529628+0.982619414404j)*x_ref[2]**o + ((0.304164555666-0.870374237351j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.990262999635+0.152176588846j)*x[2]**o + ((-0.980772944736-0.684162516457j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.990262999635+0.152176588846j)*x_ref[2]**o + ((-0.980772944736-0.684162516457j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(0.596069666131+0.734636003863j)*x[2]**o + ((0.493770350363+0.242553479596j))*x[2]
+            ref[(0, 2, 0, 2)]+=(0.596069666131+0.734636003863j)*x_ref[2]**o + ((0.493770350363+0.242553479596j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.0364576283237+0.182828193474j)*x[2]**o + ((0.667363431456+0.8781394357j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.0364576283237+0.182828193474j)*x_ref[2]**o + ((0.667363431456+0.8781394357j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.295438081906+0.80194213629j)*x[2]**o + ((0.265156689634+0.44457724579j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.295438081906+0.80194213629j)*x_ref[2]**o + ((0.265156689634+0.44457724579j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.384528847176-0.244164481076j)*x[2]**o + ((-0.0483225887312+0.0448129937726j))*x[2]
+            ref[(0, 2, 1, 2)]+=(0.384528847176-0.244164481076j)*x_ref[2]**o + ((-0.0483225887312+0.0448129937726j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.193288319402-0.999144933996j)*x[2]**o + ((0.0310137757819-0.252817420448j))*x[2]
+            ref[(0, 2, 2, 0)]+=(0.193288319402-0.999144933996j)*x_ref[2]**o + ((0.0310137757819-0.252817420448j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.753992223313-0.0960828229152j)*x[2]**o + ((0.532449832331-0.535456978057j))*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.753992223313-0.0960828229152j)*x_ref[2]**o + ((0.532449832331-0.535456978057j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.699204139255-0.680185783003j)*x[2]**o + ((0.911167755183+0.517711159008j))*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.699204139255-0.680185783003j)*x_ref[2]**o + ((0.911167755183+0.517711159008j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.643005391264+0.0225769657121j)*x[2]**o + ((-0.809275962778+0.753507158469j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.643005391264+0.0225769657121j)*x_ref[2]**o + ((-0.809275962778+0.753507158469j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.191614849156-0.556937735695j)*x[2]**o + ((0.671907619761-0.458646054946j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.191614849156-0.556937735695j)*x_ref[2]**o + ((0.671907619761-0.458646054946j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.374626616181-0.386605492005j)*x[2]**o + ((-0.423553503401-0.325103730045j))*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.374626616181-0.386605492005j)*x_ref[2]**o + ((-0.423553503401-0.325103730045j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.663695703723-0.749128593817j)*x[2]**o + ((0.443307686224-0.524190780752j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.663695703723-0.749128593817j)*x_ref[2]**o + ((0.443307686224-0.524190780752j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.364353454636-0.475831317645j)*x[2]**o + ((-0.0756045826433+0.177174602216j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.364353454636-0.475831317645j)*x_ref[2]**o + ((-0.0756045826433+0.177174602216j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.47824504395+0.819015580613j)*x[2]**o + ((-0.634918873694-0.982798708136j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.47824504395+0.819015580613j)*x_ref[2]**o + ((-0.634918873694-0.982798708136j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.291219146291-0.925783513426j)*x[2]**o + ((-0.404464269929-0.734763880583j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.291219146291-0.925783513426j)*x_ref[2]**o + ((-0.404464269929-0.734763880583j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.992336930017+0.096099065036j)*x[2]**o + ((-0.3776439325-0.561591145794j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.992336930017+0.096099065036j)*x_ref[2]**o + ((-0.3776439325-0.561591145794j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(-0.150107442176+0.858171970998j)*x[2]**o + ((-0.664869429383-0.485956087316j))*x[2]
+            ref[(1, 0, 2, 2)]+=(-0.150107442176+0.858171970998j)*x_ref[2]**o + ((-0.664869429383-0.485956087316j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.108995263466+0.0526992490772j)*x[2]**o + ((-0.897303272985-0.553219209142j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.108995263466+0.0526992490772j)*x_ref[2]**o + ((-0.897303272985-0.553219209142j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.649487992578+0.530438656156j)*x[2]**o + ((-0.609582990999-0.329783804121j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.649487992578+0.530438656156j)*x_ref[2]**o + ((-0.609582990999-0.329783804121j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.746396156132-0.623063365842j)*x[2]**o + ((-0.439990725297+0.811176189254j))*x[2]
+            ref[(1, 1, 0, 2)]+=(0.746396156132-0.623063365842j)*x_ref[2]**o + ((-0.439990725297+0.811176189254j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.269971078669-0.810784880063j)*x[2]**o + ((0.799293052231-0.080968308673j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.269971078669-0.810784880063j)*x_ref[2]**o + ((0.799293052231-0.080968308673j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.880722552069+0.615840287665j)*x[2]**o + ((0.793715664241+0.643304589234j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.880722552069+0.615840287665j)*x_ref[2]**o + ((0.793715664241+0.643304589234j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.0255095785616-0.257612755841j)*x[2]**o + ((0.921452579326-0.600679764138j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.0255095785616-0.257612755841j)*x_ref[2]**o + ((0.921452579326-0.600679764138j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.521124489595+0.741918094052j)*x[2]**o + ((0.480902174082+0.624988992321j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.521124489595+0.741918094052j)*x_ref[2]**o + ((0.480902174082+0.624988992321j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.997102389284-0.668157096598j)*x[2]**o + ((0.00371286970162+0.912912076815j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.997102389284-0.668157096598j)*x_ref[2]**o + ((0.00371286970162+0.912912076815j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.788645645212-0.652177931922j)*x[2]**o + ((-0.0361230669798-0.10125408631j))*x[2]
+            ref[(1, 1, 2, 2)]+=(0.788645645212-0.652177931922j)*x_ref[2]**o + ((-0.0361230669798-0.10125408631j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.324002230031-0.938395690453j)*x[2]**o + ((-0.0708818679636+0.591520729316j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.324002230031-0.938395690453j)*x_ref[2]**o + ((-0.0708818679636+0.591520729316j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.674303996456-0.718588682985j)*x[2]**o + ((0.703852149083+0.789183400395j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.674303996456-0.718588682985j)*x_ref[2]**o + ((0.703852149083+0.789183400395j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(-0.227006746502-0.677289585788j)*x[2]**o + ((-0.526497763988+0.75948694298j))*x[2]
+            ref[(1, 2, 0, 2)]+=(-0.227006746502-0.677289585788j)*x_ref[2]**o + ((-0.526497763988+0.75948694298j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.268081376878+0.144279548007j)*x[2]**o + ((-0.432620738708+0.781988952814j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.268081376878+0.144279548007j)*x_ref[2]**o + ((-0.432620738708+0.781988952814j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.72102819997+0.530615895873j)*x[2]**o + ((-0.676693030273+0.448791831671j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.72102819997+0.530615895873j)*x_ref[2]**o + ((-0.676693030273+0.448791831671j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.484446292123-0.722783466008j)*x[2]**o + ((-0.663920296386+0.175755089385j))*x[2]
+            ref[(1, 2, 1, 2)]+=(0.484446292123-0.722783466008j)*x_ref[2]**o + ((-0.663920296386+0.175755089385j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.490280013041+0.083211476092j)*x[2]**o + ((0.237592789368-0.567677771157j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.490280013041+0.083211476092j)*x_ref[2]**o + ((0.237592789368-0.567677771157j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(-0.908721758581-0.871611321522j)*x[2]**o + ((0.881718745922+0.30895412436j))*x[2]
+            ref[(1, 2, 2, 1)]+=(-0.908721758581-0.871611321522j)*x_ref[2]**o + ((0.881718745922+0.30895412436j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(-0.0425373643036+0.198008095195j)*x[2]**o + ((-0.0107942920785+0.488722303988j))*x[2]
+            ref[(1, 2, 2, 2)]+=(-0.0425373643036+0.198008095195j)*x_ref[2]**o + ((-0.0107942920785+0.488722303988j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.207666064979+0.523401606627j)*x[2]**o + ((-0.513919563348-0.597374166756j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.207666064979+0.523401606627j)*x_ref[2]**o + ((-0.513919563348-0.597374166756j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.733567791664+0.272176797959j)*x[2]**o + ((0.23026383113+0.198556126676j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.733567791664+0.272176797959j)*x_ref[2]**o + ((0.23026383113+0.198556126676j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.91937974494+0.319063207824j)*x[2]**o + ((0.416250875083-0.0999484454546j))*x[2]
+            ref[(2, 0, 0, 2)]+=(0.91937974494+0.319063207824j)*x_ref[2]**o + ((0.416250875083-0.0999484454546j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.262497147848-0.888389509878j)*x[2]**o + ((-0.114934450889-0.720689022438j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.262497147848-0.888389509878j)*x_ref[2]**o + ((-0.114934450889-0.720689022438j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.350398903224-0.659093583866j)*x[2]**o + ((-0.0424387275662-0.0531216779511j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.350398903224-0.659093583866j)*x_ref[2]**o + ((-0.0424387275662-0.0531216779511j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(0.930788292712-0.114972472033j)*x[2]**o + ((-0.60856768709-0.974943426452j))*x[2]
+            ref[(2, 0, 1, 2)]+=(0.930788292712-0.114972472033j)*x_ref[2]**o + ((-0.60856768709-0.974943426452j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.963042143946-0.369977318065j)*x[2]**o + ((0.589361029177-0.70907611368j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.963042143946-0.369977318065j)*x_ref[2]**o + ((0.589361029177-0.70907611368j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.861811571029-0.16171385505j)*x[2]**o + ((-0.702166950408+0.49425149166j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.861811571029-0.16171385505j)*x_ref[2]**o + ((-0.702166950408+0.49425149166j))*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(-0.267687877374-0.527255751557j)*x[2]**o + ((-0.920918147166-0.720039045966j))*x[2]
+            ref[(2, 0, 2, 2)]+=(-0.267687877374-0.527255751557j)*x_ref[2]**o + ((-0.920918147166-0.720039045966j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.0654836192184+0.648213228392j)*x[2]**o + ((-0.145366177023-0.171354252747j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.0654836192184+0.648213228392j)*x_ref[2]**o + ((-0.145366177023-0.171354252747j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.923630051733-0.0651548769877j)*x[2]**o + ((0.0927761521714-0.0013748785198j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.923630051733-0.0651548769877j)*x_ref[2]**o + ((0.0927761521714-0.0013748785198j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.638977826763+0.819215441846j)*x[2]**o + ((-0.34820199375-0.2394104193j))*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.638977826763+0.819215441846j)*x_ref[2]**o + ((-0.34820199375-0.2394104193j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.823268508888-0.0302814914981j)*x[2]**o + ((0.347861538993+0.74093401698j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.823268508888-0.0302814914981j)*x_ref[2]**o + ((0.347861538993+0.74093401698j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.882194920188+0.323677160476j)*x[2]**o + ((0.984501762912+0.0356056363017j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.882194920188+0.323677160476j)*x_ref[2]**o + ((0.984501762912+0.0356056363017j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.82401874056+0.639655166104j)*x[2]**o + ((0.626959985451+0.46957454641j))*x[2]
+            ref[(2, 1, 1, 2)]+=(0.82401874056+0.639655166104j)*x_ref[2]**o + ((0.626959985451+0.46957454641j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.474180132913-0.0620794518784j)*x[2]**o + ((0.107348044717+0.541115494835j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.474180132913-0.0620794518784j)*x_ref[2]**o + ((0.107348044717+0.541115494835j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.1624969548-0.319848432576j)*x[2]**o + ((-0.54886632025+0.35102707581j))*x[2]
+            ref[(2, 1, 2, 1)]+=(0.1624969548-0.319848432576j)*x_ref[2]**o + ((-0.54886632025+0.35102707581j))*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(0.327217382061+0.960931596899j)*x[2]**o + ((-0.521288529061+0.52591403662j))*x[2]
+            ref[(2, 1, 2, 2)]+=(0.327217382061+0.960931596899j)*x_ref[2]**o + ((-0.521288529061+0.52591403662j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.911784584234+0.234830955623j)*x[2]**o + ((0.113263858623+0.198746428209j))*x[2]
+            ref[(2, 2, 0, 0)]+=(0.911784584234+0.234830955623j)*x_ref[2]**o + ((0.113263858623+0.198746428209j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.426826730638+0.420619448485j)*x[2]**o + ((-0.243616205775-0.835707428763j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.426826730638+0.420619448485j)*x_ref[2]**o + ((-0.243616205775-0.835707428763j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(-0.506299000445-0.227923834821j)*x[2]**o + ((-0.087587791637+0.74742874032j))*x[2]
+            ref[(2, 2, 0, 2)]+=(-0.506299000445-0.227923834821j)*x_ref[2]**o + ((-0.087587791637+0.74742874032j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.908533286664+0.992581176385j)*x[2]**o + ((0.484116552133+0.86325053016j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.908533286664+0.992581176385j)*x_ref[2]**o + ((0.484116552133+0.86325053016j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.510056669342+0.470370381283j)*x[2]**o + ((-0.0112477851649+0.166043359152j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.510056669342+0.470370381283j)*x_ref[2]**o + ((-0.0112477851649+0.166043359152j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(0.535006227747+0.253468066055j)*x[2]**o + ((0.457491079753-0.303826276193j))*x[2]
+            ref[(2, 2, 1, 2)]+=(0.535006227747+0.253468066055j)*x_ref[2]**o + ((0.457491079753-0.303826276193j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(0.903820033453-0.128324484046j)*x[2]**o + ((0.0910931322368-0.551290377988j))*x[2]
+            ref[(2, 2, 2, 0)]+=(0.903820033453-0.128324484046j)*x_ref[2]**o + ((0.0910931322368-0.551290377988j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(0.267425972106+0.135212443943j)*x[2]**o + ((-0.37996814581-0.577622752547j))*x[2]
+            ref[(2, 2, 2, 1)]+=(0.267425972106+0.135212443943j)*x_ref[2]**o + ((-0.37996814581-0.577622752547j))*x_ref[2]
+            arg[(2, 2, 2, 2)]+=(-0.218665986582+0.140328422362j)*x[2]**o + ((0.0696037318567+0.872078799477j))*x[2]
+            ref[(2, 2, 2, 2)]+=(-0.218665986582+0.140328422362j)*x_ref[2]**o + ((0.0696037318567+0.872078799477j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.383488529829-0.560570344736j)*x[2]**o + ((0.660742890959+0.193455291241j))*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.383488529829-0.560570344736j)*x_ref[2]**o + ((0.660742890959+0.193455291241j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.942228676562+0.738058217624j)*x[2]**o + ((0.525699634306+0.769590977876j))*x[2]
+            ref[(3, 0, 0, 1)]+=(0.942228676562+0.738058217624j)*x_ref[2]**o + ((0.525699634306+0.769590977876j))*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(-0.554309880133+0.312020771101j)*x[2]**o + ((-0.269697573118-0.848393038327j))*x[2]
+            ref[(3, 0, 0, 2)]+=(-0.554309880133+0.312020771101j)*x_ref[2]**o + ((-0.269697573118-0.848393038327j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.837207995053+0.503449070629j)*x[2]**o + ((-0.397596429937-0.98332150567j))*x[2]
+            ref[(3, 0, 1, 0)]+=(0.837207995053+0.503449070629j)*x_ref[2]**o + ((-0.397596429937-0.98332150567j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(0.425325591978-0.893720402511j)*x[2]**o + ((-0.611721694719-0.823101617982j))*x[2]
+            ref[(3, 0, 1, 1)]+=(0.425325591978-0.893720402511j)*x_ref[2]**o + ((-0.611721694719-0.823101617982j))*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(-0.0193617118246+0.831998574802j)*x[2]**o + ((-0.333759189853-0.719406715928j))*x[2]
+            ref[(3, 0, 1, 2)]+=(-0.0193617118246+0.831998574802j)*x_ref[2]**o + ((-0.333759189853-0.719406715928j))*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(-0.735045591286-0.333954991639j)*x[2]**o + ((-0.280813326288+0.686079656707j))*x[2]
+            ref[(3, 0, 2, 0)]+=(-0.735045591286-0.333954991639j)*x_ref[2]**o + ((-0.280813326288+0.686079656707j))*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.354984939224+0.795289530555j)*x[2]**o + ((0.309542451801-0.458424438603j))*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.354984939224+0.795289530555j)*x_ref[2]**o + ((0.309542451801-0.458424438603j))*x_ref[2]
+            arg[(3, 0, 2, 2)]+=(0.0756848216177-0.154031796896j)*x[2]**o + ((0.914162373032+0.415761671233j))*x[2]
+            ref[(3, 0, 2, 2)]+=(0.0756848216177-0.154031796896j)*x_ref[2]**o + ((0.914162373032+0.415761671233j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.429883013068-0.537035447607j)*x[2]**o + ((0.818405947214+0.0875308096098j))*x[2]
+            ref[(3, 1, 0, 0)]+=(0.429883013068-0.537035447607j)*x_ref[2]**o + ((0.818405947214+0.0875308096098j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.757743815805+0.856048504991j)*x[2]**o + ((-0.543343345172-0.303032295272j))*x[2]
+            ref[(3, 1, 0, 1)]+=(0.757743815805+0.856048504991j)*x_ref[2]**o + ((-0.543343345172-0.303032295272j))*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(-0.378864656579+0.731059145425j)*x[2]**o + ((0.188816602533+0.00772482525756j))*x[2]
+            ref[(3, 1, 0, 2)]+=(-0.378864656579+0.731059145425j)*x_ref[2]**o + ((0.188816602533+0.00772482525756j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.191969513463+0.46594633578j)*x[2]**o + ((0.760403382555+0.419422247328j))*x[2]
+            ref[(3, 1, 1, 0)]+=(0.191969513463+0.46594633578j)*x_ref[2]**o + ((0.760403382555+0.419422247328j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.404243692852+0.15664548668j)*x[2]**o + ((-0.290404242702+0.0160603421058j))*x[2]
+            ref[(3, 1, 1, 1)]+=(0.404243692852+0.15664548668j)*x_ref[2]**o + ((-0.290404242702+0.0160603421058j))*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(-0.0324088774525-0.135075267378j)*x[2]**o + ((-0.601075383927+0.11939330733j))*x[2]
+            ref[(3, 1, 1, 2)]+=(-0.0324088774525-0.135075267378j)*x_ref[2]**o + ((-0.601075383927+0.11939330733j))*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(-0.897824611024-0.125819994468j)*x[2]**o + ((0.0883149219254+0.745771677769j))*x[2]
+            ref[(3, 1, 2, 0)]+=(-0.897824611024-0.125819994468j)*x_ref[2]**o + ((0.0883149219254+0.745771677769j))*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(-0.282547264587+0.241044066897j)*x[2]**o + ((-0.163310450439-0.614392484717j))*x[2]
+            ref[(3, 1, 2, 1)]+=(-0.282547264587+0.241044066897j)*x_ref[2]**o + ((-0.163310450439-0.614392484717j))*x_ref[2]
+            arg[(3, 1, 2, 2)]+=(-0.387951053527+0.809228396636j)*x[2]**o + ((-0.862582792237+0.415437418747j))*x[2]
+            ref[(3, 1, 2, 2)]+=(-0.387951053527+0.809228396636j)*x_ref[2]**o + ((-0.862582792237+0.415437418747j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(0.0661666708646+0.494449742172j)*x[2]**o + ((-0.849815106082+0.945214706856j))*x[2]
+            ref[(3, 2, 0, 0)]+=(0.0661666708646+0.494449742172j)*x_ref[2]**o + ((-0.849815106082+0.945214706856j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(0.875086064809+0.447380582963j)*x[2]**o + ((-0.78024061437+0.382686889192j))*x[2]
+            ref[(3, 2, 0, 1)]+=(0.875086064809+0.447380582963j)*x_ref[2]**o + ((-0.78024061437+0.382686889192j))*x_ref[2]
+            arg[(3, 2, 0, 2)]+=(0.190740721306+0.605314824669j)*x[2]**o + ((0.794298397109-0.759658599863j))*x[2]
+            ref[(3, 2, 0, 2)]+=(0.190740721306+0.605314824669j)*x_ref[2]**o + ((0.794298397109-0.759658599863j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.315046410125+0.17515741064j)*x[2]**o + ((0.200456399816+0.778314054372j))*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.315046410125+0.17515741064j)*x_ref[2]**o + ((0.200456399816+0.778314054372j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.709584126457-0.0822550886876j)*x[2]**o + ((-0.399790738427+0.692460947767j))*x[2]
+            ref[(3, 2, 1, 1)]+=(0.709584126457-0.0822550886876j)*x_ref[2]**o + ((-0.399790738427+0.692460947767j))*x_ref[2]
+            arg[(3, 2, 1, 2)]+=(-0.632087359308+0.857408467842j)*x[2]**o + ((0.67414371329-0.553715551222j))*x[2]
+            ref[(3, 2, 1, 2)]+=(-0.632087359308+0.857408467842j)*x_ref[2]**o + ((0.67414371329-0.553715551222j))*x_ref[2]
+            arg[(3, 2, 2, 0)]+=(0.6631556733-0.662483564872j)*x[2]**o + ((-0.18284389108-0.300032305427j))*x[2]
+            ref[(3, 2, 2, 0)]+=(0.6631556733-0.662483564872j)*x_ref[2]**o + ((-0.18284389108-0.300032305427j))*x_ref[2]
+            arg[(3, 2, 2, 1)]+=(0.480817494631-0.947194123146j)*x[2]**o + ((0.685916885248+0.359126589244j))*x[2]
+            ref[(3, 2, 2, 1)]+=(0.480817494631-0.947194123146j)*x_ref[2]**o + ((0.685916885248+0.359126589244j))*x_ref[2]
+            arg[(3, 2, 2, 2)]+=(0.269260162948-0.274621051646j)*x[2]**o + ((0.972924971752-0.681385951287j))*x[2]
+            ref[(3, 2, 2, 2)]+=(0.269260162948-0.274621051646j)*x_ref[2]**o + ((0.972924971752-0.681385951287j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.817235632077-0.532113653868j)*x[0]**o + ((0.764419074553+0.704228525794j))*x[0] + ((-0.804499995277-0.0301574436062j))*x[1]**o + ((-0.0391448633172+0.747608205218j))*x[1]
+        ref=(0.817235632077-0.532113653868j)*x_ref[0]**o + ((0.764419074553+0.704228525794j))*x_ref[0] + ((-0.804499995277-0.0301574436062j))*x_ref[1]**o + ((-0.0391448633172+0.747608205218j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.573105080146-0.738213208121j))*x[2]**o + ((-0.952948825623+0.557485859702j))*x[2]
+            ref+=((-0.573105080146-0.738213208121j))*x_ref[2]**o + ((-0.952948825623+0.557485859702j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.92877651718+0.262625835396j)*x[0]**o + ((-0.151335231812+0.484474444543j))*x[0] + ((0.183373901825-0.279287695125j))*x[1]**o + ((0.876984494581+0.201872366911j))*x[1]
+        ref[(0,)]=(0.92877651718+0.262625835396j)*x_ref[0]**o + ((-0.151335231812+0.484474444543j))*x_ref[0] + ((0.183373901825-0.279287695125j))*x_ref[1]**o + ((0.876984494581+0.201872366911j))*x_ref[1]
+        arg[(1,)]=(-0.520234786413-0.580756930442j)*x[0]**o + ((-0.197777966939+0.36971637714j))*x[0] + ((-0.142968729725+0.740370488132j))*x[1]**o + ((-0.947041473575+0.798696456769j))*x[1]
+        ref[(1,)]=(-0.520234786413-0.580756930442j)*x_ref[0]**o + ((-0.197777966939+0.36971637714j))*x_ref[0] + ((-0.142968729725+0.740370488132j))*x_ref[1]**o + ((-0.947041473575+0.798696456769j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.162283114199-0.451030020809j)*x[2]**o + ((-0.109595157417-0.5761033316j))*x[2]
+            ref[(0,)]+=(-0.162283114199-0.451030020809j)*x_ref[2]**o + ((-0.109595157417-0.5761033316j))*x_ref[2]
+            arg[(1,)]+=(0.0109892286808-0.75036630282j)*x[2]**o + ((0.240511738222+0.815198152284j))*x[2]
+            ref[(1,)]+=(0.0109892286808-0.75036630282j)*x_ref[2]**o + ((0.240511738222+0.815198152284j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(0.351280447079+0.730837543053j)*x[0]**o + ((0.441323797464-0.515033081961j))*x[0] + ((0.172418844582-0.210643154801j))*x[1]**o + ((0.186996289825+0.573209711449j))*x[1]
+        ref[(0, 0)]=(0.351280447079+0.730837543053j)*x_ref[0]**o + ((0.441323797464-0.515033081961j))*x_ref[0] + ((0.172418844582-0.210643154801j))*x_ref[1]**o + ((0.186996289825+0.573209711449j))*x_ref[1]
+        arg[(0, 1)]=(0.126066130907+0.411724546321j)*x[0]**o + ((-0.265756238339-0.0591405721722j))*x[0] + ((-0.292869332576+0.402943797635j))*x[1]**o + ((0.299865367978+0.123299626686j))*x[1]
+        ref[(0, 1)]=(0.126066130907+0.411724546321j)*x_ref[0]**o + ((-0.265756238339-0.0591405721722j))*x_ref[0] + ((-0.292869332576+0.402943797635j))*x_ref[1]**o + ((0.299865367978+0.123299626686j))*x_ref[1]
+        arg[(0, 2)]=(-0.463342184611+0.487449318218j)*x[0]**o + ((-0.848805657421+0.535125083096j))*x[0] + ((0.68437000068+0.355810391567j))*x[1]**o + ((-0.350832055454-0.703898470131j))*x[1]
+        ref[(0, 2)]=(-0.463342184611+0.487449318218j)*x_ref[0]**o + ((-0.848805657421+0.535125083096j))*x_ref[0] + ((0.68437000068+0.355810391567j))*x_ref[1]**o + ((-0.350832055454-0.703898470131j))*x_ref[1]
+        arg[(0, 3)]=(-0.604767140621-0.860135133721j)*x[0]**o + ((-0.316745297392+0.927286336346j))*x[0] + ((0.29073861697-0.583907012394j))*x[1]**o + ((-0.229274273364-0.888665299865j))*x[1]
+        ref[(0, 3)]=(-0.604767140621-0.860135133721j)*x_ref[0]**o + ((-0.316745297392+0.927286336346j))*x_ref[0] + ((0.29073861697-0.583907012394j))*x_ref[1]**o + ((-0.229274273364-0.888665299865j))*x_ref[1]
+        arg[(1, 0)]=(0.418696405359-0.74971544437j)*x[0]**o + ((-0.0057422252615-0.760861457753j))*x[0] + ((0.991620077383+0.935815186014j))*x[1]**o + ((0.0384767230899-0.716659040883j))*x[1]
+        ref[(1, 0)]=(0.418696405359-0.74971544437j)*x_ref[0]**o + ((-0.0057422252615-0.760861457753j))*x_ref[0] + ((0.991620077383+0.935815186014j))*x_ref[1]**o + ((0.0384767230899-0.716659040883j))*x_ref[1]
+        arg[(1, 1)]=(-0.360811965986-0.240574314173j)*x[0]**o + ((-0.766907245989-0.93090471591j))*x[0] + ((-0.685986226902-0.924759569246j))*x[1]**o + ((0.270695179298-0.42570466724j))*x[1]
+        ref[(1, 1)]=(-0.360811965986-0.240574314173j)*x_ref[0]**o + ((-0.766907245989-0.93090471591j))*x_ref[0] + ((-0.685986226902-0.924759569246j))*x_ref[1]**o + ((0.270695179298-0.42570466724j))*x_ref[1]
+        arg[(1, 2)]=(-0.230056970056+0.789599184441j)*x[0]**o + ((0.0223919511599-0.444863874323j))*x[0] + ((0.578379570127+0.871060849907j))*x[1]**o + ((-0.296952152303+0.868765174861j))*x[1]
+        ref[(1, 2)]=(-0.230056970056+0.789599184441j)*x_ref[0]**o + ((0.0223919511599-0.444863874323j))*x_ref[0] + ((0.578379570127+0.871060849907j))*x_ref[1]**o + ((-0.296952152303+0.868765174861j))*x_ref[1]
+        arg[(1, 3)]=(0.402207308455+0.9417548216j)*x[0]**o + ((0.506232867384+0.0373492809515j))*x[0] + ((0.110370351448-0.40286315007j))*x[1]**o + ((-0.200769404179+0.447437064038j))*x[1]
+        ref[(1, 3)]=(0.402207308455+0.9417548216j)*x_ref[0]**o + ((0.506232867384+0.0373492809515j))*x_ref[0] + ((0.110370351448-0.40286315007j))*x_ref[1]**o + ((-0.200769404179+0.447437064038j))*x_ref[1]
+        arg[(2, 0)]=(-0.6286777138-0.573627119201j)*x[0]**o + ((0.00128221564329+0.496171840306j))*x[0] + ((0.895838753163+0.752222544649j))*x[1]**o + ((0.933356796816+0.331783822549j))*x[1]
+        ref[(2, 0)]=(-0.6286777138-0.573627119201j)*x_ref[0]**o + ((0.00128221564329+0.496171840306j))*x_ref[0] + ((0.895838753163+0.752222544649j))*x_ref[1]**o + ((0.933356796816+0.331783822549j))*x_ref[1]
+        arg[(2, 1)]=(0.169205313189-0.849331487038j)*x[0]**o + ((-0.875205481969-0.828197180912j))*x[0] + ((-0.557632732032+0.897611985355j))*x[1]**o + ((-0.423039022213+0.548287062101j))*x[1]
+        ref[(2, 1)]=(0.169205313189-0.849331487038j)*x_ref[0]**o + ((-0.875205481969-0.828197180912j))*x_ref[0] + ((-0.557632732032+0.897611985355j))*x_ref[1]**o + ((-0.423039022213+0.548287062101j))*x_ref[1]
+        arg[(2, 2)]=(0.0275973375457+0.858288766512j)*x[0]**o + ((0.205182037699+0.770939298695j))*x[0] + ((-0.949821925185+0.0208305960572j))*x[1]**o + ((-0.164643585235+0.451612423642j))*x[1]
+        ref[(2, 2)]=(0.0275973375457+0.858288766512j)*x_ref[0]**o + ((0.205182037699+0.770939298695j))*x_ref[0] + ((-0.949821925185+0.0208305960572j))*x_ref[1]**o + ((-0.164643585235+0.451612423642j))*x_ref[1]
+        arg[(2, 3)]=(0.627162614275+0.254159432562j)*x[0]**o + ((0.875687691198-0.0970897942673j))*x[0] + ((-0.150754316096+0.529171195639j))*x[1]**o + ((0.370784742543-0.897010163531j))*x[1]
+        ref[(2, 3)]=(0.627162614275+0.254159432562j)*x_ref[0]**o + ((0.875687691198-0.0970897942673j))*x_ref[0] + ((-0.150754316096+0.529171195639j))*x_ref[1]**o + ((0.370784742543-0.897010163531j))*x_ref[1]
+        arg[(3, 0)]=(-0.0750415958677-0.383750203528j)*x[0]**o + ((0.417623467277+0.267428961489j))*x[0] + ((0.527661237109-0.287076250577j))*x[1]**o + ((0.418246138568+0.553719421591j))*x[1]
+        ref[(3, 0)]=(-0.0750415958677-0.383750203528j)*x_ref[0]**o + ((0.417623467277+0.267428961489j))*x_ref[0] + ((0.527661237109-0.287076250577j))*x_ref[1]**o + ((0.418246138568+0.553719421591j))*x_ref[1]
+        arg[(3, 1)]=(-0.332627651459-0.349325184866j)*x[0]**o + ((-0.275524638875+0.679422635592j))*x[0] + ((-0.674786962439-0.118139279292j))*x[1]**o + ((-0.733187508555-0.273670454497j))*x[1]
+        ref[(3, 1)]=(-0.332627651459-0.349325184866j)*x_ref[0]**o + ((-0.275524638875+0.679422635592j))*x_ref[0] + ((-0.674786962439-0.118139279292j))*x_ref[1]**o + ((-0.733187508555-0.273670454497j))*x_ref[1]
+        arg[(3, 2)]=(-0.679693996055-0.673088322217j)*x[0]**o + ((-0.52400411527+0.604378071819j))*x[0] + ((-0.291024618102+0.445321020095j))*x[1]**o + ((0.141392146404-0.635380952539j))*x[1]
+        ref[(3, 2)]=(-0.679693996055-0.673088322217j)*x_ref[0]**o + ((-0.52400411527+0.604378071819j))*x_ref[0] + ((-0.291024618102+0.445321020095j))*x_ref[1]**o + ((0.141392146404-0.635380952539j))*x_ref[1]
+        arg[(3, 3)]=(-0.87542297899+0.0605243172401j)*x[0]**o + ((0.395540049718+0.956741679299j))*x[0] + ((-0.467622397233-0.398083891199j))*x[1]**o + ((-0.287926473924+0.371392218651j))*x[1]
+        ref[(3, 3)]=(-0.87542297899+0.0605243172401j)*x_ref[0]**o + ((0.395540049718+0.956741679299j))*x_ref[0] + ((-0.467622397233-0.398083891199j))*x_ref[1]**o + ((-0.287926473924+0.371392218651j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.977554561297-0.65395764548j)*x[2]**o + ((-0.407949223494-0.293272848403j))*x[2]
+            ref[(0, 0)]+=(0.977554561297-0.65395764548j)*x_ref[2]**o + ((-0.407949223494-0.293272848403j))*x_ref[2]
+            arg[(0, 1)]+=(0.166616593131+0.0374559401949j)*x[2]**o + ((-0.604212404988+0.9068969144j))*x[2]
+            ref[(0, 1)]+=(0.166616593131+0.0374559401949j)*x_ref[2]**o + ((-0.604212404988+0.9068969144j))*x_ref[2]
+            arg[(0, 2)]+=(-0.600984763343-0.742247064784j)*x[2]**o + ((0.744249526987-0.0128370251435j))*x[2]
+            ref[(0, 2)]+=(-0.600984763343-0.742247064784j)*x_ref[2]**o + ((0.744249526987-0.0128370251435j))*x_ref[2]
+            arg[(0, 3)]+=(0.559494934017-0.664280660874j)*x[2]**o + ((0.196766415974+0.276978670466j))*x[2]
+            ref[(0, 3)]+=(0.559494934017-0.664280660874j)*x_ref[2]**o + ((0.196766415974+0.276978670466j))*x_ref[2]
+            arg[(1, 0)]+=(0.301579931271+0.605875219068j)*x[2]**o + ((0.589585719738-0.295153842004j))*x[2]
+            ref[(1, 0)]+=(0.301579931271+0.605875219068j)*x_ref[2]**o + ((0.589585719738-0.295153842004j))*x_ref[2]
+            arg[(1, 1)]+=(-0.457662344671-0.88836146922j)*x[2]**o + ((0.0550057090438+0.142326933913j))*x[2]
+            ref[(1, 1)]+=(-0.457662344671-0.88836146922j)*x_ref[2]**o + ((0.0550057090438+0.142326933913j))*x_ref[2]
+            arg[(1, 2)]+=(-0.196546858232-0.634219033837j)*x[2]**o + ((0.284823473126-0.135986351819j))*x[2]
+            ref[(1, 2)]+=(-0.196546858232-0.634219033837j)*x_ref[2]**o + ((0.284823473126-0.135986351819j))*x_ref[2]
+            arg[(1, 3)]+=(0.480573195096+0.530483573509j)*x[2]**o + ((0.699260368299+0.175114563872j))*x[2]
+            ref[(1, 3)]+=(0.480573195096+0.530483573509j)*x_ref[2]**o + ((0.699260368299+0.175114563872j))*x_ref[2]
+            arg[(2, 0)]+=(0.901543057379+0.621579976195j)*x[2]**o + ((0.713613437681-0.080544917966j))*x[2]
+            ref[(2, 0)]+=(0.901543057379+0.621579976195j)*x_ref[2]**o + ((0.713613437681-0.080544917966j))*x_ref[2]
+            arg[(2, 1)]+=(0.321361315255+0.309300776374j)*x[2]**o + ((-0.654051970843+0.44688649948j))*x[2]
+            ref[(2, 1)]+=(0.321361315255+0.309300776374j)*x_ref[2]**o + ((-0.654051970843+0.44688649948j))*x_ref[2]
+            arg[(2, 2)]+=(0.991203932549+0.736907521413j)*x[2]**o + ((0.845801965484+0.841289664228j))*x[2]
+            ref[(2, 2)]+=(0.991203932549+0.736907521413j)*x_ref[2]**o + ((0.845801965484+0.841289664228j))*x_ref[2]
+            arg[(2, 3)]+=(0.71966263602-0.219900870153j)*x[2]**o + ((0.992167837937+0.490551067059j))*x[2]
+            ref[(2, 3)]+=(0.71966263602-0.219900870153j)*x_ref[2]**o + ((0.992167837937+0.490551067059j))*x_ref[2]
+            arg[(3, 0)]+=(-0.852497371355-0.650765604365j)*x[2]**o + ((-0.644511566836-0.643123764954j))*x[2]
+            ref[(3, 0)]+=(-0.852497371355-0.650765604365j)*x_ref[2]**o + ((-0.644511566836-0.643123764954j))*x_ref[2]
+            arg[(3, 1)]+=(0.280857630015-0.332607617548j)*x[2]**o + ((-0.357912328147-0.354173670349j))*x[2]
+            ref[(3, 1)]+=(0.280857630015-0.332607617548j)*x_ref[2]**o + ((-0.357912328147-0.354173670349j))*x_ref[2]
+            arg[(3, 2)]+=(-0.670676656381-0.13454498668j)*x[2]**o + ((-0.730002522221+0.621408319618j))*x[2]
+            ref[(3, 2)]+=(-0.670676656381-0.13454498668j)*x_ref[2]**o + ((-0.730002522221+0.621408319618j))*x_ref[2]
+            arg[(3, 3)]+=(-0.870430343586+0.10002293054j)*x[2]**o + ((-0.599785227974-0.739774346871j))*x[2]
+            ref[(3, 3)]+=(-0.870430343586+0.10002293054j)*x_ref[2]**o + ((-0.599785227974-0.739774346871j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(0.916984983412+0.0346199769783j)*x[0]**o + ((-0.896720096012-0.688421174299j))*x[0] + ((-0.395223138331-0.512473936616j))*x[1]**o + ((-0.971255203255+0.242033893324j))*x[1]
+        ref[(0, 0, 0)]=(0.916984983412+0.0346199769783j)*x_ref[0]**o + ((-0.896720096012-0.688421174299j))*x_ref[0] + ((-0.395223138331-0.512473936616j))*x_ref[1]**o + ((-0.971255203255+0.242033893324j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.283161120475+0.990365256932j)*x[0]**o + ((-0.713640247064+0.499980611317j))*x[0] + ((-0.101443746734-0.657520341168j))*x[1]**o + ((-0.751820046672-0.638232807718j))*x[1]
+        ref[(0, 0, 1)]=(0.283161120475+0.990365256932j)*x_ref[0]**o + ((-0.713640247064+0.499980611317j))*x_ref[0] + ((-0.101443746734-0.657520341168j))*x_ref[1]**o + ((-0.751820046672-0.638232807718j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.117424837666+0.455220842459j)*x[0]**o + ((-0.772016564082+0.608851472335j))*x[0] + ((-0.910345354975+0.756351420496j))*x[1]**o + ((-0.976381925823-0.678237774734j))*x[1]
+        ref[(0, 0, 2)]=(-0.117424837666+0.455220842459j)*x_ref[0]**o + ((-0.772016564082+0.608851472335j))*x_ref[0] + ((-0.910345354975+0.756351420496j))*x_ref[1]**o + ((-0.976381925823-0.678237774734j))*x_ref[1]
+        arg[(0, 0, 3)]=(-0.688827252907+0.977421690308j)*x[0]**o + ((0.909393123049+0.422407561413j))*x[0] + ((0.477317205137+0.722637368044j))*x[1]**o + ((0.0460355589854+0.20115876023j))*x[1]
+        ref[(0, 0, 3)]=(-0.688827252907+0.977421690308j)*x_ref[0]**o + ((0.909393123049+0.422407561413j))*x_ref[0] + ((0.477317205137+0.722637368044j))*x_ref[1]**o + ((0.0460355589854+0.20115876023j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.155393617415+0.596602241709j)*x[0]**o + ((-0.674931753145+0.515954624306j))*x[0] + ((0.553826184848+0.202804703653j))*x[1]**o + ((0.977495355532-0.589021011951j))*x[1]
+        ref[(0, 1, 0)]=(0.155393617415+0.596602241709j)*x_ref[0]**o + ((-0.674931753145+0.515954624306j))*x_ref[0] + ((0.553826184848+0.202804703653j))*x_ref[1]**o + ((0.977495355532-0.589021011951j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.28125240243-0.547147405954j)*x[0]**o + ((0.56075108927-0.875518526205j))*x[0] + ((0.63286846724-0.669590775854j))*x[1]**o + ((-0.565725756084-0.609874996265j))*x[1]
+        ref[(0, 1, 1)]=(-0.28125240243-0.547147405954j)*x_ref[0]**o + ((0.56075108927-0.875518526205j))*x_ref[0] + ((0.63286846724-0.669590775854j))*x_ref[1]**o + ((-0.565725756084-0.609874996265j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.201667481746+0.815198490664j)*x[0]**o + ((0.95952333118+0.448036705319j))*x[0] + ((0.0260923190774+0.835245736398j))*x[1]**o + ((0.201205945882+0.930803592046j))*x[1]
+        ref[(0, 1, 2)]=(0.201667481746+0.815198490664j)*x_ref[0]**o + ((0.95952333118+0.448036705319j))*x_ref[0] + ((0.0260923190774+0.835245736398j))*x_ref[1]**o + ((0.201205945882+0.930803592046j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.956470494931-0.422041795601j)*x[0]**o + ((0.0741407721994-0.984729730103j))*x[0] + ((-0.448163758001-0.523160319712j))*x[1]**o + ((-0.796452417648+0.228365932228j))*x[1]
+        ref[(0, 1, 3)]=(-0.956470494931-0.422041795601j)*x_ref[0]**o + ((0.0741407721994-0.984729730103j))*x_ref[0] + ((-0.448163758001-0.523160319712j))*x_ref[1]**o + ((-0.796452417648+0.228365932228j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.768366893393+0.126447069938j)*x[0]**o + ((0.843041515007-0.627174823897j))*x[0] + ((-0.270921814351+0.808183373659j))*x[1]**o + ((0.791866292347-0.135908124562j))*x[1]
+        ref[(0, 2, 0)]=(0.768366893393+0.126447069938j)*x_ref[0]**o + ((0.843041515007-0.627174823897j))*x_ref[0] + ((-0.270921814351+0.808183373659j))*x_ref[1]**o + ((0.791866292347-0.135908124562j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.766519730162-0.906864923034j)*x[0]**o + ((0.184820587169-0.593597833352j))*x[0] + ((0.568104415794+0.351796898126j))*x[1]**o + ((-0.541575256076-0.830999686831j))*x[1]
+        ref[(0, 2, 1)]=(0.766519730162-0.906864923034j)*x_ref[0]**o + ((0.184820587169-0.593597833352j))*x_ref[0] + ((0.568104415794+0.351796898126j))*x_ref[1]**o + ((-0.541575256076-0.830999686831j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.828562036466+0.19213945265j)*x[0]**o + ((-0.388469282637+0.670568345682j))*x[0] + ((0.897419210091+0.0521553933848j))*x[1]**o + ((0.508389554262+0.500497032024j))*x[1]
+        ref[(0, 2, 2)]=(-0.828562036466+0.19213945265j)*x_ref[0]**o + ((-0.388469282637+0.670568345682j))*x_ref[0] + ((0.897419210091+0.0521553933848j))*x_ref[1]**o + ((0.508389554262+0.500497032024j))*x_ref[1]
+        arg[(0, 2, 3)]=(-0.751493261226+0.577944900917j)*x[0]**o + ((0.0750835541266+0.680812841627j))*x[0] + ((-0.795107916992-0.81868258918j))*x[1]**o + ((0.0469790683512+0.644319478627j))*x[1]
+        ref[(0, 2, 3)]=(-0.751493261226+0.577944900917j)*x_ref[0]**o + ((0.0750835541266+0.680812841627j))*x_ref[0] + ((-0.795107916992-0.81868258918j))*x_ref[1]**o + ((0.0469790683512+0.644319478627j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.595386886236-0.970636739313j)*x[0]**o + ((0.536037948998-0.0285304977303j))*x[0] + ((0.0693086101981+0.16720987169j))*x[1]**o + ((-0.979723536591+0.862058701933j))*x[1]
+        ref[(1, 0, 0)]=(0.595386886236-0.970636739313j)*x_ref[0]**o + ((0.536037948998-0.0285304977303j))*x_ref[0] + ((0.0693086101981+0.16720987169j))*x_ref[1]**o + ((-0.979723536591+0.862058701933j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.841823222388+0.282143181546j)*x[0]**o + ((-0.897650845211-0.145610685965j))*x[0] + ((-0.952810189022+0.33744419299j))*x[1]**o + ((0.0347434223902-0.501182758475j))*x[1]
+        ref[(1, 0, 1)]=(-0.841823222388+0.282143181546j)*x_ref[0]**o + ((-0.897650845211-0.145610685965j))*x_ref[0] + ((-0.952810189022+0.33744419299j))*x_ref[1]**o + ((0.0347434223902-0.501182758475j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.0543502033131-0.123917602869j)*x[0]**o + ((0.913898955567-0.871550548457j))*x[0] + ((-0.452361399015-0.608010311172j))*x[1]**o + ((-0.19154102915-0.011044548981j))*x[1]
+        ref[(1, 0, 2)]=(0.0543502033131-0.123917602869j)*x_ref[0]**o + ((0.913898955567-0.871550548457j))*x_ref[0] + ((-0.452361399015-0.608010311172j))*x_ref[1]**o + ((-0.19154102915-0.011044548981j))*x_ref[1]
+        arg[(1, 0, 3)]=(-0.0994928143233+0.400532732558j)*x[0]**o + ((0.0940522792329-0.494983706995j))*x[0] + ((-0.573588915996+0.197400999866j))*x[1]**o + ((0.795329804189+0.737943588485j))*x[1]
+        ref[(1, 0, 3)]=(-0.0994928143233+0.400532732558j)*x_ref[0]**o + ((0.0940522792329-0.494983706995j))*x_ref[0] + ((-0.573588915996+0.197400999866j))*x_ref[1]**o + ((0.795329804189+0.737943588485j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.611849680466+0.354428335799j)*x[0]**o + ((0.427774269352-0.0436290813412j))*x[0] + ((0.105665590947+0.730291107778j))*x[1]**o + ((0.404244929018-0.291786267267j))*x[1]
+        ref[(1, 1, 0)]=(-0.611849680466+0.354428335799j)*x_ref[0]**o + ((0.427774269352-0.0436290813412j))*x_ref[0] + ((0.105665590947+0.730291107778j))*x_ref[1]**o + ((0.404244929018-0.291786267267j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.870577668796-0.863936024185j)*x[0]**o + ((0.321878350827-0.846353420617j))*x[0] + ((0.824655083161-0.194215869933j))*x[1]**o + ((0.837930106057+0.821039458358j))*x[1]
+        ref[(1, 1, 1)]=(0.870577668796-0.863936024185j)*x_ref[0]**o + ((0.321878350827-0.846353420617j))*x_ref[0] + ((0.824655083161-0.194215869933j))*x_ref[1]**o + ((0.837930106057+0.821039458358j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.337137203959-0.645150803971j)*x[0]**o + ((0.508266521432+0.725865604182j))*x[0] + ((0.33890988941+0.211179902392j))*x[1]**o + ((-0.853670354255+0.514240031478j))*x[1]
+        ref[(1, 1, 2)]=(0.337137203959-0.645150803971j)*x_ref[0]**o + ((0.508266521432+0.725865604182j))*x_ref[0] + ((0.33890988941+0.211179902392j))*x_ref[1]**o + ((-0.853670354255+0.514240031478j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.399058382696-0.590192484774j)*x[0]**o + ((0.749544643957+0.891115402585j))*x[0] + ((0.345070129308-0.252972677879j))*x[1]**o + ((-0.14292588523+0.578693396656j))*x[1]
+        ref[(1, 1, 3)]=(0.399058382696-0.590192484774j)*x_ref[0]**o + ((0.749544643957+0.891115402585j))*x_ref[0] + ((0.345070129308-0.252972677879j))*x_ref[1]**o + ((-0.14292588523+0.578693396656j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.938608939563+0.138852492269j)*x[0]**o + ((-0.704187261126-0.542974030412j))*x[0] + ((-0.927908080796-0.830752267042j))*x[1]**o + ((-0.00904149946063-0.746640345358j))*x[1]
+        ref[(1, 2, 0)]=(0.938608939563+0.138852492269j)*x_ref[0]**o + ((-0.704187261126-0.542974030412j))*x_ref[0] + ((-0.927908080796-0.830752267042j))*x_ref[1]**o + ((-0.00904149946063-0.746640345358j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.35834956462-0.665061842029j)*x[0]**o + ((0.425454691387-0.720870879205j))*x[0] + ((-0.723388672471-0.399560204666j))*x[1]**o + ((-0.30445936557+0.766105007618j))*x[1]
+        ref[(1, 2, 1)]=(0.35834956462-0.665061842029j)*x_ref[0]**o + ((0.425454691387-0.720870879205j))*x_ref[0] + ((-0.723388672471-0.399560204666j))*x_ref[1]**o + ((-0.30445936557+0.766105007618j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.935048318386+0.0108118312623j)*x[0]**o + ((-0.755796764705-0.42695081048j))*x[0] + ((-0.423237290305+0.359010693331j))*x[1]**o + ((-0.343946671615+0.439076407411j))*x[1]
+        ref[(1, 2, 2)]=(0.935048318386+0.0108118312623j)*x_ref[0]**o + ((-0.755796764705-0.42695081048j))*x_ref[0] + ((-0.423237290305+0.359010693331j))*x_ref[1]**o + ((-0.343946671615+0.439076407411j))*x_ref[1]
+        arg[(1, 2, 3)]=(0.480377959179-0.817156633578j)*x[0]**o + ((-0.485603762155-0.430411329463j))*x[0] + ((0.994771785915-0.144727666892j))*x[1]**o + ((0.956852177338-0.847737645219j))*x[1]
+        ref[(1, 2, 3)]=(0.480377959179-0.817156633578j)*x_ref[0]**o + ((-0.485603762155-0.430411329463j))*x_ref[0] + ((0.994771785915-0.144727666892j))*x_ref[1]**o + ((0.956852177338-0.847737645219j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.210403551866-0.134068769922j)*x[0]**o + ((0.129427114824-0.596344596116j))*x[0] + ((-0.761576257022+0.857868412026j))*x[1]**o + ((0.653138947936+0.467288197068j))*x[1]
+        ref[(2, 0, 0)]=(-0.210403551866-0.134068769922j)*x_ref[0]**o + ((0.129427114824-0.596344596116j))*x_ref[0] + ((-0.761576257022+0.857868412026j))*x_ref[1]**o + ((0.653138947936+0.467288197068j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.36179885763-0.335098580255j)*x[0]**o + ((0.496918897097+0.126080122898j))*x[0] + ((-0.641160367306-0.772320133749j))*x[1]**o + ((-0.984798469057+0.284870663434j))*x[1]
+        ref[(2, 0, 1)]=(-0.36179885763-0.335098580255j)*x_ref[0]**o + ((0.496918897097+0.126080122898j))*x_ref[0] + ((-0.641160367306-0.772320133749j))*x_ref[1]**o + ((-0.984798469057+0.284870663434j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.917636195053-0.0516310868189j)*x[0]**o + ((-0.0978977591081-0.764839532453j))*x[0] + ((0.605001453971+0.946382368036j))*x[1]**o + ((-0.572679303701+0.0982537589457j))*x[1]
+        ref[(2, 0, 2)]=(-0.917636195053-0.0516310868189j)*x_ref[0]**o + ((-0.0978977591081-0.764839532453j))*x_ref[0] + ((0.605001453971+0.946382368036j))*x_ref[1]**o + ((-0.572679303701+0.0982537589457j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.835892141961-0.513174808944j)*x[0]**o + ((-0.100058999254+0.952448409546j))*x[0] + ((-0.663328070227+0.311011824012j))*x[1]**o + ((0.843525079776-0.457065555228j))*x[1]
+        ref[(2, 0, 3)]=(-0.835892141961-0.513174808944j)*x_ref[0]**o + ((-0.100058999254+0.952448409546j))*x_ref[0] + ((-0.663328070227+0.311011824012j))*x_ref[1]**o + ((0.843525079776-0.457065555228j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.917458723439-0.415697548695j)*x[0]**o + ((0.95902759945-0.0473202425806j))*x[0] + ((-0.89851526603+0.972867466423j))*x[1]**o + ((0.906530389968+0.818709998446j))*x[1]
+        ref[(2, 1, 0)]=(-0.917458723439-0.415697548695j)*x_ref[0]**o + ((0.95902759945-0.0473202425806j))*x_ref[0] + ((-0.89851526603+0.972867466423j))*x_ref[1]**o + ((0.906530389968+0.818709998446j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.418149361233+0.961793786806j)*x[0]**o + ((-0.680216245227-0.471904896862j))*x[0] + ((-0.421840285633+0.0747110068092j))*x[1]**o + ((0.758264205124+0.0290885633801j))*x[1]
+        ref[(2, 1, 1)]=(-0.418149361233+0.961793786806j)*x_ref[0]**o + ((-0.680216245227-0.471904896862j))*x_ref[0] + ((-0.421840285633+0.0747110068092j))*x_ref[1]**o + ((0.758264205124+0.0290885633801j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.285664977511-0.404783046905j)*x[0]**o + ((0.607274109051+0.157496430834j))*x[0] + ((-0.78878613036+0.574773492559j))*x[1]**o + ((-0.414594112091-0.76372972904j))*x[1]
+        ref[(2, 1, 2)]=(0.285664977511-0.404783046905j)*x_ref[0]**o + ((0.607274109051+0.157496430834j))*x_ref[0] + ((-0.78878613036+0.574773492559j))*x_ref[1]**o + ((-0.414594112091-0.76372972904j))*x_ref[1]
+        arg[(2, 1, 3)]=(0.750951722162-0.434966372715j)*x[0]**o + ((-0.300118450543+0.841694900694j))*x[0] + ((0.24901037618-0.119355128937j))*x[1]**o + ((-0.0511544479816-0.697717051617j))*x[1]
+        ref[(2, 1, 3)]=(0.750951722162-0.434966372715j)*x_ref[0]**o + ((-0.300118450543+0.841694900694j))*x_ref[0] + ((0.24901037618-0.119355128937j))*x_ref[1]**o + ((-0.0511544479816-0.697717051617j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.960826758807+0.647021899697j)*x[0]**o + ((0.162672230849+0.757379855817j))*x[0] + ((0.157770417508-0.671091093747j))*x[1]**o + ((-0.680215240634+0.799744244119j))*x[1]
+        ref[(2, 2, 0)]=(-0.960826758807+0.647021899697j)*x_ref[0]**o + ((0.162672230849+0.757379855817j))*x_ref[0] + ((0.157770417508-0.671091093747j))*x_ref[1]**o + ((-0.680215240634+0.799744244119j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.231961332903+0.837604513549j)*x[0]**o + ((-0.973317113468+0.0624427460043j))*x[0] + ((0.57678181385+0.548535125025j))*x[1]**o + ((-0.782668263085+0.815993421538j))*x[1]
+        ref[(2, 2, 1)]=(0.231961332903+0.837604513549j)*x_ref[0]**o + ((-0.973317113468+0.0624427460043j))*x_ref[0] + ((0.57678181385+0.548535125025j))*x_ref[1]**o + ((-0.782668263085+0.815993421538j))*x_ref[1]
+        arg[(2, 2, 2)]=(-0.555807703392-0.0995783868432j)*x[0]**o + ((-0.0672004850314+0.449208190541j))*x[0] + ((0.580397751189-0.583332056146j))*x[1]**o + ((0.529315134687+0.656220255969j))*x[1]
+        ref[(2, 2, 2)]=(-0.555807703392-0.0995783868432j)*x_ref[0]**o + ((-0.0672004850314+0.449208190541j))*x_ref[0] + ((0.580397751189-0.583332056146j))*x_ref[1]**o + ((0.529315134687+0.656220255969j))*x_ref[1]
+        arg[(2, 2, 3)]=(0.566188016492+0.664053036197j)*x[0]**o + ((0.585153974635-0.439602901812j))*x[0] + ((0.742155037561+0.993226457932j))*x[1]**o + ((0.2879467595-0.321233649115j))*x[1]
+        ref[(2, 2, 3)]=(0.566188016492+0.664053036197j)*x_ref[0]**o + ((0.585153974635-0.439602901812j))*x_ref[0] + ((0.742155037561+0.993226457932j))*x_ref[1]**o + ((0.2879467595-0.321233649115j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.703005064943+0.647862894418j)*x[0]**o + ((0.61261141105+0.429417645514j))*x[0] + ((0.615207529071-0.341511484457j))*x[1]**o + ((-0.018771410044+0.801236431161j))*x[1]
+        ref[(3, 0, 0)]=(-0.703005064943+0.647862894418j)*x_ref[0]**o + ((0.61261141105+0.429417645514j))*x_ref[0] + ((0.615207529071-0.341511484457j))*x_ref[1]**o + ((-0.018771410044+0.801236431161j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.911992210035-0.299113094019j)*x[0]**o + ((0.0303516193729+0.194276293334j))*x[0] + ((-0.9787554046-0.698442552301j))*x[1]**o + ((-0.486760260182-0.0692898131093j))*x[1]
+        ref[(3, 0, 1)]=(-0.911992210035-0.299113094019j)*x_ref[0]**o + ((0.0303516193729+0.194276293334j))*x_ref[0] + ((-0.9787554046-0.698442552301j))*x_ref[1]**o + ((-0.486760260182-0.0692898131093j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.243001393101-0.310730121822j)*x[0]**o + ((-0.173045087182+0.549700711306j))*x[0] + ((-0.758988835387+0.594840621861j))*x[1]**o + ((-0.713553663973-0.671010061783j))*x[1]
+        ref[(3, 0, 2)]=(0.243001393101-0.310730121822j)*x_ref[0]**o + ((-0.173045087182+0.549700711306j))*x_ref[0] + ((-0.758988835387+0.594840621861j))*x_ref[1]**o + ((-0.713553663973-0.671010061783j))*x_ref[1]
+        arg[(3, 0, 3)]=(-0.524471237514+0.879469413257j)*x[0]**o + ((-0.828823366401-0.3838956179j))*x[0] + ((-0.206244895661-0.549593825527j))*x[1]**o + ((0.695782174273+0.21322340813j))*x[1]
+        ref[(3, 0, 3)]=(-0.524471237514+0.879469413257j)*x_ref[0]**o + ((-0.828823366401-0.3838956179j))*x_ref[0] + ((-0.206244895661-0.549593825527j))*x_ref[1]**o + ((0.695782174273+0.21322340813j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.202272148696+0.0685980889476j)*x[0]**o + ((0.579990778523+0.403117974257j))*x[0] + ((-0.293161989933+0.427678142333j))*x[1]**o + ((0.536542180268-0.590435008615j))*x[1]
+        ref[(3, 1, 0)]=(-0.202272148696+0.0685980889476j)*x_ref[0]**o + ((0.579990778523+0.403117974257j))*x_ref[0] + ((-0.293161989933+0.427678142333j))*x_ref[1]**o + ((0.536542180268-0.590435008615j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.943050455775-0.241335675104j)*x[0]**o + ((-0.8451048949+0.62834658312j))*x[0] + ((-0.618954648919-0.516323548466j))*x[1]**o + ((-0.629118678792+0.133969045059j))*x[1]
+        ref[(3, 1, 1)]=(-0.943050455775-0.241335675104j)*x_ref[0]**o + ((-0.8451048949+0.62834658312j))*x_ref[0] + ((-0.618954648919-0.516323548466j))*x_ref[1]**o + ((-0.629118678792+0.133969045059j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.705721628275-0.25614849338j)*x[0]**o + ((0.602978339544+0.0955814207574j))*x[0] + ((-0.215492639331-0.135709608813j))*x[1]**o + ((0.749876663777+0.040828583398j))*x[1]
+        ref[(3, 1, 2)]=(-0.705721628275-0.25614849338j)*x_ref[0]**o + ((0.602978339544+0.0955814207574j))*x_ref[0] + ((-0.215492639331-0.135709608813j))*x_ref[1]**o + ((0.749876663777+0.040828583398j))*x_ref[1]
+        arg[(3, 1, 3)]=(0.432640908672+0.292570560871j)*x[0]**o + ((-0.590411965513+0.747216762216j))*x[0] + ((-0.984492875542+0.368171770239j))*x[1]**o + ((-0.208008045065-0.289885027581j))*x[1]
+        ref[(3, 1, 3)]=(0.432640908672+0.292570560871j)*x_ref[0]**o + ((-0.590411965513+0.747216762216j))*x_ref[0] + ((-0.984492875542+0.368171770239j))*x_ref[1]**o + ((-0.208008045065-0.289885027581j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.97715440536+0.0730675412581j)*x[0]**o + ((-0.668494386119-0.716486657094j))*x[0] + ((-0.715250402993-0.197669761375j))*x[1]**o + ((0.146607555752-0.874279283916j))*x[1]
+        ref[(3, 2, 0)]=(0.97715440536+0.0730675412581j)*x_ref[0]**o + ((-0.668494386119-0.716486657094j))*x_ref[0] + ((-0.715250402993-0.197669761375j))*x_ref[1]**o + ((0.146607555752-0.874279283916j))*x_ref[1]
+        arg[(3, 2, 1)]=(-0.0320292824046-0.894396978918j)*x[0]**o + ((0.666012038996-0.782604813188j))*x[0] + ((0.212495262253+0.129025403181j))*x[1]**o + ((-0.239943374808-0.909008201613j))*x[1]
+        ref[(3, 2, 1)]=(-0.0320292824046-0.894396978918j)*x_ref[0]**o + ((0.666012038996-0.782604813188j))*x_ref[0] + ((0.212495262253+0.129025403181j))*x_ref[1]**o + ((-0.239943374808-0.909008201613j))*x_ref[1]
+        arg[(3, 2, 2)]=(0.142513301503-0.138608355956j)*x[0]**o + ((-0.4599653058-0.0584792344805j))*x[0] + ((0.0794133499838-0.563713900825j))*x[1]**o + ((-0.650505893482+0.990698118907j))*x[1]
+        ref[(3, 2, 2)]=(0.142513301503-0.138608355956j)*x_ref[0]**o + ((-0.4599653058-0.0584792344805j))*x_ref[0] + ((0.0794133499838-0.563713900825j))*x_ref[1]**o + ((-0.650505893482+0.990698118907j))*x_ref[1]
+        arg[(3, 2, 3)]=(0.82004056335+0.220851479281j)*x[0]**o + ((-0.999915875935-0.135800377927j))*x[0] + ((-0.172844877787+0.265185492401j))*x[1]**o + ((0.367471210768+0.786911177279j))*x[1]
+        ref[(3, 2, 3)]=(0.82004056335+0.220851479281j)*x_ref[0]**o + ((-0.999915875935-0.135800377927j))*x_ref[0] + ((-0.172844877787+0.265185492401j))*x_ref[1]**o + ((0.367471210768+0.786911177279j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.363517965862-0.503880033245j)*x[2]**o + ((-0.588703984556+0.176122107212j))*x[2]
+            ref[(0, 0, 0)]+=(-0.363517965862-0.503880033245j)*x_ref[2]**o + ((-0.588703984556+0.176122107212j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.728519462577-0.474338294743j)*x[2]**o + ((0.543907293301-0.564886026436j))*x[2]
+            ref[(0, 0, 1)]+=(0.728519462577-0.474338294743j)*x_ref[2]**o + ((0.543907293301-0.564886026436j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.990014913962-0.378161325001j)*x[2]**o + ((0.632501715704+0.165824513339j))*x[2]
+            ref[(0, 0, 2)]+=(0.990014913962-0.378161325001j)*x_ref[2]**o + ((0.632501715704+0.165824513339j))*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.801040945936-0.649819218206j)*x[2]**o + ((0.313346137564-0.182723001409j))*x[2]
+            ref[(0, 0, 3)]+=(-0.801040945936-0.649819218206j)*x_ref[2]**o + ((0.313346137564-0.182723001409j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.506115287372-0.620758725491j)*x[2]**o + ((0.203540959709+0.675515589938j))*x[2]
+            ref[(0, 1, 0)]+=(0.506115287372-0.620758725491j)*x_ref[2]**o + ((0.203540959709+0.675515589938j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.29380268692+0.845358175225j)*x[2]**o + ((0.93302581858+0.854429798006j))*x[2]
+            ref[(0, 1, 1)]+=(0.29380268692+0.845358175225j)*x_ref[2]**o + ((0.93302581858+0.854429798006j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.327256992887+0.251923671207j)*x[2]**o + ((0.965188198412+0.80926292053j))*x[2]
+            ref[(0, 1, 2)]+=(-0.327256992887+0.251923671207j)*x_ref[2]**o + ((0.965188198412+0.80926292053j))*x_ref[2]
+            arg[(0, 1, 3)]+=(0.201350131494-0.833882456495j)*x[2]**o + ((0.453702931206-0.659194395395j))*x[2]
+            ref[(0, 1, 3)]+=(0.201350131494-0.833882456495j)*x_ref[2]**o + ((0.453702931206-0.659194395395j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.141738393314+0.730851844247j)*x[2]**o + ((0.877333447582+0.675512605712j))*x[2]
+            ref[(0, 2, 0)]+=(-0.141738393314+0.730851844247j)*x_ref[2]**o + ((0.877333447582+0.675512605712j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.344956480459+0.50606005056j)*x[2]**o + ((0.713701978265+0.288641616323j))*x[2]
+            ref[(0, 2, 1)]+=(0.344956480459+0.50606005056j)*x_ref[2]**o + ((0.713701978265+0.288641616323j))*x_ref[2]
+            arg[(0, 2, 2)]+=(0.561332461085-0.258095360447j)*x[2]**o + ((0.779713782417-0.0469436302566j))*x[2]
+            ref[(0, 2, 2)]+=(0.561332461085-0.258095360447j)*x_ref[2]**o + ((0.779713782417-0.0469436302566j))*x_ref[2]
+            arg[(0, 2, 3)]+=(0.520773817405-0.658311600452j)*x[2]**o + ((0.618557497507-0.103243209357j))*x[2]
+            ref[(0, 2, 3)]+=(0.520773817405-0.658311600452j)*x_ref[2]**o + ((0.618557497507-0.103243209357j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.401277746335+0.84719314972j)*x[2]**o + ((-0.650205288711-0.0124646690295j))*x[2]
+            ref[(1, 0, 0)]+=(0.401277746335+0.84719314972j)*x_ref[2]**o + ((-0.650205288711-0.0124646690295j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.0612928306798-0.26276357034j)*x[2]**o + ((-0.305052403691+0.856924048576j))*x[2]
+            ref[(1, 0, 1)]+=(-0.0612928306798-0.26276357034j)*x_ref[2]**o + ((-0.305052403691+0.856924048576j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.330200463072+0.821990576436j)*x[2]**o + ((0.338245989633-0.853327837698j))*x[2]
+            ref[(1, 0, 2)]+=(-0.330200463072+0.821990576436j)*x_ref[2]**o + ((0.338245989633-0.853327837698j))*x_ref[2]
+            arg[(1, 0, 3)]+=(0.434973690758-0.929156691773j)*x[2]**o + ((0.284843662616+0.547876013501j))*x[2]
+            ref[(1, 0, 3)]+=(0.434973690758-0.929156691773j)*x_ref[2]**o + ((0.284843662616+0.547876013501j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.499859151878+0.0181485905011j)*x[2]**o + ((0.215901548364-0.469099079464j))*x[2]
+            ref[(1, 1, 0)]+=(0.499859151878+0.0181485905011j)*x_ref[2]**o + ((0.215901548364-0.469099079464j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.385985821574-0.994300289538j)*x[2]**o + ((0.89881680075+0.559311221688j))*x[2]
+            ref[(1, 1, 1)]+=(-0.385985821574-0.994300289538j)*x_ref[2]**o + ((0.89881680075+0.559311221688j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.644563060082+0.948709750517j)*x[2]**o + ((-0.361850913569-0.0759400951993j))*x[2]
+            ref[(1, 1, 2)]+=(0.644563060082+0.948709750517j)*x_ref[2]**o + ((-0.361850913569-0.0759400951993j))*x_ref[2]
+            arg[(1, 1, 3)]+=(-0.0103141745223-0.409548137533j)*x[2]**o + ((0.873605822745-0.683572768386j))*x[2]
+            ref[(1, 1, 3)]+=(-0.0103141745223-0.409548137533j)*x_ref[2]**o + ((0.873605822745-0.683572768386j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.145290875656+0.785780158727j)*x[2]**o + ((0.962289140694+0.235200047448j))*x[2]
+            ref[(1, 2, 0)]+=(-0.145290875656+0.785780158727j)*x_ref[2]**o + ((0.962289140694+0.235200047448j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.121658900464+0.310081953527j)*x[2]**o + ((-0.624015351179-0.562748618404j))*x[2]
+            ref[(1, 2, 1)]+=(0.121658900464+0.310081953527j)*x_ref[2]**o + ((-0.624015351179-0.562748618404j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.0927826507997-0.520444355626j)*x[2]**o + ((0.0694629730444+0.576196609808j))*x[2]
+            ref[(1, 2, 2)]+=(0.0927826507997-0.520444355626j)*x_ref[2]**o + ((0.0694629730444+0.576196609808j))*x_ref[2]
+            arg[(1, 2, 3)]+=(0.599677704437+0.201308533436j)*x[2]**o + ((-0.445811025212-0.426246548101j))*x[2]
+            ref[(1, 2, 3)]+=(0.599677704437+0.201308533436j)*x_ref[2]**o + ((-0.445811025212-0.426246548101j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.506709163198+0.500972719922j)*x[2]**o + ((0.972758017097-0.117652158747j))*x[2]
+            ref[(2, 0, 0)]+=(0.506709163198+0.500972719922j)*x_ref[2]**o + ((0.972758017097-0.117652158747j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.938384705848-0.244801808583j)*x[2]**o + ((-0.219925087122-0.0765578160614j))*x[2]
+            ref[(2, 0, 1)]+=(0.938384705848-0.244801808583j)*x_ref[2]**o + ((-0.219925087122-0.0765578160614j))*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.273795340274+0.502659303209j)*x[2]**o + ((-0.092311307117+0.384483712154j))*x[2]
+            ref[(2, 0, 2)]+=(-0.273795340274+0.502659303209j)*x_ref[2]**o + ((-0.092311307117+0.384483712154j))*x_ref[2]
+            arg[(2, 0, 3)]+=(0.562351114354+0.177655611964j)*x[2]**o + ((-0.308344010442-0.383408983035j))*x[2]
+            ref[(2, 0, 3)]+=(0.562351114354+0.177655611964j)*x_ref[2]**o + ((-0.308344010442-0.383408983035j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.150673852071+0.262345244569j)*x[2]**o + ((-0.473089872354+0.256356035285j))*x[2]
+            ref[(2, 1, 0)]+=(-0.150673852071+0.262345244569j)*x_ref[2]**o + ((-0.473089872354+0.256356035285j))*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.346248524883-0.775750862842j)*x[2]**o + ((0.26685294591+0.477022746216j))*x[2]
+            ref[(2, 1, 1)]+=(-0.346248524883-0.775750862842j)*x_ref[2]**o + ((0.26685294591+0.477022746216j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.130974046963+0.870566373033j)*x[2]**o + ((0.704564635522+0.414246062945j))*x[2]
+            ref[(2, 1, 2)]+=(-0.130974046963+0.870566373033j)*x_ref[2]**o + ((0.704564635522+0.414246062945j))*x_ref[2]
+            arg[(2, 1, 3)]+=(0.770245844358-0.70691849228j)*x[2]**o + ((-0.970020956875+0.808315901588j))*x[2]
+            ref[(2, 1, 3)]+=(0.770245844358-0.70691849228j)*x_ref[2]**o + ((-0.970020956875+0.808315901588j))*x_ref[2]
+            arg[(2, 2, 0)]+=(0.414848556542-0.868577877784j)*x[2]**o + ((0.635614529595+0.68329020886j))*x[2]
+            ref[(2, 2, 0)]+=(0.414848556542-0.868577877784j)*x_ref[2]**o + ((0.635614529595+0.68329020886j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.125071105887+0.831859248866j)*x[2]**o + ((0.661151621049+0.743626621471j))*x[2]
+            ref[(2, 2, 1)]+=(0.125071105887+0.831859248866j)*x_ref[2]**o + ((0.661151621049+0.743626621471j))*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.0282266492791+0.787398514862j)*x[2]**o + ((-0.326310001863+0.470826456557j))*x[2]
+            ref[(2, 2, 2)]+=(-0.0282266492791+0.787398514862j)*x_ref[2]**o + ((-0.326310001863+0.470826456557j))*x_ref[2]
+            arg[(2, 2, 3)]+=(0.00448178822433+0.675120753242j)*x[2]**o + ((-0.191687089221+0.641740818207j))*x[2]
+            ref[(2, 2, 3)]+=(0.00448178822433+0.675120753242j)*x_ref[2]**o + ((-0.191687089221+0.641740818207j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.486674875617-0.660833752285j)*x[2]**o + ((-0.432500907335-0.512778489132j))*x[2]
+            ref[(3, 0, 0)]+=(0.486674875617-0.660833752285j)*x_ref[2]**o + ((-0.432500907335-0.512778489132j))*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.542001632835+0.752930640567j)*x[2]**o + ((0.988723013514-0.652644696755j))*x[2]
+            ref[(3, 0, 1)]+=(-0.542001632835+0.752930640567j)*x_ref[2]**o + ((0.988723013514-0.652644696755j))*x_ref[2]
+            arg[(3, 0, 2)]+=(0.161361908694-0.60852863231j)*x[2]**o + ((0.359446313103-0.521524004329j))*x[2]
+            ref[(3, 0, 2)]+=(0.161361908694-0.60852863231j)*x_ref[2]**o + ((0.359446313103-0.521524004329j))*x_ref[2]
+            arg[(3, 0, 3)]+=(-0.181666985859-0.766431538621j)*x[2]**o + ((-0.757552773105-0.00635410769266j))*x[2]
+            ref[(3, 0, 3)]+=(-0.181666985859-0.766431538621j)*x_ref[2]**o + ((-0.757552773105-0.00635410769266j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.892514526688+0.475400744762j)*x[2]**o + ((-0.243443169557+0.839476023345j))*x[2]
+            ref[(3, 1, 0)]+=(-0.892514526688+0.475400744762j)*x_ref[2]**o + ((-0.243443169557+0.839476023345j))*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.159723518291-0.153707381434j)*x[2]**o + ((0.720390592794+0.738692885089j))*x[2]
+            ref[(3, 1, 1)]+=(-0.159723518291-0.153707381434j)*x_ref[2]**o + ((0.720390592794+0.738692885089j))*x_ref[2]
+            arg[(3, 1, 2)]+=(0.827433029121-0.934601905526j)*x[2]**o + ((-0.175225837127+0.063846509378j))*x[2]
+            ref[(3, 1, 2)]+=(0.827433029121-0.934601905526j)*x_ref[2]**o + ((-0.175225837127+0.063846509378j))*x_ref[2]
+            arg[(3, 1, 3)]+=(0.0372146563435+0.268020518191j)*x[2]**o + ((-0.580594190988+0.387939041704j))*x[2]
+            ref[(3, 1, 3)]+=(0.0372146563435+0.268020518191j)*x_ref[2]**o + ((-0.580594190988+0.387939041704j))*x_ref[2]
+            arg[(3, 2, 0)]+=(0.0175264109833+0.923957238757j)*x[2]**o + ((0.43251530824+0.780220072576j))*x[2]
+            ref[(3, 2, 0)]+=(0.0175264109833+0.923957238757j)*x_ref[2]**o + ((0.43251530824+0.780220072576j))*x_ref[2]
+            arg[(3, 2, 1)]+=(-0.429408618032-0.763127914348j)*x[2]**o + ((-0.305769703493+0.0278473081306j))*x[2]
+            ref[(3, 2, 1)]+=(-0.429408618032-0.763127914348j)*x_ref[2]**o + ((-0.305769703493+0.0278473081306j))*x_ref[2]
+            arg[(3, 2, 2)]+=(0.951210241502+0.117402602585j)*x[2]**o + ((-0.90112846813+0.349763205042j))*x[2]
+            ref[(3, 2, 2)]+=(0.951210241502+0.117402602585j)*x_ref[2]**o + ((-0.90112846813+0.349763205042j))*x_ref[2]
+            arg[(3, 2, 3)]+=(0.495656900465+0.964677113013j)*x[2]**o + ((-0.874370734659-0.191804547764j))*x[2]
+            ref[(3, 2, 3)]+=(0.495656900465+0.964677113013j)*x_ref[2]**o + ((-0.874370734659-0.191804547764j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3, 2),w)
+        ref = Data(0,(2, 4, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.644123477877+0.0608688204549j)*x[0]**o + ((-0.179401253253-0.225263450917j))*x[0] + ((0.0747808036155+0.589657976182j))*x[1]**o + ((-0.555317844078+0.492457943486j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.644123477877+0.0608688204549j)*x_ref[0]**o + ((-0.179401253253-0.225263450917j))*x_ref[0] + ((0.0747808036155+0.589657976182j))*x_ref[1]**o + ((-0.555317844078+0.492457943486j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.0845071717346+0.675676171502j)*x[0]**o + ((0.862826816302+0.415738168719j))*x[0] + ((0.964080173425-0.329207005779j))*x[1]**o + ((0.800978048647-0.347430481383j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.0845071717346+0.675676171502j)*x_ref[0]**o + ((0.862826816302+0.415738168719j))*x_ref[0] + ((0.964080173425-0.329207005779j))*x_ref[1]**o + ((0.800978048647-0.347430481383j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.104218645501-0.87221097551j)*x[0]**o + ((-0.1585228613-0.969274951538j))*x[0] + ((-0.208043190023-0.987452422047j))*x[1]**o + ((0.401684009011+0.615397259108j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.104218645501-0.87221097551j)*x_ref[0]**o + ((-0.1585228613-0.969274951538j))*x_ref[0] + ((-0.208043190023-0.987452422047j))*x_ref[1]**o + ((0.401684009011+0.615397259108j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.876779582383+0.562218963356j)*x[0]**o + ((0.00190792654355-0.83463416087j))*x[0] + ((-0.929191882613+0.817750605604j))*x[1]**o + ((-0.140287373194+0.743227776747j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.876779582383+0.562218963356j)*x_ref[0]**o + ((0.00190792654355-0.83463416087j))*x_ref[0] + ((-0.929191882613+0.817750605604j))*x_ref[1]**o + ((-0.140287373194+0.743227776747j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.443884297835-0.469984334827j)*x[0]**o + ((0.936431195171-0.38724478288j))*x[0] + ((0.878254088142-0.580311646696j))*x[1]**o + ((0.233304834268+0.895211527656j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.443884297835-0.469984334827j)*x_ref[0]**o + ((0.936431195171-0.38724478288j))*x_ref[0] + ((0.878254088142-0.580311646696j))*x_ref[1]**o + ((0.233304834268+0.895211527656j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.98464944487-0.80626284338j)*x[0]**o + ((0.63036972628-0.405224467279j))*x[0] + ((0.495765946063-0.11598599408j))*x[1]**o + ((0.731874735131+0.160360341367j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.98464944487-0.80626284338j)*x_ref[0]**o + ((0.63036972628-0.405224467279j))*x_ref[0] + ((0.495765946063-0.11598599408j))*x_ref[1]**o + ((0.731874735131+0.160360341367j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.991374194546+0.705346392799j)*x[0]**o + ((0.601811979751+0.931127593453j))*x[0] + ((-0.127698091664+0.479644605867j))*x[1]**o + ((0.839108352875-0.822826466469j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.991374194546+0.705346392799j)*x_ref[0]**o + ((0.601811979751+0.931127593453j))*x_ref[0] + ((-0.127698091664+0.479644605867j))*x_ref[1]**o + ((0.839108352875-0.822826466469j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.509874535405+0.269333404521j)*x[0]**o + ((-0.816273189153-0.881335822604j))*x[0] + ((-0.984530515549-0.962593254376j))*x[1]**o + ((-0.00207843202236+0.990207396526j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.509874535405+0.269333404521j)*x_ref[0]**o + ((-0.816273189153-0.881335822604j))*x_ref[0] + ((-0.984530515549-0.962593254376j))*x_ref[1]**o + ((-0.00207843202236+0.990207396526j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.805942138674-0.70365194251j)*x[0]**o + ((0.483301248919-0.818279688726j))*x[0] + ((-0.550516723448+0.841138100732j))*x[1]**o + ((0.0224744865298-0.973375962018j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.805942138674-0.70365194251j)*x_ref[0]**o + ((0.483301248919-0.818279688726j))*x_ref[0] + ((-0.550516723448+0.841138100732j))*x_ref[1]**o + ((0.0224744865298-0.973375962018j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.407351034396-0.613997851964j)*x[0]**o + ((-0.515093429962+0.81060241045j))*x[0] + ((-0.94235475661+0.725291376114j))*x[1]**o + ((0.132156322035-0.0406179491871j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.407351034396-0.613997851964j)*x_ref[0]**o + ((-0.515093429962+0.81060241045j))*x_ref[0] + ((-0.94235475661+0.725291376114j))*x_ref[1]**o + ((0.132156322035-0.0406179491871j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.0846091128832+0.00727961627364j)*x[0]**o + ((-0.77571266559+0.329186578106j))*x[0] + ((-0.31222323373+0.401645381042j))*x[1]**o + ((0.586315652873+0.29484481478j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.0846091128832+0.00727961627364j)*x_ref[0]**o + ((-0.77571266559+0.329186578106j))*x_ref[0] + ((-0.31222323373+0.401645381042j))*x_ref[1]**o + ((0.586315652873+0.29484481478j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.807526925366+0.176772077642j)*x[0]**o + ((-0.124249563997-0.203840043555j))*x[0] + ((0.373231642428-0.926068575269j))*x[1]**o + ((0.811183569102-0.43599199156j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.807526925366+0.176772077642j)*x_ref[0]**o + ((-0.124249563997-0.203840043555j))*x_ref[0] + ((0.373231642428-0.926068575269j))*x_ref[1]**o + ((0.811183569102-0.43599199156j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.695060253845+0.222942878016j)*x[0]**o + ((0.392886177738+0.165493534403j))*x[0] + ((0.832513443542+0.731152513043j))*x[1]**o + ((0.702533385921+0.769843588937j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.695060253845+0.222942878016j)*x_ref[0]**o + ((0.392886177738+0.165493534403j))*x_ref[0] + ((0.832513443542+0.731152513043j))*x_ref[1]**o + ((0.702533385921+0.769843588937j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.594316185385+0.233996236897j)*x[0]**o + ((-0.773696476318-0.551859183454j))*x[0] + ((0.952927387533+0.733577961433j))*x[1]**o + ((-0.451948894969-0.832440157651j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.594316185385+0.233996236897j)*x_ref[0]**o + ((-0.773696476318-0.551859183454j))*x_ref[0] + ((0.952927387533+0.733577961433j))*x_ref[1]**o + ((-0.451948894969-0.832440157651j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.469255733011-0.130226066767j)*x[0]**o + ((-0.73559359757-0.281748866299j))*x[0] + ((0.947315519155+0.646878328514j))*x[1]**o + ((0.956049481699+0.664053066233j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.469255733011-0.130226066767j)*x_ref[0]**o + ((-0.73559359757-0.281748866299j))*x_ref[0] + ((0.947315519155+0.646878328514j))*x_ref[1]**o + ((0.956049481699+0.664053066233j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.405665122731+0.541374839659j)*x[0]**o + ((-0.180632013243+0.83519810275j))*x[0] + ((-0.046599836383+0.0450341928138j))*x[1]**o + ((0.742824745691-0.98120609467j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.405665122731+0.541374839659j)*x_ref[0]**o + ((-0.180632013243+0.83519810275j))*x_ref[0] + ((-0.046599836383+0.0450341928138j))*x_ref[1]**o + ((0.742824745691-0.98120609467j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(0.797638953857+0.434233108879j)*x[0]**o + ((0.181350162744-0.446851083648j))*x[0] + ((0.301243230151-0.235468064458j))*x[1]**o + ((-0.888444636478+0.414325686465j))*x[1]
+        ref[(0, 2, 2, 0)]=(0.797638953857+0.434233108879j)*x_ref[0]**o + ((0.181350162744-0.446851083648j))*x_ref[0] + ((0.301243230151-0.235468064458j))*x_ref[1]**o + ((-0.888444636478+0.414325686465j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.351889447695-0.236307813912j)*x[0]**o + ((0.216301836598+0.280040750806j))*x[0] + ((0.869330904279-0.258682025326j))*x[1]**o + ((-0.807053627885-0.71946102318j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.351889447695-0.236307813912j)*x_ref[0]**o + ((0.216301836598+0.280040750806j))*x_ref[0] + ((0.869330904279-0.258682025326j))*x_ref[1]**o + ((-0.807053627885-0.71946102318j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.271348455611-0.141582993975j)*x[0]**o + ((0.876182009972+0.89973717575j))*x[0] + ((0.365627079429-0.865145106053j))*x[1]**o + ((-0.0161112852385+0.989022993047j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.271348455611-0.141582993975j)*x_ref[0]**o + ((0.876182009972+0.89973717575j))*x_ref[0] + ((0.365627079429-0.865145106053j))*x_ref[1]**o + ((-0.0161112852385+0.989022993047j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.758282939322+0.817418654639j)*x[0]**o + ((-0.803355260508-0.478768339807j))*x[0] + ((-0.734788433788+0.99366158892j))*x[1]**o + ((0.424664039959+0.476685568981j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.758282939322+0.817418654639j)*x_ref[0]**o + ((-0.803355260508-0.478768339807j))*x_ref[0] + ((-0.734788433788+0.99366158892j))*x_ref[1]**o + ((0.424664039959+0.476685568981j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.773511551566-0.502050928502j)*x[0]**o + ((0.75341210355-0.51328730786j))*x[0] + ((0.0707676791602+0.915509240479j))*x[1]**o + ((0.482671726125+0.758791184059j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.773511551566-0.502050928502j)*x_ref[0]**o + ((0.75341210355-0.51328730786j))*x_ref[0] + ((0.0707676791602+0.915509240479j))*x_ref[1]**o + ((0.482671726125+0.758791184059j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.814048444681-0.00336613351092j)*x[0]**o + ((0.223836827597+0.741187200597j))*x[0] + ((0.598777097358-0.27754705029j))*x[1]**o + ((-0.496417398456-0.90592961578j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.814048444681-0.00336613351092j)*x_ref[0]**o + ((0.223836827597+0.741187200597j))*x_ref[0] + ((0.598777097358-0.27754705029j))*x_ref[1]**o + ((-0.496417398456-0.90592961578j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.260273840164+0.240894784916j)*x[0]**o + ((-0.636760148527-0.808275210286j))*x[0] + ((-0.652479302111+0.981032143947j))*x[1]**o + ((-0.390722529005-0.292772321639j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.260273840164+0.240894784916j)*x_ref[0]**o + ((-0.636760148527-0.808275210286j))*x_ref[0] + ((-0.652479302111+0.981032143947j))*x_ref[1]**o + ((-0.390722529005-0.292772321639j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(0.827671639586-0.294998672046j)*x[0]**o + ((0.874487106674+0.402223521219j))*x[0] + ((-0.600106632414+0.103730009676j))*x[1]**o + ((0.505431354928+0.305951616596j))*x[1]
+        ref[(0, 3, 2, 1)]=(0.827671639586-0.294998672046j)*x_ref[0]**o + ((0.874487106674+0.402223521219j))*x_ref[0] + ((-0.600106632414+0.103730009676j))*x_ref[1]**o + ((0.505431354928+0.305951616596j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.177896526017+0.16285152594j)*x[0]**o + ((-0.663505957967+0.570137148108j))*x[0] + ((-0.268243798839-0.565315504914j))*x[1]**o + ((0.58961168828+0.817017188219j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.177896526017+0.16285152594j)*x_ref[0]**o + ((-0.663505957967+0.570137148108j))*x_ref[0] + ((-0.268243798839-0.565315504914j))*x_ref[1]**o + ((0.58961168828+0.817017188219j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.415366255782+0.0667089421275j)*x[0]**o + ((-0.261458877541-0.293822471862j))*x[0] + ((0.26412995968-0.773189977679j))*x[1]**o + ((-0.62786184962+0.589922630255j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.415366255782+0.0667089421275j)*x_ref[0]**o + ((-0.261458877541-0.293822471862j))*x_ref[0] + ((0.26412995968-0.773189977679j))*x_ref[1]**o + ((-0.62786184962+0.589922630255j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.12798324223+0.967400652606j)*x[0]**o + ((0.375343854274-0.405587974137j))*x[0] + ((-0.9098731405-0.415868023022j))*x[1]**o + ((0.891781823757+0.974469142462j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.12798324223+0.967400652606j)*x_ref[0]**o + ((0.375343854274-0.405587974137j))*x_ref[0] + ((-0.9098731405-0.415868023022j))*x_ref[1]**o + ((0.891781823757+0.974469142462j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.156198468907-0.808357007541j)*x[0]**o + ((-0.010831487083+0.478874741939j))*x[0] + ((-0.404505285535+0.602810852557j))*x[1]**o + ((0.755803544604+0.144152349297j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.156198468907-0.808357007541j)*x_ref[0]**o + ((-0.010831487083+0.478874741939j))*x_ref[0] + ((-0.404505285535+0.602810852557j))*x_ref[1]**o + ((0.755803544604+0.144152349297j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.344438492318-0.236580930719j)*x[0]**o + ((0.13648812873+0.480053916466j))*x[0] + ((-0.775470232774+0.42370298035j))*x[1]**o + ((0.570859570391-0.726038509775j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.344438492318-0.236580930719j)*x_ref[0]**o + ((0.13648812873+0.480053916466j))*x_ref[0] + ((-0.775470232774+0.42370298035j))*x_ref[1]**o + ((0.570859570391-0.726038509775j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.711938531089+0.475326484824j)*x[0]**o + ((-0.357574807713-0.908775017651j))*x[0] + ((0.195194392844-0.314065988029j))*x[1]**o + ((-0.060000743426+0.167833419569j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.711938531089+0.475326484824j)*x_ref[0]**o + ((-0.357574807713-0.908775017651j))*x_ref[0] + ((0.195194392844-0.314065988029j))*x_ref[1]**o + ((-0.060000743426+0.167833419569j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.910157230534+0.957709309634j)*x[0]**o + ((-0.327333996437+0.829700946848j))*x[0] + ((0.27921531971+0.142126339055j))*x[1]**o + ((-0.840535281348-0.85347586027j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.910157230534+0.957709309634j)*x_ref[0]**o + ((-0.327333996437+0.829700946848j))*x_ref[0] + ((0.27921531971+0.142126339055j))*x_ref[1]**o + ((-0.840535281348-0.85347586027j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.893507469453+0.0906644823733j)*x[0]**o + ((0.396900839459-0.189626930037j))*x[0] + ((0.785486088832+0.03363941272j))*x[1]**o + ((0.164516569302+0.331623315546j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.893507469453+0.0906644823733j)*x_ref[0]**o + ((0.396900839459-0.189626930037j))*x_ref[0] + ((0.785486088832+0.03363941272j))*x_ref[1]**o + ((0.164516569302+0.331623315546j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.0434115918077+0.615194493384j)*x[0]**o + ((-0.872181387866+0.346669561233j))*x[0] + ((0.272727551462+0.497693459749j))*x[1]**o + ((0.780358075227-0.531172247849j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.0434115918077+0.615194493384j)*x_ref[0]**o + ((-0.872181387866+0.346669561233j))*x_ref[0] + ((0.272727551462+0.497693459749j))*x_ref[1]**o + ((0.780358075227-0.531172247849j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.730215436415-0.0794540530848j)*x[0]**o + ((0.562702489484+0.564914311994j))*x[0] + ((-0.210413158328-0.323277363825j))*x[1]**o + ((-0.801153936061+0.611827316473j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.730215436415-0.0794540530848j)*x_ref[0]**o + ((0.562702489484+0.564914311994j))*x_ref[0] + ((-0.210413158328-0.323277363825j))*x_ref[1]**o + ((-0.801153936061+0.611827316473j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.442431106933+0.411294400425j)*x[0]**o + ((-0.299682025837+0.774040755914j))*x[0] + ((0.736827838282+0.44507018968j))*x[1]**o + ((0.762781101515+0.748069060946j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.442431106933+0.411294400425j)*x_ref[0]**o + ((-0.299682025837+0.774040755914j))*x_ref[0] + ((0.736827838282+0.44507018968j))*x_ref[1]**o + ((0.762781101515+0.748069060946j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.472836135658-0.345292395992j)*x[0]**o + ((0.515134179149+0.305236552218j))*x[0] + ((-0.54001213165+0.193334260661j))*x[1]**o + ((-0.594487674071-0.665941651862j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.472836135658-0.345292395992j)*x_ref[0]**o + ((0.515134179149+0.305236552218j))*x_ref[0] + ((-0.54001213165+0.193334260661j))*x_ref[1]**o + ((-0.594487674071-0.665941651862j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.806015194479-0.792265488986j)*x[0]**o + ((0.840343300942+0.466966194932j))*x[0] + ((0.739771706831-0.416097231993j))*x[1]**o + ((-0.867372593695-0.934279191936j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.806015194479-0.792265488986j)*x_ref[0]**o + ((0.840343300942+0.466966194932j))*x_ref[0] + ((0.739771706831-0.416097231993j))*x_ref[1]**o + ((-0.867372593695-0.934279191936j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.733234085605-0.31656061952j)*x[0]**o + ((-0.385463404775-0.695884579299j))*x[0] + ((-0.5771343714-0.0732122163233j))*x[1]**o + ((0.72370890036+0.539382667983j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.733234085605-0.31656061952j)*x_ref[0]**o + ((-0.385463404775-0.695884579299j))*x_ref[0] + ((-0.5771343714-0.0732122163233j))*x_ref[1]**o + ((0.72370890036+0.539382667983j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.328498086109-0.261638220916j)*x[0]**o + ((-0.196209798868+0.922015422761j))*x[0] + ((0.696767467335-0.0521728767706j))*x[1]**o + ((0.123050164122+0.564888731403j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.328498086109-0.261638220916j)*x_ref[0]**o + ((-0.196209798868+0.922015422761j))*x_ref[0] + ((0.696767467335-0.0521728767706j))*x_ref[1]**o + ((0.123050164122+0.564888731403j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.777589091963-0.730853491179j)*x[0]**o + ((0.946232661503+0.0568039920123j))*x[0] + ((0.562840730921-0.769685219174j))*x[1]**o + ((-0.764603347229+0.814737917885j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.777589091963-0.730853491179j)*x_ref[0]**o + ((0.946232661503+0.0568039920123j))*x_ref[0] + ((0.562840730921-0.769685219174j))*x_ref[1]**o + ((-0.764603347229+0.814737917885j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.707311188492-0.690650027815j)*x[0]**o + ((-0.637169093645+0.00297643995807j))*x[0] + ((0.0454729615656+0.254196762837j))*x[1]**o + ((0.347457760515+0.931266500431j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.707311188492-0.690650027815j)*x_ref[0]**o + ((-0.637169093645+0.00297643995807j))*x_ref[0] + ((0.0454729615656+0.254196762837j))*x_ref[1]**o + ((0.347457760515+0.931266500431j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.388365011382+0.250198405217j)*x[0]**o + ((-0.57961413687-0.815915238169j))*x[0] + ((-0.509858225751-0.357970695601j))*x[1]**o + ((-0.575470945077+0.813393753002j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.388365011382+0.250198405217j)*x_ref[0]**o + ((-0.57961413687-0.815915238169j))*x_ref[0] + ((-0.509858225751-0.357970695601j))*x_ref[1]**o + ((-0.575470945077+0.813393753002j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.624410447556-0.602633308928j)*x[0]**o + ((0.669170287454+0.979056248602j))*x[0] + ((0.940211882329+0.21976648088j))*x[1]**o + ((0.985413318299-0.115276717802j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.624410447556-0.602633308928j)*x_ref[0]**o + ((0.669170287454+0.979056248602j))*x_ref[0] + ((0.940211882329+0.21976648088j))*x_ref[1]**o + ((0.985413318299-0.115276717802j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.532924868626+0.541295053249j)*x[0]**o + ((-0.0760822219208+0.88696772708j))*x[0] + ((-0.827857465315-0.160576837571j))*x[1]**o + ((-0.249203954802+0.218196956549j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.532924868626+0.541295053249j)*x_ref[0]**o + ((-0.0760822219208+0.88696772708j))*x_ref[0] + ((-0.827857465315-0.160576837571j))*x_ref[1]**o + ((-0.249203954802+0.218196956549j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.0315959928789-0.849865587208j)*x[0]**o + ((-0.258375266734+0.304093554927j))*x[0] + ((0.483191751953+0.97598108832j))*x[1]**o + ((0.692184671402-0.17265607021j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.0315959928789-0.849865587208j)*x_ref[0]**o + ((-0.258375266734+0.304093554927j))*x_ref[0] + ((0.483191751953+0.97598108832j))*x_ref[1]**o + ((0.692184671402-0.17265607021j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.555685165253+0.794770153525j)*x[0]**o + ((0.260902401217+0.742823099318j))*x[0] + ((0.579838559324-0.0773654366123j))*x[1]**o + ((0.274503852097+0.773949729754j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.555685165253+0.794770153525j)*x_ref[0]**o + ((0.260902401217+0.742823099318j))*x_ref[0] + ((0.579838559324-0.0773654366123j))*x_ref[1]**o + ((0.274503852097+0.773949729754j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(0.801258102323-0.601326199183j)*x[0]**o + ((0.227721441833-0.976695138858j))*x[0] + ((0.50519878772+0.184601677617j))*x[1]**o + ((0.382886431349+0.00299905525254j))*x[1]
+        ref[(1, 3, 2, 0)]=(0.801258102323-0.601326199183j)*x_ref[0]**o + ((0.227721441833-0.976695138858j))*x_ref[0] + ((0.50519878772+0.184601677617j))*x_ref[1]**o + ((0.382886431349+0.00299905525254j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(0.854576288572-0.239721755878j)*x[0]**o + ((-0.899663130071+0.206294149985j))*x[0] + ((-0.93972019538-0.399317320065j))*x[1]**o + ((-0.273338856687-0.811894684019j))*x[1]
+        ref[(1, 3, 2, 1)]=(0.854576288572-0.239721755878j)*x_ref[0]**o + ((-0.899663130071+0.206294149985j))*x_ref[0] + ((-0.93972019538-0.399317320065j))*x_ref[1]**o + ((-0.273338856687-0.811894684019j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.451638681993-0.0223795464056j)*x[2]**o + ((-0.89311727934-0.777862850457j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.451638681993-0.0223795464056j)*x_ref[2]**o + ((-0.89311727934-0.777862850457j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.457140180831-0.261637063605j)*x[2]**o + ((-0.977997015851+0.195425385407j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.457140180831-0.261637063605j)*x_ref[2]**o + ((-0.977997015851+0.195425385407j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.382450181833+0.126123661476j)*x[2]**o + ((0.521622239162-0.627606558058j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.382450181833+0.126123661476j)*x_ref[2]**o + ((0.521622239162-0.627606558058j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.242877523592-0.0917763984262j)*x[2]**o + ((-0.83206657695-0.530419316093j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.242877523592-0.0917763984262j)*x_ref[2]**o + ((-0.83206657695-0.530419316093j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.951425910532-0.534690953826j)*x[2]**o + ((-0.561314408776-0.689322789728j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.951425910532-0.534690953826j)*x_ref[2]**o + ((-0.561314408776-0.689322789728j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.516652776689-0.509261753763j)*x[2]**o + ((-0.347791197761-0.835698949775j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.516652776689-0.509261753763j)*x_ref[2]**o + ((-0.347791197761-0.835698949775j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.250420328449+0.26749481178j)*x[2]**o + ((-0.688606149132-0.684670946281j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.250420328449+0.26749481178j)*x_ref[2]**o + ((-0.688606149132-0.684670946281j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.280946251796+0.399185573056j)*x[2]**o + ((-0.51209857185+0.185784881742j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.280946251796+0.399185573056j)*x_ref[2]**o + ((-0.51209857185+0.185784881742j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.927112010646+0.97740881354j)*x[2]**o + ((-0.51753093474+0.294894270844j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.927112010646+0.97740881354j)*x_ref[2]**o + ((-0.51753093474+0.294894270844j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.0377393694036+0.94117526284j)*x[2]**o + ((-0.995179743149+0.506243511361j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.0377393694036+0.94117526284j)*x_ref[2]**o + ((-0.995179743149+0.506243511361j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.765234397005+0.00938285704084j)*x[2]**o + ((0.104682827896-0.616954962914j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.765234397005+0.00938285704084j)*x_ref[2]**o + ((0.104682827896-0.616954962914j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.525622022373-0.0248479564643j)*x[2]**o + ((0.73278542092+0.837412705974j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.525622022373-0.0248479564643j)*x_ref[2]**o + ((0.73278542092+0.837412705974j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.762528277992-0.80944631096j)*x[2]**o + ((-0.661275209861-0.247366346504j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.762528277992-0.80944631096j)*x_ref[2]**o + ((-0.661275209861-0.247366346504j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.591409504186+0.310973602356j)*x[2]**o + ((0.798046870411+0.534748717412j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.591409504186+0.310973602356j)*x_ref[2]**o + ((0.798046870411+0.534748717412j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.340418531548+0.599634151932j)*x[2]**o + ((-0.210108964792-0.406197879741j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.340418531548+0.599634151932j)*x_ref[2]**o + ((-0.210108964792-0.406197879741j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.609993619833-0.668444216222j)*x[2]**o + ((0.0911050167271-0.998460727087j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.609993619833-0.668444216222j)*x_ref[2]**o + ((0.0911050167271-0.998460727087j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.166078749885+0.156277074163j)*x[2]**o + ((-0.360091690205-0.429826938476j))*x[2]
+            ref[(0, 2, 2, 0)]+=(0.166078749885+0.156277074163j)*x_ref[2]**o + ((-0.360091690205-0.429826938476j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.809899217804+0.98238302372j)*x[2]**o + ((-0.166590586059-0.700894366393j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.809899217804+0.98238302372j)*x_ref[2]**o + ((-0.166590586059-0.700894366393j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.450627673748+0.471721292864j)*x[2]**o + ((0.334576638228+0.0130904599171j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.450627673748+0.471721292864j)*x_ref[2]**o + ((0.334576638228+0.0130904599171j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.272760947945-0.448854148658j)*x[2]**o + ((0.0736353176036+0.244325735025j))*x[2]
+            ref[(0, 3, 0, 1)]+=(0.272760947945-0.448854148658j)*x_ref[2]**o + ((0.0736353176036+0.244325735025j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.0452699323397-0.200049582771j)*x[2]**o + ((-0.0224919789922+0.385924323907j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.0452699323397-0.200049582771j)*x_ref[2]**o + ((-0.0224919789922+0.385924323907j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.862811539973-0.984915171895j)*x[2]**o + ((0.493630029738-0.887272425206j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.862811539973-0.984915171895j)*x_ref[2]**o + ((0.493630029738-0.887272425206j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(-0.726417147786+0.118693931067j)*x[2]**o + ((-0.785914389641+0.763012352518j))*x[2]
+            ref[(0, 3, 2, 0)]+=(-0.726417147786+0.118693931067j)*x_ref[2]**o + ((-0.785914389641+0.763012352518j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(0.832451643472+0.970732147639j)*x[2]**o + ((-0.635050118262+0.33790252316j))*x[2]
+            ref[(0, 3, 2, 1)]+=(0.832451643472+0.970732147639j)*x_ref[2]**o + ((-0.635050118262+0.33790252316j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.737202518583-0.666103513481j)*x[2]**o + ((-0.722040886211+0.0313152420588j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.737202518583-0.666103513481j)*x_ref[2]**o + ((-0.722040886211+0.0313152420588j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.139193618912+0.490961593492j)*x[2]**o + ((-0.850166002331+0.496334755985j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.139193618912+0.490961593492j)*x_ref[2]**o + ((-0.850166002331+0.496334755985j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.344463514862-0.278943896236j)*x[2]**o + ((0.408762219624+0.8352182738j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.344463514862-0.278943896236j)*x_ref[2]**o + ((0.408762219624+0.8352182738j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.176382710715-0.897369540654j)*x[2]**o + ((-0.312056277885-0.950366238809j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.176382710715-0.897369540654j)*x_ref[2]**o + ((-0.312056277885-0.950366238809j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.529930494801-0.1372205418j)*x[2]**o + ((-0.395734868267+0.527117022694j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.529930494801-0.1372205418j)*x_ref[2]**o + ((-0.395734868267+0.527117022694j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.0162540473575-0.0125216060196j)*x[2]**o + ((-0.29409666504+0.429460074031j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.0162540473575-0.0125216060196j)*x_ref[2]**o + ((-0.29409666504+0.429460074031j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.3357001142-0.617404909703j)*x[2]**o + ((0.834879691034-0.232191837732j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.3357001142-0.617404909703j)*x_ref[2]**o + ((0.834879691034-0.232191837732j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.128626849803+0.84670765251j)*x[2]**o + ((-0.573590962962-0.614729956425j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.128626849803+0.84670765251j)*x_ref[2]**o + ((-0.573590962962-0.614729956425j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.677425223634+0.0574851238555j)*x[2]**o + ((-0.408360911722+0.534343603017j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.677425223634+0.0574851238555j)*x_ref[2]**o + ((-0.408360911722+0.534343603017j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.400913930667-0.822977479842j)*x[2]**o + ((0.875782366419-0.830042886985j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.400913930667-0.822977479842j)*x_ref[2]**o + ((0.875782366419-0.830042886985j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.170948850062+0.617603565317j)*x[2]**o + ((-0.150912463527+0.584888524509j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.170948850062+0.617603565317j)*x_ref[2]**o + ((-0.150912463527+0.584888524509j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.435216082044-0.357019236051j)*x[2]**o + ((0.637352980043-0.57848222817j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.435216082044-0.357019236051j)*x_ref[2]**o + ((0.637352980043-0.57848222817j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.727671346631-0.75494231493j)*x[2]**o + ((0.725781437667-0.605665195956j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.727671346631-0.75494231493j)*x_ref[2]**o + ((0.725781437667-0.605665195956j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.695443525664+0.201481435808j)*x[2]**o + ((-0.0171553934495+0.214293149689j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.695443525664+0.201481435808j)*x_ref[2]**o + ((-0.0171553934495+0.214293149689j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.439194662066-0.504549405744j)*x[2]**o + ((-0.988628254212+0.166935943019j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.439194662066-0.504549405744j)*x_ref[2]**o + ((-0.988628254212+0.166935943019j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.477095053157+0.679947266334j)*x[2]**o + ((-0.0822070320794+0.60580419546j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.477095053157+0.679947266334j)*x_ref[2]**o + ((-0.0822070320794+0.60580419546j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.950761502829+0.3239829221j)*x[2]**o + ((0.0405136574224-0.95879912487j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.950761502829+0.3239829221j)*x_ref[2]**o + ((0.0405136574224-0.95879912487j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.720309464442+0.301126354656j)*x[2]**o + ((-0.744425691555-0.689439312254j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.720309464442+0.301126354656j)*x_ref[2]**o + ((-0.744425691555-0.689439312254j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.546398741359+0.265110563831j)*x[2]**o + ((-0.779474102935-0.721413238977j))*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.546398741359+0.265110563831j)*x_ref[2]**o + ((-0.779474102935-0.721413238977j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.152573985423-0.417447972902j)*x[2]**o + ((0.855946228028-0.531542724213j))*x[2]
+            ref[(1, 3, 0, 1)]+=(0.152573985423-0.417447972902j)*x_ref[2]**o + ((0.855946228028-0.531542724213j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.24254262696-0.343092571681j)*x[2]**o + ((0.729273632949+0.630309749393j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.24254262696-0.343092571681j)*x_ref[2]**o + ((0.729273632949+0.630309749393j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.347217430949+0.336619581496j)*x[2]**o + ((0.226956604918+0.692291194063j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.347217430949+0.336619581496j)*x_ref[2]**o + ((0.226956604918+0.692291194063j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(-0.648097774431+0.00699509247675j)*x[2]**o + ((-0.797685627071-0.844702923154j))*x[2]
+            ref[(1, 3, 2, 0)]+=(-0.648097774431+0.00699509247675j)*x_ref[2]**o + ((-0.797685627071-0.844702923154j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.42943659607+0.579955607591j)*x[2]**o + ((0.0665099138078+0.534723699396j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.42943659607+0.579955607591j)*x_ref[2]**o + ((0.0665099138078+0.534723699396j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.481567518754-0.666348860481j)*x[0]**o + ((-0.486112158242-0.826087577058j))*x[0] + ((0.518885182537-0.0956098640677j))*x[1]**o + ((0.817509093632-0.053631067811j))*x[1]
+        ref=(0.481567518754-0.666348860481j)*x_ref[0]**o + ((-0.486112158242-0.826087577058j))*x_ref[0] + ((0.518885182537-0.0956098640677j))*x_ref[1]**o + ((0.817509093632-0.053631067811j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.199274562612-0.262821806409j))*x[2]**o + ((-0.47740168199+0.115905418197j))*x[2]
+            ref+=((-0.199274562612-0.262821806409j))*x_ref[2]**o + ((-0.47740168199+0.115905418197j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.217814587118+0.45151286531j)*x[0]**o + ((-0.075544217573+0.188385628414j))*x[0] + ((0.576685948498-0.687197503967j))*x[1]**o + ((-0.920598494307+0.527648704069j))*x[1]
+        ref[(0,)]=(0.217814587118+0.45151286531j)*x_ref[0]**o + ((-0.075544217573+0.188385628414j))*x_ref[0] + ((0.576685948498-0.687197503967j))*x_ref[1]**o + ((-0.920598494307+0.527648704069j))*x_ref[1]
+        arg[(1,)]=(-0.992932320755-0.879573127242j)*x[0]**o + ((-0.693851171229-0.919587191954j))*x[0] + ((0.337226164151-0.214857936459j))*x[1]**o + ((-0.721727295489-0.298977798185j))*x[1]
+        ref[(1,)]=(-0.992932320755-0.879573127242j)*x_ref[0]**o + ((-0.693851171229-0.919587191954j))*x_ref[0] + ((0.337226164151-0.214857936459j))*x_ref[1]**o + ((-0.721727295489-0.298977798185j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.933315060836+0.912151032971j)*x[2]**o + ((0.287097121473-0.804518252342j))*x[2]
+            ref[(0,)]+=(-0.933315060836+0.912151032971j)*x_ref[2]**o + ((0.287097121473-0.804518252342j))*x_ref[2]
+            arg[(1,)]+=(0.059165865926+0.174892346267j)*x[2]**o + ((0.560802083537-0.0523244511601j))*x[2]
+            ref[(1,)]+=(0.059165865926+0.174892346267j)*x_ref[2]**o + ((0.560802083537-0.0523244511601j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(0.480076347512+0.103049683245j)*x[0]**o + ((0.192631671522+0.628213789888j))*x[0] + ((-0.108543882832-0.0280209277122j))*x[1]**o + ((-0.643864564326-0.942976269986j))*x[1]
+        ref[(0, 0)]=(0.480076347512+0.103049683245j)*x_ref[0]**o + ((0.192631671522+0.628213789888j))*x_ref[0] + ((-0.108543882832-0.0280209277122j))*x_ref[1]**o + ((-0.643864564326-0.942976269986j))*x_ref[1]
+        arg[(0, 1)]=(-0.220819537763-0.651555458812j)*x[0]**o + ((0.488010592629+0.0706154929941j))*x[0] + ((0.494348837495+0.941747477146j))*x[1]**o + ((-0.409552222855-0.186091133083j))*x[1]
+        ref[(0, 1)]=(-0.220819537763-0.651555458812j)*x_ref[0]**o + ((0.488010592629+0.0706154929941j))*x_ref[0] + ((0.494348837495+0.941747477146j))*x_ref[1]**o + ((-0.409552222855-0.186091133083j))*x_ref[1]
+        arg[(1, 0)]=(-0.213029268899-0.992172931852j)*x[0]**o + ((0.0478656692343+0.355827440687j))*x[0] + ((-0.951368916814+0.698284819082j))*x[1]**o + ((0.761151814634+0.548225564967j))*x[1]
+        ref[(1, 0)]=(-0.213029268899-0.992172931852j)*x_ref[0]**o + ((0.0478656692343+0.355827440687j))*x_ref[0] + ((-0.951368916814+0.698284819082j))*x_ref[1]**o + ((0.761151814634+0.548225564967j))*x_ref[1]
+        arg[(1, 1)]=(0.497587035096+0.943758407348j)*x[0]**o + ((-0.677285117096-0.845580308793j))*x[0] + ((-0.410923474223-0.520680784509j))*x[1]**o + ((-0.397808377098-0.687417248331j))*x[1]
+        ref[(1, 1)]=(0.497587035096+0.943758407348j)*x_ref[0]**o + ((-0.677285117096-0.845580308793j))*x_ref[0] + ((-0.410923474223-0.520680784509j))*x_ref[1]**o + ((-0.397808377098-0.687417248331j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.537405632616-0.464509940732j)*x[2]**o + ((0.995155229979+0.139845831561j))*x[2]
+            ref[(0, 0)]+=(-0.537405632616-0.464509940732j)*x_ref[2]**o + ((0.995155229979+0.139845831561j))*x_ref[2]
+            arg[(0, 1)]+=(0.517439423599-0.237928811494j)*x[2]**o + ((-0.361090962135+0.00990157167598j))*x[2]
+            ref[(0, 1)]+=(0.517439423599-0.237928811494j)*x_ref[2]**o + ((-0.361090962135+0.00990157167598j))*x_ref[2]
+            arg[(1, 0)]+=(-0.547692099488-0.607910541123j)*x[2]**o + ((0.935648176424+0.328123141637j))*x[2]
+            ref[(1, 0)]+=(-0.547692099488-0.607910541123j)*x_ref[2]**o + ((0.935648176424+0.328123141637j))*x_ref[2]
+            arg[(1, 1)]+=(0.380187009517-0.693898777917j)*x[2]**o + ((0.716430885645-0.662582287881j))*x[2]
+            ref[(1, 1)]+=(0.380187009517-0.693898777917j)*x_ref[2]**o + ((0.716430885645-0.662582287881j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2),w_ref)
+        arg[(0, 0, 0)]=(0.496528750963-0.687127481781j)*x[0]**o + ((0.943224231232-0.847895462981j))*x[0] + ((-0.552732806691-0.537752485613j))*x[1]**o + ((-0.359130136814+0.00271800260808j))*x[1]
+        ref[(0, 0, 0)]=(0.496528750963-0.687127481781j)*x_ref[0]**o + ((0.943224231232-0.847895462981j))*x_ref[0] + ((-0.552732806691-0.537752485613j))*x_ref[1]**o + ((-0.359130136814+0.00271800260808j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.961656561274+0.463001689256j)*x[0]**o + ((0.460353824457-0.910938015902j))*x[0] + ((-0.487889957083-0.811303502146j))*x[1]**o + ((0.030894073547-0.72801323377j))*x[1]
+        ref[(0, 0, 1)]=(-0.961656561274+0.463001689256j)*x_ref[0]**o + ((0.460353824457-0.910938015902j))*x_ref[0] + ((-0.487889957083-0.811303502146j))*x_ref[1]**o + ((0.030894073547-0.72801323377j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.340489933066+0.477708094626j)*x[0]**o + ((0.352872767213+0.300501775545j))*x[0] + ((-0.155888497807+0.00598631000325j))*x[1]**o + ((-0.385372299455+0.581744506419j))*x[1]
+        ref[(0, 1, 0)]=(0.340489933066+0.477708094626j)*x_ref[0]**o + ((0.352872767213+0.300501775545j))*x_ref[0] + ((-0.155888497807+0.00598631000325j))*x_ref[1]**o + ((-0.385372299455+0.581744506419j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.28993130269+0.036857739371j)*x[0]**o + ((-0.273146789226-0.161499117997j))*x[0] + ((0.689016831346+0.729087601647j))*x[1]**o + ((-0.195453495241-0.746750998849j))*x[1]
+        ref[(0, 1, 1)]=(-0.28993130269+0.036857739371j)*x_ref[0]**o + ((-0.273146789226-0.161499117997j))*x_ref[0] + ((0.689016831346+0.729087601647j))*x_ref[1]**o + ((-0.195453495241-0.746750998849j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.712558229506-0.825906097798j)*x[0]**o + ((-0.302978835663+0.245365084883j))*x[0] + ((-0.678448386146+0.441082456775j))*x[1]**o + ((-0.434175734882+0.0186846104569j))*x[1]
+        ref[(1, 0, 0)]=(-0.712558229506-0.825906097798j)*x_ref[0]**o + ((-0.302978835663+0.245365084883j))*x_ref[0] + ((-0.678448386146+0.441082456775j))*x_ref[1]**o + ((-0.434175734882+0.0186846104569j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.172289415656-0.13575383443j)*x[0]**o + ((0.737653725525-0.722840995865j))*x[0] + ((-0.405241630525-0.398576787498j))*x[1]**o + ((0.135967194497-0.42468474682j))*x[1]
+        ref[(1, 0, 1)]=(-0.172289415656-0.13575383443j)*x_ref[0]**o + ((0.737653725525-0.722840995865j))*x_ref[0] + ((-0.405241630525-0.398576787498j))*x_ref[1]**o + ((0.135967194497-0.42468474682j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.017856432854+0.788777912429j)*x[0]**o + ((-0.728836294302-0.894896302638j))*x[0] + ((0.24330796518-0.582132153151j))*x[1]**o + ((-0.140351457403-0.412435854694j))*x[1]
+        ref[(1, 1, 0)]=(-0.017856432854+0.788777912429j)*x_ref[0]**o + ((-0.728836294302-0.894896302638j))*x_ref[0] + ((0.24330796518-0.582132153151j))*x_ref[1]**o + ((-0.140351457403-0.412435854694j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.303608483866-0.701727833873j)*x[0]**o + ((0.451232200232-0.975137739963j))*x[0] + ((-0.726282824206+0.587401503279j))*x[1]**o + ((0.584120202887+0.994629169422j))*x[1]
+        ref[(1, 1, 1)]=(0.303608483866-0.701727833873j)*x_ref[0]**o + ((0.451232200232-0.975137739963j))*x_ref[0] + ((-0.726282824206+0.587401503279j))*x_ref[1]**o + ((0.584120202887+0.994629169422j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.462652677613-0.961382691204j)*x[2]**o + ((0.223127498969-0.612851641937j))*x[2]
+            ref[(0, 0, 0)]+=(-0.462652677613-0.961382691204j)*x_ref[2]**o + ((0.223127498969-0.612851641937j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.874788259794+0.436350625354j)*x[2]**o + ((0.526545895523-0.938199072239j))*x[2]
+            ref[(0, 0, 1)]+=(-0.874788259794+0.436350625354j)*x_ref[2]**o + ((0.526545895523-0.938199072239j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.317546248478+0.775738186549j)*x[2]**o + ((-0.993432370522-0.191765307522j))*x[2]
+            ref[(0, 1, 0)]+=(0.317546248478+0.775738186549j)*x_ref[2]**o + ((-0.993432370522-0.191765307522j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.549223241917+0.697021849104j)*x[2]**o + ((-0.0459201820855+0.289227051462j))*x[2]
+            ref[(0, 1, 1)]+=(-0.549223241917+0.697021849104j)*x_ref[2]**o + ((-0.0459201820855+0.289227051462j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.296453429594-0.771031301212j)*x[2]**o + ((0.678516311454-0.674552525985j))*x[2]
+            ref[(1, 0, 0)]+=(-0.296453429594-0.771031301212j)*x_ref[2]**o + ((0.678516311454-0.674552525985j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.570282092139+0.0590335523947j)*x[2]**o + ((-0.876736068107-0.511317582346j))*x[2]
+            ref[(1, 0, 1)]+=(0.570282092139+0.0590335523947j)*x_ref[2]**o + ((-0.876736068107-0.511317582346j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.00249675692396-0.404748647928j)*x[2]**o + ((-0.12851502305+0.0870264143735j))*x[2]
+            ref[(1, 1, 0)]+=(-0.00249675692396-0.404748647928j)*x_ref[2]**o + ((-0.12851502305+0.0870264143735j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.268724927703+0.711890427808j)*x[2]**o + ((0.142853265745+0.719124506672j))*x[2]
+            ref[(1, 1, 1)]+=(-0.268724927703+0.711890427808j)*x_ref[2]**o + ((0.142853265745+0.719124506672j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3, 2),w)
+        ref = Data(0,(3, 3, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.782653866315+0.802461541325j)*x[0]**o + ((-0.565434741665+0.0679541975213j))*x[0] + ((0.855088077574-0.47100592463j))*x[1]**o + ((0.0569908290042-0.192795521487j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.782653866315+0.802461541325j)*x_ref[0]**o + ((-0.565434741665+0.0679541975213j))*x_ref[0] + ((0.855088077574-0.47100592463j))*x_ref[1]**o + ((0.0569908290042-0.192795521487j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.87953166534-0.507495443642j)*x[0]**o + ((-0.735361978397+0.165885309916j))*x[0] + ((-0.558837198454-0.343555638331j))*x[1]**o + ((0.970136568855-0.48166867918j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.87953166534-0.507495443642j)*x_ref[0]**o + ((-0.735361978397+0.165885309916j))*x_ref[0] + ((-0.558837198454-0.343555638331j))*x_ref[1]**o + ((0.970136568855-0.48166867918j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.301568023329-0.175516597417j)*x[0]**o + ((0.554657176105+0.9617102119j))*x[0] + ((-0.0734155082242-0.399286078985j))*x[1]**o + ((0.300115187192-0.300675250869j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.301568023329-0.175516597417j)*x_ref[0]**o + ((0.554657176105+0.9617102119j))*x_ref[0] + ((-0.0734155082242-0.399286078985j))*x_ref[1]**o + ((0.300115187192-0.300675250869j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.124111395325+0.829267225131j)*x[0]**o + ((-0.981925931658+0.00965434647981j))*x[0] + ((0.207859353604-0.657874932827j))*x[1]**o + ((0.738868651421+0.400019779818j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.124111395325+0.829267225131j)*x_ref[0]**o + ((-0.981925931658+0.00965434647981j))*x_ref[0] + ((0.207859353604-0.657874932827j))*x_ref[1]**o + ((0.738868651421+0.400019779818j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.769940158363-0.086790343484j)*x[0]**o + ((-0.301942187893+0.0659652273942j))*x[0] + ((-0.179566968449+0.828971057251j))*x[1]**o + ((0.673514699108-0.11675419586j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.769940158363-0.086790343484j)*x_ref[0]**o + ((-0.301942187893+0.0659652273942j))*x_ref[0] + ((-0.179566968449+0.828971057251j))*x_ref[1]**o + ((0.673514699108-0.11675419586j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.957831947724-0.614452284509j)*x[0]**o + ((-0.327892506852+0.609953360077j))*x[0] + ((0.771909948645-0.261229062119j))*x[1]**o + ((0.281339528067-0.147820126179j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.957831947724-0.614452284509j)*x_ref[0]**o + ((-0.327892506852+0.609953360077j))*x_ref[0] + ((0.771909948645-0.261229062119j))*x_ref[1]**o + ((0.281339528067-0.147820126179j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.544700218916+0.866070511404j)*x[0]**o + ((0.326333348856+0.343579522069j))*x[0] + ((0.167914696095+0.319268426503j))*x[1]**o + ((0.466979933272+0.900287374969j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.544700218916+0.866070511404j)*x_ref[0]**o + ((0.326333348856+0.343579522069j))*x_ref[0] + ((0.167914696095+0.319268426503j))*x_ref[1]**o + ((0.466979933272+0.900287374969j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.866039701621+0.554309146513j)*x[0]**o + ((0.32025934525+0.0308433132112j))*x[0] + ((0.835777701653+0.176074410514j))*x[1]**o + ((-0.983604081013+0.685895029288j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.866039701621+0.554309146513j)*x_ref[0]**o + ((0.32025934525+0.0308433132112j))*x_ref[0] + ((0.835777701653+0.176074410514j))*x_ref[1]**o + ((-0.983604081013+0.685895029288j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.535938702081+0.505606460579j)*x[0]**o + ((0.701017734897-0.233789627274j))*x[0] + ((0.760540220489+0.865658430614j))*x[1]**o + ((-0.374210327307+0.854926354524j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.535938702081+0.505606460579j)*x_ref[0]**o + ((0.701017734897-0.233789627274j))*x_ref[0] + ((0.760540220489+0.865658430614j))*x_ref[1]**o + ((-0.374210327307+0.854926354524j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.728945435717+0.0561180221486j)*x[0]**o + ((0.325324501145+0.225677729111j))*x[0] + ((-0.967021400028-0.117848998309j))*x[1]**o + ((-0.316432899976-0.553454403429j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.728945435717+0.0561180221486j)*x_ref[0]**o + ((0.325324501145+0.225677729111j))*x_ref[0] + ((-0.967021400028-0.117848998309j))*x_ref[1]**o + ((-0.316432899976-0.553454403429j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.5282570939-0.579372413845j)*x[0]**o + ((0.978761181003+0.804692905944j))*x[0] + ((-0.42916447231-0.402676670002j))*x[1]**o + ((-0.307352924312-0.0503798259165j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.5282570939-0.579372413845j)*x_ref[0]**o + ((0.978761181003+0.804692905944j))*x_ref[0] + ((-0.42916447231-0.402676670002j))*x_ref[1]**o + ((-0.307352924312-0.0503798259165j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.288338594266+0.952561323236j)*x[0]**o + ((-0.682486105887-0.0744381732108j))*x[0] + ((0.402101876072+0.107246416209j))*x[1]**o + ((0.956828728177+0.0189737430935j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.288338594266+0.952561323236j)*x_ref[0]**o + ((-0.682486105887-0.0744381732108j))*x_ref[0] + ((0.402101876072+0.107246416209j))*x_ref[1]**o + ((0.956828728177+0.0189737430935j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.00968261502967-0.737164748834j)*x[0]**o + ((-0.438734712508-0.567259047059j))*x[0] + ((-0.208323022449+0.644036182013j))*x[1]**o + ((-0.80741416164+0.499824045048j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.00968261502967-0.737164748834j)*x_ref[0]**o + ((-0.438734712508-0.567259047059j))*x_ref[0] + ((-0.208323022449+0.644036182013j))*x_ref[1]**o + ((-0.80741416164+0.499824045048j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.780989070193-0.464857130718j)*x[0]**o + ((-0.893051520703-0.31153671019j))*x[0] + ((-0.432357314366+0.999288401944j))*x[1]**o + ((0.535656920927+0.738098195888j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.780989070193-0.464857130718j)*x_ref[0]**o + ((-0.893051520703-0.31153671019j))*x_ref[0] + ((-0.432357314366+0.999288401944j))*x_ref[1]**o + ((0.535656920927+0.738098195888j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.727387509021+0.173375001999j)*x[0]**o + ((0.105066391253+0.618863135277j))*x[0] + ((-0.403350119506-0.106810456239j))*x[1]**o + ((-0.441690573604-0.655069788805j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.727387509021+0.173375001999j)*x_ref[0]**o + ((0.105066391253+0.618863135277j))*x_ref[0] + ((-0.403350119506-0.106810456239j))*x_ref[1]**o + ((-0.441690573604-0.655069788805j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.796434385436+0.256727875379j)*x[0]**o + ((0.940522490654-0.741091913528j))*x[0] + ((0.45499663364-0.272182499042j))*x[1]**o + ((-0.232168824858-0.510268060424j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.796434385436+0.256727875379j)*x_ref[0]**o + ((0.940522490654-0.741091913528j))*x_ref[0] + ((0.45499663364-0.272182499042j))*x_ref[1]**o + ((-0.232168824858-0.510268060424j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(0.114426714208+0.692633767102j)*x[0]**o + ((-0.163339006607-0.358855168212j))*x[0] + ((-0.268583806776-0.363226808728j))*x[1]**o + ((0.703952182601-0.513517392326j))*x[1]
+        ref[(0, 2, 2, 0)]=(0.114426714208+0.692633767102j)*x_ref[0]**o + ((-0.163339006607-0.358855168212j))*x_ref[0] + ((-0.268583806776-0.363226808728j))*x_ref[1]**o + ((0.703952182601-0.513517392326j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.72461999427+0.655715336215j)*x[0]**o + ((-0.500681101826+0.842723157027j))*x[0] + ((0.556898969748-0.588660802134j))*x[1]**o + ((-0.0233938956563+0.237589382099j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.72461999427+0.655715336215j)*x_ref[0]**o + ((-0.500681101826+0.842723157027j))*x_ref[0] + ((0.556898969748-0.588660802134j))*x_ref[1]**o + ((-0.0233938956563+0.237589382099j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.336504553693-0.878691115084j)*x[0]**o + ((-0.838357236172-0.504028074723j))*x[0] + ((-0.135425183152+0.387255407799j))*x[1]**o + ((-0.850268566635+0.753777896148j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.336504553693-0.878691115084j)*x_ref[0]**o + ((-0.838357236172-0.504028074723j))*x_ref[0] + ((-0.135425183152+0.387255407799j))*x_ref[1]**o + ((-0.850268566635+0.753777896148j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.00292102525097+0.485550005076j)*x[0]**o + ((-0.892829363873-0.874691362864j))*x[0] + ((-0.208198424043+0.862804316451j))*x[1]**o + ((-0.910841790475-0.845650205439j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.00292102525097+0.485550005076j)*x_ref[0]**o + ((-0.892829363873-0.874691362864j))*x_ref[0] + ((-0.208198424043+0.862804316451j))*x_ref[1]**o + ((-0.910841790475-0.845650205439j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.0855821705136-0.547518231054j)*x[0]**o + ((0.0636577147602-0.825076992425j))*x[0] + ((-0.408801746191-0.497413089256j))*x[1]**o + ((0.392244788559-0.150607058965j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.0855821705136-0.547518231054j)*x_ref[0]**o + ((0.0636577147602-0.825076992425j))*x_ref[0] + ((-0.408801746191-0.497413089256j))*x_ref[1]**o + ((0.392244788559-0.150607058965j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.867911681239+0.962843047023j)*x[0]**o + ((-0.289536378564-0.799236945737j))*x[0] + ((-0.724452111513-0.940925842253j))*x[1]**o + ((0.204305021539-0.305878181618j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.867911681239+0.962843047023j)*x_ref[0]**o + ((-0.289536378564-0.799236945737j))*x_ref[0] + ((-0.724452111513-0.940925842253j))*x_ref[1]**o + ((0.204305021539-0.305878181618j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.0266155075822-0.547940308731j)*x[0]**o + ((0.448306274911-0.516704863217j))*x[0] + ((0.422483089807+0.569719090157j))*x[1]**o + ((-0.62684159448+0.296157437813j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.0266155075822-0.547940308731j)*x_ref[0]**o + ((0.448306274911-0.516704863217j))*x_ref[0] + ((0.422483089807+0.569719090157j))*x_ref[1]**o + ((-0.62684159448+0.296157437813j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.0762257161134+0.994414231657j)*x[0]**o + ((-0.790974466866+0.529140399519j))*x[0] + ((0.89538572186-0.58758589519j))*x[1]**o + ((0.192116928349+0.143425599644j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.0762257161134+0.994414231657j)*x_ref[0]**o + ((-0.790974466866+0.529140399519j))*x_ref[0] + ((0.89538572186-0.58758589519j))*x_ref[1]**o + ((0.192116928349+0.143425599644j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.357257594057-0.578856983926j)*x[0]**o + ((-0.873483978354+0.418068282226j))*x[0] + ((0.424031850744-0.127676773643j))*x[1]**o + ((0.304159361634+0.627139700346j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.357257594057-0.578856983926j)*x_ref[0]**o + ((-0.873483978354+0.418068282226j))*x_ref[0] + ((0.424031850744-0.127676773643j))*x_ref[1]**o + ((0.304159361634+0.627139700346j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.502770576746+0.459918855574j)*x[0]**o + ((0.830497831954-0.0106835885418j))*x[0] + ((0.553461865006-0.859246120887j))*x[1]**o + ((0.74935601954-0.723492250961j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.502770576746+0.459918855574j)*x_ref[0]**o + ((0.830497831954-0.0106835885418j))*x_ref[0] + ((0.553461865006-0.859246120887j))*x_ref[1]**o + ((0.74935601954-0.723492250961j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.430245878545-0.576048551873j)*x[0]**o + ((0.753436220466-0.462439125102j))*x[0] + ((0.200578886396-0.887855401323j))*x[1]**o + ((0.60989344782-0.42641409892j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.430245878545-0.576048551873j)*x_ref[0]**o + ((0.753436220466-0.462439125102j))*x_ref[0] + ((0.200578886396-0.887855401323j))*x_ref[1]**o + ((0.60989344782-0.42641409892j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.600771770204-0.565199116222j)*x[0]**o + ((-0.00324791804974+0.293565752031j))*x[0] + ((0.216691404732+0.367944394075j))*x[1]**o + ((0.428158112931+0.541927232838j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.600771770204-0.565199116222j)*x_ref[0]**o + ((-0.00324791804974+0.293565752031j))*x_ref[0] + ((0.216691404732+0.367944394075j))*x_ref[1]**o + ((0.428158112931+0.541927232838j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.725322738258-0.00420540187405j)*x[0]**o + ((0.617934117613+0.494938020708j))*x[0] + ((0.876929621629-0.751636877162j))*x[1]**o + ((0.620924501496-0.241648138725j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.725322738258-0.00420540187405j)*x_ref[0]**o + ((0.617934117613+0.494938020708j))*x_ref[0] + ((0.876929621629-0.751636877162j))*x_ref[1]**o + ((0.620924501496-0.241648138725j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.318448127936-0.0446648437523j)*x[0]**o + ((0.515014370847-0.533961868648j))*x[0] + ((-0.992345597302-0.651910660207j))*x[1]**o + ((0.145261524466+0.888676856554j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.318448127936-0.0446648437523j)*x_ref[0]**o + ((0.515014370847-0.533961868648j))*x_ref[0] + ((-0.992345597302-0.651910660207j))*x_ref[1]**o + ((0.145261524466+0.888676856554j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.549014375845-0.531169725821j)*x[0]**o + ((0.887815355316-0.419756917266j))*x[0] + ((0.398139659303-0.438239975839j))*x[1]**o + ((0.545071982339+0.633769951072j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.549014375845-0.531169725821j)*x_ref[0]**o + ((0.887815355316-0.419756917266j))*x_ref[0] + ((0.398139659303-0.438239975839j))*x_ref[1]**o + ((0.545071982339+0.633769951072j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.313512759004-0.905328021302j)*x[0]**o + ((-0.116360829106+0.00155808019573j))*x[0] + ((0.340342426374+0.295917535034j))*x[1]**o + ((0.313427534453-0.563028232693j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.313512759004-0.905328021302j)*x_ref[0]**o + ((-0.116360829106+0.00155808019573j))*x_ref[0] + ((0.340342426374+0.295917535034j))*x_ref[1]**o + ((0.313427534453-0.563028232693j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.397917190721-0.269968374677j)*x[0]**o + ((-0.0786517783292+0.0950860761964j))*x[0] + ((-0.0940757383756-0.201564758184j))*x[1]**o + ((-0.771367699023-0.572475581956j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.397917190721-0.269968374677j)*x_ref[0]**o + ((-0.0786517783292+0.0950860761964j))*x_ref[0] + ((-0.0940757383756-0.201564758184j))*x_ref[1]**o + ((-0.771367699023-0.572475581956j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.96536451958+0.561360862891j)*x[0]**o + ((-0.937837861123+0.394508847297j))*x[0] + ((-0.440230594075+0.834119529179j))*x[1]**o + ((-0.565493378549-0.569664247843j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.96536451958+0.561360862891j)*x_ref[0]**o + ((-0.937837861123+0.394508847297j))*x_ref[0] + ((-0.440230594075+0.834119529179j))*x_ref[1]**o + ((-0.565493378549-0.569664247843j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.0189214516978+0.990858709989j)*x[0]**o + ((-0.281806820762-0.128922150459j))*x[0] + ((0.9914083505-0.51139662159j))*x[1]**o + ((0.215298658727+0.770289501263j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.0189214516978+0.990858709989j)*x_ref[0]**o + ((-0.281806820762-0.128922150459j))*x_ref[0] + ((0.9914083505-0.51139662159j))*x_ref[1]**o + ((0.215298658727+0.770289501263j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.837498810891-0.0523102247673j)*x[0]**o + ((-0.489654788074-0.707899250559j))*x[0] + ((-0.594716053614-0.201016744064j))*x[1]**o + ((0.302751642841-0.721273176701j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.837498810891-0.0523102247673j)*x_ref[0]**o + ((-0.489654788074-0.707899250559j))*x_ref[0] + ((-0.594716053614-0.201016744064j))*x_ref[1]**o + ((0.302751642841-0.721273176701j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.670632303943-0.613098685221j)*x[0]**o + ((-0.22818491389-0.771717814324j))*x[0] + ((-0.50303562811-0.288835076225j))*x[1]**o + ((0.77548927345+0.532676513353j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.670632303943-0.613098685221j)*x_ref[0]**o + ((-0.22818491389-0.771717814324j))*x_ref[0] + ((-0.50303562811-0.288835076225j))*x_ref[1]**o + ((0.77548927345+0.532676513353j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.46683514709+0.979961041776j)*x[0]**o + ((0.757340784911+0.0760592578341j))*x[0] + ((-0.750072337737+0.839934374131j))*x[1]**o + ((0.0662620791138+0.504662238189j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.46683514709+0.979961041776j)*x_ref[0]**o + ((0.757340784911+0.0760592578341j))*x_ref[0] + ((-0.750072337737+0.839934374131j))*x_ref[1]**o + ((0.0662620791138+0.504662238189j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.152347969807-0.147408778714j)*x[0]**o + ((-0.922734102883-0.559441544353j))*x[0] + ((0.520024710661-0.606076843898j))*x[1]**o + ((-0.0879473102494+0.952462945827j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.152347969807-0.147408778714j)*x_ref[0]**o + ((-0.922734102883-0.559441544353j))*x_ref[0] + ((0.520024710661-0.606076843898j))*x_ref[1]**o + ((-0.0879473102494+0.952462945827j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.891331679303+0.783962309606j)*x[0]**o + ((0.260200915711-0.770134482376j))*x[0] + ((0.579389740142+0.147767945262j))*x[1]**o + ((0.00170189642353+0.119307603725j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.891331679303+0.783962309606j)*x_ref[0]**o + ((0.260200915711-0.770134482376j))*x_ref[0] + ((0.579389740142+0.147767945262j))*x_ref[1]**o + ((0.00170189642353+0.119307603725j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.858338844997-0.861313478782j)*x[0]**o + ((0.990717139796+0.468380843547j))*x[0] + ((0.822503312305+0.690949455336j))*x[1]**o + ((0.202918297391-0.218623615147j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.858338844997-0.861313478782j)*x_ref[0]**o + ((0.990717139796+0.468380843547j))*x_ref[0] + ((0.822503312305+0.690949455336j))*x_ref[1]**o + ((0.202918297391-0.218623615147j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(-0.533209923798-0.447232346461j)*x[0]**o + ((-0.883893902653-0.99054439545j))*x[0] + ((-0.659635978817-0.825298458288j))*x[1]**o + ((-0.0152997813664-0.575877717723j))*x[1]
+        ref[(2, 0, 2, 1)]=(-0.533209923798-0.447232346461j)*x_ref[0]**o + ((-0.883893902653-0.99054439545j))*x_ref[0] + ((-0.659635978817-0.825298458288j))*x_ref[1]**o + ((-0.0152997813664-0.575877717723j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.35214696082+0.0224033076598j)*x[0]**o + ((-0.977564387269-0.639245819194j))*x[0] + ((-0.827534000192+0.990908853552j))*x[1]**o + ((0.818498058335-0.73213535927j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.35214696082+0.0224033076598j)*x_ref[0]**o + ((-0.977564387269-0.639245819194j))*x_ref[0] + ((-0.827534000192+0.990908853552j))*x_ref[1]**o + ((0.818498058335-0.73213535927j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.22753310475-0.589478732526j)*x[0]**o + ((-0.778181261233-0.17908807084j))*x[0] + ((0.979999725106+0.678329233364j))*x[1]**o + ((0.370876461849+0.477460068945j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.22753310475-0.589478732526j)*x_ref[0]**o + ((-0.778181261233-0.17908807084j))*x_ref[0] + ((0.979999725106+0.678329233364j))*x_ref[1]**o + ((0.370876461849+0.477460068945j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.640499639273+0.258800065864j)*x[0]**o + ((-0.844613771204-0.557599539841j))*x[0] + ((0.257495259319-0.807631869506j))*x[1]**o + ((0.520624320345-0.351424870718j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.640499639273+0.258800065864j)*x_ref[0]**o + ((-0.844613771204-0.557599539841j))*x_ref[0] + ((0.257495259319-0.807631869506j))*x_ref[1]**o + ((0.520624320345-0.351424870718j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.123492578757-0.0823246488971j)*x[0]**o + ((-0.774554666588+0.158632306879j))*x[0] + ((0.973945864685-0.921375124186j))*x[1]**o + ((-0.132781750837-0.0921129266247j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.123492578757-0.0823246488971j)*x_ref[0]**o + ((-0.774554666588+0.158632306879j))*x_ref[0] + ((0.973945864685-0.921375124186j))*x_ref[1]**o + ((-0.132781750837-0.0921129266247j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.4254254622-0.283088056849j)*x[0]**o + ((-0.72778036269+0.605328751125j))*x[0] + ((0.901144360974+0.397954485258j))*x[1]**o + ((-0.372963050466+0.147558941348j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.4254254622-0.283088056849j)*x_ref[0]**o + ((-0.72778036269+0.605328751125j))*x_ref[0] + ((0.901144360974+0.397954485258j))*x_ref[1]**o + ((-0.372963050466+0.147558941348j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(0.789057010554-0.682435045609j)*x[0]**o + ((-0.237609511358-0.943300973601j))*x[0] + ((0.0233587226282-0.657374728278j))*x[1]**o + ((-0.806730316681+0.148974707397j))*x[1]
+        ref[(2, 1, 2, 1)]=(0.789057010554-0.682435045609j)*x_ref[0]**o + ((-0.237609511358-0.943300973601j))*x_ref[0] + ((0.0233587226282-0.657374728278j))*x_ref[1]**o + ((-0.806730316681+0.148974707397j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.473762618762-0.165603024211j)*x[0]**o + ((-0.610270623658+0.85334948677j))*x[0] + ((0.97359242005-0.539353404449j))*x[1]**o + ((0.240748324283+0.176800951008j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.473762618762-0.165603024211j)*x_ref[0]**o + ((-0.610270623658+0.85334948677j))*x_ref[0] + ((0.97359242005-0.539353404449j))*x_ref[1]**o + ((0.240748324283+0.176800951008j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.687577929156-0.804643659235j)*x[0]**o + ((-0.373456934763+0.247774753025j))*x[0] + ((0.214802281873-0.857592690231j))*x[1]**o + ((-0.159312591794-0.659152551952j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.687577929156-0.804643659235j)*x_ref[0]**o + ((-0.373456934763+0.247774753025j))*x_ref[0] + ((0.214802281873-0.857592690231j))*x_ref[1]**o + ((-0.159312591794-0.659152551952j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.518903068986+0.331374319006j)*x[0]**o + ((0.237747776103+0.900401192054j))*x[0] + ((0.0580199423257-0.706338167j))*x[1]**o + ((0.411717411986+0.890055648818j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.518903068986+0.331374319006j)*x_ref[0]**o + ((0.237747776103+0.900401192054j))*x_ref[0] + ((0.0580199423257-0.706338167j))*x_ref[1]**o + ((0.411717411986+0.890055648818j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.473274240306-0.428100258466j)*x[0]**o + ((-0.195546004055+0.322594290442j))*x[0] + ((0.418040885053-0.480716165213j))*x[1]**o + ((0.770494153877-0.64579218225j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.473274240306-0.428100258466j)*x_ref[0]**o + ((-0.195546004055+0.322594290442j))*x_ref[0] + ((0.418040885053-0.480716165213j))*x_ref[1]**o + ((0.770494153877-0.64579218225j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(-0.652290920498+0.346102837083j)*x[0]**o + ((0.392567316676-0.0264184724083j))*x[0] + ((-0.611131571313-0.823708039889j))*x[1]**o + ((0.600990701055-0.649620660866j))*x[1]
+        ref[(2, 2, 2, 0)]=(-0.652290920498+0.346102837083j)*x_ref[0]**o + ((0.392567316676-0.0264184724083j))*x_ref[0] + ((-0.611131571313-0.823708039889j))*x_ref[1]**o + ((0.600990701055-0.649620660866j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.128641521759-0.497131147371j)*x[0]**o + ((-0.693003336576+0.974786847037j))*x[0] + ((0.459883518421+0.250982525393j))*x[1]**o + ((0.403928963546-0.651199590831j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.128641521759-0.497131147371j)*x_ref[0]**o + ((-0.693003336576+0.974786847037j))*x_ref[0] + ((0.459883518421+0.250982525393j))*x_ref[1]**o + ((0.403928963546-0.651199590831j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.65951372781-0.489828713063j)*x[2]**o + ((0.247084086789-0.0282775181289j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.65951372781-0.489828713063j)*x_ref[2]**o + ((0.247084086789-0.0282775181289j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.471595809412+0.754409053897j)*x[2]**o + ((-0.108754371969-0.0470357460948j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.471595809412+0.754409053897j)*x_ref[2]**o + ((-0.108754371969-0.0470357460948j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.0556262260635+0.520176504223j)*x[2]**o + ((-0.366518407109-0.277149990455j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.0556262260635+0.520176504223j)*x_ref[2]**o + ((-0.366518407109-0.277149990455j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.647607737804+0.992315802361j)*x[2]**o + ((-0.0601740805355+0.150203296593j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.647607737804+0.992315802361j)*x_ref[2]**o + ((-0.0601740805355+0.150203296593j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.759373849292+0.525511283321j)*x[2]**o + ((0.023060230996+0.792918048848j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.759373849292+0.525511283321j)*x_ref[2]**o + ((0.023060230996+0.792918048848j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.752431544046+0.103030288265j)*x[2]**o + ((0.383027429869-0.207191062117j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.752431544046+0.103030288265j)*x_ref[2]**o + ((0.383027429869-0.207191062117j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.398500350194+0.498924397061j)*x[2]**o + ((-0.267710357534-0.316047942157j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.398500350194+0.498924397061j)*x_ref[2]**o + ((-0.267710357534-0.316047942157j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.506984308917+0.760045871405j)*x[2]**o + ((-0.0862536503082-0.288518475913j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.506984308917+0.760045871405j)*x_ref[2]**o + ((-0.0862536503082-0.288518475913j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.516935703039+0.719788307726j)*x[2]**o + ((0.796023868531+0.5671750357j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.516935703039+0.719788307726j)*x_ref[2]**o + ((0.796023868531+0.5671750357j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.504555591598+0.420607514667j)*x[2]**o + ((0.391512404159-0.307567463045j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.504555591598+0.420607514667j)*x_ref[2]**o + ((0.391512404159-0.307567463045j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.897976119909-0.909266376351j)*x[2]**o + ((-0.791619324509+0.966231864701j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.897976119909-0.909266376351j)*x_ref[2]**o + ((-0.791619324509+0.966231864701j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.189859332772-0.404427320221j)*x[2]**o + ((0.368667189872-0.104435603748j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.189859332772-0.404427320221j)*x_ref[2]**o + ((0.368667189872-0.104435603748j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.18537699589-0.974924346874j)*x[2]**o + ((0.67870450448-0.481295363347j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.18537699589-0.974924346874j)*x_ref[2]**o + ((0.67870450448-0.481295363347j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.264570891927-0.0317770761043j)*x[2]**o + ((-0.970801797941-0.174229491657j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.264570891927-0.0317770761043j)*x_ref[2]**o + ((-0.970801797941-0.174229491657j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.137811726199+0.772327979954j)*x[2]**o + ((0.122138691759+0.607551120558j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.137811726199+0.772327979954j)*x_ref[2]**o + ((0.122138691759+0.607551120558j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.517322026519+0.7396880609j)*x[2]**o + ((-0.219612177839+0.210889375382j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.517322026519+0.7396880609j)*x_ref[2]**o + ((-0.219612177839+0.210889375382j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.150636374113+0.264687470465j)*x[2]**o + ((-0.108945095455-0.108333491307j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.150636374113+0.264687470465j)*x_ref[2]**o + ((-0.108945095455-0.108333491307j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.449930676579-0.26385976226j)*x[2]**o + ((-0.916381682669+0.458772948827j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.449930676579-0.26385976226j)*x_ref[2]**o + ((-0.916381682669+0.458772948827j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.40153975444+0.257654554506j)*x[2]**o + ((-0.530694366772+0.593680669169j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.40153975444+0.257654554506j)*x_ref[2]**o + ((-0.530694366772+0.593680669169j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.0552633734213+0.520857633944j)*x[2]**o + ((-0.319147605619-0.537466267893j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.0552633734213+0.520857633944j)*x_ref[2]**o + ((-0.319147605619-0.537466267893j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.184361079694-0.78786447717j)*x[2]**o + ((0.529226549568-0.883078544248j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.184361079694-0.78786447717j)*x_ref[2]**o + ((0.529226549568-0.883078544248j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.755523189727+0.807499167726j)*x[2]**o + ((0.39457517705-0.269137363001j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.755523189727+0.807499167726j)*x_ref[2]**o + ((0.39457517705-0.269137363001j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.60091069507+0.727333019583j)*x[2]**o + ((-0.447451556542-0.82219726446j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.60091069507+0.727333019583j)*x_ref[2]**o + ((-0.447451556542-0.82219726446j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.99382998814-0.942129203275j)*x[2]**o + ((0.49702556101-0.850945504163j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.99382998814-0.942129203275j)*x_ref[2]**o + ((0.49702556101-0.850945504163j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.148577134272-0.0923161379281j)*x[2]**o + ((-0.638392103606+0.296293683246j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.148577134272-0.0923161379281j)*x_ref[2]**o + ((-0.638392103606+0.296293683246j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.639044338474-0.0460698596674j)*x[2]**o + ((0.740654036971-0.434183590227j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.639044338474-0.0460698596674j)*x_ref[2]**o + ((0.740654036971-0.434183590227j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.52384810363-0.766390197166j)*x[2]**o + ((-0.977525012054-0.0857812165641j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.52384810363-0.766390197166j)*x_ref[2]**o + ((-0.977525012054-0.0857812165641j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.349136708829+0.236724580044j)*x[2]**o + ((0.169134182539-0.978317610438j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.349136708829+0.236724580044j)*x_ref[2]**o + ((0.169134182539-0.978317610438j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.0540427110008+0.186137656845j)*x[2]**o + ((0.970973151526+0.0228803434771j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.0540427110008+0.186137656845j)*x_ref[2]**o + ((0.970973151526+0.0228803434771j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.824125578784-0.997244681432j)*x[2]**o + ((-0.723712697899+0.604854627912j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.824125578784-0.997244681432j)*x_ref[2]**o + ((-0.723712697899+0.604854627912j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.263097377236+0.107839531857j)*x[2]**o + ((-0.0664843325364-0.919703361071j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.263097377236+0.107839531857j)*x_ref[2]**o + ((-0.0664843325364-0.919703361071j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.282510298252+0.496666461069j)*x[2]**o + ((-0.129646091974+0.372353171998j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.282510298252+0.496666461069j)*x_ref[2]**o + ((-0.129646091974+0.372353171998j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.125136237347-0.67766262188j)*x[2]**o + ((-0.584909864337+0.36628654674j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.125136237347-0.67766262188j)*x_ref[2]**o + ((-0.584909864337+0.36628654674j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.55595042103+0.441880449178j)*x[2]**o + ((0.0935870493938-0.981688427684j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.55595042103+0.441880449178j)*x_ref[2]**o + ((0.0935870493938-0.981688427684j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.0118119025528+0.861686872161j)*x[2]**o + ((0.157292370093+0.505574378395j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.0118119025528+0.861686872161j)*x_ref[2]**o + ((0.157292370093+0.505574378395j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(-0.996526331878-0.919164814722j)*x[2]**o + ((0.181917098762+0.452804920097j))*x[2]
+            ref[(1, 2, 2, 1)]+=(-0.996526331878-0.919164814722j)*x_ref[2]**o + ((0.181917098762+0.452804920097j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.0680271809231+0.66671081208j)*x[2]**o + ((-0.168250335315+0.191392850375j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.0680271809231+0.66671081208j)*x_ref[2]**o + ((-0.168250335315+0.191392850375j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.534061792147+0.127822547331j)*x[2]**o + ((0.94359004341+0.468470825652j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.534061792147+0.127822547331j)*x_ref[2]**o + ((0.94359004341+0.468470825652j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.955844104655-0.117165794905j)*x[2]**o + ((-0.0359338723135+0.726040308666j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.955844104655-0.117165794905j)*x_ref[2]**o + ((-0.0359338723135+0.726040308666j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.165575987416+0.874521741791j)*x[2]**o + ((-0.876673883262-0.143154947358j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.165575987416+0.874521741791j)*x_ref[2]**o + ((-0.876673883262-0.143154947358j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.963076598466+0.0132843284215j)*x[2]**o + ((0.821480653951-0.553184778632j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.963076598466+0.0132843284215j)*x_ref[2]**o + ((0.821480653951-0.553184778632j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.468359395697-0.567853778505j)*x[2]**o + ((0.561420471981+0.101561859568j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.468359395697-0.567853778505j)*x_ref[2]**o + ((0.561420471981+0.101561859568j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.428249410514-0.77343050087j)*x[2]**o + ((0.37987928735-0.662833183861j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.428249410514-0.77343050087j)*x_ref[2]**o + ((0.37987928735-0.662833183861j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.341840555537-0.346176364296j)*x[2]**o + ((-0.403986531062+0.805286910878j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.341840555537-0.346176364296j)*x_ref[2]**o + ((-0.403986531062+0.805286910878j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.40357425662+0.357365789203j)*x[2]**o + ((-0.236284436938+0.313266706137j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.40357425662+0.357365789203j)*x_ref[2]**o + ((-0.236284436938+0.313266706137j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.42058187268-0.411001058308j)*x[2]**o + ((0.821865188766-0.113058973758j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.42058187268-0.411001058308j)*x_ref[2]**o + ((0.821865188766-0.113058973758j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.283289073081+0.0452603387343j)*x[2]**o + ((-0.0747954603814-0.246291612848j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.283289073081+0.0452603387343j)*x_ref[2]**o + ((-0.0747954603814-0.246291612848j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.0781864491586-0.499941484631j)*x[2]**o + ((0.977299571856-0.0766514729035j))*x[2]
+            ref[(2, 1, 2, 1)]+=(0.0781864491586-0.499941484631j)*x_ref[2]**o + ((0.977299571856-0.0766514729035j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.909204483252+0.736554396695j)*x[2]**o + ((0.251470676285+0.756561648847j))*x[2]
+            ref[(2, 2, 0, 0)]+=(0.909204483252+0.736554396695j)*x_ref[2]**o + ((0.251470676285+0.756561648847j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.221036536322+0.679660207503j)*x[2]**o + ((0.499461673776-0.555732981117j))*x[2]
+            ref[(2, 2, 0, 1)]+=(0.221036536322+0.679660207503j)*x_ref[2]**o + ((0.499461673776-0.555732981117j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.579643434941+0.496905181104j)*x[2]**o + ((-0.213416929607+0.750511606144j))*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.579643434941+0.496905181104j)*x_ref[2]**o + ((-0.213416929607+0.750511606144j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.175183539815+0.193043882757j)*x[2]**o + ((0.834036881509-0.0113423533545j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.175183539815+0.193043882757j)*x_ref[2]**o + ((0.834036881509-0.0113423533545j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(-0.191029648484-0.575420120666j)*x[2]**o + ((0.759609062314+0.244881181781j))*x[2]
+            ref[(2, 2, 2, 0)]+=(-0.191029648484-0.575420120666j)*x_ref[2]**o + ((0.759609062314+0.244881181781j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(-0.668809634783+0.776440701303j)*x[2]**o + ((-0.657676193915+0.124126411939j))*x[2]
+            ref[(2, 2, 2, 1)]+=(-0.668809634783+0.776440701303j)*x_ref[2]**o + ((-0.657676193915+0.124126411939j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.276788116886-0.916008699501j)*x[0] + ((-0.511011502141+0.0935316671727j))*x[1]
+        ref=(0.276788116886-0.916008699501j)*x_ref[0] + ((-0.511011502141+0.0935316671727j))*x_ref[1]
+        if dim==3:
+            arg+=((0.924475417998+0.164628558327j))*x[2]
+            ref+=((0.924475417998+0.164628558327j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(0.400041234683-0.566912434483j)*x[0] + ((-0.127916994502+0.809874932187j))*x[1]
+        ref[(0,)]=(0.400041234683-0.566912434483j)*x_ref[0] + ((-0.127916994502+0.809874932187j))*x_ref[1]
+        arg[(1,)]=(0.143065674676+0.192138174765j)*x[0] + ((-0.811717586622-0.43176498046j))*x[1]
+        ref[(1,)]=(0.143065674676+0.192138174765j)*x_ref[0] + ((-0.811717586622-0.43176498046j))*x_ref[1]
+        arg[(2,)]=(0.37191906992-0.758121992576j)*x[0] + ((-0.208130336067+0.518441517954j))*x[1]
+        ref[(2,)]=(0.37191906992-0.758121992576j)*x_ref[0] + ((-0.208130336067+0.518441517954j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.532407558618+0.896706647495j)*x[2]
+            ref[(0,)]+=(0.532407558618+0.896706647495j)*x_ref[2]
+            arg[(1,)]+=(-0.823537403763+0.772735578063j)*x[2]
+            ref[(1,)]+=(-0.823537403763+0.772735578063j)*x_ref[2]
+            arg[(2,)]+=(-0.766956374096-0.0290016618175j)*x[2]
+            ref[(2,)]+=(-0.766956374096-0.0290016618175j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=(-0.811038244296+0.273340585585j)*x[0] + ((-0.534689443607+0.60200700471j))*x[1]
+        ref[(0, 0)]=(-0.811038244296+0.273340585585j)*x_ref[0] + ((-0.534689443607+0.60200700471j))*x_ref[1]
+        arg[(0, 1)]=(0.927687463747-0.497469851741j)*x[0] + ((0.833943132579+0.164365583777j))*x[1]
+        ref[(0, 1)]=(0.927687463747-0.497469851741j)*x_ref[0] + ((0.833943132579+0.164365583777j))*x_ref[1]
+        arg[(0, 2)]=(0.383729662149-0.562366770182j)*x[0] + ((-0.552584721337+0.0847304557927j))*x[1]
+        ref[(0, 2)]=(0.383729662149-0.562366770182j)*x_ref[0] + ((-0.552584721337+0.0847304557927j))*x_ref[1]
+        arg[(0, 3)]=(-0.804204213021-0.593551013718j)*x[0] + ((0.146748290157+0.809999775082j))*x[1]
+        ref[(0, 3)]=(-0.804204213021-0.593551013718j)*x_ref[0] + ((0.146748290157+0.809999775082j))*x_ref[1]
+        arg[(1, 0)]=(0.722277894048-0.8011229921j)*x[0] + ((-0.986019804104-0.385838051098j))*x[1]
+        ref[(1, 0)]=(0.722277894048-0.8011229921j)*x_ref[0] + ((-0.986019804104-0.385838051098j))*x_ref[1]
+        arg[(1, 1)]=(0.0175146574346-0.654745776855j)*x[0] + ((0.784210209382+0.323806394417j))*x[1]
+        ref[(1, 1)]=(0.0175146574346-0.654745776855j)*x_ref[0] + ((0.784210209382+0.323806394417j))*x_ref[1]
+        arg[(1, 2)]=(-0.573743676867-0.770972941221j)*x[0] + ((-0.672078290552-0.885067743292j))*x[1]
+        ref[(1, 2)]=(-0.573743676867-0.770972941221j)*x_ref[0] + ((-0.672078290552-0.885067743292j))*x_ref[1]
+        arg[(1, 3)]=(-0.282359439587-0.67399986943j)*x[0] + ((-0.293142782773-0.815348510483j))*x[1]
+        ref[(1, 3)]=(-0.282359439587-0.67399986943j)*x_ref[0] + ((-0.293142782773-0.815348510483j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.156852897129-0.523884284923j)*x[2]
+            ref[(0, 0)]+=(-0.156852897129-0.523884284923j)*x_ref[2]
+            arg[(0, 1)]+=(0.745897787046-0.291765775477j)*x[2]
+            ref[(0, 1)]+=(0.745897787046-0.291765775477j)*x_ref[2]
+            arg[(0, 2)]+=(0.665575171811+0.116671273587j)*x[2]
+            ref[(0, 2)]+=(0.665575171811+0.116671273587j)*x_ref[2]
+            arg[(0, 3)]+=(0.605641035302+0.947591202909j)*x[2]
+            ref[(0, 3)]+=(0.605641035302+0.947591202909j)*x_ref[2]
+            arg[(1, 0)]+=(0.918523225592+0.350654023408j)*x[2]
+            ref[(1, 0)]+=(0.918523225592+0.350654023408j)*x_ref[2]
+            arg[(1, 1)]+=(0.492242232824-0.94460912257j)*x[2]
+            ref[(1, 1)]+=(0.492242232824-0.94460912257j)*x_ref[2]
+            arg[(1, 2)]+=(0.87591890879+0.722650218361j)*x[2]
+            ref[(1, 2)]+=(0.87591890879+0.722650218361j)*x_ref[2]
+            arg[(1, 3)]+=(0.224265316679-0.082110854283j)*x[2]
+            ref[(1, 3)]+=(0.224265316679-0.082110854283j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4),w_ref)
+        arg[(0, 0, 0)]=(0.0369724156863+0.536225320526j)*x[0] + ((0.725598190982-0.764546966604j))*x[1]
+        ref[(0, 0, 0)]=(0.0369724156863+0.536225320526j)*x_ref[0] + ((0.725598190982-0.764546966604j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.889224090582+0.572589058909j)*x[0] + ((-0.420012024602-0.591230809238j))*x[1]
+        ref[(0, 0, 1)]=(0.889224090582+0.572589058909j)*x_ref[0] + ((-0.420012024602-0.591230809238j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.486452588344+0.910488425702j)*x[0] + ((-0.0759409634363+0.511175053009j))*x[1]
+        ref[(0, 0, 2)]=(-0.486452588344+0.910488425702j)*x_ref[0] + ((-0.0759409634363+0.511175053009j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.409662181663-0.957787228281j)*x[0] + ((0.179336805164+0.68869784088j))*x[1]
+        ref[(0, 0, 3)]=(0.409662181663-0.957787228281j)*x_ref[0] + ((0.179336805164+0.68869784088j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.195880403815+0.14795882198j)*x[0] + ((-0.987727453348+0.143825622116j))*x[1]
+        ref[(0, 1, 0)]=(-0.195880403815+0.14795882198j)*x_ref[0] + ((-0.987727453348+0.143825622116j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.698946795262+0.904312985586j)*x[0] + ((-0.171387580518-0.54985613642j))*x[1]
+        ref[(0, 1, 1)]=(-0.698946795262+0.904312985586j)*x_ref[0] + ((-0.171387580518-0.54985613642j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.362582194967+0.0479017097943j)*x[0] + ((-0.738004297257+0.0164580380333j))*x[1]
+        ref[(0, 1, 2)]=(0.362582194967+0.0479017097943j)*x_ref[0] + ((-0.738004297257+0.0164580380333j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.843679292272-0.472958253698j)*x[0] + ((-0.463180899942+0.694976668326j))*x[1]
+        ref[(0, 1, 3)]=(0.843679292272-0.472958253698j)*x_ref[0] + ((-0.463180899942+0.694976668326j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.299952071691-0.14182920432j)*x[0] + ((-0.420729553172+0.463354139794j))*x[1]
+        ref[(1, 0, 0)]=(-0.299952071691-0.14182920432j)*x_ref[0] + ((-0.420729553172+0.463354139794j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.660202231927-0.103828054199j)*x[0] + ((0.405901780116-0.54843910177j))*x[1]
+        ref[(1, 0, 1)]=(-0.660202231927-0.103828054199j)*x_ref[0] + ((0.405901780116-0.54843910177j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.0796321961523-0.975613777924j)*x[0] + ((-0.410605998237-0.764753259402j))*x[1]
+        ref[(1, 0, 2)]=(-0.0796321961523-0.975613777924j)*x_ref[0] + ((-0.410605998237-0.764753259402j))*x_ref[1]
+        arg[(1, 0, 3)]=(-0.741914648241+0.774551934192j)*x[0] + ((-0.630828669893+0.847538285578j))*x[1]
+        ref[(1, 0, 3)]=(-0.741914648241+0.774551934192j)*x_ref[0] + ((-0.630828669893+0.847538285578j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.401112683433-0.83512643221j)*x[0] + ((-0.0653772615193+0.202573104713j))*x[1]
+        ref[(1, 1, 0)]=(0.401112683433-0.83512643221j)*x_ref[0] + ((-0.0653772615193+0.202573104713j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.429893948401-0.671658074196j)*x[0] + ((-0.0690337797711+0.823353771886j))*x[1]
+        ref[(1, 1, 1)]=(0.429893948401-0.671658074196j)*x_ref[0] + ((-0.0690337797711+0.823353771886j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.80092450324+0.131931683095j)*x[0] + ((-0.824818225499+0.923382947599j))*x[1]
+        ref[(1, 1, 2)]=(0.80092450324+0.131931683095j)*x_ref[0] + ((-0.824818225499+0.923382947599j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.729533172752+0.849675011859j)*x[0] + ((-0.232260192925-0.473090341319j))*x[1]
+        ref[(1, 1, 3)]=(0.729533172752+0.849675011859j)*x_ref[0] + ((-0.232260192925-0.473090341319j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.965489661481-0.60697265263j)*x[2]
+            ref[(0, 0, 0)]+=(0.965489661481-0.60697265263j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.406361604089+0.559895968424j)*x[2]
+            ref[(0, 0, 1)]+=(0.406361604089+0.559895968424j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.152581719741+0.601123785503j)*x[2]
+            ref[(0, 0, 2)]+=(-0.152581719741+0.601123785503j)*x_ref[2]
+            arg[(0, 0, 3)]+=(0.765110880163+0.273343438827j)*x[2]
+            ref[(0, 0, 3)]+=(0.765110880163+0.273343438827j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.850532052936+0.490078501284j)*x[2]
+            ref[(0, 1, 0)]+=(-0.850532052936+0.490078501284j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.219259378239-0.259602350797j)*x[2]
+            ref[(0, 1, 1)]+=(0.219259378239-0.259602350797j)*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.0451370181153-0.0468212305031j)*x[2]
+            ref[(0, 1, 2)]+=(-0.0451370181153-0.0468212305031j)*x_ref[2]
+            arg[(0, 1, 3)]+=(0.890840775998+0.78886541686j)*x[2]
+            ref[(0, 1, 3)]+=(0.890840775998+0.78886541686j)*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.151482541702+0.289199377194j)*x[2]
+            ref[(1, 0, 0)]+=(-0.151482541702+0.289199377194j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.901258388401+0.0123205307477j)*x[2]
+            ref[(1, 0, 1)]+=(0.901258388401+0.0123205307477j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.482090549618+0.882527353416j)*x[2]
+            ref[(1, 0, 2)]+=(0.482090549618+0.882527353416j)*x_ref[2]
+            arg[(1, 0, 3)]+=(0.143215853221-0.299441925361j)*x[2]
+            ref[(1, 0, 3)]+=(0.143215853221-0.299441925361j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.544451534238+0.137361600371j)*x[2]
+            ref[(1, 1, 0)]+=(0.544451534238+0.137361600371j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.937531811704+0.894142042998j)*x[2]
+            ref[(1, 1, 1)]+=(-0.937531811704+0.894142042998j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.873904487415+0.775245064296j)*x[2]
+            ref[(1, 1, 2)]+=(0.873904487415+0.775245064296j)*x_ref[2]
+            arg[(1, 1, 3)]+=(-0.58161043286-0.250611497482j)*x[2]
+            ref[(1, 1, 3)]+=(-0.58161043286-0.250611497482j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2, 2),w)
+        ref = Data(0,(4, 4, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.987432290757-0.499888677865j)*x[0] + ((-0.384347996799+0.71435159715j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.987432290757-0.499888677865j)*x_ref[0] + ((-0.384347996799+0.71435159715j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.243748219654-0.852417670751j)*x[0] + ((0.0614073831739+0.394339729319j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.243748219654-0.852417670751j)*x_ref[0] + ((0.0614073831739+0.394339729319j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.191526654339-0.453865373388j)*x[0] + ((-0.887006406822-0.296115594593j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.191526654339-0.453865373388j)*x_ref[0] + ((-0.887006406822-0.296115594593j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.682974729695+0.169935656185j)*x[0] + ((-0.451924330983+0.247486791102j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.682974729695+0.169935656185j)*x_ref[0] + ((-0.451924330983+0.247486791102j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.122316917214+0.79079085685j)*x[0] + ((0.703032327623-0.608432723178j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.122316917214+0.79079085685j)*x_ref[0] + ((0.703032327623-0.608432723178j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.889125859671+0.981479420951j)*x[0] + ((0.0277181322552-0.122896947035j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.889125859671+0.981479420951j)*x_ref[0] + ((0.0277181322552-0.122896947035j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.163899095999-0.127268479368j)*x[0] + ((0.567626225475+0.157557583084j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.163899095999-0.127268479368j)*x_ref[0] + ((0.567626225475+0.157557583084j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.130505599142+0.549615487779j)*x[0] + ((0.865213761968+0.441838898363j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.130505599142+0.549615487779j)*x_ref[0] + ((0.865213761968+0.441838898363j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.698809106576+0.311659211459j)*x[0] + ((0.258546224609+0.118355119065j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.698809106576+0.311659211459j)*x_ref[0] + ((0.258546224609+0.118355119065j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.337680265746+0.88235073218j)*x[0] + ((-0.116777187374+0.97570933088j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.337680265746+0.88235073218j)*x_ref[0] + ((-0.116777187374+0.97570933088j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.682479793701+0.214906300408j)*x[0] + ((-0.789251064836-0.260215342855j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.682479793701+0.214906300408j)*x_ref[0] + ((-0.789251064836-0.260215342855j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.354936945331-0.806981091087j)*x[0] + ((-0.392832537113-0.419001192291j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.354936945331-0.806981091087j)*x_ref[0] + ((-0.392832537113-0.419001192291j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.0188415103237-0.878618405219j)*x[0] + ((-0.267258107439-0.567562108529j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.0188415103237-0.878618405219j)*x_ref[0] + ((-0.267258107439-0.567562108529j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.619091519279-0.0345365022896j)*x[0] + ((0.740050507598-0.151139165182j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.619091519279-0.0345365022896j)*x_ref[0] + ((0.740050507598-0.151139165182j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.713937963427-0.727121766755j)*x[0] + ((0.321373243856-0.129450748234j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.713937963427-0.727121766755j)*x_ref[0] + ((0.321373243856-0.129450748234j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.969615144894+0.523151143577j)*x[0] + ((-0.972408613482-0.730915661909j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.969615144894+0.523151143577j)*x_ref[0] + ((-0.972408613482-0.730915661909j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.177837925198+0.202018082616j)*x[0] + ((-0.595244951957+0.876329932497j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.177837925198+0.202018082616j)*x_ref[0] + ((-0.595244951957+0.876329932497j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.0338146571976-0.749807569366j)*x[0] + ((0.569898900741-0.3359891576j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.0338146571976-0.749807569366j)*x_ref[0] + ((0.569898900741-0.3359891576j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.0846138276292+0.754158351518j)*x[0] + ((-0.362406813201+0.207329109205j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.0846138276292+0.754158351518j)*x_ref[0] + ((-0.362406813201+0.207329109205j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.0243435497579-0.760858222152j)*x[0] + ((-0.585034507127+0.611612559064j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.0243435497579-0.760858222152j)*x_ref[0] + ((-0.585034507127+0.611612559064j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.40416096975-0.676092677627j)*x[0] + ((-0.199558503945+0.149533231978j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.40416096975-0.676092677627j)*x_ref[0] + ((-0.199558503945+0.149533231978j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.620402205652+0.354416255692j)*x[0] + ((-0.741841240504+0.0878952871453j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.620402205652+0.354416255692j)*x_ref[0] + ((-0.741841240504+0.0878952871453j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.940458068982-0.572563591621j)*x[0] + ((-0.619534064628+0.905036611062j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.940458068982-0.572563591621j)*x_ref[0] + ((-0.619534064628+0.905036611062j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.088268114331-0.728523331605j)*x[0] + ((-0.269569805417+0.859396294684j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.088268114331-0.728523331605j)*x_ref[0] + ((-0.269569805417+0.859396294684j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.0959475788227+0.364612780152j)*x[0] + ((-0.970267600703+0.851804511227j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.0959475788227+0.364612780152j)*x_ref[0] + ((-0.970267600703+0.851804511227j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.545741688944-0.153673809193j)*x[0] + ((0.403454015738+0.656005052953j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.545741688944-0.153673809193j)*x_ref[0] + ((0.403454015738+0.656005052953j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.397439136915-0.617047983568j)*x[0] + ((-0.654454078936+0.644110753377j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.397439136915-0.617047983568j)*x_ref[0] + ((-0.654454078936+0.644110753377j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.592973414593+0.810517786873j)*x[0] + ((0.526665110192-0.242746911984j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.592973414593+0.810517786873j)*x_ref[0] + ((0.526665110192-0.242746911984j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.533104686286-0.961568239935j)*x[0] + ((-0.374578911726+0.795333702819j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.533104686286-0.961568239935j)*x_ref[0] + ((-0.374578911726+0.795333702819j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.969370201117-0.106356252083j)*x[0] + ((-0.750799756405-0.366314949324j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.969370201117-0.106356252083j)*x_ref[0] + ((-0.750799756405-0.366314949324j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.47062461508+0.973613706827j)*x[0] + ((0.460403660941-0.0185957870334j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.47062461508+0.973613706827j)*x_ref[0] + ((0.460403660941-0.0185957870334j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.470876165962+0.619157701644j)*x[0] + ((0.493184860663+0.401337676124j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.470876165962+0.619157701644j)*x_ref[0] + ((0.493184860663+0.401337676124j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.321194630343-0.706274275602j)*x[0] + ((0.188036344784-0.574316560039j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.321194630343-0.706274275602j)*x_ref[0] + ((0.188036344784-0.574316560039j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.755086323892-0.740594838389j)*x[0] + ((-0.709840164227-0.0917569006991j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.755086323892-0.740594838389j)*x_ref[0] + ((-0.709840164227-0.0917569006991j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.0131229919853+0.747288541303j)*x[0] + ((0.91412459944+0.984906195966j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.0131229919853+0.747288541303j)*x_ref[0] + ((0.91412459944+0.984906195966j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.368303013965+0.19456474529j)*x[0] + ((-0.233374975421-0.494874220549j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.368303013965+0.19456474529j)*x_ref[0] + ((-0.233374975421-0.494874220549j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.0790994395974-0.275764749739j)*x[0] + ((0.0598609332422-0.570687412764j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.0790994395974-0.275764749739j)*x_ref[0] + ((0.0598609332422-0.570687412764j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.788854215458+0.163527128928j)*x[0] + ((-0.993126667422+0.313596960676j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.788854215458+0.163527128928j)*x_ref[0] + ((-0.993126667422+0.313596960676j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.954073201278-0.641929763006j)*x[0] + ((0.153605020064-0.00694861506179j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.954073201278-0.641929763006j)*x_ref[0] + ((0.153605020064-0.00694861506179j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.586099696835-0.524521205901j)*x[0] + ((0.435929103135-0.733496272616j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.586099696835-0.524521205901j)*x_ref[0] + ((0.435929103135-0.733496272616j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.220482851361-0.894330462077j)*x[0] + ((0.493243182832+0.0976021805711j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.220482851361-0.894330462077j)*x_ref[0] + ((0.493243182832+0.0976021805711j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.787865552817+0.103219128182j)*x[0] + ((0.836035518554+0.661634145426j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.787865552817+0.103219128182j)*x_ref[0] + ((0.836035518554+0.661634145426j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.541475028096+0.377641907916j)*x[0] + ((-0.905226046641+0.269618731698j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.541475028096+0.377641907916j)*x_ref[0] + ((-0.905226046641+0.269618731698j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.524514225222-0.818821173495j)*x[0] + ((-0.536207361196+0.630901693834j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.524514225222-0.818821173495j)*x_ref[0] + ((-0.536207361196+0.630901693834j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(0.917564512714+0.665700772193j)*x[0] + ((0.288415842136-0.475997904964j))*x[1]
+        ref[(2, 3, 0, 0)]=(0.917564512714+0.665700772193j)*x_ref[0] + ((0.288415842136-0.475997904964j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(0.348448151076+0.518523733379j)*x[0] + ((-0.530278386862+0.973163651401j))*x[1]
+        ref[(2, 3, 0, 1)]=(0.348448151076+0.518523733379j)*x_ref[0] + ((-0.530278386862+0.973163651401j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(-0.898066792403-0.266545265333j)*x[0] + ((-0.741386663678-0.686308028262j))*x[1]
+        ref[(2, 3, 1, 0)]=(-0.898066792403-0.266545265333j)*x_ref[0] + ((-0.741386663678-0.686308028262j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(-0.0346416359945-0.450801197602j)*x[0] + ((-0.189823129973+0.261933734459j))*x[1]
+        ref[(2, 3, 1, 1)]=(-0.0346416359945-0.450801197602j)*x_ref[0] + ((-0.189823129973+0.261933734459j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.0792902673099+0.444524024316j)*x[0] + ((0.978428973446-0.603825700112j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.0792902673099+0.444524024316j)*x_ref[0] + ((0.978428973446-0.603825700112j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.88327246967+0.873728920403j)*x[0] + ((-0.517050561489-0.0451087952361j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.88327246967+0.873728920403j)*x_ref[0] + ((-0.517050561489-0.0451087952361j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.39685182877-0.520447573571j)*x[0] + ((0.743650787681+0.914412226146j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.39685182877-0.520447573571j)*x_ref[0] + ((0.743650787681+0.914412226146j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.838738729792+0.866573750868j)*x[0] + ((-0.433695532669-0.513943546129j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.838738729792+0.866573750868j)*x_ref[0] + ((-0.433695532669-0.513943546129j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.461292134633+0.826886521876j)*x[0] + ((-0.891765114996-0.651253933629j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.461292134633+0.826886521876j)*x_ref[0] + ((-0.891765114996-0.651253933629j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.000760949112875+0.298964660421j)*x[0] + ((0.518603457398-0.806258789407j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.000760949112875+0.298964660421j)*x_ref[0] + ((0.518603457398-0.806258789407j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(-0.723784646391-0.919899167138j)*x[0] + ((0.613956169435-0.620037761562j))*x[1]
+        ref[(3, 1, 1, 0)]=(-0.723784646391-0.919899167138j)*x_ref[0] + ((0.613956169435-0.620037761562j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.309968126717+0.434051255487j)*x[0] + ((-0.839582761055+0.808262163988j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.309968126717+0.434051255487j)*x_ref[0] + ((-0.839582761055+0.808262163988j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(-0.642642491979-0.747809918558j)*x[0] + ((0.697836583681-0.291510279186j))*x[1]
+        ref[(3, 2, 0, 0)]=(-0.642642491979-0.747809918558j)*x_ref[0] + ((0.697836583681-0.291510279186j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(-0.141645823761+0.807946733157j)*x[0] + ((-0.572015363496-0.0271347412295j))*x[1]
+        ref[(3, 2, 0, 1)]=(-0.141645823761+0.807946733157j)*x_ref[0] + ((-0.572015363496-0.0271347412295j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.648034231772+0.801685984977j)*x[0] + ((-0.842871266472-0.174679829348j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.648034231772+0.801685984977j)*x_ref[0] + ((-0.842871266472-0.174679829348j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(-0.755458271089-0.700941207229j)*x[0] + ((-0.835332902458+0.146145268585j))*x[1]
+        ref[(3, 2, 1, 1)]=(-0.755458271089-0.700941207229j)*x_ref[0] + ((-0.835332902458+0.146145268585j))*x_ref[1]
+        arg[(3, 3, 0, 0)]=(-0.18975231827+0.529814551948j)*x[0] + ((-0.212964807735+0.934242986342j))*x[1]
+        ref[(3, 3, 0, 0)]=(-0.18975231827+0.529814551948j)*x_ref[0] + ((-0.212964807735+0.934242986342j))*x_ref[1]
+        arg[(3, 3, 0, 1)]=(0.80358275417-0.596733386873j)*x[0] + ((-0.994101892659+0.143272925423j))*x[1]
+        ref[(3, 3, 0, 1)]=(0.80358275417-0.596733386873j)*x_ref[0] + ((-0.994101892659+0.143272925423j))*x_ref[1]
+        arg[(3, 3, 1, 0)]=(-0.985371326665+0.963287382827j)*x[0] + ((0.22031718328+0.440560506071j))*x[1]
+        ref[(3, 3, 1, 0)]=(-0.985371326665+0.963287382827j)*x_ref[0] + ((0.22031718328+0.440560506071j))*x_ref[1]
+        arg[(3, 3, 1, 1)]=(-0.174378795308-0.627520751925j)*x[0] + ((-0.102002056329+0.337227865243j))*x[1]
+        ref[(3, 3, 1, 1)]=(-0.174378795308-0.627520751925j)*x_ref[0] + ((-0.102002056329+0.337227865243j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.499400721948-0.213328461205j)*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.499400721948-0.213328461205j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.625064718439+0.208489975289j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.625064718439+0.208489975289j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.305490348848-0.380960961197j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.305490348848-0.380960961197j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.113337497729-0.47398967188j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.113337497729-0.47398967188j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.831106900302-0.278320288758j)*x[2]
+            ref[(0, 1, 0, 0)]+=(0.831106900302-0.278320288758j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.738770602504-0.369222735715j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.738770602504-0.369222735715j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.030337632602+0.933766463408j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.030337632602+0.933766463408j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.530882994946-0.178865413204j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.530882994946-0.178865413204j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.294835606629-0.670100417131j)*x[2]
+            ref[(0, 2, 0, 0)]+=(0.294835606629-0.670100417131j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.423454981963-0.801066456951j)*x[2]
+            ref[(0, 2, 0, 1)]+=(0.423454981963-0.801066456951j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.916387087602+0.726771545729j)*x[2]
+            ref[(0, 2, 1, 0)]+=(0.916387087602+0.726771545729j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.820880509147-0.252159513704j)*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.820880509147-0.252159513704j)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.374887585709-0.724915844018j)*x[2]
+            ref[(0, 3, 0, 0)]+=(0.374887585709-0.724915844018j)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.416787004641+0.570322268165j)*x[2]
+            ref[(0, 3, 0, 1)]+=(0.416787004641+0.570322268165j)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.0532375261124-0.686105164733j)*x[2]
+            ref[(0, 3, 1, 0)]+=(0.0532375261124-0.686105164733j)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.528994699708+0.873517519892j)*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.528994699708+0.873517519892j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.35430324071+0.550472656053j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.35430324071+0.550472656053j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.547555100114+0.126991897071j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.547555100114+0.126991897071j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.446165822793-0.861464979516j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.446165822793-0.861464979516j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.673607592318+0.874508302632j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.673607592318+0.874508302632j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.505978299517+0.789199689134j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.505978299517+0.789199689134j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.394836491811-0.0234705775244j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.394836491811-0.0234705775244j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.893239920062-0.169961946669j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.893239920062-0.169961946669j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.43673424837+0.655668742961j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.43673424837+0.655668742961j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.413453534405+0.406328065391j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.413453534405+0.406328065391j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.166043559938+0.813801420854j)*x[2]
+            ref[(1, 2, 0, 1)]+=(0.166043559938+0.813801420854j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.628379873124-0.320745203949j)*x[2]
+            ref[(1, 2, 1, 0)]+=(0.628379873124-0.320745203949j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.372781118101-0.349652727467j)*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.372781118101-0.349652727467j)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.907395837667+0.241817585482j)*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.907395837667+0.241817585482j)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.934052715215-0.401698058293j)*x[2]
+            ref[(1, 3, 0, 1)]+=(0.934052715215-0.401698058293j)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.278977830945-0.857371620498j)*x[2]
+            ref[(1, 3, 1, 0)]+=(0.278977830945-0.857371620498j)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.273521501252+0.132186446777j)*x[2]
+            ref[(1, 3, 1, 1)]+=(0.273521501252+0.132186446777j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.523817287835+0.57424631311j)*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.523817287835+0.57424631311j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.0333929313067-0.0780535013863j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.0333929313067-0.0780535013863j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.941471006279+0.360745976292j)*x[2]
+            ref[(2, 0, 1, 0)]+=(0.941471006279+0.360745976292j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.163065174707+0.705951256441j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.163065174707+0.705951256441j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.680533024592+0.0723974090894j)*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.680533024592+0.0723974090894j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.570708099082+0.738676951119j)*x[2]
+            ref[(2, 1, 0, 1)]+=(0.570708099082+0.738676951119j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.0215314785302-0.820282442532j)*x[2]
+            ref[(2, 1, 1, 0)]+=(0.0215314785302-0.820282442532j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.662270635564+0.089855236186j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.662270635564+0.089855236186j)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.328562529691-0.30316074499j)*x[2]
+            ref[(2, 2, 0, 0)]+=(0.328562529691-0.30316074499j)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.285015350875+0.86990200552j)*x[2]
+            ref[(2, 2, 0, 1)]+=(0.285015350875+0.86990200552j)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.914129012399+0.325233132766j)*x[2]
+            ref[(2, 2, 1, 0)]+=(0.914129012399+0.325233132766j)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.0804180516059-0.848717371878j)*x[2]
+            ref[(2, 2, 1, 1)]+=(0.0804180516059-0.848717371878j)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(0.0113965713715-0.160530969763j)*x[2]
+            ref[(2, 3, 0, 0)]+=(0.0113965713715-0.160530969763j)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(0.677862927483+0.343225997631j)*x[2]
+            ref[(2, 3, 0, 1)]+=(0.677862927483+0.343225997631j)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(0.59873722774+0.534210986486j)*x[2]
+            ref[(2, 3, 1, 0)]+=(0.59873722774+0.534210986486j)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(-0.730013831883-0.226040556866j)*x[2]
+            ref[(2, 3, 1, 1)]+=(-0.730013831883-0.226040556866j)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.562737663929+0.22314349568j)*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.562737663929+0.22314349568j)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.2398522475-0.545882983867j)*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.2398522475-0.545882983867j)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.246264986916-0.98849971453j)*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.246264986916-0.98849971453j)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.867149052116+0.23526757427j)*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.867149052116+0.23526757427j)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.227792217011+0.0665501273033j)*x[2]
+            ref[(3, 1, 0, 0)]+=(0.227792217011+0.0665501273033j)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.187623347917+0.240308094624j)*x[2]
+            ref[(3, 1, 0, 1)]+=(0.187623347917+0.240308094624j)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.326930338605-0.305266099301j)*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.326930338605-0.305266099301j)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.109689397681+0.604053449829j)*x[2]
+            ref[(3, 1, 1, 1)]+=(0.109689397681+0.604053449829j)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(0.537962135188-0.209055274935j)*x[2]
+            ref[(3, 2, 0, 0)]+=(0.537962135188-0.209055274935j)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(-0.2368555746+0.679951229892j)*x[2]
+            ref[(3, 2, 0, 1)]+=(-0.2368555746+0.679951229892j)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.255912389905-0.959954347932j)*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.255912389905-0.959954347932j)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.999004267177-0.847960462579j)*x[2]
+            ref[(3, 2, 1, 1)]+=(0.999004267177-0.847960462579j)*x_ref[2]
+            arg[(3, 3, 0, 0)]+=(-0.947804405971-0.916208234003j)*x[2]
+            ref[(3, 3, 0, 0)]+=(-0.947804405971-0.916208234003j)*x_ref[2]
+            arg[(3, 3, 0, 1)]+=(0.391840787139+0.013730490611j)*x[2]
+            ref[(3, 3, 0, 1)]+=(0.391840787139+0.013730490611j)*x_ref[2]
+            arg[(3, 3, 1, 0)]+=(-0.0556289973755-0.906923781994j)*x[2]
+            ref[(3, 3, 1, 0)]+=(-0.0556289973755-0.906923781994j)*x_ref[2]
+            arg[(3, 3, 1, 1)]+=(-0.75631579751-0.370090518879j)*x[2]
+            ref[(3, 3, 1, 1)]+=(-0.75631579751-0.370090518879j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.956135688969-0.888649396514j)*x[0] + ((0.53304939954-0.293041111034j))*x[1]
+        ref=(0.956135688969-0.888649396514j)*x_ref[0] + ((0.53304939954-0.293041111034j))*x_ref[1]
+        if dim==3:
+            arg+=((0.932641106868+0.328218798334j))*x[2]
+            ref+=((0.932641106868+0.328218798334j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.676365473391+0.026964439562j)*x[0] + ((0.738081555972+0.410408638293j))*x[1]
+        ref[(0,)]=(-0.676365473391+0.026964439562j)*x_ref[0] + ((0.738081555972+0.410408638293j))*x_ref[1]
+        arg[(1,)]=(-0.740195418762+0.256123096937j)*x[0] + ((0.960467453305-0.804164360479j))*x[1]
+        ref[(1,)]=(-0.740195418762+0.256123096937j)*x_ref[0] + ((0.960467453305-0.804164360479j))*x_ref[1]
+        arg[(2,)]=(-0.195654772705+0.578198584178j)*x[0] + ((0.866284703311+0.0322813865483j))*x[1]
+        ref[(2,)]=(-0.195654772705+0.578198584178j)*x_ref[0] + ((0.866284703311+0.0322813865483j))*x_ref[1]
+        arg[(3,)]=(-0.256342398747-0.557054414163j)*x[0] + ((0.719712751949+0.907363101608j))*x[1]
+        ref[(3,)]=(-0.256342398747-0.557054414163j)*x_ref[0] + ((0.719712751949+0.907363101608j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.960506507628-0.568212037665j)*x[2]
+            ref[(0,)]+=(-0.960506507628-0.568212037665j)*x_ref[2]
+            arg[(1,)]+=(0.56575193406-0.0893103781036j)*x[2]
+            ref[(1,)]+=(0.56575193406-0.0893103781036j)*x_ref[2]
+            arg[(2,)]+=(-0.217835806634-0.165302160825j)*x[2]
+            ref[(2,)]+=(-0.217835806634-0.165302160825j)*x_ref[2]
+            arg[(3,)]+=(0.699723858116-0.661578730153j)*x[2]
+            ref[(3,)]+=(0.699723858116-0.661578730153j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(-0.240814301918-0.887048322781j)*x[0] + ((-0.94427004856+0.733628508615j))*x[1]
+        ref[(0, 0)]=(-0.240814301918-0.887048322781j)*x_ref[0] + ((-0.94427004856+0.733628508615j))*x_ref[1]
+        arg[(0, 1)]=(0.951750236869-0.198282416579j)*x[0] + ((-0.565111450398-0.53776480686j))*x[1]
+        ref[(0, 1)]=(0.951750236869-0.198282416579j)*x_ref[0] + ((-0.565111450398-0.53776480686j))*x_ref[1]
+        arg[(0, 2)]=(-0.730679847433+0.73129906158j)*x[0] + ((-0.234023738555-0.577077014762j))*x[1]
+        ref[(0, 2)]=(-0.730679847433+0.73129906158j)*x_ref[0] + ((-0.234023738555-0.577077014762j))*x_ref[1]
+        arg[(0, 3)]=(-0.901316318034+0.0104211731045j)*x[0] + ((0.815947050202+0.388281301358j))*x[1]
+        ref[(0, 3)]=(-0.901316318034+0.0104211731045j)*x_ref[0] + ((0.815947050202+0.388281301358j))*x_ref[1]
+        arg[(1, 0)]=(-0.952994123338+0.562259045344j)*x[0] + ((-0.12672422522+0.759397064752j))*x[1]
+        ref[(1, 0)]=(-0.952994123338+0.562259045344j)*x_ref[0] + ((-0.12672422522+0.759397064752j))*x_ref[1]
+        arg[(1, 1)]=(-0.0876028285468+0.0962299659881j)*x[0] + ((-0.453954817625+0.531446963363j))*x[1]
+        ref[(1, 1)]=(-0.0876028285468+0.0962299659881j)*x_ref[0] + ((-0.453954817625+0.531446963363j))*x_ref[1]
+        arg[(1, 2)]=(-0.714238899701-0.258108459031j)*x[0] + ((0.413260215386-0.501445856003j))*x[1]
+        ref[(1, 2)]=(-0.714238899701-0.258108459031j)*x_ref[0] + ((0.413260215386-0.501445856003j))*x_ref[1]
+        arg[(1, 3)]=(0.334140526046+0.720690598314j)*x[0] + ((0.0649585175003+0.385287340639j))*x[1]
+        ref[(1, 3)]=(0.334140526046+0.720690598314j)*x_ref[0] + ((0.0649585175003+0.385287340639j))*x_ref[1]
+        arg[(2, 0)]=(-0.105268261113-0.0413867431832j)*x[0] + ((0.120272690539+0.795458235225j))*x[1]
+        ref[(2, 0)]=(-0.105268261113-0.0413867431832j)*x_ref[0] + ((0.120272690539+0.795458235225j))*x_ref[1]
+        arg[(2, 1)]=(-0.0677382511323+0.714048551423j)*x[0] + ((-0.817966815779-0.211792032305j))*x[1]
+        ref[(2, 1)]=(-0.0677382511323+0.714048551423j)*x_ref[0] + ((-0.817966815779-0.211792032305j))*x_ref[1]
+        arg[(2, 2)]=(0.622366928452+0.873320752694j)*x[0] + ((0.803727816121+0.848889258707j))*x[1]
+        ref[(2, 2)]=(0.622366928452+0.873320752694j)*x_ref[0] + ((0.803727816121+0.848889258707j))*x_ref[1]
+        arg[(2, 3)]=(0.0054662692769-0.312635145554j)*x[0] + ((0.49876567853-0.475582064542j))*x[1]
+        ref[(2, 3)]=(0.0054662692769-0.312635145554j)*x_ref[0] + ((0.49876567853-0.475582064542j))*x_ref[1]
+        arg[(3, 0)]=(0.486375167179+0.887687109909j)*x[0] + ((-0.79938352603+0.203798243441j))*x[1]
+        ref[(3, 0)]=(0.486375167179+0.887687109909j)*x_ref[0] + ((-0.79938352603+0.203798243441j))*x_ref[1]
+        arg[(3, 1)]=(0.0942996746761-0.737976343541j)*x[0] + ((-0.682086475874+0.469234521125j))*x[1]
+        ref[(3, 1)]=(0.0942996746761-0.737976343541j)*x_ref[0] + ((-0.682086475874+0.469234521125j))*x_ref[1]
+        arg[(3, 2)]=(-0.104611226434+0.433052142302j)*x[0] + ((-0.620801318245+0.581906629262j))*x[1]
+        ref[(3, 2)]=(-0.104611226434+0.433052142302j)*x_ref[0] + ((-0.620801318245+0.581906629262j))*x_ref[1]
+        arg[(3, 3)]=(-0.0381487687319+0.528562401891j)*x[0] + ((0.267413230144-0.481841205959j))*x[1]
+        ref[(3, 3)]=(-0.0381487687319+0.528562401891j)*x_ref[0] + ((0.267413230144-0.481841205959j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.185982183399-0.305705949308j)*x[2]
+            ref[(0, 0)]+=(0.185982183399-0.305705949308j)*x_ref[2]
+            arg[(0, 1)]+=(-0.141436503698+0.193619656302j)*x[2]
+            ref[(0, 1)]+=(-0.141436503698+0.193619656302j)*x_ref[2]
+            arg[(0, 2)]+=(-0.216326852087+0.965855929256j)*x[2]
+            ref[(0, 2)]+=(-0.216326852087+0.965855929256j)*x_ref[2]
+            arg[(0, 3)]+=(0.810814289151-0.74914860825j)*x[2]
+            ref[(0, 3)]+=(0.810814289151-0.74914860825j)*x_ref[2]
+            arg[(1, 0)]+=(0.564396313381+0.238500666079j)*x[2]
+            ref[(1, 0)]+=(0.564396313381+0.238500666079j)*x_ref[2]
+            arg[(1, 1)]+=(0.309539600916+0.806779176839j)*x[2]
+            ref[(1, 1)]+=(0.309539600916+0.806779176839j)*x_ref[2]
+            arg[(1, 2)]+=(0.859245563127-0.182915908656j)*x[2]
+            ref[(1, 2)]+=(0.859245563127-0.182915908656j)*x_ref[2]
+            arg[(1, 3)]+=(-0.404597139967-0.709465688144j)*x[2]
+            ref[(1, 3)]+=(-0.404597139967-0.709465688144j)*x_ref[2]
+            arg[(2, 0)]+=(0.0574126757898-0.812974401469j)*x[2]
+            ref[(2, 0)]+=(0.0574126757898-0.812974401469j)*x_ref[2]
+            arg[(2, 1)]+=(-0.372680946595+0.525574883425j)*x[2]
+            ref[(2, 1)]+=(-0.372680946595+0.525574883425j)*x_ref[2]
+            arg[(2, 2)]+=(0.780479796466+0.356093736067j)*x[2]
+            ref[(2, 2)]+=(0.780479796466+0.356093736067j)*x_ref[2]
+            arg[(2, 3)]+=(0.693713947316-0.564220680676j)*x[2]
+            ref[(2, 3)]+=(0.693713947316-0.564220680676j)*x_ref[2]
+            arg[(3, 0)]+=(-0.540930445245-0.0860915987224j)*x[2]
+            ref[(3, 0)]+=(-0.540930445245-0.0860915987224j)*x_ref[2]
+            arg[(3, 1)]+=(0.862068251052-0.0586224025383j)*x[2]
+            ref[(3, 1)]+=(0.862068251052-0.0586224025383j)*x_ref[2]
+            arg[(3, 2)]+=(0.225903422934-0.352563992518j)*x[2]
+            ref[(3, 2)]+=(0.225903422934-0.352563992518j)*x_ref[2]
+            arg[(3, 3)]+=(-0.29630855462+0.720657827833j)*x[2]
+            ref[(3, 3)]+=(-0.29630855462+0.720657827833j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.517019132757+0.0411478432118j)*x[0] + ((-0.67360762307+0.279125203116j))*x[1]
+        ref[(0, 0, 0)]=(-0.517019132757+0.0411478432118j)*x_ref[0] + ((-0.67360762307+0.279125203116j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.124589846605+0.557248664247j)*x[0] + ((0.532621424649+0.763613872005j))*x[1]
+        ref[(0, 0, 1)]=(-0.124589846605+0.557248664247j)*x_ref[0] + ((0.532621424649+0.763613872005j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.732576259178+0.113168427138j)*x[0] + ((0.72102378097+0.0209588283052j))*x[1]
+        ref[(0, 0, 2)]=(0.732576259178+0.113168427138j)*x_ref[0] + ((0.72102378097+0.0209588283052j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.579825992545-0.785635343373j)*x[0] + ((0.712491553075+0.996233996998j))*x[1]
+        ref[(0, 0, 3)]=(0.579825992545-0.785635343373j)*x_ref[0] + ((0.712491553075+0.996233996998j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.800836795034-0.634897823962j)*x[0] + ((0.972067870477-0.844485611173j))*x[1]
+        ref[(0, 1, 0)]=(0.800836795034-0.634897823962j)*x_ref[0] + ((0.972067870477-0.844485611173j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.453682298889-0.693767806482j)*x[0] + ((-0.568890106316+0.694978038622j))*x[1]
+        ref[(0, 1, 1)]=(-0.453682298889-0.693767806482j)*x_ref[0] + ((-0.568890106316+0.694978038622j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.210710503482-0.851549757764j)*x[0] + ((-0.744577614128-0.210047292554j))*x[1]
+        ref[(0, 1, 2)]=(0.210710503482-0.851549757764j)*x_ref[0] + ((-0.744577614128-0.210047292554j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.797940193748-0.771551044584j)*x[0] + ((0.674095648515+0.68423625466j))*x[1]
+        ref[(0, 1, 3)]=(0.797940193748-0.771551044584j)*x_ref[0] + ((0.674095648515+0.68423625466j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.555465149174+0.618636665679j)*x[0] + ((0.63989710783-0.0151563088024j))*x[1]
+        ref[(0, 2, 0)]=(0.555465149174+0.618636665679j)*x_ref[0] + ((0.63989710783-0.0151563088024j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.605659267636+0.181966640686j)*x[0] + ((0.123965761776-0.928558222444j))*x[1]
+        ref[(0, 2, 1)]=(-0.605659267636+0.181966640686j)*x_ref[0] + ((0.123965761776-0.928558222444j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.788152198497+0.355851460002j)*x[0] + ((-0.520529800821+0.219118481826j))*x[1]
+        ref[(0, 2, 2)]=(0.788152198497+0.355851460002j)*x_ref[0] + ((-0.520529800821+0.219118481826j))*x_ref[1]
+        arg[(0, 2, 3)]=(-0.00507640578008-0.32311437668j)*x[0] + ((0.824218631132-0.343211895061j))*x[1]
+        ref[(0, 2, 3)]=(-0.00507640578008-0.32311437668j)*x_ref[0] + ((0.824218631132-0.343211895061j))*x_ref[1]
+        arg[(0, 3, 0)]=(0.678522856904+0.840780763344j)*x[0] + ((0.888945936183+0.327696608344j))*x[1]
+        ref[(0, 3, 0)]=(0.678522856904+0.840780763344j)*x_ref[0] + ((0.888945936183+0.327696608344j))*x_ref[1]
+        arg[(0, 3, 1)]=(0.105188395535+0.176806147053j)*x[0] + ((0.919683612001+0.0627413902262j))*x[1]
+        ref[(0, 3, 1)]=(0.105188395535+0.176806147053j)*x_ref[0] + ((0.919683612001+0.0627413902262j))*x_ref[1]
+        arg[(0, 3, 2)]=(-0.413231823874-0.50126060347j)*x[0] + ((0.70387905974-0.243636923591j))*x[1]
+        ref[(0, 3, 2)]=(-0.413231823874-0.50126060347j)*x_ref[0] + ((0.70387905974-0.243636923591j))*x_ref[1]
+        arg[(0, 3, 3)]=(-0.759564236541-0.0766084890227j)*x[0] + ((0.56728416833-0.907809352761j))*x[1]
+        ref[(0, 3, 3)]=(-0.759564236541-0.0766084890227j)*x_ref[0] + ((0.56728416833-0.907809352761j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.389544046393-0.536570286414j)*x[0] + ((-0.632664844328-0.334709633548j))*x[1]
+        ref[(1, 0, 0)]=(0.389544046393-0.536570286414j)*x_ref[0] + ((-0.632664844328-0.334709633548j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.763297700707-0.943017886296j)*x[0] + ((0.790761128449+0.488199059519j))*x[1]
+        ref[(1, 0, 1)]=(0.763297700707-0.943017886296j)*x_ref[0] + ((0.790761128449+0.488199059519j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.103192883821-0.0525844618309j)*x[0] + ((0.131983458869+0.386639645954j))*x[1]
+        ref[(1, 0, 2)]=(-0.103192883821-0.0525844618309j)*x_ref[0] + ((0.131983458869+0.386639645954j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.0826075576447+0.00983939500647j)*x[0] + ((0.176616321969+0.759316257626j))*x[1]
+        ref[(1, 0, 3)]=(0.0826075576447+0.00983939500647j)*x_ref[0] + ((0.176616321969+0.759316257626j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.34116921179+0.516326245453j)*x[0] + ((-0.00927082801101+0.117162811554j))*x[1]
+        ref[(1, 1, 0)]=(0.34116921179+0.516326245453j)*x_ref[0] + ((-0.00927082801101+0.117162811554j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.67039457395+0.55587089765j)*x[0] + ((0.883048106926+0.316339567934j))*x[1]
+        ref[(1, 1, 1)]=(-0.67039457395+0.55587089765j)*x_ref[0] + ((0.883048106926+0.316339567934j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.109251046627-0.162394844203j)*x[0] + ((-0.487548952731+0.108205735108j))*x[1]
+        ref[(1, 1, 2)]=(-0.109251046627-0.162394844203j)*x_ref[0] + ((-0.487548952731+0.108205735108j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.287220039771+0.614387975755j)*x[0] + ((-0.174688763891+0.0072761637379j))*x[1]
+        ref[(1, 1, 3)]=(0.287220039771+0.614387975755j)*x_ref[0] + ((-0.174688763891+0.0072761637379j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.896841001825-0.865425921332j)*x[0] + ((-0.961175659376-0.368184128575j))*x[1]
+        ref[(1, 2, 0)]=(0.896841001825-0.865425921332j)*x_ref[0] + ((-0.961175659376-0.368184128575j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.755680515772-0.507197687065j)*x[0] + ((-0.709344806516-0.920845573965j))*x[1]
+        ref[(1, 2, 1)]=(0.755680515772-0.507197687065j)*x_ref[0] + ((-0.709344806516-0.920845573965j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.0415026038872+0.745319393807j)*x[0] + ((0.52471972023-0.77451954985j))*x[1]
+        ref[(1, 2, 2)]=(0.0415026038872+0.745319393807j)*x_ref[0] + ((0.52471972023-0.77451954985j))*x_ref[1]
+        arg[(1, 2, 3)]=(0.102667784221-0.79465854439j)*x[0] + ((-0.0374534414289-0.776878196505j))*x[1]
+        ref[(1, 2, 3)]=(0.102667784221-0.79465854439j)*x_ref[0] + ((-0.0374534414289-0.776878196505j))*x_ref[1]
+        arg[(1, 3, 0)]=(-0.891244055516-0.686348645643j)*x[0] + ((-0.0905027881223+0.29571242476j))*x[1]
+        ref[(1, 3, 0)]=(-0.891244055516-0.686348645643j)*x_ref[0] + ((-0.0905027881223+0.29571242476j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.0862546492442+0.279187742231j)*x[0] + ((0.0389829739671+0.624044228486j))*x[1]
+        ref[(1, 3, 1)]=(0.0862546492442+0.279187742231j)*x_ref[0] + ((0.0389829739671+0.624044228486j))*x_ref[1]
+        arg[(1, 3, 2)]=(0.299542311793-0.125307879713j)*x[0] + ((-0.320696461928-0.650360617696j))*x[1]
+        ref[(1, 3, 2)]=(0.299542311793-0.125307879713j)*x_ref[0] + ((-0.320696461928-0.650360617696j))*x_ref[1]
+        arg[(1, 3, 3)]=(-0.105536808495+0.171119047394j)*x[0] + ((0.00341297340795+0.66820604292j))*x[1]
+        ref[(1, 3, 3)]=(-0.105536808495+0.171119047394j)*x_ref[0] + ((0.00341297340795+0.66820604292j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.964296450656+0.559579037774j)*x[0] + ((0.885144817158+0.888746182718j))*x[1]
+        ref[(2, 0, 0)]=(0.964296450656+0.559579037774j)*x_ref[0] + ((0.885144817158+0.888746182718j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.0403137184293+0.930216003666j)*x[0] + ((0.441838342351-0.993260198587j))*x[1]
+        ref[(2, 0, 1)]=(-0.0403137184293+0.930216003666j)*x_ref[0] + ((0.441838342351-0.993260198587j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.219263151914-0.22575897916j)*x[0] + ((0.771168322513-0.659136292791j))*x[1]
+        ref[(2, 0, 2)]=(-0.219263151914-0.22575897916j)*x_ref[0] + ((0.771168322513-0.659136292791j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.340394463537+0.262828508228j)*x[0] + ((-0.597562252566+0.959722728957j))*x[1]
+        ref[(2, 0, 3)]=(-0.340394463537+0.262828508228j)*x_ref[0] + ((-0.597562252566+0.959722728957j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.320898906492+0.471008787333j)*x[0] + ((-0.513041382336+0.27994583967j))*x[1]
+        ref[(2, 1, 0)]=(0.320898906492+0.471008787333j)*x_ref[0] + ((-0.513041382336+0.27994583967j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.965948093145-0.59421473828j)*x[0] + ((0.0104125801151-0.0716953285501j))*x[1]
+        ref[(2, 1, 1)]=(0.965948093145-0.59421473828j)*x_ref[0] + ((0.0104125801151-0.0716953285501j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.875626416269-0.483029743794j)*x[0] + ((0.5294927119-0.222066452463j))*x[1]
+        ref[(2, 1, 2)]=(0.875626416269-0.483029743794j)*x_ref[0] + ((0.5294927119-0.222066452463j))*x_ref[1]
+        arg[(2, 1, 3)]=(0.0999124353419-0.333161943223j)*x[0] + ((-0.992822998466+0.950251870679j))*x[1]
+        ref[(2, 1, 3)]=(0.0999124353419-0.333161943223j)*x_ref[0] + ((-0.992822998466+0.950251870679j))*x_ref[1]
+        arg[(2, 2, 0)]=(0.54392028184+0.98979407967j)*x[0] + ((-0.319235825891-0.62872511411j))*x[1]
+        ref[(2, 2, 0)]=(0.54392028184+0.98979407967j)*x_ref[0] + ((-0.319235825891-0.62872511411j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.69517462555-0.0142696334722j)*x[0] + ((0.102170683997+0.0668800373628j))*x[1]
+        ref[(2, 2, 1)]=(0.69517462555-0.0142696334722j)*x_ref[0] + ((0.102170683997+0.0668800373628j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.060970161035+0.595451555144j)*x[0] + ((-0.557705846639-0.811235387541j))*x[1]
+        ref[(2, 2, 2)]=(0.060970161035+0.595451555144j)*x_ref[0] + ((-0.557705846639-0.811235387541j))*x_ref[1]
+        arg[(2, 2, 3)]=(0.992225454778+0.19026241092j)*x[0] + ((-0.093126990454+0.526403844525j))*x[1]
+        ref[(2, 2, 3)]=(0.992225454778+0.19026241092j)*x_ref[0] + ((-0.093126990454+0.526403844525j))*x_ref[1]
+        arg[(2, 3, 0)]=(0.970175960753+0.786676051734j)*x[0] + ((-0.364782340243+0.47904073928j))*x[1]
+        ref[(2, 3, 0)]=(0.970175960753+0.786676051734j)*x_ref[0] + ((-0.364782340243+0.47904073928j))*x_ref[1]
+        arg[(2, 3, 1)]=(0.137976997314-0.610962136233j)*x[0] + ((-0.622601278281-0.985515566683j))*x[1]
+        ref[(2, 3, 1)]=(0.137976997314-0.610962136233j)*x_ref[0] + ((-0.622601278281-0.985515566683j))*x_ref[1]
+        arg[(2, 3, 2)]=(0.392708640903-0.316446592408j)*x[0] + ((-0.129882846053-0.508264027898j))*x[1]
+        ref[(2, 3, 2)]=(0.392708640903-0.316446592408j)*x_ref[0] + ((-0.129882846053-0.508264027898j))*x_ref[1]
+        arg[(2, 3, 3)]=(-0.337155484352-0.818811951512j)*x[0] + ((0.0202008790186+0.832201857322j))*x[1]
+        ref[(2, 3, 3)]=(-0.337155484352-0.818811951512j)*x_ref[0] + ((0.0202008790186+0.832201857322j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.407402681834+0.685970554947j)*x[0] + ((-0.80606791349-0.932695515827j))*x[1]
+        ref[(3, 0, 0)]=(0.407402681834+0.685970554947j)*x_ref[0] + ((-0.80606791349-0.932695515827j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.685715978096-0.427598273017j)*x[0] + ((0.798732489652-0.275089186832j))*x[1]
+        ref[(3, 0, 1)]=(0.685715978096-0.427598273017j)*x_ref[0] + ((0.798732489652-0.275089186832j))*x_ref[1]
+        arg[(3, 0, 2)]=(-0.33057119352+0.44918408477j)*x[0] + ((-0.343302470351-0.584948373425j))*x[1]
+        ref[(3, 0, 2)]=(-0.33057119352+0.44918408477j)*x_ref[0] + ((-0.343302470351-0.584948373425j))*x_ref[1]
+        arg[(3, 0, 3)]=(-0.519828556865+0.738132301546j)*x[0] + ((0.837388539874+0.302159115772j))*x[1]
+        ref[(3, 0, 3)]=(-0.519828556865+0.738132301546j)*x_ref[0] + ((0.837388539874+0.302159115772j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.26008058546-0.414309167102j)*x[0] + ((0.198110560517+0.909722810027j))*x[1]
+        ref[(3, 1, 0)]=(-0.26008058546-0.414309167102j)*x_ref[0] + ((0.198110560517+0.909722810027j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.163033344173-0.591969668704j)*x[0] + ((0.440480608581-0.489887683155j))*x[1]
+        ref[(3, 1, 1)]=(-0.163033344173-0.591969668704j)*x_ref[0] + ((0.440480608581-0.489887683155j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.501495782934+0.111908752543j)*x[0] + ((0.431023764569-0.00172648928322j))*x[1]
+        ref[(3, 1, 2)]=(-0.501495782934+0.111908752543j)*x_ref[0] + ((0.431023764569-0.00172648928322j))*x_ref[1]
+        arg[(3, 1, 3)]=(0.745573961774+0.53552447765j)*x[0] + ((0.740753502699-0.0223767525527j))*x[1]
+        ref[(3, 1, 3)]=(0.745573961774+0.53552447765j)*x_ref[0] + ((0.740753502699-0.0223767525527j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.419343798909+0.745113849314j)*x[0] + ((0.603728913355+0.0375624029137j))*x[1]
+        ref[(3, 2, 0)]=(0.419343798909+0.745113849314j)*x_ref[0] + ((0.603728913355+0.0375624029137j))*x_ref[1]
+        arg[(3, 2, 1)]=(-0.556756908899+0.909868478186j)*x[0] + ((0.769430023616-0.0209516928675j))*x[1]
+        ref[(3, 2, 1)]=(-0.556756908899+0.909868478186j)*x_ref[0] + ((0.769430023616-0.0209516928675j))*x_ref[1]
+        arg[(3, 2, 2)]=(-0.218539909726-0.975193729328j)*x[0] + ((0.264192636771+0.561920230991j))*x[1]
+        ref[(3, 2, 2)]=(-0.218539909726-0.975193729328j)*x_ref[0] + ((0.264192636771+0.561920230991j))*x_ref[1]
+        arg[(3, 2, 3)]=(-0.598705429851+0.731330184238j)*x[0] + ((0.354975442866+0.700725374263j))*x[1]
+        ref[(3, 2, 3)]=(-0.598705429851+0.731330184238j)*x_ref[0] + ((0.354975442866+0.700725374263j))*x_ref[1]
+        arg[(3, 3, 0)]=(-0.196301450151-0.973357795606j)*x[0] + ((0.00248994110462-0.628259880656j))*x[1]
+        ref[(3, 3, 0)]=(-0.196301450151-0.973357795606j)*x_ref[0] + ((0.00248994110462-0.628259880656j))*x_ref[1]
+        arg[(3, 3, 1)]=(-0.592629613065-0.97899396468j)*x[0] + ((0.468375316816-0.385966373649j))*x[1]
+        ref[(3, 3, 1)]=(-0.592629613065-0.97899396468j)*x_ref[0] + ((0.468375316816-0.385966373649j))*x_ref[1]
+        arg[(3, 3, 2)]=(-0.84776944341+0.940660143578j)*x[0] + ((-0.650517654443-0.647058928178j))*x[1]
+        ref[(3, 3, 2)]=(-0.84776944341+0.940660143578j)*x_ref[0] + ((-0.650517654443-0.647058928178j))*x_ref[1]
+        arg[(3, 3, 3)]=(-0.460172866295+0.470159947583j)*x[0] + ((-0.0875053819816+0.431674703563j))*x[1]
+        ref[(3, 3, 3)]=(-0.460172866295+0.470159947583j)*x_ref[0] + ((-0.0875053819816+0.431674703563j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.319288548595+0.376000644077j)*x[2]
+            ref[(0, 0, 0)]+=(0.319288548595+0.376000644077j)*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.775024215675-0.200319765257j)*x[2]
+            ref[(0, 0, 1)]+=(-0.775024215675-0.200319765257j)*x_ref[2]
+            arg[(0, 0, 2)]+=(0.19134749591-0.466768002647j)*x[2]
+            ref[(0, 0, 2)]+=(0.19134749591-0.466768002647j)*x_ref[2]
+            arg[(0, 0, 3)]+=(0.638524573508+0.138066798366j)*x[2]
+            ref[(0, 0, 3)]+=(0.638524573508+0.138066798366j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.677828848532-0.963440374989j)*x[2]
+            ref[(0, 1, 0)]+=(0.677828848532-0.963440374989j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.643850785618+0.844406079708j)*x[2]
+            ref[(0, 1, 1)]+=(0.643850785618+0.844406079708j)*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.913896840369-0.500088012242j)*x[2]
+            ref[(0, 1, 2)]+=(-0.913896840369-0.500088012242j)*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.52448050739-0.910092824305j)*x[2]
+            ref[(0, 1, 3)]+=(-0.52448050739-0.910092824305j)*x_ref[2]
+            arg[(0, 2, 0)]+=(0.779930856009-0.78899907694j)*x[2]
+            ref[(0, 2, 0)]+=(0.779930856009-0.78899907694j)*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.221443895408+0.887783386826j)*x[2]
+            ref[(0, 2, 1)]+=(-0.221443895408+0.887783386826j)*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.424363440054-0.664115256745j)*x[2]
+            ref[(0, 2, 2)]+=(-0.424363440054-0.664115256745j)*x_ref[2]
+            arg[(0, 2, 3)]+=(0.710490830773+0.224297414627j)*x[2]
+            ref[(0, 2, 3)]+=(0.710490830773+0.224297414627j)*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.34238634217+0.947842610206j)*x[2]
+            ref[(0, 3, 0)]+=(-0.34238634217+0.947842610206j)*x_ref[2]
+            arg[(0, 3, 1)]+=(0.835456458957-0.348655017j)*x[2]
+            ref[(0, 3, 1)]+=(0.835456458957-0.348655017j)*x_ref[2]
+            arg[(0, 3, 2)]+=(-0.465250271495-0.556031229495j)*x[2]
+            ref[(0, 3, 2)]+=(-0.465250271495-0.556031229495j)*x_ref[2]
+            arg[(0, 3, 3)]+=(-0.57282111878-0.424317744709j)*x[2]
+            ref[(0, 3, 3)]+=(-0.57282111878-0.424317744709j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.0958370406222+0.760034972259j)*x[2]
+            ref[(1, 0, 0)]+=(0.0958370406222+0.760034972259j)*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.598636353977+0.774319392737j)*x[2]
+            ref[(1, 0, 1)]+=(-0.598636353977+0.774319392737j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.697919082029+0.867390934847j)*x[2]
+            ref[(1, 0, 2)]+=(0.697919082029+0.867390934847j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.756751754361+0.35510043052j)*x[2]
+            ref[(1, 0, 3)]+=(-0.756751754361+0.35510043052j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.303458283188+0.253024255045j)*x[2]
+            ref[(1, 1, 0)]+=(0.303458283188+0.253024255045j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.950509874111+0.660676996916j)*x[2]
+            ref[(1, 1, 1)]+=(0.950509874111+0.660676996916j)*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.186854085601-0.664355755808j)*x[2]
+            ref[(1, 1, 2)]+=(-0.186854085601-0.664355755808j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.28591539777-0.658624071423j)*x[2]
+            ref[(1, 1, 3)]+=(0.28591539777-0.658624071423j)*x_ref[2]
+            arg[(1, 2, 0)]+=(0.860576391568+0.220896098166j)*x[2]
+            ref[(1, 2, 0)]+=(0.860576391568+0.220896098166j)*x_ref[2]
+            arg[(1, 2, 1)]+=(0.88321894618-0.934742600827j)*x[2]
+            ref[(1, 2, 1)]+=(0.88321894618-0.934742600827j)*x_ref[2]
+            arg[(1, 2, 2)]+=(-0.885917028573-0.701862901649j)*x[2]
+            ref[(1, 2, 2)]+=(-0.885917028573-0.701862901649j)*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.489901586142-0.430962714786j)*x[2]
+            ref[(1, 2, 3)]+=(-0.489901586142-0.430962714786j)*x_ref[2]
+            arg[(1, 3, 0)]+=(0.83564240702+0.0093959075119j)*x[2]
+            ref[(1, 3, 0)]+=(0.83564240702+0.0093959075119j)*x_ref[2]
+            arg[(1, 3, 1)]+=(0.760631764934+0.466220578841j)*x[2]
+            ref[(1, 3, 1)]+=(0.760631764934+0.466220578841j)*x_ref[2]
+            arg[(1, 3, 2)]+=(-0.99765643139-0.151591399439j)*x[2]
+            ref[(1, 3, 2)]+=(-0.99765643139-0.151591399439j)*x_ref[2]
+            arg[(1, 3, 3)]+=(-0.0970464397322+0.752917425188j)*x[2]
+            ref[(1, 3, 3)]+=(-0.0970464397322+0.752917425188j)*x_ref[2]
+            arg[(2, 0, 0)]+=(0.340946191331-0.528625226127j)*x[2]
+            ref[(2, 0, 0)]+=(0.340946191331-0.528625226127j)*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.631991008454-0.695108480886j)*x[2]
+            ref[(2, 0, 1)]+=(-0.631991008454-0.695108480886j)*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.218700908626-0.270344822141j)*x[2]
+            ref[(2, 0, 2)]+=(-0.218700908626-0.270344822141j)*x_ref[2]
+            arg[(2, 0, 3)]+=(0.26708344971-0.501144710072j)*x[2]
+            ref[(2, 0, 3)]+=(0.26708344971-0.501144710072j)*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.587089128393+0.17602470657j)*x[2]
+            ref[(2, 1, 0)]+=(-0.587089128393+0.17602470657j)*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.424388632356+0.0806871542138j)*x[2]
+            ref[(2, 1, 1)]+=(-0.424388632356+0.0806871542138j)*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.815835943557+0.227059858739j)*x[2]
+            ref[(2, 1, 2)]+=(-0.815835943557+0.227059858739j)*x_ref[2]
+            arg[(2, 1, 3)]+=(0.748188608707-0.970608144862j)*x[2]
+            ref[(2, 1, 3)]+=(0.748188608707-0.970608144862j)*x_ref[2]
+            arg[(2, 2, 0)]+=(0.724354658657-0.703579971126j)*x[2]
+            ref[(2, 2, 0)]+=(0.724354658657-0.703579971126j)*x_ref[2]
+            arg[(2, 2, 1)]+=(0.479266622879-0.595241141127j)*x[2]
+            ref[(2, 2, 1)]+=(0.479266622879-0.595241141127j)*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.644332613063-0.184788371627j)*x[2]
+            ref[(2, 2, 2)]+=(-0.644332613063-0.184788371627j)*x_ref[2]
+            arg[(2, 2, 3)]+=(0.629840378422+0.448614406674j)*x[2]
+            ref[(2, 2, 3)]+=(0.629840378422+0.448614406674j)*x_ref[2]
+            arg[(2, 3, 0)]+=(0.275308346343-0.388896802638j)*x[2]
+            ref[(2, 3, 0)]+=(0.275308346343-0.388896802638j)*x_ref[2]
+            arg[(2, 3, 1)]+=(0.547683374312-0.802978452141j)*x[2]
+            ref[(2, 3, 1)]+=(0.547683374312-0.802978452141j)*x_ref[2]
+            arg[(2, 3, 2)]+=(0.776922529994-0.68128923166j)*x[2]
+            ref[(2, 3, 2)]+=(0.776922529994-0.68128923166j)*x_ref[2]
+            arg[(2, 3, 3)]+=(0.0124469071206+0.262948107362j)*x[2]
+            ref[(2, 3, 3)]+=(0.0124469071206+0.262948107362j)*x_ref[2]
+            arg[(3, 0, 0)]+=(0.197526582884-0.387015909395j)*x[2]
+            ref[(3, 0, 0)]+=(0.197526582884-0.387015909395j)*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.688996225086+0.471510748271j)*x[2]
+            ref[(3, 0, 1)]+=(-0.688996225086+0.471510748271j)*x_ref[2]
+            arg[(3, 0, 2)]+=(-0.180998162336+0.74715169785j)*x[2]
+            ref[(3, 0, 2)]+=(-0.180998162336+0.74715169785j)*x_ref[2]
+            arg[(3, 0, 3)]+=(0.502260253214-0.443133185562j)*x[2]
+            ref[(3, 0, 3)]+=(0.502260253214-0.443133185562j)*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.279891811021+0.612207234573j)*x[2]
+            ref[(3, 1, 0)]+=(-0.279891811021+0.612207234573j)*x_ref[2]
+            arg[(3, 1, 1)]+=(0.513141660993+0.242853542448j)*x[2]
+            ref[(3, 1, 1)]+=(0.513141660993+0.242853542448j)*x_ref[2]
+            arg[(3, 1, 2)]+=(0.841180433655-0.117680879196j)*x[2]
+            ref[(3, 1, 2)]+=(0.841180433655-0.117680879196j)*x_ref[2]
+            arg[(3, 1, 3)]+=(0.258984868929-0.576810609777j)*x[2]
+            ref[(3, 1, 3)]+=(0.258984868929-0.576810609777j)*x_ref[2]
+            arg[(3, 2, 0)]+=(0.230376010348-0.748076905017j)*x[2]
+            ref[(3, 2, 0)]+=(0.230376010348-0.748076905017j)*x_ref[2]
+            arg[(3, 2, 1)]+=(0.504471492047+0.852561168691j)*x[2]
+            ref[(3, 2, 1)]+=(0.504471492047+0.852561168691j)*x_ref[2]
+            arg[(3, 2, 2)]+=(-0.143739510294+0.489877774134j)*x[2]
+            ref[(3, 2, 2)]+=(-0.143739510294+0.489877774134j)*x_ref[2]
+            arg[(3, 2, 3)]+=(0.563099000864-0.32337637509j)*x[2]
+            ref[(3, 2, 3)]+=(0.563099000864-0.32337637509j)*x_ref[2]
+            arg[(3, 3, 0)]+=(0.341476149338+0.394989240017j)*x[2]
+            ref[(3, 3, 0)]+=(0.341476149338+0.394989240017j)*x_ref[2]
+            arg[(3, 3, 1)]+=(-0.45518153863-0.353844743387j)*x[2]
+            ref[(3, 3, 1)]+=(-0.45518153863-0.353844743387j)*x_ref[2]
+            arg[(3, 3, 2)]+=(0.0593971057081-0.0634767231609j)*x[2]
+            ref[(3, 3, 2)]+=(0.0593971057081-0.0634767231609j)*x_ref[2]
+            arg[(3, 3, 3)]+=(0.158841179464-0.890197125947j)*x[2]
+            ref[(3, 3, 3)]+=(0.158841179464-0.890197125947j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3, 4),w)
+        ref = Data(0,(2, 2, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.641078084577+0.918973768016j)*x[0] + ((0.261234555848+0.949787092528j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.641078084577+0.918973768016j)*x_ref[0] + ((0.261234555848+0.949787092528j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.655634800965-0.350233430487j)*x[0] + ((-0.627308521836+0.82274947731j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.655634800965-0.350233430487j)*x_ref[0] + ((-0.627308521836+0.82274947731j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.950918526529+0.495323278508j)*x[0] + ((0.00562881910014-0.90132379158j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.950918526529+0.495323278508j)*x_ref[0] + ((0.00562881910014-0.90132379158j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.870632465315+0.994199033594j)*x[0] + ((-0.61981175361+0.0669988772929j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.870632465315+0.994199033594j)*x_ref[0] + ((-0.61981175361+0.0669988772929j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.307030774362-0.907836925571j)*x[0] + ((-0.686838445883+0.74426107891j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.307030774362-0.907836925571j)*x_ref[0] + ((-0.686838445883+0.74426107891j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.556424250196-0.0619590775142j)*x[0] + ((-0.293656512577+0.587354856627j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.556424250196-0.0619590775142j)*x_ref[0] + ((-0.293656512577+0.587354856627j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.0498112021853-0.130750670572j)*x[0] + ((-0.984434605573+0.86596901977j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.0498112021853-0.130750670572j)*x_ref[0] + ((-0.984434605573+0.86596901977j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.947149784395+0.302882254002j)*x[0] + ((-0.720959826189+0.609881081339j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.947149784395+0.302882254002j)*x_ref[0] + ((-0.720959826189+0.609881081339j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.116363002458-0.117321102515j)*x[0] + ((0.827406067396+0.913576959643j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.116363002458-0.117321102515j)*x_ref[0] + ((0.827406067396+0.913576959643j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.108216710332-0.609801740634j)*x[0] + ((0.722114781225+0.489616180569j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.108216710332-0.609801740634j)*x_ref[0] + ((0.722114781225+0.489616180569j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(-0.620270437657+0.705080299055j)*x[0] + ((-0.979914126853+0.00325851625408j))*x[1]
+        ref[(0, 0, 2, 2)]=(-0.620270437657+0.705080299055j)*x_ref[0] + ((-0.979914126853+0.00325851625408j))*x_ref[1]
+        arg[(0, 0, 2, 3)]=(-0.901042076607-0.319411369224j)*x[0] + ((0.0724991958606+0.969491643698j))*x[1]
+        ref[(0, 0, 2, 3)]=(-0.901042076607-0.319411369224j)*x_ref[0] + ((0.0724991958606+0.969491643698j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.627088244737+0.975909048715j)*x[0] + ((-0.00714104438544-0.903725341462j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.627088244737+0.975909048715j)*x_ref[0] + ((-0.00714104438544-0.903725341462j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.507015393336+0.643411790727j)*x[0] + ((-0.772767400794-0.0179515241632j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.507015393336+0.643411790727j)*x_ref[0] + ((-0.772767400794-0.0179515241632j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.805833106938-0.547377285752j)*x[0] + ((0.694870188547-0.411058024673j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.805833106938-0.547377285752j)*x_ref[0] + ((0.694870188547-0.411058024673j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.713509869016+0.17148991422j)*x[0] + ((-0.179192051485+0.502636284024j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.713509869016+0.17148991422j)*x_ref[0] + ((-0.179192051485+0.502636284024j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.671285218399+0.0479087959237j)*x[0] + ((0.312772965235+0.539926896128j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.671285218399+0.0479087959237j)*x_ref[0] + ((0.312772965235+0.539926896128j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.679331853982-0.61329069829j)*x[0] + ((-0.572026178356+0.89108686495j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.679331853982-0.61329069829j)*x_ref[0] + ((-0.572026178356+0.89108686495j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.104125378634-0.828442874868j)*x[0] + ((-0.773267848083+0.473750215909j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.104125378634-0.828442874868j)*x_ref[0] + ((-0.773267848083+0.473750215909j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.711011697083+0.101471094001j)*x[0] + ((0.816952776155-0.626958300746j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.711011697083+0.101471094001j)*x_ref[0] + ((0.816952776155-0.626958300746j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.420305392433-0.29750811172j)*x[0] + ((0.489913850409-0.729170687449j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.420305392433-0.29750811172j)*x_ref[0] + ((0.489913850409-0.729170687449j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.370341576663-0.820792916501j)*x[0] + ((0.446688537465-0.477658358203j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.370341576663-0.820792916501j)*x_ref[0] + ((0.446688537465-0.477658358203j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.368564924376-0.294431300425j)*x[0] + ((-0.240222178324+0.590467051906j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.368564924376-0.294431300425j)*x_ref[0] + ((-0.240222178324+0.590467051906j))*x_ref[1]
+        arg[(0, 1, 2, 3)]=(0.643312744479+0.976958653078j)*x[0] + ((-0.581549246641+0.739319241966j))*x[1]
+        ref[(0, 1, 2, 3)]=(0.643312744479+0.976958653078j)*x_ref[0] + ((-0.581549246641+0.739319241966j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.477517020381+0.765210388481j)*x[0] + ((0.746728909363+0.684781965999j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.477517020381+0.765210388481j)*x_ref[0] + ((0.746728909363+0.684781965999j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.473155374784-0.348762993871j)*x[0] + ((0.0452049808265-0.204383949893j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.473155374784-0.348762993871j)*x_ref[0] + ((0.0452049808265-0.204383949893j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.431509917676-0.477805405064j)*x[0] + ((-0.120112591927+0.678442256651j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.431509917676-0.477805405064j)*x_ref[0] + ((-0.120112591927+0.678442256651j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(0.522704671993+0.380369574887j)*x[0] + ((0.960021996752-0.90630862976j))*x[1]
+        ref[(1, 0, 0, 3)]=(0.522704671993+0.380369574887j)*x_ref[0] + ((0.960021996752-0.90630862976j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.978349945482+0.980715349701j)*x[0] + ((-0.358357772094-0.615804135046j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.978349945482+0.980715349701j)*x_ref[0] + ((-0.358357772094-0.615804135046j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.967145523071+0.427932120873j)*x[0] + ((0.404373509335-0.31964167579j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.967145523071+0.427932120873j)*x_ref[0] + ((0.404373509335-0.31964167579j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.15970753477+0.857192147963j)*x[0] + ((-0.0260330418234-0.528722920613j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.15970753477+0.857192147963j)*x_ref[0] + ((-0.0260330418234-0.528722920613j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(0.114476525532-0.914466126402j)*x[0] + ((-0.737993453338-0.764446705376j))*x[1]
+        ref[(1, 0, 1, 3)]=(0.114476525532-0.914466126402j)*x_ref[0] + ((-0.737993453338-0.764446705376j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.787701998056+0.285362161516j)*x[0] + ((-0.522316983514+0.276632007109j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.787701998056+0.285362161516j)*x_ref[0] + ((-0.522316983514+0.276632007109j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.984952868941+0.15238863145j)*x[0] + ((-0.293006472917-0.154824722937j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.984952868941+0.15238863145j)*x_ref[0] + ((-0.293006472917-0.154824722937j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.72932666836-0.334644033448j)*x[0] + ((0.698148640153+0.392538087596j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.72932666836-0.334644033448j)*x_ref[0] + ((0.698148640153+0.392538087596j))*x_ref[1]
+        arg[(1, 0, 2, 3)]=(0.39069537336-0.18833832893j)*x[0] + ((-0.283463656149+0.346617330371j))*x[1]
+        ref[(1, 0, 2, 3)]=(0.39069537336-0.18833832893j)*x_ref[0] + ((-0.283463656149+0.346617330371j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.284007903642+0.945474280574j)*x[0] + ((0.327167670116-0.199474263381j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.284007903642+0.945474280574j)*x_ref[0] + ((0.327167670116-0.199474263381j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.908583517053+0.94373788368j)*x[0] + ((0.276031957787+0.451388594533j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.908583517053+0.94373788368j)*x_ref[0] + ((0.276031957787+0.451388594533j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.721870551988+0.983488442205j)*x[0] + ((0.889989269934-0.708654792272j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.721870551988+0.983488442205j)*x_ref[0] + ((0.889989269934-0.708654792272j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.953606025775-0.582089580548j)*x[0] + ((-0.614555685534-0.317962856482j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.953606025775-0.582089580548j)*x_ref[0] + ((-0.614555685534-0.317962856482j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.503053335266+0.876307826923j)*x[0] + ((-0.1831383887-0.16337798398j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.503053335266+0.876307826923j)*x_ref[0] + ((-0.1831383887-0.16337798398j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.429139708432+0.9696071421j)*x[0] + ((-0.689599144951+0.870257827666j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.429139708432+0.9696071421j)*x_ref[0] + ((-0.689599144951+0.870257827666j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.0220926906768-0.416245020071j)*x[0] + ((0.401916144618-0.364877815011j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.0220926906768-0.416245020071j)*x_ref[0] + ((0.401916144618-0.364877815011j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.18636773578-0.40934914147j)*x[0] + ((-0.470630514762-0.524198840988j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.18636773578-0.40934914147j)*x_ref[0] + ((-0.470630514762-0.524198840988j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.0138207304835-0.50026072036j)*x[0] + ((-0.679326389476-0.982319532354j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.0138207304835-0.50026072036j)*x_ref[0] + ((-0.679326389476-0.982319532354j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.996973098193-0.495402667751j)*x[0] + ((-0.929019039473+0.821400580667j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.996973098193-0.495402667751j)*x_ref[0] + ((-0.929019039473+0.821400580667j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.78826278975-0.0617158034381j)*x[0] + ((0.708153176864+0.57109641831j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.78826278975-0.0617158034381j)*x_ref[0] + ((0.708153176864+0.57109641831j))*x_ref[1]
+        arg[(1, 1, 2, 3)]=(0.165954097174-0.545005480716j)*x[0] + ((0.49666732685-0.80864919339j))*x[1]
+        ref[(1, 1, 2, 3)]=(0.165954097174-0.545005480716j)*x_ref[0] + ((0.49666732685-0.80864919339j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.0112225144704+0.573238537809j)*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.0112225144704+0.573238537809j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.637225518365+0.725652205538j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.637225518365+0.725652205538j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.283279997422-0.756386332558j)*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.283279997422-0.756386332558j)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(-0.610354063444-0.915931012437j)*x[2]
+            ref[(0, 0, 0, 3)]+=(-0.610354063444-0.915931012437j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.49481365273+0.197257543888j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.49481365273+0.197257543888j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.319823485907+0.176520075089j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.319823485907+0.176520075089j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.696544974611+0.342437260206j)*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.696544974611+0.342437260206j)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.00721202252053-0.0038891438462j)*x[2]
+            ref[(0, 0, 1, 3)]+=(0.00721202252053-0.0038891438462j)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.643674686781-0.405969029861j)*x[2]
+            ref[(0, 0, 2, 0)]+=(0.643674686781-0.405969029861j)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.822386662106+0.678921946502j)*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.822386662106+0.678921946502j)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(0.544938206004-0.655782840153j)*x[2]
+            ref[(0, 0, 2, 2)]+=(0.544938206004-0.655782840153j)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=(-0.364130860525+0.0311202652392j)*x[2]
+            ref[(0, 0, 2, 3)]+=(-0.364130860525+0.0311202652392j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.430632091916+0.0906710734783j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.430632091916+0.0906710734783j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.83603426921+0.132475785794j)*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.83603426921+0.132475785794j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.000692664457461+0.60725840828j)*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.000692664457461+0.60725840828j)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.871158683182-0.41725924786j)*x[2]
+            ref[(0, 1, 0, 3)]+=(0.871158683182-0.41725924786j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.110477097231-0.150531391215j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.110477097231-0.150531391215j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.709961079659+0.12716850581j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.709961079659+0.12716850581j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.199869826166-0.116895174163j)*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.199869826166-0.116895174163j)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.0219999972418+0.940973425616j)*x[2]
+            ref[(0, 1, 1, 3)]+=(0.0219999972418+0.940973425616j)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.43837912863+0.578778692145j)*x[2]
+            ref[(0, 1, 2, 0)]+=(0.43837912863+0.578778692145j)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.874079566839+0.719867011038j)*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.874079566839+0.719867011038j)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(0.375453436308-0.695984898092j)*x[2]
+            ref[(0, 1, 2, 2)]+=(0.375453436308-0.695984898092j)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=(0.900793459345+0.902700946159j)*x[2]
+            ref[(0, 1, 2, 3)]+=(0.900793459345+0.902700946159j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.874270415385+0.012541785285j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.874270415385+0.012541785285j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.387960796699+0.242348643159j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.387960796699+0.242348643159j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.223247116196+0.342930709548j)*x[2]
+            ref[(1, 0, 0, 2)]+=(0.223247116196+0.342930709548j)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(-0.769609265424+0.837232455138j)*x[2]
+            ref[(1, 0, 0, 3)]+=(-0.769609265424+0.837232455138j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.159442149831+0.15886066558j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.159442149831+0.15886066558j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.838327896951-0.853137025181j)*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.838327896951-0.853137025181j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.0371050704522+0.339700831852j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.0371050704522+0.339700831852j)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.243469128175-0.302700906181j)*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.243469128175-0.302700906181j)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.374861425893-0.687306020459j)*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.374861425893-0.687306020459j)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.368609270117+0.317636888602j)*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.368609270117+0.317636888602j)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(0.394237664947-0.402264651351j)*x[2]
+            ref[(1, 0, 2, 2)]+=(0.394237664947-0.402264651351j)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=(0.743149846034-0.748283577651j)*x[2]
+            ref[(1, 0, 2, 3)]+=(0.743149846034-0.748283577651j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.20396107528-0.741842439343j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.20396107528-0.741842439343j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.855740724352+0.589675423646j)*x[2]
+            ref[(1, 1, 0, 1)]+=(0.855740724352+0.589675423646j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.806272090926-0.0905730047449j)*x[2]
+            ref[(1, 1, 0, 2)]+=(0.806272090926-0.0905730047449j)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.471453658684-0.550670424795j)*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.471453658684-0.550670424795j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.603225095573-0.604960485496j)*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.603225095573-0.604960485496j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.733219671746-0.441894396534j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.733219671746-0.441894396534j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.840732092689-0.0101208260114j)*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.840732092689-0.0101208260114j)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.465188251037-0.441787815693j)*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.465188251037-0.441787815693j)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.659025348823-0.210096371184j)*x[2]
+            ref[(1, 1, 2, 0)]+=(0.659025348823-0.210096371184j)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.0687891231289+0.864180909895j)*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.0687891231289+0.864180909895j)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.573567215772+0.49354282868j)*x[2]
+            ref[(1, 1, 2, 2)]+=(0.573567215772+0.49354282868j)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=(0.460545956806+0.606184935705j)*x[2]
+            ref[(1, 1, 2, 3)]+=(0.460545956806+0.606184935705j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.898558125797+0.0543560692468j)*x[0]**o + ((-0.645347625979-0.557630832597j))*x[0] + ((0.516002337343+0.946596329766j))*x[1]**o + ((-0.93509732237-0.218849785834j))*x[1]
+        ref=(-0.898558125797+0.0543560692468j)*x_ref[0]**o + ((-0.645347625979-0.557630832597j))*x_ref[0] + ((0.516002337343+0.946596329766j))*x_ref[1]**o + ((-0.93509732237-0.218849785834j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.0546192050155-0.0237677777274j))*x[2]**o + ((-0.197688052679+0.53842743488j))*x[2]
+            ref+=((-0.0546192050155-0.0237677777274j))*x_ref[2]**o + ((-0.197688052679+0.53842743488j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.684130070327+0.35429164125j)*x[0]**o + ((0.597552808874-0.057308501021j))*x[0] + ((0.718822088787-0.899270381586j))*x[1]**o + ((-0.555812380239-0.474314657352j))*x[1]
+        ref[(0,)]=(0.684130070327+0.35429164125j)*x_ref[0]**o + ((0.597552808874-0.057308501021j))*x_ref[0] + ((0.718822088787-0.899270381586j))*x_ref[1]**o + ((-0.555812380239-0.474314657352j))*x_ref[1]
+        arg[(1,)]=(-0.530982584516+0.324371235171j)*x[0]**o + ((0.91669675204-0.825755293026j))*x[0] + ((-0.0952207981039+0.299052635581j))*x[1]**o + ((-0.634075962397+0.915623137436j))*x[1]
+        ref[(1,)]=(-0.530982584516+0.324371235171j)*x_ref[0]**o + ((0.91669675204-0.825755293026j))*x_ref[0] + ((-0.0952207981039+0.299052635581j))*x_ref[1]**o + ((-0.634075962397+0.915623137436j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.821338681701-0.999656559713j)*x[2]**o + ((0.150888806043+0.678559762343j))*x[2]
+            ref[(0,)]+=(0.821338681701-0.999656559713j)*x_ref[2]**o + ((0.150888806043+0.678559762343j))*x_ref[2]
+            arg[(1,)]+=(0.355700702807+0.0802834699484j)*x[2]**o + ((0.871561236434+0.860447330139j))*x[2]
+            ref[(1,)]+=(0.355700702807+0.0802834699484j)*x_ref[2]**o + ((0.871561236434+0.860447330139j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(0.212980192858+0.638272890605j)*x[0]**o + ((-0.791546520064+0.93701573862j))*x[0] + ((0.354025203829+0.613294080035j))*x[1]**o + ((-0.679631666733-0.832148911041j))*x[1]
+        ref[(0, 0)]=(0.212980192858+0.638272890605j)*x_ref[0]**o + ((-0.791546520064+0.93701573862j))*x_ref[0] + ((0.354025203829+0.613294080035j))*x_ref[1]**o + ((-0.679631666733-0.832148911041j))*x_ref[1]
+        arg[(0, 1)]=(0.567196778184-0.103933012878j)*x[0]**o + ((0.567175356188+0.973331543011j))*x[0] + ((0.00488814412918+0.109990551308j))*x[1]**o + ((-0.750657172394+0.70101689702j))*x[1]
+        ref[(0, 1)]=(0.567196778184-0.103933012878j)*x_ref[0]**o + ((0.567175356188+0.973331543011j))*x_ref[0] + ((0.00488814412918+0.109990551308j))*x_ref[1]**o + ((-0.750657172394+0.70101689702j))*x_ref[1]
+        arg[(0, 2)]=(0.0899735474916-0.900916385281j)*x[0]**o + ((0.348990095732-0.129798610284j))*x[0] + ((0.345472221971+0.018341947227j))*x[1]**o + ((0.391384074609+0.0475435423605j))*x[1]
+        ref[(0, 2)]=(0.0899735474916-0.900916385281j)*x_ref[0]**o + ((0.348990095732-0.129798610284j))*x_ref[0] + ((0.345472221971+0.018341947227j))*x_ref[1]**o + ((0.391384074609+0.0475435423605j))*x_ref[1]
+        arg[(1, 0)]=(0.315320967953+0.502788792564j)*x[0]**o + ((0.425496254728+0.338572182199j))*x[0] + ((-0.791938858556-0.096021945661j))*x[1]**o + ((0.539994243701+0.905299856539j))*x[1]
+        ref[(1, 0)]=(0.315320967953+0.502788792564j)*x_ref[0]**o + ((0.425496254728+0.338572182199j))*x_ref[0] + ((-0.791938858556-0.096021945661j))*x_ref[1]**o + ((0.539994243701+0.905299856539j))*x_ref[1]
+        arg[(1, 1)]=(-0.0974274226435-0.976092687507j)*x[0]**o + ((-0.767053394916-0.402879809569j))*x[0] + ((-0.34353136656-0.0217068518001j))*x[1]**o + ((0.660127238737+0.725036895188j))*x[1]
+        ref[(1, 1)]=(-0.0974274226435-0.976092687507j)*x_ref[0]**o + ((-0.767053394916-0.402879809569j))*x_ref[0] + ((-0.34353136656-0.0217068518001j))*x_ref[1]**o + ((0.660127238737+0.725036895188j))*x_ref[1]
+        arg[(1, 2)]=(-0.230492456918-0.874278842903j)*x[0]**o + ((0.193046331434+0.0317192140991j))*x[0] + ((-0.204271009349-0.897717080387j))*x[1]**o + ((-0.743947694599-0.725372739301j))*x[1]
+        ref[(1, 2)]=(-0.230492456918-0.874278842903j)*x_ref[0]**o + ((0.193046331434+0.0317192140991j))*x_ref[0] + ((-0.204271009349-0.897717080387j))*x_ref[1]**o + ((-0.743947694599-0.725372739301j))*x_ref[1]
+        arg[(2, 0)]=(-0.967918209289+0.377736862071j)*x[0]**o + ((-0.371454204923+0.483922111403j))*x[0] + ((0.873970818229-0.403363470205j))*x[1]**o + ((0.373408175826-0.853125829863j))*x[1]
+        ref[(2, 0)]=(-0.967918209289+0.377736862071j)*x_ref[0]**o + ((-0.371454204923+0.483922111403j))*x_ref[0] + ((0.873970818229-0.403363470205j))*x_ref[1]**o + ((0.373408175826-0.853125829863j))*x_ref[1]
+        arg[(2, 1)]=(0.395590104863+0.386695076412j)*x[0]**o + ((0.206827147658-0.28639827477j))*x[0] + ((-0.897993010648+0.523870210247j))*x[1]**o + ((0.5695535881+0.440820339875j))*x[1]
+        ref[(2, 1)]=(0.395590104863+0.386695076412j)*x_ref[0]**o + ((0.206827147658-0.28639827477j))*x_ref[0] + ((-0.897993010648+0.523870210247j))*x_ref[1]**o + ((0.5695535881+0.440820339875j))*x_ref[1]
+        arg[(2, 2)]=(-0.257881903956-0.770311753036j)*x[0]**o + ((-0.210331241142+0.286867212023j))*x[0] + ((-0.667337917161+0.152721789735j))*x[1]**o + ((0.532052894893+0.638428790951j))*x[1]
+        ref[(2, 2)]=(-0.257881903956-0.770311753036j)*x_ref[0]**o + ((-0.210331241142+0.286867212023j))*x_ref[0] + ((-0.667337917161+0.152721789735j))*x_ref[1]**o + ((0.532052894893+0.638428790951j))*x_ref[1]
+        arg[(3, 0)]=(0.734904441366+0.340105831218j)*x[0]**o + ((-0.567776061327+0.649707791206j))*x[0] + ((-0.572411758588+0.702902582462j))*x[1]**o + ((-0.649083329261+0.145003995874j))*x[1]
+        ref[(3, 0)]=(0.734904441366+0.340105831218j)*x_ref[0]**o + ((-0.567776061327+0.649707791206j))*x_ref[0] + ((-0.572411758588+0.702902582462j))*x_ref[1]**o + ((-0.649083329261+0.145003995874j))*x_ref[1]
+        arg[(3, 1)]=(-0.429751841942+0.709953981749j)*x[0]**o + ((-0.99627951218-0.295885447663j))*x[0] + ((0.218091111863+0.925204872822j))*x[1]**o + ((-0.406759781468+0.132169537874j))*x[1]
+        ref[(3, 1)]=(-0.429751841942+0.709953981749j)*x_ref[0]**o + ((-0.99627951218-0.295885447663j))*x_ref[0] + ((0.218091111863+0.925204872822j))*x_ref[1]**o + ((-0.406759781468+0.132169537874j))*x_ref[1]
+        arg[(3, 2)]=(-0.692462081073-0.72135852222j)*x[0]**o + ((0.618427158078+0.228187150303j))*x[0] + ((-0.0573508207357-0.4334934129j))*x[1]**o + ((0.902895044085+0.426410554851j))*x[1]
+        ref[(3, 2)]=(-0.692462081073-0.72135852222j)*x_ref[0]**o + ((0.618427158078+0.228187150303j))*x_ref[0] + ((-0.0573508207357-0.4334934129j))*x_ref[1]**o + ((0.902895044085+0.426410554851j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.262935380329-0.300127878419j)*x[2]**o + ((-0.486163566593-0.0587435373668j))*x[2]
+            ref[(0, 0)]+=(0.262935380329-0.300127878419j)*x_ref[2]**o + ((-0.486163566593-0.0587435373668j))*x_ref[2]
+            arg[(0, 1)]+=(-0.249069944584+0.0575276568509j)*x[2]**o + ((0.0127256645697-0.104853970803j))*x[2]
+            ref[(0, 1)]+=(-0.249069944584+0.0575276568509j)*x_ref[2]**o + ((0.0127256645697-0.104853970803j))*x_ref[2]
+            arg[(0, 2)]+=(0.754425243751-0.468276849509j)*x[2]**o + ((0.269057325199-0.566529879258j))*x[2]
+            ref[(0, 2)]+=(0.754425243751-0.468276849509j)*x_ref[2]**o + ((0.269057325199-0.566529879258j))*x_ref[2]
+            arg[(1, 0)]+=(-0.653175569185+0.079139591838j)*x[2]**o + ((-0.8828979845-0.13622047647j))*x[2]
+            ref[(1, 0)]+=(-0.653175569185+0.079139591838j)*x_ref[2]**o + ((-0.8828979845-0.13622047647j))*x_ref[2]
+            arg[(1, 1)]+=(-0.307541161328+0.419373260526j)*x[2]**o + ((-0.465201065397-0.0324334831961j))*x[2]
+            ref[(1, 1)]+=(-0.307541161328+0.419373260526j)*x_ref[2]**o + ((-0.465201065397-0.0324334831961j))*x_ref[2]
+            arg[(1, 2)]+=(0.473724598634-0.510921239046j)*x[2]**o + ((-0.822427576567-0.320121682356j))*x[2]
+            ref[(1, 2)]+=(0.473724598634-0.510921239046j)*x_ref[2]**o + ((-0.822427576567-0.320121682356j))*x_ref[2]
+            arg[(2, 0)]+=(-0.478476307697-0.650076519392j)*x[2]**o + ((0.447385154992-0.8073565259j))*x[2]
+            ref[(2, 0)]+=(-0.478476307697-0.650076519392j)*x_ref[2]**o + ((0.447385154992-0.8073565259j))*x_ref[2]
+            arg[(2, 1)]+=(0.764594049348-0.19675658005j)*x[2]**o + ((0.10851254959-0.462754191918j))*x[2]
+            ref[(2, 1)]+=(0.764594049348-0.19675658005j)*x_ref[2]**o + ((0.10851254959-0.462754191918j))*x_ref[2]
+            arg[(2, 2)]+=(-0.361953029038-0.0911930886968j)*x[2]**o + ((-0.0126545765333-0.166218143023j))*x[2]
+            ref[(2, 2)]+=(-0.361953029038-0.0911930886968j)*x_ref[2]**o + ((-0.0126545765333-0.166218143023j))*x_ref[2]
+            arg[(3, 0)]+=(0.841614200238-0.110643437709j)*x[2]**o + ((0.546470320319+0.0795978669632j))*x[2]
+            ref[(3, 0)]+=(0.841614200238-0.110643437709j)*x_ref[2]**o + ((0.546470320319+0.0795978669632j))*x_ref[2]
+            arg[(3, 1)]+=(-0.752407156367+0.420338277394j)*x[2]**o + ((-0.356022387196-0.222883955668j))*x[2]
+            ref[(3, 1)]+=(-0.752407156367+0.420338277394j)*x_ref[2]**o + ((-0.356022387196-0.222883955668j))*x_ref[2]
+            arg[(3, 2)]+=(-0.453528694111-0.217310241864j)*x[2]**o + ((-0.674963756091-0.793417782287j))*x[2]
+            ref[(3, 2)]+=(-0.453528694111-0.217310241864j)*x_ref[2]**o + ((-0.674963756091-0.793417782287j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3),w)
+        ref = Data(0,(2, 4, 3),w_ref)
+        arg[(0, 0, 0)]=(0.192207883479+0.444277569069j)*x[0]**o + ((-0.346803869883+0.949445389544j))*x[0] + ((0.440357634215-0.97627574168j))*x[1]**o + ((0.192926190585+0.919589806506j))*x[1]
+        ref[(0, 0, 0)]=(0.192207883479+0.444277569069j)*x_ref[0]**o + ((-0.346803869883+0.949445389544j))*x_ref[0] + ((0.440357634215-0.97627574168j))*x_ref[1]**o + ((0.192926190585+0.919589806506j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.579194718328-0.618730572326j)*x[0]**o + ((0.707598482015+0.192570000375j))*x[0] + ((0.632121145175-0.738536346735j))*x[1]**o + ((0.692596705094-0.266363239293j))*x[1]
+        ref[(0, 0, 1)]=(-0.579194718328-0.618730572326j)*x_ref[0]**o + ((0.707598482015+0.192570000375j))*x_ref[0] + ((0.632121145175-0.738536346735j))*x_ref[1]**o + ((0.692596705094-0.266363239293j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.726912364289-0.133510442278j)*x[0]**o + ((-0.715181847224+0.0447372620866j))*x[0] + ((0.107275264902+0.627768277256j))*x[1]**o + ((0.0565525231585-0.981852948934j))*x[1]
+        ref[(0, 0, 2)]=(0.726912364289-0.133510442278j)*x_ref[0]**o + ((-0.715181847224+0.0447372620866j))*x_ref[0] + ((0.107275264902+0.627768277256j))*x_ref[1]**o + ((0.0565525231585-0.981852948934j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.605939667922+0.916136314735j)*x[0]**o + ((-0.010526162073-0.39855687064j))*x[0] + ((0.67012531904-0.779130844563j))*x[1]**o + ((0.751141102408-0.0190293237935j))*x[1]
+        ref[(0, 1, 0)]=(-0.605939667922+0.916136314735j)*x_ref[0]**o + ((-0.010526162073-0.39855687064j))*x_ref[0] + ((0.67012531904-0.779130844563j))*x_ref[1]**o + ((0.751141102408-0.0190293237935j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.799561597845-0.608986979214j)*x[0]**o + ((-0.906304094374+0.742935439872j))*x[0] + ((0.263714774223+0.0977844386533j))*x[1]**o + ((-0.980351537523+0.850823984447j))*x[1]
+        ref[(0, 1, 1)]=(-0.799561597845-0.608986979214j)*x_ref[0]**o + ((-0.906304094374+0.742935439872j))*x_ref[0] + ((0.263714774223+0.0977844386533j))*x_ref[1]**o + ((-0.980351537523+0.850823984447j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.040668781815+0.0624817612524j)*x[0]**o + ((0.0184237154992+0.412454616404j))*x[0] + ((0.0605649605352-0.413394698334j))*x[1]**o + ((0.855223162562+0.506034991204j))*x[1]
+        ref[(0, 1, 2)]=(-0.040668781815+0.0624817612524j)*x_ref[0]**o + ((0.0184237154992+0.412454616404j))*x_ref[0] + ((0.0605649605352-0.413394698334j))*x_ref[1]**o + ((0.855223162562+0.506034991204j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.459147141222+0.38226792908j)*x[0]**o + ((0.847344852776-0.282609776642j))*x[0] + ((-0.42234031642-0.799095839296j))*x[1]**o + ((-0.823128544163+0.484515516071j))*x[1]
+        ref[(0, 2, 0)]=(-0.459147141222+0.38226792908j)*x_ref[0]**o + ((0.847344852776-0.282609776642j))*x_ref[0] + ((-0.42234031642-0.799095839296j))*x_ref[1]**o + ((-0.823128544163+0.484515516071j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.432290931401+0.375970524488j)*x[0]**o + ((0.511640111545+0.264728390411j))*x[0] + ((0.466102244601-0.733537991237j))*x[1]**o + ((-0.800484686699-0.107155528332j))*x[1]
+        ref[(0, 2, 1)]=(0.432290931401+0.375970524488j)*x_ref[0]**o + ((0.511640111545+0.264728390411j))*x_ref[0] + ((0.466102244601-0.733537991237j))*x_ref[1]**o + ((-0.800484686699-0.107155528332j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.958706421521-0.315286874104j)*x[0]**o + ((0.783195885465+0.325482793917j))*x[0] + ((0.255895191349-0.829630454156j))*x[1]**o + ((-0.39250086062-0.568149899334j))*x[1]
+        ref[(0, 2, 2)]=(0.958706421521-0.315286874104j)*x_ref[0]**o + ((0.783195885465+0.325482793917j))*x_ref[0] + ((0.255895191349-0.829630454156j))*x_ref[1]**o + ((-0.39250086062-0.568149899334j))*x_ref[1]
+        arg[(0, 3, 0)]=(-0.42462010417-0.395632133126j)*x[0]**o + ((0.00970522056718+0.248673152197j))*x[0] + ((0.845114274369-0.903251931248j))*x[1]**o + ((-0.802728632244-0.38996270013j))*x[1]
+        ref[(0, 3, 0)]=(-0.42462010417-0.395632133126j)*x_ref[0]**o + ((0.00970522056718+0.248673152197j))*x_ref[0] + ((0.845114274369-0.903251931248j))*x_ref[1]**o + ((-0.802728632244-0.38996270013j))*x_ref[1]
+        arg[(0, 3, 1)]=(-0.599097588592+0.043400140804j)*x[0]**o + ((-0.125584514643-0.361768012521j))*x[0] + ((0.744814166206-0.970166035388j))*x[1]**o + ((-0.249615583225-0.249086645961j))*x[1]
+        ref[(0, 3, 1)]=(-0.599097588592+0.043400140804j)*x_ref[0]**o + ((-0.125584514643-0.361768012521j))*x_ref[0] + ((0.744814166206-0.970166035388j))*x_ref[1]**o + ((-0.249615583225-0.249086645961j))*x_ref[1]
+        arg[(0, 3, 2)]=(-0.394561188715+0.956203562308j)*x[0]**o + ((-0.141500616157+0.425327815169j))*x[0] + ((-0.704416351234+0.654057476774j))*x[1]**o + ((-0.249963684453-0.89241860522j))*x[1]
+        ref[(0, 3, 2)]=(-0.394561188715+0.956203562308j)*x_ref[0]**o + ((-0.141500616157+0.425327815169j))*x_ref[0] + ((-0.704416351234+0.654057476774j))*x_ref[1]**o + ((-0.249963684453-0.89241860522j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.883938937775-0.173127610716j)*x[0]**o + ((-0.190475771546-0.90213267271j))*x[0] + ((0.342521088808-0.831685672545j))*x[1]**o + ((0.722232260735-0.407354946012j))*x[1]
+        ref[(1, 0, 0)]=(0.883938937775-0.173127610716j)*x_ref[0]**o + ((-0.190475771546-0.90213267271j))*x_ref[0] + ((0.342521088808-0.831685672545j))*x_ref[1]**o + ((0.722232260735-0.407354946012j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.262568217133+0.968355986638j)*x[0]**o + ((0.0323670133571+0.271944273375j))*x[0] + ((-0.662848247399+0.670483278897j))*x[1]**o + ((-0.78793002497-0.171536662895j))*x[1]
+        ref[(1, 0, 1)]=(-0.262568217133+0.968355986638j)*x_ref[0]**o + ((0.0323670133571+0.271944273375j))*x_ref[0] + ((-0.662848247399+0.670483278897j))*x_ref[1]**o + ((-0.78793002497-0.171536662895j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.252361471404-0.456345510378j)*x[0]**o + ((0.682774489813+0.378756233933j))*x[0] + ((0.795424602086-0.500634824167j))*x[1]**o + ((-0.768681257812-0.260210295042j))*x[1]
+        ref[(1, 0, 2)]=(0.252361471404-0.456345510378j)*x_ref[0]**o + ((0.682774489813+0.378756233933j))*x_ref[0] + ((0.795424602086-0.500634824167j))*x_ref[1]**o + ((-0.768681257812-0.260210295042j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.772983425758+0.0480711364048j)*x[0]**o + ((-0.86740426485-0.508601191057j))*x[0] + ((-0.568387739181-0.666028009956j))*x[1]**o + ((0.946264412637+0.75103554442j))*x[1]
+        ref[(1, 1, 0)]=(-0.772983425758+0.0480711364048j)*x_ref[0]**o + ((-0.86740426485-0.508601191057j))*x_ref[0] + ((-0.568387739181-0.666028009956j))*x_ref[1]**o + ((0.946264412637+0.75103554442j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.867142091513+0.398974104139j)*x[0]**o + ((-0.876965934366+0.760622119733j))*x[0] + ((-0.440723964394+0.185665062604j))*x[1]**o + ((0.418739561034-0.0925290957658j))*x[1]
+        ref[(1, 1, 1)]=(0.867142091513+0.398974104139j)*x_ref[0]**o + ((-0.876965934366+0.760622119733j))*x_ref[0] + ((-0.440723964394+0.185665062604j))*x_ref[1]**o + ((0.418739561034-0.0925290957658j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.207607630737+0.356760127772j)*x[0]**o + ((0.429625463623+0.883498284218j))*x[0] + ((0.696543721725+0.778266597124j))*x[1]**o + ((0.304978596042+0.021041493304j))*x[1]
+        ref[(1, 1, 2)]=(-0.207607630737+0.356760127772j)*x_ref[0]**o + ((0.429625463623+0.883498284218j))*x_ref[0] + ((0.696543721725+0.778266597124j))*x_ref[1]**o + ((0.304978596042+0.021041493304j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.847522172703+0.448382939503j)*x[0]**o + ((0.398591239452+0.219424599464j))*x[0] + ((0.174806929385-0.0196088190939j))*x[1]**o + ((0.164224858203-0.721584990314j))*x[1]
+        ref[(1, 2, 0)]=(0.847522172703+0.448382939503j)*x_ref[0]**o + ((0.398591239452+0.219424599464j))*x_ref[0] + ((0.174806929385-0.0196088190939j))*x_ref[1]**o + ((0.164224858203-0.721584990314j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.25393899438+0.297084881177j)*x[0]**o + ((0.708595939261+0.73089143175j))*x[0] + ((0.224426348345-0.130703202979j))*x[1]**o + ((-0.998007823098+0.385306912995j))*x[1]
+        ref[(1, 2, 1)]=(-0.25393899438+0.297084881177j)*x_ref[0]**o + ((0.708595939261+0.73089143175j))*x_ref[0] + ((0.224426348345-0.130703202979j))*x_ref[1]**o + ((-0.998007823098+0.385306912995j))*x_ref[1]
+        arg[(1, 2, 2)]=(-0.169816845707+0.0625567259455j)*x[0]**o + ((0.585786596595-0.407470580339j))*x[0] + ((0.533401356683+0.273046499296j))*x[1]**o + ((-0.0179921510531+0.120761096979j))*x[1]
+        ref[(1, 2, 2)]=(-0.169816845707+0.0625567259455j)*x_ref[0]**o + ((0.585786596595-0.407470580339j))*x_ref[0] + ((0.533401356683+0.273046499296j))*x_ref[1]**o + ((-0.0179921510531+0.120761096979j))*x_ref[1]
+        arg[(1, 3, 0)]=(0.723542842963+0.349859986591j)*x[0]**o + ((0.279417793438-0.969162332056j))*x[0] + ((-0.590546958026+0.372525086j))*x[1]**o + ((-0.175211545823+0.674041485018j))*x[1]
+        ref[(1, 3, 0)]=(0.723542842963+0.349859986591j)*x_ref[0]**o + ((0.279417793438-0.969162332056j))*x_ref[0] + ((-0.590546958026+0.372525086j))*x_ref[1]**o + ((-0.175211545823+0.674041485018j))*x_ref[1]
+        arg[(1, 3, 1)]=(-0.724336432051+0.906837638492j)*x[0]**o + ((-0.638921615656+0.11146967229j))*x[0] + ((0.00847551158182-0.871279215367j))*x[1]**o + ((0.0426949520876+0.00977819872344j))*x[1]
+        ref[(1, 3, 1)]=(-0.724336432051+0.906837638492j)*x_ref[0]**o + ((-0.638921615656+0.11146967229j))*x_ref[0] + ((0.00847551158182-0.871279215367j))*x_ref[1]**o + ((0.0426949520876+0.00977819872344j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.696544210804+0.725939742156j)*x[0]**o + ((-0.43201308931-0.973699474944j))*x[0] + ((0.474693477857-0.763573218716j))*x[1]**o + ((-0.800318585344-0.775976807731j))*x[1]
+        ref[(1, 3, 2)]=(-0.696544210804+0.725939742156j)*x_ref[0]**o + ((-0.43201308931-0.973699474944j))*x_ref[0] + ((0.474693477857-0.763573218716j))*x_ref[1]**o + ((-0.800318585344-0.775976807731j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.483127009699-0.527278358079j)*x[2]**o + ((-0.54713707029+0.573714264362j))*x[2]
+            ref[(0, 0, 0)]+=(-0.483127009699-0.527278358079j)*x_ref[2]**o + ((-0.54713707029+0.573714264362j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.239542515828-0.458206378015j)*x[2]**o + ((0.0505770626939+0.609275714255j))*x[2]
+            ref[(0, 0, 1)]+=(0.239542515828-0.458206378015j)*x_ref[2]**o + ((0.0505770626939+0.609275714255j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.69023473775-0.209869986124j)*x[2]**o + ((-0.953271437001-0.848472199774j))*x[2]
+            ref[(0, 0, 2)]+=(0.69023473775-0.209869986124j)*x_ref[2]**o + ((-0.953271437001-0.848472199774j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.356191800225+0.271829931988j)*x[2]**o + ((-0.563938273184-0.530587794968j))*x[2]
+            ref[(0, 1, 0)]+=(-0.356191800225+0.271829931988j)*x_ref[2]**o + ((-0.563938273184-0.530587794968j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.838310614902+0.0409224153025j)*x[2]**o + ((0.926192480265-0.583494864427j))*x[2]
+            ref[(0, 1, 1)]+=(0.838310614902+0.0409224153025j)*x_ref[2]**o + ((0.926192480265-0.583494864427j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.281855582316-0.465564383703j)*x[2]**o + ((-0.210486204792+0.819365674963j))*x[2]
+            ref[(0, 1, 2)]+=(0.281855582316-0.465564383703j)*x_ref[2]**o + ((-0.210486204792+0.819365674963j))*x_ref[2]
+            arg[(0, 2, 0)]+=(0.250001205067+0.243637152502j)*x[2]**o + ((0.959919865834-0.684198518899j))*x[2]
+            ref[(0, 2, 0)]+=(0.250001205067+0.243637152502j)*x_ref[2]**o + ((0.959919865834-0.684198518899j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.663470221508+0.695986133186j)*x[2]**o + ((-0.133805379013+0.258882594073j))*x[2]
+            ref[(0, 2, 1)]+=(-0.663470221508+0.695986133186j)*x_ref[2]**o + ((-0.133805379013+0.258882594073j))*x_ref[2]
+            arg[(0, 2, 2)]+=(0.769718191503-0.338310593864j)*x[2]**o + ((0.316688814103-0.7598848433j))*x[2]
+            ref[(0, 2, 2)]+=(0.769718191503-0.338310593864j)*x_ref[2]**o + ((0.316688814103-0.7598848433j))*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.293229743348-0.534905211994j)*x[2]**o + ((0.11089476592+0.687410078055j))*x[2]
+            ref[(0, 3, 0)]+=(-0.293229743348-0.534905211994j)*x_ref[2]**o + ((0.11089476592+0.687410078055j))*x_ref[2]
+            arg[(0, 3, 1)]+=(-0.585440599658-0.564292621162j)*x[2]**o + ((-0.175330184579+0.366649193489j))*x[2]
+            ref[(0, 3, 1)]+=(-0.585440599658-0.564292621162j)*x_ref[2]**o + ((-0.175330184579+0.366649193489j))*x_ref[2]
+            arg[(0, 3, 2)]+=(0.85303116721+0.218640081406j)*x[2]**o + ((-0.842344760974+0.410775576165j))*x[2]
+            ref[(0, 3, 2)]+=(0.85303116721+0.218640081406j)*x_ref[2]**o + ((-0.842344760974+0.410775576165j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.533882140998+0.416301751363j)*x[2]**o + ((-0.4834351174+0.164999981349j))*x[2]
+            ref[(1, 0, 0)]+=(0.533882140998+0.416301751363j)*x_ref[2]**o + ((-0.4834351174+0.164999981349j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.961743041992+0.243362699002j)*x[2]**o + ((-0.650174126965-0.359380568449j))*x[2]
+            ref[(1, 0, 1)]+=(0.961743041992+0.243362699002j)*x_ref[2]**o + ((-0.650174126965-0.359380568449j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.595856442948-0.195468316465j)*x[2]**o + ((0.936502223619-0.876869720381j))*x[2]
+            ref[(1, 0, 2)]+=(0.595856442948-0.195468316465j)*x_ref[2]**o + ((0.936502223619-0.876869720381j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.31307717106-0.067298716493j)*x[2]**o + ((0.599634191886-0.143630119761j))*x[2]
+            ref[(1, 1, 0)]+=(0.31307717106-0.067298716493j)*x_ref[2]**o + ((0.599634191886-0.143630119761j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.620382785726-0.934327333041j)*x[2]**o + ((-0.0649152357829+0.334613808339j))*x[2]
+            ref[(1, 1, 1)]+=(0.620382785726-0.934327333041j)*x_ref[2]**o + ((-0.0649152357829+0.334613808339j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.647489862639+0.444075357926j)*x[2]**o + ((0.159666607699+0.58187236385j))*x[2]
+            ref[(1, 1, 2)]+=(0.647489862639+0.444075357926j)*x_ref[2]**o + ((0.159666607699+0.58187236385j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.521005888098+0.868378410567j)*x[2]**o + ((0.22680066413-0.414733639365j))*x[2]
+            ref[(1, 2, 0)]+=(0.521005888098+0.868378410567j)*x_ref[2]**o + ((0.22680066413-0.414733639365j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.084128032176+0.436200358081j)*x[2]**o + ((0.0637149717713-0.603917684987j))*x[2]
+            ref[(1, 2, 1)]+=(0.084128032176+0.436200358081j)*x_ref[2]**o + ((0.0637149717713-0.603917684987j))*x_ref[2]
+            arg[(1, 2, 2)]+=(-0.961355937362-0.763448977571j)*x[2]**o + ((0.123782299848+0.0843756922102j))*x[2]
+            ref[(1, 2, 2)]+=(-0.961355937362-0.763448977571j)*x_ref[2]**o + ((0.123782299848+0.0843756922102j))*x_ref[2]
+            arg[(1, 3, 0)]+=(0.0260256718717-0.0568542476141j)*x[2]**o + ((0.266642677757+0.76172985523j))*x[2]
+            ref[(1, 3, 0)]+=(0.0260256718717-0.0568542476141j)*x_ref[2]**o + ((0.266642677757+0.76172985523j))*x_ref[2]
+            arg[(1, 3, 1)]+=(-0.826959483+0.62810383741j)*x[2]**o + ((-0.226015009679-0.125611554069j))*x[2]
+            ref[(1, 3, 1)]+=(-0.826959483+0.62810383741j)*x_ref[2]**o + ((-0.226015009679-0.125611554069j))*x_ref[2]
+            arg[(1, 3, 2)]+=(-0.3323255712+0.380605080901j)*x[2]**o + ((-0.35022709987+0.0125220239329j))*x[2]
+            ref[(1, 3, 2)]+=(-0.3323255712+0.380605080901j)*x_ref[2]**o + ((-0.35022709987+0.0125220239329j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4, 3),w)
+        ref = Data(0,(4, 4, 4, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(0.43465391275+0.983742483132j)*x[0]**o + ((0.273794553189-0.619114440889j))*x[0] + ((-0.813997133562-0.408645297277j))*x[1]**o + ((-0.778279951529-0.649255144171j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.43465391275+0.983742483132j)*x_ref[0]**o + ((0.273794553189-0.619114440889j))*x_ref[0] + ((-0.813997133562-0.408645297277j))*x_ref[1]**o + ((-0.778279951529-0.649255144171j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.934972712595-0.888898920484j)*x[0]**o + ((-0.0897579693991+0.638920078261j))*x[0] + ((0.534939808979-0.998857746637j))*x[1]**o + ((0.330343901899-0.1799529906j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.934972712595-0.888898920484j)*x_ref[0]**o + ((-0.0897579693991+0.638920078261j))*x_ref[0] + ((0.534939808979-0.998857746637j))*x_ref[1]**o + ((0.330343901899-0.1799529906j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.387191341697-0.986771748702j)*x[0]**o + ((0.237419512177+0.735836312016j))*x[0] + ((-0.0936412958505+0.788341973012j))*x[1]**o + ((0.676147164977-0.968381180991j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.387191341697-0.986771748702j)*x_ref[0]**o + ((0.237419512177+0.735836312016j))*x_ref[0] + ((-0.0936412958505+0.788341973012j))*x_ref[1]**o + ((0.676147164977-0.968381180991j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.291699869162+0.839213166507j)*x[0]**o + ((-0.113104752522-0.943859419254j))*x[0] + ((-0.249618737707+0.378239943416j))*x[1]**o + ((0.312953013192+0.276460392263j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.291699869162+0.839213166507j)*x_ref[0]**o + ((-0.113104752522-0.943859419254j))*x_ref[0] + ((-0.249618737707+0.378239943416j))*x_ref[1]**o + ((0.312953013192+0.276460392263j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.0613746985789+0.844580420267j)*x[0]**o + ((-0.620001187117-0.984614831617j))*x[0] + ((-0.834675145598+0.150856727384j))*x[1]**o + ((-0.764245315875+0.68349607043j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.0613746985789+0.844580420267j)*x_ref[0]**o + ((-0.620001187117-0.984614831617j))*x_ref[0] + ((-0.834675145598+0.150856727384j))*x_ref[1]**o + ((-0.764245315875+0.68349607043j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.18191359689+0.372537191744j)*x[0]**o + ((0.771863115814-0.160507443956j))*x[0] + ((0.126276291758-0.0474644401311j))*x[1]**o + ((0.0931005129511-0.0629547996277j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.18191359689+0.372537191744j)*x_ref[0]**o + ((0.771863115814-0.160507443956j))*x_ref[0] + ((0.126276291758-0.0474644401311j))*x_ref[1]**o + ((0.0931005129511-0.0629547996277j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.871016019504+0.0176185401021j)*x[0]**o + ((0.69320264875+0.0228475225632j))*x[0] + ((-0.233474175575+0.096308496694j))*x[1]**o + ((-0.227657538897+0.994855192042j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.871016019504+0.0176185401021j)*x_ref[0]**o + ((0.69320264875+0.0228475225632j))*x_ref[0] + ((-0.233474175575+0.096308496694j))*x_ref[1]**o + ((-0.227657538897+0.994855192042j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.256070709022+0.03917321248j)*x[0]**o + ((-0.0353279209778-0.251538532915j))*x[0] + ((0.99030244473-0.581332101232j))*x[1]**o + ((-0.554217394763+0.373636121413j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.256070709022+0.03917321248j)*x_ref[0]**o + ((-0.0353279209778-0.251538532915j))*x_ref[0] + ((0.99030244473-0.581332101232j))*x_ref[1]**o + ((-0.554217394763+0.373636121413j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.645556409603-0.809363326378j)*x[0]**o + ((0.403138970163-0.682132459883j))*x[0] + ((0.0450949352313-0.697165953754j))*x[1]**o + ((0.519406653357-0.83077285013j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.645556409603-0.809363326378j)*x_ref[0]**o + ((0.403138970163-0.682132459883j))*x_ref[0] + ((0.0450949352313-0.697165953754j))*x_ref[1]**o + ((0.519406653357-0.83077285013j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(0.995331853731-0.980888652713j)*x[0]**o + ((-0.7910879854-0.813856128979j))*x[0] + ((0.464696440535+0.827994407565j))*x[1]**o + ((0.519050100718-0.939499211683j))*x[1]
+        ref[(0, 0, 3, 0)]=(0.995331853731-0.980888652713j)*x_ref[0]**o + ((-0.7910879854-0.813856128979j))*x_ref[0] + ((0.464696440535+0.827994407565j))*x_ref[1]**o + ((0.519050100718-0.939499211683j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(0.15811490488-0.348493246106j)*x[0]**o + ((-0.268592070881-0.904593503206j))*x[0] + ((-0.776322367441-0.377008909124j))*x[1]**o + ((0.676744015278+0.285531996675j))*x[1]
+        ref[(0, 0, 3, 1)]=(0.15811490488-0.348493246106j)*x_ref[0]**o + ((-0.268592070881-0.904593503206j))*x_ref[0] + ((-0.776322367441-0.377008909124j))*x_ref[1]**o + ((0.676744015278+0.285531996675j))*x_ref[1]
+        arg[(0, 0, 3, 2)]=(0.856528139159+0.611318788216j)*x[0]**o + ((0.0123188378482-0.688484405623j))*x[0] + ((-0.864464366334-0.916402203326j))*x[1]**o + ((-0.345756548932-0.765197637434j))*x[1]
+        ref[(0, 0, 3, 2)]=(0.856528139159+0.611318788216j)*x_ref[0]**o + ((0.0123188378482-0.688484405623j))*x_ref[0] + ((-0.864464366334-0.916402203326j))*x_ref[1]**o + ((-0.345756548932-0.765197637434j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.475402914303-0.145637517991j)*x[0]**o + ((-0.267002785894+0.486544463672j))*x[0] + ((-0.477363542863+0.748736853957j))*x[1]**o + ((0.275973069567+0.945624855669j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.475402914303-0.145637517991j)*x_ref[0]**o + ((-0.267002785894+0.486544463672j))*x_ref[0] + ((-0.477363542863+0.748736853957j))*x_ref[1]**o + ((0.275973069567+0.945624855669j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.493582566226+0.592242877142j)*x[0]**o + ((-0.862965235025+0.579528431288j))*x[0] + ((0.0539613471988+0.71061360596j))*x[1]**o + ((-0.0173485100212-0.171020640756j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.493582566226+0.592242877142j)*x_ref[0]**o + ((-0.862965235025+0.579528431288j))*x_ref[0] + ((0.0539613471988+0.71061360596j))*x_ref[1]**o + ((-0.0173485100212-0.171020640756j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.305816212653+0.665920091929j)*x[0]**o + ((-0.576424059252+0.190346652606j))*x[0] + ((0.666297086141-0.142551780973j))*x[1]**o + ((-0.762908542283-0.381039762848j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.305816212653+0.665920091929j)*x_ref[0]**o + ((-0.576424059252+0.190346652606j))*x_ref[0] + ((0.666297086141-0.142551780973j))*x_ref[1]**o + ((-0.762908542283-0.381039762848j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.131721597261+0.0696817183982j)*x[0]**o + ((-0.84833753749+0.126630992473j))*x[0] + ((-0.373986452326-0.955728729467j))*x[1]**o + ((-0.166145050446-0.699772414466j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.131721597261+0.0696817183982j)*x_ref[0]**o + ((-0.84833753749+0.126630992473j))*x_ref[0] + ((-0.373986452326-0.955728729467j))*x_ref[1]**o + ((-0.166145050446-0.699772414466j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.343150589227+0.876650383465j)*x[0]**o + ((-0.703444318786-0.093253487365j))*x[0] + ((0.731039449596+0.367312356797j))*x[1]**o + ((0.356272970632+0.998388421934j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.343150589227+0.876650383465j)*x_ref[0]**o + ((-0.703444318786-0.093253487365j))*x_ref[0] + ((0.731039449596+0.367312356797j))*x_ref[1]**o + ((0.356272970632+0.998388421934j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.45219525791+0.20342159498j)*x[0]**o + ((0.543539297853-0.864044965259j))*x[0] + ((0.795465939617-0.177456266103j))*x[1]**o + ((0.230098843695-0.552170481044j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.45219525791+0.20342159498j)*x_ref[0]**o + ((0.543539297853-0.864044965259j))*x_ref[0] + ((0.795465939617-0.177456266103j))*x_ref[1]**o + ((0.230098843695-0.552170481044j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.0742334001083-0.0430141065569j)*x[0]**o + ((-0.363445592239+0.377138175834j))*x[0] + ((-0.667906192821-0.823966771519j))*x[1]**o + ((-0.619085216266+0.636900738205j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.0742334001083-0.0430141065569j)*x_ref[0]**o + ((-0.363445592239+0.377138175834j))*x_ref[0] + ((-0.667906192821-0.823966771519j))*x_ref[1]**o + ((-0.619085216266+0.636900738205j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.60702274405+0.674673263278j)*x[0]**o + ((-0.347398750818+0.0484166099494j))*x[0] + ((-0.399728893299+0.610287598723j))*x[1]**o + ((0.972187347309-0.0881955260301j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.60702274405+0.674673263278j)*x_ref[0]**o + ((-0.347398750818+0.0484166099494j))*x_ref[0] + ((-0.399728893299+0.610287598723j))*x_ref[1]**o + ((0.972187347309-0.0881955260301j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(0.654021567992-0.59429936938j)*x[0]**o + ((-0.37093775144-0.88219856455j))*x[0] + ((0.822823846672-0.0915745034228j))*x[1]**o + ((0.602161760727+0.366699361807j))*x[1]
+        ref[(0, 1, 2, 2)]=(0.654021567992-0.59429936938j)*x_ref[0]**o + ((-0.37093775144-0.88219856455j))*x_ref[0] + ((0.822823846672-0.0915745034228j))*x_ref[1]**o + ((0.602161760727+0.366699361807j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(0.566746554539+0.235820693459j)*x[0]**o + ((0.65185422085+0.0102735416633j))*x[0] + ((-0.182428240433-0.551397972913j))*x[1]**o + ((0.294979827195-0.844983506441j))*x[1]
+        ref[(0, 1, 3, 0)]=(0.566746554539+0.235820693459j)*x_ref[0]**o + ((0.65185422085+0.0102735416633j))*x_ref[0] + ((-0.182428240433-0.551397972913j))*x_ref[1]**o + ((0.294979827195-0.844983506441j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(-0.547087353537+0.900089634532j)*x[0]**o + ((0.353502888848-0.296204042138j))*x[0] + ((0.139674350062+0.29515659568j))*x[1]**o + ((-0.243913738606+0.646458817887j))*x[1]
+        ref[(0, 1, 3, 1)]=(-0.547087353537+0.900089634532j)*x_ref[0]**o + ((0.353502888848-0.296204042138j))*x_ref[0] + ((0.139674350062+0.29515659568j))*x_ref[1]**o + ((-0.243913738606+0.646458817887j))*x_ref[1]
+        arg[(0, 1, 3, 2)]=(-0.465239543759-0.170545389277j)*x[0]**o + ((-0.317557434519-0.638226758156j))*x[0] + ((-0.281846184634+0.136383667679j))*x[1]**o + ((-0.0999920162444+0.727657898328j))*x[1]
+        ref[(0, 1, 3, 2)]=(-0.465239543759-0.170545389277j)*x_ref[0]**o + ((-0.317557434519-0.638226758156j))*x_ref[0] + ((-0.281846184634+0.136383667679j))*x_ref[1]**o + ((-0.0999920162444+0.727657898328j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.647184191167-0.0287159904208j)*x[0]**o + ((-0.922054433049-0.0613469208742j))*x[0] + ((0.218465293174+0.386822468642j))*x[1]**o + ((0.448824290626-0.912039055037j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.647184191167-0.0287159904208j)*x_ref[0]**o + ((-0.922054433049-0.0613469208742j))*x_ref[0] + ((0.218465293174+0.386822468642j))*x_ref[1]**o + ((0.448824290626-0.912039055037j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.270396670431-0.391361329295j)*x[0]**o + ((-0.96242738243-0.619844582639j))*x[0] + ((-0.537452560633-0.0455632796212j))*x[1]**o + ((0.0616393490316+0.830394255799j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.270396670431-0.391361329295j)*x_ref[0]**o + ((-0.96242738243-0.619844582639j))*x_ref[0] + ((-0.537452560633-0.0455632796212j))*x_ref[1]**o + ((0.0616393490316+0.830394255799j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(-0.470426435601-0.591454299633j)*x[0]**o + ((0.0875242132041-0.262172137737j))*x[0] + ((0.725321071149+0.320556332487j))*x[1]**o + ((-0.0750398966355-0.567524443587j))*x[1]
+        ref[(0, 2, 0, 2)]=(-0.470426435601-0.591454299633j)*x_ref[0]**o + ((0.0875242132041-0.262172137737j))*x_ref[0] + ((0.725321071149+0.320556332487j))*x_ref[1]**o + ((-0.0750398966355-0.567524443587j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.0677544281211-0.964022843596j)*x[0]**o + ((-0.497169598015+0.665777486527j))*x[0] + ((0.58920080322+0.931526604582j))*x[1]**o + ((-0.197502607223+0.11677582448j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.0677544281211-0.964022843596j)*x_ref[0]**o + ((-0.497169598015+0.665777486527j))*x_ref[0] + ((0.58920080322+0.931526604582j))*x_ref[1]**o + ((-0.197502607223+0.11677582448j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.68533264779-0.654874580102j)*x[0]**o + ((-0.136973220585-0.188374154761j))*x[0] + ((-0.307109622185+0.677759259537j))*x[1]**o + ((0.00353622772658+0.805532465942j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.68533264779-0.654874580102j)*x_ref[0]**o + ((-0.136973220585-0.188374154761j))*x_ref[0] + ((-0.307109622185+0.677759259537j))*x_ref[1]**o + ((0.00353622772658+0.805532465942j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.253118620845+0.115136897875j)*x[0]**o + ((0.17944558458+0.211149972594j))*x[0] + ((-0.709051162162-0.330940280398j))*x[1]**o + ((-0.0273215150566-0.97876003102j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.253118620845+0.115136897875j)*x_ref[0]**o + ((0.17944558458+0.211149972594j))*x_ref[0] + ((-0.709051162162-0.330940280398j))*x_ref[1]**o + ((-0.0273215150566-0.97876003102j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.790699874121-0.941091988658j)*x[0]**o + ((0.635204683485+0.365935589932j))*x[0] + ((0.0851489688401-0.460998604067j))*x[1]**o + ((-0.427482436305+0.897982559265j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.790699874121-0.941091988658j)*x_ref[0]**o + ((0.635204683485+0.365935589932j))*x_ref[0] + ((0.0851489688401-0.460998604067j))*x_ref[1]**o + ((-0.427482436305+0.897982559265j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.516612015186-0.986036863636j)*x[0]**o + ((-0.472955090809-0.555951175394j))*x[0] + ((-0.185629654808+0.733023085419j))*x[1]**o + ((-0.381095093494+0.588531553541j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.516612015186-0.986036863636j)*x_ref[0]**o + ((-0.472955090809-0.555951175394j))*x_ref[0] + ((-0.185629654808+0.733023085419j))*x_ref[1]**o + ((-0.381095093494+0.588531553541j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(0.640693535148-0.879001876375j)*x[0]**o + ((0.820559554537+0.892465122465j))*x[0] + ((-0.110715613222-0.435029741026j))*x[1]**o + ((0.319212525544-0.113867425424j))*x[1]
+        ref[(0, 2, 2, 2)]=(0.640693535148-0.879001876375j)*x_ref[0]**o + ((0.820559554537+0.892465122465j))*x_ref[0] + ((-0.110715613222-0.435029741026j))*x_ref[1]**o + ((0.319212525544-0.113867425424j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(-0.579604538559+0.936361449491j)*x[0]**o + ((-0.109722318476+0.959636960919j))*x[0] + ((0.156999955446-0.447309173741j))*x[1]**o + ((-0.58480395158+0.444310660831j))*x[1]
+        ref[(0, 2, 3, 0)]=(-0.579604538559+0.936361449491j)*x_ref[0]**o + ((-0.109722318476+0.959636960919j))*x_ref[0] + ((0.156999955446-0.447309173741j))*x_ref[1]**o + ((-0.58480395158+0.444310660831j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(0.432864738924-0.335831655379j)*x[0]**o + ((-0.279216670046+0.576804714337j))*x[0] + ((0.31037571952-0.555053922406j))*x[1]**o + ((-0.177456716214+0.560938516825j))*x[1]
+        ref[(0, 2, 3, 1)]=(0.432864738924-0.335831655379j)*x_ref[0]**o + ((-0.279216670046+0.576804714337j))*x_ref[0] + ((0.31037571952-0.555053922406j))*x_ref[1]**o + ((-0.177456716214+0.560938516825j))*x_ref[1]
+        arg[(0, 2, 3, 2)]=(-0.443418503388+0.378462995548j)*x[0]**o + ((0.641674936037-0.536108921935j))*x[0] + ((0.555563177608-0.544957331024j))*x[1]**o + ((0.42550982012+0.344265196819j))*x[1]
+        ref[(0, 2, 3, 2)]=(-0.443418503388+0.378462995548j)*x_ref[0]**o + ((0.641674936037-0.536108921935j))*x_ref[0] + ((0.555563177608-0.544957331024j))*x_ref[1]**o + ((0.42550982012+0.344265196819j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.0275214656406-0.194492863148j)*x[0]**o + ((-0.542529016697+0.628812168446j))*x[0] + ((0.242084307955+0.325320241066j))*x[1]**o + ((-0.00448725478467-0.152248968547j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.0275214656406-0.194492863148j)*x_ref[0]**o + ((-0.542529016697+0.628812168446j))*x_ref[0] + ((0.242084307955+0.325320241066j))*x_ref[1]**o + ((-0.00448725478467-0.152248968547j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.474317448783+0.928174831001j)*x[0]**o + ((-0.685045142674+0.853357397305j))*x[0] + ((0.587564484107+0.502580970235j))*x[1]**o + ((-0.0183034640522+0.788212225896j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.474317448783+0.928174831001j)*x_ref[0]**o + ((-0.685045142674+0.853357397305j))*x_ref[0] + ((0.587564484107+0.502580970235j))*x_ref[1]**o + ((-0.0183034640522+0.788212225896j))*x_ref[1]
+        arg[(0, 3, 0, 2)]=(0.376354621532+0.0719825559729j)*x[0]**o + ((-0.450758522635+0.735609486129j))*x[0] + ((0.144308928599+0.929232783483j))*x[1]**o + ((0.780398703852+0.0084250055326j))*x[1]
+        ref[(0, 3, 0, 2)]=(0.376354621532+0.0719825559729j)*x_ref[0]**o + ((-0.450758522635+0.735609486129j))*x_ref[0] + ((0.144308928599+0.929232783483j))*x_ref[1]**o + ((0.780398703852+0.0084250055326j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.265684145367+0.604080059482j)*x[0]**o + ((-0.820413245061+0.0616437251241j))*x[0] + ((0.104651490742+0.0111457963155j))*x[1]**o + ((0.268179033756-0.423418417065j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.265684145367+0.604080059482j)*x_ref[0]**o + ((-0.820413245061+0.0616437251241j))*x_ref[0] + ((0.104651490742+0.0111457963155j))*x_ref[1]**o + ((0.268179033756-0.423418417065j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(-0.344512422319+0.572125926781j)*x[0]**o + ((-0.516587704202+0.362562049498j))*x[0] + ((-0.541172247771-0.596938698074j))*x[1]**o + ((-0.864097312204+0.924153264565j))*x[1]
+        ref[(0, 3, 1, 1)]=(-0.344512422319+0.572125926781j)*x_ref[0]**o + ((-0.516587704202+0.362562049498j))*x_ref[0] + ((-0.541172247771-0.596938698074j))*x_ref[1]**o + ((-0.864097312204+0.924153264565j))*x_ref[1]
+        arg[(0, 3, 1, 2)]=(0.191660489129-0.632172817138j)*x[0]**o + ((-0.356985814892+0.517331449031j))*x[0] + ((-0.459597867245-0.914109197181j))*x[1]**o + ((0.611831338294+0.363487726237j))*x[1]
+        ref[(0, 3, 1, 2)]=(0.191660489129-0.632172817138j)*x_ref[0]**o + ((-0.356985814892+0.517331449031j))*x_ref[0] + ((-0.459597867245-0.914109197181j))*x_ref[1]**o + ((0.611831338294+0.363487726237j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.880874363325-0.438838152036j)*x[0]**o + ((-0.16960219645-0.77048694254j))*x[0] + ((-0.445092353874+0.664051250905j))*x[1]**o + ((-0.630296654685-0.0537556317347j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.880874363325-0.438838152036j)*x_ref[0]**o + ((-0.16960219645-0.77048694254j))*x_ref[0] + ((-0.445092353874+0.664051250905j))*x_ref[1]**o + ((-0.630296654685-0.0537556317347j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(-0.740122764589+0.196134280911j)*x[0]**o + ((0.618655035308-0.762591432001j))*x[0] + ((-0.943172439835+0.826650643527j))*x[1]**o + ((0.813577296263-0.110954835266j))*x[1]
+        ref[(0, 3, 2, 1)]=(-0.740122764589+0.196134280911j)*x_ref[0]**o + ((0.618655035308-0.762591432001j))*x_ref[0] + ((-0.943172439835+0.826650643527j))*x_ref[1]**o + ((0.813577296263-0.110954835266j))*x_ref[1]
+        arg[(0, 3, 2, 2)]=(0.105274271573+0.765804360039j)*x[0]**o + ((0.343483874863+0.390790537898j))*x[0] + ((0.49411412425+0.936604247336j))*x[1]**o + ((0.993344680134-0.804156478088j))*x[1]
+        ref[(0, 3, 2, 2)]=(0.105274271573+0.765804360039j)*x_ref[0]**o + ((0.343483874863+0.390790537898j))*x_ref[0] + ((0.49411412425+0.936604247336j))*x_ref[1]**o + ((0.993344680134-0.804156478088j))*x_ref[1]
+        arg[(0, 3, 3, 0)]=(-0.279053878827+0.382775327372j)*x[0]**o + ((-0.219586526736-0.124088387367j))*x[0] + ((-0.20291414951+0.631641810653j))*x[1]**o + ((0.0630478172149+0.923311665567j))*x[1]
+        ref[(0, 3, 3, 0)]=(-0.279053878827+0.382775327372j)*x_ref[0]**o + ((-0.219586526736-0.124088387367j))*x_ref[0] + ((-0.20291414951+0.631641810653j))*x_ref[1]**o + ((0.0630478172149+0.923311665567j))*x_ref[1]
+        arg[(0, 3, 3, 1)]=(0.490278932561-0.0404821142323j)*x[0]**o + ((0.815915071007-0.487188654511j))*x[0] + ((-0.399497475495+0.601984449412j))*x[1]**o + ((-0.868576291018+0.441560196452j))*x[1]
+        ref[(0, 3, 3, 1)]=(0.490278932561-0.0404821142323j)*x_ref[0]**o + ((0.815915071007-0.487188654511j))*x_ref[0] + ((-0.399497475495+0.601984449412j))*x_ref[1]**o + ((-0.868576291018+0.441560196452j))*x_ref[1]
+        arg[(0, 3, 3, 2)]=(0.0257370479029-0.447352280402j)*x[0]**o + ((-0.231332600385-0.930795822447j))*x[0] + ((-0.468581730788+0.215252637795j))*x[1]**o + ((-0.352632618219+0.974486314621j))*x[1]
+        ref[(0, 3, 3, 2)]=(0.0257370479029-0.447352280402j)*x_ref[0]**o + ((-0.231332600385-0.930795822447j))*x_ref[0] + ((-0.468581730788+0.215252637795j))*x_ref[1]**o + ((-0.352632618219+0.974486314621j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.246068150219+0.384911314052j)*x[0]**o + ((0.718707569584+0.551839344178j))*x[0] + ((0.978749834713+0.162474517131j))*x[1]**o + ((-0.0162970603532-0.579400443449j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.246068150219+0.384911314052j)*x_ref[0]**o + ((0.718707569584+0.551839344178j))*x_ref[0] + ((0.978749834713+0.162474517131j))*x_ref[1]**o + ((-0.0162970603532-0.579400443449j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.949338380698+0.357262114227j)*x[0]**o + ((0.722937650386-0.520821730139j))*x[0] + ((-0.326637187199-0.948343863579j))*x[1]**o + ((0.518986481186+0.556856781809j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.949338380698+0.357262114227j)*x_ref[0]**o + ((0.722937650386-0.520821730139j))*x_ref[0] + ((-0.326637187199-0.948343863579j))*x_ref[1]**o + ((0.518986481186+0.556856781809j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.374345081882+0.663469456913j)*x[0]**o + ((-0.367121902301+0.752263568876j))*x[0] + ((-0.514405481033+0.508264915653j))*x[1]**o + ((0.359023739535-0.362591151674j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.374345081882+0.663469456913j)*x_ref[0]**o + ((-0.367121902301+0.752263568876j))*x_ref[0] + ((-0.514405481033+0.508264915653j))*x_ref[1]**o + ((0.359023739535-0.362591151674j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.558865958216-0.329857594664j)*x[0]**o + ((0.900956386609+0.887957504594j))*x[0] + ((0.772275166309-0.0848877930913j))*x[1]**o + ((-0.247360239804+0.210223104195j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.558865958216-0.329857594664j)*x_ref[0]**o + ((0.900956386609+0.887957504594j))*x_ref[0] + ((0.772275166309-0.0848877930913j))*x_ref[1]**o + ((-0.247360239804+0.210223104195j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.696516444045-0.398824863236j)*x[0]**o + ((0.161235411346-0.904296164145j))*x[0] + ((0.71320599321+0.905782575586j))*x[1]**o + ((-0.272855858141+0.695763641455j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.696516444045-0.398824863236j)*x_ref[0]**o + ((0.161235411346-0.904296164145j))*x_ref[0] + ((0.71320599321+0.905782575586j))*x_ref[1]**o + ((-0.272855858141+0.695763641455j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.200141620561-0.10592979308j)*x[0]**o + ((-0.985485577537+0.250065190853j))*x[0] + ((0.219568703135-0.218943089962j))*x[1]**o + ((-0.111989897111-0.948451023185j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.200141620561-0.10592979308j)*x_ref[0]**o + ((-0.985485577537+0.250065190853j))*x_ref[0] + ((0.219568703135-0.218943089962j))*x_ref[1]**o + ((-0.111989897111-0.948451023185j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.352564576071-0.206819504487j)*x[0]**o + ((0.41579213493-0.75532448407j))*x[0] + ((0.419503215951-0.581957776164j))*x[1]**o + ((-0.460320057142+0.313925071494j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.352564576071-0.206819504487j)*x_ref[0]**o + ((0.41579213493-0.75532448407j))*x_ref[0] + ((0.419503215951-0.581957776164j))*x_ref[1]**o + ((-0.460320057142+0.313925071494j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.768490119896-0.261892368739j)*x[0]**o + ((0.462690186127-0.300152056244j))*x[0] + ((-0.096729040885-0.452203209454j))*x[1]**o + ((-0.110168408225+0.903426891027j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.768490119896-0.261892368739j)*x_ref[0]**o + ((0.462690186127-0.300152056244j))*x_ref[0] + ((-0.096729040885-0.452203209454j))*x_ref[1]**o + ((-0.110168408225+0.903426891027j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(-0.635881553631+0.175428092853j)*x[0]**o + ((-0.380876979071-0.54287013432j))*x[0] + ((-0.573462824151+0.4706236907j))*x[1]**o + ((-0.339866135673-0.123261171076j))*x[1]
+        ref[(1, 0, 2, 2)]=(-0.635881553631+0.175428092853j)*x_ref[0]**o + ((-0.380876979071-0.54287013432j))*x_ref[0] + ((-0.573462824151+0.4706236907j))*x_ref[1]**o + ((-0.339866135673-0.123261171076j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.845076747849+0.902410689411j)*x[0]**o + ((0.191897033262-0.298694537051j))*x[0] + ((-0.318618762818-0.973767981166j))*x[1]**o + ((-0.464629090777-0.619275343404j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.845076747849+0.902410689411j)*x_ref[0]**o + ((0.191897033262-0.298694537051j))*x_ref[0] + ((-0.318618762818-0.973767981166j))*x_ref[1]**o + ((-0.464629090777-0.619275343404j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(-0.380118358411+0.40471785283j)*x[0]**o + ((0.430101314905-0.345587303383j))*x[0] + ((-0.735737642239+0.854914193828j))*x[1]**o + ((-0.523953629472+0.20060588858j))*x[1]
+        ref[(1, 0, 3, 1)]=(-0.380118358411+0.40471785283j)*x_ref[0]**o + ((0.430101314905-0.345587303383j))*x_ref[0] + ((-0.735737642239+0.854914193828j))*x_ref[1]**o + ((-0.523953629472+0.20060588858j))*x_ref[1]
+        arg[(1, 0, 3, 2)]=(-0.0768219768181+0.842660700972j)*x[0]**o + ((0.486781854825+0.9699401333j))*x[0] + ((0.464989837155-0.0413989899967j))*x[1]**o + ((0.236080893173+0.330997910728j))*x[1]
+        ref[(1, 0, 3, 2)]=(-0.0768219768181+0.842660700972j)*x_ref[0]**o + ((0.486781854825+0.9699401333j))*x_ref[0] + ((0.464989837155-0.0413989899967j))*x_ref[1]**o + ((0.236080893173+0.330997910728j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.102666902861-0.982390295724j)*x[0]**o + ((-0.495370820854+0.90571044337j))*x[0] + ((-0.728996623637+0.474070043217j))*x[1]**o + ((-0.686263663966-0.696385108017j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.102666902861-0.982390295724j)*x_ref[0]**o + ((-0.495370820854+0.90571044337j))*x_ref[0] + ((-0.728996623637+0.474070043217j))*x_ref[1]**o + ((-0.686263663966-0.696385108017j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.268136367576+0.943219257018j)*x[0]**o + ((0.910807705294+0.990415542978j))*x[0] + ((-0.549517974491+0.084232478061j))*x[1]**o + ((0.671093462662+0.381380460695j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.268136367576+0.943219257018j)*x_ref[0]**o + ((0.910807705294+0.990415542978j))*x_ref[0] + ((-0.549517974491+0.084232478061j))*x_ref[1]**o + ((0.671093462662+0.381380460695j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.0228956328575+0.757516478233j)*x[0]**o + ((0.132169291728+0.108141195466j))*x[0] + ((-0.148051149936+0.417128536427j))*x[1]**o + ((-0.406727349327+0.898806314059j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.0228956328575+0.757516478233j)*x_ref[0]**o + ((0.132169291728+0.108141195466j))*x_ref[0] + ((-0.148051149936+0.417128536427j))*x_ref[1]**o + ((-0.406727349327+0.898806314059j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.978683372551-0.00709096339911j)*x[0]**o + ((0.914329248435+0.948747956318j))*x[0] + ((0.91228114846-0.437967583988j))*x[1]**o + ((-0.576629837922+0.904162218139j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.978683372551-0.00709096339911j)*x_ref[0]**o + ((0.914329248435+0.948747956318j))*x_ref[0] + ((0.91228114846-0.437967583988j))*x_ref[1]**o + ((-0.576629837922+0.904162218139j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.716448412567-0.309236177685j)*x[0]**o + ((-0.628936159619+0.501768281472j))*x[0] + ((0.661667776885-0.8537801951j))*x[1]**o + ((-0.580286967414-0.670569604138j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.716448412567-0.309236177685j)*x_ref[0]**o + ((-0.628936159619+0.501768281472j))*x_ref[0] + ((0.661667776885-0.8537801951j))*x_ref[1]**o + ((-0.580286967414-0.670569604138j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.718805536208-0.0181305814978j)*x[0]**o + ((-0.648104027079-0.953109800266j))*x[0] + ((0.371197486781-0.958443433837j))*x[1]**o + ((0.401757774089-0.038369215353j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.718805536208-0.0181305814978j)*x_ref[0]**o + ((-0.648104027079-0.953109800266j))*x_ref[0] + ((0.371197486781-0.958443433837j))*x_ref[1]**o + ((0.401757774089-0.038369215353j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.127716747515+0.456101514214j)*x[0]**o + ((-0.190409038584-0.8368844837j))*x[0] + ((-0.946549532972+0.913465694902j))*x[1]**o + ((0.91554259088+0.365408834273j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.127716747515+0.456101514214j)*x_ref[0]**o + ((-0.190409038584-0.8368844837j))*x_ref[0] + ((-0.946549532972+0.913465694902j))*x_ref[1]**o + ((0.91554259088+0.365408834273j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.524659034817+0.370557227345j)*x[0]**o + ((0.292448000946-0.44437784173j))*x[0] + ((-0.1100403797-0.735222401083j))*x[1]**o + ((-0.875858614953+0.788324487438j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.524659034817+0.370557227345j)*x_ref[0]**o + ((0.292448000946-0.44437784173j))*x_ref[0] + ((-0.1100403797-0.735222401083j))*x_ref[1]**o + ((-0.875858614953+0.788324487438j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(0.955617876681+0.982158625456j)*x[0]**o + ((-0.127995776692-0.03382792832j))*x[0] + ((0.363193182631+0.0808315730093j))*x[1]**o + ((0.507870659112+0.53181997967j))*x[1]
+        ref[(1, 1, 2, 2)]=(0.955617876681+0.982158625456j)*x_ref[0]**o + ((-0.127995776692-0.03382792832j))*x_ref[0] + ((0.363193182631+0.0808315730093j))*x_ref[1]**o + ((0.507870659112+0.53181997967j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(-0.613486472515-0.521361286172j)*x[0]**o + ((-0.576367214519-0.0188769014266j))*x[0] + ((-0.402484305563+0.817585662689j))*x[1]**o + ((0.075453027846+0.94138444315j))*x[1]
+        ref[(1, 1, 3, 0)]=(-0.613486472515-0.521361286172j)*x_ref[0]**o + ((-0.576367214519-0.0188769014266j))*x_ref[0] + ((-0.402484305563+0.817585662689j))*x_ref[1]**o + ((0.075453027846+0.94138444315j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.0415818390118+0.115763255809j)*x[0]**o + ((0.29194748271-0.611739052134j))*x[0] + ((0.624872695544-0.925947456163j))*x[1]**o + ((0.0767546024374-0.622104630592j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.0415818390118+0.115763255809j)*x_ref[0]**o + ((0.29194748271-0.611739052134j))*x_ref[0] + ((0.624872695544-0.925947456163j))*x_ref[1]**o + ((0.0767546024374-0.622104630592j))*x_ref[1]
+        arg[(1, 1, 3, 2)]=(0.558132636535-0.4839276621j)*x[0]**o + ((-0.769278615762+0.324005875691j))*x[0] + ((-0.39706230076-0.533491997774j))*x[1]**o + ((-0.721836784336-0.520319332198j))*x[1]
+        ref[(1, 1, 3, 2)]=(0.558132636535-0.4839276621j)*x_ref[0]**o + ((-0.769278615762+0.324005875691j))*x_ref[0] + ((-0.39706230076-0.533491997774j))*x_ref[1]**o + ((-0.721836784336-0.520319332198j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.940621349738+0.626420071789j)*x[0]**o + ((0.0462383416947-0.225217291014j))*x[0] + ((0.00945661489073+0.640247244634j))*x[1]**o + ((0.475108483747+0.715829911556j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.940621349738+0.626420071789j)*x_ref[0]**o + ((0.0462383416947-0.225217291014j))*x_ref[0] + ((0.00945661489073+0.640247244634j))*x_ref[1]**o + ((0.475108483747+0.715829911556j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.0142366741261-0.66846623248j)*x[0]**o + ((0.497204609301-0.654087413411j))*x[0] + ((-0.363761438568+0.278167779569j))*x[1]**o + ((-0.438964865863-0.487113162704j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.0142366741261-0.66846623248j)*x_ref[0]**o + ((0.497204609301-0.654087413411j))*x_ref[0] + ((-0.363761438568+0.278167779569j))*x_ref[1]**o + ((-0.438964865863-0.487113162704j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.987012326588+0.429874009239j)*x[0]**o + ((0.0551589198002+0.869559125087j))*x[0] + ((-0.275996286023+0.604792804338j))*x[1]**o + ((-0.690283747714-0.495629324908j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.987012326588+0.429874009239j)*x_ref[0]**o + ((0.0551589198002+0.869559125087j))*x_ref[0] + ((-0.275996286023+0.604792804338j))*x_ref[1]**o + ((-0.690283747714-0.495629324908j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.0336081599906-0.703467809667j)*x[0]**o + ((0.666143619212+0.582804555374j))*x[0] + ((0.427636268179+0.818932898913j))*x[1]**o + ((-0.692059114472+0.196121404035j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.0336081599906-0.703467809667j)*x_ref[0]**o + ((0.666143619212+0.582804555374j))*x_ref[0] + ((0.427636268179+0.818932898913j))*x_ref[1]**o + ((-0.692059114472+0.196121404035j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.316013363697+0.460862186184j)*x[0]**o + ((0.491612692313+0.392691773101j))*x[0] + ((-0.118024176153-0.342780133952j))*x[1]**o + ((0.867541263102-0.719961696556j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.316013363697+0.460862186184j)*x_ref[0]**o + ((0.491612692313+0.392691773101j))*x_ref[0] + ((-0.118024176153-0.342780133952j))*x_ref[1]**o + ((0.867541263102-0.719961696556j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.927447474437-0.329276458382j)*x[0]**o + ((0.311419136407+0.0828004756135j))*x[0] + ((0.544482832546-0.0482906492604j))*x[1]**o + ((-0.756077471876+0.318018509146j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.927447474437-0.329276458382j)*x_ref[0]**o + ((0.311419136407+0.0828004756135j))*x_ref[0] + ((0.544482832546-0.0482906492604j))*x_ref[1]**o + ((-0.756077471876+0.318018509146j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.580628505319+0.198372045622j)*x[0]**o + ((0.458096146954-0.628514760695j))*x[0] + ((0.000266288838007+0.443352436935j))*x[1]**o + ((0.431234328666+0.146927168473j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.580628505319+0.198372045622j)*x_ref[0]**o + ((0.458096146954-0.628514760695j))*x_ref[0] + ((0.000266288838007+0.443352436935j))*x_ref[1]**o + ((0.431234328666+0.146927168473j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(0.515995686247+0.80828354638j)*x[0]**o + ((0.310514520699+0.227298711383j))*x[0] + ((0.071184719684-0.730176238652j))*x[1]**o + ((-0.0211647517596-0.290524992343j))*x[1]
+        ref[(1, 2, 2, 1)]=(0.515995686247+0.80828354638j)*x_ref[0]**o + ((0.310514520699+0.227298711383j))*x_ref[0] + ((0.071184719684-0.730176238652j))*x_ref[1]**o + ((-0.0211647517596-0.290524992343j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(0.124733888114-0.172651183945j)*x[0]**o + ((-0.0330173194462+0.0587264928262j))*x[0] + ((-0.292723194018+0.544417839922j))*x[1]**o + ((0.245534143683-0.83201723901j))*x[1]
+        ref[(1, 2, 2, 2)]=(0.124733888114-0.172651183945j)*x_ref[0]**o + ((-0.0330173194462+0.0587264928262j))*x_ref[0] + ((-0.292723194018+0.544417839922j))*x_ref[1]**o + ((0.245534143683-0.83201723901j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(0.6846981502-0.682434374542j)*x[0]**o + ((-0.49732758796-0.0464921351734j))*x[0] + ((-0.00891898453217+0.963549719715j))*x[1]**o + ((-0.582234832618+0.258104373234j))*x[1]
+        ref[(1, 2, 3, 0)]=(0.6846981502-0.682434374542j)*x_ref[0]**o + ((-0.49732758796-0.0464921351734j))*x_ref[0] + ((-0.00891898453217+0.963549719715j))*x_ref[1]**o + ((-0.582234832618+0.258104373234j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(-0.829765636522-0.327217299853j)*x[0]**o + ((0.520427407632+0.82059707944j))*x[0] + ((0.268656528446+0.813483527279j))*x[1]**o + ((0.00982737088116+0.405149725508j))*x[1]
+        ref[(1, 2, 3, 1)]=(-0.829765636522-0.327217299853j)*x_ref[0]**o + ((0.520427407632+0.82059707944j))*x_ref[0] + ((0.268656528446+0.813483527279j))*x_ref[1]**o + ((0.00982737088116+0.405149725508j))*x_ref[1]
+        arg[(1, 2, 3, 2)]=(-0.104714328555-0.197886411518j)*x[0]**o + ((0.849285521304-0.891595424955j))*x[0] + ((0.195588340214-0.288253847526j))*x[1]**o + ((-0.660987636333-0.147252895002j))*x[1]
+        ref[(1, 2, 3, 2)]=(-0.104714328555-0.197886411518j)*x_ref[0]**o + ((0.849285521304-0.891595424955j))*x_ref[0] + ((0.195588340214-0.288253847526j))*x_ref[1]**o + ((-0.660987636333-0.147252895002j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.178659769463-0.65962582195j)*x[0]**o + ((-0.76017795524+0.707480465189j))*x[0] + ((-0.787104319603-0.206172077973j))*x[1]**o + ((0.0679717396675-0.588208684877j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.178659769463-0.65962582195j)*x_ref[0]**o + ((-0.76017795524+0.707480465189j))*x_ref[0] + ((-0.787104319603-0.206172077973j))*x_ref[1]**o + ((0.0679717396675-0.588208684877j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.135058637312-0.113247007519j)*x[0]**o + ((-0.0794880341143-0.942075225138j))*x[0] + ((-0.70727065653+0.832117333249j))*x[1]**o + ((-0.305850814988+0.593943752817j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.135058637312-0.113247007519j)*x_ref[0]**o + ((-0.0794880341143-0.942075225138j))*x_ref[0] + ((-0.70727065653+0.832117333249j))*x_ref[1]**o + ((-0.305850814988+0.593943752817j))*x_ref[1]
+        arg[(1, 3, 0, 2)]=(0.727754574622+0.218145960091j)*x[0]**o + ((-0.752207984971-0.161418735491j))*x[0] + ((0.501489712345+0.97614015773j))*x[1]**o + ((0.677802735222+0.0578201741502j))*x[1]
+        ref[(1, 3, 0, 2)]=(0.727754574622+0.218145960091j)*x_ref[0]**o + ((-0.752207984971-0.161418735491j))*x_ref[0] + ((0.501489712345+0.97614015773j))*x_ref[1]**o + ((0.677802735222+0.0578201741502j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.89922563317+0.559366187758j)*x[0]**o + ((-0.105829674908-0.264240155688j))*x[0] + ((-0.178359652402+0.881831004772j))*x[1]**o + ((0.981839819483+0.409882086259j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.89922563317+0.559366187758j)*x_ref[0]**o + ((-0.105829674908-0.264240155688j))*x_ref[0] + ((-0.178359652402+0.881831004772j))*x_ref[1]**o + ((0.981839819483+0.409882086259j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.59457386844-0.510829837911j)*x[0]**o + ((0.202107799175+0.922505138394j))*x[0] + ((0.504390950551+0.666624885278j))*x[1]**o + ((-0.229799745301+0.00232458366443j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.59457386844-0.510829837911j)*x_ref[0]**o + ((0.202107799175+0.922505138394j))*x_ref[0] + ((0.504390950551+0.666624885278j))*x_ref[1]**o + ((-0.229799745301+0.00232458366443j))*x_ref[1]
+        arg[(1, 3, 1, 2)]=(0.517200886609+0.327150309023j)*x[0]**o + ((0.723230827528+0.195351826366j))*x[0] + ((0.372578388016+0.20155694918j))*x[1]**o + ((0.321418239401-0.00261376789582j))*x[1]
+        ref[(1, 3, 1, 2)]=(0.517200886609+0.327150309023j)*x_ref[0]**o + ((0.723230827528+0.195351826366j))*x_ref[0] + ((0.372578388016+0.20155694918j))*x_ref[1]**o + ((0.321418239401-0.00261376789582j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(-0.0170144658291+0.69302605741j)*x[0]**o + ((0.0589239275917-0.817264123461j))*x[0] + ((-0.798588689956+0.0487030156603j))*x[1]**o + ((-0.105950399536+0.522666540482j))*x[1]
+        ref[(1, 3, 2, 0)]=(-0.0170144658291+0.69302605741j)*x_ref[0]**o + ((0.0589239275917-0.817264123461j))*x_ref[0] + ((-0.798588689956+0.0487030156603j))*x_ref[1]**o + ((-0.105950399536+0.522666540482j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(0.67331788976+0.391065773699j)*x[0]**o + ((-0.33350859032-0.590191091035j))*x[0] + ((0.932778755193-0.817719379765j))*x[1]**o + ((0.887463755279+0.341227429471j))*x[1]
+        ref[(1, 3, 2, 1)]=(0.67331788976+0.391065773699j)*x_ref[0]**o + ((-0.33350859032-0.590191091035j))*x_ref[0] + ((0.932778755193-0.817719379765j))*x_ref[1]**o + ((0.887463755279+0.341227429471j))*x_ref[1]
+        arg[(1, 3, 2, 2)]=(-0.1946096274+0.271964148735j)*x[0]**o + ((-0.617587021402+0.732088975111j))*x[0] + ((0.429775363062-0.906277801101j))*x[1]**o + ((-0.00681072892559+0.0708520014752j))*x[1]
+        ref[(1, 3, 2, 2)]=(-0.1946096274+0.271964148735j)*x_ref[0]**o + ((-0.617587021402+0.732088975111j))*x_ref[0] + ((0.429775363062-0.906277801101j))*x_ref[1]**o + ((-0.00681072892559+0.0708520014752j))*x_ref[1]
+        arg[(1, 3, 3, 0)]=(0.459333242828+0.847891731782j)*x[0]**o + ((-0.864287586741+0.345988824468j))*x[0] + ((-0.434516646434-0.310711266254j))*x[1]**o + ((0.344870444236-0.0719724582478j))*x[1]
+        ref[(1, 3, 3, 0)]=(0.459333242828+0.847891731782j)*x_ref[0]**o + ((-0.864287586741+0.345988824468j))*x_ref[0] + ((-0.434516646434-0.310711266254j))*x_ref[1]**o + ((0.344870444236-0.0719724582478j))*x_ref[1]
+        arg[(1, 3, 3, 1)]=(0.0460318558592+0.0824030222714j)*x[0]**o + ((-0.247271615525+0.996474899413j))*x[0] + ((-0.941127176498+0.40873063651j))*x[1]**o + ((-0.0112614922525+0.52920762109j))*x[1]
+        ref[(1, 3, 3, 1)]=(0.0460318558592+0.0824030222714j)*x_ref[0]**o + ((-0.247271615525+0.996474899413j))*x_ref[0] + ((-0.941127176498+0.40873063651j))*x_ref[1]**o + ((-0.0112614922525+0.52920762109j))*x_ref[1]
+        arg[(1, 3, 3, 2)]=(-0.908235190237+0.570377318543j)*x[0]**o + ((-0.221935183519-0.301465218721j))*x[0] + ((0.331974534636-0.309985960839j))*x[1]**o + ((-0.775706625225+0.874560605984j))*x[1]
+        ref[(1, 3, 3, 2)]=(-0.908235190237+0.570377318543j)*x_ref[0]**o + ((-0.221935183519-0.301465218721j))*x_ref[0] + ((0.331974534636-0.309985960839j))*x_ref[1]**o + ((-0.775706625225+0.874560605984j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.360801548503-0.620217933616j)*x[0]**o + ((0.0436741832722+0.244330589879j))*x[0] + ((-0.322191098896+0.477877930337j))*x[1]**o + ((-0.723033730849-0.0290304442839j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.360801548503-0.620217933616j)*x_ref[0]**o + ((0.0436741832722+0.244330589879j))*x_ref[0] + ((-0.322191098896+0.477877930337j))*x_ref[1]**o + ((-0.723033730849-0.0290304442839j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.537302931203+0.402700412326j)*x[0]**o + ((0.678413799076-0.937446726627j))*x[0] + ((0.123531183062+0.380220547738j))*x[1]**o + ((-0.940691661942+0.994956079857j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.537302931203+0.402700412326j)*x_ref[0]**o + ((0.678413799076-0.937446726627j))*x_ref[0] + ((0.123531183062+0.380220547738j))*x_ref[1]**o + ((-0.940691661942+0.994956079857j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.188393294662-0.498382263466j)*x[0]**o + ((0.73707016795-0.440386091641j))*x[0] + ((-0.739260810371-0.551755852167j))*x[1]**o + ((0.400877535474+0.238877632901j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.188393294662-0.498382263466j)*x_ref[0]**o + ((0.73707016795-0.440386091641j))*x_ref[0] + ((-0.739260810371-0.551755852167j))*x_ref[1]**o + ((0.400877535474+0.238877632901j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.517980417741+0.579007926491j)*x[0]**o + ((0.797514522181+0.307865773889j))*x[0] + ((0.189848767467-0.859062718904j))*x[1]**o + ((0.220397044142-0.331579233901j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.517980417741+0.579007926491j)*x_ref[0]**o + ((0.797514522181+0.307865773889j))*x_ref[0] + ((0.189848767467-0.859062718904j))*x_ref[1]**o + ((0.220397044142-0.331579233901j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.803707320713+0.98975405495j)*x[0]**o + ((-0.909971440477+0.761450088765j))*x[0] + ((0.316877723454-0.336301666211j))*x[1]**o + ((-0.384930619892+0.901161776594j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.803707320713+0.98975405495j)*x_ref[0]**o + ((-0.909971440477+0.761450088765j))*x_ref[0] + ((0.316877723454-0.336301666211j))*x_ref[1]**o + ((-0.384930619892+0.901161776594j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.373587911785+0.885018512122j)*x[0]**o + ((0.858333618106-0.833070584006j))*x[0] + ((-0.663804364788+0.428793059693j))*x[1]**o + ((-0.0688201431327+0.0729185388087j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.373587911785+0.885018512122j)*x_ref[0]**o + ((0.858333618106-0.833070584006j))*x_ref[0] + ((-0.663804364788+0.428793059693j))*x_ref[1]**o + ((-0.0688201431327+0.0729185388087j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.835792602155-0.600291623362j)*x[0]**o + ((-0.280182499691-0.221299580605j))*x[0] + ((0.88073936844-0.42765496703j))*x[1]**o + ((0.370166803788-0.0972239302233j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.835792602155-0.600291623362j)*x_ref[0]**o + ((-0.280182499691-0.221299580605j))*x_ref[0] + ((0.88073936844-0.42765496703j))*x_ref[1]**o + ((0.370166803788-0.0972239302233j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(-0.172704141881-0.0689139234205j)*x[0]**o + ((-0.244528840353-0.210072902408j))*x[0] + ((-0.703943070254-0.756013960945j))*x[1]**o + ((0.104854278463-0.0193580423088j))*x[1]
+        ref[(2, 0, 2, 1)]=(-0.172704141881-0.0689139234205j)*x_ref[0]**o + ((-0.244528840353-0.210072902408j))*x_ref[0] + ((-0.703943070254-0.756013960945j))*x_ref[1]**o + ((0.104854278463-0.0193580423088j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(0.0456701186039-0.498894319772j)*x[0]**o + ((0.618868641466+0.385815471477j))*x[0] + ((-0.415937847371-0.630994187204j))*x[1]**o + ((0.334034593326-0.231522350458j))*x[1]
+        ref[(2, 0, 2, 2)]=(0.0456701186039-0.498894319772j)*x_ref[0]**o + ((0.618868641466+0.385815471477j))*x_ref[0] + ((-0.415937847371-0.630994187204j))*x_ref[1]**o + ((0.334034593326-0.231522350458j))*x_ref[1]
+        arg[(2, 0, 3, 0)]=(0.945343139708-0.340299539926j)*x[0]**o + ((0.234669885513+0.0163326852514j))*x[0] + ((0.86497276496-0.117113593121j))*x[1]**o + ((0.180877980614-0.151566138865j))*x[1]
+        ref[(2, 0, 3, 0)]=(0.945343139708-0.340299539926j)*x_ref[0]**o + ((0.234669885513+0.0163326852514j))*x_ref[0] + ((0.86497276496-0.117113593121j))*x_ref[1]**o + ((0.180877980614-0.151566138865j))*x_ref[1]
+        arg[(2, 0, 3, 1)]=(0.734502221033-0.426302218161j)*x[0]**o + ((-0.752510461649+0.479329909158j))*x[0] + ((-0.417541344514-0.217049317018j))*x[1]**o + ((0.974559120323+0.429313540295j))*x[1]
+        ref[(2, 0, 3, 1)]=(0.734502221033-0.426302218161j)*x_ref[0]**o + ((-0.752510461649+0.479329909158j))*x_ref[0] + ((-0.417541344514-0.217049317018j))*x_ref[1]**o + ((0.974559120323+0.429313540295j))*x_ref[1]
+        arg[(2, 0, 3, 2)]=(-0.714706010479-0.697629643027j)*x[0]**o + ((-0.81541899086-0.88376040692j))*x[0] + ((0.0465603493769-0.288287107399j))*x[1]**o + ((0.166120319906+0.685823117328j))*x[1]
+        ref[(2, 0, 3, 2)]=(-0.714706010479-0.697629643027j)*x_ref[0]**o + ((-0.81541899086-0.88376040692j))*x_ref[0] + ((0.0465603493769-0.288287107399j))*x_ref[1]**o + ((0.166120319906+0.685823117328j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.138831999349+0.109737344492j)*x[0]**o + ((-0.306192385176-0.323230211403j))*x[0] + ((-0.436166011086-0.124294938599j))*x[1]**o + ((-0.409822838285+0.963161662596j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.138831999349+0.109737344492j)*x_ref[0]**o + ((-0.306192385176-0.323230211403j))*x_ref[0] + ((-0.436166011086-0.124294938599j))*x_ref[1]**o + ((-0.409822838285+0.963161662596j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.561670792659-0.230481970412j)*x[0]**o + ((-0.405791439373+0.312887885283j))*x[0] + ((0.635703332394-0.034941681292j))*x[1]**o + ((-0.622250423358-0.63410453892j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.561670792659-0.230481970412j)*x_ref[0]**o + ((-0.405791439373+0.312887885283j))*x_ref[0] + ((0.635703332394-0.034941681292j))*x_ref[1]**o + ((-0.622250423358-0.63410453892j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.233984920995+0.136923912608j)*x[0]**o + ((0.183383133098-0.924600888537j))*x[0] + ((0.497158855342+0.912542790981j))*x[1]**o + ((0.489170576447-0.263441906404j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.233984920995+0.136923912608j)*x_ref[0]**o + ((0.183383133098-0.924600888537j))*x_ref[0] + ((0.497158855342+0.912542790981j))*x_ref[1]**o + ((0.489170576447-0.263441906404j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.816995506402-0.897413005347j)*x[0]**o + ((-0.96669404458-0.718024760586j))*x[0] + ((-0.534574093872-0.187931096456j))*x[1]**o + ((0.711794245515-0.651559693003j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.816995506402-0.897413005347j)*x_ref[0]**o + ((-0.96669404458-0.718024760586j))*x_ref[0] + ((-0.534574093872-0.187931096456j))*x_ref[1]**o + ((0.711794245515-0.651559693003j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.808824788796-0.722705643884j)*x[0]**o + ((0.687877411689-0.119126591947j))*x[0] + ((0.124143301587+0.479655039439j))*x[1]**o + ((-0.111549509076+0.819779514162j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.808824788796-0.722705643884j)*x_ref[0]**o + ((0.687877411689-0.119126591947j))*x_ref[0] + ((0.124143301587+0.479655039439j))*x_ref[1]**o + ((-0.111549509076+0.819779514162j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.00796709796962+0.850479185909j)*x[0]**o + ((0.869798589954+0.817290938838j))*x[0] + ((-0.64132990087-0.454907277553j))*x[1]**o + ((0.643159151289-0.24723617401j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.00796709796962+0.850479185909j)*x_ref[0]**o + ((0.869798589954+0.817290938838j))*x_ref[0] + ((-0.64132990087-0.454907277553j))*x_ref[1]**o + ((0.643159151289-0.24723617401j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.782668462213-0.0260042395535j)*x[0]**o + ((0.342100643298+0.564597619263j))*x[0] + ((0.950148917426-0.957221839874j))*x[1]**o + ((-0.740534679107+0.0704767672017j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.782668462213-0.0260042395535j)*x_ref[0]**o + ((0.342100643298+0.564597619263j))*x_ref[0] + ((0.950148917426-0.957221839874j))*x_ref[1]**o + ((-0.740534679107+0.0704767672017j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.31972186106+0.204129227778j)*x[0]**o + ((0.898257438137+0.585030703619j))*x[0] + ((-0.295789838606+0.769770400712j))*x[1]**o + ((-0.0101179434408-0.876072196074j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.31972186106+0.204129227778j)*x_ref[0]**o + ((0.898257438137+0.585030703619j))*x_ref[0] + ((-0.295789838606+0.769770400712j))*x_ref[1]**o + ((-0.0101179434408-0.876072196074j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(-0.635709317918-0.0309167315334j)*x[0]**o + ((-0.731615726769-0.921097252094j))*x[0] + ((-0.802379558558-0.519513798781j))*x[1]**o + ((0.375708685378-0.5805156767j))*x[1]
+        ref[(2, 1, 2, 2)]=(-0.635709317918-0.0309167315334j)*x_ref[0]**o + ((-0.731615726769-0.921097252094j))*x_ref[0] + ((-0.802379558558-0.519513798781j))*x_ref[1]**o + ((0.375708685378-0.5805156767j))*x_ref[1]
+        arg[(2, 1, 3, 0)]=(0.380851498453-0.559141567589j)*x[0]**o + ((0.759819199312+0.70144599821j))*x[0] + ((-0.692469743647-0.86653791446j))*x[1]**o + ((0.295854097992+0.419393769736j))*x[1]
+        ref[(2, 1, 3, 0)]=(0.380851498453-0.559141567589j)*x_ref[0]**o + ((0.759819199312+0.70144599821j))*x_ref[0] + ((-0.692469743647-0.86653791446j))*x_ref[1]**o + ((0.295854097992+0.419393769736j))*x_ref[1]
+        arg[(2, 1, 3, 1)]=(-0.891260564267+0.131070105978j)*x[0]**o + ((0.355007664467+0.801617154442j))*x[0] + ((-0.16764478446-0.32991109866j))*x[1]**o + ((-0.743338908314-0.44635675983j))*x[1]
+        ref[(2, 1, 3, 1)]=(-0.891260564267+0.131070105978j)*x_ref[0]**o + ((0.355007664467+0.801617154442j))*x_ref[0] + ((-0.16764478446-0.32991109866j))*x_ref[1]**o + ((-0.743338908314-0.44635675983j))*x_ref[1]
+        arg[(2, 1, 3, 2)]=(-0.948998003127+0.986427658888j)*x[0]**o + ((0.038315210403+0.454711211573j))*x[0] + ((-0.953091354727-0.287123479159j))*x[1]**o + ((0.527404974896-0.0893491126723j))*x[1]
+        ref[(2, 1, 3, 2)]=(-0.948998003127+0.986427658888j)*x_ref[0]**o + ((0.038315210403+0.454711211573j))*x_ref[0] + ((-0.953091354727-0.287123479159j))*x_ref[1]**o + ((0.527404974896-0.0893491126723j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.573428160166+0.892789167817j)*x[0]**o + ((-0.0870338427023-0.222927807885j))*x[0] + ((0.34133366267+0.142693601166j))*x[1]**o + ((0.714225724137+0.277062910601j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.573428160166+0.892789167817j)*x_ref[0]**o + ((-0.0870338427023-0.222927807885j))*x_ref[0] + ((0.34133366267+0.142693601166j))*x_ref[1]**o + ((0.714225724137+0.277062910601j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.701129575268-0.715969837851j)*x[0]**o + ((0.91830887453-0.889220015456j))*x[0] + ((-0.989124278875-0.0323409671023j))*x[1]**o + ((-0.969255434807-0.179330425575j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.701129575268-0.715969837851j)*x_ref[0]**o + ((0.91830887453-0.889220015456j))*x_ref[0] + ((-0.989124278875-0.0323409671023j))*x_ref[1]**o + ((-0.969255434807-0.179330425575j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(0.165756614084+0.184903725609j)*x[0]**o + ((0.959341111441+0.432495883329j))*x[0] + ((-0.260231175735-0.765805080451j))*x[1]**o + ((-0.685253353576-0.0197266324423j))*x[1]
+        ref[(2, 2, 0, 2)]=(0.165756614084+0.184903725609j)*x_ref[0]**o + ((0.959341111441+0.432495883329j))*x_ref[0] + ((-0.260231175735-0.765805080451j))*x_ref[1]**o + ((-0.685253353576-0.0197266324423j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.929953949716-0.120069671561j)*x[0]**o + ((0.796925126118+0.817756057513j))*x[0] + ((0.373099704321-0.797438633147j))*x[1]**o + ((0.498632684526+0.472052113526j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.929953949716-0.120069671561j)*x_ref[0]**o + ((0.796925126118+0.817756057513j))*x_ref[0] + ((0.373099704321-0.797438633147j))*x_ref[1]**o + ((0.498632684526+0.472052113526j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.235704719811+0.549628737586j)*x[0]**o + ((0.162129156584-0.566662535017j))*x[0] + ((0.959034410229+0.447489932844j))*x[1]**o + ((0.865066043598-0.820025916505j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.235704719811+0.549628737586j)*x_ref[0]**o + ((0.162129156584-0.566662535017j))*x_ref[0] + ((0.959034410229+0.447489932844j))*x_ref[1]**o + ((0.865066043598-0.820025916505j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(0.852679226107-0.238790636341j)*x[0]**o + ((0.798766483269-0.102202604495j))*x[0] + ((-0.368900641044+0.920447158152j))*x[1]**o + ((-0.31088982997+0.498869999575j))*x[1]
+        ref[(2, 2, 1, 2)]=(0.852679226107-0.238790636341j)*x_ref[0]**o + ((0.798766483269-0.102202604495j))*x_ref[0] + ((-0.368900641044+0.920447158152j))*x_ref[1]**o + ((-0.31088982997+0.498869999575j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(-0.28795550916-0.57054713598j)*x[0]**o + ((0.342645749419-0.971019782166j))*x[0] + ((0.324648449778+0.801564386189j))*x[1]**o + ((0.400896111494+0.850769583166j))*x[1]
+        ref[(2, 2, 2, 0)]=(-0.28795550916-0.57054713598j)*x_ref[0]**o + ((0.342645749419-0.971019782166j))*x_ref[0] + ((0.324648449778+0.801564386189j))*x_ref[1]**o + ((0.400896111494+0.850769583166j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(-0.526598675601-0.685849945484j)*x[0]**o + ((-0.575537001733+0.382875612443j))*x[0] + ((0.296276074396+0.179670921072j))*x[1]**o + ((-0.177245051749-0.0197168285068j))*x[1]
+        ref[(2, 2, 2, 1)]=(-0.526598675601-0.685849945484j)*x_ref[0]**o + ((-0.575537001733+0.382875612443j))*x_ref[0] + ((0.296276074396+0.179670921072j))*x_ref[1]**o + ((-0.177245051749-0.0197168285068j))*x_ref[1]
+        arg[(2, 2, 2, 2)]=(-0.0808451090791-0.099388037665j)*x[0]**o + ((-0.504642864485-0.795070424251j))*x[0] + ((-0.620624800328+0.0442331087476j))*x[1]**o + ((-0.216919096866-0.718618582028j))*x[1]
+        ref[(2, 2, 2, 2)]=(-0.0808451090791-0.099388037665j)*x_ref[0]**o + ((-0.504642864485-0.795070424251j))*x_ref[0] + ((-0.620624800328+0.0442331087476j))*x_ref[1]**o + ((-0.216919096866-0.718618582028j))*x_ref[1]
+        arg[(2, 2, 3, 0)]=(-0.829572233357+0.528192344641j)*x[0]**o + ((0.490155177989+0.353564216276j))*x[0] + ((-0.789783347616+0.191487720269j))*x[1]**o + ((0.0175287771469-0.452648863488j))*x[1]
+        ref[(2, 2, 3, 0)]=(-0.829572233357+0.528192344641j)*x_ref[0]**o + ((0.490155177989+0.353564216276j))*x_ref[0] + ((-0.789783347616+0.191487720269j))*x_ref[1]**o + ((0.0175287771469-0.452648863488j))*x_ref[1]
+        arg[(2, 2, 3, 1)]=(-0.516927580815-0.238290464318j)*x[0]**o + ((-0.409642329771-0.044131443193j))*x[0] + ((0.7396150398-0.924730141519j))*x[1]**o + ((0.000424516065639-0.0279782302118j))*x[1]
+        ref[(2, 2, 3, 1)]=(-0.516927580815-0.238290464318j)*x_ref[0]**o + ((-0.409642329771-0.044131443193j))*x_ref[0] + ((0.7396150398-0.924730141519j))*x_ref[1]**o + ((0.000424516065639-0.0279782302118j))*x_ref[1]
+        arg[(2, 2, 3, 2)]=(-0.448082425433+0.452495041671j)*x[0]**o + ((0.562586015349-0.582039176515j))*x[0] + ((0.432190624003-0.254224152988j))*x[1]**o + ((0.0804059083782+0.914914797845j))*x[1]
+        ref[(2, 2, 3, 2)]=(-0.448082425433+0.452495041671j)*x_ref[0]**o + ((0.562586015349-0.582039176515j))*x_ref[0] + ((0.432190624003-0.254224152988j))*x_ref[1]**o + ((0.0804059083782+0.914914797845j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(0.813682182973+0.152362825703j)*x[0]**o + ((-0.139601960761-0.667986060586j))*x[0] + ((0.108865757724-0.769549090456j))*x[1]**o + ((0.364311697017-0.252329719997j))*x[1]
+        ref[(2, 3, 0, 0)]=(0.813682182973+0.152362825703j)*x_ref[0]**o + ((-0.139601960761-0.667986060586j))*x_ref[0] + ((0.108865757724-0.769549090456j))*x_ref[1]**o + ((0.364311697017-0.252329719997j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(0.394614901498-0.30385516101j)*x[0]**o + ((-0.176412645758-0.979248606847j))*x[0] + ((-0.600967286993-0.203917617665j))*x[1]**o + ((-0.765936787791+0.0192857699164j))*x[1]
+        ref[(2, 3, 0, 1)]=(0.394614901498-0.30385516101j)*x_ref[0]**o + ((-0.176412645758-0.979248606847j))*x_ref[0] + ((-0.600967286993-0.203917617665j))*x_ref[1]**o + ((-0.765936787791+0.0192857699164j))*x_ref[1]
+        arg[(2, 3, 0, 2)]=(-0.289339685907+0.795282214433j)*x[0]**o + ((-0.415804977834+0.0508881419819j))*x[0] + ((0.0982378806406-0.092775945986j))*x[1]**o + ((-0.319696694663-0.602754181059j))*x[1]
+        ref[(2, 3, 0, 2)]=(-0.289339685907+0.795282214433j)*x_ref[0]**o + ((-0.415804977834+0.0508881419819j))*x_ref[0] + ((0.0982378806406-0.092775945986j))*x_ref[1]**o + ((-0.319696694663-0.602754181059j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(-0.481105101387-0.542146303513j)*x[0]**o + ((0.626819867071+0.507981661783j))*x[0] + ((0.413606000867+0.0936549972457j))*x[1]**o + ((-0.273876751239+0.26450112843j))*x[1]
+        ref[(2, 3, 1, 0)]=(-0.481105101387-0.542146303513j)*x_ref[0]**o + ((0.626819867071+0.507981661783j))*x_ref[0] + ((0.413606000867+0.0936549972457j))*x_ref[1]**o + ((-0.273876751239+0.26450112843j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(-0.767187395255-0.203530243527j)*x[0]**o + ((-0.245071396612+0.577611097695j))*x[0] + ((-0.0541656611106-0.706637795252j))*x[1]**o + ((-0.50497769715+0.36790289256j))*x[1]
+        ref[(2, 3, 1, 1)]=(-0.767187395255-0.203530243527j)*x_ref[0]**o + ((-0.245071396612+0.577611097695j))*x_ref[0] + ((-0.0541656611106-0.706637795252j))*x_ref[1]**o + ((-0.50497769715+0.36790289256j))*x_ref[1]
+        arg[(2, 3, 1, 2)]=(0.696280452468+0.541112038738j)*x[0]**o + ((-0.525872159663-0.629409351477j))*x[0] + ((0.225173058299-0.712998502197j))*x[1]**o + ((-0.297056914069-0.431854393818j))*x[1]
+        ref[(2, 3, 1, 2)]=(0.696280452468+0.541112038738j)*x_ref[0]**o + ((-0.525872159663-0.629409351477j))*x_ref[0] + ((0.225173058299-0.712998502197j))*x_ref[1]**o + ((-0.297056914069-0.431854393818j))*x_ref[1]
+        arg[(2, 3, 2, 0)]=(-0.425299887441+0.772960355546j)*x[0]**o + ((0.214088969966+0.781796205506j))*x[0] + ((-0.468809039368+0.196196652396j))*x[1]**o + ((0.39166159046+0.30389207044j))*x[1]
+        ref[(2, 3, 2, 0)]=(-0.425299887441+0.772960355546j)*x_ref[0]**o + ((0.214088969966+0.781796205506j))*x_ref[0] + ((-0.468809039368+0.196196652396j))*x_ref[1]**o + ((0.39166159046+0.30389207044j))*x_ref[1]
+        arg[(2, 3, 2, 1)]=(-0.386646686583+0.181202203304j)*x[0]**o + ((-0.644600719283-0.69948109206j))*x[0] + ((-0.332128330395+0.212607465726j))*x[1]**o + ((0.945814684466-0.49344735906j))*x[1]
+        ref[(2, 3, 2, 1)]=(-0.386646686583+0.181202203304j)*x_ref[0]**o + ((-0.644600719283-0.69948109206j))*x_ref[0] + ((-0.332128330395+0.212607465726j))*x_ref[1]**o + ((0.945814684466-0.49344735906j))*x_ref[1]
+        arg[(2, 3, 2, 2)]=(0.351285410344+0.43563498248j)*x[0]**o + ((0.360166954821-0.828163114726j))*x[0] + ((0.367868410856+0.988382616296j))*x[1]**o + ((0.473116406136-0.343865521897j))*x[1]
+        ref[(2, 3, 2, 2)]=(0.351285410344+0.43563498248j)*x_ref[0]**o + ((0.360166954821-0.828163114726j))*x_ref[0] + ((0.367868410856+0.988382616296j))*x_ref[1]**o + ((0.473116406136-0.343865521897j))*x_ref[1]
+        arg[(2, 3, 3, 0)]=(-0.21579555841+0.093519947566j)*x[0]**o + ((0.289395608818+0.848044714853j))*x[0] + ((0.319242481683-0.178586816467j))*x[1]**o + ((-0.00752447638719+0.854051273647j))*x[1]
+        ref[(2, 3, 3, 0)]=(-0.21579555841+0.093519947566j)*x_ref[0]**o + ((0.289395608818+0.848044714853j))*x_ref[0] + ((0.319242481683-0.178586816467j))*x_ref[1]**o + ((-0.00752447638719+0.854051273647j))*x_ref[1]
+        arg[(2, 3, 3, 1)]=(0.721193450089+0.757897589077j)*x[0]**o + ((0.403970578783+0.710742334543j))*x[0] + ((-0.413859539978-0.290045172398j))*x[1]**o + ((-0.958613015528+0.323951743311j))*x[1]
+        ref[(2, 3, 3, 1)]=(0.721193450089+0.757897589077j)*x_ref[0]**o + ((0.403970578783+0.710742334543j))*x_ref[0] + ((-0.413859539978-0.290045172398j))*x_ref[1]**o + ((-0.958613015528+0.323951743311j))*x_ref[1]
+        arg[(2, 3, 3, 2)]=(0.859278078077+0.507079657976j)*x[0]**o + ((0.405960019001-0.843513275244j))*x[0] + ((-0.85096168307+0.121960183154j))*x[1]**o + ((0.0944488875487-0.953073600314j))*x[1]
+        ref[(2, 3, 3, 2)]=(0.859278078077+0.507079657976j)*x_ref[0]**o + ((0.405960019001-0.843513275244j))*x_ref[0] + ((-0.85096168307+0.121960183154j))*x_ref[1]**o + ((0.0944488875487-0.953073600314j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.127791758149-0.0928252421482j)*x[0]**o + ((0.905625142132-0.778843712792j))*x[0] + ((0.882950087409+0.637116317991j))*x[1]**o + ((-0.966160333222+0.310050602913j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.127791758149-0.0928252421482j)*x_ref[0]**o + ((0.905625142132-0.778843712792j))*x_ref[0] + ((0.882950087409+0.637116317991j))*x_ref[1]**o + ((-0.966160333222+0.310050602913j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(-0.597533838822+0.890809955558j)*x[0]**o + ((0.586925708447-0.38311714547j))*x[0] + ((0.0520852266657-0.530476938506j))*x[1]**o + ((-0.930817860921-0.599173699931j))*x[1]
+        ref[(3, 0, 0, 1)]=(-0.597533838822+0.890809955558j)*x_ref[0]**o + ((0.586925708447-0.38311714547j))*x_ref[0] + ((0.0520852266657-0.530476938506j))*x_ref[1]**o + ((-0.930817860921-0.599173699931j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(0.913244323918-0.555084205846j)*x[0]**o + ((0.638629386651-0.251407273154j))*x[0] + ((-0.747903925128+0.590492817331j))*x[1]**o + ((-0.991661570546+0.10205604318j))*x[1]
+        ref[(3, 0, 0, 2)]=(0.913244323918-0.555084205846j)*x_ref[0]**o + ((0.638629386651-0.251407273154j))*x_ref[0] + ((-0.747903925128+0.590492817331j))*x_ref[1]**o + ((-0.991661570546+0.10205604318j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.634576625821-0.890808306642j)*x[0]**o + ((0.366987517626-0.276438844269j))*x[0] + ((0.447859619622-0.657488879399j))*x[1]**o + ((0.507497315279+0.122592904374j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.634576625821-0.890808306642j)*x_ref[0]**o + ((0.366987517626-0.276438844269j))*x_ref[0] + ((0.447859619622-0.657488879399j))*x_ref[1]**o + ((0.507497315279+0.122592904374j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.0761470075399-0.351012785868j)*x[0]**o + ((-0.173191480842+0.104916832907j))*x[0] + ((0.319909391989+0.314839789783j))*x[1]**o + ((-0.833583191372-0.53563445211j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.0761470075399-0.351012785868j)*x_ref[0]**o + ((-0.173191480842+0.104916832907j))*x_ref[0] + ((0.319909391989+0.314839789783j))*x_ref[1]**o + ((-0.833583191372-0.53563445211j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(0.313132921825-0.84582290368j)*x[0]**o + ((-0.702647630703-0.500976603038j))*x[0] + ((-0.0944753182265-0.9012994005j))*x[1]**o + ((-0.902801042432-0.959701328354j))*x[1]
+        ref[(3, 0, 1, 2)]=(0.313132921825-0.84582290368j)*x_ref[0]**o + ((-0.702647630703-0.500976603038j))*x_ref[0] + ((-0.0944753182265-0.9012994005j))*x_ref[1]**o + ((-0.902801042432-0.959701328354j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(0.461665909193+0.507235070214j)*x[0]**o + ((0.302836154294+0.704572368986j))*x[0] + ((0.80113363353+0.672980794979j))*x[1]**o + ((-0.376703705319-0.344359901253j))*x[1]
+        ref[(3, 0, 2, 0)]=(0.461665909193+0.507235070214j)*x_ref[0]**o + ((0.302836154294+0.704572368986j))*x_ref[0] + ((0.80113363353+0.672980794979j))*x_ref[1]**o + ((-0.376703705319-0.344359901253j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(-0.8854473329+0.769950496771j)*x[0]**o + ((0.916687149734+0.867878592272j))*x[0] + ((-0.977668648118-0.538569249269j))*x[1]**o + ((0.989422631572-0.0709990857991j))*x[1]
+        ref[(3, 0, 2, 1)]=(-0.8854473329+0.769950496771j)*x_ref[0]**o + ((0.916687149734+0.867878592272j))*x_ref[0] + ((-0.977668648118-0.538569249269j))*x_ref[1]**o + ((0.989422631572-0.0709990857991j))*x_ref[1]
+        arg[(3, 0, 2, 2)]=(-0.259846811278+0.619650940424j)*x[0]**o + ((-0.0907761891575-0.562370847151j))*x[0] + ((-0.0348313578218-0.761585189338j))*x[1]**o + ((0.410824342266-0.997519178896j))*x[1]
+        ref[(3, 0, 2, 2)]=(-0.259846811278+0.619650940424j)*x_ref[0]**o + ((-0.0907761891575-0.562370847151j))*x_ref[0] + ((-0.0348313578218-0.761585189338j))*x_ref[1]**o + ((0.410824342266-0.997519178896j))*x_ref[1]
+        arg[(3, 0, 3, 0)]=(0.420181096516+0.734952464725j)*x[0]**o + ((0.39480858136+0.631216754439j))*x[0] + ((0.755396118892+0.754998405931j))*x[1]**o + ((0.957917895083-0.389173832773j))*x[1]
+        ref[(3, 0, 3, 0)]=(0.420181096516+0.734952464725j)*x_ref[0]**o + ((0.39480858136+0.631216754439j))*x_ref[0] + ((0.755396118892+0.754998405931j))*x_ref[1]**o + ((0.957917895083-0.389173832773j))*x_ref[1]
+        arg[(3, 0, 3, 1)]=(-0.775581437466-0.156056375529j)*x[0]**o + ((0.566584487475+0.259111239661j))*x[0] + ((0.0556032708102-0.487560787456j))*x[1]**o + ((-0.457706574636-0.334307699155j))*x[1]
+        ref[(3, 0, 3, 1)]=(-0.775581437466-0.156056375529j)*x_ref[0]**o + ((0.566584487475+0.259111239661j))*x_ref[0] + ((0.0556032708102-0.487560787456j))*x_ref[1]**o + ((-0.457706574636-0.334307699155j))*x_ref[1]
+        arg[(3, 0, 3, 2)]=(0.881652181601-0.306807788471j)*x[0]**o + ((0.524966794786-0.867812446342j))*x[0] + ((0.6404128572-0.0328540230554j))*x[1]**o + ((-0.137624828044-0.797969037414j))*x[1]
+        ref[(3, 0, 3, 2)]=(0.881652181601-0.306807788471j)*x_ref[0]**o + ((0.524966794786-0.867812446342j))*x_ref[0] + ((0.6404128572-0.0328540230554j))*x_ref[1]**o + ((-0.137624828044-0.797969037414j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.402081835527+0.740511625774j)*x[0]**o + ((0.380660478736-0.191126742891j))*x[0] + ((0.518472405817-0.455814252267j))*x[1]**o + ((-0.463422489448+0.877287084533j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.402081835527+0.740511625774j)*x_ref[0]**o + ((0.380660478736-0.191126742891j))*x_ref[0] + ((0.518472405817-0.455814252267j))*x_ref[1]**o + ((-0.463422489448+0.877287084533j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.720024141156+0.708843874393j)*x[0]**o + ((-0.892080887163+0.651271199436j))*x[0] + ((-0.499877143332-0.648945744008j))*x[1]**o + ((-0.660698423079+0.481766310449j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.720024141156+0.708843874393j)*x_ref[0]**o + ((-0.892080887163+0.651271199436j))*x_ref[0] + ((-0.499877143332-0.648945744008j))*x_ref[1]**o + ((-0.660698423079+0.481766310449j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(-0.727091851065+0.257871132058j)*x[0]**o + ((0.320829802316-0.915364194817j))*x[0] + ((0.0989640294682+0.161529812162j))*x[1]**o + ((0.807773330501+0.948620830585j))*x[1]
+        ref[(3, 1, 0, 2)]=(-0.727091851065+0.257871132058j)*x_ref[0]**o + ((0.320829802316-0.915364194817j))*x_ref[0] + ((0.0989640294682+0.161529812162j))*x_ref[1]**o + ((0.807773330501+0.948620830585j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.742000892629-0.078095799245j)*x[0]**o + ((0.267021131659-0.114591841676j))*x[0] + ((0.299206203934+0.737289463559j))*x[1]**o + ((-0.899807122045-0.609848335475j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.742000892629-0.078095799245j)*x_ref[0]**o + ((0.267021131659-0.114591841676j))*x_ref[0] + ((0.299206203934+0.737289463559j))*x_ref[1]**o + ((-0.899807122045-0.609848335475j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.00505908381461+0.55528962989j)*x[0]**o + ((0.714810088842-0.235249167875j))*x[0] + ((-0.853940990752+0.955319590129j))*x[1]**o + ((-0.000790306633422+0.893714550875j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.00505908381461+0.55528962989j)*x_ref[0]**o + ((0.714810088842-0.235249167875j))*x_ref[0] + ((-0.853940990752+0.955319590129j))*x_ref[1]**o + ((-0.000790306633422+0.893714550875j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(0.201336528417-0.0606554970023j)*x[0]**o + ((0.743920620485+0.652823480347j))*x[0] + ((-0.331832088243+0.390053511118j))*x[1]**o + ((0.347884372463+0.93373211684j))*x[1]
+        ref[(3, 1, 1, 2)]=(0.201336528417-0.0606554970023j)*x_ref[0]**o + ((0.743920620485+0.652823480347j))*x_ref[0] + ((-0.331832088243+0.390053511118j))*x_ref[1]**o + ((0.347884372463+0.93373211684j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(0.17339117305-0.463459890792j)*x[0]**o + ((0.0249817073071-0.940425652492j))*x[0] + ((0.626658583454-0.00442755071317j))*x[1]**o + ((0.29248704358+0.446747406229j))*x[1]
+        ref[(3, 1, 2, 0)]=(0.17339117305-0.463459890792j)*x_ref[0]**o + ((0.0249817073071-0.940425652492j))*x_ref[0] + ((0.626658583454-0.00442755071317j))*x_ref[1]**o + ((0.29248704358+0.446747406229j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(0.896492853686+0.241839444973j)*x[0]**o + ((-0.444490110655-0.846139996209j))*x[0] + ((0.344053914049-0.057161668409j))*x[1]**o + ((-0.0942945685929-0.376465505193j))*x[1]
+        ref[(3, 1, 2, 1)]=(0.896492853686+0.241839444973j)*x_ref[0]**o + ((-0.444490110655-0.846139996209j))*x_ref[0] + ((0.344053914049-0.057161668409j))*x_ref[1]**o + ((-0.0942945685929-0.376465505193j))*x_ref[1]
+        arg[(3, 1, 2, 2)]=(0.382147276598+0.292299830177j)*x[0]**o + ((-0.610323951508+0.402024122601j))*x[0] + ((-0.995837633656-0.711813713997j))*x[1]**o + ((0.0112458604345-0.716703252043j))*x[1]
+        ref[(3, 1, 2, 2)]=(0.382147276598+0.292299830177j)*x_ref[0]**o + ((-0.610323951508+0.402024122601j))*x_ref[0] + ((-0.995837633656-0.711813713997j))*x_ref[1]**o + ((0.0112458604345-0.716703252043j))*x_ref[1]
+        arg[(3, 1, 3, 0)]=(-0.517678779484-0.534973463803j)*x[0]**o + ((0.924055094929+0.204231641379j))*x[0] + ((-0.287600040007-0.483625323527j))*x[1]**o + ((0.23021404604-0.607891356254j))*x[1]
+        ref[(3, 1, 3, 0)]=(-0.517678779484-0.534973463803j)*x_ref[0]**o + ((0.924055094929+0.204231641379j))*x_ref[0] + ((-0.287600040007-0.483625323527j))*x_ref[1]**o + ((0.23021404604-0.607891356254j))*x_ref[1]
+        arg[(3, 1, 3, 1)]=(-0.92322650687-0.512103553572j)*x[0]**o + ((0.483518704976+0.467799358317j))*x[0] + ((-0.917828550478-0.172901622887j))*x[1]**o + ((0.150007809343-0.528063590845j))*x[1]
+        ref[(3, 1, 3, 1)]=(-0.92322650687-0.512103553572j)*x_ref[0]**o + ((0.483518704976+0.467799358317j))*x_ref[0] + ((-0.917828550478-0.172901622887j))*x_ref[1]**o + ((0.150007809343-0.528063590845j))*x_ref[1]
+        arg[(3, 1, 3, 2)]=(0.103824720656+0.593384758256j)*x[0]**o + ((-0.948964946509-0.0384003412334j))*x[0] + ((-0.949305587676-0.295624326639j))*x[1]**o + ((0.839540484505-0.0361771138759j))*x[1]
+        ref[(3, 1, 3, 2)]=(0.103824720656+0.593384758256j)*x_ref[0]**o + ((-0.948964946509-0.0384003412334j))*x_ref[0] + ((-0.949305587676-0.295624326639j))*x_ref[1]**o + ((0.839540484505-0.0361771138759j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(0.483304623617-0.698899893911j)*x[0]**o + ((0.974715705881+0.581764783279j))*x[0] + ((0.369758922451-0.321509115224j))*x[1]**o + ((0.398944692107+0.512192637765j))*x[1]
+        ref[(3, 2, 0, 0)]=(0.483304623617-0.698899893911j)*x_ref[0]**o + ((0.974715705881+0.581764783279j))*x_ref[0] + ((0.369758922451-0.321509115224j))*x_ref[1]**o + ((0.398944692107+0.512192637765j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(0.368142435241-0.843085731859j)*x[0]**o + ((0.590435301254-0.222759331604j))*x[0] + ((-0.533510698506+0.0773764455431j))*x[1]**o + ((0.669128041183+0.124218627056j))*x[1]
+        ref[(3, 2, 0, 1)]=(0.368142435241-0.843085731859j)*x_ref[0]**o + ((0.590435301254-0.222759331604j))*x_ref[0] + ((-0.533510698506+0.0773764455431j))*x_ref[1]**o + ((0.669128041183+0.124218627056j))*x_ref[1]
+        arg[(3, 2, 0, 2)]=(0.0699405028001+0.13425286866j)*x[0]**o + ((-0.596390191254+0.323269791659j))*x[0] + ((-0.770845066687+0.382962054956j))*x[1]**o + ((0.674910907255-0.689064769541j))*x[1]
+        ref[(3, 2, 0, 2)]=(0.0699405028001+0.13425286866j)*x_ref[0]**o + ((-0.596390191254+0.323269791659j))*x_ref[0] + ((-0.770845066687+0.382962054956j))*x_ref[1]**o + ((0.674910907255-0.689064769541j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(-0.256511395694+0.375054518006j)*x[0]**o + ((-0.645997602972-0.703023052342j))*x[0] + ((-0.64657131507-0.128909860135j))*x[1]**o + ((-0.60845200464-0.908991499583j))*x[1]
+        ref[(3, 2, 1, 0)]=(-0.256511395694+0.375054518006j)*x_ref[0]**o + ((-0.645997602972-0.703023052342j))*x_ref[0] + ((-0.64657131507-0.128909860135j))*x_ref[1]**o + ((-0.60845200464-0.908991499583j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(0.448933918669+0.627867954818j)*x[0]**o + ((-0.714037324834+0.60494189631j))*x[0] + ((-0.393872423204-0.649183239407j))*x[1]**o + ((-0.949399208243-0.848257727241j))*x[1]
+        ref[(3, 2, 1, 1)]=(0.448933918669+0.627867954818j)*x_ref[0]**o + ((-0.714037324834+0.60494189631j))*x_ref[0] + ((-0.393872423204-0.649183239407j))*x_ref[1]**o + ((-0.949399208243-0.848257727241j))*x_ref[1]
+        arg[(3, 2, 1, 2)]=(-0.753085356058+0.760127488704j)*x[0]**o + ((-0.101166161148+0.000518315732045j))*x[0] + ((0.762011541566+0.829506092463j))*x[1]**o + ((0.0310601733585-0.221539353854j))*x[1]
+        ref[(3, 2, 1, 2)]=(-0.753085356058+0.760127488704j)*x_ref[0]**o + ((-0.101166161148+0.000518315732045j))*x_ref[0] + ((0.762011541566+0.829506092463j))*x_ref[1]**o + ((0.0310601733585-0.221539353854j))*x_ref[1]
+        arg[(3, 2, 2, 0)]=(0.282830365075-0.893052310719j)*x[0]**o + ((-0.0540980547152-0.421346615027j))*x[0] + ((0.859569790125+0.0363983831425j))*x[1]**o + ((-0.249134465648-0.623183762169j))*x[1]
+        ref[(3, 2, 2, 0)]=(0.282830365075-0.893052310719j)*x_ref[0]**o + ((-0.0540980547152-0.421346615027j))*x_ref[0] + ((0.859569790125+0.0363983831425j))*x_ref[1]**o + ((-0.249134465648-0.623183762169j))*x_ref[1]
+        arg[(3, 2, 2, 1)]=(0.0979761236537-0.452287743791j)*x[0]**o + ((0.174190295834-0.0911238474736j))*x[0] + ((0.76055276605-0.953961062713j))*x[1]**o + ((-0.825222703509-0.933956918029j))*x[1]
+        ref[(3, 2, 2, 1)]=(0.0979761236537-0.452287743791j)*x_ref[0]**o + ((0.174190295834-0.0911238474736j))*x_ref[0] + ((0.76055276605-0.953961062713j))*x_ref[1]**o + ((-0.825222703509-0.933956918029j))*x_ref[1]
+        arg[(3, 2, 2, 2)]=(0.908296375871-0.32746052669j)*x[0]**o + ((-0.635020053947-0.185280341661j))*x[0] + ((0.342672313577+0.0250859833543j))*x[1]**o + ((0.0202892965586-0.292508235512j))*x[1]
+        ref[(3, 2, 2, 2)]=(0.908296375871-0.32746052669j)*x_ref[0]**o + ((-0.635020053947-0.185280341661j))*x_ref[0] + ((0.342672313577+0.0250859833543j))*x_ref[1]**o + ((0.0202892965586-0.292508235512j))*x_ref[1]
+        arg[(3, 2, 3, 0)]=(0.315849826189-0.590185744477j)*x[0]**o + ((0.68128770738-0.258234496988j))*x[0] + ((-0.0516572130598+0.0206566342075j))*x[1]**o + ((0.302779023484+0.341487871362j))*x[1]
+        ref[(3, 2, 3, 0)]=(0.315849826189-0.590185744477j)*x_ref[0]**o + ((0.68128770738-0.258234496988j))*x_ref[0] + ((-0.0516572130598+0.0206566342075j))*x_ref[1]**o + ((0.302779023484+0.341487871362j))*x_ref[1]
+        arg[(3, 2, 3, 1)]=(0.837823203772+0.401640638149j)*x[0]**o + ((-0.401073487931+0.0873737891999j))*x[0] + ((-0.593345715862+0.680105373826j))*x[1]**o + ((-0.649778501418-0.819357178785j))*x[1]
+        ref[(3, 2, 3, 1)]=(0.837823203772+0.401640638149j)*x_ref[0]**o + ((-0.401073487931+0.0873737891999j))*x_ref[0] + ((-0.593345715862+0.680105373826j))*x_ref[1]**o + ((-0.649778501418-0.819357178785j))*x_ref[1]
+        arg[(3, 2, 3, 2)]=(0.345167448669-0.886847024609j)*x[0]**o + ((0.686013417848-0.306656379146j))*x[0] + ((-0.675621483941+0.170079288217j))*x[1]**o + ((-0.647657341778+0.432197835517j))*x[1]
+        ref[(3, 2, 3, 2)]=(0.345167448669-0.886847024609j)*x_ref[0]**o + ((0.686013417848-0.306656379146j))*x_ref[0] + ((-0.675621483941+0.170079288217j))*x_ref[1]**o + ((-0.647657341778+0.432197835517j))*x_ref[1]
+        arg[(3, 3, 0, 0)]=(-0.968954366826-0.962070288884j)*x[0]**o + ((0.205120153329-0.496197319386j))*x[0] + ((0.24499066012+0.503766382864j))*x[1]**o + ((0.667238082854-0.0352473724474j))*x[1]
+        ref[(3, 3, 0, 0)]=(-0.968954366826-0.962070288884j)*x_ref[0]**o + ((0.205120153329-0.496197319386j))*x_ref[0] + ((0.24499066012+0.503766382864j))*x_ref[1]**o + ((0.667238082854-0.0352473724474j))*x_ref[1]
+        arg[(3, 3, 0, 1)]=(-0.581632902817+0.331770549938j)*x[0]**o + ((0.26676788981-0.896122260344j))*x[0] + ((0.766602010626+0.4369121728j))*x[1]**o + ((0.892565085875-0.819599429095j))*x[1]
+        ref[(3, 3, 0, 1)]=(-0.581632902817+0.331770549938j)*x_ref[0]**o + ((0.26676788981-0.896122260344j))*x_ref[0] + ((0.766602010626+0.4369121728j))*x_ref[1]**o + ((0.892565085875-0.819599429095j))*x_ref[1]
+        arg[(3, 3, 0, 2)]=(0.244706622112-0.820221001951j)*x[0]**o + ((0.310974055646+0.0807644592743j))*x[0] + ((0.770844747955-0.655754052974j))*x[1]**o + ((-0.0282908820222+0.896874407467j))*x[1]
+        ref[(3, 3, 0, 2)]=(0.244706622112-0.820221001951j)*x_ref[0]**o + ((0.310974055646+0.0807644592743j))*x_ref[0] + ((0.770844747955-0.655754052974j))*x_ref[1]**o + ((-0.0282908820222+0.896874407467j))*x_ref[1]
+        arg[(3, 3, 1, 0)]=(-0.803397847582+0.350527217168j)*x[0]**o + ((-0.716021438345-0.833661262695j))*x[0] + ((0.556516778739-0.995387072541j))*x[1]**o + ((-0.452437557524+0.378899504269j))*x[1]
+        ref[(3, 3, 1, 0)]=(-0.803397847582+0.350527217168j)*x_ref[0]**o + ((-0.716021438345-0.833661262695j))*x_ref[0] + ((0.556516778739-0.995387072541j))*x_ref[1]**o + ((-0.452437557524+0.378899504269j))*x_ref[1]
+        arg[(3, 3, 1, 1)]=(-0.850082302007-0.219956575632j)*x[0]**o + ((0.412000382693-0.349753926097j))*x[0] + ((0.755933875248-0.675220816254j))*x[1]**o + ((-0.124296142023-0.626455693551j))*x[1]
+        ref[(3, 3, 1, 1)]=(-0.850082302007-0.219956575632j)*x_ref[0]**o + ((0.412000382693-0.349753926097j))*x_ref[0] + ((0.755933875248-0.675220816254j))*x_ref[1]**o + ((-0.124296142023-0.626455693551j))*x_ref[1]
+        arg[(3, 3, 1, 2)]=(0.547664548168+0.12457979489j)*x[0]**o + ((-0.695145457502-0.378545839638j))*x[0] + ((0.303870802866+0.416411022613j))*x[1]**o + ((-0.34970306565-0.569029355682j))*x[1]
+        ref[(3, 3, 1, 2)]=(0.547664548168+0.12457979489j)*x_ref[0]**o + ((-0.695145457502-0.378545839638j))*x_ref[0] + ((0.303870802866+0.416411022613j))*x_ref[1]**o + ((-0.34970306565-0.569029355682j))*x_ref[1]
+        arg[(3, 3, 2, 0)]=(-0.742556312621+0.338920577426j)*x[0]**o + ((-0.462364389773+0.00513448465991j))*x[0] + ((0.541778430071+0.963699408185j))*x[1]**o + ((0.516130553931-0.818731100794j))*x[1]
+        ref[(3, 3, 2, 0)]=(-0.742556312621+0.338920577426j)*x_ref[0]**o + ((-0.462364389773+0.00513448465991j))*x_ref[0] + ((0.541778430071+0.963699408185j))*x_ref[1]**o + ((0.516130553931-0.818731100794j))*x_ref[1]
+        arg[(3, 3, 2, 1)]=(0.828472903962-0.145862369916j)*x[0]**o + ((-0.715554311374-0.386934230215j))*x[0] + ((-0.60471556262-0.907935167681j))*x[1]**o + ((0.139041840785+0.980570692428j))*x[1]
+        ref[(3, 3, 2, 1)]=(0.828472903962-0.145862369916j)*x_ref[0]**o + ((-0.715554311374-0.386934230215j))*x_ref[0] + ((-0.60471556262-0.907935167681j))*x_ref[1]**o + ((0.139041840785+0.980570692428j))*x_ref[1]
+        arg[(3, 3, 2, 2)]=(-0.842366193618+0.867055207833j)*x[0]**o + ((-0.370155165438+0.962185467985j))*x[0] + ((0.613265368621+0.541663115655j))*x[1]**o + ((0.268961464241+0.338684070232j))*x[1]
+        ref[(3, 3, 2, 2)]=(-0.842366193618+0.867055207833j)*x_ref[0]**o + ((-0.370155165438+0.962185467985j))*x_ref[0] + ((0.613265368621+0.541663115655j))*x_ref[1]**o + ((0.268961464241+0.338684070232j))*x_ref[1]
+        arg[(3, 3, 3, 0)]=(0.469841905774+0.164923856151j)*x[0]**o + ((-0.246545686915-0.951825627997j))*x[0] + ((0.9186458116+0.118051485411j))*x[1]**o + ((0.7906214985+0.384463242815j))*x[1]
+        ref[(3, 3, 3, 0)]=(0.469841905774+0.164923856151j)*x_ref[0]**o + ((-0.246545686915-0.951825627997j))*x_ref[0] + ((0.9186458116+0.118051485411j))*x_ref[1]**o + ((0.7906214985+0.384463242815j))*x_ref[1]
+        arg[(3, 3, 3, 1)]=(-0.77295265422+0.970962041647j)*x[0]**o + ((-0.888475467203+0.120332485311j))*x[0] + ((0.426441399906-0.881873322373j))*x[1]**o + ((0.77200728193-0.679794197008j))*x[1]
+        ref[(3, 3, 3, 1)]=(-0.77295265422+0.970962041647j)*x_ref[0]**o + ((-0.888475467203+0.120332485311j))*x_ref[0] + ((0.426441399906-0.881873322373j))*x_ref[1]**o + ((0.77200728193-0.679794197008j))*x_ref[1]
+        arg[(3, 3, 3, 2)]=(0.320953349686-0.177042718888j)*x[0]**o + ((-0.389685719712-0.92477091507j))*x[0] + ((-0.0283951243763-0.921626927168j))*x[1]**o + ((-0.190368162993-0.603346288014j))*x[1]
+        ref[(3, 3, 3, 2)]=(0.320953349686-0.177042718888j)*x_ref[0]**o + ((-0.389685719712-0.92477091507j))*x_ref[0] + ((-0.0283951243763-0.921626927168j))*x_ref[1]**o + ((-0.190368162993-0.603346288014j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.793454924223-0.061124725031j)*x[2]**o + ((0.459455833733-0.337048092481j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.793454924223-0.061124725031j)*x_ref[2]**o + ((0.459455833733-0.337048092481j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.296070659043-0.647384883412j)*x[2]**o + ((0.063617089243-0.452823141372j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.296070659043-0.647384883412j)*x_ref[2]**o + ((0.063617089243-0.452823141372j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.037202882434-0.15255303366j)*x[2]**o + ((0.147719855823-0.761870538706j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.037202882434-0.15255303366j)*x_ref[2]**o + ((0.147719855823-0.761870538706j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.416053719766+0.658841472464j)*x[2]**o + ((-0.845151084596+0.484958637706j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.416053719766+0.658841472464j)*x_ref[2]**o + ((-0.845151084596+0.484958637706j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.00724123181422-0.848914558172j)*x[2]**o + ((-0.465062725024+0.424206988158j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.00724123181422-0.848914558172j)*x_ref[2]**o + ((-0.465062725024+0.424206988158j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.264631608201+0.712629865029j)*x[2]**o + ((-0.481274206705-0.522493905675j))*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.264631608201+0.712629865029j)*x_ref[2]**o + ((-0.481274206705-0.522493905675j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.769063241253-0.048164752186j)*x[2]**o + ((-0.999394372225-0.508281933154j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.769063241253-0.048164752186j)*x_ref[2]**o + ((-0.999394372225-0.508281933154j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.971474047819-0.361520233383j)*x[2]**o + ((0.246535101978+0.9843907443j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.971474047819-0.361520233383j)*x_ref[2]**o + ((0.246535101978+0.9843907443j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(-0.13535217688-0.369544775273j)*x[2]**o + ((0.0637329773071+0.392283073359j))*x[2]
+            ref[(0, 0, 2, 2)]+=(-0.13535217688-0.369544775273j)*x_ref[2]**o + ((0.0637329773071+0.392283073359j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(-0.113778991129-0.764052293334j)*x[2]**o + ((0.6439431237+0.0353415876511j))*x[2]
+            ref[(0, 0, 3, 0)]+=(-0.113778991129-0.764052293334j)*x_ref[2]**o + ((0.6439431237+0.0353415876511j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(-0.58166354852-0.490256659874j)*x[2]**o + ((-0.583340806266+0.67528664064j))*x[2]
+            ref[(0, 0, 3, 1)]+=(-0.58166354852-0.490256659874j)*x_ref[2]**o + ((-0.583340806266+0.67528664064j))*x_ref[2]
+            arg[(0, 0, 3, 2)]+=(0.758556112741+0.736973931496j)*x[2]**o + ((-0.106411375504-0.966470199678j))*x[2]
+            ref[(0, 0, 3, 2)]+=(0.758556112741+0.736973931496j)*x_ref[2]**o + ((-0.106411375504-0.966470199678j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.245079658655-0.893462317064j)*x[2]**o + ((-0.91134446839+0.0656252674845j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.245079658655-0.893462317064j)*x_ref[2]**o + ((-0.91134446839+0.0656252674845j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.854350233521-0.352430197642j)*x[2]**o + ((0.177172100064+0.734235879051j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.854350233521-0.352430197642j)*x_ref[2]**o + ((0.177172100064+0.734235879051j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.963873169225+0.210134160182j)*x[2]**o + ((-0.994654359811-0.566600758492j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.963873169225+0.210134160182j)*x_ref[2]**o + ((-0.994654359811-0.566600758492j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.949450722704+0.228790570061j)*x[2]**o + ((-0.939903772331-0.264013978922j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.949450722704+0.228790570061j)*x_ref[2]**o + ((-0.939903772331-0.264013978922j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.00398769651065-0.494900667681j)*x[2]**o + ((-0.388163885731-0.554698857386j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.00398769651065-0.494900667681j)*x_ref[2]**o + ((-0.388163885731-0.554698857386j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.317867351522+0.567222521752j)*x[2]**o + ((0.392901220954-0.423737862483j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.317867351522+0.567222521752j)*x_ref[2]**o + ((0.392901220954-0.423737862483j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.191363445282+0.926203574094j)*x[2]**o + ((-0.815733967639+0.163878448974j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.191363445282+0.926203574094j)*x_ref[2]**o + ((-0.815733967639+0.163878448974j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.924214774376+0.485779959674j)*x[2]**o + ((-0.153601452145-0.250581356299j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.924214774376+0.485779959674j)*x_ref[2]**o + ((-0.153601452145-0.250581356299j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(-0.396242751336-0.971953660493j)*x[2]**o + ((-0.57740352856-0.197852236772j))*x[2]
+            ref[(0, 1, 2, 2)]+=(-0.396242751336-0.971953660493j)*x_ref[2]**o + ((-0.57740352856-0.197852236772j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(-0.849703144701-0.0862498500923j)*x[2]**o + ((0.347373859559+0.175257758761j))*x[2]
+            ref[(0, 1, 3, 0)]+=(-0.849703144701-0.0862498500923j)*x_ref[2]**o + ((0.347373859559+0.175257758761j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(-0.301374936822-0.531680670958j)*x[2]**o + ((0.191259172964+0.0348980696689j))*x[2]
+            ref[(0, 1, 3, 1)]+=(-0.301374936822-0.531680670958j)*x_ref[2]**o + ((0.191259172964+0.0348980696689j))*x_ref[2]
+            arg[(0, 1, 3, 2)]+=(0.838403164671-0.0170479791346j)*x[2]**o + ((0.711907226868-0.0154423998197j))*x[2]
+            ref[(0, 1, 3, 2)]+=(0.838403164671-0.0170479791346j)*x_ref[2]**o + ((0.711907226868-0.0154423998197j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.0997223520284-0.679146260961j)*x[2]**o + ((-0.745095042909+0.688838819122j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.0997223520284-0.679146260961j)*x_ref[2]**o + ((-0.745095042909+0.688838819122j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.218668269472-0.910102677832j)*x[2]**o + ((-0.654513060425-0.303595921072j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.218668269472-0.910102677832j)*x_ref[2]**o + ((-0.654513060425-0.303595921072j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(0.897873423526-0.0913971214044j)*x[2]**o + ((0.471616424119-0.115754330585j))*x[2]
+            ref[(0, 2, 0, 2)]+=(0.897873423526-0.0913971214044j)*x_ref[2]**o + ((0.471616424119-0.115754330585j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.789564226591+0.830044561117j)*x[2]**o + ((0.262473422254+0.87709817258j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.789564226591+0.830044561117j)*x_ref[2]**o + ((0.262473422254+0.87709817258j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.10868765663-0.796661971586j)*x[2]**o + ((0.292465418976-0.611407750889j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.10868765663-0.796661971586j)*x_ref[2]**o + ((0.292465418976-0.611407750889j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.323764996979+0.285318838914j)*x[2]**o + ((-0.319269482986+0.567945802708j))*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.323764996979+0.285318838914j)*x_ref[2]**o + ((-0.319269482986+0.567945802708j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.953898938035-0.159993117646j)*x[2]**o + ((-0.317111417884-0.639433612694j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.953898938035-0.159993117646j)*x_ref[2]**o + ((-0.317111417884-0.639433612694j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.553011674507+0.515633831476j)*x[2]**o + ((-0.00793363006999-0.202753423812j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.553011674507+0.515633831476j)*x_ref[2]**o + ((-0.00793363006999-0.202753423812j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.290651925625+0.997736936092j)*x[2]**o + ((0.683829997125-0.0447417068291j))*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.290651925625+0.997736936092j)*x_ref[2]**o + ((0.683829997125-0.0447417068291j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(-0.97117141017+0.9619619165j)*x[2]**o + ((-0.740920486908+0.309856151718j))*x[2]
+            ref[(0, 2, 3, 0)]+=(-0.97117141017+0.9619619165j)*x_ref[2]**o + ((-0.740920486908+0.309856151718j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(-0.835767171235+0.877950743679j)*x[2]**o + ((-0.960138053884+0.904951705653j))*x[2]
+            ref[(0, 2, 3, 1)]+=(-0.835767171235+0.877950743679j)*x_ref[2]**o + ((-0.960138053884+0.904951705653j))*x_ref[2]
+            arg[(0, 2, 3, 2)]+=(0.658366845439-0.891701053788j)*x[2]**o + ((0.664407747327+0.264485414509j))*x[2]
+            ref[(0, 2, 3, 2)]+=(0.658366845439-0.891701053788j)*x_ref[2]**o + ((0.664407747327+0.264485414509j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.785503207472-0.0158063166194j)*x[2]**o + ((-0.324155904346-0.4155064848j))*x[2]
+            ref[(0, 3, 0, 0)]+=(0.785503207472-0.0158063166194j)*x_ref[2]**o + ((-0.324155904346-0.4155064848j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.869087346276-0.627809314093j)*x[2]**o + ((0.911433627681+0.967854905454j))*x[2]
+            ref[(0, 3, 0, 1)]+=(0.869087346276-0.627809314093j)*x_ref[2]**o + ((0.911433627681+0.967854905454j))*x_ref[2]
+            arg[(0, 3, 0, 2)]+=(0.766859478235+0.956726319957j)*x[2]**o + ((-0.379193739448-0.542421085142j))*x[2]
+            ref[(0, 3, 0, 2)]+=(0.766859478235+0.956726319957j)*x_ref[2]**o + ((-0.379193739448-0.542421085142j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.404122590774+0.0784910958939j)*x[2]**o + ((-0.361106876569-0.206132532695j))*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.404122590774+0.0784910958939j)*x_ref[2]**o + ((-0.361106876569-0.206132532695j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.57712536274-0.997492396062j)*x[2]**o + ((0.963139621376+0.45126150135j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.57712536274-0.997492396062j)*x_ref[2]**o + ((0.963139621376+0.45126150135j))*x_ref[2]
+            arg[(0, 3, 1, 2)]+=(-0.419286204831+0.0171714046419j)*x[2]**o + ((-0.346651928268-0.819334036146j))*x[2]
+            ref[(0, 3, 1, 2)]+=(-0.419286204831+0.0171714046419j)*x_ref[2]**o + ((-0.346651928268-0.819334036146j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(0.530030960942+0.0706105390142j)*x[2]**o + ((-0.704942121573+0.313402955537j))*x[2]
+            ref[(0, 3, 2, 0)]+=(0.530030960942+0.0706105390142j)*x_ref[2]**o + ((-0.704942121573+0.313402955537j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(0.795055082964+0.248595163796j)*x[2]**o + ((0.730428937272+0.502092985057j))*x[2]
+            ref[(0, 3, 2, 1)]+=(0.795055082964+0.248595163796j)*x_ref[2]**o + ((0.730428937272+0.502092985057j))*x_ref[2]
+            arg[(0, 3, 2, 2)]+=(0.956118420077+0.623785954815j)*x[2]**o + ((-0.396826461529+0.29006309223j))*x[2]
+            ref[(0, 3, 2, 2)]+=(0.956118420077+0.623785954815j)*x_ref[2]**o + ((-0.396826461529+0.29006309223j))*x_ref[2]
+            arg[(0, 3, 3, 0)]+=(0.751198072933-0.855258975182j)*x[2]**o + ((-0.955389018054-0.275383480493j))*x[2]
+            ref[(0, 3, 3, 0)]+=(0.751198072933-0.855258975182j)*x_ref[2]**o + ((-0.955389018054-0.275383480493j))*x_ref[2]
+            arg[(0, 3, 3, 1)]+=(0.289467703992+0.309619497537j)*x[2]**o + ((-0.962403385175+0.115651551346j))*x[2]
+            ref[(0, 3, 3, 1)]+=(0.289467703992+0.309619497537j)*x_ref[2]**o + ((-0.962403385175+0.115651551346j))*x_ref[2]
+            arg[(0, 3, 3, 2)]+=(-0.642223267903-0.636973568978j)*x[2]**o + ((-0.425864568023-0.773245476575j))*x[2]
+            ref[(0, 3, 3, 2)]+=(-0.642223267903-0.636973568978j)*x_ref[2]**o + ((-0.425864568023-0.773245476575j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.623709253736-0.60435723878j)*x[2]**o + ((-0.996076241279-0.252424098883j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.623709253736-0.60435723878j)*x_ref[2]**o + ((-0.996076241279-0.252424098883j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.605308807437+0.805085676027j)*x[2]**o + ((-0.655565696006+0.552883697016j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.605308807437+0.805085676027j)*x_ref[2]**o + ((-0.655565696006+0.552883697016j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.167564665222+0.895429586344j)*x[2]**o + ((-0.958409650089+0.534008890155j))*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.167564665222+0.895429586344j)*x_ref[2]**o + ((-0.958409650089+0.534008890155j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.283188894579-0.331872235034j)*x[2]**o + ((0.208565758372+0.188973159079j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.283188894579-0.331872235034j)*x_ref[2]**o + ((0.208565758372+0.188973159079j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.201414831682+0.0903527797068j)*x[2]**o + ((-0.870360972626+0.389977797016j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.201414831682+0.0903527797068j)*x_ref[2]**o + ((-0.870360972626+0.389977797016j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.381225125458-0.252945707226j)*x[2]**o + ((0.497277142312-0.203989342024j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.381225125458-0.252945707226j)*x_ref[2]**o + ((0.497277142312-0.203989342024j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.711484918625+0.131202899329j)*x[2]**o + ((0.616382023558+0.930178084544j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.711484918625+0.131202899329j)*x_ref[2]**o + ((0.616382023558+0.930178084544j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.772151745455-0.103710646438j)*x[2]**o + ((0.823121766357+0.503911255174j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.772151745455-0.103710646438j)*x_ref[2]**o + ((0.823121766357+0.503911255174j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(0.21242463113-0.94472394819j)*x[2]**o + ((0.372782949429-0.472415295013j))*x[2]
+            ref[(1, 0, 2, 2)]+=(0.21242463113-0.94472394819j)*x_ref[2]**o + ((0.372782949429-0.472415295013j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(0.288988238606-0.0675418245876j)*x[2]**o + ((-0.618980177647+0.0940021090895j))*x[2]
+            ref[(1, 0, 3, 0)]+=(0.288988238606-0.0675418245876j)*x_ref[2]**o + ((-0.618980177647+0.0940021090895j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(-0.915556726507+0.703103545853j)*x[2]**o + ((-0.49986705428+0.990193898897j))*x[2]
+            ref[(1, 0, 3, 1)]+=(-0.915556726507+0.703103545853j)*x_ref[2]**o + ((-0.49986705428+0.990193898897j))*x_ref[2]
+            arg[(1, 0, 3, 2)]+=(-0.755336046517-0.25825852584j)*x[2]**o + ((-0.0166356919586-0.818219201425j))*x[2]
+            ref[(1, 0, 3, 2)]+=(-0.755336046517-0.25825852584j)*x_ref[2]**o + ((-0.0166356919586-0.818219201425j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.138762043822+0.133042894611j)*x[2]**o + ((0.262709539595-0.649360242882j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.138762043822+0.133042894611j)*x_ref[2]**o + ((0.262709539595-0.649360242882j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.47396021992-0.856844447182j)*x[2]**o + ((0.624193311065-0.0188350479541j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.47396021992-0.856844447182j)*x_ref[2]**o + ((0.624193311065-0.0188350479541j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.0986597700445-0.292385348008j)*x[2]**o + ((0.357164551011+0.397195526591j))*x[2]
+            ref[(1, 1, 0, 2)]+=(0.0986597700445-0.292385348008j)*x_ref[2]**o + ((0.357164551011+0.397195526591j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.601922335655+0.909828362657j)*x[2]**o + ((-0.456509023733+0.4926093111j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.601922335655+0.909828362657j)*x_ref[2]**o + ((-0.456509023733+0.4926093111j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.994111193956-0.579514604225j)*x[2]**o + ((0.184157701238-0.588464104088j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.994111193956-0.579514604225j)*x_ref[2]**o + ((0.184157701238-0.588464104088j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.861617809285-0.858647421154j)*x[2]**o + ((0.807525913288+0.512007652445j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.861617809285-0.858647421154j)*x_ref[2]**o + ((0.807525913288+0.512007652445j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.0586262850943-0.736461964375j)*x[2]**o + ((-0.402692811505-0.551327625417j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.0586262850943-0.736461964375j)*x_ref[2]**o + ((-0.402692811505-0.551327625417j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.259900009802-0.4070979516j)*x[2]**o + ((-0.471599502394+0.237505798268j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.259900009802-0.4070979516j)*x_ref[2]**o + ((-0.471599502394+0.237505798268j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.406690466379+0.663605718947j)*x[2]**o + ((-0.622959459875-0.985440470395j))*x[2]
+            ref[(1, 1, 2, 2)]+=(0.406690466379+0.663605718947j)*x_ref[2]**o + ((-0.622959459875-0.985440470395j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(-0.479051741189-0.766751814256j)*x[2]**o + ((0.605435897639-0.995206383118j))*x[2]
+            ref[(1, 1, 3, 0)]+=(-0.479051741189-0.766751814256j)*x_ref[2]**o + ((0.605435897639-0.995206383118j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(-0.939344502373-0.180524716887j)*x[2]**o + ((0.940628732249+0.0857741434537j))*x[2]
+            ref[(1, 1, 3, 1)]+=(-0.939344502373-0.180524716887j)*x_ref[2]**o + ((0.940628732249+0.0857741434537j))*x_ref[2]
+            arg[(1, 1, 3, 2)]+=(-0.410728119226-0.758144097256j)*x[2]**o + ((0.343151627652+0.931904473045j))*x[2]
+            ref[(1, 1, 3, 2)]+=(-0.410728119226-0.758144097256j)*x_ref[2]**o + ((0.343151627652+0.931904473045j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.338274310298+0.93012276724j)*x[2]**o + ((0.667037606248-0.205102844638j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.338274310298+0.93012276724j)*x_ref[2]**o + ((0.667037606248-0.205102844638j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.607924337766-0.547258532999j)*x[2]**o + ((-0.261874122455+0.0185045354024j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.607924337766-0.547258532999j)*x_ref[2]**o + ((-0.261874122455+0.0185045354024j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.109836052972-0.033142280883j)*x[2]**o + ((-0.923248108259+0.891889961013j))*x[2]
+            ref[(1, 2, 0, 2)]+=(0.109836052972-0.033142280883j)*x_ref[2]**o + ((-0.923248108259+0.891889961013j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.371462331333+0.395559067562j)*x[2]**o + ((0.128075326985-0.977072403016j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.371462331333+0.395559067562j)*x_ref[2]**o + ((0.128075326985-0.977072403016j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.698638703271+0.327292891363j)*x[2]**o + ((0.715814015822+0.610893022058j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.698638703271+0.327292891363j)*x_ref[2]**o + ((0.715814015822+0.610893022058j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(-0.327617967634-0.572247397412j)*x[2]**o + ((-0.742041672297-0.217630374059j))*x[2]
+            ref[(1, 2, 1, 2)]+=(-0.327617967634-0.572247397412j)*x_ref[2]**o + ((-0.742041672297-0.217630374059j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.900027250192+0.062360431719j)*x[2]**o + ((0.184795664229+0.255981609123j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.900027250192+0.062360431719j)*x_ref[2]**o + ((0.184795664229+0.255981609123j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.215925069874-0.00162346751587j)*x[2]**o + ((0.835134254569-0.111134930391j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.215925069874-0.00162346751587j)*x_ref[2]**o + ((0.835134254569-0.111134930391j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(0.427329687288-0.202078938488j)*x[2]**o + ((0.635847811337-0.35063602398j))*x[2]
+            ref[(1, 2, 2, 2)]+=(0.427329687288-0.202078938488j)*x_ref[2]**o + ((0.635847811337-0.35063602398j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(0.30606810557+0.381224366834j)*x[2]**o + ((-0.941507775143-0.787101513883j))*x[2]
+            ref[(1, 2, 3, 0)]+=(0.30606810557+0.381224366834j)*x_ref[2]**o + ((-0.941507775143-0.787101513883j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(-0.768450064372-0.989802781947j)*x[2]**o + ((-0.176530659503-0.278519469771j))*x[2]
+            ref[(1, 2, 3, 1)]+=(-0.768450064372-0.989802781947j)*x_ref[2]**o + ((-0.176530659503-0.278519469771j))*x_ref[2]
+            arg[(1, 2, 3, 2)]+=(0.543662164714+0.474958182624j)*x[2]**o + ((0.956766504315-0.0616218878473j))*x[2]
+            ref[(1, 2, 3, 2)]+=(0.543662164714+0.474958182624j)*x_ref[2]**o + ((0.956766504315-0.0616218878473j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.708502371488-0.720273241134j)*x[2]**o + ((-0.172472644134+0.811047459164j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.708502371488-0.720273241134j)*x_ref[2]**o + ((-0.172472644134+0.811047459164j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.56474260808+0.756161774814j)*x[2]**o + ((-0.79015973136+0.412625574665j))*x[2]
+            ref[(1, 3, 0, 1)]+=(0.56474260808+0.756161774814j)*x_ref[2]**o + ((-0.79015973136+0.412625574665j))*x_ref[2]
+            arg[(1, 3, 0, 2)]+=(0.221361261313+0.339763127726j)*x[2]**o + ((-0.556667274657-0.774666343031j))*x[2]
+            ref[(1, 3, 0, 2)]+=(0.221361261313+0.339763127726j)*x_ref[2]**o + ((-0.556667274657-0.774666343031j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.988957738121-0.211993448266j)*x[2]**o + ((0.270906986674-0.535011096263j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.988957738121-0.211993448266j)*x_ref[2]**o + ((0.270906986674-0.535011096263j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.718823552964-0.854944871798j)*x[2]**o + ((0.793115278708+0.607626125119j))*x[2]
+            ref[(1, 3, 1, 1)]+=(0.718823552964-0.854944871798j)*x_ref[2]**o + ((0.793115278708+0.607626125119j))*x_ref[2]
+            arg[(1, 3, 1, 2)]+=(0.968331702629+0.726889824013j)*x[2]**o + ((-0.103038119544-0.669857899612j))*x[2]
+            ref[(1, 3, 1, 2)]+=(0.968331702629+0.726889824013j)*x_ref[2]**o + ((-0.103038119544-0.669857899612j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(-0.944897770303-0.902971985628j)*x[2]**o + ((0.932602052116-0.585302675373j))*x[2]
+            ref[(1, 3, 2, 0)]+=(-0.944897770303-0.902971985628j)*x_ref[2]**o + ((0.932602052116-0.585302675373j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.241853799713-0.984711733825j)*x[2]**o + ((0.832694218956+0.186441469082j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.241853799713-0.984711733825j)*x_ref[2]**o + ((0.832694218956+0.186441469082j))*x_ref[2]
+            arg[(1, 3, 2, 2)]+=(0.971303718847+0.676893524823j)*x[2]**o + ((-0.927992556556-0.484361027729j))*x[2]
+            ref[(1, 3, 2, 2)]+=(0.971303718847+0.676893524823j)*x_ref[2]**o + ((-0.927992556556-0.484361027729j))*x_ref[2]
+            arg[(1, 3, 3, 0)]+=(0.661995880732-0.850064913551j)*x[2]**o + ((-0.697496736465+0.216308638394j))*x[2]
+            ref[(1, 3, 3, 0)]+=(0.661995880732-0.850064913551j)*x_ref[2]**o + ((-0.697496736465+0.216308638394j))*x_ref[2]
+            arg[(1, 3, 3, 1)]+=(-0.993715499992+0.59621908731j)*x[2]**o + ((0.0214105874935+0.418955801312j))*x[2]
+            ref[(1, 3, 3, 1)]+=(-0.993715499992+0.59621908731j)*x_ref[2]**o + ((0.0214105874935+0.418955801312j))*x_ref[2]
+            arg[(1, 3, 3, 2)]+=(-0.842011536683+0.298704009497j)*x[2]**o + ((0.683433265245-0.372397816836j))*x[2]
+            ref[(1, 3, 3, 2)]+=(-0.842011536683+0.298704009497j)*x_ref[2]**o + ((0.683433265245-0.372397816836j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.608647266067+0.428037953376j)*x[2]**o + ((0.621280547536-0.364904440595j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.608647266067+0.428037953376j)*x_ref[2]**o + ((0.621280547536-0.364904440595j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.125202798593+0.0296752770665j)*x[2]**o + ((-0.459493754684-0.925489892688j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.125202798593+0.0296752770665j)*x_ref[2]**o + ((-0.459493754684-0.925489892688j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.906192722548-0.211867680594j)*x[2]**o + ((0.905687531485+0.45012653782j))*x[2]
+            ref[(2, 0, 0, 2)]+=(0.906192722548-0.211867680594j)*x_ref[2]**o + ((0.905687531485+0.45012653782j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.475277276192-0.919604350383j)*x[2]**o + ((0.839439041534-0.185104986298j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.475277276192-0.919604350383j)*x_ref[2]**o + ((0.839439041534-0.185104986298j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.0214461561049+0.0376668529921j)*x[2]**o + ((-0.391218826736-0.668567360958j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.0214461561049+0.0376668529921j)*x_ref[2]**o + ((-0.391218826736-0.668567360958j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(0.106764898713-0.725330307202j)*x[2]**o + ((-0.532989566316-0.953428668852j))*x[2]
+            ref[(2, 0, 1, 2)]+=(0.106764898713-0.725330307202j)*x_ref[2]**o + ((-0.532989566316-0.953428668852j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(0.736369830716+0.613872901644j)*x[2]**o + ((-0.522364077515+0.159572927591j))*x[2]
+            ref[(2, 0, 2, 0)]+=(0.736369830716+0.613872901644j)*x_ref[2]**o + ((-0.522364077515+0.159572927591j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.791052577127-0.769742964431j)*x[2]**o + ((-0.246088443023-0.105931693754j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.791052577127-0.769742964431j)*x_ref[2]**o + ((-0.246088443023-0.105931693754j))*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(0.402900939538+0.855950907755j)*x[2]**o + ((-0.300913485724+0.490930385375j))*x[2]
+            ref[(2, 0, 2, 2)]+=(0.402900939538+0.855950907755j)*x_ref[2]**o + ((-0.300913485724+0.490930385375j))*x_ref[2]
+            arg[(2, 0, 3, 0)]+=(0.405010212863+0.475193651268j)*x[2]**o + ((-0.634747343953-0.0355085240485j))*x[2]
+            ref[(2, 0, 3, 0)]+=(0.405010212863+0.475193651268j)*x_ref[2]**o + ((-0.634747343953-0.0355085240485j))*x_ref[2]
+            arg[(2, 0, 3, 1)]+=(0.801203847376+0.128405128707j)*x[2]**o + ((-0.334213600164+0.487734724966j))*x[2]
+            ref[(2, 0, 3, 1)]+=(0.801203847376+0.128405128707j)*x_ref[2]**o + ((-0.334213600164+0.487734724966j))*x_ref[2]
+            arg[(2, 0, 3, 2)]+=(0.394479847683+0.303066375302j)*x[2]**o + ((-0.0965611957855+0.542075342355j))*x[2]
+            ref[(2, 0, 3, 2)]+=(0.394479847683+0.303066375302j)*x_ref[2]**o + ((-0.0965611957855+0.542075342355j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.23074651096-0.362481799375j)*x[2]**o + ((0.252946696833-0.856327658667j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.23074651096-0.362481799375j)*x_ref[2]**o + ((0.252946696833-0.856327658667j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.898653231415-0.621981162501j)*x[2]**o + ((0.629020368994-0.145132680558j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.898653231415-0.621981162501j)*x_ref[2]**o + ((0.629020368994-0.145132680558j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(0.73003239962+0.893329110585j)*x[2]**o + ((0.457152423128-0.275187284621j))*x[2]
+            ref[(2, 1, 0, 2)]+=(0.73003239962+0.893329110585j)*x_ref[2]**o + ((0.457152423128-0.275187284621j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.808930503021-0.94770805631j)*x[2]**o + ((0.737453208045-0.496533587227j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.808930503021-0.94770805631j)*x_ref[2]**o + ((0.737453208045-0.496533587227j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.000961169664982+0.724933464385j)*x[2]**o + ((-0.583109697585-0.00101498509366j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.000961169664982+0.724933464385j)*x_ref[2]**o + ((-0.583109697585-0.00101498509366j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.933086194438+0.255051468926j)*x[2]**o + ((-0.940818471931+0.290937623331j))*x[2]
+            ref[(2, 1, 1, 2)]+=(0.933086194438+0.255051468926j)*x_ref[2]**o + ((-0.940818471931+0.290937623331j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(0.294000079154+0.305176114395j)*x[2]**o + ((-0.930054860628-0.735320367428j))*x[2]
+            ref[(2, 1, 2, 0)]+=(0.294000079154+0.305176114395j)*x_ref[2]**o + ((-0.930054860628-0.735320367428j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(-0.481842021011-0.0863925095882j)*x[2]**o + ((0.40270641855-0.974667304678j))*x[2]
+            ref[(2, 1, 2, 1)]+=(-0.481842021011-0.0863925095882j)*x_ref[2]**o + ((0.40270641855-0.974667304678j))*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(-0.161360279388+0.794885808755j)*x[2]**o + ((-0.897494156068-0.945047307638j))*x[2]
+            ref[(2, 1, 2, 2)]+=(-0.161360279388+0.794885808755j)*x_ref[2]**o + ((-0.897494156068-0.945047307638j))*x_ref[2]
+            arg[(2, 1, 3, 0)]+=(0.470998366641+0.822951168184j)*x[2]**o + ((0.672825310476-0.955333247336j))*x[2]
+            ref[(2, 1, 3, 0)]+=(0.470998366641+0.822951168184j)*x_ref[2]**o + ((0.672825310476-0.955333247336j))*x_ref[2]
+            arg[(2, 1, 3, 1)]+=(0.626043105143-0.19419822695j)*x[2]**o + ((-0.345239097325+0.591569622j))*x[2]
+            ref[(2, 1, 3, 1)]+=(0.626043105143-0.19419822695j)*x_ref[2]**o + ((-0.345239097325+0.591569622j))*x_ref[2]
+            arg[(2, 1, 3, 2)]+=(-0.983405897563-0.399466571686j)*x[2]**o + ((-0.0770867883118-0.427213366552j))*x[2]
+            ref[(2, 1, 3, 2)]+=(-0.983405897563-0.399466571686j)*x_ref[2]**o + ((-0.0770867883118-0.427213366552j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.0785296708395+0.585776674156j)*x[2]**o + ((-0.05036939902+0.228836641361j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.0785296708395+0.585776674156j)*x_ref[2]**o + ((-0.05036939902+0.228836641361j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.524167789281+0.784330126364j)*x[2]**o + ((0.602714481934+0.298528239423j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.524167789281+0.784330126364j)*x_ref[2]**o + ((0.602714481934+0.298528239423j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(-0.183264062972-0.26744027334j)*x[2]**o + ((-0.70440339141+0.12119224913j))*x[2]
+            ref[(2, 2, 0, 2)]+=(-0.183264062972-0.26744027334j)*x_ref[2]**o + ((-0.70440339141+0.12119224913j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.0892952040166+0.756299578996j)*x[2]**o + ((-0.818661644461+0.754577023441j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.0892952040166+0.756299578996j)*x_ref[2]**o + ((-0.818661644461+0.754577023441j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.907142004396+0.890470967184j)*x[2]**o + ((-0.0449586010627-0.755716073593j))*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.907142004396+0.890470967184j)*x_ref[2]**o + ((-0.0449586010627-0.755716073593j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(0.20637733281+0.572847379502j)*x[2]**o + ((0.211079719236+0.834119256574j))*x[2]
+            ref[(2, 2, 1, 2)]+=(0.20637733281+0.572847379502j)*x_ref[2]**o + ((0.211079719236+0.834119256574j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(0.912797479332-0.790524608428j)*x[2]**o + ((-0.0802811843637-0.642476934809j))*x[2]
+            ref[(2, 2, 2, 0)]+=(0.912797479332-0.790524608428j)*x_ref[2]**o + ((-0.0802811843637-0.642476934809j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(-0.995224476255-0.689286963808j)*x[2]**o + ((0.603816907129+0.408663544058j))*x[2]
+            ref[(2, 2, 2, 1)]+=(-0.995224476255-0.689286963808j)*x_ref[2]**o + ((0.603816907129+0.408663544058j))*x_ref[2]
+            arg[(2, 2, 2, 2)]+=(-0.965880519383+0.363442842831j)*x[2]**o + ((-0.809079999514-0.270655146293j))*x[2]
+            ref[(2, 2, 2, 2)]+=(-0.965880519383+0.363442842831j)*x_ref[2]**o + ((-0.809079999514-0.270655146293j))*x_ref[2]
+            arg[(2, 2, 3, 0)]+=(-0.218497024658-0.801504440425j)*x[2]**o + ((0.0175021482437-0.101791169741j))*x[2]
+            ref[(2, 2, 3, 0)]+=(-0.218497024658-0.801504440425j)*x_ref[2]**o + ((0.0175021482437-0.101791169741j))*x_ref[2]
+            arg[(2, 2, 3, 1)]+=(-0.21169815366+0.063333117134j)*x[2]**o + ((0.21695286086+0.135195231351j))*x[2]
+            ref[(2, 2, 3, 1)]+=(-0.21169815366+0.063333117134j)*x_ref[2]**o + ((0.21695286086+0.135195231351j))*x_ref[2]
+            arg[(2, 2, 3, 2)]+=(-0.846680051492+0.0429571308549j)*x[2]**o + ((0.179656770936-0.74908535894j))*x[2]
+            ref[(2, 2, 3, 2)]+=(-0.846680051492+0.0429571308549j)*x_ref[2]**o + ((0.179656770936-0.74908535894j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(0.223201308631-0.762155616674j)*x[2]**o + ((-0.982025482474-0.588196505296j))*x[2]
+            ref[(2, 3, 0, 0)]+=(0.223201308631-0.762155616674j)*x_ref[2]**o + ((-0.982025482474-0.588196505296j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(0.0398239169033+0.249956956833j)*x[2]**o + ((0.839323410716+0.694096768268j))*x[2]
+            ref[(2, 3, 0, 1)]+=(0.0398239169033+0.249956956833j)*x_ref[2]**o + ((0.839323410716+0.694096768268j))*x_ref[2]
+            arg[(2, 3, 0, 2)]+=(0.413738633818-0.861373388534j)*x[2]**o + ((-0.109100332033-0.789201008611j))*x[2]
+            ref[(2, 3, 0, 2)]+=(0.413738633818-0.861373388534j)*x_ref[2]**o + ((-0.109100332033-0.789201008611j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(0.642662760149+0.978815487215j)*x[2]**o + ((-0.698022134312-0.049402940783j))*x[2]
+            ref[(2, 3, 1, 0)]+=(0.642662760149+0.978815487215j)*x_ref[2]**o + ((-0.698022134312-0.049402940783j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(0.614518104589-0.52669866441j)*x[2]**o + ((-0.533286490547+0.853460441669j))*x[2]
+            ref[(2, 3, 1, 1)]+=(0.614518104589-0.52669866441j)*x_ref[2]**o + ((-0.533286490547+0.853460441669j))*x_ref[2]
+            arg[(2, 3, 1, 2)]+=(-0.242481800948-0.83606127136j)*x[2]**o + ((0.931817656904-0.985221279838j))*x[2]
+            ref[(2, 3, 1, 2)]+=(-0.242481800948-0.83606127136j)*x_ref[2]**o + ((0.931817656904-0.985221279838j))*x_ref[2]
+            arg[(2, 3, 2, 0)]+=(-0.796421057547-0.303818654128j)*x[2]**o + ((0.348926273327-0.155058343596j))*x[2]
+            ref[(2, 3, 2, 0)]+=(-0.796421057547-0.303818654128j)*x_ref[2]**o + ((0.348926273327-0.155058343596j))*x_ref[2]
+            arg[(2, 3, 2, 1)]+=(-0.824754676905+0.21111048801j)*x[2]**o + ((0.242429889905+0.104859163432j))*x[2]
+            ref[(2, 3, 2, 1)]+=(-0.824754676905+0.21111048801j)*x_ref[2]**o + ((0.242429889905+0.104859163432j))*x_ref[2]
+            arg[(2, 3, 2, 2)]+=(-0.493007686156-0.395257087597j)*x[2]**o + ((0.34951535504+0.687377718002j))*x[2]
+            ref[(2, 3, 2, 2)]+=(-0.493007686156-0.395257087597j)*x_ref[2]**o + ((0.34951535504+0.687377718002j))*x_ref[2]
+            arg[(2, 3, 3, 0)]+=(0.588255979279+0.431023450674j)*x[2]**o + ((0.446981309557+0.523982757128j))*x[2]
+            ref[(2, 3, 3, 0)]+=(0.588255979279+0.431023450674j)*x_ref[2]**o + ((0.446981309557+0.523982757128j))*x_ref[2]
+            arg[(2, 3, 3, 1)]+=(-0.129193182887+0.0406995321761j)*x[2]**o + ((-0.830307748266-0.957102358896j))*x[2]
+            ref[(2, 3, 3, 1)]+=(-0.129193182887+0.0406995321761j)*x_ref[2]**o + ((-0.830307748266-0.957102358896j))*x_ref[2]
+            arg[(2, 3, 3, 2)]+=(-0.769513245311-0.424864283248j)*x[2]**o + ((0.115617023805-0.949472626581j))*x[2]
+            ref[(2, 3, 3, 2)]+=(-0.769513245311-0.424864283248j)*x_ref[2]**o + ((0.115617023805-0.949472626581j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.946212387714+0.523798275311j)*x[2]**o + ((0.0350617460758+0.407992184187j))*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.946212387714+0.523798275311j)*x_ref[2]**o + ((0.0350617460758+0.407992184187j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.0780541040077-0.772947391338j)*x[2]**o + ((-0.747529665621-0.902977691749j))*x[2]
+            ref[(3, 0, 0, 1)]+=(0.0780541040077-0.772947391338j)*x_ref[2]**o + ((-0.747529665621-0.902977691749j))*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(0.968303731486+0.696401169141j)*x[2]**o + ((-0.264351096201-0.764459776411j))*x[2]
+            ref[(3, 0, 0, 2)]+=(0.968303731486+0.696401169141j)*x_ref[2]**o + ((-0.264351096201-0.764459776411j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.102621030623-0.957344200208j)*x[2]**o + ((-0.744915186474+0.11872896206j))*x[2]
+            ref[(3, 0, 1, 0)]+=(0.102621030623-0.957344200208j)*x_ref[2]**o + ((-0.744915186474+0.11872896206j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(0.678137258388+0.0632884037931j)*x[2]**o + ((0.701780826025-0.838527967921j))*x[2]
+            ref[(3, 0, 1, 1)]+=(0.678137258388+0.0632884037931j)*x_ref[2]**o + ((0.701780826025-0.838527967921j))*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(0.0352675049219+0.504574458707j)*x[2]**o + ((0.224636512301-0.972373007993j))*x[2]
+            ref[(3, 0, 1, 2)]+=(0.0352675049219+0.504574458707j)*x_ref[2]**o + ((0.224636512301-0.972373007993j))*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(0.801586673892-0.30221608967j)*x[2]**o + ((-0.86218821108-0.222025427209j))*x[2]
+            ref[(3, 0, 2, 0)]+=(0.801586673892-0.30221608967j)*x_ref[2]**o + ((-0.86218821108-0.222025427209j))*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.5982818305+0.0786604130505j)*x[2]**o + ((-0.837260357025-0.281195389358j))*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.5982818305+0.0786604130505j)*x_ref[2]**o + ((-0.837260357025-0.281195389358j))*x_ref[2]
+            arg[(3, 0, 2, 2)]+=(-0.201809689083+0.279020039145j)*x[2]**o + ((-0.306232979972-0.480363620903j))*x[2]
+            ref[(3, 0, 2, 2)]+=(-0.201809689083+0.279020039145j)*x_ref[2]**o + ((-0.306232979972-0.480363620903j))*x_ref[2]
+            arg[(3, 0, 3, 0)]+=(0.455630681025+0.262950322248j)*x[2]**o + ((0.192607439485+0.136339455657j))*x[2]
+            ref[(3, 0, 3, 0)]+=(0.455630681025+0.262950322248j)*x_ref[2]**o + ((0.192607439485+0.136339455657j))*x_ref[2]
+            arg[(3, 0, 3, 1)]+=(0.443697331918-0.85508317865j)*x[2]**o + ((-0.860526803324+0.219312205584j))*x[2]
+            ref[(3, 0, 3, 1)]+=(0.443697331918-0.85508317865j)*x_ref[2]**o + ((-0.860526803324+0.219312205584j))*x_ref[2]
+            arg[(3, 0, 3, 2)]+=(-0.271794601367-0.560221469016j)*x[2]**o + ((-0.47078166488-0.033553874218j))*x[2]
+            ref[(3, 0, 3, 2)]+=(-0.271794601367-0.560221469016j)*x_ref[2]**o + ((-0.47078166488-0.033553874218j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(-0.0257653492577+0.306447545895j)*x[2]**o + ((-0.263333463087+0.13277101896j))*x[2]
+            ref[(3, 1, 0, 0)]+=(-0.0257653492577+0.306447545895j)*x_ref[2]**o + ((-0.263333463087+0.13277101896j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.720573582683-0.102030580206j)*x[2]**o + ((0.354672875369-0.364762834688j))*x[2]
+            ref[(3, 1, 0, 1)]+=(0.720573582683-0.102030580206j)*x_ref[2]**o + ((0.354672875369-0.364762834688j))*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(-0.0200368839926-0.57538868869j)*x[2]**o + ((-0.188488618901-0.806309999798j))*x[2]
+            ref[(3, 1, 0, 2)]+=(-0.0200368839926-0.57538868869j)*x_ref[2]**o + ((-0.188488618901-0.806309999798j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.971634223532-0.727991360945j)*x[2]**o + ((-0.946773971353+0.208530986434j))*x[2]
+            ref[(3, 1, 1, 0)]+=(0.971634223532-0.727991360945j)*x_ref[2]**o + ((-0.946773971353+0.208530986434j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(-0.77742109403+0.339842565036j)*x[2]**o + ((-0.126418826052+0.444541772092j))*x[2]
+            ref[(3, 1, 1, 1)]+=(-0.77742109403+0.339842565036j)*x_ref[2]**o + ((-0.126418826052+0.444541772092j))*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(0.483872556029-0.396658375576j)*x[2]**o + ((0.0223839998417+0.850784946668j))*x[2]
+            ref[(3, 1, 1, 2)]+=(0.483872556029-0.396658375576j)*x_ref[2]**o + ((0.0223839998417+0.850784946668j))*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(0.257585898266-0.982766977387j)*x[2]**o + ((-0.0213051368254-0.246609417563j))*x[2]
+            ref[(3, 1, 2, 0)]+=(0.257585898266-0.982766977387j)*x_ref[2]**o + ((-0.0213051368254-0.246609417563j))*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(0.695159335118+0.207382606338j)*x[2]**o + ((-0.608029831068-0.429089520762j))*x[2]
+            ref[(3, 1, 2, 1)]+=(0.695159335118+0.207382606338j)*x_ref[2]**o + ((-0.608029831068-0.429089520762j))*x_ref[2]
+            arg[(3, 1, 2, 2)]+=(-0.574138152813-0.940026080796j)*x[2]**o + ((-0.635494306902+0.635990525458j))*x[2]
+            ref[(3, 1, 2, 2)]+=(-0.574138152813-0.940026080796j)*x_ref[2]**o + ((-0.635494306902+0.635990525458j))*x_ref[2]
+            arg[(3, 1, 3, 0)]+=(-0.0804440519541+0.781536690467j)*x[2]**o + ((0.503058065228-0.149966792129j))*x[2]
+            ref[(3, 1, 3, 0)]+=(-0.0804440519541+0.781536690467j)*x_ref[2]**o + ((0.503058065228-0.149966792129j))*x_ref[2]
+            arg[(3, 1, 3, 1)]+=(0.425022013089+0.113446962102j)*x[2]**o + ((-0.593025730439+0.252735605128j))*x[2]
+            ref[(3, 1, 3, 1)]+=(0.425022013089+0.113446962102j)*x_ref[2]**o + ((-0.593025730439+0.252735605128j))*x_ref[2]
+            arg[(3, 1, 3, 2)]+=(0.302682283043+0.389067186635j)*x[2]**o + ((-0.630818763386+0.0653381307074j))*x[2]
+            ref[(3, 1, 3, 2)]+=(0.302682283043+0.389067186635j)*x_ref[2]**o + ((-0.630818763386+0.0653381307074j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(0.149313209572+0.107814311954j)*x[2]**o + ((0.94435114775-0.543895342949j))*x[2]
+            ref[(3, 2, 0, 0)]+=(0.149313209572+0.107814311954j)*x_ref[2]**o + ((0.94435114775-0.543895342949j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(-0.688871439756+0.701591238513j)*x[2]**o + ((-0.878092333724-0.432420649164j))*x[2]
+            ref[(3, 2, 0, 1)]+=(-0.688871439756+0.701591238513j)*x_ref[2]**o + ((-0.878092333724-0.432420649164j))*x_ref[2]
+            arg[(3, 2, 0, 2)]+=(-0.173886201912+0.0959546245644j)*x[2]**o + ((-0.617082421286-0.847267623637j))*x[2]
+            ref[(3, 2, 0, 2)]+=(-0.173886201912+0.0959546245644j)*x_ref[2]**o + ((-0.617082421286-0.847267623637j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.481730614197-0.507059474408j)*x[2]**o + ((-0.770530709887-0.0518177187411j))*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.481730614197-0.507059474408j)*x_ref[2]**o + ((-0.770530709887-0.0518177187411j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(-0.375738415888+0.18016109269j)*x[2]**o + ((-0.371812454253-0.39326762195j))*x[2]
+            ref[(3, 2, 1, 1)]+=(-0.375738415888+0.18016109269j)*x_ref[2]**o + ((-0.371812454253-0.39326762195j))*x_ref[2]
+            arg[(3, 2, 1, 2)]+=(0.0341244544144+0.611415906846j)*x[2]**o + ((-0.109359456366+0.432597125627j))*x[2]
+            ref[(3, 2, 1, 2)]+=(0.0341244544144+0.611415906846j)*x_ref[2]**o + ((-0.109359456366+0.432597125627j))*x_ref[2]
+            arg[(3, 2, 2, 0)]+=(0.29196238231-0.535085004483j)*x[2]**o + ((-0.961102320969-0.57184427694j))*x[2]
+            ref[(3, 2, 2, 0)]+=(0.29196238231-0.535085004483j)*x_ref[2]**o + ((-0.961102320969-0.57184427694j))*x_ref[2]
+            arg[(3, 2, 2, 1)]+=(0.433247797883+0.494299898883j)*x[2]**o + ((0.234160873342+0.835275122272j))*x[2]
+            ref[(3, 2, 2, 1)]+=(0.433247797883+0.494299898883j)*x_ref[2]**o + ((0.234160873342+0.835275122272j))*x_ref[2]
+            arg[(3, 2, 2, 2)]+=(0.32981865579+0.340905723982j)*x[2]**o + ((-0.517360228915+0.48658654118j))*x[2]
+            ref[(3, 2, 2, 2)]+=(0.32981865579+0.340905723982j)*x_ref[2]**o + ((-0.517360228915+0.48658654118j))*x_ref[2]
+            arg[(3, 2, 3, 0)]+=(0.381737738397+0.180715417497j)*x[2]**o + ((0.839025662897+0.412780871312j))*x[2]
+            ref[(3, 2, 3, 0)]+=(0.381737738397+0.180715417497j)*x_ref[2]**o + ((0.839025662897+0.412780871312j))*x_ref[2]
+            arg[(3, 2, 3, 1)]+=(0.519312346594-0.753437465877j)*x[2]**o + ((-0.679436123053-0.163124255249j))*x[2]
+            ref[(3, 2, 3, 1)]+=(0.519312346594-0.753437465877j)*x_ref[2]**o + ((-0.679436123053-0.163124255249j))*x_ref[2]
+            arg[(3, 2, 3, 2)]+=(-0.476165216247+0.25777462975j)*x[2]**o + ((-0.790369684063+0.268617562596j))*x[2]
+            ref[(3, 2, 3, 2)]+=(-0.476165216247+0.25777462975j)*x_ref[2]**o + ((-0.790369684063+0.268617562596j))*x_ref[2]
+            arg[(3, 3, 0, 0)]+=(-0.699542306729+0.694070015748j)*x[2]**o + ((0.625648537944+0.409647344382j))*x[2]
+            ref[(3, 3, 0, 0)]+=(-0.699542306729+0.694070015748j)*x_ref[2]**o + ((0.625648537944+0.409647344382j))*x_ref[2]
+            arg[(3, 3, 0, 1)]+=(0.659022819886-0.763605988398j)*x[2]**o + ((0.41657898761-0.720564697036j))*x[2]
+            ref[(3, 3, 0, 1)]+=(0.659022819886-0.763605988398j)*x_ref[2]**o + ((0.41657898761-0.720564697036j))*x_ref[2]
+            arg[(3, 3, 0, 2)]+=(-0.769348282794-0.332527582636j)*x[2]**o + ((-0.0619621110651+0.948256882124j))*x[2]
+            ref[(3, 3, 0, 2)]+=(-0.769348282794-0.332527582636j)*x_ref[2]**o + ((-0.0619621110651+0.948256882124j))*x_ref[2]
+            arg[(3, 3, 1, 0)]+=(-0.240533752108+0.924259178036j)*x[2]**o + ((-0.497788459913+0.132747638719j))*x[2]
+            ref[(3, 3, 1, 0)]+=(-0.240533752108+0.924259178036j)*x_ref[2]**o + ((-0.497788459913+0.132747638719j))*x_ref[2]
+            arg[(3, 3, 1, 1)]+=(-0.175808308662-0.639004491071j)*x[2]**o + ((-0.58398775364-0.852816582065j))*x[2]
+            ref[(3, 3, 1, 1)]+=(-0.175808308662-0.639004491071j)*x_ref[2]**o + ((-0.58398775364-0.852816582065j))*x_ref[2]
+            arg[(3, 3, 1, 2)]+=(0.752390119059-0.256023919369j)*x[2]**o + ((-0.170306263561+0.997751366798j))*x[2]
+            ref[(3, 3, 1, 2)]+=(0.752390119059-0.256023919369j)*x_ref[2]**o + ((-0.170306263561+0.997751366798j))*x_ref[2]
+            arg[(3, 3, 2, 0)]+=(-0.958554447335-0.783032329752j)*x[2]**o + ((0.254095056056-0.411261867382j))*x[2]
+            ref[(3, 3, 2, 0)]+=(-0.958554447335-0.783032329752j)*x_ref[2]**o + ((0.254095056056-0.411261867382j))*x_ref[2]
+            arg[(3, 3, 2, 1)]+=(-0.337619169632-0.259981777701j)*x[2]**o + ((0.0132295173849-0.435177920186j))*x[2]
+            ref[(3, 3, 2, 1)]+=(-0.337619169632-0.259981777701j)*x_ref[2]**o + ((0.0132295173849-0.435177920186j))*x_ref[2]
+            arg[(3, 3, 2, 2)]+=(0.711468638439+0.02049301113j)*x[2]**o + ((-0.792006441198-0.120033021124j))*x[2]
+            ref[(3, 3, 2, 2)]+=(0.711468638439+0.02049301113j)*x_ref[2]**o + ((-0.792006441198-0.120033021124j))*x_ref[2]
+            arg[(3, 3, 3, 0)]+=(0.106708803888+0.514553124808j)*x[2]**o + ((0.0981468886747-0.429278553106j))*x[2]
+            ref[(3, 3, 3, 0)]+=(0.106708803888+0.514553124808j)*x_ref[2]**o + ((0.0981468886747-0.429278553106j))*x_ref[2]
+            arg[(3, 3, 3, 1)]+=(0.853581174234+0.698437755938j)*x[2]**o + ((0.555424665254-0.847014829075j))*x[2]
+            ref[(3, 3, 3, 1)]+=(0.853581174234+0.698437755938j)*x_ref[2]**o + ((0.555424665254-0.847014829075j))*x_ref[2]
+            arg[(3, 3, 3, 2)]+=(0.438700845343-0.345457056326j)*x[2]**o + ((0.0545497793905-0.120545145325j))*x[2]
+            ref[(3, 3, 3, 2)]+=(0.438700845343-0.345457056326j)*x_ref[2]**o + ((0.0545497793905-0.120545145325j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.797228160776-0.920215164001j)*x[0]**o + ((0.461330640959+0.258142429462j))*x[0] + ((0.570387460239+0.195643787475j))*x[1]**o + ((-0.470088235996+0.650572229349j))*x[1]
+        ref=(-0.797228160776-0.920215164001j)*x_ref[0]**o + ((0.461330640959+0.258142429462j))*x_ref[0] + ((0.570387460239+0.195643787475j))*x_ref[1]**o + ((-0.470088235996+0.650572229349j))*x_ref[1]
+        if dim==3:
+            arg+=((0.317261863965-0.984206029504j))*x[2]**o + ((-0.753770728819+0.796816068739j))*x[2]
+            ref+=((0.317261863965-0.984206029504j))*x_ref[2]**o + ((-0.753770728819+0.796816068739j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.548416293908-0.987851078266j)*x[0]**o + ((-0.98888005338-0.789990571977j))*x[0] + ((0.430876063775-0.147681768087j))*x[1]**o + ((-0.459574102353-0.85668645874j))*x[1]
+        ref[(0,)]=(0.548416293908-0.987851078266j)*x_ref[0]**o + ((-0.98888005338-0.789990571977j))*x_ref[0] + ((0.430876063775-0.147681768087j))*x_ref[1]**o + ((-0.459574102353-0.85668645874j))*x_ref[1]
+        arg[(1,)]=(0.265739870052+0.674564986511j)*x[0]**o + ((-0.589925458023-0.955862615754j))*x[0] + ((-0.37228939519+0.428784924513j))*x[1]**o + ((0.913602149178-0.0376290600724j))*x[1]
+        ref[(1,)]=(0.265739870052+0.674564986511j)*x_ref[0]**o + ((-0.589925458023-0.955862615754j))*x_ref[0] + ((-0.37228939519+0.428784924513j))*x_ref[1]**o + ((0.913602149178-0.0376290600724j))*x_ref[1]
+        arg[(2,)]=(0.574277594879+0.473791925843j)*x[0]**o + ((0.385189347524-0.757879527241j))*x[0] + ((0.712392317456+0.930897952639j))*x[1]**o + ((0.488470496576+0.905317471807j))*x[1]
+        ref[(2,)]=(0.574277594879+0.473791925843j)*x_ref[0]**o + ((0.385189347524-0.757879527241j))*x_ref[0] + ((0.712392317456+0.930897952639j))*x_ref[1]**o + ((0.488470496576+0.905317471807j))*x_ref[1]
+        arg[(3,)]=(-0.0628596171317+0.426730896758j)*x[0]**o + ((-0.462058343127+0.964968219675j))*x[0] + ((0.0637587070778-0.306281729474j))*x[1]**o + ((-0.205491191507+0.375145632452j))*x[1]
+        ref[(3,)]=(-0.0628596171317+0.426730896758j)*x_ref[0]**o + ((-0.462058343127+0.964968219675j))*x_ref[0] + ((0.0637587070778-0.306281729474j))*x_ref[1]**o + ((-0.205491191507+0.375145632452j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.425723940025+0.740466426302j)*x[2]**o + ((-0.0229336899829+0.589755274535j))*x[2]
+            ref[(0,)]+=(-0.425723940025+0.740466426302j)*x_ref[2]**o + ((-0.0229336899829+0.589755274535j))*x_ref[2]
+            arg[(1,)]+=(0.149882365097-0.354177766177j)*x[2]**o + ((-0.167259806701+0.182168280863j))*x[2]
+            ref[(1,)]+=(0.149882365097-0.354177766177j)*x_ref[2]**o + ((-0.167259806701+0.182168280863j))*x_ref[2]
+            arg[(2,)]+=(0.488547538948+0.0218281670123j)*x[2]**o + ((0.963941738343-0.206563193552j))*x[2]
+            ref[(2,)]+=(0.488547538948+0.0218281670123j)*x_ref[2]**o + ((0.963941738343-0.206563193552j))*x_ref[2]
+            arg[(3,)]+=(0.516464494437-0.979436825574j)*x[2]**o + ((-0.46554585419-0.129213139141j))*x[2]
+            ref[(3,)]+=(0.516464494437-0.979436825574j)*x_ref[2]**o + ((-0.46554585419-0.129213139141j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=(-0.299081821452-0.798034307793j)*x[0]**o + ((-0.631434030476+0.0936299601035j))*x[0] + ((0.302310545302-0.80624147386j))*x[1]**o + ((0.0391115261146+0.155859149809j))*x[1]
+        ref[(0, 0)]=(-0.299081821452-0.798034307793j)*x_ref[0]**o + ((-0.631434030476+0.0936299601035j))*x_ref[0] + ((0.302310545302-0.80624147386j))*x_ref[1]**o + ((0.0391115261146+0.155859149809j))*x_ref[1]
+        arg[(0, 1)]=(0.0300383834531-0.290453580515j)*x[0]**o + ((-0.16699101239-0.524757459192j))*x[0] + ((0.844802955319-0.0133422530254j))*x[1]**o + ((-0.232947381937+0.505253501515j))*x[1]
+        ref[(0, 1)]=(0.0300383834531-0.290453580515j)*x_ref[0]**o + ((-0.16699101239-0.524757459192j))*x_ref[0] + ((0.844802955319-0.0133422530254j))*x_ref[1]**o + ((-0.232947381937+0.505253501515j))*x_ref[1]
+        arg[(0, 2)]=(0.148668000266+0.0636063569579j)*x[0]**o + ((-0.801119774229-0.680049099107j))*x[0] + ((-0.254756990894+0.268740227435j))*x[1]**o + ((-0.891757975665-0.122274024184j))*x[1]
+        ref[(0, 2)]=(0.148668000266+0.0636063569579j)*x_ref[0]**o + ((-0.801119774229-0.680049099107j))*x_ref[0] + ((-0.254756990894+0.268740227435j))*x_ref[1]**o + ((-0.891757975665-0.122274024184j))*x_ref[1]
+        arg[(1, 0)]=(-0.847604463218-0.955131960818j)*x[0]**o + ((-0.812618806559-0.588170060449j))*x[0] + ((-0.118479999773-0.80737574958j))*x[1]**o + ((-0.71174218851-0.78275628441j))*x[1]
+        ref[(1, 0)]=(-0.847604463218-0.955131960818j)*x_ref[0]**o + ((-0.812618806559-0.588170060449j))*x_ref[0] + ((-0.118479999773-0.80737574958j))*x_ref[1]**o + ((-0.71174218851-0.78275628441j))*x_ref[1]
+        arg[(1, 1)]=(0.545641090086+0.705158364453j)*x[0]**o + ((0.368964562821-0.277275452489j))*x[0] + ((0.173309540684+0.763008918537j))*x[1]**o + ((0.46931819603+0.411149531646j))*x[1]
+        ref[(1, 1)]=(0.545641090086+0.705158364453j)*x_ref[0]**o + ((0.368964562821-0.277275452489j))*x_ref[0] + ((0.173309540684+0.763008918537j))*x_ref[1]**o + ((0.46931819603+0.411149531646j))*x_ref[1]
+        arg[(1, 2)]=(-0.612675919849+0.807995855993j)*x[0]**o + ((-0.8680573534-0.376259948242j))*x[0] + ((-0.382823003657-0.921257697648j))*x[1]**o + ((0.560232321862+0.480953187297j))*x[1]
+        ref[(1, 2)]=(-0.612675919849+0.807995855993j)*x_ref[0]**o + ((-0.8680573534-0.376259948242j))*x_ref[0] + ((-0.382823003657-0.921257697648j))*x_ref[1]**o + ((0.560232321862+0.480953187297j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.315466079501-0.436669873645j)*x[2]**o + ((0.0917732434472+0.0801985984225j))*x[2]
+            ref[(0, 0)]+=(0.315466079501-0.436669873645j)*x_ref[2]**o + ((0.0917732434472+0.0801985984225j))*x_ref[2]
+            arg[(0, 1)]+=(-0.559130069165-0.098624695989j)*x[2]**o + ((0.264929206636+0.209570798601j))*x[2]
+            ref[(0, 1)]+=(-0.559130069165-0.098624695989j)*x_ref[2]**o + ((0.264929206636+0.209570798601j))*x_ref[2]
+            arg[(0, 2)]+=(0.341162580748+0.795740038207j)*x[2]**o + ((0.457741233391+0.971247619333j))*x[2]
+            ref[(0, 2)]+=(0.341162580748+0.795740038207j)*x_ref[2]**o + ((0.457741233391+0.971247619333j))*x_ref[2]
+            arg[(1, 0)]+=(0.194337354193+0.252875012575j)*x[2]**o + ((-0.765180399508+0.151965599801j))*x[2]
+            ref[(1, 0)]+=(0.194337354193+0.252875012575j)*x_ref[2]**o + ((-0.765180399508+0.151965599801j))*x_ref[2]
+            arg[(1, 1)]+=(0.925821038621+0.364109666175j)*x[2]**o + ((0.360278531742+0.108304553951j))*x[2]
+            ref[(1, 1)]+=(0.925821038621+0.364109666175j)*x_ref[2]**o + ((0.360278531742+0.108304553951j))*x_ref[2]
+            arg[(1, 2)]+=(0.924413415784+0.701539253253j)*x[2]**o + ((-0.212259615625-0.387566633931j))*x[2]
+            ref[(1, 2)]+=(0.924413415784+0.701539253253j)*x_ref[2]**o + ((-0.212259615625-0.387566633931j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2),w)
+        ref = Data(0,(4, 2, 2),w_ref)
+        arg[(0, 0, 0)]=(0.666593298939+0.816280729793j)*x[0]**o + ((0.150036605645-0.361597231033j))*x[0] + ((0.956114966053-0.921346673668j))*x[1]**o + ((0.375839947545-0.49292808529j))*x[1]
+        ref[(0, 0, 0)]=(0.666593298939+0.816280729793j)*x_ref[0]**o + ((0.150036605645-0.361597231033j))*x_ref[0] + ((0.956114966053-0.921346673668j))*x_ref[1]**o + ((0.375839947545-0.49292808529j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.5813274165-0.669976281607j)*x[0]**o + ((0.907091434541+0.651638103445j))*x[0] + ((0.213180945624+0.976042624244j))*x[1]**o + ((-0.389849039362+0.922194761755j))*x[1]
+        ref[(0, 0, 1)]=(0.5813274165-0.669976281607j)*x_ref[0]**o + ((0.907091434541+0.651638103445j))*x_ref[0] + ((0.213180945624+0.976042624244j))*x_ref[1]**o + ((-0.389849039362+0.922194761755j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.602470518704+0.959824315044j)*x[0]**o + ((-0.731294452709-0.00361138469734j))*x[0] + ((0.167273937612+0.723861940512j))*x[1]**o + ((-0.756142380089-0.129311848942j))*x[1]
+        ref[(0, 1, 0)]=(-0.602470518704+0.959824315044j)*x_ref[0]**o + ((-0.731294452709-0.00361138469734j))*x_ref[0] + ((0.167273937612+0.723861940512j))*x_ref[1]**o + ((-0.756142380089-0.129311848942j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.403900104221-0.706965517753j)*x[0]**o + ((0.508915649677-0.162580390508j))*x[0] + ((0.440332845838-0.888403948713j))*x[1]**o + ((0.76478987772+0.522115089563j))*x[1]
+        ref[(0, 1, 1)]=(0.403900104221-0.706965517753j)*x_ref[0]**o + ((0.508915649677-0.162580390508j))*x_ref[0] + ((0.440332845838-0.888403948713j))*x_ref[1]**o + ((0.76478987772+0.522115089563j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.59247751756+0.88659838174j)*x[0]**o + ((0.748804842823-0.109951594524j))*x[0] + ((0.945694627814+0.0424978946458j))*x[1]**o + ((-0.153384615717-0.547935786088j))*x[1]
+        ref[(1, 0, 0)]=(-0.59247751756+0.88659838174j)*x_ref[0]**o + ((0.748804842823-0.109951594524j))*x_ref[0] + ((0.945694627814+0.0424978946458j))*x_ref[1]**o + ((-0.153384615717-0.547935786088j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.044015721411-0.517862839911j)*x[0]**o + ((0.456289637443+0.820683702348j))*x[0] + ((0.41736767008-0.390453076834j))*x[1]**o + ((-0.596063590611-0.563427985067j))*x[1]
+        ref[(1, 0, 1)]=(0.044015721411-0.517862839911j)*x_ref[0]**o + ((0.456289637443+0.820683702348j))*x_ref[0] + ((0.41736767008-0.390453076834j))*x_ref[1]**o + ((-0.596063590611-0.563427985067j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.963819607583-0.825603560319j)*x[0]**o + ((-0.683451868813+0.087968941632j))*x[0] + ((-0.329857047487+0.539896992339j))*x[1]**o + ((0.167574880096-0.623485113186j))*x[1]
+        ref[(1, 1, 0)]=(-0.963819607583-0.825603560319j)*x_ref[0]**o + ((-0.683451868813+0.087968941632j))*x_ref[0] + ((-0.329857047487+0.539896992339j))*x_ref[1]**o + ((0.167574880096-0.623485113186j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.253304160428-0.150596452572j)*x[0]**o + ((-0.827477192906+0.0613252867354j))*x[0] + ((0.465352071181-0.0434010970026j))*x[1]**o + ((0.878669186469+0.0771488589676j))*x[1]
+        ref[(1, 1, 1)]=(-0.253304160428-0.150596452572j)*x_ref[0]**o + ((-0.827477192906+0.0613252867354j))*x_ref[0] + ((0.465352071181-0.0434010970026j))*x_ref[1]**o + ((0.878669186469+0.0771488589676j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.0012117286439-0.423914803835j)*x[0]**o + ((-0.56793179097+0.52431276903j))*x[0] + ((-0.131829847788-0.198077467121j))*x[1]**o + ((0.39878339163-0.0470931663003j))*x[1]
+        ref[(2, 0, 0)]=(0.0012117286439-0.423914803835j)*x_ref[0]**o + ((-0.56793179097+0.52431276903j))*x_ref[0] + ((-0.131829847788-0.198077467121j))*x_ref[1]**o + ((0.39878339163-0.0470931663003j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.933222821787+0.271476666948j)*x[0]**o + ((0.0674506608304+0.262329863653j))*x[0] + ((-0.656239024994-0.875849502015j))*x[1]**o + ((-0.27406954869+0.5563028092j))*x[1]
+        ref[(2, 0, 1)]=(0.933222821787+0.271476666948j)*x_ref[0]**o + ((0.0674506608304+0.262329863653j))*x_ref[0] + ((-0.656239024994-0.875849502015j))*x_ref[1]**o + ((-0.27406954869+0.5563028092j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.177184255626+0.508383977876j)*x[0]**o + ((0.973718084764-0.54883039458j))*x[0] + ((-0.380714246473+0.608967000499j))*x[1]**o + ((-0.615186804066+0.319552489765j))*x[1]
+        ref[(2, 1, 0)]=(0.177184255626+0.508383977876j)*x_ref[0]**o + ((0.973718084764-0.54883039458j))*x_ref[0] + ((-0.380714246473+0.608967000499j))*x_ref[1]**o + ((-0.615186804066+0.319552489765j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.0162756976429+0.143807872639j)*x[0]**o + ((0.0718341067285-0.922903106423j))*x[0] + ((0.798983744265-0.759355791447j))*x[1]**o + ((-0.0369917348111+0.45123828384j))*x[1]
+        ref[(2, 1, 1)]=(0.0162756976429+0.143807872639j)*x_ref[0]**o + ((0.0718341067285-0.922903106423j))*x_ref[0] + ((0.798983744265-0.759355791447j))*x_ref[1]**o + ((-0.0369917348111+0.45123828384j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.517415230616-0.744725180992j)*x[0]**o + ((0.564698357312-0.890227921509j))*x[0] + ((0.104761511086-0.402003557192j))*x[1]**o + ((0.0701268478186-0.609295006272j))*x[1]
+        ref[(3, 0, 0)]=(0.517415230616-0.744725180992j)*x_ref[0]**o + ((0.564698357312-0.890227921509j))*x_ref[0] + ((0.104761511086-0.402003557192j))*x_ref[1]**o + ((0.0701268478186-0.609295006272j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.337631172377+0.236567333711j)*x[0]**o + ((0.273755055316+0.701155915561j))*x[0] + ((-0.0538391843042+0.536422431951j))*x[1]**o + ((0.685176989-0.319170331011j))*x[1]
+        ref[(3, 0, 1)]=(-0.337631172377+0.236567333711j)*x_ref[0]**o + ((0.273755055316+0.701155915561j))*x_ref[0] + ((-0.0538391843042+0.536422431951j))*x_ref[1]**o + ((0.685176989-0.319170331011j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.404710648215+0.442514285696j)*x[0]**o + ((-0.162924934625+0.862633071804j))*x[0] + ((-0.624731083782-0.794447700845j))*x[1]**o + ((-0.808492081299+0.28389266216j))*x[1]
+        ref[(3, 1, 0)]=(-0.404710648215+0.442514285696j)*x_ref[0]**o + ((-0.162924934625+0.862633071804j))*x_ref[0] + ((-0.624731083782-0.794447700845j))*x_ref[1]**o + ((-0.808492081299+0.28389266216j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.236417859139+0.6238597133j)*x[0]**o + ((-0.960638660808+0.397951288511j))*x[0] + ((0.062162759184+0.0749424056657j))*x[1]**o + ((0.0370191106982-0.758799226008j))*x[1]
+        ref[(3, 1, 1)]=(0.236417859139+0.6238597133j)*x_ref[0]**o + ((-0.960638660808+0.397951288511j))*x_ref[0] + ((0.062162759184+0.0749424056657j))*x_ref[1]**o + ((0.0370191106982-0.758799226008j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.461342720187-0.231370889571j)*x[2]**o + ((0.412793967058-0.948187292888j))*x[2]
+            ref[(0, 0, 0)]+=(0.461342720187-0.231370889571j)*x_ref[2]**o + ((0.412793967058-0.948187292888j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.976515516709-0.275347628476j)*x[2]**o + ((0.836889193332-0.291014036655j))*x[2]
+            ref[(0, 0, 1)]+=(0.976515516709-0.275347628476j)*x_ref[2]**o + ((0.836889193332-0.291014036655j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.348060705433-0.317582196345j)*x[2]**o + ((-0.275164888185-0.266366699993j))*x[2]
+            ref[(0, 1, 0)]+=(-0.348060705433-0.317582196345j)*x_ref[2]**o + ((-0.275164888185-0.266366699993j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.968204389127-0.0539209143901j)*x[2]**o + ((-0.229553795006-0.638140954211j))*x[2]
+            ref[(0, 1, 1)]+=(0.968204389127-0.0539209143901j)*x_ref[2]**o + ((-0.229553795006-0.638140954211j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.587880457541-0.766346483535j)*x[2]**o + ((0.828907127467+0.385317520358j))*x[2]
+            ref[(1, 0, 0)]+=(-0.587880457541-0.766346483535j)*x_ref[2]**o + ((0.828907127467+0.385317520358j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.463665071185+0.827067905077j)*x[2]**o + ((-0.387059354313-0.444226865122j))*x[2]
+            ref[(1, 0, 1)]+=(-0.463665071185+0.827067905077j)*x_ref[2]**o + ((-0.387059354313-0.444226865122j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.718679935975+0.380721198622j)*x[2]**o + ((0.976452937237+0.328764928583j))*x[2]
+            ref[(1, 1, 0)]+=(0.718679935975+0.380721198622j)*x_ref[2]**o + ((0.976452937237+0.328764928583j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.144869271227-0.43757737201j)*x[2]**o + ((0.319517086082-0.0857576518654j))*x[2]
+            ref[(1, 1, 1)]+=(0.144869271227-0.43757737201j)*x_ref[2]**o + ((0.319517086082-0.0857576518654j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.908909632348-0.0564231149278j)*x[2]**o + ((0.803569535948-0.59657680996j))*x[2]
+            ref[(2, 0, 0)]+=(0.908909632348-0.0564231149278j)*x_ref[2]**o + ((0.803569535948-0.59657680996j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.0524727769444-0.763964919036j)*x[2]**o + ((0.489999476084-0.891298807316j))*x[2]
+            ref[(2, 0, 1)]+=(-0.0524727769444-0.763964919036j)*x_ref[2]**o + ((0.489999476084-0.891298807316j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.527259428697-0.0423761540832j)*x[2]**o + ((-0.280997098312+0.867928459467j))*x[2]
+            ref[(2, 1, 0)]+=(-0.527259428697-0.0423761540832j)*x_ref[2]**o + ((-0.280997098312+0.867928459467j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.728399527865-0.881407772965j)*x[2]**o + ((0.399349380633-0.192573843665j))*x[2]
+            ref[(2, 1, 1)]+=(0.728399527865-0.881407772965j)*x_ref[2]**o + ((0.399349380633-0.192573843665j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.509515866271-0.855937196023j)*x[2]**o + ((0.165435112292-0.380273205397j))*x[2]
+            ref[(3, 0, 0)]+=(0.509515866271-0.855937196023j)*x_ref[2]**o + ((0.165435112292-0.380273205397j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.987338239529+0.608306339281j)*x[2]**o + ((-0.265479294265+0.912679840088j))*x[2]
+            ref[(3, 0, 1)]+=(0.987338239529+0.608306339281j)*x_ref[2]**o + ((-0.265479294265+0.912679840088j))*x_ref[2]
+            arg[(3, 1, 0)]+=(0.257397317017-0.386896682134j)*x[2]**o + ((-0.849898455089-0.919739833881j))*x[2]
+            ref[(3, 1, 0)]+=(0.257397317017-0.386896682134j)*x_ref[2]**o + ((-0.849898455089-0.919739833881j))*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.300056174132+0.584564842503j)*x[2]**o + ((-0.77887488445-0.231341654803j))*x[2]
+            ref[(3, 1, 1)]+=(-0.300056174132+0.584564842503j)*x_ref[2]**o + ((-0.77887488445-0.231341654803j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3, 3),w)
+        ref = Data(0,(2, 2, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(0.735313759227+0.700550985529j)*x[0]**o + ((-0.210321469336+0.00822802542784j))*x[0] + ((-0.583277378525+0.565498633905j))*x[1]**o + ((-0.97590780103-0.0408054456745j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.735313759227+0.700550985529j)*x_ref[0]**o + ((-0.210321469336+0.00822802542784j))*x_ref[0] + ((-0.583277378525+0.565498633905j))*x_ref[1]**o + ((-0.97590780103-0.0408054456745j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.12285142651+0.878427864332j)*x[0]**o + ((-0.132853937659-0.0525040813171j))*x[0] + ((-0.543927108514-0.312149125459j))*x[1]**o + ((-0.345192975118-0.0620041551198j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.12285142651+0.878427864332j)*x_ref[0]**o + ((-0.132853937659-0.0525040813171j))*x_ref[0] + ((-0.543927108514-0.312149125459j))*x_ref[1]**o + ((-0.345192975118-0.0620041551198j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.0934216602183-0.401162850023j)*x[0]**o + ((0.862886877084+0.137175854797j))*x[0] + ((0.921001603286-0.907639691226j))*x[1]**o + ((0.5966576197-0.0590624021685j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.0934216602183-0.401162850023j)*x_ref[0]**o + ((0.862886877084+0.137175854797j))*x_ref[0] + ((0.921001603286-0.907639691226j))*x_ref[1]**o + ((0.5966576197-0.0590624021685j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.569912116913+0.78938267611j)*x[0]**o + ((0.555383447461+0.94714572737j))*x[0] + ((-0.566958105552-0.606432415798j))*x[1]**o + ((-0.0412040624194+0.954150815466j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.569912116913+0.78938267611j)*x_ref[0]**o + ((0.555383447461+0.94714572737j))*x_ref[0] + ((-0.566958105552-0.606432415798j))*x_ref[1]**o + ((-0.0412040624194+0.954150815466j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.97117585845+0.203481872264j)*x[0]**o + ((0.362931428377+0.521062220389j))*x[0] + ((0.799262066945+0.475106334826j))*x[1]**o + ((-0.78451567729-0.939644376714j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.97117585845+0.203481872264j)*x_ref[0]**o + ((0.362931428377+0.521062220389j))*x_ref[0] + ((0.799262066945+0.475106334826j))*x_ref[1]**o + ((-0.78451567729-0.939644376714j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.18437769808-0.157565795422j)*x[0]**o + ((-0.736013084351-0.736389802742j))*x[0] + ((0.681228565185-0.857099375647j))*x[1]**o + ((0.125024559536-0.490164158846j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.18437769808-0.157565795422j)*x_ref[0]**o + ((-0.736013084351-0.736389802742j))*x_ref[0] + ((0.681228565185-0.857099375647j))*x_ref[1]**o + ((0.125024559536-0.490164158846j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.923687108924+0.400571248365j)*x[0]**o + ((0.41775220265-0.842750699824j))*x[0] + ((0.304084127728-0.146909248499j))*x[1]**o + ((0.175114468899+0.605004730779j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.923687108924+0.400571248365j)*x_ref[0]**o + ((0.41775220265-0.842750699824j))*x_ref[0] + ((0.304084127728-0.146909248499j))*x_ref[1]**o + ((0.175114468899+0.605004730779j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.831851702786+0.681585546774j)*x[0]**o + ((-0.105197672233-0.426676296076j))*x[0] + ((-0.00765932348139-0.697106296074j))*x[1]**o + ((0.0021471560653+0.818391985387j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.831851702786+0.681585546774j)*x_ref[0]**o + ((-0.105197672233-0.426676296076j))*x_ref[0] + ((-0.00765932348139-0.697106296074j))*x_ref[1]**o + ((0.0021471560653+0.818391985387j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.534403836506-0.504269941409j)*x[0]**o + ((-0.105941100075+0.762155653714j))*x[0] + ((0.520792501967-0.73469810387j))*x[1]**o + ((-0.45883843889-0.857685692432j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.534403836506-0.504269941409j)*x_ref[0]**o + ((-0.105941100075+0.762155653714j))*x_ref[0] + ((0.520792501967-0.73469810387j))*x_ref[1]**o + ((-0.45883843889-0.857685692432j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.359246166528+0.0278888628067j)*x[0]**o + ((-0.309264422043+0.355626217211j))*x[0] + ((0.211670741562-0.81238700063j))*x[1]**o + ((0.529556930307+0.0111186820819j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.359246166528+0.0278888628067j)*x_ref[0]**o + ((-0.309264422043+0.355626217211j))*x_ref[0] + ((0.211670741562-0.81238700063j))*x_ref[1]**o + ((0.529556930307+0.0111186820819j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.316799563335+0.806495821435j)*x[0]**o + ((0.132538783863+0.306370431783j))*x[0] + ((-0.473051976693+0.509521120603j))*x[1]**o + ((0.0483364918784-0.360655129445j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.316799563335+0.806495821435j)*x_ref[0]**o + ((0.132538783863+0.306370431783j))*x_ref[0] + ((-0.473051976693+0.509521120603j))*x_ref[1]**o + ((0.0483364918784-0.360655129445j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.706850971729+0.244910452897j)*x[0]**o + ((0.50860430397+0.95854797676j))*x[0] + ((-0.0362573106741-0.185297118401j))*x[1]**o + ((-0.355606514071+0.586816548471j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.706850971729+0.244910452897j)*x_ref[0]**o + ((0.50860430397+0.95854797676j))*x_ref[0] + ((-0.0362573106741-0.185297118401j))*x_ref[1]**o + ((-0.355606514071+0.586816548471j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.171154433801+0.933610145362j)*x[0]**o + ((-0.138194168359-0.86561975605j))*x[0] + ((-0.381600851134+0.637089072949j))*x[1]**o + ((-0.983938966334+0.816059498374j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.171154433801+0.933610145362j)*x_ref[0]**o + ((-0.138194168359-0.86561975605j))*x_ref[0] + ((-0.381600851134+0.637089072949j))*x_ref[1]**o + ((-0.983938966334+0.816059498374j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.222044365895-0.24703734865j)*x[0]**o + ((0.779942698144+0.344927892443j))*x[0] + ((-0.812358096515-0.69177374869j))*x[1]**o + ((-0.991442234099-0.681552041896j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.222044365895-0.24703734865j)*x_ref[0]**o + ((0.779942698144+0.344927892443j))*x_ref[0] + ((-0.812358096515-0.69177374869j))*x_ref[1]**o + ((-0.991442234099-0.681552041896j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.54573193693-0.834169314732j)*x[0]**o + ((0.869648944117-0.391540770903j))*x[0] + ((0.374921033977-0.919145032939j))*x[1]**o + ((0.377738795319-0.757452776871j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.54573193693-0.834169314732j)*x_ref[0]**o + ((0.869648944117-0.391540770903j))*x_ref[0] + ((0.374921033977-0.919145032939j))*x_ref[1]**o + ((0.377738795319-0.757452776871j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.139999609905-0.953468544589j)*x[0]**o + ((0.695297546862-0.594395364041j))*x[0] + ((0.881347145595+0.450020426539j))*x[1]**o + ((-0.659051962453+0.348709139414j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.139999609905-0.953468544589j)*x_ref[0]**o + ((0.695297546862-0.594395364041j))*x_ref[0] + ((0.881347145595+0.450020426539j))*x_ref[1]**o + ((-0.659051962453+0.348709139414j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.392029542333-0.871013066144j)*x[0]**o + ((0.872803246753-0.498382961431j))*x[0] + ((-0.981891179865-0.618391900563j))*x[1]**o + ((0.514500670773+0.778760046912j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.392029542333-0.871013066144j)*x_ref[0]**o + ((0.872803246753-0.498382961431j))*x_ref[0] + ((-0.981891179865-0.618391900563j))*x_ref[1]**o + ((0.514500670773+0.778760046912j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.0348495281494-0.696338783098j)*x[0]**o + ((0.331672776743+0.703719081108j))*x[0] + ((0.916065463804-0.759616376551j))*x[1]**o + ((0.232443745717+0.647897726335j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.0348495281494-0.696338783098j)*x_ref[0]**o + ((0.331672776743+0.703719081108j))*x_ref[0] + ((0.916065463804-0.759616376551j))*x_ref[1]**o + ((0.232443745717+0.647897726335j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.375204436097+0.833933816869j)*x[0]**o + ((-0.155522139393-0.501996326241j))*x[0] + ((0.417503388183+0.530793651059j))*x[1]**o + ((-0.830068707411+0.0365759333383j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.375204436097+0.833933816869j)*x_ref[0]**o + ((-0.155522139393-0.501996326241j))*x_ref[0] + ((0.417503388183+0.530793651059j))*x_ref[1]**o + ((-0.830068707411+0.0365759333383j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.413136740025+0.220951644843j)*x[0]**o + ((-0.291044601072+0.758164446856j))*x[0] + ((-0.179063802082-0.483993119116j))*x[1]**o + ((-0.0582157957895-0.477953637798j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.413136740025+0.220951644843j)*x_ref[0]**o + ((-0.291044601072+0.758164446856j))*x_ref[0] + ((-0.179063802082-0.483993119116j))*x_ref[1]**o + ((-0.0582157957895-0.477953637798j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.846248609598-0.94562432562j)*x[0]**o + ((0.0337848191522-0.0841245608397j))*x[0] + ((0.815114640675-0.896164264831j))*x[1]**o + ((-0.705144741154-0.891212699765j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.846248609598-0.94562432562j)*x_ref[0]**o + ((0.0337848191522-0.0841245608397j))*x_ref[0] + ((0.815114640675-0.896164264831j))*x_ref[1]**o + ((-0.705144741154-0.891212699765j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.260122326743-0.368148113559j)*x[0]**o + ((0.848937593689-0.114232148658j))*x[0] + ((0.0684195175406+0.842053438754j))*x[1]**o + ((-0.671264477463-0.336270846702j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.260122326743-0.368148113559j)*x_ref[0]**o + ((0.848937593689-0.114232148658j))*x_ref[0] + ((0.0684195175406+0.842053438754j))*x_ref[1]**o + ((-0.671264477463-0.336270846702j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.733751376648+0.958391838127j)*x[0]**o + ((0.513309059548+0.60557335028j))*x[0] + ((-0.0108733346472-0.860378502457j))*x[1]**o + ((-0.732517623419+0.917997768115j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.733751376648+0.958391838127j)*x_ref[0]**o + ((0.513309059548+0.60557335028j))*x_ref[0] + ((-0.0108733346472-0.860378502457j))*x_ref[1]**o + ((-0.732517623419+0.917997768115j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.0169839591453+0.372329242425j)*x[0]**o + ((-0.485280807457-0.736562398928j))*x[0] + ((-0.182898979627-0.289319835683j))*x[1]**o + ((-0.866475767944-0.477278804519j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.0169839591453+0.372329242425j)*x_ref[0]**o + ((-0.485280807457-0.736562398928j))*x_ref[0] + ((-0.182898979627-0.289319835683j))*x_ref[1]**o + ((-0.866475767944-0.477278804519j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.189910141339-0.495207576473j)*x[0]**o + ((-0.917435291199+0.557829412232j))*x[0] + ((0.637432888828-0.0949187366145j))*x[1]**o + ((0.627530249401+0.807283650241j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.189910141339-0.495207576473j)*x_ref[0]**o + ((-0.917435291199+0.557829412232j))*x_ref[0] + ((0.637432888828-0.0949187366145j))*x_ref[1]**o + ((0.627530249401+0.807283650241j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.364083005575-0.273917101142j)*x[0]**o + ((-0.675286929657-0.993461515497j))*x[0] + ((0.726655041208-0.221735390695j))*x[1]**o + ((0.113103629503-0.0153840353635j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.364083005575-0.273917101142j)*x_ref[0]**o + ((-0.675286929657-0.993461515497j))*x_ref[0] + ((0.726655041208-0.221735390695j))*x_ref[1]**o + ((0.113103629503-0.0153840353635j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(-0.57789104412-0.0886037451338j)*x[0]**o + ((-0.418166530406-0.655113981416j))*x[0] + ((0.00615636466568-0.172536996279j))*x[1]**o + ((-0.555621888137-0.46476325382j))*x[1]
+        ref[(1, 0, 2, 2)]=(-0.57789104412-0.0886037451338j)*x_ref[0]**o + ((-0.418166530406-0.655113981416j))*x_ref[0] + ((0.00615636466568-0.172536996279j))*x_ref[1]**o + ((-0.555621888137-0.46476325382j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.147059685401+0.450965459499j)*x[0]**o + ((0.715515590573+0.600488270794j))*x[0] + ((0.704496801592+0.631312325701j))*x[1]**o + ((0.731576860948-0.921415513691j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.147059685401+0.450965459499j)*x_ref[0]**o + ((0.715515590573+0.600488270794j))*x_ref[0] + ((0.704496801592+0.631312325701j))*x_ref[1]**o + ((0.731576860948-0.921415513691j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.0410011997471-0.466090148104j)*x[0]**o + ((0.310905084248-0.786676766956j))*x[0] + ((0.0382599332516-0.983000125741j))*x[1]**o + ((0.790137833587-0.509904712364j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.0410011997471-0.466090148104j)*x_ref[0]**o + ((0.310905084248-0.786676766956j))*x_ref[0] + ((0.0382599332516-0.983000125741j))*x_ref[1]**o + ((0.790137833587-0.509904712364j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.0500517620109-0.47956621553j)*x[0]**o + ((-0.343234351333-0.845047068579j))*x[0] + ((0.483945309126-0.210778498409j))*x[1]**o + ((-0.034602027357-0.274410453255j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.0500517620109-0.47956621553j)*x_ref[0]**o + ((-0.343234351333-0.845047068579j))*x_ref[0] + ((0.483945309126-0.210778498409j))*x_ref[1]**o + ((-0.034602027357-0.274410453255j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.0460057024476-0.87302717194j)*x[0]**o + ((-0.237078925591-0.802146305704j))*x[0] + ((-0.590478790866-0.618793828742j))*x[1]**o + ((-0.111189944304-0.262272292668j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.0460057024476-0.87302717194j)*x_ref[0]**o + ((-0.237078925591-0.802146305704j))*x_ref[0] + ((-0.590478790866-0.618793828742j))*x_ref[1]**o + ((-0.111189944304-0.262272292668j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.181324773426-0.813146662102j)*x[0]**o + ((0.468373695277+0.762558954129j))*x[0] + ((-0.978833398603-0.415483467685j))*x[1]**o + ((-0.100930388695-0.85706423965j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.181324773426-0.813146662102j)*x_ref[0]**o + ((0.468373695277+0.762558954129j))*x_ref[0] + ((-0.978833398603-0.415483467685j))*x_ref[1]**o + ((-0.100930388695-0.85706423965j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.502040979377-0.205367664424j)*x[0]**o + ((0.179794781625-0.860870442825j))*x[0] + ((0.45413373188+0.0192415594231j))*x[1]**o + ((-0.552307731968-0.612517721606j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.502040979377-0.205367664424j)*x_ref[0]**o + ((0.179794781625-0.860870442825j))*x_ref[0] + ((0.45413373188+0.0192415594231j))*x_ref[1]**o + ((-0.552307731968-0.612517721606j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.730640098511-0.475580535568j)*x[0]**o + ((0.355535315087-0.576850502993j))*x[0] + ((-0.963775277858+0.693193522372j))*x[1]**o + ((-0.460066912008+0.753791955957j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.730640098511-0.475580535568j)*x_ref[0]**o + ((0.355535315087-0.576850502993j))*x_ref[0] + ((-0.963775277858+0.693193522372j))*x_ref[1]**o + ((-0.460066912008+0.753791955957j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.550793540625-0.620774936651j)*x[0]**o + ((-0.933872124559-0.294731149386j))*x[0] + ((-0.110370561248-0.810466537225j))*x[1]**o + ((-0.870891690283-0.0342786529528j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.550793540625-0.620774936651j)*x_ref[0]**o + ((-0.933872124559-0.294731149386j))*x_ref[0] + ((-0.110370561248-0.810466537225j))*x_ref[1]**o + ((-0.870891690283-0.0342786529528j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.740751218986+0.933202406711j)*x[0]**o + ((0.493736330595+0.696137939626j))*x[0] + ((0.495384057755+0.0763932318108j))*x[1]**o + ((-0.184227888094+0.17184198156j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.740751218986+0.933202406711j)*x_ref[0]**o + ((0.493736330595+0.696137939626j))*x_ref[0] + ((0.495384057755+0.0763932318108j))*x_ref[1]**o + ((-0.184227888094+0.17184198156j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.200613631118-0.154590169264j)*x[2]**o + ((-0.0575050316414+0.658698438416j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.200613631118-0.154590169264j)*x_ref[2]**o + ((-0.0575050316414+0.658698438416j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.0456265357873-0.819823871924j)*x[2]**o + ((-0.202001984681+0.796365088084j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.0456265357873-0.819823871924j)*x_ref[2]**o + ((-0.202001984681+0.796365088084j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.410679811106+0.358852639358j)*x[2]**o + ((0.236587912319-0.609873443214j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.410679811106+0.358852639358j)*x_ref[2]**o + ((0.236587912319-0.609873443214j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.846202261735-0.159252976867j)*x[2]**o + ((0.446527274156+0.807689639706j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.846202261735-0.159252976867j)*x_ref[2]**o + ((0.446527274156+0.807689639706j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.443818621309-0.398693953547j)*x[2]**o + ((-0.709378911329-0.32100230966j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.443818621309-0.398693953547j)*x_ref[2]**o + ((-0.709378911329-0.32100230966j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.775915711834-0.305610866737j)*x[2]**o + ((-0.630008065385+0.377697981204j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.775915711834-0.305610866737j)*x_ref[2]**o + ((-0.630008065385+0.377697981204j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.750240371154+0.602477046924j)*x[2]**o + ((0.785030267094+0.953547128739j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.750240371154+0.602477046924j)*x_ref[2]**o + ((0.785030267094+0.953547128739j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.770333053552+0.83449594461j)*x[2]**o + ((-0.626391431294-0.195358280865j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.770333053552+0.83449594461j)*x_ref[2]**o + ((-0.626391431294-0.195358280865j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(-0.729995404826-0.747532272757j)*x[2]**o + ((0.976096707256-0.496339347287j))*x[2]
+            ref[(0, 0, 2, 2)]+=(-0.729995404826-0.747532272757j)*x_ref[2]**o + ((0.976096707256-0.496339347287j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.572535071994+0.09524844185j)*x[2]**o + ((0.00597828681314+0.566383574513j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.572535071994+0.09524844185j)*x_ref[2]**o + ((0.00597828681314+0.566383574513j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.399474586566+0.762592342541j)*x[2]**o + ((-0.73022177962-0.157151403285j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.399474586566+0.762592342541j)*x_ref[2]**o + ((-0.73022177962-0.157151403285j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.424640802074-0.769867767498j)*x[2]**o + ((-0.573391673697-0.435063407979j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.424640802074-0.769867767498j)*x_ref[2]**o + ((-0.573391673697-0.435063407979j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.989071507471-0.0950725640431j)*x[2]**o + ((-0.497299693941+0.660952860029j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.989071507471-0.0950725640431j)*x_ref[2]**o + ((-0.497299693941+0.660952860029j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.461579093655-0.730367073252j)*x[2]**o + ((0.442281782205-0.530425570354j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.461579093655-0.730367073252j)*x_ref[2]**o + ((0.442281782205-0.530425570354j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.209971329944-0.17296553144j)*x[2]**o + ((-0.390251176426-0.733176950584j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.209971329944-0.17296553144j)*x_ref[2]**o + ((-0.390251176426-0.733176950584j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.721761141282-0.202354204342j)*x[2]**o + ((-0.208543507666-0.679301981487j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.721761141282-0.202354204342j)*x_ref[2]**o + ((-0.208543507666-0.679301981487j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.619016279157+0.777263298905j)*x[2]**o + ((-0.869073867521-0.15379341003j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.619016279157+0.777263298905j)*x_ref[2]**o + ((-0.869073867521-0.15379341003j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(0.965021413061+0.840501358546j)*x[2]**o + ((-0.341252669941-0.461977139862j))*x[2]
+            ref[(0, 1, 2, 2)]+=(0.965021413061+0.840501358546j)*x_ref[2]**o + ((-0.341252669941-0.461977139862j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.527340374959-0.0655185724166j)*x[2]**o + ((0.775176102508+0.958770824514j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.527340374959-0.0655185724166j)*x_ref[2]**o + ((0.775176102508+0.958770824514j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.610307004697+0.74363664937j)*x[2]**o + ((0.231736156653+0.353337359453j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.610307004697+0.74363664937j)*x_ref[2]**o + ((0.231736156653+0.353337359453j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.502819646101+0.604811582224j)*x[2]**o + ((0.579686728614+0.608685196354j))*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.502819646101+0.604811582224j)*x_ref[2]**o + ((0.579686728614+0.608685196354j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.97629779203+0.714948311242j)*x[2]**o + ((-0.537583181344-0.313082434651j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.97629779203+0.714948311242j)*x_ref[2]**o + ((-0.537583181344-0.313082434651j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.660892905432+0.573775508653j)*x[2]**o + ((-0.423897091277-0.852608785475j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.660892905432+0.573775508653j)*x_ref[2]**o + ((-0.423897091277-0.852608785475j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.564049390409-0.321190650955j)*x[2]**o + ((0.153944068378-0.87475304909j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.564049390409-0.321190650955j)*x_ref[2]**o + ((0.153944068378-0.87475304909j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.700686155926-0.612309016594j)*x[2]**o + ((0.220537946626+0.902620765466j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.700686155926-0.612309016594j)*x_ref[2]**o + ((0.220537946626+0.902620765466j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.524192673996+0.462609486658j)*x[2]**o + ((0.0199867387977+0.617602463997j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.524192673996+0.462609486658j)*x_ref[2]**o + ((0.0199867387977+0.617602463997j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(-0.0392277459672+0.997006005746j)*x[2]**o + ((-0.489289887827+0.574030769938j))*x[2]
+            ref[(1, 0, 2, 2)]+=(-0.0392277459672+0.997006005746j)*x_ref[2]**o + ((-0.489289887827+0.574030769938j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.144724902228-0.761344605793j)*x[2]**o + ((-0.137132464855-0.117837305761j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.144724902228-0.761344605793j)*x_ref[2]**o + ((-0.137132464855-0.117837305761j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.472538214647+0.190069427633j)*x[2]**o + ((0.882534565548+0.692655009996j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.472538214647+0.190069427633j)*x_ref[2]**o + ((0.882534565548+0.692655009996j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.905435426255+0.0518203866585j)*x[2]**o + ((0.813109412221-0.747018301069j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.905435426255+0.0518203866585j)*x_ref[2]**o + ((0.813109412221-0.747018301069j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.576946729578+0.123569402989j)*x[2]**o + ((0.939832770961-0.116283922625j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.576946729578+0.123569402989j)*x_ref[2]**o + ((0.939832770961-0.116283922625j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.653073048432-0.936056824466j)*x[2]**o + ((-0.606753061333+0.71971352117j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.653073048432-0.936056824466j)*x_ref[2]**o + ((-0.606753061333+0.71971352117j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.892568106518+0.254955821541j)*x[2]**o + ((0.858468579792+0.512300913431j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.892568106518+0.254955821541j)*x_ref[2]**o + ((0.858468579792+0.512300913431j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.402539477715+0.0257186963274j)*x[2]**o + ((-0.407892578895+0.0615149800941j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.402539477715+0.0257186963274j)*x_ref[2]**o + ((-0.407892578895+0.0615149800941j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.411334680389+0.395985469034j)*x[2]**o + ((-0.984362080156-0.899548586032j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.411334680389+0.395985469034j)*x_ref[2]**o + ((-0.984362080156-0.899548586032j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(-0.844791076572-0.689075395442j)*x[2]**o + ((-0.638434790381+0.38495540163j))*x[2]
+            ref[(1, 1, 2, 2)]+=(-0.844791076572-0.689075395442j)*x_ref[2]**o + ((-0.638434790381+0.38495540163j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.345942137186-0.925636369653j)*x[0]**o + ((-0.765447824093+0.813108750318j))*x[0] + ((0.604808236449+0.158890170744j))*x[1]**o + ((0.213896539416+0.266047775978j))*x[1]
+        ref=(-0.345942137186-0.925636369653j)*x_ref[0]**o + ((-0.765447824093+0.813108750318j))*x_ref[0] + ((0.604808236449+0.158890170744j))*x_ref[1]**o + ((0.213896539416+0.266047775978j))*x_ref[1]
+        if dim==3:
+            arg+=((0.23133255061-0.488457456537j))*x[2]**o + ((-0.967926806957+0.522561691972j))*x[2]
+            ref+=((0.23133255061-0.488457456537j))*x_ref[2]**o + ((-0.967926806957+0.522561691972j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.534026548325+0.823628161058j)*x[0]**o + ((-0.681453718989-0.107405600086j))*x[0] + ((0.15115309767+0.660583985491j))*x[1]**o + ((-0.533330559391+0.722435922992j))*x[1]
+        ref[(0,)]=(-0.534026548325+0.823628161058j)*x_ref[0]**o + ((-0.681453718989-0.107405600086j))*x_ref[0] + ((0.15115309767+0.660583985491j))*x_ref[1]**o + ((-0.533330559391+0.722435922992j))*x_ref[1]
+        arg[(1,)]=(0.876204861477+0.391609052829j)*x[0]**o + ((0.856477420313+0.0502331446209j))*x[0] + ((0.339226258451-0.46256156301j))*x[1]**o + ((0.341094620948-0.912185277361j))*x[1]
+        ref[(1,)]=(0.876204861477+0.391609052829j)*x_ref[0]**o + ((0.856477420313+0.0502331446209j))*x_ref[0] + ((0.339226258451-0.46256156301j))*x_ref[1]**o + ((0.341094620948-0.912185277361j))*x_ref[1]
+        arg[(2,)]=(-0.585418147612-0.698847765909j)*x[0]**o + ((0.367324855894+0.830845266384j))*x[0] + ((-0.468856428895+0.0207415507074j))*x[1]**o + ((0.681010703731-0.0920458616691j))*x[1]
+        ref[(2,)]=(-0.585418147612-0.698847765909j)*x_ref[0]**o + ((0.367324855894+0.830845266384j))*x_ref[0] + ((-0.468856428895+0.0207415507074j))*x_ref[1]**o + ((0.681010703731-0.0920458616691j))*x_ref[1]
+        arg[(3,)]=(-0.597096528178+0.462102098158j)*x[0]**o + ((-0.0241706514501+0.842377507026j))*x[0] + ((-0.0289682158012+0.392741657713j))*x[1]**o + ((0.350862616652-0.465759620796j))*x[1]
+        ref[(3,)]=(-0.597096528178+0.462102098158j)*x_ref[0]**o + ((-0.0241706514501+0.842377507026j))*x_ref[0] + ((-0.0289682158012+0.392741657713j))*x_ref[1]**o + ((0.350862616652-0.465759620796j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.579356681097-0.292960012958j)*x[2]**o + ((0.106619221359-0.17584296177j))*x[2]
+            ref[(0,)]+=(-0.579356681097-0.292960012958j)*x_ref[2]**o + ((0.106619221359-0.17584296177j))*x_ref[2]
+            arg[(1,)]+=(-0.870316254897-0.881748779215j)*x[2]**o + ((-0.711677772531-0.147680589558j))*x[2]
+            ref[(1,)]+=(-0.870316254897-0.881748779215j)*x_ref[2]**o + ((-0.711677772531-0.147680589558j))*x_ref[2]
+            arg[(2,)]+=(0.858918356378-0.212719031215j)*x[2]**o + ((0.736051262116-0.954922037555j))*x[2]
+            ref[(2,)]+=(0.858918356378-0.212719031215j)*x_ref[2]**o + ((0.736051262116-0.954922037555j))*x_ref[2]
+            arg[(3,)]+=(0.743751824306+0.93420375479j)*x[2]**o + ((-0.539852921789-0.859866857256j))*x[2]
+            ref[(3,)]+=(0.743751824306+0.93420375479j)*x_ref[2]**o + ((-0.539852921789-0.859866857256j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(0.101818937056+0.830278008122j)*x[0]**o + ((-0.273444552373+0.326084339812j))*x[0] + ((-0.198305170572-0.301357794034j))*x[1]**o + ((0.587862609402-0.737017426736j))*x[1]
+        ref[(0, 0)]=(0.101818937056+0.830278008122j)*x_ref[0]**o + ((-0.273444552373+0.326084339812j))*x_ref[0] + ((-0.198305170572-0.301357794034j))*x_ref[1]**o + ((0.587862609402-0.737017426736j))*x_ref[1]
+        arg[(0, 1)]=(-0.917184531766-0.781085376875j)*x[0]**o + ((0.176083921396-0.043999216278j))*x[0] + ((-0.403781322768+0.647980776382j))*x[1]**o + ((-0.747486795102-0.728606614514j))*x[1]
+        ref[(0, 1)]=(-0.917184531766-0.781085376875j)*x_ref[0]**o + ((0.176083921396-0.043999216278j))*x_ref[0] + ((-0.403781322768+0.647980776382j))*x_ref[1]**o + ((-0.747486795102-0.728606614514j))*x_ref[1]
+        arg[(0, 2)]=(-0.0280690436103-0.390171868454j)*x[0]**o + ((0.675803627791-0.876975878922j))*x[0] + ((-0.429251444254-0.591402119599j))*x[1]**o + ((-0.60168308884-0.412098862671j))*x[1]
+        ref[(0, 2)]=(-0.0280690436103-0.390171868454j)*x_ref[0]**o + ((0.675803627791-0.876975878922j))*x_ref[0] + ((-0.429251444254-0.591402119599j))*x_ref[1]**o + ((-0.60168308884-0.412098862671j))*x_ref[1]
+        arg[(1, 0)]=(0.733248224233+0.678596053865j)*x[0]**o + ((0.454575315721-0.196534931708j))*x[0] + ((-0.526131771649-0.463822414295j))*x[1]**o + ((0.670548163418+0.725505513549j))*x[1]
+        ref[(1, 0)]=(0.733248224233+0.678596053865j)*x_ref[0]**o + ((0.454575315721-0.196534931708j))*x_ref[0] + ((-0.526131771649-0.463822414295j))*x_ref[1]**o + ((0.670548163418+0.725505513549j))*x_ref[1]
+        arg[(1, 1)]=(-0.563193367651+0.756018459509j)*x[0]**o + ((-0.0513825088844+0.0172110313046j))*x[0] + ((-0.907134193283+0.280627978105j))*x[1]**o + ((-0.481396822479+0.686998849487j))*x[1]
+        ref[(1, 1)]=(-0.563193367651+0.756018459509j)*x_ref[0]**o + ((-0.0513825088844+0.0172110313046j))*x_ref[0] + ((-0.907134193283+0.280627978105j))*x_ref[1]**o + ((-0.481396822479+0.686998849487j))*x_ref[1]
+        arg[(1, 2)]=(0.420168996367-0.912966175575j)*x[0]**o + ((0.382902716726+0.897351422989j))*x[0] + ((-0.0907048399739-0.708172756524j))*x[1]**o + ((0.718600774601-0.426906674812j))*x[1]
+        ref[(1, 2)]=(0.420168996367-0.912966175575j)*x_ref[0]**o + ((0.382902716726+0.897351422989j))*x_ref[0] + ((-0.0907048399739-0.708172756524j))*x_ref[1]**o + ((0.718600774601-0.426906674812j))*x_ref[1]
+        arg[(2, 0)]=(-0.296995359227-0.296185376108j)*x[0]**o + ((-0.664223000995-0.209822211365j))*x[0] + ((-0.844339568205+0.149208206576j))*x[1]**o + ((-0.419344257155-0.620087985377j))*x[1]
+        ref[(2, 0)]=(-0.296995359227-0.296185376108j)*x_ref[0]**o + ((-0.664223000995-0.209822211365j))*x_ref[0] + ((-0.844339568205+0.149208206576j))*x_ref[1]**o + ((-0.419344257155-0.620087985377j))*x_ref[1]
+        arg[(2, 1)]=(-0.921561432374+0.104987921404j)*x[0]**o + ((0.124875627611-0.659445984487j))*x[0] + ((-0.703520424357-0.688999302901j))*x[1]**o + ((-0.81870952423-0.570730856769j))*x[1]
+        ref[(2, 1)]=(-0.921561432374+0.104987921404j)*x_ref[0]**o + ((0.124875627611-0.659445984487j))*x_ref[0] + ((-0.703520424357-0.688999302901j))*x_ref[1]**o + ((-0.81870952423-0.570730856769j))*x_ref[1]
+        arg[(2, 2)]=(-0.287588962766-0.630190818851j)*x[0]**o + ((0.569212619822-0.992429853973j))*x[0] + ((-0.8564414261-0.985741678393j))*x[1]**o + ((-0.732554888758+0.966185673186j))*x[1]
+        ref[(2, 2)]=(-0.287588962766-0.630190818851j)*x_ref[0]**o + ((0.569212619822-0.992429853973j))*x_ref[0] + ((-0.8564414261-0.985741678393j))*x_ref[1]**o + ((-0.732554888758+0.966185673186j))*x_ref[1]
+        arg[(3, 0)]=(-0.75346528047-0.0766371721969j)*x[0]**o + ((-0.511262658866-0.448469948506j))*x[0] + ((0.087794970596+0.789519471766j))*x[1]**o + ((0.200062160314-0.559377554808j))*x[1]
+        ref[(3, 0)]=(-0.75346528047-0.0766371721969j)*x_ref[0]**o + ((-0.511262658866-0.448469948506j))*x_ref[0] + ((0.087794970596+0.789519471766j))*x_ref[1]**o + ((0.200062160314-0.559377554808j))*x_ref[1]
+        arg[(3, 1)]=(0.92535567273-0.983932331733j)*x[0]**o + ((0.979011533335-0.0173084647605j))*x[0] + ((-0.00810472627548-0.416367886969j))*x[1]**o + ((0.644374342612+0.774975611522j))*x[1]
+        ref[(3, 1)]=(0.92535567273-0.983932331733j)*x_ref[0]**o + ((0.979011533335-0.0173084647605j))*x_ref[0] + ((-0.00810472627548-0.416367886969j))*x_ref[1]**o + ((0.644374342612+0.774975611522j))*x_ref[1]
+        arg[(3, 2)]=(-0.786028905027-0.911189769152j)*x[0]**o + ((0.866205457142-0.8763553932j))*x[0] + ((0.90548522563-0.482047583482j))*x[1]**o + ((-0.704641918594+0.974879388156j))*x[1]
+        ref[(3, 2)]=(-0.786028905027-0.911189769152j)*x_ref[0]**o + ((0.866205457142-0.8763553932j))*x_ref[0] + ((0.90548522563-0.482047583482j))*x_ref[1]**o + ((-0.704641918594+0.974879388156j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.572682727765+0.0378493854313j)*x[2]**o + ((-0.543221093903-0.859964978735j))*x[2]
+            ref[(0, 0)]+=(-0.572682727765+0.0378493854313j)*x_ref[2]**o + ((-0.543221093903-0.859964978735j))*x_ref[2]
+            arg[(0, 1)]+=(0.329933383568+0.0305466878015j)*x[2]**o + ((-0.550014593377+0.590391838121j))*x[2]
+            ref[(0, 1)]+=(0.329933383568+0.0305466878015j)*x_ref[2]**o + ((-0.550014593377+0.590391838121j))*x_ref[2]
+            arg[(0, 2)]+=(0.275491781358-0.197469728417j)*x[2]**o + ((0.801527370793-0.59207890324j))*x[2]
+            ref[(0, 2)]+=(0.275491781358-0.197469728417j)*x_ref[2]**o + ((0.801527370793-0.59207890324j))*x_ref[2]
+            arg[(1, 0)]+=(-0.495422659535+0.735002325217j)*x[2]**o + ((0.898466518732+0.309525873761j))*x[2]
+            ref[(1, 0)]+=(-0.495422659535+0.735002325217j)*x_ref[2]**o + ((0.898466518732+0.309525873761j))*x_ref[2]
+            arg[(1, 1)]+=(-0.825265098264-0.343357510368j)*x[2]**o + ((-0.577339997764+0.774941474873j))*x[2]
+            ref[(1, 1)]+=(-0.825265098264-0.343357510368j)*x_ref[2]**o + ((-0.577339997764+0.774941474873j))*x_ref[2]
+            arg[(1, 2)]+=(-0.544589516719+0.504689333295j)*x[2]**o + ((-0.390898073265+0.133855798253j))*x[2]
+            ref[(1, 2)]+=(-0.544589516719+0.504689333295j)*x_ref[2]**o + ((-0.390898073265+0.133855798253j))*x_ref[2]
+            arg[(2, 0)]+=(0.815475468541+0.662553071506j)*x[2]**o + ((0.876175700341-0.120773539904j))*x[2]
+            ref[(2, 0)]+=(0.815475468541+0.662553071506j)*x_ref[2]**o + ((0.876175700341-0.120773539904j))*x_ref[2]
+            arg[(2, 1)]+=(0.483089788729+0.984225772717j)*x[2]**o + ((-0.133577118013+0.0679531438476j))*x[2]
+            ref[(2, 1)]+=(0.483089788729+0.984225772717j)*x_ref[2]**o + ((-0.133577118013+0.0679531438476j))*x_ref[2]
+            arg[(2, 2)]+=(0.520774443374+0.921642066675j)*x[2]**o + ((0.273257304511-0.773559391832j))*x[2]
+            ref[(2, 2)]+=(0.520774443374+0.921642066675j)*x_ref[2]**o + ((0.273257304511-0.773559391832j))*x_ref[2]
+            arg[(3, 0)]+=(-0.22499466035-0.224477634709j)*x[2]**o + ((-0.0117002599906-0.067306771452j))*x[2]
+            ref[(3, 0)]+=(-0.22499466035-0.224477634709j)*x_ref[2]**o + ((-0.0117002599906-0.067306771452j))*x_ref[2]
+            arg[(3, 1)]+=(-0.638961786699+0.496202376714j)*x[2]**o + ((0.458474744926-0.254751573298j))*x[2]
+            ref[(3, 1)]+=(-0.638961786699+0.496202376714j)*x_ref[2]**o + ((0.458474744926-0.254751573298j))*x_ref[2]
+            arg[(3, 2)]+=(0.214272885947-0.393952650381j)*x[2]**o + ((0.999100024871+0.297215674366j))*x[2]
+            ref[(3, 2)]+=(0.214272885947-0.393952650381j)*x_ref[2]**o + ((0.999100024871+0.297215674366j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3),w)
+        ref = Data(0,(4, 4, 3),w_ref)
+        arg[(0, 0, 0)]=(0.200941956423+0.901434203848j)*x[0]**o + ((0.373838164227-0.596766344559j))*x[0] + ((0.678174807341-0.874410449342j))*x[1]**o + ((0.894289553448-0.0881008899774j))*x[1]
+        ref[(0, 0, 0)]=(0.200941956423+0.901434203848j)*x_ref[0]**o + ((0.373838164227-0.596766344559j))*x_ref[0] + ((0.678174807341-0.874410449342j))*x_ref[1]**o + ((0.894289553448-0.0881008899774j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.00978550663074-0.83915415062j)*x[0]**o + ((0.466026272941-0.977980739618j))*x[0] + ((-0.242609882683-0.0527037117978j))*x[1]**o + ((-0.000194554862066+0.0993894639842j))*x[1]
+        ref[(0, 0, 1)]=(0.00978550663074-0.83915415062j)*x_ref[0]**o + ((0.466026272941-0.977980739618j))*x_ref[0] + ((-0.242609882683-0.0527037117978j))*x_ref[1]**o + ((-0.000194554862066+0.0993894639842j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.0739414763915+0.24774201703j)*x[0]**o + ((-0.281288419056+0.164035740406j))*x[0] + ((0.587502976926+0.846968969624j))*x[1]**o + ((-0.682050413709+0.225310088646j))*x[1]
+        ref[(0, 0, 2)]=(0.0739414763915+0.24774201703j)*x_ref[0]**o + ((-0.281288419056+0.164035740406j))*x_ref[0] + ((0.587502976926+0.846968969624j))*x_ref[1]**o + ((-0.682050413709+0.225310088646j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.485538724892-0.0159022563711j)*x[0]**o + ((0.290893242534+0.8333803406j))*x[0] + ((0.406488720299+0.214187275793j))*x[1]**o + ((-0.825066086994-0.538094507729j))*x[1]
+        ref[(0, 1, 0)]=(-0.485538724892-0.0159022563711j)*x_ref[0]**o + ((0.290893242534+0.8333803406j))*x_ref[0] + ((0.406488720299+0.214187275793j))*x_ref[1]**o + ((-0.825066086994-0.538094507729j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.717141967204-0.850644449008j)*x[0]**o + ((0.300267534437+0.652634823012j))*x[0] + ((-0.235346094369-0.0259247052604j))*x[1]**o + ((-0.944835778459+0.989656751335j))*x[1]
+        ref[(0, 1, 1)]=(-0.717141967204-0.850644449008j)*x_ref[0]**o + ((0.300267534437+0.652634823012j))*x_ref[0] + ((-0.235346094369-0.0259247052604j))*x_ref[1]**o + ((-0.944835778459+0.989656751335j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.541601524187+0.146205868177j)*x[0]**o + ((0.834551815591+0.123853179359j))*x[0] + ((0.870747853272-0.521567959376j))*x[1]**o + ((-0.0168664397366+0.613364319341j))*x[1]
+        ref[(0, 1, 2)]=(-0.541601524187+0.146205868177j)*x_ref[0]**o + ((0.834551815591+0.123853179359j))*x_ref[0] + ((0.870747853272-0.521567959376j))*x_ref[1]**o + ((-0.0168664397366+0.613364319341j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.436616199417+0.0267403930595j)*x[0]**o + ((0.595356278707-0.544412154466j))*x[0] + ((-0.409240836883+0.878320617494j))*x[1]**o + ((0.111749811866+0.699255468768j))*x[1]
+        ref[(0, 2, 0)]=(-0.436616199417+0.0267403930595j)*x_ref[0]**o + ((0.595356278707-0.544412154466j))*x_ref[0] + ((-0.409240836883+0.878320617494j))*x_ref[1]**o + ((0.111749811866+0.699255468768j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.250216647826-0.375160277823j)*x[0]**o + ((0.652862707445-0.753376031111j))*x[0] + ((0.956521709784-0.237654619247j))*x[1]**o + ((0.805680681752+0.527882635475j))*x[1]
+        ref[(0, 2, 1)]=(0.250216647826-0.375160277823j)*x_ref[0]**o + ((0.652862707445-0.753376031111j))*x_ref[0] + ((0.956521709784-0.237654619247j))*x_ref[1]**o + ((0.805680681752+0.527882635475j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.921285628972-0.7827109155j)*x[0]**o + ((-0.203506215104+0.484696261674j))*x[0] + ((0.495914164888-0.712706001722j))*x[1]**o + ((0.29343032465-0.470360043847j))*x[1]
+        ref[(0, 2, 2)]=(-0.921285628972-0.7827109155j)*x_ref[0]**o + ((-0.203506215104+0.484696261674j))*x_ref[0] + ((0.495914164888-0.712706001722j))*x_ref[1]**o + ((0.29343032465-0.470360043847j))*x_ref[1]
+        arg[(0, 3, 0)]=(0.49614197334+0.331276450485j)*x[0]**o + ((0.469034815444-0.25774375702j))*x[0] + ((0.0932560032293+0.0731914669812j))*x[1]**o + ((-0.496349209508-0.182469990199j))*x[1]
+        ref[(0, 3, 0)]=(0.49614197334+0.331276450485j)*x_ref[0]**o + ((0.469034815444-0.25774375702j))*x_ref[0] + ((0.0932560032293+0.0731914669812j))*x_ref[1]**o + ((-0.496349209508-0.182469990199j))*x_ref[1]
+        arg[(0, 3, 1)]=(0.783874255102-0.833065542931j)*x[0]**o + ((-0.973393422909+0.451055419337j))*x[0] + ((0.06712340345+0.894964985464j))*x[1]**o + ((-0.652230104767+0.143494031478j))*x[1]
+        ref[(0, 3, 1)]=(0.783874255102-0.833065542931j)*x_ref[0]**o + ((-0.973393422909+0.451055419337j))*x_ref[0] + ((0.06712340345+0.894964985464j))*x_ref[1]**o + ((-0.652230104767+0.143494031478j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.181500984212-0.83026884682j)*x[0]**o + ((0.93710623942-0.294154569495j))*x[0] + ((0.742598695887+0.153830992719j))*x[1]**o + ((-0.164621421395-0.465333170717j))*x[1]
+        ref[(0, 3, 2)]=(0.181500984212-0.83026884682j)*x_ref[0]**o + ((0.93710623942-0.294154569495j))*x_ref[0] + ((0.742598695887+0.153830992719j))*x_ref[1]**o + ((-0.164621421395-0.465333170717j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.370223296806-0.531385755126j)*x[0]**o + ((0.243009535044-0.113376265706j))*x[0] + ((0.501893673545-0.170807969827j))*x[1]**o + ((-0.606836669365+0.295672887852j))*x[1]
+        ref[(1, 0, 0)]=(-0.370223296806-0.531385755126j)*x_ref[0]**o + ((0.243009535044-0.113376265706j))*x_ref[0] + ((0.501893673545-0.170807969827j))*x_ref[1]**o + ((-0.606836669365+0.295672887852j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.371176521683+0.739008710226j)*x[0]**o + ((0.833772714901-0.782594659894j))*x[0] + ((0.438147020312+0.656553735944j))*x[1]**o + ((-0.275372964538+0.925486505357j))*x[1]
+        ref[(1, 0, 1)]=(0.371176521683+0.739008710226j)*x_ref[0]**o + ((0.833772714901-0.782594659894j))*x_ref[0] + ((0.438147020312+0.656553735944j))*x_ref[1]**o + ((-0.275372964538+0.925486505357j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.939103634861+0.791442121517j)*x[0]**o + ((0.183886500362+0.596029851551j))*x[0] + ((0.951888442622-0.400012701685j))*x[1]**o + ((-0.242476276941+0.0717713096668j))*x[1]
+        ref[(1, 0, 2)]=(0.939103634861+0.791442121517j)*x_ref[0]**o + ((0.183886500362+0.596029851551j))*x_ref[0] + ((0.951888442622-0.400012701685j))*x_ref[1]**o + ((-0.242476276941+0.0717713096668j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.135997026891-0.545043088948j)*x[0]**o + ((-0.965790999669+0.81019931186j))*x[0] + ((0.583891347447+0.164133541759j))*x[1]**o + ((0.439630523362-0.181358401654j))*x[1]
+        ref[(1, 1, 0)]=(0.135997026891-0.545043088948j)*x_ref[0]**o + ((-0.965790999669+0.81019931186j))*x_ref[0] + ((0.583891347447+0.164133541759j))*x_ref[1]**o + ((0.439630523362-0.181358401654j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.870140582936+0.518281243825j)*x[0]**o + ((0.867090083484+0.278767357805j))*x[0] + ((-0.154401276835-0.771558159791j))*x[1]**o + ((-0.948854426198+0.110048352469j))*x[1]
+        ref[(1, 1, 1)]=(-0.870140582936+0.518281243825j)*x_ref[0]**o + ((0.867090083484+0.278767357805j))*x_ref[0] + ((-0.154401276835-0.771558159791j))*x_ref[1]**o + ((-0.948854426198+0.110048352469j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.771699013918-0.404929125308j)*x[0]**o + ((-0.429772470433-0.150900502645j))*x[0] + ((0.0516967471824-0.366456394089j))*x[1]**o + ((0.704446220775-0.333065876212j))*x[1]
+        ref[(1, 1, 2)]=(0.771699013918-0.404929125308j)*x_ref[0]**o + ((-0.429772470433-0.150900502645j))*x_ref[0] + ((0.0516967471824-0.366456394089j))*x_ref[1]**o + ((0.704446220775-0.333065876212j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.861464969274+0.212294756825j)*x[0]**o + ((0.690428904999+0.336579674973j))*x[0] + ((-0.432944806214-0.467905769445j))*x[1]**o + ((-0.30459391089+0.482407004476j))*x[1]
+        ref[(1, 2, 0)]=(-0.861464969274+0.212294756825j)*x_ref[0]**o + ((0.690428904999+0.336579674973j))*x_ref[0] + ((-0.432944806214-0.467905769445j))*x_ref[1]**o + ((-0.30459391089+0.482407004476j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.838773091401-0.372149699902j)*x[0]**o + ((0.374735627606+0.317306112586j))*x[0] + ((-0.815180267445+0.469689771829j))*x[1]**o + ((0.539643598661-0.259414262225j))*x[1]
+        ref[(1, 2, 1)]=(-0.838773091401-0.372149699902j)*x_ref[0]**o + ((0.374735627606+0.317306112586j))*x_ref[0] + ((-0.815180267445+0.469689771829j))*x_ref[1]**o + ((0.539643598661-0.259414262225j))*x_ref[1]
+        arg[(1, 2, 2)]=(-0.415027354188-0.497354790159j)*x[0]**o + ((-0.299880381887+0.477532320229j))*x[0] + ((0.0230021270268-0.762225741344j))*x[1]**o + ((0.921151152104-0.904037152887j))*x[1]
+        ref[(1, 2, 2)]=(-0.415027354188-0.497354790159j)*x_ref[0]**o + ((-0.299880381887+0.477532320229j))*x_ref[0] + ((0.0230021270268-0.762225741344j))*x_ref[1]**o + ((0.921151152104-0.904037152887j))*x_ref[1]
+        arg[(1, 3, 0)]=(-0.429695229136-0.598869046469j)*x[0]**o + ((0.36209035488-0.858060406146j))*x[0] + ((-0.640702280399-0.374447537085j))*x[1]**o + ((0.705670406209+0.654979189107j))*x[1]
+        ref[(1, 3, 0)]=(-0.429695229136-0.598869046469j)*x_ref[0]**o + ((0.36209035488-0.858060406146j))*x_ref[0] + ((-0.640702280399-0.374447537085j))*x_ref[1]**o + ((0.705670406209+0.654979189107j))*x_ref[1]
+        arg[(1, 3, 1)]=(-0.222918412432+0.864476252632j)*x[0]**o + ((-0.733542960489-0.615826484692j))*x[0] + ((0.249193448384+0.584596624538j))*x[1]**o + ((-0.926772133435-0.250766930409j))*x[1]
+        ref[(1, 3, 1)]=(-0.222918412432+0.864476252632j)*x_ref[0]**o + ((-0.733542960489-0.615826484692j))*x_ref[0] + ((0.249193448384+0.584596624538j))*x_ref[1]**o + ((-0.926772133435-0.250766930409j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.112122892932-0.531959156025j)*x[0]**o + ((0.826977598956-0.292562901516j))*x[0] + ((-0.697979729456+0.107907186445j))*x[1]**o + ((0.27331653158-0.0830431414505j))*x[1]
+        ref[(1, 3, 2)]=(-0.112122892932-0.531959156025j)*x_ref[0]**o + ((0.826977598956-0.292562901516j))*x_ref[0] + ((-0.697979729456+0.107907186445j))*x_ref[1]**o + ((0.27331653158-0.0830431414505j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.126307371631+0.431749098887j)*x[0]**o + ((-0.516946308555+0.936801216411j))*x[0] + ((-0.862501269697-0.673307349514j))*x[1]**o + ((-0.589193786818-0.259159211349j))*x[1]
+        ref[(2, 0, 0)]=(-0.126307371631+0.431749098887j)*x_ref[0]**o + ((-0.516946308555+0.936801216411j))*x_ref[0] + ((-0.862501269697-0.673307349514j))*x_ref[1]**o + ((-0.589193786818-0.259159211349j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.894519995594+0.471410639269j)*x[0]**o + ((0.118819122348+0.212634544404j))*x[0] + ((0.684577283733-0.191608025898j))*x[1]**o + ((0.783115160578-0.0280471096537j))*x[1]
+        ref[(2, 0, 1)]=(-0.894519995594+0.471410639269j)*x_ref[0]**o + ((0.118819122348+0.212634544404j))*x_ref[0] + ((0.684577283733-0.191608025898j))*x_ref[1]**o + ((0.783115160578-0.0280471096537j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.317297513718+0.670628719559j)*x[0]**o + ((0.0319251072587+0.0515338450489j))*x[0] + ((0.570972960997-0.746624609411j))*x[1]**o + ((-0.367296062865-0.302779147166j))*x[1]
+        ref[(2, 0, 2)]=(0.317297513718+0.670628719559j)*x_ref[0]**o + ((0.0319251072587+0.0515338450489j))*x_ref[0] + ((0.570972960997-0.746624609411j))*x_ref[1]**o + ((-0.367296062865-0.302779147166j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.824095470651-0.000317827218j)*x[0]**o + ((0.890063349981+0.639784675812j))*x[0] + ((0.033755237755-0.150877403689j))*x[1]**o + ((0.65412054537-0.428249936598j))*x[1]
+        ref[(2, 1, 0)]=(0.824095470651-0.000317827218j)*x_ref[0]**o + ((0.890063349981+0.639784675812j))*x_ref[0] + ((0.033755237755-0.150877403689j))*x_ref[1]**o + ((0.65412054537-0.428249936598j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.722142439758+0.172342714473j)*x[0]**o + ((0.0592071337863-0.942696255912j))*x[0] + ((0.400684171261-0.866574811663j))*x[1]**o + ((-0.31980592899+0.372537939628j))*x[1]
+        ref[(2, 1, 1)]=(-0.722142439758+0.172342714473j)*x_ref[0]**o + ((0.0592071337863-0.942696255912j))*x_ref[0] + ((0.400684171261-0.866574811663j))*x_ref[1]**o + ((-0.31980592899+0.372537939628j))*x_ref[1]
+        arg[(2, 1, 2)]=(-0.59150305214-0.21894034977j)*x[0]**o + ((-0.580441498141+0.838907030792j))*x[0] + ((-0.717171204638+0.66134514366j))*x[1]**o + ((-0.528802248087+0.63725043045j))*x[1]
+        ref[(2, 1, 2)]=(-0.59150305214-0.21894034977j)*x_ref[0]**o + ((-0.580441498141+0.838907030792j))*x_ref[0] + ((-0.717171204638+0.66134514366j))*x_ref[1]**o + ((-0.528802248087+0.63725043045j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.012590201617+0.749463371388j)*x[0]**o + ((0.306928141288-0.650248399472j))*x[0] + ((-0.345721270173+0.971910099408j))*x[1]**o + ((-0.975680915195+0.989260348307j))*x[1]
+        ref[(2, 2, 0)]=(-0.012590201617+0.749463371388j)*x_ref[0]**o + ((0.306928141288-0.650248399472j))*x_ref[0] + ((-0.345721270173+0.971910099408j))*x_ref[1]**o + ((-0.975680915195+0.989260348307j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.726274547899+0.492148483791j)*x[0]**o + ((0.283494163197+0.721055300813j))*x[0] + ((-0.464083145862-0.547305200538j))*x[1]**o + ((-0.828122450232+0.717526260027j))*x[1]
+        ref[(2, 2, 1)]=(-0.726274547899+0.492148483791j)*x_ref[0]**o + ((0.283494163197+0.721055300813j))*x_ref[0] + ((-0.464083145862-0.547305200538j))*x_ref[1]**o + ((-0.828122450232+0.717526260027j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.888449219672-0.969079827769j)*x[0]**o + ((-0.26792796714+0.153302809825j))*x[0] + ((-0.703891401141-0.0861105129101j))*x[1]**o + ((0.599756541892+0.821760156989j))*x[1]
+        ref[(2, 2, 2)]=(0.888449219672-0.969079827769j)*x_ref[0]**o + ((-0.26792796714+0.153302809825j))*x_ref[0] + ((-0.703891401141-0.0861105129101j))*x_ref[1]**o + ((0.599756541892+0.821760156989j))*x_ref[1]
+        arg[(2, 3, 0)]=(-0.844726932821-0.985721464539j)*x[0]**o + ((0.391329480674+0.173313383683j))*x[0] + ((-0.193676259782+0.731320723712j))*x[1]**o + ((0.0154640628665-0.267160109222j))*x[1]
+        ref[(2, 3, 0)]=(-0.844726932821-0.985721464539j)*x_ref[0]**o + ((0.391329480674+0.173313383683j))*x_ref[0] + ((-0.193676259782+0.731320723712j))*x_ref[1]**o + ((0.0154640628665-0.267160109222j))*x_ref[1]
+        arg[(2, 3, 1)]=(0.78642988096+0.524457308012j)*x[0]**o + ((-0.945644823961+0.410938790365j))*x[0] + ((0.755522030785-0.240375547561j))*x[1]**o + ((0.927535550722+0.943195600822j))*x[1]
+        ref[(2, 3, 1)]=(0.78642988096+0.524457308012j)*x_ref[0]**o + ((-0.945644823961+0.410938790365j))*x_ref[0] + ((0.755522030785-0.240375547561j))*x_ref[1]**o + ((0.927535550722+0.943195600822j))*x_ref[1]
+        arg[(2, 3, 2)]=(-0.551533852516-0.842985798261j)*x[0]**o + ((-0.516618118103-0.214942454099j))*x[0] + ((-0.487452048592+0.59022242562j))*x[1]**o + ((0.791146897797-0.785395697078j))*x[1]
+        ref[(2, 3, 2)]=(-0.551533852516-0.842985798261j)*x_ref[0]**o + ((-0.516618118103-0.214942454099j))*x_ref[0] + ((-0.487452048592+0.59022242562j))*x_ref[1]**o + ((0.791146897797-0.785395697078j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.251532025974+0.157846258244j)*x[0]**o + ((-0.199412642313+0.0713841978393j))*x[0] + ((-0.201190931154+0.554561667383j))*x[1]**o + ((-0.0762014481081-0.779942853598j))*x[1]
+        ref[(3, 0, 0)]=(-0.251532025974+0.157846258244j)*x_ref[0]**o + ((-0.199412642313+0.0713841978393j))*x_ref[0] + ((-0.201190931154+0.554561667383j))*x_ref[1]**o + ((-0.0762014481081-0.779942853598j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.0752357893894+0.781061272629j)*x[0]**o + ((0.390554865349+0.58643453351j))*x[0] + ((0.822793499074+0.138732777002j))*x[1]**o + ((-0.243782825344-0.0255859507384j))*x[1]
+        ref[(3, 0, 1)]=(0.0752357893894+0.781061272629j)*x_ref[0]**o + ((0.390554865349+0.58643453351j))*x_ref[0] + ((0.822793499074+0.138732777002j))*x_ref[1]**o + ((-0.243782825344-0.0255859507384j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.255078625567-0.01012740377j)*x[0]**o + ((-0.987555725197+0.390406938624j))*x[0] + ((0.11735410247-0.532484868979j))*x[1]**o + ((-0.274024974701-0.455159959231j))*x[1]
+        ref[(3, 0, 2)]=(0.255078625567-0.01012740377j)*x_ref[0]**o + ((-0.987555725197+0.390406938624j))*x_ref[0] + ((0.11735410247-0.532484868979j))*x_ref[1]**o + ((-0.274024974701-0.455159959231j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.196509727464-0.344501809871j)*x[0]**o + ((0.660697265497-0.874632656356j))*x[0] + ((0.218974775957-0.301802347582j))*x[1]**o + ((0.444722250508-0.701330719978j))*x[1]
+        ref[(3, 1, 0)]=(-0.196509727464-0.344501809871j)*x_ref[0]**o + ((0.660697265497-0.874632656356j))*x_ref[0] + ((0.218974775957-0.301802347582j))*x_ref[1]**o + ((0.444722250508-0.701330719978j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.459212462492-0.589411793398j)*x[0]**o + ((0.6992909805+0.441909979247j))*x[0] + ((-0.234616395001+0.298262002229j))*x[1]**o + ((-0.314096257596-0.402323385572j))*x[1]
+        ref[(3, 1, 1)]=(-0.459212462492-0.589411793398j)*x_ref[0]**o + ((0.6992909805+0.441909979247j))*x_ref[0] + ((-0.234616395001+0.298262002229j))*x_ref[1]**o + ((-0.314096257596-0.402323385572j))*x_ref[1]
+        arg[(3, 1, 2)]=(0.681863906859+0.973014202821j)*x[0]**o + ((-0.484920073203+0.586522991673j))*x[0] + ((-0.516188821642-0.415957638674j))*x[1]**o + ((-0.610736508056-0.994985390338j))*x[1]
+        ref[(3, 1, 2)]=(0.681863906859+0.973014202821j)*x_ref[0]**o + ((-0.484920073203+0.586522991673j))*x_ref[0] + ((-0.516188821642-0.415957638674j))*x_ref[1]**o + ((-0.610736508056-0.994985390338j))*x_ref[1]
+        arg[(3, 2, 0)]=(-0.794866671218+0.17125175007j)*x[0]**o + ((0.0599179852878-0.567372511165j))*x[0] + ((0.800853524974+0.526025944687j))*x[1]**o + ((0.0020117409797+0.70340752312j))*x[1]
+        ref[(3, 2, 0)]=(-0.794866671218+0.17125175007j)*x_ref[0]**o + ((0.0599179852878-0.567372511165j))*x_ref[0] + ((0.800853524974+0.526025944687j))*x_ref[1]**o + ((0.0020117409797+0.70340752312j))*x_ref[1]
+        arg[(3, 2, 1)]=(0.509211221391+0.572163517378j)*x[0]**o + ((0.805362557513-0.489011289014j))*x[0] + ((0.630720597783-0.0595139640392j))*x[1]**o + ((0.481692529832-0.707020688884j))*x[1]
+        ref[(3, 2, 1)]=(0.509211221391+0.572163517378j)*x_ref[0]**o + ((0.805362557513-0.489011289014j))*x_ref[0] + ((0.630720597783-0.0595139640392j))*x_ref[1]**o + ((0.481692529832-0.707020688884j))*x_ref[1]
+        arg[(3, 2, 2)]=(0.355004282431-0.0169378217647j)*x[0]**o + ((0.848743179876+0.71576239842j))*x[0] + ((0.201338683675+0.6396016667j))*x[1]**o + ((0.778423886197-0.106194756866j))*x[1]
+        ref[(3, 2, 2)]=(0.355004282431-0.0169378217647j)*x_ref[0]**o + ((0.848743179876+0.71576239842j))*x_ref[0] + ((0.201338683675+0.6396016667j))*x_ref[1]**o + ((0.778423886197-0.106194756866j))*x_ref[1]
+        arg[(3, 3, 0)]=(-0.0799341707689-0.306231879951j)*x[0]**o + ((0.810966617383-0.696190620014j))*x[0] + ((-0.863479610776-0.0580699244758j))*x[1]**o + ((0.763757003573+0.779282892505j))*x[1]
+        ref[(3, 3, 0)]=(-0.0799341707689-0.306231879951j)*x_ref[0]**o + ((0.810966617383-0.696190620014j))*x_ref[0] + ((-0.863479610776-0.0580699244758j))*x_ref[1]**o + ((0.763757003573+0.779282892505j))*x_ref[1]
+        arg[(3, 3, 1)]=(0.347465905458+0.140854505464j)*x[0]**o + ((0.446052895596+0.380814281236j))*x[0] + ((0.324303254577+0.201440074318j))*x[1]**o + ((-0.971876383082-0.872933331208j))*x[1]
+        ref[(3, 3, 1)]=(0.347465905458+0.140854505464j)*x_ref[0]**o + ((0.446052895596+0.380814281236j))*x_ref[0] + ((0.324303254577+0.201440074318j))*x_ref[1]**o + ((-0.971876383082-0.872933331208j))*x_ref[1]
+        arg[(3, 3, 2)]=(-0.978681832676-0.868920715117j)*x[0]**o + ((-0.235238757251-0.704479783498j))*x[0] + ((-0.411350631915+0.688541104238j))*x[1]**o + ((-0.797154520044+0.897352848581j))*x[1]
+        ref[(3, 3, 2)]=(-0.978681832676-0.868920715117j)*x_ref[0]**o + ((-0.235238757251-0.704479783498j))*x_ref[0] + ((-0.411350631915+0.688541104238j))*x_ref[1]**o + ((-0.797154520044+0.897352848581j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.741789208941-0.877911304942j)*x[2]**o + ((-0.995123761637-0.729474852646j))*x[2]
+            ref[(0, 0, 0)]+=(-0.741789208941-0.877911304942j)*x_ref[2]**o + ((-0.995123761637-0.729474852646j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.664121949604+0.845405473865j)*x[2]**o + ((-0.390962655165-0.0178502105199j))*x[2]
+            ref[(0, 0, 1)]+=(-0.664121949604+0.845405473865j)*x_ref[2]**o + ((-0.390962655165-0.0178502105199j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.0700427259447+0.077701596966j)*x[2]**o + ((0.167736115371-0.106551141553j))*x[2]
+            ref[(0, 0, 2)]+=(-0.0700427259447+0.077701596966j)*x_ref[2]**o + ((0.167736115371-0.106551141553j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.831101659348-0.288138517486j)*x[2]**o + ((-0.160987242031+0.531764590493j))*x[2]
+            ref[(0, 1, 0)]+=(-0.831101659348-0.288138517486j)*x_ref[2]**o + ((-0.160987242031+0.531764590493j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.610663858267+0.644520277094j)*x[2]**o + ((0.723082432816-0.419887095057j))*x[2]
+            ref[(0, 1, 1)]+=(-0.610663858267+0.644520277094j)*x_ref[2]**o + ((0.723082432816-0.419887095057j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.937343293525-0.0320725486197j)*x[2]**o + ((-0.0543916930807+0.599825298789j))*x[2]
+            ref[(0, 1, 2)]+=(0.937343293525-0.0320725486197j)*x_ref[2]**o + ((-0.0543916930807+0.599825298789j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.372685058942+0.952661490055j)*x[2]**o + ((-0.24477788024-0.598042913627j))*x[2]
+            ref[(0, 2, 0)]+=(-0.372685058942+0.952661490055j)*x_ref[2]**o + ((-0.24477788024-0.598042913627j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.695014505332-0.905585502914j)*x[2]**o + ((0.435213944932+0.89751547609j))*x[2]
+            ref[(0, 2, 1)]+=(-0.695014505332-0.905585502914j)*x_ref[2]**o + ((0.435213944932+0.89751547609j))*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.818313711139+0.516258906966j)*x[2]**o + ((-0.413042740628+0.726277691512j))*x[2]
+            ref[(0, 2, 2)]+=(-0.818313711139+0.516258906966j)*x_ref[2]**o + ((-0.413042740628+0.726277691512j))*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.636473084691-0.970559154878j)*x[2]**o + ((0.861915744299+0.799775628654j))*x[2]
+            ref[(0, 3, 0)]+=(-0.636473084691-0.970559154878j)*x_ref[2]**o + ((0.861915744299+0.799775628654j))*x_ref[2]
+            arg[(0, 3, 1)]+=(0.555667904298-0.390485906904j)*x[2]**o + ((0.957218176022+0.905396245041j))*x[2]
+            ref[(0, 3, 1)]+=(0.555667904298-0.390485906904j)*x_ref[2]**o + ((0.957218176022+0.905396245041j))*x_ref[2]
+            arg[(0, 3, 2)]+=(0.399251421297-0.57955347437j)*x[2]**o + ((-0.425915679145-0.306118916637j))*x[2]
+            ref[(0, 3, 2)]+=(0.399251421297-0.57955347437j)*x_ref[2]**o + ((-0.425915679145-0.306118916637j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.925872433444+0.288663988353j)*x[2]**o + ((0.664522592362+0.246541317037j))*x[2]
+            ref[(1, 0, 0)]+=(-0.925872433444+0.288663988353j)*x_ref[2]**o + ((0.664522592362+0.246541317037j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.203757349044+0.0832138180927j)*x[2]**o + ((-0.552073648454+0.791262989455j))*x[2]
+            ref[(1, 0, 1)]+=(-0.203757349044+0.0832138180927j)*x_ref[2]**o + ((-0.552073648454+0.791262989455j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.935389625099+0.451193042337j)*x[2]**o + ((0.122382723627+0.0772981221257j))*x[2]
+            ref[(1, 0, 2)]+=(0.935389625099+0.451193042337j)*x_ref[2]**o + ((0.122382723627+0.0772981221257j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.0262401431196+0.0536896612609j)*x[2]**o + ((0.567035067997+0.963378640106j))*x[2]
+            ref[(1, 1, 0)]+=(0.0262401431196+0.0536896612609j)*x_ref[2]**o + ((0.567035067997+0.963378640106j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.777599534061-0.280657701564j)*x[2]**o + ((-0.337691641584-0.876394218443j))*x[2]
+            ref[(1, 1, 1)]+=(0.777599534061-0.280657701564j)*x_ref[2]**o + ((-0.337691641584-0.876394218443j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.141493209713+0.733903454484j)*x[2]**o + ((-0.193295013924+0.732797190924j))*x[2]
+            ref[(1, 1, 2)]+=(-0.141493209713+0.733903454484j)*x_ref[2]**o + ((-0.193295013924+0.732797190924j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.784277472118-0.963913671574j)*x[2]**o + ((-0.79613199347-0.384249503047j))*x[2]
+            ref[(1, 2, 0)]+=(0.784277472118-0.963913671574j)*x_ref[2]**o + ((-0.79613199347-0.384249503047j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.469164076376-0.610979202148j)*x[2]**o + ((0.944498834536+0.00570519680225j))*x[2]
+            ref[(1, 2, 1)]+=(0.469164076376-0.610979202148j)*x_ref[2]**o + ((0.944498834536+0.00570519680225j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.463952981337+0.67150522751j)*x[2]**o + ((0.591649251812+0.169357256559j))*x[2]
+            ref[(1, 2, 2)]+=(0.463952981337+0.67150522751j)*x_ref[2]**o + ((0.591649251812+0.169357256559j))*x_ref[2]
+            arg[(1, 3, 0)]+=(-0.513298346652-0.759876907384j)*x[2]**o + ((0.0694894241099-0.457662536198j))*x[2]
+            ref[(1, 3, 0)]+=(-0.513298346652-0.759876907384j)*x_ref[2]**o + ((0.0694894241099-0.457662536198j))*x_ref[2]
+            arg[(1, 3, 1)]+=(0.827647458442-0.589340173281j)*x[2]**o + ((0.939236407789-0.430735515614j))*x[2]
+            ref[(1, 3, 1)]+=(0.827647458442-0.589340173281j)*x_ref[2]**o + ((0.939236407789-0.430735515614j))*x_ref[2]
+            arg[(1, 3, 2)]+=(-0.518712910999-0.727767291873j)*x[2]**o + ((0.0214231331001-0.781549561501j))*x[2]
+            ref[(1, 3, 2)]+=(-0.518712910999-0.727767291873j)*x_ref[2]**o + ((0.0214231331001-0.781549561501j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.191642569983+0.115150048447j)*x[2]**o + ((-0.388777673502+0.908262014758j))*x[2]
+            ref[(2, 0, 0)]+=(0.191642569983+0.115150048447j)*x_ref[2]**o + ((-0.388777673502+0.908262014758j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.637593704091+0.779576038657j)*x[2]**o + ((-0.776255565463+0.255678184455j))*x[2]
+            ref[(2, 0, 1)]+=(-0.637593704091+0.779576038657j)*x_ref[2]**o + ((-0.776255565463+0.255678184455j))*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.456393586822-0.809291215355j)*x[2]**o + ((0.840702416315-0.684823607063j))*x[2]
+            ref[(2, 0, 2)]+=(-0.456393586822-0.809291215355j)*x_ref[2]**o + ((0.840702416315-0.684823607063j))*x_ref[2]
+            arg[(2, 1, 0)]+=(0.74580445951-0.73343414319j)*x[2]**o + ((0.768975069917-0.988311347755j))*x[2]
+            ref[(2, 1, 0)]+=(0.74580445951-0.73343414319j)*x_ref[2]**o + ((0.768975069917-0.988311347755j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.070228486202+0.582568884077j)*x[2]**o + ((0.484050736321+0.679195997706j))*x[2]
+            ref[(2, 1, 1)]+=(0.070228486202+0.582568884077j)*x_ref[2]**o + ((0.484050736321+0.679195997706j))*x_ref[2]
+            arg[(2, 1, 2)]+=(0.0158665749142-0.124279924932j)*x[2]**o + ((0.560730972226+0.283465221394j))*x[2]
+            ref[(2, 1, 2)]+=(0.0158665749142-0.124279924932j)*x_ref[2]**o + ((0.560730972226+0.283465221394j))*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.60718852624-0.262312347081j)*x[2]**o + ((-0.119095521907+0.616230559284j))*x[2]
+            ref[(2, 2, 0)]+=(-0.60718852624-0.262312347081j)*x_ref[2]**o + ((-0.119095521907+0.616230559284j))*x_ref[2]
+            arg[(2, 2, 1)]+=(-0.959670483056+0.441454629867j)*x[2]**o + ((-0.60253095043+0.571744391616j))*x[2]
+            ref[(2, 2, 1)]+=(-0.959670483056+0.441454629867j)*x_ref[2]**o + ((-0.60253095043+0.571744391616j))*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.085005991849-0.320365432534j)*x[2]**o + ((0.143661315674+0.960359129976j))*x[2]
+            ref[(2, 2, 2)]+=(-0.085005991849-0.320365432534j)*x_ref[2]**o + ((0.143661315674+0.960359129976j))*x_ref[2]
+            arg[(2, 3, 0)]+=(0.0333334521284-0.0909696046937j)*x[2]**o + ((0.772511186677+0.0473558660806j))*x[2]
+            ref[(2, 3, 0)]+=(0.0333334521284-0.0909696046937j)*x_ref[2]**o + ((0.772511186677+0.0473558660806j))*x_ref[2]
+            arg[(2, 3, 1)]+=(-0.235917889226-0.635185809626j)*x[2]**o + ((-0.692623146889-0.236735009092j))*x[2]
+            ref[(2, 3, 1)]+=(-0.235917889226-0.635185809626j)*x_ref[2]**o + ((-0.692623146889-0.236735009092j))*x_ref[2]
+            arg[(2, 3, 2)]+=(-0.590852201939-0.367533295361j)*x[2]**o + ((-0.252621596971+0.813734189263j))*x[2]
+            ref[(2, 3, 2)]+=(-0.590852201939-0.367533295361j)*x_ref[2]**o + ((-0.252621596971+0.813734189263j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.419922558762-0.287301411157j)*x[2]**o + ((0.928087409821+0.735802596806j))*x[2]
+            ref[(3, 0, 0)]+=(0.419922558762-0.287301411157j)*x_ref[2]**o + ((0.928087409821+0.735802596806j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.88915410037+0.829343658088j)*x[2]**o + ((-0.604725300463+0.706853058719j))*x[2]
+            ref[(3, 0, 1)]+=(0.88915410037+0.829343658088j)*x_ref[2]**o + ((-0.604725300463+0.706853058719j))*x_ref[2]
+            arg[(3, 0, 2)]+=(0.584158898631-0.0771075502207j)*x[2]**o + ((-0.226825672783+0.543311694111j))*x[2]
+            ref[(3, 0, 2)]+=(0.584158898631-0.0771075502207j)*x_ref[2]**o + ((-0.226825672783+0.543311694111j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.0305616113179-0.199166127244j)*x[2]**o + ((-0.114899172054+0.841034046787j))*x[2]
+            ref[(3, 1, 0)]+=(-0.0305616113179-0.199166127244j)*x_ref[2]**o + ((-0.114899172054+0.841034046787j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.0789681402367-0.930404085717j)*x[2]**o + ((-0.0817272255707+0.781419978919j))*x[2]
+            ref[(3, 1, 1)]+=(0.0789681402367-0.930404085717j)*x_ref[2]**o + ((-0.0817272255707+0.781419978919j))*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.088730113265-0.219649431832j)*x[2]**o + ((0.313733610812+0.292894304713j))*x[2]
+            ref[(3, 1, 2)]+=(-0.088730113265-0.219649431832j)*x_ref[2]**o + ((0.313733610812+0.292894304713j))*x_ref[2]
+            arg[(3, 2, 0)]+=(0.227053340964-0.788823885532j)*x[2]**o + ((0.806204582845+0.810303470055j))*x[2]
+            ref[(3, 2, 0)]+=(0.227053340964-0.788823885532j)*x_ref[2]**o + ((0.806204582845+0.810303470055j))*x_ref[2]
+            arg[(3, 2, 1)]+=(0.668217842834-0.566899788999j)*x[2]**o + ((-0.142186918602+0.457910071011j))*x[2]
+            ref[(3, 2, 1)]+=(0.668217842834-0.566899788999j)*x_ref[2]**o + ((-0.142186918602+0.457910071011j))*x_ref[2]
+            arg[(3, 2, 2)]+=(0.714798836518+0.178276730664j)*x[2]**o + ((-0.541191570673-0.217540744799j))*x[2]
+            ref[(3, 2, 2)]+=(0.714798836518+0.178276730664j)*x_ref[2]**o + ((-0.541191570673-0.217540744799j))*x_ref[2]
+            arg[(3, 3, 0)]+=(-0.379349109304-0.945111557477j)*x[2]**o + ((-0.753581516314-0.174093517437j))*x[2]
+            ref[(3, 3, 0)]+=(-0.379349109304-0.945111557477j)*x_ref[2]**o + ((-0.753581516314-0.174093517437j))*x_ref[2]
+            arg[(3, 3, 1)]+=(0.357939280295+0.150671612968j)*x[2]**o + ((-0.921112226469+0.0979741620534j))*x[2]
+            ref[(3, 3, 1)]+=(0.357939280295+0.150671612968j)*x_ref[2]**o + ((-0.921112226469+0.0979741620534j))*x_ref[2]
+            arg[(3, 3, 2)]+=(0.236332602441+0.890521993871j)*x[2]**o + ((-0.434501672604+0.639254812355j))*x[2]
+            ref[(3, 3, 2)]+=(0.236332602441+0.890521993871j)*x_ref[2]**o + ((-0.434501672604+0.639254812355j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4, 2),w)
+        ref = Data(0,(4, 3, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.688531661721-0.0549094656197j)*x[0]**o + ((0.986674063841-0.855346715123j))*x[0] + ((-0.739265862011-0.461786273975j))*x[1]**o + ((-0.725942444165+0.845762836151j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.688531661721-0.0549094656197j)*x_ref[0]**o + ((0.986674063841-0.855346715123j))*x_ref[0] + ((-0.739265862011-0.461786273975j))*x_ref[1]**o + ((-0.725942444165+0.845762836151j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.577388869362-0.327022781742j)*x[0]**o + ((0.41757702651-0.953098915913j))*x[0] + ((0.767164206396-0.991805880855j))*x[1]**o + ((-0.12218031107+0.369776626237j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.577388869362-0.327022781742j)*x_ref[0]**o + ((0.41757702651-0.953098915913j))*x_ref[0] + ((0.767164206396-0.991805880855j))*x_ref[1]**o + ((-0.12218031107+0.369776626237j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.389258577547+0.900526160072j)*x[0]**o + ((-0.52447297424+0.262904938286j))*x[0] + ((-0.510123366669+0.924152451207j))*x[1]**o + ((0.221754877184-0.722026419803j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.389258577547+0.900526160072j)*x_ref[0]**o + ((-0.52447297424+0.262904938286j))*x_ref[0] + ((-0.510123366669+0.924152451207j))*x_ref[1]**o + ((0.221754877184-0.722026419803j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.985983715223+0.817538821165j)*x[0]**o + ((0.740866109871-0.182113546834j))*x[0] + ((-0.640727095497+0.383512411094j))*x[1]**o + ((0.995621140753-0.329306349763j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.985983715223+0.817538821165j)*x_ref[0]**o + ((0.740866109871-0.182113546834j))*x_ref[0] + ((-0.640727095497+0.383512411094j))*x_ref[1]**o + ((0.995621140753-0.329306349763j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.62484956238+0.5248806332j)*x[0]**o + ((-0.778228006839+0.467450453893j))*x[0] + ((-0.752178818401+0.91334170372j))*x[1]**o + ((0.57547766486+0.511716584288j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.62484956238+0.5248806332j)*x_ref[0]**o + ((-0.778228006839+0.467450453893j))*x_ref[0] + ((-0.752178818401+0.91334170372j))*x_ref[1]**o + ((0.57547766486+0.511716584288j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.934127699823+0.932269667427j)*x[0]**o + ((-0.934555714083-0.863610236601j))*x[0] + ((-0.0211608832076+0.920062620771j))*x[1]**o + ((0.729251528712-0.18131186167j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.934127699823+0.932269667427j)*x_ref[0]**o + ((-0.934555714083-0.863610236601j))*x_ref[0] + ((-0.0211608832076+0.920062620771j))*x_ref[1]**o + ((0.729251528712-0.18131186167j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(-0.402906269002-0.0923964175788j)*x[0]**o + ((-0.0836423031732+0.730597950416j))*x[0] + ((-0.713326059662-0.555966959822j))*x[1]**o + ((-0.519100907569-0.535718933859j))*x[1]
+        ref[(0, 0, 3, 0)]=(-0.402906269002-0.0923964175788j)*x_ref[0]**o + ((-0.0836423031732+0.730597950416j))*x_ref[0] + ((-0.713326059662-0.555966959822j))*x_ref[1]**o + ((-0.519100907569-0.535718933859j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(0.989373654884+0.874344940749j)*x[0]**o + ((-0.402179125803-0.791072322147j))*x[0] + ((0.423994867476+0.789715389825j))*x[1]**o + ((0.00024431145031+0.12504768225j))*x[1]
+        ref[(0, 0, 3, 1)]=(0.989373654884+0.874344940749j)*x_ref[0]**o + ((-0.402179125803-0.791072322147j))*x_ref[0] + ((0.423994867476+0.789715389825j))*x_ref[1]**o + ((0.00024431145031+0.12504768225j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.18668396538-0.196117655341j)*x[0]**o + ((-0.218493179256-0.59977917304j))*x[0] + ((-0.561514778015+0.167775458651j))*x[1]**o + ((0.320109872461-0.812350560618j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.18668396538-0.196117655341j)*x_ref[0]**o + ((-0.218493179256-0.59977917304j))*x_ref[0] + ((-0.561514778015+0.167775458651j))*x_ref[1]**o + ((0.320109872461-0.812350560618j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.27731258986-0.621580750584j)*x[0]**o + ((0.975712656543-0.392044878497j))*x[0] + ((-0.371140182989-0.688894686429j))*x[1]**o + ((-0.703036644225+0.590909425863j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.27731258986-0.621580750584j)*x_ref[0]**o + ((0.975712656543-0.392044878497j))*x_ref[0] + ((-0.371140182989-0.688894686429j))*x_ref[1]**o + ((-0.703036644225+0.590909425863j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.474530936003-0.856061856693j)*x[0]**o + ((-0.204917268866-0.821489127757j))*x[0] + ((0.968772235221-0.256454125044j))*x[1]**o + ((-0.697045748967+0.0888025395023j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.474530936003-0.856061856693j)*x_ref[0]**o + ((-0.204917268866-0.821489127757j))*x_ref[0] + ((0.968772235221-0.256454125044j))*x_ref[1]**o + ((-0.697045748967+0.0888025395023j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.322788928182+0.750217594808j)*x[0]**o + ((-0.580353129694+0.511548434465j))*x[0] + ((0.339343510909+0.943349913057j))*x[1]**o + ((-0.0110349406772+0.84037781623j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.322788928182+0.750217594808j)*x_ref[0]**o + ((-0.580353129694+0.511548434465j))*x_ref[0] + ((0.339343510909+0.943349913057j))*x_ref[1]**o + ((-0.0110349406772+0.84037781623j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.182202475998+0.552135240138j)*x[0]**o + ((0.647831934807+0.907696467796j))*x[0] + ((-0.314122831231+0.554991025387j))*x[1]**o + ((-0.146241609603-0.278089056643j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.182202475998+0.552135240138j)*x_ref[0]**o + ((0.647831934807+0.907696467796j))*x_ref[0] + ((-0.314122831231+0.554991025387j))*x_ref[1]**o + ((-0.146241609603-0.278089056643j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.397887826288+0.506373014315j)*x[0]**o + ((-0.666500781825+0.862450218339j))*x[0] + ((-0.600404297306+0.468589033336j))*x[1]**o + ((-0.411272743259-0.542030974104j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.397887826288+0.506373014315j)*x_ref[0]**o + ((-0.666500781825+0.862450218339j))*x_ref[0] + ((-0.600404297306+0.468589033336j))*x_ref[1]**o + ((-0.411272743259-0.542030974104j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(-0.800855248865-0.507392424816j)*x[0]**o + ((-0.925963156005-0.757245138692j))*x[0] + ((0.409085663923-0.0208147625776j))*x[1]**o + ((0.473440115641-0.836851282244j))*x[1]
+        ref[(0, 1, 3, 0)]=(-0.800855248865-0.507392424816j)*x_ref[0]**o + ((-0.925963156005-0.757245138692j))*x_ref[0] + ((0.409085663923-0.0208147625776j))*x_ref[1]**o + ((0.473440115641-0.836851282244j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(-0.911864535586+0.978488616676j)*x[0]**o + ((0.245381866265-0.0636853131904j))*x[0] + ((-0.046531254095+0.686366806529j))*x[1]**o + ((0.17764449141+0.1294539913j))*x[1]
+        ref[(0, 1, 3, 1)]=(-0.911864535586+0.978488616676j)*x_ref[0]**o + ((0.245381866265-0.0636853131904j))*x_ref[0] + ((-0.046531254095+0.686366806529j))*x_ref[1]**o + ((0.17764449141+0.1294539913j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.0863415388194-0.0349305759757j)*x[0]**o + ((-0.768781423422+0.308454660949j))*x[0] + ((0.839485400104-0.870644878275j))*x[1]**o + ((-0.521271495572-0.289796776786j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.0863415388194-0.0349305759757j)*x_ref[0]**o + ((-0.768781423422+0.308454660949j))*x_ref[0] + ((0.839485400104-0.870644878275j))*x_ref[1]**o + ((-0.521271495572-0.289796776786j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.17153852938+0.717966937602j)*x[0]**o + ((-0.880246242967-0.160237276299j))*x[0] + ((0.746767061663-0.596664412694j))*x[1]**o + ((0.367022142081-0.884114999451j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.17153852938+0.717966937602j)*x_ref[0]**o + ((-0.880246242967-0.160237276299j))*x_ref[0] + ((0.746767061663-0.596664412694j))*x_ref[1]**o + ((0.367022142081-0.884114999451j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.293562350452-0.0192209448084j)*x[0]**o + ((-0.555384622014-0.134693089657j))*x[0] + ((-0.968974051829+0.199279810713j))*x[1]**o + ((-0.540257359979+0.523209440849j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.293562350452-0.0192209448084j)*x_ref[0]**o + ((-0.555384622014-0.134693089657j))*x_ref[0] + ((-0.968974051829+0.199279810713j))*x_ref[1]**o + ((-0.540257359979+0.523209440849j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.650101787794+0.788381592781j)*x[0]**o + ((-0.308013760861-0.0743748495112j))*x[0] + ((0.160475389858+0.570289761858j))*x[1]**o + ((-0.98468890355+0.0373213055685j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.650101787794+0.788381592781j)*x_ref[0]**o + ((-0.308013760861-0.0743748495112j))*x_ref[0] + ((0.160475389858+0.570289761858j))*x_ref[1]**o + ((-0.98468890355+0.0373213055685j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(0.358440553459+0.974711589804j)*x[0]**o + ((0.266202576314+0.591754759744j))*x[0] + ((0.499633483112+0.649546368039j))*x[1]**o + ((-0.738659672232+0.794432743694j))*x[1]
+        ref[(0, 2, 2, 0)]=(0.358440553459+0.974711589804j)*x_ref[0]**o + ((0.266202576314+0.591754759744j))*x_ref[0] + ((0.499633483112+0.649546368039j))*x_ref[1]**o + ((-0.738659672232+0.794432743694j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.731211647867-0.3612855581j)*x[0]**o + ((0.178780277104-0.737428619778j))*x[0] + ((-0.0505989963506-0.502006760039j))*x[1]**o + ((0.432672006889-0.0775420459315j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.731211647867-0.3612855581j)*x_ref[0]**o + ((0.178780277104-0.737428619778j))*x_ref[0] + ((-0.0505989963506-0.502006760039j))*x_ref[1]**o + ((0.432672006889-0.0775420459315j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(0.372778707824-0.343268146344j)*x[0]**o + ((-0.199569753945+0.412026715526j))*x[0] + ((0.426609224674-0.868490111232j))*x[1]**o + ((0.826299732929+0.651347823751j))*x[1]
+        ref[(0, 2, 3, 0)]=(0.372778707824-0.343268146344j)*x_ref[0]**o + ((-0.199569753945+0.412026715526j))*x_ref[0] + ((0.426609224674-0.868490111232j))*x_ref[1]**o + ((0.826299732929+0.651347823751j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(-0.973541721185+0.0627704039352j)*x[0]**o + ((-0.520544149649+0.0118263655649j))*x[0] + ((0.200929923992+0.82087494814j))*x[1]**o + ((-0.720413689076-0.423170687335j))*x[1]
+        ref[(0, 2, 3, 1)]=(-0.973541721185+0.0627704039352j)*x_ref[0]**o + ((-0.520544149649+0.0118263655649j))*x_ref[0] + ((0.200929923992+0.82087494814j))*x_ref[1]**o + ((-0.720413689076-0.423170687335j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.525958190753-0.847246400727j)*x[0]**o + ((0.597043404962-0.536402864376j))*x[0] + ((0.44193833572-0.246731310338j))*x[1]**o + ((0.657600918352+0.884827505424j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.525958190753-0.847246400727j)*x_ref[0]**o + ((0.597043404962-0.536402864376j))*x_ref[0] + ((0.44193833572-0.246731310338j))*x_ref[1]**o + ((0.657600918352+0.884827505424j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.442301406201+0.572285723194j)*x[0]**o + ((-0.62217531899-0.896824859285j))*x[0] + ((0.791245476214-0.893312759502j))*x[1]**o + ((0.0310354764587+0.457998256393j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.442301406201+0.572285723194j)*x_ref[0]**o + ((-0.62217531899-0.896824859285j))*x_ref[0] + ((0.791245476214-0.893312759502j))*x_ref[1]**o + ((0.0310354764587+0.457998256393j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.39054429038-0.186089428185j)*x[0]**o + ((0.439057244788+0.442936559462j))*x[0] + ((0.176451218555-0.141853046354j))*x[1]**o + ((-0.271514253848-0.920805190163j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.39054429038-0.186089428185j)*x_ref[0]**o + ((0.439057244788+0.442936559462j))*x_ref[0] + ((0.176451218555-0.141853046354j))*x_ref[1]**o + ((-0.271514253848-0.920805190163j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.465611676061-0.250137509927j)*x[0]**o + ((-0.427289230481+0.325117057512j))*x[0] + ((0.05306339104+0.574176091515j))*x[1]**o + ((0.518049857448-0.434998811561j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.465611676061-0.250137509927j)*x_ref[0]**o + ((-0.427289230481+0.325117057512j))*x_ref[0] + ((0.05306339104+0.574176091515j))*x_ref[1]**o + ((0.518049857448-0.434998811561j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.00733842167095-0.173592638452j)*x[0]**o + ((0.231433768891+0.636167262029j))*x[0] + ((0.79760637692+0.574160740319j))*x[1]**o + ((0.132211834616-0.934003449346j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.00733842167095-0.173592638452j)*x_ref[0]**o + ((0.231433768891+0.636167262029j))*x_ref[0] + ((0.79760637692+0.574160740319j))*x_ref[1]**o + ((0.132211834616-0.934003449346j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.613172767334-0.148626193388j)*x[0]**o + ((0.52361460732-0.451835336002j))*x[0] + ((-0.187793309564+0.50919629652j))*x[1]**o + ((0.714108158112-0.32422779373j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.613172767334-0.148626193388j)*x_ref[0]**o + ((0.52361460732-0.451835336002j))*x_ref[0] + ((-0.187793309564+0.50919629652j))*x_ref[1]**o + ((0.714108158112-0.32422779373j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.199308208696+0.282442838378j)*x[0]**o + ((0.219319003729-0.156011962089j))*x[0] + ((-0.894164804106-0.611057359859j))*x[1]**o + ((0.738165936186-0.472396433519j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.199308208696+0.282442838378j)*x_ref[0]**o + ((0.219319003729-0.156011962089j))*x_ref[0] + ((-0.894164804106-0.611057359859j))*x_ref[1]**o + ((0.738165936186-0.472396433519j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.0763311445176+0.155654619117j)*x[0]**o + ((-0.820866505655-0.773360186464j))*x[0] + ((0.979882666682+0.234160164467j))*x[1]**o + ((-0.780535510174-0.148649989196j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.0763311445176+0.155654619117j)*x_ref[0]**o + ((-0.820866505655-0.773360186464j))*x_ref[0] + ((0.979882666682+0.234160164467j))*x_ref[1]**o + ((-0.780535510174-0.148649989196j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.357972835469+0.0354650241516j)*x[0]**o + ((0.165833148732+0.141454274208j))*x[0] + ((-0.354680198256+0.954971637247j))*x[1]**o + ((0.715529917339+0.419987482794j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.357972835469+0.0354650241516j)*x_ref[0]**o + ((0.165833148732+0.141454274208j))*x_ref[0] + ((-0.354680198256+0.954971637247j))*x_ref[1]**o + ((0.715529917339+0.419987482794j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.954137879094-0.362573517219j)*x[0]**o + ((-0.701238098324+0.873825337679j))*x[0] + ((-0.503741185359-0.597659789651j))*x[1]**o + ((-0.0348100716196+0.0375386134666j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.954137879094-0.362573517219j)*x_ref[0]**o + ((-0.701238098324+0.873825337679j))*x_ref[0] + ((-0.503741185359-0.597659789651j))*x_ref[1]**o + ((-0.0348100716196+0.0375386134666j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.334635423208+0.155691915381j)*x[0]**o + ((-0.692320793719+0.755037580934j))*x[0] + ((-0.236659221754+0.803674582734j))*x[1]**o + ((0.471464288287+0.435583485501j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.334635423208+0.155691915381j)*x_ref[0]**o + ((-0.692320793719+0.755037580934j))*x_ref[0] + ((-0.236659221754+0.803674582734j))*x_ref[1]**o + ((0.471464288287+0.435583485501j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.344431210508+0.941998270782j)*x[0]**o + ((-0.730566754636+0.84468352311j))*x[0] + ((0.687577670972-0.074839030391j))*x[1]**o + ((-0.944622162449-0.491055880027j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.344431210508+0.941998270782j)*x_ref[0]**o + ((-0.730566754636+0.84468352311j))*x_ref[0] + ((0.687577670972-0.074839030391j))*x_ref[1]**o + ((-0.944622162449-0.491055880027j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.505096829158-0.636891931613j)*x[0]**o + ((0.154259409629+0.615428129755j))*x[0] + ((0.576389238789+0.10964101267j))*x[1]**o + ((0.353698342923+0.711336949377j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.505096829158-0.636891931613j)*x_ref[0]**o + ((0.154259409629+0.615428129755j))*x_ref[0] + ((0.576389238789+0.10964101267j))*x_ref[1]**o + ((0.353698342923+0.711336949377j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.956849346026-0.788231689431j)*x[0]**o + ((0.263653280731-0.279382440465j))*x[0] + ((-0.573264186774-0.856767926201j))*x[1]**o + ((-0.530518449627+0.820241637556j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.956849346026-0.788231689431j)*x_ref[0]**o + ((0.263653280731-0.279382440465j))*x_ref[0] + ((-0.573264186774-0.856767926201j))*x_ref[1]**o + ((-0.530518449627+0.820241637556j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(0.199170546226-0.70470849452j)*x[0]**o + ((-0.315991846092-0.185852065205j))*x[0] + ((-0.39180038773-0.543547743721j))*x[1]**o + ((0.0800806684154+0.0780967159141j))*x[1]
+        ref[(1, 1, 3, 0)]=(0.199170546226-0.70470849452j)*x_ref[0]**o + ((-0.315991846092-0.185852065205j))*x_ref[0] + ((-0.39180038773-0.543547743721j))*x_ref[1]**o + ((0.0800806684154+0.0780967159141j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.849024521815+0.626074712747j)*x[0]**o + ((-0.400826435455+0.72953076645j))*x[0] + ((-0.368888606659-0.655145439106j))*x[1]**o + ((0.745951351002-0.834613882834j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.849024521815+0.626074712747j)*x_ref[0]**o + ((-0.400826435455+0.72953076645j))*x_ref[0] + ((-0.368888606659-0.655145439106j))*x_ref[1]**o + ((0.745951351002-0.834613882834j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.994146922749+0.184434732991j)*x[0]**o + ((0.597667860537+0.521702390816j))*x[0] + ((0.976244142329+0.722027096325j))*x[1]**o + ((-0.276895535517+0.427046104066j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.994146922749+0.184434732991j)*x_ref[0]**o + ((0.597667860537+0.521702390816j))*x_ref[0] + ((0.976244142329+0.722027096325j))*x_ref[1]**o + ((-0.276895535517+0.427046104066j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.968382050248+0.949884342748j)*x[0]**o + ((0.0998973537416-0.837747598563j))*x[0] + ((0.0713359697901+0.562723114977j))*x[1]**o + ((-0.647289166115+0.419854937672j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.968382050248+0.949884342748j)*x_ref[0]**o + ((0.0998973537416-0.837747598563j))*x_ref[0] + ((0.0713359697901+0.562723114977j))*x_ref[1]**o + ((-0.647289166115+0.419854937672j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.975574141493+0.839883232708j)*x[0]**o + ((0.82220102841+0.81689884088j))*x[0] + ((0.820840511419+0.101954529844j))*x[1]**o + ((-0.893875050603-0.493733999542j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.975574141493+0.839883232708j)*x_ref[0]**o + ((0.82220102841+0.81689884088j))*x_ref[0] + ((0.820840511419+0.101954529844j))*x_ref[1]**o + ((-0.893875050603-0.493733999542j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.970403979217-0.937507696439j)*x[0]**o + ((0.596896413936-0.794272093328j))*x[0] + ((-0.774354637826-0.441650442965j))*x[1]**o + ((-0.473623623285+0.278883478304j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.970403979217-0.937507696439j)*x_ref[0]**o + ((0.596896413936-0.794272093328j))*x_ref[0] + ((-0.774354637826-0.441650442965j))*x_ref[1]**o + ((-0.473623623285+0.278883478304j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.593413290835+0.704184734834j)*x[0]**o + ((-0.207181545943-0.93187102772j))*x[0] + ((-0.864261571916-0.759058836111j))*x[1]**o + ((-0.782825887597+0.960741965767j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.593413290835+0.704184734834j)*x_ref[0]**o + ((-0.207181545943-0.93187102772j))*x_ref[0] + ((-0.864261571916-0.759058836111j))*x_ref[1]**o + ((-0.782825887597+0.960741965767j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.275502124603+0.600468947774j)*x[0]**o + ((0.54310606908-0.832230016977j))*x[0] + ((-0.623621477853+0.381191412936j))*x[1]**o + ((-0.50863196992+0.0683980166776j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.275502124603+0.600468947774j)*x_ref[0]**o + ((0.54310606908-0.832230016977j))*x_ref[0] + ((-0.623621477853+0.381191412936j))*x_ref[1]**o + ((-0.50863196992+0.0683980166776j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(-0.347836801742+0.935888686636j)*x[0]**o + ((-0.0372564475431-0.885502421528j))*x[0] + ((0.456847507344-0.345980587701j))*x[1]**o + ((0.974023703496-0.627065855473j))*x[1]
+        ref[(1, 2, 3, 0)]=(-0.347836801742+0.935888686636j)*x_ref[0]**o + ((-0.0372564475431-0.885502421528j))*x_ref[0] + ((0.456847507344-0.345980587701j))*x_ref[1]**o + ((0.974023703496-0.627065855473j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(-0.0831810928935+0.0454538578023j)*x[0]**o + ((0.408752865791+0.113462112557j))*x[0] + ((0.989237376223+0.341376488866j))*x[1]**o + ((-0.115959999331-0.509359220463j))*x[1]
+        ref[(1, 2, 3, 1)]=(-0.0831810928935+0.0454538578023j)*x_ref[0]**o + ((0.408752865791+0.113462112557j))*x_ref[0] + ((0.989237376223+0.341376488866j))*x_ref[1]**o + ((-0.115959999331-0.509359220463j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.453747456575+0.488369501765j)*x[0]**o + ((-0.561802930614-0.73365146233j))*x[0] + ((-0.426526745648+0.0750570187214j))*x[1]**o + ((-0.410411033798-0.498656081878j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.453747456575+0.488369501765j)*x_ref[0]**o + ((-0.561802930614-0.73365146233j))*x_ref[0] + ((-0.426526745648+0.0750570187214j))*x_ref[1]**o + ((-0.410411033798-0.498656081878j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.301670176177-0.433852696436j)*x[0]**o + ((0.962371405458-0.00277567179045j))*x[0] + ((0.496304535972+0.545421748178j))*x[1]**o + ((-0.818492570709-0.316722143975j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.301670176177-0.433852696436j)*x_ref[0]**o + ((0.962371405458-0.00277567179045j))*x_ref[0] + ((0.496304535972+0.545421748178j))*x_ref[1]**o + ((-0.818492570709-0.316722143975j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.571061564971+0.957109958497j)*x[0]**o + ((-0.396918066948+0.346024666533j))*x[0] + ((0.0673585923817+0.707533529128j))*x[1]**o + ((-0.716431455071-0.142236981985j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.571061564971+0.957109958497j)*x_ref[0]**o + ((-0.396918066948+0.346024666533j))*x_ref[0] + ((0.0673585923817+0.707533529128j))*x_ref[1]**o + ((-0.716431455071-0.142236981985j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.310834036516+0.945153525831j)*x[0]**o + ((0.174170375926+0.145153446411j))*x[0] + ((0.989666479313+0.0514580804747j))*x[1]**o + ((-0.398131050987-0.218139427324j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.310834036516+0.945153525831j)*x_ref[0]**o + ((0.174170375926+0.145153446411j))*x_ref[0] + ((0.989666479313+0.0514580804747j))*x_ref[1]**o + ((-0.398131050987-0.218139427324j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(0.781341665764+0.336447620477j)*x[0]**o + ((-0.377359367308+0.580083780454j))*x[0] + ((0.0248754947086-0.483079164987j))*x[1]**o + ((-0.945800555139-0.170153875453j))*x[1]
+        ref[(2, 0, 2, 0)]=(0.781341665764+0.336447620477j)*x_ref[0]**o + ((-0.377359367308+0.580083780454j))*x_ref[0] + ((0.0248754947086-0.483079164987j))*x_ref[1]**o + ((-0.945800555139-0.170153875453j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.768567133831-0.814375121928j)*x[0]**o + ((-0.588922210582+0.489512479366j))*x[0] + ((0.600024671948-0.713999106039j))*x[1]**o + ((0.974894292926+0.845994056554j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.768567133831-0.814375121928j)*x_ref[0]**o + ((-0.588922210582+0.489512479366j))*x_ref[0] + ((0.600024671948-0.713999106039j))*x_ref[1]**o + ((0.974894292926+0.845994056554j))*x_ref[1]
+        arg[(2, 0, 3, 0)]=(0.666290351712+0.687081533253j)*x[0]**o + ((0.495260805833+0.12636359055j))*x[0] + ((0.374253203669+0.657265059087j))*x[1]**o + ((0.56273098466-0.646427364409j))*x[1]
+        ref[(2, 0, 3, 0)]=(0.666290351712+0.687081533253j)*x_ref[0]**o + ((0.495260805833+0.12636359055j))*x_ref[0] + ((0.374253203669+0.657265059087j))*x_ref[1]**o + ((0.56273098466-0.646427364409j))*x_ref[1]
+        arg[(2, 0, 3, 1)]=(-0.451155320886+0.272256785781j)*x[0]**o + ((0.419594096999-0.452561867619j))*x[0] + ((0.0452105778753+0.00671398933924j))*x[1]**o + ((-0.943868446369-0.72009729792j))*x[1]
+        ref[(2, 0, 3, 1)]=(-0.451155320886+0.272256785781j)*x_ref[0]**o + ((0.419594096999-0.452561867619j))*x_ref[0] + ((0.0452105778753+0.00671398933924j))*x_ref[1]**o + ((-0.943868446369-0.72009729792j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.215142714494+0.476692565064j)*x[0]**o + ((0.97937063044-0.231729411267j))*x[0] + ((-0.96467371791+0.912629004003j))*x[1]**o + ((-0.990501001672+0.239932254656j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.215142714494+0.476692565064j)*x_ref[0]**o + ((0.97937063044-0.231729411267j))*x_ref[0] + ((-0.96467371791+0.912629004003j))*x_ref[1]**o + ((-0.990501001672+0.239932254656j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.0682593959508-0.0234097170654j)*x[0]**o + ((-0.0705418100022+0.921253511696j))*x[0] + ((0.746612994691+0.268901419411j))*x[1]**o + ((-0.234238631401-0.892883798169j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.0682593959508-0.0234097170654j)*x_ref[0]**o + ((-0.0705418100022+0.921253511696j))*x_ref[0] + ((0.746612994691+0.268901419411j))*x_ref[1]**o + ((-0.234238631401-0.892883798169j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.80281682488-0.2783413611j)*x[0]**o + ((0.724192847185+0.63937906935j))*x[0] + ((-0.893682594571-0.463249093039j))*x[1]**o + ((-0.461501072906+0.30199550783j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.80281682488-0.2783413611j)*x_ref[0]**o + ((0.724192847185+0.63937906935j))*x_ref[0] + ((-0.893682594571-0.463249093039j))*x_ref[1]**o + ((-0.461501072906+0.30199550783j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.523352303037+0.359314950904j)*x[0]**o + ((-0.109992756246+0.632719750702j))*x[0] + ((-0.369456932168-0.374531765206j))*x[1]**o + ((0.059511108485+0.731042741206j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.523352303037+0.359314950904j)*x_ref[0]**o + ((-0.109992756246+0.632719750702j))*x_ref[0] + ((-0.369456932168-0.374531765206j))*x_ref[1]**o + ((0.059511108485+0.731042741206j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.424050714813+0.291670569248j)*x[0]**o + ((-0.0242453627047-0.300487659017j))*x[0] + ((0.796750812242-0.64910976844j))*x[1]**o + ((0.286127297301-0.491479365402j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.424050714813+0.291670569248j)*x_ref[0]**o + ((-0.0242453627047-0.300487659017j))*x_ref[0] + ((0.796750812242-0.64910976844j))*x_ref[1]**o + ((0.286127297301-0.491479365402j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.991038501883+0.0488849213801j)*x[0]**o + ((0.969903382704-0.7785773473j))*x[0] + ((-0.798744314975+0.259280689301j))*x[1]**o + ((0.0864732212394+0.859999379204j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.991038501883+0.0488849213801j)*x_ref[0]**o + ((0.969903382704-0.7785773473j))*x_ref[0] + ((-0.798744314975+0.259280689301j))*x_ref[1]**o + ((0.0864732212394+0.859999379204j))*x_ref[1]
+        arg[(2, 1, 3, 0)]=(-0.217092859548-0.418182021847j)*x[0]**o + ((-0.718515266749+0.157022331318j))*x[0] + ((0.0799784282891-0.546949856638j))*x[1]**o + ((-0.733373167753-0.901740290989j))*x[1]
+        ref[(2, 1, 3, 0)]=(-0.217092859548-0.418182021847j)*x_ref[0]**o + ((-0.718515266749+0.157022331318j))*x_ref[0] + ((0.0799784282891-0.546949856638j))*x_ref[1]**o + ((-0.733373167753-0.901740290989j))*x_ref[1]
+        arg[(2, 1, 3, 1)]=(0.204767264923+0.544860352131j)*x[0]**o + ((-0.804177656531-0.617665296525j))*x[0] + ((0.0652620180119+0.673611970287j))*x[1]**o + ((0.336807946862-0.432824459538j))*x[1]
+        ref[(2, 1, 3, 1)]=(0.204767264923+0.544860352131j)*x_ref[0]**o + ((-0.804177656531-0.617665296525j))*x_ref[0] + ((0.0652620180119+0.673611970287j))*x_ref[1]**o + ((0.336807946862-0.432824459538j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(-0.758006580109-0.496245829401j)*x[0]**o + ((0.845395990168+0.203142891983j))*x[0] + ((0.873376451956+0.762732902454j))*x[1]**o + ((-0.287008078231+0.978195121759j))*x[1]
+        ref[(2, 2, 0, 0)]=(-0.758006580109-0.496245829401j)*x_ref[0]**o + ((0.845395990168+0.203142891983j))*x_ref[0] + ((0.873376451956+0.762732902454j))*x_ref[1]**o + ((-0.287008078231+0.978195121759j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.915111385272-0.700411458792j)*x[0]**o + ((0.21495207418+0.9480278085j))*x[0] + ((0.00536490227546+0.233721638694j))*x[1]**o + ((0.64608599743+0.327932317685j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.915111385272-0.700411458792j)*x_ref[0]**o + ((0.21495207418+0.9480278085j))*x_ref[0] + ((0.00536490227546+0.233721638694j))*x_ref[1]**o + ((0.64608599743+0.327932317685j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.0608087026109-0.632055489254j)*x[0]**o + ((-0.345814854944+0.909210261625j))*x[0] + ((0.237896021301-0.225971334708j))*x[1]**o + ((0.901053543954-0.401632098334j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.0608087026109-0.632055489254j)*x_ref[0]**o + ((-0.345814854944+0.909210261625j))*x_ref[0] + ((0.237896021301-0.225971334708j))*x_ref[1]**o + ((0.901053543954-0.401632098334j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.602488716689-0.769780115453j)*x[0]**o + ((0.990182585354+0.237663577812j))*x[0] + ((-0.0955740197606-0.58497968523j))*x[1]**o + ((0.614570443657+0.676189145997j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.602488716689-0.769780115453j)*x_ref[0]**o + ((0.990182585354+0.237663577812j))*x_ref[0] + ((-0.0955740197606-0.58497968523j))*x_ref[1]**o + ((0.614570443657+0.676189145997j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(0.77157236042-0.0905717987229j)*x[0]**o + ((0.0249818023642-0.175804958357j))*x[0] + ((-0.900075139304-0.814137414995j))*x[1]**o + ((0.598282066511-0.920951484648j))*x[1]
+        ref[(2, 2, 2, 0)]=(0.77157236042-0.0905717987229j)*x_ref[0]**o + ((0.0249818023642-0.175804958357j))*x_ref[0] + ((-0.900075139304-0.814137414995j))*x_ref[1]**o + ((0.598282066511-0.920951484648j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.13619428649+0.508898801369j)*x[0]**o + ((-0.172876127279+0.00639435803819j))*x[0] + ((-0.32293890825-0.564910800764j))*x[1]**o + ((-0.999215835192+0.711923906496j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.13619428649+0.508898801369j)*x_ref[0]**o + ((-0.172876127279+0.00639435803819j))*x_ref[0] + ((-0.32293890825-0.564910800764j))*x_ref[1]**o + ((-0.999215835192+0.711923906496j))*x_ref[1]
+        arg[(2, 2, 3, 0)]=(-0.89473972806-0.67321699415j)*x[0]**o + ((-0.468054518769+0.430491826403j))*x[0] + ((0.461587045031-0.36456213109j))*x[1]**o + ((0.715905007197-0.340178484305j))*x[1]
+        ref[(2, 2, 3, 0)]=(-0.89473972806-0.67321699415j)*x_ref[0]**o + ((-0.468054518769+0.430491826403j))*x_ref[0] + ((0.461587045031-0.36456213109j))*x_ref[1]**o + ((0.715905007197-0.340178484305j))*x_ref[1]
+        arg[(2, 2, 3, 1)]=(0.724905540215+0.851355516056j)*x[0]**o + ((0.581211363328-0.512663714688j))*x[0] + ((-0.0425164480093-0.365910611765j))*x[1]**o + ((0.0471504399045+0.030293269042j))*x[1]
+        ref[(2, 2, 3, 1)]=(0.724905540215+0.851355516056j)*x_ref[0]**o + ((0.581211363328-0.512663714688j))*x_ref[0] + ((-0.0425164480093-0.365910611765j))*x_ref[1]**o + ((0.0471504399045+0.030293269042j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.641051366901+0.0515897479095j)*x[0]**o + ((-0.225064027487+0.765628643953j))*x[0] + ((0.819150020775-0.832862328892j))*x[1]**o + ((0.12289763122-0.464445876354j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.641051366901+0.0515897479095j)*x_ref[0]**o + ((-0.225064027487+0.765628643953j))*x_ref[0] + ((0.819150020775-0.832862328892j))*x_ref[1]**o + ((0.12289763122-0.464445876354j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(-0.907162024316-0.774530909347j)*x[0]**o + ((-0.869174649622-0.681900264126j))*x[0] + ((-0.130150671782+0.172671965637j))*x[1]**o + ((-0.859976142263-0.883683824459j))*x[1]
+        ref[(3, 0, 0, 1)]=(-0.907162024316-0.774530909347j)*x_ref[0]**o + ((-0.869174649622-0.681900264126j))*x_ref[0] + ((-0.130150671782+0.172671965637j))*x_ref[1]**o + ((-0.859976142263-0.883683824459j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.266512683658+0.379992455791j)*x[0]**o + ((-0.922108469687+0.562651002241j))*x[0] + ((0.638033849901+0.59515015797j))*x[1]**o + ((0.946111743576+0.682937504615j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.266512683658+0.379992455791j)*x_ref[0]**o + ((-0.922108469687+0.562651002241j))*x_ref[0] + ((0.638033849901+0.59515015797j))*x_ref[1]**o + ((0.946111743576+0.682937504615j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(-0.940092071724+0.730139911018j)*x[0]**o + ((-0.361491457161-0.783937228551j))*x[0] + ((0.87858656067-0.2067069143j))*x[1]**o + ((0.361130666395-0.371621735303j))*x[1]
+        ref[(3, 0, 1, 1)]=(-0.940092071724+0.730139911018j)*x_ref[0]**o + ((-0.361491457161-0.783937228551j))*x_ref[0] + ((0.87858656067-0.2067069143j))*x_ref[1]**o + ((0.361130666395-0.371621735303j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(-0.0335488781055+0.412435191403j)*x[0]**o + ((-0.62840706777-0.669702016536j))*x[0] + ((0.414633345727+0.571070552011j))*x[1]**o + ((-0.14416623211+0.193402650396j))*x[1]
+        ref[(3, 0, 2, 0)]=(-0.0335488781055+0.412435191403j)*x_ref[0]**o + ((-0.62840706777-0.669702016536j))*x_ref[0] + ((0.414633345727+0.571070552011j))*x_ref[1]**o + ((-0.14416623211+0.193402650396j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(0.443749084561-0.14469175035j)*x[0]**o + ((0.32994754103-0.326353395335j))*x[0] + ((-0.536289282949-0.168605490323j))*x[1]**o + ((-0.568164297615+0.473925204993j))*x[1]
+        ref[(3, 0, 2, 1)]=(0.443749084561-0.14469175035j)*x_ref[0]**o + ((0.32994754103-0.326353395335j))*x_ref[0] + ((-0.536289282949-0.168605490323j))*x_ref[1]**o + ((-0.568164297615+0.473925204993j))*x_ref[1]
+        arg[(3, 0, 3, 0)]=(0.3809221492+0.545167757843j)*x[0]**o + ((0.444409910525+0.737720661163j))*x[0] + ((-0.744255659189-0.515563933042j))*x[1]**o + ((0.0963560120575+0.285350703719j))*x[1]
+        ref[(3, 0, 3, 0)]=(0.3809221492+0.545167757843j)*x_ref[0]**o + ((0.444409910525+0.737720661163j))*x_ref[0] + ((-0.744255659189-0.515563933042j))*x_ref[1]**o + ((0.0963560120575+0.285350703719j))*x_ref[1]
+        arg[(3, 0, 3, 1)]=(0.85225581986+0.16261611211j)*x[0]**o + ((0.434116759916+0.567449024972j))*x[0] + ((-0.442122064114-0.390584606767j))*x[1]**o + ((-0.829722313948+0.639142109243j))*x[1]
+        ref[(3, 0, 3, 1)]=(0.85225581986+0.16261611211j)*x_ref[0]**o + ((0.434116759916+0.567449024972j))*x_ref[0] + ((-0.442122064114-0.390584606767j))*x_ref[1]**o + ((-0.829722313948+0.639142109243j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.0943041157891+0.837431297904j)*x[0]**o + ((0.646503137132-0.133509855609j))*x[0] + ((-0.498527541448+0.231104236922j))*x[1]**o + ((-0.448770173229+0.330933184465j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.0943041157891+0.837431297904j)*x_ref[0]**o + ((0.646503137132-0.133509855609j))*x_ref[0] + ((-0.498527541448+0.231104236922j))*x_ref[1]**o + ((-0.448770173229+0.330933184465j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.495585294829+0.686281865919j)*x[0]**o + ((-0.536024464999-0.330325831229j))*x[0] + ((-0.309557143358+0.2302072951j))*x[1]**o + ((0.238626700459-0.530885186333j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.495585294829+0.686281865919j)*x_ref[0]**o + ((-0.536024464999-0.330325831229j))*x_ref[0] + ((-0.309557143358+0.2302072951j))*x_ref[1]**o + ((0.238626700459-0.530885186333j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.496231383089-0.277300815797j)*x[0]**o + ((0.943192168392+0.98801824354j))*x[0] + ((-0.755296765989+0.340000388214j))*x[1]**o + ((-0.780549116942-0.604052795229j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.496231383089-0.277300815797j)*x_ref[0]**o + ((0.943192168392+0.98801824354j))*x_ref[0] + ((-0.755296765989+0.340000388214j))*x_ref[1]**o + ((-0.780549116942-0.604052795229j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.521330472125+0.948571738125j)*x[0]**o + ((0.201444693312-0.923661046742j))*x[0] + ((-0.373007193166+0.0707889801408j))*x[1]**o + ((-0.143850591739-0.832591290867j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.521330472125+0.948571738125j)*x_ref[0]**o + ((0.201444693312-0.923661046742j))*x_ref[0] + ((-0.373007193166+0.0707889801408j))*x_ref[1]**o + ((-0.143850591739-0.832591290867j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(0.535273795608+0.716901748302j)*x[0]**o + ((-0.906233536713+0.0817470076078j))*x[0] + ((-0.52750399371-0.859857830472j))*x[1]**o + ((0.00899346343056+0.0397753019148j))*x[1]
+        ref[(3, 1, 2, 0)]=(0.535273795608+0.716901748302j)*x_ref[0]**o + ((-0.906233536713+0.0817470076078j))*x_ref[0] + ((-0.52750399371-0.859857830472j))*x_ref[1]**o + ((0.00899346343056+0.0397753019148j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(-0.153530786702+0.74520717532j)*x[0]**o + ((-0.47160378297-0.697713455986j))*x[0] + ((-0.985254312083+0.438691498284j))*x[1]**o + ((0.478434959764+0.804684421264j))*x[1]
+        ref[(3, 1, 2, 1)]=(-0.153530786702+0.74520717532j)*x_ref[0]**o + ((-0.47160378297-0.697713455986j))*x_ref[0] + ((-0.985254312083+0.438691498284j))*x_ref[1]**o + ((0.478434959764+0.804684421264j))*x_ref[1]
+        arg[(3, 1, 3, 0)]=(-0.564549353412-0.917498134234j)*x[0]**o + ((0.597679626159-0.0035149885684j))*x[0] + ((-0.458908239157-0.146424901671j))*x[1]**o + ((0.955231255267+0.867887521497j))*x[1]
+        ref[(3, 1, 3, 0)]=(-0.564549353412-0.917498134234j)*x_ref[0]**o + ((0.597679626159-0.0035149885684j))*x_ref[0] + ((-0.458908239157-0.146424901671j))*x_ref[1]**o + ((0.955231255267+0.867887521497j))*x_ref[1]
+        arg[(3, 1, 3, 1)]=(0.114935372927-0.795887640589j)*x[0]**o + ((-0.0800654736489+0.940433678987j))*x[0] + ((0.367615021026+0.998202299415j))*x[1]**o + ((-0.0705438775198-0.143178050498j))*x[1]
+        ref[(3, 1, 3, 1)]=(0.114935372927-0.795887640589j)*x_ref[0]**o + ((-0.0800654736489+0.940433678987j))*x_ref[0] + ((0.367615021026+0.998202299415j))*x_ref[1]**o + ((-0.0705438775198-0.143178050498j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(-0.821946259282+0.20014305211j)*x[0]**o + ((-0.975311313363-0.467068374411j))*x[0] + ((0.320552678992-0.165089290177j))*x[1]**o + ((0.134522184556+0.732265937071j))*x[1]
+        ref[(3, 2, 0, 0)]=(-0.821946259282+0.20014305211j)*x_ref[0]**o + ((-0.975311313363-0.467068374411j))*x_ref[0] + ((0.320552678992-0.165089290177j))*x_ref[1]**o + ((0.134522184556+0.732265937071j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(0.735002383342+0.592740980483j)*x[0]**o + ((0.164054946619-0.0484588561467j))*x[0] + ((0.642553692806+0.104227309723j))*x[1]**o + ((-0.649949873515-0.967796428418j))*x[1]
+        ref[(3, 2, 0, 1)]=(0.735002383342+0.592740980483j)*x_ref[0]**o + ((0.164054946619-0.0484588561467j))*x_ref[0] + ((0.642553692806+0.104227309723j))*x_ref[1]**o + ((-0.649949873515-0.967796428418j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.778224091045+0.634225026582j)*x[0]**o + ((0.234440366647-0.891345194591j))*x[0] + ((0.404589357761-0.424480768626j))*x[1]**o + ((0.569684924756+0.309613739372j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.778224091045+0.634225026582j)*x_ref[0]**o + ((0.234440366647-0.891345194591j))*x_ref[0] + ((0.404589357761-0.424480768626j))*x_ref[1]**o + ((0.569684924756+0.309613739372j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(0.336435385957-0.356596601262j)*x[0]**o + ((0.752618471041+0.0940750518898j))*x[0] + ((0.884812712005+0.317172681778j))*x[1]**o + ((0.729340019533-0.794377705309j))*x[1]
+        ref[(3, 2, 1, 1)]=(0.336435385957-0.356596601262j)*x_ref[0]**o + ((0.752618471041+0.0940750518898j))*x_ref[0] + ((0.884812712005+0.317172681778j))*x_ref[1]**o + ((0.729340019533-0.794377705309j))*x_ref[1]
+        arg[(3, 2, 2, 0)]=(-0.401718457622+0.810877551039j)*x[0]**o + ((-0.0905449836774-0.906210402026j))*x[0] + ((0.513131070374+0.896251618385j))*x[1]**o + ((-0.997142302062-0.169528518103j))*x[1]
+        ref[(3, 2, 2, 0)]=(-0.401718457622+0.810877551039j)*x_ref[0]**o + ((-0.0905449836774-0.906210402026j))*x_ref[0] + ((0.513131070374+0.896251618385j))*x_ref[1]**o + ((-0.997142302062-0.169528518103j))*x_ref[1]
+        arg[(3, 2, 2, 1)]=(0.810310105976+0.769501734805j)*x[0]**o + ((-0.585019186948-0.78879880804j))*x[0] + ((-0.288632150957-0.386467038018j))*x[1]**o + ((-0.930873024493-0.241091988368j))*x[1]
+        ref[(3, 2, 2, 1)]=(0.810310105976+0.769501734805j)*x_ref[0]**o + ((-0.585019186948-0.78879880804j))*x_ref[0] + ((-0.288632150957-0.386467038018j))*x_ref[1]**o + ((-0.930873024493-0.241091988368j))*x_ref[1]
+        arg[(3, 2, 3, 0)]=(0.912346460508-0.442698148397j)*x[0]**o + ((0.718763416949+0.199684325594j))*x[0] + ((-0.531730665732-0.895991506013j))*x[1]**o + ((0.799107256242+0.506788362626j))*x[1]
+        ref[(3, 2, 3, 0)]=(0.912346460508-0.442698148397j)*x_ref[0]**o + ((0.718763416949+0.199684325594j))*x_ref[0] + ((-0.531730665732-0.895991506013j))*x_ref[1]**o + ((0.799107256242+0.506788362626j))*x_ref[1]
+        arg[(3, 2, 3, 1)]=(-0.372160831315+0.642209686208j)*x[0]**o + ((-0.388464414275+0.117042963684j))*x[0] + ((0.976799295049-0.882475855592j))*x[1]**o + ((-0.281138395587-0.0491399944191j))*x[1]
+        ref[(3, 2, 3, 1)]=(-0.372160831315+0.642209686208j)*x_ref[0]**o + ((-0.388464414275+0.117042963684j))*x_ref[0] + ((0.976799295049-0.882475855592j))*x_ref[1]**o + ((-0.281138395587-0.0491399944191j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.512772949936+0.521498878376j)*x[2]**o + ((0.393136504134+0.642991269746j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.512772949936+0.521498878376j)*x_ref[2]**o + ((0.393136504134+0.642991269746j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.974228335691+0.799048116771j)*x[2]**o + ((-0.174282895338+0.194080785214j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.974228335691+0.799048116771j)*x_ref[2]**o + ((-0.174282895338+0.194080785214j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.922381726229-0.269679659102j)*x[2]**o + ((0.476000238007-0.965363383574j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.922381726229-0.269679659102j)*x_ref[2]**o + ((0.476000238007-0.965363383574j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.969567437184-0.913237822149j)*x[2]**o + ((-0.0126615720289-0.00169690924979j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.969567437184-0.913237822149j)*x_ref[2]**o + ((-0.0126615720289-0.00169690924979j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.0828081671482+0.548002690871j)*x[2]**o + ((-0.373067147347-0.48578364413j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.0828081671482+0.548002690871j)*x_ref[2]**o + ((-0.373067147347-0.48578364413j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.597577470791+0.884172042688j)*x[2]**o + ((-0.102223032374-0.893975741973j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.597577470791+0.884172042688j)*x_ref[2]**o + ((-0.102223032374-0.893975741973j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(-0.926679931513+0.472940776251j)*x[2]**o + ((0.217517735596-0.616840152j))*x[2]
+            ref[(0, 0, 3, 0)]+=(-0.926679931513+0.472940776251j)*x_ref[2]**o + ((0.217517735596-0.616840152j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(0.153860264446-0.75239667131j)*x[2]**o + ((0.766058121932-0.744695115136j))*x[2]
+            ref[(0, 0, 3, 1)]+=(0.153860264446-0.75239667131j)*x_ref[2]**o + ((0.766058121932-0.744695115136j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.20893181213-0.114573961146j)*x[2]**o + ((-0.216170382353-0.846736955689j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.20893181213-0.114573961146j)*x_ref[2]**o + ((-0.216170382353-0.846736955689j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.61473710329+0.654560313702j)*x[2]**o + ((0.317103204042+0.719378748592j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.61473710329+0.654560313702j)*x_ref[2]**o + ((0.317103204042+0.719378748592j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.975099465576-0.544461066424j)*x[2]**o + ((-0.151804684748-0.23866959026j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.975099465576-0.544461066424j)*x_ref[2]**o + ((-0.151804684748-0.23866959026j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.206392757676-0.874809459204j)*x[2]**o + ((0.799030871025-0.54825219518j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.206392757676-0.874809459204j)*x_ref[2]**o + ((0.799030871025-0.54825219518j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.118380285189-0.457858920531j)*x[2]**o + ((0.873611867855+0.876450416413j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.118380285189-0.457858920531j)*x_ref[2]**o + ((0.873611867855+0.876450416413j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.695315481351+0.353483942685j)*x[2]**o + ((-0.184950155231+0.480623506837j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.695315481351+0.353483942685j)*x_ref[2]**o + ((-0.184950155231+0.480623506837j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(0.160823507153-0.763246243044j)*x[2]**o + ((-0.591331569358+0.570533916511j))*x[2]
+            ref[(0, 1, 3, 0)]+=(0.160823507153-0.763246243044j)*x_ref[2]**o + ((-0.591331569358+0.570533916511j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(0.00979927687653-0.60884747182j)*x[2]**o + ((-0.978116394744+0.217160332206j))*x[2]
+            ref[(0, 1, 3, 1)]+=(0.00979927687653-0.60884747182j)*x_ref[2]**o + ((-0.978116394744+0.217160332206j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.936502064714-0.312761234868j)*x[2]**o + ((-0.551341018302+0.00527116996548j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.936502064714-0.312761234868j)*x_ref[2]**o + ((-0.551341018302+0.00527116996548j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.32933868352-0.782370420229j)*x[2]**o + ((-0.498232259793-0.732082592697j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.32933868352-0.782370420229j)*x_ref[2]**o + ((-0.498232259793-0.732082592697j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.950190094373-0.722904244259j)*x[2]**o + ((-0.697071985987+0.868194228635j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.950190094373-0.722904244259j)*x_ref[2]**o + ((-0.697071985987+0.868194228635j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.705022363733-0.884213315258j)*x[2]**o + ((-0.417559221525-0.417068273024j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.705022363733-0.884213315258j)*x_ref[2]**o + ((-0.417559221525-0.417068273024j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.313208754472-0.358937856955j)*x[2]**o + ((-0.923596855684-0.819433563813j))*x[2]
+            ref[(0, 2, 2, 0)]+=(0.313208754472-0.358937856955j)*x_ref[2]**o + ((-0.923596855684-0.819433563813j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.681741285497+0.16857545805j)*x[2]**o + ((0.682243980874+0.926772391826j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.681741285497+0.16857545805j)*x_ref[2]**o + ((0.682243980874+0.926772391826j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(-0.374694931911-0.938309809422j)*x[2]**o + ((0.640895111173+0.33234039544j))*x[2]
+            ref[(0, 2, 3, 0)]+=(-0.374694931911-0.938309809422j)*x_ref[2]**o + ((0.640895111173+0.33234039544j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(-0.736360588789+0.285753300111j)*x[2]**o + ((0.785129354668+0.913657724219j))*x[2]
+            ref[(0, 2, 3, 1)]+=(-0.736360588789+0.285753300111j)*x_ref[2]**o + ((0.785129354668+0.913657724219j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.42514686536-0.992864037731j)*x[2]**o + ((0.776338925159-0.686979500122j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.42514686536-0.992864037731j)*x_ref[2]**o + ((0.776338925159-0.686979500122j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.24729468777-0.251048420405j)*x[2]**o + ((0.191740509959-0.79181112438j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.24729468777-0.251048420405j)*x_ref[2]**o + ((0.191740509959-0.79181112438j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.625246750647-0.208969012008j)*x[2]**o + ((0.78755740158-0.589750069553j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.625246750647-0.208969012008j)*x_ref[2]**o + ((0.78755740158-0.589750069553j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.186108158782+0.0686091132548j)*x[2]**o + ((0.978357269239+0.0450307917834j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.186108158782+0.0686091132548j)*x_ref[2]**o + ((0.978357269239+0.0450307917834j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.44327256909-0.481781757068j)*x[2]**o + ((-0.563951576317+0.354864060187j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.44327256909-0.481781757068j)*x_ref[2]**o + ((-0.563951576317+0.354864060187j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.582587395728-0.676242792095j)*x[2]**o + ((-0.540778095127-0.967203869319j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.582587395728-0.676242792095j)*x_ref[2]**o + ((-0.540778095127-0.967203869319j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(0.252659928211+0.991520335834j)*x[2]**o + ((0.0338116049659-0.422040075519j))*x[2]
+            ref[(1, 0, 3, 0)]+=(0.252659928211+0.991520335834j)*x_ref[2]**o + ((0.0338116049659-0.422040075519j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(0.560927427125-0.559584971986j)*x[2]**o + ((0.174675859112+0.226714460279j))*x[2]
+            ref[(1, 0, 3, 1)]+=(0.560927427125-0.559584971986j)*x_ref[2]**o + ((0.174675859112+0.226714460279j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.64938985274+0.164814993211j)*x[2]**o + ((0.4435077986-0.774126270764j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.64938985274+0.164814993211j)*x_ref[2]**o + ((0.4435077986-0.774126270764j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.754204282633+0.29997545639j)*x[2]**o + ((-0.345836824514+0.841474049454j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.754204282633+0.29997545639j)*x_ref[2]**o + ((-0.345836824514+0.841474049454j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.802095422816+0.0582918665554j)*x[2]**o + ((0.0867838955068+0.392764493018j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.802095422816+0.0582918665554j)*x_ref[2]**o + ((0.0867838955068+0.392764493018j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.335472554459+0.988933724119j)*x[2]**o + ((0.992489716722-0.788772126881j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.335472554459+0.988933724119j)*x_ref[2]**o + ((0.992489716722-0.788772126881j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.835460660518+0.835699674597j)*x[2]**o + ((-0.788945250446+0.154851778792j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.835460660518+0.835699674597j)*x_ref[2]**o + ((-0.788945250446+0.154851778792j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.332052419734-0.449995813236j)*x[2]**o + ((-0.818677395473+0.150669150733j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.332052419734-0.449995813236j)*x_ref[2]**o + ((-0.818677395473+0.150669150733j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(0.915581201466-0.536584648032j)*x[2]**o + ((0.0788460064092-0.77787688066j))*x[2]
+            ref[(1, 1, 3, 0)]+=(0.915581201466-0.536584648032j)*x_ref[2]**o + ((0.0788460064092-0.77787688066j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(-0.961956177616+0.620505312642j)*x[2]**o + ((-0.587701000478+0.504852818841j))*x[2]
+            ref[(1, 1, 3, 1)]+=(-0.961956177616+0.620505312642j)*x_ref[2]**o + ((-0.587701000478+0.504852818841j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.68689131437+0.512419196087j)*x[2]**o + ((0.439956844336-0.829616353237j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.68689131437+0.512419196087j)*x_ref[2]**o + ((0.439956844336-0.829616353237j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.547746734498+0.13183754321j)*x[2]**o + ((0.85975472629-0.288459510046j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.547746734498+0.13183754321j)*x_ref[2]**o + ((0.85975472629-0.288459510046j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.830066982439-0.911093926275j)*x[2]**o + ((-0.11714139932+0.936922314626j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.830066982439-0.911093926275j)*x_ref[2]**o + ((-0.11714139932+0.936922314626j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.0999830115504+0.755641918165j)*x[2]**o + ((-0.281246345124-0.461029467779j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.0999830115504+0.755641918165j)*x_ref[2]**o + ((-0.281246345124-0.461029467779j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.459859472258-0.136392764404j)*x[2]**o + ((-0.927674011811+0.426052814777j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.459859472258-0.136392764404j)*x_ref[2]**o + ((-0.927674011811+0.426052814777j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.959832960504+0.290718644333j)*x[2]**o + ((0.575709668295-0.635156490962j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.959832960504+0.290718644333j)*x_ref[2]**o + ((0.575709668295-0.635156490962j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(-0.791451200378-0.715032468956j)*x[2]**o + ((0.470475762976-0.894560548585j))*x[2]
+            ref[(1, 2, 3, 0)]+=(-0.791451200378-0.715032468956j)*x_ref[2]**o + ((0.470475762976-0.894560548585j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(0.281025822403+0.809898199925j)*x[2]**o + ((0.904688987253+0.203458402738j))*x[2]
+            ref[(1, 2, 3, 1)]+=(0.281025822403+0.809898199925j)*x_ref[2]**o + ((0.904688987253+0.203458402738j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.00463956656638-0.0853569041892j)*x[2]**o + ((0.641181067414+0.215278989148j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.00463956656638-0.0853569041892j)*x_ref[2]**o + ((0.641181067414+0.215278989148j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.655525060846+0.679713480864j)*x[2]**o + ((-0.915799867131-0.671231197926j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.655525060846+0.679713480864j)*x_ref[2]**o + ((-0.915799867131-0.671231197926j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.636435342913-0.920556184828j)*x[2]**o + ((-0.951250702184-0.481888221417j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.636435342913-0.920556184828j)*x_ref[2]**o + ((-0.951250702184-0.481888221417j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.92674643755-0.920773435047j)*x[2]**o + ((0.396952480911-0.920399809281j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.92674643755-0.920773435047j)*x_ref[2]**o + ((0.396952480911-0.920399809281j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(0.190671186452+0.535670409383j)*x[2]**o + ((-0.999825227149-0.156491252169j))*x[2]
+            ref[(2, 0, 2, 0)]+=(0.190671186452+0.535670409383j)*x_ref[2]**o + ((-0.999825227149-0.156491252169j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.164813411388+0.860654303125j)*x[2]**o + ((-0.0588739274788+0.451121665895j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.164813411388+0.860654303125j)*x_ref[2]**o + ((-0.0588739274788+0.451121665895j))*x_ref[2]
+            arg[(2, 0, 3, 0)]+=(0.547242013424-0.869732289983j)*x[2]**o + ((-0.15017462271+0.752943604802j))*x[2]
+            ref[(2, 0, 3, 0)]+=(0.547242013424-0.869732289983j)*x_ref[2]**o + ((-0.15017462271+0.752943604802j))*x_ref[2]
+            arg[(2, 0, 3, 1)]+=(0.719606400953+0.482189654808j)*x[2]**o + ((-0.88890273991-0.754799413741j))*x[2]
+            ref[(2, 0, 3, 1)]+=(0.719606400953+0.482189654808j)*x_ref[2]**o + ((-0.88890273991-0.754799413741j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.452847276441-0.0961997988272j)*x[2]**o + ((-0.927196232317+0.390501515998j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.452847276441-0.0961997988272j)*x_ref[2]**o + ((-0.927196232317+0.390501515998j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.697817472916+0.0701443818484j)*x[2]**o + ((-0.685129017868-0.711359760466j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.697817472916+0.0701443818484j)*x_ref[2]**o + ((-0.685129017868-0.711359760466j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.0012890277993-0.233847543194j)*x[2]**o + ((-0.0708940913532+0.638748666782j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.0012890277993-0.233847543194j)*x_ref[2]**o + ((-0.0708940913532+0.638748666782j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.128611688005-0.362987113772j)*x[2]**o + ((-0.790628073732-0.782021949052j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.128611688005-0.362987113772j)*x_ref[2]**o + ((-0.790628073732-0.782021949052j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(0.0272631122983+0.0720557204073j)*x[2]**o + ((-0.688115986694+0.292169942244j))*x[2]
+            ref[(2, 1, 2, 0)]+=(0.0272631122983+0.0720557204073j)*x_ref[2]**o + ((-0.688115986694+0.292169942244j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.837721597229-0.981881011185j)*x[2]**o + ((-0.105833679759+0.683702710898j))*x[2]
+            ref[(2, 1, 2, 1)]+=(0.837721597229-0.981881011185j)*x_ref[2]**o + ((-0.105833679759+0.683702710898j))*x_ref[2]
+            arg[(2, 1, 3, 0)]+=(0.29051945691-0.578591183943j)*x[2]**o + ((-0.968805343584-0.258074595228j))*x[2]
+            ref[(2, 1, 3, 0)]+=(0.29051945691-0.578591183943j)*x_ref[2]**o + ((-0.968805343584-0.258074595228j))*x_ref[2]
+            arg[(2, 1, 3, 1)]+=(0.0677296744482+0.0539776218098j)*x[2]**o + ((-0.779692297097-0.624339978505j))*x[2]
+            ref[(2, 1, 3, 1)]+=(0.0677296744482+0.0539776218098j)*x_ref[2]**o + ((-0.779692297097-0.624339978505j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.314840556491-0.0858936665436j)*x[2]**o + ((-0.594139941085+0.943949643492j))*x[2]
+            ref[(2, 2, 0, 0)]+=(0.314840556491-0.0858936665436j)*x_ref[2]**o + ((-0.594139941085+0.943949643492j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.102549183414-0.613122109473j)*x[2]**o + ((-0.0225359753269+0.206278942279j))*x[2]
+            ref[(2, 2, 0, 1)]+=(0.102549183414-0.613122109473j)*x_ref[2]**o + ((-0.0225359753269+0.206278942279j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.944702179131+0.685844607873j)*x[2]**o + ((0.568153756921-0.586985902461j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.944702179131+0.685844607873j)*x_ref[2]**o + ((0.568153756921-0.586985902461j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.925620903394+0.721536497387j)*x[2]**o + ((0.399649489368+0.0449703850484j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.925620903394+0.721536497387j)*x_ref[2]**o + ((0.399649489368+0.0449703850484j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(0.869221743938-0.363267213393j)*x[2]**o + ((0.496898797215-0.128626248935j))*x[2]
+            ref[(2, 2, 2, 0)]+=(0.869221743938-0.363267213393j)*x_ref[2]**o + ((0.496898797215-0.128626248935j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(-0.0218746125444-0.124809560454j)*x[2]**o + ((-0.452358031111+0.514712849284j))*x[2]
+            ref[(2, 2, 2, 1)]+=(-0.0218746125444-0.124809560454j)*x_ref[2]**o + ((-0.452358031111+0.514712849284j))*x_ref[2]
+            arg[(2, 2, 3, 0)]+=(0.223304906994-0.0523278391377j)*x[2]**o + ((-0.211907722163+0.944759820925j))*x[2]
+            ref[(2, 2, 3, 0)]+=(0.223304906994-0.0523278391377j)*x_ref[2]**o + ((-0.211907722163+0.944759820925j))*x_ref[2]
+            arg[(2, 2, 3, 1)]+=(0.874890753085-0.268389438443j)*x[2]**o + ((-0.433929398675+0.764734965871j))*x[2]
+            ref[(2, 2, 3, 1)]+=(0.874890753085-0.268389438443j)*x_ref[2]**o + ((-0.433929398675+0.764734965871j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.806387990133-0.284036500784j)*x[2]**o + ((-0.0554431555938+0.441159907827j))*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.806387990133-0.284036500784j)*x_ref[2]**o + ((-0.0554431555938+0.441159907827j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.795648379505-0.48093077512j)*x[2]**o + ((-0.0172578808049-0.316786423354j))*x[2]
+            ref[(3, 0, 0, 1)]+=(0.795648379505-0.48093077512j)*x_ref[2]**o + ((-0.0172578808049-0.316786423354j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.838253188019+0.169985675633j)*x[2]**o + ((0.581930411005+0.106378620249j))*x[2]
+            ref[(3, 0, 1, 0)]+=(0.838253188019+0.169985675633j)*x_ref[2]**o + ((0.581930411005+0.106378620249j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.57034230689+0.519536927246j)*x[2]**o + ((0.741090098244+0.893762809721j))*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.57034230689+0.519536927246j)*x_ref[2]**o + ((0.741090098244+0.893762809721j))*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(0.23486153609-0.658386489092j)*x[2]**o + ((-0.846918742921-0.0177257256734j))*x[2]
+            ref[(3, 0, 2, 0)]+=(0.23486153609-0.658386489092j)*x_ref[2]**o + ((-0.846918742921-0.0177257256734j))*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.107741886821+0.960339042222j)*x[2]**o + ((-0.0624592370668-0.438100040383j))*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.107741886821+0.960339042222j)*x_ref[2]**o + ((-0.0624592370668-0.438100040383j))*x_ref[2]
+            arg[(3, 0, 3, 0)]+=(0.717637715272-0.683937770472j)*x[2]**o + ((-0.459091438363-0.109866654721j))*x[2]
+            ref[(3, 0, 3, 0)]+=(0.717637715272-0.683937770472j)*x_ref[2]**o + ((-0.459091438363-0.109866654721j))*x_ref[2]
+            arg[(3, 0, 3, 1)]+=(0.811167116952-0.749109009947j)*x[2]**o + ((0.530220648483-0.156537866544j))*x[2]
+            ref[(3, 0, 3, 1)]+=(0.811167116952-0.749109009947j)*x_ref[2]**o + ((0.530220648483-0.156537866544j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.777298309832-0.68517437081j)*x[2]**o + ((-0.208440709002-0.857952027103j))*x[2]
+            ref[(3, 1, 0, 0)]+=(0.777298309832-0.68517437081j)*x_ref[2]**o + ((-0.208440709002-0.857952027103j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.0119061277981+0.587925606734j)*x[2]**o + ((-0.292694483741-0.56870306766j))*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.0119061277981+0.587925606734j)*x_ref[2]**o + ((-0.292694483741-0.56870306766j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.20456826337+0.163201298617j)*x[2]**o + ((0.946346910055+0.342373550418j))*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.20456826337+0.163201298617j)*x_ref[2]**o + ((0.946346910055+0.342373550418j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.108243367996+0.281684198506j)*x[2]**o + ((0.949127676176+0.419628106403j))*x[2]
+            ref[(3, 1, 1, 1)]+=(0.108243367996+0.281684198506j)*x_ref[2]**o + ((0.949127676176+0.419628106403j))*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(-0.703845987023-0.882360601152j)*x[2]**o + ((0.248846661578+0.486476667823j))*x[2]
+            ref[(3, 1, 2, 0)]+=(-0.703845987023-0.882360601152j)*x_ref[2]**o + ((0.248846661578+0.486476667823j))*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(0.232397518142-0.12644753743j)*x[2]**o + ((0.988470269173+0.0384933470595j))*x[2]
+            ref[(3, 1, 2, 1)]+=(0.232397518142-0.12644753743j)*x_ref[2]**o + ((0.988470269173+0.0384933470595j))*x_ref[2]
+            arg[(3, 1, 3, 0)]+=(-0.574758827068+0.0933320051357j)*x[2]**o + ((-0.367614373256+0.204164509406j))*x[2]
+            ref[(3, 1, 3, 0)]+=(-0.574758827068+0.0933320051357j)*x_ref[2]**o + ((-0.367614373256+0.204164509406j))*x_ref[2]
+            arg[(3, 1, 3, 1)]+=(0.360959894132+0.985451900847j)*x[2]**o + ((0.336942007691+0.468839972962j))*x[2]
+            ref[(3, 1, 3, 1)]+=(0.360959894132+0.985451900847j)*x_ref[2]**o + ((0.336942007691+0.468839972962j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(0.263907971871-0.834598781696j)*x[2]**o + ((0.767567437597+0.656108407015j))*x[2]
+            ref[(3, 2, 0, 0)]+=(0.263907971871-0.834598781696j)*x_ref[2]**o + ((0.767567437597+0.656108407015j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(0.13979542763+0.836484978134j)*x[2]**o + ((-0.903981165025-0.438361279857j))*x[2]
+            ref[(3, 2, 0, 1)]+=(0.13979542763+0.836484978134j)*x_ref[2]**o + ((-0.903981165025-0.438361279857j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.200087011575+0.328501507388j)*x[2]**o + ((-0.704266610077-0.86418777642j))*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.200087011575+0.328501507388j)*x_ref[2]**o + ((-0.704266610077-0.86418777642j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.634670636821-0.949372334442j)*x[2]**o + ((0.438965361955+0.799827069357j))*x[2]
+            ref[(3, 2, 1, 1)]+=(0.634670636821-0.949372334442j)*x_ref[2]**o + ((0.438965361955+0.799827069357j))*x_ref[2]
+            arg[(3, 2, 2, 0)]+=(0.295407473457-0.504383063381j)*x[2]**o + ((0.208099388841-0.0980739345922j))*x[2]
+            ref[(3, 2, 2, 0)]+=(0.295407473457-0.504383063381j)*x_ref[2]**o + ((0.208099388841-0.0980739345922j))*x_ref[2]
+            arg[(3, 2, 2, 1)]+=(0.813895228968+0.639578436754j)*x[2]**o + ((0.837597355674-0.53664698257j))*x[2]
+            ref[(3, 2, 2, 1)]+=(0.813895228968+0.639578436754j)*x_ref[2]**o + ((0.837597355674-0.53664698257j))*x_ref[2]
+            arg[(3, 2, 3, 0)]+=(0.752559176624-0.378459300794j)*x[2]**o + ((-0.859546133678-0.163961057087j))*x[2]
+            ref[(3, 2, 3, 0)]+=(0.752559176624-0.378459300794j)*x_ref[2]**o + ((-0.859546133678-0.163961057087j))*x_ref[2]
+            arg[(3, 2, 3, 1)]+=(-0.66642609243+0.114784820509j)*x[2]**o + ((-0.453997367001-0.131526393578j))*x[2]
+            ref[(3, 2, 3, 1)]+=(-0.66642609243+0.114784820509j)*x_ref[2]**o + ((-0.453997367001-0.131526393578j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.16835891081-0.929141179073j)*x[0] + ((0.776579311889+0.0439262723291j))*x[1]
+        ref=(-0.16835891081-0.929141179073j)*x_ref[0] + ((0.776579311889+0.0439262723291j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.229169794019+0.698866519728j))*x[2]
+            ref+=((-0.229169794019+0.698866519728j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(0.811721758484-0.904742893686j)*x[0] + ((0.083484228548+0.492737305224j))*x[1]
+        ref[(0,)]=(0.811721758484-0.904742893686j)*x_ref[0] + ((0.083484228548+0.492737305224j))*x_ref[1]
+        arg[(1,)]=(0.11170132314+0.612280097033j)*x[0] + ((-0.584252402599+0.476368606705j))*x[1]
+        ref[(1,)]=(0.11170132314+0.612280097033j)*x_ref[0] + ((-0.584252402599+0.476368606705j))*x_ref[1]
+        arg[(2,)]=(-0.634238528994-0.212424421364j)*x[0] + ((0.00809976721191-0.551823542801j))*x[1]
+        ref[(2,)]=(-0.634238528994-0.212424421364j)*x_ref[0] + ((0.00809976721191-0.551823542801j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.450990902346+0.51159107014j)*x[2]
+            ref[(0,)]+=(0.450990902346+0.51159107014j)*x_ref[2]
+            arg[(1,)]+=(-0.0305338815329-0.712081800001j)*x[2]
+            ref[(1,)]+=(-0.0305338815329-0.712081800001j)*x_ref[2]
+            arg[(2,)]+=(-0.182552160453-0.741566004281j)*x[2]
+            ref[(2,)]+=(-0.182552160453-0.741566004281j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(0.923867632172+0.644111100592j)*x[0] + ((-0.5957283087-0.253637558035j))*x[1]
+        ref[(0, 0)]=(0.923867632172+0.644111100592j)*x_ref[0] + ((-0.5957283087-0.253637558035j))*x_ref[1]
+        arg[(0, 1)]=(-0.998400586364+0.21565734616j)*x[0] + ((0.545847687395+0.404879903144j))*x[1]
+        ref[(0, 1)]=(-0.998400586364+0.21565734616j)*x_ref[0] + ((0.545847687395+0.404879903144j))*x_ref[1]
+        arg[(0, 2)]=(0.544156110837-0.639913652868j)*x[0] + ((-0.909419433229+0.368152926259j))*x[1]
+        ref[(0, 2)]=(0.544156110837-0.639913652868j)*x_ref[0] + ((-0.909419433229+0.368152926259j))*x_ref[1]
+        arg[(1, 0)]=(0.940742516485+0.305803100519j)*x[0] + ((0.799894572992-0.836087932264j))*x[1]
+        ref[(1, 0)]=(0.940742516485+0.305803100519j)*x_ref[0] + ((0.799894572992-0.836087932264j))*x_ref[1]
+        arg[(1, 1)]=(0.954854745204+0.0605755543341j)*x[0] + ((-0.200244892335-0.656738035093j))*x[1]
+        ref[(1, 1)]=(0.954854745204+0.0605755543341j)*x_ref[0] + ((-0.200244892335-0.656738035093j))*x_ref[1]
+        arg[(1, 2)]=(0.813911466637+0.774875065783j)*x[0] + ((-0.110850181936+0.40380853445j))*x[1]
+        ref[(1, 2)]=(0.813911466637+0.774875065783j)*x_ref[0] + ((-0.110850181936+0.40380853445j))*x_ref[1]
+        arg[(2, 0)]=(0.0577906125001-0.474994322359j)*x[0] + ((0.607113474437-0.481388439895j))*x[1]
+        ref[(2, 0)]=(0.0577906125001-0.474994322359j)*x_ref[0] + ((0.607113474437-0.481388439895j))*x_ref[1]
+        arg[(2, 1)]=(0.73281757115-0.593340734457j)*x[0] + ((-0.200268494436-0.408193670096j))*x[1]
+        ref[(2, 1)]=(0.73281757115-0.593340734457j)*x_ref[0] + ((-0.200268494436-0.408193670096j))*x_ref[1]
+        arg[(2, 2)]=(-0.716078455992+0.0719876359267j)*x[0] + ((0.367447670484+0.457538231174j))*x[1]
+        ref[(2, 2)]=(-0.716078455992+0.0719876359267j)*x_ref[0] + ((0.367447670484+0.457538231174j))*x_ref[1]
+        arg[(3, 0)]=(0.23109547493-0.566494463316j)*x[0] + ((0.0823313245089+0.0862201999787j))*x[1]
+        ref[(3, 0)]=(0.23109547493-0.566494463316j)*x_ref[0] + ((0.0823313245089+0.0862201999787j))*x_ref[1]
+        arg[(3, 1)]=(0.362716606157+0.868738589049j)*x[0] + ((0.106649410181+0.711617609751j))*x[1]
+        ref[(3, 1)]=(0.362716606157+0.868738589049j)*x_ref[0] + ((0.106649410181+0.711617609751j))*x_ref[1]
+        arg[(3, 2)]=(-0.53199740054-0.40177621375j)*x[0] + ((0.924539116346-0.269863575912j))*x[1]
+        ref[(3, 2)]=(-0.53199740054-0.40177621375j)*x_ref[0] + ((0.924539116346-0.269863575912j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.843258788363-0.289088319123j)*x[2]
+            ref[(0, 0)]+=(-0.843258788363-0.289088319123j)*x_ref[2]
+            arg[(0, 1)]+=(-0.0505803281308+0.578344122227j)*x[2]
+            ref[(0, 1)]+=(-0.0505803281308+0.578344122227j)*x_ref[2]
+            arg[(0, 2)]+=(-0.316965586588-0.546775031494j)*x[2]
+            ref[(0, 2)]+=(-0.316965586588-0.546775031494j)*x_ref[2]
+            arg[(1, 0)]+=(0.785138350808-0.813539046359j)*x[2]
+            ref[(1, 0)]+=(0.785138350808-0.813539046359j)*x_ref[2]
+            arg[(1, 1)]+=(-0.390716499954+0.23079365548j)*x[2]
+            ref[(1, 1)]+=(-0.390716499954+0.23079365548j)*x_ref[2]
+            arg[(1, 2)]+=(0.831965410793-0.161377860575j)*x[2]
+            ref[(1, 2)]+=(0.831965410793-0.161377860575j)*x_ref[2]
+            arg[(2, 0)]+=(0.175892234385-0.759442522694j)*x[2]
+            ref[(2, 0)]+=(0.175892234385-0.759442522694j)*x_ref[2]
+            arg[(2, 1)]+=(-0.190160531148+0.820603004346j)*x[2]
+            ref[(2, 1)]+=(-0.190160531148+0.820603004346j)*x_ref[2]
+            arg[(2, 2)]+=(0.711536514003+0.0610730294241j)*x[2]
+            ref[(2, 2)]+=(0.711536514003+0.0610730294241j)*x_ref[2]
+            arg[(3, 0)]+=(-0.430544922656+0.466189106584j)*x[2]
+            ref[(3, 0)]+=(-0.430544922656+0.466189106584j)*x_ref[2]
+            arg[(3, 1)]+=(0.975368613548+0.451586516875j)*x[2]
+            ref[(3, 1)]+=(0.975368613548+0.451586516875j)*x_ref[2]
+            arg[(3, 2)]+=(0.908729123953+0.763357179314j)*x[2]
+            ref[(3, 2)]+=(0.908729123953+0.763357179314j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4),w_ref)
+        arg[(0, 0, 0)]=(0.142757062311+0.554643288674j)*x[0] + ((-0.427848912073-0.840891715186j))*x[1]
+        ref[(0, 0, 0)]=(0.142757062311+0.554643288674j)*x_ref[0] + ((-0.427848912073-0.840891715186j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.897484814773+0.115287086877j)*x[0] + ((-0.627058140992-0.828788584934j))*x[1]
+        ref[(0, 0, 1)]=(0.897484814773+0.115287086877j)*x_ref[0] + ((-0.627058140992-0.828788584934j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.493020084765-0.971646048017j)*x[0] + ((-0.998226839783+0.466181515586j))*x[1]
+        ref[(0, 0, 2)]=(0.493020084765-0.971646048017j)*x_ref[0] + ((-0.998226839783+0.466181515586j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.7833433277+0.556635058622j)*x[0] + ((0.00248011832903-0.123324314524j))*x[1]
+        ref[(0, 0, 3)]=(0.7833433277+0.556635058622j)*x_ref[0] + ((0.00248011832903-0.123324314524j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.205605212147+0.836628220315j)*x[0] + ((0.651418699941-0.808344560056j))*x[1]
+        ref[(0, 1, 0)]=(0.205605212147+0.836628220315j)*x_ref[0] + ((0.651418699941-0.808344560056j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.0630894676135-0.184422399026j)*x[0] + ((-0.607352002291-0.970128984283j))*x[1]
+        ref[(0, 1, 1)]=(0.0630894676135-0.184422399026j)*x_ref[0] + ((-0.607352002291-0.970128984283j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.763842562882-0.157497551617j)*x[0] + ((-0.439975459814-0.00796777402488j))*x[1]
+        ref[(0, 1, 2)]=(0.763842562882-0.157497551617j)*x_ref[0] + ((-0.439975459814-0.00796777402488j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.44466273656+0.597770907171j)*x[0] + ((-0.744347063919-0.594476732021j))*x[1]
+        ref[(0, 1, 3)]=(0.44466273656+0.597770907171j)*x_ref[0] + ((-0.744347063919-0.594476732021j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.163155003845-0.839226463976j)*x[0] + ((-0.922572312562-0.484623899889j))*x[1]
+        ref[(0, 2, 0)]=(-0.163155003845-0.839226463976j)*x_ref[0] + ((-0.922572312562-0.484623899889j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.530158117888+0.822690220287j)*x[0] + ((-0.639619086473-0.190812256428j))*x[1]
+        ref[(0, 2, 1)]=(0.530158117888+0.822690220287j)*x_ref[0] + ((-0.639619086473-0.190812256428j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.94700521919-0.847479969163j)*x[0] + ((-0.287134454938-0.712246261697j))*x[1]
+        ref[(0, 2, 2)]=(0.94700521919-0.847479969163j)*x_ref[0] + ((-0.287134454938-0.712246261697j))*x_ref[1]
+        arg[(0, 2, 3)]=(-0.916472038766+0.897171083775j)*x[0] + ((0.489996014754-0.294072281137j))*x[1]
+        ref[(0, 2, 3)]=(-0.916472038766+0.897171083775j)*x_ref[0] + ((0.489996014754-0.294072281137j))*x_ref[1]
+        arg[(0, 3, 0)]=(0.579383373893-0.827761487141j)*x[0] + ((0.0758592199662-0.303023594747j))*x[1]
+        ref[(0, 3, 0)]=(0.579383373893-0.827761487141j)*x_ref[0] + ((0.0758592199662-0.303023594747j))*x_ref[1]
+        arg[(0, 3, 1)]=(0.922742005422-0.411972228647j)*x[0] + ((-0.713746833377-0.275268047204j))*x[1]
+        ref[(0, 3, 1)]=(0.922742005422-0.411972228647j)*x_ref[0] + ((-0.713746833377-0.275268047204j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.851032696849+0.33473780813j)*x[0] + ((-0.503988818382+0.896527305715j))*x[1]
+        ref[(0, 3, 2)]=(0.851032696849+0.33473780813j)*x_ref[0] + ((-0.503988818382+0.896527305715j))*x_ref[1]
+        arg[(0, 3, 3)]=(-0.391423427537+0.708292307183j)*x[0] + ((0.831699878804-0.108091159756j))*x[1]
+        ref[(0, 3, 3)]=(-0.391423427537+0.708292307183j)*x_ref[0] + ((0.831699878804-0.108091159756j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.147449932414-0.901195941338j)*x[0] + ((-0.386608595229-0.583118096871j))*x[1]
+        ref[(1, 0, 0)]=(0.147449932414-0.901195941338j)*x_ref[0] + ((-0.386608595229-0.583118096871j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.258228223648+0.0238385566345j)*x[0] + ((-0.863859102542+0.759657928052j))*x[1]
+        ref[(1, 0, 1)]=(0.258228223648+0.0238385566345j)*x_ref[0] + ((-0.863859102542+0.759657928052j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.774308789833+0.956021169257j)*x[0] + ((-0.00721080667872-0.406043986051j))*x[1]
+        ref[(1, 0, 2)]=(-0.774308789833+0.956021169257j)*x_ref[0] + ((-0.00721080667872-0.406043986051j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.481214450805-0.0253781088296j)*x[0] + ((-0.152474472057+0.554798214997j))*x[1]
+        ref[(1, 0, 3)]=(0.481214450805-0.0253781088296j)*x_ref[0] + ((-0.152474472057+0.554798214997j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.58007971273-0.280212670325j)*x[0] + ((-0.212946750003-0.130922717633j))*x[1]
+        ref[(1, 1, 0)]=(-0.58007971273-0.280212670325j)*x_ref[0] + ((-0.212946750003-0.130922717633j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.588258844265+0.166742574279j)*x[0] + ((0.971017736185-0.212961385767j))*x[1]
+        ref[(1, 1, 1)]=(-0.588258844265+0.166742574279j)*x_ref[0] + ((0.971017736185-0.212961385767j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.758333797625-0.524994702302j)*x[0] + ((-0.63935805921-0.0838992542059j))*x[1]
+        ref[(1, 1, 2)]=(-0.758333797625-0.524994702302j)*x_ref[0] + ((-0.63935805921-0.0838992542059j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.227192044955+0.522752843675j)*x[0] + ((0.943312483626-0.55609698604j))*x[1]
+        ref[(1, 1, 3)]=(-0.227192044955+0.522752843675j)*x_ref[0] + ((0.943312483626-0.55609698604j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.273049213193+0.66869599735j)*x[0] + ((-0.726349823583-0.495357140289j))*x[1]
+        ref[(1, 2, 0)]=(-0.273049213193+0.66869599735j)*x_ref[0] + ((-0.726349823583-0.495357140289j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.363853776996+0.158406018085j)*x[0] + ((0.854293745986+0.408169940045j))*x[1]
+        ref[(1, 2, 1)]=(-0.363853776996+0.158406018085j)*x_ref[0] + ((0.854293745986+0.408169940045j))*x_ref[1]
+        arg[(1, 2, 2)]=(-0.958318428077+0.198358634954j)*x[0] + ((0.361712035956-0.975864482014j))*x[1]
+        ref[(1, 2, 2)]=(-0.958318428077+0.198358634954j)*x_ref[0] + ((0.361712035956-0.975864482014j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.962838621333-0.0723468307431j)*x[0] + ((-0.0403357050154-0.270970651982j))*x[1]
+        ref[(1, 2, 3)]=(-0.962838621333-0.0723468307431j)*x_ref[0] + ((-0.0403357050154-0.270970651982j))*x_ref[1]
+        arg[(1, 3, 0)]=(-0.0343278188962+0.496054976855j)*x[0] + ((0.255439835371+0.386568786581j))*x[1]
+        ref[(1, 3, 0)]=(-0.0343278188962+0.496054976855j)*x_ref[0] + ((0.255439835371+0.386568786581j))*x_ref[1]
+        arg[(1, 3, 1)]=(-0.731579883294+0.857086262509j)*x[0] + ((-0.263221371619+0.872124479733j))*x[1]
+        ref[(1, 3, 1)]=(-0.731579883294+0.857086262509j)*x_ref[0] + ((-0.263221371619+0.872124479733j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.974638253181-0.541323661534j)*x[0] + ((0.726193921982-0.961152668279j))*x[1]
+        ref[(1, 3, 2)]=(-0.974638253181-0.541323661534j)*x_ref[0] + ((0.726193921982-0.961152668279j))*x_ref[1]
+        arg[(1, 3, 3)]=(-0.294818486802-0.590031733029j)*x[0] + ((0.359932983254-0.80768815744j))*x[1]
+        ref[(1, 3, 3)]=(-0.294818486802-0.590031733029j)*x_ref[0] + ((0.359932983254-0.80768815744j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.287246886578+0.833765637907j)*x[0] + ((0.654080373054-0.792774082085j))*x[1]
+        ref[(2, 0, 0)]=(0.287246886578+0.833765637907j)*x_ref[0] + ((0.654080373054-0.792774082085j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.53018142234+0.99442542231j)*x[0] + ((0.412310290314+0.474871595179j))*x[1]
+        ref[(2, 0, 1)]=(-0.53018142234+0.99442542231j)*x_ref[0] + ((0.412310290314+0.474871595179j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.688345986974-0.945885654227j)*x[0] + ((-0.576708964986+0.272823142859j))*x[1]
+        ref[(2, 0, 2)]=(-0.688345986974-0.945885654227j)*x_ref[0] + ((-0.576708964986+0.272823142859j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.0296138875289-0.212931197359j)*x[0] + ((0.222378789366-0.793672341065j))*x[1]
+        ref[(2, 0, 3)]=(-0.0296138875289-0.212931197359j)*x_ref[0] + ((0.222378789366-0.793672341065j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.249571755777-0.870663116038j)*x[0] + ((-0.915665926117-0.714694696229j))*x[1]
+        ref[(2, 1, 0)]=(0.249571755777-0.870663116038j)*x_ref[0] + ((-0.915665926117-0.714694696229j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.93006509708-0.0739008065225j)*x[0] + ((-0.113927183992+0.393879489113j))*x[1]
+        ref[(2, 1, 1)]=(0.93006509708-0.0739008065225j)*x_ref[0] + ((-0.113927183992+0.393879489113j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.658122805581+0.163321573393j)*x[0] + ((0.63629229977-0.813137697831j))*x[1]
+        ref[(2, 1, 2)]=(0.658122805581+0.163321573393j)*x_ref[0] + ((0.63629229977-0.813137697831j))*x_ref[1]
+        arg[(2, 1, 3)]=(-0.377746799375-0.354941453645j)*x[0] + ((0.844324255747+0.801013080788j))*x[1]
+        ref[(2, 1, 3)]=(-0.377746799375-0.354941453645j)*x_ref[0] + ((0.844324255747+0.801013080788j))*x_ref[1]
+        arg[(2, 2, 0)]=(0.391865720899-0.894424336477j)*x[0] + ((0.809209465444+0.203627545669j))*x[1]
+        ref[(2, 2, 0)]=(0.391865720899-0.894424336477j)*x_ref[0] + ((0.809209465444+0.203627545669j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.916917354581+0.0332834814886j)*x[0] + ((0.799290634819-0.683703452284j))*x[1]
+        ref[(2, 2, 1)]=(0.916917354581+0.0332834814886j)*x_ref[0] + ((0.799290634819-0.683703452284j))*x_ref[1]
+        arg[(2, 2, 2)]=(-0.441772862702+0.663854034275j)*x[0] + ((-0.0718650410145+0.495244923901j))*x[1]
+        ref[(2, 2, 2)]=(-0.441772862702+0.663854034275j)*x_ref[0] + ((-0.0718650410145+0.495244923901j))*x_ref[1]
+        arg[(2, 2, 3)]=(-0.692642475529+0.958936991228j)*x[0] + ((-0.0148719672074-0.813841775693j))*x[1]
+        ref[(2, 2, 3)]=(-0.692642475529+0.958936991228j)*x_ref[0] + ((-0.0148719672074-0.813841775693j))*x_ref[1]
+        arg[(2, 3, 0)]=(0.476246559489-0.292698418632j)*x[0] + ((0.24955083342+0.773629826618j))*x[1]
+        ref[(2, 3, 0)]=(0.476246559489-0.292698418632j)*x_ref[0] + ((0.24955083342+0.773629826618j))*x_ref[1]
+        arg[(2, 3, 1)]=(0.520658786183-0.0971428559807j)*x[0] + ((-0.319840276291-0.960056689935j))*x[1]
+        ref[(2, 3, 1)]=(0.520658786183-0.0971428559807j)*x_ref[0] + ((-0.319840276291-0.960056689935j))*x_ref[1]
+        arg[(2, 3, 2)]=(0.332688109833+0.917482767024j)*x[0] + ((0.916771124658-0.160653678233j))*x[1]
+        ref[(2, 3, 2)]=(0.332688109833+0.917482767024j)*x_ref[0] + ((0.916771124658-0.160653678233j))*x_ref[1]
+        arg[(2, 3, 3)]=(-0.203918032465+0.716192320761j)*x[0] + ((-0.566318689113+0.831005225712j))*x[1]
+        ref[(2, 3, 3)]=(-0.203918032465+0.716192320761j)*x_ref[0] + ((-0.566318689113+0.831005225712j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.0441266511011-0.67068627517j)*x[2]
+            ref[(0, 0, 0)]+=(-0.0441266511011-0.67068627517j)*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.24116664129+0.430753678171j)*x[2]
+            ref[(0, 0, 1)]+=(-0.24116664129+0.430753678171j)*x_ref[2]
+            arg[(0, 0, 2)]+=(0.795536327659-0.355390546904j)*x[2]
+            ref[(0, 0, 2)]+=(0.795536327659-0.355390546904j)*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.539204249843+0.310502775595j)*x[2]
+            ref[(0, 0, 3)]+=(-0.539204249843+0.310502775595j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.266550612337+0.802975269246j)*x[2]
+            ref[(0, 1, 0)]+=(-0.266550612337+0.802975269246j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.729463937279+0.308828563577j)*x[2]
+            ref[(0, 1, 1)]+=(-0.729463937279+0.308828563577j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.627556473443-0.52737416941j)*x[2]
+            ref[(0, 1, 2)]+=(0.627556473443-0.52737416941j)*x_ref[2]
+            arg[(0, 1, 3)]+=(0.126944175863-0.168684727444j)*x[2]
+            ref[(0, 1, 3)]+=(0.126944175863-0.168684727444j)*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.55756669041+0.219196176492j)*x[2]
+            ref[(0, 2, 0)]+=(-0.55756669041+0.219196176492j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.263352394666-0.508820360181j)*x[2]
+            ref[(0, 2, 1)]+=(0.263352394666-0.508820360181j)*x_ref[2]
+            arg[(0, 2, 2)]+=(0.790816604011+0.802141984991j)*x[2]
+            ref[(0, 2, 2)]+=(0.790816604011+0.802141984991j)*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.133094978652+0.791730582794j)*x[2]
+            ref[(0, 2, 3)]+=(-0.133094978652+0.791730582794j)*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.402420672842+0.848834439718j)*x[2]
+            ref[(0, 3, 0)]+=(-0.402420672842+0.848834439718j)*x_ref[2]
+            arg[(0, 3, 1)]+=(-0.196771271952-0.32534978469j)*x[2]
+            ref[(0, 3, 1)]+=(-0.196771271952-0.32534978469j)*x_ref[2]
+            arg[(0, 3, 2)]+=(0.458194844092+0.360603590802j)*x[2]
+            ref[(0, 3, 2)]+=(0.458194844092+0.360603590802j)*x_ref[2]
+            arg[(0, 3, 3)]+=(-0.952512062691-0.231292352107j)*x[2]
+            ref[(0, 3, 3)]+=(-0.952512062691-0.231292352107j)*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.988206481388+0.0998590551517j)*x[2]
+            ref[(1, 0, 0)]+=(-0.988206481388+0.0998590551517j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.440962972534+0.775728565917j)*x[2]
+            ref[(1, 0, 1)]+=(0.440962972534+0.775728565917j)*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.948279343694+0.214486938468j)*x[2]
+            ref[(1, 0, 2)]+=(-0.948279343694+0.214486938468j)*x_ref[2]
+            arg[(1, 0, 3)]+=(0.5554576098+0.975868297546j)*x[2]
+            ref[(1, 0, 3)]+=(0.5554576098+0.975868297546j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.603692368198+0.0738022272492j)*x[2]
+            ref[(1, 1, 0)]+=(-0.603692368198+0.0738022272492j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.314450096685-0.46314742797j)*x[2]
+            ref[(1, 1, 1)]+=(0.314450096685-0.46314742797j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.0172145530719-0.988509274921j)*x[2]
+            ref[(1, 1, 2)]+=(0.0172145530719-0.988509274921j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.0582303741338-0.715639492127j)*x[2]
+            ref[(1, 1, 3)]+=(0.0582303741338-0.715639492127j)*x_ref[2]
+            arg[(1, 2, 0)]+=(0.492130991956+0.0946540616289j)*x[2]
+            ref[(1, 2, 0)]+=(0.492130991956+0.0946540616289j)*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.475534838048-0.286652272266j)*x[2]
+            ref[(1, 2, 1)]+=(-0.475534838048-0.286652272266j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.370762807692+0.49928568465j)*x[2]
+            ref[(1, 2, 2)]+=(0.370762807692+0.49928568465j)*x_ref[2]
+            arg[(1, 2, 3)]+=(0.303400167486-0.132350917206j)*x[2]
+            ref[(1, 2, 3)]+=(0.303400167486-0.132350917206j)*x_ref[2]
+            arg[(1, 3, 0)]+=(-0.80728208341-0.943308335067j)*x[2]
+            ref[(1, 3, 0)]+=(-0.80728208341-0.943308335067j)*x_ref[2]
+            arg[(1, 3, 1)]+=(-0.970700752951+0.856558512042j)*x[2]
+            ref[(1, 3, 1)]+=(-0.970700752951+0.856558512042j)*x_ref[2]
+            arg[(1, 3, 2)]+=(0.301842050427-0.0426587843971j)*x[2]
+            ref[(1, 3, 2)]+=(0.301842050427-0.0426587843971j)*x_ref[2]
+            arg[(1, 3, 3)]+=(-0.0204599944027-0.854350005741j)*x[2]
+            ref[(1, 3, 3)]+=(-0.0204599944027-0.854350005741j)*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.189689049255-0.704230041532j)*x[2]
+            ref[(2, 0, 0)]+=(-0.189689049255-0.704230041532j)*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.534631715052-0.623732056547j)*x[2]
+            ref[(2, 0, 1)]+=(-0.534631715052-0.623732056547j)*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.843821811722-0.360040662796j)*x[2]
+            ref[(2, 0, 2)]+=(-0.843821811722-0.360040662796j)*x_ref[2]
+            arg[(2, 0, 3)]+=(-0.100037487391+0.792379396685j)*x[2]
+            ref[(2, 0, 3)]+=(-0.100037487391+0.792379396685j)*x_ref[2]
+            arg[(2, 1, 0)]+=(0.544479530337+0.672452917315j)*x[2]
+            ref[(2, 1, 0)]+=(0.544479530337+0.672452917315j)*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.273199135082+0.754830812805j)*x[2]
+            ref[(2, 1, 1)]+=(-0.273199135082+0.754830812805j)*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.302853242425+0.798270545713j)*x[2]
+            ref[(2, 1, 2)]+=(-0.302853242425+0.798270545713j)*x_ref[2]
+            arg[(2, 1, 3)]+=(0.152922074402+0.522591328355j)*x[2]
+            ref[(2, 1, 3)]+=(0.152922074402+0.522591328355j)*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.329341046491-0.976297759342j)*x[2]
+            ref[(2, 2, 0)]+=(-0.329341046491-0.976297759342j)*x_ref[2]
+            arg[(2, 2, 1)]+=(-0.457808914654-0.982116349196j)*x[2]
+            ref[(2, 2, 1)]+=(-0.457808914654-0.982116349196j)*x_ref[2]
+            arg[(2, 2, 2)]+=(0.923591727113-0.378123716444j)*x[2]
+            ref[(2, 2, 2)]+=(0.923591727113-0.378123716444j)*x_ref[2]
+            arg[(2, 2, 3)]+=(0.163399364925-0.46060454295j)*x[2]
+            ref[(2, 2, 3)]+=(0.163399364925-0.46060454295j)*x_ref[2]
+            arg[(2, 3, 0)]+=(-0.0663410641181-0.354686969363j)*x[2]
+            ref[(2, 3, 0)]+=(-0.0663410641181-0.354686969363j)*x_ref[2]
+            arg[(2, 3, 1)]+=(0.399462476713-0.637754233315j)*x[2]
+            ref[(2, 3, 1)]+=(0.399462476713-0.637754233315j)*x_ref[2]
+            arg[(2, 3, 2)]+=(0.601790498313+0.474204832586j)*x[2]
+            ref[(2, 3, 2)]+=(0.601790498313+0.474204832586j)*x_ref[2]
+            arg[(2, 3, 3)]+=(-0.250838119752-0.670022417138j)*x[2]
+            ref[(2, 3, 3)]+=(-0.250838119752-0.670022417138j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3, 2),w)
+        ref = Data(0,(2, 2, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.195310996678-0.151312294886j)*x[0] + ((0.897006445645-0.629919943588j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.195310996678-0.151312294886j)*x_ref[0] + ((0.897006445645-0.629919943588j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.0719436704666-0.0342862469521j)*x[0] + ((-0.943823509649+0.156847054359j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.0719436704666-0.0342862469521j)*x_ref[0] + ((-0.943823509649+0.156847054359j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.473523194395-0.160048730252j)*x[0] + ((-0.762232998017+0.527640905835j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.473523194395-0.160048730252j)*x_ref[0] + ((-0.762232998017+0.527640905835j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.383331177392-0.69061791904j)*x[0] + ((0.741736376527-0.249089981423j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.383331177392-0.69061791904j)*x_ref[0] + ((0.741736376527-0.249089981423j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.223114844931+0.304048125018j)*x[0] + ((0.784363724415+0.774350704034j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.223114844931+0.304048125018j)*x_ref[0] + ((0.784363724415+0.774350704034j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.576720296816-0.776657330869j)*x[0] + ((-0.718766553874-0.717496593463j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.576720296816-0.776657330869j)*x_ref[0] + ((-0.718766553874-0.717496593463j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.466630067906+0.356977921484j)*x[0] + ((-0.782904934214+0.406340877506j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.466630067906+0.356977921484j)*x_ref[0] + ((-0.782904934214+0.406340877506j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.461359321127+0.138220114969j)*x[0] + ((-0.013852792459-0.376869319765j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.461359321127+0.138220114969j)*x_ref[0] + ((-0.013852792459-0.376869319765j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.0625799082294+0.0464945158128j)*x[0] + ((-0.463622899018-0.483456071141j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.0625799082294+0.0464945158128j)*x_ref[0] + ((-0.463622899018-0.483456071141j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.587525138584+0.945814180214j)*x[0] + ((0.291429647694+0.463207968484j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.587525138584+0.945814180214j)*x_ref[0] + ((0.291429647694+0.463207968484j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.143106338987+0.520109111406j)*x[0] + ((-0.970463594093+0.762914888478j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.143106338987+0.520109111406j)*x_ref[0] + ((-0.970463594093+0.762914888478j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.341547900279-0.925948498526j)*x[0] + ((-0.513525007399-0.815494280945j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.341547900279-0.925948498526j)*x_ref[0] + ((-0.513525007399-0.815494280945j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.826055626468+0.929467577986j)*x[0] + ((0.246687737288+0.57057407462j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.826055626468+0.929467577986j)*x_ref[0] + ((0.246687737288+0.57057407462j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.501253431709-0.797274416179j)*x[0] + ((0.739313204754-0.929476466716j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.501253431709-0.797274416179j)*x_ref[0] + ((0.739313204754-0.929476466716j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.812460292348+0.760725508015j)*x[0] + ((-0.295636049654-0.326357805524j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.812460292348+0.760725508015j)*x_ref[0] + ((-0.295636049654-0.326357805524j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.559326011032-0.596236577551j)*x[0] + ((0.461390687724+0.73495232348j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.559326011032-0.596236577551j)*x_ref[0] + ((0.461390687724+0.73495232348j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.959816676813-0.56585333977j)*x[0] + ((0.382886481569+0.711184548778j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.959816676813-0.56585333977j)*x_ref[0] + ((0.382886481569+0.711184548778j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.78517304736+0.528597683226j)*x[0] + ((0.929966575865+0.978848914366j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.78517304736+0.528597683226j)*x_ref[0] + ((0.929966575865+0.978848914366j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.845386062226+0.185238375731j)*x[0] + ((-0.330228933501-0.928017858174j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.845386062226+0.185238375731j)*x_ref[0] + ((-0.330228933501-0.928017858174j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.977787909157+0.03747816188j)*x[0] + ((-0.470623477222+0.716050284114j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.977787909157+0.03747816188j)*x_ref[0] + ((-0.470623477222+0.716050284114j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.803070541898-0.323924957494j)*x[0] + ((-0.042765498562+0.0821647982096j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.803070541898-0.323924957494j)*x_ref[0] + ((-0.042765498562+0.0821647982096j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.41110843076-0.489598985813j)*x[0] + ((0.522011890304+0.722049078554j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.41110843076-0.489598985813j)*x_ref[0] + ((0.522011890304+0.722049078554j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.0452256976551-0.0958857393711j)*x[0] + ((-0.219100368541+0.717673964214j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.0452256976551-0.0958857393711j)*x_ref[0] + ((-0.219100368541+0.717673964214j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.133165029569+0.168795274432j)*x[0] + ((0.985778241416-0.208352389993j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.133165029569+0.168795274432j)*x_ref[0] + ((0.985778241416-0.208352389993j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.192015655446-0.334634124619j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.192015655446-0.334634124619j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.164969695663+0.539565048917j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.164969695663+0.539565048917j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.442276351626+0.97919721534j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.442276351626+0.97919721534j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.217403596737-0.614660815407j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.217403596737-0.614660815407j)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.262005663026+0.880751947891j)*x[2]
+            ref[(0, 0, 2, 0)]+=(0.262005663026+0.880751947891j)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.23894820938+0.81017231138j)*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.23894820938+0.81017231138j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.757113942306+0.161561028905j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.757113942306+0.161561028905j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.0612412983361+0.976666670569j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.0612412983361+0.976666670569j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.612086334767-0.553290578591j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.612086334767-0.553290578591j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.237303721868-0.395907384545j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.237303721868-0.395907384545j)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.0575807675738-0.916184435064j)*x[2]
+            ref[(0, 1, 2, 0)]+=(0.0575807675738-0.916184435064j)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.530522291039+0.925065252377j)*x[2]
+            ref[(0, 1, 2, 1)]+=(0.530522291039+0.925065252377j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.740190577229+0.129239224905j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.740190577229+0.129239224905j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.701596217027+0.879291047148j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.701596217027+0.879291047148j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.41442054012-0.257576336009j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.41442054012-0.257576336009j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.900302749209+0.918779810764j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.900302749209+0.918779810764j)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.54000046329+0.998220479079j)*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.54000046329+0.998220479079j)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.373806607235-0.128837947059j)*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.373806607235-0.128837947059j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.852775624824+0.471829348808j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.852775624824+0.471829348808j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.938459914812+0.617950606996j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.938459914812+0.617950606996j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.174570089758-0.0852807725577j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.174570089758-0.0852807725577j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.603589564694-0.473741510776j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.603589564694-0.473741510776j)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.128233330561+0.395059068231j)*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.128233330561+0.395059068231j)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.255876321512+0.644601425588j)*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.255876321512+0.644601425588j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.453237802057+0.0495428370345j)*x[0] + ((-0.149648569235-0.871478461315j))*x[1]
+        ref=(0.453237802057+0.0495428370345j)*x_ref[0] + ((-0.149648569235-0.871478461315j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.632745813471+0.448784476028j))*x[2]
+            ref+=((-0.632745813471+0.448784476028j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.707188711253-0.265701292917j)*x[0] + ((0.743624179223+0.0460964903483j))*x[1]
+        ref[(0,)]=(-0.707188711253-0.265701292917j)*x_ref[0] + ((0.743624179223+0.0460964903483j))*x_ref[1]
+        arg[(1,)]=(-0.729698710766+0.438352147154j)*x[0] + ((-0.0972213739885+0.313042222293j))*x[1]
+        ref[(1,)]=(-0.729698710766+0.438352147154j)*x_ref[0] + ((-0.0972213739885+0.313042222293j))*x_ref[1]
+        arg[(2,)]=(-0.949391639257-0.831409289648j)*x[0] + ((0.855758045591-0.613986207377j))*x[1]
+        ref[(2,)]=(-0.949391639257-0.831409289648j)*x_ref[0] + ((0.855758045591-0.613986207377j))*x_ref[1]
+        arg[(3,)]=(0.3313078969-0.815483228424j)*x[0] + ((0.689509252082+0.00558994941987j))*x[1]
+        ref[(3,)]=(0.3313078969-0.815483228424j)*x_ref[0] + ((0.689509252082+0.00558994941987j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.198334628459-0.664433865188j)*x[2]
+            ref[(0,)]+=(0.198334628459-0.664433865188j)*x_ref[2]
+            arg[(1,)]+=(0.0460478854808-0.740887330866j)*x[2]
+            ref[(1,)]+=(0.0460478854808-0.740887330866j)*x_ref[2]
+            arg[(2,)]+=(-0.188331735836-0.0248168127729j)*x[2]
+            ref[(2,)]+=(-0.188331735836-0.0248168127729j)*x_ref[2]
+            arg[(3,)]+=(-0.957143998804-0.974260641204j)*x[2]
+            ref[(3,)]+=(-0.957143998804-0.974260641204j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(-0.400087854119+0.428824074356j)*x[0] + ((-0.659651946695-0.347777419927j))*x[1]
+        ref[(0, 0)]=(-0.400087854119+0.428824074356j)*x_ref[0] + ((-0.659651946695-0.347777419927j))*x_ref[1]
+        arg[(0, 1)]=(-0.478915423099-0.859242116728j)*x[0] + ((-0.103939198868+0.780393790479j))*x[1]
+        ref[(0, 1)]=(-0.478915423099-0.859242116728j)*x_ref[0] + ((-0.103939198868+0.780393790479j))*x_ref[1]
+        arg[(1, 0)]=(0.344237277367+0.684348188387j)*x[0] + ((-0.510527659104-0.284669174296j))*x[1]
+        ref[(1, 0)]=(0.344237277367+0.684348188387j)*x_ref[0] + ((-0.510527659104-0.284669174296j))*x_ref[1]
+        arg[(1, 1)]=(-0.748808168948-0.171619397931j)*x[0] + ((-0.561150521925-0.115832807805j))*x[1]
+        ref[(1, 1)]=(-0.748808168948-0.171619397931j)*x_ref[0] + ((-0.561150521925-0.115832807805j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.719132012836-0.855306180539j)*x[2]
+            ref[(0, 0)]+=(0.719132012836-0.855306180539j)*x_ref[2]
+            arg[(0, 1)]+=(0.563066838592+0.740234337337j)*x[2]
+            ref[(0, 1)]+=(0.563066838592+0.740234337337j)*x_ref[2]
+            arg[(1, 0)]+=(-0.0164663732209+0.400861360906j)*x[2]
+            ref[(1, 0)]+=(-0.0164663732209+0.400861360906j)*x_ref[2]
+            arg[(1, 1)]+=(0.89995085266-0.589729937869j)*x[2]
+            ref[(1, 1)]+=(0.89995085266-0.589729937869j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 4),w)
+        ref = Data(0,(3, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.496783880056-0.731110923177j)*x[0] + ((-0.548083894273-0.503614927877j))*x[1]
+        ref[(0, 0, 0)]=(-0.496783880056-0.731110923177j)*x_ref[0] + ((-0.548083894273-0.503614927877j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.317797091897-0.110547930594j)*x[0] + ((-0.908238187924+0.335846697578j))*x[1]
+        ref[(0, 0, 1)]=(-0.317797091897-0.110547930594j)*x_ref[0] + ((-0.908238187924+0.335846697578j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.111671580169-0.899491944464j)*x[0] + ((-0.99069999717-0.807033862641j))*x[1]
+        ref[(0, 0, 2)]=(0.111671580169-0.899491944464j)*x_ref[0] + ((-0.99069999717-0.807033862641j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.459236850084+0.152474527166j)*x[0] + ((0.573423829402-0.517809492174j))*x[1]
+        ref[(0, 0, 3)]=(0.459236850084+0.152474527166j)*x_ref[0] + ((0.573423829402-0.517809492174j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.403468427753+0.769289267781j)*x[0] + ((-0.574572572673+0.257495793974j))*x[1]
+        ref[(0, 1, 0)]=(-0.403468427753+0.769289267781j)*x_ref[0] + ((-0.574572572673+0.257495793974j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.628375752508+0.492040095315j)*x[0] + ((-0.409855139174+0.942020068146j))*x[1]
+        ref[(0, 1, 1)]=(0.628375752508+0.492040095315j)*x_ref[0] + ((-0.409855139174+0.942020068146j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.0935017773455-0.698889576835j)*x[0] + ((-0.203969736084+0.512364535888j))*x[1]
+        ref[(0, 1, 2)]=(0.0935017773455-0.698889576835j)*x_ref[0] + ((-0.203969736084+0.512364535888j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.249213095442-0.274480511609j)*x[0] + ((-0.501220638035+0.898551995584j))*x[1]
+        ref[(0, 1, 3)]=(-0.249213095442-0.274480511609j)*x_ref[0] + ((-0.501220638035+0.898551995584j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.0457136933687+0.490473627032j)*x[0] + ((0.691759561728+0.650207164728j))*x[1]
+        ref[(0, 2, 0)]=(-0.0457136933687+0.490473627032j)*x_ref[0] + ((0.691759561728+0.650207164728j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.585955439865+0.954260062834j)*x[0] + ((0.750263572473-0.358772302815j))*x[1]
+        ref[(0, 2, 1)]=(-0.585955439865+0.954260062834j)*x_ref[0] + ((0.750263572473-0.358772302815j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.726058400868+0.161638573213j)*x[0] + ((-0.817989398345+0.178021253496j))*x[1]
+        ref[(0, 2, 2)]=(-0.726058400868+0.161638573213j)*x_ref[0] + ((-0.817989398345+0.178021253496j))*x_ref[1]
+        arg[(0, 2, 3)]=(0.945108586778-0.160193967942j)*x[0] + ((-0.675764345176+0.366543833974j))*x[1]
+        ref[(0, 2, 3)]=(0.945108586778-0.160193967942j)*x_ref[0] + ((-0.675764345176+0.366543833974j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.954316515733+0.0514245976377j)*x[0] + ((-0.449703530164+0.316963991604j))*x[1]
+        ref[(1, 0, 0)]=(-0.954316515733+0.0514245976377j)*x_ref[0] + ((-0.449703530164+0.316963991604j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.553048673742-0.784651190034j)*x[0] + ((0.801539627838+0.331547857347j))*x[1]
+        ref[(1, 0, 1)]=(-0.553048673742-0.784651190034j)*x_ref[0] + ((0.801539627838+0.331547857347j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.853353988991-0.183462198705j)*x[0] + ((0.713377714733-0.537244353237j))*x[1]
+        ref[(1, 0, 2)]=(-0.853353988991-0.183462198705j)*x_ref[0] + ((0.713377714733-0.537244353237j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.632167492128-0.705419111544j)*x[0] + ((-0.755725687867+0.969112362456j))*x[1]
+        ref[(1, 0, 3)]=(0.632167492128-0.705419111544j)*x_ref[0] + ((-0.755725687867+0.969112362456j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.53349357888+0.410302135813j)*x[0] + ((0.321546200317+0.974583846018j))*x[1]
+        ref[(1, 1, 0)]=(0.53349357888+0.410302135813j)*x_ref[0] + ((0.321546200317+0.974583846018j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.736071352248-0.677909059035j)*x[0] + ((0.313535614987+0.319032020404j))*x[1]
+        ref[(1, 1, 1)]=(-0.736071352248-0.677909059035j)*x_ref[0] + ((0.313535614987+0.319032020404j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.889329896036+0.804290286904j)*x[0] + ((-0.996707329524+0.768035574032j))*x[1]
+        ref[(1, 1, 2)]=(-0.889329896036+0.804290286904j)*x_ref[0] + ((-0.996707329524+0.768035574032j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.681799051201-0.399532391457j)*x[0] + ((-0.459206399668+0.74940405327j))*x[1]
+        ref[(1, 1, 3)]=(-0.681799051201-0.399532391457j)*x_ref[0] + ((-0.459206399668+0.74940405327j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.210522604397-0.182170213801j)*x[0] + ((-0.599255993582+0.473335875323j))*x[1]
+        ref[(1, 2, 0)]=(-0.210522604397-0.182170213801j)*x_ref[0] + ((-0.599255993582+0.473335875323j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.564930213545+0.835282165106j)*x[0] + ((0.302293832777+0.242518809922j))*x[1]
+        ref[(1, 2, 1)]=(0.564930213545+0.835282165106j)*x_ref[0] + ((0.302293832777+0.242518809922j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.706049399528-0.524639317438j)*x[0] + ((-0.404809619536-0.603660566735j))*x[1]
+        ref[(1, 2, 2)]=(0.706049399528-0.524639317438j)*x_ref[0] + ((-0.404809619536-0.603660566735j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.737474740975+0.692115433407j)*x[0] + ((-0.0250631663978-0.831026889681j))*x[1]
+        ref[(1, 2, 3)]=(-0.737474740975+0.692115433407j)*x_ref[0] + ((-0.0250631663978-0.831026889681j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.246190728156-0.0258075551096j)*x[0] + ((-0.395393940455-0.0047113958945j))*x[1]
+        ref[(2, 0, 0)]=(0.246190728156-0.0258075551096j)*x_ref[0] + ((-0.395393940455-0.0047113958945j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.493738054992-0.892096727494j)*x[0] + ((0.970898514872+0.709780925996j))*x[1]
+        ref[(2, 0, 1)]=(-0.493738054992-0.892096727494j)*x_ref[0] + ((0.970898514872+0.709780925996j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.21476511421-0.756680040784j)*x[0] + ((0.779516849053+0.193464464844j))*x[1]
+        ref[(2, 0, 2)]=(-0.21476511421-0.756680040784j)*x_ref[0] + ((0.779516849053+0.193464464844j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.74824781229-0.727589996217j)*x[0] + ((-0.610068793995+0.362949363323j))*x[1]
+        ref[(2, 0, 3)]=(-0.74824781229-0.727589996217j)*x_ref[0] + ((-0.610068793995+0.362949363323j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.166995476182+0.269518089384j)*x[0] + ((-0.730126254544+0.425618908894j))*x[1]
+        ref[(2, 1, 0)]=(-0.166995476182+0.269518089384j)*x_ref[0] + ((-0.730126254544+0.425618908894j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.252343617765-0.817938420978j)*x[0] + ((0.370335454139-0.66874765844j))*x[1]
+        ref[(2, 1, 1)]=(-0.252343617765-0.817938420978j)*x_ref[0] + ((0.370335454139-0.66874765844j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.784580893563+0.0689217059091j)*x[0] + ((0.359971526227-0.797499001745j))*x[1]
+        ref[(2, 1, 2)]=(0.784580893563+0.0689217059091j)*x_ref[0] + ((0.359971526227-0.797499001745j))*x_ref[1]
+        arg[(2, 1, 3)]=(-0.950232789998+0.369349786086j)*x[0] + ((-0.206367542107+0.920227972932j))*x[1]
+        ref[(2, 1, 3)]=(-0.950232789998+0.369349786086j)*x_ref[0] + ((-0.206367542107+0.920227972932j))*x_ref[1]
+        arg[(2, 2, 0)]=(0.276517561357-0.318768534126j)*x[0] + ((0.981686135858-0.29733611842j))*x[1]
+        ref[(2, 2, 0)]=(0.276517561357-0.318768534126j)*x_ref[0] + ((0.981686135858-0.29733611842j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.324978320689-0.402614805811j)*x[0] + ((-0.511153868896+0.430376188391j))*x[1]
+        ref[(2, 2, 1)]=(0.324978320689-0.402614805811j)*x_ref[0] + ((-0.511153868896+0.430376188391j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.0726012628997+0.369435966454j)*x[0] + ((-0.867692111055+0.293889074817j))*x[1]
+        ref[(2, 2, 2)]=(0.0726012628997+0.369435966454j)*x_ref[0] + ((-0.867692111055+0.293889074817j))*x_ref[1]
+        arg[(2, 2, 3)]=(0.547336733798-0.162418058042j)*x[0] + ((0.592723715147+0.734663078683j))*x[1]
+        ref[(2, 2, 3)]=(0.547336733798-0.162418058042j)*x_ref[0] + ((0.592723715147+0.734663078683j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.759563306973+0.544212871263j)*x[2]
+            ref[(0, 0, 0)]+=(-0.759563306973+0.544212871263j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.827989666195-0.795950363474j)*x[2]
+            ref[(0, 0, 1)]+=(0.827989666195-0.795950363474j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.502632313855+0.00773467009413j)*x[2]
+            ref[(0, 0, 2)]+=(-0.502632313855+0.00773467009413j)*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.292041332006+0.385545489063j)*x[2]
+            ref[(0, 0, 3)]+=(-0.292041332006+0.385545489063j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.390445359594-0.263502064442j)*x[2]
+            ref[(0, 1, 0)]+=(0.390445359594-0.263502064442j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.655540707536+0.231254051852j)*x[2]
+            ref[(0, 1, 1)]+=(-0.655540707536+0.231254051852j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.815094971227+0.430873233823j)*x[2]
+            ref[(0, 1, 2)]+=(0.815094971227+0.430873233823j)*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.427908889017+0.0175316207874j)*x[2]
+            ref[(0, 1, 3)]+=(-0.427908889017+0.0175316207874j)*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.80165280133+0.262756458426j)*x[2]
+            ref[(0, 2, 0)]+=(-0.80165280133+0.262756458426j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.879730463436-0.646303347298j)*x[2]
+            ref[(0, 2, 1)]+=(0.879730463436-0.646303347298j)*x_ref[2]
+            arg[(0, 2, 2)]+=(0.616679070107+0.512601795726j)*x[2]
+            ref[(0, 2, 2)]+=(0.616679070107+0.512601795726j)*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.993811967068-0.386787435483j)*x[2]
+            ref[(0, 2, 3)]+=(-0.993811967068-0.386787435483j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.918886803823-0.225279048382j)*x[2]
+            ref[(1, 0, 0)]+=(0.918886803823-0.225279048382j)*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.31346115806+0.699606587282j)*x[2]
+            ref[(1, 0, 1)]+=(-0.31346115806+0.699606587282j)*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.587105736654-0.346954465843j)*x[2]
+            ref[(1, 0, 2)]+=(-0.587105736654-0.346954465843j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.322343241796+0.532319887045j)*x[2]
+            ref[(1, 0, 3)]+=(-0.322343241796+0.532319887045j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.0166637589902-0.77126692011j)*x[2]
+            ref[(1, 1, 0)]+=(0.0166637589902-0.77126692011j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.70906005922-0.648163774032j)*x[2]
+            ref[(1, 1, 1)]+=(-0.70906005922-0.648163774032j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.80707263714+0.871060621606j)*x[2]
+            ref[(1, 1, 2)]+=(0.80707263714+0.871060621606j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.739062483095+0.415235795786j)*x[2]
+            ref[(1, 1, 3)]+=(0.739062483095+0.415235795786j)*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.122267368678+0.0803617115429j)*x[2]
+            ref[(1, 2, 0)]+=(-0.122267368678+0.0803617115429j)*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.228682188018-0.786401941415j)*x[2]
+            ref[(1, 2, 1)]+=(-0.228682188018-0.786401941415j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.296205603152+0.0380514849227j)*x[2]
+            ref[(1, 2, 2)]+=(0.296205603152+0.0380514849227j)*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.291107348897-0.738936407009j)*x[2]
+            ref[(1, 2, 3)]+=(-0.291107348897-0.738936407009j)*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.354747539112-0.231241469053j)*x[2]
+            ref[(2, 0, 0)]+=(-0.354747539112-0.231241469053j)*x_ref[2]
+            arg[(2, 0, 1)]+=(0.731659118851-0.414610140228j)*x[2]
+            ref[(2, 0, 1)]+=(0.731659118851-0.414610140228j)*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.870643539408-0.6781498581j)*x[2]
+            ref[(2, 0, 2)]+=(-0.870643539408-0.6781498581j)*x_ref[2]
+            arg[(2, 0, 3)]+=(0.727767491561+0.199033255258j)*x[2]
+            ref[(2, 0, 3)]+=(0.727767491561+0.199033255258j)*x_ref[2]
+            arg[(2, 1, 0)]+=(0.147824821519-0.386351336011j)*x[2]
+            ref[(2, 1, 0)]+=(0.147824821519-0.386351336011j)*x_ref[2]
+            arg[(2, 1, 1)]+=(0.833602976748-0.429265568771j)*x[2]
+            ref[(2, 1, 1)]+=(0.833602976748-0.429265568771j)*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.671259581338+0.506576842481j)*x[2]
+            ref[(2, 1, 2)]+=(-0.671259581338+0.506576842481j)*x_ref[2]
+            arg[(2, 1, 3)]+=(-0.0502957208924+0.948508134767j)*x[2]
+            ref[(2, 1, 3)]+=(-0.0502957208924+0.948508134767j)*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.197911620799+0.858212443084j)*x[2]
+            ref[(2, 2, 0)]+=(-0.197911620799+0.858212443084j)*x_ref[2]
+            arg[(2, 2, 1)]+=(0.0577126950944-0.028222483296j)*x[2]
+            ref[(2, 2, 1)]+=(0.0577126950944-0.028222483296j)*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.880746649032-0.190227693109j)*x[2]
+            ref[(2, 2, 2)]+=(-0.880746649032-0.190227693109j)*x_ref[2]
+            arg[(2, 2, 3)]+=(0.770734244653-0.641087282609j)*x[2]
+            ref[(2, 2, 3)]+=(0.770734244653-0.641087282609j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 2, 2),w)
+        ref = Data(0,(2, 4, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.254938625975-0.750108738674j)*x[0] + ((0.9795068829+0.170212222208j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.254938625975-0.750108738674j)*x_ref[0] + ((0.9795068829+0.170212222208j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.589527202396-0.281887511167j)*x[0] + ((-0.381535286593+0.841955461542j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.589527202396-0.281887511167j)*x_ref[0] + ((-0.381535286593+0.841955461542j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.23869745458+0.535385236554j)*x[0] + ((-0.317579036443-0.114456142113j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.23869745458+0.535385236554j)*x_ref[0] + ((-0.317579036443-0.114456142113j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.148164777467-0.350948666764j)*x[0] + ((-0.261701997046-0.504439625479j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.148164777467-0.350948666764j)*x_ref[0] + ((-0.261701997046-0.504439625479j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.898104832716+0.0475920664056j)*x[0] + ((-0.105609309168-0.700297536166j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.898104832716+0.0475920664056j)*x_ref[0] + ((-0.105609309168-0.700297536166j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.0568611868973-0.78672033292j)*x[0] + ((0.2948578872-0.168525415997j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.0568611868973-0.78672033292j)*x_ref[0] + ((0.2948578872-0.168525415997j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.14668799596+0.49022399426j)*x[0] + ((0.921575136862-0.0136692299811j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.14668799596+0.49022399426j)*x_ref[0] + ((0.921575136862-0.0136692299811j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.417182294264-0.128883768255j)*x[0] + ((-0.0618785496068+0.0193098489501j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.417182294264-0.128883768255j)*x_ref[0] + ((-0.0618785496068+0.0193098489501j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.0241522681524+0.112350424275j)*x[0] + ((-0.382880194747+0.308128779215j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.0241522681524+0.112350424275j)*x_ref[0] + ((-0.382880194747+0.308128779215j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.115138780236-0.715013109513j)*x[0] + ((0.230132218563+0.893341512267j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.115138780236-0.715013109513j)*x_ref[0] + ((0.230132218563+0.893341512267j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.299944122443+0.701815715203j)*x[0] + ((-0.818307724124+0.0960362427325j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.299944122443+0.701815715203j)*x_ref[0] + ((-0.818307724124+0.0960362427325j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.842706330523-0.429394074305j)*x[0] + ((-0.98928112798-0.246867016j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.842706330523-0.429394074305j)*x_ref[0] + ((-0.98928112798-0.246867016j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(-0.105494518838+0.849007009288j)*x[0] + ((-0.578528446191+0.698991837825j))*x[1]
+        ref[(0, 3, 0, 0)]=(-0.105494518838+0.849007009288j)*x_ref[0] + ((-0.578528446191+0.698991837825j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.356424680024+0.246118721365j)*x[0] + ((-0.35535611253-0.575107426319j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.356424680024+0.246118721365j)*x_ref[0] + ((-0.35535611253-0.575107426319j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.913384464353+0.944725594079j)*x[0] + ((-0.974713775288+0.345234878172j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.913384464353+0.944725594079j)*x_ref[0] + ((-0.974713775288+0.345234878172j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.728358519746+0.870732666567j)*x[0] + ((0.961164610739+0.581348224686j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.728358519746+0.870732666567j)*x_ref[0] + ((0.961164610739+0.581348224686j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.642721471139+0.965474797101j)*x[0] + ((-0.485711477349+0.201992687474j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.642721471139+0.965474797101j)*x_ref[0] + ((-0.485711477349+0.201992687474j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.975768397435-0.0244275201027j)*x[0] + ((0.184120712292+0.300369461319j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.975768397435-0.0244275201027j)*x_ref[0] + ((0.184120712292+0.300369461319j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.0756504675704+0.470505329689j)*x[0] + ((-0.795651246759+0.466457054446j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.0756504675704+0.470505329689j)*x_ref[0] + ((-0.795651246759+0.466457054446j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.209224665295-0.262748768139j)*x[0] + ((-0.238796150597-0.222305248506j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.209224665295-0.262748768139j)*x_ref[0] + ((-0.238796150597-0.222305248506j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.541767578754+0.232135861856j)*x[0] + ((-0.419400395955+0.797278053305j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.541767578754+0.232135861856j)*x_ref[0] + ((-0.419400395955+0.797278053305j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.206125749948+0.477899082304j)*x[0] + ((-0.108538776189+0.970079034851j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.206125749948+0.477899082304j)*x_ref[0] + ((-0.108538776189+0.970079034851j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.0865485921308-0.813972196279j)*x[0] + ((-0.47966356149+0.642111522674j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.0865485921308-0.813972196279j)*x_ref[0] + ((-0.47966356149+0.642111522674j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.321842232639+0.758204747755j)*x[0] + ((-0.468932867203+0.656069115608j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.321842232639+0.758204747755j)*x_ref[0] + ((-0.468932867203+0.656069115608j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.284971949969+0.0481135418398j)*x[0] + ((-0.0487798642777+0.25294019997j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.284971949969+0.0481135418398j)*x_ref[0] + ((-0.0487798642777+0.25294019997j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.843657746205-0.47960424643j)*x[0] + ((-0.693624103633+0.321053333196j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.843657746205-0.47960424643j)*x_ref[0] + ((-0.693624103633+0.321053333196j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.701483238619+0.0354087304193j)*x[0] + ((0.940980130807+0.454058856624j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.701483238619+0.0354087304193j)*x_ref[0] + ((0.940980130807+0.454058856624j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.982304635057+0.880900983434j)*x[0] + ((0.585673222632+0.0524405421206j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.982304635057+0.880900983434j)*x_ref[0] + ((0.585673222632+0.0524405421206j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.0535438828716+0.93575208527j)*x[0] + ((-0.7230105588-0.902577177639j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.0535438828716+0.93575208527j)*x_ref[0] + ((-0.7230105588-0.902577177639j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(0.656016260432+0.371197022592j)*x[0] + ((0.509875872665-0.39627158072j))*x[1]
+        ref[(1, 3, 0, 1)]=(0.656016260432+0.371197022592j)*x_ref[0] + ((0.509875872665-0.39627158072j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.722890460009-0.919116527928j)*x[0] + ((-0.997883506206-0.399200595309j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.722890460009-0.919116527928j)*x_ref[0] + ((-0.997883506206-0.399200595309j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.917156148469-0.279245499457j)*x[0] + ((-0.263140116055-0.650049203683j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.917156148469-0.279245499457j)*x_ref[0] + ((-0.263140116055-0.650049203683j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.162945569303+0.184586019098j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.162945569303+0.184586019098j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.441522817839-0.921055314031j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.441522817839-0.921055314031j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.848912331901-0.721789007952j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.848912331901-0.721789007952j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.448042061892-0.931249360022j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.448042061892-0.931249360022j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.0183334774856-0.799467345043j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.0183334774856-0.799467345043j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.250132563666-0.440418031708j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.250132563666-0.440418031708j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.0279232999094+0.799011740309j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.0279232999094+0.799011740309j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.794916649805-0.41223023969j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.794916649805-0.41223023969j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.638886121262-0.835534411994j)*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.638886121262-0.835534411994j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.0616169467268-0.160966298338j)*x[2]
+            ref[(0, 2, 0, 1)]+=(0.0616169467268-0.160966298338j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.46272761447+0.193092916889j)*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.46272761447+0.193092916889j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.633300071109+0.506219138044j)*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.633300071109+0.506219138044j)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.197651709996+0.620650910411j)*x[2]
+            ref[(0, 3, 0, 0)]+=(0.197651709996+0.620650910411j)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.650731496939+0.874835165632j)*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.650731496939+0.874835165632j)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.726852289117-0.236088490269j)*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.726852289117-0.236088490269j)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.156175302736-0.0109204595885j)*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.156175302736-0.0109204595885j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.487047078215-0.783625739242j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.487047078215-0.783625739242j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.82473661688+0.237114766138j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.82473661688+0.237114766138j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.0928591496955-0.652664887047j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.0928591496955-0.652664887047j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.837840937445-0.448735574214j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.837840937445-0.448735574214j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.161044729944-0.653859011039j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.161044729944-0.653859011039j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.115711736022+0.847842834063j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.115711736022+0.847842834063j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.241416665023-0.462073689892j)*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.241416665023-0.462073689892j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.587428742967-0.518732664909j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.587428742967-0.518732664909j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.350139277308+0.780526808108j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.350139277308+0.780526808108j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.371868251942-0.358288011251j)*x[2]
+            ref[(1, 2, 0, 1)]+=(0.371868251942-0.358288011251j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.0509869380993+0.0436791692515j)*x[2]
+            ref[(1, 2, 1, 0)]+=(0.0509869380993+0.0436791692515j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.92590019674+0.445717407658j)*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.92590019674+0.445717407658j)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.518108956344-0.978141208991j)*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.518108956344-0.978141208991j)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.598746210059+0.639033657136j)*x[2]
+            ref[(1, 3, 0, 1)]+=(0.598746210059+0.639033657136j)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.217568570422-0.0736084170811j)*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.217568570422-0.0736084170811j)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.614497416177-0.372983618578j)*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.614497416177-0.372983618578j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.00167353632305+0.937199962674j)*x[0]**o + ((-0.699180037159-0.77918932974j))*x[0] + ((-0.803131285077-0.891719518309j))*x[1]**o + ((-0.380050024856+0.298803911604j))*x[1]
+        ref=(-0.00167353632305+0.937199962674j)*x_ref[0]**o + ((-0.699180037159-0.77918932974j))*x_ref[0] + ((-0.803131285077-0.891719518309j))*x_ref[1]**o + ((-0.380050024856+0.298803911604j))*x_ref[1]
+        if dim==3:
+            arg+=((0.503219099289-0.19414902301j))*x[2]**o + ((-0.0054066573979-0.342360954916j))*x[2]
+            ref+=((0.503219099289-0.19414902301j))*x_ref[2]**o + ((-0.0054066573979-0.342360954916j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.409038231695+0.738542446534j)*x[0]**o + ((-0.620995441609-0.0425117529506j))*x[0] + ((-0.970382704845+0.341289630625j))*x[1]**o + ((-0.244410597482-0.0116346455175j))*x[1]
+        ref[(0,)]=(0.409038231695+0.738542446534j)*x_ref[0]**o + ((-0.620995441609-0.0425117529506j))*x_ref[0] + ((-0.970382704845+0.341289630625j))*x_ref[1]**o + ((-0.244410597482-0.0116346455175j))*x_ref[1]
+        arg[(1,)]=(-0.930016265696+0.417037062078j)*x[0]**o + ((0.143870896766+0.606053747679j))*x[0] + ((-0.736070436415-0.678009868579j))*x[1]**o + ((0.221047267545+0.519390840598j))*x[1]
+        ref[(1,)]=(-0.930016265696+0.417037062078j)*x_ref[0]**o + ((0.143870896766+0.606053747679j))*x_ref[0] + ((-0.736070436415-0.678009868579j))*x_ref[1]**o + ((0.221047267545+0.519390840598j))*x_ref[1]
+        arg[(2,)]=(-0.48034333085+0.116969238332j)*x[0]**o + ((0.721343522417+0.943347971454j))*x[0] + ((-0.609557516546+0.682363679043j))*x[1]**o + ((-0.810293049323-0.57790264555j))*x[1]
+        ref[(2,)]=(-0.48034333085+0.116969238332j)*x_ref[0]**o + ((0.721343522417+0.943347971454j))*x_ref[0] + ((-0.609557516546+0.682363679043j))*x_ref[1]**o + ((-0.810293049323-0.57790264555j))*x_ref[1]
+        arg[(3,)]=(0.398460609539-0.472742903165j)*x[0]**o + ((-0.337508011655+0.138644960467j))*x[0] + ((-0.946340678033-0.913759183023j))*x[1]**o + ((-0.436360366604+0.836377294034j))*x[1]
+        ref[(3,)]=(0.398460609539-0.472742903165j)*x_ref[0]**o + ((-0.337508011655+0.138644960467j))*x_ref[0] + ((-0.946340678033-0.913759183023j))*x_ref[1]**o + ((-0.436360366604+0.836377294034j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.510525633978-0.818529352262j)*x[2]**o + ((0.226104758184+0.436588640899j))*x[2]
+            ref[(0,)]+=(-0.510525633978-0.818529352262j)*x_ref[2]**o + ((0.226104758184+0.436588640899j))*x_ref[2]
+            arg[(1,)]+=(-0.263323736856-0.30333365549j)*x[2]**o + ((0.444712699611-0.702467571926j))*x[2]
+            ref[(1,)]+=(-0.263323736856-0.30333365549j)*x_ref[2]**o + ((0.444712699611-0.702467571926j))*x_ref[2]
+            arg[(2,)]+=(0.79239116744-0.103147565959j)*x[2]**o + ((0.366301328854+0.0989548719217j))*x[2]
+            ref[(2,)]+=(0.79239116744-0.103147565959j)*x_ref[2]**o + ((0.366301328854+0.0989548719217j))*x_ref[2]
+            arg[(3,)]+=(0.96981652896+0.523449526446j)*x[2]**o + ((-0.664958627706+0.823041882365j))*x[2]
+            ref[(3,)]+=(0.96981652896+0.523449526446j)*x_ref[2]**o + ((-0.664958627706+0.823041882365j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2),w_ref)
+        arg[(0, 0)]=(0.244205688636-0.771246655387j)*x[0]**o + ((-0.0681853757641+0.39217288985j))*x[0] + ((0.930678951928+0.50822840032j))*x[1]**o + ((0.213616694534+0.612168681696j))*x[1]
+        ref[(0, 0)]=(0.244205688636-0.771246655387j)*x_ref[0]**o + ((-0.0681853757641+0.39217288985j))*x_ref[0] + ((0.930678951928+0.50822840032j))*x_ref[1]**o + ((0.213616694534+0.612168681696j))*x_ref[1]
+        arg[(0, 1)]=(-0.463468904588+0.541604057159j)*x[0]**o + ((0.457054341561+0.569627625409j))*x[0] + ((-0.420760038419-0.54995767469j))*x[1]**o + ((0.630796195875-0.848972794982j))*x[1]
+        ref[(0, 1)]=(-0.463468904588+0.541604057159j)*x_ref[0]**o + ((0.457054341561+0.569627625409j))*x_ref[0] + ((-0.420760038419-0.54995767469j))*x_ref[1]**o + ((0.630796195875-0.848972794982j))*x_ref[1]
+        arg[(1, 0)]=(-0.392909751565+0.274775627125j)*x[0]**o + ((0.316088247235-0.682742039159j))*x[0] + ((0.484396109358+0.728924606327j))*x[1]**o + ((0.685978112776+0.333866720782j))*x[1]
+        ref[(1, 0)]=(-0.392909751565+0.274775627125j)*x_ref[0]**o + ((0.316088247235-0.682742039159j))*x_ref[0] + ((0.484396109358+0.728924606327j))*x_ref[1]**o + ((0.685978112776+0.333866720782j))*x_ref[1]
+        arg[(1, 1)]=(0.675052847128-0.140182959093j)*x[0]**o + ((-0.176483649826+0.111433984829j))*x[0] + ((-0.71725026241+0.45356775968j))*x[1]**o + ((-0.244291664107+0.268703997569j))*x[1]
+        ref[(1, 1)]=(0.675052847128-0.140182959093j)*x_ref[0]**o + ((-0.176483649826+0.111433984829j))*x_ref[0] + ((-0.71725026241+0.45356775968j))*x_ref[1]**o + ((-0.244291664107+0.268703997569j))*x_ref[1]
+        arg[(2, 0)]=(0.088680332801+0.71398064968j)*x[0]**o + ((0.624731379064-0.698634396874j))*x[0] + ((0.606600717956+0.0737233353049j))*x[1]**o + ((-0.37533604942-0.802048967896j))*x[1]
+        ref[(2, 0)]=(0.088680332801+0.71398064968j)*x_ref[0]**o + ((0.624731379064-0.698634396874j))*x_ref[0] + ((0.606600717956+0.0737233353049j))*x_ref[1]**o + ((-0.37533604942-0.802048967896j))*x_ref[1]
+        arg[(2, 1)]=(-0.714871140255-0.90438916663j)*x[0]**o + ((0.0742649824858-0.996126278246j))*x[0] + ((-0.167477562871+0.0751063517327j))*x[1]**o + ((-0.156622653966+0.330367702269j))*x[1]
+        ref[(2, 1)]=(-0.714871140255-0.90438916663j)*x_ref[0]**o + ((0.0742649824858-0.996126278246j))*x_ref[0] + ((-0.167477562871+0.0751063517327j))*x_ref[1]**o + ((-0.156622653966+0.330367702269j))*x_ref[1]
+        arg[(3, 0)]=(-0.427505055412+0.988213375094j)*x[0]**o + ((0.222052333078-0.761492866124j))*x[0] + ((-0.439130316713-0.514891216888j))*x[1]**o + ((-0.31733833116+0.840671043038j))*x[1]
+        ref[(3, 0)]=(-0.427505055412+0.988213375094j)*x_ref[0]**o + ((0.222052333078-0.761492866124j))*x_ref[0] + ((-0.439130316713-0.514891216888j))*x_ref[1]**o + ((-0.31733833116+0.840671043038j))*x_ref[1]
+        arg[(3, 1)]=(0.167442571617+0.482332708781j)*x[0]**o + ((0.66623900933-0.161250019408j))*x[0] + ((-0.973521191516-0.189877222403j))*x[1]**o + ((0.0388848037279+0.0950165618157j))*x[1]
+        ref[(3, 1)]=(0.167442571617+0.482332708781j)*x_ref[0]**o + ((0.66623900933-0.161250019408j))*x_ref[0] + ((-0.973521191516-0.189877222403j))*x_ref[1]**o + ((0.0388848037279+0.0950165618157j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.168228391082+0.643081133273j)*x[2]**o + ((0.914156337976-0.757654911871j))*x[2]
+            ref[(0, 0)]+=(-0.168228391082+0.643081133273j)*x_ref[2]**o + ((0.914156337976-0.757654911871j))*x_ref[2]
+            arg[(0, 1)]+=(-0.934831097471-0.52152381166j)*x[2]**o + ((-0.0845129881942+0.0373136422947j))*x[2]
+            ref[(0, 1)]+=(-0.934831097471-0.52152381166j)*x_ref[2]**o + ((-0.0845129881942+0.0373136422947j))*x_ref[2]
+            arg[(1, 0)]+=(-0.783568077086+0.888416650464j)*x[2]**o + ((0.479331337067-0.559187942253j))*x[2]
+            ref[(1, 0)]+=(-0.783568077086+0.888416650464j)*x_ref[2]**o + ((0.479331337067-0.559187942253j))*x_ref[2]
+            arg[(1, 1)]+=(-0.715075312453+0.46720711745j)*x[2]**o + ((0.661985283977-0.652253559447j))*x[2]
+            ref[(1, 1)]+=(-0.715075312453+0.46720711745j)*x_ref[2]**o + ((0.661985283977-0.652253559447j))*x_ref[2]
+            arg[(2, 0)]+=(0.628414511086+0.514256104126j)*x[2]**o + ((0.490899063709+0.0284083173152j))*x[2]
+            ref[(2, 0)]+=(0.628414511086+0.514256104126j)*x_ref[2]**o + ((0.490899063709+0.0284083173152j))*x_ref[2]
+            arg[(2, 1)]+=(0.0595738821725+0.873171937811j)*x[2]**o + ((0.883995952324-0.219508977064j))*x[2]
+            ref[(2, 1)]+=(0.0595738821725+0.873171937811j)*x_ref[2]**o + ((0.883995952324-0.219508977064j))*x_ref[2]
+            arg[(3, 0)]+=(0.405645690828+0.997121403911j)*x[2]**o + ((-0.00793426905046+0.530391655859j))*x[2]
+            ref[(3, 0)]+=(0.405645690828+0.997121403911j)*x_ref[2]**o + ((-0.00793426905046+0.530391655859j))*x_ref[2]
+            arg[(3, 1)]+=(0.240168982137-0.544043204666j)*x[2]**o + ((0.901122701512-0.254058040698j))*x[2]
+            ref[(3, 1)]+=(0.240168982137-0.544043204666j)*x_ref[2]**o + ((0.901122701512-0.254058040698j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.415990018833-0.474126466314j)*x[0]**o + ((0.838686956529+0.914695926042j))*x[0] + ((-0.529873989519-0.373579739403j))*x[1]**o + ((0.192070957086-0.831758558607j))*x[1]
+        ref[(0, 0, 0)]=(-0.415990018833-0.474126466314j)*x_ref[0]**o + ((0.838686956529+0.914695926042j))*x_ref[0] + ((-0.529873989519-0.373579739403j))*x_ref[1]**o + ((0.192070957086-0.831758558607j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.200562193317-0.309525922422j)*x[0]**o + ((0.418352506417+0.964583643201j))*x[0] + ((-0.439019085282-0.234679941901j))*x[1]**o + ((-0.977979985189+0.330367648618j))*x[1]
+        ref[(0, 0, 1)]=(0.200562193317-0.309525922422j)*x_ref[0]**o + ((0.418352506417+0.964583643201j))*x_ref[0] + ((-0.439019085282-0.234679941901j))*x_ref[1]**o + ((-0.977979985189+0.330367648618j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.484335916373+0.324262478303j)*x[0]**o + ((-0.143669725904+0.945847647278j))*x[0] + ((0.990396664818-0.107930475347j))*x[1]**o + ((-0.763918788316-0.248069852845j))*x[1]
+        ref[(0, 0, 2)]=(-0.484335916373+0.324262478303j)*x_ref[0]**o + ((-0.143669725904+0.945847647278j))*x_ref[0] + ((0.990396664818-0.107930475347j))*x_ref[1]**o + ((-0.763918788316-0.248069852845j))*x_ref[1]
+        arg[(0, 0, 3)]=(-0.0609206032408+0.571275882505j)*x[0]**o + ((0.848100115482-0.0249586625677j))*x[0] + ((0.120828298124-0.675162961554j))*x[1]**o + ((0.979466104994-0.283258790948j))*x[1]
+        ref[(0, 0, 3)]=(-0.0609206032408+0.571275882505j)*x_ref[0]**o + ((0.848100115482-0.0249586625677j))*x_ref[0] + ((0.120828298124-0.675162961554j))*x_ref[1]**o + ((0.979466104994-0.283258790948j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.458549535358+0.326097944648j)*x[0]**o + ((-0.290354611557-0.739103763294j))*x[0] + ((0.307330922386+0.0839823421934j))*x[1]**o + ((0.257941060973+0.570950597507j))*x[1]
+        ref[(0, 1, 0)]=(-0.458549535358+0.326097944648j)*x_ref[0]**o + ((-0.290354611557-0.739103763294j))*x_ref[0] + ((0.307330922386+0.0839823421934j))*x_ref[1]**o + ((0.257941060973+0.570950597507j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.155330477851+0.218240476682j)*x[0]**o + ((-0.228526438792-0.481043864661j))*x[0] + ((0.957408887872-0.714393489962j))*x[1]**o + ((-0.462806309911+0.119471737785j))*x[1]
+        ref[(0, 1, 1)]=(0.155330477851+0.218240476682j)*x_ref[0]**o + ((-0.228526438792-0.481043864661j))*x_ref[0] + ((0.957408887872-0.714393489962j))*x_ref[1]**o + ((-0.462806309911+0.119471737785j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.591116035531-0.488772657666j)*x[0]**o + ((-0.372942024845-0.128050443434j))*x[0] + ((-0.913322773466-0.891014330705j))*x[1]**o + ((-0.739894210837+0.455919249701j))*x[1]
+        ref[(0, 1, 2)]=(0.591116035531-0.488772657666j)*x_ref[0]**o + ((-0.372942024845-0.128050443434j))*x_ref[0] + ((-0.913322773466-0.891014330705j))*x_ref[1]**o + ((-0.739894210837+0.455919249701j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.796454292341+0.0229739052315j)*x[0]**o + ((0.488807015631+0.572401819537j))*x[0] + ((-0.664222231696-0.289456626949j))*x[1]**o + ((0.129433269875-0.118570384811j))*x[1]
+        ref[(0, 1, 3)]=(-0.796454292341+0.0229739052315j)*x_ref[0]**o + ((0.488807015631+0.572401819537j))*x_ref[0] + ((-0.664222231696-0.289456626949j))*x_ref[1]**o + ((0.129433269875-0.118570384811j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.98836335815-0.400398275487j)*x[0]**o + ((-0.23168038264-0.483058043748j))*x[0] + ((0.0556962081364+0.537324104311j))*x[1]**o + ((0.374387360017+0.509365957073j))*x[1]
+        ref[(0, 2, 0)]=(0.98836335815-0.400398275487j)*x_ref[0]**o + ((-0.23168038264-0.483058043748j))*x_ref[0] + ((0.0556962081364+0.537324104311j))*x_ref[1]**o + ((0.374387360017+0.509365957073j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.426088442222+0.056458134772j)*x[0]**o + ((0.111446073359+0.650320356184j))*x[0] + ((-0.475068219-0.184659475052j))*x[1]**o + ((-0.178392275847+0.584508793655j))*x[1]
+        ref[(0, 2, 1)]=(-0.426088442222+0.056458134772j)*x_ref[0]**o + ((0.111446073359+0.650320356184j))*x_ref[0] + ((-0.475068219-0.184659475052j))*x_ref[1]**o + ((-0.178392275847+0.584508793655j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.817656251717-0.324846619301j)*x[0]**o + ((-0.194180767901-0.0965879726096j))*x[0] + ((0.256177866621+0.0510464751j))*x[1]**o + ((0.58753328973-0.111061485277j))*x[1]
+        ref[(0, 2, 2)]=(-0.817656251717-0.324846619301j)*x_ref[0]**o + ((-0.194180767901-0.0965879726096j))*x_ref[0] + ((0.256177866621+0.0510464751j))*x_ref[1]**o + ((0.58753328973-0.111061485277j))*x_ref[1]
+        arg[(0, 2, 3)]=(-0.785045686773-0.679811836523j)*x[0]**o + ((-0.169528568036+0.893546568868j))*x[0] + ((-0.865165807222-0.894144405582j))*x[1]**o + ((0.413546984076+0.274999859844j))*x[1]
+        ref[(0, 2, 3)]=(-0.785045686773-0.679811836523j)*x_ref[0]**o + ((-0.169528568036+0.893546568868j))*x_ref[0] + ((-0.865165807222-0.894144405582j))*x_ref[1]**o + ((0.413546984076+0.274999859844j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.494407404324-0.849365767763j)*x[0]**o + ((-0.423891009934+0.154396708802j))*x[0] + ((0.943756135964+0.135356657005j))*x[1]**o + ((0.450144866503-0.942308764646j))*x[1]
+        ref[(1, 0, 0)]=(0.494407404324-0.849365767763j)*x_ref[0]**o + ((-0.423891009934+0.154396708802j))*x_ref[0] + ((0.943756135964+0.135356657005j))*x_ref[1]**o + ((0.450144866503-0.942308764646j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.558607668883+0.185347833341j)*x[0]**o + ((-0.335617850733+0.381140092966j))*x[0] + ((0.896667294953-0.713077196557j))*x[1]**o + ((-0.592129907811-0.546620293577j))*x[1]
+        ref[(1, 0, 1)]=(0.558607668883+0.185347833341j)*x_ref[0]**o + ((-0.335617850733+0.381140092966j))*x_ref[0] + ((0.896667294953-0.713077196557j))*x_ref[1]**o + ((-0.592129907811-0.546620293577j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.691155831012-0.209180646733j)*x[0]**o + ((0.112265733142-0.0462588947369j))*x[0] + ((-0.944110033215-0.275591107053j))*x[1]**o + ((0.657249262463+0.100246622763j))*x[1]
+        ref[(1, 0, 2)]=(0.691155831012-0.209180646733j)*x_ref[0]**o + ((0.112265733142-0.0462588947369j))*x_ref[0] + ((-0.944110033215-0.275591107053j))*x_ref[1]**o + ((0.657249262463+0.100246622763j))*x_ref[1]
+        arg[(1, 0, 3)]=(-0.213917149386-0.51678087585j)*x[0]**o + ((-0.429782375801-0.375085036138j))*x[0] + ((0.577015991351+0.725889432785j))*x[1]**o + ((-0.183965129315-0.911836092898j))*x[1]
+        ref[(1, 0, 3)]=(-0.213917149386-0.51678087585j)*x_ref[0]**o + ((-0.429782375801-0.375085036138j))*x_ref[0] + ((0.577015991351+0.725889432785j))*x_ref[1]**o + ((-0.183965129315-0.911836092898j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.112201616862-0.770672796518j)*x[0]**o + ((-0.0260482784155+0.975857353837j))*x[0] + ((-0.188339093411-0.929766965495j))*x[1]**o + ((0.160694183663-0.139968930787j))*x[1]
+        ref[(1, 1, 0)]=(-0.112201616862-0.770672796518j)*x_ref[0]**o + ((-0.0260482784155+0.975857353837j))*x_ref[0] + ((-0.188339093411-0.929766965495j))*x_ref[1]**o + ((0.160694183663-0.139968930787j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.760445247177+0.177963569299j)*x[0]**o + ((-0.995222838632+0.538384243365j))*x[0] + ((-0.718194302972+0.628952415283j))*x[1]**o + ((0.246510958082-0.810682297228j))*x[1]
+        ref[(1, 1, 1)]=(0.760445247177+0.177963569299j)*x_ref[0]**o + ((-0.995222838632+0.538384243365j))*x_ref[0] + ((-0.718194302972+0.628952415283j))*x_ref[1]**o + ((0.246510958082-0.810682297228j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.872711916146+0.559865614271j)*x[0]**o + ((-0.984533219995+0.130458085506j))*x[0] + ((0.144007831082+0.782061451394j))*x[1]**o + ((-0.861768048275+0.865363679959j))*x[1]
+        ref[(1, 1, 2)]=(-0.872711916146+0.559865614271j)*x_ref[0]**o + ((-0.984533219995+0.130458085506j))*x_ref[0] + ((0.144007831082+0.782061451394j))*x_ref[1]**o + ((-0.861768048275+0.865363679959j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.145476651147+0.0820818133107j)*x[0]**o + ((-0.612061693799-0.653084159011j))*x[0] + ((-0.649253047629-0.0387136506882j))*x[1]**o + ((-0.538990133844-0.534078887876j))*x[1]
+        ref[(1, 1, 3)]=(0.145476651147+0.0820818133107j)*x_ref[0]**o + ((-0.612061693799-0.653084159011j))*x_ref[0] + ((-0.649253047629-0.0387136506882j))*x_ref[1]**o + ((-0.538990133844-0.534078887876j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.575992934419+0.629731692417j)*x[0]**o + ((-0.540385016924-0.847583101651j))*x[0] + ((0.0965739067882-0.864687218408j))*x[1]**o + ((0.720427634575-0.588511733579j))*x[1]
+        ref[(1, 2, 0)]=(0.575992934419+0.629731692417j)*x_ref[0]**o + ((-0.540385016924-0.847583101651j))*x_ref[0] + ((0.0965739067882-0.864687218408j))*x_ref[1]**o + ((0.720427634575-0.588511733579j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.761553200476-0.702934700449j)*x[0]**o + ((0.0508541971948-0.903926864259j))*x[0] + ((0.26923805159+0.130640473792j))*x[1]**o + ((0.476821061188-0.490189775076j))*x[1]
+        ref[(1, 2, 1)]=(0.761553200476-0.702934700449j)*x_ref[0]**o + ((0.0508541971948-0.903926864259j))*x_ref[0] + ((0.26923805159+0.130640473792j))*x_ref[1]**o + ((0.476821061188-0.490189775076j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.72099328353-0.366550464907j)*x[0]**o + ((0.230622172284+0.112507451483j))*x[0] + ((0.292516008557+0.991429115676j))*x[1]**o + ((0.798115788396+0.336721252553j))*x[1]
+        ref[(1, 2, 2)]=(0.72099328353-0.366550464907j)*x_ref[0]**o + ((0.230622172284+0.112507451483j))*x_ref[0] + ((0.292516008557+0.991429115676j))*x_ref[1]**o + ((0.798115788396+0.336721252553j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.344400038238-0.350164062022j)*x[0]**o + ((0.858840824825-0.771875020809j))*x[0] + ((0.340103764123+0.0756263985967j))*x[1]**o + ((0.0334938276092+0.365714879923j))*x[1]
+        ref[(1, 2, 3)]=(-0.344400038238-0.350164062022j)*x_ref[0]**o + ((0.858840824825-0.771875020809j))*x_ref[0] + ((0.340103764123+0.0756263985967j))*x_ref[1]**o + ((0.0334938276092+0.365714879923j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.513628158949-0.684235479819j)*x[0]**o + ((0.0213846405233+0.559490884689j))*x[0] + ((0.853093109926-0.147854772149j))*x[1]**o + ((-0.0676222314164-0.86799900014j))*x[1]
+        ref[(2, 0, 0)]=(0.513628158949-0.684235479819j)*x_ref[0]**o + ((0.0213846405233+0.559490884689j))*x_ref[0] + ((0.853093109926-0.147854772149j))*x_ref[1]**o + ((-0.0676222314164-0.86799900014j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.46180107505+0.323950113274j)*x[0]**o + ((-0.782542959587+0.824843941282j))*x[0] + ((-0.63919478121-0.206384395116j))*x[1]**o + ((-0.0586356061177+0.710309583722j))*x[1]
+        ref[(2, 0, 1)]=(-0.46180107505+0.323950113274j)*x_ref[0]**o + ((-0.782542959587+0.824843941282j))*x_ref[0] + ((-0.63919478121-0.206384395116j))*x_ref[1]**o + ((-0.0586356061177+0.710309583722j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.828610292396-0.48059677622j)*x[0]**o + ((-0.477437739088-0.0141386899334j))*x[0] + ((0.280914329515+0.760137682756j))*x[1]**o + ((0.25465954071+0.85679944003j))*x[1]
+        ref[(2, 0, 2)]=(0.828610292396-0.48059677622j)*x_ref[0]**o + ((-0.477437739088-0.0141386899334j))*x_ref[0] + ((0.280914329515+0.760137682756j))*x_ref[1]**o + ((0.25465954071+0.85679944003j))*x_ref[1]
+        arg[(2, 0, 3)]=(0.231520446959+0.912627104148j)*x[0]**o + ((0.436060702628+0.341092050201j))*x[0] + ((0.25982806327+0.602858071185j))*x[1]**o + ((-0.143740762413+0.499621765167j))*x[1]
+        ref[(2, 0, 3)]=(0.231520446959+0.912627104148j)*x_ref[0]**o + ((0.436060702628+0.341092050201j))*x_ref[0] + ((0.25982806327+0.602858071185j))*x_ref[1]**o + ((-0.143740762413+0.499621765167j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.974546697999-0.920829318483j)*x[0]**o + ((-0.561441512877+0.121216031164j))*x[0] + ((0.802795358121+0.709962769609j))*x[1]**o + ((0.346771845282-0.179626406157j))*x[1]
+        ref[(2, 1, 0)]=(-0.974546697999-0.920829318483j)*x_ref[0]**o + ((-0.561441512877+0.121216031164j))*x_ref[0] + ((0.802795358121+0.709962769609j))*x_ref[1]**o + ((0.346771845282-0.179626406157j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.540270179915-0.708229500578j)*x[0]**o + ((-0.247319356943+0.67445459341j))*x[0] + ((0.974225924313-0.179861387928j))*x[1]**o + ((-0.807802238701-0.443884627768j))*x[1]
+        ref[(2, 1, 1)]=(-0.540270179915-0.708229500578j)*x_ref[0]**o + ((-0.247319356943+0.67445459341j))*x_ref[0] + ((0.974225924313-0.179861387928j))*x_ref[1]**o + ((-0.807802238701-0.443884627768j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.712875233768-0.141418342161j)*x[0]**o + ((-0.284313888061+0.0299408794749j))*x[0] + ((0.190271449197-0.0328652933142j))*x[1]**o + ((0.922460818071+0.928253129128j))*x[1]
+        ref[(2, 1, 2)]=(0.712875233768-0.141418342161j)*x_ref[0]**o + ((-0.284313888061+0.0299408794749j))*x_ref[0] + ((0.190271449197-0.0328652933142j))*x_ref[1]**o + ((0.922460818071+0.928253129128j))*x_ref[1]
+        arg[(2, 1, 3)]=(0.843620645198-0.743210593557j)*x[0]**o + ((0.649642845871-0.999464090994j))*x[0] + ((0.263929048728+0.236794771994j))*x[1]**o + ((-0.934157212482-0.688345647444j))*x[1]
+        ref[(2, 1, 3)]=(0.843620645198-0.743210593557j)*x_ref[0]**o + ((0.649642845871-0.999464090994j))*x_ref[0] + ((0.263929048728+0.236794771994j))*x_ref[1]**o + ((-0.934157212482-0.688345647444j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.000927570635815+0.599583098615j)*x[0]**o + ((0.926145716191+0.995065001668j))*x[0] + ((-0.112037675702-0.221372969803j))*x[1]**o + ((-0.312637785256-0.886511039955j))*x[1]
+        ref[(2, 2, 0)]=(-0.000927570635815+0.599583098615j)*x_ref[0]**o + ((0.926145716191+0.995065001668j))*x_ref[0] + ((-0.112037675702-0.221372969803j))*x_ref[1]**o + ((-0.312637785256-0.886511039955j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.0780245230763-0.248991386369j)*x[0]**o + ((-0.306082378513+0.163569050705j))*x[0] + ((0.804723903841+0.516027112849j))*x[1]**o + ((0.891995138884-0.616256239607j))*x[1]
+        ref[(2, 2, 1)]=(0.0780245230763-0.248991386369j)*x_ref[0]**o + ((-0.306082378513+0.163569050705j))*x_ref[0] + ((0.804723903841+0.516027112849j))*x_ref[1]**o + ((0.891995138884-0.616256239607j))*x_ref[1]
+        arg[(2, 2, 2)]=(-0.715792697703+0.256829799126j)*x[0]**o + ((0.612208351967-0.181393087082j))*x[0] + ((0.758712511332+0.0224776828061j))*x[1]**o + ((-0.231106859672-0.0187601208512j))*x[1]
+        ref[(2, 2, 2)]=(-0.715792697703+0.256829799126j)*x_ref[0]**o + ((0.612208351967-0.181393087082j))*x_ref[0] + ((0.758712511332+0.0224776828061j))*x_ref[1]**o + ((-0.231106859672-0.0187601208512j))*x_ref[1]
+        arg[(2, 2, 3)]=(0.697480271746+0.730522576942j)*x[0]**o + ((0.787707097181-0.0109528935609j))*x[0] + ((-0.383814237152+0.448389419056j))*x[1]**o + ((-0.665958991563-0.920504093463j))*x[1]
+        ref[(2, 2, 3)]=(0.697480271746+0.730522576942j)*x_ref[0]**o + ((0.787707097181-0.0109528935609j))*x_ref[0] + ((-0.383814237152+0.448389419056j))*x_ref[1]**o + ((-0.665958991563-0.920504093463j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.823312747446+0.592439691877j)*x[0]**o + ((0.776716337852+0.835818105991j))*x[0] + ((0.605690885517-0.352153874693j))*x[1]**o + ((-0.182526452746+0.030898054531j))*x[1]
+        ref[(3, 0, 0)]=(-0.823312747446+0.592439691877j)*x_ref[0]**o + ((0.776716337852+0.835818105991j))*x_ref[0] + ((0.605690885517-0.352153874693j))*x_ref[1]**o + ((-0.182526452746+0.030898054531j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.0687950795354+0.533698206895j)*x[0]**o + ((0.712989498642+0.999953389151j))*x[0] + ((-0.427747061402-0.996994137913j))*x[1]**o + ((0.629235159946+0.708997387617j))*x[1]
+        ref[(3, 0, 1)]=(-0.0687950795354+0.533698206895j)*x_ref[0]**o + ((0.712989498642+0.999953389151j))*x_ref[0] + ((-0.427747061402-0.996994137913j))*x_ref[1]**o + ((0.629235159946+0.708997387617j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.709911497462+0.218576253782j)*x[0]**o + ((-0.667159599307+0.179656269516j))*x[0] + ((0.846297472979-0.134223853525j))*x[1]**o + ((-0.382689203353-0.360174937636j))*x[1]
+        ref[(3, 0, 2)]=(0.709911497462+0.218576253782j)*x_ref[0]**o + ((-0.667159599307+0.179656269516j))*x_ref[0] + ((0.846297472979-0.134223853525j))*x_ref[1]**o + ((-0.382689203353-0.360174937636j))*x_ref[1]
+        arg[(3, 0, 3)]=(0.0126847432047+0.117849399289j)*x[0]**o + ((0.782445891554-0.591871928119j))*x[0] + ((-0.397763841263+0.127938516306j))*x[1]**o + ((-0.835370446214-0.0789892566219j))*x[1]
+        ref[(3, 0, 3)]=(0.0126847432047+0.117849399289j)*x_ref[0]**o + ((0.782445891554-0.591871928119j))*x_ref[0] + ((-0.397763841263+0.127938516306j))*x_ref[1]**o + ((-0.835370446214-0.0789892566219j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.762411602332-0.227242813405j)*x[0]**o + ((-0.992473522629+0.134064639222j))*x[0] + ((0.169196775656+0.55929148266j))*x[1]**o + ((-0.244917135066-0.079635701942j))*x[1]
+        ref[(3, 1, 0)]=(-0.762411602332-0.227242813405j)*x_ref[0]**o + ((-0.992473522629+0.134064639222j))*x_ref[0] + ((0.169196775656+0.55929148266j))*x_ref[1]**o + ((-0.244917135066-0.079635701942j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.788466274471+0.420925111584j)*x[0]**o + ((0.460281378312-0.242574135218j))*x[0] + ((0.135768355627-0.00662498685588j))*x[1]**o + ((-0.907259299261+0.0894286279658j))*x[1]
+        ref[(3, 1, 1)]=(-0.788466274471+0.420925111584j)*x_ref[0]**o + ((0.460281378312-0.242574135218j))*x_ref[0] + ((0.135768355627-0.00662498685588j))*x_ref[1]**o + ((-0.907259299261+0.0894286279658j))*x_ref[1]
+        arg[(3, 1, 2)]=(0.0387260584448+0.464394428501j)*x[0]**o + ((-0.724261589341-0.110495379739j))*x[0] + ((0.438585573014+0.294031522785j))*x[1]**o + ((0.915420632694-0.740131919177j))*x[1]
+        ref[(3, 1, 2)]=(0.0387260584448+0.464394428501j)*x_ref[0]**o + ((-0.724261589341-0.110495379739j))*x_ref[0] + ((0.438585573014+0.294031522785j))*x_ref[1]**o + ((0.915420632694-0.740131919177j))*x_ref[1]
+        arg[(3, 1, 3)]=(0.0292238886489-0.826028514606j)*x[0]**o + ((0.181898659326-0.410619932911j))*x[0] + ((-0.927850292056-0.407280960329j))*x[1]**o + ((0.945911176196+0.390470680443j))*x[1]
+        ref[(3, 1, 3)]=(0.0292238886489-0.826028514606j)*x_ref[0]**o + ((0.181898659326-0.410619932911j))*x_ref[0] + ((-0.927850292056-0.407280960329j))*x_ref[1]**o + ((0.945911176196+0.390470680443j))*x_ref[1]
+        arg[(3, 2, 0)]=(-0.934088384368-0.294020755275j)*x[0]**o + ((0.778051813033-0.0185394757687j))*x[0] + ((0.732321526445-0.148230501242j))*x[1]**o + ((0.823476296216+0.208158189412j))*x[1]
+        ref[(3, 2, 0)]=(-0.934088384368-0.294020755275j)*x_ref[0]**o + ((0.778051813033-0.0185394757687j))*x_ref[0] + ((0.732321526445-0.148230501242j))*x_ref[1]**o + ((0.823476296216+0.208158189412j))*x_ref[1]
+        arg[(3, 2, 1)]=(0.964282435447-0.862534124307j)*x[0]**o + ((0.835572260896-0.921261132705j))*x[0] + ((0.0924149646836-0.928288771507j))*x[1]**o + ((-0.240854453843+0.927091019527j))*x[1]
+        ref[(3, 2, 1)]=(0.964282435447-0.862534124307j)*x_ref[0]**o + ((0.835572260896-0.921261132705j))*x_ref[0] + ((0.0924149646836-0.928288771507j))*x_ref[1]**o + ((-0.240854453843+0.927091019527j))*x_ref[1]
+        arg[(3, 2, 2)]=(-0.61702157407-0.707932116709j)*x[0]**o + ((0.234650107628+0.916178248132j))*x[0] + ((-0.616537681418-0.231969721801j))*x[1]**o + ((-0.112721015636+0.252053682011j))*x[1]
+        ref[(3, 2, 2)]=(-0.61702157407-0.707932116709j)*x_ref[0]**o + ((0.234650107628+0.916178248132j))*x_ref[0] + ((-0.616537681418-0.231969721801j))*x_ref[1]**o + ((-0.112721015636+0.252053682011j))*x_ref[1]
+        arg[(3, 2, 3)]=(-0.774401597635-0.705067434598j)*x[0]**o + ((0.786414486086-0.975475618726j))*x[0] + ((-0.631721971498-0.074665943739j))*x[1]**o + ((0.519641896137-0.0143600507066j))*x[1]
+        ref[(3, 2, 3)]=(-0.774401597635-0.705067434598j)*x_ref[0]**o + ((0.786414486086-0.975475618726j))*x_ref[0] + ((-0.631721971498-0.074665943739j))*x_ref[1]**o + ((0.519641896137-0.0143600507066j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.628891272714-0.273169431348j)*x[2]**o + ((0.954790517826-0.801707960114j))*x[2]
+            ref[(0, 0, 0)]+=(0.628891272714-0.273169431348j)*x_ref[2]**o + ((0.954790517826-0.801707960114j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.644605032235+0.322785669518j)*x[2]**o + ((0.644081067683+0.655059695443j))*x[2]
+            ref[(0, 0, 1)]+=(0.644605032235+0.322785669518j)*x_ref[2]**o + ((0.644081067683+0.655059695443j))*x_ref[2]
+            arg[(0, 0, 2)]+=(8.33378638272e-05+0.44848979828j)*x[2]**o + ((0.757956529801+0.0589622891041j))*x[2]
+            ref[(0, 0, 2)]+=(8.33378638272e-05+0.44848979828j)*x_ref[2]**o + ((0.757956529801+0.0589622891041j))*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.45329607169+0.853880392747j)*x[2]**o + ((0.758976374147-0.373205496488j))*x[2]
+            ref[(0, 0, 3)]+=(-0.45329607169+0.853880392747j)*x_ref[2]**o + ((0.758976374147-0.373205496488j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.240715489644-0.387440142662j)*x[2]**o + ((0.715374697655-0.0402040796753j))*x[2]
+            ref[(0, 1, 0)]+=(-0.240715489644-0.387440142662j)*x_ref[2]**o + ((0.715374697655-0.0402040796753j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.19565108149+0.683142768249j)*x[2]**o + ((0.121381780381+0.815653489596j))*x[2]
+            ref[(0, 1, 1)]+=(-0.19565108149+0.683142768249j)*x_ref[2]**o + ((0.121381780381+0.815653489596j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.666059809613-0.573275490745j)*x[2]**o + ((-0.477735356292-0.675655175921j))*x[2]
+            ref[(0, 1, 2)]+=(-0.666059809613-0.573275490745j)*x_ref[2]**o + ((-0.477735356292-0.675655175921j))*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.668963744615+0.721306143489j)*x[2]**o + ((0.426685019318-0.766464557871j))*x[2]
+            ref[(0, 1, 3)]+=(-0.668963744615+0.721306143489j)*x_ref[2]**o + ((0.426685019318-0.766464557871j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.874981106247-0.663514713342j)*x[2]**o + ((0.415874347948+0.194030835306j))*x[2]
+            ref[(0, 2, 0)]+=(-0.874981106247-0.663514713342j)*x_ref[2]**o + ((0.415874347948+0.194030835306j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.726342731991-0.239137520921j)*x[2]**o + ((0.848607363558-0.0996838400009j))*x[2]
+            ref[(0, 2, 1)]+=(-0.726342731991-0.239137520921j)*x_ref[2]**o + ((0.848607363558-0.0996838400009j))*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.62644211976+0.103143211583j)*x[2]**o + ((0.227852081585-0.150331491472j))*x[2]
+            ref[(0, 2, 2)]+=(-0.62644211976+0.103143211583j)*x_ref[2]**o + ((0.227852081585-0.150331491472j))*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.390454524886+0.709320411928j)*x[2]**o + ((-0.630217183148-0.75523881545j))*x[2]
+            ref[(0, 2, 3)]+=(-0.390454524886+0.709320411928j)*x_ref[2]**o + ((-0.630217183148-0.75523881545j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.942874471397-0.319768414397j)*x[2]**o + ((0.996583529735-0.231084225913j))*x[2]
+            ref[(1, 0, 0)]+=(-0.942874471397-0.319768414397j)*x_ref[2]**o + ((0.996583529735-0.231084225913j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.415889734465-0.0708295001514j)*x[2]**o + ((-0.904548587439-0.639164244676j))*x[2]
+            ref[(1, 0, 1)]+=(0.415889734465-0.0708295001514j)*x_ref[2]**o + ((-0.904548587439-0.639164244676j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.096417382201-0.207168475098j)*x[2]**o + ((0.559975270721+0.164014823711j))*x[2]
+            ref[(1, 0, 2)]+=(0.096417382201-0.207168475098j)*x_ref[2]**o + ((0.559975270721+0.164014823711j))*x_ref[2]
+            arg[(1, 0, 3)]+=(0.109219275125+0.438104863245j)*x[2]**o + ((0.87337460635+0.663647530521j))*x[2]
+            ref[(1, 0, 3)]+=(0.109219275125+0.438104863245j)*x_ref[2]**o + ((0.87337460635+0.663647530521j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.838149301645-0.436644837966j)*x[2]**o + ((-0.742119360486-0.634844397444j))*x[2]
+            ref[(1, 1, 0)]+=(0.838149301645-0.436644837966j)*x_ref[2]**o + ((-0.742119360486-0.634844397444j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.762521281967-0.669330813713j)*x[2]**o + ((0.685756013737-0.147128608595j))*x[2]
+            ref[(1, 1, 1)]+=(0.762521281967-0.669330813713j)*x_ref[2]**o + ((0.685756013737-0.147128608595j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.711508357982-0.742088253579j)*x[2]**o + ((0.538832808895-0.473069270728j))*x[2]
+            ref[(1, 1, 2)]+=(-0.711508357982-0.742088253579j)*x_ref[2]**o + ((0.538832808895-0.473069270728j))*x_ref[2]
+            arg[(1, 1, 3)]+=(-0.328369970671-0.885749481202j)*x[2]**o + ((-0.558640233362+0.387548240367j))*x[2]
+            ref[(1, 1, 3)]+=(-0.328369970671-0.885749481202j)*x_ref[2]**o + ((-0.558640233362+0.387548240367j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.448115093368-0.900511107576j)*x[2]**o + ((0.731404489529-0.0032375193189j))*x[2]
+            ref[(1, 2, 0)]+=(0.448115093368-0.900511107576j)*x_ref[2]**o + ((0.731404489529-0.0032375193189j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.172138295506-0.960715050633j)*x[2]**o + ((-0.0139621042174+0.958027055885j))*x[2]
+            ref[(1, 2, 1)]+=(0.172138295506-0.960715050633j)*x_ref[2]**o + ((-0.0139621042174+0.958027055885j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.342232189169-0.65261579548j)*x[2]**o + ((-0.66145796969+0.588384948387j))*x[2]
+            ref[(1, 2, 2)]+=(0.342232189169-0.65261579548j)*x_ref[2]**o + ((-0.66145796969+0.588384948387j))*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.171159345721+0.227884824584j)*x[2]**o + ((-0.0952040066524-0.703450868724j))*x[2]
+            ref[(1, 2, 3)]+=(-0.171159345721+0.227884824584j)*x_ref[2]**o + ((-0.0952040066524-0.703450868724j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.468593041285+0.684938534155j)*x[2]**o + ((-0.960472098384-0.842468236904j))*x[2]
+            ref[(2, 0, 0)]+=(0.468593041285+0.684938534155j)*x_ref[2]**o + ((-0.960472098384-0.842468236904j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.503257592574-0.816099264532j)*x[2]**o + ((0.401352822512+0.497547688125j))*x[2]
+            ref[(2, 0, 1)]+=(0.503257592574-0.816099264532j)*x_ref[2]**o + ((0.401352822512+0.497547688125j))*x_ref[2]
+            arg[(2, 0, 2)]+=(0.886975741526+0.737595128553j)*x[2]**o + ((0.273350639371-0.931687928138j))*x[2]
+            ref[(2, 0, 2)]+=(0.886975741526+0.737595128553j)*x_ref[2]**o + ((0.273350639371-0.931687928138j))*x_ref[2]
+            arg[(2, 0, 3)]+=(-0.976327592756+0.282160213653j)*x[2]**o + ((0.126803768003-0.494068096762j))*x[2]
+            ref[(2, 0, 3)]+=(-0.976327592756+0.282160213653j)*x_ref[2]**o + ((0.126803768003-0.494068096762j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.942279834517-0.345119839066j)*x[2]**o + ((0.297205419634+0.277796244245j))*x[2]
+            ref[(2, 1, 0)]+=(-0.942279834517-0.345119839066j)*x_ref[2]**o + ((0.297205419634+0.277796244245j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.111463396619-0.308833475896j)*x[2]**o + ((-0.467038799032+0.243610358188j))*x[2]
+            ref[(2, 1, 1)]+=(0.111463396619-0.308833475896j)*x_ref[2]**o + ((-0.467038799032+0.243610358188j))*x_ref[2]
+            arg[(2, 1, 2)]+=(0.0780599018412-0.988479387173j)*x[2]**o + ((-0.316443231395+0.219041786618j))*x[2]
+            ref[(2, 1, 2)]+=(0.0780599018412-0.988479387173j)*x_ref[2]**o + ((-0.316443231395+0.219041786618j))*x_ref[2]
+            arg[(2, 1, 3)]+=(0.838151131961-0.0117496339768j)*x[2]**o + ((-0.272634588035+0.611886393425j))*x[2]
+            ref[(2, 1, 3)]+=(0.838151131961-0.0117496339768j)*x_ref[2]**o + ((-0.272634588035+0.611886393425j))*x_ref[2]
+            arg[(2, 2, 0)]+=(0.688217251834-0.760018312481j)*x[2]**o + ((0.278596195391+0.19192530753j))*x[2]
+            ref[(2, 2, 0)]+=(0.688217251834-0.760018312481j)*x_ref[2]**o + ((0.278596195391+0.19192530753j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.668568077279+0.15139112824j)*x[2]**o + ((0.0594914072045-0.769450260752j))*x[2]
+            ref[(2, 2, 1)]+=(0.668568077279+0.15139112824j)*x_ref[2]**o + ((0.0594914072045-0.769450260752j))*x_ref[2]
+            arg[(2, 2, 2)]+=(0.334049040017+0.513881416731j)*x[2]**o + ((-0.899867921304+0.697421728621j))*x[2]
+            ref[(2, 2, 2)]+=(0.334049040017+0.513881416731j)*x_ref[2]**o + ((-0.899867921304+0.697421728621j))*x_ref[2]
+            arg[(2, 2, 3)]+=(-0.878538804265-0.913881732487j)*x[2]**o + ((-0.29090175603-0.173776012492j))*x[2]
+            ref[(2, 2, 3)]+=(-0.878538804265-0.913881732487j)*x_ref[2]**o + ((-0.29090175603-0.173776012492j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.847040111546-0.72932292965j)*x[2]**o + ((-0.267479728957-0.506959918165j))*x[2]
+            ref[(3, 0, 0)]+=(0.847040111546-0.72932292965j)*x_ref[2]**o + ((-0.267479728957-0.506959918165j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.783313125524-0.217526838407j)*x[2]**o + ((-0.074189488077-0.265106884999j))*x[2]
+            ref[(3, 0, 1)]+=(0.783313125524-0.217526838407j)*x_ref[2]**o + ((-0.074189488077-0.265106884999j))*x_ref[2]
+            arg[(3, 0, 2)]+=(-0.823151993741+0.160562364599j)*x[2]**o + ((-0.51788516759+0.175775467266j))*x[2]
+            ref[(3, 0, 2)]+=(-0.823151993741+0.160562364599j)*x_ref[2]**o + ((-0.51788516759+0.175775467266j))*x_ref[2]
+            arg[(3, 0, 3)]+=(0.242870798793+0.710015341798j)*x[2]**o + ((0.258041697124+0.42348800293j))*x[2]
+            ref[(3, 0, 3)]+=(0.242870798793+0.710015341798j)*x_ref[2]**o + ((0.258041697124+0.42348800293j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.0527158523902+0.427686759531j)*x[2]**o + ((-0.129192111002+0.00413158371936j))*x[2]
+            ref[(3, 1, 0)]+=(-0.0527158523902+0.427686759531j)*x_ref[2]**o + ((-0.129192111002+0.00413158371936j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.263673361032-0.220439827915j)*x[2]**o + ((-0.873434059054-0.941159494735j))*x[2]
+            ref[(3, 1, 1)]+=(0.263673361032-0.220439827915j)*x_ref[2]**o + ((-0.873434059054-0.941159494735j))*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.613824724876-0.851952489928j)*x[2]**o + ((0.0645621357539-0.913612415095j))*x[2]
+            ref[(3, 1, 2)]+=(-0.613824724876-0.851952489928j)*x_ref[2]**o + ((0.0645621357539-0.913612415095j))*x_ref[2]
+            arg[(3, 1, 3)]+=(-0.14482872368+0.711005151507j)*x[2]**o + ((-0.702313997095-0.37771164889j))*x[2]
+            ref[(3, 1, 3)]+=(-0.14482872368+0.711005151507j)*x_ref[2]**o + ((-0.702313997095-0.37771164889j))*x_ref[2]
+            arg[(3, 2, 0)]+=(0.379701099896+0.832737335409j)*x[2]**o + ((-0.986078876796-0.843055666632j))*x[2]
+            ref[(3, 2, 0)]+=(0.379701099896+0.832737335409j)*x_ref[2]**o + ((-0.986078876796-0.843055666632j))*x_ref[2]
+            arg[(3, 2, 1)]+=(-0.926508351459-0.762967517669j)*x[2]**o + ((-0.0922556034784-0.153264855573j))*x[2]
+            ref[(3, 2, 1)]+=(-0.926508351459-0.762967517669j)*x_ref[2]**o + ((-0.0922556034784-0.153264855573j))*x_ref[2]
+            arg[(3, 2, 2)]+=(-0.705324722449+0.226159778665j)*x[2]**o + ((0.0454596776717-0.942935600738j))*x[2]
+            ref[(3, 2, 2)]+=(-0.705324722449+0.226159778665j)*x_ref[2]**o + ((0.0454596776717-0.942935600738j))*x_ref[2]
+            arg[(3, 2, 3)]+=(0.508167403948+0.226029121242j)*x[2]**o + ((-0.0962348489666-0.583550982382j))*x[2]
+            ref[(3, 2, 3)]+=(0.508167403948+0.226029121242j)*x_ref[2]**o + ((-0.0962348489666-0.583550982382j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 2, 4),w)
+        ref = Data(0,(3, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(0.932932556965-0.156399099421j)*x[0]**o + ((0.177522896692+0.905949152271j))*x[0] + ((0.446596910044-0.713583453876j))*x[1]**o + ((-0.991377640891-0.843107033381j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.932932556965-0.156399099421j)*x_ref[0]**o + ((0.177522896692+0.905949152271j))*x_ref[0] + ((0.446596910044-0.713583453876j))*x_ref[1]**o + ((-0.991377640891-0.843107033381j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.613778670032+0.260232332906j)*x[0]**o + ((-0.436178193308-0.935961289036j))*x[0] + ((0.0321857400082+0.805356842058j))*x[1]**o + ((-0.602663285054+0.0839825174588j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.613778670032+0.260232332906j)*x_ref[0]**o + ((-0.436178193308-0.935961289036j))*x_ref[0] + ((0.0321857400082+0.805356842058j))*x_ref[1]**o + ((-0.602663285054+0.0839825174588j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.157516694328+0.878933826392j)*x[0]**o + ((0.978810371626+0.762109983702j))*x[0] + ((-0.429443118339+0.538382325594j))*x[1]**o + ((0.182995939102-0.632056800568j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.157516694328+0.878933826392j)*x_ref[0]**o + ((0.978810371626+0.762109983702j))*x_ref[0] + ((-0.429443118339+0.538382325594j))*x_ref[1]**o + ((0.182995939102-0.632056800568j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.00220866856706+0.224219039658j)*x[0]**o + ((0.191751017375-0.219000999065j))*x[0] + ((0.269469291869+0.106482788084j))*x[1]**o + ((0.865796200313+0.428207624754j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.00220866856706+0.224219039658j)*x_ref[0]**o + ((0.191751017375-0.219000999065j))*x_ref[0] + ((0.269469291869+0.106482788084j))*x_ref[1]**o + ((0.865796200313+0.428207624754j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.0700748890642+0.633529236977j)*x[0]**o + ((-0.652384609338-0.283662739153j))*x[0] + ((-0.960857712678-0.951904926361j))*x[1]**o + ((0.100406128787-0.356169998835j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.0700748890642+0.633529236977j)*x_ref[0]**o + ((-0.652384609338-0.283662739153j))*x_ref[0] + ((-0.960857712678-0.951904926361j))*x_ref[1]**o + ((0.100406128787-0.356169998835j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.419899887803-0.304049149331j)*x[0]**o + ((0.356571814954+0.462903320585j))*x[0] + ((0.7432053687+0.226735613361j))*x[1]**o + ((0.67969636484+0.676179808441j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.419899887803-0.304049149331j)*x_ref[0]**o + ((0.356571814954+0.462903320585j))*x_ref[0] + ((0.7432053687+0.226735613361j))*x_ref[1]**o + ((0.67969636484+0.676179808441j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.58728300581+0.765725265132j)*x[0]**o + ((-0.186816317559-0.575470962069j))*x[0] + ((0.430272579294-0.0297176633095j))*x[1]**o + ((0.665315844017-0.89974211895j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.58728300581+0.765725265132j)*x_ref[0]**o + ((-0.186816317559-0.575470962069j))*x_ref[0] + ((0.430272579294-0.0297176633095j))*x_ref[1]**o + ((0.665315844017-0.89974211895j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.899761144419+0.384645093029j)*x[0]**o + ((-0.157478764439+0.616731684958j))*x[0] + ((-0.66272097941+0.0549116728702j))*x[1]**o + ((0.282455205547-0.95451106318j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.899761144419+0.384645093029j)*x_ref[0]**o + ((-0.157478764439+0.616731684958j))*x_ref[0] + ((-0.66272097941+0.0549116728702j))*x_ref[1]**o + ((0.282455205547-0.95451106318j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.518389523964-0.886244965444j)*x[0]**o + ((-0.563678680959-0.944394478464j))*x[0] + ((-0.862797115916+0.928248856141j))*x[1]**o + ((0.558094485215+0.588753687631j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.518389523964-0.886244965444j)*x_ref[0]**o + ((-0.563678680959-0.944394478464j))*x_ref[0] + ((-0.862797115916+0.928248856141j))*x_ref[1]**o + ((0.558094485215+0.588753687631j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.775177153467+0.653483675785j)*x[0]**o + ((0.593096935615+0.53677197567j))*x[0] + ((0.373654604215-0.143642375178j))*x[1]**o + ((-0.78995240821+0.245605350968j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.775177153467+0.653483675785j)*x_ref[0]**o + ((0.593096935615+0.53677197567j))*x_ref[0] + ((0.373654604215-0.143642375178j))*x_ref[1]**o + ((-0.78995240821+0.245605350968j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.0645839189099+0.85399183776j)*x[0]**o + ((-0.878268944404+0.120459884292j))*x[0] + ((-0.73045092168-0.626857043697j))*x[1]**o + ((-0.554340956029-0.821705643831j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.0645839189099+0.85399183776j)*x_ref[0]**o + ((-0.878268944404+0.120459884292j))*x_ref[0] + ((-0.73045092168-0.626857043697j))*x_ref[1]**o + ((-0.554340956029-0.821705643831j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.40235502957-0.24379584555j)*x[0]**o + ((-0.0851445832479-0.0120167949217j))*x[0] + ((-0.319256692723-0.657179451849j))*x[1]**o + ((0.117072452947-0.147254602014j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.40235502957-0.24379584555j)*x_ref[0]**o + ((-0.0851445832479-0.0120167949217j))*x_ref[0] + ((-0.319256692723-0.657179451849j))*x_ref[1]**o + ((0.117072452947-0.147254602014j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.711529201359+0.220798206318j)*x[0]**o + ((-0.409169068349+0.91863054075j))*x[0] + ((0.225464865141-0.072465133928j))*x[1]**o + ((0.850708700705+0.934367580095j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.711529201359+0.220798206318j)*x_ref[0]**o + ((-0.409169068349+0.91863054075j))*x_ref[0] + ((0.225464865141-0.072465133928j))*x_ref[1]**o + ((0.850708700705+0.934367580095j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.559856783725+0.257657586537j)*x[0]**o + ((0.395978999145+0.718383130089j))*x[0] + ((-0.392899915269+0.775195464828j))*x[1]**o + ((-0.191433469754+0.951005560821j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.559856783725+0.257657586537j)*x_ref[0]**o + ((0.395978999145+0.718383130089j))*x_ref[0] + ((-0.392899915269+0.775195464828j))*x_ref[1]**o + ((-0.191433469754+0.951005560821j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.0395497647875-0.162835136512j)*x[0]**o + ((0.32000489721+0.089493206321j))*x[0] + ((-0.835508308434+0.678814805456j))*x[1]**o + ((0.469217460263+0.356609753715j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.0395497647875-0.162835136512j)*x_ref[0]**o + ((0.32000489721+0.089493206321j))*x_ref[0] + ((-0.835508308434+0.678814805456j))*x_ref[1]**o + ((0.469217460263+0.356609753715j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.55335891425+0.0437376376568j)*x[0]**o + ((0.0342618779942+0.732944176552j))*x[0] + ((0.102572044742-0.838445033939j))*x[1]**o + ((0.387974830133+0.314491363813j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.55335891425+0.0437376376568j)*x_ref[0]**o + ((0.0342618779942+0.732944176552j))*x_ref[0] + ((0.102572044742-0.838445033939j))*x_ref[1]**o + ((0.387974830133+0.314491363813j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.189360043531+0.308758110104j)*x[0]**o + ((-0.0657606445038-0.235911495295j))*x[0] + ((0.997316999253-0.401455277106j))*x[1]**o + ((-0.425957589633+0.654537213831j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.189360043531+0.308758110104j)*x_ref[0]**o + ((-0.0657606445038-0.235911495295j))*x_ref[0] + ((0.997316999253-0.401455277106j))*x_ref[1]**o + ((-0.425957589633+0.654537213831j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.698485531456-0.735938106722j)*x[0]**o + ((-0.166970516885+0.61842866682j))*x[0] + ((-0.426611289073+0.511664136269j))*x[1]**o + ((-0.00419977778225-0.256368388334j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.698485531456-0.735938106722j)*x_ref[0]**o + ((-0.166970516885+0.61842866682j))*x_ref[0] + ((-0.426611289073+0.511664136269j))*x_ref[1]**o + ((-0.00419977778225-0.256368388334j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.73563025132-0.103007838025j)*x[0]**o + ((0.44695305555+0.265265644674j))*x[0] + ((-0.605066983859+0.0803820781983j))*x[1]**o + ((0.19300257081-0.638540845129j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.73563025132-0.103007838025j)*x_ref[0]**o + ((0.44695305555+0.265265644674j))*x_ref[0] + ((-0.605066983859+0.0803820781983j))*x_ref[1]**o + ((0.19300257081-0.638540845129j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.0701784413298+0.564962525669j)*x[0]**o + ((-0.675197469912+0.573614488631j))*x[0] + ((-0.700267960124+0.108234392919j))*x[1]**o + ((0.954577136355-0.881287370239j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.0701784413298+0.564962525669j)*x_ref[0]**o + ((-0.675197469912+0.573614488631j))*x_ref[0] + ((-0.700267960124+0.108234392919j))*x_ref[1]**o + ((0.954577136355-0.881287370239j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.639834274933-0.897473777555j)*x[0]**o + ((0.728496903506+0.525732570653j))*x[0] + ((-0.369592606538+0.739502421513j))*x[1]**o + ((0.500892717527+0.45810379473j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.639834274933-0.897473777555j)*x_ref[0]**o + ((0.728496903506+0.525732570653j))*x_ref[0] + ((-0.369592606538+0.739502421513j))*x_ref[1]**o + ((0.500892717527+0.45810379473j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.176032272158+0.74726698089j)*x[0]**o + ((0.336379677937+0.120740599762j))*x[0] + ((-0.0486648621572+0.371064215143j))*x[1]**o + ((-0.479299427144-0.658467635609j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.176032272158+0.74726698089j)*x_ref[0]**o + ((0.336379677937+0.120740599762j))*x_ref[0] + ((-0.0486648621572+0.371064215143j))*x_ref[1]**o + ((-0.479299427144-0.658467635609j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.336890917599-0.189587994952j)*x[0]**o + ((-0.306491544027+0.227571202019j))*x[0] + ((-0.0521627488798-0.0738521507507j))*x[1]**o + ((0.404644498032+0.384294910427j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.336890917599-0.189587994952j)*x_ref[0]**o + ((-0.306491544027+0.227571202019j))*x_ref[0] + ((-0.0521627488798-0.0738521507507j))*x_ref[1]**o + ((0.404644498032+0.384294910427j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.911375749226+0.0363359943137j)*x[0]**o + ((0.704169991001-0.246011999548j))*x[0] + ((0.310232294963+0.528570075269j))*x[1]**o + ((0.0989582618956-0.219231747968j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.911375749226+0.0363359943137j)*x_ref[0]**o + ((0.704169991001-0.246011999548j))*x_ref[0] + ((0.310232294963+0.528570075269j))*x_ref[1]**o + ((0.0989582618956-0.219231747968j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.502335285861+0.871053198092j)*x[0]**o + ((-0.423552892301+0.196903431156j))*x[0] + ((-0.076727758663+0.951014493931j))*x[1]**o + ((0.353838168404+0.285806952955j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.502335285861+0.871053198092j)*x_ref[0]**o + ((-0.423552892301+0.196903431156j))*x_ref[0] + ((-0.076727758663+0.951014493931j))*x_ref[1]**o + ((0.353838168404+0.285806952955j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.0352953086941+0.031563953457j)*x[0]**o + ((0.00518985983552-0.715437289509j))*x[0] + ((-0.973659993913-0.0758609968819j))*x[1]**o + ((0.883396086593+0.912869887709j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.0352953086941+0.031563953457j)*x_ref[0]**o + ((0.00518985983552-0.715437289509j))*x_ref[0] + ((-0.973659993913-0.0758609968819j))*x_ref[1]**o + ((0.883396086593+0.912869887709j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.0662717504651-0.206947030282j)*x[0]**o + ((-0.831698038677-0.713546325812j))*x[0] + ((0.6156680741+0.464904880109j))*x[1]**o + ((-0.337086850609+0.410280547429j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.0662717504651-0.206947030282j)*x_ref[0]**o + ((-0.831698038677-0.713546325812j))*x_ref[0] + ((0.6156680741+0.464904880109j))*x_ref[1]**o + ((-0.337086850609+0.410280547429j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.692089369234+0.904336567384j)*x[0]**o + ((0.985034803808-0.747867542039j))*x[0] + ((0.221126810987+0.517704353386j))*x[1]**o + ((0.535625876668-0.246578326384j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.692089369234+0.904336567384j)*x_ref[0]**o + ((0.985034803808-0.747867542039j))*x_ref[0] + ((0.221126810987+0.517704353386j))*x_ref[1]**o + ((0.535625876668-0.246578326384j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.197200253425+0.631105253647j)*x[0]**o + ((0.18216082029+0.17885280529j))*x[0] + ((0.40949495584-0.62452192106j))*x[1]**o + ((0.326298892792+0.329795165146j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.197200253425+0.631105253647j)*x_ref[0]**o + ((0.18216082029+0.17885280529j))*x_ref[0] + ((0.40949495584-0.62452192106j))*x_ref[1]**o + ((0.326298892792+0.329795165146j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.399839826048-0.756831118351j)*x[0]**o + ((0.950831864494-0.603111121786j))*x[0] + ((-0.253828872273-0.0960929300692j))*x[1]**o + ((-0.635935213577-0.113783578354j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.399839826048-0.756831118351j)*x_ref[0]**o + ((0.950831864494-0.603111121786j))*x_ref[0] + ((-0.253828872273-0.0960929300692j))*x_ref[1]**o + ((-0.635935213577-0.113783578354j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.636862392746-0.758918853901j)*x[0]**o + ((-0.282683735258-0.454931824972j))*x[0] + ((-0.023396386239-0.00777656635258j))*x[1]**o + ((-0.393389292753+0.392602000123j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.636862392746-0.758918853901j)*x_ref[0]**o + ((-0.282683735258-0.454931824972j))*x_ref[0] + ((-0.023396386239-0.00777656635258j))*x_ref[1]**o + ((-0.393389292753+0.392602000123j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.710134324746+0.502650856445j)*x[0]**o + ((0.0346114434446+0.879401355762j))*x[0] + ((0.485299416822-0.96194795026j))*x[1]**o + ((0.923036602608-0.480376257878j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.710134324746+0.502650856445j)*x_ref[0]**o + ((0.0346114434446+0.879401355762j))*x_ref[0] + ((0.485299416822-0.96194795026j))*x_ref[1]**o + ((0.923036602608-0.480376257878j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.404767665041-0.890346010961j)*x[0]**o + ((0.380605007541-0.611935847064j))*x[0] + ((0.472595440517+0.825476024701j))*x[1]**o + ((-0.0370093962557+0.983876540487j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.404767665041-0.890346010961j)*x_ref[0]**o + ((0.380605007541-0.611935847064j))*x_ref[0] + ((0.472595440517+0.825476024701j))*x_ref[1]**o + ((-0.0370093962557+0.983876540487j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.49792565272+0.0830662854312j)*x[0]**o + ((-0.000613786361687-0.933535507167j))*x[0] + ((-0.635051073026+0.550225883948j))*x[1]**o + ((0.674696591696-0.389089772232j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.49792565272+0.0830662854312j)*x_ref[0]**o + ((-0.000613786361687-0.933535507167j))*x_ref[0] + ((-0.635051073026+0.550225883948j))*x_ref[1]**o + ((0.674696591696-0.389089772232j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.66261748896+0.67159300171j)*x[0]**o + ((0.903200981904+0.0570463288985j))*x[0] + ((-0.491338078931-0.769423559348j))*x[1]**o + ((0.336079717395+0.251211200427j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.66261748896+0.67159300171j)*x_ref[0]**o + ((0.903200981904+0.0570463288985j))*x_ref[0] + ((-0.491338078931-0.769423559348j))*x_ref[1]**o + ((0.336079717395+0.251211200427j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(0.392540463736+0.0669402858652j)*x[0]**o + ((0.574829867161-0.938181899475j))*x[0] + ((-0.333900852198-0.899488232006j))*x[1]**o + ((-0.695261579602-0.958082337781j))*x[1]
+        ref[(2, 0, 0, 3)]=(0.392540463736+0.0669402858652j)*x_ref[0]**o + ((0.574829867161-0.938181899475j))*x_ref[0] + ((-0.333900852198-0.899488232006j))*x_ref[1]**o + ((-0.695261579602-0.958082337781j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.080492786115+0.483586815619j)*x[0]**o + ((-0.853401971148-0.0670602806839j))*x[0] + ((-0.0442559250325-0.496112820543j))*x[1]**o + ((0.817515153816-0.609386730135j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.080492786115+0.483586815619j)*x_ref[0]**o + ((-0.853401971148-0.0670602806839j))*x_ref[0] + ((-0.0442559250325-0.496112820543j))*x_ref[1]**o + ((0.817515153816-0.609386730135j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.0752498053757-0.390971817641j)*x[0]**o + ((-0.279231126642-0.0110514673122j))*x[0] + ((-0.714571219685-0.0375589502681j))*x[1]**o + ((0.601225380838+0.0840236584079j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.0752498053757-0.390971817641j)*x_ref[0]**o + ((-0.279231126642-0.0110514673122j))*x_ref[0] + ((-0.714571219685-0.0375589502681j))*x_ref[1]**o + ((0.601225380838+0.0840236584079j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.786020682988+0.597747103685j)*x[0]**o + ((0.99633357742-0.116527795194j))*x[0] + ((-0.693848477378+0.090570191081j))*x[1]**o + ((0.0350505855978-0.897406571608j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.786020682988+0.597747103685j)*x_ref[0]**o + ((0.99633357742-0.116527795194j))*x_ref[0] + ((-0.693848477378+0.090570191081j))*x_ref[1]**o + ((0.0350505855978-0.897406571608j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(0.0543844818793-0.287578500304j)*x[0]**o + ((0.622638058315-0.865598959197j))*x[0] + ((0.624268189009+0.197730343835j))*x[1]**o + ((0.729554354162+0.912681060422j))*x[1]
+        ref[(2, 0, 1, 3)]=(0.0543844818793-0.287578500304j)*x_ref[0]**o + ((0.622638058315-0.865598959197j))*x_ref[0] + ((0.624268189009+0.197730343835j))*x_ref[1]**o + ((0.729554354162+0.912681060422j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.413605864709-0.766218819144j)*x[0]**o + ((0.518842980745+0.929913822379j))*x[0] + ((0.452274968488-0.0946212680859j))*x[1]**o + ((0.290335714253-0.793252892322j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.413605864709-0.766218819144j)*x_ref[0]**o + ((0.518842980745+0.929913822379j))*x_ref[0] + ((0.452274968488-0.0946212680859j))*x_ref[1]**o + ((0.290335714253-0.793252892322j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.0894461714738+0.899747557447j)*x[0]**o + ((0.131557719304-0.476426166767j))*x[0] + ((-0.511526126588+0.439840850218j))*x[1]**o + ((-0.930288891089-0.161583568968j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.0894461714738+0.899747557447j)*x_ref[0]**o + ((0.131557719304-0.476426166767j))*x_ref[0] + ((-0.511526126588+0.439840850218j))*x_ref[1]**o + ((-0.930288891089-0.161583568968j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.231681499324-0.652429134467j)*x[0]**o + ((-0.564065645831+0.0476237513446j))*x[0] + ((0.828234675366+0.113890671305j))*x[1]**o + ((0.711085833188+0.186855042592j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.231681499324-0.652429134467j)*x_ref[0]**o + ((-0.564065645831+0.0476237513446j))*x_ref[0] + ((0.828234675366+0.113890671305j))*x_ref[1]**o + ((0.711085833188+0.186855042592j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.32013673986-0.0200264380613j)*x[0]**o + ((0.254752211152-0.930471014493j))*x[0] + ((0.776092507599-0.440622753098j))*x[1]**o + ((-0.591376710147-0.387714318222j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.32013673986-0.0200264380613j)*x_ref[0]**o + ((0.254752211152-0.930471014493j))*x_ref[0] + ((0.776092507599-0.440622753098j))*x_ref[1]**o + ((-0.591376710147-0.387714318222j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.161914030565-0.28827403925j)*x[0]**o + ((0.933325530444+0.912547647968j))*x[0] + ((-0.36029183648-0.201678358271j))*x[1]**o + ((-0.337085932669+0.663682436784j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.161914030565-0.28827403925j)*x_ref[0]**o + ((0.933325530444+0.912547647968j))*x_ref[0] + ((-0.36029183648-0.201678358271j))*x_ref[1]**o + ((-0.337085932669+0.663682436784j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.495886442321+0.442251884574j)*x[0]**o + ((-0.0639269189836-0.813901258894j))*x[0] + ((-0.645334260344+0.898428737324j))*x[1]**o + ((0.813621150431+0.478857521154j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.495886442321+0.442251884574j)*x_ref[0]**o + ((-0.0639269189836-0.813901258894j))*x_ref[0] + ((-0.645334260344+0.898428737324j))*x_ref[1]**o + ((0.813621150431+0.478857521154j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.784958567212-0.475905035563j)*x[0]**o + ((-0.785522409494+0.460047437877j))*x[0] + ((0.538479430851+0.934233886674j))*x[1]**o + ((0.662406001814-0.684757262612j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.784958567212-0.475905035563j)*x_ref[0]**o + ((-0.785522409494+0.460047437877j))*x_ref[0] + ((0.538479430851+0.934233886674j))*x_ref[1]**o + ((0.662406001814-0.684757262612j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(-0.500468149858-0.0660705117934j)*x[0]**o + ((-0.186229941629-0.612144452459j))*x[0] + ((0.184370434933-0.83330661264j))*x[1]**o + ((-0.902638348762+0.451151529003j))*x[1]
+        ref[(2, 1, 1, 3)]=(-0.500468149858-0.0660705117934j)*x_ref[0]**o + ((-0.186229941629-0.612144452459j))*x_ref[0] + ((0.184370434933-0.83330661264j))*x_ref[1]**o + ((-0.902638348762+0.451151529003j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.794913450926-0.368704796068j)*x[2]**o + ((-0.0368068772233-0.521667459545j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.794913450926-0.368704796068j)*x_ref[2]**o + ((-0.0368068772233-0.521667459545j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.535220684508-0.206000867792j)*x[2]**o + ((0.55693858173-0.848694398845j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.535220684508-0.206000867792j)*x_ref[2]**o + ((0.55693858173-0.848694398845j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.229844592605-0.931866219984j)*x[2]**o + ((0.101512908158+0.260242055676j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.229844592605-0.931866219984j)*x_ref[2]**o + ((0.101512908158+0.260242055676j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.619553607584-0.860044348368j)*x[2]**o + ((0.101820832398+0.0292597848621j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.619553607584-0.860044348368j)*x_ref[2]**o + ((0.101820832398+0.0292597848621j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.883305716427+0.805544304471j)*x[2]**o + ((-0.656488093123-0.630579175345j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.883305716427+0.805544304471j)*x_ref[2]**o + ((-0.656488093123-0.630579175345j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.95729488564-0.842422831796j)*x[2]**o + ((-0.00148312865879+0.793079070336j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.95729488564-0.842422831796j)*x_ref[2]**o + ((-0.00148312865879+0.793079070336j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.839723822401-0.292498577245j)*x[2]**o + ((-0.45464016263+0.746281492009j))*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.839723822401-0.292498577245j)*x_ref[2]**o + ((-0.45464016263+0.746281492009j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(-0.94730048767+0.22297342627j)*x[2]**o + ((-0.264474067094-0.77654769101j))*x[2]
+            ref[(0, 0, 1, 3)]+=(-0.94730048767+0.22297342627j)*x_ref[2]**o + ((-0.264474067094-0.77654769101j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.559434233797-0.511106663721j)*x[2]**o + ((0.213654618121-0.766960591171j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.559434233797-0.511106663721j)*x_ref[2]**o + ((0.213654618121-0.766960591171j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.0724562005263+0.278721903058j)*x[2]**o + ((0.669961475842-0.909729978558j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.0724562005263+0.278721903058j)*x_ref[2]**o + ((0.669961475842-0.909729978558j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.494203186546-0.908727465238j)*x[2]**o + ((-0.351549458642+0.6270814j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.494203186546-0.908727465238j)*x_ref[2]**o + ((-0.351549458642+0.6270814j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.503279639297+0.588268332003j)*x[2]**o + ((-0.964440187434+0.702604142206j))*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.503279639297+0.588268332003j)*x_ref[2]**o + ((-0.964440187434+0.702604142206j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.923791108334-0.958337078744j)*x[2]**o + ((0.393349739491+0.6758190663j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.923791108334-0.958337078744j)*x_ref[2]**o + ((0.393349739491+0.6758190663j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.601910432499+0.976812363184j)*x[2]**o + ((0.909290428665+0.197502096897j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.601910432499+0.976812363184j)*x_ref[2]**o + ((0.909290428665+0.197502096897j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.166227005655+0.438269085596j)*x[2]**o + ((-0.0186813950542-0.0593489043256j))*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.166227005655+0.438269085596j)*x_ref[2]**o + ((-0.0186813950542-0.0593489043256j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.229137340538-0.862793148606j)*x[2]**o + ((0.764547407082+0.623834684359j))*x[2]
+            ref[(0, 1, 1, 3)]+=(0.229137340538-0.862793148606j)*x_ref[2]**o + ((0.764547407082+0.623834684359j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.147635057517+0.123005456552j)*x[2]**o + ((0.976126518149-0.89348388479j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.147635057517+0.123005456552j)*x_ref[2]**o + ((0.976126518149-0.89348388479j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.881428782019+0.66948646206j)*x[2]**o + ((0.380581547315+0.0726731941139j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.881428782019+0.66948646206j)*x_ref[2]**o + ((0.380581547315+0.0726731941139j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.643795015766+0.372951360513j)*x[2]**o + ((0.127347033801+0.0473255714448j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.643795015766+0.372951360513j)*x_ref[2]**o + ((0.127347033801+0.0473255714448j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.235196654695+0.130387435457j)*x[2]**o + ((-0.767629023477-0.231366716701j))*x[2]
+            ref[(1, 0, 0, 3)]+=(0.235196654695+0.130387435457j)*x_ref[2]**o + ((-0.767629023477-0.231366716701j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.0489475035719+0.264428002594j)*x[2]**o + ((0.560135278804+0.0156201433503j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.0489475035719+0.264428002594j)*x_ref[2]**o + ((0.560135278804+0.0156201433503j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.799001626368-0.884963309617j)*x[2]**o + ((-0.558299630393-0.0260405174892j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.799001626368-0.884963309617j)*x_ref[2]**o + ((-0.558299630393-0.0260405174892j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.0781491131532-0.490762264158j)*x[2]**o + ((-0.215426454259-0.798416398732j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.0781491131532-0.490762264158j)*x_ref[2]**o + ((-0.215426454259-0.798416398732j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.500914264353-0.307606194194j)*x[2]**o + ((-0.576729970339-0.932255664858j))*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.500914264353-0.307606194194j)*x_ref[2]**o + ((-0.576729970339-0.932255664858j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.321159708878+0.607139026016j)*x[2]**o + ((0.549563982158-0.0994997005043j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.321159708878+0.607139026016j)*x_ref[2]**o + ((0.549563982158-0.0994997005043j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.666465085848-0.975751120819j)*x[2]**o + ((0.264875546835-0.446987910132j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.666465085848-0.975751120819j)*x_ref[2]**o + ((0.264875546835-0.446987910132j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.0747836200618-0.283394637876j)*x[2]**o + ((-0.0931758270801+0.52407289113j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.0747836200618-0.283394637876j)*x_ref[2]**o + ((-0.0931758270801+0.52407289113j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.469054368376+0.637795684077j)*x[2]**o + ((-0.797266477662-0.237788006548j))*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.469054368376+0.637795684077j)*x_ref[2]**o + ((-0.797266477662-0.237788006548j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.865656175888+0.597797161133j)*x[2]**o + ((-0.314570969826+0.239926811906j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.865656175888+0.597797161133j)*x_ref[2]**o + ((-0.314570969826+0.239926811906j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.380966847364+0.554233303649j)*x[2]**o + ((-0.497834001329-0.456391323359j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.380966847364+0.554233303649j)*x_ref[2]**o + ((-0.497834001329-0.456391323359j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.896037287433-0.131298434107j)*x[2]**o + ((-0.290570422671-0.238197245323j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.896037287433-0.131298434107j)*x_ref[2]**o + ((-0.290570422671-0.238197245323j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.733253289822-0.627012478469j)*x[2]**o + ((-0.203503898745-0.67096535537j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.733253289822-0.627012478469j)*x_ref[2]**o + ((-0.203503898745-0.67096535537j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.189337056853+0.937259235011j)*x[2]**o + ((0.770638825551+0.686754802305j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.189337056853+0.937259235011j)*x_ref[2]**o + ((0.770638825551+0.686754802305j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.888686500591-0.253482309431j)*x[2]**o + ((0.388014346698+0.749259321627j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.888686500591-0.253482309431j)*x_ref[2]**o + ((0.388014346698+0.749259321627j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.435424829072-0.91524529388j)*x[2]**o + ((0.654402001037-0.888135366384j))*x[2]
+            ref[(2, 0, 0, 2)]+=(0.435424829072-0.91524529388j)*x_ref[2]**o + ((0.654402001037-0.888135366384j))*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.233338027499-0.180217714763j)*x[2]**o + ((-0.669004056591-0.759908838801j))*x[2]
+            ref[(2, 0, 0, 3)]+=(0.233338027499-0.180217714763j)*x_ref[2]**o + ((-0.669004056591-0.759908838801j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.768606913654-0.0309372678892j)*x[2]**o + ((-0.0796951738582+0.134997167601j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.768606913654-0.0309372678892j)*x_ref[2]**o + ((-0.0796951738582+0.134997167601j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.250735716497+0.61396346518j)*x[2]**o + ((0.159125456427-0.314314636922j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.250735716497+0.61396346518j)*x_ref[2]**o + ((0.159125456427-0.314314636922j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.376539474918-0.899950886412j)*x[2]**o + ((-0.242551138898+0.407769051093j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.376539474918-0.899950886412j)*x_ref[2]**o + ((-0.242551138898+0.407769051093j))*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(0.330568372399+0.858481879842j)*x[2]**o + ((-0.345682330335+0.093125564858j))*x[2]
+            ref[(2, 0, 1, 3)]+=(0.330568372399+0.858481879842j)*x_ref[2]**o + ((-0.345682330335+0.093125564858j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.384557987516-0.852860054465j)*x[2]**o + ((-0.190553634267-0.508442684643j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.384557987516-0.852860054465j)*x_ref[2]**o + ((-0.190553634267-0.508442684643j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.501496668773-0.319864675062j)*x[2]**o + ((0.855998614457+0.696986696998j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.501496668773-0.319864675062j)*x_ref[2]**o + ((0.855998614457+0.696986696998j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.0309948792045-0.083785830764j)*x[2]**o + ((-0.613169545304-0.522898128452j))*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.0309948792045-0.083785830764j)*x_ref[2]**o + ((-0.613169545304-0.522898128452j))*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(-0.881904782302-0.24597648745j)*x[2]**o + ((-0.92595270454+0.293786592488j))*x[2]
+            ref[(2, 1, 0, 3)]+=(-0.881904782302-0.24597648745j)*x_ref[2]**o + ((-0.92595270454+0.293786592488j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.718195926787-0.982482830347j)*x[2]**o + ((0.674908856524+0.0517619758403j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.718195926787-0.982482830347j)*x_ref[2]**o + ((0.674908856524+0.0517619758403j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.57027254389-0.574153528464j)*x[2]**o + ((-0.642160913196-0.796426625463j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.57027254389-0.574153528464j)*x_ref[2]**o + ((-0.642160913196-0.796426625463j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.635162491139+0.194554078515j)*x[2]**o + ((0.332250527643-0.835275164889j))*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.635162491139+0.194554078515j)*x_ref[2]**o + ((0.332250527643-0.835275164889j))*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(0.0034031105971-0.839026375345j)*x[2]**o + ((0.868800997884-0.747065259798j))*x[2]
+            ref[(2, 1, 1, 3)]+=(0.0034031105971-0.839026375345j)*x_ref[2]**o + ((0.868800997884-0.747065259798j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.697076973267-0.787601454718j)*x[0]**o + ((0.575079863082+0.239629838803j))*x[0] + ((0.0954949140182+0.166108028685j))*x[1]**o + ((0.766872607102-0.6251319807j))*x[1]
+        ref=(-0.697076973267-0.787601454718j)*x_ref[0]**o + ((0.575079863082+0.239629838803j))*x_ref[0] + ((0.0954949140182+0.166108028685j))*x_ref[1]**o + ((0.766872607102-0.6251319807j))*x_ref[1]
+        if dim==3:
+            arg+=((0.170979280096-0.70598854479j))*x[2]**o + ((0.95859996379+0.684474344501j))*x[2]
+            ref+=((0.170979280096-0.70598854479j))*x_ref[2]**o + ((0.95859996379+0.684474344501j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.409301073485-0.452619243224j)*x[0]**o + ((0.0277814920532+0.0568932355263j))*x[0] + ((-0.630482409299-0.0716154066209j))*x[1]**o + ((-0.8891006231+0.197676140988j))*x[1]
+        ref[(0,)]=(-0.409301073485-0.452619243224j)*x_ref[0]**o + ((0.0277814920532+0.0568932355263j))*x_ref[0] + ((-0.630482409299-0.0716154066209j))*x_ref[1]**o + ((-0.8891006231+0.197676140988j))*x_ref[1]
+        arg[(1,)]=(0.262988350193+0.0308831021971j)*x[0]**o + ((-0.899403119063+0.33724152139j))*x[0] + ((-0.97785468245-0.948035914457j))*x[1]**o + ((-0.691606237371-0.550518867857j))*x[1]
+        ref[(1,)]=(0.262988350193+0.0308831021971j)*x_ref[0]**o + ((-0.899403119063+0.33724152139j))*x_ref[0] + ((-0.97785468245-0.948035914457j))*x_ref[1]**o + ((-0.691606237371-0.550518867857j))*x_ref[1]
+        arg[(2,)]=(-0.0210318799556+0.600467024197j)*x[0]**o + ((0.411946746161+0.0763955875702j))*x[0] + ((0.890587831897+0.241606687906j))*x[1]**o + ((-0.590663798094+0.421242259043j))*x[1]
+        ref[(2,)]=(-0.0210318799556+0.600467024197j)*x_ref[0]**o + ((0.411946746161+0.0763955875702j))*x_ref[0] + ((0.890587831897+0.241606687906j))*x_ref[1]**o + ((-0.590663798094+0.421242259043j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.121509895433-0.337784351168j)*x[2]**o + ((-0.406429992894+0.053041818549j))*x[2]
+            ref[(0,)]+=(-0.121509895433-0.337784351168j)*x_ref[2]**o + ((-0.406429992894+0.053041818549j))*x_ref[2]
+            arg[(1,)]+=(0.0802670517162-0.239085198958j)*x[2]**o + ((-0.832440357102-0.982360927743j))*x[2]
+            ref[(1,)]+=(0.0802670517162-0.239085198958j)*x_ref[2]**o + ((-0.832440357102-0.982360927743j))*x_ref[2]
+            arg[(2,)]+=(0.895856651309+0.487794806542j)*x[2]**o + ((-0.209611144386-0.678526997338j))*x[2]
+            ref[(2,)]+=(0.895856651309+0.487794806542j)*x_ref[2]**o + ((-0.209611144386-0.678526997338j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(-0.991177696928-0.909389038206j)*x[0]**o + ((-0.957923449301+0.253853885047j))*x[0] + ((-0.758036069263+0.795631799883j))*x[1]**o + ((0.857461369735-0.525788861414j))*x[1]
+        ref[(0, 0)]=(-0.991177696928-0.909389038206j)*x_ref[0]**o + ((-0.957923449301+0.253853885047j))*x_ref[0] + ((-0.758036069263+0.795631799883j))*x_ref[1]**o + ((0.857461369735-0.525788861414j))*x_ref[1]
+        arg[(0, 1)]=(0.841611169131+0.041998383144j)*x[0]**o + ((0.854694360397+0.654863415463j))*x[0] + ((-0.166198563874-0.874689044179j))*x[1]**o + ((-0.791119917101+0.696762571785j))*x[1]
+        ref[(0, 1)]=(0.841611169131+0.041998383144j)*x_ref[0]**o + ((0.854694360397+0.654863415463j))*x_ref[0] + ((-0.166198563874-0.874689044179j))*x_ref[1]**o + ((-0.791119917101+0.696762571785j))*x_ref[1]
+        arg[(1, 0)]=(-0.63839938785+0.818261710406j)*x[0]**o + ((-0.507257245787+0.566840441964j))*x[0] + ((-0.702406441814+0.74096427026j))*x[1]**o + ((-0.6951318758+0.411505384937j))*x[1]
+        ref[(1, 0)]=(-0.63839938785+0.818261710406j)*x_ref[0]**o + ((-0.507257245787+0.566840441964j))*x_ref[0] + ((-0.702406441814+0.74096427026j))*x_ref[1]**o + ((-0.6951318758+0.411505384937j))*x_ref[1]
+        arg[(1, 1)]=(0.790365151419+0.176319709583j)*x[0]**o + ((0.198700607438-0.157809531699j))*x[0] + ((-0.255371263406-0.687824709273j))*x[1]**o + ((0.166929789958+0.484568659007j))*x[1]
+        ref[(1, 1)]=(0.790365151419+0.176319709583j)*x_ref[0]**o + ((0.198700607438-0.157809531699j))*x_ref[0] + ((-0.255371263406-0.687824709273j))*x_ref[1]**o + ((0.166929789958+0.484568659007j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.190716213758-0.454487660595j)*x[2]**o + ((-0.451203136427-0.826932830757j))*x[2]
+            ref[(0, 0)]+=(-0.190716213758-0.454487660595j)*x_ref[2]**o + ((-0.451203136427-0.826932830757j))*x_ref[2]
+            arg[(0, 1)]+=(0.510052664421-0.133555733023j)*x[2]**o + ((-0.586345919636-0.355114162853j))*x[2]
+            ref[(0, 1)]+=(0.510052664421-0.133555733023j)*x_ref[2]**o + ((-0.586345919636-0.355114162853j))*x_ref[2]
+            arg[(1, 0)]+=(0.432820625566+0.513942044906j)*x[2]**o + ((-0.332685619379-0.840879653116j))*x[2]
+            ref[(1, 0)]+=(0.432820625566+0.513942044906j)*x_ref[2]**o + ((-0.332685619379-0.840879653116j))*x_ref[2]
+            arg[(1, 1)]+=(-0.783756608476-0.078235152393j)*x[2]**o + ((-0.0721352878354+0.549414661255j))*x[2]
+            ref[(1, 1)]+=(-0.783756608476-0.078235152393j)*x_ref[2]**o + ((-0.0721352878354+0.549414661255j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3),w)
+        ref = Data(0,(3, 3, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.765302581178-0.82718103995j)*x[0]**o + ((0.67528349511+0.84931502293j))*x[0] + ((-0.0311594481066-0.612701802617j))*x[1]**o + ((0.0728843846812-0.417708699959j))*x[1]
+        ref[(0, 0, 0)]=(-0.765302581178-0.82718103995j)*x_ref[0]**o + ((0.67528349511+0.84931502293j))*x_ref[0] + ((-0.0311594481066-0.612701802617j))*x_ref[1]**o + ((0.0728843846812-0.417708699959j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.591536481519+0.244419231208j)*x[0]**o + ((0.661810851195+0.503836230826j))*x[0] + ((-0.388037404047-0.152359087317j))*x[1]**o + ((-0.398519351562-0.868285242282j))*x[1]
+        ref[(0, 0, 1)]=(-0.591536481519+0.244419231208j)*x_ref[0]**o + ((0.661810851195+0.503836230826j))*x_ref[0] + ((-0.388037404047-0.152359087317j))*x_ref[1]**o + ((-0.398519351562-0.868285242282j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.422487440888+0.910601629517j)*x[0]**o + ((0.797894016255+0.852873253747j))*x[0] + ((0.0504188774895+0.404378598997j))*x[1]**o + ((0.280252772802+0.412123172919j))*x[1]
+        ref[(0, 0, 2)]=(0.422487440888+0.910601629517j)*x_ref[0]**o + ((0.797894016255+0.852873253747j))*x_ref[0] + ((0.0504188774895+0.404378598997j))*x_ref[1]**o + ((0.280252772802+0.412123172919j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.365675006095-0.408357150575j)*x[0]**o + ((-0.724176113392-0.412252383975j))*x[0] + ((0.0986910650211-0.87146382395j))*x[1]**o + ((0.747321046663+0.947215736254j))*x[1]
+        ref[(0, 1, 0)]=(-0.365675006095-0.408357150575j)*x_ref[0]**o + ((-0.724176113392-0.412252383975j))*x_ref[0] + ((0.0986910650211-0.87146382395j))*x_ref[1]**o + ((0.747321046663+0.947215736254j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.78325486536-0.19990146361j)*x[0]**o + ((-0.943168351071-0.917865463613j))*x[0] + ((-0.848746549453+0.0302956535223j))*x[1]**o + ((-0.26544782568-0.971798012426j))*x[1]
+        ref[(0, 1, 1)]=(0.78325486536-0.19990146361j)*x_ref[0]**o + ((-0.943168351071-0.917865463613j))*x_ref[0] + ((-0.848746549453+0.0302956535223j))*x_ref[1]**o + ((-0.26544782568-0.971798012426j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.866819959066+0.940434832588j)*x[0]**o + ((-0.655641877217+0.18801319946j))*x[0] + ((0.0729027167834+0.949692738031j))*x[1]**o + ((-0.750047544025+0.548930860291j))*x[1]
+        ref[(0, 1, 2)]=(-0.866819959066+0.940434832588j)*x_ref[0]**o + ((-0.655641877217+0.18801319946j))*x_ref[0] + ((0.0729027167834+0.949692738031j))*x_ref[1]**o + ((-0.750047544025+0.548930860291j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.80343394502+0.43131646814j)*x[0]**o + ((-0.204795121305+0.729845410847j))*x[0] + ((-0.630522970714+0.832230121855j))*x[1]**o + ((0.71393083418-0.394559397669j))*x[1]
+        ref[(0, 2, 0)]=(-0.80343394502+0.43131646814j)*x_ref[0]**o + ((-0.204795121305+0.729845410847j))*x_ref[0] + ((-0.630522970714+0.832230121855j))*x_ref[1]**o + ((0.71393083418-0.394559397669j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.583446291109+0.056517562162j)*x[0]**o + ((-0.984853012398-0.771503089909j))*x[0] + ((-0.338472707223+0.18108270323j))*x[1]**o + ((-0.678332197632+0.825204818642j))*x[1]
+        ref[(0, 2, 1)]=(-0.583446291109+0.056517562162j)*x_ref[0]**o + ((-0.984853012398-0.771503089909j))*x_ref[0] + ((-0.338472707223+0.18108270323j))*x_ref[1]**o + ((-0.678332197632+0.825204818642j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.605884041+0.0545278695442j)*x[0]**o + ((0.496263274422-0.564254954081j))*x[0] + ((0.60300873093+0.649211208472j))*x[1]**o + ((-0.638145420589+0.0290371244374j))*x[1]
+        ref[(0, 2, 2)]=(0.605884041+0.0545278695442j)*x_ref[0]**o + ((0.496263274422-0.564254954081j))*x_ref[0] + ((0.60300873093+0.649211208472j))*x_ref[1]**o + ((-0.638145420589+0.0290371244374j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.708364293752+0.44504489264j)*x[0]**o + ((0.54114839413+0.2071809763j))*x[0] + ((-0.943828068088+0.753476196657j))*x[1]**o + ((0.442423723968-0.262122795628j))*x[1]
+        ref[(1, 0, 0)]=(0.708364293752+0.44504489264j)*x_ref[0]**o + ((0.54114839413+0.2071809763j))*x_ref[0] + ((-0.943828068088+0.753476196657j))*x_ref[1]**o + ((0.442423723968-0.262122795628j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.0324093063161-0.411296420987j)*x[0]**o + ((0.566474541492-0.540482368704j))*x[0] + ((-0.0932722739424-0.887298940835j))*x[1]**o + ((-0.111759100732+0.114189039181j))*x[1]
+        ref[(1, 0, 1)]=(0.0324093063161-0.411296420987j)*x_ref[0]**o + ((0.566474541492-0.540482368704j))*x_ref[0] + ((-0.0932722739424-0.887298940835j))*x_ref[1]**o + ((-0.111759100732+0.114189039181j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.283073979982-0.351804894585j)*x[0]**o + ((-0.163286651925-0.0638927690361j))*x[0] + ((0.760966076771+0.509022727763j))*x[1]**o + ((-0.187900848907-0.795624965329j))*x[1]
+        ref[(1, 0, 2)]=(0.283073979982-0.351804894585j)*x_ref[0]**o + ((-0.163286651925-0.0638927690361j))*x_ref[0] + ((0.760966076771+0.509022727763j))*x_ref[1]**o + ((-0.187900848907-0.795624965329j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.862258521606+0.929811014897j)*x[0]**o + ((-0.368850324859-0.509561846864j))*x[0] + ((0.424914875936-0.29041454086j))*x[1]**o + ((0.338732543539-0.550778779988j))*x[1]
+        ref[(1, 1, 0)]=(-0.862258521606+0.929811014897j)*x_ref[0]**o + ((-0.368850324859-0.509561846864j))*x_ref[0] + ((0.424914875936-0.29041454086j))*x_ref[1]**o + ((0.338732543539-0.550778779988j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.905608330501-0.759548744806j)*x[0]**o + ((0.502001925499+0.746012593523j))*x[0] + ((-0.331072636306+0.907104512368j))*x[1]**o + ((0.491284975762+0.845600436459j))*x[1]
+        ref[(1, 1, 1)]=(-0.905608330501-0.759548744806j)*x_ref[0]**o + ((0.502001925499+0.746012593523j))*x_ref[0] + ((-0.331072636306+0.907104512368j))*x_ref[1]**o + ((0.491284975762+0.845600436459j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.712263876792-0.0530087614826j)*x[0]**o + ((0.331596844771-0.284485421839j))*x[0] + ((0.430634608464+0.579547239868j))*x[1]**o + ((-0.0343674105188+0.413861951978j))*x[1]
+        ref[(1, 1, 2)]=(-0.712263876792-0.0530087614826j)*x_ref[0]**o + ((0.331596844771-0.284485421839j))*x_ref[0] + ((0.430634608464+0.579547239868j))*x_ref[1]**o + ((-0.0343674105188+0.413861951978j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.670136042077+0.104177013242j)*x[0]**o + ((-0.0430924304952+0.192229837831j))*x[0] + ((-0.338601654066-0.395102217883j))*x[1]**o + ((-0.49095921329+0.586401152367j))*x[1]
+        ref[(1, 2, 0)]=(-0.670136042077+0.104177013242j)*x_ref[0]**o + ((-0.0430924304952+0.192229837831j))*x_ref[0] + ((-0.338601654066-0.395102217883j))*x_ref[1]**o + ((-0.49095921329+0.586401152367j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.0819807137608+0.853453175086j)*x[0]**o + ((0.713733743628+0.731200179964j))*x[0] + ((-0.859829630421+0.820749363994j))*x[1]**o + ((-0.982927013149+0.813395888015j))*x[1]
+        ref[(1, 2, 1)]=(-0.0819807137608+0.853453175086j)*x_ref[0]**o + ((0.713733743628+0.731200179964j))*x_ref[0] + ((-0.859829630421+0.820749363994j))*x_ref[1]**o + ((-0.982927013149+0.813395888015j))*x_ref[1]
+        arg[(1, 2, 2)]=(-0.389893459149+0.775886601652j)*x[0]**o + ((0.8714155645+0.260640726996j))*x[0] + ((-0.795939754013-0.760267504863j))*x[1]**o + ((0.410547486974-0.347267395286j))*x[1]
+        ref[(1, 2, 2)]=(-0.389893459149+0.775886601652j)*x_ref[0]**o + ((0.8714155645+0.260640726996j))*x_ref[0] + ((-0.795939754013-0.760267504863j))*x_ref[1]**o + ((0.410547486974-0.347267395286j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.953171767205-0.121840370437j)*x[0]**o + ((-0.141772170266-0.916806990664j))*x[0] + ((-0.519578030199-0.911885176447j))*x[1]**o + ((-0.845561791519-0.928244299061j))*x[1]
+        ref[(2, 0, 0)]=(-0.953171767205-0.121840370437j)*x_ref[0]**o + ((-0.141772170266-0.916806990664j))*x_ref[0] + ((-0.519578030199-0.911885176447j))*x_ref[1]**o + ((-0.845561791519-0.928244299061j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.471548022233-0.569898408261j)*x[0]**o + ((0.87170681639-0.356138086369j))*x[0] + ((0.659303131355+0.999368970482j))*x[1]**o + ((-0.162300473583+0.422779508965j))*x[1]
+        ref[(2, 0, 1)]=(-0.471548022233-0.569898408261j)*x_ref[0]**o + ((0.87170681639-0.356138086369j))*x_ref[0] + ((0.659303131355+0.999368970482j))*x_ref[1]**o + ((-0.162300473583+0.422779508965j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.336090721443+0.488676858196j)*x[0]**o + ((0.67123154459+0.817677377672j))*x[0] + ((0.998361244316+0.818294789653j))*x[1]**o + ((0.173795181851+0.141006733831j))*x[1]
+        ref[(2, 0, 2)]=(0.336090721443+0.488676858196j)*x_ref[0]**o + ((0.67123154459+0.817677377672j))*x_ref[0] + ((0.998361244316+0.818294789653j))*x_ref[1]**o + ((0.173795181851+0.141006733831j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.154707904906+0.502543419808j)*x[0]**o + ((0.401845269672-0.332926874389j))*x[0] + ((-0.843343478894-0.121647979968j))*x[1]**o + ((-0.225145923279-0.312341854906j))*x[1]
+        ref[(2, 1, 0)]=(-0.154707904906+0.502543419808j)*x_ref[0]**o + ((0.401845269672-0.332926874389j))*x_ref[0] + ((-0.843343478894-0.121647979968j))*x_ref[1]**o + ((-0.225145923279-0.312341854906j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.578529366616-0.189801222027j)*x[0]**o + ((0.253263175905-0.252301053694j))*x[0] + ((0.148300657584-0.785992469434j))*x[1]**o + ((0.918115804419+0.0083911337371j))*x[1]
+        ref[(2, 1, 1)]=(-0.578529366616-0.189801222027j)*x_ref[0]**o + ((0.253263175905-0.252301053694j))*x_ref[0] + ((0.148300657584-0.785992469434j))*x_ref[1]**o + ((0.918115804419+0.0083911337371j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.371288120995-0.942276122939j)*x[0]**o + ((0.431478523218-0.489665478851j))*x[0] + ((-0.682062984326+0.358627602031j))*x[1]**o + ((0.683415324278+0.246286544147j))*x[1]
+        ref[(2, 1, 2)]=(0.371288120995-0.942276122939j)*x_ref[0]**o + ((0.431478523218-0.489665478851j))*x_ref[0] + ((-0.682062984326+0.358627602031j))*x_ref[1]**o + ((0.683415324278+0.246286544147j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.0729871852585+0.134477812595j)*x[0]**o + ((0.0537464848486+0.925299918942j))*x[0] + ((-0.777492797846+0.480832071562j))*x[1]**o + ((0.495693656812-0.835377900465j))*x[1]
+        ref[(2, 2, 0)]=(-0.0729871852585+0.134477812595j)*x_ref[0]**o + ((0.0537464848486+0.925299918942j))*x_ref[0] + ((-0.777492797846+0.480832071562j))*x_ref[1]**o + ((0.495693656812-0.835377900465j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.339515108524+0.630714829668j)*x[0]**o + ((-0.521341827556+0.546080402939j))*x[0] + ((-0.723589991701-0.384840251111j))*x[1]**o + ((-0.566234699018-0.0682694549491j))*x[1]
+        ref[(2, 2, 1)]=(-0.339515108524+0.630714829668j)*x_ref[0]**o + ((-0.521341827556+0.546080402939j))*x_ref[0] + ((-0.723589991701-0.384840251111j))*x_ref[1]**o + ((-0.566234699018-0.0682694549491j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.43693105657+0.709374834004j)*x[0]**o + ((0.0387415069136-0.426659416953j))*x[0] + ((-0.365960480452+0.0828996825673j))*x[1]**o + ((-0.366264879373+0.764746938987j))*x[1]
+        ref[(2, 2, 2)]=(0.43693105657+0.709374834004j)*x_ref[0]**o + ((0.0387415069136-0.426659416953j))*x_ref[0] + ((-0.365960480452+0.0828996825673j))*x_ref[1]**o + ((-0.366264879373+0.764746938987j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.953876634577-0.159596659399j)*x[2]**o + ((0.033685083789-0.454952313522j))*x[2]
+            ref[(0, 0, 0)]+=(-0.953876634577-0.159596659399j)*x_ref[2]**o + ((0.033685083789-0.454952313522j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.759436634073-0.728812524704j)*x[2]**o + ((0.87063786001+0.993159312451j))*x[2]
+            ref[(0, 0, 1)]+=(-0.759436634073-0.728812524704j)*x_ref[2]**o + ((0.87063786001+0.993159312451j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.561669734417-0.336479798769j)*x[2]**o + ((-0.686957457251+0.00739851857162j))*x[2]
+            ref[(0, 0, 2)]+=(-0.561669734417-0.336479798769j)*x_ref[2]**o + ((-0.686957457251+0.00739851857162j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.75648907765-0.219682756908j)*x[2]**o + ((-0.59741924525+0.39202830415j))*x[2]
+            ref[(0, 1, 0)]+=(-0.75648907765-0.219682756908j)*x_ref[2]**o + ((-0.59741924525+0.39202830415j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.404080732481-0.25626001162j)*x[2]**o + ((-0.0641061633388-0.75419682007j))*x[2]
+            ref[(0, 1, 1)]+=(-0.404080732481-0.25626001162j)*x_ref[2]**o + ((-0.0641061633388-0.75419682007j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.966752826593-0.479989519429j)*x[2]**o + ((-0.515492549305-0.252509801239j))*x[2]
+            ref[(0, 1, 2)]+=(-0.966752826593-0.479989519429j)*x_ref[2]**o + ((-0.515492549305-0.252509801239j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.350034815021+0.630743293529j)*x[2]**o + ((0.590868034715-0.244226122332j))*x[2]
+            ref[(0, 2, 0)]+=(-0.350034815021+0.630743293529j)*x_ref[2]**o + ((0.590868034715-0.244226122332j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.57546985723-0.0428352254769j)*x[2]**o + ((-0.122901729745-0.161889632371j))*x[2]
+            ref[(0, 2, 1)]+=(0.57546985723-0.0428352254769j)*x_ref[2]**o + ((-0.122901729745-0.161889632371j))*x_ref[2]
+            arg[(0, 2, 2)]+=(0.0205283499976+0.976881779266j)*x[2]**o + ((0.105423346536+0.888979080568j))*x[2]
+            ref[(0, 2, 2)]+=(0.0205283499976+0.976881779266j)*x_ref[2]**o + ((0.105423346536+0.888979080568j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.497242447923+0.925383823759j)*x[2]**o + ((-0.462829822031+0.735499029225j))*x[2]
+            ref[(1, 0, 0)]+=(0.497242447923+0.925383823759j)*x_ref[2]**o + ((-0.462829822031+0.735499029225j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.321291854597-0.275008715866j)*x[2]**o + ((-0.223212741246-0.988785513363j))*x[2]
+            ref[(1, 0, 1)]+=(0.321291854597-0.275008715866j)*x_ref[2]**o + ((-0.223212741246-0.988785513363j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.771670388022+0.461477073578j)*x[2]**o + ((0.78575982402-0.0948403947333j))*x[2]
+            ref[(1, 0, 2)]+=(-0.771670388022+0.461477073578j)*x_ref[2]**o + ((0.78575982402-0.0948403947333j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.774264577939-0.648498359947j)*x[2]**o + ((-0.629402923463-0.00334004851666j))*x[2]
+            ref[(1, 1, 0)]+=(-0.774264577939-0.648498359947j)*x_ref[2]**o + ((-0.629402923463-0.00334004851666j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.589367804183-0.83109395074j)*x[2]**o + ((-0.96327424835-0.986511588983j))*x[2]
+            ref[(1, 1, 1)]+=(0.589367804183-0.83109395074j)*x_ref[2]**o + ((-0.96327424835-0.986511588983j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.606490954772+0.268910745102j)*x[2]**o + ((0.246258280958+0.595825333401j))*x[2]
+            ref[(1, 1, 2)]+=(-0.606490954772+0.268910745102j)*x_ref[2]**o + ((0.246258280958+0.595825333401j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.35083757372+0.000622145659437j)*x[2]**o + ((-0.110167030484+0.263448339139j))*x[2]
+            ref[(1, 2, 0)]+=(-0.35083757372+0.000622145659437j)*x_ref[2]**o + ((-0.110167030484+0.263448339139j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.214746721476-0.393737900002j)*x[2]**o + ((-0.953305588219+0.890691110727j))*x[2]
+            ref[(1, 2, 1)]+=(0.214746721476-0.393737900002j)*x_ref[2]**o + ((-0.953305588219+0.890691110727j))*x_ref[2]
+            arg[(1, 2, 2)]+=(-0.785089885885+0.732399606025j)*x[2]**o + ((0.704945651925+0.00324904624667j))*x[2]
+            ref[(1, 2, 2)]+=(-0.785089885885+0.732399606025j)*x_ref[2]**o + ((0.704945651925+0.00324904624667j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.993752612665+0.860549012048j)*x[2]**o + ((-0.0463326264676-0.770916126337j))*x[2]
+            ref[(2, 0, 0)]+=(0.993752612665+0.860549012048j)*x_ref[2]**o + ((-0.0463326264676-0.770916126337j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.65329799573+0.676083937521j)*x[2]**o + ((0.266902939554-0.0128344579518j))*x[2]
+            ref[(2, 0, 1)]+=(-0.65329799573+0.676083937521j)*x_ref[2]**o + ((0.266902939554-0.0128344579518j))*x_ref[2]
+            arg[(2, 0, 2)]+=(0.248499812011+0.598566612633j)*x[2]**o + ((-0.59100452547+0.579711779858j))*x[2]
+            ref[(2, 0, 2)]+=(0.248499812011+0.598566612633j)*x_ref[2]**o + ((-0.59100452547+0.579711779858j))*x_ref[2]
+            arg[(2, 1, 0)]+=(0.755515010887+0.684629466509j)*x[2]**o + ((0.386067265184-0.732500600492j))*x[2]
+            ref[(2, 1, 0)]+=(0.755515010887+0.684629466509j)*x_ref[2]**o + ((0.386067265184-0.732500600492j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.186088889928+0.0631339562491j)*x[2]**o + ((0.631723713647-0.213932700445j))*x[2]
+            ref[(2, 1, 1)]+=(0.186088889928+0.0631339562491j)*x_ref[2]**o + ((0.631723713647-0.213932700445j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.721430325934-0.325922902969j)*x[2]**o + ((0.535977036106-0.0986932353936j))*x[2]
+            ref[(2, 1, 2)]+=(-0.721430325934-0.325922902969j)*x_ref[2]**o + ((0.535977036106-0.0986932353936j))*x_ref[2]
+            arg[(2, 2, 0)]+=(0.27365458921-0.883331940347j)*x[2]**o + ((-0.334618948394-0.263573757503j))*x[2]
+            ref[(2, 2, 0)]+=(0.27365458921-0.883331940347j)*x_ref[2]**o + ((-0.334618948394-0.263573757503j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.457955238859+0.361150945981j)*x[2]**o + ((-0.0973851670866+0.575977998618j))*x[2]
+            ref[(2, 2, 1)]+=(0.457955238859+0.361150945981j)*x_ref[2]**o + ((-0.0973851670866+0.575977998618j))*x_ref[2]
+            arg[(2, 2, 2)]+=(0.567592169602-0.68670142424j)*x[2]**o + ((-0.591669354506+0.0379582956551j))*x[2]
+            ref[(2, 2, 2)]+=(0.567592169602-0.68670142424j)*x_ref[2]**o + ((-0.591669354506+0.0379582956551j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2, 4),w)
+        ref = Data(0,(4, 4, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.930544317407+0.860478675754j)*x[0]**o + ((-0.826400135329+0.783029290282j))*x[0] + ((-0.444120423965-0.851940722075j))*x[1]**o + ((0.221935877061+0.0909563414142j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.930544317407+0.860478675754j)*x_ref[0]**o + ((-0.826400135329+0.783029290282j))*x_ref[0] + ((-0.444120423965-0.851940722075j))*x_ref[1]**o + ((0.221935877061+0.0909563414142j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.819526178895-0.0791114847466j)*x[0]**o + ((0.911331626747+0.165565011048j))*x[0] + ((0.493540212911+0.309063406433j))*x[1]**o + ((-0.897926471762+0.123131337606j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.819526178895-0.0791114847466j)*x_ref[0]**o + ((0.911331626747+0.165565011048j))*x_ref[0] + ((0.493540212911+0.309063406433j))*x_ref[1]**o + ((-0.897926471762+0.123131337606j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.674719204179+0.579495329018j)*x[0]**o + ((-0.469456212287-0.243432576178j))*x[0] + ((-0.144377322502+0.582480031345j))*x[1]**o + ((0.47253903809+0.775088435335j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.674719204179+0.579495329018j)*x_ref[0]**o + ((-0.469456212287-0.243432576178j))*x_ref[0] + ((-0.144377322502+0.582480031345j))*x_ref[1]**o + ((0.47253903809+0.775088435335j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.125229274268-0.910427993715j)*x[0]**o + ((-0.996253160992-0.412386286456j))*x[0] + ((-0.214572957202+0.19696875772j))*x[1]**o + ((0.575109986325-0.718826584172j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.125229274268-0.910427993715j)*x_ref[0]**o + ((-0.996253160992-0.412386286456j))*x_ref[0] + ((-0.214572957202+0.19696875772j))*x_ref[1]**o + ((0.575109986325-0.718826584172j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.406816985904-0.733400342821j)*x[0]**o + ((0.714145097622+0.231339513591j))*x[0] + ((-0.585237799964-0.776466197143j))*x[1]**o + ((-0.0483061235448-0.0195552469733j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.406816985904-0.733400342821j)*x_ref[0]**o + ((0.714145097622+0.231339513591j))*x_ref[0] + ((-0.585237799964-0.776466197143j))*x_ref[1]**o + ((-0.0483061235448-0.0195552469733j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.568459827104+0.951638074554j)*x[0]**o + ((0.00488748800172+0.687013843291j))*x[0] + ((-0.313008495601-0.0214291622839j))*x[1]**o + ((0.201239972257+0.344376111899j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.568459827104+0.951638074554j)*x_ref[0]**o + ((0.00488748800172+0.687013843291j))*x_ref[0] + ((-0.313008495601-0.0214291622839j))*x_ref[1]**o + ((0.201239972257+0.344376111899j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.19835784937-0.284601814525j)*x[0]**o + ((-0.880492594662+0.995252124122j))*x[0] + ((0.710828917157-0.137287580502j))*x[1]**o + ((0.773321207984-0.42744990754j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.19835784937-0.284601814525j)*x_ref[0]**o + ((-0.880492594662+0.995252124122j))*x_ref[0] + ((0.710828917157-0.137287580502j))*x_ref[1]**o + ((0.773321207984-0.42744990754j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.276869619738+0.0488212780209j)*x[0]**o + ((0.274863528821+0.350544029853j))*x[0] + ((0.981222572989-0.549108821386j))*x[1]**o + ((0.930559293004-0.155301912004j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.276869619738+0.0488212780209j)*x_ref[0]**o + ((0.274863528821+0.350544029853j))*x_ref[0] + ((0.981222572989-0.549108821386j))*x_ref[1]**o + ((0.930559293004-0.155301912004j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.459719789164-0.916279362571j)*x[0]**o + ((-0.951839903408-0.203538786183j))*x[0] + ((-0.984790029665+0.432284599599j))*x[1]**o + ((0.806677106254-0.667841082475j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.459719789164-0.916279362571j)*x_ref[0]**o + ((-0.951839903408-0.203538786183j))*x_ref[0] + ((-0.984790029665+0.432284599599j))*x_ref[1]**o + ((0.806677106254-0.667841082475j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.175788745395+0.728362705779j)*x[0]**o + ((0.00685098016539-0.931553795209j))*x[0] + ((-0.0674075402936-0.755305542999j))*x[1]**o + ((0.185723977632+0.525203243631j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.175788745395+0.728362705779j)*x_ref[0]**o + ((0.00685098016539-0.931553795209j))*x_ref[0] + ((-0.0674075402936-0.755305542999j))*x_ref[1]**o + ((0.185723977632+0.525203243631j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.516909490397+0.376800749734j)*x[0]**o + ((-0.667228898664+0.83317447771j))*x[0] + ((-0.194860542584+0.160819297627j))*x[1]**o + ((-0.464225190687-0.172512501405j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.516909490397+0.376800749734j)*x_ref[0]**o + ((-0.667228898664+0.83317447771j))*x_ref[0] + ((-0.194860542584+0.160819297627j))*x_ref[1]**o + ((-0.464225190687-0.172512501405j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.797214814998-0.426445495288j)*x[0]**o + ((-0.0507491201419-0.968026312294j))*x[0] + ((0.402004028716+0.510738787413j))*x[1]**o + ((-0.158184914719+0.300622296614j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.797214814998-0.426445495288j)*x_ref[0]**o + ((-0.0507491201419-0.968026312294j))*x_ref[0] + ((0.402004028716+0.510738787413j))*x_ref[1]**o + ((-0.158184914719+0.300622296614j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.575195539195-0.738011342906j)*x[0]**o + ((0.453439972461-0.514042953209j))*x[0] + ((0.695850637414-0.917053902505j))*x[1]**o + ((0.734971852559+0.482796143464j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.575195539195-0.738011342906j)*x_ref[0]**o + ((0.453439972461-0.514042953209j))*x_ref[0] + ((0.695850637414-0.917053902505j))*x_ref[1]**o + ((0.734971852559+0.482796143464j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.303992145389-0.969084592681j)*x[0]**o + ((-0.00694233645541+0.205199009257j))*x[0] + ((-0.888440776866-0.66990407152j))*x[1]**o + ((-0.417909419523+0.181816394285j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.303992145389-0.969084592681j)*x_ref[0]**o + ((-0.00694233645541+0.205199009257j))*x_ref[0] + ((-0.888440776866-0.66990407152j))*x_ref[1]**o + ((-0.417909419523+0.181816394285j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.527218379871+0.789303108698j)*x[0]**o + ((0.774866416525-0.910627941978j))*x[0] + ((0.124924524664-0.327929193143j))*x[1]**o + ((0.627064378055+0.883355248882j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.527218379871+0.789303108698j)*x_ref[0]**o + ((0.774866416525-0.910627941978j))*x_ref[0] + ((0.124924524664-0.327929193143j))*x_ref[1]**o + ((0.627064378055+0.883355248882j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.504404410439-0.617638250379j)*x[0]**o + ((-0.952513852714-0.727399551024j))*x[0] + ((0.794776378802-0.0143368788043j))*x[1]**o + ((-0.00980295428673-0.210724366565j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.504404410439-0.617638250379j)*x_ref[0]**o + ((-0.952513852714-0.727399551024j))*x_ref[0] + ((0.794776378802-0.0143368788043j))*x_ref[1]**o + ((-0.00980295428673-0.210724366565j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.282065309633+0.4815859891j)*x[0]**o + ((0.0733943516501-0.444965787806j))*x[0] + ((-0.0749314116901-0.760586800965j))*x[1]**o + ((-0.668273022086-0.469142789102j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.282065309633+0.4815859891j)*x_ref[0]**o + ((0.0733943516501-0.444965787806j))*x_ref[0] + ((-0.0749314116901-0.760586800965j))*x_ref[1]**o + ((-0.668273022086-0.469142789102j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.825138728398-0.520527168184j)*x[0]**o + ((0.612317472301-0.123372072229j))*x[0] + ((-0.719078260237+0.149087647208j))*x[1]**o + ((0.152683559822-0.408536271998j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.825138728398-0.520527168184j)*x_ref[0]**o + ((0.612317472301-0.123372072229j))*x_ref[0] + ((-0.719078260237+0.149087647208j))*x_ref[1]**o + ((0.152683559822-0.408536271998j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.709007345887+0.0722327716286j)*x[0]**o + ((0.126216449372+0.200427382333j))*x[0] + ((-0.251747269305+0.496124540579j))*x[1]**o + ((-0.208544220027-0.840932032755j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.709007345887+0.0722327716286j)*x_ref[0]**o + ((0.126216449372+0.200427382333j))*x_ref[0] + ((-0.251747269305+0.496124540579j))*x_ref[1]**o + ((-0.208544220027-0.840932032755j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(-0.120234160598+0.465603747804j)*x[0]**o + ((0.774362210558+0.929759316028j))*x[0] + ((-0.462420339983+0.837079800697j))*x[1]**o + ((0.743452738445+0.569851838613j))*x[1]
+        ref[(0, 2, 0, 3)]=(-0.120234160598+0.465603747804j)*x_ref[0]**o + ((0.774362210558+0.929759316028j))*x_ref[0] + ((-0.462420339983+0.837079800697j))*x_ref[1]**o + ((0.743452738445+0.569851838613j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.75605889577+0.789840385135j)*x[0]**o + ((0.0861255393576-0.508847703087j))*x[0] + ((-0.283949839733+0.583366488671j))*x[1]**o + ((0.109993752701-0.0406623070807j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.75605889577+0.789840385135j)*x_ref[0]**o + ((0.0861255393576-0.508847703087j))*x_ref[0] + ((-0.283949839733+0.583366488671j))*x_ref[1]**o + ((0.109993752701-0.0406623070807j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.618651179403+0.656276502137j)*x[0]**o + ((0.0679771485392+0.370797766758j))*x[0] + ((0.723946917702+0.82452410591j))*x[1]**o + ((-0.680783842121-0.312146581173j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.618651179403+0.656276502137j)*x_ref[0]**o + ((0.0679771485392+0.370797766758j))*x_ref[0] + ((0.723946917702+0.82452410591j))*x_ref[1]**o + ((-0.680783842121-0.312146581173j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(-0.895540630968+0.730226399001j)*x[0]**o + ((-0.803372534356-0.976192471252j))*x[0] + ((0.313278995524-0.583306243383j))*x[1]**o + ((0.309491816254-0.414371816553j))*x[1]
+        ref[(0, 2, 1, 2)]=(-0.895540630968+0.730226399001j)*x_ref[0]**o + ((-0.803372534356-0.976192471252j))*x_ref[0] + ((0.313278995524-0.583306243383j))*x_ref[1]**o + ((0.309491816254-0.414371816553j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(0.399541202353-0.721688952121j)*x[0]**o + ((-0.310002772157+0.806450219745j))*x[0] + ((-0.17939233603+0.607026849413j))*x[1]**o + ((0.700945147918-0.151739853369j))*x[1]
+        ref[(0, 2, 1, 3)]=(0.399541202353-0.721688952121j)*x_ref[0]**o + ((-0.310002772157+0.806450219745j))*x_ref[0] + ((-0.17939233603+0.607026849413j))*x_ref[1]**o + ((0.700945147918-0.151739853369j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(-0.595051670345+0.9379713378j)*x[0]**o + ((-0.00697236021842-0.445389354769j))*x[0] + ((-0.66057761475-0.0813753903206j))*x[1]**o + ((-0.228435595113+0.310001190088j))*x[1]
+        ref[(0, 3, 0, 0)]=(-0.595051670345+0.9379713378j)*x_ref[0]**o + ((-0.00697236021842-0.445389354769j))*x_ref[0] + ((-0.66057761475-0.0813753903206j))*x_ref[1]**o + ((-0.228435595113+0.310001190088j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.810121423525+0.575976754275j)*x[0]**o + ((-0.452095952144+0.557640146306j))*x[0] + ((0.626461680624-0.503839594655j))*x[1]**o + ((-0.086987169561+0.868062780862j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.810121423525+0.575976754275j)*x_ref[0]**o + ((-0.452095952144+0.557640146306j))*x_ref[0] + ((0.626461680624-0.503839594655j))*x_ref[1]**o + ((-0.086987169561+0.868062780862j))*x_ref[1]
+        arg[(0, 3, 0, 2)]=(0.580057224821+0.203269610868j)*x[0]**o + ((0.396710957496-0.689666921995j))*x[0] + ((-0.433242763618-0.280390207562j))*x[1]**o + ((0.0689768183353+0.0508473190791j))*x[1]
+        ref[(0, 3, 0, 2)]=(0.580057224821+0.203269610868j)*x_ref[0]**o + ((0.396710957496-0.689666921995j))*x_ref[0] + ((-0.433242763618-0.280390207562j))*x_ref[1]**o + ((0.0689768183353+0.0508473190791j))*x_ref[1]
+        arg[(0, 3, 0, 3)]=(-0.2777861484-0.571678151041j)*x[0]**o + ((0.910287669733+0.662794249125j))*x[0] + ((0.823319541234-0.135283702177j))*x[1]**o + ((0.0876762256701+0.682384425361j))*x[1]
+        ref[(0, 3, 0, 3)]=(-0.2777861484-0.571678151041j)*x_ref[0]**o + ((0.910287669733+0.662794249125j))*x_ref[0] + ((0.823319541234-0.135283702177j))*x_ref[1]**o + ((0.0876762256701+0.682384425361j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.174660395448-0.222155135436j)*x[0]**o + ((0.389509025984-0.51736446861j))*x[0] + ((0.927166480473-0.147534609115j))*x[1]**o + ((-0.306709523761+0.08002937284j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.174660395448-0.222155135436j)*x_ref[0]**o + ((0.389509025984-0.51736446861j))*x_ref[0] + ((0.927166480473-0.147534609115j))*x_ref[1]**o + ((-0.306709523761+0.08002937284j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(-0.318830069309-0.357816138573j)*x[0]**o + ((0.782018844218+0.0885559266451j))*x[0] + ((0.749271751475+0.630026345327j))*x[1]**o + ((-0.367748735071-0.820276796384j))*x[1]
+        ref[(0, 3, 1, 1)]=(-0.318830069309-0.357816138573j)*x_ref[0]**o + ((0.782018844218+0.0885559266451j))*x_ref[0] + ((0.749271751475+0.630026345327j))*x_ref[1]**o + ((-0.367748735071-0.820276796384j))*x_ref[1]
+        arg[(0, 3, 1, 2)]=(-0.890203081785+0.602626084751j)*x[0]**o + ((0.830963883819+0.805073756443j))*x[0] + ((0.523062750188+0.226132725992j))*x[1]**o + ((0.58711687305-0.450939778818j))*x[1]
+        ref[(0, 3, 1, 2)]=(-0.890203081785+0.602626084751j)*x_ref[0]**o + ((0.830963883819+0.805073756443j))*x_ref[0] + ((0.523062750188+0.226132725992j))*x_ref[1]**o + ((0.58711687305-0.450939778818j))*x_ref[1]
+        arg[(0, 3, 1, 3)]=(-0.577212885805-0.712001924428j)*x[0]**o + ((-0.287521674343+0.732848329557j))*x[0] + ((-0.745364062957-0.750806713506j))*x[1]**o + ((-0.782955339614+0.434054451845j))*x[1]
+        ref[(0, 3, 1, 3)]=(-0.577212885805-0.712001924428j)*x_ref[0]**o + ((-0.287521674343+0.732848329557j))*x_ref[0] + ((-0.745364062957-0.750806713506j))*x_ref[1]**o + ((-0.782955339614+0.434054451845j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.895304754393-0.60232444086j)*x[0]**o + ((-0.0406696977565-0.145215245692j))*x[0] + ((0.6252048176+0.663510769141j))*x[1]**o + ((-0.579324867919+0.430262446343j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.895304754393-0.60232444086j)*x_ref[0]**o + ((-0.0406696977565-0.145215245692j))*x_ref[0] + ((0.6252048176+0.663510769141j))*x_ref[1]**o + ((-0.579324867919+0.430262446343j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.797585731535+0.887041718945j)*x[0]**o + ((0.687390685391-0.127014209749j))*x[0] + ((-0.631199779976-0.185884141457j))*x[1]**o + ((-0.247408148673+0.658861459917j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.797585731535+0.887041718945j)*x_ref[0]**o + ((0.687390685391-0.127014209749j))*x_ref[0] + ((-0.631199779976-0.185884141457j))*x_ref[1]**o + ((-0.247408148673+0.658861459917j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.0220189193881-0.106030861009j)*x[0]**o + ((-0.618896466448-0.0248343048135j))*x[0] + ((0.981719126202+0.00346908037143j))*x[1]**o + ((-0.97984657187+0.368703019172j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.0220189193881-0.106030861009j)*x_ref[0]**o + ((-0.618896466448-0.0248343048135j))*x_ref[0] + ((0.981719126202+0.00346908037143j))*x_ref[1]**o + ((-0.97984657187+0.368703019172j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(0.0908951579695-0.526734991708j)*x[0]**o + ((0.0586127165127-0.542551795859j))*x[0] + ((0.726150312646+0.781487397639j))*x[1]**o + ((0.969628378533-0.304165962497j))*x[1]
+        ref[(1, 0, 0, 3)]=(0.0908951579695-0.526734991708j)*x_ref[0]**o + ((0.0586127165127-0.542551795859j))*x_ref[0] + ((0.726150312646+0.781487397639j))*x_ref[1]**o + ((0.969628378533-0.304165962497j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.473610311604-0.306727856174j)*x[0]**o + ((0.783714291817-0.480279670985j))*x[0] + ((-0.330551738608+0.617179627131j))*x[1]**o + ((-0.58658018888-0.202496249127j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.473610311604-0.306727856174j)*x_ref[0]**o + ((0.783714291817-0.480279670985j))*x_ref[0] + ((-0.330551738608+0.617179627131j))*x_ref[1]**o + ((-0.58658018888-0.202496249127j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.408766852764-0.987109502482j)*x[0]**o + ((-0.0385012888271-0.658770495366j))*x[0] + ((-0.462175368376-0.50977744271j))*x[1]**o + ((-0.0212871405144+0.683674218064j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.408766852764-0.987109502482j)*x_ref[0]**o + ((-0.0385012888271-0.658770495366j))*x_ref[0] + ((-0.462175368376-0.50977744271j))*x_ref[1]**o + ((-0.0212871405144+0.683674218064j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.477229180456+0.191400500411j)*x[0]**o + ((0.788915414555-0.347289424426j))*x[0] + ((0.958664517867+0.55105876466j))*x[1]**o + ((-0.467068157859+0.827223790883j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.477229180456+0.191400500411j)*x_ref[0]**o + ((0.788915414555-0.347289424426j))*x_ref[0] + ((0.958664517867+0.55105876466j))*x_ref[1]**o + ((-0.467068157859+0.827223790883j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(0.803004448556+0.205007031539j)*x[0]**o + ((-0.0287733634561-0.61968740622j))*x[0] + ((0.0276761902274-0.0786480247288j))*x[1]**o + ((0.449877573988-0.814757739381j))*x[1]
+        ref[(1, 0, 1, 3)]=(0.803004448556+0.205007031539j)*x_ref[0]**o + ((-0.0287733634561-0.61968740622j))*x_ref[0] + ((0.0276761902274-0.0786480247288j))*x_ref[1]**o + ((0.449877573988-0.814757739381j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.455386661274-0.951040362491j)*x[0]**o + ((0.986489892217-0.60272815607j))*x[0] + ((-0.551242308518+0.13365938055j))*x[1]**o + ((0.466047804895+0.176491530926j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.455386661274-0.951040362491j)*x_ref[0]**o + ((0.986489892217-0.60272815607j))*x_ref[0] + ((-0.551242308518+0.13365938055j))*x_ref[1]**o + ((0.466047804895+0.176491530926j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.037755760859+0.587809858493j)*x[0]**o + ((0.550357657375-0.232238306893j))*x[0] + ((0.981929384855-0.984910791962j))*x[1]**o + ((0.329473668147-0.485395906142j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.037755760859+0.587809858493j)*x_ref[0]**o + ((0.550357657375-0.232238306893j))*x_ref[0] + ((0.981929384855-0.984910791962j))*x_ref[1]**o + ((0.329473668147-0.485395906142j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.903419443653-0.608075485254j)*x[0]**o + ((-0.653347147845-0.498340315721j))*x[0] + ((0.78394625101-0.357333844692j))*x[1]**o + ((0.856254557286-0.6160605985j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.903419443653-0.608075485254j)*x_ref[0]**o + ((-0.653347147845-0.498340315721j))*x_ref[0] + ((0.78394625101-0.357333844692j))*x_ref[1]**o + ((0.856254557286-0.6160605985j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.823709358924-0.284817109762j)*x[0]**o + ((0.0419754095075-0.225236031837j))*x[0] + ((0.195958295629+0.855855872664j))*x[1]**o + ((0.853459955177+0.783371603927j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.823709358924-0.284817109762j)*x_ref[0]**o + ((0.0419754095075-0.225236031837j))*x_ref[0] + ((0.195958295629+0.855855872664j))*x_ref[1]**o + ((0.853459955177+0.783371603927j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.322676279398+0.460638043854j)*x[0]**o + ((0.457000903919+0.383433748782j))*x[0] + ((-0.564549849484+0.649655814563j))*x[1]**o + ((-0.659841614295+0.898571398032j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.322676279398+0.460638043854j)*x_ref[0]**o + ((0.457000903919+0.383433748782j))*x_ref[0] + ((-0.564549849484+0.649655814563j))*x_ref[1]**o + ((-0.659841614295+0.898571398032j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.958253717291+0.0291681473858j)*x[0]**o + ((-0.657600732409-0.903670698541j))*x[0] + ((0.30896680698-0.598197025754j))*x[1]**o + ((0.794712736986-0.273174509484j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.958253717291+0.0291681473858j)*x_ref[0]**o + ((-0.657600732409-0.903670698541j))*x_ref[0] + ((0.30896680698-0.598197025754j))*x_ref[1]**o + ((0.794712736986-0.273174509484j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.423225871442-0.26900895394j)*x[0]**o + ((0.26576435369+0.341159926339j))*x[0] + ((0.119456507018+0.491243514965j))*x[1]**o + ((-0.0096813011193-0.35479605544j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.423225871442-0.26900895394j)*x_ref[0]**o + ((0.26576435369+0.341159926339j))*x_ref[0] + ((0.119456507018+0.491243514965j))*x_ref[1]**o + ((-0.0096813011193-0.35479605544j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.0583475235012-0.839714405241j)*x[0]**o + ((0.525693952893-0.780608465775j))*x[0] + ((0.0952392731938+0.378994683908j))*x[1]**o + ((0.042280119201-0.201240527991j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.0583475235012-0.839714405241j)*x_ref[0]**o + ((0.525693952893-0.780608465775j))*x_ref[0] + ((0.0952392731938+0.378994683908j))*x_ref[1]**o + ((0.042280119201-0.201240527991j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.0380536485391-0.161368839908j)*x[0]**o + ((0.46236170837+0.589227620505j))*x[0] + ((0.285730579251-0.0789673336992j))*x[1]**o + ((-0.957870824311+0.34184525371j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.0380536485391-0.161368839908j)*x_ref[0]**o + ((0.46236170837+0.589227620505j))*x_ref[0] + ((0.285730579251-0.0789673336992j))*x_ref[1]**o + ((-0.957870824311+0.34184525371j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.638093031546-0.971457961143j)*x[0]**o + ((0.380166399666-0.804187611641j))*x[0] + ((-0.0394113835225-0.721093782439j))*x[1]**o + ((0.278163648771+0.00928089879967j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.638093031546-0.971457961143j)*x_ref[0]**o + ((0.380166399666-0.804187611641j))*x_ref[0] + ((-0.0394113835225-0.721093782439j))*x_ref[1]**o + ((0.278163648771+0.00928089879967j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.0347996342927+0.617686245794j)*x[0]**o + ((-0.422644501306-0.0829274552125j))*x[0] + ((-0.606743373136-0.306896691012j))*x[1]**o + ((-0.0685394487701+0.200363115443j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.0347996342927+0.617686245794j)*x_ref[0]**o + ((-0.422644501306-0.0829274552125j))*x_ref[0] + ((-0.606743373136-0.306896691012j))*x_ref[1]**o + ((-0.0685394487701+0.200363115443j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(0.896522620063+0.200975989775j)*x[0]**o + ((0.770594229586+0.607769926892j))*x[0] + ((0.958019337307-0.937564346158j))*x[1]**o + ((-0.798211146778-0.0776947637379j))*x[1]
+        ref[(1, 2, 0, 3)]=(0.896522620063+0.200975989775j)*x_ref[0]**o + ((0.770594229586+0.607769926892j))*x_ref[0] + ((0.958019337307-0.937564346158j))*x_ref[1]**o + ((-0.798211146778-0.0776947637379j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.711438025877+0.415952197071j)*x[0]**o + ((-0.0120870358764-0.940745410938j))*x[0] + ((0.901961873032+0.595366345387j))*x[1]**o + ((0.902099694308-0.488370516102j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.711438025877+0.415952197071j)*x_ref[0]**o + ((-0.0120870358764-0.940745410938j))*x_ref[0] + ((0.901961873032+0.595366345387j))*x_ref[1]**o + ((0.902099694308-0.488370516102j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.422070973976+0.632011789491j)*x[0]**o + ((0.217574439158+0.723686736127j))*x[0] + ((-0.790773561304+0.811716971125j))*x[1]**o + ((0.417520530883+0.216593878299j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.422070973976+0.632011789491j)*x_ref[0]**o + ((0.217574439158+0.723686736127j))*x_ref[0] + ((-0.790773561304+0.811716971125j))*x_ref[1]**o + ((0.417520530883+0.216593878299j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.313273464302-0.584680249567j)*x[0]**o + ((0.363419590136+0.517063468219j))*x[0] + ((0.721964466884-0.317559931673j))*x[1]**o + ((-0.202381209919+0.953526915636j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.313273464302-0.584680249567j)*x_ref[0]**o + ((0.363419590136+0.517063468219j))*x_ref[0] + ((0.721964466884-0.317559931673j))*x_ref[1]**o + ((-0.202381209919+0.953526915636j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(0.829465926853-0.889296449958j)*x[0]**o + ((0.0146701192768+0.613295180135j))*x[0] + ((0.549603364458+0.898542484377j))*x[1]**o + ((0.320799220522+0.484813026702j))*x[1]
+        ref[(1, 2, 1, 3)]=(0.829465926853-0.889296449958j)*x_ref[0]**o + ((0.0146701192768+0.613295180135j))*x_ref[0] + ((0.549603364458+0.898542484377j))*x_ref[1]**o + ((0.320799220522+0.484813026702j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.173930767464+0.0958708823221j)*x[0]**o + ((0.926713669273+0.73340164562j))*x[0] + ((-0.61973128526+0.267671162181j))*x[1]**o + ((-0.5256892482+0.967795819659j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.173930767464+0.0958708823221j)*x_ref[0]**o + ((0.926713669273+0.73340164562j))*x_ref[0] + ((-0.61973128526+0.267671162181j))*x_ref[1]**o + ((-0.5256892482+0.967795819659j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.898119358282-0.831847745381j)*x[0]**o + ((-0.720733988635+0.477095452144j))*x[0] + ((0.579933714448-0.818469267589j))*x[1]**o + ((-0.845687476668+0.520831260822j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.898119358282-0.831847745381j)*x_ref[0]**o + ((-0.720733988635+0.477095452144j))*x_ref[0] + ((0.579933714448-0.818469267589j))*x_ref[1]**o + ((-0.845687476668+0.520831260822j))*x_ref[1]
+        arg[(1, 3, 0, 2)]=(-0.826011119002-0.351815979974j)*x[0]**o + ((0.265799035566+0.742277481915j))*x[0] + ((-0.461812515252-0.611786578086j))*x[1]**o + ((0.947829279807+0.106003671331j))*x[1]
+        ref[(1, 3, 0, 2)]=(-0.826011119002-0.351815979974j)*x_ref[0]**o + ((0.265799035566+0.742277481915j))*x_ref[0] + ((-0.461812515252-0.611786578086j))*x_ref[1]**o + ((0.947829279807+0.106003671331j))*x_ref[1]
+        arg[(1, 3, 0, 3)]=(-0.698283566812-0.278414762598j)*x[0]**o + ((0.715622891131+0.626851344676j))*x[0] + ((0.450516849404-0.578435483855j))*x[1]**o + ((-0.397384949559+0.115893938896j))*x[1]
+        ref[(1, 3, 0, 3)]=(-0.698283566812-0.278414762598j)*x_ref[0]**o + ((0.715622891131+0.626851344676j))*x_ref[0] + ((0.450516849404-0.578435483855j))*x_ref[1]**o + ((-0.397384949559+0.115893938896j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.767166007738-0.529680243601j)*x[0]**o + ((0.810843212952+0.452133653071j))*x[0] + ((0.210366206816-0.0656576839157j))*x[1]**o + ((0.822684988678-0.658811918708j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.767166007738-0.529680243601j)*x_ref[0]**o + ((0.810843212952+0.452133653071j))*x_ref[0] + ((0.210366206816-0.0656576839157j))*x_ref[1]**o + ((0.822684988678-0.658811918708j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.789348342683-0.367410139429j)*x[0]**o + ((0.30009532312+0.698626708725j))*x[0] + ((0.352630471725+0.451913483612j))*x[1]**o + ((0.274493096902+0.944269811034j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.789348342683-0.367410139429j)*x_ref[0]**o + ((0.30009532312+0.698626708725j))*x_ref[0] + ((0.352630471725+0.451913483612j))*x_ref[1]**o + ((0.274493096902+0.944269811034j))*x_ref[1]
+        arg[(1, 3, 1, 2)]=(-0.263171846941-0.254110193224j)*x[0]**o + ((0.806228151658-0.210662973098j))*x[0] + ((-0.470523032978-0.6137164789j))*x[1]**o + ((0.956274855125+0.218450022718j))*x[1]
+        ref[(1, 3, 1, 2)]=(-0.263171846941-0.254110193224j)*x_ref[0]**o + ((0.806228151658-0.210662973098j))*x_ref[0] + ((-0.470523032978-0.6137164789j))*x_ref[1]**o + ((0.956274855125+0.218450022718j))*x_ref[1]
+        arg[(1, 3, 1, 3)]=(-0.690456196498-0.0184264572518j)*x[0]**o + ((-0.536612116678+0.601035638784j))*x[0] + ((-0.34645322197+0.570084238239j))*x[1]**o + ((0.991206173482-0.98389322678j))*x[1]
+        ref[(1, 3, 1, 3)]=(-0.690456196498-0.0184264572518j)*x_ref[0]**o + ((-0.536612116678+0.601035638784j))*x_ref[0] + ((-0.34645322197+0.570084238239j))*x_ref[1]**o + ((0.991206173482-0.98389322678j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.466859363476+0.689296754585j)*x[0]**o + ((0.0839372640509-0.395880175594j))*x[0] + ((0.737719364744+0.658306608813j))*x[1]**o + ((0.654981443264-0.908456836393j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.466859363476+0.689296754585j)*x_ref[0]**o + ((0.0839372640509-0.395880175594j))*x_ref[0] + ((0.737719364744+0.658306608813j))*x_ref[1]**o + ((0.654981443264-0.908456836393j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.014692512818+0.552480114036j)*x[0]**o + ((-0.8458830752-0.147992543395j))*x[0] + ((-0.218874372813-0.240688800971j))*x[1]**o + ((-0.4383078472+0.965104059941j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.014692512818+0.552480114036j)*x_ref[0]**o + ((-0.8458830752-0.147992543395j))*x_ref[0] + ((-0.218874372813-0.240688800971j))*x_ref[1]**o + ((-0.4383078472+0.965104059941j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.685838272494+0.0700334396838j)*x[0]**o + ((0.624877130428-0.265901442597j))*x[0] + ((0.9850373005+0.80086163553j))*x[1]**o + ((-0.306680232714+0.134845108466j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.685838272494+0.0700334396838j)*x_ref[0]**o + ((0.624877130428-0.265901442597j))*x_ref[0] + ((0.9850373005+0.80086163553j))*x_ref[1]**o + ((-0.306680232714+0.134845108466j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.492151581194+0.249237087484j)*x[0]**o + ((0.369129427142-0.00695469587447j))*x[0] + ((-0.0272887203346-0.788596328717j))*x[1]**o + ((-0.00263025630286+0.632103449261j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.492151581194+0.249237087484j)*x_ref[0]**o + ((0.369129427142-0.00695469587447j))*x_ref[0] + ((-0.0272887203346-0.788596328717j))*x_ref[1]**o + ((-0.00263025630286+0.632103449261j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.205458167322+0.248539145139j)*x[0]**o + ((0.266020819236-0.335516537713j))*x[0] + ((0.189850284272-0.181156409832j))*x[1]**o + ((0.224091054437-0.724085134786j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.205458167322+0.248539145139j)*x_ref[0]**o + ((0.266020819236-0.335516537713j))*x_ref[0] + ((0.189850284272-0.181156409832j))*x_ref[1]**o + ((0.224091054437-0.724085134786j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.26826286961-0.0836795888519j)*x[0]**o + ((0.699382495044+0.56039765958j))*x[0] + ((0.217818211467+0.555769565196j))*x[1]**o + ((-0.516522214835+0.514365830023j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.26826286961-0.0836795888519j)*x_ref[0]**o + ((0.699382495044+0.56039765958j))*x_ref[0] + ((0.217818211467+0.555769565196j))*x_ref[1]**o + ((-0.516522214835+0.514365830023j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.411889005762-0.444871450629j)*x[0]**o + ((0.952858640032+0.102285334689j))*x[0] + ((0.326989171786+0.173238819714j))*x[1]**o + ((0.169502188993-0.139042722019j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.411889005762-0.444871450629j)*x_ref[0]**o + ((0.952858640032+0.102285334689j))*x_ref[0] + ((0.326989171786+0.173238819714j))*x_ref[1]**o + ((0.169502188993-0.139042722019j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.521084842656-0.298185763852j)*x[0]**o + ((0.371669409889+0.606648308114j))*x[0] + ((-0.126637793874-0.267666775615j))*x[1]**o + ((-0.755688014623-0.355340863584j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.521084842656-0.298185763852j)*x_ref[0]**o + ((0.371669409889+0.606648308114j))*x_ref[0] + ((-0.126637793874-0.267666775615j))*x_ref[1]**o + ((-0.755688014623-0.355340863584j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.469194372339+0.345648513758j)*x[0]**o + ((0.187572344386-0.512585560339j))*x[0] + ((0.536612828312-0.0401507654521j))*x[1]**o + ((0.660807215492+0.193052094908j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.469194372339+0.345648513758j)*x_ref[0]**o + ((0.187572344386-0.512585560339j))*x_ref[0] + ((0.536612828312-0.0401507654521j))*x_ref[1]**o + ((0.660807215492+0.193052094908j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.371404924972+0.822258540574j)*x[0]**o + ((0.648852187866-0.57415569934j))*x[0] + ((0.716000864227+0.497167001324j))*x[1]**o + ((-0.812703594963+0.0758225661661j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.371404924972+0.822258540574j)*x_ref[0]**o + ((0.648852187866-0.57415569934j))*x_ref[0] + ((0.716000864227+0.497167001324j))*x_ref[1]**o + ((-0.812703594963+0.0758225661661j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.757929109002-0.122636477924j)*x[0]**o + ((-0.448329410786-0.518523944416j))*x[0] + ((-0.157564272771-0.213171086168j))*x[1]**o + ((-0.38387108913+0.624157705452j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.757929109002-0.122636477924j)*x_ref[0]**o + ((-0.448329410786-0.518523944416j))*x_ref[0] + ((-0.157564272771-0.213171086168j))*x_ref[1]**o + ((-0.38387108913+0.624157705452j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.830563925368+0.480505226413j)*x[0]**o + ((-0.060845905211-0.622671661579j))*x[0] + ((-0.517937539467-0.135837248787j))*x[1]**o + ((0.683485270207+0.725947092762j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.830563925368+0.480505226413j)*x_ref[0]**o + ((-0.060845905211-0.622671661579j))*x_ref[0] + ((-0.517937539467-0.135837248787j))*x_ref[1]**o + ((0.683485270207+0.725947092762j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.919358346648-0.346480620584j)*x[0]**o + ((0.585256165197+0.796966341692j))*x[0] + ((-0.0553651092083+0.829905762474j))*x[1]**o + ((-0.52629552428-0.315901111876j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.919358346648-0.346480620584j)*x_ref[0]**o + ((0.585256165197+0.796966341692j))*x_ref[0] + ((-0.0553651092083+0.829905762474j))*x_ref[1]**o + ((-0.52629552428-0.315901111876j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.909835816983-0.102028166572j)*x[0]**o + ((0.263586131247-0.679859768413j))*x[0] + ((-0.85402949433-0.175855120853j))*x[1]**o + ((0.732297889177-0.0786157775962j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.909835816983-0.102028166572j)*x_ref[0]**o + ((0.263586131247-0.679859768413j))*x_ref[0] + ((-0.85402949433-0.175855120853j))*x_ref[1]**o + ((0.732297889177-0.0786157775962j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.540110209194-0.192539852619j)*x[0]**o + ((-0.436676135857-0.87875730643j))*x[0] + ((0.516689785605+0.476743207646j))*x[1]**o + ((0.756335881182-0.232793644036j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.540110209194-0.192539852619j)*x_ref[0]**o + ((-0.436676135857-0.87875730643j))*x_ref[0] + ((0.516689785605+0.476743207646j))*x_ref[1]**o + ((0.756335881182-0.232793644036j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(0.855668855522+0.779596434464j)*x[0]**o + ((-0.563649941936+0.8655490573j))*x[0] + ((0.261712346908+0.840735648237j))*x[1]**o + ((0.0656436315366-0.416015177799j))*x[1]
+        ref[(2, 1, 1, 3)]=(0.855668855522+0.779596434464j)*x_ref[0]**o + ((-0.563649941936+0.8655490573j))*x_ref[0] + ((0.261712346908+0.840735648237j))*x_ref[1]**o + ((0.0656436315366-0.416015177799j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(-0.481747829531+0.917983926072j)*x[0]**o + ((0.653859842371-0.671599066718j))*x[0] + ((0.52888656479+0.555305616202j))*x[1]**o + ((0.995067177706-0.700789342956j))*x[1]
+        ref[(2, 2, 0, 0)]=(-0.481747829531+0.917983926072j)*x_ref[0]**o + ((0.653859842371-0.671599066718j))*x_ref[0] + ((0.52888656479+0.555305616202j))*x_ref[1]**o + ((0.995067177706-0.700789342956j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.393894612354+0.241454746376j)*x[0]**o + ((0.977610954123-0.270135294095j))*x[0] + ((0.644655130527+0.967609791175j))*x[1]**o + ((-0.744936629305+0.0152078892099j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.393894612354+0.241454746376j)*x_ref[0]**o + ((0.977610954123-0.270135294095j))*x_ref[0] + ((0.644655130527+0.967609791175j))*x_ref[1]**o + ((-0.744936629305+0.0152078892099j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(-0.114675886944+0.900117369814j)*x[0]**o + ((-0.363180178355-0.253438685826j))*x[0] + ((0.885152821976+0.191323334662j))*x[1]**o + ((-0.658971357244-0.638096263909j))*x[1]
+        ref[(2, 2, 0, 2)]=(-0.114675886944+0.900117369814j)*x_ref[0]**o + ((-0.363180178355-0.253438685826j))*x_ref[0] + ((0.885152821976+0.191323334662j))*x_ref[1]**o + ((-0.658971357244-0.638096263909j))*x_ref[1]
+        arg[(2, 2, 0, 3)]=(-0.301125712463+0.271407061767j)*x[0]**o + ((0.365347874793+0.987426717284j))*x[0] + ((-0.602341032089+0.339667447849j))*x[1]**o + ((-0.267075730019+0.951470501977j))*x[1]
+        ref[(2, 2, 0, 3)]=(-0.301125712463+0.271407061767j)*x_ref[0]**o + ((0.365347874793+0.987426717284j))*x_ref[0] + ((-0.602341032089+0.339667447849j))*x_ref[1]**o + ((-0.267075730019+0.951470501977j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.323774666042-0.673824709199j)*x[0]**o + ((-0.357964185853-0.9520969128j))*x[0] + ((0.439305927458-0.305870417261j))*x[1]**o + ((0.0573613037323-0.827350286745j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.323774666042-0.673824709199j)*x_ref[0]**o + ((-0.357964185853-0.9520969128j))*x_ref[0] + ((0.439305927458-0.305870417261j))*x_ref[1]**o + ((0.0573613037323-0.827350286745j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.205784130804-0.817822563014j)*x[0]**o + ((-0.666307770628-0.697866400549j))*x[0] + ((0.401934466176-0.755895703379j))*x[1]**o + ((-0.236389130507-0.187747952087j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.205784130804-0.817822563014j)*x_ref[0]**o + ((-0.666307770628-0.697866400549j))*x_ref[0] + ((0.401934466176-0.755895703379j))*x_ref[1]**o + ((-0.236389130507-0.187747952087j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(0.406150898611+0.874663376184j)*x[0]**o + ((-0.976954783685-0.9036328201j))*x[0] + ((-0.816188632647+0.0801916417438j))*x[1]**o + ((0.791333855436-0.583232442493j))*x[1]
+        ref[(2, 2, 1, 2)]=(0.406150898611+0.874663376184j)*x_ref[0]**o + ((-0.976954783685-0.9036328201j))*x_ref[0] + ((-0.816188632647+0.0801916417438j))*x_ref[1]**o + ((0.791333855436-0.583232442493j))*x_ref[1]
+        arg[(2, 2, 1, 3)]=(-0.0928877373701+0.208499959794j)*x[0]**o + ((0.304806207699-0.0401172715919j))*x[0] + ((0.384019437217-0.597350487164j))*x[1]**o + ((-0.490700264482-0.668795160418j))*x[1]
+        ref[(2, 2, 1, 3)]=(-0.0928877373701+0.208499959794j)*x_ref[0]**o + ((0.304806207699-0.0401172715919j))*x_ref[0] + ((0.384019437217-0.597350487164j))*x_ref[1]**o + ((-0.490700264482-0.668795160418j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(0.270637490058+0.0587948000237j)*x[0]**o + ((-0.570787731713-0.483933539514j))*x[0] + ((0.660239530635+0.452725976817j))*x[1]**o + ((0.465930352387-0.820168024837j))*x[1]
+        ref[(2, 3, 0, 0)]=(0.270637490058+0.0587948000237j)*x_ref[0]**o + ((-0.570787731713-0.483933539514j))*x_ref[0] + ((0.660239530635+0.452725976817j))*x_ref[1]**o + ((0.465930352387-0.820168024837j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(0.383312742646+0.212452618613j)*x[0]**o + ((-0.0337635869887-0.245480733122j))*x[0] + ((-0.589070780112+0.875578190044j))*x[1]**o + ((-0.255202782288+0.147335906848j))*x[1]
+        ref[(2, 3, 0, 1)]=(0.383312742646+0.212452618613j)*x_ref[0]**o + ((-0.0337635869887-0.245480733122j))*x_ref[0] + ((-0.589070780112+0.875578190044j))*x_ref[1]**o + ((-0.255202782288+0.147335906848j))*x_ref[1]
+        arg[(2, 3, 0, 2)]=(0.412807646612+0.955339556002j)*x[0]**o + ((0.106605431687+0.545935408691j))*x[0] + ((-0.85406512284-0.326523681421j))*x[1]**o + ((-0.465142022494+0.266487211584j))*x[1]
+        ref[(2, 3, 0, 2)]=(0.412807646612+0.955339556002j)*x_ref[0]**o + ((0.106605431687+0.545935408691j))*x_ref[0] + ((-0.85406512284-0.326523681421j))*x_ref[1]**o + ((-0.465142022494+0.266487211584j))*x_ref[1]
+        arg[(2, 3, 0, 3)]=(0.100029758519+0.454895352907j)*x[0]**o + ((-0.859247732043-0.651081112256j))*x[0] + ((0.642875378499+0.057001120895j))*x[1]**o + ((0.606827375369-0.411451710654j))*x[1]
+        ref[(2, 3, 0, 3)]=(0.100029758519+0.454895352907j)*x_ref[0]**o + ((-0.859247732043-0.651081112256j))*x_ref[0] + ((0.642875378499+0.057001120895j))*x_ref[1]**o + ((0.606827375369-0.411451710654j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(-0.417774579692+0.181507471839j)*x[0]**o + ((0.811975519883+0.558402109368j))*x[0] + ((0.0186051927908-0.174049596869j))*x[1]**o + ((-0.341815782001-0.459793070039j))*x[1]
+        ref[(2, 3, 1, 0)]=(-0.417774579692+0.181507471839j)*x_ref[0]**o + ((0.811975519883+0.558402109368j))*x_ref[0] + ((0.0186051927908-0.174049596869j))*x_ref[1]**o + ((-0.341815782001-0.459793070039j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(0.870399081065+0.73944774356j)*x[0]**o + ((0.54742339967-0.0928801496166j))*x[0] + ((-0.524565944909+0.508928178213j))*x[1]**o + ((0.565231949968+0.647972122887j))*x[1]
+        ref[(2, 3, 1, 1)]=(0.870399081065+0.73944774356j)*x_ref[0]**o + ((0.54742339967-0.0928801496166j))*x_ref[0] + ((-0.524565944909+0.508928178213j))*x_ref[1]**o + ((0.565231949968+0.647972122887j))*x_ref[1]
+        arg[(2, 3, 1, 2)]=(-0.460565361097-0.223177345414j)*x[0]**o + ((0.153146476504-0.107663771241j))*x[0] + ((0.599261443525+0.294827943201j))*x[1]**o + ((0.662468958218-0.977583643994j))*x[1]
+        ref[(2, 3, 1, 2)]=(-0.460565361097-0.223177345414j)*x_ref[0]**o + ((0.153146476504-0.107663771241j))*x_ref[0] + ((0.599261443525+0.294827943201j))*x_ref[1]**o + ((0.662468958218-0.977583643994j))*x_ref[1]
+        arg[(2, 3, 1, 3)]=(0.119528329885+0.658440720741j)*x[0]**o + ((-0.418762320873+0.741527181834j))*x[0] + ((-0.676400199012-0.747854377744j))*x[1]**o + ((-0.51875982881-0.524148285897j))*x[1]
+        ref[(2, 3, 1, 3)]=(0.119528329885+0.658440720741j)*x_ref[0]**o + ((-0.418762320873+0.741527181834j))*x_ref[0] + ((-0.676400199012-0.747854377744j))*x_ref[1]**o + ((-0.51875982881-0.524148285897j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.831531069533+0.610367697145j)*x[0]**o + ((-0.505925674452+0.119539054653j))*x[0] + ((0.448658195145-0.517515389264j))*x[1]**o + ((0.279761414055+0.73687819406j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.831531069533+0.610367697145j)*x_ref[0]**o + ((-0.505925674452+0.119539054653j))*x_ref[0] + ((0.448658195145-0.517515389264j))*x_ref[1]**o + ((0.279761414055+0.73687819406j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(-0.271706435751+0.293434174427j)*x[0]**o + ((0.69806723671-0.591045634016j))*x[0] + ((0.719209358811+0.861666816421j))*x[1]**o + ((0.266553235246-0.935816721442j))*x[1]
+        ref[(3, 0, 0, 1)]=(-0.271706435751+0.293434174427j)*x_ref[0]**o + ((0.69806723671-0.591045634016j))*x_ref[0] + ((0.719209358811+0.861666816421j))*x_ref[1]**o + ((0.266553235246-0.935816721442j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(0.557554519932-0.693824288629j)*x[0]**o + ((0.32025063043+0.879882486064j))*x[0] + ((0.878971187085+0.459704563001j))*x[1]**o + ((-0.912851771901-0.0651669516222j))*x[1]
+        ref[(3, 0, 0, 2)]=(0.557554519932-0.693824288629j)*x_ref[0]**o + ((0.32025063043+0.879882486064j))*x_ref[0] + ((0.878971187085+0.459704563001j))*x_ref[1]**o + ((-0.912851771901-0.0651669516222j))*x_ref[1]
+        arg[(3, 0, 0, 3)]=(0.272533129349-0.300617873414j)*x[0]**o + ((0.024273296757-0.978580490684j))*x[0] + ((-0.161626831339-0.657768765245j))*x[1]**o + ((-0.731895604083-0.111610507647j))*x[1]
+        ref[(3, 0, 0, 3)]=(0.272533129349-0.300617873414j)*x_ref[0]**o + ((0.024273296757-0.978580490684j))*x_ref[0] + ((-0.161626831339-0.657768765245j))*x_ref[1]**o + ((-0.731895604083-0.111610507647j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.496837774041-0.359549068554j)*x[0]**o + ((-0.506295153521+0.563024376065j))*x[0] + ((0.848759435609+0.0293895185113j))*x[1]**o + ((0.494462034523-0.147214488873j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.496837774041-0.359549068554j)*x_ref[0]**o + ((-0.506295153521+0.563024376065j))*x_ref[0] + ((0.848759435609+0.0293895185113j))*x_ref[1]**o + ((0.494462034523-0.147214488873j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.304237823821-0.523009694047j)*x[0]**o + ((-0.443476762542-0.0128282088374j))*x[0] + ((-0.952853622724+0.776541196892j))*x[1]**o + ((-0.053528424019+0.435049281699j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.304237823821-0.523009694047j)*x_ref[0]**o + ((-0.443476762542-0.0128282088374j))*x_ref[0] + ((-0.952853622724+0.776541196892j))*x_ref[1]**o + ((-0.053528424019+0.435049281699j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(0.973486415999-0.50036967497j)*x[0]**o + ((0.331676451261-0.0475325276397j))*x[0] + ((-0.402941445164-0.117911734797j))*x[1]**o + ((-0.192114259088-0.351685339863j))*x[1]
+        ref[(3, 0, 1, 2)]=(0.973486415999-0.50036967497j)*x_ref[0]**o + ((0.331676451261-0.0475325276397j))*x_ref[0] + ((-0.402941445164-0.117911734797j))*x_ref[1]**o + ((-0.192114259088-0.351685339863j))*x_ref[1]
+        arg[(3, 0, 1, 3)]=(-0.247172707638+0.816299882736j)*x[0]**o + ((0.352990759881+0.0087391610091j))*x[0] + ((-0.365179387187+0.320432947054j))*x[1]**o + ((0.71781163792+0.399530371245j))*x[1]
+        ref[(3, 0, 1, 3)]=(-0.247172707638+0.816299882736j)*x_ref[0]**o + ((0.352990759881+0.0087391610091j))*x_ref[0] + ((-0.365179387187+0.320432947054j))*x_ref[1]**o + ((0.71781163792+0.399530371245j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.536533529019+0.969487005058j)*x[0]**o + ((0.220258496184-0.447148576381j))*x[0] + ((-0.317037474373+0.053340915011j))*x[1]**o + ((-0.633260107743-0.6474539898j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.536533529019+0.969487005058j)*x_ref[0]**o + ((0.220258496184-0.447148576381j))*x_ref[0] + ((-0.317037474373+0.053340915011j))*x_ref[1]**o + ((-0.633260107743-0.6474539898j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.538615185253-0.763767954373j)*x[0]**o + ((0.306158921312-0.493766354312j))*x[0] + ((-0.0317015521747-0.100695769849j))*x[1]**o + ((-0.961605530412+0.926518931735j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.538615185253-0.763767954373j)*x_ref[0]**o + ((0.306158921312-0.493766354312j))*x_ref[0] + ((-0.0317015521747-0.100695769849j))*x_ref[1]**o + ((-0.961605530412+0.926518931735j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(0.568838050578+0.232822748225j)*x[0]**o + ((0.0773268056333-0.882327151983j))*x[0] + ((-0.699763135174-0.768630584149j))*x[1]**o + ((-0.849023967188-0.245965129742j))*x[1]
+        ref[(3, 1, 0, 2)]=(0.568838050578+0.232822748225j)*x_ref[0]**o + ((0.0773268056333-0.882327151983j))*x_ref[0] + ((-0.699763135174-0.768630584149j))*x_ref[1]**o + ((-0.849023967188-0.245965129742j))*x_ref[1]
+        arg[(3, 1, 0, 3)]=(0.0873688952828-0.404971662226j)*x[0]**o + ((0.282190112575+0.868233812888j))*x[0] + ((-0.0672658866859-0.163821501569j))*x[1]**o + ((-0.334297338904+0.96522270606j))*x[1]
+        ref[(3, 1, 0, 3)]=(0.0873688952828-0.404971662226j)*x_ref[0]**o + ((0.282190112575+0.868233812888j))*x_ref[0] + ((-0.0672658866859-0.163821501569j))*x_ref[1]**o + ((-0.334297338904+0.96522270606j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(-0.0453668143094-0.633859603847j)*x[0]**o + ((0.28911041099-0.637370611955j))*x[0] + ((0.74197609547-0.932216139257j))*x[1]**o + ((0.655260802083-0.889097778258j))*x[1]
+        ref[(3, 1, 1, 0)]=(-0.0453668143094-0.633859603847j)*x_ref[0]**o + ((0.28911041099-0.637370611955j))*x_ref[0] + ((0.74197609547-0.932216139257j))*x_ref[1]**o + ((0.655260802083-0.889097778258j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.604288462488-0.854019176142j)*x[0]**o + ((-0.7708599985-0.821536144425j))*x[0] + ((-0.73645975766+0.187876107486j))*x[1]**o + ((0.876978384989-0.934987588679j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.604288462488-0.854019176142j)*x_ref[0]**o + ((-0.7708599985-0.821536144425j))*x_ref[0] + ((-0.73645975766+0.187876107486j))*x_ref[1]**o + ((0.876978384989-0.934987588679j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(-0.95259481851-0.855707515387j)*x[0]**o + ((0.60237645167+0.582041473139j))*x[0] + ((0.769164088839+0.171496599027j))*x[1]**o + ((-0.384097567323+0.228097247285j))*x[1]
+        ref[(3, 1, 1, 2)]=(-0.95259481851-0.855707515387j)*x_ref[0]**o + ((0.60237645167+0.582041473139j))*x_ref[0] + ((0.769164088839+0.171496599027j))*x_ref[1]**o + ((-0.384097567323+0.228097247285j))*x_ref[1]
+        arg[(3, 1, 1, 3)]=(-0.862446459769+0.0969529422345j)*x[0]**o + ((0.174447120127+0.695644582626j))*x[0] + ((-0.439332988047-0.318201476738j))*x[1]**o + ((-0.923471037023-0.24225012599j))*x[1]
+        ref[(3, 1, 1, 3)]=(-0.862446459769+0.0969529422345j)*x_ref[0]**o + ((0.174447120127+0.695644582626j))*x_ref[0] + ((-0.439332988047-0.318201476738j))*x_ref[1]**o + ((-0.923471037023-0.24225012599j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(0.384431965369+0.0998872471814j)*x[0]**o + ((-0.0060139548344-0.407770162911j))*x[0] + ((-0.51062865483+0.302767120103j))*x[1]**o + ((0.349652808472-0.960751456233j))*x[1]
+        ref[(3, 2, 0, 0)]=(0.384431965369+0.0998872471814j)*x_ref[0]**o + ((-0.0060139548344-0.407770162911j))*x_ref[0] + ((-0.51062865483+0.302767120103j))*x_ref[1]**o + ((0.349652808472-0.960751456233j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(-0.933210818563-0.0805024845311j)*x[0]**o + ((0.597648204618+0.799826908711j))*x[0] + ((0.9655238786-0.0950995873016j))*x[1]**o + ((-0.997869879336+0.716053908891j))*x[1]
+        ref[(3, 2, 0, 1)]=(-0.933210818563-0.0805024845311j)*x_ref[0]**o + ((0.597648204618+0.799826908711j))*x_ref[0] + ((0.9655238786-0.0950995873016j))*x_ref[1]**o + ((-0.997869879336+0.716053908891j))*x_ref[1]
+        arg[(3, 2, 0, 2)]=(0.293407664027-0.32970773027j)*x[0]**o + ((-0.390193824017-0.865694833808j))*x[0] + ((-0.897737908804-0.756237454598j))*x[1]**o + ((0.963311151191+0.568599094159j))*x[1]
+        ref[(3, 2, 0, 2)]=(0.293407664027-0.32970773027j)*x_ref[0]**o + ((-0.390193824017-0.865694833808j))*x_ref[0] + ((-0.897737908804-0.756237454598j))*x_ref[1]**o + ((0.963311151191+0.568599094159j))*x_ref[1]
+        arg[(3, 2, 0, 3)]=(0.128743456536-0.683491424822j)*x[0]**o + ((0.163142780705-0.409849360218j))*x[0] + ((0.725772350761+0.320713266151j))*x[1]**o + ((-0.730284845387-0.207566559625j))*x[1]
+        ref[(3, 2, 0, 3)]=(0.128743456536-0.683491424822j)*x_ref[0]**o + ((0.163142780705-0.409849360218j))*x_ref[0] + ((0.725772350761+0.320713266151j))*x_ref[1]**o + ((-0.730284845387-0.207566559625j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.602289711032+0.172021388394j)*x[0]**o + ((0.0981230692793-0.246392539376j))*x[0] + ((0.266626326525+0.417764661411j))*x[1]**o + ((0.204537135416-0.0388139646965j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.602289711032+0.172021388394j)*x_ref[0]**o + ((0.0981230692793-0.246392539376j))*x_ref[0] + ((0.266626326525+0.417764661411j))*x_ref[1]**o + ((0.204537135416-0.0388139646965j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(-0.730166439522+0.054085199093j)*x[0]**o + ((0.74730198984-0.636520721577j))*x[0] + ((-0.0646002384013+0.536558764074j))*x[1]**o + ((-0.701298180379+0.118587324042j))*x[1]
+        ref[(3, 2, 1, 1)]=(-0.730166439522+0.054085199093j)*x_ref[0]**o + ((0.74730198984-0.636520721577j))*x_ref[0] + ((-0.0646002384013+0.536558764074j))*x_ref[1]**o + ((-0.701298180379+0.118587324042j))*x_ref[1]
+        arg[(3, 2, 1, 2)]=(0.338367720131+0.256682561166j)*x[0]**o + ((-0.0101097705928+0.46862308334j))*x[0] + ((-0.673491698761-0.0382750054339j))*x[1]**o + ((0.87357801012+0.349789034149j))*x[1]
+        ref[(3, 2, 1, 2)]=(0.338367720131+0.256682561166j)*x_ref[0]**o + ((-0.0101097705928+0.46862308334j))*x_ref[0] + ((-0.673491698761-0.0382750054339j))*x_ref[1]**o + ((0.87357801012+0.349789034149j))*x_ref[1]
+        arg[(3, 2, 1, 3)]=(0.421770762548+0.665843355872j)*x[0]**o + ((0.188103203631+0.829884053235j))*x[0] + ((-0.686852498228-0.986437376778j))*x[1]**o + ((0.931414233566+0.963764067241j))*x[1]
+        ref[(3, 2, 1, 3)]=(0.421770762548+0.665843355872j)*x_ref[0]**o + ((0.188103203631+0.829884053235j))*x_ref[0] + ((-0.686852498228-0.986437376778j))*x_ref[1]**o + ((0.931414233566+0.963764067241j))*x_ref[1]
+        arg[(3, 3, 0, 0)]=(0.700583172188+0.860972909288j)*x[0]**o + ((-0.804935654842+0.830733725601j))*x[0] + ((-0.179437914708-0.0655271301289j))*x[1]**o + ((0.907532148321-0.968755196671j))*x[1]
+        ref[(3, 3, 0, 0)]=(0.700583172188+0.860972909288j)*x_ref[0]**o + ((-0.804935654842+0.830733725601j))*x_ref[0] + ((-0.179437914708-0.0655271301289j))*x_ref[1]**o + ((0.907532148321-0.968755196671j))*x_ref[1]
+        arg[(3, 3, 0, 1)]=(0.667145722261-0.967088900272j)*x[0]**o + ((0.706212435636+0.0142336411564j))*x[0] + ((-0.295213228513-0.964787224535j))*x[1]**o + ((0.876367187478+0.0776111349817j))*x[1]
+        ref[(3, 3, 0, 1)]=(0.667145722261-0.967088900272j)*x_ref[0]**o + ((0.706212435636+0.0142336411564j))*x_ref[0] + ((-0.295213228513-0.964787224535j))*x_ref[1]**o + ((0.876367187478+0.0776111349817j))*x_ref[1]
+        arg[(3, 3, 0, 2)]=(0.212220832673+0.635461303712j)*x[0]**o + ((0.820878989036+0.717788178638j))*x[0] + ((-0.685810237111-0.0868683398815j))*x[1]**o + ((-0.350468677591+0.318296899469j))*x[1]
+        ref[(3, 3, 0, 2)]=(0.212220832673+0.635461303712j)*x_ref[0]**o + ((0.820878989036+0.717788178638j))*x_ref[0] + ((-0.685810237111-0.0868683398815j))*x_ref[1]**o + ((-0.350468677591+0.318296899469j))*x_ref[1]
+        arg[(3, 3, 0, 3)]=(0.16084538538-0.325323970937j)*x[0]**o + ((-0.303500143244+0.00634743420467j))*x[0] + ((-0.78997848146+0.936813597878j))*x[1]**o + ((-0.349889604382-0.753305616977j))*x[1]
+        ref[(3, 3, 0, 3)]=(0.16084538538-0.325323970937j)*x_ref[0]**o + ((-0.303500143244+0.00634743420467j))*x_ref[0] + ((-0.78997848146+0.936813597878j))*x_ref[1]**o + ((-0.349889604382-0.753305616977j))*x_ref[1]
+        arg[(3, 3, 1, 0)]=(-0.794270905862+0.532807904411j)*x[0]**o + ((-0.548134798894+0.0395907348452j))*x[0] + ((0.158630922167-0.789017369506j))*x[1]**o + ((-0.18625030161+0.723257741517j))*x[1]
+        ref[(3, 3, 1, 0)]=(-0.794270905862+0.532807904411j)*x_ref[0]**o + ((-0.548134798894+0.0395907348452j))*x_ref[0] + ((0.158630922167-0.789017369506j))*x_ref[1]**o + ((-0.18625030161+0.723257741517j))*x_ref[1]
+        arg[(3, 3, 1, 1)]=(0.182606263612-0.441218241374j)*x[0]**o + ((0.594461174488-0.919135647354j))*x[0] + ((0.336056331488+0.134883662105j))*x[1]**o + ((-0.267738779008+0.823619881296j))*x[1]
+        ref[(3, 3, 1, 1)]=(0.182606263612-0.441218241374j)*x_ref[0]**o + ((0.594461174488-0.919135647354j))*x_ref[0] + ((0.336056331488+0.134883662105j))*x_ref[1]**o + ((-0.267738779008+0.823619881296j))*x_ref[1]
+        arg[(3, 3, 1, 2)]=(0.357979786353+0.985239073059j)*x[0]**o + ((0.85215387976-0.00692964030142j))*x[0] + ((0.831625050639+0.715559872239j))*x[1]**o + ((-0.978402285205+0.71692659443j))*x[1]
+        ref[(3, 3, 1, 2)]=(0.357979786353+0.985239073059j)*x_ref[0]**o + ((0.85215387976-0.00692964030142j))*x_ref[0] + ((0.831625050639+0.715559872239j))*x_ref[1]**o + ((-0.978402285205+0.71692659443j))*x_ref[1]
+        arg[(3, 3, 1, 3)]=(-0.708537822608+0.713778503144j)*x[0]**o + ((-0.188091292698-0.667922424814j))*x[0] + ((-0.265942375008-0.220216510102j))*x[1]**o + ((0.944663046999-0.593067445777j))*x[1]
+        ref[(3, 3, 1, 3)]=(-0.708537822608+0.713778503144j)*x_ref[0]**o + ((-0.188091292698-0.667922424814j))*x_ref[0] + ((-0.265942375008-0.220216510102j))*x_ref[1]**o + ((0.944663046999-0.593067445777j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.758751667924+0.116583620689j)*x[2]**o + ((0.753201994106+0.608785768725j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.758751667924+0.116583620689j)*x_ref[2]**o + ((0.753201994106+0.608785768725j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.304331354732-0.350931539315j)*x[2]**o + ((-0.728329321713+0.900427025347j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.304331354732-0.350931539315j)*x_ref[2]**o + ((-0.728329321713+0.900427025347j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.360126888008+0.732952853254j)*x[2]**o + ((0.165532845255-0.576767226857j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.360126888008+0.732952853254j)*x_ref[2]**o + ((0.165532845255-0.576767226857j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.866494321358+0.46879130264j)*x[2]**o + ((-0.671411248636+0.429904845007j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.866494321358+0.46879130264j)*x_ref[2]**o + ((-0.671411248636+0.429904845007j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.414676092556-0.0709895093424j)*x[2]**o + ((0.410308886911+0.588057276896j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.414676092556-0.0709895093424j)*x_ref[2]**o + ((0.410308886911+0.588057276896j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.270642892537+0.267106048965j)*x[2]**o + ((-0.0752890627069+0.536181876167j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.270642892537+0.267106048965j)*x_ref[2]**o + ((-0.0752890627069+0.536181876167j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.469238986474-0.00906295233858j)*x[2]**o + ((-0.0851424117227+0.61057046895j))*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.469238986474-0.00906295233858j)*x_ref[2]**o + ((-0.0851424117227+0.61057046895j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(-0.467165714088+0.486993700803j)*x[2]**o + ((-0.100824047354-0.577836426495j))*x[2]
+            ref[(0, 0, 1, 3)]+=(-0.467165714088+0.486993700803j)*x_ref[2]**o + ((-0.100824047354-0.577836426495j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.982968769941-0.398893775678j)*x[2]**o + ((0.270960400204+0.946173307776j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.982968769941-0.398893775678j)*x_ref[2]**o + ((0.270960400204+0.946173307776j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.753156818686-0.116682958231j)*x[2]**o + ((0.39236071653-0.270462984656j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.753156818686-0.116682958231j)*x_ref[2]**o + ((0.39236071653-0.270462984656j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.48868049832+0.958595905902j)*x[2]**o + ((0.205562418761-0.85479044891j))*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.48868049832+0.958595905902j)*x_ref[2]**o + ((0.205562418761-0.85479044891j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.481801785082-0.385767443162j)*x[2]**o + ((0.59518953412+0.0371628427105j))*x[2]
+            ref[(0, 1, 0, 3)]+=(0.481801785082-0.385767443162j)*x_ref[2]**o + ((0.59518953412+0.0371628427105j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.0242935029797-0.999163702594j)*x[2]**o + ((0.541509000356-0.365154208787j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.0242935029797-0.999163702594j)*x_ref[2]**o + ((0.541509000356-0.365154208787j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.33553903696+0.898644221147j)*x[2]**o + ((0.425964135299-0.201853140705j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.33553903696+0.898644221147j)*x_ref[2]**o + ((0.425964135299-0.201853140705j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.818982220699-0.986188026125j)*x[2]**o + ((-0.332513195768-0.507702947911j))*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.818982220699-0.986188026125j)*x_ref[2]**o + ((-0.332513195768-0.507702947911j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.0628380114978-0.636273244787j)*x[2]**o + ((-0.192791744407-0.828909603704j))*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.0628380114978-0.636273244787j)*x_ref[2]**o + ((-0.192791744407-0.828909603704j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.0067269705542-0.059752255283j)*x[2]**o + ((0.426369242015-0.764969602065j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.0067269705542-0.059752255283j)*x_ref[2]**o + ((0.426369242015-0.764969602065j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.249190492806+0.837276263957j)*x[2]**o + ((0.838207527144-0.00655296107135j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.249190492806+0.837276263957j)*x_ref[2]**o + ((0.838207527144-0.00655296107135j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.825338219647-0.681563125778j)*x[2]**o + ((0.109117398704-0.8195263303j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.825338219647-0.681563125778j)*x_ref[2]**o + ((0.109117398704-0.8195263303j))*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(-0.161056124111+0.593650989402j)*x[2]**o + ((-0.163961633204-0.620337528261j))*x[2]
+            ref[(0, 2, 0, 3)]+=(-0.161056124111+0.593650989402j)*x_ref[2]**o + ((-0.163961633204-0.620337528261j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.456719093477+0.0320643181571j)*x[2]**o + ((-0.114654850389+0.812725575066j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.456719093477+0.0320643181571j)*x_ref[2]**o + ((-0.114654850389+0.812725575066j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.497800512495+0.686479298077j)*x[2]**o + ((-0.895899783939+0.140983470428j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.497800512495+0.686479298077j)*x_ref[2]**o + ((-0.895899783939+0.140983470428j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.0900714401264-0.811322464839j)*x[2]**o + ((-0.165432065655+0.898515408953j))*x[2]
+            ref[(0, 2, 1, 2)]+=(0.0900714401264-0.811322464839j)*x_ref[2]**o + ((-0.165432065655+0.898515408953j))*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(0.392911770706-0.92016304769j)*x[2]**o + ((-0.559677960627-0.0826062851345j))*x[2]
+            ref[(0, 2, 1, 3)]+=(0.392911770706-0.92016304769j)*x_ref[2]**o + ((-0.559677960627-0.0826062851345j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.975566183062+0.402421762549j)*x[2]**o + ((0.0908019401101-0.608665111865j))*x[2]
+            ref[(0, 3, 0, 0)]+=(0.975566183062+0.402421762549j)*x_ref[2]**o + ((0.0908019401101-0.608665111865j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.134960967567+0.151237854782j)*x[2]**o + ((0.559121925732+0.508950909742j))*x[2]
+            ref[(0, 3, 0, 1)]+=(0.134960967567+0.151237854782j)*x_ref[2]**o + ((0.559121925732+0.508950909742j))*x_ref[2]
+            arg[(0, 3, 0, 2)]+=(-0.263537266479-0.612232985255j)*x[2]**o + ((0.0845901417044+0.193471836424j))*x[2]
+            ref[(0, 3, 0, 2)]+=(-0.263537266479-0.612232985255j)*x_ref[2]**o + ((0.0845901417044+0.193471836424j))*x_ref[2]
+            arg[(0, 3, 0, 3)]+=(-0.43773114671-0.716876302458j)*x[2]**o + ((-0.133280487672-0.0327780847648j))*x[2]
+            ref[(0, 3, 0, 3)]+=(-0.43773114671-0.716876302458j)*x_ref[2]**o + ((-0.133280487672-0.0327780847648j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.891237287385-0.611066983754j)*x[2]**o + ((0.437790416655+0.990871227098j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.891237287385-0.611066983754j)*x_ref[2]**o + ((0.437790416655+0.990871227098j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.689117707879-0.217041266234j)*x[2]**o + ((0.490364030452-0.891666400594j))*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.689117707879-0.217041266234j)*x_ref[2]**o + ((0.490364030452-0.891666400594j))*x_ref[2]
+            arg[(0, 3, 1, 2)]+=(-0.706613576019-0.218147622917j)*x[2]**o + ((0.712554567121-0.944284258803j))*x[2]
+            ref[(0, 3, 1, 2)]+=(-0.706613576019-0.218147622917j)*x_ref[2]**o + ((0.712554567121-0.944284258803j))*x_ref[2]
+            arg[(0, 3, 1, 3)]+=(0.41159630954+0.751187124646j)*x[2]**o + ((0.756104688762+0.0535416762886j))*x[2]
+            ref[(0, 3, 1, 3)]+=(0.41159630954+0.751187124646j)*x_ref[2]**o + ((0.756104688762+0.0535416762886j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.124163175389-0.930948984124j)*x[2]**o + ((-0.267880415813-0.0126782725505j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.124163175389-0.930948984124j)*x_ref[2]**o + ((-0.267880415813-0.0126782725505j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.423545816624-0.710234190084j)*x[2]**o + ((-0.120474948164+0.973414885743j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.423545816624-0.710234190084j)*x_ref[2]**o + ((-0.120474948164+0.973414885743j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.568741281724+0.501385509364j)*x[2]**o + ((0.951028217447+0.33538042935j))*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.568741281724+0.501385509364j)*x_ref[2]**o + ((0.951028217447+0.33538042935j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.488069552972-0.783545823269j)*x[2]**o + ((0.654006512495+0.579177906001j))*x[2]
+            ref[(1, 0, 0, 3)]+=(0.488069552972-0.783545823269j)*x_ref[2]**o + ((0.654006512495+0.579177906001j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.42006418152+0.319229884767j)*x[2]**o + ((0.883480180352+0.688794653625j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.42006418152+0.319229884767j)*x_ref[2]**o + ((0.883480180352+0.688794653625j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.865898471614+0.970658742129j)*x[2]**o + ((0.397241936563-0.443319856323j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.865898471614+0.970658742129j)*x_ref[2]**o + ((0.397241936563-0.443319856323j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.472138623591+0.0837310023005j)*x[2]**o + ((-0.850811209988+0.251717933346j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.472138623591+0.0837310023005j)*x_ref[2]**o + ((-0.850811209988+0.251717933346j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.0949637234891+0.39503309262j)*x[2]**o + ((0.963601653711+0.952191847266j))*x[2]
+            ref[(1, 0, 1, 3)]+=(0.0949637234891+0.39503309262j)*x_ref[2]**o + ((0.963601653711+0.952191847266j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.885408989932+0.629084182884j)*x[2]**o + ((-0.230048721339-0.986217373327j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.885408989932+0.629084182884j)*x_ref[2]**o + ((-0.230048721339-0.986217373327j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.91025246493-0.581969266814j)*x[2]**o + ((-0.0810735861732-0.270968299712j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.91025246493-0.581969266814j)*x_ref[2]**o + ((-0.0810735861732-0.270968299712j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.849692110048+0.403998738358j)*x[2]**o + ((0.150368017297-0.788661361453j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.849692110048+0.403998738358j)*x_ref[2]**o + ((0.150368017297-0.788661361453j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.918857372674+0.818718372719j)*x[2]**o + ((0.759452024452-0.201060263848j))*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.918857372674+0.818718372719j)*x_ref[2]**o + ((0.759452024452-0.201060263848j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.264380071906+0.54634199432j)*x[2]**o + ((0.33381716555+0.0677461423364j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.264380071906+0.54634199432j)*x_ref[2]**o + ((0.33381716555+0.0677461423364j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.638734657042+0.14364892419j)*x[2]**o + ((0.795426789424-0.384449626112j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.638734657042+0.14364892419j)*x_ref[2]**o + ((0.795426789424-0.384449626112j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.623328296126+0.40252769509j)*x[2]**o + ((-0.705212731558-0.02892903789j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.623328296126+0.40252769509j)*x_ref[2]**o + ((-0.705212731558-0.02892903789j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(0.745686468187-0.258517735941j)*x[2]**o + ((-0.559677734213-0.482445327187j))*x[2]
+            ref[(1, 1, 1, 3)]+=(0.745686468187-0.258517735941j)*x_ref[2]**o + ((-0.559677734213-0.482445327187j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.409989533989-0.608693946402j)*x[2]**o + ((0.184527588629+0.60876698998j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.409989533989-0.608693946402j)*x_ref[2]**o + ((0.184527588629+0.60876698998j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.789089818913-0.412147975451j)*x[2]**o + ((0.324471375625-0.54527466513j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.789089818913-0.412147975451j)*x_ref[2]**o + ((0.324471375625-0.54527466513j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(-0.685580228762-0.594303102187j)*x[2]**o + ((-0.514433662168+0.909451163671j))*x[2]
+            ref[(1, 2, 0, 2)]+=(-0.685580228762-0.594303102187j)*x_ref[2]**o + ((-0.514433662168+0.909451163671j))*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.868313812386+0.884998319092j)*x[2]**o + ((0.478425968178+0.796684070232j))*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.868313812386+0.884998319092j)*x_ref[2]**o + ((0.478425968178+0.796684070232j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.0857223275933+0.554745283385j)*x[2]**o + ((-0.194964725076+0.767575928156j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.0857223275933+0.554745283385j)*x_ref[2]**o + ((-0.194964725076+0.767575928156j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.11136958609-0.823728155003j)*x[2]**o + ((-0.253065536631-0.34953127658j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.11136958609-0.823728155003j)*x_ref[2]**o + ((-0.253065536631-0.34953127658j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.525080272536-0.874055234298j)*x[2]**o + ((-0.975162132425-0.574845192841j))*x[2]
+            ref[(1, 2, 1, 2)]+=(0.525080272536-0.874055234298j)*x_ref[2]**o + ((-0.975162132425-0.574845192841j))*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(0.961041727751-0.989959839327j)*x[2]**o + ((-0.990077191082-0.124731708838j))*x[2]
+            ref[(1, 2, 1, 3)]+=(0.961041727751-0.989959839327j)*x_ref[2]**o + ((-0.990077191082-0.124731708838j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.15996378966-0.814888864681j)*x[2]**o + ((-0.706377415468-0.0627790234236j))*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.15996378966-0.814888864681j)*x_ref[2]**o + ((-0.706377415468-0.0627790234236j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.0257224930979-0.486802158483j)*x[2]**o + ((0.511743164392-0.499608425866j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.0257224930979-0.486802158483j)*x_ref[2]**o + ((0.511743164392-0.499608425866j))*x_ref[2]
+            arg[(1, 3, 0, 2)]+=(-0.278503131915-0.366423498396j)*x[2]**o + ((0.331258703226-0.808322899983j))*x[2]
+            ref[(1, 3, 0, 2)]+=(-0.278503131915-0.366423498396j)*x_ref[2]**o + ((0.331258703226-0.808322899983j))*x_ref[2]
+            arg[(1, 3, 0, 3)]+=(-0.287047050101-0.344884076333j)*x[2]**o + ((0.675028440134+0.23095114513j))*x[2]
+            ref[(1, 3, 0, 3)]+=(-0.287047050101-0.344884076333j)*x_ref[2]**o + ((0.675028440134+0.23095114513j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.406664278744+0.935316728378j)*x[2]**o + ((0.452502797101-0.412021961658j))*x[2]
+            ref[(1, 3, 1, 0)]+=(0.406664278744+0.935316728378j)*x_ref[2]**o + ((0.452502797101-0.412021961658j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.676871908647+0.0249635182177j)*x[2]**o + ((0.614038128726-0.250524202009j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.676871908647+0.0249635182177j)*x_ref[2]**o + ((0.614038128726-0.250524202009j))*x_ref[2]
+            arg[(1, 3, 1, 2)]+=(-0.454152906535-0.35346473429j)*x[2]**o + ((0.271569362699+0.254901342418j))*x[2]
+            ref[(1, 3, 1, 2)]+=(-0.454152906535-0.35346473429j)*x_ref[2]**o + ((0.271569362699+0.254901342418j))*x_ref[2]
+            arg[(1, 3, 1, 3)]+=(0.0986882647761-0.0874950552129j)*x[2]**o + ((-0.759375385384-0.239769569962j))*x[2]
+            ref[(1, 3, 1, 3)]+=(0.0986882647761-0.0874950552129j)*x_ref[2]**o + ((-0.759375385384-0.239769569962j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.387513868498+0.663592680508j)*x[2]**o + ((0.609080681017-0.701585675526j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.387513868498+0.663592680508j)*x_ref[2]**o + ((0.609080681017-0.701585675526j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.756338405393-0.053700679441j)*x[2]**o + ((0.520035077471+0.432825620952j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.756338405393-0.053700679441j)*x_ref[2]**o + ((0.520035077471+0.432825620952j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.652738450851-0.813144660783j)*x[2]**o + ((-0.99496235273-0.563003626392j))*x[2]
+            ref[(2, 0, 0, 2)]+=(0.652738450851-0.813144660783j)*x_ref[2]**o + ((-0.99496235273-0.563003626392j))*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.0243413184005-0.301704922528j)*x[2]**o + ((-0.163289188536+0.993632227582j))*x[2]
+            ref[(2, 0, 0, 3)]+=(0.0243413184005-0.301704922528j)*x_ref[2]**o + ((-0.163289188536+0.993632227582j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.841227353243+0.693778629934j)*x[2]**o + ((0.183921494642-0.290368125676j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.841227353243+0.693778629934j)*x_ref[2]**o + ((0.183921494642-0.290368125676j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.500574511959+0.652904004237j)*x[2]**o + ((-0.0179141688215+0.752556513862j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.500574511959+0.652904004237j)*x_ref[2]**o + ((-0.0179141688215+0.752556513862j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.215644073019+0.0625071544711j)*x[2]**o + ((-0.692681813296-0.751702533008j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.215644073019+0.0625071544711j)*x_ref[2]**o + ((-0.692681813296-0.751702533008j))*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(-0.273577381332+0.212527435396j)*x[2]**o + ((0.82972821474+0.387931688733j))*x[2]
+            ref[(2, 0, 1, 3)]+=(-0.273577381332+0.212527435396j)*x_ref[2]**o + ((0.82972821474+0.387931688733j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.0208845149724-0.0370145628266j)*x[2]**o + ((0.442185491239-0.343099146085j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.0208845149724-0.0370145628266j)*x_ref[2]**o + ((0.442185491239-0.343099146085j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.860071420942+0.657540247942j)*x[2]**o + ((-0.500622914827+0.454681017885j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.860071420942+0.657540247942j)*x_ref[2]**o + ((-0.500622914827+0.454681017885j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(0.437105321482+0.394005732736j)*x[2]**o + ((0.834564062575+0.268999602888j))*x[2]
+            ref[(2, 1, 0, 2)]+=(0.437105321482+0.394005732736j)*x_ref[2]**o + ((0.834564062575+0.268999602888j))*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.908245897938-0.0700728565349j)*x[2]**o + ((-0.662258042204-0.0294546991518j))*x[2]
+            ref[(2, 1, 0, 3)]+=(0.908245897938-0.0700728565349j)*x_ref[2]**o + ((-0.662258042204-0.0294546991518j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.0403947559843+0.912228609159j)*x[2]**o + ((0.219045235261-0.321806670085j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.0403947559843+0.912228609159j)*x_ref[2]**o + ((0.219045235261-0.321806670085j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.356294500458-0.0244564109896j)*x[2]**o + ((0.441463208293-0.661824360758j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.356294500458-0.0244564109896j)*x_ref[2]**o + ((0.441463208293-0.661824360758j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.577313541173+0.314711430526j)*x[2]**o + ((-0.476963306999+0.508099557758j))*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.577313541173+0.314711430526j)*x_ref[2]**o + ((-0.476963306999+0.508099557758j))*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(0.179927619951+0.731257820948j)*x[2]**o + ((0.78148299319-0.983490194633j))*x[2]
+            ref[(2, 1, 1, 3)]+=(0.179927619951+0.731257820948j)*x_ref[2]**o + ((0.78148299319-0.983490194633j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.873224562347-0.61285675077j)*x[2]**o + ((0.642672079893-0.421223036225j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.873224562347-0.61285675077j)*x_ref[2]**o + ((0.642672079893-0.421223036225j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.113176126742-0.0568453106824j)*x[2]**o + ((-0.554877800504+0.835693377959j))*x[2]
+            ref[(2, 2, 0, 1)]+=(0.113176126742-0.0568453106824j)*x_ref[2]**o + ((-0.554877800504+0.835693377959j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(-0.041315849998+0.325280610205j)*x[2]**o + ((0.423554110062-0.976047611807j))*x[2]
+            ref[(2, 2, 0, 2)]+=(-0.041315849998+0.325280610205j)*x_ref[2]**o + ((0.423554110062-0.976047611807j))*x_ref[2]
+            arg[(2, 2, 0, 3)]+=(0.665179989914-0.996916274889j)*x[2]**o + ((-0.912613585809-0.012481764707j))*x[2]
+            ref[(2, 2, 0, 3)]+=(0.665179989914-0.996916274889j)*x_ref[2]**o + ((-0.912613585809-0.012481764707j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.500798514073-0.475814483426j)*x[2]**o + ((-0.901068423709-0.494611632107j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.500798514073-0.475814483426j)*x_ref[2]**o + ((-0.901068423709-0.494611632107j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.184326589188+0.116618108189j)*x[2]**o + ((0.388157403254+0.464068046257j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.184326589188+0.116618108189j)*x_ref[2]**o + ((0.388157403254+0.464068046257j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(0.139399463279-0.795862740375j)*x[2]**o + ((-0.955266576177-0.766587138796j))*x[2]
+            ref[(2, 2, 1, 2)]+=(0.139399463279-0.795862740375j)*x_ref[2]**o + ((-0.955266576177-0.766587138796j))*x_ref[2]
+            arg[(2, 2, 1, 3)]+=(0.175701586902-0.515625238659j)*x[2]**o + ((0.0859337210267-0.56905964996j))*x[2]
+            ref[(2, 2, 1, 3)]+=(0.175701586902-0.515625238659j)*x_ref[2]**o + ((0.0859337210267-0.56905964996j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(-0.215915363082-0.300150550185j)*x[2]**o + ((0.769843554257-0.759389370399j))*x[2]
+            ref[(2, 3, 0, 0)]+=(-0.215915363082-0.300150550185j)*x_ref[2]**o + ((0.769843554257-0.759389370399j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(-0.31470218547+0.367106216026j)*x[2]**o + ((-0.475038803732+0.138528112952j))*x[2]
+            ref[(2, 3, 0, 1)]+=(-0.31470218547+0.367106216026j)*x_ref[2]**o + ((-0.475038803732+0.138528112952j))*x_ref[2]
+            arg[(2, 3, 0, 2)]+=(0.933382758157-0.728959810464j)*x[2]**o + ((-0.519661331994+0.54922113519j))*x[2]
+            ref[(2, 3, 0, 2)]+=(0.933382758157-0.728959810464j)*x_ref[2]**o + ((-0.519661331994+0.54922113519j))*x_ref[2]
+            arg[(2, 3, 0, 3)]+=(0.607541857426-0.491465072235j)*x[2]**o + ((-0.314262939479+0.243829307077j))*x[2]
+            ref[(2, 3, 0, 3)]+=(0.607541857426-0.491465072235j)*x_ref[2]**o + ((-0.314262939479+0.243829307077j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(0.920205292968-0.906573333441j)*x[2]**o + ((-0.195550164889+0.0419792433478j))*x[2]
+            ref[(2, 3, 1, 0)]+=(0.920205292968-0.906573333441j)*x_ref[2]**o + ((-0.195550164889+0.0419792433478j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(0.381678400776+0.746611978357j)*x[2]**o + ((-0.731779822277+0.337581738526j))*x[2]
+            ref[(2, 3, 1, 1)]+=(0.381678400776+0.746611978357j)*x_ref[2]**o + ((-0.731779822277+0.337581738526j))*x_ref[2]
+            arg[(2, 3, 1, 2)]+=(0.665710726985-0.875839849154j)*x[2]**o + ((-0.549715659717-0.343218425103j))*x[2]
+            ref[(2, 3, 1, 2)]+=(0.665710726985-0.875839849154j)*x_ref[2]**o + ((-0.549715659717-0.343218425103j))*x_ref[2]
+            arg[(2, 3, 1, 3)]+=(0.114699081265+0.969259986524j)*x[2]**o + ((0.537654106344-0.00377456032808j))*x[2]
+            ref[(2, 3, 1, 3)]+=(0.114699081265+0.969259986524j)*x_ref[2]**o + ((0.537654106344-0.00377456032808j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(0.616114042463+0.167929615837j)*x[2]**o + ((-0.174248935832+0.335680305636j))*x[2]
+            ref[(3, 0, 0, 0)]+=(0.616114042463+0.167929615837j)*x_ref[2]**o + ((-0.174248935832+0.335680305636j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.398428518639-0.306750375627j)*x[2]**o + ((-0.559538019089+0.886335176432j))*x[2]
+            ref[(3, 0, 0, 1)]+=(0.398428518639-0.306750375627j)*x_ref[2]**o + ((-0.559538019089+0.886335176432j))*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(-0.487842852319-0.380394093056j)*x[2]**o + ((0.626340246048+0.256165940581j))*x[2]
+            ref[(3, 0, 0, 2)]+=(-0.487842852319-0.380394093056j)*x_ref[2]**o + ((0.626340246048+0.256165940581j))*x_ref[2]
+            arg[(3, 0, 0, 3)]+=(-0.662558903653-0.374985198029j)*x[2]**o + ((-0.664259096335+0.468720393432j))*x[2]
+            ref[(3, 0, 0, 3)]+=(-0.662558903653-0.374985198029j)*x_ref[2]**o + ((-0.664259096335+0.468720393432j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.745538368736-0.260865335952j)*x[2]**o + ((0.953867154205+0.00313464810116j))*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.745538368736-0.260865335952j)*x_ref[2]**o + ((0.953867154205+0.00313464810116j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.759819655078-0.506446322362j)*x[2]**o + ((-0.934652888388+0.30053311802j))*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.759819655078-0.506446322362j)*x_ref[2]**o + ((-0.934652888388+0.30053311802j))*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(0.783746227793-0.735691025887j)*x[2]**o + ((-0.199730347003-0.051575414715j))*x[2]
+            ref[(3, 0, 1, 2)]+=(0.783746227793-0.735691025887j)*x_ref[2]**o + ((-0.199730347003-0.051575414715j))*x_ref[2]
+            arg[(3, 0, 1, 3)]+=(0.937503984345+0.536583135285j)*x[2]**o + ((0.916314338011-0.541981192092j))*x[2]
+            ref[(3, 0, 1, 3)]+=(0.937503984345+0.536583135285j)*x_ref[2]**o + ((0.916314338011-0.541981192092j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.416502234611+0.856676208641j)*x[2]**o + ((-0.78715610175-0.740709134464j))*x[2]
+            ref[(3, 1, 0, 0)]+=(0.416502234611+0.856676208641j)*x_ref[2]**o + ((-0.78715610175-0.740709134464j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.505942542836+0.550876662905j)*x[2]**o + ((-0.52709914015-0.15328997566j))*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.505942542836+0.550876662905j)*x_ref[2]**o + ((-0.52709914015-0.15328997566j))*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(-0.185530066564+0.844497027189j)*x[2]**o + ((-0.32688981851-0.666182092058j))*x[2]
+            ref[(3, 1, 0, 2)]+=(-0.185530066564+0.844497027189j)*x_ref[2]**o + ((-0.32688981851-0.666182092058j))*x_ref[2]
+            arg[(3, 1, 0, 3)]+=(-0.352035310903-0.949499213619j)*x[2]**o + ((0.525997020628-0.502413900364j))*x[2]
+            ref[(3, 1, 0, 3)]+=(-0.352035310903-0.949499213619j)*x_ref[2]**o + ((0.525997020628-0.502413900364j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.187700818789-0.095363529981j)*x[2]**o + ((-0.446650128187-0.559056221449j))*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.187700818789-0.095363529981j)*x_ref[2]**o + ((-0.446650128187-0.559056221449j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(-0.873691549238-0.994540369244j)*x[2]**o + ((-0.0237239962889-0.778408853219j))*x[2]
+            ref[(3, 1, 1, 1)]+=(-0.873691549238-0.994540369244j)*x_ref[2]**o + ((-0.0237239962889-0.778408853219j))*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(-0.238703045336-0.187521536269j)*x[2]**o + ((0.802075908934+0.376093579125j))*x[2]
+            ref[(3, 1, 1, 2)]+=(-0.238703045336-0.187521536269j)*x_ref[2]**o + ((0.802075908934+0.376093579125j))*x_ref[2]
+            arg[(3, 1, 1, 3)]+=(-0.158380646611+0.907418953445j)*x[2]**o + ((-0.735439133048-0.863534032845j))*x[2]
+            ref[(3, 1, 1, 3)]+=(-0.158380646611+0.907418953445j)*x_ref[2]**o + ((-0.735439133048-0.863534032845j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(-0.550974875491-0.382856232087j)*x[2]**o + ((-0.087845183307+0.197073627581j))*x[2]
+            ref[(3, 2, 0, 0)]+=(-0.550974875491-0.382856232087j)*x_ref[2]**o + ((-0.087845183307+0.197073627581j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(0.144225323657-0.364663250866j)*x[2]**o + ((-0.17696354192-0.149673453135j))*x[2]
+            ref[(3, 2, 0, 1)]+=(0.144225323657-0.364663250866j)*x_ref[2]**o + ((-0.17696354192-0.149673453135j))*x_ref[2]
+            arg[(3, 2, 0, 2)]+=(-0.0271968133354-0.372356661998j)*x[2]**o + ((-0.893170512021-0.404023264686j))*x[2]
+            ref[(3, 2, 0, 2)]+=(-0.0271968133354-0.372356661998j)*x_ref[2]**o + ((-0.893170512021-0.404023264686j))*x_ref[2]
+            arg[(3, 2, 0, 3)]+=(0.390129417134+0.413795609809j)*x[2]**o + ((0.56625621884+0.607246366589j))*x[2]
+            ref[(3, 2, 0, 3)]+=(0.390129417134+0.413795609809j)*x_ref[2]**o + ((0.56625621884+0.607246366589j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(0.621059094387+0.0605304800557j)*x[2]**o + ((0.618124266043-0.822963158781j))*x[2]
+            ref[(3, 2, 1, 0)]+=(0.621059094387+0.0605304800557j)*x_ref[2]**o + ((0.618124266043-0.822963158781j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.48949347844-0.87335109438j)*x[2]**o + ((0.0203682317986+0.740283078919j))*x[2]
+            ref[(3, 2, 1, 1)]+=(0.48949347844-0.87335109438j)*x_ref[2]**o + ((0.0203682317986+0.740283078919j))*x_ref[2]
+            arg[(3, 2, 1, 2)]+=(-0.190722589168-0.881096704703j)*x[2]**o + ((-0.727715271298-0.822992522447j))*x[2]
+            ref[(3, 2, 1, 2)]+=(-0.190722589168-0.881096704703j)*x_ref[2]**o + ((-0.727715271298-0.822992522447j))*x_ref[2]
+            arg[(3, 2, 1, 3)]+=(-0.544930360733+0.961128187541j)*x[2]**o + ((0.614817744909-0.552520786466j))*x[2]
+            ref[(3, 2, 1, 3)]+=(-0.544930360733+0.961128187541j)*x_ref[2]**o + ((0.614817744909-0.552520786466j))*x_ref[2]
+            arg[(3, 3, 0, 0)]+=(-0.439432852071-0.175372346354j)*x[2]**o + ((-0.178880023875+0.259978651414j))*x[2]
+            ref[(3, 3, 0, 0)]+=(-0.439432852071-0.175372346354j)*x_ref[2]**o + ((-0.178880023875+0.259978651414j))*x_ref[2]
+            arg[(3, 3, 0, 1)]+=(-0.600987798198-0.074085539024j)*x[2]**o + ((-0.817469601465+0.0356032855822j))*x[2]
+            ref[(3, 3, 0, 1)]+=(-0.600987798198-0.074085539024j)*x_ref[2]**o + ((-0.817469601465+0.0356032855822j))*x_ref[2]
+            arg[(3, 3, 0, 2)]+=(0.858742756829-0.698694389957j)*x[2]**o + ((0.153667932256+0.389893463507j))*x[2]
+            ref[(3, 3, 0, 2)]+=(0.858742756829-0.698694389957j)*x_ref[2]**o + ((0.153667932256+0.389893463507j))*x_ref[2]
+            arg[(3, 3, 0, 3)]+=(-0.501963686635-0.751366201958j)*x[2]**o + ((0.562587856427-0.197197368573j))*x[2]
+            ref[(3, 3, 0, 3)]+=(-0.501963686635-0.751366201958j)*x_ref[2]**o + ((0.562587856427-0.197197368573j))*x_ref[2]
+            arg[(3, 3, 1, 0)]+=(0.961368487491-0.623216467888j)*x[2]**o + ((0.790615036061-0.274571471203j))*x[2]
+            ref[(3, 3, 1, 0)]+=(0.961368487491-0.623216467888j)*x_ref[2]**o + ((0.790615036061-0.274571471203j))*x_ref[2]
+            arg[(3, 3, 1, 1)]+=(0.275638729523-0.669439393766j)*x[2]**o + ((-0.266990941741-0.273053326339j))*x[2]
+            ref[(3, 3, 1, 1)]+=(0.275638729523-0.669439393766j)*x_ref[2]**o + ((-0.266990941741-0.273053326339j))*x_ref[2]
+            arg[(3, 3, 1, 2)]+=(0.891887479336-0.929020739161j)*x[2]**o + ((-0.725509525478-0.131437514063j))*x[2]
+            ref[(3, 3, 1, 2)]+=(0.891887479336-0.929020739161j)*x_ref[2]**o + ((-0.725509525478-0.131437514063j))*x_ref[2]
+            arg[(3, 3, 1, 3)]+=(0.295336688653-0.679624701851j)*x[2]**o + ((0.0242835146683-0.902871331136j))*x[2]
+            ref[(3, 3, 1, 3)]+=(0.295336688653-0.679624701851j)*x_ref[2]**o + ((0.0242835146683-0.902871331136j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.176104380754+0.643761266285j)*x[0]**o + ((0.564020787719-0.865751797521j))*x[0] + ((0.927552106433-0.830121608682j))*x[1]**o + ((-0.698350377575+0.633117232188j))*x[1]
+        ref=(0.176104380754+0.643761266285j)*x_ref[0]**o + ((0.564020787719-0.865751797521j))*x_ref[0] + ((0.927552106433-0.830121608682j))*x_ref[1]**o + ((-0.698350377575+0.633117232188j))*x_ref[1]
+        if dim==3:
+            arg+=((0.617433354435+0.631348522785j))*x[2]**o + ((-0.919059427211-0.912773655827j))*x[2]
+            ref+=((0.617433354435+0.631348522785j))*x_ref[2]**o + ((-0.919059427211-0.912773655827j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.396214777975+0.101815394958j)*x[0]**o + ((-0.0341823475244-0.734109203906j))*x[0] + ((0.406654936363-0.594083023403j))*x[1]**o + ((0.892174223613+0.212003048498j))*x[1]
+        ref[(0,)]=(0.396214777975+0.101815394958j)*x_ref[0]**o + ((-0.0341823475244-0.734109203906j))*x_ref[0] + ((0.406654936363-0.594083023403j))*x_ref[1]**o + ((0.892174223613+0.212003048498j))*x_ref[1]
+        arg[(1,)]=(0.590239819454-0.176732610658j)*x[0]**o + ((0.834149635774+0.037494744351j))*x[0] + ((0.197453734625+0.0607585873882j))*x[1]**o + ((0.310803790063-0.482560775135j))*x[1]
+        ref[(1,)]=(0.590239819454-0.176732610658j)*x_ref[0]**o + ((0.834149635774+0.037494744351j))*x_ref[0] + ((0.197453734625+0.0607585873882j))*x_ref[1]**o + ((0.310803790063-0.482560775135j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.763964716692-0.551249506494j)*x[2]**o + ((-0.181347793846-0.140304479615j))*x[2]
+            ref[(0,)]+=(0.763964716692-0.551249506494j)*x_ref[2]**o + ((-0.181347793846-0.140304479615j))*x_ref[2]
+            arg[(1,)]+=(0.610506789969-0.763732182242j)*x[2]**o + ((0.275859054611+0.901160331221j))*x[2]
+            ref[(1,)]+=(0.610506789969-0.763732182242j)*x_ref[2]**o + ((0.275859054611+0.901160331221j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(-0.507435775186+0.0672754476058j)*x[0]**o + ((0.932862084627-0.660069848641j))*x[0] + ((0.366289606738-0.220123983928j))*x[1]**o + ((-0.422171450817-0.0538639081807j))*x[1]
+        ref[(0, 0)]=(-0.507435775186+0.0672754476058j)*x_ref[0]**o + ((0.932862084627-0.660069848641j))*x_ref[0] + ((0.366289606738-0.220123983928j))*x_ref[1]**o + ((-0.422171450817-0.0538639081807j))*x_ref[1]
+        arg[(0, 1)]=(0.960905790488+0.997075031234j)*x[0]**o + ((0.775374216462+0.990961890904j))*x[0] + ((0.308956687654-0.402384161577j))*x[1]**o + ((0.62529473549-0.549784080364j))*x[1]
+        ref[(0, 1)]=(0.960905790488+0.997075031234j)*x_ref[0]**o + ((0.775374216462+0.990961890904j))*x_ref[0] + ((0.308956687654-0.402384161577j))*x_ref[1]**o + ((0.62529473549-0.549784080364j))*x_ref[1]
+        arg[(0, 2)]=(-0.0603418046011-0.772188143767j)*x[0]**o + ((-0.642743909854-0.0105446568188j))*x[0] + ((0.359643729374+0.669483537704j))*x[1]**o + ((-0.794383250445+0.0726635877287j))*x[1]
+        ref[(0, 2)]=(-0.0603418046011-0.772188143767j)*x_ref[0]**o + ((-0.642743909854-0.0105446568188j))*x_ref[0] + ((0.359643729374+0.669483537704j))*x_ref[1]**o + ((-0.794383250445+0.0726635877287j))*x_ref[1]
+        arg[(0, 3)]=(-0.141577192257+0.634230323617j)*x[0]**o + ((0.942749285214-0.602270867288j))*x[0] + ((-0.296334544421+0.86260455322j))*x[1]**o + ((-0.856195571088+0.669312314931j))*x[1]
+        ref[(0, 3)]=(-0.141577192257+0.634230323617j)*x_ref[0]**o + ((0.942749285214-0.602270867288j))*x_ref[0] + ((-0.296334544421+0.86260455322j))*x_ref[1]**o + ((-0.856195571088+0.669312314931j))*x_ref[1]
+        arg[(1, 0)]=(0.819590238595-0.167385232117j)*x[0]**o + ((-0.46810054744+0.769232528561j))*x[0] + ((-0.657080173973-0.090491764471j))*x[1]**o + ((0.981084107326+0.963390015604j))*x[1]
+        ref[(1, 0)]=(0.819590238595-0.167385232117j)*x_ref[0]**o + ((-0.46810054744+0.769232528561j))*x_ref[0] + ((-0.657080173973-0.090491764471j))*x_ref[1]**o + ((0.981084107326+0.963390015604j))*x_ref[1]
+        arg[(1, 1)]=(-0.488682517128-0.836365375283j)*x[0]**o + ((-0.106551471347-0.266787957206j))*x[0] + ((-0.250396985133-0.172249698245j))*x[1]**o + ((-0.449003160718-0.809217765618j))*x[1]
+        ref[(1, 1)]=(-0.488682517128-0.836365375283j)*x_ref[0]**o + ((-0.106551471347-0.266787957206j))*x_ref[0] + ((-0.250396985133-0.172249698245j))*x_ref[1]**o + ((-0.449003160718-0.809217765618j))*x_ref[1]
+        arg[(1, 2)]=(0.0775972364897-0.608328050086j)*x[0]**o + ((-0.737667774145-0.875016030263j))*x[0] + ((-0.842466451945+0.401273065138j))*x[1]**o + ((0.451591001964-0.0169410088736j))*x[1]
+        ref[(1, 2)]=(0.0775972364897-0.608328050086j)*x_ref[0]**o + ((-0.737667774145-0.875016030263j))*x_ref[0] + ((-0.842466451945+0.401273065138j))*x_ref[1]**o + ((0.451591001964-0.0169410088736j))*x_ref[1]
+        arg[(1, 3)]=(-0.340406807994+0.698582374914j)*x[0]**o + ((-0.95791150964-0.672158339132j))*x[0] + ((-0.665625377041-0.435231726164j))*x[1]**o + ((0.717322390981-0.682076512008j))*x[1]
+        ref[(1, 3)]=(-0.340406807994+0.698582374914j)*x_ref[0]**o + ((-0.95791150964-0.672158339132j))*x_ref[0] + ((-0.665625377041-0.435231726164j))*x_ref[1]**o + ((0.717322390981-0.682076512008j))*x_ref[1]
+        arg[(2, 0)]=(-0.872719700719-0.404573421472j)*x[0]**o + ((-0.567948128434-0.744737647548j))*x[0] + ((0.578774646583-0.897567708461j))*x[1]**o + ((-0.965974805448+0.952568590291j))*x[1]
+        ref[(2, 0)]=(-0.872719700719-0.404573421472j)*x_ref[0]**o + ((-0.567948128434-0.744737647548j))*x_ref[0] + ((0.578774646583-0.897567708461j))*x_ref[1]**o + ((-0.965974805448+0.952568590291j))*x_ref[1]
+        arg[(2, 1)]=(0.203158550576+0.175820704256j)*x[0]**o + ((-0.328569127405+0.211722431015j))*x[0] + ((0.50172152881+0.549848969025j))*x[1]**o + ((-0.159815470527-0.436072462618j))*x[1]
+        ref[(2, 1)]=(0.203158550576+0.175820704256j)*x_ref[0]**o + ((-0.328569127405+0.211722431015j))*x_ref[0] + ((0.50172152881+0.549848969025j))*x_ref[1]**o + ((-0.159815470527-0.436072462618j))*x_ref[1]
+        arg[(2, 2)]=(0.0362579965653-0.972754843192j)*x[0]**o + ((0.0366208280804-0.114944958522j))*x[0] + ((-0.626406939953-0.997577641377j))*x[1]**o + ((0.0347998283876-0.188446204532j))*x[1]
+        ref[(2, 2)]=(0.0362579965653-0.972754843192j)*x_ref[0]**o + ((0.0366208280804-0.114944958522j))*x_ref[0] + ((-0.626406939953-0.997577641377j))*x_ref[1]**o + ((0.0347998283876-0.188446204532j))*x_ref[1]
+        arg[(2, 3)]=(-0.550331724873-0.287808340953j)*x[0]**o + ((0.198474374683+0.865385571917j))*x[0] + ((-0.12766700233+0.301992783062j))*x[1]**o + ((-0.189588862394+0.804336486472j))*x[1]
+        ref[(2, 3)]=(-0.550331724873-0.287808340953j)*x_ref[0]**o + ((0.198474374683+0.865385571917j))*x_ref[0] + ((-0.12766700233+0.301992783062j))*x_ref[1]**o + ((-0.189588862394+0.804336486472j))*x_ref[1]
+        arg[(3, 0)]=(-0.918389972389+0.209065906233j)*x[0]**o + ((-0.113273509677-0.475855527747j))*x[0] + ((-0.0175100370507+0.592141005136j))*x[1]**o + ((-0.904818853204-0.653022525667j))*x[1]
+        ref[(3, 0)]=(-0.918389972389+0.209065906233j)*x_ref[0]**o + ((-0.113273509677-0.475855527747j))*x_ref[0] + ((-0.0175100370507+0.592141005136j))*x_ref[1]**o + ((-0.904818853204-0.653022525667j))*x_ref[1]
+        arg[(3, 1)]=(0.376071343487+0.756718451922j)*x[0]**o + ((0.372969962126+0.38946653538j))*x[0] + ((-0.598853117479+0.797575904068j))*x[1]**o + ((0.380271586513-0.423139137135j))*x[1]
+        ref[(3, 1)]=(0.376071343487+0.756718451922j)*x_ref[0]**o + ((0.372969962126+0.38946653538j))*x_ref[0] + ((-0.598853117479+0.797575904068j))*x_ref[1]**o + ((0.380271586513-0.423139137135j))*x_ref[1]
+        arg[(3, 2)]=(-0.0662119802872-0.0858870553891j)*x[0]**o + ((-0.775452824885-0.279599703665j))*x[0] + ((-0.501164272434-0.217985152972j))*x[1]**o + ((-0.807789820558-0.28362708407j))*x[1]
+        ref[(3, 2)]=(-0.0662119802872-0.0858870553891j)*x_ref[0]**o + ((-0.775452824885-0.279599703665j))*x_ref[0] + ((-0.501164272434-0.217985152972j))*x_ref[1]**o + ((-0.807789820558-0.28362708407j))*x_ref[1]
+        arg[(3, 3)]=(0.766562843901-0.0539330304207j)*x[0]**o + ((0.270389399509-0.700573810466j))*x[0] + ((0.537871077718+0.412715621394j))*x[1]**o + ((-0.712004753296-0.475025118162j))*x[1]
+        ref[(3, 3)]=(0.766562843901-0.0539330304207j)*x_ref[0]**o + ((0.270389399509-0.700573810466j))*x_ref[0] + ((0.537871077718+0.412715621394j))*x_ref[1]**o + ((-0.712004753296-0.475025118162j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.632363866532-0.819607878468j)*x[2]**o + ((-0.428723779467-0.976893518896j))*x[2]
+            ref[(0, 0)]+=(-0.632363866532-0.819607878468j)*x_ref[2]**o + ((-0.428723779467-0.976893518896j))*x_ref[2]
+            arg[(0, 1)]+=(-0.544189536584-0.898819916517j)*x[2]**o + ((0.367061532674-0.734759406919j))*x[2]
+            ref[(0, 1)]+=(-0.544189536584-0.898819916517j)*x_ref[2]**o + ((0.367061532674-0.734759406919j))*x_ref[2]
+            arg[(0, 2)]+=(0.176852483905+0.692005134801j)*x[2]**o + ((-0.128695607249+0.423833214381j))*x[2]
+            ref[(0, 2)]+=(0.176852483905+0.692005134801j)*x_ref[2]**o + ((-0.128695607249+0.423833214381j))*x_ref[2]
+            arg[(0, 3)]+=(-0.428677147245-0.794014171193j)*x[2]**o + ((0.364492864716+0.892342166315j))*x[2]
+            ref[(0, 3)]+=(-0.428677147245-0.794014171193j)*x_ref[2]**o + ((0.364492864716+0.892342166315j))*x_ref[2]
+            arg[(1, 0)]+=(0.229896179197+0.182084547984j)*x[2]**o + ((-0.916625996893+0.9465324258j))*x[2]
+            ref[(1, 0)]+=(0.229896179197+0.182084547984j)*x_ref[2]**o + ((-0.916625996893+0.9465324258j))*x_ref[2]
+            arg[(1, 1)]+=(0.219593717306-0.888838946099j)*x[2]**o + ((0.367099108256-0.293812409093j))*x[2]
+            ref[(1, 1)]+=(0.219593717306-0.888838946099j)*x_ref[2]**o + ((0.367099108256-0.293812409093j))*x_ref[2]
+            arg[(1, 2)]+=(-0.98043361001+0.880557956494j)*x[2]**o + ((-0.478811272164+0.0303201297661j))*x[2]
+            ref[(1, 2)]+=(-0.98043361001+0.880557956494j)*x_ref[2]**o + ((-0.478811272164+0.0303201297661j))*x_ref[2]
+            arg[(1, 3)]+=(-0.547773891876-0.824551603438j)*x[2]**o + ((-0.350329821771-0.405749761572j))*x[2]
+            ref[(1, 3)]+=(-0.547773891876-0.824551603438j)*x_ref[2]**o + ((-0.350329821771-0.405749761572j))*x_ref[2]
+            arg[(2, 0)]+=(-0.429500768275-0.808818453177j)*x[2]**o + ((0.638964976426+0.0214803874009j))*x[2]
+            ref[(2, 0)]+=(-0.429500768275-0.808818453177j)*x_ref[2]**o + ((0.638964976426+0.0214803874009j))*x_ref[2]
+            arg[(2, 1)]+=(-0.201864684134-0.0253472526833j)*x[2]**o + ((0.968044725736+0.0902646925437j))*x[2]
+            ref[(2, 1)]+=(-0.201864684134-0.0253472526833j)*x_ref[2]**o + ((0.968044725736+0.0902646925437j))*x_ref[2]
+            arg[(2, 2)]+=(-0.868266878782-0.757712117457j)*x[2]**o + ((-0.646032013498-0.67947684607j))*x[2]
+            ref[(2, 2)]+=(-0.868266878782-0.757712117457j)*x_ref[2]**o + ((-0.646032013498-0.67947684607j))*x_ref[2]
+            arg[(2, 3)]+=(-0.742287669306-0.898154087072j)*x[2]**o + ((-0.427360983063-0.38715352456j))*x[2]
+            ref[(2, 3)]+=(-0.742287669306-0.898154087072j)*x_ref[2]**o + ((-0.427360983063-0.38715352456j))*x_ref[2]
+            arg[(3, 0)]+=(-0.16256686876+0.945967739217j)*x[2]**o + ((0.457861445699+0.732874901883j))*x[2]
+            ref[(3, 0)]+=(-0.16256686876+0.945967739217j)*x_ref[2]**o + ((0.457861445699+0.732874901883j))*x_ref[2]
+            arg[(3, 1)]+=(0.41017375689-0.632329902322j)*x[2]**o + ((0.625949475034+0.246646248969j))*x[2]
+            ref[(3, 1)]+=(0.41017375689-0.632329902322j)*x_ref[2]**o + ((0.625949475034+0.246646248969j))*x_ref[2]
+            arg[(3, 2)]+=(-0.813638560934+0.544176618842j)*x[2]**o + ((0.439227883034+0.262737905796j))*x[2]
+            ref[(3, 2)]+=(-0.813638560934+0.544176618842j)*x_ref[2]**o + ((0.439227883034+0.262737905796j))*x_ref[2]
+            arg[(3, 3)]+=(-0.5687861695+0.865238855015j)*x[2]**o + ((0.993271404161+0.905625019585j))*x[2]
+            ref[(3, 3)]+=(-0.5687861695+0.865238855015j)*x_ref[2]**o + ((0.993271404161+0.905625019585j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3),w)
+        ref = Data(0,(2, 4, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.96092991622+0.950059192423j)*x[0]**o + ((0.475286001346+0.650893518724j))*x[0] + ((0.819659003237+0.43903520764j))*x[1]**o + ((-0.307436170312+0.0185123790877j))*x[1]
+        ref[(0, 0, 0)]=(-0.96092991622+0.950059192423j)*x_ref[0]**o + ((0.475286001346+0.650893518724j))*x_ref[0] + ((0.819659003237+0.43903520764j))*x_ref[1]**o + ((-0.307436170312+0.0185123790877j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.312854872331+0.5623137704j)*x[0]**o + ((0.149065529304-0.331799351332j))*x[0] + ((-0.43917576648+0.567153335799j))*x[1]**o + ((0.99148949354-0.177831833663j))*x[1]
+        ref[(0, 0, 1)]=(0.312854872331+0.5623137704j)*x_ref[0]**o + ((0.149065529304-0.331799351332j))*x_ref[0] + ((-0.43917576648+0.567153335799j))*x_ref[1]**o + ((0.99148949354-0.177831833663j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.317195760361-0.687742808349j)*x[0]**o + ((0.508493212866-0.924022752283j))*x[0] + ((0.570941462599+0.157353636572j))*x[1]**o + ((0.23452411886-0.706206960383j))*x[1]
+        ref[(0, 0, 2)]=(0.317195760361-0.687742808349j)*x_ref[0]**o + ((0.508493212866-0.924022752283j))*x_ref[0] + ((0.570941462599+0.157353636572j))*x_ref[1]**o + ((0.23452411886-0.706206960383j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.290830992336+0.156717181206j)*x[0]**o + ((-0.623578669344-0.438858780239j))*x[0] + ((0.254962359194+0.450855347616j))*x[1]**o + ((-0.515522216496-0.0677709606513j))*x[1]
+        ref[(0, 1, 0)]=(0.290830992336+0.156717181206j)*x_ref[0]**o + ((-0.623578669344-0.438858780239j))*x_ref[0] + ((0.254962359194+0.450855347616j))*x_ref[1]**o + ((-0.515522216496-0.0677709606513j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.00800975053579+0.750078971178j)*x[0]**o + ((0.78001708468+0.490186479158j))*x[0] + ((-0.682830925166+0.470688444954j))*x[1]**o + ((-0.156252146352-0.523330217584j))*x[1]
+        ref[(0, 1, 1)]=(0.00800975053579+0.750078971178j)*x_ref[0]**o + ((0.78001708468+0.490186479158j))*x_ref[0] + ((-0.682830925166+0.470688444954j))*x_ref[1]**o + ((-0.156252146352-0.523330217584j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.0479458704371+0.0190520770805j)*x[0]**o + ((-0.684674932238+0.124316243347j))*x[0] + ((0.867959286228+0.788230907454j))*x[1]**o + ((0.641522913532+0.435251009023j))*x[1]
+        ref[(0, 1, 2)]=(-0.0479458704371+0.0190520770805j)*x_ref[0]**o + ((-0.684674932238+0.124316243347j))*x_ref[0] + ((0.867959286228+0.788230907454j))*x_ref[1]**o + ((0.641522913532+0.435251009023j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.514324154053+0.856459741121j)*x[0]**o + ((0.617266501745+0.264684265146j))*x[0] + ((-0.35604000398-0.121039971708j))*x[1]**o + ((-0.245788340693+0.809026511706j))*x[1]
+        ref[(0, 2, 0)]=(-0.514324154053+0.856459741121j)*x_ref[0]**o + ((0.617266501745+0.264684265146j))*x_ref[0] + ((-0.35604000398-0.121039971708j))*x_ref[1]**o + ((-0.245788340693+0.809026511706j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.651225689087-0.76326206642j)*x[0]**o + ((0.624238713681-0.898142396644j))*x[0] + ((0.990870548664-0.161807332983j))*x[1]**o + ((-0.820590358693+0.310116531517j))*x[1]
+        ref[(0, 2, 1)]=(-0.651225689087-0.76326206642j)*x_ref[0]**o + ((0.624238713681-0.898142396644j))*x_ref[0] + ((0.990870548664-0.161807332983j))*x_ref[1]**o + ((-0.820590358693+0.310116531517j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.070886132291-0.831049732231j)*x[0]**o + ((0.806465740533-0.339651806338j))*x[0] + ((0.262305650699+0.352421497739j))*x[1]**o + ((-0.635336715894-0.719419183613j))*x[1]
+        ref[(0, 2, 2)]=(-0.070886132291-0.831049732231j)*x_ref[0]**o + ((0.806465740533-0.339651806338j))*x_ref[0] + ((0.262305650699+0.352421497739j))*x_ref[1]**o + ((-0.635336715894-0.719419183613j))*x_ref[1]
+        arg[(0, 3, 0)]=(-0.7674310648-0.26986325267j)*x[0]**o + ((0.458275463188-0.856531149632j))*x[0] + ((-0.855874644264+0.162002212365j))*x[1]**o + ((0.13179155287-0.09821904156j))*x[1]
+        ref[(0, 3, 0)]=(-0.7674310648-0.26986325267j)*x_ref[0]**o + ((0.458275463188-0.856531149632j))*x_ref[0] + ((-0.855874644264+0.162002212365j))*x_ref[1]**o + ((0.13179155287-0.09821904156j))*x_ref[1]
+        arg[(0, 3, 1)]=(-0.423037408187+0.65823209845j)*x[0]**o + ((-0.698143420373-0.0870290851201j))*x[0] + ((-0.0656748713925-0.471980782736j))*x[1]**o + ((-0.0980926126117-0.400011642173j))*x[1]
+        ref[(0, 3, 1)]=(-0.423037408187+0.65823209845j)*x_ref[0]**o + ((-0.698143420373-0.0870290851201j))*x_ref[0] + ((-0.0656748713925-0.471980782736j))*x_ref[1]**o + ((-0.0980926126117-0.400011642173j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.630448878336+0.983042713204j)*x[0]**o + ((0.758065706471-0.258885231958j))*x[0] + ((-0.491287935382-0.169472337351j))*x[1]**o + ((0.23038729416+0.000988660700606j))*x[1]
+        ref[(0, 3, 2)]=(0.630448878336+0.983042713204j)*x_ref[0]**o + ((0.758065706471-0.258885231958j))*x_ref[0] + ((-0.491287935382-0.169472337351j))*x_ref[1]**o + ((0.23038729416+0.000988660700606j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.0613559884989+0.262597097673j)*x[0]**o + ((0.445829575185+0.29635965059j))*x[0] + ((0.665945585763-0.110556609613j))*x[1]**o + ((-0.677586473156-0.456958238432j))*x[1]
+        ref[(1, 0, 0)]=(-0.0613559884989+0.262597097673j)*x_ref[0]**o + ((0.445829575185+0.29635965059j))*x_ref[0] + ((0.665945585763-0.110556609613j))*x_ref[1]**o + ((-0.677586473156-0.456958238432j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.48910152588+0.913613768799j)*x[0]**o + ((0.371316541322+0.188256265943j))*x[0] + ((0.351718035889+0.12546418407j))*x[1]**o + ((-0.137520351749+0.0559939593837j))*x[1]
+        ref[(1, 0, 1)]=(-0.48910152588+0.913613768799j)*x_ref[0]**o + ((0.371316541322+0.188256265943j))*x_ref[0] + ((0.351718035889+0.12546418407j))*x_ref[1]**o + ((-0.137520351749+0.0559939593837j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.225250169026+0.193519448365j)*x[0]**o + ((-0.960632884283+0.0528729102591j))*x[0] + ((0.127209780847+0.720798890071j))*x[1]**o + ((0.809784057354+0.568363437721j))*x[1]
+        ref[(1, 0, 2)]=(-0.225250169026+0.193519448365j)*x_ref[0]**o + ((-0.960632884283+0.0528729102591j))*x_ref[0] + ((0.127209780847+0.720798890071j))*x_ref[1]**o + ((0.809784057354+0.568363437721j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.662910095999+0.603492188714j)*x[0]**o + ((0.525043204925+0.325517589474j))*x[0] + ((0.258339226515+0.107999072093j))*x[1]**o + ((0.96399759882-0.296946758537j))*x[1]
+        ref[(1, 1, 0)]=(0.662910095999+0.603492188714j)*x_ref[0]**o + ((0.525043204925+0.325517589474j))*x_ref[0] + ((0.258339226515+0.107999072093j))*x_ref[1]**o + ((0.96399759882-0.296946758537j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.323430810539+0.483788416897j)*x[0]**o + ((-0.384578503217-0.180188666591j))*x[0] + ((-0.26581167634-0.697470486588j))*x[1]**o + ((-0.365499786797-0.987592411363j))*x[1]
+        ref[(1, 1, 1)]=(-0.323430810539+0.483788416897j)*x_ref[0]**o + ((-0.384578503217-0.180188666591j))*x_ref[0] + ((-0.26581167634-0.697470486588j))*x_ref[1]**o + ((-0.365499786797-0.987592411363j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.621180058905+0.248367108281j)*x[0]**o + ((0.114394059576-0.630490190055j))*x[0] + ((-0.758042958768-0.351969228662j))*x[1]**o + ((0.213753137109-0.841781216959j))*x[1]
+        ref[(1, 1, 2)]=(-0.621180058905+0.248367108281j)*x_ref[0]**o + ((0.114394059576-0.630490190055j))*x_ref[0] + ((-0.758042958768-0.351969228662j))*x_ref[1]**o + ((0.213753137109-0.841781216959j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.384519773609+0.849170891882j)*x[0]**o + ((-0.888069026626+0.553708542483j))*x[0] + ((-0.150320117953-0.418332052777j))*x[1]**o + ((-0.134013084041+0.567934738817j))*x[1]
+        ref[(1, 2, 0)]=(-0.384519773609+0.849170891882j)*x_ref[0]**o + ((-0.888069026626+0.553708542483j))*x_ref[0] + ((-0.150320117953-0.418332052777j))*x_ref[1]**o + ((-0.134013084041+0.567934738817j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.74039908406-0.966182256185j)*x[0]**o + ((-0.668772344616-0.204964147846j))*x[0] + ((0.532486712431+0.506887020325j))*x[1]**o + ((0.225735074988-0.53547195448j))*x[1]
+        ref[(1, 2, 1)]=(0.74039908406-0.966182256185j)*x_ref[0]**o + ((-0.668772344616-0.204964147846j))*x_ref[0] + ((0.532486712431+0.506887020325j))*x_ref[1]**o + ((0.225735074988-0.53547195448j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.602028432024+0.699637018013j)*x[0]**o + ((-0.620990979671+0.877288170295j))*x[0] + ((-0.752631140491+0.84131066523j))*x[1]**o + ((0.462007177107-0.491192830761j))*x[1]
+        ref[(1, 2, 2)]=(0.602028432024+0.699637018013j)*x_ref[0]**o + ((-0.620990979671+0.877288170295j))*x_ref[0] + ((-0.752631140491+0.84131066523j))*x_ref[1]**o + ((0.462007177107-0.491192830761j))*x_ref[1]
+        arg[(1, 3, 0)]=(-0.575090753743+0.0627949628863j)*x[0]**o + ((-0.456538350905-0.755602568397j))*x[0] + ((-0.418994702764+0.790025659085j))*x[1]**o + ((-0.889781808246+0.477415204943j))*x[1]
+        ref[(1, 3, 0)]=(-0.575090753743+0.0627949628863j)*x_ref[0]**o + ((-0.456538350905-0.755602568397j))*x_ref[0] + ((-0.418994702764+0.790025659085j))*x_ref[1]**o + ((-0.889781808246+0.477415204943j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.468553305895-0.510614448915j)*x[0]**o + ((-0.238883897262-0.584622374839j))*x[0] + ((-0.534692523496+0.731915980968j))*x[1]**o + ((-0.374449848943-0.162921881126j))*x[1]
+        ref[(1, 3, 1)]=(0.468553305895-0.510614448915j)*x_ref[0]**o + ((-0.238883897262-0.584622374839j))*x_ref[0] + ((-0.534692523496+0.731915980968j))*x_ref[1]**o + ((-0.374449848943-0.162921881126j))*x_ref[1]
+        arg[(1, 3, 2)]=(0.418299831693+0.886988461361j)*x[0]**o + ((0.417366937704-0.841857395401j))*x[0] + ((-0.0364060152108+0.708864693688j))*x[1]**o + ((-0.31203717124+0.47513574295j))*x[1]
+        ref[(1, 3, 2)]=(0.418299831693+0.886988461361j)*x_ref[0]**o + ((0.417366937704-0.841857395401j))*x_ref[0] + ((-0.0364060152108+0.708864693688j))*x_ref[1]**o + ((-0.31203717124+0.47513574295j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.772305985722+0.116049737206j)*x[2]**o + ((-0.506864855371+0.0374744528847j))*x[2]
+            ref[(0, 0, 0)]+=(0.772305985722+0.116049737206j)*x_ref[2]**o + ((-0.506864855371+0.0374744528847j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.484170148567+0.586169074653j)*x[2]**o + ((0.53855933917+0.739405329613j))*x[2]
+            ref[(0, 0, 1)]+=(-0.484170148567+0.586169074653j)*x_ref[2]**o + ((0.53855933917+0.739405329613j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.298792155245+0.244166800479j)*x[2]**o + ((0.850393866417+0.164486232378j))*x[2]
+            ref[(0, 0, 2)]+=(0.298792155245+0.244166800479j)*x_ref[2]**o + ((0.850393866417+0.164486232378j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.82698923171-0.622572792369j)*x[2]**o + ((0.743720073061+0.929303557671j))*x[2]
+            ref[(0, 1, 0)]+=(0.82698923171-0.622572792369j)*x_ref[2]**o + ((0.743720073061+0.929303557671j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.956966329793+0.152413167317j)*x[2]**o + ((0.904540858991+0.929597812328j))*x[2]
+            ref[(0, 1, 1)]+=(0.956966329793+0.152413167317j)*x_ref[2]**o + ((0.904540858991+0.929597812328j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.454383384782+0.306349931574j)*x[2]**o + ((-0.574643003844+0.601371298928j))*x[2]
+            ref[(0, 1, 2)]+=(-0.454383384782+0.306349931574j)*x_ref[2]**o + ((-0.574643003844+0.601371298928j))*x_ref[2]
+            arg[(0, 2, 0)]+=(0.672849645168-0.101159763696j)*x[2]**o + ((-0.0156890653693+0.726955478634j))*x[2]
+            ref[(0, 2, 0)]+=(0.672849645168-0.101159763696j)*x_ref[2]**o + ((-0.0156890653693+0.726955478634j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.0383305203607+0.842013321811j)*x[2]**o + ((-0.712085458682-0.362133582976j))*x[2]
+            ref[(0, 2, 1)]+=(0.0383305203607+0.842013321811j)*x_ref[2]**o + ((-0.712085458682-0.362133582976j))*x_ref[2]
+            arg[(0, 2, 2)]+=(0.406592517856-0.589814063059j)*x[2]**o + ((-0.381249216518-0.24205503546j))*x[2]
+            ref[(0, 2, 2)]+=(0.406592517856-0.589814063059j)*x_ref[2]**o + ((-0.381249216518-0.24205503546j))*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.129540225778+0.517319862816j)*x[2]**o + ((0.612688181319-0.611896092109j))*x[2]
+            ref[(0, 3, 0)]+=(-0.129540225778+0.517319862816j)*x_ref[2]**o + ((0.612688181319-0.611896092109j))*x_ref[2]
+            arg[(0, 3, 1)]+=(-0.250430669756-0.544723033512j)*x[2]**o + ((0.864871433676-0.748483527134j))*x[2]
+            ref[(0, 3, 1)]+=(-0.250430669756-0.544723033512j)*x_ref[2]**o + ((0.864871433676-0.748483527134j))*x_ref[2]
+            arg[(0, 3, 2)]+=(0.911825268363-0.724536195552j)*x[2]**o + ((-0.203251066567+0.366389488219j))*x[2]
+            ref[(0, 3, 2)]+=(0.911825268363-0.724536195552j)*x_ref[2]**o + ((-0.203251066567+0.366389488219j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.829637711188-0.623367482217j)*x[2]**o + ((0.360170673448+0.898668056508j))*x[2]
+            ref[(1, 0, 0)]+=(0.829637711188-0.623367482217j)*x_ref[2]**o + ((0.360170673448+0.898668056508j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.667788887307+0.0117721789424j)*x[2]**o + ((-0.95490215686+0.071541938651j))*x[2]
+            ref[(1, 0, 1)]+=(0.667788887307+0.0117721789424j)*x_ref[2]**o + ((-0.95490215686+0.071541938651j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.171334168643+0.766695881515j)*x[2]**o + ((-0.0503620783726-0.435566030935j))*x[2]
+            ref[(1, 0, 2)]+=(-0.171334168643+0.766695881515j)*x_ref[2]**o + ((-0.0503620783726-0.435566030935j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.102850867558+0.674305513509j)*x[2]**o + ((-0.324304805946+0.220203631248j))*x[2]
+            ref[(1, 1, 0)]+=(-0.102850867558+0.674305513509j)*x_ref[2]**o + ((-0.324304805946+0.220203631248j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.587813320407-0.391156282484j)*x[2]**o + ((0.610315572985+0.315035187802j))*x[2]
+            ref[(1, 1, 1)]+=(-0.587813320407-0.391156282484j)*x_ref[2]**o + ((0.610315572985+0.315035187802j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.255739764702+0.39824545052j)*x[2]**o + ((0.345536849959-0.696437450289j))*x[2]
+            ref[(1, 1, 2)]+=(-0.255739764702+0.39824545052j)*x_ref[2]**o + ((0.345536849959-0.696437450289j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.131705128664+0.173824649711j)*x[2]**o + ((0.825376787673+0.319405887934j))*x[2]
+            ref[(1, 2, 0)]+=(-0.131705128664+0.173824649711j)*x_ref[2]**o + ((0.825376787673+0.319405887934j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.16147681477-0.0819142531357j)*x[2]**o + ((0.722855443585+0.730168023432j))*x[2]
+            ref[(1, 2, 1)]+=(0.16147681477-0.0819142531357j)*x_ref[2]**o + ((0.722855443585+0.730168023432j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.651345673414+0.310863582381j)*x[2]**o + ((-0.188782461255-0.000486006734926j))*x[2]
+            ref[(1, 2, 2)]+=(0.651345673414+0.310863582381j)*x_ref[2]**o + ((-0.188782461255-0.000486006734926j))*x_ref[2]
+            arg[(1, 3, 0)]+=(0.171950810943+0.482193672415j)*x[2]**o + ((-0.21147187841-0.784704634594j))*x[2]
+            ref[(1, 3, 0)]+=(0.171950810943+0.482193672415j)*x_ref[2]**o + ((-0.21147187841-0.784704634594j))*x_ref[2]
+            arg[(1, 3, 1)]+=(0.0256219784672-0.291082548435j)*x[2]**o + ((-0.504860305968-0.635493697301j))*x[2]
+            ref[(1, 3, 1)]+=(0.0256219784672-0.291082548435j)*x_ref[2]**o + ((-0.504860305968-0.635493697301j))*x_ref[2]
+            arg[(1, 3, 2)]+=(0.0306618993753+0.494719746492j)*x[2]**o + ((0.887839782453+0.60301406431j))*x[2]
+            ref[(1, 3, 2)]+=(0.0306618993753+0.494719746492j)*x_ref[2]**o + ((0.887839782453+0.60301406431j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4, 4),w)
+        ref = Data(0,(4, 4, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(0.94739752394+0.536597199096j)*x[0]**o + ((-0.101801483653+0.327468651101j))*x[0] + ((0.933507587584+0.784423809545j))*x[1]**o + ((-0.71069314264+0.3601806926j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.94739752394+0.536597199096j)*x_ref[0]**o + ((-0.101801483653+0.327468651101j))*x_ref[0] + ((0.933507587584+0.784423809545j))*x_ref[1]**o + ((-0.71069314264+0.3601806926j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.881373612095+0.660183295109j)*x[0]**o + ((0.146858850416+0.418878116141j))*x[0] + ((-0.921997895909+0.73457306603j))*x[1]**o + ((0.486999825143-0.726537467146j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.881373612095+0.660183295109j)*x_ref[0]**o + ((0.146858850416+0.418878116141j))*x_ref[0] + ((-0.921997895909+0.73457306603j))*x_ref[1]**o + ((0.486999825143-0.726537467146j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.821596200468+0.596713128328j)*x[0]**o + ((-0.887962469039-0.167535497727j))*x[0] + ((0.507086852334-0.439757502862j))*x[1]**o + ((-0.0474689452546+0.944007593891j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.821596200468+0.596713128328j)*x_ref[0]**o + ((-0.887962469039-0.167535497727j))*x_ref[0] + ((0.507086852334-0.439757502862j))*x_ref[1]**o + ((-0.0474689452546+0.944007593891j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.623973595282+0.11720313265j)*x[0]**o + ((0.375784440046-0.91026456793j))*x[0] + ((-0.127132519007-0.368594070373j))*x[1]**o + ((0.0870342180254-0.967364736993j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.623973595282+0.11720313265j)*x_ref[0]**o + ((0.375784440046-0.91026456793j))*x_ref[0] + ((-0.127132519007-0.368594070373j))*x_ref[1]**o + ((0.0870342180254-0.967364736993j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.559141630645-0.882518523058j)*x[0]**o + ((-0.410628263249-0.873966572623j))*x[0] + ((0.380646782868+0.772052647538j))*x[1]**o + ((-0.780355704342-0.361722243804j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.559141630645-0.882518523058j)*x_ref[0]**o + ((-0.410628263249-0.873966572623j))*x_ref[0] + ((0.380646782868+0.772052647538j))*x_ref[1]**o + ((-0.780355704342-0.361722243804j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.419117518535+0.680807077214j)*x[0]**o + ((0.0817392914457+0.815754084698j))*x[0] + ((0.990992113541-0.231231308773j))*x[1]**o + ((0.837100176677+0.412542600421j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.419117518535+0.680807077214j)*x_ref[0]**o + ((0.0817392914457+0.815754084698j))*x_ref[0] + ((0.990992113541-0.231231308773j))*x_ref[1]**o + ((0.837100176677+0.412542600421j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.663039644552+0.255978779321j)*x[0]**o + ((0.923875380398+0.144699994452j))*x[0] + ((-0.233641381894-0.0212859645466j))*x[1]**o + ((-0.831535313444-0.752659048623j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.663039644552+0.255978779321j)*x_ref[0]**o + ((0.923875380398+0.144699994452j))*x_ref[0] + ((-0.233641381894-0.0212859645466j))*x_ref[1]**o + ((-0.831535313444-0.752659048623j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.553772569448-0.0568107749766j)*x[0]**o + ((0.74358489627+0.296876449057j))*x[0] + ((-0.763143095748-0.298100883392j))*x[1]**o + ((0.141199910301-0.793820124241j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.553772569448-0.0568107749766j)*x_ref[0]**o + ((0.74358489627+0.296876449057j))*x_ref[0] + ((-0.763143095748-0.298100883392j))*x_ref[1]**o + ((0.141199910301-0.793820124241j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.0708291467712-0.159964654329j)*x[0]**o + ((-0.445049531575+0.0593294081209j))*x[0] + ((-0.50404444544+0.360894134748j))*x[1]**o + ((-0.960759102998+0.29196396819j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.0708291467712-0.159964654329j)*x_ref[0]**o + ((-0.445049531575+0.0593294081209j))*x_ref[0] + ((-0.50404444544+0.360894134748j))*x_ref[1]**o + ((-0.960759102998+0.29196396819j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.090014517734-0.723463311737j)*x[0]**o + ((0.0149603623365-0.561556939781j))*x[0] + ((-0.152496794016-0.953430015086j))*x[1]**o + ((-0.985013851781-0.453174142j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.090014517734-0.723463311737j)*x_ref[0]**o + ((0.0149603623365-0.561556939781j))*x_ref[0] + ((-0.152496794016-0.953430015086j))*x_ref[1]**o + ((-0.985013851781-0.453174142j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.0484357106641-0.324293847502j)*x[0]**o + ((-0.0198486490022+0.832895931141j))*x[0] + ((0.994759202466-0.101976799096j))*x[1]**o + ((0.21996760064-0.791556598261j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.0484357106641-0.324293847502j)*x_ref[0]**o + ((-0.0198486490022+0.832895931141j))*x_ref[0] + ((0.994759202466-0.101976799096j))*x_ref[1]**o + ((0.21996760064-0.791556598261j))*x_ref[1]
+        arg[(0, 0, 2, 3)]=(0.515568689825-0.502344504579j)*x[0]**o + ((0.241077719538-0.300373934797j))*x[0] + ((-0.303707608347+0.373735168571j))*x[1]**o + ((-0.27990753354+0.995527177625j))*x[1]
+        ref[(0, 0, 2, 3)]=(0.515568689825-0.502344504579j)*x_ref[0]**o + ((0.241077719538-0.300373934797j))*x_ref[0] + ((-0.303707608347+0.373735168571j))*x_ref[1]**o + ((-0.27990753354+0.995527177625j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(-0.607608532205-0.497812636958j)*x[0]**o + ((0.0160083074848-0.339189888912j))*x[0] + ((-0.84938949809+0.200013280326j))*x[1]**o + ((0.0590287222028+0.367190446276j))*x[1]
+        ref[(0, 0, 3, 0)]=(-0.607608532205-0.497812636958j)*x_ref[0]**o + ((0.0160083074848-0.339189888912j))*x_ref[0] + ((-0.84938949809+0.200013280326j))*x_ref[1]**o + ((0.0590287222028+0.367190446276j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(-0.106554573282+0.163598164083j)*x[0]**o + ((-0.714890980167+0.269883591546j))*x[0] + ((-0.928285638615-0.116479347756j))*x[1]**o + ((0.37595803394+0.773721230119j))*x[1]
+        ref[(0, 0, 3, 1)]=(-0.106554573282+0.163598164083j)*x_ref[0]**o + ((-0.714890980167+0.269883591546j))*x_ref[0] + ((-0.928285638615-0.116479347756j))*x_ref[1]**o + ((0.37595803394+0.773721230119j))*x_ref[1]
+        arg[(0, 0, 3, 2)]=(-0.847332706627+0.0979488752247j)*x[0]**o + ((0.784964338377-0.264854938021j))*x[0] + ((-0.949981858176-0.871249113684j))*x[1]**o + ((0.158948751496-0.937811904587j))*x[1]
+        ref[(0, 0, 3, 2)]=(-0.847332706627+0.0979488752247j)*x_ref[0]**o + ((0.784964338377-0.264854938021j))*x_ref[0] + ((-0.949981858176-0.871249113684j))*x_ref[1]**o + ((0.158948751496-0.937811904587j))*x_ref[1]
+        arg[(0, 0, 3, 3)]=(0.990303331711+0.717741355631j)*x[0]**o + ((0.452198325838+0.352127629798j))*x[0] + ((0.299327077085+0.387383347094j))*x[1]**o + ((0.0124313973319-0.868660988403j))*x[1]
+        ref[(0, 0, 3, 3)]=(0.990303331711+0.717741355631j)*x_ref[0]**o + ((0.452198325838+0.352127629798j))*x_ref[0] + ((0.299327077085+0.387383347094j))*x_ref[1]**o + ((0.0124313973319-0.868660988403j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.947495649344-0.532824851508j)*x[0]**o + ((0.139142889543-0.998651276715j))*x[0] + ((-0.436958613498-0.576487613521j))*x[1]**o + ((-0.439950926732+0.677030562056j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.947495649344-0.532824851508j)*x_ref[0]**o + ((0.139142889543-0.998651276715j))*x_ref[0] + ((-0.436958613498-0.576487613521j))*x_ref[1]**o + ((-0.439950926732+0.677030562056j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.680734041258+0.069942766105j)*x[0]**o + ((-0.516402676544-0.79881103425j))*x[0] + ((-0.892138944404+0.491412093272j))*x[1]**o + ((0.163679272877-0.498501157459j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.680734041258+0.069942766105j)*x_ref[0]**o + ((-0.516402676544-0.79881103425j))*x_ref[0] + ((-0.892138944404+0.491412093272j))*x_ref[1]**o + ((0.163679272877-0.498501157459j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.873526039175-0.0527265135878j)*x[0]**o + ((-0.736932396116-0.73584814307j))*x[0] + ((-0.783386357179-0.457245108393j))*x[1]**o + ((0.573054469855+0.833697919939j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.873526039175-0.0527265135878j)*x_ref[0]**o + ((-0.736932396116-0.73584814307j))*x_ref[0] + ((-0.783386357179-0.457245108393j))*x_ref[1]**o + ((0.573054469855+0.833697919939j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.609448944214-0.505179289066j)*x[0]**o + ((-0.336703625826-0.280785278229j))*x[0] + ((0.172225476661+0.665639742806j))*x[1]**o + ((-0.717416063106-0.706661958619j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.609448944214-0.505179289066j)*x_ref[0]**o + ((-0.336703625826-0.280785278229j))*x_ref[0] + ((0.172225476661+0.665639742806j))*x_ref[1]**o + ((-0.717416063106-0.706661958619j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.322507901962+0.0607102682191j)*x[0]**o + ((-0.628751351957-0.533451370616j))*x[0] + ((0.430630546777-0.995998938178j))*x[1]**o + ((0.27880391725+0.47130917884j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.322507901962+0.0607102682191j)*x_ref[0]**o + ((-0.628751351957-0.533451370616j))*x_ref[0] + ((0.430630546777-0.995998938178j))*x_ref[1]**o + ((0.27880391725+0.47130917884j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.844640058128-0.448687478636j)*x[0]**o + ((-0.477043529506+0.0786425239674j))*x[0] + ((0.890624149008+0.835816198792j))*x[1]**o + ((-0.634018147347-0.298486248784j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.844640058128-0.448687478636j)*x_ref[0]**o + ((-0.477043529506+0.0786425239674j))*x_ref[0] + ((0.890624149008+0.835816198792j))*x_ref[1]**o + ((-0.634018147347-0.298486248784j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.948615975338+0.470311623326j)*x[0]**o + ((-0.14732183546+0.702323693374j))*x[0] + ((-0.27467093548-0.97509364109j))*x[1]**o + ((-0.629633176675+0.00505738426585j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.948615975338+0.470311623326j)*x_ref[0]**o + ((-0.14732183546+0.702323693374j))*x_ref[0] + ((-0.27467093548-0.97509364109j))*x_ref[1]**o + ((-0.629633176675+0.00505738426585j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.290289652725-0.946940859373j)*x[0]**o + ((0.325238841817-0.1650378519j))*x[0] + ((0.827915844327-0.599577858848j))*x[1]**o + ((-0.19332978095+0.971721560289j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.290289652725-0.946940859373j)*x_ref[0]**o + ((0.325238841817-0.1650378519j))*x_ref[0] + ((0.827915844327-0.599577858848j))*x_ref[1]**o + ((-0.19332978095+0.971721560289j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.0603746603179+0.655673863002j)*x[0]**o + ((-0.100167082049+0.381986787389j))*x[0] + ((-0.461670811986-0.112938238971j))*x[1]**o + ((-0.557505175025+0.545352193097j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.0603746603179+0.655673863002j)*x_ref[0]**o + ((-0.100167082049+0.381986787389j))*x_ref[0] + ((-0.461670811986-0.112938238971j))*x_ref[1]**o + ((-0.557505175025+0.545352193097j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.268130421927-0.21879105701j)*x[0]**o + ((-0.89066619337-0.386698795184j))*x[0] + ((0.829937448714-0.548537413378j))*x[1]**o + ((-0.183686028349+0.29340859744j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.268130421927-0.21879105701j)*x_ref[0]**o + ((-0.89066619337-0.386698795184j))*x_ref[0] + ((0.829937448714-0.548537413378j))*x_ref[1]**o + ((-0.183686028349+0.29340859744j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.0264708256253+0.72876776948j)*x[0]**o + ((0.0462245532087+0.619936080556j))*x[0] + ((-0.955774274623-0.162410313705j))*x[1]**o + ((-0.590436902822-0.660518676857j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.0264708256253+0.72876776948j)*x_ref[0]**o + ((0.0462245532087+0.619936080556j))*x_ref[0] + ((-0.955774274623-0.162410313705j))*x_ref[1]**o + ((-0.590436902822-0.660518676857j))*x_ref[1]
+        arg[(0, 1, 2, 3)]=(0.532484117117-0.738638474731j)*x[0]**o + ((0.811240296735+0.0873909505557j))*x[0] + ((-0.534976636287-0.0267483526985j))*x[1]**o + ((0.154879667826-0.893119947019j))*x[1]
+        ref[(0, 1, 2, 3)]=(0.532484117117-0.738638474731j)*x_ref[0]**o + ((0.811240296735+0.0873909505557j))*x_ref[0] + ((-0.534976636287-0.0267483526985j))*x_ref[1]**o + ((0.154879667826-0.893119947019j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(0.997466035724-0.147417895385j)*x[0]**o + ((-0.220972222329-0.932860181723j))*x[0] + ((-0.457100576058-0.825864899401j))*x[1]**o + ((-0.243800406266+0.0598200804202j))*x[1]
+        ref[(0, 1, 3, 0)]=(0.997466035724-0.147417895385j)*x_ref[0]**o + ((-0.220972222329-0.932860181723j))*x_ref[0] + ((-0.457100576058-0.825864899401j))*x_ref[1]**o + ((-0.243800406266+0.0598200804202j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(-0.898756771023+0.74280894347j)*x[0]**o + ((0.663901612907+0.719118312717j))*x[0] + ((-0.823547285958-0.695109919706j))*x[1]**o + ((-0.696348057067-0.11143456828j))*x[1]
+        ref[(0, 1, 3, 1)]=(-0.898756771023+0.74280894347j)*x_ref[0]**o + ((0.663901612907+0.719118312717j))*x_ref[0] + ((-0.823547285958-0.695109919706j))*x_ref[1]**o + ((-0.696348057067-0.11143456828j))*x_ref[1]
+        arg[(0, 1, 3, 2)]=(0.311032983032-0.474030747559j)*x[0]**o + ((-0.171568010502-0.752038691918j))*x[0] + ((-0.341572642306-0.0330271252846j))*x[1]**o + ((-0.814337317137+0.542193749107j))*x[1]
+        ref[(0, 1, 3, 2)]=(0.311032983032-0.474030747559j)*x_ref[0]**o + ((-0.171568010502-0.752038691918j))*x_ref[0] + ((-0.341572642306-0.0330271252846j))*x_ref[1]**o + ((-0.814337317137+0.542193749107j))*x_ref[1]
+        arg[(0, 1, 3, 3)]=(-0.912418572142+0.343318466032j)*x[0]**o + ((-0.184593319337-0.424194761504j))*x[0] + ((0.22427368127+0.502044259205j))*x[1]**o + ((-0.0179081076603-0.704021977699j))*x[1]
+        ref[(0, 1, 3, 3)]=(-0.912418572142+0.343318466032j)*x_ref[0]**o + ((-0.184593319337-0.424194761504j))*x_ref[0] + ((0.22427368127+0.502044259205j))*x_ref[1]**o + ((-0.0179081076603-0.704021977699j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.0166088041765+0.633113555803j)*x[0]**o + ((0.786095333684+0.264674462251j))*x[0] + ((0.022246933698+0.283961100863j))*x[1]**o + ((0.0585703092788+0.65806123672j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.0166088041765+0.633113555803j)*x_ref[0]**o + ((0.786095333684+0.264674462251j))*x_ref[0] + ((0.022246933698+0.283961100863j))*x_ref[1]**o + ((0.0585703092788+0.65806123672j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.615156732719+0.335830601339j)*x[0]**o + ((-0.0812762455728+0.0669390543367j))*x[0] + ((-0.00760256224611-0.733352443588j))*x[1]**o + ((0.754334199425-0.768258418812j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.615156732719+0.335830601339j)*x_ref[0]**o + ((-0.0812762455728+0.0669390543367j))*x_ref[0] + ((-0.00760256224611-0.733352443588j))*x_ref[1]**o + ((0.754334199425-0.768258418812j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(-0.165212992136-0.0543284985244j)*x[0]**o + ((-0.0358610813649+0.705036311795j))*x[0] + ((0.767867372063-0.691305417986j))*x[1]**o + ((0.22177813048+0.528799505253j))*x[1]
+        ref[(0, 2, 0, 2)]=(-0.165212992136-0.0543284985244j)*x_ref[0]**o + ((-0.0358610813649+0.705036311795j))*x_ref[0] + ((0.767867372063-0.691305417986j))*x_ref[1]**o + ((0.22177813048+0.528799505253j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(0.414806720263-0.326226376642j)*x[0]**o + ((0.320428444413+0.312254472888j))*x[0] + ((-0.508168910005+0.989379258087j))*x[1]**o + ((0.187706156541+0.256269348129j))*x[1]
+        ref[(0, 2, 0, 3)]=(0.414806720263-0.326226376642j)*x_ref[0]**o + ((0.320428444413+0.312254472888j))*x_ref[0] + ((-0.508168910005+0.989379258087j))*x_ref[1]**o + ((0.187706156541+0.256269348129j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.649648927757+0.735324046028j)*x[0]**o + ((0.314803317109-0.888687609079j))*x[0] + ((-0.888994014047+0.609297988797j))*x[1]**o + ((-0.708221935439-0.740174691941j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.649648927757+0.735324046028j)*x_ref[0]**o + ((0.314803317109-0.888687609079j))*x_ref[0] + ((-0.888994014047+0.609297988797j))*x_ref[1]**o + ((-0.708221935439-0.740174691941j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.720316986942+0.429727668431j)*x[0]**o + ((0.169843212514-0.392270129467j))*x[0] + ((-0.529822086445+0.659962367877j))*x[1]**o + ((-0.00276618928874-0.109023951121j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.720316986942+0.429727668431j)*x_ref[0]**o + ((0.169843212514-0.392270129467j))*x_ref[0] + ((-0.529822086445+0.659962367877j))*x_ref[1]**o + ((-0.00276618928874-0.109023951121j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(-0.404962895042+0.759244672173j)*x[0]**o + ((-0.363971919026-0.0672630524279j))*x[0] + ((-0.181131040428+0.454001671509j))*x[1]**o + ((-0.384067092907-0.0538550396685j))*x[1]
+        ref[(0, 2, 1, 2)]=(-0.404962895042+0.759244672173j)*x_ref[0]**o + ((-0.363971919026-0.0672630524279j))*x_ref[0] + ((-0.181131040428+0.454001671509j))*x_ref[1]**o + ((-0.384067092907-0.0538550396685j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(0.219719567277+0.35734210119j)*x[0]**o + ((-0.842717566016+0.61531144024j))*x[0] + ((0.160915901694-0.727571864974j))*x[1]**o + ((0.477805914317-0.275891552352j))*x[1]
+        ref[(0, 2, 1, 3)]=(0.219719567277+0.35734210119j)*x_ref[0]**o + ((-0.842717566016+0.61531144024j))*x_ref[0] + ((0.160915901694-0.727571864974j))*x_ref[1]**o + ((0.477805914317-0.275891552352j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.390896385997-0.0487713439745j)*x[0]**o + ((-0.61027076497-0.789432084454j))*x[0] + ((0.911805855806-0.784930815686j))*x[1]**o + ((0.55688941162-0.740485675053j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.390896385997-0.0487713439745j)*x_ref[0]**o + ((-0.61027076497-0.789432084454j))*x_ref[0] + ((0.911805855806-0.784930815686j))*x_ref[1]**o + ((0.55688941162-0.740485675053j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.0357476231527-0.49350110159j)*x[0]**o + ((-0.861270819133+0.543483302916j))*x[0] + ((-0.145896740377+0.0599468435332j))*x[1]**o + ((0.439156448632+0.239989701832j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.0357476231527-0.49350110159j)*x_ref[0]**o + ((-0.861270819133+0.543483302916j))*x_ref[0] + ((-0.145896740377+0.0599468435332j))*x_ref[1]**o + ((0.439156448632+0.239989701832j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(-0.952769285234+0.220917458636j)*x[0]**o + ((-0.501362564624+0.531878419832j))*x[0] + ((-0.846862153055-0.496165462402j))*x[1]**o + ((0.0800082996464+0.736909198424j))*x[1]
+        ref[(0, 2, 2, 2)]=(-0.952769285234+0.220917458636j)*x_ref[0]**o + ((-0.501362564624+0.531878419832j))*x_ref[0] + ((-0.846862153055-0.496165462402j))*x_ref[1]**o + ((0.0800082996464+0.736909198424j))*x_ref[1]
+        arg[(0, 2, 2, 3)]=(-0.249160879226-0.274724400382j)*x[0]**o + ((-0.337809348484-0.796271412296j))*x[0] + ((-0.503875043345-0.409733707669j))*x[1]**o + ((-0.984084181373-0.472944170376j))*x[1]
+        ref[(0, 2, 2, 3)]=(-0.249160879226-0.274724400382j)*x_ref[0]**o + ((-0.337809348484-0.796271412296j))*x_ref[0] + ((-0.503875043345-0.409733707669j))*x_ref[1]**o + ((-0.984084181373-0.472944170376j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(0.0183369566425+0.528293731223j)*x[0]**o + ((-0.144091688255+0.0188105088446j))*x[0] + ((-0.940827988793+0.20816109213j))*x[1]**o + ((-0.591776798237-0.865604861566j))*x[1]
+        ref[(0, 2, 3, 0)]=(0.0183369566425+0.528293731223j)*x_ref[0]**o + ((-0.144091688255+0.0188105088446j))*x_ref[0] + ((-0.940827988793+0.20816109213j))*x_ref[1]**o + ((-0.591776798237-0.865604861566j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(0.928915737155+0.386516069179j)*x[0]**o + ((0.499456372977+0.998719741312j))*x[0] + ((-0.541780348461+0.295123965881j))*x[1]**o + ((-0.469290840071-0.129895604163j))*x[1]
+        ref[(0, 2, 3, 1)]=(0.928915737155+0.386516069179j)*x_ref[0]**o + ((0.499456372977+0.998719741312j))*x_ref[0] + ((-0.541780348461+0.295123965881j))*x_ref[1]**o + ((-0.469290840071-0.129895604163j))*x_ref[1]
+        arg[(0, 2, 3, 2)]=(-0.542288856068+0.881342488543j)*x[0]**o + ((0.396759234319-0.649820153952j))*x[0] + ((-0.793820270451+0.830304312108j))*x[1]**o + ((0.34547085583-0.285959170889j))*x[1]
+        ref[(0, 2, 3, 2)]=(-0.542288856068+0.881342488543j)*x_ref[0]**o + ((0.396759234319-0.649820153952j))*x_ref[0] + ((-0.793820270451+0.830304312108j))*x_ref[1]**o + ((0.34547085583-0.285959170889j))*x_ref[1]
+        arg[(0, 2, 3, 3)]=(-0.26395192311-0.577875795555j)*x[0]**o + ((-0.608704045268-0.395921564681j))*x[0] + ((0.582509232976+0.769764245808j))*x[1]**o + ((0.25332995366+0.959494086183j))*x[1]
+        ref[(0, 2, 3, 3)]=(-0.26395192311-0.577875795555j)*x_ref[0]**o + ((-0.608704045268-0.395921564681j))*x_ref[0] + ((0.582509232976+0.769764245808j))*x_ref[1]**o + ((0.25332995366+0.959494086183j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.0296508968399+0.121195765096j)*x[0]**o + ((0.410137379327+0.534660635848j))*x[0] + ((0.892694563335-0.757407365803j))*x[1]**o + ((0.706634921593+0.143556433299j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.0296508968399+0.121195765096j)*x_ref[0]**o + ((0.410137379327+0.534660635848j))*x_ref[0] + ((0.892694563335-0.757407365803j))*x_ref[1]**o + ((0.706634921593+0.143556433299j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.422677009389+0.244834138202j)*x[0]**o + ((-0.882397167407+0.88183557624j))*x[0] + ((0.492546701108+0.577723700346j))*x[1]**o + ((0.748755320319+0.489805710867j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.422677009389+0.244834138202j)*x_ref[0]**o + ((-0.882397167407+0.88183557624j))*x_ref[0] + ((0.492546701108+0.577723700346j))*x_ref[1]**o + ((0.748755320319+0.489805710867j))*x_ref[1]
+        arg[(0, 3, 0, 2)]=(0.578524495073+0.73146948916j)*x[0]**o + ((0.512789051383+0.748231650062j))*x[0] + ((0.301151473317+0.76408702224j))*x[1]**o + ((0.0613092941278-0.510857521992j))*x[1]
+        ref[(0, 3, 0, 2)]=(0.578524495073+0.73146948916j)*x_ref[0]**o + ((0.512789051383+0.748231650062j))*x_ref[0] + ((0.301151473317+0.76408702224j))*x_ref[1]**o + ((0.0613092941278-0.510857521992j))*x_ref[1]
+        arg[(0, 3, 0, 3)]=(-0.657862305749-0.777952785378j)*x[0]**o + ((0.494209930631-0.826004407215j))*x[0] + ((-0.13025491898+0.218509968179j))*x[1]**o + ((0.679763039675-0.511712693265j))*x[1]
+        ref[(0, 3, 0, 3)]=(-0.657862305749-0.777952785378j)*x_ref[0]**o + ((0.494209930631-0.826004407215j))*x_ref[0] + ((-0.13025491898+0.218509968179j))*x_ref[1]**o + ((0.679763039675-0.511712693265j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.469283812572-0.385701365193j)*x[0]**o + ((-0.603793116428+0.973011880516j))*x[0] + ((0.539041191541-0.668832686527j))*x[1]**o + ((-0.711670260373+0.564279264073j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.469283812572-0.385701365193j)*x_ref[0]**o + ((-0.603793116428+0.973011880516j))*x_ref[0] + ((0.539041191541-0.668832686527j))*x_ref[1]**o + ((-0.711670260373+0.564279264073j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.815864167733-0.325404824411j)*x[0]**o + ((-0.0800631821831-0.885791033863j))*x[0] + ((0.152754759744-0.176382011152j))*x[1]**o + ((0.0489123972393+0.276390754223j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.815864167733-0.325404824411j)*x_ref[0]**o + ((-0.0800631821831-0.885791033863j))*x_ref[0] + ((0.152754759744-0.176382011152j))*x_ref[1]**o + ((0.0489123972393+0.276390754223j))*x_ref[1]
+        arg[(0, 3, 1, 2)]=(0.0551117725922-0.321774214585j)*x[0]**o + ((-0.412437217172+0.132232142104j))*x[0] + ((-0.0760359398511+0.658002807234j))*x[1]**o + ((0.708708388488+0.847162680319j))*x[1]
+        ref[(0, 3, 1, 2)]=(0.0551117725922-0.321774214585j)*x_ref[0]**o + ((-0.412437217172+0.132232142104j))*x_ref[0] + ((-0.0760359398511+0.658002807234j))*x_ref[1]**o + ((0.708708388488+0.847162680319j))*x_ref[1]
+        arg[(0, 3, 1, 3)]=(0.565040648675-0.93425059472j)*x[0]**o + ((0.687007087393-0.52625068746j))*x[0] + ((0.141440682846-0.142336428572j))*x[1]**o + ((-0.00935578291845+0.492365064946j))*x[1]
+        ref[(0, 3, 1, 3)]=(0.565040648675-0.93425059472j)*x_ref[0]**o + ((0.687007087393-0.52625068746j))*x_ref[0] + ((0.141440682846-0.142336428572j))*x_ref[1]**o + ((-0.00935578291845+0.492365064946j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(-0.222599784486-0.0976507687673j)*x[0]**o + ((0.198648853548-0.655197123051j))*x[0] + ((-0.780953480357-0.0822341876102j))*x[1]**o + ((0.606754079226+0.699930505972j))*x[1]
+        ref[(0, 3, 2, 0)]=(-0.222599784486-0.0976507687673j)*x_ref[0]**o + ((0.198648853548-0.655197123051j))*x_ref[0] + ((-0.780953480357-0.0822341876102j))*x_ref[1]**o + ((0.606754079226+0.699930505972j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(-0.35545463592-0.519443157036j)*x[0]**o + ((0.717622491357-0.989945620662j))*x[0] + ((0.561155287555-0.238553260274j))*x[1]**o + ((0.355414617887-0.744372605798j))*x[1]
+        ref[(0, 3, 2, 1)]=(-0.35545463592-0.519443157036j)*x_ref[0]**o + ((0.717622491357-0.989945620662j))*x_ref[0] + ((0.561155287555-0.238553260274j))*x_ref[1]**o + ((0.355414617887-0.744372605798j))*x_ref[1]
+        arg[(0, 3, 2, 2)]=(-0.635666284604+0.845014219245j)*x[0]**o + ((0.392335611675+0.273984939057j))*x[0] + ((0.539627222803+0.349103935302j))*x[1]**o + ((0.354736523748-0.0234654485963j))*x[1]
+        ref[(0, 3, 2, 2)]=(-0.635666284604+0.845014219245j)*x_ref[0]**o + ((0.392335611675+0.273984939057j))*x_ref[0] + ((0.539627222803+0.349103935302j))*x_ref[1]**o + ((0.354736523748-0.0234654485963j))*x_ref[1]
+        arg[(0, 3, 2, 3)]=(0.108446951287-0.484051150251j)*x[0]**o + ((0.951711478561+0.445974261605j))*x[0] + ((-0.989521200754-0.77782228672j))*x[1]**o + ((0.678168049803-0.0376038604201j))*x[1]
+        ref[(0, 3, 2, 3)]=(0.108446951287-0.484051150251j)*x_ref[0]**o + ((0.951711478561+0.445974261605j))*x_ref[0] + ((-0.989521200754-0.77782228672j))*x_ref[1]**o + ((0.678168049803-0.0376038604201j))*x_ref[1]
+        arg[(0, 3, 3, 0)]=(-0.832891289897+0.443448371512j)*x[0]**o + ((0.27640994489-0.346503233946j))*x[0] + ((-0.323922491006-0.104353762993j))*x[1]**o + ((-0.262283285376-0.925689894305j))*x[1]
+        ref[(0, 3, 3, 0)]=(-0.832891289897+0.443448371512j)*x_ref[0]**o + ((0.27640994489-0.346503233946j))*x_ref[0] + ((-0.323922491006-0.104353762993j))*x_ref[1]**o + ((-0.262283285376-0.925689894305j))*x_ref[1]
+        arg[(0, 3, 3, 1)]=(0.589024191655-0.926561097097j)*x[0]**o + ((-0.333914630503-0.460767357857j))*x[0] + ((0.636752461447-0.893891334807j))*x[1]**o + ((0.463085101011-0.243360901354j))*x[1]
+        ref[(0, 3, 3, 1)]=(0.589024191655-0.926561097097j)*x_ref[0]**o + ((-0.333914630503-0.460767357857j))*x_ref[0] + ((0.636752461447-0.893891334807j))*x_ref[1]**o + ((0.463085101011-0.243360901354j))*x_ref[1]
+        arg[(0, 3, 3, 2)]=(0.175717254817+0.672683776634j)*x[0]**o + ((0.00467512048037-0.0562783694317j))*x[0] + ((0.330507124103+0.49828589j))*x[1]**o + ((-0.102321649089+0.122947683069j))*x[1]
+        ref[(0, 3, 3, 2)]=(0.175717254817+0.672683776634j)*x_ref[0]**o + ((0.00467512048037-0.0562783694317j))*x_ref[0] + ((0.330507124103+0.49828589j))*x_ref[1]**o + ((-0.102321649089+0.122947683069j))*x_ref[1]
+        arg[(0, 3, 3, 3)]=(0.290947427986+0.994281386263j)*x[0]**o + ((0.737781022883+0.200945881422j))*x[0] + ((-0.935594139337+0.118157299473j))*x[1]**o + ((-0.703619984576+0.154883483339j))*x[1]
+        ref[(0, 3, 3, 3)]=(0.290947427986+0.994281386263j)*x_ref[0]**o + ((0.737781022883+0.200945881422j))*x_ref[0] + ((-0.935594139337+0.118157299473j))*x_ref[1]**o + ((-0.703619984576+0.154883483339j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.181288279178-0.491562324836j)*x[0]**o + ((-0.654921668325+0.964099756673j))*x[0] + ((-0.329351428013-0.534398714243j))*x[1]**o + ((0.947776976564+0.0688096242432j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.181288279178-0.491562324836j)*x_ref[0]**o + ((-0.654921668325+0.964099756673j))*x_ref[0] + ((-0.329351428013-0.534398714243j))*x_ref[1]**o + ((0.947776976564+0.0688096242432j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.497905897834+0.0745109714893j)*x[0]**o + ((0.412676446376-0.0595616709705j))*x[0] + ((-0.968365960256+0.360174895163j))*x[1]**o + ((-0.332232535739-0.127651086768j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.497905897834+0.0745109714893j)*x_ref[0]**o + ((0.412676446376-0.0595616709705j))*x_ref[0] + ((-0.968365960256+0.360174895163j))*x_ref[1]**o + ((-0.332232535739-0.127651086768j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.315669900792+0.938591428203j)*x[0]**o + ((0.15178933968+0.386150378287j))*x[0] + ((-0.489130292709+0.969751286224j))*x[1]**o + ((-0.49465872235+0.718810547555j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.315669900792+0.938591428203j)*x_ref[0]**o + ((0.15178933968+0.386150378287j))*x_ref[0] + ((-0.489130292709+0.969751286224j))*x_ref[1]**o + ((-0.49465872235+0.718810547555j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.974023981823+0.726343577564j)*x[0]**o + ((0.178464108898-0.783003495126j))*x[0] + ((-0.841389868607-0.208133391727j))*x[1]**o + ((0.674052554404+0.0585581355101j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.974023981823+0.726343577564j)*x_ref[0]**o + ((0.178464108898-0.783003495126j))*x_ref[0] + ((-0.841389868607-0.208133391727j))*x_ref[1]**o + ((0.674052554404+0.0585581355101j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.717668990737+0.108115201109j)*x[0]**o + ((0.668535755684+0.580728078057j))*x[0] + ((0.150745486723-0.202297790017j))*x[1]**o + ((0.78336844994+0.505678604779j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.717668990737+0.108115201109j)*x_ref[0]**o + ((0.668535755684+0.580728078057j))*x_ref[0] + ((0.150745486723-0.202297790017j))*x_ref[1]**o + ((0.78336844994+0.505678604779j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.823091169756-0.456394250681j)*x[0]**o + ((-0.497437205947-0.434851154288j))*x[0] + ((-0.857977588686+0.542308467595j))*x[1]**o + ((0.679027209114-0.24537573015j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.823091169756-0.456394250681j)*x_ref[0]**o + ((-0.497437205947-0.434851154288j))*x_ref[0] + ((-0.857977588686+0.542308467595j))*x_ref[1]**o + ((0.679027209114-0.24537573015j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.336700245618+0.770550111962j)*x[0]**o + ((-0.0398100921183+0.569928047958j))*x[0] + ((-0.727315776443+0.265369556597j))*x[1]**o + ((0.866773070059+0.0886029382764j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.336700245618+0.770550111962j)*x_ref[0]**o + ((-0.0398100921183+0.569928047958j))*x_ref[0] + ((-0.727315776443+0.265369556597j))*x_ref[1]**o + ((0.866773070059+0.0886029382764j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.626314089415-0.893234425384j)*x[0]**o + ((-0.941481104056-0.774824759471j))*x[0] + ((-0.258337896894-0.899140987222j))*x[1]**o + ((0.253885273575+0.0468286423849j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.626314089415-0.893234425384j)*x_ref[0]**o + ((-0.941481104056-0.774824759471j))*x_ref[0] + ((-0.258337896894-0.899140987222j))*x_ref[1]**o + ((0.253885273575+0.0468286423849j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.657047110614+0.965616265212j)*x[0]**o + ((0.134327781763-0.636783712429j))*x[0] + ((0.4842293205+0.32018864537j))*x[1]**o + ((-0.978422829179+0.97347189997j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.657047110614+0.965616265212j)*x_ref[0]**o + ((0.134327781763-0.636783712429j))*x_ref[0] + ((0.4842293205+0.32018864537j))*x_ref[1]**o + ((-0.978422829179+0.97347189997j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.52030723779-0.322810440672j)*x[0]**o + ((-0.872172148921-0.696510876189j))*x[0] + ((-0.360562615559+0.30928264563j))*x[1]**o + ((0.576584154786+0.472966735422j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.52030723779-0.322810440672j)*x_ref[0]**o + ((-0.872172148921-0.696510876189j))*x_ref[0] + ((-0.360562615559+0.30928264563j))*x_ref[1]**o + ((0.576584154786+0.472966735422j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(-0.228627885737+0.749032448552j)*x[0]**o + ((-0.578534690407-0.603003677511j))*x[0] + ((0.608383110422-0.825674063353j))*x[1]**o + ((-0.676719732376+0.770435818642j))*x[1]
+        ref[(1, 0, 2, 2)]=(-0.228627885737+0.749032448552j)*x_ref[0]**o + ((-0.578534690407-0.603003677511j))*x_ref[0] + ((0.608383110422-0.825674063353j))*x_ref[1]**o + ((-0.676719732376+0.770435818642j))*x_ref[1]
+        arg[(1, 0, 2, 3)]=(-0.17614102329+0.699970030469j)*x[0]**o + ((0.273950801936+0.623844970732j))*x[0] + ((0.681483350142-0.242834670737j))*x[1]**o + ((-0.244339779548+0.333190553618j))*x[1]
+        ref[(1, 0, 2, 3)]=(-0.17614102329+0.699970030469j)*x_ref[0]**o + ((0.273950801936+0.623844970732j))*x_ref[0] + ((0.681483350142-0.242834670737j))*x_ref[1]**o + ((-0.244339779548+0.333190553618j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.528886664902+0.71309066406j)*x[0]**o + ((-0.836685668472-0.746748649664j))*x[0] + ((0.993328585254+0.927974689114j))*x[1]**o + ((-0.700197714818-0.985119225843j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.528886664902+0.71309066406j)*x_ref[0]**o + ((-0.836685668472-0.746748649664j))*x_ref[0] + ((0.993328585254+0.927974689114j))*x_ref[1]**o + ((-0.700197714818-0.985119225843j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.10248875059+0.717823255915j)*x[0]**o + ((0.566899550766-0.70490698711j))*x[0] + ((0.661239853957+0.896106367494j))*x[1]**o + ((0.568204153918+0.321815784967j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.10248875059+0.717823255915j)*x_ref[0]**o + ((0.566899550766-0.70490698711j))*x_ref[0] + ((0.661239853957+0.896106367494j))*x_ref[1]**o + ((0.568204153918+0.321815784967j))*x_ref[1]
+        arg[(1, 0, 3, 2)]=(-0.468562661052-0.757709581374j)*x[0]**o + ((0.684133194163-0.618889996618j))*x[0] + ((-0.887122736334-0.754701550263j))*x[1]**o + ((-0.200090046139-0.605607808297j))*x[1]
+        ref[(1, 0, 3, 2)]=(-0.468562661052-0.757709581374j)*x_ref[0]**o + ((0.684133194163-0.618889996618j))*x_ref[0] + ((-0.887122736334-0.754701550263j))*x_ref[1]**o + ((-0.200090046139-0.605607808297j))*x_ref[1]
+        arg[(1, 0, 3, 3)]=(-0.642600104735-0.700323858281j)*x[0]**o + ((-0.205273865456+0.903205388773j))*x[0] + ((0.202176642741-0.135101993656j))*x[1]**o + ((0.290823118707-0.996804352657j))*x[1]
+        ref[(1, 0, 3, 3)]=(-0.642600104735-0.700323858281j)*x_ref[0]**o + ((-0.205273865456+0.903205388773j))*x_ref[0] + ((0.202176642741-0.135101993656j))*x_ref[1]**o + ((0.290823118707-0.996804352657j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.227302231985+0.887166152929j)*x[0]**o + ((0.269831111685+0.550001768809j))*x[0] + ((-0.776920568481+0.233337139157j))*x[1]**o + ((0.509206255439+0.194166410294j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.227302231985+0.887166152929j)*x_ref[0]**o + ((0.269831111685+0.550001768809j))*x_ref[0] + ((-0.776920568481+0.233337139157j))*x_ref[1]**o + ((0.509206255439+0.194166410294j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.877463585474+0.205191330766j)*x[0]**o + ((0.267596984689+0.07680199544j))*x[0] + ((-0.216054683055-0.847462815022j))*x[1]**o + ((0.964434957704+0.879773819461j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.877463585474+0.205191330766j)*x_ref[0]**o + ((0.267596984689+0.07680199544j))*x_ref[0] + ((-0.216054683055-0.847462815022j))*x_ref[1]**o + ((0.964434957704+0.879773819461j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.549347600195-0.771788097296j)*x[0]**o + ((-0.984222368785+0.879781827988j))*x[0] + ((-0.729205802724+0.550916797738j))*x[1]**o + ((0.389792932306+0.268332592259j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.549347600195-0.771788097296j)*x_ref[0]**o + ((-0.984222368785+0.879781827988j))*x_ref[0] + ((-0.729205802724+0.550916797738j))*x_ref[1]**o + ((0.389792932306+0.268332592259j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.670650256486-0.676069568545j)*x[0]**o + ((-0.0121907976778+0.760473381939j))*x[0] + ((-0.514969082357-0.375862665361j))*x[1]**o + ((-0.219426506281+0.264696973637j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.670650256486-0.676069568545j)*x_ref[0]**o + ((-0.0121907976778+0.760473381939j))*x_ref[0] + ((-0.514969082357-0.375862665361j))*x_ref[1]**o + ((-0.219426506281+0.264696973637j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.658224064598-0.776731771578j)*x[0]**o + ((-0.387542001002-0.0908400036163j))*x[0] + ((0.0327747873459-0.249147195285j))*x[1]**o + ((0.641542793394+0.826833465959j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.658224064598-0.776731771578j)*x_ref[0]**o + ((-0.387542001002-0.0908400036163j))*x_ref[0] + ((0.0327747873459-0.249147195285j))*x_ref[1]**o + ((0.641542793394+0.826833465959j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.115787752968-0.437437345246j)*x[0]**o + ((-0.641398676385-0.99505989367j))*x[0] + ((-0.345710246745-0.102460195303j))*x[1]**o + ((0.47538853896-0.0400738822603j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.115787752968-0.437437345246j)*x_ref[0]**o + ((-0.641398676385-0.99505989367j))*x_ref[0] + ((-0.345710246745-0.102460195303j))*x_ref[1]**o + ((0.47538853896-0.0400738822603j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.933003158676+0.179766996879j)*x[0]**o + ((0.753710633272-0.998772059913j))*x[0] + ((0.700874628413-0.793691177011j))*x[1]**o + ((0.503224139304+0.939925145651j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.933003158676+0.179766996879j)*x_ref[0]**o + ((0.753710633272-0.998772059913j))*x_ref[0] + ((0.700874628413-0.793691177011j))*x_ref[1]**o + ((0.503224139304+0.939925145651j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(0.354195931812-0.0612438738565j)*x[0]**o + ((-0.577508742735+0.267774785434j))*x[0] + ((0.9784301957+0.929013124118j))*x[1]**o + ((-0.459759398528-0.714011791303j))*x[1]
+        ref[(1, 1, 1, 3)]=(0.354195931812-0.0612438738565j)*x_ref[0]**o + ((-0.577508742735+0.267774785434j))*x_ref[0] + ((0.9784301957+0.929013124118j))*x_ref[1]**o + ((-0.459759398528-0.714011791303j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.829941862455+0.924759703202j)*x[0]**o + ((0.078825775566+0.148062986467j))*x[0] + ((-0.487072026695-0.474274584534j))*x[1]**o + ((0.592581084817+0.965471011151j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.829941862455+0.924759703202j)*x_ref[0]**o + ((0.078825775566+0.148062986467j))*x_ref[0] + ((-0.487072026695-0.474274584534j))*x_ref[1]**o + ((0.592581084817+0.965471011151j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.216289931879+0.617256693536j)*x[0]**o + ((0.722986099593-0.537823691292j))*x[0] + ((-0.351422034647+0.323105243959j))*x[1]**o + ((-0.497519171411-0.300550465603j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.216289931879+0.617256693536j)*x_ref[0]**o + ((0.722986099593-0.537823691292j))*x_ref[0] + ((-0.351422034647+0.323105243959j))*x_ref[1]**o + ((-0.497519171411-0.300550465603j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(0.598471094643+0.391408454284j)*x[0]**o + ((0.786002655337+0.682593378305j))*x[0] + ((-0.424472561795+0.237453662743j))*x[1]**o + ((0.548271146536+0.0072433866688j))*x[1]
+        ref[(1, 1, 2, 2)]=(0.598471094643+0.391408454284j)*x_ref[0]**o + ((0.786002655337+0.682593378305j))*x_ref[0] + ((-0.424472561795+0.237453662743j))*x_ref[1]**o + ((0.548271146536+0.0072433866688j))*x_ref[1]
+        arg[(1, 1, 2, 3)]=(-0.435491248237+0.938503379067j)*x[0]**o + ((-0.43545716107+0.140575525523j))*x[0] + ((-0.791275875519-0.774880376356j))*x[1]**o + ((0.391383353782-0.497066628336j))*x[1]
+        ref[(1, 1, 2, 3)]=(-0.435491248237+0.938503379067j)*x_ref[0]**o + ((-0.43545716107+0.140575525523j))*x_ref[0] + ((-0.791275875519-0.774880376356j))*x_ref[1]**o + ((0.391383353782-0.497066628336j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(-0.879889780472+0.684212130446j)*x[0]**o + ((0.194752269045-0.752479923233j))*x[0] + ((-0.436354327937-0.264447769647j))*x[1]**o + ((-0.588360222672-0.340511637538j))*x[1]
+        ref[(1, 1, 3, 0)]=(-0.879889780472+0.684212130446j)*x_ref[0]**o + ((0.194752269045-0.752479923233j))*x_ref[0] + ((-0.436354327937-0.264447769647j))*x_ref[1]**o + ((-0.588360222672-0.340511637538j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.0619675553892-0.541907228256j)*x[0]**o + ((0.894820460787+0.195653812095j))*x[0] + ((-0.14476707031+0.726777003426j))*x[1]**o + ((0.251511975765+0.959069104862j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.0619675553892-0.541907228256j)*x_ref[0]**o + ((0.894820460787+0.195653812095j))*x_ref[0] + ((-0.14476707031+0.726777003426j))*x_ref[1]**o + ((0.251511975765+0.959069104862j))*x_ref[1]
+        arg[(1, 1, 3, 2)]=(-0.749464239102-0.952149490328j)*x[0]**o + ((0.343865741551+0.0202544657583j))*x[0] + ((0.384977120739-0.0420294537585j))*x[1]**o + ((-0.507973554532+0.979020093369j))*x[1]
+        ref[(1, 1, 3, 2)]=(-0.749464239102-0.952149490328j)*x_ref[0]**o + ((0.343865741551+0.0202544657583j))*x_ref[0] + ((0.384977120739-0.0420294537585j))*x_ref[1]**o + ((-0.507973554532+0.979020093369j))*x_ref[1]
+        arg[(1, 1, 3, 3)]=(0.159916550626-0.183490426332j)*x[0]**o + ((0.70150941745+0.600696132628j))*x[0] + ((-0.677724274485-0.573371635323j))*x[1]**o + ((0.280865963414+0.766183218483j))*x[1]
+        ref[(1, 1, 3, 3)]=(0.159916550626-0.183490426332j)*x_ref[0]**o + ((0.70150941745+0.600696132628j))*x_ref[0] + ((-0.677724274485-0.573371635323j))*x_ref[1]**o + ((0.280865963414+0.766183218483j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.636873840941+0.260410291394j)*x[0]**o + ((-0.272674249307-0.705860259852j))*x[0] + ((0.152698466562-0.604568339047j))*x[1]**o + ((-0.622144918039-0.0751970023182j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.636873840941+0.260410291394j)*x_ref[0]**o + ((-0.272674249307-0.705860259852j))*x_ref[0] + ((0.152698466562-0.604568339047j))*x_ref[1]**o + ((-0.622144918039-0.0751970023182j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.848401062195+0.304757559276j)*x[0]**o + ((0.469163100743+0.359897589577j))*x[0] + ((-0.492516797137-0.906461386576j))*x[1]**o + ((0.971053954795-0.6138576277j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.848401062195+0.304757559276j)*x_ref[0]**o + ((0.469163100743+0.359897589577j))*x_ref[0] + ((-0.492516797137-0.906461386576j))*x_ref[1]**o + ((0.971053954795-0.6138576277j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(-0.182848870674-0.795501911914j)*x[0]**o + ((-0.439347664189-0.281794690718j))*x[0] + ((-0.551970769825-0.935594041395j))*x[1]**o + ((0.627574800119-0.628461865618j))*x[1]
+        ref[(1, 2, 0, 2)]=(-0.182848870674-0.795501911914j)*x_ref[0]**o + ((-0.439347664189-0.281794690718j))*x_ref[0] + ((-0.551970769825-0.935594041395j))*x_ref[1]**o + ((0.627574800119-0.628461865618j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(-0.649931753463-0.0432195393203j)*x[0]**o + ((0.477123680281+0.115661585785j))*x[0] + ((0.237007527857-0.167020344346j))*x[1]**o + ((0.135855621355-0.706202600729j))*x[1]
+        ref[(1, 2, 0, 3)]=(-0.649931753463-0.0432195393203j)*x_ref[0]**o + ((0.477123680281+0.115661585785j))*x_ref[0] + ((0.237007527857-0.167020344346j))*x_ref[1]**o + ((0.135855621355-0.706202600729j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.905298161938-0.184804787113j)*x[0]**o + ((-0.542955755304+0.104781995428j))*x[0] + ((-0.570033233092+0.116078559672j))*x[1]**o + ((-0.874817473807+0.884087177379j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.905298161938-0.184804787113j)*x_ref[0]**o + ((-0.542955755304+0.104781995428j))*x_ref[0] + ((-0.570033233092+0.116078559672j))*x_ref[1]**o + ((-0.874817473807+0.884087177379j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.0208289284309-0.675375616734j)*x[0]**o + ((-0.3980677224+0.855962623095j))*x[0] + ((0.495178857221+0.816984671801j))*x[1]**o + ((-0.364817819817+0.746627965811j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.0208289284309-0.675375616734j)*x_ref[0]**o + ((-0.3980677224+0.855962623095j))*x_ref[0] + ((0.495178857221+0.816984671801j))*x_ref[1]**o + ((-0.364817819817+0.746627965811j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.575289776197-0.83942037929j)*x[0]**o + ((-0.928118173152-0.521196993171j))*x[0] + ((0.221657330251-0.47738695111j))*x[1]**o + ((-0.851737195677+0.926350487173j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.575289776197-0.83942037929j)*x_ref[0]**o + ((-0.928118173152-0.521196993171j))*x_ref[0] + ((0.221657330251-0.47738695111j))*x_ref[1]**o + ((-0.851737195677+0.926350487173j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(0.665192864595-0.618536864399j)*x[0]**o + ((0.0243259532596+0.498461762676j))*x[0] + ((-0.150298215331-0.747626503991j))*x[1]**o + ((-0.508497864241+0.400802044149j))*x[1]
+        ref[(1, 2, 1, 3)]=(0.665192864595-0.618536864399j)*x_ref[0]**o + ((0.0243259532596+0.498461762676j))*x_ref[0] + ((-0.150298215331-0.747626503991j))*x_ref[1]**o + ((-0.508497864241+0.400802044149j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.204754487297-0.235645949028j)*x[0]**o + ((-0.219885904028-0.812334113355j))*x[0] + ((0.435798953514+0.156883181455j))*x[1]**o + ((-0.663624443433+0.320670079323j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.204754487297-0.235645949028j)*x_ref[0]**o + ((-0.219885904028-0.812334113355j))*x_ref[0] + ((0.435798953514+0.156883181455j))*x_ref[1]**o + ((-0.663624443433+0.320670079323j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(0.25441781303+0.264654588331j)*x[0]**o + ((0.245796446763-0.525303722005j))*x[0] + ((-0.034349851435+0.603070728598j))*x[1]**o + ((0.630920163989+0.0864072011867j))*x[1]
+        ref[(1, 2, 2, 1)]=(0.25441781303+0.264654588331j)*x_ref[0]**o + ((0.245796446763-0.525303722005j))*x_ref[0] + ((-0.034349851435+0.603070728598j))*x_ref[1]**o + ((0.630920163989+0.0864072011867j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(-0.904353513813-0.68974724635j)*x[0]**o + ((-0.0402380264213+0.793249663623j))*x[0] + ((-0.205541974352+0.913230524082j))*x[1]**o + ((-0.685991062879-0.579852590401j))*x[1]
+        ref[(1, 2, 2, 2)]=(-0.904353513813-0.68974724635j)*x_ref[0]**o + ((-0.0402380264213+0.793249663623j))*x_ref[0] + ((-0.205541974352+0.913230524082j))*x_ref[1]**o + ((-0.685991062879-0.579852590401j))*x_ref[1]
+        arg[(1, 2, 2, 3)]=(-0.0172732968687+0.577925942491j)*x[0]**o + ((0.566699575355+0.881026872555j))*x[0] + ((-0.855165936131+0.753348940692j))*x[1]**o + ((0.47316144008+0.195908351105j))*x[1]
+        ref[(1, 2, 2, 3)]=(-0.0172732968687+0.577925942491j)*x_ref[0]**o + ((0.566699575355+0.881026872555j))*x_ref[0] + ((-0.855165936131+0.753348940692j))*x_ref[1]**o + ((0.47316144008+0.195908351105j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(-0.916081583649-0.805670108441j)*x[0]**o + ((0.92975077576+0.00312513977995j))*x[0] + ((-0.907044192604-0.0297593029665j))*x[1]**o + ((0.315012245332-0.488349946863j))*x[1]
+        ref[(1, 2, 3, 0)]=(-0.916081583649-0.805670108441j)*x_ref[0]**o + ((0.92975077576+0.00312513977995j))*x_ref[0] + ((-0.907044192604-0.0297593029665j))*x_ref[1]**o + ((0.315012245332-0.488349946863j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(0.859528877963+0.985549360931j)*x[0]**o + ((-0.100380161218-0.733872212439j))*x[0] + ((0.903908493331+0.973085744057j))*x[1]**o + ((-0.261406763888-0.00941417243069j))*x[1]
+        ref[(1, 2, 3, 1)]=(0.859528877963+0.985549360931j)*x_ref[0]**o + ((-0.100380161218-0.733872212439j))*x_ref[0] + ((0.903908493331+0.973085744057j))*x_ref[1]**o + ((-0.261406763888-0.00941417243069j))*x_ref[1]
+        arg[(1, 2, 3, 2)]=(0.972247328181-0.35104827231j)*x[0]**o + ((0.411277782273+0.141598427134j))*x[0] + ((-0.243271605745+0.290059815315j))*x[1]**o + ((-0.66881198429-0.605424331487j))*x[1]
+        ref[(1, 2, 3, 2)]=(0.972247328181-0.35104827231j)*x_ref[0]**o + ((0.411277782273+0.141598427134j))*x_ref[0] + ((-0.243271605745+0.290059815315j))*x_ref[1]**o + ((-0.66881198429-0.605424331487j))*x_ref[1]
+        arg[(1, 2, 3, 3)]=(-0.884442392461-0.122262817478j)*x[0]**o + ((0.692555280167+0.644605635143j))*x[0] + ((0.485805226916+0.112578791348j))*x[1]**o + ((0.549494298747-0.984819156093j))*x[1]
+        ref[(1, 2, 3, 3)]=(-0.884442392461-0.122262817478j)*x_ref[0]**o + ((0.692555280167+0.644605635143j))*x_ref[0] + ((0.485805226916+0.112578791348j))*x_ref[1]**o + ((0.549494298747-0.984819156093j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.22130355095-0.519043232623j)*x[0]**o + ((0.796957653735+0.148024909553j))*x[0] + ((0.214879056474+0.684492431409j))*x[1]**o + ((0.613543657475+0.601111593491j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.22130355095-0.519043232623j)*x_ref[0]**o + ((0.796957653735+0.148024909553j))*x_ref[0] + ((0.214879056474+0.684492431409j))*x_ref[1]**o + ((0.613543657475+0.601111593491j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.974076151433+0.0021409818072j)*x[0]**o + ((0.401217458575+0.772022700148j))*x[0] + ((0.804971675808-0.582272697764j))*x[1]**o + ((0.535911612768+0.708469065946j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.974076151433+0.0021409818072j)*x_ref[0]**o + ((0.401217458575+0.772022700148j))*x_ref[0] + ((0.804971675808-0.582272697764j))*x_ref[1]**o + ((0.535911612768+0.708469065946j))*x_ref[1]
+        arg[(1, 3, 0, 2)]=(0.632185961289+0.530993575142j)*x[0]**o + ((0.80377122806-0.0699965522673j))*x[0] + ((0.904405878944-0.754117429996j))*x[1]**o + ((0.952214129384+0.377276878743j))*x[1]
+        ref[(1, 3, 0, 2)]=(0.632185961289+0.530993575142j)*x_ref[0]**o + ((0.80377122806-0.0699965522673j))*x_ref[0] + ((0.904405878944-0.754117429996j))*x_ref[1]**o + ((0.952214129384+0.377276878743j))*x_ref[1]
+        arg[(1, 3, 0, 3)]=(0.529590973529+0.943936956897j)*x[0]**o + ((-0.706098871726-0.266271477872j))*x[0] + ((0.714293957867-0.233208293829j))*x[1]**o + ((0.17186131837+0.161253424809j))*x[1]
+        ref[(1, 3, 0, 3)]=(0.529590973529+0.943936956897j)*x_ref[0]**o + ((-0.706098871726-0.266271477872j))*x_ref[0] + ((0.714293957867-0.233208293829j))*x_ref[1]**o + ((0.17186131837+0.161253424809j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.692828554845+0.981030350029j)*x[0]**o + ((0.388084772494+0.923675083273j))*x[0] + ((-0.721281397848-0.391724721977j))*x[1]**o + ((0.542287648611+0.0926747199474j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.692828554845+0.981030350029j)*x_ref[0]**o + ((0.388084772494+0.923675083273j))*x_ref[0] + ((-0.721281397848-0.391724721977j))*x_ref[1]**o + ((0.542287648611+0.0926747199474j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.72399403529-0.691307163202j)*x[0]**o + ((0.266616255231+0.184261279714j))*x[0] + ((-0.174100284547+0.705618128167j))*x[1]**o + ((-0.0418641261751-0.0351932588028j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.72399403529-0.691307163202j)*x_ref[0]**o + ((0.266616255231+0.184261279714j))*x_ref[0] + ((-0.174100284547+0.705618128167j))*x_ref[1]**o + ((-0.0418641261751-0.0351932588028j))*x_ref[1]
+        arg[(1, 3, 1, 2)]=(0.496359722414-0.0236903395777j)*x[0]**o + ((0.545472297866+0.134345691081j))*x[0] + ((0.473708019536-0.823713804311j))*x[1]**o + ((-0.587808453515-0.768298058272j))*x[1]
+        ref[(1, 3, 1, 2)]=(0.496359722414-0.0236903395777j)*x_ref[0]**o + ((0.545472297866+0.134345691081j))*x_ref[0] + ((0.473708019536-0.823713804311j))*x_ref[1]**o + ((-0.587808453515-0.768298058272j))*x_ref[1]
+        arg[(1, 3, 1, 3)]=(-0.647111948192-0.221613301787j)*x[0]**o + ((-0.056868215165+0.0478632355361j))*x[0] + ((-0.948492398238+0.885158477721j))*x[1]**o + ((-0.660058039971-0.838543377988j))*x[1]
+        ref[(1, 3, 1, 3)]=(-0.647111948192-0.221613301787j)*x_ref[0]**o + ((-0.056868215165+0.0478632355361j))*x_ref[0] + ((-0.948492398238+0.885158477721j))*x_ref[1]**o + ((-0.660058039971-0.838543377988j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(0.960870195722+0.30311716111j)*x[0]**o + ((0.372575465706-0.501171388939j))*x[0] + ((-0.475078757307+0.999064232991j))*x[1]**o + ((-0.955493637382+0.941098579371j))*x[1]
+        ref[(1, 3, 2, 0)]=(0.960870195722+0.30311716111j)*x_ref[0]**o + ((0.372575465706-0.501171388939j))*x_ref[0] + ((-0.475078757307+0.999064232991j))*x_ref[1]**o + ((-0.955493637382+0.941098579371j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(-0.507332326318-0.465257016495j)*x[0]**o + ((0.016633732761+0.196763349767j))*x[0] + ((0.181359195324+0.318858155109j))*x[1]**o + ((-0.926394517083-0.549098700906j))*x[1]
+        ref[(1, 3, 2, 1)]=(-0.507332326318-0.465257016495j)*x_ref[0]**o + ((0.016633732761+0.196763349767j))*x_ref[0] + ((0.181359195324+0.318858155109j))*x_ref[1]**o + ((-0.926394517083-0.549098700906j))*x_ref[1]
+        arg[(1, 3, 2, 2)]=(-0.0288803610833+0.888674420747j)*x[0]**o + ((0.556277730967+0.577240641735j))*x[0] + ((0.75188534214+0.344351802371j))*x[1]**o + ((-0.335047273205-0.246346305738j))*x[1]
+        ref[(1, 3, 2, 2)]=(-0.0288803610833+0.888674420747j)*x_ref[0]**o + ((0.556277730967+0.577240641735j))*x_ref[0] + ((0.75188534214+0.344351802371j))*x_ref[1]**o + ((-0.335047273205-0.246346305738j))*x_ref[1]
+        arg[(1, 3, 2, 3)]=(0.993399308952+0.594109344007j)*x[0]**o + ((-0.711207799299-0.440218413022j))*x[0] + ((0.821288068378+0.604874440985j))*x[1]**o + ((0.0569344599184-0.605282966425j))*x[1]
+        ref[(1, 3, 2, 3)]=(0.993399308952+0.594109344007j)*x_ref[0]**o + ((-0.711207799299-0.440218413022j))*x_ref[0] + ((0.821288068378+0.604874440985j))*x_ref[1]**o + ((0.0569344599184-0.605282966425j))*x_ref[1]
+        arg[(1, 3, 3, 0)]=(0.0884423802631-0.943952350266j)*x[0]**o + ((0.97753696291+0.960655620069j))*x[0] + ((-0.112963283812-0.301497165067j))*x[1]**o + ((0.907441704979-0.798232689894j))*x[1]
+        ref[(1, 3, 3, 0)]=(0.0884423802631-0.943952350266j)*x_ref[0]**o + ((0.97753696291+0.960655620069j))*x_ref[0] + ((-0.112963283812-0.301497165067j))*x_ref[1]**o + ((0.907441704979-0.798232689894j))*x_ref[1]
+        arg[(1, 3, 3, 1)]=(0.229360410114+0.561731081056j)*x[0]**o + ((-0.379715098842-0.415414777189j))*x[0] + ((-0.735714796396-0.96144261529j))*x[1]**o + ((0.159713573416-0.197338225796j))*x[1]
+        ref[(1, 3, 3, 1)]=(0.229360410114+0.561731081056j)*x_ref[0]**o + ((-0.379715098842-0.415414777189j))*x_ref[0] + ((-0.735714796396-0.96144261529j))*x_ref[1]**o + ((0.159713573416-0.197338225796j))*x_ref[1]
+        arg[(1, 3, 3, 2)]=(-0.230145322979+0.0964353536371j)*x[0]**o + ((-0.820991915317+0.148024594153j))*x[0] + ((0.357905645199-0.71959781632j))*x[1]**o + ((-0.563592969034-0.529308102981j))*x[1]
+        ref[(1, 3, 3, 2)]=(-0.230145322979+0.0964353536371j)*x_ref[0]**o + ((-0.820991915317+0.148024594153j))*x_ref[0] + ((0.357905645199-0.71959781632j))*x_ref[1]**o + ((-0.563592969034-0.529308102981j))*x_ref[1]
+        arg[(1, 3, 3, 3)]=(0.365751980906+0.755767195392j)*x[0]**o + ((0.416992381125+0.243103838428j))*x[0] + ((0.756152244164+0.987029988534j))*x[1]**o + ((-0.0452205671977-0.370006558733j))*x[1]
+        ref[(1, 3, 3, 3)]=(0.365751980906+0.755767195392j)*x_ref[0]**o + ((0.416992381125+0.243103838428j))*x_ref[0] + ((0.756152244164+0.987029988534j))*x_ref[1]**o + ((-0.0452205671977-0.370006558733j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.74885119743+0.636862742055j)*x[0]**o + ((-0.0694046241919-0.163615228641j))*x[0] + ((-0.407824742607+0.408202435913j))*x[1]**o + ((-0.737278469101-0.794831921707j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.74885119743+0.636862742055j)*x_ref[0]**o + ((-0.0694046241919-0.163615228641j))*x_ref[0] + ((-0.407824742607+0.408202435913j))*x_ref[1]**o + ((-0.737278469101-0.794831921707j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.784634947619-0.25949287143j)*x[0]**o + ((-0.816065233966-0.594916781879j))*x[0] + ((0.718930858083+0.768087421065j))*x[1]**o + ((0.730864862498+0.998932229506j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.784634947619-0.25949287143j)*x_ref[0]**o + ((-0.816065233966-0.594916781879j))*x_ref[0] + ((0.718930858083+0.768087421065j))*x_ref[1]**o + ((0.730864862498+0.998932229506j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(-0.108138816871+0.107495056478j)*x[0]**o + ((0.954563447757-0.526080967365j))*x[0] + ((-0.728889773982-0.573491782352j))*x[1]**o + ((-0.614740429896-0.231491762597j))*x[1]
+        ref[(2, 0, 0, 2)]=(-0.108138816871+0.107495056478j)*x_ref[0]**o + ((0.954563447757-0.526080967365j))*x_ref[0] + ((-0.728889773982-0.573491782352j))*x_ref[1]**o + ((-0.614740429896-0.231491762597j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.795076185233-0.102207482555j)*x[0]**o + ((-0.465282745489+0.162355011846j))*x[0] + ((0.521954381913+0.410694654867j))*x[1]**o + ((-0.958961461674-0.407975687386j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.795076185233-0.102207482555j)*x_ref[0]**o + ((-0.465282745489+0.162355011846j))*x_ref[0] + ((0.521954381913+0.410694654867j))*x_ref[1]**o + ((-0.958961461674-0.407975687386j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.82569753816+0.293799188319j)*x[0]**o + ((0.471675084594-0.17956251451j))*x[0] + ((-0.51420273712-0.606575920619j))*x[1]**o + ((0.326971697465-0.940217706248j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.82569753816+0.293799188319j)*x_ref[0]**o + ((0.471675084594-0.17956251451j))*x_ref[0] + ((-0.51420273712-0.606575920619j))*x_ref[1]**o + ((0.326971697465-0.940217706248j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.72290800756+0.795547993606j)*x[0]**o + ((-0.30302576457-0.794462879554j))*x[0] + ((-0.843936785013+0.211060545004j))*x[1]**o + ((0.305809222315+0.577206254071j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.72290800756+0.795547993606j)*x_ref[0]**o + ((-0.30302576457-0.794462879554j))*x_ref[0] + ((-0.843936785013+0.211060545004j))*x_ref[1]**o + ((0.305809222315+0.577206254071j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.133313058554+0.828908822892j)*x[0]**o + ((-0.712586653399+0.00723711223294j))*x[0] + ((0.528518081081+0.0749527630033j))*x[1]**o + ((0.0650392835786+0.0677478194905j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.133313058554+0.828908822892j)*x_ref[0]**o + ((-0.712586653399+0.00723711223294j))*x_ref[0] + ((0.528518081081+0.0749527630033j))*x_ref[1]**o + ((0.0650392835786+0.0677478194905j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.219925459085-0.660287690763j)*x[0]**o + ((0.0278280125276-0.69164944933j))*x[0] + ((-0.793927247828-0.205744424681j))*x[1]**o + ((0.913664328505-0.694422631961j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.219925459085-0.660287690763j)*x_ref[0]**o + ((0.0278280125276-0.69164944933j))*x_ref[0] + ((-0.793927247828-0.205744424681j))*x_ref[1]**o + ((0.913664328505-0.694422631961j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.539020571847+0.306472951119j)*x[0]**o + ((0.0812978395126-0.17721622874j))*x[0] + ((0.176609503428+0.312340138027j))*x[1]**o + ((-0.144057425899-0.307499679697j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.539020571847+0.306472951119j)*x_ref[0]**o + ((0.0812978395126-0.17721622874j))*x_ref[0] + ((0.176609503428+0.312340138027j))*x_ref[1]**o + ((-0.144057425899-0.307499679697j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.050249119734+0.861578442319j)*x[0]**o + ((-0.855185799029+0.422638757954j))*x[0] + ((-0.96695635963-0.0361863309799j))*x[1]**o + ((-0.441306608074+0.65969732827j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.050249119734+0.861578442319j)*x_ref[0]**o + ((-0.855185799029+0.422638757954j))*x_ref[0] + ((-0.96695635963-0.0361863309799j))*x_ref[1]**o + ((-0.441306608074+0.65969732827j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(-0.347226624858-0.706772451888j)*x[0]**o + ((-0.952333778392-0.786521322029j))*x[0] + ((-0.179695425314+0.446027164734j))*x[1]**o + ((-0.869400591299+0.941789564534j))*x[1]
+        ref[(2, 0, 2, 2)]=(-0.347226624858-0.706772451888j)*x_ref[0]**o + ((-0.952333778392-0.786521322029j))*x_ref[0] + ((-0.179695425314+0.446027164734j))*x_ref[1]**o + ((-0.869400591299+0.941789564534j))*x_ref[1]
+        arg[(2, 0, 2, 3)]=(-0.37483204586+0.678243232405j)*x[0]**o + ((0.563267250094+0.273107297133j))*x[0] + ((-0.516132549871-0.691936665435j))*x[1]**o + ((0.143403973951+0.154218177864j))*x[1]
+        ref[(2, 0, 2, 3)]=(-0.37483204586+0.678243232405j)*x_ref[0]**o + ((0.563267250094+0.273107297133j))*x_ref[0] + ((-0.516132549871-0.691936665435j))*x_ref[1]**o + ((0.143403973951+0.154218177864j))*x_ref[1]
+        arg[(2, 0, 3, 0)]=(0.768473904902-0.0742978688829j)*x[0]**o + ((-0.50807765068+0.789959200002j))*x[0] + ((0.677189026949+0.348974624493j))*x[1]**o + ((0.0636850471442-0.319207319786j))*x[1]
+        ref[(2, 0, 3, 0)]=(0.768473904902-0.0742978688829j)*x_ref[0]**o + ((-0.50807765068+0.789959200002j))*x_ref[0] + ((0.677189026949+0.348974624493j))*x_ref[1]**o + ((0.0636850471442-0.319207319786j))*x_ref[1]
+        arg[(2, 0, 3, 1)]=(-0.258180937636+0.254698216305j)*x[0]**o + ((-0.818314597667-0.23548299298j))*x[0] + ((0.515640353927+0.49504535891j))*x[1]**o + ((-0.198263107521+0.923514566675j))*x[1]
+        ref[(2, 0, 3, 1)]=(-0.258180937636+0.254698216305j)*x_ref[0]**o + ((-0.818314597667-0.23548299298j))*x_ref[0] + ((0.515640353927+0.49504535891j))*x_ref[1]**o + ((-0.198263107521+0.923514566675j))*x_ref[1]
+        arg[(2, 0, 3, 2)]=(-0.721761604989-0.528479291915j)*x[0]**o + ((-0.688308159007+0.798156740914j))*x[0] + ((0.839667816521+0.00852307469338j))*x[1]**o + ((0.637948314279+0.947535183809j))*x[1]
+        ref[(2, 0, 3, 2)]=(-0.721761604989-0.528479291915j)*x_ref[0]**o + ((-0.688308159007+0.798156740914j))*x_ref[0] + ((0.839667816521+0.00852307469338j))*x_ref[1]**o + ((0.637948314279+0.947535183809j))*x_ref[1]
+        arg[(2, 0, 3, 3)]=(0.346361988079-0.984224391922j)*x[0]**o + ((0.977013997378-0.294139691894j))*x[0] + ((-0.652904828164+0.0417851572768j))*x[1]**o + ((0.286200205942-0.940127957298j))*x[1]
+        ref[(2, 0, 3, 3)]=(0.346361988079-0.984224391922j)*x_ref[0]**o + ((0.977013997378-0.294139691894j))*x_ref[0] + ((-0.652904828164+0.0417851572768j))*x_ref[1]**o + ((0.286200205942-0.940127957298j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.117605291382-0.171684116769j)*x[0]**o + ((0.862554899076+0.719050743762j))*x[0] + ((-0.0950705389502+0.0709468579907j))*x[1]**o + ((0.0182347706223+0.930671475503j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.117605291382-0.171684116769j)*x_ref[0]**o + ((0.862554899076+0.719050743762j))*x_ref[0] + ((-0.0950705389502+0.0709468579907j))*x_ref[1]**o + ((0.0182347706223+0.930671475503j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.309073801246+0.724595984318j)*x[0]**o + ((-0.237072540376-0.50096502803j))*x[0] + ((-0.702596097854+0.611243308258j))*x[1]**o + ((0.990522101029-0.493975039583j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.309073801246+0.724595984318j)*x_ref[0]**o + ((-0.237072540376-0.50096502803j))*x_ref[0] + ((-0.702596097854+0.611243308258j))*x_ref[1]**o + ((0.990522101029-0.493975039583j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.979111982504-0.733611746307j)*x[0]**o + ((0.637960568317+0.724945098254j))*x[0] + ((-0.610833933017-0.346512827401j))*x[1]**o + ((-0.636436383258+0.524816952658j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.979111982504-0.733611746307j)*x_ref[0]**o + ((0.637960568317+0.724945098254j))*x_ref[0] + ((-0.610833933017-0.346512827401j))*x_ref[1]**o + ((-0.636436383258+0.524816952658j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.14736466705-0.250188455663j)*x[0]**o + ((0.663054327233+0.329374729815j))*x[0] + ((-0.0374542631466-0.72727861568j))*x[1]**o + ((0.570559481464-0.319291152909j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.14736466705-0.250188455663j)*x_ref[0]**o + ((0.663054327233+0.329374729815j))*x_ref[0] + ((-0.0374542631466-0.72727861568j))*x_ref[1]**o + ((0.570559481464-0.319291152909j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.722992025534-0.19216740136j)*x[0]**o + ((0.139105312108-0.155038231958j))*x[0] + ((0.128704782099-0.374078511401j))*x[1]**o + ((-0.913252125072+0.641876828287j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.722992025534-0.19216740136j)*x_ref[0]**o + ((0.139105312108-0.155038231958j))*x_ref[0] + ((0.128704782099-0.374078511401j))*x_ref[1]**o + ((-0.913252125072+0.641876828287j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.670550355298+0.548612818015j)*x[0]**o + ((0.430925341862+0.580463905326j))*x[0] + ((0.844060505115-0.248368913804j))*x[1]**o + ((0.700462656264+0.601156335211j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.670550355298+0.548612818015j)*x_ref[0]**o + ((0.430925341862+0.580463905326j))*x_ref[0] + ((0.844060505115-0.248368913804j))*x_ref[1]**o + ((0.700462656264+0.601156335211j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.822496635596-0.661763426754j)*x[0]**o + ((-0.036070800432+0.213739134939j))*x[0] + ((-0.0408994227474-0.147013839787j))*x[1]**o + ((-0.491733932559+0.459359016559j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.822496635596-0.661763426754j)*x_ref[0]**o + ((-0.036070800432+0.213739134939j))*x_ref[0] + ((-0.0408994227474-0.147013839787j))*x_ref[1]**o + ((-0.491733932559+0.459359016559j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(-0.844396594114+0.894284644525j)*x[0]**o + ((-0.33749213926+0.1493523566j))*x[0] + ((0.594634992668-0.2182059253j))*x[1]**o + ((0.459369456775-0.627454201948j))*x[1]
+        ref[(2, 1, 1, 3)]=(-0.844396594114+0.894284644525j)*x_ref[0]**o + ((-0.33749213926+0.1493523566j))*x_ref[0] + ((0.594634992668-0.2182059253j))*x_ref[1]**o + ((0.459369456775-0.627454201948j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.440682266089-0.796564388182j)*x[0]**o + ((0.359857355609-0.0218289542962j))*x[0] + ((0.424091762719-0.0815252735619j))*x[1]**o + ((0.844982380438+0.264597453228j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.440682266089-0.796564388182j)*x_ref[0]**o + ((0.359857355609-0.0218289542962j))*x_ref[0] + ((0.424091762719-0.0815252735619j))*x_ref[1]**o + ((0.844982380438+0.264597453228j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.14141205341+0.0465890453846j)*x[0]**o + ((0.454998358292-0.664116844579j))*x[0] + ((0.23048808852+0.340516421761j))*x[1]**o + ((-0.763236438924-0.555830395028j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.14141205341+0.0465890453846j)*x_ref[0]**o + ((0.454998358292-0.664116844579j))*x_ref[0] + ((0.23048808852+0.340516421761j))*x_ref[1]**o + ((-0.763236438924-0.555830395028j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(-0.19989723251+0.536894586443j)*x[0]**o + ((0.904571627297+0.252769145507j))*x[0] + ((0.48262151982+0.745498179472j))*x[1]**o + ((-0.653831900422+0.540604166213j))*x[1]
+        ref[(2, 1, 2, 2)]=(-0.19989723251+0.536894586443j)*x_ref[0]**o + ((0.904571627297+0.252769145507j))*x_ref[0] + ((0.48262151982+0.745498179472j))*x_ref[1]**o + ((-0.653831900422+0.540604166213j))*x_ref[1]
+        arg[(2, 1, 2, 3)]=(-0.174092323395+0.82357160075j)*x[0]**o + ((-0.161739684476-0.356392260773j))*x[0] + ((0.778367146919-0.220258913004j))*x[1]**o + ((-0.605729381112+0.549050655704j))*x[1]
+        ref[(2, 1, 2, 3)]=(-0.174092323395+0.82357160075j)*x_ref[0]**o + ((-0.161739684476-0.356392260773j))*x_ref[0] + ((0.778367146919-0.220258913004j))*x_ref[1]**o + ((-0.605729381112+0.549050655704j))*x_ref[1]
+        arg[(2, 1, 3, 0)]=(0.874755109722-0.714725950428j)*x[0]**o + ((-0.752732896947-0.663380302443j))*x[0] + ((-0.512087806204-0.843644965246j))*x[1]**o + ((-0.639999547286+0.455613167037j))*x[1]
+        ref[(2, 1, 3, 0)]=(0.874755109722-0.714725950428j)*x_ref[0]**o + ((-0.752732896947-0.663380302443j))*x_ref[0] + ((-0.512087806204-0.843644965246j))*x_ref[1]**o + ((-0.639999547286+0.455613167037j))*x_ref[1]
+        arg[(2, 1, 3, 1)]=(-0.947822882103+0.418877990231j)*x[0]**o + ((-0.705935539194-0.974383868773j))*x[0] + ((-0.542478287132-0.0655482951906j))*x[1]**o + ((-0.492633445529-0.357157065824j))*x[1]
+        ref[(2, 1, 3, 1)]=(-0.947822882103+0.418877990231j)*x_ref[0]**o + ((-0.705935539194-0.974383868773j))*x_ref[0] + ((-0.542478287132-0.0655482951906j))*x_ref[1]**o + ((-0.492633445529-0.357157065824j))*x_ref[1]
+        arg[(2, 1, 3, 2)]=(-0.135172012889+0.181122167738j)*x[0]**o + ((0.389764650845-0.769640361022j))*x[0] + ((0.424538702619-0.189609515725j))*x[1]**o + ((0.228600465704+0.164683442078j))*x[1]
+        ref[(2, 1, 3, 2)]=(-0.135172012889+0.181122167738j)*x_ref[0]**o + ((0.389764650845-0.769640361022j))*x_ref[0] + ((0.424538702619-0.189609515725j))*x_ref[1]**o + ((0.228600465704+0.164683442078j))*x_ref[1]
+        arg[(2, 1, 3, 3)]=(0.810121073175+0.174125269563j)*x[0]**o + ((-0.317754162378-0.464334615111j))*x[0] + ((-0.271810819253+0.706012638451j))*x[1]**o + ((0.695315955943+0.347911105733j))*x[1]
+        ref[(2, 1, 3, 3)]=(0.810121073175+0.174125269563j)*x_ref[0]**o + ((-0.317754162378-0.464334615111j))*x_ref[0] + ((-0.271810819253+0.706012638451j))*x_ref[1]**o + ((0.695315955943+0.347911105733j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.758611107666-0.0767655764729j)*x[0]**o + ((0.939292807166-0.947325197795j))*x[0] + ((0.156165715711-0.301635015353j))*x[1]**o + ((-0.505998485699-0.493062219299j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.758611107666-0.0767655764729j)*x_ref[0]**o + ((0.939292807166-0.947325197795j))*x_ref[0] + ((0.156165715711-0.301635015353j))*x_ref[1]**o + ((-0.505998485699-0.493062219299j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.903599321506+0.872416291772j)*x[0]**o + ((0.458092860839+0.573913465104j))*x[0] + ((0.176413004738-0.408025731213j))*x[1]**o + ((-0.868066502987+0.404004769271j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.903599321506+0.872416291772j)*x_ref[0]**o + ((0.458092860839+0.573913465104j))*x_ref[0] + ((0.176413004738-0.408025731213j))*x_ref[1]**o + ((-0.868066502987+0.404004769271j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(0.517345045102+0.253120904605j)*x[0]**o + ((-0.0500841784983+0.758669849981j))*x[0] + ((0.442622332589+0.412149985795j))*x[1]**o + ((-0.90024141112-0.652237050174j))*x[1]
+        ref[(2, 2, 0, 2)]=(0.517345045102+0.253120904605j)*x_ref[0]**o + ((-0.0500841784983+0.758669849981j))*x_ref[0] + ((0.442622332589+0.412149985795j))*x_ref[1]**o + ((-0.90024141112-0.652237050174j))*x_ref[1]
+        arg[(2, 2, 0, 3)]=(0.720666003522-0.690599719491j)*x[0]**o + ((-0.713206417226+0.980572823959j))*x[0] + ((-0.160835004742-0.595890798958j))*x[1]**o + ((0.730365437485-0.48797095542j))*x[1]
+        ref[(2, 2, 0, 3)]=(0.720666003522-0.690599719491j)*x_ref[0]**o + ((-0.713206417226+0.980572823959j))*x_ref[0] + ((-0.160835004742-0.595890798958j))*x_ref[1]**o + ((0.730365437485-0.48797095542j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.043426318253-0.0559245738154j)*x[0]**o + ((0.839067116946+0.0655813391195j))*x[0] + ((0.552429666179-0.969941686691j))*x[1]**o + ((-0.0614429569648-0.138149328442j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.043426318253-0.0559245738154j)*x_ref[0]**o + ((0.839067116946+0.0655813391195j))*x_ref[0] + ((0.552429666179-0.969941686691j))*x_ref[1]**o + ((-0.0614429569648-0.138149328442j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.643707876113-0.971594711986j)*x[0]**o + ((0.597631814013+0.746391823457j))*x[0] + ((0.167077839483-0.162514674964j))*x[1]**o + ((0.0887478539273-0.575075780517j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.643707876113-0.971594711986j)*x_ref[0]**o + ((0.597631814013+0.746391823457j))*x_ref[0] + ((0.167077839483-0.162514674964j))*x_ref[1]**o + ((0.0887478539273-0.575075780517j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(0.926589863573-0.106121016766j)*x[0]**o + ((0.107697513407+0.515030009946j))*x[0] + ((-0.262762986575-0.817488396911j))*x[1]**o + ((0.819652000945-0.0599750643224j))*x[1]
+        ref[(2, 2, 1, 2)]=(0.926589863573-0.106121016766j)*x_ref[0]**o + ((0.107697513407+0.515030009946j))*x_ref[0] + ((-0.262762986575-0.817488396911j))*x_ref[1]**o + ((0.819652000945-0.0599750643224j))*x_ref[1]
+        arg[(2, 2, 1, 3)]=(-0.571187350515+0.959125997266j)*x[0]**o + ((-0.897587305312+0.975274137351j))*x[0] + ((0.154398627163+0.0403127247868j))*x[1]**o + ((0.817848584447-0.820565099424j))*x[1]
+        ref[(2, 2, 1, 3)]=(-0.571187350515+0.959125997266j)*x_ref[0]**o + ((-0.897587305312+0.975274137351j))*x_ref[0] + ((0.154398627163+0.0403127247868j))*x_ref[1]**o + ((0.817848584447-0.820565099424j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(0.879822900021-0.720625153847j)*x[0]**o + ((-0.381613501186+0.584967757656j))*x[0] + ((-0.35657901531-0.545228169051j))*x[1]**o + ((0.78804479755+0.877124045432j))*x[1]
+        ref[(2, 2, 2, 0)]=(0.879822900021-0.720625153847j)*x_ref[0]**o + ((-0.381613501186+0.584967757656j))*x_ref[0] + ((-0.35657901531-0.545228169051j))*x_ref[1]**o + ((0.78804479755+0.877124045432j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.116175377246+0.11733129744j)*x[0]**o + ((0.25514995917-0.86790607057j))*x[0] + ((-0.269511700919+0.266118174535j))*x[1]**o + ((-0.341937385322-0.750006910581j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.116175377246+0.11733129744j)*x_ref[0]**o + ((0.25514995917-0.86790607057j))*x_ref[0] + ((-0.269511700919+0.266118174535j))*x_ref[1]**o + ((-0.341937385322-0.750006910581j))*x_ref[1]
+        arg[(2, 2, 2, 2)]=(-0.864042226607+0.924415742261j)*x[0]**o + ((-0.262560602129-0.344927858663j))*x[0] + ((0.323131018853-0.886294455705j))*x[1]**o + ((0.962563192523-0.810977054659j))*x[1]
+        ref[(2, 2, 2, 2)]=(-0.864042226607+0.924415742261j)*x_ref[0]**o + ((-0.262560602129-0.344927858663j))*x_ref[0] + ((0.323131018853-0.886294455705j))*x_ref[1]**o + ((0.962563192523-0.810977054659j))*x_ref[1]
+        arg[(2, 2, 2, 3)]=(0.365156274204+0.860489184076j)*x[0]**o + ((0.125888265356+0.342280124626j))*x[0] + ((-0.584558637802+0.604156007565j))*x[1]**o + ((-0.596044142768+0.905359496133j))*x[1]
+        ref[(2, 2, 2, 3)]=(0.365156274204+0.860489184076j)*x_ref[0]**o + ((0.125888265356+0.342280124626j))*x_ref[0] + ((-0.584558637802+0.604156007565j))*x_ref[1]**o + ((-0.596044142768+0.905359496133j))*x_ref[1]
+        arg[(2, 2, 3, 0)]=(0.736420253642+0.552676154206j)*x[0]**o + ((-0.539135032557-0.714485437153j))*x[0] + ((-0.0854520987469-0.781490042083j))*x[1]**o + ((0.908599476296-0.437920541798j))*x[1]
+        ref[(2, 2, 3, 0)]=(0.736420253642+0.552676154206j)*x_ref[0]**o + ((-0.539135032557-0.714485437153j))*x_ref[0] + ((-0.0854520987469-0.781490042083j))*x_ref[1]**o + ((0.908599476296-0.437920541798j))*x_ref[1]
+        arg[(2, 2, 3, 1)]=(0.364273603006+0.171670550018j)*x[0]**o + ((-0.4842628362+0.178290294436j))*x[0] + ((0.113339877471-0.488736188897j))*x[1]**o + ((-0.208612065175-0.837043139463j))*x[1]
+        ref[(2, 2, 3, 1)]=(0.364273603006+0.171670550018j)*x_ref[0]**o + ((-0.4842628362+0.178290294436j))*x_ref[0] + ((0.113339877471-0.488736188897j))*x_ref[1]**o + ((-0.208612065175-0.837043139463j))*x_ref[1]
+        arg[(2, 2, 3, 2)]=(0.112699652932-0.142239528265j)*x[0]**o + ((-0.262231592869+0.845455549423j))*x[0] + ((0.916406489678+0.776978253392j))*x[1]**o + ((-0.710837280428+0.840618090569j))*x[1]
+        ref[(2, 2, 3, 2)]=(0.112699652932-0.142239528265j)*x_ref[0]**o + ((-0.262231592869+0.845455549423j))*x_ref[0] + ((0.916406489678+0.776978253392j))*x_ref[1]**o + ((-0.710837280428+0.840618090569j))*x_ref[1]
+        arg[(2, 2, 3, 3)]=(0.459413253333+0.886780641027j)*x[0]**o + ((0.668569251052+0.283045191225j))*x[0] + ((0.796932521464-0.961597780188j))*x[1]**o + ((-0.0473006706112-0.492441400723j))*x[1]
+        ref[(2, 2, 3, 3)]=(0.459413253333+0.886780641027j)*x_ref[0]**o + ((0.668569251052+0.283045191225j))*x_ref[0] + ((0.796932521464-0.961597780188j))*x_ref[1]**o + ((-0.0473006706112-0.492441400723j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(0.773827684686-0.126933027165j)*x[0]**o + ((-0.948169654017-0.783676602646j))*x[0] + ((0.727430391827-0.944158069149j))*x[1]**o + ((0.447790634721+0.524686999504j))*x[1]
+        ref[(2, 3, 0, 0)]=(0.773827684686-0.126933027165j)*x_ref[0]**o + ((-0.948169654017-0.783676602646j))*x_ref[0] + ((0.727430391827-0.944158069149j))*x_ref[1]**o + ((0.447790634721+0.524686999504j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(-0.482419998677+0.610701362308j)*x[0]**o + ((0.194335396268+0.663653578325j))*x[0] + ((-0.207029695122+0.937011016355j))*x[1]**o + ((0.337691580067+0.406904748204j))*x[1]
+        ref[(2, 3, 0, 1)]=(-0.482419998677+0.610701362308j)*x_ref[0]**o + ((0.194335396268+0.663653578325j))*x_ref[0] + ((-0.207029695122+0.937011016355j))*x_ref[1]**o + ((0.337691580067+0.406904748204j))*x_ref[1]
+        arg[(2, 3, 0, 2)]=(0.954850593713-0.00518297929231j)*x[0]**o + ((0.977180357025-0.0875706349262j))*x[0] + ((-0.801522421131-0.206497561864j))*x[1]**o + ((0.713080671007+0.0880005232547j))*x[1]
+        ref[(2, 3, 0, 2)]=(0.954850593713-0.00518297929231j)*x_ref[0]**o + ((0.977180357025-0.0875706349262j))*x_ref[0] + ((-0.801522421131-0.206497561864j))*x_ref[1]**o + ((0.713080671007+0.0880005232547j))*x_ref[1]
+        arg[(2, 3, 0, 3)]=(-0.241829870265+0.794310662624j)*x[0]**o + ((-0.663226294425-0.72863430499j))*x[0] + ((0.878184069198+0.551966047796j))*x[1]**o + ((-0.859818345553-0.954448285966j))*x[1]
+        ref[(2, 3, 0, 3)]=(-0.241829870265+0.794310662624j)*x_ref[0]**o + ((-0.663226294425-0.72863430499j))*x_ref[0] + ((0.878184069198+0.551966047796j))*x_ref[1]**o + ((-0.859818345553-0.954448285966j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(-0.746478022786-0.539698842637j)*x[0]**o + ((0.340687189419-0.987727402466j))*x[0] + ((-0.375892402953-0.113764504169j))*x[1]**o + ((0.113576787491+0.400647786497j))*x[1]
+        ref[(2, 3, 1, 0)]=(-0.746478022786-0.539698842637j)*x_ref[0]**o + ((0.340687189419-0.987727402466j))*x_ref[0] + ((-0.375892402953-0.113764504169j))*x_ref[1]**o + ((0.113576787491+0.400647786497j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(0.508281368201+0.366406398227j)*x[0]**o + ((-0.49795385909-0.409191019204j))*x[0] + ((-0.865808565302-0.934304488745j))*x[1]**o + ((0.824480497903-0.127168445278j))*x[1]
+        ref[(2, 3, 1, 1)]=(0.508281368201+0.366406398227j)*x_ref[0]**o + ((-0.49795385909-0.409191019204j))*x_ref[0] + ((-0.865808565302-0.934304488745j))*x_ref[1]**o + ((0.824480497903-0.127168445278j))*x_ref[1]
+        arg[(2, 3, 1, 2)]=(0.965309609498-0.872903587825j)*x[0]**o + ((0.201726063038-0.280112452869j))*x[0] + ((0.214211275747+0.22760280135j))*x[1]**o + ((0.518893658807-0.977431736234j))*x[1]
+        ref[(2, 3, 1, 2)]=(0.965309609498-0.872903587825j)*x_ref[0]**o + ((0.201726063038-0.280112452869j))*x_ref[0] + ((0.214211275747+0.22760280135j))*x_ref[1]**o + ((0.518893658807-0.977431736234j))*x_ref[1]
+        arg[(2, 3, 1, 3)]=(0.314146844562-0.438592612968j)*x[0]**o + ((0.0401754119262+0.734541013238j))*x[0] + ((-0.412621201248-0.864258239469j))*x[1]**o + ((-0.0205340027096+0.507286599276j))*x[1]
+        ref[(2, 3, 1, 3)]=(0.314146844562-0.438592612968j)*x_ref[0]**o + ((0.0401754119262+0.734541013238j))*x_ref[0] + ((-0.412621201248-0.864258239469j))*x_ref[1]**o + ((-0.0205340027096+0.507286599276j))*x_ref[1]
+        arg[(2, 3, 2, 0)]=(0.0734704048507-0.325914702997j)*x[0]**o + ((0.237514231468-0.355622439783j))*x[0] + ((-0.900384391623+0.369837862467j))*x[1]**o + ((0.426632799104-0.564574284666j))*x[1]
+        ref[(2, 3, 2, 0)]=(0.0734704048507-0.325914702997j)*x_ref[0]**o + ((0.237514231468-0.355622439783j))*x_ref[0] + ((-0.900384391623+0.369837862467j))*x_ref[1]**o + ((0.426632799104-0.564574284666j))*x_ref[1]
+        arg[(2, 3, 2, 1)]=(-0.440262616573+0.11688824106j)*x[0]**o + ((0.914871744163+0.58644675563j))*x[0] + ((-0.30002490748+0.00379160146506j))*x[1]**o + ((-0.851468279796-0.995028817324j))*x[1]
+        ref[(2, 3, 2, 1)]=(-0.440262616573+0.11688824106j)*x_ref[0]**o + ((0.914871744163+0.58644675563j))*x_ref[0] + ((-0.30002490748+0.00379160146506j))*x_ref[1]**o + ((-0.851468279796-0.995028817324j))*x_ref[1]
+        arg[(2, 3, 2, 2)]=(0.912841863952+0.891992077866j)*x[0]**o + ((0.555023446617-0.157492860492j))*x[0] + ((0.028813953093+0.890579315521j))*x[1]**o + ((0.408207265862+0.799004526354j))*x[1]
+        ref[(2, 3, 2, 2)]=(0.912841863952+0.891992077866j)*x_ref[0]**o + ((0.555023446617-0.157492860492j))*x_ref[0] + ((0.028813953093+0.890579315521j))*x_ref[1]**o + ((0.408207265862+0.799004526354j))*x_ref[1]
+        arg[(2, 3, 2, 3)]=(-0.889979485155-0.233020961432j)*x[0]**o + ((-0.6245761751+0.242828498671j))*x[0] + ((-0.533735259444-0.690534950527j))*x[1]**o + ((0.837460012539-0.161647063124j))*x[1]
+        ref[(2, 3, 2, 3)]=(-0.889979485155-0.233020961432j)*x_ref[0]**o + ((-0.6245761751+0.242828498671j))*x_ref[0] + ((-0.533735259444-0.690534950527j))*x_ref[1]**o + ((0.837460012539-0.161647063124j))*x_ref[1]
+        arg[(2, 3, 3, 0)]=(-0.0652674336462-0.49858569167j)*x[0]**o + ((-0.363613921526+0.967497466135j))*x[0] + ((-0.250924007164+0.64217013294j))*x[1]**o + ((-0.738912845943+0.662606369755j))*x[1]
+        ref[(2, 3, 3, 0)]=(-0.0652674336462-0.49858569167j)*x_ref[0]**o + ((-0.363613921526+0.967497466135j))*x_ref[0] + ((-0.250924007164+0.64217013294j))*x_ref[1]**o + ((-0.738912845943+0.662606369755j))*x_ref[1]
+        arg[(2, 3, 3, 1)]=(-0.629969472397-0.792005182171j)*x[0]**o + ((0.586431239766-0.925477718625j))*x[0] + ((0.0544871517771-0.392514579068j))*x[1]**o + ((0.108914348185+0.772511093773j))*x[1]
+        ref[(2, 3, 3, 1)]=(-0.629969472397-0.792005182171j)*x_ref[0]**o + ((0.586431239766-0.925477718625j))*x_ref[0] + ((0.0544871517771-0.392514579068j))*x_ref[1]**o + ((0.108914348185+0.772511093773j))*x_ref[1]
+        arg[(2, 3, 3, 2)]=(0.318918746329-0.087003407111j)*x[0]**o + ((0.653281150025+0.528108664986j))*x[0] + ((-0.424075825063-0.700030073152j))*x[1]**o + ((0.48539914217-0.0851750962142j))*x[1]
+        ref[(2, 3, 3, 2)]=(0.318918746329-0.087003407111j)*x_ref[0]**o + ((0.653281150025+0.528108664986j))*x_ref[0] + ((-0.424075825063-0.700030073152j))*x_ref[1]**o + ((0.48539914217-0.0851750962142j))*x_ref[1]
+        arg[(2, 3, 3, 3)]=(-0.791308102725-0.705744537912j)*x[0]**o + ((0.388891223618+0.00863687562089j))*x[0] + ((0.553887299367+0.772070044576j))*x[1]**o + ((-0.94928371405+0.549457756709j))*x[1]
+        ref[(2, 3, 3, 3)]=(-0.791308102725-0.705744537912j)*x_ref[0]**o + ((0.388891223618+0.00863687562089j))*x_ref[0] + ((0.553887299367+0.772070044576j))*x_ref[1]**o + ((-0.94928371405+0.549457756709j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.925524951362-0.0744301225687j)*x[0]**o + ((-0.466052589889-0.306499293309j))*x[0] + ((-0.434822500812-0.190300342538j))*x[1]**o + ((-0.994080666678-0.0623134475223j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.925524951362-0.0744301225687j)*x_ref[0]**o + ((-0.466052589889-0.306499293309j))*x_ref[0] + ((-0.434822500812-0.190300342538j))*x_ref[1]**o + ((-0.994080666678-0.0623134475223j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.229101827522+0.607075214353j)*x[0]**o + ((-0.606339681053-0.371870068081j))*x[0] + ((0.799720224523-0.280465769417j))*x[1]**o + ((0.845784218028+0.519233836853j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.229101827522+0.607075214353j)*x_ref[0]**o + ((-0.606339681053-0.371870068081j))*x_ref[0] + ((0.799720224523-0.280465769417j))*x_ref[1]**o + ((0.845784218028+0.519233836853j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(0.774324203028+0.677707761213j)*x[0]**o + ((0.76352582168+0.077849254966j))*x[0] + ((-0.352507126116+0.557408575116j))*x[1]**o + ((0.970511175985+0.106535769219j))*x[1]
+        ref[(3, 0, 0, 2)]=(0.774324203028+0.677707761213j)*x_ref[0]**o + ((0.76352582168+0.077849254966j))*x_ref[0] + ((-0.352507126116+0.557408575116j))*x_ref[1]**o + ((0.970511175985+0.106535769219j))*x_ref[1]
+        arg[(3, 0, 0, 3)]=(0.195898425867+0.801979129058j)*x[0]**o + ((-0.747756560931-0.568478828691j))*x[0] + ((0.517336135819-0.119473226314j))*x[1]**o + ((0.326521168278-0.88151517487j))*x[1]
+        ref[(3, 0, 0, 3)]=(0.195898425867+0.801979129058j)*x_ref[0]**o + ((-0.747756560931-0.568478828691j))*x_ref[0] + ((0.517336135819-0.119473226314j))*x_ref[1]**o + ((0.326521168278-0.88151517487j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.624384910888-0.308281961175j)*x[0]**o + ((0.709193251353+0.428949990814j))*x[0] + ((-0.966621696818+0.159434997728j))*x[1]**o + ((0.289554831574+0.0826492112442j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.624384910888-0.308281961175j)*x_ref[0]**o + ((0.709193251353+0.428949990814j))*x_ref[0] + ((-0.966621696818+0.159434997728j))*x_ref[1]**o + ((0.289554831574+0.0826492112442j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.146210724283+0.376139620843j)*x[0]**o + ((0.592325624027-0.505184326263j))*x[0] + ((0.458801370585-0.870148806407j))*x[1]**o + ((0.760207056458+0.132986593957j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.146210724283+0.376139620843j)*x_ref[0]**o + ((0.592325624027-0.505184326263j))*x_ref[0] + ((0.458801370585-0.870148806407j))*x_ref[1]**o + ((0.760207056458+0.132986593957j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(-0.660258889393+0.18916763011j)*x[0]**o + ((-0.253764107804-0.0742127935159j))*x[0] + ((-0.323153795249+0.766138345335j))*x[1]**o + ((0.228315017734+0.182155995329j))*x[1]
+        ref[(3, 0, 1, 2)]=(-0.660258889393+0.18916763011j)*x_ref[0]**o + ((-0.253764107804-0.0742127935159j))*x_ref[0] + ((-0.323153795249+0.766138345335j))*x_ref[1]**o + ((0.228315017734+0.182155995329j))*x_ref[1]
+        arg[(3, 0, 1, 3)]=(0.871317160114+0.413209380691j)*x[0]**o + ((-0.310987259327+0.631135585365j))*x[0] + ((0.711511794172-0.653874222035j))*x[1]**o + ((-0.570880594372-0.454527463649j))*x[1]
+        ref[(3, 0, 1, 3)]=(0.871317160114+0.413209380691j)*x_ref[0]**o + ((-0.310987259327+0.631135585365j))*x_ref[0] + ((0.711511794172-0.653874222035j))*x_ref[1]**o + ((-0.570880594372-0.454527463649j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(-0.224065968909-0.216909873747j)*x[0]**o + ((-0.102265864236+0.790273447356j))*x[0] + ((0.421096301215-0.213749354305j))*x[1]**o + ((0.150143021016-0.654109992081j))*x[1]
+        ref[(3, 0, 2, 0)]=(-0.224065968909-0.216909873747j)*x_ref[0]**o + ((-0.102265864236+0.790273447356j))*x_ref[0] + ((0.421096301215-0.213749354305j))*x_ref[1]**o + ((0.150143021016-0.654109992081j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(-0.924290452085+0.716908056375j)*x[0]**o + ((0.335441245338-0.213422557825j))*x[0] + ((-0.562145263114+0.167067261734j))*x[1]**o + ((-0.196012883167-0.159969790421j))*x[1]
+        ref[(3, 0, 2, 1)]=(-0.924290452085+0.716908056375j)*x_ref[0]**o + ((0.335441245338-0.213422557825j))*x_ref[0] + ((-0.562145263114+0.167067261734j))*x_ref[1]**o + ((-0.196012883167-0.159969790421j))*x_ref[1]
+        arg[(3, 0, 2, 2)]=(0.909725184455+0.970821527002j)*x[0]**o + ((-0.224443213697+0.0983086561825j))*x[0] + ((-0.809160621666-0.764009510255j))*x[1]**o + ((0.576738564765+0.579633566175j))*x[1]
+        ref[(3, 0, 2, 2)]=(0.909725184455+0.970821527002j)*x_ref[0]**o + ((-0.224443213697+0.0983086561825j))*x_ref[0] + ((-0.809160621666-0.764009510255j))*x_ref[1]**o + ((0.576738564765+0.579633566175j))*x_ref[1]
+        arg[(3, 0, 2, 3)]=(0.254722389451+0.879125934384j)*x[0]**o + ((0.717498065664-0.00595286980314j))*x[0] + ((0.408594415153+0.222976395182j))*x[1]**o + ((0.666350840697-0.733621259018j))*x[1]
+        ref[(3, 0, 2, 3)]=(0.254722389451+0.879125934384j)*x_ref[0]**o + ((0.717498065664-0.00595286980314j))*x_ref[0] + ((0.408594415153+0.222976395182j))*x_ref[1]**o + ((0.666350840697-0.733621259018j))*x_ref[1]
+        arg[(3, 0, 3, 0)]=(0.432787398843+0.284394959262j)*x[0]**o + ((-0.569575455547-0.868635014748j))*x[0] + ((-0.432114338849-0.132411126993j))*x[1]**o + ((-0.342840059197+0.552424114101j))*x[1]
+        ref[(3, 0, 3, 0)]=(0.432787398843+0.284394959262j)*x_ref[0]**o + ((-0.569575455547-0.868635014748j))*x_ref[0] + ((-0.432114338849-0.132411126993j))*x_ref[1]**o + ((-0.342840059197+0.552424114101j))*x_ref[1]
+        arg[(3, 0, 3, 1)]=(-0.592011987294+0.59183370426j)*x[0]**o + ((0.815925552831+0.999117163605j))*x[0] + ((-0.907449861366+0.0646273483052j))*x[1]**o + ((-0.0136391496106+0.62335219675j))*x[1]
+        ref[(3, 0, 3, 1)]=(-0.592011987294+0.59183370426j)*x_ref[0]**o + ((0.815925552831+0.999117163605j))*x_ref[0] + ((-0.907449861366+0.0646273483052j))*x_ref[1]**o + ((-0.0136391496106+0.62335219675j))*x_ref[1]
+        arg[(3, 0, 3, 2)]=(-0.964533619425-0.0428329774432j)*x[0]**o + ((-0.910637875134+0.528681701819j))*x[0] + ((0.915768445604-0.81969011214j))*x[1]**o + ((0.875311376781+0.205641618204j))*x[1]
+        ref[(3, 0, 3, 2)]=(-0.964533619425-0.0428329774432j)*x_ref[0]**o + ((-0.910637875134+0.528681701819j))*x_ref[0] + ((0.915768445604-0.81969011214j))*x_ref[1]**o + ((0.875311376781+0.205641618204j))*x_ref[1]
+        arg[(3, 0, 3, 3)]=(0.188712118135+0.239536425683j)*x[0]**o + ((0.490063797007-0.811611486116j))*x[0] + ((0.376773117799+0.261862322337j))*x[1]**o + ((-0.100193195416-0.92632793776j))*x[1]
+        ref[(3, 0, 3, 3)]=(0.188712118135+0.239536425683j)*x_ref[0]**o + ((0.490063797007-0.811611486116j))*x_ref[0] + ((0.376773117799+0.261862322337j))*x_ref[1]**o + ((-0.100193195416-0.92632793776j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.836604752431+0.885240997189j)*x[0]**o + ((0.547182171214+0.325117244077j))*x[0] + ((0.929793024938+0.582145270931j))*x[1]**o + ((0.0355463805253+0.616623719839j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.836604752431+0.885240997189j)*x_ref[0]**o + ((0.547182171214+0.325117244077j))*x_ref[0] + ((0.929793024938+0.582145270931j))*x_ref[1]**o + ((0.0355463805253+0.616623719839j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.772587595088-0.490356579913j)*x[0]**o + ((0.677749526552+0.571259917948j))*x[0] + ((-0.15926733573-0.607011897007j))*x[1]**o + ((0.117699169121+0.511763919602j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.772587595088-0.490356579913j)*x_ref[0]**o + ((0.677749526552+0.571259917948j))*x_ref[0] + ((-0.15926733573-0.607011897007j))*x_ref[1]**o + ((0.117699169121+0.511763919602j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(0.300026208927+0.523511191436j)*x[0]**o + ((0.633484618685-0.376957305579j))*x[0] + ((-0.17178028468-0.310520592823j))*x[1]**o + ((-0.239282943723+0.628541868116j))*x[1]
+        ref[(3, 1, 0, 2)]=(0.300026208927+0.523511191436j)*x_ref[0]**o + ((0.633484618685-0.376957305579j))*x_ref[0] + ((-0.17178028468-0.310520592823j))*x_ref[1]**o + ((-0.239282943723+0.628541868116j))*x_ref[1]
+        arg[(3, 1, 0, 3)]=(0.0102140288684+0.368957832878j)*x[0]**o + ((-0.795172099046-0.258059062j))*x[0] + ((-0.566889714633-0.798456069498j))*x[1]**o + ((0.659951208978-0.664296280838j))*x[1]
+        ref[(3, 1, 0, 3)]=(0.0102140288684+0.368957832878j)*x_ref[0]**o + ((-0.795172099046-0.258059062j))*x_ref[0] + ((-0.566889714633-0.798456069498j))*x_ref[1]**o + ((0.659951208978-0.664296280838j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.468482745348-0.0882642338667j)*x[0]**o + ((-0.899422874607+0.3664998079j))*x[0] + ((-0.684961620951+0.311273171917j))*x[1]**o + ((0.569457708544-0.285553536727j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.468482745348-0.0882642338667j)*x_ref[0]**o + ((-0.899422874607+0.3664998079j))*x_ref[0] + ((-0.684961620951+0.311273171917j))*x_ref[1]**o + ((0.569457708544-0.285553536727j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.516239258335-0.461115724047j)*x[0]**o + ((-0.127188992985-0.423888413608j))*x[0] + ((-0.987775416885+0.132102472834j))*x[1]**o + ((-0.375510091873-0.781231424591j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.516239258335-0.461115724047j)*x_ref[0]**o + ((-0.127188992985-0.423888413608j))*x_ref[0] + ((-0.987775416885+0.132102472834j))*x_ref[1]**o + ((-0.375510091873-0.781231424591j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(0.642036909588+0.801110283029j)*x[0]**o + ((-0.563648314418+0.445442932879j))*x[0] + ((0.0077495067977-0.539648137111j))*x[1]**o + ((-0.00144227418349+0.56228009234j))*x[1]
+        ref[(3, 1, 1, 2)]=(0.642036909588+0.801110283029j)*x_ref[0]**o + ((-0.563648314418+0.445442932879j))*x_ref[0] + ((0.0077495067977-0.539648137111j))*x_ref[1]**o + ((-0.00144227418349+0.56228009234j))*x_ref[1]
+        arg[(3, 1, 1, 3)]=(-0.267677484599-0.123855247055j)*x[0]**o + ((-0.951180023331-0.141705620468j))*x[0] + ((-0.360723885756+0.371933508789j))*x[1]**o + ((0.535285931926-0.583278673931j))*x[1]
+        ref[(3, 1, 1, 3)]=(-0.267677484599-0.123855247055j)*x_ref[0]**o + ((-0.951180023331-0.141705620468j))*x_ref[0] + ((-0.360723885756+0.371933508789j))*x_ref[1]**o + ((0.535285931926-0.583278673931j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(-0.952110218197-0.66631638396j)*x[0]**o + ((0.200549895191+0.95746155629j))*x[0] + ((-0.445659916037+0.186110258775j))*x[1]**o + ((-0.625812500921+0.654937599234j))*x[1]
+        ref[(3, 1, 2, 0)]=(-0.952110218197-0.66631638396j)*x_ref[0]**o + ((0.200549895191+0.95746155629j))*x_ref[0] + ((-0.445659916037+0.186110258775j))*x_ref[1]**o + ((-0.625812500921+0.654937599234j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(0.0240515608852-0.665386444543j)*x[0]**o + ((-0.839708567704-0.57173256684j))*x[0] + ((-0.997123939974-0.421003338967j))*x[1]**o + ((0.328592645094-0.939968918951j))*x[1]
+        ref[(3, 1, 2, 1)]=(0.0240515608852-0.665386444543j)*x_ref[0]**o + ((-0.839708567704-0.57173256684j))*x_ref[0] + ((-0.997123939974-0.421003338967j))*x_ref[1]**o + ((0.328592645094-0.939968918951j))*x_ref[1]
+        arg[(3, 1, 2, 2)]=(0.725119762986-0.279064861001j)*x[0]**o + ((0.929371009471+0.717605713704j))*x[0] + ((0.156714897804-0.15130628468j))*x[1]**o + ((0.0614342199902+0.721378337427j))*x[1]
+        ref[(3, 1, 2, 2)]=(0.725119762986-0.279064861001j)*x_ref[0]**o + ((0.929371009471+0.717605713704j))*x_ref[0] + ((0.156714897804-0.15130628468j))*x_ref[1]**o + ((0.0614342199902+0.721378337427j))*x_ref[1]
+        arg[(3, 1, 2, 3)]=(-0.732725100109+0.92727976168j)*x[0]**o + ((0.642994382215+0.289334169699j))*x[0] + ((-0.531164487037+0.626867094807j))*x[1]**o + ((0.407584468472-0.47012346136j))*x[1]
+        ref[(3, 1, 2, 3)]=(-0.732725100109+0.92727976168j)*x_ref[0]**o + ((0.642994382215+0.289334169699j))*x_ref[0] + ((-0.531164487037+0.626867094807j))*x_ref[1]**o + ((0.407584468472-0.47012346136j))*x_ref[1]
+        arg[(3, 1, 3, 0)]=(-0.05013528269-0.642601586985j)*x[0]**o + ((-0.515654868348-0.889033050641j))*x[0] + ((0.949467683491-0.744197361759j))*x[1]**o + ((-0.158574398409+0.25661969642j))*x[1]
+        ref[(3, 1, 3, 0)]=(-0.05013528269-0.642601586985j)*x_ref[0]**o + ((-0.515654868348-0.889033050641j))*x_ref[0] + ((0.949467683491-0.744197361759j))*x_ref[1]**o + ((-0.158574398409+0.25661969642j))*x_ref[1]
+        arg[(3, 1, 3, 1)]=(0.373021629343+0.412679751486j)*x[0]**o + ((0.928284522839+0.914742148069j))*x[0] + ((0.27587115249-0.627695257824j))*x[1]**o + ((0.270946226033+0.0341115163173j))*x[1]
+        ref[(3, 1, 3, 1)]=(0.373021629343+0.412679751486j)*x_ref[0]**o + ((0.928284522839+0.914742148069j))*x_ref[0] + ((0.27587115249-0.627695257824j))*x_ref[1]**o + ((0.270946226033+0.0341115163173j))*x_ref[1]
+        arg[(3, 1, 3, 2)]=(-0.489473622571+0.367985018556j)*x[0]**o + ((-0.524108075823+0.412236418251j))*x[0] + ((-0.398180489734+0.403054527309j))*x[1]**o + ((0.0940159871168+0.670634716598j))*x[1]
+        ref[(3, 1, 3, 2)]=(-0.489473622571+0.367985018556j)*x_ref[0]**o + ((-0.524108075823+0.412236418251j))*x_ref[0] + ((-0.398180489734+0.403054527309j))*x_ref[1]**o + ((0.0940159871168+0.670634716598j))*x_ref[1]
+        arg[(3, 1, 3, 3)]=(-0.259761422044-0.640290516088j)*x[0]**o + ((-0.908498813752+0.810367597542j))*x[0] + ((-0.699716535027-0.440450899631j))*x[1]**o + ((-0.156806310797+0.705944380238j))*x[1]
+        ref[(3, 1, 3, 3)]=(-0.259761422044-0.640290516088j)*x_ref[0]**o + ((-0.908498813752+0.810367597542j))*x_ref[0] + ((-0.699716535027-0.440450899631j))*x_ref[1]**o + ((-0.156806310797+0.705944380238j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(0.958660251166+0.81378482741j)*x[0]**o + ((-0.835119758196-0.240008783479j))*x[0] + ((0.901353214973-0.12735142993j))*x[1]**o + ((0.903374648355+0.42837582241j))*x[1]
+        ref[(3, 2, 0, 0)]=(0.958660251166+0.81378482741j)*x_ref[0]**o + ((-0.835119758196-0.240008783479j))*x_ref[0] + ((0.901353214973-0.12735142993j))*x_ref[1]**o + ((0.903374648355+0.42837582241j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(0.743893986223-0.220126671038j)*x[0]**o + ((-0.645450316679-0.793121160561j))*x[0] + ((-0.0932531369163-0.500199862482j))*x[1]**o + ((-0.369665915998+0.00125424632195j))*x[1]
+        ref[(3, 2, 0, 1)]=(0.743893986223-0.220126671038j)*x_ref[0]**o + ((-0.645450316679-0.793121160561j))*x_ref[0] + ((-0.0932531369163-0.500199862482j))*x_ref[1]**o + ((-0.369665915998+0.00125424632195j))*x_ref[1]
+        arg[(3, 2, 0, 2)]=(0.418406889822+0.756863794077j)*x[0]**o + ((-0.50259501223-0.983247935095j))*x[0] + ((0.383214155608+0.546828306145j))*x[1]**o + ((-0.505045198889-0.225468866421j))*x[1]
+        ref[(3, 2, 0, 2)]=(0.418406889822+0.756863794077j)*x_ref[0]**o + ((-0.50259501223-0.983247935095j))*x_ref[0] + ((0.383214155608+0.546828306145j))*x_ref[1]**o + ((-0.505045198889-0.225468866421j))*x_ref[1]
+        arg[(3, 2, 0, 3)]=(0.754665491312+0.543625863012j)*x[0]**o + ((0.34001516214+0.684016019392j))*x[0] + ((-0.976794548592+0.694041458658j))*x[1]**o + ((-0.389090913446+0.966003408435j))*x[1]
+        ref[(3, 2, 0, 3)]=(0.754665491312+0.543625863012j)*x_ref[0]**o + ((0.34001516214+0.684016019392j))*x_ref[0] + ((-0.976794548592+0.694041458658j))*x_ref[1]**o + ((-0.389090913446+0.966003408435j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.721305714668-0.600771763815j)*x[0]**o + ((0.922654531049-0.628052095687j))*x[0] + ((0.857034385332+0.711851152578j))*x[1]**o + ((0.656040227476+0.683925279804j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.721305714668-0.600771763815j)*x_ref[0]**o + ((0.922654531049-0.628052095687j))*x_ref[0] + ((0.857034385332+0.711851152578j))*x_ref[1]**o + ((0.656040227476+0.683925279804j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(-0.262683005758-0.267127886634j)*x[0]**o + ((0.436297078655+0.535476696304j))*x[0] + ((0.736010805168+0.455635222199j))*x[1]**o + ((-0.457261590968+0.518204702622j))*x[1]
+        ref[(3, 2, 1, 1)]=(-0.262683005758-0.267127886634j)*x_ref[0]**o + ((0.436297078655+0.535476696304j))*x_ref[0] + ((0.736010805168+0.455635222199j))*x_ref[1]**o + ((-0.457261590968+0.518204702622j))*x_ref[1]
+        arg[(3, 2, 1, 2)]=(0.299024692979+0.250873554673j)*x[0]**o + ((-0.022540513136-0.286343201043j))*x[0] + ((0.679117576402-0.866425277003j))*x[1]**o + ((0.466840001202-0.684891045453j))*x[1]
+        ref[(3, 2, 1, 2)]=(0.299024692979+0.250873554673j)*x_ref[0]**o + ((-0.022540513136-0.286343201043j))*x_ref[0] + ((0.679117576402-0.866425277003j))*x_ref[1]**o + ((0.466840001202-0.684891045453j))*x_ref[1]
+        arg[(3, 2, 1, 3)]=(-0.372814407083+0.500560186694j)*x[0]**o + ((-0.356826136622-0.0656000579446j))*x[0] + ((0.402000003563-0.283481874751j))*x[1]**o + ((-0.0716230409897+0.0746891866135j))*x[1]
+        ref[(3, 2, 1, 3)]=(-0.372814407083+0.500560186694j)*x_ref[0]**o + ((-0.356826136622-0.0656000579446j))*x_ref[0] + ((0.402000003563-0.283481874751j))*x_ref[1]**o + ((-0.0716230409897+0.0746891866135j))*x_ref[1]
+        arg[(3, 2, 2, 0)]=(-0.240486182782+0.417852895385j)*x[0]**o + ((-0.285617864051+0.674642495254j))*x[0] + ((-0.957637331471+0.49509804139j))*x[1]**o + ((0.473755045982+0.773034842626j))*x[1]
+        ref[(3, 2, 2, 0)]=(-0.240486182782+0.417852895385j)*x_ref[0]**o + ((-0.285617864051+0.674642495254j))*x_ref[0] + ((-0.957637331471+0.49509804139j))*x_ref[1]**o + ((0.473755045982+0.773034842626j))*x_ref[1]
+        arg[(3, 2, 2, 1)]=(-0.0302804051136-0.959790728866j)*x[0]**o + ((-0.152127145192+0.32002934467j))*x[0] + ((0.822046006827-0.463919711835j))*x[1]**o + ((-0.642487655467-0.538824037786j))*x[1]
+        ref[(3, 2, 2, 1)]=(-0.0302804051136-0.959790728866j)*x_ref[0]**o + ((-0.152127145192+0.32002934467j))*x_ref[0] + ((0.822046006827-0.463919711835j))*x_ref[1]**o + ((-0.642487655467-0.538824037786j))*x_ref[1]
+        arg[(3, 2, 2, 2)]=(-0.416178728552+0.472042749177j)*x[0]**o + ((-0.0595876565228+0.0774512177461j))*x[0] + ((0.455254201737+0.0714193117443j))*x[1]**o + ((-0.203350636712-0.0214784773216j))*x[1]
+        ref[(3, 2, 2, 2)]=(-0.416178728552+0.472042749177j)*x_ref[0]**o + ((-0.0595876565228+0.0774512177461j))*x_ref[0] + ((0.455254201737+0.0714193117443j))*x_ref[1]**o + ((-0.203350636712-0.0214784773216j))*x_ref[1]
+        arg[(3, 2, 2, 3)]=(-0.560613698278+0.302675789542j)*x[0]**o + ((0.560668394199+0.894546285516j))*x[0] + ((0.305981015924+0.000167282210509j))*x[1]**o + ((0.436830345875+0.519558850881j))*x[1]
+        ref[(3, 2, 2, 3)]=(-0.560613698278+0.302675789542j)*x_ref[0]**o + ((0.560668394199+0.894546285516j))*x_ref[0] + ((0.305981015924+0.000167282210509j))*x_ref[1]**o + ((0.436830345875+0.519558850881j))*x_ref[1]
+        arg[(3, 2, 3, 0)]=(0.637954156635+0.0348603367347j)*x[0]**o + ((0.0612631074694-0.0534750874856j))*x[0] + ((-0.427556451682+0.666394745327j))*x[1]**o + ((-0.140639170554-0.759343348175j))*x[1]
+        ref[(3, 2, 3, 0)]=(0.637954156635+0.0348603367347j)*x_ref[0]**o + ((0.0612631074694-0.0534750874856j))*x_ref[0] + ((-0.427556451682+0.666394745327j))*x_ref[1]**o + ((-0.140639170554-0.759343348175j))*x_ref[1]
+        arg[(3, 2, 3, 1)]=(0.307251133237+0.0317057029969j)*x[0]**o + ((-0.748258354661-0.743018949537j))*x[0] + ((0.407926926928-0.846571507951j))*x[1]**o + ((0.0387059736933+0.50772247829j))*x[1]
+        ref[(3, 2, 3, 1)]=(0.307251133237+0.0317057029969j)*x_ref[0]**o + ((-0.748258354661-0.743018949537j))*x_ref[0] + ((0.407926926928-0.846571507951j))*x_ref[1]**o + ((0.0387059736933+0.50772247829j))*x_ref[1]
+        arg[(3, 2, 3, 2)]=(-0.265447289357-0.854618816568j)*x[0]**o + ((-0.328725564902+0.720401265203j))*x[0] + ((-0.230214938186-0.384844513574j))*x[1]**o + ((-0.52853785251+0.484721609522j))*x[1]
+        ref[(3, 2, 3, 2)]=(-0.265447289357-0.854618816568j)*x_ref[0]**o + ((-0.328725564902+0.720401265203j))*x_ref[0] + ((-0.230214938186-0.384844513574j))*x_ref[1]**o + ((-0.52853785251+0.484721609522j))*x_ref[1]
+        arg[(3, 2, 3, 3)]=(-0.920202188974-0.422918971937j)*x[0]**o + ((-0.358800764929+0.552094107755j))*x[0] + ((-0.445121215011-0.766699052244j))*x[1]**o + ((-0.375498664891-0.793855742073j))*x[1]
+        ref[(3, 2, 3, 3)]=(-0.920202188974-0.422918971937j)*x_ref[0]**o + ((-0.358800764929+0.552094107755j))*x_ref[0] + ((-0.445121215011-0.766699052244j))*x_ref[1]**o + ((-0.375498664891-0.793855742073j))*x_ref[1]
+        arg[(3, 3, 0, 0)]=(0.724205088784+0.232121095084j)*x[0]**o + ((0.903228402961+0.264412553308j))*x[0] + ((-0.198965383303+0.620719887487j))*x[1]**o + ((-0.581853245584-0.137831137651j))*x[1]
+        ref[(3, 3, 0, 0)]=(0.724205088784+0.232121095084j)*x_ref[0]**o + ((0.903228402961+0.264412553308j))*x_ref[0] + ((-0.198965383303+0.620719887487j))*x_ref[1]**o + ((-0.581853245584-0.137831137651j))*x_ref[1]
+        arg[(3, 3, 0, 1)]=(0.690957361817-0.0127877965178j)*x[0]**o + ((0.868601503762-0.0721596624765j))*x[0] + ((-0.248631354146-0.482913307522j))*x[1]**o + ((-0.00903851307229+0.58327812232j))*x[1]
+        ref[(3, 3, 0, 1)]=(0.690957361817-0.0127877965178j)*x_ref[0]**o + ((0.868601503762-0.0721596624765j))*x_ref[0] + ((-0.248631354146-0.482913307522j))*x_ref[1]**o + ((-0.00903851307229+0.58327812232j))*x_ref[1]
+        arg[(3, 3, 0, 2)]=(-0.947309484556+0.127953628611j)*x[0]**o + ((0.218814028062+0.83845000653j))*x[0] + ((-0.384954181995-0.677949073695j))*x[1]**o + ((0.491823512474+0.703520877966j))*x[1]
+        ref[(3, 3, 0, 2)]=(-0.947309484556+0.127953628611j)*x_ref[0]**o + ((0.218814028062+0.83845000653j))*x_ref[0] + ((-0.384954181995-0.677949073695j))*x_ref[1]**o + ((0.491823512474+0.703520877966j))*x_ref[1]
+        arg[(3, 3, 0, 3)]=(0.705300006594+0.0216021399951j)*x[0]**o + ((-0.654051131389-0.278670652856j))*x[0] + ((-0.417605241712+0.578403146677j))*x[1]**o + ((-0.154207402513-0.109091153999j))*x[1]
+        ref[(3, 3, 0, 3)]=(0.705300006594+0.0216021399951j)*x_ref[0]**o + ((-0.654051131389-0.278670652856j))*x_ref[0] + ((-0.417605241712+0.578403146677j))*x_ref[1]**o + ((-0.154207402513-0.109091153999j))*x_ref[1]
+        arg[(3, 3, 1, 0)]=(-0.773129988948+0.379376356361j)*x[0]**o + ((0.709023297273+0.680057024354j))*x[0] + ((-0.103346882531+0.832931651212j))*x[1]**o + ((-0.602154403254+0.249595279237j))*x[1]
+        ref[(3, 3, 1, 0)]=(-0.773129988948+0.379376356361j)*x_ref[0]**o + ((0.709023297273+0.680057024354j))*x_ref[0] + ((-0.103346882531+0.832931651212j))*x_ref[1]**o + ((-0.602154403254+0.249595279237j))*x_ref[1]
+        arg[(3, 3, 1, 1)]=(-0.178994305312+0.603865859121j)*x[0]**o + ((0.347291176513+0.590845257163j))*x[0] + ((-0.353143170242-0.630618136877j))*x[1]**o + ((0.123249476506-0.502413954964j))*x[1]
+        ref[(3, 3, 1, 1)]=(-0.178994305312+0.603865859121j)*x_ref[0]**o + ((0.347291176513+0.590845257163j))*x_ref[0] + ((-0.353143170242-0.630618136877j))*x_ref[1]**o + ((0.123249476506-0.502413954964j))*x_ref[1]
+        arg[(3, 3, 1, 2)]=(-0.812441631121-0.191867556111j)*x[0]**o + ((0.0923219310294-0.534592517273j))*x[0] + ((0.00209184725283-0.302843550509j))*x[1]**o + ((0.275342771782+0.0618923664141j))*x[1]
+        ref[(3, 3, 1, 2)]=(-0.812441631121-0.191867556111j)*x_ref[0]**o + ((0.0923219310294-0.534592517273j))*x_ref[0] + ((0.00209184725283-0.302843550509j))*x_ref[1]**o + ((0.275342771782+0.0618923664141j))*x_ref[1]
+        arg[(3, 3, 1, 3)]=(-0.0240686946421-0.719665452308j)*x[0]**o + ((-0.00123283024612-0.779948105837j))*x[0] + ((0.0333793770645-0.538092612785j))*x[1]**o + ((0.921257095765-0.658012020284j))*x[1]
+        ref[(3, 3, 1, 3)]=(-0.0240686946421-0.719665452308j)*x_ref[0]**o + ((-0.00123283024612-0.779948105837j))*x_ref[0] + ((0.0333793770645-0.538092612785j))*x_ref[1]**o + ((0.921257095765-0.658012020284j))*x_ref[1]
+        arg[(3, 3, 2, 0)]=(-0.622951737587+0.814094134441j)*x[0]**o + ((-0.138590982658-0.681382040987j))*x[0] + ((0.79687988877-0.523276990098j))*x[1]**o + ((0.620868711297-0.412269096735j))*x[1]
+        ref[(3, 3, 2, 0)]=(-0.622951737587+0.814094134441j)*x_ref[0]**o + ((-0.138590982658-0.681382040987j))*x_ref[0] + ((0.79687988877-0.523276990098j))*x_ref[1]**o + ((0.620868711297-0.412269096735j))*x_ref[1]
+        arg[(3, 3, 2, 1)]=(-0.145750359942-0.311994991018j)*x[0]**o + ((-0.355348399898+0.0133735194255j))*x[0] + ((0.659881624006-0.996739694915j))*x[1]**o + ((-0.366132756363-0.570045433838j))*x[1]
+        ref[(3, 3, 2, 1)]=(-0.145750359942-0.311994991018j)*x_ref[0]**o + ((-0.355348399898+0.0133735194255j))*x_ref[0] + ((0.659881624006-0.996739694915j))*x_ref[1]**o + ((-0.366132756363-0.570045433838j))*x_ref[1]
+        arg[(3, 3, 2, 2)]=(0.403901883184+0.900374222478j)*x[0]**o + ((-0.506963295527-0.764708359472j))*x[0] + ((-0.0313684899691-0.968658969615j))*x[1]**o + ((0.278694025397-0.0118231665699j))*x[1]
+        ref[(3, 3, 2, 2)]=(0.403901883184+0.900374222478j)*x_ref[0]**o + ((-0.506963295527-0.764708359472j))*x_ref[0] + ((-0.0313684899691-0.968658969615j))*x_ref[1]**o + ((0.278694025397-0.0118231665699j))*x_ref[1]
+        arg[(3, 3, 2, 3)]=(-0.341264599173+0.437301727071j)*x[0]**o + ((-0.729828585302+0.811421680966j))*x[0] + ((0.814842901158+0.259497754406j))*x[1]**o + ((0.0987561863156-0.623565378489j))*x[1]
+        ref[(3, 3, 2, 3)]=(-0.341264599173+0.437301727071j)*x_ref[0]**o + ((-0.729828585302+0.811421680966j))*x_ref[0] + ((0.814842901158+0.259497754406j))*x_ref[1]**o + ((0.0987561863156-0.623565378489j))*x_ref[1]
+        arg[(3, 3, 3, 0)]=(0.624633148338-0.161854443332j)*x[0]**o + ((0.320618369154+0.30352890163j))*x[0] + ((0.135849773842+0.755917502817j))*x[1]**o + ((0.191752498846-0.591684235299j))*x[1]
+        ref[(3, 3, 3, 0)]=(0.624633148338-0.161854443332j)*x_ref[0]**o + ((0.320618369154+0.30352890163j))*x_ref[0] + ((0.135849773842+0.755917502817j))*x_ref[1]**o + ((0.191752498846-0.591684235299j))*x_ref[1]
+        arg[(3, 3, 3, 1)]=(-0.100818184911-0.742772433079j)*x[0]**o + ((-0.897710133105-0.230554135153j))*x[0] + ((0.746124314295-0.0188395561888j))*x[1]**o + ((0.710648955908+0.709834768141j))*x[1]
+        ref[(3, 3, 3, 1)]=(-0.100818184911-0.742772433079j)*x_ref[0]**o + ((-0.897710133105-0.230554135153j))*x_ref[0] + ((0.746124314295-0.0188395561888j))*x_ref[1]**o + ((0.710648955908+0.709834768141j))*x_ref[1]
+        arg[(3, 3, 3, 2)]=(0.518170997611-0.228398823421j)*x[0]**o + ((0.799860335376-0.374674427924j))*x[0] + ((0.601084343406+0.999682446924j))*x[1]**o + ((0.644963609748+0.52161383619j))*x[1]
+        ref[(3, 3, 3, 2)]=(0.518170997611-0.228398823421j)*x_ref[0]**o + ((0.799860335376-0.374674427924j))*x_ref[0] + ((0.601084343406+0.999682446924j))*x_ref[1]**o + ((0.644963609748+0.52161383619j))*x_ref[1]
+        arg[(3, 3, 3, 3)]=(-0.417546973071+0.979374831924j)*x[0]**o + ((0.667115612879-0.923946420052j))*x[0] + ((0.399442944765+0.580049932345j))*x[1]**o + ((0.0686445171862+0.106124486115j))*x[1]
+        ref[(3, 3, 3, 3)]=(-0.417546973071+0.979374831924j)*x_ref[0]**o + ((0.667115612879-0.923946420052j))*x_ref[0] + ((0.399442944765+0.580049932345j))*x_ref[1]**o + ((0.0686445171862+0.106124486115j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.582416398421-0.407223079987j)*x[2]**o + ((-0.88483872235+0.860131207412j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.582416398421-0.407223079987j)*x_ref[2]**o + ((-0.88483872235+0.860131207412j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.738092658932-0.795753509388j)*x[2]**o + ((-0.786612204518-0.704182676158j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.738092658932-0.795753509388j)*x_ref[2]**o + ((-0.786612204518-0.704182676158j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.746531958695-0.716611759551j)*x[2]**o + ((-0.998109827866+0.67811182173j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.746531958695-0.716611759551j)*x_ref[2]**o + ((-0.998109827866+0.67811182173j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(-0.517245878315+0.791690779513j)*x[2]**o + ((-0.873816148597-0.0204714482304j))*x[2]
+            ref[(0, 0, 0, 3)]+=(-0.517245878315+0.791690779513j)*x_ref[2]**o + ((-0.873816148597-0.0204714482304j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.776187639276-0.883146661444j)*x[2]**o + ((0.163675926876-0.522545537187j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.776187639276-0.883146661444j)*x_ref[2]**o + ((0.163675926876-0.522545537187j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.815081898936-0.173032254055j)*x[2]**o + ((-0.219184226617-0.347314492869j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.815081898936-0.173032254055j)*x_ref[2]**o + ((-0.219184226617-0.347314492869j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.221306462752-0.0494296498417j)*x[2]**o + ((0.777495059193-0.21675563831j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.221306462752-0.0494296498417j)*x_ref[2]**o + ((0.777495059193-0.21675563831j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.304624377731-0.579972518725j)*x[2]**o + ((0.914169229727+0.643858643089j))*x[2]
+            ref[(0, 0, 1, 3)]+=(0.304624377731-0.579972518725j)*x_ref[2]**o + ((0.914169229727+0.643858643089j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.218485954893+0.528934796378j)*x[2]**o + ((0.37122220882+0.2993342062j))*x[2]
+            ref[(0, 0, 2, 0)]+=(0.218485954893+0.528934796378j)*x_ref[2]**o + ((0.37122220882+0.2993342062j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.334281749465+0.533210306126j)*x[2]**o + ((-0.433510108854-0.330510132682j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.334281749465+0.533210306126j)*x_ref[2]**o + ((-0.433510108854-0.330510132682j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(-0.813096744324-0.667503502746j)*x[2]**o + ((0.759738859048-0.983335347279j))*x[2]
+            ref[(0, 0, 2, 2)]+=(-0.813096744324-0.667503502746j)*x_ref[2]**o + ((0.759738859048-0.983335347279j))*x_ref[2]
+            arg[(0, 0, 2, 3)]+=(-0.490191389698-0.424938366579j)*x[2]**o + ((-0.414140641686-0.223613632961j))*x[2]
+            ref[(0, 0, 2, 3)]+=(-0.490191389698-0.424938366579j)*x_ref[2]**o + ((-0.414140641686-0.223613632961j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(0.0794645971564-0.821478887689j)*x[2]**o + ((0.86355731864+0.514710532574j))*x[2]
+            ref[(0, 0, 3, 0)]+=(0.0794645971564-0.821478887689j)*x_ref[2]**o + ((0.86355731864+0.514710532574j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(-0.730341838402-0.296818772379j)*x[2]**o + ((-0.896636017909-0.358805878611j))*x[2]
+            ref[(0, 0, 3, 1)]+=(-0.730341838402-0.296818772379j)*x_ref[2]**o + ((-0.896636017909-0.358805878611j))*x_ref[2]
+            arg[(0, 0, 3, 2)]+=(0.868616961614-0.757829385544j)*x[2]**o + ((0.593944615054-0.247903969964j))*x[2]
+            ref[(0, 0, 3, 2)]+=(0.868616961614-0.757829385544j)*x_ref[2]**o + ((0.593944615054-0.247903969964j))*x_ref[2]
+            arg[(0, 0, 3, 3)]+=(-0.141459957519-0.617841073602j)*x[2]**o + ((-0.228305409327+0.0553562669343j))*x[2]
+            ref[(0, 0, 3, 3)]+=(-0.141459957519-0.617841073602j)*x_ref[2]**o + ((-0.228305409327+0.0553562669343j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.694665985099-0.546074762214j)*x[2]**o + ((-0.127647278221-0.440039976647j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.694665985099-0.546074762214j)*x_ref[2]**o + ((-0.127647278221-0.440039976647j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.492986495104-0.0384638242892j)*x[2]**o + ((0.443295998922+0.231451408675j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.492986495104-0.0384638242892j)*x_ref[2]**o + ((0.443295998922+0.231451408675j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.736599959697-0.735779750786j)*x[2]**o + ((-0.403171876967-0.213681692646j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.736599959697-0.735779750786j)*x_ref[2]**o + ((-0.403171876967-0.213681692646j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.245500797143+0.528634206658j)*x[2]**o + ((-0.254873937323+0.666072931688j))*x[2]
+            ref[(0, 1, 0, 3)]+=(0.245500797143+0.528634206658j)*x_ref[2]**o + ((-0.254873937323+0.666072931688j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.471457977143-0.829209133294j)*x[2]**o + ((-0.114149813666-0.868631230779j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.471457977143-0.829209133294j)*x_ref[2]**o + ((-0.114149813666-0.868631230779j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.761285417479+0.0667781785817j)*x[2]**o + ((0.827644961503+0.157820033369j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.761285417479+0.0667781785817j)*x_ref[2]**o + ((0.827644961503+0.157820033369j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.165426195591+0.552793019807j)*x[2]**o + ((-0.300388638762-0.280744988358j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.165426195591+0.552793019807j)*x_ref[2]**o + ((-0.300388638762-0.280744988358j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.0491006998548-0.356606009443j)*x[2]**o + ((-0.600768477752+0.903020733294j))*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.0491006998548-0.356606009443j)*x_ref[2]**o + ((-0.600768477752+0.903020733294j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.479606159119-0.499059675232j)*x[2]**o + ((-0.445414996379-0.155631008621j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.479606159119-0.499059675232j)*x_ref[2]**o + ((-0.445414996379-0.155631008621j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.765468608463-0.259095813268j)*x[2]**o + ((0.449918339807+0.152754044827j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.765468608463-0.259095813268j)*x_ref[2]**o + ((0.449918339807+0.152754044827j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(0.282080801411-0.960201381764j)*x[2]**o + ((0.440344079913+0.898840138817j))*x[2]
+            ref[(0, 1, 2, 2)]+=(0.282080801411-0.960201381764j)*x_ref[2]**o + ((0.440344079913+0.898840138817j))*x_ref[2]
+            arg[(0, 1, 2, 3)]+=(0.439477285964-0.520452934622j)*x[2]**o + ((-0.982342753613-0.665289555429j))*x[2]
+            ref[(0, 1, 2, 3)]+=(0.439477285964-0.520452934622j)*x_ref[2]**o + ((-0.982342753613-0.665289555429j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(-0.539018092104+0.926017227931j)*x[2]**o + ((0.845829845041+0.375580242693j))*x[2]
+            ref[(0, 1, 3, 0)]+=(-0.539018092104+0.926017227931j)*x_ref[2]**o + ((0.845829845041+0.375580242693j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(0.377442691934+0.0544260174269j)*x[2]**o + ((-0.797479555541+0.44194760002j))*x[2]
+            ref[(0, 1, 3, 1)]+=(0.377442691934+0.0544260174269j)*x_ref[2]**o + ((-0.797479555541+0.44194760002j))*x_ref[2]
+            arg[(0, 1, 3, 2)]+=(0.330967720186+0.18725928132j)*x[2]**o + ((0.112367045404-0.716396246951j))*x[2]
+            ref[(0, 1, 3, 2)]+=(0.330967720186+0.18725928132j)*x_ref[2]**o + ((0.112367045404-0.716396246951j))*x_ref[2]
+            arg[(0, 1, 3, 3)]+=(0.246870755059+0.215564330764j)*x[2]**o + ((0.487880807581+0.308641557766j))*x[2]
+            ref[(0, 1, 3, 3)]+=(0.246870755059+0.215564330764j)*x_ref[2]**o + ((0.487880807581+0.308641557766j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.231888228156-0.874713124173j)*x[2]**o + ((0.577136082246+0.79483537389j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.231888228156-0.874713124173j)*x_ref[2]**o + ((0.577136082246+0.79483537389j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.425831295393+0.991095412163j)*x[2]**o + ((0.851111497242-0.0510617814266j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.425831295393+0.991095412163j)*x_ref[2]**o + ((0.851111497242-0.0510617814266j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.899148741684-0.819819011212j)*x[2]**o + ((-0.114437735796+0.429025929145j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.899148741684-0.819819011212j)*x_ref[2]**o + ((-0.114437735796+0.429025929145j))*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(-0.787390092349+0.29488500634j)*x[2]**o + ((-0.892531922659-0.332028432376j))*x[2]
+            ref[(0, 2, 0, 3)]+=(-0.787390092349+0.29488500634j)*x_ref[2]**o + ((-0.892531922659-0.332028432376j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.305331128336+0.270259591738j)*x[2]**o + ((-0.656179286962+0.172826140557j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.305331128336+0.270259591738j)*x_ref[2]**o + ((-0.656179286962+0.172826140557j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.481654840034-0.18433875978j)*x[2]**o + ((0.250444308939-0.963411780811j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.481654840034-0.18433875978j)*x_ref[2]**o + ((0.250444308939-0.963411780811j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.18650858388-0.17731270443j)*x[2]**o + ((0.346047887781+0.489181434669j))*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.18650858388-0.17731270443j)*x_ref[2]**o + ((0.346047887781+0.489181434669j))*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(-0.893616712675-0.941831680509j)*x[2]**o + ((-0.353864416218-0.415777748963j))*x[2]
+            ref[(0, 2, 1, 3)]+=(-0.893616712675-0.941831680509j)*x_ref[2]**o + ((-0.353864416218-0.415777748963j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.714496407822-0.239936126423j)*x[2]**o + ((-0.690169311007-0.432620061621j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.714496407822-0.239936126423j)*x_ref[2]**o + ((-0.690169311007-0.432620061621j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.889192554685+0.61148165434j)*x[2]**o + ((0.460013240917-0.109677492216j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.889192554685+0.61148165434j)*x_ref[2]**o + ((0.460013240917-0.109677492216j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(0.744826884778+0.642787625335j)*x[2]**o + ((-0.354039328312+0.307833111067j))*x[2]
+            ref[(0, 2, 2, 2)]+=(0.744826884778+0.642787625335j)*x_ref[2]**o + ((-0.354039328312+0.307833111067j))*x_ref[2]
+            arg[(0, 2, 2, 3)]+=(-0.581537360792+0.500648666839j)*x[2]**o + ((0.136679299755-0.749851499253j))*x[2]
+            ref[(0, 2, 2, 3)]+=(-0.581537360792+0.500648666839j)*x_ref[2]**o + ((0.136679299755-0.749851499253j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(-0.341094568347+0.619403732211j)*x[2]**o + ((-0.912622288035+0.340358641536j))*x[2]
+            ref[(0, 2, 3, 0)]+=(-0.341094568347+0.619403732211j)*x_ref[2]**o + ((-0.912622288035+0.340358641536j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(0.0441537000283-0.816317847359j)*x[2]**o + ((-0.872389081474-0.731300651576j))*x[2]
+            ref[(0, 2, 3, 1)]+=(0.0441537000283-0.816317847359j)*x_ref[2]**o + ((-0.872389081474-0.731300651576j))*x_ref[2]
+            arg[(0, 2, 3, 2)]+=(-0.76376326185-0.775002506483j)*x[2]**o + ((-0.413811271784-0.571829204195j))*x[2]
+            ref[(0, 2, 3, 2)]+=(-0.76376326185-0.775002506483j)*x_ref[2]**o + ((-0.413811271784-0.571829204195j))*x_ref[2]
+            arg[(0, 2, 3, 3)]+=(-0.32731004688-0.405329315003j)*x[2]**o + ((-0.0061233599427+0.438435386228j))*x[2]
+            ref[(0, 2, 3, 3)]+=(-0.32731004688-0.405329315003j)*x_ref[2]**o + ((-0.0061233599427+0.438435386228j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.527750587725-0.905367700004j)*x[2]**o + ((-0.305670318153+0.430807423344j))*x[2]
+            ref[(0, 3, 0, 0)]+=(0.527750587725-0.905367700004j)*x_ref[2]**o + ((-0.305670318153+0.430807423344j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.958383989115-0.93353959176j)*x[2]**o + ((-0.184456809017-0.295805574926j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.958383989115-0.93353959176j)*x_ref[2]**o + ((-0.184456809017-0.295805574926j))*x_ref[2]
+            arg[(0, 3, 0, 2)]+=(0.294591748118+0.104955301777j)*x[2]**o + ((0.691611030275+0.648694972219j))*x[2]
+            ref[(0, 3, 0, 2)]+=(0.294591748118+0.104955301777j)*x_ref[2]**o + ((0.691611030275+0.648694972219j))*x_ref[2]
+            arg[(0, 3, 0, 3)]+=(-0.954921897238-0.347170957871j)*x[2]**o + ((-0.439426904851+0.131246643656j))*x[2]
+            ref[(0, 3, 0, 3)]+=(-0.954921897238-0.347170957871j)*x_ref[2]**o + ((-0.439426904851+0.131246643656j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.406823380545-0.781898767621j)*x[2]**o + ((0.749617360681-0.776326451876j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.406823380545-0.781898767621j)*x_ref[2]**o + ((0.749617360681-0.776326451876j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.0645116083682-0.961433215613j)*x[2]**o + ((-0.121930525149+0.206123101218j))*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.0645116083682-0.961433215613j)*x_ref[2]**o + ((-0.121930525149+0.206123101218j))*x_ref[2]
+            arg[(0, 3, 1, 2)]+=(-0.377124684418+0.964858304284j)*x[2]**o + ((-0.271315513278-0.450297840443j))*x[2]
+            ref[(0, 3, 1, 2)]+=(-0.377124684418+0.964858304284j)*x_ref[2]**o + ((-0.271315513278-0.450297840443j))*x_ref[2]
+            arg[(0, 3, 1, 3)]+=(0.349253721193+0.822533797009j)*x[2]**o + ((0.861105341346-0.41322274267j))*x[2]
+            ref[(0, 3, 1, 3)]+=(0.349253721193+0.822533797009j)*x_ref[2]**o + ((0.861105341346-0.41322274267j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(-0.251610332794+0.0919824673916j)*x[2]**o + ((0.822200335157+0.0255488265888j))*x[2]
+            ref[(0, 3, 2, 0)]+=(-0.251610332794+0.0919824673916j)*x_ref[2]**o + ((0.822200335157+0.0255488265888j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(-0.267310621082-0.646129778497j)*x[2]**o + ((0.194049163745+0.161366529686j))*x[2]
+            ref[(0, 3, 2, 1)]+=(-0.267310621082-0.646129778497j)*x_ref[2]**o + ((0.194049163745+0.161366529686j))*x_ref[2]
+            arg[(0, 3, 2, 2)]+=(0.542824857459-0.583317027441j)*x[2]**o + ((0.909797648749+0.56627849657j))*x[2]
+            ref[(0, 3, 2, 2)]+=(0.542824857459-0.583317027441j)*x_ref[2]**o + ((0.909797648749+0.56627849657j))*x_ref[2]
+            arg[(0, 3, 2, 3)]+=(-0.652239198181+0.313451488727j)*x[2]**o + ((-0.773752184949+0.565342631473j))*x[2]
+            ref[(0, 3, 2, 3)]+=(-0.652239198181+0.313451488727j)*x_ref[2]**o + ((-0.773752184949+0.565342631473j))*x_ref[2]
+            arg[(0, 3, 3, 0)]+=(0.808887680247+0.617156352754j)*x[2]**o + ((0.332604085208+0.928810600974j))*x[2]
+            ref[(0, 3, 3, 0)]+=(0.808887680247+0.617156352754j)*x_ref[2]**o + ((0.332604085208+0.928810600974j))*x_ref[2]
+            arg[(0, 3, 3, 1)]+=(0.388046710964-0.901014883441j)*x[2]**o + ((-0.151647704316+0.66347307146j))*x[2]
+            ref[(0, 3, 3, 1)]+=(0.388046710964-0.901014883441j)*x_ref[2]**o + ((-0.151647704316+0.66347307146j))*x_ref[2]
+            arg[(0, 3, 3, 2)]+=(-0.803019652535-0.191870089817j)*x[2]**o + ((-0.465615296185-0.169467526068j))*x[2]
+            ref[(0, 3, 3, 2)]+=(-0.803019652535-0.191870089817j)*x_ref[2]**o + ((-0.465615296185-0.169467526068j))*x_ref[2]
+            arg[(0, 3, 3, 3)]+=(-0.0344582810864-0.915041194336j)*x[2]**o + ((-0.155752978479+0.751272601189j))*x[2]
+            ref[(0, 3, 3, 3)]+=(-0.0344582810864-0.915041194336j)*x_ref[2]**o + ((-0.155752978479+0.751272601189j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.185785296404+0.527824335577j)*x[2]**o + ((0.181116069907+0.758530580288j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.185785296404+0.527824335577j)*x_ref[2]**o + ((0.181116069907+0.758530580288j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.813685342259+0.147940655727j)*x[2]**o + ((-0.094745586223-0.982423566509j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.813685342259+0.147940655727j)*x_ref[2]**o + ((-0.094745586223-0.982423566509j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.978664495057-0.452445839647j)*x[2]**o + ((0.565643366075-0.429308062549j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.978664495057-0.452445839647j)*x_ref[2]**o + ((0.565643366075-0.429308062549j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.758652061723+0.603549780762j)*x[2]**o + ((0.10493224283-0.804520167899j))*x[2]
+            ref[(1, 0, 0, 3)]+=(0.758652061723+0.603549780762j)*x_ref[2]**o + ((0.10493224283-0.804520167899j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.032763571924-0.402593284548j)*x[2]**o + ((-0.474107570222-0.989936592749j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.032763571924-0.402593284548j)*x_ref[2]**o + ((-0.474107570222-0.989936592749j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.0107600274104+0.0456229484668j)*x[2]**o + ((0.165138167898+0.240261781374j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.0107600274104+0.0456229484668j)*x_ref[2]**o + ((0.165138167898+0.240261781374j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.65004642757-0.575270202743j)*x[2]**o + ((0.0999250454034+0.949376881408j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.65004642757-0.575270202743j)*x_ref[2]**o + ((0.0999250454034+0.949376881408j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.583644935606-0.383474661986j)*x[2]**o + ((-0.296103790041-0.67651475828j))*x[2]
+            ref[(1, 0, 1, 3)]+=(0.583644935606-0.383474661986j)*x_ref[2]**o + ((-0.296103790041-0.67651475828j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.633568526548+0.267152985456j)*x[2]**o + ((-0.151854299419-0.634433871062j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.633568526548+0.267152985456j)*x_ref[2]**o + ((-0.151854299419-0.634433871062j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.504736680464-0.316971265843j)*x[2]**o + ((-0.132090593393-0.674211594523j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.504736680464-0.316971265843j)*x_ref[2]**o + ((-0.132090593393-0.674211594523j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(-0.962313551878+0.833886708232j)*x[2]**o + ((-0.357178865149-0.82723331282j))*x[2]
+            ref[(1, 0, 2, 2)]+=(-0.962313551878+0.833886708232j)*x_ref[2]**o + ((-0.357178865149-0.82723331282j))*x_ref[2]
+            arg[(1, 0, 2, 3)]+=(-0.0916100430982+0.960957418578j)*x[2]**o + ((0.872373073113-0.36845400326j))*x[2]
+            ref[(1, 0, 2, 3)]+=(-0.0916100430982+0.960957418578j)*x_ref[2]**o + ((0.872373073113-0.36845400326j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(-0.298731706174+0.772339549772j)*x[2]**o + ((0.629607952548-0.0293664336317j))*x[2]
+            ref[(1, 0, 3, 0)]+=(-0.298731706174+0.772339549772j)*x_ref[2]**o + ((0.629607952548-0.0293664336317j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(0.424454413002-0.283039615352j)*x[2]**o + ((-0.124379379257-0.718233634554j))*x[2]
+            ref[(1, 0, 3, 1)]+=(0.424454413002-0.283039615352j)*x_ref[2]**o + ((-0.124379379257-0.718233634554j))*x_ref[2]
+            arg[(1, 0, 3, 2)]+=(0.978181446637-0.669948174699j)*x[2]**o + ((-0.023612903443-0.792057842524j))*x[2]
+            ref[(1, 0, 3, 2)]+=(0.978181446637-0.669948174699j)*x_ref[2]**o + ((-0.023612903443-0.792057842524j))*x_ref[2]
+            arg[(1, 0, 3, 3)]+=(0.377932946221+0.933950435239j)*x[2]**o + ((0.745701579222+0.287308410408j))*x[2]
+            ref[(1, 0, 3, 3)]+=(0.377932946221+0.933950435239j)*x_ref[2]**o + ((0.745701579222+0.287308410408j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.825292417128+0.648545848877j)*x[2]**o + ((0.0745554976745-0.165936767783j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.825292417128+0.648545848877j)*x_ref[2]**o + ((0.0745554976745-0.165936767783j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.727295344184+0.946762976099j)*x[2]**o + ((-0.00921538570458-0.198879577291j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.727295344184+0.946762976099j)*x_ref[2]**o + ((-0.00921538570458-0.198879577291j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.321763085283+0.00622608055984j)*x[2]**o + ((-0.643181330856-0.257226100342j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.321763085283+0.00622608055984j)*x_ref[2]**o + ((-0.643181330856-0.257226100342j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(0.321743832433+0.413758983302j)*x[2]**o + ((-0.0711978406024+0.270814602582j))*x[2]
+            ref[(1, 1, 0, 3)]+=(0.321743832433+0.413758983302j)*x_ref[2]**o + ((-0.0711978406024+0.270814602582j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.515113408306-0.346020505544j)*x[2]**o + ((-0.641049819225+0.124962981429j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.515113408306-0.346020505544j)*x_ref[2]**o + ((-0.641049819225+0.124962981429j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.314895603725+0.532543172031j)*x[2]**o + ((0.424313965144-0.633937450224j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.314895603725+0.532543172031j)*x_ref[2]**o + ((0.424313965144-0.633937450224j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.695085860571-0.888916531509j)*x[2]**o + ((-0.526136690491-0.0144205284667j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.695085860571-0.888916531509j)*x_ref[2]**o + ((-0.526136690491-0.0144205284667j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.404438631836-0.438311786195j)*x[2]**o + ((-0.162206199331+0.151416393356j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.404438631836-0.438311786195j)*x_ref[2]**o + ((-0.162206199331+0.151416393356j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.664979511793+0.0919231739309j)*x[2]**o + ((0.785829241914-0.309296610107j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.664979511793+0.0919231739309j)*x_ref[2]**o + ((0.785829241914-0.309296610107j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.302262735552+0.735904740029j)*x[2]**o + ((-0.48276984507+0.913161926035j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.302262735552+0.735904740029j)*x_ref[2]**o + ((-0.48276984507+0.913161926035j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.255814085158+0.930777958505j)*x[2]**o + ((-0.609815985553+0.293370893175j))*x[2]
+            ref[(1, 1, 2, 2)]+=(0.255814085158+0.930777958505j)*x_ref[2]**o + ((-0.609815985553+0.293370893175j))*x_ref[2]
+            arg[(1, 1, 2, 3)]+=(-0.405161433434+0.45567386118j)*x[2]**o + ((-0.0874334125191-0.661892907984j))*x[2]
+            ref[(1, 1, 2, 3)]+=(-0.405161433434+0.45567386118j)*x_ref[2]**o + ((-0.0874334125191-0.661892907984j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(0.310974465376+0.856568298233j)*x[2]**o + ((-0.459173490003-0.0344068231307j))*x[2]
+            ref[(1, 1, 3, 0)]+=(0.310974465376+0.856568298233j)*x_ref[2]**o + ((-0.459173490003-0.0344068231307j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(0.907256786161+0.494713486471j)*x[2]**o + ((-0.12637101893-0.622168306383j))*x[2]
+            ref[(1, 1, 3, 1)]+=(0.907256786161+0.494713486471j)*x_ref[2]**o + ((-0.12637101893-0.622168306383j))*x_ref[2]
+            arg[(1, 1, 3, 2)]+=(-0.583558863394-0.444731146244j)*x[2]**o + ((0.162447101137+0.790401121531j))*x[2]
+            ref[(1, 1, 3, 2)]+=(-0.583558863394-0.444731146244j)*x_ref[2]**o + ((0.162447101137+0.790401121531j))*x_ref[2]
+            arg[(1, 1, 3, 3)]+=(-0.129340990066+0.242344135795j)*x[2]**o + ((-0.165442920723+0.838176382607j))*x[2]
+            ref[(1, 1, 3, 3)]+=(-0.129340990066+0.242344135795j)*x_ref[2]**o + ((-0.165442920723+0.838176382607j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.378000054011+0.112092668484j)*x[2]**o + ((0.954315802226-0.527316213637j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.378000054011+0.112092668484j)*x_ref[2]**o + ((0.954315802226-0.527316213637j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.490934353615-0.825227124973j)*x[2]**o + ((-0.0978301814335+0.951987084449j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.490934353615-0.825227124973j)*x_ref[2]**o + ((-0.0978301814335+0.951987084449j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.812720752879+0.996056304148j)*x[2]**o + ((-0.062281116552+0.0571182872012j))*x[2]
+            ref[(1, 2, 0, 2)]+=(0.812720752879+0.996056304148j)*x_ref[2]**o + ((-0.062281116552+0.0571182872012j))*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.22458161031-0.177909804606j)*x[2]**o + ((-0.597028441499+0.761249858252j))*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.22458161031-0.177909804606j)*x_ref[2]**o + ((-0.597028441499+0.761249858252j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.0610098651786+0.894783072685j)*x[2]**o + ((0.535716427899-0.119871496274j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.0610098651786+0.894783072685j)*x_ref[2]**o + ((0.535716427899-0.119871496274j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.44444718893-0.106906331112j)*x[2]**o + ((0.850287468445+0.850147120133j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.44444718893-0.106906331112j)*x_ref[2]**o + ((0.850287468445+0.850147120133j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.132008599572-0.00702274640247j)*x[2]**o + ((0.442130317817-0.522676673993j))*x[2]
+            ref[(1, 2, 1, 2)]+=(0.132008599572-0.00702274640247j)*x_ref[2]**o + ((0.442130317817-0.522676673993j))*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(0.536509884485+0.302523152648j)*x[2]**o + ((-0.123751335014-0.197969891647j))*x[2]
+            ref[(1, 2, 1, 3)]+=(0.536509884485+0.302523152648j)*x_ref[2]**o + ((-0.123751335014-0.197969891647j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.41261991717+0.597038267926j)*x[2]**o + ((-0.0599721862671-0.522868572502j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.41261991717+0.597038267926j)*x_ref[2]**o + ((-0.0599721862671-0.522868572502j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(-0.556860164193-0.736447874252j)*x[2]**o + ((0.95247383333+0.0734841782148j))*x[2]
+            ref[(1, 2, 2, 1)]+=(-0.556860164193-0.736447874252j)*x_ref[2]**o + ((0.95247383333+0.0734841782148j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(0.873061972041-0.985747134277j)*x[2]**o + ((0.284490066371+0.0354400112943j))*x[2]
+            ref[(1, 2, 2, 2)]+=(0.873061972041-0.985747134277j)*x_ref[2]**o + ((0.284490066371+0.0354400112943j))*x_ref[2]
+            arg[(1, 2, 2, 3)]+=(-0.0657447391301-0.950095590631j)*x[2]**o + ((-0.787536331429+0.644343420875j))*x[2]
+            ref[(1, 2, 2, 3)]+=(-0.0657447391301-0.950095590631j)*x_ref[2]**o + ((-0.787536331429+0.644343420875j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(0.285683242704-0.204813285091j)*x[2]**o + ((-0.891955831364+0.88842878976j))*x[2]
+            ref[(1, 2, 3, 0)]+=(0.285683242704-0.204813285091j)*x_ref[2]**o + ((-0.891955831364+0.88842878976j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(-0.640720056328+0.759358518894j)*x[2]**o + ((-0.554146856318-0.823177065847j))*x[2]
+            ref[(1, 2, 3, 1)]+=(-0.640720056328+0.759358518894j)*x_ref[2]**o + ((-0.554146856318-0.823177065847j))*x_ref[2]
+            arg[(1, 2, 3, 2)]+=(-0.484340213175-0.455542071704j)*x[2]**o + ((0.352325781165+0.966802600964j))*x[2]
+            ref[(1, 2, 3, 2)]+=(-0.484340213175-0.455542071704j)*x_ref[2]**o + ((0.352325781165+0.966802600964j))*x_ref[2]
+            arg[(1, 2, 3, 3)]+=(-0.442747329945-0.0207851455691j)*x[2]**o + ((0.128391363703+0.827079568074j))*x[2]
+            ref[(1, 2, 3, 3)]+=(-0.442747329945-0.0207851455691j)*x_ref[2]**o + ((0.128391363703+0.827079568074j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.595433307218-0.654066588238j)*x[2]**o + ((-0.807033318738+0.88402404918j))*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.595433307218-0.654066588238j)*x_ref[2]**o + ((-0.807033318738+0.88402404918j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.532792437634+0.51060112407j)*x[2]**o + ((0.914931669238-0.139994618108j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.532792437634+0.51060112407j)*x_ref[2]**o + ((0.914931669238-0.139994618108j))*x_ref[2]
+            arg[(1, 3, 0, 2)]+=(-0.442060264969-0.936956533884j)*x[2]**o + ((-0.378842169745-0.699854093071j))*x[2]
+            ref[(1, 3, 0, 2)]+=(-0.442060264969-0.936956533884j)*x_ref[2]**o + ((-0.378842169745-0.699854093071j))*x_ref[2]
+            arg[(1, 3, 0, 3)]+=(-0.217246128715-0.909224827505j)*x[2]**o + ((-0.326886266434+0.276116640386j))*x[2]
+            ref[(1, 3, 0, 3)]+=(-0.217246128715-0.909224827505j)*x_ref[2]**o + ((-0.326886266434+0.276116640386j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.410420271699+0.705010899592j)*x[2]**o + ((0.695755889347+0.456949250889j))*x[2]
+            ref[(1, 3, 1, 0)]+=(0.410420271699+0.705010899592j)*x_ref[2]**o + ((0.695755889347+0.456949250889j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.201140663284-0.240573940774j)*x[2]**o + ((0.747664287951-0.234545355977j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.201140663284-0.240573940774j)*x_ref[2]**o + ((0.747664287951-0.234545355977j))*x_ref[2]
+            arg[(1, 3, 1, 2)]+=(0.759364489967-0.286068019348j)*x[2]**o + ((-0.241297424379+0.687810486599j))*x[2]
+            ref[(1, 3, 1, 2)]+=(0.759364489967-0.286068019348j)*x_ref[2]**o + ((-0.241297424379+0.687810486599j))*x_ref[2]
+            arg[(1, 3, 1, 3)]+=(-0.985606784773+0.23692696844j)*x[2]**o + ((-0.655147065245-0.316026221541j))*x[2]
+            ref[(1, 3, 1, 3)]+=(-0.985606784773+0.23692696844j)*x_ref[2]**o + ((-0.655147065245-0.316026221541j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(0.221455228252+0.640027889061j)*x[2]**o + ((0.945851317822-0.0621832294305j))*x[2]
+            ref[(1, 3, 2, 0)]+=(0.221455228252+0.640027889061j)*x_ref[2]**o + ((0.945851317822-0.0621832294305j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.0336224427327+0.445327706818j)*x[2]**o + ((0.338381156792-0.310459902966j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.0336224427327+0.445327706818j)*x_ref[2]**o + ((0.338381156792-0.310459902966j))*x_ref[2]
+            arg[(1, 3, 2, 2)]+=(0.771890150874+0.929409884394j)*x[2]**o + ((-0.336985710541-0.470097822843j))*x[2]
+            ref[(1, 3, 2, 2)]+=(0.771890150874+0.929409884394j)*x_ref[2]**o + ((-0.336985710541-0.470097822843j))*x_ref[2]
+            arg[(1, 3, 2, 3)]+=(-0.784983988802+0.781005568329j)*x[2]**o + ((-0.361334939136-0.186286386021j))*x[2]
+            ref[(1, 3, 2, 3)]+=(-0.784983988802+0.781005568329j)*x_ref[2]**o + ((-0.361334939136-0.186286386021j))*x_ref[2]
+            arg[(1, 3, 3, 0)]+=(-0.735354612016+0.125208249891j)*x[2]**o + ((0.288505684729+0.540353277546j))*x[2]
+            ref[(1, 3, 3, 0)]+=(-0.735354612016+0.125208249891j)*x_ref[2]**o + ((0.288505684729+0.540353277546j))*x_ref[2]
+            arg[(1, 3, 3, 1)]+=(0.248682199385-0.837492948653j)*x[2]**o + ((-0.124131047675-0.54910435435j))*x[2]
+            ref[(1, 3, 3, 1)]+=(0.248682199385-0.837492948653j)*x_ref[2]**o + ((-0.124131047675-0.54910435435j))*x_ref[2]
+            arg[(1, 3, 3, 2)]+=(-0.730319292579-0.628675270348j)*x[2]**o + ((-0.841543003227-0.659661133219j))*x[2]
+            ref[(1, 3, 3, 2)]+=(-0.730319292579-0.628675270348j)*x_ref[2]**o + ((-0.841543003227-0.659661133219j))*x_ref[2]
+            arg[(1, 3, 3, 3)]+=(0.452517857337-0.133803743197j)*x[2]**o + ((-0.464174640354-0.341759601832j))*x[2]
+            ref[(1, 3, 3, 3)]+=(0.452517857337-0.133803743197j)*x_ref[2]**o + ((-0.464174640354-0.341759601832j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.509346343208+0.769644221905j)*x[2]**o + ((-0.843636396019-0.0474604378625j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.509346343208+0.769644221905j)*x_ref[2]**o + ((-0.843636396019-0.0474604378625j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.153530355765+0.845107732789j)*x[2]**o + ((-0.897392455756+0.721144878104j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.153530355765+0.845107732789j)*x_ref[2]**o + ((-0.897392455756+0.721144878104j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.864889999068+0.594958231318j)*x[2]**o + ((0.455608832737+0.658910693001j))*x[2]
+            ref[(2, 0, 0, 2)]+=(0.864889999068+0.594958231318j)*x_ref[2]**o + ((0.455608832737+0.658910693001j))*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.786583642178-0.935065422186j)*x[2]**o + ((0.321801794113+0.758199139115j))*x[2]
+            ref[(2, 0, 0, 3)]+=(0.786583642178-0.935065422186j)*x_ref[2]**o + ((0.321801794113+0.758199139115j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.741994989172-0.0327494075163j)*x[2]**o + ((-0.244403518769-0.727454237658j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.741994989172-0.0327494075163j)*x_ref[2]**o + ((-0.244403518769-0.727454237658j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.0158734618771-0.377428596636j)*x[2]**o + ((-0.00327064596172-0.103420417726j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.0158734618771-0.377428596636j)*x_ref[2]**o + ((-0.00327064596172-0.103420417726j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.655966254702+0.701811548331j)*x[2]**o + ((0.615437739794-0.519907438761j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.655966254702+0.701811548331j)*x_ref[2]**o + ((0.615437739794-0.519907438761j))*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(-0.528865936957-0.421924422404j)*x[2]**o + ((-0.421746563479+0.755130987541j))*x[2]
+            ref[(2, 0, 1, 3)]+=(-0.528865936957-0.421924422404j)*x_ref[2]**o + ((-0.421746563479+0.755130987541j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.151933567631+0.376005058561j)*x[2]**o + ((-0.0621043631773+0.935540958806j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.151933567631+0.376005058561j)*x_ref[2]**o + ((-0.0621043631773+0.935540958806j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(-0.516655369248-0.0577027443674j)*x[2]**o + ((-0.728925621331-0.251565500632j))*x[2]
+            ref[(2, 0, 2, 1)]+=(-0.516655369248-0.0577027443674j)*x_ref[2]**o + ((-0.728925621331-0.251565500632j))*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(0.655525478413+0.152034484549j)*x[2]**o + ((0.120089731935-0.570341389766j))*x[2]
+            ref[(2, 0, 2, 2)]+=(0.655525478413+0.152034484549j)*x_ref[2]**o + ((0.120089731935-0.570341389766j))*x_ref[2]
+            arg[(2, 0, 2, 3)]+=(0.158063962148+0.785338269623j)*x[2]**o + ((-0.831368458812+0.327674236279j))*x[2]
+            ref[(2, 0, 2, 3)]+=(0.158063962148+0.785338269623j)*x_ref[2]**o + ((-0.831368458812+0.327674236279j))*x_ref[2]
+            arg[(2, 0, 3, 0)]+=(0.251175924768+0.0467823097661j)*x[2]**o + ((-0.287728278769-0.828550525839j))*x[2]
+            ref[(2, 0, 3, 0)]+=(0.251175924768+0.0467823097661j)*x_ref[2]**o + ((-0.287728278769-0.828550525839j))*x_ref[2]
+            arg[(2, 0, 3, 1)]+=(-0.436574361281+0.0519970567738j)*x[2]**o + ((-0.951939040696+0.974287696703j))*x[2]
+            ref[(2, 0, 3, 1)]+=(-0.436574361281+0.0519970567738j)*x_ref[2]**o + ((-0.951939040696+0.974287696703j))*x_ref[2]
+            arg[(2, 0, 3, 2)]+=(0.991042539683-0.314967068138j)*x[2]**o + ((-0.572878028657-0.900598239727j))*x[2]
+            ref[(2, 0, 3, 2)]+=(0.991042539683-0.314967068138j)*x_ref[2]**o + ((-0.572878028657-0.900598239727j))*x_ref[2]
+            arg[(2, 0, 3, 3)]+=(0.77453401921-0.240260272803j)*x[2]**o + ((0.0333763879155+0.608700325297j))*x[2]
+            ref[(2, 0, 3, 3)]+=(0.77453401921-0.240260272803j)*x_ref[2]**o + ((0.0333763879155+0.608700325297j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.634560693166-0.347132589295j)*x[2]**o + ((0.735910083493+0.971399582114j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.634560693166-0.347132589295j)*x_ref[2]**o + ((0.735910083493+0.971399582114j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.404099467951+0.20166175262j)*x[2]**o + ((-0.747755977524+0.189914478814j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.404099467951+0.20166175262j)*x_ref[2]**o + ((-0.747755977524+0.189914478814j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.175669811768-0.511758085079j)*x[2]**o + ((-0.99552416305+0.490009970668j))*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.175669811768-0.511758085079j)*x_ref[2]**o + ((-0.99552416305+0.490009970668j))*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.418928007398-0.542934671896j)*x[2]**o + ((-0.570637186882+0.748059439697j))*x[2]
+            ref[(2, 1, 0, 3)]+=(0.418928007398-0.542934671896j)*x_ref[2]**o + ((-0.570637186882+0.748059439697j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.603539110622+0.95034855675j)*x[2]**o + ((0.90151681079-0.283315022084j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.603539110622+0.95034855675j)*x_ref[2]**o + ((0.90151681079-0.283315022084j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.75408168866-0.954534709381j)*x[2]**o + ((0.427422932358-0.960188693223j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.75408168866-0.954534709381j)*x_ref[2]**o + ((0.427422932358-0.960188693223j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.116627270735+0.359260593113j)*x[2]**o + ((0.359143708745-0.126176622401j))*x[2]
+            ref[(2, 1, 1, 2)]+=(0.116627270735+0.359260593113j)*x_ref[2]**o + ((0.359143708745-0.126176622401j))*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(0.670397056956-0.56067506777j)*x[2]**o + ((0.818981959976-0.104468421894j))*x[2]
+            ref[(2, 1, 1, 3)]+=(0.670397056956-0.56067506777j)*x_ref[2]**o + ((0.818981959976-0.104468421894j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(0.290330048843+0.2140993291j)*x[2]**o + ((0.743309007723-0.466705333858j))*x[2]
+            ref[(2, 1, 2, 0)]+=(0.290330048843+0.2140993291j)*x_ref[2]**o + ((0.743309007723-0.466705333858j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(-0.780958347067-0.962122752406j)*x[2]**o + ((-0.453510147296-0.00531107813758j))*x[2]
+            ref[(2, 1, 2, 1)]+=(-0.780958347067-0.962122752406j)*x_ref[2]**o + ((-0.453510147296-0.00531107813758j))*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(-0.382235836769+0.861716980981j)*x[2]**o + ((-0.376326461222-0.525485931821j))*x[2]
+            ref[(2, 1, 2, 2)]+=(-0.382235836769+0.861716980981j)*x_ref[2]**o + ((-0.376326461222-0.525485931821j))*x_ref[2]
+            arg[(2, 1, 2, 3)]+=(0.499934858243+0.216073353828j)*x[2]**o + ((0.624828356584+0.410352461691j))*x[2]
+            ref[(2, 1, 2, 3)]+=(0.499934858243+0.216073353828j)*x_ref[2]**o + ((0.624828356584+0.410352461691j))*x_ref[2]
+            arg[(2, 1, 3, 0)]+=(0.78919746815-0.268212228447j)*x[2]**o + ((0.0652121371406+0.0458506717211j))*x[2]
+            ref[(2, 1, 3, 0)]+=(0.78919746815-0.268212228447j)*x_ref[2]**o + ((0.0652121371406+0.0458506717211j))*x_ref[2]
+            arg[(2, 1, 3, 1)]+=(-0.614178061779-0.150910040836j)*x[2]**o + ((-0.121343862877-0.990253699937j))*x[2]
+            ref[(2, 1, 3, 1)]+=(-0.614178061779-0.150910040836j)*x_ref[2]**o + ((-0.121343862877-0.990253699937j))*x_ref[2]
+            arg[(2, 1, 3, 2)]+=(0.885133709932+0.94883827439j)*x[2]**o + ((0.979179422511-0.315524738239j))*x[2]
+            ref[(2, 1, 3, 2)]+=(0.885133709932+0.94883827439j)*x_ref[2]**o + ((0.979179422511-0.315524738239j))*x_ref[2]
+            arg[(2, 1, 3, 3)]+=(-0.264322686578-0.752222527356j)*x[2]**o + ((-0.835991503094+0.905691892497j))*x[2]
+            ref[(2, 1, 3, 3)]+=(-0.264322686578-0.752222527356j)*x_ref[2]**o + ((-0.835991503094+0.905691892497j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.631731465796+0.832566602677j)*x[2]**o + ((0.501728002269+0.1755498753j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.631731465796+0.832566602677j)*x_ref[2]**o + ((0.501728002269+0.1755498753j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.0983624197153-0.606684474112j)*x[2]**o + ((0.0570400796962+0.956780535104j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.0983624197153-0.606684474112j)*x_ref[2]**o + ((0.0570400796962+0.956780535104j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(0.58869145749-0.196839839817j)*x[2]**o + ((-0.610144477602-0.388003023282j))*x[2]
+            ref[(2, 2, 0, 2)]+=(0.58869145749-0.196839839817j)*x_ref[2]**o + ((-0.610144477602-0.388003023282j))*x_ref[2]
+            arg[(2, 2, 0, 3)]+=(-0.696218023394+0.0288694328799j)*x[2]**o + ((-0.0599437888188+0.674667520491j))*x[2]
+            ref[(2, 2, 0, 3)]+=(-0.696218023394+0.0288694328799j)*x_ref[2]**o + ((-0.0599437888188+0.674667520491j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.993023823678-0.486670417283j)*x[2]**o + ((0.155645767588-0.952910288384j))*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.993023823678-0.486670417283j)*x_ref[2]**o + ((0.155645767588-0.952910288384j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.573190873565-0.196919553131j)*x[2]**o + ((-0.0677384052221+0.427194228031j))*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.573190873565-0.196919553131j)*x_ref[2]**o + ((-0.0677384052221+0.427194228031j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(-0.966527670964-0.14344319495j)*x[2]**o + ((-0.12998265319+0.93274909371j))*x[2]
+            ref[(2, 2, 1, 2)]+=(-0.966527670964-0.14344319495j)*x_ref[2]**o + ((-0.12998265319+0.93274909371j))*x_ref[2]
+            arg[(2, 2, 1, 3)]+=(0.775110716177+0.461907703136j)*x[2]**o + ((-0.242783750105-0.108538866686j))*x[2]
+            ref[(2, 2, 1, 3)]+=(0.775110716177+0.461907703136j)*x_ref[2]**o + ((-0.242783750105-0.108538866686j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(0.853079285322-0.748158510249j)*x[2]**o + ((-0.172903827365+0.0910091977227j))*x[2]
+            ref[(2, 2, 2, 0)]+=(0.853079285322-0.748158510249j)*x_ref[2]**o + ((-0.172903827365+0.0910091977227j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(-0.710420773751-0.882074310786j)*x[2]**o + ((0.217380138159+0.553165930282j))*x[2]
+            ref[(2, 2, 2, 1)]+=(-0.710420773751-0.882074310786j)*x_ref[2]**o + ((0.217380138159+0.553165930282j))*x_ref[2]
+            arg[(2, 2, 2, 2)]+=(0.743207586978-0.990371154067j)*x[2]**o + ((-0.450223954755-0.552722674539j))*x[2]
+            ref[(2, 2, 2, 2)]+=(0.743207586978-0.990371154067j)*x_ref[2]**o + ((-0.450223954755-0.552722674539j))*x_ref[2]
+            arg[(2, 2, 2, 3)]+=(-0.271041875231-0.270928418488j)*x[2]**o + ((0.345588352466+0.844904103366j))*x[2]
+            ref[(2, 2, 2, 3)]+=(-0.271041875231-0.270928418488j)*x_ref[2]**o + ((0.345588352466+0.844904103366j))*x_ref[2]
+            arg[(2, 2, 3, 0)]+=(0.3071408199-0.159980412352j)*x[2]**o + ((0.997098262521+0.467023105132j))*x[2]
+            ref[(2, 2, 3, 0)]+=(0.3071408199-0.159980412352j)*x_ref[2]**o + ((0.997098262521+0.467023105132j))*x_ref[2]
+            arg[(2, 2, 3, 1)]+=(0.0444856278246-0.874709163936j)*x[2]**o + ((-0.672891525647-0.114091064817j))*x[2]
+            ref[(2, 2, 3, 1)]+=(0.0444856278246-0.874709163936j)*x_ref[2]**o + ((-0.672891525647-0.114091064817j))*x_ref[2]
+            arg[(2, 2, 3, 2)]+=(0.309732804399-0.128367583055j)*x[2]**o + ((0.558725312291+0.984379974647j))*x[2]
+            ref[(2, 2, 3, 2)]+=(0.309732804399-0.128367583055j)*x_ref[2]**o + ((0.558725312291+0.984379974647j))*x_ref[2]
+            arg[(2, 2, 3, 3)]+=(0.939885097111-0.0288173101327j)*x[2]**o + ((0.177460291468+0.0410990755521j))*x[2]
+            ref[(2, 2, 3, 3)]+=(0.939885097111-0.0288173101327j)*x_ref[2]**o + ((0.177460291468+0.0410990755521j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(-0.347526599956+0.58274701997j)*x[2]**o + ((0.8151762998+0.720426482144j))*x[2]
+            ref[(2, 3, 0, 0)]+=(-0.347526599956+0.58274701997j)*x_ref[2]**o + ((0.8151762998+0.720426482144j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(-0.246838648301-0.325499809176j)*x[2]**o + ((0.610481604841+0.270823592528j))*x[2]
+            ref[(2, 3, 0, 1)]+=(-0.246838648301-0.325499809176j)*x_ref[2]**o + ((0.610481604841+0.270823592528j))*x_ref[2]
+            arg[(2, 3, 0, 2)]+=(-0.53763113948-0.140875638032j)*x[2]**o + ((-0.92634068369-0.501841961906j))*x[2]
+            ref[(2, 3, 0, 2)]+=(-0.53763113948-0.140875638032j)*x_ref[2]**o + ((-0.92634068369-0.501841961906j))*x_ref[2]
+            arg[(2, 3, 0, 3)]+=(0.649042582155+0.537592594991j)*x[2]**o + ((0.436023795324+0.572266277233j))*x[2]
+            ref[(2, 3, 0, 3)]+=(0.649042582155+0.537592594991j)*x_ref[2]**o + ((0.436023795324+0.572266277233j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(0.514186485906+0.0665685426027j)*x[2]**o + ((0.210811901639+0.395590631421j))*x[2]
+            ref[(2, 3, 1, 0)]+=(0.514186485906+0.0665685426027j)*x_ref[2]**o + ((0.210811901639+0.395590631421j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(-0.688245513757+0.458022546985j)*x[2]**o + ((-0.209940163604+0.337091333995j))*x[2]
+            ref[(2, 3, 1, 1)]+=(-0.688245513757+0.458022546985j)*x_ref[2]**o + ((-0.209940163604+0.337091333995j))*x_ref[2]
+            arg[(2, 3, 1, 2)]+=(0.600231176716-0.401567374537j)*x[2]**o + ((0.842996656827-0.812261198517j))*x[2]
+            ref[(2, 3, 1, 2)]+=(0.600231176716-0.401567374537j)*x_ref[2]**o + ((0.842996656827-0.812261198517j))*x_ref[2]
+            arg[(2, 3, 1, 3)]+=(-0.350374128191-0.523544492894j)*x[2]**o + ((0.376758580389-0.60897390055j))*x[2]
+            ref[(2, 3, 1, 3)]+=(-0.350374128191-0.523544492894j)*x_ref[2]**o + ((0.376758580389-0.60897390055j))*x_ref[2]
+            arg[(2, 3, 2, 0)]+=(0.902118193163+0.186623440081j)*x[2]**o + ((0.829430223467-0.62709977991j))*x[2]
+            ref[(2, 3, 2, 0)]+=(0.902118193163+0.186623440081j)*x_ref[2]**o + ((0.829430223467-0.62709977991j))*x_ref[2]
+            arg[(2, 3, 2, 1)]+=(0.825954875235-0.769893496191j)*x[2]**o + ((0.762887472826-0.763419686854j))*x[2]
+            ref[(2, 3, 2, 1)]+=(0.825954875235-0.769893496191j)*x_ref[2]**o + ((0.762887472826-0.763419686854j))*x_ref[2]
+            arg[(2, 3, 2, 2)]+=(-0.69849081765+0.0824904878622j)*x[2]**o + ((-0.26077222258+0.747968541893j))*x[2]
+            ref[(2, 3, 2, 2)]+=(-0.69849081765+0.0824904878622j)*x_ref[2]**o + ((-0.26077222258+0.747968541893j))*x_ref[2]
+            arg[(2, 3, 2, 3)]+=(-0.934302120801+0.760735808397j)*x[2]**o + ((-0.611245056801+0.821474088964j))*x[2]
+            ref[(2, 3, 2, 3)]+=(-0.934302120801+0.760735808397j)*x_ref[2]**o + ((-0.611245056801+0.821474088964j))*x_ref[2]
+            arg[(2, 3, 3, 0)]+=(-0.648397837978+0.162351865166j)*x[2]**o + ((0.955137325558-0.814638205368j))*x[2]
+            ref[(2, 3, 3, 0)]+=(-0.648397837978+0.162351865166j)*x_ref[2]**o + ((0.955137325558-0.814638205368j))*x_ref[2]
+            arg[(2, 3, 3, 1)]+=(-0.0789392772945+0.279457908656j)*x[2]**o + ((-0.420695236737-0.761994445116j))*x[2]
+            ref[(2, 3, 3, 1)]+=(-0.0789392772945+0.279457908656j)*x_ref[2]**o + ((-0.420695236737-0.761994445116j))*x_ref[2]
+            arg[(2, 3, 3, 2)]+=(0.895633081195-0.234724496031j)*x[2]**o + ((0.78690844455-0.782715240756j))*x[2]
+            ref[(2, 3, 3, 2)]+=(0.895633081195-0.234724496031j)*x_ref[2]**o + ((0.78690844455-0.782715240756j))*x_ref[2]
+            arg[(2, 3, 3, 3)]+=(0.126718968725+0.107546925791j)*x[2]**o + ((0.336887245064-0.360696252126j))*x[2]
+            ref[(2, 3, 3, 3)]+=(0.126718968725+0.107546925791j)*x_ref[2]**o + ((0.336887245064-0.360696252126j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.433279613204-0.284211759821j)*x[2]**o + ((0.672308481732-0.632087174441j))*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.433279613204-0.284211759821j)*x_ref[2]**o + ((0.672308481732-0.632087174441j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.344811447822-0.870093793131j)*x[2]**o + ((0.447659506107+0.875831733313j))*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.344811447822-0.870093793131j)*x_ref[2]**o + ((0.447659506107+0.875831733313j))*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(0.864432909989+0.579624668195j)*x[2]**o + ((-0.16507196664+0.00537106809456j))*x[2]
+            ref[(3, 0, 0, 2)]+=(0.864432909989+0.579624668195j)*x_ref[2]**o + ((-0.16507196664+0.00537106809456j))*x_ref[2]
+            arg[(3, 0, 0, 3)]+=(-0.371118546702+0.15655186084j)*x[2]**o + ((0.881349024771-0.703932778965j))*x[2]
+            ref[(3, 0, 0, 3)]+=(-0.371118546702+0.15655186084j)*x_ref[2]**o + ((0.881349024771-0.703932778965j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.558442087982-0.0430600817801j)*x[2]**o + ((-0.737887630602+0.994402109065j))*x[2]
+            ref[(3, 0, 1, 0)]+=(0.558442087982-0.0430600817801j)*x_ref[2]**o + ((-0.737887630602+0.994402109065j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.292715366813-0.0267166509524j)*x[2]**o + ((0.204939577978-0.753292270454j))*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.292715366813-0.0267166509524j)*x_ref[2]**o + ((0.204939577978-0.753292270454j))*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(-0.642821203732-0.0993592356263j)*x[2]**o + ((-0.888311161779-0.209195604833j))*x[2]
+            ref[(3, 0, 1, 2)]+=(-0.642821203732-0.0993592356263j)*x_ref[2]**o + ((-0.888311161779-0.209195604833j))*x_ref[2]
+            arg[(3, 0, 1, 3)]+=(-0.0828936984944+0.983176524642j)*x[2]**o + ((0.105900454942-0.198810596478j))*x[2]
+            ref[(3, 0, 1, 3)]+=(-0.0828936984944+0.983176524642j)*x_ref[2]**o + ((0.105900454942-0.198810596478j))*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(-0.806194517616-0.21441486215j)*x[2]**o + ((-0.974558936225-0.789800398421j))*x[2]
+            ref[(3, 0, 2, 0)]+=(-0.806194517616-0.21441486215j)*x_ref[2]**o + ((-0.974558936225-0.789800398421j))*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.904242193785+0.773824652089j)*x[2]**o + ((-0.0514262410679+0.235499758975j))*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.904242193785+0.773824652089j)*x_ref[2]**o + ((-0.0514262410679+0.235499758975j))*x_ref[2]
+            arg[(3, 0, 2, 2)]+=(-0.0344998758979+0.0884764565054j)*x[2]**o + ((0.446956507958-0.146316503371j))*x[2]
+            ref[(3, 0, 2, 2)]+=(-0.0344998758979+0.0884764565054j)*x_ref[2]**o + ((0.446956507958-0.146316503371j))*x_ref[2]
+            arg[(3, 0, 2, 3)]+=(0.410509593935-0.726265083206j)*x[2]**o + ((-0.866595891692+0.121373653721j))*x[2]
+            ref[(3, 0, 2, 3)]+=(0.410509593935-0.726265083206j)*x_ref[2]**o + ((-0.866595891692+0.121373653721j))*x_ref[2]
+            arg[(3, 0, 3, 0)]+=(-0.89049037386+0.431421484118j)*x[2]**o + ((0.397944076365-0.469772293751j))*x[2]
+            ref[(3, 0, 3, 0)]+=(-0.89049037386+0.431421484118j)*x_ref[2]**o + ((0.397944076365-0.469772293751j))*x_ref[2]
+            arg[(3, 0, 3, 1)]+=(-0.236525670657-0.374377565654j)*x[2]**o + ((0.93490481271+0.0221085198574j))*x[2]
+            ref[(3, 0, 3, 1)]+=(-0.236525670657-0.374377565654j)*x_ref[2]**o + ((0.93490481271+0.0221085198574j))*x_ref[2]
+            arg[(3, 0, 3, 2)]+=(0.181486505149-0.052695919166j)*x[2]**o + ((0.953267916838-0.614422668353j))*x[2]
+            ref[(3, 0, 3, 2)]+=(0.181486505149-0.052695919166j)*x_ref[2]**o + ((0.953267916838-0.614422668353j))*x_ref[2]
+            arg[(3, 0, 3, 3)]+=(0.474433371129-0.872018825664j)*x[2]**o + ((-0.582532033669+0.77491717665j))*x[2]
+            ref[(3, 0, 3, 3)]+=(0.474433371129-0.872018825664j)*x_ref[2]**o + ((-0.582532033669+0.77491717665j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.199069670282+0.278799224114j)*x[2]**o + ((-0.150609215792-0.977908709121j))*x[2]
+            ref[(3, 1, 0, 0)]+=(0.199069670282+0.278799224114j)*x_ref[2]**o + ((-0.150609215792-0.977908709121j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.763355554942+0.652764092828j)*x[2]**o + ((0.251002001184-0.923596485601j))*x[2]
+            ref[(3, 1, 0, 1)]+=(0.763355554942+0.652764092828j)*x_ref[2]**o + ((0.251002001184-0.923596485601j))*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(-0.268596570298+0.318700806234j)*x[2]**o + ((-0.365186289223-0.373498443858j))*x[2]
+            ref[(3, 1, 0, 2)]+=(-0.268596570298+0.318700806234j)*x_ref[2]**o + ((-0.365186289223-0.373498443858j))*x_ref[2]
+            arg[(3, 1, 0, 3)]+=(-0.839671205002-0.0862378214785j)*x[2]**o + ((0.329984328638+0.921357036941j))*x[2]
+            ref[(3, 1, 0, 3)]+=(-0.839671205002-0.0862378214785j)*x_ref[2]**o + ((0.329984328638+0.921357036941j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.240373744202-0.021289789031j)*x[2]**o + ((-0.263913024921+0.178134584607j))*x[2]
+            ref[(3, 1, 1, 0)]+=(0.240373744202-0.021289789031j)*x_ref[2]**o + ((-0.263913024921+0.178134584607j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(-0.905753457584-0.0385509319539j)*x[2]**o + ((0.298563188674+0.396491363092j))*x[2]
+            ref[(3, 1, 1, 1)]+=(-0.905753457584-0.0385509319539j)*x_ref[2]**o + ((0.298563188674+0.396491363092j))*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(0.888897523905+0.59141190566j)*x[2]**o + ((-0.0705425462509-0.61737312602j))*x[2]
+            ref[(3, 1, 1, 2)]+=(0.888897523905+0.59141190566j)*x_ref[2]**o + ((-0.0705425462509-0.61737312602j))*x_ref[2]
+            arg[(3, 1, 1, 3)]+=(0.101008406254+0.504012352263j)*x[2]**o + ((0.425667514879+0.778538446951j))*x[2]
+            ref[(3, 1, 1, 3)]+=(0.101008406254+0.504012352263j)*x_ref[2]**o + ((0.425667514879+0.778538446951j))*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(0.854161910429+0.953841112171j)*x[2]**o + ((0.669492615426+0.956616545571j))*x[2]
+            ref[(3, 1, 2, 0)]+=(0.854161910429+0.953841112171j)*x_ref[2]**o + ((0.669492615426+0.956616545571j))*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(0.898543815332+0.791060721917j)*x[2]**o + ((-0.551371115739+0.841509224431j))*x[2]
+            ref[(3, 1, 2, 1)]+=(0.898543815332+0.791060721917j)*x_ref[2]**o + ((-0.551371115739+0.841509224431j))*x_ref[2]
+            arg[(3, 1, 2, 2)]+=(0.55583729222-0.554821487855j)*x[2]**o + ((-0.236418279018-0.891436561344j))*x[2]
+            ref[(3, 1, 2, 2)]+=(0.55583729222-0.554821487855j)*x_ref[2]**o + ((-0.236418279018-0.891436561344j))*x_ref[2]
+            arg[(3, 1, 2, 3)]+=(-0.696151687318+0.322384043117j)*x[2]**o + ((-0.643322202525-0.772182602939j))*x[2]
+            ref[(3, 1, 2, 3)]+=(-0.696151687318+0.322384043117j)*x_ref[2]**o + ((-0.643322202525-0.772182602939j))*x_ref[2]
+            arg[(3, 1, 3, 0)]+=(-0.133514860466-0.64380111773j)*x[2]**o + ((0.537175550811-0.335904831428j))*x[2]
+            ref[(3, 1, 3, 0)]+=(-0.133514860466-0.64380111773j)*x_ref[2]**o + ((0.537175550811-0.335904831428j))*x_ref[2]
+            arg[(3, 1, 3, 1)]+=(-0.744508158112+0.27105609254j)*x[2]**o + ((-0.716553102102-0.358433751246j))*x[2]
+            ref[(3, 1, 3, 1)]+=(-0.744508158112+0.27105609254j)*x_ref[2]**o + ((-0.716553102102-0.358433751246j))*x_ref[2]
+            arg[(3, 1, 3, 2)]+=(-0.552060491127+0.673619712925j)*x[2]**o + ((-0.654733131543+0.702289188647j))*x[2]
+            ref[(3, 1, 3, 2)]+=(-0.552060491127+0.673619712925j)*x_ref[2]**o + ((-0.654733131543+0.702289188647j))*x_ref[2]
+            arg[(3, 1, 3, 3)]+=(-0.168703451139-0.796321702196j)*x[2]**o + ((-0.850376047475-0.972260465916j))*x[2]
+            ref[(3, 1, 3, 3)]+=(-0.168703451139-0.796321702196j)*x_ref[2]**o + ((-0.850376047475-0.972260465916j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(-0.0896877731524-0.721522781153j)*x[2]**o + ((-0.895034094901+0.195730319374j))*x[2]
+            ref[(3, 2, 0, 0)]+=(-0.0896877731524-0.721522781153j)*x_ref[2]**o + ((-0.895034094901+0.195730319374j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(-0.339944471283-0.649855654434j)*x[2]**o + ((-0.0123233569139+0.923859748839j))*x[2]
+            ref[(3, 2, 0, 1)]+=(-0.339944471283-0.649855654434j)*x_ref[2]**o + ((-0.0123233569139+0.923859748839j))*x_ref[2]
+            arg[(3, 2, 0, 2)]+=(-0.692555750284-0.920305856615j)*x[2]**o + ((0.00375096119715+0.628824810795j))*x[2]
+            ref[(3, 2, 0, 2)]+=(-0.692555750284-0.920305856615j)*x_ref[2]**o + ((0.00375096119715+0.628824810795j))*x_ref[2]
+            arg[(3, 2, 0, 3)]+=(0.0536636057549+0.373142610152j)*x[2]**o + ((-0.690144121433+0.865036776401j))*x[2]
+            ref[(3, 2, 0, 3)]+=(0.0536636057549+0.373142610152j)*x_ref[2]**o + ((-0.690144121433+0.865036776401j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.476639247012+0.686140312163j)*x[2]**o + ((0.487867800415-0.796810699795j))*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.476639247012+0.686140312163j)*x_ref[2]**o + ((0.487867800415-0.796810699795j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.831539269517-0.349459121493j)*x[2]**o + ((0.39666475039+0.655764783336j))*x[2]
+            ref[(3, 2, 1, 1)]+=(0.831539269517-0.349459121493j)*x_ref[2]**o + ((0.39666475039+0.655764783336j))*x_ref[2]
+            arg[(3, 2, 1, 2)]+=(-0.926292490384-0.461889238289j)*x[2]**o + ((0.610124435082-0.646446276329j))*x[2]
+            ref[(3, 2, 1, 2)]+=(-0.926292490384-0.461889238289j)*x_ref[2]**o + ((0.610124435082-0.646446276329j))*x_ref[2]
+            arg[(3, 2, 1, 3)]+=(0.0572575923539-0.722883558616j)*x[2]**o + ((-0.322339314736+0.750663094269j))*x[2]
+            ref[(3, 2, 1, 3)]+=(0.0572575923539-0.722883558616j)*x_ref[2]**o + ((-0.322339314736+0.750663094269j))*x_ref[2]
+            arg[(3, 2, 2, 0)]+=(-0.36503915286+0.249190775416j)*x[2]**o + ((-0.0565591304683-0.790616688424j))*x[2]
+            ref[(3, 2, 2, 0)]+=(-0.36503915286+0.249190775416j)*x_ref[2]**o + ((-0.0565591304683-0.790616688424j))*x_ref[2]
+            arg[(3, 2, 2, 1)]+=(-0.0869129243941+0.351986866877j)*x[2]**o + ((0.419474713834+0.999318264162j))*x[2]
+            ref[(3, 2, 2, 1)]+=(-0.0869129243941+0.351986866877j)*x_ref[2]**o + ((0.419474713834+0.999318264162j))*x_ref[2]
+            arg[(3, 2, 2, 2)]+=(-0.473226511184+0.571823194398j)*x[2]**o + ((0.468443341523+0.588389271559j))*x[2]
+            ref[(3, 2, 2, 2)]+=(-0.473226511184+0.571823194398j)*x_ref[2]**o + ((0.468443341523+0.588389271559j))*x_ref[2]
+            arg[(3, 2, 2, 3)]+=(-0.149927699656-0.395431835655j)*x[2]**o + ((0.933013760403-0.862971374243j))*x[2]
+            ref[(3, 2, 2, 3)]+=(-0.149927699656-0.395431835655j)*x_ref[2]**o + ((0.933013760403-0.862971374243j))*x_ref[2]
+            arg[(3, 2, 3, 0)]+=(0.494832367139-0.928718009008j)*x[2]**o + ((0.839552759954-0.0584412117553j))*x[2]
+            ref[(3, 2, 3, 0)]+=(0.494832367139-0.928718009008j)*x_ref[2]**o + ((0.839552759954-0.0584412117553j))*x_ref[2]
+            arg[(3, 2, 3, 1)]+=(0.927959508958+0.532744918901j)*x[2]**o + ((0.1833647218+0.435797905392j))*x[2]
+            ref[(3, 2, 3, 1)]+=(0.927959508958+0.532744918901j)*x_ref[2]**o + ((0.1833647218+0.435797905392j))*x_ref[2]
+            arg[(3, 2, 3, 2)]+=(0.553456991599-0.600724477419j)*x[2]**o + ((-0.104821980536-0.792842061157j))*x[2]
+            ref[(3, 2, 3, 2)]+=(0.553456991599-0.600724477419j)*x_ref[2]**o + ((-0.104821980536-0.792842061157j))*x_ref[2]
+            arg[(3, 2, 3, 3)]+=(-0.0948278272241-0.685872418154j)*x[2]**o + ((-0.665237124478-0.965570412251j))*x[2]
+            ref[(3, 2, 3, 3)]+=(-0.0948278272241-0.685872418154j)*x_ref[2]**o + ((-0.665237124478-0.965570412251j))*x_ref[2]
+            arg[(3, 3, 0, 0)]+=(-0.762730880642+0.662594339728j)*x[2]**o + ((-0.184981561274+0.144676410104j))*x[2]
+            ref[(3, 3, 0, 0)]+=(-0.762730880642+0.662594339728j)*x_ref[2]**o + ((-0.184981561274+0.144676410104j))*x_ref[2]
+            arg[(3, 3, 0, 1)]+=(-0.416178463896-0.484868542582j)*x[2]**o + ((0.428391138684+0.825206801683j))*x[2]
+            ref[(3, 3, 0, 1)]+=(-0.416178463896-0.484868542582j)*x_ref[2]**o + ((0.428391138684+0.825206801683j))*x_ref[2]
+            arg[(3, 3, 0, 2)]+=(0.683033397324-0.971097720463j)*x[2]**o + ((0.461646603147-0.361500689635j))*x[2]
+            ref[(3, 3, 0, 2)]+=(0.683033397324-0.971097720463j)*x_ref[2]**o + ((0.461646603147-0.361500689635j))*x_ref[2]
+            arg[(3, 3, 0, 3)]+=(0.76426791146-0.522179504308j)*x[2]**o + ((-0.192185519755-0.738108188962j))*x[2]
+            ref[(3, 3, 0, 3)]+=(0.76426791146-0.522179504308j)*x_ref[2]**o + ((-0.192185519755-0.738108188962j))*x_ref[2]
+            arg[(3, 3, 1, 0)]+=(0.774407805456+0.0390335090295j)*x[2]**o + ((0.758453147148-0.557069169109j))*x[2]
+            ref[(3, 3, 1, 0)]+=(0.774407805456+0.0390335090295j)*x_ref[2]**o + ((0.758453147148-0.557069169109j))*x_ref[2]
+            arg[(3, 3, 1, 1)]+=(-0.0607587255644+0.244393020558j)*x[2]**o + ((-0.818039369853-0.957071925111j))*x[2]
+            ref[(3, 3, 1, 1)]+=(-0.0607587255644+0.244393020558j)*x_ref[2]**o + ((-0.818039369853-0.957071925111j))*x_ref[2]
+            arg[(3, 3, 1, 2)]+=(0.297836294413+0.488822106804j)*x[2]**o + ((0.277140748864-0.942374584284j))*x[2]
+            ref[(3, 3, 1, 2)]+=(0.297836294413+0.488822106804j)*x_ref[2]**o + ((0.277140748864-0.942374584284j))*x_ref[2]
+            arg[(3, 3, 1, 3)]+=(0.566095174089+0.113007538838j)*x[2]**o + ((-0.0994885463239-0.0806083187863j))*x[2]
+            ref[(3, 3, 1, 3)]+=(0.566095174089+0.113007538838j)*x_ref[2]**o + ((-0.0994885463239-0.0806083187863j))*x_ref[2]
+            arg[(3, 3, 2, 0)]+=(-0.837631464254-0.515014531498j)*x[2]**o + ((0.926062557215-0.396754916169j))*x[2]
+            ref[(3, 3, 2, 0)]+=(-0.837631464254-0.515014531498j)*x_ref[2]**o + ((0.926062557215-0.396754916169j))*x_ref[2]
+            arg[(3, 3, 2, 1)]+=(0.417953047863+0.0358034028136j)*x[2]**o + ((-0.99555537816+0.803944316604j))*x[2]
+            ref[(3, 3, 2, 1)]+=(0.417953047863+0.0358034028136j)*x_ref[2]**o + ((-0.99555537816+0.803944316604j))*x_ref[2]
+            arg[(3, 3, 2, 2)]+=(0.855198915487-0.532987254027j)*x[2]**o + ((0.0302946244813-0.269831276525j))*x[2]
+            ref[(3, 3, 2, 2)]+=(0.855198915487-0.532987254027j)*x_ref[2]**o + ((0.0302946244813-0.269831276525j))*x_ref[2]
+            arg[(3, 3, 2, 3)]+=(-0.680904505983-0.102645550781j)*x[2]**o + ((0.380828794447-0.0445171143739j))*x[2]
+            ref[(3, 3, 2, 3)]+=(-0.680904505983-0.102645550781j)*x_ref[2]**o + ((0.380828794447-0.0445171143739j))*x_ref[2]
+            arg[(3, 3, 3, 0)]+=(0.610152200807-0.850131187966j)*x[2]**o + ((0.403137671202-0.648980648351j))*x[2]
+            ref[(3, 3, 3, 0)]+=(0.610152200807-0.850131187966j)*x_ref[2]**o + ((0.403137671202-0.648980648351j))*x_ref[2]
+            arg[(3, 3, 3, 1)]+=(-0.574715409652-0.352731935437j)*x[2]**o + ((-0.332586557817+0.778501040651j))*x[2]
+            ref[(3, 3, 3, 1)]+=(-0.574715409652-0.352731935437j)*x_ref[2]**o + ((-0.332586557817+0.778501040651j))*x_ref[2]
+            arg[(3, 3, 3, 2)]+=(0.476997679358-0.294796335883j)*x[2]**o + ((-0.600221700993+0.575494381738j))*x[2]
+            ref[(3, 3, 3, 2)]+=(0.476997679358-0.294796335883j)*x_ref[2]**o + ((-0.600221700993+0.575494381738j))*x_ref[2]
+            arg[(3, 3, 3, 3)]+=(0.338007322427+0.433000477634j)*x[2]**o + ((-0.888956749111+0.432948118148j))*x[2]
+            ref[(3, 3, 3, 3)]+=(0.338007322427+0.433000477634j)*x_ref[2]**o + ((-0.888956749111+0.432948118148j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.0575476757578-0.873449568379j)*x[0] + ((0.483468414775-0.433299978168j))*x[1]
+        ref=(-0.0575476757578-0.873449568379j)*x_ref[0] + ((0.483468414775-0.433299978168j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.991615349214+0.0689248874033j))*x[2]
+            ref+=((-0.991615349214+0.0689248874033j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.550510941078-0.645914261274j)*x[0] + ((0.27171086114-0.407640905638j))*x[1]
+        ref[(0,)]=(-0.550510941078-0.645914261274j)*x_ref[0] + ((0.27171086114-0.407640905638j))*x_ref[1]
+        arg[(1,)]=(0.0181486022923-0.283738114049j)*x[0] + ((-0.493634568165+0.0164396958551j))*x[1]
+        ref[(1,)]=(0.0181486022923-0.283738114049j)*x_ref[0] + ((-0.493634568165+0.0164396958551j))*x_ref[1]
+        arg[(2,)]=(-0.844221297163+0.101700015382j)*x[0] + ((0.944195425602-0.761878767443j))*x[1]
+        ref[(2,)]=(-0.844221297163+0.101700015382j)*x_ref[0] + ((0.944195425602-0.761878767443j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.21497301663+0.136845109755j)*x[2]
+            ref[(0,)]+=(0.21497301663+0.136845109755j)*x_ref[2]
+            arg[(1,)]+=(-0.718606404178+0.71458028967j)*x[2]
+            ref[(1,)]+=(-0.718606404178+0.71458028967j)*x_ref[2]
+            arg[(2,)]+=(-0.39615561196-0.665249227408j)*x[2]
+            ref[(2,)]+=(-0.39615561196-0.665249227408j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=(0.0815618783508-0.862552184486j)*x[0] + ((-0.546104463247+0.774523554071j))*x[1]
+        ref[(0, 0)]=(0.0815618783508-0.862552184486j)*x_ref[0] + ((-0.546104463247+0.774523554071j))*x_ref[1]
+        arg[(0, 1)]=(0.0862416241384-0.433755181053j)*x[0] + ((-0.519042897687-0.402598430856j))*x[1]
+        ref[(0, 1)]=(0.0862416241384-0.433755181053j)*x_ref[0] + ((-0.519042897687-0.402598430856j))*x_ref[1]
+        arg[(0, 2)]=(0.444778336782-0.326409138287j)*x[0] + ((-0.573540092902+0.624662726815j))*x[1]
+        ref[(0, 2)]=(0.444778336782-0.326409138287j)*x_ref[0] + ((-0.573540092902+0.624662726815j))*x_ref[1]
+        arg[(0, 3)]=(-0.0175948548872-0.680734037115j)*x[0] + ((0.281480657719-0.618459358686j))*x[1]
+        ref[(0, 3)]=(-0.0175948548872-0.680734037115j)*x_ref[0] + ((0.281480657719-0.618459358686j))*x_ref[1]
+        arg[(1, 0)]=(0.85743518667-0.988459717691j)*x[0] + ((0.377259755121-0.731934584196j))*x[1]
+        ref[(1, 0)]=(0.85743518667-0.988459717691j)*x_ref[0] + ((0.377259755121-0.731934584196j))*x_ref[1]
+        arg[(1, 1)]=(-0.549936111183+0.382151927456j)*x[0] + ((-0.176786844972+0.266827959412j))*x[1]
+        ref[(1, 1)]=(-0.549936111183+0.382151927456j)*x_ref[0] + ((-0.176786844972+0.266827959412j))*x_ref[1]
+        arg[(1, 2)]=(0.908328320754-0.436959876867j)*x[0] + ((0.152373085702+0.561038357355j))*x[1]
+        ref[(1, 2)]=(0.908328320754-0.436959876867j)*x_ref[0] + ((0.152373085702+0.561038357355j))*x_ref[1]
+        arg[(1, 3)]=(0.297362285444+0.911674144632j)*x[0] + ((-0.971905543689+0.691117568594j))*x[1]
+        ref[(1, 3)]=(0.297362285444+0.911674144632j)*x_ref[0] + ((-0.971905543689+0.691117568594j))*x_ref[1]
+        arg[(2, 0)]=(-0.343878480238+0.319037951448j)*x[0] + ((-0.467692518869+0.0819443984618j))*x[1]
+        ref[(2, 0)]=(-0.343878480238+0.319037951448j)*x_ref[0] + ((-0.467692518869+0.0819443984618j))*x_ref[1]
+        arg[(2, 1)]=(-0.77477213954-0.402513544337j)*x[0] + ((-0.969402424259-0.945247490231j))*x[1]
+        ref[(2, 1)]=(-0.77477213954-0.402513544337j)*x_ref[0] + ((-0.969402424259-0.945247490231j))*x_ref[1]
+        arg[(2, 2)]=(0.175511457372+0.815558190171j)*x[0] + ((-0.0820372796843-0.577372592257j))*x[1]
+        ref[(2, 2)]=(0.175511457372+0.815558190171j)*x_ref[0] + ((-0.0820372796843-0.577372592257j))*x_ref[1]
+        arg[(2, 3)]=(0.807218013654-0.918198240604j)*x[0] + ((0.245667973887-0.754010610073j))*x[1]
+        ref[(2, 3)]=(0.807218013654-0.918198240604j)*x_ref[0] + ((0.245667973887-0.754010610073j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.462105791999-0.549413235131j)*x[2]
+            ref[(0, 0)]+=(0.462105791999-0.549413235131j)*x_ref[2]
+            arg[(0, 1)]+=(-0.712035069172+0.0370690819004j)*x[2]
+            ref[(0, 1)]+=(-0.712035069172+0.0370690819004j)*x_ref[2]
+            arg[(0, 2)]+=(-0.778899512002-0.723229620109j)*x[2]
+            ref[(0, 2)]+=(-0.778899512002-0.723229620109j)*x_ref[2]
+            arg[(0, 3)]+=(0.713702542511+0.159332368983j)*x[2]
+            ref[(0, 3)]+=(0.713702542511+0.159332368983j)*x_ref[2]
+            arg[(1, 0)]+=(-0.824913797164+0.181504569718j)*x[2]
+            ref[(1, 0)]+=(-0.824913797164+0.181504569718j)*x_ref[2]
+            arg[(1, 1)]+=(-0.38966841757+0.901160935221j)*x[2]
+            ref[(1, 1)]+=(-0.38966841757+0.901160935221j)*x_ref[2]
+            arg[(1, 2)]+=(0.521510342652-0.468216224435j)*x[2]
+            ref[(1, 2)]+=(0.521510342652-0.468216224435j)*x_ref[2]
+            arg[(1, 3)]+=(0.496880088108-0.135525773136j)*x[2]
+            ref[(1, 3)]+=(0.496880088108-0.135525773136j)*x_ref[2]
+            arg[(2, 0)]+=(0.15670306325+0.186868073693j)*x[2]
+            ref[(2, 0)]+=(0.15670306325+0.186868073693j)*x_ref[2]
+            arg[(2, 1)]+=(0.659283164022-0.599179906315j)*x[2]
+            ref[(2, 1)]+=(0.659283164022-0.599179906315j)*x_ref[2]
+            arg[(2, 2)]+=(0.927073187879-0.71240682119j)*x[2]
+            ref[(2, 2)]+=(0.927073187879-0.71240682119j)*x_ref[2]
+            arg[(2, 3)]+=(-0.121137047472+0.182773156221j)*x[2]
+            ref[(2, 3)]+=(-0.121137047472+0.182773156221j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3),w)
+        ref = Data(0,(2, 4, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.245932655527-0.979593236303j)*x[0] + ((0.481612766906+0.487068308429j))*x[1]
+        ref[(0, 0, 0)]=(-0.245932655527-0.979593236303j)*x_ref[0] + ((0.481612766906+0.487068308429j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.718777575568-0.684206290293j)*x[0] + ((-0.2967315953-0.292361302716j))*x[1]
+        ref[(0, 0, 1)]=(0.718777575568-0.684206290293j)*x_ref[0] + ((-0.2967315953-0.292361302716j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.960654757679-0.294066677206j)*x[0] + ((-0.654954753788+0.767661646538j))*x[1]
+        ref[(0, 0, 2)]=(-0.960654757679-0.294066677206j)*x_ref[0] + ((-0.654954753788+0.767661646538j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.483345479038-0.721499612489j)*x[0] + ((-0.603088418068-0.259257410303j))*x[1]
+        ref[(0, 1, 0)]=(0.483345479038-0.721499612489j)*x_ref[0] + ((-0.603088418068-0.259257410303j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.329608556637-0.421236354605j)*x[0] + ((-0.7701534474-0.607464226161j))*x[1]
+        ref[(0, 1, 1)]=(-0.329608556637-0.421236354605j)*x_ref[0] + ((-0.7701534474-0.607464226161j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.0552311363495+0.284369639614j)*x[0] + ((0.441247430718-0.327515110444j))*x[1]
+        ref[(0, 1, 2)]=(-0.0552311363495+0.284369639614j)*x_ref[0] + ((0.441247430718-0.327515110444j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.0475017361043+0.888057338914j)*x[0] + ((0.840494481444+0.720675952743j))*x[1]
+        ref[(0, 2, 0)]=(-0.0475017361043+0.888057338914j)*x_ref[0] + ((0.840494481444+0.720675952743j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.798862799295+0.178276491371j)*x[0] + ((0.09703001296+0.729431576402j))*x[1]
+        ref[(0, 2, 1)]=(-0.798862799295+0.178276491371j)*x_ref[0] + ((0.09703001296+0.729431576402j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.602286832531+0.857900623294j)*x[0] + ((0.961880258949-0.667917603539j))*x[1]
+        ref[(0, 2, 2)]=(-0.602286832531+0.857900623294j)*x_ref[0] + ((0.961880258949-0.667917603539j))*x_ref[1]
+        arg[(0, 3, 0)]=(-0.171425760303-0.48761579661j)*x[0] + ((0.0705104802631-0.396212817283j))*x[1]
+        ref[(0, 3, 0)]=(-0.171425760303-0.48761579661j)*x_ref[0] + ((0.0705104802631-0.396212817283j))*x_ref[1]
+        arg[(0, 3, 1)]=(-0.543244737898-0.873081046554j)*x[0] + ((0.30560561445+0.0790285662758j))*x[1]
+        ref[(0, 3, 1)]=(-0.543244737898-0.873081046554j)*x_ref[0] + ((0.30560561445+0.0790285662758j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.704683008086+0.109452738993j)*x[0] + ((0.0145553236587+0.739102061216j))*x[1]
+        ref[(0, 3, 2)]=(0.704683008086+0.109452738993j)*x_ref[0] + ((0.0145553236587+0.739102061216j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.50817757236-0.979402513712j)*x[0] + ((-0.400596958222+0.794865566757j))*x[1]
+        ref[(1, 0, 0)]=(-0.50817757236-0.979402513712j)*x_ref[0] + ((-0.400596958222+0.794865566757j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.0820204697313-0.0597176797077j)*x[0] + ((-0.256864266459-0.738969859552j))*x[1]
+        ref[(1, 0, 1)]=(0.0820204697313-0.0597176797077j)*x_ref[0] + ((-0.256864266459-0.738969859552j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.878363474921-0.688207996304j)*x[0] + ((-0.5201929897-0.135947099169j))*x[1]
+        ref[(1, 0, 2)]=(0.878363474921-0.688207996304j)*x_ref[0] + ((-0.5201929897-0.135947099169j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.314967164565-0.195867783226j)*x[0] + ((0.466997617873-0.789689052664j))*x[1]
+        ref[(1, 1, 0)]=(-0.314967164565-0.195867783226j)*x_ref[0] + ((0.466997617873-0.789689052664j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.149077316931-0.367038688113j)*x[0] + ((0.916141029352-0.975911749287j))*x[1]
+        ref[(1, 1, 1)]=(-0.149077316931-0.367038688113j)*x_ref[0] + ((0.916141029352-0.975911749287j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.884719740934+0.97140532852j)*x[0] + ((0.709926677708-0.969158461453j))*x[1]
+        ref[(1, 1, 2)]=(0.884719740934+0.97140532852j)*x_ref[0] + ((0.709926677708-0.969158461453j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.311489821022+0.508701258468j)*x[0] + ((-0.338731843613+0.574875630496j))*x[1]
+        ref[(1, 2, 0)]=(-0.311489821022+0.508701258468j)*x_ref[0] + ((-0.338731843613+0.574875630496j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.974637546679-0.0359893219103j)*x[0] + ((0.145945159589-0.719742726748j))*x[1]
+        ref[(1, 2, 1)]=(-0.974637546679-0.0359893219103j)*x_ref[0] + ((0.145945159589-0.719742726748j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.690721538263+0.997900730943j)*x[0] + ((-0.505547328495-0.934319742839j))*x[1]
+        ref[(1, 2, 2)]=(0.690721538263+0.997900730943j)*x_ref[0] + ((-0.505547328495-0.934319742839j))*x_ref[1]
+        arg[(1, 3, 0)]=(0.627909337997-0.801774547393j)*x[0] + ((-0.761718020112+0.507893911973j))*x[1]
+        ref[(1, 3, 0)]=(0.627909337997-0.801774547393j)*x_ref[0] + ((-0.761718020112+0.507893911973j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.478176361272+0.877437186909j)*x[0] + ((0.911400660058-0.400185687694j))*x[1]
+        ref[(1, 3, 1)]=(0.478176361272+0.877437186909j)*x_ref[0] + ((0.911400660058-0.400185687694j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.388102052366+0.395611343518j)*x[0] + ((-0.957331251555-0.257319519485j))*x[1]
+        ref[(1, 3, 2)]=(-0.388102052366+0.395611343518j)*x_ref[0] + ((-0.957331251555-0.257319519485j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.889298791947-0.677549057491j)*x[2]
+            ref[(0, 0, 0)]+=(-0.889298791947-0.677549057491j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.38836794298-0.535946831494j)*x[2]
+            ref[(0, 0, 1)]+=(0.38836794298-0.535946831494j)*x_ref[2]
+            arg[(0, 0, 2)]+=(0.798716412941-0.253867512382j)*x[2]
+            ref[(0, 0, 2)]+=(0.798716412941-0.253867512382j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.0193522559883-0.765949183482j)*x[2]
+            ref[(0, 1, 0)]+=(-0.0193522559883-0.765949183482j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.61108010086+0.227957866745j)*x[2]
+            ref[(0, 1, 1)]+=(0.61108010086+0.227957866745j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.18130013369+0.31094772414j)*x[2]
+            ref[(0, 1, 2)]+=(0.18130013369+0.31094772414j)*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.313635056038-0.708255048229j)*x[2]
+            ref[(0, 2, 0)]+=(-0.313635056038-0.708255048229j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.0674736791868-0.623358342143j)*x[2]
+            ref[(0, 2, 1)]+=(0.0674736791868-0.623358342143j)*x_ref[2]
+            arg[(0, 2, 2)]+=(0.888941296814+0.0834657049755j)*x[2]
+            ref[(0, 2, 2)]+=(0.888941296814+0.0834657049755j)*x_ref[2]
+            arg[(0, 3, 0)]+=(0.219517131099-0.848610031675j)*x[2]
+            ref[(0, 3, 0)]+=(0.219517131099-0.848610031675j)*x_ref[2]
+            arg[(0, 3, 1)]+=(-0.456688184182-0.115074222357j)*x[2]
+            ref[(0, 3, 1)]+=(-0.456688184182-0.115074222357j)*x_ref[2]
+            arg[(0, 3, 2)]+=(-0.0870476529715-0.895939853963j)*x[2]
+            ref[(0, 3, 2)]+=(-0.0870476529715-0.895939853963j)*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.88017398121-0.702835478824j)*x[2]
+            ref[(1, 0, 0)]+=(-0.88017398121-0.702835478824j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.78106828571+0.936995734788j)*x[2]
+            ref[(1, 0, 1)]+=(0.78106828571+0.936995734788j)*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.784813626628+0.986931418535j)*x[2]
+            ref[(1, 0, 2)]+=(-0.784813626628+0.986931418535j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.935252916202+0.196626114355j)*x[2]
+            ref[(1, 1, 0)]+=(0.935252916202+0.196626114355j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.737137031529+0.363335376767j)*x[2]
+            ref[(1, 1, 1)]+=(0.737137031529+0.363335376767j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.0514813788304+0.204907233706j)*x[2]
+            ref[(1, 1, 2)]+=(0.0514813788304+0.204907233706j)*x_ref[2]
+            arg[(1, 2, 0)]+=(0.671591758318-0.418675585097j)*x[2]
+            ref[(1, 2, 0)]+=(0.671591758318-0.418675585097j)*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.14706192489-0.102042113504j)*x[2]
+            ref[(1, 2, 1)]+=(-0.14706192489-0.102042113504j)*x_ref[2]
+            arg[(1, 2, 2)]+=(-0.901043873791+0.0855967119458j)*x[2]
+            ref[(1, 2, 2)]+=(-0.901043873791+0.0855967119458j)*x_ref[2]
+            arg[(1, 3, 0)]+=(-0.574235005766-0.0881786183322j)*x[2]
+            ref[(1, 3, 0)]+=(-0.574235005766-0.0881786183322j)*x_ref[2]
+            arg[(1, 3, 1)]+=(0.971991239956-0.168318295051j)*x[2]
+            ref[(1, 3, 1)]+=(0.971991239956-0.168318295051j)*x_ref[2]
+            arg[(1, 3, 2)]+=(-0.283476930483+0.98811496195j)*x[2]
+            ref[(1, 3, 2)]+=(-0.283476930483+0.98811496195j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4, 2),w)
+        ref = Data(0,(2, 2, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.00940191111371-0.528831886122j)*x[0] + ((0.560071399985+0.409011304686j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.00940191111371-0.528831886122j)*x_ref[0] + ((0.560071399985+0.409011304686j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.486785889-0.896999244707j)*x[0] + ((-0.664172479157+0.63378837293j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.486785889-0.896999244707j)*x_ref[0] + ((-0.664172479157+0.63378837293j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.691431116453+0.127611149645j)*x[0] + ((0.359608532377+0.672374257657j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.691431116453+0.127611149645j)*x_ref[0] + ((0.359608532377+0.672374257657j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.5899003764+0.509366982194j)*x[0] + ((-0.760962080717-0.431551357867j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.5899003764+0.509366982194j)*x_ref[0] + ((-0.760962080717-0.431551357867j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.345138893092-0.386720253964j)*x[0] + ((-0.419221899795+0.720158597001j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.345138893092-0.386720253964j)*x_ref[0] + ((-0.419221899795+0.720158597001j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.948953467971+0.0408012342179j)*x[0] + ((0.538062914538+0.401590488103j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.948953467971+0.0408012342179j)*x_ref[0] + ((0.538062914538+0.401590488103j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(0.203876673164-0.320369510998j)*x[0] + ((-0.083784044724+0.0655495836853j))*x[1]
+        ref[(0, 0, 3, 0)]=(0.203876673164-0.320369510998j)*x_ref[0] + ((-0.083784044724+0.0655495836853j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(0.711290879932-0.510319525413j)*x[0] + ((-0.614886816375+0.0492580448532j))*x[1]
+        ref[(0, 0, 3, 1)]=(0.711290879932-0.510319525413j)*x_ref[0] + ((-0.614886816375+0.0492580448532j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.232026951287-0.892359396079j)*x[0] + ((0.994628224078+0.803899036751j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.232026951287-0.892359396079j)*x_ref[0] + ((0.994628224078+0.803899036751j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.430152688298+0.240307604401j)*x[0] + ((-0.678810047326-0.0510786982557j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.430152688298+0.240307604401j)*x_ref[0] + ((-0.678810047326-0.0510786982557j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.0201197753722+0.476730430691j)*x[0] + ((0.721913448125+0.498256999794j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.0201197753722+0.476730430691j)*x_ref[0] + ((0.721913448125+0.498256999794j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.303798793009+0.834734613458j)*x[0] + ((-0.738324988104+0.921268482358j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.303798793009+0.834734613458j)*x_ref[0] + ((-0.738324988104+0.921268482358j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.507154851287+0.0639010460406j)*x[0] + ((0.997671381342+0.987447922796j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.507154851287+0.0639010460406j)*x_ref[0] + ((0.997671381342+0.987447922796j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.0878403600773-0.108475017528j)*x[0] + ((-0.618272591228+0.828777723782j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.0878403600773-0.108475017528j)*x_ref[0] + ((-0.618272591228+0.828777723782j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(0.103510512277+0.525805440739j)*x[0] + ((-0.975512460263-0.115387104134j))*x[1]
+        ref[(0, 1, 3, 0)]=(0.103510512277+0.525805440739j)*x_ref[0] + ((-0.975512460263-0.115387104134j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(0.4060487381-0.108810944196j)*x[0] + ((-0.341170324231-0.485160491674j))*x[1]
+        ref[(0, 1, 3, 1)]=(0.4060487381-0.108810944196j)*x_ref[0] + ((-0.341170324231-0.485160491674j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.986502403982-0.438023687415j)*x[0] + ((-0.555082514185+0.168991245638j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.986502403982-0.438023687415j)*x_ref[0] + ((-0.555082514185+0.168991245638j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.436026536607-0.408526404349j)*x[0] + ((0.988336539205+0.934518001065j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.436026536607-0.408526404349j)*x_ref[0] + ((0.988336539205+0.934518001065j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.293570667289-0.717177599992j)*x[0] + ((-0.9125491524+0.27498433722j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.293570667289-0.717177599992j)*x_ref[0] + ((-0.9125491524+0.27498433722j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.534428318169-0.533328753956j)*x[0] + ((0.349379588693-0.601968788495j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.534428318169-0.533328753956j)*x_ref[0] + ((0.349379588693-0.601968788495j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.0434949115612+0.146232686331j)*x[0] + ((-0.643294812973-0.872502298084j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.0434949115612+0.146232686331j)*x_ref[0] + ((-0.643294812973-0.872502298084j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.978515711356+0.565635097724j)*x[0] + ((-0.688390855858+0.554588273157j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.978515711356+0.565635097724j)*x_ref[0] + ((-0.688390855858+0.554588273157j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.259478547812+0.0473345490078j)*x[0] + ((-0.322080538271-0.590554698733j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.259478547812+0.0473345490078j)*x_ref[0] + ((-0.322080538271-0.590554698733j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.146398245705-0.00949606713303j)*x[0] + ((0.578188107623-0.936855783934j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.146398245705-0.00949606713303j)*x_ref[0] + ((0.578188107623-0.936855783934j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.340856108282+0.162329472263j)*x[0] + ((-0.639498288854-0.557460084195j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.340856108282+0.162329472263j)*x_ref[0] + ((-0.639498288854-0.557460084195j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.349345196619-0.530103338965j)*x[0] + ((-0.949023631152+0.736801515603j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.349345196619-0.530103338965j)*x_ref[0] + ((-0.949023631152+0.736801515603j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.734294247972+0.805939143124j)*x[0] + ((-0.158374523034+0.928177513917j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.734294247972+0.805939143124j)*x_ref[0] + ((-0.158374523034+0.928177513917j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.66688223002-0.761372008894j)*x[0] + ((0.342075500676-0.754832056072j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.66688223002-0.761372008894j)*x_ref[0] + ((0.342075500676-0.754832056072j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.566491297264+0.372062228542j)*x[0] + ((-0.82803366197+0.538937521777j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.566491297264+0.372062228542j)*x_ref[0] + ((-0.82803366197+0.538937521777j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.590360585551+0.0101626680011j)*x[0] + ((-0.964307295321+0.377162388926j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.590360585551+0.0101626680011j)*x_ref[0] + ((-0.964307295321+0.377162388926j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(-0.929886355461-0.360910528575j)*x[0] + ((-0.419758068471-0.829033948661j))*x[1]
+        ref[(1, 1, 3, 0)]=(-0.929886355461-0.360910528575j)*x_ref[0] + ((-0.419758068471-0.829033948661j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(-0.708432640709-0.293484918801j)*x[0] + ((0.947450416802+0.199583299732j))*x[1]
+        ref[(1, 1, 3, 1)]=(-0.708432640709-0.293484918801j)*x_ref[0] + ((0.947450416802+0.199583299732j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.449499990204+0.635429835999j)*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.449499990204+0.635429835999j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.576880556088-0.851759751806j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.576880556088-0.851759751806j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.66529746364-0.62963907829j)*x[2]
+            ref[(0, 0, 1, 0)]+=(0.66529746364-0.62963907829j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.130148327685-0.0821881475071j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.130148327685-0.0821881475071j)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.125186565563+0.564387257844j)*x[2]
+            ref[(0, 0, 2, 0)]+=(0.125186565563+0.564387257844j)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.339563901151+0.903975950743j)*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.339563901151+0.903975950743j)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(-0.763147168603-0.93464399511j)*x[2]
+            ref[(0, 0, 3, 0)]+=(-0.763147168603-0.93464399511j)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(-0.376178672326+0.00329502170286j)*x[2]
+            ref[(0, 0, 3, 1)]+=(-0.376178672326+0.00329502170286j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.162327748126-0.370149495247j)*x[2]
+            ref[(0, 1, 0, 0)]+=(0.162327748126-0.370149495247j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.199677560223-0.65680351763j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.199677560223-0.65680351763j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.230082554327-0.626017825046j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.230082554327-0.626017825046j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.938713859528-0.343031773175j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.938713859528-0.343031773175j)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.37197149701+0.781023176858j)*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.37197149701+0.781023176858j)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.780628555337+0.00620120751062j)*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.780628555337+0.00620120751062j)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(0.247847185375-0.317038644459j)*x[2]
+            ref[(0, 1, 3, 0)]+=(0.247847185375-0.317038644459j)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(0.120765939959-0.760122401157j)*x[2]
+            ref[(0, 1, 3, 1)]+=(0.120765939959-0.760122401157j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.169724349836+0.418741711006j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.169724349836+0.418741711006j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.790895424714+0.623860676129j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.790895424714+0.623860676129j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.98889820327+0.35568616168j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.98889820327+0.35568616168j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.914989388591-0.896705696987j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.914989388591-0.896705696987j)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.913201417147+0.382976719505j)*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.913201417147+0.382976719505j)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.00602016469425+0.956921620821j)*x[2]
+            ref[(1, 0, 2, 1)]+=(0.00602016469425+0.956921620821j)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(0.779440757447-0.748386468066j)*x[2]
+            ref[(1, 0, 3, 0)]+=(0.779440757447-0.748386468066j)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(-0.470555167905-0.031470010702j)*x[2]
+            ref[(1, 0, 3, 1)]+=(-0.470555167905-0.031470010702j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.0616052924009-0.696102647497j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.0616052924009-0.696102647497j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.213612225447+0.562585674805j)*x[2]
+            ref[(1, 1, 0, 1)]+=(0.213612225447+0.562585674805j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.166659790368-0.985091209287j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.166659790368-0.985091209287j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.156349858823-0.562092343255j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.156349858823-0.562092343255j)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.684978234991+0.245786384909j)*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.684978234991+0.245786384909j)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.714958311319+0.972901009248j)*x[2]
+            ref[(1, 1, 2, 1)]+=(0.714958311319+0.972901009248j)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(-0.722021254006-0.636266311804j)*x[2]
+            ref[(1, 1, 3, 0)]+=(-0.722021254006-0.636266311804j)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(0.260427094411-0.262243900707j)*x[2]
+            ref[(1, 1, 3, 1)]+=(0.260427094411-0.262243900707j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.824298671984-0.918090527906j)*x[0] + ((-0.197751601724+0.225428886033j))*x[1]
+        ref=(0.824298671984-0.918090527906j)*x_ref[0] + ((-0.197751601724+0.225428886033j))*x_ref[1]
+        if dim==3:
+            arg+=((0.507544988658+0.646671520605j))*x[2]
+            ref+=((0.507544988658+0.646671520605j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.483647297308+0.586033975367j)*x[0] + ((0.255698941092-0.587702936859j))*x[1]
+        ref[(0,)]=(0.483647297308+0.586033975367j)*x_ref[0] + ((0.255698941092-0.587702936859j))*x_ref[1]
+        arg[(1,)]=(-0.267513106677-0.16921699514j)*x[0] + ((-0.497128026893-0.456259583089j))*x[1]
+        ref[(1,)]=(-0.267513106677-0.16921699514j)*x_ref[0] + ((-0.497128026893-0.456259583089j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.734978020674-0.929689935232j)*x[2]
+            ref[(0,)]+=(-0.734978020674-0.929689935232j)*x_ref[2]
+            arg[(1,)]+=(0.661131371553-0.261957522345j)*x[2]
+            ref[(1,)]+=(0.661131371553-0.261957522345j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(0.399962420748+0.0406923132585j)*x[0] + ((-0.0534986903657+0.614543898009j))*x[1]
+        ref[(0, 0)]=(0.399962420748+0.0406923132585j)*x_ref[0] + ((-0.0534986903657+0.614543898009j))*x_ref[1]
+        arg[(0, 1)]=(-0.199113197561-0.297905253295j)*x[0] + ((-0.83093924128+0.610688052958j))*x[1]
+        ref[(0, 1)]=(-0.199113197561-0.297905253295j)*x_ref[0] + ((-0.83093924128+0.610688052958j))*x_ref[1]
+        arg[(0, 2)]=(0.0185958225324-0.867342862444j)*x[0] + ((0.603484257648+0.0839483762674j))*x[1]
+        ref[(0, 2)]=(0.0185958225324-0.867342862444j)*x_ref[0] + ((0.603484257648+0.0839483762674j))*x_ref[1]
+        arg[(0, 3)]=(-0.910551786984-0.534265561901j)*x[0] + ((-0.151360722338+0.791955697466j))*x[1]
+        ref[(0, 3)]=(-0.910551786984-0.534265561901j)*x_ref[0] + ((-0.151360722338+0.791955697466j))*x_ref[1]
+        arg[(1, 0)]=(-0.961401460301-0.429540048769j)*x[0] + ((0.871235301804-0.751066527138j))*x[1]
+        ref[(1, 0)]=(-0.961401460301-0.429540048769j)*x_ref[0] + ((0.871235301804-0.751066527138j))*x_ref[1]
+        arg[(1, 1)]=(0.953086274173+0.603211397139j)*x[0] + ((0.2190431742+0.224840536226j))*x[1]
+        ref[(1, 1)]=(0.953086274173+0.603211397139j)*x_ref[0] + ((0.2190431742+0.224840536226j))*x_ref[1]
+        arg[(1, 2)]=(0.846972393814+0.583508090853j)*x[0] + ((-0.636510102844+0.518355182456j))*x[1]
+        ref[(1, 2)]=(0.846972393814+0.583508090853j)*x_ref[0] + ((-0.636510102844+0.518355182456j))*x_ref[1]
+        arg[(1, 3)]=(0.977678730206-0.563953305587j)*x[0] + ((0.18741892846-0.923746778417j))*x[1]
+        ref[(1, 3)]=(0.977678730206-0.563953305587j)*x_ref[0] + ((0.18741892846-0.923746778417j))*x_ref[1]
+        arg[(2, 0)]=(0.614155954877-0.346721379533j)*x[0] + ((-0.847976974696-0.608955719328j))*x[1]
+        ref[(2, 0)]=(0.614155954877-0.346721379533j)*x_ref[0] + ((-0.847976974696-0.608955719328j))*x_ref[1]
+        arg[(2, 1)]=(-0.0317475599883-0.603116768714j)*x[0] + ((0.843869059431+0.747758471365j))*x[1]
+        ref[(2, 1)]=(-0.0317475599883-0.603116768714j)*x_ref[0] + ((0.843869059431+0.747758471365j))*x_ref[1]
+        arg[(2, 2)]=(0.147432098859-0.430755211959j)*x[0] + ((-0.260873864772-0.195343692924j))*x[1]
+        ref[(2, 2)]=(0.147432098859-0.430755211959j)*x_ref[0] + ((-0.260873864772-0.195343692924j))*x_ref[1]
+        arg[(2, 3)]=(-0.129195929991+0.782713415041j)*x[0] + ((-0.370169605692-0.340594938152j))*x[1]
+        ref[(2, 3)]=(-0.129195929991+0.782713415041j)*x_ref[0] + ((-0.370169605692-0.340594938152j))*x_ref[1]
+        arg[(3, 0)]=(-0.420832586251+0.797834577955j)*x[0] + ((0.984400545154+0.988084386781j))*x[1]
+        ref[(3, 0)]=(-0.420832586251+0.797834577955j)*x_ref[0] + ((0.984400545154+0.988084386781j))*x_ref[1]
+        arg[(3, 1)]=(0.235740076487+0.473659282094j)*x[0] + ((-0.750431745324-0.407228738011j))*x[1]
+        ref[(3, 1)]=(0.235740076487+0.473659282094j)*x_ref[0] + ((-0.750431745324-0.407228738011j))*x_ref[1]
+        arg[(3, 2)]=(-0.746687273371-0.492300414949j)*x[0] + ((0.669274568327-0.80594583286j))*x[1]
+        ref[(3, 2)]=(-0.746687273371-0.492300414949j)*x_ref[0] + ((0.669274568327-0.80594583286j))*x_ref[1]
+        arg[(3, 3)]=(0.472808177081+0.321060353589j)*x[0] + ((0.744933693682-0.575440426696j))*x[1]
+        ref[(3, 3)]=(0.472808177081+0.321060353589j)*x_ref[0] + ((0.744933693682-0.575440426696j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.22492798824-0.512568285255j)*x[2]
+            ref[(0, 0)]+=(0.22492798824-0.512568285255j)*x_ref[2]
+            arg[(0, 1)]+=(-0.615275462629+0.0542486643093j)*x[2]
+            ref[(0, 1)]+=(-0.615275462629+0.0542486643093j)*x_ref[2]
+            arg[(0, 2)]+=(-0.365350095405+0.359119459051j)*x[2]
+            ref[(0, 2)]+=(-0.365350095405+0.359119459051j)*x_ref[2]
+            arg[(0, 3)]+=(0.719455478718+0.386297313608j)*x[2]
+            ref[(0, 3)]+=(0.719455478718+0.386297313608j)*x_ref[2]
+            arg[(1, 0)]+=(-0.430615201372-0.66413264208j)*x[2]
+            ref[(1, 0)]+=(-0.430615201372-0.66413264208j)*x_ref[2]
+            arg[(1, 1)]+=(0.804799128517-0.306865908866j)*x[2]
+            ref[(1, 1)]+=(0.804799128517-0.306865908866j)*x_ref[2]
+            arg[(1, 2)]+=(0.834408861664-0.205137783296j)*x[2]
+            ref[(1, 2)]+=(0.834408861664-0.205137783296j)*x_ref[2]
+            arg[(1, 3)]+=(-0.049964096195+0.598885625997j)*x[2]
+            ref[(1, 3)]+=(-0.049964096195+0.598885625997j)*x_ref[2]
+            arg[(2, 0)]+=(0.103743961629-0.962031881248j)*x[2]
+            ref[(2, 0)]+=(0.103743961629-0.962031881248j)*x_ref[2]
+            arg[(2, 1)]+=(-0.227909129731+0.905779503951j)*x[2]
+            ref[(2, 1)]+=(-0.227909129731+0.905779503951j)*x_ref[2]
+            arg[(2, 2)]+=(-0.99873954288+0.1656029428j)*x[2]
+            ref[(2, 2)]+=(-0.99873954288+0.1656029428j)*x_ref[2]
+            arg[(2, 3)]+=(0.0353440165742+0.421320699535j)*x[2]
+            ref[(2, 3)]+=(0.0353440165742+0.421320699535j)*x_ref[2]
+            arg[(3, 0)]+=(-0.748581306208+0.239114801511j)*x[2]
+            ref[(3, 0)]+=(-0.748581306208+0.239114801511j)*x_ref[2]
+            arg[(3, 1)]+=(0.660822583375-0.205377223728j)*x[2]
+            ref[(3, 1)]+=(0.660822583375-0.205377223728j)*x_ref[2]
+            arg[(3, 2)]+=(-0.0244969566411+0.911415151565j)*x[2]
+            ref[(3, 2)]+=(-0.0244969566411+0.911415151565j)*x_ref[2]
+            arg[(3, 3)]+=(0.159194399616-0.709509913349j)*x[2]
+            ref[(3, 3)]+=(0.159194399616-0.709509913349j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.0974437753787-0.554582238205j)*x[0] + ((-0.200263069642-0.045900581484j))*x[1]
+        ref[(0, 0, 0)]=(-0.0974437753787-0.554582238205j)*x_ref[0] + ((-0.200263069642-0.045900581484j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.116539787177+0.738098838551j)*x[0] + ((0.755137973664-0.281618236717j))*x[1]
+        ref[(0, 0, 1)]=(-0.116539787177+0.738098838551j)*x_ref[0] + ((0.755137973664-0.281618236717j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.808095814086-0.494618271773j)*x[0] + ((0.89627662031+0.600581886981j))*x[1]
+        ref[(0, 1, 0)]=(-0.808095814086-0.494618271773j)*x_ref[0] + ((0.89627662031+0.600581886981j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.357306667526+0.0370680325852j)*x[0] + ((-0.305441316862+0.239535560269j))*x[1]
+        ref[(0, 1, 1)]=(-0.357306667526+0.0370680325852j)*x_ref[0] + ((-0.305441316862+0.239535560269j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.958261465948+0.848092856204j)*x[0] + ((0.605368399288+0.224115374522j))*x[1]
+        ref[(0, 2, 0)]=(-0.958261465948+0.848092856204j)*x_ref[0] + ((0.605368399288+0.224115374522j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.094176358455+0.294364543724j)*x[0] + ((-0.994491444462+0.443515929771j))*x[1]
+        ref[(0, 2, 1)]=(0.094176358455+0.294364543724j)*x_ref[0] + ((-0.994491444462+0.443515929771j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.0561169897943+0.972141122621j)*x[0] + ((-0.762677682318-0.728291410735j))*x[1]
+        ref[(1, 0, 0)]=(0.0561169897943+0.972141122621j)*x_ref[0] + ((-0.762677682318-0.728291410735j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.305174675708+0.835066873798j)*x[0] + ((-0.306419456136+0.383765804573j))*x[1]
+        ref[(1, 0, 1)]=(0.305174675708+0.835066873798j)*x_ref[0] + ((-0.306419456136+0.383765804573j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.44116217335-0.870116760301j)*x[0] + ((-0.0740465609219-0.421109781799j))*x[1]
+        ref[(1, 1, 0)]=(-0.44116217335-0.870116760301j)*x_ref[0] + ((-0.0740465609219-0.421109781799j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.918051489487+0.815884894912j)*x[0] + ((-0.485319056426-0.173121024752j))*x[1]
+        ref[(1, 1, 1)]=(0.918051489487+0.815884894912j)*x_ref[0] + ((-0.485319056426-0.173121024752j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.241680679687+0.794618082608j)*x[0] + ((0.689578406405-0.765022616795j))*x[1]
+        ref[(1, 2, 0)]=(-0.241680679687+0.794618082608j)*x_ref[0] + ((0.689578406405-0.765022616795j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.435311285559+0.954329598742j)*x[0] + ((0.186155619801+0.722281040254j))*x[1]
+        ref[(1, 2, 1)]=(0.435311285559+0.954329598742j)*x_ref[0] + ((0.186155619801+0.722281040254j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.0971949050709-0.410367074841j)*x[0] + ((-0.956415087026+0.753819458606j))*x[1]
+        ref[(2, 0, 0)]=(-0.0971949050709-0.410367074841j)*x_ref[0] + ((-0.956415087026+0.753819458606j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.672870683455-0.346879700315j)*x[0] + ((-0.784134205678-0.480712311282j))*x[1]
+        ref[(2, 0, 1)]=(-0.672870683455-0.346879700315j)*x_ref[0] + ((-0.784134205678-0.480712311282j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.134442742326-0.268208625502j)*x[0] + ((-0.988732062333+0.571659164472j))*x[1]
+        ref[(2, 1, 0)]=(-0.134442742326-0.268208625502j)*x_ref[0] + ((-0.988732062333+0.571659164472j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.139646793581-0.327947825322j)*x[0] + ((-0.340027052568+0.319519390491j))*x[1]
+        ref[(2, 1, 1)]=(0.139646793581-0.327947825322j)*x_ref[0] + ((-0.340027052568+0.319519390491j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.87644246252-0.0417560886689j)*x[0] + ((0.482059210162-0.808186812685j))*x[1]
+        ref[(2, 2, 0)]=(-0.87644246252-0.0417560886689j)*x_ref[0] + ((0.482059210162-0.808186812685j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.947480126782-0.903643271216j)*x[0] + ((-0.261598856642-0.638204308202j))*x[1]
+        ref[(2, 2, 1)]=(-0.947480126782-0.903643271216j)*x_ref[0] + ((-0.261598856642-0.638204308202j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.924657836272+0.50197212673j)*x[0] + ((0.154450213111+0.52557046244j))*x[1]
+        ref[(3, 0, 0)]=(-0.924657836272+0.50197212673j)*x_ref[0] + ((0.154450213111+0.52557046244j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.814957382603-0.779448255575j)*x[0] + ((-0.288744920856+0.0681267906339j))*x[1]
+        ref[(3, 0, 1)]=(0.814957382603-0.779448255575j)*x_ref[0] + ((-0.288744920856+0.0681267906339j))*x_ref[1]
+        arg[(3, 1, 0)]=(0.732664824802+0.510581466165j)*x[0] + ((-0.633491467257+0.390696654817j))*x[1]
+        ref[(3, 1, 0)]=(0.732664824802+0.510581466165j)*x_ref[0] + ((-0.633491467257+0.390696654817j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.817974661499-0.824380984194j)*x[0] + ((-0.302627264243+0.405511689529j))*x[1]
+        ref[(3, 1, 1)]=(-0.817974661499-0.824380984194j)*x_ref[0] + ((-0.302627264243+0.405511689529j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.331409178421+0.488261381237j)*x[0] + ((0.103987557363+0.021669086406j))*x[1]
+        ref[(3, 2, 0)]=(0.331409178421+0.488261381237j)*x_ref[0] + ((0.103987557363+0.021669086406j))*x_ref[1]
+        arg[(3, 2, 1)]=(0.755652606671-0.247861386742j)*x[0] + ((0.0923564292615-0.502163274124j))*x[1]
+        ref[(3, 2, 1)]=(0.755652606671-0.247861386742j)*x_ref[0] + ((0.0923564292615-0.502163274124j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.103550560204-0.982395534811j)*x[2]
+            ref[(0, 0, 0)]+=(0.103550560204-0.982395534811j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.117285835281+0.853398953628j)*x[2]
+            ref[(0, 0, 1)]+=(0.117285835281+0.853398953628j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.0195141186762+0.353537961167j)*x[2]
+            ref[(0, 1, 0)]+=(-0.0195141186762+0.353537961167j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.304346465412+0.0973274195889j)*x[2]
+            ref[(0, 1, 1)]+=(0.304346465412+0.0973274195889j)*x_ref[2]
+            arg[(0, 2, 0)]+=(0.776702164994+0.119680507107j)*x[2]
+            ref[(0, 2, 0)]+=(0.776702164994+0.119680507107j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.655366854563-0.925385557075j)*x[2]
+            ref[(0, 2, 1)]+=(0.655366854563-0.925385557075j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.49331689304+0.834825184211j)*x[2]
+            ref[(1, 0, 0)]+=(0.49331689304+0.834825184211j)*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.651822342076+0.345819645396j)*x[2]
+            ref[(1, 0, 1)]+=(-0.651822342076+0.345819645396j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.152505197154-0.89594592423j)*x[2]
+            ref[(1, 1, 0)]+=(-0.152505197154-0.89594592423j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.476579641761-0.818470459477j)*x[2]
+            ref[(1, 1, 1)]+=(-0.476579641761-0.818470459477j)*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.943520496058+0.503064720504j)*x[2]
+            ref[(1, 2, 0)]+=(-0.943520496058+0.503064720504j)*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.156786539166+0.399446921961j)*x[2]
+            ref[(1, 2, 1)]+=(-0.156786539166+0.399446921961j)*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.0211387289529+0.258189715436j)*x[2]
+            ref[(2, 0, 0)]+=(-0.0211387289529+0.258189715436j)*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.390516711383-0.921374421805j)*x[2]
+            ref[(2, 0, 1)]+=(-0.390516711383-0.921374421805j)*x_ref[2]
+            arg[(2, 1, 0)]+=(0.551471166603+0.861548900105j)*x[2]
+            ref[(2, 1, 0)]+=(0.551471166603+0.861548900105j)*x_ref[2]
+            arg[(2, 1, 1)]+=(0.332023925125+0.527131677775j)*x[2]
+            ref[(2, 1, 1)]+=(0.332023925125+0.527131677775j)*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.547609117132-0.206995874264j)*x[2]
+            ref[(2, 2, 0)]+=(-0.547609117132-0.206995874264j)*x_ref[2]
+            arg[(2, 2, 1)]+=(0.99960028291-0.893588299506j)*x[2]
+            ref[(2, 2, 1)]+=(0.99960028291-0.893588299506j)*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.740417586744-0.641211424365j)*x[2]
+            ref[(3, 0, 0)]+=(-0.740417586744-0.641211424365j)*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.374498925553+0.522229972804j)*x[2]
+            ref[(3, 0, 1)]+=(-0.374498925553+0.522229972804j)*x_ref[2]
+            arg[(3, 1, 0)]+=(0.177473742898-0.319919652302j)*x[2]
+            ref[(3, 1, 0)]+=(0.177473742898-0.319919652302j)*x_ref[2]
+            arg[(3, 1, 1)]+=(0.394345492822-0.0929923819968j)*x[2]
+            ref[(3, 1, 1)]+=(0.394345492822-0.0929923819968j)*x_ref[2]
+            arg[(3, 2, 0)]+=(0.24792639543+0.836636549447j)*x[2]
+            ref[(3, 2, 0)]+=(0.24792639543+0.836636549447j)*x_ref[2]
+            arg[(3, 2, 1)]+=(-0.826961946588+0.910965345195j)*x[2]
+            ref[(3, 2, 1)]+=(-0.826961946588+0.910965345195j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2, 4),w)
+        ref = Data(0,(4, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(0.0383159322456+0.246587857562j)*x[0] + ((0.879245337451-0.475800210461j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.0383159322456+0.246587857562j)*x_ref[0] + ((0.879245337451-0.475800210461j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.834954352353-0.75008905425j)*x[0] + ((-0.185192856949-0.876465995868j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.834954352353-0.75008905425j)*x_ref[0] + ((-0.185192856949-0.876465995868j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.999295285816-0.750926681081j)*x[0] + ((-0.831410467518-0.14570046282j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.999295285816-0.750926681081j)*x_ref[0] + ((-0.831410467518-0.14570046282j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.924804577726-0.334276094646j)*x[0] + ((-0.572774279101-0.459563961756j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.924804577726-0.334276094646j)*x_ref[0] + ((-0.572774279101-0.459563961756j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.604399149682+0.668322153356j)*x[0] + ((0.667365236561-0.325697062796j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.604399149682+0.668322153356j)*x_ref[0] + ((0.667365236561-0.325697062796j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.963325063015+0.975210807196j)*x[0] + ((-0.121954993654+0.637803924464j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.963325063015+0.975210807196j)*x_ref[0] + ((-0.121954993654+0.637803924464j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.104837291355+0.390377287448j)*x[0] + ((-0.73215405723-0.358473913035j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.104837291355+0.390377287448j)*x_ref[0] + ((-0.73215405723-0.358473913035j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.874089985549+0.612075694041j)*x[0] + ((0.520933679203+0.845698893251j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.874089985549+0.612075694041j)*x_ref[0] + ((0.520933679203+0.845698893251j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.976200655288+0.114535705752j)*x[0] + ((-0.67919865755+0.681816933319j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.976200655288+0.114535705752j)*x_ref[0] + ((-0.67919865755+0.681816933319j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.529714054639+0.101802624544j)*x[0] + ((-0.441874445313-0.694718524274j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.529714054639+0.101802624544j)*x_ref[0] + ((-0.441874445313-0.694718524274j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.853854084892+0.162401156696j)*x[0] + ((-0.260752602586+0.470893135816j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.853854084892+0.162401156696j)*x_ref[0] + ((-0.260752602586+0.470893135816j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.141446545702-0.4965275791j)*x[0] + ((0.366379445676-0.647954379206j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.141446545702-0.4965275791j)*x_ref[0] + ((0.366379445676-0.647954379206j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.0112623984521+0.373213177292j)*x[0] + ((0.592051527223-0.829000579962j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.0112623984521+0.373213177292j)*x_ref[0] + ((0.592051527223-0.829000579962j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.989698707796+0.438941094883j)*x[0] + ((0.912496129914+0.838475889233j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.989698707796+0.438941094883j)*x_ref[0] + ((0.912496129914+0.838475889233j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.683703786553-0.430851729618j)*x[0] + ((0.174827110109-0.876766446513j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.683703786553-0.430851729618j)*x_ref[0] + ((0.174827110109-0.876766446513j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.464590052807-0.149208672698j)*x[0] + ((-0.288309216372-0.131291840932j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.464590052807-0.149208672698j)*x_ref[0] + ((-0.288309216372-0.131291840932j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.602821803751-0.944475136562j)*x[0] + ((-0.278460817225-0.503529514221j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.602821803751-0.944475136562j)*x_ref[0] + ((-0.278460817225-0.503529514221j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.315743298322-0.175359166887j)*x[0] + ((-0.365101467762-0.0468157876294j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.315743298322-0.175359166887j)*x_ref[0] + ((-0.365101467762-0.0468157876294j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.918702034851+0.677776883517j)*x[0] + ((-0.661676906318-0.125336325029j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.918702034851+0.677776883517j)*x_ref[0] + ((-0.661676906318-0.125336325029j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.787820301267+0.481784993354j)*x[0] + ((-0.389593526572-0.256023011417j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.787820301267+0.481784993354j)*x_ref[0] + ((-0.389593526572-0.256023011417j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.813476915645+0.211184440789j)*x[0] + ((0.872332069033+0.428715502626j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.813476915645+0.211184440789j)*x_ref[0] + ((0.872332069033+0.428715502626j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.41230458444+0.325321592717j)*x[0] + ((-0.56918686184+0.263536026109j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.41230458444+0.325321592717j)*x_ref[0] + ((-0.56918686184+0.263536026109j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.832643479137-0.0456368657699j)*x[0] + ((0.638289978449+0.794672417474j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.832643479137-0.0456368657699j)*x_ref[0] + ((0.638289978449+0.794672417474j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.241081237039-0.528232091236j)*x[0] + ((-0.343107294695-0.192064404711j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.241081237039-0.528232091236j)*x_ref[0] + ((-0.343107294695-0.192064404711j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.847989876696+0.248881559981j)*x[0] + ((0.580194319297+0.663364160486j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.847989876696+0.248881559981j)*x_ref[0] + ((0.580194319297+0.663364160486j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.13514868153-0.706152926377j)*x[0] + ((0.0147229632177-0.610183155666j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.13514868153-0.706152926377j)*x_ref[0] + ((0.0147229632177-0.610183155666j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.886209858145-0.0659778561189j)*x[0] + ((-0.441832767602+0.681484150409j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.886209858145-0.0659778561189j)*x_ref[0] + ((-0.441832767602+0.681484150409j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.706841428614-0.728282400978j)*x[0] + ((-0.772080215893-0.0563462997086j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.706841428614-0.728282400978j)*x_ref[0] + ((-0.772080215893-0.0563462997086j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.514303321408+0.572289855899j)*x[0] + ((0.270835755676-0.581545434588j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.514303321408+0.572289855899j)*x_ref[0] + ((0.270835755676-0.581545434588j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.52608506654-0.719422185723j)*x[0] + ((-0.595903992575+0.171304847504j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.52608506654-0.719422185723j)*x_ref[0] + ((-0.595903992575+0.171304847504j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.421575037322+0.404015738816j)*x[0] + ((0.41677592096-0.335804035558j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.421575037322+0.404015738816j)*x_ref[0] + ((0.41677592096-0.335804035558j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.103832466605-0.384073260183j)*x[0] + ((-0.150085363176-0.848063410606j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.103832466605-0.384073260183j)*x_ref[0] + ((-0.150085363176-0.848063410606j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.485535813884+0.266395735643j)*x[0] + ((-0.818046484284-0.262365183535j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.485535813884+0.266395735643j)*x_ref[0] + ((-0.818046484284-0.262365183535j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.676840602897+0.86028351224j)*x[0] + ((-0.060110667346+0.939466267749j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.676840602897+0.86028351224j)*x_ref[0] + ((-0.060110667346+0.939466267749j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.504113261025+0.106314792638j)*x[0] + ((0.523416084656-0.762141916345j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.504113261025+0.106314792638j)*x_ref[0] + ((0.523416084656-0.762141916345j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.907705868291-0.992509235772j)*x[0] + ((0.252930494335-0.862775555534j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.907705868291-0.992509235772j)*x_ref[0] + ((0.252930494335-0.862775555534j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.390399181663-0.603872883246j)*x[0] + ((0.280498341207-0.438115008876j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.390399181663-0.603872883246j)*x_ref[0] + ((0.280498341207-0.438115008876j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.193058820459-0.457076066583j)*x[0] + ((-0.241689137961+0.24651988562j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.193058820459-0.457076066583j)*x_ref[0] + ((-0.241689137961+0.24651988562j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.556339497538+0.0910927415772j)*x[0] + ((0.0721671740501+0.320179877373j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.556339497538+0.0910927415772j)*x_ref[0] + ((0.0721671740501+0.320179877373j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(0.603983509118-0.504568099819j)*x[0] + ((-0.478659476593-0.912078163254j))*x[1]
+        ref[(2, 0, 1, 3)]=(0.603983509118-0.504568099819j)*x_ref[0] + ((-0.478659476593-0.912078163254j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.864242409224+0.686629158017j)*x[0] + ((0.437814903897+0.263407802149j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.864242409224+0.686629158017j)*x_ref[0] + ((0.437814903897+0.263407802149j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.0467849259365+0.59260326262j)*x[0] + ((0.456985321244+0.630023266801j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.0467849259365+0.59260326262j)*x_ref[0] + ((0.456985321244+0.630023266801j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.125831819806+0.573948568105j)*x[0] + ((0.861013786558-0.554906765972j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.125831819806+0.573948568105j)*x_ref[0] + ((0.861013786558-0.554906765972j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.584290340921+0.39558990514j)*x[0] + ((0.96094032386+0.485768401083j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.584290340921+0.39558990514j)*x_ref[0] + ((0.96094032386+0.485768401083j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.450892777205+0.0106920909874j)*x[0] + ((0.213993083947-0.118496458962j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.450892777205+0.0106920909874j)*x_ref[0] + ((0.213993083947-0.118496458962j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.314871085893-0.350377570797j)*x[0] + ((0.53613844425-0.20628750215j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.314871085893-0.350377570797j)*x_ref[0] + ((0.53613844425-0.20628750215j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.925620096054-0.387342214917j)*x[0] + ((0.805521653316+0.0600889443465j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.925620096054-0.387342214917j)*x_ref[0] + ((0.805521653316+0.0600889443465j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(-0.423738361772+0.299273972373j)*x[0] + ((-0.92333084325+0.8175758967j))*x[1]
+        ref[(2, 1, 1, 3)]=(-0.423738361772+0.299273972373j)*x_ref[0] + ((-0.92333084325+0.8175758967j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.631709464769+0.156129024827j)*x[0] + ((-0.0598225482031+0.549810156951j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.631709464769+0.156129024827j)*x_ref[0] + ((-0.0598225482031+0.549810156951j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.170712542389-0.859262661694j)*x[0] + ((0.744299375087+0.945175728064j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.170712542389-0.859262661694j)*x_ref[0] + ((0.744299375087+0.945175728064j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(0.0996815739445+0.156061186646j)*x[0] + ((0.0897765219917-0.8474221906j))*x[1]
+        ref[(3, 0, 0, 2)]=(0.0996815739445+0.156061186646j)*x_ref[0] + ((0.0897765219917-0.8474221906j))*x_ref[1]
+        arg[(3, 0, 0, 3)]=(0.547111589848-0.757085413287j)*x[0] + ((0.466631132372-0.234643063168j))*x[1]
+        ref[(3, 0, 0, 3)]=(0.547111589848-0.757085413287j)*x_ref[0] + ((0.466631132372-0.234643063168j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.715512917189+0.535558641274j)*x[0] + ((0.744341603597+0.647530201499j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.715512917189+0.535558641274j)*x_ref[0] + ((0.744341603597+0.647530201499j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.74286502435-0.773191695108j)*x[0] + ((-0.256383213535+0.979245903492j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.74286502435-0.773191695108j)*x_ref[0] + ((-0.256383213535+0.979245903492j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(-0.743559754135-0.0969632950017j)*x[0] + ((0.689167024768-0.333900499546j))*x[1]
+        ref[(3, 0, 1, 2)]=(-0.743559754135-0.0969632950017j)*x_ref[0] + ((0.689167024768-0.333900499546j))*x_ref[1]
+        arg[(3, 0, 1, 3)]=(0.597794459763-0.940897281433j)*x[0] + ((0.695825823133+0.541030166223j))*x[1]
+        ref[(3, 0, 1, 3)]=(0.597794459763-0.940897281433j)*x_ref[0] + ((0.695825823133+0.541030166223j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.767322308272-0.851976380318j)*x[0] + ((0.63074899792-0.987777554374j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.767322308272-0.851976380318j)*x_ref[0] + ((0.63074899792-0.987777554374j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.115633518754+0.332540547488j)*x[0] + ((-0.551556660556-0.303426993419j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.115633518754+0.332540547488j)*x_ref[0] + ((-0.551556660556-0.303426993419j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(-0.502411999333-0.0605013630362j)*x[0] + ((0.0232657995745+0.540640265812j))*x[1]
+        ref[(3, 1, 0, 2)]=(-0.502411999333-0.0605013630362j)*x_ref[0] + ((0.0232657995745+0.540640265812j))*x_ref[1]
+        arg[(3, 1, 0, 3)]=(-0.334972548112+0.184255465635j)*x[0] + ((0.677036546822+0.587764492464j))*x[1]
+        ref[(3, 1, 0, 3)]=(-0.334972548112+0.184255465635j)*x_ref[0] + ((0.677036546822+0.587764492464j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.0425629984301+0.528144720046j)*x[0] + ((-0.847870871674-0.639254650899j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.0425629984301+0.528144720046j)*x_ref[0] + ((-0.847870871674-0.639254650899j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.516369671496-0.125822420374j)*x[0] + ((-0.192197335212+0.0423934078522j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.516369671496-0.125822420374j)*x_ref[0] + ((-0.192197335212+0.0423934078522j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(0.355381637778+0.83560354035j)*x[0] + ((0.493736859594+0.803580115488j))*x[1]
+        ref[(3, 1, 1, 2)]=(0.355381637778+0.83560354035j)*x_ref[0] + ((0.493736859594+0.803580115488j))*x_ref[1]
+        arg[(3, 1, 1, 3)]=(0.784742512544-0.714288255073j)*x[0] + ((-0.598551528482+0.669981391891j))*x[1]
+        ref[(3, 1, 1, 3)]=(0.784742512544-0.714288255073j)*x_ref[0] + ((-0.598551528482+0.669981391891j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.468890432953+0.234155882245j)*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.468890432953+0.234155882245j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.311001353615+0.636927040901j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.311001353615+0.636927040901j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.381481596005-0.227553341316j)*x[2]
+            ref[(0, 0, 0, 2)]+=(0.381481596005-0.227553341316j)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.402466800298+0.014899806777j)*x[2]
+            ref[(0, 0, 0, 3)]+=(0.402466800298+0.014899806777j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.110836110805-0.75043665602j)*x[2]
+            ref[(0, 0, 1, 0)]+=(0.110836110805-0.75043665602j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.601123937178+0.459502952863j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.601123937178+0.459502952863j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.879873176483-0.668040407276j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.879873176483-0.668040407276j)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.673608441922+0.117599045406j)*x[2]
+            ref[(0, 0, 1, 3)]+=(0.673608441922+0.117599045406j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.582969483619+0.267702718813j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.582969483619+0.267702718813j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.831541878991+0.138326167034j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.831541878991+0.138326167034j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.736536077855-0.302995677914j)*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.736536077855-0.302995677914j)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.0827009265252+0.420944961858j)*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.0827009265252+0.420944961858j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.141229606115+0.338244109156j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.141229606115+0.338244109156j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.393464502762-0.0635902671705j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.393464502762-0.0635902671705j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.18824722998-0.825060291086j)*x[2]
+            ref[(0, 1, 1, 2)]+=(0.18824722998-0.825060291086j)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.635586922113+0.408516159901j)*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.635586922113+0.408516159901j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.390147120968-0.844625851053j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.390147120968-0.844625851053j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.263775220674-0.0355094536131j)*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.263775220674-0.0355094536131j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.474260796705+0.940089182428j)*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.474260796705+0.940089182428j)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.816898763458+0.701638556814j)*x[2]
+            ref[(1, 0, 0, 3)]+=(0.816898763458+0.701638556814j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.976537065451-0.935405725225j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.976537065451-0.935405725225j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.758133542447+0.458050352614j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.758133542447+0.458050352614j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.896016168906-0.350469141027j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.896016168906-0.350469141027j)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.165034768975+0.594647959652j)*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.165034768975+0.594647959652j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.96741253172+0.657077763197j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.96741253172+0.657077763197j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.265154242077+0.629879359094j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.265154242077+0.629879359094j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.0864550840941+0.245159420926j)*x[2]
+            ref[(1, 1, 0, 2)]+=(0.0864550840941+0.245159420926j)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(0.462430685284-0.90290439878j)*x[2]
+            ref[(1, 1, 0, 3)]+=(0.462430685284-0.90290439878j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.758087610872+0.211586843525j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.758087610872+0.211586843525j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.410610857155+0.379333851084j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.410610857155+0.379333851084j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.0736183305802-0.447386160174j)*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.0736183305802-0.447386160174j)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(0.627723818219-0.670873115975j)*x[2]
+            ref[(1, 1, 1, 3)]+=(0.627723818219-0.670873115975j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.257702048414+0.497946580207j)*x[2]
+            ref[(2, 0, 0, 0)]+=(0.257702048414+0.497946580207j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.0434306587303+0.63484908486j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.0434306587303+0.63484908486j)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.287235272176-0.134741647892j)*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.287235272176-0.134741647892j)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.141232608172-0.284113918471j)*x[2]
+            ref[(2, 0, 0, 3)]+=(0.141232608172-0.284113918471j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.209542100454-0.522206769619j)*x[2]
+            ref[(2, 0, 1, 0)]+=(0.209542100454-0.522206769619j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.0282097542499-0.530797336267j)*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.0282097542499-0.530797336267j)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(0.936631537568-0.274808204035j)*x[2]
+            ref[(2, 0, 1, 2)]+=(0.936631537568-0.274808204035j)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(0.322058101763+0.630326230655j)*x[2]
+            ref[(2, 0, 1, 3)]+=(0.322058101763+0.630326230655j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.446205903179-0.181698392399j)*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.446205903179-0.181698392399j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.600961116366-0.339743501246j)*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.600961116366-0.339743501246j)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(0.0324250654179-0.430607760734j)*x[2]
+            ref[(2, 1, 0, 2)]+=(0.0324250654179-0.430607760734j)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.689635055761-0.0323086319241j)*x[2]
+            ref[(2, 1, 0, 3)]+=(0.689635055761-0.0323086319241j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.889941392664+0.968246939923j)*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.889941392664+0.968246939923j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.91921523068-0.282241927043j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.91921523068-0.282241927043j)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.124437745086+0.809327093498j)*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.124437745086+0.809327093498j)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(0.0784590441714-0.758405132662j)*x[2]
+            ref[(2, 1, 1, 3)]+=(0.0784590441714-0.758405132662j)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(0.230893789772-0.796694610936j)*x[2]
+            ref[(3, 0, 0, 0)]+=(0.230893789772-0.796694610936j)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.983481090233-0.263964347741j)*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.983481090233-0.263964347741j)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(0.0747865571723-0.260780794613j)*x[2]
+            ref[(3, 0, 0, 2)]+=(0.0747865571723-0.260780794613j)*x_ref[2]
+            arg[(3, 0, 0, 3)]+=(-0.217343863241-0.888799045869j)*x[2]
+            ref[(3, 0, 0, 3)]+=(-0.217343863241-0.888799045869j)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.985615812209+0.0799918954867j)*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.985615812209+0.0799918954867j)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.762313424345-0.095186812161j)*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.762313424345-0.095186812161j)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(-0.600705330774-0.755130000133j)*x[2]
+            ref[(3, 0, 1, 2)]+=(-0.600705330774-0.755130000133j)*x_ref[2]
+            arg[(3, 0, 1, 3)]+=(-0.473703590643-0.625029645679j)*x[2]
+            ref[(3, 0, 1, 3)]+=(-0.473703590643-0.625029645679j)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.364675521061+0.842027438114j)*x[2]
+            ref[(3, 1, 0, 0)]+=(0.364675521061+0.842027438114j)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.489967629037-0.330969116073j)*x[2]
+            ref[(3, 1, 0, 1)]+=(0.489967629037-0.330969116073j)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(0.320048682023+0.365563435869j)*x[2]
+            ref[(3, 1, 0, 2)]+=(0.320048682023+0.365563435869j)*x_ref[2]
+            arg[(3, 1, 0, 3)]+=(0.245502452229+0.868587649514j)*x[2]
+            ref[(3, 1, 0, 3)]+=(0.245502452229+0.868587649514j)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.240729425114-0.469890179284j)*x[2]
+            ref[(3, 1, 1, 0)]+=(0.240729425114-0.469890179284j)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.783030994924-0.0584834319948j)*x[2]
+            ref[(3, 1, 1, 1)]+=(0.783030994924-0.0584834319948j)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(0.388643179938+0.360871297887j)*x[2]
+            ref[(3, 1, 1, 2)]+=(0.388643179938+0.360871297887j)*x_ref[2]
+            arg[(3, 1, 1, 3)]+=(-0.884522388653-0.653491905901j)*x[2]
+            ref[(3, 1, 1, 3)]+=(-0.884522388653-0.653491905901j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.84342983103+0.145290422318j)*x[0]**o + ((-0.955119069341+0.20698329002j))*x[0] + ((0.0988289518763-0.00996851718991j))*x[1]**o + ((-0.63932457333+0.568826149165j))*x[1]
+        ref=(0.84342983103+0.145290422318j)*x_ref[0]**o + ((-0.955119069341+0.20698329002j))*x_ref[0] + ((0.0988289518763-0.00996851718991j))*x_ref[1]**o + ((-0.63932457333+0.568826149165j))*x_ref[1]
+        if dim==3:
+            arg+=((0.818468332861+0.0952880455475j))*x[2]**o + ((0.33941702462-0.261254521144j))*x[2]
+            ref+=((0.818468332861+0.0952880455475j))*x_ref[2]**o + ((0.33941702462-0.261254521144j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.486628356889-0.165085256994j)*x[0]**o + ((-0.651902281017+0.617034196684j))*x[0] + ((0.938587843012+0.479039933722j))*x[1]**o + ((0.973165841517+0.898504999294j))*x[1]
+        ref[(0,)]=(0.486628356889-0.165085256994j)*x_ref[0]**o + ((-0.651902281017+0.617034196684j))*x_ref[0] + ((0.938587843012+0.479039933722j))*x_ref[1]**o + ((0.973165841517+0.898504999294j))*x_ref[1]
+        arg[(1,)]=(-0.438101167503-0.604128764464j)*x[0]**o + ((-0.0471124086135+0.589383039113j))*x[0] + ((-0.464283737557+0.501845170997j))*x[1]**o + ((0.386126383191+0.983735619358j))*x[1]
+        ref[(1,)]=(-0.438101167503-0.604128764464j)*x_ref[0]**o + ((-0.0471124086135+0.589383039113j))*x_ref[0] + ((-0.464283737557+0.501845170997j))*x_ref[1]**o + ((0.386126383191+0.983735619358j))*x_ref[1]
+        arg[(2,)]=(0.660961597345-0.474294176079j)*x[0]**o + ((0.919606329937+0.623615972515j))*x[0] + ((0.906299000039-0.123122028934j))*x[1]**o + ((-0.14407419894-0.331959639376j))*x[1]
+        ref[(2,)]=(0.660961597345-0.474294176079j)*x_ref[0]**o + ((0.919606329937+0.623615972515j))*x_ref[0] + ((0.906299000039-0.123122028934j))*x_ref[1]**o + ((-0.14407419894-0.331959639376j))*x_ref[1]
+        arg[(3,)]=(0.899241878129+0.789714735243j)*x[0]**o + ((-0.335678998649-0.452441285643j))*x[0] + ((0.177237774755+0.834576701685j))*x[1]**o + ((-0.519543926224-0.0364041459067j))*x[1]
+        ref[(3,)]=(0.899241878129+0.789714735243j)*x_ref[0]**o + ((-0.335678998649-0.452441285643j))*x_ref[0] + ((0.177237774755+0.834576701685j))*x_ref[1]**o + ((-0.519543926224-0.0364041459067j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.519613694165-0.986807812552j)*x[2]**o + ((-0.627401451846+0.153405477824j))*x[2]
+            ref[(0,)]+=(0.519613694165-0.986807812552j)*x_ref[2]**o + ((-0.627401451846+0.153405477824j))*x_ref[2]
+            arg[(1,)]+=(0.643516989827+0.192944085105j)*x[2]**o + ((0.522390689761-0.215512651469j))*x[2]
+            ref[(1,)]+=(0.643516989827+0.192944085105j)*x_ref[2]**o + ((0.522390689761-0.215512651469j))*x_ref[2]
+            arg[(2,)]+=(-0.330380576498+0.54022176559j)*x[2]**o + ((0.626882237222+0.258481584164j))*x[2]
+            ref[(2,)]+=(-0.330380576498+0.54022176559j)*x_ref[2]**o + ((0.626882237222+0.258481584164j))*x_ref[2]
+            arg[(3,)]+=(-0.186459483354-0.879069878218j)*x[2]**o + ((0.785088586881+0.953750177635j))*x[2]
+            ref[(3,)]+=(-0.186459483354-0.879069878218j)*x_ref[2]**o + ((0.785088586881+0.953750177635j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(0.697468011565+0.102778636354j)*x[0]**o + ((0.40495455217-0.0346574249787j))*x[0] + ((0.160002115595-0.651835355496j))*x[1]**o + ((0.390496025255-0.380498926634j))*x[1]
+        ref[(0, 0)]=(0.697468011565+0.102778636354j)*x_ref[0]**o + ((0.40495455217-0.0346574249787j))*x_ref[0] + ((0.160002115595-0.651835355496j))*x_ref[1]**o + ((0.390496025255-0.380498926634j))*x_ref[1]
+        arg[(0, 1)]=(-0.674973040042+0.701559924581j)*x[0]**o + ((0.051618275511-0.200063318154j))*x[0] + ((-0.344196429198-0.865266121388j))*x[1]**o + ((0.696953740695+0.560307400764j))*x[1]
+        ref[(0, 1)]=(-0.674973040042+0.701559924581j)*x_ref[0]**o + ((0.051618275511-0.200063318154j))*x_ref[0] + ((-0.344196429198-0.865266121388j))*x_ref[1]**o + ((0.696953740695+0.560307400764j))*x_ref[1]
+        arg[(0, 2)]=(-0.702013966166-0.0264301450004j)*x[0]**o + ((0.168862905962+0.0016350296644j))*x[0] + ((0.859686620595-0.518354133234j))*x[1]**o + ((-0.433553767514+0.234994017006j))*x[1]
+        ref[(0, 2)]=(-0.702013966166-0.0264301450004j)*x_ref[0]**o + ((0.168862905962+0.0016350296644j))*x_ref[0] + ((0.859686620595-0.518354133234j))*x_ref[1]**o + ((-0.433553767514+0.234994017006j))*x_ref[1]
+        arg[(0, 3)]=(-0.0624089919138+0.476476312143j)*x[0]**o + ((-0.454272741259-0.839353728467j))*x[0] + ((-0.526278928652+0.487672894681j))*x[1]**o + ((0.383930397798+0.482148211021j))*x[1]
+        ref[(0, 3)]=(-0.0624089919138+0.476476312143j)*x_ref[0]**o + ((-0.454272741259-0.839353728467j))*x_ref[0] + ((-0.526278928652+0.487672894681j))*x_ref[1]**o + ((0.383930397798+0.482148211021j))*x_ref[1]
+        arg[(1, 0)]=(-0.192120301834+0.482055192449j)*x[0]**o + ((0.682544970812+0.34295264267j))*x[0] + ((-0.566331887691-0.146679166708j))*x[1]**o + ((0.518892089-0.907479024216j))*x[1]
+        ref[(1, 0)]=(-0.192120301834+0.482055192449j)*x_ref[0]**o + ((0.682544970812+0.34295264267j))*x_ref[0] + ((-0.566331887691-0.146679166708j))*x_ref[1]**o + ((0.518892089-0.907479024216j))*x_ref[1]
+        arg[(1, 1)]=(0.990881727146+0.0497888082723j)*x[0]**o + ((0.388145396577-0.423258654458j))*x[0] + ((0.452280015415+0.59649172961j))*x[1]**o + ((-0.279928133364+0.701946560033j))*x[1]
+        ref[(1, 1)]=(0.990881727146+0.0497888082723j)*x_ref[0]**o + ((0.388145396577-0.423258654458j))*x_ref[0] + ((0.452280015415+0.59649172961j))*x_ref[1]**o + ((-0.279928133364+0.701946560033j))*x_ref[1]
+        arg[(1, 2)]=(-0.323888741739-0.12411357111j)*x[0]**o + ((-0.755866584267+0.191268659254j))*x[0] + ((0.436676988664-0.401475970977j))*x[1]**o + ((0.166887586777+0.945555024658j))*x[1]
+        ref[(1, 2)]=(-0.323888741739-0.12411357111j)*x_ref[0]**o + ((-0.755866584267+0.191268659254j))*x_ref[0] + ((0.436676988664-0.401475970977j))*x_ref[1]**o + ((0.166887586777+0.945555024658j))*x_ref[1]
+        arg[(1, 3)]=(0.122749161189+0.59998273804j)*x[0]**o + ((0.606783052798+0.708049837563j))*x[0] + ((-0.447087732126+0.128608494717j))*x[1]**o + ((-0.582674984325-0.549672971941j))*x[1]
+        ref[(1, 3)]=(0.122749161189+0.59998273804j)*x_ref[0]**o + ((0.606783052798+0.708049837563j))*x_ref[0] + ((-0.447087732126+0.128608494717j))*x_ref[1]**o + ((-0.582674984325-0.549672971941j))*x_ref[1]
+        arg[(2, 0)]=(0.294795069519+0.112590508837j)*x[0]**o + ((0.722579557036+0.893002967951j))*x[0] + ((0.988671997936-0.178952003881j))*x[1]**o + ((-0.423506162145-0.947549569743j))*x[1]
+        ref[(2, 0)]=(0.294795069519+0.112590508837j)*x_ref[0]**o + ((0.722579557036+0.893002967951j))*x_ref[0] + ((0.988671997936-0.178952003881j))*x_ref[1]**o + ((-0.423506162145-0.947549569743j))*x_ref[1]
+        arg[(2, 1)]=(-0.65710365161-0.648292808436j)*x[0]**o + ((-0.615037028884-0.885285454174j))*x[0] + ((-0.483146103716-0.789910475542j))*x[1]**o + ((-0.670585157911+0.667432760226j))*x[1]
+        ref[(2, 1)]=(-0.65710365161-0.648292808436j)*x_ref[0]**o + ((-0.615037028884-0.885285454174j))*x_ref[0] + ((-0.483146103716-0.789910475542j))*x_ref[1]**o + ((-0.670585157911+0.667432760226j))*x_ref[1]
+        arg[(2, 2)]=(0.32818612122-0.556664546084j)*x[0]**o + ((-0.640475078253-0.641502162984j))*x[0] + ((-0.393735186074-0.865972901397j))*x[1]**o + ((0.474487065154-0.897305357503j))*x[1]
+        ref[(2, 2)]=(0.32818612122-0.556664546084j)*x_ref[0]**o + ((-0.640475078253-0.641502162984j))*x_ref[0] + ((-0.393735186074-0.865972901397j))*x_ref[1]**o + ((0.474487065154-0.897305357503j))*x_ref[1]
+        arg[(2, 3)]=(-0.275969253518-0.929609886008j)*x[0]**o + ((0.782947631343-0.877002456336j))*x[0] + ((-0.340561471523+0.679737008583j))*x[1]**o + ((-0.0812812839289+0.24917273788j))*x[1]
+        ref[(2, 3)]=(-0.275969253518-0.929609886008j)*x_ref[0]**o + ((0.782947631343-0.877002456336j))*x_ref[0] + ((-0.340561471523+0.679737008583j))*x_ref[1]**o + ((-0.0812812839289+0.24917273788j))*x_ref[1]
+        arg[(3, 0)]=(0.531630351985+0.958536640031j)*x[0]**o + ((0.0267543918944+0.707331125873j))*x[0] + ((0.497621575343+0.999913498222j))*x[1]**o + ((-0.76168703634-0.830249964704j))*x[1]
+        ref[(3, 0)]=(0.531630351985+0.958536640031j)*x_ref[0]**o + ((0.0267543918944+0.707331125873j))*x_ref[0] + ((0.497621575343+0.999913498222j))*x_ref[1]**o + ((-0.76168703634-0.830249964704j))*x_ref[1]
+        arg[(3, 1)]=(0.630941612219-0.0427940159312j)*x[0]**o + ((0.472902559756+0.975811887144j))*x[0] + ((0.892263553914-0.332630080813j))*x[1]**o + ((0.432394092889-0.530095192574j))*x[1]
+        ref[(3, 1)]=(0.630941612219-0.0427940159312j)*x_ref[0]**o + ((0.472902559756+0.975811887144j))*x_ref[0] + ((0.892263553914-0.332630080813j))*x_ref[1]**o + ((0.432394092889-0.530095192574j))*x_ref[1]
+        arg[(3, 2)]=(-0.414820135503+0.0145803694146j)*x[0]**o + ((0.361021054779+0.0875817310063j))*x[0] + ((0.0689906033981+0.566133992405j))*x[1]**o + ((0.764198766218+0.591629705254j))*x[1]
+        ref[(3, 2)]=(-0.414820135503+0.0145803694146j)*x_ref[0]**o + ((0.361021054779+0.0875817310063j))*x_ref[0] + ((0.0689906033981+0.566133992405j))*x_ref[1]**o + ((0.764198766218+0.591629705254j))*x_ref[1]
+        arg[(3, 3)]=(-0.938334990664+0.658359286897j)*x[0]**o + ((-0.821106242341-0.0350852501883j))*x[0] + ((0.788838231397-0.962820470008j))*x[1]**o + ((0.793521089146-0.365766209931j))*x[1]
+        ref[(3, 3)]=(-0.938334990664+0.658359286897j)*x_ref[0]**o + ((-0.821106242341-0.0350852501883j))*x_ref[0] + ((0.788838231397-0.962820470008j))*x_ref[1]**o + ((0.793521089146-0.365766209931j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.207992778857-0.654408916784j)*x[2]**o + ((-0.653240570397-0.987446676038j))*x[2]
+            ref[(0, 0)]+=(0.207992778857-0.654408916784j)*x_ref[2]**o + ((-0.653240570397-0.987446676038j))*x_ref[2]
+            arg[(0, 1)]+=(0.378567104363-0.905471391169j)*x[2]**o + ((0.20064648887+0.965769104201j))*x[2]
+            ref[(0, 1)]+=(0.378567104363-0.905471391169j)*x_ref[2]**o + ((0.20064648887+0.965769104201j))*x_ref[2]
+            arg[(0, 2)]+=(-0.151825173996+0.412528666818j)*x[2]**o + ((0.818247109365-0.988861555232j))*x[2]
+            ref[(0, 2)]+=(-0.151825173996+0.412528666818j)*x_ref[2]**o + ((0.818247109365-0.988861555232j))*x_ref[2]
+            arg[(0, 3)]+=(-0.0666917737544-0.558571176472j)*x[2]**o + ((0.348000647756+0.363588236144j))*x[2]
+            ref[(0, 3)]+=(-0.0666917737544-0.558571176472j)*x_ref[2]**o + ((0.348000647756+0.363588236144j))*x_ref[2]
+            arg[(1, 0)]+=(-0.172771561765+0.613953172921j)*x[2]**o + ((0.687741886691-0.756638385603j))*x[2]
+            ref[(1, 0)]+=(-0.172771561765+0.613953172921j)*x_ref[2]**o + ((0.687741886691-0.756638385603j))*x_ref[2]
+            arg[(1, 1)]+=(-0.956371510422-0.0132776670842j)*x[2]**o + ((0.317636629041+0.59996885668j))*x[2]
+            ref[(1, 1)]+=(-0.956371510422-0.0132776670842j)*x_ref[2]**o + ((0.317636629041+0.59996885668j))*x_ref[2]
+            arg[(1, 2)]+=(0.445961813366+0.939410703755j)*x[2]**o + ((-0.755092826045-0.0169595940249j))*x[2]
+            ref[(1, 2)]+=(0.445961813366+0.939410703755j)*x_ref[2]**o + ((-0.755092826045-0.0169595940249j))*x_ref[2]
+            arg[(1, 3)]+=(-0.212860469998-0.254352898788j)*x[2]**o + ((0.458165915475-0.569861506634j))*x[2]
+            ref[(1, 3)]+=(-0.212860469998-0.254352898788j)*x_ref[2]**o + ((0.458165915475-0.569861506634j))*x_ref[2]
+            arg[(2, 0)]+=(0.433069132705+0.144818093717j)*x[2]**o + ((-0.998517580073+0.59947476226j))*x[2]
+            ref[(2, 0)]+=(0.433069132705+0.144818093717j)*x_ref[2]**o + ((-0.998517580073+0.59947476226j))*x_ref[2]
+            arg[(2, 1)]+=(-0.222993290899-0.457214876859j)*x[2]**o + ((0.148322241053+0.304160184893j))*x[2]
+            ref[(2, 1)]+=(-0.222993290899-0.457214876859j)*x_ref[2]**o + ((0.148322241053+0.304160184893j))*x_ref[2]
+            arg[(2, 2)]+=(0.538598347352-0.676561472239j)*x[2]**o + ((0.910622786109-0.736443585812j))*x[2]
+            ref[(2, 2)]+=(0.538598347352-0.676561472239j)*x_ref[2]**o + ((0.910622786109-0.736443585812j))*x_ref[2]
+            arg[(2, 3)]+=(-0.922786251864+0.498097694902j)*x[2]**o + ((-0.621451420547+0.367298970651j))*x[2]
+            ref[(2, 3)]+=(-0.922786251864+0.498097694902j)*x_ref[2]**o + ((-0.621451420547+0.367298970651j))*x_ref[2]
+            arg[(3, 0)]+=(0.0724221283894-0.55925314254j)*x[2]**o + ((0.70419363291+0.83710032068j))*x[2]
+            ref[(3, 0)]+=(0.0724221283894-0.55925314254j)*x_ref[2]**o + ((0.70419363291+0.83710032068j))*x_ref[2]
+            arg[(3, 1)]+=(0.634730362925-0.753537403681j)*x[2]**o + ((-0.26154659192+0.98386667372j))*x[2]
+            ref[(3, 1)]+=(0.634730362925-0.753537403681j)*x_ref[2]**o + ((-0.26154659192+0.98386667372j))*x_ref[2]
+            arg[(3, 2)]+=(-0.535533757779-0.0462671752892j)*x[2]**o + ((-0.479773719758-0.91407622634j))*x[2]
+            ref[(3, 2)]+=(-0.535533757779-0.0462671752892j)*x_ref[2]**o + ((-0.479773719758-0.91407622634j))*x_ref[2]
+            arg[(3, 3)]+=(-0.916348025301+0.0237676581291j)*x[2]**o + ((0.598305563858+0.451805848439j))*x[2]
+            ref[(3, 3)]+=(-0.916348025301+0.0237676581291j)*x_ref[2]**o + ((0.598305563858+0.451805848439j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.638122193436+0.4559966108j)*x[0]**o + ((0.604084541921+0.275860794777j))*x[0] + ((0.0456218122388+0.503974999332j))*x[1]**o + ((0.113766688628+0.595970639242j))*x[1]
+        ref[(0, 0, 0)]=(-0.638122193436+0.4559966108j)*x_ref[0]**o + ((0.604084541921+0.275860794777j))*x_ref[0] + ((0.0456218122388+0.503974999332j))*x_ref[1]**o + ((0.113766688628+0.595970639242j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.905124177964-0.283635587992j)*x[0]**o + ((-0.499511079899+0.458466027706j))*x[0] + ((0.42291247891-0.181109620211j))*x[1]**o + ((-0.87717071386-0.957071953102j))*x[1]
+        ref[(0, 0, 1)]=(0.905124177964-0.283635587992j)*x_ref[0]**o + ((-0.499511079899+0.458466027706j))*x_ref[0] + ((0.42291247891-0.181109620211j))*x_ref[1]**o + ((-0.87717071386-0.957071953102j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.521886456087+0.0587360042089j)*x[0]**o + ((0.530906682361-0.248011472395j))*x[0] + ((0.958112090321-0.693891491491j))*x[1]**o + ((0.491559828455-0.244836518483j))*x[1]
+        ref[(0, 0, 2)]=(-0.521886456087+0.0587360042089j)*x_ref[0]**o + ((0.530906682361-0.248011472395j))*x_ref[0] + ((0.958112090321-0.693891491491j))*x_ref[1]**o + ((0.491559828455-0.244836518483j))*x_ref[1]
+        arg[(0, 0, 3)]=(-0.588584457381+0.449487239237j)*x[0]**o + ((0.0482485040605-0.735944711861j))*x[0] + ((0.0531791949915+0.541830268297j))*x[1]**o + ((-0.946672324435-0.406941376553j))*x[1]
+        ref[(0, 0, 3)]=(-0.588584457381+0.449487239237j)*x_ref[0]**o + ((0.0482485040605-0.735944711861j))*x_ref[0] + ((0.0531791949915+0.541830268297j))*x_ref[1]**o + ((-0.946672324435-0.406941376553j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.283776766981+0.593832930542j)*x[0]**o + ((0.565916548545+0.393764765694j))*x[0] + ((-0.691797745835-0.990833810095j))*x[1]**o + ((-0.822338557795-0.890260817778j))*x[1]
+        ref[(0, 1, 0)]=(-0.283776766981+0.593832930542j)*x_ref[0]**o + ((0.565916548545+0.393764765694j))*x_ref[0] + ((-0.691797745835-0.990833810095j))*x_ref[1]**o + ((-0.822338557795-0.890260817778j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.536991329624+0.811358206883j)*x[0]**o + ((-0.406086614352+0.356570466625j))*x[0] + ((-0.801703412888+0.644948822192j))*x[1]**o + ((0.168437716173+0.733942197804j))*x[1]
+        ref[(0, 1, 1)]=(-0.536991329624+0.811358206883j)*x_ref[0]**o + ((-0.406086614352+0.356570466625j))*x_ref[0] + ((-0.801703412888+0.644948822192j))*x_ref[1]**o + ((0.168437716173+0.733942197804j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.622078243972-0.292269465142j)*x[0]**o + ((0.0584164312649+0.363868526934j))*x[0] + ((0.63139139782-0.213317222054j))*x[1]**o + ((-0.357941245107-0.431887667175j))*x[1]
+        ref[(0, 1, 2)]=(0.622078243972-0.292269465142j)*x_ref[0]**o + ((0.0584164312649+0.363868526934j))*x_ref[0] + ((0.63139139782-0.213317222054j))*x_ref[1]**o + ((-0.357941245107-0.431887667175j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.899332947967-0.70454463184j)*x[0]**o + ((0.615587497967+0.233806390617j))*x[0] + ((-0.347338228787+0.0509485270606j))*x[1]**o + ((-0.737455157947+0.540608403669j))*x[1]
+        ref[(0, 1, 3)]=(-0.899332947967-0.70454463184j)*x_ref[0]**o + ((0.615587497967+0.233806390617j))*x_ref[0] + ((-0.347338228787+0.0509485270606j))*x_ref[1]**o + ((-0.737455157947+0.540608403669j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.834199727082-0.392668414293j)*x[0]**o + ((-0.411936505754-0.849390031345j))*x[0] + ((0.00979128725167+0.930819934147j))*x[1]**o + ((-0.829777559937-0.313424824168j))*x[1]
+        ref[(1, 0, 0)]=(-0.834199727082-0.392668414293j)*x_ref[0]**o + ((-0.411936505754-0.849390031345j))*x_ref[0] + ((0.00979128725167+0.930819934147j))*x_ref[1]**o + ((-0.829777559937-0.313424824168j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.178004035337+0.253864498936j)*x[0]**o + ((-0.534525582361-0.238746831566j))*x[0] + ((0.136371603632+0.0247690580718j))*x[1]**o + ((0.19775159925-0.610403080891j))*x[1]
+        ref[(1, 0, 1)]=(0.178004035337+0.253864498936j)*x_ref[0]**o + ((-0.534525582361-0.238746831566j))*x_ref[0] + ((0.136371603632+0.0247690580718j))*x_ref[1]**o + ((0.19775159925-0.610403080891j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.769048557965-0.252449159215j)*x[0]**o + ((0.818522994335-0.0181845014453j))*x[0] + ((0.363133045321-0.512911995394j))*x[1]**o + ((-0.967338566284+0.81208856242j))*x[1]
+        ref[(1, 0, 2)]=(-0.769048557965-0.252449159215j)*x_ref[0]**o + ((0.818522994335-0.0181845014453j))*x_ref[0] + ((0.363133045321-0.512911995394j))*x_ref[1]**o + ((-0.967338566284+0.81208856242j))*x_ref[1]
+        arg[(1, 0, 3)]=(-0.0851506322943-0.0596668326283j)*x[0]**o + ((-0.906017125105+0.985664582452j))*x[0] + ((0.744860017844+0.376233865448j))*x[1]**o + ((-0.0831639721713-0.370137654157j))*x[1]
+        ref[(1, 0, 3)]=(-0.0851506322943-0.0596668326283j)*x_ref[0]**o + ((-0.906017125105+0.985664582452j))*x_ref[0] + ((0.744860017844+0.376233865448j))*x_ref[1]**o + ((-0.0831639721713-0.370137654157j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.490756162346+0.279744652788j)*x[0]**o + ((-0.713365697748+0.288571111659j))*x[0] + ((0.380379099756-0.250645071575j))*x[1]**o + ((-0.996817913622+0.138241340762j))*x[1]
+        ref[(1, 1, 0)]=(0.490756162346+0.279744652788j)*x_ref[0]**o + ((-0.713365697748+0.288571111659j))*x_ref[0] + ((0.380379099756-0.250645071575j))*x_ref[1]**o + ((-0.996817913622+0.138241340762j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.212086598651-0.641828858371j)*x[0]**o + ((-0.35043885451+0.264636886008j))*x[0] + ((-0.115373373528+0.465201610832j))*x[1]**o + ((0.115216596664-0.341574950088j))*x[1]
+        ref[(1, 1, 1)]=(0.212086598651-0.641828858371j)*x_ref[0]**o + ((-0.35043885451+0.264636886008j))*x_ref[0] + ((-0.115373373528+0.465201610832j))*x_ref[1]**o + ((0.115216596664-0.341574950088j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.582458483225-0.507067108809j)*x[0]**o + ((-0.294147957375-0.211301460587j))*x[0] + ((-0.893616186748+0.322203442063j))*x[1]**o + ((-0.0453520192928-0.77772989411j))*x[1]
+        ref[(1, 1, 2)]=(0.582458483225-0.507067108809j)*x_ref[0]**o + ((-0.294147957375-0.211301460587j))*x_ref[0] + ((-0.893616186748+0.322203442063j))*x_ref[1]**o + ((-0.0453520192928-0.77772989411j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.0480525495742-0.973612396289j)*x[0]**o + ((-0.385655612018-0.261452148564j))*x[0] + ((0.491159882622+0.0780807043448j))*x[1]**o + ((0.0704370459561+0.978006130998j))*x[1]
+        ref[(1, 1, 3)]=(-0.0480525495742-0.973612396289j)*x_ref[0]**o + ((-0.385655612018-0.261452148564j))*x_ref[0] + ((0.491159882622+0.0780807043448j))*x_ref[1]**o + ((0.0704370459561+0.978006130998j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.73510031539-0.191575025386j)*x[2]**o + ((0.747105057395-0.602427747201j))*x[2]
+            ref[(0, 0, 0)]+=(-0.73510031539-0.191575025386j)*x_ref[2]**o + ((0.747105057395-0.602427747201j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.398230014039+0.913139831447j)*x[2]**o + ((0.539485870994-0.991067417228j))*x[2]
+            ref[(0, 0, 1)]+=(-0.398230014039+0.913139831447j)*x_ref[2]**o + ((0.539485870994-0.991067417228j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.214997300947-0.521952913081j)*x[2]**o + ((-0.477392571394-0.672371704703j))*x[2]
+            ref[(0, 0, 2)]+=(-0.214997300947-0.521952913081j)*x_ref[2]**o + ((-0.477392571394-0.672371704703j))*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.850744000187+0.913861463786j)*x[2]**o + ((0.150636189004+0.884038775964j))*x[2]
+            ref[(0, 0, 3)]+=(-0.850744000187+0.913861463786j)*x_ref[2]**o + ((0.150636189004+0.884038775964j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.650498608383+0.714403718513j)*x[2]**o + ((0.919644874828+0.146220467879j))*x[2]
+            ref[(0, 1, 0)]+=(-0.650498608383+0.714403718513j)*x_ref[2]**o + ((0.919644874828+0.146220467879j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.323175898741-0.233158882278j)*x[2]**o + ((0.961300157467-0.676271900709j))*x[2]
+            ref[(0, 1, 1)]+=(0.323175898741-0.233158882278j)*x_ref[2]**o + ((0.961300157467-0.676271900709j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.348175824568-0.376792835197j)*x[2]**o + ((0.0942448004971+0.460522551635j))*x[2]
+            ref[(0, 1, 2)]+=(0.348175824568-0.376792835197j)*x_ref[2]**o + ((0.0942448004971+0.460522551635j))*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.169350553164-0.230353961794j)*x[2]**o + ((0.219486047244+0.190620239984j))*x[2]
+            ref[(0, 1, 3)]+=(-0.169350553164-0.230353961794j)*x_ref[2]**o + ((0.219486047244+0.190620239984j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.389569454164-0.748485789946j)*x[2]**o + ((0.271754114814-0.987247753411j))*x[2]
+            ref[(1, 0, 0)]+=(-0.389569454164-0.748485789946j)*x_ref[2]**o + ((0.271754114814-0.987247753411j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.389850840994+0.331904468519j)*x[2]**o + ((0.889601704497-0.235985992379j))*x[2]
+            ref[(1, 0, 1)]+=(0.389850840994+0.331904468519j)*x_ref[2]**o + ((0.889601704497-0.235985992379j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.32989544868-0.239519689646j)*x[2]**o + ((0.0422715885457-0.482690395998j))*x[2]
+            ref[(1, 0, 2)]+=(0.32989544868-0.239519689646j)*x_ref[2]**o + ((0.0422715885457-0.482690395998j))*x_ref[2]
+            arg[(1, 0, 3)]+=(0.533489062607+0.473522015266j)*x[2]**o + ((-0.867437796573-0.147807827098j))*x[2]
+            ref[(1, 0, 3)]+=(0.533489062607+0.473522015266j)*x_ref[2]**o + ((-0.867437796573-0.147807827098j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.0793881103061+0.0447983510271j)*x[2]**o + ((-0.0696955403506-0.575514669299j))*x[2]
+            ref[(1, 1, 0)]+=(0.0793881103061+0.0447983510271j)*x_ref[2]**o + ((-0.0696955403506-0.575514669299j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.576771911286+0.0762329329842j)*x[2]**o + ((0.858826710634-0.437502250524j))*x[2]
+            ref[(1, 1, 1)]+=(0.576771911286+0.0762329329842j)*x_ref[2]**o + ((0.858826710634-0.437502250524j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.533797085468-0.421088297873j)*x[2]**o + ((-0.158065904248-0.39144621753j))*x[2]
+            ref[(1, 1, 2)]+=(-0.533797085468-0.421088297873j)*x_ref[2]**o + ((-0.158065904248-0.39144621753j))*x_ref[2]
+            arg[(1, 1, 3)]+=(0.978494049611-0.996348285687j)*x[2]**o + ((-0.120928631157-0.591261016085j))*x[2]
+            ref[(1, 1, 3)]+=(0.978494049611-0.996348285687j)*x_ref[2]**o + ((-0.120928631157-0.591261016085j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4, 4),w)
+        ref = Data(0,(2, 4, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.809052018132-0.323700865063j)*x[0]**o + ((-0.382899229274-0.889557570457j))*x[0] + ((0.414763933635+0.0565405380203j))*x[1]**o + ((0.808237518115-0.865131303842j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.809052018132-0.323700865063j)*x_ref[0]**o + ((-0.382899229274-0.889557570457j))*x_ref[0] + ((0.414763933635+0.0565405380203j))*x_ref[1]**o + ((0.808237518115-0.865131303842j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.957344707895-0.750926782179j)*x[0]**o + ((0.266263961538+0.110273508862j))*x[0] + ((-0.822279382425-0.376183093205j))*x[1]**o + ((-0.870612813949-0.130632093144j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.957344707895-0.750926782179j)*x_ref[0]**o + ((0.266263961538+0.110273508862j))*x_ref[0] + ((-0.822279382425-0.376183093205j))*x_ref[1]**o + ((-0.870612813949-0.130632093144j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.143491941033-0.645019083953j)*x[0]**o + ((-0.834917305616+0.450208159665j))*x[0] + ((0.0690695574225-0.243249121783j))*x[1]**o + ((-0.182765017051+0.97881600187j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.143491941033-0.645019083953j)*x_ref[0]**o + ((-0.834917305616+0.450208159665j))*x_ref[0] + ((0.0690695574225-0.243249121783j))*x_ref[1]**o + ((-0.182765017051+0.97881600187j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.563212515853-0.308479017528j)*x[0]**o + ((0.117980767789+0.231616024019j))*x[0] + ((-0.0745257680965-0.676665701912j))*x[1]**o + ((-0.837635228171-0.505912025478j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.563212515853-0.308479017528j)*x_ref[0]**o + ((0.117980767789+0.231616024019j))*x_ref[0] + ((-0.0745257680965-0.676665701912j))*x_ref[1]**o + ((-0.837635228171-0.505912025478j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.415772307646+0.712554032572j)*x[0]**o + ((-0.113554929969+0.126062632776j))*x[0] + ((0.854258644074+0.464685614742j))*x[1]**o + ((-0.663455992064+0.27121320424j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.415772307646+0.712554032572j)*x_ref[0]**o + ((-0.113554929969+0.126062632776j))*x_ref[0] + ((0.854258644074+0.464685614742j))*x_ref[1]**o + ((-0.663455992064+0.27121320424j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.155991178603-0.765504515344j)*x[0]**o + ((0.0771469295549+0.407095435513j))*x[0] + ((0.36536870765-0.688882211835j))*x[1]**o + ((-0.631140755434-0.788833710162j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.155991178603-0.765504515344j)*x_ref[0]**o + ((0.0771469295549+0.407095435513j))*x_ref[0] + ((0.36536870765-0.688882211835j))*x_ref[1]**o + ((-0.631140755434-0.788833710162j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.168086478882+0.205850688075j)*x[0]**o + ((-0.62507565238-0.361346561262j))*x[0] + ((0.0561907851885-0.620138628955j))*x[1]**o + ((0.679431852705-0.524615303465j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.168086478882+0.205850688075j)*x_ref[0]**o + ((-0.62507565238-0.361346561262j))*x_ref[0] + ((0.0561907851885-0.620138628955j))*x_ref[1]**o + ((0.679431852705-0.524615303465j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.161736233121-0.303006501082j)*x[0]**o + ((-0.0890223214431-0.545283743413j))*x[0] + ((0.513128415491-0.549571951307j))*x[1]**o + ((-0.0760361078758+0.699116908281j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.161736233121-0.303006501082j)*x_ref[0]**o + ((-0.0890223214431-0.545283743413j))*x_ref[0] + ((0.513128415491-0.549571951307j))*x_ref[1]**o + ((-0.0760361078758+0.699116908281j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.32713474918-0.338394254682j)*x[0]**o + ((-0.876185369006+0.231071338913j))*x[0] + ((0.260831973577+0.150647875523j))*x[1]**o + ((-0.500696992655+0.273704323143j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.32713474918-0.338394254682j)*x_ref[0]**o + ((-0.876185369006+0.231071338913j))*x_ref[0] + ((0.260831973577+0.150647875523j))*x_ref[1]**o + ((-0.500696992655+0.273704323143j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.885708720708+0.289027704009j)*x[0]**o + ((-0.861699975267+0.236491063669j))*x[0] + ((0.418522012961-0.220774016917j))*x[1]**o + ((0.660064427168+0.334675148728j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.885708720708+0.289027704009j)*x_ref[0]**o + ((-0.861699975267+0.236491063669j))*x_ref[0] + ((0.418522012961-0.220774016917j))*x_ref[1]**o + ((0.660064427168+0.334675148728j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(-0.0264440247802+0.170056588765j)*x[0]**o + ((-0.615414180004+0.712197368717j))*x[0] + ((-0.538864747925-0.969851808269j))*x[1]**o + ((-0.579148373799+0.72175228438j))*x[1]
+        ref[(0, 0, 2, 2)]=(-0.0264440247802+0.170056588765j)*x_ref[0]**o + ((-0.615414180004+0.712197368717j))*x_ref[0] + ((-0.538864747925-0.969851808269j))*x_ref[1]**o + ((-0.579148373799+0.72175228438j))*x_ref[1]
+        arg[(0, 0, 2, 3)]=(0.668313488683+0.389143295018j)*x[0]**o + ((-0.45514710331-0.552856632787j))*x[0] + ((-0.807535774812+0.898252513919j))*x[1]**o + ((0.682887489906-0.105927646055j))*x[1]
+        ref[(0, 0, 2, 3)]=(0.668313488683+0.389143295018j)*x_ref[0]**o + ((-0.45514710331-0.552856632787j))*x_ref[0] + ((-0.807535774812+0.898252513919j))*x_ref[1]**o + ((0.682887489906-0.105927646055j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(0.548885870175+0.62352359751j)*x[0]**o + ((0.568177022794+0.404892795054j))*x[0] + ((0.0504080053969-0.0725514112534j))*x[1]**o + ((0.365259850446-0.39660463431j))*x[1]
+        ref[(0, 0, 3, 0)]=(0.548885870175+0.62352359751j)*x_ref[0]**o + ((0.568177022794+0.404892795054j))*x_ref[0] + ((0.0504080053969-0.0725514112534j))*x_ref[1]**o + ((0.365259850446-0.39660463431j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(-0.294658496257-0.262070427386j)*x[0]**o + ((-0.297075598143+0.679427825996j))*x[0] + ((-0.644884044983-0.427091753542j))*x[1]**o + ((-0.680943221031+0.0397157756952j))*x[1]
+        ref[(0, 0, 3, 1)]=(-0.294658496257-0.262070427386j)*x_ref[0]**o + ((-0.297075598143+0.679427825996j))*x_ref[0] + ((-0.644884044983-0.427091753542j))*x_ref[1]**o + ((-0.680943221031+0.0397157756952j))*x_ref[1]
+        arg[(0, 0, 3, 2)]=(-0.00369518163939+0.0248022059215j)*x[0]**o + ((-0.784499396478-0.45557700652j))*x[0] + ((0.101148560605+0.675785647574j))*x[1]**o + ((-0.461937618224-0.954092389052j))*x[1]
+        ref[(0, 0, 3, 2)]=(-0.00369518163939+0.0248022059215j)*x_ref[0]**o + ((-0.784499396478-0.45557700652j))*x_ref[0] + ((0.101148560605+0.675785647574j))*x_ref[1]**o + ((-0.461937618224-0.954092389052j))*x_ref[1]
+        arg[(0, 0, 3, 3)]=(0.0345954632483-0.33797855534j)*x[0]**o + ((-0.753476651916-0.874612888748j))*x[0] + ((-0.586522440405-0.277677179883j))*x[1]**o + ((0.533156194526+0.957618522589j))*x[1]
+        ref[(0, 0, 3, 3)]=(0.0345954632483-0.33797855534j)*x_ref[0]**o + ((-0.753476651916-0.874612888748j))*x_ref[0] + ((-0.586522440405-0.277677179883j))*x_ref[1]**o + ((0.533156194526+0.957618522589j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.147438561312+0.802898539964j)*x[0]**o + ((0.52684970484-0.813440400111j))*x[0] + ((-0.509509530896-0.514609027442j))*x[1]**o + ((0.0443852570059-0.525157552207j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.147438561312+0.802898539964j)*x_ref[0]**o + ((0.52684970484-0.813440400111j))*x_ref[0] + ((-0.509509530896-0.514609027442j))*x_ref[1]**o + ((0.0443852570059-0.525157552207j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.661109874432-0.642104536898j)*x[0]**o + ((0.361251545549-0.490912000274j))*x[0] + ((0.506891349044-0.293071008525j))*x[1]**o + ((0.254941606028-0.842681235317j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.661109874432-0.642104536898j)*x_ref[0]**o + ((0.361251545549-0.490912000274j))*x_ref[0] + ((0.506891349044-0.293071008525j))*x_ref[1]**o + ((0.254941606028-0.842681235317j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.479468760152+0.339770207884j)*x[0]**o + ((-0.599949593223-0.917534872399j))*x[0] + ((0.846886953391-0.345404933641j))*x[1]**o + ((0.268728852189+0.942343106811j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.479468760152+0.339770207884j)*x_ref[0]**o + ((-0.599949593223-0.917534872399j))*x_ref[0] + ((0.846886953391-0.345404933641j))*x_ref[1]**o + ((0.268728852189+0.942343106811j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.540648300856+0.271428520599j)*x[0]**o + ((0.803001350295+0.155709258528j))*x[0] + ((0.828640421742-0.105441511614j))*x[1]**o + ((0.22535148124+0.167961293728j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.540648300856+0.271428520599j)*x_ref[0]**o + ((0.803001350295+0.155709258528j))*x_ref[0] + ((0.828640421742-0.105441511614j))*x_ref[1]**o + ((0.22535148124+0.167961293728j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.107214451288-0.277363857724j)*x[0]**o + ((-0.343336183344+0.0177588833733j))*x[0] + ((-0.309234634728+0.223854929245j))*x[1]**o + ((0.469060143351+0.0744216535616j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.107214451288-0.277363857724j)*x_ref[0]**o + ((-0.343336183344+0.0177588833733j))*x_ref[0] + ((-0.309234634728+0.223854929245j))*x_ref[1]**o + ((0.469060143351+0.0744216535616j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.708084657986-0.285998498344j)*x[0]**o + ((0.797835548582+0.316752377768j))*x[0] + ((-0.687452746115+0.29424558656j))*x[1]**o + ((-0.704512494206+0.516553198893j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.708084657986-0.285998498344j)*x_ref[0]**o + ((0.797835548582+0.316752377768j))*x_ref[0] + ((-0.687452746115+0.29424558656j))*x_ref[1]**o + ((-0.704512494206+0.516553198893j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.899591146202-0.306847174408j)*x[0]**o + ((0.689515894437-0.757350845583j))*x[0] + ((-0.450146879873+0.59341785271j))*x[1]**o + ((0.879056176355-0.0327333892531j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.899591146202-0.306847174408j)*x_ref[0]**o + ((0.689515894437-0.757350845583j))*x_ref[0] + ((-0.450146879873+0.59341785271j))*x_ref[1]**o + ((0.879056176355-0.0327333892531j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.421299362619-0.843369364799j)*x[0]**o + ((0.240280783348-0.958039345332j))*x[0] + ((0.266596166038+0.892220956249j))*x[1]**o + ((0.71995194694+0.805954790765j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.421299362619-0.843369364799j)*x_ref[0]**o + ((0.240280783348-0.958039345332j))*x_ref[0] + ((0.266596166038+0.892220956249j))*x_ref[1]**o + ((0.71995194694+0.805954790765j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.203960891178-0.859296065935j)*x[0]**o + ((-0.410552050493+0.766850421281j))*x[0] + ((0.18628350503+0.946280444945j))*x[1]**o + ((0.41915903928+0.50021417597j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.203960891178-0.859296065935j)*x_ref[0]**o + ((-0.410552050493+0.766850421281j))*x_ref[0] + ((0.18628350503+0.946280444945j))*x_ref[1]**o + ((0.41915903928+0.50021417597j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.0120813035509-0.694133236981j)*x[0]**o + ((-0.329954829775+0.568845470516j))*x[0] + ((-0.152935448255+0.348654059899j))*x[1]**o + ((0.223107358901-0.625247974592j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.0120813035509-0.694133236981j)*x_ref[0]**o + ((-0.329954829775+0.568845470516j))*x_ref[0] + ((-0.152935448255+0.348654059899j))*x_ref[1]**o + ((0.223107358901-0.625247974592j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(0.0341770455966-0.313928065538j)*x[0]**o + ((0.156998753217-0.0948479041598j))*x[0] + ((0.579944974387-0.432785694294j))*x[1]**o + ((-0.446454123049-0.395054073054j))*x[1]
+        ref[(0, 1, 2, 2)]=(0.0341770455966-0.313928065538j)*x_ref[0]**o + ((0.156998753217-0.0948479041598j))*x_ref[0] + ((0.579944974387-0.432785694294j))*x_ref[1]**o + ((-0.446454123049-0.395054073054j))*x_ref[1]
+        arg[(0, 1, 2, 3)]=(-0.763351396383-0.311474076708j)*x[0]**o + ((-0.673709086674+0.349550867433j))*x[0] + ((-0.258403805163+0.807411573293j))*x[1]**o + ((-0.876731845285+0.614871959706j))*x[1]
+        ref[(0, 1, 2, 3)]=(-0.763351396383-0.311474076708j)*x_ref[0]**o + ((-0.673709086674+0.349550867433j))*x_ref[0] + ((-0.258403805163+0.807411573293j))*x_ref[1]**o + ((-0.876731845285+0.614871959706j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(-0.342361521416-0.494134135188j)*x[0]**o + ((-0.360097654241-0.318121347417j))*x[0] + ((-0.0127380729421+0.00165928582355j))*x[1]**o + ((0.14433782119+0.991305560498j))*x[1]
+        ref[(0, 1, 3, 0)]=(-0.342361521416-0.494134135188j)*x_ref[0]**o + ((-0.360097654241-0.318121347417j))*x_ref[0] + ((-0.0127380729421+0.00165928582355j))*x_ref[1]**o + ((0.14433782119+0.991305560498j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(0.169555887876+0.306417774326j)*x[0]**o + ((0.826542229915-0.245803961804j))*x[0] + ((-0.710388153604+0.319017746189j))*x[1]**o + ((-0.322282657266-0.520113868157j))*x[1]
+        ref[(0, 1, 3, 1)]=(0.169555887876+0.306417774326j)*x_ref[0]**o + ((0.826542229915-0.245803961804j))*x_ref[0] + ((-0.710388153604+0.319017746189j))*x_ref[1]**o + ((-0.322282657266-0.520113868157j))*x_ref[1]
+        arg[(0, 1, 3, 2)]=(-0.421496705805+0.259079091952j)*x[0]**o + ((-0.376564043222+0.362990428645j))*x[0] + ((-0.99894466129-0.748708661762j))*x[1]**o + ((-0.259471678381+0.694885694227j))*x[1]
+        ref[(0, 1, 3, 2)]=(-0.421496705805+0.259079091952j)*x_ref[0]**o + ((-0.376564043222+0.362990428645j))*x_ref[0] + ((-0.99894466129-0.748708661762j))*x_ref[1]**o + ((-0.259471678381+0.694885694227j))*x_ref[1]
+        arg[(0, 1, 3, 3)]=(0.582680958192+0.527912783047j)*x[0]**o + ((0.56874992047+0.229986085678j))*x[0] + ((-0.499754830677+0.136467615837j))*x[1]**o + ((-0.609843018756-0.44279024919j))*x[1]
+        ref[(0, 1, 3, 3)]=(0.582680958192+0.527912783047j)*x_ref[0]**o + ((0.56874992047+0.229986085678j))*x_ref[0] + ((-0.499754830677+0.136467615837j))*x_ref[1]**o + ((-0.609843018756-0.44279024919j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.844721369331+0.214323249269j)*x[0]**o + ((0.490087273548+0.761330527904j))*x[0] + ((0.500842761993-0.272572080051j))*x[1]**o + ((0.614308626811-0.787842401008j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.844721369331+0.214323249269j)*x_ref[0]**o + ((0.490087273548+0.761330527904j))*x_ref[0] + ((0.500842761993-0.272572080051j))*x_ref[1]**o + ((0.614308626811-0.787842401008j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.281147349889-0.172411325754j)*x[0]**o + ((-0.623081442631-0.607092910071j))*x[0] + ((0.728357279557+0.392457185589j))*x[1]**o + ((-0.497455792966+0.36952337566j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.281147349889-0.172411325754j)*x_ref[0]**o + ((-0.623081442631-0.607092910071j))*x_ref[0] + ((0.728357279557+0.392457185589j))*x_ref[1]**o + ((-0.497455792966+0.36952337566j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(-0.499614354202-0.38388767985j)*x[0]**o + ((-0.342650447608+0.443877710697j))*x[0] + ((-0.586925211002+0.516052983772j))*x[1]**o + ((0.203380435021-0.475959837059j))*x[1]
+        ref[(0, 2, 0, 2)]=(-0.499614354202-0.38388767985j)*x_ref[0]**o + ((-0.342650447608+0.443877710697j))*x_ref[0] + ((-0.586925211002+0.516052983772j))*x_ref[1]**o + ((0.203380435021-0.475959837059j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(0.0271411025595-0.873858212228j)*x[0]**o + ((-0.8144206369+0.794450434164j))*x[0] + ((0.0831953551032+0.110812722328j))*x[1]**o + ((0.223469156093-0.881419014052j))*x[1]
+        ref[(0, 2, 0, 3)]=(0.0271411025595-0.873858212228j)*x_ref[0]**o + ((-0.8144206369+0.794450434164j))*x_ref[0] + ((0.0831953551032+0.110812722328j))*x_ref[1]**o + ((0.223469156093-0.881419014052j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.0281993977748-0.878017183994j)*x[0]**o + ((-0.00238662148964+0.126094023642j))*x[0] + ((-0.862265614964+0.257060875672j))*x[1]**o + ((0.0350297530697-0.400343569038j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.0281993977748-0.878017183994j)*x_ref[0]**o + ((-0.00238662148964+0.126094023642j))*x_ref[0] + ((-0.862265614964+0.257060875672j))*x_ref[1]**o + ((0.0350297530697-0.400343569038j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.322655306326-0.138520418193j)*x[0]**o + ((0.469680676246-0.962665160108j))*x[0] + ((0.241170537208-0.387205956412j))*x[1]**o + ((-0.15408848518-0.876804317427j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.322655306326-0.138520418193j)*x_ref[0]**o + ((0.469680676246-0.962665160108j))*x_ref[0] + ((0.241170537208-0.387205956412j))*x_ref[1]**o + ((-0.15408848518-0.876804317427j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(-0.574968674929-0.530421534264j)*x[0]**o + ((-0.205372585212+0.890640023695j))*x[0] + ((0.710811889344-0.57838878349j))*x[1]**o + ((0.0441995400565-0.364299706195j))*x[1]
+        ref[(0, 2, 1, 2)]=(-0.574968674929-0.530421534264j)*x_ref[0]**o + ((-0.205372585212+0.890640023695j))*x_ref[0] + ((0.710811889344-0.57838878349j))*x_ref[1]**o + ((0.0441995400565-0.364299706195j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(0.594547045359-0.305840294847j)*x[0]**o + ((0.699060008625+0.888195029851j))*x[0] + ((0.555019401043+0.475949632064j))*x[1]**o + ((-0.977033454145+0.497073683824j))*x[1]
+        ref[(0, 2, 1, 3)]=(0.594547045359-0.305840294847j)*x_ref[0]**o + ((0.699060008625+0.888195029851j))*x_ref[0] + ((0.555019401043+0.475949632064j))*x_ref[1]**o + ((-0.977033454145+0.497073683824j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.963346358956+0.336897169641j)*x[0]**o + ((-0.711737836557+0.165318057317j))*x[0] + ((0.600899906484-0.20985051438j))*x[1]**o + ((0.568267298509-0.624091705916j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.963346358956+0.336897169641j)*x_ref[0]**o + ((-0.711737836557+0.165318057317j))*x_ref[0] + ((0.600899906484-0.20985051438j))*x_ref[1]**o + ((0.568267298509-0.624091705916j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.238686309868+0.580622462997j)*x[0]**o + ((-0.302827949109-0.30625899579j))*x[0] + ((-0.265192410975+0.211023187487j))*x[1]**o + ((-0.477728295146+0.522784775795j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.238686309868+0.580622462997j)*x_ref[0]**o + ((-0.302827949109-0.30625899579j))*x_ref[0] + ((-0.265192410975+0.211023187487j))*x_ref[1]**o + ((-0.477728295146+0.522784775795j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(-0.853433802576-0.944476626209j)*x[0]**o + ((0.629139824546+0.202953200753j))*x[0] + ((0.630638412599+0.255988145517j))*x[1]**o + ((-0.305632170638+0.64638017184j))*x[1]
+        ref[(0, 2, 2, 2)]=(-0.853433802576-0.944476626209j)*x_ref[0]**o + ((0.629139824546+0.202953200753j))*x_ref[0] + ((0.630638412599+0.255988145517j))*x_ref[1]**o + ((-0.305632170638+0.64638017184j))*x_ref[1]
+        arg[(0, 2, 2, 3)]=(0.579616758024+0.716076705056j)*x[0]**o + ((0.000572524141032-0.906715011352j))*x[0] + ((-0.816765476418+0.797797993082j))*x[1]**o + ((0.838914555404+0.341584257401j))*x[1]
+        ref[(0, 2, 2, 3)]=(0.579616758024+0.716076705056j)*x_ref[0]**o + ((0.000572524141032-0.906715011352j))*x_ref[0] + ((-0.816765476418+0.797797993082j))*x_ref[1]**o + ((0.838914555404+0.341584257401j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(0.887155671173-0.866698137222j)*x[0]**o + ((0.0651639158373+0.0750003425926j))*x[0] + ((-0.823725160308-0.198197781453j))*x[1]**o + ((-0.766296613495-0.653135542815j))*x[1]
+        ref[(0, 2, 3, 0)]=(0.887155671173-0.866698137222j)*x_ref[0]**o + ((0.0651639158373+0.0750003425926j))*x_ref[0] + ((-0.823725160308-0.198197781453j))*x_ref[1]**o + ((-0.766296613495-0.653135542815j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(0.620285721254-0.52635825266j)*x[0]**o + ((0.186879648659+0.661954251696j))*x[0] + ((-0.341723492956-0.70972599561j))*x[1]**o + ((-0.168285241808+0.994249619702j))*x[1]
+        ref[(0, 2, 3, 1)]=(0.620285721254-0.52635825266j)*x_ref[0]**o + ((0.186879648659+0.661954251696j))*x_ref[0] + ((-0.341723492956-0.70972599561j))*x_ref[1]**o + ((-0.168285241808+0.994249619702j))*x_ref[1]
+        arg[(0, 2, 3, 2)]=(-0.0636657704284+0.736811660477j)*x[0]**o + ((-0.778151920877-0.458939914146j))*x[0] + ((-0.978717956134+0.185663639025j))*x[1]**o + ((-0.86401545772+0.0460839655263j))*x[1]
+        ref[(0, 2, 3, 2)]=(-0.0636657704284+0.736811660477j)*x_ref[0]**o + ((-0.778151920877-0.458939914146j))*x_ref[0] + ((-0.978717956134+0.185663639025j))*x_ref[1]**o + ((-0.86401545772+0.0460839655263j))*x_ref[1]
+        arg[(0, 2, 3, 3)]=(-0.365509456708-0.28929077787j)*x[0]**o + ((-0.381960512299+0.418692913634j))*x[0] + ((0.364570619186-0.860812201982j))*x[1]**o + ((-0.452197671695+0.719385272246j))*x[1]
+        ref[(0, 2, 3, 3)]=(-0.365509456708-0.28929077787j)*x_ref[0]**o + ((-0.381960512299+0.418692913634j))*x_ref[0] + ((0.364570619186-0.860812201982j))*x_ref[1]**o + ((-0.452197671695+0.719385272246j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.819650235198+0.384610187673j)*x[0]**o + ((0.782824805062-0.389502290492j))*x[0] + ((0.860819455804+0.509883920907j))*x[1]**o + ((-0.887542265946-0.932967841008j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.819650235198+0.384610187673j)*x_ref[0]**o + ((0.782824805062-0.389502290492j))*x_ref[0] + ((0.860819455804+0.509883920907j))*x_ref[1]**o + ((-0.887542265946-0.932967841008j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.039075712084-0.206358281647j)*x[0]**o + ((-0.372322780432+0.393431941942j))*x[0] + ((0.947873825445-0.715937560405j))*x[1]**o + ((0.131478732827+0.779443591585j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.039075712084-0.206358281647j)*x_ref[0]**o + ((-0.372322780432+0.393431941942j))*x_ref[0] + ((0.947873825445-0.715937560405j))*x_ref[1]**o + ((0.131478732827+0.779443591585j))*x_ref[1]
+        arg[(0, 3, 0, 2)]=(-0.33486136474-0.327123848136j)*x[0]**o + ((-0.26955830993-0.232614451716j))*x[0] + ((-0.499011956198-0.726286654867j))*x[1]**o + ((0.216751827418-0.334292238676j))*x[1]
+        ref[(0, 3, 0, 2)]=(-0.33486136474-0.327123848136j)*x_ref[0]**o + ((-0.26955830993-0.232614451716j))*x_ref[0] + ((-0.499011956198-0.726286654867j))*x_ref[1]**o + ((0.216751827418-0.334292238676j))*x_ref[1]
+        arg[(0, 3, 0, 3)]=(-0.816192833204-0.259671133764j)*x[0]**o + ((-0.995401746506-0.476880317741j))*x[0] + ((-0.103237691252+0.882476848073j))*x[1]**o + ((-0.880538473285+0.898736076137j))*x[1]
+        ref[(0, 3, 0, 3)]=(-0.816192833204-0.259671133764j)*x_ref[0]**o + ((-0.995401746506-0.476880317741j))*x_ref[0] + ((-0.103237691252+0.882476848073j))*x_ref[1]**o + ((-0.880538473285+0.898736076137j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.759846960726+0.838509217429j)*x[0]**o + ((0.439208784314+0.813057802703j))*x[0] + ((0.351468531666+0.657556869744j))*x[1]**o + ((0.292088332643-0.572808858804j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.759846960726+0.838509217429j)*x_ref[0]**o + ((0.439208784314+0.813057802703j))*x_ref[0] + ((0.351468531666+0.657556869744j))*x_ref[1]**o + ((0.292088332643-0.572808858804j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.364861343778+0.63686256309j)*x[0]**o + ((-0.222122155483+0.067748282918j))*x[0] + ((-0.271210222594+0.402484143686j))*x[1]**o + ((0.711439962611-0.230767283137j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.364861343778+0.63686256309j)*x_ref[0]**o + ((-0.222122155483+0.067748282918j))*x_ref[0] + ((-0.271210222594+0.402484143686j))*x_ref[1]**o + ((0.711439962611-0.230767283137j))*x_ref[1]
+        arg[(0, 3, 1, 2)]=(-0.00372163241949+0.302603636153j)*x[0]**o + ((-0.615092445402-0.823917701963j))*x[0] + ((-0.420552177928-0.89825004954j))*x[1]**o + ((-0.276501133658-0.246552993885j))*x[1]
+        ref[(0, 3, 1, 2)]=(-0.00372163241949+0.302603636153j)*x_ref[0]**o + ((-0.615092445402-0.823917701963j))*x_ref[0] + ((-0.420552177928-0.89825004954j))*x_ref[1]**o + ((-0.276501133658-0.246552993885j))*x_ref[1]
+        arg[(0, 3, 1, 3)]=(0.856913552972-0.430574754431j)*x[0]**o + ((0.579240432944-0.0228505276806j))*x[0] + ((0.365336399034+0.986708234323j))*x[1]**o + ((0.661685807487+0.12080108345j))*x[1]
+        ref[(0, 3, 1, 3)]=(0.856913552972-0.430574754431j)*x_ref[0]**o + ((0.579240432944-0.0228505276806j))*x_ref[0] + ((0.365336399034+0.986708234323j))*x_ref[1]**o + ((0.661685807487+0.12080108345j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.98223754739+0.895583431179j)*x[0]**o + ((-0.0249800092828+0.497116497134j))*x[0] + ((0.165578458594-0.914535079641j))*x[1]**o + ((0.89728845067-0.961441387553j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.98223754739+0.895583431179j)*x_ref[0]**o + ((-0.0249800092828+0.497116497134j))*x_ref[0] + ((0.165578458594-0.914535079641j))*x_ref[1]**o + ((0.89728845067-0.961441387553j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(0.193716956058+0.810116527311j)*x[0]**o + ((0.266374825741+0.769075226616j))*x[0] + ((0.345178755791-0.778237180876j))*x[1]**o + ((-0.198406964583+0.774894046039j))*x[1]
+        ref[(0, 3, 2, 1)]=(0.193716956058+0.810116527311j)*x_ref[0]**o + ((0.266374825741+0.769075226616j))*x_ref[0] + ((0.345178755791-0.778237180876j))*x_ref[1]**o + ((-0.198406964583+0.774894046039j))*x_ref[1]
+        arg[(0, 3, 2, 2)]=(-0.632936246953+0.155035429798j)*x[0]**o + ((0.46026446018+0.658483288643j))*x[0] + ((0.684332407407-0.251823427696j))*x[1]**o + ((-0.688598180512-0.965662502412j))*x[1]
+        ref[(0, 3, 2, 2)]=(-0.632936246953+0.155035429798j)*x_ref[0]**o + ((0.46026446018+0.658483288643j))*x_ref[0] + ((0.684332407407-0.251823427696j))*x_ref[1]**o + ((-0.688598180512-0.965662502412j))*x_ref[1]
+        arg[(0, 3, 2, 3)]=(-0.58860933316-0.190500059262j)*x[0]**o + ((0.791249951076+0.699846711726j))*x[0] + ((-0.786066482865-0.429255759698j))*x[1]**o + ((-0.302334754346-0.448909937806j))*x[1]
+        ref[(0, 3, 2, 3)]=(-0.58860933316-0.190500059262j)*x_ref[0]**o + ((0.791249951076+0.699846711726j))*x_ref[0] + ((-0.786066482865-0.429255759698j))*x_ref[1]**o + ((-0.302334754346-0.448909937806j))*x_ref[1]
+        arg[(0, 3, 3, 0)]=(-0.743068384489+0.675541455655j)*x[0]**o + ((0.388266032514+0.185598354717j))*x[0] + ((0.825743046026+0.0235554397975j))*x[1]**o + ((0.861567832189+0.839020520225j))*x[1]
+        ref[(0, 3, 3, 0)]=(-0.743068384489+0.675541455655j)*x_ref[0]**o + ((0.388266032514+0.185598354717j))*x_ref[0] + ((0.825743046026+0.0235554397975j))*x_ref[1]**o + ((0.861567832189+0.839020520225j))*x_ref[1]
+        arg[(0, 3, 3, 1)]=(-0.957710053253-0.844663028565j)*x[0]**o + ((0.876927103073+0.839982621501j))*x[0] + ((0.0921635946221+0.927554179652j))*x[1]**o + ((-0.0817781807552-0.623716015201j))*x[1]
+        ref[(0, 3, 3, 1)]=(-0.957710053253-0.844663028565j)*x_ref[0]**o + ((0.876927103073+0.839982621501j))*x_ref[0] + ((0.0921635946221+0.927554179652j))*x_ref[1]**o + ((-0.0817781807552-0.623716015201j))*x_ref[1]
+        arg[(0, 3, 3, 2)]=(0.390001013188-0.147324105618j)*x[0]**o + ((0.0854008454748+0.626270437094j))*x[0] + ((-0.462311070098+0.092821927279j))*x[1]**o + ((0.0107284208294-0.605650413672j))*x[1]
+        ref[(0, 3, 3, 2)]=(0.390001013188-0.147324105618j)*x_ref[0]**o + ((0.0854008454748+0.626270437094j))*x_ref[0] + ((-0.462311070098+0.092821927279j))*x_ref[1]**o + ((0.0107284208294-0.605650413672j))*x_ref[1]
+        arg[(0, 3, 3, 3)]=(-0.950711435617-0.184446250518j)*x[0]**o + ((-0.104250244194-0.0456309784907j))*x[0] + ((0.936740909499-0.555653424602j))*x[1]**o + ((-0.868891240669+0.20493707587j))*x[1]
+        ref[(0, 3, 3, 3)]=(-0.950711435617-0.184446250518j)*x_ref[0]**o + ((-0.104250244194-0.0456309784907j))*x_ref[0] + ((0.936740909499-0.555653424602j))*x_ref[1]**o + ((-0.868891240669+0.20493707587j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.976088169264-0.909229621815j)*x[0]**o + ((-0.108038410321-0.379110363373j))*x[0] + ((0.409123626836-0.676111646883j))*x[1]**o + ((-0.63475196734-0.0642097366475j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.976088169264-0.909229621815j)*x_ref[0]**o + ((-0.108038410321-0.379110363373j))*x_ref[0] + ((0.409123626836-0.676111646883j))*x_ref[1]**o + ((-0.63475196734-0.0642097366475j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.599663038445+0.575972901153j)*x[0]**o + ((-0.372092147531+0.33176483089j))*x[0] + ((-0.946066190127-0.0331470719551j))*x[1]**o + ((0.64739079731+0.388592586981j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.599663038445+0.575972901153j)*x_ref[0]**o + ((-0.372092147531+0.33176483089j))*x_ref[0] + ((-0.946066190127-0.0331470719551j))*x_ref[1]**o + ((0.64739079731+0.388592586981j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.956926235659+0.135334244301j)*x[0]**o + ((-0.423576139521+0.809042762131j))*x[0] + ((0.0494352607653+0.361680513797j))*x[1]**o + ((0.213120239809+0.521367484876j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.956926235659+0.135334244301j)*x_ref[0]**o + ((-0.423576139521+0.809042762131j))*x_ref[0] + ((0.0494352607653+0.361680513797j))*x_ref[1]**o + ((0.213120239809+0.521367484876j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(0.888919204187+0.508127912074j)*x[0]**o + ((-0.240677507066-0.582969142681j))*x[0] + ((-0.00456275342816+0.641985256383j))*x[1]**o + ((0.38880189662-0.397683758862j))*x[1]
+        ref[(1, 0, 0, 3)]=(0.888919204187+0.508127912074j)*x_ref[0]**o + ((-0.240677507066-0.582969142681j))*x_ref[0] + ((-0.00456275342816+0.641985256383j))*x_ref[1]**o + ((0.38880189662-0.397683758862j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.993791239215-0.960521537152j)*x[0]**o + ((0.365351448476+0.547307144667j))*x[0] + ((0.863909028815+0.867953794761j))*x[1]**o + ((0.49682998139-0.94813789972j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.993791239215-0.960521537152j)*x_ref[0]**o + ((0.365351448476+0.547307144667j))*x_ref[0] + ((0.863909028815+0.867953794761j))*x_ref[1]**o + ((0.49682998139-0.94813789972j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.402544641124-0.443090530845j)*x[0]**o + ((-0.793379025346+0.642840112354j))*x[0] + ((-0.205272002703+0.150810520068j))*x[1]**o + ((-0.151420738852-0.705268282206j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.402544641124-0.443090530845j)*x_ref[0]**o + ((-0.793379025346+0.642840112354j))*x_ref[0] + ((-0.205272002703+0.150810520068j))*x_ref[1]**o + ((-0.151420738852-0.705268282206j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.794264843846+0.52588838465j)*x[0]**o + ((-0.667120656184+0.192418661824j))*x[0] + ((-0.173224737885-0.177803495618j))*x[1]**o + ((0.335438392418-0.408963902903j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.794264843846+0.52588838465j)*x_ref[0]**o + ((-0.667120656184+0.192418661824j))*x_ref[0] + ((-0.173224737885-0.177803495618j))*x_ref[1]**o + ((0.335438392418-0.408963902903j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(0.842839015747+0.468176609966j)*x[0]**o + ((0.938158907367+0.798796609045j))*x[0] + ((0.82744771221+0.376341507764j))*x[1]**o + ((0.913257640383+0.764075027494j))*x[1]
+        ref[(1, 0, 1, 3)]=(0.842839015747+0.468176609966j)*x_ref[0]**o + ((0.938158907367+0.798796609045j))*x_ref[0] + ((0.82744771221+0.376341507764j))*x_ref[1]**o + ((0.913257640383+0.764075027494j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.713768326572-0.0729347931854j)*x[0]**o + ((-0.521260560606-0.390541893709j))*x[0] + ((0.118498969776+0.88692587609j))*x[1]**o + ((-0.292810716138+0.654539870665j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.713768326572-0.0729347931854j)*x_ref[0]**o + ((-0.521260560606-0.390541893709j))*x_ref[0] + ((0.118498969776+0.88692587609j))*x_ref[1]**o + ((-0.292810716138+0.654539870665j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.211193867038-0.150925879012j)*x[0]**o + ((0.945379391683-0.228530599924j))*x[0] + ((0.0293124595174-0.0967050112012j))*x[1]**o + ((0.895187380895+0.351569242196j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.211193867038-0.150925879012j)*x_ref[0]**o + ((0.945379391683-0.228530599924j))*x_ref[0] + ((0.0293124595174-0.0967050112012j))*x_ref[1]**o + ((0.895187380895+0.351569242196j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.779904796646+0.0899053971725j)*x[0]**o + ((0.53340927634-0.626105248954j))*x[0] + ((-0.483392918226+0.230915581797j))*x[1]**o + ((-0.587434047759+0.799740616714j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.779904796646+0.0899053971725j)*x_ref[0]**o + ((0.53340927634-0.626105248954j))*x_ref[0] + ((-0.483392918226+0.230915581797j))*x_ref[1]**o + ((-0.587434047759+0.799740616714j))*x_ref[1]
+        arg[(1, 0, 2, 3)]=(0.0626179632548+0.0130293832662j)*x[0]**o + ((0.228881719062+0.972032563563j))*x[0] + ((-0.369966377774+0.231782823708j))*x[1]**o + ((0.664254692215+0.300551917371j))*x[1]
+        ref[(1, 0, 2, 3)]=(0.0626179632548+0.0130293832662j)*x_ref[0]**o + ((0.228881719062+0.972032563563j))*x_ref[0] + ((-0.369966377774+0.231782823708j))*x_ref[1]**o + ((0.664254692215+0.300551917371j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.628762124982+0.555756069457j)*x[0]**o + ((0.0867684867119+0.251218229387j))*x[0] + ((0.827584672032-0.795364669464j))*x[1]**o + ((0.247151610429+0.151796269713j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.628762124982+0.555756069457j)*x_ref[0]**o + ((0.0867684867119+0.251218229387j))*x_ref[0] + ((0.827584672032-0.795364669464j))*x_ref[1]**o + ((0.247151610429+0.151796269713j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.356956980223-0.401386804187j)*x[0]**o + ((0.966205471507+0.139770552332j))*x[0] + ((-0.100973914269+0.112351269754j))*x[1]**o + ((-0.72221622371-0.194003881997j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.356956980223-0.401386804187j)*x_ref[0]**o + ((0.966205471507+0.139770552332j))*x_ref[0] + ((-0.100973914269+0.112351269754j))*x_ref[1]**o + ((-0.72221622371-0.194003881997j))*x_ref[1]
+        arg[(1, 0, 3, 2)]=(0.361578291208+0.291750183312j)*x[0]**o + ((-0.646629167622-0.485537838278j))*x[0] + ((-0.694161296953+0.662694027705j))*x[1]**o + ((-0.451622795951+0.180605136926j))*x[1]
+        ref[(1, 0, 3, 2)]=(0.361578291208+0.291750183312j)*x_ref[0]**o + ((-0.646629167622-0.485537838278j))*x_ref[0] + ((-0.694161296953+0.662694027705j))*x_ref[1]**o + ((-0.451622795951+0.180605136926j))*x_ref[1]
+        arg[(1, 0, 3, 3)]=(-0.399559537218+0.120475695425j)*x[0]**o + ((0.772118123011-0.749556535764j))*x[0] + ((-0.739430308079-0.503508929441j))*x[1]**o + ((-0.21754407684-0.1795547187j))*x[1]
+        ref[(1, 0, 3, 3)]=(-0.399559537218+0.120475695425j)*x_ref[0]**o + ((0.772118123011-0.749556535764j))*x_ref[0] + ((-0.739430308079-0.503508929441j))*x_ref[1]**o + ((-0.21754407684-0.1795547187j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.728379092189+0.463301421986j)*x[0]**o + ((0.364700324762-0.684765562292j))*x[0] + ((-0.347123413613+0.144186755616j))*x[1]**o + ((-0.778081131221-0.0718371467996j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.728379092189+0.463301421986j)*x_ref[0]**o + ((0.364700324762-0.684765562292j))*x_ref[0] + ((-0.347123413613+0.144186755616j))*x_ref[1]**o + ((-0.778081131221-0.0718371467996j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.527823554375+0.154421304274j)*x[0]**o + ((-0.493896072177+0.978857120723j))*x[0] + ((0.45350524858+0.585339193215j))*x[1]**o + ((-0.950763901531+0.416313732618j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.527823554375+0.154421304274j)*x_ref[0]**o + ((-0.493896072177+0.978857120723j))*x_ref[0] + ((0.45350524858+0.585339193215j))*x_ref[1]**o + ((-0.950763901531+0.416313732618j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.251423054322-0.684347503537j)*x[0]**o + ((0.644413727972+0.108120835092j))*x[0] + ((-0.131282671311-0.202535465974j))*x[1]**o + ((-0.658904066651+0.984590654166j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.251423054322-0.684347503537j)*x_ref[0]**o + ((0.644413727972+0.108120835092j))*x_ref[0] + ((-0.131282671311-0.202535465974j))*x_ref[1]**o + ((-0.658904066651+0.984590654166j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.590092962475-0.246086255818j)*x[0]**o + ((-0.416195350774-0.122583586832j))*x[0] + ((0.9518655778-0.567207143427j))*x[1]**o + ((0.201836702343+0.0483847271136j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.590092962475-0.246086255818j)*x_ref[0]**o + ((-0.416195350774-0.122583586832j))*x_ref[0] + ((0.9518655778-0.567207143427j))*x_ref[1]**o + ((0.201836702343+0.0483847271136j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.353927361397+0.28076050434j)*x[0]**o + ((0.478428124582+0.188285062356j))*x[0] + ((-0.92827323397-0.61450650596j))*x[1]**o + ((-0.690216362863-0.2045013449j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.353927361397+0.28076050434j)*x_ref[0]**o + ((0.478428124582+0.188285062356j))*x_ref[0] + ((-0.92827323397-0.61450650596j))*x_ref[1]**o + ((-0.690216362863-0.2045013449j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.578694769711-0.407695915663j)*x[0]**o + ((-0.990357780574-0.319669318442j))*x[0] + ((0.894890374931+0.43808771674j))*x[1]**o + ((0.346716792091-0.0490084848823j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.578694769711-0.407695915663j)*x_ref[0]**o + ((-0.990357780574-0.319669318442j))*x_ref[0] + ((0.894890374931+0.43808771674j))*x_ref[1]**o + ((0.346716792091-0.0490084848823j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.979685447053+0.311187255938j)*x[0]**o + ((0.486208261045+0.611556835094j))*x[0] + ((-0.664953656675+0.964660605794j))*x[1]**o + ((-0.99949649387-0.625545981465j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.979685447053+0.311187255938j)*x_ref[0]**o + ((0.486208261045+0.611556835094j))*x_ref[0] + ((-0.664953656675+0.964660605794j))*x_ref[1]**o + ((-0.99949649387-0.625545981465j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(0.359043811604+0.93410760995j)*x[0]**o + ((0.458758597706+0.611329741767j))*x[0] + ((-0.498029843311+0.446892639937j))*x[1]**o + ((0.281249331753-0.149692053736j))*x[1]
+        ref[(1, 1, 1, 3)]=(0.359043811604+0.93410760995j)*x_ref[0]**o + ((0.458758597706+0.611329741767j))*x_ref[0] + ((-0.498029843311+0.446892639937j))*x_ref[1]**o + ((0.281249331753-0.149692053736j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.51052391321+0.383848645803j)*x[0]**o + ((0.382148466359+0.842036190771j))*x[0] + ((0.489579516837+0.808101951461j))*x[1]**o + ((-0.376067674279+0.205067236766j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.51052391321+0.383848645803j)*x_ref[0]**o + ((0.382148466359+0.842036190771j))*x_ref[0] + ((0.489579516837+0.808101951461j))*x_ref[1]**o + ((-0.376067674279+0.205067236766j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.454563053678+0.0269135530378j)*x[0]**o + ((0.824735623264+0.0828640597783j))*x[0] + ((0.931374852481-0.611612523979j))*x[1]**o + ((0.401601528144-0.747480440258j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.454563053678+0.0269135530378j)*x_ref[0]**o + ((0.824735623264+0.0828640597783j))*x_ref[0] + ((0.931374852481-0.611612523979j))*x_ref[1]**o + ((0.401601528144-0.747480440258j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.24227643056-0.835593331761j)*x[0]**o + ((-0.313927354251+0.284649590119j))*x[0] + ((0.304035996033+0.900752969157j))*x[1]**o + ((0.738980666345+0.143340613387j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.24227643056-0.835593331761j)*x_ref[0]**o + ((-0.313927354251+0.284649590119j))*x_ref[0] + ((0.304035996033+0.900752969157j))*x_ref[1]**o + ((0.738980666345+0.143340613387j))*x_ref[1]
+        arg[(1, 1, 2, 3)]=(0.326241885717-0.444635589719j)*x[0]**o + ((-0.219089727932-0.953541148142j))*x[0] + ((-0.266120901221-0.0969662806427j))*x[1]**o + ((-0.654087110843-0.9464972242j))*x[1]
+        ref[(1, 1, 2, 3)]=(0.326241885717-0.444635589719j)*x_ref[0]**o + ((-0.219089727932-0.953541148142j))*x_ref[0] + ((-0.266120901221-0.0969662806427j))*x_ref[1]**o + ((-0.654087110843-0.9464972242j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(-0.803423009302+0.942937043429j)*x[0]**o + ((-0.131196969172+0.935606064013j))*x[0] + ((0.966529790167-0.932044683333j))*x[1]**o + ((-0.626346775818+0.20638608839j))*x[1]
+        ref[(1, 1, 3, 0)]=(-0.803423009302+0.942937043429j)*x_ref[0]**o + ((-0.131196969172+0.935606064013j))*x_ref[0] + ((0.966529790167-0.932044683333j))*x_ref[1]**o + ((-0.626346775818+0.20638608839j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.743097433562-0.97461214768j)*x[0]**o + ((-0.681120511672-0.395690667253j))*x[0] + ((-0.393063482723+0.844860115621j))*x[1]**o + ((0.62224179081+0.20411944163j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.743097433562-0.97461214768j)*x_ref[0]**o + ((-0.681120511672-0.395690667253j))*x_ref[0] + ((-0.393063482723+0.844860115621j))*x_ref[1]**o + ((0.62224179081+0.20411944163j))*x_ref[1]
+        arg[(1, 1, 3, 2)]=(0.144668033684-0.908916369231j)*x[0]**o + ((0.463222661662+0.659922093303j))*x[0] + ((-0.385924424297+0.455550496304j))*x[1]**o + ((0.0379110954735+0.730319446651j))*x[1]
+        ref[(1, 1, 3, 2)]=(0.144668033684-0.908916369231j)*x_ref[0]**o + ((0.463222661662+0.659922093303j))*x_ref[0] + ((-0.385924424297+0.455550496304j))*x_ref[1]**o + ((0.0379110954735+0.730319446651j))*x_ref[1]
+        arg[(1, 1, 3, 3)]=(-0.129278682178-0.647584839142j)*x[0]**o + ((-0.46418933678+0.0313030410619j))*x[0] + ((-0.287145149687-0.450894776656j))*x[1]**o + ((0.671025108549-0.628704319695j))*x[1]
+        ref[(1, 1, 3, 3)]=(-0.129278682178-0.647584839142j)*x_ref[0]**o + ((-0.46418933678+0.0313030410619j))*x_ref[0] + ((-0.287145149687-0.450894776656j))*x_ref[1]**o + ((0.671025108549-0.628704319695j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.20549669358+0.0476447168079j)*x[0]**o + ((-0.170930228702-0.758787727826j))*x[0] + ((-0.245625553084-0.0138162173927j))*x[1]**o + ((0.151207536098-0.33350229242j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.20549669358+0.0476447168079j)*x_ref[0]**o + ((-0.170930228702-0.758787727826j))*x_ref[0] + ((-0.245625553084-0.0138162173927j))*x_ref[1]**o + ((0.151207536098-0.33350229242j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.936233521479-0.639393541925j)*x[0]**o + ((-0.87468790665+0.375829235947j))*x[0] + ((-0.934136677919-0.0248073193098j))*x[1]**o + ((-0.603123410796-0.158596122648j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.936233521479-0.639393541925j)*x_ref[0]**o + ((-0.87468790665+0.375829235947j))*x_ref[0] + ((-0.934136677919-0.0248073193098j))*x_ref[1]**o + ((-0.603123410796-0.158596122648j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(-0.879242957539-0.85247591628j)*x[0]**o + ((-0.838046870739+0.0710082464286j))*x[0] + ((0.668474339675+0.895482491151j))*x[1]**o + ((-0.295779488398-0.870596535227j))*x[1]
+        ref[(1, 2, 0, 2)]=(-0.879242957539-0.85247591628j)*x_ref[0]**o + ((-0.838046870739+0.0710082464286j))*x_ref[0] + ((0.668474339675+0.895482491151j))*x_ref[1]**o + ((-0.295779488398-0.870596535227j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(-0.67786725428-0.375213504995j)*x[0]**o + ((0.145651402744+0.167274583388j))*x[0] + ((-0.120034374073-0.439628588457j))*x[1]**o + ((-0.807407529079+0.308690693249j))*x[1]
+        ref[(1, 2, 0, 3)]=(-0.67786725428-0.375213504995j)*x_ref[0]**o + ((0.145651402744+0.167274583388j))*x_ref[0] + ((-0.120034374073-0.439628588457j))*x_ref[1]**o + ((-0.807407529079+0.308690693249j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.531574616171+0.946898746769j)*x[0]**o + ((-0.923299620018+0.13323671283j))*x[0] + ((0.664250373795+0.195040174619j))*x[1]**o + ((0.754212856663+0.538184799644j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.531574616171+0.946898746769j)*x_ref[0]**o + ((-0.923299620018+0.13323671283j))*x_ref[0] + ((0.664250373795+0.195040174619j))*x_ref[1]**o + ((0.754212856663+0.538184799644j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.394037680005+0.561041720674j)*x[0]**o + ((-0.821931984192+0.467540443004j))*x[0] + ((-0.561892346768+0.392316754671j))*x[1]**o + ((-0.238223808106-0.190747160995j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.394037680005+0.561041720674j)*x_ref[0]**o + ((-0.821931984192+0.467540443004j))*x_ref[0] + ((-0.561892346768+0.392316754671j))*x_ref[1]**o + ((-0.238223808106-0.190747160995j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.866401200879-0.749461457176j)*x[0]**o + ((0.53747544441-0.887282724305j))*x[0] + ((0.985889541637+0.514200637592j))*x[1]**o + ((0.396750677852-0.92797049454j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.866401200879-0.749461457176j)*x_ref[0]**o + ((0.53747544441-0.887282724305j))*x_ref[0] + ((0.985889541637+0.514200637592j))*x_ref[1]**o + ((0.396750677852-0.92797049454j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(0.949807756439+0.603144585762j)*x[0]**o + ((-0.295542476357+0.509914844722j))*x[0] + ((0.499362185407-0.140343639345j))*x[1]**o + ((0.482976517959-0.702701847858j))*x[1]
+        ref[(1, 2, 1, 3)]=(0.949807756439+0.603144585762j)*x_ref[0]**o + ((-0.295542476357+0.509914844722j))*x_ref[0] + ((0.499362185407-0.140343639345j))*x_ref[1]**o + ((0.482976517959-0.702701847858j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.305329013213-0.0363208029516j)*x[0]**o + ((-0.859321236927+0.567784558047j))*x[0] + ((-0.809678029103+0.698137894404j))*x[1]**o + ((-0.495888819222+0.128874945491j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.305329013213-0.0363208029516j)*x_ref[0]**o + ((-0.859321236927+0.567784558047j))*x_ref[0] + ((-0.809678029103+0.698137894404j))*x_ref[1]**o + ((-0.495888819222+0.128874945491j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.44237430371+0.909623518428j)*x[0]**o + ((0.580508058799-0.34438282338j))*x[0] + ((0.826412216282+0.229600486684j))*x[1]**o + ((0.660640143975-0.952420310518j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.44237430371+0.909623518428j)*x_ref[0]**o + ((0.580508058799-0.34438282338j))*x_ref[0] + ((0.826412216282+0.229600486684j))*x_ref[1]**o + ((0.660640143975-0.952420310518j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(-0.024337854736-0.405350809233j)*x[0]**o + ((-0.00328698382532-0.0167861471408j))*x[0] + ((-0.573434805006-0.135851738033j))*x[1]**o + ((-0.482309797199-0.975312299685j))*x[1]
+        ref[(1, 2, 2, 2)]=(-0.024337854736-0.405350809233j)*x_ref[0]**o + ((-0.00328698382532-0.0167861471408j))*x_ref[0] + ((-0.573434805006-0.135851738033j))*x_ref[1]**o + ((-0.482309797199-0.975312299685j))*x_ref[1]
+        arg[(1, 2, 2, 3)]=(0.457551938511+0.184024370662j)*x[0]**o + ((0.351479572203-0.356753750107j))*x[0] + ((-0.31091464247-0.181183247218j))*x[1]**o + ((0.921388843895-0.921857257856j))*x[1]
+        ref[(1, 2, 2, 3)]=(0.457551938511+0.184024370662j)*x_ref[0]**o + ((0.351479572203-0.356753750107j))*x_ref[0] + ((-0.31091464247-0.181183247218j))*x_ref[1]**o + ((0.921388843895-0.921857257856j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(-0.370842626605+0.963456372714j)*x[0]**o + ((0.876355456054+0.286390347423j))*x[0] + ((0.00331513593021-0.628692455112j))*x[1]**o + ((0.447813163574-0.512644376819j))*x[1]
+        ref[(1, 2, 3, 0)]=(-0.370842626605+0.963456372714j)*x_ref[0]**o + ((0.876355456054+0.286390347423j))*x_ref[0] + ((0.00331513593021-0.628692455112j))*x_ref[1]**o + ((0.447813163574-0.512644376819j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(0.478798197889-0.556382467002j)*x[0]**o + ((0.716536857884-0.986248728751j))*x[0] + ((-0.441046363893+0.953156194463j))*x[1]**o + ((-0.120431457151-0.644438059261j))*x[1]
+        ref[(1, 2, 3, 1)]=(0.478798197889-0.556382467002j)*x_ref[0]**o + ((0.716536857884-0.986248728751j))*x_ref[0] + ((-0.441046363893+0.953156194463j))*x_ref[1]**o + ((-0.120431457151-0.644438059261j))*x_ref[1]
+        arg[(1, 2, 3, 2)]=(-0.485452510469+0.452503882274j)*x[0]**o + ((0.898103752881-0.764831985126j))*x[0] + ((0.139615129903+0.77718359407j))*x[1]**o + ((0.546077628923+0.227334626447j))*x[1]
+        ref[(1, 2, 3, 2)]=(-0.485452510469+0.452503882274j)*x_ref[0]**o + ((0.898103752881-0.764831985126j))*x_ref[0] + ((0.139615129903+0.77718359407j))*x_ref[1]**o + ((0.546077628923+0.227334626447j))*x_ref[1]
+        arg[(1, 2, 3, 3)]=(-0.854453503515-0.613953215151j)*x[0]**o + ((0.995967925989-0.451326486778j))*x[0] + ((0.0733980766333+0.908405468695j))*x[1]**o + ((0.354649088954-0.602441376491j))*x[1]
+        ref[(1, 2, 3, 3)]=(-0.854453503515-0.613953215151j)*x_ref[0]**o + ((0.995967925989-0.451326486778j))*x_ref[0] + ((0.0733980766333+0.908405468695j))*x_ref[1]**o + ((0.354649088954-0.602441376491j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.540454833289-0.0139168442153j)*x[0]**o + ((0.548256628384+0.715763073337j))*x[0] + ((-0.0325443139088-0.494664314652j))*x[1]**o + ((-0.832962078701+0.87850099784j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.540454833289-0.0139168442153j)*x_ref[0]**o + ((0.548256628384+0.715763073337j))*x_ref[0] + ((-0.0325443139088-0.494664314652j))*x_ref[1]**o + ((-0.832962078701+0.87850099784j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.860395128242+0.658212750349j)*x[0]**o + ((0.990919648295+0.290189190043j))*x[0] + ((-0.159185592054+0.763274088807j))*x[1]**o + ((0.424760474674-0.203300145272j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.860395128242+0.658212750349j)*x_ref[0]**o + ((0.990919648295+0.290189190043j))*x_ref[0] + ((-0.159185592054+0.763274088807j))*x_ref[1]**o + ((0.424760474674-0.203300145272j))*x_ref[1]
+        arg[(1, 3, 0, 2)]=(0.123917832485+0.375431001309j)*x[0]**o + ((-0.442315745974+0.341226851436j))*x[0] + ((-0.0461327858037-0.810935038547j))*x[1]**o + ((0.924578823565+0.887955097049j))*x[1]
+        ref[(1, 3, 0, 2)]=(0.123917832485+0.375431001309j)*x_ref[0]**o + ((-0.442315745974+0.341226851436j))*x_ref[0] + ((-0.0461327858037-0.810935038547j))*x_ref[1]**o + ((0.924578823565+0.887955097049j))*x_ref[1]
+        arg[(1, 3, 0, 3)]=(-0.847886993419-0.317896579364j)*x[0]**o + ((0.903196277226+0.641947404188j))*x[0] + ((-0.808334521044-0.406140399079j))*x[1]**o + ((-0.968840169712+0.35754254469j))*x[1]
+        ref[(1, 3, 0, 3)]=(-0.847886993419-0.317896579364j)*x_ref[0]**o + ((0.903196277226+0.641947404188j))*x_ref[0] + ((-0.808334521044-0.406140399079j))*x_ref[1]**o + ((-0.968840169712+0.35754254469j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(0.191635726242+0.718718995931j)*x[0]**o + ((-0.0604646583246+0.36150167715j))*x[0] + ((-0.554235935376+0.224309191648j))*x[1]**o + ((0.423557680291-0.546542654299j))*x[1]
+        ref[(1, 3, 1, 0)]=(0.191635726242+0.718718995931j)*x_ref[0]**o + ((-0.0604646583246+0.36150167715j))*x_ref[0] + ((-0.554235935376+0.224309191648j))*x_ref[1]**o + ((0.423557680291-0.546542654299j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.152828549183-0.770592115629j)*x[0]**o + ((-0.142315469843-0.475812403595j))*x[0] + ((-0.939388250443+0.712787493426j))*x[1]**o + ((0.427437698486-0.0366399186564j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.152828549183-0.770592115629j)*x_ref[0]**o + ((-0.142315469843-0.475812403595j))*x_ref[0] + ((-0.939388250443+0.712787493426j))*x_ref[1]**o + ((0.427437698486-0.0366399186564j))*x_ref[1]
+        arg[(1, 3, 1, 2)]=(0.415466369653-0.702591504475j)*x[0]**o + ((-0.0781475928842+0.72881905117j))*x[0] + ((0.425705381363+0.497365449306j))*x[1]**o + ((-0.581291572166-0.788599064805j))*x[1]
+        ref[(1, 3, 1, 2)]=(0.415466369653-0.702591504475j)*x_ref[0]**o + ((-0.0781475928842+0.72881905117j))*x_ref[0] + ((0.425705381363+0.497365449306j))*x_ref[1]**o + ((-0.581291572166-0.788599064805j))*x_ref[1]
+        arg[(1, 3, 1, 3)]=(0.401389082117-0.0789134773273j)*x[0]**o + ((-0.773959790169-0.838211098448j))*x[0] + ((0.136664529843+0.437653065255j))*x[1]**o + ((0.31043459159-0.474712293043j))*x[1]
+        ref[(1, 3, 1, 3)]=(0.401389082117-0.0789134773273j)*x_ref[0]**o + ((-0.773959790169-0.838211098448j))*x_ref[0] + ((0.136664529843+0.437653065255j))*x_ref[1]**o + ((0.31043459159-0.474712293043j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(-0.333417768638+0.430292388328j)*x[0]**o + ((-0.647950211708-0.590291252383j))*x[0] + ((-0.647025738986+0.811854586501j))*x[1]**o + ((0.579913168718+0.334918502523j))*x[1]
+        ref[(1, 3, 2, 0)]=(-0.333417768638+0.430292388328j)*x_ref[0]**o + ((-0.647950211708-0.590291252383j))*x_ref[0] + ((-0.647025738986+0.811854586501j))*x_ref[1]**o + ((0.579913168718+0.334918502523j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(-0.836689349752-0.340495722901j)*x[0]**o + ((0.374394045546+0.235130555306j))*x[0] + ((0.892631585634-0.18320039191j))*x[1]**o + ((0.0232075369387+0.861813256686j))*x[1]
+        ref[(1, 3, 2, 1)]=(-0.836689349752-0.340495722901j)*x_ref[0]**o + ((0.374394045546+0.235130555306j))*x_ref[0] + ((0.892631585634-0.18320039191j))*x_ref[1]**o + ((0.0232075369387+0.861813256686j))*x_ref[1]
+        arg[(1, 3, 2, 2)]=(-0.533972260648-0.88623927051j)*x[0]**o + ((0.956470770158-0.659285292874j))*x[0] + ((0.894981966116+0.0418409418672j))*x[1]**o + ((0.762826242998+0.0346405950439j))*x[1]
+        ref[(1, 3, 2, 2)]=(-0.533972260648-0.88623927051j)*x_ref[0]**o + ((0.956470770158-0.659285292874j))*x_ref[0] + ((0.894981966116+0.0418409418672j))*x_ref[1]**o + ((0.762826242998+0.0346405950439j))*x_ref[1]
+        arg[(1, 3, 2, 3)]=(-0.224440355673+0.882468343548j)*x[0]**o + ((-0.928761612792+0.715770787827j))*x[0] + ((0.596984847196-0.278576677969j))*x[1]**o + ((-0.261645900501+0.800507099289j))*x[1]
+        ref[(1, 3, 2, 3)]=(-0.224440355673+0.882468343548j)*x_ref[0]**o + ((-0.928761612792+0.715770787827j))*x_ref[0] + ((0.596984847196-0.278576677969j))*x_ref[1]**o + ((-0.261645900501+0.800507099289j))*x_ref[1]
+        arg[(1, 3, 3, 0)]=(0.632829128097+0.0748709410437j)*x[0]**o + ((0.0881326983363+0.653095803038j))*x[0] + ((0.809558512635+0.233036352024j))*x[1]**o + ((-0.400954655374+0.196167536538j))*x[1]
+        ref[(1, 3, 3, 0)]=(0.632829128097+0.0748709410437j)*x_ref[0]**o + ((0.0881326983363+0.653095803038j))*x_ref[0] + ((0.809558512635+0.233036352024j))*x_ref[1]**o + ((-0.400954655374+0.196167536538j))*x_ref[1]
+        arg[(1, 3, 3, 1)]=(0.256206021389-0.0534574072414j)*x[0]**o + ((0.979754161982+0.380981999786j))*x[0] + ((-0.770197382914-0.428871629568j))*x[1]**o + ((0.628687675542+0.518928937424j))*x[1]
+        ref[(1, 3, 3, 1)]=(0.256206021389-0.0534574072414j)*x_ref[0]**o + ((0.979754161982+0.380981999786j))*x_ref[0] + ((-0.770197382914-0.428871629568j))*x_ref[1]**o + ((0.628687675542+0.518928937424j))*x_ref[1]
+        arg[(1, 3, 3, 2)]=(0.480759870407+0.822617181066j)*x[0]**o + ((-0.68360220233-0.291788372121j))*x[0] + ((-0.753914338367-0.959193162261j))*x[1]**o + ((0.735998136701-0.978407661108j))*x[1]
+        ref[(1, 3, 3, 2)]=(0.480759870407+0.822617181066j)*x_ref[0]**o + ((-0.68360220233-0.291788372121j))*x_ref[0] + ((-0.753914338367-0.959193162261j))*x_ref[1]**o + ((0.735998136701-0.978407661108j))*x_ref[1]
+        arg[(1, 3, 3, 3)]=(0.701972663906+0.865439197535j)*x[0]**o + ((-0.0837276317284+0.0901095391097j))*x[0] + ((-0.687725415642+0.083869586343j))*x[1]**o + ((-0.209370428112+0.289339935837j))*x[1]
+        ref[(1, 3, 3, 3)]=(0.701972663906+0.865439197535j)*x_ref[0]**o + ((-0.0837276317284+0.0901095391097j))*x_ref[0] + ((-0.687725415642+0.083869586343j))*x_ref[1]**o + ((-0.209370428112+0.289339935837j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.754845904565-0.286763006425j)*x[2]**o + ((-0.817439243072-0.593490234973j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.754845904565-0.286763006425j)*x_ref[2]**o + ((-0.817439243072-0.593490234973j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.715070910949-0.507899763972j)*x[2]**o + ((0.073152561804+0.177132187953j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.715070910949-0.507899763972j)*x_ref[2]**o + ((0.073152561804+0.177132187953j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.224168931733+0.384266388835j)*x[2]**o + ((-0.910516252869-0.41498688029j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.224168931733+0.384266388835j)*x_ref[2]**o + ((-0.910516252869-0.41498688029j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.252178535514-0.852058232687j)*x[2]**o + ((0.934186379411+0.557163760493j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.252178535514-0.852058232687j)*x_ref[2]**o + ((0.934186379411+0.557163760493j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.250003981637+0.27530482107j)*x[2]**o + ((-0.383839828307+0.195817232414j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.250003981637+0.27530482107j)*x_ref[2]**o + ((-0.383839828307+0.195817232414j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.701484081197+0.689864300507j)*x[2]**o + ((-0.546012326225+0.80335613718j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.701484081197+0.689864300507j)*x_ref[2]**o + ((-0.546012326225+0.80335613718j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.112585985688+0.752839502189j)*x[2]**o + ((-0.352394872214-0.256847698483j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.112585985688+0.752839502189j)*x_ref[2]**o + ((-0.352394872214-0.256847698483j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.382656968901-0.36545758097j)*x[2]**o + ((-0.694479803718-0.749744007413j))*x[2]
+            ref[(0, 0, 1, 3)]+=(0.382656968901-0.36545758097j)*x_ref[2]**o + ((-0.694479803718-0.749744007413j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.674978445183-0.203524352118j)*x[2]**o + ((0.665439099242-0.874216281907j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.674978445183-0.203524352118j)*x_ref[2]**o + ((0.665439099242-0.874216281907j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.430929786274+0.608210974792j)*x[2]**o + ((0.646868502014-0.503801866086j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.430929786274+0.608210974792j)*x_ref[2]**o + ((0.646868502014-0.503801866086j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(-0.905287514211+0.23006061311j)*x[2]**o + ((0.963592403203+0.340245818635j))*x[2]
+            ref[(0, 0, 2, 2)]+=(-0.905287514211+0.23006061311j)*x_ref[2]**o + ((0.963592403203+0.340245818635j))*x_ref[2]
+            arg[(0, 0, 2, 3)]+=(-0.682597938206-0.837092305207j)*x[2]**o + ((-0.859983478681+0.449791493501j))*x[2]
+            ref[(0, 0, 2, 3)]+=(-0.682597938206-0.837092305207j)*x_ref[2]**o + ((-0.859983478681+0.449791493501j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(0.191368867642-0.695335458504j)*x[2]**o + ((-0.707544758083-0.927725218913j))*x[2]
+            ref[(0, 0, 3, 0)]+=(0.191368867642-0.695335458504j)*x_ref[2]**o + ((-0.707544758083-0.927725218913j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(0.0874302164253+0.786725954336j)*x[2]**o + ((-0.788242046458+0.207067830665j))*x[2]
+            ref[(0, 0, 3, 1)]+=(0.0874302164253+0.786725954336j)*x_ref[2]**o + ((-0.788242046458+0.207067830665j))*x_ref[2]
+            arg[(0, 0, 3, 2)]+=(0.39045539158-0.107678052334j)*x[2]**o + ((-0.130555556857-0.491697486722j))*x[2]
+            ref[(0, 0, 3, 2)]+=(0.39045539158-0.107678052334j)*x_ref[2]**o + ((-0.130555556857-0.491697486722j))*x_ref[2]
+            arg[(0, 0, 3, 3)]+=(0.0992866553659+0.391294237622j)*x[2]**o + ((-0.647672002287-0.529020345228j))*x[2]
+            ref[(0, 0, 3, 3)]+=(0.0992866553659+0.391294237622j)*x_ref[2]**o + ((-0.647672002287-0.529020345228j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.0832473543081+0.502982843346j)*x[2]**o + ((0.0512907701357+0.586452024604j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.0832473543081+0.502982843346j)*x_ref[2]**o + ((0.0512907701357+0.586452024604j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.84063821294+0.199406478971j)*x[2]**o + ((0.544196530748-0.806492343495j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.84063821294+0.199406478971j)*x_ref[2]**o + ((0.544196530748-0.806492343495j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.113197353115-0.908777251977j)*x[2]**o + ((0.314542061277-0.539765971119j))*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.113197353115-0.908777251977j)*x_ref[2]**o + ((0.314542061277-0.539765971119j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.151994909952-0.208851816961j)*x[2]**o + ((0.407689721931-0.00460546622756j))*x[2]
+            ref[(0, 1, 0, 3)]+=(0.151994909952-0.208851816961j)*x_ref[2]**o + ((0.407689721931-0.00460546622756j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.191444710557-0.0500335377167j)*x[2]**o + ((-0.0377057643462+0.415425167786j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.191444710557-0.0500335377167j)*x_ref[2]**o + ((-0.0377057643462+0.415425167786j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.13156251014+0.711622216899j)*x[2]**o + ((0.256523755611+0.207339278251j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.13156251014+0.711622216899j)*x_ref[2]**o + ((0.256523755611+0.207339278251j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.00949295147092-0.31035033943j)*x[2]**o + ((0.224066578039+0.789274543947j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.00949295147092-0.31035033943j)*x_ref[2]**o + ((0.224066578039+0.789274543947j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.556358634084-0.890508556335j)*x[2]**o + ((0.769610564495+0.36320370974j))*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.556358634084-0.890508556335j)*x_ref[2]**o + ((0.769610564495+0.36320370974j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.769276819063-0.99047640971j)*x[2]**o + ((0.225339913138-0.577977135454j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.769276819063-0.99047640971j)*x_ref[2]**o + ((0.225339913138-0.577977135454j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.408416559325-0.632908787538j)*x[2]**o + ((-0.418817034479+0.363243085064j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.408416559325-0.632908787538j)*x_ref[2]**o + ((-0.418817034479+0.363243085064j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(-0.985571423046-0.771079898062j)*x[2]**o + ((-0.340693161843-0.325781618876j))*x[2]
+            ref[(0, 1, 2, 2)]+=(-0.985571423046-0.771079898062j)*x_ref[2]**o + ((-0.340693161843-0.325781618876j))*x_ref[2]
+            arg[(0, 1, 2, 3)]+=(0.187051711767-0.0412130952811j)*x[2]**o + ((0.0422108245105+0.914831860734j))*x[2]
+            ref[(0, 1, 2, 3)]+=(0.187051711767-0.0412130952811j)*x_ref[2]**o + ((0.0422108245105+0.914831860734j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(-0.642286886933-0.347591920402j)*x[2]**o + ((-0.696531251398-0.968134781436j))*x[2]
+            ref[(0, 1, 3, 0)]+=(-0.642286886933-0.347591920402j)*x_ref[2]**o + ((-0.696531251398-0.968134781436j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(0.125779137053+0.263361861079j)*x[2]**o + ((-0.53237656498-0.246578939232j))*x[2]
+            ref[(0, 1, 3, 1)]+=(0.125779137053+0.263361861079j)*x_ref[2]**o + ((-0.53237656498-0.246578939232j))*x_ref[2]
+            arg[(0, 1, 3, 2)]+=(-0.369696764895-0.546785250875j)*x[2]**o + ((0.179621503829+0.36373398123j))*x[2]
+            ref[(0, 1, 3, 2)]+=(-0.369696764895-0.546785250875j)*x_ref[2]**o + ((0.179621503829+0.36373398123j))*x_ref[2]
+            arg[(0, 1, 3, 3)]+=(-0.18321731425+0.951395538949j)*x[2]**o + ((0.0116979285485-0.0881123727142j))*x[2]
+            ref[(0, 1, 3, 3)]+=(-0.18321731425+0.951395538949j)*x_ref[2]**o + ((0.0116979285485-0.0881123727142j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.829454550863-0.139325698418j)*x[2]**o + ((-0.284477535583-0.582350381372j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.829454550863-0.139325698418j)*x_ref[2]**o + ((-0.284477535583-0.582350381372j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.666833211873+0.884656497548j)*x[2]**o + ((0.112378791435+0.377288311829j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.666833211873+0.884656497548j)*x_ref[2]**o + ((0.112378791435+0.377288311829j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.830603459507-0.718570790952j)*x[2]**o + ((0.864810749258+0.90698105152j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.830603459507-0.718570790952j)*x_ref[2]**o + ((0.864810749258+0.90698105152j))*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(0.695137011084-0.09229210595j)*x[2]**o + ((0.00674442977345+0.576111150679j))*x[2]
+            ref[(0, 2, 0, 3)]+=(0.695137011084-0.09229210595j)*x_ref[2]**o + ((0.00674442977345+0.576111150679j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.333770391547-0.826071931286j)*x[2]**o + ((0.698318738838+0.162803091294j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.333770391547-0.826071931286j)*x_ref[2]**o + ((0.698318738838+0.162803091294j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.527390953994+0.346671112277j)*x[2]**o + ((-0.811298850591-0.973632378943j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.527390953994+0.346671112277j)*x_ref[2]**o + ((-0.811298850591-0.973632378943j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.712357744655+0.249213316761j)*x[2]**o + ((0.769439063351+0.787974085343j))*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.712357744655+0.249213316761j)*x_ref[2]**o + ((0.769439063351+0.787974085343j))*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(-0.512906448174+0.074174823151j)*x[2]**o + ((-0.725414995906-0.431098012495j))*x[2]
+            ref[(0, 2, 1, 3)]+=(-0.512906448174+0.074174823151j)*x_ref[2]**o + ((-0.725414995906-0.431098012495j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.144100049392+0.766676122403j)*x[2]**o + ((-0.310203656788+0.701976437793j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.144100049392+0.766676122403j)*x_ref[2]**o + ((-0.310203656788+0.701976437793j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.0382593290514-0.0962672522636j)*x[2]**o + ((0.497389665432-0.0481637872865j))*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.0382593290514-0.0962672522636j)*x_ref[2]**o + ((0.497389665432-0.0481637872865j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.555437663061-0.154034818892j)*x[2]**o + ((0.79293508669+0.769496507781j))*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.555437663061-0.154034818892j)*x_ref[2]**o + ((0.79293508669+0.769496507781j))*x_ref[2]
+            arg[(0, 2, 2, 3)]+=(-0.550717700906-0.638733496105j)*x[2]**o + ((0.797791310826+0.0440196066382j))*x[2]
+            ref[(0, 2, 2, 3)]+=(-0.550717700906-0.638733496105j)*x_ref[2]**o + ((0.797791310826+0.0440196066382j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(0.656366043016+0.497639017365j)*x[2]**o + ((-0.460292222897-0.499222090117j))*x[2]
+            ref[(0, 2, 3, 0)]+=(0.656366043016+0.497639017365j)*x_ref[2]**o + ((-0.460292222897-0.499222090117j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(-0.979360381761+0.676687694672j)*x[2]**o + ((0.251269312378+0.616801191758j))*x[2]
+            ref[(0, 2, 3, 1)]+=(-0.979360381761+0.676687694672j)*x_ref[2]**o + ((0.251269312378+0.616801191758j))*x_ref[2]
+            arg[(0, 2, 3, 2)]+=(0.0214931680705-0.830284937778j)*x[2]**o + ((-0.821563527777+0.906502983899j))*x[2]
+            ref[(0, 2, 3, 2)]+=(0.0214931680705-0.830284937778j)*x_ref[2]**o + ((-0.821563527777+0.906502983899j))*x_ref[2]
+            arg[(0, 2, 3, 3)]+=(-0.3760957618-0.787616063639j)*x[2]**o + ((0.152968615556-0.0849556952838j))*x[2]
+            ref[(0, 2, 3, 3)]+=(-0.3760957618-0.787616063639j)*x_ref[2]**o + ((0.152968615556-0.0849556952838j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.565130045163-0.605877066318j)*x[2]**o + ((-0.546073831838-0.605127994511j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.565130045163-0.605877066318j)*x_ref[2]**o + ((-0.546073831838-0.605127994511j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.504301861314-0.997706536224j)*x[2]**o + ((0.00317743597253-0.392455052149j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.504301861314-0.997706536224j)*x_ref[2]**o + ((0.00317743597253-0.392455052149j))*x_ref[2]
+            arg[(0, 3, 0, 2)]+=(-0.475221045656+0.0742978541144j)*x[2]**o + ((-0.84011822165+0.715710906199j))*x[2]
+            ref[(0, 3, 0, 2)]+=(-0.475221045656+0.0742978541144j)*x_ref[2]**o + ((-0.84011822165+0.715710906199j))*x_ref[2]
+            arg[(0, 3, 0, 3)]+=(0.339871708081-0.721766099714j)*x[2]**o + ((0.659134800497-0.235258075476j))*x[2]
+            ref[(0, 3, 0, 3)]+=(0.339871708081-0.721766099714j)*x_ref[2]**o + ((0.659134800497-0.235258075476j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.0254302642562-0.130465408963j)*x[2]**o + ((-0.0803822240782+0.0885575806158j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.0254302642562-0.130465408963j)*x_ref[2]**o + ((-0.0803822240782+0.0885575806158j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.547532019885+0.629103041441j)*x[2]**o + ((-0.909868223656-0.687712320466j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.547532019885+0.629103041441j)*x_ref[2]**o + ((-0.909868223656-0.687712320466j))*x_ref[2]
+            arg[(0, 3, 1, 2)]+=(-0.993571875982-0.0454899904595j)*x[2]**o + ((0.753163983179+0.00179113585861j))*x[2]
+            ref[(0, 3, 1, 2)]+=(-0.993571875982-0.0454899904595j)*x_ref[2]**o + ((0.753163983179+0.00179113585861j))*x_ref[2]
+            arg[(0, 3, 1, 3)]+=(-0.741266648814+0.164620456363j)*x[2]**o + ((0.38401920857+0.369794750167j))*x[2]
+            ref[(0, 3, 1, 3)]+=(-0.741266648814+0.164620456363j)*x_ref[2]**o + ((0.38401920857+0.369794750167j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(0.793935899947-0.602246965509j)*x[2]**o + ((0.134885156222-0.181881073961j))*x[2]
+            ref[(0, 3, 2, 0)]+=(0.793935899947-0.602246965509j)*x_ref[2]**o + ((0.134885156222-0.181881073961j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(-0.7654416538-0.565760239149j)*x[2]**o + ((-0.184751707192+0.537625147581j))*x[2]
+            ref[(0, 3, 2, 1)]+=(-0.7654416538-0.565760239149j)*x_ref[2]**o + ((-0.184751707192+0.537625147581j))*x_ref[2]
+            arg[(0, 3, 2, 2)]+=(0.568157639969-0.181347754491j)*x[2]**o + ((0.61559052892-0.622292777032j))*x[2]
+            ref[(0, 3, 2, 2)]+=(0.568157639969-0.181347754491j)*x_ref[2]**o + ((0.61559052892-0.622292777032j))*x_ref[2]
+            arg[(0, 3, 2, 3)]+=(-0.783963255062+0.571356500945j)*x[2]**o + ((-0.654490937519+0.0967766395878j))*x[2]
+            ref[(0, 3, 2, 3)]+=(-0.783963255062+0.571356500945j)*x_ref[2]**o + ((-0.654490937519+0.0967766395878j))*x_ref[2]
+            arg[(0, 3, 3, 0)]+=(-0.519268073247-0.78251863465j)*x[2]**o + ((-0.394723108529-0.0719579133039j))*x[2]
+            ref[(0, 3, 3, 0)]+=(-0.519268073247-0.78251863465j)*x_ref[2]**o + ((-0.394723108529-0.0719579133039j))*x_ref[2]
+            arg[(0, 3, 3, 1)]+=(0.909775054396+0.250018471525j)*x[2]**o + ((-0.714122700051-0.651260462054j))*x[2]
+            ref[(0, 3, 3, 1)]+=(0.909775054396+0.250018471525j)*x_ref[2]**o + ((-0.714122700051-0.651260462054j))*x_ref[2]
+            arg[(0, 3, 3, 2)]+=(-0.838245612363-0.0215875956263j)*x[2]**o + ((-0.931033378501+0.658339360075j))*x[2]
+            ref[(0, 3, 3, 2)]+=(-0.838245612363-0.0215875956263j)*x_ref[2]**o + ((-0.931033378501+0.658339360075j))*x_ref[2]
+            arg[(0, 3, 3, 3)]+=(0.684343512333+0.311815513658j)*x[2]**o + ((-0.432199667071+0.556741655408j))*x[2]
+            ref[(0, 3, 3, 3)]+=(0.684343512333+0.311815513658j)*x_ref[2]**o + ((-0.432199667071+0.556741655408j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.730218067886+0.830479807496j)*x[2]**o + ((-0.929928372638-0.687536505047j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.730218067886+0.830479807496j)*x_ref[2]**o + ((-0.929928372638-0.687536505047j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.923150108192+0.202388302175j)*x[2]**o + ((-0.448984676722-0.618679247251j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.923150108192+0.202388302175j)*x_ref[2]**o + ((-0.448984676722-0.618679247251j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.923783693877+0.291169120591j)*x[2]**o + ((-0.170129611149+0.562930300211j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.923783693877+0.291169120591j)*x_ref[2]**o + ((-0.170129611149+0.562930300211j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(-0.184220455762+0.239070786824j)*x[2]**o + ((0.024250850011+0.825598971697j))*x[2]
+            ref[(1, 0, 0, 3)]+=(-0.184220455762+0.239070786824j)*x_ref[2]**o + ((0.024250850011+0.825598971697j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.537161272184-0.877547732469j)*x[2]**o + ((-0.0829381323002-0.276780204709j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.537161272184-0.877547732469j)*x_ref[2]**o + ((-0.0829381323002-0.276780204709j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.854283890535-0.965893717473j)*x[2]**o + ((-0.660221061105-0.484926157031j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.854283890535-0.965893717473j)*x_ref[2]**o + ((-0.660221061105-0.484926157031j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.522250999611-0.754149173053j)*x[2]**o + ((-0.787962979875-0.0679946910568j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.522250999611-0.754149173053j)*x_ref[2]**o + ((-0.787962979875-0.0679946910568j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.99494569732+0.184924480816j)*x[2]**o + ((0.280730343577-0.829056803363j))*x[2]
+            ref[(1, 0, 1, 3)]+=(0.99494569732+0.184924480816j)*x_ref[2]**o + ((0.280730343577-0.829056803363j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.862895145678+0.407844221858j)*x[2]**o + ((-0.846021798556-0.486080989408j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.862895145678+0.407844221858j)*x_ref[2]**o + ((-0.846021798556-0.486080989408j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.912040794248+0.56021640585j)*x[2]**o + ((0.0211065075864+0.893098419593j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.912040794248+0.56021640585j)*x_ref[2]**o + ((0.0211065075864+0.893098419593j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(-0.852534505772+0.262666496231j)*x[2]**o + ((0.980734879841-0.614248197329j))*x[2]
+            ref[(1, 0, 2, 2)]+=(-0.852534505772+0.262666496231j)*x_ref[2]**o + ((0.980734879841-0.614248197329j))*x_ref[2]
+            arg[(1, 0, 2, 3)]+=(-0.31057476586+0.970459838708j)*x[2]**o + ((0.0343387066057+0.751442701665j))*x[2]
+            ref[(1, 0, 2, 3)]+=(-0.31057476586+0.970459838708j)*x_ref[2]**o + ((0.0343387066057+0.751442701665j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(0.703234864444-0.557425132055j)*x[2]**o + ((-0.940132321653-0.722350580517j))*x[2]
+            ref[(1, 0, 3, 0)]+=(0.703234864444-0.557425132055j)*x_ref[2]**o + ((-0.940132321653-0.722350580517j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(0.454362392274-0.181405037564j)*x[2]**o + ((-0.792198682329+0.97648829442j))*x[2]
+            ref[(1, 0, 3, 1)]+=(0.454362392274-0.181405037564j)*x_ref[2]**o + ((-0.792198682329+0.97648829442j))*x_ref[2]
+            arg[(1, 0, 3, 2)]+=(0.699127964177+0.536428530224j)*x[2]**o + ((-0.221178853+0.415446177531j))*x[2]
+            ref[(1, 0, 3, 2)]+=(0.699127964177+0.536428530224j)*x_ref[2]**o + ((-0.221178853+0.415446177531j))*x_ref[2]
+            arg[(1, 0, 3, 3)]+=(0.320020837108-0.0196174715119j)*x[2]**o + ((0.627519839384-0.056717565022j))*x[2]
+            ref[(1, 0, 3, 3)]+=(0.320020837108-0.0196174715119j)*x_ref[2]**o + ((0.627519839384-0.056717565022j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.129467952353+0.864945269728j)*x[2]**o + ((-0.231526430009+0.899467676845j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.129467952353+0.864945269728j)*x_ref[2]**o + ((-0.231526430009+0.899467676845j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.386850621673-0.709551647079j)*x[2]**o + ((-0.0141466991555-0.678465037645j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.386850621673-0.709551647079j)*x_ref[2]**o + ((-0.0141466991555-0.678465037645j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.962856506385-0.162574355631j)*x[2]**o + ((0.880268770538+0.084442769083j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.962856506385-0.162574355631j)*x_ref[2]**o + ((0.880268770538+0.084442769083j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.404480471623-0.669582846191j)*x[2]**o + ((-0.319989235477+0.290988052499j))*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.404480471623-0.669582846191j)*x_ref[2]**o + ((-0.319989235477+0.290988052499j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.199316739057-0.381502523305j)*x[2]**o + ((-0.161378905862-0.0845149219787j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.199316739057-0.381502523305j)*x_ref[2]**o + ((-0.161378905862-0.0845149219787j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.496583163226+0.26504727783j)*x[2]**o + ((-0.919714360231+0.477766537254j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.496583163226+0.26504727783j)*x_ref[2]**o + ((-0.919714360231+0.477766537254j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.0677692395185+0.748205792484j)*x[2]**o + ((-0.432524030682-0.18003747549j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.0677692395185+0.748205792484j)*x_ref[2]**o + ((-0.432524030682-0.18003747549j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.0808805436519+0.798497996691j)*x[2]**o + ((-0.18226509572-0.538734372217j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.0808805436519+0.798497996691j)*x_ref[2]**o + ((-0.18226509572-0.538734372217j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.750525931906-0.609923932611j)*x[2]**o + ((0.727817215626-0.302478421633j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.750525931906-0.609923932611j)*x_ref[2]**o + ((0.727817215626-0.302478421633j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.600324494374+0.0129490806082j)*x[2]**o + ((0.265174630624+0.0827145827363j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.600324494374+0.0129490806082j)*x_ref[2]**o + ((0.265174630624+0.0827145827363j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(-0.915142055491-0.465839750945j)*x[2]**o + ((-0.0287573700542+0.994669742482j))*x[2]
+            ref[(1, 1, 2, 2)]+=(-0.915142055491-0.465839750945j)*x_ref[2]**o + ((-0.0287573700542+0.994669742482j))*x_ref[2]
+            arg[(1, 1, 2, 3)]+=(-0.0119392594554+0.717622545694j)*x[2]**o + ((0.206902688479+0.0400803944676j))*x[2]
+            ref[(1, 1, 2, 3)]+=(-0.0119392594554+0.717622545694j)*x_ref[2]**o + ((0.206902688479+0.0400803944676j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(0.233907457941+0.627058793667j)*x[2]**o + ((0.0384633940096+0.456168828069j))*x[2]
+            ref[(1, 1, 3, 0)]+=(0.233907457941+0.627058793667j)*x_ref[2]**o + ((0.0384633940096+0.456168828069j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(0.22800151598+0.561352299674j)*x[2]**o + ((0.357735074908+0.480448232985j))*x[2]
+            ref[(1, 1, 3, 1)]+=(0.22800151598+0.561352299674j)*x_ref[2]**o + ((0.357735074908+0.480448232985j))*x_ref[2]
+            arg[(1, 1, 3, 2)]+=(0.959347039461-0.0594925545165j)*x[2]**o + ((0.0997051302998+0.326197527602j))*x[2]
+            ref[(1, 1, 3, 2)]+=(0.959347039461-0.0594925545165j)*x_ref[2]**o + ((0.0997051302998+0.326197527602j))*x_ref[2]
+            arg[(1, 1, 3, 3)]+=(0.498007112555-0.166345012247j)*x[2]**o + ((0.387118754292-0.164469830265j))*x[2]
+            ref[(1, 1, 3, 3)]+=(0.498007112555-0.166345012247j)*x_ref[2]**o + ((0.387118754292-0.164469830265j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.454767394442+0.00029852512105j)*x[2]**o + ((0.26962503556-0.216139935516j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.454767394442+0.00029852512105j)*x_ref[2]**o + ((0.26962503556-0.216139935516j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.811147339755+0.340079921807j)*x[2]**o + ((-0.701875392733+0.820405288381j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.811147339755+0.340079921807j)*x_ref[2]**o + ((-0.701875392733+0.820405288381j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.63602066368-0.796707914802j)*x[2]**o + ((0.327130757985-0.572874121105j))*x[2]
+            ref[(1, 2, 0, 2)]+=(0.63602066368-0.796707914802j)*x_ref[2]**o + ((0.327130757985-0.572874121105j))*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.181554140042-0.836269222068j)*x[2]**o + ((0.899775594701+0.0282832789009j))*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.181554140042-0.836269222068j)*x_ref[2]**o + ((0.899775594701+0.0282832789009j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.97006959284+0.583064119289j)*x[2]**o + ((-0.475276646877-0.925193840409j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.97006959284+0.583064119289j)*x_ref[2]**o + ((-0.475276646877-0.925193840409j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.760939885093-0.672280807675j)*x[2]**o + ((0.434130454906-0.692848578495j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.760939885093-0.672280807675j)*x_ref[2]**o + ((0.434130454906-0.692848578495j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(-0.126943513233+0.274642050551j)*x[2]**o + ((0.374109367509-0.171820267566j))*x[2]
+            ref[(1, 2, 1, 2)]+=(-0.126943513233+0.274642050551j)*x_ref[2]**o + ((0.374109367509-0.171820267566j))*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(-0.224397955064-0.596543703972j)*x[2]**o + ((-0.539883156149-0.454080276214j))*x[2]
+            ref[(1, 2, 1, 3)]+=(-0.224397955064-0.596543703972j)*x_ref[2]**o + ((-0.539883156149-0.454080276214j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.195005065147-0.892535923507j)*x[2]**o + ((0.973205140704+0.120425493816j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.195005065147-0.892535923507j)*x_ref[2]**o + ((0.973205140704+0.120425493816j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.759732389548-0.86742747234j)*x[2]**o + ((0.701083019752-0.743526859776j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.759732389548-0.86742747234j)*x_ref[2]**o + ((0.701083019752-0.743526859776j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(-0.544269688071-0.366941167028j)*x[2]**o + ((-0.77145571558-0.0880903436344j))*x[2]
+            ref[(1, 2, 2, 2)]+=(-0.544269688071-0.366941167028j)*x_ref[2]**o + ((-0.77145571558-0.0880903436344j))*x_ref[2]
+            arg[(1, 2, 2, 3)]+=(0.921380853287+0.548092321367j)*x[2]**o + ((-0.72370208944-0.0523607851734j))*x[2]
+            ref[(1, 2, 2, 3)]+=(0.921380853287+0.548092321367j)*x_ref[2]**o + ((-0.72370208944-0.0523607851734j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(-0.0324918821502-0.455495768412j)*x[2]**o + ((-0.549214805137+0.828668035858j))*x[2]
+            ref[(1, 2, 3, 0)]+=(-0.0324918821502-0.455495768412j)*x_ref[2]**o + ((-0.549214805137+0.828668035858j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(-0.933224759276-0.915605479484j)*x[2]**o + ((0.284473934005-0.931237320554j))*x[2]
+            ref[(1, 2, 3, 1)]+=(-0.933224759276-0.915605479484j)*x_ref[2]**o + ((0.284473934005-0.931237320554j))*x_ref[2]
+            arg[(1, 2, 3, 2)]+=(0.364740301255+0.591232967853j)*x[2]**o + ((0.677680200799+0.844336972192j))*x[2]
+            ref[(1, 2, 3, 2)]+=(0.364740301255+0.591232967853j)*x_ref[2]**o + ((0.677680200799+0.844336972192j))*x_ref[2]
+            arg[(1, 2, 3, 3)]+=(0.0825035761607-0.617142283176j)*x[2]**o + ((-0.586980838886+0.560037400658j))*x[2]
+            ref[(1, 2, 3, 3)]+=(0.0825035761607-0.617142283176j)*x_ref[2]**o + ((-0.586980838886+0.560037400658j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.187715814712+0.655954504166j)*x[2]**o + ((-0.145128829891+0.317299087838j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.187715814712+0.655954504166j)*x_ref[2]**o + ((-0.145128829891+0.317299087838j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.144354299499+0.593384658418j)*x[2]**o + ((0.792117537339+0.895765479697j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.144354299499+0.593384658418j)*x_ref[2]**o + ((0.792117537339+0.895765479697j))*x_ref[2]
+            arg[(1, 3, 0, 2)]+=(-0.00290137235936-0.066596369656j)*x[2]**o + ((-0.639606468857+0.784630928195j))*x[2]
+            ref[(1, 3, 0, 2)]+=(-0.00290137235936-0.066596369656j)*x_ref[2]**o + ((-0.639606468857+0.784630928195j))*x_ref[2]
+            arg[(1, 3, 0, 3)]+=(-0.145837948387+0.785246121439j)*x[2]**o + ((-0.973697716672-0.322385222879j))*x[2]
+            ref[(1, 3, 0, 3)]+=(-0.145837948387+0.785246121439j)*x_ref[2]**o + ((-0.973697716672-0.322385222879j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.27639780179-0.335061540262j)*x[2]**o + ((0.46283371892-0.366302944513j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.27639780179-0.335061540262j)*x_ref[2]**o + ((0.46283371892-0.366302944513j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.90384165531+0.40187580538j)*x[2]**o + ((0.10164968508+0.95170866571j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.90384165531+0.40187580538j)*x_ref[2]**o + ((0.10164968508+0.95170866571j))*x_ref[2]
+            arg[(1, 3, 1, 2)]+=(0.585152422507+0.466804889814j)*x[2]**o + ((-0.74515977447-0.861429056446j))*x[2]
+            ref[(1, 3, 1, 2)]+=(0.585152422507+0.466804889814j)*x_ref[2]**o + ((-0.74515977447-0.861429056446j))*x_ref[2]
+            arg[(1, 3, 1, 3)]+=(0.922696223146+0.335202043201j)*x[2]**o + ((0.0204813412659+0.192785396111j))*x[2]
+            ref[(1, 3, 1, 3)]+=(0.922696223146+0.335202043201j)*x_ref[2]**o + ((0.0204813412659+0.192785396111j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(-0.938940454978+0.561890329267j)*x[2]**o + ((-0.868140098779-0.262898337812j))*x[2]
+            ref[(1, 3, 2, 0)]+=(-0.938940454978+0.561890329267j)*x_ref[2]**o + ((-0.868140098779-0.262898337812j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(-0.327646514521-0.664543368259j)*x[2]**o + ((0.946668429289+0.480348999374j))*x[2]
+            ref[(1, 3, 2, 1)]+=(-0.327646514521-0.664543368259j)*x_ref[2]**o + ((0.946668429289+0.480348999374j))*x_ref[2]
+            arg[(1, 3, 2, 2)]+=(-0.440093752878-0.400892214549j)*x[2]**o + ((0.0346225866254+0.241242699576j))*x[2]
+            ref[(1, 3, 2, 2)]+=(-0.440093752878-0.400892214549j)*x_ref[2]**o + ((0.0346225866254+0.241242699576j))*x_ref[2]
+            arg[(1, 3, 2, 3)]+=(-0.992551661115+0.689491974318j)*x[2]**o + ((0.213746552962+0.465847616372j))*x[2]
+            ref[(1, 3, 2, 3)]+=(-0.992551661115+0.689491974318j)*x_ref[2]**o + ((0.213746552962+0.465847616372j))*x_ref[2]
+            arg[(1, 3, 3, 0)]+=(-0.706206695789-0.564824475033j)*x[2]**o + ((0.951543402179+0.408068268286j))*x[2]
+            ref[(1, 3, 3, 0)]+=(-0.706206695789-0.564824475033j)*x_ref[2]**o + ((0.951543402179+0.408068268286j))*x_ref[2]
+            arg[(1, 3, 3, 1)]+=(0.173363833026-0.12723180872j)*x[2]**o + ((-0.536627230061+0.868912583325j))*x[2]
+            ref[(1, 3, 3, 1)]+=(0.173363833026-0.12723180872j)*x_ref[2]**o + ((-0.536627230061+0.868912583325j))*x_ref[2]
+            arg[(1, 3, 3, 2)]+=(-0.293601919969+0.815737610255j)*x[2]**o + ((-0.518230782334+0.075176353891j))*x[2]
+            ref[(1, 3, 3, 2)]+=(-0.293601919969+0.815737610255j)*x_ref[2]**o + ((-0.518230782334+0.075176353891j))*x_ref[2]
+            arg[(1, 3, 3, 3)]+=(0.671410846536+0.513847619061j)*x[2]**o + ((-0.654290773216+0.113840970533j))*x[2]
+            ref[(1, 3, 3, 3)]+=(0.671410846536+0.513847619061j)*x_ref[2]**o + ((-0.654290773216+0.113840970533j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.0261023074615-0.919003204336j)*x[0]**o + ((0.802370854989-0.755457326211j))*x[0] + ((0.0957253973588-0.2319958079j))*x[1]**o + ((-0.345703125405-0.598702463386j))*x[1]
+        ref=(0.0261023074615-0.919003204336j)*x_ref[0]**o + ((0.802370854989-0.755457326211j))*x_ref[0] + ((0.0957253973588-0.2319958079j))*x_ref[1]**o + ((-0.345703125405-0.598702463386j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.224805932502-0.895758262262j))*x[2]**o + ((-0.796480194799+0.0699242748321j))*x[2]
+            ref+=((-0.224805932502-0.895758262262j))*x_ref[2]**o + ((-0.796480194799+0.0699242748321j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(0.397459475002+0.947540664232j)*x[0]**o + ((0.640930865263+0.613897960754j))*x[0] + ((0.739366573484-0.187383395827j))*x[1]**o + ((0.481000408949-0.462018281662j))*x[1]
+        ref[(0,)]=(0.397459475002+0.947540664232j)*x_ref[0]**o + ((0.640930865263+0.613897960754j))*x_ref[0] + ((0.739366573484-0.187383395827j))*x_ref[1]**o + ((0.481000408949-0.462018281662j))*x_ref[1]
+        arg[(1,)]=(0.254419929198-0.81660769659j)*x[0]**o + ((0.838448496798-0.556598599512j))*x[0] + ((-0.684140638542+0.435919828988j))*x[1]**o + ((-0.018577935006+0.282448131131j))*x[1]
+        ref[(1,)]=(0.254419929198-0.81660769659j)*x_ref[0]**o + ((0.838448496798-0.556598599512j))*x_ref[0] + ((-0.684140638542+0.435919828988j))*x_ref[1]**o + ((-0.018577935006+0.282448131131j))*x_ref[1]
+        arg[(2,)]=(0.406441455987-0.634416959115j)*x[0]**o + ((0.438946338369+0.761431887759j))*x[0] + ((-0.0557972783953-0.432760067149j))*x[1]**o + ((-0.723566288133+0.248457801405j))*x[1]
+        ref[(2,)]=(0.406441455987-0.634416959115j)*x_ref[0]**o + ((0.438946338369+0.761431887759j))*x_ref[0] + ((-0.0557972783953-0.432760067149j))*x_ref[1]**o + ((-0.723566288133+0.248457801405j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.215644654414+0.543315843807j)*x[2]**o + ((0.876751912652+0.146095899353j))*x[2]
+            ref[(0,)]+=(-0.215644654414+0.543315843807j)*x_ref[2]**o + ((0.876751912652+0.146095899353j))*x_ref[2]
+            arg[(1,)]+=(0.423933510948+0.643271379023j)*x[2]**o + ((-0.485126675695+0.28982476403j))*x[2]
+            ref[(1,)]+=(0.423933510948+0.643271379023j)*x_ref[2]**o + ((-0.485126675695+0.28982476403j))*x_ref[2]
+            arg[(2,)]+=(0.17643643394-0.321318260623j)*x[2]**o + ((0.69895694124-0.567102449648j))*x[2]
+            ref[(2,)]+=(0.17643643394-0.321318260623j)*x_ref[2]**o + ((0.69895694124-0.567102449648j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2),w_ref)
+        arg[(0, 0)]=(-0.0905597600843-0.00201378610292j)*x[0]**o + ((-0.480345093623+0.477565055075j))*x[0] + ((0.701784222541+0.126958982034j))*x[1]**o + ((0.855978843149+0.364616879955j))*x[1]
+        ref[(0, 0)]=(-0.0905597600843-0.00201378610292j)*x_ref[0]**o + ((-0.480345093623+0.477565055075j))*x_ref[0] + ((0.701784222541+0.126958982034j))*x_ref[1]**o + ((0.855978843149+0.364616879955j))*x_ref[1]
+        arg[(0, 1)]=(0.95580654274+0.480355623145j)*x[0]**o + ((-0.404012959398-0.13920905968j))*x[0] + ((0.897267163981-0.529802355728j))*x[1]**o + ((-0.297281703171-0.543063667404j))*x[1]
+        ref[(0, 1)]=(0.95580654274+0.480355623145j)*x_ref[0]**o + ((-0.404012959398-0.13920905968j))*x_ref[0] + ((0.897267163981-0.529802355728j))*x_ref[1]**o + ((-0.297281703171-0.543063667404j))*x_ref[1]
+        arg[(1, 0)]=(-0.979456955189+0.737203991832j)*x[0]**o + ((-0.912285592994+0.256624546465j))*x[0] + ((-0.945451173314-0.474662772886j))*x[1]**o + ((0.316412278261+0.906712010131j))*x[1]
+        ref[(1, 0)]=(-0.979456955189+0.737203991832j)*x_ref[0]**o + ((-0.912285592994+0.256624546465j))*x_ref[0] + ((-0.945451173314-0.474662772886j))*x_ref[1]**o + ((0.316412278261+0.906712010131j))*x_ref[1]
+        arg[(1, 1)]=(0.597439013661-0.60484548827j)*x[0]**o + ((0.106308139612+0.33697537553j))*x[0] + ((-0.671333697558-0.811745804068j))*x[1]**o + ((0.514013107917-0.934675847305j))*x[1]
+        ref[(1, 1)]=(0.597439013661-0.60484548827j)*x_ref[0]**o + ((0.106308139612+0.33697537553j))*x_ref[0] + ((-0.671333697558-0.811745804068j))*x_ref[1]**o + ((0.514013107917-0.934675847305j))*x_ref[1]
+        arg[(2, 0)]=(0.3769335597+0.130225882034j)*x[0]**o + ((0.417388375534-0.0645821666092j))*x[0] + ((0.0797102424963-0.12495820734j))*x[1]**o + ((0.733189049556+0.457467955656j))*x[1]
+        ref[(2, 0)]=(0.3769335597+0.130225882034j)*x_ref[0]**o + ((0.417388375534-0.0645821666092j))*x_ref[0] + ((0.0797102424963-0.12495820734j))*x_ref[1]**o + ((0.733189049556+0.457467955656j))*x_ref[1]
+        arg[(2, 1)]=(0.468228935246+0.797700632328j)*x[0]**o + ((0.0211107417529-0.604526091528j))*x[0] + ((0.495341015753-0.307354965909j))*x[1]**o + ((0.127921700215-0.184789591107j))*x[1]
+        ref[(2, 1)]=(0.468228935246+0.797700632328j)*x_ref[0]**o + ((0.0211107417529-0.604526091528j))*x_ref[0] + ((0.495341015753-0.307354965909j))*x_ref[1]**o + ((0.127921700215-0.184789591107j))*x_ref[1]
+        arg[(3, 0)]=(0.961737534824+0.000200759866342j)*x[0]**o + ((-0.325685212653-0.727959555462j))*x[0] + ((-0.318806931247+0.291416146195j))*x[1]**o + ((0.0464194958124-0.260380549061j))*x[1]
+        ref[(3, 0)]=(0.961737534824+0.000200759866342j)*x_ref[0]**o + ((-0.325685212653-0.727959555462j))*x_ref[0] + ((-0.318806931247+0.291416146195j))*x_ref[1]**o + ((0.0464194958124-0.260380549061j))*x_ref[1]
+        arg[(3, 1)]=(0.714997000546-0.430621224193j)*x[0]**o + ((-0.791768141518-0.249511376621j))*x[0] + ((-0.186005053902-0.792750144679j))*x[1]**o + ((-0.927934112451-0.240963354821j))*x[1]
+        ref[(3, 1)]=(0.714997000546-0.430621224193j)*x_ref[0]**o + ((-0.791768141518-0.249511376621j))*x_ref[0] + ((-0.186005053902-0.792750144679j))*x_ref[1]**o + ((-0.927934112451-0.240963354821j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.957605393435+0.239761985607j)*x[2]**o + ((0.920976519919-0.995814738043j))*x[2]
+            ref[(0, 0)]+=(0.957605393435+0.239761985607j)*x_ref[2]**o + ((0.920976519919-0.995814738043j))*x_ref[2]
+            arg[(0, 1)]+=(-0.661725123016+0.386388665297j)*x[2]**o + ((-0.3458411328-0.923560220709j))*x[2]
+            ref[(0, 1)]+=(-0.661725123016+0.386388665297j)*x_ref[2]**o + ((-0.3458411328-0.923560220709j))*x_ref[2]
+            arg[(1, 0)]+=(-0.47135053103-0.395770173391j)*x[2]**o + ((0.358310590104-0.850631083774j))*x[2]
+            ref[(1, 0)]+=(-0.47135053103-0.395770173391j)*x_ref[2]**o + ((0.358310590104-0.850631083774j))*x_ref[2]
+            arg[(1, 1)]+=(0.955309200547+0.389620185062j)*x[2]**o + ((-0.831510793455+0.628250107008j))*x[2]
+            ref[(1, 1)]+=(0.955309200547+0.389620185062j)*x_ref[2]**o + ((-0.831510793455+0.628250107008j))*x_ref[2]
+            arg[(2, 0)]+=(0.95409293904+0.803689123445j)*x[2]**o + ((0.419766222721-0.403611875684j))*x[2]
+            ref[(2, 0)]+=(0.95409293904+0.803689123445j)*x_ref[2]**o + ((0.419766222721-0.403611875684j))*x_ref[2]
+            arg[(2, 1)]+=(0.832174168002+0.651370762857j)*x[2]**o + ((-0.869000735399+0.562870019485j))*x[2]
+            ref[(2, 1)]+=(0.832174168002+0.651370762857j)*x_ref[2]**o + ((-0.869000735399+0.562870019485j))*x_ref[2]
+            arg[(3, 0)]+=(-0.355621858505-0.388680298593j)*x[2]**o + ((0.488908919255-0.424861536677j))*x[2]
+            ref[(3, 0)]+=(-0.355621858505-0.388680298593j)*x_ref[2]**o + ((0.488908919255-0.424861536677j))*x_ref[2]
+            arg[(3, 1)]+=(0.852806227139-0.767435976858j)*x[2]**o + ((-0.493258828851+0.610411708933j))*x[2]
+            ref[(3, 1)]+=(0.852806227139-0.767435976858j)*x_ref[2]**o + ((-0.493258828851+0.610411708933j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2),w)
+        ref = Data(0,(4, 2, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.908824010066-0.386446482662j)*x[0]**o + ((0.230956225235-0.2564928675j))*x[0] + ((0.346620067773+0.835712525413j))*x[1]**o + ((-0.651337738305-0.405173222115j))*x[1]
+        ref[(0, 0, 0)]=(-0.908824010066-0.386446482662j)*x_ref[0]**o + ((0.230956225235-0.2564928675j))*x_ref[0] + ((0.346620067773+0.835712525413j))*x_ref[1]**o + ((-0.651337738305-0.405173222115j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.903841255911+0.353732666127j)*x[0]**o + ((0.415698226144+0.993880364976j))*x[0] + ((-0.990128899389-0.061047368036j))*x[1]**o + ((-0.0935757734301+0.337279187629j))*x[1]
+        ref[(0, 0, 1)]=(0.903841255911+0.353732666127j)*x_ref[0]**o + ((0.415698226144+0.993880364976j))*x_ref[0] + ((-0.990128899389-0.061047368036j))*x_ref[1]**o + ((-0.0935757734301+0.337279187629j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.532504623628+0.63486879254j)*x[0]**o + ((0.726024668822-0.403316584057j))*x[0] + ((0.594440659344-0.607674861095j))*x[1]**o + ((0.0491647359353+0.801935115524j))*x[1]
+        ref[(0, 1, 0)]=(-0.532504623628+0.63486879254j)*x_ref[0]**o + ((0.726024668822-0.403316584057j))*x_ref[0] + ((0.594440659344-0.607674861095j))*x_ref[1]**o + ((0.0491647359353+0.801935115524j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.864290364612-0.392660606487j)*x[0]**o + ((-0.870920217343+0.190880456495j))*x[0] + ((0.735459952523+0.952571140032j))*x[1]**o + ((0.593225794957+0.00722914313464j))*x[1]
+        ref[(0, 1, 1)]=(0.864290364612-0.392660606487j)*x_ref[0]**o + ((-0.870920217343+0.190880456495j))*x_ref[0] + ((0.735459952523+0.952571140032j))*x_ref[1]**o + ((0.593225794957+0.00722914313464j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.941458801476-0.566372422443j)*x[0]**o + ((0.620230013742-0.291205847655j))*x[0] + ((-0.0146396154072-0.49044584786j))*x[1]**o + ((0.698215396766-0.109252822117j))*x[1]
+        ref[(1, 0, 0)]=(-0.941458801476-0.566372422443j)*x_ref[0]**o + ((0.620230013742-0.291205847655j))*x_ref[0] + ((-0.0146396154072-0.49044584786j))*x_ref[1]**o + ((0.698215396766-0.109252822117j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.357063979443-0.394115919245j)*x[0]**o + ((-0.314255183775-0.985157872616j))*x[0] + ((0.731990276043-0.688709816749j))*x[1]**o + ((0.304757585158+0.972980148306j))*x[1]
+        ref[(1, 0, 1)]=(-0.357063979443-0.394115919245j)*x_ref[0]**o + ((-0.314255183775-0.985157872616j))*x_ref[0] + ((0.731990276043-0.688709816749j))*x_ref[1]**o + ((0.304757585158+0.972980148306j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.555135147302+0.049934578802j)*x[0]**o + ((0.548845307242+0.601857245964j))*x[0] + ((0.072477175792+0.597997453714j))*x[1]**o + ((-0.865382231331-0.236509270355j))*x[1]
+        ref[(1, 1, 0)]=(-0.555135147302+0.049934578802j)*x_ref[0]**o + ((0.548845307242+0.601857245964j))*x_ref[0] + ((0.072477175792+0.597997453714j))*x_ref[1]**o + ((-0.865382231331-0.236509270355j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.750232047362-0.775914640508j)*x[0]**o + ((0.975841265863+0.200018865532j))*x[0] + ((-0.495044455017+0.245942328349j))*x[1]**o + ((0.338443395449+0.582478871548j))*x[1]
+        ref[(1, 1, 1)]=(-0.750232047362-0.775914640508j)*x_ref[0]**o + ((0.975841265863+0.200018865532j))*x_ref[0] + ((-0.495044455017+0.245942328349j))*x_ref[1]**o + ((0.338443395449+0.582478871548j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.2875634367-0.748067084199j)*x[0]**o + ((0.229268272295+0.995473900676j))*x[0] + ((-0.941381218528-0.934522922005j))*x[1]**o + ((-0.683651729282+0.760671877059j))*x[1]
+        ref[(2, 0, 0)]=(-0.2875634367-0.748067084199j)*x_ref[0]**o + ((0.229268272295+0.995473900676j))*x_ref[0] + ((-0.941381218528-0.934522922005j))*x_ref[1]**o + ((-0.683651729282+0.760671877059j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.504423561509-0.846356171374j)*x[0]**o + ((0.611215322815+0.525819737363j))*x[0] + ((0.412499474641-0.594955002867j))*x[1]**o + ((0.839891831563-0.228502242395j))*x[1]
+        ref[(2, 0, 1)]=(-0.504423561509-0.846356171374j)*x_ref[0]**o + ((0.611215322815+0.525819737363j))*x_ref[0] + ((0.412499474641-0.594955002867j))*x_ref[1]**o + ((0.839891831563-0.228502242395j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.908562099637-0.581531139716j)*x[0]**o + ((0.551542857233+0.99138317603j))*x[0] + ((-0.272703968313+0.578658224564j))*x[1]**o + ((0.625715322211-0.243257997744j))*x[1]
+        ref[(2, 1, 0)]=(-0.908562099637-0.581531139716j)*x_ref[0]**o + ((0.551542857233+0.99138317603j))*x_ref[0] + ((-0.272703968313+0.578658224564j))*x_ref[1]**o + ((0.625715322211-0.243257997744j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.455326245276+0.546552244463j)*x[0]**o + ((0.164439257304-0.503542395406j))*x[0] + ((0.231588251845+0.0924556690172j))*x[1]**o + ((-0.597566543217-0.228558445381j))*x[1]
+        ref[(2, 1, 1)]=(0.455326245276+0.546552244463j)*x_ref[0]**o + ((0.164439257304-0.503542395406j))*x_ref[0] + ((0.231588251845+0.0924556690172j))*x_ref[1]**o + ((-0.597566543217-0.228558445381j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.0903279787758-0.29543417702j)*x[0]**o + ((0.196005604688-0.195947284033j))*x[0] + ((-0.43861272057+0.100901377371j))*x[1]**o + ((0.845414242211+0.818175875071j))*x[1]
+        ref[(3, 0, 0)]=(0.0903279787758-0.29543417702j)*x_ref[0]**o + ((0.196005604688-0.195947284033j))*x_ref[0] + ((-0.43861272057+0.100901377371j))*x_ref[1]**o + ((0.845414242211+0.818175875071j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.376205504894+0.272873895313j)*x[0]**o + ((-0.748797282066+0.704122586088j))*x[0] + ((0.563837147669-0.243306500462j))*x[1]**o + ((-0.27635709201-0.0982415391403j))*x[1]
+        ref[(3, 0, 1)]=(0.376205504894+0.272873895313j)*x_ref[0]**o + ((-0.748797282066+0.704122586088j))*x_ref[0] + ((0.563837147669-0.243306500462j))*x_ref[1]**o + ((-0.27635709201-0.0982415391403j))*x_ref[1]
+        arg[(3, 1, 0)]=(0.785416762826-0.547909438462j)*x[0]**o + ((-0.383207454859-0.733640075251j))*x[0] + ((0.248860595897-0.802118713567j))*x[1]**o + ((-0.899582219514-0.992991206015j))*x[1]
+        ref[(3, 1, 0)]=(0.785416762826-0.547909438462j)*x_ref[0]**o + ((-0.383207454859-0.733640075251j))*x_ref[0] + ((0.248860595897-0.802118713567j))*x_ref[1]**o + ((-0.899582219514-0.992991206015j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.993660941913-0.370986331448j)*x[0]**o + ((-0.177772071499-0.952423073543j))*x[0] + ((0.708790616803-0.430529073087j))*x[1]**o + ((0.1001731839+0.519305059616j))*x[1]
+        ref[(3, 1, 1)]=(0.993660941913-0.370986331448j)*x_ref[0]**o + ((-0.177772071499-0.952423073543j))*x_ref[0] + ((0.708790616803-0.430529073087j))*x_ref[1]**o + ((0.1001731839+0.519305059616j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.652162339279-0.231749250436j)*x[2]**o + ((0.0805152268086-0.0650829517748j))*x[2]
+            ref[(0, 0, 0)]+=(-0.652162339279-0.231749250436j)*x_ref[2]**o + ((0.0805152268086-0.0650829517748j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.0319643905735+0.994260562418j)*x[2]**o + ((0.189859184289+0.246018661929j))*x[2]
+            ref[(0, 0, 1)]+=(0.0319643905735+0.994260562418j)*x_ref[2]**o + ((0.189859184289+0.246018661929j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.0858482103709+0.303924481432j)*x[2]**o + ((0.131912499305-0.459354121675j))*x[2]
+            ref[(0, 1, 0)]+=(0.0858482103709+0.303924481432j)*x_ref[2]**o + ((0.131912499305-0.459354121675j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.300656650958-0.720086624307j)*x[2]**o + ((-0.137100192011-0.247334577062j))*x[2]
+            ref[(0, 1, 1)]+=(-0.300656650958-0.720086624307j)*x_ref[2]**o + ((-0.137100192011-0.247334577062j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.220270070492-0.89174512919j)*x[2]**o + ((-0.19626702572-0.00638607186612j))*x[2]
+            ref[(1, 0, 0)]+=(0.220270070492-0.89174512919j)*x_ref[2]**o + ((-0.19626702572-0.00638607186612j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.659610483578+0.0713852648007j)*x[2]**o + ((0.542846525437-0.596264034039j))*x[2]
+            ref[(1, 0, 1)]+=(-0.659610483578+0.0713852648007j)*x_ref[2]**o + ((0.542846525437-0.596264034039j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.0311627476475-0.247563176267j)*x[2]**o + ((-0.28706927634-0.973297726509j))*x[2]
+            ref[(1, 1, 0)]+=(-0.0311627476475-0.247563176267j)*x_ref[2]**o + ((-0.28706927634-0.973297726509j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.96006306644+0.834964500853j)*x[2]**o + ((-0.763968542022+0.717411824716j))*x[2]
+            ref[(1, 1, 1)]+=(0.96006306644+0.834964500853j)*x_ref[2]**o + ((-0.763968542022+0.717411824716j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.662980395963+0.915207656666j)*x[2]**o + ((-0.612201415751+0.110518252377j))*x[2]
+            ref[(2, 0, 0)]+=(0.662980395963+0.915207656666j)*x_ref[2]**o + ((-0.612201415751+0.110518252377j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.7656463824+0.00565421430677j)*x[2]**o + ((0.966221315844-0.587295245816j))*x[2]
+            ref[(2, 0, 1)]+=(-0.7656463824+0.00565421430677j)*x_ref[2]**o + ((0.966221315844-0.587295245816j))*x_ref[2]
+            arg[(2, 1, 0)]+=(0.248885885608+0.584290039792j)*x[2]**o + ((0.125258920058+0.480179366003j))*x[2]
+            ref[(2, 1, 0)]+=(0.248885885608+0.584290039792j)*x_ref[2]**o + ((0.125258920058+0.480179366003j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.23252003245+0.598634920098j)*x[2]**o + ((-0.468954230127+0.673270614861j))*x[2]
+            ref[(2, 1, 1)]+=(0.23252003245+0.598634920098j)*x_ref[2]**o + ((-0.468954230127+0.673270614861j))*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.699589982716-0.499806327319j)*x[2]**o + ((0.246454327986-0.64752084775j))*x[2]
+            ref[(3, 0, 0)]+=(-0.699589982716-0.499806327319j)*x_ref[2]**o + ((0.246454327986-0.64752084775j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.0784856066962+0.27133344706j)*x[2]**o + ((0.40516734346+0.380992877073j))*x[2]
+            ref[(3, 0, 1)]+=(0.0784856066962+0.27133344706j)*x_ref[2]**o + ((0.40516734346+0.380992877073j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.357233166525-0.929771047292j)*x[2]**o + ((0.821190307373+0.338976605377j))*x[2]
+            ref[(3, 1, 0)]+=(-0.357233166525-0.929771047292j)*x_ref[2]**o + ((0.821190307373+0.338976605377j))*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.0959637168603-0.7861179481j)*x[2]**o + ((-0.250780777142-0.366331553542j))*x[2]
+            ref[(3, 1, 1)]+=(-0.0959637168603-0.7861179481j)*x_ref[2]**o + ((-0.250780777142-0.366331553542j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2, 4),w)
+        ref = Data(0,(3, 4, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(0.285339379183-0.321325217122j)*x[0]**o + ((0.450373747502+0.00805825288939j))*x[0] + ((0.685660592693+0.625790832573j))*x[1]**o + ((-0.513986746436-0.770252211837j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.285339379183-0.321325217122j)*x_ref[0]**o + ((0.450373747502+0.00805825288939j))*x_ref[0] + ((0.685660592693+0.625790832573j))*x_ref[1]**o + ((-0.513986746436-0.770252211837j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.313385604377-0.943975959246j)*x[0]**o + ((0.461749980121+0.732529113159j))*x[0] + ((0.458075057742+0.752505940102j))*x[1]**o + ((-0.314295666177+0.973625090493j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.313385604377-0.943975959246j)*x_ref[0]**o + ((0.461749980121+0.732529113159j))*x_ref[0] + ((0.458075057742+0.752505940102j))*x_ref[1]**o + ((-0.314295666177+0.973625090493j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.63939635245+0.895895136735j)*x[0]**o + ((0.646434364248+0.0389155599165j))*x[0] + ((-0.83636545792-0.694236128919j))*x[1]**o + ((0.521179931657+0.783593797937j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.63939635245+0.895895136735j)*x_ref[0]**o + ((0.646434364248+0.0389155599165j))*x_ref[0] + ((-0.83636545792-0.694236128919j))*x_ref[1]**o + ((0.521179931657+0.783593797937j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.881162361139+0.943576610362j)*x[0]**o + ((-0.618390587493+0.991557132786j))*x[0] + ((-0.361805448706-0.992115535691j))*x[1]**o + ((0.7905505033-0.881143991736j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.881162361139+0.943576610362j)*x_ref[0]**o + ((-0.618390587493+0.991557132786j))*x_ref[0] + ((-0.361805448706-0.992115535691j))*x_ref[1]**o + ((0.7905505033-0.881143991736j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.761338169861+0.0158614034959j)*x[0]**o + ((-0.431334056582-0.487041634778j))*x[0] + ((0.958288265993-0.589338964778j))*x[1]**o + ((-0.844169790567-0.71086426063j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.761338169861+0.0158614034959j)*x_ref[0]**o + ((-0.431334056582-0.487041634778j))*x_ref[0] + ((0.958288265993-0.589338964778j))*x_ref[1]**o + ((-0.844169790567-0.71086426063j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.182427123709+0.433585341571j)*x[0]**o + ((0.13800122921-0.526023488521j))*x[0] + ((-0.142524945546+0.140571094616j))*x[1]**o + ((-0.74546015024+0.965770684787j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.182427123709+0.433585341571j)*x_ref[0]**o + ((0.13800122921-0.526023488521j))*x_ref[0] + ((-0.142524945546+0.140571094616j))*x_ref[1]**o + ((-0.74546015024+0.965770684787j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.0483964056652-0.539418096698j)*x[0]**o + ((0.981842649989+0.936075792064j))*x[0] + ((-0.379830574668-0.0339469393501j))*x[1]**o + ((0.181427288436-0.925519854975j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.0483964056652-0.539418096698j)*x_ref[0]**o + ((0.981842649989+0.936075792064j))*x_ref[0] + ((-0.379830574668-0.0339469393501j))*x_ref[1]**o + ((0.181427288436-0.925519854975j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.407583618924-0.813925647465j)*x[0]**o + ((0.989527744908+0.338064343295j))*x[0] + ((-0.14009259314-0.464243106404j))*x[1]**o + ((0.5096565196-0.927790708442j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.407583618924-0.813925647465j)*x_ref[0]**o + ((0.989527744908+0.338064343295j))*x_ref[0] + ((-0.14009259314-0.464243106404j))*x_ref[1]**o + ((0.5096565196-0.927790708442j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.0348854291747+0.735418076058j)*x[0]**o + ((0.306639196877+0.254667256947j))*x[0] + ((0.768590319473-0.582587813633j))*x[1]**o + ((0.693442587654+0.171163609207j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.0348854291747+0.735418076058j)*x_ref[0]**o + ((0.306639196877+0.254667256947j))*x_ref[0] + ((0.768590319473-0.582587813633j))*x_ref[1]**o + ((0.693442587654+0.171163609207j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.517056774909+0.982884336575j)*x[0]**o + ((0.424508012105+0.47513762546j))*x[0] + ((-0.534341113186-0.954997550608j))*x[1]**o + ((0.890510325503-0.661024275173j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.517056774909+0.982884336575j)*x_ref[0]**o + ((0.424508012105+0.47513762546j))*x_ref[0] + ((-0.534341113186-0.954997550608j))*x_ref[1]**o + ((0.890510325503-0.661024275173j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.342889379049-0.0542984641708j)*x[0]**o + ((-0.00396639724299-0.996324068327j))*x[0] + ((-0.890964907085-0.0916878501895j))*x[1]**o + ((-0.319011097254+0.0621802761192j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.342889379049-0.0542984641708j)*x_ref[0]**o + ((-0.00396639724299-0.996324068327j))*x_ref[0] + ((-0.890964907085-0.0916878501895j))*x_ref[1]**o + ((-0.319011097254+0.0621802761192j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.53632692902-0.363731272322j)*x[0]**o + ((-0.873091139681+0.654009066883j))*x[0] + ((-0.944346984047+0.806986321527j))*x[1]**o + ((0.956773838026+0.713058556636j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.53632692902-0.363731272322j)*x_ref[0]**o + ((-0.873091139681+0.654009066883j))*x_ref[0] + ((-0.944346984047+0.806986321527j))*x_ref[1]**o + ((0.956773838026+0.713058556636j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.225920156291-0.1371084321j)*x[0]**o + ((0.597617625391-0.306650858098j))*x[0] + ((0.50129383876+0.298100371028j))*x[1]**o + ((-0.599678721139-0.41520026353j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.225920156291-0.1371084321j)*x_ref[0]**o + ((0.597617625391-0.306650858098j))*x_ref[0] + ((0.50129383876+0.298100371028j))*x_ref[1]**o + ((-0.599678721139-0.41520026353j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.213075603043+0.282754917117j)*x[0]**o + ((0.584284934199-0.381896132185j))*x[0] + ((0.0953868002483-0.167937317042j))*x[1]**o + ((0.204704441683+0.809991568652j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.213075603043+0.282754917117j)*x_ref[0]**o + ((0.584284934199-0.381896132185j))*x_ref[0] + ((0.0953868002483-0.167937317042j))*x_ref[1]**o + ((0.204704441683+0.809991568652j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.962795424941+0.69597886108j)*x[0]**o + ((0.338690982009+0.244225116308j))*x[0] + ((0.081110731445+0.525081213674j))*x[1]**o + ((-0.500039153728+0.174421221959j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.962795424941+0.69597886108j)*x_ref[0]**o + ((0.338690982009+0.244225116308j))*x_ref[0] + ((0.081110731445+0.525081213674j))*x_ref[1]**o + ((-0.500039153728+0.174421221959j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.115467219802+0.961696056772j)*x[0]**o + ((0.273066218556+0.881110952314j))*x[0] + ((0.0769972601457+0.604306464469j))*x[1]**o + ((0.0028431330779+0.195876192913j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.115467219802+0.961696056772j)*x_ref[0]**o + ((0.273066218556+0.881110952314j))*x_ref[0] + ((0.0769972601457+0.604306464469j))*x_ref[1]**o + ((0.0028431330779+0.195876192913j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.295192514126+0.998102933883j)*x[0]**o + ((0.475258716096+0.136300344488j))*x[0] + ((-0.883682464188+0.926116450489j))*x[1]**o + ((0.610844748188-0.779298034424j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.295192514126+0.998102933883j)*x_ref[0]**o + ((0.475258716096+0.136300344488j))*x_ref[0] + ((-0.883682464188+0.926116450489j))*x_ref[1]**o + ((0.610844748188-0.779298034424j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.175757126629-0.549942726763j)*x[0]**o + ((-0.571645549935+0.999874102097j))*x[0] + ((0.184803446329-0.44990098311j))*x[1]**o + ((-0.657189619926+0.0459247431704j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.175757126629-0.549942726763j)*x_ref[0]**o + ((-0.571645549935+0.999874102097j))*x_ref[0] + ((0.184803446329-0.44990098311j))*x_ref[1]**o + ((-0.657189619926+0.0459247431704j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.371368452283-0.966928787903j)*x[0]**o + ((-0.585638307583-0.931158245592j))*x[0] + ((-0.634716940758+0.392215810297j))*x[1]**o + ((0.618947663435+0.440856934399j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.371368452283-0.966928787903j)*x_ref[0]**o + ((-0.585638307583-0.931158245592j))*x_ref[0] + ((-0.634716940758+0.392215810297j))*x_ref[1]**o + ((0.618947663435+0.440856934399j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(-0.170807990385+0.80861445525j)*x[0]**o + ((0.656304567696-0.289752659154j))*x[0] + ((-0.327899099323+0.387097381251j))*x[1]**o + ((0.333023920276+0.237098878752j))*x[1]
+        ref[(0, 2, 0, 3)]=(-0.170807990385+0.80861445525j)*x_ref[0]**o + ((0.656304567696-0.289752659154j))*x_ref[0] + ((-0.327899099323+0.387097381251j))*x_ref[1]**o + ((0.333023920276+0.237098878752j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.503058877243-0.923087774812j)*x[0]**o + ((0.394734545879+0.313983406807j))*x[0] + ((0.464135393568-0.463912453934j))*x[1]**o + ((0.791502823863-0.211481015415j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.503058877243-0.923087774812j)*x_ref[0]**o + ((0.394734545879+0.313983406807j))*x_ref[0] + ((0.464135393568-0.463912453934j))*x_ref[1]**o + ((0.791502823863-0.211481015415j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.833776998546+0.379308753318j)*x[0]**o + ((0.483999630093-0.138795116306j))*x[0] + ((0.715566453808-0.98281494554j))*x[1]**o + ((0.604246467044+0.611564609789j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.833776998546+0.379308753318j)*x_ref[0]**o + ((0.483999630093-0.138795116306j))*x_ref[0] + ((0.715566453808-0.98281494554j))*x_ref[1]**o + ((0.604246467044+0.611564609789j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.786691097923+0.817761744777j)*x[0]**o + ((0.0556952128896+0.314639613504j))*x[0] + ((-0.821566986572-0.440705114697j))*x[1]**o + ((0.0499390760739+0.828926221145j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.786691097923+0.817761744777j)*x_ref[0]**o + ((0.0556952128896+0.314639613504j))*x_ref[0] + ((-0.821566986572-0.440705114697j))*x_ref[1]**o + ((0.0499390760739+0.828926221145j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(0.819060620448-0.763705846465j)*x[0]**o + ((0.127031995539+0.0685503176545j))*x[0] + ((0.170197130339+0.786670733027j))*x[1]**o + ((0.341556887036-0.289975303475j))*x[1]
+        ref[(0, 2, 1, 3)]=(0.819060620448-0.763705846465j)*x_ref[0]**o + ((0.127031995539+0.0685503176545j))*x_ref[0] + ((0.170197130339+0.786670733027j))*x_ref[1]**o + ((0.341556887036-0.289975303475j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.188729639304+0.472808594245j)*x[0]**o + ((-0.387339578777-0.659685537237j))*x[0] + ((0.0898235098131-0.0679839836373j))*x[1]**o + ((-0.133441991254-0.983854655294j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.188729639304+0.472808594245j)*x_ref[0]**o + ((-0.387339578777-0.659685537237j))*x_ref[0] + ((0.0898235098131-0.0679839836373j))*x_ref[1]**o + ((-0.133441991254-0.983854655294j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.497924785717-0.563452056212j)*x[0]**o + ((-0.311739074767-0.810854250321j))*x[0] + ((0.516246610103-0.790346496704j))*x[1]**o + ((-0.418053029012+0.7445218447j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.497924785717-0.563452056212j)*x_ref[0]**o + ((-0.311739074767-0.810854250321j))*x_ref[0] + ((0.516246610103-0.790346496704j))*x_ref[1]**o + ((-0.418053029012+0.7445218447j))*x_ref[1]
+        arg[(0, 3, 0, 2)]=(0.364309826385-0.543468421925j)*x[0]**o + ((-0.884710905255-0.461630679057j))*x[0] + ((-0.205316623975+0.861696593713j))*x[1]**o + ((0.771753670661-0.758775878699j))*x[1]
+        ref[(0, 3, 0, 2)]=(0.364309826385-0.543468421925j)*x_ref[0]**o + ((-0.884710905255-0.461630679057j))*x_ref[0] + ((-0.205316623975+0.861696593713j))*x_ref[1]**o + ((0.771753670661-0.758775878699j))*x_ref[1]
+        arg[(0, 3, 0, 3)]=(-0.0725999043691-0.807529515432j)*x[0]**o + ((-0.503451782149-0.58195838284j))*x[0] + ((0.668123474851-0.236149513993j))*x[1]**o + ((-0.461619013741+0.120520822703j))*x[1]
+        ref[(0, 3, 0, 3)]=(-0.0725999043691-0.807529515432j)*x_ref[0]**o + ((-0.503451782149-0.58195838284j))*x_ref[0] + ((0.668123474851-0.236149513993j))*x_ref[1]**o + ((-0.461619013741+0.120520822703j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.272275772681+0.515768996853j)*x[0]**o + ((0.387354195101-0.663182495193j))*x[0] + ((0.761402704657+0.392339294244j))*x[1]**o + ((0.0699752479341-0.76447827167j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.272275772681+0.515768996853j)*x_ref[0]**o + ((0.387354195101-0.663182495193j))*x_ref[0] + ((0.761402704657+0.392339294244j))*x_ref[1]**o + ((0.0699752479341-0.76447827167j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(-0.937379653051-0.302091933296j)*x[0]**o + ((0.363157076618-0.237074524611j))*x[0] + ((0.959160335079+0.515817938432j))*x[1]**o + ((0.566126126664+0.951896949229j))*x[1]
+        ref[(0, 3, 1, 1)]=(-0.937379653051-0.302091933296j)*x_ref[0]**o + ((0.363157076618-0.237074524611j))*x_ref[0] + ((0.959160335079+0.515817938432j))*x_ref[1]**o + ((0.566126126664+0.951896949229j))*x_ref[1]
+        arg[(0, 3, 1, 2)]=(0.351866372337+0.316497161248j)*x[0]**o + ((-0.758661690706+0.183370192772j))*x[0] + ((0.379383606219+0.433582555927j))*x[1]**o + ((-0.344817780802-0.325276685016j))*x[1]
+        ref[(0, 3, 1, 2)]=(0.351866372337+0.316497161248j)*x_ref[0]**o + ((-0.758661690706+0.183370192772j))*x_ref[0] + ((0.379383606219+0.433582555927j))*x_ref[1]**o + ((-0.344817780802-0.325276685016j))*x_ref[1]
+        arg[(0, 3, 1, 3)]=(-0.161563956712-0.976882594054j)*x[0]**o + ((-0.0554533912409+0.0812970827792j))*x[0] + ((-0.265941410454+0.81949258224j))*x[1]**o + ((0.223777243973-0.356559845581j))*x[1]
+        ref[(0, 3, 1, 3)]=(-0.161563956712-0.976882594054j)*x_ref[0]**o + ((-0.0554533912409+0.0812970827792j))*x_ref[0] + ((-0.265941410454+0.81949258224j))*x_ref[1]**o + ((0.223777243973-0.356559845581j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.983091210521-0.611445624485j)*x[0]**o + ((0.652375605992+0.457148795466j))*x[0] + ((0.119174229744+0.663428490402j))*x[1]**o + ((-0.20814612557-0.13801523486j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.983091210521-0.611445624485j)*x_ref[0]**o + ((0.652375605992+0.457148795466j))*x_ref[0] + ((0.119174229744+0.663428490402j))*x_ref[1]**o + ((-0.20814612557-0.13801523486j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.401553778675-0.856825784605j)*x[0]**o + ((-0.53371058419+0.208568593201j))*x[0] + ((0.922359330783+0.875079826571j))*x[1]**o + ((0.216384221177-0.0500774369381j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.401553778675-0.856825784605j)*x_ref[0]**o + ((-0.53371058419+0.208568593201j))*x_ref[0] + ((0.922359330783+0.875079826571j))*x_ref[1]**o + ((0.216384221177-0.0500774369381j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.434124214779-0.656741160493j)*x[0]**o + ((0.444142054805+0.457926484866j))*x[0] + ((-0.441227644267-0.792552545495j))*x[1]**o + ((-0.926525020117-0.873713130755j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.434124214779-0.656741160493j)*x_ref[0]**o + ((0.444142054805+0.457926484866j))*x_ref[0] + ((-0.441227644267-0.792552545495j))*x_ref[1]**o + ((-0.926525020117-0.873713130755j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(0.248233454582-0.878667193652j)*x[0]**o + ((-0.294970323418-0.850144046669j))*x[0] + ((-0.0916217606209+0.0992164688337j))*x[1]**o + ((0.183572566334-0.0945022751308j))*x[1]
+        ref[(1, 0, 0, 3)]=(0.248233454582-0.878667193652j)*x_ref[0]**o + ((-0.294970323418-0.850144046669j))*x_ref[0] + ((-0.0916217606209+0.0992164688337j))*x_ref[1]**o + ((0.183572566334-0.0945022751308j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.178382930202+0.680179305074j)*x[0]**o + ((0.741485422281+0.483020911076j))*x[0] + ((-0.246551192562-0.636456494529j))*x[1]**o + ((-0.164994287081+0.605890302635j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.178382930202+0.680179305074j)*x_ref[0]**o + ((0.741485422281+0.483020911076j))*x_ref[0] + ((-0.246551192562-0.636456494529j))*x_ref[1]**o + ((-0.164994287081+0.605890302635j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.511701253986+0.610789959128j)*x[0]**o + ((0.63041782683-0.33946846667j))*x[0] + ((0.81088855727+0.144599992915j))*x[1]**o + ((-0.961306174042+0.494615981919j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.511701253986+0.610789959128j)*x_ref[0]**o + ((0.63041782683-0.33946846667j))*x_ref[0] + ((0.81088855727+0.144599992915j))*x_ref[1]**o + ((-0.961306174042+0.494615981919j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.168566341135-0.742727204495j)*x[0]**o + ((-0.568938212798-0.903694558957j))*x[0] + ((-0.459710286444+0.716149657403j))*x[1]**o + ((-0.274839034036+0.233113340102j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.168566341135-0.742727204495j)*x_ref[0]**o + ((-0.568938212798-0.903694558957j))*x_ref[0] + ((-0.459710286444+0.716149657403j))*x_ref[1]**o + ((-0.274839034036+0.233113340102j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.228849050336+0.756149883349j)*x[0]**o + ((0.167189814463+0.647882966023j))*x[0] + ((0.630141621176+0.0427245132671j))*x[1]**o + ((0.656709142767+0.86063942033j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.228849050336+0.756149883349j)*x_ref[0]**o + ((0.167189814463+0.647882966023j))*x_ref[0] + ((0.630141621176+0.0427245132671j))*x_ref[1]**o + ((0.656709142767+0.86063942033j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.584862709422+0.371098074074j)*x[0]**o + ((0.873453785729-0.0360713899029j))*x[0] + ((0.113900743009-0.177448867903j))*x[1]**o + ((0.773369914816-0.445957269109j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.584862709422+0.371098074074j)*x_ref[0]**o + ((0.873453785729-0.0360713899029j))*x_ref[0] + ((0.113900743009-0.177448867903j))*x_ref[1]**o + ((0.773369914816-0.445957269109j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.127466025315+0.92975038142j)*x[0]**o + ((-0.899491779573-0.907353548024j))*x[0] + ((-0.707446808261+0.15587717197j))*x[1]**o + ((0.619416052536-0.962007761592j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.127466025315+0.92975038142j)*x_ref[0]**o + ((-0.899491779573-0.907353548024j))*x_ref[0] + ((-0.707446808261+0.15587717197j))*x_ref[1]**o + ((0.619416052536-0.962007761592j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.272698951483-0.74742204457j)*x[0]**o + ((-0.629283077632-0.489401511884j))*x[0] + ((0.885434627779+0.821470663886j))*x[1]**o + ((-0.479842196482+0.113866362429j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.272698951483-0.74742204457j)*x_ref[0]**o + ((-0.629283077632-0.489401511884j))*x_ref[0] + ((0.885434627779+0.821470663886j))*x_ref[1]**o + ((-0.479842196482+0.113866362429j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.971926978469-0.251378480967j)*x[0]**o + ((0.054279985056-0.0825868161934j))*x[0] + ((0.628205961434-0.69144554643j))*x[1]**o + ((0.694576984972-0.279946319296j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.971926978469-0.251378480967j)*x_ref[0]**o + ((0.054279985056-0.0825868161934j))*x_ref[0] + ((0.628205961434-0.69144554643j))*x_ref[1]**o + ((0.694576984972-0.279946319296j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.14108510857+0.817028800149j)*x[0]**o + ((0.278543488622-0.557365698945j))*x[0] + ((0.0619779567874-0.485921108212j))*x[1]**o + ((0.22111763387-0.714950107939j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.14108510857+0.817028800149j)*x_ref[0]**o + ((0.278543488622-0.557365698945j))*x_ref[0] + ((0.0619779567874-0.485921108212j))*x_ref[1]**o + ((0.22111763387-0.714950107939j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.73475568017+0.730267048863j)*x[0]**o + ((-0.894252861849-0.320076077738j))*x[0] + ((0.311535568247-0.479473582364j))*x[1]**o + ((0.9656906159-0.0824580973551j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.73475568017+0.730267048863j)*x_ref[0]**o + ((-0.894252861849-0.320076077738j))*x_ref[0] + ((0.311535568247-0.479473582364j))*x_ref[1]**o + ((0.9656906159-0.0824580973551j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.70450570105+0.638916657911j)*x[0]**o + ((0.854436226048+0.363797743377j))*x[0] + ((-0.976312255744+0.993038072177j))*x[1]**o + ((-0.0399793495763-0.445275836644j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.70450570105+0.638916657911j)*x_ref[0]**o + ((0.854436226048+0.363797743377j))*x_ref[0] + ((-0.976312255744+0.993038072177j))*x_ref[1]**o + ((-0.0399793495763-0.445275836644j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(0.0671224787281-0.963404898184j)*x[0]**o + ((0.895115477353+0.269725429651j))*x[0] + ((-0.86299575167-0.226768626974j))*x[1]**o + ((0.547687292946+0.0400840426759j))*x[1]
+        ref[(1, 1, 1, 3)]=(0.0671224787281-0.963404898184j)*x_ref[0]**o + ((0.895115477353+0.269725429651j))*x_ref[0] + ((-0.86299575167-0.226768626974j))*x_ref[1]**o + ((0.547687292946+0.0400840426759j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.730979678382+0.888262681209j)*x[0]**o + ((0.388672589645+0.185124084873j))*x[0] + ((-0.39450334077-0.361106792763j))*x[1]**o + ((-0.106193884356-0.920382653947j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.730979678382+0.888262681209j)*x_ref[0]**o + ((0.388672589645+0.185124084873j))*x_ref[0] + ((-0.39450334077-0.361106792763j))*x_ref[1]**o + ((-0.106193884356-0.920382653947j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.135059334134+0.320237765488j)*x[0]**o + ((0.0909626859985-0.108067890536j))*x[0] + ((-0.544634304154-0.909827281532j))*x[1]**o + ((0.996074509951-0.210618778791j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.135059334134+0.320237765488j)*x_ref[0]**o + ((0.0909626859985-0.108067890536j))*x_ref[0] + ((-0.544634304154-0.909827281532j))*x_ref[1]**o + ((0.996074509951-0.210618778791j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.829576949763-0.134108070944j)*x[0]**o + ((0.286297654351-0.359602853487j))*x[0] + ((0.76606023707-0.456459612109j))*x[1]**o + ((0.105728444839+0.155259699288j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.829576949763-0.134108070944j)*x_ref[0]**o + ((0.286297654351-0.359602853487j))*x_ref[0] + ((0.76606023707-0.456459612109j))*x_ref[1]**o + ((0.105728444839+0.155259699288j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(-0.706998080641-0.650952840849j)*x[0]**o + ((-0.340300618597+0.500311254499j))*x[0] + ((-0.735624800324+0.472300266779j))*x[1]**o + ((-0.887244105886+0.0325962750509j))*x[1]
+        ref[(1, 2, 0, 3)]=(-0.706998080641-0.650952840849j)*x_ref[0]**o + ((-0.340300618597+0.500311254499j))*x_ref[0] + ((-0.735624800324+0.472300266779j))*x_ref[1]**o + ((-0.887244105886+0.0325962750509j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.511623066929+0.0218357000079j)*x[0]**o + ((-0.511833718061-0.344765321884j))*x[0] + ((0.567987656064-0.363677496604j))*x[1]**o + ((-0.258666616441-0.699096419048j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.511623066929+0.0218357000079j)*x_ref[0]**o + ((-0.511833718061-0.344765321884j))*x_ref[0] + ((0.567987656064-0.363677496604j))*x_ref[1]**o + ((-0.258666616441-0.699096419048j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.147239437557-0.583251658447j)*x[0]**o + ((-0.305642612435-0.359070337823j))*x[0] + ((-0.74302116754+0.512196967245j))*x[1]**o + ((-0.091509403171+0.130082660455j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.147239437557-0.583251658447j)*x_ref[0]**o + ((-0.305642612435-0.359070337823j))*x_ref[0] + ((-0.74302116754+0.512196967245j))*x_ref[1]**o + ((-0.091509403171+0.130082660455j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.617513145541-0.9922091652j)*x[0]**o + ((0.58320271305+0.868671507097j))*x[0] + ((0.210932125001+0.579013066199j))*x[1]**o + ((0.15610413506-0.966273175323j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.617513145541-0.9922091652j)*x_ref[0]**o + ((0.58320271305+0.868671507097j))*x_ref[0] + ((0.210932125001+0.579013066199j))*x_ref[1]**o + ((0.15610413506-0.966273175323j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(-0.46927370461-0.812445517695j)*x[0]**o + ((-0.502231661278+0.836907889017j))*x[0] + ((0.859794045457-0.545578444996j))*x[1]**o + ((-0.621820726587+0.225247287595j))*x[1]
+        ref[(1, 2, 1, 3)]=(-0.46927370461-0.812445517695j)*x_ref[0]**o + ((-0.502231661278+0.836907889017j))*x_ref[0] + ((0.859794045457-0.545578444996j))*x_ref[1]**o + ((-0.621820726587+0.225247287595j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.639283831639+0.642610699176j)*x[0]**o + ((-0.738831444451+0.744709215026j))*x[0] + ((-0.903500075062+0.14939840331j))*x[1]**o + ((0.20892593451+0.627535282409j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.639283831639+0.642610699176j)*x_ref[0]**o + ((-0.738831444451+0.744709215026j))*x_ref[0] + ((-0.903500075062+0.14939840331j))*x_ref[1]**o + ((0.20892593451+0.627535282409j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.977273245183-0.603442506979j)*x[0]**o + ((0.608508310021+0.16581868772j))*x[0] + ((-0.990287252867+0.770539684275j))*x[1]**o + ((0.18907193687-0.555026666065j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.977273245183-0.603442506979j)*x_ref[0]**o + ((0.608508310021+0.16581868772j))*x_ref[0] + ((-0.990287252867+0.770539684275j))*x_ref[1]**o + ((0.18907193687-0.555026666065j))*x_ref[1]
+        arg[(1, 3, 0, 2)]=(-0.615885236967-0.760155617451j)*x[0]**o + ((0.991524956372+0.937213476543j))*x[0] + ((0.866479273448-0.413811380717j))*x[1]**o + ((-0.522144589971+0.704942146304j))*x[1]
+        ref[(1, 3, 0, 2)]=(-0.615885236967-0.760155617451j)*x_ref[0]**o + ((0.991524956372+0.937213476543j))*x_ref[0] + ((0.866479273448-0.413811380717j))*x_ref[1]**o + ((-0.522144589971+0.704942146304j))*x_ref[1]
+        arg[(1, 3, 0, 3)]=(-0.179115038716-0.26479803014j)*x[0]**o + ((0.42978002573+0.599768575111j))*x[0] + ((0.373349355166+0.348735882253j))*x[1]**o + ((-0.913681695559+0.911535115179j))*x[1]
+        ref[(1, 3, 0, 3)]=(-0.179115038716-0.26479803014j)*x_ref[0]**o + ((0.42978002573+0.599768575111j))*x_ref[0] + ((0.373349355166+0.348735882253j))*x_ref[1]**o + ((-0.913681695559+0.911535115179j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(0.03374971283-0.0513575806254j)*x[0]**o + ((-0.768792613796-0.391889787278j))*x[0] + ((-0.478605477802-0.519433525979j))*x[1]**o + ((0.0625772032995+0.587336121762j))*x[1]
+        ref[(1, 3, 1, 0)]=(0.03374971283-0.0513575806254j)*x_ref[0]**o + ((-0.768792613796-0.391889787278j))*x_ref[0] + ((-0.478605477802-0.519433525979j))*x_ref[1]**o + ((0.0625772032995+0.587336121762j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.696014401378+0.213510607379j)*x[0]**o + ((-0.731257897067+0.489167199535j))*x[0] + ((0.700148553699+0.413720500299j))*x[1]**o + ((-0.213043272824+0.851111669012j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.696014401378+0.213510607379j)*x_ref[0]**o + ((-0.731257897067+0.489167199535j))*x_ref[0] + ((0.700148553699+0.413720500299j))*x_ref[1]**o + ((-0.213043272824+0.851111669012j))*x_ref[1]
+        arg[(1, 3, 1, 2)]=(-0.680152323045+0.474895610946j)*x[0]**o + ((0.29557895733+0.82289815953j))*x[0] + ((0.464123315474+0.101217018385j))*x[1]**o + ((0.313265224491-0.0988410562645j))*x[1]
+        ref[(1, 3, 1, 2)]=(-0.680152323045+0.474895610946j)*x_ref[0]**o + ((0.29557895733+0.82289815953j))*x_ref[0] + ((0.464123315474+0.101217018385j))*x_ref[1]**o + ((0.313265224491-0.0988410562645j))*x_ref[1]
+        arg[(1, 3, 1, 3)]=(0.603406736899+0.131011312684j)*x[0]**o + ((-0.232463705227-0.414683724115j))*x[0] + ((0.889066065497-0.225417631235j))*x[1]**o + ((0.360656715893-0.70660613385j))*x[1]
+        ref[(1, 3, 1, 3)]=(0.603406736899+0.131011312684j)*x_ref[0]**o + ((-0.232463705227-0.414683724115j))*x_ref[0] + ((0.889066065497-0.225417631235j))*x_ref[1]**o + ((0.360656715893-0.70660613385j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.540364750508-0.186127260442j)*x[0]**o + ((0.745598301801-0.597536686864j))*x[0] + ((0.485542865079-0.11819884828j))*x[1]**o + ((-0.581162775815+0.768242130495j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.540364750508-0.186127260442j)*x_ref[0]**o + ((0.745598301801-0.597536686864j))*x_ref[0] + ((0.485542865079-0.11819884828j))*x_ref[1]**o + ((-0.581162775815+0.768242130495j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.618464463221-0.0200115710179j)*x[0]**o + ((-0.895666406371-0.381578383334j))*x[0] + ((-0.658938944521-0.539977698346j))*x[1]**o + ((-0.29979358805-0.806962587278j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.618464463221-0.0200115710179j)*x_ref[0]**o + ((-0.895666406371-0.381578383334j))*x_ref[0] + ((-0.658938944521-0.539977698346j))*x_ref[1]**o + ((-0.29979358805-0.806962587278j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.473574191933-0.83086083879j)*x[0]**o + ((-0.913290128503-0.494948313259j))*x[0] + ((0.395212234803-0.887302835011j))*x[1]**o + ((-0.273520864443+0.908277995345j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.473574191933-0.83086083879j)*x_ref[0]**o + ((-0.913290128503-0.494948313259j))*x_ref[0] + ((0.395212234803-0.887302835011j))*x_ref[1]**o + ((-0.273520864443+0.908277995345j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(0.0943240051506-0.561788833582j)*x[0]**o + ((-0.921687091405-0.751224474394j))*x[0] + ((0.483645026184+0.316946264769j))*x[1]**o + ((-0.452248128896+0.523720769565j))*x[1]
+        ref[(2, 0, 0, 3)]=(0.0943240051506-0.561788833582j)*x_ref[0]**o + ((-0.921687091405-0.751224474394j))*x_ref[0] + ((0.483645026184+0.316946264769j))*x_ref[1]**o + ((-0.452248128896+0.523720769565j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.746173985315-0.848626909325j)*x[0]**o + ((-0.479790707301-0.115282120979j))*x[0] + ((-0.637332503259+0.992691039306j))*x[1]**o + ((-0.293613668574+0.752018844598j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.746173985315-0.848626909325j)*x_ref[0]**o + ((-0.479790707301-0.115282120979j))*x_ref[0] + ((-0.637332503259+0.992691039306j))*x_ref[1]**o + ((-0.293613668574+0.752018844598j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.766471574739+0.651178715139j)*x[0]**o + ((0.35530257863+0.604026523466j))*x[0] + ((-0.812698548215+0.0296946626018j))*x[1]**o + ((0.575199282839-0.744525398476j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.766471574739+0.651178715139j)*x_ref[0]**o + ((0.35530257863+0.604026523466j))*x_ref[0] + ((-0.812698548215+0.0296946626018j))*x_ref[1]**o + ((0.575199282839-0.744525398476j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.32310217586-0.789711199683j)*x[0]**o + ((-0.45339796432+0.287141524301j))*x[0] + ((-0.815946973765+0.521506211522j))*x[1]**o + ((0.358772749597-0.0595472927785j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.32310217586-0.789711199683j)*x_ref[0]**o + ((-0.45339796432+0.287141524301j))*x_ref[0] + ((-0.815946973765+0.521506211522j))*x_ref[1]**o + ((0.358772749597-0.0595472927785j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.370070747807+0.00200745987747j)*x[0]**o + ((0.653007341117-0.405975251049j))*x[0] + ((0.860861167116+0.52368227939j))*x[1]**o + ((-0.5017573349+0.13050551168j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.370070747807+0.00200745987747j)*x_ref[0]**o + ((0.653007341117-0.405975251049j))*x_ref[0] + ((0.860861167116+0.52368227939j))*x_ref[1]**o + ((-0.5017573349+0.13050551168j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.341180798125-0.885722841644j)*x[0]**o + ((0.330038585938-0.876560437618j))*x[0] + ((0.0932313734648-0.875094638928j))*x[1]**o + ((-0.954457439272+0.204183143313j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.341180798125-0.885722841644j)*x_ref[0]**o + ((0.330038585938-0.876560437618j))*x_ref[0] + ((0.0932313734648-0.875094638928j))*x_ref[1]**o + ((-0.954457439272+0.204183143313j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.655973127172+0.339272068242j)*x[0]**o + ((0.598690514384+0.555260260127j))*x[0] + ((0.498355481048-0.840786898545j))*x[1]**o + ((0.606286848934+0.940100390642j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.655973127172+0.339272068242j)*x_ref[0]**o + ((0.598690514384+0.555260260127j))*x_ref[0] + ((0.498355481048-0.840786898545j))*x_ref[1]**o + ((0.606286848934+0.940100390642j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.484145204592-0.760477845831j)*x[0]**o + ((0.548334789563-0.487362533756j))*x[0] + ((0.348368777502+0.864141822455j))*x[1]**o + ((-0.10961461873-0.223308500393j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.484145204592-0.760477845831j)*x_ref[0]**o + ((0.548334789563-0.487362533756j))*x_ref[0] + ((0.348368777502+0.864141822455j))*x_ref[1]**o + ((-0.10961461873-0.223308500393j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.864092102043-0.618182041936j)*x[0]**o + ((-0.386998726166+0.53212970607j))*x[0] + ((-0.0492121483595-0.545547790492j))*x[1]**o + ((-0.890359369963-0.44700129075j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.864092102043-0.618182041936j)*x_ref[0]**o + ((-0.386998726166+0.53212970607j))*x_ref[0] + ((-0.0492121483595-0.545547790492j))*x_ref[1]**o + ((-0.890359369963-0.44700129075j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.399711946643+0.142987848118j)*x[0]**o + ((-0.643339334505-0.776509378305j))*x[0] + ((-0.312166396889+0.784787889316j))*x[1]**o + ((-0.919376090622+0.345363421516j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.399711946643+0.142987848118j)*x_ref[0]**o + ((-0.643339334505-0.776509378305j))*x_ref[0] + ((-0.312166396889+0.784787889316j))*x_ref[1]**o + ((-0.919376090622+0.345363421516j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.764149901191-0.735329793605j)*x[0]**o + ((0.0541104003283-0.403619724485j))*x[0] + ((-0.123462109921+0.0440688401718j))*x[1]**o + ((-0.943219198371-0.824845438167j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.764149901191-0.735329793605j)*x_ref[0]**o + ((0.0541104003283-0.403619724485j))*x_ref[0] + ((-0.123462109921+0.0440688401718j))*x_ref[1]**o + ((-0.943219198371-0.824845438167j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.7121903015-0.473134001508j)*x[0]**o + ((0.0579707681076+0.430519029204j))*x[0] + ((-0.389957189688+0.318407925841j))*x[1]**o + ((-0.639355845207+0.683896563027j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.7121903015-0.473134001508j)*x_ref[0]**o + ((0.0579707681076+0.430519029204j))*x_ref[0] + ((-0.389957189688+0.318407925841j))*x_ref[1]**o + ((-0.639355845207+0.683896563027j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(0.620338127421+0.244824295648j)*x[0]**o + ((-0.290968904028+0.350987148462j))*x[0] + ((0.362926819698+0.8525464967j))*x[1]**o + ((-0.691790736804-0.66565886962j))*x[1]
+        ref[(2, 1, 1, 3)]=(0.620338127421+0.244824295648j)*x_ref[0]**o + ((-0.290968904028+0.350987148462j))*x_ref[0] + ((0.362926819698+0.8525464967j))*x_ref[1]**o + ((-0.691790736804-0.66565886962j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.51719622316+0.245520592825j)*x[0]**o + ((0.205864256839+0.255820084101j))*x[0] + ((0.0279474901926+0.611843027439j))*x[1]**o + ((0.397640997695+0.419969059887j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.51719622316+0.245520592825j)*x_ref[0]**o + ((0.205864256839+0.255820084101j))*x_ref[0] + ((0.0279474901926+0.611843027439j))*x_ref[1]**o + ((0.397640997695+0.419969059887j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.827138736721+0.968616006592j)*x[0]**o + ((-0.307517137521+0.898352272679j))*x[0] + ((0.177274128156+0.308057087853j))*x[1]**o + ((-0.241186876961+0.220299743619j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.827138736721+0.968616006592j)*x_ref[0]**o + ((-0.307517137521+0.898352272679j))*x_ref[0] + ((0.177274128156+0.308057087853j))*x_ref[1]**o + ((-0.241186876961+0.220299743619j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(-0.141098057814+0.302169956861j)*x[0]**o + ((0.17221012392-0.238873739245j))*x[0] + ((0.215441294556+0.0870117580907j))*x[1]**o + ((-0.563703760752+0.967427231107j))*x[1]
+        ref[(2, 2, 0, 2)]=(-0.141098057814+0.302169956861j)*x_ref[0]**o + ((0.17221012392-0.238873739245j))*x_ref[0] + ((0.215441294556+0.0870117580907j))*x_ref[1]**o + ((-0.563703760752+0.967427231107j))*x_ref[1]
+        arg[(2, 2, 0, 3)]=(0.659705162692+0.555424305853j)*x[0]**o + ((0.546311236285-0.235642775187j))*x[0] + ((0.491538961778+0.994623325862j))*x[1]**o + ((-0.817698193411+0.791908993125j))*x[1]
+        ref[(2, 2, 0, 3)]=(0.659705162692+0.555424305853j)*x_ref[0]**o + ((0.546311236285-0.235642775187j))*x_ref[0] + ((0.491538961778+0.994623325862j))*x_ref[1]**o + ((-0.817698193411+0.791908993125j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.905375397209-0.0104613628932j)*x[0]**o + ((-0.910725527751-0.721038536468j))*x[0] + ((-0.26232701787-0.239969262109j))*x[1]**o + ((0.120995211397-0.639605826244j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.905375397209-0.0104613628932j)*x_ref[0]**o + ((-0.910725527751-0.721038536468j))*x_ref[0] + ((-0.26232701787-0.239969262109j))*x_ref[1]**o + ((0.120995211397-0.639605826244j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.231456859891-0.98258633465j)*x[0]**o + ((-0.989004203615+0.523097591355j))*x[0] + ((-0.280622974963+0.652047180889j))*x[1]**o + ((-0.20725542851-0.338669894814j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.231456859891-0.98258633465j)*x_ref[0]**o + ((-0.989004203615+0.523097591355j))*x_ref[0] + ((-0.280622974963+0.652047180889j))*x_ref[1]**o + ((-0.20725542851-0.338669894814j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(0.163446839477-0.98974228138j)*x[0]**o + ((-0.658117756788+0.706538779755j))*x[0] + ((0.910118005234+0.236660512787j))*x[1]**o + ((-0.416669090882-0.413625844005j))*x[1]
+        ref[(2, 2, 1, 2)]=(0.163446839477-0.98974228138j)*x_ref[0]**o + ((-0.658117756788+0.706538779755j))*x_ref[0] + ((0.910118005234+0.236660512787j))*x_ref[1]**o + ((-0.416669090882-0.413625844005j))*x_ref[1]
+        arg[(2, 2, 1, 3)]=(0.0778607012342-0.314063278826j)*x[0]**o + ((0.0813910283826-0.888667782882j))*x[0] + ((-0.48520241622-0.130586260068j))*x[1]**o + ((-0.927858174733-0.902553084238j))*x[1]
+        ref[(2, 2, 1, 3)]=(0.0778607012342-0.314063278826j)*x_ref[0]**o + ((0.0813910283826-0.888667782882j))*x_ref[0] + ((-0.48520241622-0.130586260068j))*x_ref[1]**o + ((-0.927858174733-0.902553084238j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(-0.847392435006+0.675988564745j)*x[0]**o + ((-0.188177440527+0.629410848671j))*x[0] + ((0.73799171301-0.895008283892j))*x[1]**o + ((0.223511467015+0.599109759239j))*x[1]
+        ref[(2, 3, 0, 0)]=(-0.847392435006+0.675988564745j)*x_ref[0]**o + ((-0.188177440527+0.629410848671j))*x_ref[0] + ((0.73799171301-0.895008283892j))*x_ref[1]**o + ((0.223511467015+0.599109759239j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(0.916895908083-0.93515565355j)*x[0]**o + ((-0.40105071404+0.196236540598j))*x[0] + ((0.626550419674+0.946326247059j))*x[1]**o + ((-0.138975835352+0.160094249169j))*x[1]
+        ref[(2, 3, 0, 1)]=(0.916895908083-0.93515565355j)*x_ref[0]**o + ((-0.40105071404+0.196236540598j))*x_ref[0] + ((0.626550419674+0.946326247059j))*x_ref[1]**o + ((-0.138975835352+0.160094249169j))*x_ref[1]
+        arg[(2, 3, 0, 2)]=(-0.359224702361+0.752720659807j)*x[0]**o + ((0.0256500737848+0.712582101795j))*x[0] + ((0.225316247499-0.0681141698269j))*x[1]**o + ((-0.74289764608-0.381060074923j))*x[1]
+        ref[(2, 3, 0, 2)]=(-0.359224702361+0.752720659807j)*x_ref[0]**o + ((0.0256500737848+0.712582101795j))*x_ref[0] + ((0.225316247499-0.0681141698269j))*x_ref[1]**o + ((-0.74289764608-0.381060074923j))*x_ref[1]
+        arg[(2, 3, 0, 3)]=(-0.391140986392+0.114994080465j)*x[0]**o + ((-0.868579299631+0.56917088522j))*x[0] + ((0.8742867893-0.628522815621j))*x[1]**o + ((-0.640630087228-0.995300787611j))*x[1]
+        ref[(2, 3, 0, 3)]=(-0.391140986392+0.114994080465j)*x_ref[0]**o + ((-0.868579299631+0.56917088522j))*x_ref[0] + ((0.8742867893-0.628522815621j))*x_ref[1]**o + ((-0.640630087228-0.995300787611j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(0.714373235024-0.954985669465j)*x[0]**o + ((-0.626020603941-0.184044545618j))*x[0] + ((0.440466987626-0.509114551666j))*x[1]**o + ((-0.376101261243-0.0281725002253j))*x[1]
+        ref[(2, 3, 1, 0)]=(0.714373235024-0.954985669465j)*x_ref[0]**o + ((-0.626020603941-0.184044545618j))*x_ref[0] + ((0.440466987626-0.509114551666j))*x_ref[1]**o + ((-0.376101261243-0.0281725002253j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(0.998887086733-0.884006734287j)*x[0]**o + ((0.976327933996+0.65975504474j))*x[0] + ((-0.73783952906-0.463628383419j))*x[1]**o + ((0.977947220818-0.542083371799j))*x[1]
+        ref[(2, 3, 1, 1)]=(0.998887086733-0.884006734287j)*x_ref[0]**o + ((0.976327933996+0.65975504474j))*x_ref[0] + ((-0.73783952906-0.463628383419j))*x_ref[1]**o + ((0.977947220818-0.542083371799j))*x_ref[1]
+        arg[(2, 3, 1, 2)]=(0.3867296326-0.185820283529j)*x[0]**o + ((0.825752581191+0.496026501152j))*x[0] + ((0.822405665771+0.904387188032j))*x[1]**o + ((0.26114818412+0.73365955266j))*x[1]
+        ref[(2, 3, 1, 2)]=(0.3867296326-0.185820283529j)*x_ref[0]**o + ((0.825752581191+0.496026501152j))*x_ref[0] + ((0.822405665771+0.904387188032j))*x_ref[1]**o + ((0.26114818412+0.73365955266j))*x_ref[1]
+        arg[(2, 3, 1, 3)]=(0.422324008924-0.13178174431j)*x[0]**o + ((0.288043267334-0.684798653191j))*x[0] + ((0.0587619483382-0.679116542995j))*x[1]**o + ((-0.870046452059-0.795983371448j))*x[1]
+        ref[(2, 3, 1, 3)]=(0.422324008924-0.13178174431j)*x_ref[0]**o + ((0.288043267334-0.684798653191j))*x_ref[0] + ((0.0587619483382-0.679116542995j))*x_ref[1]**o + ((-0.870046452059-0.795983371448j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.540461824121+0.153663619773j)*x[2]**o + ((-0.92978440684-0.70565141695j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.540461824121+0.153663619773j)*x_ref[2]**o + ((-0.92978440684-0.70565141695j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.222078608601-0.367591415887j)*x[2]**o + ((-0.818954777176+0.460888997837j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.222078608601-0.367591415887j)*x_ref[2]**o + ((-0.818954777176+0.460888997837j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.194476047186-0.683512355148j)*x[2]**o + ((-0.620055693-0.442778454253j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.194476047186-0.683512355148j)*x_ref[2]**o + ((-0.620055693-0.442778454253j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.907413061405+0.0396389913391j)*x[2]**o + ((0.285222017966-0.773582123061j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.907413061405+0.0396389913391j)*x_ref[2]**o + ((0.285222017966-0.773582123061j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.857417000047+0.517793352161j)*x[2]**o + ((0.54238649039-0.629549023562j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.857417000047+0.517793352161j)*x_ref[2]**o + ((0.54238649039-0.629549023562j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.0526707591496+0.691363764144j)*x[2]**o + ((-0.798357883717+0.276620007581j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.0526707591496+0.691363764144j)*x_ref[2]**o + ((-0.798357883717+0.276620007581j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.791784135946-0.858135423806j)*x[2]**o + ((0.568087132762-0.177812598806j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.791784135946-0.858135423806j)*x_ref[2]**o + ((0.568087132762-0.177812598806j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.699855044384-0.219086499676j)*x[2]**o + ((-0.69531305133-0.984403922213j))*x[2]
+            ref[(0, 0, 1, 3)]+=(0.699855044384-0.219086499676j)*x_ref[2]**o + ((-0.69531305133-0.984403922213j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.247278591111-0.562930763482j)*x[2]**o + ((0.596624558329-0.919544590667j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.247278591111-0.562930763482j)*x_ref[2]**o + ((0.596624558329-0.919544590667j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.970974787602-0.59073386079j)*x[2]**o + ((-0.617978049041+0.492911990996j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.970974787602-0.59073386079j)*x_ref[2]**o + ((-0.617978049041+0.492911990996j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.595511871258-0.210213403165j)*x[2]**o + ((-0.278098445003+0.580496484432j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.595511871258-0.210213403165j)*x_ref[2]**o + ((-0.278098445003+0.580496484432j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.752342019348-0.159245408869j)*x[2]**o + ((-0.602875892722-0.880584888494j))*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.752342019348-0.159245408869j)*x_ref[2]**o + ((-0.602875892722-0.880584888494j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.642235589637+0.538114396695j)*x[2]**o + ((-0.0181652553852+0.298933722446j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.642235589637+0.538114396695j)*x_ref[2]**o + ((-0.0181652553852+0.298933722446j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.193298946996-0.816561980851j)*x[2]**o + ((0.687681211655-0.250522940395j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.193298946996-0.816561980851j)*x_ref[2]**o + ((0.687681211655-0.250522940395j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.619166862787+0.760505518865j)*x[2]**o + ((-0.836690805082+0.369697923261j))*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.619166862787+0.760505518865j)*x_ref[2]**o + ((-0.836690805082+0.369697923261j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.964849440096+0.877059427307j)*x[2]**o + ((0.255518871118-0.120556535708j))*x[2]
+            ref[(0, 1, 1, 3)]+=(0.964849440096+0.877059427307j)*x_ref[2]**o + ((0.255518871118-0.120556535708j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.715376658177+0.67452705209j)*x[2]**o + ((0.591591589696-0.195717789461j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.715376658177+0.67452705209j)*x_ref[2]**o + ((0.591591589696-0.195717789461j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.911129614399-0.240142979498j)*x[2]**o + ((-0.684926267798+0.844667637515j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.911129614399-0.240142979498j)*x_ref[2]**o + ((-0.684926267798+0.844667637515j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.0775100180688+0.478888085463j)*x[2]**o + ((-0.0882443112645-0.427016337762j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.0775100180688+0.478888085463j)*x_ref[2]**o + ((-0.0882443112645-0.427016337762j))*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(-0.081183087913-0.746710947747j)*x[2]**o + ((-0.975551124154-0.0611742595007j))*x[2]
+            ref[(0, 2, 0, 3)]+=(-0.081183087913-0.746710947747j)*x_ref[2]**o + ((-0.975551124154-0.0611742595007j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.917111403899-0.898233045401j)*x[2]**o + ((-0.781225222503+0.63499174011j))*x[2]
+            ref[(0, 2, 1, 0)]+=(0.917111403899-0.898233045401j)*x_ref[2]**o + ((-0.781225222503+0.63499174011j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.819294925844+0.446987176989j)*x[2]**o + ((0.677264025782-0.211607061558j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.819294925844+0.446987176989j)*x_ref[2]**o + ((0.677264025782-0.211607061558j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.995507597518+0.515892840579j)*x[2]**o + ((0.222978133089-0.831919133323j))*x[2]
+            ref[(0, 2, 1, 2)]+=(0.995507597518+0.515892840579j)*x_ref[2]**o + ((0.222978133089-0.831919133323j))*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(0.47415840289+0.322603759844j)*x[2]**o + ((-0.479127257306-0.593034508228j))*x[2]
+            ref[(0, 2, 1, 3)]+=(0.47415840289+0.322603759844j)*x_ref[2]**o + ((-0.479127257306-0.593034508228j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.368128338997-0.493547881806j)*x[2]**o + ((-0.211387336599+0.638857381578j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.368128338997-0.493547881806j)*x_ref[2]**o + ((-0.211387336599+0.638857381578j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.0895012671471-0.911134225499j)*x[2]**o + ((-0.391584210602-0.992856060574j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.0895012671471-0.911134225499j)*x_ref[2]**o + ((-0.391584210602-0.992856060574j))*x_ref[2]
+            arg[(0, 3, 0, 2)]+=(-0.717335024175-0.0823771032469j)*x[2]**o + ((-0.393865063047+0.699723869505j))*x[2]
+            ref[(0, 3, 0, 2)]+=(-0.717335024175-0.0823771032469j)*x_ref[2]**o + ((-0.393865063047+0.699723869505j))*x_ref[2]
+            arg[(0, 3, 0, 3)]+=(0.22108827049+0.175561084558j)*x[2]**o + ((0.388518068319-0.863441336161j))*x[2]
+            ref[(0, 3, 0, 3)]+=(0.22108827049+0.175561084558j)*x_ref[2]**o + ((0.388518068319-0.863441336161j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.48380094662-0.482113642651j)*x[2]**o + ((0.99818301623-0.30765806007j))*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.48380094662-0.482113642651j)*x_ref[2]**o + ((0.99818301623-0.30765806007j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.941208198711+0.14716136794j)*x[2]**o + ((0.449466701965-0.482538625623j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.941208198711+0.14716136794j)*x_ref[2]**o + ((0.449466701965-0.482538625623j))*x_ref[2]
+            arg[(0, 3, 1, 2)]+=(-0.476014155377-0.364158154529j)*x[2]**o + ((-0.479267710008-0.651828148961j))*x[2]
+            ref[(0, 3, 1, 2)]+=(-0.476014155377-0.364158154529j)*x_ref[2]**o + ((-0.479267710008-0.651828148961j))*x_ref[2]
+            arg[(0, 3, 1, 3)]+=(-0.686554805047+0.47344359688j)*x[2]**o + ((0.595314880359+0.589083504221j))*x[2]
+            ref[(0, 3, 1, 3)]+=(-0.686554805047+0.47344359688j)*x_ref[2]**o + ((0.595314880359+0.589083504221j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.175061461576-0.918379075688j)*x[2]**o + ((-0.359062702646+0.95978264722j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.175061461576-0.918379075688j)*x_ref[2]**o + ((-0.359062702646+0.95978264722j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.288076093382-0.719010527903j)*x[2]**o + ((0.648214120343+0.436041092746j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.288076093382-0.719010527903j)*x_ref[2]**o + ((0.648214120343+0.436041092746j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.414435412396-0.118029249513j)*x[2]**o + ((-0.624078532878-0.486231457185j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.414435412396-0.118029249513j)*x_ref[2]**o + ((-0.624078532878-0.486231457185j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(-0.692502268268+0.178181841201j)*x[2]**o + ((0.254211436908+0.830523348144j))*x[2]
+            ref[(1, 0, 0, 3)]+=(-0.692502268268+0.178181841201j)*x_ref[2]**o + ((0.254211436908+0.830523348144j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.995189458747+0.138603014514j)*x[2]**o + ((-0.359830158013-0.841030046912j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.995189458747+0.138603014514j)*x_ref[2]**o + ((-0.359830158013-0.841030046912j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.616975213672+0.691151820721j)*x[2]**o + ((0.780273341999-0.758626486462j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.616975213672+0.691151820721j)*x_ref[2]**o + ((0.780273341999-0.758626486462j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.175781000345+0.0193135752801j)*x[2]**o + ((-0.508365962653-0.118471691789j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.175781000345+0.0193135752801j)*x_ref[2]**o + ((-0.508365962653-0.118471691789j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.561820299901-0.953571669069j)*x[2]**o + ((0.76579961639-0.23686874463j))*x[2]
+            ref[(1, 0, 1, 3)]+=(0.561820299901-0.953571669069j)*x_ref[2]**o + ((0.76579961639-0.23686874463j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.602060148189-0.770272473233j)*x[2]**o + ((0.679189426321+0.509867541251j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.602060148189-0.770272473233j)*x_ref[2]**o + ((0.679189426321+0.509867541251j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.993931603018-0.667011347199j)*x[2]**o + ((0.434529144436-0.100776936181j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.993931603018-0.667011347199j)*x_ref[2]**o + ((0.434529144436-0.100776936181j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.888330397643+0.447978192217j)*x[2]**o + ((0.0575110528281+0.743280009909j))*x[2]
+            ref[(1, 1, 0, 2)]+=(0.888330397643+0.447978192217j)*x_ref[2]**o + ((0.0575110528281+0.743280009909j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(0.0755409495525-0.861621868971j)*x[2]**o + ((-0.824290129819+0.249296088218j))*x[2]
+            ref[(1, 1, 0, 3)]+=(0.0755409495525-0.861621868971j)*x_ref[2]**o + ((-0.824290129819+0.249296088218j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.208577750694-0.707244585327j)*x[2]**o + ((-0.456838295065-0.094355750169j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.208577750694-0.707244585327j)*x_ref[2]**o + ((-0.456838295065-0.094355750169j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.200940205912+0.648048185159j)*x[2]**o + ((0.338716444852+0.506359491842j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.200940205912+0.648048185159j)*x_ref[2]**o + ((0.338716444852+0.506359491842j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.530844033668+0.427958123887j)*x[2]**o + ((0.983092358374-0.756924276772j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.530844033668+0.427958123887j)*x_ref[2]**o + ((0.983092358374-0.756924276772j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.17992737184-0.826585325792j)*x[2]**o + ((0.088436636584+0.0876237410775j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.17992737184-0.826585325792j)*x_ref[2]**o + ((0.088436636584+0.0876237410775j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.0229262713613+0.855822185211j)*x[2]**o + ((0.674491898236+0.44567795353j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.0229262713613+0.855822185211j)*x_ref[2]**o + ((0.674491898236+0.44567795353j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.511368613803-0.851076099925j)*x[2]**o + ((0.29233002977+0.382455595357j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.511368613803-0.851076099925j)*x_ref[2]**o + ((0.29233002977+0.382455595357j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(-0.031710030792+0.496978077204j)*x[2]**o + ((0.12299563254+0.489755383426j))*x[2]
+            ref[(1, 2, 0, 2)]+=(-0.031710030792+0.496978077204j)*x_ref[2]**o + ((0.12299563254+0.489755383426j))*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.51254514942-0.516911069905j)*x[2]**o + ((0.226683569839+0.263572608751j))*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.51254514942-0.516911069905j)*x_ref[2]**o + ((0.226683569839+0.263572608751j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.152928300963+0.186571029612j)*x[2]**o + ((0.0572652768537+0.648594482597j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.152928300963+0.186571029612j)*x_ref[2]**o + ((0.0572652768537+0.648594482597j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.494831271904-0.392049633917j)*x[2]**o + ((0.262457384229+0.318542622859j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.494831271904-0.392049633917j)*x_ref[2]**o + ((0.262457384229+0.318542622859j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.511097348349-0.564278847289j)*x[2]**o + ((0.369169012607+0.551487265887j))*x[2]
+            ref[(1, 2, 1, 2)]+=(0.511097348349-0.564278847289j)*x_ref[2]**o + ((0.369169012607+0.551487265887j))*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(-0.858826409769-0.63992080046j)*x[2]**o + ((-0.757703922497-0.949769144687j))*x[2]
+            ref[(1, 2, 1, 3)]+=(-0.858826409769-0.63992080046j)*x_ref[2]**o + ((-0.757703922497-0.949769144687j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.87466487719+0.439582353617j)*x[2]**o + ((-0.302543190582-0.307983714238j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.87466487719+0.439582353617j)*x_ref[2]**o + ((-0.302543190582-0.307983714238j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.071769771875-0.95941201128j)*x[2]**o + ((0.633171236322-0.0947587832139j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.071769771875-0.95941201128j)*x_ref[2]**o + ((0.633171236322-0.0947587832139j))*x_ref[2]
+            arg[(1, 3, 0, 2)]+=(0.574263242667+0.976565483201j)*x[2]**o + ((-0.439496789424-0.254618843295j))*x[2]
+            ref[(1, 3, 0, 2)]+=(0.574263242667+0.976565483201j)*x_ref[2]**o + ((-0.439496789424-0.254618843295j))*x_ref[2]
+            arg[(1, 3, 0, 3)]+=(-0.159555358901+0.389717685832j)*x[2]**o + ((0.232457053708+0.531129432168j))*x[2]
+            ref[(1, 3, 0, 3)]+=(-0.159555358901+0.389717685832j)*x_ref[2]**o + ((0.232457053708+0.531129432168j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.657457680604-0.348064600528j)*x[2]**o + ((0.555029420831-0.118160911992j))*x[2]
+            ref[(1, 3, 1, 0)]+=(0.657457680604-0.348064600528j)*x_ref[2]**o + ((0.555029420831-0.118160911992j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.547981327119+0.857449764269j)*x[2]**o + ((0.488722646899+0.436957596594j))*x[2]
+            ref[(1, 3, 1, 1)]+=(0.547981327119+0.857449764269j)*x_ref[2]**o + ((0.488722646899+0.436957596594j))*x_ref[2]
+            arg[(1, 3, 1, 2)]+=(0.686474655893-0.105725946095j)*x[2]**o + ((0.88638248961-0.66439724088j))*x[2]
+            ref[(1, 3, 1, 2)]+=(0.686474655893-0.105725946095j)*x_ref[2]**o + ((0.88638248961-0.66439724088j))*x_ref[2]
+            arg[(1, 3, 1, 3)]+=(0.750283634039+0.324632253502j)*x[2]**o + ((-0.446664509213+0.948630138303j))*x[2]
+            ref[(1, 3, 1, 3)]+=(0.750283634039+0.324632253502j)*x_ref[2]**o + ((-0.446664509213+0.948630138303j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.563215846768+0.558626267351j)*x[2]**o + ((0.0734029805571-0.966705632999j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.563215846768+0.558626267351j)*x_ref[2]**o + ((0.0734029805571-0.966705632999j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.785918721578+0.758991126788j)*x[2]**o + ((-0.787903283387-0.883215567333j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.785918721578+0.758991126788j)*x_ref[2]**o + ((-0.787903283387-0.883215567333j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.101817889757+0.0492919031355j)*x[2]**o + ((0.722653711467-0.271361191633j))*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.101817889757+0.0492919031355j)*x_ref[2]**o + ((0.722653711467-0.271361191633j))*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.314012311743-0.433123997208j)*x[2]**o + ((-0.628898359293+0.039081255951j))*x[2]
+            ref[(2, 0, 0, 3)]+=(0.314012311743-0.433123997208j)*x_ref[2]**o + ((-0.628898359293+0.039081255951j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.752315184123+0.927941473079j)*x[2]**o + ((-0.864584649914+0.74639108306j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.752315184123+0.927941473079j)*x_ref[2]**o + ((-0.864584649914+0.74639108306j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.706725535703+0.736669429785j)*x[2]**o + ((-0.193767589162+0.893367480644j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.706725535703+0.736669429785j)*x_ref[2]**o + ((-0.193767589162+0.893367480644j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.750033043674+0.252680199302j)*x[2]**o + ((-0.872086188088+0.975180788599j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.750033043674+0.252680199302j)*x_ref[2]**o + ((-0.872086188088+0.975180788599j))*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(0.0658111648714-0.750495655187j)*x[2]**o + ((0.4123421529+0.432713280814j))*x[2]
+            ref[(2, 0, 1, 3)]+=(0.0658111648714-0.750495655187j)*x_ref[2]**o + ((0.4123421529+0.432713280814j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.585769576273+0.446503914608j)*x[2]**o + ((-0.850557309709+0.599222024209j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.585769576273+0.446503914608j)*x_ref[2]**o + ((-0.850557309709+0.599222024209j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.345068153079-0.267051727619j)*x[2]**o + ((0.154220931043-0.100990899722j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.345068153079-0.267051727619j)*x_ref[2]**o + ((0.154220931043-0.100990899722j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.952969722492+0.148410200535j)*x[2]**o + ((-0.816634451734+0.0865160231591j))*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.952969722492+0.148410200535j)*x_ref[2]**o + ((-0.816634451734+0.0865160231591j))*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.535404301687+0.392085596098j)*x[2]**o + ((0.459504016144-0.410002333002j))*x[2]
+            ref[(2, 1, 0, 3)]+=(0.535404301687+0.392085596098j)*x_ref[2]**o + ((0.459504016144-0.410002333002j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.706015049974+0.765439515163j)*x[2]**o + ((-0.366614553822-0.427845593181j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.706015049974+0.765439515163j)*x_ref[2]**o + ((-0.366614553822-0.427845593181j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.831453496149+0.477804369688j)*x[2]**o + ((0.262150798607-0.343416783755j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.831453496149+0.477804369688j)*x_ref[2]**o + ((0.262150798607-0.343416783755j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.828206857857+0.78968534078j)*x[2]**o + ((-0.958735256212-0.272409032501j))*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.828206857857+0.78968534078j)*x_ref[2]**o + ((-0.958735256212-0.272409032501j))*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(-0.902834313179-0.396452475465j)*x[2]**o + ((-0.769110164241+0.959344492805j))*x[2]
+            ref[(2, 1, 1, 3)]+=(-0.902834313179-0.396452475465j)*x_ref[2]**o + ((-0.769110164241+0.959344492805j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.604896726333-0.805527015765j)*x[2]**o + ((-0.542454689995+0.570663002992j))*x[2]
+            ref[(2, 2, 0, 0)]+=(0.604896726333-0.805527015765j)*x_ref[2]**o + ((-0.542454689995+0.570663002992j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.401003607847+0.29798570985j)*x[2]**o + ((-0.898793358821+0.938597336625j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.401003607847+0.29798570985j)*x_ref[2]**o + ((-0.898793358821+0.938597336625j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(0.828074631313-0.692059967693j)*x[2]**o + ((0.882817076033-0.331474669579j))*x[2]
+            ref[(2, 2, 0, 2)]+=(0.828074631313-0.692059967693j)*x_ref[2]**o + ((0.882817076033-0.331474669579j))*x_ref[2]
+            arg[(2, 2, 0, 3)]+=(-0.101524859673-0.0595987484813j)*x[2]**o + ((0.149233550597+0.441670827223j))*x[2]
+            ref[(2, 2, 0, 3)]+=(-0.101524859673-0.0595987484813j)*x_ref[2]**o + ((0.149233550597+0.441670827223j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.582545860312-0.83830829626j)*x[2]**o + ((0.228702368312+0.570676086953j))*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.582545860312-0.83830829626j)*x_ref[2]**o + ((0.228702368312+0.570676086953j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.664848072226+0.167816751266j)*x[2]**o + ((-0.425083820532-0.386688819501j))*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.664848072226+0.167816751266j)*x_ref[2]**o + ((-0.425083820532-0.386688819501j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(-0.0114659433317+0.118921848778j)*x[2]**o + ((-0.207596521303-0.453150425439j))*x[2]
+            ref[(2, 2, 1, 2)]+=(-0.0114659433317+0.118921848778j)*x_ref[2]**o + ((-0.207596521303-0.453150425439j))*x_ref[2]
+            arg[(2, 2, 1, 3)]+=(-0.322703901887-0.297790816928j)*x[2]**o + ((-0.810327209785+0.454574060687j))*x[2]
+            ref[(2, 2, 1, 3)]+=(-0.322703901887-0.297790816928j)*x_ref[2]**o + ((-0.810327209785+0.454574060687j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(-0.406845672646-0.740406810808j)*x[2]**o + ((0.1219328959+0.63460245615j))*x[2]
+            ref[(2, 3, 0, 0)]+=(-0.406845672646-0.740406810808j)*x_ref[2]**o + ((0.1219328959+0.63460245615j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(0.139687071064+0.581109297408j)*x[2]**o + ((0.633557901548+0.326511443587j))*x[2]
+            ref[(2, 3, 0, 1)]+=(0.139687071064+0.581109297408j)*x_ref[2]**o + ((0.633557901548+0.326511443587j))*x_ref[2]
+            arg[(2, 3, 0, 2)]+=(-0.231565186986-0.00511963375614j)*x[2]**o + ((-0.89737187806+0.1558400865j))*x[2]
+            ref[(2, 3, 0, 2)]+=(-0.231565186986-0.00511963375614j)*x_ref[2]**o + ((-0.89737187806+0.1558400865j))*x_ref[2]
+            arg[(2, 3, 0, 3)]+=(-0.428337046968+0.64002715994j)*x[2]**o + ((0.723639068291-0.480079649599j))*x[2]
+            ref[(2, 3, 0, 3)]+=(-0.428337046968+0.64002715994j)*x_ref[2]**o + ((0.723639068291-0.480079649599j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(-0.577424350795-0.374715972257j)*x[2]**o + ((-0.560003459033-0.544017704064j))*x[2]
+            ref[(2, 3, 1, 0)]+=(-0.577424350795-0.374715972257j)*x_ref[2]**o + ((-0.560003459033-0.544017704064j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(-0.052933596699-0.882076347433j)*x[2]**o + ((0.251975958543+0.031093452755j))*x[2]
+            ref[(2, 3, 1, 1)]+=(-0.052933596699-0.882076347433j)*x_ref[2]**o + ((0.251975958543+0.031093452755j))*x_ref[2]
+            arg[(2, 3, 1, 2)]+=(-0.869389771609-0.0746630308739j)*x[2]**o + ((0.952473892083+0.988223976737j))*x[2]
+            ref[(2, 3, 1, 2)]+=(-0.869389771609-0.0746630308739j)*x_ref[2]**o + ((0.952473892083+0.988223976737j))*x_ref[2]
+            arg[(2, 3, 1, 3)]+=(0.12628189062-0.575507942497j)*x[2]**o + ((0.383700916484+0.157858491473j))*x[2]
+            ref[(2, 3, 1, 3)]+=(0.12628189062-0.575507942497j)*x_ref[2]**o + ((0.383700916484+0.157858491473j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.735798994642+0.955808247938j)*x[0]**o + ((0.519974896354+0.642261017771j))*x[0] + ((0.53976066592-0.0586209191561j))*x[1]**o + ((0.537700304841+0.631273776912j))*x[1]
+        ref=(0.735798994642+0.955808247938j)*x_ref[0]**o + ((0.519974896354+0.642261017771j))*x_ref[0] + ((0.53976066592-0.0586209191561j))*x_ref[1]**o + ((0.537700304841+0.631273776912j))*x_ref[1]
+        if dim==3:
+            arg+=((0.703283625669+0.0623145791446j))*x[2]**o + ((0.278211092798+0.968673850623j))*x[2]
+            ref+=((0.703283625669+0.0623145791446j))*x_ref[2]**o + ((0.278211092798+0.968673850623j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.958213558985+0.446770620332j)*x[0]**o + ((-0.942077917784-0.182255972476j))*x[0] + ((-0.283976821998-0.834761429711j))*x[1]**o + ((-0.49835258636+0.775464698955j))*x[1]
+        ref[(0,)]=(0.958213558985+0.446770620332j)*x_ref[0]**o + ((-0.942077917784-0.182255972476j))*x_ref[0] + ((-0.283976821998-0.834761429711j))*x_ref[1]**o + ((-0.49835258636+0.775464698955j))*x_ref[1]
+        arg[(1,)]=(0.938166818282+0.926445249392j)*x[0]**o + ((0.19475750386-0.690828614902j))*x[0] + ((0.165824873033+0.755533584642j))*x[1]**o + ((0.958013364918-0.580073183741j))*x[1]
+        ref[(1,)]=(0.938166818282+0.926445249392j)*x_ref[0]**o + ((0.19475750386-0.690828614902j))*x_ref[0] + ((0.165824873033+0.755533584642j))*x_ref[1]**o + ((0.958013364918-0.580073183741j))*x_ref[1]
+        arg[(2,)]=(0.889028063693+0.203581667341j)*x[0]**o + ((0.0477223534959-0.123524082365j))*x[0] + ((0.865003549311+0.849864648001j))*x[1]**o + ((0.27767111774+0.822485460294j))*x[1]
+        ref[(2,)]=(0.889028063693+0.203581667341j)*x_ref[0]**o + ((0.0477223534959-0.123524082365j))*x_ref[0] + ((0.865003549311+0.849864648001j))*x_ref[1]**o + ((0.27767111774+0.822485460294j))*x_ref[1]
+        arg[(3,)]=(0.652354215287-0.340434613159j)*x[0]**o + ((0.0966840415579+0.851157267091j))*x[0] + ((-0.902464195074+0.711961885531j))*x[1]**o + ((0.0165158407156-0.064403788017j))*x[1]
+        ref[(3,)]=(0.652354215287-0.340434613159j)*x_ref[0]**o + ((0.0966840415579+0.851157267091j))*x_ref[0] + ((-0.902464195074+0.711961885531j))*x_ref[1]**o + ((0.0165158407156-0.064403788017j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.00158032142199-0.88792447913j)*x[2]**o + ((-0.371226962904+0.777710853251j))*x[2]
+            ref[(0,)]+=(0.00158032142199-0.88792447913j)*x_ref[2]**o + ((-0.371226962904+0.777710853251j))*x_ref[2]
+            arg[(1,)]+=(-0.182076618636-0.153924113922j)*x[2]**o + ((0.336370089179-0.305066965851j))*x[2]
+            ref[(1,)]+=(-0.182076618636-0.153924113922j)*x_ref[2]**o + ((0.336370089179-0.305066965851j))*x_ref[2]
+            arg[(2,)]+=(-0.996105905117-0.327943755939j)*x[2]**o + ((-0.567410982314+0.297582138546j))*x[2]
+            ref[(2,)]+=(-0.996105905117-0.327943755939j)*x_ref[2]**o + ((-0.567410982314+0.297582138546j))*x_ref[2]
+            arg[(3,)]+=(0.939799689783-0.717809573779j)*x[2]**o + ((-0.311329290017+0.360079508068j))*x[2]
+            ref[(3,)]+=(0.939799689783-0.717809573779j)*x_ref[2]**o + ((-0.311329290017+0.360079508068j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=(0.402535135032-0.0333640737596j)*x[0]**o + ((0.0380512083417-0.672290157543j))*x[0] + ((0.325450839238+0.223592376862j))*x[1]**o + ((0.520757869641-0.730712835329j))*x[1]
+        ref[(0, 0)]=(0.402535135032-0.0333640737596j)*x_ref[0]**o + ((0.0380512083417-0.672290157543j))*x_ref[0] + ((0.325450839238+0.223592376862j))*x_ref[1]**o + ((0.520757869641-0.730712835329j))*x_ref[1]
+        arg[(0, 1)]=(-0.0143692203982-0.55124958256j)*x[0]**o + ((-0.906348190632+0.230939945679j))*x[0] + ((-0.0778712525068+0.868141216009j))*x[1]**o + ((-0.902223626395+0.412945614989j))*x[1]
+        ref[(0, 1)]=(-0.0143692203982-0.55124958256j)*x_ref[0]**o + ((-0.906348190632+0.230939945679j))*x_ref[0] + ((-0.0778712525068+0.868141216009j))*x_ref[1]**o + ((-0.902223626395+0.412945614989j))*x_ref[1]
+        arg[(1, 0)]=(-0.773629820187+0.743960535069j)*x[0]**o + ((-0.292288020482-0.346964921702j))*x[0] + ((0.402822465426+0.222252087687j))*x[1]**o + ((0.82585381078+0.230830721092j))*x[1]
+        ref[(1, 0)]=(-0.773629820187+0.743960535069j)*x_ref[0]**o + ((-0.292288020482-0.346964921702j))*x_ref[0] + ((0.402822465426+0.222252087687j))*x_ref[1]**o + ((0.82585381078+0.230830721092j))*x_ref[1]
+        arg[(1, 1)]=(0.286583410075+0.00619590183564j)*x[0]**o + ((0.432613482206-0.997900757948j))*x[0] + ((0.745932383911+0.395048612077j))*x[1]**o + ((-0.178505476283-0.429044902351j))*x[1]
+        ref[(1, 1)]=(0.286583410075+0.00619590183564j)*x_ref[0]**o + ((0.432613482206-0.997900757948j))*x_ref[0] + ((0.745932383911+0.395048612077j))*x_ref[1]**o + ((-0.178505476283-0.429044902351j))*x_ref[1]
+        arg[(2, 0)]=(-0.88002044543-0.532046918528j)*x[0]**o + ((0.8073490877-0.00296575635998j))*x[0] + ((0.107203427895+0.591267680235j))*x[1]**o + ((-0.413283124186-0.653439061705j))*x[1]
+        ref[(2, 0)]=(-0.88002044543-0.532046918528j)*x_ref[0]**o + ((0.8073490877-0.00296575635998j))*x_ref[0] + ((0.107203427895+0.591267680235j))*x_ref[1]**o + ((-0.413283124186-0.653439061705j))*x_ref[1]
+        arg[(2, 1)]=(0.0991118871423-0.996735757637j)*x[0]**o + ((-0.129614608449-0.659773157659j))*x[0] + ((0.443078983942-0.0675884607821j))*x[1]**o + ((0.638500970844-0.234988513883j))*x[1]
+        ref[(2, 1)]=(0.0991118871423-0.996735757637j)*x_ref[0]**o + ((-0.129614608449-0.659773157659j))*x_ref[0] + ((0.443078983942-0.0675884607821j))*x_ref[1]**o + ((0.638500970844-0.234988513883j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.393602117366-0.0387058620655j)*x[2]**o + ((-0.39229022677+0.840869935696j))*x[2]
+            ref[(0, 0)]+=(-0.393602117366-0.0387058620655j)*x_ref[2]**o + ((-0.39229022677+0.840869935696j))*x_ref[2]
+            arg[(0, 1)]+=(-0.19895091923+0.569279980016j)*x[2]**o + ((0.952792552704-0.820056116654j))*x[2]
+            ref[(0, 1)]+=(-0.19895091923+0.569279980016j)*x_ref[2]**o + ((0.952792552704-0.820056116654j))*x_ref[2]
+            arg[(1, 0)]+=(0.697269380643+0.292238229747j)*x[2]**o + ((0.879689823015-0.104258091079j))*x[2]
+            ref[(1, 0)]+=(0.697269380643+0.292238229747j)*x_ref[2]**o + ((0.879689823015-0.104258091079j))*x_ref[2]
+            arg[(1, 1)]+=(0.909545213604+0.278445173528j)*x[2]**o + ((0.0344747980961+0.552765334541j))*x[2]
+            ref[(1, 1)]+=(0.909545213604+0.278445173528j)*x_ref[2]**o + ((0.0344747980961+0.552765334541j))*x_ref[2]
+            arg[(2, 0)]+=(0.54593116848-0.747645087177j)*x[2]**o + ((-0.824046044739+0.11844855798j))*x[2]
+            ref[(2, 0)]+=(0.54593116848-0.747645087177j)*x_ref[2]**o + ((-0.824046044739+0.11844855798j))*x_ref[2]
+            arg[(2, 1)]+=(-0.159259643335-0.581195749015j)*x[2]**o + ((-0.105854296861-0.0774827232597j))*x[2]
+            ref[(2, 1)]+=(-0.159259643335-0.581195749015j)*x_ref[2]**o + ((-0.105854296861-0.0774827232597j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.250079386346+0.208176115861j)*x[0]**o + ((0.447241103437+0.590151640373j))*x[0] + ((0.902053271896+0.85793610962j))*x[1]**o + ((0.731828283188+0.332720885363j))*x[1]
+        ref[(0, 0, 0)]=(-0.250079386346+0.208176115861j)*x_ref[0]**o + ((0.447241103437+0.590151640373j))*x_ref[0] + ((0.902053271896+0.85793610962j))*x_ref[1]**o + ((0.731828283188+0.332720885363j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.552748084877-0.894773325555j)*x[0]**o + ((0.188006949667-0.0426748765611j))*x[0] + ((-0.870437309854-0.121024911796j))*x[1]**o + ((-0.228580080113-0.0530227860758j))*x[1]
+        ref[(0, 0, 1)]=(-0.552748084877-0.894773325555j)*x_ref[0]**o + ((0.188006949667-0.0426748765611j))*x_ref[0] + ((-0.870437309854-0.121024911796j))*x_ref[1]**o + ((-0.228580080113-0.0530227860758j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.833587593129-0.530067790265j)*x[0]**o + ((0.0647578001834-0.0601409320828j))*x[0] + ((0.689645139828-0.744252050834j))*x[1]**o + ((-0.538817391965+0.0962932253136j))*x[1]
+        ref[(0, 1, 0)]=(0.833587593129-0.530067790265j)*x_ref[0]**o + ((0.0647578001834-0.0601409320828j))*x_ref[0] + ((0.689645139828-0.744252050834j))*x_ref[1]**o + ((-0.538817391965+0.0962932253136j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.628470993374-0.916333934454j)*x[0]**o + ((0.457325792464-0.0148270656632j))*x[0] + ((0.24045525816+0.196503012521j))*x[1]**o + ((-0.797060727881-0.989111651072j))*x[1]
+        ref[(0, 1, 1)]=(0.628470993374-0.916333934454j)*x_ref[0]**o + ((0.457325792464-0.0148270656632j))*x_ref[0] + ((0.24045525816+0.196503012521j))*x_ref[1]**o + ((-0.797060727881-0.989111651072j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.917670739543-0.460927188566j)*x[0]**o + ((-0.853776089553-0.919107179923j))*x[0] + ((0.616585536684+0.0787027685046j))*x[1]**o + ((-0.744690544761+0.666249056559j))*x[1]
+        ref[(0, 2, 0)]=(-0.917670739543-0.460927188566j)*x_ref[0]**o + ((-0.853776089553-0.919107179923j))*x_ref[0] + ((0.616585536684+0.0787027685046j))*x_ref[1]**o + ((-0.744690544761+0.666249056559j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.198488941991-0.870639963764j)*x[0]**o + ((-0.682378315474-0.729975175475j))*x[0] + ((0.276002460448+0.0606465682119j))*x[1]**o + ((-0.148304656853-0.351179512601j))*x[1]
+        ref[(0, 2, 1)]=(-0.198488941991-0.870639963764j)*x_ref[0]**o + ((-0.682378315474-0.729975175475j))*x_ref[0] + ((0.276002460448+0.0606465682119j))*x_ref[1]**o + ((-0.148304656853-0.351179512601j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.00467918752573+0.793496591839j)*x[0]**o + ((-0.186479879355-0.985408143923j))*x[0] + ((0.819785217234-0.645154244685j))*x[1]**o + ((0.0167033964616-0.643515087556j))*x[1]
+        ref[(1, 0, 0)]=(-0.00467918752573+0.793496591839j)*x_ref[0]**o + ((-0.186479879355-0.985408143923j))*x_ref[0] + ((0.819785217234-0.645154244685j))*x_ref[1]**o + ((0.0167033964616-0.643515087556j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.83829501811+0.261652621581j)*x[0]**o + ((0.251034313373+0.969874421241j))*x[0] + ((-0.701215701613-0.903345245458j))*x[1]**o + ((0.547548662103-0.308423024271j))*x[1]
+        ref[(1, 0, 1)]=(0.83829501811+0.261652621581j)*x_ref[0]**o + ((0.251034313373+0.969874421241j))*x_ref[0] + ((-0.701215701613-0.903345245458j))*x_ref[1]**o + ((0.547548662103-0.308423024271j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.992257242617-0.277504870173j)*x[0]**o + ((-0.32365349615+0.432751213022j))*x[0] + ((-0.18030422922+0.977832467621j))*x[1]**o + ((0.741950840474-0.182651178899j))*x[1]
+        ref[(1, 1, 0)]=(0.992257242617-0.277504870173j)*x_ref[0]**o + ((-0.32365349615+0.432751213022j))*x_ref[0] + ((-0.18030422922+0.977832467621j))*x_ref[1]**o + ((0.741950840474-0.182651178899j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.686362285499+0.303149280683j)*x[0]**o + ((-0.290731788115+0.707652919606j))*x[0] + ((0.635731753167+0.138540841091j))*x[1]**o + ((-0.0335255915864-0.918784935834j))*x[1]
+        ref[(1, 1, 1)]=(-0.686362285499+0.303149280683j)*x_ref[0]**o + ((-0.290731788115+0.707652919606j))*x_ref[0] + ((0.635731753167+0.138540841091j))*x_ref[1]**o + ((-0.0335255915864-0.918784935834j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.520504126491+0.0529826051104j)*x[0]**o + ((0.0220764255183-0.613935624211j))*x[0] + ((0.211228208288-0.727844637052j))*x[1]**o + ((0.337467209444+0.367052326723j))*x[1]
+        ref[(1, 2, 0)]=(0.520504126491+0.0529826051104j)*x_ref[0]**o + ((0.0220764255183-0.613935624211j))*x_ref[0] + ((0.211228208288-0.727844637052j))*x_ref[1]**o + ((0.337467209444+0.367052326723j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.51372829249-0.109995526231j)*x[0]**o + ((-0.703219585163-0.211137190208j))*x[0] + ((-0.982892045617-0.904298185113j))*x[1]**o + ((-0.96909456487-0.821829863891j))*x[1]
+        ref[(1, 2, 1)]=(0.51372829249-0.109995526231j)*x_ref[0]**o + ((-0.703219585163-0.211137190208j))*x_ref[0] + ((-0.982892045617-0.904298185113j))*x_ref[1]**o + ((-0.96909456487-0.821829863891j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.0715784417284+0.131363792035j)*x[2]**o + ((0.196816481061+0.983837672125j))*x[2]
+            ref[(0, 0, 0)]+=(0.0715784417284+0.131363792035j)*x_ref[2]**o + ((0.196816481061+0.983837672125j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.136828825476+0.356442649803j)*x[2]**o + ((-0.288968871212-0.542560863175j))*x[2]
+            ref[(0, 0, 1)]+=(0.136828825476+0.356442649803j)*x_ref[2]**o + ((-0.288968871212-0.542560863175j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.270167610619+0.645108960308j)*x[2]**o + ((-0.77108463253+0.702717612843j))*x[2]
+            ref[(0, 1, 0)]+=(0.270167610619+0.645108960308j)*x_ref[2]**o + ((-0.77108463253+0.702717612843j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.821260987854-0.725426126679j)*x[2]**o + ((-0.95704356629+0.892077458633j))*x[2]
+            ref[(0, 1, 1)]+=(-0.821260987854-0.725426126679j)*x_ref[2]**o + ((-0.95704356629+0.892077458633j))*x_ref[2]
+            arg[(0, 2, 0)]+=(0.36932702824+0.161357559434j)*x[2]**o + ((-0.870212234957+0.63285420469j))*x[2]
+            ref[(0, 2, 0)]+=(0.36932702824+0.161357559434j)*x_ref[2]**o + ((-0.870212234957+0.63285420469j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.464331846684+0.391232368873j)*x[2]**o + ((0.0936344462043+0.787758907113j))*x[2]
+            ref[(0, 2, 1)]+=(-0.464331846684+0.391232368873j)*x_ref[2]**o + ((0.0936344462043+0.787758907113j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.642088953036-0.838105121715j)*x[2]**o + ((-0.957536636992-0.467235531945j))*x[2]
+            ref[(1, 0, 0)]+=(0.642088953036-0.838105121715j)*x_ref[2]**o + ((-0.957536636992-0.467235531945j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.0220079242485+0.550098883403j)*x[2]**o + ((0.119931016134+0.87276689251j))*x[2]
+            ref[(1, 0, 1)]+=(-0.0220079242485+0.550098883403j)*x_ref[2]**o + ((0.119931016134+0.87276689251j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.927084234017-0.538407298345j)*x[2]**o + ((-0.0523559992338-0.920918781635j))*x[2]
+            ref[(1, 1, 0)]+=(0.927084234017-0.538407298345j)*x_ref[2]**o + ((-0.0523559992338-0.920918781635j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.851783419593+0.555850355762j)*x[2]**o + ((0.0394868238854-0.784462769938j))*x[2]
+            ref[(1, 1, 1)]+=(-0.851783419593+0.555850355762j)*x_ref[2]**o + ((0.0394868238854-0.784462769938j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.211375835688+0.478843246915j)*x[2]**o + ((0.78011128934-0.950992010498j))*x[2]
+            ref[(1, 2, 0)]+=(0.211375835688+0.478843246915j)*x_ref[2]**o + ((0.78011128934-0.950992010498j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.246805210927-0.886736649131j)*x[2]**o + ((-0.257960508024+0.608065957021j))*x[2]
+            ref[(1, 2, 1)]+=(-0.246805210927-0.886736649131j)*x_ref[2]**o + ((-0.257960508024+0.608065957021j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onSolution_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 3, 4),w)
+        ref = Data(0,(3, 2, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.187424578829-0.897483524829j)*x[0]**o + ((-0.732647173119-0.433533869097j))*x[0] + ((-0.344157054504-0.332508468326j))*x[1]**o + ((-0.543577088872-0.381261168851j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.187424578829-0.897483524829j)*x_ref[0]**o + ((-0.732647173119-0.433533869097j))*x_ref[0] + ((-0.344157054504-0.332508468326j))*x_ref[1]**o + ((-0.543577088872-0.381261168851j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.53980641783+0.740247536382j)*x[0]**o + ((0.192646804245-0.778875736889j))*x[0] + ((-0.360199675965+0.732813798679j))*x[1]**o + ((-0.031012198892-0.874725880548j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.53980641783+0.740247536382j)*x_ref[0]**o + ((0.192646804245-0.778875736889j))*x_ref[0] + ((-0.360199675965+0.732813798679j))*x_ref[1]**o + ((-0.031012198892-0.874725880548j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.895249060362+0.39929835778j)*x[0]**o + ((0.362622313805+0.76031370277j))*x[0] + ((0.562915854988-0.532134883433j))*x[1]**o + ((0.653277361504-0.320978778281j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.895249060362+0.39929835778j)*x_ref[0]**o + ((0.362622313805+0.76031370277j))*x_ref[0] + ((0.562915854988-0.532134883433j))*x_ref[1]**o + ((0.653277361504-0.320978778281j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.72576752224+0.845149735524j)*x[0]**o + ((0.783935918682+0.154673715058j))*x[0] + ((-0.726301920823-0.437514915197j))*x[1]**o + ((0.585924041229-0.321090537942j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.72576752224+0.845149735524j)*x_ref[0]**o + ((0.783935918682+0.154673715058j))*x_ref[0] + ((-0.726301920823-0.437514915197j))*x_ref[1]**o + ((0.585924041229-0.321090537942j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.168469399824-0.552805781457j)*x[0]**o + ((-0.283749564397-0.572208077173j))*x[0] + ((-0.788170977733-0.0204255048911j))*x[1]**o + ((0.251984025713+0.0875867694317j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.168469399824-0.552805781457j)*x_ref[0]**o + ((-0.283749564397-0.572208077173j))*x_ref[0] + ((-0.788170977733-0.0204255048911j))*x_ref[1]**o + ((0.251984025713+0.0875867694317j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.825578799376-0.445140744607j)*x[0]**o + ((0.869034490261-0.00598952279023j))*x[0] + ((-0.87966289018-0.990465860708j))*x[1]**o + ((0.89085285132-0.0546209899284j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.825578799376-0.445140744607j)*x_ref[0]**o + ((0.869034490261-0.00598952279023j))*x_ref[0] + ((-0.87966289018-0.990465860708j))*x_ref[1]**o + ((0.89085285132-0.0546209899284j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.249336342819-0.525900779191j)*x[0]**o + ((0.716915373217+0.141145499491j))*x[0] + ((-0.79398710402+0.8877052069j))*x[1]**o + ((0.223789920527+0.0280700581076j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.249336342819-0.525900779191j)*x_ref[0]**o + ((0.716915373217+0.141145499491j))*x_ref[0] + ((-0.79398710402+0.8877052069j))*x_ref[1]**o + ((0.223789920527+0.0280700581076j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.446944497053-0.315695285238j)*x[0]**o + ((-0.976598524826-0.895939058953j))*x[0] + ((-0.980620356362+0.768567284193j))*x[1]**o + ((0.448632471004+0.217175493337j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.446944497053-0.315695285238j)*x_ref[0]**o + ((-0.976598524826-0.895939058953j))*x_ref[0] + ((-0.980620356362+0.768567284193j))*x_ref[1]**o + ((0.448632471004+0.217175493337j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.208809709428+0.638763080929j)*x[0]**o + ((-0.397610594605+0.982753544891j))*x[0] + ((0.541149801664+0.6413636699j))*x[1]**o + ((0.863777318999-0.324092130032j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.208809709428+0.638763080929j)*x_ref[0]**o + ((-0.397610594605+0.982753544891j))*x_ref[0] + ((0.541149801664+0.6413636699j))*x_ref[1]**o + ((0.863777318999-0.324092130032j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.767741474852-0.980680549365j)*x[0]**o + ((-0.176297102784-0.58724927399j))*x[0] + ((0.329646988038+0.880858477767j))*x[1]**o + ((0.728380341094+0.919101482623j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.767741474852-0.980680549365j)*x_ref[0]**o + ((-0.176297102784-0.58724927399j))*x_ref[0] + ((0.329646988038+0.880858477767j))*x_ref[1]**o + ((0.728380341094+0.919101482623j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(-0.538796802173-0.454575711755j)*x[0]**o + ((0.280790103262-0.816465213372j))*x[0] + ((0.258433208417+0.203701570192j))*x[1]**o + ((0.973977550624+0.16532301886j))*x[1]
+        ref[(0, 0, 2, 2)]=(-0.538796802173-0.454575711755j)*x_ref[0]**o + ((0.280790103262-0.816465213372j))*x_ref[0] + ((0.258433208417+0.203701570192j))*x_ref[1]**o + ((0.973977550624+0.16532301886j))*x_ref[1]
+        arg[(0, 0, 2, 3)]=(0.01323639516+0.255625358746j)*x[0]**o + ((-0.141884938007-0.777744822702j))*x[0] + ((-0.919349187878-0.463739532659j))*x[1]**o + ((-0.579089246789+0.154233956715j))*x[1]
+        ref[(0, 0, 2, 3)]=(0.01323639516+0.255625358746j)*x_ref[0]**o + ((-0.141884938007-0.777744822702j))*x_ref[0] + ((-0.919349187878-0.463739532659j))*x_ref[1]**o + ((-0.579089246789+0.154233956715j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.212646104873+0.18823732716j)*x[0]**o + ((-0.285828480989-0.419899987481j))*x[0] + ((-0.150914500126-0.709081761952j))*x[1]**o + ((-0.732244718061-0.757019288471j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.212646104873+0.18823732716j)*x_ref[0]**o + ((-0.285828480989-0.419899987481j))*x_ref[0] + ((-0.150914500126-0.709081761952j))*x_ref[1]**o + ((-0.732244718061-0.757019288471j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.583775004394-0.639777032146j)*x[0]**o + ((0.597501559757-0.906566432753j))*x[0] + ((-0.961751145255+0.0160592094523j))*x[1]**o + ((-0.00320906183781-0.0187625016664j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.583775004394-0.639777032146j)*x_ref[0]**o + ((0.597501559757-0.906566432753j))*x_ref[0] + ((-0.961751145255+0.0160592094523j))*x_ref[1]**o + ((-0.00320906183781-0.0187625016664j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.4945449714+0.370664225213j)*x[0]**o + ((0.997686349426+0.856612903477j))*x[0] + ((0.498653486817-0.304708156075j))*x[1]**o + ((0.920559241359+0.80589736055j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.4945449714+0.370664225213j)*x_ref[0]**o + ((0.997686349426+0.856612903477j))*x_ref[0] + ((0.498653486817-0.304708156075j))*x_ref[1]**o + ((0.920559241359+0.80589736055j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.838013234539-0.797349321388j)*x[0]**o + ((0.146648121955-0.952183572362j))*x[0] + ((-0.0827448608438+0.366438618906j))*x[1]**o + ((-0.982350318025+0.0656626508027j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.838013234539-0.797349321388j)*x_ref[0]**o + ((0.146648121955-0.952183572362j))*x_ref[0] + ((-0.0827448608438+0.366438618906j))*x_ref[1]**o + ((-0.982350318025+0.0656626508027j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.0487117369423-0.315900028316j)*x[0]**o + ((0.599169891782+0.909741903382j))*x[0] + ((0.899608662356+0.158696110213j))*x[1]**o + ((0.911063007729+0.403473716917j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.0487117369423-0.315900028316j)*x_ref[0]**o + ((0.599169891782+0.909741903382j))*x_ref[0] + ((0.899608662356+0.158696110213j))*x_ref[1]**o + ((0.911063007729+0.403473716917j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.237701758844-0.45473719378j)*x[0]**o + ((-0.938088723147-0.476090312332j))*x[0] + ((-0.69982365646+0.754112448442j))*x[1]**o + ((0.711353942147-0.621349789893j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.237701758844-0.45473719378j)*x_ref[0]**o + ((-0.938088723147-0.476090312332j))*x_ref[0] + ((-0.69982365646+0.754112448442j))*x_ref[1]**o + ((0.711353942147-0.621349789893j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.237062717123-0.590751920544j)*x[0]**o + ((0.123171662553+0.764193680666j))*x[0] + ((0.012844437374+0.348141320819j))*x[1]**o + ((-0.624593716022-0.220227310524j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.237062717123-0.590751920544j)*x_ref[0]**o + ((0.123171662553+0.764193680666j))*x_ref[0] + ((0.012844437374+0.348141320819j))*x_ref[1]**o + ((-0.624593716022-0.220227310524j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.121095127734-0.375092736369j)*x[0]**o + ((0.638310181862+0.0613698793167j))*x[0] + ((0.655721938198-0.103835965592j))*x[1]**o + ((-0.2991345178-0.224642727711j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.121095127734-0.375092736369j)*x_ref[0]**o + ((0.638310181862+0.0613698793167j))*x_ref[0] + ((0.655721938198-0.103835965592j))*x_ref[1]**o + ((-0.2991345178-0.224642727711j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.951387974736-0.24038358168j)*x[0]**o + ((-0.122858447154-0.8422422331j))*x[0] + ((0.185107100864+0.718143168828j))*x[1]**o + ((0.733026972165-0.00841668486932j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.951387974736-0.24038358168j)*x_ref[0]**o + ((-0.122858447154-0.8422422331j))*x_ref[0] + ((0.185107100864+0.718143168828j))*x_ref[1]**o + ((0.733026972165-0.00841668486932j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.350024002025+0.524145995861j)*x[0]**o + ((-0.501457139684+0.103488627146j))*x[0] + ((0.404430168113+0.265285904382j))*x[1]**o + ((0.593878803655-0.135356785866j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.350024002025+0.524145995861j)*x_ref[0]**o + ((-0.501457139684+0.103488627146j))*x_ref[0] + ((0.404430168113+0.265285904382j))*x_ref[1]**o + ((0.593878803655-0.135356785866j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.521009223082-0.155002347334j)*x[0]**o + ((0.785443537524+0.826854419891j))*x[0] + ((-0.0972240838315+0.197966053877j))*x[1]**o + ((0.162660050959+0.896130887998j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.521009223082-0.155002347334j)*x_ref[0]**o + ((0.785443537524+0.826854419891j))*x_ref[0] + ((-0.0972240838315+0.197966053877j))*x_ref[1]**o + ((0.162660050959+0.896130887998j))*x_ref[1]
+        arg[(0, 1, 2, 3)]=(-0.360231466298+0.671575536918j)*x[0]**o + ((0.767208217461-0.531469781774j))*x[0] + ((-0.366857601247-0.97155285251j))*x[1]**o + ((-0.910118170205-0.377748827079j))*x[1]
+        ref[(0, 1, 2, 3)]=(-0.360231466298+0.671575536918j)*x_ref[0]**o + ((0.767208217461-0.531469781774j))*x_ref[0] + ((-0.366857601247-0.97155285251j))*x_ref[1]**o + ((-0.910118170205-0.377748827079j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.205850838369-0.59573194824j)*x[0]**o + ((0.965353716882-0.150152398288j))*x[0] + ((-0.573887031983+0.834783989775j))*x[1]**o + ((0.248649006239+0.27134378132j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.205850838369-0.59573194824j)*x_ref[0]**o + ((0.965353716882-0.150152398288j))*x_ref[0] + ((-0.573887031983+0.834783989775j))*x_ref[1]**o + ((0.248649006239+0.27134378132j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.990059733855+0.757027785014j)*x[0]**o + ((-0.878240209616+0.130153202321j))*x[0] + ((0.979747881586+0.277272257068j))*x[1]**o + ((0.827208913514-0.518014811941j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.990059733855+0.757027785014j)*x_ref[0]**o + ((-0.878240209616+0.130153202321j))*x_ref[0] + ((0.979747881586+0.277272257068j))*x_ref[1]**o + ((0.827208913514-0.518014811941j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.702216426664+0.910293226823j)*x[0]**o + ((0.29208035023-0.639332671138j))*x[0] + ((-0.254104417359-0.912011188866j))*x[1]**o + ((-0.553449930169-0.955245489433j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.702216426664+0.910293226823j)*x_ref[0]**o + ((0.29208035023-0.639332671138j))*x_ref[0] + ((-0.254104417359-0.912011188866j))*x_ref[1]**o + ((-0.553449930169-0.955245489433j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.48941206269-0.0401258025323j)*x[0]**o + ((0.427873384474+0.626356912553j))*x[0] + ((-0.837808351108-0.0223377799654j))*x[1]**o + ((-0.803912275184+0.0226618784864j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.48941206269-0.0401258025323j)*x_ref[0]**o + ((0.427873384474+0.626356912553j))*x_ref[0] + ((-0.837808351108-0.0223377799654j))*x_ref[1]**o + ((-0.803912275184+0.0226618784864j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.970927069172+0.640343115001j)*x[0]**o + ((-0.153150685275+0.549502540484j))*x[0] + ((-0.266701304166-0.479186264116j))*x[1]**o + ((0.502460227274+0.733990715127j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.970927069172+0.640343115001j)*x_ref[0]**o + ((-0.153150685275+0.549502540484j))*x_ref[0] + ((-0.266701304166-0.479186264116j))*x_ref[1]**o + ((0.502460227274+0.733990715127j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.483955891159+0.187921248204j)*x[0]**o + ((0.562647028504+0.802587994796j))*x[0] + ((0.62191227909+0.0223180586541j))*x[1]**o + ((0.919435919549-0.174490380596j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.483955891159+0.187921248204j)*x_ref[0]**o + ((0.562647028504+0.802587994796j))*x_ref[0] + ((0.62191227909+0.0223180586541j))*x_ref[1]**o + ((0.919435919549-0.174490380596j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.512780266738+0.680279267489j)*x[0]**o + ((-0.23740762194+0.618321988247j))*x[0] + ((0.360570592903+0.16752755394j))*x[1]**o + ((-0.0464385633685+0.129777375332j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.512780266738+0.680279267489j)*x_ref[0]**o + ((-0.23740762194+0.618321988247j))*x_ref[0] + ((0.360570592903+0.16752755394j))*x_ref[1]**o + ((-0.0464385633685+0.129777375332j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(0.588725233954+0.521386972279j)*x[0]**o + ((-0.320993415895-0.693666710856j))*x[0] + ((-0.984816465256+0.516543455526j))*x[1]**o + ((0.528829602803+0.379498585272j))*x[1]
+        ref[(1, 0, 1, 3)]=(0.588725233954+0.521386972279j)*x_ref[0]**o + ((-0.320993415895-0.693666710856j))*x_ref[0] + ((-0.984816465256+0.516543455526j))*x_ref[1]**o + ((0.528829602803+0.379498585272j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.804631813351+0.335063644811j)*x[0]**o + ((0.968041593306-0.655114680988j))*x[0] + ((0.443988071552+0.251857423585j))*x[1]**o + ((-0.546834776745-0.274966019077j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.804631813351+0.335063644811j)*x_ref[0]**o + ((0.968041593306-0.655114680988j))*x_ref[0] + ((0.443988071552+0.251857423585j))*x_ref[1]**o + ((-0.546834776745-0.274966019077j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.0297924209796+0.512011909208j)*x[0]**o + ((-0.179446483487-0.819735077128j))*x[0] + ((0.497768485328+0.426917706444j))*x[1]**o + ((0.319024899253+0.702290685673j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.0297924209796+0.512011909208j)*x_ref[0]**o + ((-0.179446483487-0.819735077128j))*x_ref[0] + ((0.497768485328+0.426917706444j))*x_ref[1]**o + ((0.319024899253+0.702290685673j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.18279863611-0.488040952897j)*x[0]**o + ((0.966218393405-0.21652628189j))*x[0] + ((-0.90916286328+0.0408041265707j))*x[1]**o + ((0.827737575299-0.718637720483j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.18279863611-0.488040952897j)*x_ref[0]**o + ((0.966218393405-0.21652628189j))*x_ref[0] + ((-0.90916286328+0.0408041265707j))*x_ref[1]**o + ((0.827737575299-0.718637720483j))*x_ref[1]
+        arg[(1, 0, 2, 3)]=(-0.634351976387+0.600172135475j)*x[0]**o + ((0.876179135743+0.211135093552j))*x[0] + ((-0.108853069168-0.917190216201j))*x[1]**o + ((-0.346721725812-0.0815015389157j))*x[1]
+        ref[(1, 0, 2, 3)]=(-0.634351976387+0.600172135475j)*x_ref[0]**o + ((0.876179135743+0.211135093552j))*x_ref[0] + ((-0.108853069168-0.917190216201j))*x_ref[1]**o + ((-0.346721725812-0.0815015389157j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.483881300846+0.690918438888j)*x[0]**o + ((-0.269445563538+0.181680695359j))*x[0] + ((-0.32898242474-0.177732586077j))*x[1]**o + ((-0.136628799962-0.09258341888j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.483881300846+0.690918438888j)*x_ref[0]**o + ((-0.269445563538+0.181680695359j))*x_ref[0] + ((-0.32898242474-0.177732586077j))*x_ref[1]**o + ((-0.136628799962-0.09258341888j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.824641220973-0.63962803066j)*x[0]**o + ((0.390959861101+0.307390686844j))*x[0] + ((0.0849663289787-0.933246521973j))*x[1]**o + ((-0.101029644188+0.655563657921j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.824641220973-0.63962803066j)*x_ref[0]**o + ((0.390959861101+0.307390686844j))*x_ref[0] + ((0.0849663289787-0.933246521973j))*x_ref[1]**o + ((-0.101029644188+0.655563657921j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.584823069063-0.0926296215726j)*x[0]**o + ((0.950531582826+0.297554689173j))*x[0] + ((-0.43725971317+0.244358273895j))*x[1]**o + ((0.169855845762-0.795594478032j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.584823069063-0.0926296215726j)*x_ref[0]**o + ((0.950531582826+0.297554689173j))*x_ref[0] + ((-0.43725971317+0.244358273895j))*x_ref[1]**o + ((0.169855845762-0.795594478032j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.734716155331+0.809815954668j)*x[0]**o + ((-0.891261881981+0.312851696576j))*x[0] + ((-0.648244208864-0.744705371771j))*x[1]**o + ((-0.47749046067-0.0472487359224j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.734716155331+0.809815954668j)*x_ref[0]**o + ((-0.891261881981+0.312851696576j))*x_ref[0] + ((-0.648244208864-0.744705371771j))*x_ref[1]**o + ((-0.47749046067-0.0472487359224j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.311963620284-0.472716476727j)*x[0]**o + ((-0.911956589453+0.696321721371j))*x[0] + ((-0.102952287706-0.582025575689j))*x[1]**o + ((0.70053408977-0.00728188154036j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.311963620284-0.472716476727j)*x_ref[0]**o + ((-0.911956589453+0.696321721371j))*x_ref[0] + ((-0.102952287706-0.582025575689j))*x_ref[1]**o + ((0.70053408977-0.00728188154036j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.616502961683+0.204055882032j)*x[0]**o + ((-0.215164989966+0.0476151681892j))*x[0] + ((0.285902680829-0.55094128312j))*x[1]**o + ((-0.625661252118-0.772046766388j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.616502961683+0.204055882032j)*x_ref[0]**o + ((-0.215164989966+0.0476151681892j))*x_ref[0] + ((0.285902680829-0.55094128312j))*x_ref[1]**o + ((-0.625661252118-0.772046766388j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.639834974667+0.663186768867j)*x[0]**o + ((0.298603622791+0.794662980161j))*x[0] + ((-0.481980948705+0.49783377592j))*x[1]**o + ((0.726094597634+0.343641427034j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.639834974667+0.663186768867j)*x_ref[0]**o + ((0.298603622791+0.794662980161j))*x_ref[0] + ((-0.481980948705+0.49783377592j))*x_ref[1]**o + ((0.726094597634+0.343641427034j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.795372070399-0.440609951071j)*x[0]**o + ((0.938203873758-0.205821905559j))*x[0] + ((-0.33828505311+0.198209998922j))*x[1]**o + ((0.81893946898+0.826226712972j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.795372070399-0.440609951071j)*x_ref[0]**o + ((0.938203873758-0.205821905559j))*x_ref[0] + ((-0.33828505311+0.198209998922j))*x_ref[1]**o + ((0.81893946898+0.826226712972j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.642234867584+0.562342230959j)*x[0]**o + ((0.867242561206+0.453379487804j))*x[0] + ((0.929589671706+0.50863805821j))*x[1]**o + ((0.509265265114+0.14016305051j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.642234867584+0.562342230959j)*x_ref[0]**o + ((0.867242561206+0.453379487804j))*x_ref[0] + ((0.929589671706+0.50863805821j))*x_ref[1]**o + ((0.509265265114+0.14016305051j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.494417442778+0.984904054174j)*x[0]**o + ((0.823834909317-0.0317342878482j))*x[0] + ((0.373483387253-0.100963295829j))*x[1]**o + ((-0.84316166016+0.343434877518j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.494417442778+0.984904054174j)*x_ref[0]**o + ((0.823834909317-0.0317342878482j))*x_ref[0] + ((0.373483387253-0.100963295829j))*x_ref[1]**o + ((-0.84316166016+0.343434877518j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.916150006687-0.396735067939j)*x[0]**o + ((0.81095607283+0.438661404126j))*x[0] + ((0.625827923684-0.941071173617j))*x[1]**o + ((0.419740217835-0.102488538374j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.916150006687-0.396735067939j)*x_ref[0]**o + ((0.81095607283+0.438661404126j))*x_ref[0] + ((0.625827923684-0.941071173617j))*x_ref[1]**o + ((0.419740217835-0.102488538374j))*x_ref[1]
+        arg[(1, 1, 2, 3)]=(-0.781760075705+0.0175118162815j)*x[0]**o + ((-0.807804291643+0.334150654367j))*x[0] + ((0.106270255607-0.204058189521j))*x[1]**o + ((-0.267162008371-0.215787359393j))*x[1]
+        ref[(1, 1, 2, 3)]=(-0.781760075705+0.0175118162815j)*x_ref[0]**o + ((-0.807804291643+0.334150654367j))*x_ref[0] + ((0.106270255607-0.204058189521j))*x_ref[1]**o + ((-0.267162008371-0.215787359393j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.839173688833+0.072566016195j)*x[0]**o + ((-0.597387327397+0.576937024346j))*x[0] + ((-0.836644295886+0.281516084716j))*x[1]**o + ((-0.0872187636624+0.371268678663j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.839173688833+0.072566016195j)*x_ref[0]**o + ((-0.597387327397+0.576937024346j))*x_ref[0] + ((-0.836644295886+0.281516084716j))*x_ref[1]**o + ((-0.0872187636624+0.371268678663j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.0294749522138+0.566523870262j)*x[0]**o + ((-0.699022136419+0.335858984663j))*x[0] + ((0.768348209528-0.923353659981j))*x[1]**o + ((-0.209026794332+0.218184396803j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.0294749522138+0.566523870262j)*x_ref[0]**o + ((-0.699022136419+0.335858984663j))*x_ref[0] + ((0.768348209528-0.923353659981j))*x_ref[1]**o + ((-0.209026794332+0.218184396803j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(-0.707631090313+0.467677364516j)*x[0]**o + ((0.448644079726-0.195181752765j))*x[0] + ((0.627330512122+0.52757531751j))*x[1]**o + ((-0.0306784310796+0.230776056048j))*x[1]
+        ref[(2, 0, 0, 2)]=(-0.707631090313+0.467677364516j)*x_ref[0]**o + ((0.448644079726-0.195181752765j))*x_ref[0] + ((0.627330512122+0.52757531751j))*x_ref[1]**o + ((-0.0306784310796+0.230776056048j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.208241732617-0.366086558032j)*x[0]**o + ((-0.65396168735-0.703768705746j))*x[0] + ((0.947851865536-0.974277660833j))*x[1]**o + ((0.668436901492+0.536817259566j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.208241732617-0.366086558032j)*x_ref[0]**o + ((-0.65396168735-0.703768705746j))*x_ref[0] + ((0.947851865536-0.974277660833j))*x_ref[1]**o + ((0.668436901492+0.536817259566j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.646873333053-0.402933992439j)*x[0]**o + ((0.0477155970689-0.089835333886j))*x[0] + ((-0.876117598198-0.380328848008j))*x[1]**o + ((-0.606303336873-0.0353881810546j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.646873333053-0.402933992439j)*x_ref[0]**o + ((0.0477155970689-0.089835333886j))*x_ref[0] + ((-0.876117598198-0.380328848008j))*x_ref[1]**o + ((-0.606303336873-0.0353881810546j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.667841399769+0.111279978395j)*x[0]**o + ((0.781673153063+0.036389447498j))*x[0] + ((-0.165127168375+0.831384922244j))*x[1]**o + ((-0.0182570547966+0.350095832376j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.667841399769+0.111279978395j)*x_ref[0]**o + ((0.781673153063+0.036389447498j))*x_ref[0] + ((-0.165127168375+0.831384922244j))*x_ref[1]**o + ((-0.0182570547966+0.350095832376j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.442472721332-0.162303816973j)*x[0]**o + ((-0.77009713717-0.176913279564j))*x[0] + ((0.442162617649+0.14666876328j))*x[1]**o + ((-0.496255768548+0.567862177107j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.442472721332-0.162303816973j)*x_ref[0]**o + ((-0.77009713717-0.176913279564j))*x_ref[0] + ((0.442162617649+0.14666876328j))*x_ref[1]**o + ((-0.496255768548+0.567862177107j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.627653414539-0.00830955709972j)*x[0]**o + ((-0.190394017953-0.959715092889j))*x[0] + ((0.130680919868-0.908806555561j))*x[1]**o + ((0.405673996673-0.164992494008j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.627653414539-0.00830955709972j)*x_ref[0]**o + ((-0.190394017953-0.959715092889j))*x_ref[0] + ((0.130680919868-0.908806555561j))*x_ref[1]**o + ((0.405673996673-0.164992494008j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.323727707514-0.780933706193j)*x[0]**o + ((-0.428935928843+0.171086045702j))*x[0] + ((-0.022674035049-0.178304387503j))*x[1]**o + ((0.856043384118+0.141907241414j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.323727707514-0.780933706193j)*x_ref[0]**o + ((-0.428935928843+0.171086045702j))*x_ref[0] + ((-0.022674035049-0.178304387503j))*x_ref[1]**o + ((0.856043384118+0.141907241414j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.955595906733+0.897875601864j)*x[0]**o + ((-0.430247426113-0.664976555659j))*x[0] + ((0.564390605115-0.107971581124j))*x[1]**o + ((0.154062520057+0.477419382884j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.955595906733+0.897875601864j)*x_ref[0]**o + ((-0.430247426113-0.664976555659j))*x_ref[0] + ((0.564390605115-0.107971581124j))*x_ref[1]**o + ((0.154062520057+0.477419382884j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(-0.568711526404+0.587847718022j)*x[0]**o + ((-0.777184046909+0.433870758665j))*x[0] + ((-0.0306359859868-0.557926156415j))*x[1]**o + ((-0.683753192928-0.916120708804j))*x[1]
+        ref[(2, 0, 2, 2)]=(-0.568711526404+0.587847718022j)*x_ref[0]**o + ((-0.777184046909+0.433870758665j))*x_ref[0] + ((-0.0306359859868-0.557926156415j))*x_ref[1]**o + ((-0.683753192928-0.916120708804j))*x_ref[1]
+        arg[(2, 0, 2, 3)]=(-0.501184923232+0.595885240042j)*x[0]**o + ((-0.526889373519+0.738090641043j))*x[0] + ((0.660010793991+0.209995022125j))*x[1]**o + ((0.751527777519+0.360311594037j))*x[1]
+        ref[(2, 0, 2, 3)]=(-0.501184923232+0.595885240042j)*x_ref[0]**o + ((-0.526889373519+0.738090641043j))*x_ref[0] + ((0.660010793991+0.209995022125j))*x_ref[1]**o + ((0.751527777519+0.360311594037j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.217504330056-0.144395992392j)*x[0]**o + ((0.210479979889+0.565028687331j))*x[0] + ((0.976821943559-0.800725606938j))*x[1]**o + ((0.415335246634-0.146522102201j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.217504330056-0.144395992392j)*x_ref[0]**o + ((0.210479979889+0.565028687331j))*x_ref[0] + ((0.976821943559-0.800725606938j))*x_ref[1]**o + ((0.415335246634-0.146522102201j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.810633327745+0.523769294879j)*x[0]**o + ((-0.52161981135-0.585557429353j))*x[0] + ((-0.251699181394-0.632491813449j))*x[1]**o + ((0.878093383358+0.150450708594j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.810633327745+0.523769294879j)*x_ref[0]**o + ((-0.52161981135-0.585557429353j))*x_ref[0] + ((-0.251699181394-0.632491813449j))*x_ref[1]**o + ((0.878093383358+0.150450708594j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.560315795828-0.332031283197j)*x[0]**o + ((0.546529904179-0.627076777504j))*x[0] + ((0.666207308302-0.118902041426j))*x[1]**o + ((-0.980704743571-0.486526044319j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.560315795828-0.332031283197j)*x_ref[0]**o + ((0.546529904179-0.627076777504j))*x_ref[0] + ((0.666207308302-0.118902041426j))*x_ref[1]**o + ((-0.980704743571-0.486526044319j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.612758553343-0.763675721811j)*x[0]**o + ((-0.306068246674+0.0581972011258j))*x[0] + ((0.569175216042+0.486044502205j))*x[1]**o + ((0.875544571279+0.786014618852j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.612758553343-0.763675721811j)*x_ref[0]**o + ((-0.306068246674+0.0581972011258j))*x_ref[0] + ((0.569175216042+0.486044502205j))*x_ref[1]**o + ((0.875544571279+0.786014618852j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.212663449951+0.395927463672j)*x[0]**o + ((-0.0736641932202+0.250433444447j))*x[0] + ((0.623959534649-0.873680528407j))*x[1]**o + ((-0.544525513512+0.0446490124551j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.212663449951+0.395927463672j)*x_ref[0]**o + ((-0.0736641932202+0.250433444447j))*x_ref[0] + ((0.623959534649-0.873680528407j))*x_ref[1]**o + ((-0.544525513512+0.0446490124551j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.400145490383+0.282350943481j)*x[0]**o + ((0.336834743381-0.174094824207j))*x[0] + ((-0.321243421329+0.189885891577j))*x[1]**o + ((-0.155038404049-0.90753227011j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.400145490383+0.282350943481j)*x_ref[0]**o + ((0.336834743381-0.174094824207j))*x_ref[0] + ((-0.321243421329+0.189885891577j))*x_ref[1]**o + ((-0.155038404049-0.90753227011j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.823773011919-0.464182606363j)*x[0]**o + ((0.297435222165+0.365240142451j))*x[0] + ((0.391491103718-0.955686420899j))*x[1]**o + ((-0.941388056505-0.636169943132j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.823773011919-0.464182606363j)*x_ref[0]**o + ((0.297435222165+0.365240142451j))*x_ref[0] + ((0.391491103718-0.955686420899j))*x_ref[1]**o + ((-0.941388056505-0.636169943132j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(0.0928484684199+0.416766311266j)*x[0]**o + ((-0.894209709952+0.186802045722j))*x[0] + ((0.984867114114+0.538909395355j))*x[1]**o + ((-0.381931161389+0.846321976966j))*x[1]
+        ref[(2, 1, 1, 3)]=(0.0928484684199+0.416766311266j)*x_ref[0]**o + ((-0.894209709952+0.186802045722j))*x_ref[0] + ((0.984867114114+0.538909395355j))*x_ref[1]**o + ((-0.381931161389+0.846321976966j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.609561943449-0.714790000206j)*x[0]**o + ((0.101692545102+0.33610347523j))*x[0] + ((-0.203981810753+0.0416628895155j))*x[1]**o + ((0.68768413111-0.0193468800328j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.609561943449-0.714790000206j)*x_ref[0]**o + ((0.101692545102+0.33610347523j))*x_ref[0] + ((-0.203981810753+0.0416628895155j))*x_ref[1]**o + ((0.68768413111-0.0193468800328j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.037124521415-0.836442288713j)*x[0]**o + ((0.576801110286+0.535003485995j))*x[0] + ((0.706948635887-0.594866913407j))*x[1]**o + ((0.455579682948-0.172547152355j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.037124521415-0.836442288713j)*x_ref[0]**o + ((0.576801110286+0.535003485995j))*x_ref[0] + ((0.706948635887-0.594866913407j))*x_ref[1]**o + ((0.455579682948-0.172547152355j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(-0.484391356188+0.612905247615j)*x[0]**o + ((0.0010914292028-0.265645652855j))*x[0] + ((0.0743843277722-0.797181896644j))*x[1]**o + ((-0.263147294283-0.243099255393j))*x[1]
+        ref[(2, 1, 2, 2)]=(-0.484391356188+0.612905247615j)*x_ref[0]**o + ((0.0010914292028-0.265645652855j))*x_ref[0] + ((0.0743843277722-0.797181896644j))*x_ref[1]**o + ((-0.263147294283-0.243099255393j))*x_ref[1]
+        arg[(2, 1, 2, 3)]=(-0.879034160456-0.0196006705994j)*x[0]**o + ((-0.966625425614+0.316231432771j))*x[0] + ((0.0532332922167+0.447169471815j))*x[1]**o + ((0.543756722697-0.21614247231j))*x[1]
+        ref[(2, 1, 2, 3)]=(-0.879034160456-0.0196006705994j)*x_ref[0]**o + ((-0.966625425614+0.316231432771j))*x_ref[0] + ((0.0532332922167+0.447169471815j))*x_ref[1]**o + ((0.543756722697-0.21614247231j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.309168700005+0.234132790413j)*x[2]**o + ((-0.300240485341-0.341527685643j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.309168700005+0.234132790413j)*x_ref[2]**o + ((-0.300240485341-0.341527685643j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.981459193775+0.503471579867j)*x[2]**o + ((-0.916690850322-0.532760312545j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.981459193775+0.503471579867j)*x_ref[2]**o + ((-0.916690850322-0.532760312545j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.644532590607-0.301846802444j)*x[2]**o + ((-0.16739315712-0.700701094857j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.644532590607-0.301846802444j)*x_ref[2]**o + ((-0.16739315712-0.700701094857j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.375291574835+0.27346122444j)*x[2]**o + ((0.855172628588+0.154189227625j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.375291574835+0.27346122444j)*x_ref[2]**o + ((0.855172628588+0.154189227625j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.425869070468+0.647369186611j)*x[2]**o + ((-0.330434238521+0.12165949896j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.425869070468+0.647369186611j)*x_ref[2]**o + ((-0.330434238521+0.12165949896j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.314212251103+0.176159942324j)*x[2]**o + ((0.875884930515+0.0897834505659j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.314212251103+0.176159942324j)*x_ref[2]**o + ((0.875884930515+0.0897834505659j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.123837487891-0.135517256958j)*x[2]**o + ((0.220945372974-0.788118219327j))*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.123837487891-0.135517256958j)*x_ref[2]**o + ((0.220945372974-0.788118219327j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.227474064013+0.87329097221j)*x[2]**o + ((-0.108739707155+0.969440669851j))*x[2]
+            ref[(0, 0, 1, 3)]+=(0.227474064013+0.87329097221j)*x_ref[2]**o + ((-0.108739707155+0.969440669851j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.760965975345+0.0959853563757j)*x[2]**o + ((0.0540494226581+0.665948418791j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.760965975345+0.0959853563757j)*x_ref[2]**o + ((0.0540494226581+0.665948418791j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.0855773454112-0.134302840683j)*x[2]**o + ((-0.743132423012-0.815775202579j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.0855773454112-0.134302840683j)*x_ref[2]**o + ((-0.743132423012-0.815775202579j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(0.149695644452-0.211150097373j)*x[2]**o + ((0.755858267437+0.797947151969j))*x[2]
+            ref[(0, 0, 2, 2)]+=(0.149695644452-0.211150097373j)*x_ref[2]**o + ((0.755858267437+0.797947151969j))*x_ref[2]
+            arg[(0, 0, 2, 3)]+=(-0.448637163424+0.261666151823j)*x[2]**o + ((-0.803803354148+0.887839955518j))*x[2]
+            ref[(0, 0, 2, 3)]+=(-0.448637163424+0.261666151823j)*x_ref[2]**o + ((-0.803803354148+0.887839955518j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.890570820106+0.823785770487j)*x[2]**o + ((0.931152348732+0.451823931774j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.890570820106+0.823785770487j)*x_ref[2]**o + ((0.931152348732+0.451823931774j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.947230804923+0.989799400988j)*x[2]**o + ((0.725296496941+0.854249388226j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.947230804923+0.989799400988j)*x_ref[2]**o + ((0.725296496941+0.854249388226j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.579849439843+0.147930156993j)*x[2]**o + ((-0.704220373671-0.942612267674j))*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.579849439843+0.147930156993j)*x_ref[2]**o + ((-0.704220373671-0.942612267674j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.978250501697-0.782447520599j)*x[2]**o + ((-0.240218175666-0.00656183926078j))*x[2]
+            ref[(0, 1, 0, 3)]+=(0.978250501697-0.782447520599j)*x_ref[2]**o + ((-0.240218175666-0.00656183926078j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.128517047005-0.840045465842j)*x[2]**o + ((-0.215426958267+0.366983537489j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.128517047005-0.840045465842j)*x_ref[2]**o + ((-0.215426958267+0.366983537489j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.55405617787+0.988362531723j)*x[2]**o + ((0.599372575879+0.870716979655j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.55405617787+0.988362531723j)*x_ref[2]**o + ((0.599372575879+0.870716979655j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.0638020289981+0.236734017907j)*x[2]**o + ((-0.0371866060889+0.808751470026j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.0638020289981+0.236734017907j)*x_ref[2]**o + ((-0.0371866060889+0.808751470026j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.28659332104-0.288137003449j)*x[2]**o + ((0.112831207529-0.338584669722j))*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.28659332104-0.288137003449j)*x_ref[2]**o + ((0.112831207529-0.338584669722j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.543355171404+0.59786893333j)*x[2]**o + ((-0.444186473656-0.938513738288j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.543355171404+0.59786893333j)*x_ref[2]**o + ((-0.444186473656-0.938513738288j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.701351643898-0.1418692141j)*x[2]**o + ((-0.615730919433+0.0910774108169j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.701351643898-0.1418692141j)*x_ref[2]**o + ((-0.615730919433+0.0910774108169j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(-0.771490935537+0.904380587134j)*x[2]**o + ((0.530518816472+0.0882233209632j))*x[2]
+            ref[(0, 1, 2, 2)]+=(-0.771490935537+0.904380587134j)*x_ref[2]**o + ((0.530518816472+0.0882233209632j))*x_ref[2]
+            arg[(0, 1, 2, 3)]+=(0.767490233523+0.0555753904606j)*x[2]**o + ((0.973799047816+0.999363448578j))*x[2]
+            ref[(0, 1, 2, 3)]+=(0.767490233523+0.0555753904606j)*x_ref[2]**o + ((0.973799047816+0.999363448578j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.391854245358-0.461580772083j)*x[2]**o + ((-0.74841219765-0.430597777477j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.391854245358-0.461580772083j)*x_ref[2]**o + ((-0.74841219765-0.430597777477j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.511090536102+0.577783415055j)*x[2]**o + ((0.599239339134-0.587063575587j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.511090536102+0.577783415055j)*x_ref[2]**o + ((0.599239339134-0.587063575587j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.814582770685+0.175144811195j)*x[2]**o + ((-0.287124488645+0.723187092055j))*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.814582770685+0.175144811195j)*x_ref[2]**o + ((-0.287124488645+0.723187092055j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.142120833442-0.450771607326j)*x[2]**o + ((-0.977989126513-0.187364373846j))*x[2]
+            ref[(1, 0, 0, 3)]+=(0.142120833442-0.450771607326j)*x_ref[2]**o + ((-0.977989126513-0.187364373846j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.205655710275-0.490533456684j)*x[2]**o + ((0.511565793088-0.226609622629j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.205655710275-0.490533456684j)*x_ref[2]**o + ((0.511565793088-0.226609622629j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.121903672997-0.228234753879j)*x[2]**o + ((-0.4125905588-0.710013082575j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.121903672997-0.228234753879j)*x_ref[2]**o + ((-0.4125905588-0.710013082575j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.409440666462+0.851787782752j)*x[2]**o + ((0.177441201787-0.753582904135j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.409440666462+0.851787782752j)*x_ref[2]**o + ((0.177441201787-0.753582904135j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.821177381025+0.530773353227j)*x[2]**o + ((-0.023064931896+0.137048196304j))*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.821177381025+0.530773353227j)*x_ref[2]**o + ((-0.023064931896+0.137048196304j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.84813079605+0.159666037484j)*x[2]**o + ((-0.853239431613+0.276013643992j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.84813079605+0.159666037484j)*x_ref[2]**o + ((-0.853239431613+0.276013643992j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.303587568323-0.973116382037j)*x[2]**o + ((-0.709724752895-0.935446034321j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.303587568323-0.973116382037j)*x_ref[2]**o + ((-0.709724752895-0.935446034321j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(0.339389834778-0.981887863978j)*x[2]**o + ((0.81166093901-0.391689866353j))*x[2]
+            ref[(1, 0, 2, 2)]+=(0.339389834778-0.981887863978j)*x_ref[2]**o + ((0.81166093901-0.391689866353j))*x_ref[2]
+            arg[(1, 0, 2, 3)]+=(-0.464557167101+0.655803723136j)*x[2]**o + ((-0.543385468778+0.419610412414j))*x[2]
+            ref[(1, 0, 2, 3)]+=(-0.464557167101+0.655803723136j)*x_ref[2]**o + ((-0.543385468778+0.419610412414j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.265578451608-0.747946748729j)*x[2]**o + ((0.435892801461+0.523835039474j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.265578451608-0.747946748729j)*x_ref[2]**o + ((0.435892801461+0.523835039474j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.628135105255+0.73403528421j)*x[2]**o + ((-0.999547514178-0.241090813177j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.628135105255+0.73403528421j)*x_ref[2]**o + ((-0.999547514178-0.241090813177j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.21681513811+0.508761353832j)*x[2]**o + ((0.732530277139-0.113467405558j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.21681513811+0.508761353832j)*x_ref[2]**o + ((0.732530277139-0.113467405558j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.432762008224-0.0311894968876j)*x[2]**o + ((0.392846017797+0.99683688432j))*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.432762008224-0.0311894968876j)*x_ref[2]**o + ((0.392846017797+0.99683688432j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.465950531382-0.197068445884j)*x[2]**o + ((-0.970244314156-0.634343994636j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.465950531382-0.197068445884j)*x_ref[2]**o + ((-0.970244314156-0.634343994636j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.100162262942+0.298942477742j)*x[2]**o + ((0.0331991706953+0.8542351622j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.100162262942+0.298942477742j)*x_ref[2]**o + ((0.0331991706953+0.8542351622j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.452767501133-0.0677515115172j)*x[2]**o + ((-0.0426599772701+0.993022836733j))*x[2]
+            ref[(1, 1, 1, 2)]+=(0.452767501133-0.0677515115172j)*x_ref[2]**o + ((-0.0426599772701+0.993022836733j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(0.57061232776-0.118094215032j)*x[2]**o + ((0.649813244289+0.545797623989j))*x[2]
+            ref[(1, 1, 1, 3)]+=(0.57061232776-0.118094215032j)*x_ref[2]**o + ((0.649813244289+0.545797623989j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.854526432003+0.272152424735j)*x[2]**o + ((-0.646149090755-0.188664975767j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.854526432003+0.272152424735j)*x_ref[2]**o + ((-0.646149090755-0.188664975767j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.377891641509+0.109304724784j)*x[2]**o + ((0.597303377892-0.452997037j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.377891641509+0.109304724784j)*x_ref[2]**o + ((0.597303377892-0.452997037j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.264135051502+0.0296266526787j)*x[2]**o + ((-0.454942007678+0.861317305341j))*x[2]
+            ref[(1, 1, 2, 2)]+=(0.264135051502+0.0296266526787j)*x_ref[2]**o + ((-0.454942007678+0.861317305341j))*x_ref[2]
+            arg[(1, 1, 2, 3)]+=(-0.111837540065-0.0967270085112j)*x[2]**o + ((0.040942356626-0.537721843079j))*x[2]
+            ref[(1, 1, 2, 3)]+=(-0.111837540065-0.0967270085112j)*x_ref[2]**o + ((0.040942356626-0.537721843079j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.847221216819-0.78448686946j)*x[2]**o + ((0.205094742504-0.81127930059j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.847221216819-0.78448686946j)*x_ref[2]**o + ((0.205094742504-0.81127930059j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.383691786308+0.000979011318326j)*x[2]**o + ((0.725204696299+0.302535715788j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.383691786308+0.000979011318326j)*x_ref[2]**o + ((0.725204696299+0.302535715788j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.256417654444+0.767260972892j)*x[2]**o + ((0.645432973825+0.0857170775436j))*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.256417654444+0.767260972892j)*x_ref[2]**o + ((0.645432973825+0.0857170775436j))*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.136715602604-0.996693630007j)*x[2]**o + ((-0.0277488509531-0.0423479119376j))*x[2]
+            ref[(2, 0, 0, 3)]+=(0.136715602604-0.996693630007j)*x_ref[2]**o + ((-0.0277488509531-0.0423479119376j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.599467568595+0.451567275558j)*x[2]**o + ((0.98852907174-0.100004508646j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.599467568595+0.451567275558j)*x_ref[2]**o + ((0.98852907174-0.100004508646j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.128196597704-0.130331404122j)*x[2]**o + ((0.214209046245+0.372191796071j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.128196597704-0.130331404122j)*x_ref[2]**o + ((0.214209046245+0.372191796071j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.855227434809-0.989398738953j)*x[2]**o + ((0.0964861065285-0.893367931884j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.855227434809-0.989398738953j)*x_ref[2]**o + ((0.0964861065285-0.893367931884j))*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(0.657148207409+0.195975069783j)*x[2]**o + ((0.0620766286646-0.725104978766j))*x[2]
+            ref[(2, 0, 1, 3)]+=(0.657148207409+0.195975069783j)*x_ref[2]**o + ((0.0620766286646-0.725104978766j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(0.280094472491+0.250018789362j)*x[2]**o + ((-0.530319398607+0.345317089405j))*x[2]
+            ref[(2, 0, 2, 0)]+=(0.280094472491+0.250018789362j)*x_ref[2]**o + ((-0.530319398607+0.345317089405j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.483144446691-0.97451022418j)*x[2]**o + ((0.963042087053-0.66456021312j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.483144446691-0.97451022418j)*x_ref[2]**o + ((0.963042087053-0.66456021312j))*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(-0.97498534406+0.98997026022j)*x[2]**o + ((0.349456868192+0.523823195688j))*x[2]
+            ref[(2, 0, 2, 2)]+=(-0.97498534406+0.98997026022j)*x_ref[2]**o + ((0.349456868192+0.523823195688j))*x_ref[2]
+            arg[(2, 0, 2, 3)]+=(-0.811544418826-0.21286674646j)*x[2]**o + ((0.809812473522+0.174211117654j))*x[2]
+            ref[(2, 0, 2, 3)]+=(-0.811544418826-0.21286674646j)*x_ref[2]**o + ((0.809812473522+0.174211117654j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.131684298716+0.496145265846j)*x[2]**o + ((-0.117678094727-0.584015892707j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.131684298716+0.496145265846j)*x_ref[2]**o + ((-0.117678094727-0.584015892707j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.233229706832-0.869609359691j)*x[2]**o + ((-0.66556872426+0.225386773127j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.233229706832-0.869609359691j)*x_ref[2]**o + ((-0.66556872426+0.225386773127j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(0.718962093182+0.556420569772j)*x[2]**o + ((-0.618812358506+0.285656269781j))*x[2]
+            ref[(2, 1, 0, 2)]+=(0.718962093182+0.556420569772j)*x_ref[2]**o + ((-0.618812358506+0.285656269781j))*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.131999219052+0.795068813913j)*x[2]**o + ((-0.126690724036+0.851176133758j))*x[2]
+            ref[(2, 1, 0, 3)]+=(0.131999219052+0.795068813913j)*x_ref[2]**o + ((-0.126690724036+0.851176133758j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.727101994239+0.409465516688j)*x[2]**o + ((-0.799427968758-0.402639635147j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.727101994239+0.409465516688j)*x_ref[2]**o + ((-0.799427968758-0.402639635147j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.898367474404-0.902990602371j)*x[2]**o + ((-0.552700769193+0.783311022013j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.898367474404-0.902990602371j)*x_ref[2]**o + ((-0.552700769193+0.783311022013j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.551974759665+0.219019588974j)*x[2]**o + ((0.120186317367+0.383043403427j))*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.551974759665+0.219019588974j)*x_ref[2]**o + ((0.120186317367+0.383043403427j))*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(0.21737421708+0.376723749484j)*x[2]**o + ((0.542459872549-0.352314178042j))*x[2]
+            ref[(2, 1, 1, 3)]+=(0.21737421708+0.376723749484j)*x_ref[2]**o + ((0.542459872549-0.352314178042j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.157210278585-0.480924278623j)*x[2]**o + ((-0.451939256889+0.105470602284j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.157210278585-0.480924278623j)*x_ref[2]**o + ((-0.451939256889+0.105470602284j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.000368492627722-0.464916667496j)*x[2]**o + ((0.741700115191-0.821201720652j))*x[2]
+            ref[(2, 1, 2, 1)]+=(0.000368492627722-0.464916667496j)*x_ref[2]**o + ((0.741700115191-0.821201720652j))*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(0.627199972606+0.87817826991j)*x[2]**o + ((0.00362469836327-0.297347087533j))*x[2]
+            ref[(2, 1, 2, 2)]+=(0.627199972606+0.87817826991j)*x_ref[2]**o + ((0.00362469836327-0.297347087533j))*x_ref[2]
+            arg[(2, 1, 2, 3)]+=(-0.65838281762+0.523809850593j)*x[2]**o + ((0.994876522078+0.794118778229j))*x[2]
+            ref[(2, 1, 2, 3)]+=(-0.65838281762+0.523809850593j)*x_ref[2]**o + ((0.994876522078+0.794118778229j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.388832048689+0.395318021161j)*x[0]**o + ((0.803477202118+0.0689295273874j))*x[0] + ((0.653293732491+0.77324093256j))*x[1]**o + ((0.581999608098-0.806108257857j))*x[1]
+        ref=(0.388832048689+0.395318021161j)*x_ref[0]**o + ((0.803477202118+0.0689295273874j))*x_ref[0] + ((0.653293732491+0.77324093256j))*x_ref[1]**o + ((0.581999608098-0.806108257857j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.576288223263+0.655368770866j))*x[2]**o + ((-0.329400686467+0.339043013948j))*x[2]
+            ref+=((-0.576288223263+0.655368770866j))*x_ref[2]**o + ((-0.329400686467+0.339043013948j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.509227869764-0.336134305422j)*x[0]**o + ((0.982114410121+0.947623975723j))*x[0] + ((-0.997420491203+0.17365713504j))*x[1]**o + ((0.521050058484-0.233125694123j))*x[1]
+        ref[(0,)]=(-0.509227869764-0.336134305422j)*x_ref[0]**o + ((0.982114410121+0.947623975723j))*x_ref[0] + ((-0.997420491203+0.17365713504j))*x_ref[1]**o + ((0.521050058484-0.233125694123j))*x_ref[1]
+        arg[(1,)]=(-0.657725741667+0.413833937342j)*x[0]**o + ((-0.723929822995-0.647663971868j))*x[0] + ((-0.700329393142+0.700515816816j))*x[1]**o + ((-0.486658317517+0.525068016129j))*x[1]
+        ref[(1,)]=(-0.657725741667+0.413833937342j)*x_ref[0]**o + ((-0.723929822995-0.647663971868j))*x_ref[0] + ((-0.700329393142+0.700515816816j))*x_ref[1]**o + ((-0.486658317517+0.525068016129j))*x_ref[1]
+        arg[(2,)]=(0.920591747972+0.795512642532j)*x[0]**o + ((0.305408814197+0.830235877928j))*x[0] + ((0.625247995494+0.597192364763j))*x[1]**o + ((0.654395724414-0.661392543364j))*x[1]
+        ref[(2,)]=(0.920591747972+0.795512642532j)*x_ref[0]**o + ((0.305408814197+0.830235877928j))*x_ref[0] + ((0.625247995494+0.597192364763j))*x_ref[1]**o + ((0.654395724414-0.661392543364j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.755352728359+0.778454095897j)*x[2]**o + ((-0.22667270968+0.270776858733j))*x[2]
+            ref[(0,)]+=(-0.755352728359+0.778454095897j)*x_ref[2]**o + ((-0.22667270968+0.270776858733j))*x_ref[2]
+            arg[(1,)]+=(-0.0823272789056+0.311239260593j)*x[2]**o + ((0.00527178890821-0.1072343693j))*x[2]
+            ref[(1,)]+=(-0.0823272789056+0.311239260593j)*x_ref[2]**o + ((0.00527178890821-0.1072343693j))*x_ref[2]
+            arg[(2,)]+=(0.371637760422-0.0449106453835j)*x[2]**o + ((-0.80127852411-0.028455282436j))*x[2]
+            ref[(2,)]+=(0.371637760422-0.0449106453835j)*x_ref[2]**o + ((-0.80127852411-0.028455282436j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2),w_ref)
+        arg[(0, 0)]=(-0.228166980925+0.806046264871j)*x[0]**o + ((0.630358541157-0.0986260452877j))*x[0] + ((-0.983890401086-0.585333588465j))*x[1]**o + ((-0.666563339869-0.893639517816j))*x[1]
+        ref[(0, 0)]=(-0.228166980925+0.806046264871j)*x_ref[0]**o + ((0.630358541157-0.0986260452877j))*x_ref[0] + ((-0.983890401086-0.585333588465j))*x_ref[1]**o + ((-0.666563339869-0.893639517816j))*x_ref[1]
+        arg[(0, 1)]=(-0.177109806967+0.649145936277j)*x[0]**o + ((-0.0307124079264-0.688789984694j))*x[0] + ((0.940980511793-0.46361074956j))*x[1]**o + ((-0.495898748125-0.254448790409j))*x[1]
+        ref[(0, 1)]=(-0.177109806967+0.649145936277j)*x_ref[0]**o + ((-0.0307124079264-0.688789984694j))*x_ref[0] + ((0.940980511793-0.46361074956j))*x_ref[1]**o + ((-0.495898748125-0.254448790409j))*x_ref[1]
+        arg[(1, 0)]=(0.857884307028+0.74666555204j)*x[0]**o + ((-0.715515310057-0.458330392022j))*x[0] + ((0.960725590283-0.258958836224j))*x[1]**o + ((0.761735244212+0.654572838538j))*x[1]
+        ref[(1, 0)]=(0.857884307028+0.74666555204j)*x_ref[0]**o + ((-0.715515310057-0.458330392022j))*x_ref[0] + ((0.960725590283-0.258958836224j))*x_ref[1]**o + ((0.761735244212+0.654572838538j))*x_ref[1]
+        arg[(1, 1)]=(0.742237740971-0.183686607151j)*x[0]**o + ((0.369023736893-0.890513003515j))*x[0] + ((0.216914175263+0.355503398295j))*x[1]**o + ((-0.492995487879+0.993593351711j))*x[1]
+        ref[(1, 1)]=(0.742237740971-0.183686607151j)*x_ref[0]**o + ((0.369023736893-0.890513003515j))*x_ref[0] + ((0.216914175263+0.355503398295j))*x_ref[1]**o + ((-0.492995487879+0.993593351711j))*x_ref[1]
+        arg[(2, 0)]=(-0.0984008375514+0.421780950117j)*x[0]**o + ((-0.654625432371-0.933406054833j))*x[0] + ((-0.421167389011+0.0663414857186j))*x[1]**o + ((0.172484141861+0.145983080351j))*x[1]
+        ref[(2, 0)]=(-0.0984008375514+0.421780950117j)*x_ref[0]**o + ((-0.654625432371-0.933406054833j))*x_ref[0] + ((-0.421167389011+0.0663414857186j))*x_ref[1]**o + ((0.172484141861+0.145983080351j))*x_ref[1]
+        arg[(2, 1)]=(0.326043854379-0.178814936537j)*x[0]**o + ((0.447031698114-0.60752631693j))*x[0] + ((-0.305481429821-0.524065077603j))*x[1]**o + ((0.687572966199-0.626745560348j))*x[1]
+        ref[(2, 1)]=(0.326043854379-0.178814936537j)*x_ref[0]**o + ((0.447031698114-0.60752631693j))*x_ref[0] + ((-0.305481429821-0.524065077603j))*x_ref[1]**o + ((0.687572966199-0.626745560348j))*x_ref[1]
+        arg[(3, 0)]=(-0.805591167825-0.521266030127j)*x[0]**o + ((-0.765727089951-0.776416780842j))*x[0] + ((0.621010111365-0.956792842902j))*x[1]**o + ((-0.881127332634-0.187201845848j))*x[1]
+        ref[(3, 0)]=(-0.805591167825-0.521266030127j)*x_ref[0]**o + ((-0.765727089951-0.776416780842j))*x_ref[0] + ((0.621010111365-0.956792842902j))*x_ref[1]**o + ((-0.881127332634-0.187201845848j))*x_ref[1]
+        arg[(3, 1)]=(-0.511866522853+0.098669934807j)*x[0]**o + ((0.544118927831-0.352825311649j))*x[0] + ((0.957521905498-0.235072905919j))*x[1]**o + ((0.22701949413+0.828716938099j))*x[1]
+        ref[(3, 1)]=(-0.511866522853+0.098669934807j)*x_ref[0]**o + ((0.544118927831-0.352825311649j))*x_ref[0] + ((0.957521905498-0.235072905919j))*x_ref[1]**o + ((0.22701949413+0.828716938099j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.675268763794+0.467792838762j)*x[2]**o + ((0.502447928244-0.708392486562j))*x[2]
+            ref[(0, 0)]+=(0.675268763794+0.467792838762j)*x_ref[2]**o + ((0.502447928244-0.708392486562j))*x_ref[2]
+            arg[(0, 1)]+=(0.617876207977-0.645057423524j)*x[2]**o + ((0.559324261467-0.74717110533j))*x[2]
+            ref[(0, 1)]+=(0.617876207977-0.645057423524j)*x_ref[2]**o + ((0.559324261467-0.74717110533j))*x_ref[2]
+            arg[(1, 0)]+=(-0.0743177945877+0.984716558685j)*x[2]**o + ((-0.0587158859951-0.660653260769j))*x[2]
+            ref[(1, 0)]+=(-0.0743177945877+0.984716558685j)*x_ref[2]**o + ((-0.0587158859951-0.660653260769j))*x_ref[2]
+            arg[(1, 1)]+=(-0.872041408395+0.0668476739942j)*x[2]**o + ((0.132844341254+0.776749190266j))*x[2]
+            ref[(1, 1)]+=(-0.872041408395+0.0668476739942j)*x_ref[2]**o + ((0.132844341254+0.776749190266j))*x_ref[2]
+            arg[(2, 0)]+=(0.13717390247+0.341595538854j)*x[2]**o + ((-0.611947888506+0.775511819341j))*x[2]
+            ref[(2, 0)]+=(0.13717390247+0.341595538854j)*x_ref[2]**o + ((-0.611947888506+0.775511819341j))*x_ref[2]
+            arg[(2, 1)]+=(-0.358774102741+0.276455352376j)*x[2]**o + ((-0.553182074512-0.420910214572j))*x[2]
+            ref[(2, 1)]+=(-0.358774102741+0.276455352376j)*x_ref[2]**o + ((-0.553182074512-0.420910214572j))*x_ref[2]
+            arg[(3, 0)]+=(0.188707417484-0.638810377875j)*x[2]**o + ((-0.0921921806162+0.62449894925j))*x[2]
+            ref[(3, 0)]+=(0.188707417484-0.638810377875j)*x_ref[2]**o + ((-0.0921921806162+0.62449894925j))*x_ref[2]
+            arg[(3, 1)]+=(-0.639642732723+0.280510106428j)*x[2]**o + ((0.489446396605+0.994727808014j))*x[2]
+            ref[(3, 1)]+=(-0.639642732723+0.280510106428j)*x_ref[2]**o + ((0.489446396605+0.994727808014j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=(0.332826913312-0.696364613296j)*x[0]**o + ((0.882050986597+0.0914900779486j))*x[0] + ((-0.0198798336813+0.115260472634j))*x[1]**o + ((-0.611800791024-0.56574257325j))*x[1]
+        ref[(0, 0, 0)]=(0.332826913312-0.696364613296j)*x_ref[0]**o + ((0.882050986597+0.0914900779486j))*x_ref[0] + ((-0.0198798336813+0.115260472634j))*x_ref[1]**o + ((-0.611800791024-0.56574257325j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.378537425205+0.71647411466j)*x[0]**o + ((0.630381978255-0.130903408214j))*x[0] + ((0.0932206115835+0.48175563087j))*x[1]**o + ((0.632192844486+0.937231128989j))*x[1]
+        ref[(0, 0, 1)]=(0.378537425205+0.71647411466j)*x_ref[0]**o + ((0.630381978255-0.130903408214j))*x_ref[0] + ((0.0932206115835+0.48175563087j))*x_ref[1]**o + ((0.632192844486+0.937231128989j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.893043716555+0.721121245583j)*x[0]**o + ((0.440250306208+0.741068673824j))*x[0] + ((-0.713589027935+0.0868023830281j))*x[1]**o + ((0.478467142709+0.0709774018796j))*x[1]
+        ref[(0, 0, 2)]=(0.893043716555+0.721121245583j)*x_ref[0]**o + ((0.440250306208+0.741068673824j))*x_ref[0] + ((-0.713589027935+0.0868023830281j))*x_ref[1]**o + ((0.478467142709+0.0709774018796j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.649784811806-0.263048126615j)*x[0]**o + ((0.904628106618-0.201150656233j))*x[0] + ((0.309206885201-0.220073490639j))*x[1]**o + ((0.217007430248+0.216084908384j))*x[1]
+        ref[(0, 1, 0)]=(0.649784811806-0.263048126615j)*x_ref[0]**o + ((0.904628106618-0.201150656233j))*x_ref[0] + ((0.309206885201-0.220073490639j))*x_ref[1]**o + ((0.217007430248+0.216084908384j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.147814825399+0.486054519682j)*x[0]**o + ((-0.933175443735-0.626113246545j))*x[0] + ((-0.612899730223-0.942122119213j))*x[1]**o + ((-0.100150075075-0.437426686801j))*x[1]
+        ref[(0, 1, 1)]=(-0.147814825399+0.486054519682j)*x_ref[0]**o + ((-0.933175443735-0.626113246545j))*x_ref[0] + ((-0.612899730223-0.942122119213j))*x_ref[1]**o + ((-0.100150075075-0.437426686801j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.710579839734+0.370896409498j)*x[0]**o + ((-0.935260943595-0.273421000812j))*x[0] + ((-0.591940957568-0.477023514741j))*x[1]**o + ((-0.184986089022+0.252481574479j))*x[1]
+        ref[(0, 1, 2)]=(-0.710579839734+0.370896409498j)*x_ref[0]**o + ((-0.935260943595-0.273421000812j))*x_ref[0] + ((-0.591940957568-0.477023514741j))*x_ref[1]**o + ((-0.184986089022+0.252481574479j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.624949231679+0.927886309082j)*x[0]**o + ((-0.201922434546-0.221327272472j))*x[0] + ((-0.339485630921+0.793328130231j))*x[1]**o + ((-0.523323344387-0.67896581541j))*x[1]
+        ref[(1, 0, 0)]=(0.624949231679+0.927886309082j)*x_ref[0]**o + ((-0.201922434546-0.221327272472j))*x_ref[0] + ((-0.339485630921+0.793328130231j))*x_ref[1]**o + ((-0.523323344387-0.67896581541j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.221975580619-0.121747794313j)*x[0]**o + ((0.929649334452-0.934582803318j))*x[0] + ((-0.201803963949-0.773634916598j))*x[1]**o + ((0.516721368114-0.666863265658j))*x[1]
+        ref[(1, 0, 1)]=(0.221975580619-0.121747794313j)*x_ref[0]**o + ((0.929649334452-0.934582803318j))*x_ref[0] + ((-0.201803963949-0.773634916598j))*x_ref[1]**o + ((0.516721368114-0.666863265658j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.26039274383+0.197288271853j)*x[0]**o + ((-0.22944126504+0.595357789287j))*x[0] + ((0.0634884104614-0.855216616677j))*x[1]**o + ((0.275147332127-0.290758485405j))*x[1]
+        ref[(1, 0, 2)]=(0.26039274383+0.197288271853j)*x_ref[0]**o + ((-0.22944126504+0.595357789287j))*x_ref[0] + ((0.0634884104614-0.855216616677j))*x_ref[1]**o + ((0.275147332127-0.290758485405j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.292660039376-0.959082224586j)*x[0]**o + ((0.169197214486+0.285629985255j))*x[0] + ((0.0231757185896-0.837331840601j))*x[1]**o + ((-0.236271052578+0.644833720784j))*x[1]
+        ref[(1, 1, 0)]=(-0.292660039376-0.959082224586j)*x_ref[0]**o + ((0.169197214486+0.285629985255j))*x_ref[0] + ((0.0231757185896-0.837331840601j))*x_ref[1]**o + ((-0.236271052578+0.644833720784j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.24306578213+0.454030308394j)*x[0]**o + ((-0.214351930007-0.649233002846j))*x[0] + ((0.7991328569-0.497385492137j))*x[1]**o + ((-0.482394782718+0.672908417219j))*x[1]
+        ref[(1, 1, 1)]=(0.24306578213+0.454030308394j)*x_ref[0]**o + ((-0.214351930007-0.649233002846j))*x_ref[0] + ((0.7991328569-0.497385492137j))*x_ref[1]**o + ((-0.482394782718+0.672908417219j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.0567134041499+0.883517867168j)*x[0]**o + ((0.182243035287-0.244200680286j))*x[0] + ((0.58683281266+0.942058211676j))*x[1]**o + ((-0.918566676589+0.348335738184j))*x[1]
+        ref[(1, 1, 2)]=(-0.0567134041499+0.883517867168j)*x_ref[0]**o + ((0.182243035287-0.244200680286j))*x_ref[0] + ((0.58683281266+0.942058211676j))*x_ref[1]**o + ((-0.918566676589+0.348335738184j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.0529776026158-0.506588528638j)*x[0]**o + ((-0.32143843946+0.251098312943j))*x[0] + ((0.0371474563213+0.259971365391j))*x[1]**o + ((0.492777337483+0.0307572167156j))*x[1]
+        ref[(2, 0, 0)]=(0.0529776026158-0.506588528638j)*x_ref[0]**o + ((-0.32143843946+0.251098312943j))*x_ref[0] + ((0.0371474563213+0.259971365391j))*x_ref[1]**o + ((0.492777337483+0.0307572167156j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.658828527339-0.122691622084j)*x[0]**o + ((0.934442826141+0.0056369945678j))*x[0] + ((-0.251435129864-0.0341401905343j))*x[1]**o + ((0.66105019486-0.126199885944j))*x[1]
+        ref[(2, 0, 1)]=(0.658828527339-0.122691622084j)*x_ref[0]**o + ((0.934442826141+0.0056369945678j))*x_ref[0] + ((-0.251435129864-0.0341401905343j))*x_ref[1]**o + ((0.66105019486-0.126199885944j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.983140424586+0.474908933267j)*x[0]**o + ((-0.0826604370666-0.118950260186j))*x[0] + ((-0.812523541497+0.951718802617j))*x[1]**o + ((0.201135005253-0.891086141885j))*x[1]
+        ref[(2, 0, 2)]=(0.983140424586+0.474908933267j)*x_ref[0]**o + ((-0.0826604370666-0.118950260186j))*x_ref[0] + ((-0.812523541497+0.951718802617j))*x_ref[1]**o + ((0.201135005253-0.891086141885j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.150929711168-0.871998458239j)*x[0]**o + ((-0.882522529214-0.908436343304j))*x[0] + ((-0.654567137217-0.261162746673j))*x[1]**o + ((-0.543697152194-0.578955228231j))*x[1]
+        ref[(2, 1, 0)]=(-0.150929711168-0.871998458239j)*x_ref[0]**o + ((-0.882522529214-0.908436343304j))*x_ref[0] + ((-0.654567137217-0.261162746673j))*x_ref[1]**o + ((-0.543697152194-0.578955228231j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.380901224229+0.149402774599j)*x[0]**o + ((0.191698295944+0.0115084586009j))*x[0] + ((-0.719218542661-0.182593782288j))*x[1]**o + ((0.282141220986-0.875493913428j))*x[1]
+        ref[(2, 1, 1)]=(-0.380901224229+0.149402774599j)*x_ref[0]**o + ((0.191698295944+0.0115084586009j))*x_ref[0] + ((-0.719218542661-0.182593782288j))*x_ref[1]**o + ((0.282141220986-0.875493913428j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.865142671438+0.706445950155j)*x[0]**o + ((-0.996773477839-0.211641509057j))*x[0] + ((-0.574265124299-0.425609556178j))*x[1]**o + ((-0.620670306323-0.390189867482j))*x[1]
+        ref[(2, 1, 2)]=(0.865142671438+0.706445950155j)*x_ref[0]**o + ((-0.996773477839-0.211641509057j))*x_ref[0] + ((-0.574265124299-0.425609556178j))*x_ref[1]**o + ((-0.620670306323-0.390189867482j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.714411863529+0.202816028357j)*x[0]**o + ((-0.146315042419-0.197593061284j))*x[0] + ((-0.876253727918-0.234834356233j))*x[1]**o + ((-0.904530657165-0.218610782262j))*x[1]
+        ref[(3, 0, 0)]=(0.714411863529+0.202816028357j)*x_ref[0]**o + ((-0.146315042419-0.197593061284j))*x_ref[0] + ((-0.876253727918-0.234834356233j))*x_ref[1]**o + ((-0.904530657165-0.218610782262j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.115871609973+0.822356217023j)*x[0]**o + ((0.044452386868-0.111650731628j))*x[0] + ((-0.305108715815+0.253177366171j))*x[1]**o + ((0.774465919384-0.534801109239j))*x[1]
+        ref[(3, 0, 1)]=(-0.115871609973+0.822356217023j)*x_ref[0]**o + ((0.044452386868-0.111650731628j))*x_ref[0] + ((-0.305108715815+0.253177366171j))*x_ref[1]**o + ((0.774465919384-0.534801109239j))*x_ref[1]
+        arg[(3, 0, 2)]=(-0.4961528311+0.518886421031j)*x[0]**o + ((0.799866108524-0.637395687461j))*x[0] + ((0.0510751815311-0.622968598753j))*x[1]**o + ((0.00816078135757+0.861674973442j))*x[1]
+        ref[(3, 0, 2)]=(-0.4961528311+0.518886421031j)*x_ref[0]**o + ((0.799866108524-0.637395687461j))*x_ref[0] + ((0.0510751815311-0.622968598753j))*x_ref[1]**o + ((0.00816078135757+0.861674973442j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.942783788904-0.627432901511j)*x[0]**o + ((-0.866202956716-0.0387379311776j))*x[0] + ((0.15037001542+0.778847825878j))*x[1]**o + ((0.358529042119-0.767238725373j))*x[1]
+        ref[(3, 1, 0)]=(-0.942783788904-0.627432901511j)*x_ref[0]**o + ((-0.866202956716-0.0387379311776j))*x_ref[0] + ((0.15037001542+0.778847825878j))*x_ref[1]**o + ((0.358529042119-0.767238725373j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.205073584792-0.60271132391j)*x[0]**o + ((0.58607254914+0.870759051694j))*x[0] + ((-0.405083787607+0.897618912626j))*x[1]**o + ((0.730572226298-0.898263921276j))*x[1]
+        ref[(3, 1, 1)]=(-0.205073584792-0.60271132391j)*x_ref[0]**o + ((0.58607254914+0.870759051694j))*x_ref[0] + ((-0.405083787607+0.897618912626j))*x_ref[1]**o + ((0.730572226298-0.898263921276j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.288894726105-0.747191595439j)*x[0]**o + ((-0.900480298309-0.730951117846j))*x[0] + ((-0.519736439292+0.764163604932j))*x[1]**o + ((0.158891906192+0.441338475346j))*x[1]
+        ref[(3, 1, 2)]=(-0.288894726105-0.747191595439j)*x_ref[0]**o + ((-0.900480298309-0.730951117846j))*x_ref[0] + ((-0.519736439292+0.764163604932j))*x_ref[1]**o + ((0.158891906192+0.441338475346j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.867309623981-0.47585169936j)*x[2]**o + ((0.179639743529+0.159316510104j))*x[2]
+            ref[(0, 0, 0)]+=(-0.867309623981-0.47585169936j)*x_ref[2]**o + ((0.179639743529+0.159316510104j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.452621881858-0.57610663815j)*x[2]**o + ((-0.556648666086+0.302131830888j))*x[2]
+            ref[(0, 0, 1)]+=(0.452621881858-0.57610663815j)*x_ref[2]**o + ((-0.556648666086+0.302131830888j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.0448819573447-0.432431779451j)*x[2]**o + ((0.867185774449-0.911049747246j))*x[2]
+            ref[(0, 0, 2)]+=(0.0448819573447-0.432431779451j)*x_ref[2]**o + ((0.867185774449-0.911049747246j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.917189754544-0.589842261776j)*x[2]**o + ((0.119096921822+0.277264738321j))*x[2]
+            ref[(0, 1, 0)]+=(0.917189754544-0.589842261776j)*x_ref[2]**o + ((0.119096921822+0.277264738321j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.122753935374+0.33926356125j)*x[2]**o + ((-0.338158892566-0.428759828997j))*x[2]
+            ref[(0, 1, 1)]+=(-0.122753935374+0.33926356125j)*x_ref[2]**o + ((-0.338158892566-0.428759828997j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.282994648701-0.134897283961j)*x[2]**o + ((-0.370294245625+0.195518533187j))*x[2]
+            ref[(0, 1, 2)]+=(-0.282994648701-0.134897283961j)*x_ref[2]**o + ((-0.370294245625+0.195518533187j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.56185026228+0.485203209598j)*x[2]**o + ((0.321440479046+0.966935934051j))*x[2]
+            ref[(1, 0, 0)]+=(0.56185026228+0.485203209598j)*x_ref[2]**o + ((0.321440479046+0.966935934051j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.97798602826+0.0148088194159j)*x[2]**o + ((-0.538213169748-0.532156236089j))*x[2]
+            ref[(1, 0, 1)]+=(0.97798602826+0.0148088194159j)*x_ref[2]**o + ((-0.538213169748-0.532156236089j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.242717360926-0.226525336061j)*x[2]**o + ((0.633712965716-0.771131535872j))*x[2]
+            ref[(1, 0, 2)]+=(-0.242717360926-0.226525336061j)*x_ref[2]**o + ((0.633712965716-0.771131535872j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.0117766015855+0.307983426844j)*x[2]**o + ((-0.246435159344-0.744751924692j))*x[2]
+            ref[(1, 1, 0)]+=(0.0117766015855+0.307983426844j)*x_ref[2]**o + ((-0.246435159344-0.744751924692j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.452917859617-0.629004809767j)*x[2]**o + ((0.41536498192-0.600292518375j))*x[2]
+            ref[(1, 1, 1)]+=(-0.452917859617-0.629004809767j)*x_ref[2]**o + ((0.41536498192-0.600292518375j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.346859452314-0.28944240934j)*x[2]**o + ((0.707110671496-0.962901559833j))*x[2]
+            ref[(1, 1, 2)]+=(0.346859452314-0.28944240934j)*x_ref[2]**o + ((0.707110671496-0.962901559833j))*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.673085001755-0.387343859268j)*x[2]**o + ((0.56030042649-0.0379959224285j))*x[2]
+            ref[(2, 0, 0)]+=(-0.673085001755-0.387343859268j)*x_ref[2]**o + ((0.56030042649-0.0379959224285j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.513317956806+0.822374188146j)*x[2]**o + ((-0.24976283189+0.0165794344625j))*x[2]
+            ref[(2, 0, 1)]+=(0.513317956806+0.822374188146j)*x_ref[2]**o + ((-0.24976283189+0.0165794344625j))*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.0667763060926+0.229047071305j)*x[2]**o + ((-0.168055415775-0.512614753952j))*x[2]
+            ref[(2, 0, 2)]+=(-0.0667763060926+0.229047071305j)*x_ref[2]**o + ((-0.168055415775-0.512614753952j))*x_ref[2]
+            arg[(2, 1, 0)]+=(0.970032801736-0.303996108346j)*x[2]**o + ((0.0611001954091-0.15907599028j))*x[2]
+            ref[(2, 1, 0)]+=(0.970032801736-0.303996108346j)*x_ref[2]**o + ((0.0611001954091-0.15907599028j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.135915306615-0.898364927951j)*x[2]**o + ((-0.205457942681-0.312411153623j))*x[2]
+            ref[(2, 1, 1)]+=(0.135915306615-0.898364927951j)*x_ref[2]**o + ((-0.205457942681-0.312411153623j))*x_ref[2]
+            arg[(2, 1, 2)]+=(0.0133085206343+0.964901094535j)*x[2]**o + ((0.336751560644+0.925137153965j))*x[2]
+            ref[(2, 1, 2)]+=(0.0133085206343+0.964901094535j)*x_ref[2]**o + ((0.336751560644+0.925137153965j))*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.376111131185-0.987622420544j)*x[2]**o + ((0.884612058764-0.536336235857j))*x[2]
+            ref[(3, 0, 0)]+=(-0.376111131185-0.987622420544j)*x_ref[2]**o + ((0.884612058764-0.536336235857j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.549833991534-0.681290702172j)*x[2]**o + ((0.955845633354-0.9996061521j))*x[2]
+            ref[(3, 0, 1)]+=(0.549833991534-0.681290702172j)*x_ref[2]**o + ((0.955845633354-0.9996061521j))*x_ref[2]
+            arg[(3, 0, 2)]+=(0.612605301755-0.74212627755j)*x[2]**o + ((-0.0527871844718-0.120639788137j))*x[2]
+            ref[(3, 0, 2)]+=(0.612605301755-0.74212627755j)*x_ref[2]**o + ((-0.0527871844718-0.120639788137j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.0985444413513+0.052516452829j)*x[2]**o + ((0.4784917297+0.0802080731806j))*x[2]
+            ref[(3, 1, 0)]+=(-0.0985444413513+0.052516452829j)*x_ref[2]**o + ((0.4784917297+0.0802080731806j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.208110657713+0.367362536712j)*x[2]**o + ((0.481319973252+0.947975010738j))*x[2]
+            ref[(3, 1, 1)]+=(0.208110657713+0.367362536712j)*x_ref[2]**o + ((0.481319973252+0.947975010738j))*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.75728521373-0.917668536319j)*x[2]**o + ((-0.969642925606-0.985926629933j))*x[2]
+            ref[(3, 1, 2)]+=(-0.75728521373-0.917668536319j)*x_ref[2]**o + ((-0.969642925606-0.985926629933j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3, 2),w)
+        ref = Data(0,(4, 2, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.553402580285-0.113006957524j)*x[0]**o + ((0.615002051784-0.899413326536j))*x[0] + ((0.884433998355-0.977848084335j))*x[1]**o + ((-0.520301913053-0.447597009599j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.553402580285-0.113006957524j)*x_ref[0]**o + ((0.615002051784-0.899413326536j))*x_ref[0] + ((0.884433998355-0.977848084335j))*x_ref[1]**o + ((-0.520301913053-0.447597009599j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.0547255545444+0.0182285497293j)*x[0]**o + ((0.930604491391-0.47115934356j))*x[0] + ((-0.442244248992-0.875507000594j))*x[1]**o + ((0.956127469648-0.051080156728j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.0547255545444+0.0182285497293j)*x_ref[0]**o + ((0.930604491391-0.47115934356j))*x_ref[0] + ((-0.442244248992-0.875507000594j))*x_ref[1]**o + ((0.956127469648-0.051080156728j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.2533377926-0.272118498383j)*x[0]**o + ((-0.0998555068364-0.193813899218j))*x[0] + ((-0.027953953831-0.416430370827j))*x[1]**o + ((0.560620673591-0.252349625091j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.2533377926-0.272118498383j)*x_ref[0]**o + ((-0.0998555068364-0.193813899218j))*x_ref[0] + ((-0.027953953831-0.416430370827j))*x_ref[1]**o + ((0.560620673591-0.252349625091j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.282519457034-0.85781615624j)*x[0]**o + ((0.674355424141-0.153904059136j))*x[0] + ((0.916232460034-0.276743498784j))*x[1]**o + ((0.394664128113-0.21785336741j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.282519457034-0.85781615624j)*x_ref[0]**o + ((0.674355424141-0.153904059136j))*x_ref[0] + ((0.916232460034-0.276743498784j))*x_ref[1]**o + ((0.394664128113-0.21785336741j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.153921285921-0.447646894978j)*x[0]**o + ((0.270611861197-0.647289820152j))*x[0] + ((-0.616654609661+0.00104912920874j))*x[1]**o + ((-0.984665255965-0.53744994769j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.153921285921-0.447646894978j)*x_ref[0]**o + ((0.270611861197-0.647289820152j))*x_ref[0] + ((-0.616654609661+0.00104912920874j))*x_ref[1]**o + ((-0.984665255965-0.53744994769j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.967735873154-0.871311201793j)*x[0]**o + ((-0.593980277035+0.84663199211j))*x[0] + ((0.0885108018062-0.0747481084147j))*x[1]**o + ((0.792186386869-0.47808706905j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.967735873154-0.871311201793j)*x_ref[0]**o + ((-0.593980277035+0.84663199211j))*x_ref[0] + ((0.0885108018062-0.0747481084147j))*x_ref[1]**o + ((0.792186386869-0.47808706905j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.00212642825781-0.458519792174j)*x[0]**o + ((-0.176465175665+0.997062121457j))*x[0] + ((0.873198675094-0.914797057563j))*x[1]**o + ((-0.636665802298-0.408713187086j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.00212642825781-0.458519792174j)*x_ref[0]**o + ((-0.176465175665+0.997062121457j))*x_ref[0] + ((0.873198675094-0.914797057563j))*x_ref[1]**o + ((-0.636665802298-0.408713187086j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.798561789243+0.630890808056j)*x[0]**o + ((0.350993573334-0.726104614797j))*x[0] + ((0.145102830413+0.263138994881j))*x[1]**o + ((-0.0416873432365+0.348831627381j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.798561789243+0.630890808056j)*x_ref[0]**o + ((0.350993573334-0.726104614797j))*x_ref[0] + ((0.145102830413+0.263138994881j))*x_ref[1]**o + ((-0.0416873432365+0.348831627381j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.278502690345+0.413801085351j)*x[0]**o + ((0.31178503599+0.351028543597j))*x[0] + ((-0.549449363513+0.825016363242j))*x[1]**o + ((0.747635189548+0.23672582688j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.278502690345+0.413801085351j)*x_ref[0]**o + ((0.31178503599+0.351028543597j))*x_ref[0] + ((-0.549449363513+0.825016363242j))*x_ref[1]**o + ((0.747635189548+0.23672582688j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.25400296726-0.248358088742j)*x[0]**o + ((0.27363379208-0.444613408104j))*x[0] + ((-0.667926089128+0.378776586667j))*x[1]**o + ((0.34117160706+0.0040592592691j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.25400296726-0.248358088742j)*x_ref[0]**o + ((0.27363379208-0.444613408104j))*x_ref[0] + ((-0.667926089128+0.378776586667j))*x_ref[1]**o + ((0.34117160706+0.0040592592691j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.699595036328+0.0652508330058j)*x[0]**o + ((-0.617911076408-0.700690962731j))*x[0] + ((-0.0751241950318-0.881442654714j))*x[1]**o + ((-0.974444994488+0.39693544716j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.699595036328+0.0652508330058j)*x_ref[0]**o + ((-0.617911076408-0.700690962731j))*x_ref[0] + ((-0.0751241950318-0.881442654714j))*x_ref[1]**o + ((-0.974444994488+0.39693544716j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.952308795164+0.424380501441j)*x[0]**o + ((-0.193704582949+0.822911680286j))*x[0] + ((0.0434584968017+0.38308973364j))*x[1]**o + ((0.792179768618-0.293595096665j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.952308795164+0.424380501441j)*x_ref[0]**o + ((-0.193704582949+0.822911680286j))*x_ref[0] + ((0.0434584968017+0.38308973364j))*x_ref[1]**o + ((0.792179768618-0.293595096665j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.165458290966-0.251088659057j)*x[0]**o + ((0.495208148376-0.158877061473j))*x[0] + ((-0.687033917098+0.118916299604j))*x[1]**o + ((0.744916058419+0.690243099654j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.165458290966-0.251088659057j)*x_ref[0]**o + ((0.495208148376-0.158877061473j))*x_ref[0] + ((-0.687033917098+0.118916299604j))*x_ref[1]**o + ((0.744916058419+0.690243099654j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.326453488574-0.0677534597234j)*x[0]**o + ((-0.498003387053-0.394349095566j))*x[0] + ((0.0372385993141-0.24239195189j))*x[1]**o + ((0.86448292721-0.856366431793j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.326453488574-0.0677534597234j)*x_ref[0]**o + ((-0.498003387053-0.394349095566j))*x_ref[0] + ((0.0372385993141-0.24239195189j))*x_ref[1]**o + ((0.86448292721-0.856366431793j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.977025911584-0.0369185937075j)*x[0]**o + ((-0.752950502244-0.0503475175633j))*x[0] + ((0.359597280642-0.622899716612j))*x[1]**o + ((0.175039036807+0.774415867464j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.977025911584-0.0369185937075j)*x_ref[0]**o + ((-0.752950502244-0.0503475175633j))*x_ref[0] + ((0.359597280642-0.622899716612j))*x_ref[1]**o + ((0.175039036807+0.774415867464j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.010955433693-0.324350527983j)*x[0]**o + ((-0.985680432295+0.216228130573j))*x[0] + ((0.693273862896+0.868374769463j))*x[1]**o + ((0.575198544261-0.667337689049j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.010955433693-0.324350527983j)*x_ref[0]**o + ((-0.985680432295+0.216228130573j))*x_ref[0] + ((0.693273862896+0.868374769463j))*x_ref[1]**o + ((0.575198544261-0.667337689049j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.963053790624-0.609664606399j)*x[0]**o + ((-0.583366608249-0.320182534981j))*x[0] + ((-0.998868499838+0.414044598504j))*x[1]**o + ((-0.369361662238+0.452060203999j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.963053790624-0.609664606399j)*x_ref[0]**o + ((-0.583366608249-0.320182534981j))*x_ref[0] + ((-0.998868499838+0.414044598504j))*x_ref[1]**o + ((-0.369361662238+0.452060203999j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.0033347667723-0.882155550178j)*x[0]**o + ((-0.365416579224+0.827601482477j))*x[0] + ((-0.0652610471413-0.319061249609j))*x[1]**o + ((0.720757616554+0.180260361532j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.0033347667723-0.882155550178j)*x_ref[0]**o + ((-0.365416579224+0.827601482477j))*x_ref[0] + ((-0.0652610471413-0.319061249609j))*x_ref[1]**o + ((0.720757616554+0.180260361532j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.738782946726+0.831361044679j)*x[0]**o + ((0.737517338306+0.76195528257j))*x[0] + ((-0.684206498152+0.226951557245j))*x[1]**o + ((0.869029003193-0.860159108j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.738782946726+0.831361044679j)*x_ref[0]**o + ((0.737517338306+0.76195528257j))*x_ref[0] + ((-0.684206498152+0.226951557245j))*x_ref[1]**o + ((0.869029003193-0.860159108j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.861995938089+0.031404733018j)*x[0]**o + ((0.145193460697+0.518819485446j))*x[0] + ((-0.497242426345-0.111574170322j))*x[1]**o + ((0.32248867105+0.834816371604j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.861995938089+0.031404733018j)*x_ref[0]**o + ((0.145193460697+0.518819485446j))*x_ref[0] + ((-0.497242426345-0.111574170322j))*x_ref[1]**o + ((0.32248867105+0.834816371604j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.182418362452+0.50938203188j)*x[0]**o + ((0.87496657697-0.0216291203238j))*x[0] + ((0.0551074073761+0.400856425146j))*x[1]**o + ((-0.0316633316623-0.902649089588j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.182418362452+0.50938203188j)*x_ref[0]**o + ((0.87496657697-0.0216291203238j))*x_ref[0] + ((0.0551074073761+0.400856425146j))*x_ref[1]**o + ((-0.0316633316623-0.902649089588j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.08252552047-0.463790365269j)*x[0]**o + ((0.104287434503-0.0396320920707j))*x[0] + ((-0.199860760943-0.0833761503243j))*x[1]**o + ((0.752177506163-0.323184436033j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.08252552047-0.463790365269j)*x_ref[0]**o + ((0.104287434503-0.0396320920707j))*x_ref[0] + ((-0.199860760943-0.0833761503243j))*x_ref[1]**o + ((0.752177506163-0.323184436033j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(-0.614381783691-0.462825925128j)*x[0]**o + ((0.250749857743+0.551856426611j))*x[0] + ((-0.365757122145+0.355694864263j))*x[1]**o + ((0.76779652241+0.311592052188j))*x[1]
+        ref[(1, 1, 2, 0)]=(-0.614381783691-0.462825925128j)*x_ref[0]**o + ((0.250749857743+0.551856426611j))*x_ref[0] + ((-0.365757122145+0.355694864263j))*x_ref[1]**o + ((0.76779652241+0.311592052188j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.201043263292-0.91708734209j)*x[0]**o + ((-0.863773444647+0.585063957868j))*x[0] + ((-0.695185633919-0.368069393637j))*x[1]**o + ((0.656230208057-0.975570280555j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.201043263292-0.91708734209j)*x_ref[0]**o + ((-0.863773444647+0.585063957868j))*x_ref[0] + ((-0.695185633919-0.368069393637j))*x_ref[1]**o + ((0.656230208057-0.975570280555j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.00987879446941+0.399086443593j)*x[0]**o + ((-0.662441583074+0.965863875348j))*x[0] + ((0.505334767683+0.107722938215j))*x[1]**o + ((0.890984756052-0.344412003732j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.00987879446941+0.399086443593j)*x_ref[0]**o + ((-0.662441583074+0.965863875348j))*x_ref[0] + ((0.505334767683+0.107722938215j))*x_ref[1]**o + ((0.890984756052-0.344412003732j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.321525872757-0.605455790999j)*x[0]**o + ((0.52140997478-0.690889959887j))*x[0] + ((-0.203087806987+0.335288578292j))*x[1]**o + ((0.506499858907+0.632764250136j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.321525872757-0.605455790999j)*x_ref[0]**o + ((0.52140997478-0.690889959887j))*x_ref[0] + ((-0.203087806987+0.335288578292j))*x_ref[1]**o + ((0.506499858907+0.632764250136j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.552787100563-0.995719479479j)*x[0]**o + ((-0.951314335858-0.9386007345j))*x[0] + ((0.573750843507-0.107810593791j))*x[1]**o + ((-0.711922412275+0.136518368201j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.552787100563-0.995719479479j)*x_ref[0]**o + ((-0.951314335858-0.9386007345j))*x_ref[0] + ((0.573750843507-0.107810593791j))*x_ref[1]**o + ((-0.711922412275+0.136518368201j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.293546811379-0.793880569291j)*x[0]**o + ((0.98114818136-0.0361316681114j))*x[0] + ((-0.838841453203+0.366606012543j))*x[1]**o + ((0.331347513822+0.230194925105j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.293546811379-0.793880569291j)*x_ref[0]**o + ((0.98114818136-0.0361316681114j))*x_ref[0] + ((-0.838841453203+0.366606012543j))*x_ref[1]**o + ((0.331347513822+0.230194925105j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.617690412349-0.781711241227j)*x[0]**o + ((-0.797000442744+0.231038836502j))*x[0] + ((-0.520811085723-0.312417650176j))*x[1]**o + ((0.261839989121-0.727624199882j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.617690412349-0.781711241227j)*x_ref[0]**o + ((-0.797000442744+0.231038836502j))*x_ref[0] + ((-0.520811085723-0.312417650176j))*x_ref[1]**o + ((0.261839989121-0.727624199882j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.701786408017+0.926214989926j)*x[0]**o + ((0.00963331421598+0.17631517753j))*x[0] + ((0.872098058766+0.237141919686j))*x[1]**o + ((0.504317182884-0.278729661656j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.701786408017+0.926214989926j)*x_ref[0]**o + ((0.00963331421598+0.17631517753j))*x_ref[0] + ((0.872098058766+0.237141919686j))*x_ref[1]**o + ((0.504317182884-0.278729661656j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.132129594761+0.183546990251j)*x[0]**o + ((-0.233702837923+0.316594299163j))*x[0] + ((-0.958748343833+0.391220404194j))*x[1]**o + ((0.737637966558+0.89724484658j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.132129594761+0.183546990251j)*x_ref[0]**o + ((-0.233702837923+0.316594299163j))*x_ref[0] + ((-0.958748343833+0.391220404194j))*x_ref[1]**o + ((0.737637966558+0.89724484658j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.924598805022+0.306000959802j)*x[0]**o + ((0.434123735596-0.131908102056j))*x[0] + ((-0.459698410573+0.468200940863j))*x[1]**o + ((-0.374728504875+0.73212510974j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.924598805022+0.306000959802j)*x_ref[0]**o + ((0.434123735596-0.131908102056j))*x_ref[0] + ((-0.459698410573+0.468200940863j))*x_ref[1]**o + ((-0.374728504875+0.73212510974j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.174252359612+0.473784283894j)*x[0]**o + ((-0.789522010203-0.595164757226j))*x[0] + ((-0.299495598366+0.242345876417j))*x[1]**o + ((-0.362610678807+0.0187999614402j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.174252359612+0.473784283894j)*x_ref[0]**o + ((-0.789522010203-0.595164757226j))*x_ref[0] + ((-0.299495598366+0.242345876417j))*x_ref[1]**o + ((-0.362610678807+0.0187999614402j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.372431149744-0.775710303405j)*x[0]**o + ((-0.291904967106-0.458588292661j))*x[0] + ((0.37559131692+0.562290208107j))*x[1]**o + ((-0.546021859922-0.621990246801j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.372431149744-0.775710303405j)*x_ref[0]**o + ((-0.291904967106-0.458588292661j))*x_ref[0] + ((0.37559131692+0.562290208107j))*x_ref[1]**o + ((-0.546021859922-0.621990246801j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(-0.458408690997+0.0791294754544j)*x[0]**o + ((-0.395500107833+0.171603325314j))*x[0] + ((0.286390935246+0.785183077857j))*x[1]**o + ((0.095303772595-0.783687281929j))*x[1]
+        ref[(2, 1, 2, 0)]=(-0.458408690997+0.0791294754544j)*x_ref[0]**o + ((-0.395500107833+0.171603325314j))*x_ref[0] + ((0.286390935246+0.785183077857j))*x_ref[1]**o + ((0.095303772595-0.783687281929j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.993166419154+0.238046320038j)*x[0]**o + ((-0.0893408145695-0.0405739116028j))*x[0] + ((-0.638108940976-0.458235453962j))*x[1]**o + ((-0.0324292333572+0.599480085735j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.993166419154+0.238046320038j)*x_ref[0]**o + ((-0.0893408145695-0.0405739116028j))*x_ref[0] + ((-0.638108940976-0.458235453962j))*x_ref[1]**o + ((-0.0324292333572+0.599480085735j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.48068468061+0.820518973899j)*x[0]**o + ((0.648298693782+0.977333348773j))*x[0] + ((-0.314962876344-0.0408580960667j))*x[1]**o + ((0.685261923291-0.378070554192j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.48068468061+0.820518973899j)*x_ref[0]**o + ((0.648298693782+0.977333348773j))*x_ref[0] + ((-0.314962876344-0.0408580960667j))*x_ref[1]**o + ((0.685261923291-0.378070554192j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.0333244546998-0.197303609494j)*x[0]**o + ((-0.147035772804+0.808400898732j))*x[0] + ((0.5639358586+0.711129826494j))*x[1]**o + ((-0.11538594826+0.688300012597j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.0333244546998-0.197303609494j)*x_ref[0]**o + ((-0.147035772804+0.808400898732j))*x_ref[0] + ((0.5639358586+0.711129826494j))*x_ref[1]**o + ((-0.11538594826+0.688300012597j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.454901552918-0.772676608666j)*x[0]**o + ((0.380658885261-0.910390956551j))*x[0] + ((0.632828981985-0.170148699689j))*x[1]**o + ((-0.0758631515236+0.535133632976j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.454901552918-0.772676608666j)*x_ref[0]**o + ((0.380658885261-0.910390956551j))*x_ref[0] + ((0.632828981985-0.170148699689j))*x_ref[1]**o + ((-0.0758631515236+0.535133632976j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(-0.119582915971+0.446404735772j)*x[0]**o + ((-0.135318796754+0.231274735937j))*x[0] + ((-0.127683576311-0.728406713502j))*x[1]**o + ((-0.281768231925+0.223852532013j))*x[1]
+        ref[(3, 0, 1, 1)]=(-0.119582915971+0.446404735772j)*x_ref[0]**o + ((-0.135318796754+0.231274735937j))*x_ref[0] + ((-0.127683576311-0.728406713502j))*x_ref[1]**o + ((-0.281768231925+0.223852532013j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(-0.586691115737-0.879613019199j)*x[0]**o + ((0.392694478973+0.73826972011j))*x[0] + ((-0.414678158914+0.27095388562j))*x[1]**o + ((0.373834174603-0.275395118983j))*x[1]
+        ref[(3, 0, 2, 0)]=(-0.586691115737-0.879613019199j)*x_ref[0]**o + ((0.392694478973+0.73826972011j))*x_ref[0] + ((-0.414678158914+0.27095388562j))*x_ref[1]**o + ((0.373834174603-0.275395118983j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(0.756643883221-0.0767601476479j)*x[0]**o + ((-0.545594544043-0.66997494645j))*x[0] + ((0.319262408242+0.73064000667j))*x[1]**o + ((0.748092387102+0.0745883317513j))*x[1]
+        ref[(3, 0, 2, 1)]=(0.756643883221-0.0767601476479j)*x_ref[0]**o + ((-0.545594544043-0.66997494645j))*x_ref[0] + ((0.319262408242+0.73064000667j))*x_ref[1]**o + ((0.748092387102+0.0745883317513j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.240466290321-0.645837756942j)*x[0]**o + ((0.120133778602+0.406364805498j))*x[0] + ((0.900931104328+0.850187823018j))*x[1]**o + ((-0.468268688608-0.452422315132j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.240466290321-0.645837756942j)*x_ref[0]**o + ((0.120133778602+0.406364805498j))*x_ref[0] + ((0.900931104328+0.850187823018j))*x_ref[1]**o + ((-0.468268688608-0.452422315132j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.163975183116-0.1781619834j)*x[0]**o + ((-0.166614110058+0.747449743864j))*x[0] + ((-0.0232537416629-0.91909871566j))*x[1]**o + ((-0.982628489436+0.748084530779j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.163975183116-0.1781619834j)*x_ref[0]**o + ((-0.166614110058+0.747449743864j))*x_ref[0] + ((-0.0232537416629-0.91909871566j))*x_ref[1]**o + ((-0.982628489436+0.748084530779j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(-0.398230659368-0.251354151662j)*x[0]**o + ((-0.0215515908357-0.297531951242j))*x[0] + ((-0.375845624996-0.244809999133j))*x[1]**o + ((-0.930261339368+0.573330267569j))*x[1]
+        ref[(3, 1, 1, 0)]=(-0.398230659368-0.251354151662j)*x_ref[0]**o + ((-0.0215515908357-0.297531951242j))*x_ref[0] + ((-0.375845624996-0.244809999133j))*x_ref[1]**o + ((-0.930261339368+0.573330267569j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.818299684953-0.818565871722j)*x[0]**o + ((0.164517381077-0.554271680654j))*x[0] + ((-0.814496661975+0.449669505304j))*x[1]**o + ((0.031432304291+0.75372492813j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.818299684953-0.818565871722j)*x_ref[0]**o + ((0.164517381077-0.554271680654j))*x_ref[0] + ((-0.814496661975+0.449669505304j))*x_ref[1]**o + ((0.031432304291+0.75372492813j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(-0.487116718976-0.67192903173j)*x[0]**o + ((0.320391540755+0.402208556903j))*x[0] + ((0.842551315277+0.938818044095j))*x[1]**o + ((0.394041379653+0.193049904491j))*x[1]
+        ref[(3, 1, 2, 0)]=(-0.487116718976-0.67192903173j)*x_ref[0]**o + ((0.320391540755+0.402208556903j))*x_ref[0] + ((0.842551315277+0.938818044095j))*x_ref[1]**o + ((0.394041379653+0.193049904491j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(-0.219162320583+0.0320392128722j)*x[0]**o + ((0.503621405516-0.535245063663j))*x[0] + ((0.24527481732+0.139057271468j))*x[1]**o + ((0.603752741648-0.759309836095j))*x[1]
+        ref[(3, 1, 2, 1)]=(-0.219162320583+0.0320392128722j)*x_ref[0]**o + ((0.503621405516-0.535245063663j))*x_ref[0] + ((0.24527481732+0.139057271468j))*x_ref[1]**o + ((0.603752741648-0.759309836095j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.590414907393-0.542469066363j)*x[2]**o + ((0.13750841433-0.0239721039751j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.590414907393-0.542469066363j)*x_ref[2]**o + ((0.13750841433-0.0239721039751j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.375124354756+0.307342938704j)*x[2]**o + ((0.622668893712-0.254756512409j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.375124354756+0.307342938704j)*x_ref[2]**o + ((0.622668893712-0.254756512409j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.643963202741+0.0248334279995j)*x[2]**o + ((0.634386356545-0.122249045802j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.643963202741+0.0248334279995j)*x_ref[2]**o + ((0.634386356545-0.122249045802j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.516993198163-0.680624274991j)*x[2]**o + ((-0.998215302402-0.375079767969j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.516993198163-0.680624274991j)*x_ref[2]**o + ((-0.998215302402-0.375079767969j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.516114697588+0.103554260085j)*x[2]**o + ((0.76111856559+0.530779782838j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.516114697588+0.103554260085j)*x_ref[2]**o + ((0.76111856559+0.530779782838j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.672280750188+0.16983880977j)*x[2]**o + ((-0.2752235985+0.275433746921j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.672280750188+0.16983880977j)*x_ref[2]**o + ((-0.2752235985+0.275433746921j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.175650323653+0.545411002152j)*x[2]**o + ((0.832598764369-0.896908990017j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.175650323653+0.545411002152j)*x_ref[2]**o + ((0.832598764369-0.896908990017j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.217907851208-0.643108412661j)*x[2]**o + ((-0.383278871616-0.539710055278j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.217907851208-0.643108412661j)*x_ref[2]**o + ((-0.383278871616-0.539710055278j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.956742503179+0.777981761196j)*x[2]**o + ((0.822831765746+0.353783522185j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.956742503179+0.777981761196j)*x_ref[2]**o + ((0.822831765746+0.353783522185j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.279650995691+0.521692882362j)*x[2]**o + ((0.369009109824-0.269716869266j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.279650995691+0.521692882362j)*x_ref[2]**o + ((0.369009109824-0.269716869266j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.585754732275-0.117823343707j)*x[2]**o + ((0.97875696339-0.731863282797j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.585754732275-0.117823343707j)*x_ref[2]**o + ((0.97875696339-0.731863282797j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.420754607202+0.445398661975j)*x[2]**o + ((0.832548020435+0.498772514001j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.420754607202+0.445398661975j)*x_ref[2]**o + ((0.832548020435+0.498772514001j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.691056397292+0.68575033141j)*x[2]**o + ((0.631822241198+0.319248951272j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.691056397292+0.68575033141j)*x_ref[2]**o + ((0.631822241198+0.319248951272j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.784004555081+0.427942927323j)*x[2]**o + ((-0.4273451882+0.949886235173j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.784004555081+0.427942927323j)*x_ref[2]**o + ((-0.4273451882+0.949886235173j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.0412185457962+0.284738716577j)*x[2]**o + ((-0.133196615448+0.299256530245j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.0412185457962+0.284738716577j)*x_ref[2]**o + ((-0.133196615448+0.299256530245j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.453783036333+0.264375767313j)*x[2]**o + ((0.17430030664+0.0411501215933j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.453783036333+0.264375767313j)*x_ref[2]**o + ((0.17430030664+0.0411501215933j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.972269295444+0.519146039386j)*x[2]**o + ((-0.552816863053-0.0625039359135j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.972269295444+0.519146039386j)*x_ref[2]**o + ((-0.552816863053-0.0625039359135j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.538501063071-0.35320168994j)*x[2]**o + ((0.77270996854+0.845838589654j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.538501063071-0.35320168994j)*x_ref[2]**o + ((0.77270996854+0.845838589654j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.540596980209+0.174442876994j)*x[2]**o + ((-0.123793653614+0.676783718828j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.540596980209+0.174442876994j)*x_ref[2]**o + ((-0.123793653614+0.676783718828j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.695840866247-0.762474561135j)*x[2]**o + ((-0.964154634537+0.780276030651j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.695840866247-0.762474561135j)*x_ref[2]**o + ((-0.964154634537+0.780276030651j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.0035805879798-0.535870731444j)*x[2]**o + ((-0.223627553765-0.0300643906809j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.0035805879798-0.535870731444j)*x_ref[2]**o + ((-0.223627553765-0.0300643906809j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.884402391351+0.514596745797j)*x[2]**o + ((0.320032043089+0.0678273661885j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.884402391351+0.514596745797j)*x_ref[2]**o + ((0.320032043089+0.0678273661885j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.757808971479+0.0991689499648j)*x[2]**o + ((0.731642457615-0.029243185921j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.757808971479+0.0991689499648j)*x_ref[2]**o + ((0.731642457615-0.029243185921j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.42136821364-0.0433416578393j)*x[2]**o + ((-0.180254265437-0.275874366057j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.42136821364-0.0433416578393j)*x_ref[2]**o + ((-0.180254265437-0.275874366057j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.795034309343+0.397945379189j)*x[2]**o + ((-0.550437714913+0.588972500169j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.795034309343+0.397945379189j)*x_ref[2]**o + ((-0.550437714913+0.588972500169j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.440395238521+0.875149698314j)*x[2]**o + ((0.458497572192-0.779933658476j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.440395238521+0.875149698314j)*x_ref[2]**o + ((0.458497572192-0.779933658476j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.195088120207-0.246748402071j)*x[2]**o + ((-0.158109805768-0.578217168677j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.195088120207-0.246748402071j)*x_ref[2]**o + ((-0.158109805768-0.578217168677j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.417124475616-0.523716451077j)*x[2]**o + ((-0.984770359593+0.890305753185j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.417124475616-0.523716451077j)*x_ref[2]**o + ((-0.984770359593+0.890305753185j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.489144818+0.97260604309j)*x[2]**o + ((-0.687847827342-0.79963934135j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.489144818+0.97260604309j)*x_ref[2]**o + ((-0.687847827342-0.79963934135j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.511901810828-0.46235542665j)*x[2]**o + ((-0.249004720316-0.505147260036j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.511901810828-0.46235542665j)*x_ref[2]**o + ((-0.249004720316-0.505147260036j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.67236807258-0.905982408694j)*x[2]**o + ((-0.962662389587-0.091385141175j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.67236807258-0.905982408694j)*x_ref[2]**o + ((-0.962662389587-0.091385141175j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.397171916058+0.811066928329j)*x[2]**o + ((-0.401590407823+0.463610137549j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.397171916058+0.811066928329j)*x_ref[2]**o + ((-0.401590407823+0.463610137549j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.806973052071-0.600317660585j)*x[2]**o + ((-0.916195375383-0.182289543475j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.806973052071-0.600317660585j)*x_ref[2]**o + ((-0.916195375383-0.182289543475j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.266853338377+0.864684788042j)*x[2]**o + ((-0.370150447949+0.919621397769j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.266853338377+0.864684788042j)*x_ref[2]**o + ((-0.370150447949+0.919621397769j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.65851183614+0.288790746475j)*x[2]**o + ((-0.887677825978-0.107272713886j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.65851183614+0.288790746475j)*x_ref[2]**o + ((-0.887677825978-0.107272713886j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(-0.83901089901-0.959277086494j)*x[2]**o + ((-0.812208657064+0.599133755553j))*x[2]
+            ref[(2, 1, 2, 1)]+=(-0.83901089901-0.959277086494j)*x_ref[2]**o + ((-0.812208657064+0.599133755553j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.14585922925+0.371700184027j)*x[2]**o + ((0.39128789451+0.0470976297128j))*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.14585922925+0.371700184027j)*x_ref[2]**o + ((0.39128789451+0.0470976297128j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.910302781228+0.204028315372j)*x[2]**o + ((0.335552161896-0.510660645354j))*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.910302781228+0.204028315372j)*x_ref[2]**o + ((0.335552161896-0.510660645354j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.277188992426-0.13009762096j)*x[2]**o + ((-0.542161433849-0.537532208672j))*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.277188992426-0.13009762096j)*x_ref[2]**o + ((-0.542161433849-0.537532208672j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.174292790015-0.958394338876j)*x[2]**o + ((-0.408650754461+0.130631111223j))*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.174292790015-0.958394338876j)*x_ref[2]**o + ((-0.408650754461+0.130631111223j))*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(0.0377276348988-0.841244024482j)*x[2]**o + ((-0.117648364947-0.354165068525j))*x[2]
+            ref[(3, 0, 2, 0)]+=(0.0377276348988-0.841244024482j)*x_ref[2]**o + ((-0.117648364947-0.354165068525j))*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.941251252844+0.904994978583j)*x[2]**o + ((-0.845762303878+0.491135522013j))*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.941251252844+0.904994978583j)*x_ref[2]**o + ((-0.845762303878+0.491135522013j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(-0.666153150703+0.684325718287j)*x[2]**o + ((-0.54580461077-0.713830603676j))*x[2]
+            ref[(3, 1, 0, 0)]+=(-0.666153150703+0.684325718287j)*x_ref[2]**o + ((-0.54580461077-0.713830603676j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.45527166933-0.997228717962j)*x[2]**o + ((-0.951118762111+0.768581572189j))*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.45527166933-0.997228717962j)*x_ref[2]**o + ((-0.951118762111+0.768581572189j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.259807186261-0.518746454568j)*x[2]**o + ((-0.539359683823+0.99848849043j))*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.259807186261-0.518746454568j)*x_ref[2]**o + ((-0.539359683823+0.99848849043j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.82845010864+0.54708024303j)*x[2]**o + ((0.337904913491+0.402423071989j))*x[2]
+            ref[(3, 1, 1, 1)]+=(0.82845010864+0.54708024303j)*x_ref[2]**o + ((0.337904913491+0.402423071989j))*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(-0.15166731309-0.455979283667j)*x[2]**o + ((0.663750697681+0.9693826473j))*x[2]
+            ref[(3, 1, 2, 0)]+=(-0.15166731309-0.455979283667j)*x_ref[2]**o + ((0.663750697681+0.9693826473j))*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(-0.706694877902+0.643392145797j)*x[2]**o + ((0.821223287165-0.657039908157j))*x[2]
+            ref[(3, 1, 2, 1)]+=(-0.706694877902+0.643392145797j)*x_ref[2]**o + ((0.821223287165-0.657039908157j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.288625746929-0.567329051223j)*x[0]**o + ((-0.341842350968+0.860881614027j))*x[0] + ((-0.973465186257+0.604963813451j))*x[1]**o + ((0.362288251793+0.401732213413j))*x[1]
+        ref=(-0.288625746929-0.567329051223j)*x_ref[0]**o + ((-0.341842350968+0.860881614027j))*x_ref[0] + ((-0.973465186257+0.604963813451j))*x_ref[1]**o + ((0.362288251793+0.401732213413j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.549937139572+0.927370931787j))*x[2]**o + ((-0.821799176585-0.114208770016j))*x[2]
+            ref+=((-0.549937139572+0.927370931787j))*x_ref[2]**o + ((-0.821799176585-0.114208770016j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(-0.942721806638-0.625752034705j)*x[0]**o + ((0.440520277622-0.206029824506j))*x[0] + ((0.547755841412+0.122899871112j))*x[1]**o + ((-0.832698957494-0.972372477516j))*x[1]
+        ref[(0,)]=(-0.942721806638-0.625752034705j)*x_ref[0]**o + ((0.440520277622-0.206029824506j))*x_ref[0] + ((0.547755841412+0.122899871112j))*x_ref[1]**o + ((-0.832698957494-0.972372477516j))*x_ref[1]
+        arg[(1,)]=(0.764965357204-0.476321700907j)*x[0]**o + ((-0.482402325653+0.709530643962j))*x[0] + ((-0.0842347207226-0.592534804504j))*x[1]**o + ((0.899397591962+0.610919090915j))*x[1]
+        ref[(1,)]=(0.764965357204-0.476321700907j)*x_ref[0]**o + ((-0.482402325653+0.709530643962j))*x_ref[0] + ((-0.0842347207226-0.592534804504j))*x_ref[1]**o + ((0.899397591962+0.610919090915j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.568158158346-0.972679373473j)*x[2]**o + ((0.276604158588-0.826121519411j))*x[2]
+            ref[(0,)]+=(-0.568158158346-0.972679373473j)*x_ref[2]**o + ((0.276604158588-0.826121519411j))*x_ref[2]
+            arg[(1,)]+=(0.422159240793+0.305536197097j)*x[2]**o + ((-0.310551854486+0.277155103296j))*x[2]
+            ref[(1,)]+=(0.422159240793+0.305536197097j)*x_ref[2]**o + ((-0.310551854486+0.277155103296j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=(0.200159135385-0.1019958801j)*x[0]**o + ((0.572768954596+0.762476022633j))*x[0] + ((-0.540803564409+0.924519990018j))*x[1]**o + ((-0.383769926637+0.914744684352j))*x[1]
+        ref[(0, 0)]=(0.200159135385-0.1019958801j)*x_ref[0]**o + ((0.572768954596+0.762476022633j))*x_ref[0] + ((-0.540803564409+0.924519990018j))*x_ref[1]**o + ((-0.383769926637+0.914744684352j))*x_ref[1]
+        arg[(0, 1)]=(-0.999489835588-0.975129887361j)*x[0]**o + ((0.316536798991+0.958598455103j))*x[0] + ((-0.765877945919+0.100097197264j))*x[1]**o + ((-0.399352160867+0.0522622001287j))*x[1]
+        ref[(0, 1)]=(-0.999489835588-0.975129887361j)*x_ref[0]**o + ((0.316536798991+0.958598455103j))*x_ref[0] + ((-0.765877945919+0.100097197264j))*x_ref[1]**o + ((-0.399352160867+0.0522622001287j))*x_ref[1]
+        arg[(0, 2)]=(0.837080174236+0.656175884131j)*x[0]**o + ((-0.468483335059+0.461486552377j))*x[0] + ((0.448320882941-0.413653485072j))*x[1]**o + ((0.0611805578944+0.376615742704j))*x[1]
+        ref[(0, 2)]=(0.837080174236+0.656175884131j)*x_ref[0]**o + ((-0.468483335059+0.461486552377j))*x_ref[0] + ((0.448320882941-0.413653485072j))*x_ref[1]**o + ((0.0611805578944+0.376615742704j))*x_ref[1]
+        arg[(1, 0)]=(0.0134767941583-0.0565399354866j)*x[0]**o + ((-0.941778281498+0.144812846791j))*x[0] + ((-0.600085401815-0.978918326955j))*x[1]**o + ((0.421875113885-0.825630979027j))*x[1]
+        ref[(1, 0)]=(0.0134767941583-0.0565399354866j)*x_ref[0]**o + ((-0.941778281498+0.144812846791j))*x_ref[0] + ((-0.600085401815-0.978918326955j))*x_ref[1]**o + ((0.421875113885-0.825630979027j))*x_ref[1]
+        arg[(1, 1)]=(-0.320221448548+0.998575313104j)*x[0]**o + ((0.942069245618+0.7557337163j))*x[0] + ((0.439456108339+0.536282783341j))*x[1]**o + ((-0.0452419027908-0.0556831954405j))*x[1]
+        ref[(1, 1)]=(-0.320221448548+0.998575313104j)*x_ref[0]**o + ((0.942069245618+0.7557337163j))*x_ref[0] + ((0.439456108339+0.536282783341j))*x_ref[1]**o + ((-0.0452419027908-0.0556831954405j))*x_ref[1]
+        arg[(1, 2)]=(-0.41599163811-0.0841890228351j)*x[0]**o + ((0.851004120809+0.00641501034609j))*x[0] + ((-0.149323678815+0.260229379919j))*x[1]**o + ((-0.999322514775-0.894519363181j))*x[1]
+        ref[(1, 2)]=(-0.41599163811-0.0841890228351j)*x_ref[0]**o + ((0.851004120809+0.00641501034609j))*x_ref[0] + ((-0.149323678815+0.260229379919j))*x_ref[1]**o + ((-0.999322514775-0.894519363181j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.136083201581-0.12069559269j)*x[2]**o + ((0.397495540461+0.492410248348j))*x[2]
+            ref[(0, 0)]+=(0.136083201581-0.12069559269j)*x_ref[2]**o + ((0.397495540461+0.492410248348j))*x_ref[2]
+            arg[(0, 1)]+=(-0.258016834724-0.172232090655j)*x[2]**o + ((0.0104150273875-0.586883562985j))*x[2]
+            ref[(0, 1)]+=(-0.258016834724-0.172232090655j)*x_ref[2]**o + ((0.0104150273875-0.586883562985j))*x_ref[2]
+            arg[(0, 2)]+=(0.286406387693-0.475992611119j)*x[2]**o + ((-0.973139652202+0.911051424215j))*x[2]
+            ref[(0, 2)]+=(0.286406387693-0.475992611119j)*x_ref[2]**o + ((-0.973139652202+0.911051424215j))*x_ref[2]
+            arg[(1, 0)]+=(0.974631513311+0.74047294132j)*x[2]**o + ((0.611774093612-0.85872564766j))*x[2]
+            ref[(1, 0)]+=(0.974631513311+0.74047294132j)*x_ref[2]**o + ((0.611774093612-0.85872564766j))*x_ref[2]
+            arg[(1, 1)]+=(-0.341398878523-0.452102454786j)*x[2]**o + ((-0.864377846948+0.450085321614j))*x[2]
+            ref[(1, 1)]+=(-0.341398878523-0.452102454786j)*x_ref[2]**o + ((-0.864377846948+0.450085321614j))*x_ref[2]
+            arg[(1, 2)]+=(-0.301680255776+0.519035386517j)*x[2]**o + ((0.406099844929+0.0879422872129j))*x[2]
+            ref[(1, 2)]+=(-0.301680255776+0.519035386517j)*x_ref[2]**o + ((0.406099844929+0.0879422872129j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3),w)
+        ref = Data(0,(4, 3, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.270047702197+0.77758624797j)*x[0]**o + ((0.743764942221-0.0541447088089j))*x[0] + ((-0.127843056962-0.895370095278j))*x[1]**o + ((0.709571836353+0.543842228896j))*x[1]
+        ref[(0, 0, 0)]=(-0.270047702197+0.77758624797j)*x_ref[0]**o + ((0.743764942221-0.0541447088089j))*x_ref[0] + ((-0.127843056962-0.895370095278j))*x_ref[1]**o + ((0.709571836353+0.543842228896j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.354627098337+0.0933753864003j)*x[0]**o + ((-0.761396539679+0.823899102273j))*x[0] + ((-0.670507980346-0.4862485423j))*x[1]**o + ((-0.0937022623533+0.52842250806j))*x[1]
+        ref[(0, 0, 1)]=(0.354627098337+0.0933753864003j)*x_ref[0]**o + ((-0.761396539679+0.823899102273j))*x_ref[0] + ((-0.670507980346-0.4862485423j))*x_ref[1]**o + ((-0.0937022623533+0.52842250806j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.1243731162-0.256507211311j)*x[0]**o + ((0.356131643173-0.913754429502j))*x[0] + ((0.781434650363-0.609757020865j))*x[1]**o + ((-0.174499383652+0.178466119074j))*x[1]
+        ref[(0, 0, 2)]=(0.1243731162-0.256507211311j)*x_ref[0]**o + ((0.356131643173-0.913754429502j))*x_ref[0] + ((0.781434650363-0.609757020865j))*x_ref[1]**o + ((-0.174499383652+0.178466119074j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.910454367781-0.715573269732j)*x[0]**o + ((0.342002683574+0.895911020433j))*x[0] + ((0.79093949937+0.559070816626j))*x[1]**o + ((0.588741707505-0.248666473919j))*x[1]
+        ref[(0, 1, 0)]=(0.910454367781-0.715573269732j)*x_ref[0]**o + ((0.342002683574+0.895911020433j))*x_ref[0] + ((0.79093949937+0.559070816626j))*x_ref[1]**o + ((0.588741707505-0.248666473919j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.16231181259+0.569704663455j)*x[0]**o + ((0.166126345425+0.0783080172379j))*x[0] + ((-0.776145371687-0.649198616463j))*x[1]**o + ((0.393657458584-0.385001520735j))*x[1]
+        ref[(0, 1, 1)]=(0.16231181259+0.569704663455j)*x_ref[0]**o + ((0.166126345425+0.0783080172379j))*x_ref[0] + ((-0.776145371687-0.649198616463j))*x_ref[1]**o + ((0.393657458584-0.385001520735j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.190408921405-0.456180715974j)*x[0]**o + ((-0.483993286519-0.675463233495j))*x[0] + ((0.26606377389-0.431770443627j))*x[1]**o + ((0.691957684204-0.636919277186j))*x[1]
+        ref[(0, 1, 2)]=(-0.190408921405-0.456180715974j)*x_ref[0]**o + ((-0.483993286519-0.675463233495j))*x_ref[0] + ((0.26606377389-0.431770443627j))*x_ref[1]**o + ((0.691957684204-0.636919277186j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.620525153971-0.196723104579j)*x[0]**o + ((0.799745976123-0.40349652464j))*x[0] + ((-0.569978702968+0.556230781113j))*x[1]**o + ((-0.590258624453+0.953280072846j))*x[1]
+        ref[(0, 2, 0)]=(-0.620525153971-0.196723104579j)*x_ref[0]**o + ((0.799745976123-0.40349652464j))*x_ref[0] + ((-0.569978702968+0.556230781113j))*x_ref[1]**o + ((-0.590258624453+0.953280072846j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.456251341379-0.0576715468275j)*x[0]**o + ((0.583693493993-0.306332863042j))*x[0] + ((0.66391547728+0.558959699553j))*x[1]**o + ((0.887793858613-0.86419475j))*x[1]
+        ref[(0, 2, 1)]=(0.456251341379-0.0576715468275j)*x_ref[0]**o + ((0.583693493993-0.306332863042j))*x_ref[0] + ((0.66391547728+0.558959699553j))*x_ref[1]**o + ((0.887793858613-0.86419475j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.752173277858+0.367778313754j)*x[0]**o + ((0.37972376267-0.694595502818j))*x[0] + ((0.375679845236-0.858578204902j))*x[1]**o + ((0.0403351216781-0.466472390655j))*x[1]
+        ref[(0, 2, 2)]=(0.752173277858+0.367778313754j)*x_ref[0]**o + ((0.37972376267-0.694595502818j))*x_ref[0] + ((0.375679845236-0.858578204902j))*x_ref[1]**o + ((0.0403351216781-0.466472390655j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.392650937751+0.611176281379j)*x[0]**o + ((0.267677431305-0.406516571911j))*x[0] + ((0.15559786378+0.827561372359j))*x[1]**o + ((0.976492084562-0.504266947435j))*x[1]
+        ref[(1, 0, 0)]=(0.392650937751+0.611176281379j)*x_ref[0]**o + ((0.267677431305-0.406516571911j))*x_ref[0] + ((0.15559786378+0.827561372359j))*x_ref[1]**o + ((0.976492084562-0.504266947435j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.850233476873+0.160474111286j)*x[0]**o + ((0.0792932315006-0.319270675533j))*x[0] + ((-0.882278573675-0.540689922947j))*x[1]**o + ((0.999074586294-0.931612074375j))*x[1]
+        ref[(1, 0, 1)]=(-0.850233476873+0.160474111286j)*x_ref[0]**o + ((0.0792932315006-0.319270675533j))*x_ref[0] + ((-0.882278573675-0.540689922947j))*x_ref[1]**o + ((0.999074586294-0.931612074375j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.0817303292193-0.339769953415j)*x[0]**o + ((-0.179072175784+0.0634383208018j))*x[0] + ((0.798479267596-0.849848560385j))*x[1]**o + ((-0.607800951264+0.845847914896j))*x[1]
+        ref[(1, 0, 2)]=(-0.0817303292193-0.339769953415j)*x_ref[0]**o + ((-0.179072175784+0.0634383208018j))*x_ref[0] + ((0.798479267596-0.849848560385j))*x_ref[1]**o + ((-0.607800951264+0.845847914896j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.64704812827+0.904629709245j)*x[0]**o + ((0.203424834911+0.54476652535j))*x[0] + ((0.490542356584-0.150060765355j))*x[1]**o + ((-0.806842105969+0.435255103209j))*x[1]
+        ref[(1, 1, 0)]=(0.64704812827+0.904629709245j)*x_ref[0]**o + ((0.203424834911+0.54476652535j))*x_ref[0] + ((0.490542356584-0.150060765355j))*x_ref[1]**o + ((-0.806842105969+0.435255103209j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.214312288927-0.914852225105j)*x[0]**o + ((0.928297214757+0.988786462204j))*x[0] + ((-0.670069979539-0.344050501663j))*x[1]**o + ((-0.975605603069-0.924346656806j))*x[1]
+        ref[(1, 1, 1)]=(0.214312288927-0.914852225105j)*x_ref[0]**o + ((0.928297214757+0.988786462204j))*x_ref[0] + ((-0.670069979539-0.344050501663j))*x_ref[1]**o + ((-0.975605603069-0.924346656806j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.477026624499+0.393440867622j)*x[0]**o + ((-0.32845875442-0.822036461029j))*x[0] + ((0.736765475315+0.815129430995j))*x[1]**o + ((0.77703312061+0.555148200813j))*x[1]
+        ref[(1, 1, 2)]=(0.477026624499+0.393440867622j)*x_ref[0]**o + ((-0.32845875442-0.822036461029j))*x_ref[0] + ((0.736765475315+0.815129430995j))*x_ref[1]**o + ((0.77703312061+0.555148200813j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.384122569578+0.347061848611j)*x[0]**o + ((-0.464891753139+0.825140778732j))*x[0] + ((0.773621856992-0.468167944936j))*x[1]**o + ((-0.977456891817-0.502094778662j))*x[1]
+        ref[(1, 2, 0)]=(-0.384122569578+0.347061848611j)*x_ref[0]**o + ((-0.464891753139+0.825140778732j))*x_ref[0] + ((0.773621856992-0.468167944936j))*x_ref[1]**o + ((-0.977456891817-0.502094778662j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.126157185811-0.540444477014j)*x[0]**o + ((0.212088620704-0.424409001504j))*x[0] + ((-0.440381834545-0.00590334864568j))*x[1]**o + ((0.0249080310592+0.709828127629j))*x[1]
+        ref[(1, 2, 1)]=(-0.126157185811-0.540444477014j)*x_ref[0]**o + ((0.212088620704-0.424409001504j))*x_ref[0] + ((-0.440381834545-0.00590334864568j))*x_ref[1]**o + ((0.0249080310592+0.709828127629j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.559514770207-0.797820056749j)*x[0]**o + ((-0.737878892992+0.984149712881j))*x[0] + ((0.644077997096-0.714958533562j))*x[1]**o + ((0.292279975061+0.339258924074j))*x[1]
+        ref[(1, 2, 2)]=(0.559514770207-0.797820056749j)*x_ref[0]**o + ((-0.737878892992+0.984149712881j))*x_ref[0] + ((0.644077997096-0.714958533562j))*x_ref[1]**o + ((0.292279975061+0.339258924074j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.830908012907-0.67686152653j)*x[0]**o + ((-0.832162195302-0.891072848747j))*x[0] + ((0.523757214065-0.563116543474j))*x[1]**o + ((-0.174835469824+0.673709104085j))*x[1]
+        ref[(2, 0, 0)]=(-0.830908012907-0.67686152653j)*x_ref[0]**o + ((-0.832162195302-0.891072848747j))*x_ref[0] + ((0.523757214065-0.563116543474j))*x_ref[1]**o + ((-0.174835469824+0.673709104085j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.996248739405+0.488747723022j)*x[0]**o + ((-0.0978016578363+0.458920598291j))*x[0] + ((0.365451523066+0.269989540263j))*x[1]**o + ((-0.0562284632164+0.460377610797j))*x[1]
+        ref[(2, 0, 1)]=(0.996248739405+0.488747723022j)*x_ref[0]**o + ((-0.0978016578363+0.458920598291j))*x_ref[0] + ((0.365451523066+0.269989540263j))*x_ref[1]**o + ((-0.0562284632164+0.460377610797j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.165890686223-0.136468631875j)*x[0]**o + ((-0.733732502727-0.941526973111j))*x[0] + ((-0.0466572615891-0.136472045318j))*x[1]**o + ((0.970670166672+0.126540284768j))*x[1]
+        ref[(2, 0, 2)]=(-0.165890686223-0.136468631875j)*x_ref[0]**o + ((-0.733732502727-0.941526973111j))*x_ref[0] + ((-0.0466572615891-0.136472045318j))*x_ref[1]**o + ((0.970670166672+0.126540284768j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.186353559955-0.551052313354j)*x[0]**o + ((0.34426110064-0.659437061712j))*x[0] + ((-0.492383602664-0.551912788443j))*x[1]**o + ((-0.351846843868+0.374884074207j))*x[1]
+        ref[(2, 1, 0)]=(0.186353559955-0.551052313354j)*x_ref[0]**o + ((0.34426110064-0.659437061712j))*x_ref[0] + ((-0.492383602664-0.551912788443j))*x_ref[1]**o + ((-0.351846843868+0.374884074207j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.619983515728+0.398944417533j)*x[0]**o + ((-0.198771151742-0.977320703482j))*x[0] + ((-0.809768295913+0.116221160602j))*x[1]**o + ((-0.232607852615-0.904579995888j))*x[1]
+        ref[(2, 1, 1)]=(-0.619983515728+0.398944417533j)*x_ref[0]**o + ((-0.198771151742-0.977320703482j))*x_ref[0] + ((-0.809768295913+0.116221160602j))*x_ref[1]**o + ((-0.232607852615-0.904579995888j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.420546932782-0.66746918171j)*x[0]**o + ((-0.439937797678+0.127807677955j))*x[0] + ((0.284785459385-0.0973363293931j))*x[1]**o + ((0.851922155655+0.646877012257j))*x[1]
+        ref[(2, 1, 2)]=(0.420546932782-0.66746918171j)*x_ref[0]**o + ((-0.439937797678+0.127807677955j))*x_ref[0] + ((0.284785459385-0.0973363293931j))*x_ref[1]**o + ((0.851922155655+0.646877012257j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.242075458308+0.954406598616j)*x[0]**o + ((-0.49944847352+0.299678695742j))*x[0] + ((-0.165949746047-0.337629328112j))*x[1]**o + ((-0.13377766353+0.593161775105j))*x[1]
+        ref[(2, 2, 0)]=(-0.242075458308+0.954406598616j)*x_ref[0]**o + ((-0.49944847352+0.299678695742j))*x_ref[0] + ((-0.165949746047-0.337629328112j))*x_ref[1]**o + ((-0.13377766353+0.593161775105j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.288278253753+0.237728407665j)*x[0]**o + ((-0.294394211291+0.730323784854j))*x[0] + ((0.844910760133+0.765816406869j))*x[1]**o + ((0.0104256786356-0.57776921743j))*x[1]
+        ref[(2, 2, 1)]=(-0.288278253753+0.237728407665j)*x_ref[0]**o + ((-0.294394211291+0.730323784854j))*x_ref[0] + ((0.844910760133+0.765816406869j))*x_ref[1]**o + ((0.0104256786356-0.57776921743j))*x_ref[1]
+        arg[(2, 2, 2)]=(-0.741094844689-0.038088035641j)*x[0]**o + ((-0.49578529674-0.68612550779j))*x[0] + ((0.905151119753+0.660924041881j))*x[1]**o + ((-0.0909349545528-0.260116175125j))*x[1]
+        ref[(2, 2, 2)]=(-0.741094844689-0.038088035641j)*x_ref[0]**o + ((-0.49578529674-0.68612550779j))*x_ref[0] + ((0.905151119753+0.660924041881j))*x_ref[1]**o + ((-0.0909349545528-0.260116175125j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.623358691047+0.239584216762j)*x[0]**o + ((-0.0928379238539-0.422697881751j))*x[0] + ((0.323380539937+0.150433259293j))*x[1]**o + ((-0.0275007287157-0.140484881995j))*x[1]
+        ref[(3, 0, 0)]=(0.623358691047+0.239584216762j)*x_ref[0]**o + ((-0.0928379238539-0.422697881751j))*x_ref[0] + ((0.323380539937+0.150433259293j))*x_ref[1]**o + ((-0.0275007287157-0.140484881995j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.44550372271-0.394777886693j)*x[0]**o + ((-0.482447962883+0.874382490824j))*x[0] + ((-0.963416698211-0.369028062475j))*x[1]**o + ((0.591112355278-0.979319937475j))*x[1]
+        ref[(3, 0, 1)]=(0.44550372271-0.394777886693j)*x_ref[0]**o + ((-0.482447962883+0.874382490824j))*x_ref[0] + ((-0.963416698211-0.369028062475j))*x_ref[1]**o + ((0.591112355278-0.979319937475j))*x_ref[1]
+        arg[(3, 0, 2)]=(-0.399750315079-0.203815751106j)*x[0]**o + ((-0.628566274492+0.292301322195j))*x[0] + ((-0.929181376936+0.428043825266j))*x[1]**o + ((0.0316972295074+0.36024372926j))*x[1]
+        ref[(3, 0, 2)]=(-0.399750315079-0.203815751106j)*x_ref[0]**o + ((-0.628566274492+0.292301322195j))*x_ref[0] + ((-0.929181376936+0.428043825266j))*x_ref[1]**o + ((0.0316972295074+0.36024372926j))*x_ref[1]
+        arg[(3, 1, 0)]=(0.62490059247+0.883182116553j)*x[0]**o + ((-0.145191481623-0.00926757606405j))*x[0] + ((0.113285248062+0.622094050632j))*x[1]**o + ((0.381022154337-0.509291494425j))*x[1]
+        ref[(3, 1, 0)]=(0.62490059247+0.883182116553j)*x_ref[0]**o + ((-0.145191481623-0.00926757606405j))*x_ref[0] + ((0.113285248062+0.622094050632j))*x_ref[1]**o + ((0.381022154337-0.509291494425j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.207339378287+0.399466434614j)*x[0]**o + ((-0.722368767368+0.993049695949j))*x[0] + ((0.423156237812+0.668205094355j))*x[1]**o + ((-0.213473570231+0.526793894161j))*x[1]
+        ref[(3, 1, 1)]=(-0.207339378287+0.399466434614j)*x_ref[0]**o + ((-0.722368767368+0.993049695949j))*x_ref[0] + ((0.423156237812+0.668205094355j))*x_ref[1]**o + ((-0.213473570231+0.526793894161j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.560932124267+0.602425853656j)*x[0]**o + ((0.694646960974-0.903060918663j))*x[0] + ((0.31977530947+0.380539434599j))*x[1]**o + ((-0.5914937841+0.25226128041j))*x[1]
+        ref[(3, 1, 2)]=(-0.560932124267+0.602425853656j)*x_ref[0]**o + ((0.694646960974-0.903060918663j))*x_ref[0] + ((0.31977530947+0.380539434599j))*x_ref[1]**o + ((-0.5914937841+0.25226128041j))*x_ref[1]
+        arg[(3, 2, 0)]=(-0.748851983639+0.483848117421j)*x[0]**o + ((-0.513939216583+0.109146743799j))*x[0] + ((-0.402042790513+0.670501146376j))*x[1]**o + ((-0.806917084948-0.879061056369j))*x[1]
+        ref[(3, 2, 0)]=(-0.748851983639+0.483848117421j)*x_ref[0]**o + ((-0.513939216583+0.109146743799j))*x_ref[0] + ((-0.402042790513+0.670501146376j))*x_ref[1]**o + ((-0.806917084948-0.879061056369j))*x_ref[1]
+        arg[(3, 2, 1)]=(-0.341155940981-0.15989347546j)*x[0]**o + ((-0.132481626175-0.0555032838259j))*x[0] + ((0.205273910283-0.751341490799j))*x[1]**o + ((0.899311074519+0.353791463495j))*x[1]
+        ref[(3, 2, 1)]=(-0.341155940981-0.15989347546j)*x_ref[0]**o + ((-0.132481626175-0.0555032838259j))*x_ref[0] + ((0.205273910283-0.751341490799j))*x_ref[1]**o + ((0.899311074519+0.353791463495j))*x_ref[1]
+        arg[(3, 2, 2)]=(0.614519327078+0.843493406819j)*x[0]**o + ((-0.962147696759-0.202503519632j))*x[0] + ((0.855158327876+0.921883024049j))*x[1]**o + ((-0.588336913814+0.353302601851j))*x[1]
+        ref[(3, 2, 2)]=(0.614519327078+0.843493406819j)*x_ref[0]**o + ((-0.962147696759-0.202503519632j))*x_ref[0] + ((0.855158327876+0.921883024049j))*x_ref[1]**o + ((-0.588336913814+0.353302601851j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.733969849351+0.731213735632j)*x[2]**o + ((-0.384381819686+0.509040499906j))*x[2]
+            ref[(0, 0, 0)]+=(0.733969849351+0.731213735632j)*x_ref[2]**o + ((-0.384381819686+0.509040499906j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.926893323746+0.52111526552j)*x[2]**o + ((-0.715967987674+0.819648094007j))*x[2]
+            ref[(0, 0, 1)]+=(0.926893323746+0.52111526552j)*x_ref[2]**o + ((-0.715967987674+0.819648094007j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.898506209766-0.566036089878j)*x[2]**o + ((0.794593572252-0.944062029446j))*x[2]
+            ref[(0, 0, 2)]+=(0.898506209766-0.566036089878j)*x_ref[2]**o + ((0.794593572252-0.944062029446j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.161019077312-0.136841275101j)*x[2]**o + ((0.146129894696+0.305361565365j))*x[2]
+            ref[(0, 1, 0)]+=(0.161019077312-0.136841275101j)*x_ref[2]**o + ((0.146129894696+0.305361565365j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.624858874346+0.100038164702j)*x[2]**o + ((-0.0625930664684+0.227976346674j))*x[2]
+            ref[(0, 1, 1)]+=(0.624858874346+0.100038164702j)*x_ref[2]**o + ((-0.0625930664684+0.227976346674j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.848475973363+0.116845584226j)*x[2]**o + ((-0.367095195988-0.684027384114j))*x[2]
+            ref[(0, 1, 2)]+=(-0.848475973363+0.116845584226j)*x_ref[2]**o + ((-0.367095195988-0.684027384114j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.00420459306689+0.924671376454j)*x[2]**o + ((-0.0969429137723-0.742066112586j))*x[2]
+            ref[(0, 2, 0)]+=(-0.00420459306689+0.924671376454j)*x_ref[2]**o + ((-0.0969429137723-0.742066112586j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.423237469893+0.79046478482j)*x[2]**o + ((-0.0095669598993-0.459105215412j))*x[2]
+            ref[(0, 2, 1)]+=(-0.423237469893+0.79046478482j)*x_ref[2]**o + ((-0.0095669598993-0.459105215412j))*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.414301601146+0.831770438489j)*x[2]**o + ((0.268711638458+0.877839598879j))*x[2]
+            ref[(0, 2, 2)]+=(-0.414301601146+0.831770438489j)*x_ref[2]**o + ((0.268711638458+0.877839598879j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.706639809181-0.969772914865j)*x[2]**o + ((-0.453439874594+0.549779502256j))*x[2]
+            ref[(1, 0, 0)]+=(-0.706639809181-0.969772914865j)*x_ref[2]**o + ((-0.453439874594+0.549779502256j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.405393247674-0.864488621402j)*x[2]**o + ((-0.977172452398-0.355797897242j))*x[2]
+            ref[(1, 0, 1)]+=(0.405393247674-0.864488621402j)*x_ref[2]**o + ((-0.977172452398-0.355797897242j))*x_ref[2]
+            arg[(1, 0, 2)]+=(0.682547129668+0.539470150379j)*x[2]**o + ((-0.281427008991-0.866664139368j))*x[2]
+            ref[(1, 0, 2)]+=(0.682547129668+0.539470150379j)*x_ref[2]**o + ((-0.281427008991-0.866664139368j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.0268821902478+0.57719043527j)*x[2]**o + ((-0.255391380539-0.605786703608j))*x[2]
+            ref[(1, 1, 0)]+=(-0.0268821902478+0.57719043527j)*x_ref[2]**o + ((-0.255391380539-0.605786703608j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.298149834399+0.33333056653j)*x[2]**o + ((0.973562089373-0.56099503057j))*x[2]
+            ref[(1, 1, 1)]+=(-0.298149834399+0.33333056653j)*x_ref[2]**o + ((0.973562089373-0.56099503057j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.524618448763+0.81933627443j)*x[2]**o + ((-0.50645948122-0.607974257559j))*x[2]
+            ref[(1, 1, 2)]+=(0.524618448763+0.81933627443j)*x_ref[2]**o + ((-0.50645948122-0.607974257559j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.987143975817-0.985362891687j)*x[2]**o + ((0.996295909057+0.351943198859j))*x[2]
+            ref[(1, 2, 0)]+=(0.987143975817-0.985362891687j)*x_ref[2]**o + ((0.996295909057+0.351943198859j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.327669241575+0.047505032021j)*x[2]**o + ((-0.546067193007-0.774043739795j))*x[2]
+            ref[(1, 2, 1)]+=(-0.327669241575+0.047505032021j)*x_ref[2]**o + ((-0.546067193007-0.774043739795j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.0868192956389+0.34393869459j)*x[2]**o + ((0.142998052899-0.414727737626j))*x[2]
+            ref[(1, 2, 2)]+=(0.0868192956389+0.34393869459j)*x_ref[2]**o + ((0.142998052899-0.414727737626j))*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.675573853812+0.368718599375j)*x[2]**o + ((-0.103805863332-0.788438094704j))*x[2]
+            ref[(2, 0, 0)]+=(-0.675573853812+0.368718599375j)*x_ref[2]**o + ((-0.103805863332-0.788438094704j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.871020226426+0.780743151899j)*x[2]**o + ((0.382306533855+0.478792472205j))*x[2]
+            ref[(2, 0, 1)]+=(-0.871020226426+0.780743151899j)*x_ref[2]**o + ((0.382306533855+0.478792472205j))*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.909264176375+0.234933497295j)*x[2]**o + ((0.276670548659-0.401370639477j))*x[2]
+            ref[(2, 0, 2)]+=(-0.909264176375+0.234933497295j)*x_ref[2]**o + ((0.276670548659-0.401370639477j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.286935727897+0.17970485184j)*x[2]**o + ((0.169807128699-0.938939273982j))*x[2]
+            ref[(2, 1, 0)]+=(-0.286935727897+0.17970485184j)*x_ref[2]**o + ((0.169807128699-0.938939273982j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.895360677152-0.647936625205j)*x[2]**o + ((0.565255379377-0.0204033465059j))*x[2]
+            ref[(2, 1, 1)]+=(0.895360677152-0.647936625205j)*x_ref[2]**o + ((0.565255379377-0.0204033465059j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.306215601623+0.746444300987j)*x[2]**o + ((0.506046611011-0.97621193595j))*x[2]
+            ref[(2, 1, 2)]+=(-0.306215601623+0.746444300987j)*x_ref[2]**o + ((0.506046611011-0.97621193595j))*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.285930785321-0.993679371166j)*x[2]**o + ((-0.620250934098+0.0718511414398j))*x[2]
+            ref[(2, 2, 0)]+=(-0.285930785321-0.993679371166j)*x_ref[2]**o + ((-0.620250934098+0.0718511414398j))*x_ref[2]
+            arg[(2, 2, 1)]+=(-0.344406606259-0.135081700772j)*x[2]**o + ((-0.53104341501-0.0849065564429j))*x[2]
+            ref[(2, 2, 1)]+=(-0.344406606259-0.135081700772j)*x_ref[2]**o + ((-0.53104341501-0.0849065564429j))*x_ref[2]
+            arg[(2, 2, 2)]+=(-0.575511539121+0.971130512998j)*x[2]**o + ((-0.954276213785+0.0634942795349j))*x[2]
+            ref[(2, 2, 2)]+=(-0.575511539121+0.971130512998j)*x_ref[2]**o + ((-0.954276213785+0.0634942795349j))*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.187275416441+0.429224827842j)*x[2]**o + ((-0.136545073827+0.556012213189j))*x[2]
+            ref[(3, 0, 0)]+=(-0.187275416441+0.429224827842j)*x_ref[2]**o + ((-0.136545073827+0.556012213189j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.718039514569+0.579182574808j)*x[2]**o + ((0.531470056182+0.758314911767j))*x[2]
+            ref[(3, 0, 1)]+=(0.718039514569+0.579182574808j)*x_ref[2]**o + ((0.531470056182+0.758314911767j))*x_ref[2]
+            arg[(3, 0, 2)]+=(0.239264187483-0.63049780946j)*x[2]**o + ((0.221210731718-0.313377216486j))*x[2]
+            ref[(3, 0, 2)]+=(0.239264187483-0.63049780946j)*x_ref[2]**o + ((0.221210731718-0.313377216486j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.977116613777-0.241605510128j)*x[2]**o + ((-0.052428155246-0.589567971991j))*x[2]
+            ref[(3, 1, 0)]+=(-0.977116613777-0.241605510128j)*x_ref[2]**o + ((-0.052428155246-0.589567971991j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.755995529931-0.845330577085j)*x[2]**o + ((0.00607699781568+0.0166886132773j))*x[2]
+            ref[(3, 1, 1)]+=(0.755995529931-0.845330577085j)*x_ref[2]**o + ((0.00607699781568+0.0166886132773j))*x_ref[2]
+            arg[(3, 1, 2)]+=(0.125200410302+0.233874733407j)*x[2]**o + ((0.31043863761+0.414750877287j))*x[2]
+            ref[(3, 1, 2)]+=(0.125200410302+0.233874733407j)*x_ref[2]**o + ((0.31043863761+0.414750877287j))*x_ref[2]
+            arg[(3, 2, 0)]+=(-0.0629651869437+0.786497201917j)*x[2]**o + ((-0.7011229806+0.356357499176j))*x[2]
+            ref[(3, 2, 0)]+=(-0.0629651869437+0.786497201917j)*x_ref[2]**o + ((-0.7011229806+0.356357499176j))*x_ref[2]
+            arg[(3, 2, 1)]+=(0.129488631305-0.77477805543j)*x[2]**o + ((0.550005798383-0.629326678523j))*x[2]
+            ref[(3, 2, 1)]+=(0.129488631305-0.77477805543j)*x_ref[2]**o + ((0.550005798383-0.629326678523j))*x_ref[2]
+            arg[(3, 2, 2)]+=(-0.125122314875-0.866763329122j)*x[2]**o + ((0.168570483042-0.595550064896j))*x[2]
+            ref[(3, 2, 2)]+=(-0.125122314875-0.866763329122j)*x_ref[2]**o + ((0.168570483042-0.595550064896j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4, 2),w)
+        ref = Data(0,(3, 4, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.705330727826-0.0820124408269j)*x[0]**o + ((-0.306505117457-0.647262122097j))*x[0] + ((0.148862593762-0.18822339447j))*x[1]**o + ((0.0635416240815-0.234622321386j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.705330727826-0.0820124408269j)*x_ref[0]**o + ((-0.306505117457-0.647262122097j))*x_ref[0] + ((0.148862593762-0.18822339447j))*x_ref[1]**o + ((0.0635416240815-0.234622321386j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.762851149767-0.138612813836j)*x[0]**o + ((0.695026396431+0.616488606j))*x[0] + ((0.848046429959-0.184075578333j))*x[1]**o + ((0.593681577238-0.452259153714j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.762851149767-0.138612813836j)*x_ref[0]**o + ((0.695026396431+0.616488606j))*x_ref[0] + ((0.848046429959-0.184075578333j))*x_ref[1]**o + ((0.593681577238-0.452259153714j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.220194391998+0.197903553324j)*x[0]**o + ((-0.404434244105-0.134117241869j))*x[0] + ((-0.105619072344-0.566659505812j))*x[1]**o + ((0.265892254193-0.774800250893j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.220194391998+0.197903553324j)*x_ref[0]**o + ((-0.404434244105-0.134117241869j))*x_ref[0] + ((-0.105619072344-0.566659505812j))*x_ref[1]**o + ((0.265892254193-0.774800250893j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.916052465448-0.120967833456j)*x[0]**o + ((0.0134915204308+0.352906811181j))*x[0] + ((0.570805918846+0.903644590537j))*x[1]**o + ((0.863092459686-0.117278788899j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.916052465448-0.120967833456j)*x_ref[0]**o + ((0.0134915204308+0.352906811181j))*x_ref[0] + ((0.570805918846+0.903644590537j))*x_ref[1]**o + ((0.863092459686-0.117278788899j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.699673680318+0.765218910489j)*x[0]**o + ((-0.192384121592-0.710461335019j))*x[0] + ((0.243934650126-0.575346061551j))*x[1]**o + ((0.0263366129316+0.530206088408j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.699673680318+0.765218910489j)*x_ref[0]**o + ((-0.192384121592-0.710461335019j))*x_ref[0] + ((0.243934650126-0.575346061551j))*x_ref[1]**o + ((0.0263366129316+0.530206088408j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.54518377174+0.0985747154357j)*x[0]**o + ((-0.73133894597+0.0221409965082j))*x[0] + ((-0.92517919053+0.103485477386j))*x[1]**o + ((0.548340276535-0.255959455764j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.54518377174+0.0985747154357j)*x_ref[0]**o + ((-0.73133894597+0.0221409965082j))*x_ref[0] + ((-0.92517919053+0.103485477386j))*x_ref[1]**o + ((0.548340276535-0.255959455764j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(-0.00775581131346+0.608015482798j)*x[0]**o + ((-0.0190880656188+0.98976783413j))*x[0] + ((0.381837975239-0.322887978459j))*x[1]**o + ((-0.166050845089+0.766702572991j))*x[1]
+        ref[(0, 0, 3, 0)]=(-0.00775581131346+0.608015482798j)*x_ref[0]**o + ((-0.0190880656188+0.98976783413j))*x_ref[0] + ((0.381837975239-0.322887978459j))*x_ref[1]**o + ((-0.166050845089+0.766702572991j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(-0.183719054267-0.200698198607j)*x[0]**o + ((0.247168763286-0.00427859416801j))*x[0] + ((0.191214121753+0.627798308431j))*x[1]**o + ((-0.886793363731-0.223332282322j))*x[1]
+        ref[(0, 0, 3, 1)]=(-0.183719054267-0.200698198607j)*x_ref[0]**o + ((0.247168763286-0.00427859416801j))*x_ref[0] + ((0.191214121753+0.627798308431j))*x_ref[1]**o + ((-0.886793363731-0.223332282322j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.257838238041-0.351147786389j)*x[0]**o + ((-0.954266517065+0.343011398596j))*x[0] + ((-0.602005803097+0.948949601556j))*x[1]**o + ((0.73373392544-0.477117075184j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.257838238041-0.351147786389j)*x_ref[0]**o + ((-0.954266517065+0.343011398596j))*x_ref[0] + ((-0.602005803097+0.948949601556j))*x_ref[1]**o + ((0.73373392544-0.477117075184j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.101067321972-0.774074898975j)*x[0]**o + ((-0.0254164175899+0.844692495091j))*x[0] + ((0.928248434347-0.868393926812j))*x[1]**o + ((-0.310031397269+0.75577930702j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.101067321972-0.774074898975j)*x_ref[0]**o + ((-0.0254164175899+0.844692495091j))*x_ref[0] + ((0.928248434347-0.868393926812j))*x_ref[1]**o + ((-0.310031397269+0.75577930702j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.706475294187-0.67029619426j)*x[0]**o + ((-0.724012838858-0.713688666782j))*x[0] + ((0.813430843715+0.764097564401j))*x[1]**o + ((-0.338298511689-0.675426377055j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.706475294187-0.67029619426j)*x_ref[0]**o + ((-0.724012838858-0.713688666782j))*x_ref[0] + ((0.813430843715+0.764097564401j))*x_ref[1]**o + ((-0.338298511689-0.675426377055j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.937765215829+0.749598423657j)*x[0]**o + ((0.89748903945-0.0842973105498j))*x[0] + ((-0.495631449056-0.613286978645j))*x[1]**o + ((0.593264915041+0.293382044321j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.937765215829+0.749598423657j)*x_ref[0]**o + ((0.89748903945-0.0842973105498j))*x_ref[0] + ((-0.495631449056-0.613286978645j))*x_ref[1]**o + ((0.593264915041+0.293382044321j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.111523107789-0.979705701851j)*x[0]**o + ((-0.0336758152865-0.439678737425j))*x[0] + ((0.789813108004+0.794311945233j))*x[1]**o + ((0.226580789145-0.973597853201j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.111523107789-0.979705701851j)*x_ref[0]**o + ((-0.0336758152865-0.439678737425j))*x_ref[0] + ((0.789813108004+0.794311945233j))*x_ref[1]**o + ((0.226580789145-0.973597853201j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.650836912616-0.0673918444492j)*x[0]**o + ((-0.666559903682-0.542529194832j))*x[0] + ((0.209893656928-0.278710782531j))*x[1]**o + ((-0.697730820931-0.205239237942j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.650836912616-0.0673918444492j)*x_ref[0]**o + ((-0.666559903682-0.542529194832j))*x_ref[0] + ((0.209893656928-0.278710782531j))*x_ref[1]**o + ((-0.697730820931-0.205239237942j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(0.228053562339-0.342020493497j)*x[0]**o + ((0.687357920158-0.214899218613j))*x[0] + ((-0.71867108307-0.97163848929j))*x[1]**o + ((-0.820557126172+0.669699498347j))*x[1]
+        ref[(0, 1, 3, 0)]=(0.228053562339-0.342020493497j)*x_ref[0]**o + ((0.687357920158-0.214899218613j))*x_ref[0] + ((-0.71867108307-0.97163848929j))*x_ref[1]**o + ((-0.820557126172+0.669699498347j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(-0.737388293813-0.192322047242j)*x[0]**o + ((-0.192880715798-0.967381582975j))*x[0] + ((0.0295382461872+0.539112132761j))*x[1]**o + ((0.00157397045371-0.145281978747j))*x[1]
+        ref[(0, 1, 3, 1)]=(-0.737388293813-0.192322047242j)*x_ref[0]**o + ((-0.192880715798-0.967381582975j))*x_ref[0] + ((0.0295382461872+0.539112132761j))*x_ref[1]**o + ((0.00157397045371-0.145281978747j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.362167133948-0.857791704346j)*x[0]**o + ((-0.0889366561477-0.415981449293j))*x[0] + ((-0.953098970823-0.850270776771j))*x[1]**o + ((-0.675225248299+0.984386082566j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.362167133948-0.857791704346j)*x_ref[0]**o + ((-0.0889366561477-0.415981449293j))*x_ref[0] + ((-0.953098970823-0.850270776771j))*x_ref[1]**o + ((-0.675225248299+0.984386082566j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.183369758858+0.417080381313j)*x[0]**o + ((0.745640040935-0.280502116726j))*x[0] + ((0.918123495368+0.680212356437j))*x[1]**o + ((0.66356427056-0.289136248234j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.183369758858+0.417080381313j)*x_ref[0]**o + ((0.745640040935-0.280502116726j))*x_ref[0] + ((0.918123495368+0.680212356437j))*x_ref[1]**o + ((0.66356427056-0.289136248234j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.190753122725-0.627757209118j)*x[0]**o + ((-0.54695686728-0.0735966464242j))*x[0] + ((0.0442426464297+0.572263627437j))*x[1]**o + ((-0.284369180263-0.621822504979j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.190753122725-0.627757209118j)*x_ref[0]**o + ((-0.54695686728-0.0735966464242j))*x_ref[0] + ((0.0442426464297+0.572263627437j))*x_ref[1]**o + ((-0.284369180263-0.621822504979j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.352051410736+0.425973838015j)*x[0]**o + ((0.955207341412+0.782397751528j))*x[0] + ((-0.964271616653+0.408780702573j))*x[1]**o + ((-0.332063578695+0.412394205783j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.352051410736+0.425973838015j)*x_ref[0]**o + ((0.955207341412+0.782397751528j))*x_ref[0] + ((-0.964271616653+0.408780702573j))*x_ref[1]**o + ((-0.332063578695+0.412394205783j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.955734411556-0.600088977497j)*x[0]**o + ((-0.877761988242-0.781350161555j))*x[0] + ((-0.962410963812-0.197842172886j))*x[1]**o + ((0.632427395914+0.746051242001j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.955734411556-0.600088977497j)*x_ref[0]**o + ((-0.877761988242-0.781350161555j))*x_ref[0] + ((-0.962410963812-0.197842172886j))*x_ref[1]**o + ((0.632427395914+0.746051242001j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.550397050336-0.620611595105j)*x[0]**o + ((0.678431438866+0.347412676567j))*x[0] + ((0.541153128361-0.0659570845596j))*x[1]**o + ((0.468542877258+0.542622670663j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.550397050336-0.620611595105j)*x_ref[0]**o + ((0.678431438866+0.347412676567j))*x_ref[0] + ((0.541153128361-0.0659570845596j))*x_ref[1]**o + ((0.468542877258+0.542622670663j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(-0.0361689166685-0.128772580869j)*x[0]**o + ((-0.678068652633+0.536708189583j))*x[0] + ((0.359037551267-0.447412236241j))*x[1]**o + ((0.386692341676+0.589948488212j))*x[1]
+        ref[(0, 2, 3, 0)]=(-0.0361689166685-0.128772580869j)*x_ref[0]**o + ((-0.678068652633+0.536708189583j))*x_ref[0] + ((0.359037551267-0.447412236241j))*x_ref[1]**o + ((0.386692341676+0.589948488212j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(-0.48603826021-0.946380047165j)*x[0]**o + ((0.465736519442+0.489553023652j))*x[0] + ((-0.724178936719+0.993329595632j))*x[1]**o + ((-0.513451552212-0.835582370666j))*x[1]
+        ref[(0, 2, 3, 1)]=(-0.48603826021-0.946380047165j)*x_ref[0]**o + ((0.465736519442+0.489553023652j))*x_ref[0] + ((-0.724178936719+0.993329595632j))*x_ref[1]**o + ((-0.513451552212-0.835582370666j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(-0.136386870756-0.558844362784j)*x[0]**o + ((0.596026896135+0.635931934959j))*x[0] + ((-0.85277802495-0.11594489491j))*x[1]**o + ((0.242191012439+0.283091538437j))*x[1]
+        ref[(0, 3, 0, 0)]=(-0.136386870756-0.558844362784j)*x_ref[0]**o + ((0.596026896135+0.635931934959j))*x_ref[0] + ((-0.85277802495-0.11594489491j))*x_ref[1]**o + ((0.242191012439+0.283091538437j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.704189186488-0.785339746549j)*x[0]**o + ((-0.679959646813-0.672199563218j))*x[0] + ((-0.0789944041235+0.872094488515j))*x[1]**o + ((0.903803672152+0.861680556223j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.704189186488-0.785339746549j)*x_ref[0]**o + ((-0.679959646813-0.672199563218j))*x_ref[0] + ((-0.0789944041235+0.872094488515j))*x_ref[1]**o + ((0.903803672152+0.861680556223j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.00997412163358-0.304769616154j)*x[0]**o + ((0.0545107949912-0.314400935948j))*x[0] + ((-0.360379026894-0.59402702458j))*x[1]**o + ((0.146258918625-0.750080982177j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.00997412163358-0.304769616154j)*x_ref[0]**o + ((0.0545107949912-0.314400935948j))*x_ref[0] + ((-0.360379026894-0.59402702458j))*x_ref[1]**o + ((0.146258918625-0.750080982177j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.644556315218-0.597205416957j)*x[0]**o + ((0.0601465007428+0.313038047613j))*x[0] + ((-0.383205064218+0.667872925711j))*x[1]**o + ((-0.483902130696+0.165378365354j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.644556315218-0.597205416957j)*x_ref[0]**o + ((0.0601465007428+0.313038047613j))*x_ref[0] + ((-0.383205064218+0.667872925711j))*x_ref[1]**o + ((-0.483902130696+0.165378365354j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.509973245603+0.650008943956j)*x[0]**o + ((-0.638520448727+0.0361401482364j))*x[0] + ((-0.785187888369+0.375547178159j))*x[1]**o + ((-0.877042505657+0.984578077139j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.509973245603+0.650008943956j)*x_ref[0]**o + ((-0.638520448727+0.0361401482364j))*x_ref[0] + ((-0.785187888369+0.375547178159j))*x_ref[1]**o + ((-0.877042505657+0.984578077139j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(0.798182781397+0.864376658901j)*x[0]**o + ((0.538346935355+0.396267945694j))*x[0] + ((0.932051001625-0.299755050079j))*x[1]**o + ((0.215289984558+0.608303901658j))*x[1]
+        ref[(0, 3, 2, 1)]=(0.798182781397+0.864376658901j)*x_ref[0]**o + ((0.538346935355+0.396267945694j))*x_ref[0] + ((0.932051001625-0.299755050079j))*x_ref[1]**o + ((0.215289984558+0.608303901658j))*x_ref[1]
+        arg[(0, 3, 3, 0)]=(0.86112937319+0.714143268676j)*x[0]**o + ((0.278586701321+0.636050987516j))*x[0] + ((-0.919516854458+0.0275443206654j))*x[1]**o + ((-0.0217092232875+0.0396318485302j))*x[1]
+        ref[(0, 3, 3, 0)]=(0.86112937319+0.714143268676j)*x_ref[0]**o + ((0.278586701321+0.636050987516j))*x_ref[0] + ((-0.919516854458+0.0275443206654j))*x_ref[1]**o + ((-0.0217092232875+0.0396318485302j))*x_ref[1]
+        arg[(0, 3, 3, 1)]=(0.222905139606+0.479859369196j)*x[0]**o + ((-0.488928619552+0.4048742835j))*x[0] + ((-0.00460959150732+0.64687744683j))*x[1]**o + ((0.891078732553-0.125625519374j))*x[1]
+        ref[(0, 3, 3, 1)]=(0.222905139606+0.479859369196j)*x_ref[0]**o + ((-0.488928619552+0.4048742835j))*x_ref[0] + ((-0.00460959150732+0.64687744683j))*x_ref[1]**o + ((0.891078732553-0.125625519374j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.305051830222+0.0670235415311j)*x[0]**o + ((-0.166641376598+0.776663844467j))*x[0] + ((0.102856285054-0.253230875471j))*x[1]**o + ((-0.552756288079+0.330580567633j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.305051830222+0.0670235415311j)*x_ref[0]**o + ((-0.166641376598+0.776663844467j))*x_ref[0] + ((0.102856285054-0.253230875471j))*x_ref[1]**o + ((-0.552756288079+0.330580567633j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.446937785587-0.14258847615j)*x[0]**o + ((0.243983066838-0.415334103212j))*x[0] + ((0.685045257051-0.879283811295j))*x[1]**o + ((0.967051385513-0.722412972957j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.446937785587-0.14258847615j)*x_ref[0]**o + ((0.243983066838-0.415334103212j))*x_ref[0] + ((0.685045257051-0.879283811295j))*x_ref[1]**o + ((0.967051385513-0.722412972957j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.696737549457-0.0257935884513j)*x[0]**o + ((-0.643958174258+0.595446026729j))*x[0] + ((0.93200446434-0.0518016185142j))*x[1]**o + ((-0.755213467082-0.20632136997j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.696737549457-0.0257935884513j)*x_ref[0]**o + ((-0.643958174258+0.595446026729j))*x_ref[0] + ((0.93200446434-0.0518016185142j))*x_ref[1]**o + ((-0.755213467082-0.20632136997j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.464359858152-0.807350765819j)*x[0]**o + ((-0.797736153511+0.75520347078j))*x[0] + ((0.218110707788+0.590053212123j))*x[1]**o + ((0.86398530158-0.388616934984j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.464359858152-0.807350765819j)*x_ref[0]**o + ((-0.797736153511+0.75520347078j))*x_ref[0] + ((0.218110707788+0.590053212123j))*x_ref[1]**o + ((0.86398530158-0.388616934984j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.0176092397497+0.801886105547j)*x[0]**o + ((-0.468051971672+0.626127255141j))*x[0] + ((0.920203225143+0.0820284683317j))*x[1]**o + ((0.913212175231+0.885209780242j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.0176092397497+0.801886105547j)*x_ref[0]**o + ((-0.468051971672+0.626127255141j))*x_ref[0] + ((0.920203225143+0.0820284683317j))*x_ref[1]**o + ((0.913212175231+0.885209780242j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.866909651034+0.809448108918j)*x[0]**o + ((-0.657393676778-0.311739389926j))*x[0] + ((0.776531628245+0.304017494574j))*x[1]**o + ((0.276566183902+0.272166639746j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.866909651034+0.809448108918j)*x_ref[0]**o + ((-0.657393676778-0.311739389926j))*x_ref[0] + ((0.776531628245+0.304017494574j))*x_ref[1]**o + ((0.276566183902+0.272166639746j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(0.875330426714-0.686062827575j)*x[0]**o + ((-0.487644833726+0.159158338453j))*x[0] + ((-0.134748480362-0.201490428566j))*x[1]**o + ((0.794531011137-0.300616913301j))*x[1]
+        ref[(1, 0, 3, 0)]=(0.875330426714-0.686062827575j)*x_ref[0]**o + ((-0.487644833726+0.159158338453j))*x_ref[0] + ((-0.134748480362-0.201490428566j))*x_ref[1]**o + ((0.794531011137-0.300616913301j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.130062573456-0.254429499234j)*x[0]**o + ((0.8602772079+0.813984310826j))*x[0] + ((-0.233549396492-0.323077011134j))*x[1]**o + ((-0.675663470456-0.227088919542j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.130062573456-0.254429499234j)*x_ref[0]**o + ((0.8602772079+0.813984310826j))*x_ref[0] + ((-0.233549396492-0.323077011134j))*x_ref[1]**o + ((-0.675663470456-0.227088919542j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.838664707559+0.693116090507j)*x[0]**o + ((0.424122500925+0.12016750628j))*x[0] + ((-0.474006138482+0.172499114394j))*x[1]**o + ((0.515961973831+0.165689046172j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.838664707559+0.693116090507j)*x_ref[0]**o + ((0.424122500925+0.12016750628j))*x_ref[0] + ((-0.474006138482+0.172499114394j))*x_ref[1]**o + ((0.515961973831+0.165689046172j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.77393601756+0.435587577242j)*x[0]**o + ((-0.731678415958+0.470427224085j))*x[0] + ((-0.263707088072-0.0623224051769j))*x[1]**o + ((-0.222018574026-0.0323720665961j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.77393601756+0.435587577242j)*x_ref[0]**o + ((-0.731678415958+0.470427224085j))*x_ref[0] + ((-0.263707088072-0.0623224051769j))*x_ref[1]**o + ((-0.222018574026-0.0323720665961j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.746312140082+0.983070520325j)*x[0]**o + ((-0.352748121949-0.114708269302j))*x[0] + ((0.80506917304-0.674974618039j))*x[1]**o + ((-0.87479360219-0.813504293817j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.746312140082+0.983070520325j)*x_ref[0]**o + ((-0.352748121949-0.114708269302j))*x_ref[0] + ((0.80506917304-0.674974618039j))*x_ref[1]**o + ((-0.87479360219-0.813504293817j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.597789931875-0.420994005859j)*x[0]**o + ((0.122851679468-0.879187385447j))*x[0] + ((-0.338066673204-0.718797361255j))*x[1]**o + ((-0.30885817567+0.972045196883j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.597789931875-0.420994005859j)*x_ref[0]**o + ((0.122851679468-0.879187385447j))*x_ref[0] + ((-0.338066673204-0.718797361255j))*x_ref[1]**o + ((-0.30885817567+0.972045196883j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.610530878717+0.987882583323j)*x[0]**o + ((-0.695705326953+0.218647317094j))*x[0] + ((0.574046702386-0.0781159828001j))*x[1]**o + ((0.481035539082-0.12000280403j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.610530878717+0.987882583323j)*x_ref[0]**o + ((-0.695705326953+0.218647317094j))*x_ref[0] + ((0.574046702386-0.0781159828001j))*x_ref[1]**o + ((0.481035539082-0.12000280403j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.709215801539+0.346510943088j)*x[0]**o + ((0.111252542477+0.782675860513j))*x[0] + ((-0.939792219197-0.327340563686j))*x[1]**o + ((0.590618401586+0.552777516316j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.709215801539+0.346510943088j)*x_ref[0]**o + ((0.111252542477+0.782675860513j))*x_ref[0] + ((-0.939792219197-0.327340563686j))*x_ref[1]**o + ((0.590618401586+0.552777516316j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(-0.594200129486+0.613557486588j)*x[0]**o + ((-0.91128644168-0.165077485222j))*x[0] + ((-0.642814652656+0.0284804491566j))*x[1]**o + ((-0.331378762922+0.535683400884j))*x[1]
+        ref[(1, 1, 3, 0)]=(-0.594200129486+0.613557486588j)*x_ref[0]**o + ((-0.91128644168-0.165077485222j))*x_ref[0] + ((-0.642814652656+0.0284804491566j))*x_ref[1]**o + ((-0.331378762922+0.535683400884j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.329253360801+0.880534664508j)*x[0]**o + ((-0.0500281799586-0.199498552311j))*x[0] + ((0.69377861054+0.790008394072j))*x[1]**o + ((-0.454471882408-0.69686466192j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.329253360801+0.880534664508j)*x_ref[0]**o + ((-0.0500281799586-0.199498552311j))*x_ref[0] + ((0.69377861054+0.790008394072j))*x_ref[1]**o + ((-0.454471882408-0.69686466192j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.794458434205+0.0955690330336j)*x[0]**o + ((-0.764121427966+0.261962848409j))*x[0] + ((-0.885501549216+0.292611944475j))*x[1]**o + ((0.139704803794+0.994492145269j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.794458434205+0.0955690330336j)*x_ref[0]**o + ((-0.764121427966+0.261962848409j))*x_ref[0] + ((-0.885501549216+0.292611944475j))*x_ref[1]**o + ((0.139704803794+0.994492145269j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.126754087709+0.691737162126j)*x[0]**o + ((-0.897290955595+0.446282388109j))*x[0] + ((0.13175967684+0.766482560594j))*x[1]**o + ((0.526286732352+0.807468577572j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.126754087709+0.691737162126j)*x_ref[0]**o + ((-0.897290955595+0.446282388109j))*x_ref[0] + ((0.13175967684+0.766482560594j))*x_ref[1]**o + ((0.526286732352+0.807468577572j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.185578551292-0.97001574764j)*x[0]**o + ((0.730691174481-0.337768296413j))*x[0] + ((0.87338868151+0.304582525931j))*x[1]**o + ((0.505815597161+0.321359347006j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.185578551292-0.97001574764j)*x_ref[0]**o + ((0.730691174481-0.337768296413j))*x_ref[0] + ((0.87338868151+0.304582525931j))*x_ref[1]**o + ((0.505815597161+0.321359347006j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.2062945365+0.622996771191j)*x[0]**o + ((-0.318191905806-0.374490012585j))*x[0] + ((0.631813146537+0.135086892005j))*x[1]**o + ((0.894830693166-0.955919593633j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.2062945365+0.622996771191j)*x_ref[0]**o + ((-0.318191905806-0.374490012585j))*x_ref[0] + ((0.631813146537+0.135086892005j))*x_ref[1]**o + ((0.894830693166-0.955919593633j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.227570530378-0.268522973277j)*x[0]**o + ((-0.140044747456-0.146008683325j))*x[0] + ((-0.128539801435-0.905381367659j))*x[1]**o + ((-0.613477751408-0.703358983192j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.227570530378-0.268522973277j)*x_ref[0]**o + ((-0.140044747456-0.146008683325j))*x_ref[0] + ((-0.128539801435-0.905381367659j))*x_ref[1]**o + ((-0.613477751408-0.703358983192j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(0.457498854034-0.196754033916j)*x[0]**o + ((0.954940810473+0.264614304114j))*x[0] + ((-0.912629998236+0.901265452432j))*x[1]**o + ((-0.094189788712-0.772527930185j))*x[1]
+        ref[(1, 2, 2, 1)]=(0.457498854034-0.196754033916j)*x_ref[0]**o + ((0.954940810473+0.264614304114j))*x_ref[0] + ((-0.912629998236+0.901265452432j))*x_ref[1]**o + ((-0.094189788712-0.772527930185j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(-0.876614506343+0.068405209858j)*x[0]**o + ((-0.715773868615-0.437588472556j))*x[0] + ((-0.276140947694+0.408453649181j))*x[1]**o + ((0.53595763001-0.425027752218j))*x[1]
+        ref[(1, 2, 3, 0)]=(-0.876614506343+0.068405209858j)*x_ref[0]**o + ((-0.715773868615-0.437588472556j))*x_ref[0] + ((-0.276140947694+0.408453649181j))*x_ref[1]**o + ((0.53595763001-0.425027752218j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(0.246174791861-0.0619718527763j)*x[0]**o + ((0.63389748368-0.989594981622j))*x[0] + ((0.313406214044-0.310140886112j))*x[1]**o + ((0.828633893854-0.245433392358j))*x[1]
+        ref[(1, 2, 3, 1)]=(0.246174791861-0.0619718527763j)*x_ref[0]**o + ((0.63389748368-0.989594981622j))*x_ref[0] + ((0.313406214044-0.310140886112j))*x_ref[1]**o + ((0.828633893854-0.245433392358j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.263890228291+0.113356406029j)*x[0]**o + ((0.270166527324+0.188941528031j))*x[0] + ((-0.203813027513-0.338815427008j))*x[1]**o + ((-0.849559238982-0.842609470402j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.263890228291+0.113356406029j)*x_ref[0]**o + ((0.270166527324+0.188941528031j))*x_ref[0] + ((-0.203813027513-0.338815427008j))*x_ref[1]**o + ((-0.849559238982-0.842609470402j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(0.885383645958+0.190036423042j)*x[0]**o + ((-0.829179450035+0.966500895015j))*x[0] + ((-0.518061229389-0.909094270642j))*x[1]**o + ((-0.521915671127-0.0896068180203j))*x[1]
+        ref[(1, 3, 0, 1)]=(0.885383645958+0.190036423042j)*x_ref[0]**o + ((-0.829179450035+0.966500895015j))*x_ref[0] + ((-0.518061229389-0.909094270642j))*x_ref[1]**o + ((-0.521915671127-0.0896068180203j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(0.157938037429+0.944019750407j)*x[0]**o + ((-0.299679147382-0.732110919197j))*x[0] + ((0.249623339374+0.42428267564j))*x[1]**o + ((-0.0221496646266+0.696834457917j))*x[1]
+        ref[(1, 3, 1, 0)]=(0.157938037429+0.944019750407j)*x_ref[0]**o + ((-0.299679147382-0.732110919197j))*x_ref[0] + ((0.249623339374+0.42428267564j))*x_ref[1]**o + ((-0.0221496646266+0.696834457917j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.932178084032-0.355608863339j)*x[0]**o + ((-0.922042420142+0.247224905049j))*x[0] + ((0.224749437109-0.0111343023373j))*x[1]**o + ((-0.0977141997639-0.309649728073j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.932178084032-0.355608863339j)*x_ref[0]**o + ((-0.922042420142+0.247224905049j))*x_ref[0] + ((0.224749437109-0.0111343023373j))*x_ref[1]**o + ((-0.0977141997639-0.309649728073j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(0.365876088086-0.880839734565j)*x[0]**o + ((-0.781698174361-0.92761620064j))*x[0] + ((0.224058994611+0.149691219209j))*x[1]**o + ((0.324893422184+0.176650399876j))*x[1]
+        ref[(1, 3, 2, 0)]=(0.365876088086-0.880839734565j)*x_ref[0]**o + ((-0.781698174361-0.92761620064j))*x_ref[0] + ((0.224058994611+0.149691219209j))*x_ref[1]**o + ((0.324893422184+0.176650399876j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(0.306159674798-0.9821218932j)*x[0]**o + ((-0.694462902557-0.398881705968j))*x[0] + ((0.363824364164-0.708328208727j))*x[1]**o + ((-0.693892484249-0.337609321895j))*x[1]
+        ref[(1, 3, 2, 1)]=(0.306159674798-0.9821218932j)*x_ref[0]**o + ((-0.694462902557-0.398881705968j))*x_ref[0] + ((0.363824364164-0.708328208727j))*x_ref[1]**o + ((-0.693892484249-0.337609321895j))*x_ref[1]
+        arg[(1, 3, 3, 0)]=(0.224485838916-0.385368684093j)*x[0]**o + ((0.357907167586-0.0353312060739j))*x[0] + ((-0.254471121295-0.103873807489j))*x[1]**o + ((-0.616483378013-0.146901474167j))*x[1]
+        ref[(1, 3, 3, 0)]=(0.224485838916-0.385368684093j)*x_ref[0]**o + ((0.357907167586-0.0353312060739j))*x_ref[0] + ((-0.254471121295-0.103873807489j))*x_ref[1]**o + ((-0.616483378013-0.146901474167j))*x_ref[1]
+        arg[(1, 3, 3, 1)]=(0.866258925715-0.195682647847j)*x[0]**o + ((0.517179125792-0.500020717902j))*x[0] + ((0.763826868763+0.199217192633j))*x[1]**o + ((0.821479934276-0.036361612125j))*x[1]
+        ref[(1, 3, 3, 1)]=(0.866258925715-0.195682647847j)*x_ref[0]**o + ((0.517179125792-0.500020717902j))*x_ref[0] + ((0.763826868763+0.199217192633j))*x_ref[1]**o + ((0.821479934276-0.036361612125j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.403176075699-0.179836477458j)*x[0]**o + ((0.459201927364-0.791698716119j))*x[0] + ((-0.337669083579-0.0445397718725j))*x[1]**o + ((0.629927280477-0.780495827882j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.403176075699-0.179836477458j)*x_ref[0]**o + ((0.459201927364-0.791698716119j))*x_ref[0] + ((-0.337669083579-0.0445397718725j))*x_ref[1]**o + ((0.629927280477-0.780495827882j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.819044525064-0.468441188833j)*x[0]**o + ((-0.0633728614383+0.43716898306j))*x[0] + ((-0.358800830367-0.370954441723j))*x[1]**o + ((-0.625966365834+0.356169653929j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.819044525064-0.468441188833j)*x_ref[0]**o + ((-0.0633728614383+0.43716898306j))*x_ref[0] + ((-0.358800830367-0.370954441723j))*x_ref[1]**o + ((-0.625966365834+0.356169653929j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.112646711495-0.721801494795j)*x[0]**o + ((-0.268883140535+0.158536352419j))*x[0] + ((0.942920847201+0.0807722745252j))*x[1]**o + ((-0.0364757639846+0.890053467756j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.112646711495-0.721801494795j)*x_ref[0]**o + ((-0.268883140535+0.158536352419j))*x_ref[0] + ((0.942920847201+0.0807722745252j))*x_ref[1]**o + ((-0.0364757639846+0.890053467756j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.241250578652+0.239803219139j)*x[0]**o + ((0.752313274425-0.195146891715j))*x[0] + ((-0.284676897257-0.109378129837j))*x[1]**o + ((0.519805227035-0.360809436201j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.241250578652+0.239803219139j)*x_ref[0]**o + ((0.752313274425-0.195146891715j))*x_ref[0] + ((-0.284676897257-0.109378129837j))*x_ref[1]**o + ((0.519805227035-0.360809436201j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(0.248292782745-0.590022936532j)*x[0]**o + ((-0.522948699316-0.276991215667j))*x[0] + ((0.365412259157-0.497077734384j))*x[1]**o + ((-0.494620485457+0.54073080076j))*x[1]
+        ref[(2, 0, 2, 0)]=(0.248292782745-0.590022936532j)*x_ref[0]**o + ((-0.522948699316-0.276991215667j))*x_ref[0] + ((0.365412259157-0.497077734384j))*x_ref[1]**o + ((-0.494620485457+0.54073080076j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(-0.7914773726+0.362442054157j)*x[0]**o + ((-0.280441644824+0.168832246768j))*x[0] + ((0.794222574605+0.651575782093j))*x[1]**o + ((-0.348269697964-0.861209776399j))*x[1]
+        ref[(2, 0, 2, 1)]=(-0.7914773726+0.362442054157j)*x_ref[0]**o + ((-0.280441644824+0.168832246768j))*x_ref[0] + ((0.794222574605+0.651575782093j))*x_ref[1]**o + ((-0.348269697964-0.861209776399j))*x_ref[1]
+        arg[(2, 0, 3, 0)]=(0.103965821891+0.157143382691j)*x[0]**o + ((0.35603237522-0.961842422806j))*x[0] + ((0.193473932176-0.923564689964j))*x[1]**o + ((0.155540919702-0.0943127771702j))*x[1]
+        ref[(2, 0, 3, 0)]=(0.103965821891+0.157143382691j)*x_ref[0]**o + ((0.35603237522-0.961842422806j))*x_ref[0] + ((0.193473932176-0.923564689964j))*x_ref[1]**o + ((0.155540919702-0.0943127771702j))*x_ref[1]
+        arg[(2, 0, 3, 1)]=(0.989153080808+0.373555025746j)*x[0]**o + ((-0.344802648727-0.187500250214j))*x[0] + ((0.975394275785+0.00973471662663j))*x[1]**o + ((0.794943359772+0.401910695263j))*x[1]
+        ref[(2, 0, 3, 1)]=(0.989153080808+0.373555025746j)*x_ref[0]**o + ((-0.344802648727-0.187500250214j))*x_ref[0] + ((0.975394275785+0.00973471662663j))*x_ref[1]**o + ((0.794943359772+0.401910695263j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.124669611845-0.284770160159j)*x[0]**o + ((0.505020553791-0.419281259008j))*x[0] + ((-0.429311259125-0.259479430793j))*x[1]**o + ((-0.259798973946-0.406969403393j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.124669611845-0.284770160159j)*x_ref[0]**o + ((0.505020553791-0.419281259008j))*x_ref[0] + ((-0.429311259125-0.259479430793j))*x_ref[1]**o + ((-0.259798973946-0.406969403393j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.263224760418-0.143330196935j)*x[0]**o + ((0.73209425493-0.602811955433j))*x[0] + ((-0.791109020748-0.684609036685j))*x[1]**o + ((0.820668165586+0.279022272663j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.263224760418-0.143330196935j)*x_ref[0]**o + ((0.73209425493-0.602811955433j))*x_ref[0] + ((-0.791109020748-0.684609036685j))*x_ref[1]**o + ((0.820668165586+0.279022272663j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.434812165789+0.969444538153j)*x[0]**o + ((0.811551603912-0.420625650171j))*x[0] + ((0.389719278436+0.913981408947j))*x[1]**o + ((0.102647038088-0.597682062604j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.434812165789+0.969444538153j)*x_ref[0]**o + ((0.811551603912-0.420625650171j))*x_ref[0] + ((0.389719278436+0.913981408947j))*x_ref[1]**o + ((0.102647038088-0.597682062604j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.771789460052+0.417712228347j)*x[0]**o + ((-0.229751057959+0.871537001593j))*x[0] + ((-0.488692034635+0.00874545400657j))*x[1]**o + ((0.709679185728+0.665416356206j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.771789460052+0.417712228347j)*x_ref[0]**o + ((-0.229751057959+0.871537001593j))*x_ref[0] + ((-0.488692034635+0.00874545400657j))*x_ref[1]**o + ((0.709679185728+0.665416356206j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.454805291213-0.181810985983j)*x[0]**o + ((0.718224539818+0.451547856168j))*x[0] + ((-0.855370581641+0.0336004924084j))*x[1]**o + ((-0.653936338846+0.264721599543j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.454805291213-0.181810985983j)*x_ref[0]**o + ((0.718224539818+0.451547856168j))*x_ref[0] + ((-0.855370581641+0.0336004924084j))*x_ref[1]**o + ((-0.653936338846+0.264721599543j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.919760231039+0.503941241399j)*x[0]**o + ((-0.284302712964+0.520953134903j))*x[0] + ((0.435899425618-0.61725435579j))*x[1]**o + ((0.403094500772-0.542995904229j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.919760231039+0.503941241399j)*x_ref[0]**o + ((-0.284302712964+0.520953134903j))*x_ref[0] + ((0.435899425618-0.61725435579j))*x_ref[1]**o + ((0.403094500772-0.542995904229j))*x_ref[1]
+        arg[(2, 1, 3, 0)]=(0.0740040834857+0.208038997572j)*x[0]**o + ((-0.338677481366+0.175932647064j))*x[0] + ((-0.765754426393+0.702556164744j))*x[1]**o + ((-0.819718448639+0.771081203679j))*x[1]
+        ref[(2, 1, 3, 0)]=(0.0740040834857+0.208038997572j)*x_ref[0]**o + ((-0.338677481366+0.175932647064j))*x_ref[0] + ((-0.765754426393+0.702556164744j))*x_ref[1]**o + ((-0.819718448639+0.771081203679j))*x_ref[1]
+        arg[(2, 1, 3, 1)]=(0.645557614147+0.736501902329j)*x[0]**o + ((-0.617265084253+0.488989781925j))*x[0] + ((0.492556136569+0.774885795633j))*x[1]**o + ((0.331276173068+0.526034584075j))*x[1]
+        ref[(2, 1, 3, 1)]=(0.645557614147+0.736501902329j)*x_ref[0]**o + ((-0.617265084253+0.488989781925j))*x_ref[0] + ((0.492556136569+0.774885795633j))*x_ref[1]**o + ((0.331276173068+0.526034584075j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.280538494234+0.376009365718j)*x[0]**o + ((-0.173686295543-0.141884434901j))*x[0] + ((0.658251252391+0.26928089658j))*x[1]**o + ((0.786777830133-0.035208965271j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.280538494234+0.376009365718j)*x_ref[0]**o + ((-0.173686295543-0.141884434901j))*x_ref[0] + ((0.658251252391+0.26928089658j))*x_ref[1]**o + ((0.786777830133-0.035208965271j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.508485936113-0.321655112756j)*x[0]**o + ((-0.143020453149+0.21334913981j))*x[0] + ((-0.358103565306+0.232755503586j))*x[1]**o + ((0.518005106913-0.938932254588j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.508485936113-0.321655112756j)*x_ref[0]**o + ((-0.143020453149+0.21334913981j))*x_ref[0] + ((-0.358103565306+0.232755503586j))*x_ref[1]**o + ((0.518005106913-0.938932254588j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.158252425558-0.019022304468j)*x[0]**o + ((-0.582184426256+0.323346076596j))*x[0] + ((0.723529253832-0.123957175494j))*x[1]**o + ((-0.498245569367+0.595530107674j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.158252425558-0.019022304468j)*x_ref[0]**o + ((-0.582184426256+0.323346076596j))*x_ref[0] + ((0.723529253832-0.123957175494j))*x_ref[1]**o + ((-0.498245569367+0.595530107674j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.728461076003-0.350321185364j)*x[0]**o + ((-0.917273253266-0.284145218839j))*x[0] + ((0.22835531495+0.057864141299j))*x[1]**o + ((0.556564173398+0.939708030131j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.728461076003-0.350321185364j)*x_ref[0]**o + ((-0.917273253266-0.284145218839j))*x_ref[0] + ((0.22835531495+0.057864141299j))*x_ref[1]**o + ((0.556564173398+0.939708030131j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(0.724632220834+0.189904809606j)*x[0]**o + ((-0.0441110260416-0.739409232317j))*x[0] + ((0.395388817335+0.746784697415j))*x[1]**o + ((0.297329263674-0.422840929449j))*x[1]
+        ref[(2, 2, 2, 0)]=(0.724632220834+0.189904809606j)*x_ref[0]**o + ((-0.0441110260416-0.739409232317j))*x_ref[0] + ((0.395388817335+0.746784697415j))*x_ref[1]**o + ((0.297329263674-0.422840929449j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.976798926339+0.218522853945j)*x[0]**o + ((-0.539796056255-0.593765137753j))*x[0] + ((0.617734393618+0.839100099431j))*x[1]**o + ((0.053450682806-0.775885699736j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.976798926339+0.218522853945j)*x_ref[0]**o + ((-0.539796056255-0.593765137753j))*x_ref[0] + ((0.617734393618+0.839100099431j))*x_ref[1]**o + ((0.053450682806-0.775885699736j))*x_ref[1]
+        arg[(2, 2, 3, 0)]=(-0.169556799217+0.193039463155j)*x[0]**o + ((0.000505849401474+0.0440529383951j))*x[0] + ((0.392437026969-0.0754322438314j))*x[1]**o + ((-0.588773562185+0.861684228199j))*x[1]
+        ref[(2, 2, 3, 0)]=(-0.169556799217+0.193039463155j)*x_ref[0]**o + ((0.000505849401474+0.0440529383951j))*x_ref[0] + ((0.392437026969-0.0754322438314j))*x_ref[1]**o + ((-0.588773562185+0.861684228199j))*x_ref[1]
+        arg[(2, 2, 3, 1)]=(0.344708327134+0.311984656914j)*x[0]**o + ((-0.0376264591039-0.0176522603388j))*x[0] + ((-0.414828391658-0.284526083029j))*x[1]**o + ((-0.8730163784-0.504561949535j))*x[1]
+        ref[(2, 2, 3, 1)]=(0.344708327134+0.311984656914j)*x_ref[0]**o + ((-0.0376264591039-0.0176522603388j))*x_ref[0] + ((-0.414828391658-0.284526083029j))*x_ref[1]**o + ((-0.8730163784-0.504561949535j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(0.687156020441-0.314082426937j)*x[0]**o + ((-0.473792637936-0.278179935966j))*x[0] + ((-0.598205498104+0.765626827194j))*x[1]**o + ((-0.369959227466+0.41795285294j))*x[1]
+        ref[(2, 3, 0, 0)]=(0.687156020441-0.314082426937j)*x_ref[0]**o + ((-0.473792637936-0.278179935966j))*x_ref[0] + ((-0.598205498104+0.765626827194j))*x_ref[1]**o + ((-0.369959227466+0.41795285294j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(-0.30388533315+0.646423120435j)*x[0]**o + ((0.963397512985+0.470923618519j))*x[0] + ((0.0725789515375+0.342926000138j))*x[1]**o + ((0.733852968491+0.34293045907j))*x[1]
+        ref[(2, 3, 0, 1)]=(-0.30388533315+0.646423120435j)*x_ref[0]**o + ((0.963397512985+0.470923618519j))*x_ref[0] + ((0.0725789515375+0.342926000138j))*x_ref[1]**o + ((0.733852968491+0.34293045907j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(0.648365786429-0.735551212402j)*x[0]**o + ((-0.161170582311+0.832489537493j))*x[0] + ((0.661319084056-0.539849599446j))*x[1]**o + ((-0.360227131614-0.652680613207j))*x[1]
+        ref[(2, 3, 1, 0)]=(0.648365786429-0.735551212402j)*x_ref[0]**o + ((-0.161170582311+0.832489537493j))*x_ref[0] + ((0.661319084056-0.539849599446j))*x_ref[1]**o + ((-0.360227131614-0.652680613207j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(-0.426135072361-0.952726654527j)*x[0]**o + ((0.163884073584+0.318425788503j))*x[0] + ((-0.618620385614+0.10225821695j))*x[1]**o + ((-0.0889452236251-0.978331621234j))*x[1]
+        ref[(2, 3, 1, 1)]=(-0.426135072361-0.952726654527j)*x_ref[0]**o + ((0.163884073584+0.318425788503j))*x_ref[0] + ((-0.618620385614+0.10225821695j))*x_ref[1]**o + ((-0.0889452236251-0.978331621234j))*x_ref[1]
+        arg[(2, 3, 2, 0)]=(-0.914501101498-0.257607827692j)*x[0]**o + ((-0.618323393932-0.544209734068j))*x[0] + ((-0.153487075931+0.410724636746j))*x[1]**o + ((0.116487296883-0.276869939089j))*x[1]
+        ref[(2, 3, 2, 0)]=(-0.914501101498-0.257607827692j)*x_ref[0]**o + ((-0.618323393932-0.544209734068j))*x_ref[0] + ((-0.153487075931+0.410724636746j))*x_ref[1]**o + ((0.116487296883-0.276869939089j))*x_ref[1]
+        arg[(2, 3, 2, 1)]=(0.985896877051+0.687953062199j)*x[0]**o + ((-0.926970643239-0.783584864547j))*x[0] + ((0.343743959608+0.878301127395j))*x[1]**o + ((0.889150885555+0.210102053229j))*x[1]
+        ref[(2, 3, 2, 1)]=(0.985896877051+0.687953062199j)*x_ref[0]**o + ((-0.926970643239-0.783584864547j))*x_ref[0] + ((0.343743959608+0.878301127395j))*x_ref[1]**o + ((0.889150885555+0.210102053229j))*x_ref[1]
+        arg[(2, 3, 3, 0)]=(0.429704929062+0.113121230034j)*x[0]**o + ((-0.0244570228801+0.473109189703j))*x[0] + ((0.818532434016-0.485796103857j))*x[1]**o + ((-0.257412717546-0.885951386694j))*x[1]
+        ref[(2, 3, 3, 0)]=(0.429704929062+0.113121230034j)*x_ref[0]**o + ((-0.0244570228801+0.473109189703j))*x_ref[0] + ((0.818532434016-0.485796103857j))*x_ref[1]**o + ((-0.257412717546-0.885951386694j))*x_ref[1]
+        arg[(2, 3, 3, 1)]=(-0.598895649264-0.236004997315j)*x[0]**o + ((0.769940549003-0.0166802435084j))*x[0] + ((-0.0284503012402+0.217360616602j))*x[1]**o + ((-0.0618356919666-0.507202585055j))*x[1]
+        ref[(2, 3, 3, 1)]=(-0.598895649264-0.236004997315j)*x_ref[0]**o + ((0.769940549003-0.0166802435084j))*x_ref[0] + ((-0.0284503012402+0.217360616602j))*x_ref[1]**o + ((-0.0618356919666-0.507202585055j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.408559310452-0.221729503131j)*x[2]**o + ((0.592514684524-0.83125254703j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.408559310452-0.221729503131j)*x_ref[2]**o + ((0.592514684524-0.83125254703j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.00664165936726-0.462419617762j)*x[2]**o + ((-0.409329128209+0.941338147603j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.00664165936726-0.462419617762j)*x_ref[2]**o + ((-0.409329128209+0.941338147603j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.771499405243+0.0605684649068j)*x[2]**o + ((0.979044698029+0.938256563278j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.771499405243+0.0605684649068j)*x_ref[2]**o + ((0.979044698029+0.938256563278j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.194081195634+0.13487950868j)*x[2]**o + ((0.754120929084-0.846431496775j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.194081195634+0.13487950868j)*x_ref[2]**o + ((0.754120929084-0.846431496775j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.301539501531-0.869630771739j)*x[2]**o + ((-0.818028293558+0.82060125004j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.301539501531-0.869630771739j)*x_ref[2]**o + ((-0.818028293558+0.82060125004j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.529565037023-0.787132043206j)*x[2]**o + ((-0.968493450646-0.831063125689j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.529565037023-0.787132043206j)*x_ref[2]**o + ((-0.968493450646-0.831063125689j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(0.109189163223+0.23522713976j)*x[2]**o + ((0.579572968385-0.319334039434j))*x[2]
+            ref[(0, 0, 3, 0)]+=(0.109189163223+0.23522713976j)*x_ref[2]**o + ((0.579572968385-0.319334039434j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(0.813546382511-0.980047115402j)*x[2]**o + ((-0.875623921143+0.209194056874j))*x[2]
+            ref[(0, 0, 3, 1)]+=(0.813546382511-0.980047115402j)*x_ref[2]**o + ((-0.875623921143+0.209194056874j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.973286774115-0.879867280941j)*x[2]**o + ((0.689535936308+0.382662814135j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.973286774115-0.879867280941j)*x_ref[2]**o + ((0.689535936308+0.382662814135j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.468179685578-0.472102863783j)*x[2]**o + ((-0.90046278109+0.975043334221j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.468179685578-0.472102863783j)*x_ref[2]**o + ((-0.90046278109+0.975043334221j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.879625434967-0.74324881209j)*x[2]**o + ((0.810903747546-0.46636207636j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.879625434967-0.74324881209j)*x_ref[2]**o + ((0.810903747546-0.46636207636j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.0498186397197+0.0572055871072j)*x[2]**o + ((0.768151481477-0.279014097972j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.0498186397197+0.0572055871072j)*x_ref[2]**o + ((0.768151481477-0.279014097972j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.707410530944+0.162774053504j)*x[2]**o + ((-0.529115647789+0.0855025181201j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.707410530944+0.162774053504j)*x_ref[2]**o + ((-0.529115647789+0.0855025181201j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.0951982549488+0.325040302441j)*x[2]**o + ((0.595231577859-0.283860045696j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.0951982549488+0.325040302441j)*x_ref[2]**o + ((0.595231577859-0.283860045696j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(-0.574338385479-0.153527697666j)*x[2]**o + ((-0.323817138294-0.63252283962j))*x[2]
+            ref[(0, 1, 3, 0)]+=(-0.574338385479-0.153527697666j)*x_ref[2]**o + ((-0.323817138294-0.63252283962j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(0.291471361149-0.468387226514j)*x[2]**o + ((-0.337859578604+0.877723776257j))*x[2]
+            ref[(0, 1, 3, 1)]+=(0.291471361149-0.468387226514j)*x_ref[2]**o + ((-0.337859578604+0.877723776257j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.200235100274+0.544045393899j)*x[2]**o + ((-0.934956152572+0.576906666672j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.200235100274+0.544045393899j)*x_ref[2]**o + ((-0.934956152572+0.576906666672j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.470089553651+0.555235546956j)*x[2]**o + ((-0.126549096377+0.329631896091j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.470089553651+0.555235546956j)*x_ref[2]**o + ((-0.126549096377+0.329631896091j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.306350706057+0.224101306029j)*x[2]**o + ((-0.345842420847+0.650944829267j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.306350706057+0.224101306029j)*x_ref[2]**o + ((-0.345842420847+0.650944829267j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.989862722216-0.110086011765j)*x[2]**o + ((-0.143008373337-0.697103774889j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.989862722216-0.110086011765j)*x_ref[2]**o + ((-0.143008373337-0.697103774889j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.860610649261+0.474598449974j)*x[2]**o + ((0.765775563819+0.158510996763j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.860610649261+0.474598449974j)*x_ref[2]**o + ((0.765775563819+0.158510996763j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.958728858078+0.560684510001j)*x[2]**o + ((0.441454961943+0.847156420395j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.958728858078+0.560684510001j)*x_ref[2]**o + ((0.441454961943+0.847156420395j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(0.0712330137071-0.33021166924j)*x[2]**o + ((-0.468358840913-0.461051842377j))*x[2]
+            ref[(0, 2, 3, 0)]+=(0.0712330137071-0.33021166924j)*x_ref[2]**o + ((-0.468358840913-0.461051842377j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(0.9351225934+0.0911930231444j)*x[2]**o + ((0.491709851872-0.643769324947j))*x[2]
+            ref[(0, 2, 3, 1)]+=(0.9351225934+0.0911930231444j)*x_ref[2]**o + ((0.491709851872-0.643769324947j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.151412689544+0.701757415934j)*x[2]**o + ((0.0103177611782-0.526855048856j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.151412689544+0.701757415934j)*x_ref[2]**o + ((0.0103177611782-0.526855048856j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.109914291645+0.850133327284j)*x[2]**o + ((-0.131199502664+0.622812784185j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.109914291645+0.850133327284j)*x_ref[2]**o + ((-0.131199502664+0.622812784185j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.839503985249-0.438761466719j)*x[2]**o + ((0.902260230753+0.0498775468819j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.839503985249-0.438761466719j)*x_ref[2]**o + ((0.902260230753+0.0498775468819j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.436281141907-0.322345683275j)*x[2]**o + ((0.475492563809-0.689265196589j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.436281141907-0.322345683275j)*x_ref[2]**o + ((0.475492563809-0.689265196589j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(0.685148042852+0.106549853422j)*x[2]**o + ((0.441384429172-0.0741508941117j))*x[2]
+            ref[(0, 3, 2, 0)]+=(0.685148042852+0.106549853422j)*x_ref[2]**o + ((0.441384429172-0.0741508941117j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(-0.610086338577-0.275484781008j)*x[2]**o + ((0.180890402261+0.575443048709j))*x[2]
+            ref[(0, 3, 2, 1)]+=(-0.610086338577-0.275484781008j)*x_ref[2]**o + ((0.180890402261+0.575443048709j))*x_ref[2]
+            arg[(0, 3, 3, 0)]+=(-0.597854157788+0.350933258913j)*x[2]**o + ((-0.553146950952-0.866143177757j))*x[2]
+            ref[(0, 3, 3, 0)]+=(-0.597854157788+0.350933258913j)*x_ref[2]**o + ((-0.553146950952-0.866143177757j))*x_ref[2]
+            arg[(0, 3, 3, 1)]+=(0.958867844761-0.593870980519j)*x[2]**o + ((-0.573005032011+0.256298036156j))*x[2]
+            ref[(0, 3, 3, 1)]+=(0.958867844761-0.593870980519j)*x_ref[2]**o + ((-0.573005032011+0.256298036156j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.891319256648+0.164247431737j)*x[2]**o + ((0.468871188601-0.207756470968j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.891319256648+0.164247431737j)*x_ref[2]**o + ((0.468871188601-0.207756470968j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.588451694358-0.86033465628j)*x[2]**o + ((0.602353530679+0.892861782363j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.588451694358-0.86033465628j)*x_ref[2]**o + ((0.602353530679+0.892861782363j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.591425529597+0.574898936453j)*x[2]**o + ((0.681842382595+0.485813895695j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.591425529597+0.574898936453j)*x_ref[2]**o + ((0.681842382595+0.485813895695j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.627401683324+0.408478972437j)*x[2]**o + ((-0.357826843154-0.414048910614j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.627401683324+0.408478972437j)*x_ref[2]**o + ((-0.357826843154-0.414048910614j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.794302854192+0.494585075548j)*x[2]**o + ((0.225893736263+0.287133476133j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.794302854192+0.494585075548j)*x_ref[2]**o + ((0.225893736263+0.287133476133j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.263693475-0.226311680281j)*x[2]**o + ((0.976782500767+0.627207776896j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.263693475-0.226311680281j)*x_ref[2]**o + ((0.976782500767+0.627207776896j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(-0.980014905804+0.195636160161j)*x[2]**o + ((-0.835419051419-0.784933747673j))*x[2]
+            ref[(1, 0, 3, 0)]+=(-0.980014905804+0.195636160161j)*x_ref[2]**o + ((-0.835419051419-0.784933747673j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(0.936401755738+0.425951514201j)*x[2]**o + ((-0.392095753436+0.0381892727387j))*x[2]
+            ref[(1, 0, 3, 1)]+=(0.936401755738+0.425951514201j)*x_ref[2]**o + ((-0.392095753436+0.0381892727387j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.42434739782+0.830693501106j)*x[2]**o + ((0.324375943813+0.958735530439j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.42434739782+0.830693501106j)*x_ref[2]**o + ((0.324375943813+0.958735530439j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.729526589954+0.924976549783j)*x[2]**o + ((-0.323711517683-0.0807976216509j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.729526589954+0.924976549783j)*x_ref[2]**o + ((-0.323711517683-0.0807976216509j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.0530514868463-0.791908008778j)*x[2]**o + ((-0.0698709379927-0.316716305921j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.0530514868463-0.791908008778j)*x_ref[2]**o + ((-0.0698709379927-0.316716305921j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.57340206509-0.907844425863j)*x[2]**o + ((0.989968698075+0.363355773412j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.57340206509-0.907844425863j)*x_ref[2]**o + ((0.989968698075+0.363355773412j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.998069676893-0.75392987828j)*x[2]**o + ((-0.318552346857-0.138255098332j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.998069676893-0.75392987828j)*x_ref[2]**o + ((-0.318552346857-0.138255098332j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.16881042485-0.756093789448j)*x[2]**o + ((0.445329180364-0.953407867104j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.16881042485-0.756093789448j)*x_ref[2]**o + ((0.445329180364-0.953407867104j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(-0.519912848702-0.824399348472j)*x[2]**o + ((-0.548473689517+0.51990921855j))*x[2]
+            ref[(1, 1, 3, 0)]+=(-0.519912848702-0.824399348472j)*x_ref[2]**o + ((-0.548473689517+0.51990921855j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(-0.408074097604+0.181839349773j)*x[2]**o + ((0.37357844919+0.722490264859j))*x[2]
+            ref[(1, 1, 3, 1)]+=(-0.408074097604+0.181839349773j)*x_ref[2]**o + ((0.37357844919+0.722490264859j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.858676906887-0.64940937025j)*x[2]**o + ((-0.20616672558-0.0506555049431j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.858676906887-0.64940937025j)*x_ref[2]**o + ((-0.20616672558-0.0506555049431j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.584520609626-0.65887758803j)*x[2]**o + ((0.936963986582+0.759738169884j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.584520609626-0.65887758803j)*x_ref[2]**o + ((0.936963986582+0.759738169884j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.937889097057+0.753729352031j)*x[2]**o + ((-0.461214920733-0.190261931482j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.937889097057+0.753729352031j)*x_ref[2]**o + ((-0.461214920733-0.190261931482j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.165519961113-0.820987795718j)*x[2]**o + ((0.173423159842+0.633793500017j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.165519961113-0.820987795718j)*x_ref[2]**o + ((0.173423159842+0.633793500017j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.838298224612-0.897016401237j)*x[2]**o + ((0.899098224742-0.226089868769j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.838298224612-0.897016401237j)*x_ref[2]**o + ((0.899098224742-0.226089868769j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.151360957619-0.185417315473j)*x[2]**o + ((-0.72067748882+0.212430778865j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.151360957619-0.185417315473j)*x_ref[2]**o + ((-0.72067748882+0.212430778865j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(-0.633126555497-0.0863591829845j)*x[2]**o + ((-0.735778447718+0.51751550719j))*x[2]
+            ref[(1, 2, 3, 0)]+=(-0.633126555497-0.0863591829845j)*x_ref[2]**o + ((-0.735778447718+0.51751550719j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(0.465669071806-0.378209454081j)*x[2]**o + ((-0.366068241894+0.230468827835j))*x[2]
+            ref[(1, 2, 3, 1)]+=(0.465669071806-0.378209454081j)*x_ref[2]**o + ((-0.366068241894+0.230468827835j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.122580017846-0.518823234259j)*x[2]**o + ((-0.744251504897+0.761274784589j))*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.122580017846-0.518823234259j)*x_ref[2]**o + ((-0.744251504897+0.761274784589j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.415861911311+0.423074198789j)*x[2]**o + ((-0.480703707868-0.558649421462j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.415861911311+0.423074198789j)*x_ref[2]**o + ((-0.480703707868-0.558649421462j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.872498583+0.0164956870932j)*x[2]**o + ((-0.139220160885-0.0800023836341j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.872498583+0.0164956870932j)*x_ref[2]**o + ((-0.139220160885-0.0800023836341j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.863330546156-0.377286514909j)*x[2]**o + ((-0.435327641359-0.439007577418j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.863330546156-0.377286514909j)*x_ref[2]**o + ((-0.435327641359-0.439007577418j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(0.955871836147-0.156296929174j)*x[2]**o + ((-0.940687034619-0.592062859245j))*x[2]
+            ref[(1, 3, 2, 0)]+=(0.955871836147-0.156296929174j)*x_ref[2]**o + ((-0.940687034619-0.592062859245j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(-0.887574577461+0.433793961499j)*x[2]**o + ((-0.508286849641-0.589947052684j))*x[2]
+            ref[(1, 3, 2, 1)]+=(-0.887574577461+0.433793961499j)*x_ref[2]**o + ((-0.508286849641-0.589947052684j))*x_ref[2]
+            arg[(1, 3, 3, 0)]+=(0.337639064119-0.787306385033j)*x[2]**o + ((0.104301253169+0.0234712721252j))*x[2]
+            ref[(1, 3, 3, 0)]+=(0.337639064119-0.787306385033j)*x_ref[2]**o + ((0.104301253169+0.0234712721252j))*x_ref[2]
+            arg[(1, 3, 3, 1)]+=(-0.909115884014-0.935417002928j)*x[2]**o + ((0.824703731638-0.995085507982j))*x[2]
+            ref[(1, 3, 3, 1)]+=(-0.909115884014-0.935417002928j)*x_ref[2]**o + ((0.824703731638-0.995085507982j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.706805901669+0.986347371498j)*x[2]**o + ((0.0243030167257+0.65308784199j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.706805901669+0.986347371498j)*x_ref[2]**o + ((0.0243030167257+0.65308784199j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.748994053421-0.271257352285j)*x[2]**o + ((-0.77152580539+0.746836746208j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.748994053421-0.271257352285j)*x_ref[2]**o + ((-0.77152580539+0.746836746208j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.808420559053+0.262697537357j)*x[2]**o + ((-0.787066202483+0.105599019791j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.808420559053+0.262697537357j)*x_ref[2]**o + ((-0.787066202483+0.105599019791j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.415798255805+0.619624916906j)*x[2]**o + ((-0.413187726415-0.470902944661j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.415798255805+0.619624916906j)*x_ref[2]**o + ((-0.413187726415-0.470902944661j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.0920419055212-0.239917295386j)*x[2]**o + ((0.614204522975+0.117705998779j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.0920419055212-0.239917295386j)*x_ref[2]**o + ((0.614204522975+0.117705998779j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(-0.428553037907-0.936796956339j)*x[2]**o + ((-0.945533208442+0.0693101058177j))*x[2]
+            ref[(2, 0, 2, 1)]+=(-0.428553037907-0.936796956339j)*x_ref[2]**o + ((-0.945533208442+0.0693101058177j))*x_ref[2]
+            arg[(2, 0, 3, 0)]+=(-0.00775297304775-0.426686256503j)*x[2]**o + ((-0.744664212102-0.784800043817j))*x[2]
+            ref[(2, 0, 3, 0)]+=(-0.00775297304775-0.426686256503j)*x_ref[2]**o + ((-0.744664212102-0.784800043817j))*x_ref[2]
+            arg[(2, 0, 3, 1)]+=(-0.5927864626-0.953330462316j)*x[2]**o + ((-0.159885703467+0.591543378714j))*x[2]
+            ref[(2, 0, 3, 1)]+=(-0.5927864626-0.953330462316j)*x_ref[2]**o + ((-0.159885703467+0.591543378714j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.911343298037-0.396202829253j)*x[2]**o + ((0.238620174737+0.069749463802j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.911343298037-0.396202829253j)*x_ref[2]**o + ((0.238620174737+0.069749463802j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.102945409324+0.509815402875j)*x[2]**o + ((0.622640451557+0.79348853352j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.102945409324+0.509815402875j)*x_ref[2]**o + ((0.622640451557+0.79348853352j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.963858738007-0.567634057582j)*x[2]**o + ((0.816355399508-0.0596714231954j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.963858738007-0.567634057582j)*x_ref[2]**o + ((0.816355399508-0.0596714231954j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.294650353107+0.217731577802j)*x[2]**o + ((0.722229738454-0.353664010367j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.294650353107+0.217731577802j)*x_ref[2]**o + ((0.722229738454-0.353664010367j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.761993741625-0.539976307136j)*x[2]**o + ((0.290066831639+0.0395400795491j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.761993741625-0.539976307136j)*x_ref[2]**o + ((0.290066831639+0.0395400795491j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(-0.978280504114+0.536212307348j)*x[2]**o + ((-0.868973271676-0.849836030911j))*x[2]
+            ref[(2, 1, 2, 1)]+=(-0.978280504114+0.536212307348j)*x_ref[2]**o + ((-0.868973271676-0.849836030911j))*x_ref[2]
+            arg[(2, 1, 3, 0)]+=(0.736962454555+0.216822177911j)*x[2]**o + ((0.234080977698+0.381575396585j))*x[2]
+            ref[(2, 1, 3, 0)]+=(0.736962454555+0.216822177911j)*x_ref[2]**o + ((0.234080977698+0.381575396585j))*x_ref[2]
+            arg[(2, 1, 3, 1)]+=(0.899178222699-0.105647200714j)*x[2]**o + ((-0.667468607904-0.21310027395j))*x[2]
+            ref[(2, 1, 3, 1)]+=(0.899178222699-0.105647200714j)*x_ref[2]**o + ((-0.667468607904-0.21310027395j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.027736349026-0.56800947405j)*x[2]**o + ((-0.234429996406-0.943131568971j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.027736349026-0.56800947405j)*x_ref[2]**o + ((-0.234429996406-0.943131568971j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.458390129526+0.241783588481j)*x[2]**o + ((-0.43098771893+0.150647658078j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.458390129526+0.241783588481j)*x_ref[2]**o + ((-0.43098771893+0.150647658078j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.405307877422-0.262850143567j)*x[2]**o + ((0.172221621948-0.453076427694j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.405307877422-0.262850143567j)*x_ref[2]**o + ((0.172221621948-0.453076427694j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.796275574493+0.0875111297685j)*x[2]**o + ((0.0605513417936+0.138903943584j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.796275574493+0.0875111297685j)*x_ref[2]**o + ((0.0605513417936+0.138903943584j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(-0.979856986172-0.0991591642737j)*x[2]**o + ((-0.856434243478-0.40913640307j))*x[2]
+            ref[(2, 2, 2, 0)]+=(-0.979856986172-0.0991591642737j)*x_ref[2]**o + ((-0.856434243478-0.40913640307j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(0.100905708678-0.980705441503j)*x[2]**o + ((-0.615150541186-0.393387138809j))*x[2]
+            ref[(2, 2, 2, 1)]+=(0.100905708678-0.980705441503j)*x_ref[2]**o + ((-0.615150541186-0.393387138809j))*x_ref[2]
+            arg[(2, 2, 3, 0)]+=(-0.56422203185+0.694703898954j)*x[2]**o + ((-0.650248751673+0.544000646001j))*x[2]
+            ref[(2, 2, 3, 0)]+=(-0.56422203185+0.694703898954j)*x_ref[2]**o + ((-0.650248751673+0.544000646001j))*x_ref[2]
+            arg[(2, 2, 3, 1)]+=(-0.0830038859898+0.492651900867j)*x[2]**o + ((0.115947209767+0.148844929754j))*x[2]
+            ref[(2, 2, 3, 1)]+=(-0.0830038859898+0.492651900867j)*x_ref[2]**o + ((0.115947209767+0.148844929754j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(-0.52431946881+0.68456580751j)*x[2]**o + ((0.218972017644-0.0940454689541j))*x[2]
+            ref[(2, 3, 0, 0)]+=(-0.52431946881+0.68456580751j)*x_ref[2]**o + ((0.218972017644-0.0940454689541j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(0.727959417493-0.986080308827j)*x[2]**o + ((0.689746052457-0.850860731478j))*x[2]
+            ref[(2, 3, 0, 1)]+=(0.727959417493-0.986080308827j)*x_ref[2]**o + ((0.689746052457-0.850860731478j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(-0.175599409028+0.129883343756j)*x[2]**o + ((-0.0434955096114+0.91558976269j))*x[2]
+            ref[(2, 3, 1, 0)]+=(-0.175599409028+0.129883343756j)*x_ref[2]**o + ((-0.0434955096114+0.91558976269j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(0.201696540934+0.528849002879j)*x[2]**o + ((-0.713548275962+0.646647145962j))*x[2]
+            ref[(2, 3, 1, 1)]+=(0.201696540934+0.528849002879j)*x_ref[2]**o + ((-0.713548275962+0.646647145962j))*x_ref[2]
+            arg[(2, 3, 2, 0)]+=(-0.87571230919+0.960595023825j)*x[2]**o + ((-0.941762764498+0.800283296163j))*x[2]
+            ref[(2, 3, 2, 0)]+=(-0.87571230919+0.960595023825j)*x_ref[2]**o + ((-0.941762764498+0.800283296163j))*x_ref[2]
+            arg[(2, 3, 2, 1)]+=(-0.963864041962+0.899331449658j)*x[2]**o + ((0.207600403466+0.735216435197j))*x[2]
+            ref[(2, 3, 2, 1)]+=(-0.963864041962+0.899331449658j)*x_ref[2]**o + ((0.207600403466+0.735216435197j))*x_ref[2]
+            arg[(2, 3, 3, 0)]+=(0.730377454324+0.734328328983j)*x[2]**o + ((-0.866462745793-0.104998676833j))*x[2]
+            ref[(2, 3, 3, 0)]+=(0.730377454324+0.734328328983j)*x_ref[2]**o + ((-0.866462745793-0.104998676833j))*x_ref[2]
+            arg[(2, 3, 3, 1)]+=(-0.291614803044-0.231301515854j)*x[2]**o + ((-0.250208102366-0.544249158933j))*x[2]
+            ref[(2, 3, 3, 1)]+=(-0.291614803044-0.231301515854j)*x_ref[2]**o + ((-0.250208102366-0.544249158933j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.252594481228-0.330268790107j)*x[0] + ((-0.898835061938-0.378161800429j))*x[1]
+        ref=(-0.252594481228-0.330268790107j)*x_ref[0] + ((-0.898835061938-0.378161800429j))*x_ref[1]
+        if dim==3:
+            arg+=((0.748979106704+0.942271747849j))*x[2]
+            ref+=((0.748979106704+0.942271747849j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(-0.869757995526+0.220825764247j)*x[0] + ((-0.055216825879-0.94268314416j))*x[1]
+        ref[(0,)]=(-0.869757995526+0.220825764247j)*x_ref[0] + ((-0.055216825879-0.94268314416j))*x_ref[1]
+        arg[(1,)]=(-0.439561836947+0.339910884019j)*x[0] + ((-0.873360236832-0.0337938334476j))*x[1]
+        ref[(1,)]=(-0.439561836947+0.339910884019j)*x_ref[0] + ((-0.873360236832-0.0337938334476j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.0678465885803-0.251986567959j)*x[2]
+            ref[(0,)]+=(0.0678465885803-0.251986567959j)*x_ref[2]
+            arg[(1,)]+=(-0.637547112335-0.0398986072175j)*x[2]
+            ref[(1,)]+=(-0.637547112335-0.0398986072175j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=(-0.460278561756+0.962835705913j)*x[0] + ((-0.76674655381+0.961124210073j))*x[1]
+        ref[(0, 0)]=(-0.460278561756+0.962835705913j)*x_ref[0] + ((-0.76674655381+0.961124210073j))*x_ref[1]
+        arg[(0, 1)]=(0.050240702506+0.53855508394j)*x[0] + ((-0.691742580541+0.892148482701j))*x[1]
+        ref[(0, 1)]=(0.050240702506+0.53855508394j)*x_ref[0] + ((-0.691742580541+0.892148482701j))*x_ref[1]
+        arg[(0, 2)]=(-0.266040173899+0.0227831277489j)*x[0] + ((-0.410505924723+0.382894595299j))*x[1]
+        ref[(0, 2)]=(-0.266040173899+0.0227831277489j)*x_ref[0] + ((-0.410505924723+0.382894595299j))*x_ref[1]
+        arg[(1, 0)]=(0.226071305135-0.595803340974j)*x[0] + ((0.256469623116-0.062572414581j))*x[1]
+        ref[(1, 0)]=(0.226071305135-0.595803340974j)*x_ref[0] + ((0.256469623116-0.062572414581j))*x_ref[1]
+        arg[(1, 1)]=(-0.932348437525+0.628432922197j)*x[0] + ((0.502592283961-0.33891678006j))*x[1]
+        ref[(1, 1)]=(-0.932348437525+0.628432922197j)*x_ref[0] + ((0.502592283961-0.33891678006j))*x_ref[1]
+        arg[(1, 2)]=(0.754931004184-0.166530877137j)*x[0] + ((-0.683037775277-0.303950717851j))*x[1]
+        ref[(1, 2)]=(0.754931004184-0.166530877137j)*x_ref[0] + ((-0.683037775277-0.303950717851j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.00141526908888+0.634408828542j)*x[2]
+            ref[(0, 0)]+=(-0.00141526908888+0.634408828542j)*x_ref[2]
+            arg[(0, 1)]+=(0.322526847518+0.0841300788134j)*x[2]
+            ref[(0, 1)]+=(0.322526847518+0.0841300788134j)*x_ref[2]
+            arg[(0, 2)]+=(0.812552022652+0.769708096254j)*x[2]
+            ref[(0, 2)]+=(0.812552022652+0.769708096254j)*x_ref[2]
+            arg[(1, 0)]+=(0.567835100156-0.201698387377j)*x[2]
+            ref[(1, 0)]+=(0.567835100156-0.201698387377j)*x_ref[2]
+            arg[(1, 1)]+=(0.750551598102+0.448365286387j)*x[2]
+            ref[(1, 1)]+=(0.750551598102+0.448365286387j)*x_ref[2]
+            arg[(1, 2)]+=(-0.649498093429-0.977006014932j)*x[2]
+            ref[(1, 2)]+=(-0.649498093429-0.977006014932j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.316977965054+0.374349028992j)*x[0] + ((-0.167654859387+0.879497284149j))*x[1]
+        ref[(0, 0, 0)]=(-0.316977965054+0.374349028992j)*x_ref[0] + ((-0.167654859387+0.879497284149j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.378196192327+0.915746947366j)*x[0] + ((0.427690495771+0.583798343697j))*x[1]
+        ref[(0, 0, 1)]=(-0.378196192327+0.915746947366j)*x_ref[0] + ((0.427690495771+0.583798343697j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.696530566519-0.793176039937j)*x[0] + ((-0.039881918339-0.806098015115j))*x[1]
+        ref[(0, 0, 2)]=(-0.696530566519-0.793176039937j)*x_ref[0] + ((-0.039881918339-0.806098015115j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.488541784894+0.377207660172j)*x[0] + ((-0.164553336285-0.852650281686j))*x[1]
+        ref[(0, 0, 3)]=(0.488541784894+0.377207660172j)*x_ref[0] + ((-0.164553336285-0.852650281686j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.567110408994+0.167688567138j)*x[0] + ((0.760875748289+0.595740934589j))*x[1]
+        ref[(0, 1, 0)]=(-0.567110408994+0.167688567138j)*x_ref[0] + ((0.760875748289+0.595740934589j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.435983241092-0.712591381577j)*x[0] + ((0.905946668376-0.444258812817j))*x[1]
+        ref[(0, 1, 1)]=(0.435983241092-0.712591381577j)*x_ref[0] + ((0.905946668376-0.444258812817j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.479923980436+0.742366107807j)*x[0] + ((0.82368211267-0.423868666974j))*x[1]
+        ref[(0, 1, 2)]=(0.479923980436+0.742366107807j)*x_ref[0] + ((0.82368211267-0.423868666974j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.461930490998+0.906519851746j)*x[0] + ((0.376871491693-0.266926657706j))*x[1]
+        ref[(0, 1, 3)]=(-0.461930490998+0.906519851746j)*x_ref[0] + ((0.376871491693-0.266926657706j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.076162418047+0.552242399421j)*x[0] + ((0.879968668334-0.397338009669j))*x[1]
+        ref[(0, 2, 0)]=(0.076162418047+0.552242399421j)*x_ref[0] + ((0.879968668334-0.397338009669j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.0186027355651+0.450864961158j)*x[0] + ((0.169511248825-0.976180896489j))*x[1]
+        ref[(0, 2, 1)]=(0.0186027355651+0.450864961158j)*x_ref[0] + ((0.169511248825-0.976180896489j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.128495750289-0.787656920119j)*x[0] + ((0.400432240221+0.0283157503655j))*x[1]
+        ref[(0, 2, 2)]=(0.128495750289-0.787656920119j)*x_ref[0] + ((0.400432240221+0.0283157503655j))*x_ref[1]
+        arg[(0, 2, 3)]=(0.416384544316-0.264133157305j)*x[0] + ((-0.803338946107+0.868874758267j))*x[1]
+        ref[(0, 2, 3)]=(0.416384544316-0.264133157305j)*x_ref[0] + ((-0.803338946107+0.868874758267j))*x_ref[1]
+        arg[(0, 3, 0)]=(-0.438838255295-0.615796460808j)*x[0] + ((-0.426982719838-0.412822062359j))*x[1]
+        ref[(0, 3, 0)]=(-0.438838255295-0.615796460808j)*x_ref[0] + ((-0.426982719838-0.412822062359j))*x_ref[1]
+        arg[(0, 3, 1)]=(-0.532266838395+0.509434232561j)*x[0] + ((0.315055810531-0.792026357168j))*x[1]
+        ref[(0, 3, 1)]=(-0.532266838395+0.509434232561j)*x_ref[0] + ((0.315055810531-0.792026357168j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.447389133714+0.120816140315j)*x[0] + ((0.729406984847-0.066818452983j))*x[1]
+        ref[(0, 3, 2)]=(0.447389133714+0.120816140315j)*x_ref[0] + ((0.729406984847-0.066818452983j))*x_ref[1]
+        arg[(0, 3, 3)]=(0.207563946741-0.568386349121j)*x[0] + ((-0.096013100426+0.0626568387124j))*x[1]
+        ref[(0, 3, 3)]=(0.207563946741-0.568386349121j)*x_ref[0] + ((-0.096013100426+0.0626568387124j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.886278081117-0.00888256993116j)*x[0] + ((0.905798376982-0.99848162284j))*x[1]
+        ref[(1, 0, 0)]=(0.886278081117-0.00888256993116j)*x_ref[0] + ((0.905798376982-0.99848162284j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.613161255707-0.651150720028j)*x[0] + ((-0.806505656275+0.466065166755j))*x[1]
+        ref[(1, 0, 1)]=(0.613161255707-0.651150720028j)*x_ref[0] + ((-0.806505656275+0.466065166755j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.107244441968+0.057289836157j)*x[0] + ((0.567743142878-0.5977635561j))*x[1]
+        ref[(1, 0, 2)]=(0.107244441968+0.057289836157j)*x_ref[0] + ((0.567743142878-0.5977635561j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.373298389401+0.526868349096j)*x[0] + ((-0.600538957257+0.483280728352j))*x[1]
+        ref[(1, 0, 3)]=(0.373298389401+0.526868349096j)*x_ref[0] + ((-0.600538957257+0.483280728352j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.0821241273131-0.567372911903j)*x[0] + ((-0.340395980848+0.538453624418j))*x[1]
+        ref[(1, 1, 0)]=(0.0821241273131-0.567372911903j)*x_ref[0] + ((-0.340395980848+0.538453624418j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.739817892146-0.720644590983j)*x[0] + ((-0.48782275414+0.563584051727j))*x[1]
+        ref[(1, 1, 1)]=(0.739817892146-0.720644590983j)*x_ref[0] + ((-0.48782275414+0.563584051727j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.603823678838-0.173601176385j)*x[0] + ((0.963140517396-0.173198420788j))*x[1]
+        ref[(1, 1, 2)]=(-0.603823678838-0.173601176385j)*x_ref[0] + ((0.963140517396-0.173198420788j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.0491621893505+0.721543977935j)*x[0] + ((0.255146479975-0.631273762289j))*x[1]
+        ref[(1, 1, 3)]=(0.0491621893505+0.721543977935j)*x_ref[0] + ((0.255146479975-0.631273762289j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.407296194652-0.97493515093j)*x[0] + ((-0.991288562396-0.696964528703j))*x[1]
+        ref[(1, 2, 0)]=(0.407296194652-0.97493515093j)*x_ref[0] + ((-0.991288562396-0.696964528703j))*x_ref[1]
+        arg[(1, 2, 1)]=(0.844736669898+0.883581959061j)*x[0] + ((0.597182185294-0.669805007693j))*x[1]
+        ref[(1, 2, 1)]=(0.844736669898+0.883581959061j)*x_ref[0] + ((0.597182185294-0.669805007693j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.604912787752+0.358384357073j)*x[0] + ((0.0379185682513+0.89532360261j))*x[1]
+        ref[(1, 2, 2)]=(0.604912787752+0.358384357073j)*x_ref[0] + ((0.0379185682513+0.89532360261j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.568090784078+0.315208198783j)*x[0] + ((0.274906959391+0.604008594212j))*x[1]
+        ref[(1, 2, 3)]=(-0.568090784078+0.315208198783j)*x_ref[0] + ((0.274906959391+0.604008594212j))*x_ref[1]
+        arg[(1, 3, 0)]=(0.776934604574+0.0763509588061j)*x[0] + ((0.654829891063-0.347375079605j))*x[1]
+        ref[(1, 3, 0)]=(0.776934604574+0.0763509588061j)*x_ref[0] + ((0.654829891063-0.347375079605j))*x_ref[1]
+        arg[(1, 3, 1)]=(-0.158969040078-0.132559353939j)*x[0] + ((0.724569344723+0.129720844131j))*x[1]
+        ref[(1, 3, 1)]=(-0.158969040078-0.132559353939j)*x_ref[0] + ((0.724569344723+0.129720844131j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.834134577346+0.0792600303027j)*x[0] + ((-0.805664099846+0.164907141332j))*x[1]
+        ref[(1, 3, 2)]=(-0.834134577346+0.0792600303027j)*x_ref[0] + ((-0.805664099846+0.164907141332j))*x_ref[1]
+        arg[(1, 3, 3)]=(-0.276837159401+0.540757500354j)*x[0] + ((0.267364950838-0.507136755008j))*x[1]
+        ref[(1, 3, 3)]=(-0.276837159401+0.540757500354j)*x_ref[0] + ((0.267364950838-0.507136755008j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.605969277377-0.724951814125j)*x[0] + ((-0.946037417905+0.649852207639j))*x[1]
+        ref[(2, 0, 0)]=(-0.605969277377-0.724951814125j)*x_ref[0] + ((-0.946037417905+0.649852207639j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.245680251738+0.948553906774j)*x[0] + ((0.300032416046-0.613719903511j))*x[1]
+        ref[(2, 0, 1)]=(0.245680251738+0.948553906774j)*x_ref[0] + ((0.300032416046-0.613719903511j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.143137283628-0.178343362021j)*x[0] + ((0.727853337459-0.253902901637j))*x[1]
+        ref[(2, 0, 2)]=(0.143137283628-0.178343362021j)*x_ref[0] + ((0.727853337459-0.253902901637j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.424867117406-0.362818563612j)*x[0] + ((-0.666277923039+0.621758542968j))*x[1]
+        ref[(2, 0, 3)]=(-0.424867117406-0.362818563612j)*x_ref[0] + ((-0.666277923039+0.621758542968j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.207078151614+0.716613888569j)*x[0] + ((-0.236762906802+0.766808915996j))*x[1]
+        ref[(2, 1, 0)]=(-0.207078151614+0.716613888569j)*x_ref[0] + ((-0.236762906802+0.766808915996j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.90869927965-0.188166696874j)*x[0] + ((0.329306950034+0.0880387254135j))*x[1]
+        ref[(2, 1, 1)]=(-0.90869927965-0.188166696874j)*x_ref[0] + ((0.329306950034+0.0880387254135j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.778175775247-0.763599425086j)*x[0] + ((0.111780327356-0.752725116428j))*x[1]
+        ref[(2, 1, 2)]=(0.778175775247-0.763599425086j)*x_ref[0] + ((0.111780327356-0.752725116428j))*x_ref[1]
+        arg[(2, 1, 3)]=(-0.202486091909-0.974378070962j)*x[0] + ((0.237156830238+0.115791573398j))*x[1]
+        ref[(2, 1, 3)]=(-0.202486091909-0.974378070962j)*x_ref[0] + ((0.237156830238+0.115791573398j))*x_ref[1]
+        arg[(2, 2, 0)]=(0.142337017713-0.739283365202j)*x[0] + ((-0.562817084151-0.416224740151j))*x[1]
+        ref[(2, 2, 0)]=(0.142337017713-0.739283365202j)*x_ref[0] + ((-0.562817084151-0.416224740151j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.586731771211-0.0595565431356j)*x[0] + ((0.703405473111-0.908813998563j))*x[1]
+        ref[(2, 2, 1)]=(0.586731771211-0.0595565431356j)*x_ref[0] + ((0.703405473111-0.908813998563j))*x_ref[1]
+        arg[(2, 2, 2)]=(-0.219210969184-0.662286381218j)*x[0] + ((0.466792127918+0.344620163571j))*x[1]
+        ref[(2, 2, 2)]=(-0.219210969184-0.662286381218j)*x_ref[0] + ((0.466792127918+0.344620163571j))*x_ref[1]
+        arg[(2, 2, 3)]=(0.334463067528-0.677860973827j)*x[0] + ((0.548507272912+0.898179112409j))*x[1]
+        ref[(2, 2, 3)]=(0.334463067528-0.677860973827j)*x_ref[0] + ((0.548507272912+0.898179112409j))*x_ref[1]
+        arg[(2, 3, 0)]=(-0.0620087175528+0.0435310357772j)*x[0] + ((-0.428691354366-0.756557912898j))*x[1]
+        ref[(2, 3, 0)]=(-0.0620087175528+0.0435310357772j)*x_ref[0] + ((-0.428691354366-0.756557912898j))*x_ref[1]
+        arg[(2, 3, 1)]=(-0.764051357043-0.184269110411j)*x[0] + ((-0.664020486623-0.492751153366j))*x[1]
+        ref[(2, 3, 1)]=(-0.764051357043-0.184269110411j)*x_ref[0] + ((-0.664020486623-0.492751153366j))*x_ref[1]
+        arg[(2, 3, 2)]=(-0.818941973005-0.893112871161j)*x[0] + ((-0.911420282009+0.217547871572j))*x[1]
+        ref[(2, 3, 2)]=(-0.818941973005-0.893112871161j)*x_ref[0] + ((-0.911420282009+0.217547871572j))*x_ref[1]
+        arg[(2, 3, 3)]=(0.0851317965802-0.00877327592109j)*x[0] + ((0.15996409972-0.337148059661j))*x[1]
+        ref[(2, 3, 3)]=(0.0851317965802-0.00877327592109j)*x_ref[0] + ((0.15996409972-0.337148059661j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.717271929637+0.131551131422j)*x[2]
+            ref[(0, 0, 0)]+=(-0.717271929637+0.131551131422j)*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.506376610095-0.686600821409j)*x[2]
+            ref[(0, 0, 1)]+=(-0.506376610095-0.686600821409j)*x_ref[2]
+            arg[(0, 0, 2)]+=(0.295467350248-0.422072535545j)*x[2]
+            ref[(0, 0, 2)]+=(0.295467350248-0.422072535545j)*x_ref[2]
+            arg[(0, 0, 3)]+=(-0.144233985082-0.114240989976j)*x[2]
+            ref[(0, 0, 3)]+=(-0.144233985082-0.114240989976j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.169785035638-0.812658940105j)*x[2]
+            ref[(0, 1, 0)]+=(0.169785035638-0.812658940105j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.447596693855-0.580020769299j)*x[2]
+            ref[(0, 1, 1)]+=(-0.447596693855-0.580020769299j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.466557099823-0.178531344304j)*x[2]
+            ref[(0, 1, 2)]+=(0.466557099823-0.178531344304j)*x_ref[2]
+            arg[(0, 1, 3)]+=(0.863325997282-0.464413240113j)*x[2]
+            ref[(0, 1, 3)]+=(0.863325997282-0.464413240113j)*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.362126343353-0.114254092438j)*x[2]
+            ref[(0, 2, 0)]+=(-0.362126343353-0.114254092438j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.350006748531-0.0010304280899j)*x[2]
+            ref[(0, 2, 1)]+=(0.350006748531-0.0010304280899j)*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.558755455629+0.988458073461j)*x[2]
+            ref[(0, 2, 2)]+=(-0.558755455629+0.988458073461j)*x_ref[2]
+            arg[(0, 2, 3)]+=(0.133550544042+0.313477255626j)*x[2]
+            ref[(0, 2, 3)]+=(0.133550544042+0.313477255626j)*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.641869049125-0.403809801697j)*x[2]
+            ref[(0, 3, 0)]+=(-0.641869049125-0.403809801697j)*x_ref[2]
+            arg[(0, 3, 1)]+=(-0.473093010054+0.411760877124j)*x[2]
+            ref[(0, 3, 1)]+=(-0.473093010054+0.411760877124j)*x_ref[2]
+            arg[(0, 3, 2)]+=(-0.347907977179-0.175664352424j)*x[2]
+            ref[(0, 3, 2)]+=(-0.347907977179-0.175664352424j)*x_ref[2]
+            arg[(0, 3, 3)]+=(-0.853852483637-0.8985179583j)*x[2]
+            ref[(0, 3, 3)]+=(-0.853852483637-0.8985179583j)*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.30755343668+0.298442032002j)*x[2]
+            ref[(1, 0, 0)]+=(-0.30755343668+0.298442032002j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.171759473846-0.345174535421j)*x[2]
+            ref[(1, 0, 1)]+=(0.171759473846-0.345174535421j)*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.887047984438-0.261377993684j)*x[2]
+            ref[(1, 0, 2)]+=(-0.887047984438-0.261377993684j)*x_ref[2]
+            arg[(1, 0, 3)]+=(0.107184736436+0.913343087174j)*x[2]
+            ref[(1, 0, 3)]+=(0.107184736436+0.913343087174j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.479197650616-0.6169450424j)*x[2]
+            ref[(1, 1, 0)]+=(0.479197650616-0.6169450424j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.0822732907185+0.366566017776j)*x[2]
+            ref[(1, 1, 1)]+=(0.0822732907185+0.366566017776j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.0684236373282+0.492810636253j)*x[2]
+            ref[(1, 1, 2)]+=(0.0684236373282+0.492810636253j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.836780033022-0.623283734452j)*x[2]
+            ref[(1, 1, 3)]+=(0.836780033022-0.623283734452j)*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.223218184356-0.650712473136j)*x[2]
+            ref[(1, 2, 0)]+=(-0.223218184356-0.650712473136j)*x_ref[2]
+            arg[(1, 2, 1)]+=(0.832854812888+0.768187937718j)*x[2]
+            ref[(1, 2, 1)]+=(0.832854812888+0.768187937718j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.929056122863+0.22291473301j)*x[2]
+            ref[(1, 2, 2)]+=(0.929056122863+0.22291473301j)*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.69168260396+0.987957387191j)*x[2]
+            ref[(1, 2, 3)]+=(-0.69168260396+0.987957387191j)*x_ref[2]
+            arg[(1, 3, 0)]+=(0.73044141378-0.762479721834j)*x[2]
+            ref[(1, 3, 0)]+=(0.73044141378-0.762479721834j)*x_ref[2]
+            arg[(1, 3, 1)]+=(0.856306818867+0.155981065525j)*x[2]
+            ref[(1, 3, 1)]+=(0.856306818867+0.155981065525j)*x_ref[2]
+            arg[(1, 3, 2)]+=(0.399846371667+0.449740978434j)*x[2]
+            ref[(1, 3, 2)]+=(0.399846371667+0.449740978434j)*x_ref[2]
+            arg[(1, 3, 3)]+=(0.783096893413-0.523090951015j)*x[2]
+            ref[(1, 3, 3)]+=(0.783096893413-0.523090951015j)*x_ref[2]
+            arg[(2, 0, 0)]+=(0.404352772562+0.670641496954j)*x[2]
+            ref[(2, 0, 0)]+=(0.404352772562+0.670641496954j)*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.969232246865-0.365667286592j)*x[2]
+            ref[(2, 0, 1)]+=(-0.969232246865-0.365667286592j)*x_ref[2]
+            arg[(2, 0, 2)]+=(0.958394643998+0.719958323906j)*x[2]
+            ref[(2, 0, 2)]+=(0.958394643998+0.719958323906j)*x_ref[2]
+            arg[(2, 0, 3)]+=(0.103428199632-0.128575620349j)*x[2]
+            ref[(2, 0, 3)]+=(0.103428199632-0.128575620349j)*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.512524429902+0.241991545357j)*x[2]
+            ref[(2, 1, 0)]+=(-0.512524429902+0.241991545357j)*x_ref[2]
+            arg[(2, 1, 1)]+=(0.585504642634-0.630943180724j)*x[2]
+            ref[(2, 1, 1)]+=(0.585504642634-0.630943180724j)*x_ref[2]
+            arg[(2, 1, 2)]+=(0.942740327506+0.347183319141j)*x[2]
+            ref[(2, 1, 2)]+=(0.942740327506+0.347183319141j)*x_ref[2]
+            arg[(2, 1, 3)]+=(-0.945734678709-0.377352260297j)*x[2]
+            ref[(2, 1, 3)]+=(-0.945734678709-0.377352260297j)*x_ref[2]
+            arg[(2, 2, 0)]+=(0.0405636539626+0.276068409987j)*x[2]
+            ref[(2, 2, 0)]+=(0.0405636539626+0.276068409987j)*x_ref[2]
+            arg[(2, 2, 1)]+=(-0.25335682348+0.213728925469j)*x[2]
+            ref[(2, 2, 1)]+=(-0.25335682348+0.213728925469j)*x_ref[2]
+            arg[(2, 2, 2)]+=(0.156908473329+0.0761527814034j)*x[2]
+            ref[(2, 2, 2)]+=(0.156908473329+0.0761527814034j)*x_ref[2]
+            arg[(2, 2, 3)]+=(0.866533316901+0.968646774819j)*x[2]
+            ref[(2, 2, 3)]+=(0.866533316901+0.968646774819j)*x_ref[2]
+            arg[(2, 3, 0)]+=(-0.697749979246+0.551621830945j)*x[2]
+            ref[(2, 3, 0)]+=(-0.697749979246+0.551621830945j)*x_ref[2]
+            arg[(2, 3, 1)]+=(0.697483534421-0.301666123978j)*x[2]
+            ref[(2, 3, 1)]+=(0.697483534421-0.301666123978j)*x_ref[2]
+            arg[(2, 3, 2)]+=(0.217431749083+0.749680888287j)*x[2]
+            ref[(2, 3, 2)]+=(0.217431749083+0.749680888287j)*x_ref[2]
+            arg[(2, 3, 3)]+=(0.0602529893643-0.821663641405j)*x[2]
+            ref[(2, 3, 3)]+=(0.0602529893643-0.821663641405j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2, 4),w)
+        ref = Data(0,(2, 3, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(0.276995581362+0.708807036218j)*x[0] + ((-0.43737083317+0.974959650864j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.276995581362+0.708807036218j)*x_ref[0] + ((-0.43737083317+0.974959650864j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.617686906193-0.301556932689j)*x[0] + ((-0.453161767761-0.585221212687j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.617686906193-0.301556932689j)*x_ref[0] + ((-0.453161767761-0.585221212687j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.834743868957-0.310892920961j)*x[0] + ((-0.266348459146+0.11531076194j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.834743868957-0.310892920961j)*x_ref[0] + ((-0.266348459146+0.11531076194j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.132129139298+0.686674609669j)*x[0] + ((-0.0142894869542-0.489666409423j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.132129139298+0.686674609669j)*x_ref[0] + ((-0.0142894869542-0.489666409423j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.522180977811+0.950426778752j)*x[0] + ((0.76832716042-0.311069087175j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.522180977811+0.950426778752j)*x_ref[0] + ((0.76832716042-0.311069087175j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.865189555918+0.191033045054j)*x[0] + ((0.0403389190149-0.585209987749j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.865189555918+0.191033045054j)*x_ref[0] + ((0.0403389190149-0.585209987749j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.687972401539-0.852506485399j)*x[0] + ((0.794026261176-0.578103712319j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.687972401539-0.852506485399j)*x_ref[0] + ((0.794026261176-0.578103712319j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.865573590653-0.477343988037j)*x[0] + ((-0.256086555571-0.210599593307j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.865573590653-0.477343988037j)*x_ref[0] + ((-0.256086555571-0.210599593307j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.519400344475+0.700697175042j)*x[0] + ((-0.682863415052-0.424701507768j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.519400344475+0.700697175042j)*x_ref[0] + ((-0.682863415052-0.424701507768j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.961468111883-0.35147207151j)*x[0] + ((-0.668543182658-0.231258114285j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.961468111883-0.35147207151j)*x_ref[0] + ((-0.668543182658-0.231258114285j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.658295990605-0.897631598997j)*x[0] + ((0.829666163436-0.754509742215j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.658295990605-0.897631598997j)*x_ref[0] + ((0.829666163436-0.754509742215j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.849267553983+0.963963313146j)*x[0] + ((-0.0121362418546-0.483001175773j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.849267553983+0.963963313146j)*x_ref[0] + ((-0.0121362418546-0.483001175773j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.32610230884+0.241900753844j)*x[0] + ((0.619798206997+0.22573287995j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.32610230884+0.241900753844j)*x_ref[0] + ((0.619798206997+0.22573287995j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.474262832566+0.559688510912j)*x[0] + ((-0.531421888452+0.523511598433j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.474262832566+0.559688510912j)*x_ref[0] + ((-0.531421888452+0.523511598433j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.636742075492+0.311487545449j)*x[0] + ((-0.633268038409-0.494191270168j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.636742075492+0.311487545449j)*x_ref[0] + ((-0.633268038409-0.494191270168j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.269505203048-0.242874168348j)*x[0] + ((-0.125038507958-0.645646561543j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.269505203048-0.242874168348j)*x_ref[0] + ((-0.125038507958-0.645646561543j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.831843826955+0.906040509075j)*x[0] + ((-0.0926393817656-0.705345482285j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.831843826955+0.906040509075j)*x_ref[0] + ((-0.0926393817656-0.705345482285j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.962456652399+0.852495794414j)*x[0] + ((-0.312139131165+0.948640429598j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.962456652399+0.852495794414j)*x_ref[0] + ((-0.312139131165+0.948640429598j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.165680235449-0.0894661398778j)*x[0] + ((-0.939648107286-0.390674163637j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.165680235449-0.0894661398778j)*x_ref[0] + ((-0.939648107286-0.390674163637j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(-0.412392869323+0.30573192126j)*x[0] + ((0.818869510055-0.0644476830576j))*x[1]
+        ref[(0, 2, 0, 3)]=(-0.412392869323+0.30573192126j)*x_ref[0] + ((0.818869510055-0.0644476830576j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.935899956092+0.0913893882623j)*x[0] + ((0.00195517332024-0.504185102919j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.935899956092+0.0913893882623j)*x_ref[0] + ((0.00195517332024-0.504185102919j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.925074594932-0.783297854864j)*x[0] + ((-0.772009778681-0.306502205959j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.925074594932-0.783297854864j)*x_ref[0] + ((-0.772009778681-0.306502205959j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.753185640136-0.590598970519j)*x[0] + ((0.819353391026+0.883327757892j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.753185640136-0.590598970519j)*x_ref[0] + ((0.819353391026+0.883327757892j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(-0.850911177701+0.864101742447j)*x[0] + ((-0.465104641728-0.0570299439766j))*x[1]
+        ref[(0, 2, 1, 3)]=(-0.850911177701+0.864101742447j)*x_ref[0] + ((-0.465104641728-0.0570299439766j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.417766930072-0.879393928881j)*x[0] + ((0.0554662138347-0.351320002862j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.417766930072-0.879393928881j)*x_ref[0] + ((0.0554662138347-0.351320002862j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.403509432041+0.885365450946j)*x[0] + ((0.545548391452-0.348603796499j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.403509432041+0.885365450946j)*x_ref[0] + ((0.545548391452-0.348603796499j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.587386147169+0.732687827072j)*x[0] + ((0.436446464342+0.74805829739j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.587386147169+0.732687827072j)*x_ref[0] + ((0.436446464342+0.74805829739j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.497994953356+0.644067754923j)*x[0] + ((0.732400431642-0.623852561343j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.497994953356+0.644067754923j)*x_ref[0] + ((0.732400431642-0.623852561343j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.659742901866-0.226252882975j)*x[0] + ((-0.531250074521+0.989684244234j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.659742901866-0.226252882975j)*x_ref[0] + ((-0.531250074521+0.989684244234j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.38796702411-0.970980468044j)*x[0] + ((-0.0535778282809-0.668333267457j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.38796702411-0.970980468044j)*x_ref[0] + ((-0.0535778282809-0.668333267457j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.329838794748-0.139019609778j)*x[0] + ((-0.365542608735+0.66577522688j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.329838794748-0.139019609778j)*x_ref[0] + ((-0.365542608735+0.66577522688j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.636870005306-0.676217035632j)*x[0] + ((-0.00831711292599+0.0800146547825j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.636870005306-0.676217035632j)*x_ref[0] + ((-0.00831711292599+0.0800146547825j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.998703175271+0.677051951529j)*x[0] + ((0.348571543149-0.060839393636j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.998703175271+0.677051951529j)*x_ref[0] + ((0.348571543149-0.060839393636j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.458184423653-0.990632998589j)*x[0] + ((0.397901770738-0.827387060157j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.458184423653-0.990632998589j)*x_ref[0] + ((0.397901770738-0.827387060157j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.622426676739-0.0659499349138j)*x[0] + ((-0.891212033691+0.933176484102j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.622426676739-0.0659499349138j)*x_ref[0] + ((-0.891212033691+0.933176484102j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.290104666294-0.193210765988j)*x[0] + ((0.270700202343+0.603340159559j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.290104666294-0.193210765988j)*x_ref[0] + ((0.270700202343+0.603340159559j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.15281960583+0.584331169061j)*x[0] + ((-0.19288892302-0.410422192949j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.15281960583+0.584331169061j)*x_ref[0] + ((-0.19288892302-0.410422192949j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.410281617168-0.59423285932j)*x[0] + ((-0.359481117535-0.714333550151j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.410281617168-0.59423285932j)*x_ref[0] + ((-0.359481117535-0.714333550151j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.637896867413-0.3488798103j)*x[0] + ((0.937448026537+0.485845813521j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.637896867413-0.3488798103j)*x_ref[0] + ((0.937448026537+0.485845813521j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(0.357060303853-0.0543587588402j)*x[0] + ((0.135161470064-0.867256016272j))*x[1]
+        ref[(1, 1, 1, 3)]=(0.357060303853-0.0543587588402j)*x_ref[0] + ((0.135161470064-0.867256016272j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.719465891249+0.43178648131j)*x[0] + ((-0.170106882102-0.037961026655j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.719465891249+0.43178648131j)*x_ref[0] + ((-0.170106882102-0.037961026655j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.279891291915-0.27880647382j)*x[0] + ((-0.767924304977-0.0415689943591j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.279891291915-0.27880647382j)*x_ref[0] + ((-0.767924304977-0.0415689943591j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.399111454663+0.745710941015j)*x[0] + ((-0.666351408247+0.502343631778j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.399111454663+0.745710941015j)*x_ref[0] + ((-0.666351408247+0.502343631778j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(-0.395485394632-0.166562680103j)*x[0] + ((0.418130879182-0.889075961943j))*x[1]
+        ref[(1, 2, 0, 3)]=(-0.395485394632-0.166562680103j)*x_ref[0] + ((0.418130879182-0.889075961943j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.104184275488+0.275292811861j)*x[0] + ((-0.939716069724+0.0824733069949j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.104184275488+0.275292811861j)*x_ref[0] + ((-0.939716069724+0.0824733069949j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.515338814004+0.527407129397j)*x[0] + ((0.819399188742-0.406220289625j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.515338814004+0.527407129397j)*x_ref[0] + ((0.819399188742-0.406220289625j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.142482250153-0.750821257128j)*x[0] + ((-0.492451005158+0.770562185765j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.142482250153-0.750821257128j)*x_ref[0] + ((-0.492451005158+0.770562185765j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(0.0023642518218-0.201017270309j)*x[0] + ((0.0654585418316-0.80892808347j))*x[1]
+        ref[(1, 2, 1, 3)]=(0.0023642518218-0.201017270309j)*x_ref[0] + ((0.0654585418316-0.80892808347j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.676423787919+0.990455197816j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.676423787919+0.990455197816j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.10683560572+0.111018551638j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.10683560572+0.111018551638j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.170394298254-0.45901552909j)*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.170394298254-0.45901552909j)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.3586515203-0.245301613971j)*x[2]
+            ref[(0, 0, 0, 3)]+=(0.3586515203-0.245301613971j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.0409159265455+0.792145564948j)*x[2]
+            ref[(0, 0, 1, 0)]+=(0.0409159265455+0.792145564948j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.305502766405-0.167993347123j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.305502766405-0.167993347123j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.33383149774+0.426387361576j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.33383149774+0.426387361576j)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.0374664390904-0.729774127741j)*x[2]
+            ref[(0, 0, 1, 3)]+=(0.0374664390904-0.729774127741j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.429866050479-0.766314872556j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.429866050479-0.766314872556j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.0933735244959+0.573407232443j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.0933735244959+0.573407232443j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.608962781001-0.714604669068j)*x[2]
+            ref[(0, 1, 0, 2)]+=(0.608962781001-0.714604669068j)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.0300505169563-0.491579214118j)*x[2]
+            ref[(0, 1, 0, 3)]+=(0.0300505169563-0.491579214118j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.343782306665+0.625927541077j)*x[2]
+            ref[(0, 1, 1, 0)]+=(0.343782306665+0.625927541077j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.0927571506113-0.112860992183j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.0927571506113-0.112860992183j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.908099783377-0.0884554586574j)*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.908099783377-0.0884554586574j)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.66266002605+0.779870768577j)*x[2]
+            ref[(0, 1, 1, 3)]+=(0.66266002605+0.779870768577j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.759019431204+0.415388650109j)*x[2]
+            ref[(0, 2, 0, 0)]+=(0.759019431204+0.415388650109j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.994066633288+0.242976766638j)*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.994066633288+0.242976766638j)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.690045665295-0.298165595379j)*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.690045665295-0.298165595379j)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(-0.680069074048-0.150305098501j)*x[2]
+            ref[(0, 2, 0, 3)]+=(-0.680069074048-0.150305098501j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.90252666283-0.783103669318j)*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.90252666283-0.783103669318j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.990220956791+0.932176471436j)*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.990220956791+0.932176471436j)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.328099961861+0.883183684427j)*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.328099961861+0.883183684427j)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(0.602471411724+0.572473095819j)*x[2]
+            ref[(0, 2, 1, 3)]+=(0.602471411724+0.572473095819j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.822249358808-0.793449000542j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.822249358808-0.793449000542j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.108774855106+0.148311096641j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.108774855106+0.148311096641j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.123025131817-0.499198948436j)*x[2]
+            ref[(1, 0, 0, 2)]+=(0.123025131817-0.499198948436j)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.0323088378207+0.0527871232233j)*x[2]
+            ref[(1, 0, 0, 3)]+=(0.0323088378207+0.0527871232233j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.670227886228+0.0998773430857j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.670227886228+0.0998773430857j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.953683589078+0.0631687545j)*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.953683589078+0.0631687545j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.294779503839+0.152225139289j)*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.294779503839+0.152225139289j)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.0528539312943+0.272779153212j)*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.0528539312943+0.272779153212j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.309133219914-0.634670777536j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.309133219914-0.634670777536j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.542313580381-0.571710054715j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.542313580381-0.571710054715j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.151514098964-0.45385156179j)*x[2]
+            ref[(1, 1, 0, 2)]+=(0.151514098964-0.45385156179j)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.749773346783+0.586370620132j)*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.749773346783+0.586370620132j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.0218878108634+0.890728345745j)*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.0218878108634+0.890728345745j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.100099050424-0.439168971968j)*x[2]
+            ref[(1, 1, 1, 1)]+=(0.100099050424-0.439168971968j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.863937471858-0.699196582046j)*x[2]
+            ref[(1, 1, 1, 2)]+=(0.863937471858-0.699196582046j)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.810908736968-0.406518490403j)*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.810908736968-0.406518490403j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.11210502273+0.109184911773j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.11210502273+0.109184911773j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.652009014628+0.856634139872j)*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.652009014628+0.856634139872j)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(-0.434074953675+0.455458782725j)*x[2]
+            ref[(1, 2, 0, 2)]+=(-0.434074953675+0.455458782725j)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.0792331270655+0.745324525914j)*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.0792331270655+0.745324525914j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.590306727805+0.358182810381j)*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.590306727805+0.358182810381j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.589740017871-0.866215541208j)*x[2]
+            ref[(1, 2, 1, 1)]+=(0.589740017871-0.866215541208j)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.406271571248+0.534945734069j)*x[2]
+            ref[(1, 2, 1, 2)]+=(0.406271571248+0.534945734069j)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(0.431658000822+0.510035096966j)*x[2]
+            ref[(1, 2, 1, 3)]+=(0.431658000822+0.510035096966j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.525906756601+0.725390392227j)*x[0] + ((0.927173907344-0.27123451583j))*x[1]
+        ref=(0.525906756601+0.725390392227j)*x_ref[0] + ((0.927173907344-0.27123451583j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.402678599016-0.474609431737j))*x[2]
+            ref+=((-0.402678599016-0.474609431737j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(0.00973272670413-0.932506077668j)*x[0] + ((0.0992510393058+0.199084883465j))*x[1]
+        ref[(0,)]=(0.00973272670413-0.932506077668j)*x_ref[0] + ((0.0992510393058+0.199084883465j))*x_ref[1]
+        arg[(1,)]=(-0.423054710464-0.099704034238j)*x[0] + ((-0.926452273711+0.814126617861j))*x[1]
+        ref[(1,)]=(-0.423054710464-0.099704034238j)*x_ref[0] + ((-0.926452273711+0.814126617861j))*x_ref[1]
+        arg[(2,)]=(-0.190607999145-0.496514971692j)*x[0] + ((0.160657149961+0.194522825042j))*x[1]
+        ref[(2,)]=(-0.190607999145-0.496514971692j)*x_ref[0] + ((0.160657149961+0.194522825042j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.856934777917+0.4932041237j)*x[2]
+            ref[(0,)]+=(-0.856934777917+0.4932041237j)*x_ref[2]
+            arg[(1,)]+=(0.930226179398-0.8806079437j)*x[2]
+            ref[(1,)]+=(0.930226179398-0.8806079437j)*x_ref[2]
+            arg[(2,)]+=(-0.536649255224+0.408768865666j)*x[2]
+            ref[(2,)]+=(-0.536649255224+0.408768865666j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=(-0.141409649812+0.343692552332j)*x[0] + ((-0.575164419185+0.423000374272j))*x[1]
+        ref[(0, 0)]=(-0.141409649812+0.343692552332j)*x_ref[0] + ((-0.575164419185+0.423000374272j))*x_ref[1]
+        arg[(0, 1)]=(-0.470066236871-0.725636398148j)*x[0] + ((0.00555559405348-0.759094712364j))*x[1]
+        ref[(0, 1)]=(-0.470066236871-0.725636398148j)*x_ref[0] + ((0.00555559405348-0.759094712364j))*x_ref[1]
+        arg[(1, 0)]=(0.130270360697+0.790901857474j)*x[0] + ((-0.170559670074-0.971945456523j))*x[1]
+        ref[(1, 0)]=(0.130270360697+0.790901857474j)*x_ref[0] + ((-0.170559670074-0.971945456523j))*x_ref[1]
+        arg[(1, 1)]=(-0.706173324312-0.675494932471j)*x[0] + ((0.64842013195-0.765128766173j))*x[1]
+        ref[(1, 1)]=(-0.706173324312-0.675494932471j)*x_ref[0] + ((0.64842013195-0.765128766173j))*x_ref[1]
+        arg[(2, 0)]=(0.292186436946-0.930421194354j)*x[0] + ((0.192370763487+0.0401016612686j))*x[1]
+        ref[(2, 0)]=(0.292186436946-0.930421194354j)*x_ref[0] + ((0.192370763487+0.0401016612686j))*x_ref[1]
+        arg[(2, 1)]=(0.299590734522+0.14814090766j)*x[0] + ((-0.469557893592+0.791282971936j))*x[1]
+        ref[(2, 1)]=(0.299590734522+0.14814090766j)*x_ref[0] + ((-0.469557893592+0.791282971936j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.511751020417+0.0722074692015j)*x[2]
+            ref[(0, 0)]+=(0.511751020417+0.0722074692015j)*x_ref[2]
+            arg[(0, 1)]+=(0.394207888769+0.615137083144j)*x[2]
+            ref[(0, 1)]+=(0.394207888769+0.615137083144j)*x_ref[2]
+            arg[(1, 0)]+=(0.243477527065-0.0233841842747j)*x[2]
+            ref[(1, 0)]+=(0.243477527065-0.0233841842747j)*x_ref[2]
+            arg[(1, 1)]+=(0.0082486144859-0.274681907189j)*x[2]
+            ref[(1, 1)]+=(0.0082486144859-0.274681907189j)*x_ref[2]
+            arg[(2, 0)]+=(0.823455917928-0.618395675813j)*x[2]
+            ref[(2, 0)]+=(0.823455917928-0.618395675813j)*x_ref[2]
+            arg[(2, 1)]+=(0.10193050092+0.975176448884j)*x[2]
+            ref[(2, 1)]+=(0.10193050092+0.975176448884j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4),w)
+        ref = Data(0,(2, 4, 4),w_ref)
+        arg[(0, 0, 0)]=(0.758245945625-0.17323860051j)*x[0] + ((0.639259391224+0.731849067969j))*x[1]
+        ref[(0, 0, 0)]=(0.758245945625-0.17323860051j)*x_ref[0] + ((0.639259391224+0.731849067969j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.118797361437-0.177130235148j)*x[0] + ((0.748455519001-0.367582446837j))*x[1]
+        ref[(0, 0, 1)]=(-0.118797361437-0.177130235148j)*x_ref[0] + ((0.748455519001-0.367582446837j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.645943424553-0.122417314131j)*x[0] + ((0.626110372471+0.797616355502j))*x[1]
+        ref[(0, 0, 2)]=(-0.645943424553-0.122417314131j)*x_ref[0] + ((0.626110372471+0.797616355502j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.238865630944+0.975446512183j)*x[0] + ((-0.94787910221-0.12264091257j))*x[1]
+        ref[(0, 0, 3)]=(0.238865630944+0.975446512183j)*x_ref[0] + ((-0.94787910221-0.12264091257j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.465580210759+0.718885416248j)*x[0] + ((-0.421287488307-0.0507367754931j))*x[1]
+        ref[(0, 1, 0)]=(-0.465580210759+0.718885416248j)*x_ref[0] + ((-0.421287488307-0.0507367754931j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.432438262529+0.42771875269j)*x[0] + ((-0.424995429129-0.217685007208j))*x[1]
+        ref[(0, 1, 1)]=(-0.432438262529+0.42771875269j)*x_ref[0] + ((-0.424995429129-0.217685007208j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.137733058226+0.102455202214j)*x[0] + ((-0.305747188117-0.496590980172j))*x[1]
+        ref[(0, 1, 2)]=(-0.137733058226+0.102455202214j)*x_ref[0] + ((-0.305747188117-0.496590980172j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.179331541476+0.354194528022j)*x[0] + ((-0.826636338074-0.647693091503j))*x[1]
+        ref[(0, 1, 3)]=(0.179331541476+0.354194528022j)*x_ref[0] + ((-0.826636338074-0.647693091503j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.791483846725-0.845900380379j)*x[0] + ((0.240788864271-0.0726191955602j))*x[1]
+        ref[(0, 2, 0)]=(0.791483846725-0.845900380379j)*x_ref[0] + ((0.240788864271-0.0726191955602j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.681303066467-0.619589987539j)*x[0] + ((-0.962911672454+0.506860707951j))*x[1]
+        ref[(0, 2, 1)]=(0.681303066467-0.619589987539j)*x_ref[0] + ((-0.962911672454+0.506860707951j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.304990843349+0.569693355139j)*x[0] + ((-0.638969732857-0.0745496280078j))*x[1]
+        ref[(0, 2, 2)]=(0.304990843349+0.569693355139j)*x_ref[0] + ((-0.638969732857-0.0745496280078j))*x_ref[1]
+        arg[(0, 2, 3)]=(-0.534003878807-0.501374729275j)*x[0] + ((0.156574543153+0.377053261311j))*x[1]
+        ref[(0, 2, 3)]=(-0.534003878807-0.501374729275j)*x_ref[0] + ((0.156574543153+0.377053261311j))*x_ref[1]
+        arg[(0, 3, 0)]=(-0.611611626857-0.984303878551j)*x[0] + ((-0.812293002178-0.589404521874j))*x[1]
+        ref[(0, 3, 0)]=(-0.611611626857-0.984303878551j)*x_ref[0] + ((-0.812293002178-0.589404521874j))*x_ref[1]
+        arg[(0, 3, 1)]=(0.41521578301-0.740897970768j)*x[0] + ((0.780302612005+0.673000688327j))*x[1]
+        ref[(0, 3, 1)]=(0.41521578301-0.740897970768j)*x_ref[0] + ((0.780302612005+0.673000688327j))*x_ref[1]
+        arg[(0, 3, 2)]=(0.192366863029+0.485069993122j)*x[0] + ((-0.14269721588-0.26376417801j))*x[1]
+        ref[(0, 3, 2)]=(0.192366863029+0.485069993122j)*x_ref[0] + ((-0.14269721588-0.26376417801j))*x_ref[1]
+        arg[(0, 3, 3)]=(-0.163280105648+0.0883629313479j)*x[0] + ((-0.521652549049-0.113482777435j))*x[1]
+        ref[(0, 3, 3)]=(-0.163280105648+0.0883629313479j)*x_ref[0] + ((-0.521652549049-0.113482777435j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.167230673213+0.011639479621j)*x[0] + ((-0.45454732174+0.310435930856j))*x[1]
+        ref[(1, 0, 0)]=(0.167230673213+0.011639479621j)*x_ref[0] + ((-0.45454732174+0.310435930856j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.0791014059876+0.074675360503j)*x[0] + ((-0.430613620987+0.842781200357j))*x[1]
+        ref[(1, 0, 1)]=(0.0791014059876+0.074675360503j)*x_ref[0] + ((-0.430613620987+0.842781200357j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.712870629843-0.425540190336j)*x[0] + ((0.220972654751-0.40257898048j))*x[1]
+        ref[(1, 0, 2)]=(0.712870629843-0.425540190336j)*x_ref[0] + ((0.220972654751-0.40257898048j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.187875952429+0.699861385863j)*x[0] + ((0.361493019928-0.515262679028j))*x[1]
+        ref[(1, 0, 3)]=(0.187875952429+0.699861385863j)*x_ref[0] + ((0.361493019928-0.515262679028j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.816522513639-0.147233482088j)*x[0] + ((0.239254405835-0.806080714872j))*x[1]
+        ref[(1, 1, 0)]=(0.816522513639-0.147233482088j)*x_ref[0] + ((0.239254405835-0.806080714872j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.367608692135-0.150871490359j)*x[0] + ((0.989814980369+0.588536915709j))*x[1]
+        ref[(1, 1, 1)]=(0.367608692135-0.150871490359j)*x_ref[0] + ((0.989814980369+0.588536915709j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.984883349144+0.659398189595j)*x[0] + ((-0.957320171701-0.939752506814j))*x[1]
+        ref[(1, 1, 2)]=(-0.984883349144+0.659398189595j)*x_ref[0] + ((-0.957320171701-0.939752506814j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.843771806245-0.100149912824j)*x[0] + ((-0.55572946251-0.994370322517j))*x[1]
+        ref[(1, 1, 3)]=(-0.843771806245-0.100149912824j)*x_ref[0] + ((-0.55572946251-0.994370322517j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.556816339104+0.855664334007j)*x[0] + ((-0.30931463153+0.189185334821j))*x[1]
+        ref[(1, 2, 0)]=(0.556816339104+0.855664334007j)*x_ref[0] + ((-0.30931463153+0.189185334821j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.0552777034733+0.54278098886j)*x[0] + ((0.187208915298+0.612354768529j))*x[1]
+        ref[(1, 2, 1)]=(-0.0552777034733+0.54278098886j)*x_ref[0] + ((0.187208915298+0.612354768529j))*x_ref[1]
+        arg[(1, 2, 2)]=(-0.952578176778-0.300542286766j)*x[0] + ((-0.432205351515-0.790398031877j))*x[1]
+        ref[(1, 2, 2)]=(-0.952578176778-0.300542286766j)*x_ref[0] + ((-0.432205351515-0.790398031877j))*x_ref[1]
+        arg[(1, 2, 3)]=(0.825541109555-0.734030407692j)*x[0] + ((-0.263936085364-0.956885179932j))*x[1]
+        ref[(1, 2, 3)]=(0.825541109555-0.734030407692j)*x_ref[0] + ((-0.263936085364-0.956885179932j))*x_ref[1]
+        arg[(1, 3, 0)]=(0.855485065803-0.0997068490729j)*x[0] + ((-0.940358287564-0.849309974396j))*x[1]
+        ref[(1, 3, 0)]=(0.855485065803-0.0997068490729j)*x_ref[0] + ((-0.940358287564-0.849309974396j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.706014040839+0.00876287288901j)*x[0] + ((0.696619121915+0.412264010472j))*x[1]
+        ref[(1, 3, 1)]=(0.706014040839+0.00876287288901j)*x_ref[0] + ((0.696619121915+0.412264010472j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.275101007347-0.917945647599j)*x[0] + ((-0.0700765973847+0.460586250747j))*x[1]
+        ref[(1, 3, 2)]=(-0.275101007347-0.917945647599j)*x_ref[0] + ((-0.0700765973847+0.460586250747j))*x_ref[1]
+        arg[(1, 3, 3)]=(-0.565118108694-0.631396863514j)*x[0] + ((0.241683637993+0.103441987132j))*x[1]
+        ref[(1, 3, 3)]=(-0.565118108694-0.631396863514j)*x_ref[0] + ((0.241683637993+0.103441987132j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.272019020944-0.0188365589362j)*x[2]
+            ref[(0, 0, 0)]+=(-0.272019020944-0.0188365589362j)*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.364588706352+0.0640384070446j)*x[2]
+            ref[(0, 0, 1)]+=(-0.364588706352+0.0640384070446j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.807646467439+0.341751041667j)*x[2]
+            ref[(0, 0, 2)]+=(-0.807646467439+0.341751041667j)*x_ref[2]
+            arg[(0, 0, 3)]+=(0.679957649031-0.130835180055j)*x[2]
+            ref[(0, 0, 3)]+=(0.679957649031-0.130835180055j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.0716614178461+0.474661522559j)*x[2]
+            ref[(0, 1, 0)]+=(0.0716614178461+0.474661522559j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.114233385106-0.599729846601j)*x[2]
+            ref[(0, 1, 1)]+=(-0.114233385106-0.599729846601j)*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.806740518284-0.706414074341j)*x[2]
+            ref[(0, 1, 2)]+=(-0.806740518284-0.706414074341j)*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.208149105736-0.323392148639j)*x[2]
+            ref[(0, 1, 3)]+=(-0.208149105736-0.323392148639j)*x_ref[2]
+            arg[(0, 2, 0)]+=(0.603510289884+0.514907733206j)*x[2]
+            ref[(0, 2, 0)]+=(0.603510289884+0.514907733206j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.962020551928+0.774601445297j)*x[2]
+            ref[(0, 2, 1)]+=(0.962020551928+0.774601445297j)*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.917717243273-0.168150146063j)*x[2]
+            ref[(0, 2, 2)]+=(-0.917717243273-0.168150146063j)*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.296175145027+0.881152450049j)*x[2]
+            ref[(0, 2, 3)]+=(-0.296175145027+0.881152450049j)*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.53531747545-0.781376107041j)*x[2]
+            ref[(0, 3, 0)]+=(-0.53531747545-0.781376107041j)*x_ref[2]
+            arg[(0, 3, 1)]+=(0.00437354915569-0.529640005362j)*x[2]
+            ref[(0, 3, 1)]+=(0.00437354915569-0.529640005362j)*x_ref[2]
+            arg[(0, 3, 2)]+=(-0.481304063089-0.876238684161j)*x[2]
+            ref[(0, 3, 2)]+=(-0.481304063089-0.876238684161j)*x_ref[2]
+            arg[(0, 3, 3)]+=(0.728380972008+0.0594223101381j)*x[2]
+            ref[(0, 3, 3)]+=(0.728380972008+0.0594223101381j)*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.336173408364+0.114265050505j)*x[2]
+            ref[(1, 0, 0)]+=(-0.336173408364+0.114265050505j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.414157053248+0.0564263403194j)*x[2]
+            ref[(1, 0, 1)]+=(0.414157053248+0.0564263403194j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.241079688283-0.60255219676j)*x[2]
+            ref[(1, 0, 2)]+=(0.241079688283-0.60255219676j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.585669967372+0.584557007512j)*x[2]
+            ref[(1, 0, 3)]+=(-0.585669967372+0.584557007512j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.997215833296+0.630222924374j)*x[2]
+            ref[(1, 1, 0)]+=(0.997215833296+0.630222924374j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.771115785603-0.919381429131j)*x[2]
+            ref[(1, 1, 1)]+=(0.771115785603-0.919381429131j)*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.615792878278+0.436938947781j)*x[2]
+            ref[(1, 1, 2)]+=(-0.615792878278+0.436938947781j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.365020802543+0.989102735028j)*x[2]
+            ref[(1, 1, 3)]+=(0.365020802543+0.989102735028j)*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.873201269409+0.293533670377j)*x[2]
+            ref[(1, 2, 0)]+=(-0.873201269409+0.293533670377j)*x_ref[2]
+            arg[(1, 2, 1)]+=(0.67064217663-0.862012031425j)*x[2]
+            ref[(1, 2, 1)]+=(0.67064217663-0.862012031425j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.198016268847+0.421316463362j)*x[2]
+            ref[(1, 2, 2)]+=(0.198016268847+0.421316463362j)*x_ref[2]
+            arg[(1, 2, 3)]+=(0.00951781801413-0.946511133709j)*x[2]
+            ref[(1, 2, 3)]+=(0.00951781801413-0.946511133709j)*x_ref[2]
+            arg[(1, 3, 0)]+=(0.46578733893-0.437430410992j)*x[2]
+            ref[(1, 3, 0)]+=(0.46578733893-0.437430410992j)*x_ref[2]
+            arg[(1, 3, 1)]+=(-0.569886178203-0.400363557606j)*x[2]
+            ref[(1, 3, 1)]+=(-0.569886178203-0.400363557606j)*x_ref[2]
+            arg[(1, 3, 2)]+=(0.741695322141-0.225117073882j)*x[2]
+            ref[(1, 3, 2)]+=(0.741695322141-0.225117073882j)*x_ref[2]
+            arg[(1, 3, 3)]+=(-0.614709140211-0.869053674686j)*x[2]
+            ref[(1, 3, 3)]+=(-0.614709140211-0.869053674686j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2, 2),w)
+        ref = Data(0,(3, 4, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.506767491672-0.173750989151j)*x[0] + ((0.934481549731+0.219743080871j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.506767491672-0.173750989151j)*x_ref[0] + ((0.934481549731+0.219743080871j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.923471607274+0.280072224056j)*x[0] + ((-0.998672965868+0.0248113258886j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.923471607274+0.280072224056j)*x_ref[0] + ((-0.998672965868+0.0248113258886j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.0459430487976+0.360527547525j)*x[0] + ((-0.693792953377+0.122878420801j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.0459430487976+0.360527547525j)*x_ref[0] + ((-0.693792953377+0.122878420801j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.279508320856+0.257027819259j)*x[0] + ((-0.12226845571+0.873593194021j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.279508320856+0.257027819259j)*x_ref[0] + ((-0.12226845571+0.873593194021j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.129403804016+0.191788007446j)*x[0] + ((-0.339588091465-0.000560387555343j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.129403804016+0.191788007446j)*x_ref[0] + ((-0.339588091465-0.000560387555343j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.351702627163-0.616945379635j)*x[0] + ((-0.555747350232+0.749239158322j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.351702627163-0.616945379635j)*x_ref[0] + ((-0.555747350232+0.749239158322j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.0838072576141-0.690355726598j)*x[0] + ((0.37122475254-0.0861001291287j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.0838072576141-0.690355726598j)*x_ref[0] + ((0.37122475254-0.0861001291287j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.662307647146-0.11823351395j)*x[0] + ((-0.410282829361-0.171404574595j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.662307647146-0.11823351395j)*x_ref[0] + ((-0.410282829361-0.171404574595j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(-0.0888338623382+0.262600121932j)*x[0] + ((-0.999785229611+0.792097421995j))*x[1]
+        ref[(0, 2, 0, 0)]=(-0.0888338623382+0.262600121932j)*x_ref[0] + ((-0.999785229611+0.792097421995j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.82705774732-0.655542077212j)*x[0] + ((-0.106254968069-0.790443606371j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.82705774732-0.655542077212j)*x_ref[0] + ((-0.106254968069-0.790443606371j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.719833768398-0.307047566997j)*x[0] + ((-0.448247694748-0.697485041074j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.719833768398-0.307047566997j)*x_ref[0] + ((-0.448247694748-0.697485041074j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.361025644656+0.579977785979j)*x[0] + ((-0.909261325691-0.96430674191j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.361025644656+0.579977785979j)*x_ref[0] + ((-0.909261325691-0.96430674191j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(-0.966517980224-0.901148011721j)*x[0] + ((-0.20038874157-0.495006472801j))*x[1]
+        ref[(0, 3, 0, 0)]=(-0.966517980224-0.901148011721j)*x_ref[0] + ((-0.20038874157-0.495006472801j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.930964250364+0.289535362763j)*x[0] + ((-0.986196116599-0.676122322486j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.930964250364+0.289535362763j)*x_ref[0] + ((-0.986196116599-0.676122322486j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.74485588376-0.436732623735j)*x[0] + ((-0.681095685531+0.0972880497273j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.74485588376-0.436732623735j)*x_ref[0] + ((-0.681095685531+0.0972880497273j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.677413967867-0.835291106615j)*x[0] + ((0.283069418709+0.99337577561j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.677413967867-0.835291106615j)*x_ref[0] + ((0.283069418709+0.99337577561j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.379843985733-0.647404490302j)*x[0] + ((-0.317190342649+0.710884840663j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.379843985733-0.647404490302j)*x_ref[0] + ((-0.317190342649+0.710884840663j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.806285691658+0.880796799377j)*x[0] + ((-0.474876286289+0.7607646427j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.806285691658+0.880796799377j)*x_ref[0] + ((-0.474876286289+0.7607646427j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.585144875395-0.857830057793j)*x[0] + ((0.619117113114+0.401012054346j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.585144875395-0.857830057793j)*x_ref[0] + ((0.619117113114+0.401012054346j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.0813591907627-0.213687324361j)*x[0] + ((0.166634548139+0.47573690137j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.0813591907627-0.213687324361j)*x_ref[0] + ((0.166634548139+0.47573690137j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.0475550634099-0.897671186341j)*x[0] + ((0.668055571375+0.421567022622j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.0475550634099-0.897671186341j)*x_ref[0] + ((0.668055571375+0.421567022622j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.620213061164+0.909064971944j)*x[0] + ((-0.219288599461+0.00199311128778j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.620213061164+0.909064971944j)*x_ref[0] + ((-0.219288599461+0.00199311128778j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.244994176815-0.314974803973j)*x[0] + ((-0.0148767188078+0.362410768698j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.244994176815-0.314974803973j)*x_ref[0] + ((-0.0148767188078+0.362410768698j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.974953642775+0.819612609617j)*x[0] + ((-0.50712057838+0.211886915654j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.974953642775+0.819612609617j)*x_ref[0] + ((-0.50712057838+0.211886915654j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.835439863057+0.619307624825j)*x[0] + ((0.691182495618+0.127899296927j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.835439863057+0.619307624825j)*x_ref[0] + ((0.691182495618+0.127899296927j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.922651958661-0.621727131747j)*x[0] + ((-0.792848164199+0.518738106646j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.922651958661-0.621727131747j)*x_ref[0] + ((-0.792848164199+0.518738106646j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.547174348194-0.921411468703j)*x[0] + ((0.651735502399+0.149730825112j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.547174348194-0.921411468703j)*x_ref[0] + ((0.651735502399+0.149730825112j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.395514613847+0.0193946971294j)*x[0] + ((0.712961993114+0.763750252915j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.395514613847+0.0193946971294j)*x_ref[0] + ((0.712961993114+0.763750252915j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.12612228343-0.437483264397j)*x[0] + ((0.934786945014-0.776911005114j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.12612228343-0.437483264397j)*x_ref[0] + ((0.934786945014-0.776911005114j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(0.361355619092+0.50192389587j)*x[0] + ((-0.64183558592-0.00240201024533j))*x[1]
+        ref[(1, 3, 0, 1)]=(0.361355619092+0.50192389587j)*x_ref[0] + ((-0.64183558592-0.00240201024533j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(0.801034347776+0.774092734464j)*x[0] + ((0.347630135849+0.465291966151j))*x[1]
+        ref[(1, 3, 1, 0)]=(0.801034347776+0.774092734464j)*x_ref[0] + ((0.347630135849+0.465291966151j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.0661754693855-0.887261569541j)*x[0] + ((0.314748970621-0.909092792193j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.0661754693855-0.887261569541j)*x_ref[0] + ((0.314748970621-0.909092792193j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.00846033703995+0.558055697676j)*x[0] + ((-0.432048795583-0.175403822487j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.00846033703995+0.558055697676j)*x_ref[0] + ((-0.432048795583-0.175403822487j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.212861949665-0.324418969711j)*x[0] + ((0.372696436739-0.242628258806j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.212861949665-0.324418969711j)*x_ref[0] + ((0.372696436739-0.242628258806j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.463792032259+0.817516936074j)*x[0] + ((-0.17731742797-0.240841908654j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.463792032259+0.817516936074j)*x_ref[0] + ((-0.17731742797-0.240841908654j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.884116425537+0.288911460252j)*x[0] + ((0.684093023616+0.156579686344j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.884116425537+0.288911460252j)*x_ref[0] + ((0.684093023616+0.156579686344j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.830413196776-0.0665546820234j)*x[0] + ((0.508071827934-0.0872560108818j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.830413196776-0.0665546820234j)*x_ref[0] + ((0.508071827934-0.0872560108818j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.118186501379+0.1069658103j)*x[0] + ((-0.0712194814044-0.481180746155j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.118186501379+0.1069658103j)*x_ref[0] + ((-0.0712194814044-0.481180746155j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.426601403603+0.844267366113j)*x[0] + ((0.479571204981+0.138060085399j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.426601403603+0.844267366113j)*x_ref[0] + ((0.479571204981+0.138060085399j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.226886540736-0.283257293396j)*x[0] + ((-0.661289129682+0.398926504761j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.226886540736-0.283257293396j)*x_ref[0] + ((-0.661289129682+0.398926504761j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(-0.13689174809-0.338740569739j)*x[0] + ((-0.40556290891+0.774601740718j))*x[1]
+        ref[(2, 2, 0, 0)]=(-0.13689174809-0.338740569739j)*x_ref[0] + ((-0.40556290891+0.774601740718j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.00263317551114+0.724600210016j)*x[0] + ((0.542378828047+0.258480235963j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.00263317551114+0.724600210016j)*x_ref[0] + ((0.542378828047+0.258480235963j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.85875638809-0.335938029619j)*x[0] + ((0.886363396914+0.880963452698j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.85875638809-0.335938029619j)*x_ref[0] + ((0.886363396914+0.880963452698j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.770715558217-0.651112786116j)*x[0] + ((-0.831815737402+0.980465083147j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.770715558217-0.651112786116j)*x_ref[0] + ((-0.831815737402+0.980465083147j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(-0.795664300823-0.39095581676j)*x[0] + ((-0.682507461356-0.0605951552173j))*x[1]
+        ref[(2, 3, 0, 0)]=(-0.795664300823-0.39095581676j)*x_ref[0] + ((-0.682507461356-0.0605951552173j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(0.439471303851+0.899862371132j)*x[0] + ((-0.832304382687-0.50382354797j))*x[1]
+        ref[(2, 3, 0, 1)]=(0.439471303851+0.899862371132j)*x_ref[0] + ((-0.832304382687-0.50382354797j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(-0.0732568924981+0.206468857482j)*x[0] + ((0.921830393059-0.872780826034j))*x[1]
+        ref[(2, 3, 1, 0)]=(-0.0732568924981+0.206468857482j)*x_ref[0] + ((0.921830393059-0.872780826034j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(-0.569131887501-0.784459783824j)*x[0] + ((-0.563207737183+0.111304743162j))*x[1]
+        ref[(2, 3, 1, 1)]=(-0.569131887501-0.784459783824j)*x_ref[0] + ((-0.563207737183+0.111304743162j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.508481398937-0.196338457571j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.508481398937-0.196338457571j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.388089863021-0.459214071409j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.388089863021-0.459214071409j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.887223130383+0.743692505097j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.887223130383+0.743692505097j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.986560193399-0.409455282422j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.986560193399-0.409455282422j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.372948386894+0.434228264715j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.372948386894+0.434228264715j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.354688190022+0.100881618371j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.354688190022+0.100881618371j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.988124244869-0.979839317055j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.988124244869-0.979839317055j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.888025134804+0.918255626005j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.888025134804+0.918255626005j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.484190472615-0.0988899582956j)*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.484190472615-0.0988899582956j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.641559482559+0.686158518857j)*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.641559482559+0.686158518857j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.490231229673+0.467852156342j)*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.490231229673+0.467852156342j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.52527464851+0.652063706738j)*x[2]
+            ref[(0, 2, 1, 1)]+=(0.52527464851+0.652063706738j)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.289753252959+0.454229405204j)*x[2]
+            ref[(0, 3, 0, 0)]+=(0.289753252959+0.454229405204j)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.897757102547-0.406518316878j)*x[2]
+            ref[(0, 3, 0, 1)]+=(0.897757102547-0.406518316878j)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.509594731231-0.107065753681j)*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.509594731231-0.107065753681j)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.269762527313+0.360362918175j)*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.269762527313+0.360362918175j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.685373048544-0.353671673166j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.685373048544-0.353671673166j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.855156132212+0.0219065531225j)*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.855156132212+0.0219065531225j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.982126952056-0.39657838487j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.982126952056-0.39657838487j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.679886266689-0.0749480183272j)*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.679886266689-0.0749480183272j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.721272914757+0.936765092701j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.721272914757+0.936765092701j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.993473679742-0.438327239067j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.993473679742-0.438327239067j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.239514378906-0.69694263999j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.239514378906-0.69694263999j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.67253774374-0.828905252176j)*x[2]
+            ref[(1, 1, 1, 1)]+=(0.67253774374-0.828905252176j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.057261495334-0.480406612178j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.057261495334-0.480406612178j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.674879207715+0.714479732154j)*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.674879207715+0.714479732154j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.301610501935-0.920638449246j)*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.301610501935-0.920638449246j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.100442849+0.699999461081j)*x[2]
+            ref[(1, 2, 1, 1)]+=(0.100442849+0.699999461081j)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.0848382607858-0.220742656043j)*x[2]
+            ref[(1, 3, 0, 0)]+=(0.0848382607858-0.220742656043j)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.731813021248+0.239282079597j)*x[2]
+            ref[(1, 3, 0, 1)]+=(0.731813021248+0.239282079597j)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.914337320777+0.698537015791j)*x[2]
+            ref[(1, 3, 1, 0)]+=(0.914337320777+0.698537015791j)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.0410744653927+0.810782131966j)*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.0410744653927+0.810782131966j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.976689851366+0.106010193062j)*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.976689851366+0.106010193062j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.0628576683482+0.357646654995j)*x[2]
+            ref[(2, 0, 0, 1)]+=(0.0628576683482+0.357646654995j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.0985351477939-0.809646638202j)*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.0985351477939-0.809646638202j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.142564100026-0.820007888485j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.142564100026-0.820007888485j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.670854889264-0.459529416044j)*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.670854889264-0.459529416044j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.455883285378-0.567655011511j)*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.455883285378-0.567655011511j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.000384496495861-0.70514806593j)*x[2]
+            ref[(2, 1, 1, 0)]+=(0.000384496495861-0.70514806593j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.526148368767+0.967252851211j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.526148368767+0.967252851211j)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.738864339506-0.733209728872j)*x[2]
+            ref[(2, 2, 0, 0)]+=(0.738864339506-0.733209728872j)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.964980397788-0.540509577225j)*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.964980397788-0.540509577225j)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.0743253320047-0.981962837026j)*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.0743253320047-0.981962837026j)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.299354271426+0.373924939273j)*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.299354271426+0.373924939273j)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(0.279554373567+0.404256949037j)*x[2]
+            ref[(2, 3, 0, 0)]+=(0.279554373567+0.404256949037j)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(-0.494803252345+0.22505816208j)*x[2]
+            ref[(2, 3, 0, 1)]+=(-0.494803252345+0.22505816208j)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(0.828587534518-0.526726872803j)*x[2]
+            ref[(2, 3, 1, 0)]+=(0.828587534518-0.526726872803j)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(0.145248685773+0.21198950125j)*x[2]
+            ref[(2, 3, 1, 1)]+=(0.145248685773+0.21198950125j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.0791259696384+0.600418218962j)*x[0]**o + ((0.0597209915325+0.713344872879j))*x[0] + ((0.119881707842+0.331828836828j))*x[1]**o + ((-0.288053702681-0.720784833156j))*x[1]
+        ref=(0.0791259696384+0.600418218962j)*x_ref[0]**o + ((0.0597209915325+0.713344872879j))*x_ref[0] + ((0.119881707842+0.331828836828j))*x_ref[1]**o + ((-0.288053702681-0.720784833156j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.713538203608+0.966381721127j))*x[2]**o + ((-0.138064104325-0.819896094991j))*x[2]
+            ref+=((-0.713538203608+0.966381721127j))*x_ref[2]**o + ((-0.138064104325-0.819896094991j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.207483404031+0.328868307056j)*x[0]**o + ((0.00187074535625-0.303298318573j))*x[0] + ((-0.614194650403+0.272036100255j))*x[1]**o + ((0.530981455695+0.366718053792j))*x[1]
+        ref[(0,)]=(0.207483404031+0.328868307056j)*x_ref[0]**o + ((0.00187074535625-0.303298318573j))*x_ref[0] + ((-0.614194650403+0.272036100255j))*x_ref[1]**o + ((0.530981455695+0.366718053792j))*x_ref[1]
+        arg[(1,)]=(-0.751847782727-0.556032835007j)*x[0]**o + ((-0.20357848568-0.0592552103478j))*x[0] + ((-0.281221468492-0.195097745821j))*x[1]**o + ((0.170497008403+0.0360099098916j))*x[1]
+        ref[(1,)]=(-0.751847782727-0.556032835007j)*x_ref[0]**o + ((-0.20357848568-0.0592552103478j))*x_ref[0] + ((-0.281221468492-0.195097745821j))*x_ref[1]**o + ((0.170497008403+0.0360099098916j))*x_ref[1]
+        arg[(2,)]=(0.539666728882-0.519377225001j)*x[0]**o + ((0.192534205089+0.597733813648j))*x[0] + ((0.603243240512-0.826586664965j))*x[1]**o + ((-0.958109385408-0.497560585076j))*x[1]
+        ref[(2,)]=(0.539666728882-0.519377225001j)*x_ref[0]**o + ((0.192534205089+0.597733813648j))*x_ref[0] + ((0.603243240512-0.826586664965j))*x_ref[1]**o + ((-0.958109385408-0.497560585076j))*x_ref[1]
+        arg[(3,)]=(0.435168191548-0.810916564122j)*x[0]**o + ((-0.482983320016-0.931037670226j))*x[0] + ((0.660750833355-0.555394874468j))*x[1]**o + ((-0.620653021996+0.347370266123j))*x[1]
+        ref[(3,)]=(0.435168191548-0.810916564122j)*x_ref[0]**o + ((-0.482983320016-0.931037670226j))*x_ref[0] + ((0.660750833355-0.555394874468j))*x_ref[1]**o + ((-0.620653021996+0.347370266123j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.844334667864-0.494607840141j)*x[2]**o + ((-0.971528703007+0.790345526041j))*x[2]
+            ref[(0,)]+=(0.844334667864-0.494607840141j)*x_ref[2]**o + ((-0.971528703007+0.790345526041j))*x_ref[2]
+            arg[(1,)]+=(0.00498863005193+0.173261369167j)*x[2]**o + ((-0.320658935779+0.824437461496j))*x[2]
+            ref[(1,)]+=(0.00498863005193+0.173261369167j)*x_ref[2]**o + ((-0.320658935779+0.824437461496j))*x_ref[2]
+            arg[(2,)]+=(0.209652155135+0.56241000681j)*x[2]**o + ((-0.266984953159+0.663513033468j))*x[2]
+            ref[(2,)]+=(0.209652155135+0.56241000681j)*x_ref[2]**o + ((-0.266984953159+0.663513033468j))*x_ref[2]
+            arg[(3,)]+=(-0.128526504271-0.736812965139j)*x[2]**o + ((0.436240822405+0.46105036541j))*x[2]
+            ref[(3,)]+=(-0.128526504271-0.736812965139j)*x_ref[2]**o + ((0.436240822405+0.46105036541j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=(-0.496499932726+0.266151644609j)*x[0]**o + ((-0.44631800278-0.0355342326767j))*x[0] + ((-0.901190312275+0.124674016435j))*x[1]**o + ((0.367954072202+0.276562230393j))*x[1]
+        ref[(0, 0)]=(-0.496499932726+0.266151644609j)*x_ref[0]**o + ((-0.44631800278-0.0355342326767j))*x_ref[0] + ((-0.901190312275+0.124674016435j))*x_ref[1]**o + ((0.367954072202+0.276562230393j))*x_ref[1]
+        arg[(0, 1)]=(0.442951829917+0.821937598564j)*x[0]**o + ((-0.4052603449-0.529334466158j))*x[0] + ((-0.148494741196+0.855864536286j))*x[1]**o + ((-0.0436760082921+0.737839252533j))*x[1]
+        ref[(0, 1)]=(0.442951829917+0.821937598564j)*x_ref[0]**o + ((-0.4052603449-0.529334466158j))*x_ref[0] + ((-0.148494741196+0.855864536286j))*x_ref[1]**o + ((-0.0436760082921+0.737839252533j))*x_ref[1]
+        arg[(0, 2)]=(0.303181697673-0.686559533388j)*x[0]**o + ((0.267780290268+0.827344380647j))*x[0] + ((-0.69782612095-0.881286798893j))*x[1]**o + ((-0.522575653316-0.567718262708j))*x[1]
+        ref[(0, 2)]=(0.303181697673-0.686559533388j)*x_ref[0]**o + ((0.267780290268+0.827344380647j))*x_ref[0] + ((-0.69782612095-0.881286798893j))*x_ref[1]**o + ((-0.522575653316-0.567718262708j))*x_ref[1]
+        arg[(0, 3)]=(-0.924466089494-0.0835951483578j)*x[0]**o + ((0.108752627227-0.718989019254j))*x[0] + ((-0.992281527504-0.161239713291j))*x[1]**o + ((0.860250598423+0.984937619689j))*x[1]
+        ref[(0, 3)]=(-0.924466089494-0.0835951483578j)*x_ref[0]**o + ((0.108752627227-0.718989019254j))*x_ref[0] + ((-0.992281527504-0.161239713291j))*x_ref[1]**o + ((0.860250598423+0.984937619689j))*x_ref[1]
+        arg[(1, 0)]=(0.920123913717+0.249293362299j)*x[0]**o + ((-0.329128900598+0.273229440905j))*x[0] + ((-0.903970680398+0.562187107498j))*x[1]**o + ((-0.261637353529-0.114515785303j))*x[1]
+        ref[(1, 0)]=(0.920123913717+0.249293362299j)*x_ref[0]**o + ((-0.329128900598+0.273229440905j))*x_ref[0] + ((-0.903970680398+0.562187107498j))*x_ref[1]**o + ((-0.261637353529-0.114515785303j))*x_ref[1]
+        arg[(1, 1)]=(-0.721955789714+0.420033908111j)*x[0]**o + ((-0.173613934237-0.171104713739j))*x[0] + ((-0.526291271822+0.542019973185j))*x[1]**o + ((-0.744490555418+0.426703159203j))*x[1]
+        ref[(1, 1)]=(-0.721955789714+0.420033908111j)*x_ref[0]**o + ((-0.173613934237-0.171104713739j))*x_ref[0] + ((-0.526291271822+0.542019973185j))*x_ref[1]**o + ((-0.744490555418+0.426703159203j))*x_ref[1]
+        arg[(1, 2)]=(0.719983653044-0.192348335886j)*x[0]**o + ((0.486413802326+0.571890516639j))*x[0] + ((0.888972022068+0.909298517846j))*x[1]**o + ((-0.304218008635-0.00555265867915j))*x[1]
+        ref[(1, 2)]=(0.719983653044-0.192348335886j)*x_ref[0]**o + ((0.486413802326+0.571890516639j))*x_ref[0] + ((0.888972022068+0.909298517846j))*x_ref[1]**o + ((-0.304218008635-0.00555265867915j))*x_ref[1]
+        arg[(1, 3)]=(-0.958427848075-0.74437225765j)*x[0]**o + ((-0.508840557418-0.178753595725j))*x[0] + ((0.248424858891-0.246804810398j))*x[1]**o + ((0.701926077042+0.817754792929j))*x[1]
+        ref[(1, 3)]=(-0.958427848075-0.74437225765j)*x_ref[0]**o + ((-0.508840557418-0.178753595725j))*x_ref[0] + ((0.248424858891-0.246804810398j))*x_ref[1]**o + ((0.701926077042+0.817754792929j))*x_ref[1]
+        arg[(2, 0)]=(0.208399459144-0.811340298716j)*x[0]**o + ((-0.782228454872+0.241730166929j))*x[0] + ((0.983279496919+0.577172458004j))*x[1]**o + ((0.360435099719-0.71131024479j))*x[1]
+        ref[(2, 0)]=(0.208399459144-0.811340298716j)*x_ref[0]**o + ((-0.782228454872+0.241730166929j))*x_ref[0] + ((0.983279496919+0.577172458004j))*x_ref[1]**o + ((0.360435099719-0.71131024479j))*x_ref[1]
+        arg[(2, 1)]=(-0.347692415909-0.102859927101j)*x[0]**o + ((0.430432316529+0.362250342497j))*x[0] + ((0.753800079764+0.835074126729j))*x[1]**o + ((0.0444239301673-0.498303301291j))*x[1]
+        ref[(2, 1)]=(-0.347692415909-0.102859927101j)*x_ref[0]**o + ((0.430432316529+0.362250342497j))*x_ref[0] + ((0.753800079764+0.835074126729j))*x_ref[1]**o + ((0.0444239301673-0.498303301291j))*x_ref[1]
+        arg[(2, 2)]=(-0.357022896067+0.536079593557j)*x[0]**o + ((-0.60277269536-0.13309927752j))*x[0] + ((-0.242364558051+0.714419070741j))*x[1]**o + ((0.647677215971-0.418632619535j))*x[1]
+        ref[(2, 2)]=(-0.357022896067+0.536079593557j)*x_ref[0]**o + ((-0.60277269536-0.13309927752j))*x_ref[0] + ((-0.242364558051+0.714419070741j))*x_ref[1]**o + ((0.647677215971-0.418632619535j))*x_ref[1]
+        arg[(2, 3)]=(0.831149580191+0.462325900785j)*x[0]**o + ((0.0349271483744+0.0624226893627j))*x[0] + ((0.354672325186-0.23186731952j))*x[1]**o + ((0.784425031667+0.914140101666j))*x[1]
+        ref[(2, 3)]=(0.831149580191+0.462325900785j)*x_ref[0]**o + ((0.0349271483744+0.0624226893627j))*x_ref[0] + ((0.354672325186-0.23186731952j))*x_ref[1]**o + ((0.784425031667+0.914140101666j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.96578421743-0.393690558172j)*x[2]**o + ((-0.142622412282-0.37987747657j))*x[2]
+            ref[(0, 0)]+=(0.96578421743-0.393690558172j)*x_ref[2]**o + ((-0.142622412282-0.37987747657j))*x_ref[2]
+            arg[(0, 1)]+=(0.556113827842+0.656393339862j)*x[2]**o + ((-0.277160449944-0.926887709834j))*x[2]
+            ref[(0, 1)]+=(0.556113827842+0.656393339862j)*x_ref[2]**o + ((-0.277160449944-0.926887709834j))*x_ref[2]
+            arg[(0, 2)]+=(-0.88361755455-0.35566181498j)*x[2]**o + ((-0.934517720492-0.471182907746j))*x[2]
+            ref[(0, 2)]+=(-0.88361755455-0.35566181498j)*x_ref[2]**o + ((-0.934517720492-0.471182907746j))*x_ref[2]
+            arg[(0, 3)]+=(0.635725932772+0.504361741876j)*x[2]**o + ((0.901291611648+0.770452856882j))*x[2]
+            ref[(0, 3)]+=(0.635725932772+0.504361741876j)*x_ref[2]**o + ((0.901291611648+0.770452856882j))*x_ref[2]
+            arg[(1, 0)]+=(0.771871378698+0.795570818755j)*x[2]**o + ((-0.326476910382-0.935595179243j))*x[2]
+            ref[(1, 0)]+=(0.771871378698+0.795570818755j)*x_ref[2]**o + ((-0.326476910382-0.935595179243j))*x_ref[2]
+            arg[(1, 1)]+=(0.405256819168-0.651378303651j)*x[2]**o + ((0.85374386575-0.0875250693237j))*x[2]
+            ref[(1, 1)]+=(0.405256819168-0.651378303651j)*x_ref[2]**o + ((0.85374386575-0.0875250693237j))*x_ref[2]
+            arg[(1, 2)]+=(-0.0383192714274+0.377164933631j)*x[2]**o + ((0.198923165354+0.947839397457j))*x[2]
+            ref[(1, 2)]+=(-0.0383192714274+0.377164933631j)*x_ref[2]**o + ((0.198923165354+0.947839397457j))*x_ref[2]
+            arg[(1, 3)]+=(0.950314396694+0.32508142651j)*x[2]**o + ((0.932740547679+0.627573669481j))*x[2]
+            ref[(1, 3)]+=(0.950314396694+0.32508142651j)*x_ref[2]**o + ((0.932740547679+0.627573669481j))*x_ref[2]
+            arg[(2, 0)]+=(-0.185896389115-0.033140356985j)*x[2]**o + ((0.740947263187-0.569341087526j))*x[2]
+            ref[(2, 0)]+=(-0.185896389115-0.033140356985j)*x_ref[2]**o + ((0.740947263187-0.569341087526j))*x_ref[2]
+            arg[(2, 1)]+=(0.441804188115+0.306127796808j)*x[2]**o + ((-0.246865920639-0.807194697622j))*x[2]
+            ref[(2, 1)]+=(0.441804188115+0.306127796808j)*x_ref[2]**o + ((-0.246865920639-0.807194697622j))*x_ref[2]
+            arg[(2, 2)]+=(-0.162761638577+0.246555060334j)*x[2]**o + ((0.78483707683-0.6321946373j))*x[2]
+            ref[(2, 2)]+=(-0.162761638577+0.246555060334j)*x_ref[2]**o + ((0.78483707683-0.6321946373j))*x_ref[2]
+            arg[(2, 3)]+=(0.636383681474-0.0570386586352j)*x[2]**o + ((0.292449742899-0.0666821350163j))*x[2]
+            ref[(2, 3)]+=(0.636383681474-0.0570386586352j)*x_ref[2]**o + ((0.292449742899-0.0666821350163j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3),w)
+        ref = Data(0,(2, 3, 3),w_ref)
+        arg[(0, 0, 0)]=(0.221732626828-0.36479788883j)*x[0]**o + ((0.812766962106+0.336063883442j))*x[0] + ((0.45429782309-0.514397497139j))*x[1]**o + ((0.963929204608-0.530764222271j))*x[1]
+        ref[(0, 0, 0)]=(0.221732626828-0.36479788883j)*x_ref[0]**o + ((0.812766962106+0.336063883442j))*x_ref[0] + ((0.45429782309-0.514397497139j))*x_ref[1]**o + ((0.963929204608-0.530764222271j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.797148104525-0.709383655605j)*x[0]**o + ((-0.477770996026-0.268210809291j))*x[0] + ((0.793823625542+0.27501461057j))*x[1]**o + ((-0.97286832568+0.836876816572j))*x[1]
+        ref[(0, 0, 1)]=(-0.797148104525-0.709383655605j)*x_ref[0]**o + ((-0.477770996026-0.268210809291j))*x_ref[0] + ((0.793823625542+0.27501461057j))*x_ref[1]**o + ((-0.97286832568+0.836876816572j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.321563496557-0.868964769902j)*x[0]**o + ((0.088153544304+0.620350657538j))*x[0] + ((0.748641041146-0.265397231255j))*x[1]**o + ((-0.496141659726+0.364468707479j))*x[1]
+        ref[(0, 0, 2)]=(0.321563496557-0.868964769902j)*x_ref[0]**o + ((0.088153544304+0.620350657538j))*x_ref[0] + ((0.748641041146-0.265397231255j))*x_ref[1]**o + ((-0.496141659726+0.364468707479j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.646137775087-0.0435953908938j)*x[0]**o + ((0.100216074773-0.67532787063j))*x[0] + ((-0.823501818573+0.879509064362j))*x[1]**o + ((-0.842209542978+0.74303918582j))*x[1]
+        ref[(0, 1, 0)]=(0.646137775087-0.0435953908938j)*x_ref[0]**o + ((0.100216074773-0.67532787063j))*x_ref[0] + ((-0.823501818573+0.879509064362j))*x_ref[1]**o + ((-0.842209542978+0.74303918582j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.425700682489-0.991311548787j)*x[0]**o + ((-0.0907631245685-0.0799864556434j))*x[0] + ((-0.970758797337+0.463681918269j))*x[1]**o + ((0.398637399817+0.0994785104571j))*x[1]
+        ref[(0, 1, 1)]=(-0.425700682489-0.991311548787j)*x_ref[0]**o + ((-0.0907631245685-0.0799864556434j))*x_ref[0] + ((-0.970758797337+0.463681918269j))*x_ref[1]**o + ((0.398637399817+0.0994785104571j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.739447304762-0.620470945515j)*x[0]**o + ((-0.507440993705+0.662688916613j))*x[0] + ((0.649877857149-0.148234718357j))*x[1]**o + ((0.638620539719+0.242381433741j))*x[1]
+        ref[(0, 1, 2)]=(0.739447304762-0.620470945515j)*x_ref[0]**o + ((-0.507440993705+0.662688916613j))*x_ref[0] + ((0.649877857149-0.148234718357j))*x_ref[1]**o + ((0.638620539719+0.242381433741j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.255053841042-0.0376061934939j)*x[0]**o + ((0.129321006076+0.161066040349j))*x[0] + ((-0.0530447538809-0.867696189721j))*x[1]**o + ((-0.155164267003+0.85183510982j))*x[1]
+        ref[(0, 2, 0)]=(-0.255053841042-0.0376061934939j)*x_ref[0]**o + ((0.129321006076+0.161066040349j))*x_ref[0] + ((-0.0530447538809-0.867696189721j))*x_ref[1]**o + ((-0.155164267003+0.85183510982j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.951445043351+0.0712108504754j)*x[0]**o + ((-0.874881534698+0.813952668532j))*x[0] + ((-0.928071811809-0.430539680208j))*x[1]**o + ((-0.870056568674+0.724439152643j))*x[1]
+        ref[(0, 2, 1)]=(0.951445043351+0.0712108504754j)*x_ref[0]**o + ((-0.874881534698+0.813952668532j))*x_ref[0] + ((-0.928071811809-0.430539680208j))*x_ref[1]**o + ((-0.870056568674+0.724439152643j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.928201079985+0.990525331787j)*x[0]**o + ((-0.275822097722-0.492091717958j))*x[0] + ((-0.357760658124+0.127267128879j))*x[1]**o + ((0.211818921475+0.329144256876j))*x[1]
+        ref[(0, 2, 2)]=(0.928201079985+0.990525331787j)*x_ref[0]**o + ((-0.275822097722-0.492091717958j))*x_ref[0] + ((-0.357760658124+0.127267128879j))*x_ref[1]**o + ((0.211818921475+0.329144256876j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.0144379081522+0.56007313506j)*x[0]**o + ((-0.459893211135-0.862123261766j))*x[0] + ((0.374746794869+0.712797792633j))*x[1]**o + ((0.195979164823+0.114941243476j))*x[1]
+        ref[(1, 0, 0)]=(0.0144379081522+0.56007313506j)*x_ref[0]**o + ((-0.459893211135-0.862123261766j))*x_ref[0] + ((0.374746794869+0.712797792633j))*x_ref[1]**o + ((0.195979164823+0.114941243476j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.745233744668+0.99270883734j)*x[0]**o + ((-0.522752573685+0.736068480762j))*x[0] + ((-0.414953302283+0.84869294287j))*x[1]**o + ((-0.549180432034-0.61062169063j))*x[1]
+        ref[(1, 0, 1)]=(-0.745233744668+0.99270883734j)*x_ref[0]**o + ((-0.522752573685+0.736068480762j))*x_ref[0] + ((-0.414953302283+0.84869294287j))*x_ref[1]**o + ((-0.549180432034-0.61062169063j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.287468500538-0.199324693637j)*x[0]**o + ((0.637555405214-0.550266320887j))*x[0] + ((0.285867972594-0.830479982438j))*x[1]**o + ((0.54087586011-0.130558790427j))*x[1]
+        ref[(1, 0, 2)]=(-0.287468500538-0.199324693637j)*x_ref[0]**o + ((0.637555405214-0.550266320887j))*x_ref[0] + ((0.285867972594-0.830479982438j))*x_ref[1]**o + ((0.54087586011-0.130558790427j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.345758766352-0.952866109243j)*x[0]**o + ((0.56842190805-0.20729597622j))*x[0] + ((0.628747865336+0.897698588996j))*x[1]**o + ((0.21772950045+0.266566731702j))*x[1]
+        ref[(1, 1, 0)]=(0.345758766352-0.952866109243j)*x_ref[0]**o + ((0.56842190805-0.20729597622j))*x_ref[0] + ((0.628747865336+0.897698588996j))*x_ref[1]**o + ((0.21772950045+0.266566731702j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.432394866251-0.967782054771j)*x[0]**o + ((-0.822028691174-0.965192868877j))*x[0] + ((-0.2649354982+0.542259520248j))*x[1]**o + ((0.622356417829-0.739211093594j))*x[1]
+        ref[(1, 1, 1)]=(-0.432394866251-0.967782054771j)*x_ref[0]**o + ((-0.822028691174-0.965192868877j))*x_ref[0] + ((-0.2649354982+0.542259520248j))*x_ref[1]**o + ((0.622356417829-0.739211093594j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.724356071724-0.282607057496j)*x[0]**o + ((0.835552308213-0.97406779432j))*x[0] + ((-0.452139599846-0.742454241302j))*x[1]**o + ((-0.617722250495+0.528720757044j))*x[1]
+        ref[(1, 1, 2)]=(-0.724356071724-0.282607057496j)*x_ref[0]**o + ((0.835552308213-0.97406779432j))*x_ref[0] + ((-0.452139599846-0.742454241302j))*x_ref[1]**o + ((-0.617722250495+0.528720757044j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.755030509029+0.886824594808j)*x[0]**o + ((-0.916559738336-0.882457979273j))*x[0] + ((0.563997240821-0.0496632688741j))*x[1]**o + ((0.695913871597+0.00419841484684j))*x[1]
+        ref[(1, 2, 0)]=(0.755030509029+0.886824594808j)*x_ref[0]**o + ((-0.916559738336-0.882457979273j))*x_ref[0] + ((0.563997240821-0.0496632688741j))*x_ref[1]**o + ((0.695913871597+0.00419841484684j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.665828975826+0.731309078201j)*x[0]**o + ((-0.752303345897-0.910990893985j))*x[0] + ((-0.760312194723+0.454766568204j))*x[1]**o + ((-0.980867907631+0.655030806625j))*x[1]
+        ref[(1, 2, 1)]=(-0.665828975826+0.731309078201j)*x_ref[0]**o + ((-0.752303345897-0.910990893985j))*x_ref[0] + ((-0.760312194723+0.454766568204j))*x_ref[1]**o + ((-0.980867907631+0.655030806625j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.63445764629-0.535485613077j)*x[0]**o + ((0.371841464303-0.272600114209j))*x[0] + ((-0.167196544786-0.122516994759j))*x[1]**o + ((0.702571788365-0.951094009814j))*x[1]
+        ref[(1, 2, 2)]=(0.63445764629-0.535485613077j)*x_ref[0]**o + ((0.371841464303-0.272600114209j))*x_ref[0] + ((-0.167196544786-0.122516994759j))*x_ref[1]**o + ((0.702571788365-0.951094009814j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.169475421506-0.395517456639j)*x[2]**o + ((0.799941253321+0.582967591195j))*x[2]
+            ref[(0, 0, 0)]+=(-0.169475421506-0.395517456639j)*x_ref[2]**o + ((0.799941253321+0.582967591195j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.213943501638-0.956979575593j)*x[2]**o + ((-0.213239458943+0.736559493954j))*x[2]
+            ref[(0, 0, 1)]+=(0.213943501638-0.956979575593j)*x_ref[2]**o + ((-0.213239458943+0.736559493954j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.907715792813-0.951031225791j)*x[2]**o + ((0.4134357482+0.123209273417j))*x[2]
+            ref[(0, 0, 2)]+=(-0.907715792813-0.951031225791j)*x_ref[2]**o + ((0.4134357482+0.123209273417j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.928082594865-0.621047065198j)*x[2]**o + ((-0.83884353643+0.341380097965j))*x[2]
+            ref[(0, 1, 0)]+=(-0.928082594865-0.621047065198j)*x_ref[2]**o + ((-0.83884353643+0.341380097965j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.19612780206+0.934264779346j)*x[2]**o + ((-0.975584954327-0.233226009888j))*x[2]
+            ref[(0, 1, 1)]+=(0.19612780206+0.934264779346j)*x_ref[2]**o + ((-0.975584954327-0.233226009888j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.5965155882-0.547074535515j)*x[2]**o + ((-0.270825364325+0.226409598388j))*x[2]
+            ref[(0, 1, 2)]+=(0.5965155882-0.547074535515j)*x_ref[2]**o + ((-0.270825364325+0.226409598388j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.315745050984+0.355539688831j)*x[2]**o + ((0.916210120514+0.637337537628j))*x[2]
+            ref[(0, 2, 0)]+=(-0.315745050984+0.355539688831j)*x_ref[2]**o + ((0.916210120514+0.637337537628j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.933184703742+0.357093023292j)*x[2]**o + ((-0.0634359801272-0.324004971757j))*x[2]
+            ref[(0, 2, 1)]+=(0.933184703742+0.357093023292j)*x_ref[2]**o + ((-0.0634359801272-0.324004971757j))*x_ref[2]
+            arg[(0, 2, 2)]+=(0.663599556688-0.123296979976j)*x[2]**o + ((-0.0494759261389-0.904535510861j))*x[2]
+            ref[(0, 2, 2)]+=(0.663599556688-0.123296979976j)*x_ref[2]**o + ((-0.0494759261389-0.904535510861j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.541098322401+0.185403033209j)*x[2]**o + ((-0.820934351005+0.759122143139j))*x[2]
+            ref[(1, 0, 0)]+=(-0.541098322401+0.185403033209j)*x_ref[2]**o + ((-0.820934351005+0.759122143139j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.518918558658+0.610772586567j)*x[2]**o + ((0.143066220457-0.880599797592j))*x[2]
+            ref[(1, 0, 1)]+=(0.518918558658+0.610772586567j)*x_ref[2]**o + ((0.143066220457-0.880599797592j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.946865483034-0.968620909761j)*x[2]**o + ((-0.778869806999-0.966418682383j))*x[2]
+            ref[(1, 0, 2)]+=(-0.946865483034-0.968620909761j)*x_ref[2]**o + ((-0.778869806999-0.966418682383j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.763517947589-0.589751585005j)*x[2]**o + ((0.951911131199+0.526402043895j))*x[2]
+            ref[(1, 1, 0)]+=(0.763517947589-0.589751585005j)*x_ref[2]**o + ((0.951911131199+0.526402043895j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.324205796689+0.492459368357j)*x[2]**o + ((-0.993839160794+0.798328943424j))*x[2]
+            ref[(1, 1, 1)]+=(0.324205796689+0.492459368357j)*x_ref[2]**o + ((-0.993839160794+0.798328943424j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.753419023182-0.472417891212j)*x[2]**o + ((0.85164506249-0.214091624329j))*x[2]
+            ref[(1, 1, 2)]+=(0.753419023182-0.472417891212j)*x_ref[2]**o + ((0.85164506249-0.214091624329j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.231056763442-0.969130121411j)*x[2]**o + ((-0.760221236868+0.283185949389j))*x[2]
+            ref[(1, 2, 0)]+=(-0.231056763442-0.969130121411j)*x_ref[2]**o + ((-0.760221236868+0.283185949389j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.933183771842-0.00413635358234j)*x[2]**o + ((-0.288313452453+0.820470458803j))*x[2]
+            ref[(1, 2, 1)]+=(0.933183771842-0.00413635358234j)*x_ref[2]**o + ((-0.288313452453+0.820470458803j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.812646606211+0.495334578337j)*x[2]**o + ((0.603232153191-0.0793631766778j))*x[2]
+            ref[(1, 2, 2)]+=(0.812646606211+0.495334578337j)*x_ref[2]**o + ((0.603232153191-0.0793631766778j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4, 4),w)
+        ref = Data(0,(2, 4, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(0.661805107743+0.483058911354j)*x[0]**o + ((0.499475377319-0.534026487844j))*x[0] + ((0.402895386465+0.957513476566j))*x[1]**o + ((0.812160458744-0.0261451875448j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.661805107743+0.483058911354j)*x_ref[0]**o + ((0.499475377319-0.534026487844j))*x_ref[0] + ((0.402895386465+0.957513476566j))*x_ref[1]**o + ((0.812160458744-0.0261451875448j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.298148767203-0.344276916557j)*x[0]**o + ((0.827157508283+0.744366323723j))*x[0] + ((-0.736688204117-0.850486562972j))*x[1]**o + ((-0.248643792687-0.751981044233j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.298148767203-0.344276916557j)*x_ref[0]**o + ((0.827157508283+0.744366323723j))*x_ref[0] + ((-0.736688204117-0.850486562972j))*x_ref[1]**o + ((-0.248643792687-0.751981044233j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.449485012543+0.622179848722j)*x[0]**o + ((-0.159251027367+0.977853721913j))*x[0] + ((-0.529443408894+0.732473225774j))*x[1]**o + ((-0.696396430396-0.747769130192j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.449485012543+0.622179848722j)*x_ref[0]**o + ((-0.159251027367+0.977853721913j))*x_ref[0] + ((-0.529443408894+0.732473225774j))*x_ref[1]**o + ((-0.696396430396-0.747769130192j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.0797897467221+0.914819602731j)*x[0]**o + ((0.803722643278-0.506072004959j))*x[0] + ((0.127501239334+0.804661891765j))*x[1]**o + ((0.73549957464-0.89127117941j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.0797897467221+0.914819602731j)*x_ref[0]**o + ((0.803722643278-0.506072004959j))*x_ref[0] + ((0.127501239334+0.804661891765j))*x_ref[1]**o + ((0.73549957464-0.89127117941j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.0570868198308-0.897206111543j)*x[0]**o + ((-0.807769240288-0.320597414512j))*x[0] + ((0.604404890488+0.583407146344j))*x[1]**o + ((0.677763849584-0.973612697611j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.0570868198308-0.897206111543j)*x_ref[0]**o + ((-0.807769240288-0.320597414512j))*x_ref[0] + ((0.604404890488+0.583407146344j))*x_ref[1]**o + ((0.677763849584-0.973612697611j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.535012007725-0.442023179301j)*x[0]**o + ((-0.546952332255+0.545893009898j))*x[0] + ((0.380577532249-0.212457652325j))*x[1]**o + ((-0.891143556995-0.664588356905j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.535012007725-0.442023179301j)*x_ref[0]**o + ((-0.546952332255+0.545893009898j))*x_ref[0] + ((0.380577532249-0.212457652325j))*x_ref[1]**o + ((-0.891143556995-0.664588356905j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.463239803931-0.1971598098j)*x[0]**o + ((-0.178436644995+0.980677695147j))*x[0] + ((-0.584549885316-0.190120880267j))*x[1]**o + ((-0.690937883673-0.0514371056061j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.463239803931-0.1971598098j)*x_ref[0]**o + ((-0.178436644995+0.980677695147j))*x_ref[0] + ((-0.584549885316-0.190120880267j))*x_ref[1]**o + ((-0.690937883673-0.0514371056061j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.590152470184+0.706537126318j)*x[0]**o + ((-0.791562389506-0.758662210971j))*x[0] + ((-0.403101199187-0.246019073353j))*x[1]**o + ((-0.807839369357-0.325536462643j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.590152470184+0.706537126318j)*x_ref[0]**o + ((-0.791562389506-0.758662210971j))*x_ref[0] + ((-0.403101199187-0.246019073353j))*x_ref[1]**o + ((-0.807839369357-0.325536462643j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.66861689917-0.304150930764j)*x[0]**o + ((-0.112659112854+0.0321171721372j))*x[0] + ((-0.0366783115538-0.377469364911j))*x[1]**o + ((-0.847679172188-0.159485795659j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.66861689917-0.304150930764j)*x_ref[0]**o + ((-0.112659112854+0.0321171721372j))*x_ref[0] + ((-0.0366783115538-0.377469364911j))*x_ref[1]**o + ((-0.847679172188-0.159485795659j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.582273304811-0.459342969229j)*x[0]**o + ((0.915963463741+0.838708396742j))*x[0] + ((-0.332981511258-0.345972607683j))*x[1]**o + ((-0.665278994022+0.525535784078j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.582273304811-0.459342969229j)*x_ref[0]**o + ((0.915963463741+0.838708396742j))*x_ref[0] + ((-0.332981511258-0.345972607683j))*x_ref[1]**o + ((-0.665278994022+0.525535784078j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.343619561173+0.51303476835j)*x[0]**o + ((-0.1986531746-0.45352804133j))*x[0] + ((-0.229516113053+0.221492512386j))*x[1]**o + ((0.526817515031+0.798444964142j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.343619561173+0.51303476835j)*x_ref[0]**o + ((-0.1986531746-0.45352804133j))*x_ref[0] + ((-0.229516113053+0.221492512386j))*x_ref[1]**o + ((0.526817515031+0.798444964142j))*x_ref[1]
+        arg[(0, 0, 2, 3)]=(0.358304353477-0.722821441992j)*x[0]**o + ((-0.293315841305+0.708394985389j))*x[0] + ((0.499993222836+0.434886664477j))*x[1]**o + ((-0.535809904821+0.0825800709239j))*x[1]
+        ref[(0, 0, 2, 3)]=(0.358304353477-0.722821441992j)*x_ref[0]**o + ((-0.293315841305+0.708394985389j))*x_ref[0] + ((0.499993222836+0.434886664477j))*x_ref[1]**o + ((-0.535809904821+0.0825800709239j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(0.526189452484+0.422412517009j)*x[0]**o + ((-0.646278794891+0.891166982316j))*x[0] + ((0.9324922214+0.0130844860679j))*x[1]**o + ((-0.684866051794-0.35530552505j))*x[1]
+        ref[(0, 0, 3, 0)]=(0.526189452484+0.422412517009j)*x_ref[0]**o + ((-0.646278794891+0.891166982316j))*x_ref[0] + ((0.9324922214+0.0130844860679j))*x_ref[1]**o + ((-0.684866051794-0.35530552505j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(0.071964236267+0.791606676092j)*x[0]**o + ((0.369121271902-0.219785478309j))*x[0] + ((0.761037698021-0.0713489730402j))*x[1]**o + ((-0.994145760805-0.687672081092j))*x[1]
+        ref[(0, 0, 3, 1)]=(0.071964236267+0.791606676092j)*x_ref[0]**o + ((0.369121271902-0.219785478309j))*x_ref[0] + ((0.761037698021-0.0713489730402j))*x_ref[1]**o + ((-0.994145760805-0.687672081092j))*x_ref[1]
+        arg[(0, 0, 3, 2)]=(0.536939416201+0.776905320257j)*x[0]**o + ((0.795232454976+0.844615000016j))*x[0] + ((-0.577222049984-0.441265087687j))*x[1]**o + ((0.848532767206-0.0473158025655j))*x[1]
+        ref[(0, 0, 3, 2)]=(0.536939416201+0.776905320257j)*x_ref[0]**o + ((0.795232454976+0.844615000016j))*x_ref[0] + ((-0.577222049984-0.441265087687j))*x_ref[1]**o + ((0.848532767206-0.0473158025655j))*x_ref[1]
+        arg[(0, 0, 3, 3)]=(0.551264856034+0.919372106045j)*x[0]**o + ((-0.647352574036-0.782834601187j))*x[0] + ((0.0445741064711-0.0464030102005j))*x[1]**o + ((-0.0184729812385+0.533043525131j))*x[1]
+        ref[(0, 0, 3, 3)]=(0.551264856034+0.919372106045j)*x_ref[0]**o + ((-0.647352574036-0.782834601187j))*x_ref[0] + ((0.0445741064711-0.0464030102005j))*x_ref[1]**o + ((-0.0184729812385+0.533043525131j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.820773871793+0.533245855364j)*x[0]**o + ((-0.247866438156-0.82024192817j))*x[0] + ((-0.909672866926+0.942940646655j))*x[1]**o + ((-0.514576738759-0.299754400255j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.820773871793+0.533245855364j)*x_ref[0]**o + ((-0.247866438156-0.82024192817j))*x_ref[0] + ((-0.909672866926+0.942940646655j))*x_ref[1]**o + ((-0.514576738759-0.299754400255j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.271311118209+0.910472101052j)*x[0]**o + ((-0.52652571699-0.903508433307j))*x[0] + ((0.906281726603+0.40295616463j))*x[1]**o + ((0.453103976891+0.114435189132j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.271311118209+0.910472101052j)*x_ref[0]**o + ((-0.52652571699-0.903508433307j))*x_ref[0] + ((0.906281726603+0.40295616463j))*x_ref[1]**o + ((0.453103976891+0.114435189132j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.450103322217+0.0600303533298j)*x[0]**o + ((0.62592737899-0.725904422047j))*x[0] + ((0.429357442502-0.203001914775j))*x[1]**o + ((-0.105196018296+0.431539145758j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.450103322217+0.0600303533298j)*x_ref[0]**o + ((0.62592737899-0.725904422047j))*x_ref[0] + ((0.429357442502-0.203001914775j))*x_ref[1]**o + ((-0.105196018296+0.431539145758j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.206482449941+0.17086357243j)*x[0]**o + ((0.981281226703+0.743290728248j))*x[0] + ((-0.115522630917+0.105601448212j))*x[1]**o + ((0.989139830054-0.772606880598j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.206482449941+0.17086357243j)*x_ref[0]**o + ((0.981281226703+0.743290728248j))*x_ref[0] + ((-0.115522630917+0.105601448212j))*x_ref[1]**o + ((0.989139830054-0.772606880598j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.0978398532847+0.525233026649j)*x[0]**o + ((0.220548535915-0.0100912525706j))*x[0] + ((0.00257059606198-0.271580431033j))*x[1]**o + ((-0.222117532342-0.138834500594j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.0978398532847+0.525233026649j)*x_ref[0]**o + ((0.220548535915-0.0100912525706j))*x_ref[0] + ((0.00257059606198-0.271580431033j))*x_ref[1]**o + ((-0.222117532342-0.138834500594j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.0816077582232-0.242032480897j)*x[0]**o + ((0.0244689193228-0.136281624659j))*x[0] + ((-0.0790863742819+0.00980791555826j))*x[1]**o + ((-0.380909861132+0.7061514441j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.0816077582232-0.242032480897j)*x_ref[0]**o + ((0.0244689193228-0.136281624659j))*x_ref[0] + ((-0.0790863742819+0.00980791555826j))*x_ref[1]**o + ((-0.380909861132+0.7061514441j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.176007611909+0.714437887558j)*x[0]**o + ((0.200989759103+0.868799263203j))*x[0] + ((0.712387528367+0.0447975438596j))*x[1]**o + ((-0.355048343323-0.710139714897j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.176007611909+0.714437887558j)*x_ref[0]**o + ((0.200989759103+0.868799263203j))*x_ref[0] + ((0.712387528367+0.0447975438596j))*x_ref[1]**o + ((-0.355048343323-0.710139714897j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.194619529352-0.511839644529j)*x[0]**o + ((-0.881721446066+0.142171071335j))*x[0] + ((-0.321962508747+0.630803302072j))*x[1]**o + ((-0.196735570318+0.577113742378j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.194619529352-0.511839644529j)*x_ref[0]**o + ((-0.881721446066+0.142171071335j))*x_ref[0] + ((-0.321962508747+0.630803302072j))*x_ref[1]**o + ((-0.196735570318+0.577113742378j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.14318196574-0.534523729755j)*x[0]**o + ((-0.685541926253-0.310861721161j))*x[0] + ((0.616978256249+0.262598383131j))*x[1]**o + ((-0.650971934619+0.0322186775773j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.14318196574-0.534523729755j)*x_ref[0]**o + ((-0.685541926253-0.310861721161j))*x_ref[0] + ((0.616978256249+0.262598383131j))*x_ref[1]**o + ((-0.650971934619+0.0322186775773j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.129705413334+0.810275463399j)*x[0]**o + ((-0.650199069437-0.382664660946j))*x[0] + ((-0.305254318195-0.516322344974j))*x[1]**o + ((0.540459999118+0.629176225548j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.129705413334+0.810275463399j)*x_ref[0]**o + ((-0.650199069437-0.382664660946j))*x_ref[0] + ((-0.305254318195-0.516322344974j))*x_ref[1]**o + ((0.540459999118+0.629176225548j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.936863365381+0.747131840377j)*x[0]**o + ((0.772738432291+0.520318032829j))*x[0] + ((0.137632158701-0.467781147231j))*x[1]**o + ((-0.238446384344+0.0355829703896j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.936863365381+0.747131840377j)*x_ref[0]**o + ((0.772738432291+0.520318032829j))*x_ref[0] + ((0.137632158701-0.467781147231j))*x_ref[1]**o + ((-0.238446384344+0.0355829703896j))*x_ref[1]
+        arg[(0, 1, 2, 3)]=(0.88056488908-0.557349700148j)*x[0]**o + ((-0.658145838165+0.0607719056728j))*x[0] + ((-0.684127206976+0.831826434919j))*x[1]**o + ((0.13160694437+0.97046517811j))*x[1]
+        ref[(0, 1, 2, 3)]=(0.88056488908-0.557349700148j)*x_ref[0]**o + ((-0.658145838165+0.0607719056728j))*x_ref[0] + ((-0.684127206976+0.831826434919j))*x_ref[1]**o + ((0.13160694437+0.97046517811j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(0.100380618256+0.86346822466j)*x[0]**o + ((-0.475216245711-0.330354669717j))*x[0] + ((-0.335896464544-0.0574160235671j))*x[1]**o + ((-0.698757141307+0.614264388875j))*x[1]
+        ref[(0, 1, 3, 0)]=(0.100380618256+0.86346822466j)*x_ref[0]**o + ((-0.475216245711-0.330354669717j))*x_ref[0] + ((-0.335896464544-0.0574160235671j))*x_ref[1]**o + ((-0.698757141307+0.614264388875j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(0.431640492516+0.81655058655j)*x[0]**o + ((0.0697706596274+0.285797719495j))*x[0] + ((-0.205108965441-0.455906151849j))*x[1]**o + ((0.757971806886-0.212276882651j))*x[1]
+        ref[(0, 1, 3, 1)]=(0.431640492516+0.81655058655j)*x_ref[0]**o + ((0.0697706596274+0.285797719495j))*x_ref[0] + ((-0.205108965441-0.455906151849j))*x_ref[1]**o + ((0.757971806886-0.212276882651j))*x_ref[1]
+        arg[(0, 1, 3, 2)]=(-0.154680687243+0.281938478728j)*x[0]**o + ((-0.186009949373-0.44067905561j))*x[0] + ((-0.61551301993+0.565853088828j))*x[1]**o + ((0.282720923058-0.254138467092j))*x[1]
+        ref[(0, 1, 3, 2)]=(-0.154680687243+0.281938478728j)*x_ref[0]**o + ((-0.186009949373-0.44067905561j))*x_ref[0] + ((-0.61551301993+0.565853088828j))*x_ref[1]**o + ((0.282720923058-0.254138467092j))*x_ref[1]
+        arg[(0, 1, 3, 3)]=(0.225653811647-0.552436473744j)*x[0]**o + ((-0.0793729255457-0.687816319801j))*x[0] + ((-0.742040559516-0.952585997635j))*x[1]**o + ((-0.803237372116+0.5303189932j))*x[1]
+        ref[(0, 1, 3, 3)]=(0.225653811647-0.552436473744j)*x_ref[0]**o + ((-0.0793729255457-0.687816319801j))*x_ref[0] + ((-0.742040559516-0.952585997635j))*x_ref[1]**o + ((-0.803237372116+0.5303189932j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.00148316005669+0.209834965604j)*x[0]**o + ((-0.411108996304-0.79681845611j))*x[0] + ((0.201210049715-0.681654209565j))*x[1]**o + ((0.975265577652+0.794529351902j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.00148316005669+0.209834965604j)*x_ref[0]**o + ((-0.411108996304-0.79681845611j))*x_ref[0] + ((0.201210049715-0.681654209565j))*x_ref[1]**o + ((0.975265577652+0.794529351902j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.898557318585+0.630378274794j)*x[0]**o + ((0.80965727419+0.759872156j))*x[0] + ((0.334341478239+0.595212905445j))*x[1]**o + ((0.764019569282+0.236714770521j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.898557318585+0.630378274794j)*x_ref[0]**o + ((0.80965727419+0.759872156j))*x_ref[0] + ((0.334341478239+0.595212905445j))*x_ref[1]**o + ((0.764019569282+0.236714770521j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.0562483163741-0.738098158188j)*x[0]**o + ((-0.338844985754+0.00880266579589j))*x[0] + ((-0.144101732043+0.352674665477j))*x[1]**o + ((-0.0168544815946+0.368366050083j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.0562483163741-0.738098158188j)*x_ref[0]**o + ((-0.338844985754+0.00880266579589j))*x_ref[0] + ((-0.144101732043+0.352674665477j))*x_ref[1]**o + ((-0.0168544815946+0.368366050083j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(0.390058202989+0.189592994854j)*x[0]**o + ((0.175517031749+0.452920026216j))*x[0] + ((0.508763455545+0.647473197277j))*x[1]**o + ((-0.0111760550349-0.128196781375j))*x[1]
+        ref[(0, 2, 0, 3)]=(0.390058202989+0.189592994854j)*x_ref[0]**o + ((0.175517031749+0.452920026216j))*x_ref[0] + ((0.508763455545+0.647473197277j))*x_ref[1]**o + ((-0.0111760550349-0.128196781375j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.426756832816+0.591382500229j)*x[0]**o + ((0.206381398274+0.0306472118502j))*x[0] + ((-0.179973507955+0.805317758175j))*x[1]**o + ((0.728577393255-0.253399663015j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.426756832816+0.591382500229j)*x_ref[0]**o + ((0.206381398274+0.0306472118502j))*x_ref[0] + ((-0.179973507955+0.805317758175j))*x_ref[1]**o + ((0.728577393255-0.253399663015j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.920252237096+0.966381931832j)*x[0]**o + ((0.254495551916+0.478209934531j))*x[0] + ((0.691225079548-0.768477760904j))*x[1]**o + ((-0.604718790274-0.160955446827j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.920252237096+0.966381931832j)*x_ref[0]**o + ((0.254495551916+0.478209934531j))*x_ref[0] + ((0.691225079548-0.768477760904j))*x_ref[1]**o + ((-0.604718790274-0.160955446827j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.0582587975786-0.84494069048j)*x[0]**o + ((0.255443715197-0.787385316297j))*x[0] + ((0.648038688942+0.533584813045j))*x[1]**o + ((0.673420935464+0.0365840403583j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.0582587975786-0.84494069048j)*x_ref[0]**o + ((0.255443715197-0.787385316297j))*x_ref[0] + ((0.648038688942+0.533584813045j))*x_ref[1]**o + ((0.673420935464+0.0365840403583j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(-0.561022061697+0.887484097427j)*x[0]**o + ((0.128186803111+0.0112334722483j))*x[0] + ((0.924468862205+0.590032314064j))*x[1]**o + ((0.82931840827-0.873101628857j))*x[1]
+        ref[(0, 2, 1, 3)]=(-0.561022061697+0.887484097427j)*x_ref[0]**o + ((0.128186803111+0.0112334722483j))*x_ref[0] + ((0.924468862205+0.590032314064j))*x_ref[1]**o + ((0.82931840827-0.873101628857j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.650695219675+0.445775553943j)*x[0]**o + ((0.637009610971-0.0368870256713j))*x[0] + ((0.769007996384-0.0270994369996j))*x[1]**o + ((0.232177290178+0.919947169965j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.650695219675+0.445775553943j)*x_ref[0]**o + ((0.637009610971-0.0368870256713j))*x_ref[0] + ((0.769007996384-0.0270994369996j))*x_ref[1]**o + ((0.232177290178+0.919947169965j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.41740141346+0.0526015028368j)*x[0]**o + ((-0.769352756219+0.129489578563j))*x[0] + ((0.651778799085-0.182301965766j))*x[1]**o + ((-0.996109058286+0.112108829382j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.41740141346+0.0526015028368j)*x_ref[0]**o + ((-0.769352756219+0.129489578563j))*x_ref[0] + ((0.651778799085-0.182301965766j))*x_ref[1]**o + ((-0.996109058286+0.112108829382j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(0.868222794032-0.889287761772j)*x[0]**o + ((0.453100926764-0.155654922709j))*x[0] + ((0.107274515436-0.316115656883j))*x[1]**o + ((0.395676937082-0.334174288579j))*x[1]
+        ref[(0, 2, 2, 2)]=(0.868222794032-0.889287761772j)*x_ref[0]**o + ((0.453100926764-0.155654922709j))*x_ref[0] + ((0.107274515436-0.316115656883j))*x_ref[1]**o + ((0.395676937082-0.334174288579j))*x_ref[1]
+        arg[(0, 2, 2, 3)]=(0.280998926979+0.718923260078j)*x[0]**o + ((-0.477216889406-0.336862178811j))*x[0] + ((0.272387853332-0.330899921298j))*x[1]**o + ((0.718702028432+0.383284727676j))*x[1]
+        ref[(0, 2, 2, 3)]=(0.280998926979+0.718923260078j)*x_ref[0]**o + ((-0.477216889406-0.336862178811j))*x_ref[0] + ((0.272387853332-0.330899921298j))*x_ref[1]**o + ((0.718702028432+0.383284727676j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(-0.995871739252-0.773435393706j)*x[0]**o + ((0.423215179533-0.230713268674j))*x[0] + ((-0.623833294303-0.838826370317j))*x[1]**o + ((-0.52366618932-0.181322247044j))*x[1]
+        ref[(0, 2, 3, 0)]=(-0.995871739252-0.773435393706j)*x_ref[0]**o + ((0.423215179533-0.230713268674j))*x_ref[0] + ((-0.623833294303-0.838826370317j))*x_ref[1]**o + ((-0.52366618932-0.181322247044j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(-0.559070634072-0.731501916445j)*x[0]**o + ((-0.675350842337-0.266319798417j))*x[0] + ((-0.855104336614+0.796151794848j))*x[1]**o + ((-0.801485842994-0.0367219987841j))*x[1]
+        ref[(0, 2, 3, 1)]=(-0.559070634072-0.731501916445j)*x_ref[0]**o + ((-0.675350842337-0.266319798417j))*x_ref[0] + ((-0.855104336614+0.796151794848j))*x_ref[1]**o + ((-0.801485842994-0.0367219987841j))*x_ref[1]
+        arg[(0, 2, 3, 2)]=(-0.636853988071-0.174386563883j)*x[0]**o + ((0.657794747139+0.616170642408j))*x[0] + ((0.135539230148+0.250986939163j))*x[1]**o + ((-0.395550522118+0.736048491868j))*x[1]
+        ref[(0, 2, 3, 2)]=(-0.636853988071-0.174386563883j)*x_ref[0]**o + ((0.657794747139+0.616170642408j))*x_ref[0] + ((0.135539230148+0.250986939163j))*x_ref[1]**o + ((-0.395550522118+0.736048491868j))*x_ref[1]
+        arg[(0, 2, 3, 3)]=(0.258582958651+0.581273823937j)*x[0]**o + ((0.00539155435301-0.368984299075j))*x[0] + ((0.977238034028-0.608834104003j))*x[1]**o + ((-0.487934768014-0.0970892707847j))*x[1]
+        ref[(0, 2, 3, 3)]=(0.258582958651+0.581273823937j)*x_ref[0]**o + ((0.00539155435301-0.368984299075j))*x_ref[0] + ((0.977238034028-0.608834104003j))*x_ref[1]**o + ((-0.487934768014-0.0970892707847j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.965758019718-0.448272109455j)*x[0]**o + ((-0.148446913894+0.274785865333j))*x[0] + ((0.477229443788-0.575346255383j))*x[1]**o + ((0.851053019236-0.524240532957j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.965758019718-0.448272109455j)*x_ref[0]**o + ((-0.148446913894+0.274785865333j))*x_ref[0] + ((0.477229443788-0.575346255383j))*x_ref[1]**o + ((0.851053019236-0.524240532957j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.786737050457-0.619433671563j)*x[0]**o + ((-0.635612451221-0.166651691045j))*x[0] + ((-0.586616041299-0.389624644201j))*x[1]**o + ((0.908532988613+0.651883939193j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.786737050457-0.619433671563j)*x_ref[0]**o + ((-0.635612451221-0.166651691045j))*x_ref[0] + ((-0.586616041299-0.389624644201j))*x_ref[1]**o + ((0.908532988613+0.651883939193j))*x_ref[1]
+        arg[(0, 3, 0, 2)]=(0.825153577775+0.0330071501541j)*x[0]**o + ((-0.908590071713-0.700760907435j))*x[0] + ((0.959874905743+0.279250894799j))*x[1]**o + ((0.347659228602-0.0549248075103j))*x[1]
+        ref[(0, 3, 0, 2)]=(0.825153577775+0.0330071501541j)*x_ref[0]**o + ((-0.908590071713-0.700760907435j))*x_ref[0] + ((0.959874905743+0.279250894799j))*x_ref[1]**o + ((0.347659228602-0.0549248075103j))*x_ref[1]
+        arg[(0, 3, 0, 3)]=(0.69300491548-0.35561291492j)*x[0]**o + ((0.810941535541-0.663681375691j))*x[0] + ((-0.0181435120627+0.852996534366j))*x[1]**o + ((0.1087535109-0.727845844451j))*x[1]
+        ref[(0, 3, 0, 3)]=(0.69300491548-0.35561291492j)*x_ref[0]**o + ((0.810941535541-0.663681375691j))*x_ref[0] + ((-0.0181435120627+0.852996534366j))*x_ref[1]**o + ((0.1087535109-0.727845844451j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.531379737296-0.858564641751j)*x[0]**o + ((-0.37157346061-0.85320191696j))*x[0] + ((0.201779974068-0.69759297889j))*x[1]**o + ((0.376026959893-0.4911240259j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.531379737296-0.858564641751j)*x_ref[0]**o + ((-0.37157346061-0.85320191696j))*x_ref[0] + ((0.201779974068-0.69759297889j))*x_ref[1]**o + ((0.376026959893-0.4911240259j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(-0.45239409088+0.403893684737j)*x[0]**o + ((0.190967209652+0.520455301665j))*x[0] + ((0.145806719606-0.00347247698728j))*x[1]**o + ((0.118149777994+0.10884213461j))*x[1]
+        ref[(0, 3, 1, 1)]=(-0.45239409088+0.403893684737j)*x_ref[0]**o + ((0.190967209652+0.520455301665j))*x_ref[0] + ((0.145806719606-0.00347247698728j))*x_ref[1]**o + ((0.118149777994+0.10884213461j))*x_ref[1]
+        arg[(0, 3, 1, 2)]=(-0.861998761563-0.604983326539j)*x[0]**o + ((-0.313354240244-0.272561649062j))*x[0] + ((-0.59688190901-0.170513199144j))*x[1]**o + ((-0.756976969457+0.308217125314j))*x[1]
+        ref[(0, 3, 1, 2)]=(-0.861998761563-0.604983326539j)*x_ref[0]**o + ((-0.313354240244-0.272561649062j))*x_ref[0] + ((-0.59688190901-0.170513199144j))*x_ref[1]**o + ((-0.756976969457+0.308217125314j))*x_ref[1]
+        arg[(0, 3, 1, 3)]=(0.960668277006-0.0566412511944j)*x[0]**o + ((0.871057675802+0.606654517873j))*x[0] + ((0.80180986054-0.725204915199j))*x[1]**o + ((-0.865010883761-0.195446644841j))*x[1]
+        ref[(0, 3, 1, 3)]=(0.960668277006-0.0566412511944j)*x_ref[0]**o + ((0.871057675802+0.606654517873j))*x_ref[0] + ((0.80180986054-0.725204915199j))*x_ref[1]**o + ((-0.865010883761-0.195446644841j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.535895243413+0.0574608740924j)*x[0]**o + ((-0.628094622121-0.225099624209j))*x[0] + ((0.146754550889-0.39953169012j))*x[1]**o + ((0.487402137034+0.228546302552j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.535895243413+0.0574608740924j)*x_ref[0]**o + ((-0.628094622121-0.225099624209j))*x_ref[0] + ((0.146754550889-0.39953169012j))*x_ref[1]**o + ((0.487402137034+0.228546302552j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(-0.352668241042-0.757400449864j)*x[0]**o + ((-0.776765233207+0.199181334574j))*x[0] + ((0.375648320108-0.0133754227194j))*x[1]**o + ((-0.678108187575-0.0397632410476j))*x[1]
+        ref[(0, 3, 2, 1)]=(-0.352668241042-0.757400449864j)*x_ref[0]**o + ((-0.776765233207+0.199181334574j))*x_ref[0] + ((0.375648320108-0.0133754227194j))*x_ref[1]**o + ((-0.678108187575-0.0397632410476j))*x_ref[1]
+        arg[(0, 3, 2, 2)]=(-0.505116449134+0.316370009198j)*x[0]**o + ((-0.109395255971-0.538950831137j))*x[0] + ((-0.728146438256+0.717677139494j))*x[1]**o + ((0.948493451493+0.454544524262j))*x[1]
+        ref[(0, 3, 2, 2)]=(-0.505116449134+0.316370009198j)*x_ref[0]**o + ((-0.109395255971-0.538950831137j))*x_ref[0] + ((-0.728146438256+0.717677139494j))*x_ref[1]**o + ((0.948493451493+0.454544524262j))*x_ref[1]
+        arg[(0, 3, 2, 3)]=(0.0454575449626+0.791818672751j)*x[0]**o + ((-0.312226540473-0.247181239552j))*x[0] + ((-0.754543986762-0.86838325018j))*x[1]**o + ((0.235646662554+0.496544759864j))*x[1]
+        ref[(0, 3, 2, 3)]=(0.0454575449626+0.791818672751j)*x_ref[0]**o + ((-0.312226540473-0.247181239552j))*x_ref[0] + ((-0.754543986762-0.86838325018j))*x_ref[1]**o + ((0.235646662554+0.496544759864j))*x_ref[1]
+        arg[(0, 3, 3, 0)]=(0.456419914326-0.391511099928j)*x[0]**o + ((0.012792782853-0.244983123277j))*x[0] + ((-0.169542068652-0.0788649817298j))*x[1]**o + ((-0.124081030178+0.00756068886184j))*x[1]
+        ref[(0, 3, 3, 0)]=(0.456419914326-0.391511099928j)*x_ref[0]**o + ((0.012792782853-0.244983123277j))*x_ref[0] + ((-0.169542068652-0.0788649817298j))*x_ref[1]**o + ((-0.124081030178+0.00756068886184j))*x_ref[1]
+        arg[(0, 3, 3, 1)]=(0.304474661873-0.405802378424j)*x[0]**o + ((0.927954533603+0.0150642536475j))*x[0] + ((-0.292018424039+0.00104763371515j))*x[1]**o + ((-0.330498214096+0.506895778474j))*x[1]
+        ref[(0, 3, 3, 1)]=(0.304474661873-0.405802378424j)*x_ref[0]**o + ((0.927954533603+0.0150642536475j))*x_ref[0] + ((-0.292018424039+0.00104763371515j))*x_ref[1]**o + ((-0.330498214096+0.506895778474j))*x_ref[1]
+        arg[(0, 3, 3, 2)]=(0.0957341745938-0.00895546910152j)*x[0]**o + ((0.667397499817+0.43274701996j))*x[0] + ((0.796052288456-0.671939200863j))*x[1]**o + ((-0.67280529386+0.652183948973j))*x[1]
+        ref[(0, 3, 3, 2)]=(0.0957341745938-0.00895546910152j)*x_ref[0]**o + ((0.667397499817+0.43274701996j))*x_ref[0] + ((0.796052288456-0.671939200863j))*x_ref[1]**o + ((-0.67280529386+0.652183948973j))*x_ref[1]
+        arg[(0, 3, 3, 3)]=(-0.0961925006526+0.64760509667j)*x[0]**o + ((-0.46356921924-0.20798164277j))*x[0] + ((-0.950515209891+0.542721712451j))*x[1]**o + ((0.0473246774475+0.487521462592j))*x[1]
+        ref[(0, 3, 3, 3)]=(-0.0961925006526+0.64760509667j)*x_ref[0]**o + ((-0.46356921924-0.20798164277j))*x_ref[0] + ((-0.950515209891+0.542721712451j))*x_ref[1]**o + ((0.0473246774475+0.487521462592j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.804964822631-0.491117075289j)*x[0]**o + ((0.222662710349-0.577031899994j))*x[0] + ((-0.959497985242+0.715375128373j))*x[1]**o + ((0.294375446027-0.281602091422j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.804964822631-0.491117075289j)*x_ref[0]**o + ((0.222662710349-0.577031899994j))*x_ref[0] + ((-0.959497985242+0.715375128373j))*x_ref[1]**o + ((0.294375446027-0.281602091422j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.132140846702+0.147792717748j)*x[0]**o + ((-0.195250794557+0.260541391555j))*x[0] + ((0.13243491626+0.44754280229j))*x[1]**o + ((0.613960378898+0.67109289201j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.132140846702+0.147792717748j)*x_ref[0]**o + ((-0.195250794557+0.260541391555j))*x_ref[0] + ((0.13243491626+0.44754280229j))*x_ref[1]**o + ((0.613960378898+0.67109289201j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.272775760633-0.287057491903j)*x[0]**o + ((-0.228755684006+0.0459598891713j))*x[0] + ((-0.771102845336+0.698467149451j))*x[1]**o + ((-0.401509974322+0.679203630536j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.272775760633-0.287057491903j)*x_ref[0]**o + ((-0.228755684006+0.0459598891713j))*x_ref[0] + ((-0.771102845336+0.698467149451j))*x_ref[1]**o + ((-0.401509974322+0.679203630536j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.911917973885-0.200418984591j)*x[0]**o + ((-0.378045211177+0.0343847838654j))*x[0] + ((-0.847405529497-0.0426727526456j))*x[1]**o + ((-0.891307733025-0.640097862039j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.911917973885-0.200418984591j)*x_ref[0]**o + ((-0.378045211177+0.0343847838654j))*x_ref[0] + ((-0.847405529497-0.0426727526456j))*x_ref[1]**o + ((-0.891307733025-0.640097862039j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.0876379742205+0.00472199663596j)*x[0]**o + ((-0.455405856173+0.5735584385j))*x[0] + ((-0.339031129906+0.485412802728j))*x[1]**o + ((0.328323425745+0.619803285201j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.0876379742205+0.00472199663596j)*x_ref[0]**o + ((-0.455405856173+0.5735584385j))*x_ref[0] + ((-0.339031129906+0.485412802728j))*x_ref[1]**o + ((0.328323425745+0.619803285201j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.939737231359+0.11073330464j)*x[0]**o + ((-0.371017358722-0.106051858064j))*x[0] + ((0.990670104673+0.780293256556j))*x[1]**o + ((0.391504563391+0.335678652394j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.939737231359+0.11073330464j)*x_ref[0]**o + ((-0.371017358722-0.106051858064j))*x_ref[0] + ((0.990670104673+0.780293256556j))*x_ref[1]**o + ((0.391504563391+0.335678652394j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.943344823053-0.15720356311j)*x[0]**o + ((0.233413828365-0.411011676429j))*x[0] + ((-0.530541441537+0.638724200885j))*x[1]**o + ((0.599849882949+0.78909303601j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.943344823053-0.15720356311j)*x_ref[0]**o + ((0.233413828365-0.411011676429j))*x_ref[0] + ((-0.530541441537+0.638724200885j))*x_ref[1]**o + ((0.599849882949+0.78909303601j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.29960374326+0.878003896625j)*x[0]**o + ((0.724947346712+0.211279188542j))*x[0] + ((-0.803876933408+0.206310631413j))*x[1]**o + ((0.207911987749-0.0884774889575j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.29960374326+0.878003896625j)*x_ref[0]**o + ((0.724947346712+0.211279188542j))*x_ref[0] + ((-0.803876933408+0.206310631413j))*x_ref[1]**o + ((0.207911987749-0.0884774889575j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.903272728038-0.949598144503j)*x[0]**o + ((-0.530292736047+0.0567816223307j))*x[0] + ((0.867709337039+0.372247450671j))*x[1]**o + ((-0.312511192506-0.0135434813784j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.903272728038-0.949598144503j)*x_ref[0]**o + ((-0.530292736047+0.0567816223307j))*x_ref[0] + ((0.867709337039+0.372247450671j))*x_ref[1]**o + ((-0.312511192506-0.0135434813784j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.6197105537-0.889903526477j)*x[0]**o + ((0.234915122074-0.547991397057j))*x[0] + ((0.984836884158-0.483490770571j))*x[1]**o + ((0.859777215563-0.99214949269j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.6197105537-0.889903526477j)*x_ref[0]**o + ((0.234915122074-0.547991397057j))*x_ref[0] + ((0.984836884158-0.483490770571j))*x_ref[1]**o + ((0.859777215563-0.99214949269j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.974139705699+0.256445631028j)*x[0]**o + ((0.378701981171-0.944511569178j))*x[0] + ((-0.365016266321+0.0345091408419j))*x[1]**o + ((-0.213467707841+0.388938677417j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.974139705699+0.256445631028j)*x_ref[0]**o + ((0.378701981171-0.944511569178j))*x_ref[0] + ((-0.365016266321+0.0345091408419j))*x_ref[1]**o + ((-0.213467707841+0.388938677417j))*x_ref[1]
+        arg[(1, 0, 2, 3)]=(0.1708068784-0.349481306681j)*x[0]**o + ((0.701560652558+0.512715283722j))*x[0] + ((0.725801696075-0.42382913066j))*x[1]**o + ((-0.383782637971-0.783165210481j))*x[1]
+        ref[(1, 0, 2, 3)]=(0.1708068784-0.349481306681j)*x_ref[0]**o + ((0.701560652558+0.512715283722j))*x_ref[0] + ((0.725801696075-0.42382913066j))*x_ref[1]**o + ((-0.383782637971-0.783165210481j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(0.991462347262-0.892071948572j)*x[0]**o + ((0.0816934826331+0.349909203085j))*x[0] + ((-0.100195549585-0.119818492796j))*x[1]**o + ((-0.183211908012-0.386421044189j))*x[1]
+        ref[(1, 0, 3, 0)]=(0.991462347262-0.892071948572j)*x_ref[0]**o + ((0.0816934826331+0.349909203085j))*x_ref[0] + ((-0.100195549585-0.119818492796j))*x_ref[1]**o + ((-0.183211908012-0.386421044189j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(0.342358957097-0.230735496737j)*x[0]**o + ((0.468698773788+0.0419529813315j))*x[0] + ((0.976957258252-0.195055226178j))*x[1]**o + ((-0.857685247361-0.235158010973j))*x[1]
+        ref[(1, 0, 3, 1)]=(0.342358957097-0.230735496737j)*x_ref[0]**o + ((0.468698773788+0.0419529813315j))*x_ref[0] + ((0.976957258252-0.195055226178j))*x_ref[1]**o + ((-0.857685247361-0.235158010973j))*x_ref[1]
+        arg[(1, 0, 3, 2)]=(0.810571760039-0.0319417871499j)*x[0]**o + ((0.878036279819-0.0850947581337j))*x[0] + ((0.0265946133698+0.531115434212j))*x[1]**o + ((0.443545874916-0.282629857944j))*x[1]
+        ref[(1, 0, 3, 2)]=(0.810571760039-0.0319417871499j)*x_ref[0]**o + ((0.878036279819-0.0850947581337j))*x_ref[0] + ((0.0265946133698+0.531115434212j))*x_ref[1]**o + ((0.443545874916-0.282629857944j))*x_ref[1]
+        arg[(1, 0, 3, 3)]=(0.666710574586+0.636843394187j)*x[0]**o + ((0.657342116141+0.679510107327j))*x[0] + ((-0.775114794638-0.422536543381j))*x[1]**o + ((-0.54545151273+0.514321962721j))*x[1]
+        ref[(1, 0, 3, 3)]=(0.666710574586+0.636843394187j)*x_ref[0]**o + ((0.657342116141+0.679510107327j))*x_ref[0] + ((-0.775114794638-0.422536543381j))*x_ref[1]**o + ((-0.54545151273+0.514321962721j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.116595026773+0.00130735715912j)*x[0]**o + ((-0.11485344497-0.616532988143j))*x[0] + ((-0.578280990233-0.117186749586j))*x[1]**o + ((-0.871351269376-0.558506160669j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.116595026773+0.00130735715912j)*x_ref[0]**o + ((-0.11485344497-0.616532988143j))*x_ref[0] + ((-0.578280990233-0.117186749586j))*x_ref[1]**o + ((-0.871351269376-0.558506160669j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.686565387815-0.645291532611j)*x[0]**o + ((0.367360809214-0.263623541223j))*x[0] + ((0.805155666577-0.458668056775j))*x[1]**o + ((0.602040358441+0.287177859975j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.686565387815-0.645291532611j)*x_ref[0]**o + ((0.367360809214-0.263623541223j))*x_ref[0] + ((0.805155666577-0.458668056775j))*x_ref[1]**o + ((0.602040358441+0.287177859975j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.134286831472+0.718636195752j)*x[0]**o + ((0.187125369432-0.254123769749j))*x[0] + ((-0.453941449686-0.725556806749j))*x[1]**o + ((0.296386579968+0.451534599771j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.134286831472+0.718636195752j)*x_ref[0]**o + ((0.187125369432-0.254123769749j))*x_ref[0] + ((-0.453941449686-0.725556806749j))*x_ref[1]**o + ((0.296386579968+0.451534599771j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.358621174452+0.710267637144j)*x[0]**o + ((0.395477350743-0.43129310957j))*x[0] + ((-0.400947578504+0.540206948455j))*x[1]**o + ((0.083668052547-0.778853865061j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.358621174452+0.710267637144j)*x_ref[0]**o + ((0.395477350743-0.43129310957j))*x_ref[0] + ((-0.400947578504+0.540206948455j))*x_ref[1]**o + ((0.083668052547-0.778853865061j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.561386748042+0.348832451645j)*x[0]**o + ((-0.496966142267-0.274740412653j))*x[0] + ((-0.107985862483+0.523154078303j))*x[1]**o + ((-0.466282555395-0.241036570786j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.561386748042+0.348832451645j)*x_ref[0]**o + ((-0.496966142267-0.274740412653j))*x_ref[0] + ((-0.107985862483+0.523154078303j))*x_ref[1]**o + ((-0.466282555395-0.241036570786j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.724354334486+0.109663625438j)*x[0]**o + ((-0.785105568157-0.442562677287j))*x[0] + ((0.654699536976+0.220298110534j))*x[1]**o + ((0.337467384562+0.731216630102j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.724354334486+0.109663625438j)*x_ref[0]**o + ((-0.785105568157-0.442562677287j))*x_ref[0] + ((0.654699536976+0.220298110534j))*x_ref[1]**o + ((0.337467384562+0.731216630102j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.638311790884-0.665996975754j)*x[0]**o + ((0.927588420548+0.293836736113j))*x[0] + ((-0.054758540324-0.138320330778j))*x[1]**o + ((-0.840482056697+0.290600628372j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.638311790884-0.665996975754j)*x_ref[0]**o + ((0.927588420548+0.293836736113j))*x_ref[0] + ((-0.054758540324-0.138320330778j))*x_ref[1]**o + ((-0.840482056697+0.290600628372j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.0395214250739+0.405294234339j)*x[0]**o + ((0.12536245068-0.87318090141j))*x[0] + ((-0.256677624002-0.88306717764j))*x[1]**o + ((-0.273126059564-0.865038823886j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.0395214250739+0.405294234339j)*x_ref[0]**o + ((0.12536245068-0.87318090141j))*x_ref[0] + ((-0.256677624002-0.88306717764j))*x_ref[1]**o + ((-0.273126059564-0.865038823886j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.854565483311+0.444977350317j)*x[0]**o + ((0.790653757674-0.316175288544j))*x[0] + ((0.202565028477+0.982415451058j))*x[1]**o + ((0.464167778403-0.403522768656j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.854565483311+0.444977350317j)*x_ref[0]**o + ((0.790653757674-0.316175288544j))*x_ref[0] + ((0.202565028477+0.982415451058j))*x_ref[1]**o + ((0.464167778403-0.403522768656j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.62255199067+0.833308505156j)*x[0]**o + ((-0.470002679716+0.663397704258j))*x[0] + ((-0.634858125221+0.538742542575j))*x[1]**o + ((0.587479740662-0.231422568203j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.62255199067+0.833308505156j)*x_ref[0]**o + ((-0.470002679716+0.663397704258j))*x_ref[0] + ((-0.634858125221+0.538742542575j))*x_ref[1]**o + ((0.587479740662-0.231422568203j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.0695489690866+0.793989470472j)*x[0]**o + ((0.275094199963+0.889907093455j))*x[0] + ((-0.109285364652-0.735621778075j))*x[1]**o + ((0.875399225537+0.554169017828j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.0695489690866+0.793989470472j)*x_ref[0]**o + ((0.275094199963+0.889907093455j))*x_ref[0] + ((-0.109285364652-0.735621778075j))*x_ref[1]**o + ((0.875399225537+0.554169017828j))*x_ref[1]
+        arg[(1, 1, 2, 3)]=(-0.890230448133+0.542372860378j)*x[0]**o + ((-0.532563387846-0.00756629722783j))*x[0] + ((-0.947371487418+0.365854956531j))*x[1]**o + ((0.123357717352-0.874379526159j))*x[1]
+        ref[(1, 1, 2, 3)]=(-0.890230448133+0.542372860378j)*x_ref[0]**o + ((-0.532563387846-0.00756629722783j))*x_ref[0] + ((-0.947371487418+0.365854956531j))*x_ref[1]**o + ((0.123357717352-0.874379526159j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(-0.921205296905+0.274908105455j)*x[0]**o + ((-0.0708872845451+0.493489289435j))*x[0] + ((-0.152673085845-0.558749548162j))*x[1]**o + ((0.52131003838-0.986899004268j))*x[1]
+        ref[(1, 1, 3, 0)]=(-0.921205296905+0.274908105455j)*x_ref[0]**o + ((-0.0708872845451+0.493489289435j))*x_ref[0] + ((-0.152673085845-0.558749548162j))*x_ref[1]**o + ((0.52131003838-0.986899004268j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.0736038916095+0.203482552203j)*x[0]**o + ((0.977203775295-0.384913419097j))*x[0] + ((-0.88537703872-0.973854119535j))*x[1]**o + ((0.22100229402+0.505455403867j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.0736038916095+0.203482552203j)*x_ref[0]**o + ((0.977203775295-0.384913419097j))*x_ref[0] + ((-0.88537703872-0.973854119535j))*x_ref[1]**o + ((0.22100229402+0.505455403867j))*x_ref[1]
+        arg[(1, 1, 3, 2)]=(0.122444626793-0.437170924851j)*x[0]**o + ((-0.36223035997-0.757162628278j))*x[0] + ((-0.515702196979-0.252938694248j))*x[1]**o + ((-0.124640758379+0.553038001581j))*x[1]
+        ref[(1, 1, 3, 2)]=(0.122444626793-0.437170924851j)*x_ref[0]**o + ((-0.36223035997-0.757162628278j))*x_ref[0] + ((-0.515702196979-0.252938694248j))*x_ref[1]**o + ((-0.124640758379+0.553038001581j))*x_ref[1]
+        arg[(1, 1, 3, 3)]=(-0.473154181029-0.119156989655j)*x[0]**o + ((-0.232493481838-0.698745473407j))*x[0] + ((-0.537193654703-0.478700655957j))*x[1]**o + ((0.941973204518-0.953565303153j))*x[1]
+        ref[(1, 1, 3, 3)]=(-0.473154181029-0.119156989655j)*x_ref[0]**o + ((-0.232493481838-0.698745473407j))*x_ref[0] + ((-0.537193654703-0.478700655957j))*x_ref[1]**o + ((0.941973204518-0.953565303153j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.198251124888-0.618456359975j)*x[0]**o + ((0.969813152067-0.383709305833j))*x[0] + ((0.897604634359-0.899758517243j))*x[1]**o + ((0.0286013796901+0.926285028104j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.198251124888-0.618456359975j)*x_ref[0]**o + ((0.969813152067-0.383709305833j))*x_ref[0] + ((0.897604634359-0.899758517243j))*x_ref[1]**o + ((0.0286013796901+0.926285028104j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.554416658578+0.716406574898j)*x[0]**o + ((-0.573974430618+0.34165155497j))*x[0] + ((-0.944552067028-0.281988864261j))*x[1]**o + ((-0.764985848158-0.176922652168j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.554416658578+0.716406574898j)*x_ref[0]**o + ((-0.573974430618+0.34165155497j))*x_ref[0] + ((-0.944552067028-0.281988864261j))*x_ref[1]**o + ((-0.764985848158-0.176922652168j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.375085108416+0.281135183398j)*x[0]**o + ((0.706232276705+0.90731073424j))*x[0] + ((-0.484597377678+0.705672869758j))*x[1]**o + ((-0.521892673293-0.891939263787j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.375085108416+0.281135183398j)*x_ref[0]**o + ((0.706232276705+0.90731073424j))*x_ref[0] + ((-0.484597377678+0.705672869758j))*x_ref[1]**o + ((-0.521892673293-0.891939263787j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(0.90324221146+0.341851940289j)*x[0]**o + ((0.241388973603+0.0609794662372j))*x[0] + ((-0.619032017945-0.110391333182j))*x[1]**o + ((-0.661092098395+0.0519466250867j))*x[1]
+        ref[(1, 2, 0, 3)]=(0.90324221146+0.341851940289j)*x_ref[0]**o + ((0.241388973603+0.0609794662372j))*x_ref[0] + ((-0.619032017945-0.110391333182j))*x_ref[1]**o + ((-0.661092098395+0.0519466250867j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.416551642728-0.340631314797j)*x[0]**o + ((0.539987984522+0.761261091043j))*x[0] + ((0.0114216286938+0.435985352012j))*x[1]**o + ((-0.0478466642537+0.154209492662j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.416551642728-0.340631314797j)*x_ref[0]**o + ((0.539987984522+0.761261091043j))*x_ref[0] + ((0.0114216286938+0.435985352012j))*x_ref[1]**o + ((-0.0478466642537+0.154209492662j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.413379646811+0.701489877879j)*x[0]**o + ((0.584044307522-0.198923226284j))*x[0] + ((-0.117724872049-0.245246013133j))*x[1]**o + ((-0.0632526110968-0.393592346113j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.413379646811+0.701489877879j)*x_ref[0]**o + ((0.584044307522-0.198923226284j))*x_ref[0] + ((-0.117724872049-0.245246013133j))*x_ref[1]**o + ((-0.0632526110968-0.393592346113j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.792136846853+0.0895206860374j)*x[0]**o + ((-0.681813054921+0.0118874991391j))*x[0] + ((0.304689449329-0.857978456976j))*x[1]**o + ((-0.191830661206+0.00609641966407j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.792136846853+0.0895206860374j)*x_ref[0]**o + ((-0.681813054921+0.0118874991391j))*x_ref[0] + ((0.304689449329-0.857978456976j))*x_ref[1]**o + ((-0.191830661206+0.00609641966407j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(0.303499263304-0.634405480296j)*x[0]**o + ((0.63988538669-0.612593925515j))*x[0] + ((-0.640322346216-0.521266931236j))*x[1]**o + ((0.197823952311-0.89435459676j))*x[1]
+        ref[(1, 2, 1, 3)]=(0.303499263304-0.634405480296j)*x_ref[0]**o + ((0.63988538669-0.612593925515j))*x_ref[0] + ((-0.640322346216-0.521266931236j))*x_ref[1]**o + ((0.197823952311-0.89435459676j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.348388674565-0.263988043587j)*x[0]**o + ((-0.962363607356+0.309527350011j))*x[0] + ((-0.660584559329+0.0463883860986j))*x[1]**o + ((-0.750815778159-0.742484519229j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.348388674565-0.263988043587j)*x_ref[0]**o + ((-0.962363607356+0.309527350011j))*x_ref[0] + ((-0.660584559329+0.0463883860986j))*x_ref[1]**o + ((-0.750815778159-0.742484519229j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.728609281935+0.836467200957j)*x[0]**o + ((-0.322753654529-0.145340861365j))*x[0] + ((0.302175465283+0.58193393559j))*x[1]**o + ((0.66342074774+0.563923159522j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.728609281935+0.836467200957j)*x_ref[0]**o + ((-0.322753654529-0.145340861365j))*x_ref[0] + ((0.302175465283+0.58193393559j))*x_ref[1]**o + ((0.66342074774+0.563923159522j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(0.341150812473-0.765422836158j)*x[0]**o + ((-0.768684575747+0.194260616324j))*x[0] + ((-0.0906307323187-0.340331122377j))*x[1]**o + ((0.51524818409+0.683136620143j))*x[1]
+        ref[(1, 2, 2, 2)]=(0.341150812473-0.765422836158j)*x_ref[0]**o + ((-0.768684575747+0.194260616324j))*x_ref[0] + ((-0.0906307323187-0.340331122377j))*x_ref[1]**o + ((0.51524818409+0.683136620143j))*x_ref[1]
+        arg[(1, 2, 2, 3)]=(0.412312621366+0.862527827792j)*x[0]**o + ((-0.0379098192326-0.860272077386j))*x[0] + ((-0.909476438642+0.0977590594313j))*x[1]**o + ((-0.959507526306-0.363051492973j))*x[1]
+        ref[(1, 2, 2, 3)]=(0.412312621366+0.862527827792j)*x_ref[0]**o + ((-0.0379098192326-0.860272077386j))*x_ref[0] + ((-0.909476438642+0.0977590594313j))*x_ref[1]**o + ((-0.959507526306-0.363051492973j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(0.319208002701+0.0500833657534j)*x[0]**o + ((-0.657963231482-0.943273835394j))*x[0] + ((-0.178153789304-0.447358918974j))*x[1]**o + ((0.840852553754-0.890314694226j))*x[1]
+        ref[(1, 2, 3, 0)]=(0.319208002701+0.0500833657534j)*x_ref[0]**o + ((-0.657963231482-0.943273835394j))*x_ref[0] + ((-0.178153789304-0.447358918974j))*x_ref[1]**o + ((0.840852553754-0.890314694226j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(0.912867863593+0.247678344699j)*x[0]**o + ((0.610300357998-0.266546064068j))*x[0] + ((0.683566120014+0.378808091414j))*x[1]**o + ((-0.206409660187-0.0720496449063j))*x[1]
+        ref[(1, 2, 3, 1)]=(0.912867863593+0.247678344699j)*x_ref[0]**o + ((0.610300357998-0.266546064068j))*x_ref[0] + ((0.683566120014+0.378808091414j))*x_ref[1]**o + ((-0.206409660187-0.0720496449063j))*x_ref[1]
+        arg[(1, 2, 3, 2)]=(0.921182514265+0.596932759006j)*x[0]**o + ((-0.499534853967+0.361344899384j))*x[0] + ((-0.423467956965+0.495690152816j))*x[1]**o + ((0.665763074979-0.986253539892j))*x[1]
+        ref[(1, 2, 3, 2)]=(0.921182514265+0.596932759006j)*x_ref[0]**o + ((-0.499534853967+0.361344899384j))*x_ref[0] + ((-0.423467956965+0.495690152816j))*x_ref[1]**o + ((0.665763074979-0.986253539892j))*x_ref[1]
+        arg[(1, 2, 3, 3)]=(0.788402233563+0.365373761849j)*x[0]**o + ((0.627385480575-0.741149356304j))*x[0] + ((0.831351431396-0.262964575887j))*x[1]**o + ((-0.746098808003+0.0485562690164j))*x[1]
+        ref[(1, 2, 3, 3)]=(0.788402233563+0.365373761849j)*x_ref[0]**o + ((0.627385480575-0.741149356304j))*x_ref[0] + ((0.831351431396-0.262964575887j))*x_ref[1]**o + ((-0.746098808003+0.0485562690164j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.337981792931-0.385162999118j)*x[0]**o + ((-0.0582951806733-0.427108995168j))*x[0] + ((-0.378158916637+0.456335373388j))*x[1]**o + ((0.513300080081-0.594855322167j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.337981792931-0.385162999118j)*x_ref[0]**o + ((-0.0582951806733-0.427108995168j))*x_ref[0] + ((-0.378158916637+0.456335373388j))*x_ref[1]**o + ((0.513300080081-0.594855322167j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.0697974307654+0.880851467555j)*x[0]**o + ((0.702529925277-0.00693914185147j))*x[0] + ((-0.691443345036-0.756176013598j))*x[1]**o + ((0.19880428589-0.403333220145j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.0697974307654+0.880851467555j)*x_ref[0]**o + ((0.702529925277-0.00693914185147j))*x_ref[0] + ((-0.691443345036-0.756176013598j))*x_ref[1]**o + ((0.19880428589-0.403333220145j))*x_ref[1]
+        arg[(1, 3, 0, 2)]=(0.392057756383+0.869853108055j)*x[0]**o + ((-0.0285973520227-0.56340289223j))*x[0] + ((-0.840386612518-0.777053431252j))*x[1]**o + ((-0.885370600572-0.199915219097j))*x[1]
+        ref[(1, 3, 0, 2)]=(0.392057756383+0.869853108055j)*x_ref[0]**o + ((-0.0285973520227-0.56340289223j))*x_ref[0] + ((-0.840386612518-0.777053431252j))*x_ref[1]**o + ((-0.885370600572-0.199915219097j))*x_ref[1]
+        arg[(1, 3, 0, 3)]=(0.990973318643+0.754528614744j)*x[0]**o + ((-0.914407178607+0.0567505710006j))*x[0] + ((-0.3802596813+0.189806083442j))*x[1]**o + ((-0.947870798931-0.600847663333j))*x[1]
+        ref[(1, 3, 0, 3)]=(0.990973318643+0.754528614744j)*x_ref[0]**o + ((-0.914407178607+0.0567505710006j))*x_ref[0] + ((-0.3802596813+0.189806083442j))*x_ref[1]**o + ((-0.947870798931-0.600847663333j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(0.361149335037+0.351381784295j)*x[0]**o + ((-0.811766119172-0.575671479291j))*x[0] + ((-0.271917239765-0.503678355666j))*x[1]**o + ((0.319079520087-0.577129941744j))*x[1]
+        ref[(1, 3, 1, 0)]=(0.361149335037+0.351381784295j)*x_ref[0]**o + ((-0.811766119172-0.575671479291j))*x_ref[0] + ((-0.271917239765-0.503678355666j))*x_ref[1]**o + ((0.319079520087-0.577129941744j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.821764029733-0.496516821999j)*x[0]**o + ((0.184059126908+0.309972401235j))*x[0] + ((-0.310130011757+0.712694188987j))*x[1]**o + ((0.460857489573+0.591270761505j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.821764029733-0.496516821999j)*x_ref[0]**o + ((0.184059126908+0.309972401235j))*x_ref[0] + ((-0.310130011757+0.712694188987j))*x_ref[1]**o + ((0.460857489573+0.591270761505j))*x_ref[1]
+        arg[(1, 3, 1, 2)]=(0.875339144326+0.727194347673j)*x[0]**o + ((-0.679240805225-0.324716713172j))*x[0] + ((0.136639403255+0.425609949059j))*x[1]**o + ((0.117456759533+0.164781936366j))*x[1]
+        ref[(1, 3, 1, 2)]=(0.875339144326+0.727194347673j)*x_ref[0]**o + ((-0.679240805225-0.324716713172j))*x_ref[0] + ((0.136639403255+0.425609949059j))*x_ref[1]**o + ((0.117456759533+0.164781936366j))*x_ref[1]
+        arg[(1, 3, 1, 3)]=(0.623237224278+0.563269975617j)*x[0]**o + ((0.966744900921+0.394151888641j))*x[0] + ((0.836231407942+0.325685981857j))*x[1]**o + ((-0.388621272932-0.227371633761j))*x[1]
+        ref[(1, 3, 1, 3)]=(0.623237224278+0.563269975617j)*x_ref[0]**o + ((0.966744900921+0.394151888641j))*x_ref[0] + ((0.836231407942+0.325685981857j))*x_ref[1]**o + ((-0.388621272932-0.227371633761j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(-0.810827383113+0.262053292276j)*x[0]**o + ((0.962604932035-0.57399750721j))*x[0] + ((0.433328908352+0.712247214134j))*x[1]**o + ((0.508364755896-0.790654693741j))*x[1]
+        ref[(1, 3, 2, 0)]=(-0.810827383113+0.262053292276j)*x_ref[0]**o + ((0.962604932035-0.57399750721j))*x_ref[0] + ((0.433328908352+0.712247214134j))*x_ref[1]**o + ((0.508364755896-0.790654693741j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(-0.0444086565016+0.285847042002j)*x[0]**o + ((0.0538128862542+0.0787788077042j))*x[0] + ((-0.913817037378-0.754009043293j))*x[1]**o + ((0.847910933094-0.761444647034j))*x[1]
+        ref[(1, 3, 2, 1)]=(-0.0444086565016+0.285847042002j)*x_ref[0]**o + ((0.0538128862542+0.0787788077042j))*x_ref[0] + ((-0.913817037378-0.754009043293j))*x_ref[1]**o + ((0.847910933094-0.761444647034j))*x_ref[1]
+        arg[(1, 3, 2, 2)]=(-0.313904712678-0.0502542056564j)*x[0]**o + ((0.19226757488+0.60153405939j))*x[0] + ((-0.679302557432-0.0525887934695j))*x[1]**o + ((-0.638631165236-0.988579276669j))*x[1]
+        ref[(1, 3, 2, 2)]=(-0.313904712678-0.0502542056564j)*x_ref[0]**o + ((0.19226757488+0.60153405939j))*x_ref[0] + ((-0.679302557432-0.0525887934695j))*x_ref[1]**o + ((-0.638631165236-0.988579276669j))*x_ref[1]
+        arg[(1, 3, 2, 3)]=(-0.511400950791-0.193656167083j)*x[0]**o + ((0.251342231644+0.016979370541j))*x[0] + ((0.625320516021-0.65305818826j))*x[1]**o + ((0.613361296517+0.170422360379j))*x[1]
+        ref[(1, 3, 2, 3)]=(-0.511400950791-0.193656167083j)*x_ref[0]**o + ((0.251342231644+0.016979370541j))*x_ref[0] + ((0.625320516021-0.65305818826j))*x_ref[1]**o + ((0.613361296517+0.170422360379j))*x_ref[1]
+        arg[(1, 3, 3, 0)]=(-0.355420353969+0.837730038428j)*x[0]**o + ((0.723758151894-0.553408393769j))*x[0] + ((0.569856393391-0.526335730258j))*x[1]**o + ((-0.100855570623-0.826435474799j))*x[1]
+        ref[(1, 3, 3, 0)]=(-0.355420353969+0.837730038428j)*x_ref[0]**o + ((0.723758151894-0.553408393769j))*x_ref[0] + ((0.569856393391-0.526335730258j))*x_ref[1]**o + ((-0.100855570623-0.826435474799j))*x_ref[1]
+        arg[(1, 3, 3, 1)]=(-0.290466682565+0.278764182492j)*x[0]**o + ((0.58211778998+0.229398045107j))*x[0] + ((0.230715035383-0.289518226302j))*x[1]**o + ((0.727870314055-0.221374365657j))*x[1]
+        ref[(1, 3, 3, 1)]=(-0.290466682565+0.278764182492j)*x_ref[0]**o + ((0.58211778998+0.229398045107j))*x_ref[0] + ((0.230715035383-0.289518226302j))*x_ref[1]**o + ((0.727870314055-0.221374365657j))*x_ref[1]
+        arg[(1, 3, 3, 2)]=(0.43711771623-0.363562900599j)*x[0]**o + ((-0.254864494332+0.625531992319j))*x[0] + ((0.203862043743-0.900531335445j))*x[1]**o + ((-0.534950126119-0.447188131165j))*x[1]
+        ref[(1, 3, 3, 2)]=(0.43711771623-0.363562900599j)*x_ref[0]**o + ((-0.254864494332+0.625531992319j))*x_ref[0] + ((0.203862043743-0.900531335445j))*x_ref[1]**o + ((-0.534950126119-0.447188131165j))*x_ref[1]
+        arg[(1, 3, 3, 3)]=(0.552625277545+0.238547945006j)*x[0]**o + ((0.339319686784-0.0352178008894j))*x[0] + ((0.812840472162-0.0100379156553j))*x[1]**o + ((0.0679325189072-0.092934399085j))*x[1]
+        ref[(1, 3, 3, 3)]=(0.552625277545+0.238547945006j)*x_ref[0]**o + ((0.339319686784-0.0352178008894j))*x_ref[0] + ((0.812840472162-0.0100379156553j))*x_ref[1]**o + ((0.0679325189072-0.092934399085j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.895332329416-0.675665300562j)*x[2]**o + ((-0.913938140469-0.44496309403j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.895332329416-0.675665300562j)*x_ref[2]**o + ((-0.913938140469-0.44496309403j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.226877151748-0.804950158323j)*x[2]**o + ((0.337625488219-0.686343307186j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.226877151748-0.804950158323j)*x_ref[2]**o + ((0.337625488219-0.686343307186j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.317172175115+0.553906261467j)*x[2]**o + ((-0.957641209446-0.706293162334j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.317172175115+0.553906261467j)*x_ref[2]**o + ((-0.957641209446-0.706293162334j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.508195328376+0.218829376647j)*x[2]**o + ((0.29077085062-0.379303565394j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.508195328376+0.218829376647j)*x_ref[2]**o + ((0.29077085062-0.379303565394j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.447336479034-0.829002012153j)*x[2]**o + ((-0.544345941829-0.0229064053463j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.447336479034-0.829002012153j)*x_ref[2]**o + ((-0.544345941829-0.0229064053463j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.139508204833+0.517114281851j)*x[2]**o + ((0.623975273146+0.826900558673j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.139508204833+0.517114281851j)*x_ref[2]**o + ((0.623975273146+0.826900558673j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.39823225068-0.329506729314j)*x[2]**o + ((-0.932015510268-0.035884999511j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.39823225068-0.329506729314j)*x_ref[2]**o + ((-0.932015510268-0.035884999511j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(-0.889912477336-0.939000804248j)*x[2]**o + ((0.66478748395+0.257754892038j))*x[2]
+            ref[(0, 0, 1, 3)]+=(-0.889912477336-0.939000804248j)*x_ref[2]**o + ((0.66478748395+0.257754892038j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.202786371319-0.350259486304j)*x[2]**o + ((-0.891396164794+0.94757088821j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.202786371319-0.350259486304j)*x_ref[2]**o + ((-0.891396164794+0.94757088821j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.783079719516+0.415570322398j)*x[2]**o + ((-0.0404255475961+0.240680282269j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.783079719516+0.415570322398j)*x_ref[2]**o + ((-0.0404255475961+0.240680282269j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(-0.335492124214+0.818910490443j)*x[2]**o + ((-0.867366278365+0.910352696448j))*x[2]
+            ref[(0, 0, 2, 2)]+=(-0.335492124214+0.818910490443j)*x_ref[2]**o + ((-0.867366278365+0.910352696448j))*x_ref[2]
+            arg[(0, 0, 2, 3)]+=(-0.622080804361+0.823698849245j)*x[2]**o + ((0.579671094623+0.749564864467j))*x[2]
+            ref[(0, 0, 2, 3)]+=(-0.622080804361+0.823698849245j)*x_ref[2]**o + ((0.579671094623+0.749564864467j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(0.745970499764+0.20846849888j)*x[2]**o + ((-0.530747138161+0.160153807173j))*x[2]
+            ref[(0, 0, 3, 0)]+=(0.745970499764+0.20846849888j)*x_ref[2]**o + ((-0.530747138161+0.160153807173j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(-0.571342156793+0.14131210386j)*x[2]**o + ((0.313110736555+0.808921492506j))*x[2]
+            ref[(0, 0, 3, 1)]+=(-0.571342156793+0.14131210386j)*x_ref[2]**o + ((0.313110736555+0.808921492506j))*x_ref[2]
+            arg[(0, 0, 3, 2)]+=(-0.35778370423+0.474910411324j)*x[2]**o + ((-0.140196692-0.187047033476j))*x[2]
+            ref[(0, 0, 3, 2)]+=(-0.35778370423+0.474910411324j)*x_ref[2]**o + ((-0.140196692-0.187047033476j))*x_ref[2]
+            arg[(0, 0, 3, 3)]+=(0.693326255738+0.0488446364394j)*x[2]**o + ((0.776885306101-0.64222475787j))*x[2]
+            ref[(0, 0, 3, 3)]+=(0.693326255738+0.0488446364394j)*x_ref[2]**o + ((0.776885306101-0.64222475787j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.70670032231-0.948331384749j)*x[2]**o + ((0.877724782697-0.303338465907j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.70670032231-0.948331384749j)*x_ref[2]**o + ((0.877724782697-0.303338465907j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.152704693759-0.96842813102j)*x[2]**o + ((-0.181552073998-0.366174342949j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.152704693759-0.96842813102j)*x_ref[2]**o + ((-0.181552073998-0.366174342949j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.543130383352+0.1611151062j)*x[2]**o + ((-0.923320612113+0.029907361054j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.543130383352+0.1611151062j)*x_ref[2]**o + ((-0.923320612113+0.029907361054j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.242946131086-0.125456154558j)*x[2]**o + ((0.959724833386-0.667102979508j))*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.242946131086-0.125456154558j)*x_ref[2]**o + ((0.959724833386-0.667102979508j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.563552097817-0.684530918068j)*x[2]**o + ((-0.600691871885-0.359843096874j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.563552097817-0.684530918068j)*x_ref[2]**o + ((-0.600691871885-0.359843096874j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.534634167718-0.562561649214j)*x[2]**o + ((-0.696616426859+0.916455046347j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.534634167718-0.562561649214j)*x_ref[2]**o + ((-0.696616426859+0.916455046347j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.7550400784-0.955701313714j)*x[2]**o + ((0.606174780402+0.161463361313j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.7550400784-0.955701313714j)*x_ref[2]**o + ((0.606174780402+0.161463361313j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.37226388924-0.267018494567j)*x[2]**o + ((0.543069576285+0.0804184825545j))*x[2]
+            ref[(0, 1, 1, 3)]+=(0.37226388924-0.267018494567j)*x_ref[2]**o + ((0.543069576285+0.0804184825545j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.900335875297+0.676459537641j)*x[2]**o + ((0.137001629582+0.320860112816j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.900335875297+0.676459537641j)*x_ref[2]**o + ((0.137001629582+0.320860112816j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.492483226569+0.964586395246j)*x[2]**o + ((-0.24891293673-0.141128095064j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.492483226569+0.964586395246j)*x_ref[2]**o + ((-0.24891293673-0.141128095064j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(0.0389950477796+0.231687624682j)*x[2]**o + ((-0.754145772368-0.190511267292j))*x[2]
+            ref[(0, 1, 2, 2)]+=(0.0389950477796+0.231687624682j)*x_ref[2]**o + ((-0.754145772368-0.190511267292j))*x_ref[2]
+            arg[(0, 1, 2, 3)]+=(-0.426348337398+0.0899625563015j)*x[2]**o + ((0.487760532807-0.191298383958j))*x[2]
+            ref[(0, 1, 2, 3)]+=(-0.426348337398+0.0899625563015j)*x_ref[2]**o + ((0.487760532807-0.191298383958j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(0.466315165713+0.753010439375j)*x[2]**o + ((0.329514774556-0.999862344458j))*x[2]
+            ref[(0, 1, 3, 0)]+=(0.466315165713+0.753010439375j)*x_ref[2]**o + ((0.329514774556-0.999862344458j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(-0.240792094446+0.411767085587j)*x[2]**o + ((-0.399826961091-0.867525729178j))*x[2]
+            ref[(0, 1, 3, 1)]+=(-0.240792094446+0.411767085587j)*x_ref[2]**o + ((-0.399826961091-0.867525729178j))*x_ref[2]
+            arg[(0, 1, 3, 2)]+=(0.105700831736+0.101276150622j)*x[2]**o + ((0.0173893258973-0.267680572738j))*x[2]
+            ref[(0, 1, 3, 2)]+=(0.105700831736+0.101276150622j)*x_ref[2]**o + ((0.0173893258973-0.267680572738j))*x_ref[2]
+            arg[(0, 1, 3, 3)]+=(-0.5630793524-0.711594982804j)*x[2]**o + ((0.587450250702+0.158682343548j))*x[2]
+            ref[(0, 1, 3, 3)]+=(-0.5630793524-0.711594982804j)*x_ref[2]**o + ((0.587450250702+0.158682343548j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.612761789232-0.788644196727j)*x[2]**o + ((0.369540228558-0.848513710144j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.612761789232-0.788644196727j)*x_ref[2]**o + ((0.369540228558-0.848513710144j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.299105965527-0.0689444684273j)*x[2]**o + ((0.168481888747+0.0305384832488j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.299105965527-0.0689444684273j)*x_ref[2]**o + ((0.168481888747+0.0305384832488j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.693327496649-0.44980187481j)*x[2]**o + ((0.21731841569+0.739617243644j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.693327496649-0.44980187481j)*x_ref[2]**o + ((0.21731841569+0.739617243644j))*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(0.941312185077-0.511064423998j)*x[2]**o + ((0.837050399179+0.0656198694417j))*x[2]
+            ref[(0, 2, 0, 3)]+=(0.941312185077-0.511064423998j)*x_ref[2]**o + ((0.837050399179+0.0656198694417j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.375003912628-0.0141053534396j)*x[2]**o + ((-0.200241466587+0.953962466461j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.375003912628-0.0141053534396j)*x_ref[2]**o + ((-0.200241466587+0.953962466461j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.687245375897-0.933599554511j)*x[2]**o + ((-0.579937602942+0.674055110209j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.687245375897-0.933599554511j)*x_ref[2]**o + ((-0.579937602942+0.674055110209j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.0172889599973-0.0948161729956j)*x[2]**o + ((-0.371044340074+0.954726684155j))*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.0172889599973-0.0948161729956j)*x_ref[2]**o + ((-0.371044340074+0.954726684155j))*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(0.340089312421+0.575660495285j)*x[2]**o + ((-0.393812853138+0.958075984474j))*x[2]
+            ref[(0, 2, 1, 3)]+=(0.340089312421+0.575660495285j)*x_ref[2]**o + ((-0.393812853138+0.958075984474j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.210211341619-0.496551471017j)*x[2]**o + ((-0.00221072016005-0.550604615867j))*x[2]
+            ref[(0, 2, 2, 0)]+=(0.210211341619-0.496551471017j)*x_ref[2]**o + ((-0.00221072016005-0.550604615867j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.140016282543-0.399463306311j)*x[2]**o + ((-0.793910921102-0.0513151747185j))*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.140016282543-0.399463306311j)*x_ref[2]**o + ((-0.793910921102-0.0513151747185j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.030384977086+0.583108387714j)*x[2]**o + ((0.372136681172-0.0662561754681j))*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.030384977086+0.583108387714j)*x_ref[2]**o + ((0.372136681172-0.0662561754681j))*x_ref[2]
+            arg[(0, 2, 2, 3)]+=(-0.599774803259-0.582655560947j)*x[2]**o + ((-0.934221688088+0.215765179588j))*x[2]
+            ref[(0, 2, 2, 3)]+=(-0.599774803259-0.582655560947j)*x_ref[2]**o + ((-0.934221688088+0.215765179588j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(0.820217333612+0.371934019405j)*x[2]**o + ((0.394309721332+0.231149307291j))*x[2]
+            ref[(0, 2, 3, 0)]+=(0.820217333612+0.371934019405j)*x_ref[2]**o + ((0.394309721332+0.231149307291j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(0.566750244072-0.207832395297j)*x[2]**o + ((-0.31365514862+0.748961914541j))*x[2]
+            ref[(0, 2, 3, 1)]+=(0.566750244072-0.207832395297j)*x_ref[2]**o + ((-0.31365514862+0.748961914541j))*x_ref[2]
+            arg[(0, 2, 3, 2)]+=(-0.366442923253+0.667618084515j)*x[2]**o + ((0.698877912692+0.6142432405j))*x[2]
+            ref[(0, 2, 3, 2)]+=(-0.366442923253+0.667618084515j)*x_ref[2]**o + ((0.698877912692+0.6142432405j))*x_ref[2]
+            arg[(0, 2, 3, 3)]+=(-0.973710968339-0.691669586389j)*x[2]**o + ((0.17012742301-0.951467230002j))*x[2]
+            ref[(0, 2, 3, 3)]+=(-0.973710968339-0.691669586389j)*x_ref[2]**o + ((0.17012742301-0.951467230002j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.474379507458-0.903467218486j)*x[2]**o + ((-0.775267681143-0.327839649963j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.474379507458-0.903467218486j)*x_ref[2]**o + ((-0.775267681143-0.327839649963j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.545053227203-0.0855280889349j)*x[2]**o + ((-0.979162554122+0.843564329968j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.545053227203-0.0855280889349j)*x_ref[2]**o + ((-0.979162554122+0.843564329968j))*x_ref[2]
+            arg[(0, 3, 0, 2)]+=(-0.899253448493-0.478819600619j)*x[2]**o + ((0.535652297511+0.438333366341j))*x[2]
+            ref[(0, 3, 0, 2)]+=(-0.899253448493-0.478819600619j)*x_ref[2]**o + ((0.535652297511+0.438333366341j))*x_ref[2]
+            arg[(0, 3, 0, 3)]+=(-0.360198595618+0.997108969243j)*x[2]**o + ((-0.613807216987+0.126369465893j))*x[2]
+            ref[(0, 3, 0, 3)]+=(-0.360198595618+0.997108969243j)*x_ref[2]**o + ((-0.613807216987+0.126369465893j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.277705837615+0.292700609965j)*x[2]**o + ((0.757434837109-0.513039935054j))*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.277705837615+0.292700609965j)*x_ref[2]**o + ((0.757434837109-0.513039935054j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.332552818921-0.631081639464j)*x[2]**o + ((0.382661533645-0.399023227609j))*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.332552818921-0.631081639464j)*x_ref[2]**o + ((0.382661533645-0.399023227609j))*x_ref[2]
+            arg[(0, 3, 1, 2)]+=(0.0989563162791+0.726362298558j)*x[2]**o + ((-0.21954590364-0.924928324954j))*x[2]
+            ref[(0, 3, 1, 2)]+=(0.0989563162791+0.726362298558j)*x_ref[2]**o + ((-0.21954590364-0.924928324954j))*x_ref[2]
+            arg[(0, 3, 1, 3)]+=(-0.7440412167+0.39897420055j)*x[2]**o + ((0.0268886645848+0.183779947025j))*x[2]
+            ref[(0, 3, 1, 3)]+=(-0.7440412167+0.39897420055j)*x_ref[2]**o + ((0.0268886645848+0.183779947025j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(0.449635777398+0.0262840101164j)*x[2]**o + ((-0.792080798565+0.859792250779j))*x[2]
+            ref[(0, 3, 2, 0)]+=(0.449635777398+0.0262840101164j)*x_ref[2]**o + ((-0.792080798565+0.859792250779j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(-0.625590577905+0.974491291476j)*x[2]**o + ((-0.4594934844-0.78287894506j))*x[2]
+            ref[(0, 3, 2, 1)]+=(-0.625590577905+0.974491291476j)*x_ref[2]**o + ((-0.4594934844-0.78287894506j))*x_ref[2]
+            arg[(0, 3, 2, 2)]+=(0.284469933719-0.658354517073j)*x[2]**o + ((-0.192590317257-0.252351757997j))*x[2]
+            ref[(0, 3, 2, 2)]+=(0.284469933719-0.658354517073j)*x_ref[2]**o + ((-0.192590317257-0.252351757997j))*x_ref[2]
+            arg[(0, 3, 2, 3)]+=(0.499707176159-0.268174883102j)*x[2]**o + ((0.286014442698-0.410216411178j))*x[2]
+            ref[(0, 3, 2, 3)]+=(0.499707176159-0.268174883102j)*x_ref[2]**o + ((0.286014442698-0.410216411178j))*x_ref[2]
+            arg[(0, 3, 3, 0)]+=(-0.246215516084-0.796185158921j)*x[2]**o + ((-0.0102722271493+0.282263311184j))*x[2]
+            ref[(0, 3, 3, 0)]+=(-0.246215516084-0.796185158921j)*x_ref[2]**o + ((-0.0102722271493+0.282263311184j))*x_ref[2]
+            arg[(0, 3, 3, 1)]+=(0.906071711618-0.557999106251j)*x[2]**o + ((-0.295681844046-0.567294097096j))*x[2]
+            ref[(0, 3, 3, 1)]+=(0.906071711618-0.557999106251j)*x_ref[2]**o + ((-0.295681844046-0.567294097096j))*x_ref[2]
+            arg[(0, 3, 3, 2)]+=(-0.418388590434-0.667694127681j)*x[2]**o + ((0.415336782178-0.529672425175j))*x[2]
+            ref[(0, 3, 3, 2)]+=(-0.418388590434-0.667694127681j)*x_ref[2]**o + ((0.415336782178-0.529672425175j))*x_ref[2]
+            arg[(0, 3, 3, 3)]+=(0.648117835332+0.143705896554j)*x[2]**o + ((0.739003485759+0.0380719468561j))*x[2]
+            ref[(0, 3, 3, 3)]+=(0.648117835332+0.143705896554j)*x_ref[2]**o + ((0.739003485759+0.0380719468561j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.396923171586+0.931318854413j)*x[2]**o + ((0.212995269627-0.128026915633j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.396923171586+0.931318854413j)*x_ref[2]**o + ((0.212995269627-0.128026915633j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.230833464889-0.632322182233j)*x[2]**o + ((0.391646705989+0.690382530487j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.230833464889-0.632322182233j)*x_ref[2]**o + ((0.391646705989+0.690382530487j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.745602166936+0.404056793435j)*x[2]**o + ((0.796405341183+0.0815540765431j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.745602166936+0.404056793435j)*x_ref[2]**o + ((0.796405341183+0.0815540765431j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(-0.0186378892446+0.807371878535j)*x[2]**o + ((0.796062363034+0.937879502834j))*x[2]
+            ref[(1, 0, 0, 3)]+=(-0.0186378892446+0.807371878535j)*x_ref[2]**o + ((0.796062363034+0.937879502834j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.258096403264+0.37933802164j)*x[2]**o + ((0.949048599874-0.645442939743j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.258096403264+0.37933802164j)*x_ref[2]**o + ((0.949048599874-0.645442939743j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.398191586283+0.942960617702j)*x[2]**o + ((0.416474630997-0.375128363797j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.398191586283+0.942960617702j)*x_ref[2]**o + ((0.416474630997-0.375128363797j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.303248033412+0.356121798225j)*x[2]**o + ((0.615856274913-0.388659988706j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.303248033412+0.356121798225j)*x_ref[2]**o + ((0.615856274913-0.388659988706j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.80722431515+0.89882559877j)*x[2]**o + ((-0.634303394969+0.612874904951j))*x[2]
+            ref[(1, 0, 1, 3)]+=(0.80722431515+0.89882559877j)*x_ref[2]**o + ((-0.634303394969+0.612874904951j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.141163670226+0.349591616807j)*x[2]**o + ((0.094242885637+0.657962391434j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.141163670226+0.349591616807j)*x_ref[2]**o + ((0.094242885637+0.657962391434j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.66911584786-0.555405117466j)*x[2]**o + ((0.41607024416+0.342161366107j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.66911584786-0.555405117466j)*x_ref[2]**o + ((0.41607024416+0.342161366107j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(-0.0706743808969-0.017439691698j)*x[2]**o + ((-0.0404733159771+0.330577110491j))*x[2]
+            ref[(1, 0, 2, 2)]+=(-0.0706743808969-0.017439691698j)*x_ref[2]**o + ((-0.0404733159771+0.330577110491j))*x_ref[2]
+            arg[(1, 0, 2, 3)]+=(-0.73263926033+0.274459854677j)*x[2]**o + ((0.420418253625-0.0792729375905j))*x[2]
+            ref[(1, 0, 2, 3)]+=(-0.73263926033+0.274459854677j)*x_ref[2]**o + ((0.420418253625-0.0792729375905j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(0.10169837399+0.840173460865j)*x[2]**o + ((0.436889662306-0.164011652433j))*x[2]
+            ref[(1, 0, 3, 0)]+=(0.10169837399+0.840173460865j)*x_ref[2]**o + ((0.436889662306-0.164011652433j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(0.211564982573+0.633944860146j)*x[2]**o + ((-0.0154222977707+0.0549787628778j))*x[2]
+            ref[(1, 0, 3, 1)]+=(0.211564982573+0.633944860146j)*x_ref[2]**o + ((-0.0154222977707+0.0549787628778j))*x_ref[2]
+            arg[(1, 0, 3, 2)]+=(-0.454749274219-0.687423870606j)*x[2]**o + ((-0.309873090836+0.639398514208j))*x[2]
+            ref[(1, 0, 3, 2)]+=(-0.454749274219-0.687423870606j)*x_ref[2]**o + ((-0.309873090836+0.639398514208j))*x_ref[2]
+            arg[(1, 0, 3, 3)]+=(-0.367900619864-0.342684738403j)*x[2]**o + ((0.112447687576+0.23605461126j))*x[2]
+            ref[(1, 0, 3, 3)]+=(-0.367900619864-0.342684738403j)*x_ref[2]**o + ((0.112447687576+0.23605461126j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.707135043471-0.846871282101j)*x[2]**o + ((0.814014823938-0.381907356378j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.707135043471-0.846871282101j)*x_ref[2]**o + ((0.814014823938-0.381907356378j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.413457182819-0.289881433146j)*x[2]**o + ((-0.367070009709+0.356723187292j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.413457182819-0.289881433146j)*x_ref[2]**o + ((-0.367070009709+0.356723187292j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.303177118978-0.538738085611j)*x[2]**o + ((0.45976031883-0.770263636971j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.303177118978-0.538738085611j)*x_ref[2]**o + ((0.45976031883-0.770263636971j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.855091843433+0.035438936259j)*x[2]**o + ((0.076438450786+0.147245324726j))*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.855091843433+0.035438936259j)*x_ref[2]**o + ((0.076438450786+0.147245324726j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.857297594484+0.221442912731j)*x[2]**o + ((0.993518040892-0.632473641659j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.857297594484+0.221442912731j)*x_ref[2]**o + ((0.993518040892-0.632473641659j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.24830139588-0.0582664871941j)*x[2]**o + ((-0.204961301323+0.533644740697j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.24830139588-0.0582664871941j)*x_ref[2]**o + ((-0.204961301323+0.533644740697j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.484564909021+0.581268497742j)*x[2]**o + ((0.346177267622+0.698302917038j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.484564909021+0.581268497742j)*x_ref[2]**o + ((0.346177267622+0.698302917038j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.722508079092+0.628674263602j)*x[2]**o + ((-0.207961662445-0.456634094595j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.722508079092+0.628674263602j)*x_ref[2]**o + ((-0.207961662445-0.456634094595j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.22356213296-0.423244114842j)*x[2]**o + ((0.123952357791+0.331784699477j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.22356213296-0.423244114842j)*x_ref[2]**o + ((0.123952357791+0.331784699477j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.357450552543-0.713584650812j)*x[2]**o + ((-0.53062237025-0.432089119256j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.357450552543-0.713584650812j)*x_ref[2]**o + ((-0.53062237025-0.432089119256j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(-0.629622091487-0.279533082683j)*x[2]**o + ((0.398303166609-0.577178842454j))*x[2]
+            ref[(1, 1, 2, 2)]+=(-0.629622091487-0.279533082683j)*x_ref[2]**o + ((0.398303166609-0.577178842454j))*x_ref[2]
+            arg[(1, 1, 2, 3)]+=(0.261875201997-0.506414706563j)*x[2]**o + ((-0.786060549995+0.0430412411984j))*x[2]
+            ref[(1, 1, 2, 3)]+=(0.261875201997-0.506414706563j)*x_ref[2]**o + ((-0.786060549995+0.0430412411984j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(-0.43230565104+0.410159497348j)*x[2]**o + ((-0.296419228168+0.519099725583j))*x[2]
+            ref[(1, 1, 3, 0)]+=(-0.43230565104+0.410159497348j)*x_ref[2]**o + ((-0.296419228168+0.519099725583j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(-0.888825318624+0.191606011706j)*x[2]**o + ((-0.968163099804+0.665231076695j))*x[2]
+            ref[(1, 1, 3, 1)]+=(-0.888825318624+0.191606011706j)*x_ref[2]**o + ((-0.968163099804+0.665231076695j))*x_ref[2]
+            arg[(1, 1, 3, 2)]+=(0.523633254012+0.00740691562552j)*x[2]**o + ((0.138661854669-0.752713112972j))*x[2]
+            ref[(1, 1, 3, 2)]+=(0.523633254012+0.00740691562552j)*x_ref[2]**o + ((0.138661854669-0.752713112972j))*x_ref[2]
+            arg[(1, 1, 3, 3)]+=(-0.700218503492-0.0410337467685j)*x[2]**o + ((0.337122508364-0.330670188411j))*x[2]
+            ref[(1, 1, 3, 3)]+=(-0.700218503492-0.0410337467685j)*x_ref[2]**o + ((0.337122508364-0.330670188411j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.713508570045-0.425933951256j)*x[2]**o + ((-0.529396639214-0.819529404106j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.713508570045-0.425933951256j)*x_ref[2]**o + ((-0.529396639214-0.819529404106j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.985409589169+0.717094473779j)*x[2]**o + ((0.906748898335+0.710357888818j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.985409589169+0.717094473779j)*x_ref[2]**o + ((0.906748898335+0.710357888818j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.74810469414+0.20148919942j)*x[2]**o + ((0.157835960536-0.425493344867j))*x[2]
+            ref[(1, 2, 0, 2)]+=(0.74810469414+0.20148919942j)*x_ref[2]**o + ((0.157835960536-0.425493344867j))*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.699986509625+0.233167551669j)*x[2]**o + ((-0.296876238735+0.711044032188j))*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.699986509625+0.233167551669j)*x_ref[2]**o + ((-0.296876238735+0.711044032188j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.820949743456+0.322572843008j)*x[2]**o + ((0.756751365653-0.987142969168j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.820949743456+0.322572843008j)*x_ref[2]**o + ((0.756751365653-0.987142969168j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.0272915624665-0.464551307569j)*x[2]**o + ((0.331032102534+0.209882240704j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.0272915624665-0.464551307569j)*x_ref[2]**o + ((0.331032102534+0.209882240704j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(-0.671938098087-0.815816689847j)*x[2]**o + ((-0.862580936777-0.0864275067905j))*x[2]
+            ref[(1, 2, 1, 2)]+=(-0.671938098087-0.815816689847j)*x_ref[2]**o + ((-0.862580936777-0.0864275067905j))*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(-0.0120386472611-0.599817025612j)*x[2]**o + ((0.620046785385+0.392298692972j))*x[2]
+            ref[(1, 2, 1, 3)]+=(-0.0120386472611-0.599817025612j)*x_ref[2]**o + ((0.620046785385+0.392298692972j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.455290039119-0.0879503446397j)*x[2]**o + ((-0.515328678867-0.0647419549845j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.455290039119-0.0879503446397j)*x_ref[2]**o + ((-0.515328678867-0.0647419549845j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.737904355859+0.876394327046j)*x[2]**o + ((-0.743066582523-0.375772880147j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.737904355859+0.876394327046j)*x_ref[2]**o + ((-0.743066582523-0.375772880147j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(0.263599567733+0.807084407939j)*x[2]**o + ((0.726833034337+0.195153398064j))*x[2]
+            ref[(1, 2, 2, 2)]+=(0.263599567733+0.807084407939j)*x_ref[2]**o + ((0.726833034337+0.195153398064j))*x_ref[2]
+            arg[(1, 2, 2, 3)]+=(0.867832915805-0.365265364346j)*x[2]**o + ((-0.351149711697+0.0692393104094j))*x[2]
+            ref[(1, 2, 2, 3)]+=(0.867832915805-0.365265364346j)*x_ref[2]**o + ((-0.351149711697+0.0692393104094j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(0.757610561691+0.179824022037j)*x[2]**o + ((-0.289898726504+0.34201618055j))*x[2]
+            ref[(1, 2, 3, 0)]+=(0.757610561691+0.179824022037j)*x_ref[2]**o + ((-0.289898726504+0.34201618055j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(0.577252397087+0.864619050005j)*x[2]**o + ((-0.59675074221+0.819799627277j))*x[2]
+            ref[(1, 2, 3, 1)]+=(0.577252397087+0.864619050005j)*x_ref[2]**o + ((-0.59675074221+0.819799627277j))*x_ref[2]
+            arg[(1, 2, 3, 2)]+=(-0.413713681468+0.662056698108j)*x[2]**o + ((0.669975012306-0.743773231953j))*x[2]
+            ref[(1, 2, 3, 2)]+=(-0.413713681468+0.662056698108j)*x_ref[2]**o + ((0.669975012306-0.743773231953j))*x_ref[2]
+            arg[(1, 2, 3, 3)]+=(-0.501262630622-0.449781376428j)*x[2]**o + ((0.162190417261+0.301606065001j))*x[2]
+            ref[(1, 2, 3, 3)]+=(-0.501262630622-0.449781376428j)*x_ref[2]**o + ((0.162190417261+0.301606065001j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(-0.494275424956-0.355939205802j)*x[2]**o + ((-0.0129457712114-0.9753311365j))*x[2]
+            ref[(1, 3, 0, 0)]+=(-0.494275424956-0.355939205802j)*x_ref[2]**o + ((-0.0129457712114-0.9753311365j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.88663549752-0.416153297827j)*x[2]**o + ((-0.475071191367-0.565215984439j))*x[2]
+            ref[(1, 3, 0, 1)]+=(0.88663549752-0.416153297827j)*x_ref[2]**o + ((-0.475071191367-0.565215984439j))*x_ref[2]
+            arg[(1, 3, 0, 2)]+=(0.921400377057-0.575435431045j)*x[2]**o + ((0.961268427625-0.58848021458j))*x[2]
+            ref[(1, 3, 0, 2)]+=(0.921400377057-0.575435431045j)*x_ref[2]**o + ((0.961268427625-0.58848021458j))*x_ref[2]
+            arg[(1, 3, 0, 3)]+=(-0.931125915933+0.822484987321j)*x[2]**o + ((-0.263792228743+0.929452766469j))*x[2]
+            ref[(1, 3, 0, 3)]+=(-0.931125915933+0.822484987321j)*x_ref[2]**o + ((-0.263792228743+0.929452766469j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.580261659154+0.639057234108j)*x[2]**o + ((-0.101314480615-0.248861591689j))*x[2]
+            ref[(1, 3, 1, 0)]+=(0.580261659154+0.639057234108j)*x_ref[2]**o + ((-0.101314480615-0.248861591689j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(-0.968292284816-0.558086144678j)*x[2]**o + ((0.373867665169+0.981164192531j))*x[2]
+            ref[(1, 3, 1, 1)]+=(-0.968292284816-0.558086144678j)*x_ref[2]**o + ((0.373867665169+0.981164192531j))*x_ref[2]
+            arg[(1, 3, 1, 2)]+=(-0.177115991168+0.182241794258j)*x[2]**o + ((-0.538564079461+0.401523394931j))*x[2]
+            ref[(1, 3, 1, 2)]+=(-0.177115991168+0.182241794258j)*x_ref[2]**o + ((-0.538564079461+0.401523394931j))*x_ref[2]
+            arg[(1, 3, 1, 3)]+=(0.125088831851-0.61624167228j)*x[2]**o + ((-0.193780694594-0.18694365623j))*x[2]
+            ref[(1, 3, 1, 3)]+=(0.125088831851-0.61624167228j)*x_ref[2]**o + ((-0.193780694594-0.18694365623j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(-0.415220825215+0.324186626181j)*x[2]**o + ((-0.439436522111+0.299144574515j))*x[2]
+            ref[(1, 3, 2, 0)]+=(-0.415220825215+0.324186626181j)*x_ref[2]**o + ((-0.439436522111+0.299144574515j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.489223122138-0.693795236842j)*x[2]**o + ((-0.364103413929+0.805859047788j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.489223122138-0.693795236842j)*x_ref[2]**o + ((-0.364103413929+0.805859047788j))*x_ref[2]
+            arg[(1, 3, 2, 2)]+=(0.0428340494579+0.271755439319j)*x[2]**o + ((0.440542998248-0.742676583903j))*x[2]
+            ref[(1, 3, 2, 2)]+=(0.0428340494579+0.271755439319j)*x_ref[2]**o + ((0.440542998248-0.742676583903j))*x_ref[2]
+            arg[(1, 3, 2, 3)]+=(-0.230506752775+0.415150889394j)*x[2]**o + ((0.822938131921-0.540509904496j))*x[2]
+            ref[(1, 3, 2, 3)]+=(-0.230506752775+0.415150889394j)*x_ref[2]**o + ((0.822938131921-0.540509904496j))*x_ref[2]
+            arg[(1, 3, 3, 0)]+=(0.702149927201-0.43018822844j)*x[2]**o + ((0.716223115676+0.899524142512j))*x[2]
+            ref[(1, 3, 3, 0)]+=(0.702149927201-0.43018822844j)*x_ref[2]**o + ((0.716223115676+0.899524142512j))*x_ref[2]
+            arg[(1, 3, 3, 1)]+=(0.323347425404+0.487941618767j)*x[2]**o + ((-0.966787342904-0.647814842555j))*x[2]
+            ref[(1, 3, 3, 1)]+=(0.323347425404+0.487941618767j)*x_ref[2]**o + ((-0.966787342904-0.647814842555j))*x_ref[2]
+            arg[(1, 3, 3, 2)]+=(-0.788972226328+0.410519748007j)*x[2]**o + ((0.712237062152+0.504905464898j))*x[2]
+            ref[(1, 3, 3, 2)]+=(-0.788972226328+0.410519748007j)*x_ref[2]**o + ((0.712237062152+0.504905464898j))*x_ref[2]
+            arg[(1, 3, 3, 3)]+=(0.0598790354758-0.816364519066j)*x[2]**o + ((0.382344652137-0.0111709223853j))*x[2]
+            ref[(1, 3, 3, 3)]+=(0.0598790354758-0.816364519066j)*x_ref[2]**o + ((0.382344652137-0.0111709223853j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.431530552897-0.247756394125j)*x[0]**o + ((-0.534101157902+0.373145818155j))*x[0] + ((-0.909195656461-0.348339558978j))*x[1]**o + ((-0.782273525876+0.494394241795j))*x[1]
+        ref=(0.431530552897-0.247756394125j)*x_ref[0]**o + ((-0.534101157902+0.373145818155j))*x_ref[0] + ((-0.909195656461-0.348339558978j))*x_ref[1]**o + ((-0.782273525876+0.494394241795j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.249773921283+0.444122217865j))*x[2]**o + ((-0.362382103021+0.841039590084j))*x[2]
+            ref+=((-0.249773921283+0.444122217865j))*x_ref[2]**o + ((-0.362382103021+0.841039590084j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.517927751617-0.185335920755j)*x[0]**o + ((-0.608314833263+0.21875162911j))*x[0] + ((-0.863634022914+0.42222696551j))*x[1]**o + ((0.662760424084-0.663422871707j))*x[1]
+        ref[(0,)]=(-0.517927751617-0.185335920755j)*x_ref[0]**o + ((-0.608314833263+0.21875162911j))*x_ref[0] + ((-0.863634022914+0.42222696551j))*x_ref[1]**o + ((0.662760424084-0.663422871707j))*x_ref[1]
+        arg[(1,)]=(0.198453405055+0.78635805039j)*x[0]**o + ((-0.331075854263+0.465516773293j))*x[0] + ((0.842914396384-0.667527122741j))*x[1]**o + ((-0.189064936111+0.0328289321179j))*x[1]
+        ref[(1,)]=(0.198453405055+0.78635805039j)*x_ref[0]**o + ((-0.331075854263+0.465516773293j))*x_ref[0] + ((0.842914396384-0.667527122741j))*x_ref[1]**o + ((-0.189064936111+0.0328289321179j))*x_ref[1]
+        arg[(2,)]=(-0.654800137544-0.202369060332j)*x[0]**o + ((0.284844880848+0.755879275393j))*x[0] + ((0.967584589219+0.280385034541j))*x[1]**o + ((0.628722567854+0.0226368426535j))*x[1]
+        ref[(2,)]=(-0.654800137544-0.202369060332j)*x_ref[0]**o + ((0.284844880848+0.755879275393j))*x_ref[0] + ((0.967584589219+0.280385034541j))*x_ref[1]**o + ((0.628722567854+0.0226368426535j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.114902197277+0.227307579227j)*x[2]**o + ((0.590436812317-0.749230145312j))*x[2]
+            ref[(0,)]+=(0.114902197277+0.227307579227j)*x_ref[2]**o + ((0.590436812317-0.749230145312j))*x_ref[2]
+            arg[(1,)]+=(0.133588531462+0.126967107191j)*x[2]**o + ((0.842848739325-0.452111778805j))*x[2]
+            ref[(1,)]+=(0.133588531462+0.126967107191j)*x_ref[2]**o + ((0.842848739325-0.452111778805j))*x_ref[2]
+            arg[(2,)]+=(-0.434860532881+0.139815611217j)*x[2]**o + ((0.156551294353-0.073607697273j))*x[2]
+            ref[(2,)]+=(-0.434860532881+0.139815611217j)*x_ref[2]**o + ((0.156551294353-0.073607697273j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=(0.569606798465+0.258257257337j)*x[0]**o + ((0.262492686309+0.91474171139j))*x[0] + ((0.223462412718-0.918967712816j))*x[1]**o + ((-0.887840161084-0.706763206451j))*x[1]
+        ref[(0, 0)]=(0.569606798465+0.258257257337j)*x_ref[0]**o + ((0.262492686309+0.91474171139j))*x_ref[0] + ((0.223462412718-0.918967712816j))*x_ref[1]**o + ((-0.887840161084-0.706763206451j))*x_ref[1]
+        arg[(0, 1)]=(0.745314946718-0.358487490456j)*x[0]**o + ((0.0945377239615+0.605554721341j))*x[0] + ((-0.532465797222-0.567168560439j))*x[1]**o + ((0.21559810563+0.928715999166j))*x[1]
+        ref[(0, 1)]=(0.745314946718-0.358487490456j)*x_ref[0]**o + ((0.0945377239615+0.605554721341j))*x_ref[0] + ((-0.532465797222-0.567168560439j))*x_ref[1]**o + ((0.21559810563+0.928715999166j))*x_ref[1]
+        arg[(0, 2)]=(0.326195542295+0.710256942815j)*x[0]**o + ((0.709324584296+0.482199924179j))*x[0] + ((0.821051740843+0.479919196698j))*x[1]**o + ((-0.417566682371+0.381214442686j))*x[1]
+        ref[(0, 2)]=(0.326195542295+0.710256942815j)*x_ref[0]**o + ((0.709324584296+0.482199924179j))*x_ref[0] + ((0.821051740843+0.479919196698j))*x_ref[1]**o + ((-0.417566682371+0.381214442686j))*x_ref[1]
+        arg[(0, 3)]=(-0.766441357387+0.392548266517j)*x[0]**o + ((-0.319797606124-0.797423943051j))*x[0] + ((0.758210400916+0.355289191465j))*x[1]**o + ((0.941884629893-0.975838497262j))*x[1]
+        ref[(0, 3)]=(-0.766441357387+0.392548266517j)*x_ref[0]**o + ((-0.319797606124-0.797423943051j))*x_ref[0] + ((0.758210400916+0.355289191465j))*x_ref[1]**o + ((0.941884629893-0.975838497262j))*x_ref[1]
+        arg[(1, 0)]=(-0.700372164369+0.527247931153j)*x[0]**o + ((-0.404711921737+0.611397740344j))*x[0] + ((-0.569006079545+0.845494219753j))*x[1]**o + ((0.221814165843+0.270970418229j))*x[1]
+        ref[(1, 0)]=(-0.700372164369+0.527247931153j)*x_ref[0]**o + ((-0.404711921737+0.611397740344j))*x_ref[0] + ((-0.569006079545+0.845494219753j))*x_ref[1]**o + ((0.221814165843+0.270970418229j))*x_ref[1]
+        arg[(1, 1)]=(0.80191751019+0.592085103829j)*x[0]**o + ((0.164666043347-0.623710268063j))*x[0] + ((0.221520167764-0.258825442739j))*x[1]**o + ((0.295896469229+0.875135653086j))*x[1]
+        ref[(1, 1)]=(0.80191751019+0.592085103829j)*x_ref[0]**o + ((0.164666043347-0.623710268063j))*x_ref[0] + ((0.221520167764-0.258825442739j))*x_ref[1]**o + ((0.295896469229+0.875135653086j))*x_ref[1]
+        arg[(1, 2)]=(0.736976384445+0.343293305002j)*x[0]**o + ((-0.126929304244-0.146315806994j))*x[0] + ((-0.0959615560456+0.880414618043j))*x[1]**o + ((-0.0953868087036-0.0839809474312j))*x[1]
+        ref[(1, 2)]=(0.736976384445+0.343293305002j)*x_ref[0]**o + ((-0.126929304244-0.146315806994j))*x_ref[0] + ((-0.0959615560456+0.880414618043j))*x_ref[1]**o + ((-0.0953868087036-0.0839809474312j))*x_ref[1]
+        arg[(1, 3)]=(0.741002828484-0.913442116854j)*x[0]**o + ((0.8713417346+0.127079631643j))*x[0] + ((0.529204414347+0.00757866123654j))*x[1]**o + ((-0.222290243091-0.0279891807522j))*x[1]
+        ref[(1, 3)]=(0.741002828484-0.913442116854j)*x_ref[0]**o + ((0.8713417346+0.127079631643j))*x_ref[0] + ((0.529204414347+0.00757866123654j))*x_ref[1]**o + ((-0.222290243091-0.0279891807522j))*x_ref[1]
+        arg[(2, 0)]=(-0.295426950352+0.0523086708384j)*x[0]**o + ((-0.195043033016+0.390596347636j))*x[0] + ((-0.013671146553-0.331923771229j))*x[1]**o + ((-0.976435616501-0.82356086288j))*x[1]
+        ref[(2, 0)]=(-0.295426950352+0.0523086708384j)*x_ref[0]**o + ((-0.195043033016+0.390596347636j))*x_ref[0] + ((-0.013671146553-0.331923771229j))*x_ref[1]**o + ((-0.976435616501-0.82356086288j))*x_ref[1]
+        arg[(2, 1)]=(0.721450589623+0.642326813366j)*x[0]**o + ((0.31604440266-0.839545087158j))*x[0] + ((0.0972543033558+0.365420821108j))*x[1]**o + ((-0.227731023784-0.387887385929j))*x[1]
+        ref[(2, 1)]=(0.721450589623+0.642326813366j)*x_ref[0]**o + ((0.31604440266-0.839545087158j))*x_ref[0] + ((0.0972543033558+0.365420821108j))*x_ref[1]**o + ((-0.227731023784-0.387887385929j))*x_ref[1]
+        arg[(2, 2)]=(-0.522262271988+0.869501184396j)*x[0]**o + ((-0.430262532676+0.135836062071j))*x[0] + ((-0.462012815967+0.163369749895j))*x[1]**o + ((0.592588482063+0.765748060217j))*x[1]
+        ref[(2, 2)]=(-0.522262271988+0.869501184396j)*x_ref[0]**o + ((-0.430262532676+0.135836062071j))*x_ref[0] + ((-0.462012815967+0.163369749895j))*x_ref[1]**o + ((0.592588482063+0.765748060217j))*x_ref[1]
+        arg[(2, 3)]=(-0.348037135421+0.424085032656j)*x[0]**o + ((-0.648328313297-0.44087389154j))*x[0] + ((-0.692845412738-0.937863778187j))*x[1]**o + ((0.021677048679-0.899117660282j))*x[1]
+        ref[(2, 3)]=(-0.348037135421+0.424085032656j)*x_ref[0]**o + ((-0.648328313297-0.44087389154j))*x_ref[0] + ((-0.692845412738-0.937863778187j))*x_ref[1]**o + ((0.021677048679-0.899117660282j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.076729794653+0.74156839426j)*x[2]**o + ((0.840641575414+0.122078767997j))*x[2]
+            ref[(0, 0)]+=(-0.076729794653+0.74156839426j)*x_ref[2]**o + ((0.840641575414+0.122078767997j))*x_ref[2]
+            arg[(0, 1)]+=(0.689721834887-0.255365664494j)*x[2]**o + ((-0.0735629721123-0.643651434233j))*x[2]
+            ref[(0, 1)]+=(0.689721834887-0.255365664494j)*x_ref[2]**o + ((-0.0735629721123-0.643651434233j))*x_ref[2]
+            arg[(0, 2)]+=(-0.503027357603-0.216321260363j)*x[2]**o + ((-0.4988865606-0.69488539962j))*x[2]
+            ref[(0, 2)]+=(-0.503027357603-0.216321260363j)*x_ref[2]**o + ((-0.4988865606-0.69488539962j))*x_ref[2]
+            arg[(0, 3)]+=(-0.419180237644-0.119779309087j)*x[2]**o + ((0.684414841175-0.837043310218j))*x[2]
+            ref[(0, 3)]+=(-0.419180237644-0.119779309087j)*x_ref[2]**o + ((0.684414841175-0.837043310218j))*x_ref[2]
+            arg[(1, 0)]+=(0.981948483487+0.413010347024j)*x[2]**o + ((-0.562023471122+0.56647096029j))*x[2]
+            ref[(1, 0)]+=(0.981948483487+0.413010347024j)*x_ref[2]**o + ((-0.562023471122+0.56647096029j))*x_ref[2]
+            arg[(1, 1)]+=(-0.0232803567908-0.103955038585j)*x[2]**o + ((-0.395748819715+0.961999467951j))*x[2]
+            ref[(1, 1)]+=(-0.0232803567908-0.103955038585j)*x_ref[2]**o + ((-0.395748819715+0.961999467951j))*x_ref[2]
+            arg[(1, 2)]+=(-0.00347287462776+0.00749785352454j)*x[2]**o + ((0.129887765857+0.0172269943391j))*x[2]
+            ref[(1, 2)]+=(-0.00347287462776+0.00749785352454j)*x_ref[2]**o + ((0.129887765857+0.0172269943391j))*x_ref[2]
+            arg[(1, 3)]+=(0.985959278078-0.0113275811921j)*x[2]**o + ((0.299320281377+0.598847501802j))*x[2]
+            ref[(1, 3)]+=(0.985959278078-0.0113275811921j)*x_ref[2]**o + ((0.299320281377+0.598847501802j))*x_ref[2]
+            arg[(2, 0)]+=(0.91619255961-0.130890468115j)*x[2]**o + ((0.927388394125-0.807659731061j))*x[2]
+            ref[(2, 0)]+=(0.91619255961-0.130890468115j)*x_ref[2]**o + ((0.927388394125-0.807659731061j))*x_ref[2]
+            arg[(2, 1)]+=(-0.425012191097-0.340465054884j)*x[2]**o + ((-0.316262753135+0.53620927297j))*x[2]
+            ref[(2, 1)]+=(-0.425012191097-0.340465054884j)*x_ref[2]**o + ((-0.316262753135+0.53620927297j))*x_ref[2]
+            arg[(2, 2)]+=(-0.576474651132+0.992102256688j)*x[2]**o + ((0.776023543377+0.382767229615j))*x[2]
+            ref[(2, 2)]+=(-0.576474651132+0.992102256688j)*x_ref[2]**o + ((0.776023543377+0.382767229615j))*x_ref[2]
+            arg[(2, 3)]+=(-0.998808433519-0.315980983576j)*x[2]**o + ((0.291302056215+0.780530632911j))*x[2]
+            ref[(2, 3)]+=(-0.998808433519-0.315980983576j)*x_ref[2]**o + ((0.291302056215+0.780530632911j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2),w)
+        ref = Data(0,(3, 3, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.725824254027+0.0223481366607j)*x[0]**o + ((0.187283044099+0.396946763571j))*x[0] + ((-0.282603015406-0.545326442199j))*x[1]**o + ((-0.324795916892-0.341307471436j))*x[1]
+        ref[(0, 0, 0)]=(-0.725824254027+0.0223481366607j)*x_ref[0]**o + ((0.187283044099+0.396946763571j))*x_ref[0] + ((-0.282603015406-0.545326442199j))*x_ref[1]**o + ((-0.324795916892-0.341307471436j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.601443103712-0.355791877135j)*x[0]**o + ((0.325171507069-0.0914702219585j))*x[0] + ((0.00189287954367-0.54973698791j))*x[1]**o + ((0.623674764018-0.487865243759j))*x[1]
+        ref[(0, 0, 1)]=(0.601443103712-0.355791877135j)*x_ref[0]**o + ((0.325171507069-0.0914702219585j))*x_ref[0] + ((0.00189287954367-0.54973698791j))*x_ref[1]**o + ((0.623674764018-0.487865243759j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.073461465887-0.348047581553j)*x[0]**o + ((-0.489766490302-0.0617978186191j))*x[0] + ((-0.812456427618-0.185457673759j))*x[1]**o + ((0.827881029805-0.107406206923j))*x[1]
+        ref[(0, 1, 0)]=(-0.073461465887-0.348047581553j)*x_ref[0]**o + ((-0.489766490302-0.0617978186191j))*x_ref[0] + ((-0.812456427618-0.185457673759j))*x_ref[1]**o + ((0.827881029805-0.107406206923j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.598124787201-0.0213727220615j)*x[0]**o + ((0.979586437731-0.689181604125j))*x[0] + ((-0.721286824961+0.0481494323956j))*x[1]**o + ((0.827608472032+0.696423517471j))*x[1]
+        ref[(0, 1, 1)]=(0.598124787201-0.0213727220615j)*x_ref[0]**o + ((0.979586437731-0.689181604125j))*x_ref[0] + ((-0.721286824961+0.0481494323956j))*x_ref[1]**o + ((0.827608472032+0.696423517471j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.573436591573+0.915425400909j)*x[0]**o + ((0.847567338752-0.236044371676j))*x[0] + ((0.318365464481+0.315554994667j))*x[1]**o + ((-0.407010886321-0.208455624011j))*x[1]
+        ref[(0, 2, 0)]=(0.573436591573+0.915425400909j)*x_ref[0]**o + ((0.847567338752-0.236044371676j))*x_ref[0] + ((0.318365464481+0.315554994667j))*x_ref[1]**o + ((-0.407010886321-0.208455624011j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.253711003393-0.676081243297j)*x[0]**o + ((-0.920007498732+0.844545743582j))*x[0] + ((0.84660323487-0.803480636285j))*x[1]**o + ((0.296985908471-0.902534420402j))*x[1]
+        ref[(0, 2, 1)]=(-0.253711003393-0.676081243297j)*x_ref[0]**o + ((-0.920007498732+0.844545743582j))*x_ref[0] + ((0.84660323487-0.803480636285j))*x_ref[1]**o + ((0.296985908471-0.902534420402j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.742214449063-0.727823427612j)*x[0]**o + ((0.0970624924868+0.485143661269j))*x[0] + ((-0.330231073158+0.896101130959j))*x[1]**o + ((-0.0518050844515-0.00534234029551j))*x[1]
+        ref[(1, 0, 0)]=(0.742214449063-0.727823427612j)*x_ref[0]**o + ((0.0970624924868+0.485143661269j))*x_ref[0] + ((-0.330231073158+0.896101130959j))*x_ref[1]**o + ((-0.0518050844515-0.00534234029551j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.449212161492+0.112437706244j)*x[0]**o + ((0.466716671114+0.256262581804j))*x[0] + ((-0.757263221316+0.183370516057j))*x[1]**o + ((0.685041228018-0.45801604248j))*x[1]
+        ref[(1, 0, 1)]=(0.449212161492+0.112437706244j)*x_ref[0]**o + ((0.466716671114+0.256262581804j))*x_ref[0] + ((-0.757263221316+0.183370516057j))*x_ref[1]**o + ((0.685041228018-0.45801604248j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.116535798376+0.437065505443j)*x[0]**o + ((-0.765526797202+0.398669158939j))*x[0] + ((0.969746114596+0.585550451454j))*x[1]**o + ((0.344823622285+0.370797233974j))*x[1]
+        ref[(1, 1, 0)]=(-0.116535798376+0.437065505443j)*x_ref[0]**o + ((-0.765526797202+0.398669158939j))*x_ref[0] + ((0.969746114596+0.585550451454j))*x_ref[1]**o + ((0.344823622285+0.370797233974j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.38029262361+0.55398876671j)*x[0]**o + ((-0.89179531406-0.959214043234j))*x[0] + ((0.950252845583-0.978305636455j))*x[1]**o + ((0.904688744835+0.106237944497j))*x[1]
+        ref[(1, 1, 1)]=(-0.38029262361+0.55398876671j)*x_ref[0]**o + ((-0.89179531406-0.959214043234j))*x_ref[0] + ((0.950252845583-0.978305636455j))*x_ref[1]**o + ((0.904688744835+0.106237944497j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.206658019121+0.10689676923j)*x[0]**o + ((-0.654824321076+0.745034453887j))*x[0] + ((-0.671472948802+0.695589772139j))*x[1]**o + ((-0.298457895731-0.611839013929j))*x[1]
+        ref[(1, 2, 0)]=(-0.206658019121+0.10689676923j)*x_ref[0]**o + ((-0.654824321076+0.745034453887j))*x_ref[0] + ((-0.671472948802+0.695589772139j))*x_ref[1]**o + ((-0.298457895731-0.611839013929j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.2412457278-0.963654159874j)*x[0]**o + ((0.663748159867-0.130362966711j))*x[0] + ((-0.649471009861+0.147918630919j))*x[1]**o + ((0.569438792648+0.269581323476j))*x[1]
+        ref[(1, 2, 1)]=(-0.2412457278-0.963654159874j)*x_ref[0]**o + ((0.663748159867-0.130362966711j))*x_ref[0] + ((-0.649471009861+0.147918630919j))*x_ref[1]**o + ((0.569438792648+0.269581323476j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.834449598415-0.867339598543j)*x[0]**o + ((0.707482281547-0.0470595808183j))*x[0] + ((-0.524425291801+0.038906551501j))*x[1]**o + ((-0.052232044959-0.318209590337j))*x[1]
+        ref[(2, 0, 0)]=(-0.834449598415-0.867339598543j)*x_ref[0]**o + ((0.707482281547-0.0470595808183j))*x_ref[0] + ((-0.524425291801+0.038906551501j))*x_ref[1]**o + ((-0.052232044959-0.318209590337j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.55157052585+0.434322470082j)*x[0]**o + ((-0.823467668651+0.483570763474j))*x[0] + ((0.362895536974+0.0172261772476j))*x[1]**o + ((-0.86290604339+0.756496980943j))*x[1]
+        ref[(2, 0, 1)]=(0.55157052585+0.434322470082j)*x_ref[0]**o + ((-0.823467668651+0.483570763474j))*x_ref[0] + ((0.362895536974+0.0172261772476j))*x_ref[1]**o + ((-0.86290604339+0.756496980943j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.243689150972+0.531077794281j)*x[0]**o + ((-0.734268850751+0.0704598286456j))*x[0] + ((0.394117065498-0.620854822993j))*x[1]**o + ((-0.657665835409+0.843241070364j))*x[1]
+        ref[(2, 1, 0)]=(0.243689150972+0.531077794281j)*x_ref[0]**o + ((-0.734268850751+0.0704598286456j))*x_ref[0] + ((0.394117065498-0.620854822993j))*x_ref[1]**o + ((-0.657665835409+0.843241070364j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.62374920892-0.385418186842j)*x[0]**o + ((-0.0819494304163+0.505542069754j))*x[0] + ((0.245213403785+0.627070980431j))*x[1]**o + ((0.225557221746+0.0103810204303j))*x[1]
+        ref[(2, 1, 1)]=(-0.62374920892-0.385418186842j)*x_ref[0]**o + ((-0.0819494304163+0.505542069754j))*x_ref[0] + ((0.245213403785+0.627070980431j))*x_ref[1]**o + ((0.225557221746+0.0103810204303j))*x_ref[1]
+        arg[(2, 2, 0)]=(0.451845450928-0.0400764626011j)*x[0]**o + ((0.967244259091+0.455803123253j))*x[0] + ((0.990350319929+0.224372573614j))*x[1]**o + ((-0.288034715752-0.104062724994j))*x[1]
+        ref[(2, 2, 0)]=(0.451845450928-0.0400764626011j)*x_ref[0]**o + ((0.967244259091+0.455803123253j))*x_ref[0] + ((0.990350319929+0.224372573614j))*x_ref[1]**o + ((-0.288034715752-0.104062724994j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.87904107313-0.484603970468j)*x[0]**o + ((0.681553352284-0.234916068063j))*x[0] + ((0.616106327535+0.696980247699j))*x[1]**o + ((0.657107416409+0.149143954253j))*x[1]
+        ref[(2, 2, 1)]=(-0.87904107313-0.484603970468j)*x_ref[0]**o + ((0.681553352284-0.234916068063j))*x_ref[0] + ((0.616106327535+0.696980247699j))*x_ref[1]**o + ((0.657107416409+0.149143954253j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.422405583781-0.663197812272j)*x[2]**o + ((0.065593859641+0.916015903778j))*x[2]
+            ref[(0, 0, 0)]+=(0.422405583781-0.663197812272j)*x_ref[2]**o + ((0.065593859641+0.916015903778j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.64146724611+0.993466786885j)*x[2]**o + ((-0.834848467377-0.434896681493j))*x[2]
+            ref[(0, 0, 1)]+=(-0.64146724611+0.993466786885j)*x_ref[2]**o + ((-0.834848467377-0.434896681493j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.691314144675+0.0769054148557j)*x[2]**o + ((0.192225247773+0.0563950291752j))*x[2]
+            ref[(0, 1, 0)]+=(0.691314144675+0.0769054148557j)*x_ref[2]**o + ((0.192225247773+0.0563950291752j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.157893396232-0.234934571707j)*x[2]**o + ((-0.497057313122-0.0186347653985j))*x[2]
+            ref[(0, 1, 1)]+=(-0.157893396232-0.234934571707j)*x_ref[2]**o + ((-0.497057313122-0.0186347653985j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.619983514096+0.717859203759j)*x[2]**o + ((0.106939678597+0.934559666534j))*x[2]
+            ref[(0, 2, 0)]+=(-0.619983514096+0.717859203759j)*x_ref[2]**o + ((0.106939678597+0.934559666534j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.342379866067+0.804715076603j)*x[2]**o + ((-0.51396525371+0.0208193209238j))*x[2]
+            ref[(0, 2, 1)]+=(0.342379866067+0.804715076603j)*x_ref[2]**o + ((-0.51396525371+0.0208193209238j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.206156014432+0.48078792289j)*x[2]**o + ((0.268032471099-0.770128723168j))*x[2]
+            ref[(1, 0, 0)]+=(0.206156014432+0.48078792289j)*x_ref[2]**o + ((0.268032471099-0.770128723168j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.734339320403+0.786990370635j)*x[2]**o + ((-0.549477978467-0.536210028186j))*x[2]
+            ref[(1, 0, 1)]+=(0.734339320403+0.786990370635j)*x_ref[2]**o + ((-0.549477978467-0.536210028186j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.915248804054-0.931475014481j)*x[2]**o + ((-0.221181837398+0.648474472678j))*x[2]
+            ref[(1, 1, 0)]+=(-0.915248804054-0.931475014481j)*x_ref[2]**o + ((-0.221181837398+0.648474472678j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.405925438521-0.472010844139j)*x[2]**o + ((-0.346548675077-0.178580498143j))*x[2]
+            ref[(1, 1, 1)]+=(0.405925438521-0.472010844139j)*x_ref[2]**o + ((-0.346548675077-0.178580498143j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.974914238512-0.45389777825j)*x[2]**o + ((-0.293817935615+0.455133347536j))*x[2]
+            ref[(1, 2, 0)]+=(-0.974914238512-0.45389777825j)*x_ref[2]**o + ((-0.293817935615+0.455133347536j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.0591572406743-0.749783723956j)*x[2]**o + ((-0.0248729455042+0.986927963758j))*x[2]
+            ref[(1, 2, 1)]+=(-0.0591572406743-0.749783723956j)*x_ref[2]**o + ((-0.0248729455042+0.986927963758j))*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.358048755473+0.220672492304j)*x[2]**o + ((0.419011643763+0.359482501952j))*x[2]
+            ref[(2, 0, 0)]+=(-0.358048755473+0.220672492304j)*x_ref[2]**o + ((0.419011643763+0.359482501952j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.778049436652-0.528538720688j)*x[2]**o + ((0.136583176122+0.204812404214j))*x[2]
+            ref[(2, 0, 1)]+=(0.778049436652-0.528538720688j)*x_ref[2]**o + ((0.136583176122+0.204812404214j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.715962549618-0.678467989085j)*x[2]**o + ((0.597761793924-0.966177929606j))*x[2]
+            ref[(2, 1, 0)]+=(-0.715962549618-0.678467989085j)*x_ref[2]**o + ((0.597761793924-0.966177929606j))*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.136075867311-0.780445503946j)*x[2]**o + ((-0.619946405758+0.653538054116j))*x[2]
+            ref[(2, 1, 1)]+=(-0.136075867311-0.780445503946j)*x_ref[2]**o + ((-0.619946405758+0.653538054116j))*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.0269137586336-0.837205615862j)*x[2]**o + ((-0.490207553116+0.869319875355j))*x[2]
+            ref[(2, 2, 0)]+=(-0.0269137586336-0.837205615862j)*x_ref[2]**o + ((-0.490207553116+0.869319875355j))*x_ref[2]
+            arg[(2, 2, 1)]+=(-0.721894062132+0.726805088109j)*x[2]**o + ((-0.557530746422+0.283158819515j))*x[2]
+            ref[(2, 2, 1)]+=(-0.721894062132+0.726805088109j)*x_ref[2]**o + ((-0.557530746422+0.283158819515j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2, 4),w)
+        ref = Data(0,(2, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.114725515543+0.928122466098j)*x[0]**o + ((-0.0568736747077+0.618409137241j))*x[0] + ((-0.157299057084-0.292815638866j))*x[1]**o + ((-0.405683048482-0.985407166985j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.114725515543+0.928122466098j)*x_ref[0]**o + ((-0.0568736747077+0.618409137241j))*x_ref[0] + ((-0.157299057084-0.292815638866j))*x_ref[1]**o + ((-0.405683048482-0.985407166985j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.348051041881+0.437034784668j)*x[0]**o + ((-0.269906157335+0.792980856208j))*x[0] + ((0.743883621669-0.0449076968555j))*x[1]**o + ((-0.599727003581+0.91650827878j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.348051041881+0.437034784668j)*x_ref[0]**o + ((-0.269906157335+0.792980856208j))*x_ref[0] + ((0.743883621669-0.0449076968555j))*x_ref[1]**o + ((-0.599727003581+0.91650827878j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.280798609743-0.822300441169j)*x[0]**o + ((-0.934900109098-0.477644697501j))*x[0] + ((-0.990868198334+0.518678702286j))*x[1]**o + ((0.482764453356-0.457737593544j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.280798609743-0.822300441169j)*x_ref[0]**o + ((-0.934900109098-0.477644697501j))*x_ref[0] + ((-0.990868198334+0.518678702286j))*x_ref[1]**o + ((0.482764453356-0.457737593544j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.427500704357+0.247718064805j)*x[0]**o + ((0.322127255481+0.653930182469j))*x[0] + ((0.283107891345+0.455928758311j))*x[1]**o + ((-0.845310627563+0.8747017466j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.427500704357+0.247718064805j)*x_ref[0]**o + ((0.322127255481+0.653930182469j))*x_ref[0] + ((0.283107891345+0.455928758311j))*x_ref[1]**o + ((-0.845310627563+0.8747017466j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.982269698617+0.88144275506j)*x[0]**o + ((-0.81291794952-0.95920707061j))*x[0] + ((0.732927715955+0.537700949767j))*x[1]**o + ((0.0745147167368-0.23723377643j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.982269698617+0.88144275506j)*x_ref[0]**o + ((-0.81291794952-0.95920707061j))*x_ref[0] + ((0.732927715955+0.537700949767j))*x_ref[1]**o + ((0.0745147167368-0.23723377643j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.083626617293-0.294514358604j)*x[0]**o + ((-0.558880675279-0.813013310362j))*x[0] + ((-0.512476389747+0.987028790483j))*x[1]**o + ((-0.559340197846+0.683181546976j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.083626617293-0.294514358604j)*x_ref[0]**o + ((-0.558880675279-0.813013310362j))*x_ref[0] + ((-0.512476389747+0.987028790483j))*x_ref[1]**o + ((-0.559340197846+0.683181546976j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.85062126996-0.237878029766j)*x[0]**o + ((-0.46034403678+0.175592609934j))*x[0] + ((0.249448923161+0.312227200654j))*x[1]**o + ((-0.705802032501+0.793353090463j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.85062126996-0.237878029766j)*x_ref[0]**o + ((-0.46034403678+0.175592609934j))*x_ref[0] + ((0.249448923161+0.312227200654j))*x_ref[1]**o + ((-0.705802032501+0.793353090463j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.72654035193-0.865037261658j)*x[0]**o + ((-0.204149213712+0.647119746357j))*x[0] + ((0.647199934405+0.160624333329j))*x[1]**o + ((0.803337341941+0.945944256063j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.72654035193-0.865037261658j)*x_ref[0]**o + ((-0.204149213712+0.647119746357j))*x_ref[0] + ((0.647199934405+0.160624333329j))*x_ref[1]**o + ((0.803337341941+0.945944256063j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.849768691207+0.998648138578j)*x[0]**o + ((0.205942453459-0.811800830999j))*x[0] + ((0.289807590158-0.657589055184j))*x[1]**o + ((-0.141163678277+0.114525538845j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.849768691207+0.998648138578j)*x_ref[0]**o + ((0.205942453459-0.811800830999j))*x_ref[0] + ((0.289807590158-0.657589055184j))*x_ref[1]**o + ((-0.141163678277+0.114525538845j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.611358694164-0.62380380588j)*x[0]**o + ((-0.12781548157-0.527542244913j))*x[0] + ((-0.9548543037+0.957372369971j))*x[1]**o + ((0.435698126664-0.648202717065j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.611358694164-0.62380380588j)*x_ref[0]**o + ((-0.12781548157-0.527542244913j))*x_ref[0] + ((-0.9548543037+0.957372369971j))*x_ref[1]**o + ((0.435698126664-0.648202717065j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.557095890041+0.98302562902j)*x[0]**o + ((0.175762541109+0.523519512369j))*x[0] + ((-0.311725247128-0.991978022364j))*x[1]**o + ((0.579977005598-0.941006778573j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.557095890041+0.98302562902j)*x_ref[0]**o + ((0.175762541109+0.523519512369j))*x_ref[0] + ((-0.311725247128-0.991978022364j))*x_ref[1]**o + ((0.579977005598-0.941006778573j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.464256417997+0.693321207869j)*x[0]**o + ((0.0546901427661+0.088078477109j))*x[0] + ((0.736611098154+0.018184191512j))*x[1]**o + ((-0.0602558020606-0.337439687811j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.464256417997+0.693321207869j)*x_ref[0]**o + ((0.0546901427661+0.088078477109j))*x_ref[0] + ((0.736611098154+0.018184191512j))*x_ref[1]**o + ((-0.0602558020606-0.337439687811j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.4458958615-0.559961789472j)*x[0]**o + ((0.247726897371-0.605745823616j))*x[0] + ((-0.210738234897-0.513081687385j))*x[1]**o + ((-0.670353324234+0.465273661129j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.4458958615-0.559961789472j)*x_ref[0]**o + ((0.247726897371-0.605745823616j))*x_ref[0] + ((-0.210738234897-0.513081687385j))*x_ref[1]**o + ((-0.670353324234+0.465273661129j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.643687065142+0.613888654604j)*x[0]**o + ((0.294655769541-0.0205677927554j))*x[0] + ((-0.662340508634-0.215887568415j))*x[1]**o + ((0.195595472693-0.0481179514715j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.643687065142+0.613888654604j)*x_ref[0]**o + ((0.294655769541-0.0205677927554j))*x_ref[0] + ((-0.662340508634-0.215887568415j))*x_ref[1]**o + ((0.195595472693-0.0481179514715j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.261123934089-0.227801449834j)*x[0]**o + ((-0.907615723371+0.280130659331j))*x[0] + ((-0.902848136925+0.667535480711j))*x[1]**o + ((-0.662561540458-0.552775627091j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.261123934089-0.227801449834j)*x_ref[0]**o + ((-0.907615723371+0.280130659331j))*x_ref[0] + ((-0.902848136925+0.667535480711j))*x_ref[1]**o + ((-0.662561540458-0.552775627091j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(-0.504566363978+0.218933803438j)*x[0]**o + ((-0.12684423889-0.349665211572j))*x[0] + ((0.405358181793-0.0664951587793j))*x[1]**o + ((-0.80819824647+0.645893941436j))*x[1]
+        ref[(0, 1, 1, 3)]=(-0.504566363978+0.218933803438j)*x_ref[0]**o + ((-0.12684423889-0.349665211572j))*x_ref[0] + ((0.405358181793-0.0664951587793j))*x_ref[1]**o + ((-0.80819824647+0.645893941436j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.893667297892+0.455590276909j)*x[0]**o + ((0.19230275022+0.761964976555j))*x[0] + ((-0.837092901394+0.697824335494j))*x[1]**o + ((0.937147375341-0.140934158247j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.893667297892+0.455590276909j)*x_ref[0]**o + ((0.19230275022+0.761964976555j))*x_ref[0] + ((-0.837092901394+0.697824335494j))*x_ref[1]**o + ((0.937147375341-0.140934158247j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.0960138770837-0.225250384226j)*x[0]**o + ((0.384993354646-0.257557329975j))*x[0] + ((-0.590048520234-0.806385148105j))*x[1]**o + ((-0.928827521559+0.0222324556425j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.0960138770837-0.225250384226j)*x_ref[0]**o + ((0.384993354646-0.257557329975j))*x_ref[0] + ((-0.590048520234-0.806385148105j))*x_ref[1]**o + ((-0.928827521559+0.0222324556425j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.976738989978+0.276541347369j)*x[0]**o + ((-0.521741843074-0.253049509527j))*x[0] + ((0.879468802178+0.878289913901j))*x[1]**o + ((-0.406423021678+0.376304871325j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.976738989978+0.276541347369j)*x_ref[0]**o + ((-0.521741843074-0.253049509527j))*x_ref[0] + ((0.879468802178+0.878289913901j))*x_ref[1]**o + ((-0.406423021678+0.376304871325j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.650385630764-0.78092453253j)*x[0]**o + ((0.690623969793-0.291955754451j))*x[0] + ((-0.648765155955-0.235994997761j))*x[1]**o + ((0.804956359618+0.50481170975j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.650385630764-0.78092453253j)*x_ref[0]**o + ((0.690623969793-0.291955754451j))*x_ref[0] + ((-0.648765155955-0.235994997761j))*x_ref[1]**o + ((0.804956359618+0.50481170975j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.900209191324+0.504902383036j)*x[0]**o + ((-0.592392476932+0.478514466518j))*x[0] + ((0.612669351889+0.464112534905j))*x[1]**o + ((0.595684562034+0.0095672658207j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.900209191324+0.504902383036j)*x_ref[0]**o + ((-0.592392476932+0.478514466518j))*x_ref[0] + ((0.612669351889+0.464112534905j))*x_ref[1]**o + ((0.595684562034+0.0095672658207j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.148662495525+0.10543353726j)*x[0]**o + ((0.850421776006-0.66554577768j))*x[0] + ((-0.656179930687+0.0848865881548j))*x[1]**o + ((-0.0417865447546-0.339269332567j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.148662495525+0.10543353726j)*x_ref[0]**o + ((0.850421776006-0.66554577768j))*x_ref[0] + ((-0.656179930687+0.0848865881548j))*x_ref[1]**o + ((-0.0417865447546-0.339269332567j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.935721645685+0.538918691125j)*x[0]**o + ((0.702068901709+0.157646550996j))*x[0] + ((0.807083413159+0.576245644849j))*x[1]**o + ((0.408116260296+0.882758147188j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.935721645685+0.538918691125j)*x_ref[0]**o + ((0.702068901709+0.157646550996j))*x_ref[0] + ((0.807083413159+0.576245644849j))*x_ref[1]**o + ((0.408116260296+0.882758147188j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(0.0247617811861+0.769769794816j)*x[0]**o + ((0.749452360553+0.103388150195j))*x[0] + ((-0.629368515783-0.44408270839j))*x[1]**o + ((-0.383698888814-0.791585488714j))*x[1]
+        ref[(1, 0, 1, 3)]=(0.0247617811861+0.769769794816j)*x_ref[0]**o + ((0.749452360553+0.103388150195j))*x_ref[0] + ((-0.629368515783-0.44408270839j))*x_ref[1]**o + ((-0.383698888814-0.791585488714j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.328504662377-0.329082049827j)*x[0]**o + ((0.749661712857-0.98270198311j))*x[0] + ((-0.345130351813-0.648504848612j))*x[1]**o + ((0.923677331547+0.709828851071j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.328504662377-0.329082049827j)*x_ref[0]**o + ((0.749661712857-0.98270198311j))*x_ref[0] + ((-0.345130351813-0.648504848612j))*x_ref[1]**o + ((0.923677331547+0.709828851071j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.350429422568-0.0422890337551j)*x[0]**o + ((-0.806207522995+0.630910934012j))*x[0] + ((-0.234622680712-0.387139815272j))*x[1]**o + ((-0.0979446795384+0.363275822104j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.350429422568-0.0422890337551j)*x_ref[0]**o + ((-0.806207522995+0.630910934012j))*x_ref[0] + ((-0.234622680712-0.387139815272j))*x_ref[1]**o + ((-0.0979446795384+0.363275822104j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.532594774985-0.378773096997j)*x[0]**o + ((0.526010200015+0.966603579601j))*x[0] + ((0.325565850236-0.855720431288j))*x[1]**o + ((0.772262739423-0.577183225356j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.532594774985-0.378773096997j)*x_ref[0]**o + ((0.526010200015+0.966603579601j))*x_ref[0] + ((0.325565850236-0.855720431288j))*x_ref[1]**o + ((0.772262739423-0.577183225356j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(-0.558611820889+0.60865755408j)*x[0]**o + ((-0.0531600211264-0.189404265514j))*x[0] + ((0.555856397677+0.399075214194j))*x[1]**o + ((0.0280764538481+0.934367808921j))*x[1]
+        ref[(1, 1, 0, 3)]=(-0.558611820889+0.60865755408j)*x_ref[0]**o + ((-0.0531600211264-0.189404265514j))*x_ref[0] + ((0.555856397677+0.399075214194j))*x_ref[1]**o + ((0.0280764538481+0.934367808921j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.78224697495-0.293700280307j)*x[0]**o + ((0.71062427569+0.0501722058516j))*x[0] + ((0.513089743661-0.634313965103j))*x[1]**o + ((-0.586569331114-0.581144799824j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.78224697495-0.293700280307j)*x_ref[0]**o + ((0.71062427569+0.0501722058516j))*x_ref[0] + ((0.513089743661-0.634313965103j))*x_ref[1]**o + ((-0.586569331114-0.581144799824j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.146823527438+0.466324826052j)*x[0]**o + ((-0.881963814875+0.911462663906j))*x[0] + ((-0.171180255714+0.0106477153952j))*x[1]**o + ((0.796603319008+0.435529470664j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.146823527438+0.466324826052j)*x_ref[0]**o + ((-0.881963814875+0.911462663906j))*x_ref[0] + ((-0.171180255714+0.0106477153952j))*x_ref[1]**o + ((0.796603319008+0.435529470664j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.546697623046+0.158164370118j)*x[0]**o + ((0.572544941584-0.180394193342j))*x[0] + ((-0.683271428721+0.0543250209686j))*x[1]**o + ((0.191526076855+0.93906532561j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.546697623046+0.158164370118j)*x_ref[0]**o + ((0.572544941584-0.180394193342j))*x_ref[0] + ((-0.683271428721+0.0543250209686j))*x_ref[1]**o + ((0.191526076855+0.93906532561j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(0.63754608567-0.654790255743j)*x[0]**o + ((-0.397887819991+0.610445259088j))*x[0] + ((-0.379343748637-0.267536871561j))*x[1]**o + ((0.908539916416+0.341139545041j))*x[1]
+        ref[(1, 1, 1, 3)]=(0.63754608567-0.654790255743j)*x_ref[0]**o + ((-0.397887819991+0.610445259088j))*x_ref[0] + ((-0.379343748637-0.267536871561j))*x_ref[1]**o + ((0.908539916416+0.341139545041j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.784659932736-0.437667974379j)*x[2]**o + ((-0.918600893369+0.389518840837j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.784659932736-0.437667974379j)*x_ref[2]**o + ((-0.918600893369+0.389518840837j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.269159906986+0.849011910974j)*x[2]**o + ((0.031153315318-0.431388096226j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.269159906986+0.849011910974j)*x_ref[2]**o + ((0.031153315318-0.431388096226j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.840221671772-0.0466740708329j)*x[2]**o + ((-0.444855807113+0.727223705128j))*x[2]
+            ref[(0, 0, 0, 2)]+=(0.840221671772-0.0466740708329j)*x_ref[2]**o + ((-0.444855807113+0.727223705128j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(-0.108944819159+0.63341145059j)*x[2]**o + ((-0.445212402793+0.549012820825j))*x[2]
+            ref[(0, 0, 0, 3)]+=(-0.108944819159+0.63341145059j)*x_ref[2]**o + ((-0.445212402793+0.549012820825j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.87953447987-0.214175186352j)*x[2]**o + ((-0.1853916633+0.338571592902j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.87953447987-0.214175186352j)*x_ref[2]**o + ((-0.1853916633+0.338571592902j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.820503566288-0.976292892966j)*x[2]**o + ((0.887614736058+0.927942655731j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.820503566288-0.976292892966j)*x_ref[2]**o + ((0.887614736058+0.927942655731j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.609629856356+0.513355412595j)*x[2]**o + ((0.830929915126-0.902415191335j))*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.609629856356+0.513355412595j)*x_ref[2]**o + ((0.830929915126-0.902415191335j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.109734568003-0.606166301974j)*x[2]**o + ((-0.956809675371-0.529063307817j))*x[2]
+            ref[(0, 0, 1, 3)]+=(0.109734568003-0.606166301974j)*x_ref[2]**o + ((-0.956809675371-0.529063307817j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.328439431738-0.747099801767j)*x[2]**o + ((-0.515835167512-0.599920816106j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.328439431738-0.747099801767j)*x_ref[2]**o + ((-0.515835167512-0.599920816106j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.370407367606+0.381609147231j)*x[2]**o + ((-0.475504385919+0.730008666746j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.370407367606+0.381609147231j)*x_ref[2]**o + ((-0.475504385919+0.730008666746j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.482494829609+0.60662618707j)*x[2]**o + ((-0.707043778364+0.176180349254j))*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.482494829609+0.60662618707j)*x_ref[2]**o + ((-0.707043778364+0.176180349254j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.504177415854-0.798565475761j)*x[2]**o + ((-0.237500588751+0.0113648013855j))*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.504177415854-0.798565475761j)*x_ref[2]**o + ((-0.237500588751+0.0113648013855j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.811225655098+0.188490867833j)*x[2]**o + ((0.241780573798-0.0823758135031j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.811225655098+0.188490867833j)*x_ref[2]**o + ((0.241780573798-0.0823758135031j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.0932437121529+0.564078451211j)*x[2]**o + ((-0.742545014477-0.665742718437j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.0932437121529+0.564078451211j)*x_ref[2]**o + ((-0.742545014477-0.665742718437j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.656569537498-0.276502365194j)*x[2]**o + ((0.627575409658+0.976738537114j))*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.656569537498-0.276502365194j)*x_ref[2]**o + ((0.627575409658+0.976738537114j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.274598224374+0.970286285896j)*x[2]**o + ((-0.466324477282+0.129974008858j))*x[2]
+            ref[(0, 1, 1, 3)]+=(0.274598224374+0.970286285896j)*x_ref[2]**o + ((-0.466324477282+0.129974008858j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.93427287526+0.999045722511j)*x[2]**o + ((-0.213104863349-0.149965463046j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.93427287526+0.999045722511j)*x_ref[2]**o + ((-0.213104863349-0.149965463046j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.312538250832-0.555694160021j)*x[2]**o + ((0.456329647174+0.935977226843j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.312538250832-0.555694160021j)*x_ref[2]**o + ((0.456329647174+0.935977226843j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.641624154737+0.978075939377j)*x[2]**o + ((-0.813143836804+0.359020398709j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.641624154737+0.978075939377j)*x_ref[2]**o + ((-0.813143836804+0.359020398709j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.447770580533-0.626039253492j)*x[2]**o + ((0.240326011506+0.674313008311j))*x[2]
+            ref[(1, 0, 0, 3)]+=(0.447770580533-0.626039253492j)*x_ref[2]**o + ((0.240326011506+0.674313008311j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.302203536709+0.129155315603j)*x[2]**o + ((-0.901817217595-0.267640886973j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.302203536709+0.129155315603j)*x_ref[2]**o + ((-0.901817217595-0.267640886973j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.38735191228+0.912379201937j)*x[2]**o + ((0.65603330033+0.219414733185j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.38735191228+0.912379201937j)*x_ref[2]**o + ((0.65603330033+0.219414733185j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.293918749612+0.0551775188006j)*x[2]**o + ((0.620297146884-0.280178152022j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.293918749612+0.0551775188006j)*x_ref[2]**o + ((0.620297146884-0.280178152022j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(0.274868652065-0.0649074868959j)*x[2]**o + ((-0.56217262583-0.323215569532j))*x[2]
+            ref[(1, 0, 1, 3)]+=(0.274868652065-0.0649074868959j)*x_ref[2]**o + ((-0.56217262583-0.323215569532j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.262993838235+0.650174049004j)*x[2]**o + ((-0.704336852219+0.331669591908j))*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.262993838235+0.650174049004j)*x_ref[2]**o + ((-0.704336852219+0.331669591908j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.579101381252+0.509113463283j)*x[2]**o + ((-0.442821162362-0.398655666814j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.579101381252+0.509113463283j)*x_ref[2]**o + ((-0.442821162362-0.398655666814j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.782849505144+0.468692093465j)*x[2]**o + ((-0.774856311592+0.710549501958j))*x[2]
+            ref[(1, 1, 0, 2)]+=(0.782849505144+0.468692093465j)*x_ref[2]**o + ((-0.774856311592+0.710549501958j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(0.198756579849-0.476698932113j)*x[2]**o + ((0.0969044933985-0.64409053239j))*x[2]
+            ref[(1, 1, 0, 3)]+=(0.198756579849-0.476698932113j)*x_ref[2]**o + ((0.0969044933985-0.64409053239j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.0670365403996+0.229802917839j)*x[2]**o + ((0.40379765928-0.937477125262j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.0670365403996+0.229802917839j)*x_ref[2]**o + ((0.40379765928-0.937477125262j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.174552244159-0.394127721531j)*x[2]**o + ((-0.650845521468+0.64386021781j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.174552244159-0.394127721531j)*x_ref[2]**o + ((-0.650845521468+0.64386021781j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.601587584299+0.934602250544j)*x[2]**o + ((0.309816810617+0.834085324553j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.601587584299+0.934602250544j)*x_ref[2]**o + ((0.309816810617+0.834085324553j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.670917903855+0.880078777014j)*x[2]**o + ((-0.651392299536+0.357219729909j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.670917903855+0.880078777014j)*x_ref[2]**o + ((-0.651392299536+0.357219729909j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.156941710275+0.0623765769126j)*x[0] + ((-0.872746311733+0.102054634418j))*x[1]
+        ref=(0.156941710275+0.0623765769126j)*x_ref[0] + ((-0.872746311733+0.102054634418j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.319054368643-0.556530756211j))*x[2]
+            ref+=((-0.319054368643-0.556530756211j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.135160644208-0.597276466707j)*x[0] + ((-0.210516663406-0.541943373673j))*x[1]
+        ref[(0,)]=(-0.135160644208-0.597276466707j)*x_ref[0] + ((-0.210516663406-0.541943373673j))*x_ref[1]
+        arg[(1,)]=(-0.121972647485-0.456423015611j)*x[0] + ((-0.117528367393+0.339055172762j))*x[1]
+        ref[(1,)]=(-0.121972647485-0.456423015611j)*x_ref[0] + ((-0.117528367393+0.339055172762j))*x_ref[1]
+        arg[(2,)]=(-0.770928542836-0.559507792557j)*x[0] + ((-0.532215853173-0.645454816391j))*x[1]
+        ref[(2,)]=(-0.770928542836-0.559507792557j)*x_ref[0] + ((-0.532215853173-0.645454816391j))*x_ref[1]
+        arg[(3,)]=(-0.0805859436611+0.716788503257j)*x[0] + ((-0.938064739065-0.275226456388j))*x[1]
+        ref[(3,)]=(-0.0805859436611+0.716788503257j)*x_ref[0] + ((-0.938064739065-0.275226456388j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.192905940903-0.169148347382j)*x[2]
+            ref[(0,)]+=(-0.192905940903-0.169148347382j)*x_ref[2]
+            arg[(1,)]+=(-0.577080509948-0.509239644143j)*x[2]
+            ref[(1,)]+=(-0.577080509948-0.509239644143j)*x_ref[2]
+            arg[(2,)]+=(-0.888105252196+0.0335361181152j)*x[2]
+            ref[(2,)]+=(-0.888105252196+0.0335361181152j)*x_ref[2]
+            arg[(3,)]+=(0.78172548652-0.0610272348344j)*x[2]
+            ref[(3,)]+=(0.78172548652-0.0610272348344j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(-0.156831246493+0.266443845097j)*x[0] + ((-0.79622233616-0.691187859468j))*x[1]
+        ref[(0, 0)]=(-0.156831246493+0.266443845097j)*x_ref[0] + ((-0.79622233616-0.691187859468j))*x_ref[1]
+        arg[(0, 1)]=(-0.138840169329+0.190977340813j)*x[0] + ((-0.660032123488-0.138155118963j))*x[1]
+        ref[(0, 1)]=(-0.138840169329+0.190977340813j)*x_ref[0] + ((-0.660032123488-0.138155118963j))*x_ref[1]
+        arg[(0, 2)]=(-0.239862016368+0.401192977333j)*x[0] + ((0.172864883772+0.244838168j))*x[1]
+        ref[(0, 2)]=(-0.239862016368+0.401192977333j)*x_ref[0] + ((0.172864883772+0.244838168j))*x_ref[1]
+        arg[(1, 0)]=(-0.892724492754-0.922670962913j)*x[0] + ((0.0135702278739-0.873366095129j))*x[1]
+        ref[(1, 0)]=(-0.892724492754-0.922670962913j)*x_ref[0] + ((0.0135702278739-0.873366095129j))*x_ref[1]
+        arg[(1, 1)]=(0.725806371604-0.53881268409j)*x[0] + ((-0.387427265648+0.00268413548185j))*x[1]
+        ref[(1, 1)]=(0.725806371604-0.53881268409j)*x_ref[0] + ((-0.387427265648+0.00268413548185j))*x_ref[1]
+        arg[(1, 2)]=(0.824022944891+0.309537620351j)*x[0] + ((0.993103421861-0.538002564j))*x[1]
+        ref[(1, 2)]=(0.824022944891+0.309537620351j)*x_ref[0] + ((0.993103421861-0.538002564j))*x_ref[1]
+        arg[(2, 0)]=(-0.155064243512-0.0105224952151j)*x[0] + ((-0.943389677588+0.214303647155j))*x[1]
+        ref[(2, 0)]=(-0.155064243512-0.0105224952151j)*x_ref[0] + ((-0.943389677588+0.214303647155j))*x_ref[1]
+        arg[(2, 1)]=(0.237142368723+0.760929048927j)*x[0] + ((-0.405797203333+0.953899003865j))*x[1]
+        ref[(2, 1)]=(0.237142368723+0.760929048927j)*x_ref[0] + ((-0.405797203333+0.953899003865j))*x_ref[1]
+        arg[(2, 2)]=(0.853027581171+0.286523481912j)*x[0] + ((-0.714908067359-0.826499084893j))*x[1]
+        ref[(2, 2)]=(0.853027581171+0.286523481912j)*x_ref[0] + ((-0.714908067359-0.826499084893j))*x_ref[1]
+        arg[(3, 0)]=(0.019630656766-0.807004395925j)*x[0] + ((0.46341008656-0.534975006333j))*x[1]
+        ref[(3, 0)]=(0.019630656766-0.807004395925j)*x_ref[0] + ((0.46341008656-0.534975006333j))*x_ref[1]
+        arg[(3, 1)]=(0.225340547204+0.95066372865j)*x[0] + ((0.821271981743+0.546036087042j))*x[1]
+        ref[(3, 1)]=(0.225340547204+0.95066372865j)*x_ref[0] + ((0.821271981743+0.546036087042j))*x_ref[1]
+        arg[(3, 2)]=(-0.933611250133+0.159620693646j)*x[0] + ((-0.243080566835-0.197803670906j))*x[1]
+        ref[(3, 2)]=(-0.933611250133+0.159620693646j)*x_ref[0] + ((-0.243080566835-0.197803670906j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.578728913233-0.0402672252336j)*x[2]
+            ref[(0, 0)]+=(0.578728913233-0.0402672252336j)*x_ref[2]
+            arg[(0, 1)]+=(-0.961001576531+0.063164074471j)*x[2]
+            ref[(0, 1)]+=(-0.961001576531+0.063164074471j)*x_ref[2]
+            arg[(0, 2)]+=(-0.659085681635-0.87711488481j)*x[2]
+            ref[(0, 2)]+=(-0.659085681635-0.87711488481j)*x_ref[2]
+            arg[(1, 0)]+=(0.179164956911-0.967721697522j)*x[2]
+            ref[(1, 0)]+=(0.179164956911-0.967721697522j)*x_ref[2]
+            arg[(1, 1)]+=(-0.353609445617-0.113410819178j)*x[2]
+            ref[(1, 1)]+=(-0.353609445617-0.113410819178j)*x_ref[2]
+            arg[(1, 2)]+=(-0.95017799754+0.827154752148j)*x[2]
+            ref[(1, 2)]+=(-0.95017799754+0.827154752148j)*x_ref[2]
+            arg[(2, 0)]+=(-0.591665160843+0.882952349738j)*x[2]
+            ref[(2, 0)]+=(-0.591665160843+0.882952349738j)*x_ref[2]
+            arg[(2, 1)]+=(0.69988329917+0.447743481389j)*x[2]
+            ref[(2, 1)]+=(0.69988329917+0.447743481389j)*x_ref[2]
+            arg[(2, 2)]+=(-0.996786261791-0.53977952286j)*x[2]
+            ref[(2, 2)]+=(-0.996786261791-0.53977952286j)*x_ref[2]
+            arg[(3, 0)]+=(-0.48022138851+0.40166404225j)*x[2]
+            ref[(3, 0)]+=(-0.48022138851+0.40166404225j)*x_ref[2]
+            arg[(3, 1)]+=(-0.764565271571+0.597973267083j)*x[2]
+            ref[(3, 1)]+=(-0.764565271571+0.597973267083j)*x_ref[2]
+            arg[(3, 2)]+=(-0.0587968825489+0.919768516242j)*x[2]
+            ref[(3, 2)]+=(-0.0587968825489+0.919768516242j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4),w)
+        ref = Data(0,(2, 4, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.816976549719+0.247733446342j)*x[0] + ((0.817908548247-0.59625092289j))*x[1]
+        ref[(0, 0, 0)]=(-0.816976549719+0.247733446342j)*x_ref[0] + ((0.817908548247-0.59625092289j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.578020175058-0.178712320986j)*x[0] + ((-0.122432601435-0.401862086548j))*x[1]
+        ref[(0, 0, 1)]=(0.578020175058-0.178712320986j)*x_ref[0] + ((-0.122432601435-0.401862086548j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.348503036942+0.963452618143j)*x[0] + ((-0.456004366106+0.414554011192j))*x[1]
+        ref[(0, 0, 2)]=(0.348503036942+0.963452618143j)*x_ref[0] + ((-0.456004366106+0.414554011192j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.873640142199-0.420909331658j)*x[0] + ((0.0249608269527-0.985600246681j))*x[1]
+        ref[(0, 0, 3)]=(0.873640142199-0.420909331658j)*x_ref[0] + ((0.0249608269527-0.985600246681j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.341344185404+0.924262674958j)*x[0] + ((-0.00736763125212-0.473137295182j))*x[1]
+        ref[(0, 1, 0)]=(0.341344185404+0.924262674958j)*x_ref[0] + ((-0.00736763125212-0.473137295182j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.59672233787-0.515120659504j)*x[0] + ((-0.60985949898-0.966688274085j))*x[1]
+        ref[(0, 1, 1)]=(0.59672233787-0.515120659504j)*x_ref[0] + ((-0.60985949898-0.966688274085j))*x_ref[1]
+        arg[(0, 1, 2)]=(-0.120057552291-0.609388351056j)*x[0] + ((0.329624669972-0.803861578648j))*x[1]
+        ref[(0, 1, 2)]=(-0.120057552291-0.609388351056j)*x_ref[0] + ((0.329624669972-0.803861578648j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.920754234901-0.37636353785j)*x[0] + ((0.280168835764-0.676790119317j))*x[1]
+        ref[(0, 1, 3)]=(-0.920754234901-0.37636353785j)*x_ref[0] + ((0.280168835764-0.676790119317j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.520845743759-0.577965114845j)*x[0] + ((0.103571413298-0.886178732507j))*x[1]
+        ref[(0, 2, 0)]=(0.520845743759-0.577965114845j)*x_ref[0] + ((0.103571413298-0.886178732507j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.909422181983-0.205205401773j)*x[0] + ((-0.271736449544-0.138534425786j))*x[1]
+        ref[(0, 2, 1)]=(0.909422181983-0.205205401773j)*x_ref[0] + ((-0.271736449544-0.138534425786j))*x_ref[1]
+        arg[(0, 2, 2)]=(-0.587108634762-0.26420392294j)*x[0] + ((0.358762249099-0.375730425492j))*x[1]
+        ref[(0, 2, 2)]=(-0.587108634762-0.26420392294j)*x_ref[0] + ((0.358762249099-0.375730425492j))*x_ref[1]
+        arg[(0, 2, 3)]=(0.988950360879-0.184903716006j)*x[0] + ((-0.965395105568+0.022949488858j))*x[1]
+        ref[(0, 2, 3)]=(0.988950360879-0.184903716006j)*x_ref[0] + ((-0.965395105568+0.022949488858j))*x_ref[1]
+        arg[(0, 3, 0)]=(-0.260825027624+0.573078051165j)*x[0] + ((-0.613029507989-0.095754610851j))*x[1]
+        ref[(0, 3, 0)]=(-0.260825027624+0.573078051165j)*x_ref[0] + ((-0.613029507989-0.095754610851j))*x_ref[1]
+        arg[(0, 3, 1)]=(-0.384301529773-0.721787123529j)*x[0] + ((0.354220573768+0.290424795326j))*x[1]
+        ref[(0, 3, 1)]=(-0.384301529773-0.721787123529j)*x_ref[0] + ((0.354220573768+0.290424795326j))*x_ref[1]
+        arg[(0, 3, 2)]=(-0.642520711614+0.968074107311j)*x[0] + ((-0.427474932256-0.888177312712j))*x[1]
+        ref[(0, 3, 2)]=(-0.642520711614+0.968074107311j)*x_ref[0] + ((-0.427474932256-0.888177312712j))*x_ref[1]
+        arg[(0, 3, 3)]=(0.673922630864+0.281247043726j)*x[0] + ((-0.246070261677+0.87636795515j))*x[1]
+        ref[(0, 3, 3)]=(0.673922630864+0.281247043726j)*x_ref[0] + ((-0.246070261677+0.87636795515j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.112063723543-0.21543065698j)*x[0] + ((-0.883247130003+0.24008628139j))*x[1]
+        ref[(1, 0, 0)]=(0.112063723543-0.21543065698j)*x_ref[0] + ((-0.883247130003+0.24008628139j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.562919520762+0.635423096559j)*x[0] + ((-0.799894422763-0.409886225772j))*x[1]
+        ref[(1, 0, 1)]=(-0.562919520762+0.635423096559j)*x_ref[0] + ((-0.799894422763-0.409886225772j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.065555560753-0.899689861636j)*x[0] + ((0.00235457245526-0.491797499365j))*x[1]
+        ref[(1, 0, 2)]=(-0.065555560753-0.899689861636j)*x_ref[0] + ((0.00235457245526-0.491797499365j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.007150600411+0.983468699746j)*x[0] + ((0.35793121194+0.612697501121j))*x[1]
+        ref[(1, 0, 3)]=(0.007150600411+0.983468699746j)*x_ref[0] + ((0.35793121194+0.612697501121j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.500836293629+0.330521232052j)*x[0] + ((0.458343562518-0.395562575339j))*x[1]
+        ref[(1, 1, 0)]=(-0.500836293629+0.330521232052j)*x_ref[0] + ((0.458343562518-0.395562575339j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.628045298045-0.275333619417j)*x[0] + ((0.903601088768+0.762739388885j))*x[1]
+        ref[(1, 1, 1)]=(-0.628045298045-0.275333619417j)*x_ref[0] + ((0.903601088768+0.762739388885j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.318106980891-0.0165766899498j)*x[0] + ((0.36922912116+0.728827334005j))*x[1]
+        ref[(1, 1, 2)]=(-0.318106980891-0.0165766899498j)*x_ref[0] + ((0.36922912116+0.728827334005j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.367754172218+0.419092250731j)*x[0] + ((0.955900154491-0.437919706012j))*x[1]
+        ref[(1, 1, 3)]=(-0.367754172218+0.419092250731j)*x_ref[0] + ((0.955900154491-0.437919706012j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.24881533148+0.502756803933j)*x[0] + ((-0.195424328326+0.53678540246j))*x[1]
+        ref[(1, 2, 0)]=(-0.24881533148+0.502756803933j)*x_ref[0] + ((-0.195424328326+0.53678540246j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.809232049084-0.433789916565j)*x[0] + ((-0.611749319663-0.50593847756j))*x[1]
+        ref[(1, 2, 1)]=(-0.809232049084-0.433789916565j)*x_ref[0] + ((-0.611749319663-0.50593847756j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.0651312761188-0.31766511494j)*x[0] + ((0.217155542076+0.226727326854j))*x[1]
+        ref[(1, 2, 2)]=(0.0651312761188-0.31766511494j)*x_ref[0] + ((0.217155542076+0.226727326854j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.566842516097-0.440773721551j)*x[0] + ((-0.962004961675-0.104743406579j))*x[1]
+        ref[(1, 2, 3)]=(-0.566842516097-0.440773721551j)*x_ref[0] + ((-0.962004961675-0.104743406579j))*x_ref[1]
+        arg[(1, 3, 0)]=(-0.367401833247-0.169068846511j)*x[0] + ((0.399560858221+0.948626327833j))*x[1]
+        ref[(1, 3, 0)]=(-0.367401833247-0.169068846511j)*x_ref[0] + ((0.399560858221+0.948626327833j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.271692515952-0.527024084868j)*x[0] + ((0.28861625325-0.676949052541j))*x[1]
+        ref[(1, 3, 1)]=(0.271692515952-0.527024084868j)*x_ref[0] + ((0.28861625325-0.676949052541j))*x_ref[1]
+        arg[(1, 3, 2)]=(-0.579751951709+0.90393045733j)*x[0] + ((0.800744546306+0.931118282502j))*x[1]
+        ref[(1, 3, 2)]=(-0.579751951709+0.90393045733j)*x_ref[0] + ((0.800744546306+0.931118282502j))*x_ref[1]
+        arg[(1, 3, 3)]=(-0.545377202993+0.3859879665j)*x[0] + ((-0.155138032036+0.0475921277343j))*x[1]
+        ref[(1, 3, 3)]=(-0.545377202993+0.3859879665j)*x_ref[0] + ((-0.155138032036+0.0475921277343j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.443081433625+0.898993473423j)*x[2]
+            ref[(0, 0, 0)]+=(-0.443081433625+0.898993473423j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.928862719574-0.697465111663j)*x[2]
+            ref[(0, 0, 1)]+=(0.928862719574-0.697465111663j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.139346377738+0.400656038601j)*x[2]
+            ref[(0, 0, 2)]+=(-0.139346377738+0.400656038601j)*x_ref[2]
+            arg[(0, 0, 3)]+=(0.814018367435-0.704526620024j)*x[2]
+            ref[(0, 0, 3)]+=(0.814018367435-0.704526620024j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.677593457986-0.688414491504j)*x[2]
+            ref[(0, 1, 0)]+=(-0.677593457986-0.688414491504j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.315482440642-0.454084567179j)*x[2]
+            ref[(0, 1, 1)]+=(-0.315482440642-0.454084567179j)*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.699384922167+0.786224570667j)*x[2]
+            ref[(0, 1, 2)]+=(-0.699384922167+0.786224570667j)*x_ref[2]
+            arg[(0, 1, 3)]+=(0.908749617198-0.0869457119774j)*x[2]
+            ref[(0, 1, 3)]+=(0.908749617198-0.0869457119774j)*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.139101329012-0.857397135356j)*x[2]
+            ref[(0, 2, 0)]+=(-0.139101329012-0.857397135356j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.591860548014-0.509740496393j)*x[2]
+            ref[(0, 2, 1)]+=(0.591860548014-0.509740496393j)*x_ref[2]
+            arg[(0, 2, 2)]+=(0.224514549749+0.955648833268j)*x[2]
+            ref[(0, 2, 2)]+=(0.224514549749+0.955648833268j)*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.773785543054+0.361358724328j)*x[2]
+            ref[(0, 2, 3)]+=(-0.773785543054+0.361358724328j)*x_ref[2]
+            arg[(0, 3, 0)]+=(0.517166290325+0.505202207191j)*x[2]
+            ref[(0, 3, 0)]+=(0.517166290325+0.505202207191j)*x_ref[2]
+            arg[(0, 3, 1)]+=(0.432923195687-0.620967541608j)*x[2]
+            ref[(0, 3, 1)]+=(0.432923195687-0.620967541608j)*x_ref[2]
+            arg[(0, 3, 2)]+=(-0.0242112841887+0.600349334537j)*x[2]
+            ref[(0, 3, 2)]+=(-0.0242112841887+0.600349334537j)*x_ref[2]
+            arg[(0, 3, 3)]+=(-0.196814065457+0.353790322335j)*x[2]
+            ref[(0, 3, 3)]+=(-0.196814065457+0.353790322335j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.140708382129-0.821923585505j)*x[2]
+            ref[(1, 0, 0)]+=(0.140708382129-0.821923585505j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.828830942927-0.296645643342j)*x[2]
+            ref[(1, 0, 1)]+=(0.828830942927-0.296645643342j)*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.584137853278+0.0277313185184j)*x[2]
+            ref[(1, 0, 2)]+=(-0.584137853278+0.0277313185184j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.00243273173759+0.516759588584j)*x[2]
+            ref[(1, 0, 3)]+=(-0.00243273173759+0.516759588584j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.985508779012+0.677064586424j)*x[2]
+            ref[(1, 1, 0)]+=(-0.985508779012+0.677064586424j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.0395783687189+0.0987219236844j)*x[2]
+            ref[(1, 1, 1)]+=(-0.0395783687189+0.0987219236844j)*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.682733656748+0.606995638717j)*x[2]
+            ref[(1, 1, 2)]+=(-0.682733656748+0.606995638717j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.172925146599-0.0591443316811j)*x[2]
+            ref[(1, 1, 3)]+=(0.172925146599-0.0591443316811j)*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.944056032877+0.644060611282j)*x[2]
+            ref[(1, 2, 0)]+=(-0.944056032877+0.644060611282j)*x_ref[2]
+            arg[(1, 2, 1)]+=(0.70928834527+0.157267048406j)*x[2]
+            ref[(1, 2, 1)]+=(0.70928834527+0.157267048406j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.39138411189+0.0495892835786j)*x[2]
+            ref[(1, 2, 2)]+=(0.39138411189+0.0495892835786j)*x_ref[2]
+            arg[(1, 2, 3)]+=(0.804740692372+0.619109757168j)*x[2]
+            ref[(1, 2, 3)]+=(0.804740692372+0.619109757168j)*x_ref[2]
+            arg[(1, 3, 0)]+=(-0.180017160994+0.255504898875j)*x[2]
+            ref[(1, 3, 0)]+=(-0.180017160994+0.255504898875j)*x_ref[2]
+            arg[(1, 3, 1)]+=(0.702260352649+0.906357006473j)*x[2]
+            ref[(1, 3, 1)]+=(0.702260352649+0.906357006473j)*x_ref[2]
+            arg[(1, 3, 2)]+=(-0.78011748667+0.252552773149j)*x[2]
+            ref[(1, 3, 2)]+=(-0.78011748667+0.252552773149j)*x_ref[2]
+            arg[(1, 3, 3)]+=(0.48840778696-0.0831373640266j)*x[2]
+            ref[(1, 3, 3)]+=(0.48840778696-0.0831373640266j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 2, 4),w)
+        ref = Data(0,(3, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.212393446665+0.955656203017j)*x[0] + ((0.202057805091+0.344478305866j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.212393446665+0.955656203017j)*x_ref[0] + ((0.202057805091+0.344478305866j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.0294016073475-0.266657859693j)*x[0] + ((-0.365008384805+0.382895718987j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.0294016073475-0.266657859693j)*x_ref[0] + ((-0.365008384805+0.382895718987j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.243314980445-0.0866066999779j)*x[0] + ((-0.742034715685-0.869665763649j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.243314980445-0.0866066999779j)*x_ref[0] + ((-0.742034715685-0.869665763649j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.0476175890271+0.0305776111418j)*x[0] + ((-0.162708746105-0.337788806945j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.0476175890271+0.0305776111418j)*x_ref[0] + ((-0.162708746105-0.337788806945j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.726557611991-0.354274579548j)*x[0] + ((0.392481932137+0.22007326985j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.726557611991-0.354274579548j)*x_ref[0] + ((0.392481932137+0.22007326985j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.235782839887-0.455847293356j)*x[0] + ((0.0497331652956+0.712896366436j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.235782839887-0.455847293356j)*x_ref[0] + ((0.0497331652956+0.712896366436j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.0607636916507+0.134896193192j)*x[0] + ((0.313532660056-0.556105114369j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.0607636916507+0.134896193192j)*x_ref[0] + ((0.313532660056-0.556105114369j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.193892509627+0.176642406674j)*x[0] + ((0.648274301385-0.923308906815j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.193892509627+0.176642406674j)*x_ref[0] + ((0.648274301385-0.923308906815j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.338191351253+0.00404388568513j)*x[0] + ((-0.955265698409-0.6162798573j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.338191351253+0.00404388568513j)*x_ref[0] + ((-0.955265698409-0.6162798573j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.72518881753-0.644518873305j)*x[0] + ((0.234521669122+0.764430348112j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.72518881753-0.644518873305j)*x_ref[0] + ((0.234521669122+0.764430348112j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.443741406043+0.135510629217j)*x[0] + ((-0.806587417972-0.247188788537j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.443741406043+0.135510629217j)*x_ref[0] + ((-0.806587417972-0.247188788537j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.863614711835-0.803433159421j)*x[0] + ((-0.693632375149-0.651585698951j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.863614711835-0.803433159421j)*x_ref[0] + ((-0.693632375149-0.651585698951j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.549993615263-0.791481629199j)*x[0] + ((0.818664395099+0.727554699566j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.549993615263-0.791481629199j)*x_ref[0] + ((0.818664395099+0.727554699566j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.879791678209-0.359107975114j)*x[0] + ((0.197262429606-0.770603839076j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.879791678209-0.359107975114j)*x_ref[0] + ((0.197262429606-0.770603839076j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.656093260888+0.117456151124j)*x[0] + ((-0.235667798667+0.493272033696j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.656093260888+0.117456151124j)*x_ref[0] + ((-0.235667798667+0.493272033696j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.219477838567+0.193982351597j)*x[0] + ((-0.787281175076+0.6242619264j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.219477838567+0.193982351597j)*x_ref[0] + ((-0.787281175076+0.6242619264j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.622131873432+0.234671496548j)*x[0] + ((-0.894651707721-0.901822989256j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.622131873432+0.234671496548j)*x_ref[0] + ((-0.894651707721-0.901822989256j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.546200928506-0.0497023834278j)*x[0] + ((0.638193068958+0.663268589913j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.546200928506-0.0497023834278j)*x_ref[0] + ((0.638193068958+0.663268589913j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.444388583307+0.11408550388j)*x[0] + ((0.00978573385764+0.361789133155j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.444388583307+0.11408550388j)*x_ref[0] + ((0.00978573385764+0.361789133155j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.0822038384807-0.615841896907j)*x[0] + ((-0.255489061457-0.898597368143j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.0822038384807-0.615841896907j)*x_ref[0] + ((-0.255489061457-0.898597368143j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.215623828901-0.940963704125j)*x[0] + ((-0.369144962893+0.317553430582j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.215623828901-0.940963704125j)*x_ref[0] + ((-0.369144962893+0.317553430582j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.133644536969+0.0798670470289j)*x[0] + ((-0.0489274180726+0.25503631163j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.133644536969+0.0798670470289j)*x_ref[0] + ((-0.0489274180726+0.25503631163j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.858725953843+0.898055767474j)*x[0] + ((-0.475962077813+0.442366514083j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.858725953843+0.898055767474j)*x_ref[0] + ((-0.475962077813+0.442366514083j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.407158206256+0.0510139197326j)*x[0] + ((-0.389685018592-0.981930967682j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.407158206256+0.0510139197326j)*x_ref[0] + ((-0.389685018592-0.981930967682j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.476619851719+0.956632829511j)*x[0] + ((0.583687028866-0.282532928012j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.476619851719+0.956632829511j)*x_ref[0] + ((0.583687028866-0.282532928012j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.327277360049-0.282571539557j)*x[0] + ((-0.292112780446-0.77739117547j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.327277360049-0.282571539557j)*x_ref[0] + ((-0.292112780446-0.77739117547j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.954762026078-0.787018028325j)*x[0] + ((-0.914872897955+0.804691674j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.954762026078-0.787018028325j)*x_ref[0] + ((-0.914872897955+0.804691674j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.0936231517573-0.57126961775j)*x[0] + ((-0.440152480285-0.72897143972j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.0936231517573-0.57126961775j)*x_ref[0] + ((-0.440152480285-0.72897143972j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.234091037812-0.966026036528j)*x[0] + ((0.437181365604+0.353473917147j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.234091037812-0.966026036528j)*x_ref[0] + ((0.437181365604+0.353473917147j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.552018521105+0.130760505834j)*x[0] + ((-0.856070585098-0.633316114681j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.552018521105+0.130760505834j)*x_ref[0] + ((-0.856070585098-0.633316114681j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.355588253032+0.932631037333j)*x[0] + ((-0.810189750635+0.48538147243j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.355588253032+0.932631037333j)*x_ref[0] + ((-0.810189750635+0.48538147243j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.898591443341-0.291183331809j)*x[0] + ((0.749342517819+0.702076657382j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.898591443341-0.291183331809j)*x_ref[0] + ((0.749342517819+0.702076657382j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.745427983069-0.904002823668j)*x[0] + ((0.10432211125-0.522381378885j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.745427983069-0.904002823668j)*x_ref[0] + ((0.10432211125-0.522381378885j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.609794464579+0.987213549953j)*x[0] + ((0.0272727504189-0.621662365611j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.609794464579+0.987213549953j)*x_ref[0] + ((0.0272727504189-0.621662365611j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.000493874377314+0.950552528673j)*x[0] + ((-0.0234140270688-0.645965033772j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.000493874377314+0.950552528673j)*x_ref[0] + ((-0.0234140270688-0.645965033772j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.492144463901+0.841996914645j)*x[0] + ((-0.170123653883-0.608751940276j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.492144463901+0.841996914645j)*x_ref[0] + ((-0.170123653883-0.608751940276j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.890654370659+0.808722818193j)*x[0] + ((-0.930002818772-0.477934669426j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.890654370659+0.808722818193j)*x_ref[0] + ((-0.930002818772-0.477934669426j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.569973936109-0.551279293528j)*x[0] + ((-0.152771510717-0.0617154374711j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.569973936109-0.551279293528j)*x_ref[0] + ((-0.152771510717-0.0617154374711j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.735785831651+0.884389560451j)*x[0] + ((-0.285532665475-0.793295423855j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.735785831651+0.884389560451j)*x_ref[0] + ((-0.285532665475-0.793295423855j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.86714343425-0.10618611294j)*x[0] + ((0.342066450047+0.801483521018j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.86714343425-0.10618611294j)*x_ref[0] + ((0.342066450047+0.801483521018j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.177114100524+0.698296863168j)*x[0] + ((0.964020237427-0.65804630035j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.177114100524+0.698296863168j)*x_ref[0] + ((0.964020237427-0.65804630035j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.876687801335+0.437653817421j)*x[0] + ((-0.408567209146+0.0889111511527j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.876687801335+0.437653817421j)*x_ref[0] + ((-0.408567209146+0.0889111511527j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.785651290029-0.56917947491j)*x[0] + ((0.880288708031-0.236395667147j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.785651290029-0.56917947491j)*x_ref[0] + ((0.880288708031-0.236395667147j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(-0.591697177732-0.293765021675j)*x[0] + ((-0.231477922406-0.103372691163j))*x[1]
+        ref[(2, 1, 0, 3)]=(-0.591697177732-0.293765021675j)*x_ref[0] + ((-0.231477922406-0.103372691163j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.15607812568+0.285118034353j)*x[0] + ((0.793129190154-0.311287932693j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.15607812568+0.285118034353j)*x_ref[0] + ((0.793129190154-0.311287932693j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.0931811444943-0.360103634935j)*x[0] + ((-0.490898901429+0.0187596671962j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.0931811444943-0.360103634935j)*x_ref[0] + ((-0.490898901429+0.0187596671962j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.995847289869-0.64784812993j)*x[0] + ((-0.138946303711-0.427996924029j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.995847289869-0.64784812993j)*x_ref[0] + ((-0.138946303711-0.427996924029j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(-0.494505444743+0.273080061931j)*x[0] + ((-0.104227127525+0.756095047895j))*x[1]
+        ref[(2, 1, 1, 3)]=(-0.494505444743+0.273080061931j)*x_ref[0] + ((-0.104227127525+0.756095047895j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.369426861296-0.256983436907j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.369426861296-0.256983436907j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.565770674998+0.141650515911j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.565770674998+0.141650515911j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.940982987852-0.0248937740219j)*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.940982987852-0.0248937740219j)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.285857025948+0.908801120357j)*x[2]
+            ref[(0, 0, 0, 3)]+=(0.285857025948+0.908801120357j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.683180480838+0.847364951436j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.683180480838+0.847364951436j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.220729876583+0.572192260599j)*x[2]
+            ref[(0, 0, 1, 1)]+=(0.220729876583+0.572192260599j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.637088166072-0.264643176756j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.637088166072-0.264643176756j)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(-0.287631126048+0.755534154495j)*x[2]
+            ref[(0, 0, 1, 3)]+=(-0.287631126048+0.755534154495j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.158742977633-0.835149106887j)*x[2]
+            ref[(0, 1, 0, 0)]+=(0.158742977633-0.835149106887j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.992525523307+0.287940390314j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.992525523307+0.287940390314j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.741779681224+0.779724521405j)*x[2]
+            ref[(0, 1, 0, 2)]+=(0.741779681224+0.779724521405j)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.0915330470559-0.267226404814j)*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.0915330470559-0.267226404814j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.958119666085-0.852409213058j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.958119666085-0.852409213058j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.101383110242-0.0267214990804j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.101383110242-0.0267214990804j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.543100744665-0.416225047371j)*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.543100744665-0.416225047371j)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.0265066810849+0.429843594093j)*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.0265066810849+0.429843594093j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.21254095281+0.652145456381j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.21254095281+0.652145456381j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.537598059727-0.393426570746j)*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.537598059727-0.393426570746j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.140214162963-0.725577520126j)*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.140214162963-0.725577520126j)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.462386701216+0.182521581231j)*x[2]
+            ref[(1, 0, 0, 3)]+=(0.462386701216+0.182521581231j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.747581751361-0.21570849122j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.747581751361-0.21570849122j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.558751449812+0.433878268953j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.558751449812+0.433878268953j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.174232361283+0.273304721753j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.174232361283+0.273304721753j)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.480250463232+0.454010594815j)*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.480250463232+0.454010594815j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.467095035654-0.747915326544j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.467095035654-0.747915326544j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.693045572836+0.459965401127j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.693045572836+0.459965401127j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.426880953553+0.804894306304j)*x[2]
+            ref[(1, 1, 0, 2)]+=(0.426880953553+0.804894306304j)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(0.434392990195-0.784182365767j)*x[2]
+            ref[(1, 1, 0, 3)]+=(0.434392990195-0.784182365767j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.980706474969+0.277809497872j)*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.980706474969+0.277809497872j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.357482040651-0.986847951263j)*x[2]
+            ref[(1, 1, 1, 1)]+=(0.357482040651-0.986847951263j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.508509536855-0.159385068501j)*x[2]
+            ref[(1, 1, 1, 2)]+=(0.508509536855-0.159385068501j)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(0.242983965311-0.817442621982j)*x[2]
+            ref[(1, 1, 1, 3)]+=(0.242983965311-0.817442621982j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.932626985828+0.157077687063j)*x[2]
+            ref[(2, 0, 0, 0)]+=(0.932626985828+0.157077687063j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.679730103433-0.820847462567j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.679730103433-0.820847462567j)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.0754005458899-0.67841205829j)*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.0754005458899-0.67841205829j)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.380297112226-0.202145744684j)*x[2]
+            ref[(2, 0, 0, 3)]+=(0.380297112226-0.202145744684j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.988922696865+0.325392479131j)*x[2]
+            ref[(2, 0, 1, 0)]+=(0.988922696865+0.325392479131j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.876564513007-0.574294018999j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.876564513007-0.574294018999j)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.588653510959-0.166400071374j)*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.588653510959-0.166400071374j)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(-0.130921085601+0.309536182127j)*x[2]
+            ref[(2, 0, 1, 3)]+=(-0.130921085601+0.309536182127j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.442467850502+0.0438303529552j)*x[2]
+            ref[(2, 1, 0, 0)]+=(0.442467850502+0.0438303529552j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.220874442467+0.0638702463101j)*x[2]
+            ref[(2, 1, 0, 1)]+=(0.220874442467+0.0638702463101j)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.968715450208+0.670510734024j)*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.968715450208+0.670510734024j)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.677295212052-0.194953947946j)*x[2]
+            ref[(2, 1, 0, 3)]+=(0.677295212052-0.194953947946j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.122155136234-0.640814656565j)*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.122155136234-0.640814656565j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.852843879455+0.471239385815j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.852843879455+0.471239385815j)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.324122221765-0.138538310788j)*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.324122221765-0.138538310788j)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(-0.000866907795533+0.292034089965j)*x[2]
+            ref[(2, 1, 1, 3)]+=(-0.000866907795533+0.292034089965j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.426582751074-0.613951529766j)*x[0] + ((-0.222568973734-0.759737603406j))*x[1]
+        ref=(0.426582751074-0.613951529766j)*x_ref[0] + ((-0.222568973734-0.759737603406j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.804900265152-0.0626184638598j))*x[2]
+            ref+=((-0.804900265152-0.0626184638598j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.598819596136-0.0547344854724j)*x[0] + ((-0.794203236637+0.847135542036j))*x[1]
+        ref[(0,)]=(-0.598819596136-0.0547344854724j)*x_ref[0] + ((-0.794203236637+0.847135542036j))*x_ref[1]
+        arg[(1,)]=(0.199677776446-0.602267251329j)*x[0] + ((-0.0254458658101-0.172153323518j))*x[1]
+        ref[(1,)]=(0.199677776446-0.602267251329j)*x_ref[0] + ((-0.0254458658101-0.172153323518j))*x_ref[1]
+        arg[(2,)]=(0.291188282815+0.325653174034j)*x[0] + ((-0.989586638758-0.375212239668j))*x[1]
+        ref[(2,)]=(0.291188282815+0.325653174034j)*x_ref[0] + ((-0.989586638758-0.375212239668j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.249937834723+0.671664407497j)*x[2]
+            ref[(0,)]+=(-0.249937834723+0.671664407497j)*x_ref[2]
+            arg[(1,)]+=(-0.0358981398952-0.844752702397j)*x[2]
+            ref[(1,)]+=(-0.0358981398952-0.844752702397j)*x_ref[2]
+            arg[(2,)]+=(0.999936912916-0.406048077871j)*x[2]
+            ref[(2,)]+=(0.999936912916-0.406048077871j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(-0.203927105475-0.0152144733195j)*x[0] + ((0.540680910462-0.89147688323j))*x[1]
+        ref[(0, 0)]=(-0.203927105475-0.0152144733195j)*x_ref[0] + ((0.540680910462-0.89147688323j))*x_ref[1]
+        arg[(0, 1)]=(0.652174531521+0.459617394373j)*x[0] + ((0.762278442864-0.224314939339j))*x[1]
+        ref[(0, 1)]=(0.652174531521+0.459617394373j)*x_ref[0] + ((0.762278442864-0.224314939339j))*x_ref[1]
+        arg[(0, 2)]=(0.888959907027-0.104483305195j)*x[0] + ((0.375226356824+0.423331289814j))*x[1]
+        ref[(0, 2)]=(0.888959907027-0.104483305195j)*x_ref[0] + ((0.375226356824+0.423331289814j))*x_ref[1]
+        arg[(0, 3)]=(-0.635698157741+0.832834978739j)*x[0] + ((0.271887903906+0.989577828059j))*x[1]
+        ref[(0, 3)]=(-0.635698157741+0.832834978739j)*x_ref[0] + ((0.271887903906+0.989577828059j))*x_ref[1]
+        arg[(1, 0)]=(0.847930473974+0.837618841523j)*x[0] + ((0.241081252978-0.553238097133j))*x[1]
+        ref[(1, 0)]=(0.847930473974+0.837618841523j)*x_ref[0] + ((0.241081252978-0.553238097133j))*x_ref[1]
+        arg[(1, 1)]=(0.38135699958-0.681665622134j)*x[0] + ((-0.170116785843+0.744875104171j))*x[1]
+        ref[(1, 1)]=(0.38135699958-0.681665622134j)*x_ref[0] + ((-0.170116785843+0.744875104171j))*x_ref[1]
+        arg[(1, 2)]=(-0.868111108926+0.733670402614j)*x[0] + ((0.693312250374-0.300578468571j))*x[1]
+        ref[(1, 2)]=(-0.868111108926+0.733670402614j)*x_ref[0] + ((0.693312250374-0.300578468571j))*x_ref[1]
+        arg[(1, 3)]=(0.177587608708+0.489222305385j)*x[0] + ((0.0734267482482-0.476275173796j))*x[1]
+        ref[(1, 3)]=(0.177587608708+0.489222305385j)*x_ref[0] + ((0.0734267482482-0.476275173796j))*x_ref[1]
+        arg[(2, 0)]=(0.578089712786+0.993163474902j)*x[0] + ((0.86483391555+0.277811624732j))*x[1]
+        ref[(2, 0)]=(0.578089712786+0.993163474902j)*x_ref[0] + ((0.86483391555+0.277811624732j))*x_ref[1]
+        arg[(2, 1)]=(0.950810057218+0.0940545169962j)*x[0] + ((0.516067151356+0.534397140724j))*x[1]
+        ref[(2, 1)]=(0.950810057218+0.0940545169962j)*x_ref[0] + ((0.516067151356+0.534397140724j))*x_ref[1]
+        arg[(2, 2)]=(0.0502981885071-0.143272602616j)*x[0] + ((0.891846798936+0.580677142924j))*x[1]
+        ref[(2, 2)]=(0.0502981885071-0.143272602616j)*x_ref[0] + ((0.891846798936+0.580677142924j))*x_ref[1]
+        arg[(2, 3)]=(-0.87627244383-0.166572079292j)*x[0] + ((0.0132406978428-0.0107762277501j))*x[1]
+        ref[(2, 3)]=(-0.87627244383-0.166572079292j)*x_ref[0] + ((0.0132406978428-0.0107762277501j))*x_ref[1]
+        arg[(3, 0)]=(-0.654938098042+0.483021030204j)*x[0] + ((-0.829444573576+0.0935862621981j))*x[1]
+        ref[(3, 0)]=(-0.654938098042+0.483021030204j)*x_ref[0] + ((-0.829444573576+0.0935862621981j))*x_ref[1]
+        arg[(3, 1)]=(0.2294968675-0.364808556276j)*x[0] + ((0.9411409464-0.224354104106j))*x[1]
+        ref[(3, 1)]=(0.2294968675-0.364808556276j)*x_ref[0] + ((0.9411409464-0.224354104106j))*x_ref[1]
+        arg[(3, 2)]=(-0.0767724120055+0.99657255465j)*x[0] + ((-0.0528235185781+0.175223027233j))*x[1]
+        ref[(3, 2)]=(-0.0767724120055+0.99657255465j)*x_ref[0] + ((-0.0528235185781+0.175223027233j))*x_ref[1]
+        arg[(3, 3)]=(0.7462436754+0.0435423015026j)*x[0] + ((-0.0497882340646-0.574309685791j))*x[1]
+        ref[(3, 3)]=(0.7462436754+0.0435423015026j)*x_ref[0] + ((-0.0497882340646-0.574309685791j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.430108156715-0.178434279131j)*x[2]
+            ref[(0, 0)]+=(0.430108156715-0.178434279131j)*x_ref[2]
+            arg[(0, 1)]+=(0.662921003812+0.207973489377j)*x[2]
+            ref[(0, 1)]+=(0.662921003812+0.207973489377j)*x_ref[2]
+            arg[(0, 2)]+=(0.814354954402+0.568642630938j)*x[2]
+            ref[(0, 2)]+=(0.814354954402+0.568642630938j)*x_ref[2]
+            arg[(0, 3)]+=(0.0818514887241-0.638506165969j)*x[2]
+            ref[(0, 3)]+=(0.0818514887241-0.638506165969j)*x_ref[2]
+            arg[(1, 0)]+=(0.148854704265-0.176288950939j)*x[2]
+            ref[(1, 0)]+=(0.148854704265-0.176288950939j)*x_ref[2]
+            arg[(1, 1)]+=(-0.184937268337+0.444523494827j)*x[2]
+            ref[(1, 1)]+=(-0.184937268337+0.444523494827j)*x_ref[2]
+            arg[(1, 2)]+=(0.81340411433-0.649781149861j)*x[2]
+            ref[(1, 2)]+=(0.81340411433-0.649781149861j)*x_ref[2]
+            arg[(1, 3)]+=(-0.858702032596+0.329138356345j)*x[2]
+            ref[(1, 3)]+=(-0.858702032596+0.329138356345j)*x_ref[2]
+            arg[(2, 0)]+=(0.925330735875-0.22296539678j)*x[2]
+            ref[(2, 0)]+=(0.925330735875-0.22296539678j)*x_ref[2]
+            arg[(2, 1)]+=(-0.337458419747-0.605374925132j)*x[2]
+            ref[(2, 1)]+=(-0.337458419747-0.605374925132j)*x_ref[2]
+            arg[(2, 2)]+=(-0.237846912463+0.549189538504j)*x[2]
+            ref[(2, 2)]+=(-0.237846912463+0.549189538504j)*x_ref[2]
+            arg[(2, 3)]+=(-0.030870832554+0.496439061217j)*x[2]
+            ref[(2, 3)]+=(-0.030870832554+0.496439061217j)*x_ref[2]
+            arg[(3, 0)]+=(0.536242198724+0.480970389149j)*x[2]
+            ref[(3, 0)]+=(0.536242198724+0.480970389149j)*x_ref[2]
+            arg[(3, 1)]+=(-0.768152190975-0.29793702717j)*x[2]
+            ref[(3, 1)]+=(-0.768152190975-0.29793702717j)*x_ref[2]
+            arg[(3, 2)]+=(0.139140480789+0.589245708839j)*x[2]
+            ref[(3, 2)]+=(0.139140480789+0.589245708839j)*x_ref[2]
+            arg[(3, 3)]+=(-0.882454146944-0.0281672301506j)*x[2]
+            ref[(3, 3)]+=(-0.882454146944-0.0281672301506j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.695940636142+0.823395432395j)*x[0] + ((-0.617834606676-0.468768216948j))*x[1]
+        ref[(0, 0, 0)]=(-0.695940636142+0.823395432395j)*x_ref[0] + ((-0.617834606676-0.468768216948j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.936054204315+0.164263592411j)*x[0] + ((0.914826376663+0.459109302039j))*x[1]
+        ref[(0, 0, 1)]=(-0.936054204315+0.164263592411j)*x_ref[0] + ((0.914826376663+0.459109302039j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.887914267587-0.417021303927j)*x[0] + ((-0.0909777218851-0.807177288962j))*x[1]
+        ref[(0, 0, 2)]=(0.887914267587-0.417021303927j)*x_ref[0] + ((-0.0909777218851-0.807177288962j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.81409958082-0.200159274502j)*x[0] + ((0.65236516712-0.0277032972206j))*x[1]
+        ref[(0, 0, 3)]=(0.81409958082-0.200159274502j)*x_ref[0] + ((0.65236516712-0.0277032972206j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.700392513234-0.0456764030647j)*x[0] + ((0.701357266546+0.297774522324j))*x[1]
+        ref[(0, 1, 0)]=(0.700392513234-0.0456764030647j)*x_ref[0] + ((0.701357266546+0.297774522324j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.99516133844-0.863157476812j)*x[0] + ((-0.423325640978-0.496586368662j))*x[1]
+        ref[(0, 1, 1)]=(-0.99516133844-0.863157476812j)*x_ref[0] + ((-0.423325640978-0.496586368662j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.263619870438+0.226085028887j)*x[0] + ((0.0551405914906+0.928754655477j))*x[1]
+        ref[(0, 1, 2)]=(0.263619870438+0.226085028887j)*x_ref[0] + ((0.0551405914906+0.928754655477j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.405831154011+0.144209231351j)*x[0] + ((0.978951499574+0.824559177097j))*x[1]
+        ref[(0, 1, 3)]=(0.405831154011+0.144209231351j)*x_ref[0] + ((0.978951499574+0.824559177097j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.293012847289-0.270727619004j)*x[0] + ((-0.170682588854+0.372547272488j))*x[1]
+        ref[(1, 0, 0)]=(-0.293012847289-0.270727619004j)*x_ref[0] + ((-0.170682588854+0.372547272488j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.642325806577-0.445093533565j)*x[0] + ((0.877739876758-0.819523547095j))*x[1]
+        ref[(1, 0, 1)]=(0.642325806577-0.445093533565j)*x_ref[0] + ((0.877739876758-0.819523547095j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.204638558236+0.0564104240706j)*x[0] + ((0.803458949947+0.450763187479j))*x[1]
+        ref[(1, 0, 2)]=(-0.204638558236+0.0564104240706j)*x_ref[0] + ((0.803458949947+0.450763187479j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.363437688014+0.490368545241j)*x[0] + ((0.607163884466+0.526663967979j))*x[1]
+        ref[(1, 0, 3)]=(0.363437688014+0.490368545241j)*x_ref[0] + ((0.607163884466+0.526663967979j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.30630766966+0.743671381443j)*x[0] + ((0.668004438493-0.632741320705j))*x[1]
+        ref[(1, 1, 0)]=(-0.30630766966+0.743671381443j)*x_ref[0] + ((0.668004438493-0.632741320705j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.45435650712+0.208718962653j)*x[0] + ((0.827747886585-0.544990991805j))*x[1]
+        ref[(1, 1, 1)]=(-0.45435650712+0.208718962653j)*x_ref[0] + ((0.827747886585-0.544990991805j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.570454877358-0.868556068935j)*x[0] + ((0.343704072995-0.667779521311j))*x[1]
+        ref[(1, 1, 2)]=(0.570454877358-0.868556068935j)*x_ref[0] + ((0.343704072995-0.667779521311j))*x_ref[1]
+        arg[(1, 1, 3)]=(0.48994531055+0.38290309453j)*x[0] + ((-0.537293492938-0.300494200438j))*x[1]
+        ref[(1, 1, 3)]=(0.48994531055+0.38290309453j)*x_ref[0] + ((-0.537293492938-0.300494200438j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.817833301585+0.73165736705j)*x[0] + ((-0.603400526931+0.510245988354j))*x[1]
+        ref[(2, 0, 0)]=(0.817833301585+0.73165736705j)*x_ref[0] + ((-0.603400526931+0.510245988354j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.268790876363-0.218913763795j)*x[0] + ((-0.486959330629-0.800352723677j))*x[1]
+        ref[(2, 0, 1)]=(0.268790876363-0.218913763795j)*x_ref[0] + ((-0.486959330629-0.800352723677j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.867497646431+0.110099752391j)*x[0] + ((0.343644927001+0.452407967312j))*x[1]
+        ref[(2, 0, 2)]=(0.867497646431+0.110099752391j)*x_ref[0] + ((0.343644927001+0.452407967312j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.739339136019+0.517743688038j)*x[0] + ((-0.282544588878+0.0669243539478j))*x[1]
+        ref[(2, 0, 3)]=(-0.739339136019+0.517743688038j)*x_ref[0] + ((-0.282544588878+0.0669243539478j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.911784915542+0.257369994865j)*x[0] + ((0.523410431749+0.515724798041j))*x[1]
+        ref[(2, 1, 0)]=(0.911784915542+0.257369994865j)*x_ref[0] + ((0.523410431749+0.515724798041j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.124940339804+0.922736045108j)*x[0] + ((0.554591715077+0.733335127051j))*x[1]
+        ref[(2, 1, 1)]=(-0.124940339804+0.922736045108j)*x_ref[0] + ((0.554591715077+0.733335127051j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.567276614398+0.402784592871j)*x[0] + ((0.520181214708-0.587135235066j))*x[1]
+        ref[(2, 1, 2)]=(0.567276614398+0.402784592871j)*x_ref[0] + ((0.520181214708-0.587135235066j))*x_ref[1]
+        arg[(2, 1, 3)]=(-0.410391960227+0.790490751807j)*x[0] + ((-0.933143914347+0.491893048804j))*x[1]
+        ref[(2, 1, 3)]=(-0.410391960227+0.790490751807j)*x_ref[0] + ((-0.933143914347+0.491893048804j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.208111782726+0.479013844593j)*x[0] + ((0.106534645681-0.904086071967j))*x[1]
+        ref[(3, 0, 0)]=(-0.208111782726+0.479013844593j)*x_ref[0] + ((0.106534645681-0.904086071967j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.222895820983-0.258251254646j)*x[0] + ((-0.739545698306-0.992778241391j))*x[1]
+        ref[(3, 0, 1)]=(0.222895820983-0.258251254646j)*x_ref[0] + ((-0.739545698306-0.992778241391j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.306573522872-0.665046327193j)*x[0] + ((0.209808178233+0.810075300907j))*x[1]
+        ref[(3, 0, 2)]=(0.306573522872-0.665046327193j)*x_ref[0] + ((0.209808178233+0.810075300907j))*x_ref[1]
+        arg[(3, 0, 3)]=(-0.767120424865+0.738566513651j)*x[0] + ((0.421000814357-0.545303944064j))*x[1]
+        ref[(3, 0, 3)]=(-0.767120424865+0.738566513651j)*x_ref[0] + ((0.421000814357-0.545303944064j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.789547432861+0.864555138167j)*x[0] + ((-0.37265779121-0.152027025584j))*x[1]
+        ref[(3, 1, 0)]=(-0.789547432861+0.864555138167j)*x_ref[0] + ((-0.37265779121-0.152027025584j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.348684283163+0.792452827408j)*x[0] + ((0.0914017827888-0.759762970552j))*x[1]
+        ref[(3, 1, 1)]=(-0.348684283163+0.792452827408j)*x_ref[0] + ((0.0914017827888-0.759762970552j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.54336024355+0.409698839762j)*x[0] + ((0.178915205866+0.642894877303j))*x[1]
+        ref[(3, 1, 2)]=(-0.54336024355+0.409698839762j)*x_ref[0] + ((0.178915205866+0.642894877303j))*x_ref[1]
+        arg[(3, 1, 3)]=(0.271572109247+0.498522086725j)*x[0] + ((-0.597366298061-0.928748571767j))*x[1]
+        ref[(3, 1, 3)]=(0.271572109247+0.498522086725j)*x_ref[0] + ((-0.597366298061-0.928748571767j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.295551620642+0.499754883883j)*x[2]
+            ref[(0, 0, 0)]+=(0.295551620642+0.499754883883j)*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.622283985281-0.601344481344j)*x[2]
+            ref[(0, 0, 1)]+=(-0.622283985281-0.601344481344j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.623099048076+0.799031756476j)*x[2]
+            ref[(0, 0, 2)]+=(-0.623099048076+0.799031756476j)*x_ref[2]
+            arg[(0, 0, 3)]+=(0.602941247687-0.274538477266j)*x[2]
+            ref[(0, 0, 3)]+=(0.602941247687-0.274538477266j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.883403616897-0.0623737951397j)*x[2]
+            ref[(0, 1, 0)]+=(-0.883403616897-0.0623737951397j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.532110567822-0.463517702496j)*x[2]
+            ref[(0, 1, 1)]+=(-0.532110567822-0.463517702496j)*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.572472097957+0.599433146092j)*x[2]
+            ref[(0, 1, 2)]+=(-0.572472097957+0.599433146092j)*x_ref[2]
+            arg[(0, 1, 3)]+=(-0.48751657441+0.0373725504133j)*x[2]
+            ref[(0, 1, 3)]+=(-0.48751657441+0.0373725504133j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.164726598359+0.346753790725j)*x[2]
+            ref[(1, 0, 0)]+=(0.164726598359+0.346753790725j)*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.625883671863+0.988087599433j)*x[2]
+            ref[(1, 0, 1)]+=(-0.625883671863+0.988087599433j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.790592223085-0.646231318116j)*x[2]
+            ref[(1, 0, 2)]+=(0.790592223085-0.646231318116j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.944961355365+0.406598772064j)*x[2]
+            ref[(1, 0, 3)]+=(-0.944961355365+0.406598772064j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.544660373922-0.5952812614j)*x[2]
+            ref[(1, 1, 0)]+=(-0.544660373922-0.5952812614j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.32460176314+0.886443373199j)*x[2]
+            ref[(1, 1, 1)]+=(-0.32460176314+0.886443373199j)*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.614422748518+0.480122946902j)*x[2]
+            ref[(1, 1, 2)]+=(-0.614422748518+0.480122946902j)*x_ref[2]
+            arg[(1, 1, 3)]+=(-0.111387189596+0.747143615656j)*x[2]
+            ref[(1, 1, 3)]+=(-0.111387189596+0.747143615656j)*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.0997277811053+0.35713363833j)*x[2]
+            ref[(2, 0, 0)]+=(-0.0997277811053+0.35713363833j)*x_ref[2]
+            arg[(2, 0, 1)]+=(0.0253295594529-0.401993620606j)*x[2]
+            ref[(2, 0, 1)]+=(0.0253295594529-0.401993620606j)*x_ref[2]
+            arg[(2, 0, 2)]+=(0.409276180028-0.0616687416142j)*x[2]
+            ref[(2, 0, 2)]+=(0.409276180028-0.0616687416142j)*x_ref[2]
+            arg[(2, 0, 3)]+=(0.86280649997+0.573463209484j)*x[2]
+            ref[(2, 0, 3)]+=(0.86280649997+0.573463209484j)*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.778877694763-0.0390757827405j)*x[2]
+            ref[(2, 1, 0)]+=(-0.778877694763-0.0390757827405j)*x_ref[2]
+            arg[(2, 1, 1)]+=(0.534563914684+0.0370741338532j)*x[2]
+            ref[(2, 1, 1)]+=(0.534563914684+0.0370741338532j)*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.68117077421+0.751637500829j)*x[2]
+            ref[(2, 1, 2)]+=(-0.68117077421+0.751637500829j)*x_ref[2]
+            arg[(2, 1, 3)]+=(0.433432151617+0.48808929424j)*x[2]
+            ref[(2, 1, 3)]+=(0.433432151617+0.48808929424j)*x_ref[2]
+            arg[(3, 0, 0)]+=(0.947997437571-0.205232565817j)*x[2]
+            ref[(3, 0, 0)]+=(0.947997437571-0.205232565817j)*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.950716418275+0.0512023511568j)*x[2]
+            ref[(3, 0, 1)]+=(-0.950716418275+0.0512023511568j)*x_ref[2]
+            arg[(3, 0, 2)]+=(0.21085891098-0.374327547392j)*x[2]
+            ref[(3, 0, 2)]+=(0.21085891098-0.374327547392j)*x_ref[2]
+            arg[(3, 0, 3)]+=(0.364653792758-0.201832405197j)*x[2]
+            ref[(3, 0, 3)]+=(0.364653792758-0.201832405197j)*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.649298703149-0.630528747268j)*x[2]
+            ref[(3, 1, 0)]+=(-0.649298703149-0.630528747268j)*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.871133730679-0.79747735877j)*x[2]
+            ref[(3, 1, 1)]+=(-0.871133730679-0.79747735877j)*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.203113681376-0.579223495241j)*x[2]
+            ref[(3, 1, 2)]+=(-0.203113681376-0.579223495241j)*x_ref[2]
+            arg[(3, 1, 3)]+=(-0.924221158707-0.871372340559j)*x[2]
+            ref[(3, 1, 3)]+=(-0.924221158707-0.871372340559j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2, 3),w)
+        ref = Data(0,(2, 2, 2, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(0.0224878922466-0.121350220228j)*x[0] + ((-0.26564052764-0.885139062914j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.0224878922466-0.121350220228j)*x_ref[0] + ((-0.26564052764-0.885139062914j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.979674504613-0.708313551276j)*x[0] + ((-0.123280225308-0.0783468179516j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.979674504613-0.708313551276j)*x_ref[0] + ((-0.123280225308-0.0783468179516j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.497863586103-0.362446692231j)*x[0] + ((0.666372335057-0.188779476481j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.497863586103-0.362446692231j)*x_ref[0] + ((0.666372335057-0.188779476481j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.161811289251-0.429573742349j)*x[0] + ((0.42939071739+0.842778702483j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.161811289251-0.429573742349j)*x_ref[0] + ((0.42939071739+0.842778702483j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.234723419773+0.201794271458j)*x[0] + ((-0.348430788674+0.207810227054j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.234723419773+0.201794271458j)*x_ref[0] + ((-0.348430788674+0.207810227054j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.617501115004+0.977626471554j)*x[0] + ((0.938151633273-0.231438944797j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.617501115004+0.977626471554j)*x_ref[0] + ((0.938151633273-0.231438944797j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.982252440269+0.354015979355j)*x[0] + ((-0.524597786338+0.240627176331j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.982252440269+0.354015979355j)*x_ref[0] + ((-0.524597786338+0.240627176331j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.281480613355-0.883334202354j)*x[0] + ((0.758386128034+0.00890235396951j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.281480613355-0.883334202354j)*x_ref[0] + ((0.758386128034+0.00890235396951j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.944143450759-0.473811633485j)*x[0] + ((0.0128818528788-0.71181554746j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.944143450759-0.473811633485j)*x_ref[0] + ((0.0128818528788-0.71181554746j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.171636114966-0.975172677528j)*x[0] + ((0.414049441723-0.330188369283j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.171636114966-0.975172677528j)*x_ref[0] + ((0.414049441723-0.330188369283j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.469414067291-0.485686723299j)*x[0] + ((-0.0369510601086+0.408790021933j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.469414067291-0.485686723299j)*x_ref[0] + ((-0.0369510601086+0.408790021933j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.400189360917-0.785350056501j)*x[0] + ((-0.296346715944-0.115352872j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.400189360917-0.785350056501j)*x_ref[0] + ((-0.296346715944-0.115352872j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.385721948638+0.627220350404j)*x[0] + ((-0.348798270365+0.675500623687j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.385721948638+0.627220350404j)*x_ref[0] + ((-0.348798270365+0.675500623687j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.446097420292+0.630958735192j)*x[0] + ((0.75731229112+0.661192720297j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.446097420292+0.630958735192j)*x_ref[0] + ((0.75731229112+0.661192720297j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.528898024532-0.181592292666j)*x[0] + ((-0.541482164107-0.901098138058j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.528898024532-0.181592292666j)*x_ref[0] + ((-0.541482164107-0.901098138058j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.0443006511072-0.896701269093j)*x[0] + ((-0.194819702603+0.146974618823j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.0443006511072-0.896701269093j)*x_ref[0] + ((-0.194819702603+0.146974618823j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.679774066518+0.726185870651j)*x[0] + ((-0.587643512719+0.123535938119j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.679774066518+0.726185870651j)*x_ref[0] + ((-0.587643512719+0.123535938119j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.938281021807-0.407440238164j)*x[0] + ((-0.0298257872683-0.482096405892j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.938281021807-0.407440238164j)*x_ref[0] + ((-0.0298257872683-0.482096405892j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.21398854367+0.927333315729j)*x[0] + ((-0.855907491254-0.28518724555j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.21398854367+0.927333315729j)*x_ref[0] + ((-0.855907491254-0.28518724555j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.517760987745+0.205788792924j)*x[0] + ((-0.42265007118+0.739649291311j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.517760987745+0.205788792924j)*x_ref[0] + ((-0.42265007118+0.739649291311j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.759459250773-0.919618839265j)*x[0] + ((0.649342174157+0.069259558016j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.759459250773-0.919618839265j)*x_ref[0] + ((0.649342174157+0.069259558016j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.283820867183+0.604337731541j)*x[0] + ((0.0940007671655-0.016858895578j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.283820867183+0.604337731541j)*x_ref[0] + ((0.0940007671655-0.016858895578j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.320832473641-0.334919969383j)*x[0] + ((-0.540314992385+0.633119124646j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.320832473641-0.334919969383j)*x_ref[0] + ((-0.540314992385+0.633119124646j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.678888818337-0.824104677162j)*x[0] + ((0.132680100769+0.0920257760998j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.678888818337-0.824104677162j)*x_ref[0] + ((0.132680100769+0.0920257760998j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.826727610548-0.4517691722j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.826727610548-0.4517691722j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.527789988634-0.448191342633j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.527789988634-0.448191342633j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.684033568108+0.963898963714j)*x[2]
+            ref[(0, 0, 0, 2)]+=(0.684033568108+0.963898963714j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.228276468533-0.969744435452j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.228276468533-0.969744435452j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.851262772914+0.891336866004j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.851262772914+0.891336866004j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.20993793646+0.793841457173j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.20993793646+0.793841457173j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.846164621098+0.741959339488j)*x[2]
+            ref[(0, 1, 0, 0)]+=(0.846164621098+0.741959339488j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.656203620887-0.91619106196j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.656203620887-0.91619106196j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.859759549669+0.507095235984j)*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.859759549669+0.507095235984j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.416219399396-0.289932889143j)*x[2]
+            ref[(0, 1, 1, 0)]+=(0.416219399396-0.289932889143j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.41208719865-0.0558623204473j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.41208719865-0.0558623204473j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.446904274612-0.847534522648j)*x[2]
+            ref[(0, 1, 1, 2)]+=(0.446904274612-0.847534522648j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.234822027601-0.697125555677j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.234822027601-0.697125555677j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.702382702299+0.809506488691j)*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.702382702299+0.809506488691j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.196764596368-0.115087232318j)*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.196764596368-0.115087232318j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.758868827089-0.973310857141j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.758868827089-0.973310857141j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.474409523553+0.470672113587j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.474409523553+0.470672113587j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.734837698918-0.822129510773j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.734837698918-0.822129510773j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.0940924089272-0.927309024154j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.0940924089272-0.927309024154j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.897615267115+0.802171263192j)*x[2]
+            ref[(1, 1, 0, 1)]+=(0.897615267115+0.802171263192j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.169589803285+0.726516874427j)*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.169589803285+0.726516874427j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.000361587949435-0.500070933952j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.000361587949435-0.500070933952j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.650718500114+0.951594465465j)*x[2]
+            ref[(1, 1, 1, 1)]+=(0.650718500114+0.951594465465j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.751471284286-0.00453885398975j)*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.751471284286-0.00453885398975j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.841892344112*x[0]**o + (-0.468663082674)*x[0] + (-0.702309346117)*x[1]**o + (0.0493969001699)*x[1]
+        ref=-0.841892344112*x_ref[0]**o + (-0.468663082674)*x_ref[0] + (-0.702309346117)*x_ref[1]**o + (0.0493969001699)*x_ref[1]
+        if dim==3:
+            arg+=(-0.428254389586)*x[2]**o + (-0.889621064389)*x[2]
+            ref+=(-0.428254389586)*x_ref[2]**o + (-0.889621064389)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.440872643011*x[0]**o + (0.925523924193)*x[0] + (0.209057246698)*x[1]**o + (-0.781605067898)*x[1]
+        ref[(0,)]=0.440872643011*x_ref[0]**o + (0.925523924193)*x_ref[0] + (0.209057246698)*x_ref[1]**o + (-0.781605067898)*x_ref[1]
+        arg[(1,)]=0.890620779526*x[0]**o + (-0.504976096642)*x[0] + (0.854356265008)*x[1]**o + (0.177479934785)*x[1]
+        ref[(1,)]=0.890620779526*x_ref[0]**o + (-0.504976096642)*x_ref[0] + (0.854356265008)*x_ref[1]**o + (0.177479934785)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.126093497877*x[2]**o + (0.348493965832)*x[2]
+            ref[(0,)]+=0.126093497877*x_ref[2]**o + (0.348493965832)*x_ref[2]
+            arg[(1,)]+=-0.261393183499*x[2]**o + (0.913646900496)*x[2]
+            ref[(1,)]+=-0.261393183499*x_ref[2]**o + (0.913646900496)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=-0.783659726819*x[0]**o + (0.13227183666)*x[0] + (0.710865995556)*x[1]**o + (0.491656031622)*x[1]
+        ref[(0, 0)]=-0.783659726819*x_ref[0]**o + (0.13227183666)*x_ref[0] + (0.710865995556)*x_ref[1]**o + (0.491656031622)*x_ref[1]
+        arg[(0, 1)]=0.57743820119*x[0]**o + (-0.928705253705)*x[0] + (0.109099508499)*x[1]**o + (0.173844038618)*x[1]
+        ref[(0, 1)]=0.57743820119*x_ref[0]**o + (-0.928705253705)*x_ref[0] + (0.109099508499)*x_ref[1]**o + (0.173844038618)*x_ref[1]
+        arg[(1, 0)]=0.547911391737*x[0]**o + (-0.812646540955)*x[0] + (0.659167191412)*x[1]**o + (0.706019153662)*x[1]
+        ref[(1, 0)]=0.547911391737*x_ref[0]**o + (-0.812646540955)*x_ref[0] + (0.659167191412)*x_ref[1]**o + (0.706019153662)*x_ref[1]
+        arg[(1, 1)]=0.857803357125*x[0]**o + (-0.856575019595)*x[0] + (-0.400819602093)*x[1]**o + (0.197541938199)*x[1]
+        ref[(1, 1)]=0.857803357125*x_ref[0]**o + (-0.856575019595)*x_ref[0] + (-0.400819602093)*x_ref[1]**o + (0.197541938199)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.497241166737*x[2]**o + (0.574161488964)*x[2]
+            ref[(0, 0)]+=-0.497241166737*x_ref[2]**o + (0.574161488964)*x_ref[2]
+            arg[(0, 1)]+=0.614372922535*x[2]**o + (-0.157127049332)*x[2]
+            ref[(0, 1)]+=0.614372922535*x_ref[2]**o + (-0.157127049332)*x_ref[2]
+            arg[(1, 0)]+=-0.656813712123*x[2]**o + (-0.498271505313)*x[2]
+            ref[(1, 0)]+=-0.656813712123*x_ref[2]**o + (-0.498271505313)*x_ref[2]
+            arg[(1, 1)]+=0.675830765704*x[2]**o + (0.829617789092)*x[2]
+            ref[(1, 1)]+=0.675830765704*x_ref[2]**o + (0.829617789092)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4),w_ref)
+        arg[(0, 0, 0)]=-0.320747056597*x[0]**o + (0.582948270103)*x[0] + (-0.942557579728)*x[1]**o + (0.47587041139)*x[1]
+        ref[(0, 0, 0)]=-0.320747056597*x_ref[0]**o + (0.582948270103)*x_ref[0] + (-0.942557579728)*x_ref[1]**o + (0.47587041139)*x_ref[1]
+        arg[(0, 0, 1)]=-0.426459554791*x[0]**o + (-0.036860532879)*x[0] + (-0.784311841698)*x[1]**o + (-0.727613672526)*x[1]
+        ref[(0, 0, 1)]=-0.426459554791*x_ref[0]**o + (-0.036860532879)*x_ref[0] + (-0.784311841698)*x_ref[1]**o + (-0.727613672526)*x_ref[1]
+        arg[(0, 0, 2)]=-0.269853137476*x[0]**o + (-0.0579615713961)*x[0] + (0.174884144189)*x[1]**o + (0.983325951142)*x[1]
+        ref[(0, 0, 2)]=-0.269853137476*x_ref[0]**o + (-0.0579615713961)*x_ref[0] + (0.174884144189)*x_ref[1]**o + (0.983325951142)*x_ref[1]
+        arg[(0, 0, 3)]=-0.627940434834*x[0]**o + (0.85396028872)*x[0] + (-0.730791645233)*x[1]**o + (-0.144938586544)*x[1]
+        ref[(0, 0, 3)]=-0.627940434834*x_ref[0]**o + (0.85396028872)*x_ref[0] + (-0.730791645233)*x_ref[1]**o + (-0.144938586544)*x_ref[1]
+        arg[(0, 1, 0)]=-0.334748726417*x[0]**o + (-0.973571024117)*x[0] + (-0.474968121856)*x[1]**o + (-0.855659156407)*x[1]
+        ref[(0, 1, 0)]=-0.334748726417*x_ref[0]**o + (-0.973571024117)*x_ref[0] + (-0.474968121856)*x_ref[1]**o + (-0.855659156407)*x_ref[1]
+        arg[(0, 1, 1)]=0.554224657862*x[0]**o + (-0.356982248535)*x[0] + (0.0149015381341)*x[1]**o + (-0.530113530114)*x[1]
+        ref[(0, 1, 1)]=0.554224657862*x_ref[0]**o + (-0.356982248535)*x_ref[0] + (0.0149015381341)*x_ref[1]**o + (-0.530113530114)*x_ref[1]
+        arg[(0, 1, 2)]=-0.17120585143*x[0]**o + (-0.582921204435)*x[0] + (-0.978582328032)*x[1]**o + (-0.13818797388)*x[1]
+        ref[(0, 1, 2)]=-0.17120585143*x_ref[0]**o + (-0.582921204435)*x_ref[0] + (-0.978582328032)*x_ref[1]**o + (-0.13818797388)*x_ref[1]
+        arg[(0, 1, 3)]=-0.999676092007*x[0]**o + (-0.0270632354339)*x[0] + (0.542007769492)*x[1]**o + (-0.655622913834)*x[1]
+        ref[(0, 1, 3)]=-0.999676092007*x_ref[0]**o + (-0.0270632354339)*x_ref[0] + (0.542007769492)*x_ref[1]**o + (-0.655622913834)*x_ref[1]
+        arg[(0, 2, 0)]=0.903686504184*x[0]**o + (-0.548052655497)*x[0] + (0.240720541672)*x[1]**o + (-0.356403270335)*x[1]
+        ref[(0, 2, 0)]=0.903686504184*x_ref[0]**o + (-0.548052655497)*x_ref[0] + (0.240720541672)*x_ref[1]**o + (-0.356403270335)*x_ref[1]
+        arg[(0, 2, 1)]=-0.846480977183*x[0]**o + (0.803218668252)*x[0] + (-0.550681028652)*x[1]**o + (0.781071839774)*x[1]
+        ref[(0, 2, 1)]=-0.846480977183*x_ref[0]**o + (0.803218668252)*x_ref[0] + (-0.550681028652)*x_ref[1]**o + (0.781071839774)*x_ref[1]
+        arg[(0, 2, 2)]=-0.991059358467*x[0]**o + (0.839381543006)*x[0] + (-0.0317427393445)*x[1]**o + (0.472958179939)*x[1]
+        ref[(0, 2, 2)]=-0.991059358467*x_ref[0]**o + (0.839381543006)*x_ref[0] + (-0.0317427393445)*x_ref[1]**o + (0.472958179939)*x_ref[1]
+        arg[(0, 2, 3)]=-0.863873342683*x[0]**o + (0.182669181337)*x[0] + (0.953311873118)*x[1]**o + (0.105319496291)*x[1]
+        ref[(0, 2, 3)]=-0.863873342683*x_ref[0]**o + (0.182669181337)*x_ref[0] + (0.953311873118)*x_ref[1]**o + (0.105319496291)*x_ref[1]
+        arg[(0, 3, 0)]=0.851126273558*x[0]**o + (-0.167622803257)*x[0] + (-0.229774876653)*x[1]**o + (-0.264798321232)*x[1]
+        ref[(0, 3, 0)]=0.851126273558*x_ref[0]**o + (-0.167622803257)*x_ref[0] + (-0.229774876653)*x_ref[1]**o + (-0.264798321232)*x_ref[1]
+        arg[(0, 3, 1)]=0.845948698127*x[0]**o + (-0.78926549608)*x[0] + (0.0864161675439)*x[1]**o + (-0.446330651171)*x[1]
+        ref[(0, 3, 1)]=0.845948698127*x_ref[0]**o + (-0.78926549608)*x_ref[0] + (0.0864161675439)*x_ref[1]**o + (-0.446330651171)*x_ref[1]
+        arg[(0, 3, 2)]=-0.148851349062*x[0]**o + (0.459725579043)*x[0] + (0.13038531931)*x[1]**o + (-0.714515077808)*x[1]
+        ref[(0, 3, 2)]=-0.148851349062*x_ref[0]**o + (0.459725579043)*x_ref[0] + (0.13038531931)*x_ref[1]**o + (-0.714515077808)*x_ref[1]
+        arg[(0, 3, 3)]=0.451399334457*x[0]**o + (0.555311780942)*x[0] + (-0.978147939321)*x[1]**o + (-0.444547977644)*x[1]
+        ref[(0, 3, 3)]=0.451399334457*x_ref[0]**o + (0.555311780942)*x_ref[0] + (-0.978147939321)*x_ref[1]**o + (-0.444547977644)*x_ref[1]
+        arg[(1, 0, 0)]=-0.160247303078*x[0]**o + (0.673939563974)*x[0] + (0.0627488614072)*x[1]**o + (-0.543920524152)*x[1]
+        ref[(1, 0, 0)]=-0.160247303078*x_ref[0]**o + (0.673939563974)*x_ref[0] + (0.0627488614072)*x_ref[1]**o + (-0.543920524152)*x_ref[1]
+        arg[(1, 0, 1)]=-0.283956867385*x[0]**o + (0.566691324517)*x[0] + (-0.350350613404)*x[1]**o + (-0.807891177891)*x[1]
+        ref[(1, 0, 1)]=-0.283956867385*x_ref[0]**o + (0.566691324517)*x_ref[0] + (-0.350350613404)*x_ref[1]**o + (-0.807891177891)*x_ref[1]
+        arg[(1, 0, 2)]=-0.086576150131*x[0]**o + (0.401264893135)*x[0] + (0.496043585268)*x[1]**o + (-0.314443957378)*x[1]
+        ref[(1, 0, 2)]=-0.086576150131*x_ref[0]**o + (0.401264893135)*x_ref[0] + (0.496043585268)*x_ref[1]**o + (-0.314443957378)*x_ref[1]
+        arg[(1, 0, 3)]=-0.27821567857*x[0]**o + (0.619276376817)*x[0] + (0.212542886223)*x[1]**o + (-0.29481160323)*x[1]
+        ref[(1, 0, 3)]=-0.27821567857*x_ref[0]**o + (0.619276376817)*x_ref[0] + (0.212542886223)*x_ref[1]**o + (-0.29481160323)*x_ref[1]
+        arg[(1, 1, 0)]=0.0903517253057*x[0]**o + (0.0776491645752)*x[0] + (-0.193038938848)*x[1]**o + (0.874396546183)*x[1]
+        ref[(1, 1, 0)]=0.0903517253057*x_ref[0]**o + (0.0776491645752)*x_ref[0] + (-0.193038938848)*x_ref[1]**o + (0.874396546183)*x_ref[1]
+        arg[(1, 1, 1)]=-0.628790515288*x[0]**o + (-0.91778767043)*x[0] + (0.164703089468)*x[1]**o + (-0.178826156951)*x[1]
+        ref[(1, 1, 1)]=-0.628790515288*x_ref[0]**o + (-0.91778767043)*x_ref[0] + (0.164703089468)*x_ref[1]**o + (-0.178826156951)*x_ref[1]
+        arg[(1, 1, 2)]=-0.633194656374*x[0]**o + (-0.827978041557)*x[0] + (-0.446857675575)*x[1]**o + (-0.889207731575)*x[1]
+        ref[(1, 1, 2)]=-0.633194656374*x_ref[0]**o + (-0.827978041557)*x_ref[0] + (-0.446857675575)*x_ref[1]**o + (-0.889207731575)*x_ref[1]
+        arg[(1, 1, 3)]=-0.427490515797*x[0]**o + (-0.808760655658)*x[0] + (0.687623703054)*x[1]**o + (-0.158755509243)*x[1]
+        ref[(1, 1, 3)]=-0.427490515797*x_ref[0]**o + (-0.808760655658)*x_ref[0] + (0.687623703054)*x_ref[1]**o + (-0.158755509243)*x_ref[1]
+        arg[(1, 2, 0)]=-0.72448406068*x[0]**o + (0.956154579182)*x[0] + (-0.0815199961296)*x[1]**o + (-0.798899902553)*x[1]
+        ref[(1, 2, 0)]=-0.72448406068*x_ref[0]**o + (0.956154579182)*x_ref[0] + (-0.0815199961296)*x_ref[1]**o + (-0.798899902553)*x_ref[1]
+        arg[(1, 2, 1)]=0.694876305928*x[0]**o + (-0.598419608287)*x[0] + (-0.305145991196)*x[1]**o + (0.599554147133)*x[1]
+        ref[(1, 2, 1)]=0.694876305928*x_ref[0]**o + (-0.598419608287)*x_ref[0] + (-0.305145991196)*x_ref[1]**o + (0.599554147133)*x_ref[1]
+        arg[(1, 2, 2)]=-0.346592538489*x[0]**o + (0.858997530233)*x[0] + (-0.256820369789)*x[1]**o + (0.553721682033)*x[1]
+        ref[(1, 2, 2)]=-0.346592538489*x_ref[0]**o + (0.858997530233)*x_ref[0] + (-0.256820369789)*x_ref[1]**o + (0.553721682033)*x_ref[1]
+        arg[(1, 2, 3)]=0.212288150389*x[0]**o + (0.562784612484)*x[0] + (-0.768387025061)*x[1]**o + (-0.69865720064)*x[1]
+        ref[(1, 2, 3)]=0.212288150389*x_ref[0]**o + (0.562784612484)*x_ref[0] + (-0.768387025061)*x_ref[1]**o + (-0.69865720064)*x_ref[1]
+        arg[(1, 3, 0)]=-0.755677319683*x[0]**o + (-0.643595136418)*x[0] + (-0.971636830069)*x[1]**o + (0.258774898416)*x[1]
+        ref[(1, 3, 0)]=-0.755677319683*x_ref[0]**o + (-0.643595136418)*x_ref[0] + (-0.971636830069)*x_ref[1]**o + (0.258774898416)*x_ref[1]
+        arg[(1, 3, 1)]=-0.377159134744*x[0]**o + (-0.321099806592)*x[0] + (-0.167724874229)*x[1]**o + (-0.355653946235)*x[1]
+        ref[(1, 3, 1)]=-0.377159134744*x_ref[0]**o + (-0.321099806592)*x_ref[0] + (-0.167724874229)*x_ref[1]**o + (-0.355653946235)*x_ref[1]
+        arg[(1, 3, 2)]=0.142589539215*x[0]**o + (0.659659239431)*x[0] + (0.462368255239)*x[1]**o + (-0.12766256441)*x[1]
+        ref[(1, 3, 2)]=0.142589539215*x_ref[0]**o + (0.659659239431)*x_ref[0] + (0.462368255239)*x_ref[1]**o + (-0.12766256441)*x_ref[1]
+        arg[(1, 3, 3)]=-0.797208048484*x[0]**o + (0.74202057474)*x[0] + (0.217900565149)*x[1]**o + (-0.545905786221)*x[1]
+        ref[(1, 3, 3)]=-0.797208048484*x_ref[0]**o + (0.74202057474)*x_ref[0] + (0.217900565149)*x_ref[1]**o + (-0.545905786221)*x_ref[1]
+        arg[(2, 0, 0)]=0.565003965618*x[0]**o + (-0.77410816312)*x[0] + (0.115800036151)*x[1]**o + (0.0812080986444)*x[1]
+        ref[(2, 0, 0)]=0.565003965618*x_ref[0]**o + (-0.77410816312)*x_ref[0] + (0.115800036151)*x_ref[1]**o + (0.0812080986444)*x_ref[1]
+        arg[(2, 0, 1)]=-0.645923023165*x[0]**o + (-0.242094307771)*x[0] + (0.597572998083)*x[1]**o + (0.559411672377)*x[1]
+        ref[(2, 0, 1)]=-0.645923023165*x_ref[0]**o + (-0.242094307771)*x_ref[0] + (0.597572998083)*x_ref[1]**o + (0.559411672377)*x_ref[1]
+        arg[(2, 0, 2)]=-0.877074258395*x[0]**o + (-0.874436545159)*x[0] + (-0.186428282506)*x[1]**o + (-0.881797385789)*x[1]
+        ref[(2, 0, 2)]=-0.877074258395*x_ref[0]**o + (-0.874436545159)*x_ref[0] + (-0.186428282506)*x_ref[1]**o + (-0.881797385789)*x_ref[1]
+        arg[(2, 0, 3)]=0.00348208135781*x[0]**o + (-0.597029653195)*x[0] + (0.945117626536)*x[1]**o + (-0.160747764433)*x[1]
+        ref[(2, 0, 3)]=0.00348208135781*x_ref[0]**o + (-0.597029653195)*x_ref[0] + (0.945117626536)*x_ref[1]**o + (-0.160747764433)*x_ref[1]
+        arg[(2, 1, 0)]=0.377901959194*x[0]**o + (0.976422927699)*x[0] + (0.864336633172)*x[1]**o + (-0.60605012316)*x[1]
+        ref[(2, 1, 0)]=0.377901959194*x_ref[0]**o + (0.976422927699)*x_ref[0] + (0.864336633172)*x_ref[1]**o + (-0.60605012316)*x_ref[1]
+        arg[(2, 1, 1)]=0.369635824225*x[0]**o + (0.0542723390782)*x[0] + (0.749290824039)*x[1]**o + (0.911355181276)*x[1]
+        ref[(2, 1, 1)]=0.369635824225*x_ref[0]**o + (0.0542723390782)*x_ref[0] + (0.749290824039)*x_ref[1]**o + (0.911355181276)*x_ref[1]
+        arg[(2, 1, 2)]=0.455164618649*x[0]**o + (-0.142239218833)*x[0] + (0.484813373308)*x[1]**o + (0.423160513055)*x[1]
+        ref[(2, 1, 2)]=0.455164618649*x_ref[0]**o + (-0.142239218833)*x_ref[0] + (0.484813373308)*x_ref[1]**o + (0.423160513055)*x_ref[1]
+        arg[(2, 1, 3)]=-0.998381348932*x[0]**o + (-0.148669871288)*x[0] + (-0.594557858108)*x[1]**o + (0.478086804281)*x[1]
+        ref[(2, 1, 3)]=-0.998381348932*x_ref[0]**o + (-0.148669871288)*x_ref[0] + (-0.594557858108)*x_ref[1]**o + (0.478086804281)*x_ref[1]
+        arg[(2, 2, 0)]=0.868483373941*x[0]**o + (-0.692731817276)*x[0] + (-0.842042057724)*x[1]**o + (0.200485476543)*x[1]
+        ref[(2, 2, 0)]=0.868483373941*x_ref[0]**o + (-0.692731817276)*x_ref[0] + (-0.842042057724)*x_ref[1]**o + (0.200485476543)*x_ref[1]
+        arg[(2, 2, 1)]=-0.776579244212*x[0]**o + (0.99201508453)*x[0] + (0.50052274184)*x[1]**o + (0.204718560407)*x[1]
+        ref[(2, 2, 1)]=-0.776579244212*x_ref[0]**o + (0.99201508453)*x_ref[0] + (0.50052274184)*x_ref[1]**o + (0.204718560407)*x_ref[1]
+        arg[(2, 2, 2)]=-0.487725999822*x[0]**o + (-0.95700986292)*x[0] + (-0.323912564285)*x[1]**o + (0.467456345959)*x[1]
+        ref[(2, 2, 2)]=-0.487725999822*x_ref[0]**o + (-0.95700986292)*x_ref[0] + (-0.323912564285)*x_ref[1]**o + (0.467456345959)*x_ref[1]
+        arg[(2, 2, 3)]=0.610154341239*x[0]**o + (-0.12358867588)*x[0] + (0.112871288728)*x[1]**o + (0.56324181502)*x[1]
+        ref[(2, 2, 3)]=0.610154341239*x_ref[0]**o + (-0.12358867588)*x_ref[0] + (0.112871288728)*x_ref[1]**o + (0.56324181502)*x_ref[1]
+        arg[(2, 3, 0)]=-0.243780624206*x[0]**o + (0.203890789481)*x[0] + (0.325446978644)*x[1]**o + (0.507812290108)*x[1]
+        ref[(2, 3, 0)]=-0.243780624206*x_ref[0]**o + (0.203890789481)*x_ref[0] + (0.325446978644)*x_ref[1]**o + (0.507812290108)*x_ref[1]
+        arg[(2, 3, 1)]=0.488089388406*x[0]**o + (-0.0528573169958)*x[0] + (-0.08048913828)*x[1]**o + (0.465697565616)*x[1]
+        ref[(2, 3, 1)]=0.488089388406*x_ref[0]**o + (-0.0528573169958)*x_ref[0] + (-0.08048913828)*x_ref[1]**o + (0.465697565616)*x_ref[1]
+        arg[(2, 3, 2)]=0.323284797205*x[0]**o + (-0.237368088495)*x[0] + (0.224880992832)*x[1]**o + (0.189175923708)*x[1]
+        ref[(2, 3, 2)]=0.323284797205*x_ref[0]**o + (-0.237368088495)*x_ref[0] + (0.224880992832)*x_ref[1]**o + (0.189175923708)*x_ref[1]
+        arg[(2, 3, 3)]=0.154658471981*x[0]**o + (0.167435173537)*x[0] + (-0.0402920025486)*x[1]**o + (-0.184461864389)*x[1]
+        ref[(2, 3, 3)]=0.154658471981*x_ref[0]**o + (0.167435173537)*x_ref[0] + (-0.0402920025486)*x_ref[1]**o + (-0.184461864389)*x_ref[1]
+        arg[(3, 0, 0)]=-0.990824930966*x[0]**o + (-0.0770406996512)*x[0] + (-0.831220195549)*x[1]**o + (0.297427553539)*x[1]
+        ref[(3, 0, 0)]=-0.990824930966*x_ref[0]**o + (-0.0770406996512)*x_ref[0] + (-0.831220195549)*x_ref[1]**o + (0.297427553539)*x_ref[1]
+        arg[(3, 0, 1)]=0.41249732502*x[0]**o + (0.760138507665)*x[0] + (-0.777951646586)*x[1]**o + (0.788276787328)*x[1]
+        ref[(3, 0, 1)]=0.41249732502*x_ref[0]**o + (0.760138507665)*x_ref[0] + (-0.777951646586)*x_ref[1]**o + (0.788276787328)*x_ref[1]
+        arg[(3, 0, 2)]=-0.877375699407*x[0]**o + (0.705701408516)*x[0] + (0.464018886291)*x[1]**o + (-0.923272426418)*x[1]
+        ref[(3, 0, 2)]=-0.877375699407*x_ref[0]**o + (0.705701408516)*x_ref[0] + (0.464018886291)*x_ref[1]**o + (-0.923272426418)*x_ref[1]
+        arg[(3, 0, 3)]=0.471191945156*x[0]**o + (-0.36606371817)*x[0] + (-0.853599783219)*x[1]**o + (-0.124525589645)*x[1]
+        ref[(3, 0, 3)]=0.471191945156*x_ref[0]**o + (-0.36606371817)*x_ref[0] + (-0.853599783219)*x_ref[1]**o + (-0.124525589645)*x_ref[1]
+        arg[(3, 1, 0)]=-0.670508393205*x[0]**o + (-0.0331221448647)*x[0] + (-0.915488108116)*x[1]**o + (-0.542806327406)*x[1]
+        ref[(3, 1, 0)]=-0.670508393205*x_ref[0]**o + (-0.0331221448647)*x_ref[0] + (-0.915488108116)*x_ref[1]**o + (-0.542806327406)*x_ref[1]
+        arg[(3, 1, 1)]=0.101399754332*x[0]**o + (0.758053312806)*x[0] + (0.311413658954)*x[1]**o + (-0.156014383001)*x[1]
+        ref[(3, 1, 1)]=0.101399754332*x_ref[0]**o + (0.758053312806)*x_ref[0] + (0.311413658954)*x_ref[1]**o + (-0.156014383001)*x_ref[1]
+        arg[(3, 1, 2)]=0.442981231389*x[0]**o + (0.129626954531)*x[0] + (-0.978860188116)*x[1]**o + (0.470454683358)*x[1]
+        ref[(3, 1, 2)]=0.442981231389*x_ref[0]**o + (0.129626954531)*x_ref[0] + (-0.978860188116)*x_ref[1]**o + (0.470454683358)*x_ref[1]
+        arg[(3, 1, 3)]=0.990640152664*x[0]**o + (0.00608426985176)*x[0] + (0.126576565553)*x[1]**o + (-0.375535967924)*x[1]
+        ref[(3, 1, 3)]=0.990640152664*x_ref[0]**o + (0.00608426985176)*x_ref[0] + (0.126576565553)*x_ref[1]**o + (-0.375535967924)*x_ref[1]
+        arg[(3, 2, 0)]=0.8184976817*x[0]**o + (0.816990505376)*x[0] + (0.0179527412992)*x[1]**o + (0.649953834757)*x[1]
+        ref[(3, 2, 0)]=0.8184976817*x_ref[0]**o + (0.816990505376)*x_ref[0] + (0.0179527412992)*x_ref[1]**o + (0.649953834757)*x_ref[1]
+        arg[(3, 2, 1)]=-0.247462933535*x[0]**o + (-0.981314955741)*x[0] + (0.839808493471)*x[1]**o + (0.607354475541)*x[1]
+        ref[(3, 2, 1)]=-0.247462933535*x_ref[0]**o + (-0.981314955741)*x_ref[0] + (0.839808493471)*x_ref[1]**o + (0.607354475541)*x_ref[1]
+        arg[(3, 2, 2)]=-0.237402267441*x[0]**o + (0.859825681429)*x[0] + (-0.562474809315)*x[1]**o + (0.726574615752)*x[1]
+        ref[(3, 2, 2)]=-0.237402267441*x_ref[0]**o + (0.859825681429)*x_ref[0] + (-0.562474809315)*x_ref[1]**o + (0.726574615752)*x_ref[1]
+        arg[(3, 2, 3)]=0.842127375721*x[0]**o + (0.0235896718667)*x[0] + (0.436103311708)*x[1]**o + (0.261619364664)*x[1]
+        ref[(3, 2, 3)]=0.842127375721*x_ref[0]**o + (0.0235896718667)*x_ref[0] + (0.436103311708)*x_ref[1]**o + (0.261619364664)*x_ref[1]
+        arg[(3, 3, 0)]=-0.108597869321*x[0]**o + (-0.912939948841)*x[0] + (0.793326111854)*x[1]**o + (0.65700335432)*x[1]
+        ref[(3, 3, 0)]=-0.108597869321*x_ref[0]**o + (-0.912939948841)*x_ref[0] + (0.793326111854)*x_ref[1]**o + (0.65700335432)*x_ref[1]
+        arg[(3, 3, 1)]=0.423976137419*x[0]**o + (0.0131546451734)*x[0] + (-0.193163180807)*x[1]**o + (0.735491140273)*x[1]
+        ref[(3, 3, 1)]=0.423976137419*x_ref[0]**o + (0.0131546451734)*x_ref[0] + (-0.193163180807)*x_ref[1]**o + (0.735491140273)*x_ref[1]
+        arg[(3, 3, 2)]=-0.851342866904*x[0]**o + (0.659093423681)*x[0] + (0.68489605288)*x[1]**o + (-0.726524732322)*x[1]
+        ref[(3, 3, 2)]=-0.851342866904*x_ref[0]**o + (0.659093423681)*x_ref[0] + (0.68489605288)*x_ref[1]**o + (-0.726524732322)*x_ref[1]
+        arg[(3, 3, 3)]=0.0893264451918*x[0]**o + (0.860324323169)*x[0] + (-0.242046001187)*x[1]**o + (0.284224599136)*x[1]
+        ref[(3, 3, 3)]=0.0893264451918*x_ref[0]**o + (0.860324323169)*x_ref[0] + (-0.242046001187)*x_ref[1]**o + (0.284224599136)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.768199031146*x[2]**o + (-0.818203667326)*x[2]
+            ref[(0, 0, 0)]+=-0.768199031146*x_ref[2]**o + (-0.818203667326)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.168955789437*x[2]**o + (-0.808091052696)*x[2]
+            ref[(0, 0, 1)]+=-0.168955789437*x_ref[2]**o + (-0.808091052696)*x_ref[2]
+            arg[(0, 0, 2)]+=0.841372756445*x[2]**o + (-0.446386841749)*x[2]
+            ref[(0, 0, 2)]+=0.841372756445*x_ref[2]**o + (-0.446386841749)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.148920876225*x[2]**o + (-0.939371198148)*x[2]
+            ref[(0, 0, 3)]+=-0.148920876225*x_ref[2]**o + (-0.939371198148)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.219694450758*x[2]**o + (0.144876270456)*x[2]
+            ref[(0, 1, 0)]+=-0.219694450758*x_ref[2]**o + (0.144876270456)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.172925235094*x[2]**o + (-0.142035435373)*x[2]
+            ref[(0, 1, 1)]+=-0.172925235094*x_ref[2]**o + (-0.142035435373)*x_ref[2]
+            arg[(0, 1, 2)]+=0.660103610487*x[2]**o + (-0.114199609142)*x[2]
+            ref[(0, 1, 2)]+=0.660103610487*x_ref[2]**o + (-0.114199609142)*x_ref[2]
+            arg[(0, 1, 3)]+=-0.3897039992*x[2]**o + (-0.0734344637994)*x[2]
+            ref[(0, 1, 3)]+=-0.3897039992*x_ref[2]**o + (-0.0734344637994)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.688556109178*x[2]**o + (0.0775437963116)*x[2]
+            ref[(0, 2, 0)]+=-0.688556109178*x_ref[2]**o + (0.0775437963116)*x_ref[2]
+            arg[(0, 2, 1)]+=0.809060209209*x[2]**o + (-0.0927061003594)*x[2]
+            ref[(0, 2, 1)]+=0.809060209209*x_ref[2]**o + (-0.0927061003594)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.939328448756*x[2]**o + (-0.614907735161)*x[2]
+            ref[(0, 2, 2)]+=-0.939328448756*x_ref[2]**o + (-0.614907735161)*x_ref[2]
+            arg[(0, 2, 3)]+=-0.393529847876*x[2]**o + (-0.119495664484)*x[2]
+            ref[(0, 2, 3)]+=-0.393529847876*x_ref[2]**o + (-0.119495664484)*x_ref[2]
+            arg[(0, 3, 0)]+=0.358336446072*x[2]**o + (-0.655126782857)*x[2]
+            ref[(0, 3, 0)]+=0.358336446072*x_ref[2]**o + (-0.655126782857)*x_ref[2]
+            arg[(0, 3, 1)]+=0.149350892833*x[2]**o + (0.921076841702)*x[2]
+            ref[(0, 3, 1)]+=0.149350892833*x_ref[2]**o + (0.921076841702)*x_ref[2]
+            arg[(0, 3, 2)]+=-0.829332159434*x[2]**o + (-0.591877305684)*x[2]
+            ref[(0, 3, 2)]+=-0.829332159434*x_ref[2]**o + (-0.591877305684)*x_ref[2]
+            arg[(0, 3, 3)]+=0.254516044723*x[2]**o + (-0.772402099528)*x[2]
+            ref[(0, 3, 3)]+=0.254516044723*x_ref[2]**o + (-0.772402099528)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.647912175288*x[2]**o + (0.558203772899)*x[2]
+            ref[(1, 0, 0)]+=-0.647912175288*x_ref[2]**o + (0.558203772899)*x_ref[2]
+            arg[(1, 0, 1)]+=0.602169157082*x[2]**o + (-0.330013332983)*x[2]
+            ref[(1, 0, 1)]+=0.602169157082*x_ref[2]**o + (-0.330013332983)*x_ref[2]
+            arg[(1, 0, 2)]+=0.711496904235*x[2]**o + (0.639823098149)*x[2]
+            ref[(1, 0, 2)]+=0.711496904235*x_ref[2]**o + (0.639823098149)*x_ref[2]
+            arg[(1, 0, 3)]+=-0.151391974845*x[2]**o + (0.692894648482)*x[2]
+            ref[(1, 0, 3)]+=-0.151391974845*x_ref[2]**o + (0.692894648482)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.21183507867*x[2]**o + (0.297118668846)*x[2]
+            ref[(1, 1, 0)]+=-0.21183507867*x_ref[2]**o + (0.297118668846)*x_ref[2]
+            arg[(1, 1, 1)]+=0.675458519267*x[2]**o + (0.224730082295)*x[2]
+            ref[(1, 1, 1)]+=0.675458519267*x_ref[2]**o + (0.224730082295)*x_ref[2]
+            arg[(1, 1, 2)]+=0.208834105547*x[2]**o + (0.372198900795)*x[2]
+            ref[(1, 1, 2)]+=0.208834105547*x_ref[2]**o + (0.372198900795)*x_ref[2]
+            arg[(1, 1, 3)]+=-0.668680974413*x[2]**o + (0.0692728528199)*x[2]
+            ref[(1, 1, 3)]+=-0.668680974413*x_ref[2]**o + (0.0692728528199)*x_ref[2]
+            arg[(1, 2, 0)]+=0.0331774902945*x[2]**o + (-0.0914314894331)*x[2]
+            ref[(1, 2, 0)]+=0.0331774902945*x_ref[2]**o + (-0.0914314894331)*x_ref[2]
+            arg[(1, 2, 1)]+=0.442605447677*x[2]**o + (0.316912745422)*x[2]
+            ref[(1, 2, 1)]+=0.442605447677*x_ref[2]**o + (0.316912745422)*x_ref[2]
+            arg[(1, 2, 2)]+=-0.261321107554*x[2]**o + (0.5305914327)*x[2]
+            ref[(1, 2, 2)]+=-0.261321107554*x_ref[2]**o + (0.5305914327)*x_ref[2]
+            arg[(1, 2, 3)]+=-0.980168429411*x[2]**o + (0.42820234106)*x[2]
+            ref[(1, 2, 3)]+=-0.980168429411*x_ref[2]**o + (0.42820234106)*x_ref[2]
+            arg[(1, 3, 0)]+=0.5657335064*x[2]**o + (0.547022391612)*x[2]
+            ref[(1, 3, 0)]+=0.5657335064*x_ref[2]**o + (0.547022391612)*x_ref[2]
+            arg[(1, 3, 1)]+=0.257082147522*x[2]**o + (-0.246538003056)*x[2]
+            ref[(1, 3, 1)]+=0.257082147522*x_ref[2]**o + (-0.246538003056)*x_ref[2]
+            arg[(1, 3, 2)]+=0.312086018129*x[2]**o + (-0.573490672699)*x[2]
+            ref[(1, 3, 2)]+=0.312086018129*x_ref[2]**o + (-0.573490672699)*x_ref[2]
+            arg[(1, 3, 3)]+=0.341132965019*x[2]**o + (-0.29259751176)*x[2]
+            ref[(1, 3, 3)]+=0.341132965019*x_ref[2]**o + (-0.29259751176)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.584476674034*x[2]**o + (0.681884927309)*x[2]
+            ref[(2, 0, 0)]+=-0.584476674034*x_ref[2]**o + (0.681884927309)*x_ref[2]
+            arg[(2, 0, 1)]+=0.319396975916*x[2]**o + (-0.877001365112)*x[2]
+            ref[(2, 0, 1)]+=0.319396975916*x_ref[2]**o + (-0.877001365112)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.489301957495*x[2]**o + (0.974208303795)*x[2]
+            ref[(2, 0, 2)]+=-0.489301957495*x_ref[2]**o + (0.974208303795)*x_ref[2]
+            arg[(2, 0, 3)]+=-0.832473739614*x[2]**o + (0.881470658015)*x[2]
+            ref[(2, 0, 3)]+=-0.832473739614*x_ref[2]**o + (0.881470658015)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.982723596168*x[2]**o + (0.00847117794738)*x[2]
+            ref[(2, 1, 0)]+=-0.982723596168*x_ref[2]**o + (0.00847117794738)*x_ref[2]
+            arg[(2, 1, 1)]+=0.598101408383*x[2]**o + (0.122556302146)*x[2]
+            ref[(2, 1, 1)]+=0.598101408383*x_ref[2]**o + (0.122556302146)*x_ref[2]
+            arg[(2, 1, 2)]+=0.717024101909*x[2]**o + (-0.633499389607)*x[2]
+            ref[(2, 1, 2)]+=0.717024101909*x_ref[2]**o + (-0.633499389607)*x_ref[2]
+            arg[(2, 1, 3)]+=0.168306571947*x[2]**o + (-0.737716388487)*x[2]
+            ref[(2, 1, 3)]+=0.168306571947*x_ref[2]**o + (-0.737716388487)*x_ref[2]
+            arg[(2, 2, 0)]+=0.076096621693*x[2]**o + (0.766324633822)*x[2]
+            ref[(2, 2, 0)]+=0.076096621693*x_ref[2]**o + (0.766324633822)*x_ref[2]
+            arg[(2, 2, 1)]+=-0.821981332893*x[2]**o + (-0.0214990847613)*x[2]
+            ref[(2, 2, 1)]+=-0.821981332893*x_ref[2]**o + (-0.0214990847613)*x_ref[2]
+            arg[(2, 2, 2)]+=0.127409016693*x[2]**o + (0.434328669897)*x[2]
+            ref[(2, 2, 2)]+=0.127409016693*x_ref[2]**o + (0.434328669897)*x_ref[2]
+            arg[(2, 2, 3)]+=-0.896521534741*x[2]**o + (0.00315899607526)*x[2]
+            ref[(2, 2, 3)]+=-0.896521534741*x_ref[2]**o + (0.00315899607526)*x_ref[2]
+            arg[(2, 3, 0)]+=-0.806678307121*x[2]**o + (0.773194907751)*x[2]
+            ref[(2, 3, 0)]+=-0.806678307121*x_ref[2]**o + (0.773194907751)*x_ref[2]
+            arg[(2, 3, 1)]+=0.505400425972*x[2]**o + (0.0115553928027)*x[2]
+            ref[(2, 3, 1)]+=0.505400425972*x_ref[2]**o + (0.0115553928027)*x_ref[2]
+            arg[(2, 3, 2)]+=0.543055072531*x[2]**o + (-0.247825305895)*x[2]
+            ref[(2, 3, 2)]+=0.543055072531*x_ref[2]**o + (-0.247825305895)*x_ref[2]
+            arg[(2, 3, 3)]+=0.149254989813*x[2]**o + (-0.604354430989)*x[2]
+            ref[(2, 3, 3)]+=0.149254989813*x_ref[2]**o + (-0.604354430989)*x_ref[2]
+            arg[(3, 0, 0)]+=0.873827015451*x[2]**o + (-0.97514830544)*x[2]
+            ref[(3, 0, 0)]+=0.873827015451*x_ref[2]**o + (-0.97514830544)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.0999666456256*x[2]**o + (0.421192118321)*x[2]
+            ref[(3, 0, 1)]+=-0.0999666456256*x_ref[2]**o + (0.421192118321)*x_ref[2]
+            arg[(3, 0, 2)]+=0.44889013415*x[2]**o + (0.894621784031)*x[2]
+            ref[(3, 0, 2)]+=0.44889013415*x_ref[2]**o + (0.894621784031)*x_ref[2]
+            arg[(3, 0, 3)]+=-0.512387928469*x[2]**o + (0.603000887245)*x[2]
+            ref[(3, 0, 3)]+=-0.512387928469*x_ref[2]**o + (0.603000887245)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.630105924865*x[2]**o + (-0.355245499631)*x[2]
+            ref[(3, 1, 0)]+=-0.630105924865*x_ref[2]**o + (-0.355245499631)*x_ref[2]
+            arg[(3, 1, 1)]+=0.662243513134*x[2]**o + (-0.0243858010018)*x[2]
+            ref[(3, 1, 1)]+=0.662243513134*x_ref[2]**o + (-0.0243858010018)*x_ref[2]
+            arg[(3, 1, 2)]+=0.156190270662*x[2]**o + (0.157433148254)*x[2]
+            ref[(3, 1, 2)]+=0.156190270662*x_ref[2]**o + (0.157433148254)*x_ref[2]
+            arg[(3, 1, 3)]+=-0.545625749529*x[2]**o + (0.339120759913)*x[2]
+            ref[(3, 1, 3)]+=-0.545625749529*x_ref[2]**o + (0.339120759913)*x_ref[2]
+            arg[(3, 2, 0)]+=-0.698490326496*x[2]**o + (-0.207611913608)*x[2]
+            ref[(3, 2, 0)]+=-0.698490326496*x_ref[2]**o + (-0.207611913608)*x_ref[2]
+            arg[(3, 2, 1)]+=0.309804276908*x[2]**o + (0.914505388859)*x[2]
+            ref[(3, 2, 1)]+=0.309804276908*x_ref[2]**o + (0.914505388859)*x_ref[2]
+            arg[(3, 2, 2)]+=0.462238517301*x[2]**o + (-0.903936246353)*x[2]
+            ref[(3, 2, 2)]+=0.462238517301*x_ref[2]**o + (-0.903936246353)*x_ref[2]
+            arg[(3, 2, 3)]+=-0.624496753332*x[2]**o + (0.123510903252)*x[2]
+            ref[(3, 2, 3)]+=-0.624496753332*x_ref[2]**o + (0.123510903252)*x_ref[2]
+            arg[(3, 3, 0)]+=0.102615373958*x[2]**o + (-0.745206591773)*x[2]
+            ref[(3, 3, 0)]+=0.102615373958*x_ref[2]**o + (-0.745206591773)*x_ref[2]
+            arg[(3, 3, 1)]+=-0.185565965157*x[2]**o + (-0.961086059504)*x[2]
+            ref[(3, 3, 1)]+=-0.185565965157*x_ref[2]**o + (-0.961086059504)*x_ref[2]
+            arg[(3, 3, 2)]+=-0.622581094313*x[2]**o + (-0.0813294176967)*x[2]
+            ref[(3, 3, 2)]+=-0.622581094313*x_ref[2]**o + (-0.0813294176967)*x_ref[2]
+            arg[(3, 3, 3)]+=-0.456643641561*x[2]**o + (0.57564871872)*x[2]
+            ref[(3, 3, 3)]+=-0.456643641561*x_ref[2]**o + (0.57564871872)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4, 4),w)
+        ref = Data(0,(2, 2, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.846772535805*x[0]**o + (-0.61423105728)*x[0] + (0.461457058651)*x[1]**o + (0.216904506824)*x[1]
+        ref[(0, 0, 0, 0)]=-0.846772535805*x_ref[0]**o + (-0.61423105728)*x_ref[0] + (0.461457058651)*x_ref[1]**o + (0.216904506824)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.22146697796*x[0]**o + (0.856037276897)*x[0] + (0.380845499023)*x[1]**o + (-0.596326597767)*x[1]
+        ref[(0, 0, 0, 1)]=-0.22146697796*x_ref[0]**o + (0.856037276897)*x_ref[0] + (0.380845499023)*x_ref[1]**o + (-0.596326597767)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.640982194009*x[0]**o + (0.0467522790623)*x[0] + (-0.00851815322242)*x[1]**o + (-0.790018501924)*x[1]
+        ref[(0, 0, 0, 2)]=-0.640982194009*x_ref[0]**o + (0.0467522790623)*x_ref[0] + (-0.00851815322242)*x_ref[1]**o + (-0.790018501924)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.929402080397*x[0]**o + (0.539953425865)*x[0] + (0.366018508515)*x[1]**o + (0.204553501224)*x[1]
+        ref[(0, 0, 0, 3)]=0.929402080397*x_ref[0]**o + (0.539953425865)*x_ref[0] + (0.366018508515)*x_ref[1]**o + (0.204553501224)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.0384214266616*x[0]**o + (-0.150341644219)*x[0] + (-0.366670793447)*x[1]**o + (-0.0678226103902)*x[1]
+        ref[(0, 0, 1, 0)]=0.0384214266616*x_ref[0]**o + (-0.150341644219)*x_ref[0] + (-0.366670793447)*x_ref[1]**o + (-0.0678226103902)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.637036360602*x[0]**o + (0.614760131555)*x[0] + (0.743470561958)*x[1]**o + (-0.0973502108187)*x[1]
+        ref[(0, 0, 1, 1)]=0.637036360602*x_ref[0]**o + (0.614760131555)*x_ref[0] + (0.743470561958)*x_ref[1]**o + (-0.0973502108187)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.0629227625636*x[0]**o + (-0.157046351852)*x[0] + (-0.762367129292)*x[1]**o + (-0.75076452768)*x[1]
+        ref[(0, 0, 1, 2)]=-0.0629227625636*x_ref[0]**o + (-0.157046351852)*x_ref[0] + (-0.762367129292)*x_ref[1]**o + (-0.75076452768)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.871838170153*x[0]**o + (0.180042058058)*x[0] + (0.772808772615)*x[1]**o + (-0.0639056853527)*x[1]
+        ref[(0, 0, 1, 3)]=-0.871838170153*x_ref[0]**o + (0.180042058058)*x_ref[0] + (0.772808772615)*x_ref[1]**o + (-0.0639056853527)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.758916938509*x[0]**o + (-0.133984467911)*x[0] + (0.228189161944)*x[1]**o + (0.171248977853)*x[1]
+        ref[(0, 0, 2, 0)]=-0.758916938509*x_ref[0]**o + (-0.133984467911)*x_ref[0] + (0.228189161944)*x_ref[1]**o + (0.171248977853)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.396713326407*x[0]**o + (0.147745758478)*x[0] + (0.285393875944)*x[1]**o + (0.257374033822)*x[1]
+        ref[(0, 0, 2, 1)]=-0.396713326407*x_ref[0]**o + (0.147745758478)*x_ref[0] + (0.285393875944)*x_ref[1]**o + (0.257374033822)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.291138282826*x[0]**o + (0.434424700451)*x[0] + (0.84916813219)*x[1]**o + (-0.5008198776)*x[1]
+        ref[(0, 0, 2, 2)]=-0.291138282826*x_ref[0]**o + (0.434424700451)*x_ref[0] + (0.84916813219)*x_ref[1]**o + (-0.5008198776)*x_ref[1]
+        arg[(0, 0, 2, 3)]=0.624216927268*x[0]**o + (0.57101889484)*x[0] + (0.349926385007)*x[1]**o + (0.293505795737)*x[1]
+        ref[(0, 0, 2, 3)]=0.624216927268*x_ref[0]**o + (0.57101889484)*x_ref[0] + (0.349926385007)*x_ref[1]**o + (0.293505795737)*x_ref[1]
+        arg[(0, 0, 3, 0)]=-0.274055171921*x[0]**o + (-0.204304095982)*x[0] + (0.0371184633391)*x[1]**o + (0.86006315886)*x[1]
+        ref[(0, 0, 3, 0)]=-0.274055171921*x_ref[0]**o + (-0.204304095982)*x_ref[0] + (0.0371184633391)*x_ref[1]**o + (0.86006315886)*x_ref[1]
+        arg[(0, 0, 3, 1)]=-0.941365935666*x[0]**o + (0.902778722962)*x[0] + (-0.430684621026)*x[1]**o + (0.721564000755)*x[1]
+        ref[(0, 0, 3, 1)]=-0.941365935666*x_ref[0]**o + (0.902778722962)*x_ref[0] + (-0.430684621026)*x_ref[1]**o + (0.721564000755)*x_ref[1]
+        arg[(0, 0, 3, 2)]=-0.301559143682*x[0]**o + (-0.207350847858)*x[0] + (-0.104240323656)*x[1]**o + (0.819335592274)*x[1]
+        ref[(0, 0, 3, 2)]=-0.301559143682*x_ref[0]**o + (-0.207350847858)*x_ref[0] + (-0.104240323656)*x_ref[1]**o + (0.819335592274)*x_ref[1]
+        arg[(0, 0, 3, 3)]=-0.850257465753*x[0]**o + (0.15339903501)*x[0] + (-0.941424144333)*x[1]**o + (0.878600870004)*x[1]
+        ref[(0, 0, 3, 3)]=-0.850257465753*x_ref[0]**o + (0.15339903501)*x_ref[0] + (-0.941424144333)*x_ref[1]**o + (0.878600870004)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.512801409653*x[0]**o + (-0.195506556074)*x[0] + (0.584072184471)*x[1]**o + (-0.763403655751)*x[1]
+        ref[(0, 1, 0, 0)]=0.512801409653*x_ref[0]**o + (-0.195506556074)*x_ref[0] + (0.584072184471)*x_ref[1]**o + (-0.763403655751)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.207681697158*x[0]**o + (0.833186025934)*x[0] + (0.848328288474)*x[1]**o + (-0.0899808928851)*x[1]
+        ref[(0, 1, 0, 1)]=0.207681697158*x_ref[0]**o + (0.833186025934)*x_ref[0] + (0.848328288474)*x_ref[1]**o + (-0.0899808928851)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.795104766254*x[0]**o + (0.522945728384)*x[0] + (0.358900398628)*x[1]**o + (0.123503518815)*x[1]
+        ref[(0, 1, 0, 2)]=-0.795104766254*x_ref[0]**o + (0.522945728384)*x_ref[0] + (0.358900398628)*x_ref[1]**o + (0.123503518815)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.789145717133*x[0]**o + (-0.14274977966)*x[0] + (0.936331703297)*x[1]**o + (0.615895148991)*x[1]
+        ref[(0, 1, 0, 3)]=0.789145717133*x_ref[0]**o + (-0.14274977966)*x_ref[0] + (0.936331703297)*x_ref[1]**o + (0.615895148991)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.206104379213*x[0]**o + (0.410286913629)*x[0] + (-0.20596864004)*x[1]**o + (0.225633408245)*x[1]
+        ref[(0, 1, 1, 0)]=0.206104379213*x_ref[0]**o + (0.410286913629)*x_ref[0] + (-0.20596864004)*x_ref[1]**o + (0.225633408245)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.837714303226*x[0]**o + (0.794616721031)*x[0] + (0.833970481483)*x[1]**o + (-0.10806665358)*x[1]
+        ref[(0, 1, 1, 1)]=-0.837714303226*x_ref[0]**o + (0.794616721031)*x_ref[0] + (0.833970481483)*x_ref[1]**o + (-0.10806665358)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.142319110013*x[0]**o + (0.944300157175)*x[0] + (0.643639930509)*x[1]**o + (0.492650048998)*x[1]
+        ref[(0, 1, 1, 2)]=-0.142319110013*x_ref[0]**o + (0.944300157175)*x_ref[0] + (0.643639930509)*x_ref[1]**o + (0.492650048998)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.494917603605*x[0]**o + (-0.268120914137)*x[0] + (-0.87175637441)*x[1]**o + (0.504792672149)*x[1]
+        ref[(0, 1, 1, 3)]=0.494917603605*x_ref[0]**o + (-0.268120914137)*x_ref[0] + (-0.87175637441)*x_ref[1]**o + (0.504792672149)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.427013193907*x[0]**o + (0.428574561442)*x[0] + (-0.197142717811)*x[1]**o + (-0.00582101152685)*x[1]
+        ref[(0, 1, 2, 0)]=-0.427013193907*x_ref[0]**o + (0.428574561442)*x_ref[0] + (-0.197142717811)*x_ref[1]**o + (-0.00582101152685)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.319502880509*x[0]**o + (0.0355004102282)*x[0] + (-0.336931657403)*x[1]**o + (0.600581120826)*x[1]
+        ref[(0, 1, 2, 1)]=0.319502880509*x_ref[0]**o + (0.0355004102282)*x_ref[0] + (-0.336931657403)*x_ref[1]**o + (0.600581120826)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.834289849156*x[0]**o + (0.079271440961)*x[0] + (-0.956959043815)*x[1]**o + (0.101400184511)*x[1]
+        ref[(0, 1, 2, 2)]=-0.834289849156*x_ref[0]**o + (0.079271440961)*x_ref[0] + (-0.956959043815)*x_ref[1]**o + (0.101400184511)*x_ref[1]
+        arg[(0, 1, 2, 3)]=0.0132099491941*x[0]**o + (-0.813475118657)*x[0] + (-0.730158726774)*x[1]**o + (-0.240975374716)*x[1]
+        ref[(0, 1, 2, 3)]=0.0132099491941*x_ref[0]**o + (-0.813475118657)*x_ref[0] + (-0.730158726774)*x_ref[1]**o + (-0.240975374716)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.751671968861*x[0]**o + (-0.266779339247)*x[0] + (-0.858837267047)*x[1]**o + (0.0989160725952)*x[1]
+        ref[(0, 1, 3, 0)]=-0.751671968861*x_ref[0]**o + (-0.266779339247)*x_ref[0] + (-0.858837267047)*x_ref[1]**o + (0.0989160725952)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.176190194766*x[0]**o + (0.957640259814)*x[0] + (-0.0832851623444)*x[1]**o + (0.536404295617)*x[1]
+        ref[(0, 1, 3, 1)]=-0.176190194766*x_ref[0]**o + (0.957640259814)*x_ref[0] + (-0.0832851623444)*x_ref[1]**o + (0.536404295617)*x_ref[1]
+        arg[(0, 1, 3, 2)]=-0.0527931060415*x[0]**o + (0.441693868268)*x[0] + (0.923862293607)*x[1]**o + (0.197872302471)*x[1]
+        ref[(0, 1, 3, 2)]=-0.0527931060415*x_ref[0]**o + (0.441693868268)*x_ref[0] + (0.923862293607)*x_ref[1]**o + (0.197872302471)*x_ref[1]
+        arg[(0, 1, 3, 3)]=-0.904474389757*x[0]**o + (-0.490514153751)*x[0] + (0.261301202889)*x[1]**o + (0.432579888108)*x[1]
+        ref[(0, 1, 3, 3)]=-0.904474389757*x_ref[0]**o + (-0.490514153751)*x_ref[0] + (0.261301202889)*x_ref[1]**o + (0.432579888108)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.43529893507*x[0]**o + (0.974032106344)*x[0] + (-0.00491163701967)*x[1]**o + (0.776408467407)*x[1]
+        ref[(1, 0, 0, 0)]=0.43529893507*x_ref[0]**o + (0.974032106344)*x_ref[0] + (-0.00491163701967)*x_ref[1]**o + (0.776408467407)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.77518081131*x[0]**o + (-0.131210180446)*x[0] + (0.536800993902)*x[1]**o + (0.265077535607)*x[1]
+        ref[(1, 0, 0, 1)]=0.77518081131*x_ref[0]**o + (-0.131210180446)*x_ref[0] + (0.536800993902)*x_ref[1]**o + (0.265077535607)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.421672792737*x[0]**o + (-0.0760310963155)*x[0] + (0.500809195992)*x[1]**o + (-0.885166254593)*x[1]
+        ref[(1, 0, 0, 2)]=0.421672792737*x_ref[0]**o + (-0.0760310963155)*x_ref[0] + (0.500809195992)*x_ref[1]**o + (-0.885166254593)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.796992489343*x[0]**o + (0.697293981959)*x[0] + (0.553659177402)*x[1]**o + (0.096610734299)*x[1]
+        ref[(1, 0, 0, 3)]=-0.796992489343*x_ref[0]**o + (0.697293981959)*x_ref[0] + (0.553659177402)*x_ref[1]**o + (0.096610734299)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.442729173812*x[0]**o + (0.277438477435)*x[0] + (0.778877176635)*x[1]**o + (-0.173616349078)*x[1]
+        ref[(1, 0, 1, 0)]=0.442729173812*x_ref[0]**o + (0.277438477435)*x_ref[0] + (0.778877176635)*x_ref[1]**o + (-0.173616349078)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.779548000803*x[0]**o + (-0.412808853937)*x[0] + (-0.0949147547499)*x[1]**o + (0.311946492665)*x[1]
+        ref[(1, 0, 1, 1)]=0.779548000803*x_ref[0]**o + (-0.412808853937)*x_ref[0] + (-0.0949147547499)*x_ref[1]**o + (0.311946492665)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.861866962005*x[0]**o + (-0.933678418207)*x[0] + (-0.450276453686)*x[1]**o + (-0.344765936416)*x[1]
+        ref[(1, 0, 1, 2)]=0.861866962005*x_ref[0]**o + (-0.933678418207)*x_ref[0] + (-0.450276453686)*x_ref[1]**o + (-0.344765936416)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.376327819424*x[0]**o + (0.256077622428)*x[0] + (0.831014645354)*x[1]**o + (-0.603303856858)*x[1]
+        ref[(1, 0, 1, 3)]=0.376327819424*x_ref[0]**o + (0.256077622428)*x_ref[0] + (0.831014645354)*x_ref[1]**o + (-0.603303856858)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.516169369557*x[0]**o + (-0.426667893604)*x[0] + (0.396563677094)*x[1]**o + (-0.42142565044)*x[1]
+        ref[(1, 0, 2, 0)]=-0.516169369557*x_ref[0]**o + (-0.426667893604)*x_ref[0] + (0.396563677094)*x_ref[1]**o + (-0.42142565044)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.987197768725*x[0]**o + (-0.316291862992)*x[0] + (0.0783840484291)*x[1]**o + (-0.698663251164)*x[1]
+        ref[(1, 0, 2, 1)]=0.987197768725*x_ref[0]**o + (-0.316291862992)*x_ref[0] + (0.0783840484291)*x_ref[1]**o + (-0.698663251164)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.860500697153*x[0]**o + (0.654374407477)*x[0] + (-0.381014534387)*x[1]**o + (0.903888708259)*x[1]
+        ref[(1, 0, 2, 2)]=0.860500697153*x_ref[0]**o + (0.654374407477)*x_ref[0] + (-0.381014534387)*x_ref[1]**o + (0.903888708259)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.201239343299*x[0]**o + (0.805371581446)*x[0] + (0.772211387152)*x[1]**o + (-0.700733570946)*x[1]
+        ref[(1, 0, 2, 3)]=-0.201239343299*x_ref[0]**o + (0.805371581446)*x_ref[0] + (0.772211387152)*x_ref[1]**o + (-0.700733570946)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.291027168359*x[0]**o + (-0.153392164809)*x[0] + (-0.856708176702)*x[1]**o + (-0.895369962428)*x[1]
+        ref[(1, 0, 3, 0)]=-0.291027168359*x_ref[0]**o + (-0.153392164809)*x_ref[0] + (-0.856708176702)*x_ref[1]**o + (-0.895369962428)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.086044218744*x[0]**o + (-0.844567158949)*x[0] + (-0.759490328244)*x[1]**o + (0.254093737148)*x[1]
+        ref[(1, 0, 3, 1)]=0.086044218744*x_ref[0]**o + (-0.844567158949)*x_ref[0] + (-0.759490328244)*x_ref[1]**o + (0.254093737148)*x_ref[1]
+        arg[(1, 0, 3, 2)]=0.503825151909*x[0]**o + (0.833413603894)*x[0] + (0.711697415421)*x[1]**o + (-0.391827720685)*x[1]
+        ref[(1, 0, 3, 2)]=0.503825151909*x_ref[0]**o + (0.833413603894)*x_ref[0] + (0.711697415421)*x_ref[1]**o + (-0.391827720685)*x_ref[1]
+        arg[(1, 0, 3, 3)]=0.96461817917*x[0]**o + (0.662366568395)*x[0] + (0.739847119634)*x[1]**o + (-0.632169101597)*x[1]
+        ref[(1, 0, 3, 3)]=0.96461817917*x_ref[0]**o + (0.662366568395)*x_ref[0] + (0.739847119634)*x_ref[1]**o + (-0.632169101597)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.0905778040603*x[0]**o + (-0.331443849575)*x[0] + (0.00451467058734)*x[1]**o + (0.0941171967908)*x[1]
+        ref[(1, 1, 0, 0)]=-0.0905778040603*x_ref[0]**o + (-0.331443849575)*x_ref[0] + (0.00451467058734)*x_ref[1]**o + (0.0941171967908)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.130184922228*x[0]**o + (-0.541983911746)*x[0] + (-0.826997881154)*x[1]**o + (-0.316488843688)*x[1]
+        ref[(1, 1, 0, 1)]=0.130184922228*x_ref[0]**o + (-0.541983911746)*x_ref[0] + (-0.826997881154)*x_ref[1]**o + (-0.316488843688)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.746377099514*x[0]**o + (0.186738737025)*x[0] + (0.541991765144)*x[1]**o + (-0.0914714733594)*x[1]
+        ref[(1, 1, 0, 2)]=-0.746377099514*x_ref[0]**o + (0.186738737025)*x_ref[0] + (0.541991765144)*x_ref[1]**o + (-0.0914714733594)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.122618304532*x[0]**o + (-0.842715233864)*x[0] + (-0.0415618668563)*x[1]**o + (0.264476872349)*x[1]
+        ref[(1, 1, 0, 3)]=0.122618304532*x_ref[0]**o + (-0.842715233864)*x_ref[0] + (-0.0415618668563)*x_ref[1]**o + (0.264476872349)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.23713278371*x[0]**o + (0.822156729141)*x[0] + (0.542333654608)*x[1]**o + (-0.309952869997)*x[1]
+        ref[(1, 1, 1, 0)]=-0.23713278371*x_ref[0]**o + (0.822156729141)*x_ref[0] + (0.542333654608)*x_ref[1]**o + (-0.309952869997)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.329299556166*x[0]**o + (-0.127544162308)*x[0] + (0.725860902882)*x[1]**o + (0.309331561179)*x[1]
+        ref[(1, 1, 1, 1)]=-0.329299556166*x_ref[0]**o + (-0.127544162308)*x_ref[0] + (0.725860902882)*x_ref[1]**o + (0.309331561179)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.216875048688*x[0]**o + (-0.811703506179)*x[0] + (0.906841520693)*x[1]**o + (0.609017225794)*x[1]
+        ref[(1, 1, 1, 2)]=-0.216875048688*x_ref[0]**o + (-0.811703506179)*x_ref[0] + (0.906841520693)*x_ref[1]**o + (0.609017225794)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.82025855373*x[0]**o + (0.13321647878)*x[0] + (0.307486393768)*x[1]**o + (0.421117400968)*x[1]
+        ref[(1, 1, 1, 3)]=0.82025855373*x_ref[0]**o + (0.13321647878)*x_ref[0] + (0.307486393768)*x_ref[1]**o + (0.421117400968)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.931132951569*x[0]**o + (-0.150751418191)*x[0] + (0.00349864341389)*x[1]**o + (0.833879935304)*x[1]
+        ref[(1, 1, 2, 0)]=-0.931132951569*x_ref[0]**o + (-0.150751418191)*x_ref[0] + (0.00349864341389)*x_ref[1]**o + (0.833879935304)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.359837700022*x[0]**o + (-0.793111255094)*x[0] + (0.720898859079)*x[1]**o + (0.201347147834)*x[1]
+        ref[(1, 1, 2, 1)]=-0.359837700022*x_ref[0]**o + (-0.793111255094)*x_ref[0] + (0.720898859079)*x_ref[1]**o + (0.201347147834)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.39821580882*x[0]**o + (0.324094137971)*x[0] + (0.993281374638)*x[1]**o + (0.778620608018)*x[1]
+        ref[(1, 1, 2, 2)]=0.39821580882*x_ref[0]**o + (0.324094137971)*x_ref[0] + (0.993281374638)*x_ref[1]**o + (0.778620608018)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.0085366498365*x[0]**o + (-0.377703591101)*x[0] + (0.947092420296)*x[1]**o + (0.761454431597)*x[1]
+        ref[(1, 1, 2, 3)]=-0.0085366498365*x_ref[0]**o + (-0.377703591101)*x_ref[0] + (0.947092420296)*x_ref[1]**o + (0.761454431597)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.839774608312*x[0]**o + (0.685947199767)*x[0] + (-0.160498902764)*x[1]**o + (0.873830075025)*x[1]
+        ref[(1, 1, 3, 0)]=-0.839774608312*x_ref[0]**o + (0.685947199767)*x_ref[0] + (-0.160498902764)*x_ref[1]**o + (0.873830075025)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.784386929182*x[0]**o + (0.729618274609)*x[0] + (-0.620074762101)*x[1]**o + (0.0484728222286)*x[1]
+        ref[(1, 1, 3, 1)]=0.784386929182*x_ref[0]**o + (0.729618274609)*x_ref[0] + (-0.620074762101)*x_ref[1]**o + (0.0484728222286)*x_ref[1]
+        arg[(1, 1, 3, 2)]=-0.76726779223*x[0]**o + (0.994761404086)*x[0] + (-0.594864585888)*x[1]**o + (-0.451292815628)*x[1]
+        ref[(1, 1, 3, 2)]=-0.76726779223*x_ref[0]**o + (0.994761404086)*x_ref[0] + (-0.594864585888)*x_ref[1]**o + (-0.451292815628)*x_ref[1]
+        arg[(1, 1, 3, 3)]=0.09204945513*x[0]**o + (0.568547101246)*x[0] + (0.492645199073)*x[1]**o + (-0.482400185541)*x[1]
+        ref[(1, 1, 3, 3)]=0.09204945513*x_ref[0]**o + (0.568547101246)*x_ref[0] + (0.492645199073)*x_ref[1]**o + (-0.482400185541)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.781665577079*x[2]**o + (-0.862279224093)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.781665577079*x_ref[2]**o + (-0.862279224093)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.980342560359*x[2]**o + (0.88435446539)*x[2]
+            ref[(0, 0, 0, 1)]+=0.980342560359*x_ref[2]**o + (0.88435446539)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.026094168118*x[2]**o + (0.68291985259)*x[2]
+            ref[(0, 0, 0, 2)]+=0.026094168118*x_ref[2]**o + (0.68291985259)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.457077794599*x[2]**o + (-0.344472511929)*x[2]
+            ref[(0, 0, 0, 3)]+=0.457077794599*x_ref[2]**o + (-0.344472511929)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.973939177828*x[2]**o + (0.165112594355)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.973939177828*x_ref[2]**o + (0.165112594355)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.431995155125*x[2]**o + (0.176345085323)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.431995155125*x_ref[2]**o + (0.176345085323)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.10644328309*x[2]**o + (-0.291418131818)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.10644328309*x_ref[2]**o + (-0.291418131818)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.553247053853*x[2]**o + (-0.365543753073)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.553247053853*x_ref[2]**o + (-0.365543753073)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.0980408760596*x[2]**o + (0.997573591537)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.0980408760596*x_ref[2]**o + (0.997573591537)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.73532123807*x[2]**o + (-0.125824442605)*x[2]
+            ref[(0, 0, 2, 1)]+=0.73532123807*x_ref[2]**o + (-0.125824442605)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.0342798247944*x[2]**o + (-0.816657752827)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.0342798247944*x_ref[2]**o + (-0.816657752827)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.191725692864*x[2]**o + (-0.112137241557)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.191725692864*x_ref[2]**o + (-0.112137241557)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.655516733048*x[2]**o + (-0.557462386519)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.655516733048*x_ref[2]**o + (-0.557462386519)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.1979888697*x[2]**o + (0.831573490756)*x[2]
+            ref[(0, 0, 3, 1)]+=0.1979888697*x_ref[2]**o + (0.831573490756)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=-0.940420556817*x[2]**o + (-0.0647995442939)*x[2]
+            ref[(0, 0, 3, 2)]+=-0.940420556817*x_ref[2]**o + (-0.0647995442939)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=0.652737480662*x[2]**o + (0.611348811067)*x[2]
+            ref[(0, 0, 3, 3)]+=0.652737480662*x_ref[2]**o + (0.611348811067)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.852410183271*x[2]**o + (-0.64315030142)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.852410183271*x_ref[2]**o + (-0.64315030142)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.472926083024*x[2]**o + (-0.109846263016)*x[2]
+            ref[(0, 1, 0, 1)]+=0.472926083024*x_ref[2]**o + (-0.109846263016)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.0168927195943*x[2]**o + (-0.926578708913)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.0168927195943*x_ref[2]**o + (-0.926578708913)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.853258402209*x[2]**o + (0.3216115224)*x[2]
+            ref[(0, 1, 0, 3)]+=0.853258402209*x_ref[2]**o + (0.3216115224)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.149377537688*x[2]**o + (-0.769867888956)*x[2]
+            ref[(0, 1, 1, 0)]+=0.149377537688*x_ref[2]**o + (-0.769867888956)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.864524348178*x[2]**o + (-0.187675125453)*x[2]
+            ref[(0, 1, 1, 1)]+=0.864524348178*x_ref[2]**o + (-0.187675125453)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.0314283911023*x[2]**o + (-0.0730935834246)*x[2]
+            ref[(0, 1, 1, 2)]+=0.0314283911023*x_ref[2]**o + (-0.0730935834246)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.428216063678*x[2]**o + (0.215710951904)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.428216063678*x_ref[2]**o + (0.215710951904)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.00434432627626*x[2]**o + (-0.748405856646)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.00434432627626*x_ref[2]**o + (-0.748405856646)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.72316541467*x[2]**o + (-0.232212182592)*x[2]
+            ref[(0, 1, 2, 1)]+=0.72316541467*x_ref[2]**o + (-0.232212182592)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.426695109871*x[2]**o + (0.0734774882373)*x[2]
+            ref[(0, 1, 2, 2)]+=0.426695109871*x_ref[2]**o + (0.0734774882373)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.283937169495*x[2]**o + (-0.98329553778)*x[2]
+            ref[(0, 1, 2, 3)]+=0.283937169495*x_ref[2]**o + (-0.98329553778)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=0.157997339628*x[2]**o + (-0.748733198546)*x[2]
+            ref[(0, 1, 3, 0)]+=0.157997339628*x_ref[2]**o + (-0.748733198546)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.995006408572*x[2]**o + (0.919842216729)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.995006408572*x_ref[2]**o + (0.919842216729)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.989120940722*x[2]**o + (0.15681214384)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.989120940722*x_ref[2]**o + (0.15681214384)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=-0.941907667786*x[2]**o + (0.708298769529)*x[2]
+            ref[(0, 1, 3, 3)]+=-0.941907667786*x_ref[2]**o + (0.708298769529)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.0290427784514*x[2]**o + (0.373026053823)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.0290427784514*x_ref[2]**o + (0.373026053823)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.924914827762*x[2]**o + (0.283089584262)*x[2]
+            ref[(1, 0, 0, 1)]+=0.924914827762*x_ref[2]**o + (0.283089584262)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.574459312524*x[2]**o + (-0.67317061312)*x[2]
+            ref[(1, 0, 0, 2)]+=0.574459312524*x_ref[2]**o + (-0.67317061312)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.178494802848*x[2]**o + (-0.287834613997)*x[2]
+            ref[(1, 0, 0, 3)]+=0.178494802848*x_ref[2]**o + (-0.287834613997)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.746818319161*x[2]**o + (0.489741331672)*x[2]
+            ref[(1, 0, 1, 0)]+=0.746818319161*x_ref[2]**o + (0.489741331672)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.0328129545*x[2]**o + (-0.0985359520056)*x[2]
+            ref[(1, 0, 1, 1)]+=0.0328129545*x_ref[2]**o + (-0.0985359520056)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.936593107053*x[2]**o + (0.524986463139)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.936593107053*x_ref[2]**o + (0.524986463139)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.364116004301*x[2]**o + (0.583258773589)*x[2]
+            ref[(1, 0, 1, 3)]+=0.364116004301*x_ref[2]**o + (0.583258773589)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.658723743452*x[2]**o + (-0.304779001751)*x[2]
+            ref[(1, 0, 2, 0)]+=0.658723743452*x_ref[2]**o + (-0.304779001751)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.266870830168*x[2]**o + (0.922614700372)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.266870830168*x_ref[2]**o + (0.922614700372)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.217220709928*x[2]**o + (-0.751794163728)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.217220709928*x_ref[2]**o + (-0.751794163728)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.0308087930311*x[2]**o + (0.440093315351)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.0308087930311*x_ref[2]**o + (0.440093315351)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.587848724211*x[2]**o + (0.103539301019)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.587848724211*x_ref[2]**o + (0.103539301019)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.339329393913*x[2]**o + (-0.870929554428)*x[2]
+            ref[(1, 0, 3, 1)]+=0.339329393913*x_ref[2]**o + (-0.870929554428)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=-0.103191176678*x[2]**o + (0.142899356934)*x[2]
+            ref[(1, 0, 3, 2)]+=-0.103191176678*x_ref[2]**o + (0.142899356934)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=0.106727699855*x[2]**o + (-0.827073563071)*x[2]
+            ref[(1, 0, 3, 3)]+=0.106727699855*x_ref[2]**o + (-0.827073563071)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.607520765216*x[2]**o + (0.918431511269)*x[2]
+            ref[(1, 1, 0, 0)]+=0.607520765216*x_ref[2]**o + (0.918431511269)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.634481376455*x[2]**o + (0.0892992079417)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.634481376455*x_ref[2]**o + (0.0892992079417)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.924536865856*x[2]**o + (0.352785259899)*x[2]
+            ref[(1, 1, 0, 2)]+=0.924536865856*x_ref[2]**o + (0.352785259899)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.347729508564*x[2]**o + (0.0104006293297)*x[2]
+            ref[(1, 1, 0, 3)]+=0.347729508564*x_ref[2]**o + (0.0104006293297)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.317322816284*x[2]**o + (0.10102755294)*x[2]
+            ref[(1, 1, 1, 0)]+=0.317322816284*x_ref[2]**o + (0.10102755294)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.361477976576*x[2]**o + (0.744561014661)*x[2]
+            ref[(1, 1, 1, 1)]+=0.361477976576*x_ref[2]**o + (0.744561014661)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.0244956336819*x[2]**o + (-0.537772534326)*x[2]
+            ref[(1, 1, 1, 2)]+=0.0244956336819*x_ref[2]**o + (-0.537772534326)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=0.491048714093*x[2]**o + (-0.0425432753908)*x[2]
+            ref[(1, 1, 1, 3)]+=0.491048714093*x_ref[2]**o + (-0.0425432753908)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.771652175747*x[2]**o + (0.354572277598)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.771652175747*x_ref[2]**o + (0.354572277598)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.681999467173*x[2]**o + (-0.0715412208826)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.681999467173*x_ref[2]**o + (-0.0715412208826)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.0640361441419*x[2]**o + (0.198177561658)*x[2]
+            ref[(1, 1, 2, 2)]+=0.0640361441419*x_ref[2]**o + (0.198177561658)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.950357885737*x[2]**o + (0.377204295631)*x[2]
+            ref[(1, 1, 2, 3)]+=0.950357885737*x_ref[2]**o + (0.377204295631)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=0.855324272626*x[2]**o + (0.0643563285917)*x[2]
+            ref[(1, 1, 3, 0)]+=0.855324272626*x_ref[2]**o + (0.0643563285917)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.563869957883*x[2]**o + (-0.479954641108)*x[2]
+            ref[(1, 1, 3, 1)]+=0.563869957883*x_ref[2]**o + (-0.479954641108)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=-0.821505989217*x[2]**o + (0.0916247180137)*x[2]
+            ref[(1, 1, 3, 2)]+=-0.821505989217*x_ref[2]**o + (0.0916247180137)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=-0.290479307746*x[2]**o + (0.318832738076)*x[2]
+            ref[(1, 1, 3, 3)]+=-0.290479307746*x_ref[2]**o + (0.318832738076)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.175930111896*x[0]**o + (0.473595055473)*x[0] + (-0.237612010244)*x[1]**o + (0.54026461778)*x[1]
+        ref=0.175930111896*x_ref[0]**o + (0.473595055473)*x_ref[0] + (-0.237612010244)*x_ref[1]**o + (0.54026461778)*x_ref[1]
+        if dim==3:
+            arg+=(0.320298055942)*x[2]**o + (-0.91569554958)*x[2]
+            ref+=(0.320298055942)*x_ref[2]**o + (-0.91569554958)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.94619461447*x[0]**o + (0.841211927281)*x[0] + (-0.151545057478)*x[1]**o + (0.297078083472)*x[1]
+        ref[(0,)]=0.94619461447*x_ref[0]**o + (0.841211927281)*x_ref[0] + (-0.151545057478)*x_ref[1]**o + (0.297078083472)*x_ref[1]
+        arg[(1,)]=-0.249990356528*x[0]**o + (0.02233755549)*x[0] + (0.43828335033)*x[1]**o + (0.842776692134)*x[1]
+        ref[(1,)]=-0.249990356528*x_ref[0]**o + (0.02233755549)*x_ref[0] + (0.43828335033)*x_ref[1]**o + (0.842776692134)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.105880597199*x[2]**o + (-0.976469028785)*x[2]
+            ref[(0,)]+=0.105880597199*x_ref[2]**o + (-0.976469028785)*x_ref[2]
+            arg[(1,)]+=-0.501786254054*x[2]**o + (0.813420239254)*x[2]
+            ref[(1,)]+=-0.501786254054*x_ref[2]**o + (0.813420239254)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=-0.363716866641*x[0]**o + (0.741022536858)*x[0] + (-0.33604595564)*x[1]**o + (-0.540764605241)*x[1]
+        ref[(0, 0)]=-0.363716866641*x_ref[0]**o + (0.741022536858)*x_ref[0] + (-0.33604595564)*x_ref[1]**o + (-0.540764605241)*x_ref[1]
+        arg[(0, 1)]=0.18058992361*x[0]**o + (-0.200924033689)*x[0] + (0.322254520672)*x[1]**o + (0.293903004156)*x[1]
+        ref[(0, 1)]=0.18058992361*x_ref[0]**o + (-0.200924033689)*x_ref[0] + (0.322254520672)*x_ref[1]**o + (0.293903004156)*x_ref[1]
+        arg[(0, 2)]=0.15902544881*x[0]**o + (-0.104234532072)*x[0] + (-0.53973985319)*x[1]**o + (0.614708679234)*x[1]
+        ref[(0, 2)]=0.15902544881*x_ref[0]**o + (-0.104234532072)*x_ref[0] + (-0.53973985319)*x_ref[1]**o + (0.614708679234)*x_ref[1]
+        arg[(1, 0)]=0.387501732249*x[0]**o + (-0.593194762542)*x[0] + (-0.937523079211)*x[1]**o + (0.379224479147)*x[1]
+        ref[(1, 0)]=0.387501732249*x_ref[0]**o + (-0.593194762542)*x_ref[0] + (-0.937523079211)*x_ref[1]**o + (0.379224479147)*x_ref[1]
+        arg[(1, 1)]=0.00652431444068*x[0]**o + (-0.368421875039)*x[0] + (-0.756868762652)*x[1]**o + (-0.357523213523)*x[1]
+        ref[(1, 1)]=0.00652431444068*x_ref[0]**o + (-0.368421875039)*x_ref[0] + (-0.756868762652)*x_ref[1]**o + (-0.357523213523)*x_ref[1]
+        arg[(1, 2)]=0.160962327241*x[0]**o + (0.936853842866)*x[0] + (-0.584976186567)*x[1]**o + (0.784137731873)*x[1]
+        ref[(1, 2)]=0.160962327241*x_ref[0]**o + (0.936853842866)*x_ref[0] + (-0.584976186567)*x_ref[1]**o + (0.784137731873)*x_ref[1]
+        arg[(2, 0)]=0.884308180854*x[0]**o + (0.898342053011)*x[0] + (-0.745202483267)*x[1]**o + (0.526040129513)*x[1]
+        ref[(2, 0)]=0.884308180854*x_ref[0]**o + (0.898342053011)*x_ref[0] + (-0.745202483267)*x_ref[1]**o + (0.526040129513)*x_ref[1]
+        arg[(2, 1)]=0.346830640089*x[0]**o + (-0.44891129887)*x[0] + (-0.189323682672)*x[1]**o + (0.526829697226)*x[1]
+        ref[(2, 1)]=0.346830640089*x_ref[0]**o + (-0.44891129887)*x_ref[0] + (-0.189323682672)*x_ref[1]**o + (0.526829697226)*x_ref[1]
+        arg[(2, 2)]=-0.677270620297*x[0]**o + (-0.0519502927547)*x[0] + (-0.403393814805)*x[1]**o + (0.478650536054)*x[1]
+        ref[(2, 2)]=-0.677270620297*x_ref[0]**o + (-0.0519502927547)*x_ref[0] + (-0.403393814805)*x_ref[1]**o + (0.478650536054)*x_ref[1]
+        arg[(3, 0)]=0.807170040382*x[0]**o + (-0.678195019488)*x[0] + (0.918264558723)*x[1]**o + (0.682137483753)*x[1]
+        ref[(3, 0)]=0.807170040382*x_ref[0]**o + (-0.678195019488)*x_ref[0] + (0.918264558723)*x_ref[1]**o + (0.682137483753)*x_ref[1]
+        arg[(3, 1)]=-0.888396881188*x[0]**o + (-0.751480379073)*x[0] + (-0.0185578214569)*x[1]**o + (-0.939690225729)*x[1]
+        ref[(3, 1)]=-0.888396881188*x_ref[0]**o + (-0.751480379073)*x_ref[0] + (-0.0185578214569)*x_ref[1]**o + (-0.939690225729)*x_ref[1]
+        arg[(3, 2)]=0.778660085195*x[0]**o + (0.620585640159)*x[0] + (-0.303425718914)*x[1]**o + (0.391089162611)*x[1]
+        ref[(3, 2)]=0.778660085195*x_ref[0]**o + (0.620585640159)*x_ref[0] + (-0.303425718914)*x_ref[1]**o + (0.391089162611)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.174769006395*x[2]**o + (-0.0380608677847)*x[2]
+            ref[(0, 0)]+=0.174769006395*x_ref[2]**o + (-0.0380608677847)*x_ref[2]
+            arg[(0, 1)]+=0.100164468068*x[2]**o + (0.40936146562)*x[2]
+            ref[(0, 1)]+=0.100164468068*x_ref[2]**o + (0.40936146562)*x_ref[2]
+            arg[(0, 2)]+=0.255435132276*x[2]**o + (0.0657941574003)*x[2]
+            ref[(0, 2)]+=0.255435132276*x_ref[2]**o + (0.0657941574003)*x_ref[2]
+            arg[(1, 0)]+=-0.217453293234*x[2]**o + (-0.878492156045)*x[2]
+            ref[(1, 0)]+=-0.217453293234*x_ref[2]**o + (-0.878492156045)*x_ref[2]
+            arg[(1, 1)]+=-0.926279850511*x[2]**o + (0.406326266638)*x[2]
+            ref[(1, 1)]+=-0.926279850511*x_ref[2]**o + (0.406326266638)*x_ref[2]
+            arg[(1, 2)]+=-0.103397769616*x[2]**o + (0.681580328248)*x[2]
+            ref[(1, 2)]+=-0.103397769616*x_ref[2]**o + (0.681580328248)*x_ref[2]
+            arg[(2, 0)]+=0.586064782767*x[2]**o + (0.684232966224)*x[2]
+            ref[(2, 0)]+=0.586064782767*x_ref[2]**o + (0.684232966224)*x_ref[2]
+            arg[(2, 1)]+=-0.217881175236*x[2]**o + (-0.351964251579)*x[2]
+            ref[(2, 1)]+=-0.217881175236*x_ref[2]**o + (-0.351964251579)*x_ref[2]
+            arg[(2, 2)]+=0.206154015306*x[2]**o + (-0.158528810755)*x[2]
+            ref[(2, 2)]+=0.206154015306*x_ref[2]**o + (-0.158528810755)*x_ref[2]
+            arg[(3, 0)]+=-0.503424995716*x[2]**o + (-0.318424063529)*x[2]
+            ref[(3, 0)]+=-0.503424995716*x_ref[2]**o + (-0.318424063529)*x_ref[2]
+            arg[(3, 1)]+=-0.310312962383*x[2]**o + (0.592548818821)*x[2]
+            ref[(3, 1)]+=-0.310312962383*x_ref[2]**o + (0.592548818821)*x_ref[2]
+            arg[(3, 2)]+=0.713409427615*x[2]**o + (0.65552943281)*x[2]
+            ref[(3, 2)]+=0.713409427615*x_ref[2]**o + (0.65552943281)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3),w_ref)
+        arg[(0, 0, 0)]=0.855789093542*x[0]**o + (0.862821431272)*x[0] + (0.16701226374)*x[1]**o + (-0.682648666061)*x[1]
+        ref[(0, 0, 0)]=0.855789093542*x_ref[0]**o + (0.862821431272)*x_ref[0] + (0.16701226374)*x_ref[1]**o + (-0.682648666061)*x_ref[1]
+        arg[(0, 0, 1)]=0.00207461570294*x[0]**o + (0.0587208564329)*x[0] + (-0.265969151777)*x[1]**o + (0.567606786567)*x[1]
+        ref[(0, 0, 1)]=0.00207461570294*x_ref[0]**o + (0.0587208564329)*x_ref[0] + (-0.265969151777)*x_ref[1]**o + (0.567606786567)*x_ref[1]
+        arg[(0, 0, 2)]=0.303253008796*x[0]**o + (0.258930286501)*x[0] + (0.591872524615)*x[1]**o + (0.78682698493)*x[1]
+        ref[(0, 0, 2)]=0.303253008796*x_ref[0]**o + (0.258930286501)*x_ref[0] + (0.591872524615)*x_ref[1]**o + (0.78682698493)*x_ref[1]
+        arg[(0, 1, 0)]=-0.757232299961*x[0]**o + (-0.253635427769)*x[0] + (0.916883479487)*x[1]**o + (0.391278278521)*x[1]
+        ref[(0, 1, 0)]=-0.757232299961*x_ref[0]**o + (-0.253635427769)*x_ref[0] + (0.916883479487)*x_ref[1]**o + (0.391278278521)*x_ref[1]
+        arg[(0, 1, 1)]=0.0393236812454*x[0]**o + (-0.234138799395)*x[0] + (0.62594872685)*x[1]**o + (-0.416093194547)*x[1]
+        ref[(0, 1, 1)]=0.0393236812454*x_ref[0]**o + (-0.234138799395)*x_ref[0] + (0.62594872685)*x_ref[1]**o + (-0.416093194547)*x_ref[1]
+        arg[(0, 1, 2)]=-0.7339692397*x[0]**o + (-0.34598515213)*x[0] + (0.885008826849)*x[1]**o + (-0.162278127092)*x[1]
+        ref[(0, 1, 2)]=-0.7339692397*x_ref[0]**o + (-0.34598515213)*x_ref[0] + (0.885008826849)*x_ref[1]**o + (-0.162278127092)*x_ref[1]
+        arg[(1, 0, 0)]=0.652421856257*x[0]**o + (-0.185179632177)*x[0] + (-0.977849590662)*x[1]**o + (0.92080398564)*x[1]
+        ref[(1, 0, 0)]=0.652421856257*x_ref[0]**o + (-0.185179632177)*x_ref[0] + (-0.977849590662)*x_ref[1]**o + (0.92080398564)*x_ref[1]
+        arg[(1, 0, 1)]=0.21426642037*x[0]**o + (0.217006735497)*x[0] + (-0.630844686933)*x[1]**o + (-0.742024619423)*x[1]
+        ref[(1, 0, 1)]=0.21426642037*x_ref[0]**o + (0.217006735497)*x_ref[0] + (-0.630844686933)*x_ref[1]**o + (-0.742024619423)*x_ref[1]
+        arg[(1, 0, 2)]=0.517033392524*x[0]**o + (-0.0924330687659)*x[0] + (0.52943157719)*x[1]**o + (0.743453552814)*x[1]
+        ref[(1, 0, 2)]=0.517033392524*x_ref[0]**o + (-0.0924330687659)*x_ref[0] + (0.52943157719)*x_ref[1]**o + (0.743453552814)*x_ref[1]
+        arg[(1, 1, 0)]=0.223527132461*x[0]**o + (0.525153260632)*x[0] + (-0.200900184899)*x[1]**o + (-0.165131961156)*x[1]
+        ref[(1, 1, 0)]=0.223527132461*x_ref[0]**o + (0.525153260632)*x_ref[0] + (-0.200900184899)*x_ref[1]**o + (-0.165131961156)*x_ref[1]
+        arg[(1, 1, 1)]=-0.272932869829*x[0]**o + (-0.85374406602)*x[0] + (0.645216667289)*x[1]**o + (0.0197228927323)*x[1]
+        ref[(1, 1, 1)]=-0.272932869829*x_ref[0]**o + (-0.85374406602)*x_ref[0] + (0.645216667289)*x_ref[1]**o + (0.0197228927323)*x_ref[1]
+        arg[(1, 1, 2)]=-0.105233138939*x[0]**o + (-0.41285717689)*x[0] + (-0.776006324581)*x[1]**o + (-0.88012058288)*x[1]
+        ref[(1, 1, 2)]=-0.105233138939*x_ref[0]**o + (-0.41285717689)*x_ref[0] + (-0.776006324581)*x_ref[1]**o + (-0.88012058288)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.74201209618*x[2]**o + (-0.372292053031)*x[2]
+            ref[(0, 0, 0)]+=-0.74201209618*x_ref[2]**o + (-0.372292053031)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.434655441638*x[2]**o + (-0.358701173567)*x[2]
+            ref[(0, 0, 1)]+=-0.434655441638*x_ref[2]**o + (-0.358701173567)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.544957144024*x[2]**o + (-0.923100305007)*x[2]
+            ref[(0, 0, 2)]+=-0.544957144024*x_ref[2]**o + (-0.923100305007)*x_ref[2]
+            arg[(0, 1, 0)]+=0.63324343827*x[2]**o + (0.500593123604)*x[2]
+            ref[(0, 1, 0)]+=0.63324343827*x_ref[2]**o + (0.500593123604)*x_ref[2]
+            arg[(0, 1, 1)]+=0.445806520586*x[2]**o + (-0.911405036832)*x[2]
+            ref[(0, 1, 1)]+=0.445806520586*x_ref[2]**o + (-0.911405036832)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.557840581809*x[2]**o + (-0.63554592021)*x[2]
+            ref[(0, 1, 2)]+=-0.557840581809*x_ref[2]**o + (-0.63554592021)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.716263704123*x[2]**o + (-0.970859161123)*x[2]
+            ref[(1, 0, 0)]+=-0.716263704123*x_ref[2]**o + (-0.970859161123)*x_ref[2]
+            arg[(1, 0, 1)]+=0.0845039809321*x[2]**o + (-0.267662851411)*x[2]
+            ref[(1, 0, 1)]+=0.0845039809321*x_ref[2]**o + (-0.267662851411)*x_ref[2]
+            arg[(1, 0, 2)]+=0.391552158831*x[2]**o + (0.960685817238)*x[2]
+            ref[(1, 0, 2)]+=0.391552158831*x_ref[2]**o + (0.960685817238)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.918170857797*x[2]**o + (0.205383597393)*x[2]
+            ref[(1, 1, 0)]+=-0.918170857797*x_ref[2]**o + (0.205383597393)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.82504658313*x[2]**o + (-0.575531429758)*x[2]
+            ref[(1, 1, 1)]+=-0.82504658313*x_ref[2]**o + (-0.575531429758)*x_ref[2]
+            arg[(1, 1, 2)]+=-0.276773522941*x[2]**o + (-0.430114108908)*x[2]
+            ref[(1, 1, 2)]+=-0.276773522941*x_ref[2]**o + (-0.430114108908)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2, 3),w)
+        ref = Data(0,(3, 3, 2, 3),w_ref)
+        arg[(0, 0, 0, 0)]=0.171510060392*x[0]**o + (0.395917056953)*x[0] + (-0.578883105272)*x[1]**o + (-0.785222279918)*x[1]
+        ref[(0, 0, 0, 0)]=0.171510060392*x_ref[0]**o + (0.395917056953)*x_ref[0] + (-0.578883105272)*x_ref[1]**o + (-0.785222279918)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.563184527771*x[0]**o + (0.754147831974)*x[0] + (0.11894819711)*x[1]**o + (0.0726481003395)*x[1]
+        ref[(0, 0, 0, 1)]=0.563184527771*x_ref[0]**o + (0.754147831974)*x_ref[0] + (0.11894819711)*x_ref[1]**o + (0.0726481003395)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.755007970601*x[0]**o + (-0.784527779958)*x[0] + (-0.00452495385134)*x[1]**o + (-0.298414556595)*x[1]
+        ref[(0, 0, 0, 2)]=-0.755007970601*x_ref[0]**o + (-0.784527779958)*x_ref[0] + (-0.00452495385134)*x_ref[1]**o + (-0.298414556595)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.893953411516*x[0]**o + (-0.045647852254)*x[0] + (-0.604961089936)*x[1]**o + (-0.439944438531)*x[1]
+        ref[(0, 0, 1, 0)]=-0.893953411516*x_ref[0]**o + (-0.045647852254)*x_ref[0] + (-0.604961089936)*x_ref[1]**o + (-0.439944438531)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.448147456023*x[0]**o + (0.522137914238)*x[0] + (0.532072247631)*x[1]**o + (-0.592757018244)*x[1]
+        ref[(0, 0, 1, 1)]=-0.448147456023*x_ref[0]**o + (0.522137914238)*x_ref[0] + (0.532072247631)*x_ref[1]**o + (-0.592757018244)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.188745567443*x[0]**o + (0.644192853018)*x[0] + (0.823828386551)*x[1]**o + (0.34100638042)*x[1]
+        ref[(0, 0, 1, 2)]=0.188745567443*x_ref[0]**o + (0.644192853018)*x_ref[0] + (0.823828386551)*x_ref[1]**o + (0.34100638042)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.651282570839*x[0]**o + (0.232462762081)*x[0] + (0.90222489828)*x[1]**o + (0.404985480728)*x[1]
+        ref[(0, 1, 0, 0)]=-0.651282570839*x_ref[0]**o + (0.232462762081)*x_ref[0] + (0.90222489828)*x_ref[1]**o + (0.404985480728)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.419222972154*x[0]**o + (0.639176874812)*x[0] + (0.731276752555)*x[1]**o + (0.738477872724)*x[1]
+        ref[(0, 1, 0, 1)]=0.419222972154*x_ref[0]**o + (0.639176874812)*x_ref[0] + (0.731276752555)*x_ref[1]**o + (0.738477872724)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.0841209431773*x[0]**o + (-0.134918071648)*x[0] + (-0.423130970877)*x[1]**o + (-0.352828083976)*x[1]
+        ref[(0, 1, 0, 2)]=0.0841209431773*x_ref[0]**o + (-0.134918071648)*x_ref[0] + (-0.423130970877)*x_ref[1]**o + (-0.352828083976)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.502091553856*x[0]**o + (-0.676519690016)*x[0] + (0.275255150038)*x[1]**o + (-0.361468510123)*x[1]
+        ref[(0, 1, 1, 0)]=-0.502091553856*x_ref[0]**o + (-0.676519690016)*x_ref[0] + (0.275255150038)*x_ref[1]**o + (-0.361468510123)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.678379027105*x[0]**o + (0.490097518818)*x[0] + (-0.535277575731)*x[1]**o + (0.65278738735)*x[1]
+        ref[(0, 1, 1, 1)]=0.678379027105*x_ref[0]**o + (0.490097518818)*x_ref[0] + (-0.535277575731)*x_ref[1]**o + (0.65278738735)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.590813105954*x[0]**o + (-0.956710595035)*x[0] + (0.415029080935)*x[1]**o + (-0.540027858525)*x[1]
+        ref[(0, 1, 1, 2)]=0.590813105954*x_ref[0]**o + (-0.956710595035)*x_ref[0] + (0.415029080935)*x_ref[1]**o + (-0.540027858525)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.406088953839*x[0]**o + (0.592630431258)*x[0] + (0.341379703301)*x[1]**o + (-0.309049126244)*x[1]
+        ref[(0, 2, 0, 0)]=-0.406088953839*x_ref[0]**o + (0.592630431258)*x_ref[0] + (0.341379703301)*x_ref[1]**o + (-0.309049126244)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.615072688459*x[0]**o + (0.178258914236)*x[0] + (0.27049629464)*x[1]**o + (0.623789278979)*x[1]
+        ref[(0, 2, 0, 1)]=0.615072688459*x_ref[0]**o + (0.178258914236)*x_ref[0] + (0.27049629464)*x_ref[1]**o + (0.623789278979)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.0219739044313*x[0]**o + (-0.462883959229)*x[0] + (0.318854790542)*x[1]**o + (-0.272028516297)*x[1]
+        ref[(0, 2, 0, 2)]=0.0219739044313*x_ref[0]**o + (-0.462883959229)*x_ref[0] + (0.318854790542)*x_ref[1]**o + (-0.272028516297)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.125250829808*x[0]**o + (-0.926083221613)*x[0] + (-0.203698338435)*x[1]**o + (-0.702608835135)*x[1]
+        ref[(0, 2, 1, 0)]=0.125250829808*x_ref[0]**o + (-0.926083221613)*x_ref[0] + (-0.203698338435)*x_ref[1]**o + (-0.702608835135)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.0906719180759*x[0]**o + (-0.484725706295)*x[0] + (0.421880852036)*x[1]**o + (0.224824694329)*x[1]
+        ref[(0, 2, 1, 1)]=0.0906719180759*x_ref[0]**o + (-0.484725706295)*x_ref[0] + (0.421880852036)*x_ref[1]**o + (0.224824694329)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.847832987463*x[0]**o + (-0.369722230078)*x[0] + (-0.2973957702)*x[1]**o + (0.346849992562)*x[1]
+        ref[(0, 2, 1, 2)]=-0.847832987463*x_ref[0]**o + (-0.369722230078)*x_ref[0] + (-0.2973957702)*x_ref[1]**o + (0.346849992562)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.690297425941*x[0]**o + (0.0145905808091)*x[0] + (0.0551778320284)*x[1]**o + (-0.832256738937)*x[1]
+        ref[(1, 0, 0, 0)]=-0.690297425941*x_ref[0]**o + (0.0145905808091)*x_ref[0] + (0.0551778320284)*x_ref[1]**o + (-0.832256738937)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.199635136224*x[0]**o + (-0.0581885868399)*x[0] + (0.607693870117)*x[1]**o + (-0.563063422813)*x[1]
+        ref[(1, 0, 0, 1)]=-0.199635136224*x_ref[0]**o + (-0.0581885868399)*x_ref[0] + (0.607693870117)*x_ref[1]**o + (-0.563063422813)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.674705661981*x[0]**o + (-0.969132280743)*x[0] + (0.776560172558)*x[1]**o + (0.692807718324)*x[1]
+        ref[(1, 0, 0, 2)]=-0.674705661981*x_ref[0]**o + (-0.969132280743)*x_ref[0] + (0.776560172558)*x_ref[1]**o + (0.692807718324)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.999665163043*x[0]**o + (0.362143078723)*x[0] + (-0.317356094807)*x[1]**o + (0.878481178798)*x[1]
+        ref[(1, 0, 1, 0)]=-0.999665163043*x_ref[0]**o + (0.362143078723)*x_ref[0] + (-0.317356094807)*x_ref[1]**o + (0.878481178798)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.617291640475*x[0]**o + (0.911712781501)*x[0] + (-0.929055372271)*x[1]**o + (-0.577221737525)*x[1]
+        ref[(1, 0, 1, 1)]=0.617291640475*x_ref[0]**o + (0.911712781501)*x_ref[0] + (-0.929055372271)*x_ref[1]**o + (-0.577221737525)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.198242106457*x[0]**o + (-0.80929168698)*x[0] + (0.00419499948913)*x[1]**o + (-0.467037681889)*x[1]
+        ref[(1, 0, 1, 2)]=0.198242106457*x_ref[0]**o + (-0.80929168698)*x_ref[0] + (0.00419499948913)*x_ref[1]**o + (-0.467037681889)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.439743102735*x[0]**o + (0.521311216266)*x[0] + (0.985269701835)*x[1]**o + (0.511681032989)*x[1]
+        ref[(1, 1, 0, 0)]=-0.439743102735*x_ref[0]**o + (0.521311216266)*x_ref[0] + (0.985269701835)*x_ref[1]**o + (0.511681032989)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.128071161515*x[0]**o + (0.431504763649)*x[0] + (0.210975676885)*x[1]**o + (-0.426384170469)*x[1]
+        ref[(1, 1, 0, 1)]=0.128071161515*x_ref[0]**o + (0.431504763649)*x_ref[0] + (0.210975676885)*x_ref[1]**o + (-0.426384170469)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.81377142388*x[0]**o + (-0.863694846876)*x[0] + (0.47017412394)*x[1]**o + (0.419947303356)*x[1]
+        ref[(1, 1, 0, 2)]=-0.81377142388*x_ref[0]**o + (-0.863694846876)*x_ref[0] + (0.47017412394)*x_ref[1]**o + (0.419947303356)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.0177237444076*x[0]**o + (-0.806255622512)*x[0] + (0.191510027567)*x[1]**o + (0.250510373906)*x[1]
+        ref[(1, 1, 1, 0)]=0.0177237444076*x_ref[0]**o + (-0.806255622512)*x_ref[0] + (0.191510027567)*x_ref[1]**o + (0.250510373906)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.890360581901*x[0]**o + (0.753899822423)*x[0] + (-0.206117728195)*x[1]**o + (-0.611403443076)*x[1]
+        ref[(1, 1, 1, 1)]=0.890360581901*x_ref[0]**o + (0.753899822423)*x_ref[0] + (-0.206117728195)*x_ref[1]**o + (-0.611403443076)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.85429896663*x[0]**o + (0.177455593727)*x[0] + (-0.45836286569)*x[1]**o + (0.584201527495)*x[1]
+        ref[(1, 1, 1, 2)]=0.85429896663*x_ref[0]**o + (0.177455593727)*x_ref[0] + (-0.45836286569)*x_ref[1]**o + (0.584201527495)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.634573302816*x[0]**o + (-0.295868951717)*x[0] + (-0.892285376216)*x[1]**o + (-0.626048960906)*x[1]
+        ref[(1, 2, 0, 0)]=-0.634573302816*x_ref[0]**o + (-0.295868951717)*x_ref[0] + (-0.892285376216)*x_ref[1]**o + (-0.626048960906)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.0846474770162*x[0]**o + (0.577930965703)*x[0] + (0.433550849935)*x[1]**o + (-0.443955496924)*x[1]
+        ref[(1, 2, 0, 1)]=0.0846474770162*x_ref[0]**o + (0.577930965703)*x_ref[0] + (0.433550849935)*x_ref[1]**o + (-0.443955496924)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.649002022983*x[0]**o + (-0.773068024406)*x[0] + (0.971714819448)*x[1]**o + (0.631534884391)*x[1]
+        ref[(1, 2, 0, 2)]=0.649002022983*x_ref[0]**o + (-0.773068024406)*x_ref[0] + (0.971714819448)*x_ref[1]**o + (0.631534884391)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.0600262680234*x[0]**o + (0.380982381397)*x[0] + (-0.573740793825)*x[1]**o + (0.860598436139)*x[1]
+        ref[(1, 2, 1, 0)]=-0.0600262680234*x_ref[0]**o + (0.380982381397)*x_ref[0] + (-0.573740793825)*x_ref[1]**o + (0.860598436139)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.63591943566*x[0]**o + (-0.0346511211412)*x[0] + (-0.158558151968)*x[1]**o + (0.468963134263)*x[1]
+        ref[(1, 2, 1, 1)]=0.63591943566*x_ref[0]**o + (-0.0346511211412)*x_ref[0] + (-0.158558151968)*x_ref[1]**o + (0.468963134263)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.437988165548*x[0]**o + (-0.521061116058)*x[0] + (0.956483437861)*x[1]**o + (-0.6109600743)*x[1]
+        ref[(1, 2, 1, 2)]=-0.437988165548*x_ref[0]**o + (-0.521061116058)*x_ref[0] + (0.956483437861)*x_ref[1]**o + (-0.6109600743)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.49089361903*x[0]**o + (-0.982566992382)*x[0] + (0.594274073503)*x[1]**o + (0.180123297879)*x[1]
+        ref[(2, 0, 0, 0)]=0.49089361903*x_ref[0]**o + (-0.982566992382)*x_ref[0] + (0.594274073503)*x_ref[1]**o + (0.180123297879)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.111409693229*x[0]**o + (0.274854087665)*x[0] + (0.995753390074)*x[1]**o + (0.737611765856)*x[1]
+        ref[(2, 0, 0, 1)]=0.111409693229*x_ref[0]**o + (0.274854087665)*x_ref[0] + (0.995753390074)*x_ref[1]**o + (0.737611765856)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.639212737424*x[0]**o + (0.658770501138)*x[0] + (-0.278256168978)*x[1]**o + (-0.00575672678991)*x[1]
+        ref[(2, 0, 0, 2)]=-0.639212737424*x_ref[0]**o + (0.658770501138)*x_ref[0] + (-0.278256168978)*x_ref[1]**o + (-0.00575672678991)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.125825565326*x[0]**o + (0.179737120103)*x[0] + (-0.736278317212)*x[1]**o + (-0.692952909308)*x[1]
+        ref[(2, 0, 1, 0)]=-0.125825565326*x_ref[0]**o + (0.179737120103)*x_ref[0] + (-0.736278317212)*x_ref[1]**o + (-0.692952909308)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.782391007954*x[0]**o + (0.243560547593)*x[0] + (0.546416052553)*x[1]**o + (0.862070281627)*x[1]
+        ref[(2, 0, 1, 1)]=-0.782391007954*x_ref[0]**o + (0.243560547593)*x_ref[0] + (0.546416052553)*x_ref[1]**o + (0.862070281627)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.951793646833*x[0]**o + (-0.724317960242)*x[0] + (-0.708892521895)*x[1]**o + (-0.0958558054276)*x[1]
+        ref[(2, 0, 1, 2)]=0.951793646833*x_ref[0]**o + (-0.724317960242)*x_ref[0] + (-0.708892521895)*x_ref[1]**o + (-0.0958558054276)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.316317489512*x[0]**o + (0.61925007619)*x[0] + (-0.0108000384169)*x[1]**o + (-0.889124790188)*x[1]
+        ref[(2, 1, 0, 0)]=-0.316317489512*x_ref[0]**o + (0.61925007619)*x_ref[0] + (-0.0108000384169)*x_ref[1]**o + (-0.889124790188)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.029910194817*x[0]**o + (0.931789533685)*x[0] + (0.155361896813)*x[1]**o + (0.740948356685)*x[1]
+        ref[(2, 1, 0, 1)]=-0.029910194817*x_ref[0]**o + (0.931789533685)*x_ref[0] + (0.155361896813)*x_ref[1]**o + (0.740948356685)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.143331250851*x[0]**o + (-0.2441388346)*x[0] + (-0.273463260756)*x[1]**o + (-0.670746602167)*x[1]
+        ref[(2, 1, 0, 2)]=-0.143331250851*x_ref[0]**o + (-0.2441388346)*x_ref[0] + (-0.273463260756)*x_ref[1]**o + (-0.670746602167)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.12586129609*x[0]**o + (0.222958880432)*x[0] + (0.942320627705)*x[1]**o + (0.993547679458)*x[1]
+        ref[(2, 1, 1, 0)]=0.12586129609*x_ref[0]**o + (0.222958880432)*x_ref[0] + (0.942320627705)*x_ref[1]**o + (0.993547679458)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.820714000658*x[0]**o + (-0.208038515174)*x[0] + (-0.634561059223)*x[1]**o + (-0.872445825238)*x[1]
+        ref[(2, 1, 1, 1)]=0.820714000658*x_ref[0]**o + (-0.208038515174)*x_ref[0] + (-0.634561059223)*x_ref[1]**o + (-0.872445825238)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.873897722574*x[0]**o + (0.775126273516)*x[0] + (-0.0509091342996)*x[1]**o + (-0.782696070447)*x[1]
+        ref[(2, 1, 1, 2)]=-0.873897722574*x_ref[0]**o + (0.775126273516)*x_ref[0] + (-0.0509091342996)*x_ref[1]**o + (-0.782696070447)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.0370272028537*x[0]**o + (0.242689856555)*x[0] + (-0.449683703836)*x[1]**o + (0.496245005947)*x[1]
+        ref[(2, 2, 0, 0)]=0.0370272028537*x_ref[0]**o + (0.242689856555)*x_ref[0] + (-0.449683703836)*x_ref[1]**o + (0.496245005947)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.328020091658*x[0]**o + (-0.0799076784274)*x[0] + (0.651046993686)*x[1]**o + (-0.619324048006)*x[1]
+        ref[(2, 2, 0, 1)]=0.328020091658*x_ref[0]**o + (-0.0799076784274)*x_ref[0] + (0.651046993686)*x_ref[1]**o + (-0.619324048006)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.62737093406*x[0]**o + (-0.715672924754)*x[0] + (-0.782713304289)*x[1]**o + (0.54681329976)*x[1]
+        ref[(2, 2, 0, 2)]=-0.62737093406*x_ref[0]**o + (-0.715672924754)*x_ref[0] + (-0.782713304289)*x_ref[1]**o + (0.54681329976)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.767466688967*x[0]**o + (-0.820866488315)*x[0] + (0.352630868137)*x[1]**o + (-0.292410083342)*x[1]
+        ref[(2, 2, 1, 0)]=-0.767466688967*x_ref[0]**o + (-0.820866488315)*x_ref[0] + (0.352630868137)*x_ref[1]**o + (-0.292410083342)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.726122411242*x[0]**o + (-0.823924976887)*x[0] + (-0.789768323257)*x[1]**o + (0.123850522284)*x[1]
+        ref[(2, 2, 1, 1)]=0.726122411242*x_ref[0]**o + (-0.823924976887)*x_ref[0] + (-0.789768323257)*x_ref[1]**o + (0.123850522284)*x_ref[1]
+        arg[(2, 2, 1, 2)]=0.251360084883*x[0]**o + (-0.941423896951)*x[0] + (-0.729679341668)*x[1]**o + (0.43459729598)*x[1]
+        ref[(2, 2, 1, 2)]=0.251360084883*x_ref[0]**o + (-0.941423896951)*x_ref[0] + (-0.729679341668)*x_ref[1]**o + (0.43459729598)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.755145963848*x[2]**o + (-0.20426044599)*x[2]
+            ref[(0, 0, 0, 0)]+=0.755145963848*x_ref[2]**o + (-0.20426044599)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.135815682704*x[2]**o + (-0.36070547769)*x[2]
+            ref[(0, 0, 0, 1)]+=0.135815682704*x_ref[2]**o + (-0.36070547769)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.768258240127*x[2]**o + (0.664522319864)*x[2]
+            ref[(0, 0, 0, 2)]+=-0.768258240127*x_ref[2]**o + (0.664522319864)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.519534037776*x[2]**o + (-0.392986783303)*x[2]
+            ref[(0, 0, 1, 0)]+=0.519534037776*x_ref[2]**o + (-0.392986783303)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.876921387929*x[2]**o + (-0.546888158413)*x[2]
+            ref[(0, 0, 1, 1)]+=0.876921387929*x_ref[2]**o + (-0.546888158413)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.462720733643*x[2]**o + (-0.230247646142)*x[2]
+            ref[(0, 0, 1, 2)]+=0.462720733643*x_ref[2]**o + (-0.230247646142)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.0519265046786*x[2]**o + (-0.430226131921)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.0519265046786*x_ref[2]**o + (-0.430226131921)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.490206308711*x[2]**o + (-0.386305583465)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.490206308711*x_ref[2]**o + (-0.386305583465)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.61989796898*x[2]**o + (-0.163237274994)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.61989796898*x_ref[2]**o + (-0.163237274994)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.314288598611*x[2]**o + (0.303563357975)*x[2]
+            ref[(0, 1, 1, 0)]+=0.314288598611*x_ref[2]**o + (0.303563357975)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.628107347423*x[2]**o + (0.27609867172)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.628107347423*x_ref[2]**o + (0.27609867172)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.163385201419*x[2]**o + (0.489583923024)*x[2]
+            ref[(0, 1, 1, 2)]+=0.163385201419*x_ref[2]**o + (0.489583923024)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.970416248141*x[2]**o + (-0.216612135422)*x[2]
+            ref[(0, 2, 0, 0)]+=0.970416248141*x_ref[2]**o + (-0.216612135422)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.426422148804*x[2]**o + (-0.33370465489)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.426422148804*x_ref[2]**o + (-0.33370465489)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.234040358695*x[2]**o + (-0.832502943586)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.234040358695*x_ref[2]**o + (-0.832502943586)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.263138022345*x[2]**o + (0.3093056476)*x[2]
+            ref[(0, 2, 1, 0)]+=0.263138022345*x_ref[2]**o + (0.3093056476)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.679389831934*x[2]**o + (0.214604660422)*x[2]
+            ref[(0, 2, 1, 1)]+=0.679389831934*x_ref[2]**o + (0.214604660422)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.960535579965*x[2]**o + (-0.623533445271)*x[2]
+            ref[(0, 2, 1, 2)]+=0.960535579965*x_ref[2]**o + (-0.623533445271)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.541398167669*x[2]**o + (0.594847499232)*x[2]
+            ref[(1, 0, 0, 0)]+=0.541398167669*x_ref[2]**o + (0.594847499232)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.893169451602*x[2]**o + (0.756596333054)*x[2]
+            ref[(1, 0, 0, 1)]+=0.893169451602*x_ref[2]**o + (0.756596333054)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.690615638115*x[2]**o + (-0.330990198136)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.690615638115*x_ref[2]**o + (-0.330990198136)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.0315608907026*x[2]**o + (-0.960473431911)*x[2]
+            ref[(1, 0, 1, 0)]+=0.0315608907026*x_ref[2]**o + (-0.960473431911)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.936545556473*x[2]**o + (-0.434687949329)*x[2]
+            ref[(1, 0, 1, 1)]+=0.936545556473*x_ref[2]**o + (-0.434687949329)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.0368112218492*x[2]**o + (0.238179831677)*x[2]
+            ref[(1, 0, 1, 2)]+=0.0368112218492*x_ref[2]**o + (0.238179831677)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.90861990291*x[2]**o + (-0.729924547362)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.90861990291*x_ref[2]**o + (-0.729924547362)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.198419151063*x[2]**o + (-0.663383295551)*x[2]
+            ref[(1, 1, 0, 1)]+=0.198419151063*x_ref[2]**o + (-0.663383295551)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.264055867489*x[2]**o + (-0.255951615759)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.264055867489*x_ref[2]**o + (-0.255951615759)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.0446927866719*x[2]**o + (0.204624437928)*x[2]
+            ref[(1, 1, 1, 0)]+=0.0446927866719*x_ref[2]**o + (0.204624437928)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.212733876074*x[2]**o + (0.371069404684)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.212733876074*x_ref[2]**o + (0.371069404684)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.236883593547*x[2]**o + (0.370041707782)*x[2]
+            ref[(1, 1, 1, 2)]+=0.236883593547*x_ref[2]**o + (0.370041707782)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.204575222048*x[2]**o + (-0.23013311825)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.204575222048*x_ref[2]**o + (-0.23013311825)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.182729767815*x[2]**o + (0.412195593848)*x[2]
+            ref[(1, 2, 0, 1)]+=0.182729767815*x_ref[2]**o + (0.412195593848)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.59076914845*x[2]**o + (0.592270594623)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.59076914845*x_ref[2]**o + (0.592270594623)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.945634160286*x[2]**o + (0.896746903742)*x[2]
+            ref[(1, 2, 1, 0)]+=-0.945634160286*x_ref[2]**o + (0.896746903742)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.38212627527*x[2]**o + (-0.0516103799485)*x[2]
+            ref[(1, 2, 1, 1)]+=-0.38212627527*x_ref[2]**o + (-0.0516103799485)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.107676613749*x[2]**o + (0.0419234268567)*x[2]
+            ref[(1, 2, 1, 2)]+=0.107676613749*x_ref[2]**o + (0.0419234268567)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.509222868585*x[2]**o + (-0.470100054396)*x[2]
+            ref[(2, 0, 0, 0)]+=0.509222868585*x_ref[2]**o + (-0.470100054396)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.134258102798*x[2]**o + (-0.128938301849)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.134258102798*x_ref[2]**o + (-0.128938301849)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.433712522468*x[2]**o + (-0.263046458105)*x[2]
+            ref[(2, 0, 0, 2)]+=0.433712522468*x_ref[2]**o + (-0.263046458105)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.0877648266517*x[2]**o + (0.986584755424)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.0877648266517*x_ref[2]**o + (0.986584755424)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.694252802155*x[2]**o + (0.579196587115)*x[2]
+            ref[(2, 0, 1, 1)]+=0.694252802155*x_ref[2]**o + (0.579196587115)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.225797161787*x[2]**o + (0.39217707512)*x[2]
+            ref[(2, 0, 1, 2)]+=0.225797161787*x_ref[2]**o + (0.39217707512)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.231953030228*x[2]**o + (0.634872244516)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.231953030228*x_ref[2]**o + (0.634872244516)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.13509477581*x[2]**o + (-0.903684138454)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.13509477581*x_ref[2]**o + (-0.903684138454)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.836292863604*x[2]**o + (-0.750074143141)*x[2]
+            ref[(2, 1, 0, 2)]+=0.836292863604*x_ref[2]**o + (-0.750074143141)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.81390971644*x[2]**o + (0.854571915263)*x[2]
+            ref[(2, 1, 1, 0)]+=-0.81390971644*x_ref[2]**o + (0.854571915263)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.43023136681*x[2]**o + (0.687032916791)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.43023136681*x_ref[2]**o + (0.687032916791)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.652588870517*x[2]**o + (-0.593091610904)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.652588870517*x_ref[2]**o + (-0.593091610904)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.797095023807*x[2]**o + (-0.350914598589)*x[2]
+            ref[(2, 2, 0, 0)]+=0.797095023807*x_ref[2]**o + (-0.350914598589)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.820771015647*x[2]**o + (-0.863522642462)*x[2]
+            ref[(2, 2, 0, 1)]+=0.820771015647*x_ref[2]**o + (-0.863522642462)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.676835357217*x[2]**o + (0.603731071748)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.676835357217*x_ref[2]**o + (0.603731071748)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.65384433508*x[2]**o + (-0.200919701409)*x[2]
+            ref[(2, 2, 1, 0)]+=0.65384433508*x_ref[2]**o + (-0.200919701409)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.535121784544*x[2]**o + (0.395196635275)*x[2]
+            ref[(2, 2, 1, 1)]+=0.535121784544*x_ref[2]**o + (0.395196635275)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.730792104424*x[2]**o + (-0.863383356261)*x[2]
+            ref[(2, 2, 1, 2)]+=-0.730792104424*x_ref[2]**o + (-0.863383356261)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.967983959929*x[0] + (-0.970511750401)*x[1]
+        ref=-0.967983959929*x_ref[0] + (-0.970511750401)*x_ref[1]
+        if dim==3:
+            arg+=(0.920536599308)*x[2]
+            ref+=(0.920536599308)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=0.458392051292*x[0] + (0.251646244599)*x[1]
+        ref[(0,)]=0.458392051292*x_ref[0] + (0.251646244599)*x_ref[1]
+        arg[(1,)]=0.882661598128*x[0] + (0.190085948493)*x[1]
+        ref[(1,)]=0.882661598128*x_ref[0] + (0.190085948493)*x_ref[1]
+        arg[(2,)]=-0.101190230203*x[0] + (-0.629740915109)*x[1]
+        ref[(2,)]=-0.101190230203*x_ref[0] + (-0.629740915109)*x_ref[1]
+        arg[(3,)]=0.99722390472*x[0] + (0.2087201871)*x[1]
+        ref[(3,)]=0.99722390472*x_ref[0] + (0.2087201871)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.102182497146*x[2]
+            ref[(0,)]+=-0.102182497146*x_ref[2]
+            arg[(1,)]+=0.151087860217*x[2]
+            ref[(1,)]+=0.151087860217*x_ref[2]
+            arg[(2,)]+=-0.120165771134*x[2]
+            ref[(2,)]+=-0.120165771134*x_ref[2]
+            arg[(3,)]+=-0.400541041607*x[2]
+            ref[(3,)]+=-0.400541041607*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=-0.203683556818*x[0] + (0.118224649259)*x[1]
+        ref[(0, 0)]=-0.203683556818*x_ref[0] + (0.118224649259)*x_ref[1]
+        arg[(0, 1)]=-0.915846100666*x[0] + (-0.64684972337)*x[1]
+        ref[(0, 1)]=-0.915846100666*x_ref[0] + (-0.64684972337)*x_ref[1]
+        arg[(0, 2)]=-0.589190119848*x[0] + (-0.0553392028031)*x[1]
+        ref[(0, 2)]=-0.589190119848*x_ref[0] + (-0.0553392028031)*x_ref[1]
+        arg[(0, 3)]=0.49513426995*x[0] + (0.35667099733)*x[1]
+        ref[(0, 3)]=0.49513426995*x_ref[0] + (0.35667099733)*x_ref[1]
+        arg[(1, 0)]=0.729327146131*x[0] + (-0.97715966368)*x[1]
+        ref[(1, 0)]=0.729327146131*x_ref[0] + (-0.97715966368)*x_ref[1]
+        arg[(1, 1)]=-0.836923141075*x[0] + (-0.955465577447)*x[1]
+        ref[(1, 1)]=-0.836923141075*x_ref[0] + (-0.955465577447)*x_ref[1]
+        arg[(1, 2)]=-0.323268206398*x[0] + (0.561168485497)*x[1]
+        ref[(1, 2)]=-0.323268206398*x_ref[0] + (0.561168485497)*x_ref[1]
+        arg[(1, 3)]=-0.975453016326*x[0] + (0.292937625274)*x[1]
+        ref[(1, 3)]=-0.975453016326*x_ref[0] + (0.292937625274)*x_ref[1]
+        arg[(2, 0)]=-0.203676527137*x[0] + (-0.145016254359)*x[1]
+        ref[(2, 0)]=-0.203676527137*x_ref[0] + (-0.145016254359)*x_ref[1]
+        arg[(2, 1)]=-0.760841402673*x[0] + (0.75626894079)*x[1]
+        ref[(2, 1)]=-0.760841402673*x_ref[0] + (0.75626894079)*x_ref[1]
+        arg[(2, 2)]=0.547302200061*x[0] + (-0.119276947383)*x[1]
+        ref[(2, 2)]=0.547302200061*x_ref[0] + (-0.119276947383)*x_ref[1]
+        arg[(2, 3)]=-0.850827166322*x[0] + (-0.144270591217)*x[1]
+        ref[(2, 3)]=-0.850827166322*x_ref[0] + (-0.144270591217)*x_ref[1]
+        arg[(3, 0)]=0.123750714123*x[0] + (-0.935652723714)*x[1]
+        ref[(3, 0)]=0.123750714123*x_ref[0] + (-0.935652723714)*x_ref[1]
+        arg[(3, 1)]=-0.0249066664988*x[0] + (0.969702946008)*x[1]
+        ref[(3, 1)]=-0.0249066664988*x_ref[0] + (0.969702946008)*x_ref[1]
+        arg[(3, 2)]=-0.379253367109*x[0] + (-0.829104018043)*x[1]
+        ref[(3, 2)]=-0.379253367109*x_ref[0] + (-0.829104018043)*x_ref[1]
+        arg[(3, 3)]=-0.34533329873*x[0] + (0.271019775557)*x[1]
+        ref[(3, 3)]=-0.34533329873*x_ref[0] + (0.271019775557)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.22768898782*x[2]
+            ref[(0, 0)]+=-0.22768898782*x_ref[2]
+            arg[(0, 1)]+=-0.49929769423*x[2]
+            ref[(0, 1)]+=-0.49929769423*x_ref[2]
+            arg[(0, 2)]+=-0.223066181227*x[2]
+            ref[(0, 2)]+=-0.223066181227*x_ref[2]
+            arg[(0, 3)]+=-0.219609933284*x[2]
+            ref[(0, 3)]+=-0.219609933284*x_ref[2]
+            arg[(1, 0)]+=0.897066482395*x[2]
+            ref[(1, 0)]+=0.897066482395*x_ref[2]
+            arg[(1, 1)]+=-0.703327630804*x[2]
+            ref[(1, 1)]+=-0.703327630804*x_ref[2]
+            arg[(1, 2)]+=0.47391666343*x[2]
+            ref[(1, 2)]+=0.47391666343*x_ref[2]
+            arg[(1, 3)]+=0.180205380151*x[2]
+            ref[(1, 3)]+=0.180205380151*x_ref[2]
+            arg[(2, 0)]+=0.149389946131*x[2]
+            ref[(2, 0)]+=0.149389946131*x_ref[2]
+            arg[(2, 1)]+=-0.468764042694*x[2]
+            ref[(2, 1)]+=-0.468764042694*x_ref[2]
+            arg[(2, 2)]+=-0.712316912159*x[2]
+            ref[(2, 2)]+=-0.712316912159*x_ref[2]
+            arg[(2, 3)]+=0.33348976855*x[2]
+            ref[(2, 3)]+=0.33348976855*x_ref[2]
+            arg[(3, 0)]+=0.303655876908*x[2]
+            ref[(3, 0)]+=0.303655876908*x_ref[2]
+            arg[(3, 1)]+=-0.0807801818598*x[2]
+            ref[(3, 1)]+=-0.0807801818598*x_ref[2]
+            arg[(3, 2)]+=0.302628663285*x[2]
+            ref[(3, 2)]+=0.302628663285*x_ref[2]
+            arg[(3, 3)]+=-0.627574832503*x[2]
+            ref[(3, 3)]+=-0.627574832503*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3),w)
+        ref = Data(0,(2, 3, 3),w_ref)
+        arg[(0, 0, 0)]=0.816665098751*x[0] + (0.00899067104422)*x[1]
+        ref[(0, 0, 0)]=0.816665098751*x_ref[0] + (0.00899067104422)*x_ref[1]
+        arg[(0, 0, 1)]=0.636581269625*x[0] + (0.398681432406)*x[1]
+        ref[(0, 0, 1)]=0.636581269625*x_ref[0] + (0.398681432406)*x_ref[1]
+        arg[(0, 0, 2)]=0.611017507532*x[0] + (0.125585589443)*x[1]
+        ref[(0, 0, 2)]=0.611017507532*x_ref[0] + (0.125585589443)*x_ref[1]
+        arg[(0, 1, 0)]=0.313596505939*x[0] + (-0.531398482891)*x[1]
+        ref[(0, 1, 0)]=0.313596505939*x_ref[0] + (-0.531398482891)*x_ref[1]
+        arg[(0, 1, 1)]=0.974627089897*x[0] + (0.268527752833)*x[1]
+        ref[(0, 1, 1)]=0.974627089897*x_ref[0] + (0.268527752833)*x_ref[1]
+        arg[(0, 1, 2)]=-0.388827373862*x[0] + (-0.295273375954)*x[1]
+        ref[(0, 1, 2)]=-0.388827373862*x_ref[0] + (-0.295273375954)*x_ref[1]
+        arg[(0, 2, 0)]=0.4408437015*x[0] + (-0.92605652898)*x[1]
+        ref[(0, 2, 0)]=0.4408437015*x_ref[0] + (-0.92605652898)*x_ref[1]
+        arg[(0, 2, 1)]=-0.715279723979*x[0] + (0.268625725997)*x[1]
+        ref[(0, 2, 1)]=-0.715279723979*x_ref[0] + (0.268625725997)*x_ref[1]
+        arg[(0, 2, 2)]=0.494098741292*x[0] + (0.787250414677)*x[1]
+        ref[(0, 2, 2)]=0.494098741292*x_ref[0] + (0.787250414677)*x_ref[1]
+        arg[(1, 0, 0)]=-0.551475315051*x[0] + (-0.0399176946307)*x[1]
+        ref[(1, 0, 0)]=-0.551475315051*x_ref[0] + (-0.0399176946307)*x_ref[1]
+        arg[(1, 0, 1)]=0.0764390507746*x[0] + (0.504642899138)*x[1]
+        ref[(1, 0, 1)]=0.0764390507746*x_ref[0] + (0.504642899138)*x_ref[1]
+        arg[(1, 0, 2)]=-0.607805328062*x[0] + (-0.414597681764)*x[1]
+        ref[(1, 0, 2)]=-0.607805328062*x_ref[0] + (-0.414597681764)*x_ref[1]
+        arg[(1, 1, 0)]=-0.710037905051*x[0] + (0.559989321466)*x[1]
+        ref[(1, 1, 0)]=-0.710037905051*x_ref[0] + (0.559989321466)*x_ref[1]
+        arg[(1, 1, 1)]=-0.629274056881*x[0] + (0.33305986695)*x[1]
+        ref[(1, 1, 1)]=-0.629274056881*x_ref[0] + (0.33305986695)*x_ref[1]
+        arg[(1, 1, 2)]=-0.687606678316*x[0] + (0.612053758251)*x[1]
+        ref[(1, 1, 2)]=-0.687606678316*x_ref[0] + (0.612053758251)*x_ref[1]
+        arg[(1, 2, 0)]=-0.982045389141*x[0] + (-0.589509313201)*x[1]
+        ref[(1, 2, 0)]=-0.982045389141*x_ref[0] + (-0.589509313201)*x_ref[1]
+        arg[(1, 2, 1)]=-0.412595498669*x[0] + (-0.572333714458)*x[1]
+        ref[(1, 2, 1)]=-0.412595498669*x_ref[0] + (-0.572333714458)*x_ref[1]
+        arg[(1, 2, 2)]=0.215600457607*x[0] + (-0.298845636752)*x[1]
+        ref[(1, 2, 2)]=0.215600457607*x_ref[0] + (-0.298845636752)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.609462505843*x[2]
+            ref[(0, 0, 0)]+=-0.609462505843*x_ref[2]
+            arg[(0, 0, 1)]+=0.292838255698*x[2]
+            ref[(0, 0, 1)]+=0.292838255698*x_ref[2]
+            arg[(0, 0, 2)]+=0.271335416314*x[2]
+            ref[(0, 0, 2)]+=0.271335416314*x_ref[2]
+            arg[(0, 1, 0)]+=-0.446746044483*x[2]
+            ref[(0, 1, 0)]+=-0.446746044483*x_ref[2]
+            arg[(0, 1, 1)]+=0.131448098113*x[2]
+            ref[(0, 1, 1)]+=0.131448098113*x_ref[2]
+            arg[(0, 1, 2)]+=0.609321869544*x[2]
+            ref[(0, 1, 2)]+=0.609321869544*x_ref[2]
+            arg[(0, 2, 0)]+=-0.500500439334*x[2]
+            ref[(0, 2, 0)]+=-0.500500439334*x_ref[2]
+            arg[(0, 2, 1)]+=-0.0566578138722*x[2]
+            ref[(0, 2, 1)]+=-0.0566578138722*x_ref[2]
+            arg[(0, 2, 2)]+=-0.998253017293*x[2]
+            ref[(0, 2, 2)]+=-0.998253017293*x_ref[2]
+            arg[(1, 0, 0)]+=-0.414452728996*x[2]
+            ref[(1, 0, 0)]+=-0.414452728996*x_ref[2]
+            arg[(1, 0, 1)]+=-0.835308391145*x[2]
+            ref[(1, 0, 1)]+=-0.835308391145*x_ref[2]
+            arg[(1, 0, 2)]+=-0.818697984547*x[2]
+            ref[(1, 0, 2)]+=-0.818697984547*x_ref[2]
+            arg[(1, 1, 0)]+=0.968592019335*x[2]
+            ref[(1, 1, 0)]+=0.968592019335*x_ref[2]
+            arg[(1, 1, 1)]+=-0.73119384463*x[2]
+            ref[(1, 1, 1)]+=-0.73119384463*x_ref[2]
+            arg[(1, 1, 2)]+=-0.357555302795*x[2]
+            ref[(1, 1, 2)]+=-0.357555302795*x_ref[2]
+            arg[(1, 2, 0)]+=-0.96332080002*x[2]
+            ref[(1, 2, 0)]+=-0.96332080002*x_ref[2]
+            arg[(1, 2, 1)]+=0.234719937755*x[2]
+            ref[(1, 2, 1)]+=0.234719937755*x_ref[2]
+            arg[(1, 2, 2)]+=-0.909819549461*x[2]
+            ref[(1, 2, 2)]+=-0.909819549461*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 2, 4),w)
+        ref = Data(0,(3, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.386249792439*x[0] + (-0.634201234389)*x[1]
+        ref[(0, 0, 0, 0)]=-0.386249792439*x_ref[0] + (-0.634201234389)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.714905048697*x[0] + (0.196352729467)*x[1]
+        ref[(0, 0, 0, 1)]=-0.714905048697*x_ref[0] + (0.196352729467)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.299619938335*x[0] + (-0.768201973342)*x[1]
+        ref[(0, 0, 0, 2)]=0.299619938335*x_ref[0] + (-0.768201973342)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.465484013792*x[0] + (-0.768408375719)*x[1]
+        ref[(0, 0, 0, 3)]=0.465484013792*x_ref[0] + (-0.768408375719)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.173952989396*x[0] + (-0.787506771526)*x[1]
+        ref[(0, 0, 1, 0)]=0.173952989396*x_ref[0] + (-0.787506771526)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.446452247002*x[0] + (0.844618372154)*x[1]
+        ref[(0, 0, 1, 1)]=0.446452247002*x_ref[0] + (0.844618372154)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.0534833566624*x[0] + (-0.975632205862)*x[1]
+        ref[(0, 0, 1, 2)]=-0.0534833566624*x_ref[0] + (-0.975632205862)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.822691084652*x[0] + (0.391188751782)*x[1]
+        ref[(0, 0, 1, 3)]=0.822691084652*x_ref[0] + (0.391188751782)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.961453895678*x[0] + (-0.494692585179)*x[1]
+        ref[(0, 1, 0, 0)]=-0.961453895678*x_ref[0] + (-0.494692585179)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.612452103238*x[0] + (-0.527464074657)*x[1]
+        ref[(0, 1, 0, 1)]=0.612452103238*x_ref[0] + (-0.527464074657)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.154125527812*x[0] + (0.779865130106)*x[1]
+        ref[(0, 1, 0, 2)]=0.154125527812*x_ref[0] + (0.779865130106)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.104891100764*x[0] + (-0.452359933864)*x[1]
+        ref[(0, 1, 0, 3)]=0.104891100764*x_ref[0] + (-0.452359933864)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.880728821674*x[0] + (-0.834693841527)*x[1]
+        ref[(0, 1, 1, 0)]=0.880728821674*x_ref[0] + (-0.834693841527)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.766162480941*x[0] + (0.314476324151)*x[1]
+        ref[(0, 1, 1, 1)]=0.766162480941*x_ref[0] + (0.314476324151)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.546474684661*x[0] + (-0.753419779699)*x[1]
+        ref[(0, 1, 1, 2)]=0.546474684661*x_ref[0] + (-0.753419779699)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.523676682648*x[0] + (0.0744263233053)*x[1]
+        ref[(0, 1, 1, 3)]=-0.523676682648*x_ref[0] + (0.0744263233053)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.238240693633*x[0] + (0.771593747742)*x[1]
+        ref[(1, 0, 0, 0)]=0.238240693633*x_ref[0] + (0.771593747742)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.862813584171*x[0] + (0.0237759799775)*x[1]
+        ref[(1, 0, 0, 1)]=0.862813584171*x_ref[0] + (0.0237759799775)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.0678953915977*x[0] + (-0.956694079013)*x[1]
+        ref[(1, 0, 0, 2)]=-0.0678953915977*x_ref[0] + (-0.956694079013)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.786477244158*x[0] + (-0.0510359888386)*x[1]
+        ref[(1, 0, 0, 3)]=-0.786477244158*x_ref[0] + (-0.0510359888386)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.632010564961*x[0] + (-0.278495257805)*x[1]
+        ref[(1, 0, 1, 0)]=0.632010564961*x_ref[0] + (-0.278495257805)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.131183984939*x[0] + (0.168674759906)*x[1]
+        ref[(1, 0, 1, 1)]=0.131183984939*x_ref[0] + (0.168674759906)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.512109335757*x[0] + (0.12313908468)*x[1]
+        ref[(1, 0, 1, 2)]=0.512109335757*x_ref[0] + (0.12313908468)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.111681527153*x[0] + (-0.00701893738429)*x[1]
+        ref[(1, 0, 1, 3)]=-0.111681527153*x_ref[0] + (-0.00701893738429)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.354499874678*x[0] + (0.0681888434129)*x[1]
+        ref[(1, 1, 0, 0)]=0.354499874678*x_ref[0] + (0.0681888434129)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.231967674004*x[0] + (0.947910275172)*x[1]
+        ref[(1, 1, 0, 1)]=-0.231967674004*x_ref[0] + (0.947910275172)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.60111291323*x[0] + (0.42569699872)*x[1]
+        ref[(1, 1, 0, 2)]=0.60111291323*x_ref[0] + (0.42569699872)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.732077893736*x[0] + (-0.345088593822)*x[1]
+        ref[(1, 1, 0, 3)]=-0.732077893736*x_ref[0] + (-0.345088593822)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.981690177362*x[0] + (0.701450786143)*x[1]
+        ref[(1, 1, 1, 0)]=-0.981690177362*x_ref[0] + (0.701450786143)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.0389839606609*x[0] + (0.0693083801887)*x[1]
+        ref[(1, 1, 1, 1)]=-0.0389839606609*x_ref[0] + (0.0693083801887)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.370240612527*x[0] + (0.638182882398)*x[1]
+        ref[(1, 1, 1, 2)]=-0.370240612527*x_ref[0] + (0.638182882398)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.835239622208*x[0] + (-0.708089675185)*x[1]
+        ref[(1, 1, 1, 3)]=0.835239622208*x_ref[0] + (-0.708089675185)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.989189268558*x[0] + (-0.650766998969)*x[1]
+        ref[(2, 0, 0, 0)]=0.989189268558*x_ref[0] + (-0.650766998969)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.460004019729*x[0] + (0.165649873566)*x[1]
+        ref[(2, 0, 0, 1)]=0.460004019729*x_ref[0] + (0.165649873566)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.0340680107747*x[0] + (-0.812080833218)*x[1]
+        ref[(2, 0, 0, 2)]=0.0340680107747*x_ref[0] + (-0.812080833218)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.840944915172*x[0] + (-0.746084871505)*x[1]
+        ref[(2, 0, 0, 3)]=-0.840944915172*x_ref[0] + (-0.746084871505)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.895751804742*x[0] + (0.607925567884)*x[1]
+        ref[(2, 0, 1, 0)]=0.895751804742*x_ref[0] + (0.607925567884)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.0822375428736*x[0] + (0.518724520776)*x[1]
+        ref[(2, 0, 1, 1)]=0.0822375428736*x_ref[0] + (0.518724520776)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.145728538958*x[0] + (-0.0396353787151)*x[1]
+        ref[(2, 0, 1, 2)]=-0.145728538958*x_ref[0] + (-0.0396353787151)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.845061011293*x[0] + (0.0956895129288)*x[1]
+        ref[(2, 0, 1, 3)]=0.845061011293*x_ref[0] + (0.0956895129288)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.297972666152*x[0] + (-0.0682208045205)*x[1]
+        ref[(2, 1, 0, 0)]=0.297972666152*x_ref[0] + (-0.0682208045205)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.330145262312*x[0] + (-0.160194155685)*x[1]
+        ref[(2, 1, 0, 1)]=-0.330145262312*x_ref[0] + (-0.160194155685)*x_ref[1]
+        arg[(2, 1, 0, 2)]=0.957260236777*x[0] + (-0.240577123952)*x[1]
+        ref[(2, 1, 0, 2)]=0.957260236777*x_ref[0] + (-0.240577123952)*x_ref[1]
+        arg[(2, 1, 0, 3)]=0.0565700180312*x[0] + (-0.533382943502)*x[1]
+        ref[(2, 1, 0, 3)]=0.0565700180312*x_ref[0] + (-0.533382943502)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.831847049224*x[0] + (-0.792008102154)*x[1]
+        ref[(2, 1, 1, 0)]=-0.831847049224*x_ref[0] + (-0.792008102154)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.360386868761*x[0] + (-0.424466148679)*x[1]
+        ref[(2, 1, 1, 1)]=-0.360386868761*x_ref[0] + (-0.424466148679)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.62946682257*x[0] + (0.0206689704669)*x[1]
+        ref[(2, 1, 1, 2)]=-0.62946682257*x_ref[0] + (0.0206689704669)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.719673642717*x[0] + (-0.383955863718)*x[1]
+        ref[(2, 1, 1, 3)]=-0.719673642717*x_ref[0] + (-0.383955863718)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.796649092794*x[2]
+            ref[(0, 0, 0, 0)]+=0.796649092794*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.251682863903*x[2]
+            ref[(0, 0, 0, 1)]+=0.251682863903*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.259487026618*x[2]
+            ref[(0, 0, 0, 2)]+=-0.259487026618*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.253047539329*x[2]
+            ref[(0, 0, 0, 3)]+=0.253047539329*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.253422649684*x[2]
+            ref[(0, 0, 1, 0)]+=-0.253422649684*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.742531258699*x[2]
+            ref[(0, 0, 1, 1)]+=-0.742531258699*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.827017149516*x[2]
+            ref[(0, 0, 1, 2)]+=-0.827017149516*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.809308141299*x[2]
+            ref[(0, 0, 1, 3)]+=0.809308141299*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.616109566088*x[2]
+            ref[(0, 1, 0, 0)]+=0.616109566088*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.585465804504*x[2]
+            ref[(0, 1, 0, 1)]+=0.585465804504*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.298800150873*x[2]
+            ref[(0, 1, 0, 2)]+=-0.298800150873*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.207219915932*x[2]
+            ref[(0, 1, 0, 3)]+=-0.207219915932*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.873590470722*x[2]
+            ref[(0, 1, 1, 0)]+=0.873590470722*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.362139452751*x[2]
+            ref[(0, 1, 1, 1)]+=-0.362139452751*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.135486525936*x[2]
+            ref[(0, 1, 1, 2)]+=-0.135486525936*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.403312154957*x[2]
+            ref[(0, 1, 1, 3)]+=-0.403312154957*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.0766327884606*x[2]
+            ref[(1, 0, 0, 0)]+=0.0766327884606*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.246775222244*x[2]
+            ref[(1, 0, 0, 1)]+=-0.246775222244*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.86213418033*x[2]
+            ref[(1, 0, 0, 2)]+=-0.86213418033*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.704035073268*x[2]
+            ref[(1, 0, 0, 3)]+=0.704035073268*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.805527951933*x[2]
+            ref[(1, 0, 1, 0)]+=0.805527951933*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.615673538684*x[2]
+            ref[(1, 0, 1, 1)]+=0.615673538684*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.249932304552*x[2]
+            ref[(1, 0, 1, 2)]+=0.249932304552*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.00863344591441*x[2]
+            ref[(1, 0, 1, 3)]+=-0.00863344591441*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.0518586382037*x[2]
+            ref[(1, 1, 0, 0)]+=-0.0518586382037*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.292003157179*x[2]
+            ref[(1, 1, 0, 1)]+=-0.292003157179*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.618415237831*x[2]
+            ref[(1, 1, 0, 2)]+=0.618415237831*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.652964908754*x[2]
+            ref[(1, 1, 0, 3)]+=0.652964908754*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.447009220571*x[2]
+            ref[(1, 1, 1, 0)]+=0.447009220571*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.958905680937*x[2]
+            ref[(1, 1, 1, 1)]+=0.958905680937*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.541633513012*x[2]
+            ref[(1, 1, 1, 2)]+=0.541633513012*x_ref[2]
+            arg[(1, 1, 1, 3)]+=0.276631087166*x[2]
+            ref[(1, 1, 1, 3)]+=0.276631087166*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.631521075355*x[2]
+            ref[(2, 0, 0, 0)]+=0.631521075355*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.679886726743*x[2]
+            ref[(2, 0, 0, 1)]+=-0.679886726743*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.99806471915*x[2]
+            ref[(2, 0, 0, 2)]+=0.99806471915*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.050483133769*x[2]
+            ref[(2, 0, 0, 3)]+=-0.050483133769*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.11965183974*x[2]
+            ref[(2, 0, 1, 0)]+=-0.11965183974*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.499826494907*x[2]
+            ref[(2, 0, 1, 1)]+=-0.499826494907*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.755180339521*x[2]
+            ref[(2, 0, 1, 2)]+=-0.755180339521*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.504057190826*x[2]
+            ref[(2, 0, 1, 3)]+=0.504057190826*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.231924561166*x[2]
+            ref[(2, 1, 0, 0)]+=-0.231924561166*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.163612605*x[2]
+            ref[(2, 1, 0, 1)]+=0.163612605*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.931807020408*x[2]
+            ref[(2, 1, 0, 2)]+=-0.931807020408*x_ref[2]
+            arg[(2, 1, 0, 3)]+=0.329991403321*x[2]
+            ref[(2, 1, 0, 3)]+=0.329991403321*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.750107005171*x[2]
+            ref[(2, 1, 1, 0)]+=0.750107005171*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.521689187581*x[2]
+            ref[(2, 1, 1, 1)]+=0.521689187581*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.971167615365*x[2]
+            ref[(2, 1, 1, 2)]+=0.971167615365*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.606677932522*x[2]
+            ref[(2, 1, 1, 3)]+=0.606677932522*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.00558530448226*x[0] + (0.267281007953)*x[1]
+        ref=-0.00558530448226*x_ref[0] + (0.267281007953)*x_ref[1]
+        if dim==3:
+            arg+=(-0.819295042566)*x[2]
+            ref+=(-0.819295042566)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=-0.908053778173*x[0] + (0.623029028515)*x[1]
+        ref[(0,)]=-0.908053778173*x_ref[0] + (0.623029028515)*x_ref[1]
+        arg[(1,)]=-0.549803712197*x[0] + (0.659006291458)*x[1]
+        ref[(1,)]=-0.549803712197*x_ref[0] + (0.659006291458)*x_ref[1]
+        arg[(2,)]=0.705911805657*x[0] + (-0.00253847421384)*x[1]
+        ref[(2,)]=0.705911805657*x_ref[0] + (-0.00253847421384)*x_ref[1]
+        arg[(3,)]=0.270671382948*x[0] + (-0.549580058973)*x[1]
+        ref[(3,)]=0.270671382948*x_ref[0] + (-0.549580058973)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.842284535601*x[2]
+            ref[(0,)]+=0.842284535601*x_ref[2]
+            arg[(1,)]+=-0.629133624239*x[2]
+            ref[(1,)]+=-0.629133624239*x_ref[2]
+            arg[(2,)]+=0.445363259489*x[2]
+            ref[(2,)]+=0.445363259489*x_ref[2]
+            arg[(3,)]+=0.526530022619*x[2]
+            ref[(3,)]+=0.526530022619*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3),w_ref)
+        arg[(0, 0)]=-0.262794774312*x[0] + (0.100932048413)*x[1]
+        ref[(0, 0)]=-0.262794774312*x_ref[0] + (0.100932048413)*x_ref[1]
+        arg[(0, 1)]=0.880286081581*x[0] + (0.205277570235)*x[1]
+        ref[(0, 1)]=0.880286081581*x_ref[0] + (0.205277570235)*x_ref[1]
+        arg[(0, 2)]=0.638116294207*x[0] + (0.400897419275)*x[1]
+        ref[(0, 2)]=0.638116294207*x_ref[0] + (0.400897419275)*x_ref[1]
+        arg[(1, 0)]=0.902001394085*x[0] + (0.327479610224)*x[1]
+        ref[(1, 0)]=0.902001394085*x_ref[0] + (0.327479610224)*x_ref[1]
+        arg[(1, 1)]=-0.424655622719*x[0] + (-0.116502493585)*x[1]
+        ref[(1, 1)]=-0.424655622719*x_ref[0] + (-0.116502493585)*x_ref[1]
+        arg[(1, 2)]=-0.253467689102*x[0] + (0.506353785178)*x[1]
+        ref[(1, 2)]=-0.253467689102*x_ref[0] + (0.506353785178)*x_ref[1]
+        arg[(2, 0)]=-0.338871524511*x[0] + (0.247676884805)*x[1]
+        ref[(2, 0)]=-0.338871524511*x_ref[0] + (0.247676884805)*x_ref[1]
+        arg[(2, 1)]=0.860572084782*x[0] + (-0.36450605783)*x[1]
+        ref[(2, 1)]=0.860572084782*x_ref[0] + (-0.36450605783)*x_ref[1]
+        arg[(2, 2)]=0.527908469665*x[0] + (0.86467996118)*x[1]
+        ref[(2, 2)]=0.527908469665*x_ref[0] + (0.86467996118)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.292406011215*x[2]
+            ref[(0, 0)]+=-0.292406011215*x_ref[2]
+            arg[(0, 1)]+=0.498347849376*x[2]
+            ref[(0, 1)]+=0.498347849376*x_ref[2]
+            arg[(0, 2)]+=0.443159143783*x[2]
+            ref[(0, 2)]+=0.443159143783*x_ref[2]
+            arg[(1, 0)]+=-0.881749148197*x[2]
+            ref[(1, 0)]+=-0.881749148197*x_ref[2]
+            arg[(1, 1)]+=0.190920656578*x[2]
+            ref[(1, 1)]+=0.190920656578*x_ref[2]
+            arg[(1, 2)]+=0.139869380066*x[2]
+            ref[(1, 2)]+=0.139869380066*x_ref[2]
+            arg[(2, 0)]+=-0.902337379837*x[2]
+            ref[(2, 0)]+=-0.902337379837*x_ref[2]
+            arg[(2, 1)]+=0.260777582064*x[2]
+            ref[(2, 1)]+=0.260777582064*x_ref[2]
+            arg[(2, 2)]+=0.883319542848*x[2]
+            ref[(2, 2)]+=0.883319542848*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=-0.473704988242*x[0] + (0.790285164461)*x[1]
+        ref[(0, 0, 0)]=-0.473704988242*x_ref[0] + (0.790285164461)*x_ref[1]
+        arg[(0, 0, 1)]=-0.0525811954851*x[0] + (0.490686288364)*x[1]
+        ref[(0, 0, 1)]=-0.0525811954851*x_ref[0] + (0.490686288364)*x_ref[1]
+        arg[(0, 0, 2)]=0.409260041253*x[0] + (-0.312059132297)*x[1]
+        ref[(0, 0, 2)]=0.409260041253*x_ref[0] + (-0.312059132297)*x_ref[1]
+        arg[(0, 1, 0)]=-0.874708619622*x[0] + (-0.344360692169)*x[1]
+        ref[(0, 1, 0)]=-0.874708619622*x_ref[0] + (-0.344360692169)*x_ref[1]
+        arg[(0, 1, 1)]=-0.328104683871*x[0] + (-0.509604637764)*x[1]
+        ref[(0, 1, 1)]=-0.328104683871*x_ref[0] + (-0.509604637764)*x_ref[1]
+        arg[(0, 1, 2)]=0.58908170749*x[0] + (0.30779353553)*x[1]
+        ref[(0, 1, 2)]=0.58908170749*x_ref[0] + (0.30779353553)*x_ref[1]
+        arg[(1, 0, 0)]=0.303965921498*x[0] + (0.482665890382)*x[1]
+        ref[(1, 0, 0)]=0.303965921498*x_ref[0] + (0.482665890382)*x_ref[1]
+        arg[(1, 0, 1)]=0.89041004541*x[0] + (0.309887237254)*x[1]
+        ref[(1, 0, 1)]=0.89041004541*x_ref[0] + (0.309887237254)*x_ref[1]
+        arg[(1, 0, 2)]=0.238292951721*x[0] + (-0.682119100838)*x[1]
+        ref[(1, 0, 2)]=0.238292951721*x_ref[0] + (-0.682119100838)*x_ref[1]
+        arg[(1, 1, 0)]=0.163039007027*x[0] + (0.460543662892)*x[1]
+        ref[(1, 1, 0)]=0.163039007027*x_ref[0] + (0.460543662892)*x_ref[1]
+        arg[(1, 1, 1)]=0.920838535017*x[0] + (-0.0345080894509)*x[1]
+        ref[(1, 1, 1)]=0.920838535017*x_ref[0] + (-0.0345080894509)*x_ref[1]
+        arg[(1, 1, 2)]=-0.561931402987*x[0] + (0.453671253277)*x[1]
+        ref[(1, 1, 2)]=-0.561931402987*x_ref[0] + (0.453671253277)*x_ref[1]
+        arg[(2, 0, 0)]=-0.704196600826*x[0] + (0.290672381747)*x[1]
+        ref[(2, 0, 0)]=-0.704196600826*x_ref[0] + (0.290672381747)*x_ref[1]
+        arg[(2, 0, 1)]=-0.691820902136*x[0] + (0.621002543162)*x[1]
+        ref[(2, 0, 1)]=-0.691820902136*x_ref[0] + (0.621002543162)*x_ref[1]
+        arg[(2, 0, 2)]=0.803426683457*x[0] + (-0.824203382895)*x[1]
+        ref[(2, 0, 2)]=0.803426683457*x_ref[0] + (-0.824203382895)*x_ref[1]
+        arg[(2, 1, 0)]=0.479136091401*x[0] + (0.740717305057)*x[1]
+        ref[(2, 1, 0)]=0.479136091401*x_ref[0] + (0.740717305057)*x_ref[1]
+        arg[(2, 1, 1)]=-0.369079876957*x[0] + (-0.507702576133)*x[1]
+        ref[(2, 1, 1)]=-0.369079876957*x_ref[0] + (-0.507702576133)*x_ref[1]
+        arg[(2, 1, 2)]=0.250940146446*x[0] + (-0.637366601841)*x[1]
+        ref[(2, 1, 2)]=0.250940146446*x_ref[0] + (-0.637366601841)*x_ref[1]
+        arg[(3, 0, 0)]=0.836469534115*x[0] + (-0.647224071128)*x[1]
+        ref[(3, 0, 0)]=0.836469534115*x_ref[0] + (-0.647224071128)*x_ref[1]
+        arg[(3, 0, 1)]=0.00653777164269*x[0] + (-0.953819137712)*x[1]
+        ref[(3, 0, 1)]=0.00653777164269*x_ref[0] + (-0.953819137712)*x_ref[1]
+        arg[(3, 0, 2)]=-0.978803773947*x[0] + (-0.477761454401)*x[1]
+        ref[(3, 0, 2)]=-0.978803773947*x_ref[0] + (-0.477761454401)*x_ref[1]
+        arg[(3, 1, 0)]=-0.764597218836*x[0] + (0.235654374977)*x[1]
+        ref[(3, 1, 0)]=-0.764597218836*x_ref[0] + (0.235654374977)*x_ref[1]
+        arg[(3, 1, 1)]=-0.414488056155*x[0] + (-0.322906324526)*x[1]
+        ref[(3, 1, 1)]=-0.414488056155*x_ref[0] + (-0.322906324526)*x_ref[1]
+        arg[(3, 1, 2)]=0.632312913294*x[0] + (0.159969551857)*x[1]
+        ref[(3, 1, 2)]=0.632312913294*x_ref[0] + (0.159969551857)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.453912436345*x[2]
+            ref[(0, 0, 0)]+=0.453912436345*x_ref[2]
+            arg[(0, 0, 1)]+=-0.406176017799*x[2]
+            ref[(0, 0, 1)]+=-0.406176017799*x_ref[2]
+            arg[(0, 0, 2)]+=-0.814863467194*x[2]
+            ref[(0, 0, 2)]+=-0.814863467194*x_ref[2]
+            arg[(0, 1, 0)]+=-0.528235910886*x[2]
+            ref[(0, 1, 0)]+=-0.528235910886*x_ref[2]
+            arg[(0, 1, 1)]+=-0.475372035118*x[2]
+            ref[(0, 1, 1)]+=-0.475372035118*x_ref[2]
+            arg[(0, 1, 2)]+=-0.462548694315*x[2]
+            ref[(0, 1, 2)]+=-0.462548694315*x_ref[2]
+            arg[(1, 0, 0)]+=-0.0659510634272*x[2]
+            ref[(1, 0, 0)]+=-0.0659510634272*x_ref[2]
+            arg[(1, 0, 1)]+=-0.467508014288*x[2]
+            ref[(1, 0, 1)]+=-0.467508014288*x_ref[2]
+            arg[(1, 0, 2)]+=-0.970457193923*x[2]
+            ref[(1, 0, 2)]+=-0.970457193923*x_ref[2]
+            arg[(1, 1, 0)]+=0.474728987123*x[2]
+            ref[(1, 1, 0)]+=0.474728987123*x_ref[2]
+            arg[(1, 1, 1)]+=-0.944925654601*x[2]
+            ref[(1, 1, 1)]+=-0.944925654601*x_ref[2]
+            arg[(1, 1, 2)]+=0.898977869001*x[2]
+            ref[(1, 1, 2)]+=0.898977869001*x_ref[2]
+            arg[(2, 0, 0)]+=0.953812612246*x[2]
+            ref[(2, 0, 0)]+=0.953812612246*x_ref[2]
+            arg[(2, 0, 1)]+=0.520256199104*x[2]
+            ref[(2, 0, 1)]+=0.520256199104*x_ref[2]
+            arg[(2, 0, 2)]+=0.599228570925*x[2]
+            ref[(2, 0, 2)]+=0.599228570925*x_ref[2]
+            arg[(2, 1, 0)]+=-0.503009557334*x[2]
+            ref[(2, 1, 0)]+=-0.503009557334*x_ref[2]
+            arg[(2, 1, 1)]+=-0.492156121557*x[2]
+            ref[(2, 1, 1)]+=-0.492156121557*x_ref[2]
+            arg[(2, 1, 2)]+=-0.40165840015*x[2]
+            ref[(2, 1, 2)]+=-0.40165840015*x_ref[2]
+            arg[(3, 0, 0)]+=-0.989276867989*x[2]
+            ref[(3, 0, 0)]+=-0.989276867989*x_ref[2]
+            arg[(3, 0, 1)]+=-0.948077352817*x[2]
+            ref[(3, 0, 1)]+=-0.948077352817*x_ref[2]
+            arg[(3, 0, 2)]+=-0.178537840254*x[2]
+            ref[(3, 0, 2)]+=-0.178537840254*x_ref[2]
+            arg[(3, 1, 0)]+=-0.184004649718*x[2]
+            ref[(3, 1, 0)]+=-0.184004649718*x_ref[2]
+            arg[(3, 1, 1)]+=0.376093364717*x[2]
+            ref[(3, 1, 1)]+=0.376093364717*x_ref[2]
+            arg[(3, 1, 2)]+=-0.722547752088*x[2]
+            ref[(3, 1, 2)]+=-0.722547752088*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 4, 2),w)
+        ref = Data(0,(2, 3, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=-0.509549363935*x[0] + (0.031912714712)*x[1]
+        ref[(0, 0, 0, 0)]=-0.509549363935*x_ref[0] + (0.031912714712)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.771767354914*x[0] + (0.890063053324)*x[1]
+        ref[(0, 0, 0, 1)]=-0.771767354914*x_ref[0] + (0.890063053324)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.79443039146*x[0] + (0.945788782084)*x[1]
+        ref[(0, 0, 1, 0)]=-0.79443039146*x_ref[0] + (0.945788782084)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.843018447372*x[0] + (-0.509213166049)*x[1]
+        ref[(0, 0, 1, 1)]=0.843018447372*x_ref[0] + (-0.509213166049)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.677310562166*x[0] + (0.226404944134)*x[1]
+        ref[(0, 0, 2, 0)]=-0.677310562166*x_ref[0] + (0.226404944134)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.785778890778*x[0] + (-0.537684565179)*x[1]
+        ref[(0, 0, 2, 1)]=-0.785778890778*x_ref[0] + (-0.537684565179)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.937993669572*x[0] + (-0.959865474648)*x[1]
+        ref[(0, 0, 3, 0)]=0.937993669572*x_ref[0] + (-0.959865474648)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.627279413127*x[0] + (0.651401910482)*x[1]
+        ref[(0, 0, 3, 1)]=0.627279413127*x_ref[0] + (0.651401910482)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.0955746906829*x[0] + (0.574365730979)*x[1]
+        ref[(0, 1, 0, 0)]=-0.0955746906829*x_ref[0] + (0.574365730979)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.77158595025*x[0] + (-0.130621969023)*x[1]
+        ref[(0, 1, 0, 1)]=-0.77158595025*x_ref[0] + (-0.130621969023)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.686195417552*x[0] + (0.702609077951)*x[1]
+        ref[(0, 1, 1, 0)]=0.686195417552*x_ref[0] + (0.702609077951)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.774168669826*x[0] + (-0.638215854051)*x[1]
+        ref[(0, 1, 1, 1)]=-0.774168669826*x_ref[0] + (-0.638215854051)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.887097463598*x[0] + (0.582640727933)*x[1]
+        ref[(0, 1, 2, 0)]=-0.887097463598*x_ref[0] + (0.582640727933)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.0999345274915*x[0] + (-0.471183300052)*x[1]
+        ref[(0, 1, 2, 1)]=0.0999345274915*x_ref[0] + (-0.471183300052)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.602396989593*x[0] + (-0.288538142154)*x[1]
+        ref[(0, 1, 3, 0)]=-0.602396989593*x_ref[0] + (-0.288538142154)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.23839958454*x[0] + (-0.382160622365)*x[1]
+        ref[(0, 1, 3, 1)]=0.23839958454*x_ref[0] + (-0.382160622365)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.427254667656*x[0] + (0.927840454178)*x[1]
+        ref[(0, 2, 0, 0)]=0.427254667656*x_ref[0] + (0.927840454178)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.860881598408*x[0] + (0.288234219003)*x[1]
+        ref[(0, 2, 0, 1)]=0.860881598408*x_ref[0] + (0.288234219003)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.712629077032*x[0] + (-0.586695008899)*x[1]
+        ref[(0, 2, 1, 0)]=0.712629077032*x_ref[0] + (-0.586695008899)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.663625055262*x[0] + (-0.522208236448)*x[1]
+        ref[(0, 2, 1, 1)]=-0.663625055262*x_ref[0] + (-0.522208236448)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.826915170432*x[0] + (-0.632954005461)*x[1]
+        ref[(0, 2, 2, 0)]=0.826915170432*x_ref[0] + (-0.632954005461)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.92078168494*x[0] + (-0.899062352781)*x[1]
+        ref[(0, 2, 2, 1)]=0.92078168494*x_ref[0] + (-0.899062352781)*x_ref[1]
+        arg[(0, 2, 3, 0)]=0.899622020898*x[0] + (-0.51322391504)*x[1]
+        ref[(0, 2, 3, 0)]=0.899622020898*x_ref[0] + (-0.51322391504)*x_ref[1]
+        arg[(0, 2, 3, 1)]=0.365532910856*x[0] + (-0.688738566778)*x[1]
+        ref[(0, 2, 3, 1)]=0.365532910856*x_ref[0] + (-0.688738566778)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.581630286843*x[0] + (0.860133295779)*x[1]
+        ref[(1, 0, 0, 0)]=-0.581630286843*x_ref[0] + (0.860133295779)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.831647030597*x[0] + (-0.705366397411)*x[1]
+        ref[(1, 0, 0, 1)]=-0.831647030597*x_ref[0] + (-0.705366397411)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.349738592855*x[0] + (-0.973409667178)*x[1]
+        ref[(1, 0, 1, 0)]=-0.349738592855*x_ref[0] + (-0.973409667178)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.547271227272*x[0] + (-0.252304690058)*x[1]
+        ref[(1, 0, 1, 1)]=0.547271227272*x_ref[0] + (-0.252304690058)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.288579488234*x[0] + (0.161746652732)*x[1]
+        ref[(1, 0, 2, 0)]=0.288579488234*x_ref[0] + (0.161746652732)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.51949046393*x[0] + (0.811156989006)*x[1]
+        ref[(1, 0, 2, 1)]=0.51949046393*x_ref[0] + (0.811156989006)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.413348083756*x[0] + (-0.488058771808)*x[1]
+        ref[(1, 0, 3, 0)]=-0.413348083756*x_ref[0] + (-0.488058771808)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.0646441193267*x[0] + (0.690078020056)*x[1]
+        ref[(1, 0, 3, 1)]=0.0646441193267*x_ref[0] + (0.690078020056)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.751376424043*x[0] + (-0.612847994739)*x[1]
+        ref[(1, 1, 0, 0)]=-0.751376424043*x_ref[0] + (-0.612847994739)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.422634517685*x[0] + (-0.225774390536)*x[1]
+        ref[(1, 1, 0, 1)]=0.422634517685*x_ref[0] + (-0.225774390536)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.862292266015*x[0] + (0.403366322791)*x[1]
+        ref[(1, 1, 1, 0)]=-0.862292266015*x_ref[0] + (0.403366322791)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.793144048807*x[0] + (-0.371987143125)*x[1]
+        ref[(1, 1, 1, 1)]=-0.793144048807*x_ref[0] + (-0.371987143125)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.63111409155*x[0] + (0.939648436523)*x[1]
+        ref[(1, 1, 2, 0)]=-0.63111409155*x_ref[0] + (0.939648436523)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.657930701502*x[0] + (0.697670502929)*x[1]
+        ref[(1, 1, 2, 1)]=-0.657930701502*x_ref[0] + (0.697670502929)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.00397775857587*x[0] + (0.0562914407268)*x[1]
+        ref[(1, 1, 3, 0)]=0.00397775857587*x_ref[0] + (0.0562914407268)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.918176541334*x[0] + (0.000198165263958)*x[1]
+        ref[(1, 1, 3, 1)]=-0.918176541334*x_ref[0] + (0.000198165263958)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.19324896532*x[0] + (0.154402468725)*x[1]
+        ref[(1, 2, 0, 0)]=-0.19324896532*x_ref[0] + (0.154402468725)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.901979836091*x[0] + (-0.0905720472202)*x[1]
+        ref[(1, 2, 0, 1)]=-0.901979836091*x_ref[0] + (-0.0905720472202)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.378153682554*x[0] + (-0.963400910005)*x[1]
+        ref[(1, 2, 1, 0)]=-0.378153682554*x_ref[0] + (-0.963400910005)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.229852107516*x[0] + (0.75544284085)*x[1]
+        ref[(1, 2, 1, 1)]=-0.229852107516*x_ref[0] + (0.75544284085)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.518111521263*x[0] + (-0.0386105546831)*x[1]
+        ref[(1, 2, 2, 0)]=0.518111521263*x_ref[0] + (-0.0386105546831)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.955344703458*x[0] + (-0.0965751786888)*x[1]
+        ref[(1, 2, 2, 1)]=-0.955344703458*x_ref[0] + (-0.0965751786888)*x_ref[1]
+        arg[(1, 2, 3, 0)]=-0.41375447808*x[0] + (0.673262009511)*x[1]
+        ref[(1, 2, 3, 0)]=-0.41375447808*x_ref[0] + (0.673262009511)*x_ref[1]
+        arg[(1, 2, 3, 1)]=-0.387230350631*x[0] + (-0.553097166584)*x[1]
+        ref[(1, 2, 3, 1)]=-0.387230350631*x_ref[0] + (-0.553097166584)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.877307914227*x[2]
+            ref[(0, 0, 0, 0)]+=0.877307914227*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.483831964226*x[2]
+            ref[(0, 0, 0, 1)]+=-0.483831964226*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.332319791941*x[2]
+            ref[(0, 0, 1, 0)]+=0.332319791941*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.857185254763*x[2]
+            ref[(0, 0, 1, 1)]+=0.857185254763*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.408193724805*x[2]
+            ref[(0, 0, 2, 0)]+=0.408193724805*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.995301373165*x[2]
+            ref[(0, 0, 2, 1)]+=0.995301373165*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.249544115748*x[2]
+            ref[(0, 0, 3, 0)]+=0.249544115748*x_ref[2]
+            arg[(0, 0, 3, 1)]+=-0.110576968901*x[2]
+            ref[(0, 0, 3, 1)]+=-0.110576968901*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.121785244421*x[2]
+            ref[(0, 1, 0, 0)]+=-0.121785244421*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.353562858053*x[2]
+            ref[(0, 1, 0, 1)]+=0.353562858053*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.326312901517*x[2]
+            ref[(0, 1, 1, 0)]+=0.326312901517*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.455837861461*x[2]
+            ref[(0, 1, 1, 1)]+=0.455837861461*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.115991421951*x[2]
+            ref[(0, 1, 2, 0)]+=0.115991421951*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.806184942002*x[2]
+            ref[(0, 1, 2, 1)]+=0.806184942002*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.78605674774*x[2]
+            ref[(0, 1, 3, 0)]+=-0.78605674774*x_ref[2]
+            arg[(0, 1, 3, 1)]+=0.541221428877*x[2]
+            ref[(0, 1, 3, 1)]+=0.541221428877*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.50676127784*x[2]
+            ref[(0, 2, 0, 0)]+=0.50676127784*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.841668501832*x[2]
+            ref[(0, 2, 0, 1)]+=0.841668501832*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.871823264166*x[2]
+            ref[(0, 2, 1, 0)]+=0.871823264166*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.903641417242*x[2]
+            ref[(0, 2, 1, 1)]+=-0.903641417242*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.487956028099*x[2]
+            ref[(0, 2, 2, 0)]+=-0.487956028099*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.905436495363*x[2]
+            ref[(0, 2, 2, 1)]+=-0.905436495363*x_ref[2]
+            arg[(0, 2, 3, 0)]+=-0.460952356003*x[2]
+            ref[(0, 2, 3, 0)]+=-0.460952356003*x_ref[2]
+            arg[(0, 2, 3, 1)]+=-0.678125870858*x[2]
+            ref[(0, 2, 3, 1)]+=-0.678125870858*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.943725659488*x[2]
+            ref[(1, 0, 0, 0)]+=-0.943725659488*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.620288881949*x[2]
+            ref[(1, 0, 0, 1)]+=0.620288881949*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.74474294956*x[2]
+            ref[(1, 0, 1, 0)]+=0.74474294956*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.570720618404*x[2]
+            ref[(1, 0, 1, 1)]+=-0.570720618404*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.162326938985*x[2]
+            ref[(1, 0, 2, 0)]+=-0.162326938985*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.925323409098*x[2]
+            ref[(1, 0, 2, 1)]+=0.925323409098*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.0213543261191*x[2]
+            ref[(1, 0, 3, 0)]+=-0.0213543261191*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.359353340529*x[2]
+            ref[(1, 0, 3, 1)]+=-0.359353340529*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.386575277443*x[2]
+            ref[(1, 1, 0, 0)]+=-0.386575277443*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.879774373851*x[2]
+            ref[(1, 1, 0, 1)]+=-0.879774373851*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.269279172239*x[2]
+            ref[(1, 1, 1, 0)]+=0.269279172239*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.841201140024*x[2]
+            ref[(1, 1, 1, 1)]+=-0.841201140024*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.409432736371*x[2]
+            ref[(1, 1, 2, 0)]+=-0.409432736371*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.670081306039*x[2]
+            ref[(1, 1, 2, 1)]+=-0.670081306039*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.0864147764076*x[2]
+            ref[(1, 1, 3, 0)]+=-0.0864147764076*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.908336954609*x[2]
+            ref[(1, 1, 3, 1)]+=-0.908336954609*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.457452496868*x[2]
+            ref[(1, 2, 0, 0)]+=0.457452496868*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.646969659492*x[2]
+            ref[(1, 2, 0, 1)]+=0.646969659492*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.148720736996*x[2]
+            ref[(1, 2, 1, 0)]+=-0.148720736996*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.187467161289*x[2]
+            ref[(1, 2, 1, 1)]+=-0.187467161289*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.383242764993*x[2]
+            ref[(1, 2, 2, 0)]+=-0.383242764993*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.172958421262*x[2]
+            ref[(1, 2, 2, 1)]+=-0.172958421262*x_ref[2]
+            arg[(1, 2, 3, 0)]+=-0.374197242061*x[2]
+            ref[(1, 2, 3, 0)]+=-0.374197242061*x_ref[2]
+            arg[(1, 2, 3, 1)]+=0.891445075599*x[2]
+            ref[(1, 2, 3, 1)]+=0.891445075599*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Function_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.201967841992*x[0]**o + (0.615449461165)*x[0] + (-0.572678278067)*x[1]**o + (0.978748177254)*x[1]
+        ref=0.201967841992*x_ref[0]**o + (0.615449461165)*x_ref[0] + (-0.572678278067)*x_ref[1]**o + (0.978748177254)*x_ref[1]
+        if dim==3:
+            arg+=(0.80753841967)*x[2]**o + (-0.89618939125)*x[2]
+            ref+=(0.80753841967)*x_ref[2]**o + (-0.89618939125)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Function_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=0.461352065629*x[0]**o + (0.556382634443)*x[0] + (0.125332576018)*x[1]**o + (-0.269476489055)*x[1]
+        ref[(0,)]=0.461352065629*x_ref[0]**o + (0.556382634443)*x_ref[0] + (0.125332576018)*x_ref[1]**o + (-0.269476489055)*x_ref[1]
+        arg[(1,)]=0.986517841233*x[0]**o + (0.687066453831)*x[0] + (-0.0610924578418)*x[1]**o + (-0.412373342019)*x[1]
+        ref[(1,)]=0.986517841233*x_ref[0]**o + (0.687066453831)*x_ref[0] + (-0.0610924578418)*x_ref[1]**o + (-0.412373342019)*x_ref[1]
+        arg[(2,)]=0.124575075217*x[0]**o + (0.254013228414)*x[0] + (0.597006594341)*x[1]**o + (0.381786796732)*x[1]
+        ref[(2,)]=0.124575075217*x_ref[0]**o + (0.254013228414)*x_ref[0] + (0.597006594341)*x_ref[1]**o + (0.381786796732)*x_ref[1]
+        arg[(3,)]=-0.663480815283*x[0]**o + (0.655100022595)*x[0] + (0.45166154347)*x[1]**o + (-0.323069969671)*x[1]
+        ref[(3,)]=-0.663480815283*x_ref[0]**o + (0.655100022595)*x_ref[0] + (0.45166154347)*x_ref[1]**o + (-0.323069969671)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.724801650649*x[2]**o + (0.420775089476)*x[2]
+            ref[(0,)]+=-0.724801650649*x_ref[2]**o + (0.420775089476)*x_ref[2]
+            arg[(1,)]+=0.832946666827*x[2]**o + (0.611805926031)*x[2]
+            ref[(1,)]+=0.832946666827*x_ref[2]**o + (0.611805926031)*x_ref[2]
+            arg[(2,)]+=0.27638785854*x[2]**o + (0.735966719696)*x[2]
+            ref[(2,)]+=0.27638785854*x_ref[2]**o + (0.735966719696)*x_ref[2]
+            arg[(3,)]+=0.171442640113*x[2]**o + (0.624946980531)*x[2]
+            ref[(3,)]+=0.171442640113*x_ref[2]**o + (0.624946980531)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Function_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=0.166351385071*x[0]**o + (0.657924415337)*x[0] + (-0.325750833269)*x[1]**o + (0.154503724813)*x[1]
+        ref[(0, 0)]=0.166351385071*x_ref[0]**o + (0.657924415337)*x_ref[0] + (-0.325750833269)*x_ref[1]**o + (0.154503724813)*x_ref[1]
+        arg[(0, 1)]=0.725385102141*x[0]**o + (-0.471363263327)*x[0] + (-0.179307032893)*x[1]**o + (0.157716594921)*x[1]
+        ref[(0, 1)]=0.725385102141*x_ref[0]**o + (-0.471363263327)*x_ref[0] + (-0.179307032893)*x_ref[1]**o + (0.157716594921)*x_ref[1]
+        arg[(0, 2)]=-0.563635795849*x[0]**o + (0.896108165581)*x[0] + (-0.21083155077)*x[1]**o + (-0.802842599169)*x[1]
+        ref[(0, 2)]=-0.563635795849*x_ref[0]**o + (0.896108165581)*x_ref[0] + (-0.21083155077)*x_ref[1]**o + (-0.802842599169)*x_ref[1]
+        arg[(1, 0)]=-0.821343959388*x[0]**o + (0.260664556261)*x[0] + (0.0254058389407)*x[1]**o + (-0.29333808271)*x[1]
+        ref[(1, 0)]=-0.821343959388*x_ref[0]**o + (0.260664556261)*x_ref[0] + (0.0254058389407)*x_ref[1]**o + (-0.29333808271)*x_ref[1]
+        arg[(1, 1)]=0.705880762077*x[0]**o + (-0.280729248416)*x[0] + (-0.962607516746)*x[1]**o + (0.395770388635)*x[1]
+        ref[(1, 1)]=0.705880762077*x_ref[0]**o + (-0.280729248416)*x_ref[0] + (-0.962607516746)*x_ref[1]**o + (0.395770388635)*x_ref[1]
+        arg[(1, 2)]=0.866270077032*x[0]**o + (-0.60864615446)*x[0] + (0.952573823457)*x[1]**o + (0.704544819859)*x[1]
+        ref[(1, 2)]=0.866270077032*x_ref[0]**o + (-0.60864615446)*x_ref[0] + (0.952573823457)*x_ref[1]**o + (0.704544819859)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.060652150171*x[2]**o + (-0.866383994818)*x[2]
+            ref[(0, 0)]+=-0.060652150171*x_ref[2]**o + (-0.866383994818)*x_ref[2]
+            arg[(0, 1)]+=-0.697986201398*x[2]**o + (0.56324835518)*x[2]
+            ref[(0, 1)]+=-0.697986201398*x_ref[2]**o + (0.56324835518)*x_ref[2]
+            arg[(0, 2)]+=0.879920568663*x[2]**o + (0.863094101803)*x[2]
+            ref[(0, 2)]+=0.879920568663*x_ref[2]**o + (0.863094101803)*x_ref[2]
+            arg[(1, 0)]+=0.557600928918*x[2]**o + (0.922223127323)*x[2]
+            ref[(1, 0)]+=0.557600928918*x_ref[2]**o + (0.922223127323)*x_ref[2]
+            arg[(1, 1)]+=0.334265261359*x[2]**o + (-0.455649372544)*x[2]
+            ref[(1, 1)]+=0.334265261359*x_ref[2]**o + (-0.455649372544)*x_ref[2]
+            arg[(1, 2)]+=-0.959463494262*x[2]**o + (-0.879280522226)*x[2]
+            ref[(1, 2)]+=-0.959463494262*x_ref[2]**o + (-0.879280522226)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Function_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4),w_ref)
+        arg[(0, 0, 0)]=-0.305506969549*x[0]**o + (0.0738211077422)*x[0] + (0.409774433212)*x[1]**o + (-0.00127245623261)*x[1]
+        ref[(0, 0, 0)]=-0.305506969549*x_ref[0]**o + (0.0738211077422)*x_ref[0] + (0.409774433212)*x_ref[1]**o + (-0.00127245623261)*x_ref[1]
+        arg[(0, 0, 1)]=-0.121867274559*x[0]**o + (0.64232812033)*x[0] + (-0.493575253702)*x[1]**o + (0.87620255681)*x[1]
+        ref[(0, 0, 1)]=-0.121867274559*x_ref[0]**o + (0.64232812033)*x_ref[0] + (-0.493575253702)*x_ref[1]**o + (0.87620255681)*x_ref[1]
+        arg[(0, 0, 2)]=0.414876671918*x[0]**o + (-0.106513876184)*x[0] + (0.756585048091)*x[1]**o + (-0.343837711423)*x[1]
+        ref[(0, 0, 2)]=0.414876671918*x_ref[0]**o + (-0.106513876184)*x_ref[0] + (0.756585048091)*x_ref[1]**o + (-0.343837711423)*x_ref[1]
+        arg[(0, 0, 3)]=0.974190636455*x[0]**o + (0.388309738116)*x[0] + (-0.185488169415)*x[1]**o + (0.437158094722)*x[1]
+        ref[(0, 0, 3)]=0.974190636455*x_ref[0]**o + (0.388309738116)*x_ref[0] + (-0.185488169415)*x_ref[1]**o + (0.437158094722)*x_ref[1]
+        arg[(0, 1, 0)]=-0.922709689953*x[0]**o + (0.516711121384)*x[0] + (0.467665924701)*x[1]**o + (-0.091593457718)*x[1]
+        ref[(0, 1, 0)]=-0.922709689953*x_ref[0]**o + (0.516711121384)*x_ref[0] + (0.467665924701)*x_ref[1]**o + (-0.091593457718)*x_ref[1]
+        arg[(0, 1, 1)]=-0.916797814967*x[0]**o + (-0.213838131184)*x[0] + (0.168070961705)*x[1]**o + (0.450190208276)*x[1]
+        ref[(0, 1, 1)]=-0.916797814967*x_ref[0]**o + (-0.213838131184)*x_ref[0] + (0.168070961705)*x_ref[1]**o + (0.450190208276)*x_ref[1]
+        arg[(0, 1, 2)]=-0.109696964111*x[0]**o + (0.114711647808)*x[0] + (-0.693144429744)*x[1]**o + (-0.302281904696)*x[1]
+        ref[(0, 1, 2)]=-0.109696964111*x_ref[0]**o + (0.114711647808)*x_ref[0] + (-0.693144429744)*x_ref[1]**o + (-0.302281904696)*x_ref[1]
+        arg[(0, 1, 3)]=-0.601657687711*x[0]**o + (0.792035427982)*x[0] + (-0.922910266776)*x[1]**o + (-0.690734138468)*x[1]
+        ref[(0, 1, 3)]=-0.601657687711*x_ref[0]**o + (0.792035427982)*x_ref[0] + (-0.922910266776)*x_ref[1]**o + (-0.690734138468)*x_ref[1]
+        arg[(0, 2, 0)]=0.749548592843*x[0]**o + (-0.783693960789)*x[0] + (-0.610942950298)*x[1]**o + (0.106368449882)*x[1]
+        ref[(0, 2, 0)]=0.749548592843*x_ref[0]**o + (-0.783693960789)*x_ref[0] + (-0.610942950298)*x_ref[1]**o + (0.106368449882)*x_ref[1]
+        arg[(0, 2, 1)]=-0.208632670097*x[0]**o + (-0.725315159996)*x[0] + (-0.588430414245)*x[1]**o + (0.406381780358)*x[1]
+        ref[(0, 2, 1)]=-0.208632670097*x_ref[0]**o + (-0.725315159996)*x_ref[0] + (-0.588430414245)*x_ref[1]**o + (0.406381780358)*x_ref[1]
+        arg[(0, 2, 2)]=0.895355364552*x[0]**o + (-0.952352943712)*x[0] + (0.898756964523)*x[1]**o + (0.144407806036)*x[1]
+        ref[(0, 2, 2)]=0.895355364552*x_ref[0]**o + (-0.952352943712)*x_ref[0] + (0.898756964523)*x_ref[1]**o + (0.144407806036)*x_ref[1]
+        arg[(0, 2, 3)]=-0.266029935493*x[0]**o + (0.433831758556)*x[0] + (0.891434533048)*x[1]**o + (0.500589444938)*x[1]
+        ref[(0, 2, 3)]=-0.266029935493*x_ref[0]**o + (0.433831758556)*x_ref[0] + (0.891434533048)*x_ref[1]**o + (0.500589444938)*x_ref[1]
+        arg[(0, 3, 0)]=-0.836743049851*x[0]**o + (-0.011625137272)*x[0] + (-0.508502599062)*x[1]**o + (-0.840646194458)*x[1]
+        ref[(0, 3, 0)]=-0.836743049851*x_ref[0]**o + (-0.011625137272)*x_ref[0] + (-0.508502599062)*x_ref[1]**o + (-0.840646194458)*x_ref[1]
+        arg[(0, 3, 1)]=-0.782586091747*x[0]**o + (-0.407085063698)*x[0] + (0.355607403783)*x[1]**o + (0.696703853811)*x[1]
+        ref[(0, 3, 1)]=-0.782586091747*x_ref[0]**o + (-0.407085063698)*x_ref[0] + (0.355607403783)*x_ref[1]**o + (0.696703853811)*x_ref[1]
+        arg[(0, 3, 2)]=0.486226889798*x[0]**o + (0.0406920350162)*x[0] + (0.259206307232)*x[1]**o + (-0.008532334849)*x[1]
+        ref[(0, 3, 2)]=0.486226889798*x_ref[0]**o + (0.0406920350162)*x_ref[0] + (0.259206307232)*x_ref[1]**o + (-0.008532334849)*x_ref[1]
+        arg[(0, 3, 3)]=-0.881252870061*x[0]**o + (0.0245209148008)*x[0] + (-0.516944732718)*x[1]**o + (0.720630537226)*x[1]
+        ref[(0, 3, 3)]=-0.881252870061*x_ref[0]**o + (0.0245209148008)*x_ref[0] + (-0.516944732718)*x_ref[1]**o + (0.720630537226)*x_ref[1]
+        arg[(1, 0, 0)]=-0.895394760781*x[0]**o + (0.437261730076)*x[0] + (-0.347588152901)*x[1]**o + (-0.585834373874)*x[1]
+        ref[(1, 0, 0)]=-0.895394760781*x_ref[0]**o + (0.437261730076)*x_ref[0] + (-0.347588152901)*x_ref[1]**o + (-0.585834373874)*x_ref[1]
+        arg[(1, 0, 1)]=-0.955042968928*x[0]**o + (-0.383798135964)*x[0] + (-0.418211194132)*x[1]**o + (0.285263343945)*x[1]
+        ref[(1, 0, 1)]=-0.955042968928*x_ref[0]**o + (-0.383798135964)*x_ref[0] + (-0.418211194132)*x_ref[1]**o + (0.285263343945)*x_ref[1]
+        arg[(1, 0, 2)]=0.72675733059*x[0]**o + (0.347279942183)*x[0] + (-0.800622136608)*x[1]**o + (-0.451379625369)*x[1]
+        ref[(1, 0, 2)]=0.72675733059*x_ref[0]**o + (0.347279942183)*x_ref[0] + (-0.800622136608)*x_ref[1]**o + (-0.451379625369)*x_ref[1]
+        arg[(1, 0, 3)]=-0.580305712117*x[0]**o + (-0.60205138141)*x[0] + (-0.737452127758)*x[1]**o + (0.798161547057)*x[1]
+        ref[(1, 0, 3)]=-0.580305712117*x_ref[0]**o + (-0.60205138141)*x_ref[0] + (-0.737452127758)*x_ref[1]**o + (0.798161547057)*x_ref[1]
+        arg[(1, 1, 0)]=0.687274179336*x[0]**o + (-0.00396877197297)*x[0] + (0.257944139101)*x[1]**o + (-0.376602584033)*x[1]
+        ref[(1, 1, 0)]=0.687274179336*x_ref[0]**o + (-0.00396877197297)*x_ref[0] + (0.257944139101)*x_ref[1]**o + (-0.376602584033)*x_ref[1]
+        arg[(1, 1, 1)]=-0.344504230346*x[0]**o + (-0.17687172824)*x[0] + (-0.519653601102)*x[1]**o + (0.433292307266)*x[1]
+        ref[(1, 1, 1)]=-0.344504230346*x_ref[0]**o + (-0.17687172824)*x_ref[0] + (-0.519653601102)*x_ref[1]**o + (0.433292307266)*x_ref[1]
+        arg[(1, 1, 2)]=-0.175444583943*x[0]**o + (-0.442638023563)*x[0] + (0.578729985102)*x[1]**o + (0.00881049533376)*x[1]
+        ref[(1, 1, 2)]=-0.175444583943*x_ref[0]**o + (-0.442638023563)*x_ref[0] + (0.578729985102)*x_ref[1]**o + (0.00881049533376)*x_ref[1]
+        arg[(1, 1, 3)]=0.601508568092*x[0]**o + (-0.427529255882)*x[0] + (-0.130252665006)*x[1]**o + (0.952215451781)*x[1]
+        ref[(1, 1, 3)]=0.601508568092*x_ref[0]**o + (-0.427529255882)*x_ref[0] + (-0.130252665006)*x_ref[1]**o + (0.952215451781)*x_ref[1]
+        arg[(1, 2, 0)]=0.0406550798861*x[0]**o + (0.372620255749)*x[0] + (-0.188638567506)*x[1]**o + (0.670073457192)*x[1]
+        ref[(1, 2, 0)]=0.0406550798861*x_ref[0]**o + (0.372620255749)*x_ref[0] + (-0.188638567506)*x_ref[1]**o + (0.670073457192)*x_ref[1]
+        arg[(1, 2, 1)]=0.0467627844093*x[0]**o + (-0.875720630272)*x[0] + (0.202321230696)*x[1]**o + (-0.941573560978)*x[1]
+        ref[(1, 2, 1)]=0.0467627844093*x_ref[0]**o + (-0.875720630272)*x_ref[0] + (0.202321230696)*x_ref[1]**o + (-0.941573560978)*x_ref[1]
+        arg[(1, 2, 2)]=-0.104328369782*x[0]**o + (-0.0341181285829)*x[0] + (-0.767560579871)*x[1]**o + (0.764939303048)*x[1]
+        ref[(1, 2, 2)]=-0.104328369782*x_ref[0]**o + (-0.0341181285829)*x_ref[0] + (-0.767560579871)*x_ref[1]**o + (0.764939303048)*x_ref[1]
+        arg[(1, 2, 3)]=0.400462792386*x[0]**o + (-0.768514176281)*x[0] + (-0.104346959646)*x[1]**o + (0.908169099613)*x[1]
+        ref[(1, 2, 3)]=0.400462792386*x_ref[0]**o + (-0.768514176281)*x_ref[0] + (-0.104346959646)*x_ref[1]**o + (0.908169099613)*x_ref[1]
+        arg[(1, 3, 0)]=0.866667815703*x[0]**o + (0.407474320849)*x[0] + (-0.678772350564)*x[1]**o + (-0.108780438488)*x[1]
+        ref[(1, 3, 0)]=0.866667815703*x_ref[0]**o + (0.407474320849)*x_ref[0] + (-0.678772350564)*x_ref[1]**o + (-0.108780438488)*x_ref[1]
+        arg[(1, 3, 1)]=-0.291073581603*x[0]**o + (0.806542216302)*x[0] + (-0.536268346186)*x[1]**o + (0.934838195065)*x[1]
+        ref[(1, 3, 1)]=-0.291073581603*x_ref[0]**o + (0.806542216302)*x_ref[0] + (-0.536268346186)*x_ref[1]**o + (0.934838195065)*x_ref[1]
+        arg[(1, 3, 2)]=-0.730930002173*x[0]**o + (-0.23781929661)*x[0] + (-0.455934053726)*x[1]**o + (0.610292577275)*x[1]
+        ref[(1, 3, 2)]=-0.730930002173*x_ref[0]**o + (-0.23781929661)*x_ref[0] + (-0.455934053726)*x_ref[1]**o + (0.610292577275)*x_ref[1]
+        arg[(1, 3, 3)]=-0.246918672584*x[0]**o + (0.221282952905)*x[0] + (0.665868294508)*x[1]**o + (-0.126285790038)*x[1]
+        ref[(1, 3, 3)]=-0.246918672584*x_ref[0]**o + (0.221282952905)*x_ref[0] + (0.665868294508)*x_ref[1]**o + (-0.126285790038)*x_ref[1]
+        arg[(2, 0, 0)]=-0.963253522486*x[0]**o + (0.87291297868)*x[0] + (-0.885262507702)*x[1]**o + (0.89972436809)*x[1]
+        ref[(2, 0, 0)]=-0.963253522486*x_ref[0]**o + (0.87291297868)*x_ref[0] + (-0.885262507702)*x_ref[1]**o + (0.89972436809)*x_ref[1]
+        arg[(2, 0, 1)]=0.75437360825*x[0]**o + (0.786209477325)*x[0] + (0.338120926234)*x[1]**o + (0.715616131961)*x[1]
+        ref[(2, 0, 1)]=0.75437360825*x_ref[0]**o + (0.786209477325)*x_ref[0] + (0.338120926234)*x_ref[1]**o + (0.715616131961)*x_ref[1]
+        arg[(2, 0, 2)]=0.777935295039*x[0]**o + (-0.844896128643)*x[0] + (0.88924925663)*x[1]**o + (-0.0848313063253)*x[1]
+        ref[(2, 0, 2)]=0.777935295039*x_ref[0]**o + (-0.844896128643)*x_ref[0] + (0.88924925663)*x_ref[1]**o + (-0.0848313063253)*x_ref[1]
+        arg[(2, 0, 3)]=-0.866108391028*x[0]**o + (-0.82292873728)*x[0] + (-0.473634543189)*x[1]**o + (-0.926657073708)*x[1]
+        ref[(2, 0, 3)]=-0.866108391028*x_ref[0]**o + (-0.82292873728)*x_ref[0] + (-0.473634543189)*x_ref[1]**o + (-0.926657073708)*x_ref[1]
+        arg[(2, 1, 0)]=0.537412692741*x[0]**o + (0.482437390603)*x[0] + (0.105577925755)*x[1]**o + (-0.523741283324)*x[1]
+        ref[(2, 1, 0)]=0.537412692741*x_ref[0]**o + (0.482437390603)*x_ref[0] + (0.105577925755)*x_ref[1]**o + (-0.523741283324)*x_ref[1]
+        arg[(2, 1, 1)]=-0.900737057222*x[0]**o + (-9.88367899246e-05)*x[0] + (-0.665529573033)*x[1]**o + (0.00657522443459)*x[1]
+        ref[(2, 1, 1)]=-0.900737057222*x_ref[0]**o + (-9.88367899246e-05)*x_ref[0] + (-0.665529573033)*x_ref[1]**o + (0.00657522443459)*x_ref[1]
+        arg[(2, 1, 2)]=0.904740144799*x[0]**o + (0.918712288682)*x[0] + (-0.996350970287)*x[1]**o + (0.901331939406)*x[1]
+        ref[(2, 1, 2)]=0.904740144799*x_ref[0]**o + (0.918712288682)*x_ref[0] + (-0.996350970287)*x_ref[1]**o + (0.901331939406)*x_ref[1]
+        arg[(2, 1, 3)]=-0.416204609368*x[0]**o + (0.0566822069452)*x[0] + (0.638101619296)*x[1]**o + (-0.952853767168)*x[1]
+        ref[(2, 1, 3)]=-0.416204609368*x_ref[0]**o + (0.0566822069452)*x_ref[0] + (0.638101619296)*x_ref[1]**o + (-0.952853767168)*x_ref[1]
+        arg[(2, 2, 0)]=-0.126025454447*x[0]**o + (0.795244482747)*x[0] + (-0.151016502098)*x[1]**o + (-0.0550880451502)*x[1]
+        ref[(2, 2, 0)]=-0.126025454447*x_ref[0]**o + (0.795244482747)*x_ref[0] + (-0.151016502098)*x_ref[1]**o + (-0.0550880451502)*x_ref[1]
+        arg[(2, 2, 1)]=0.707125351732*x[0]**o + (0.710931888399)*x[0] + (0.284901084326)*x[1]**o + (0.127414128131)*x[1]
+        ref[(2, 2, 1)]=0.707125351732*x_ref[0]**o + (0.710931888399)*x_ref[0] + (0.284901084326)*x_ref[1]**o + (0.127414128131)*x_ref[1]
+        arg[(2, 2, 2)]=0.696264594122*x[0]**o + (-0.27771694999)*x[0] + (0.682413411694)*x[1]**o + (-0.172561192413)*x[1]
+        ref[(2, 2, 2)]=0.696264594122*x_ref[0]**o + (-0.27771694999)*x_ref[0] + (0.682413411694)*x_ref[1]**o + (-0.172561192413)*x_ref[1]
+        arg[(2, 2, 3)]=0.877221794416*x[0]**o + (-0.965081646795)*x[0] + (-0.25979887571)*x[1]**o + (-0.839517145744)*x[1]
+        ref[(2, 2, 3)]=0.877221794416*x_ref[0]**o + (-0.965081646795)*x_ref[0] + (-0.25979887571)*x_ref[1]**o + (-0.839517145744)*x_ref[1]
+        arg[(2, 3, 0)]=0.44032304845*x[0]**o + (0.785275913262)*x[0] + (0.109355764637)*x[1]**o + (0.329395261865)*x[1]
+        ref[(2, 3, 0)]=0.44032304845*x_ref[0]**o + (0.785275913262)*x_ref[0] + (0.109355764637)*x_ref[1]**o + (0.329395261865)*x_ref[1]
+        arg[(2, 3, 1)]=-0.722688468222*x[0]**o + (0.177157037019)*x[0] + (-0.626381850791)*x[1]**o + (-0.64427280755)*x[1]
+        ref[(2, 3, 1)]=-0.722688468222*x_ref[0]**o + (0.177157037019)*x_ref[0] + (-0.626381850791)*x_ref[1]**o + (-0.64427280755)*x_ref[1]
+        arg[(2, 3, 2)]=0.88630028792*x[0]**o + (0.334983430384)*x[0] + (-0.251077644743)*x[1]**o + (-0.275586193788)*x[1]
+        ref[(2, 3, 2)]=0.88630028792*x_ref[0]**o + (0.334983430384)*x_ref[0] + (-0.251077644743)*x_ref[1]**o + (-0.275586193788)*x_ref[1]
+        arg[(2, 3, 3)]=-0.384597476325*x[0]**o + (0.817311979221)*x[0] + (-0.412062393367)*x[1]**o + (-0.0344021161503)*x[1]
+        ref[(2, 3, 3)]=-0.384597476325*x_ref[0]**o + (0.817311979221)*x_ref[0] + (-0.412062393367)*x_ref[1]**o + (-0.0344021161503)*x_ref[1]
+        arg[(3, 0, 0)]=0.674947583157*x[0]**o + (0.714574257806)*x[0] + (0.798851988794)*x[1]**o + (-0.179328316028)*x[1]
+        ref[(3, 0, 0)]=0.674947583157*x_ref[0]**o + (0.714574257806)*x_ref[0] + (0.798851988794)*x_ref[1]**o + (-0.179328316028)*x_ref[1]
+        arg[(3, 0, 1)]=-0.823716773154*x[0]**o + (-0.497156957339)*x[0] + (0.928405056499)*x[1]**o + (0.906271043785)*x[1]
+        ref[(3, 0, 1)]=-0.823716773154*x_ref[0]**o + (-0.497156957339)*x_ref[0] + (0.928405056499)*x_ref[1]**o + (0.906271043785)*x_ref[1]
+        arg[(3, 0, 2)]=0.637473064131*x[0]**o + (-0.117462186932)*x[0] + (0.43560000683)*x[1]**o + (-0.716326705122)*x[1]
+        ref[(3, 0, 2)]=0.637473064131*x_ref[0]**o + (-0.117462186932)*x_ref[0] + (0.43560000683)*x_ref[1]**o + (-0.716326705122)*x_ref[1]
+        arg[(3, 0, 3)]=-0.398507357561*x[0]**o + (0.364074653136)*x[0] + (0.294900671473)*x[1]**o + (0.961751774287)*x[1]
+        ref[(3, 0, 3)]=-0.398507357561*x_ref[0]**o + (0.364074653136)*x_ref[0] + (0.294900671473)*x_ref[1]**o + (0.961751774287)*x_ref[1]
+        arg[(3, 1, 0)]=-0.0747234273996*x[0]**o + (0.264287584271)*x[0] + (-0.487471840613)*x[1]**o + (-0.197823336026)*x[1]
+        ref[(3, 1, 0)]=-0.0747234273996*x_ref[0]**o + (0.264287584271)*x_ref[0] + (-0.487471840613)*x_ref[1]**o + (-0.197823336026)*x_ref[1]
+        arg[(3, 1, 1)]=-0.948420760387*x[0]**o + (0.72900155626)*x[0] + (0.140824174478)*x[1]**o + (-0.727087736441)*x[1]
+        ref[(3, 1, 1)]=-0.948420760387*x_ref[0]**o + (0.72900155626)*x_ref[0] + (0.140824174478)*x_ref[1]**o + (-0.727087736441)*x_ref[1]
+        arg[(3, 1, 2)]=0.890643620541*x[0]**o + (0.738876321379)*x[0] + (0.295319464383)*x[1]**o + (-0.694215533351)*x[1]
+        ref[(3, 1, 2)]=0.890643620541*x_ref[0]**o + (0.738876321379)*x_ref[0] + (0.295319464383)*x_ref[1]**o + (-0.694215533351)*x_ref[1]
+        arg[(3, 1, 3)]=-0.899252359588*x[0]**o + (-0.365885620678)*x[0] + (0.0495130112356)*x[1]**o + (-0.305248503991)*x[1]
+        ref[(3, 1, 3)]=-0.899252359588*x_ref[0]**o + (-0.365885620678)*x_ref[0] + (0.0495130112356)*x_ref[1]**o + (-0.305248503991)*x_ref[1]
+        arg[(3, 2, 0)]=0.00684840342758*x[0]**o + (0.602841517397)*x[0] + (-0.457928541063)*x[1]**o + (-0.101775427121)*x[1]
+        ref[(3, 2, 0)]=0.00684840342758*x_ref[0]**o + (0.602841517397)*x_ref[0] + (-0.457928541063)*x_ref[1]**o + (-0.101775427121)*x_ref[1]
+        arg[(3, 2, 1)]=-0.327076543247*x[0]**o + (0.303256604593)*x[0] + (-0.778949130783)*x[1]**o + (-0.544250559522)*x[1]
+        ref[(3, 2, 1)]=-0.327076543247*x_ref[0]**o + (0.303256604593)*x_ref[0] + (-0.778949130783)*x_ref[1]**o + (-0.544250559522)*x_ref[1]
+        arg[(3, 2, 2)]=0.339141212328*x[0]**o + (-0.477212911026)*x[0] + (0.744233747801)*x[1]**o + (0.217033433843)*x[1]
+        ref[(3, 2, 2)]=0.339141212328*x_ref[0]**o + (-0.477212911026)*x_ref[0] + (0.744233747801)*x_ref[1]**o + (0.217033433843)*x_ref[1]
+        arg[(3, 2, 3)]=0.572847936889*x[0]**o + (0.375528379005)*x[0] + (-0.299758180523)*x[1]**o + (0.000170794753498)*x[1]
+        ref[(3, 2, 3)]=0.572847936889*x_ref[0]**o + (0.375528379005)*x_ref[0] + (-0.299758180523)*x_ref[1]**o + (0.000170794753498)*x_ref[1]
+        arg[(3, 3, 0)]=0.314508563801*x[0]**o + (-0.0271773823585)*x[0] + (-0.0721013729917)*x[1]**o + (-0.83479833014)*x[1]
+        ref[(3, 3, 0)]=0.314508563801*x_ref[0]**o + (-0.0271773823585)*x_ref[0] + (-0.0721013729917)*x_ref[1]**o + (-0.83479833014)*x_ref[1]
+        arg[(3, 3, 1)]=-0.972649519724*x[0]**o + (0.117282696431)*x[0] + (0.0907211996868)*x[1]**o + (0.594905666986)*x[1]
+        ref[(3, 3, 1)]=-0.972649519724*x_ref[0]**o + (0.117282696431)*x_ref[0] + (0.0907211996868)*x_ref[1]**o + (0.594905666986)*x_ref[1]
+        arg[(3, 3, 2)]=-0.0857857841747*x[0]**o + (0.930085653613)*x[0] + (-0.273705871711)*x[1]**o + (0.292025889661)*x[1]
+        ref[(3, 3, 2)]=-0.0857857841747*x_ref[0]**o + (0.930085653613)*x_ref[0] + (-0.273705871711)*x_ref[1]**o + (0.292025889661)*x_ref[1]
+        arg[(3, 3, 3)]=0.0139145082934*x[0]**o + (0.113722522364)*x[0] + (0.391871920287)*x[1]**o + (0.710513426973)*x[1]
+        ref[(3, 3, 3)]=0.0139145082934*x_ref[0]**o + (0.113722522364)*x_ref[0] + (0.391871920287)*x_ref[1]**o + (0.710513426973)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.738582091893*x[2]**o + (-0.436721520201)*x[2]
+            ref[(0, 0, 0)]+=-0.738582091893*x_ref[2]**o + (-0.436721520201)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.272692039388*x[2]**o + (0.806686492712)*x[2]
+            ref[(0, 0, 1)]+=-0.272692039388*x_ref[2]**o + (0.806686492712)*x_ref[2]
+            arg[(0, 0, 2)]+=0.52353555723*x[2]**o + (0.909410831257)*x[2]
+            ref[(0, 0, 2)]+=0.52353555723*x_ref[2]**o + (0.909410831257)*x_ref[2]
+            arg[(0, 0, 3)]+=0.308951975936*x[2]**o + (0.835377207993)*x[2]
+            ref[(0, 0, 3)]+=0.308951975936*x_ref[2]**o + (0.835377207993)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.566339166119*x[2]**o + (0.194132701488)*x[2]
+            ref[(0, 1, 0)]+=-0.566339166119*x_ref[2]**o + (0.194132701488)*x_ref[2]
+            arg[(0, 1, 1)]+=0.528568032954*x[2]**o + (-0.607769320583)*x[2]
+            ref[(0, 1, 1)]+=0.528568032954*x_ref[2]**o + (-0.607769320583)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.490062385983*x[2]**o + (-0.725007951076)*x[2]
+            ref[(0, 1, 2)]+=-0.490062385983*x_ref[2]**o + (-0.725007951076)*x_ref[2]
+            arg[(0, 1, 3)]+=-0.782585390326*x[2]**o + (0.133951075548)*x[2]
+            ref[(0, 1, 3)]+=-0.782585390326*x_ref[2]**o + (0.133951075548)*x_ref[2]
+            arg[(0, 2, 0)]+=0.968481010543*x[2]**o + (-0.855270042731)*x[2]
+            ref[(0, 2, 0)]+=0.968481010543*x_ref[2]**o + (-0.855270042731)*x_ref[2]
+            arg[(0, 2, 1)]+=0.464239183367*x[2]**o + (0.636434910094)*x[2]
+            ref[(0, 2, 1)]+=0.464239183367*x_ref[2]**o + (0.636434910094)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.426798434927*x[2]**o + (0.3239698261)*x[2]
+            ref[(0, 2, 2)]+=-0.426798434927*x_ref[2]**o + (0.3239698261)*x_ref[2]
+            arg[(0, 2, 3)]+=-0.0596078554457*x[2]**o + (0.0515350425626)*x[2]
+            ref[(0, 2, 3)]+=-0.0596078554457*x_ref[2]**o + (0.0515350425626)*x_ref[2]
+            arg[(0, 3, 0)]+=0.754234444402*x[2]**o + (-0.882597859467)*x[2]
+            ref[(0, 3, 0)]+=0.754234444402*x_ref[2]**o + (-0.882597859467)*x_ref[2]
+            arg[(0, 3, 1)]+=0.171382464396*x[2]**o + (-0.000382575344825)*x[2]
+            ref[(0, 3, 1)]+=0.171382464396*x_ref[2]**o + (-0.000382575344825)*x_ref[2]
+            arg[(0, 3, 2)]+=0.16029675494*x[2]**o + (-0.839176528938)*x[2]
+            ref[(0, 3, 2)]+=0.16029675494*x_ref[2]**o + (-0.839176528938)*x_ref[2]
+            arg[(0, 3, 3)]+=-0.686880345395*x[2]**o + (0.80249779051)*x[2]
+            ref[(0, 3, 3)]+=-0.686880345395*x_ref[2]**o + (0.80249779051)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.686056014129*x[2]**o + (-0.48879087761)*x[2]
+            ref[(1, 0, 0)]+=-0.686056014129*x_ref[2]**o + (-0.48879087761)*x_ref[2]
+            arg[(1, 0, 1)]+=0.540706859976*x[2]**o + (-0.906910890902)*x[2]
+            ref[(1, 0, 1)]+=0.540706859976*x_ref[2]**o + (-0.906910890902)*x_ref[2]
+            arg[(1, 0, 2)]+=0.779686198965*x[2]**o + (-0.354381053833)*x[2]
+            ref[(1, 0, 2)]+=0.779686198965*x_ref[2]**o + (-0.354381053833)*x_ref[2]
+            arg[(1, 0, 3)]+=0.636639106038*x[2]**o + (0.227579505375)*x[2]
+            ref[(1, 0, 3)]+=0.636639106038*x_ref[2]**o + (0.227579505375)*x_ref[2]
+            arg[(1, 1, 0)]+=0.635568878807*x[2]**o + (0.167476025577)*x[2]
+            ref[(1, 1, 0)]+=0.635568878807*x_ref[2]**o + (0.167476025577)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.195582717915*x[2]**o + (-0.962893501384)*x[2]
+            ref[(1, 1, 1)]+=-0.195582717915*x_ref[2]**o + (-0.962893501384)*x_ref[2]
+            arg[(1, 1, 2)]+=0.353272640031*x[2]**o + (-0.494750663597)*x[2]
+            ref[(1, 1, 2)]+=0.353272640031*x_ref[2]**o + (-0.494750663597)*x_ref[2]
+            arg[(1, 1, 3)]+=-0.55845555269*x[2]**o + (-0.302456526496)*x[2]
+            ref[(1, 1, 3)]+=-0.55845555269*x_ref[2]**o + (-0.302456526496)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.336561222686*x[2]**o + (-0.11244571886)*x[2]
+            ref[(1, 2, 0)]+=-0.336561222686*x_ref[2]**o + (-0.11244571886)*x_ref[2]
+            arg[(1, 2, 1)]+=-0.516477268434*x[2]**o + (0.877465697992)*x[2]
+            ref[(1, 2, 1)]+=-0.516477268434*x_ref[2]**o + (0.877465697992)*x_ref[2]
+            arg[(1, 2, 2)]+=-0.122084265605*x[2]**o + (-0.510679127681)*x[2]
+            ref[(1, 2, 2)]+=-0.122084265605*x_ref[2]**o + (-0.510679127681)*x_ref[2]
+            arg[(1, 2, 3)]+=0.540127800246*x[2]**o + (-0.76959417786)*x[2]
+            ref[(1, 2, 3)]+=0.540127800246*x_ref[2]**o + (-0.76959417786)*x_ref[2]
+            arg[(1, 3, 0)]+=0.420953455789*x[2]**o + (0.0640069573965)*x[2]
+            ref[(1, 3, 0)]+=0.420953455789*x_ref[2]**o + (0.0640069573965)*x_ref[2]
+            arg[(1, 3, 1)]+=0.93980088372*x[2]**o + (-0.621447299196)*x[2]
+            ref[(1, 3, 1)]+=0.93980088372*x_ref[2]**o + (-0.621447299196)*x_ref[2]
+            arg[(1, 3, 2)]+=-0.654084617448*x[2]**o + (-0.304871166968)*x[2]
+            ref[(1, 3, 2)]+=-0.654084617448*x_ref[2]**o + (-0.304871166968)*x_ref[2]
+            arg[(1, 3, 3)]+=-0.424105171148*x[2]**o + (0.938739353061)*x[2]
+            ref[(1, 3, 3)]+=-0.424105171148*x_ref[2]**o + (0.938739353061)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.121860721103*x[2]**o + (0.251077157925)*x[2]
+            ref[(2, 0, 0)]+=-0.121860721103*x_ref[2]**o + (0.251077157925)*x_ref[2]
+            arg[(2, 0, 1)]+=0.839451144674*x[2]**o + (0.182605003226)*x[2]
+            ref[(2, 0, 1)]+=0.839451144674*x_ref[2]**o + (0.182605003226)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.512934915029*x[2]**o + (0.421504128075)*x[2]
+            ref[(2, 0, 2)]+=-0.512934915029*x_ref[2]**o + (0.421504128075)*x_ref[2]
+            arg[(2, 0, 3)]+=-0.27456502306*x[2]**o + (-0.014954700803)*x[2]
+            ref[(2, 0, 3)]+=-0.27456502306*x_ref[2]**o + (-0.014954700803)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.605998590316*x[2]**o + (-0.800048519579)*x[2]
+            ref[(2, 1, 0)]+=-0.605998590316*x_ref[2]**o + (-0.800048519579)*x_ref[2]
+            arg[(2, 1, 1)]+=-0.125400836332*x[2]**o + (0.894161851062)*x[2]
+            ref[(2, 1, 1)]+=-0.125400836332*x_ref[2]**o + (0.894161851062)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.0829269381949*x[2]**o + (-0.614845464126)*x[2]
+            ref[(2, 1, 2)]+=-0.0829269381949*x_ref[2]**o + (-0.614845464126)*x_ref[2]
+            arg[(2, 1, 3)]+=-0.30122640023*x[2]**o + (-0.650676255668)*x[2]
+            ref[(2, 1, 3)]+=-0.30122640023*x_ref[2]**o + (-0.650676255668)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.532630308447*x[2]**o + (0.879498174486)*x[2]
+            ref[(2, 2, 0)]+=-0.532630308447*x_ref[2]**o + (0.879498174486)*x_ref[2]
+            arg[(2, 2, 1)]+=0.191902255801*x[2]**o + (0.843738630977)*x[2]
+            ref[(2, 2, 1)]+=0.191902255801*x_ref[2]**o + (0.843738630977)*x_ref[2]
+            arg[(2, 2, 2)]+=-0.758614380371*x[2]**o + (-0.582202144305)*x[2]
+            ref[(2, 2, 2)]+=-0.758614380371*x_ref[2]**o + (-0.582202144305)*x_ref[2]
+            arg[(2, 2, 3)]+=-0.0476066908085*x[2]**o + (-0.843036823874)*x[2]
+            ref[(2, 2, 3)]+=-0.0476066908085*x_ref[2]**o + (-0.843036823874)*x_ref[2]
+            arg[(2, 3, 0)]+=0.998822061106*x[2]**o + (-0.794722263514)*x[2]
+            ref[(2, 3, 0)]+=0.998822061106*x_ref[2]**o + (-0.794722263514)*x_ref[2]
+            arg[(2, 3, 1)]+=-0.234134317905*x[2]**o + (-0.719697480991)*x[2]
+            ref[(2, 3, 1)]+=-0.234134317905*x_ref[2]**o + (-0.719697480991)*x_ref[2]
+            arg[(2, 3, 2)]+=0.123224039767*x[2]**o + (0.75725440087)*x[2]
+            ref[(2, 3, 2)]+=0.123224039767*x_ref[2]**o + (0.75725440087)*x_ref[2]
+            arg[(2, 3, 3)]+=-0.246203504599*x[2]**o + (0.704268569031)*x[2]
+            ref[(2, 3, 3)]+=-0.246203504599*x_ref[2]**o + (0.704268569031)*x_ref[2]
+            arg[(3, 0, 0)]+=0.884084316619*x[2]**o + (-0.515986350988)*x[2]
+            ref[(3, 0, 0)]+=0.884084316619*x_ref[2]**o + (-0.515986350988)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.0381509987075*x[2]**o + (0.258266214854)*x[2]
+            ref[(3, 0, 1)]+=-0.0381509987075*x_ref[2]**o + (0.258266214854)*x_ref[2]
+            arg[(3, 0, 2)]+=0.120880238369*x[2]**o + (0.00725059612562)*x[2]
+            ref[(3, 0, 2)]+=0.120880238369*x_ref[2]**o + (0.00725059612562)*x_ref[2]
+            arg[(3, 0, 3)]+=-0.434270883024*x[2]**o + (0.339885389893)*x[2]
+            ref[(3, 0, 3)]+=-0.434270883024*x_ref[2]**o + (0.339885389893)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.928901665913*x[2]**o + (-0.372860803341)*x[2]
+            ref[(3, 1, 0)]+=-0.928901665913*x_ref[2]**o + (-0.372860803341)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.549080765621*x[2]**o + (0.298395966613)*x[2]
+            ref[(3, 1, 1)]+=-0.549080765621*x_ref[2]**o + (0.298395966613)*x_ref[2]
+            arg[(3, 1, 2)]+=0.800733862569*x[2]**o + (0.597612423191)*x[2]
+            ref[(3, 1, 2)]+=0.800733862569*x_ref[2]**o + (0.597612423191)*x_ref[2]
+            arg[(3, 1, 3)]+=0.713160949402*x[2]**o + (-0.542430780576)*x[2]
+            ref[(3, 1, 3)]+=0.713160949402*x_ref[2]**o + (-0.542430780576)*x_ref[2]
+            arg[(3, 2, 0)]+=0.263919534661*x[2]**o + (-0.000573605180066)*x[2]
+            ref[(3, 2, 0)]+=0.263919534661*x_ref[2]**o + (-0.000573605180066)*x_ref[2]
+            arg[(3, 2, 1)]+=0.552326179891*x[2]**o + (-0.514039516741)*x[2]
+            ref[(3, 2, 1)]+=0.552326179891*x_ref[2]**o + (-0.514039516741)*x_ref[2]
+            arg[(3, 2, 2)]+=0.127518288753*x[2]**o + (0.483852205875)*x[2]
+            ref[(3, 2, 2)]+=0.127518288753*x_ref[2]**o + (0.483852205875)*x_ref[2]
+            arg[(3, 2, 3)]+=-0.976827291158*x[2]**o + (0.630745625315)*x[2]
+            ref[(3, 2, 3)]+=-0.976827291158*x_ref[2]**o + (0.630745625315)*x_ref[2]
+            arg[(3, 3, 0)]+=-0.363481014679*x[2]**o + (-0.805605186936)*x[2]
+            ref[(3, 3, 0)]+=-0.363481014679*x_ref[2]**o + (-0.805605186936)*x_ref[2]
+            arg[(3, 3, 1)]+=-0.219946349748*x[2]**o + (-0.609050779503)*x[2]
+            ref[(3, 3, 1)]+=-0.219946349748*x_ref[2]**o + (-0.609050779503)*x_ref[2]
+            arg[(3, 3, 2)]+=0.081236206454*x[2]**o + (-0.407678445926)*x[2]
+            ref[(3, 3, 2)]+=0.081236206454*x_ref[2]**o + (-0.407678445926)*x_ref[2]
+            arg[(3, 3, 3)]+=-0.409513628823*x[2]**o + (-0.510977260491)*x[2]
+            ref[(3, 3, 3)]+=-0.409513628823*x_ref[2]**o + (-0.510977260491)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunction_fromData_Function_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Function
+
+        assumptions: Function(self.domain) exists
+                     self.domain supports interpolation from Function to Function
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Function(self.domain)
+        x_ref = w_ref.getX()
+        w = Function(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4, 2),w)
+        ref = Data(0,(4, 2, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=-0.749829854297*x[0]**o + (-0.851944442396)*x[0] + (0.583555290694)*x[1]**o + (-0.904187202919)*x[1]
+        ref[(0, 0, 0, 0)]=-0.749829854297*x_ref[0]**o + (-0.851944442396)*x_ref[0] + (0.583555290694)*x_ref[1]**o + (-0.904187202919)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.116533812537*x[0]**o + (0.474211071838)*x[0] + (-0.331483335016)*x[1]**o + (0.412668019325)*x[1]
+        ref[(0, 0, 0, 1)]=-0.116533812537*x_ref[0]**o + (0.474211071838)*x_ref[0] + (-0.331483335016)*x_ref[1]**o + (0.412668019325)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.222523576958*x[0]**o + (0.0385417137269)*x[0] + (0.485180574998)*x[1]**o + (-0.00919416073321)*x[1]
+        ref[(0, 0, 1, 0)]=0.222523576958*x_ref[0]**o + (0.0385417137269)*x_ref[0] + (0.485180574998)*x_ref[1]**o + (-0.00919416073321)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.784943204636*x[0]**o + (-0.199467954846)*x[0] + (-0.946950432744)*x[1]**o + (-0.184753863031)*x[1]
+        ref[(0, 0, 1, 1)]=0.784943204636*x_ref[0]**o + (-0.199467954846)*x_ref[0] + (-0.946950432744)*x_ref[1]**o + (-0.184753863031)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.418414788961*x[0]**o + (-0.695905602901)*x[0] + (0.779274657839)*x[1]**o + (0.0955045029038)*x[1]
+        ref[(0, 0, 2, 0)]=-0.418414788961*x_ref[0]**o + (-0.695905602901)*x_ref[0] + (0.779274657839)*x_ref[1]**o + (0.0955045029038)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.155742983259*x[0]**o + (-0.70142712971)*x[0] + (0.983928361458)*x[1]**o + (0.16242679304)*x[1]
+        ref[(0, 0, 2, 1)]=-0.155742983259*x_ref[0]**o + (-0.70142712971)*x_ref[0] + (0.983928361458)*x_ref[1]**o + (0.16242679304)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.435557759327*x[0]**o + (0.505952922156)*x[0] + (0.124279382028)*x[1]**o + (-0.197477750877)*x[1]
+        ref[(0, 0, 3, 0)]=0.435557759327*x_ref[0]**o + (0.505952922156)*x_ref[0] + (0.124279382028)*x_ref[1]**o + (-0.197477750877)*x_ref[1]
+        arg[(0, 0, 3, 1)]=-0.953038857017*x[0]**o + (-0.64210849273)*x[0] + (-0.751719391518)*x[1]**o + (-0.235168407152)*x[1]
+        ref[(0, 0, 3, 1)]=-0.953038857017*x_ref[0]**o + (-0.64210849273)*x_ref[0] + (-0.751719391518)*x_ref[1]**o + (-0.235168407152)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.728709548287*x[0]**o + (-0.196177546008)*x[0] + (-0.782658884055)*x[1]**o + (0.374615381032)*x[1]
+        ref[(0, 1, 0, 0)]=0.728709548287*x_ref[0]**o + (-0.196177546008)*x_ref[0] + (-0.782658884055)*x_ref[1]**o + (0.374615381032)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.906723530594*x[0]**o + (-0.714162061764)*x[0] + (0.244316031045)*x[1]**o + (0.130646735491)*x[1]
+        ref[(0, 1, 0, 1)]=0.906723530594*x_ref[0]**o + (-0.714162061764)*x_ref[0] + (0.244316031045)*x_ref[1]**o + (0.130646735491)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.512364922722*x[0]**o + (-0.75851915195)*x[0] + (0.772910548807)*x[1]**o + (-0.922087268002)*x[1]
+        ref[(0, 1, 1, 0)]=-0.512364922722*x_ref[0]**o + (-0.75851915195)*x_ref[0] + (0.772910548807)*x_ref[1]**o + (-0.922087268002)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.154951630711*x[0]**o + (0.587091838543)*x[0] + (-0.062059471468)*x[1]**o + (-0.298356453574)*x[1]
+        ref[(0, 1, 1, 1)]=0.154951630711*x_ref[0]**o + (0.587091838543)*x_ref[0] + (-0.062059471468)*x_ref[1]**o + (-0.298356453574)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.746647552054*x[0]**o + (-0.14662621503)*x[0] + (0.852989927042)*x[1]**o + (0.612520560779)*x[1]
+        ref[(0, 1, 2, 0)]=-0.746647552054*x_ref[0]**o + (-0.14662621503)*x_ref[0] + (0.852989927042)*x_ref[1]**o + (0.612520560779)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.741802158248*x[0]**o + (-0.217161404939)*x[0] + (0.20493515352)*x[1]**o + (-0.685748819803)*x[1]
+        ref[(0, 1, 2, 1)]=-0.741802158248*x_ref[0]**o + (-0.217161404939)*x_ref[0] + (0.20493515352)*x_ref[1]**o + (-0.685748819803)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.40453340204*x[0]**o + (0.645227627725)*x[0] + (0.430868462041)*x[1]**o + (0.161946265323)*x[1]
+        ref[(0, 1, 3, 0)]=0.40453340204*x_ref[0]**o + (0.645227627725)*x_ref[0] + (0.430868462041)*x_ref[1]**o + (0.161946265323)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.248679417672*x[0]**o + (-0.0415156394992)*x[0] + (-0.270192988158)*x[1]**o + (-0.773748037215)*x[1]
+        ref[(0, 1, 3, 1)]=0.248679417672*x_ref[0]**o + (-0.0415156394992)*x_ref[0] + (-0.270192988158)*x_ref[1]**o + (-0.773748037215)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.267055505354*x[0]**o + (0.484723705567)*x[0] + (0.500499518812)*x[1]**o + (0.883782990867)*x[1]
+        ref[(1, 0, 0, 0)]=0.267055505354*x_ref[0]**o + (0.484723705567)*x_ref[0] + (0.500499518812)*x_ref[1]**o + (0.883782990867)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.524471491493*x[0]**o + (0.397066501615)*x[0] + (0.460705306426)*x[1]**o + (0.606381210505)*x[1]
+        ref[(1, 0, 0, 1)]=0.524471491493*x_ref[0]**o + (0.397066501615)*x_ref[0] + (0.460705306426)*x_ref[1]**o + (0.606381210505)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.62251428504*x[0]**o + (0.933994251211)*x[0] + (0.174022049113)*x[1]**o + (0.790318972407)*x[1]
+        ref[(1, 0, 1, 0)]=0.62251428504*x_ref[0]**o + (0.933994251211)*x_ref[0] + (0.174022049113)*x_ref[1]**o + (0.790318972407)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.63711208821*x[0]**o + (-0.572571386996)*x[0] + (-0.743578495453)*x[1]**o + (-0.50749061333)*x[1]
+        ref[(1, 0, 1, 1)]=0.63711208821*x_ref[0]**o + (-0.572571386996)*x_ref[0] + (-0.743578495453)*x_ref[1]**o + (-0.50749061333)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.4649528904*x[0]**o + (0.276539117474)*x[0] + (-0.595149393909)*x[1]**o + (-0.410937705056)*x[1]
+        ref[(1, 0, 2, 0)]=-0.4649528904*x_ref[0]**o + (0.276539117474)*x_ref[0] + (-0.595149393909)*x_ref[1]**o + (-0.410937705056)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.131212526204*x[0]**o + (0.764534078479)*x[0] + (0.657467821073)*x[1]**o + (-0.638962934094)*x[1]
+        ref[(1, 0, 2, 1)]=-0.131212526204*x_ref[0]**o + (0.764534078479)*x_ref[0] + (0.657467821073)*x_ref[1]**o + (-0.638962934094)*x_ref[1]
+        arg[(1, 0, 3, 0)]=0.536733712384*x[0]**o + (-0.885869558126)*x[0] + (-0.897160205868)*x[1]**o + (0.954543012147)*x[1]
+        ref[(1, 0, 3, 0)]=0.536733712384*x_ref[0]**o + (-0.885869558126)*x_ref[0] + (-0.897160205868)*x_ref[1]**o + (0.954543012147)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.687387341413*x[0]**o + (0.242073332171)*x[0] + (-0.570796346943)*x[1]**o + (0.569138501705)*x[1]
+        ref[(1, 0, 3, 1)]=-0.687387341413*x_ref[0]**o + (0.242073332171)*x_ref[0] + (-0.570796346943)*x_ref[1]**o + (0.569138501705)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.333572059163*x[0]**o + (-0.389048840266)*x[0] + (-0.754230612706)*x[1]**o + (0.702741983157)*x[1]
+        ref[(1, 1, 0, 0)]=0.333572059163*x_ref[0]**o + (-0.389048840266)*x_ref[0] + (-0.754230612706)*x_ref[1]**o + (0.702741983157)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.402349387683*x[0]**o + (-0.67044968362)*x[0] + (0.0790261682617)*x[1]**o + (-0.971143300318)*x[1]
+        ref[(1, 1, 0, 1)]=0.402349387683*x_ref[0]**o + (-0.67044968362)*x_ref[0] + (0.0790261682617)*x_ref[1]**o + (-0.971143300318)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.235576709682*x[0]**o + (0.747987422922)*x[0] + (-0.333050797273)*x[1]**o + (-0.770900201007)*x[1]
+        ref[(1, 1, 1, 0)]=-0.235576709682*x_ref[0]**o + (0.747987422922)*x_ref[0] + (-0.333050797273)*x_ref[1]**o + (-0.770900201007)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.318752944783*x[0]**o + (0.265648573117)*x[0] + (0.343296750557)*x[1]**o + (0.542761412705)*x[1]
+        ref[(1, 1, 1, 1)]=-0.318752944783*x_ref[0]**o + (0.265648573117)*x_ref[0] + (0.343296750557)*x_ref[1]**o + (0.542761412705)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.392832712093*x[0]**o + (-0.625122816236)*x[0] + (-0.294163715246)*x[1]**o + (0.767965165064)*x[1]
+        ref[(1, 1, 2, 0)]=-0.392832712093*x_ref[0]**o + (-0.625122816236)*x_ref[0] + (-0.294163715246)*x_ref[1]**o + (0.767965165064)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.650878362674*x[0]**o + (0.212430283031)*x[0] + (0.660652178446)*x[1]**o + (0.619871267353)*x[1]
+        ref[(1, 1, 2, 1)]=-0.650878362674*x_ref[0]**o + (0.212430283031)*x_ref[0] + (0.660652178446)*x_ref[1]**o + (0.619871267353)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.644395271872*x[0]**o + (-0.431606815569)*x[0] + (0.508320997483)*x[1]**o + (-0.0826401533806)*x[1]
+        ref[(1, 1, 3, 0)]=-0.644395271872*x_ref[0]**o + (-0.431606815569)*x_ref[0] + (0.508320997483)*x_ref[1]**o + (-0.0826401533806)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.452035292175*x[0]**o + (0.961022784595)*x[0] + (0.652826083508)*x[1]**o + (-0.650317078782)*x[1]
+        ref[(1, 1, 3, 1)]=-0.452035292175*x_ref[0]**o + (0.961022784595)*x_ref[0] + (0.652826083508)*x_ref[1]**o + (-0.650317078782)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.879460816364*x[0]**o + (-0.957142458444)*x[0] + (-0.706072018522)*x[1]**o + (-0.45640897131)*x[1]
+        ref[(2, 0, 0, 0)]=-0.879460816364*x_ref[0]**o + (-0.957142458444)*x_ref[0] + (-0.706072018522)*x_ref[1]**o + (-0.45640897131)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.0419960487856*x[0]**o + (-0.434850682033)*x[0] + (0.944599645038)*x[1]**o + (-0.274183415003)*x[1]
+        ref[(2, 0, 0, 1)]=0.0419960487856*x_ref[0]**o + (-0.434850682033)*x_ref[0] + (0.944599645038)*x_ref[1]**o + (-0.274183415003)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.00286800620506*x[0]**o + (-0.374781225261)*x[0] + (0.78998313072)*x[1]**o + (0.0303373794993)*x[1]
+        ref[(2, 0, 1, 0)]=-0.00286800620506*x_ref[0]**o + (-0.374781225261)*x_ref[0] + (0.78998313072)*x_ref[1]**o + (0.0303373794993)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.824844616391*x[0]**o + (0.228677510949)*x[0] + (0.466678233517)*x[1]**o + (-0.702059310708)*x[1]
+        ref[(2, 0, 1, 1)]=0.824844616391*x_ref[0]**o + (0.228677510949)*x_ref[0] + (0.466678233517)*x_ref[1]**o + (-0.702059310708)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.55488182707*x[0]**o + (0.462307742797)*x[0] + (-0.149313555808)*x[1]**o + (-0.368881908007)*x[1]
+        ref[(2, 0, 2, 0)]=0.55488182707*x_ref[0]**o + (0.462307742797)*x_ref[0] + (-0.149313555808)*x_ref[1]**o + (-0.368881908007)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.0128426117728*x[0]**o + (0.660564721253)*x[0] + (0.4863199271)*x[1]**o + (-0.32652246897)*x[1]
+        ref[(2, 0, 2, 1)]=-0.0128426117728*x_ref[0]**o + (0.660564721253)*x_ref[0] + (0.4863199271)*x_ref[1]**o + (-0.32652246897)*x_ref[1]
+        arg[(2, 0, 3, 0)]=0.929420630652*x[0]**o + (0.478786136592)*x[0] + (0.206756920395)*x[1]**o + (-0.133445062196)*x[1]
+        ref[(2, 0, 3, 0)]=0.929420630652*x_ref[0]**o + (0.478786136592)*x_ref[0] + (0.206756920395)*x_ref[1]**o + (-0.133445062196)*x_ref[1]
+        arg[(2, 0, 3, 1)]=-0.585712747812*x[0]**o + (-0.309721827429)*x[0] + (0.957848684455)*x[1]**o + (-0.948056307632)*x[1]
+        ref[(2, 0, 3, 1)]=-0.585712747812*x_ref[0]**o + (-0.309721827429)*x_ref[0] + (0.957848684455)*x_ref[1]**o + (-0.948056307632)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.143029238043*x[0]**o + (0.885124154729)*x[0] + (0.495681557071)*x[1]**o + (-0.104389061526)*x[1]
+        ref[(2, 1, 0, 0)]=0.143029238043*x_ref[0]**o + (0.885124154729)*x_ref[0] + (0.495681557071)*x_ref[1]**o + (-0.104389061526)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.728740129651*x[0]**o + (-0.967863069616)*x[0] + (0.0154335153332)*x[1]**o + (-0.904221135742)*x[1]
+        ref[(2, 1, 0, 1)]=0.728740129651*x_ref[0]**o + (-0.967863069616)*x_ref[0] + (0.0154335153332)*x_ref[1]**o + (-0.904221135742)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.0420762775979*x[0]**o + (0.416002483675)*x[0] + (-0.732095345699)*x[1]**o + (-0.65431760873)*x[1]
+        ref[(2, 1, 1, 0)]=0.0420762775979*x_ref[0]**o + (0.416002483675)*x_ref[0] + (-0.732095345699)*x_ref[1]**o + (-0.65431760873)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.547939973152*x[0]**o + (-0.876355936962)*x[0] + (-0.0723890741552)*x[1]**o + (0.684945956159)*x[1]
+        ref[(2, 1, 1, 1)]=0.547939973152*x_ref[0]**o + (-0.876355936962)*x_ref[0] + (-0.0723890741552)*x_ref[1]**o + (0.684945956159)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.504896636213*x[0]**o + (0.305116117586)*x[0] + (0.284536714925)*x[1]**o + (0.477223943041)*x[1]
+        ref[(2, 1, 2, 0)]=-0.504896636213*x_ref[0]**o + (0.305116117586)*x_ref[0] + (0.284536714925)*x_ref[1]**o + (0.477223943041)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.16180198103*x[0]**o + (0.825993268861)*x[0] + (-0.0659387853304)*x[1]**o + (0.35527642176)*x[1]
+        ref[(2, 1, 2, 1)]=-0.16180198103*x_ref[0]**o + (0.825993268861)*x_ref[0] + (-0.0659387853304)*x_ref[1]**o + (0.35527642176)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.856061189082*x[0]**o + (-0.482924744317)*x[0] + (-0.989706460586)*x[1]**o + (0.933782635843)*x[1]
+        ref[(2, 1, 3, 0)]=0.856061189082*x_ref[0]**o + (-0.482924744317)*x_ref[0] + (-0.989706460586)*x_ref[1]**o + (0.933782635843)*x_ref[1]
+        arg[(2, 1, 3, 1)]=-0.0438713801973*x[0]**o + (0.814626337941)*x[0] + (0.68068696421)*x[1]**o + (0.446074742514)*x[1]
+        ref[(2, 1, 3, 1)]=-0.0438713801973*x_ref[0]**o + (0.814626337941)*x_ref[0] + (0.68068696421)*x_ref[1]**o + (0.446074742514)*x_ref[1]
+        arg[(3, 0, 0, 0)]=-0.576863397295*x[0]**o + (-0.284238587537)*x[0] + (-0.296903746568)*x[1]**o + (0.1110296354)*x[1]
+        ref[(3, 0, 0, 0)]=-0.576863397295*x_ref[0]**o + (-0.284238587537)*x_ref[0] + (-0.296903746568)*x_ref[1]**o + (0.1110296354)*x_ref[1]
+        arg[(3, 0, 0, 1)]=0.882118358583*x[0]**o + (-0.504464964249)*x[0] + (-0.0288979121129)*x[1]**o + (0.271606966674)*x[1]
+        ref[(3, 0, 0, 1)]=0.882118358583*x_ref[0]**o + (-0.504464964249)*x_ref[0] + (-0.0288979121129)*x_ref[1]**o + (0.271606966674)*x_ref[1]
+        arg[(3, 0, 1, 0)]=-0.800994348023*x[0]**o + (0.389023794087)*x[0] + (-0.246025429494)*x[1]**o + (-0.0494223012495)*x[1]
+        ref[(3, 0, 1, 0)]=-0.800994348023*x_ref[0]**o + (0.389023794087)*x_ref[0] + (-0.246025429494)*x_ref[1]**o + (-0.0494223012495)*x_ref[1]
+        arg[(3, 0, 1, 1)]=0.344099967549*x[0]**o + (-0.320851889233)*x[0] + (-0.285859089791)*x[1]**o + (0.996628142497)*x[1]
+        ref[(3, 0, 1, 1)]=0.344099967549*x_ref[0]**o + (-0.320851889233)*x_ref[0] + (-0.285859089791)*x_ref[1]**o + (0.996628142497)*x_ref[1]
+        arg[(3, 0, 2, 0)]=-0.0678427803386*x[0]**o + (-0.391940106878)*x[0] + (0.780602516461)*x[1]**o + (0.891234140969)*x[1]
+        ref[(3, 0, 2, 0)]=-0.0678427803386*x_ref[0]**o + (-0.391940106878)*x_ref[0] + (0.780602516461)*x_ref[1]**o + (0.891234140969)*x_ref[1]
+        arg[(3, 0, 2, 1)]=-0.440889901163*x[0]**o + (-0.93782588212)*x[0] + (-0.16302606141)*x[1]**o + (0.0237493564813)*x[1]
+        ref[(3, 0, 2, 1)]=-0.440889901163*x_ref[0]**o + (-0.93782588212)*x_ref[0] + (-0.16302606141)*x_ref[1]**o + (0.0237493564813)*x_ref[1]
+        arg[(3, 0, 3, 0)]=0.405751850306*x[0]**o + (0.108148295652)*x[0] + (0.0456393629565)*x[1]**o + (0.485825412426)*x[1]
+        ref[(3, 0, 3, 0)]=0.405751850306*x_ref[0]**o + (0.108148295652)*x_ref[0] + (0.0456393629565)*x_ref[1]**o + (0.485825412426)*x_ref[1]
+        arg[(3, 0, 3, 1)]=-0.375669831661*x[0]**o + (-0.148711125343)*x[0] + (-0.883335860661)*x[1]**o + (0.493906231059)*x[1]
+        ref[(3, 0, 3, 1)]=-0.375669831661*x_ref[0]**o + (-0.148711125343)*x_ref[0] + (-0.883335860661)*x_ref[1]**o + (0.493906231059)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.167933505944*x[0]**o + (-0.560714140285)*x[0] + (-0.0332820009954)*x[1]**o + (0.293629571819)*x[1]
+        ref[(3, 1, 0, 0)]=-0.167933505944*x_ref[0]**o + (-0.560714140285)*x_ref[0] + (-0.0332820009954)*x_ref[1]**o + (0.293629571819)*x_ref[1]
+        arg[(3, 1, 0, 1)]=-0.646706766077*x[0]**o + (0.494834249791)*x[0] + (0.0948012779747)*x[1]**o + (-0.591993590444)*x[1]
+        ref[(3, 1, 0, 1)]=-0.646706766077*x_ref[0]**o + (0.494834249791)*x_ref[0] + (0.0948012779747)*x_ref[1]**o + (-0.591993590444)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.571596290981*x[0]**o + (0.0858178099578)*x[0] + (-0.893394110487)*x[1]**o + (-0.168988414799)*x[1]
+        ref[(3, 1, 1, 0)]=0.571596290981*x_ref[0]**o + (0.0858178099578)*x_ref[0] + (-0.893394110487)*x_ref[1]**o + (-0.168988414799)*x_ref[1]
+        arg[(3, 1, 1, 1)]=0.268639226117*x[0]**o + (-0.227629644426)*x[0] + (0.285708124355)*x[1]**o + (-0.0916426180808)*x[1]
+        ref[(3, 1, 1, 1)]=0.268639226117*x_ref[0]**o + (-0.227629644426)*x_ref[0] + (0.285708124355)*x_ref[1]**o + (-0.0916426180808)*x_ref[1]
+        arg[(3, 1, 2, 0)]=-0.753856295398*x[0]**o + (-0.913292370853)*x[0] + (-0.84889576629)*x[1]**o + (0.44178440195)*x[1]
+        ref[(3, 1, 2, 0)]=-0.753856295398*x_ref[0]**o + (-0.913292370853)*x_ref[0] + (-0.84889576629)*x_ref[1]**o + (0.44178440195)*x_ref[1]
+        arg[(3, 1, 2, 1)]=0.961933058568*x[0]**o + (-0.209586737205)*x[0] + (0.11985528298)*x[1]**o + (0.539846491703)*x[1]
+        ref[(3, 1, 2, 1)]=0.961933058568*x_ref[0]**o + (-0.209586737205)*x_ref[0] + (0.11985528298)*x_ref[1]**o + (0.539846491703)*x_ref[1]
+        arg[(3, 1, 3, 0)]=0.441272638482*x[0]**o + (-0.999136830366)*x[0] + (0.0645551249842)*x[1]**o + (0.559867171697)*x[1]
+        ref[(3, 1, 3, 0)]=0.441272638482*x_ref[0]**o + (-0.999136830366)*x_ref[0] + (0.0645551249842)*x_ref[1]**o + (0.559867171697)*x_ref[1]
+        arg[(3, 1, 3, 1)]=-0.719396690718*x[0]**o + (-0.393781197298)*x[0] + (0.398592596797)*x[1]**o + (-0.865200671926)*x[1]
+        ref[(3, 1, 3, 1)]=-0.719396690718*x_ref[0]**o + (-0.393781197298)*x_ref[0] + (0.398592596797)*x_ref[1]**o + (-0.865200671926)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.443920819205*x[2]**o + (0.127670434641)*x[2]
+            ref[(0, 0, 0, 0)]+=0.443920819205*x_ref[2]**o + (0.127670434641)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.475658010492*x[2]**o + (0.592402943328)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.475658010492*x_ref[2]**o + (0.592402943328)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.354062403133*x[2]**o + (-0.06937156314)*x[2]
+            ref[(0, 0, 1, 0)]+=0.354062403133*x_ref[2]**o + (-0.06937156314)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.809647973604*x[2]**o + (-0.978519982671)*x[2]
+            ref[(0, 0, 1, 1)]+=0.809647973604*x_ref[2]**o + (-0.978519982671)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.606406314552*x[2]**o + (0.500678369034)*x[2]
+            ref[(0, 0, 2, 0)]+=0.606406314552*x_ref[2]**o + (0.500678369034)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.107180791567*x[2]**o + (0.245520888962)*x[2]
+            ref[(0, 0, 2, 1)]+=0.107180791567*x_ref[2]**o + (0.245520888962)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.556230270461*x[2]**o + (-0.679309473407)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.556230270461*x_ref[2]**o + (-0.679309473407)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.948089075993*x[2]**o + (0.0502183578584)*x[2]
+            ref[(0, 0, 3, 1)]+=0.948089075993*x_ref[2]**o + (0.0502183578584)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.65768239772*x[2]**o + (-0.923938438551)*x[2]
+            ref[(0, 1, 0, 0)]+=0.65768239772*x_ref[2]**o + (-0.923938438551)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.112077135903*x[2]**o + (-0.175634263786)*x[2]
+            ref[(0, 1, 0, 1)]+=0.112077135903*x_ref[2]**o + (-0.175634263786)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.824711967512*x[2]**o + (-0.758873169553)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.824711967512*x_ref[2]**o + (-0.758873169553)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.516502145799*x[2]**o + (0.470616843267)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.516502145799*x_ref[2]**o + (0.470616843267)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.780611591864*x[2]**o + (-0.630398063454)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.780611591864*x_ref[2]**o + (-0.630398063454)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.152736009039*x[2]**o + (0.31182490302)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.152736009039*x_ref[2]**o + (0.31182490302)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=0.408303468514*x[2]**o + (0.89149337202)*x[2]
+            ref[(0, 1, 3, 0)]+=0.408303468514*x_ref[2]**o + (0.89149337202)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=0.884546721974*x[2]**o + (-0.170080803277)*x[2]
+            ref[(0, 1, 3, 1)]+=0.884546721974*x_ref[2]**o + (-0.170080803277)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.239616889821*x[2]**o + (-0.105088948736)*x[2]
+            ref[(1, 0, 0, 0)]+=0.239616889821*x_ref[2]**o + (-0.105088948736)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.805878664966*x[2]**o + (-0.384673294775)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.805878664966*x_ref[2]**o + (-0.384673294775)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.166578193503*x[2]**o + (-0.557659897435)*x[2]
+            ref[(1, 0, 1, 0)]+=0.166578193503*x_ref[2]**o + (-0.557659897435)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.654588373317*x[2]**o + (-0.364034939151)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.654588373317*x_ref[2]**o + (-0.364034939151)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.416808581262*x[2]**o + (-0.461352380011)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.416808581262*x_ref[2]**o + (-0.461352380011)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.104004691807*x[2]**o + (-0.715896176498)*x[2]
+            ref[(1, 0, 2, 1)]+=0.104004691807*x_ref[2]**o + (-0.715896176498)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=0.316454856782*x[2]**o + (-0.123874170892)*x[2]
+            ref[(1, 0, 3, 0)]+=0.316454856782*x_ref[2]**o + (-0.123874170892)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.685424270406*x[2]**o + (0.658621287729)*x[2]
+            ref[(1, 0, 3, 1)]+=-0.685424270406*x_ref[2]**o + (0.658621287729)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.384526078183*x[2]**o + (0.118561757859)*x[2]
+            ref[(1, 1, 0, 0)]+=0.384526078183*x_ref[2]**o + (0.118561757859)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.527467446858*x[2]**o + (0.297516307943)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.527467446858*x_ref[2]**o + (0.297516307943)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.107629788474*x[2]**o + (-0.143275344284)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.107629788474*x_ref[2]**o + (-0.143275344284)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.135470524539*x[2]**o + (-0.469060875477)*x[2]
+            ref[(1, 1, 1, 1)]+=0.135470524539*x_ref[2]**o + (-0.469060875477)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.0071088178346*x[2]**o + (-0.246244487463)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.0071088178346*x_ref[2]**o + (-0.246244487463)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.130374502219*x[2]**o + (-0.0340217722855)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.130374502219*x_ref[2]**o + (-0.0340217722855)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=0.860452972902*x[2]**o + (0.715476711118)*x[2]
+            ref[(1, 1, 3, 0)]+=0.860452972902*x_ref[2]**o + (0.715476711118)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.291647517702*x[2]**o + (-0.528839644502)*x[2]
+            ref[(1, 1, 3, 1)]+=-0.291647517702*x_ref[2]**o + (-0.528839644502)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.0918134816061*x[2]**o + (-0.370770656004)*x[2]
+            ref[(2, 0, 0, 0)]+=0.0918134816061*x_ref[2]**o + (-0.370770656004)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.191582528467*x[2]**o + (-0.464873895764)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.191582528467*x_ref[2]**o + (-0.464873895764)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.143737602929*x[2]**o + (0.286347200036)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.143737602929*x_ref[2]**o + (0.286347200036)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.360255890191*x[2]**o + (0.655722530717)*x[2]
+            ref[(2, 0, 1, 1)]+=0.360255890191*x_ref[2]**o + (0.655722530717)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.32755130718*x[2]**o + (0.977781481167)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.32755130718*x_ref[2]**o + (0.977781481167)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.736012633448*x[2]**o + (0.378895283456)*x[2]
+            ref[(2, 0, 2, 1)]+=0.736012633448*x_ref[2]**o + (0.378895283456)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.609794917939*x[2]**o + (-0.116023640639)*x[2]
+            ref[(2, 0, 3, 0)]+=0.609794917939*x_ref[2]**o + (-0.116023640639)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=-0.683074773407*x[2]**o + (0.380851566088)*x[2]
+            ref[(2, 0, 3, 1)]+=-0.683074773407*x_ref[2]**o + (0.380851566088)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.848390159656*x[2]**o + (-0.868899013273)*x[2]
+            ref[(2, 1, 0, 0)]+=0.848390159656*x_ref[2]**o + (-0.868899013273)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.971820057594*x[2]**o + (-0.313539166495)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.971820057594*x_ref[2]**o + (-0.313539166495)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.312587378085*x[2]**o + (0.420267338501)*x[2]
+            ref[(2, 1, 1, 0)]+=0.312587378085*x_ref[2]**o + (0.420267338501)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.664947884107*x[2]**o + (0.863753943413)*x[2]
+            ref[(2, 1, 1, 1)]+=0.664947884107*x_ref[2]**o + (0.863753943413)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.2166032977*x[2]**o + (0.21745048161)*x[2]
+            ref[(2, 1, 2, 0)]+=0.2166032977*x_ref[2]**o + (0.21745048161)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.188814545594*x[2]**o + (-0.660526494256)*x[2]
+            ref[(2, 1, 2, 1)]+=0.188814545594*x_ref[2]**o + (-0.660526494256)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=-0.122619189361*x[2]**o + (-0.13790318252)*x[2]
+            ref[(2, 1, 3, 0)]+=-0.122619189361*x_ref[2]**o + (-0.13790318252)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=0.961966446462*x[2]**o + (-0.856987587783)*x[2]
+            ref[(2, 1, 3, 1)]+=0.961966446462*x_ref[2]**o + (-0.856987587783)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=-0.603087016284*x[2]**o + (0.497449596937)*x[2]
+            ref[(3, 0, 0, 0)]+=-0.603087016284*x_ref[2]**o + (0.497449596937)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=0.30584347236*x[2]**o + (0.0295419403021)*x[2]
+            ref[(3, 0, 0, 1)]+=0.30584347236*x_ref[2]**o + (0.0295419403021)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.273648285295*x[2]**o + (0.561278443242)*x[2]
+            ref[(3, 0, 1, 0)]+=0.273648285295*x_ref[2]**o + (0.561278443242)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.0513469000389*x[2]**o + (0.286707303359)*x[2]
+            ref[(3, 0, 1, 1)]+=0.0513469000389*x_ref[2]**o + (0.286707303359)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=0.730220147355*x[2]**o + (0.00061641959649)*x[2]
+            ref[(3, 0, 2, 0)]+=0.730220147355*x_ref[2]**o + (0.00061641959649)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=0.120926714109*x[2]**o + (0.734550355656)*x[2]
+            ref[(3, 0, 2, 1)]+=0.120926714109*x_ref[2]**o + (0.734550355656)*x_ref[2]
+            arg[(3, 0, 3, 0)]+=0.480831177437*x[2]**o + (0.971749912316)*x[2]
+            ref[(3, 0, 3, 0)]+=0.480831177437*x_ref[2]**o + (0.971749912316)*x_ref[2]
+            arg[(3, 0, 3, 1)]+=0.773987479865*x[2]**o + (0.0386992209212)*x[2]
+            ref[(3, 0, 3, 1)]+=0.773987479865*x_ref[2]**o + (0.0386992209212)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.497848115815*x[2]**o + (0.27518162562)*x[2]
+            ref[(3, 1, 0, 0)]+=0.497848115815*x_ref[2]**o + (0.27518162562)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=-0.213564760295*x[2]**o + (-0.993187488888)*x[2]
+            ref[(3, 1, 0, 1)]+=-0.213564760295*x_ref[2]**o + (-0.993187488888)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.330175613427*x[2]**o + (-0.374542557457)*x[2]
+            ref[(3, 1, 1, 0)]+=0.330175613427*x_ref[2]**o + (-0.374542557457)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.10080153828*x[2]**o + (0.467455129694)*x[2]
+            ref[(3, 1, 1, 1)]+=-0.10080153828*x_ref[2]**o + (0.467455129694)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=0.15067851011*x[2]**o + (0.821076900005)*x[2]
+            ref[(3, 1, 2, 0)]+=0.15067851011*x_ref[2]**o + (0.821076900005)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=-0.179587743396*x[2]**o + (-0.498403308004)*x[2]
+            ref[(3, 1, 2, 1)]+=-0.179587743396*x_ref[2]**o + (-0.498403308004)*x_ref[2]
+            arg[(3, 1, 3, 0)]+=-0.124540163894*x[2]**o + (0.410293544906)*x[2]
+            ref[(3, 1, 3, 0)]+=-0.124540163894*x_ref[2]**o + (0.410293544906)*x_ref[2]
+            arg[(3, 1, 3, 1)]+=0.900486342985*x[2]**o + (0.226192439154)*x[2]
+            ref[(3, 1, 3, 1)]+=0.900486342985*x_ref[2]**o + (0.226192439154)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.0162009712169*x[0]**o + (0.0388925443912)*x[0] + (-0.37080977734)*x[1]**o + (-0.829146287721)*x[1]
+        ref=0.0162009712169*x_ref[0]**o + (0.0388925443912)*x_ref[0] + (-0.37080977734)*x_ref[1]**o + (-0.829146287721)*x_ref[1]
+        if dim==3:
+            arg+=(-0.254842985783)*x[2]**o + (0.0336635390414)*x[2]
+            ref+=(-0.254842985783)*x_ref[2]**o + (0.0336635390414)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.066725437033*x[0]**o + (0.269284280513)*x[0] + (0.539845628639)*x[1]**o + (0.861386786563)*x[1]
+        ref[(0,)]=-0.066725437033*x_ref[0]**o + (0.269284280513)*x_ref[0] + (0.539845628639)*x_ref[1]**o + (0.861386786563)*x_ref[1]
+        arg[(1,)]=0.532159774709*x[0]**o + (-0.408643257007)*x[0] + (-0.206322389448)*x[1]**o + (-0.957216956004)*x[1]
+        ref[(1,)]=0.532159774709*x_ref[0]**o + (-0.408643257007)*x_ref[0] + (-0.206322389448)*x_ref[1]**o + (-0.957216956004)*x_ref[1]
+        arg[(2,)]=0.780362555591*x[0]**o + (-0.817116759743)*x[0] + (0.901519187592)*x[1]**o + (0.170055144873)*x[1]
+        ref[(2,)]=0.780362555591*x_ref[0]**o + (-0.817116759743)*x_ref[0] + (0.901519187592)*x_ref[1]**o + (0.170055144873)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.190319751891*x[2]**o + (-0.0896063700566)*x[2]
+            ref[(0,)]+=-0.190319751891*x_ref[2]**o + (-0.0896063700566)*x_ref[2]
+            arg[(1,)]+=-0.0917718932154*x[2]**o + (0.934547509991)*x[2]
+            ref[(1,)]+=-0.0917718932154*x_ref[2]**o + (0.934547509991)*x_ref[2]
+            arg[(2,)]+=0.857211364003*x[2]**o + (-0.685803863507)*x[2]
+            ref[(2,)]+=0.857211364003*x_ref[2]**o + (-0.685803863507)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=0.175721617691*x[0]**o + (0.0723131169138)*x[0] + (0.467047109757)*x[1]**o + (-0.233865963478)*x[1]
+        ref[(0, 0)]=0.175721617691*x_ref[0]**o + (0.0723131169138)*x_ref[0] + (0.467047109757)*x_ref[1]**o + (-0.233865963478)*x_ref[1]
+        arg[(0, 1)]=0.471615193983*x[0]**o + (-0.177319312532)*x[0] + (-0.582305524008)*x[1]**o + (0.0910084997063)*x[1]
+        ref[(0, 1)]=0.471615193983*x_ref[0]**o + (-0.177319312532)*x_ref[0] + (-0.582305524008)*x_ref[1]**o + (0.0910084997063)*x_ref[1]
+        arg[(0, 2)]=0.980559772251*x[0]**o + (0.55030124557)*x[0] + (-0.529709064851)*x[1]**o + (0.964737569676)*x[1]
+        ref[(0, 2)]=0.980559772251*x_ref[0]**o + (0.55030124557)*x_ref[0] + (-0.529709064851)*x_ref[1]**o + (0.964737569676)*x_ref[1]
+        arg[(1, 0)]=0.734952552083*x[0]**o + (-0.753943783616)*x[0] + (0.214968517211)*x[1]**o + (0.179653454566)*x[1]
+        ref[(1, 0)]=0.734952552083*x_ref[0]**o + (-0.753943783616)*x_ref[0] + (0.214968517211)*x_ref[1]**o + (0.179653454566)*x_ref[1]
+        arg[(1, 1)]=0.453807736857*x[0]**o + (0.884087409212)*x[0] + (0.0171794372574)*x[1]**o + (0.230289010666)*x[1]
+        ref[(1, 1)]=0.453807736857*x_ref[0]**o + (0.884087409212)*x_ref[0] + (0.0171794372574)*x_ref[1]**o + (0.230289010666)*x_ref[1]
+        arg[(1, 2)]=0.390483920786*x[0]**o + (0.188284691572)*x[0] + (0.663565145126)*x[1]**o + (0.3856807363)*x[1]
+        ref[(1, 2)]=0.390483920786*x_ref[0]**o + (0.188284691572)*x_ref[0] + (0.663565145126)*x_ref[1]**o + (0.3856807363)*x_ref[1]
+        arg[(2, 0)]=0.0183914102602*x[0]**o + (-0.797446196381)*x[0] + (-0.269377030326)*x[1]**o + (0.779576402299)*x[1]
+        ref[(2, 0)]=0.0183914102602*x_ref[0]**o + (-0.797446196381)*x_ref[0] + (-0.269377030326)*x_ref[1]**o + (0.779576402299)*x_ref[1]
+        arg[(2, 1)]=-0.905018246657*x[0]**o + (0.622584139974)*x[0] + (-0.25135923326)*x[1]**o + (-0.117403094789)*x[1]
+        ref[(2, 1)]=-0.905018246657*x_ref[0]**o + (0.622584139974)*x_ref[0] + (-0.25135923326)*x_ref[1]**o + (-0.117403094789)*x_ref[1]
+        arg[(2, 2)]=-0.453426697475*x[0]**o + (-0.346843378067)*x[0] + (0.406989672794)*x[1]**o + (0.953030974202)*x[1]
+        ref[(2, 2)]=-0.453426697475*x_ref[0]**o + (-0.346843378067)*x_ref[0] + (0.406989672794)*x_ref[1]**o + (0.953030974202)*x_ref[1]
+        arg[(3, 0)]=-0.253561220614*x[0]**o + (0.0663547656974)*x[0] + (0.46207026114)*x[1]**o + (0.419859802647)*x[1]
+        ref[(3, 0)]=-0.253561220614*x_ref[0]**o + (0.0663547656974)*x_ref[0] + (0.46207026114)*x_ref[1]**o + (0.419859802647)*x_ref[1]
+        arg[(3, 1)]=-0.36198235394*x[0]**o + (0.72937670736)*x[0] + (0.865573569993)*x[1]**o + (-0.956872627304)*x[1]
+        ref[(3, 1)]=-0.36198235394*x_ref[0]**o + (0.72937670736)*x_ref[0] + (0.865573569993)*x_ref[1]**o + (-0.956872627304)*x_ref[1]
+        arg[(3, 2)]=0.810648449824*x[0]**o + (-0.153626545517)*x[0] + (0.832439971259)*x[1]**o + (-0.896248935816)*x[1]
+        ref[(3, 2)]=0.810648449824*x_ref[0]**o + (-0.153626545517)*x_ref[0] + (0.832439971259)*x_ref[1]**o + (-0.896248935816)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.693612430072*x[2]**o + (-0.607955223371)*x[2]
+            ref[(0, 0)]+=-0.693612430072*x_ref[2]**o + (-0.607955223371)*x_ref[2]
+            arg[(0, 1)]+=0.0252471421314*x[2]**o + (0.732533218951)*x[2]
+            ref[(0, 1)]+=0.0252471421314*x_ref[2]**o + (0.732533218951)*x_ref[2]
+            arg[(0, 2)]+=-0.737862112703*x[2]**o + (-0.250408259088)*x[2]
+            ref[(0, 2)]+=-0.737862112703*x_ref[2]**o + (-0.250408259088)*x_ref[2]
+            arg[(1, 0)]+=-0.918467832242*x[2]**o + (0.700645788837)*x[2]
+            ref[(1, 0)]+=-0.918467832242*x_ref[2]**o + (0.700645788837)*x_ref[2]
+            arg[(1, 1)]+=0.900679623052*x[2]**o + (0.447972574992)*x[2]
+            ref[(1, 1)]+=0.900679623052*x_ref[2]**o + (0.447972574992)*x_ref[2]
+            arg[(1, 2)]+=0.98842171519*x[2]**o + (-0.507568547043)*x[2]
+            ref[(1, 2)]+=0.98842171519*x_ref[2]**o + (-0.507568547043)*x_ref[2]
+            arg[(2, 0)]+=0.360545215265*x[2]**o + (-0.611556346744)*x[2]
+            ref[(2, 0)]+=0.360545215265*x_ref[2]**o + (-0.611556346744)*x_ref[2]
+            arg[(2, 1)]+=-0.482386118811*x[2]**o + (0.0526152876776)*x[2]
+            ref[(2, 1)]+=-0.482386118811*x_ref[2]**o + (0.0526152876776)*x_ref[2]
+            arg[(2, 2)]+=-0.966125083621*x[2]**o + (0.97053951021)*x[2]
+            ref[(2, 2)]+=-0.966125083621*x_ref[2]**o + (0.97053951021)*x_ref[2]
+            arg[(3, 0)]+=0.107286454366*x[2]**o + (-0.316030308365)*x[2]
+            ref[(3, 0)]+=0.107286454366*x_ref[2]**o + (-0.316030308365)*x_ref[2]
+            arg[(3, 1)]+=-0.462743804947*x[2]**o + (0.491911955351)*x[2]
+            ref[(3, 1)]+=-0.462743804947*x_ref[2]**o + (0.491911955351)*x_ref[2]
+            arg[(3, 2)]+=-0.64963460361*x[2]**o + (0.767680775033)*x[2]
+            ref[(3, 2)]+=-0.64963460361*x_ref[2]**o + (0.767680775033)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4),w_ref)
+        arg[(0, 0, 0)]=-0.596017222607*x[0]**o + (0.168145265368)*x[0] + (0.454472391726)*x[1]**o + (-0.372290002694)*x[1]
+        ref[(0, 0, 0)]=-0.596017222607*x_ref[0]**o + (0.168145265368)*x_ref[0] + (0.454472391726)*x_ref[1]**o + (-0.372290002694)*x_ref[1]
+        arg[(0, 0, 1)]=0.657780688816*x[0]**o + (0.337019283262)*x[0] + (0.954483553174)*x[1]**o + (0.530624725821)*x[1]
+        ref[(0, 0, 1)]=0.657780688816*x_ref[0]**o + (0.337019283262)*x_ref[0] + (0.954483553174)*x_ref[1]**o + (0.530624725821)*x_ref[1]
+        arg[(0, 0, 2)]=-0.616945129429*x[0]**o + (-0.895264059847)*x[0] + (-0.836559361122)*x[1]**o + (-0.200319759945)*x[1]
+        ref[(0, 0, 2)]=-0.616945129429*x_ref[0]**o + (-0.895264059847)*x_ref[0] + (-0.836559361122)*x_ref[1]**o + (-0.200319759945)*x_ref[1]
+        arg[(0, 0, 3)]=-0.456448241456*x[0]**o + (-0.441831390456)*x[0] + (0.735164205445)*x[1]**o + (-0.224414705247)*x[1]
+        ref[(0, 0, 3)]=-0.456448241456*x_ref[0]**o + (-0.441831390456)*x_ref[0] + (0.735164205445)*x_ref[1]**o + (-0.224414705247)*x_ref[1]
+        arg[(0, 1, 0)]=0.37540587749*x[0]**o + (0.399796575116)*x[0] + (0.782058592506)*x[1]**o + (0.381796687181)*x[1]
+        ref[(0, 1, 0)]=0.37540587749*x_ref[0]**o + (0.399796575116)*x_ref[0] + (0.782058592506)*x_ref[1]**o + (0.381796687181)*x_ref[1]
+        arg[(0, 1, 1)]=-0.64492600327*x[0]**o + (0.319755796395)*x[0] + (0.410959867623)*x[1]**o + (0.410945092618)*x[1]
+        ref[(0, 1, 1)]=-0.64492600327*x_ref[0]**o + (0.319755796395)*x_ref[0] + (0.410959867623)*x_ref[1]**o + (0.410945092618)*x_ref[1]
+        arg[(0, 1, 2)]=0.967669936936*x[0]**o + (0.398854454679)*x[0] + (0.493675677612)*x[1]**o + (-0.748945839084)*x[1]
+        ref[(0, 1, 2)]=0.967669936936*x_ref[0]**o + (0.398854454679)*x_ref[0] + (0.493675677612)*x_ref[1]**o + (-0.748945839084)*x_ref[1]
+        arg[(0, 1, 3)]=0.282463918783*x[0]**o + (0.182723418078)*x[0] + (-0.9909451219)*x[1]**o + (0.785421053932)*x[1]
+        ref[(0, 1, 3)]=0.282463918783*x_ref[0]**o + (0.182723418078)*x_ref[0] + (-0.9909451219)*x_ref[1]**o + (0.785421053932)*x_ref[1]
+        arg[(1, 0, 0)]=-0.534443704442*x[0]**o + (-0.147258151856)*x[0] + (0.00231444222386)*x[1]**o + (-0.540025314219)*x[1]
+        ref[(1, 0, 0)]=-0.534443704442*x_ref[0]**o + (-0.147258151856)*x_ref[0] + (0.00231444222386)*x_ref[1]**o + (-0.540025314219)*x_ref[1]
+        arg[(1, 0, 1)]=-0.172804153335*x[0]**o + (0.131194771449)*x[0] + (-0.875849010197)*x[1]**o + (0.557006343653)*x[1]
+        ref[(1, 0, 1)]=-0.172804153335*x_ref[0]**o + (0.131194771449)*x_ref[0] + (-0.875849010197)*x_ref[1]**o + (0.557006343653)*x_ref[1]
+        arg[(1, 0, 2)]=0.327228574198*x[0]**o + (-0.895888981543)*x[0] + (-0.565183689343)*x[1]**o + (-0.137219215892)*x[1]
+        ref[(1, 0, 2)]=0.327228574198*x_ref[0]**o + (-0.895888981543)*x_ref[0] + (-0.565183689343)*x_ref[1]**o + (-0.137219215892)*x_ref[1]
+        arg[(1, 0, 3)]=-0.898595842729*x[0]**o + (0.377462492993)*x[0] + (-0.616482754629)*x[1]**o + (0.849770415469)*x[1]
+        ref[(1, 0, 3)]=-0.898595842729*x_ref[0]**o + (0.377462492993)*x_ref[0] + (-0.616482754629)*x_ref[1]**o + (0.849770415469)*x_ref[1]
+        arg[(1, 1, 0)]=-0.812649387724*x[0]**o + (0.891109073733)*x[0] + (-0.505511982667)*x[1]**o + (0.363019862277)*x[1]
+        ref[(1, 1, 0)]=-0.812649387724*x_ref[0]**o + (0.891109073733)*x_ref[0] + (-0.505511982667)*x_ref[1]**o + (0.363019862277)*x_ref[1]
+        arg[(1, 1, 1)]=-0.865360337516*x[0]**o + (0.887871427947)*x[0] + (-0.0275874263735)*x[1]**o + (-0.736260829187)*x[1]
+        ref[(1, 1, 1)]=-0.865360337516*x_ref[0]**o + (0.887871427947)*x_ref[0] + (-0.0275874263735)*x_ref[1]**o + (-0.736260829187)*x_ref[1]
+        arg[(1, 1, 2)]=-0.499866887686*x[0]**o + (0.73688308363)*x[0] + (-0.861791357437)*x[1]**o + (-0.0930440687742)*x[1]
+        ref[(1, 1, 2)]=-0.499866887686*x_ref[0]**o + (0.73688308363)*x_ref[0] + (-0.861791357437)*x_ref[1]**o + (-0.0930440687742)*x_ref[1]
+        arg[(1, 1, 3)]=-0.138312729919*x[0]**o + (0.303905719483)*x[0] + (-0.753348942349)*x[1]**o + (-0.0403777962789)*x[1]
+        ref[(1, 1, 3)]=-0.138312729919*x_ref[0]**o + (0.303905719483)*x_ref[0] + (-0.753348942349)*x_ref[1]**o + (-0.0403777962789)*x_ref[1]
+        arg[(2, 0, 0)]=-0.310965308193*x[0]**o + (0.949236497053)*x[0] + (-0.326009177934)*x[1]**o + (0.722173934322)*x[1]
+        ref[(2, 0, 0)]=-0.310965308193*x_ref[0]**o + (0.949236497053)*x_ref[0] + (-0.326009177934)*x_ref[1]**o + (0.722173934322)*x_ref[1]
+        arg[(2, 0, 1)]=0.781128836191*x[0]**o + (-0.897667369941)*x[0] + (0.931942733655)*x[1]**o + (0.869434385598)*x[1]
+        ref[(2, 0, 1)]=0.781128836191*x_ref[0]**o + (-0.897667369941)*x_ref[0] + (0.931942733655)*x_ref[1]**o + (0.869434385598)*x_ref[1]
+        arg[(2, 0, 2)]=-0.363616970798*x[0]**o + (-0.43359398321)*x[0] + (-0.335082883618)*x[1]**o + (-0.647910163346)*x[1]
+        ref[(2, 0, 2)]=-0.363616970798*x_ref[0]**o + (-0.43359398321)*x_ref[0] + (-0.335082883618)*x_ref[1]**o + (-0.647910163346)*x_ref[1]
+        arg[(2, 0, 3)]=-0.356264723119*x[0]**o + (-0.257552521011)*x[0] + (0.814417475829)*x[1]**o + (0.356085152274)*x[1]
+        ref[(2, 0, 3)]=-0.356264723119*x_ref[0]**o + (-0.257552521011)*x_ref[0] + (0.814417475829)*x_ref[1]**o + (0.356085152274)*x_ref[1]
+        arg[(2, 1, 0)]=0.900763740285*x[0]**o + (-0.732318968898)*x[0] + (-0.536650211633)*x[1]**o + (-0.632439836084)*x[1]
+        ref[(2, 1, 0)]=0.900763740285*x_ref[0]**o + (-0.732318968898)*x_ref[0] + (-0.536650211633)*x_ref[1]**o + (-0.632439836084)*x_ref[1]
+        arg[(2, 1, 1)]=-0.387797603137*x[0]**o + (0.769120046833)*x[0] + (0.203222545604)*x[1]**o + (-0.71613625229)*x[1]
+        ref[(2, 1, 1)]=-0.387797603137*x_ref[0]**o + (0.769120046833)*x_ref[0] + (0.203222545604)*x_ref[1]**o + (-0.71613625229)*x_ref[1]
+        arg[(2, 1, 2)]=-0.964885213841*x[0]**o + (0.175088811044)*x[0] + (0.308534213603)*x[1]**o + (-0.72023557452)*x[1]
+        ref[(2, 1, 2)]=-0.964885213841*x_ref[0]**o + (0.175088811044)*x_ref[0] + (0.308534213603)*x_ref[1]**o + (-0.72023557452)*x_ref[1]
+        arg[(2, 1, 3)]=0.314051715496*x[0]**o + (0.189917567847)*x[0] + (-0.596009149112)*x[1]**o + (-0.385253906339)*x[1]
+        ref[(2, 1, 3)]=0.314051715496*x_ref[0]**o + (0.189917567847)*x_ref[0] + (-0.596009149112)*x_ref[1]**o + (-0.385253906339)*x_ref[1]
+        arg[(3, 0, 0)]=-0.436408473646*x[0]**o + (0.888942254828)*x[0] + (0.597361463093)*x[1]**o + (-0.712695177509)*x[1]
+        ref[(3, 0, 0)]=-0.436408473646*x_ref[0]**o + (0.888942254828)*x_ref[0] + (0.597361463093)*x_ref[1]**o + (-0.712695177509)*x_ref[1]
+        arg[(3, 0, 1)]=0.103908148414*x[0]**o + (-0.970074125599)*x[0] + (-0.0670839111492)*x[1]**o + (0.409025103419)*x[1]
+        ref[(3, 0, 1)]=0.103908148414*x_ref[0]**o + (-0.970074125599)*x_ref[0] + (-0.0670839111492)*x_ref[1]**o + (0.409025103419)*x_ref[1]
+        arg[(3, 0, 2)]=-0.0587721547417*x[0]**o + (-0.296576847255)*x[0] + (-0.418774426305)*x[1]**o + (-0.410017294414)*x[1]
+        ref[(3, 0, 2)]=-0.0587721547417*x_ref[0]**o + (-0.296576847255)*x_ref[0] + (-0.418774426305)*x_ref[1]**o + (-0.410017294414)*x_ref[1]
+        arg[(3, 0, 3)]=0.0167347356381*x[0]**o + (0.581666422733)*x[0] + (0.562986448157)*x[1]**o + (0.783813187095)*x[1]
+        ref[(3, 0, 3)]=0.0167347356381*x_ref[0]**o + (0.581666422733)*x_ref[0] + (0.562986448157)*x_ref[1]**o + (0.783813187095)*x_ref[1]
+        arg[(3, 1, 0)]=-0.617000974961*x[0]**o + (0.0141430137722)*x[0] + (-0.648863607558)*x[1]**o + (-0.650280949091)*x[1]
+        ref[(3, 1, 0)]=-0.617000974961*x_ref[0]**o + (0.0141430137722)*x_ref[0] + (-0.648863607558)*x_ref[1]**o + (-0.650280949091)*x_ref[1]
+        arg[(3, 1, 1)]=0.185521330521*x[0]**o + (0.755827187256)*x[0] + (0.436501856452)*x[1]**o + (-0.703478567633)*x[1]
+        ref[(3, 1, 1)]=0.185521330521*x_ref[0]**o + (0.755827187256)*x_ref[0] + (0.436501856452)*x_ref[1]**o + (-0.703478567633)*x_ref[1]
+        arg[(3, 1, 2)]=0.473245634298*x[0]**o + (-0.797235771971)*x[0] + (0.482660993451)*x[1]**o + (-0.604307930161)*x[1]
+        ref[(3, 1, 2)]=0.473245634298*x_ref[0]**o + (-0.797235771971)*x_ref[0] + (0.482660993451)*x_ref[1]**o + (-0.604307930161)*x_ref[1]
+        arg[(3, 1, 3)]=0.981096764095*x[0]**o + (0.301628356119)*x[0] + (-0.574642071424)*x[1]**o + (-0.633715921156)*x[1]
+        ref[(3, 1, 3)]=0.981096764095*x_ref[0]**o + (0.301628356119)*x_ref[0] + (-0.574642071424)*x_ref[1]**o + (-0.633715921156)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.943277865733*x[2]**o + (0.00739551384629)*x[2]
+            ref[(0, 0, 0)]+=0.943277865733*x_ref[2]**o + (0.00739551384629)*x_ref[2]
+            arg[(0, 0, 1)]+=0.867936447092*x[2]**o + (-0.77605383681)*x[2]
+            ref[(0, 0, 1)]+=0.867936447092*x_ref[2]**o + (-0.77605383681)*x_ref[2]
+            arg[(0, 0, 2)]+=0.819318874539*x[2]**o + (0.34336341831)*x[2]
+            ref[(0, 0, 2)]+=0.819318874539*x_ref[2]**o + (0.34336341831)*x_ref[2]
+            arg[(0, 0, 3)]+=0.953300048605*x[2]**o + (0.258646976843)*x[2]
+            ref[(0, 0, 3)]+=0.953300048605*x_ref[2]**o + (0.258646976843)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.335294432217*x[2]**o + (0.226563947047)*x[2]
+            ref[(0, 1, 0)]+=-0.335294432217*x_ref[2]**o + (0.226563947047)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.0684059651827*x[2]**o + (0.669652760975)*x[2]
+            ref[(0, 1, 1)]+=-0.0684059651827*x_ref[2]**o + (0.669652760975)*x_ref[2]
+            arg[(0, 1, 2)]+=0.58194831926*x[2]**o + (0.37109478068)*x[2]
+            ref[(0, 1, 2)]+=0.58194831926*x_ref[2]**o + (0.37109478068)*x_ref[2]
+            arg[(0, 1, 3)]+=0.280963333867*x[2]**o + (-0.845378875959)*x[2]
+            ref[(0, 1, 3)]+=0.280963333867*x_ref[2]**o + (-0.845378875959)*x_ref[2]
+            arg[(1, 0, 0)]+=0.794483216169*x[2]**o + (-0.651743563448)*x[2]
+            ref[(1, 0, 0)]+=0.794483216169*x_ref[2]**o + (-0.651743563448)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.55886994618*x[2]**o + (0.209824592021)*x[2]
+            ref[(1, 0, 1)]+=-0.55886994618*x_ref[2]**o + (0.209824592021)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.269161619783*x[2]**o + (0.440762668402)*x[2]
+            ref[(1, 0, 2)]+=-0.269161619783*x_ref[2]**o + (0.440762668402)*x_ref[2]
+            arg[(1, 0, 3)]+=0.898352032763*x[2]**o + (0.296312527554)*x[2]
+            ref[(1, 0, 3)]+=0.898352032763*x_ref[2]**o + (0.296312527554)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.598319888657*x[2]**o + (0.187509155505)*x[2]
+            ref[(1, 1, 0)]+=-0.598319888657*x_ref[2]**o + (0.187509155505)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.36189635127*x[2]**o + (0.700755782596)*x[2]
+            ref[(1, 1, 1)]+=-0.36189635127*x_ref[2]**o + (0.700755782596)*x_ref[2]
+            arg[(1, 1, 2)]+=0.379376972268*x[2]**o + (0.492073199249)*x[2]
+            ref[(1, 1, 2)]+=0.379376972268*x_ref[2]**o + (0.492073199249)*x_ref[2]
+            arg[(1, 1, 3)]+=-0.454590500559*x[2]**o + (0.662434615969)*x[2]
+            ref[(1, 1, 3)]+=-0.454590500559*x_ref[2]**o + (0.662434615969)*x_ref[2]
+            arg[(2, 0, 0)]+=0.725966796511*x[2]**o + (-0.961657527879)*x[2]
+            ref[(2, 0, 0)]+=0.725966796511*x_ref[2]**o + (-0.961657527879)*x_ref[2]
+            arg[(2, 0, 1)]+=0.0207992205665*x[2]**o + (-0.602205923878)*x[2]
+            ref[(2, 0, 1)]+=0.0207992205665*x_ref[2]**o + (-0.602205923878)*x_ref[2]
+            arg[(2, 0, 2)]+=0.968222224471*x[2]**o + (0.503274280747)*x[2]
+            ref[(2, 0, 2)]+=0.968222224471*x_ref[2]**o + (0.503274280747)*x_ref[2]
+            arg[(2, 0, 3)]+=0.515083532008*x[2]**o + (0.315555316859)*x[2]
+            ref[(2, 0, 3)]+=0.515083532008*x_ref[2]**o + (0.315555316859)*x_ref[2]
+            arg[(2, 1, 0)]+=0.493373210483*x[2]**o + (0.684572042231)*x[2]
+            ref[(2, 1, 0)]+=0.493373210483*x_ref[2]**o + (0.684572042231)*x_ref[2]
+            arg[(2, 1, 1)]+=-0.718623275656*x[2]**o + (-0.102405947448)*x[2]
+            ref[(2, 1, 1)]+=-0.718623275656*x_ref[2]**o + (-0.102405947448)*x_ref[2]
+            arg[(2, 1, 2)]+=0.789504755125*x[2]**o + (-0.995155662893)*x[2]
+            ref[(2, 1, 2)]+=0.789504755125*x_ref[2]**o + (-0.995155662893)*x_ref[2]
+            arg[(2, 1, 3)]+=0.508756392484*x[2]**o + (-0.312067476181)*x[2]
+            ref[(2, 1, 3)]+=0.508756392484*x_ref[2]**o + (-0.312067476181)*x_ref[2]
+            arg[(3, 0, 0)]+=0.88345952881*x[2]**o + (0.838816645199)*x[2]
+            ref[(3, 0, 0)]+=0.88345952881*x_ref[2]**o + (0.838816645199)*x_ref[2]
+            arg[(3, 0, 1)]+=0.368228554886*x[2]**o + (-0.202181425837)*x[2]
+            ref[(3, 0, 1)]+=0.368228554886*x_ref[2]**o + (-0.202181425837)*x_ref[2]
+            arg[(3, 0, 2)]+=-0.00753541137884*x[2]**o + (-0.440286010873)*x[2]
+            ref[(3, 0, 2)]+=-0.00753541137884*x_ref[2]**o + (-0.440286010873)*x_ref[2]
+            arg[(3, 0, 3)]+=-0.789327335512*x[2]**o + (0.509835245604)*x[2]
+            ref[(3, 0, 3)]+=-0.789327335512*x_ref[2]**o + (0.509835245604)*x_ref[2]
+            arg[(3, 1, 0)]+=0.187530098147*x[2]**o + (0.271642922457)*x[2]
+            ref[(3, 1, 0)]+=0.187530098147*x_ref[2]**o + (0.271642922457)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.051998158417*x[2]**o + (-0.979532842852)*x[2]
+            ref[(3, 1, 1)]+=-0.051998158417*x_ref[2]**o + (-0.979532842852)*x_ref[2]
+            arg[(3, 1, 2)]+=-0.914699566703*x[2]**o + (0.12121455002)*x[2]
+            ref[(3, 1, 2)]+=-0.914699566703*x_ref[2]**o + (0.12121455002)*x_ref[2]
+            arg[(3, 1, 3)]+=-0.389749220197*x[2]**o + (-0.662060592491)*x[2]
+            ref[(3, 1, 3)]+=-0.389749220197*x_ref[2]**o + (-0.662060592491)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3, 4),w)
+        ref = Data(0,(3, 3, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.644828183262*x[0]**o + (-0.809934803753)*x[0] + (0.786286212479)*x[1]**o + (-0.869614985694)*x[1]
+        ref[(0, 0, 0, 0)]=-0.644828183262*x_ref[0]**o + (-0.809934803753)*x_ref[0] + (0.786286212479)*x_ref[1]**o + (-0.869614985694)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.592083204385*x[0]**o + (0.235375866966)*x[0] + (-0.49488952266)*x[1]**o + (0.890395539746)*x[1]
+        ref[(0, 0, 0, 1)]=0.592083204385*x_ref[0]**o + (0.235375866966)*x_ref[0] + (-0.49488952266)*x_ref[1]**o + (0.890395539746)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.458029295171*x[0]**o + (-0.921244900796)*x[0] + (0.75513575239)*x[1]**o + (0.739144188853)*x[1]
+        ref[(0, 0, 0, 2)]=-0.458029295171*x_ref[0]**o + (-0.921244900796)*x_ref[0] + (0.75513575239)*x_ref[1]**o + (0.739144188853)*x_ref[1]
+        arg[(0, 0, 0, 3)]=-0.897499432582*x[0]**o + (0.648623961347)*x[0] + (0.184755360744)*x[1]**o + (0.975945127064)*x[1]
+        ref[(0, 0, 0, 3)]=-0.897499432582*x_ref[0]**o + (0.648623961347)*x_ref[0] + (0.184755360744)*x_ref[1]**o + (0.975945127064)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.983369334968*x[0]**o + (0.970092801494)*x[0] + (0.734776284931)*x[1]**o + (-0.504962789849)*x[1]
+        ref[(0, 0, 1, 0)]=-0.983369334968*x_ref[0]**o + (0.970092801494)*x_ref[0] + (0.734776284931)*x_ref[1]**o + (-0.504962789849)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.304101112239*x[0]**o + (0.434011440012)*x[0] + (0.420615855922)*x[1]**o + (-0.718855574084)*x[1]
+        ref[(0, 0, 1, 1)]=0.304101112239*x_ref[0]**o + (0.434011440012)*x_ref[0] + (0.420615855922)*x_ref[1]**o + (-0.718855574084)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.0109153709212*x[0]**o + (0.772282693438)*x[0] + (0.482687023903)*x[1]**o + (-0.918271837026)*x[1]
+        ref[(0, 0, 1, 2)]=0.0109153709212*x_ref[0]**o + (0.772282693438)*x_ref[0] + (0.482687023903)*x_ref[1]**o + (-0.918271837026)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.233890361877*x[0]**o + (-0.527350010087)*x[0] + (0.854549568349)*x[1]**o + (0.447684664129)*x[1]
+        ref[(0, 0, 1, 3)]=-0.233890361877*x_ref[0]**o + (-0.527350010087)*x_ref[0] + (0.854549568349)*x_ref[1]**o + (0.447684664129)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.319764645938*x[0]**o + (-0.871959351682)*x[0] + (-0.625754582723)*x[1]**o + (-0.862011116313)*x[1]
+        ref[(0, 0, 2, 0)]=-0.319764645938*x_ref[0]**o + (-0.871959351682)*x_ref[0] + (-0.625754582723)*x_ref[1]**o + (-0.862011116313)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.840089668399*x[0]**o + (0.995890124261)*x[0] + (-0.767682269242)*x[1]**o + (-0.637009895164)*x[1]
+        ref[(0, 0, 2, 1)]=0.840089668399*x_ref[0]**o + (0.995890124261)*x_ref[0] + (-0.767682269242)*x_ref[1]**o + (-0.637009895164)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.828599554832*x[0]**o + (-0.377559875772)*x[0] + (0.88497608627)*x[1]**o + (-0.764498400023)*x[1]
+        ref[(0, 0, 2, 2)]=-0.828599554832*x_ref[0]**o + (-0.377559875772)*x_ref[0] + (0.88497608627)*x_ref[1]**o + (-0.764498400023)*x_ref[1]
+        arg[(0, 0, 2, 3)]=0.914889444281*x[0]**o + (-0.275005805216)*x[0] + (-0.835632711922)*x[1]**o + (0.237133691021)*x[1]
+        ref[(0, 0, 2, 3)]=0.914889444281*x_ref[0]**o + (-0.275005805216)*x_ref[0] + (-0.835632711922)*x_ref[1]**o + (0.237133691021)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.875018722305*x[0]**o + (0.11569662944)*x[0] + (-0.976137321067)*x[1]**o + (-0.428548509751)*x[1]
+        ref[(0, 1, 0, 0)]=0.875018722305*x_ref[0]**o + (0.11569662944)*x_ref[0] + (-0.976137321067)*x_ref[1]**o + (-0.428548509751)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.58789101298*x[0]**o + (0.663822386437)*x[0] + (-0.116178839071)*x[1]**o + (-0.273885108152)*x[1]
+        ref[(0, 1, 0, 1)]=0.58789101298*x_ref[0]**o + (0.663822386437)*x_ref[0] + (-0.116178839071)*x_ref[1]**o + (-0.273885108152)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.928667297469*x[0]**o + (-0.956356003173)*x[0] + (0.555743133445)*x[1]**o + (0.0651129241764)*x[1]
+        ref[(0, 1, 0, 2)]=-0.928667297469*x_ref[0]**o + (-0.956356003173)*x_ref[0] + (0.555743133445)*x_ref[1]**o + (0.0651129241764)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.39693486426*x[0]**o + (-0.550303151431)*x[0] + (-0.571799953412)*x[1]**o + (0.0443287716089)*x[1]
+        ref[(0, 1, 0, 3)]=0.39693486426*x_ref[0]**o + (-0.550303151431)*x_ref[0] + (-0.571799953412)*x_ref[1]**o + (0.0443287716089)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.899880400835*x[0]**o + (-0.678945849293)*x[0] + (-0.902569483056)*x[1]**o + (-0.170436182435)*x[1]
+        ref[(0, 1, 1, 0)]=-0.899880400835*x_ref[0]**o + (-0.678945849293)*x_ref[0] + (-0.902569483056)*x_ref[1]**o + (-0.170436182435)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.501501235902*x[0]**o + (0.917785249455)*x[0] + (0.566260256204)*x[1]**o + (0.388913360073)*x[1]
+        ref[(0, 1, 1, 1)]=-0.501501235902*x_ref[0]**o + (0.917785249455)*x_ref[0] + (0.566260256204)*x_ref[1]**o + (0.388913360073)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.708785591877*x[0]**o + (0.914525033071)*x[0] + (0.970825245901)*x[1]**o + (-0.203514470016)*x[1]
+        ref[(0, 1, 1, 2)]=-0.708785591877*x_ref[0]**o + (0.914525033071)*x_ref[0] + (0.970825245901)*x_ref[1]**o + (-0.203514470016)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.571413299367*x[0]**o + (-0.422093271199)*x[0] + (-0.644409745619)*x[1]**o + (0.620709258238)*x[1]
+        ref[(0, 1, 1, 3)]=-0.571413299367*x_ref[0]**o + (-0.422093271199)*x_ref[0] + (-0.644409745619)*x_ref[1]**o + (0.620709258238)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.477472302922*x[0]**o + (0.0286982283061)*x[0] + (-0.101330894194)*x[1]**o + (0.344589188069)*x[1]
+        ref[(0, 1, 2, 0)]=0.477472302922*x_ref[0]**o + (0.0286982283061)*x_ref[0] + (-0.101330894194)*x_ref[1]**o + (0.344589188069)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.180599859685*x[0]**o + (0.160160090701)*x[0] + (-0.651136945151)*x[1]**o + (-0.939788621829)*x[1]
+        ref[(0, 1, 2, 1)]=-0.180599859685*x_ref[0]**o + (0.160160090701)*x_ref[0] + (-0.651136945151)*x_ref[1]**o + (-0.939788621829)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.0720817889*x[0]**o + (0.299885673922)*x[0] + (-0.433490515501)*x[1]**o + (0.4910447983)*x[1]
+        ref[(0, 1, 2, 2)]=-0.0720817889*x_ref[0]**o + (0.299885673922)*x_ref[0] + (-0.433490515501)*x_ref[1]**o + (0.4910447983)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.849376127601*x[0]**o + (-0.413616241542)*x[0] + (-0.0958226839455)*x[1]**o + (0.418135839742)*x[1]
+        ref[(0, 1, 2, 3)]=-0.849376127601*x_ref[0]**o + (-0.413616241542)*x_ref[0] + (-0.0958226839455)*x_ref[1]**o + (0.418135839742)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.764110158323*x[0]**o + (-0.00946615543572)*x[0] + (0.91551941726)*x[1]**o + (-0.198002812864)*x[1]
+        ref[(0, 2, 0, 0)]=-0.764110158323*x_ref[0]**o + (-0.00946615543572)*x_ref[0] + (0.91551941726)*x_ref[1]**o + (-0.198002812864)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.376208425156*x[0]**o + (0.190317362564)*x[0] + (-0.402476363368)*x[1]**o + (0.355256850146)*x[1]
+        ref[(0, 2, 0, 1)]=-0.376208425156*x_ref[0]**o + (0.190317362564)*x_ref[0] + (-0.402476363368)*x_ref[1]**o + (0.355256850146)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.275377897089*x[0]**o + (-0.340124368332)*x[0] + (0.511777835838)*x[1]**o + (0.795147221216)*x[1]
+        ref[(0, 2, 0, 2)]=0.275377897089*x_ref[0]**o + (-0.340124368332)*x_ref[0] + (0.511777835838)*x_ref[1]**o + (0.795147221216)*x_ref[1]
+        arg[(0, 2, 0, 3)]=0.616476317488*x[0]**o + (0.128378005267)*x[0] + (-0.467065481862)*x[1]**o + (-0.753426818178)*x[1]
+        ref[(0, 2, 0, 3)]=0.616476317488*x_ref[0]**o + (0.128378005267)*x_ref[0] + (-0.467065481862)*x_ref[1]**o + (-0.753426818178)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.257412837693*x[0]**o + (-0.757424748645)*x[0] + (0.270162820587)*x[1]**o + (-0.572278023646)*x[1]
+        ref[(0, 2, 1, 0)]=0.257412837693*x_ref[0]**o + (-0.757424748645)*x_ref[0] + (0.270162820587)*x_ref[1]**o + (-0.572278023646)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.335336893911*x[0]**o + (0.573968288592)*x[0] + (-0.826058516788)*x[1]**o + (0.654372644109)*x[1]
+        ref[(0, 2, 1, 1)]=0.335336893911*x_ref[0]**o + (0.573968288592)*x_ref[0] + (-0.826058516788)*x_ref[1]**o + (0.654372644109)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.595113687635*x[0]**o + (-0.861267696085)*x[0] + (0.931616789723)*x[1]**o + (0.392146389411)*x[1]
+        ref[(0, 2, 1, 2)]=0.595113687635*x_ref[0]**o + (-0.861267696085)*x_ref[0] + (0.931616789723)*x_ref[1]**o + (0.392146389411)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.87801737948*x[0]**o + (0.596195107198)*x[0] + (-0.466856436506)*x[1]**o + (-0.695500850062)*x[1]
+        ref[(0, 2, 1, 3)]=0.87801737948*x_ref[0]**o + (0.596195107198)*x_ref[0] + (-0.466856436506)*x_ref[1]**o + (-0.695500850062)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.243485197205*x[0]**o + (-0.89833958753)*x[0] + (-0.649053815639)*x[1]**o + (0.419584014073)*x[1]
+        ref[(0, 2, 2, 0)]=-0.243485197205*x_ref[0]**o + (-0.89833958753)*x_ref[0] + (-0.649053815639)*x_ref[1]**o + (0.419584014073)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.785180145414*x[0]**o + (0.187461618442)*x[0] + (-0.763341749922)*x[1]**o + (0.973185612995)*x[1]
+        ref[(0, 2, 2, 1)]=-0.785180145414*x_ref[0]**o + (0.187461618442)*x_ref[0] + (-0.763341749922)*x_ref[1]**o + (0.973185612995)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.981802087032*x[0]**o + (0.237874388529)*x[0] + (0.878373724535)*x[1]**o + (0.151918225141)*x[1]
+        ref[(0, 2, 2, 2)]=-0.981802087032*x_ref[0]**o + (0.237874388529)*x_ref[0] + (0.878373724535)*x_ref[1]**o + (0.151918225141)*x_ref[1]
+        arg[(0, 2, 2, 3)]=-0.0677131675292*x[0]**o + (0.995580152737)*x[0] + (-0.235955373056)*x[1]**o + (0.42262679141)*x[1]
+        ref[(0, 2, 2, 3)]=-0.0677131675292*x_ref[0]**o + (0.995580152737)*x_ref[0] + (-0.235955373056)*x_ref[1]**o + (0.42262679141)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.698562917413*x[0]**o + (0.580387598765)*x[0] + (0.653980639808)*x[1]**o + (0.085940430819)*x[1]
+        ref[(1, 0, 0, 0)]=-0.698562917413*x_ref[0]**o + (0.580387598765)*x_ref[0] + (0.653980639808)*x_ref[1]**o + (0.085940430819)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.894775842985*x[0]**o + (0.613011031946)*x[0] + (-0.151966183071)*x[1]**o + (-0.59895321342)*x[1]
+        ref[(1, 0, 0, 1)]=-0.894775842985*x_ref[0]**o + (0.613011031946)*x_ref[0] + (-0.151966183071)*x_ref[1]**o + (-0.59895321342)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.804586113894*x[0]**o + (0.519178927413)*x[0] + (-0.639799575293)*x[1]**o + (0.285070322676)*x[1]
+        ref[(1, 0, 0, 2)]=-0.804586113894*x_ref[0]**o + (0.519178927413)*x_ref[0] + (-0.639799575293)*x_ref[1]**o + (0.285070322676)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.0813093549451*x[0]**o + (-0.883252213008)*x[0] + (0.878883241967)*x[1]**o + (0.131254314935)*x[1]
+        ref[(1, 0, 0, 3)]=-0.0813093549451*x_ref[0]**o + (-0.883252213008)*x_ref[0] + (0.878883241967)*x_ref[1]**o + (0.131254314935)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.0864383918989*x[0]**o + (-0.436699388099)*x[0] + (0.71545099536)*x[1]**o + (-0.0558189338224)*x[1]
+        ref[(1, 0, 1, 0)]=-0.0864383918989*x_ref[0]**o + (-0.436699388099)*x_ref[0] + (0.71545099536)*x_ref[1]**o + (-0.0558189338224)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.529040952352*x[0]**o + (-0.986913693758)*x[0] + (-0.0798475126545)*x[1]**o + (0.415403322089)*x[1]
+        ref[(1, 0, 1, 1)]=-0.529040952352*x_ref[0]**o + (-0.986913693758)*x_ref[0] + (-0.0798475126545)*x_ref[1]**o + (0.415403322089)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.594671195813*x[0]**o + (-0.991901688729)*x[0] + (-0.873874266962)*x[1]**o + (-0.0807291026568)*x[1]
+        ref[(1, 0, 1, 2)]=0.594671195813*x_ref[0]**o + (-0.991901688729)*x_ref[0] + (-0.873874266962)*x_ref[1]**o + (-0.0807291026568)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.702902698095*x[0]**o + (0.294763064094)*x[0] + (0.251096834457)*x[1]**o + (-0.815541373764)*x[1]
+        ref[(1, 0, 1, 3)]=0.702902698095*x_ref[0]**o + (0.294763064094)*x_ref[0] + (0.251096834457)*x_ref[1]**o + (-0.815541373764)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.95426768277*x[0]**o + (-0.833175654586)*x[0] + (-0.910937358047)*x[1]**o + (-0.48000937278)*x[1]
+        ref[(1, 0, 2, 0)]=0.95426768277*x_ref[0]**o + (-0.833175654586)*x_ref[0] + (-0.910937358047)*x_ref[1]**o + (-0.48000937278)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.23329882386*x[0]**o + (0.469766102611)*x[0] + (0.141727027939)*x[1]**o + (0.362187539158)*x[1]
+        ref[(1, 0, 2, 1)]=0.23329882386*x_ref[0]**o + (0.469766102611)*x_ref[0] + (0.141727027939)*x_ref[1]**o + (0.362187539158)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.555141078216*x[0]**o + (-0.30139842896)*x[0] + (0.0387607094402)*x[1]**o + (-0.934590960551)*x[1]
+        ref[(1, 0, 2, 2)]=-0.555141078216*x_ref[0]**o + (-0.30139842896)*x_ref[0] + (0.0387607094402)*x_ref[1]**o + (-0.934590960551)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.535367336783*x[0]**o + (-0.0467282933903)*x[0] + (0.741110911073)*x[1]**o + (0.341147467029)*x[1]
+        ref[(1, 0, 2, 3)]=-0.535367336783*x_ref[0]**o + (-0.0467282933903)*x_ref[0] + (0.741110911073)*x_ref[1]**o + (0.341147467029)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.186604004189*x[0]**o + (-0.536932843925)*x[0] + (0.362898765386)*x[1]**o + (0.882887590747)*x[1]
+        ref[(1, 1, 0, 0)]=-0.186604004189*x_ref[0]**o + (-0.536932843925)*x_ref[0] + (0.362898765386)*x_ref[1]**o + (0.882887590747)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.735863589614*x[0]**o + (-0.428628894932)*x[0] + (-0.690656945664)*x[1]**o + (0.035992087563)*x[1]
+        ref[(1, 1, 0, 1)]=0.735863589614*x_ref[0]**o + (-0.428628894932)*x_ref[0] + (-0.690656945664)*x_ref[1]**o + (0.035992087563)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.809047919924*x[0]**o + (-0.0762314296643)*x[0] + (0.420578904293)*x[1]**o + (-0.122400653316)*x[1]
+        ref[(1, 1, 0, 2)]=0.809047919924*x_ref[0]**o + (-0.0762314296643)*x_ref[0] + (0.420578904293)*x_ref[1]**o + (-0.122400653316)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.461941627573*x[0]**o + (0.400104056471)*x[0] + (0.720950573266)*x[1]**o + (-0.186382854999)*x[1]
+        ref[(1, 1, 0, 3)]=0.461941627573*x_ref[0]**o + (0.400104056471)*x_ref[0] + (0.720950573266)*x_ref[1]**o + (-0.186382854999)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.938097486989*x[0]**o + (-0.299891544195)*x[0] + (0.552117866419)*x[1]**o + (0.446815584424)*x[1]
+        ref[(1, 1, 1, 0)]=-0.938097486989*x_ref[0]**o + (-0.299891544195)*x_ref[0] + (0.552117866419)*x_ref[1]**o + (0.446815584424)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.799879854947*x[0]**o + (-0.32379388213)*x[0] + (0.530525917828)*x[1]**o + (0.402055762825)*x[1]
+        ref[(1, 1, 1, 1)]=0.799879854947*x_ref[0]**o + (-0.32379388213)*x_ref[0] + (0.530525917828)*x_ref[1]**o + (0.402055762825)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.818590347909*x[0]**o + (-0.657542011944)*x[0] + (-0.2720900734)*x[1]**o + (0.114101764307)*x[1]
+        ref[(1, 1, 1, 2)]=0.818590347909*x_ref[0]**o + (-0.657542011944)*x_ref[0] + (-0.2720900734)*x_ref[1]**o + (0.114101764307)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.576872148615*x[0]**o + (-0.459777000951)*x[0] + (0.565108845074)*x[1]**o + (-0.0917030709358)*x[1]
+        ref[(1, 1, 1, 3)]=0.576872148615*x_ref[0]**o + (-0.459777000951)*x_ref[0] + (0.565108845074)*x_ref[1]**o + (-0.0917030709358)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.241888668549*x[0]**o + (-0.295035556138)*x[0] + (-0.504933927011)*x[1]**o + (0.763443159228)*x[1]
+        ref[(1, 1, 2, 0)]=-0.241888668549*x_ref[0]**o + (-0.295035556138)*x_ref[0] + (-0.504933927011)*x_ref[1]**o + (0.763443159228)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.657196875365*x[0]**o + (0.993025887855)*x[0] + (-0.579593041292)*x[1]**o + (0.00939984749471)*x[1]
+        ref[(1, 1, 2, 1)]=-0.657196875365*x_ref[0]**o + (0.993025887855)*x_ref[0] + (-0.579593041292)*x_ref[1]**o + (0.00939984749471)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.790019969914*x[0]**o + (0.377131220405)*x[0] + (0.0317031497237)*x[1]**o + (-0.13222304966)*x[1]
+        ref[(1, 1, 2, 2)]=-0.790019969914*x_ref[0]**o + (0.377131220405)*x_ref[0] + (0.0317031497237)*x_ref[1]**o + (-0.13222304966)*x_ref[1]
+        arg[(1, 1, 2, 3)]=0.835565933835*x[0]**o + (0.633166122503)*x[0] + (0.943002819404)*x[1]**o + (-0.299889145736)*x[1]
+        ref[(1, 1, 2, 3)]=0.835565933835*x_ref[0]**o + (0.633166122503)*x_ref[0] + (0.943002819404)*x_ref[1]**o + (-0.299889145736)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.645376482657*x[0]**o + (0.753508576098)*x[0] + (-0.0790448883388)*x[1]**o + (0.793757032952)*x[1]
+        ref[(1, 2, 0, 0)]=0.645376482657*x_ref[0]**o + (0.753508576098)*x_ref[0] + (-0.0790448883388)*x_ref[1]**o + (0.793757032952)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.724759422085*x[0]**o + (-0.0511447741378)*x[0] + (0.514825761353)*x[1]**o + (0.977873560511)*x[1]
+        ref[(1, 2, 0, 1)]=0.724759422085*x_ref[0]**o + (-0.0511447741378)*x_ref[0] + (0.514825761353)*x_ref[1]**o + (0.977873560511)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.225660165966*x[0]**o + (0.95958346279)*x[0] + (-0.104461038434)*x[1]**o + (-0.511862006015)*x[1]
+        ref[(1, 2, 0, 2)]=0.225660165966*x_ref[0]**o + (0.95958346279)*x_ref[0] + (-0.104461038434)*x_ref[1]**o + (-0.511862006015)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.865243751245*x[0]**o + (-0.916318272067)*x[0] + (-0.262311323456)*x[1]**o + (-0.605587462748)*x[1]
+        ref[(1, 2, 0, 3)]=0.865243751245*x_ref[0]**o + (-0.916318272067)*x_ref[0] + (-0.262311323456)*x_ref[1]**o + (-0.605587462748)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.352942108766*x[0]**o + (-0.0511768587638)*x[0] + (-0.77588898598)*x[1]**o + (0.318733323385)*x[1]
+        ref[(1, 2, 1, 0)]=0.352942108766*x_ref[0]**o + (-0.0511768587638)*x_ref[0] + (-0.77588898598)*x_ref[1]**o + (0.318733323385)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.912032967171*x[0]**o + (0.267474345452)*x[0] + (-0.73616193201)*x[1]**o + (0.136108834265)*x[1]
+        ref[(1, 2, 1, 1)]=-0.912032967171*x_ref[0]**o + (0.267474345452)*x_ref[0] + (-0.73616193201)*x_ref[1]**o + (0.136108834265)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.0111793508271*x[0]**o + (-0.978581108018)*x[0] + (-0.981560784171)*x[1]**o + (-0.203733245842)*x[1]
+        ref[(1, 2, 1, 2)]=0.0111793508271*x_ref[0]**o + (-0.978581108018)*x_ref[0] + (-0.981560784171)*x_ref[1]**o + (-0.203733245842)*x_ref[1]
+        arg[(1, 2, 1, 3)]=0.335986881306*x[0]**o + (-0.867996317898)*x[0] + (0.0294011901281)*x[1]**o + (-0.972836786195)*x[1]
+        ref[(1, 2, 1, 3)]=0.335986881306*x_ref[0]**o + (-0.867996317898)*x_ref[0] + (0.0294011901281)*x_ref[1]**o + (-0.972836786195)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.658557682196*x[0]**o + (0.057716216817)*x[0] + (-0.855635469788)*x[1]**o + (-0.555529014014)*x[1]
+        ref[(1, 2, 2, 0)]=-0.658557682196*x_ref[0]**o + (0.057716216817)*x_ref[0] + (-0.855635469788)*x_ref[1]**o + (-0.555529014014)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.508843423044*x[0]**o + (-0.502473048014)*x[0] + (-0.819772357809)*x[1]**o + (0.120392714661)*x[1]
+        ref[(1, 2, 2, 1)]=0.508843423044*x_ref[0]**o + (-0.502473048014)*x_ref[0] + (-0.819772357809)*x_ref[1]**o + (0.120392714661)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.455484285214*x[0]**o + (-0.309412381202)*x[0] + (-0.286029982407)*x[1]**o + (0.462899810002)*x[1]
+        ref[(1, 2, 2, 2)]=-0.455484285214*x_ref[0]**o + (-0.309412381202)*x_ref[0] + (-0.286029982407)*x_ref[1]**o + (0.462899810002)*x_ref[1]
+        arg[(1, 2, 2, 3)]=-0.265742126754*x[0]**o + (-0.883071355904)*x[0] + (0.388946739813)*x[1]**o + (0.234979846535)*x[1]
+        ref[(1, 2, 2, 3)]=-0.265742126754*x_ref[0]**o + (-0.883071355904)*x_ref[0] + (0.388946739813)*x_ref[1]**o + (0.234979846535)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.207533765792*x[0]**o + (-0.992565601662)*x[0] + (0.572664573762)*x[1]**o + (-0.484664005148)*x[1]
+        ref[(2, 0, 0, 0)]=-0.207533765792*x_ref[0]**o + (-0.992565601662)*x_ref[0] + (0.572664573762)*x_ref[1]**o + (-0.484664005148)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.0219318102172*x[0]**o + (0.79249987167)*x[0] + (0.382266081125)*x[1]**o + (0.0728920902836)*x[1]
+        ref[(2, 0, 0, 1)]=-0.0219318102172*x_ref[0]**o + (0.79249987167)*x_ref[0] + (0.382266081125)*x_ref[1]**o + (0.0728920902836)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.2004128604*x[0]**o + (0.72560148044)*x[0] + (-0.497568845583)*x[1]**o + (-0.32894470302)*x[1]
+        ref[(2, 0, 0, 2)]=-0.2004128604*x_ref[0]**o + (0.72560148044)*x_ref[0] + (-0.497568845583)*x_ref[1]**o + (-0.32894470302)*x_ref[1]
+        arg[(2, 0, 0, 3)]=0.50081138518*x[0]**o + (-0.603713264972)*x[0] + (0.121180907037)*x[1]**o + (-0.293842611708)*x[1]
+        ref[(2, 0, 0, 3)]=0.50081138518*x_ref[0]**o + (-0.603713264972)*x_ref[0] + (0.121180907037)*x_ref[1]**o + (-0.293842611708)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.0322451990038*x[0]**o + (0.928067164874)*x[0] + (-0.698667891487)*x[1]**o + (0.394332928759)*x[1]
+        ref[(2, 0, 1, 0)]=0.0322451990038*x_ref[0]**o + (0.928067164874)*x_ref[0] + (-0.698667891487)*x_ref[1]**o + (0.394332928759)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.285163460119*x[0]**o + (0.0367941530379)*x[0] + (0.806386701399)*x[1]**o + (0.318979829797)*x[1]
+        ref[(2, 0, 1, 1)]=0.285163460119*x_ref[0]**o + (0.0367941530379)*x_ref[0] + (0.806386701399)*x_ref[1]**o + (0.318979829797)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.743138165445*x[0]**o + (-0.781402176412)*x[0] + (0.143451414718)*x[1]**o + (0.453331514639)*x[1]
+        ref[(2, 0, 1, 2)]=0.743138165445*x_ref[0]**o + (-0.781402176412)*x_ref[0] + (0.143451414718)*x_ref[1]**o + (0.453331514639)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.642450006208*x[0]**o + (0.513597745247)*x[0] + (0.730898449419)*x[1]**o + (-0.995371212521)*x[1]
+        ref[(2, 0, 1, 3)]=0.642450006208*x_ref[0]**o + (0.513597745247)*x_ref[0] + (0.730898449419)*x_ref[1]**o + (-0.995371212521)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.221799780045*x[0]**o + (0.263151971088)*x[0] + (0.540930043865)*x[1]**o + (0.586031287578)*x[1]
+        ref[(2, 0, 2, 0)]=-0.221799780045*x_ref[0]**o + (0.263151971088)*x_ref[0] + (0.540930043865)*x_ref[1]**o + (0.586031287578)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.712383214067*x[0]**o + (0.640976985339)*x[0] + (-0.155347382416)*x[1]**o + (-0.828737811162)*x[1]
+        ref[(2, 0, 2, 1)]=0.712383214067*x_ref[0]**o + (0.640976985339)*x_ref[0] + (-0.155347382416)*x_ref[1]**o + (-0.828737811162)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.37720284039*x[0]**o + (-0.383837386084)*x[0] + (-0.669405011721)*x[1]**o + (-0.113621045962)*x[1]
+        ref[(2, 0, 2, 2)]=0.37720284039*x_ref[0]**o + (-0.383837386084)*x_ref[0] + (-0.669405011721)*x_ref[1]**o + (-0.113621045962)*x_ref[1]
+        arg[(2, 0, 2, 3)]=0.917384026059*x[0]**o + (0.239495670184)*x[0] + (-0.807961614145)*x[1]**o + (-0.656450773902)*x[1]
+        ref[(2, 0, 2, 3)]=0.917384026059*x_ref[0]**o + (0.239495670184)*x_ref[0] + (-0.807961614145)*x_ref[1]**o + (-0.656450773902)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.989115691116*x[0]**o + (0.987333357437)*x[0] + (0.538110228931)*x[1]**o + (0.081179150734)*x[1]
+        ref[(2, 1, 0, 0)]=0.989115691116*x_ref[0]**o + (0.987333357437)*x_ref[0] + (0.538110228931)*x_ref[1]**o + (0.081179150734)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.213598105552*x[0]**o + (0.00637847740337)*x[0] + (-0.860985690724)*x[1]**o + (-0.456157640163)*x[1]
+        ref[(2, 1, 0, 1)]=-0.213598105552*x_ref[0]**o + (0.00637847740337)*x_ref[0] + (-0.860985690724)*x_ref[1]**o + (-0.456157640163)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.814481486326*x[0]**o + (-0.116277951097)*x[0] + (-0.511483689988)*x[1]**o + (-0.186598025566)*x[1]
+        ref[(2, 1, 0, 2)]=-0.814481486326*x_ref[0]**o + (-0.116277951097)*x_ref[0] + (-0.511483689988)*x_ref[1]**o + (-0.186598025566)*x_ref[1]
+        arg[(2, 1, 0, 3)]=0.184238037529*x[0]**o + (0.170297905484)*x[0] + (0.494716647205)*x[1]**o + (-0.462052873465)*x[1]
+        ref[(2, 1, 0, 3)]=0.184238037529*x_ref[0]**o + (0.170297905484)*x_ref[0] + (0.494716647205)*x_ref[1]**o + (-0.462052873465)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.556979101032*x[0]**o + (0.789836086959)*x[0] + (0.391727714481)*x[1]**o + (-0.949133009503)*x[1]
+        ref[(2, 1, 1, 0)]=0.556979101032*x_ref[0]**o + (0.789836086959)*x_ref[0] + (0.391727714481)*x_ref[1]**o + (-0.949133009503)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.498611208044*x[0]**o + (0.648545280784)*x[0] + (-0.565305109306)*x[1]**o + (-0.644565465524)*x[1]
+        ref[(2, 1, 1, 1)]=0.498611208044*x_ref[0]**o + (0.648545280784)*x_ref[0] + (-0.565305109306)*x_ref[1]**o + (-0.644565465524)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.754944504481*x[0]**o + (-0.179471887121)*x[0] + (-0.488680517814)*x[1]**o + (-0.546097851958)*x[1]
+        ref[(2, 1, 1, 2)]=-0.754944504481*x_ref[0]**o + (-0.179471887121)*x_ref[0] + (-0.488680517814)*x_ref[1]**o + (-0.546097851958)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.910495565931*x[0]**o + (-0.965812389502)*x[0] + (-0.0114766000892)*x[1]**o + (0.73865163607)*x[1]
+        ref[(2, 1, 1, 3)]=-0.910495565931*x_ref[0]**o + (-0.965812389502)*x_ref[0] + (-0.0114766000892)*x_ref[1]**o + (0.73865163607)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.58977278162*x[0]**o + (0.54576787099)*x[0] + (-0.613328531785)*x[1]**o + (0.462145466049)*x[1]
+        ref[(2, 1, 2, 0)]=-0.58977278162*x_ref[0]**o + (0.54576787099)*x_ref[0] + (-0.613328531785)*x_ref[1]**o + (0.462145466049)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.12546175864*x[0]**o + (-0.800746687713)*x[0] + (-0.295804424798)*x[1]**o + (-0.0940228194073)*x[1]
+        ref[(2, 1, 2, 1)]=0.12546175864*x_ref[0]**o + (-0.800746687713)*x_ref[0] + (-0.295804424798)*x_ref[1]**o + (-0.0940228194073)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.722168099977*x[0]**o + (0.922719407621)*x[0] + (-0.798452464821)*x[1]**o + (-0.801138088625)*x[1]
+        ref[(2, 1, 2, 2)]=0.722168099977*x_ref[0]**o + (0.922719407621)*x_ref[0] + (-0.798452464821)*x_ref[1]**o + (-0.801138088625)*x_ref[1]
+        arg[(2, 1, 2, 3)]=-0.558200971915*x[0]**o + (0.971339068763)*x[0] + (-0.0716232404512)*x[1]**o + (0.104032536715)*x[1]
+        ref[(2, 1, 2, 3)]=-0.558200971915*x_ref[0]**o + (0.971339068763)*x_ref[0] + (-0.0716232404512)*x_ref[1]**o + (0.104032536715)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.485854013514*x[0]**o + (-0.438721114661)*x[0] + (-0.972037116173)*x[1]**o + (-0.609666821114)*x[1]
+        ref[(2, 2, 0, 0)]=0.485854013514*x_ref[0]**o + (-0.438721114661)*x_ref[0] + (-0.972037116173)*x_ref[1]**o + (-0.609666821114)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.564334534684*x[0]**o + (0.354185308657)*x[0] + (-0.738353614529)*x[1]**o + (0.893584757767)*x[1]
+        ref[(2, 2, 0, 1)]=0.564334534684*x_ref[0]**o + (0.354185308657)*x_ref[0] + (-0.738353614529)*x_ref[1]**o + (0.893584757767)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.602180823903*x[0]**o + (-0.101277317427)*x[0] + (0.461212079106)*x[1]**o + (0.238155549968)*x[1]
+        ref[(2, 2, 0, 2)]=0.602180823903*x_ref[0]**o + (-0.101277317427)*x_ref[0] + (0.461212079106)*x_ref[1]**o + (0.238155549968)*x_ref[1]
+        arg[(2, 2, 0, 3)]=0.526366324516*x[0]**o + (0.917670343206)*x[0] + (-0.505608573255)*x[1]**o + (0.0492645380449)*x[1]
+        ref[(2, 2, 0, 3)]=0.526366324516*x_ref[0]**o + (0.917670343206)*x_ref[0] + (-0.505608573255)*x_ref[1]**o + (0.0492645380449)*x_ref[1]
+        arg[(2, 2, 1, 0)]=0.393759816923*x[0]**o + (-0.320621175468)*x[0] + (-0.0623841210887)*x[1]**o + (0.920542609883)*x[1]
+        ref[(2, 2, 1, 0)]=0.393759816923*x_ref[0]**o + (-0.320621175468)*x_ref[0] + (-0.0623841210887)*x_ref[1]**o + (0.920542609883)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.50785238765*x[0]**o + (-0.742332112055)*x[0] + (-0.737869296702)*x[1]**o + (0.300951530487)*x[1]
+        ref[(2, 2, 1, 1)]=-0.50785238765*x_ref[0]**o + (-0.742332112055)*x_ref[0] + (-0.737869296702)*x_ref[1]**o + (0.300951530487)*x_ref[1]
+        arg[(2, 2, 1, 2)]=0.205956253901*x[0]**o + (-0.0766070336236)*x[0] + (0.432154062418)*x[1]**o + (0.0466047852772)*x[1]
+        ref[(2, 2, 1, 2)]=0.205956253901*x_ref[0]**o + (-0.0766070336236)*x_ref[0] + (0.432154062418)*x_ref[1]**o + (0.0466047852772)*x_ref[1]
+        arg[(2, 2, 1, 3)]=0.632932568882*x[0]**o + (0.427968425165)*x[0] + (0.0336759108651)*x[1]**o + (-0.512914719815)*x[1]
+        ref[(2, 2, 1, 3)]=0.632932568882*x_ref[0]**o + (0.427968425165)*x_ref[0] + (0.0336759108651)*x_ref[1]**o + (-0.512914719815)*x_ref[1]
+        arg[(2, 2, 2, 0)]=0.611570985212*x[0]**o + (0.317735418047)*x[0] + (-0.796471362877)*x[1]**o + (0.825765295112)*x[1]
+        ref[(2, 2, 2, 0)]=0.611570985212*x_ref[0]**o + (0.317735418047)*x_ref[0] + (-0.796471362877)*x_ref[1]**o + (0.825765295112)*x_ref[1]
+        arg[(2, 2, 2, 1)]=-0.420734039677*x[0]**o + (0.795680753144)*x[0] + (-0.697543282115)*x[1]**o + (0.3486965505)*x[1]
+        ref[(2, 2, 2, 1)]=-0.420734039677*x_ref[0]**o + (0.795680753144)*x_ref[0] + (-0.697543282115)*x_ref[1]**o + (0.3486965505)*x_ref[1]
+        arg[(2, 2, 2, 2)]=-0.0119187908739*x[0]**o + (-0.126391070276)*x[0] + (-0.0139069227407)*x[1]**o + (0.625918580085)*x[1]
+        ref[(2, 2, 2, 2)]=-0.0119187908739*x_ref[0]**o + (-0.126391070276)*x_ref[0] + (-0.0139069227407)*x_ref[1]**o + (0.625918580085)*x_ref[1]
+        arg[(2, 2, 2, 3)]=0.880709663276*x[0]**o + (-0.71833138778)*x[0] + (-0.639623980587)*x[1]**o + (-0.690725301341)*x[1]
+        ref[(2, 2, 2, 3)]=0.880709663276*x_ref[0]**o + (-0.71833138778)*x_ref[0] + (-0.639623980587)*x_ref[1]**o + (-0.690725301341)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.310785987477*x[2]**o + (0.704892670569)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.310785987477*x_ref[2]**o + (0.704892670569)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.4119263626*x[2]**o + (0.33407259711)*x[2]
+            ref[(0, 0, 0, 1)]+=0.4119263626*x_ref[2]**o + (0.33407259711)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.500195934692*x[2]**o + (0.361135957176)*x[2]
+            ref[(0, 0, 0, 2)]+=0.500195934692*x_ref[2]**o + (0.361135957176)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.937709975472*x[2]**o + (0.771671536014)*x[2]
+            ref[(0, 0, 0, 3)]+=0.937709975472*x_ref[2]**o + (0.771671536014)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.928049491903*x[2]**o + (-0.289113011636)*x[2]
+            ref[(0, 0, 1, 0)]+=0.928049491903*x_ref[2]**o + (-0.289113011636)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.543107156651*x[2]**o + (-0.890718118538)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.543107156651*x_ref[2]**o + (-0.890718118538)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.675557481881*x[2]**o + (-0.463631128687)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.675557481881*x_ref[2]**o + (-0.463631128687)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.0416674941712*x[2]**o + (0.888668219372)*x[2]
+            ref[(0, 0, 1, 3)]+=0.0416674941712*x_ref[2]**o + (0.888668219372)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.308472989234*x[2]**o + (0.349661480648)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.308472989234*x_ref[2]**o + (0.349661480648)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.247216917472*x[2]**o + (0.757769596069)*x[2]
+            ref[(0, 0, 2, 1)]+=0.247216917472*x_ref[2]**o + (0.757769596069)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.324458465967*x[2]**o + (0.517457904025)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.324458465967*x_ref[2]**o + (0.517457904025)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=0.909466692904*x[2]**o + (-0.85448966025)*x[2]
+            ref[(0, 0, 2, 3)]+=0.909466692904*x_ref[2]**o + (-0.85448966025)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.213863627737*x[2]**o + (-0.688298136175)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.213863627737*x_ref[2]**o + (-0.688298136175)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.547995922057*x[2]**o + (0.534532530599)*x[2]
+            ref[(0, 1, 0, 1)]+=0.547995922057*x_ref[2]**o + (0.534532530599)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.491300307791*x[2]**o + (-0.590811624932)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.491300307791*x_ref[2]**o + (-0.590811624932)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.751822528218*x[2]**o + (0.533698590344)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.751822528218*x_ref[2]**o + (0.533698590344)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.249748119861*x[2]**o + (-0.0247214753669)*x[2]
+            ref[(0, 1, 1, 0)]+=0.249748119861*x_ref[2]**o + (-0.0247214753669)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.0857894515099*x[2]**o + (-0.411156626318)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.0857894515099*x_ref[2]**o + (-0.411156626318)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.788002441704*x[2]**o + (-0.424352858879)*x[2]
+            ref[(0, 1, 1, 2)]+=0.788002441704*x_ref[2]**o + (-0.424352858879)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.279531702463*x[2]**o + (-0.271030302861)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.279531702463*x_ref[2]**o + (-0.271030302861)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.944649714749*x[2]**o + (-0.646087784182)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.944649714749*x_ref[2]**o + (-0.646087784182)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.552899039826*x[2]**o + (-0.172657886031)*x[2]
+            ref[(0, 1, 2, 1)]+=0.552899039826*x_ref[2]**o + (-0.172657886031)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.569740327061*x[2]**o + (0.602934120326)*x[2]
+            ref[(0, 1, 2, 2)]+=0.569740327061*x_ref[2]**o + (0.602934120326)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.845188782807*x[2]**o + (0.566686841875)*x[2]
+            ref[(0, 1, 2, 3)]+=0.845188782807*x_ref[2]**o + (0.566686841875)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.551638462442*x[2]**o + (-0.443868114735)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.551638462442*x_ref[2]**o + (-0.443868114735)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.122868362578*x[2]**o + (-0.375853283654)*x[2]
+            ref[(0, 2, 0, 1)]+=0.122868362578*x_ref[2]**o + (-0.375853283654)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.352291195153*x[2]**o + (0.212920666533)*x[2]
+            ref[(0, 2, 0, 2)]+=0.352291195153*x_ref[2]**o + (0.212920666533)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=0.243881610816*x[2]**o + (-0.690255698808)*x[2]
+            ref[(0, 2, 0, 3)]+=0.243881610816*x_ref[2]**o + (-0.690255698808)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.849253576578*x[2]**o + (-0.943970099207)*x[2]
+            ref[(0, 2, 1, 0)]+=0.849253576578*x_ref[2]**o + (-0.943970099207)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.605846888735*x[2]**o + (-0.393960120153)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.605846888735*x_ref[2]**o + (-0.393960120153)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.873851426664*x[2]**o + (0.91462131761)*x[2]
+            ref[(0, 2, 1, 2)]+=0.873851426664*x_ref[2]**o + (0.91462131761)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=-0.404494946762*x[2]**o + (0.558650800125)*x[2]
+            ref[(0, 2, 1, 3)]+=-0.404494946762*x_ref[2]**o + (0.558650800125)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.787318006064*x[2]**o + (-0.295587249972)*x[2]
+            ref[(0, 2, 2, 0)]+=0.787318006064*x_ref[2]**o + (-0.295587249972)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.266687186381*x[2]**o + (-0.943867124832)*x[2]
+            ref[(0, 2, 2, 1)]+=0.266687186381*x_ref[2]**o + (-0.943867124832)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.829941416466*x[2]**o + (-0.00471456177519)*x[2]
+            ref[(0, 2, 2, 2)]+=0.829941416466*x_ref[2]**o + (-0.00471456177519)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=0.310761985808*x[2]**o + (-0.313121829536)*x[2]
+            ref[(0, 2, 2, 3)]+=0.310761985808*x_ref[2]**o + (-0.313121829536)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.0726544830324*x[2]**o + (-0.814322288621)*x[2]
+            ref[(1, 0, 0, 0)]+=0.0726544830324*x_ref[2]**o + (-0.814322288621)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.166375001126*x[2]**o + (0.956880794605)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.166375001126*x_ref[2]**o + (0.956880794605)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.51093631938*x[2]**o + (-0.0985945782887)*x[2]
+            ref[(1, 0, 0, 2)]+=0.51093631938*x_ref[2]**o + (-0.0985945782887)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.572063199581*x[2]**o + (0.589468864571)*x[2]
+            ref[(1, 0, 0, 3)]+=0.572063199581*x_ref[2]**o + (0.589468864571)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.898952000133*x[2]**o + (0.287187510595)*x[2]
+            ref[(1, 0, 1, 0)]+=0.898952000133*x_ref[2]**o + (0.287187510595)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.795492461525*x[2]**o + (0.621857684779)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.795492461525*x_ref[2]**o + (0.621857684779)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.705472078433*x[2]**o + (0.706897513967)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.705472078433*x_ref[2]**o + (0.706897513967)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.231254450613*x[2]**o + (-0.656031882862)*x[2]
+            ref[(1, 0, 1, 3)]+=0.231254450613*x_ref[2]**o + (-0.656031882862)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.116688425131*x[2]**o + (-0.995154643749)*x[2]
+            ref[(1, 0, 2, 0)]+=0.116688425131*x_ref[2]**o + (-0.995154643749)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.781301742261*x[2]**o + (0.210182300243)*x[2]
+            ref[(1, 0, 2, 1)]+=0.781301742261*x_ref[2]**o + (0.210182300243)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.395696200894*x[2]**o + (-0.222414182907)*x[2]
+            ref[(1, 0, 2, 2)]+=0.395696200894*x_ref[2]**o + (-0.222414182907)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.84978014337*x[2]**o + (-0.560170146074)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.84978014337*x_ref[2]**o + (-0.560170146074)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.888429046697*x[2]**o + (0.811583468522)*x[2]
+            ref[(1, 1, 0, 0)]+=0.888429046697*x_ref[2]**o + (0.811583468522)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.936846146989*x[2]**o + (-0.710022885509)*x[2]
+            ref[(1, 1, 0, 1)]+=0.936846146989*x_ref[2]**o + (-0.710022885509)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.595406066935*x[2]**o + (-0.622408449535)*x[2]
+            ref[(1, 1, 0, 2)]+=0.595406066935*x_ref[2]**o + (-0.622408449535)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.866437238518*x[2]**o + (0.192183109503)*x[2]
+            ref[(1, 1, 0, 3)]+=-0.866437238518*x_ref[2]**o + (0.192183109503)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.820532090233*x[2]**o + (-0.603839092413)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.820532090233*x_ref[2]**o + (-0.603839092413)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.799657418478*x[2]**o + (-0.21782370802)*x[2]
+            ref[(1, 1, 1, 1)]+=0.799657418478*x_ref[2]**o + (-0.21782370802)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.983969221283*x[2]**o + (-0.120607943452)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.983969221283*x_ref[2]**o + (-0.120607943452)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=0.109235322873*x[2]**o + (0.261621910046)*x[2]
+            ref[(1, 1, 1, 3)]+=0.109235322873*x_ref[2]**o + (0.261621910046)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.442077521748*x[2]**o + (0.795068494168)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.442077521748*x_ref[2]**o + (0.795068494168)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.483958148584*x[2]**o + (0.169361680344)*x[2]
+            ref[(1, 1, 2, 1)]+=0.483958148584*x_ref[2]**o + (0.169361680344)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.00310410130732*x[2]**o + (0.119006641003)*x[2]
+            ref[(1, 1, 2, 2)]+=0.00310410130732*x_ref[2]**o + (0.119006641003)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.805033914078*x[2]**o + (-0.648655201627)*x[2]
+            ref[(1, 1, 2, 3)]+=0.805033914078*x_ref[2]**o + (-0.648655201627)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.462987187067*x[2]**o + (-0.758788314368)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.462987187067*x_ref[2]**o + (-0.758788314368)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.271356028462*x[2]**o + (-0.702575003727)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.271356028462*x_ref[2]**o + (-0.702575003727)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.581833291706*x[2]**o + (0.929266769839)*x[2]
+            ref[(1, 2, 0, 2)]+=0.581833291706*x_ref[2]**o + (0.929266769839)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=0.234632409687*x[2]**o + (-0.483615134109)*x[2]
+            ref[(1, 2, 0, 3)]+=0.234632409687*x_ref[2]**o + (-0.483615134109)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.42407418814*x[2]**o + (-0.794462288109)*x[2]
+            ref[(1, 2, 1, 0)]+=-0.42407418814*x_ref[2]**o + (-0.794462288109)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.534998770022*x[2]**o + (0.776607274969)*x[2]
+            ref[(1, 2, 1, 1)]+=0.534998770022*x_ref[2]**o + (0.776607274969)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.345076999321*x[2]**o + (0.424654677777)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.345076999321*x_ref[2]**o + (0.424654677777)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=0.870301025395*x[2]**o + (0.384955505682)*x[2]
+            ref[(1, 2, 1, 3)]+=0.870301025395*x_ref[2]**o + (0.384955505682)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.668091399535*x[2]**o + (0.862447774738)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.668091399535*x_ref[2]**o + (0.862447774738)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.803313205473*x[2]**o + (0.973222573663)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.803313205473*x_ref[2]**o + (0.973222573663)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.985933548084*x[2]**o + (0.746039382015)*x[2]
+            ref[(1, 2, 2, 2)]+=0.985933548084*x_ref[2]**o + (0.746039382015)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=-0.314056819384*x[2]**o + (0.0722764729851)*x[2]
+            ref[(1, 2, 2, 3)]+=-0.314056819384*x_ref[2]**o + (0.0722764729851)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.855857691719*x[2]**o + (0.704221472137)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.855857691719*x_ref[2]**o + (0.704221472137)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.105109416018*x[2]**o + (-0.522401052744)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.105109416018*x_ref[2]**o + (-0.522401052744)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.660119851165*x[2]**o + (0.765981136139)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.660119851165*x_ref[2]**o + (0.765981136139)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.496756435152*x[2]**o + (0.839896314626)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.496756435152*x_ref[2]**o + (0.839896314626)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.914637824872*x[2]**o + (0.496843317139)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.914637824872*x_ref[2]**o + (0.496843317139)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.207898175645*x[2]**o + (0.641894326311)*x[2]
+            ref[(2, 0, 1, 1)]+=-0.207898175645*x_ref[2]**o + (0.641894326311)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.77100183836*x[2]**o + (-0.76147914808)*x[2]
+            ref[(2, 0, 1, 2)]+=-0.77100183836*x_ref[2]**o + (-0.76147914808)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.251914660994*x[2]**o + (0.549435506938)*x[2]
+            ref[(2, 0, 1, 3)]+=0.251914660994*x_ref[2]**o + (0.549435506938)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.883236365428*x[2]**o + (0.627664299639)*x[2]
+            ref[(2, 0, 2, 0)]+=0.883236365428*x_ref[2]**o + (0.627664299639)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.515110698708*x[2]**o + (-0.434207026017)*x[2]
+            ref[(2, 0, 2, 1)]+=-0.515110698708*x_ref[2]**o + (-0.434207026017)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=0.9196053296*x[2]**o + (-0.224284661287)*x[2]
+            ref[(2, 0, 2, 2)]+=0.9196053296*x_ref[2]**o + (-0.224284661287)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=-0.532519683141*x[2]**o + (-0.964184910315)*x[2]
+            ref[(2, 0, 2, 3)]+=-0.532519683141*x_ref[2]**o + (-0.964184910315)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.62956744454*x[2]**o + (-0.504823085391)*x[2]
+            ref[(2, 1, 0, 0)]+=0.62956744454*x_ref[2]**o + (-0.504823085391)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.787045244958*x[2]**o + (0.25281720437)*x[2]
+            ref[(2, 1, 0, 1)]+=0.787045244958*x_ref[2]**o + (0.25281720437)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.13997402261*x[2]**o + (0.998587644047)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.13997402261*x_ref[2]**o + (0.998587644047)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.509608968872*x[2]**o + (-0.0403194788018)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.509608968872*x_ref[2]**o + (-0.0403194788018)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.24002663231*x[2]**o + (0.483875969384)*x[2]
+            ref[(2, 1, 1, 0)]+=0.24002663231*x_ref[2]**o + (0.483875969384)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.137785174268*x[2]**o + (0.921985622948)*x[2]
+            ref[(2, 1, 1, 1)]+=0.137785174268*x_ref[2]**o + (0.921985622948)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.232257015242*x[2]**o + (0.129093470647)*x[2]
+            ref[(2, 1, 1, 2)]+=0.232257015242*x_ref[2]**o + (0.129093470647)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.607581910237*x[2]**o + (-0.278742532774)*x[2]
+            ref[(2, 1, 1, 3)]+=-0.607581910237*x_ref[2]**o + (-0.278742532774)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.230050104511*x[2]**o + (0.387342282514)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.230050104511*x_ref[2]**o + (0.387342282514)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.72382711532*x[2]**o + (0.0363364940259)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.72382711532*x_ref[2]**o + (0.0363364940259)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.570936030606*x[2]**o + (0.919525508584)*x[2]
+            ref[(2, 1, 2, 2)]+=0.570936030606*x_ref[2]**o + (0.919525508584)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=0.374137089585*x[2]**o + (-0.723532616961)*x[2]
+            ref[(2, 1, 2, 3)]+=0.374137089585*x_ref[2]**o + (-0.723532616961)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.79975117544*x[2]**o + (0.582568839618)*x[2]
+            ref[(2, 2, 0, 0)]+=-0.79975117544*x_ref[2]**o + (0.582568839618)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=-0.304827891246*x[2]**o + (0.576673598246)*x[2]
+            ref[(2, 2, 0, 1)]+=-0.304827891246*x_ref[2]**o + (0.576673598246)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.21592534069*x[2]**o + (-0.467014994773)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.21592534069*x_ref[2]**o + (-0.467014994773)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=-0.728242737139*x[2]**o + (-0.0974081811286)*x[2]
+            ref[(2, 2, 0, 3)]+=-0.728242737139*x_ref[2]**o + (-0.0974081811286)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.459147260229*x[2]**o + (0.084209375024)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.459147260229*x_ref[2]**o + (0.084209375024)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.654353489993*x[2]**o + (0.659323449893)*x[2]
+            ref[(2, 2, 1, 1)]+=-0.654353489993*x_ref[2]**o + (0.659323449893)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.611404586473*x[2]**o + (0.998513983022)*x[2]
+            ref[(2, 2, 1, 2)]+=0.611404586473*x_ref[2]**o + (0.998513983022)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=-0.850349729734*x[2]**o + (0.926981482461)*x[2]
+            ref[(2, 2, 1, 3)]+=-0.850349729734*x_ref[2]**o + (0.926981482461)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.227741457027*x[2]**o + (0.128103475869)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.227741457027*x_ref[2]**o + (0.128103475869)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.184407157798*x[2]**o + (0.22541312568)*x[2]
+            ref[(2, 2, 2, 1)]+=0.184407157798*x_ref[2]**o + (0.22541312568)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=0.986043768631*x[2]**o + (0.669240860542)*x[2]
+            ref[(2, 2, 2, 2)]+=0.986043768631*x_ref[2]**o + (0.669240860542)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=-0.468849218572*x[2]**o + (-0.235813412562)*x[2]
+            ref[(2, 2, 2, 3)]+=-0.468849218572*x_ref[2]**o + (-0.235813412562)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.769562098974*x[0]**o + (0.364981328798)*x[0] + (-0.610749468324)*x[1]**o + (-0.110602859165)*x[1]
+        ref=0.769562098974*x_ref[0]**o + (0.364981328798)*x_ref[0] + (-0.610749468324)*x_ref[1]**o + (-0.110602859165)*x_ref[1]
+        if dim==3:
+            arg+=(0.461332802983)*x[2]**o + (-0.442455198016)*x[2]
+            ref+=(0.461332802983)*x_ref[2]**o + (-0.442455198016)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.845013741754*x[0]**o + (0.866168979244)*x[0] + (-0.99111015176)*x[1]**o + (-0.906764472213)*x[1]
+        ref[(0,)]=0.845013741754*x_ref[0]**o + (0.866168979244)*x_ref[0] + (-0.99111015176)*x_ref[1]**o + (-0.906764472213)*x_ref[1]
+        arg[(1,)]=0.180659281768*x[0]**o + (-0.411016964338)*x[0] + (0.213215349001)*x[1]**o + (0.134177326456)*x[1]
+        ref[(1,)]=0.180659281768*x_ref[0]**o + (-0.411016964338)*x_ref[0] + (0.213215349001)*x_ref[1]**o + (0.134177326456)*x_ref[1]
+        arg[(2,)]=-0.45668461601*x[0]**o + (0.0864550247139)*x[0] + (-0.683635327233)*x[1]**o + (-0.282539875907)*x[1]
+        ref[(2,)]=-0.45668461601*x_ref[0]**o + (0.0864550247139)*x_ref[0] + (-0.683635327233)*x_ref[1]**o + (-0.282539875907)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.65989003689*x[2]**o + (0.870781263367)*x[2]
+            ref[(0,)]+=-0.65989003689*x_ref[2]**o + (0.870781263367)*x_ref[2]
+            arg[(1,)]+=0.896961259779*x[2]**o + (-0.249561215191)*x[2]
+            ref[(1,)]+=0.896961259779*x_ref[2]**o + (-0.249561215191)*x_ref[2]
+            arg[(2,)]+=0.618669704548*x[2]**o + (-0.745080492187)*x[2]
+            ref[(2,)]+=0.618669704548*x_ref[2]**o + (-0.745080492187)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=0.534159159123*x[0]**o + (-0.388646808127)*x[0] + (0.0737716532041)*x[1]**o + (-0.320359770691)*x[1]
+        ref[(0, 0)]=0.534159159123*x_ref[0]**o + (-0.388646808127)*x_ref[0] + (0.0737716532041)*x_ref[1]**o + (-0.320359770691)*x_ref[1]
+        arg[(0, 1)]=-0.863648875201*x[0]**o + (-0.0417329412647)*x[0] + (0.297868473664)*x[1]**o + (-0.472277115891)*x[1]
+        ref[(0, 1)]=-0.863648875201*x_ref[0]**o + (-0.0417329412647)*x_ref[0] + (0.297868473664)*x_ref[1]**o + (-0.472277115891)*x_ref[1]
+        arg[(0, 2)]=0.7395482381*x[0]**o + (0.496531740599)*x[0] + (0.629767746935)*x[1]**o + (-0.438306074706)*x[1]
+        ref[(0, 2)]=0.7395482381*x_ref[0]**o + (0.496531740599)*x_ref[0] + (0.629767746935)*x_ref[1]**o + (-0.438306074706)*x_ref[1]
+        arg[(0, 3)]=-0.276088336882*x[0]**o + (0.405928404479)*x[0] + (0.0638524782275)*x[1]**o + (0.585881444925)*x[1]
+        ref[(0, 3)]=-0.276088336882*x_ref[0]**o + (0.405928404479)*x_ref[0] + (0.0638524782275)*x_ref[1]**o + (0.585881444925)*x_ref[1]
+        arg[(1, 0)]=0.0675596838611*x[0]**o + (0.975026499266)*x[0] + (0.0160583312091)*x[1]**o + (-0.603848911194)*x[1]
+        ref[(1, 0)]=0.0675596838611*x_ref[0]**o + (0.975026499266)*x_ref[0] + (0.0160583312091)*x_ref[1]**o + (-0.603848911194)*x_ref[1]
+        arg[(1, 1)]=-0.951162463406*x[0]**o + (0.541281045713)*x[0] + (-0.505589351792)*x[1]**o + (-0.471498874659)*x[1]
+        ref[(1, 1)]=-0.951162463406*x_ref[0]**o + (0.541281045713)*x_ref[0] + (-0.505589351792)*x_ref[1]**o + (-0.471498874659)*x_ref[1]
+        arg[(1, 2)]=-0.45782403142*x[0]**o + (-0.254398701721)*x[0] + (-0.572695392769)*x[1]**o + (0.261497245079)*x[1]
+        ref[(1, 2)]=-0.45782403142*x_ref[0]**o + (-0.254398701721)*x_ref[0] + (-0.572695392769)*x_ref[1]**o + (0.261497245079)*x_ref[1]
+        arg[(1, 3)]=-0.731283617409*x[0]**o + (0.912648800827)*x[0] + (-0.455994795216)*x[1]**o + (0.422140834855)*x[1]
+        ref[(1, 3)]=-0.731283617409*x_ref[0]**o + (0.912648800827)*x_ref[0] + (-0.455994795216)*x_ref[1]**o + (0.422140834855)*x_ref[1]
+        arg[(2, 0)]=-0.673264453155*x[0]**o + (-0.471425163421)*x[0] + (0.286714117047)*x[1]**o + (-0.94948434795)*x[1]
+        ref[(2, 0)]=-0.673264453155*x_ref[0]**o + (-0.471425163421)*x_ref[0] + (0.286714117047)*x_ref[1]**o + (-0.94948434795)*x_ref[1]
+        arg[(2, 1)]=-0.909756478149*x[0]**o + (-0.230067972544)*x[0] + (-0.210635960558)*x[1]**o + (0.242421872744)*x[1]
+        ref[(2, 1)]=-0.909756478149*x_ref[0]**o + (-0.230067972544)*x_ref[0] + (-0.210635960558)*x_ref[1]**o + (0.242421872744)*x_ref[1]
+        arg[(2, 2)]=-0.889668997609*x[0]**o + (-0.700131238797)*x[0] + (0.21861715789)*x[1]**o + (0.809261230331)*x[1]
+        ref[(2, 2)]=-0.889668997609*x_ref[0]**o + (-0.700131238797)*x_ref[0] + (0.21861715789)*x_ref[1]**o + (0.809261230331)*x_ref[1]
+        arg[(2, 3)]=0.422019446555*x[0]**o + (0.545082067135)*x[0] + (0.931175367284)*x[1]**o + (-0.976058458179)*x[1]
+        ref[(2, 3)]=0.422019446555*x_ref[0]**o + (0.545082067135)*x_ref[0] + (0.931175367284)*x_ref[1]**o + (-0.976058458179)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.309611216625*x[2]**o + (0.414901984765)*x[2]
+            ref[(0, 0)]+=0.309611216625*x_ref[2]**o + (0.414901984765)*x_ref[2]
+            arg[(0, 1)]+=-0.723438866843*x[2]**o + (0.102634557808)*x[2]
+            ref[(0, 1)]+=-0.723438866843*x_ref[2]**o + (0.102634557808)*x_ref[2]
+            arg[(0, 2)]+=0.857542090631*x[2]**o + (-0.509385995333)*x[2]
+            ref[(0, 2)]+=0.857542090631*x_ref[2]**o + (-0.509385995333)*x_ref[2]
+            arg[(0, 3)]+=-0.0875166885454*x[2]**o + (0.18774983851)*x[2]
+            ref[(0, 3)]+=-0.0875166885454*x_ref[2]**o + (0.18774983851)*x_ref[2]
+            arg[(1, 0)]+=0.662608938888*x[2]**o + (0.942912208616)*x[2]
+            ref[(1, 0)]+=0.662608938888*x_ref[2]**o + (0.942912208616)*x_ref[2]
+            arg[(1, 1)]+=0.714791374916*x[2]**o + (0.267613163427)*x[2]
+            ref[(1, 1)]+=0.714791374916*x_ref[2]**o + (0.267613163427)*x_ref[2]
+            arg[(1, 2)]+=0.353942053918*x[2]**o + (0.887827754458)*x[2]
+            ref[(1, 2)]+=0.353942053918*x_ref[2]**o + (0.887827754458)*x_ref[2]
+            arg[(1, 3)]+=0.0684552647164*x[2]**o + (0.715197818798)*x[2]
+            ref[(1, 3)]+=0.0684552647164*x_ref[2]**o + (0.715197818798)*x_ref[2]
+            arg[(2, 0)]+=0.374660442318*x[2]**o + (-0.704091653182)*x[2]
+            ref[(2, 0)]+=0.374660442318*x_ref[2]**o + (-0.704091653182)*x_ref[2]
+            arg[(2, 1)]+=-0.825600541395*x[2]**o + (0.933832719652)*x[2]
+            ref[(2, 1)]+=-0.825600541395*x_ref[2]**o + (0.933832719652)*x_ref[2]
+            arg[(2, 2)]+=0.725802707953*x[2]**o + (0.537473031472)*x[2]
+            ref[(2, 2)]+=0.725802707953*x_ref[2]**o + (0.537473031472)*x_ref[2]
+            arg[(2, 3)]+=0.46795426937*x[2]**o + (0.460509966417)*x[2]
+            ref[(2, 3)]+=0.46795426937*x_ref[2]**o + (0.460509966417)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2),w_ref)
+        arg[(0, 0, 0)]=0.492986024243*x[0]**o + (-0.886426165453)*x[0] + (-0.503113325384)*x[1]**o + (0.270872108418)*x[1]
+        ref[(0, 0, 0)]=0.492986024243*x_ref[0]**o + (-0.886426165453)*x_ref[0] + (-0.503113325384)*x_ref[1]**o + (0.270872108418)*x_ref[1]
+        arg[(0, 0, 1)]=-0.532258982706*x[0]**o + (-0.646197132398)*x[0] + (0.888087252896)*x[1]**o + (0.50719194228)*x[1]
+        ref[(0, 0, 1)]=-0.532258982706*x_ref[0]**o + (-0.646197132398)*x_ref[0] + (0.888087252896)*x_ref[1]**o + (0.50719194228)*x_ref[1]
+        arg[(0, 1, 0)]=0.832897057382*x[0]**o + (0.763673183509)*x[0] + (-0.218832912152)*x[1]**o + (0.0160230504226)*x[1]
+        ref[(0, 1, 0)]=0.832897057382*x_ref[0]**o + (0.763673183509)*x_ref[0] + (-0.218832912152)*x_ref[1]**o + (0.0160230504226)*x_ref[1]
+        arg[(0, 1, 1)]=-0.255117699376*x[0]**o + (-0.906354476751)*x[0] + (0.713639919069)*x[1]**o + (0.62453251821)*x[1]
+        ref[(0, 1, 1)]=-0.255117699376*x_ref[0]**o + (-0.906354476751)*x_ref[0] + (0.713639919069)*x_ref[1]**o + (0.62453251821)*x_ref[1]
+        arg[(1, 0, 0)]=-0.0541779507971*x[0]**o + (-0.0249391385259)*x[0] + (-0.982080203758)*x[1]**o + (0.776391492892)*x[1]
+        ref[(1, 0, 0)]=-0.0541779507971*x_ref[0]**o + (-0.0249391385259)*x_ref[0] + (-0.982080203758)*x_ref[1]**o + (0.776391492892)*x_ref[1]
+        arg[(1, 0, 1)]=0.945557543839*x[0]**o + (-0.835727197518)*x[0] + (0.0809056937032)*x[1]**o + (-0.426667503502)*x[1]
+        ref[(1, 0, 1)]=0.945557543839*x_ref[0]**o + (-0.835727197518)*x_ref[0] + (0.0809056937032)*x_ref[1]**o + (-0.426667503502)*x_ref[1]
+        arg[(1, 1, 0)]=-0.170550882501*x[0]**o + (0.228307106771)*x[0] + (0.666107594139)*x[1]**o + (-0.0645322957681)*x[1]
+        ref[(1, 1, 0)]=-0.170550882501*x_ref[0]**o + (0.228307106771)*x_ref[0] + (0.666107594139)*x_ref[1]**o + (-0.0645322957681)*x_ref[1]
+        arg[(1, 1, 1)]=-0.414684512187*x[0]**o + (0.396510732189)*x[0] + (0.45708663894)*x[1]**o + (0.471489410157)*x[1]
+        ref[(1, 1, 1)]=-0.414684512187*x_ref[0]**o + (0.396510732189)*x_ref[0] + (0.45708663894)*x_ref[1]**o + (0.471489410157)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.939858743907*x[2]**o + (-0.332113748974)*x[2]
+            ref[(0, 0, 0)]+=0.939858743907*x_ref[2]**o + (-0.332113748974)*x_ref[2]
+            arg[(0, 0, 1)]+=0.0505409408867*x[2]**o + (-0.000850451808826)*x[2]
+            ref[(0, 0, 1)]+=0.0505409408867*x_ref[2]**o + (-0.000850451808826)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.706564193349*x[2]**o + (0.0648138214977)*x[2]
+            ref[(0, 1, 0)]+=-0.706564193349*x_ref[2]**o + (0.0648138214977)*x_ref[2]
+            arg[(0, 1, 1)]+=0.061358550105*x[2]**o + (0.605199042053)*x[2]
+            ref[(0, 1, 1)]+=0.061358550105*x_ref[2]**o + (0.605199042053)*x_ref[2]
+            arg[(1, 0, 0)]+=0.0745354307639*x[2]**o + (-0.658988156593)*x[2]
+            ref[(1, 0, 0)]+=0.0745354307639*x_ref[2]**o + (-0.658988156593)*x_ref[2]
+            arg[(1, 0, 1)]+=0.156757118914*x[2]**o + (-0.163952005547)*x[2]
+            ref[(1, 0, 1)]+=0.156757118914*x_ref[2]**o + (-0.163952005547)*x_ref[2]
+            arg[(1, 1, 0)]+=0.927545777112*x[2]**o + (0.7660427728)*x[2]
+            ref[(1, 1, 0)]+=0.927545777112*x_ref[2]**o + (0.7660427728)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.436687070229*x[2]**o + (-0.895721996648)*x[2]
+            ref[(1, 1, 1)]+=-0.436687070229*x_ref[2]**o + (-0.895721996648)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4, 4),w)
+        ref = Data(0,(3, 4, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.193359637119*x[0]**o + (-0.871362531035)*x[0] + (0.305038430677)*x[1]**o + (-0.509810966167)*x[1]
+        ref[(0, 0, 0, 0)]=0.193359637119*x_ref[0]**o + (-0.871362531035)*x_ref[0] + (0.305038430677)*x_ref[1]**o + (-0.509810966167)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.335465344157*x[0]**o + (-0.616038092636)*x[0] + (0.788227073613)*x[1]**o + (-0.618970261245)*x[1]
+        ref[(0, 0, 0, 1)]=0.335465344157*x_ref[0]**o + (-0.616038092636)*x_ref[0] + (0.788227073613)*x_ref[1]**o + (-0.618970261245)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.8369653115*x[0]**o + (-0.394648942315)*x[0] + (-0.381499003191)*x[1]**o + (0.0680254750596)*x[1]
+        ref[(0, 0, 0, 2)]=0.8369653115*x_ref[0]**o + (-0.394648942315)*x_ref[0] + (-0.381499003191)*x_ref[1]**o + (0.0680254750596)*x_ref[1]
+        arg[(0, 0, 0, 3)]=-0.869534243224*x[0]**o + (0.291341021371)*x[0] + (-0.680916188133)*x[1]**o + (0.65065429643)*x[1]
+        ref[(0, 0, 0, 3)]=-0.869534243224*x_ref[0]**o + (0.291341021371)*x_ref[0] + (-0.680916188133)*x_ref[1]**o + (0.65065429643)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.272626555747*x[0]**o + (-0.0579226222222)*x[0] + (0.597861195214)*x[1]**o + (0.882775661483)*x[1]
+        ref[(0, 0, 1, 0)]=0.272626555747*x_ref[0]**o + (-0.0579226222222)*x_ref[0] + (0.597861195214)*x_ref[1]**o + (0.882775661483)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.401042751015*x[0]**o + (0.32704957563)*x[0] + (-0.756563197278)*x[1]**o + (0.661992745159)*x[1]
+        ref[(0, 0, 1, 1)]=-0.401042751015*x_ref[0]**o + (0.32704957563)*x_ref[0] + (-0.756563197278)*x_ref[1]**o + (0.661992745159)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.209728814849*x[0]**o + (0.6790647998)*x[0] + (-0.174116530768)*x[1]**o + (-0.813590048304)*x[1]
+        ref[(0, 0, 1, 2)]=0.209728814849*x_ref[0]**o + (0.6790647998)*x_ref[0] + (-0.174116530768)*x_ref[1]**o + (-0.813590048304)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.257282887775*x[0]**o + (0.646773652621)*x[0] + (-0.127294538784)*x[1]**o + (-0.349768859672)*x[1]
+        ref[(0, 0, 1, 3)]=0.257282887775*x_ref[0]**o + (0.646773652621)*x_ref[0] + (-0.127294538784)*x_ref[1]**o + (-0.349768859672)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.463271938192*x[0]**o + (-0.747433252404)*x[0] + (-0.663638081733)*x[1]**o + (-0.0944517281325)*x[1]
+        ref[(0, 0, 2, 0)]=0.463271938192*x_ref[0]**o + (-0.747433252404)*x_ref[0] + (-0.663638081733)*x_ref[1]**o + (-0.0944517281325)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.68231773036*x[0]**o + (0.59790632376)*x[0] + (0.454195571425)*x[1]**o + (-0.536826815836)*x[1]
+        ref[(0, 0, 2, 1)]=0.68231773036*x_ref[0]**o + (0.59790632376)*x_ref[0] + (0.454195571425)*x_ref[1]**o + (-0.536826815836)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.423131761869*x[0]**o + (-0.0101927633922)*x[0] + (-0.694580026787)*x[1]**o + (0.641573674146)*x[1]
+        ref[(0, 0, 2, 2)]=0.423131761869*x_ref[0]**o + (-0.0101927633922)*x_ref[0] + (-0.694580026787)*x_ref[1]**o + (0.641573674146)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.857540404479*x[0]**o + (-0.181422157225)*x[0] + (0.937408783756)*x[1]**o + (-0.0219406439657)*x[1]
+        ref[(0, 0, 2, 3)]=-0.857540404479*x_ref[0]**o + (-0.181422157225)*x_ref[0] + (0.937408783756)*x_ref[1]**o + (-0.0219406439657)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.0695055830637*x[0]**o + (0.558962257115)*x[0] + (0.223047098905)*x[1]**o + (-0.943401467387)*x[1]
+        ref[(0, 0, 3, 0)]=0.0695055830637*x_ref[0]**o + (0.558962257115)*x_ref[0] + (0.223047098905)*x_ref[1]**o + (-0.943401467387)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.317251182376*x[0]**o + (-0.0241025484044)*x[0] + (-0.649623044516)*x[1]**o + (0.651425799377)*x[1]
+        ref[(0, 0, 3, 1)]=0.317251182376*x_ref[0]**o + (-0.0241025484044)*x_ref[0] + (-0.649623044516)*x_ref[1]**o + (0.651425799377)*x_ref[1]
+        arg[(0, 0, 3, 2)]=0.457351847609*x[0]**o + (-0.68498854802)*x[0] + (-0.921804539702)*x[1]**o + (-0.573435152835)*x[1]
+        ref[(0, 0, 3, 2)]=0.457351847609*x_ref[0]**o + (-0.68498854802)*x_ref[0] + (-0.921804539702)*x_ref[1]**o + (-0.573435152835)*x_ref[1]
+        arg[(0, 0, 3, 3)]=-0.147863047747*x[0]**o + (0.0901765550713)*x[0] + (0.725256512802)*x[1]**o + (0.470860782314)*x[1]
+        ref[(0, 0, 3, 3)]=-0.147863047747*x_ref[0]**o + (0.0901765550713)*x_ref[0] + (0.725256512802)*x_ref[1]**o + (0.470860782314)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.611739248766*x[0]**o + (-0.263589739378)*x[0] + (0.106894457274)*x[1]**o + (0.56285881947)*x[1]
+        ref[(0, 1, 0, 0)]=-0.611739248766*x_ref[0]**o + (-0.263589739378)*x_ref[0] + (0.106894457274)*x_ref[1]**o + (0.56285881947)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.214125077052*x[0]**o + (-0.779730977342)*x[0] + (0.625817726994)*x[1]**o + (0.566918890168)*x[1]
+        ref[(0, 1, 0, 1)]=-0.214125077052*x_ref[0]**o + (-0.779730977342)*x_ref[0] + (0.625817726994)*x_ref[1]**o + (0.566918890168)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.528798563863*x[0]**o + (0.134745900425)*x[0] + (-0.471571822254)*x[1]**o + (-0.686100330814)*x[1]
+        ref[(0, 1, 0, 2)]=0.528798563863*x_ref[0]**o + (0.134745900425)*x_ref[0] + (-0.471571822254)*x_ref[1]**o + (-0.686100330814)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.210560773842*x[0]**o + (-0.435841680554)*x[0] + (-0.199845464945)*x[1]**o + (0.169032868799)*x[1]
+        ref[(0, 1, 0, 3)]=0.210560773842*x_ref[0]**o + (-0.435841680554)*x_ref[0] + (-0.199845464945)*x_ref[1]**o + (0.169032868799)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.89195035233*x[0]**o + (0.38682799077)*x[0] + (-0.948413510914)*x[1]**o + (0.953685337424)*x[1]
+        ref[(0, 1, 1, 0)]=0.89195035233*x_ref[0]**o + (0.38682799077)*x_ref[0] + (-0.948413510914)*x_ref[1]**o + (0.953685337424)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.309372474601*x[0]**o + (0.34966964059)*x[0] + (0.476909383551)*x[1]**o + (-0.940984646307)*x[1]
+        ref[(0, 1, 1, 1)]=-0.309372474601*x_ref[0]**o + (0.34966964059)*x_ref[0] + (0.476909383551)*x_ref[1]**o + (-0.940984646307)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.404843783635*x[0]**o + (-0.0232776313288)*x[0] + (0.965625558005)*x[1]**o + (0.00239754443467)*x[1]
+        ref[(0, 1, 1, 2)]=0.404843783635*x_ref[0]**o + (-0.0232776313288)*x_ref[0] + (0.965625558005)*x_ref[1]**o + (0.00239754443467)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.889621321724*x[0]**o + (-0.702485945851)*x[0] + (0.867110538827)*x[1]**o + (0.775656886603)*x[1]
+        ref[(0, 1, 1, 3)]=-0.889621321724*x_ref[0]**o + (-0.702485945851)*x_ref[0] + (0.867110538827)*x_ref[1]**o + (0.775656886603)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.828295777882*x[0]**o + (-0.741032675028)*x[0] + (-0.167030973554)*x[1]**o + (0.131381548774)*x[1]
+        ref[(0, 1, 2, 0)]=-0.828295777882*x_ref[0]**o + (-0.741032675028)*x_ref[0] + (-0.167030973554)*x_ref[1]**o + (0.131381548774)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.309489705022*x[0]**o + (-0.503434749653)*x[0] + (-0.964404612097)*x[1]**o + (-0.92756025704)*x[1]
+        ref[(0, 1, 2, 1)]=0.309489705022*x_ref[0]**o + (-0.503434749653)*x_ref[0] + (-0.964404612097)*x_ref[1]**o + (-0.92756025704)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.633991106044*x[0]**o + (0.922845966369)*x[0] + (-0.251126962436)*x[1]**o + (0.592143653211)*x[1]
+        ref[(0, 1, 2, 2)]=-0.633991106044*x_ref[0]**o + (0.922845966369)*x_ref[0] + (-0.251126962436)*x_ref[1]**o + (0.592143653211)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.634398602291*x[0]**o + (-0.301184488216)*x[0] + (-0.746141746429)*x[1]**o + (0.135847504554)*x[1]
+        ref[(0, 1, 2, 3)]=-0.634398602291*x_ref[0]**o + (-0.301184488216)*x_ref[0] + (-0.746141746429)*x_ref[1]**o + (0.135847504554)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.759376395654*x[0]**o + (0.349150623094)*x[0] + (-0.930824179768)*x[1]**o + (-0.0449130808973)*x[1]
+        ref[(0, 1, 3, 0)]=0.759376395654*x_ref[0]**o + (0.349150623094)*x_ref[0] + (-0.930824179768)*x_ref[1]**o + (-0.0449130808973)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.708988430341*x[0]**o + (-0.643047045505)*x[0] + (-0.0953608392689)*x[1]**o + (0.293870114308)*x[1]
+        ref[(0, 1, 3, 1)]=0.708988430341*x_ref[0]**o + (-0.643047045505)*x_ref[0] + (-0.0953608392689)*x_ref[1]**o + (0.293870114308)*x_ref[1]
+        arg[(0, 1, 3, 2)]=0.0599436692677*x[0]**o + (-0.972246689721)*x[0] + (0.774734518102)*x[1]**o + (0.928021786785)*x[1]
+        ref[(0, 1, 3, 2)]=0.0599436692677*x_ref[0]**o + (-0.972246689721)*x_ref[0] + (0.774734518102)*x_ref[1]**o + (0.928021786785)*x_ref[1]
+        arg[(0, 1, 3, 3)]=-0.37733199962*x[0]**o + (-0.513399820948)*x[0] + (-0.806721537594)*x[1]**o + (0.377058558629)*x[1]
+        ref[(0, 1, 3, 3)]=-0.37733199962*x_ref[0]**o + (-0.513399820948)*x_ref[0] + (-0.806721537594)*x_ref[1]**o + (0.377058558629)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.304260885197*x[0]**o + (0.553083731941)*x[0] + (0.886136851801)*x[1]**o + (-0.983857696996)*x[1]
+        ref[(0, 2, 0, 0)]=-0.304260885197*x_ref[0]**o + (0.553083731941)*x_ref[0] + (0.886136851801)*x_ref[1]**o + (-0.983857696996)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.871348844319*x[0]**o + (0.55396878732)*x[0] + (-0.491334161187)*x[1]**o + (0.35358566867)*x[1]
+        ref[(0, 2, 0, 1)]=0.871348844319*x_ref[0]**o + (0.55396878732)*x_ref[0] + (-0.491334161187)*x_ref[1]**o + (0.35358566867)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.938158424383*x[0]**o + (0.97552407138)*x[0] + (-0.42687718507)*x[1]**o + (-0.0408541042554)*x[1]
+        ref[(0, 2, 0, 2)]=-0.938158424383*x_ref[0]**o + (0.97552407138)*x_ref[0] + (-0.42687718507)*x_ref[1]**o + (-0.0408541042554)*x_ref[1]
+        arg[(0, 2, 0, 3)]=0.193248307625*x[0]**o + (0.405958383252)*x[0] + (-0.456376818862)*x[1]**o + (-0.962936534896)*x[1]
+        ref[(0, 2, 0, 3)]=0.193248307625*x_ref[0]**o + (0.405958383252)*x_ref[0] + (-0.456376818862)*x_ref[1]**o + (-0.962936534896)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.453718498983*x[0]**o + (-0.766966948403)*x[0] + (0.0961579770574)*x[1]**o + (0.233942857349)*x[1]
+        ref[(0, 2, 1, 0)]=-0.453718498983*x_ref[0]**o + (-0.766966948403)*x_ref[0] + (0.0961579770574)*x_ref[1]**o + (0.233942857349)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.88604524869*x[0]**o + (0.278512430177)*x[0] + (0.291371783818)*x[1]**o + (-0.850320407863)*x[1]
+        ref[(0, 2, 1, 1)]=0.88604524869*x_ref[0]**o + (0.278512430177)*x_ref[0] + (0.291371783818)*x_ref[1]**o + (-0.850320407863)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.102457607946*x[0]**o + (0.0469816540624)*x[0] + (0.736826332335)*x[1]**o + (0.133586202705)*x[1]
+        ref[(0, 2, 1, 2)]=0.102457607946*x_ref[0]**o + (0.0469816540624)*x_ref[0] + (0.736826332335)*x_ref[1]**o + (0.133586202705)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.15722929085*x[0]**o + (0.113336777614)*x[0] + (0.900100705723)*x[1]**o + (-0.434786035379)*x[1]
+        ref[(0, 2, 1, 3)]=0.15722929085*x_ref[0]**o + (0.113336777614)*x_ref[0] + (0.900100705723)*x_ref[1]**o + (-0.434786035379)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.413961882847*x[0]**o + (0.652945993812)*x[0] + (-0.500752119313)*x[1]**o + (-0.339092171205)*x[1]
+        ref[(0, 2, 2, 0)]=-0.413961882847*x_ref[0]**o + (0.652945993812)*x_ref[0] + (-0.500752119313)*x_ref[1]**o + (-0.339092171205)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.315334847608*x[0]**o + (-0.360160186439)*x[0] + (-0.751377846363)*x[1]**o + (-0.775207465611)*x[1]
+        ref[(0, 2, 2, 1)]=-0.315334847608*x_ref[0]**o + (-0.360160186439)*x_ref[0] + (-0.751377846363)*x_ref[1]**o + (-0.775207465611)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.861074656549*x[0]**o + (-0.984258826644)*x[0] + (-0.603803241012)*x[1]**o + (-0.349710709022)*x[1]
+        ref[(0, 2, 2, 2)]=-0.861074656549*x_ref[0]**o + (-0.984258826644)*x_ref[0] + (-0.603803241012)*x_ref[1]**o + (-0.349710709022)*x_ref[1]
+        arg[(0, 2, 2, 3)]=0.361038637405*x[0]**o + (-0.150245112073)*x[0] + (-0.799437420817)*x[1]**o + (0.0377332679244)*x[1]
+        ref[(0, 2, 2, 3)]=0.361038637405*x_ref[0]**o + (-0.150245112073)*x_ref[0] + (-0.799437420817)*x_ref[1]**o + (0.0377332679244)*x_ref[1]
+        arg[(0, 2, 3, 0)]=-0.97005482565*x[0]**o + (0.419764874765)*x[0] + (0.667307221705)*x[1]**o + (-0.882793329698)*x[1]
+        ref[(0, 2, 3, 0)]=-0.97005482565*x_ref[0]**o + (0.419764874765)*x_ref[0] + (0.667307221705)*x_ref[1]**o + (-0.882793329698)*x_ref[1]
+        arg[(0, 2, 3, 1)]=-0.511985327048*x[0]**o + (-0.866941999355)*x[0] + (-0.324574752051)*x[1]**o + (-0.100584921957)*x[1]
+        ref[(0, 2, 3, 1)]=-0.511985327048*x_ref[0]**o + (-0.866941999355)*x_ref[0] + (-0.324574752051)*x_ref[1]**o + (-0.100584921957)*x_ref[1]
+        arg[(0, 2, 3, 2)]=0.660907126796*x[0]**o + (-0.0802085979659)*x[0] + (-0.508882757692)*x[1]**o + (0.854798309475)*x[1]
+        ref[(0, 2, 3, 2)]=0.660907126796*x_ref[0]**o + (-0.0802085979659)*x_ref[0] + (-0.508882757692)*x_ref[1]**o + (0.854798309475)*x_ref[1]
+        arg[(0, 2, 3, 3)]=0.503173558112*x[0]**o + (-0.723876960201)*x[0] + (-0.859361884852)*x[1]**o + (0.588282697575)*x[1]
+        ref[(0, 2, 3, 3)]=0.503173558112*x_ref[0]**o + (-0.723876960201)*x_ref[0] + (-0.859361884852)*x_ref[1]**o + (0.588282697575)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.531627639269*x[0]**o + (0.215449102869)*x[0] + (0.1798719653)*x[1]**o + (-0.0803012357526)*x[1]
+        ref[(0, 3, 0, 0)]=0.531627639269*x_ref[0]**o + (0.215449102869)*x_ref[0] + (0.1798719653)*x_ref[1]**o + (-0.0803012357526)*x_ref[1]
+        arg[(0, 3, 0, 1)]=-0.860742991643*x[0]**o + (0.814240043339)*x[0] + (-0.158263755729)*x[1]**o + (0.00265724414159)*x[1]
+        ref[(0, 3, 0, 1)]=-0.860742991643*x_ref[0]**o + (0.814240043339)*x_ref[0] + (-0.158263755729)*x_ref[1]**o + (0.00265724414159)*x_ref[1]
+        arg[(0, 3, 0, 2)]=0.30091770621*x[0]**o + (0.844732211774)*x[0] + (0.881268502032)*x[1]**o + (-0.775411001628)*x[1]
+        ref[(0, 3, 0, 2)]=0.30091770621*x_ref[0]**o + (0.844732211774)*x_ref[0] + (0.881268502032)*x_ref[1]**o + (-0.775411001628)*x_ref[1]
+        arg[(0, 3, 0, 3)]=-0.541426426384*x[0]**o + (-0.0500037037204)*x[0] + (0.346639877592)*x[1]**o + (0.750688045042)*x[1]
+        ref[(0, 3, 0, 3)]=-0.541426426384*x_ref[0]**o + (-0.0500037037204)*x_ref[0] + (0.346639877592)*x_ref[1]**o + (0.750688045042)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.719539751009*x[0]**o + (0.9505990354)*x[0] + (-0.0482176984048)*x[1]**o + (-0.959465676454)*x[1]
+        ref[(0, 3, 1, 0)]=0.719539751009*x_ref[0]**o + (0.9505990354)*x_ref[0] + (-0.0482176984048)*x_ref[1]**o + (-0.959465676454)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.743918748924*x[0]**o + (0.17186240014)*x[0] + (0.979886563679)*x[1]**o + (-0.875138727221)*x[1]
+        ref[(0, 3, 1, 1)]=0.743918748924*x_ref[0]**o + (0.17186240014)*x_ref[0] + (0.979886563679)*x_ref[1]**o + (-0.875138727221)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.107895768238*x[0]**o + (-0.46796172341)*x[0] + (-0.54320912415)*x[1]**o + (-0.580591411789)*x[1]
+        ref[(0, 3, 1, 2)]=-0.107895768238*x_ref[0]**o + (-0.46796172341)*x_ref[0] + (-0.54320912415)*x_ref[1]**o + (-0.580591411789)*x_ref[1]
+        arg[(0, 3, 1, 3)]=-0.537449290839*x[0]**o + (0.968900017357)*x[0] + (-0.45305481998)*x[1]**o + (0.151043060112)*x[1]
+        ref[(0, 3, 1, 3)]=-0.537449290839*x_ref[0]**o + (0.968900017357)*x_ref[0] + (-0.45305481998)*x_ref[1]**o + (0.151043060112)*x_ref[1]
+        arg[(0, 3, 2, 0)]=-0.107101980628*x[0]**o + (0.0312035603545)*x[0] + (-0.818759003232)*x[1]**o + (0.557865064128)*x[1]
+        ref[(0, 3, 2, 0)]=-0.107101980628*x_ref[0]**o + (0.0312035603545)*x_ref[0] + (-0.818759003232)*x_ref[1]**o + (0.557865064128)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.506329542398*x[0]**o + (0.433968052036)*x[0] + (0.127685797424)*x[1]**o + (-0.117674196631)*x[1]
+        ref[(0, 3, 2, 1)]=0.506329542398*x_ref[0]**o + (0.433968052036)*x_ref[0] + (0.127685797424)*x_ref[1]**o + (-0.117674196631)*x_ref[1]
+        arg[(0, 3, 2, 2)]=0.829906239546*x[0]**o + (0.343686644183)*x[0] + (0.526985855)*x[1]**o + (0.650145315725)*x[1]
+        ref[(0, 3, 2, 2)]=0.829906239546*x_ref[0]**o + (0.343686644183)*x_ref[0] + (0.526985855)*x_ref[1]**o + (0.650145315725)*x_ref[1]
+        arg[(0, 3, 2, 3)]=-0.615363051962*x[0]**o + (0.643349866893)*x[0] + (-0.0458981132491)*x[1]**o + (-0.80439470947)*x[1]
+        ref[(0, 3, 2, 3)]=-0.615363051962*x_ref[0]**o + (0.643349866893)*x_ref[0] + (-0.0458981132491)*x_ref[1]**o + (-0.80439470947)*x_ref[1]
+        arg[(0, 3, 3, 0)]=-0.894419731333*x[0]**o + (-0.553926052879)*x[0] + (0.0635543154147)*x[1]**o + (0.552317737005)*x[1]
+        ref[(0, 3, 3, 0)]=-0.894419731333*x_ref[0]**o + (-0.553926052879)*x_ref[0] + (0.0635543154147)*x_ref[1]**o + (0.552317737005)*x_ref[1]
+        arg[(0, 3, 3, 1)]=0.78280961699*x[0]**o + (-0.224188467687)*x[0] + (0.240959586348)*x[1]**o + (-0.60314970047)*x[1]
+        ref[(0, 3, 3, 1)]=0.78280961699*x_ref[0]**o + (-0.224188467687)*x_ref[0] + (0.240959586348)*x_ref[1]**o + (-0.60314970047)*x_ref[1]
+        arg[(0, 3, 3, 2)]=0.802879549698*x[0]**o + (-0.361939875318)*x[0] + (0.957668275245)*x[1]**o + (-0.814774203627)*x[1]
+        ref[(0, 3, 3, 2)]=0.802879549698*x_ref[0]**o + (-0.361939875318)*x_ref[0] + (0.957668275245)*x_ref[1]**o + (-0.814774203627)*x_ref[1]
+        arg[(0, 3, 3, 3)]=0.0833757273355*x[0]**o + (0.733069344803)*x[0] + (-0.738413895326)*x[1]**o + (-0.299384575408)*x[1]
+        ref[(0, 3, 3, 3)]=0.0833757273355*x_ref[0]**o + (0.733069344803)*x_ref[0] + (-0.738413895326)*x_ref[1]**o + (-0.299384575408)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.693819456718*x[0]**o + (0.805900103783)*x[0] + (0.13514802281)*x[1]**o + (-0.49785848669)*x[1]
+        ref[(1, 0, 0, 0)]=0.693819456718*x_ref[0]**o + (0.805900103783)*x_ref[0] + (0.13514802281)*x_ref[1]**o + (-0.49785848669)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.606085279858*x[0]**o + (0.196024149661)*x[0] + (-0.65148705666)*x[1]**o + (0.822087661768)*x[1]
+        ref[(1, 0, 0, 1)]=-0.606085279858*x_ref[0]**o + (0.196024149661)*x_ref[0] + (-0.65148705666)*x_ref[1]**o + (0.822087661768)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.720779904373*x[0]**o + (0.833865626017)*x[0] + (-0.460045672934)*x[1]**o + (0.609083030332)*x[1]
+        ref[(1, 0, 0, 2)]=-0.720779904373*x_ref[0]**o + (0.833865626017)*x_ref[0] + (-0.460045672934)*x_ref[1]**o + (0.609083030332)*x_ref[1]
+        arg[(1, 0, 0, 3)]=0.838066780026*x[0]**o + (0.464242446393)*x[0] + (0.411177038679)*x[1]**o + (0.121225861164)*x[1]
+        ref[(1, 0, 0, 3)]=0.838066780026*x_ref[0]**o + (0.464242446393)*x_ref[0] + (0.411177038679)*x_ref[1]**o + (0.121225861164)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.0362682075274*x[0]**o + (0.209063672781)*x[0] + (-0.764098944816)*x[1]**o + (0.838846710355)*x[1]
+        ref[(1, 0, 1, 0)]=0.0362682075274*x_ref[0]**o + (0.209063672781)*x_ref[0] + (-0.764098944816)*x_ref[1]**o + (0.838846710355)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.343371009474*x[0]**o + (0.482140535211)*x[0] + (-0.426255281287)*x[1]**o + (-0.976092056551)*x[1]
+        ref[(1, 0, 1, 1)]=0.343371009474*x_ref[0]**o + (0.482140535211)*x_ref[0] + (-0.426255281287)*x_ref[1]**o + (-0.976092056551)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.475988564675*x[0]**o + (-0.713838553402)*x[0] + (-0.915807993285)*x[1]**o + (-0.0436564569449)*x[1]
+        ref[(1, 0, 1, 2)]=0.475988564675*x_ref[0]**o + (-0.713838553402)*x_ref[0] + (-0.915807993285)*x_ref[1]**o + (-0.0436564569449)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.730152347538*x[0]**o + (-0.386330345993)*x[0] + (-0.193015507518)*x[1]**o + (-0.84677372168)*x[1]
+        ref[(1, 0, 1, 3)]=0.730152347538*x_ref[0]**o + (-0.386330345993)*x_ref[0] + (-0.193015507518)*x_ref[1]**o + (-0.84677372168)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.207190009108*x[0]**o + (0.142231393154)*x[0] + (-0.340226650441)*x[1]**o + (-0.640494824263)*x[1]
+        ref[(1, 0, 2, 0)]=0.207190009108*x_ref[0]**o + (0.142231393154)*x_ref[0] + (-0.340226650441)*x_ref[1]**o + (-0.640494824263)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.834067196193*x[0]**o + (-0.959168484641)*x[0] + (-0.797085079804)*x[1]**o + (0.739608001141)*x[1]
+        ref[(1, 0, 2, 1)]=0.834067196193*x_ref[0]**o + (-0.959168484641)*x_ref[0] + (-0.797085079804)*x_ref[1]**o + (0.739608001141)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.313925542565*x[0]**o + (-0.0107226024783)*x[0] + (-0.527586052388)*x[1]**o + (-0.267241242377)*x[1]
+        ref[(1, 0, 2, 2)]=0.313925542565*x_ref[0]**o + (-0.0107226024783)*x_ref[0] + (-0.527586052388)*x_ref[1]**o + (-0.267241242377)*x_ref[1]
+        arg[(1, 0, 2, 3)]=0.409035360308*x[0]**o + (-0.217094922694)*x[0] + (-0.993450407888)*x[1]**o + (0.261730764466)*x[1]
+        ref[(1, 0, 2, 3)]=0.409035360308*x_ref[0]**o + (-0.217094922694)*x_ref[0] + (-0.993450407888)*x_ref[1]**o + (0.261730764466)*x_ref[1]
+        arg[(1, 0, 3, 0)]=0.506855588857*x[0]**o + (-0.269454211147)*x[0] + (-0.529614833503)*x[1]**o + (0.907258485247)*x[1]
+        ref[(1, 0, 3, 0)]=0.506855588857*x_ref[0]**o + (-0.269454211147)*x_ref[0] + (-0.529614833503)*x_ref[1]**o + (0.907258485247)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.767316486512*x[0]**o + (0.614076640096)*x[0] + (-0.292433594288)*x[1]**o + (0.961598925483)*x[1]
+        ref[(1, 0, 3, 1)]=-0.767316486512*x_ref[0]**o + (0.614076640096)*x_ref[0] + (-0.292433594288)*x_ref[1]**o + (0.961598925483)*x_ref[1]
+        arg[(1, 0, 3, 2)]=-0.28272327749*x[0]**o + (-0.634965324986)*x[0] + (-0.168629187331)*x[1]**o + (0.770366173076)*x[1]
+        ref[(1, 0, 3, 2)]=-0.28272327749*x_ref[0]**o + (-0.634965324986)*x_ref[0] + (-0.168629187331)*x_ref[1]**o + (0.770366173076)*x_ref[1]
+        arg[(1, 0, 3, 3)]=0.976981662443*x[0]**o + (-0.501668150967)*x[0] + (-0.216637925459)*x[1]**o + (-0.784224946407)*x[1]
+        ref[(1, 0, 3, 3)]=0.976981662443*x_ref[0]**o + (-0.501668150967)*x_ref[0] + (-0.216637925459)*x_ref[1]**o + (-0.784224946407)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.0990004555292*x[0]**o + (-0.264191430777)*x[0] + (-0.327163776869)*x[1]**o + (0.0284048399109)*x[1]
+        ref[(1, 1, 0, 0)]=-0.0990004555292*x_ref[0]**o + (-0.264191430777)*x_ref[0] + (-0.327163776869)*x_ref[1]**o + (0.0284048399109)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.471673292808*x[0]**o + (-0.0738954687593)*x[0] + (0.575503353561)*x[1]**o + (-0.180810027946)*x[1]
+        ref[(1, 1, 0, 1)]=0.471673292808*x_ref[0]**o + (-0.0738954687593)*x_ref[0] + (0.575503353561)*x_ref[1]**o + (-0.180810027946)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.958780697223*x[0]**o + (0.695916728342)*x[0] + (-0.978128561131)*x[1]**o + (0.547157522752)*x[1]
+        ref[(1, 1, 0, 2)]=0.958780697223*x_ref[0]**o + (0.695916728342)*x_ref[0] + (-0.978128561131)*x_ref[1]**o + (0.547157522752)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.968762536222*x[0]**o + (0.532198743388)*x[0] + (0.407241810356)*x[1]**o + (-0.694641109431)*x[1]
+        ref[(1, 1, 0, 3)]=-0.968762536222*x_ref[0]**o + (0.532198743388)*x_ref[0] + (0.407241810356)*x_ref[1]**o + (-0.694641109431)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.009236735812*x[0]**o + (0.212494386393)*x[0] + (-0.413407006233)*x[1]**o + (-0.981912132664)*x[1]
+        ref[(1, 1, 1, 0)]=0.009236735812*x_ref[0]**o + (0.212494386393)*x_ref[0] + (-0.413407006233)*x_ref[1]**o + (-0.981912132664)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.38371063867*x[0]**o + (0.415276000673)*x[0] + (-0.509552368294)*x[1]**o + (-0.26783982637)*x[1]
+        ref[(1, 1, 1, 1)]=0.38371063867*x_ref[0]**o + (0.415276000673)*x_ref[0] + (-0.509552368294)*x_ref[1]**o + (-0.26783982637)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.324212873036*x[0]**o + (-0.980639320585)*x[0] + (-0.771964635182)*x[1]**o + (-0.198820565168)*x[1]
+        ref[(1, 1, 1, 2)]=0.324212873036*x_ref[0]**o + (-0.980639320585)*x_ref[0] + (-0.771964635182)*x_ref[1]**o + (-0.198820565168)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.95524902762*x[0]**o + (0.780250699972)*x[0] + (0.0242390724916)*x[1]**o + (0.144250979203)*x[1]
+        ref[(1, 1, 1, 3)]=-0.95524902762*x_ref[0]**o + (0.780250699972)*x_ref[0] + (0.0242390724916)*x_ref[1]**o + (0.144250979203)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.631177763455*x[0]**o + (0.693242939858)*x[0] + (0.257625217927)*x[1]**o + (0.422775135997)*x[1]
+        ref[(1, 1, 2, 0)]=0.631177763455*x_ref[0]**o + (0.693242939858)*x_ref[0] + (0.257625217927)*x_ref[1]**o + (0.422775135997)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.759787648749*x[0]**o + (-0.996935320637)*x[0] + (0.699135513933)*x[1]**o + (0.351496522899)*x[1]
+        ref[(1, 1, 2, 1)]=0.759787648749*x_ref[0]**o + (-0.996935320637)*x_ref[0] + (0.699135513933)*x_ref[1]**o + (0.351496522899)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.933254615252*x[0]**o + (0.364603135386)*x[0] + (-0.0433399854646)*x[1]**o + (0.663491039514)*x[1]
+        ref[(1, 1, 2, 2)]=0.933254615252*x_ref[0]**o + (0.364603135386)*x_ref[0] + (-0.0433399854646)*x_ref[1]**o + (0.663491039514)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.56858179798*x[0]**o + (0.234921887397)*x[0] + (0.20082418023)*x[1]**o + (0.1067999335)*x[1]
+        ref[(1, 1, 2, 3)]=-0.56858179798*x_ref[0]**o + (0.234921887397)*x_ref[0] + (0.20082418023)*x_ref[1]**o + (0.1067999335)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.118477352074*x[0]**o + (0.902258526747)*x[0] + (0.649213015054)*x[1]**o + (-0.555265098445)*x[1]
+        ref[(1, 1, 3, 0)]=0.118477352074*x_ref[0]**o + (0.902258526747)*x_ref[0] + (0.649213015054)*x_ref[1]**o + (-0.555265098445)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.156899392083*x[0]**o + (0.826363026715)*x[0] + (0.784457759745)*x[1]**o + (-0.351301653444)*x[1]
+        ref[(1, 1, 3, 1)]=-0.156899392083*x_ref[0]**o + (0.826363026715)*x_ref[0] + (0.784457759745)*x_ref[1]**o + (-0.351301653444)*x_ref[1]
+        arg[(1, 1, 3, 2)]=-0.682612012284*x[0]**o + (0.829852402582)*x[0] + (0.512691357285)*x[1]**o + (0.779682069686)*x[1]
+        ref[(1, 1, 3, 2)]=-0.682612012284*x_ref[0]**o + (0.829852402582)*x_ref[0] + (0.512691357285)*x_ref[1]**o + (0.779682069686)*x_ref[1]
+        arg[(1, 1, 3, 3)]=0.566056296294*x[0]**o + (0.851423950068)*x[0] + (-0.191559161234)*x[1]**o + (0.19207709354)*x[1]
+        ref[(1, 1, 3, 3)]=0.566056296294*x_ref[0]**o + (0.851423950068)*x_ref[0] + (-0.191559161234)*x_ref[1]**o + (0.19207709354)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.214743375821*x[0]**o + (0.961916597285)*x[0] + (0.166881050385)*x[1]**o + (0.703992313281)*x[1]
+        ref[(1, 2, 0, 0)]=0.214743375821*x_ref[0]**o + (0.961916597285)*x_ref[0] + (0.166881050385)*x_ref[1]**o + (0.703992313281)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.545354735556*x[0]**o + (0.150667705433)*x[0] + (-0.335500762665)*x[1]**o + (0.366209045867)*x[1]
+        ref[(1, 2, 0, 1)]=0.545354735556*x_ref[0]**o + (0.150667705433)*x_ref[0] + (-0.335500762665)*x_ref[1]**o + (0.366209045867)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.581538503378*x[0]**o + (0.454326878708)*x[0] + (-0.789014106394)*x[1]**o + (0.877397069797)*x[1]
+        ref[(1, 2, 0, 2)]=0.581538503378*x_ref[0]**o + (0.454326878708)*x_ref[0] + (-0.789014106394)*x_ref[1]**o + (0.877397069797)*x_ref[1]
+        arg[(1, 2, 0, 3)]=-0.998709459146*x[0]**o + (0.505485490794)*x[0] + (-0.0370905855556)*x[1]**o + (0.53956239135)*x[1]
+        ref[(1, 2, 0, 3)]=-0.998709459146*x_ref[0]**o + (0.505485490794)*x_ref[0] + (-0.0370905855556)*x_ref[1]**o + (0.53956239135)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.274622200876*x[0]**o + (0.249771058225)*x[0] + (0.842524741596)*x[1]**o + (-0.107607020575)*x[1]
+        ref[(1, 2, 1, 0)]=0.274622200876*x_ref[0]**o + (0.249771058225)*x_ref[0] + (0.842524741596)*x_ref[1]**o + (-0.107607020575)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.664205521835*x[0]**o + (0.454737944084)*x[0] + (-0.554144411587)*x[1]**o + (-0.145432351591)*x[1]
+        ref[(1, 2, 1, 1)]=0.664205521835*x_ref[0]**o + (0.454737944084)*x_ref[0] + (-0.554144411587)*x_ref[1]**o + (-0.145432351591)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.500415146027*x[0]**o + (-0.782794767218)*x[0] + (-0.371712813443)*x[1]**o + (-0.737271721802)*x[1]
+        ref[(1, 2, 1, 2)]=-0.500415146027*x_ref[0]**o + (-0.782794767218)*x_ref[0] + (-0.371712813443)*x_ref[1]**o + (-0.737271721802)*x_ref[1]
+        arg[(1, 2, 1, 3)]=-0.147300053351*x[0]**o + (0.111548044395)*x[0] + (0.908708626725)*x[1]**o + (-0.215126604714)*x[1]
+        ref[(1, 2, 1, 3)]=-0.147300053351*x_ref[0]**o + (0.111548044395)*x_ref[0] + (0.908708626725)*x_ref[1]**o + (-0.215126604714)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.197735137012*x[0]**o + (-0.63754842889)*x[0] + (-0.485913149359)*x[1]**o + (0.0646160965737)*x[1]
+        ref[(1, 2, 2, 0)]=-0.197735137012*x_ref[0]**o + (-0.63754842889)*x_ref[0] + (-0.485913149359)*x_ref[1]**o + (0.0646160965737)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.245785441085*x[0]**o + (0.318038222435)*x[0] + (-0.341390280276)*x[1]**o + (-0.248960178263)*x[1]
+        ref[(1, 2, 2, 1)]=0.245785441085*x_ref[0]**o + (0.318038222435)*x_ref[0] + (-0.341390280276)*x_ref[1]**o + (-0.248960178263)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.415812139792*x[0]**o + (-0.483451470535)*x[0] + (-0.0759200531399)*x[1]**o + (0.603658780454)*x[1]
+        ref[(1, 2, 2, 2)]=-0.415812139792*x_ref[0]**o + (-0.483451470535)*x_ref[0] + (-0.0759200531399)*x_ref[1]**o + (0.603658780454)*x_ref[1]
+        arg[(1, 2, 2, 3)]=0.327683499198*x[0]**o + (-0.423863039407)*x[0] + (-0.399171138669)*x[1]**o + (0.97027115332)*x[1]
+        ref[(1, 2, 2, 3)]=0.327683499198*x_ref[0]**o + (-0.423863039407)*x_ref[0] + (-0.399171138669)*x_ref[1]**o + (0.97027115332)*x_ref[1]
+        arg[(1, 2, 3, 0)]=-0.889225525062*x[0]**o + (0.564316595721)*x[0] + (0.697727165333)*x[1]**o + (0.675638205613)*x[1]
+        ref[(1, 2, 3, 0)]=-0.889225525062*x_ref[0]**o + (0.564316595721)*x_ref[0] + (0.697727165333)*x_ref[1]**o + (0.675638205613)*x_ref[1]
+        arg[(1, 2, 3, 1)]=0.15775183392*x[0]**o + (0.869583543974)*x[0] + (-0.654565831343)*x[1]**o + (0.245484927971)*x[1]
+        ref[(1, 2, 3, 1)]=0.15775183392*x_ref[0]**o + (0.869583543974)*x_ref[0] + (-0.654565831343)*x_ref[1]**o + (0.245484927971)*x_ref[1]
+        arg[(1, 2, 3, 2)]=-0.85388938086*x[0]**o + (0.236531758582)*x[0] + (0.216867610842)*x[1]**o + (-0.0178566026696)*x[1]
+        ref[(1, 2, 3, 2)]=-0.85388938086*x_ref[0]**o + (0.236531758582)*x_ref[0] + (0.216867610842)*x_ref[1]**o + (-0.0178566026696)*x_ref[1]
+        arg[(1, 2, 3, 3)]=0.541099325438*x[0]**o + (-0.332917228544)*x[0] + (-0.66258050143)*x[1]**o + (0.572775087305)*x[1]
+        ref[(1, 2, 3, 3)]=0.541099325438*x_ref[0]**o + (-0.332917228544)*x_ref[0] + (-0.66258050143)*x_ref[1]**o + (0.572775087305)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.199332231707*x[0]**o + (-0.979958658532)*x[0] + (0.235596290751)*x[1]**o + (0.579191672182)*x[1]
+        ref[(1, 3, 0, 0)]=-0.199332231707*x_ref[0]**o + (-0.979958658532)*x_ref[0] + (0.235596290751)*x_ref[1]**o + (0.579191672182)*x_ref[1]
+        arg[(1, 3, 0, 1)]=0.328902859937*x[0]**o + (0.720821684656)*x[0] + (0.793053711362)*x[1]**o + (0.563811699954)*x[1]
+        ref[(1, 3, 0, 1)]=0.328902859937*x_ref[0]**o + (0.720821684656)*x_ref[0] + (0.793053711362)*x_ref[1]**o + (0.563811699954)*x_ref[1]
+        arg[(1, 3, 0, 2)]=-0.641866300756*x[0]**o + (0.432530209718)*x[0] + (-0.115856554837)*x[1]**o + (0.446141497941)*x[1]
+        ref[(1, 3, 0, 2)]=-0.641866300756*x_ref[0]**o + (0.432530209718)*x_ref[0] + (-0.115856554837)*x_ref[1]**o + (0.446141497941)*x_ref[1]
+        arg[(1, 3, 0, 3)]=-0.295796960312*x[0]**o + (0.354464428486)*x[0] + (-0.682205798685)*x[1]**o + (-0.763339663133)*x[1]
+        ref[(1, 3, 0, 3)]=-0.295796960312*x_ref[0]**o + (0.354464428486)*x_ref[0] + (-0.682205798685)*x_ref[1]**o + (-0.763339663133)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.260599581293*x[0]**o + (-0.73036351682)*x[0] + (-0.101832293792)*x[1]**o + (0.444349227054)*x[1]
+        ref[(1, 3, 1, 0)]=-0.260599581293*x_ref[0]**o + (-0.73036351682)*x_ref[0] + (-0.101832293792)*x_ref[1]**o + (0.444349227054)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.849887872095*x[0]**o + (-0.207993174582)*x[0] + (-0.774802295725)*x[1]**o + (0.305806938057)*x[1]
+        ref[(1, 3, 1, 1)]=0.849887872095*x_ref[0]**o + (-0.207993174582)*x_ref[0] + (-0.774802295725)*x_ref[1]**o + (0.305806938057)*x_ref[1]
+        arg[(1, 3, 1, 2)]=-0.575564412021*x[0]**o + (0.819402753655)*x[0] + (0.434730075671)*x[1]**o + (-0.909197991877)*x[1]
+        ref[(1, 3, 1, 2)]=-0.575564412021*x_ref[0]**o + (0.819402753655)*x_ref[0] + (0.434730075671)*x_ref[1]**o + (-0.909197991877)*x_ref[1]
+        arg[(1, 3, 1, 3)]=-0.621316416607*x[0]**o + (0.896167970752)*x[0] + (-0.0222961841128)*x[1]**o + (0.44954894674)*x[1]
+        ref[(1, 3, 1, 3)]=-0.621316416607*x_ref[0]**o + (0.896167970752)*x_ref[0] + (-0.0222961841128)*x_ref[1]**o + (0.44954894674)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.631012448693*x[0]**o + (-0.999112148948)*x[0] + (-0.85571521983)*x[1]**o + (-0.00742209771402)*x[1]
+        ref[(1, 3, 2, 0)]=0.631012448693*x_ref[0]**o + (-0.999112148948)*x_ref[0] + (-0.85571521983)*x_ref[1]**o + (-0.00742209771402)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.833837125253*x[0]**o + (0.797344368753)*x[0] + (0.994229115606)*x[1]**o + (0.216608860538)*x[1]
+        ref[(1, 3, 2, 1)]=0.833837125253*x_ref[0]**o + (0.797344368753)*x_ref[0] + (0.994229115606)*x_ref[1]**o + (0.216608860538)*x_ref[1]
+        arg[(1, 3, 2, 2)]=0.614431755197*x[0]**o + (-0.27885602869)*x[0] + (-0.360634341945)*x[1]**o + (0.147576757896)*x[1]
+        ref[(1, 3, 2, 2)]=0.614431755197*x_ref[0]**o + (-0.27885602869)*x_ref[0] + (-0.360634341945)*x_ref[1]**o + (0.147576757896)*x_ref[1]
+        arg[(1, 3, 2, 3)]=-0.376250892392*x[0]**o + (0.762729638768)*x[0] + (0.381505680875)*x[1]**o + (-0.942116145254)*x[1]
+        ref[(1, 3, 2, 3)]=-0.376250892392*x_ref[0]**o + (0.762729638768)*x_ref[0] + (0.381505680875)*x_ref[1]**o + (-0.942116145254)*x_ref[1]
+        arg[(1, 3, 3, 0)]=-0.937377988517*x[0]**o + (-0.530465256868)*x[0] + (0.184129345737)*x[1]**o + (0.481099784052)*x[1]
+        ref[(1, 3, 3, 0)]=-0.937377988517*x_ref[0]**o + (-0.530465256868)*x_ref[0] + (0.184129345737)*x_ref[1]**o + (0.481099784052)*x_ref[1]
+        arg[(1, 3, 3, 1)]=-0.715231461809*x[0]**o + (-0.379722151939)*x[0] + (0.854948308383)*x[1]**o + (-0.724261070781)*x[1]
+        ref[(1, 3, 3, 1)]=-0.715231461809*x_ref[0]**o + (-0.379722151939)*x_ref[0] + (0.854948308383)*x_ref[1]**o + (-0.724261070781)*x_ref[1]
+        arg[(1, 3, 3, 2)]=0.675183301691*x[0]**o + (0.586976209544)*x[0] + (-0.565278821886)*x[1]**o + (0.468813256254)*x[1]
+        ref[(1, 3, 3, 2)]=0.675183301691*x_ref[0]**o + (0.586976209544)*x_ref[0] + (-0.565278821886)*x_ref[1]**o + (0.468813256254)*x_ref[1]
+        arg[(1, 3, 3, 3)]=-0.73220368305*x[0]**o + (-0.868923578003)*x[0] + (0.185405517983)*x[1]**o + (-0.287213823099)*x[1]
+        ref[(1, 3, 3, 3)]=-0.73220368305*x_ref[0]**o + (-0.868923578003)*x_ref[0] + (0.185405517983)*x_ref[1]**o + (-0.287213823099)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.880399681966*x[0]**o + (-0.110499499639)*x[0] + (0.417841207177)*x[1]**o + (-0.93009070143)*x[1]
+        ref[(2, 0, 0, 0)]=0.880399681966*x_ref[0]**o + (-0.110499499639)*x_ref[0] + (0.417841207177)*x_ref[1]**o + (-0.93009070143)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.334463362347*x[0]**o + (0.215901904698)*x[0] + (-0.62294925825)*x[1]**o + (-0.998275894583)*x[1]
+        ref[(2, 0, 0, 1)]=-0.334463362347*x_ref[0]**o + (0.215901904698)*x_ref[0] + (-0.62294925825)*x_ref[1]**o + (-0.998275894583)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.41099650693*x[0]**o + (-0.736130907349)*x[0] + (-0.207017953456)*x[1]**o + (0.951104385533)*x[1]
+        ref[(2, 0, 0, 2)]=-0.41099650693*x_ref[0]**o + (-0.736130907349)*x_ref[0] + (-0.207017953456)*x_ref[1]**o + (0.951104385533)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.652658904502*x[0]**o + (-0.362694178258)*x[0] + (-0.722710509546)*x[1]**o + (-0.427802457469)*x[1]
+        ref[(2, 0, 0, 3)]=-0.652658904502*x_ref[0]**o + (-0.362694178258)*x_ref[0] + (-0.722710509546)*x_ref[1]**o + (-0.427802457469)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.33166789846*x[0]**o + (-0.803327376978)*x[0] + (-0.137218539665)*x[1]**o + (0.149670053034)*x[1]
+        ref[(2, 0, 1, 0)]=-0.33166789846*x_ref[0]**o + (-0.803327376978)*x_ref[0] + (-0.137218539665)*x_ref[1]**o + (0.149670053034)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.0369150348996*x[0]**o + (0.240475450291)*x[0] + (0.547437576633)*x[1]**o + (0.656222569234)*x[1]
+        ref[(2, 0, 1, 1)]=0.0369150348996*x_ref[0]**o + (0.240475450291)*x_ref[0] + (0.547437576633)*x_ref[1]**o + (0.656222569234)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.407631189263*x[0]**o + (-0.433590081906)*x[0] + (0.0254681532405)*x[1]**o + (0.904655163566)*x[1]
+        ref[(2, 0, 1, 2)]=-0.407631189263*x_ref[0]**o + (-0.433590081906)*x_ref[0] + (0.0254681532405)*x_ref[1]**o + (0.904655163566)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.32647545544*x[0]**o + (0.862510129431)*x[0] + (-0.265064536908)*x[1]**o + (0.721866127948)*x[1]
+        ref[(2, 0, 1, 3)]=-0.32647545544*x_ref[0]**o + (0.862510129431)*x_ref[0] + (-0.265064536908)*x_ref[1]**o + (0.721866127948)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.340497876047*x[0]**o + (0.919737618362)*x[0] + (-0.503468406492)*x[1]**o + (-0.628473899484)*x[1]
+        ref[(2, 0, 2, 0)]=0.340497876047*x_ref[0]**o + (0.919737618362)*x_ref[0] + (-0.503468406492)*x_ref[1]**o + (-0.628473899484)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.556012889586*x[0]**o + (0.880975148609)*x[0] + (-0.963913201284)*x[1]**o + (0.769814410746)*x[1]
+        ref[(2, 0, 2, 1)]=-0.556012889586*x_ref[0]**o + (0.880975148609)*x_ref[0] + (-0.963913201284)*x_ref[1]**o + (0.769814410746)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.749851762898*x[0]**o + (-0.179094141794)*x[0] + (0.878908048447)*x[1]**o + (-0.835002383285)*x[1]
+        ref[(2, 0, 2, 2)]=-0.749851762898*x_ref[0]**o + (-0.179094141794)*x_ref[0] + (0.878908048447)*x_ref[1]**o + (-0.835002383285)*x_ref[1]
+        arg[(2, 0, 2, 3)]=0.163795255661*x[0]**o + (0.251749057093)*x[0] + (-0.972384633443)*x[1]**o + (0.775963818924)*x[1]
+        ref[(2, 0, 2, 3)]=0.163795255661*x_ref[0]**o + (0.251749057093)*x_ref[0] + (-0.972384633443)*x_ref[1]**o + (0.775963818924)*x_ref[1]
+        arg[(2, 0, 3, 0)]=-0.0362080556964*x[0]**o + (-0.508590071141)*x[0] + (-0.0743276773268)*x[1]**o + (-0.313707017017)*x[1]
+        ref[(2, 0, 3, 0)]=-0.0362080556964*x_ref[0]**o + (-0.508590071141)*x_ref[0] + (-0.0743276773268)*x_ref[1]**o + (-0.313707017017)*x_ref[1]
+        arg[(2, 0, 3, 1)]=0.956584275648*x[0]**o + (-0.631948630834)*x[0] + (0.504941676754)*x[1]**o + (0.538315500842)*x[1]
+        ref[(2, 0, 3, 1)]=0.956584275648*x_ref[0]**o + (-0.631948630834)*x_ref[0] + (0.504941676754)*x_ref[1]**o + (0.538315500842)*x_ref[1]
+        arg[(2, 0, 3, 2)]=-0.179922651066*x[0]**o + (0.55076984387)*x[0] + (-0.954915147598)*x[1]**o + (-0.16271378092)*x[1]
+        ref[(2, 0, 3, 2)]=-0.179922651066*x_ref[0]**o + (0.55076984387)*x_ref[0] + (-0.954915147598)*x_ref[1]**o + (-0.16271378092)*x_ref[1]
+        arg[(2, 0, 3, 3)]=0.301702870341*x[0]**o + (0.656847579591)*x[0] + (0.992340125654)*x[1]**o + (-0.850156552948)*x[1]
+        ref[(2, 0, 3, 3)]=0.301702870341*x_ref[0]**o + (0.656847579591)*x_ref[0] + (0.992340125654)*x_ref[1]**o + (-0.850156552948)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.324922640419*x[0]**o + (0.453055959165)*x[0] + (-0.0792845344542)*x[1]**o + (-0.768111282719)*x[1]
+        ref[(2, 1, 0, 0)]=0.324922640419*x_ref[0]**o + (0.453055959165)*x_ref[0] + (-0.0792845344542)*x_ref[1]**o + (-0.768111282719)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.0892326242954*x[0]**o + (0.669105863284)*x[0] + (0.59209173128)*x[1]**o + (-0.0518785429782)*x[1]
+        ref[(2, 1, 0, 1)]=0.0892326242954*x_ref[0]**o + (0.669105863284)*x_ref[0] + (0.59209173128)*x_ref[1]**o + (-0.0518785429782)*x_ref[1]
+        arg[(2, 1, 0, 2)]=0.308058567188*x[0]**o + (0.504339153278)*x[0] + (0.173283714014)*x[1]**o + (-0.741053368651)*x[1]
+        ref[(2, 1, 0, 2)]=0.308058567188*x_ref[0]**o + (0.504339153278)*x_ref[0] + (0.173283714014)*x_ref[1]**o + (-0.741053368651)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.470518717178*x[0]**o + (-0.786300396378)*x[0] + (-0.00970399025732)*x[1]**o + (-0.92010586004)*x[1]
+        ref[(2, 1, 0, 3)]=-0.470518717178*x_ref[0]**o + (-0.786300396378)*x_ref[0] + (-0.00970399025732)*x_ref[1]**o + (-0.92010586004)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.015008912816*x[0]**o + (-0.7244359633)*x[0] + (0.991512328363)*x[1]**o + (0.989007182118)*x[1]
+        ref[(2, 1, 1, 0)]=-0.015008912816*x_ref[0]**o + (-0.7244359633)*x_ref[0] + (0.991512328363)*x_ref[1]**o + (0.989007182118)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.609562037429*x[0]**o + (-0.160796065609)*x[0] + (-0.604368458865)*x[1]**o + (0.940665891351)*x[1]
+        ref[(2, 1, 1, 1)]=0.609562037429*x_ref[0]**o + (-0.160796065609)*x_ref[0] + (-0.604368458865)*x_ref[1]**o + (0.940665891351)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.579733724684*x[0]**o + (0.908742375045)*x[0] + (-0.918483556566)*x[1]**o + (0.186023187217)*x[1]
+        ref[(2, 1, 1, 2)]=-0.579733724684*x_ref[0]**o + (0.908742375045)*x_ref[0] + (-0.918483556566)*x_ref[1]**o + (0.186023187217)*x_ref[1]
+        arg[(2, 1, 1, 3)]=0.474273965776*x[0]**o + (0.177575400583)*x[0] + (-0.0135275996462)*x[1]**o + (0.5291842025)*x[1]
+        ref[(2, 1, 1, 3)]=0.474273965776*x_ref[0]**o + (0.177575400583)*x_ref[0] + (-0.0135275996462)*x_ref[1]**o + (0.5291842025)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.337733727655*x[0]**o + (0.68789340238)*x[0] + (-0.594687999469)*x[1]**o + (0.511113376322)*x[1]
+        ref[(2, 1, 2, 0)]=0.337733727655*x_ref[0]**o + (0.68789340238)*x_ref[0] + (-0.594687999469)*x_ref[1]**o + (0.511113376322)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.206025117605*x[0]**o + (-0.315654848681)*x[0] + (0.867646379135)*x[1]**o + (-0.00866291293288)*x[1]
+        ref[(2, 1, 2, 1)]=-0.206025117605*x_ref[0]**o + (-0.315654848681)*x_ref[0] + (0.867646379135)*x_ref[1]**o + (-0.00866291293288)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.957335452035*x[0]**o + (-0.710742228599)*x[0] + (0.64396044768)*x[1]**o + (0.578952806279)*x[1]
+        ref[(2, 1, 2, 2)]=0.957335452035*x_ref[0]**o + (-0.710742228599)*x_ref[0] + (0.64396044768)*x_ref[1]**o + (0.578952806279)*x_ref[1]
+        arg[(2, 1, 2, 3)]=-0.910943327508*x[0]**o + (-0.771954179141)*x[0] + (-0.138388332327)*x[1]**o + (0.458960366471)*x[1]
+        ref[(2, 1, 2, 3)]=-0.910943327508*x_ref[0]**o + (-0.771954179141)*x_ref[0] + (-0.138388332327)*x_ref[1]**o + (0.458960366471)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.043828495*x[0]**o + (-0.934704737212)*x[0] + (-0.355448464892)*x[1]**o + (-0.761366119385)*x[1]
+        ref[(2, 1, 3, 0)]=0.043828495*x_ref[0]**o + (-0.934704737212)*x_ref[0] + (-0.355448464892)*x_ref[1]**o + (-0.761366119385)*x_ref[1]
+        arg[(2, 1, 3, 1)]=-0.757616191723*x[0]**o + (-0.357807278117)*x[0] + (-0.054724864202)*x[1]**o + (-0.333389365909)*x[1]
+        ref[(2, 1, 3, 1)]=-0.757616191723*x_ref[0]**o + (-0.357807278117)*x_ref[0] + (-0.054724864202)*x_ref[1]**o + (-0.333389365909)*x_ref[1]
+        arg[(2, 1, 3, 2)]=0.997017841016*x[0]**o + (-0.0633385464719)*x[0] + (-0.148408599416)*x[1]**o + (0.400529569452)*x[1]
+        ref[(2, 1, 3, 2)]=0.997017841016*x_ref[0]**o + (-0.0633385464719)*x_ref[0] + (-0.148408599416)*x_ref[1]**o + (0.400529569452)*x_ref[1]
+        arg[(2, 1, 3, 3)]=0.768035746341*x[0]**o + (-0.7818823601)*x[0] + (-0.194962910487)*x[1]**o + (-0.961652118943)*x[1]
+        ref[(2, 1, 3, 3)]=0.768035746341*x_ref[0]**o + (-0.7818823601)*x_ref[0] + (-0.194962910487)*x_ref[1]**o + (-0.961652118943)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.884906323756*x[0]**o + (-0.526097767271)*x[0] + (0.289295258842)*x[1]**o + (0.978739500099)*x[1]
+        ref[(2, 2, 0, 0)]=0.884906323756*x_ref[0]**o + (-0.526097767271)*x_ref[0] + (0.289295258842)*x_ref[1]**o + (0.978739500099)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.483149714259*x[0]**o + (0.605005214769)*x[0] + (-0.276231364247)*x[1]**o + (0.950186843356)*x[1]
+        ref[(2, 2, 0, 1)]=0.483149714259*x_ref[0]**o + (0.605005214769)*x_ref[0] + (-0.276231364247)*x_ref[1]**o + (0.950186843356)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.672320761355*x[0]**o + (0.988702952649)*x[0] + (-0.299313090788)*x[1]**o + (-0.265043552859)*x[1]
+        ref[(2, 2, 0, 2)]=0.672320761355*x_ref[0]**o + (0.988702952649)*x_ref[0] + (-0.299313090788)*x_ref[1]**o + (-0.265043552859)*x_ref[1]
+        arg[(2, 2, 0, 3)]=-0.371273917461*x[0]**o + (-0.652849850247)*x[0] + (0.298393762051)*x[1]**o + (-0.08594556683)*x[1]
+        ref[(2, 2, 0, 3)]=-0.371273917461*x_ref[0]**o + (-0.652849850247)*x_ref[0] + (0.298393762051)*x_ref[1]**o + (-0.08594556683)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.0136622097835*x[0]**o + (0.247069670896)*x[0] + (-0.256531552071)*x[1]**o + (0.6267749891)*x[1]
+        ref[(2, 2, 1, 0)]=-0.0136622097835*x_ref[0]**o + (0.247069670896)*x_ref[0] + (-0.256531552071)*x_ref[1]**o + (0.6267749891)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.233949819486*x[0]**o + (-0.605257007809)*x[0] + (0.055107117099)*x[1]**o + (-0.500029540983)*x[1]
+        ref[(2, 2, 1, 1)]=-0.233949819486*x_ref[0]**o + (-0.605257007809)*x_ref[0] + (0.055107117099)*x_ref[1]**o + (-0.500029540983)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.685578128293*x[0]**o + (-0.210169474013)*x[0] + (0.515351560798)*x[1]**o + (-0.498487986145)*x[1]
+        ref[(2, 2, 1, 2)]=-0.685578128293*x_ref[0]**o + (-0.210169474013)*x_ref[0] + (0.515351560798)*x_ref[1]**o + (-0.498487986145)*x_ref[1]
+        arg[(2, 2, 1, 3)]=-0.665219190109*x[0]**o + (-0.817003745446)*x[0] + (0.939869229296)*x[1]**o + (-0.5091646595)*x[1]
+        ref[(2, 2, 1, 3)]=-0.665219190109*x_ref[0]**o + (-0.817003745446)*x_ref[0] + (0.939869229296)*x_ref[1]**o + (-0.5091646595)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.728097092693*x[0]**o + (0.11196343351)*x[0] + (0.666378006141)*x[1]**o + (0.568208502867)*x[1]
+        ref[(2, 2, 2, 0)]=-0.728097092693*x_ref[0]**o + (0.11196343351)*x_ref[0] + (0.666378006141)*x_ref[1]**o + (0.568208502867)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.7439077281*x[0]**o + (0.173875770027)*x[0] + (-0.684321173826)*x[1]**o + (-0.974916218007)*x[1]
+        ref[(2, 2, 2, 1)]=0.7439077281*x_ref[0]**o + (0.173875770027)*x_ref[0] + (-0.684321173826)*x_ref[1]**o + (-0.974916218007)*x_ref[1]
+        arg[(2, 2, 2, 2)]=0.235166535899*x[0]**o + (-0.214410180483)*x[0] + (-0.867959597458)*x[1]**o + (-0.980796826784)*x[1]
+        ref[(2, 2, 2, 2)]=0.235166535899*x_ref[0]**o + (-0.214410180483)*x_ref[0] + (-0.867959597458)*x_ref[1]**o + (-0.980796826784)*x_ref[1]
+        arg[(2, 2, 2, 3)]=-0.287753983409*x[0]**o + (0.0413326286419)*x[0] + (0.227628441674)*x[1]**o + (0.991746640798)*x[1]
+        ref[(2, 2, 2, 3)]=-0.287753983409*x_ref[0]**o + (0.0413326286419)*x_ref[0] + (0.227628441674)*x_ref[1]**o + (0.991746640798)*x_ref[1]
+        arg[(2, 2, 3, 0)]=0.0864548692829*x[0]**o + (-0.776233975233)*x[0] + (-0.789945168901)*x[1]**o + (-0.56076687986)*x[1]
+        ref[(2, 2, 3, 0)]=0.0864548692829*x_ref[0]**o + (-0.776233975233)*x_ref[0] + (-0.789945168901)*x_ref[1]**o + (-0.56076687986)*x_ref[1]
+        arg[(2, 2, 3, 1)]=0.276389387316*x[0]**o + (-0.101666135912)*x[0] + (0.186456365732)*x[1]**o + (-0.563652210818)*x[1]
+        ref[(2, 2, 3, 1)]=0.276389387316*x_ref[0]**o + (-0.101666135912)*x_ref[0] + (0.186456365732)*x_ref[1]**o + (-0.563652210818)*x_ref[1]
+        arg[(2, 2, 3, 2)]=0.125268756994*x[0]**o + (-0.178217906319)*x[0] + (0.327281223918)*x[1]**o + (-0.889525333912)*x[1]
+        ref[(2, 2, 3, 2)]=0.125268756994*x_ref[0]**o + (-0.178217906319)*x_ref[0] + (0.327281223918)*x_ref[1]**o + (-0.889525333912)*x_ref[1]
+        arg[(2, 2, 3, 3)]=-0.0842736825167*x[0]**o + (0.395301634615)*x[0] + (0.995948717314)*x[1]**o + (0.189370567768)*x[1]
+        ref[(2, 2, 3, 3)]=-0.0842736825167*x_ref[0]**o + (0.395301634615)*x_ref[0] + (0.995948717314)*x_ref[1]**o + (0.189370567768)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.48826955144*x[0]**o + (-0.747126923339)*x[0] + (-0.319015585098)*x[1]**o + (0.104393801511)*x[1]
+        ref[(2, 3, 0, 0)]=0.48826955144*x_ref[0]**o + (-0.747126923339)*x_ref[0] + (-0.319015585098)*x_ref[1]**o + (0.104393801511)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.627105859433*x[0]**o + (0.838672034942)*x[0] + (-0.133492136187)*x[1]**o + (0.444345640314)*x[1]
+        ref[(2, 3, 0, 1)]=0.627105859433*x_ref[0]**o + (0.838672034942)*x_ref[0] + (-0.133492136187)*x_ref[1]**o + (0.444345640314)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.219992315015*x[0]**o + (-0.630142775565)*x[0] + (0.268660499129)*x[1]**o + (0.659830038348)*x[1]
+        ref[(2, 3, 0, 2)]=0.219992315015*x_ref[0]**o + (-0.630142775565)*x_ref[0] + (0.268660499129)*x_ref[1]**o + (0.659830038348)*x_ref[1]
+        arg[(2, 3, 0, 3)]=0.0680063994974*x[0]**o + (-0.674974512548)*x[0] + (0.77210126963)*x[1]**o + (-0.135138703152)*x[1]
+        ref[(2, 3, 0, 3)]=0.0680063994974*x_ref[0]**o + (-0.674974512548)*x_ref[0] + (0.77210126963)*x_ref[1]**o + (-0.135138703152)*x_ref[1]
+        arg[(2, 3, 1, 0)]=-0.817608689169*x[0]**o + (0.822999015731)*x[0] + (-0.224139398727)*x[1]**o + (0.0680099382205)*x[1]
+        ref[(2, 3, 1, 0)]=-0.817608689169*x_ref[0]**o + (0.822999015731)*x_ref[0] + (-0.224139398727)*x_ref[1]**o + (0.0680099382205)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.667741965511*x[0]**o + (0.61367368076)*x[0] + (-0.340746168101)*x[1]**o + (-0.0168420638755)*x[1]
+        ref[(2, 3, 1, 1)]=-0.667741965511*x_ref[0]**o + (0.61367368076)*x_ref[0] + (-0.340746168101)*x_ref[1]**o + (-0.0168420638755)*x_ref[1]
+        arg[(2, 3, 1, 2)]=-0.153734048769*x[0]**o + (0.198530735303)*x[0] + (0.155710688888)*x[1]**o + (0.372265028663)*x[1]
+        ref[(2, 3, 1, 2)]=-0.153734048769*x_ref[0]**o + (0.198530735303)*x_ref[0] + (0.155710688888)*x_ref[1]**o + (0.372265028663)*x_ref[1]
+        arg[(2, 3, 1, 3)]=-0.175414626415*x[0]**o + (0.747409758705)*x[0] + (-0.453456413068)*x[1]**o + (-0.165947737477)*x[1]
+        ref[(2, 3, 1, 3)]=-0.175414626415*x_ref[0]**o + (0.747409758705)*x_ref[0] + (-0.453456413068)*x_ref[1]**o + (-0.165947737477)*x_ref[1]
+        arg[(2, 3, 2, 0)]=0.157952509588*x[0]**o + (-0.898296658063)*x[0] + (-0.280829801464)*x[1]**o + (0.347005882885)*x[1]
+        ref[(2, 3, 2, 0)]=0.157952509588*x_ref[0]**o + (-0.898296658063)*x_ref[0] + (-0.280829801464)*x_ref[1]**o + (0.347005882885)*x_ref[1]
+        arg[(2, 3, 2, 1)]=0.429090641844*x[0]**o + (0.0689799349346)*x[0] + (0.309259856387)*x[1]**o + (-0.258712264402)*x[1]
+        ref[(2, 3, 2, 1)]=0.429090641844*x_ref[0]**o + (0.0689799349346)*x_ref[0] + (0.309259856387)*x_ref[1]**o + (-0.258712264402)*x_ref[1]
+        arg[(2, 3, 2, 2)]=0.742199854229*x[0]**o + (-0.420538071014)*x[0] + (-0.419983962537)*x[1]**o + (-0.236731284073)*x[1]
+        ref[(2, 3, 2, 2)]=0.742199854229*x_ref[0]**o + (-0.420538071014)*x_ref[0] + (-0.419983962537)*x_ref[1]**o + (-0.236731284073)*x_ref[1]
+        arg[(2, 3, 2, 3)]=-0.159979909183*x[0]**o + (-0.984905073798)*x[0] + (0.693545055609)*x[1]**o + (-0.805944554702)*x[1]
+        ref[(2, 3, 2, 3)]=-0.159979909183*x_ref[0]**o + (-0.984905073798)*x_ref[0] + (0.693545055609)*x_ref[1]**o + (-0.805944554702)*x_ref[1]
+        arg[(2, 3, 3, 0)]=-0.353615543701*x[0]**o + (-0.37385477108)*x[0] + (0.555931504707)*x[1]**o + (-0.7149896436)*x[1]
+        ref[(2, 3, 3, 0)]=-0.353615543701*x_ref[0]**o + (-0.37385477108)*x_ref[0] + (0.555931504707)*x_ref[1]**o + (-0.7149896436)*x_ref[1]
+        arg[(2, 3, 3, 1)]=0.200400684696*x[0]**o + (0.42282161039)*x[0] + (0.559124104289)*x[1]**o + (-0.823499618011)*x[1]
+        ref[(2, 3, 3, 1)]=0.200400684696*x_ref[0]**o + (0.42282161039)*x_ref[0] + (0.559124104289)*x_ref[1]**o + (-0.823499618011)*x_ref[1]
+        arg[(2, 3, 3, 2)]=0.629236482447*x[0]**o + (0.0980350860964)*x[0] + (0.62617661617)*x[1]**o + (0.759987494606)*x[1]
+        ref[(2, 3, 3, 2)]=0.629236482447*x_ref[0]**o + (0.0980350860964)*x_ref[0] + (0.62617661617)*x_ref[1]**o + (0.759987494606)*x_ref[1]
+        arg[(2, 3, 3, 3)]=-0.613804765136*x[0]**o + (0.405412781615)*x[0] + (0.310057758693)*x[1]**o + (0.0812462237544)*x[1]
+        ref[(2, 3, 3, 3)]=-0.613804765136*x_ref[0]**o + (0.405412781615)*x_ref[0] + (0.310057758693)*x_ref[1]**o + (0.0812462237544)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.657034472505*x[2]**o + (0.853190618136)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.657034472505*x_ref[2]**o + (0.853190618136)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.925618651522*x[2]**o + (0.591830523701)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.925618651522*x_ref[2]**o + (0.591830523701)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.971381393519*x[2]**o + (0.304141771916)*x[2]
+            ref[(0, 0, 0, 2)]+=-0.971381393519*x_ref[2]**o + (0.304141771916)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.519485285899*x[2]**o + (0.240208866528)*x[2]
+            ref[(0, 0, 0, 3)]+=0.519485285899*x_ref[2]**o + (0.240208866528)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.0149334403706*x[2]**o + (-0.664577216354)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.0149334403706*x_ref[2]**o + (-0.664577216354)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.491051015585*x[2]**o + (-0.979330934622)*x[2]
+            ref[(0, 0, 1, 1)]+=0.491051015585*x_ref[2]**o + (-0.979330934622)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.639745269476*x[2]**o + (-0.533066774603)*x[2]
+            ref[(0, 0, 1, 2)]+=0.639745269476*x_ref[2]**o + (-0.533066774603)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.526974125508*x[2]**o + (0.381453258762)*x[2]
+            ref[(0, 0, 1, 3)]+=0.526974125508*x_ref[2]**o + (0.381453258762)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.559536949855*x[2]**o + (-0.24726270109)*x[2]
+            ref[(0, 0, 2, 0)]+=0.559536949855*x_ref[2]**o + (-0.24726270109)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.606855914195*x[2]**o + (0.963658386322)*x[2]
+            ref[(0, 0, 2, 1)]+=0.606855914195*x_ref[2]**o + (0.963658386322)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.527166040374*x[2]**o + (0.76244072748)*x[2]
+            ref[(0, 0, 2, 2)]+=0.527166040374*x_ref[2]**o + (0.76244072748)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=0.518265133858*x[2]**o + (0.311691964136)*x[2]
+            ref[(0, 0, 2, 3)]+=0.518265133858*x_ref[2]**o + (0.311691964136)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.954652231017*x[2]**o + (-0.318361550337)*x[2]
+            ref[(0, 0, 3, 0)]+=0.954652231017*x_ref[2]**o + (-0.318361550337)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.642743880538*x[2]**o + (-0.66202590884)*x[2]
+            ref[(0, 0, 3, 1)]+=0.642743880538*x_ref[2]**o + (-0.66202590884)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=0.903650246494*x[2]**o + (-0.0150660699803)*x[2]
+            ref[(0, 0, 3, 2)]+=0.903650246494*x_ref[2]**o + (-0.0150660699803)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=-0.303239519495*x[2]**o + (-0.621147039115)*x[2]
+            ref[(0, 0, 3, 3)]+=-0.303239519495*x_ref[2]**o + (-0.621147039115)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.47536979621*x[2]**o + (-0.988344141007)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.47536979621*x_ref[2]**o + (-0.988344141007)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.669336713757*x[2]**o + (-0.182428005568)*x[2]
+            ref[(0, 1, 0, 1)]+=0.669336713757*x_ref[2]**o + (-0.182428005568)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.817105460025*x[2]**o + (-0.135480983344)*x[2]
+            ref[(0, 1, 0, 2)]+=0.817105460025*x_ref[2]**o + (-0.135480983344)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.995801736334*x[2]**o + (-0.996255788671)*x[2]
+            ref[(0, 1, 0, 3)]+=0.995801736334*x_ref[2]**o + (-0.996255788671)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.197539141155*x[2]**o + (-0.353097160072)*x[2]
+            ref[(0, 1, 1, 0)]+=0.197539141155*x_ref[2]**o + (-0.353097160072)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.803472086127*x[2]**o + (-0.675196291167)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.803472086127*x_ref[2]**o + (-0.675196291167)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.950624743308*x[2]**o + (0.545018310511)*x[2]
+            ref[(0, 1, 1, 2)]+=0.950624743308*x_ref[2]**o + (0.545018310511)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.0933827651638*x[2]**o + (0.708890779072)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.0933827651638*x_ref[2]**o + (0.708890779072)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.321933537538*x[2]**o + (-0.315886743903)*x[2]
+            ref[(0, 1, 2, 0)]+=0.321933537538*x_ref[2]**o + (-0.315886743903)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.218174316436*x[2]**o + (-0.997767739032)*x[2]
+            ref[(0, 1, 2, 1)]+=0.218174316436*x_ref[2]**o + (-0.997767739032)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.849962588074*x[2]**o + (-0.662122588489)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.849962588074*x_ref[2]**o + (-0.662122588489)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=-0.226160427998*x[2]**o + (-0.722257633176)*x[2]
+            ref[(0, 1, 2, 3)]+=-0.226160427998*x_ref[2]**o + (-0.722257633176)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.613265790641*x[2]**o + (-0.893203577439)*x[2]
+            ref[(0, 1, 3, 0)]+=-0.613265790641*x_ref[2]**o + (-0.893203577439)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.317678483177*x[2]**o + (-0.935382160542)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.317678483177*x_ref[2]**o + (-0.935382160542)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.861860140665*x[2]**o + (0.624578303584)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.861860140665*x_ref[2]**o + (0.624578303584)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=0.261710637373*x[2]**o + (-0.742117874001)*x[2]
+            ref[(0, 1, 3, 3)]+=0.261710637373*x_ref[2]**o + (-0.742117874001)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.592395440352*x[2]**o + (0.0701242926385)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.592395440352*x_ref[2]**o + (0.0701242926385)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.81248553476*x[2]**o + (0.261899512451)*x[2]
+            ref[(0, 2, 0, 1)]+=0.81248553476*x_ref[2]**o + (0.261899512451)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.230906908005*x[2]**o + (0.534112384261)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.230906908005*x_ref[2]**o + (0.534112384261)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=-0.991904350592*x[2]**o + (-0.0398819604001)*x[2]
+            ref[(0, 2, 0, 3)]+=-0.991904350592*x_ref[2]**o + (-0.0398819604001)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.891223534284*x[2]**o + (0.749992498587)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.891223534284*x_ref[2]**o + (0.749992498587)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.187005215223*x[2]**o + (-0.479028032092)*x[2]
+            ref[(0, 2, 1, 1)]+=0.187005215223*x_ref[2]**o + (-0.479028032092)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.467235649047*x[2]**o + (0.0710181228431)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.467235649047*x_ref[2]**o + (0.0710181228431)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=-0.446140296257*x[2]**o + (0.800210705911)*x[2]
+            ref[(0, 2, 1, 3)]+=-0.446140296257*x_ref[2]**o + (0.800210705911)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.583760833952*x[2]**o + (0.471828019035)*x[2]
+            ref[(0, 2, 2, 0)]+=-0.583760833952*x_ref[2]**o + (0.471828019035)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.870938177624*x[2]**o + (-0.82752112032)*x[2]
+            ref[(0, 2, 2, 1)]+=-0.870938177624*x_ref[2]**o + (-0.82752112032)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=-0.875676358945*x[2]**o + (-0.974124821883)*x[2]
+            ref[(0, 2, 2, 2)]+=-0.875676358945*x_ref[2]**o + (-0.974124821883)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=-0.316305341576*x[2]**o + (0.124650256541)*x[2]
+            ref[(0, 2, 2, 3)]+=-0.316305341576*x_ref[2]**o + (0.124650256541)*x_ref[2]
+            arg[(0, 2, 3, 0)]+=-0.81733739483*x[2]**o + (0.827779916032)*x[2]
+            ref[(0, 2, 3, 0)]+=-0.81733739483*x_ref[2]**o + (0.827779916032)*x_ref[2]
+            arg[(0, 2, 3, 1)]+=0.0410135470828*x[2]**o + (-0.932417742569)*x[2]
+            ref[(0, 2, 3, 1)]+=0.0410135470828*x_ref[2]**o + (-0.932417742569)*x_ref[2]
+            arg[(0, 2, 3, 2)]+=-0.808600965073*x[2]**o + (-0.399599616677)*x[2]
+            ref[(0, 2, 3, 2)]+=-0.808600965073*x_ref[2]**o + (-0.399599616677)*x_ref[2]
+            arg[(0, 2, 3, 3)]+=-0.292354724338*x[2]**o + (-0.545091825531)*x[2]
+            ref[(0, 2, 3, 3)]+=-0.292354724338*x_ref[2]**o + (-0.545091825531)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=0.84951142864*x[2]**o + (-0.113239816858)*x[2]
+            ref[(0, 3, 0, 0)]+=0.84951142864*x_ref[2]**o + (-0.113239816858)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=-0.643843413213*x[2]**o + (0.670450612981)*x[2]
+            ref[(0, 3, 0, 1)]+=-0.643843413213*x_ref[2]**o + (0.670450612981)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=-0.478205387879*x[2]**o + (0.925163498948)*x[2]
+            ref[(0, 3, 0, 2)]+=-0.478205387879*x_ref[2]**o + (0.925163498948)*x_ref[2]
+            arg[(0, 3, 0, 3)]+=0.393575547059*x[2]**o + (0.64153121543)*x[2]
+            ref[(0, 3, 0, 3)]+=0.393575547059*x_ref[2]**o + (0.64153121543)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.266003116726*x[2]**o + (-0.841560246169)*x[2]
+            ref[(0, 3, 1, 0)]+=0.266003116726*x_ref[2]**o + (-0.841560246169)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=-0.23589901928*x[2]**o + (0.604280049277)*x[2]
+            ref[(0, 3, 1, 1)]+=-0.23589901928*x_ref[2]**o + (0.604280049277)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.931367396382*x[2]**o + (0.460122439921)*x[2]
+            ref[(0, 3, 1, 2)]+=0.931367396382*x_ref[2]**o + (0.460122439921)*x_ref[2]
+            arg[(0, 3, 1, 3)]+=-0.604448476425*x[2]**o + (0.13733565795)*x[2]
+            ref[(0, 3, 1, 3)]+=-0.604448476425*x_ref[2]**o + (0.13733565795)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=0.449087086775*x[2]**o + (0.805312988963)*x[2]
+            ref[(0, 3, 2, 0)]+=0.449087086775*x_ref[2]**o + (0.805312988963)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.423472433572*x[2]**o + (0.96957553984)*x[2]
+            ref[(0, 3, 2, 1)]+=-0.423472433572*x_ref[2]**o + (0.96957553984)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.983303678656*x[2]**o + (0.905337218013)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.983303678656*x_ref[2]**o + (0.905337218013)*x_ref[2]
+            arg[(0, 3, 2, 3)]+=-0.0512051016712*x[2]**o + (-0.066616002295)*x[2]
+            ref[(0, 3, 2, 3)]+=-0.0512051016712*x_ref[2]**o + (-0.066616002295)*x_ref[2]
+            arg[(0, 3, 3, 0)]+=-0.126581653526*x[2]**o + (-0.361862590145)*x[2]
+            ref[(0, 3, 3, 0)]+=-0.126581653526*x_ref[2]**o + (-0.361862590145)*x_ref[2]
+            arg[(0, 3, 3, 1)]+=0.829907789824*x[2]**o + (-0.286076323518)*x[2]
+            ref[(0, 3, 3, 1)]+=0.829907789824*x_ref[2]**o + (-0.286076323518)*x_ref[2]
+            arg[(0, 3, 3, 2)]+=0.184717114885*x[2]**o + (0.741778322628)*x[2]
+            ref[(0, 3, 3, 2)]+=0.184717114885*x_ref[2]**o + (0.741778322628)*x_ref[2]
+            arg[(0, 3, 3, 3)]+=-0.333087958558*x[2]**o + (0.0692420412278)*x[2]
+            ref[(0, 3, 3, 3)]+=-0.333087958558*x_ref[2]**o + (0.0692420412278)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.460608444902*x[2]**o + (0.160811690407)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.460608444902*x_ref[2]**o + (0.160811690407)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.307413992219*x[2]**o + (0.202201027499)*x[2]
+            ref[(1, 0, 0, 1)]+=0.307413992219*x_ref[2]**o + (0.202201027499)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.109708875384*x[2]**o + (-0.635187260999)*x[2]
+            ref[(1, 0, 0, 2)]+=0.109708875384*x_ref[2]**o + (-0.635187260999)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.737045899042*x[2]**o + (-0.345773972199)*x[2]
+            ref[(1, 0, 0, 3)]+=0.737045899042*x_ref[2]**o + (-0.345773972199)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.328214922776*x[2]**o + (0.35681689828)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.328214922776*x_ref[2]**o + (0.35681689828)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.32516039978*x[2]**o + (-0.490816852498)*x[2]
+            ref[(1, 0, 1, 1)]+=0.32516039978*x_ref[2]**o + (-0.490816852498)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.158408582753*x[2]**o + (-0.337990950635)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.158408582753*x_ref[2]**o + (-0.337990950635)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.305555023234*x[2]**o + (-0.94285111071)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.305555023234*x_ref[2]**o + (-0.94285111071)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.371874037231*x[2]**o + (0.883681444168)*x[2]
+            ref[(1, 0, 2, 0)]+=0.371874037231*x_ref[2]**o + (0.883681444168)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.615543057993*x[2]**o + (-0.696656708787)*x[2]
+            ref[(1, 0, 2, 1)]+=0.615543057993*x_ref[2]**o + (-0.696656708787)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.201250791185*x[2]**o + (-0.503536433569)*x[2]
+            ref[(1, 0, 2, 2)]+=0.201250791185*x_ref[2]**o + (-0.503536433569)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.536254669165*x[2]**o + (0.950471238588)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.536254669165*x_ref[2]**o + (0.950471238588)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.110200226159*x[2]**o + (0.648624333948)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.110200226159*x_ref[2]**o + (0.648624333948)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.86455568919*x[2]**o + (0.354913650373)*x[2]
+            ref[(1, 0, 3, 1)]+=0.86455568919*x_ref[2]**o + (0.354913650373)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=0.95912401908*x[2]**o + (0.256796295699)*x[2]
+            ref[(1, 0, 3, 2)]+=0.95912401908*x_ref[2]**o + (0.256796295699)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=-0.751461395334*x[2]**o + (0.498215653506)*x[2]
+            ref[(1, 0, 3, 3)]+=-0.751461395334*x_ref[2]**o + (0.498215653506)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.382677078045*x[2]**o + (-0.990442236689)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.382677078045*x_ref[2]**o + (-0.990442236689)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.595920493699*x[2]**o + (-0.423092180018)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.595920493699*x_ref[2]**o + (-0.423092180018)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.945780281178*x[2]**o + (0.990835287031)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.945780281178*x_ref[2]**o + (0.990835287031)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.894070938939*x[2]**o + (-0.0965804986129)*x[2]
+            ref[(1, 1, 0, 3)]+=0.894070938939*x_ref[2]**o + (-0.0965804986129)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.0513314869477*x[2]**o + (-0.816073927646)*x[2]
+            ref[(1, 1, 1, 0)]+=0.0513314869477*x_ref[2]**o + (-0.816073927646)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.555741977803*x[2]**o + (-0.719460071758)*x[2]
+            ref[(1, 1, 1, 1)]+=0.555741977803*x_ref[2]**o + (-0.719460071758)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.0948346067619*x[2]**o + (0.923513684512)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.0948346067619*x_ref[2]**o + (0.923513684512)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.556622953226*x[2]**o + (-0.543724957665)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.556622953226*x_ref[2]**o + (-0.543724957665)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.584584840274*x[2]**o + (0.0204843131094)*x[2]
+            ref[(1, 1, 2, 0)]+=0.584584840274*x_ref[2]**o + (0.0204843131094)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.10427955376*x[2]**o + (0.149447744258)*x[2]
+            ref[(1, 1, 2, 1)]+=0.10427955376*x_ref[2]**o + (0.149447744258)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.389325076908*x[2]**o + (0.263042149992)*x[2]
+            ref[(1, 1, 2, 2)]+=0.389325076908*x_ref[2]**o + (0.263042149992)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.637682398511*x[2]**o + (-0.289126383107)*x[2]
+            ref[(1, 1, 2, 3)]+=0.637682398511*x_ref[2]**o + (-0.289126383107)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=0.280875696746*x[2]**o + (0.480328431451)*x[2]
+            ref[(1, 1, 3, 0)]+=0.280875696746*x_ref[2]**o + (0.480328431451)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.935042296044*x[2]**o + (-0.556776484603)*x[2]
+            ref[(1, 1, 3, 1)]+=0.935042296044*x_ref[2]**o + (-0.556776484603)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=0.432447087532*x[2]**o + (-0.563950814688)*x[2]
+            ref[(1, 1, 3, 2)]+=0.432447087532*x_ref[2]**o + (-0.563950814688)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=0.188444012361*x[2]**o + (-0.0939651313849)*x[2]
+            ref[(1, 1, 3, 3)]+=0.188444012361*x_ref[2]**o + (-0.0939651313849)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.823588532984*x[2]**o + (0.371111637483)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.823588532984*x_ref[2]**o + (0.371111637483)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.555378900233*x[2]**o + (-0.491730436285)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.555378900233*x_ref[2]**o + (-0.491730436285)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.47326242887*x[2]**o + (0.419947415297)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.47326242887*x_ref[2]**o + (0.419947415297)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=0.662817426653*x[2]**o + (0.134546209148)*x[2]
+            ref[(1, 2, 0, 3)]+=0.662817426653*x_ref[2]**o + (0.134546209148)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.993027902957*x[2]**o + (0.687584883807)*x[2]
+            ref[(1, 2, 1, 0)]+=0.993027902957*x_ref[2]**o + (0.687584883807)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.912543862425*x[2]**o + (0.224775264814)*x[2]
+            ref[(1, 2, 1, 1)]+=0.912543862425*x_ref[2]**o + (0.224775264814)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.417121307595*x[2]**o + (-0.718317333862)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.417121307595*x_ref[2]**o + (-0.718317333862)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=0.25267896825*x[2]**o + (-0.419517112077)*x[2]
+            ref[(1, 2, 1, 3)]+=0.25267896825*x_ref[2]**o + (-0.419517112077)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=0.589454762992*x[2]**o + (-0.185637471949)*x[2]
+            ref[(1, 2, 2, 0)]+=0.589454762992*x_ref[2]**o + (-0.185637471949)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.227576462957*x[2]**o + (-0.957661232336)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.227576462957*x_ref[2]**o + (-0.957661232336)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.0208888101161*x[2]**o + (0.55379831044)*x[2]
+            ref[(1, 2, 2, 2)]+=0.0208888101161*x_ref[2]**o + (0.55379831044)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=-0.798209064725*x[2]**o + (0.0963217871841)*x[2]
+            ref[(1, 2, 2, 3)]+=-0.798209064725*x_ref[2]**o + (0.0963217871841)*x_ref[2]
+            arg[(1, 2, 3, 0)]+=0.731204208071*x[2]**o + (0.345597190052)*x[2]
+            ref[(1, 2, 3, 0)]+=0.731204208071*x_ref[2]**o + (0.345597190052)*x_ref[2]
+            arg[(1, 2, 3, 1)]+=-0.859478720083*x[2]**o + (-0.604793718277)*x[2]
+            ref[(1, 2, 3, 1)]+=-0.859478720083*x_ref[2]**o + (-0.604793718277)*x_ref[2]
+            arg[(1, 2, 3, 2)]+=0.312317522148*x[2]**o + (-0.966711334564)*x[2]
+            ref[(1, 2, 3, 2)]+=0.312317522148*x_ref[2]**o + (-0.966711334564)*x_ref[2]
+            arg[(1, 2, 3, 3)]+=-0.236052881872*x[2]**o + (-0.336591088693)*x[2]
+            ref[(1, 2, 3, 3)]+=-0.236052881872*x_ref[2]**o + (-0.336591088693)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.227992183122*x[2]**o + (0.154393915724)*x[2]
+            ref[(1, 3, 0, 0)]+=0.227992183122*x_ref[2]**o + (0.154393915724)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=-0.361223510459*x[2]**o + (-0.200976512562)*x[2]
+            ref[(1, 3, 0, 1)]+=-0.361223510459*x_ref[2]**o + (-0.200976512562)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.0408791458787*x[2]**o + (-0.0120148801222)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.0408791458787*x_ref[2]**o + (-0.0120148801222)*x_ref[2]
+            arg[(1, 3, 0, 3)]+=-0.194638328545*x[2]**o + (-0.681293592342)*x[2]
+            ref[(1, 3, 0, 3)]+=-0.194638328545*x_ref[2]**o + (-0.681293592342)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=-0.124197228015*x[2]**o + (-0.950547056904)*x[2]
+            ref[(1, 3, 1, 0)]+=-0.124197228015*x_ref[2]**o + (-0.950547056904)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.823670250479*x[2]**o + (0.847554999803)*x[2]
+            ref[(1, 3, 1, 1)]+=-0.823670250479*x_ref[2]**o + (0.847554999803)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=-0.0285670055231*x[2]**o + (-0.586089715385)*x[2]
+            ref[(1, 3, 1, 2)]+=-0.0285670055231*x_ref[2]**o + (-0.586089715385)*x_ref[2]
+            arg[(1, 3, 1, 3)]+=0.596560615379*x[2]**o + (-0.468369629948)*x[2]
+            ref[(1, 3, 1, 3)]+=0.596560615379*x_ref[2]**o + (-0.468369629948)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=0.809902124543*x[2]**o + (0.787847266785)*x[2]
+            ref[(1, 3, 2, 0)]+=0.809902124543*x_ref[2]**o + (0.787847266785)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.379729568251*x[2]**o + (0.127913339745)*x[2]
+            ref[(1, 3, 2, 1)]+=0.379729568251*x_ref[2]**o + (0.127913339745)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.962037989782*x[2]**o + (0.340863835577)*x[2]
+            ref[(1, 3, 2, 2)]+=0.962037989782*x_ref[2]**o + (0.340863835577)*x_ref[2]
+            arg[(1, 3, 2, 3)]+=-0.562312734596*x[2]**o + (-0.395342336496)*x[2]
+            ref[(1, 3, 2, 3)]+=-0.562312734596*x_ref[2]**o + (-0.395342336496)*x_ref[2]
+            arg[(1, 3, 3, 0)]+=-0.950894191579*x[2]**o + (-0.740424423944)*x[2]
+            ref[(1, 3, 3, 0)]+=-0.950894191579*x_ref[2]**o + (-0.740424423944)*x_ref[2]
+            arg[(1, 3, 3, 1)]+=0.299429314431*x[2]**o + (-0.808985203743)*x[2]
+            ref[(1, 3, 3, 1)]+=0.299429314431*x_ref[2]**o + (-0.808985203743)*x_ref[2]
+            arg[(1, 3, 3, 2)]+=0.47574401747*x[2]**o + (0.249299490023)*x[2]
+            ref[(1, 3, 3, 2)]+=0.47574401747*x_ref[2]**o + (0.249299490023)*x_ref[2]
+            arg[(1, 3, 3, 3)]+=-0.0182524519699*x[2]**o + (0.489417111578)*x[2]
+            ref[(1, 3, 3, 3)]+=-0.0182524519699*x_ref[2]**o + (0.489417111578)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.834876093407*x[2]**o + (-0.480099341106)*x[2]
+            ref[(2, 0, 0, 0)]+=0.834876093407*x_ref[2]**o + (-0.480099341106)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.513063371188*x[2]**o + (-0.384150490189)*x[2]
+            ref[(2, 0, 0, 1)]+=0.513063371188*x_ref[2]**o + (-0.384150490189)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.88615404385*x[2]**o + (-0.169890943427)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.88615404385*x_ref[2]**o + (-0.169890943427)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.241900833509*x[2]**o + (0.977576088085)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.241900833509*x_ref[2]**o + (0.977576088085)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.213180294543*x[2]**o + (-0.760803499988)*x[2]
+            ref[(2, 0, 1, 0)]+=0.213180294543*x_ref[2]**o + (-0.760803499988)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.160156845506*x[2]**o + (0.871876553156)*x[2]
+            ref[(2, 0, 1, 1)]+=-0.160156845506*x_ref[2]**o + (0.871876553156)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.594362987033*x[2]**o + (0.661354910568)*x[2]
+            ref[(2, 0, 1, 2)]+=0.594362987033*x_ref[2]**o + (0.661354910568)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.131781615873*x[2]**o + (-0.136884755127)*x[2]
+            ref[(2, 0, 1, 3)]+=0.131781615873*x_ref[2]**o + (-0.136884755127)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.377740723464*x[2]**o + (-0.472376620996)*x[2]
+            ref[(2, 0, 2, 0)]+=0.377740723464*x_ref[2]**o + (-0.472376620996)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.505286650219*x[2]**o + (-0.883284220841)*x[2]
+            ref[(2, 0, 2, 1)]+=-0.505286650219*x_ref[2]**o + (-0.883284220841)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.315122455535*x[2]**o + (-0.234531891623)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.315122455535*x_ref[2]**o + (-0.234531891623)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=0.658998752713*x[2]**o + (-0.823277928827)*x[2]
+            ref[(2, 0, 2, 3)]+=0.658998752713*x_ref[2]**o + (-0.823277928827)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.993023603359*x[2]**o + (-0.660142607824)*x[2]
+            ref[(2, 0, 3, 0)]+=0.993023603359*x_ref[2]**o + (-0.660142607824)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=0.331774715005*x[2]**o + (-0.862659323311)*x[2]
+            ref[(2, 0, 3, 1)]+=0.331774715005*x_ref[2]**o + (-0.862659323311)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=-0.599947715037*x[2]**o + (0.735697957931)*x[2]
+            ref[(2, 0, 3, 2)]+=-0.599947715037*x_ref[2]**o + (0.735697957931)*x_ref[2]
+            arg[(2, 0, 3, 3)]+=-0.329099193458*x[2]**o + (0.970407723659)*x[2]
+            ref[(2, 0, 3, 3)]+=-0.329099193458*x_ref[2]**o + (0.970407723659)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.729167569338*x[2]**o + (-0.562405533763)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.729167569338*x_ref[2]**o + (-0.562405533763)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.441214225054*x[2]**o + (0.0195638477347)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.441214225054*x_ref[2]**o + (0.0195638477347)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.223828489798*x[2]**o + (0.945069062757)*x[2]
+            ref[(2, 1, 0, 2)]+=0.223828489798*x_ref[2]**o + (0.945069062757)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.990020607309*x[2]**o + (-0.98463254204)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.990020607309*x_ref[2]**o + (-0.98463254204)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.0486665604023*x[2]**o + (0.9498730497)*x[2]
+            ref[(2, 1, 1, 0)]+=-0.0486665604023*x_ref[2]**o + (0.9498730497)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.63620611016*x[2]**o + (0.164929131841)*x[2]
+            ref[(2, 1, 1, 1)]+=0.63620611016*x_ref[2]**o + (0.164929131841)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.508086924172*x[2]**o + (0.497214665742)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.508086924172*x_ref[2]**o + (0.497214665742)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.85721412071*x[2]**o + (-0.882873256768)*x[2]
+            ref[(2, 1, 1, 3)]+=0.85721412071*x_ref[2]**o + (-0.882873256768)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.586799014044*x[2]**o + (-0.383266956518)*x[2]
+            ref[(2, 1, 2, 0)]+=0.586799014044*x_ref[2]**o + (-0.383266956518)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.667127088148*x[2]**o + (0.514571646269)*x[2]
+            ref[(2, 1, 2, 1)]+=0.667127088148*x_ref[2]**o + (0.514571646269)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=-0.159934520322*x[2]**o + (-0.359400181229)*x[2]
+            ref[(2, 1, 2, 2)]+=-0.159934520322*x_ref[2]**o + (-0.359400181229)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=-0.250923287327*x[2]**o + (-0.249745464924)*x[2]
+            ref[(2, 1, 2, 3)]+=-0.250923287327*x_ref[2]**o + (-0.249745464924)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=0.525340671161*x[2]**o + (-0.817866494564)*x[2]
+            ref[(2, 1, 3, 0)]+=0.525340671161*x_ref[2]**o + (-0.817866494564)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=0.693619807151*x[2]**o + (-0.196960647299)*x[2]
+            ref[(2, 1, 3, 1)]+=0.693619807151*x_ref[2]**o + (-0.196960647299)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=0.681495553017*x[2]**o + (0.107970732343)*x[2]
+            ref[(2, 1, 3, 2)]+=0.681495553017*x_ref[2]**o + (0.107970732343)*x_ref[2]
+            arg[(2, 1, 3, 3)]+=0.981544697477*x[2]**o + (0.596377142159)*x[2]
+            ref[(2, 1, 3, 3)]+=0.981544697477*x_ref[2]**o + (0.596377142159)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.88726318531*x[2]**o + (-0.555402321796)*x[2]
+            ref[(2, 2, 0, 0)]+=-0.88726318531*x_ref[2]**o + (-0.555402321796)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.202440961856*x[2]**o + (0.511674331742)*x[2]
+            ref[(2, 2, 0, 1)]+=0.202440961856*x_ref[2]**o + (0.511674331742)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.191869542668*x[2]**o + (-0.612220161707)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.191869542668*x_ref[2]**o + (-0.612220161707)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=0.948943556909*x[2]**o + (-0.917784155677)*x[2]
+            ref[(2, 2, 0, 3)]+=0.948943556909*x_ref[2]**o + (-0.917784155677)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.0802011735128*x[2]**o + (-0.150274834765)*x[2]
+            ref[(2, 2, 1, 0)]+=0.0802011735128*x_ref[2]**o + (-0.150274834765)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.413900657098*x[2]**o + (-0.671577976252)*x[2]
+            ref[(2, 2, 1, 1)]+=-0.413900657098*x_ref[2]**o + (-0.671577976252)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.716105274591*x[2]**o + (-0.669753788763)*x[2]
+            ref[(2, 2, 1, 2)]+=0.716105274591*x_ref[2]**o + (-0.669753788763)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=-0.535001851673*x[2]**o + (0.71727992699)*x[2]
+            ref[(2, 2, 1, 3)]+=-0.535001851673*x_ref[2]**o + (0.71727992699)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=0.542948233115*x[2]**o + (-0.460775929169)*x[2]
+            ref[(2, 2, 2, 0)]+=0.542948233115*x_ref[2]**o + (-0.460775929169)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=-0.381165742527*x[2]**o + (0.127646753938)*x[2]
+            ref[(2, 2, 2, 1)]+=-0.381165742527*x_ref[2]**o + (0.127646753938)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=0.827773718966*x[2]**o + (0.577079658786)*x[2]
+            ref[(2, 2, 2, 2)]+=0.827773718966*x_ref[2]**o + (0.577079658786)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=-0.196792152143*x[2]**o + (0.229241121335)*x[2]
+            ref[(2, 2, 2, 3)]+=-0.196792152143*x_ref[2]**o + (0.229241121335)*x_ref[2]
+            arg[(2, 2, 3, 0)]+=-0.55805246338*x[2]**o + (0.293199070085)*x[2]
+            ref[(2, 2, 3, 0)]+=-0.55805246338*x_ref[2]**o + (0.293199070085)*x_ref[2]
+            arg[(2, 2, 3, 1)]+=-0.0832044502323*x[2]**o + (0.598719337862)*x[2]
+            ref[(2, 2, 3, 1)]+=-0.0832044502323*x_ref[2]**o + (0.598719337862)*x_ref[2]
+            arg[(2, 2, 3, 2)]+=-0.487466651398*x[2]**o + (0.486546772957)*x[2]
+            ref[(2, 2, 3, 2)]+=-0.487466651398*x_ref[2]**o + (0.486546772957)*x_ref[2]
+            arg[(2, 2, 3, 3)]+=-0.683342191923*x[2]**o + (-0.470290112857)*x[2]
+            ref[(2, 2, 3, 3)]+=-0.683342191923*x_ref[2]**o + (-0.470290112857)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=0.546849665288*x[2]**o + (-0.770349439616)*x[2]
+            ref[(2, 3, 0, 0)]+=0.546849665288*x_ref[2]**o + (-0.770349439616)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.512261302237*x[2]**o + (0.864309675706)*x[2]
+            ref[(2, 3, 0, 1)]+=0.512261302237*x_ref[2]**o + (0.864309675706)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=-0.11048558236*x[2]**o + (-0.656736216711)*x[2]
+            ref[(2, 3, 0, 2)]+=-0.11048558236*x_ref[2]**o + (-0.656736216711)*x_ref[2]
+            arg[(2, 3, 0, 3)]+=0.92806864318*x[2]**o + (-0.0921919075557)*x[2]
+            ref[(2, 3, 0, 3)]+=0.92806864318*x_ref[2]**o + (-0.0921919075557)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.236979374375*x[2]**o + (-0.355946293529)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.236979374375*x_ref[2]**o + (-0.355946293529)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.754174950689*x[2]**o + (0.230138522161)*x[2]
+            ref[(2, 3, 1, 1)]+=0.754174950689*x_ref[2]**o + (0.230138522161)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=0.2257353468*x[2]**o + (0.202088270476)*x[2]
+            ref[(2, 3, 1, 2)]+=0.2257353468*x_ref[2]**o + (0.202088270476)*x_ref[2]
+            arg[(2, 3, 1, 3)]+=-0.0789913584486*x[2]**o + (0.894165223303)*x[2]
+            ref[(2, 3, 1, 3)]+=-0.0789913584486*x_ref[2]**o + (0.894165223303)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=-0.522736846972*x[2]**o + (0.459726120354)*x[2]
+            ref[(2, 3, 2, 0)]+=-0.522736846972*x_ref[2]**o + (0.459726120354)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=0.677558399432*x[2]**o + (0.127000006009)*x[2]
+            ref[(2, 3, 2, 1)]+=0.677558399432*x_ref[2]**o + (0.127000006009)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=0.21817793209*x[2]**o + (-0.7283572888)*x[2]
+            ref[(2, 3, 2, 2)]+=0.21817793209*x_ref[2]**o + (-0.7283572888)*x_ref[2]
+            arg[(2, 3, 2, 3)]+=0.604669144747*x[2]**o + (0.960992564925)*x[2]
+            ref[(2, 3, 2, 3)]+=0.604669144747*x_ref[2]**o + (0.960992564925)*x_ref[2]
+            arg[(2, 3, 3, 0)]+=-0.860202972795*x[2]**o + (0.711128180996)*x[2]
+            ref[(2, 3, 3, 0)]+=-0.860202972795*x_ref[2]**o + (0.711128180996)*x_ref[2]
+            arg[(2, 3, 3, 1)]+=-0.230968581722*x[2]**o + (-0.125822337023)*x[2]
+            ref[(2, 3, 3, 1)]+=-0.230968581722*x_ref[2]**o + (-0.125822337023)*x_ref[2]
+            arg[(2, 3, 3, 2)]+=0.049067304035*x[2]**o + (-0.40538792632)*x[2]
+            ref[(2, 3, 3, 2)]+=0.049067304035*x_ref[2]**o + (-0.40538792632)*x_ref[2]
+            arg[(2, 3, 3, 3)]+=-0.203512178801*x[2]**o + (0.762608445114)*x[2]
+            ref[(2, 3, 3, 3)]+=-0.203512178801*x_ref[2]**o + (0.762608445114)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.620240970198*x[0] + (0.437541053347)*x[1]
+        ref=0.620240970198*x_ref[0] + (0.437541053347)*x_ref[1]
+        if dim==3:
+            arg+=(-0.187200644191)*x[2]
+            ref+=(-0.187200644191)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=-0.0852943286191*x[0] + (-0.561457647693)*x[1]
+        ref[(0,)]=-0.0852943286191*x_ref[0] + (-0.561457647693)*x_ref[1]
+        arg[(1,)]=-0.198373934077*x[0] + (-0.671884198071)*x[1]
+        ref[(1,)]=-0.198373934077*x_ref[0] + (-0.671884198071)*x_ref[1]
+        arg[(2,)]=-0.680171319207*x[0] + (0.567999300239)*x[1]
+        ref[(2,)]=-0.680171319207*x_ref[0] + (0.567999300239)*x_ref[1]
+        arg[(3,)]=0.85492869272*x[0] + (0.335884883824)*x[1]
+        ref[(3,)]=0.85492869272*x_ref[0] + (0.335884883824)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.149270017865*x[2]
+            ref[(0,)]+=0.149270017865*x_ref[2]
+            arg[(1,)]+=0.803061617812*x[2]
+            ref[(1,)]+=0.803061617812*x_ref[2]
+            arg[(2,)]+=0.347692011599*x[2]
+            ref[(2,)]+=0.347692011599*x_ref[2]
+            arg[(3,)]+=-0.853996764737*x[2]
+            ref[(3,)]+=-0.853996764737*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=-0.825316029483*x[0] + (-0.233249342262)*x[1]
+        ref[(0, 0)]=-0.825316029483*x_ref[0] + (-0.233249342262)*x_ref[1]
+        arg[(0, 1)]=0.367221572847*x[0] + (0.100641698708)*x[1]
+        ref[(0, 1)]=0.367221572847*x_ref[0] + (0.100641698708)*x_ref[1]
+        arg[(0, 2)]=-0.0644984846137*x[0] + (0.902118111757)*x[1]
+        ref[(0, 2)]=-0.0644984846137*x_ref[0] + (0.902118111757)*x_ref[1]
+        arg[(0, 3)]=0.146223068446*x[0] + (0.744588388623)*x[1]
+        ref[(0, 3)]=0.146223068446*x_ref[0] + (0.744588388623)*x_ref[1]
+        arg[(1, 0)]=-0.768702009574*x[0] + (-0.54433381722)*x[1]
+        ref[(1, 0)]=-0.768702009574*x_ref[0] + (-0.54433381722)*x_ref[1]
+        arg[(1, 1)]=0.0153841163077*x[0] + (0.393261666122)*x[1]
+        ref[(1, 1)]=0.0153841163077*x_ref[0] + (0.393261666122)*x_ref[1]
+        arg[(1, 2)]=-0.122922853038*x[0] + (-0.134041108323)*x[1]
+        ref[(1, 2)]=-0.122922853038*x_ref[0] + (-0.134041108323)*x_ref[1]
+        arg[(1, 3)]=0.28330687095*x[0] + (0.229204936044)*x[1]
+        ref[(1, 3)]=0.28330687095*x_ref[0] + (0.229204936044)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.15516156244*x[2]
+            ref[(0, 0)]+=0.15516156244*x_ref[2]
+            arg[(0, 1)]+=0.742491254535*x[2]
+            ref[(0, 1)]+=0.742491254535*x_ref[2]
+            arg[(0, 2)]+=-0.623244000655*x[2]
+            ref[(0, 2)]+=-0.623244000655*x_ref[2]
+            arg[(0, 3)]+=-0.381769238474*x[2]
+            ref[(0, 3)]+=-0.381769238474*x_ref[2]
+            arg[(1, 0)]+=-0.456537871818*x[2]
+            ref[(1, 0)]+=-0.456537871818*x_ref[2]
+            arg[(1, 1)]+=-0.549687792705*x[2]
+            ref[(1, 1)]+=-0.549687792705*x_ref[2]
+            arg[(1, 2)]+=0.418035651277*x[2]
+            ref[(1, 2)]+=0.418035651277*x_ref[2]
+            arg[(1, 3)]+=-0.145998069175*x[2]
+            ref[(1, 3)]+=-0.145998069175*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=0.737472999921*x[0] + (0.62622536221)*x[1]
+        ref[(0, 0, 0)]=0.737472999921*x_ref[0] + (0.62622536221)*x_ref[1]
+        arg[(0, 0, 1)]=-0.176123518373*x[0] + (0.91262876839)*x[1]
+        ref[(0, 0, 1)]=-0.176123518373*x_ref[0] + (0.91262876839)*x_ref[1]
+        arg[(0, 0, 2)]=-0.173341332298*x[0] + (-0.011490085402)*x[1]
+        ref[(0, 0, 2)]=-0.173341332298*x_ref[0] + (-0.011490085402)*x_ref[1]
+        arg[(0, 1, 0)]=0.981635117133*x[0] + (0.747178904479)*x[1]
+        ref[(0, 1, 0)]=0.981635117133*x_ref[0] + (0.747178904479)*x_ref[1]
+        arg[(0, 1, 1)]=0.100241982396*x[0] + (0.661356691054)*x[1]
+        ref[(0, 1, 1)]=0.100241982396*x_ref[0] + (0.661356691054)*x_ref[1]
+        arg[(0, 1, 2)]=0.540248393188*x[0] + (-0.798090962226)*x[1]
+        ref[(0, 1, 2)]=0.540248393188*x_ref[0] + (-0.798090962226)*x_ref[1]
+        arg[(1, 0, 0)]=-0.230201915289*x[0] + (-0.194194469939)*x[1]
+        ref[(1, 0, 0)]=-0.230201915289*x_ref[0] + (-0.194194469939)*x_ref[1]
+        arg[(1, 0, 1)]=0.389355324944*x[0] + (-0.184559980201)*x[1]
+        ref[(1, 0, 1)]=0.389355324944*x_ref[0] + (-0.184559980201)*x_ref[1]
+        arg[(1, 0, 2)]=0.980460118465*x[0] + (0.96302184943)*x[1]
+        ref[(1, 0, 2)]=0.980460118465*x_ref[0] + (0.96302184943)*x_ref[1]
+        arg[(1, 1, 0)]=0.852311725382*x[0] + (0.52240721081)*x[1]
+        ref[(1, 1, 0)]=0.852311725382*x_ref[0] + (0.52240721081)*x_ref[1]
+        arg[(1, 1, 1)]=-0.639132509398*x[0] + (-0.344250214765)*x[1]
+        ref[(1, 1, 1)]=-0.639132509398*x_ref[0] + (-0.344250214765)*x_ref[1]
+        arg[(1, 1, 2)]=0.125623045043*x[0] + (0.404747782824)*x[1]
+        ref[(1, 1, 2)]=0.125623045043*x_ref[0] + (0.404747782824)*x_ref[1]
+        arg[(2, 0, 0)]=0.697960600237*x[0] + (-0.616449131792)*x[1]
+        ref[(2, 0, 0)]=0.697960600237*x_ref[0] + (-0.616449131792)*x_ref[1]
+        arg[(2, 0, 1)]=-0.036996716746*x[0] + (-0.251742462513)*x[1]
+        ref[(2, 0, 1)]=-0.036996716746*x_ref[0] + (-0.251742462513)*x_ref[1]
+        arg[(2, 0, 2)]=-0.92135577926*x[0] + (0.0257597599353)*x[1]
+        ref[(2, 0, 2)]=-0.92135577926*x_ref[0] + (0.0257597599353)*x_ref[1]
+        arg[(2, 1, 0)]=0.842775378822*x[0] + (0.837431800192)*x[1]
+        ref[(2, 1, 0)]=0.842775378822*x_ref[0] + (0.837431800192)*x_ref[1]
+        arg[(2, 1, 1)]=-0.153474829619*x[0] + (-0.253808008649)*x[1]
+        ref[(2, 1, 1)]=-0.153474829619*x_ref[0] + (-0.253808008649)*x_ref[1]
+        arg[(2, 1, 2)]=0.806842447066*x[0] + (-0.460646753952)*x[1]
+        ref[(2, 1, 2)]=0.806842447066*x_ref[0] + (-0.460646753952)*x_ref[1]
+        arg[(3, 0, 0)]=-0.284816018855*x[0] + (-0.89311162533)*x[1]
+        ref[(3, 0, 0)]=-0.284816018855*x_ref[0] + (-0.89311162533)*x_ref[1]
+        arg[(3, 0, 1)]=-0.736112821377*x[0] + (0.13466399995)*x[1]
+        ref[(3, 0, 1)]=-0.736112821377*x_ref[0] + (0.13466399995)*x_ref[1]
+        arg[(3, 0, 2)]=-0.085450265022*x[0] + (-0.22510766651)*x[1]
+        ref[(3, 0, 2)]=-0.085450265022*x_ref[0] + (-0.22510766651)*x_ref[1]
+        arg[(3, 1, 0)]=0.137241657156*x[0] + (-0.477011220194)*x[1]
+        ref[(3, 1, 0)]=0.137241657156*x_ref[0] + (-0.477011220194)*x_ref[1]
+        arg[(3, 1, 1)]=-0.00704846791739*x[0] + (-0.242347853102)*x[1]
+        ref[(3, 1, 1)]=-0.00704846791739*x_ref[0] + (-0.242347853102)*x_ref[1]
+        arg[(3, 1, 2)]=0.801047201241*x[0] + (0.738608106873)*x[1]
+        ref[(3, 1, 2)]=0.801047201241*x_ref[0] + (0.738608106873)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.653967715622*x[2]
+            ref[(0, 0, 0)]+=0.653967715622*x_ref[2]
+            arg[(0, 0, 1)]+=-0.251024260234*x[2]
+            ref[(0, 0, 1)]+=-0.251024260234*x_ref[2]
+            arg[(0, 0, 2)]+=0.59601341354*x[2]
+            ref[(0, 0, 2)]+=0.59601341354*x_ref[2]
+            arg[(0, 1, 0)]+=-0.22046860774*x[2]
+            ref[(0, 1, 0)]+=-0.22046860774*x_ref[2]
+            arg[(0, 1, 1)]+=0.608136932746*x[2]
+            ref[(0, 1, 1)]+=0.608136932746*x_ref[2]
+            arg[(0, 1, 2)]+=-0.437026920074*x[2]
+            ref[(0, 1, 2)]+=-0.437026920074*x_ref[2]
+            arg[(1, 0, 0)]+=0.584894859567*x[2]
+            ref[(1, 0, 0)]+=0.584894859567*x_ref[2]
+            arg[(1, 0, 1)]+=-0.601239437862*x[2]
+            ref[(1, 0, 1)]+=-0.601239437862*x_ref[2]
+            arg[(1, 0, 2)]+=-0.62768013845*x[2]
+            ref[(1, 0, 2)]+=-0.62768013845*x_ref[2]
+            arg[(1, 1, 0)]+=0.504950138146*x[2]
+            ref[(1, 1, 0)]+=0.504950138146*x_ref[2]
+            arg[(1, 1, 1)]+=-0.489027556276*x[2]
+            ref[(1, 1, 1)]+=-0.489027556276*x_ref[2]
+            arg[(1, 1, 2)]+=0.756530914306*x[2]
+            ref[(1, 1, 2)]+=0.756530914306*x_ref[2]
+            arg[(2, 0, 0)]+=-0.0166871880662*x[2]
+            ref[(2, 0, 0)]+=-0.0166871880662*x_ref[2]
+            arg[(2, 0, 1)]+=-0.227878102841*x[2]
+            ref[(2, 0, 1)]+=-0.227878102841*x_ref[2]
+            arg[(2, 0, 2)]+=-0.88691052256*x[2]
+            ref[(2, 0, 2)]+=-0.88691052256*x_ref[2]
+            arg[(2, 1, 0)]+=-0.252497144275*x[2]
+            ref[(2, 1, 0)]+=-0.252497144275*x_ref[2]
+            arg[(2, 1, 1)]+=-0.0295737069204*x[2]
+            ref[(2, 1, 1)]+=-0.0295737069204*x_ref[2]
+            arg[(2, 1, 2)]+=0.348022479283*x[2]
+            ref[(2, 1, 2)]+=0.348022479283*x_ref[2]
+            arg[(3, 0, 0)]+=-0.41503112656*x[2]
+            ref[(3, 0, 0)]+=-0.41503112656*x_ref[2]
+            arg[(3, 0, 1)]+=-0.144427859119*x[2]
+            ref[(3, 0, 1)]+=-0.144427859119*x_ref[2]
+            arg[(3, 0, 2)]+=0.341482500034*x[2]
+            ref[(3, 0, 2)]+=0.341482500034*x_ref[2]
+            arg[(3, 1, 0)]+=-0.242931671571*x[2]
+            ref[(3, 1, 0)]+=-0.242931671571*x_ref[2]
+            arg[(3, 1, 1)]+=-0.357667305124*x[2]
+            ref[(3, 1, 1)]+=-0.357667305124*x_ref[2]
+            arg[(3, 1, 2)]+=-0.747236168532*x[2]
+            ref[(3, 1, 2)]+=-0.747236168532*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4, 3),w)
+        ref = Data(0,(4, 2, 4, 3),w_ref)
+        arg[(0, 0, 0, 0)]=0.568437104084*x[0] + (0.83971095241)*x[1]
+        ref[(0, 0, 0, 0)]=0.568437104084*x_ref[0] + (0.83971095241)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.274900217192*x[0] + (-0.317720667896)*x[1]
+        ref[(0, 0, 0, 1)]=-0.274900217192*x_ref[0] + (-0.317720667896)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.309337556866*x[0] + (0.156671264785)*x[1]
+        ref[(0, 0, 0, 2)]=0.309337556866*x_ref[0] + (0.156671264785)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.491278207252*x[0] + (0.746164823571)*x[1]
+        ref[(0, 0, 1, 0)]=0.491278207252*x_ref[0] + (0.746164823571)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.581131089242*x[0] + (0.545013944399)*x[1]
+        ref[(0, 0, 1, 1)]=0.581131089242*x_ref[0] + (0.545013944399)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.0902737074041*x[0] + (-0.547237841603)*x[1]
+        ref[(0, 0, 1, 2)]=0.0902737074041*x_ref[0] + (-0.547237841603)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.530927965318*x[0] + (-0.109529468555)*x[1]
+        ref[(0, 0, 2, 0)]=-0.530927965318*x_ref[0] + (-0.109529468555)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.100228122816*x[0] + (0.557555223843)*x[1]
+        ref[(0, 0, 2, 1)]=-0.100228122816*x_ref[0] + (0.557555223843)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.936377138735*x[0] + (-0.0945431341327)*x[1]
+        ref[(0, 0, 2, 2)]=-0.936377138735*x_ref[0] + (-0.0945431341327)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.748732747719*x[0] + (0.693207000497)*x[1]
+        ref[(0, 0, 3, 0)]=0.748732747719*x_ref[0] + (0.693207000497)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.576357953282*x[0] + (0.551015716978)*x[1]
+        ref[(0, 0, 3, 1)]=0.576357953282*x_ref[0] + (0.551015716978)*x_ref[1]
+        arg[(0, 0, 3, 2)]=-0.58011384197*x[0] + (0.922953406116)*x[1]
+        ref[(0, 0, 3, 2)]=-0.58011384197*x_ref[0] + (0.922953406116)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.911999123488*x[0] + (0.441044197582)*x[1]
+        ref[(0, 1, 0, 0)]=-0.911999123488*x_ref[0] + (0.441044197582)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.796232514821*x[0] + (0.249716384919)*x[1]
+        ref[(0, 1, 0, 1)]=0.796232514821*x_ref[0] + (0.249716384919)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.0519408795556*x[0] + (-0.646593692587)*x[1]
+        ref[(0, 1, 0, 2)]=-0.0519408795556*x_ref[0] + (-0.646593692587)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.333691489319*x[0] + (-0.0767165596596)*x[1]
+        ref[(0, 1, 1, 0)]=0.333691489319*x_ref[0] + (-0.0767165596596)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.499074460871*x[0] + (0.22355026464)*x[1]
+        ref[(0, 1, 1, 1)]=0.499074460871*x_ref[0] + (0.22355026464)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.185360528455*x[0] + (0.130422406503)*x[1]
+        ref[(0, 1, 1, 2)]=-0.185360528455*x_ref[0] + (0.130422406503)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.124863562079*x[0] + (-0.695857389147)*x[1]
+        ref[(0, 1, 2, 0)]=0.124863562079*x_ref[0] + (-0.695857389147)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.133330165872*x[0] + (0.530317120486)*x[1]
+        ref[(0, 1, 2, 1)]=0.133330165872*x_ref[0] + (0.530317120486)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.823093078764*x[0] + (-0.0384872873369)*x[1]
+        ref[(0, 1, 2, 2)]=-0.823093078764*x_ref[0] + (-0.0384872873369)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.734409159635*x[0] + (-0.183400984734)*x[1]
+        ref[(0, 1, 3, 0)]=0.734409159635*x_ref[0] + (-0.183400984734)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.310084265558*x[0] + (0.594177542127)*x[1]
+        ref[(0, 1, 3, 1)]=-0.310084265558*x_ref[0] + (0.594177542127)*x_ref[1]
+        arg[(0, 1, 3, 2)]=-0.0271860030279*x[0] + (0.935844501016)*x[1]
+        ref[(0, 1, 3, 2)]=-0.0271860030279*x_ref[0] + (0.935844501016)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.979342160781*x[0] + (0.657960104622)*x[1]
+        ref[(1, 0, 0, 0)]=0.979342160781*x_ref[0] + (0.657960104622)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.946765427337*x[0] + (0.00773956141018)*x[1]
+        ref[(1, 0, 0, 1)]=-0.946765427337*x_ref[0] + (0.00773956141018)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.655655416227*x[0] + (-0.55747744531)*x[1]
+        ref[(1, 0, 0, 2)]=0.655655416227*x_ref[0] + (-0.55747744531)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.126499777336*x[0] + (0.11891236525)*x[1]
+        ref[(1, 0, 1, 0)]=0.126499777336*x_ref[0] + (0.11891236525)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.95169208796*x[0] + (0.566032998429)*x[1]
+        ref[(1, 0, 1, 1)]=-0.95169208796*x_ref[0] + (0.566032998429)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.252113364824*x[0] + (0.429745905421)*x[1]
+        ref[(1, 0, 1, 2)]=0.252113364824*x_ref[0] + (0.429745905421)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.221592651566*x[0] + (-0.842143317313)*x[1]
+        ref[(1, 0, 2, 0)]=-0.221592651566*x_ref[0] + (-0.842143317313)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.280093811802*x[0] + (-0.253025666289)*x[1]
+        ref[(1, 0, 2, 1)]=0.280093811802*x_ref[0] + (-0.253025666289)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.528634394321*x[0] + (0.442905900089)*x[1]
+        ref[(1, 0, 2, 2)]=0.528634394321*x_ref[0] + (0.442905900089)*x_ref[1]
+        arg[(1, 0, 3, 0)]=0.596568147163*x[0] + (0.462745829007)*x[1]
+        ref[(1, 0, 3, 0)]=0.596568147163*x_ref[0] + (0.462745829007)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.799478240645*x[0] + (-0.21603785884)*x[1]
+        ref[(1, 0, 3, 1)]=-0.799478240645*x_ref[0] + (-0.21603785884)*x_ref[1]
+        arg[(1, 0, 3, 2)]=-0.469737332562*x[0] + (0.264056124663)*x[1]
+        ref[(1, 0, 3, 2)]=-0.469737332562*x_ref[0] + (0.264056124663)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.632910729616*x[0] + (0.981792839614)*x[1]
+        ref[(1, 1, 0, 0)]=0.632910729616*x_ref[0] + (0.981792839614)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.546504888829*x[0] + (0.988384182532)*x[1]
+        ref[(1, 1, 0, 1)]=0.546504888829*x_ref[0] + (0.988384182532)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.57515624582*x[0] + (0.598256369007)*x[1]
+        ref[(1, 1, 0, 2)]=-0.57515624582*x_ref[0] + (0.598256369007)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.0797614311564*x[0] + (0.375601538235)*x[1]
+        ref[(1, 1, 1, 0)]=-0.0797614311564*x_ref[0] + (0.375601538235)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.932220175828*x[0] + (-0.215689300104)*x[1]
+        ref[(1, 1, 1, 1)]=0.932220175828*x_ref[0] + (-0.215689300104)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.498744559476*x[0] + (-0.949417132138)*x[1]
+        ref[(1, 1, 1, 2)]=0.498744559476*x_ref[0] + (-0.949417132138)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.840637197027*x[0] + (-0.792342145818)*x[1]
+        ref[(1, 1, 2, 0)]=0.840637197027*x_ref[0] + (-0.792342145818)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.517763491909*x[0] + (0.821838812666)*x[1]
+        ref[(1, 1, 2, 1)]=0.517763491909*x_ref[0] + (0.821838812666)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.430400250567*x[0] + (-0.522443035679)*x[1]
+        ref[(1, 1, 2, 2)]=-0.430400250567*x_ref[0] + (-0.522443035679)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.0371948989793*x[0] + (0.346704845604)*x[1]
+        ref[(1, 1, 3, 0)]=0.0371948989793*x_ref[0] + (0.346704845604)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.0395258127151*x[0] + (0.848029999629)*x[1]
+        ref[(1, 1, 3, 1)]=0.0395258127151*x_ref[0] + (0.848029999629)*x_ref[1]
+        arg[(1, 1, 3, 2)]=0.730873429369*x[0] + (0.525431225416)*x[1]
+        ref[(1, 1, 3, 2)]=0.730873429369*x_ref[0] + (0.525431225416)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.936982521679*x[0] + (0.685257882858)*x[1]
+        ref[(2, 0, 0, 0)]=0.936982521679*x_ref[0] + (0.685257882858)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.315914555564*x[0] + (0.587682215295)*x[1]
+        ref[(2, 0, 0, 1)]=0.315914555564*x_ref[0] + (0.587682215295)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.862446295919*x[0] + (-0.974743367175)*x[1]
+        ref[(2, 0, 0, 2)]=0.862446295919*x_ref[0] + (-0.974743367175)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.505834272563*x[0] + (0.550628478431)*x[1]
+        ref[(2, 0, 1, 0)]=0.505834272563*x_ref[0] + (0.550628478431)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.25882571857*x[0] + (0.00933334746272)*x[1]
+        ref[(2, 0, 1, 1)]=0.25882571857*x_ref[0] + (0.00933334746272)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.0558159299247*x[0] + (0.138290964942)*x[1]
+        ref[(2, 0, 1, 2)]=0.0558159299247*x_ref[0] + (0.138290964942)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.815487890379*x[0] + (0.568137434344)*x[1]
+        ref[(2, 0, 2, 0)]=0.815487890379*x_ref[0] + (0.568137434344)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.497199481763*x[0] + (0.510435267104)*x[1]
+        ref[(2, 0, 2, 1)]=-0.497199481763*x_ref[0] + (0.510435267104)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.392912364819*x[0] + (0.306915627935)*x[1]
+        ref[(2, 0, 2, 2)]=-0.392912364819*x_ref[0] + (0.306915627935)*x_ref[1]
+        arg[(2, 0, 3, 0)]=0.451850173551*x[0] + (0.55174239834)*x[1]
+        ref[(2, 0, 3, 0)]=0.451850173551*x_ref[0] + (0.55174239834)*x_ref[1]
+        arg[(2, 0, 3, 1)]=-0.486310403942*x[0] + (-0.399922800055)*x[1]
+        ref[(2, 0, 3, 1)]=-0.486310403942*x_ref[0] + (-0.399922800055)*x_ref[1]
+        arg[(2, 0, 3, 2)]=-0.134425957837*x[0] + (0.0686936900527)*x[1]
+        ref[(2, 0, 3, 2)]=-0.134425957837*x_ref[0] + (0.0686936900527)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.237154977955*x[0] + (0.503328676278)*x[1]
+        ref[(2, 1, 0, 0)]=0.237154977955*x_ref[0] + (0.503328676278)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.402251082255*x[0] + (0.608546323944)*x[1]
+        ref[(2, 1, 0, 1)]=-0.402251082255*x_ref[0] + (0.608546323944)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.0396980301338*x[0] + (0.512254075841)*x[1]
+        ref[(2, 1, 0, 2)]=-0.0396980301338*x_ref[0] + (0.512254075841)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.0541646429916*x[0] + (-0.3689245724)*x[1]
+        ref[(2, 1, 1, 0)]=0.0541646429916*x_ref[0] + (-0.3689245724)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.689370044416*x[0] + (0.747142616306)*x[1]
+        ref[(2, 1, 1, 1)]=0.689370044416*x_ref[0] + (0.747142616306)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.249747782238*x[0] + (0.140634196422)*x[1]
+        ref[(2, 1, 1, 2)]=0.249747782238*x_ref[0] + (0.140634196422)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.540195038362*x[0] + (0.0397852368686)*x[1]
+        ref[(2, 1, 2, 0)]=-0.540195038362*x_ref[0] + (0.0397852368686)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.609025572531*x[0] + (0.945605809347)*x[1]
+        ref[(2, 1, 2, 1)]=0.609025572531*x_ref[0] + (0.945605809347)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.652739060052*x[0] + (0.190450641046)*x[1]
+        ref[(2, 1, 2, 2)]=-0.652739060052*x_ref[0] + (0.190450641046)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.112558004003*x[0] + (-0.620611717372)*x[1]
+        ref[(2, 1, 3, 0)]=0.112558004003*x_ref[0] + (-0.620611717372)*x_ref[1]
+        arg[(2, 1, 3, 1)]=-0.354332091217*x[0] + (0.17237305384)*x[1]
+        ref[(2, 1, 3, 1)]=-0.354332091217*x_ref[0] + (0.17237305384)*x_ref[1]
+        arg[(2, 1, 3, 2)]=-0.675145070157*x[0] + (0.585211542572)*x[1]
+        ref[(2, 1, 3, 2)]=-0.675145070157*x_ref[0] + (0.585211542572)*x_ref[1]
+        arg[(3, 0, 0, 0)]=-0.441475026988*x[0] + (-0.679919121861)*x[1]
+        ref[(3, 0, 0, 0)]=-0.441475026988*x_ref[0] + (-0.679919121861)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.201274951061*x[0] + (-0.636923653498)*x[1]
+        ref[(3, 0, 0, 1)]=-0.201274951061*x_ref[0] + (-0.636923653498)*x_ref[1]
+        arg[(3, 0, 0, 2)]=0.0416988532802*x[0] + (-0.739104388414)*x[1]
+        ref[(3, 0, 0, 2)]=0.0416988532802*x_ref[0] + (-0.739104388414)*x_ref[1]
+        arg[(3, 0, 1, 0)]=-0.627167972131*x[0] + (0.659403699382)*x[1]
+        ref[(3, 0, 1, 0)]=-0.627167972131*x_ref[0] + (0.659403699382)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.662704535132*x[0] + (-0.617241270941)*x[1]
+        ref[(3, 0, 1, 1)]=-0.662704535132*x_ref[0] + (-0.617241270941)*x_ref[1]
+        arg[(3, 0, 1, 2)]=-0.633399015089*x[0] + (0.66115712894)*x[1]
+        ref[(3, 0, 1, 2)]=-0.633399015089*x_ref[0] + (0.66115712894)*x_ref[1]
+        arg[(3, 0, 2, 0)]=0.243445492635*x[0] + (0.218439283639)*x[1]
+        ref[(3, 0, 2, 0)]=0.243445492635*x_ref[0] + (0.218439283639)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.200555398851*x[0] + (0.449031097586)*x[1]
+        ref[(3, 0, 2, 1)]=0.200555398851*x_ref[0] + (0.449031097586)*x_ref[1]
+        arg[(3, 0, 2, 2)]=-0.229730577835*x[0] + (-0.202196700978)*x[1]
+        ref[(3, 0, 2, 2)]=-0.229730577835*x_ref[0] + (-0.202196700978)*x_ref[1]
+        arg[(3, 0, 3, 0)]=-0.197802616578*x[0] + (-0.708607441016)*x[1]
+        ref[(3, 0, 3, 0)]=-0.197802616578*x_ref[0] + (-0.708607441016)*x_ref[1]
+        arg[(3, 0, 3, 1)]=-0.225844649482*x[0] + (-0.169918007557)*x[1]
+        ref[(3, 0, 3, 1)]=-0.225844649482*x_ref[0] + (-0.169918007557)*x_ref[1]
+        arg[(3, 0, 3, 2)]=0.791466542182*x[0] + (0.886259635619)*x[1]
+        ref[(3, 0, 3, 2)]=0.791466542182*x_ref[0] + (0.886259635619)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.617347438608*x[0] + (0.369800294486)*x[1]
+        ref[(3, 1, 0, 0)]=-0.617347438608*x_ref[0] + (0.369800294486)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.0194742949516*x[0] + (0.985608260476)*x[1]
+        ref[(3, 1, 0, 1)]=0.0194742949516*x_ref[0] + (0.985608260476)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.617186003801*x[0] + (-0.415665903366)*x[1]
+        ref[(3, 1, 0, 2)]=0.617186003801*x_ref[0] + (-0.415665903366)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.980255056104*x[0] + (0.751764617971)*x[1]
+        ref[(3, 1, 1, 0)]=0.980255056104*x_ref[0] + (0.751764617971)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.215818501315*x[0] + (-0.781040887498)*x[1]
+        ref[(3, 1, 1, 1)]=-0.215818501315*x_ref[0] + (-0.781040887498)*x_ref[1]
+        arg[(3, 1, 1, 2)]=-0.376804144545*x[0] + (0.835343459541)*x[1]
+        ref[(3, 1, 1, 2)]=-0.376804144545*x_ref[0] + (0.835343459541)*x_ref[1]
+        arg[(3, 1, 2, 0)]=0.240343554127*x[0] + (0.896156038425)*x[1]
+        ref[(3, 1, 2, 0)]=0.240343554127*x_ref[0] + (0.896156038425)*x_ref[1]
+        arg[(3, 1, 2, 1)]=0.23720682041*x[0] + (0.726314905529)*x[1]
+        ref[(3, 1, 2, 1)]=0.23720682041*x_ref[0] + (0.726314905529)*x_ref[1]
+        arg[(3, 1, 2, 2)]=0.554812120788*x[0] + (0.139992167164)*x[1]
+        ref[(3, 1, 2, 2)]=0.554812120788*x_ref[0] + (0.139992167164)*x_ref[1]
+        arg[(3, 1, 3, 0)]=-0.618804731126*x[0] + (0.753273753488)*x[1]
+        ref[(3, 1, 3, 0)]=-0.618804731126*x_ref[0] + (0.753273753488)*x_ref[1]
+        arg[(3, 1, 3, 1)]=-0.661919040527*x[0] + (-0.287354457639)*x[1]
+        ref[(3, 1, 3, 1)]=-0.661919040527*x_ref[0] + (-0.287354457639)*x_ref[1]
+        arg[(3, 1, 3, 2)]=-0.845549984163*x[0] + (0.847151589048)*x[1]
+        ref[(3, 1, 3, 2)]=-0.845549984163*x_ref[0] + (0.847151589048)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.92883364413*x[2]
+            ref[(0, 0, 0, 0)]+=-0.92883364413*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.426326580195*x[2]
+            ref[(0, 0, 0, 1)]+=-0.426326580195*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.56641146186*x[2]
+            ref[(0, 0, 0, 2)]+=-0.56641146186*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.231355551111*x[2]
+            ref[(0, 0, 1, 0)]+=-0.231355551111*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.394847184025*x[2]
+            ref[(0, 0, 1, 1)]+=0.394847184025*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.667545058825*x[2]
+            ref[(0, 0, 1, 2)]+=0.667545058825*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.263436556889*x[2]
+            ref[(0, 0, 2, 0)]+=-0.263436556889*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.523204727631*x[2]
+            ref[(0, 0, 2, 1)]+=0.523204727631*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.799064073757*x[2]
+            ref[(0, 0, 2, 2)]+=-0.799064073757*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.117351757888*x[2]
+            ref[(0, 0, 3, 0)]+=-0.117351757888*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.907579865666*x[2]
+            ref[(0, 0, 3, 1)]+=0.907579865666*x_ref[2]
+            arg[(0, 0, 3, 2)]+=0.666871144776*x[2]
+            ref[(0, 0, 3, 2)]+=0.666871144776*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.154860583289*x[2]
+            ref[(0, 1, 0, 0)]+=-0.154860583289*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.0829051864851*x[2]
+            ref[(0, 1, 0, 1)]+=-0.0829051864851*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.241526190969*x[2]
+            ref[(0, 1, 0, 2)]+=-0.241526190969*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.128830731441*x[2]
+            ref[(0, 1, 1, 0)]+=0.128830731441*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.0104413225751*x[2]
+            ref[(0, 1, 1, 1)]+=-0.0104413225751*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.464189460815*x[2]
+            ref[(0, 1, 1, 2)]+=0.464189460815*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.0851524737553*x[2]
+            ref[(0, 1, 2, 0)]+=-0.0851524737553*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.298182927037*x[2]
+            ref[(0, 1, 2, 1)]+=0.298182927037*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.289607702731*x[2]
+            ref[(0, 1, 2, 2)]+=0.289607702731*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.755234647263*x[2]
+            ref[(0, 1, 3, 0)]+=-0.755234647263*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.0297136208624*x[2]
+            ref[(0, 1, 3, 1)]+=-0.0297136208624*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.58315452964*x[2]
+            ref[(0, 1, 3, 2)]+=-0.58315452964*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.352157108779*x[2]
+            ref[(1, 0, 0, 0)]+=0.352157108779*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.931727072861*x[2]
+            ref[(1, 0, 0, 1)]+=-0.931727072861*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.417618240824*x[2]
+            ref[(1, 0, 0, 2)]+=-0.417618240824*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.732021817072*x[2]
+            ref[(1, 0, 1, 0)]+=-0.732021817072*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.279864053855*x[2]
+            ref[(1, 0, 1, 1)]+=-0.279864053855*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.0303580958113*x[2]
+            ref[(1, 0, 1, 2)]+=0.0303580958113*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.772905967139*x[2]
+            ref[(1, 0, 2, 0)]+=0.772905967139*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.573911215323*x[2]
+            ref[(1, 0, 2, 1)]+=-0.573911215323*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.119044523249*x[2]
+            ref[(1, 0, 2, 2)]+=0.119044523249*x_ref[2]
+            arg[(1, 0, 3, 0)]+=0.0493532454725*x[2]
+            ref[(1, 0, 3, 0)]+=0.0493532454725*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.81855783884*x[2]
+            ref[(1, 0, 3, 1)]+=-0.81855783884*x_ref[2]
+            arg[(1, 0, 3, 2)]+=0.89072564097*x[2]
+            ref[(1, 0, 3, 2)]+=0.89072564097*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.402250310081*x[2]
+            ref[(1, 1, 0, 0)]+=0.402250310081*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.264069275827*x[2]
+            ref[(1, 1, 0, 1)]+=-0.264069275827*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.93270379328*x[2]
+            ref[(1, 1, 0, 2)]+=-0.93270379328*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.191707428147*x[2]
+            ref[(1, 1, 1, 0)]+=-0.191707428147*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.682447014544*x[2]
+            ref[(1, 1, 1, 1)]+=0.682447014544*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.729688062269*x[2]
+            ref[(1, 1, 1, 2)]+=-0.729688062269*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.471085644078*x[2]
+            ref[(1, 1, 2, 0)]+=0.471085644078*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.413234258312*x[2]
+            ref[(1, 1, 2, 1)]+=0.413234258312*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.348320259642*x[2]
+            ref[(1, 1, 2, 2)]+=-0.348320259642*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.168493955806*x[2]
+            ref[(1, 1, 3, 0)]+=-0.168493955806*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.254502998563*x[2]
+            ref[(1, 1, 3, 1)]+=0.254502998563*x_ref[2]
+            arg[(1, 1, 3, 2)]+=-0.668693134401*x[2]
+            ref[(1, 1, 3, 2)]+=-0.668693134401*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.831282562335*x[2]
+            ref[(2, 0, 0, 0)]+=0.831282562335*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.405830075971*x[2]
+            ref[(2, 0, 0, 1)]+=0.405830075971*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.673150199694*x[2]
+            ref[(2, 0, 0, 2)]+=0.673150199694*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.466015182213*x[2]
+            ref[(2, 0, 1, 0)]+=0.466015182213*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.34343640692*x[2]
+            ref[(2, 0, 1, 1)]+=0.34343640692*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.332540197435*x[2]
+            ref[(2, 0, 1, 2)]+=-0.332540197435*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.593001890432*x[2]
+            ref[(2, 0, 2, 0)]+=-0.593001890432*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.540381650304*x[2]
+            ref[(2, 0, 2, 1)]+=-0.540381650304*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.696519288005*x[2]
+            ref[(2, 0, 2, 2)]+=-0.696519288005*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.550440364638*x[2]
+            ref[(2, 0, 3, 0)]+=0.550440364638*x_ref[2]
+            arg[(2, 0, 3, 1)]+=0.256907078578*x[2]
+            ref[(2, 0, 3, 1)]+=0.256907078578*x_ref[2]
+            arg[(2, 0, 3, 2)]+=0.926255714121*x[2]
+            ref[(2, 0, 3, 2)]+=0.926255714121*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.622520030887*x[2]
+            ref[(2, 1, 0, 0)]+=0.622520030887*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.296726483171*x[2]
+            ref[(2, 1, 0, 1)]+=-0.296726483171*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.255906866315*x[2]
+            ref[(2, 1, 0, 2)]+=-0.255906866315*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.549546781615*x[2]
+            ref[(2, 1, 1, 0)]+=-0.549546781615*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.309316422312*x[2]
+            ref[(2, 1, 1, 1)]+=-0.309316422312*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.742957219992*x[2]
+            ref[(2, 1, 1, 2)]+=0.742957219992*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.0363608695229*x[2]
+            ref[(2, 1, 2, 0)]+=0.0363608695229*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.990528860933*x[2]
+            ref[(2, 1, 2, 1)]+=0.990528860933*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.0565189337477*x[2]
+            ref[(2, 1, 2, 2)]+=0.0565189337477*x_ref[2]
+            arg[(2, 1, 3, 0)]+=0.0879842935493*x[2]
+            ref[(2, 1, 3, 0)]+=0.0879842935493*x_ref[2]
+            arg[(2, 1, 3, 1)]+=-0.820507130055*x[2]
+            ref[(2, 1, 3, 1)]+=-0.820507130055*x_ref[2]
+            arg[(2, 1, 3, 2)]+=0.911077795429*x[2]
+            ref[(2, 1, 3, 2)]+=0.911077795429*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.023719759424*x[2]
+            ref[(3, 0, 0, 0)]+=0.023719759424*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.213104902348*x[2]
+            ref[(3, 0, 0, 1)]+=-0.213104902348*x_ref[2]
+            arg[(3, 0, 0, 2)]+=-0.768150961802*x[2]
+            ref[(3, 0, 0, 2)]+=-0.768150961802*x_ref[2]
+            arg[(3, 0, 1, 0)]+=-0.509136654316*x[2]
+            ref[(3, 0, 1, 0)]+=-0.509136654316*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.759382031217*x[2]
+            ref[(3, 0, 1, 1)]+=0.759382031217*x_ref[2]
+            arg[(3, 0, 1, 2)]+=-0.928048357309*x[2]
+            ref[(3, 0, 1, 2)]+=-0.928048357309*x_ref[2]
+            arg[(3, 0, 2, 0)]+=-0.533348447224*x[2]
+            ref[(3, 0, 2, 0)]+=-0.533348447224*x_ref[2]
+            arg[(3, 0, 2, 1)]+=0.132819686504*x[2]
+            ref[(3, 0, 2, 1)]+=0.132819686504*x_ref[2]
+            arg[(3, 0, 2, 2)]+=-0.206030822372*x[2]
+            ref[(3, 0, 2, 2)]+=-0.206030822372*x_ref[2]
+            arg[(3, 0, 3, 0)]+=0.320581050534*x[2]
+            ref[(3, 0, 3, 0)]+=0.320581050534*x_ref[2]
+            arg[(3, 0, 3, 1)]+=0.979651207169*x[2]
+            ref[(3, 0, 3, 1)]+=0.979651207169*x_ref[2]
+            arg[(3, 0, 3, 2)]+=0.0949107594684*x[2]
+            ref[(3, 0, 3, 2)]+=0.0949107594684*x_ref[2]
+            arg[(3, 1, 0, 0)]+=-0.371637215572*x[2]
+            ref[(3, 1, 0, 0)]+=-0.371637215572*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.889109288502*x[2]
+            ref[(3, 1, 0, 1)]+=0.889109288502*x_ref[2]
+            arg[(3, 1, 0, 2)]+=0.661253753165*x[2]
+            ref[(3, 1, 0, 2)]+=0.661253753165*x_ref[2]
+            arg[(3, 1, 1, 0)]+=-0.322108160241*x[2]
+            ref[(3, 1, 1, 0)]+=-0.322108160241*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.920462798257*x[2]
+            ref[(3, 1, 1, 1)]+=-0.920462798257*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.256076916855*x[2]
+            ref[(3, 1, 1, 2)]+=0.256076916855*x_ref[2]
+            arg[(3, 1, 2, 0)]+=0.385678565295*x[2]
+            ref[(3, 1, 2, 0)]+=0.385678565295*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.139757332447*x[2]
+            ref[(3, 1, 2, 1)]+=0.139757332447*x_ref[2]
+            arg[(3, 1, 2, 2)]+=0.595810696135*x[2]
+            ref[(3, 1, 2, 2)]+=0.595810696135*x_ref[2]
+            arg[(3, 1, 3, 0)]+=0.496372419101*x[2]
+            ref[(3, 1, 3, 0)]+=0.496372419101*x_ref[2]
+            arg[(3, 1, 3, 1)]+=0.466792030194*x[2]
+            ref[(3, 1, 3, 1)]+=0.466792030194*x_ref[2]
+            arg[(3, 1, 3, 2)]+=0.771356470854*x[2]
+            ref[(3, 1, 3, 2)]+=0.771356470854*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.0306161825794*x[0] + (-0.915804291643)*x[1]
+        ref=0.0306161825794*x_ref[0] + (-0.915804291643)*x_ref[1]
+        if dim==3:
+            arg+=(-0.362344368695)*x[2]
+            ref+=(-0.362344368695)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.893691358806*x[0] + (0.80597705667)*x[1]
+        ref[(0,)]=0.893691358806*x_ref[0] + (0.80597705667)*x_ref[1]
+        arg[(1,)]=-0.105144114287*x[0] + (-0.228159155184)*x[1]
+        ref[(1,)]=-0.105144114287*x_ref[0] + (-0.228159155184)*x_ref[1]
+        arg[(2,)]=-0.059676289064*x[0] + (-0.412327087742)*x[1]
+        ref[(2,)]=-0.059676289064*x_ref[0] + (-0.412327087742)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.583806971319*x[2]
+            ref[(0,)]+=0.583806971319*x_ref[2]
+            arg[(1,)]+=-0.195432683279*x[2]
+            ref[(1,)]+=-0.195432683279*x_ref[2]
+            arg[(2,)]+=-0.845318668396*x[2]
+            ref[(2,)]+=-0.845318668396*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=0.209672848641*x[0] + (0.451139790087)*x[1]
+        ref[(0, 0)]=0.209672848641*x_ref[0] + (0.451139790087)*x_ref[1]
+        arg[(0, 1)]=0.525914864024*x[0] + (-0.825974010638)*x[1]
+        ref[(0, 1)]=0.525914864024*x_ref[0] + (-0.825974010638)*x_ref[1]
+        arg[(1, 0)]=-0.417563004808*x[0] + (-0.400580352586)*x[1]
+        ref[(1, 0)]=-0.417563004808*x_ref[0] + (-0.400580352586)*x_ref[1]
+        arg[(1, 1)]=0.361559233037*x[0] + (0.477606149768)*x[1]
+        ref[(1, 1)]=0.361559233037*x_ref[0] + (0.477606149768)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.599602028523*x[2]
+            ref[(0, 0)]+=-0.599602028523*x_ref[2]
+            arg[(0, 1)]+=-0.652153028677*x[2]
+            ref[(0, 1)]+=-0.652153028677*x_ref[2]
+            arg[(1, 0)]+=0.899970579519*x[2]
+            ref[(1, 0)]+=0.899970579519*x_ref[2]
+            arg[(1, 1)]+=0.480010874024*x[2]
+            ref[(1, 1)]+=0.480010874024*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2),w)
+        ref = Data(0,(3, 3, 2),w_ref)
+        arg[(0, 0, 0)]=-0.402848443212*x[0] + (-0.617818113089)*x[1]
+        ref[(0, 0, 0)]=-0.402848443212*x_ref[0] + (-0.617818113089)*x_ref[1]
+        arg[(0, 0, 1)]=0.342716052267*x[0] + (-0.729022656791)*x[1]
+        ref[(0, 0, 1)]=0.342716052267*x_ref[0] + (-0.729022656791)*x_ref[1]
+        arg[(0, 1, 0)]=0.320566043727*x[0] + (-0.75936733343)*x[1]
+        ref[(0, 1, 0)]=0.320566043727*x_ref[0] + (-0.75936733343)*x_ref[1]
+        arg[(0, 1, 1)]=-0.424471478962*x[0] + (0.705771389312)*x[1]
+        ref[(0, 1, 1)]=-0.424471478962*x_ref[0] + (0.705771389312)*x_ref[1]
+        arg[(0, 2, 0)]=-0.168493066837*x[0] + (-0.249034174185)*x[1]
+        ref[(0, 2, 0)]=-0.168493066837*x_ref[0] + (-0.249034174185)*x_ref[1]
+        arg[(0, 2, 1)]=-0.354312237701*x[0] + (-0.00220929554642)*x[1]
+        ref[(0, 2, 1)]=-0.354312237701*x_ref[0] + (-0.00220929554642)*x_ref[1]
+        arg[(1, 0, 0)]=0.939112382156*x[0] + (0.919875777518)*x[1]
+        ref[(1, 0, 0)]=0.939112382156*x_ref[0] + (0.919875777518)*x_ref[1]
+        arg[(1, 0, 1)]=-0.342179898895*x[0] + (-0.541061197034)*x[1]
+        ref[(1, 0, 1)]=-0.342179898895*x_ref[0] + (-0.541061197034)*x_ref[1]
+        arg[(1, 1, 0)]=-0.762217787863*x[0] + (0.0426122559796)*x[1]
+        ref[(1, 1, 0)]=-0.762217787863*x_ref[0] + (0.0426122559796)*x_ref[1]
+        arg[(1, 1, 1)]=0.919043087792*x[0] + (0.905024396613)*x[1]
+        ref[(1, 1, 1)]=0.919043087792*x_ref[0] + (0.905024396613)*x_ref[1]
+        arg[(1, 2, 0)]=0.927986458824*x[0] + (0.0132757081933)*x[1]
+        ref[(1, 2, 0)]=0.927986458824*x_ref[0] + (0.0132757081933)*x_ref[1]
+        arg[(1, 2, 1)]=-0.425770947902*x[0] + (0.839604469749)*x[1]
+        ref[(1, 2, 1)]=-0.425770947902*x_ref[0] + (0.839604469749)*x_ref[1]
+        arg[(2, 0, 0)]=-0.778013005687*x[0] + (-0.0405942671578)*x[1]
+        ref[(2, 0, 0)]=-0.778013005687*x_ref[0] + (-0.0405942671578)*x_ref[1]
+        arg[(2, 0, 1)]=-0.86238753112*x[0] + (0.722334559617)*x[1]
+        ref[(2, 0, 1)]=-0.86238753112*x_ref[0] + (0.722334559617)*x_ref[1]
+        arg[(2, 1, 0)]=-0.105160862714*x[0] + (0.305201910831)*x[1]
+        ref[(2, 1, 0)]=-0.105160862714*x_ref[0] + (0.305201910831)*x_ref[1]
+        arg[(2, 1, 1)]=-0.601831742317*x[0] + (0.53498992184)*x[1]
+        ref[(2, 1, 1)]=-0.601831742317*x_ref[0] + (0.53498992184)*x_ref[1]
+        arg[(2, 2, 0)]=-0.618378459583*x[0] + (0.106153641763)*x[1]
+        ref[(2, 2, 0)]=-0.618378459583*x_ref[0] + (0.106153641763)*x_ref[1]
+        arg[(2, 2, 1)]=-0.570910256529*x[0] + (-0.593316609352)*x[1]
+        ref[(2, 2, 1)]=-0.570910256529*x_ref[0] + (-0.593316609352)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.512203336041*x[2]
+            ref[(0, 0, 0)]+=0.512203336041*x_ref[2]
+            arg[(0, 0, 1)]+=0.851424329198*x[2]
+            ref[(0, 0, 1)]+=0.851424329198*x_ref[2]
+            arg[(0, 1, 0)]+=0.412626859298*x[2]
+            ref[(0, 1, 0)]+=0.412626859298*x_ref[2]
+            arg[(0, 1, 1)]+=0.432748926485*x[2]
+            ref[(0, 1, 1)]+=0.432748926485*x_ref[2]
+            arg[(0, 2, 0)]+=-0.827382158663*x[2]
+            ref[(0, 2, 0)]+=-0.827382158663*x_ref[2]
+            arg[(0, 2, 1)]+=-0.814847661825*x[2]
+            ref[(0, 2, 1)]+=-0.814847661825*x_ref[2]
+            arg[(1, 0, 0)]+=0.356780557372*x[2]
+            ref[(1, 0, 0)]+=0.356780557372*x_ref[2]
+            arg[(1, 0, 1)]+=0.2914919447*x[2]
+            ref[(1, 0, 1)]+=0.2914919447*x_ref[2]
+            arg[(1, 1, 0)]+=0.536221197567*x[2]
+            ref[(1, 1, 0)]+=0.536221197567*x_ref[2]
+            arg[(1, 1, 1)]+=0.0192417306734*x[2]
+            ref[(1, 1, 1)]+=0.0192417306734*x_ref[2]
+            arg[(1, 2, 0)]+=0.493676774431*x[2]
+            ref[(1, 2, 0)]+=0.493676774431*x_ref[2]
+            arg[(1, 2, 1)]+=-0.641252905033*x[2]
+            ref[(1, 2, 1)]+=-0.641252905033*x_ref[2]
+            arg[(2, 0, 0)]+=0.916951794996*x[2]
+            ref[(2, 0, 0)]+=0.916951794996*x_ref[2]
+            arg[(2, 0, 1)]+=0.175793428625*x[2]
+            ref[(2, 0, 1)]+=0.175793428625*x_ref[2]
+            arg[(2, 1, 0)]+=-0.384014887556*x[2]
+            ref[(2, 1, 0)]+=-0.384014887556*x_ref[2]
+            arg[(2, 1, 1)]+=0.986532230796*x[2]
+            ref[(2, 1, 1)]+=0.986532230796*x_ref[2]
+            arg[(2, 2, 0)]+=0.350699976012*x[2]
+            ref[(2, 2, 0)]+=0.350699976012*x_ref[2]
+            arg[(2, 2, 1)]+=0.918308138171*x[2]
+            ref[(2, 2, 1)]+=0.918308138171*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 4, 2),w)
+        ref = Data(0,(3, 2, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=-0.639634370492*x[0] + (0.572657006697)*x[1]
+        ref[(0, 0, 0, 0)]=-0.639634370492*x_ref[0] + (0.572657006697)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.368387939014*x[0] + (-0.223254141264)*x[1]
+        ref[(0, 0, 0, 1)]=-0.368387939014*x_ref[0] + (-0.223254141264)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.188700273603*x[0] + (-0.742313219165)*x[1]
+        ref[(0, 0, 1, 0)]=0.188700273603*x_ref[0] + (-0.742313219165)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.437848159857*x[0] + (0.715941202687)*x[1]
+        ref[(0, 0, 1, 1)]=-0.437848159857*x_ref[0] + (0.715941202687)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.965558707389*x[0] + (0.958392891124)*x[1]
+        ref[(0, 0, 2, 0)]=-0.965558707389*x_ref[0] + (0.958392891124)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.330089802095*x[0] + (0.409572580086)*x[1]
+        ref[(0, 0, 2, 1)]=-0.330089802095*x_ref[0] + (0.409572580086)*x_ref[1]
+        arg[(0, 0, 3, 0)]=-0.687800968304*x[0] + (-0.884049877808)*x[1]
+        ref[(0, 0, 3, 0)]=-0.687800968304*x_ref[0] + (-0.884049877808)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.49489199044*x[0] + (0.191484364601)*x[1]
+        ref[(0, 0, 3, 1)]=0.49489199044*x_ref[0] + (0.191484364601)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.492145373535*x[0] + (0.229100054918)*x[1]
+        ref[(0, 1, 0, 0)]=0.492145373535*x_ref[0] + (0.229100054918)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.423862341747*x[0] + (-0.136658969996)*x[1]
+        ref[(0, 1, 0, 1)]=-0.423862341747*x_ref[0] + (-0.136658969996)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.587937251208*x[0] + (0.556838328833)*x[1]
+        ref[(0, 1, 1, 0)]=0.587937251208*x_ref[0] + (0.556838328833)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.26633078882*x[0] + (-0.576774941034)*x[1]
+        ref[(0, 1, 1, 1)]=-0.26633078882*x_ref[0] + (-0.576774941034)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.61616258999*x[0] + (-0.411178532123)*x[1]
+        ref[(0, 1, 2, 0)]=0.61616258999*x_ref[0] + (-0.411178532123)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.230465962086*x[0] + (-0.841980561744)*x[1]
+        ref[(0, 1, 2, 1)]=0.230465962086*x_ref[0] + (-0.841980561744)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.145978162107*x[0] + (0.737070453636)*x[1]
+        ref[(0, 1, 3, 0)]=-0.145978162107*x_ref[0] + (0.737070453636)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.755510639366*x[0] + (-0.389973568681)*x[1]
+        ref[(0, 1, 3, 1)]=-0.755510639366*x_ref[0] + (-0.389973568681)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.942068968827*x[0] + (0.87639894508)*x[1]
+        ref[(1, 0, 0, 0)]=-0.942068968827*x_ref[0] + (0.87639894508)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.154331556734*x[0] + (0.181733992215)*x[1]
+        ref[(1, 0, 0, 1)]=-0.154331556734*x_ref[0] + (0.181733992215)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.489047388584*x[0] + (0.851046495775)*x[1]
+        ref[(1, 0, 1, 0)]=0.489047388584*x_ref[0] + (0.851046495775)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.387449823135*x[0] + (-0.215339116137)*x[1]
+        ref[(1, 0, 1, 1)]=0.387449823135*x_ref[0] + (-0.215339116137)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.997711377826*x[0] + (-0.937423646447)*x[1]
+        ref[(1, 0, 2, 0)]=0.997711377826*x_ref[0] + (-0.937423646447)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.289804214724*x[0] + (0.979541790204)*x[1]
+        ref[(1, 0, 2, 1)]=0.289804214724*x_ref[0] + (0.979541790204)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.0685487470379*x[0] + (-0.0784478196967)*x[1]
+        ref[(1, 0, 3, 0)]=-0.0685487470379*x_ref[0] + (-0.0784478196967)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.908859007917*x[0] + (-0.915685460072)*x[1]
+        ref[(1, 0, 3, 1)]=-0.908859007917*x_ref[0] + (-0.915685460072)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.587957161946*x[0] + (-0.83098513512)*x[1]
+        ref[(1, 1, 0, 0)]=-0.587957161946*x_ref[0] + (-0.83098513512)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.283063475889*x[0] + (-0.901623428494)*x[1]
+        ref[(1, 1, 0, 1)]=0.283063475889*x_ref[0] + (-0.901623428494)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.047386299951*x[0] + (-0.884017552951)*x[1]
+        ref[(1, 1, 1, 0)]=-0.047386299951*x_ref[0] + (-0.884017552951)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.381286662638*x[0] + (0.145704163164)*x[1]
+        ref[(1, 1, 1, 1)]=0.381286662638*x_ref[0] + (0.145704163164)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.152109965403*x[0] + (0.194393994024)*x[1]
+        ref[(1, 1, 2, 0)]=-0.152109965403*x_ref[0] + (0.194393994024)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.753121274601*x[0] + (0.756812487492)*x[1]
+        ref[(1, 1, 2, 1)]=0.753121274601*x_ref[0] + (0.756812487492)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.326870313217*x[0] + (-0.617637203192)*x[1]
+        ref[(1, 1, 3, 0)]=-0.326870313217*x_ref[0] + (-0.617637203192)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.67773955993*x[0] + (-0.733458804355)*x[1]
+        ref[(1, 1, 3, 1)]=-0.67773955993*x_ref[0] + (-0.733458804355)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.352383658398*x[0] + (0.277262113336)*x[1]
+        ref[(2, 0, 0, 0)]=-0.352383658398*x_ref[0] + (0.277262113336)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.170321297085*x[0] + (0.11729938617)*x[1]
+        ref[(2, 0, 0, 1)]=-0.170321297085*x_ref[0] + (0.11729938617)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.227799835789*x[0] + (0.349938636122)*x[1]
+        ref[(2, 0, 1, 0)]=0.227799835789*x_ref[0] + (0.349938636122)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.439990540419*x[0] + (-0.205989826691)*x[1]
+        ref[(2, 0, 1, 1)]=0.439990540419*x_ref[0] + (-0.205989826691)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.842394444312*x[0] + (-0.500130741204)*x[1]
+        ref[(2, 0, 2, 0)]=-0.842394444312*x_ref[0] + (-0.500130741204)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.371077752354*x[0] + (-0.345866089287)*x[1]
+        ref[(2, 0, 2, 1)]=0.371077752354*x_ref[0] + (-0.345866089287)*x_ref[1]
+        arg[(2, 0, 3, 0)]=0.103721935143*x[0] + (-0.986518791025)*x[1]
+        ref[(2, 0, 3, 0)]=0.103721935143*x_ref[0] + (-0.986518791025)*x_ref[1]
+        arg[(2, 0, 3, 1)]=0.0683161060875*x[0] + (-0.506731068906)*x[1]
+        ref[(2, 0, 3, 1)]=0.0683161060875*x_ref[0] + (-0.506731068906)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.603182809771*x[0] + (0.772356630143)*x[1]
+        ref[(2, 1, 0, 0)]=0.603182809771*x_ref[0] + (0.772356630143)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.677747941698*x[0] + (-0.698671234336)*x[1]
+        ref[(2, 1, 0, 1)]=0.677747941698*x_ref[0] + (-0.698671234336)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.115289344351*x[0] + (0.931271831074)*x[1]
+        ref[(2, 1, 1, 0)]=-0.115289344351*x_ref[0] + (0.931271831074)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.158268202066*x[0] + (0.889840938835)*x[1]
+        ref[(2, 1, 1, 1)]=-0.158268202066*x_ref[0] + (0.889840938835)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.465621724302*x[0] + (-0.0233058704091)*x[1]
+        ref[(2, 1, 2, 0)]=0.465621724302*x_ref[0] + (-0.0233058704091)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.846375934399*x[0] + (0.339659606485)*x[1]
+        ref[(2, 1, 2, 1)]=-0.846375934399*x_ref[0] + (0.339659606485)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.648481421521*x[0] + (0.15061917665)*x[1]
+        ref[(2, 1, 3, 0)]=0.648481421521*x_ref[0] + (0.15061917665)*x_ref[1]
+        arg[(2, 1, 3, 1)]=-0.257970677539*x[0] + (0.0507899843251)*x[1]
+        ref[(2, 1, 3, 1)]=-0.257970677539*x_ref[0] + (0.0507899843251)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.953075966569*x[2]
+            ref[(0, 0, 0, 0)]+=0.953075966569*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.0612090247239*x[2]
+            ref[(0, 0, 0, 1)]+=-0.0612090247239*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.0206284794981*x[2]
+            ref[(0, 0, 1, 0)]+=0.0206284794981*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.783522412316*x[2]
+            ref[(0, 0, 1, 1)]+=0.783522412316*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.944991831745*x[2]
+            ref[(0, 0, 2, 0)]+=0.944991831745*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.40023354764*x[2]
+            ref[(0, 0, 2, 1)]+=0.40023354764*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.377344052889*x[2]
+            ref[(0, 0, 3, 0)]+=0.377344052889*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.978357558341*x[2]
+            ref[(0, 0, 3, 1)]+=0.978357558341*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.538315966594*x[2]
+            ref[(0, 1, 0, 0)]+=0.538315966594*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.643590368439*x[2]
+            ref[(0, 1, 0, 1)]+=0.643590368439*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.358592714743*x[2]
+            ref[(0, 1, 1, 0)]+=0.358592714743*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.951190923887*x[2]
+            ref[(0, 1, 1, 1)]+=-0.951190923887*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.148510705723*x[2]
+            ref[(0, 1, 2, 0)]+=0.148510705723*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.124999561854*x[2]
+            ref[(0, 1, 2, 1)]+=0.124999561854*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.390168181237*x[2]
+            ref[(0, 1, 3, 0)]+=-0.390168181237*x_ref[2]
+            arg[(0, 1, 3, 1)]+=0.0961953398784*x[2]
+            ref[(0, 1, 3, 1)]+=0.0961953398784*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.717405684136*x[2]
+            ref[(1, 0, 0, 0)]+=0.717405684136*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.380441845455*x[2]
+            ref[(1, 0, 0, 1)]+=0.380441845455*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.109112845313*x[2]
+            ref[(1, 0, 1, 0)]+=0.109112845313*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.172863479302*x[2]
+            ref[(1, 0, 1, 1)]+=0.172863479302*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.562645550908*x[2]
+            ref[(1, 0, 2, 0)]+=-0.562645550908*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.0026611852921*x[2]
+            ref[(1, 0, 2, 1)]+=0.0026611852921*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.251548404025*x[2]
+            ref[(1, 0, 3, 0)]+=-0.251548404025*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.843394786987*x[2]
+            ref[(1, 0, 3, 1)]+=0.843394786987*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.0898684520006*x[2]
+            ref[(1, 1, 0, 0)]+=-0.0898684520006*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.48966666066*x[2]
+            ref[(1, 1, 0, 1)]+=0.48966666066*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.342137557022*x[2]
+            ref[(1, 1, 1, 0)]+=0.342137557022*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.320655864356*x[2]
+            ref[(1, 1, 1, 1)]+=-0.320655864356*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.824157776626*x[2]
+            ref[(1, 1, 2, 0)]+=0.824157776626*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.0918142366159*x[2]
+            ref[(1, 1, 2, 1)]+=0.0918142366159*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.973038775692*x[2]
+            ref[(1, 1, 3, 0)]+=-0.973038775692*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.365297475993*x[2]
+            ref[(1, 1, 3, 1)]+=-0.365297475993*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.762085608675*x[2]
+            ref[(2, 0, 0, 0)]+=-0.762085608675*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.601370476607*x[2]
+            ref[(2, 0, 0, 1)]+=0.601370476607*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.98596012377*x[2]
+            ref[(2, 0, 1, 0)]+=0.98596012377*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.942689382316*x[2]
+            ref[(2, 0, 1, 1)]+=0.942689382316*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.118278728747*x[2]
+            ref[(2, 0, 2, 0)]+=0.118278728747*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.849505205919*x[2]
+            ref[(2, 0, 2, 1)]+=0.849505205919*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.785779747213*x[2]
+            ref[(2, 0, 3, 0)]+=0.785779747213*x_ref[2]
+            arg[(2, 0, 3, 1)]+=0.273487430267*x[2]
+            ref[(2, 0, 3, 1)]+=0.273487430267*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.00150040050151*x[2]
+            ref[(2, 1, 0, 0)]+=0.00150040050151*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.31183392109*x[2]
+            ref[(2, 1, 0, 1)]+=0.31183392109*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.0983402385396*x[2]
+            ref[(2, 1, 1, 0)]+=0.0983402385396*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.321444037789*x[2]
+            ref[(2, 1, 1, 1)]+=0.321444037789*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.178613380118*x[2]
+            ref[(2, 1, 2, 0)]+=0.178613380118*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.420209279471*x[2]
+            ref[(2, 1, 2, 1)]+=-0.420209279471*x_ref[2]
+            arg[(2, 1, 3, 0)]+=0.928125105521*x[2]
+            ref[(2, 1, 3, 0)]+=0.928125105521*x_ref[2]
+            arg[(2, 1, 3, 1)]+=-0.39764655829*x[2]
+            ref[(2, 1, 3, 1)]+=-0.39764655829*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.175226667882*x[0]**o + (0.206476965469)*x[0] + (0.894303657771)*x[1]**o + (0.187903821684)*x[1]
+        ref=-0.175226667882*x_ref[0]**o + (0.206476965469)*x_ref[0] + (0.894303657771)*x_ref[1]**o + (0.187903821684)*x_ref[1]
+        if dim==3:
+            arg+=(0.968277886848)*x[2]**o + (-0.960398773148)*x[2]
+            ref+=(0.968277886848)*x_ref[2]**o + (-0.960398773148)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.565414174198*x[0]**o + (0.298420817661)*x[0] + (-0.862005147414)*x[1]**o + (0.415101660919)*x[1]
+        ref[(0,)]=0.565414174198*x_ref[0]**o + (0.298420817661)*x_ref[0] + (-0.862005147414)*x_ref[1]**o + (0.415101660919)*x_ref[1]
+        arg[(1,)]=0.309643775636*x[0]**o + (0.101029273957)*x[0] + (-0.372371561196)*x[1]**o + (0.939922437534)*x[1]
+        ref[(1,)]=0.309643775636*x_ref[0]**o + (0.101029273957)*x_ref[0] + (-0.372371561196)*x_ref[1]**o + (0.939922437534)*x_ref[1]
+        arg[(2,)]=0.697076312397*x[0]**o + (-0.946219786114)*x[0] + (-0.587541673483)*x[1]**o + (0.0410341583248)*x[1]
+        ref[(2,)]=0.697076312397*x_ref[0]**o + (-0.946219786114)*x_ref[0] + (-0.587541673483)*x_ref[1]**o + (0.0410341583248)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.546845574471*x[2]**o + (0.831415498944)*x[2]
+            ref[(0,)]+=-0.546845574471*x_ref[2]**o + (0.831415498944)*x_ref[2]
+            arg[(1,)]+=0.28694651445*x[2]**o + (-0.325824438445)*x[2]
+            ref[(1,)]+=0.28694651445*x_ref[2]**o + (-0.325824438445)*x_ref[2]
+            arg[(2,)]+=-0.656826068273*x[2]**o + (0.730696276418)*x[2]
+            ref[(2,)]+=-0.656826068273*x_ref[2]**o + (0.730696276418)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=0.157771823485*x[0]**o + (0.22369254067)*x[0] + (0.819754145259)*x[1]**o + (-0.465099173877)*x[1]
+        ref[(0, 0)]=0.157771823485*x_ref[0]**o + (0.22369254067)*x_ref[0] + (0.819754145259)*x_ref[1]**o + (-0.465099173877)*x_ref[1]
+        arg[(0, 1)]=0.477664030434*x[0]**o + (0.0487811516937)*x[0] + (0.291005881861)*x[1]**o + (-0.71206229216)*x[1]
+        ref[(0, 1)]=0.477664030434*x_ref[0]**o + (0.0487811516937)*x_ref[0] + (0.291005881861)*x_ref[1]**o + (-0.71206229216)*x_ref[1]
+        arg[(0, 2)]=0.0214323444882*x[0]**o + (0.556743861657)*x[0] + (0.991309331802)*x[1]**o + (-0.337277672608)*x[1]
+        ref[(0, 2)]=0.0214323444882*x_ref[0]**o + (0.556743861657)*x_ref[0] + (0.991309331802)*x_ref[1]**o + (-0.337277672608)*x_ref[1]
+        arg[(1, 0)]=-0.821698122084*x[0]**o + (0.032467616046)*x[0] + (0.393774396703)*x[1]**o + (-0.0636972699536)*x[1]
+        ref[(1, 0)]=-0.821698122084*x_ref[0]**o + (0.032467616046)*x_ref[0] + (0.393774396703)*x_ref[1]**o + (-0.0636972699536)*x_ref[1]
+        arg[(1, 1)]=-0.868435507983*x[0]**o + (0.491945697182)*x[0] + (0.865166288589)*x[1]**o + (0.607201287507)*x[1]
+        ref[(1, 1)]=-0.868435507983*x_ref[0]**o + (0.491945697182)*x_ref[0] + (0.865166288589)*x_ref[1]**o + (0.607201287507)*x_ref[1]
+        arg[(1, 2)]=-0.0251540034227*x[0]**o + (-0.890415922724)*x[0] + (-0.6883774706)*x[1]**o + (-0.335368640359)*x[1]
+        ref[(1, 2)]=-0.0251540034227*x_ref[0]**o + (-0.890415922724)*x_ref[0] + (-0.6883774706)*x_ref[1]**o + (-0.335368640359)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.920445114536*x[2]**o + (0.0382710017148)*x[2]
+            ref[(0, 0)]+=-0.920445114536*x_ref[2]**o + (0.0382710017148)*x_ref[2]
+            arg[(0, 1)]+=-0.0856512157409*x[2]**o + (0.822404094338)*x[2]
+            ref[(0, 1)]+=-0.0856512157409*x_ref[2]**o + (0.822404094338)*x_ref[2]
+            arg[(0, 2)]+=-0.889239621319*x[2]**o + (-0.107023868444)*x[2]
+            ref[(0, 2)]+=-0.889239621319*x_ref[2]**o + (-0.107023868444)*x_ref[2]
+            arg[(1, 0)]+=0.0313135963431*x[2]**o + (-0.0161125100985)*x[2]
+            ref[(1, 0)]+=0.0313135963431*x_ref[2]**o + (-0.0161125100985)*x_ref[2]
+            arg[(1, 1)]+=0.17766788464*x[2]**o + (0.76917804879)*x[2]
+            ref[(1, 1)]+=0.17766788464*x_ref[2]**o + (0.76917804879)*x_ref[2]
+            arg[(1, 2)]+=0.396993748628*x[2]**o + (0.68166949075)*x[2]
+            ref[(1, 2)]+=0.396993748628*x_ref[2]**o + (0.68166949075)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3),w)
+        ref = Data(0,(3, 4, 3),w_ref)
+        arg[(0, 0, 0)]=-0.276296325853*x[0]**o + (0.96362187348)*x[0] + (0.816255333344)*x[1]**o + (-0.156178362786)*x[1]
+        ref[(0, 0, 0)]=-0.276296325853*x_ref[0]**o + (0.96362187348)*x_ref[0] + (0.816255333344)*x_ref[1]**o + (-0.156178362786)*x_ref[1]
+        arg[(0, 0, 1)]=-0.0579214505731*x[0]**o + (0.366440276008)*x[0] + (0.827087343308)*x[1]**o + (-0.231399830617)*x[1]
+        ref[(0, 0, 1)]=-0.0579214505731*x_ref[0]**o + (0.366440276008)*x_ref[0] + (0.827087343308)*x_ref[1]**o + (-0.231399830617)*x_ref[1]
+        arg[(0, 0, 2)]=0.441576562754*x[0]**o + (-0.95708769948)*x[0] + (-0.168691621331)*x[1]**o + (0.347824677143)*x[1]
+        ref[(0, 0, 2)]=0.441576562754*x_ref[0]**o + (-0.95708769948)*x_ref[0] + (-0.168691621331)*x_ref[1]**o + (0.347824677143)*x_ref[1]
+        arg[(0, 1, 0)]=0.438444695749*x[0]**o + (0.426918463622)*x[0] + (0.515024648016)*x[1]**o + (0.45891543541)*x[1]
+        ref[(0, 1, 0)]=0.438444695749*x_ref[0]**o + (0.426918463622)*x_ref[0] + (0.515024648016)*x_ref[1]**o + (0.45891543541)*x_ref[1]
+        arg[(0, 1, 1)]=-0.617970905326*x[0]**o + (-0.843930992547)*x[0] + (0.59324912098)*x[1]**o + (0.973506905121)*x[1]
+        ref[(0, 1, 1)]=-0.617970905326*x_ref[0]**o + (-0.843930992547)*x_ref[0] + (0.59324912098)*x_ref[1]**o + (0.973506905121)*x_ref[1]
+        arg[(0, 1, 2)]=0.522745571841*x[0]**o + (0.817264038385)*x[0] + (0.64110717768)*x[1]**o + (0.85526321959)*x[1]
+        ref[(0, 1, 2)]=0.522745571841*x_ref[0]**o + (0.817264038385)*x_ref[0] + (0.64110717768)*x_ref[1]**o + (0.85526321959)*x_ref[1]
+        arg[(0, 2, 0)]=-0.223307392429*x[0]**o + (0.49914977932)*x[0] + (-0.905637469266)*x[1]**o + (0.888581611614)*x[1]
+        ref[(0, 2, 0)]=-0.223307392429*x_ref[0]**o + (0.49914977932)*x_ref[0] + (-0.905637469266)*x_ref[1]**o + (0.888581611614)*x_ref[1]
+        arg[(0, 2, 1)]=0.686062083326*x[0]**o + (-0.29541995291)*x[0] + (0.00724472459075)*x[1]**o + (-0.895682061928)*x[1]
+        ref[(0, 2, 1)]=0.686062083326*x_ref[0]**o + (-0.29541995291)*x_ref[0] + (0.00724472459075)*x_ref[1]**o + (-0.895682061928)*x_ref[1]
+        arg[(0, 2, 2)]=0.213483231197*x[0]**o + (-0.507984274056)*x[0] + (-0.698808114877)*x[1]**o + (-0.16617856725)*x[1]
+        ref[(0, 2, 2)]=0.213483231197*x_ref[0]**o + (-0.507984274056)*x_ref[0] + (-0.698808114877)*x_ref[1]**o + (-0.16617856725)*x_ref[1]
+        arg[(0, 3, 0)]=-0.911757052034*x[0]**o + (0.447421182975)*x[0] + (-0.110657166015)*x[1]**o + (0.0660396712571)*x[1]
+        ref[(0, 3, 0)]=-0.911757052034*x_ref[0]**o + (0.447421182975)*x_ref[0] + (-0.110657166015)*x_ref[1]**o + (0.0660396712571)*x_ref[1]
+        arg[(0, 3, 1)]=0.624096250963*x[0]**o + (0.079285635522)*x[0] + (-0.503001337915)*x[1]**o + (-0.943720464894)*x[1]
+        ref[(0, 3, 1)]=0.624096250963*x_ref[0]**o + (0.079285635522)*x_ref[0] + (-0.503001337915)*x_ref[1]**o + (-0.943720464894)*x_ref[1]
+        arg[(0, 3, 2)]=-0.938521719566*x[0]**o + (0.155261469438)*x[0] + (0.12308669595)*x[1]**o + (-0.561508360784)*x[1]
+        ref[(0, 3, 2)]=-0.938521719566*x_ref[0]**o + (0.155261469438)*x_ref[0] + (0.12308669595)*x_ref[1]**o + (-0.561508360784)*x_ref[1]
+        arg[(1, 0, 0)]=0.372890188347*x[0]**o + (-0.726828462275)*x[0] + (0.374301715847)*x[1]**o + (0.703600379111)*x[1]
+        ref[(1, 0, 0)]=0.372890188347*x_ref[0]**o + (-0.726828462275)*x_ref[0] + (0.374301715847)*x_ref[1]**o + (0.703600379111)*x_ref[1]
+        arg[(1, 0, 1)]=-0.525686108297*x[0]**o + (-0.140082508765)*x[0] + (0.258157214909)*x[1]**o + (-0.657358337415)*x[1]
+        ref[(1, 0, 1)]=-0.525686108297*x_ref[0]**o + (-0.140082508765)*x_ref[0] + (0.258157214909)*x_ref[1]**o + (-0.657358337415)*x_ref[1]
+        arg[(1, 0, 2)]=0.290424300561*x[0]**o + (0.823623493097)*x[0] + (0.287572140584)*x[1]**o + (0.290013944647)*x[1]
+        ref[(1, 0, 2)]=0.290424300561*x_ref[0]**o + (0.823623493097)*x_ref[0] + (0.287572140584)*x_ref[1]**o + (0.290013944647)*x_ref[1]
+        arg[(1, 1, 0)]=-0.394933953017*x[0]**o + (-0.176346343604)*x[0] + (-0.0218985850108)*x[1]**o + (0.0552273624694)*x[1]
+        ref[(1, 1, 0)]=-0.394933953017*x_ref[0]**o + (-0.176346343604)*x_ref[0] + (-0.0218985850108)*x_ref[1]**o + (0.0552273624694)*x_ref[1]
+        arg[(1, 1, 1)]=-0.480567755421*x[0]**o + (-0.920343007272)*x[0] + (0.432993713175)*x[1]**o + (0.816263791383)*x[1]
+        ref[(1, 1, 1)]=-0.480567755421*x_ref[0]**o + (-0.920343007272)*x_ref[0] + (0.432993713175)*x_ref[1]**o + (0.816263791383)*x_ref[1]
+        arg[(1, 1, 2)]=-0.501384788278*x[0]**o + (0.182931033335)*x[0] + (-0.22714876549)*x[1]**o + (0.27192493085)*x[1]
+        ref[(1, 1, 2)]=-0.501384788278*x_ref[0]**o + (0.182931033335)*x_ref[0] + (-0.22714876549)*x_ref[1]**o + (0.27192493085)*x_ref[1]
+        arg[(1, 2, 0)]=-0.314578735435*x[0]**o + (0.207609802948)*x[0] + (0.664993570961)*x[1]**o + (-0.77560224283)*x[1]
+        ref[(1, 2, 0)]=-0.314578735435*x_ref[0]**o + (0.207609802948)*x_ref[0] + (0.664993570961)*x_ref[1]**o + (-0.77560224283)*x_ref[1]
+        arg[(1, 2, 1)]=-0.57475422537*x[0]**o + (-0.84602639857)*x[0] + (0.820048971194)*x[1]**o + (0.59990128607)*x[1]
+        ref[(1, 2, 1)]=-0.57475422537*x_ref[0]**o + (-0.84602639857)*x_ref[0] + (0.820048971194)*x_ref[1]**o + (0.59990128607)*x_ref[1]
+        arg[(1, 2, 2)]=-0.828972625787*x[0]**o + (-0.414440709979)*x[0] + (-0.587174639772)*x[1]**o + (-0.568653398101)*x[1]
+        ref[(1, 2, 2)]=-0.828972625787*x_ref[0]**o + (-0.414440709979)*x_ref[0] + (-0.587174639772)*x_ref[1]**o + (-0.568653398101)*x_ref[1]
+        arg[(1, 3, 0)]=0.50046650783*x[0]**o + (-0.0807753721777)*x[0] + (-0.0922625823514)*x[1]**o + (0.387710904799)*x[1]
+        ref[(1, 3, 0)]=0.50046650783*x_ref[0]**o + (-0.0807753721777)*x_ref[0] + (-0.0922625823514)*x_ref[1]**o + (0.387710904799)*x_ref[1]
+        arg[(1, 3, 1)]=-0.436061412335*x[0]**o + (-0.280459216294)*x[0] + (-0.386251393434)*x[1]**o + (0.626106699274)*x[1]
+        ref[(1, 3, 1)]=-0.436061412335*x_ref[0]**o + (-0.280459216294)*x_ref[0] + (-0.386251393434)*x_ref[1]**o + (0.626106699274)*x_ref[1]
+        arg[(1, 3, 2)]=-0.202236075062*x[0]**o + (0.740599418987)*x[0] + (-0.0968245461928)*x[1]**o + (0.982135538611)*x[1]
+        ref[(1, 3, 2)]=-0.202236075062*x_ref[0]**o + (0.740599418987)*x_ref[0] + (-0.0968245461928)*x_ref[1]**o + (0.982135538611)*x_ref[1]
+        arg[(2, 0, 0)]=0.932931249613*x[0]**o + (0.392370051458)*x[0] + (0.539641037303)*x[1]**o + (0.710842684881)*x[1]
+        ref[(2, 0, 0)]=0.932931249613*x_ref[0]**o + (0.392370051458)*x_ref[0] + (0.539641037303)*x_ref[1]**o + (0.710842684881)*x_ref[1]
+        arg[(2, 0, 1)]=-0.0414102128908*x[0]**o + (0.302477907059)*x[0] + (-0.640380883751)*x[1]**o + (0.33467072027)*x[1]
+        ref[(2, 0, 1)]=-0.0414102128908*x_ref[0]**o + (0.302477907059)*x_ref[0] + (-0.640380883751)*x_ref[1]**o + (0.33467072027)*x_ref[1]
+        arg[(2, 0, 2)]=-0.150753999462*x[0]**o + (-0.413519813679)*x[0] + (-0.347070998166)*x[1]**o + (-0.943162493548)*x[1]
+        ref[(2, 0, 2)]=-0.150753999462*x_ref[0]**o + (-0.413519813679)*x_ref[0] + (-0.347070998166)*x_ref[1]**o + (-0.943162493548)*x_ref[1]
+        arg[(2, 1, 0)]=-0.20993565576*x[0]**o + (0.506577139525)*x[0] + (-0.473440605549)*x[1]**o + (-0.970038587094)*x[1]
+        ref[(2, 1, 0)]=-0.20993565576*x_ref[0]**o + (0.506577139525)*x_ref[0] + (-0.473440605549)*x_ref[1]**o + (-0.970038587094)*x_ref[1]
+        arg[(2, 1, 1)]=-0.426475931207*x[0]**o + (-0.03764204235)*x[0] + (-0.11990761187)*x[1]**o + (-0.482513191167)*x[1]
+        ref[(2, 1, 1)]=-0.426475931207*x_ref[0]**o + (-0.03764204235)*x_ref[0] + (-0.11990761187)*x_ref[1]**o + (-0.482513191167)*x_ref[1]
+        arg[(2, 1, 2)]=-0.70105840218*x[0]**o + (0.71324745933)*x[0] + (-0.253061853687)*x[1]**o + (0.602255146294)*x[1]
+        ref[(2, 1, 2)]=-0.70105840218*x_ref[0]**o + (0.71324745933)*x_ref[0] + (-0.253061853687)*x_ref[1]**o + (0.602255146294)*x_ref[1]
+        arg[(2, 2, 0)]=-0.3092190692*x[0]**o + (-0.215681956884)*x[0] + (0.845868017226)*x[1]**o + (-0.759550199579)*x[1]
+        ref[(2, 2, 0)]=-0.3092190692*x_ref[0]**o + (-0.215681956884)*x_ref[0] + (0.845868017226)*x_ref[1]**o + (-0.759550199579)*x_ref[1]
+        arg[(2, 2, 1)]=-0.148168625419*x[0]**o + (0.980318324596)*x[0] + (-0.206152154279)*x[1]**o + (0.152363611569)*x[1]
+        ref[(2, 2, 1)]=-0.148168625419*x_ref[0]**o + (0.980318324596)*x_ref[0] + (-0.206152154279)*x_ref[1]**o + (0.152363611569)*x_ref[1]
+        arg[(2, 2, 2)]=0.224279123122*x[0]**o + (0.379938583162)*x[0] + (0.61786631909)*x[1]**o + (0.505909132523)*x[1]
+        ref[(2, 2, 2)]=0.224279123122*x_ref[0]**o + (0.379938583162)*x_ref[0] + (0.61786631909)*x_ref[1]**o + (0.505909132523)*x_ref[1]
+        arg[(2, 3, 0)]=0.60880584783*x[0]**o + (0.400930912474)*x[0] + (-0.593654873607)*x[1]**o + (-0.903899003924)*x[1]
+        ref[(2, 3, 0)]=0.60880584783*x_ref[0]**o + (0.400930912474)*x_ref[0] + (-0.593654873607)*x_ref[1]**o + (-0.903899003924)*x_ref[1]
+        arg[(2, 3, 1)]=0.0920186587311*x[0]**o + (-0.224069534369)*x[0] + (-0.0242556776206)*x[1]**o + (-0.898958886787)*x[1]
+        ref[(2, 3, 1)]=0.0920186587311*x_ref[0]**o + (-0.224069534369)*x_ref[0] + (-0.0242556776206)*x_ref[1]**o + (-0.898958886787)*x_ref[1]
+        arg[(2, 3, 2)]=0.354985284617*x[0]**o + (0.126125406934)*x[0] + (0.048157152957)*x[1]**o + (0.731874507516)*x[1]
+        ref[(2, 3, 2)]=0.354985284617*x_ref[0]**o + (0.126125406934)*x_ref[0] + (0.048157152957)*x_ref[1]**o + (0.731874507516)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.665778427699*x[2]**o + (-0.7243454248)*x[2]
+            ref[(0, 0, 0)]+=0.665778427699*x_ref[2]**o + (-0.7243454248)*x_ref[2]
+            arg[(0, 0, 1)]+=0.365186175635*x[2]**o + (-0.36287759843)*x[2]
+            ref[(0, 0, 1)]+=0.365186175635*x_ref[2]**o + (-0.36287759843)*x_ref[2]
+            arg[(0, 0, 2)]+=0.355013724495*x[2]**o + (0.923955005984)*x[2]
+            ref[(0, 0, 2)]+=0.355013724495*x_ref[2]**o + (0.923955005984)*x_ref[2]
+            arg[(0, 1, 0)]+=0.377789689377*x[2]**o + (-0.21994859799)*x[2]
+            ref[(0, 1, 0)]+=0.377789689377*x_ref[2]**o + (-0.21994859799)*x_ref[2]
+            arg[(0, 1, 1)]+=0.734745223948*x[2]**o + (0.855770027778)*x[2]
+            ref[(0, 1, 1)]+=0.734745223948*x_ref[2]**o + (0.855770027778)*x_ref[2]
+            arg[(0, 1, 2)]+=0.910589978791*x[2]**o + (0.779874795482)*x[2]
+            ref[(0, 1, 2)]+=0.910589978791*x_ref[2]**o + (0.779874795482)*x_ref[2]
+            arg[(0, 2, 0)]+=0.308943146594*x[2]**o + (-0.23480547586)*x[2]
+            ref[(0, 2, 0)]+=0.308943146594*x_ref[2]**o + (-0.23480547586)*x_ref[2]
+            arg[(0, 2, 1)]+=-0.580794601271*x[2]**o + (0.499678520887)*x[2]
+            ref[(0, 2, 1)]+=-0.580794601271*x_ref[2]**o + (0.499678520887)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.538383855271*x[2]**o + (0.310372325848)*x[2]
+            ref[(0, 2, 2)]+=-0.538383855271*x_ref[2]**o + (0.310372325848)*x_ref[2]
+            arg[(0, 3, 0)]+=0.225959831714*x[2]**o + (0.334796860702)*x[2]
+            ref[(0, 3, 0)]+=0.225959831714*x_ref[2]**o + (0.334796860702)*x_ref[2]
+            arg[(0, 3, 1)]+=-0.259571759935*x[2]**o + (0.530960667739)*x[2]
+            ref[(0, 3, 1)]+=-0.259571759935*x_ref[2]**o + (0.530960667739)*x_ref[2]
+            arg[(0, 3, 2)]+=0.615206189186*x[2]**o + (-0.0314843107524)*x[2]
+            ref[(0, 3, 2)]+=0.615206189186*x_ref[2]**o + (-0.0314843107524)*x_ref[2]
+            arg[(1, 0, 0)]+=0.377020152797*x[2]**o + (0.704157168199)*x[2]
+            ref[(1, 0, 0)]+=0.377020152797*x_ref[2]**o + (0.704157168199)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.320347473989*x[2]**o + (-0.345420774473)*x[2]
+            ref[(1, 0, 1)]+=-0.320347473989*x_ref[2]**o + (-0.345420774473)*x_ref[2]
+            arg[(1, 0, 2)]+=0.73976798306*x[2]**o + (0.764744040531)*x[2]
+            ref[(1, 0, 2)]+=0.73976798306*x_ref[2]**o + (0.764744040531)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.810137951159*x[2]**o + (-0.0789524935413)*x[2]
+            ref[(1, 1, 0)]+=-0.810137951159*x_ref[2]**o + (-0.0789524935413)*x_ref[2]
+            arg[(1, 1, 1)]+=0.342661653585*x[2]**o + (0.0569185055381)*x[2]
+            ref[(1, 1, 1)]+=0.342661653585*x_ref[2]**o + (0.0569185055381)*x_ref[2]
+            arg[(1, 1, 2)]+=0.901700634189*x[2]**o + (-0.612378445476)*x[2]
+            ref[(1, 1, 2)]+=0.901700634189*x_ref[2]**o + (-0.612378445476)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.945076622423*x[2]**o + (-0.953976008189)*x[2]
+            ref[(1, 2, 0)]+=-0.945076622423*x_ref[2]**o + (-0.953976008189)*x_ref[2]
+            arg[(1, 2, 1)]+=0.893637679765*x[2]**o + (-0.483437532425)*x[2]
+            ref[(1, 2, 1)]+=0.893637679765*x_ref[2]**o + (-0.483437532425)*x_ref[2]
+            arg[(1, 2, 2)]+=0.192646072374*x[2]**o + (0.8477770645)*x[2]
+            ref[(1, 2, 2)]+=0.192646072374*x_ref[2]**o + (0.8477770645)*x_ref[2]
+            arg[(1, 3, 0)]+=0.631213220585*x[2]**o + (-0.997794919326)*x[2]
+            ref[(1, 3, 0)]+=0.631213220585*x_ref[2]**o + (-0.997794919326)*x_ref[2]
+            arg[(1, 3, 1)]+=-0.258616726092*x[2]**o + (-0.021341137708)*x[2]
+            ref[(1, 3, 1)]+=-0.258616726092*x_ref[2]**o + (-0.021341137708)*x_ref[2]
+            arg[(1, 3, 2)]+=0.049079489818*x[2]**o + (-0.300561123329)*x[2]
+            ref[(1, 3, 2)]+=0.049079489818*x_ref[2]**o + (-0.300561123329)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.117641033003*x[2]**o + (-0.457953116996)*x[2]
+            ref[(2, 0, 0)]+=-0.117641033003*x_ref[2]**o + (-0.457953116996)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.458841390675*x[2]**o + (0.596235331169)*x[2]
+            ref[(2, 0, 1)]+=-0.458841390675*x_ref[2]**o + (0.596235331169)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.672485677267*x[2]**o + (0.933270818294)*x[2]
+            ref[(2, 0, 2)]+=-0.672485677267*x_ref[2]**o + (0.933270818294)*x_ref[2]
+            arg[(2, 1, 0)]+=0.997374205631*x[2]**o + (-0.384739596011)*x[2]
+            ref[(2, 1, 0)]+=0.997374205631*x_ref[2]**o + (-0.384739596011)*x_ref[2]
+            arg[(2, 1, 1)]+=0.846354514357*x[2]**o + (0.306823476893)*x[2]
+            ref[(2, 1, 1)]+=0.846354514357*x_ref[2]**o + (0.306823476893)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.248493656959*x[2]**o + (-0.561881348799)*x[2]
+            ref[(2, 1, 2)]+=-0.248493656959*x_ref[2]**o + (-0.561881348799)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.697252256609*x[2]**o + (-0.0285191204426)*x[2]
+            ref[(2, 2, 0)]+=-0.697252256609*x_ref[2]**o + (-0.0285191204426)*x_ref[2]
+            arg[(2, 2, 1)]+=0.0515326621014*x[2]**o + (-0.713062679833)*x[2]
+            ref[(2, 2, 1)]+=0.0515326621014*x_ref[2]**o + (-0.713062679833)*x_ref[2]
+            arg[(2, 2, 2)]+=0.0470040445313*x[2]**o + (0.604758314625)*x[2]
+            ref[(2, 2, 2)]+=0.0470040445313*x_ref[2]**o + (0.604758314625)*x_ref[2]
+            arg[(2, 3, 0)]+=0.227632179995*x[2]**o + (-0.0636914377951)*x[2]
+            ref[(2, 3, 0)]+=0.227632179995*x_ref[2]**o + (-0.0636914377951)*x_ref[2]
+            arg[(2, 3, 1)]+=0.587035342434*x[2]**o + (-0.64794985875)*x[2]
+            ref[(2, 3, 1)]+=0.587035342434*x_ref[2]**o + (-0.64794985875)*x_ref[2]
+            arg[(2, 3, 2)]+=-0.140200015132*x[2]**o + (0.781589878905)*x[2]
+            ref[(2, 3, 2)]+=-0.140200015132*x_ref[2]**o + (0.781589878905)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunction
+
+        assumptions: ReducedFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedFunction to ReducedFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3, 4),w)
+        ref = Data(0,(3, 4, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.469405766196*x[0]**o + (-0.232147474334)*x[0] + (-0.164941462106)*x[1]**o + (0.691160341537)*x[1]
+        ref[(0, 0, 0, 0)]=0.469405766196*x_ref[0]**o + (-0.232147474334)*x_ref[0] + (-0.164941462106)*x_ref[1]**o + (0.691160341537)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.344586802504*x[0]**o + (-0.29780600376)*x[0] + (-0.435280750565)*x[1]**o + (0.188269391886)*x[1]
+        ref[(0, 0, 0, 1)]=-0.344586802504*x_ref[0]**o + (-0.29780600376)*x_ref[0] + (-0.435280750565)*x_ref[1]**o + (0.188269391886)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.769255361312*x[0]**o + (0.594596799302)*x[0] + (0.857485537783)*x[1]**o + (0.8991461166)*x[1]
+        ref[(0, 0, 0, 2)]=-0.769255361312*x_ref[0]**o + (0.594596799302)*x_ref[0] + (0.857485537783)*x_ref[1]**o + (0.8991461166)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.655443871145*x[0]**o + (-0.870016586262)*x[0] + (0.527990238451)*x[1]**o + (-0.369545378204)*x[1]
+        ref[(0, 0, 0, 3)]=0.655443871145*x_ref[0]**o + (-0.870016586262)*x_ref[0] + (0.527990238451)*x_ref[1]**o + (-0.369545378204)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.676768220145*x[0]**o + (0.954236982437)*x[0] + (0.058449197454)*x[1]**o + (0.262972933186)*x[1]
+        ref[(0, 0, 1, 0)]=-0.676768220145*x_ref[0]**o + (0.954236982437)*x_ref[0] + (0.058449197454)*x_ref[1]**o + (0.262972933186)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.220385439714*x[0]**o + (-0.875138356427)*x[0] + (-0.705278434083)*x[1]**o + (-0.766594904078)*x[1]
+        ref[(0, 0, 1, 1)]=0.220385439714*x_ref[0]**o + (-0.875138356427)*x_ref[0] + (-0.705278434083)*x_ref[1]**o + (-0.766594904078)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.386811890318*x[0]**o + (0.611396588016)*x[0] + (-0.574934100024)*x[1]**o + (0.0812835374396)*x[1]
+        ref[(0, 0, 1, 2)]=-0.386811890318*x_ref[0]**o + (0.611396588016)*x_ref[0] + (-0.574934100024)*x_ref[1]**o + (0.0812835374396)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.0837453425473*x[0]**o + (0.0710699930704)*x[0] + (-0.247105428718)*x[1]**o + (-0.44081810926)*x[1]
+        ref[(0, 0, 1, 3)]=0.0837453425473*x_ref[0]**o + (0.0710699930704)*x_ref[0] + (-0.247105428718)*x_ref[1]**o + (-0.44081810926)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.0874626087878*x[0]**o + (0.445848786766)*x[0] + (-0.398785837975)*x[1]**o + (-0.37297884167)*x[1]
+        ref[(0, 0, 2, 0)]=0.0874626087878*x_ref[0]**o + (0.445848786766)*x_ref[0] + (-0.398785837975)*x_ref[1]**o + (-0.37297884167)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.325594632814*x[0]**o + (0.509883899888)*x[0] + (0.370631106947)*x[1]**o + (0.873722165047)*x[1]
+        ref[(0, 0, 2, 1)]=0.325594632814*x_ref[0]**o + (0.509883899888)*x_ref[0] + (0.370631106947)*x_ref[1]**o + (0.873722165047)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.50179584424*x[0]**o + (0.629889126672)*x[0] + (-0.632658848208)*x[1]**o + (0.393348735936)*x[1]
+        ref[(0, 0, 2, 2)]=0.50179584424*x_ref[0]**o + (0.629889126672)*x_ref[0] + (-0.632658848208)*x_ref[1]**o + (0.393348735936)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.324191170602*x[0]**o + (0.641335999799)*x[0] + (-0.660147985308)*x[1]**o + (-0.38703993646)*x[1]
+        ref[(0, 0, 2, 3)]=-0.324191170602*x_ref[0]**o + (0.641335999799)*x_ref[0] + (-0.660147985308)*x_ref[1]**o + (-0.38703993646)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.561393898854*x[0]**o + (-0.105690164594)*x[0] + (0.322799014658)*x[1]**o + (-0.52043308139)*x[1]
+        ref[(0, 1, 0, 0)]=-0.561393898854*x_ref[0]**o + (-0.105690164594)*x_ref[0] + (0.322799014658)*x_ref[1]**o + (-0.52043308139)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.928305857432*x[0]**o + (-0.349013908027)*x[0] + (-0.658118791492)*x[1]**o + (-0.263255345191)*x[1]
+        ref[(0, 1, 0, 1)]=0.928305857432*x_ref[0]**o + (-0.349013908027)*x_ref[0] + (-0.658118791492)*x_ref[1]**o + (-0.263255345191)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.361888965738*x[0]**o + (-0.468208886319)*x[0] + (0.649050640964)*x[1]**o + (-0.419533762575)*x[1]
+        ref[(0, 1, 0, 2)]=0.361888965738*x_ref[0]**o + (-0.468208886319)*x_ref[0] + (0.649050640964)*x_ref[1]**o + (-0.419533762575)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.994185484765*x[0]**o + (-0.676894354588)*x[0] + (-0.413338468606)*x[1]**o + (-0.00791603787323)*x[1]
+        ref[(0, 1, 0, 3)]=0.994185484765*x_ref[0]**o + (-0.676894354588)*x_ref[0] + (-0.413338468606)*x_ref[1]**o + (-0.00791603787323)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.682422063094*x[0]**o + (-0.954979346461)*x[0] + (0.195176297595)*x[1]**o + (-0.0389965184682)*x[1]
+        ref[(0, 1, 1, 0)]=-0.682422063094*x_ref[0]**o + (-0.954979346461)*x_ref[0] + (0.195176297595)*x_ref[1]**o + (-0.0389965184682)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.43193373881*x[0]**o + (0.785438126704)*x[0] + (0.617670845007)*x[1]**o + (0.0382188718465)*x[1]
+        ref[(0, 1, 1, 1)]=0.43193373881*x_ref[0]**o + (0.785438126704)*x_ref[0] + (0.617670845007)*x_ref[1]**o + (0.0382188718465)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.661004584788*x[0]**o + (0.432229438676)*x[0] + (-0.234554405287)*x[1]**o + (0.762046262807)*x[1]
+        ref[(0, 1, 1, 2)]=0.661004584788*x_ref[0]**o + (0.432229438676)*x_ref[0] + (-0.234554405287)*x_ref[1]**o + (0.762046262807)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.775608905978*x[0]**o + (0.309199119688)*x[0] + (0.89734613646)*x[1]**o + (0.786102197655)*x[1]
+        ref[(0, 1, 1, 3)]=0.775608905978*x_ref[0]**o + (0.309199119688)*x_ref[0] + (0.89734613646)*x_ref[1]**o + (0.786102197655)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.0598343458062*x[0]**o + (-0.214667982824)*x[0] + (-0.943340427806)*x[1]**o + (0.690989692579)*x[1]
+        ref[(0, 1, 2, 0)]=0.0598343458062*x_ref[0]**o + (-0.214667982824)*x_ref[0] + (-0.943340427806)*x_ref[1]**o + (0.690989692579)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.746233117027*x[0]**o + (0.0877675569749)*x[0] + (-0.208248164931)*x[1]**o + (0.938939691573)*x[1]
+        ref[(0, 1, 2, 1)]=0.746233117027*x_ref[0]**o + (0.0877675569749)*x_ref[0] + (-0.208248164931)*x_ref[1]**o + (0.938939691573)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.839201120031*x[0]**o + (0.0210702603058)*x[0] + (0.993034726888)*x[1]**o + (0.510132203529)*x[1]
+        ref[(0, 1, 2, 2)]=-0.839201120031*x_ref[0]**o + (0.0210702603058)*x_ref[0] + (0.993034726888)*x_ref[1]**o + (0.510132203529)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.22255279987*x[0]**o + (-0.913717202495)*x[0] + (0.643913928738)*x[1]**o + (0.898851142514)*x[1]
+        ref[(0, 1, 2, 3)]=-0.22255279987*x_ref[0]**o + (-0.913717202495)*x_ref[0] + (0.643913928738)*x_ref[1]**o + (0.898851142514)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.279586695003*x[0]**o + (0.288770942623)*x[0] + (-0.671635357784)*x[1]**o + (-0.195362385694)*x[1]
+        ref[(0, 2, 0, 0)]=-0.279586695003*x_ref[0]**o + (0.288770942623)*x_ref[0] + (-0.671635357784)*x_ref[1]**o + (-0.195362385694)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.114282583447*x[0]**o + (0.653315665626)*x[0] + (0.359170862705)*x[1]**o + (-0.756855789462)*x[1]
+        ref[(0, 2, 0, 1)]=-0.114282583447*x_ref[0]**o + (0.653315665626)*x_ref[0] + (0.359170862705)*x_ref[1]**o + (-0.756855789462)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.859779204621*x[0]**o + (-0.376084034376)*x[0] + (0.319238641369)*x[1]**o + (0.623801864941)*x[1]
+        ref[(0, 2, 0, 2)]=0.859779204621*x_ref[0]**o + (-0.376084034376)*x_ref[0] + (0.319238641369)*x_ref[1]**o + (0.623801864941)*x_ref[1]
+        arg[(0, 2, 0, 3)]=0.74647206168*x[0]**o + (0.856638628536)*x[0] + (-0.908877408265)*x[1]**o + (-0.850378205235)*x[1]
+        ref[(0, 2, 0, 3)]=0.74647206168*x_ref[0]**o + (0.856638628536)*x_ref[0] + (-0.908877408265)*x_ref[1]**o + (-0.850378205235)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.509175952697*x[0]**o + (0.885340705307)*x[0] + (-0.179370171766)*x[1]**o + (0.478889604997)*x[1]
+        ref[(0, 2, 1, 0)]=-0.509175952697*x_ref[0]**o + (0.885340705307)*x_ref[0] + (-0.179370171766)*x_ref[1]**o + (0.478889604997)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.563980149819*x[0]**o + (-0.15690743947)*x[0] + (-0.936560370184)*x[1]**o + (0.845813544804)*x[1]
+        ref[(0, 2, 1, 1)]=0.563980149819*x_ref[0]**o + (-0.15690743947)*x_ref[0] + (-0.936560370184)*x_ref[1]**o + (0.845813544804)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.129629964478*x[0]**o + (0.733677011186)*x[0] + (0.839585093078)*x[1]**o + (0.243526363502)*x[1]
+        ref[(0, 2, 1, 2)]=-0.129629964478*x_ref[0]**o + (0.733677011186)*x_ref[0] + (0.839585093078)*x_ref[1]**o + (0.243526363502)*x_ref[1]
+        arg[(0, 2, 1, 3)]=-0.153447836825*x[0]**o + (0.93990225337)*x[0] + (-0.472823058852)*x[1]**o + (0.960763318243)*x[1]
+        ref[(0, 2, 1, 3)]=-0.153447836825*x_ref[0]**o + (0.93990225337)*x_ref[0] + (-0.472823058852)*x_ref[1]**o + (0.960763318243)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.896144867196*x[0]**o + (-0.737090805175)*x[0] + (-0.0884192045315)*x[1]**o + (-0.575249291984)*x[1]
+        ref[(0, 2, 2, 0)]=-0.896144867196*x_ref[0]**o + (-0.737090805175)*x_ref[0] + (-0.0884192045315)*x_ref[1]**o + (-0.575249291984)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.209948766876*x[0]**o + (0.234265207301)*x[0] + (-0.0916773960369)*x[1]**o + (0.343079523478)*x[1]
+        ref[(0, 2, 2, 1)]=0.209948766876*x_ref[0]**o + (0.234265207301)*x_ref[0] + (-0.0916773960369)*x_ref[1]**o + (0.343079523478)*x_ref[1]
+        arg[(0, 2, 2, 2)]=0.60896043706*x[0]**o + (0.84877815097)*x[0] + (0.604309495524)*x[1]**o + (0.720507274617)*x[1]
+        ref[(0, 2, 2, 2)]=0.60896043706*x_ref[0]**o + (0.84877815097)*x_ref[0] + (0.604309495524)*x_ref[1]**o + (0.720507274617)*x_ref[1]
+        arg[(0, 2, 2, 3)]=0.437667778232*x[0]**o + (-0.792360357187)*x[0] + (-0.747594691771)*x[1]**o + (0.382389610678)*x[1]
+        ref[(0, 2, 2, 3)]=0.437667778232*x_ref[0]**o + (-0.792360357187)*x_ref[0] + (-0.747594691771)*x_ref[1]**o + (0.382389610678)*x_ref[1]
+        arg[(0, 3, 0, 0)]=-0.6925170122*x[0]**o + (-0.999936319567)*x[0] + (-0.751307461017)*x[1]**o + (-0.561764039977)*x[1]
+        ref[(0, 3, 0, 0)]=-0.6925170122*x_ref[0]**o + (-0.999936319567)*x_ref[0] + (-0.751307461017)*x_ref[1]**o + (-0.561764039977)*x_ref[1]
+        arg[(0, 3, 0, 1)]=-0.628583930688*x[0]**o + (-0.907974497402)*x[0] + (-0.647986208174)*x[1]**o + (0.296801882017)*x[1]
+        ref[(0, 3, 0, 1)]=-0.628583930688*x_ref[0]**o + (-0.907974497402)*x_ref[0] + (-0.647986208174)*x_ref[1]**o + (0.296801882017)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.329147336422*x[0]**o + (0.464879194154)*x[0] + (0.191909224117)*x[1]**o + (0.354071351958)*x[1]
+        ref[(0, 3, 0, 2)]=-0.329147336422*x_ref[0]**o + (0.464879194154)*x_ref[0] + (0.191909224117)*x_ref[1]**o + (0.354071351958)*x_ref[1]
+        arg[(0, 3, 0, 3)]=0.0456146148024*x[0]**o + (0.264897094394)*x[0] + (0.710473324322)*x[1]**o + (-0.927396555558)*x[1]
+        ref[(0, 3, 0, 3)]=0.0456146148024*x_ref[0]**o + (0.264897094394)*x_ref[0] + (0.710473324322)*x_ref[1]**o + (-0.927396555558)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.537595743115*x[0]**o + (-0.375917682025)*x[0] + (-0.745449583768)*x[1]**o + (0.0578040940805)*x[1]
+        ref[(0, 3, 1, 0)]=0.537595743115*x_ref[0]**o + (-0.375917682025)*x_ref[0] + (-0.745449583768)*x_ref[1]**o + (0.0578040940805)*x_ref[1]
+        arg[(0, 3, 1, 1)]=-0.68715236147*x[0]**o + (0.593228347133)*x[0] + (0.768416980409)*x[1]**o + (-0.314920128163)*x[1]
+        ref[(0, 3, 1, 1)]=-0.68715236147*x_ref[0]**o + (0.593228347133)*x_ref[0] + (0.768416980409)*x_ref[1]**o + (-0.314920128163)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.593927064142*x[0]**o + (0.750545427387)*x[0] + (0.1505082109)*x[1]**o + (-0.624731668968)*x[1]
+        ref[(0, 3, 1, 2)]=-0.593927064142*x_ref[0]**o + (0.750545427387)*x_ref[0] + (0.1505082109)*x_ref[1]**o + (-0.624731668968)*x_ref[1]
+        arg[(0, 3, 1, 3)]=0.354382630537*x[0]**o + (-0.453253567946)*x[0] + (-0.997999603825)*x[1]**o + (-0.170851858079)*x[1]
+        ref[(0, 3, 1, 3)]=0.354382630537*x_ref[0]**o + (-0.453253567946)*x_ref[0] + (-0.997999603825)*x_ref[1]**o + (-0.170851858079)*x_ref[1]
+        arg[(0, 3, 2, 0)]=-0.882703248049*x[0]**o + (0.88953076813)*x[0] + (-0.626443494358)*x[1]**o + (-0.0321245972124)*x[1]
+        ref[(0, 3, 2, 0)]=-0.882703248049*x_ref[0]**o + (0.88953076813)*x_ref[0] + (-0.626443494358)*x_ref[1]**o + (-0.0321245972124)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.649223958857*x[0]**o + (-0.814030770201)*x[0] + (0.161984717424)*x[1]**o + (0.676231162337)*x[1]
+        ref[(0, 3, 2, 1)]=0.649223958857*x_ref[0]**o + (-0.814030770201)*x_ref[0] + (0.161984717424)*x_ref[1]**o + (0.676231162337)*x_ref[1]
+        arg[(0, 3, 2, 2)]=0.374446118689*x[0]**o + (0.854472439918)*x[0] + (0.868445833251)*x[1]**o + (-0.861675530932)*x[1]
+        ref[(0, 3, 2, 2)]=0.374446118689*x_ref[0]**o + (0.854472439918)*x_ref[0] + (0.868445833251)*x_ref[1]**o + (-0.861675530932)*x_ref[1]
+        arg[(0, 3, 2, 3)]=-0.540459177976*x[0]**o + (-0.469058728123)*x[0] + (-0.334487193073)*x[1]**o + (0.00128688091923)*x[1]
+        ref[(0, 3, 2, 3)]=-0.540459177976*x_ref[0]**o + (-0.469058728123)*x_ref[0] + (-0.334487193073)*x_ref[1]**o + (0.00128688091923)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.24434010103*x[0]**o + (0.621637396316)*x[0] + (-0.175453453484)*x[1]**o + (0.598240093729)*x[1]
+        ref[(1, 0, 0, 0)]=-0.24434010103*x_ref[0]**o + (0.621637396316)*x_ref[0] + (-0.175453453484)*x_ref[1]**o + (0.598240093729)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.432618461928*x[0]**o + (-0.560423706281)*x[0] + (-0.844884689119)*x[1]**o + (0.733800123368)*x[1]
+        ref[(1, 0, 0, 1)]=0.432618461928*x_ref[0]**o + (-0.560423706281)*x_ref[0] + (-0.844884689119)*x_ref[1]**o + (0.733800123368)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.0115293469839*x[0]**o + (-0.439199755371)*x[0] + (-0.456422966631)*x[1]**o + (0.0574415010803)*x[1]
+        ref[(1, 0, 0, 2)]=0.0115293469839*x_ref[0]**o + (-0.439199755371)*x_ref[0] + (-0.456422966631)*x_ref[1]**o + (0.0574415010803)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.835018740345*x[0]**o + (0.615487988569)*x[0] + (-0.197732046182)*x[1]**o + (-0.69144583024)*x[1]
+        ref[(1, 0, 0, 3)]=-0.835018740345*x_ref[0]**o + (0.615487988569)*x_ref[0] + (-0.197732046182)*x_ref[1]**o + (-0.69144583024)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.479357682126*x[0]**o + (-0.494610092155)*x[0] + (-0.92934439156)*x[1]**o + (-0.602675063605)*x[1]
+        ref[(1, 0, 1, 0)]=-0.479357682126*x_ref[0]**o + (-0.494610092155)*x_ref[0] + (-0.92934439156)*x_ref[1]**o + (-0.602675063605)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.274119407773*x[0]**o + (0.12554983765)*x[0] + (0.298375850826)*x[1]**o + (-0.8123710537)*x[1]
+        ref[(1, 0, 1, 1)]=0.274119407773*x_ref[0]**o + (0.12554983765)*x_ref[0] + (0.298375850826)*x_ref[1]**o + (-0.8123710537)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.879127477655*x[0]**o + (-0.590698884117)*x[0] + (-0.918159566225)*x[1]**o + (0.201775069739)*x[1]
+        ref[(1, 0, 1, 2)]=0.879127477655*x_ref[0]**o + (-0.590698884117)*x_ref[0] + (-0.918159566225)*x_ref[1]**o + (0.201775069739)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.726599772417*x[0]**o + (0.754972717928)*x[0] + (-0.820494386573)*x[1]**o + (0.733798094437)*x[1]
+        ref[(1, 0, 1, 3)]=0.726599772417*x_ref[0]**o + (0.754972717928)*x_ref[0] + (-0.820494386573)*x_ref[1]**o + (0.733798094437)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.27139341408*x[0]**o + (0.324865352693)*x[0] + (-0.589277972229)*x[1]**o + (0.816847413212)*x[1]
+        ref[(1, 0, 2, 0)]=0.27139341408*x_ref[0]**o + (0.324865352693)*x_ref[0] + (-0.589277972229)*x_ref[1]**o + (0.816847413212)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.421746062407*x[0]**o + (-0.267332324487)*x[0] + (-0.816198539881)*x[1]**o + (0.504403290541)*x[1]
+        ref[(1, 0, 2, 1)]=0.421746062407*x_ref[0]**o + (-0.267332324487)*x_ref[0] + (-0.816198539881)*x_ref[1]**o + (0.504403290541)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.194304646561*x[0]**o + (0.137344937633)*x[0] + (0.512080507437)*x[1]**o + (-0.353996113992)*x[1]
+        ref[(1, 0, 2, 2)]=0.194304646561*x_ref[0]**o + (0.137344937633)*x_ref[0] + (0.512080507437)*x_ref[1]**o + (-0.353996113992)*x_ref[1]
+        arg[(1, 0, 2, 3)]=0.525039165356*x[0]**o + (-0.982909190389)*x[0] + (0.188221947515)*x[1]**o + (0.620630674)*x[1]
+        ref[(1, 0, 2, 3)]=0.525039165356*x_ref[0]**o + (-0.982909190389)*x_ref[0] + (0.188221947515)*x_ref[1]**o + (0.620630674)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.690834147121*x[0]**o + (-0.892925591818)*x[0] + (-0.973291364028)*x[1]**o + (-0.956563318139)*x[1]
+        ref[(1, 1, 0, 0)]=0.690834147121*x_ref[0]**o + (-0.892925591818)*x_ref[0] + (-0.973291364028)*x_ref[1]**o + (-0.956563318139)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.11576692531*x[0]**o + (0.423458699736)*x[0] + (-0.652532971756)*x[1]**o + (0.335821236165)*x[1]
+        ref[(1, 1, 0, 1)]=0.11576692531*x_ref[0]**o + (0.423458699736)*x_ref[0] + (-0.652532971756)*x_ref[1]**o + (0.335821236165)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.889482196771*x[0]**o + (0.577328316893)*x[0] + (-0.0578034606787)*x[1]**o + (0.447060877507)*x[1]
+        ref[(1, 1, 0, 2)]=0.889482196771*x_ref[0]**o + (0.577328316893)*x_ref[0] + (-0.0578034606787)*x_ref[1]**o + (0.447060877507)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.271560924686*x[0]**o + (-0.895110382438)*x[0] + (0.11025312846)*x[1]**o + (0.10292419495)*x[1]
+        ref[(1, 1, 0, 3)]=-0.271560924686*x_ref[0]**o + (-0.895110382438)*x_ref[0] + (0.11025312846)*x_ref[1]**o + (0.10292419495)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.328228346381*x[0]**o + (0.984581205181)*x[0] + (-0.0957873564878)*x[1]**o + (-0.60119984097)*x[1]
+        ref[(1, 1, 1, 0)]=-0.328228346381*x_ref[0]**o + (0.984581205181)*x_ref[0] + (-0.0957873564878)*x_ref[1]**o + (-0.60119984097)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.2274052489*x[0]**o + (-0.448115704157)*x[0] + (0.159698528641)*x[1]**o + (0.434694391119)*x[1]
+        ref[(1, 1, 1, 1)]=0.2274052489*x_ref[0]**o + (-0.448115704157)*x_ref[0] + (0.159698528641)*x_ref[1]**o + (0.434694391119)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.513691022228*x[0]**o + (0.481043840246)*x[0] + (-0.555814421531)*x[1]**o + (0.25656925017)*x[1]
+        ref[(1, 1, 1, 2)]=-0.513691022228*x_ref[0]**o + (0.481043840246)*x_ref[0] + (-0.555814421531)*x_ref[1]**o + (0.25656925017)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.00609906260267*x[0]**o + (-0.288699873117)*x[0] + (0.930180480986)*x[1]**o + (-0.533768690988)*x[1]
+        ref[(1, 1, 1, 3)]=-0.00609906260267*x_ref[0]**o + (-0.288699873117)*x_ref[0] + (0.930180480986)*x_ref[1]**o + (-0.533768690988)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.548386233802*x[0]**o + (0.0463425366551)*x[0] + (0.36424075125)*x[1]**o + (-0.233430160243)*x[1]
+        ref[(1, 1, 2, 0)]=-0.548386233802*x_ref[0]**o + (0.0463425366551)*x_ref[0] + (0.36424075125)*x_ref[1]**o + (-0.233430160243)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.631859832447*x[0]**o + (0.0505345676389)*x[0] + (-0.810335945258)*x[1]**o + (-0.106763230137)*x[1]
+        ref[(1, 1, 2, 1)]=0.631859832447*x_ref[0]**o + (0.0505345676389)*x_ref[0] + (-0.810335945258)*x_ref[1]**o + (-0.106763230137)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.674589508422*x[0]**o + (0.166000165197)*x[0] + (-0.954979260977)*x[1]**o + (-0.241386549329)*x[1]
+        ref[(1, 1, 2, 2)]=0.674589508422*x_ref[0]**o + (0.166000165197)*x_ref[0] + (-0.954979260977)*x_ref[1]**o + (-0.241386549329)*x_ref[1]
+        arg[(1, 1, 2, 3)]=0.320436807505*x[0]**o + (-0.166775559417)*x[0] + (-0.566873393031)*x[1]**o + (-0.305448617943)*x[1]
+        ref[(1, 1, 2, 3)]=0.320436807505*x_ref[0]**o + (-0.166775559417)*x_ref[0] + (-0.566873393031)*x_ref[1]**o + (-0.305448617943)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.961163417072*x[0]**o + (0.825923454386)*x[0] + (0.342786924121)*x[1]**o + (0.473464540264)*x[1]
+        ref[(1, 2, 0, 0)]=0.961163417072*x_ref[0]**o + (0.825923454386)*x_ref[0] + (0.342786924121)*x_ref[1]**o + (0.473464540264)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.0399504056339*x[0]**o + (0.288506671224)*x[0] + (-0.469338902584)*x[1]**o + (-0.563059761995)*x[1]
+        ref[(1, 2, 0, 1)]=0.0399504056339*x_ref[0]**o + (0.288506671224)*x_ref[0] + (-0.469338902584)*x_ref[1]**o + (-0.563059761995)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.993692505197*x[0]**o + (0.338594492711)*x[0] + (0.479724029091)*x[1]**o + (-0.307377961117)*x[1]
+        ref[(1, 2, 0, 2)]=0.993692505197*x_ref[0]**o + (0.338594492711)*x_ref[0] + (0.479724029091)*x_ref[1]**o + (-0.307377961117)*x_ref[1]
+        arg[(1, 2, 0, 3)]=-0.15188367706*x[0]**o + (0.0268330917667)*x[0] + (-0.816311592439)*x[1]**o + (0.31261661004)*x[1]
+        ref[(1, 2, 0, 3)]=-0.15188367706*x_ref[0]**o + (0.0268330917667)*x_ref[0] + (-0.816311592439)*x_ref[1]**o + (0.31261661004)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.895118338029*x[0]**o + (0.994392106073)*x[0] + (-0.571506060337)*x[1]**o + (0.469614045546)*x[1]
+        ref[(1, 2, 1, 0)]=-0.895118338029*x_ref[0]**o + (0.994392106073)*x_ref[0] + (-0.571506060337)*x_ref[1]**o + (0.469614045546)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.47156035185*x[0]**o + (-0.713314100057)*x[0] + (-0.967940381472)*x[1]**o + (0.508814362702)*x[1]
+        ref[(1, 2, 1, 1)]=0.47156035185*x_ref[0]**o + (-0.713314100057)*x_ref[0] + (-0.967940381472)*x_ref[1]**o + (0.508814362702)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.547581450075*x[0]**o + (0.792268299805)*x[0] + (-0.116626440776)*x[1]**o + (-0.496535248024)*x[1]
+        ref[(1, 2, 1, 2)]=0.547581450075*x_ref[0]**o + (0.792268299805)*x_ref[0] + (-0.116626440776)*x_ref[1]**o + (-0.496535248024)*x_ref[1]
+        arg[(1, 2, 1, 3)]=-0.126193062653*x[0]**o + (0.647940640851)*x[0] + (0.259430084756)*x[1]**o + (0.575740824606)*x[1]
+        ref[(1, 2, 1, 3)]=-0.126193062653*x_ref[0]**o + (0.647940640851)*x_ref[0] + (0.259430084756)*x_ref[1]**o + (0.575740824606)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.151713040644*x[0]**o + (-0.856082316211)*x[0] + (0.385875673052)*x[1]**o + (0.631423724265)*x[1]
+        ref[(1, 2, 2, 0)]=0.151713040644*x_ref[0]**o + (-0.856082316211)*x_ref[0] + (0.385875673052)*x_ref[1]**o + (0.631423724265)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.715625767953*x[0]**o + (0.620675005201)*x[0] + (-0.782042297048)*x[1]**o + (0.21720606009)*x[1]
+        ref[(1, 2, 2, 1)]=0.715625767953*x_ref[0]**o + (0.620675005201)*x_ref[0] + (-0.782042297048)*x_ref[1]**o + (0.21720606009)*x_ref[1]
+        arg[(1, 2, 2, 2)]=0.445306585638*x[0]**o + (0.667013109782)*x[0] + (-0.881326645985)*x[1]**o + (-0.796390264701)*x[1]
+        ref[(1, 2, 2, 2)]=0.445306585638*x_ref[0]**o + (0.667013109782)*x_ref[0] + (-0.881326645985)*x_ref[1]**o + (-0.796390264701)*x_ref[1]
+        arg[(1, 2, 2, 3)]=-0.852102286892*x[0]**o + (-0.657154784236)*x[0] + (-0.532992521306)*x[1]**o + (-0.332609770519)*x[1]
+        ref[(1, 2, 2, 3)]=-0.852102286892*x_ref[0]**o + (-0.657154784236)*x_ref[0] + (-0.532992521306)*x_ref[1]**o + (-0.332609770519)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.863507102064*x[0]**o + (0.0530332811822)*x[0] + (-0.247789692617)*x[1]**o + (-0.202476821472)*x[1]
+        ref[(1, 3, 0, 0)]=0.863507102064*x_ref[0]**o + (0.0530332811822)*x_ref[0] + (-0.247789692617)*x_ref[1]**o + (-0.202476821472)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.379793982214*x[0]**o + (0.897762631413)*x[0] + (-0.836140686421)*x[1]**o + (0.583852180321)*x[1]
+        ref[(1, 3, 0, 1)]=-0.379793982214*x_ref[0]**o + (0.897762631413)*x_ref[0] + (-0.836140686421)*x_ref[1]**o + (0.583852180321)*x_ref[1]
+        arg[(1, 3, 0, 2)]=-0.869623225893*x[0]**o + (-0.217087264627)*x[0] + (0.509574391624)*x[1]**o + (-0.55024406463)*x[1]
+        ref[(1, 3, 0, 2)]=-0.869623225893*x_ref[0]**o + (-0.217087264627)*x_ref[0] + (0.509574391624)*x_ref[1]**o + (-0.55024406463)*x_ref[1]
+        arg[(1, 3, 0, 3)]=-0.688038665424*x[0]**o + (-0.802046761364)*x[0] + (-0.186380650248)*x[1]**o + (-0.929631784078)*x[1]
+        ref[(1, 3, 0, 3)]=-0.688038665424*x_ref[0]**o + (-0.802046761364)*x_ref[0] + (-0.186380650248)*x_ref[1]**o + (-0.929631784078)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.786685172015*x[0]**o + (-0.4272751483)*x[0] + (0.911866146863)*x[1]**o + (-0.338279745076)*x[1]
+        ref[(1, 3, 1, 0)]=-0.786685172015*x_ref[0]**o + (-0.4272751483)*x_ref[0] + (0.911866146863)*x_ref[1]**o + (-0.338279745076)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.453193810865*x[0]**o + (-0.656087212166)*x[0] + (-0.109884763088)*x[1]**o + (0.609264055793)*x[1]
+        ref[(1, 3, 1, 1)]=0.453193810865*x_ref[0]**o + (-0.656087212166)*x_ref[0] + (-0.109884763088)*x_ref[1]**o + (0.609264055793)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.214347355809*x[0]**o + (0.615999092973)*x[0] + (0.579351668326)*x[1]**o + (0.309392800761)*x[1]
+        ref[(1, 3, 1, 2)]=0.214347355809*x_ref[0]**o + (0.615999092973)*x_ref[0] + (0.579351668326)*x_ref[1]**o + (0.309392800761)*x_ref[1]
+        arg[(1, 3, 1, 3)]=0.602607004244*x[0]**o + (0.163137081967)*x[0] + (-0.875846684875)*x[1]**o + (-0.437045961596)*x[1]
+        ref[(1, 3, 1, 3)]=0.602607004244*x_ref[0]**o + (0.163137081967)*x_ref[0] + (-0.875846684875)*x_ref[1]**o + (-0.437045961596)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.545556588178*x[0]**o + (0.527389142362)*x[0] + (0.736034153384)*x[1]**o + (-0.823796987564)*x[1]
+        ref[(1, 3, 2, 0)]=0.545556588178*x_ref[0]**o + (0.527389142362)*x_ref[0] + (0.736034153384)*x_ref[1]**o + (-0.823796987564)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.734083672515*x[0]**o + (0.788453879179)*x[0] + (-0.100790053009)*x[1]**o + (0.65593418121)*x[1]
+        ref[(1, 3, 2, 1)]=0.734083672515*x_ref[0]**o + (0.788453879179)*x_ref[0] + (-0.100790053009)*x_ref[1]**o + (0.65593418121)*x_ref[1]
+        arg[(1, 3, 2, 2)]=-0.611402659392*x[0]**o + (0.0764258352226)*x[0] + (0.190973289296)*x[1]**o + (-0.896692277962)*x[1]
+        ref[(1, 3, 2, 2)]=-0.611402659392*x_ref[0]**o + (0.0764258352226)*x_ref[0] + (0.190973289296)*x_ref[1]**o + (-0.896692277962)*x_ref[1]
+        arg[(1, 3, 2, 3)]=0.09879217841*x[0]**o + (-0.430404261741)*x[0] + (-0.46226768314)*x[1]**o + (0.802673586903)*x[1]
+        ref[(1, 3, 2, 3)]=0.09879217841*x_ref[0]**o + (-0.430404261741)*x_ref[0] + (-0.46226768314)*x_ref[1]**o + (0.802673586903)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.878838870668*x[0]**o + (0.101498856423)*x[0] + (-0.120811213956)*x[1]**o + (-0.870754103274)*x[1]
+        ref[(2, 0, 0, 0)]=0.878838870668*x_ref[0]**o + (0.101498856423)*x_ref[0] + (-0.120811213956)*x_ref[1]**o + (-0.870754103274)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.725852495734*x[0]**o + (-0.897968574582)*x[0] + (0.0763650222681)*x[1]**o + (0.0749948249689)*x[1]
+        ref[(2, 0, 0, 1)]=0.725852495734*x_ref[0]**o + (-0.897968574582)*x_ref[0] + (0.0763650222681)*x_ref[1]**o + (0.0749948249689)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.283978089969*x[0]**o + (0.644559448138)*x[0] + (-0.656023382793)*x[1]**o + (-0.188357833452)*x[1]
+        ref[(2, 0, 0, 2)]=-0.283978089969*x_ref[0]**o + (0.644559448138)*x_ref[0] + (-0.656023382793)*x_ref[1]**o + (-0.188357833452)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.536703498919*x[0]**o + (-0.556373810259)*x[0] + (-0.648364526032)*x[1]**o + (0.443179663505)*x[1]
+        ref[(2, 0, 0, 3)]=-0.536703498919*x_ref[0]**o + (-0.556373810259)*x_ref[0] + (-0.648364526032)*x_ref[1]**o + (0.443179663505)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.281857552047*x[0]**o + (0.799843929768)*x[0] + (-0.0869405936211)*x[1]**o + (-0.470008698763)*x[1]
+        ref[(2, 0, 1, 0)]=-0.281857552047*x_ref[0]**o + (0.799843929768)*x_ref[0] + (-0.0869405936211)*x_ref[1]**o + (-0.470008698763)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.940943544381*x[0]**o + (-0.705241091287)*x[0] + (-0.971280332157)*x[1]**o + (-0.979463866667)*x[1]
+        ref[(2, 0, 1, 1)]=0.940943544381*x_ref[0]**o + (-0.705241091287)*x_ref[0] + (-0.971280332157)*x_ref[1]**o + (-0.979463866667)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.375781483873*x[0]**o + (0.471666345206)*x[0] + (-0.103772336622)*x[1]**o + (0.675892683433)*x[1]
+        ref[(2, 0, 1, 2)]=-0.375781483873*x_ref[0]**o + (0.471666345206)*x_ref[0] + (-0.103772336622)*x_ref[1]**o + (0.675892683433)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.422183593074*x[0]**o + (-0.134929767543)*x[0] + (0.202723952988)*x[1]**o + (0.885312169881)*x[1]
+        ref[(2, 0, 1, 3)]=0.422183593074*x_ref[0]**o + (-0.134929767543)*x_ref[0] + (0.202723952988)*x_ref[1]**o + (0.885312169881)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.0128438778551*x[0]**o + (-0.497970527532)*x[0] + (-0.0581300422544)*x[1]**o + (-0.832804791497)*x[1]
+        ref[(2, 0, 2, 0)]=0.0128438778551*x_ref[0]**o + (-0.497970527532)*x_ref[0] + (-0.0581300422544)*x_ref[1]**o + (-0.832804791497)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.258096545057*x[0]**o + (-0.46111856097)*x[0] + (0.267167635786)*x[1]**o + (0.338717024956)*x[1]
+        ref[(2, 0, 2, 1)]=0.258096545057*x_ref[0]**o + (-0.46111856097)*x_ref[0] + (0.267167635786)*x_ref[1]**o + (0.338717024956)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.684026453914*x[0]**o + (-0.894114887182)*x[0] + (-0.536152664553)*x[1]**o + (0.874876188691)*x[1]
+        ref[(2, 0, 2, 2)]=0.684026453914*x_ref[0]**o + (-0.894114887182)*x_ref[0] + (-0.536152664553)*x_ref[1]**o + (0.874876188691)*x_ref[1]
+        arg[(2, 0, 2, 3)]=0.65914766146*x[0]**o + (-0.590294883093)*x[0] + (-0.99368842796)*x[1]**o + (0.128535530889)*x[1]
+        ref[(2, 0, 2, 3)]=0.65914766146*x_ref[0]**o + (-0.590294883093)*x_ref[0] + (-0.99368842796)*x_ref[1]**o + (0.128535530889)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.0298430359671*x[0]**o + (0.376842403761)*x[0] + (-0.240432775044)*x[1]**o + (0.143899826009)*x[1]
+        ref[(2, 1, 0, 0)]=0.0298430359671*x_ref[0]**o + (0.376842403761)*x_ref[0] + (-0.240432775044)*x_ref[1]**o + (0.143899826009)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.302853490456*x[0]**o + (0.214792551751)*x[0] + (-0.902552858706)*x[1]**o + (-0.295469897238)*x[1]
+        ref[(2, 1, 0, 1)]=0.302853490456*x_ref[0]**o + (0.214792551751)*x_ref[0] + (-0.902552858706)*x_ref[1]**o + (-0.295469897238)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.458871465627*x[0]**o + (-0.629974850634)*x[0] + (-0.566609893215)*x[1]**o + (0.631925254301)*x[1]
+        ref[(2, 1, 0, 2)]=-0.458871465627*x_ref[0]**o + (-0.629974850634)*x_ref[0] + (-0.566609893215)*x_ref[1]**o + (0.631925254301)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.457695586282*x[0]**o + (0.178380969308)*x[0] + (-0.0838015405695)*x[1]**o + (-0.462007235798)*x[1]
+        ref[(2, 1, 0, 3)]=-0.457695586282*x_ref[0]**o + (0.178380969308)*x_ref[0] + (-0.0838015405695)*x_ref[1]**o + (-0.462007235798)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.493671338781*x[0]**o + (0.668468552202)*x[0] + (-0.927040437266)*x[1]**o + (0.906714737553)*x[1]
+        ref[(2, 1, 1, 0)]=-0.493671338781*x_ref[0]**o + (0.668468552202)*x_ref[0] + (-0.927040437266)*x_ref[1]**o + (0.906714737553)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.45848062384*x[0]**o + (0.537520158962)*x[0] + (0.758347721172)*x[1]**o + (0.106235244778)*x[1]
+        ref[(2, 1, 1, 1)]=0.45848062384*x_ref[0]**o + (0.537520158962)*x_ref[0] + (0.758347721172)*x_ref[1]**o + (0.106235244778)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.744676160785*x[0]**o + (-0.0242304950393)*x[0] + (0.995876328051)*x[1]**o + (0.0696120027338)*x[1]
+        ref[(2, 1, 1, 2)]=0.744676160785*x_ref[0]**o + (-0.0242304950393)*x_ref[0] + (0.995876328051)*x_ref[1]**o + (0.0696120027338)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.835552022884*x[0]**o + (-0.308319464458)*x[0] + (-0.029394009517)*x[1]**o + (0.0612192002279)*x[1]
+        ref[(2, 1, 1, 3)]=-0.835552022884*x_ref[0]**o + (-0.308319464458)*x_ref[0] + (-0.029394009517)*x_ref[1]**o + (0.0612192002279)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.60417829613*x[0]**o + (-0.250548143911)*x[0] + (0.852291749386)*x[1]**o + (-0.671767095721)*x[1]
+        ref[(2, 1, 2, 0)]=-0.60417829613*x_ref[0]**o + (-0.250548143911)*x_ref[0] + (0.852291749386)*x_ref[1]**o + (-0.671767095721)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.586753131449*x[0]**o + (-0.570435266335)*x[0] + (-0.218871704413)*x[1]**o + (-0.865359682001)*x[1]
+        ref[(2, 1, 2, 1)]=-0.586753131449*x_ref[0]**o + (-0.570435266335)*x_ref[0] + (-0.218871704413)*x_ref[1]**o + (-0.865359682001)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.618506530605*x[0]**o + (0.126802429092)*x[0] + (-0.656860108261)*x[1]**o + (0.791648164356)*x[1]
+        ref[(2, 1, 2, 2)]=0.618506530605*x_ref[0]**o + (0.126802429092)*x_ref[0] + (-0.656860108261)*x_ref[1]**o + (0.791648164356)*x_ref[1]
+        arg[(2, 1, 2, 3)]=-0.860450876632*x[0]**o + (-0.364102418983)*x[0] + (-0.589769631495)*x[1]**o + (-0.534127515082)*x[1]
+        ref[(2, 1, 2, 3)]=-0.860450876632*x_ref[0]**o + (-0.364102418983)*x_ref[0] + (-0.589769631495)*x_ref[1]**o + (-0.534127515082)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.82757535139*x[0]**o + (-0.253633366424)*x[0] + (0.617329212493)*x[1]**o + (0.454319648444)*x[1]
+        ref[(2, 2, 0, 0)]=-0.82757535139*x_ref[0]**o + (-0.253633366424)*x_ref[0] + (0.617329212493)*x_ref[1]**o + (0.454319648444)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.744293153996*x[0]**o + (0.884219383826)*x[0] + (-0.201173784863)*x[1]**o + (-0.777672696881)*x[1]
+        ref[(2, 2, 0, 1)]=-0.744293153996*x_ref[0]**o + (0.884219383826)*x_ref[0] + (-0.201173784863)*x_ref[1]**o + (-0.777672696881)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.580409621109*x[0]**o + (0.968389833773)*x[0] + (-0.812651320855)*x[1]**o + (-0.919966405117)*x[1]
+        ref[(2, 2, 0, 2)]=-0.580409621109*x_ref[0]**o + (0.968389833773)*x_ref[0] + (-0.812651320855)*x_ref[1]**o + (-0.919966405117)*x_ref[1]
+        arg[(2, 2, 0, 3)]=-0.086819914943*x[0]**o + (-0.776580102896)*x[0] + (0.0726718542548)*x[1]**o + (0.165750825038)*x[1]
+        ref[(2, 2, 0, 3)]=-0.086819914943*x_ref[0]**o + (-0.776580102896)*x_ref[0] + (0.0726718542548)*x_ref[1]**o + (0.165750825038)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.6887968483*x[0]**o + (0.307637318061)*x[0] + (-0.351513013348)*x[1]**o + (0.299936840659)*x[1]
+        ref[(2, 2, 1, 0)]=-0.6887968483*x_ref[0]**o + (0.307637318061)*x_ref[0] + (-0.351513013348)*x_ref[1]**o + (0.299936840659)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.63866666518*x[0]**o + (0.391054345373)*x[0] + (0.00443129478872)*x[1]**o + (0.102875608354)*x[1]
+        ref[(2, 2, 1, 1)]=0.63866666518*x_ref[0]**o + (0.391054345373)*x_ref[0] + (0.00443129478872)*x_ref[1]**o + (0.102875608354)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.97358951345*x[0]**o + (0.800886159117)*x[0] + (-0.705009059622)*x[1]**o + (-0.570119816917)*x[1]
+        ref[(2, 2, 1, 2)]=-0.97358951345*x_ref[0]**o + (0.800886159117)*x_ref[0] + (-0.705009059622)*x_ref[1]**o + (-0.570119816917)*x_ref[1]
+        arg[(2, 2, 1, 3)]=0.552309460025*x[0]**o + (0.456009747172)*x[0] + (0.0762665583964)*x[1]**o + (-0.8716716872)*x[1]
+        ref[(2, 2, 1, 3)]=0.552309460025*x_ref[0]**o + (0.456009747172)*x_ref[0] + (0.0762665583964)*x_ref[1]**o + (-0.8716716872)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.468040590137*x[0]**o + (0.297656162025)*x[0] + (0.147020895627)*x[1]**o + (0.348141141937)*x[1]
+        ref[(2, 2, 2, 0)]=-0.468040590137*x_ref[0]**o + (0.297656162025)*x_ref[0] + (0.147020895627)*x_ref[1]**o + (0.348141141937)*x_ref[1]
+        arg[(2, 2, 2, 1)]=-0.141507524456*x[0]**o + (-0.93560316187)*x[0] + (-0.212582173561)*x[1]**o + (0.861319573428)*x[1]
+        ref[(2, 2, 2, 1)]=-0.141507524456*x_ref[0]**o + (-0.93560316187)*x_ref[0] + (-0.212582173561)*x_ref[1]**o + (0.861319573428)*x_ref[1]
+        arg[(2, 2, 2, 2)]=0.675992595345*x[0]**o + (0.0137599413833)*x[0] + (0.470440659288)*x[1]**o + (0.0846710103393)*x[1]
+        ref[(2, 2, 2, 2)]=0.675992595345*x_ref[0]**o + (0.0137599413833)*x_ref[0] + (0.470440659288)*x_ref[1]**o + (0.0846710103393)*x_ref[1]
+        arg[(2, 2, 2, 3)]=0.318594986603*x[0]**o + (-0.368149739866)*x[0] + (0.125653433106)*x[1]**o + (-0.438187913627)*x[1]
+        ref[(2, 2, 2, 3)]=0.318594986603*x_ref[0]**o + (-0.368149739866)*x_ref[0] + (0.125653433106)*x_ref[1]**o + (-0.438187913627)*x_ref[1]
+        arg[(2, 3, 0, 0)]=-0.223122949325*x[0]**o + (-0.80051632401)*x[0] + (-0.64137056165)*x[1]**o + (0.0854250439584)*x[1]
+        ref[(2, 3, 0, 0)]=-0.223122949325*x_ref[0]**o + (-0.80051632401)*x_ref[0] + (-0.64137056165)*x_ref[1]**o + (0.0854250439584)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.0886619918381*x[0]**o + (0.00676772829934)*x[0] + (-0.117176435167)*x[1]**o + (0.0420627266259)*x[1]
+        ref[(2, 3, 0, 1)]=0.0886619918381*x_ref[0]**o + (0.00676772829934)*x_ref[0] + (-0.117176435167)*x_ref[1]**o + (0.0420627266259)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.542047306125*x[0]**o + (0.291204692251)*x[0] + (-0.0616401878719)*x[1]**o + (-0.378714124957)*x[1]
+        ref[(2, 3, 0, 2)]=0.542047306125*x_ref[0]**o + (0.291204692251)*x_ref[0] + (-0.0616401878719)*x_ref[1]**o + (-0.378714124957)*x_ref[1]
+        arg[(2, 3, 0, 3)]=-0.693693351075*x[0]**o + (0.59061016872)*x[0] + (-0.786934235819)*x[1]**o + (-0.282830964485)*x[1]
+        ref[(2, 3, 0, 3)]=-0.693693351075*x_ref[0]**o + (0.59061016872)*x_ref[0] + (-0.786934235819)*x_ref[1]**o + (-0.282830964485)*x_ref[1]
+        arg[(2, 3, 1, 0)]=-0.869134419004*x[0]**o + (0.0949711255427)*x[0] + (-0.490073512725)*x[1]**o + (0.662224546448)*x[1]
+        ref[(2, 3, 1, 0)]=-0.869134419004*x_ref[0]**o + (0.0949711255427)*x_ref[0] + (-0.490073512725)*x_ref[1]**o + (0.662224546448)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.112484693556*x[0]**o + (0.394058654752)*x[0] + (-0.628826593586)*x[1]**o + (0.695494736742)*x[1]
+        ref[(2, 3, 1, 1)]=-0.112484693556*x_ref[0]**o + (0.394058654752)*x_ref[0] + (-0.628826593586)*x_ref[1]**o + (0.695494736742)*x_ref[1]
+        arg[(2, 3, 1, 2)]=0.940758166166*x[0]**o + (0.0381542525754)*x[0] + (0.0847877298391)*x[1]**o + (-0.58379684664)*x[1]
+        ref[(2, 3, 1, 2)]=0.940758166166*x_ref[0]**o + (0.0381542525754)*x_ref[0] + (0.0847877298391)*x_ref[1]**o + (-0.58379684664)*x_ref[1]
+        arg[(2, 3, 1, 3)]=-0.63925453187*x[0]**o + (-0.180244634229)*x[0] + (0.194273835638)*x[1]**o + (-0.00273578936612)*x[1]
+        ref[(2, 3, 1, 3)]=-0.63925453187*x_ref[0]**o + (-0.180244634229)*x_ref[0] + (0.194273835638)*x_ref[1]**o + (-0.00273578936612)*x_ref[1]
+        arg[(2, 3, 2, 0)]=0.913568592713*x[0]**o + (-0.709775394999)*x[0] + (-0.568647055692)*x[1]**o + (0.224524746237)*x[1]
+        ref[(2, 3, 2, 0)]=0.913568592713*x_ref[0]**o + (-0.709775394999)*x_ref[0] + (-0.568647055692)*x_ref[1]**o + (0.224524746237)*x_ref[1]
+        arg[(2, 3, 2, 1)]=-0.272189349779*x[0]**o + (-0.407524170166)*x[0] + (0.817189197421)*x[1]**o + (-0.562339856084)*x[1]
+        ref[(2, 3, 2, 1)]=-0.272189349779*x_ref[0]**o + (-0.407524170166)*x_ref[0] + (0.817189197421)*x_ref[1]**o + (-0.562339856084)*x_ref[1]
+        arg[(2, 3, 2, 2)]=0.594314614133*x[0]**o + (0.83231146105)*x[0] + (-0.809509129735)*x[1]**o + (0.840563952472)*x[1]
+        ref[(2, 3, 2, 2)]=0.594314614133*x_ref[0]**o + (0.83231146105)*x_ref[0] + (-0.809509129735)*x_ref[1]**o + (0.840563952472)*x_ref[1]
+        arg[(2, 3, 2, 3)]=0.163771237644*x[0]**o + (0.919718201004)*x[0] + (0.611320196318)*x[1]**o + (-0.849412144171)*x[1]
+        ref[(2, 3, 2, 3)]=0.163771237644*x_ref[0]**o + (0.919718201004)*x_ref[0] + (0.611320196318)*x_ref[1]**o + (-0.849412144171)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.033789009972*x[2]**o + (-0.730850370053)*x[2]
+            ref[(0, 0, 0, 0)]+=0.033789009972*x_ref[2]**o + (-0.730850370053)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.891780851638*x[2]**o + (0.227060851524)*x[2]
+            ref[(0, 0, 0, 1)]+=0.891780851638*x_ref[2]**o + (0.227060851524)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.350055980976*x[2]**o + (0.819921018228)*x[2]
+            ref[(0, 0, 0, 2)]+=0.350055980976*x_ref[2]**o + (0.819921018228)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=-0.908452303635*x[2]**o + (0.989277499262)*x[2]
+            ref[(0, 0, 0, 3)]+=-0.908452303635*x_ref[2]**o + (0.989277499262)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.370167494471*x[2]**o + (-0.727022951693)*x[2]
+            ref[(0, 0, 1, 0)]+=0.370167494471*x_ref[2]**o + (-0.727022951693)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.800253034609*x[2]**o + (-0.803424458563)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.800253034609*x_ref[2]**o + (-0.803424458563)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.415954049943*x[2]**o + (0.596048958501)*x[2]
+            ref[(0, 0, 1, 2)]+=0.415954049943*x_ref[2]**o + (0.596048958501)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.151051928173*x[2]**o + (-0.173539645504)*x[2]
+            ref[(0, 0, 1, 3)]+=0.151051928173*x_ref[2]**o + (-0.173539645504)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.754557136181*x[2]**o + (0.0703565842531)*x[2]
+            ref[(0, 0, 2, 0)]+=0.754557136181*x_ref[2]**o + (0.0703565842531)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.944405604861*x[2]**o + (-0.573932100425)*x[2]
+            ref[(0, 0, 2, 1)]+=0.944405604861*x_ref[2]**o + (-0.573932100425)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.56831500686*x[2]**o + (0.148520582169)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.56831500686*x_ref[2]**o + (0.148520582169)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.540373800419*x[2]**o + (-0.868524928456)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.540373800419*x_ref[2]**o + (-0.868524928456)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.968018855442*x[2]**o + (-0.742853133345)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.968018855442*x_ref[2]**o + (-0.742853133345)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.407860228522*x[2]**o + (0.419333118723)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.407860228522*x_ref[2]**o + (0.419333118723)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.801168469984*x[2]**o + (0.219225446308)*x[2]
+            ref[(0, 1, 0, 2)]+=0.801168469984*x_ref[2]**o + (0.219225446308)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.269396760663*x[2]**o + (0.985068041255)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.269396760663*x_ref[2]**o + (0.985068041255)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.85538450556*x[2]**o + (0.123487016677)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.85538450556*x_ref[2]**o + (0.123487016677)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.49386917454*x[2]**o + (-0.242372060772)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.49386917454*x_ref[2]**o + (-0.242372060772)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.394015990371*x[2]**o + (-0.34563139644)*x[2]
+            ref[(0, 1, 1, 2)]+=0.394015990371*x_ref[2]**o + (-0.34563139644)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.640546880739*x[2]**o + (-0.275932825225)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.640546880739*x_ref[2]**o + (-0.275932825225)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.886058804778*x[2]**o + (-0.135053464214)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.886058804778*x_ref[2]**o + (-0.135053464214)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.620227921533*x[2]**o + (0.66641960887)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.620227921533*x_ref[2]**o + (0.66641960887)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.483159427485*x[2]**o + (-0.8792647954)*x[2]
+            ref[(0, 1, 2, 2)]+=0.483159427485*x_ref[2]**o + (-0.8792647954)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.1027375042*x[2]**o + (-0.0849604065481)*x[2]
+            ref[(0, 1, 2, 3)]+=0.1027375042*x_ref[2]**o + (-0.0849604065481)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.672871672825*x[2]**o + (-0.360191758389)*x[2]
+            ref[(0, 2, 0, 0)]+=0.672871672825*x_ref[2]**o + (-0.360191758389)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.261771982272*x[2]**o + (0.134385167215)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.261771982272*x_ref[2]**o + (0.134385167215)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.922935892316*x[2]**o + (-0.492651535944)*x[2]
+            ref[(0, 2, 0, 2)]+=0.922935892316*x_ref[2]**o + (-0.492651535944)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=-0.311475168196*x[2]**o + (0.786380330106)*x[2]
+            ref[(0, 2, 0, 3)]+=-0.311475168196*x_ref[2]**o + (0.786380330106)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.715313208918*x[2]**o + (-0.127737038341)*x[2]
+            ref[(0, 2, 1, 0)]+=0.715313208918*x_ref[2]**o + (-0.127737038341)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.367412464143*x[2]**o + (0.187864267032)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.367412464143*x_ref[2]**o + (0.187864267032)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.120019693596*x[2]**o + (0.90601345345)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.120019693596*x_ref[2]**o + (0.90601345345)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=0.0670932126506*x[2]**o + (0.0852806858023)*x[2]
+            ref[(0, 2, 1, 3)]+=0.0670932126506*x_ref[2]**o + (0.0852806858023)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.54075490888*x[2]**o + (-0.045200073426)*x[2]
+            ref[(0, 2, 2, 0)]+=-0.54075490888*x_ref[2]**o + (-0.045200073426)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.762953599064*x[2]**o + (-0.331984837145)*x[2]
+            ref[(0, 2, 2, 1)]+=-0.762953599064*x_ref[2]**o + (-0.331984837145)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.0905909462149*x[2]**o + (-0.362077769951)*x[2]
+            ref[(0, 2, 2, 2)]+=0.0905909462149*x_ref[2]**o + (-0.362077769951)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=0.268741506292*x[2]**o + (0.194118675559)*x[2]
+            ref[(0, 2, 2, 3)]+=0.268741506292*x_ref[2]**o + (0.194118675559)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=0.550572520855*x[2]**o + (0.961658803223)*x[2]
+            ref[(0, 3, 0, 0)]+=0.550572520855*x_ref[2]**o + (0.961658803223)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=-0.588447674909*x[2]**o + (0.438224256589)*x[2]
+            ref[(0, 3, 0, 1)]+=-0.588447674909*x_ref[2]**o + (0.438224256589)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=0.946540512451*x[2]**o + (-0.0971231794169)*x[2]
+            ref[(0, 3, 0, 2)]+=0.946540512451*x_ref[2]**o + (-0.0971231794169)*x_ref[2]
+            arg[(0, 3, 0, 3)]+=0.399815203162*x[2]**o + (0.0791738839552)*x[2]
+            ref[(0, 3, 0, 3)]+=0.399815203162*x_ref[2]**o + (0.0791738839552)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.0440423609722*x[2]**o + (-0.869081594252)*x[2]
+            ref[(0, 3, 1, 0)]+=0.0440423609722*x_ref[2]**o + (-0.869081594252)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=-0.718005491448*x[2]**o + (-0.00824696901913)*x[2]
+            ref[(0, 3, 1, 1)]+=-0.718005491448*x_ref[2]**o + (-0.00824696901913)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=-0.0571973469478*x[2]**o + (0.0256336621697)*x[2]
+            ref[(0, 3, 1, 2)]+=-0.0571973469478*x_ref[2]**o + (0.0256336621697)*x_ref[2]
+            arg[(0, 3, 1, 3)]+=-0.0476256203658*x[2]**o + (-0.826843541324)*x[2]
+            ref[(0, 3, 1, 3)]+=-0.0476256203658*x_ref[2]**o + (-0.826843541324)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=0.355371783335*x[2]**o + (-0.65502997319)*x[2]
+            ref[(0, 3, 2, 0)]+=0.355371783335*x_ref[2]**o + (-0.65502997319)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=0.638035889674*x[2]**o + (-0.974538720798)*x[2]
+            ref[(0, 3, 2, 1)]+=0.638035889674*x_ref[2]**o + (-0.974538720798)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.587502369399*x[2]**o + (0.168409487319)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.587502369399*x_ref[2]**o + (0.168409487319)*x_ref[2]
+            arg[(0, 3, 2, 3)]+=0.397747236873*x[2]**o + (-0.76830431244)*x[2]
+            ref[(0, 3, 2, 3)]+=0.397747236873*x_ref[2]**o + (-0.76830431244)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.331705636342*x[2]**o + (-0.372215863035)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.331705636342*x_ref[2]**o + (-0.372215863035)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.988886884176*x[2]**o + (0.0725629776772)*x[2]
+            ref[(1, 0, 0, 1)]+=0.988886884176*x_ref[2]**o + (0.0725629776772)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.547691777461*x[2]**o + (-0.102994497125)*x[2]
+            ref[(1, 0, 0, 2)]+=0.547691777461*x_ref[2]**o + (-0.102994497125)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.552124204945*x[2]**o + (-0.13503990101)*x[2]
+            ref[(1, 0, 0, 3)]+=0.552124204945*x_ref[2]**o + (-0.13503990101)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.473281898301*x[2]**o + (-0.616280366214)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.473281898301*x_ref[2]**o + (-0.616280366214)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.850339531464*x[2]**o + (0.135324121981)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.850339531464*x_ref[2]**o + (0.135324121981)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.0461279705989*x[2]**o + (0.16452369271)*x[2]
+            ref[(1, 0, 1, 2)]+=0.0461279705989*x_ref[2]**o + (0.16452369271)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.889997053979*x[2]**o + (-0.941574253582)*x[2]
+            ref[(1, 0, 1, 3)]+=0.889997053979*x_ref[2]**o + (-0.941574253582)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.452325326895*x[2]**o + (0.46261652939)*x[2]
+            ref[(1, 0, 2, 0)]+=0.452325326895*x_ref[2]**o + (0.46261652939)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.988098398277*x[2]**o + (-0.345833104642)*x[2]
+            ref[(1, 0, 2, 1)]+=0.988098398277*x_ref[2]**o + (-0.345833104642)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.584865957623*x[2]**o + (0.000360744660901)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.584865957623*x_ref[2]**o + (0.000360744660901)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.595206132518*x[2]**o + (-0.42996465224)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.595206132518*x_ref[2]**o + (-0.42996465224)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.515969393346*x[2]**o + (0.830016110101)*x[2]
+            ref[(1, 1, 0, 0)]+=0.515969393346*x_ref[2]**o + (0.830016110101)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.190421771257*x[2]**o + (0.519772491944)*x[2]
+            ref[(1, 1, 0, 1)]+=0.190421771257*x_ref[2]**o + (0.519772491944)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.519902239362*x[2]**o + (0.42891454032)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.519902239362*x_ref[2]**o + (0.42891454032)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.497569815637*x[2]**o + (-0.508557271295)*x[2]
+            ref[(1, 1, 0, 3)]+=0.497569815637*x_ref[2]**o + (-0.508557271295)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.797396774065*x[2]**o + (-0.549970441948)*x[2]
+            ref[(1, 1, 1, 0)]+=0.797396774065*x_ref[2]**o + (-0.549970441948)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.535958278171*x[2]**o + (0.152924494107)*x[2]
+            ref[(1, 1, 1, 1)]+=0.535958278171*x_ref[2]**o + (0.152924494107)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.713025555899*x[2]**o + (0.63416972643)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.713025555899*x_ref[2]**o + (0.63416972643)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.373951531097*x[2]**o + (0.912632203681)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.373951531097*x_ref[2]**o + (0.912632203681)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.387789878816*x[2]**o + (-0.270842152401)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.387789878816*x_ref[2]**o + (-0.270842152401)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.330711744025*x[2]**o + (0.685655607778)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.330711744025*x_ref[2]**o + (0.685655607778)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.22052432074*x[2]**o + (-0.912599325501)*x[2]
+            ref[(1, 1, 2, 2)]+=0.22052432074*x_ref[2]**o + (-0.912599325501)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=-0.392167052373*x[2]**o + (-0.575867656221)*x[2]
+            ref[(1, 1, 2, 3)]+=-0.392167052373*x_ref[2]**o + (-0.575867656221)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.459288684847*x[2]**o + (-0.507085924437)*x[2]
+            ref[(1, 2, 0, 0)]+=0.459288684847*x_ref[2]**o + (-0.507085924437)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.395900398002*x[2]**o + (-0.843540664136)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.395900398002*x_ref[2]**o + (-0.843540664136)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.571213867392*x[2]**o + (-0.12565376953)*x[2]
+            ref[(1, 2, 0, 2)]+=0.571213867392*x_ref[2]**o + (-0.12565376953)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=-0.58671854463*x[2]**o + (0.705035197607)*x[2]
+            ref[(1, 2, 0, 3)]+=-0.58671854463*x_ref[2]**o + (0.705035197607)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.29691354005*x[2]**o + (-0.76799183754)*x[2]
+            ref[(1, 2, 1, 0)]+=-0.29691354005*x_ref[2]**o + (-0.76799183754)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.51623304993*x[2]**o + (0.285219943175)*x[2]
+            ref[(1, 2, 1, 1)]+=-0.51623304993*x_ref[2]**o + (0.285219943175)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.218236713182*x[2]**o + (-0.649613527207)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.218236713182*x_ref[2]**o + (-0.649613527207)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=0.734156342732*x[2]**o + (-0.723521655776)*x[2]
+            ref[(1, 2, 1, 3)]+=0.734156342732*x_ref[2]**o + (-0.723521655776)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.728963315447*x[2]**o + (-0.384195364611)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.728963315447*x_ref[2]**o + (-0.384195364611)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.825445386814*x[2]**o + (0.505803529435)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.825445386814*x_ref[2]**o + (0.505803529435)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=-0.50320688672*x[2]**o + (-0.0504825057917)*x[2]
+            ref[(1, 2, 2, 2)]+=-0.50320688672*x_ref[2]**o + (-0.0504825057917)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=-0.783210873912*x[2]**o + (-0.0737878787222)*x[2]
+            ref[(1, 2, 2, 3)]+=-0.783210873912*x_ref[2]**o + (-0.0737878787222)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=-0.70756090094*x[2]**o + (0.562691512861)*x[2]
+            ref[(1, 3, 0, 0)]+=-0.70756090094*x_ref[2]**o + (0.562691512861)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.865976347117*x[2]**o + (-0.549639587376)*x[2]
+            ref[(1, 3, 0, 1)]+=0.865976347117*x_ref[2]**o + (-0.549639587376)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=0.248073441047*x[2]**o + (-0.898835164382)*x[2]
+            ref[(1, 3, 0, 2)]+=0.248073441047*x_ref[2]**o + (-0.898835164382)*x_ref[2]
+            arg[(1, 3, 0, 3)]+=0.874243806114*x[2]**o + (0.661757256635)*x[2]
+            ref[(1, 3, 0, 3)]+=0.874243806114*x_ref[2]**o + (0.661757256635)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=-0.317582381269*x[2]**o + (0.283281772363)*x[2]
+            ref[(1, 3, 1, 0)]+=-0.317582381269*x_ref[2]**o + (0.283281772363)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.314639431334*x[2]**o + (-0.460211982069)*x[2]
+            ref[(1, 3, 1, 1)]+=0.314639431334*x_ref[2]**o + (-0.460211982069)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=-0.692553654569*x[2]**o + (-0.268938543685)*x[2]
+            ref[(1, 3, 1, 2)]+=-0.692553654569*x_ref[2]**o + (-0.268938543685)*x_ref[2]
+            arg[(1, 3, 1, 3)]+=-0.675946647829*x[2]**o + (0.390811769226)*x[2]
+            ref[(1, 3, 1, 3)]+=-0.675946647829*x_ref[2]**o + (0.390811769226)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=0.236957618758*x[2]**o + (0.576099876838)*x[2]
+            ref[(1, 3, 2, 0)]+=0.236957618758*x_ref[2]**o + (0.576099876838)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=-0.791044667831*x[2]**o + (-0.96531723911)*x[2]
+            ref[(1, 3, 2, 1)]+=-0.791044667831*x_ref[2]**o + (-0.96531723911)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.371059376331*x[2]**o + (0.950606539083)*x[2]
+            ref[(1, 3, 2, 2)]+=0.371059376331*x_ref[2]**o + (0.950606539083)*x_ref[2]
+            arg[(1, 3, 2, 3)]+=0.624004865554*x[2]**o + (0.826996202686)*x[2]
+            ref[(1, 3, 2, 3)]+=0.624004865554*x_ref[2]**o + (0.826996202686)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.637804478331*x[2]**o + (0.539552688281)*x[2]
+            ref[(2, 0, 0, 0)]+=0.637804478331*x_ref[2]**o + (0.539552688281)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.378923288715*x[2]**o + (-0.759283508692)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.378923288715*x_ref[2]**o + (-0.759283508692)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.518180883332*x[2]**o + (0.147018437366)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.518180883332*x_ref[2]**o + (0.147018437366)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=0.880560582911*x[2]**o + (0.217018612035)*x[2]
+            ref[(2, 0, 0, 3)]+=0.880560582911*x_ref[2]**o + (0.217018612035)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.861071498302*x[2]**o + (-0.331504634796)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.861071498302*x_ref[2]**o + (-0.331504634796)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.339382495095*x[2]**o + (-0.851798092414)*x[2]
+            ref[(2, 0, 1, 1)]+=-0.339382495095*x_ref[2]**o + (-0.851798092414)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.563481858157*x[2]**o + (-0.755873264025)*x[2]
+            ref[(2, 0, 1, 2)]+=0.563481858157*x_ref[2]**o + (-0.755873264025)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=-0.451149082524*x[2]**o + (0.497489302456)*x[2]
+            ref[(2, 0, 1, 3)]+=-0.451149082524*x_ref[2]**o + (0.497489302456)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.599652404052*x[2]**o + (-0.214932244877)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.599652404052*x_ref[2]**o + (-0.214932244877)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.849714738883*x[2]**o + (0.786888473069)*x[2]
+            ref[(2, 0, 2, 1)]+=-0.849714738883*x_ref[2]**o + (0.786888473069)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.891032532788*x[2]**o + (-0.215727096341)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.891032532788*x_ref[2]**o + (-0.215727096341)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=0.684585583177*x[2]**o + (0.0896154583685)*x[2]
+            ref[(2, 0, 2, 3)]+=0.684585583177*x_ref[2]**o + (0.0896154583685)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.366279467947*x[2]**o + (0.471331197872)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.366279467947*x_ref[2]**o + (0.471331197872)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.654752469579*x[2]**o + (-0.166780673759)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.654752469579*x_ref[2]**o + (-0.166780673759)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.339021076687*x[2]**o + (0.0694006442228)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.339021076687*x_ref[2]**o + (0.0694006442228)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=0.759612676444*x[2]**o + (-0.794657585377)*x[2]
+            ref[(2, 1, 0, 3)]+=0.759612676444*x_ref[2]**o + (-0.794657585377)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.705882741022*x[2]**o + (0.478801124372)*x[2]
+            ref[(2, 1, 1, 0)]+=0.705882741022*x_ref[2]**o + (0.478801124372)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.349773234036*x[2]**o + (-0.988704521958)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.349773234036*x_ref[2]**o + (-0.988704521958)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.994376659777*x[2]**o + (0.9889364767)*x[2]
+            ref[(2, 1, 1, 2)]+=0.994376659777*x_ref[2]**o + (0.9889364767)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.07890773295*x[2]**o + (0.664225207103)*x[2]
+            ref[(2, 1, 1, 3)]+=0.07890773295*x_ref[2]**o + (0.664225207103)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.393551209054*x[2]**o + (0.884679897286)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.393551209054*x_ref[2]**o + (0.884679897286)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.512408477627*x[2]**o + (0.918325466495)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.512408477627*x_ref[2]**o + (0.918325466495)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.334372911039*x[2]**o + (-0.0943375533399)*x[2]
+            ref[(2, 1, 2, 2)]+=0.334372911039*x_ref[2]**o + (-0.0943375533399)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=0.93419064641*x[2]**o + (-0.685605793654)*x[2]
+            ref[(2, 1, 2, 3)]+=0.93419064641*x_ref[2]**o + (-0.685605793654)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.206128959766*x[2]**o + (0.612228837615)*x[2]
+            ref[(2, 2, 0, 0)]+=0.206128959766*x_ref[2]**o + (0.612228837615)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.705102779146*x[2]**o + (-0.917406799998)*x[2]
+            ref[(2, 2, 0, 1)]+=0.705102779146*x_ref[2]**o + (-0.917406799998)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=0.791272004642*x[2]**o + (0.0292702616625)*x[2]
+            ref[(2, 2, 0, 2)]+=0.791272004642*x_ref[2]**o + (0.0292702616625)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=0.418442226378*x[2]**o + (-0.0305673814231)*x[2]
+            ref[(2, 2, 0, 3)]+=0.418442226378*x_ref[2]**o + (-0.0305673814231)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.150541927997*x[2]**o + (0.578728353549)*x[2]
+            ref[(2, 2, 1, 0)]+=0.150541927997*x_ref[2]**o + (0.578728353549)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.222901347292*x[2]**o + (-0.278215956263)*x[2]
+            ref[(2, 2, 1, 1)]+=-0.222901347292*x_ref[2]**o + (-0.278215956263)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.43998165979*x[2]**o + (0.799223094585)*x[2]
+            ref[(2, 2, 1, 2)]+=-0.43998165979*x_ref[2]**o + (0.799223094585)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=-0.973970681372*x[2]**o + (0.38909784902)*x[2]
+            ref[(2, 2, 1, 3)]+=-0.973970681372*x_ref[2]**o + (0.38909784902)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=0.398228210958*x[2]**o + (0.99742311404)*x[2]
+            ref[(2, 2, 2, 0)]+=0.398228210958*x_ref[2]**o + (0.99742311404)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.541847272377*x[2]**o + (0.333098914913)*x[2]
+            ref[(2, 2, 2, 1)]+=0.541847272377*x_ref[2]**o + (0.333098914913)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=0.429280039833*x[2]**o + (-0.143321622491)*x[2]
+            ref[(2, 2, 2, 2)]+=0.429280039833*x_ref[2]**o + (-0.143321622491)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=-0.748447348671*x[2]**o + (-0.516542421459)*x[2]
+            ref[(2, 2, 2, 3)]+=-0.748447348671*x_ref[2]**o + (-0.516542421459)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.235687421443*x[2]**o + (0.906982869696)*x[2]
+            ref[(2, 3, 0, 0)]+=-0.235687421443*x_ref[2]**o + (0.906982869696)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.172398238935*x[2]**o + (0.00987256350419)*x[2]
+            ref[(2, 3, 0, 1)]+=0.172398238935*x_ref[2]**o + (0.00987256350419)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=0.346828452102*x[2]**o + (0.895399017326)*x[2]
+            ref[(2, 3, 0, 2)]+=0.346828452102*x_ref[2]**o + (0.895399017326)*x_ref[2]
+            arg[(2, 3, 0, 3)]+=0.024875703884*x[2]**o + (0.0269229758556)*x[2]
+            ref[(2, 3, 0, 3)]+=0.024875703884*x_ref[2]**o + (0.0269229758556)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.814780977392*x[2]**o + (-0.932768281878)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.814780977392*x_ref[2]**o + (-0.932768281878)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.187247241997*x[2]**o + (-0.204254201939)*x[2]
+            ref[(2, 3, 1, 1)]+=0.187247241997*x_ref[2]**o + (-0.204254201939)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=0.109131166146*x[2]**o + (0.939073239714)*x[2]
+            ref[(2, 3, 1, 2)]+=0.109131166146*x_ref[2]**o + (0.939073239714)*x_ref[2]
+            arg[(2, 3, 1, 3)]+=-0.779895423461*x[2]**o + (-0.720600719998)*x[2]
+            ref[(2, 3, 1, 3)]+=-0.779895423461*x_ref[2]**o + (-0.720600719998)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=0.909683567775*x[2]**o + (0.500803177712)*x[2]
+            ref[(2, 3, 2, 0)]+=0.909683567775*x_ref[2]**o + (0.500803177712)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=-0.462663934316*x[2]**o + (-0.019271644097)*x[2]
+            ref[(2, 3, 2, 1)]+=-0.462663934316*x_ref[2]**o + (-0.019271644097)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=-0.239630667248*x[2]**o + (-0.28482533319)*x[2]
+            ref[(2, 3, 2, 2)]+=-0.239630667248*x_ref[2]**o + (-0.28482533319)*x_ref[2]
+            arg[(2, 3, 2, 3)]+=-0.975863924891*x[2]**o + (-0.0540779500495)*x[2]
+            ref[(2, 3, 2, 3)]+=-0.975863924891*x_ref[2]**o + (-0.0540779500495)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.820664629413*x[0]**o + (0.0974902706436)*x[0] + (-0.703267974011)*x[1]**o + (-0.906935257384)*x[1]
+        ref=0.820664629413*x_ref[0]**o + (0.0974902706436)*x_ref[0] + (-0.703267974011)*x_ref[1]**o + (-0.906935257384)*x_ref[1]
+        if dim==3:
+            arg+=(0.436095161385)*x[2]**o + (-0.143526929716)*x[2]
+            ref+=(0.436095161385)*x_ref[2]**o + (-0.143526929716)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.858408899574*x[0]**o + (0.97050167223)*x[0] + (0.117489887427)*x[1]**o + (0.388265626459)*x[1]
+        ref[(0,)]=0.858408899574*x_ref[0]**o + (0.97050167223)*x_ref[0] + (0.117489887427)*x_ref[1]**o + (0.388265626459)*x_ref[1]
+        arg[(1,)]=0.248257253005*x[0]**o + (-0.971571638293)*x[0] + (0.197233771608)*x[1]**o + (0.599139999651)*x[1]
+        ref[(1,)]=0.248257253005*x_ref[0]**o + (-0.971571638293)*x_ref[0] + (0.197233771608)*x_ref[1]**o + (0.599139999651)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.308498098895*x[2]**o + (0.516904110518)*x[2]
+            ref[(0,)]+=-0.308498098895*x_ref[2]**o + (0.516904110518)*x_ref[2]
+            arg[(1,)]+=0.247197621607*x[2]**o + (0.0430661037887)*x[2]
+            ref[(1,)]+=0.247197621607*x_ref[2]**o + (0.0430661037887)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3),w_ref)
+        arg[(0, 0)]=0.492310866474*x[0]**o + (0.187384516343)*x[0] + (0.265692366747)*x[1]**o + (-0.791970517458)*x[1]
+        ref[(0, 0)]=0.492310866474*x_ref[0]**o + (0.187384516343)*x_ref[0] + (0.265692366747)*x_ref[1]**o + (-0.791970517458)*x_ref[1]
+        arg[(0, 1)]=-0.211779950482*x[0]**o + (0.357424153249)*x[0] + (-0.547501195323)*x[1]**o + (0.507428285294)*x[1]
+        ref[(0, 1)]=-0.211779950482*x_ref[0]**o + (0.357424153249)*x_ref[0] + (-0.547501195323)*x_ref[1]**o + (0.507428285294)*x_ref[1]
+        arg[(0, 2)]=-0.482832592603*x[0]**o + (-0.679218702761)*x[0] + (0.620364214917)*x[1]**o + (-0.232995679903)*x[1]
+        ref[(0, 2)]=-0.482832592603*x_ref[0]**o + (-0.679218702761)*x_ref[0] + (0.620364214917)*x_ref[1]**o + (-0.232995679903)*x_ref[1]
+        arg[(1, 0)]=0.509381078203*x[0]**o + (-0.448150249446)*x[0] + (0.101177239549)*x[1]**o + (-0.460377476581)*x[1]
+        ref[(1, 0)]=0.509381078203*x_ref[0]**o + (-0.448150249446)*x_ref[0] + (0.101177239549)*x_ref[1]**o + (-0.460377476581)*x_ref[1]
+        arg[(1, 1)]=-0.59069633255*x[0]**o + (-0.605371383442)*x[0] + (0.799681287514)*x[1]**o + (0.251531005912)*x[1]
+        ref[(1, 1)]=-0.59069633255*x_ref[0]**o + (-0.605371383442)*x_ref[0] + (0.799681287514)*x_ref[1]**o + (0.251531005912)*x_ref[1]
+        arg[(1, 2)]=-0.456561590127*x[0]**o + (-0.733449326444)*x[0] + (-0.749414142444)*x[1]**o + (0.559960002404)*x[1]
+        ref[(1, 2)]=-0.456561590127*x_ref[0]**o + (-0.733449326444)*x_ref[0] + (-0.749414142444)*x_ref[1]**o + (0.559960002404)*x_ref[1]
+        arg[(2, 0)]=-0.823564413192*x[0]**o + (0.129730898795)*x[0] + (-0.0224159502525)*x[1]**o + (-0.89313177564)*x[1]
+        ref[(2, 0)]=-0.823564413192*x_ref[0]**o + (0.129730898795)*x_ref[0] + (-0.0224159502525)*x_ref[1]**o + (-0.89313177564)*x_ref[1]
+        arg[(2, 1)]=0.99932768873*x[0]**o + (0.35995029758)*x[0] + (0.630471675228)*x[1]**o + (0.455166471314)*x[1]
+        ref[(2, 1)]=0.99932768873*x_ref[0]**o + (0.35995029758)*x_ref[0] + (0.630471675228)*x_ref[1]**o + (0.455166471314)*x_ref[1]
+        arg[(2, 2)]=0.10710530564*x[0]**o + (0.1582700502)*x[0] + (-0.550579101871)*x[1]**o + (0.673358487742)*x[1]
+        ref[(2, 2)]=0.10710530564*x_ref[0]**o + (0.1582700502)*x_ref[0] + (-0.550579101871)*x_ref[1]**o + (0.673358487742)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.0619895977088*x[2]**o + (-0.0641003817821)*x[2]
+            ref[(0, 0)]+=0.0619895977088*x_ref[2]**o + (-0.0641003817821)*x_ref[2]
+            arg[(0, 1)]+=0.344880404358*x[2]**o + (0.389845796409)*x[2]
+            ref[(0, 1)]+=0.344880404358*x_ref[2]**o + (0.389845796409)*x_ref[2]
+            arg[(0, 2)]+=-0.878408180534*x[2]**o + (-0.0592281635746)*x[2]
+            ref[(0, 2)]+=-0.878408180534*x_ref[2]**o + (-0.0592281635746)*x_ref[2]
+            arg[(1, 0)]+=0.693269251866*x[2]**o + (0.00930484362323)*x[2]
+            ref[(1, 0)]+=0.693269251866*x_ref[2]**o + (0.00930484362323)*x_ref[2]
+            arg[(1, 1)]+=0.517264281339*x[2]**o + (-0.195188403515)*x[2]
+            ref[(1, 1)]+=0.517264281339*x_ref[2]**o + (-0.195188403515)*x_ref[2]
+            arg[(1, 2)]+=0.0375443197261*x[2]**o + (0.830115347752)*x[2]
+            ref[(1, 2)]+=0.0375443197261*x_ref[2]**o + (0.830115347752)*x_ref[2]
+            arg[(2, 0)]+=-0.795805559516*x[2]**o + (0.175610197663)*x[2]
+            ref[(2, 0)]+=-0.795805559516*x_ref[2]**o + (0.175610197663)*x_ref[2]
+            arg[(2, 1)]+=-0.84306878603*x[2]**o + (-0.133489733038)*x[2]
+            ref[(2, 1)]+=-0.84306878603*x_ref[2]**o + (-0.133489733038)*x_ref[2]
+            arg[(2, 2)]+=-0.190465493354*x[2]**o + (-0.98932024889)*x[2]
+            ref[(2, 2)]+=-0.190465493354*x_ref[2]**o + (-0.98932024889)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4),w_ref)
+        arg[(0, 0, 0)]=-0.444004959725*x[0]**o + (0.900441789572)*x[0] + (-0.418759015797)*x[1]**o + (0.831759700178)*x[1]
+        ref[(0, 0, 0)]=-0.444004959725*x_ref[0]**o + (0.900441789572)*x_ref[0] + (-0.418759015797)*x_ref[1]**o + (0.831759700178)*x_ref[1]
+        arg[(0, 0, 1)]=0.276430892577*x[0]**o + (0.472657437855)*x[0] + (0.619832611311)*x[1]**o + (0.482347564173)*x[1]
+        ref[(0, 0, 1)]=0.276430892577*x_ref[0]**o + (0.472657437855)*x_ref[0] + (0.619832611311)*x_ref[1]**o + (0.482347564173)*x_ref[1]
+        arg[(0, 0, 2)]=0.807004962444*x[0]**o + (-0.0959144589115)*x[0] + (0.586136664947)*x[1]**o + (0.472312593758)*x[1]
+        ref[(0, 0, 2)]=0.807004962444*x_ref[0]**o + (-0.0959144589115)*x_ref[0] + (0.586136664947)*x_ref[1]**o + (0.472312593758)*x_ref[1]
+        arg[(0, 0, 3)]=-0.54336996176*x[0]**o + (0.669977863862)*x[0] + (0.52311047251)*x[1]**o + (-0.713809781757)*x[1]
+        ref[(0, 0, 3)]=-0.54336996176*x_ref[0]**o + (0.669977863862)*x_ref[0] + (0.52311047251)*x_ref[1]**o + (-0.713809781757)*x_ref[1]
+        arg[(0, 1, 0)]=-0.723452872258*x[0]**o + (-0.494125356973)*x[0] + (-0.675961863873)*x[1]**o + (-0.0193442517035)*x[1]
+        ref[(0, 1, 0)]=-0.723452872258*x_ref[0]**o + (-0.494125356973)*x_ref[0] + (-0.675961863873)*x_ref[1]**o + (-0.0193442517035)*x_ref[1]
+        arg[(0, 1, 1)]=-0.339166572514*x[0]**o + (0.204477607718)*x[0] + (-0.0106185724098)*x[1]**o + (-0.709432647673)*x[1]
+        ref[(0, 1, 1)]=-0.339166572514*x_ref[0]**o + (0.204477607718)*x_ref[0] + (-0.0106185724098)*x_ref[1]**o + (-0.709432647673)*x_ref[1]
+        arg[(0, 1, 2)]=-0.577517984878*x[0]**o + (0.875139325009)*x[0] + (-0.323223993455)*x[1]**o + (-0.544033649728)*x[1]
+        ref[(0, 1, 2)]=-0.577517984878*x_ref[0]**o + (0.875139325009)*x_ref[0] + (-0.323223993455)*x_ref[1]**o + (-0.544033649728)*x_ref[1]
+        arg[(0, 1, 3)]=0.506424264572*x[0]**o + (-0.973970650427)*x[0] + (0.381819982547)*x[1]**o + (-0.699558897949)*x[1]
+        ref[(0, 1, 3)]=0.506424264572*x_ref[0]**o + (-0.973970650427)*x_ref[0] + (0.381819982547)*x_ref[1]**o + (-0.699558897949)*x_ref[1]
+        arg[(1, 0, 0)]=0.455273463592*x[0]**o + (0.319653539436)*x[0] + (0.146800058397)*x[1]**o + (-0.673331533578)*x[1]
+        ref[(1, 0, 0)]=0.455273463592*x_ref[0]**o + (0.319653539436)*x_ref[0] + (0.146800058397)*x_ref[1]**o + (-0.673331533578)*x_ref[1]
+        arg[(1, 0, 1)]=-0.748204353784*x[0]**o + (-0.00519078047243)*x[0] + (-0.553628081079)*x[1]**o + (0.377976554588)*x[1]
+        ref[(1, 0, 1)]=-0.748204353784*x_ref[0]**o + (-0.00519078047243)*x_ref[0] + (-0.553628081079)*x_ref[1]**o + (0.377976554588)*x_ref[1]
+        arg[(1, 0, 2)]=-0.148283447184*x[0]**o + (-0.563894043098)*x[0] + (-0.540239110487)*x[1]**o + (-0.074722250653)*x[1]
+        ref[(1, 0, 2)]=-0.148283447184*x_ref[0]**o + (-0.563894043098)*x_ref[0] + (-0.540239110487)*x_ref[1]**o + (-0.074722250653)*x_ref[1]
+        arg[(1, 0, 3)]=-0.199534786847*x[0]**o + (-0.511158310471)*x[0] + (0.288150473449)*x[1]**o + (0.566945481055)*x[1]
+        ref[(1, 0, 3)]=-0.199534786847*x_ref[0]**o + (-0.511158310471)*x_ref[0] + (0.288150473449)*x_ref[1]**o + (0.566945481055)*x_ref[1]
+        arg[(1, 1, 0)]=-0.336349259823*x[0]**o + (-0.289374259046)*x[0] + (0.693770428101)*x[1]**o + (-0.288220207551)*x[1]
+        ref[(1, 1, 0)]=-0.336349259823*x_ref[0]**o + (-0.289374259046)*x_ref[0] + (0.693770428101)*x_ref[1]**o + (-0.288220207551)*x_ref[1]
+        arg[(1, 1, 1)]=-0.815215241943*x[0]**o + (0.0776547623268)*x[0] + (0.560984360008)*x[1]**o + (0.282725824337)*x[1]
+        ref[(1, 1, 1)]=-0.815215241943*x_ref[0]**o + (0.0776547623268)*x_ref[0] + (0.560984360008)*x_ref[1]**o + (0.282725824337)*x_ref[1]
+        arg[(1, 1, 2)]=-0.741488812713*x[0]**o + (-0.968616514902)*x[0] + (-0.601879074963)*x[1]**o + (-0.595209277631)*x[1]
+        ref[(1, 1, 2)]=-0.741488812713*x_ref[0]**o + (-0.968616514902)*x_ref[0] + (-0.601879074963)*x_ref[1]**o + (-0.595209277631)*x_ref[1]
+        arg[(1, 1, 3)]=0.93242059398*x[0]**o + (-0.957026860794)*x[0] + (0.00585546550398)*x[1]**o + (0.931845118815)*x[1]
+        ref[(1, 1, 3)]=0.93242059398*x_ref[0]**o + (-0.957026860794)*x_ref[0] + (0.00585546550398)*x_ref[1]**o + (0.931845118815)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.456794225251*x[2]**o + (-0.695216169215)*x[2]
+            ref[(0, 0, 0)]+=-0.456794225251*x_ref[2]**o + (-0.695216169215)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.953003000405*x[2]**o + (-0.118394798686)*x[2]
+            ref[(0, 0, 1)]+=-0.953003000405*x_ref[2]**o + (-0.118394798686)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.760444587575*x[2]**o + (-0.940598678641)*x[2]
+            ref[(0, 0, 2)]+=-0.760444587575*x_ref[2]**o + (-0.940598678641)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.368215032812*x[2]**o + (0.67745761953)*x[2]
+            ref[(0, 0, 3)]+=-0.368215032812*x_ref[2]**o + (0.67745761953)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.66462825617*x[2]**o + (0.0529630458926)*x[2]
+            ref[(0, 1, 0)]+=-0.66462825617*x_ref[2]**o + (0.0529630458926)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.828720517164*x[2]**o + (0.778229087738)*x[2]
+            ref[(0, 1, 1)]+=-0.828720517164*x_ref[2]**o + (0.778229087738)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.240658802285*x[2]**o + (0.678182071727)*x[2]
+            ref[(0, 1, 2)]+=-0.240658802285*x_ref[2]**o + (0.678182071727)*x_ref[2]
+            arg[(0, 1, 3)]+=0.993237771575*x[2]**o + (0.679609017111)*x[2]
+            ref[(0, 1, 3)]+=0.993237771575*x_ref[2]**o + (0.679609017111)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.901605712418*x[2]**o + (0.972741382274)*x[2]
+            ref[(1, 0, 0)]+=-0.901605712418*x_ref[2]**o + (0.972741382274)*x_ref[2]
+            arg[(1, 0, 1)]+=0.889740523345*x[2]**o + (-0.691235469536)*x[2]
+            ref[(1, 0, 1)]+=0.889740523345*x_ref[2]**o + (-0.691235469536)*x_ref[2]
+            arg[(1, 0, 2)]+=0.0211018145828*x[2]**o + (0.922719541486)*x[2]
+            ref[(1, 0, 2)]+=0.0211018145828*x_ref[2]**o + (0.922719541486)*x_ref[2]
+            arg[(1, 0, 3)]+=0.619063126787*x[2]**o + (0.159675881803)*x[2]
+            ref[(1, 0, 3)]+=0.619063126787*x_ref[2]**o + (0.159675881803)*x_ref[2]
+            arg[(1, 1, 0)]+=0.16294534252*x[2]**o + (-0.595199044312)*x[2]
+            ref[(1, 1, 0)]+=0.16294534252*x_ref[2]**o + (-0.595199044312)*x_ref[2]
+            arg[(1, 1, 1)]+=0.241320179017*x[2]**o + (-0.640374073488)*x[2]
+            ref[(1, 1, 1)]+=0.241320179017*x_ref[2]**o + (-0.640374073488)*x_ref[2]
+            arg[(1, 1, 2)]+=0.830045063212*x[2]**o + (-0.363989173843)*x[2]
+            ref[(1, 1, 2)]+=0.830045063212*x_ref[2]**o + (-0.363989173843)*x_ref[2]
+            arg[(1, 1, 3)]+=0.542443037528*x[2]**o + (-0.162779077648)*x[2]
+            ref[(1, 1, 3)]+=0.542443037528*x_ref[2]**o + (-0.162779077648)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4, 3),w)
+        ref = Data(0,(3, 4, 4, 3),w_ref)
+        arg[(0, 0, 0, 0)]=-0.614158724032*x[0]**o + (0.456016363185)*x[0] + (-0.284525582723)*x[1]**o + (0.0432875326066)*x[1]
+        ref[(0, 0, 0, 0)]=-0.614158724032*x_ref[0]**o + (0.456016363185)*x_ref[0] + (-0.284525582723)*x_ref[1]**o + (0.0432875326066)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.951250582909*x[0]**o + (-0.212811327343)*x[0] + (0.0165744040051)*x[1]**o + (0.394175564117)*x[1]
+        ref[(0, 0, 0, 1)]=0.951250582909*x_ref[0]**o + (-0.212811327343)*x_ref[0] + (0.0165744040051)*x_ref[1]**o + (0.394175564117)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.203202831924*x[0]**o + (0.559894467495)*x[0] + (0.260628802938)*x[1]**o + (0.00469851357823)*x[1]
+        ref[(0, 0, 0, 2)]=-0.203202831924*x_ref[0]**o + (0.559894467495)*x_ref[0] + (0.260628802938)*x_ref[1]**o + (0.00469851357823)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.441519507436*x[0]**o + (-0.72725570993)*x[0] + (0.970945676481)*x[1]**o + (0.505115289545)*x[1]
+        ref[(0, 0, 1, 0)]=-0.441519507436*x_ref[0]**o + (-0.72725570993)*x_ref[0] + (0.970945676481)*x_ref[1]**o + (0.505115289545)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.203681670313*x[0]**o + (0.496636904337)*x[0] + (-0.926750735525)*x[1]**o + (0.204446125409)*x[1]
+        ref[(0, 0, 1, 1)]=-0.203681670313*x_ref[0]**o + (0.496636904337)*x_ref[0] + (-0.926750735525)*x_ref[1]**o + (0.204446125409)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.530798973677*x[0]**o + (-0.460231195676)*x[0] + (-0.524480386311)*x[1]**o + (0.0234411791503)*x[1]
+        ref[(0, 0, 1, 2)]=-0.530798973677*x_ref[0]**o + (-0.460231195676)*x_ref[0] + (-0.524480386311)*x_ref[1]**o + (0.0234411791503)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.410652133014*x[0]**o + (0.232758648449)*x[0] + (-0.145066533883)*x[1]**o + (-0.966340293975)*x[1]
+        ref[(0, 0, 2, 0)]=0.410652133014*x_ref[0]**o + (0.232758648449)*x_ref[0] + (-0.145066533883)*x_ref[1]**o + (-0.966340293975)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.1611707873*x[0]**o + (-0.855614656294)*x[0] + (0.105915763866)*x[1]**o + (0.585457790327)*x[1]
+        ref[(0, 0, 2, 1)]=-0.1611707873*x_ref[0]**o + (-0.855614656294)*x_ref[0] + (0.105915763866)*x_ref[1]**o + (0.585457790327)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.801900858942*x[0]**o + (0.204731099745)*x[0] + (0.607062001468)*x[1]**o + (-0.00234344791237)*x[1]
+        ref[(0, 0, 2, 2)]=0.801900858942*x_ref[0]**o + (0.204731099745)*x_ref[0] + (0.607062001468)*x_ref[1]**o + (-0.00234344791237)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.0554237200822*x[0]**o + (-0.808905461206)*x[0] + (0.35762911943)*x[1]**o + (-0.461506696319)*x[1]
+        ref[(0, 0, 3, 0)]=0.0554237200822*x_ref[0]**o + (-0.808905461206)*x_ref[0] + (0.35762911943)*x_ref[1]**o + (-0.461506696319)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.539419195695*x[0]**o + (-0.825199500388)*x[0] + (-0.00858241312833)*x[1]**o + (-0.0733941941324)*x[1]
+        ref[(0, 0, 3, 1)]=0.539419195695*x_ref[0]**o + (-0.825199500388)*x_ref[0] + (-0.00858241312833)*x_ref[1]**o + (-0.0733941941324)*x_ref[1]
+        arg[(0, 0, 3, 2)]=0.797461413135*x[0]**o + (0.0395013185397)*x[0] + (0.634710411763)*x[1]**o + (0.372970055112)*x[1]
+        ref[(0, 0, 3, 2)]=0.797461413135*x_ref[0]**o + (0.0395013185397)*x_ref[0] + (0.634710411763)*x_ref[1]**o + (0.372970055112)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.545643203288*x[0]**o + (0.337502121107)*x[0] + (0.564672956364)*x[1]**o + (-0.967474901537)*x[1]
+        ref[(0, 1, 0, 0)]=0.545643203288*x_ref[0]**o + (0.337502121107)*x_ref[0] + (0.564672956364)*x_ref[1]**o + (-0.967474901537)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.382798213783*x[0]**o + (0.916882406252)*x[0] + (-0.850863776704)*x[1]**o + (0.289517489413)*x[1]
+        ref[(0, 1, 0, 1)]=-0.382798213783*x_ref[0]**o + (0.916882406252)*x_ref[0] + (-0.850863776704)*x_ref[1]**o + (0.289517489413)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.458907513017*x[0]**o + (-0.535419151336)*x[0] + (-0.0824476030475)*x[1]**o + (-0.256306048529)*x[1]
+        ref[(0, 1, 0, 2)]=0.458907513017*x_ref[0]**o + (-0.535419151336)*x_ref[0] + (-0.0824476030475)*x_ref[1]**o + (-0.256306048529)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.716737554706*x[0]**o + (-0.580906282875)*x[0] + (-0.51761103178)*x[1]**o + (-0.0130054964239)*x[1]
+        ref[(0, 1, 1, 0)]=0.716737554706*x_ref[0]**o + (-0.580906282875)*x_ref[0] + (-0.51761103178)*x_ref[1]**o + (-0.0130054964239)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.913346475495*x[0]**o + (0.230763302916)*x[0] + (0.216552064544)*x[1]**o + (0.414042014093)*x[1]
+        ref[(0, 1, 1, 1)]=-0.913346475495*x_ref[0]**o + (0.230763302916)*x_ref[0] + (0.216552064544)*x_ref[1]**o + (0.414042014093)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.790521569293*x[0]**o + (0.481722538849)*x[0] + (0.961715704167)*x[1]**o + (-0.198589610145)*x[1]
+        ref[(0, 1, 1, 2)]=0.790521569293*x_ref[0]**o + (0.481722538849)*x_ref[0] + (0.961715704167)*x_ref[1]**o + (-0.198589610145)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.508089796553*x[0]**o + (-0.64388375152)*x[0] + (0.48032605546)*x[1]**o + (-0.45634006434)*x[1]
+        ref[(0, 1, 2, 0)]=-0.508089796553*x_ref[0]**o + (-0.64388375152)*x_ref[0] + (0.48032605546)*x_ref[1]**o + (-0.45634006434)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.0240882329954*x[0]**o + (-0.665384919658)*x[0] + (0.808784917573)*x[1]**o + (-0.0881058215582)*x[1]
+        ref[(0, 1, 2, 1)]=0.0240882329954*x_ref[0]**o + (-0.665384919658)*x_ref[0] + (0.808784917573)*x_ref[1]**o + (-0.0881058215582)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.73686369253*x[0]**o + (-0.407423203981)*x[0] + (-0.439297119246)*x[1]**o + (0.0836068915879)*x[1]
+        ref[(0, 1, 2, 2)]=-0.73686369253*x_ref[0]**o + (-0.407423203981)*x_ref[0] + (-0.439297119246)*x_ref[1]**o + (0.0836068915879)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.869880478561*x[0]**o + (0.889447950898)*x[0] + (0.993423003767)*x[1]**o + (0.720751691813)*x[1]
+        ref[(0, 1, 3, 0)]=-0.869880478561*x_ref[0]**o + (0.889447950898)*x_ref[0] + (0.993423003767)*x_ref[1]**o + (0.720751691813)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.597556875444*x[0]**o + (-0.980848093597)*x[0] + (0.0743525389751)*x[1]**o + (-0.301601644434)*x[1]
+        ref[(0, 1, 3, 1)]=0.597556875444*x_ref[0]**o + (-0.980848093597)*x_ref[0] + (0.0743525389751)*x_ref[1]**o + (-0.301601644434)*x_ref[1]
+        arg[(0, 1, 3, 2)]=-0.0791961909028*x[0]**o + (-0.10447811363)*x[0] + (-0.947263725198)*x[1]**o + (-0.505752516)*x[1]
+        ref[(0, 1, 3, 2)]=-0.0791961909028*x_ref[0]**o + (-0.10447811363)*x_ref[0] + (-0.947263725198)*x_ref[1]**o + (-0.505752516)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.968709227288*x[0]**o + (0.680700788405)*x[0] + (0.449606505363)*x[1]**o + (0.415956003818)*x[1]
+        ref[(0, 2, 0, 0)]=0.968709227288*x_ref[0]**o + (0.680700788405)*x_ref[0] + (0.449606505363)*x_ref[1]**o + (0.415956003818)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.788204843681*x[0]**o + (0.0429401661852)*x[0] + (0.930931444712)*x[1]**o + (-0.565639649794)*x[1]
+        ref[(0, 2, 0, 1)]=0.788204843681*x_ref[0]**o + (0.0429401661852)*x_ref[0] + (0.930931444712)*x_ref[1]**o + (-0.565639649794)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.84313022715*x[0]**o + (-0.117734857898)*x[0] + (0.163416652025)*x[1]**o + (-0.253059124883)*x[1]
+        ref[(0, 2, 0, 2)]=0.84313022715*x_ref[0]**o + (-0.117734857898)*x_ref[0] + (0.163416652025)*x_ref[1]**o + (-0.253059124883)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.823327714029*x[0]**o + (0.658915033277)*x[0] + (-0.564087424643)*x[1]**o + (0.818317863915)*x[1]
+        ref[(0, 2, 1, 0)]=-0.823327714029*x_ref[0]**o + (0.658915033277)*x_ref[0] + (-0.564087424643)*x_ref[1]**o + (0.818317863915)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.216721840782*x[0]**o + (-0.318366221569)*x[0] + (-0.121330867074)*x[1]**o + (0.85655007276)*x[1]
+        ref[(0, 2, 1, 1)]=-0.216721840782*x_ref[0]**o + (-0.318366221569)*x_ref[0] + (-0.121330867074)*x_ref[1]**o + (0.85655007276)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.716348618675*x[0]**o + (0.312950281441)*x[0] + (-0.610029734047)*x[1]**o + (0.306991341284)*x[1]
+        ref[(0, 2, 1, 2)]=-0.716348618675*x_ref[0]**o + (0.312950281441)*x_ref[0] + (-0.610029734047)*x_ref[1]**o + (0.306991341284)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.816741286482*x[0]**o + (0.0569067931483)*x[0] + (0.964294372584)*x[1]**o + (0.772434246308)*x[1]
+        ref[(0, 2, 2, 0)]=-0.816741286482*x_ref[0]**o + (0.0569067931483)*x_ref[0] + (0.964294372584)*x_ref[1]**o + (0.772434246308)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.240636219698*x[0]**o + (0.873019760869)*x[0] + (-0.0464408573128)*x[1]**o + (0.414245132013)*x[1]
+        ref[(0, 2, 2, 1)]=0.240636219698*x_ref[0]**o + (0.873019760869)*x_ref[0] + (-0.0464408573128)*x_ref[1]**o + (0.414245132013)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.0403237955486*x[0]**o + (0.698086334939)*x[0] + (0.100774964267)*x[1]**o + (0.116399352043)*x[1]
+        ref[(0, 2, 2, 2)]=-0.0403237955486*x_ref[0]**o + (0.698086334939)*x_ref[0] + (0.100774964267)*x_ref[1]**o + (0.116399352043)*x_ref[1]
+        arg[(0, 2, 3, 0)]=-0.317585653039*x[0]**o + (0.812074300632)*x[0] + (0.711581387477)*x[1]**o + (0.274784789515)*x[1]
+        ref[(0, 2, 3, 0)]=-0.317585653039*x_ref[0]**o + (0.812074300632)*x_ref[0] + (0.711581387477)*x_ref[1]**o + (0.274784789515)*x_ref[1]
+        arg[(0, 2, 3, 1)]=-0.392784010499*x[0]**o + (-0.14356851165)*x[0] + (-0.328179221308)*x[1]**o + (0.277779983673)*x[1]
+        ref[(0, 2, 3, 1)]=-0.392784010499*x_ref[0]**o + (-0.14356851165)*x_ref[0] + (-0.328179221308)*x_ref[1]**o + (0.277779983673)*x_ref[1]
+        arg[(0, 2, 3, 2)]=-0.123531329079*x[0]**o + (-0.388952961393)*x[0] + (0.548364729802)*x[1]**o + (-0.898047195812)*x[1]
+        ref[(0, 2, 3, 2)]=-0.123531329079*x_ref[0]**o + (-0.388952961393)*x_ref[0] + (0.548364729802)*x_ref[1]**o + (-0.898047195812)*x_ref[1]
+        arg[(0, 3, 0, 0)]=-0.216504500949*x[0]**o + (0.990151119385)*x[0] + (0.0959574605788)*x[1]**o + (-0.0857537561126)*x[1]
+        ref[(0, 3, 0, 0)]=-0.216504500949*x_ref[0]**o + (0.990151119385)*x_ref[0] + (0.0959574605788)*x_ref[1]**o + (-0.0857537561126)*x_ref[1]
+        arg[(0, 3, 0, 1)]=-0.998619952606*x[0]**o + (-0.134371971324)*x[0] + (-0.585677853612)*x[1]**o + (-0.642502571127)*x[1]
+        ref[(0, 3, 0, 1)]=-0.998619952606*x_ref[0]**o + (-0.134371971324)*x_ref[0] + (-0.585677853612)*x_ref[1]**o + (-0.642502571127)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.617377240463*x[0]**o + (0.0924594609459)*x[0] + (-0.91379245913)*x[1]**o + (-0.596998061058)*x[1]
+        ref[(0, 3, 0, 2)]=-0.617377240463*x_ref[0]**o + (0.0924594609459)*x_ref[0] + (-0.91379245913)*x_ref[1]**o + (-0.596998061058)*x_ref[1]
+        arg[(0, 3, 1, 0)]=-0.983674767053*x[0]**o + (0.804304186859)*x[0] + (-0.706839800207)*x[1]**o + (-0.234110677085)*x[1]
+        ref[(0, 3, 1, 0)]=-0.983674767053*x_ref[0]**o + (0.804304186859)*x_ref[0] + (-0.706839800207)*x_ref[1]**o + (-0.234110677085)*x_ref[1]
+        arg[(0, 3, 1, 1)]=-0.946471077547*x[0]**o + (-0.245154745929)*x[0] + (-0.399223015333)*x[1]**o + (-0.409860667787)*x[1]
+        ref[(0, 3, 1, 1)]=-0.946471077547*x_ref[0]**o + (-0.245154745929)*x_ref[0] + (-0.399223015333)*x_ref[1]**o + (-0.409860667787)*x_ref[1]
+        arg[(0, 3, 1, 2)]=0.923636581602*x[0]**o + (0.903599378581)*x[0] + (0.0831756508919)*x[1]**o + (0.661984773186)*x[1]
+        ref[(0, 3, 1, 2)]=0.923636581602*x_ref[0]**o + (0.903599378581)*x_ref[0] + (0.0831756508919)*x_ref[1]**o + (0.661984773186)*x_ref[1]
+        arg[(0, 3, 2, 0)]=-0.761632364564*x[0]**o + (0.497335599304)*x[0] + (0.324956784826)*x[1]**o + (0.0330427487738)*x[1]
+        ref[(0, 3, 2, 0)]=-0.761632364564*x_ref[0]**o + (0.497335599304)*x_ref[0] + (0.324956784826)*x_ref[1]**o + (0.0330427487738)*x_ref[1]
+        arg[(0, 3, 2, 1)]=-0.457089081017*x[0]**o + (-0.593164584503)*x[0] + (-0.150700183157)*x[1]**o + (-0.576870419691)*x[1]
+        ref[(0, 3, 2, 1)]=-0.457089081017*x_ref[0]**o + (-0.593164584503)*x_ref[0] + (-0.150700183157)*x_ref[1]**o + (-0.576870419691)*x_ref[1]
+        arg[(0, 3, 2, 2)]=-0.846035931963*x[0]**o + (0.257313101465)*x[0] + (0.360260100879)*x[1]**o + (-0.41873715343)*x[1]
+        ref[(0, 3, 2, 2)]=-0.846035931963*x_ref[0]**o + (0.257313101465)*x_ref[0] + (0.360260100879)*x_ref[1]**o + (-0.41873715343)*x_ref[1]
+        arg[(0, 3, 3, 0)]=-0.0374992813324*x[0]**o + (-0.829985657082)*x[0] + (0.341510712757)*x[1]**o + (0.311082735856)*x[1]
+        ref[(0, 3, 3, 0)]=-0.0374992813324*x_ref[0]**o + (-0.829985657082)*x_ref[0] + (0.341510712757)*x_ref[1]**o + (0.311082735856)*x_ref[1]
+        arg[(0, 3, 3, 1)]=-0.606903554515*x[0]**o + (-0.0719974201897)*x[0] + (0.408111017904)*x[1]**o + (-0.467773676878)*x[1]
+        ref[(0, 3, 3, 1)]=-0.606903554515*x_ref[0]**o + (-0.0719974201897)*x_ref[0] + (0.408111017904)*x_ref[1]**o + (-0.467773676878)*x_ref[1]
+        arg[(0, 3, 3, 2)]=0.391509989602*x[0]**o + (0.283195300353)*x[0] + (0.408247171451)*x[1]**o + (0.686754251682)*x[1]
+        ref[(0, 3, 3, 2)]=0.391509989602*x_ref[0]**o + (0.283195300353)*x_ref[0] + (0.408247171451)*x_ref[1]**o + (0.686754251682)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.429661026286*x[0]**o + (0.854660902122)*x[0] + (-0.154983787293)*x[1]**o + (-0.892680568434)*x[1]
+        ref[(1, 0, 0, 0)]=0.429661026286*x_ref[0]**o + (0.854660902122)*x_ref[0] + (-0.154983787293)*x_ref[1]**o + (-0.892680568434)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.154795626823*x[0]**o + (0.562614603124)*x[0] + (-0.523812199883)*x[1]**o + (-0.988259820937)*x[1]
+        ref[(1, 0, 0, 1)]=0.154795626823*x_ref[0]**o + (0.562614603124)*x_ref[0] + (-0.523812199883)*x_ref[1]**o + (-0.988259820937)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.44777397248*x[0]**o + (0.507715445355)*x[0] + (-0.891548286883)*x[1]**o + (0.33909109116)*x[1]
+        ref[(1, 0, 0, 2)]=-0.44777397248*x_ref[0]**o + (0.507715445355)*x_ref[0] + (-0.891548286883)*x_ref[1]**o + (0.33909109116)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.494159913491*x[0]**o + (0.330401598403)*x[0] + (0.655082373257)*x[1]**o + (0.940967116491)*x[1]
+        ref[(1, 0, 1, 0)]=-0.494159913491*x_ref[0]**o + (0.330401598403)*x_ref[0] + (0.655082373257)*x_ref[1]**o + (0.940967116491)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.164694543028*x[0]**o + (0.163792087968)*x[0] + (0.68666456545)*x[1]**o + (0.932139932794)*x[1]
+        ref[(1, 0, 1, 1)]=0.164694543028*x_ref[0]**o + (0.163792087968)*x_ref[0] + (0.68666456545)*x_ref[1]**o + (0.932139932794)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.340705541746*x[0]**o + (0.54318184949)*x[0] + (-0.939988557164)*x[1]**o + (-0.80738842761)*x[1]
+        ref[(1, 0, 1, 2)]=-0.340705541746*x_ref[0]**o + (0.54318184949)*x_ref[0] + (-0.939988557164)*x_ref[1]**o + (-0.80738842761)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.719790436572*x[0]**o + (-0.666498686922)*x[0] + (-0.0205860381721)*x[1]**o + (0.780398609648)*x[1]
+        ref[(1, 0, 2, 0)]=0.719790436572*x_ref[0]**o + (-0.666498686922)*x_ref[0] + (-0.0205860381721)*x_ref[1]**o + (0.780398609648)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.555912828288*x[0]**o + (0.989385072853)*x[0] + (0.135101688799)*x[1]**o + (-0.36542507542)*x[1]
+        ref[(1, 0, 2, 1)]=0.555912828288*x_ref[0]**o + (0.989385072853)*x_ref[0] + (0.135101688799)*x_ref[1]**o + (-0.36542507542)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.00659631813271*x[0]**o + (0.999517372847)*x[0] + (0.232272326171)*x[1]**o + (-0.85743849507)*x[1]
+        ref[(1, 0, 2, 2)]=0.00659631813271*x_ref[0]**o + (0.999517372847)*x_ref[0] + (0.232272326171)*x_ref[1]**o + (-0.85743849507)*x_ref[1]
+        arg[(1, 0, 3, 0)]=0.551057977963*x[0]**o + (0.323098554471)*x[0] + (0.567795435097)*x[1]**o + (0.374973623258)*x[1]
+        ref[(1, 0, 3, 0)]=0.551057977963*x_ref[0]**o + (0.323098554471)*x_ref[0] + (0.567795435097)*x_ref[1]**o + (0.374973623258)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.964235913992*x[0]**o + (-0.0995503514781)*x[0] + (0.324806963612)*x[1]**o + (-0.0825208021896)*x[1]
+        ref[(1, 0, 3, 1)]=0.964235913992*x_ref[0]**o + (-0.0995503514781)*x_ref[0] + (0.324806963612)*x_ref[1]**o + (-0.0825208021896)*x_ref[1]
+        arg[(1, 0, 3, 2)]=-0.204637489992*x[0]**o + (-0.0105922733831)*x[0] + (0.474620097728)*x[1]**o + (-0.143836660909)*x[1]
+        ref[(1, 0, 3, 2)]=-0.204637489992*x_ref[0]**o + (-0.0105922733831)*x_ref[0] + (0.474620097728)*x_ref[1]**o + (-0.143836660909)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.991684602618*x[0]**o + (0.786524554349)*x[0] + (0.772748888689)*x[1]**o + (-0.936514626078)*x[1]
+        ref[(1, 1, 0, 0)]=-0.991684602618*x_ref[0]**o + (0.786524554349)*x_ref[0] + (0.772748888689)*x_ref[1]**o + (-0.936514626078)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.167362218457*x[0]**o + (-0.458653919295)*x[0] + (-0.374691077235)*x[1]**o + (-0.365562342267)*x[1]
+        ref[(1, 1, 0, 1)]=-0.167362218457*x_ref[0]**o + (-0.458653919295)*x_ref[0] + (-0.374691077235)*x_ref[1]**o + (-0.365562342267)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.172678385071*x[0]**o + (0.713350579976)*x[0] + (-0.597320891228)*x[1]**o + (-0.833927251096)*x[1]
+        ref[(1, 1, 0, 2)]=0.172678385071*x_ref[0]**o + (0.713350579976)*x_ref[0] + (-0.597320891228)*x_ref[1]**o + (-0.833927251096)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.491557397139*x[0]**o + (-0.0565606994903)*x[0] + (0.371087646127)*x[1]**o + (0.890328437273)*x[1]
+        ref[(1, 1, 1, 0)]=-0.491557397139*x_ref[0]**o + (-0.0565606994903)*x_ref[0] + (0.371087646127)*x_ref[1]**o + (0.890328437273)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.932220285322*x[0]**o + (0.860499428304)*x[0] + (0.202393791843)*x[1]**o + (-0.552200278956)*x[1]
+        ref[(1, 1, 1, 1)]=-0.932220285322*x_ref[0]**o + (0.860499428304)*x_ref[0] + (0.202393791843)*x_ref[1]**o + (-0.552200278956)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.742429657478*x[0]**o + (-0.98789153741)*x[0] + (-0.233671059077)*x[1]**o + (-0.71035026172)*x[1]
+        ref[(1, 1, 1, 2)]=0.742429657478*x_ref[0]**o + (-0.98789153741)*x_ref[0] + (-0.233671059077)*x_ref[1]**o + (-0.71035026172)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.475332150789*x[0]**o + (-0.965261230384)*x[0] + (0.697903743047)*x[1]**o + (0.540020478303)*x[1]
+        ref[(1, 1, 2, 0)]=0.475332150789*x_ref[0]**o + (-0.965261230384)*x_ref[0] + (0.697903743047)*x_ref[1]**o + (0.540020478303)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.820775341215*x[0]**o + (0.782615968996)*x[0] + (0.467595073106)*x[1]**o + (0.632091941623)*x[1]
+        ref[(1, 1, 2, 1)]=-0.820775341215*x_ref[0]**o + (0.782615968996)*x_ref[0] + (0.467595073106)*x_ref[1]**o + (0.632091941623)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.690088590542*x[0]**o + (0.749874160036)*x[0] + (-0.751345275145)*x[1]**o + (0.663115652138)*x[1]
+        ref[(1, 1, 2, 2)]=0.690088590542*x_ref[0]**o + (0.749874160036)*x_ref[0] + (-0.751345275145)*x_ref[1]**o + (0.663115652138)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.527541202635*x[0]**o + (-0.0253793231699)*x[0] + (0.971870916959)*x[1]**o + (0.619535575209)*x[1]
+        ref[(1, 1, 3, 0)]=0.527541202635*x_ref[0]**o + (-0.0253793231699)*x_ref[0] + (0.971870916959)*x_ref[1]**o + (0.619535575209)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.660737980535*x[0]**o + (0.120046570747)*x[0] + (-0.708116080321)*x[1]**o + (-0.237423283653)*x[1]
+        ref[(1, 1, 3, 1)]=-0.660737980535*x_ref[0]**o + (0.120046570747)*x_ref[0] + (-0.708116080321)*x_ref[1]**o + (-0.237423283653)*x_ref[1]
+        arg[(1, 1, 3, 2)]=0.0133879265733*x[0]**o + (0.291066368888)*x[0] + (0.0869922606816)*x[1]**o + (0.328914029297)*x[1]
+        ref[(1, 1, 3, 2)]=0.0133879265733*x_ref[0]**o + (0.291066368888)*x_ref[0] + (0.0869922606816)*x_ref[1]**o + (0.328914029297)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.0780555275597*x[0]**o + (0.0194239237525)*x[0] + (-0.511213493472)*x[1]**o + (0.829662298698)*x[1]
+        ref[(1, 2, 0, 0)]=-0.0780555275597*x_ref[0]**o + (0.0194239237525)*x_ref[0] + (-0.511213493472)*x_ref[1]**o + (0.829662298698)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.93193707322*x[0]**o + (0.726428305325)*x[0] + (0.843933822042)*x[1]**o + (-0.701760209399)*x[1]
+        ref[(1, 2, 0, 1)]=-0.93193707322*x_ref[0]**o + (0.726428305325)*x_ref[0] + (0.843933822042)*x_ref[1]**o + (-0.701760209399)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.774099778779*x[0]**o + (0.885003779192)*x[0] + (-0.966187244285)*x[1]**o + (-0.235275615866)*x[1]
+        ref[(1, 2, 0, 2)]=-0.774099778779*x_ref[0]**o + (0.885003779192)*x_ref[0] + (-0.966187244285)*x_ref[1]**o + (-0.235275615866)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.194698974221*x[0]**o + (0.763348127148)*x[0] + (0.929738604884)*x[1]**o + (0.446384406368)*x[1]
+        ref[(1, 2, 1, 0)]=0.194698974221*x_ref[0]**o + (0.763348127148)*x_ref[0] + (0.929738604884)*x_ref[1]**o + (0.446384406368)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.0856466593361*x[0]**o + (0.436771462941)*x[0] + (0.548942387023)*x[1]**o + (-0.545563506174)*x[1]
+        ref[(1, 2, 1, 1)]=-0.0856466593361*x_ref[0]**o + (0.436771462941)*x_ref[0] + (0.548942387023)*x_ref[1]**o + (-0.545563506174)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.283212940671*x[0]**o + (-0.0946050727881)*x[0] + (0.0651372779214)*x[1]**o + (0.449584091566)*x[1]
+        ref[(1, 2, 1, 2)]=0.283212940671*x_ref[0]**o + (-0.0946050727881)*x_ref[0] + (0.0651372779214)*x_ref[1]**o + (0.449584091566)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.945911514609*x[0]**o + (-0.20191238905)*x[0] + (-0.111214216439)*x[1]**o + (-0.0586414243638)*x[1]
+        ref[(1, 2, 2, 0)]=0.945911514609*x_ref[0]**o + (-0.20191238905)*x_ref[0] + (-0.111214216439)*x_ref[1]**o + (-0.0586414243638)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.468446667566*x[0]**o + (-0.316283715683)*x[0] + (0.986741723571)*x[1]**o + (-0.683545244481)*x[1]
+        ref[(1, 2, 2, 1)]=0.468446667566*x_ref[0]**o + (-0.316283715683)*x_ref[0] + (0.986741723571)*x_ref[1]**o + (-0.683545244481)*x_ref[1]
+        arg[(1, 2, 2, 2)]=0.59642881577*x[0]**o + (-0.747393453431)*x[0] + (0.531731803038)*x[1]**o + (-0.514742203696)*x[1]
+        ref[(1, 2, 2, 2)]=0.59642881577*x_ref[0]**o + (-0.747393453431)*x_ref[0] + (0.531731803038)*x_ref[1]**o + (-0.514742203696)*x_ref[1]
+        arg[(1, 2, 3, 0)]=-0.939574842507*x[0]**o + (-0.623619491216)*x[0] + (0.610574013505)*x[1]**o + (-0.9747140398)*x[1]
+        ref[(1, 2, 3, 0)]=-0.939574842507*x_ref[0]**o + (-0.623619491216)*x_ref[0] + (0.610574013505)*x_ref[1]**o + (-0.9747140398)*x_ref[1]
+        arg[(1, 2, 3, 1)]=0.426789083677*x[0]**o + (-0.399488980118)*x[0] + (-0.0882342771939)*x[1]**o + (0.700917050006)*x[1]
+        ref[(1, 2, 3, 1)]=0.426789083677*x_ref[0]**o + (-0.399488980118)*x_ref[0] + (-0.0882342771939)*x_ref[1]**o + (0.700917050006)*x_ref[1]
+        arg[(1, 2, 3, 2)]=-0.197109345215*x[0]**o + (-0.124561131837)*x[0] + (-0.311481264349)*x[1]**o + (0.556023164589)*x[1]
+        ref[(1, 2, 3, 2)]=-0.197109345215*x_ref[0]**o + (-0.124561131837)*x_ref[0] + (-0.311481264349)*x_ref[1]**o + (0.556023164589)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.975827694763*x[0]**o + (-0.46811993616)*x[0] + (-0.00590368466763)*x[1]**o + (-0.527836179111)*x[1]
+        ref[(1, 3, 0, 0)]=-0.975827694763*x_ref[0]**o + (-0.46811993616)*x_ref[0] + (-0.00590368466763)*x_ref[1]**o + (-0.527836179111)*x_ref[1]
+        arg[(1, 3, 0, 1)]=0.747030486812*x[0]**o + (-0.016326709255)*x[0] + (-0.0212030735752)*x[1]**o + (0.231326923653)*x[1]
+        ref[(1, 3, 0, 1)]=0.747030486812*x_ref[0]**o + (-0.016326709255)*x_ref[0] + (-0.0212030735752)*x_ref[1]**o + (0.231326923653)*x_ref[1]
+        arg[(1, 3, 0, 2)]=-0.183460143756*x[0]**o + (-0.453425342917)*x[0] + (0.0911161461423)*x[1]**o + (-0.187901543336)*x[1]
+        ref[(1, 3, 0, 2)]=-0.183460143756*x_ref[0]**o + (-0.453425342917)*x_ref[0] + (0.0911161461423)*x_ref[1]**o + (-0.187901543336)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.625976069238*x[0]**o + (0.40103968089)*x[0] + (0.519505632781)*x[1]**o + (0.0831742668175)*x[1]
+        ref[(1, 3, 1, 0)]=-0.625976069238*x_ref[0]**o + (0.40103968089)*x_ref[0] + (0.519505632781)*x_ref[1]**o + (0.0831742668175)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.0185919581885*x[0]**o + (0.177810714075)*x[0] + (0.898880683508)*x[1]**o + (0.181201569597)*x[1]
+        ref[(1, 3, 1, 1)]=0.0185919581885*x_ref[0]**o + (0.177810714075)*x_ref[0] + (0.898880683508)*x_ref[1]**o + (0.181201569597)*x_ref[1]
+        arg[(1, 3, 1, 2)]=-0.881200621574*x[0]**o + (0.440696639121)*x[0] + (0.713169149475)*x[1]**o + (0.099936953498)*x[1]
+        ref[(1, 3, 1, 2)]=-0.881200621574*x_ref[0]**o + (0.440696639121)*x_ref[0] + (0.713169149475)*x_ref[1]**o + (0.099936953498)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.569681736096*x[0]**o + (-0.423915555315)*x[0] + (0.215661393289)*x[1]**o + (0.894700068448)*x[1]
+        ref[(1, 3, 2, 0)]=0.569681736096*x_ref[0]**o + (-0.423915555315)*x_ref[0] + (0.215661393289)*x_ref[1]**o + (0.894700068448)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.0996510445825*x[0]**o + (0.572043119293)*x[0] + (-0.691704127713)*x[1]**o + (-0.622081919569)*x[1]
+        ref[(1, 3, 2, 1)]=0.0996510445825*x_ref[0]**o + (0.572043119293)*x_ref[0] + (-0.691704127713)*x_ref[1]**o + (-0.622081919569)*x_ref[1]
+        arg[(1, 3, 2, 2)]=-0.59409346709*x[0]**o + (0.409002748222)*x[0] + (-0.336758575702)*x[1]**o + (0.108070819568)*x[1]
+        ref[(1, 3, 2, 2)]=-0.59409346709*x_ref[0]**o + (0.409002748222)*x_ref[0] + (-0.336758575702)*x_ref[1]**o + (0.108070819568)*x_ref[1]
+        arg[(1, 3, 3, 0)]=-0.0258147827363*x[0]**o + (-0.965970206424)*x[0] + (-0.230820403227)*x[1]**o + (0.267349247932)*x[1]
+        ref[(1, 3, 3, 0)]=-0.0258147827363*x_ref[0]**o + (-0.965970206424)*x_ref[0] + (-0.230820403227)*x_ref[1]**o + (0.267349247932)*x_ref[1]
+        arg[(1, 3, 3, 1)]=-0.276487419361*x[0]**o + (0.515765915774)*x[0] + (-0.781761725167)*x[1]**o + (-0.400773751208)*x[1]
+        ref[(1, 3, 3, 1)]=-0.276487419361*x_ref[0]**o + (0.515765915774)*x_ref[0] + (-0.781761725167)*x_ref[1]**o + (-0.400773751208)*x_ref[1]
+        arg[(1, 3, 3, 2)]=-0.647508918673*x[0]**o + (-0.0603463911434)*x[0] + (0.813178515675)*x[1]**o + (0.941779585674)*x[1]
+        ref[(1, 3, 3, 2)]=-0.647508918673*x_ref[0]**o + (-0.0603463911434)*x_ref[0] + (0.813178515675)*x_ref[1]**o + (0.941779585674)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.270368953493*x[0]**o + (-0.757387913498)*x[0] + (0.35360048127)*x[1]**o + (0.28389895418)*x[1]
+        ref[(2, 0, 0, 0)]=-0.270368953493*x_ref[0]**o + (-0.757387913498)*x_ref[0] + (0.35360048127)*x_ref[1]**o + (0.28389895418)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.186384821061*x[0]**o + (0.668516533598)*x[0] + (0.0560544453099)*x[1]**o + (-0.820898412582)*x[1]
+        ref[(2, 0, 0, 1)]=0.186384821061*x_ref[0]**o + (0.668516533598)*x_ref[0] + (0.0560544453099)*x_ref[1]**o + (-0.820898412582)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.54100920355*x[0]**o + (0.656679857028)*x[0] + (-0.0488459549067)*x[1]**o + (-0.64499127413)*x[1]
+        ref[(2, 0, 0, 2)]=-0.54100920355*x_ref[0]**o + (0.656679857028)*x_ref[0] + (-0.0488459549067)*x_ref[1]**o + (-0.64499127413)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.618137852408*x[0]**o + (-0.70573293311)*x[0] + (-0.682140065394)*x[1]**o + (-0.882425461912)*x[1]
+        ref[(2, 0, 1, 0)]=-0.618137852408*x_ref[0]**o + (-0.70573293311)*x_ref[0] + (-0.682140065394)*x_ref[1]**o + (-0.882425461912)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.667574902407*x[0]**o + (0.205303916988)*x[0] + (-0.036453015286)*x[1]**o + (0.323145350415)*x[1]
+        ref[(2, 0, 1, 1)]=-0.667574902407*x_ref[0]**o + (0.205303916988)*x_ref[0] + (-0.036453015286)*x_ref[1]**o + (0.323145350415)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.814571840779*x[0]**o + (-0.362179157711)*x[0] + (0.567584397656)*x[1]**o + (-0.814840602003)*x[1]
+        ref[(2, 0, 1, 2)]=0.814571840779*x_ref[0]**o + (-0.362179157711)*x_ref[0] + (0.567584397656)*x_ref[1]**o + (-0.814840602003)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.124885111222*x[0]**o + (-0.232273673189)*x[0] + (-0.378226728036)*x[1]**o + (-0.530097701087)*x[1]
+        ref[(2, 0, 2, 0)]=0.124885111222*x_ref[0]**o + (-0.232273673189)*x_ref[0] + (-0.378226728036)*x_ref[1]**o + (-0.530097701087)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.220803162737*x[0]**o + (0.163319254578)*x[0] + (0.542312284072)*x[1]**o + (0.304242140372)*x[1]
+        ref[(2, 0, 2, 1)]=-0.220803162737*x_ref[0]**o + (0.163319254578)*x_ref[0] + (0.542312284072)*x_ref[1]**o + (0.304242140372)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.979386663246*x[0]**o + (0.315605548362)*x[0] + (-0.92638269137)*x[1]**o + (-0.254159102419)*x[1]
+        ref[(2, 0, 2, 2)]=0.979386663246*x_ref[0]**o + (0.315605548362)*x_ref[0] + (-0.92638269137)*x_ref[1]**o + (-0.254159102419)*x_ref[1]
+        arg[(2, 0, 3, 0)]=0.0383279847839*x[0]**o + (-0.433944586226)*x[0] + (-0.988494936586)*x[1]**o + (-0.938484627993)*x[1]
+        ref[(2, 0, 3, 0)]=0.0383279847839*x_ref[0]**o + (-0.433944586226)*x_ref[0] + (-0.988494936586)*x_ref[1]**o + (-0.938484627993)*x_ref[1]
+        arg[(2, 0, 3, 1)]=0.737590936326*x[0]**o + (-0.80657918378)*x[0] + (0.817453841755)*x[1]**o + (-0.476239586406)*x[1]
+        ref[(2, 0, 3, 1)]=0.737590936326*x_ref[0]**o + (-0.80657918378)*x_ref[0] + (0.817453841755)*x_ref[1]**o + (-0.476239586406)*x_ref[1]
+        arg[(2, 0, 3, 2)]=-0.694558342041*x[0]**o + (0.782959201293)*x[0] + (-0.150278691622)*x[1]**o + (-0.610727983388)*x[1]
+        ref[(2, 0, 3, 2)]=-0.694558342041*x_ref[0]**o + (0.782959201293)*x_ref[0] + (-0.150278691622)*x_ref[1]**o + (-0.610727983388)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.419422881579*x[0]**o + (-0.393154467986)*x[0] + (0.295432710123)*x[1]**o + (-0.684149005309)*x[1]
+        ref[(2, 1, 0, 0)]=0.419422881579*x_ref[0]**o + (-0.393154467986)*x_ref[0] + (0.295432710123)*x_ref[1]**o + (-0.684149005309)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.524533869044*x[0]**o + (0.427418442341)*x[0] + (-0.733566404431)*x[1]**o + (0.170370743774)*x[1]
+        ref[(2, 1, 0, 1)]=0.524533869044*x_ref[0]**o + (0.427418442341)*x_ref[0] + (-0.733566404431)*x_ref[1]**o + (0.170370743774)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.853899724209*x[0]**o + (-0.466925327599)*x[0] + (0.244368136258)*x[1]**o + (0.471821254726)*x[1]
+        ref[(2, 1, 0, 2)]=-0.853899724209*x_ref[0]**o + (-0.466925327599)*x_ref[0] + (0.244368136258)*x_ref[1]**o + (0.471821254726)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.813826554797*x[0]**o + (-0.664778214853)*x[0] + (0.0663679432942)*x[1]**o + (0.154936189024)*x[1]
+        ref[(2, 1, 1, 0)]=0.813826554797*x_ref[0]**o + (-0.664778214853)*x_ref[0] + (0.0663679432942)*x_ref[1]**o + (0.154936189024)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.457115540513*x[0]**o + (0.704208325545)*x[0] + (0.899760011753)*x[1]**o + (-0.781560119999)*x[1]
+        ref[(2, 1, 1, 1)]=-0.457115540513*x_ref[0]**o + (0.704208325545)*x_ref[0] + (0.899760011753)*x_ref[1]**o + (-0.781560119999)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.169600158929*x[0]**o + (0.159052572458)*x[0] + (0.367527689846)*x[1]**o + (-0.150921226701)*x[1]
+        ref[(2, 1, 1, 2)]=0.169600158929*x_ref[0]**o + (0.159052572458)*x_ref[0] + (0.367527689846)*x_ref[1]**o + (-0.150921226701)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.142752185539*x[0]**o + (0.250500213954)*x[0] + (-0.17296098153)*x[1]**o + (0.821508006283)*x[1]
+        ref[(2, 1, 2, 0)]=0.142752185539*x_ref[0]**o + (0.250500213954)*x_ref[0] + (-0.17296098153)*x_ref[1]**o + (0.821508006283)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.61223097406*x[0]**o + (-0.777632882872)*x[0] + (0.0176404338618)*x[1]**o + (0.893898573773)*x[1]
+        ref[(2, 1, 2, 1)]=-0.61223097406*x_ref[0]**o + (-0.777632882872)*x_ref[0] + (0.0176404338618)*x_ref[1]**o + (0.893898573773)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.0376833641448*x[0]**o + (-0.632634649218)*x[0] + (0.077336031485)*x[1]**o + (-0.687119376063)*x[1]
+        ref[(2, 1, 2, 2)]=-0.0376833641448*x_ref[0]**o + (-0.632634649218)*x_ref[0] + (0.077336031485)*x_ref[1]**o + (-0.687119376063)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.592118956243*x[0]**o + (-0.836540246711)*x[0] + (-0.0681651273959)*x[1]**o + (-0.702284293057)*x[1]
+        ref[(2, 1, 3, 0)]=0.592118956243*x_ref[0]**o + (-0.836540246711)*x_ref[0] + (-0.0681651273959)*x_ref[1]**o + (-0.702284293057)*x_ref[1]
+        arg[(2, 1, 3, 1)]=0.195387360335*x[0]**o + (-0.853367714533)*x[0] + (0.143426469632)*x[1]**o + (-0.411262746184)*x[1]
+        ref[(2, 1, 3, 1)]=0.195387360335*x_ref[0]**o + (-0.853367714533)*x_ref[0] + (0.143426469632)*x_ref[1]**o + (-0.411262746184)*x_ref[1]
+        arg[(2, 1, 3, 2)]=-0.550529978587*x[0]**o + (0.582384471511)*x[0] + (0.527493447629)*x[1]**o + (-0.141465926482)*x[1]
+        ref[(2, 1, 3, 2)]=-0.550529978587*x_ref[0]**o + (0.582384471511)*x_ref[0] + (0.527493447629)*x_ref[1]**o + (-0.141465926482)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.663891923041*x[0]**o + (0.913430345024)*x[0] + (-0.781464334193)*x[1]**o + (-0.389814083509)*x[1]
+        ref[(2, 2, 0, 0)]=-0.663891923041*x_ref[0]**o + (0.913430345024)*x_ref[0] + (-0.781464334193)*x_ref[1]**o + (-0.389814083509)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.0284772052077*x[0]**o + (-0.199846288619)*x[0] + (0.385998377106)*x[1]**o + (0.398443185322)*x[1]
+        ref[(2, 2, 0, 1)]=0.0284772052077*x_ref[0]**o + (-0.199846288619)*x_ref[0] + (0.385998377106)*x_ref[1]**o + (0.398443185322)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.559125579177*x[0]**o + (-0.697489899886)*x[0] + (-0.981507983714)*x[1]**o + (0.140875364381)*x[1]
+        ref[(2, 2, 0, 2)]=-0.559125579177*x_ref[0]**o + (-0.697489899886)*x_ref[0] + (-0.981507983714)*x_ref[1]**o + (0.140875364381)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.00510899401498*x[0]**o + (0.5965137185)*x[0] + (-0.582985079761)*x[1]**o + (0.862138272458)*x[1]
+        ref[(2, 2, 1, 0)]=-0.00510899401498*x_ref[0]**o + (0.5965137185)*x_ref[0] + (-0.582985079761)*x_ref[1]**o + (0.862138272458)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.465714637685*x[0]**o + (-0.626930645185)*x[0] + (-0.794055148827)*x[1]**o + (0.590439575941)*x[1]
+        ref[(2, 2, 1, 1)]=0.465714637685*x_ref[0]**o + (-0.626930645185)*x_ref[0] + (-0.794055148827)*x_ref[1]**o + (0.590439575941)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.684097914089*x[0]**o + (-0.00718417429673)*x[0] + (0.132085262069)*x[1]**o + (0.712234627722)*x[1]
+        ref[(2, 2, 1, 2)]=-0.684097914089*x_ref[0]**o + (-0.00718417429673)*x_ref[0] + (0.132085262069)*x_ref[1]**o + (0.712234627722)*x_ref[1]
+        arg[(2, 2, 2, 0)]=0.362868416907*x[0]**o + (0.418124471552)*x[0] + (-0.0552209339749)*x[1]**o + (0.983178941246)*x[1]
+        ref[(2, 2, 2, 0)]=0.362868416907*x_ref[0]**o + (0.418124471552)*x_ref[0] + (-0.0552209339749)*x_ref[1]**o + (0.983178941246)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.606284715237*x[0]**o + (-0.0337127230715)*x[0] + (0.542582547259)*x[1]**o + (0.327755062078)*x[1]
+        ref[(2, 2, 2, 1)]=0.606284715237*x_ref[0]**o + (-0.0337127230715)*x_ref[0] + (0.542582547259)*x_ref[1]**o + (0.327755062078)*x_ref[1]
+        arg[(2, 2, 2, 2)]=-0.706693304473*x[0]**o + (0.159517567472)*x[0] + (0.122814101925)*x[1]**o + (0.863204769167)*x[1]
+        ref[(2, 2, 2, 2)]=-0.706693304473*x_ref[0]**o + (0.159517567472)*x_ref[0] + (0.122814101925)*x_ref[1]**o + (0.863204769167)*x_ref[1]
+        arg[(2, 2, 3, 0)]=0.589231690402*x[0]**o + (0.198366514053)*x[0] + (0.878637451426)*x[1]**o + (-0.924149064978)*x[1]
+        ref[(2, 2, 3, 0)]=0.589231690402*x_ref[0]**o + (0.198366514053)*x_ref[0] + (0.878637451426)*x_ref[1]**o + (-0.924149064978)*x_ref[1]
+        arg[(2, 2, 3, 1)]=-0.336504800074*x[0]**o + (0.904880229277)*x[0] + (-0.778062036477)*x[1]**o + (-0.20450194722)*x[1]
+        ref[(2, 2, 3, 1)]=-0.336504800074*x_ref[0]**o + (0.904880229277)*x_ref[0] + (-0.778062036477)*x_ref[1]**o + (-0.20450194722)*x_ref[1]
+        arg[(2, 2, 3, 2)]=-0.327199080222*x[0]**o + (0.738748229187)*x[0] + (0.775179876223)*x[1]**o + (0.633198198126)*x[1]
+        ref[(2, 2, 3, 2)]=-0.327199080222*x_ref[0]**o + (0.738748229187)*x_ref[0] + (0.775179876223)*x_ref[1]**o + (0.633198198126)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.814411559239*x[0]**o + (0.406519794522)*x[0] + (0.180150745081)*x[1]**o + (0.394440732212)*x[1]
+        ref[(2, 3, 0, 0)]=0.814411559239*x_ref[0]**o + (0.406519794522)*x_ref[0] + (0.180150745081)*x_ref[1]**o + (0.394440732212)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.00550704643968*x[0]**o + (-0.502368625174)*x[0] + (-0.12379909999)*x[1]**o + (0.975720466575)*x[1]
+        ref[(2, 3, 0, 1)]=0.00550704643968*x_ref[0]**o + (-0.502368625174)*x_ref[0] + (-0.12379909999)*x_ref[1]**o + (0.975720466575)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.975278533666*x[0]**o + (-0.271932745315)*x[0] + (-0.277675251825)*x[1]**o + (0.583300688917)*x[1]
+        ref[(2, 3, 0, 2)]=0.975278533666*x_ref[0]**o + (-0.271932745315)*x_ref[0] + (-0.277675251825)*x_ref[1]**o + (0.583300688917)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.54437998379*x[0]**o + (0.699602844174)*x[0] + (0.612505004526)*x[1]**o + (-0.78144164073)*x[1]
+        ref[(2, 3, 1, 0)]=0.54437998379*x_ref[0]**o + (0.699602844174)*x_ref[0] + (0.612505004526)*x_ref[1]**o + (-0.78144164073)*x_ref[1]
+        arg[(2, 3, 1, 1)]=0.0285844133455*x[0]**o + (0.250156134567)*x[0] + (-0.660384349151)*x[1]**o + (0.837384816516)*x[1]
+        ref[(2, 3, 1, 1)]=0.0285844133455*x_ref[0]**o + (0.250156134567)*x_ref[0] + (-0.660384349151)*x_ref[1]**o + (0.837384816516)*x_ref[1]
+        arg[(2, 3, 1, 2)]=-0.288107515106*x[0]**o + (0.503995173389)*x[0] + (-0.737575505935)*x[1]**o + (0.0899917019845)*x[1]
+        ref[(2, 3, 1, 2)]=-0.288107515106*x_ref[0]**o + (0.503995173389)*x_ref[0] + (-0.737575505935)*x_ref[1]**o + (0.0899917019845)*x_ref[1]
+        arg[(2, 3, 2, 0)]=-0.301854634295*x[0]**o + (-0.443284701832)*x[0] + (0.532609925768)*x[1]**o + (0.622211130827)*x[1]
+        ref[(2, 3, 2, 0)]=-0.301854634295*x_ref[0]**o + (-0.443284701832)*x_ref[0] + (0.532609925768)*x_ref[1]**o + (0.622211130827)*x_ref[1]
+        arg[(2, 3, 2, 1)]=-0.794469076388*x[0]**o + (0.966822465138)*x[0] + (0.11543081698)*x[1]**o + (0.382393483178)*x[1]
+        ref[(2, 3, 2, 1)]=-0.794469076388*x_ref[0]**o + (0.966822465138)*x_ref[0] + (0.11543081698)*x_ref[1]**o + (0.382393483178)*x_ref[1]
+        arg[(2, 3, 2, 2)]=0.54461386474*x[0]**o + (-0.821067236268)*x[0] + (0.731887681335)*x[1]**o + (0.392637034713)*x[1]
+        ref[(2, 3, 2, 2)]=0.54461386474*x_ref[0]**o + (-0.821067236268)*x_ref[0] + (0.731887681335)*x_ref[1]**o + (0.392637034713)*x_ref[1]
+        arg[(2, 3, 3, 0)]=-0.931763745383*x[0]**o + (-0.750638674004)*x[0] + (-0.454597739697)*x[1]**o + (-0.0637240519234)*x[1]
+        ref[(2, 3, 3, 0)]=-0.931763745383*x_ref[0]**o + (-0.750638674004)*x_ref[0] + (-0.454597739697)*x_ref[1]**o + (-0.0637240519234)*x_ref[1]
+        arg[(2, 3, 3, 1)]=0.34733492502*x[0]**o + (0.0631673477611)*x[0] + (-0.0236355276963)*x[1]**o + (-0.485587812912)*x[1]
+        ref[(2, 3, 3, 1)]=0.34733492502*x_ref[0]**o + (0.0631673477611)*x_ref[0] + (-0.0236355276963)*x_ref[1]**o + (-0.485587812912)*x_ref[1]
+        arg[(2, 3, 3, 2)]=0.726764797005*x[0]**o + (0.4680703276)*x[0] + (-0.605914705538)*x[1]**o + (0.91970788768)*x[1]
+        ref[(2, 3, 3, 2)]=0.726764797005*x_ref[0]**o + (0.4680703276)*x_ref[0] + (-0.605914705538)*x_ref[1]**o + (0.91970788768)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.165769317492*x[2]**o + (-0.612469609662)*x[2]
+            ref[(0, 0, 0, 0)]+=0.165769317492*x_ref[2]**o + (-0.612469609662)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.582876128003*x[2]**o + (-0.0999164565086)*x[2]
+            ref[(0, 0, 0, 1)]+=0.582876128003*x_ref[2]**o + (-0.0999164565086)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.532518144005*x[2]**o + (0.269522248239)*x[2]
+            ref[(0, 0, 0, 2)]+=0.532518144005*x_ref[2]**o + (0.269522248239)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.0365531323659*x[2]**o + (0.810327756972)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.0365531323659*x_ref[2]**o + (0.810327756972)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.125806014656*x[2]**o + (0.645021841014)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.125806014656*x_ref[2]**o + (0.645021841014)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.793136972324*x[2]**o + (0.849629714575)*x[2]
+            ref[(0, 0, 1, 2)]+=0.793136972324*x_ref[2]**o + (0.849629714575)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.557175512882*x[2]**o + (-0.269788424271)*x[2]
+            ref[(0, 0, 2, 0)]+=0.557175512882*x_ref[2]**o + (-0.269788424271)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.828524772828*x[2]**o + (-0.0706689546543)*x[2]
+            ref[(0, 0, 2, 1)]+=0.828524772828*x_ref[2]**o + (-0.0706689546543)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.188033930044*x[2]**o + (0.903268502855)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.188033930044*x_ref[2]**o + (0.903268502855)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.293490395917*x[2]**o + (0.0679030506152)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.293490395917*x_ref[2]**o + (0.0679030506152)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=-0.884620028277*x[2]**o + (-0.73017644776)*x[2]
+            ref[(0, 0, 3, 1)]+=-0.884620028277*x_ref[2]**o + (-0.73017644776)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=-0.972093632321*x[2]**o + (-0.988386639223)*x[2]
+            ref[(0, 0, 3, 2)]+=-0.972093632321*x_ref[2]**o + (-0.988386639223)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.271347100765*x[2]**o + (0.736070496681)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.271347100765*x_ref[2]**o + (0.736070496681)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.645149910706*x[2]**o + (0.348370023596)*x[2]
+            ref[(0, 1, 0, 1)]+=0.645149910706*x_ref[2]**o + (0.348370023596)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.431288196826*x[2]**o + (0.544153993892)*x[2]
+            ref[(0, 1, 0, 2)]+=0.431288196826*x_ref[2]**o + (0.544153993892)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.590865503147*x[2]**o + (-0.0332502823578)*x[2]
+            ref[(0, 1, 1, 0)]+=0.590865503147*x_ref[2]**o + (-0.0332502823578)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.451669896514*x[2]**o + (0.061825507548)*x[2]
+            ref[(0, 1, 1, 1)]+=0.451669896514*x_ref[2]**o + (0.061825507548)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.224875711024*x[2]**o + (-0.484464045598)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.224875711024*x_ref[2]**o + (-0.484464045598)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.192952016497*x[2]**o + (-0.218022592246)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.192952016497*x_ref[2]**o + (-0.218022592246)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.498727855992*x[2]**o + (0.24561629501)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.498727855992*x_ref[2]**o + (0.24561629501)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.497078564085*x[2]**o + (0.500486692521)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.497078564085*x_ref[2]**o + (0.500486692521)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.245123227423*x[2]**o + (0.0427952937211)*x[2]
+            ref[(0, 1, 3, 0)]+=-0.245123227423*x_ref[2]**o + (0.0427952937211)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.631231703699*x[2]**o + (-0.477252173024)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.631231703699*x_ref[2]**o + (-0.477252173024)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.832380333058*x[2]**o + (0.502844309966)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.832380333058*x_ref[2]**o + (0.502844309966)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.41672739939*x[2]**o + (-0.374105036318)*x[2]
+            ref[(0, 2, 0, 0)]+=0.41672739939*x_ref[2]**o + (-0.374105036318)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.135338446298*x[2]**o + (0.766812578149)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.135338446298*x_ref[2]**o + (0.766812578149)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.138932261788*x[2]**o + (-0.376066387968)*x[2]
+            ref[(0, 2, 0, 2)]+=0.138932261788*x_ref[2]**o + (-0.376066387968)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.480525964143*x[2]**o + (0.40832425372)*x[2]
+            ref[(0, 2, 1, 0)]+=0.480525964143*x_ref[2]**o + (0.40832425372)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.186890501277*x[2]**o + (-0.0541722956317)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.186890501277*x_ref[2]**o + (-0.0541722956317)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.643327771336*x[2]**o + (-0.162391029359)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.643327771336*x_ref[2]**o + (-0.162391029359)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.0664260297009*x[2]**o + (0.866396272185)*x[2]
+            ref[(0, 2, 2, 0)]+=0.0664260297009*x_ref[2]**o + (0.866396272185)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.321641783803*x[2]**o + (-0.943067052309)*x[2]
+            ref[(0, 2, 2, 1)]+=0.321641783803*x_ref[2]**o + (-0.943067052309)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=-0.760492094433*x[2]**o + (-0.996794024277)*x[2]
+            ref[(0, 2, 2, 2)]+=-0.760492094433*x_ref[2]**o + (-0.996794024277)*x_ref[2]
+            arg[(0, 2, 3, 0)]+=0.602010225932*x[2]**o + (-0.808476825829)*x[2]
+            ref[(0, 2, 3, 0)]+=0.602010225932*x_ref[2]**o + (-0.808476825829)*x_ref[2]
+            arg[(0, 2, 3, 1)]+=-0.196673504572*x[2]**o + (0.785571820284)*x[2]
+            ref[(0, 2, 3, 1)]+=-0.196673504572*x_ref[2]**o + (0.785571820284)*x_ref[2]
+            arg[(0, 2, 3, 2)]+=0.545983754882*x[2]**o + (0.85462142039)*x[2]
+            ref[(0, 2, 3, 2)]+=0.545983754882*x_ref[2]**o + (0.85462142039)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.651722340173*x[2]**o + (0.209758147045)*x[2]
+            ref[(0, 3, 0, 0)]+=-0.651722340173*x_ref[2]**o + (0.209758147045)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=-0.915562249666*x[2]**o + (0.233979292888)*x[2]
+            ref[(0, 3, 0, 1)]+=-0.915562249666*x_ref[2]**o + (0.233979292888)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=0.741401303106*x[2]**o + (-0.950308449413)*x[2]
+            ref[(0, 3, 0, 2)]+=0.741401303106*x_ref[2]**o + (-0.950308449413)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.458829412729*x[2]**o + (0.748579769979)*x[2]
+            ref[(0, 3, 1, 0)]+=0.458829412729*x_ref[2]**o + (0.748579769979)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=-0.918691804433*x[2]**o + (0.595024147224)*x[2]
+            ref[(0, 3, 1, 1)]+=-0.918691804433*x_ref[2]**o + (0.595024147224)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.948000049251*x[2]**o + (-0.402587449999)*x[2]
+            ref[(0, 3, 1, 2)]+=0.948000049251*x_ref[2]**o + (-0.402587449999)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.250816551003*x[2]**o + (0.677169839343)*x[2]
+            ref[(0, 3, 2, 0)]+=-0.250816551003*x_ref[2]**o + (0.677169839343)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.955250936931*x[2]**o + (0.100107446961)*x[2]
+            ref[(0, 3, 2, 1)]+=-0.955250936931*x_ref[2]**o + (0.100107446961)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.696625588448*x[2]**o + (-0.8608745)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.696625588448*x_ref[2]**o + (-0.8608745)*x_ref[2]
+            arg[(0, 3, 3, 0)]+=-0.374334337357*x[2]**o + (0.241738297388)*x[2]
+            ref[(0, 3, 3, 0)]+=-0.374334337357*x_ref[2]**o + (0.241738297388)*x_ref[2]
+            arg[(0, 3, 3, 1)]+=0.995189779752*x[2]**o + (-0.253423583369)*x[2]
+            ref[(0, 3, 3, 1)]+=0.995189779752*x_ref[2]**o + (-0.253423583369)*x_ref[2]
+            arg[(0, 3, 3, 2)]+=-0.46260614004*x[2]**o + (-0.371438681971)*x[2]
+            ref[(0, 3, 3, 2)]+=-0.46260614004*x_ref[2]**o + (-0.371438681971)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.517080839899*x[2]**o + (0.425848209568)*x[2]
+            ref[(1, 0, 0, 0)]+=0.517080839899*x_ref[2]**o + (0.425848209568)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.825311851536*x[2]**o + (-0.350632351039)*x[2]
+            ref[(1, 0, 0, 1)]+=0.825311851536*x_ref[2]**o + (-0.350632351039)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.0709584497837*x[2]**o + (0.77545155007)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.0709584497837*x_ref[2]**o + (0.77545155007)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.759387064356*x[2]**o + (-0.8878153752)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.759387064356*x_ref[2]**o + (-0.8878153752)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.665354185966*x[2]**o + (0.276663840139)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.665354185966*x_ref[2]**o + (0.276663840139)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.667525222724*x[2]**o + (0.510771932286)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.667525222724*x_ref[2]**o + (0.510771932286)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.630198507058*x[2]**o + (0.319576668863)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.630198507058*x_ref[2]**o + (0.319576668863)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.847596309197*x[2]**o + (0.69119535517)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.847596309197*x_ref[2]**o + (0.69119535517)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.732157967413*x[2]**o + (-0.171233349341)*x[2]
+            ref[(1, 0, 2, 2)]+=0.732157967413*x_ref[2]**o + (-0.171233349341)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.917527722858*x[2]**o + (-0.287265857876)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.917527722858*x_ref[2]**o + (-0.287265857876)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.723484119842*x[2]**o + (-0.316256421629)*x[2]
+            ref[(1, 0, 3, 1)]+=0.723484119842*x_ref[2]**o + (-0.316256421629)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=-0.826147469192*x[2]**o + (0.865127112114)*x[2]
+            ref[(1, 0, 3, 2)]+=-0.826147469192*x_ref[2]**o + (0.865127112114)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.485443539475*x[2]**o + (0.882757099119)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.485443539475*x_ref[2]**o + (0.882757099119)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.285805016105*x[2]**o + (0.993247024179)*x[2]
+            ref[(1, 1, 0, 1)]+=0.285805016105*x_ref[2]**o + (0.993247024179)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.852839632119*x[2]**o + (0.0401003699161)*x[2]
+            ref[(1, 1, 0, 2)]+=0.852839632119*x_ref[2]**o + (0.0401003699161)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.315678883658*x[2]**o + (0.618074156762)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.315678883658*x_ref[2]**o + (0.618074156762)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.23641600881*x[2]**o + (-0.281631276295)*x[2]
+            ref[(1, 1, 1, 1)]+=0.23641600881*x_ref[2]**o + (-0.281631276295)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.340877836204*x[2]**o + (-0.31257706541)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.340877836204*x_ref[2]**o + (-0.31257706541)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.599887629316*x[2]**o + (-0.196422474798)*x[2]
+            ref[(1, 1, 2, 0)]+=0.599887629316*x_ref[2]**o + (-0.196422474798)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.241877697347*x[2]**o + (0.514689488511)*x[2]
+            ref[(1, 1, 2, 1)]+=0.241877697347*x_ref[2]**o + (0.514689488511)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.819943250959*x[2]**o + (-0.220260535714)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.819943250959*x_ref[2]**o + (-0.220260535714)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=0.358312945828*x[2]**o + (0.535625202256)*x[2]
+            ref[(1, 1, 3, 0)]+=0.358312945828*x_ref[2]**o + (0.535625202256)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.268898601607*x[2]**o + (0.459312941563)*x[2]
+            ref[(1, 1, 3, 1)]+=0.268898601607*x_ref[2]**o + (0.459312941563)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=-0.733568592885*x[2]**o + (0.489619368381)*x[2]
+            ref[(1, 1, 3, 2)]+=-0.733568592885*x_ref[2]**o + (0.489619368381)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.70657468172*x[2]**o + (-0.430250893686)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.70657468172*x_ref[2]**o + (-0.430250893686)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.9041901728*x[2]**o + (-0.419852746356)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.9041901728*x_ref[2]**o + (-0.419852746356)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.638407969793*x[2]**o + (0.274000146392)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.638407969793*x_ref[2]**o + (0.274000146392)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.796525292117*x[2]**o + (-0.538474285215)*x[2]
+            ref[(1, 2, 1, 0)]+=0.796525292117*x_ref[2]**o + (-0.538474285215)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.491566682236*x[2]**o + (0.82183182016)*x[2]
+            ref[(1, 2, 1, 1)]+=-0.491566682236*x_ref[2]**o + (0.82183182016)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.151051196142*x[2]**o + (-0.322966989735)*x[2]
+            ref[(1, 2, 1, 2)]+=0.151051196142*x_ref[2]**o + (-0.322966989735)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.299112471646*x[2]**o + (0.773447499085)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.299112471646*x_ref[2]**o + (0.773447499085)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=0.77785432598*x[2]**o + (-0.724096865501)*x[2]
+            ref[(1, 2, 2, 1)]+=0.77785432598*x_ref[2]**o + (-0.724096865501)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.824509590043*x[2]**o + (0.0111642682684)*x[2]
+            ref[(1, 2, 2, 2)]+=0.824509590043*x_ref[2]**o + (0.0111642682684)*x_ref[2]
+            arg[(1, 2, 3, 0)]+=0.453458790417*x[2]**o + (-0.0141984076507)*x[2]
+            ref[(1, 2, 3, 0)]+=0.453458790417*x_ref[2]**o + (-0.0141984076507)*x_ref[2]
+            arg[(1, 2, 3, 1)]+=-0.756788048921*x[2]**o + (0.423758000324)*x[2]
+            ref[(1, 2, 3, 1)]+=-0.756788048921*x_ref[2]**o + (0.423758000324)*x_ref[2]
+            arg[(1, 2, 3, 2)]+=0.573676001778*x[2]**o + (0.717864303873)*x[2]
+            ref[(1, 2, 3, 2)]+=0.573676001778*x_ref[2]**o + (0.717864303873)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.111515549464*x[2]**o + (-0.658677382349)*x[2]
+            ref[(1, 3, 0, 0)]+=0.111515549464*x_ref[2]**o + (-0.658677382349)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=-0.280037051908*x[2]**o + (-0.542085291369)*x[2]
+            ref[(1, 3, 0, 1)]+=-0.280037051908*x_ref[2]**o + (-0.542085291369)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.135889545472*x[2]**o + (-0.641856495896)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.135889545472*x_ref[2]**o + (-0.641856495896)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=-0.848242976471*x[2]**o + (0.04101870484)*x[2]
+            ref[(1, 3, 1, 0)]+=-0.848242976471*x_ref[2]**o + (0.04101870484)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.54489715566*x[2]**o + (0.121332272527)*x[2]
+            ref[(1, 3, 1, 1)]+=0.54489715566*x_ref[2]**o + (0.121332272527)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.486324744408*x[2]**o + (0.386000110491)*x[2]
+            ref[(1, 3, 1, 2)]+=0.486324744408*x_ref[2]**o + (0.386000110491)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=0.201424288806*x[2]**o + (-0.243780414011)*x[2]
+            ref[(1, 3, 2, 0)]+=0.201424288806*x_ref[2]**o + (-0.243780414011)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.66420809791*x[2]**o + (-0.0495368087754)*x[2]
+            ref[(1, 3, 2, 1)]+=0.66420809791*x_ref[2]**o + (-0.0495368087754)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=-0.427587778193*x[2]**o + (0.244664334745)*x[2]
+            ref[(1, 3, 2, 2)]+=-0.427587778193*x_ref[2]**o + (0.244664334745)*x_ref[2]
+            arg[(1, 3, 3, 0)]+=0.267979913917*x[2]**o + (-0.768475806309)*x[2]
+            ref[(1, 3, 3, 0)]+=0.267979913917*x_ref[2]**o + (-0.768475806309)*x_ref[2]
+            arg[(1, 3, 3, 1)]+=0.0117508775045*x[2]**o + (-0.879384115223)*x[2]
+            ref[(1, 3, 3, 1)]+=0.0117508775045*x_ref[2]**o + (-0.879384115223)*x_ref[2]
+            arg[(1, 3, 3, 2)]+=-0.144431653851*x[2]**o + (0.724040421861)*x[2]
+            ref[(1, 3, 3, 2)]+=-0.144431653851*x_ref[2]**o + (0.724040421861)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.592440353627*x[2]**o + (-0.34874260047)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.592440353627*x_ref[2]**o + (-0.34874260047)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.476052915483*x[2]**o + (0.342716611809)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.476052915483*x_ref[2]**o + (0.342716611809)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.621573445876*x[2]**o + (0.0515993910538)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.621573445876*x_ref[2]**o + (0.0515993910538)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.413229213895*x[2]**o + (0.474632411603)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.413229213895*x_ref[2]**o + (0.474632411603)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.251008649194*x[2]**o + (-0.669919972288)*x[2]
+            ref[(2, 0, 1, 1)]+=0.251008649194*x_ref[2]**o + (-0.669919972288)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.974346242886*x[2]**o + (0.256137657262)*x[2]
+            ref[(2, 0, 1, 2)]+=0.974346242886*x_ref[2]**o + (0.256137657262)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.830208943258*x[2]**o + (0.109522833424)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.830208943258*x_ref[2]**o + (0.109522833424)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.00105714364288*x[2]**o + (-0.0970530858647)*x[2]
+            ref[(2, 0, 2, 1)]+=-0.00105714364288*x_ref[2]**o + (-0.0970530858647)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=0.0632066367766*x[2]**o + (0.559241974483)*x[2]
+            ref[(2, 0, 2, 2)]+=0.0632066367766*x_ref[2]**o + (0.559241974483)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=-0.897169762572*x[2]**o + (-0.558838390526)*x[2]
+            ref[(2, 0, 3, 0)]+=-0.897169762572*x_ref[2]**o + (-0.558838390526)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=0.757359766043*x[2]**o + (0.292922260362)*x[2]
+            ref[(2, 0, 3, 1)]+=0.757359766043*x_ref[2]**o + (0.292922260362)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=0.776622038963*x[2]**o + (-0.262716584665)*x[2]
+            ref[(2, 0, 3, 2)]+=0.776622038963*x_ref[2]**o + (-0.262716584665)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.0237584898376*x[2]**o + (-0.854507564991)*x[2]
+            ref[(2, 1, 0, 0)]+=0.0237584898376*x_ref[2]**o + (-0.854507564991)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.72985621534*x[2]**o + (0.871031205255)*x[2]
+            ref[(2, 1, 0, 1)]+=0.72985621534*x_ref[2]**o + (0.871031205255)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.988724767628*x[2]**o + (0.282929418416)*x[2]
+            ref[(2, 1, 0, 2)]+=0.988724767628*x_ref[2]**o + (0.282929418416)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.671065526354*x[2]**o + (0.450277737746)*x[2]
+            ref[(2, 1, 1, 0)]+=0.671065526354*x_ref[2]**o + (0.450277737746)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.0680328591368*x[2]**o + (-0.920146360189)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.0680328591368*x_ref[2]**o + (-0.920146360189)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.393174223023*x[2]**o + (0.0788857125618)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.393174223023*x_ref[2]**o + (0.0788857125618)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.0436622652595*x[2]**o + (0.00262509485452)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.0436622652595*x_ref[2]**o + (0.00262509485452)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.309009910341*x[2]**o + (0.311375969229)*x[2]
+            ref[(2, 1, 2, 1)]+=0.309009910341*x_ref[2]**o + (0.311375969229)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=-0.851427547085*x[2]**o + (0.748251199692)*x[2]
+            ref[(2, 1, 2, 2)]+=-0.851427547085*x_ref[2]**o + (0.748251199692)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=-0.316481534555*x[2]**o + (-0.493051121038)*x[2]
+            ref[(2, 1, 3, 0)]+=-0.316481534555*x_ref[2]**o + (-0.493051121038)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=-0.303822840095*x[2]**o + (0.70347110385)*x[2]
+            ref[(2, 1, 3, 1)]+=-0.303822840095*x_ref[2]**o + (0.70347110385)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=0.399264527106*x[2]**o + (-0.360912053792)*x[2]
+            ref[(2, 1, 3, 2)]+=0.399264527106*x_ref[2]**o + (-0.360912053792)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.541803107092*x[2]**o + (-0.765900022068)*x[2]
+            ref[(2, 2, 0, 0)]+=0.541803107092*x_ref[2]**o + (-0.765900022068)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.865280850666*x[2]**o + (-0.608089595972)*x[2]
+            ref[(2, 2, 0, 1)]+=0.865280850666*x_ref[2]**o + (-0.608089595972)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.492476619397*x[2]**o + (0.0246022228476)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.492476619397*x_ref[2]**o + (0.0246022228476)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.171124166749*x[2]**o + (-0.385494467173)*x[2]
+            ref[(2, 2, 1, 0)]+=0.171124166749*x_ref[2]**o + (-0.385494467173)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.286158099859*x[2]**o + (-0.62678476579)*x[2]
+            ref[(2, 2, 1, 1)]+=0.286158099859*x_ref[2]**o + (-0.62678476579)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.124835974472*x[2]**o + (-0.959336312283)*x[2]
+            ref[(2, 2, 1, 2)]+=-0.124835974472*x_ref[2]**o + (-0.959336312283)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.877774025837*x[2]**o + (-0.129398493789)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.877774025837*x_ref[2]**o + (-0.129398493789)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.825236371468*x[2]**o + (0.821518190086)*x[2]
+            ref[(2, 2, 2, 1)]+=0.825236371468*x_ref[2]**o + (0.821518190086)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=-0.930910836304*x[2]**o + (-0.106468206934)*x[2]
+            ref[(2, 2, 2, 2)]+=-0.930910836304*x_ref[2]**o + (-0.106468206934)*x_ref[2]
+            arg[(2, 2, 3, 0)]+=0.374323788375*x[2]**o + (0.569896912548)*x[2]
+            ref[(2, 2, 3, 0)]+=0.374323788375*x_ref[2]**o + (0.569896912548)*x_ref[2]
+            arg[(2, 2, 3, 1)]+=0.954790225537*x[2]**o + (0.611798655748)*x[2]
+            ref[(2, 2, 3, 1)]+=0.954790225537*x_ref[2]**o + (0.611798655748)*x_ref[2]
+            arg[(2, 2, 3, 2)]+=0.760518978216*x[2]**o + (0.800162900625)*x[2]
+            ref[(2, 2, 3, 2)]+=0.760518978216*x_ref[2]**o + (0.800162900625)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.607334439166*x[2]**o + (-0.0524599631437)*x[2]
+            ref[(2, 3, 0, 0)]+=-0.607334439166*x_ref[2]**o + (-0.0524599631437)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.0999451701422*x[2]**o + (-0.967873950047)*x[2]
+            ref[(2, 3, 0, 1)]+=0.0999451701422*x_ref[2]**o + (-0.967873950047)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=0.124210875568*x[2]**o + (0.702512881987)*x[2]
+            ref[(2, 3, 0, 2)]+=0.124210875568*x_ref[2]**o + (0.702512881987)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.0474445423417*x[2]**o + (-0.922962582272)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.0474445423417*x_ref[2]**o + (-0.922962582272)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.420663146979*x[2]**o + (-0.511527249885)*x[2]
+            ref[(2, 3, 1, 1)]+=0.420663146979*x_ref[2]**o + (-0.511527249885)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=-0.189490778356*x[2]**o + (-0.479577615536)*x[2]
+            ref[(2, 3, 1, 2)]+=-0.189490778356*x_ref[2]**o + (-0.479577615536)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=0.74572459476*x[2]**o + (-0.672832837195)*x[2]
+            ref[(2, 3, 2, 0)]+=0.74572459476*x_ref[2]**o + (-0.672832837195)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=0.307311079627*x[2]**o + (-0.492191128071)*x[2]
+            ref[(2, 3, 2, 1)]+=0.307311079627*x_ref[2]**o + (-0.492191128071)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=-0.599931183777*x[2]**o + (0.464638933764)*x[2]
+            ref[(2, 3, 2, 2)]+=-0.599931183777*x_ref[2]**o + (0.464638933764)*x_ref[2]
+            arg[(2, 3, 3, 0)]+=-0.340961240846*x[2]**o + (0.0231350341148)*x[2]
+            ref[(2, 3, 3, 0)]+=-0.340961240846*x_ref[2]**o + (0.0231350341148)*x_ref[2]
+            arg[(2, 3, 3, 1)]+=-0.44662351839*x[2]**o + (-0.673182796279)*x[2]
+            ref[(2, 3, 3, 1)]+=-0.44662351839*x_ref[2]**o + (-0.673182796279)*x_ref[2]
+            arg[(2, 3, 3, 2)]+=0.581195280835*x[2]**o + (0.727019487953)*x[2]
+            ref[(2, 3, 3, 2)]+=0.581195280835*x_ref[2]**o + (0.727019487953)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.221496039959*x[0]**o + (-0.729211050348)*x[0] + (0.698201239664)*x[1]**o + (0.155387067429)*x[1]
+        ref=0.221496039959*x_ref[0]**o + (-0.729211050348)*x_ref[0] + (0.698201239664)*x_ref[1]**o + (0.155387067429)*x_ref[1]
+        if dim==3:
+            arg+=(0.484094076499)*x[2]**o + (0.143308813376)*x[2]
+            ref+=(0.484094076499)*x_ref[2]**o + (0.143308813376)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=-0.354785819293*x[0]**o + (0.0770572334782)*x[0] + (0.133757963484)*x[1]**o + (0.168765031978)*x[1]
+        ref[(0,)]=-0.354785819293*x_ref[0]**o + (0.0770572334782)*x_ref[0] + (0.133757963484)*x_ref[1]**o + (0.168765031978)*x_ref[1]
+        arg[(1,)]=0.936008049359*x[0]**o + (0.395370171081)*x[0] + (0.0896334039209)*x[1]**o + (-0.502498045352)*x[1]
+        ref[(1,)]=0.936008049359*x_ref[0]**o + (0.395370171081)*x_ref[0] + (0.0896334039209)*x_ref[1]**o + (-0.502498045352)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.483457763441*x[2]**o + (-0.889094415831)*x[2]
+            ref[(0,)]+=-0.483457763441*x_ref[2]**o + (-0.889094415831)*x_ref[2]
+            arg[(1,)]+=0.758984940148*x[2]**o + (-0.622157953319)*x[2]
+            ref[(1,)]+=0.758984940148*x_ref[2]**o + (-0.622157953319)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3),w_ref)
+        arg[(0, 0)]=-0.485628987593*x[0]**o + (0.319561010332)*x[0] + (-0.4887754246)*x[1]**o + (-0.862984131669)*x[1]
+        ref[(0, 0)]=-0.485628987593*x_ref[0]**o + (0.319561010332)*x_ref[0] + (-0.4887754246)*x_ref[1]**o + (-0.862984131669)*x_ref[1]
+        arg[(0, 1)]=0.965943586021*x[0]**o + (-0.115998676929)*x[0] + (-0.262267434027)*x[1]**o + (-0.986438080496)*x[1]
+        ref[(0, 1)]=0.965943586021*x_ref[0]**o + (-0.115998676929)*x_ref[0] + (-0.262267434027)*x_ref[1]**o + (-0.986438080496)*x_ref[1]
+        arg[(0, 2)]=0.15629550555*x[0]**o + (0.612854840523)*x[0] + (-0.0348853810999)*x[1]**o + (0.502839972583)*x[1]
+        ref[(0, 2)]=0.15629550555*x_ref[0]**o + (0.612854840523)*x_ref[0] + (-0.0348853810999)*x_ref[1]**o + (0.502839972583)*x_ref[1]
+        arg[(1, 0)]=-0.958535074872*x[0]**o + (-0.18746022978)*x[0] + (0.340675136961)*x[1]**o + (0.187084678116)*x[1]
+        ref[(1, 0)]=-0.958535074872*x_ref[0]**o + (-0.18746022978)*x_ref[0] + (0.340675136961)*x_ref[1]**o + (0.187084678116)*x_ref[1]
+        arg[(1, 1)]=-0.419960089086*x[0]**o + (-0.582449751478)*x[0] + (0.596133770646)*x[1]**o + (-0.532556309414)*x[1]
+        ref[(1, 1)]=-0.419960089086*x_ref[0]**o + (-0.582449751478)*x_ref[0] + (0.596133770646)*x_ref[1]**o + (-0.532556309414)*x_ref[1]
+        arg[(1, 2)]=0.384194631837*x[0]**o + (0.0843551138873)*x[0] + (0.570203844825)*x[1]**o + (-0.235626305359)*x[1]
+        ref[(1, 2)]=0.384194631837*x_ref[0]**o + (0.0843551138873)*x_ref[0] + (0.570203844825)*x_ref[1]**o + (-0.235626305359)*x_ref[1]
+        arg[(2, 0)]=0.85166285864*x[0]**o + (-0.0214334054738)*x[0] + (0.558518427392)*x[1]**o + (-0.0717617056211)*x[1]
+        ref[(2, 0)]=0.85166285864*x_ref[0]**o + (-0.0214334054738)*x_ref[0] + (0.558518427392)*x_ref[1]**o + (-0.0717617056211)*x_ref[1]
+        arg[(2, 1)]=0.297423833682*x[0]**o + (0.840974425538)*x[0] + (0.518005578994)*x[1]**o + (-0.556107524194)*x[1]
+        ref[(2, 1)]=0.297423833682*x_ref[0]**o + (0.840974425538)*x_ref[0] + (0.518005578994)*x_ref[1]**o + (-0.556107524194)*x_ref[1]
+        arg[(2, 2)]=-0.458687809203*x[0]**o + (0.818597272614)*x[0] + (-0.905584211861)*x[1]**o + (0.619352766927)*x[1]
+        ref[(2, 2)]=-0.458687809203*x_ref[0]**o + (0.818597272614)*x_ref[0] + (-0.905584211861)*x_ref[1]**o + (0.619352766927)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.783678757541*x[2]**o + (-0.791905358511)*x[2]
+            ref[(0, 0)]+=0.783678757541*x_ref[2]**o + (-0.791905358511)*x_ref[2]
+            arg[(0, 1)]+=-0.462157931254*x[2]**o + (0.035367131083)*x[2]
+            ref[(0, 1)]+=-0.462157931254*x_ref[2]**o + (0.035367131083)*x_ref[2]
+            arg[(0, 2)]+=0.561727784651*x[2]**o + (-0.326046179985)*x[2]
+            ref[(0, 2)]+=0.561727784651*x_ref[2]**o + (-0.326046179985)*x_ref[2]
+            arg[(1, 0)]+=-0.898693167885*x[2]**o + (-0.0340832552103)*x[2]
+            ref[(1, 0)]+=-0.898693167885*x_ref[2]**o + (-0.0340832552103)*x_ref[2]
+            arg[(1, 1)]+=0.530130417068*x[2]**o + (-0.468070028181)*x[2]
+            ref[(1, 1)]+=0.530130417068*x_ref[2]**o + (-0.468070028181)*x_ref[2]
+            arg[(1, 2)]+=0.829815026149*x[2]**o + (0.936098391239)*x[2]
+            ref[(1, 2)]+=0.829815026149*x_ref[2]**o + (0.936098391239)*x_ref[2]
+            arg[(2, 0)]+=-0.67367427838*x[2]**o + (-0.906644896491)*x[2]
+            ref[(2, 0)]+=-0.67367427838*x_ref[2]**o + (-0.906644896491)*x_ref[2]
+            arg[(2, 1)]+=0.895588200056*x[2]**o + (-0.850401254503)*x[2]
+            ref[(2, 1)]+=0.895588200056*x_ref[2]**o + (-0.850401254503)*x_ref[2]
+            arg[(2, 2)]+=-0.901939391436*x[2]**o + (0.910700472235)*x[2]
+            ref[(2, 2)]+=-0.901939391436*x_ref[2]**o + (0.910700472235)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3),w_ref)
+        arg[(0, 0, 0)]=-0.306212230417*x[0]**o + (-0.734295392513)*x[0] + (-0.854065444748)*x[1]**o + (0.330167206251)*x[1]
+        ref[(0, 0, 0)]=-0.306212230417*x_ref[0]**o + (-0.734295392513)*x_ref[0] + (-0.854065444748)*x_ref[1]**o + (0.330167206251)*x_ref[1]
+        arg[(0, 0, 1)]=-0.839751670384*x[0]**o + (-0.0186552432904)*x[0] + (0.568875059837)*x[1]**o + (0.0224381429527)*x[1]
+        ref[(0, 0, 1)]=-0.839751670384*x_ref[0]**o + (-0.0186552432904)*x_ref[0] + (0.568875059837)*x_ref[1]**o + (0.0224381429527)*x_ref[1]
+        arg[(0, 0, 2)]=-0.911057269405*x[0]**o + (-0.587428324971)*x[0] + (0.65502439471)*x[1]**o + (0.755369022857)*x[1]
+        ref[(0, 0, 2)]=-0.911057269405*x_ref[0]**o + (-0.587428324971)*x_ref[0] + (0.65502439471)*x_ref[1]**o + (0.755369022857)*x_ref[1]
+        arg[(0, 1, 0)]=0.618981186363*x[0]**o + (-0.416996805136)*x[0] + (0.253574142507)*x[1]**o + (0.280890490979)*x[1]
+        ref[(0, 1, 0)]=0.618981186363*x_ref[0]**o + (-0.416996805136)*x_ref[0] + (0.253574142507)*x_ref[1]**o + (0.280890490979)*x_ref[1]
+        arg[(0, 1, 1)]=0.617966470617*x[0]**o + (0.581621799231)*x[0] + (-0.460774727374)*x[1]**o + (-0.650673713106)*x[1]
+        ref[(0, 1, 1)]=0.617966470617*x_ref[0]**o + (0.581621799231)*x_ref[0] + (-0.460774727374)*x_ref[1]**o + (-0.650673713106)*x_ref[1]
+        arg[(0, 1, 2)]=-0.916118533636*x[0]**o + (-0.523192309467)*x[0] + (-0.123344992484)*x[1]**o + (0.0140052137686)*x[1]
+        ref[(0, 1, 2)]=-0.916118533636*x_ref[0]**o + (-0.523192309467)*x_ref[0] + (-0.123344992484)*x_ref[1]**o + (0.0140052137686)*x_ref[1]
+        arg[(1, 0, 0)]=-0.153125319301*x[0]**o + (-0.972347563252)*x[0] + (-0.71404218938)*x[1]**o + (0.796396907868)*x[1]
+        ref[(1, 0, 0)]=-0.153125319301*x_ref[0]**o + (-0.972347563252)*x_ref[0] + (-0.71404218938)*x_ref[1]**o + (0.796396907868)*x_ref[1]
+        arg[(1, 0, 1)]=-0.398911876386*x[0]**o + (0.463760362038)*x[0] + (0.936212288152)*x[1]**o + (0.207147692058)*x[1]
+        ref[(1, 0, 1)]=-0.398911876386*x_ref[0]**o + (0.463760362038)*x_ref[0] + (0.936212288152)*x_ref[1]**o + (0.207147692058)*x_ref[1]
+        arg[(1, 0, 2)]=-0.464569821722*x[0]**o + (-0.520684402507)*x[0] + (-0.448829227004)*x[1]**o + (-0.40788288184)*x[1]
+        ref[(1, 0, 2)]=-0.464569821722*x_ref[0]**o + (-0.520684402507)*x_ref[0] + (-0.448829227004)*x_ref[1]**o + (-0.40788288184)*x_ref[1]
+        arg[(1, 1, 0)]=-0.0567696903983*x[0]**o + (0.524973365985)*x[0] + (-0.686629351731)*x[1]**o + (0.924137272718)*x[1]
+        ref[(1, 1, 0)]=-0.0567696903983*x_ref[0]**o + (0.524973365985)*x_ref[0] + (-0.686629351731)*x_ref[1]**o + (0.924137272718)*x_ref[1]
+        arg[(1, 1, 1)]=0.574832550451*x[0]**o + (0.241280408889)*x[0] + (0.922224208234)*x[1]**o + (0.659202245692)*x[1]
+        ref[(1, 1, 1)]=0.574832550451*x_ref[0]**o + (0.241280408889)*x_ref[0] + (0.922224208234)*x_ref[1]**o + (0.659202245692)*x_ref[1]
+        arg[(1, 1, 2)]=-0.67690565713*x[0]**o + (0.214225464324)*x[0] + (0.836579821839)*x[1]**o + (0.84969222458)*x[1]
+        ref[(1, 1, 2)]=-0.67690565713*x_ref[0]**o + (0.214225464324)*x_ref[0] + (0.836579821839)*x_ref[1]**o + (0.84969222458)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.946801439797*x[2]**o + (-0.981625310408)*x[2]
+            ref[(0, 0, 0)]+=-0.946801439797*x_ref[2]**o + (-0.981625310408)*x_ref[2]
+            arg[(0, 0, 1)]+=0.24714322319*x[2]**o + (0.41081043892)*x[2]
+            ref[(0, 0, 1)]+=0.24714322319*x_ref[2]**o + (0.41081043892)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.903100457478*x[2]**o + (0.8862995024)*x[2]
+            ref[(0, 0, 2)]+=-0.903100457478*x_ref[2]**o + (0.8862995024)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.00264271699392*x[2]**o + (-0.726130568862)*x[2]
+            ref[(0, 1, 0)]+=-0.00264271699392*x_ref[2]**o + (-0.726130568862)*x_ref[2]
+            arg[(0, 1, 1)]+=0.723832892811*x[2]**o + (0.584034898157)*x[2]
+            ref[(0, 1, 1)]+=0.723832892811*x_ref[2]**o + (0.584034898157)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.113560811428*x[2]**o + (-0.67414546999)*x[2]
+            ref[(0, 1, 2)]+=-0.113560811428*x_ref[2]**o + (-0.67414546999)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.56952774206*x[2]**o + (0.786675286497)*x[2]
+            ref[(1, 0, 0)]+=-0.56952774206*x_ref[2]**o + (0.786675286497)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.134791330127*x[2]**o + (-0.800411744719)*x[2]
+            ref[(1, 0, 1)]+=-0.134791330127*x_ref[2]**o + (-0.800411744719)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.064615103932*x[2]**o + (-0.773291921203)*x[2]
+            ref[(1, 0, 2)]+=-0.064615103932*x_ref[2]**o + (-0.773291921203)*x_ref[2]
+            arg[(1, 1, 0)]+=0.224692914354*x[2]**o + (-0.996288272211)*x[2]
+            ref[(1, 1, 0)]+=0.224692914354*x_ref[2]**o + (-0.996288272211)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.242854174187*x[2]**o + (-0.501369669587)*x[2]
+            ref[(1, 1, 1)]+=-0.242854174187*x_ref[2]**o + (-0.501369669587)*x_ref[2]
+            arg[(1, 1, 2)]+=0.657976161298*x[2]**o + (0.858690692375)*x[2]
+            ref[(1, 1, 2)]+=0.657976161298*x_ref[2]**o + (0.858690692375)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4, 4),w)
+        ref = Data(0,(3, 4, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.127779232195*x[0]**o + (-0.454167643015)*x[0] + (0.24004346576)*x[1]**o + (-0.93185738934)*x[1]
+        ref[(0, 0, 0, 0)]=0.127779232195*x_ref[0]**o + (-0.454167643015)*x_ref[0] + (0.24004346576)*x_ref[1]**o + (-0.93185738934)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.107165731833*x[0]**o + (0.741018099548)*x[0] + (-0.189560296844)*x[1]**o + (-0.263635274032)*x[1]
+        ref[(0, 0, 0, 1)]=0.107165731833*x_ref[0]**o + (0.741018099548)*x_ref[0] + (-0.189560296844)*x_ref[1]**o + (-0.263635274032)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.593326114291*x[0]**o + (0.924360666134)*x[0] + (-0.715439643321)*x[1]**o + (0.360630751211)*x[1]
+        ref[(0, 0, 0, 2)]=0.593326114291*x_ref[0]**o + (0.924360666134)*x_ref[0] + (-0.715439643321)*x_ref[1]**o + (0.360630751211)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.779455336548*x[0]**o + (-0.495315465375)*x[0] + (-0.552062924768)*x[1]**o + (-0.537596441631)*x[1]
+        ref[(0, 0, 0, 3)]=0.779455336548*x_ref[0]**o + (-0.495315465375)*x_ref[0] + (-0.552062924768)*x_ref[1]**o + (-0.537596441631)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.425182328914*x[0]**o + (-0.937291143891)*x[0] + (0.57736538131)*x[1]**o + (0.915775980192)*x[1]
+        ref[(0, 0, 1, 0)]=-0.425182328914*x_ref[0]**o + (-0.937291143891)*x_ref[0] + (0.57736538131)*x_ref[1]**o + (0.915775980192)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.364526373957*x[0]**o + (-0.788905246707)*x[0] + (0.776410675969)*x[1]**o + (0.168907546676)*x[1]
+        ref[(0, 0, 1, 1)]=-0.364526373957*x_ref[0]**o + (-0.788905246707)*x_ref[0] + (0.776410675969)*x_ref[1]**o + (0.168907546676)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.564055159121*x[0]**o + (0.695652351225)*x[0] + (-0.224363868942)*x[1]**o + (-0.2036100848)*x[1]
+        ref[(0, 0, 1, 2)]=0.564055159121*x_ref[0]**o + (0.695652351225)*x_ref[0] + (-0.224363868942)*x_ref[1]**o + (-0.2036100848)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.24782870728*x[0]**o + (0.566822805277)*x[0] + (0.401503006236)*x[1]**o + (-0.308463676854)*x[1]
+        ref[(0, 0, 1, 3)]=-0.24782870728*x_ref[0]**o + (0.566822805277)*x_ref[0] + (0.401503006236)*x_ref[1]**o + (-0.308463676854)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.658716702241*x[0]**o + (-0.693450576819)*x[0] + (-0.269781586754)*x[1]**o + (0.0388901229086)*x[1]
+        ref[(0, 0, 2, 0)]=0.658716702241*x_ref[0]**o + (-0.693450576819)*x_ref[0] + (-0.269781586754)*x_ref[1]**o + (0.0388901229086)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.469389116098*x[0]**o + (-0.934052665057)*x[0] + (-0.574283662742)*x[1]**o + (0.332753851538)*x[1]
+        ref[(0, 0, 2, 1)]=-0.469389116098*x_ref[0]**o + (-0.934052665057)*x_ref[0] + (-0.574283662742)*x_ref[1]**o + (0.332753851538)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.287154382509*x[0]**o + (0.408331117084)*x[0] + (-0.5597443213)*x[1]**o + (-0.794207459163)*x[1]
+        ref[(0, 0, 2, 2)]=-0.287154382509*x_ref[0]**o + (0.408331117084)*x_ref[0] + (-0.5597443213)*x_ref[1]**o + (-0.794207459163)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.512872804548*x[0]**o + (-0.771822855991)*x[0] + (-0.727845960036)*x[1]**o + (-0.737331742018)*x[1]
+        ref[(0, 0, 2, 3)]=-0.512872804548*x_ref[0]**o + (-0.771822855991)*x_ref[0] + (-0.727845960036)*x_ref[1]**o + (-0.737331742018)*x_ref[1]
+        arg[(0, 0, 3, 0)]=-0.19851859284*x[0]**o + (0.122396456928)*x[0] + (-0.65371613257)*x[1]**o + (0.723691227396)*x[1]
+        ref[(0, 0, 3, 0)]=-0.19851859284*x_ref[0]**o + (0.122396456928)*x_ref[0] + (-0.65371613257)*x_ref[1]**o + (0.723691227396)*x_ref[1]
+        arg[(0, 0, 3, 1)]=-0.328277190956*x[0]**o + (0.856459329496)*x[0] + (-0.236638068399)*x[1]**o + (-0.355108091762)*x[1]
+        ref[(0, 0, 3, 1)]=-0.328277190956*x_ref[0]**o + (0.856459329496)*x_ref[0] + (-0.236638068399)*x_ref[1]**o + (-0.355108091762)*x_ref[1]
+        arg[(0, 0, 3, 2)]=0.73709239819*x[0]**o + (0.948677484092)*x[0] + (0.846788159387)*x[1]**o + (0.171926456079)*x[1]
+        ref[(0, 0, 3, 2)]=0.73709239819*x_ref[0]**o + (0.948677484092)*x_ref[0] + (0.846788159387)*x_ref[1]**o + (0.171926456079)*x_ref[1]
+        arg[(0, 0, 3, 3)]=0.238859649885*x[0]**o + (0.119982537436)*x[0] + (0.469265671667)*x[1]**o + (-0.561758481098)*x[1]
+        ref[(0, 0, 3, 3)]=0.238859649885*x_ref[0]**o + (0.119982537436)*x_ref[0] + (0.469265671667)*x_ref[1]**o + (-0.561758481098)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.676890234014*x[0]**o + (-0.126266984936)*x[0] + (0.486821274556)*x[1]**o + (0.0535444895484)*x[1]
+        ref[(0, 1, 0, 0)]=-0.676890234014*x_ref[0]**o + (-0.126266984936)*x_ref[0] + (0.486821274556)*x_ref[1]**o + (0.0535444895484)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.824707652796*x[0]**o + (0.249709278468)*x[0] + (0.856588972117)*x[1]**o + (-0.898317264002)*x[1]
+        ref[(0, 1, 0, 1)]=0.824707652796*x_ref[0]**o + (0.249709278468)*x_ref[0] + (0.856588972117)*x_ref[1]**o + (-0.898317264002)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.212627791787*x[0]**o + (-0.924118239874)*x[0] + (-0.927826077957)*x[1]**o + (-0.492636785967)*x[1]
+        ref[(0, 1, 0, 2)]=-0.212627791787*x_ref[0]**o + (-0.924118239874)*x_ref[0] + (-0.927826077957)*x_ref[1]**o + (-0.492636785967)*x_ref[1]
+        arg[(0, 1, 0, 3)]=-0.0870063946102*x[0]**o + (-0.803912833595)*x[0] + (-0.252892608988)*x[1]**o + (0.872094221925)*x[1]
+        ref[(0, 1, 0, 3)]=-0.0870063946102*x_ref[0]**o + (-0.803912833595)*x_ref[0] + (-0.252892608988)*x_ref[1]**o + (0.872094221925)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.894162822392*x[0]**o + (-0.61164329284)*x[0] + (0.755679299741)*x[1]**o + (-0.833030431989)*x[1]
+        ref[(0, 1, 1, 0)]=-0.894162822392*x_ref[0]**o + (-0.61164329284)*x_ref[0] + (0.755679299741)*x_ref[1]**o + (-0.833030431989)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.697642553584*x[0]**o + (0.927994698324)*x[0] + (-0.370346521844)*x[1]**o + (-0.50084648524)*x[1]
+        ref[(0, 1, 1, 1)]=-0.697642553584*x_ref[0]**o + (0.927994698324)*x_ref[0] + (-0.370346521844)*x_ref[1]**o + (-0.50084648524)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.716808219851*x[0]**o + (0.391617826835)*x[0] + (0.0784293553215)*x[1]**o + (0.253382504884)*x[1]
+        ref[(0, 1, 1, 2)]=-0.716808219851*x_ref[0]**o + (0.391617826835)*x_ref[0] + (0.0784293553215)*x_ref[1]**o + (0.253382504884)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.0215326375556*x[0]**o + (-0.477364940129)*x[0] + (-0.0375034503539)*x[1]**o + (-0.513474338856)*x[1]
+        ref[(0, 1, 1, 3)]=0.0215326375556*x_ref[0]**o + (-0.477364940129)*x_ref[0] + (-0.0375034503539)*x_ref[1]**o + (-0.513474338856)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.145733672777*x[0]**o + (-0.500938060324)*x[0] + (0.259419070696)*x[1]**o + (-0.72993161716)*x[1]
+        ref[(0, 1, 2, 0)]=-0.145733672777*x_ref[0]**o + (-0.500938060324)*x_ref[0] + (0.259419070696)*x_ref[1]**o + (-0.72993161716)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.31061063372*x[0]**o + (0.305157702699)*x[0] + (-0.438563743631)*x[1]**o + (0.0257671634461)*x[1]
+        ref[(0, 1, 2, 1)]=0.31061063372*x_ref[0]**o + (0.305157702699)*x_ref[0] + (-0.438563743631)*x_ref[1]**o + (0.0257671634461)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.190749445171*x[0]**o + (0.840683389613)*x[0] + (0.718992945718)*x[1]**o + (0.487440868192)*x[1]
+        ref[(0, 1, 2, 2)]=0.190749445171*x_ref[0]**o + (0.840683389613)*x_ref[0] + (0.718992945718)*x_ref[1]**o + (0.487440868192)*x_ref[1]
+        arg[(0, 1, 2, 3)]=0.87066155854*x[0]**o + (-0.0296621787944)*x[0] + (0.475891296643)*x[1]**o + (0.393929990327)*x[1]
+        ref[(0, 1, 2, 3)]=0.87066155854*x_ref[0]**o + (-0.0296621787944)*x_ref[0] + (0.475891296643)*x_ref[1]**o + (0.393929990327)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.285269653802*x[0]**o + (-0.895842444793)*x[0] + (-0.0486153895476)*x[1]**o + (0.213942441166)*x[1]
+        ref[(0, 1, 3, 0)]=-0.285269653802*x_ref[0]**o + (-0.895842444793)*x_ref[0] + (-0.0486153895476)*x_ref[1]**o + (0.213942441166)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.498409127637*x[0]**o + (-0.98924606136)*x[0] + (0.138191444027)*x[1]**o + (-0.0349661600913)*x[1]
+        ref[(0, 1, 3, 1)]=-0.498409127637*x_ref[0]**o + (-0.98924606136)*x_ref[0] + (0.138191444027)*x_ref[1]**o + (-0.0349661600913)*x_ref[1]
+        arg[(0, 1, 3, 2)]=-0.890092397288*x[0]**o + (-0.348726631042)*x[0] + (-0.708165636358)*x[1]**o + (-0.929124842768)*x[1]
+        ref[(0, 1, 3, 2)]=-0.890092397288*x_ref[0]**o + (-0.348726631042)*x_ref[0] + (-0.708165636358)*x_ref[1]**o + (-0.929124842768)*x_ref[1]
+        arg[(0, 1, 3, 3)]=0.880893701222*x[0]**o + (0.11896628249)*x[0] + (0.145075029848)*x[1]**o + (0.735476662584)*x[1]
+        ref[(0, 1, 3, 3)]=0.880893701222*x_ref[0]**o + (0.11896628249)*x_ref[0] + (0.145075029848)*x_ref[1]**o + (0.735476662584)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.784798061148*x[0]**o + (0.340329700016)*x[0] + (0.110170703574)*x[1]**o + (0.173901467503)*x[1]
+        ref[(0, 2, 0, 0)]=0.784798061148*x_ref[0]**o + (0.340329700016)*x_ref[0] + (0.110170703574)*x_ref[1]**o + (0.173901467503)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.13349993533*x[0]**o + (-0.798822154059)*x[0] + (0.71615714387)*x[1]**o + (0.323102831999)*x[1]
+        ref[(0, 2, 0, 1)]=-0.13349993533*x_ref[0]**o + (-0.798822154059)*x_ref[0] + (0.71615714387)*x_ref[1]**o + (0.323102831999)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.112752800957*x[0]**o + (0.925577177622)*x[0] + (0.621050333987)*x[1]**o + (-0.535612938493)*x[1]
+        ref[(0, 2, 0, 2)]=0.112752800957*x_ref[0]**o + (0.925577177622)*x_ref[0] + (0.621050333987)*x_ref[1]**o + (-0.535612938493)*x_ref[1]
+        arg[(0, 2, 0, 3)]=0.83923734692*x[0]**o + (-0.770910838379)*x[0] + (-0.259755435944)*x[1]**o + (0.314994790705)*x[1]
+        ref[(0, 2, 0, 3)]=0.83923734692*x_ref[0]**o + (-0.770910838379)*x_ref[0] + (-0.259755435944)*x_ref[1]**o + (0.314994790705)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.454995938279*x[0]**o + (0.975394451463)*x[0] + (0.764430620707)*x[1]**o + (-0.694745949931)*x[1]
+        ref[(0, 2, 1, 0)]=0.454995938279*x_ref[0]**o + (0.975394451463)*x_ref[0] + (0.764430620707)*x_ref[1]**o + (-0.694745949931)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.789797878357*x[0]**o + (0.484925663788)*x[0] + (0.783624272358)*x[1]**o + (-0.67324948976)*x[1]
+        ref[(0, 2, 1, 1)]=-0.789797878357*x_ref[0]**o + (0.484925663788)*x_ref[0] + (0.783624272358)*x_ref[1]**o + (-0.67324948976)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.18984127497*x[0]**o + (-0.0297323698347)*x[0] + (-0.551476666883)*x[1]**o + (-0.871322169441)*x[1]
+        ref[(0, 2, 1, 2)]=0.18984127497*x_ref[0]**o + (-0.0297323698347)*x_ref[0] + (-0.551476666883)*x_ref[1]**o + (-0.871322169441)*x_ref[1]
+        arg[(0, 2, 1, 3)]=-0.730007378359*x[0]**o + (0.973373453776)*x[0] + (-0.726968383802)*x[1]**o + (-0.440441139147)*x[1]
+        ref[(0, 2, 1, 3)]=-0.730007378359*x_ref[0]**o + (0.973373453776)*x_ref[0] + (-0.726968383802)*x_ref[1]**o + (-0.440441139147)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.830806948587*x[0]**o + (0.966000121975)*x[0] + (-0.315758414623)*x[1]**o + (-0.908320039817)*x[1]
+        ref[(0, 2, 2, 0)]=0.830806948587*x_ref[0]**o + (0.966000121975)*x_ref[0] + (-0.315758414623)*x_ref[1]**o + (-0.908320039817)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.437453901804*x[0]**o + (0.981718485894)*x[0] + (-0.662915987702)*x[1]**o + (-0.135049704486)*x[1]
+        ref[(0, 2, 2, 1)]=-0.437453901804*x_ref[0]**o + (0.981718485894)*x_ref[0] + (-0.662915987702)*x_ref[1]**o + (-0.135049704486)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.823720591204*x[0]**o + (-0.614809402619)*x[0] + (-0.375366670403)*x[1]**o + (-0.541434565287)*x[1]
+        ref[(0, 2, 2, 2)]=-0.823720591204*x_ref[0]**o + (-0.614809402619)*x_ref[0] + (-0.375366670403)*x_ref[1]**o + (-0.541434565287)*x_ref[1]
+        arg[(0, 2, 2, 3)]=-0.371646818838*x[0]**o + (0.400614089486)*x[0] + (-0.616165384644)*x[1]**o + (0.0119932420101)*x[1]
+        ref[(0, 2, 2, 3)]=-0.371646818838*x_ref[0]**o + (0.400614089486)*x_ref[0] + (-0.616165384644)*x_ref[1]**o + (0.0119932420101)*x_ref[1]
+        arg[(0, 2, 3, 0)]=0.179966027364*x[0]**o + (-0.0347928837315)*x[0] + (-0.0797318430898)*x[1]**o + (0.14795994281)*x[1]
+        ref[(0, 2, 3, 0)]=0.179966027364*x_ref[0]**o + (-0.0347928837315)*x_ref[0] + (-0.0797318430898)*x_ref[1]**o + (0.14795994281)*x_ref[1]
+        arg[(0, 2, 3, 1)]=-0.437523115661*x[0]**o + (0.600622299092)*x[0] + (0.221219620902)*x[1]**o + (0.845701773927)*x[1]
+        ref[(0, 2, 3, 1)]=-0.437523115661*x_ref[0]**o + (0.600622299092)*x_ref[0] + (0.221219620902)*x_ref[1]**o + (0.845701773927)*x_ref[1]
+        arg[(0, 2, 3, 2)]=-0.793654524923*x[0]**o + (0.41418799772)*x[0] + (0.871802921877)*x[1]**o + (-0.460293678453)*x[1]
+        ref[(0, 2, 3, 2)]=-0.793654524923*x_ref[0]**o + (0.41418799772)*x_ref[0] + (0.871802921877)*x_ref[1]**o + (-0.460293678453)*x_ref[1]
+        arg[(0, 2, 3, 3)]=-0.19321922568*x[0]**o + (0.634759879072)*x[0] + (-0.598149388192)*x[1]**o + (0.829268232839)*x[1]
+        ref[(0, 2, 3, 3)]=-0.19321922568*x_ref[0]**o + (0.634759879072)*x_ref[0] + (-0.598149388192)*x_ref[1]**o + (0.829268232839)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.158240648208*x[0]**o + (-0.171901404662)*x[0] + (0.0149622171579)*x[1]**o + (0.47863380579)*x[1]
+        ref[(0, 3, 0, 0)]=0.158240648208*x_ref[0]**o + (-0.171901404662)*x_ref[0] + (0.0149622171579)*x_ref[1]**o + (0.47863380579)*x_ref[1]
+        arg[(0, 3, 0, 1)]=-0.470663307112*x[0]**o + (0.0960997829887)*x[0] + (-0.247867837823)*x[1]**o + (-0.986921151304)*x[1]
+        ref[(0, 3, 0, 1)]=-0.470663307112*x_ref[0]**o + (0.0960997829887)*x_ref[0] + (-0.247867837823)*x_ref[1]**o + (-0.986921151304)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.181431024467*x[0]**o + (-0.192589480257)*x[0] + (0.132311972884)*x[1]**o + (-0.921830310575)*x[1]
+        ref[(0, 3, 0, 2)]=-0.181431024467*x_ref[0]**o + (-0.192589480257)*x_ref[0] + (0.132311972884)*x_ref[1]**o + (-0.921830310575)*x_ref[1]
+        arg[(0, 3, 0, 3)]=-0.64804810138*x[0]**o + (-0.651072311831)*x[0] + (-0.0777247687892)*x[1]**o + (-0.33129132512)*x[1]
+        ref[(0, 3, 0, 3)]=-0.64804810138*x_ref[0]**o + (-0.651072311831)*x_ref[0] + (-0.0777247687892)*x_ref[1]**o + (-0.33129132512)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.705587727847*x[0]**o + (0.967352867419)*x[0] + (-0.217424123544)*x[1]**o + (0.153834352827)*x[1]
+        ref[(0, 3, 1, 0)]=0.705587727847*x_ref[0]**o + (0.967352867419)*x_ref[0] + (-0.217424123544)*x_ref[1]**o + (0.153834352827)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.745830222129*x[0]**o + (-0.730792320345)*x[0] + (0.132539753898)*x[1]**o + (0.201958306003)*x[1]
+        ref[(0, 3, 1, 1)]=0.745830222129*x_ref[0]**o + (-0.730792320345)*x_ref[0] + (0.132539753898)*x_ref[1]**o + (0.201958306003)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.190551491617*x[0]**o + (-0.461910977236)*x[0] + (0.729413988243)*x[1]**o + (-0.977485103808)*x[1]
+        ref[(0, 3, 1, 2)]=-0.190551491617*x_ref[0]**o + (-0.461910977236)*x_ref[0] + (0.729413988243)*x_ref[1]**o + (-0.977485103808)*x_ref[1]
+        arg[(0, 3, 1, 3)]=-0.808651382209*x[0]**o + (0.32332352378)*x[0] + (-0.743444163283)*x[1]**o + (0.353739413109)*x[1]
+        ref[(0, 3, 1, 3)]=-0.808651382209*x_ref[0]**o + (0.32332352378)*x_ref[0] + (-0.743444163283)*x_ref[1]**o + (0.353739413109)*x_ref[1]
+        arg[(0, 3, 2, 0)]=0.876983484281*x[0]**o + (0.86612304997)*x[0] + (-0.0515009561924)*x[1]**o + (0.310063155112)*x[1]
+        ref[(0, 3, 2, 0)]=0.876983484281*x_ref[0]**o + (0.86612304997)*x_ref[0] + (-0.0515009561924)*x_ref[1]**o + (0.310063155112)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.979536999084*x[0]**o + (0.204558272487)*x[0] + (0.373043023906)*x[1]**o + (-0.682572506623)*x[1]
+        ref[(0, 3, 2, 1)]=0.979536999084*x_ref[0]**o + (0.204558272487)*x_ref[0] + (0.373043023906)*x_ref[1]**o + (-0.682572506623)*x_ref[1]
+        arg[(0, 3, 2, 2)]=0.0371018467681*x[0]**o + (-0.658042321625)*x[0] + (-0.368615101983)*x[1]**o + (-0.819645690362)*x[1]
+        ref[(0, 3, 2, 2)]=0.0371018467681*x_ref[0]**o + (-0.658042321625)*x_ref[0] + (-0.368615101983)*x_ref[1]**o + (-0.819645690362)*x_ref[1]
+        arg[(0, 3, 2, 3)]=-0.315958098351*x[0]**o + (0.0436986379908)*x[0] + (-0.504989663045)*x[1]**o + (0.112350425687)*x[1]
+        ref[(0, 3, 2, 3)]=-0.315958098351*x_ref[0]**o + (0.0436986379908)*x_ref[0] + (-0.504989663045)*x_ref[1]**o + (0.112350425687)*x_ref[1]
+        arg[(0, 3, 3, 0)]=-0.630275345416*x[0]**o + (0.0511948694402)*x[0] + (0.345135288975)*x[1]**o + (0.0145023526557)*x[1]
+        ref[(0, 3, 3, 0)]=-0.630275345416*x_ref[0]**o + (0.0511948694402)*x_ref[0] + (0.345135288975)*x_ref[1]**o + (0.0145023526557)*x_ref[1]
+        arg[(0, 3, 3, 1)]=-0.149078414736*x[0]**o + (-0.265512024028)*x[0] + (0.532818882685)*x[1]**o + (0.0435399307039)*x[1]
+        ref[(0, 3, 3, 1)]=-0.149078414736*x_ref[0]**o + (-0.265512024028)*x_ref[0] + (0.532818882685)*x_ref[1]**o + (0.0435399307039)*x_ref[1]
+        arg[(0, 3, 3, 2)]=0.16956053442*x[0]**o + (-0.894330598486)*x[0] + (-0.976493624448)*x[1]**o + (0.0267129306707)*x[1]
+        ref[(0, 3, 3, 2)]=0.16956053442*x_ref[0]**o + (-0.894330598486)*x_ref[0] + (-0.976493624448)*x_ref[1]**o + (0.0267129306707)*x_ref[1]
+        arg[(0, 3, 3, 3)]=0.259229100825*x[0]**o + (-0.443609656577)*x[0] + (-0.727940258268)*x[1]**o + (-0.568106828912)*x[1]
+        ref[(0, 3, 3, 3)]=0.259229100825*x_ref[0]**o + (-0.443609656577)*x_ref[0] + (-0.727940258268)*x_ref[1]**o + (-0.568106828912)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.655163627566*x[0]**o + (-0.404493408895)*x[0] + (0.0604599943645)*x[1]**o + (-0.085713598334)*x[1]
+        ref[(1, 0, 0, 0)]=0.655163627566*x_ref[0]**o + (-0.404493408895)*x_ref[0] + (0.0604599943645)*x_ref[1]**o + (-0.085713598334)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.145239050245*x[0]**o + (0.326978642612)*x[0] + (0.352706204939)*x[1]**o + (-0.295555084486)*x[1]
+        ref[(1, 0, 0, 1)]=-0.145239050245*x_ref[0]**o + (0.326978642612)*x_ref[0] + (0.352706204939)*x_ref[1]**o + (-0.295555084486)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.481179213965*x[0]**o + (0.748465900499)*x[0] + (0.484247250265)*x[1]**o + (-0.0305171332943)*x[1]
+        ref[(1, 0, 0, 2)]=0.481179213965*x_ref[0]**o + (0.748465900499)*x_ref[0] + (0.484247250265)*x_ref[1]**o + (-0.0305171332943)*x_ref[1]
+        arg[(1, 0, 0, 3)]=0.971442914305*x[0]**o + (-0.181154751266)*x[0] + (-0.0283485165827)*x[1]**o + (-0.283468472101)*x[1]
+        ref[(1, 0, 0, 3)]=0.971442914305*x_ref[0]**o + (-0.181154751266)*x_ref[0] + (-0.0283485165827)*x_ref[1]**o + (-0.283468472101)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.503350311971*x[0]**o + (-0.790232802854)*x[0] + (-0.979919813041)*x[1]**o + (0.742236031985)*x[1]
+        ref[(1, 0, 1, 0)]=-0.503350311971*x_ref[0]**o + (-0.790232802854)*x_ref[0] + (-0.979919813041)*x_ref[1]**o + (0.742236031985)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.424439454084*x[0]**o + (-0.51202495788)*x[0] + (-0.531315754866)*x[1]**o + (0.43384565536)*x[1]
+        ref[(1, 0, 1, 1)]=-0.424439454084*x_ref[0]**o + (-0.51202495788)*x_ref[0] + (-0.531315754866)*x_ref[1]**o + (0.43384565536)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.965269502415*x[0]**o + (-0.0590145990754)*x[0] + (0.0900904922394)*x[1]**o + (0.512720695206)*x[1]
+        ref[(1, 0, 1, 2)]=0.965269502415*x_ref[0]**o + (-0.0590145990754)*x_ref[0] + (0.0900904922394)*x_ref[1]**o + (0.512720695206)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.54687083881*x[0]**o + (0.683621074884)*x[0] + (0.0613885172784)*x[1]**o + (0.887590698841)*x[1]
+        ref[(1, 0, 1, 3)]=-0.54687083881*x_ref[0]**o + (0.683621074884)*x_ref[0] + (0.0613885172784)*x_ref[1]**o + (0.887590698841)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.735180513751*x[0]**o + (-0.187282441272)*x[0] + (0.0792334800205)*x[1]**o + (0.181905686515)*x[1]
+        ref[(1, 0, 2, 0)]=-0.735180513751*x_ref[0]**o + (-0.187282441272)*x_ref[0] + (0.0792334800205)*x_ref[1]**o + (0.181905686515)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.781671654993*x[0]**o + (-0.337851570243)*x[0] + (-0.00997309626989)*x[1]**o + (0.120722899987)*x[1]
+        ref[(1, 0, 2, 1)]=-0.781671654993*x_ref[0]**o + (-0.337851570243)*x_ref[0] + (-0.00997309626989)*x_ref[1]**o + (0.120722899987)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.0303376311413*x[0]**o + (-0.111738676201)*x[0] + (0.313796814864)*x[1]**o + (-0.397850371572)*x[1]
+        ref[(1, 0, 2, 2)]=-0.0303376311413*x_ref[0]**o + (-0.111738676201)*x_ref[0] + (0.313796814864)*x_ref[1]**o + (-0.397850371572)*x_ref[1]
+        arg[(1, 0, 2, 3)]=0.274958064293*x[0]**o + (0.325133420928)*x[0] + (-0.922041895901)*x[1]**o + (-0.290078668844)*x[1]
+        ref[(1, 0, 2, 3)]=0.274958064293*x_ref[0]**o + (0.325133420928)*x_ref[0] + (-0.922041895901)*x_ref[1]**o + (-0.290078668844)*x_ref[1]
+        arg[(1, 0, 3, 0)]=0.595015727926*x[0]**o + (0.166145106207)*x[0] + (-0.492480503567)*x[1]**o + (-0.503877997002)*x[1]
+        ref[(1, 0, 3, 0)]=0.595015727926*x_ref[0]**o + (0.166145106207)*x_ref[0] + (-0.492480503567)*x_ref[1]**o + (-0.503877997002)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.996476091719*x[0]**o + (0.650901552742)*x[0] + (0.478838622298)*x[1]**o + (0.438621607309)*x[1]
+        ref[(1, 0, 3, 1)]=0.996476091719*x_ref[0]**o + (0.650901552742)*x_ref[0] + (0.478838622298)*x_ref[1]**o + (0.438621607309)*x_ref[1]
+        arg[(1, 0, 3, 2)]=0.299098807912*x[0]**o + (0.859749086051)*x[0] + (-0.809955048588)*x[1]**o + (-0.756400486771)*x[1]
+        ref[(1, 0, 3, 2)]=0.299098807912*x_ref[0]**o + (0.859749086051)*x_ref[0] + (-0.809955048588)*x_ref[1]**o + (-0.756400486771)*x_ref[1]
+        arg[(1, 0, 3, 3)]=0.718407991686*x[0]**o + (-0.189472606126)*x[0] + (0.120482177107)*x[1]**o + (-0.128427504541)*x[1]
+        ref[(1, 0, 3, 3)]=0.718407991686*x_ref[0]**o + (-0.189472606126)*x_ref[0] + (0.120482177107)*x_ref[1]**o + (-0.128427504541)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.416032840046*x[0]**o + (0.76053601551)*x[0] + (-0.879010127553)*x[1]**o + (-0.0477818280093)*x[1]
+        ref[(1, 1, 0, 0)]=-0.416032840046*x_ref[0]**o + (0.76053601551)*x_ref[0] + (-0.879010127553)*x_ref[1]**o + (-0.0477818280093)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.501315066491*x[0]**o + (0.744035222291)*x[0] + (-0.209390892122)*x[1]**o + (-0.577080617713)*x[1]
+        ref[(1, 1, 0, 1)]=-0.501315066491*x_ref[0]**o + (0.744035222291)*x_ref[0] + (-0.209390892122)*x_ref[1]**o + (-0.577080617713)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.317380263574*x[0]**o + (-0.583852586655)*x[0] + (0.943687716371)*x[1]**o + (-0.960579343203)*x[1]
+        ref[(1, 1, 0, 2)]=-0.317380263574*x_ref[0]**o + (-0.583852586655)*x_ref[0] + (0.943687716371)*x_ref[1]**o + (-0.960579343203)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.658754483129*x[0]**o + (-0.904891436074)*x[0] + (-0.988107386359)*x[1]**o + (-0.104117417468)*x[1]
+        ref[(1, 1, 0, 3)]=0.658754483129*x_ref[0]**o + (-0.904891436074)*x_ref[0] + (-0.988107386359)*x_ref[1]**o + (-0.104117417468)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.0742156927824*x[0]**o + (0.286626869424)*x[0] + (-0.21224316928)*x[1]**o + (-0.0292440193266)*x[1]
+        ref[(1, 1, 1, 0)]=0.0742156927824*x_ref[0]**o + (0.286626869424)*x_ref[0] + (-0.21224316928)*x_ref[1]**o + (-0.0292440193266)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.47314022549*x[0]**o + (-0.99489212546)*x[0] + (-0.376678660934)*x[1]**o + (0.84554776686)*x[1]
+        ref[(1, 1, 1, 1)]=0.47314022549*x_ref[0]**o + (-0.99489212546)*x_ref[0] + (-0.376678660934)*x_ref[1]**o + (0.84554776686)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.803448995614*x[0]**o + (0.483577948017)*x[0] + (0.997800275847)*x[1]**o + (0.498643911031)*x[1]
+        ref[(1, 1, 1, 2)]=0.803448995614*x_ref[0]**o + (0.483577948017)*x_ref[0] + (0.997800275847)*x_ref[1]**o + (0.498643911031)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.75946770857*x[0]**o + (-0.0684201185385)*x[0] + (-0.749420958631)*x[1]**o + (-0.908338241363)*x[1]
+        ref[(1, 1, 1, 3)]=-0.75946770857*x_ref[0]**o + (-0.0684201185385)*x_ref[0] + (-0.749420958631)*x_ref[1]**o + (-0.908338241363)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.947507976137*x[0]**o + (-0.462555017075)*x[0] + (0.993918736185)*x[1]**o + (-0.658041052537)*x[1]
+        ref[(1, 1, 2, 0)]=-0.947507976137*x_ref[0]**o + (-0.462555017075)*x_ref[0] + (0.993918736185)*x_ref[1]**o + (-0.658041052537)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.161024981628*x[0]**o + (0.379349698659)*x[0] + (-0.497903271009)*x[1]**o + (0.927092402532)*x[1]
+        ref[(1, 1, 2, 1)]=-0.161024981628*x_ref[0]**o + (0.379349698659)*x_ref[0] + (-0.497903271009)*x_ref[1]**o + (0.927092402532)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.00026224936615*x[0]**o + (-0.916825831127)*x[0] + (-0.985529831569)*x[1]**o + (-0.661952551416)*x[1]
+        ref[(1, 1, 2, 2)]=-0.00026224936615*x_ref[0]**o + (-0.916825831127)*x_ref[0] + (-0.985529831569)*x_ref[1]**o + (-0.661952551416)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.0569681191797*x[0]**o + (-0.0511989266362)*x[0] + (0.79135636273)*x[1]**o + (-0.722234297086)*x[1]
+        ref[(1, 1, 2, 3)]=-0.0569681191797*x_ref[0]**o + (-0.0511989266362)*x_ref[0] + (0.79135636273)*x_ref[1]**o + (-0.722234297086)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.100449487453*x[0]**o + (-0.677297903574)*x[0] + (0.390761751655)*x[1]**o + (0.916689238252)*x[1]
+        ref[(1, 1, 3, 0)]=0.100449487453*x_ref[0]**o + (-0.677297903574)*x_ref[0] + (0.390761751655)*x_ref[1]**o + (0.916689238252)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.966719934889*x[0]**o + (-0.652470648337)*x[0] + (-0.210257987081)*x[1]**o + (-0.0175155803916)*x[1]
+        ref[(1, 1, 3, 1)]=0.966719934889*x_ref[0]**o + (-0.652470648337)*x_ref[0] + (-0.210257987081)*x_ref[1]**o + (-0.0175155803916)*x_ref[1]
+        arg[(1, 1, 3, 2)]=-0.642128503035*x[0]**o + (-0.277133153671)*x[0] + (0.222449232245)*x[1]**o + (-0.788075369934)*x[1]
+        ref[(1, 1, 3, 2)]=-0.642128503035*x_ref[0]**o + (-0.277133153671)*x_ref[0] + (0.222449232245)*x_ref[1]**o + (-0.788075369934)*x_ref[1]
+        arg[(1, 1, 3, 3)]=-0.961011657297*x[0]**o + (0.211459424636)*x[0] + (-0.945151765711)*x[1]**o + (0.105955118001)*x[1]
+        ref[(1, 1, 3, 3)]=-0.961011657297*x_ref[0]**o + (0.211459424636)*x_ref[0] + (-0.945151765711)*x_ref[1]**o + (0.105955118001)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.847809724297*x[0]**o + (-0.937664606067)*x[0] + (-0.930291677262)*x[1]**o + (0.599065642562)*x[1]
+        ref[(1, 2, 0, 0)]=-0.847809724297*x_ref[0]**o + (-0.937664606067)*x_ref[0] + (-0.930291677262)*x_ref[1]**o + (0.599065642562)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.872660244954*x[0]**o + (-0.110835202775)*x[0] + (-0.569941439094)*x[1]**o + (0.772271331826)*x[1]
+        ref[(1, 2, 0, 1)]=-0.872660244954*x_ref[0]**o + (-0.110835202775)*x_ref[0] + (-0.569941439094)*x_ref[1]**o + (0.772271331826)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.420143748369*x[0]**o + (0.140722854838)*x[0] + (0.470094015128)*x[1]**o + (-0.0721728221363)*x[1]
+        ref[(1, 2, 0, 2)]=0.420143748369*x_ref[0]**o + (0.140722854838)*x_ref[0] + (0.470094015128)*x_ref[1]**o + (-0.0721728221363)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.0718487960631*x[0]**o + (0.490010551209)*x[0] + (0.0830042446179)*x[1]**o + (0.655736709443)*x[1]
+        ref[(1, 2, 0, 3)]=0.0718487960631*x_ref[0]**o + (0.490010551209)*x_ref[0] + (0.0830042446179)*x_ref[1]**o + (0.655736709443)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.290603257787*x[0]**o + (-0.323483966021)*x[0] + (0.269393535501)*x[1]**o + (-0.174915844243)*x[1]
+        ref[(1, 2, 1, 0)]=-0.290603257787*x_ref[0]**o + (-0.323483966021)*x_ref[0] + (0.269393535501)*x_ref[1]**o + (-0.174915844243)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.78652165597*x[0]**o + (0.482895166343)*x[0] + (0.196659659445)*x[1]**o + (0.152202213453)*x[1]
+        ref[(1, 2, 1, 1)]=-0.78652165597*x_ref[0]**o + (0.482895166343)*x_ref[0] + (0.196659659445)*x_ref[1]**o + (0.152202213453)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.710304901902*x[0]**o + (-0.730573158705)*x[0] + (-0.635206676331)*x[1]**o + (-0.712588567299)*x[1]
+        ref[(1, 2, 1, 2)]=-0.710304901902*x_ref[0]**o + (-0.730573158705)*x_ref[0] + (-0.635206676331)*x_ref[1]**o + (-0.712588567299)*x_ref[1]
+        arg[(1, 2, 1, 3)]=0.357874572329*x[0]**o + (0.803848072116)*x[0] + (-0.962321684728)*x[1]**o + (0.131288175184)*x[1]
+        ref[(1, 2, 1, 3)]=0.357874572329*x_ref[0]**o + (0.803848072116)*x_ref[0] + (-0.962321684728)*x_ref[1]**o + (0.131288175184)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.94633417313*x[0]**o + (0.357152546346)*x[0] + (0.711392958576)*x[1]**o + (0.168880666299)*x[1]
+        ref[(1, 2, 2, 0)]=-0.94633417313*x_ref[0]**o + (0.357152546346)*x_ref[0] + (0.711392958576)*x_ref[1]**o + (0.168880666299)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.876990923068*x[0]**o + (-0.475391710885)*x[0] + (-0.927519014264)*x[1]**o + (0.109810678648)*x[1]
+        ref[(1, 2, 2, 1)]=-0.876990923068*x_ref[0]**o + (-0.475391710885)*x_ref[0] + (-0.927519014264)*x_ref[1]**o + (0.109810678648)*x_ref[1]
+        arg[(1, 2, 2, 2)]=0.504896284875*x[0]**o + (-0.426204159018)*x[0] + (0.652768607113)*x[1]**o + (0.47605522993)*x[1]
+        ref[(1, 2, 2, 2)]=0.504896284875*x_ref[0]**o + (-0.426204159018)*x_ref[0] + (0.652768607113)*x_ref[1]**o + (0.47605522993)*x_ref[1]
+        arg[(1, 2, 2, 3)]=-0.232682592644*x[0]**o + (-0.858710281516)*x[0] + (0.388889557056)*x[1]**o + (-0.575812952856)*x[1]
+        ref[(1, 2, 2, 3)]=-0.232682592644*x_ref[0]**o + (-0.858710281516)*x_ref[0] + (0.388889557056)*x_ref[1]**o + (-0.575812952856)*x_ref[1]
+        arg[(1, 2, 3, 0)]=0.30642985492*x[0]**o + (-0.705884107235)*x[0] + (-0.446218072888)*x[1]**o + (0.328441871891)*x[1]
+        ref[(1, 2, 3, 0)]=0.30642985492*x_ref[0]**o + (-0.705884107235)*x_ref[0] + (-0.446218072888)*x_ref[1]**o + (0.328441871891)*x_ref[1]
+        arg[(1, 2, 3, 1)]=-0.131716924414*x[0]**o + (0.612097535902)*x[0] + (-0.888123506702)*x[1]**o + (-0.523338312787)*x[1]
+        ref[(1, 2, 3, 1)]=-0.131716924414*x_ref[0]**o + (0.612097535902)*x_ref[0] + (-0.888123506702)*x_ref[1]**o + (-0.523338312787)*x_ref[1]
+        arg[(1, 2, 3, 2)]=0.31856912146*x[0]**o + (0.227161773315)*x[0] + (0.908669224693)*x[1]**o + (-0.0580144091896)*x[1]
+        ref[(1, 2, 3, 2)]=0.31856912146*x_ref[0]**o + (0.227161773315)*x_ref[0] + (0.908669224693)*x_ref[1]**o + (-0.0580144091896)*x_ref[1]
+        arg[(1, 2, 3, 3)]=-0.906738513762*x[0]**o + (0.835018129558)*x[0] + (-0.729633324778)*x[1]**o + (0.781325958434)*x[1]
+        ref[(1, 2, 3, 3)]=-0.906738513762*x_ref[0]**o + (0.835018129558)*x_ref[0] + (-0.729633324778)*x_ref[1]**o + (0.781325958434)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.0495468161174*x[0]**o + (-0.19852432664)*x[0] + (-0.19478416561)*x[1]**o + (0.677673075728)*x[1]
+        ref[(1, 3, 0, 0)]=0.0495468161174*x_ref[0]**o + (-0.19852432664)*x_ref[0] + (-0.19478416561)*x_ref[1]**o + (0.677673075728)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.20587948699*x[0]**o + (-0.466417133007)*x[0] + (0.752105239698)*x[1]**o + (-0.218546594752)*x[1]
+        ref[(1, 3, 0, 1)]=-0.20587948699*x_ref[0]**o + (-0.466417133007)*x_ref[0] + (0.752105239698)*x_ref[1]**o + (-0.218546594752)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.504574933105*x[0]**o + (0.119002389765)*x[0] + (-0.789150278673)*x[1]**o + (-0.83767340658)*x[1]
+        ref[(1, 3, 0, 2)]=0.504574933105*x_ref[0]**o + (0.119002389765)*x_ref[0] + (-0.789150278673)*x_ref[1]**o + (-0.83767340658)*x_ref[1]
+        arg[(1, 3, 0, 3)]=0.096964176132*x[0]**o + (-0.399591708924)*x[0] + (-0.549808549038)*x[1]**o + (-0.217292841924)*x[1]
+        ref[(1, 3, 0, 3)]=0.096964176132*x_ref[0]**o + (-0.399591708924)*x_ref[0] + (-0.549808549038)*x_ref[1]**o + (-0.217292841924)*x_ref[1]
+        arg[(1, 3, 1, 0)]=0.71326941241*x[0]**o + (-0.858970795088)*x[0] + (0.910240119172)*x[1]**o + (-0.222432165809)*x[1]
+        ref[(1, 3, 1, 0)]=0.71326941241*x_ref[0]**o + (-0.858970795088)*x_ref[0] + (0.910240119172)*x_ref[1]**o + (-0.222432165809)*x_ref[1]
+        arg[(1, 3, 1, 1)]=-0.75688013756*x[0]**o + (-0.909975166385)*x[0] + (0.864172662562)*x[1]**o + (0.147114997414)*x[1]
+        ref[(1, 3, 1, 1)]=-0.75688013756*x_ref[0]**o + (-0.909975166385)*x_ref[0] + (0.864172662562)*x_ref[1]**o + (0.147114997414)*x_ref[1]
+        arg[(1, 3, 1, 2)]=-0.615673973429*x[0]**o + (-0.211627555484)*x[0] + (0.232439197864)*x[1]**o + (-0.882421563841)*x[1]
+        ref[(1, 3, 1, 2)]=-0.615673973429*x_ref[0]**o + (-0.211627555484)*x_ref[0] + (0.232439197864)*x_ref[1]**o + (-0.882421563841)*x_ref[1]
+        arg[(1, 3, 1, 3)]=-0.409712860661*x[0]**o + (-0.177008729073)*x[0] + (0.286504813605)*x[1]**o + (0.0355677557858)*x[1]
+        ref[(1, 3, 1, 3)]=-0.409712860661*x_ref[0]**o + (-0.177008729073)*x_ref[0] + (0.286504813605)*x_ref[1]**o + (0.0355677557858)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.0728493689765*x[0]**o + (-0.957984311524)*x[0] + (0.559919025639)*x[1]**o + (0.77093278647)*x[1]
+        ref[(1, 3, 2, 0)]=0.0728493689765*x_ref[0]**o + (-0.957984311524)*x_ref[0] + (0.559919025639)*x_ref[1]**o + (0.77093278647)*x_ref[1]
+        arg[(1, 3, 2, 1)]=-0.895002366443*x[0]**o + (0.830197873784)*x[0] + (0.688497027787)*x[1]**o + (0.302037918646)*x[1]
+        ref[(1, 3, 2, 1)]=-0.895002366443*x_ref[0]**o + (0.830197873784)*x_ref[0] + (0.688497027787)*x_ref[1]**o + (0.302037918646)*x_ref[1]
+        arg[(1, 3, 2, 2)]=-0.102639969388*x[0]**o + (0.13232279409)*x[0] + (0.820367873379)*x[1]**o + (0.637690791536)*x[1]
+        ref[(1, 3, 2, 2)]=-0.102639969388*x_ref[0]**o + (0.13232279409)*x_ref[0] + (0.820367873379)*x_ref[1]**o + (0.637690791536)*x_ref[1]
+        arg[(1, 3, 2, 3)]=-0.95312711477*x[0]**o + (-0.0275481791599)*x[0] + (0.0448349261447)*x[1]**o + (0.943772299472)*x[1]
+        ref[(1, 3, 2, 3)]=-0.95312711477*x_ref[0]**o + (-0.0275481791599)*x_ref[0] + (0.0448349261447)*x_ref[1]**o + (0.943772299472)*x_ref[1]
+        arg[(1, 3, 3, 0)]=-0.499299631851*x[0]**o + (-0.403623290668)*x[0] + (0.577833558055)*x[1]**o + (0.613930692831)*x[1]
+        ref[(1, 3, 3, 0)]=-0.499299631851*x_ref[0]**o + (-0.403623290668)*x_ref[0] + (0.577833558055)*x_ref[1]**o + (0.613930692831)*x_ref[1]
+        arg[(1, 3, 3, 1)]=0.855705068095*x[0]**o + (0.0725120228119)*x[0] + (-0.696509540232)*x[1]**o + (-0.137019039277)*x[1]
+        ref[(1, 3, 3, 1)]=0.855705068095*x_ref[0]**o + (0.0725120228119)*x_ref[0] + (-0.696509540232)*x_ref[1]**o + (-0.137019039277)*x_ref[1]
+        arg[(1, 3, 3, 2)]=0.081302435473*x[0]**o + (-0.0209652789269)*x[0] + (-0.865757976161)*x[1]**o + (-0.526814989834)*x[1]
+        ref[(1, 3, 3, 2)]=0.081302435473*x_ref[0]**o + (-0.0209652789269)*x_ref[0] + (-0.865757976161)*x_ref[1]**o + (-0.526814989834)*x_ref[1]
+        arg[(1, 3, 3, 3)]=-0.244950432019*x[0]**o + (0.91726135792)*x[0] + (0.39913232076)*x[1]**o + (-0.626726128782)*x[1]
+        ref[(1, 3, 3, 3)]=-0.244950432019*x_ref[0]**o + (0.91726135792)*x_ref[0] + (0.39913232076)*x_ref[1]**o + (-0.626726128782)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.391683574125*x[0]**o + (0.262969685697)*x[0] + (0.527354445399)*x[1]**o + (-0.869340164719)*x[1]
+        ref[(2, 0, 0, 0)]=0.391683574125*x_ref[0]**o + (0.262969685697)*x_ref[0] + (0.527354445399)*x_ref[1]**o + (-0.869340164719)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.53613241993*x[0]**o + (0.161175902828)*x[0] + (-0.143237190964)*x[1]**o + (-0.617525738769)*x[1]
+        ref[(2, 0, 0, 1)]=-0.53613241993*x_ref[0]**o + (0.161175902828)*x_ref[0] + (-0.143237190964)*x_ref[1]**o + (-0.617525738769)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.693158084954*x[0]**o + (0.855548778217)*x[0] + (0.416195926456)*x[1]**o + (0.18523789398)*x[1]
+        ref[(2, 0, 0, 2)]=-0.693158084954*x_ref[0]**o + (0.855548778217)*x_ref[0] + (0.416195926456)*x_ref[1]**o + (0.18523789398)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.536720579627*x[0]**o + (0.302423469281)*x[0] + (0.958402465265)*x[1]**o + (0.177380350136)*x[1]
+        ref[(2, 0, 0, 3)]=-0.536720579627*x_ref[0]**o + (0.302423469281)*x_ref[0] + (0.958402465265)*x_ref[1]**o + (0.177380350136)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.933766566456*x[0]**o + (0.633097820346)*x[0] + (0.489155909957)*x[1]**o + (0.422697394102)*x[1]
+        ref[(2, 0, 1, 0)]=0.933766566456*x_ref[0]**o + (0.633097820346)*x_ref[0] + (0.489155909957)*x_ref[1]**o + (0.422697394102)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.765765932719*x[0]**o + (0.134775214909)*x[0] + (0.811129389045)*x[1]**o + (-0.0477234515467)*x[1]
+        ref[(2, 0, 1, 1)]=-0.765765932719*x_ref[0]**o + (0.134775214909)*x_ref[0] + (0.811129389045)*x_ref[1]**o + (-0.0477234515467)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.626995690585*x[0]**o + (-0.546876906025)*x[0] + (0.449198544963)*x[1]**o + (0.689089682335)*x[1]
+        ref[(2, 0, 1, 2)]=0.626995690585*x_ref[0]**o + (-0.546876906025)*x_ref[0] + (0.449198544963)*x_ref[1]**o + (0.689089682335)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.536535958516*x[0]**o + (0.541459494769)*x[0] + (0.194425251316)*x[1]**o + (0.997182662471)*x[1]
+        ref[(2, 0, 1, 3)]=-0.536535958516*x_ref[0]**o + (0.541459494769)*x_ref[0] + (0.194425251316)*x_ref[1]**o + (0.997182662471)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.997806643619*x[0]**o + (-0.0872673520441)*x[0] + (0.585858381777)*x[1]**o + (-0.976228158386)*x[1]
+        ref[(2, 0, 2, 0)]=-0.997806643619*x_ref[0]**o + (-0.0872673520441)*x_ref[0] + (0.585858381777)*x_ref[1]**o + (-0.976228158386)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.891017735135*x[0]**o + (0.503146439081)*x[0] + (-0.903596445324)*x[1]**o + (-0.248659779807)*x[1]
+        ref[(2, 0, 2, 1)]=-0.891017735135*x_ref[0]**o + (0.503146439081)*x_ref[0] + (-0.903596445324)*x_ref[1]**o + (-0.248659779807)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.679561883965*x[0]**o + (-0.5016019138)*x[0] + (0.599460412941)*x[1]**o + (0.813420226606)*x[1]
+        ref[(2, 0, 2, 2)]=0.679561883965*x_ref[0]**o + (-0.5016019138)*x_ref[0] + (0.599460412941)*x_ref[1]**o + (0.813420226606)*x_ref[1]
+        arg[(2, 0, 2, 3)]=0.366574396873*x[0]**o + (-0.0534947967465)*x[0] + (0.578191327487)*x[1]**o + (-0.53221847331)*x[1]
+        ref[(2, 0, 2, 3)]=0.366574396873*x_ref[0]**o + (-0.0534947967465)*x_ref[0] + (0.578191327487)*x_ref[1]**o + (-0.53221847331)*x_ref[1]
+        arg[(2, 0, 3, 0)]=-0.465042558649*x[0]**o + (-0.948458939003)*x[0] + (0.897238578462)*x[1]**o + (-0.622917462149)*x[1]
+        ref[(2, 0, 3, 0)]=-0.465042558649*x_ref[0]**o + (-0.948458939003)*x_ref[0] + (0.897238578462)*x_ref[1]**o + (-0.622917462149)*x_ref[1]
+        arg[(2, 0, 3, 1)]=-0.128601544746*x[0]**o + (-0.630455941536)*x[0] + (-0.591709348811)*x[1]**o + (-0.226575656799)*x[1]
+        ref[(2, 0, 3, 1)]=-0.128601544746*x_ref[0]**o + (-0.630455941536)*x_ref[0] + (-0.591709348811)*x_ref[1]**o + (-0.226575656799)*x_ref[1]
+        arg[(2, 0, 3, 2)]=0.922573159675*x[0]**o + (0.508126848867)*x[0] + (-0.967492095631)*x[1]**o + (0.225255032187)*x[1]
+        ref[(2, 0, 3, 2)]=0.922573159675*x_ref[0]**o + (0.508126848867)*x_ref[0] + (-0.967492095631)*x_ref[1]**o + (0.225255032187)*x_ref[1]
+        arg[(2, 0, 3, 3)]=0.110610492763*x[0]**o + (0.395210126571)*x[0] + (-0.227998549821)*x[1]**o + (0.624327586395)*x[1]
+        ref[(2, 0, 3, 3)]=0.110610492763*x_ref[0]**o + (0.395210126571)*x_ref[0] + (-0.227998549821)*x_ref[1]**o + (0.624327586395)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.267050932818*x[0]**o + (0.679195766425)*x[0] + (-0.17677516457)*x[1]**o + (0.752505760252)*x[1]
+        ref[(2, 1, 0, 0)]=0.267050932818*x_ref[0]**o + (0.679195766425)*x_ref[0] + (-0.17677516457)*x_ref[1]**o + (0.752505760252)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.267345419339*x[0]**o + (0.878311332634)*x[0] + (-0.680363736104)*x[1]**o + (0.220231559784)*x[1]
+        ref[(2, 1, 0, 1)]=0.267345419339*x_ref[0]**o + (0.878311332634)*x_ref[0] + (-0.680363736104)*x_ref[1]**o + (0.220231559784)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.150581662481*x[0]**o + (-0.488751707958)*x[0] + (0.169814610646)*x[1]**o + (0.176059237349)*x[1]
+        ref[(2, 1, 0, 2)]=-0.150581662481*x_ref[0]**o + (-0.488751707958)*x_ref[0] + (0.169814610646)*x_ref[1]**o + (0.176059237349)*x_ref[1]
+        arg[(2, 1, 0, 3)]=0.249392878188*x[0]**o + (-0.623841300666)*x[0] + (0.559386451582)*x[1]**o + (0.708021551409)*x[1]
+        ref[(2, 1, 0, 3)]=0.249392878188*x_ref[0]**o + (-0.623841300666)*x_ref[0] + (0.559386451582)*x_ref[1]**o + (0.708021551409)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.458588181622*x[0]**o + (-0.112354853798)*x[0] + (0.0676502969105)*x[1]**o + (0.389949547124)*x[1]
+        ref[(2, 1, 1, 0)]=0.458588181622*x_ref[0]**o + (-0.112354853798)*x_ref[0] + (0.0676502969105)*x_ref[1]**o + (0.389949547124)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.829494707286*x[0]**o + (-0.460584732484)*x[0] + (-0.524752968981)*x[1]**o + (0.244976143587)*x[1]
+        ref[(2, 1, 1, 1)]=0.829494707286*x_ref[0]**o + (-0.460584732484)*x_ref[0] + (-0.524752968981)*x_ref[1]**o + (0.244976143587)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.33607171802*x[0]**o + (-0.727498744813)*x[0] + (-0.0671976004211)*x[1]**o + (0.668853472466)*x[1]
+        ref[(2, 1, 1, 2)]=-0.33607171802*x_ref[0]**o + (-0.727498744813)*x_ref[0] + (-0.0671976004211)*x_ref[1]**o + (0.668853472466)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.575622485379*x[0]**o + (0.56976384966)*x[0] + (-0.660181796827)*x[1]**o + (0.675111786258)*x[1]
+        ref[(2, 1, 1, 3)]=-0.575622485379*x_ref[0]**o + (0.56976384966)*x_ref[0] + (-0.660181796827)*x_ref[1]**o + (0.675111786258)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.699323619844*x[0]**o + (0.357740131198)*x[0] + (-0.471829046843)*x[1]**o + (-0.988171928537)*x[1]
+        ref[(2, 1, 2, 0)]=0.699323619844*x_ref[0]**o + (0.357740131198)*x_ref[0] + (-0.471829046843)*x_ref[1]**o + (-0.988171928537)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.622346876569*x[0]**o + (-0.217160054474)*x[0] + (0.355668174762)*x[1]**o + (0.142144382331)*x[1]
+        ref[(2, 1, 2, 1)]=0.622346876569*x_ref[0]**o + (-0.217160054474)*x_ref[0] + (0.355668174762)*x_ref[1]**o + (0.142144382331)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.702935645422*x[0]**o + (-0.959837032318)*x[0] + (0.690412381811)*x[1]**o + (0.372188291568)*x[1]
+        ref[(2, 1, 2, 2)]=0.702935645422*x_ref[0]**o + (-0.959837032318)*x_ref[0] + (0.690412381811)*x_ref[1]**o + (0.372188291568)*x_ref[1]
+        arg[(2, 1, 2, 3)]=0.22289110498*x[0]**o + (0.00342009448788)*x[0] + (-0.252573674954)*x[1]**o + (0.544177588676)*x[1]
+        ref[(2, 1, 2, 3)]=0.22289110498*x_ref[0]**o + (0.00342009448788)*x_ref[0] + (-0.252573674954)*x_ref[1]**o + (0.544177588676)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.0719632697948*x[0]**o + (0.994751068161)*x[0] + (-0.860116576419)*x[1]**o + (0.0084932688279)*x[1]
+        ref[(2, 1, 3, 0)]=0.0719632697948*x_ref[0]**o + (0.994751068161)*x_ref[0] + (-0.860116576419)*x_ref[1]**o + (0.0084932688279)*x_ref[1]
+        arg[(2, 1, 3, 1)]=0.0685439798378*x[0]**o + (0.199025429637)*x[0] + (0.962713724727)*x[1]**o + (0.03246226828)*x[1]
+        ref[(2, 1, 3, 1)]=0.0685439798378*x_ref[0]**o + (0.199025429637)*x_ref[0] + (0.962713724727)*x_ref[1]**o + (0.03246226828)*x_ref[1]
+        arg[(2, 1, 3, 2)]=0.474533647905*x[0]**o + (-0.804905703604)*x[0] + (0.998551774384)*x[1]**o + (0.940233861191)*x[1]
+        ref[(2, 1, 3, 2)]=0.474533647905*x_ref[0]**o + (-0.804905703604)*x_ref[0] + (0.998551774384)*x_ref[1]**o + (0.940233861191)*x_ref[1]
+        arg[(2, 1, 3, 3)]=0.528987768403*x[0]**o + (-0.311202136182)*x[0] + (0.735392560901)*x[1]**o + (0.475590533395)*x[1]
+        ref[(2, 1, 3, 3)]=0.528987768403*x_ref[0]**o + (-0.311202136182)*x_ref[0] + (0.735392560901)*x_ref[1]**o + (0.475590533395)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.37354608141*x[0]**o + (0.681384224929)*x[0] + (0.452249158464)*x[1]**o + (-0.103535060484)*x[1]
+        ref[(2, 2, 0, 0)]=-0.37354608141*x_ref[0]**o + (0.681384224929)*x_ref[0] + (0.452249158464)*x_ref[1]**o + (-0.103535060484)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.847234291511*x[0]**o + (0.868941019092)*x[0] + (0.680460247189)*x[1]**o + (-0.314387661943)*x[1]
+        ref[(2, 2, 0, 1)]=-0.847234291511*x_ref[0]**o + (0.868941019092)*x_ref[0] + (0.680460247189)*x_ref[1]**o + (-0.314387661943)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.469319056335*x[0]**o + (-0.247961641034)*x[0] + (-0.0886342292271)*x[1]**o + (0.639433963322)*x[1]
+        ref[(2, 2, 0, 2)]=0.469319056335*x_ref[0]**o + (-0.247961641034)*x_ref[0] + (-0.0886342292271)*x_ref[1]**o + (0.639433963322)*x_ref[1]
+        arg[(2, 2, 0, 3)]=0.242018644249*x[0]**o + (0.909034045086)*x[0] + (-0.374419892233)*x[1]**o + (0.202176417312)*x[1]
+        ref[(2, 2, 0, 3)]=0.242018644249*x_ref[0]**o + (0.909034045086)*x_ref[0] + (-0.374419892233)*x_ref[1]**o + (0.202176417312)*x_ref[1]
+        arg[(2, 2, 1, 0)]=0.641623065372*x[0]**o + (0.180811398183)*x[0] + (-0.993963751654)*x[1]**o + (-0.832041532784)*x[1]
+        ref[(2, 2, 1, 0)]=0.641623065372*x_ref[0]**o + (0.180811398183)*x_ref[0] + (-0.993963751654)*x_ref[1]**o + (-0.832041532784)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.201035112863*x[0]**o + (-0.227883170021)*x[0] + (0.144938015166)*x[1]**o + (-0.448544988133)*x[1]
+        ref[(2, 2, 1, 1)]=0.201035112863*x_ref[0]**o + (-0.227883170021)*x_ref[0] + (0.144938015166)*x_ref[1]**o + (-0.448544988133)*x_ref[1]
+        arg[(2, 2, 1, 2)]=0.471129841838*x[0]**o + (0.862778830852)*x[0] + (0.0811806994844)*x[1]**o + (0.252032214892)*x[1]
+        ref[(2, 2, 1, 2)]=0.471129841838*x_ref[0]**o + (0.862778830852)*x_ref[0] + (0.0811806994844)*x_ref[1]**o + (0.252032214892)*x_ref[1]
+        arg[(2, 2, 1, 3)]=0.839693453367*x[0]**o + (0.969976059706)*x[0] + (-0.152230500472)*x[1]**o + (-0.807975545463)*x[1]
+        ref[(2, 2, 1, 3)]=0.839693453367*x_ref[0]**o + (0.969976059706)*x_ref[0] + (-0.152230500472)*x_ref[1]**o + (-0.807975545463)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.103787848795*x[0]**o + (0.880923279049)*x[0] + (0.693079261237)*x[1]**o + (-0.102028507294)*x[1]
+        ref[(2, 2, 2, 0)]=-0.103787848795*x_ref[0]**o + (0.880923279049)*x_ref[0] + (0.693079261237)*x_ref[1]**o + (-0.102028507294)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.456800817956*x[0]**o + (0.700791428546)*x[0] + (-0.997499767289)*x[1]**o + (0.881319867903)*x[1]
+        ref[(2, 2, 2, 1)]=0.456800817956*x_ref[0]**o + (0.700791428546)*x_ref[0] + (-0.997499767289)*x_ref[1]**o + (0.881319867903)*x_ref[1]
+        arg[(2, 2, 2, 2)]=0.376549669982*x[0]**o + (-0.083306136882)*x[0] + (-0.337551223025)*x[1]**o + (0.760713333477)*x[1]
+        ref[(2, 2, 2, 2)]=0.376549669982*x_ref[0]**o + (-0.083306136882)*x_ref[0] + (-0.337551223025)*x_ref[1]**o + (0.760713333477)*x_ref[1]
+        arg[(2, 2, 2, 3)]=0.636750835988*x[0]**o + (0.388498723866)*x[0] + (-0.0613768974692)*x[1]**o + (-0.429785410968)*x[1]
+        ref[(2, 2, 2, 3)]=0.636750835988*x_ref[0]**o + (0.388498723866)*x_ref[0] + (-0.0613768974692)*x_ref[1]**o + (-0.429785410968)*x_ref[1]
+        arg[(2, 2, 3, 0)]=-0.425409746126*x[0]**o + (-0.346861553304)*x[0] + (-0.831714965464)*x[1]**o + (0.80103051086)*x[1]
+        ref[(2, 2, 3, 0)]=-0.425409746126*x_ref[0]**o + (-0.346861553304)*x_ref[0] + (-0.831714965464)*x_ref[1]**o + (0.80103051086)*x_ref[1]
+        arg[(2, 2, 3, 1)]=0.94893726665*x[0]**o + (0.165643826028)*x[0] + (0.353103932802)*x[1]**o + (-0.572265749904)*x[1]
+        ref[(2, 2, 3, 1)]=0.94893726665*x_ref[0]**o + (0.165643826028)*x_ref[0] + (0.353103932802)*x_ref[1]**o + (-0.572265749904)*x_ref[1]
+        arg[(2, 2, 3, 2)]=0.717819718006*x[0]**o + (-0.405755103247)*x[0] + (-0.178367370501)*x[1]**o + (-0.807693670491)*x[1]
+        ref[(2, 2, 3, 2)]=0.717819718006*x_ref[0]**o + (-0.405755103247)*x_ref[0] + (-0.178367370501)*x_ref[1]**o + (-0.807693670491)*x_ref[1]
+        arg[(2, 2, 3, 3)]=0.785617170856*x[0]**o + (-0.595178382405)*x[0] + (-0.295907528125)*x[1]**o + (0.988639133249)*x[1]
+        ref[(2, 2, 3, 3)]=0.785617170856*x_ref[0]**o + (-0.595178382405)*x_ref[0] + (-0.295907528125)*x_ref[1]**o + (0.988639133249)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.226937102482*x[0]**o + (-0.260428633809)*x[0] + (0.961912738351)*x[1]**o + (0.967966738385)*x[1]
+        ref[(2, 3, 0, 0)]=0.226937102482*x_ref[0]**o + (-0.260428633809)*x_ref[0] + (0.961912738351)*x_ref[1]**o + (0.967966738385)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.628868846716*x[0]**o + (0.743774135684)*x[0] + (-0.720150591728)*x[1]**o + (-0.867508922256)*x[1]
+        ref[(2, 3, 0, 1)]=0.628868846716*x_ref[0]**o + (0.743774135684)*x_ref[0] + (-0.720150591728)*x_ref[1]**o + (-0.867508922256)*x_ref[1]
+        arg[(2, 3, 0, 2)]=-0.792198933829*x[0]**o + (0.567849784261)*x[0] + (-0.500489421634)*x[1]**o + (-0.490337388843)*x[1]
+        ref[(2, 3, 0, 2)]=-0.792198933829*x_ref[0]**o + (0.567849784261)*x_ref[0] + (-0.500489421634)*x_ref[1]**o + (-0.490337388843)*x_ref[1]
+        arg[(2, 3, 0, 3)]=-0.319008522285*x[0]**o + (0.527666753661)*x[0] + (0.715813421051)*x[1]**o + (-0.251286517032)*x[1]
+        ref[(2, 3, 0, 3)]=-0.319008522285*x_ref[0]**o + (0.527666753661)*x_ref[0] + (0.715813421051)*x_ref[1]**o + (-0.251286517032)*x_ref[1]
+        arg[(2, 3, 1, 0)]=-0.757536947548*x[0]**o + (-0.609109572944)*x[0] + (-0.938388900311)*x[1]**o + (-0.535509284969)*x[1]
+        ref[(2, 3, 1, 0)]=-0.757536947548*x_ref[0]**o + (-0.609109572944)*x_ref[0] + (-0.938388900311)*x_ref[1]**o + (-0.535509284969)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.941578335428*x[0]**o + (0.0709219260653)*x[0] + (-0.0558506836623)*x[1]**o + (-0.981656838609)*x[1]
+        ref[(2, 3, 1, 1)]=-0.941578335428*x_ref[0]**o + (0.0709219260653)*x_ref[0] + (-0.0558506836623)*x_ref[1]**o + (-0.981656838609)*x_ref[1]
+        arg[(2, 3, 1, 2)]=-0.578106183599*x[0]**o + (-0.926430212909)*x[0] + (0.834978107141)*x[1]**o + (-0.204618037842)*x[1]
+        ref[(2, 3, 1, 2)]=-0.578106183599*x_ref[0]**o + (-0.926430212909)*x_ref[0] + (0.834978107141)*x_ref[1]**o + (-0.204618037842)*x_ref[1]
+        arg[(2, 3, 1, 3)]=0.096782901622*x[0]**o + (-0.6115004319)*x[0] + (-0.0909851120879)*x[1]**o + (0.443918176848)*x[1]
+        ref[(2, 3, 1, 3)]=0.096782901622*x_ref[0]**o + (-0.6115004319)*x_ref[0] + (-0.0909851120879)*x_ref[1]**o + (0.443918176848)*x_ref[1]
+        arg[(2, 3, 2, 0)]=0.288544453609*x[0]**o + (0.143833537972)*x[0] + (0.77598129855)*x[1]**o + (0.87472465685)*x[1]
+        ref[(2, 3, 2, 0)]=0.288544453609*x_ref[0]**o + (0.143833537972)*x_ref[0] + (0.77598129855)*x_ref[1]**o + (0.87472465685)*x_ref[1]
+        arg[(2, 3, 2, 1)]=0.740132887404*x[0]**o + (-0.392853409551)*x[0] + (0.991923860094)*x[1]**o + (-0.463979137948)*x[1]
+        ref[(2, 3, 2, 1)]=0.740132887404*x_ref[0]**o + (-0.392853409551)*x_ref[0] + (0.991923860094)*x_ref[1]**o + (-0.463979137948)*x_ref[1]
+        arg[(2, 3, 2, 2)]=-0.99608624212*x[0]**o + (-0.63193468569)*x[0] + (-0.350876036269)*x[1]**o + (-0.217809780019)*x[1]
+        ref[(2, 3, 2, 2)]=-0.99608624212*x_ref[0]**o + (-0.63193468569)*x_ref[0] + (-0.350876036269)*x_ref[1]**o + (-0.217809780019)*x_ref[1]
+        arg[(2, 3, 2, 3)]=-0.180267754196*x[0]**o + (0.0615722685339)*x[0] + (-0.935452748475)*x[1]**o + (0.104150342401)*x[1]
+        ref[(2, 3, 2, 3)]=-0.180267754196*x_ref[0]**o + (0.0615722685339)*x_ref[0] + (-0.935452748475)*x_ref[1]**o + (0.104150342401)*x_ref[1]
+        arg[(2, 3, 3, 0)]=0.203765496251*x[0]**o + (-0.662939138944)*x[0] + (0.815872128188)*x[1]**o + (0.444709063918)*x[1]
+        ref[(2, 3, 3, 0)]=0.203765496251*x_ref[0]**o + (-0.662939138944)*x_ref[0] + (0.815872128188)*x_ref[1]**o + (0.444709063918)*x_ref[1]
+        arg[(2, 3, 3, 1)]=-0.909271930873*x[0]**o + (-0.146940208248)*x[0] + (0.450011189177)*x[1]**o + (0.58872755849)*x[1]
+        ref[(2, 3, 3, 1)]=-0.909271930873*x_ref[0]**o + (-0.146940208248)*x_ref[0] + (0.450011189177)*x_ref[1]**o + (0.58872755849)*x_ref[1]
+        arg[(2, 3, 3, 2)]=-0.248520383626*x[0]**o + (0.0921523886371)*x[0] + (0.785623410031)*x[1]**o + (-0.25184297655)*x[1]
+        ref[(2, 3, 3, 2)]=-0.248520383626*x_ref[0]**o + (0.0921523886371)*x_ref[0] + (0.785623410031)*x_ref[1]**o + (-0.25184297655)*x_ref[1]
+        arg[(2, 3, 3, 3)]=0.281676850158*x[0]**o + (0.291224287137)*x[0] + (-0.621504748577)*x[1]**o + (0.345111929357)*x[1]
+        ref[(2, 3, 3, 3)]=0.281676850158*x_ref[0]**o + (0.291224287137)*x_ref[0] + (-0.621504748577)*x_ref[1]**o + (0.345111929357)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.979749862346*x[2]**o + (0.232371662779)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.979749862346*x_ref[2]**o + (0.232371662779)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.377345556904*x[2]**o + (0.60931425016)*x[2]
+            ref[(0, 0, 0, 1)]+=0.377345556904*x_ref[2]**o + (0.60931425016)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.861046179577*x[2]**o + (-0.647362523834)*x[2]
+            ref[(0, 0, 0, 2)]+=-0.861046179577*x_ref[2]**o + (-0.647362523834)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.28385030429*x[2]**o + (0.356978732444)*x[2]
+            ref[(0, 0, 0, 3)]+=0.28385030429*x_ref[2]**o + (0.356978732444)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.591275491051*x[2]**o + (0.135554013294)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.591275491051*x_ref[2]**o + (0.135554013294)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.226470085352*x[2]**o + (0.938442463169)*x[2]
+            ref[(0, 0, 1, 1)]+=0.226470085352*x_ref[2]**o + (0.938442463169)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.346321780672*x[2]**o + (0.9295042962)*x[2]
+            ref[(0, 0, 1, 2)]+=0.346321780672*x_ref[2]**o + (0.9295042962)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.493015113474*x[2]**o + (0.782458395286)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.493015113474*x_ref[2]**o + (0.782458395286)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.132318445858*x[2]**o + (-0.36355587273)*x[2]
+            ref[(0, 0, 2, 0)]+=0.132318445858*x_ref[2]**o + (-0.36355587273)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.569394666015*x[2]**o + (-0.668904051797)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.569394666015*x_ref[2]**o + (-0.668904051797)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.639135894373*x[2]**o + (-0.44321687337)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.639135894373*x_ref[2]**o + (-0.44321687337)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=0.229900942275*x[2]**o + (-0.82231962311)*x[2]
+            ref[(0, 0, 2, 3)]+=0.229900942275*x_ref[2]**o + (-0.82231962311)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.345236610772*x[2]**o + (-0.363815581833)*x[2]
+            ref[(0, 0, 3, 0)]+=0.345236610772*x_ref[2]**o + (-0.363815581833)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.138769274183*x[2]**o + (0.827470433911)*x[2]
+            ref[(0, 0, 3, 1)]+=0.138769274183*x_ref[2]**o + (0.827470433911)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=-0.496240590752*x[2]**o + (-0.319422949903)*x[2]
+            ref[(0, 0, 3, 2)]+=-0.496240590752*x_ref[2]**o + (-0.319422949903)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=0.378405297446*x[2]**o + (0.352878671032)*x[2]
+            ref[(0, 0, 3, 3)]+=0.378405297446*x_ref[2]**o + (0.352878671032)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.790108199966*x[2]**o + (0.288475896759)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.790108199966*x_ref[2]**o + (0.288475896759)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.739424430823*x[2]**o + (-0.583867240697)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.739424430823*x_ref[2]**o + (-0.583867240697)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.444202894778*x[2]**o + (-0.904395353004)*x[2]
+            ref[(0, 1, 0, 2)]+=0.444202894778*x_ref[2]**o + (-0.904395353004)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.916286941016*x[2]**o + (-0.963193155007)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.916286941016*x_ref[2]**o + (-0.963193155007)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.51264957979*x[2]**o + (0.865025701488)*x[2]
+            ref[(0, 1, 1, 0)]+=0.51264957979*x_ref[2]**o + (0.865025701488)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.60237402117*x[2]**o + (0.845997452898)*x[2]
+            ref[(0, 1, 1, 1)]+=0.60237402117*x_ref[2]**o + (0.845997452898)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.792811180104*x[2]**o + (-0.702142682436)*x[2]
+            ref[(0, 1, 1, 2)]+=0.792811180104*x_ref[2]**o + (-0.702142682436)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=0.791681288768*x[2]**o + (-0.0830487142795)*x[2]
+            ref[(0, 1, 1, 3)]+=0.791681288768*x_ref[2]**o + (-0.0830487142795)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.724060530856*x[2]**o + (0.29264621425)*x[2]
+            ref[(0, 1, 2, 0)]+=0.724060530856*x_ref[2]**o + (0.29264621425)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.652430527025*x[2]**o + (-0.284494224229)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.652430527025*x_ref[2]**o + (-0.284494224229)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.365664174894*x[2]**o + (0.408329649004)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.365664174894*x_ref[2]**o + (0.408329649004)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.746717423165*x[2]**o + (0.938463722772)*x[2]
+            ref[(0, 1, 2, 3)]+=0.746717423165*x_ref[2]**o + (0.938463722772)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=0.337223834137*x[2]**o + (0.963850642951)*x[2]
+            ref[(0, 1, 3, 0)]+=0.337223834137*x_ref[2]**o + (0.963850642951)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=0.943295268467*x[2]**o + (-0.107349067624)*x[2]
+            ref[(0, 1, 3, 1)]+=0.943295268467*x_ref[2]**o + (-0.107349067624)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.0446507917715*x[2]**o + (0.307385281136)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.0446507917715*x_ref[2]**o + (0.307385281136)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=-0.387366142328*x[2]**o + (-0.753512171008)*x[2]
+            ref[(0, 1, 3, 3)]+=-0.387366142328*x_ref[2]**o + (-0.753512171008)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.512010095308*x[2]**o + (-0.554558711403)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.512010095308*x_ref[2]**o + (-0.554558711403)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.699939784986*x[2]**o + (0.103682977079)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.699939784986*x_ref[2]**o + (0.103682977079)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.245694764054*x[2]**o + (0.230900013285)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.245694764054*x_ref[2]**o + (0.230900013285)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=-0.189415698612*x[2]**o + (-0.196084256604)*x[2]
+            ref[(0, 2, 0, 3)]+=-0.189415698612*x_ref[2]**o + (-0.196084256604)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.78318413592*x[2]**o + (0.0025810483082)*x[2]
+            ref[(0, 2, 1, 0)]+=0.78318413592*x_ref[2]**o + (0.0025810483082)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.754811176825*x[2]**o + (0.198014017339)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.754811176825*x_ref[2]**o + (0.198014017339)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.858796911247*x[2]**o + (0.54474740197)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.858796911247*x_ref[2]**o + (0.54474740197)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=0.674019939728*x[2]**o + (0.336672794305)*x[2]
+            ref[(0, 2, 1, 3)]+=0.674019939728*x_ref[2]**o + (0.336672794305)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.626170271667*x[2]**o + (0.217500184963)*x[2]
+            ref[(0, 2, 2, 0)]+=-0.626170271667*x_ref[2]**o + (0.217500184963)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.0182065544497*x[2]**o + (-0.352045582363)*x[2]
+            ref[(0, 2, 2, 1)]+=0.0182065544497*x_ref[2]**o + (-0.352045582363)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.413128423124*x[2]**o + (0.443580229414)*x[2]
+            ref[(0, 2, 2, 2)]+=0.413128423124*x_ref[2]**o + (0.443580229414)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=0.822067987385*x[2]**o + (-0.435225201501)*x[2]
+            ref[(0, 2, 2, 3)]+=0.822067987385*x_ref[2]**o + (-0.435225201501)*x_ref[2]
+            arg[(0, 2, 3, 0)]+=0.886313268798*x[2]**o + (0.414160400688)*x[2]
+            ref[(0, 2, 3, 0)]+=0.886313268798*x_ref[2]**o + (0.414160400688)*x_ref[2]
+            arg[(0, 2, 3, 1)]+=0.39266211501*x[2]**o + (0.00489039785927)*x[2]
+            ref[(0, 2, 3, 1)]+=0.39266211501*x_ref[2]**o + (0.00489039785927)*x_ref[2]
+            arg[(0, 2, 3, 2)]+=0.728365721104*x[2]**o + (0.00452778573103)*x[2]
+            ref[(0, 2, 3, 2)]+=0.728365721104*x_ref[2]**o + (0.00452778573103)*x_ref[2]
+            arg[(0, 2, 3, 3)]+=0.595393191697*x[2]**o + (-0.336624582855)*x[2]
+            ref[(0, 2, 3, 3)]+=0.595393191697*x_ref[2]**o + (-0.336624582855)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.804637313168*x[2]**o + (0.929924471004)*x[2]
+            ref[(0, 3, 0, 0)]+=-0.804637313168*x_ref[2]**o + (0.929924471004)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.408133071686*x[2]**o + (0.328548655886)*x[2]
+            ref[(0, 3, 0, 1)]+=0.408133071686*x_ref[2]**o + (0.328548655886)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=-0.624129184642*x[2]**o + (-0.354523473178)*x[2]
+            ref[(0, 3, 0, 2)]+=-0.624129184642*x_ref[2]**o + (-0.354523473178)*x_ref[2]
+            arg[(0, 3, 0, 3)]+=0.627756453023*x[2]**o + (-0.0597291924237)*x[2]
+            ref[(0, 3, 0, 3)]+=0.627756453023*x_ref[2]**o + (-0.0597291924237)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=-0.905306665435*x[2]**o + (0.724656998469)*x[2]
+            ref[(0, 3, 1, 0)]+=-0.905306665435*x_ref[2]**o + (0.724656998469)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.397880833675*x[2]**o + (-0.78488705228)*x[2]
+            ref[(0, 3, 1, 1)]+=0.397880833675*x_ref[2]**o + (-0.78488705228)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.542407074351*x[2]**o + (-0.0697760008893)*x[2]
+            ref[(0, 3, 1, 2)]+=0.542407074351*x_ref[2]**o + (-0.0697760008893)*x_ref[2]
+            arg[(0, 3, 1, 3)]+=-0.746008096606*x[2]**o + (-0.33984175679)*x[2]
+            ref[(0, 3, 1, 3)]+=-0.746008096606*x_ref[2]**o + (-0.33984175679)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.661959737669*x[2]**o + (-0.583135622256)*x[2]
+            ref[(0, 3, 2, 0)]+=-0.661959737669*x_ref[2]**o + (-0.583135622256)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.158620523328*x[2]**o + (0.39506703001)*x[2]
+            ref[(0, 3, 2, 1)]+=-0.158620523328*x_ref[2]**o + (0.39506703001)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.965876368851*x[2]**o + (0.254467212413)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.965876368851*x_ref[2]**o + (0.254467212413)*x_ref[2]
+            arg[(0, 3, 2, 3)]+=0.612566021771*x[2]**o + (-0.673342561835)*x[2]
+            ref[(0, 3, 2, 3)]+=0.612566021771*x_ref[2]**o + (-0.673342561835)*x_ref[2]
+            arg[(0, 3, 3, 0)]+=-0.410930923126*x[2]**o + (-0.0291863933966)*x[2]
+            ref[(0, 3, 3, 0)]+=-0.410930923126*x_ref[2]**o + (-0.0291863933966)*x_ref[2]
+            arg[(0, 3, 3, 1)]+=-0.181836981542*x[2]**o + (0.26122732469)*x[2]
+            ref[(0, 3, 3, 1)]+=-0.181836981542*x_ref[2]**o + (0.26122732469)*x_ref[2]
+            arg[(0, 3, 3, 2)]+=0.494887239376*x[2]**o + (0.760946913249)*x[2]
+            ref[(0, 3, 3, 2)]+=0.494887239376*x_ref[2]**o + (0.760946913249)*x_ref[2]
+            arg[(0, 3, 3, 3)]+=-0.565363506578*x[2]**o + (-0.0628392725269)*x[2]
+            ref[(0, 3, 3, 3)]+=-0.565363506578*x_ref[2]**o + (-0.0628392725269)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.842164837989*x[2]**o + (0.833242470222)*x[2]
+            ref[(1, 0, 0, 0)]+=0.842164837989*x_ref[2]**o + (0.833242470222)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.0708254069943*x[2]**o + (0.0271796882746)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.0708254069943*x_ref[2]**o + (0.0271796882746)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.826453282205*x[2]**o + (0.363303006777)*x[2]
+            ref[(1, 0, 0, 2)]+=0.826453282205*x_ref[2]**o + (0.363303006777)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=-0.771935518806*x[2]**o + (0.202287987853)*x[2]
+            ref[(1, 0, 0, 3)]+=-0.771935518806*x_ref[2]**o + (0.202287987853)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.416987294993*x[2]**o + (-0.723742070812)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.416987294993*x_ref[2]**o + (-0.723742070812)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.147939402066*x[2]**o + (-0.0316395368298)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.147939402066*x_ref[2]**o + (-0.0316395368298)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.354658957726*x[2]**o + (-0.266708773697)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.354658957726*x_ref[2]**o + (-0.266708773697)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.2359461226*x[2]**o + (0.777089319)*x[2]
+            ref[(1, 0, 1, 3)]+=0.2359461226*x_ref[2]**o + (0.777089319)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.707713653489*x[2]**o + (-0.260380640371)*x[2]
+            ref[(1, 0, 2, 0)]+=0.707713653489*x_ref[2]**o + (-0.260380640371)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.805888116603*x[2]**o + (0.919693996081)*x[2]
+            ref[(1, 0, 2, 1)]+=0.805888116603*x_ref[2]**o + (0.919693996081)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.398199290459*x[2]**o + (0.549719659304)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.398199290459*x_ref[2]**o + (0.549719659304)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.814142108707*x[2]**o + (-0.439831585488)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.814142108707*x_ref[2]**o + (-0.439831585488)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.383274897309*x[2]**o + (-0.522273166533)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.383274897309*x_ref[2]**o + (-0.522273166533)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.0185427032767*x[2]**o + (0.555859772274)*x[2]
+            ref[(1, 0, 3, 1)]+=0.0185427032767*x_ref[2]**o + (0.555859772274)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=0.155844991524*x[2]**o + (0.68955480633)*x[2]
+            ref[(1, 0, 3, 2)]+=0.155844991524*x_ref[2]**o + (0.68955480633)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=0.839367443176*x[2]**o + (-0.783379659305)*x[2]
+            ref[(1, 0, 3, 3)]+=0.839367443176*x_ref[2]**o + (-0.783379659305)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.909119897235*x[2]**o + (-0.869636808844)*x[2]
+            ref[(1, 1, 0, 0)]+=0.909119897235*x_ref[2]**o + (-0.869636808844)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.972648625835*x[2]**o + (0.90726939182)*x[2]
+            ref[(1, 1, 0, 1)]+=0.972648625835*x_ref[2]**o + (0.90726939182)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.761690162259*x[2]**o + (-0.315493810618)*x[2]
+            ref[(1, 1, 0, 2)]+=0.761690162259*x_ref[2]**o + (-0.315493810618)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.0673419464082*x[2]**o + (0.670188269499)*x[2]
+            ref[(1, 1, 0, 3)]+=0.0673419464082*x_ref[2]**o + (0.670188269499)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.72593628976*x[2]**o + (0.517142443839)*x[2]
+            ref[(1, 1, 1, 0)]+=0.72593628976*x_ref[2]**o + (0.517142443839)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.800560123895*x[2]**o + (-0.540525440989)*x[2]
+            ref[(1, 1, 1, 1)]+=0.800560123895*x_ref[2]**o + (-0.540525440989)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.675004786516*x[2]**o + (0.953167786917)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.675004786516*x_ref[2]**o + (0.953167786917)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.719643795414*x[2]**o + (-0.439197318489)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.719643795414*x_ref[2]**o + (-0.439197318489)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.799426714109*x[2]**o + (-0.890922281337)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.799426714109*x_ref[2]**o + (-0.890922281337)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.113753511819*x[2]**o + (-0.72257383747)*x[2]
+            ref[(1, 1, 2, 1)]+=0.113753511819*x_ref[2]**o + (-0.72257383747)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.643964998994*x[2]**o + (0.514529241441)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.643964998994*x_ref[2]**o + (0.514529241441)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=-0.0546526774068*x[2]**o + (0.851742778744)*x[2]
+            ref[(1, 1, 2, 3)]+=-0.0546526774068*x_ref[2]**o + (0.851742778744)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.0152656189517*x[2]**o + (-0.590046419243)*x[2]
+            ref[(1, 1, 3, 0)]+=-0.0152656189517*x_ref[2]**o + (-0.590046419243)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.303447050808*x[2]**o + (-0.324874463487)*x[2]
+            ref[(1, 1, 3, 1)]+=-0.303447050808*x_ref[2]**o + (-0.324874463487)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=-0.332297649714*x[2]**o + (0.17089615529)*x[2]
+            ref[(1, 1, 3, 2)]+=-0.332297649714*x_ref[2]**o + (0.17089615529)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=0.781094620582*x[2]**o + (0.164866050899)*x[2]
+            ref[(1, 1, 3, 3)]+=0.781094620582*x_ref[2]**o + (0.164866050899)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.0333935026268*x[2]**o + (-0.393690928645)*x[2]
+            ref[(1, 2, 0, 0)]+=0.0333935026268*x_ref[2]**o + (-0.393690928645)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.536101421348*x[2]**o + (-0.982732537224)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.536101421348*x_ref[2]**o + (-0.982732537224)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.250118567548*x[2]**o + (0.212034362304)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.250118567548*x_ref[2]**o + (0.212034362304)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=0.281792783581*x[2]**o + (-0.176535083088)*x[2]
+            ref[(1, 2, 0, 3)]+=0.281792783581*x_ref[2]**o + (-0.176535083088)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.530111482071*x[2]**o + (-0.669470832186)*x[2]
+            ref[(1, 2, 1, 0)]+=0.530111482071*x_ref[2]**o + (-0.669470832186)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.479120504198*x[2]**o + (0.938995173557)*x[2]
+            ref[(1, 2, 1, 1)]+=-0.479120504198*x_ref[2]**o + (0.938995173557)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.327298154391*x[2]**o + (0.265768280591)*x[2]
+            ref[(1, 2, 1, 2)]+=0.327298154391*x_ref[2]**o + (0.265768280591)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=-0.491359532922*x[2]**o + (0.096711326645)*x[2]
+            ref[(1, 2, 1, 3)]+=-0.491359532922*x_ref[2]**o + (0.096711326645)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.494663445642*x[2]**o + (-0.130237389515)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.494663445642*x_ref[2]**o + (-0.130237389515)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=0.874123302668*x[2]**o + (-0.76841789272)*x[2]
+            ref[(1, 2, 2, 1)]+=0.874123302668*x_ref[2]**o + (-0.76841789272)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=-0.990837660766*x[2]**o + (-0.931634112077)*x[2]
+            ref[(1, 2, 2, 2)]+=-0.990837660766*x_ref[2]**o + (-0.931634112077)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=0.383287829182*x[2]**o + (-0.186045233861)*x[2]
+            ref[(1, 2, 2, 3)]+=0.383287829182*x_ref[2]**o + (-0.186045233861)*x_ref[2]
+            arg[(1, 2, 3, 0)]+=0.79900142004*x[2]**o + (0.0835709158413)*x[2]
+            ref[(1, 2, 3, 0)]+=0.79900142004*x_ref[2]**o + (0.0835709158413)*x_ref[2]
+            arg[(1, 2, 3, 1)]+=-0.440862472285*x[2]**o + (0.454912139191)*x[2]
+            ref[(1, 2, 3, 1)]+=-0.440862472285*x_ref[2]**o + (0.454912139191)*x_ref[2]
+            arg[(1, 2, 3, 2)]+=-0.0451102869388*x[2]**o + (-0.245547158282)*x[2]
+            ref[(1, 2, 3, 2)]+=-0.0451102869388*x_ref[2]**o + (-0.245547158282)*x_ref[2]
+            arg[(1, 2, 3, 3)]+=0.443001211305*x[2]**o + (-0.817873353641)*x[2]
+            ref[(1, 2, 3, 3)]+=0.443001211305*x_ref[2]**o + (-0.817873353641)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.825195550394*x[2]**o + (-0.512938105842)*x[2]
+            ref[(1, 3, 0, 0)]+=0.825195550394*x_ref[2]**o + (-0.512938105842)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=-0.0218254676854*x[2]**o + (0.133268089551)*x[2]
+            ref[(1, 3, 0, 1)]+=-0.0218254676854*x_ref[2]**o + (0.133268089551)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.577192013071*x[2]**o + (-0.744461066876)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.577192013071*x_ref[2]**o + (-0.744461066876)*x_ref[2]
+            arg[(1, 3, 0, 3)]+=0.929223099198*x[2]**o + (-0.503600919709)*x[2]
+            ref[(1, 3, 0, 3)]+=0.929223099198*x_ref[2]**o + (-0.503600919709)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=-0.97385149196*x[2]**o + (0.42368722903)*x[2]
+            ref[(1, 3, 1, 0)]+=-0.97385149196*x_ref[2]**o + (0.42368722903)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.164502939329*x[2]**o + (0.396233904704)*x[2]
+            ref[(1, 3, 1, 1)]+=0.164502939329*x_ref[2]**o + (0.396233904704)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.200579699509*x[2]**o + (0.703894574177)*x[2]
+            ref[(1, 3, 1, 2)]+=0.200579699509*x_ref[2]**o + (0.703894574177)*x_ref[2]
+            arg[(1, 3, 1, 3)]+=0.6074088967*x[2]**o + (0.608930269475)*x[2]
+            ref[(1, 3, 1, 3)]+=0.6074088967*x_ref[2]**o + (0.608930269475)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=-0.888398906915*x[2]**o + (-0.299815565198)*x[2]
+            ref[(1, 3, 2, 0)]+=-0.888398906915*x_ref[2]**o + (-0.299815565198)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.0451215848545*x[2]**o + (0.203002666742)*x[2]
+            ref[(1, 3, 2, 1)]+=0.0451215848545*x_ref[2]**o + (0.203002666742)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.289265586404*x[2]**o + (0.409208239516)*x[2]
+            ref[(1, 3, 2, 2)]+=0.289265586404*x_ref[2]**o + (0.409208239516)*x_ref[2]
+            arg[(1, 3, 2, 3)]+=-0.0402862936874*x[2]**o + (0.73850911241)*x[2]
+            ref[(1, 3, 2, 3)]+=-0.0402862936874*x_ref[2]**o + (0.73850911241)*x_ref[2]
+            arg[(1, 3, 3, 0)]+=-0.474366350375*x[2]**o + (-0.469390774201)*x[2]
+            ref[(1, 3, 3, 0)]+=-0.474366350375*x_ref[2]**o + (-0.469390774201)*x_ref[2]
+            arg[(1, 3, 3, 1)]+=-0.874979839168*x[2]**o + (-0.797858513323)*x[2]
+            ref[(1, 3, 3, 1)]+=-0.874979839168*x_ref[2]**o + (-0.797858513323)*x_ref[2]
+            arg[(1, 3, 3, 2)]+=0.25272279182*x[2]**o + (0.0228132318534)*x[2]
+            ref[(1, 3, 3, 2)]+=0.25272279182*x_ref[2]**o + (0.0228132318534)*x_ref[2]
+            arg[(1, 3, 3, 3)]+=0.856683206879*x[2]**o + (0.699536025183)*x[2]
+            ref[(1, 3, 3, 3)]+=0.856683206879*x_ref[2]**o + (0.699536025183)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.621315091607*x[2]**o + (-0.107844255445)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.621315091607*x_ref[2]**o + (-0.107844255445)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.694860331243*x[2]**o + (-0.20498700172)*x[2]
+            ref[(2, 0, 0, 1)]+=0.694860331243*x_ref[2]**o + (-0.20498700172)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.350896765195*x[2]**o + (-0.834989125222)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.350896765195*x_ref[2]**o + (-0.834989125222)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.261747206425*x[2]**o + (-0.963372419165)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.261747206425*x_ref[2]**o + (-0.963372419165)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.854852431498*x[2]**o + (-0.252855258128)*x[2]
+            ref[(2, 0, 1, 0)]+=0.854852431498*x_ref[2]**o + (-0.252855258128)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.106127763437*x[2]**o + (0.5865220608)*x[2]
+            ref[(2, 0, 1, 1)]+=-0.106127763437*x_ref[2]**o + (0.5865220608)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.902882749387*x[2]**o + (-0.251370280208)*x[2]
+            ref[(2, 0, 1, 2)]+=-0.902882749387*x_ref[2]**o + (-0.251370280208)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.209416350888*x[2]**o + (-0.0833048374422)*x[2]
+            ref[(2, 0, 1, 3)]+=0.209416350888*x_ref[2]**o + (-0.0833048374422)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.452158500315*x[2]**o + (-0.973073005201)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.452158500315*x_ref[2]**o + (-0.973073005201)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.78502466582*x[2]**o + (0.575461377877)*x[2]
+            ref[(2, 0, 2, 1)]+=0.78502466582*x_ref[2]**o + (0.575461377877)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.901022369243*x[2]**o + (0.667033532316)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.901022369243*x_ref[2]**o + (0.667033532316)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=0.18694454115*x[2]**o + (-0.992426199059)*x[2]
+            ref[(2, 0, 2, 3)]+=0.18694454115*x_ref[2]**o + (-0.992426199059)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.148589074178*x[2]**o + (-0.013833736549)*x[2]
+            ref[(2, 0, 3, 0)]+=0.148589074178*x_ref[2]**o + (-0.013833736549)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=-0.0696490295358*x[2]**o + (0.365011608713)*x[2]
+            ref[(2, 0, 3, 1)]+=-0.0696490295358*x_ref[2]**o + (0.365011608713)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=0.712771810578*x[2]**o + (0.348118947732)*x[2]
+            ref[(2, 0, 3, 2)]+=0.712771810578*x_ref[2]**o + (0.348118947732)*x_ref[2]
+            arg[(2, 0, 3, 3)]+=-0.425688304793*x[2]**o + (0.363245002275)*x[2]
+            ref[(2, 0, 3, 3)]+=-0.425688304793*x_ref[2]**o + (0.363245002275)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.677849519455*x[2]**o + (0.439611818875)*x[2]
+            ref[(2, 1, 0, 0)]+=0.677849519455*x_ref[2]**o + (0.439611818875)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.296974635523*x[2]**o + (0.893072959232)*x[2]
+            ref[(2, 1, 0, 1)]+=0.296974635523*x_ref[2]**o + (0.893072959232)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.0259340375729*x[2]**o + (-0.767654898968)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.0259340375729*x_ref[2]**o + (-0.767654898968)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.601500785864*x[2]**o + (0.593919982603)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.601500785864*x_ref[2]**o + (0.593919982603)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.352594317434*x[2]**o + (0.796747354701)*x[2]
+            ref[(2, 1, 1, 0)]+=0.352594317434*x_ref[2]**o + (0.796747354701)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.473104987574*x[2]**o + (0.27019783998)*x[2]
+            ref[(2, 1, 1, 1)]+=0.473104987574*x_ref[2]**o + (0.27019783998)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.0178600282576*x[2]**o + (0.847549088728)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.0178600282576*x_ref[2]**o + (0.847549088728)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.243609778899*x[2]**o + (0.687802736319)*x[2]
+            ref[(2, 1, 1, 3)]+=0.243609778899*x_ref[2]**o + (0.687802736319)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.824933597313*x[2]**o + (0.894264554122)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.824933597313*x_ref[2]**o + (0.894264554122)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.30385331515*x[2]**o + (0.454153507057)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.30385331515*x_ref[2]**o + (0.454153507057)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.860040616414*x[2]**o + (-0.442022787191)*x[2]
+            ref[(2, 1, 2, 2)]+=0.860040616414*x_ref[2]**o + (-0.442022787191)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=0.833914115818*x[2]**o + (0.0630503188747)*x[2]
+            ref[(2, 1, 2, 3)]+=0.833914115818*x_ref[2]**o + (0.0630503188747)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=-0.0409758582469*x[2]**o + (0.204599632517)*x[2]
+            ref[(2, 1, 3, 0)]+=-0.0409758582469*x_ref[2]**o + (0.204599632517)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=0.987311295241*x[2]**o + (-0.133368000794)*x[2]
+            ref[(2, 1, 3, 1)]+=0.987311295241*x_ref[2]**o + (-0.133368000794)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=-0.634176171981*x[2]**o + (-0.437803895365)*x[2]
+            ref[(2, 1, 3, 2)]+=-0.634176171981*x_ref[2]**o + (-0.437803895365)*x_ref[2]
+            arg[(2, 1, 3, 3)]+=0.261437238755*x[2]**o + (-0.209651498568)*x[2]
+            ref[(2, 1, 3, 3)]+=0.261437238755*x_ref[2]**o + (-0.209651498568)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.5097293356*x[2]**o + (0.0474620243204)*x[2]
+            ref[(2, 2, 0, 0)]+=-0.5097293356*x_ref[2]**o + (0.0474620243204)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.100062448769*x[2]**o + (0.782840942569)*x[2]
+            ref[(2, 2, 0, 1)]+=0.100062448769*x_ref[2]**o + (0.782840942569)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.850140939751*x[2]**o + (0.979438476584)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.850140939751*x_ref[2]**o + (0.979438476584)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=-0.569757972402*x[2]**o + (0.863807979865)*x[2]
+            ref[(2, 2, 0, 3)]+=-0.569757972402*x_ref[2]**o + (0.863807979865)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.176127744209*x[2]**o + (-0.207152546603)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.176127744209*x_ref[2]**o + (-0.207152546603)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.774765736738*x[2]**o + (0.304077081787)*x[2]
+            ref[(2, 2, 1, 1)]+=0.774765736738*x_ref[2]**o + (0.304077081787)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.821910987383*x[2]**o + (-0.174380462724)*x[2]
+            ref[(2, 2, 1, 2)]+=-0.821910987383*x_ref[2]**o + (-0.174380462724)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=0.697445324824*x[2]**o + (0.00120763631782)*x[2]
+            ref[(2, 2, 1, 3)]+=0.697445324824*x_ref[2]**o + (0.00120763631782)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.584351270515*x[2]**o + (0.92429284589)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.584351270515*x_ref[2]**o + (0.92429284589)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.0626624305648*x[2]**o + (0.988370928512)*x[2]
+            ref[(2, 2, 2, 1)]+=0.0626624305648*x_ref[2]**o + (0.988370928512)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=-0.645929229129*x[2]**o + (-0.883082963562)*x[2]
+            ref[(2, 2, 2, 2)]+=-0.645929229129*x_ref[2]**o + (-0.883082963562)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=0.336907513764*x[2]**o + (-0.97650905989)*x[2]
+            ref[(2, 2, 2, 3)]+=0.336907513764*x_ref[2]**o + (-0.97650905989)*x_ref[2]
+            arg[(2, 2, 3, 0)]+=0.566446257656*x[2]**o + (-0.680898408913)*x[2]
+            ref[(2, 2, 3, 0)]+=0.566446257656*x_ref[2]**o + (-0.680898408913)*x_ref[2]
+            arg[(2, 2, 3, 1)]+=-0.755787114203*x[2]**o + (0.0911666140841)*x[2]
+            ref[(2, 2, 3, 1)]+=-0.755787114203*x_ref[2]**o + (0.0911666140841)*x_ref[2]
+            arg[(2, 2, 3, 2)]+=-0.353452760597*x[2]**o + (-0.946822100228)*x[2]
+            ref[(2, 2, 3, 2)]+=-0.353452760597*x_ref[2]**o + (-0.946822100228)*x_ref[2]
+            arg[(2, 2, 3, 3)]+=-0.628893699306*x[2]**o + (0.850280987207)*x[2]
+            ref[(2, 2, 3, 3)]+=-0.628893699306*x_ref[2]**o + (0.850280987207)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=0.59851829323*x[2]**o + (-0.389740001088)*x[2]
+            ref[(2, 3, 0, 0)]+=0.59851829323*x_ref[2]**o + (-0.389740001088)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.432429209213*x[2]**o + (0.459578299052)*x[2]
+            ref[(2, 3, 0, 1)]+=0.432429209213*x_ref[2]**o + (0.459578299052)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=-0.89443607964*x[2]**o + (-0.905798940997)*x[2]
+            ref[(2, 3, 0, 2)]+=-0.89443607964*x_ref[2]**o + (-0.905798940997)*x_ref[2]
+            arg[(2, 3, 0, 3)]+=0.693887898892*x[2]**o + (0.909934927152)*x[2]
+            ref[(2, 3, 0, 3)]+=0.693887898892*x_ref[2]**o + (0.909934927152)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.159515307374*x[2]**o + (0.623958910475)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.159515307374*x_ref[2]**o + (0.623958910475)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.680071915262*x[2]**o + (-0.586785145535)*x[2]
+            ref[(2, 3, 1, 1)]+=0.680071915262*x_ref[2]**o + (-0.586785145535)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=0.370107824418*x[2]**o + (0.575265498356)*x[2]
+            ref[(2, 3, 1, 2)]+=0.370107824418*x_ref[2]**o + (0.575265498356)*x_ref[2]
+            arg[(2, 3, 1, 3)]+=0.830301605113*x[2]**o + (0.292251874353)*x[2]
+            ref[(2, 3, 1, 3)]+=0.830301605113*x_ref[2]**o + (0.292251874353)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=0.0996322242627*x[2]**o + (0.381131151633)*x[2]
+            ref[(2, 3, 2, 0)]+=0.0996322242627*x_ref[2]**o + (0.381131151633)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=-0.368384950604*x[2]**o + (0.0112700165074)*x[2]
+            ref[(2, 3, 2, 1)]+=-0.368384950604*x_ref[2]**o + (0.0112700165074)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=-0.613478971194*x[2]**o + (-0.401314423667)*x[2]
+            ref[(2, 3, 2, 2)]+=-0.613478971194*x_ref[2]**o + (-0.401314423667)*x_ref[2]
+            arg[(2, 3, 2, 3)]+=0.985921133483*x[2]**o + (0.609086085415)*x[2]
+            ref[(2, 3, 2, 3)]+=0.985921133483*x_ref[2]**o + (0.609086085415)*x_ref[2]
+            arg[(2, 3, 3, 0)]+=0.972338105377*x[2]**o + (0.927280433511)*x[2]
+            ref[(2, 3, 3, 0)]+=0.972338105377*x_ref[2]**o + (0.927280433511)*x_ref[2]
+            arg[(2, 3, 3, 1)]+=0.229569081825*x[2]**o + (-0.99029565426)*x[2]
+            ref[(2, 3, 3, 1)]+=0.229569081825*x_ref[2]**o + (-0.99029565426)*x_ref[2]
+            arg[(2, 3, 3, 2)]+=0.930669681996*x[2]**o + (-0.693083683183)*x[2]
+            ref[(2, 3, 3, 2)]+=0.930669681996*x_ref[2]**o + (-0.693083683183)*x_ref[2]
+            arg[(2, 3, 3, 3)]+=-0.394871607412*x[2]**o + (0.419311682969)*x[2]
+            ref[(2, 3, 3, 3)]+=-0.394871607412*x_ref[2]**o + (0.419311682969)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.68854789062*x[0] + (-0.584990350979)*x[1]
+        ref=0.68854789062*x_ref[0] + (-0.584990350979)*x_ref[1]
+        if dim==3:
+            arg+=(0.26856535558)*x[2]
+            ref+=(0.26856535558)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=0.903138685712*x[0] + (0.703428151734)*x[1]
+        ref[(0,)]=0.903138685712*x_ref[0] + (0.703428151734)*x_ref[1]
+        arg[(1,)]=-0.248622309667*x[0] + (0.274221063887)*x[1]
+        ref[(1,)]=-0.248622309667*x_ref[0] + (0.274221063887)*x_ref[1]
+        arg[(2,)]=0.990043275056*x[0] + (-0.780490793703)*x[1]
+        ref[(2,)]=0.990043275056*x_ref[0] + (-0.780490793703)*x_ref[1]
+        arg[(3,)]=-0.285951864062*x[0] + (0.968094018889)*x[1]
+        ref[(3,)]=-0.285951864062*x_ref[0] + (0.968094018889)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.744056581135*x[2]
+            ref[(0,)]+=0.744056581135*x_ref[2]
+            arg[(1,)]+=-0.737830544903*x[2]
+            ref[(1,)]+=-0.737830544903*x_ref[2]
+            arg[(2,)]+=0.503393203877*x[2]
+            ref[(2,)]+=0.503393203877*x_ref[2]
+            arg[(3,)]+=0.62945274582*x[2]
+            ref[(3,)]+=0.62945274582*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=0.132043363804*x[0] + (-0.558146908599)*x[1]
+        ref[(0, 0)]=0.132043363804*x_ref[0] + (-0.558146908599)*x_ref[1]
+        arg[(0, 1)]=-0.704806883031*x[0] + (-0.205383497447)*x[1]
+        ref[(0, 1)]=-0.704806883031*x_ref[0] + (-0.205383497447)*x_ref[1]
+        arg[(0, 2)]=-0.411043041555*x[0] + (-0.059454862383)*x[1]
+        ref[(0, 2)]=-0.411043041555*x_ref[0] + (-0.059454862383)*x_ref[1]
+        arg[(0, 3)]=-0.986815883068*x[0] + (-0.76484011459)*x[1]
+        ref[(0, 3)]=-0.986815883068*x_ref[0] + (-0.76484011459)*x_ref[1]
+        arg[(1, 0)]=-0.584689936146*x[0] + (-0.750761210274)*x[1]
+        ref[(1, 0)]=-0.584689936146*x_ref[0] + (-0.750761210274)*x_ref[1]
+        arg[(1, 1)]=-0.479237778443*x[0] + (-0.944378272853)*x[1]
+        ref[(1, 1)]=-0.479237778443*x_ref[0] + (-0.944378272853)*x_ref[1]
+        arg[(1, 2)]=0.10543890927*x[0] + (0.609928863207)*x[1]
+        ref[(1, 2)]=0.10543890927*x_ref[0] + (0.609928863207)*x_ref[1]
+        arg[(1, 3)]=-0.593185503677*x[0] + (0.829154595669)*x[1]
+        ref[(1, 3)]=-0.593185503677*x_ref[0] + (0.829154595669)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.333197065001*x[2]
+            ref[(0, 0)]+=-0.333197065001*x_ref[2]
+            arg[(0, 1)]+=0.293114492967*x[2]
+            ref[(0, 1)]+=0.293114492967*x_ref[2]
+            arg[(0, 2)]+=-0.426031001014*x[2]
+            ref[(0, 2)]+=-0.426031001014*x_ref[2]
+            arg[(0, 3)]+=0.438418219357*x[2]
+            ref[(0, 3)]+=0.438418219357*x_ref[2]
+            arg[(1, 0)]+=-0.955413826266*x[2]
+            ref[(1, 0)]+=-0.955413826266*x_ref[2]
+            arg[(1, 1)]+=-0.533886453117*x[2]
+            ref[(1, 1)]+=-0.533886453117*x_ref[2]
+            arg[(1, 2)]+=-0.176575556381*x[2]
+            ref[(1, 2)]+=-0.176575556381*x_ref[2]
+            arg[(1, 3)]+=0.251769364772*x[2]
+            ref[(1, 3)]+=0.251769364772*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3),w)
+        ref = Data(0,(3, 3, 3),w_ref)
+        arg[(0, 0, 0)]=-0.271310485966*x[0] + (0.0401789875176)*x[1]
+        ref[(0, 0, 0)]=-0.271310485966*x_ref[0] + (0.0401789875176)*x_ref[1]
+        arg[(0, 0, 1)]=-0.889952037137*x[0] + (0.13420114902)*x[1]
+        ref[(0, 0, 1)]=-0.889952037137*x_ref[0] + (0.13420114902)*x_ref[1]
+        arg[(0, 0, 2)]=0.63036200394*x[0] + (-0.266925330388)*x[1]
+        ref[(0, 0, 2)]=0.63036200394*x_ref[0] + (-0.266925330388)*x_ref[1]
+        arg[(0, 1, 0)]=0.980897665644*x[0] + (0.318747137833)*x[1]
+        ref[(0, 1, 0)]=0.980897665644*x_ref[0] + (0.318747137833)*x_ref[1]
+        arg[(0, 1, 1)]=-0.383541563586*x[0] + (0.837888567084)*x[1]
+        ref[(0, 1, 1)]=-0.383541563586*x_ref[0] + (0.837888567084)*x_ref[1]
+        arg[(0, 1, 2)]=-0.281761718637*x[0] + (0.389952173773)*x[1]
+        ref[(0, 1, 2)]=-0.281761718637*x_ref[0] + (0.389952173773)*x_ref[1]
+        arg[(0, 2, 0)]=-0.680402506909*x[0] + (-0.737575972657)*x[1]
+        ref[(0, 2, 0)]=-0.680402506909*x_ref[0] + (-0.737575972657)*x_ref[1]
+        arg[(0, 2, 1)]=-0.118999303029*x[0] + (-0.282428755136)*x[1]
+        ref[(0, 2, 1)]=-0.118999303029*x_ref[0] + (-0.282428755136)*x_ref[1]
+        arg[(0, 2, 2)]=-0.751234229244*x[0] + (-0.15224986591)*x[1]
+        ref[(0, 2, 2)]=-0.751234229244*x_ref[0] + (-0.15224986591)*x_ref[1]
+        arg[(1, 0, 0)]=-0.518414815471*x[0] + (-0.0703855841777)*x[1]
+        ref[(1, 0, 0)]=-0.518414815471*x_ref[0] + (-0.0703855841777)*x_ref[1]
+        arg[(1, 0, 1)]=0.975801512682*x[0] + (-0.56930820378)*x[1]
+        ref[(1, 0, 1)]=0.975801512682*x_ref[0] + (-0.56930820378)*x_ref[1]
+        arg[(1, 0, 2)]=0.228587214726*x[0] + (-0.299809448512)*x[1]
+        ref[(1, 0, 2)]=0.228587214726*x_ref[0] + (-0.299809448512)*x_ref[1]
+        arg[(1, 1, 0)]=0.815181025993*x[0] + (0.388241591562)*x[1]
+        ref[(1, 1, 0)]=0.815181025993*x_ref[0] + (0.388241591562)*x_ref[1]
+        arg[(1, 1, 1)]=-0.180380988842*x[0] + (-0.321058530222)*x[1]
+        ref[(1, 1, 1)]=-0.180380988842*x_ref[0] + (-0.321058530222)*x_ref[1]
+        arg[(1, 1, 2)]=-0.726489141836*x[0] + (0.118403394303)*x[1]
+        ref[(1, 1, 2)]=-0.726489141836*x_ref[0] + (0.118403394303)*x_ref[1]
+        arg[(1, 2, 0)]=-0.324689001502*x[0] + (0.377222614281)*x[1]
+        ref[(1, 2, 0)]=-0.324689001502*x_ref[0] + (0.377222614281)*x_ref[1]
+        arg[(1, 2, 1)]=-0.885648327967*x[0] + (-0.846654847326)*x[1]
+        ref[(1, 2, 1)]=-0.885648327967*x_ref[0] + (-0.846654847326)*x_ref[1]
+        arg[(1, 2, 2)]=-0.0802141942308*x[0] + (-0.298800690526)*x[1]
+        ref[(1, 2, 2)]=-0.0802141942308*x_ref[0] + (-0.298800690526)*x_ref[1]
+        arg[(2, 0, 0)]=-0.952357363725*x[0] + (0.998164691951)*x[1]
+        ref[(2, 0, 0)]=-0.952357363725*x_ref[0] + (0.998164691951)*x_ref[1]
+        arg[(2, 0, 1)]=0.319478517452*x[0] + (0.0542082418119)*x[1]
+        ref[(2, 0, 1)]=0.319478517452*x_ref[0] + (0.0542082418119)*x_ref[1]
+        arg[(2, 0, 2)]=-0.386581665798*x[0] + (0.793076662699)*x[1]
+        ref[(2, 0, 2)]=-0.386581665798*x_ref[0] + (0.793076662699)*x_ref[1]
+        arg[(2, 1, 0)]=-0.103400851609*x[0] + (-0.750252344581)*x[1]
+        ref[(2, 1, 0)]=-0.103400851609*x_ref[0] + (-0.750252344581)*x_ref[1]
+        arg[(2, 1, 1)]=0.438374668003*x[0] + (0.00389246378494)*x[1]
+        ref[(2, 1, 1)]=0.438374668003*x_ref[0] + (0.00389246378494)*x_ref[1]
+        arg[(2, 1, 2)]=-0.678483424605*x[0] + (0.929369583077)*x[1]
+        ref[(2, 1, 2)]=-0.678483424605*x_ref[0] + (0.929369583077)*x_ref[1]
+        arg[(2, 2, 0)]=-0.317933023933*x[0] + (0.0534590646669)*x[1]
+        ref[(2, 2, 0)]=-0.317933023933*x_ref[0] + (0.0534590646669)*x_ref[1]
+        arg[(2, 2, 1)]=0.984042624269*x[0] + (0.769739789978)*x[1]
+        ref[(2, 2, 1)]=0.984042624269*x_ref[0] + (0.769739789978)*x_ref[1]
+        arg[(2, 2, 2)]=0.644891813721*x[0] + (0.822715756955)*x[1]
+        ref[(2, 2, 2)]=0.644891813721*x_ref[0] + (0.822715756955)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.0870273042275*x[2]
+            ref[(0, 0, 0)]+=0.0870273042275*x_ref[2]
+            arg[(0, 0, 1)]+=0.243888487274*x[2]
+            ref[(0, 0, 1)]+=0.243888487274*x_ref[2]
+            arg[(0, 0, 2)]+=0.170934224396*x[2]
+            ref[(0, 0, 2)]+=0.170934224396*x_ref[2]
+            arg[(0, 1, 0)]+=0.115785575331*x[2]
+            ref[(0, 1, 0)]+=0.115785575331*x_ref[2]
+            arg[(0, 1, 1)]+=-0.441524632854*x[2]
+            ref[(0, 1, 1)]+=-0.441524632854*x_ref[2]
+            arg[(0, 1, 2)]+=0.9359503544*x[2]
+            ref[(0, 1, 2)]+=0.9359503544*x_ref[2]
+            arg[(0, 2, 0)]+=0.557584265423*x[2]
+            ref[(0, 2, 0)]+=0.557584265423*x_ref[2]
+            arg[(0, 2, 1)]+=0.667578029856*x[2]
+            ref[(0, 2, 1)]+=0.667578029856*x_ref[2]
+            arg[(0, 2, 2)]+=0.518618270445*x[2]
+            ref[(0, 2, 2)]+=0.518618270445*x_ref[2]
+            arg[(1, 0, 0)]+=-0.673402655919*x[2]
+            ref[(1, 0, 0)]+=-0.673402655919*x_ref[2]
+            arg[(1, 0, 1)]+=-0.679043254373*x[2]
+            ref[(1, 0, 1)]+=-0.679043254373*x_ref[2]
+            arg[(1, 0, 2)]+=-0.596744641621*x[2]
+            ref[(1, 0, 2)]+=-0.596744641621*x_ref[2]
+            arg[(1, 1, 0)]+=-0.989873128469*x[2]
+            ref[(1, 1, 0)]+=-0.989873128469*x_ref[2]
+            arg[(1, 1, 1)]+=-0.377766053192*x[2]
+            ref[(1, 1, 1)]+=-0.377766053192*x_ref[2]
+            arg[(1, 1, 2)]+=0.632477374935*x[2]
+            ref[(1, 1, 2)]+=0.632477374935*x_ref[2]
+            arg[(1, 2, 0)]+=0.733035887889*x[2]
+            ref[(1, 2, 0)]+=0.733035887889*x_ref[2]
+            arg[(1, 2, 1)]+=0.339047640808*x[2]
+            ref[(1, 2, 1)]+=0.339047640808*x_ref[2]
+            arg[(1, 2, 2)]+=0.359661177174*x[2]
+            ref[(1, 2, 2)]+=0.359661177174*x_ref[2]
+            arg[(2, 0, 0)]+=0.644745871423*x[2]
+            ref[(2, 0, 0)]+=0.644745871423*x_ref[2]
+            arg[(2, 0, 1)]+=0.216163796788*x[2]
+            ref[(2, 0, 1)]+=0.216163796788*x_ref[2]
+            arg[(2, 0, 2)]+=-0.909192241301*x[2]
+            ref[(2, 0, 2)]+=-0.909192241301*x_ref[2]
+            arg[(2, 1, 0)]+=-0.68434146208*x[2]
+            ref[(2, 1, 0)]+=-0.68434146208*x_ref[2]
+            arg[(2, 1, 1)]+=0.0212712296524*x[2]
+            ref[(2, 1, 1)]+=0.0212712296524*x_ref[2]
+            arg[(2, 1, 2)]+=0.999303714519*x[2]
+            ref[(2, 1, 2)]+=0.999303714519*x_ref[2]
+            arg[(2, 2, 0)]+=-0.341321951501*x[2]
+            ref[(2, 2, 0)]+=-0.341321951501*x_ref[2]
+            arg[(2, 2, 1)]+=0.49178919069*x[2]
+            ref[(2, 2, 1)]+=0.49178919069*x_ref[2]
+            arg[(2, 2, 2)]+=-0.594145773578*x[2]
+            ref[(2, 2, 2)]+=-0.594145773578*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3, 3),w)
+        ref = Data(0,(4, 4, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=0.512668651835*x[0] + (-0.901716566584)*x[1]
+        ref[(0, 0, 0, 0)]=0.512668651835*x_ref[0] + (-0.901716566584)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.268307394951*x[0] + (-0.697297176107)*x[1]
+        ref[(0, 0, 0, 1)]=0.268307394951*x_ref[0] + (-0.697297176107)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.669340357096*x[0] + (-0.166281301692)*x[1]
+        ref[(0, 0, 0, 2)]=0.669340357096*x_ref[0] + (-0.166281301692)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.807328637155*x[0] + (-0.505999220462)*x[1]
+        ref[(0, 0, 1, 0)]=-0.807328637155*x_ref[0] + (-0.505999220462)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.771779255467*x[0] + (0.289813592638)*x[1]
+        ref[(0, 0, 1, 1)]=0.771779255467*x_ref[0] + (0.289813592638)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.389882763488*x[0] + (0.0364388691033)*x[1]
+        ref[(0, 0, 1, 2)]=0.389882763488*x_ref[0] + (0.0364388691033)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.819761685432*x[0] + (-0.926787846214)*x[1]
+        ref[(0, 0, 2, 0)]=-0.819761685432*x_ref[0] + (-0.926787846214)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.310386364331*x[0] + (0.342885249524)*x[1]
+        ref[(0, 0, 2, 1)]=-0.310386364331*x_ref[0] + (0.342885249524)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.712748780449*x[0] + (-0.224685814363)*x[1]
+        ref[(0, 0, 2, 2)]=0.712748780449*x_ref[0] + (-0.224685814363)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.36451008228*x[0] + (0.26966954506)*x[1]
+        ref[(0, 1, 0, 0)]=0.36451008228*x_ref[0] + (0.26966954506)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.548615310292*x[0] + (-0.69269479571)*x[1]
+        ref[(0, 1, 0, 1)]=0.548615310292*x_ref[0] + (-0.69269479571)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.96118937355*x[0] + (0.119722514821)*x[1]
+        ref[(0, 1, 0, 2)]=0.96118937355*x_ref[0] + (0.119722514821)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.602463741804*x[0] + (-0.364473059559)*x[1]
+        ref[(0, 1, 1, 0)]=0.602463741804*x_ref[0] + (-0.364473059559)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.182857422017*x[0] + (-0.625095760259)*x[1]
+        ref[(0, 1, 1, 1)]=-0.182857422017*x_ref[0] + (-0.625095760259)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.739549996173*x[0] + (0.0991441115344)*x[1]
+        ref[(0, 1, 1, 2)]=-0.739549996173*x_ref[0] + (0.0991441115344)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.717292025661*x[0] + (-0.797480286504)*x[1]
+        ref[(0, 1, 2, 0)]=-0.717292025661*x_ref[0] + (-0.797480286504)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.793157524332*x[0] + (-0.222529685778)*x[1]
+        ref[(0, 1, 2, 1)]=-0.793157524332*x_ref[0] + (-0.222529685778)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.110396558739*x[0] + (0.14104266623)*x[1]
+        ref[(0, 1, 2, 2)]=0.110396558739*x_ref[0] + (0.14104266623)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.0241973942883*x[0] + (-0.841368202365)*x[1]
+        ref[(0, 2, 0, 0)]=-0.0241973942883*x_ref[0] + (-0.841368202365)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.315769624233*x[0] + (-0.247710430353)*x[1]
+        ref[(0, 2, 0, 1)]=-0.315769624233*x_ref[0] + (-0.247710430353)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.112816371184*x[0] + (0.687478652767)*x[1]
+        ref[(0, 2, 0, 2)]=-0.112816371184*x_ref[0] + (0.687478652767)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.20535771121*x[0] + (0.180266226878)*x[1]
+        ref[(0, 2, 1, 0)]=0.20535771121*x_ref[0] + (0.180266226878)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.0561064353729*x[0] + (-0.561737948899)*x[1]
+        ref[(0, 2, 1, 1)]=-0.0561064353729*x_ref[0] + (-0.561737948899)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.969524203607*x[0] + (0.835229878804)*x[1]
+        ref[(0, 2, 1, 2)]=-0.969524203607*x_ref[0] + (0.835229878804)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.923248083355*x[0] + (-0.320246986334)*x[1]
+        ref[(0, 2, 2, 0)]=0.923248083355*x_ref[0] + (-0.320246986334)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.182842507236*x[0] + (0.704993509998)*x[1]
+        ref[(0, 2, 2, 1)]=0.182842507236*x_ref[0] + (0.704993509998)*x_ref[1]
+        arg[(0, 2, 2, 2)]=0.632623931792*x[0] + (0.0363328490864)*x[1]
+        ref[(0, 2, 2, 2)]=0.632623931792*x_ref[0] + (0.0363328490864)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.14620408427*x[0] + (0.543766888301)*x[1]
+        ref[(0, 3, 0, 0)]=0.14620408427*x_ref[0] + (0.543766888301)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.613696277067*x[0] + (-0.656931193056)*x[1]
+        ref[(0, 3, 0, 1)]=0.613696277067*x_ref[0] + (-0.656931193056)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.398374012513*x[0] + (0.786953996182)*x[1]
+        ref[(0, 3, 0, 2)]=-0.398374012513*x_ref[0] + (0.786953996182)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.0851855985755*x[0] + (-0.0916977730867)*x[1]
+        ref[(0, 3, 1, 0)]=0.0851855985755*x_ref[0] + (-0.0916977730867)*x_ref[1]
+        arg[(0, 3, 1, 1)]=-0.638192884259*x[0] + (-0.43117788626)*x[1]
+        ref[(0, 3, 1, 1)]=-0.638192884259*x_ref[0] + (-0.43117788626)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.462682880494*x[0] + (0.678191671987)*x[1]
+        ref[(0, 3, 1, 2)]=-0.462682880494*x_ref[0] + (0.678191671987)*x_ref[1]
+        arg[(0, 3, 2, 0)]=0.0206314101424*x[0] + (0.975486685911)*x[1]
+        ref[(0, 3, 2, 0)]=0.0206314101424*x_ref[0] + (0.975486685911)*x_ref[1]
+        arg[(0, 3, 2, 1)]=-0.0584897621684*x[0] + (0.0104231893861)*x[1]
+        ref[(0, 3, 2, 1)]=-0.0584897621684*x_ref[0] + (0.0104231893861)*x_ref[1]
+        arg[(0, 3, 2, 2)]=0.856127925828*x[0] + (-0.125922896785)*x[1]
+        ref[(0, 3, 2, 2)]=0.856127925828*x_ref[0] + (-0.125922896785)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.16430981477*x[0] + (-0.289363322759)*x[1]
+        ref[(1, 0, 0, 0)]=-0.16430981477*x_ref[0] + (-0.289363322759)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.0581308542671*x[0] + (-0.871583522392)*x[1]
+        ref[(1, 0, 0, 1)]=0.0581308542671*x_ref[0] + (-0.871583522392)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.948309083014*x[0] + (-0.0332909338073)*x[1]
+        ref[(1, 0, 0, 2)]=0.948309083014*x_ref[0] + (-0.0332909338073)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.239328239756*x[0] + (-0.956800699817)*x[1]
+        ref[(1, 0, 1, 0)]=0.239328239756*x_ref[0] + (-0.956800699817)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.0693384447307*x[0] + (-0.667137140478)*x[1]
+        ref[(1, 0, 1, 1)]=0.0693384447307*x_ref[0] + (-0.667137140478)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.84101695067*x[0] + (-0.37128673623)*x[1]
+        ref[(1, 0, 1, 2)]=-0.84101695067*x_ref[0] + (-0.37128673623)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.0116838025772*x[0] + (0.785656819649)*x[1]
+        ref[(1, 0, 2, 0)]=-0.0116838025772*x_ref[0] + (0.785656819649)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.0371019083251*x[0] + (0.0359241430407)*x[1]
+        ref[(1, 0, 2, 1)]=-0.0371019083251*x_ref[0] + (0.0359241430407)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.367824794555*x[0] + (-0.340310853369)*x[1]
+        ref[(1, 0, 2, 2)]=0.367824794555*x_ref[0] + (-0.340310853369)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.929199037027*x[0] + (-0.599916973063)*x[1]
+        ref[(1, 1, 0, 0)]=-0.929199037027*x_ref[0] + (-0.599916973063)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.683449712514*x[0] + (0.849561115894)*x[1]
+        ref[(1, 1, 0, 1)]=0.683449712514*x_ref[0] + (0.849561115894)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.468591535938*x[0] + (-0.83619806392)*x[1]
+        ref[(1, 1, 0, 2)]=-0.468591535938*x_ref[0] + (-0.83619806392)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.715815202407*x[0] + (0.326645349995)*x[1]
+        ref[(1, 1, 1, 0)]=0.715815202407*x_ref[0] + (0.326645349995)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.205122715441*x[0] + (0.00415283680603)*x[1]
+        ref[(1, 1, 1, 1)]=0.205122715441*x_ref[0] + (0.00415283680603)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.772607600932*x[0] + (0.731640052173)*x[1]
+        ref[(1, 1, 1, 2)]=0.772607600932*x_ref[0] + (0.731640052173)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.836548493849*x[0] + (-0.570086552069)*x[1]
+        ref[(1, 1, 2, 0)]=-0.836548493849*x_ref[0] + (-0.570086552069)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.0760079634055*x[0] + (-0.458118252866)*x[1]
+        ref[(1, 1, 2, 1)]=0.0760079634055*x_ref[0] + (-0.458118252866)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.973005596755*x[0] + (-0.376016774765)*x[1]
+        ref[(1, 1, 2, 2)]=0.973005596755*x_ref[0] + (-0.376016774765)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.42868084456*x[0] + (0.0668918566189)*x[1]
+        ref[(1, 2, 0, 0)]=-0.42868084456*x_ref[0] + (0.0668918566189)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.896145115397*x[0] + (-0.957692579931)*x[1]
+        ref[(1, 2, 0, 1)]=-0.896145115397*x_ref[0] + (-0.957692579931)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.389696795039*x[0] + (-0.565806434911)*x[1]
+        ref[(1, 2, 0, 2)]=-0.389696795039*x_ref[0] + (-0.565806434911)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.704536336664*x[0] + (-0.377174117765)*x[1]
+        ref[(1, 2, 1, 0)]=-0.704536336664*x_ref[0] + (-0.377174117765)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.203938404339*x[0] + (0.366358759919)*x[1]
+        ref[(1, 2, 1, 1)]=0.203938404339*x_ref[0] + (0.366358759919)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.259040229305*x[0] + (0.929719719962)*x[1]
+        ref[(1, 2, 1, 2)]=0.259040229305*x_ref[0] + (0.929719719962)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.939422387914*x[0] + (-0.802105808225)*x[1]
+        ref[(1, 2, 2, 0)]=-0.939422387914*x_ref[0] + (-0.802105808225)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.623333791091*x[0] + (0.825294887499)*x[1]
+        ref[(1, 2, 2, 1)]=0.623333791091*x_ref[0] + (0.825294887499)*x_ref[1]
+        arg[(1, 2, 2, 2)]=0.341015074143*x[0] + (0.85450383902)*x[1]
+        ref[(1, 2, 2, 2)]=0.341015074143*x_ref[0] + (0.85450383902)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.64729189742*x[0] + (-0.99099284455)*x[1]
+        ref[(1, 3, 0, 0)]=-0.64729189742*x_ref[0] + (-0.99099284455)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.101877273213*x[0] + (0.879608352687)*x[1]
+        ref[(1, 3, 0, 1)]=-0.101877273213*x_ref[0] + (0.879608352687)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.859683410059*x[0] + (-0.168258383315)*x[1]
+        ref[(1, 3, 0, 2)]=0.859683410059*x_ref[0] + (-0.168258383315)*x_ref[1]
+        arg[(1, 3, 1, 0)]=0.331434715047*x[0] + (0.634317897703)*x[1]
+        ref[(1, 3, 1, 0)]=0.331434715047*x_ref[0] + (0.634317897703)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.345250414315*x[0] + (-0.491982911159)*x[1]
+        ref[(1, 3, 1, 1)]=0.345250414315*x_ref[0] + (-0.491982911159)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.63578533353*x[0] + (0.123018853192)*x[1]
+        ref[(1, 3, 1, 2)]=0.63578533353*x_ref[0] + (0.123018853192)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.304881035972*x[0] + (-0.411565531966)*x[1]
+        ref[(1, 3, 2, 0)]=0.304881035972*x_ref[0] + (-0.411565531966)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.620535403436*x[0] + (-0.669168926111)*x[1]
+        ref[(1, 3, 2, 1)]=0.620535403436*x_ref[0] + (-0.669168926111)*x_ref[1]
+        arg[(1, 3, 2, 2)]=0.671005399681*x[0] + (-0.87370266843)*x[1]
+        ref[(1, 3, 2, 2)]=0.671005399681*x_ref[0] + (-0.87370266843)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.79054142541*x[0] + (-0.38049694953)*x[1]
+        ref[(2, 0, 0, 0)]=0.79054142541*x_ref[0] + (-0.38049694953)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.459815675633*x[0] + (-0.147302536262)*x[1]
+        ref[(2, 0, 0, 1)]=-0.459815675633*x_ref[0] + (-0.147302536262)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.148627276465*x[0] + (-0.266679625706)*x[1]
+        ref[(2, 0, 0, 2)]=0.148627276465*x_ref[0] + (-0.266679625706)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.811730461196*x[0] + (-0.325014470211)*x[1]
+        ref[(2, 0, 1, 0)]=-0.811730461196*x_ref[0] + (-0.325014470211)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.118358961132*x[0] + (0.0132840633452)*x[1]
+        ref[(2, 0, 1, 1)]=0.118358961132*x_ref[0] + (0.0132840633452)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.269778075804*x[0] + (0.250076960175)*x[1]
+        ref[(2, 0, 1, 2)]=-0.269778075804*x_ref[0] + (0.250076960175)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.000109384071034*x[0] + (0.289834845195)*x[1]
+        ref[(2, 0, 2, 0)]=0.000109384071034*x_ref[0] + (0.289834845195)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.48895190467*x[0] + (-0.914860988531)*x[1]
+        ref[(2, 0, 2, 1)]=-0.48895190467*x_ref[0] + (-0.914860988531)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.0523220417418*x[0] + (0.685329814362)*x[1]
+        ref[(2, 0, 2, 2)]=0.0523220417418*x_ref[0] + (0.685329814362)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.368178265824*x[0] + (0.765358432665)*x[1]
+        ref[(2, 1, 0, 0)]=-0.368178265824*x_ref[0] + (0.765358432665)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.9207863828*x[0] + (-0.120187039751)*x[1]
+        ref[(2, 1, 0, 1)]=-0.9207863828*x_ref[0] + (-0.120187039751)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.220008020096*x[0] + (-0.758569721541)*x[1]
+        ref[(2, 1, 0, 2)]=-0.220008020096*x_ref[0] + (-0.758569721541)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.967701386752*x[0] + (0.0245509826537)*x[1]
+        ref[(2, 1, 1, 0)]=-0.967701386752*x_ref[0] + (0.0245509826537)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.895192844524*x[0] + (0.975886394507)*x[1]
+        ref[(2, 1, 1, 1)]=0.895192844524*x_ref[0] + (0.975886394507)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.232347818907*x[0] + (0.194836891881)*x[1]
+        ref[(2, 1, 1, 2)]=0.232347818907*x_ref[0] + (0.194836891881)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.242206172557*x[0] + (0.388730845097)*x[1]
+        ref[(2, 1, 2, 0)]=0.242206172557*x_ref[0] + (0.388730845097)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.485203311805*x[0] + (-0.640522194813)*x[1]
+        ref[(2, 1, 2, 1)]=-0.485203311805*x_ref[0] + (-0.640522194813)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.958869480902*x[0] + (0.262985086593)*x[1]
+        ref[(2, 1, 2, 2)]=0.958869480902*x_ref[0] + (0.262985086593)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.0590907231009*x[0] + (0.65060268397)*x[1]
+        ref[(2, 2, 0, 0)]=0.0590907231009*x_ref[0] + (0.65060268397)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.0645675127479*x[0] + (-0.0596696135329)*x[1]
+        ref[(2, 2, 0, 1)]=-0.0645675127479*x_ref[0] + (-0.0596696135329)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.868325728133*x[0] + (-0.571363047257)*x[1]
+        ref[(2, 2, 0, 2)]=0.868325728133*x_ref[0] + (-0.571363047257)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.544733750944*x[0] + (0.589827509426)*x[1]
+        ref[(2, 2, 1, 0)]=-0.544733750944*x_ref[0] + (0.589827509426)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.25281574476*x[0] + (0.959280086262)*x[1]
+        ref[(2, 2, 1, 1)]=0.25281574476*x_ref[0] + (0.959280086262)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.0536451899455*x[0] + (0.939654814358)*x[1]
+        ref[(2, 2, 1, 2)]=-0.0536451899455*x_ref[0] + (0.939654814358)*x_ref[1]
+        arg[(2, 2, 2, 0)]=0.63742907579*x[0] + (-0.630827532174)*x[1]
+        ref[(2, 2, 2, 0)]=0.63742907579*x_ref[0] + (-0.630827532174)*x_ref[1]
+        arg[(2, 2, 2, 1)]=-0.696257783114*x[0] + (0.310365034063)*x[1]
+        ref[(2, 2, 2, 1)]=-0.696257783114*x_ref[0] + (0.310365034063)*x_ref[1]
+        arg[(2, 2, 2, 2)]=0.106366896878*x[0] + (-0.86403234729)*x[1]
+        ref[(2, 2, 2, 2)]=0.106366896878*x_ref[0] + (-0.86403234729)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.492863660074*x[0] + (-0.107070750577)*x[1]
+        ref[(2, 3, 0, 0)]=0.492863660074*x_ref[0] + (-0.107070750577)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.313955021521*x[0] + (-0.167859907354)*x[1]
+        ref[(2, 3, 0, 1)]=0.313955021521*x_ref[0] + (-0.167859907354)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.37019443583*x[0] + (0.342002623526)*x[1]
+        ref[(2, 3, 0, 2)]=0.37019443583*x_ref[0] + (0.342002623526)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.715503404166*x[0] + (0.441755003864)*x[1]
+        ref[(2, 3, 1, 0)]=0.715503404166*x_ref[0] + (0.441755003864)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.895017376634*x[0] + (0.989767464027)*x[1]
+        ref[(2, 3, 1, 1)]=-0.895017376634*x_ref[0] + (0.989767464027)*x_ref[1]
+        arg[(2, 3, 1, 2)]=-0.773247388848*x[0] + (-0.522304398277)*x[1]
+        ref[(2, 3, 1, 2)]=-0.773247388848*x_ref[0] + (-0.522304398277)*x_ref[1]
+        arg[(2, 3, 2, 0)]=-0.722081661126*x[0] + (-0.811549523764)*x[1]
+        ref[(2, 3, 2, 0)]=-0.722081661126*x_ref[0] + (-0.811549523764)*x_ref[1]
+        arg[(2, 3, 2, 1)]=-0.485815772698*x[0] + (-0.482177358206)*x[1]
+        ref[(2, 3, 2, 1)]=-0.485815772698*x_ref[0] + (-0.482177358206)*x_ref[1]
+        arg[(2, 3, 2, 2)]=0.425505179363*x[0] + (0.386206191137)*x[1]
+        ref[(2, 3, 2, 2)]=0.425505179363*x_ref[0] + (0.386206191137)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.889624311612*x[0] + (0.495093289098)*x[1]
+        ref[(3, 0, 0, 0)]=0.889624311612*x_ref[0] + (0.495093289098)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.295865589761*x[0] + (0.442772605251)*x[1]
+        ref[(3, 0, 0, 1)]=-0.295865589761*x_ref[0] + (0.442772605251)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.801470246738*x[0] + (0.104255886792)*x[1]
+        ref[(3, 0, 0, 2)]=-0.801470246738*x_ref[0] + (0.104255886792)*x_ref[1]
+        arg[(3, 0, 1, 0)]=-0.681597644014*x[0] + (-0.44569908517)*x[1]
+        ref[(3, 0, 1, 0)]=-0.681597644014*x_ref[0] + (-0.44569908517)*x_ref[1]
+        arg[(3, 0, 1, 1)]=0.417975856019*x[0] + (0.605539340307)*x[1]
+        ref[(3, 0, 1, 1)]=0.417975856019*x_ref[0] + (0.605539340307)*x_ref[1]
+        arg[(3, 0, 1, 2)]=-0.881234255707*x[0] + (0.479155336436)*x[1]
+        ref[(3, 0, 1, 2)]=-0.881234255707*x_ref[0] + (0.479155336436)*x_ref[1]
+        arg[(3, 0, 2, 0)]=-0.883341608485*x[0] + (0.511146060007)*x[1]
+        ref[(3, 0, 2, 0)]=-0.883341608485*x_ref[0] + (0.511146060007)*x_ref[1]
+        arg[(3, 0, 2, 1)]=-0.368840797789*x[0] + (0.257940434394)*x[1]
+        ref[(3, 0, 2, 1)]=-0.368840797789*x_ref[0] + (0.257940434394)*x_ref[1]
+        arg[(3, 0, 2, 2)]=0.924420939468*x[0] + (-0.930272907179)*x[1]
+        ref[(3, 0, 2, 2)]=0.924420939468*x_ref[0] + (-0.930272907179)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.845374365338*x[0] + (-0.0922524009651)*x[1]
+        ref[(3, 1, 0, 0)]=-0.845374365338*x_ref[0] + (-0.0922524009651)*x_ref[1]
+        arg[(3, 1, 0, 1)]=-0.352441381559*x[0] + (0.656822856031)*x[1]
+        ref[(3, 1, 0, 1)]=-0.352441381559*x_ref[0] + (0.656822856031)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.56792356598*x[0] + (-0.25975223007)*x[1]
+        ref[(3, 1, 0, 2)]=0.56792356598*x_ref[0] + (-0.25975223007)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.704143590544*x[0] + (-0.93191584867)*x[1]
+        ref[(3, 1, 1, 0)]=0.704143590544*x_ref[0] + (-0.93191584867)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.779774581147*x[0] + (0.529339275691)*x[1]
+        ref[(3, 1, 1, 1)]=-0.779774581147*x_ref[0] + (0.529339275691)*x_ref[1]
+        arg[(3, 1, 1, 2)]=0.132824473746*x[0] + (-0.407674573713)*x[1]
+        ref[(3, 1, 1, 2)]=0.132824473746*x_ref[0] + (-0.407674573713)*x_ref[1]
+        arg[(3, 1, 2, 0)]=-0.556054488117*x[0] + (0.423472956559)*x[1]
+        ref[(3, 1, 2, 0)]=-0.556054488117*x_ref[0] + (0.423472956559)*x_ref[1]
+        arg[(3, 1, 2, 1)]=-0.636365298319*x[0] + (-0.9140582725)*x[1]
+        ref[(3, 1, 2, 1)]=-0.636365298319*x_ref[0] + (-0.9140582725)*x_ref[1]
+        arg[(3, 1, 2, 2)]=0.66159714543*x[0] + (0.099202651715)*x[1]
+        ref[(3, 1, 2, 2)]=0.66159714543*x_ref[0] + (0.099202651715)*x_ref[1]
+        arg[(3, 2, 0, 0)]=-0.0171257991158*x[0] + (0.476912758038)*x[1]
+        ref[(3, 2, 0, 0)]=-0.0171257991158*x_ref[0] + (0.476912758038)*x_ref[1]
+        arg[(3, 2, 0, 1)]=-0.778753536654*x[0] + (-0.916184243975)*x[1]
+        ref[(3, 2, 0, 1)]=-0.778753536654*x_ref[0] + (-0.916184243975)*x_ref[1]
+        arg[(3, 2, 0, 2)]=0.182104378059*x[0] + (-0.370297521401)*x[1]
+        ref[(3, 2, 0, 2)]=0.182104378059*x_ref[0] + (-0.370297521401)*x_ref[1]
+        arg[(3, 2, 1, 0)]=-0.239104032609*x[0] + (-0.199809889668)*x[1]
+        ref[(3, 2, 1, 0)]=-0.239104032609*x_ref[0] + (-0.199809889668)*x_ref[1]
+        arg[(3, 2, 1, 1)]=0.295005350969*x[0] + (0.161095042148)*x[1]
+        ref[(3, 2, 1, 1)]=0.295005350969*x_ref[0] + (0.161095042148)*x_ref[1]
+        arg[(3, 2, 1, 2)]=0.457211038292*x[0] + (0.677652975197)*x[1]
+        ref[(3, 2, 1, 2)]=0.457211038292*x_ref[0] + (0.677652975197)*x_ref[1]
+        arg[(3, 2, 2, 0)]=0.0688306903525*x[0] + (0.212160077744)*x[1]
+        ref[(3, 2, 2, 0)]=0.0688306903525*x_ref[0] + (0.212160077744)*x_ref[1]
+        arg[(3, 2, 2, 1)]=-0.703427940572*x[0] + (0.201042654937)*x[1]
+        ref[(3, 2, 2, 1)]=-0.703427940572*x_ref[0] + (0.201042654937)*x_ref[1]
+        arg[(3, 2, 2, 2)]=-0.680684170528*x[0] + (-0.204142167869)*x[1]
+        ref[(3, 2, 2, 2)]=-0.680684170528*x_ref[0] + (-0.204142167869)*x_ref[1]
+        arg[(3, 3, 0, 0)]=-0.495455804818*x[0] + (-0.598002864202)*x[1]
+        ref[(3, 3, 0, 0)]=-0.495455804818*x_ref[0] + (-0.598002864202)*x_ref[1]
+        arg[(3, 3, 0, 1)]=0.101979299736*x[0] + (-0.929758108437)*x[1]
+        ref[(3, 3, 0, 1)]=0.101979299736*x_ref[0] + (-0.929758108437)*x_ref[1]
+        arg[(3, 3, 0, 2)]=-0.504047555595*x[0] + (0.0554519831442)*x[1]
+        ref[(3, 3, 0, 2)]=-0.504047555595*x_ref[0] + (0.0554519831442)*x_ref[1]
+        arg[(3, 3, 1, 0)]=0.987526580196*x[0] + (-0.686549328263)*x[1]
+        ref[(3, 3, 1, 0)]=0.987526580196*x_ref[0] + (-0.686549328263)*x_ref[1]
+        arg[(3, 3, 1, 1)]=0.348325874395*x[0] + (0.209061519807)*x[1]
+        ref[(3, 3, 1, 1)]=0.348325874395*x_ref[0] + (0.209061519807)*x_ref[1]
+        arg[(3, 3, 1, 2)]=0.0406828334874*x[0] + (0.127454637903)*x[1]
+        ref[(3, 3, 1, 2)]=0.0406828334874*x_ref[0] + (0.127454637903)*x_ref[1]
+        arg[(3, 3, 2, 0)]=0.99546863156*x[0] + (0.741004466784)*x[1]
+        ref[(3, 3, 2, 0)]=0.99546863156*x_ref[0] + (0.741004466784)*x_ref[1]
+        arg[(3, 3, 2, 1)]=-0.614628481068*x[0] + (-0.742973726659)*x[1]
+        ref[(3, 3, 2, 1)]=-0.614628481068*x_ref[0] + (-0.742973726659)*x_ref[1]
+        arg[(3, 3, 2, 2)]=0.25451582417*x[0] + (-0.160914113705)*x[1]
+        ref[(3, 3, 2, 2)]=0.25451582417*x_ref[0] + (-0.160914113705)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.129560957846*x[2]
+            ref[(0, 0, 0, 0)]+=-0.129560957846*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.871854550353*x[2]
+            ref[(0, 0, 0, 1)]+=-0.871854550353*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.599618480215*x[2]
+            ref[(0, 0, 0, 2)]+=0.599618480215*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.523679548132*x[2]
+            ref[(0, 0, 1, 0)]+=0.523679548132*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.816999141548*x[2]
+            ref[(0, 0, 1, 1)]+=0.816999141548*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.0338749394732*x[2]
+            ref[(0, 0, 1, 2)]+=-0.0338749394732*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.462077733747*x[2]
+            ref[(0, 0, 2, 0)]+=0.462077733747*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.313888279046*x[2]
+            ref[(0, 0, 2, 1)]+=0.313888279046*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.104198522987*x[2]
+            ref[(0, 0, 2, 2)]+=0.104198522987*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.161696638853*x[2]
+            ref[(0, 1, 0, 0)]+=0.161696638853*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.0371417671322*x[2]
+            ref[(0, 1, 0, 1)]+=-0.0371417671322*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.144128768799*x[2]
+            ref[(0, 1, 0, 2)]+=0.144128768799*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.800589657905*x[2]
+            ref[(0, 1, 1, 0)]+=-0.800589657905*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.463860851136*x[2]
+            ref[(0, 1, 1, 1)]+=0.463860851136*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.992334205162*x[2]
+            ref[(0, 1, 1, 2)]+=0.992334205162*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.595643694021*x[2]
+            ref[(0, 1, 2, 0)]+=-0.595643694021*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.218753185047*x[2]
+            ref[(0, 1, 2, 1)]+=0.218753185047*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.227034764597*x[2]
+            ref[(0, 1, 2, 2)]+=0.227034764597*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.00754210950887*x[2]
+            ref[(0, 2, 0, 0)]+=-0.00754210950887*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.459600557065*x[2]
+            ref[(0, 2, 0, 1)]+=-0.459600557065*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.49353907931*x[2]
+            ref[(0, 2, 0, 2)]+=0.49353907931*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.443746117931*x[2]
+            ref[(0, 2, 1, 0)]+=-0.443746117931*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.0147932127583*x[2]
+            ref[(0, 2, 1, 1)]+=-0.0147932127583*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.0157839166056*x[2]
+            ref[(0, 2, 1, 2)]+=0.0157839166056*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.317096111376*x[2]
+            ref[(0, 2, 2, 0)]+=0.317096111376*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.118111050429*x[2]
+            ref[(0, 2, 2, 1)]+=-0.118111050429*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.181880515735*x[2]
+            ref[(0, 2, 2, 2)]+=0.181880515735*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.394215708271*x[2]
+            ref[(0, 3, 0, 0)]+=-0.394215708271*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.21870859004*x[2]
+            ref[(0, 3, 0, 1)]+=0.21870859004*x_ref[2]
+            arg[(0, 3, 0, 2)]+=-0.0346225157862*x[2]
+            ref[(0, 3, 0, 2)]+=-0.0346225157862*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.999661627663*x[2]
+            ref[(0, 3, 1, 0)]+=0.999661627663*x_ref[2]
+            arg[(0, 3, 1, 1)]+=-0.846972756708*x[2]
+            ref[(0, 3, 1, 1)]+=-0.846972756708*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.806269280988*x[2]
+            ref[(0, 3, 1, 2)]+=0.806269280988*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.244727274988*x[2]
+            ref[(0, 3, 2, 0)]+=-0.244727274988*x_ref[2]
+            arg[(0, 3, 2, 1)]+=0.325449858198*x[2]
+            ref[(0, 3, 2, 1)]+=0.325449858198*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.837318004739*x[2]
+            ref[(0, 3, 2, 2)]+=-0.837318004739*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.129975463642*x[2]
+            ref[(1, 0, 0, 0)]+=-0.129975463642*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.965123597065*x[2]
+            ref[(1, 0, 0, 1)]+=0.965123597065*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.337005654611*x[2]
+            ref[(1, 0, 0, 2)]+=-0.337005654611*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.878425184307*x[2]
+            ref[(1, 0, 1, 0)]+=-0.878425184307*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.418791850063*x[2]
+            ref[(1, 0, 1, 1)]+=0.418791850063*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.642666825672*x[2]
+            ref[(1, 0, 1, 2)]+=-0.642666825672*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.747506283159*x[2]
+            ref[(1, 0, 2, 0)]+=-0.747506283159*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.200353460471*x[2]
+            ref[(1, 0, 2, 1)]+=0.200353460471*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.496686827731*x[2]
+            ref[(1, 0, 2, 2)]+=0.496686827731*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.0177308808834*x[2]
+            ref[(1, 1, 0, 0)]+=-0.0177308808834*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.391840934664*x[2]
+            ref[(1, 1, 0, 1)]+=0.391840934664*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.975766261795*x[2]
+            ref[(1, 1, 0, 2)]+=0.975766261795*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.424693593056*x[2]
+            ref[(1, 1, 1, 0)]+=0.424693593056*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.166836473475*x[2]
+            ref[(1, 1, 1, 1)]+=0.166836473475*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.47234904737*x[2]
+            ref[(1, 1, 1, 2)]+=-0.47234904737*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.288613450249*x[2]
+            ref[(1, 1, 2, 0)]+=-0.288613450249*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.721277152871*x[2]
+            ref[(1, 1, 2, 1)]+=0.721277152871*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.191334494363*x[2]
+            ref[(1, 1, 2, 2)]+=-0.191334494363*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.750364178526*x[2]
+            ref[(1, 2, 0, 0)]+=0.750364178526*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.461826025575*x[2]
+            ref[(1, 2, 0, 1)]+=-0.461826025575*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.520286377961*x[2]
+            ref[(1, 2, 0, 2)]+=-0.520286377961*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.227049858997*x[2]
+            ref[(1, 2, 1, 0)]+=0.227049858997*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.423592416404*x[2]
+            ref[(1, 2, 1, 1)]+=-0.423592416404*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.19345571892*x[2]
+            ref[(1, 2, 1, 2)]+=-0.19345571892*x_ref[2]
+            arg[(1, 2, 2, 0)]+=0.381430938908*x[2]
+            ref[(1, 2, 2, 0)]+=0.381430938908*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.950825244433*x[2]
+            ref[(1, 2, 2, 1)]+=-0.950825244433*x_ref[2]
+            arg[(1, 2, 2, 2)]+=-0.961716670758*x[2]
+            ref[(1, 2, 2, 2)]+=-0.961716670758*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.312084873169*x[2]
+            ref[(1, 3, 0, 0)]+=0.312084873169*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.263223747305*x[2]
+            ref[(1, 3, 0, 1)]+=0.263223747305*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.675536583453*x[2]
+            ref[(1, 3, 0, 2)]+=-0.675536583453*x_ref[2]
+            arg[(1, 3, 1, 0)]+=-0.339483281776*x[2]
+            ref[(1, 3, 1, 0)]+=-0.339483281776*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.194649709062*x[2]
+            ref[(1, 3, 1, 1)]+=-0.194649709062*x_ref[2]
+            arg[(1, 3, 1, 2)]+=-0.356865719943*x[2]
+            ref[(1, 3, 1, 2)]+=-0.356865719943*x_ref[2]
+            arg[(1, 3, 2, 0)]+=0.324943807941*x[2]
+            ref[(1, 3, 2, 0)]+=0.324943807941*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.335259001628*x[2]
+            ref[(1, 3, 2, 1)]+=0.335259001628*x_ref[2]
+            arg[(1, 3, 2, 2)]+=-0.571600784068*x[2]
+            ref[(1, 3, 2, 2)]+=-0.571600784068*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.444589115918*x[2]
+            ref[(2, 0, 0, 0)]+=-0.444589115918*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.756521135832*x[2]
+            ref[(2, 0, 0, 1)]+=-0.756521135832*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.685267675534*x[2]
+            ref[(2, 0, 0, 2)]+=-0.685267675534*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.368065366464*x[2]
+            ref[(2, 0, 1, 0)]+=-0.368065366464*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.30712148307*x[2]
+            ref[(2, 0, 1, 1)]+=0.30712148307*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.511714290198*x[2]
+            ref[(2, 0, 1, 2)]+=-0.511714290198*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.500538348537*x[2]
+            ref[(2, 0, 2, 0)]+=-0.500538348537*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.270991984322*x[2]
+            ref[(2, 0, 2, 1)]+=-0.270991984322*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.4406332445*x[2]
+            ref[(2, 0, 2, 2)]+=-0.4406332445*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.779325341886*x[2]
+            ref[(2, 1, 0, 0)]+=-0.779325341886*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.149765713427*x[2]
+            ref[(2, 1, 0, 1)]+=-0.149765713427*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.247853492606*x[2]
+            ref[(2, 1, 0, 2)]+=0.247853492606*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.894412257156*x[2]
+            ref[(2, 1, 1, 0)]+=-0.894412257156*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.578316870713*x[2]
+            ref[(2, 1, 1, 1)]+=0.578316870713*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.229968165451*x[2]
+            ref[(2, 1, 1, 2)]+=0.229968165451*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.532905907742*x[2]
+            ref[(2, 1, 2, 0)]+=0.532905907742*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.922789813758*x[2]
+            ref[(2, 1, 2, 1)]+=-0.922789813758*x_ref[2]
+            arg[(2, 1, 2, 2)]+=-0.469219314248*x[2]
+            ref[(2, 1, 2, 2)]+=-0.469219314248*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.616057871397*x[2]
+            ref[(2, 2, 0, 0)]+=0.616057871397*x_ref[2]
+            arg[(2, 2, 0, 1)]+=-0.361179375959*x[2]
+            ref[(2, 2, 0, 1)]+=-0.361179375959*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.197844137884*x[2]
+            ref[(2, 2, 0, 2)]+=-0.197844137884*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.0211892440641*x[2]
+            ref[(2, 2, 1, 0)]+=-0.0211892440641*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.874777103937*x[2]
+            ref[(2, 2, 1, 1)]+=-0.874777103937*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.899503291968*x[2]
+            ref[(2, 2, 1, 2)]+=-0.899503291968*x_ref[2]
+            arg[(2, 2, 2, 0)]+=0.468195335216*x[2]
+            ref[(2, 2, 2, 0)]+=0.468195335216*x_ref[2]
+            arg[(2, 2, 2, 1)]+=-0.76947038373*x[2]
+            ref[(2, 2, 2, 1)]+=-0.76947038373*x_ref[2]
+            arg[(2, 2, 2, 2)]+=-0.0081754288163*x[2]
+            ref[(2, 2, 2, 2)]+=-0.0081754288163*x_ref[2]
+            arg[(2, 3, 0, 0)]+=0.300299246368*x[2]
+            ref[(2, 3, 0, 0)]+=0.300299246368*x_ref[2]
+            arg[(2, 3, 0, 1)]+=-0.109194381232*x[2]
+            ref[(2, 3, 0, 1)]+=-0.109194381232*x_ref[2]
+            arg[(2, 3, 0, 2)]+=0.699235798257*x[2]
+            ref[(2, 3, 0, 2)]+=0.699235798257*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.997770554846*x[2]
+            ref[(2, 3, 1, 0)]+=-0.997770554846*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.529766688825*x[2]
+            ref[(2, 3, 1, 1)]+=0.529766688825*x_ref[2]
+            arg[(2, 3, 1, 2)]+=-0.877062547355*x[2]
+            ref[(2, 3, 1, 2)]+=-0.877062547355*x_ref[2]
+            arg[(2, 3, 2, 0)]+=-0.131530508663*x[2]
+            ref[(2, 3, 2, 0)]+=-0.131530508663*x_ref[2]
+            arg[(2, 3, 2, 1)]+=0.862465736303*x[2]
+            ref[(2, 3, 2, 1)]+=0.862465736303*x_ref[2]
+            arg[(2, 3, 2, 2)]+=-0.226138705905*x[2]
+            ref[(2, 3, 2, 2)]+=-0.226138705905*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.620353388297*x[2]
+            ref[(3, 0, 0, 0)]+=0.620353388297*x_ref[2]
+            arg[(3, 0, 0, 1)]+=0.483151180983*x[2]
+            ref[(3, 0, 0, 1)]+=0.483151180983*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.748995842328*x[2]
+            ref[(3, 0, 0, 2)]+=0.748995842328*x_ref[2]
+            arg[(3, 0, 1, 0)]+=-0.238086277391*x[2]
+            ref[(3, 0, 1, 0)]+=-0.238086277391*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.648161958047*x[2]
+            ref[(3, 0, 1, 1)]+=0.648161958047*x_ref[2]
+            arg[(3, 0, 1, 2)]+=0.591662784309*x[2]
+            ref[(3, 0, 1, 2)]+=0.591662784309*x_ref[2]
+            arg[(3, 0, 2, 0)]+=-0.955801654982*x[2]
+            ref[(3, 0, 2, 0)]+=-0.955801654982*x_ref[2]
+            arg[(3, 0, 2, 1)]+=0.544346915224*x[2]
+            ref[(3, 0, 2, 1)]+=0.544346915224*x_ref[2]
+            arg[(3, 0, 2, 2)]+=0.783460552373*x[2]
+            ref[(3, 0, 2, 2)]+=0.783460552373*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.396200746725*x[2]
+            ref[(3, 1, 0, 0)]+=0.396200746725*x_ref[2]
+            arg[(3, 1, 0, 1)]+=-0.168789685228*x[2]
+            ref[(3, 1, 0, 1)]+=-0.168789685228*x_ref[2]
+            arg[(3, 1, 0, 2)]+=-0.010821592123*x[2]
+            ref[(3, 1, 0, 2)]+=-0.010821592123*x_ref[2]
+            arg[(3, 1, 1, 0)]+=-0.927700744024*x[2]
+            ref[(3, 1, 1, 0)]+=-0.927700744024*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.868709747199*x[2]
+            ref[(3, 1, 1, 1)]+=-0.868709747199*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.672048856451*x[2]
+            ref[(3, 1, 1, 2)]+=0.672048856451*x_ref[2]
+            arg[(3, 1, 2, 0)]+=-0.651102293733*x[2]
+            ref[(3, 1, 2, 0)]+=-0.651102293733*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.897959461428*x[2]
+            ref[(3, 1, 2, 1)]+=0.897959461428*x_ref[2]
+            arg[(3, 1, 2, 2)]+=-0.227011741882*x[2]
+            ref[(3, 1, 2, 2)]+=-0.227011741882*x_ref[2]
+            arg[(3, 2, 0, 0)]+=0.998110153925*x[2]
+            ref[(3, 2, 0, 0)]+=0.998110153925*x_ref[2]
+            arg[(3, 2, 0, 1)]+=0.186063431737*x[2]
+            ref[(3, 2, 0, 1)]+=0.186063431737*x_ref[2]
+            arg[(3, 2, 0, 2)]+=-0.702712691787*x[2]
+            ref[(3, 2, 0, 2)]+=-0.702712691787*x_ref[2]
+            arg[(3, 2, 1, 0)]+=0.643364076728*x[2]
+            ref[(3, 2, 1, 0)]+=0.643364076728*x_ref[2]
+            arg[(3, 2, 1, 1)]+=0.369054437157*x[2]
+            ref[(3, 2, 1, 1)]+=0.369054437157*x_ref[2]
+            arg[(3, 2, 1, 2)]+=0.289525745067*x[2]
+            ref[(3, 2, 1, 2)]+=0.289525745067*x_ref[2]
+            arg[(3, 2, 2, 0)]+=0.388268306898*x[2]
+            ref[(3, 2, 2, 0)]+=0.388268306898*x_ref[2]
+            arg[(3, 2, 2, 1)]+=-0.364563788918*x[2]
+            ref[(3, 2, 2, 1)]+=-0.364563788918*x_ref[2]
+            arg[(3, 2, 2, 2)]+=0.11526595332*x[2]
+            ref[(3, 2, 2, 2)]+=0.11526595332*x_ref[2]
+            arg[(3, 3, 0, 0)]+=-0.46720543701*x[2]
+            ref[(3, 3, 0, 0)]+=-0.46720543701*x_ref[2]
+            arg[(3, 3, 0, 1)]+=-0.0323085495425*x[2]
+            ref[(3, 3, 0, 1)]+=-0.0323085495425*x_ref[2]
+            arg[(3, 3, 0, 2)]+=0.311848384056*x[2]
+            ref[(3, 3, 0, 2)]+=0.311848384056*x_ref[2]
+            arg[(3, 3, 1, 0)]+=0.26322574238*x[2]
+            ref[(3, 3, 1, 0)]+=0.26322574238*x_ref[2]
+            arg[(3, 3, 1, 1)]+=-0.294593832256*x[2]
+            ref[(3, 3, 1, 1)]+=-0.294593832256*x_ref[2]
+            arg[(3, 3, 1, 2)]+=-0.0279999055588*x[2]
+            ref[(3, 3, 1, 2)]+=-0.0279999055588*x_ref[2]
+            arg[(3, 3, 2, 0)]+=-0.804999158238*x[2]
+            ref[(3, 3, 2, 0)]+=-0.804999158238*x_ref[2]
+            arg[(3, 3, 2, 1)]+=0.644625155091*x[2]
+            ref[(3, 3, 2, 1)]+=0.644625155091*x_ref[2]
+            arg[(3, 3, 2, 2)]+=0.617988149654*x[2]
+            ref[(3, 3, 2, 2)]+=0.617988149654*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.861027576513*x[0] + (0.293003782513)*x[1]
+        ref=0.861027576513*x_ref[0] + (0.293003782513)*x_ref[1]
+        if dim==3:
+            arg+=(-0.96615932809)*x[2]
+            ref+=(-0.96615932809)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.180595711514*x[0] + (0.281311361171)*x[1]
+        ref[(0,)]=0.180595711514*x_ref[0] + (0.281311361171)*x_ref[1]
+        arg[(1,)]=-0.917770815172*x[0] + (-0.376349101032)*x[1]
+        ref[(1,)]=-0.917770815172*x_ref[0] + (-0.376349101032)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.238178024934*x[2]
+            ref[(0,)]+=-0.238178024934*x_ref[2]
+            arg[(1,)]+=-0.526377305362*x[2]
+            ref[(1,)]+=-0.526377305362*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=-0.103139452652*x[0] + (0.386905385783)*x[1]
+        ref[(0, 0)]=-0.103139452652*x_ref[0] + (0.386905385783)*x_ref[1]
+        arg[(0, 1)]=-0.838350728384*x[0] + (0.0384980470947)*x[1]
+        ref[(0, 1)]=-0.838350728384*x_ref[0] + (0.0384980470947)*x_ref[1]
+        arg[(0, 2)]=-0.521835047498*x[0] + (-0.850734507492)*x[1]
+        ref[(0, 2)]=-0.521835047498*x_ref[0] + (-0.850734507492)*x_ref[1]
+        arg[(0, 3)]=-0.741911845628*x[0] + (-0.167475806216)*x[1]
+        ref[(0, 3)]=-0.741911845628*x_ref[0] + (-0.167475806216)*x_ref[1]
+        arg[(1, 0)]=0.0256463609684*x[0] + (0.543919168808)*x[1]
+        ref[(1, 0)]=0.0256463609684*x_ref[0] + (0.543919168808)*x_ref[1]
+        arg[(1, 1)]=0.922266576805*x[0] + (0.708924809648)*x[1]
+        ref[(1, 1)]=0.922266576805*x_ref[0] + (0.708924809648)*x_ref[1]
+        arg[(1, 2)]=0.409547017508*x[0] + (0.714289131558)*x[1]
+        ref[(1, 2)]=0.409547017508*x_ref[0] + (0.714289131558)*x_ref[1]
+        arg[(1, 3)]=-0.612095353811*x[0] + (0.140832750693)*x[1]
+        ref[(1, 3)]=-0.612095353811*x_ref[0] + (0.140832750693)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.539238554961*x[2]
+            ref[(0, 0)]+=0.539238554961*x_ref[2]
+            arg[(0, 1)]+=-0.280711096313*x[2]
+            ref[(0, 1)]+=-0.280711096313*x_ref[2]
+            arg[(0, 2)]+=0.828959604922*x[2]
+            ref[(0, 2)]+=0.828959604922*x_ref[2]
+            arg[(0, 3)]+=0.762619132594*x[2]
+            ref[(0, 3)]+=0.762619132594*x_ref[2]
+            arg[(1, 0)]+=0.756227330485*x[2]
+            ref[(1, 0)]+=0.756227330485*x_ref[2]
+            arg[(1, 1)]+=0.515434269086*x[2]
+            ref[(1, 1)]+=0.515434269086*x_ref[2]
+            arg[(1, 2)]+=-0.657768179121*x[2]
+            ref[(1, 2)]+=-0.657768179121*x_ref[2]
+            arg[(1, 3)]+=-0.469863738776*x[2]
+            ref[(1, 3)]+=-0.469863738776*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4),w_ref)
+        arg[(0, 0, 0)]=0.730588315951*x[0] + (-0.17737041058)*x[1]
+        ref[(0, 0, 0)]=0.730588315951*x_ref[0] + (-0.17737041058)*x_ref[1]
+        arg[(0, 0, 1)]=-0.940382533983*x[0] + (-0.889857042161)*x[1]
+        ref[(0, 0, 1)]=-0.940382533983*x_ref[0] + (-0.889857042161)*x_ref[1]
+        arg[(0, 0, 2)]=0.795142203167*x[0] + (-0.902441027794)*x[1]
+        ref[(0, 0, 2)]=0.795142203167*x_ref[0] + (-0.902441027794)*x_ref[1]
+        arg[(0, 0, 3)]=-0.93675197086*x[0] + (0.105328136207)*x[1]
+        ref[(0, 0, 3)]=-0.93675197086*x_ref[0] + (0.105328136207)*x_ref[1]
+        arg[(0, 1, 0)]=-0.898679708394*x[0] + (-0.839321133249)*x[1]
+        ref[(0, 1, 0)]=-0.898679708394*x_ref[0] + (-0.839321133249)*x_ref[1]
+        arg[(0, 1, 1)]=0.464258961395*x[0] + (-0.739418272829)*x[1]
+        ref[(0, 1, 1)]=0.464258961395*x_ref[0] + (-0.739418272829)*x_ref[1]
+        arg[(0, 1, 2)]=-0.391082247898*x[0] + (-0.566521870856)*x[1]
+        ref[(0, 1, 2)]=-0.391082247898*x_ref[0] + (-0.566521870856)*x_ref[1]
+        arg[(0, 1, 3)]=0.85841638089*x[0] + (0.440303658739)*x[1]
+        ref[(0, 1, 3)]=0.85841638089*x_ref[0] + (0.440303658739)*x_ref[1]
+        arg[(1, 0, 0)]=0.418765799583*x[0] + (-0.518242437696)*x[1]
+        ref[(1, 0, 0)]=0.418765799583*x_ref[0] + (-0.518242437696)*x_ref[1]
+        arg[(1, 0, 1)]=0.429534752714*x[0] + (-0.463260245006)*x[1]
+        ref[(1, 0, 1)]=0.429534752714*x_ref[0] + (-0.463260245006)*x_ref[1]
+        arg[(1, 0, 2)]=-0.652470489796*x[0] + (0.353102717214)*x[1]
+        ref[(1, 0, 2)]=-0.652470489796*x_ref[0] + (0.353102717214)*x_ref[1]
+        arg[(1, 0, 3)]=-0.886531050011*x[0] + (-0.0893204025307)*x[1]
+        ref[(1, 0, 3)]=-0.886531050011*x_ref[0] + (-0.0893204025307)*x_ref[1]
+        arg[(1, 1, 0)]=0.923475559181*x[0] + (0.139137588654)*x[1]
+        ref[(1, 1, 0)]=0.923475559181*x_ref[0] + (0.139137588654)*x_ref[1]
+        arg[(1, 1, 1)]=-0.0334247154717*x[0] + (-0.847155762213)*x[1]
+        ref[(1, 1, 1)]=-0.0334247154717*x_ref[0] + (-0.847155762213)*x_ref[1]
+        arg[(1, 1, 2)]=0.0737280534053*x[0] + (0.197122209097)*x[1]
+        ref[(1, 1, 2)]=0.0737280534053*x_ref[0] + (0.197122209097)*x_ref[1]
+        arg[(1, 1, 3)]=-0.012708928699*x[0] + (0.148321046403)*x[1]
+        ref[(1, 1, 3)]=-0.012708928699*x_ref[0] + (0.148321046403)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.913459587118*x[2]
+            ref[(0, 0, 0)]+=0.913459587118*x_ref[2]
+            arg[(0, 0, 1)]+=0.447178696009*x[2]
+            ref[(0, 0, 1)]+=0.447178696009*x_ref[2]
+            arg[(0, 0, 2)]+=-0.704784951085*x[2]
+            ref[(0, 0, 2)]+=-0.704784951085*x_ref[2]
+            arg[(0, 0, 3)]+=-0.503766680046*x[2]
+            ref[(0, 0, 3)]+=-0.503766680046*x_ref[2]
+            arg[(0, 1, 0)]+=0.617099249691*x[2]
+            ref[(0, 1, 0)]+=0.617099249691*x_ref[2]
+            arg[(0, 1, 1)]+=0.912176431509*x[2]
+            ref[(0, 1, 1)]+=0.912176431509*x_ref[2]
+            arg[(0, 1, 2)]+=-0.207565651178*x[2]
+            ref[(0, 1, 2)]+=-0.207565651178*x_ref[2]
+            arg[(0, 1, 3)]+=-0.440012527968*x[2]
+            ref[(0, 1, 3)]+=-0.440012527968*x_ref[2]
+            arg[(1, 0, 0)]+=-0.67172558308*x[2]
+            ref[(1, 0, 0)]+=-0.67172558308*x_ref[2]
+            arg[(1, 0, 1)]+=-0.976670382173*x[2]
+            ref[(1, 0, 1)]+=-0.976670382173*x_ref[2]
+            arg[(1, 0, 2)]+=-0.447303427181*x[2]
+            ref[(1, 0, 2)]+=-0.447303427181*x_ref[2]
+            arg[(1, 0, 3)]+=0.548801298715*x[2]
+            ref[(1, 0, 3)]+=0.548801298715*x_ref[2]
+            arg[(1, 1, 0)]+=0.758351596186*x[2]
+            ref[(1, 1, 0)]+=0.758351596186*x_ref[2]
+            arg[(1, 1, 1)]+=0.675892156121*x[2]
+            ref[(1, 1, 1)]+=0.675892156121*x_ref[2]
+            arg[(1, 1, 2)]+=-0.761622327202*x[2]
+            ref[(1, 1, 2)]+=-0.761622327202*x_ref[2]
+            arg[(1, 1, 3)]+=-0.848564499699*x[2]
+            ref[(1, 1, 3)]+=-0.848564499699*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3, 2),w)
+        ref = Data(0,(2, 2, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=-0.697806692809*x[0] + (0.627645040005)*x[1]
+        ref[(0, 0, 0, 0)]=-0.697806692809*x_ref[0] + (0.627645040005)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.915201569078*x[0] + (0.866999815205)*x[1]
+        ref[(0, 0, 0, 1)]=0.915201569078*x_ref[0] + (0.866999815205)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.785962870507*x[0] + (0.372451310683)*x[1]
+        ref[(0, 0, 1, 0)]=-0.785962870507*x_ref[0] + (0.372451310683)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.581798432436*x[0] + (-0.82318257759)*x[1]
+        ref[(0, 0, 1, 1)]=0.581798432436*x_ref[0] + (-0.82318257759)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.438610088791*x[0] + (-0.75119438542)*x[1]
+        ref[(0, 0, 2, 0)]=-0.438610088791*x_ref[0] + (-0.75119438542)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.125839030484*x[0] + (0.71042592613)*x[1]
+        ref[(0, 0, 2, 1)]=-0.125839030484*x_ref[0] + (0.71042592613)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.776132604911*x[0] + (-0.811084608636)*x[1]
+        ref[(0, 1, 0, 0)]=0.776132604911*x_ref[0] + (-0.811084608636)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.188901255571*x[0] + (-0.391847985145)*x[1]
+        ref[(0, 1, 0, 1)]=-0.188901255571*x_ref[0] + (-0.391847985145)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.107343924314*x[0] + (0.967863363529)*x[1]
+        ref[(0, 1, 1, 0)]=-0.107343924314*x_ref[0] + (0.967863363529)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.933307865971*x[0] + (0.346805061821)*x[1]
+        ref[(0, 1, 1, 1)]=0.933307865971*x_ref[0] + (0.346805061821)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.0649381907608*x[0] + (-0.659269921701)*x[1]
+        ref[(0, 1, 2, 0)]=0.0649381907608*x_ref[0] + (-0.659269921701)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.388922859454*x[0] + (0.110630305754)*x[1]
+        ref[(0, 1, 2, 1)]=0.388922859454*x_ref[0] + (0.110630305754)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.423083882624*x[0] + (0.812119414919)*x[1]
+        ref[(1, 0, 0, 0)]=-0.423083882624*x_ref[0] + (0.812119414919)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.550276016407*x[0] + (-0.979043124188)*x[1]
+        ref[(1, 0, 0, 1)]=-0.550276016407*x_ref[0] + (-0.979043124188)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.850848258417*x[0] + (0.994945060996)*x[1]
+        ref[(1, 0, 1, 0)]=-0.850848258417*x_ref[0] + (0.994945060996)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.462326675857*x[0] + (-0.760307220347)*x[1]
+        ref[(1, 0, 1, 1)]=-0.462326675857*x_ref[0] + (-0.760307220347)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.786279718173*x[0] + (0.154455854695)*x[1]
+        ref[(1, 0, 2, 0)]=0.786279718173*x_ref[0] + (0.154455854695)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.0852071335033*x[0] + (0.386602610749)*x[1]
+        ref[(1, 0, 2, 1)]=0.0852071335033*x_ref[0] + (0.386602610749)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.882434367735*x[0] + (-0.482853939027)*x[1]
+        ref[(1, 1, 0, 0)]=0.882434367735*x_ref[0] + (-0.482853939027)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.294346717176*x[0] + (0.15953347635)*x[1]
+        ref[(1, 1, 0, 1)]=-0.294346717176*x_ref[0] + (0.15953347635)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.377728863446*x[0] + (0.122689493751)*x[1]
+        ref[(1, 1, 1, 0)]=0.377728863446*x_ref[0] + (0.122689493751)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.50300465497*x[0] + (-0.381676065149)*x[1]
+        ref[(1, 1, 1, 1)]=-0.50300465497*x_ref[0] + (-0.381676065149)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.0250185778246*x[0] + (-0.470600928461)*x[1]
+        ref[(1, 1, 2, 0)]=-0.0250185778246*x_ref[0] + (-0.470600928461)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.151579783825*x[0] + (-0.230042613686)*x[1]
+        ref[(1, 1, 2, 1)]=0.151579783825*x_ref[0] + (-0.230042613686)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.24207213376*x[2]
+            ref[(0, 0, 0, 0)]+=-0.24207213376*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.199712136772*x[2]
+            ref[(0, 0, 0, 1)]+=0.199712136772*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.956920615657*x[2]
+            ref[(0, 0, 1, 0)]+=0.956920615657*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.119966089259*x[2]
+            ref[(0, 0, 1, 1)]+=0.119966089259*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.184533339789*x[2]
+            ref[(0, 0, 2, 0)]+=-0.184533339789*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.887065610172*x[2]
+            ref[(0, 0, 2, 1)]+=-0.887065610172*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.809630269543*x[2]
+            ref[(0, 1, 0, 0)]+=0.809630269543*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.715079539879*x[2]
+            ref[(0, 1, 0, 1)]+=0.715079539879*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.74472345768*x[2]
+            ref[(0, 1, 1, 0)]+=0.74472345768*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.518120846236*x[2]
+            ref[(0, 1, 1, 1)]+=-0.518120846236*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.930833540445*x[2]
+            ref[(0, 1, 2, 0)]+=-0.930833540445*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.889871839818*x[2]
+            ref[(0, 1, 2, 1)]+=-0.889871839818*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.081390879338*x[2]
+            ref[(1, 0, 0, 0)]+=-0.081390879338*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.765645285128*x[2]
+            ref[(1, 0, 0, 1)]+=-0.765645285128*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.923324486865*x[2]
+            ref[(1, 0, 1, 0)]+=0.923324486865*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.238602390008*x[2]
+            ref[(1, 0, 1, 1)]+=0.238602390008*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.423850709398*x[2]
+            ref[(1, 0, 2, 0)]+=-0.423850709398*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.210810297536*x[2]
+            ref[(1, 0, 2, 1)]+=-0.210810297536*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.459853434178*x[2]
+            ref[(1, 1, 0, 0)]+=-0.459853434178*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.628516009574*x[2]
+            ref[(1, 1, 0, 1)]+=-0.628516009574*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.293142078253*x[2]
+            ref[(1, 1, 1, 0)]+=-0.293142078253*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.42847920549*x[2]
+            ref[(1, 1, 1, 1)]+=0.42847920549*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.343861228113*x[2]
+            ref[(1, 1, 2, 0)]+=0.343861228113*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.0122866762581*x[2]
+            ref[(1, 1, 2, 1)]+=0.0122866762581*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
+        """
+        tests interpolation of rank 0 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.0691967695776*x[0]**o + (-0.552693682725)*x[0] + (-0.814267320339)*x[1]**o + (-0.108759907876)*x[1]
+        ref=-0.0691967695776*x_ref[0]**o + (-0.552693682725)*x_ref[0] + (-0.814267320339)*x_ref[1]**o + (-0.108759907876)*x_ref[1]
+        if dim==3:
+            arg+=(0.867445332266)*x[2]**o + (0.470859342869)*x[2]
+            ref+=(0.867445332266)*x_ref[2]**o + (0.470859342869)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
+        """
+        tests interpolation of rank 1 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.849960425998*x[0]**o + (0.257691362309)*x[0] + (-0.20410368171)*x[1]**o + (0.708697041568)*x[1]
+        ref[(0,)]=-0.849960425998*x_ref[0]**o + (0.257691362309)*x_ref[0] + (-0.20410368171)*x_ref[1]**o + (0.708697041568)*x_ref[1]
+        arg[(1,)]=-0.894041127746*x[0]**o + (-0.332509007373)*x[0] + (0.735797667958)*x[1]**o + (-0.760095361987)*x[1]
+        ref[(1,)]=-0.894041127746*x_ref[0]**o + (-0.332509007373)*x_ref[0] + (0.735797667958)*x_ref[1]**o + (-0.760095361987)*x_ref[1]
+        arg[(2,)]=0.386207342225*x[0]**o + (-0.534656896905)*x[0] + (-0.386857953994)*x[1]**o + (-0.595332720769)*x[1]
+        ref[(2,)]=0.386207342225*x_ref[0]**o + (-0.534656896905)*x_ref[0] + (-0.386857953994)*x_ref[1]**o + (-0.595332720769)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.461315276833*x[2]**o + (0.463288162093)*x[2]
+            ref[(0,)]+=0.461315276833*x_ref[2]**o + (0.463288162093)*x_ref[2]
+            arg[(1,)]+=-0.343078300304*x[2]**o + (-0.76259990046)*x[2]
+            ref[(1,)]+=-0.343078300304*x_ref[2]**o + (-0.76259990046)*x_ref[2]
+            arg[(2,)]+=-0.458882126031*x[2]**o + (-0.328144735635)*x[2]
+            ref[(2,)]+=-0.458882126031*x_ref[2]**o + (-0.328144735635)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
+        """
+        tests interpolation of rank 2 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=-0.388017370246*x[0]**o + (-0.703767376444)*x[0] + (0.122187455052)*x[1]**o + (0.0883950861444)*x[1]
+        ref[(0, 0)]=-0.388017370246*x_ref[0]**o + (-0.703767376444)*x_ref[0] + (0.122187455052)*x_ref[1]**o + (0.0883950861444)*x_ref[1]
+        arg[(0, 1)]=-0.525115436838*x[0]**o + (0.230004089005)*x[0] + (-0.762185980538)*x[1]**o + (-0.877462059826)*x[1]
+        ref[(0, 1)]=-0.525115436838*x_ref[0]**o + (0.230004089005)*x_ref[0] + (-0.762185980538)*x_ref[1]**o + (-0.877462059826)*x_ref[1]
+        arg[(0, 2)]=-0.685477321419*x[0]**o + (-0.12691532659)*x[0] + (-0.999202652867)*x[1]**o + (0.337901741076)*x[1]
+        ref[(0, 2)]=-0.685477321419*x_ref[0]**o + (-0.12691532659)*x_ref[0] + (-0.999202652867)*x_ref[1]**o + (0.337901741076)*x_ref[1]
+        arg[(1, 0)]=-0.681078195641*x[0]**o + (0.897404652923)*x[0] + (0.980826240155)*x[1]**o + (-0.686147763412)*x[1]
+        ref[(1, 0)]=-0.681078195641*x_ref[0]**o + (0.897404652923)*x_ref[0] + (0.980826240155)*x_ref[1]**o + (-0.686147763412)*x_ref[1]
+        arg[(1, 1)]=-0.576218764522*x[0]**o + (0.0535577528757)*x[0] + (-0.371122432381)*x[1]**o + (-0.159684962473)*x[1]
+        ref[(1, 1)]=-0.576218764522*x_ref[0]**o + (0.0535577528757)*x_ref[0] + (-0.371122432381)*x_ref[1]**o + (-0.159684962473)*x_ref[1]
+        arg[(1, 2)]=-0.962973151279*x[0]**o + (0.417705512722)*x[0] + (-0.83454605963)*x[1]**o + (0.700584577516)*x[1]
+        ref[(1, 2)]=-0.962973151279*x_ref[0]**o + (0.417705512722)*x_ref[0] + (-0.83454605963)*x_ref[1]**o + (0.700584577516)*x_ref[1]
+        arg[(2, 0)]=-0.927772047366*x[0]**o + (0.710469708656)*x[0] + (-0.0168398300228)*x[1]**o + (-0.613593363001)*x[1]
+        ref[(2, 0)]=-0.927772047366*x_ref[0]**o + (0.710469708656)*x_ref[0] + (-0.0168398300228)*x_ref[1]**o + (-0.613593363001)*x_ref[1]
+        arg[(2, 1)]=-0.567230982648*x[0]**o + (-0.279066345302)*x[0] + (-0.692824516497)*x[1]**o + (-0.118113731553)*x[1]
+        ref[(2, 1)]=-0.567230982648*x_ref[0]**o + (-0.279066345302)*x_ref[0] + (-0.692824516497)*x_ref[1]**o + (-0.118113731553)*x_ref[1]
+        arg[(2, 2)]=0.549568931053*x[0]**o + (0.0824364123215)*x[0] + (-0.817322940284)*x[1]**o + (-0.329986994701)*x[1]
+        ref[(2, 2)]=0.549568931053*x_ref[0]**o + (0.0824364123215)*x_ref[0] + (-0.817322940284)*x_ref[1]**o + (-0.329986994701)*x_ref[1]
+        arg[(3, 0)]=-0.433729788015*x[0]**o + (-0.65538813621)*x[0] + (0.860037156355)*x[1]**o + (-0.00472460619285)*x[1]
+        ref[(3, 0)]=-0.433729788015*x_ref[0]**o + (-0.65538813621)*x_ref[0] + (0.860037156355)*x_ref[1]**o + (-0.00472460619285)*x_ref[1]
+        arg[(3, 1)]=-0.414291591617*x[0]**o + (-0.728226662441)*x[0] + (-0.0901605667789)*x[1]**o + (0.713681493601)*x[1]
+        ref[(3, 1)]=-0.414291591617*x_ref[0]**o + (-0.728226662441)*x_ref[0] + (-0.0901605667789)*x_ref[1]**o + (0.713681493601)*x_ref[1]
+        arg[(3, 2)]=0.835756384321*x[0]**o + (-0.791567876344)*x[0] + (0.669365367771)*x[1]**o + (0.903555847059)*x[1]
+        ref[(3, 2)]=0.835756384321*x_ref[0]**o + (-0.791567876344)*x_ref[0] + (0.669365367771)*x_ref[1]**o + (0.903555847059)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.108503885873*x[2]**o + (0.176321348879)*x[2]
+            ref[(0, 0)]+=0.108503885873*x_ref[2]**o + (0.176321348879)*x_ref[2]
+            arg[(0, 1)]+=-0.184777457249*x[2]**o + (-0.553233643489)*x[2]
+            ref[(0, 1)]+=-0.184777457249*x_ref[2]**o + (-0.553233643489)*x_ref[2]
+            arg[(0, 2)]+=-0.299552530363*x[2]**o + (-0.251163191066)*x[2]
+            ref[(0, 2)]+=-0.299552530363*x_ref[2]**o + (-0.251163191066)*x_ref[2]
+            arg[(1, 0)]+=0.527545490241*x[2]**o + (0.400996362091)*x[2]
+            ref[(1, 0)]+=0.527545490241*x_ref[2]**o + (0.400996362091)*x_ref[2]
+            arg[(1, 1)]+=-0.348589983901*x[2]**o + (-0.30547309423)*x[2]
+            ref[(1, 1)]+=-0.348589983901*x_ref[2]**o + (-0.30547309423)*x_ref[2]
+            arg[(1, 2)]+=0.241432141871*x[2]**o + (0.444936433426)*x[2]
+            ref[(1, 2)]+=0.241432141871*x_ref[2]**o + (0.444936433426)*x_ref[2]
+            arg[(2, 0)]+=0.507427724162*x[2]**o + (-0.561700400492)*x[2]
+            ref[(2, 0)]+=0.507427724162*x_ref[2]**o + (-0.561700400492)*x_ref[2]
+            arg[(2, 1)]+=-0.26362546301*x[2]**o + (-0.640104476795)*x[2]
+            ref[(2, 1)]+=-0.26362546301*x_ref[2]**o + (-0.640104476795)*x_ref[2]
+            arg[(2, 2)]+=-0.240390974077*x[2]**o + (-0.802566931445)*x[2]
+            ref[(2, 2)]+=-0.240390974077*x_ref[2]**o + (-0.802566931445)*x_ref[2]
+            arg[(3, 0)]+=0.285673448992*x[2]**o + (-0.663325334912)*x[2]
+            ref[(3, 0)]+=0.285673448992*x_ref[2]**o + (-0.663325334912)*x_ref[2]
+            arg[(3, 1)]+=-0.588205505709*x[2]**o + (-0.944795886807)*x[2]
+            ref[(3, 1)]+=-0.588205505709*x_ref[2]**o + (-0.944795886807)*x_ref[2]
+            arg[(3, 2)]+=-0.599014872264*x[2]**o + (-0.297673618943)*x[2]
+            ref[(3, 2)]+=-0.599014872264*x_ref[2]**o + (-0.297673618943)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
+        """
+        tests interpolation of rank 3 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2),w)
+        ref = Data(0,(4, 2, 2),w_ref)
+        arg[(0, 0, 0)]=-0.277827271007*x[0]**o + (-0.114477232865)*x[0] + (-0.137849888851)*x[1]**o + (-0.298447934821)*x[1]
+        ref[(0, 0, 0)]=-0.277827271007*x_ref[0]**o + (-0.114477232865)*x_ref[0] + (-0.137849888851)*x_ref[1]**o + (-0.298447934821)*x_ref[1]
+        arg[(0, 0, 1)]=0.271745882649*x[0]**o + (-0.469809593576)*x[0] + (-0.401929268823)*x[1]**o + (-0.928887029092)*x[1]
+        ref[(0, 0, 1)]=0.271745882649*x_ref[0]**o + (-0.469809593576)*x_ref[0] + (-0.401929268823)*x_ref[1]**o + (-0.928887029092)*x_ref[1]
+        arg[(0, 1, 0)]=-0.764761043524*x[0]**o + (0.653694029706)*x[0] + (-0.962169259758)*x[1]**o + (-0.982690831501)*x[1]
+        ref[(0, 1, 0)]=-0.764761043524*x_ref[0]**o + (0.653694029706)*x_ref[0] + (-0.962169259758)*x_ref[1]**o + (-0.982690831501)*x_ref[1]
+        arg[(0, 1, 1)]=-0.833833941966*x[0]**o + (0.967308439705)*x[0] + (0.234676128825)*x[1]**o + (-0.473060525165)*x[1]
+        ref[(0, 1, 1)]=-0.833833941966*x_ref[0]**o + (0.967308439705)*x_ref[0] + (0.234676128825)*x_ref[1]**o + (-0.473060525165)*x_ref[1]
+        arg[(1, 0, 0)]=-0.421015040316*x[0]**o + (-0.868202334478)*x[0] + (-0.627664048025)*x[1]**o + (0.607437560016)*x[1]
+        ref[(1, 0, 0)]=-0.421015040316*x_ref[0]**o + (-0.868202334478)*x_ref[0] + (-0.627664048025)*x_ref[1]**o + (0.607437560016)*x_ref[1]
+        arg[(1, 0, 1)]=-0.431510570655*x[0]**o + (-0.559166463)*x[0] + (-0.773669213795)*x[1]**o + (0.959826522525)*x[1]
+        ref[(1, 0, 1)]=-0.431510570655*x_ref[0]**o + (-0.559166463)*x_ref[0] + (-0.773669213795)*x_ref[1]**o + (0.959826522525)*x_ref[1]
+        arg[(1, 1, 0)]=0.147746868372*x[0]**o + (0.0680006001303)*x[0] + (-0.299172530223)*x[1]**o + (0.956888434638)*x[1]
+        ref[(1, 1, 0)]=0.147746868372*x_ref[0]**o + (0.0680006001303)*x_ref[0] + (-0.299172530223)*x_ref[1]**o + (0.956888434638)*x_ref[1]
+        arg[(1, 1, 1)]=0.00377620496764*x[0]**o + (-0.800465607214)*x[0] + (-0.813221729961)*x[1]**o + (-0.82237290234)*x[1]
+        ref[(1, 1, 1)]=0.00377620496764*x_ref[0]**o + (-0.800465607214)*x_ref[0] + (-0.813221729961)*x_ref[1]**o + (-0.82237290234)*x_ref[1]
+        arg[(2, 0, 0)]=0.265500051986*x[0]**o + (-0.122173695213)*x[0] + (-0.687067791362)*x[1]**o + (0.654082384875)*x[1]
+        ref[(2, 0, 0)]=0.265500051986*x_ref[0]**o + (-0.122173695213)*x_ref[0] + (-0.687067791362)*x_ref[1]**o + (0.654082384875)*x_ref[1]
+        arg[(2, 0, 1)]=-0.303343670126*x[0]**o + (0.485404002293)*x[0] + (0.600540172829)*x[1]**o + (0.218687786782)*x[1]
+        ref[(2, 0, 1)]=-0.303343670126*x_ref[0]**o + (0.485404002293)*x_ref[0] + (0.600540172829)*x_ref[1]**o + (0.218687786782)*x_ref[1]
+        arg[(2, 1, 0)]=0.0543925066262*x[0]**o + (-0.0170817108247)*x[0] + (0.152996777569)*x[1]**o + (-0.030510314549)*x[1]
+        ref[(2, 1, 0)]=0.0543925066262*x_ref[0]**o + (-0.0170817108247)*x_ref[0] + (0.152996777569)*x_ref[1]**o + (-0.030510314549)*x_ref[1]
+        arg[(2, 1, 1)]=0.741148223779*x[0]**o + (0.0931005576235)*x[0] + (-0.0486788729612)*x[1]**o + (0.628037548153)*x[1]
+        ref[(2, 1, 1)]=0.741148223779*x_ref[0]**o + (0.0931005576235)*x_ref[0] + (-0.0486788729612)*x_ref[1]**o + (0.628037548153)*x_ref[1]
+        arg[(3, 0, 0)]=0.852005853856*x[0]**o + (-0.899240087514)*x[0] + (0.224820685441)*x[1]**o + (-0.971277488165)*x[1]
+        ref[(3, 0, 0)]=0.852005853856*x_ref[0]**o + (-0.899240087514)*x_ref[0] + (0.224820685441)*x_ref[1]**o + (-0.971277488165)*x_ref[1]
+        arg[(3, 0, 1)]=0.324317321503*x[0]**o + (-0.437357761061)*x[0] + (-0.059717069986)*x[1]**o + (-0.0130199543283)*x[1]
+        ref[(3, 0, 1)]=0.324317321503*x_ref[0]**o + (-0.437357761061)*x_ref[0] + (-0.059717069986)*x_ref[1]**o + (-0.0130199543283)*x_ref[1]
+        arg[(3, 1, 0)]=-0.7566120179*x[0]**o + (0.885016311283)*x[0] + (-0.171820821827)*x[1]**o + (-0.994965265301)*x[1]
+        ref[(3, 1, 0)]=-0.7566120179*x_ref[0]**o + (0.885016311283)*x_ref[0] + (-0.171820821827)*x_ref[1]**o + (-0.994965265301)*x_ref[1]
+        arg[(3, 1, 1)]=-0.810787041002*x[0]**o + (0.107504615445)*x[0] + (-0.903270131514)*x[1]**o + (0.07775431363)*x[1]
+        ref[(3, 1, 1)]=-0.810787041002*x_ref[0]**o + (0.107504615445)*x_ref[0] + (-0.903270131514)*x_ref[1]**o + (0.07775431363)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.541956348811*x[2]**o + (-0.72364161728)*x[2]
+            ref[(0, 0, 0)]+=-0.541956348811*x_ref[2]**o + (-0.72364161728)*x_ref[2]
+            arg[(0, 0, 1)]+=0.339669413395*x[2]**o + (-0.679991079724)*x[2]
+            ref[(0, 0, 1)]+=0.339669413395*x_ref[2]**o + (-0.679991079724)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.790195079635*x[2]**o + (0.0872427201941)*x[2]
+            ref[(0, 1, 0)]+=-0.790195079635*x_ref[2]**o + (0.0872427201941)*x_ref[2]
+            arg[(0, 1, 1)]+=0.570161605687*x[2]**o + (0.733307619293)*x[2]
+            ref[(0, 1, 1)]+=0.570161605687*x_ref[2]**o + (0.733307619293)*x_ref[2]
+            arg[(1, 0, 0)]+=0.000212058486412*x[2]**o + (-0.997087052106)*x[2]
+            ref[(1, 0, 0)]+=0.000212058486412*x_ref[2]**o + (-0.997087052106)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.0999773765015*x[2]**o + (0.0899742892357)*x[2]
+            ref[(1, 0, 1)]+=-0.0999773765015*x_ref[2]**o + (0.0899742892357)*x_ref[2]
+            arg[(1, 1, 0)]+=0.517957224893*x[2]**o + (-0.313264520679)*x[2]
+            ref[(1, 1, 0)]+=0.517957224893*x_ref[2]**o + (-0.313264520679)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.508976849546*x[2]**o + (-0.529321894148)*x[2]
+            ref[(1, 1, 1)]+=-0.508976849546*x_ref[2]**o + (-0.529321894148)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.977131155595*x[2]**o + (-0.502285351199)*x[2]
+            ref[(2, 0, 0)]+=-0.977131155595*x_ref[2]**o + (-0.502285351199)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.125598431739*x[2]**o + (0.932537838263)*x[2]
+            ref[(2, 0, 1)]+=-0.125598431739*x_ref[2]**o + (0.932537838263)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.367909710755*x[2]**o + (0.606105236074)*x[2]
+            ref[(2, 1, 0)]+=-0.367909710755*x_ref[2]**o + (0.606105236074)*x_ref[2]
+            arg[(2, 1, 1)]+=0.791004379305*x[2]**o + (-0.220981427735)*x[2]
+            ref[(2, 1, 1)]+=0.791004379305*x_ref[2]**o + (-0.220981427735)*x_ref[2]
+            arg[(3, 0, 0)]+=-0.565216386458*x[2]**o + (-0.228868240609)*x[2]
+            ref[(3, 0, 0)]+=-0.565216386458*x_ref[2]**o + (-0.228868240609)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.287212221135*x[2]**o + (0.0819553458192)*x[2]
+            ref[(3, 0, 1)]+=-0.287212221135*x_ref[2]**o + (0.0819553458192)*x_ref[2]
+            arg[(3, 1, 0)]+=0.915883727644*x[2]**o + (0.157345302088)*x[2]
+            ref[(3, 1, 0)]+=0.915883727644*x_ref[2]**o + (0.157345302088)*x_ref[2]
+            arg[(3, 1, 1)]+=0.446014566283*x[2]**o + (-0.507444992496)*x[2]
+            ref[(3, 1, 1)]+=0.446014566283*x_ref[2]**o + (-0.507444992496)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
+        """
+        tests interpolation of rank 4 Data on FunctionOnBoundary
+
+        assumptions: FunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = FunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = FunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 4, 4),w)
+        ref = Data(0,(3, 2, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.137976741464*x[0]**o + (0.25927269801)*x[0] + (0.40952575027)*x[1]**o + (0.341215245224)*x[1]
+        ref[(0, 0, 0, 0)]=-0.137976741464*x_ref[0]**o + (0.25927269801)*x_ref[0] + (0.40952575027)*x_ref[1]**o + (0.341215245224)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.901254508971*x[0]**o + (0.785744394356)*x[0] + (0.841565272109)*x[1]**o + (0.338264906106)*x[1]
+        ref[(0, 0, 0, 1)]=-0.901254508971*x_ref[0]**o + (0.785744394356)*x_ref[0] + (0.841565272109)*x_ref[1]**o + (0.338264906106)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.230623872299*x[0]**o + (-0.807138956524)*x[0] + (0.43357415858)*x[1]**o + (-0.761951188555)*x[1]
+        ref[(0, 0, 0, 2)]=0.230623872299*x_ref[0]**o + (-0.807138956524)*x_ref[0] + (0.43357415858)*x_ref[1]**o + (-0.761951188555)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.541441318568*x[0]**o + (-0.204359235558)*x[0] + (-0.718090331671)*x[1]**o + (0.663729791538)*x[1]
+        ref[(0, 0, 0, 3)]=0.541441318568*x_ref[0]**o + (-0.204359235558)*x_ref[0] + (-0.718090331671)*x_ref[1]**o + (0.663729791538)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.548024939525*x[0]**o + (0.246007624382)*x[0] + (0.171738918088)*x[1]**o + (0.542319432807)*x[1]
+        ref[(0, 0, 1, 0)]=-0.548024939525*x_ref[0]**o + (0.246007624382)*x_ref[0] + (0.171738918088)*x_ref[1]**o + (0.542319432807)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.130847052714*x[0]**o + (-0.81867192676)*x[0] + (0.978643419787)*x[1]**o + (0.489284887405)*x[1]
+        ref[(0, 0, 1, 1)]=-0.130847052714*x_ref[0]**o + (-0.81867192676)*x_ref[0] + (0.978643419787)*x_ref[1]**o + (0.489284887405)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.112665459408*x[0]**o + (-0.897145438366)*x[0] + (-0.635626869195)*x[1]**o + (0.688966146293)*x[1]
+        ref[(0, 0, 1, 2)]=-0.112665459408*x_ref[0]**o + (-0.897145438366)*x_ref[0] + (-0.635626869195)*x_ref[1]**o + (0.688966146293)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.86594481574*x[0]**o + (-0.289332055142)*x[0] + (-0.544116540799)*x[1]**o + (0.445755796395)*x[1]
+        ref[(0, 0, 1, 3)]=-0.86594481574*x_ref[0]**o + (-0.289332055142)*x_ref[0] + (-0.544116540799)*x_ref[1]**o + (0.445755796395)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.949973151269*x[0]**o + (0.729150379164)*x[0] + (0.228820332873)*x[1]**o + (0.0433648396238)*x[1]
+        ref[(0, 0, 2, 0)]=-0.949973151269*x_ref[0]**o + (0.729150379164)*x_ref[0] + (0.228820332873)*x_ref[1]**o + (0.0433648396238)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.505579874287*x[0]**o + (-0.383693528023)*x[0] + (-0.449290127455)*x[1]**o + (-0.397914548385)*x[1]
+        ref[(0, 0, 2, 1)]=0.505579874287*x_ref[0]**o + (-0.383693528023)*x_ref[0] + (-0.449290127455)*x_ref[1]**o + (-0.397914548385)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.214909591814*x[0]**o + (0.611528305011)*x[0] + (0.120628066505)*x[1]**o + (0.630464481074)*x[1]
+        ref[(0, 0, 2, 2)]=-0.214909591814*x_ref[0]**o + (0.611528305011)*x_ref[0] + (0.120628066505)*x_ref[1]**o + (0.630464481074)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.173768718234*x[0]**o + (0.724908002978)*x[0] + (-0.726722310653)*x[1]**o + (-0.92583258363)*x[1]
+        ref[(0, 0, 2, 3)]=-0.173768718234*x_ref[0]**o + (0.724908002978)*x_ref[0] + (-0.726722310653)*x_ref[1]**o + (-0.92583258363)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.0606195809128*x[0]**o + (0.849301410919)*x[0] + (-0.92879537016)*x[1]**o + (-0.525375858331)*x[1]
+        ref[(0, 0, 3, 0)]=0.0606195809128*x_ref[0]**o + (0.849301410919)*x_ref[0] + (-0.92879537016)*x_ref[1]**o + (-0.525375858331)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.45810666517*x[0]**o + (-0.550581289429)*x[0] + (-0.743065045338)*x[1]**o + (0.48669048009)*x[1]
+        ref[(0, 0, 3, 1)]=0.45810666517*x_ref[0]**o + (-0.550581289429)*x_ref[0] + (-0.743065045338)*x_ref[1]**o + (0.48669048009)*x_ref[1]
+        arg[(0, 0, 3, 2)]=0.386748387887*x[0]**o + (-0.224236483081)*x[0] + (0.110260823191)*x[1]**o + (-0.902359607416)*x[1]
+        ref[(0, 0, 3, 2)]=0.386748387887*x_ref[0]**o + (-0.224236483081)*x_ref[0] + (0.110260823191)*x_ref[1]**o + (-0.902359607416)*x_ref[1]
+        arg[(0, 0, 3, 3)]=-0.339240300848*x[0]**o + (0.392227205611)*x[0] + (-0.723690392744)*x[1]**o + (0.563678609339)*x[1]
+        ref[(0, 0, 3, 3)]=-0.339240300848*x_ref[0]**o + (0.392227205611)*x_ref[0] + (-0.723690392744)*x_ref[1]**o + (0.563678609339)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.155178660857*x[0]**o + (-0.564474323132)*x[0] + (0.36982633303)*x[1]**o + (-0.379029155641)*x[1]
+        ref[(0, 1, 0, 0)]=-0.155178660857*x_ref[0]**o + (-0.564474323132)*x_ref[0] + (0.36982633303)*x_ref[1]**o + (-0.379029155641)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.644761568727*x[0]**o + (0.231512012492)*x[0] + (-0.941405287292)*x[1]**o + (-0.2676475866)*x[1]
+        ref[(0, 1, 0, 1)]=0.644761568727*x_ref[0]**o + (0.231512012492)*x_ref[0] + (-0.941405287292)*x_ref[1]**o + (-0.2676475866)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.478639251072*x[0]**o + (-0.0124487306108)*x[0] + (0.470110125359)*x[1]**o + (-0.353178372566)*x[1]
+        ref[(0, 1, 0, 2)]=-0.478639251072*x_ref[0]**o + (-0.0124487306108)*x_ref[0] + (0.470110125359)*x_ref[1]**o + (-0.353178372566)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.204882785388*x[0]**o + (0.625329175743)*x[0] + (0.220812019853)*x[1]**o + (0.635194169189)*x[1]
+        ref[(0, 1, 0, 3)]=0.204882785388*x_ref[0]**o + (0.625329175743)*x_ref[0] + (0.220812019853)*x_ref[1]**o + (0.635194169189)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.645286649491*x[0]**o + (0.109359171835)*x[0] + (0.966777614612)*x[1]**o + (0.618108736851)*x[1]
+        ref[(0, 1, 1, 0)]=0.645286649491*x_ref[0]**o + (0.109359171835)*x_ref[0] + (0.966777614612)*x_ref[1]**o + (0.618108736851)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.975682014778*x[0]**o + (-0.853954292567)*x[0] + (0.553780201095)*x[1]**o + (-0.833913006752)*x[1]
+        ref[(0, 1, 1, 1)]=-0.975682014778*x_ref[0]**o + (-0.853954292567)*x_ref[0] + (0.553780201095)*x_ref[1]**o + (-0.833913006752)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.425830311033*x[0]**o + (0.500321176719)*x[0] + (0.951643311567)*x[1]**o + (-0.518918279154)*x[1]
+        ref[(0, 1, 1, 2)]=-0.425830311033*x_ref[0]**o + (0.500321176719)*x_ref[0] + (0.951643311567)*x_ref[1]**o + (-0.518918279154)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.87688399178*x[0]**o + (-0.676845066494)*x[0] + (0.321233418876)*x[1]**o + (-0.182729809325)*x[1]
+        ref[(0, 1, 1, 3)]=0.87688399178*x_ref[0]**o + (-0.676845066494)*x_ref[0] + (0.321233418876)*x_ref[1]**o + (-0.182729809325)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.373801823537*x[0]**o + (0.737035103071)*x[0] + (0.890244107318)*x[1]**o + (0.691876284239)*x[1]
+        ref[(0, 1, 2, 0)]=0.373801823537*x_ref[0]**o + (0.737035103071)*x_ref[0] + (0.890244107318)*x_ref[1]**o + (0.691876284239)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.812494321334*x[0]**o + (-0.261928772058)*x[0] + (-0.198755061142)*x[1]**o + (-0.624191899465)*x[1]
+        ref[(0, 1, 2, 1)]=0.812494321334*x_ref[0]**o + (-0.261928772058)*x_ref[0] + (-0.198755061142)*x_ref[1]**o + (-0.624191899465)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.371243072357*x[0]**o + (0.649326076372)*x[0] + (0.248718824344)*x[1]**o + (-0.516916444761)*x[1]
+        ref[(0, 1, 2, 2)]=-0.371243072357*x_ref[0]**o + (0.649326076372)*x_ref[0] + (0.248718824344)*x_ref[1]**o + (-0.516916444761)*x_ref[1]
+        arg[(0, 1, 2, 3)]=0.256761483586*x[0]**o + (0.147316940923)*x[0] + (-0.508474945126)*x[1]**o + (-0.678906567399)*x[1]
+        ref[(0, 1, 2, 3)]=0.256761483586*x_ref[0]**o + (0.147316940923)*x_ref[0] + (-0.508474945126)*x_ref[1]**o + (-0.678906567399)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.517223267541*x[0]**o + (-0.93174648414)*x[0] + (-0.637793485898)*x[1]**o + (0.442303344997)*x[1]
+        ref[(0, 1, 3, 0)]=0.517223267541*x_ref[0]**o + (-0.93174648414)*x_ref[0] + (-0.637793485898)*x_ref[1]**o + (0.442303344997)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.791793253528*x[0]**o + (0.521427546071)*x[0] + (0.432534889267)*x[1]**o + (0.863615750001)*x[1]
+        ref[(0, 1, 3, 1)]=-0.791793253528*x_ref[0]**o + (0.521427546071)*x_ref[0] + (0.432534889267)*x_ref[1]**o + (0.863615750001)*x_ref[1]
+        arg[(0, 1, 3, 2)]=-0.261211873273*x[0]**o + (0.352099045056)*x[0] + (-0.269247635666)*x[1]**o + (-0.873926300108)*x[1]
+        ref[(0, 1, 3, 2)]=-0.261211873273*x_ref[0]**o + (0.352099045056)*x_ref[0] + (-0.269247635666)*x_ref[1]**o + (-0.873926300108)*x_ref[1]
+        arg[(0, 1, 3, 3)]=-0.886851092751*x[0]**o + (0.73606731279)*x[0] + (0.412726253768)*x[1]**o + (0.839360823597)*x[1]
+        ref[(0, 1, 3, 3)]=-0.886851092751*x_ref[0]**o + (0.73606731279)*x_ref[0] + (0.412726253768)*x_ref[1]**o + (0.839360823597)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.61870379207*x[0]**o + (0.715295772954)*x[0] + (-0.0882251372342)*x[1]**o + (0.285801649426)*x[1]
+        ref[(1, 0, 0, 0)]=-0.61870379207*x_ref[0]**o + (0.715295772954)*x_ref[0] + (-0.0882251372342)*x_ref[1]**o + (0.285801649426)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.831293519618*x[0]**o + (-0.4468035901)*x[0] + (-0.788023532049)*x[1]**o + (0.37164699684)*x[1]
+        ref[(1, 0, 0, 1)]=-0.831293519618*x_ref[0]**o + (-0.4468035901)*x_ref[0] + (-0.788023532049)*x_ref[1]**o + (0.37164699684)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.742995395145*x[0]**o + (-0.56638650731)*x[0] + (0.16507023899)*x[1]**o + (-0.00493825384341)*x[1]
+        ref[(1, 0, 0, 2)]=0.742995395145*x_ref[0]**o + (-0.56638650731)*x_ref[0] + (0.16507023899)*x_ref[1]**o + (-0.00493825384341)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.362702846986*x[0]**o + (-0.0174277837075)*x[0] + (-0.826305472642)*x[1]**o + (-0.186752605828)*x[1]
+        ref[(1, 0, 0, 3)]=-0.362702846986*x_ref[0]**o + (-0.0174277837075)*x_ref[0] + (-0.826305472642)*x_ref[1]**o + (-0.186752605828)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.0812626552247*x[0]**o + (-0.922125120548)*x[0] + (-0.380063201942)*x[1]**o + (0.555055942577)*x[1]
+        ref[(1, 0, 1, 0)]=-0.0812626552247*x_ref[0]**o + (-0.922125120548)*x_ref[0] + (-0.380063201942)*x_ref[1]**o + (0.555055942577)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.338219466052*x[0]**o + (0.31888371708)*x[0] + (0.263573888485)*x[1]**o + (0.984097083547)*x[1]
+        ref[(1, 0, 1, 1)]=0.338219466052*x_ref[0]**o + (0.31888371708)*x_ref[0] + (0.263573888485)*x_ref[1]**o + (0.984097083547)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.391755000701*x[0]**o + (-0.152752823434)*x[0] + (0.648306740649)*x[1]**o + (-0.431410818224)*x[1]
+        ref[(1, 0, 1, 2)]=-0.391755000701*x_ref[0]**o + (-0.152752823434)*x_ref[0] + (0.648306740649)*x_ref[1]**o + (-0.431410818224)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.429596917036*x[0]**o + (-0.996329090494)*x[0] + (-0.250898994556)*x[1]**o + (0.558153684329)*x[1]
+        ref[(1, 0, 1, 3)]=0.429596917036*x_ref[0]**o + (-0.996329090494)*x_ref[0] + (-0.250898994556)*x_ref[1]**o + (0.558153684329)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.205100615963*x[0]**o + (0.369421454866)*x[0] + (-0.264980726783)*x[1]**o + (0.948905111944)*x[1]
+        ref[(1, 0, 2, 0)]=-0.205100615963*x_ref[0]**o + (0.369421454866)*x_ref[0] + (-0.264980726783)*x_ref[1]**o + (0.948905111944)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.020310430167*x[0]**o + (0.492246849623)*x[0] + (-0.562722076806)*x[1]**o + (-0.0789895508665)*x[1]
+        ref[(1, 0, 2, 1)]=0.020310430167*x_ref[0]**o + (0.492246849623)*x_ref[0] + (-0.562722076806)*x_ref[1]**o + (-0.0789895508665)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.264454715917*x[0]**o + (0.922549237866)*x[0] + (0.510811516766)*x[1]**o + (0.107740101188)*x[1]
+        ref[(1, 0, 2, 2)]=0.264454715917*x_ref[0]**o + (0.922549237866)*x_ref[0] + (0.510811516766)*x_ref[1]**o + (0.107740101188)*x_ref[1]
+        arg[(1, 0, 2, 3)]=0.15837319798*x[0]**o + (0.0405324762228)*x[0] + (-0.113166103399)*x[1]**o + (0.197538772531)*x[1]
+        ref[(1, 0, 2, 3)]=0.15837319798*x_ref[0]**o + (0.0405324762228)*x_ref[0] + (-0.113166103399)*x_ref[1]**o + (0.197538772531)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.368496953879*x[0]**o + (0.897197214995)*x[0] + (-0.580783288389)*x[1]**o + (-0.738176190516)*x[1]
+        ref[(1, 0, 3, 0)]=-0.368496953879*x_ref[0]**o + (0.897197214995)*x_ref[0] + (-0.580783288389)*x_ref[1]**o + (-0.738176190516)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.0334875712322*x[0]**o + (-0.222328070186)*x[0] + (-0.236984182838)*x[1]**o + (0.0507196692741)*x[1]
+        ref[(1, 0, 3, 1)]=0.0334875712322*x_ref[0]**o + (-0.222328070186)*x_ref[0] + (-0.236984182838)*x_ref[1]**o + (0.0507196692741)*x_ref[1]
+        arg[(1, 0, 3, 2)]=0.549817939764*x[0]**o + (-0.460861171343)*x[0] + (0.21618660746)*x[1]**o + (-0.427227036988)*x[1]
+        ref[(1, 0, 3, 2)]=0.549817939764*x_ref[0]**o + (-0.460861171343)*x_ref[0] + (0.21618660746)*x_ref[1]**o + (-0.427227036988)*x_ref[1]
+        arg[(1, 0, 3, 3)]=0.82039281707*x[0]**o + (0.842908187892)*x[0] + (0.750125111303)*x[1]**o + (-0.0200584009649)*x[1]
+        ref[(1, 0, 3, 3)]=0.82039281707*x_ref[0]**o + (0.842908187892)*x_ref[0] + (0.750125111303)*x_ref[1]**o + (-0.0200584009649)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.860047992213*x[0]**o + (0.272676236899)*x[0] + (-0.956614439796)*x[1]**o + (0.198175699928)*x[1]
+        ref[(1, 1, 0, 0)]=-0.860047992213*x_ref[0]**o + (0.272676236899)*x_ref[0] + (-0.956614439796)*x_ref[1]**o + (0.198175699928)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.666089960975*x[0]**o + (0.0735232848313)*x[0] + (-0.0177896352817)*x[1]**o + (-0.169525524032)*x[1]
+        ref[(1, 1, 0, 1)]=-0.666089960975*x_ref[0]**o + (0.0735232848313)*x_ref[0] + (-0.0177896352817)*x_ref[1]**o + (-0.169525524032)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.0325228676761*x[0]**o + (0.134384396438)*x[0] + (-0.484130705777)*x[1]**o + (0.222974616966)*x[1]
+        ref[(1, 1, 0, 2)]=0.0325228676761*x_ref[0]**o + (0.134384396438)*x_ref[0] + (-0.484130705777)*x_ref[1]**o + (0.222974616966)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.446872403597*x[0]**o + (0.588313558727)*x[0] + (0.519268308145)*x[1]**o + (0.253502578978)*x[1]
+        ref[(1, 1, 0, 3)]=-0.446872403597*x_ref[0]**o + (0.588313558727)*x_ref[0] + (0.519268308145)*x_ref[1]**o + (0.253502578978)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.584772162372*x[0]**o + (-0.497864246165)*x[0] + (0.894745708319)*x[1]**o + (0.829267119857)*x[1]
+        ref[(1, 1, 1, 0)]=0.584772162372*x_ref[0]**o + (-0.497864246165)*x_ref[0] + (0.894745708319)*x_ref[1]**o + (0.829267119857)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.982678730276*x[0]**o + (0.813235591855)*x[0] + (-0.503707034275)*x[1]**o + (0.251270915383)*x[1]
+        ref[(1, 1, 1, 1)]=0.982678730276*x_ref[0]**o + (0.813235591855)*x_ref[0] + (-0.503707034275)*x_ref[1]**o + (0.251270915383)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.447259111543*x[0]**o + (-0.672550406949)*x[0] + (-0.314623459569)*x[1]**o + (-0.423887645523)*x[1]
+        ref[(1, 1, 1, 2)]=-0.447259111543*x_ref[0]**o + (-0.672550406949)*x_ref[0] + (-0.314623459569)*x_ref[1]**o + (-0.423887645523)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.822981922577*x[0]**o + (0.791298900543)*x[0] + (-0.328722861473)*x[1]**o + (-0.206983639708)*x[1]
+        ref[(1, 1, 1, 3)]=-0.822981922577*x_ref[0]**o + (0.791298900543)*x_ref[0] + (-0.328722861473)*x_ref[1]**o + (-0.206983639708)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.345457346494*x[0]**o + (0.404232817207)*x[0] + (-0.453721901551)*x[1]**o + (0.506926731411)*x[1]
+        ref[(1, 1, 2, 0)]=0.345457346494*x_ref[0]**o + (0.404232817207)*x_ref[0] + (-0.453721901551)*x_ref[1]**o + (0.506926731411)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.080526604462*x[0]**o + (0.407844447176)*x[0] + (-0.736226147359)*x[1]**o + (-0.849686908575)*x[1]
+        ref[(1, 1, 2, 1)]=0.080526604462*x_ref[0]**o + (0.407844447176)*x_ref[0] + (-0.736226147359)*x_ref[1]**o + (-0.849686908575)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.903490183523*x[0]**o + (0.566141199465)*x[0] + (0.739018657413)*x[1]**o + (-0.131732215905)*x[1]
+        ref[(1, 1, 2, 2)]=-0.903490183523*x_ref[0]**o + (0.566141199465)*x_ref[0] + (0.739018657413)*x_ref[1]**o + (-0.131732215905)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.418632862977*x[0]**o + (-0.350292582418)*x[0] + (0.763418004198)*x[1]**o + (0.479201719238)*x[1]
+        ref[(1, 1, 2, 3)]=-0.418632862977*x_ref[0]**o + (-0.350292582418)*x_ref[0] + (0.763418004198)*x_ref[1]**o + (0.479201719238)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.560770224578*x[0]**o + (0.513332262134)*x[0] + (-0.71276114123)*x[1]**o + (-0.0762601172864)*x[1]
+        ref[(1, 1, 3, 0)]=0.560770224578*x_ref[0]**o + (0.513332262134)*x_ref[0] + (-0.71276114123)*x_ref[1]**o + (-0.0762601172864)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.487731480442*x[0]**o + (0.937969342265)*x[0] + (0.540851537717)*x[1]**o + (0.645218008736)*x[1]
+        ref[(1, 1, 3, 1)]=0.487731480442*x_ref[0]**o + (0.937969342265)*x_ref[0] + (0.540851537717)*x_ref[1]**o + (0.645218008736)*x_ref[1]
+        arg[(1, 1, 3, 2)]=-0.594444967677*x[0]**o + (0.00759237275733)*x[0] + (0.597998978756)*x[1]**o + (0.935590792168)*x[1]
+        ref[(1, 1, 3, 2)]=-0.594444967677*x_ref[0]**o + (0.00759237275733)*x_ref[0] + (0.597998978756)*x_ref[1]**o + (0.935590792168)*x_ref[1]
+        arg[(1, 1, 3, 3)]=0.622946110739*x[0]**o + (-0.261615755645)*x[0] + (-0.927513327937)*x[1]**o + (-0.871575585872)*x[1]
+        ref[(1, 1, 3, 3)]=0.622946110739*x_ref[0]**o + (-0.261615755645)*x_ref[0] + (-0.927513327937)*x_ref[1]**o + (-0.871575585872)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.2323740068*x[0]**o + (0.731501787424)*x[0] + (0.246846819036)*x[1]**o + (0.36515030238)*x[1]
+        ref[(2, 0, 0, 0)]=-0.2323740068*x_ref[0]**o + (0.731501787424)*x_ref[0] + (0.246846819036)*x_ref[1]**o + (0.36515030238)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.546007683004*x[0]**o + (-0.613223963448)*x[0] + (0.305774334635)*x[1]**o + (-0.189390914482)*x[1]
+        ref[(2, 0, 0, 1)]=-0.546007683004*x_ref[0]**o + (-0.613223963448)*x_ref[0] + (0.305774334635)*x_ref[1]**o + (-0.189390914482)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.926575903448*x[0]**o + (-0.767387605586)*x[0] + (0.979797132829)*x[1]**o + (0.610947910673)*x[1]
+        ref[(2, 0, 0, 2)]=0.926575903448*x_ref[0]**o + (-0.767387605586)*x_ref[0] + (0.979797132829)*x_ref[1]**o + (0.610947910673)*x_ref[1]
+        arg[(2, 0, 0, 3)]=0.266278640004*x[0]**o + (-0.115460480622)*x[0] + (0.15200206501)*x[1]**o + (0.289926863332)*x[1]
+        ref[(2, 0, 0, 3)]=0.266278640004*x_ref[0]**o + (-0.115460480622)*x_ref[0] + (0.15200206501)*x_ref[1]**o + (0.289926863332)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.677652426218*x[0]**o + (0.0677137560033)*x[0] + (0.848295828184)*x[1]**o + (0.540543817569)*x[1]
+        ref[(2, 0, 1, 0)]=0.677652426218*x_ref[0]**o + (0.0677137560033)*x_ref[0] + (0.848295828184)*x_ref[1]**o + (0.540543817569)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.61297911309*x[0]**o + (0.980867196466)*x[0] + (0.761275361084)*x[1]**o + (0.40679935397)*x[1]
+        ref[(2, 0, 1, 1)]=-0.61297911309*x_ref[0]**o + (0.980867196466)*x_ref[0] + (0.761275361084)*x_ref[1]**o + (0.40679935397)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.648362633972*x[0]**o + (0.199616844062)*x[0] + (0.140481033387)*x[1]**o + (0.763292185409)*x[1]
+        ref[(2, 0, 1, 2)]=-0.648362633972*x_ref[0]**o + (0.199616844062)*x_ref[0] + (0.140481033387)*x_ref[1]**o + (0.763292185409)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.821912207466*x[0]**o + (0.239758797571)*x[0] + (0.929974736792)*x[1]**o + (0.674276530529)*x[1]
+        ref[(2, 0, 1, 3)]=-0.821912207466*x_ref[0]**o + (0.239758797571)*x_ref[0] + (0.929974736792)*x_ref[1]**o + (0.674276530529)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.194455639888*x[0]**o + (-0.252822742865)*x[0] + (0.144402906721)*x[1]**o + (0.662020048245)*x[1]
+        ref[(2, 0, 2, 0)]=0.194455639888*x_ref[0]**o + (-0.252822742865)*x_ref[0] + (0.144402906721)*x_ref[1]**o + (0.662020048245)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.611602888999*x[0]**o + (0.168185115061)*x[0] + (-0.152211132424)*x[1]**o + (0.0886512660775)*x[1]
+        ref[(2, 0, 2, 1)]=-0.611602888999*x_ref[0]**o + (0.168185115061)*x_ref[0] + (-0.152211132424)*x_ref[1]**o + (0.0886512660775)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.648173310583*x[0]**o + (-0.337898815828)*x[0] + (-0.866733489843)*x[1]**o + (0.844836690268)*x[1]
+        ref[(2, 0, 2, 2)]=0.648173310583*x_ref[0]**o + (-0.337898815828)*x_ref[0] + (-0.866733489843)*x_ref[1]**o + (0.844836690268)*x_ref[1]
+        arg[(2, 0, 2, 3)]=-0.507380246305*x[0]**o + (0.770793459995)*x[0] + (-0.399675045727)*x[1]**o + (0.904588427474)*x[1]
+        ref[(2, 0, 2, 3)]=-0.507380246305*x_ref[0]**o + (0.770793459995)*x_ref[0] + (-0.399675045727)*x_ref[1]**o + (0.904588427474)*x_ref[1]
+        arg[(2, 0, 3, 0)]=-0.735395390086*x[0]**o + (-0.603259789088)*x[0] + (-0.268144512438)*x[1]**o + (-0.178359427098)*x[1]
+        ref[(2, 0, 3, 0)]=-0.735395390086*x_ref[0]**o + (-0.603259789088)*x_ref[0] + (-0.268144512438)*x_ref[1]**o + (-0.178359427098)*x_ref[1]
+        arg[(2, 0, 3, 1)]=-0.984938616631*x[0]**o + (-0.359608169597)*x[0] + (-0.366145726123)*x[1]**o + (-0.726534186394)*x[1]
+        ref[(2, 0, 3, 1)]=-0.984938616631*x_ref[0]**o + (-0.359608169597)*x_ref[0] + (-0.366145726123)*x_ref[1]**o + (-0.726534186394)*x_ref[1]
+        arg[(2, 0, 3, 2)]=0.548492036287*x[0]**o + (0.246451481183)*x[0] + (-0.213774631409)*x[1]**o + (0.811160226118)*x[1]
+        ref[(2, 0, 3, 2)]=0.548492036287*x_ref[0]**o + (0.246451481183)*x_ref[0] + (-0.213774631409)*x_ref[1]**o + (0.811160226118)*x_ref[1]
+        arg[(2, 0, 3, 3)]=0.956060199047*x[0]**o + (0.898387228613)*x[0] + (0.313175573943)*x[1]**o + (-0.579022530119)*x[1]
+        ref[(2, 0, 3, 3)]=0.956060199047*x_ref[0]**o + (0.898387228613)*x_ref[0] + (0.313175573943)*x_ref[1]**o + (-0.579022530119)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.680114601843*x[0]**o + (-0.891255175044)*x[0] + (-0.478166683934)*x[1]**o + (0.618977906003)*x[1]
+        ref[(2, 1, 0, 0)]=-0.680114601843*x_ref[0]**o + (-0.891255175044)*x_ref[0] + (-0.478166683934)*x_ref[1]**o + (0.618977906003)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.360872068907*x[0]**o + (-0.574257128202)*x[0] + (0.36829370779)*x[1]**o + (0.946860598827)*x[1]
+        ref[(2, 1, 0, 1)]=0.360872068907*x_ref[0]**o + (-0.574257128202)*x_ref[0] + (0.36829370779)*x_ref[1]**o + (0.946860598827)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.75427922907*x[0]**o + (-0.0801082671615)*x[0] + (0.378953291714)*x[1]**o + (-0.681382972288)*x[1]
+        ref[(2, 1, 0, 2)]=-0.75427922907*x_ref[0]**o + (-0.0801082671615)*x_ref[0] + (0.378953291714)*x_ref[1]**o + (-0.681382972288)*x_ref[1]
+        arg[(2, 1, 0, 3)]=0.0509614175524*x[0]**o + (-0.781671295568)*x[0] + (0.896433639985)*x[1]**o + (-0.401704029963)*x[1]
+        ref[(2, 1, 0, 3)]=0.0509614175524*x_ref[0]**o + (-0.781671295568)*x_ref[0] + (0.896433639985)*x_ref[1]**o + (-0.401704029963)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.124757614733*x[0]**o + (0.177594847374)*x[0] + (0.524647754476)*x[1]**o + (-0.957130651789)*x[1]
+        ref[(2, 1, 1, 0)]=-0.124757614733*x_ref[0]**o + (0.177594847374)*x_ref[0] + (0.524647754476)*x_ref[1]**o + (-0.957130651789)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.245284162498*x[0]**o + (0.800555683265)*x[0] + (0.927788164912)*x[1]**o + (0.0625591710106)*x[1]
+        ref[(2, 1, 1, 1)]=-0.245284162498*x_ref[0]**o + (0.800555683265)*x_ref[0] + (0.927788164912)*x_ref[1]**o + (0.0625591710106)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.140667957167*x[0]**o + (-0.911774263862)*x[0] + (0.890580045466)*x[1]**o + (-0.788886635945)*x[1]
+        ref[(2, 1, 1, 2)]=0.140667957167*x_ref[0]**o + (-0.911774263862)*x_ref[0] + (0.890580045466)*x_ref[1]**o + (-0.788886635945)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.504747721388*x[0]**o + (-0.855120321921)*x[0] + (0.395166709279)*x[1]**o + (-0.980290565694)*x[1]
+        ref[(2, 1, 1, 3)]=-0.504747721388*x_ref[0]**o + (-0.855120321921)*x_ref[0] + (0.395166709279)*x_ref[1]**o + (-0.980290565694)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.228440026654*x[0]**o + (0.277269268021)*x[0] + (0.565478526958)*x[1]**o + (-0.747032651832)*x[1]
+        ref[(2, 1, 2, 0)]=-0.228440026654*x_ref[0]**o + (0.277269268021)*x_ref[0] + (0.565478526958)*x_ref[1]**o + (-0.747032651832)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.0734340709966*x[0]**o + (0.811950543285)*x[0] + (0.727110011778)*x[1]**o + (0.0553593744174)*x[1]
+        ref[(2, 1, 2, 1)]=-0.0734340709966*x_ref[0]**o + (0.811950543285)*x_ref[0] + (0.727110011778)*x_ref[1]**o + (0.0553593744174)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.130707774584*x[0]**o + (-0.54599059745)*x[0] + (-0.296673101128)*x[1]**o + (0.764785649689)*x[1]
+        ref[(2, 1, 2, 2)]=-0.130707774584*x_ref[0]**o + (-0.54599059745)*x_ref[0] + (-0.296673101128)*x_ref[1]**o + (0.764785649689)*x_ref[1]
+        arg[(2, 1, 2, 3)]=-0.141133717339*x[0]**o + (0.840089223056)*x[0] + (-0.33702733072)*x[1]**o + (0.713357759326)*x[1]
+        ref[(2, 1, 2, 3)]=-0.141133717339*x_ref[0]**o + (0.840089223056)*x_ref[0] + (-0.33702733072)*x_ref[1]**o + (0.713357759326)*x_ref[1]
+        arg[(2, 1, 3, 0)]=-0.95036300124*x[0]**o + (-0.855836584755)*x[0] + (-0.751251960817)*x[1]**o + (-0.31808373734)*x[1]
+        ref[(2, 1, 3, 0)]=-0.95036300124*x_ref[0]**o + (-0.855836584755)*x_ref[0] + (-0.751251960817)*x_ref[1]**o + (-0.31808373734)*x_ref[1]
+        arg[(2, 1, 3, 1)]=0.799863846652*x[0]**o + (0.104101672488)*x[0] + (0.404860660437)*x[1]**o + (-0.927533672629)*x[1]
+        ref[(2, 1, 3, 1)]=0.799863846652*x_ref[0]**o + (0.104101672488)*x_ref[0] + (0.404860660437)*x_ref[1]**o + (-0.927533672629)*x_ref[1]
+        arg[(2, 1, 3, 2)]=-0.0790757077825*x[0]**o + (0.598824022211)*x[0] + (-0.0623436410366)*x[1]**o + (0.799194410949)*x[1]
+        ref[(2, 1, 3, 2)]=-0.0790757077825*x_ref[0]**o + (0.598824022211)*x_ref[0] + (-0.0623436410366)*x_ref[1]**o + (0.799194410949)*x_ref[1]
+        arg[(2, 1, 3, 3)]=0.481315379691*x[0]**o + (0.439786503099)*x[0] + (-0.295256436897)*x[1]**o + (0.207565261451)*x[1]
+        ref[(2, 1, 3, 3)]=0.481315379691*x_ref[0]**o + (0.439786503099)*x_ref[0] + (-0.295256436897)*x_ref[1]**o + (0.207565261451)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.50836544037*x[2]**o + (-0.590735768189)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.50836544037*x_ref[2]**o + (-0.590735768189)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.367834105656*x[2]**o + (-0.67892764613)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.367834105656*x_ref[2]**o + (-0.67892764613)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.391261329573*x[2]**o + (-0.619222016242)*x[2]
+            ref[(0, 0, 0, 2)]+=0.391261329573*x_ref[2]**o + (-0.619222016242)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=-0.3261170373*x[2]**o + (-0.69558523454)*x[2]
+            ref[(0, 0, 0, 3)]+=-0.3261170373*x_ref[2]**o + (-0.69558523454)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.513150900634*x[2]**o + (0.954518114822)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.513150900634*x_ref[2]**o + (0.954518114822)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.403672654042*x[2]**o + (0.618728941218)*x[2]
+            ref[(0, 0, 1, 1)]+=0.403672654042*x_ref[2]**o + (0.618728941218)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.806173120178*x[2]**o + (0.278066961872)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.806173120178*x_ref[2]**o + (0.278066961872)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.250125600885*x[2]**o + (-0.147026216554)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.250125600885*x_ref[2]**o + (-0.147026216554)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.12940747677*x[2]**o + (-0.887214377642)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.12940747677*x_ref[2]**o + (-0.887214377642)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.349483514999*x[2]**o + (0.0894900645681)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.349483514999*x_ref[2]**o + (0.0894900645681)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.416785610146*x[2]**o + (0.0256110236202)*x[2]
+            ref[(0, 0, 2, 2)]+=0.416785610146*x_ref[2]**o + (0.0256110236202)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.566087173322*x[2]**o + (0.502715271569)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.566087173322*x_ref[2]**o + (0.502715271569)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.988400178629*x[2]**o + (-0.319818692747)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.988400178629*x_ref[2]**o + (-0.319818692747)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=-0.329193144306*x[2]**o + (0.158124251008)*x[2]
+            ref[(0, 0, 3, 1)]+=-0.329193144306*x_ref[2]**o + (0.158124251008)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=-0.133545612671*x[2]**o + (-0.165846947371)*x[2]
+            ref[(0, 0, 3, 2)]+=-0.133545612671*x_ref[2]**o + (-0.165846947371)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=-0.0529982819092*x[2]**o + (-0.882397854239)*x[2]
+            ref[(0, 0, 3, 3)]+=-0.0529982819092*x_ref[2]**o + (-0.882397854239)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.498639839711*x[2]**o + (0.716126782625)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.498639839711*x_ref[2]**o + (0.716126782625)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.299964404942*x[2]**o + (0.330589704634)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.299964404942*x_ref[2]**o + (0.330589704634)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.45960848736*x[2]**o + (-0.507787223021)*x[2]
+            ref[(0, 1, 0, 2)]+=0.45960848736*x_ref[2]**o + (-0.507787223021)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.374202667317*x[2]**o + (-0.688000814648)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.374202667317*x_ref[2]**o + (-0.688000814648)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.780447611753*x[2]**o + (-0.927283203705)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.780447611753*x_ref[2]**o + (-0.927283203705)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.522585395596*x[2]**o + (0.234007360608)*x[2]
+            ref[(0, 1, 1, 1)]+=0.522585395596*x_ref[2]**o + (0.234007360608)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.125740692069*x[2]**o + (-0.641363656598)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.125740692069*x_ref[2]**o + (-0.641363656598)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=0.545212814196*x[2]**o + (-0.69921644699)*x[2]
+            ref[(0, 1, 1, 3)]+=0.545212814196*x_ref[2]**o + (-0.69921644699)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.218233080199*x[2]**o + (0.898291075325)*x[2]
+            ref[(0, 1, 2, 0)]+=0.218233080199*x_ref[2]**o + (0.898291075325)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.957290054316*x[2]**o + (-0.23887699216)*x[2]
+            ref[(0, 1, 2, 1)]+=0.957290054316*x_ref[2]**o + (-0.23887699216)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.291934274578*x[2]**o + (0.342227829399)*x[2]
+            ref[(0, 1, 2, 2)]+=0.291934274578*x_ref[2]**o + (0.342227829399)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.170574942056*x[2]**o + (-0.378239557026)*x[2]
+            ref[(0, 1, 2, 3)]+=0.170574942056*x_ref[2]**o + (-0.378239557026)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.491236011098*x[2]**o + (-0.473448954694)*x[2]
+            ref[(0, 1, 3, 0)]+=-0.491236011098*x_ref[2]**o + (-0.473448954694)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.41737063941*x[2]**o + (-0.88521911997)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.41737063941*x_ref[2]**o + (-0.88521911997)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.220007827056*x[2]**o + (0.818362146479)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.220007827056*x_ref[2]**o + (0.818362146479)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=-0.0481292107634*x[2]**o + (0.389765622873)*x[2]
+            ref[(0, 1, 3, 3)]+=-0.0481292107634*x_ref[2]**o + (0.389765622873)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.743012654167*x[2]**o + (0.611462340716)*x[2]
+            ref[(1, 0, 0, 0)]+=0.743012654167*x_ref[2]**o + (0.611462340716)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.355964687827*x[2]**o + (-0.992991224165)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.355964687827*x_ref[2]**o + (-0.992991224165)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.363898206646*x[2]**o + (-0.925038139403)*x[2]
+            ref[(1, 0, 0, 2)]+=0.363898206646*x_ref[2]**o + (-0.925038139403)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.346391379486*x[2]**o + (-0.6075936518)*x[2]
+            ref[(1, 0, 0, 3)]+=0.346391379486*x_ref[2]**o + (-0.6075936518)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.810691308561*x[2]**o + (-0.661632727806)*x[2]
+            ref[(1, 0, 1, 0)]+=0.810691308561*x_ref[2]**o + (-0.661632727806)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.19179668347*x[2]**o + (-0.315902730542)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.19179668347*x_ref[2]**o + (-0.315902730542)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.453600752612*x[2]**o + (-0.644376661279)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.453600752612*x_ref[2]**o + (-0.644376661279)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.352118546688*x[2]**o + (-0.620035870864)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.352118546688*x_ref[2]**o + (-0.620035870864)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.429671331483*x[2]**o + (0.708239493013)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.429671331483*x_ref[2]**o + (0.708239493013)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.924879635671*x[2]**o + (-0.166596479983)*x[2]
+            ref[(1, 0, 2, 1)]+=0.924879635671*x_ref[2]**o + (-0.166596479983)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.00860184968664*x[2]**o + (-0.864375663889)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.00860184968664*x_ref[2]**o + (-0.864375663889)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.570421268406*x[2]**o + (-0.303261500315)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.570421268406*x_ref[2]**o + (-0.303261500315)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=0.0832853914436*x[2]**o + (0.151210994974)*x[2]
+            ref[(1, 0, 3, 0)]+=0.0832853914436*x_ref[2]**o + (0.151210994974)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.424088541336*x[2]**o + (-0.06219478325)*x[2]
+            ref[(1, 0, 3, 1)]+=0.424088541336*x_ref[2]**o + (-0.06219478325)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=-0.367980556035*x[2]**o + (-0.831057756277)*x[2]
+            ref[(1, 0, 3, 2)]+=-0.367980556035*x_ref[2]**o + (-0.831057756277)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=0.112548860615*x[2]**o + (-0.493532128271)*x[2]
+            ref[(1, 0, 3, 3)]+=0.112548860615*x_ref[2]**o + (-0.493532128271)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.476910023169*x[2]**o + (-0.252779578105)*x[2]
+            ref[(1, 1, 0, 0)]+=0.476910023169*x_ref[2]**o + (-0.252779578105)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.873076209054*x[2]**o + (-0.627991475533)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.873076209054*x_ref[2]**o + (-0.627991475533)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.722991691699*x[2]**o + (-0.762684818262)*x[2]
+            ref[(1, 1, 0, 2)]+=0.722991691699*x_ref[2]**o + (-0.762684818262)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.354912629082*x[2]**o + (0.253479264313)*x[2]
+            ref[(1, 1, 0, 3)]+=-0.354912629082*x_ref[2]**o + (0.253479264313)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.384043356423*x[2]**o + (0.312442212539)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.384043356423*x_ref[2]**o + (0.312442212539)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.586200220837*x[2]**o + (-0.394222584865)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.586200220837*x_ref[2]**o + (-0.394222584865)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.266952939323*x[2]**o + (0.942589837017)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.266952939323*x_ref[2]**o + (0.942589837017)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.650769123871*x[2]**o + (-0.335861855233)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.650769123871*x_ref[2]**o + (-0.335861855233)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.1500971295*x[2]**o + (0.765401725582)*x[2]
+            ref[(1, 1, 2, 0)]+=0.1500971295*x_ref[2]**o + (0.765401725582)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.129159745588*x[2]**o + (-0.585789466075)*x[2]
+            ref[(1, 1, 2, 1)]+=0.129159745588*x_ref[2]**o + (-0.585789466075)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.295724109676*x[2]**o + (0.928009063398)*x[2]
+            ref[(1, 1, 2, 2)]+=0.295724109676*x_ref[2]**o + (0.928009063398)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.0291973505432*x[2]**o + (0.242284807624)*x[2]
+            ref[(1, 1, 2, 3)]+=0.0291973505432*x_ref[2]**o + (0.242284807624)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=0.724612455667*x[2]**o + (0.59579201927)*x[2]
+            ref[(1, 1, 3, 0)]+=0.724612455667*x_ref[2]**o + (0.59579201927)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.632394898443*x[2]**o + (-0.516057752137)*x[2]
+            ref[(1, 1, 3, 1)]+=0.632394898443*x_ref[2]**o + (-0.516057752137)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=0.395113771001*x[2]**o + (0.51313911717)*x[2]
+            ref[(1, 1, 3, 2)]+=0.395113771001*x_ref[2]**o + (0.51313911717)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=-0.18985544271*x[2]**o + (-0.231695800328)*x[2]
+            ref[(1, 1, 3, 3)]+=-0.18985544271*x_ref[2]**o + (-0.231695800328)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.15690040061*x[2]**o + (0.0888030049712)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.15690040061*x_ref[2]**o + (0.0888030049712)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.966201836072*x[2]**o + (-0.996693535125)*x[2]
+            ref[(2, 0, 0, 1)]+=0.966201836072*x_ref[2]**o + (-0.996693535125)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.902430780399*x[2]**o + (-0.717787851228)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.902430780399*x_ref[2]**o + (-0.717787851228)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=0.874763799448*x[2]**o + (0.810401219606)*x[2]
+            ref[(2, 0, 0, 3)]+=0.874763799448*x_ref[2]**o + (0.810401219606)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.489321922417*x[2]**o + (0.94569278903)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.489321922417*x_ref[2]**o + (0.94569278903)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.334486414085*x[2]**o + (0.720041168103)*x[2]
+            ref[(2, 0, 1, 1)]+=0.334486414085*x_ref[2]**o + (0.720041168103)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.449003793091*x[2]**o + (0.231716788008)*x[2]
+            ref[(2, 0, 1, 2)]+=-0.449003793091*x_ref[2]**o + (0.231716788008)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=-0.0677263565356*x[2]**o + (-0.0883911566748)*x[2]
+            ref[(2, 0, 1, 3)]+=-0.0677263565356*x_ref[2]**o + (-0.0883911566748)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.632236184748*x[2]**o + (0.308622414849)*x[2]
+            ref[(2, 0, 2, 0)]+=0.632236184748*x_ref[2]**o + (0.308622414849)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.717408368627*x[2]**o + (0.396420736772)*x[2]
+            ref[(2, 0, 2, 1)]+=0.717408368627*x_ref[2]**o + (0.396420736772)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=0.405571448905*x[2]**o + (0.678425243945)*x[2]
+            ref[(2, 0, 2, 2)]+=0.405571448905*x_ref[2]**o + (0.678425243945)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=-0.754819412692*x[2]**o + (0.332674659479)*x[2]
+            ref[(2, 0, 2, 3)]+=-0.754819412692*x_ref[2]**o + (0.332674659479)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=-0.694947780628*x[2]**o + (0.513051881938)*x[2]
+            ref[(2, 0, 3, 0)]+=-0.694947780628*x_ref[2]**o + (0.513051881938)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=0.0741553174969*x[2]**o + (0.298643533321)*x[2]
+            ref[(2, 0, 3, 1)]+=0.0741553174969*x_ref[2]**o + (0.298643533321)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=-0.526070043829*x[2]**o + (0.597931278729)*x[2]
+            ref[(2, 0, 3, 2)]+=-0.526070043829*x_ref[2]**o + (0.597931278729)*x_ref[2]
+            arg[(2, 0, 3, 3)]+=-0.159771728089*x[2]**o + (0.776242501567)*x[2]
+            ref[(2, 0, 3, 3)]+=-0.159771728089*x_ref[2]**o + (0.776242501567)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.576759600975*x[2]**o + (-0.00199107054691)*x[2]
+            ref[(2, 1, 0, 0)]+=0.576759600975*x_ref[2]**o + (-0.00199107054691)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.344018510076*x[2]**o + (-0.618766610215)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.344018510076*x_ref[2]**o + (-0.618766610215)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.017096032071*x[2]**o + (0.999776181892)*x[2]
+            ref[(2, 1, 0, 2)]+=0.017096032071*x_ref[2]**o + (0.999776181892)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.590000952991*x[2]**o + (0.0324749491408)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.590000952991*x_ref[2]**o + (0.0324749491408)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.4482580441*x[2]**o + (-0.433379513246)*x[2]
+            ref[(2, 1, 1, 0)]+=-0.4482580441*x_ref[2]**o + (-0.433379513246)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.923988235008*x[2]**o + (-0.535860007909)*x[2]
+            ref[(2, 1, 1, 1)]+=0.923988235008*x_ref[2]**o + (-0.535860007909)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.955599397334*x[2]**o + (-0.300774623679)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.955599397334*x_ref[2]**o + (-0.300774623679)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.495580088338*x[2]**o + (-0.969694355525)*x[2]
+            ref[(2, 1, 1, 3)]+=-0.495580088338*x_ref[2]**o + (-0.969694355525)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.783871495504*x[2]**o + (-0.784019373296)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.783871495504*x_ref[2]**o + (-0.784019373296)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.147910114153*x[2]**o + (-0.232202267704)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.147910114153*x_ref[2]**o + (-0.232202267704)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.0586136310108*x[2]**o + (0.0110988946373)*x[2]
+            ref[(2, 1, 2, 2)]+=0.0586136310108*x_ref[2]**o + (0.0110988946373)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=-0.0400623958434*x[2]**o + (0.527338455102)*x[2]
+            ref[(2, 1, 2, 3)]+=-0.0400623958434*x_ref[2]**o + (0.527338455102)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=-0.0330948253612*x[2]**o + (0.760685267938)*x[2]
+            ref[(2, 1, 3, 0)]+=-0.0330948253612*x_ref[2]**o + (0.760685267938)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=0.676674423397*x[2]**o + (-0.478000160124)*x[2]
+            ref[(2, 1, 3, 1)]+=0.676674423397*x_ref[2]**o + (-0.478000160124)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=-0.703528605933*x[2]**o + (-0.308141239429)*x[2]
+            ref[(2, 1, 3, 2)]+=-0.703528605933*x_ref[2]**o + (-0.308141239429)*x_ref[2]
+            arg[(2, 1, 3, 3)]+=-0.011442837061*x[2]**o + (0.173296588387)*x[2]
+            ref[(2, 1, 3, 3)]+=-0.011442837061*x_ref[2]**o + (0.173296588387)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.545216822054*x[0]**o + (0.387118136427)*x[0] + (0.477795145346)*x[1]**o + (0.554918683985)*x[1]
+        ref=0.545216822054*x_ref[0]**o + (0.387118136427)*x_ref[0] + (0.477795145346)*x_ref[1]**o + (0.554918683985)*x_ref[1]
+        if dim==3:
+            arg+=(-0.0346179798344)*x[2]**o + (0.0826490085535)*x[2]
+            ref+=(-0.0346179798344)*x_ref[2]**o + (0.0826490085535)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.226007616059*x[0]**o + (0.306786183041)*x[0] + (-0.985271388095)*x[1]**o + (0.638256446748)*x[1]
+        ref[(0,)]=0.226007616059*x_ref[0]**o + (0.306786183041)*x_ref[0] + (-0.985271388095)*x_ref[1]**o + (0.638256446748)*x_ref[1]
+        arg[(1,)]=0.384820179085*x[0]**o + (0.78983217005)*x[0] + (0.342495311019)*x[1]**o + (-0.0113193104594)*x[1]
+        ref[(1,)]=0.384820179085*x_ref[0]**o + (0.78983217005)*x_ref[0] + (0.342495311019)*x_ref[1]**o + (-0.0113193104594)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.0563663345773*x[2]**o + (0.728523144617)*x[2]
+            ref[(0,)]+=0.0563663345773*x_ref[2]**o + (0.728523144617)*x_ref[2]
+            arg[(1,)]+=-0.268070306969*x[2]**o + (0.297432471618)*x[2]
+            ref[(1,)]+=-0.268070306969*x_ref[2]**o + (0.297432471618)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=0.875721312671*x[0]**o + (0.97924744363)*x[0] + (-0.6513795311)*x[1]**o + (-0.263025714584)*x[1]
+        ref[(0, 0)]=0.875721312671*x_ref[0]**o + (0.97924744363)*x_ref[0] + (-0.6513795311)*x_ref[1]**o + (-0.263025714584)*x_ref[1]
+        arg[(0, 1)]=0.801989645405*x[0]**o + (-0.417400553238)*x[0] + (0.202756462857)*x[1]**o + (0.776537999338)*x[1]
+        ref[(0, 1)]=0.801989645405*x_ref[0]**o + (-0.417400553238)*x_ref[0] + (0.202756462857)*x_ref[1]**o + (0.776537999338)*x_ref[1]
+        arg[(0, 2)]=0.463513581957*x[0]**o + (0.435380879161)*x[0] + (-0.890713246188)*x[1]**o + (0.64929985298)*x[1]
+        ref[(0, 2)]=0.463513581957*x_ref[0]**o + (0.435380879161)*x_ref[0] + (-0.890713246188)*x_ref[1]**o + (0.64929985298)*x_ref[1]
+        arg[(0, 3)]=-0.268471901833*x[0]**o + (-0.0268867721231)*x[0] + (0.467696879418)*x[1]**o + (-0.814878851763)*x[1]
+        ref[(0, 3)]=-0.268471901833*x_ref[0]**o + (-0.0268867721231)*x_ref[0] + (0.467696879418)*x_ref[1]**o + (-0.814878851763)*x_ref[1]
+        arg[(1, 0)]=-0.391711421755*x[0]**o + (-0.148772615613)*x[0] + (0.163451116488)*x[1]**o + (-0.91105666526)*x[1]
+        ref[(1, 0)]=-0.391711421755*x_ref[0]**o + (-0.148772615613)*x_ref[0] + (0.163451116488)*x_ref[1]**o + (-0.91105666526)*x_ref[1]
+        arg[(1, 1)]=-0.127843467845*x[0]**o + (0.0615679861239)*x[0] + (0.914932694878)*x[1]**o + (-0.831779288022)*x[1]
+        ref[(1, 1)]=-0.127843467845*x_ref[0]**o + (0.0615679861239)*x_ref[0] + (0.914932694878)*x_ref[1]**o + (-0.831779288022)*x_ref[1]
+        arg[(1, 2)]=-0.449139964211*x[0]**o + (-0.664643855396)*x[0] + (-0.872767620341)*x[1]**o + (-0.578974846103)*x[1]
+        ref[(1, 2)]=-0.449139964211*x_ref[0]**o + (-0.664643855396)*x_ref[0] + (-0.872767620341)*x_ref[1]**o + (-0.578974846103)*x_ref[1]
+        arg[(1, 3)]=0.277328559008*x[0]**o + (0.733175333839)*x[0] + (0.350976713344)*x[1]**o + (0.348249328394)*x[1]
+        ref[(1, 3)]=0.277328559008*x_ref[0]**o + (0.733175333839)*x_ref[0] + (0.350976713344)*x_ref[1]**o + (0.348249328394)*x_ref[1]
+        arg[(2, 0)]=-0.556510012297*x[0]**o + (0.447563028307)*x[0] + (0.516240396087)*x[1]**o + (0.773537423883)*x[1]
+        ref[(2, 0)]=-0.556510012297*x_ref[0]**o + (0.447563028307)*x_ref[0] + (0.516240396087)*x_ref[1]**o + (0.773537423883)*x_ref[1]
+        arg[(2, 1)]=0.158854493802*x[0]**o + (-0.415640227204)*x[0] + (-0.591133336846)*x[1]**o + (-0.370641407759)*x[1]
+        ref[(2, 1)]=0.158854493802*x_ref[0]**o + (-0.415640227204)*x_ref[0] + (-0.591133336846)*x_ref[1]**o + (-0.370641407759)*x_ref[1]
+        arg[(2, 2)]=-0.0238260307888*x[0]**o + (-0.240668257533)*x[0] + (-0.55182760058)*x[1]**o + (0.0575912930613)*x[1]
+        ref[(2, 2)]=-0.0238260307888*x_ref[0]**o + (-0.240668257533)*x_ref[0] + (-0.55182760058)*x_ref[1]**o + (0.0575912930613)*x_ref[1]
+        arg[(2, 3)]=-0.726229971761*x[0]**o + (-0.19770920747)*x[0] + (-0.956365325646)*x[1]**o + (-0.835218019399)*x[1]
+        ref[(2, 3)]=-0.726229971761*x_ref[0]**o + (-0.19770920747)*x_ref[0] + (-0.956365325646)*x_ref[1]**o + (-0.835218019399)*x_ref[1]
+        arg[(3, 0)]=0.48582447232*x[0]**o + (0.848911751463)*x[0] + (-0.902868951405)*x[1]**o + (0.453458498467)*x[1]
+        ref[(3, 0)]=0.48582447232*x_ref[0]**o + (0.848911751463)*x_ref[0] + (-0.902868951405)*x_ref[1]**o + (0.453458498467)*x_ref[1]
+        arg[(3, 1)]=-0.391998228689*x[0]**o + (0.455001541049)*x[0] + (0.844287129951)*x[1]**o + (0.504523250958)*x[1]
+        ref[(3, 1)]=-0.391998228689*x_ref[0]**o + (0.455001541049)*x_ref[0] + (0.844287129951)*x_ref[1]**o + (0.504523250958)*x_ref[1]
+        arg[(3, 2)]=0.930526761415*x[0]**o + (-0.417543387625)*x[0] + (-0.312104879622)*x[1]**o + (-0.188607963479)*x[1]
+        ref[(3, 2)]=0.930526761415*x_ref[0]**o + (-0.417543387625)*x_ref[0] + (-0.312104879622)*x_ref[1]**o + (-0.188607963479)*x_ref[1]
+        arg[(3, 3)]=0.134818580012*x[0]**o + (-0.784281381644)*x[0] + (-0.524410510281)*x[1]**o + (0.620594518859)*x[1]
+        ref[(3, 3)]=0.134818580012*x_ref[0]**o + (-0.784281381644)*x_ref[0] + (-0.524410510281)*x_ref[1]**o + (0.620594518859)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.801745951371*x[2]**o + (0.100573229358)*x[2]
+            ref[(0, 0)]+=0.801745951371*x_ref[2]**o + (0.100573229358)*x_ref[2]
+            arg[(0, 1)]+=-0.917126355885*x[2]**o + (0.399364519154)*x[2]
+            ref[(0, 1)]+=-0.917126355885*x_ref[2]**o + (0.399364519154)*x_ref[2]
+            arg[(0, 2)]+=-0.565674065908*x[2]**o + (0.0287000048863)*x[2]
+            ref[(0, 2)]+=-0.565674065908*x_ref[2]**o + (0.0287000048863)*x_ref[2]
+            arg[(0, 3)]+=-0.930860218107*x[2]**o + (0.0528111731514)*x[2]
+            ref[(0, 3)]+=-0.930860218107*x_ref[2]**o + (0.0528111731514)*x_ref[2]
+            arg[(1, 0)]+=-0.0872377039954*x[2]**o + (-0.344711822477)*x[2]
+            ref[(1, 0)]+=-0.0872377039954*x_ref[2]**o + (-0.344711822477)*x_ref[2]
+            arg[(1, 1)]+=0.783720593274*x[2]**o + (0.17803048778)*x[2]
+            ref[(1, 1)]+=0.783720593274*x_ref[2]**o + (0.17803048778)*x_ref[2]
+            arg[(1, 2)]+=0.00810524725898*x[2]**o + (0.338885106327)*x[2]
+            ref[(1, 2)]+=0.00810524725898*x_ref[2]**o + (0.338885106327)*x_ref[2]
+            arg[(1, 3)]+=0.0562303604592*x[2]**o + (-0.593460591164)*x[2]
+            ref[(1, 3)]+=0.0562303604592*x_ref[2]**o + (-0.593460591164)*x_ref[2]
+            arg[(2, 0)]+=-0.919563568541*x[2]**o + (-0.3164107976)*x[2]
+            ref[(2, 0)]+=-0.919563568541*x_ref[2]**o + (-0.3164107976)*x_ref[2]
+            arg[(2, 1)]+=0.921409956597*x[2]**o + (0.835415812618)*x[2]
+            ref[(2, 1)]+=0.921409956597*x_ref[2]**o + (0.835415812618)*x_ref[2]
+            arg[(2, 2)]+=0.729396030503*x[2]**o + (-0.267117714794)*x[2]
+            ref[(2, 2)]+=0.729396030503*x_ref[2]**o + (-0.267117714794)*x_ref[2]
+            arg[(2, 3)]+=0.244792925077*x[2]**o + (0.700899142841)*x[2]
+            ref[(2, 3)]+=0.244792925077*x_ref[2]**o + (0.700899142841)*x_ref[2]
+            arg[(3, 0)]+=0.0344097843462*x[2]**o + (-0.727840437948)*x[2]
+            ref[(3, 0)]+=0.0344097843462*x_ref[2]**o + (-0.727840437948)*x_ref[2]
+            arg[(3, 1)]+=0.742068064339*x[2]**o + (-0.627395211951)*x[2]
+            ref[(3, 1)]+=0.742068064339*x_ref[2]**o + (-0.627395211951)*x_ref[2]
+            arg[(3, 2)]+=0.873206752536*x[2]**o + (0.930845897521)*x[2]
+            ref[(3, 2)]+=0.873206752536*x_ref[2]**o + (0.930845897521)*x_ref[2]
+            arg[(3, 3)]+=-0.16359087164*x[2]**o + (0.512331426778)*x[2]
+            ref[(3, 3)]+=-0.16359087164*x_ref[2]**o + (0.512331426778)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4),w_ref)
+        arg[(0, 0, 0)]=0.996818762587*x[0]**o + (0.00810873816405)*x[0] + (-0.148172322428)*x[1]**o + (0.726705205048)*x[1]
+        ref[(0, 0, 0)]=0.996818762587*x_ref[0]**o + (0.00810873816405)*x_ref[0] + (-0.148172322428)*x_ref[1]**o + (0.726705205048)*x_ref[1]
+        arg[(0, 0, 1)]=-0.273972267556*x[0]**o + (-0.902380749314)*x[0] + (0.576511467023)*x[1]**o + (0.555140699857)*x[1]
+        ref[(0, 0, 1)]=-0.273972267556*x_ref[0]**o + (-0.902380749314)*x_ref[0] + (0.576511467023)*x_ref[1]**o + (0.555140699857)*x_ref[1]
+        arg[(0, 0, 2)]=0.0959118848229*x[0]**o + (0.663485849043)*x[0] + (-0.329209914514)*x[1]**o + (0.220910383585)*x[1]
+        ref[(0, 0, 2)]=0.0959118848229*x_ref[0]**o + (0.663485849043)*x_ref[0] + (-0.329209914514)*x_ref[1]**o + (0.220910383585)*x_ref[1]
+        arg[(0, 0, 3)]=0.911977285069*x[0]**o + (0.389518341522)*x[0] + (0.707925065489)*x[1]**o + (-0.466907660802)*x[1]
+        ref[(0, 0, 3)]=0.911977285069*x_ref[0]**o + (0.389518341522)*x_ref[0] + (0.707925065489)*x_ref[1]**o + (-0.466907660802)*x_ref[1]
+        arg[(0, 1, 0)]=0.00367811452543*x[0]**o + (0.946159832354)*x[0] + (0.637126205223)*x[1]**o + (-0.95439102056)*x[1]
+        ref[(0, 1, 0)]=0.00367811452543*x_ref[0]**o + (0.946159832354)*x_ref[0] + (0.637126205223)*x_ref[1]**o + (-0.95439102056)*x_ref[1]
+        arg[(0, 1, 1)]=0.771812905549*x[0]**o + (0.825928852686)*x[0] + (-0.626250650063)*x[1]**o + (0.893254065464)*x[1]
+        ref[(0, 1, 1)]=0.771812905549*x_ref[0]**o + (0.825928852686)*x_ref[0] + (-0.626250650063)*x_ref[1]**o + (0.893254065464)*x_ref[1]
+        arg[(0, 1, 2)]=-0.92077194723*x[0]**o + (-0.813571462298)*x[0] + (0.712496375152)*x[1]**o + (-0.778336346938)*x[1]
+        ref[(0, 1, 2)]=-0.92077194723*x_ref[0]**o + (-0.813571462298)*x_ref[0] + (0.712496375152)*x_ref[1]**o + (-0.778336346938)*x_ref[1]
+        arg[(0, 1, 3)]=-0.709377481453*x[0]**o + (0.23081279246)*x[0] + (0.601004205532)*x[1]**o + (0.411842550494)*x[1]
+        ref[(0, 1, 3)]=-0.709377481453*x_ref[0]**o + (0.23081279246)*x_ref[0] + (0.601004205532)*x_ref[1]**o + (0.411842550494)*x_ref[1]
+        arg[(0, 2, 0)]=0.366884310462*x[0]**o + (-0.125776547831)*x[0] + (0.72446793976)*x[1]**o + (0.116195375548)*x[1]
+        ref[(0, 2, 0)]=0.366884310462*x_ref[0]**o + (-0.125776547831)*x_ref[0] + (0.72446793976)*x_ref[1]**o + (0.116195375548)*x_ref[1]
+        arg[(0, 2, 1)]=0.00650666619581*x[0]**o + (0.0923793368665)*x[0] + (0.154801504402)*x[1]**o + (0.97887483529)*x[1]
+        ref[(0, 2, 1)]=0.00650666619581*x_ref[0]**o + (0.0923793368665)*x_ref[0] + (0.154801504402)*x_ref[1]**o + (0.97887483529)*x_ref[1]
+        arg[(0, 2, 2)]=0.811758813112*x[0]**o + (-0.410241959813)*x[0] + (-0.639006235002)*x[1]**o + (0.824476370899)*x[1]
+        ref[(0, 2, 2)]=0.811758813112*x_ref[0]**o + (-0.410241959813)*x_ref[0] + (-0.639006235002)*x_ref[1]**o + (0.824476370899)*x_ref[1]
+        arg[(0, 2, 3)]=0.878913602141*x[0]**o + (-0.556871372219)*x[0] + (0.455330681605)*x[1]**o + (0.80312850764)*x[1]
+        ref[(0, 2, 3)]=0.878913602141*x_ref[0]**o + (-0.556871372219)*x_ref[0] + (0.455330681605)*x_ref[1]**o + (0.80312850764)*x_ref[1]
+        arg[(0, 3, 0)]=0.762126033131*x[0]**o + (-0.650721858899)*x[0] + (0.340160791488)*x[1]**o + (-0.527159438585)*x[1]
+        ref[(0, 3, 0)]=0.762126033131*x_ref[0]**o + (-0.650721858899)*x_ref[0] + (0.340160791488)*x_ref[1]**o + (-0.527159438585)*x_ref[1]
+        arg[(0, 3, 1)]=-0.118171137072*x[0]**o + (-0.755499169455)*x[0] + (0.895632429056)*x[1]**o + (0.426734206138)*x[1]
+        ref[(0, 3, 1)]=-0.118171137072*x_ref[0]**o + (-0.755499169455)*x_ref[0] + (0.895632429056)*x_ref[1]**o + (0.426734206138)*x_ref[1]
+        arg[(0, 3, 2)]=0.0416279491368*x[0]**o + (-0.613032148842)*x[0] + (0.464894415495)*x[1]**o + (-0.736254906704)*x[1]
+        ref[(0, 3, 2)]=0.0416279491368*x_ref[0]**o + (-0.613032148842)*x_ref[0] + (0.464894415495)*x_ref[1]**o + (-0.736254906704)*x_ref[1]
+        arg[(0, 3, 3)]=-0.662421685267*x[0]**o + (0.012767479386)*x[0] + (-0.968489289362)*x[1]**o + (0.338388160494)*x[1]
+        ref[(0, 3, 3)]=-0.662421685267*x_ref[0]**o + (0.012767479386)*x_ref[0] + (-0.968489289362)*x_ref[1]**o + (0.338388160494)*x_ref[1]
+        arg[(1, 0, 0)]=-0.282464644129*x[0]**o + (-0.564665419597)*x[0] + (-0.388298536393)*x[1]**o + (-0.600295756766)*x[1]
+        ref[(1, 0, 0)]=-0.282464644129*x_ref[0]**o + (-0.564665419597)*x_ref[0] + (-0.388298536393)*x_ref[1]**o + (-0.600295756766)*x_ref[1]
+        arg[(1, 0, 1)]=0.183215722296*x[0]**o + (-0.931919015928)*x[0] + (-0.224324100273)*x[1]**o + (-0.600450163468)*x[1]
+        ref[(1, 0, 1)]=0.183215722296*x_ref[0]**o + (-0.931919015928)*x_ref[0] + (-0.224324100273)*x_ref[1]**o + (-0.600450163468)*x_ref[1]
+        arg[(1, 0, 2)]=-0.694396414637*x[0]**o + (0.0292093615534)*x[0] + (0.522161887566)*x[1]**o + (0.263418153217)*x[1]
+        ref[(1, 0, 2)]=-0.694396414637*x_ref[0]**o + (0.0292093615534)*x_ref[0] + (0.522161887566)*x_ref[1]**o + (0.263418153217)*x_ref[1]
+        arg[(1, 0, 3)]=-0.443433793112*x[0]**o + (0.278716396291)*x[0] + (0.699533217524)*x[1]**o + (-0.272965968656)*x[1]
+        ref[(1, 0, 3)]=-0.443433793112*x_ref[0]**o + (0.278716396291)*x_ref[0] + (0.699533217524)*x_ref[1]**o + (-0.272965968656)*x_ref[1]
+        arg[(1, 1, 0)]=-0.661690159467*x[0]**o + (0.0737028634022)*x[0] + (-0.559593481998)*x[1]**o + (0.175050971577)*x[1]
+        ref[(1, 1, 0)]=-0.661690159467*x_ref[0]**o + (0.0737028634022)*x_ref[0] + (-0.559593481998)*x_ref[1]**o + (0.175050971577)*x_ref[1]
+        arg[(1, 1, 1)]=0.537917364106*x[0]**o + (0.473275297493)*x[0] + (-0.56450504996)*x[1]**o + (-0.389482730861)*x[1]
+        ref[(1, 1, 1)]=0.537917364106*x_ref[0]**o + (0.473275297493)*x_ref[0] + (-0.56450504996)*x_ref[1]**o + (-0.389482730861)*x_ref[1]
+        arg[(1, 1, 2)]=0.706583197553*x[0]**o + (0.296431488407)*x[0] + (0.858459473533)*x[1]**o + (0.407074369564)*x[1]
+        ref[(1, 1, 2)]=0.706583197553*x_ref[0]**o + (0.296431488407)*x_ref[0] + (0.858459473533)*x_ref[1]**o + (0.407074369564)*x_ref[1]
+        arg[(1, 1, 3)]=-0.247729110849*x[0]**o + (-0.017458136178)*x[0] + (-0.244420809115)*x[1]**o + (-0.0951714378462)*x[1]
+        ref[(1, 1, 3)]=-0.247729110849*x_ref[0]**o + (-0.017458136178)*x_ref[0] + (-0.244420809115)*x_ref[1]**o + (-0.0951714378462)*x_ref[1]
+        arg[(1, 2, 0)]=-0.510701535437*x[0]**o + (-0.74203570769)*x[0] + (-0.719063920704)*x[1]**o + (0.20322715868)*x[1]
+        ref[(1, 2, 0)]=-0.510701535437*x_ref[0]**o + (-0.74203570769)*x_ref[0] + (-0.719063920704)*x_ref[1]**o + (0.20322715868)*x_ref[1]
+        arg[(1, 2, 1)]=0.691794754796*x[0]**o + (0.67211663646)*x[0] + (-0.820470786954)*x[1]**o + (0.649054775966)*x[1]
+        ref[(1, 2, 1)]=0.691794754796*x_ref[0]**o + (0.67211663646)*x_ref[0] + (-0.820470786954)*x_ref[1]**o + (0.649054775966)*x_ref[1]
+        arg[(1, 2, 2)]=0.870648142706*x[0]**o + (0.580002678664)*x[0] + (-0.955112318576)*x[1]**o + (-0.227323219947)*x[1]
+        ref[(1, 2, 2)]=0.870648142706*x_ref[0]**o + (0.580002678664)*x_ref[0] + (-0.955112318576)*x_ref[1]**o + (-0.227323219947)*x_ref[1]
+        arg[(1, 2, 3)]=0.563804151622*x[0]**o + (-0.319047327063)*x[0] + (0.867801825278)*x[1]**o + (-0.409180188894)*x[1]
+        ref[(1, 2, 3)]=0.563804151622*x_ref[0]**o + (-0.319047327063)*x_ref[0] + (0.867801825278)*x_ref[1]**o + (-0.409180188894)*x_ref[1]
+        arg[(1, 3, 0)]=-0.261797392398*x[0]**o + (0.316016627919)*x[0] + (0.177444110063)*x[1]**o + (-0.120161441619)*x[1]
+        ref[(1, 3, 0)]=-0.261797392398*x_ref[0]**o + (0.316016627919)*x_ref[0] + (0.177444110063)*x_ref[1]**o + (-0.120161441619)*x_ref[1]
+        arg[(1, 3, 1)]=0.627672974081*x[0]**o + (-0.578863660127)*x[0] + (-0.759611726486)*x[1]**o + (0.0445105114083)*x[1]
+        ref[(1, 3, 1)]=0.627672974081*x_ref[0]**o + (-0.578863660127)*x_ref[0] + (-0.759611726486)*x_ref[1]**o + (0.0445105114083)*x_ref[1]
+        arg[(1, 3, 2)]=0.320793117438*x[0]**o + (0.388347060367)*x[0] + (-0.036796430285)*x[1]**o + (-0.266716774754)*x[1]
+        ref[(1, 3, 2)]=0.320793117438*x_ref[0]**o + (0.388347060367)*x_ref[0] + (-0.036796430285)*x_ref[1]**o + (-0.266716774754)*x_ref[1]
+        arg[(1, 3, 3)]=-0.673787692765*x[0]**o + (0.219646337815)*x[0] + (0.519620065189)*x[1]**o + (0.232785391501)*x[1]
+        ref[(1, 3, 3)]=-0.673787692765*x_ref[0]**o + (0.219646337815)*x_ref[0] + (0.519620065189)*x_ref[1]**o + (0.232785391501)*x_ref[1]
+        arg[(2, 0, 0)]=-0.0192062097221*x[0]**o + (-0.0916588099222)*x[0] + (-0.305157599266)*x[1]**o + (-0.601454393164)*x[1]
+        ref[(2, 0, 0)]=-0.0192062097221*x_ref[0]**o + (-0.0916588099222)*x_ref[0] + (-0.305157599266)*x_ref[1]**o + (-0.601454393164)*x_ref[1]
+        arg[(2, 0, 1)]=-0.697193375766*x[0]**o + (0.0216889796364)*x[0] + (0.927615074398)*x[1]**o + (-0.105190296333)*x[1]
+        ref[(2, 0, 1)]=-0.697193375766*x_ref[0]**o + (0.0216889796364)*x_ref[0] + (0.927615074398)*x_ref[1]**o + (-0.105190296333)*x_ref[1]
+        arg[(2, 0, 2)]=0.0758985663765*x[0]**o + (-0.530694270364)*x[0] + (-0.426740334948)*x[1]**o + (0.396838383182)*x[1]
+        ref[(2, 0, 2)]=0.0758985663765*x_ref[0]**o + (-0.530694270364)*x_ref[0] + (-0.426740334948)*x_ref[1]**o + (0.396838383182)*x_ref[1]
+        arg[(2, 0, 3)]=-0.101219981867*x[0]**o + (0.544239081181)*x[0] + (-0.897354176183)*x[1]**o + (-0.883315793606)*x[1]
+        ref[(2, 0, 3)]=-0.101219981867*x_ref[0]**o + (0.544239081181)*x_ref[0] + (-0.897354176183)*x_ref[1]**o + (-0.883315793606)*x_ref[1]
+        arg[(2, 1, 0)]=-0.168655347051*x[0]**o + (0.775542333203)*x[0] + (-0.189091387371)*x[1]**o + (0.972662923333)*x[1]
+        ref[(2, 1, 0)]=-0.168655347051*x_ref[0]**o + (0.775542333203)*x_ref[0] + (-0.189091387371)*x_ref[1]**o + (0.972662923333)*x_ref[1]
+        arg[(2, 1, 1)]=0.0835712465997*x[0]**o + (-0.104390176132)*x[0] + (-0.594387879091)*x[1]**o + (0.949472296175)*x[1]
+        ref[(2, 1, 1)]=0.0835712465997*x_ref[0]**o + (-0.104390176132)*x_ref[0] + (-0.594387879091)*x_ref[1]**o + (0.949472296175)*x_ref[1]
+        arg[(2, 1, 2)]=-0.0991061372687*x[0]**o + (-0.0096619701624)*x[0] + (-0.388104554862)*x[1]**o + (-0.469471179652)*x[1]
+        ref[(2, 1, 2)]=-0.0991061372687*x_ref[0]**o + (-0.0096619701624)*x_ref[0] + (-0.388104554862)*x_ref[1]**o + (-0.469471179652)*x_ref[1]
+        arg[(2, 1, 3)]=-0.34547534931*x[0]**o + (-0.189785315442)*x[0] + (-0.716937513145)*x[1]**o + (-0.0139906124163)*x[1]
+        ref[(2, 1, 3)]=-0.34547534931*x_ref[0]**o + (-0.189785315442)*x_ref[0] + (-0.716937513145)*x_ref[1]**o + (-0.0139906124163)*x_ref[1]
+        arg[(2, 2, 0)]=-0.607481841392*x[0]**o + (-0.692647881551)*x[0] + (-0.997058933425)*x[1]**o + (-0.533365305859)*x[1]
+        ref[(2, 2, 0)]=-0.607481841392*x_ref[0]**o + (-0.692647881551)*x_ref[0] + (-0.997058933425)*x_ref[1]**o + (-0.533365305859)*x_ref[1]
+        arg[(2, 2, 1)]=-0.415035983306*x[0]**o + (-0.337404357138)*x[0] + (-0.0846974184558)*x[1]**o + (-0.472324946594)*x[1]
+        ref[(2, 2, 1)]=-0.415035983306*x_ref[0]**o + (-0.337404357138)*x_ref[0] + (-0.0846974184558)*x_ref[1]**o + (-0.472324946594)*x_ref[1]
+        arg[(2, 2, 2)]=-0.245858467193*x[0]**o + (0.964560199472)*x[0] + (-0.272952970924)*x[1]**o + (-0.398545137011)*x[1]
+        ref[(2, 2, 2)]=-0.245858467193*x_ref[0]**o + (0.964560199472)*x_ref[0] + (-0.272952970924)*x_ref[1]**o + (-0.398545137011)*x_ref[1]
+        arg[(2, 2, 3)]=0.076213024829*x[0]**o + (0.432553008512)*x[0] + (-0.324572340426)*x[1]**o + (0.174993589488)*x[1]
+        ref[(2, 2, 3)]=0.076213024829*x_ref[0]**o + (0.432553008512)*x_ref[0] + (-0.324572340426)*x_ref[1]**o + (0.174993589488)*x_ref[1]
+        arg[(2, 3, 0)]=-0.763484851057*x[0]**o + (-0.660025381745)*x[0] + (0.584709036627)*x[1]**o + (-0.259400493282)*x[1]
+        ref[(2, 3, 0)]=-0.763484851057*x_ref[0]**o + (-0.660025381745)*x_ref[0] + (0.584709036627)*x_ref[1]**o + (-0.259400493282)*x_ref[1]
+        arg[(2, 3, 1)]=0.383124807494*x[0]**o + (-0.368948792128)*x[0] + (-0.443919609306)*x[1]**o + (-0.376331200418)*x[1]
+        ref[(2, 3, 1)]=0.383124807494*x_ref[0]**o + (-0.368948792128)*x_ref[0] + (-0.443919609306)*x_ref[1]**o + (-0.376331200418)*x_ref[1]
+        arg[(2, 3, 2)]=-0.685102895737*x[0]**o + (-0.449445282495)*x[0] + (-0.133249744419)*x[1]**o + (-0.543373402989)*x[1]
+        ref[(2, 3, 2)]=-0.685102895737*x_ref[0]**o + (-0.449445282495)*x_ref[0] + (-0.133249744419)*x_ref[1]**o + (-0.543373402989)*x_ref[1]
+        arg[(2, 3, 3)]=-0.418495381256*x[0]**o + (0.36535482647)*x[0] + (0.0185615747029)*x[1]**o + (-0.982114058234)*x[1]
+        ref[(2, 3, 3)]=-0.418495381256*x_ref[0]**o + (0.36535482647)*x_ref[0] + (0.0185615747029)*x_ref[1]**o + (-0.982114058234)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.354555894426*x[2]**o + (0.785679969009)*x[2]
+            ref[(0, 0, 0)]+=-0.354555894426*x_ref[2]**o + (0.785679969009)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.0449539417361*x[2]**o + (-0.998595401628)*x[2]
+            ref[(0, 0, 1)]+=-0.0449539417361*x_ref[2]**o + (-0.998595401628)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.576735038234*x[2]**o + (-0.573991618999)*x[2]
+            ref[(0, 0, 2)]+=-0.576735038234*x_ref[2]**o + (-0.573991618999)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.984501543904*x[2]**o + (0.111917585703)*x[2]
+            ref[(0, 0, 3)]+=-0.984501543904*x_ref[2]**o + (0.111917585703)*x_ref[2]
+            arg[(0, 1, 0)]+=0.174476117379*x[2]**o + (-0.118199751247)*x[2]
+            ref[(0, 1, 0)]+=0.174476117379*x_ref[2]**o + (-0.118199751247)*x_ref[2]
+            arg[(0, 1, 1)]+=0.0772271239732*x[2]**o + (-0.145447596564)*x[2]
+            ref[(0, 1, 1)]+=0.0772271239732*x_ref[2]**o + (-0.145447596564)*x_ref[2]
+            arg[(0, 1, 2)]+=0.283043729259*x[2]**o + (-0.339722328276)*x[2]
+            ref[(0, 1, 2)]+=0.283043729259*x_ref[2]**o + (-0.339722328276)*x_ref[2]
+            arg[(0, 1, 3)]+=-0.70272147401*x[2]**o + (0.591174439547)*x[2]
+            ref[(0, 1, 3)]+=-0.70272147401*x_ref[2]**o + (0.591174439547)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.155214394521*x[2]**o + (0.146214113471)*x[2]
+            ref[(0, 2, 0)]+=-0.155214394521*x_ref[2]**o + (0.146214113471)*x_ref[2]
+            arg[(0, 2, 1)]+=-0.0167006380306*x[2]**o + (-0.179413910645)*x[2]
+            ref[(0, 2, 1)]+=-0.0167006380306*x_ref[2]**o + (-0.179413910645)*x_ref[2]
+            arg[(0, 2, 2)]+=0.951835774006*x[2]**o + (0.261039508983)*x[2]
+            ref[(0, 2, 2)]+=0.951835774006*x_ref[2]**o + (0.261039508983)*x_ref[2]
+            arg[(0, 2, 3)]+=-0.295361605611*x[2]**o + (-0.17697119179)*x[2]
+            ref[(0, 2, 3)]+=-0.295361605611*x_ref[2]**o + (-0.17697119179)*x_ref[2]
+            arg[(0, 3, 0)]+=-0.500274501849*x[2]**o + (-0.0123903104899)*x[2]
+            ref[(0, 3, 0)]+=-0.500274501849*x_ref[2]**o + (-0.0123903104899)*x_ref[2]
+            arg[(0, 3, 1)]+=-0.250192392589*x[2]**o + (-0.38269282236)*x[2]
+            ref[(0, 3, 1)]+=-0.250192392589*x_ref[2]**o + (-0.38269282236)*x_ref[2]
+            arg[(0, 3, 2)]+=-0.238735615099*x[2]**o + (-0.8214166896)*x[2]
+            ref[(0, 3, 2)]+=-0.238735615099*x_ref[2]**o + (-0.8214166896)*x_ref[2]
+            arg[(0, 3, 3)]+=-0.675658797847*x[2]**o + (0.493387803072)*x[2]
+            ref[(0, 3, 3)]+=-0.675658797847*x_ref[2]**o + (0.493387803072)*x_ref[2]
+            arg[(1, 0, 0)]+=0.827754092338*x[2]**o + (-0.555308453039)*x[2]
+            ref[(1, 0, 0)]+=0.827754092338*x_ref[2]**o + (-0.555308453039)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.333658659126*x[2]**o + (0.574680299451)*x[2]
+            ref[(1, 0, 1)]+=-0.333658659126*x_ref[2]**o + (0.574680299451)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.992390669651*x[2]**o + (0.280900590938)*x[2]
+            ref[(1, 0, 2)]+=-0.992390669651*x_ref[2]**o + (0.280900590938)*x_ref[2]
+            arg[(1, 0, 3)]+=-0.530536188922*x[2]**o + (-0.455914764221)*x[2]
+            ref[(1, 0, 3)]+=-0.530536188922*x_ref[2]**o + (-0.455914764221)*x_ref[2]
+            arg[(1, 1, 0)]+=0.126653428591*x[2]**o + (-0.826200539087)*x[2]
+            ref[(1, 1, 0)]+=0.126653428591*x_ref[2]**o + (-0.826200539087)*x_ref[2]
+            arg[(1, 1, 1)]+=0.512455875223*x[2]**o + (-0.960065200622)*x[2]
+            ref[(1, 1, 1)]+=0.512455875223*x_ref[2]**o + (-0.960065200622)*x_ref[2]
+            arg[(1, 1, 2)]+=0.210464822868*x[2]**o + (-0.334365855572)*x[2]
+            ref[(1, 1, 2)]+=0.210464822868*x_ref[2]**o + (-0.334365855572)*x_ref[2]
+            arg[(1, 1, 3)]+=0.669338667361*x[2]**o + (-0.194649173886)*x[2]
+            ref[(1, 1, 3)]+=0.669338667361*x_ref[2]**o + (-0.194649173886)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.445399334227*x[2]**o + (0.27214912119)*x[2]
+            ref[(1, 2, 0)]+=-0.445399334227*x_ref[2]**o + (0.27214912119)*x_ref[2]
+            arg[(1, 2, 1)]+=0.915350715738*x[2]**o + (0.794328367624)*x[2]
+            ref[(1, 2, 1)]+=0.915350715738*x_ref[2]**o + (0.794328367624)*x_ref[2]
+            arg[(1, 2, 2)]+=0.0725568295222*x[2]**o + (0.899127926531)*x[2]
+            ref[(1, 2, 2)]+=0.0725568295222*x_ref[2]**o + (0.899127926531)*x_ref[2]
+            arg[(1, 2, 3)]+=0.970238171646*x[2]**o + (-0.052423409967)*x[2]
+            ref[(1, 2, 3)]+=0.970238171646*x_ref[2]**o + (-0.052423409967)*x_ref[2]
+            arg[(1, 3, 0)]+=-0.0326193917865*x[2]**o + (0.490165265023)*x[2]
+            ref[(1, 3, 0)]+=-0.0326193917865*x_ref[2]**o + (0.490165265023)*x_ref[2]
+            arg[(1, 3, 1)]+=0.252632601131*x[2]**o + (-0.261849129124)*x[2]
+            ref[(1, 3, 1)]+=0.252632601131*x_ref[2]**o + (-0.261849129124)*x_ref[2]
+            arg[(1, 3, 2)]+=-0.0507861813661*x[2]**o + (0.58018793069)*x[2]
+            ref[(1, 3, 2)]+=-0.0507861813661*x_ref[2]**o + (0.58018793069)*x_ref[2]
+            arg[(1, 3, 3)]+=-0.368628231705*x[2]**o + (-0.0785100830339)*x[2]
+            ref[(1, 3, 3)]+=-0.368628231705*x_ref[2]**o + (-0.0785100830339)*x_ref[2]
+            arg[(2, 0, 0)]+=0.43389238872*x[2]**o + (0.345650208472)*x[2]
+            ref[(2, 0, 0)]+=0.43389238872*x_ref[2]**o + (0.345650208472)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.316086242109*x[2]**o + (0.26998053729)*x[2]
+            ref[(2, 0, 1)]+=-0.316086242109*x_ref[2]**o + (0.26998053729)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.197280710873*x[2]**o + (0.00158281044384)*x[2]
+            ref[(2, 0, 2)]+=-0.197280710873*x_ref[2]**o + (0.00158281044384)*x_ref[2]
+            arg[(2, 0, 3)]+=0.08866170617*x[2]**o + (0.945887068337)*x[2]
+            ref[(2, 0, 3)]+=0.08866170617*x_ref[2]**o + (0.945887068337)*x_ref[2]
+            arg[(2, 1, 0)]+=0.269931212887*x[2]**o + (0.752532532109)*x[2]
+            ref[(2, 1, 0)]+=0.269931212887*x_ref[2]**o + (0.752532532109)*x_ref[2]
+            arg[(2, 1, 1)]+=0.147099694543*x[2]**o + (0.322566380052)*x[2]
+            ref[(2, 1, 1)]+=0.147099694543*x_ref[2]**o + (0.322566380052)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.852973669188*x[2]**o + (0.322428930615)*x[2]
+            ref[(2, 1, 2)]+=-0.852973669188*x_ref[2]**o + (0.322428930615)*x_ref[2]
+            arg[(2, 1, 3)]+=0.485514093636*x[2]**o + (0.196142103843)*x[2]
+            ref[(2, 1, 3)]+=0.485514093636*x_ref[2]**o + (0.196142103843)*x_ref[2]
+            arg[(2, 2, 0)]+=0.465543484997*x[2]**o + (0.738891319139)*x[2]
+            ref[(2, 2, 0)]+=0.465543484997*x_ref[2]**o + (0.738891319139)*x_ref[2]
+            arg[(2, 2, 1)]+=-0.826685573291*x[2]**o + (0.130777471293)*x[2]
+            ref[(2, 2, 1)]+=-0.826685573291*x_ref[2]**o + (0.130777471293)*x_ref[2]
+            arg[(2, 2, 2)]+=0.528490336675*x[2]**o + (0.71841686005)*x[2]
+            ref[(2, 2, 2)]+=0.528490336675*x_ref[2]**o + (0.71841686005)*x_ref[2]
+            arg[(2, 2, 3)]+=0.27990901943*x[2]**o + (-0.232977279753)*x[2]
+            ref[(2, 2, 3)]+=0.27990901943*x_ref[2]**o + (-0.232977279753)*x_ref[2]
+            arg[(2, 3, 0)]+=0.365810193417*x[2]**o + (-0.252204584998)*x[2]
+            ref[(2, 3, 0)]+=0.365810193417*x_ref[2]**o + (-0.252204584998)*x_ref[2]
+            arg[(2, 3, 1)]+=0.412265989539*x[2]**o + (-0.477263028881)*x[2]
+            ref[(2, 3, 1)]+=0.412265989539*x_ref[2]**o + (-0.477263028881)*x_ref[2]
+            arg[(2, 3, 2)]+=-0.366589128971*x[2]**o + (-0.219736475692)*x[2]
+            ref[(2, 3, 2)]+=-0.366589128971*x_ref[2]**o + (-0.219736475692)*x_ref[2]
+            arg[(2, 3, 3)]+=0.504905998426*x[2]**o + (0.848726134815)*x[2]
+            ref[(2, 3, 3)]+=0.504905998426*x_ref[2]**o + (0.848726134815)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3, 3),w)
+        ref = Data(0,(2, 3, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=-0.746612487011*x[0]**o + (-0.315509053411)*x[0] + (-0.427853296329)*x[1]**o + (-0.0141959279337)*x[1]
+        ref[(0, 0, 0, 0)]=-0.746612487011*x_ref[0]**o + (-0.315509053411)*x_ref[0] + (-0.427853296329)*x_ref[1]**o + (-0.0141959279337)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.293027831894*x[0]**o + (0.414455119738)*x[0] + (-0.641609489464)*x[1]**o + (-0.295946985866)*x[1]
+        ref[(0, 0, 0, 1)]=-0.293027831894*x_ref[0]**o + (0.414455119738)*x_ref[0] + (-0.641609489464)*x_ref[1]**o + (-0.295946985866)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.965145334146*x[0]**o + (-0.0995983797716)*x[0] + (0.725596790218)*x[1]**o + (0.885165793749)*x[1]
+        ref[(0, 0, 0, 2)]=0.965145334146*x_ref[0]**o + (-0.0995983797716)*x_ref[0] + (0.725596790218)*x_ref[1]**o + (0.885165793749)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.672084830709*x[0]**o + (0.718432060399)*x[0] + (-0.0276884569474)*x[1]**o + (0.146672996495)*x[1]
+        ref[(0, 0, 1, 0)]=-0.672084830709*x_ref[0]**o + (0.718432060399)*x_ref[0] + (-0.0276884569474)*x_ref[1]**o + (0.146672996495)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.154753709157*x[0]**o + (-0.334938550648)*x[0] + (0.0690789755012)*x[1]**o + (0.945933504471)*x[1]
+        ref[(0, 0, 1, 1)]=-0.154753709157*x_ref[0]**o + (-0.334938550648)*x_ref[0] + (0.0690789755012)*x_ref[1]**o + (0.945933504471)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.319554651259*x[0]**o + (-0.820382964499)*x[0] + (-0.422011905545)*x[1]**o + (-0.828307628149)*x[1]
+        ref[(0, 0, 1, 2)]=-0.319554651259*x_ref[0]**o + (-0.820382964499)*x_ref[0] + (-0.422011905545)*x_ref[1]**o + (-0.828307628149)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.635993823334*x[0]**o + (-0.227696296371)*x[0] + (0.994645955153)*x[1]**o + (0.521462672684)*x[1]
+        ref[(0, 0, 2, 0)]=-0.635993823334*x_ref[0]**o + (-0.227696296371)*x_ref[0] + (0.994645955153)*x_ref[1]**o + (0.521462672684)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.212751519866*x[0]**o + (0.222194492905)*x[0] + (-0.193450046572)*x[1]**o + (-0.527905391484)*x[1]
+        ref[(0, 0, 2, 1)]=0.212751519866*x_ref[0]**o + (0.222194492905)*x_ref[0] + (-0.193450046572)*x_ref[1]**o + (-0.527905391484)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.636341322551*x[0]**o + (0.51835485694)*x[0] + (0.720482138923)*x[1]**o + (-0.891007297514)*x[1]
+        ref[(0, 0, 2, 2)]=-0.636341322551*x_ref[0]**o + (0.51835485694)*x_ref[0] + (0.720482138923)*x_ref[1]**o + (-0.891007297514)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.83758066562*x[0]**o + (0.250501039922)*x[0] + (-0.970928560676)*x[1]**o + (-0.905964784794)*x[1]
+        ref[(0, 1, 0, 0)]=-0.83758066562*x_ref[0]**o + (0.250501039922)*x_ref[0] + (-0.970928560676)*x_ref[1]**o + (-0.905964784794)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.94401096786*x[0]**o + (-0.567340165692)*x[0] + (-0.444293114147)*x[1]**o + (0.232525049618)*x[1]
+        ref[(0, 1, 0, 1)]=0.94401096786*x_ref[0]**o + (-0.567340165692)*x_ref[0] + (-0.444293114147)*x_ref[1]**o + (0.232525049618)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.447784826533*x[0]**o + (0.470353969063)*x[0] + (-0.300828176617)*x[1]**o + (-0.579336305826)*x[1]
+        ref[(0, 1, 0, 2)]=0.447784826533*x_ref[0]**o + (0.470353969063)*x_ref[0] + (-0.300828176617)*x_ref[1]**o + (-0.579336305826)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.716049484261*x[0]**o + (0.630102157743)*x[0] + (-0.958095461696)*x[1]**o + (-0.596142592495)*x[1]
+        ref[(0, 1, 1, 0)]=0.716049484261*x_ref[0]**o + (0.630102157743)*x_ref[0] + (-0.958095461696)*x_ref[1]**o + (-0.596142592495)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.672002906263*x[0]**o + (0.119461157258)*x[0] + (-0.817265710856)*x[1]**o + (0.707805906774)*x[1]
+        ref[(0, 1, 1, 1)]=-0.672002906263*x_ref[0]**o + (0.119461157258)*x_ref[0] + (-0.817265710856)*x_ref[1]**o + (0.707805906774)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.924093577775*x[0]**o + (-0.998274658801)*x[0] + (-0.152128835885)*x[1]**o + (0.0821043331881)*x[1]
+        ref[(0, 1, 1, 2)]=-0.924093577775*x_ref[0]**o + (-0.998274658801)*x_ref[0] + (-0.152128835885)*x_ref[1]**o + (0.0821043331881)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.913466172507*x[0]**o + (-0.43997925565)*x[0] + (-0.48568138228)*x[1]**o + (0.250364795648)*x[1]
+        ref[(0, 1, 2, 0)]=-0.913466172507*x_ref[0]**o + (-0.43997925565)*x_ref[0] + (-0.48568138228)*x_ref[1]**o + (0.250364795648)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.709056691339*x[0]**o + (0.024423202396)*x[0] + (-0.804343164462)*x[1]**o + (0.401806771175)*x[1]
+        ref[(0, 1, 2, 1)]=0.709056691339*x_ref[0]**o + (0.024423202396)*x_ref[0] + (-0.804343164462)*x_ref[1]**o + (0.401806771175)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.61550599818*x[0]**o + (-0.985973185592)*x[0] + (-0.588131487779)*x[1]**o + (0.00845560855932)*x[1]
+        ref[(0, 1, 2, 2)]=-0.61550599818*x_ref[0]**o + (-0.985973185592)*x_ref[0] + (-0.588131487779)*x_ref[1]**o + (0.00845560855932)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.852015158255*x[0]**o + (-0.47771435891)*x[0] + (-0.323102788868)*x[1]**o + (-0.200020197209)*x[1]
+        ref[(0, 2, 0, 0)]=-0.852015158255*x_ref[0]**o + (-0.47771435891)*x_ref[0] + (-0.323102788868)*x_ref[1]**o + (-0.200020197209)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.383940494074*x[0]**o + (0.999341524135)*x[0] + (0.964979126948)*x[1]**o + (0.481041395067)*x[1]
+        ref[(0, 2, 0, 1)]=-0.383940494074*x_ref[0]**o + (0.999341524135)*x_ref[0] + (0.964979126948)*x_ref[1]**o + (0.481041395067)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.360769165248*x[0]**o + (0.203331211503)*x[0] + (0.0688798286329)*x[1]**o + (0.235229358378)*x[1]
+        ref[(0, 2, 0, 2)]=0.360769165248*x_ref[0]**o + (0.203331211503)*x_ref[0] + (0.0688798286329)*x_ref[1]**o + (0.235229358378)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.325980585045*x[0]**o + (-0.340645256168)*x[0] + (-0.858655834796)*x[1]**o + (-0.777657890428)*x[1]
+        ref[(0, 2, 1, 0)]=-0.325980585045*x_ref[0]**o + (-0.340645256168)*x_ref[0] + (-0.858655834796)*x_ref[1]**o + (-0.777657890428)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.142557212865*x[0]**o + (-0.785021440717)*x[0] + (0.140415998849)*x[1]**o + (-0.0493836629487)*x[1]
+        ref[(0, 2, 1, 1)]=0.142557212865*x_ref[0]**o + (-0.785021440717)*x_ref[0] + (0.140415998849)*x_ref[1]**o + (-0.0493836629487)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.192116983218*x[0]**o + (0.802978993309)*x[0] + (0.730091641817)*x[1]**o + (-0.516409176969)*x[1]
+        ref[(0, 2, 1, 2)]=-0.192116983218*x_ref[0]**o + (0.802978993309)*x_ref[0] + (0.730091641817)*x_ref[1]**o + (-0.516409176969)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.0127852802764*x[0]**o + (-0.846217993442)*x[0] + (0.901952379405)*x[1]**o + (0.667831624002)*x[1]
+        ref[(0, 2, 2, 0)]=-0.0127852802764*x_ref[0]**o + (-0.846217993442)*x_ref[0] + (0.901952379405)*x_ref[1]**o + (0.667831624002)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.237064678435*x[0]**o + (-0.588870925668)*x[0] + (-0.99808748057)*x[1]**o + (0.484613335957)*x[1]
+        ref[(0, 2, 2, 1)]=-0.237064678435*x_ref[0]**o + (-0.588870925668)*x_ref[0] + (-0.99808748057)*x_ref[1]**o + (0.484613335957)*x_ref[1]
+        arg[(0, 2, 2, 2)]=0.209806881603*x[0]**o + (0.885971591965)*x[0] + (0.8896535809)*x[1]**o + (0.255709091127)*x[1]
+        ref[(0, 2, 2, 2)]=0.209806881603*x_ref[0]**o + (0.885971591965)*x_ref[0] + (0.8896535809)*x_ref[1]**o + (0.255709091127)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.448390098206*x[0]**o + (-0.183033792675)*x[0] + (0.603804842672)*x[1]**o + (0.306200114152)*x[1]
+        ref[(1, 0, 0, 0)]=-0.448390098206*x_ref[0]**o + (-0.183033792675)*x_ref[0] + (0.603804842672)*x_ref[1]**o + (0.306200114152)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.188913642124*x[0]**o + (-0.517820979862)*x[0] + (-0.28298642154)*x[1]**o + (0.764486585746)*x[1]
+        ref[(1, 0, 0, 1)]=-0.188913642124*x_ref[0]**o + (-0.517820979862)*x_ref[0] + (-0.28298642154)*x_ref[1]**o + (0.764486585746)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.37531462077*x[0]**o + (-0.977275708274)*x[0] + (0.521000632201)*x[1]**o + (-0.148196918501)*x[1]
+        ref[(1, 0, 0, 2)]=-0.37531462077*x_ref[0]**o + (-0.977275708274)*x_ref[0] + (0.521000632201)*x_ref[1]**o + (-0.148196918501)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.126477617257*x[0]**o + (0.658403422334)*x[0] + (0.519389785373)*x[1]**o + (-0.798452300411)*x[1]
+        ref[(1, 0, 1, 0)]=0.126477617257*x_ref[0]**o + (0.658403422334)*x_ref[0] + (0.519389785373)*x_ref[1]**o + (-0.798452300411)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.156559603764*x[0]**o + (0.712111506865)*x[0] + (-0.00992227691681)*x[1]**o + (0.830524253154)*x[1]
+        ref[(1, 0, 1, 1)]=-0.156559603764*x_ref[0]**o + (0.712111506865)*x_ref[0] + (-0.00992227691681)*x_ref[1]**o + (0.830524253154)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.57697487283*x[0]**o + (-0.0823104933633)*x[0] + (-0.347652807175)*x[1]**o + (-0.292088749594)*x[1]
+        ref[(1, 0, 1, 2)]=0.57697487283*x_ref[0]**o + (-0.0823104933633)*x_ref[0] + (-0.347652807175)*x_ref[1]**o + (-0.292088749594)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.170753293648*x[0]**o + (-0.622083706844)*x[0] + (-0.496212749744)*x[1]**o + (-0.924247135872)*x[1]
+        ref[(1, 0, 2, 0)]=0.170753293648*x_ref[0]**o + (-0.622083706844)*x_ref[0] + (-0.496212749744)*x_ref[1]**o + (-0.924247135872)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.403404029845*x[0]**o + (0.676452452127)*x[0] + (0.39423491952)*x[1]**o + (0.269259353594)*x[1]
+        ref[(1, 0, 2, 1)]=0.403404029845*x_ref[0]**o + (0.676452452127)*x_ref[0] + (0.39423491952)*x_ref[1]**o + (0.269259353594)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.933682055735*x[0]**o + (-0.960839847486)*x[0] + (-0.188460800247)*x[1]**o + (-0.103141835162)*x[1]
+        ref[(1, 0, 2, 2)]=0.933682055735*x_ref[0]**o + (-0.960839847486)*x_ref[0] + (-0.188460800247)*x_ref[1]**o + (-0.103141835162)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.0883333296563*x[0]**o + (-0.866603082933)*x[0] + (0.407543615208)*x[1]**o + (-0.978886787859)*x[1]
+        ref[(1, 1, 0, 0)]=-0.0883333296563*x_ref[0]**o + (-0.866603082933)*x_ref[0] + (0.407543615208)*x_ref[1]**o + (-0.978886787859)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.859278004445*x[0]**o + (-0.319429758909)*x[0] + (0.848540123215)*x[1]**o + (0.0405093150298)*x[1]
+        ref[(1, 1, 0, 1)]=-0.859278004445*x_ref[0]**o + (-0.319429758909)*x_ref[0] + (0.848540123215)*x_ref[1]**o + (0.0405093150298)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.736250418779*x[0]**o + (0.873324705433)*x[0] + (0.52370532031)*x[1]**o + (-0.381639068065)*x[1]
+        ref[(1, 1, 0, 2)]=-0.736250418779*x_ref[0]**o + (0.873324705433)*x_ref[0] + (0.52370532031)*x_ref[1]**o + (-0.381639068065)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.323882217259*x[0]**o + (-0.759214405989)*x[0] + (-0.92660839328)*x[1]**o + (-0.0439692380259)*x[1]
+        ref[(1, 1, 1, 0)]=-0.323882217259*x_ref[0]**o + (-0.759214405989)*x_ref[0] + (-0.92660839328)*x_ref[1]**o + (-0.0439692380259)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.238341811297*x[0]**o + (0.842991957693)*x[0] + (-0.63384779835)*x[1]**o + (0.0844701679253)*x[1]
+        ref[(1, 1, 1, 1)]=0.238341811297*x_ref[0]**o + (0.842991957693)*x_ref[0] + (-0.63384779835)*x_ref[1]**o + (0.0844701679253)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.150745864421*x[0]**o + (0.287202120879)*x[0] + (0.0302139544641)*x[1]**o + (-0.257945047719)*x[1]
+        ref[(1, 1, 1, 2)]=-0.150745864421*x_ref[0]**o + (0.287202120879)*x_ref[0] + (0.0302139544641)*x_ref[1]**o + (-0.257945047719)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.037683070699*x[0]**o + (-0.618483144529)*x[0] + (0.255209202925)*x[1]**o + (0.58727096279)*x[1]
+        ref[(1, 1, 2, 0)]=0.037683070699*x_ref[0]**o + (-0.618483144529)*x_ref[0] + (0.255209202925)*x_ref[1]**o + (0.58727096279)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.159698139484*x[0]**o + (-0.370661319296)*x[0] + (-0.310024526545)*x[1]**o + (0.33937796106)*x[1]
+        ref[(1, 1, 2, 1)]=-0.159698139484*x_ref[0]**o + (-0.370661319296)*x_ref[0] + (-0.310024526545)*x_ref[1]**o + (0.33937796106)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.70841543013*x[0]**o + (0.00289216930668)*x[0] + (-0.914929271401)*x[1]**o + (0.0448852917376)*x[1]
+        ref[(1, 1, 2, 2)]=-0.70841543013*x_ref[0]**o + (0.00289216930668)*x_ref[0] + (-0.914929271401)*x_ref[1]**o + (0.0448852917376)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.381109881198*x[0]**o + (0.0303285665504)*x[0] + (-0.0197607133306)*x[1]**o + (0.576967262955)*x[1]
+        ref[(1, 2, 0, 0)]=0.381109881198*x_ref[0]**o + (0.0303285665504)*x_ref[0] + (-0.0197607133306)*x_ref[1]**o + (0.576967262955)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.64618696424*x[0]**o + (0.827085716807)*x[0] + (-0.849191631331)*x[1]**o + (-0.333852755126)*x[1]
+        ref[(1, 2, 0, 1)]=0.64618696424*x_ref[0]**o + (0.827085716807)*x_ref[0] + (-0.849191631331)*x_ref[1]**o + (-0.333852755126)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.0191826824836*x[0]**o + (0.155462198239)*x[0] + (-0.37716463313)*x[1]**o + (0.93590453488)*x[1]
+        ref[(1, 2, 0, 2)]=-0.0191826824836*x_ref[0]**o + (0.155462198239)*x_ref[0] + (-0.37716463313)*x_ref[1]**o + (0.93590453488)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.851349792356*x[0]**o + (0.175030984337)*x[0] + (-0.921932319445)*x[1]**o + (-0.6825766459)*x[1]
+        ref[(1, 2, 1, 0)]=-0.851349792356*x_ref[0]**o + (0.175030984337)*x_ref[0] + (-0.921932319445)*x_ref[1]**o + (-0.6825766459)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.827514663341*x[0]**o + (-0.728572579724)*x[0] + (-0.0447398332396)*x[1]**o + (-0.346225920791)*x[1]
+        ref[(1, 2, 1, 1)]=0.827514663341*x_ref[0]**o + (-0.728572579724)*x_ref[0] + (-0.0447398332396)*x_ref[1]**o + (-0.346225920791)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.557452923226*x[0]**o + (-0.0463377008023)*x[0] + (-0.598655039939)*x[1]**o + (-0.173923136382)*x[1]
+        ref[(1, 2, 1, 2)]=0.557452923226*x_ref[0]**o + (-0.0463377008023)*x_ref[0] + (-0.598655039939)*x_ref[1]**o + (-0.173923136382)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.429161350252*x[0]**o + (-0.288821793932)*x[0] + (0.139079768141)*x[1]**o + (0.397187243959)*x[1]
+        ref[(1, 2, 2, 0)]=0.429161350252*x_ref[0]**o + (-0.288821793932)*x_ref[0] + (0.139079768141)*x_ref[1]**o + (0.397187243959)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.63906141843*x[0]**o + (-0.402237512409)*x[0] + (-0.686521437967)*x[1]**o + (-0.666501154942)*x[1]
+        ref[(1, 2, 2, 1)]=-0.63906141843*x_ref[0]**o + (-0.402237512409)*x_ref[0] + (-0.686521437967)*x_ref[1]**o + (-0.666501154942)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.724037506941*x[0]**o + (0.219605781833)*x[0] + (0.863277154228)*x[1]**o + (-0.636633640894)*x[1]
+        ref[(1, 2, 2, 2)]=-0.724037506941*x_ref[0]**o + (0.219605781833)*x_ref[0] + (0.863277154228)*x_ref[1]**o + (-0.636633640894)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.199894120752*x[2]**o + (0.417499923763)*x[2]
+            ref[(0, 0, 0, 0)]+=0.199894120752*x_ref[2]**o + (0.417499923763)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.856277958595*x[2]**o + (-0.929689498717)*x[2]
+            ref[(0, 0, 0, 1)]+=0.856277958595*x_ref[2]**o + (-0.929689498717)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.810238587935*x[2]**o + (0.571154994169)*x[2]
+            ref[(0, 0, 0, 2)]+=0.810238587935*x_ref[2]**o + (0.571154994169)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.963697707002*x[2]**o + (0.850180625716)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.963697707002*x_ref[2]**o + (0.850180625716)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.31556660874*x[2]**o + (-0.781451658477)*x[2]
+            ref[(0, 0, 1, 1)]+=0.31556660874*x_ref[2]**o + (-0.781451658477)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.630623550946*x[2]**o + (0.751431084799)*x[2]
+            ref[(0, 0, 1, 2)]+=0.630623550946*x_ref[2]**o + (0.751431084799)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.760451639364*x[2]**o + (0.000752210736331)*x[2]
+            ref[(0, 0, 2, 0)]+=0.760451639364*x_ref[2]**o + (0.000752210736331)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.289628572774*x[2]**o + (-0.967889783853)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.289628572774*x_ref[2]**o + (-0.967889783853)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.821623796159*x[2]**o + (-0.418705753974)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.821623796159*x_ref[2]**o + (-0.418705753974)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.441656689716*x[2]**o + (0.213232663949)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.441656689716*x_ref[2]**o + (0.213232663949)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.747286298293*x[2]**o + (0.484839053698)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.747286298293*x_ref[2]**o + (0.484839053698)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.547140812909*x[2]**o + (-0.150157257726)*x[2]
+            ref[(0, 1, 0, 2)]+=0.547140812909*x_ref[2]**o + (-0.150157257726)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.907046392918*x[2]**o + (-0.148214592729)*x[2]
+            ref[(0, 1, 1, 0)]+=0.907046392918*x_ref[2]**o + (-0.148214592729)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.521873275556*x[2]**o + (-0.66509876086)*x[2]
+            ref[(0, 1, 1, 1)]+=0.521873275556*x_ref[2]**o + (-0.66509876086)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.346464008308*x[2]**o + (-0.602940477323)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.346464008308*x_ref[2]**o + (-0.602940477323)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.553582886883*x[2]**o + (0.890255600719)*x[2]
+            ref[(0, 1, 2, 0)]+=0.553582886883*x_ref[2]**o + (0.890255600719)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.867364310091*x[2]**o + (-0.0888887506873)*x[2]
+            ref[(0, 1, 2, 1)]+=0.867364310091*x_ref[2]**o + (-0.0888887506873)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.799430942398*x[2]**o + (-0.985852375285)*x[2]
+            ref[(0, 1, 2, 2)]+=0.799430942398*x_ref[2]**o + (-0.985852375285)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.382030087462*x[2]**o + (-0.770753156973)*x[2]
+            ref[(0, 2, 0, 0)]+=0.382030087462*x_ref[2]**o + (-0.770753156973)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.995741248033*x[2]**o + (-0.0296301398253)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.995741248033*x_ref[2]**o + (-0.0296301398253)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.228513727431*x[2]**o + (0.0307336239619)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.228513727431*x_ref[2]**o + (0.0307336239619)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.298689564496*x[2]**o + (0.97062479616)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.298689564496*x_ref[2]**o + (0.97062479616)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.169426061382*x[2]**o + (0.133244667844)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.169426061382*x_ref[2]**o + (0.133244667844)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.454136141653*x[2]**o + (0.0713356195627)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.454136141653*x_ref[2]**o + (0.0713356195627)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.583899883641*x[2]**o + (-0.980196142024)*x[2]
+            ref[(0, 2, 2, 0)]+=0.583899883641*x_ref[2]**o + (-0.980196142024)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.323683970812*x[2]**o + (0.594849993759)*x[2]
+            ref[(0, 2, 2, 1)]+=0.323683970812*x_ref[2]**o + (0.594849993759)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.432116209484*x[2]**o + (-0.625206165519)*x[2]
+            ref[(0, 2, 2, 2)]+=0.432116209484*x_ref[2]**o + (-0.625206165519)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.468340078985*x[2]**o + (0.53637487315)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.468340078985*x_ref[2]**o + (0.53637487315)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.507762458726*x[2]**o + (0.596814226364)*x[2]
+            ref[(1, 0, 0, 1)]+=0.507762458726*x_ref[2]**o + (0.596814226364)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.154610253429*x[2]**o + (-0.257669787124)*x[2]
+            ref[(1, 0, 0, 2)]+=0.154610253429*x_ref[2]**o + (-0.257669787124)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.33620611764*x[2]**o + (-0.296212638591)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.33620611764*x_ref[2]**o + (-0.296212638591)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.246294140534*x[2]**o + (-0.00895698621364)*x[2]
+            ref[(1, 0, 1, 1)]+=0.246294140534*x_ref[2]**o + (-0.00895698621364)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.655330084881*x[2]**o + (-0.165740543883)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.655330084881*x_ref[2]**o + (-0.165740543883)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.121051630393*x[2]**o + (-0.939814730983)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.121051630393*x_ref[2]**o + (-0.939814730983)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.165540850878*x[2]**o + (-0.618659014366)*x[2]
+            ref[(1, 0, 2, 1)]+=0.165540850878*x_ref[2]**o + (-0.618659014366)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.632990828184*x[2]**o + (0.170323985745)*x[2]
+            ref[(1, 0, 2, 2)]+=0.632990828184*x_ref[2]**o + (0.170323985745)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.343017737917*x[2]**o + (0.247181725158)*x[2]
+            ref[(1, 1, 0, 0)]+=0.343017737917*x_ref[2]**o + (0.247181725158)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.407372848755*x[2]**o + (0.930165714094)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.407372848755*x_ref[2]**o + (0.930165714094)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.713782872968*x[2]**o + (0.807458913001)*x[2]
+            ref[(1, 1, 0, 2)]+=0.713782872968*x_ref[2]**o + (0.807458913001)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.645496416049*x[2]**o + (-0.482616275088)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.645496416049*x_ref[2]**o + (-0.482616275088)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.637374428066*x[2]**o + (-0.305185345996)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.637374428066*x_ref[2]**o + (-0.305185345996)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.0405850036216*x[2]**o + (0.119065388506)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.0405850036216*x_ref[2]**o + (0.119065388506)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.887032658177*x[2]**o + (0.788222893128)*x[2]
+            ref[(1, 1, 2, 0)]+=0.887032658177*x_ref[2]**o + (0.788222893128)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.298070058117*x[2]**o + (-0.961456680369)*x[2]
+            ref[(1, 1, 2, 1)]+=0.298070058117*x_ref[2]**o + (-0.961456680369)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.27071378921*x[2]**o + (-0.0476503015146)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.27071378921*x_ref[2]**o + (-0.0476503015146)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.808109910276*x[2]**o + (-0.218949097401)*x[2]
+            ref[(1, 2, 0, 0)]+=0.808109910276*x_ref[2]**o + (-0.218949097401)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.85753347982*x[2]**o + (-0.897261134986)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.85753347982*x_ref[2]**o + (-0.897261134986)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.13014533527*x[2]**o + (-0.597892704282)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.13014533527*x_ref[2]**o + (-0.597892704282)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.499905979046*x[2]**o + (0.233688371087)*x[2]
+            ref[(1, 2, 1, 0)]+=0.499905979046*x_ref[2]**o + (0.233688371087)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.850704242993*x[2]**o + (0.918438660468)*x[2]
+            ref[(1, 2, 1, 1)]+=0.850704242993*x_ref[2]**o + (0.918438660468)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.103864330163*x[2]**o + (-0.11137185849)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.103864330163*x_ref[2]**o + (-0.11137185849)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.616355187185*x[2]**o + (0.188027887076)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.616355187185*x_ref[2]**o + (0.188027887076)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=0.861143854642*x[2]**o + (-0.959121450004)*x[2]
+            ref[(1, 2, 2, 1)]+=0.861143854642*x_ref[2]**o + (-0.959121450004)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=-0.106510654481*x[2]**o + (0.103920815813)*x[2]
+            ref[(1, 2, 2, 2)]+=-0.106510654481*x_ref[2]**o + (0.103920815813)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.202545265026*x[0]**o + (-0.645920024483)*x[0] + (0.560703115909)*x[1]**o + (0.464649461025)*x[1]
+        ref=0.202545265026*x_ref[0]**o + (-0.645920024483)*x_ref[0] + (0.560703115909)*x_ref[1]**o + (0.464649461025)*x_ref[1]
+        if dim==3:
+            arg+=(0.855226414599)*x[2]**o + (0.00195475618557)*x[2]
+            ref+=(0.855226414599)*x_ref[2]**o + (0.00195475618557)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.947403036192*x[0]**o + (-0.363202831973)*x[0] + (0.8314475876)*x[1]**o + (-0.51745996268)*x[1]
+        ref[(0,)]=0.947403036192*x_ref[0]**o + (-0.363202831973)*x_ref[0] + (0.8314475876)*x_ref[1]**o + (-0.51745996268)*x_ref[1]
+        arg[(1,)]=0.43775186044*x[0]**o + (0.689242980122)*x[0] + (-0.633465207146)*x[1]**o + (0.528906070475)*x[1]
+        ref[(1,)]=0.43775186044*x_ref[0]**o + (0.689242980122)*x_ref[0] + (-0.633465207146)*x_ref[1]**o + (0.528906070475)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.226734581557*x[2]**o + (0.850187939607)*x[2]
+            ref[(0,)]+=-0.226734581557*x_ref[2]**o + (0.850187939607)*x_ref[2]
+            arg[(1,)]+=0.62034441503*x[2]**o + (0.53102916869)*x[2]
+            ref[(1,)]+=0.62034441503*x_ref[2]**o + (0.53102916869)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2),w_ref)
+        arg[(0, 0)]=-0.174328133175*x[0]**o + (-0.520272780878)*x[0] + (-0.61442883775)*x[1]**o + (0.717922478747)*x[1]
+        ref[(0, 0)]=-0.174328133175*x_ref[0]**o + (-0.520272780878)*x_ref[0] + (-0.61442883775)*x_ref[1]**o + (0.717922478747)*x_ref[1]
+        arg[(0, 1)]=0.00265537344887*x[0]**o + (-0.741609493496)*x[0] + (-0.116617299032)*x[1]**o + (-0.776632792379)*x[1]
+        ref[(0, 1)]=0.00265537344887*x_ref[0]**o + (-0.741609493496)*x_ref[0] + (-0.116617299032)*x_ref[1]**o + (-0.776632792379)*x_ref[1]
+        arg[(1, 0)]=-0.291776896661*x[0]**o + (0.128047791931)*x[0] + (0.098580124171)*x[1]**o + (0.491242770131)*x[1]
+        ref[(1, 0)]=-0.291776896661*x_ref[0]**o + (0.128047791931)*x_ref[0] + (0.098580124171)*x_ref[1]**o + (0.491242770131)*x_ref[1]
+        arg[(1, 1)]=0.974408257145*x[0]**o + (0.098577556906)*x[0] + (-0.831678636922)*x[1]**o + (0.565666166956)*x[1]
+        ref[(1, 1)]=0.974408257145*x_ref[0]**o + (0.098577556906)*x_ref[0] + (-0.831678636922)*x_ref[1]**o + (0.565666166956)*x_ref[1]
+        arg[(2, 0)]=-0.979952388031*x[0]**o + (0.964283170325)*x[0] + (0.348736049567)*x[1]**o + (0.463815350062)*x[1]
+        ref[(2, 0)]=-0.979952388031*x_ref[0]**o + (0.964283170325)*x_ref[0] + (0.348736049567)*x_ref[1]**o + (0.463815350062)*x_ref[1]
+        arg[(2, 1)]=0.545791857694*x[0]**o + (-0.826273120886)*x[0] + (0.37539417297)*x[1]**o + (-0.113040549472)*x[1]
+        ref[(2, 1)]=0.545791857694*x_ref[0]**o + (-0.826273120886)*x_ref[0] + (0.37539417297)*x_ref[1]**o + (-0.113040549472)*x_ref[1]
+        arg[(3, 0)]=-0.623665744911*x[0]**o + (0.913807214752)*x[0] + (-0.193121287399)*x[1]**o + (0.589342657197)*x[1]
+        ref[(3, 0)]=-0.623665744911*x_ref[0]**o + (0.913807214752)*x_ref[0] + (-0.193121287399)*x_ref[1]**o + (0.589342657197)*x_ref[1]
+        arg[(3, 1)]=0.876782468632*x[0]**o + (-0.775443660801)*x[0] + (0.554397596419)*x[1]**o + (-0.0894101575138)*x[1]
+        ref[(3, 1)]=0.876782468632*x_ref[0]**o + (-0.775443660801)*x_ref[0] + (0.554397596419)*x_ref[1]**o + (-0.0894101575138)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.62411319578*x[2]**o + (-0.597682132193)*x[2]
+            ref[(0, 0)]+=-0.62411319578*x_ref[2]**o + (-0.597682132193)*x_ref[2]
+            arg[(0, 1)]+=0.755667721282*x[2]**o + (0.435883193404)*x[2]
+            ref[(0, 1)]+=0.755667721282*x_ref[2]**o + (0.435883193404)*x_ref[2]
+            arg[(1, 0)]+=0.428630819972*x[2]**o + (0.259874627843)*x[2]
+            ref[(1, 0)]+=0.428630819972*x_ref[2]**o + (0.259874627843)*x_ref[2]
+            arg[(1, 1)]+=-0.856927229485*x[2]**o + (-0.741044685622)*x[2]
+            ref[(1, 1)]+=-0.856927229485*x_ref[2]**o + (-0.741044685622)*x_ref[2]
+            arg[(2, 0)]+=0.696144554163*x[2]**o + (0.00358081307238)*x[2]
+            ref[(2, 0)]+=0.696144554163*x_ref[2]**o + (0.00358081307238)*x_ref[2]
+            arg[(2, 1)]+=-0.815898931067*x[2]**o + (0.591527021174)*x[2]
+            ref[(2, 1)]+=-0.815898931067*x_ref[2]**o + (0.591527021174)*x_ref[2]
+            arg[(3, 0)]+=-0.298348718516*x[2]**o + (0.796111721302)*x[2]
+            ref[(3, 0)]+=-0.298348718516*x_ref[2]**o + (0.796111721302)*x_ref[2]
+            arg[(3, 1)]+=0.699386825908*x[2]**o + (0.033374342656)*x[2]
+            ref[(3, 1)]+=0.699386825908*x_ref[2]**o + (0.033374342656)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=0.811955431616*x[0]**o + (-0.996810243505)*x[0] + (0.762842821373)*x[1]**o + (0.717219341766)*x[1]
+        ref[(0, 0, 0)]=0.811955431616*x_ref[0]**o + (-0.996810243505)*x_ref[0] + (0.762842821373)*x_ref[1]**o + (0.717219341766)*x_ref[1]
+        arg[(0, 0, 1)]=0.801199424634*x[0]**o + (-0.123470379454)*x[0] + (-0.774144090966)*x[1]**o + (0.259873432676)*x[1]
+        ref[(0, 0, 1)]=0.801199424634*x_ref[0]**o + (-0.123470379454)*x_ref[0] + (-0.774144090966)*x_ref[1]**o + (0.259873432676)*x_ref[1]
+        arg[(0, 0, 2)]=-0.302459971278*x[0]**o + (0.189663583644)*x[0] + (0.679885088366)*x[1]**o + (-0.818034777378)*x[1]
+        ref[(0, 0, 2)]=-0.302459971278*x_ref[0]**o + (0.189663583644)*x_ref[0] + (0.679885088366)*x_ref[1]**o + (-0.818034777378)*x_ref[1]
+        arg[(0, 1, 0)]=0.907056968842*x[0]**o + (0.278330244241)*x[0] + (-0.543985712805)*x[1]**o + (0.783367298538)*x[1]
+        ref[(0, 1, 0)]=0.907056968842*x_ref[0]**o + (0.278330244241)*x_ref[0] + (-0.543985712805)*x_ref[1]**o + (0.783367298538)*x_ref[1]
+        arg[(0, 1, 1)]=-0.769635301099*x[0]**o + (-0.170639848894)*x[0] + (0.447918560252)*x[1]**o + (-0.759499440966)*x[1]
+        ref[(0, 1, 1)]=-0.769635301099*x_ref[0]**o + (-0.170639848894)*x_ref[0] + (0.447918560252)*x_ref[1]**o + (-0.759499440966)*x_ref[1]
+        arg[(0, 1, 2)]=-0.178272334891*x[0]**o + (0.320339622351)*x[0] + (-0.310003653639)*x[1]**o + (-0.851138988389)*x[1]
+        ref[(0, 1, 2)]=-0.178272334891*x_ref[0]**o + (0.320339622351)*x_ref[0] + (-0.310003653639)*x_ref[1]**o + (-0.851138988389)*x_ref[1]
+        arg[(1, 0, 0)]=0.929304442218*x[0]**o + (0.716099665997)*x[0] + (-0.799902956509)*x[1]**o + (0.238780002127)*x[1]
+        ref[(1, 0, 0)]=0.929304442218*x_ref[0]**o + (0.716099665997)*x_ref[0] + (-0.799902956509)*x_ref[1]**o + (0.238780002127)*x_ref[1]
+        arg[(1, 0, 1)]=-0.683676929852*x[0]**o + (-0.94598116578)*x[0] + (0.47563869136)*x[1]**o + (0.664438144168)*x[1]
+        ref[(1, 0, 1)]=-0.683676929852*x_ref[0]**o + (-0.94598116578)*x_ref[0] + (0.47563869136)*x_ref[1]**o + (0.664438144168)*x_ref[1]
+        arg[(1, 0, 2)]=-0.325471198208*x[0]**o + (-0.166444301662)*x[0] + (0.629886337213)*x[1]**o + (-0.626989223964)*x[1]
+        ref[(1, 0, 2)]=-0.325471198208*x_ref[0]**o + (-0.166444301662)*x_ref[0] + (0.629886337213)*x_ref[1]**o + (-0.626989223964)*x_ref[1]
+        arg[(1, 1, 0)]=0.868313201619*x[0]**o + (-0.481040242626)*x[0] + (0.106571043739)*x[1]**o + (-0.79669502338)*x[1]
+        ref[(1, 1, 0)]=0.868313201619*x_ref[0]**o + (-0.481040242626)*x_ref[0] + (0.106571043739)*x_ref[1]**o + (-0.79669502338)*x_ref[1]
+        arg[(1, 1, 1)]=0.368488439996*x[0]**o + (0.167657148533)*x[0] + (-0.874364049863)*x[1]**o + (0.243651879802)*x[1]
+        ref[(1, 1, 1)]=0.368488439996*x_ref[0]**o + (0.167657148533)*x_ref[0] + (-0.874364049863)*x_ref[1]**o + (0.243651879802)*x_ref[1]
+        arg[(1, 1, 2)]=-0.247765647099*x[0]**o + (0.0348080209309)*x[0] + (0.415733716203)*x[1]**o + (0.471281858101)*x[1]
+        ref[(1, 1, 2)]=-0.247765647099*x_ref[0]**o + (0.0348080209309)*x_ref[0] + (0.415733716203)*x_ref[1]**o + (0.471281858101)*x_ref[1]
+        arg[(2, 0, 0)]=-0.176069229625*x[0]**o + (-0.140994390176)*x[0] + (-0.484616408918)*x[1]**o + (0.244492311634)*x[1]
+        ref[(2, 0, 0)]=-0.176069229625*x_ref[0]**o + (-0.140994390176)*x_ref[0] + (-0.484616408918)*x_ref[1]**o + (0.244492311634)*x_ref[1]
+        arg[(2, 0, 1)]=0.290662072369*x[0]**o + (-0.833744196414)*x[0] + (-0.628212929878)*x[1]**o + (0.384263255565)*x[1]
+        ref[(2, 0, 1)]=0.290662072369*x_ref[0]**o + (-0.833744196414)*x_ref[0] + (-0.628212929878)*x_ref[1]**o + (0.384263255565)*x_ref[1]
+        arg[(2, 0, 2)]=-0.139589971371*x[0]**o + (-0.296152037369)*x[0] + (0.0012260195863)*x[1]**o + (-0.723576015867)*x[1]
+        ref[(2, 0, 2)]=-0.139589971371*x_ref[0]**o + (-0.296152037369)*x_ref[0] + (0.0012260195863)*x_ref[1]**o + (-0.723576015867)*x_ref[1]
+        arg[(2, 1, 0)]=0.291516380314*x[0]**o + (-0.896221223563)*x[0] + (-0.872449780252)*x[1]**o + (-0.630862651468)*x[1]
+        ref[(2, 1, 0)]=0.291516380314*x_ref[0]**o + (-0.896221223563)*x_ref[0] + (-0.872449780252)*x_ref[1]**o + (-0.630862651468)*x_ref[1]
+        arg[(2, 1, 1)]=-0.208576099656*x[0]**o + (0.644495746893)*x[0] + (-0.483386764222)*x[1]**o + (0.155467110431)*x[1]
+        ref[(2, 1, 1)]=-0.208576099656*x_ref[0]**o + (0.644495746893)*x_ref[0] + (-0.483386764222)*x_ref[1]**o + (0.155467110431)*x_ref[1]
+        arg[(2, 1, 2)]=-0.782082245529*x[0]**o + (0.486684792962)*x[0] + (0.621788411678)*x[1]**o + (0.665980407111)*x[1]
+        ref[(2, 1, 2)]=-0.782082245529*x_ref[0]**o + (0.486684792962)*x_ref[0] + (0.621788411678)*x_ref[1]**o + (0.665980407111)*x_ref[1]
+        arg[(3, 0, 0)]=0.646712532223*x[0]**o + (-0.506189399533)*x[0] + (0.247246751692)*x[1]**o + (0.572622699945)*x[1]
+        ref[(3, 0, 0)]=0.646712532223*x_ref[0]**o + (-0.506189399533)*x_ref[0] + (0.247246751692)*x_ref[1]**o + (0.572622699945)*x_ref[1]
+        arg[(3, 0, 1)]=-0.0725498206849*x[0]**o + (0.678363011679)*x[0] + (0.0582431935287)*x[1]**o + (0.244804050565)*x[1]
+        ref[(3, 0, 1)]=-0.0725498206849*x_ref[0]**o + (0.678363011679)*x_ref[0] + (0.0582431935287)*x_ref[1]**o + (0.244804050565)*x_ref[1]
+        arg[(3, 0, 2)]=0.882952734454*x[0]**o + (0.880919700335)*x[0] + (0.723654732087)*x[1]**o + (0.575190173974)*x[1]
+        ref[(3, 0, 2)]=0.882952734454*x_ref[0]**o + (0.880919700335)*x_ref[0] + (0.723654732087)*x_ref[1]**o + (0.575190173974)*x_ref[1]
+        arg[(3, 1, 0)]=-0.258472239042*x[0]**o + (0.149105438864)*x[0] + (-0.765447522887)*x[1]**o + (0.683293894146)*x[1]
+        ref[(3, 1, 0)]=-0.258472239042*x_ref[0]**o + (0.149105438864)*x_ref[0] + (-0.765447522887)*x_ref[1]**o + (0.683293894146)*x_ref[1]
+        arg[(3, 1, 1)]=-0.787021224468*x[0]**o + (-0.440735378266)*x[0] + (0.553067147818)*x[1]**o + (-0.974525598134)*x[1]
+        ref[(3, 1, 1)]=-0.787021224468*x_ref[0]**o + (-0.440735378266)*x_ref[0] + (0.553067147818)*x_ref[1]**o + (-0.974525598134)*x_ref[1]
+        arg[(3, 1, 2)]=-0.107825235975*x[0]**o + (-0.286475875875)*x[0] + (0.193862850278)*x[1]**o + (0.709081975108)*x[1]
+        ref[(3, 1, 2)]=-0.107825235975*x_ref[0]**o + (-0.286475875875)*x_ref[0] + (0.193862850278)*x_ref[1]**o + (0.709081975108)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.0229899919428*x[2]**o + (-0.656966914133)*x[2]
+            ref[(0, 0, 0)]+=0.0229899919428*x_ref[2]**o + (-0.656966914133)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.340537526054*x[2]**o + (0.893593838041)*x[2]
+            ref[(0, 0, 1)]+=-0.340537526054*x_ref[2]**o + (0.893593838041)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.14776250971*x[2]**o + (0.12788195366)*x[2]
+            ref[(0, 0, 2)]+=-0.14776250971*x_ref[2]**o + (0.12788195366)*x_ref[2]
+            arg[(0, 1, 0)]+=0.349152496008*x[2]**o + (0.21385847329)*x[2]
+            ref[(0, 1, 0)]+=0.349152496008*x_ref[2]**o + (0.21385847329)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.843643505125*x[2]**o + (-0.686703813996)*x[2]
+            ref[(0, 1, 1)]+=-0.843643505125*x_ref[2]**o + (-0.686703813996)*x_ref[2]
+            arg[(0, 1, 2)]+=0.10575265478*x[2]**o + (0.991596130501)*x[2]
+            ref[(0, 1, 2)]+=0.10575265478*x_ref[2]**o + (0.991596130501)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.652244546623*x[2]**o + (-0.51555016285)*x[2]
+            ref[(1, 0, 0)]+=-0.652244546623*x_ref[2]**o + (-0.51555016285)*x_ref[2]
+            arg[(1, 0, 1)]+=0.555101106712*x[2]**o + (-0.424015043894)*x[2]
+            ref[(1, 0, 1)]+=0.555101106712*x_ref[2]**o + (-0.424015043894)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.513891710292*x[2]**o + (0.151648188043)*x[2]
+            ref[(1, 0, 2)]+=-0.513891710292*x_ref[2]**o + (0.151648188043)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.906063533098*x[2]**o + (0.737942906537)*x[2]
+            ref[(1, 1, 0)]+=-0.906063533098*x_ref[2]**o + (0.737942906537)*x_ref[2]
+            arg[(1, 1, 1)]+=0.399686953522*x[2]**o + (0.604301298925)*x[2]
+            ref[(1, 1, 1)]+=0.399686953522*x_ref[2]**o + (0.604301298925)*x_ref[2]
+            arg[(1, 1, 2)]+=0.588505949252*x[2]**o + (0.519636765982)*x[2]
+            ref[(1, 1, 2)]+=0.588505949252*x_ref[2]**o + (0.519636765982)*x_ref[2]
+            arg[(2, 0, 0)]+=0.168720060194*x[2]**o + (-0.312398875186)*x[2]
+            ref[(2, 0, 0)]+=0.168720060194*x_ref[2]**o + (-0.312398875186)*x_ref[2]
+            arg[(2, 0, 1)]+=0.312503595478*x[2]**o + (0.725260295873)*x[2]
+            ref[(2, 0, 1)]+=0.312503595478*x_ref[2]**o + (0.725260295873)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.945173199286*x[2]**o + (-0.139464427179)*x[2]
+            ref[(2, 0, 2)]+=-0.945173199286*x_ref[2]**o + (-0.139464427179)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.523003846683*x[2]**o + (0.103877003533)*x[2]
+            ref[(2, 1, 0)]+=-0.523003846683*x_ref[2]**o + (0.103877003533)*x_ref[2]
+            arg[(2, 1, 1)]+=-0.0691488776653*x[2]**o + (0.910248780413)*x[2]
+            ref[(2, 1, 1)]+=-0.0691488776653*x_ref[2]**o + (0.910248780413)*x_ref[2]
+            arg[(2, 1, 2)]+=0.194995401199*x[2]**o + (-0.816489314086)*x[2]
+            ref[(2, 1, 2)]+=0.194995401199*x_ref[2]**o + (-0.816489314086)*x_ref[2]
+            arg[(3, 0, 0)]+=0.367499901321*x[2]**o + (-0.18007124238)*x[2]
+            ref[(3, 0, 0)]+=0.367499901321*x_ref[2]**o + (-0.18007124238)*x_ref[2]
+            arg[(3, 0, 1)]+=0.452928353132*x[2]**o + (-0.568236355049)*x[2]
+            ref[(3, 0, 1)]+=0.452928353132*x_ref[2]**o + (-0.568236355049)*x_ref[2]
+            arg[(3, 0, 2)]+=-0.694232320067*x[2]**o + (-0.644371589182)*x[2]
+            ref[(3, 0, 2)]+=-0.694232320067*x_ref[2]**o + (-0.644371589182)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.0393969133569*x[2]**o + (-0.384020293274)*x[2]
+            ref[(3, 1, 0)]+=-0.0393969133569*x_ref[2]**o + (-0.384020293274)*x_ref[2]
+            arg[(3, 1, 1)]+=0.216820367221*x[2]**o + (-0.633477007543)*x[2]
+            ref[(3, 1, 1)]+=0.216820367221*x_ref[2]**o + (-0.633477007543)*x_ref[2]
+            arg[(3, 1, 2)]+=0.788623538086*x[2]**o + (0.637338609648)*x[2]
+            ref[(3, 1, 2)]+=0.788623538086*x_ref[2]**o + (0.637338609648)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3, 4),w)
+        ref = Data(0,(3, 4, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.203967237012*x[0]**o + (-0.0635642570114)*x[0] + (0.352008426547)*x[1]**o + (-0.430197435322)*x[1]
+        ref[(0, 0, 0, 0)]=0.203967237012*x_ref[0]**o + (-0.0635642570114)*x_ref[0] + (0.352008426547)*x_ref[1]**o + (-0.430197435322)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.673960490667*x[0]**o + (-0.179253466368)*x[0] + (-0.658864571592)*x[1]**o + (-0.942973221595)*x[1]
+        ref[(0, 0, 0, 1)]=0.673960490667*x_ref[0]**o + (-0.179253466368)*x_ref[0] + (-0.658864571592)*x_ref[1]**o + (-0.942973221595)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.584868943795*x[0]**o + (0.104510151558)*x[0] + (0.532187920772)*x[1]**o + (-0.61369316821)*x[1]
+        ref[(0, 0, 0, 2)]=-0.584868943795*x_ref[0]**o + (0.104510151558)*x_ref[0] + (0.532187920772)*x_ref[1]**o + (-0.61369316821)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.352820744279*x[0]**o + (-0.698084536073)*x[0] + (-0.0300144249214)*x[1]**o + (0.400730653675)*x[1]
+        ref[(0, 0, 0, 3)]=0.352820744279*x_ref[0]**o + (-0.698084536073)*x_ref[0] + (-0.0300144249214)*x_ref[1]**o + (0.400730653675)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.573066360467*x[0]**o + (0.724280866892)*x[0] + (-0.262464755625)*x[1]**o + (-0.94718432553)*x[1]
+        ref[(0, 0, 1, 0)]=0.573066360467*x_ref[0]**o + (0.724280866892)*x_ref[0] + (-0.262464755625)*x_ref[1]**o + (-0.94718432553)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.142278698957*x[0]**o + (-0.832084561706)*x[0] + (-0.332497890553)*x[1]**o + (-0.487267941725)*x[1]
+        ref[(0, 0, 1, 1)]=-0.142278698957*x_ref[0]**o + (-0.832084561706)*x_ref[0] + (-0.332497890553)*x_ref[1]**o + (-0.487267941725)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.667487552877*x[0]**o + (-0.217825563385)*x[0] + (0.843485361133)*x[1]**o + (-0.0272796569331)*x[1]
+        ref[(0, 0, 1, 2)]=-0.667487552877*x_ref[0]**o + (-0.217825563385)*x_ref[0] + (0.843485361133)*x_ref[1]**o + (-0.0272796569331)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.224472172913*x[0]**o + (0.332618927013)*x[0] + (0.0663344972952)*x[1]**o + (0.814827895348)*x[1]
+        ref[(0, 0, 1, 3)]=-0.224472172913*x_ref[0]**o + (0.332618927013)*x_ref[0] + (0.0663344972952)*x_ref[1]**o + (0.814827895348)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.294934842389*x[0]**o + (-0.750044028962)*x[0] + (0.125291188833)*x[1]**o + (-0.447284883137)*x[1]
+        ref[(0, 0, 2, 0)]=0.294934842389*x_ref[0]**o + (-0.750044028962)*x_ref[0] + (0.125291188833)*x_ref[1]**o + (-0.447284883137)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.862917102212*x[0]**o + (0.584314795076)*x[0] + (0.297292917773)*x[1]**o + (-0.925117180608)*x[1]
+        ref[(0, 0, 2, 1)]=-0.862917102212*x_ref[0]**o + (0.584314795076)*x_ref[0] + (0.297292917773)*x_ref[1]**o + (-0.925117180608)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.836864000638*x[0]**o + (-0.895563949549)*x[0] + (0.964353979843)*x[1]**o + (0.817125954067)*x[1]
+        ref[(0, 0, 2, 2)]=0.836864000638*x_ref[0]**o + (-0.895563949549)*x_ref[0] + (0.964353979843)*x_ref[1]**o + (0.817125954067)*x_ref[1]
+        arg[(0, 0, 2, 3)]=0.958642529577*x[0]**o + (0.201375574887)*x[0] + (0.01409320008)*x[1]**o + (0.896368622507)*x[1]
+        ref[(0, 0, 2, 3)]=0.958642529577*x_ref[0]**o + (0.201375574887)*x_ref[0] + (0.01409320008)*x_ref[1]**o + (0.896368622507)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.909933443546*x[0]**o + (-0.56881265836)*x[0] + (-0.993258819476)*x[1]**o + (0.134608253795)*x[1]
+        ref[(0, 1, 0, 0)]=-0.909933443546*x_ref[0]**o + (-0.56881265836)*x_ref[0] + (-0.993258819476)*x_ref[1]**o + (0.134608253795)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.852818571654*x[0]**o + (-0.965292734598)*x[0] + (-0.0506307569623)*x[1]**o + (0.596160668723)*x[1]
+        ref[(0, 1, 0, 1)]=0.852818571654*x_ref[0]**o + (-0.965292734598)*x_ref[0] + (-0.0506307569623)*x_ref[1]**o + (0.596160668723)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.920012885528*x[0]**o + (-0.738636155336)*x[0] + (0.177599715619)*x[1]**o + (-0.850920399098)*x[1]
+        ref[(0, 1, 0, 2)]=0.920012885528*x_ref[0]**o + (-0.738636155336)*x_ref[0] + (0.177599715619)*x_ref[1]**o + (-0.850920399098)*x_ref[1]
+        arg[(0, 1, 0, 3)]=-0.00575314226539*x[0]**o + (0.770195092185)*x[0] + (0.995578970844)*x[1]**o + (-0.110991304873)*x[1]
+        ref[(0, 1, 0, 3)]=-0.00575314226539*x_ref[0]**o + (0.770195092185)*x_ref[0] + (0.995578970844)*x_ref[1]**o + (-0.110991304873)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.691520694778*x[0]**o + (-0.918596794638)*x[0] + (0.456860948381)*x[1]**o + (-0.723141648945)*x[1]
+        ref[(0, 1, 1, 0)]=0.691520694778*x_ref[0]**o + (-0.918596794638)*x_ref[0] + (0.456860948381)*x_ref[1]**o + (-0.723141648945)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.723400193208*x[0]**o + (-0.308681354869)*x[0] + (-0.868199562627)*x[1]**o + (0.879299010437)*x[1]
+        ref[(0, 1, 1, 1)]=-0.723400193208*x_ref[0]**o + (-0.308681354869)*x_ref[0] + (-0.868199562627)*x_ref[1]**o + (0.879299010437)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.835668408599*x[0]**o + (-0.110942276145)*x[0] + (0.65742046962)*x[1]**o + (-0.709568805132)*x[1]
+        ref[(0, 1, 1, 2)]=0.835668408599*x_ref[0]**o + (-0.110942276145)*x_ref[0] + (0.65742046962)*x_ref[1]**o + (-0.709568805132)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.103909196661*x[0]**o + (-0.622188091202)*x[0] + (-0.551957173207)*x[1]**o + (0.16200144244)*x[1]
+        ref[(0, 1, 1, 3)]=-0.103909196661*x_ref[0]**o + (-0.622188091202)*x_ref[0] + (-0.551957173207)*x_ref[1]**o + (0.16200144244)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.704726642321*x[0]**o + (-0.917339074126)*x[0] + (-0.0878736829479)*x[1]**o + (-0.100500475442)*x[1]
+        ref[(0, 1, 2, 0)]=-0.704726642321*x_ref[0]**o + (-0.917339074126)*x_ref[0] + (-0.0878736829479)*x_ref[1]**o + (-0.100500475442)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.538162683594*x[0]**o + (-0.13982687038)*x[0] + (0.419221288788)*x[1]**o + (0.68407252759)*x[1]
+        ref[(0, 1, 2, 1)]=-0.538162683594*x_ref[0]**o + (-0.13982687038)*x_ref[0] + (0.419221288788)*x_ref[1]**o + (0.68407252759)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.99493358237*x[0]**o + (0.948964587168)*x[0] + (0.132716706744)*x[1]**o + (-0.270926751558)*x[1]
+        ref[(0, 1, 2, 2)]=0.99493358237*x_ref[0]**o + (0.948964587168)*x_ref[0] + (0.132716706744)*x_ref[1]**o + (-0.270926751558)*x_ref[1]
+        arg[(0, 1, 2, 3)]=0.740913208176*x[0]**o + (0.876736053965)*x[0] + (-0.888036051783)*x[1]**o + (-0.426464226062)*x[1]
+        ref[(0, 1, 2, 3)]=0.740913208176*x_ref[0]**o + (0.876736053965)*x_ref[0] + (-0.888036051783)*x_ref[1]**o + (-0.426464226062)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.726789809617*x[0]**o + (0.636056334555)*x[0] + (-0.317071882334)*x[1]**o + (0.227577810771)*x[1]
+        ref[(0, 2, 0, 0)]=0.726789809617*x_ref[0]**o + (0.636056334555)*x_ref[0] + (-0.317071882334)*x_ref[1]**o + (0.227577810771)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.653964610795*x[0]**o + (-0.978494334403)*x[0] + (0.229232937644)*x[1]**o + (-0.182062048451)*x[1]
+        ref[(0, 2, 0, 1)]=-0.653964610795*x_ref[0]**o + (-0.978494334403)*x_ref[0] + (0.229232937644)*x_ref[1]**o + (-0.182062048451)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.588792824299*x[0]**o + (0.87973222252)*x[0] + (0.326149873318)*x[1]**o + (0.875381140366)*x[1]
+        ref[(0, 2, 0, 2)]=-0.588792824299*x_ref[0]**o + (0.87973222252)*x_ref[0] + (0.326149873318)*x_ref[1]**o + (0.875381140366)*x_ref[1]
+        arg[(0, 2, 0, 3)]=-0.0482212162875*x[0]**o + (-0.420353491871)*x[0] + (0.704259971911)*x[1]**o + (0.342500190565)*x[1]
+        ref[(0, 2, 0, 3)]=-0.0482212162875*x_ref[0]**o + (-0.420353491871)*x_ref[0] + (0.704259971911)*x_ref[1]**o + (0.342500190565)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.746911801182*x[0]**o + (-0.262845497583)*x[0] + (0.42612269133)*x[1]**o + (0.275321165463)*x[1]
+        ref[(0, 2, 1, 0)]=-0.746911801182*x_ref[0]**o + (-0.262845497583)*x_ref[0] + (0.42612269133)*x_ref[1]**o + (0.275321165463)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.302274468619*x[0]**o + (-0.407094862121)*x[0] + (-0.235803979514)*x[1]**o + (-0.676832531811)*x[1]
+        ref[(0, 2, 1, 1)]=-0.302274468619*x_ref[0]**o + (-0.407094862121)*x_ref[0] + (-0.235803979514)*x_ref[1]**o + (-0.676832531811)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.116029281518*x[0]**o + (0.350059481501)*x[0] + (0.459111255432)*x[1]**o + (0.625803033578)*x[1]
+        ref[(0, 2, 1, 2)]=-0.116029281518*x_ref[0]**o + (0.350059481501)*x_ref[0] + (0.459111255432)*x_ref[1]**o + (0.625803033578)*x_ref[1]
+        arg[(0, 2, 1, 3)]=-0.939389867528*x[0]**o + (-0.172708853618)*x[0] + (0.826588399735)*x[1]**o + (-0.0710610451895)*x[1]
+        ref[(0, 2, 1, 3)]=-0.939389867528*x_ref[0]**o + (-0.172708853618)*x_ref[0] + (0.826588399735)*x_ref[1]**o + (-0.0710610451895)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.14294000637*x[0]**o + (0.103519820538)*x[0] + (0.679763541013)*x[1]**o + (-0.111162252047)*x[1]
+        ref[(0, 2, 2, 0)]=-0.14294000637*x_ref[0]**o + (0.103519820538)*x_ref[0] + (0.679763541013)*x_ref[1]**o + (-0.111162252047)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.495914423256*x[0]**o + (0.113805088398)*x[0] + (-0.728219066692)*x[1]**o + (-0.133395971841)*x[1]
+        ref[(0, 2, 2, 1)]=0.495914423256*x_ref[0]**o + (0.113805088398)*x_ref[0] + (-0.728219066692)*x_ref[1]**o + (-0.133395971841)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.944884057829*x[0]**o + (-0.603565376981)*x[0] + (0.433766015716)*x[1]**o + (0.700480187383)*x[1]
+        ref[(0, 2, 2, 2)]=-0.944884057829*x_ref[0]**o + (-0.603565376981)*x_ref[0] + (0.433766015716)*x_ref[1]**o + (0.700480187383)*x_ref[1]
+        arg[(0, 2, 2, 3)]=0.281875727845*x[0]**o + (-0.420629713435)*x[0] + (0.853606154893)*x[1]**o + (0.613253008277)*x[1]
+        ref[(0, 2, 2, 3)]=0.281875727845*x_ref[0]**o + (-0.420629713435)*x_ref[0] + (0.853606154893)*x_ref[1]**o + (0.613253008277)*x_ref[1]
+        arg[(0, 3, 0, 0)]=-0.604685192185*x[0]**o + (0.999773459565)*x[0] + (0.874383656689)*x[1]**o + (0.505113010181)*x[1]
+        ref[(0, 3, 0, 0)]=-0.604685192185*x_ref[0]**o + (0.999773459565)*x_ref[0] + (0.874383656689)*x_ref[1]**o + (0.505113010181)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.974067972965*x[0]**o + (0.368630630636)*x[0] + (0.0350742059564)*x[1]**o + (-0.099470577583)*x[1]
+        ref[(0, 3, 0, 1)]=0.974067972965*x_ref[0]**o + (0.368630630636)*x_ref[0] + (0.0350742059564)*x_ref[1]**o + (-0.099470577583)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.216767322829*x[0]**o + (0.522315899094)*x[0] + (0.047236994414)*x[1]**o + (0.244241091861)*x[1]
+        ref[(0, 3, 0, 2)]=-0.216767322829*x_ref[0]**o + (0.522315899094)*x_ref[0] + (0.047236994414)*x_ref[1]**o + (0.244241091861)*x_ref[1]
+        arg[(0, 3, 0, 3)]=-0.14101462263*x[0]**o + (-0.470339339174)*x[0] + (0.467264876411)*x[1]**o + (0.189596119732)*x[1]
+        ref[(0, 3, 0, 3)]=-0.14101462263*x_ref[0]**o + (-0.470339339174)*x_ref[0] + (0.467264876411)*x_ref[1]**o + (0.189596119732)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.654405817135*x[0]**o + (-0.779881841777)*x[0] + (-0.597380242997)*x[1]**o + (0.100908262882)*x[1]
+        ref[(0, 3, 1, 0)]=0.654405817135*x_ref[0]**o + (-0.779881841777)*x_ref[0] + (-0.597380242997)*x_ref[1]**o + (0.100908262882)*x_ref[1]
+        arg[(0, 3, 1, 1)]=-0.637596146065*x[0]**o + (-0.604722572527)*x[0] + (0.404854260486)*x[1]**o + (0.223666857608)*x[1]
+        ref[(0, 3, 1, 1)]=-0.637596146065*x_ref[0]**o + (-0.604722572527)*x_ref[0] + (0.404854260486)*x_ref[1]**o + (0.223666857608)*x_ref[1]
+        arg[(0, 3, 1, 2)]=0.58210913663*x[0]**o + (0.671156901293)*x[0] + (-0.717785654056)*x[1]**o + (-0.819995537833)*x[1]
+        ref[(0, 3, 1, 2)]=0.58210913663*x_ref[0]**o + (0.671156901293)*x_ref[0] + (-0.717785654056)*x_ref[1]**o + (-0.819995537833)*x_ref[1]
+        arg[(0, 3, 1, 3)]=-0.017118151643*x[0]**o + (0.653580288381)*x[0] + (0.462766549508)*x[1]**o + (-0.463465018174)*x[1]
+        ref[(0, 3, 1, 3)]=-0.017118151643*x_ref[0]**o + (0.653580288381)*x_ref[0] + (0.462766549508)*x_ref[1]**o + (-0.463465018174)*x_ref[1]
+        arg[(0, 3, 2, 0)]=0.491590175254*x[0]**o + (-0.77711409949)*x[0] + (-0.830871045861)*x[1]**o + (-0.248415204276)*x[1]
+        ref[(0, 3, 2, 0)]=0.491590175254*x_ref[0]**o + (-0.77711409949)*x_ref[0] + (-0.830871045861)*x_ref[1]**o + (-0.248415204276)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.202743991764*x[0]**o + (-0.0817320919547)*x[0] + (-0.826363445873)*x[1]**o + (-0.822109601427)*x[1]
+        ref[(0, 3, 2, 1)]=0.202743991764*x_ref[0]**o + (-0.0817320919547)*x_ref[0] + (-0.826363445873)*x_ref[1]**o + (-0.822109601427)*x_ref[1]
+        arg[(0, 3, 2, 2)]=-0.0637319577654*x[0]**o + (0.5246686099)*x[0] + (-0.338397669507)*x[1]**o + (0.471905472764)*x[1]
+        ref[(0, 3, 2, 2)]=-0.0637319577654*x_ref[0]**o + (0.5246686099)*x_ref[0] + (-0.338397669507)*x_ref[1]**o + (0.471905472764)*x_ref[1]
+        arg[(0, 3, 2, 3)]=0.766001239394*x[0]**o + (0.0689026350965)*x[0] + (0.469085524675)*x[1]**o + (0.184532305703)*x[1]
+        ref[(0, 3, 2, 3)]=0.766001239394*x_ref[0]**o + (0.0689026350965)*x_ref[0] + (0.469085524675)*x_ref[1]**o + (0.184532305703)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.895277594264*x[0]**o + (0.845944816662)*x[0] + (-0.899401768121)*x[1]**o + (-0.0391938228695)*x[1]
+        ref[(1, 0, 0, 0)]=0.895277594264*x_ref[0]**o + (0.845944816662)*x_ref[0] + (-0.899401768121)*x_ref[1]**o + (-0.0391938228695)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.191355676138*x[0]**o + (0.997014592311)*x[0] + (0.481683417355)*x[1]**o + (-0.775157890387)*x[1]
+        ref[(1, 0, 0, 1)]=-0.191355676138*x_ref[0]**o + (0.997014592311)*x_ref[0] + (0.481683417355)*x_ref[1]**o + (-0.775157890387)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.461059914465*x[0]**o + (0.415605145536)*x[0] + (0.836649749068)*x[1]**o + (0.312953492626)*x[1]
+        ref[(1, 0, 0, 2)]=-0.461059914465*x_ref[0]**o + (0.415605145536)*x_ref[0] + (0.836649749068)*x_ref[1]**o + (0.312953492626)*x_ref[1]
+        arg[(1, 0, 0, 3)]=0.59200129334*x[0]**o + (-0.236128588247)*x[0] + (0.228331427012)*x[1]**o + (0.492105632729)*x[1]
+        ref[(1, 0, 0, 3)]=0.59200129334*x_ref[0]**o + (-0.236128588247)*x_ref[0] + (0.228331427012)*x_ref[1]**o + (0.492105632729)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.26459390063*x[0]**o + (0.730043823408)*x[0] + (0.85392831703)*x[1]**o + (0.217009771119)*x[1]
+        ref[(1, 0, 1, 0)]=-0.26459390063*x_ref[0]**o + (0.730043823408)*x_ref[0] + (0.85392831703)*x_ref[1]**o + (0.217009771119)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.700262787062*x[0]**o + (-0.5137873857)*x[0] + (0.422247464534)*x[1]**o + (-0.775909333528)*x[1]
+        ref[(1, 0, 1, 1)]=0.700262787062*x_ref[0]**o + (-0.5137873857)*x_ref[0] + (0.422247464534)*x_ref[1]**o + (-0.775909333528)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.27240707108*x[0]**o + (0.0910406250976)*x[0] + (0.134477576955)*x[1]**o + (0.404738720882)*x[1]
+        ref[(1, 0, 1, 2)]=-0.27240707108*x_ref[0]**o + (0.0910406250976)*x_ref[0] + (0.134477576955)*x_ref[1]**o + (0.404738720882)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.640259674659*x[0]**o + (-0.180012351574)*x[0] + (-0.0131460917594)*x[1]**o + (0.410379852205)*x[1]
+        ref[(1, 0, 1, 3)]=0.640259674659*x_ref[0]**o + (-0.180012351574)*x_ref[0] + (-0.0131460917594)*x_ref[1]**o + (0.410379852205)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.47839466156*x[0]**o + (-0.593438892038)*x[0] + (-0.0478561705158)*x[1]**o + (-0.1190569806)*x[1]
+        ref[(1, 0, 2, 0)]=-0.47839466156*x_ref[0]**o + (-0.593438892038)*x_ref[0] + (-0.0478561705158)*x_ref[1]**o + (-0.1190569806)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.541600210065*x[0]**o + (0.294432539976)*x[0] + (0.624128062325)*x[1]**o + (-0.623389873375)*x[1]
+        ref[(1, 0, 2, 1)]=-0.541600210065*x_ref[0]**o + (0.294432539976)*x_ref[0] + (0.624128062325)*x_ref[1]**o + (-0.623389873375)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.992136655873*x[0]**o + (0.328203839611)*x[0] + (0.44976269623)*x[1]**o + (-0.228176205887)*x[1]
+        ref[(1, 0, 2, 2)]=0.992136655873*x_ref[0]**o + (0.328203839611)*x_ref[0] + (0.44976269623)*x_ref[1]**o + (-0.228176205887)*x_ref[1]
+        arg[(1, 0, 2, 3)]=0.127466555118*x[0]**o + (-0.88450141898)*x[0] + (-0.221235964084)*x[1]**o + (-0.813754952209)*x[1]
+        ref[(1, 0, 2, 3)]=0.127466555118*x_ref[0]**o + (-0.88450141898)*x_ref[0] + (-0.221235964084)*x_ref[1]**o + (-0.813754952209)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.777246525935*x[0]**o + (0.254030221655)*x[0] + (-0.989856437465)*x[1]**o + (-0.616468331185)*x[1]
+        ref[(1, 1, 0, 0)]=0.777246525935*x_ref[0]**o + (0.254030221655)*x_ref[0] + (-0.989856437465)*x_ref[1]**o + (-0.616468331185)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.474704769439*x[0]**o + (-0.0202619425155)*x[0] + (-0.52864752925)*x[1]**o + (-0.456217665649)*x[1]
+        ref[(1, 1, 0, 1)]=-0.474704769439*x_ref[0]**o + (-0.0202619425155)*x_ref[0] + (-0.52864752925)*x_ref[1]**o + (-0.456217665649)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.52950609426*x[0]**o + (0.708767804751)*x[0] + (-0.678985202248)*x[1]**o + (0.260189324889)*x[1]
+        ref[(1, 1, 0, 2)]=-0.52950609426*x_ref[0]**o + (0.708767804751)*x_ref[0] + (-0.678985202248)*x_ref[1]**o + (0.260189324889)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.328510583539*x[0]**o + (0.160584278496)*x[0] + (0.568108773769)*x[1]**o + (-0.645453909062)*x[1]
+        ref[(1, 1, 0, 3)]=0.328510583539*x_ref[0]**o + (0.160584278496)*x_ref[0] + (0.568108773769)*x_ref[1]**o + (-0.645453909062)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.795987300375*x[0]**o + (0.228143996159)*x[0] + (-0.908904429407)*x[1]**o + (0.238325365554)*x[1]
+        ref[(1, 1, 1, 0)]=0.795987300375*x_ref[0]**o + (0.228143996159)*x_ref[0] + (-0.908904429407)*x_ref[1]**o + (0.238325365554)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.0432912991196*x[0]**o + (-0.291536363825)*x[0] + (-0.912754118445)*x[1]**o + (0.367157811078)*x[1]
+        ref[(1, 1, 1, 1)]=-0.0432912991196*x_ref[0]**o + (-0.291536363825)*x_ref[0] + (-0.912754118445)*x_ref[1]**o + (0.367157811078)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.719357340782*x[0]**o + (0.681000214683)*x[0] + (0.488255897959)*x[1]**o + (0.099833717497)*x[1]
+        ref[(1, 1, 1, 2)]=-0.719357340782*x_ref[0]**o + (0.681000214683)*x_ref[0] + (0.488255897959)*x_ref[1]**o + (0.099833717497)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.685868232177*x[0]**o + (0.505711750584)*x[0] + (-0.959371642156)*x[1]**o + (0.0570363938035)*x[1]
+        ref[(1, 1, 1, 3)]=-0.685868232177*x_ref[0]**o + (0.505711750584)*x_ref[0] + (-0.959371642156)*x_ref[1]**o + (0.0570363938035)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.680388794485*x[0]**o + (-0.675120937698)*x[0] + (-0.394567531604)*x[1]**o + (-0.90355388524)*x[1]
+        ref[(1, 1, 2, 0)]=0.680388794485*x_ref[0]**o + (-0.675120937698)*x_ref[0] + (-0.394567531604)*x_ref[1]**o + (-0.90355388524)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.712710169468*x[0]**o + (0.71174378767)*x[0] + (-0.57430241875)*x[1]**o + (-0.460106108657)*x[1]
+        ref[(1, 1, 2, 1)]=-0.712710169468*x_ref[0]**o + (0.71174378767)*x_ref[0] + (-0.57430241875)*x_ref[1]**o + (-0.460106108657)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.124796246309*x[0]**o + (0.114909545659)*x[0] + (0.201700177993)*x[1]**o + (-0.851639997438)*x[1]
+        ref[(1, 1, 2, 2)]=-0.124796246309*x_ref[0]**o + (0.114909545659)*x_ref[0] + (0.201700177993)*x_ref[1]**o + (-0.851639997438)*x_ref[1]
+        arg[(1, 1, 2, 3)]=0.738617854025*x[0]**o + (0.183489145597)*x[0] + (-0.35320981075)*x[1]**o + (-0.883256512413)*x[1]
+        ref[(1, 1, 2, 3)]=0.738617854025*x_ref[0]**o + (0.183489145597)*x_ref[0] + (-0.35320981075)*x_ref[1]**o + (-0.883256512413)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.25969156308*x[0]**o + (0.0225123435445)*x[0] + (-0.16087279224)*x[1]**o + (-0.824034903023)*x[1]
+        ref[(1, 2, 0, 0)]=0.25969156308*x_ref[0]**o + (0.0225123435445)*x_ref[0] + (-0.16087279224)*x_ref[1]**o + (-0.824034903023)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.314502500885*x[0]**o + (0.208297866429)*x[0] + (-0.856089537549)*x[1]**o + (0.0257014359936)*x[1]
+        ref[(1, 2, 0, 1)]=0.314502500885*x_ref[0]**o + (0.208297866429)*x_ref[0] + (-0.856089537549)*x_ref[1]**o + (0.0257014359936)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.0824333324332*x[0]**o + (0.975494480769)*x[0] + (0.685004524031)*x[1]**o + (0.913653977498)*x[1]
+        ref[(1, 2, 0, 2)]=0.0824333324332*x_ref[0]**o + (0.975494480769)*x_ref[0] + (0.685004524031)*x_ref[1]**o + (0.913653977498)*x_ref[1]
+        arg[(1, 2, 0, 3)]=-0.754246482851*x[0]**o + (-0.304997262435)*x[0] + (-0.438821127447)*x[1]**o + (-0.719595216557)*x[1]
+        ref[(1, 2, 0, 3)]=-0.754246482851*x_ref[0]**o + (-0.304997262435)*x_ref[0] + (-0.438821127447)*x_ref[1]**o + (-0.719595216557)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.235628744314*x[0]**o + (0.9460849398)*x[0] + (0.360214651702)*x[1]**o + (-0.783192240497)*x[1]
+        ref[(1, 2, 1, 0)]=-0.235628744314*x_ref[0]**o + (0.9460849398)*x_ref[0] + (0.360214651702)*x_ref[1]**o + (-0.783192240497)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.19521907519*x[0]**o + (0.0511001640498)*x[0] + (0.710591114641)*x[1]**o + (0.194941465652)*x[1]
+        ref[(1, 2, 1, 1)]=-0.19521907519*x_ref[0]**o + (0.0511001640498)*x_ref[0] + (0.710591114641)*x_ref[1]**o + (0.194941465652)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.919072241409*x[0]**o + (0.680908077875)*x[0] + (-0.761801569149)*x[1]**o + (0.320712018064)*x[1]
+        ref[(1, 2, 1, 2)]=0.919072241409*x_ref[0]**o + (0.680908077875)*x_ref[0] + (-0.761801569149)*x_ref[1]**o + (0.320712018064)*x_ref[1]
+        arg[(1, 2, 1, 3)]=0.975989359994*x[0]**o + (-0.336370539039)*x[0] + (-0.0474341462409)*x[1]**o + (0.0486896430122)*x[1]
+        ref[(1, 2, 1, 3)]=0.975989359994*x_ref[0]**o + (-0.336370539039)*x_ref[0] + (-0.0474341462409)*x_ref[1]**o + (0.0486896430122)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.0169431962191*x[0]**o + (-0.545120929849)*x[0] + (-0.792403475174)*x[1]**o + (0.706287983004)*x[1]
+        ref[(1, 2, 2, 0)]=0.0169431962191*x_ref[0]**o + (-0.545120929849)*x_ref[0] + (-0.792403475174)*x_ref[1]**o + (0.706287983004)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.563765369048*x[0]**o + (0.603238444428)*x[0] + (0.25295872391)*x[1]**o + (-0.869895177797)*x[1]
+        ref[(1, 2, 2, 1)]=0.563765369048*x_ref[0]**o + (0.603238444428)*x_ref[0] + (0.25295872391)*x_ref[1]**o + (-0.869895177797)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.348994472694*x[0]**o + (0.865498053788)*x[0] + (-0.155432155392)*x[1]**o + (-0.392213851759)*x[1]
+        ref[(1, 2, 2, 2)]=-0.348994472694*x_ref[0]**o + (0.865498053788)*x_ref[0] + (-0.155432155392)*x_ref[1]**o + (-0.392213851759)*x_ref[1]
+        arg[(1, 2, 2, 3)]=-0.545676051648*x[0]**o + (-0.943073872924)*x[0] + (0.195690818622)*x[1]**o + (0.183321095712)*x[1]
+        ref[(1, 2, 2, 3)]=-0.545676051648*x_ref[0]**o + (-0.943073872924)*x_ref[0] + (0.195690818622)*x_ref[1]**o + (0.183321095712)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.711590877061*x[0]**o + (-0.498118331929)*x[0] + (0.120576431853)*x[1]**o + (0.350685376601)*x[1]
+        ref[(1, 3, 0, 0)]=0.711590877061*x_ref[0]**o + (-0.498118331929)*x_ref[0] + (0.120576431853)*x_ref[1]**o + (0.350685376601)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.87283213537*x[0]**o + (-0.260210103055)*x[0] + (-0.277155315725)*x[1]**o + (0.789822145201)*x[1]
+        ref[(1, 3, 0, 1)]=-0.87283213537*x_ref[0]**o + (-0.260210103055)*x_ref[0] + (-0.277155315725)*x_ref[1]**o + (0.789822145201)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.419749308126*x[0]**o + (-0.706767481873)*x[0] + (0.54335588042)*x[1]**o + (-0.937316588221)*x[1]
+        ref[(1, 3, 0, 2)]=0.419749308126*x_ref[0]**o + (-0.706767481873)*x_ref[0] + (0.54335588042)*x_ref[1]**o + (-0.937316588221)*x_ref[1]
+        arg[(1, 3, 0, 3)]=-0.605061093491*x[0]**o + (0.893467728463)*x[0] + (0.525298018436)*x[1]**o + (0.181014162829)*x[1]
+        ref[(1, 3, 0, 3)]=-0.605061093491*x_ref[0]**o + (0.893467728463)*x_ref[0] + (0.525298018436)*x_ref[1]**o + (0.181014162829)*x_ref[1]
+        arg[(1, 3, 1, 0)]=0.669879376783*x[0]**o + (-0.588293734357)*x[0] + (0.558981750844)*x[1]**o + (0.237199816957)*x[1]
+        ref[(1, 3, 1, 0)]=0.669879376783*x_ref[0]**o + (-0.588293734357)*x_ref[0] + (0.558981750844)*x_ref[1]**o + (0.237199816957)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.753847595478*x[0]**o + (0.485301875328)*x[0] + (-0.26920621409)*x[1]**o + (0.121211456831)*x[1]
+        ref[(1, 3, 1, 1)]=0.753847595478*x_ref[0]**o + (0.485301875328)*x_ref[0] + (-0.26920621409)*x_ref[1]**o + (0.121211456831)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.310415400589*x[0]**o + (-0.21208323655)*x[0] + (0.646371956667)*x[1]**o + (0.741810554793)*x[1]
+        ref[(1, 3, 1, 2)]=0.310415400589*x_ref[0]**o + (-0.21208323655)*x_ref[0] + (0.646371956667)*x_ref[1]**o + (0.741810554793)*x_ref[1]
+        arg[(1, 3, 1, 3)]=0.679064576079*x[0]**o + (-0.590356391727)*x[0] + (0.455460051649)*x[1]**o + (-0.130157955647)*x[1]
+        ref[(1, 3, 1, 3)]=0.679064576079*x_ref[0]**o + (-0.590356391727)*x_ref[0] + (0.455460051649)*x_ref[1]**o + (-0.130157955647)*x_ref[1]
+        arg[(1, 3, 2, 0)]=-0.976975937448*x[0]**o + (-0.793585119362)*x[0] + (-0.773144829871)*x[1]**o + (-0.338176408629)*x[1]
+        ref[(1, 3, 2, 0)]=-0.976975937448*x_ref[0]**o + (-0.793585119362)*x_ref[0] + (-0.773144829871)*x_ref[1]**o + (-0.338176408629)*x_ref[1]
+        arg[(1, 3, 2, 1)]=-0.705428392412*x[0]**o + (0.0450241290098)*x[0] + (-0.987843326257)*x[1]**o + (0.13403120655)*x[1]
+        ref[(1, 3, 2, 1)]=-0.705428392412*x_ref[0]**o + (0.0450241290098)*x_ref[0] + (-0.987843326257)*x_ref[1]**o + (0.13403120655)*x_ref[1]
+        arg[(1, 3, 2, 2)]=-0.149328510955*x[0]**o + (-0.860202122656)*x[0] + (0.927211523748)*x[1]**o + (0.555490986157)*x[1]
+        ref[(1, 3, 2, 2)]=-0.149328510955*x_ref[0]**o + (-0.860202122656)*x_ref[0] + (0.927211523748)*x_ref[1]**o + (0.555490986157)*x_ref[1]
+        arg[(1, 3, 2, 3)]=-0.745727433013*x[0]**o + (-0.757690945743)*x[0] + (-0.339857715407)*x[1]**o + (0.736886752367)*x[1]
+        ref[(1, 3, 2, 3)]=-0.745727433013*x_ref[0]**o + (-0.757690945743)*x_ref[0] + (-0.339857715407)*x_ref[1]**o + (0.736886752367)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.157140218148*x[0]**o + (0.706971055372)*x[0] + (0.161319798686)*x[1]**o + (-0.242113067637)*x[1]
+        ref[(2, 0, 0, 0)]=-0.157140218148*x_ref[0]**o + (0.706971055372)*x_ref[0] + (0.161319798686)*x_ref[1]**o + (-0.242113067637)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.765236488992*x[0]**o + (0.776897784853)*x[0] + (0.229243182562)*x[1]**o + (0.690159348145)*x[1]
+        ref[(2, 0, 0, 1)]=0.765236488992*x_ref[0]**o + (0.776897784853)*x_ref[0] + (0.229243182562)*x_ref[1]**o + (0.690159348145)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.570434177022*x[0]**o + (-0.661602280766)*x[0] + (-0.0197693274331)*x[1]**o + (-0.361226682047)*x[1]
+        ref[(2, 0, 0, 2)]=0.570434177022*x_ref[0]**o + (-0.661602280766)*x_ref[0] + (-0.0197693274331)*x_ref[1]**o + (-0.361226682047)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.53699587259*x[0]**o + (0.155578237105)*x[0] + (0.890841834916)*x[1]**o + (-0.566058619425)*x[1]
+        ref[(2, 0, 0, 3)]=-0.53699587259*x_ref[0]**o + (0.155578237105)*x_ref[0] + (0.890841834916)*x_ref[1]**o + (-0.566058619425)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.907628641556*x[0]**o + (0.176280288505)*x[0] + (-0.59738340909)*x[1]**o + (0.596701775876)*x[1]
+        ref[(2, 0, 1, 0)]=0.907628641556*x_ref[0]**o + (0.176280288505)*x_ref[0] + (-0.59738340909)*x_ref[1]**o + (0.596701775876)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.899748528201*x[0]**o + (0.818104761364)*x[0] + (-0.299191408027)*x[1]**o + (-0.187472061904)*x[1]
+        ref[(2, 0, 1, 1)]=0.899748528201*x_ref[0]**o + (0.818104761364)*x_ref[0] + (-0.299191408027)*x_ref[1]**o + (-0.187472061904)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.7387977877*x[0]**o + (-0.562821046099)*x[0] + (0.45250741975)*x[1]**o + (0.497365367494)*x[1]
+        ref[(2, 0, 1, 2)]=-0.7387977877*x_ref[0]**o + (-0.562821046099)*x_ref[0] + (0.45250741975)*x_ref[1]**o + (0.497365367494)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.636625581487*x[0]**o + (0.922451588769)*x[0] + (-0.538130793772)*x[1]**o + (0.808098370426)*x[1]
+        ref[(2, 0, 1, 3)]=0.636625581487*x_ref[0]**o + (0.922451588769)*x_ref[0] + (-0.538130793772)*x_ref[1]**o + (0.808098370426)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.216033253101*x[0]**o + (0.882331096148)*x[0] + (-0.226497568697)*x[1]**o + (0.983185895459)*x[1]
+        ref[(2, 0, 2, 0)]=-0.216033253101*x_ref[0]**o + (0.882331096148)*x_ref[0] + (-0.226497568697)*x_ref[1]**o + (0.983185895459)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.371105837601*x[0]**o + (-0.477552346968)*x[0] + (0.584920575155)*x[1]**o + (0.61894743694)*x[1]
+        ref[(2, 0, 2, 1)]=-0.371105837601*x_ref[0]**o + (-0.477552346968)*x_ref[0] + (0.584920575155)*x_ref[1]**o + (0.61894743694)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.301668715977*x[0]**o + (0.472242193623)*x[0] + (0.334726131855)*x[1]**o + (-0.826400129873)*x[1]
+        ref[(2, 0, 2, 2)]=0.301668715977*x_ref[0]**o + (0.472242193623)*x_ref[0] + (0.334726131855)*x_ref[1]**o + (-0.826400129873)*x_ref[1]
+        arg[(2, 0, 2, 3)]=-0.173373409536*x[0]**o + (0.476653747635)*x[0] + (-0.643688313219)*x[1]**o + (-0.60657899923)*x[1]
+        ref[(2, 0, 2, 3)]=-0.173373409536*x_ref[0]**o + (0.476653747635)*x_ref[0] + (-0.643688313219)*x_ref[1]**o + (-0.60657899923)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.396595140922*x[0]**o + (-0.105304132086)*x[0] + (0.70796330635)*x[1]**o + (-0.792019011908)*x[1]
+        ref[(2, 1, 0, 0)]=0.396595140922*x_ref[0]**o + (-0.105304132086)*x_ref[0] + (0.70796330635)*x_ref[1]**o + (-0.792019011908)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.926669249248*x[0]**o + (0.891435949577)*x[0] + (0.687235245787)*x[1]**o + (-0.162804495344)*x[1]
+        ref[(2, 1, 0, 1)]=0.926669249248*x_ref[0]**o + (0.891435949577)*x_ref[0] + (0.687235245787)*x_ref[1]**o + (-0.162804495344)*x_ref[1]
+        arg[(2, 1, 0, 2)]=0.35118595427*x[0]**o + (-0.204158152068)*x[0] + (0.597455024829)*x[1]**o + (0.796041110527)*x[1]
+        ref[(2, 1, 0, 2)]=0.35118595427*x_ref[0]**o + (-0.204158152068)*x_ref[0] + (0.597455024829)*x_ref[1]**o + (0.796041110527)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.561168666276*x[0]**o + (0.898388433016)*x[0] + (0.47563262813)*x[1]**o + (0.308736951846)*x[1]
+        ref[(2, 1, 0, 3)]=-0.561168666276*x_ref[0]**o + (0.898388433016)*x_ref[0] + (0.47563262813)*x_ref[1]**o + (0.308736951846)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.968889689203*x[0]**o + (0.66182577459)*x[0] + (-0.721150635926)*x[1]**o + (0.317077317506)*x[1]
+        ref[(2, 1, 1, 0)]=0.968889689203*x_ref[0]**o + (0.66182577459)*x_ref[0] + (-0.721150635926)*x_ref[1]**o + (0.317077317506)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.376793901623*x[0]**o + (0.0654274130117)*x[0] + (-0.0747819388216)*x[1]**o + (0.144797574999)*x[1]
+        ref[(2, 1, 1, 1)]=0.376793901623*x_ref[0]**o + (0.0654274130117)*x_ref[0] + (-0.0747819388216)*x_ref[1]**o + (0.144797574999)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.457356918081*x[0]**o + (0.402616195828)*x[0] + (0.366737854937)*x[1]**o + (0.267312318557)*x[1]
+        ref[(2, 1, 1, 2)]=0.457356918081*x_ref[0]**o + (0.402616195828)*x_ref[0] + (0.366737854937)*x_ref[1]**o + (0.267312318557)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.778552126124*x[0]**o + (-0.686054812466)*x[0] + (0.366109450168)*x[1]**o + (-0.886187622335)*x[1]
+        ref[(2, 1, 1, 3)]=-0.778552126124*x_ref[0]**o + (-0.686054812466)*x_ref[0] + (0.366109450168)*x_ref[1]**o + (-0.886187622335)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.437553809814*x[0]**o + (-0.103469187927)*x[0] + (0.632460447745)*x[1]**o + (-0.41000686516)*x[1]
+        ref[(2, 1, 2, 0)]=-0.437553809814*x_ref[0]**o + (-0.103469187927)*x_ref[0] + (0.632460447745)*x_ref[1]**o + (-0.41000686516)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.198025690233*x[0]**o + (-0.920539142069)*x[0] + (-0.207443681546)*x[1]**o + (-0.909007818243)*x[1]
+        ref[(2, 1, 2, 1)]=0.198025690233*x_ref[0]**o + (-0.920539142069)*x_ref[0] + (-0.207443681546)*x_ref[1]**o + (-0.909007818243)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.401407438154*x[0]**o + (-0.958607338915)*x[0] + (0.216887326935)*x[1]**o + (0.972711724598)*x[1]
+        ref[(2, 1, 2, 2)]=-0.401407438154*x_ref[0]**o + (-0.958607338915)*x_ref[0] + (0.216887326935)*x_ref[1]**o + (0.972711724598)*x_ref[1]
+        arg[(2, 1, 2, 3)]=0.205660706115*x[0]**o + (0.956406043149)*x[0] + (-0.670113092111)*x[1]**o + (0.922906634535)*x[1]
+        ref[(2, 1, 2, 3)]=0.205660706115*x_ref[0]**o + (0.956406043149)*x_ref[0] + (-0.670113092111)*x_ref[1]**o + (0.922906634535)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.203166619945*x[0]**o + (0.743160631257)*x[0] + (0.277652131871)*x[1]**o + (-0.596374525847)*x[1]
+        ref[(2, 2, 0, 0)]=0.203166619945*x_ref[0]**o + (0.743160631257)*x_ref[0] + (0.277652131871)*x_ref[1]**o + (-0.596374525847)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.0643435338288*x[0]**o + (-0.402342393023)*x[0] + (0.926478765652)*x[1]**o + (-0.794718385145)*x[1]
+        ref[(2, 2, 0, 1)]=0.0643435338288*x_ref[0]**o + (-0.402342393023)*x_ref[0] + (0.926478765652)*x_ref[1]**o + (-0.794718385145)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.0382953924406*x[0]**o + (-0.946062181291)*x[0] + (-0.546731133419)*x[1]**o + (-0.295944706638)*x[1]
+        ref[(2, 2, 0, 2)]=-0.0382953924406*x_ref[0]**o + (-0.946062181291)*x_ref[0] + (-0.546731133419)*x_ref[1]**o + (-0.295944706638)*x_ref[1]
+        arg[(2, 2, 0, 3)]=0.62943564402*x[0]**o + (0.609420337403)*x[0] + (0.145323126368)*x[1]**o + (0.56106780846)*x[1]
+        ref[(2, 2, 0, 3)]=0.62943564402*x_ref[0]**o + (0.609420337403)*x_ref[0] + (0.145323126368)*x_ref[1]**o + (0.56106780846)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.769664508323*x[0]**o + (0.487307614533)*x[0] + (-0.922977349075)*x[1]**o + (0.995084489449)*x[1]
+        ref[(2, 2, 1, 0)]=-0.769664508323*x_ref[0]**o + (0.487307614533)*x_ref[0] + (-0.922977349075)*x_ref[1]**o + (0.995084489449)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.179040376744*x[0]**o + (-0.332848323892)*x[0] + (0.780721070908)*x[1]**o + (-0.748398431047)*x[1]
+        ref[(2, 2, 1, 1)]=0.179040376744*x_ref[0]**o + (-0.332848323892)*x_ref[0] + (0.780721070908)*x_ref[1]**o + (-0.748398431047)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.683620678648*x[0]**o + (0.151718556894)*x[0] + (0.378571047164)*x[1]**o + (-0.74765512305)*x[1]
+        ref[(2, 2, 1, 2)]=-0.683620678648*x_ref[0]**o + (0.151718556894)*x_ref[0] + (0.378571047164)*x_ref[1]**o + (-0.74765512305)*x_ref[1]
+        arg[(2, 2, 1, 3)]=-0.440702427278*x[0]**o + (0.235330987556)*x[0] + (0.676099936213)*x[1]**o + (0.519535275529)*x[1]
+        ref[(2, 2, 1, 3)]=-0.440702427278*x_ref[0]**o + (0.235330987556)*x_ref[0] + (0.676099936213)*x_ref[1]**o + (0.519535275529)*x_ref[1]
+        arg[(2, 2, 2, 0)]=0.28806359921*x[0]**o + (-0.451736269073)*x[0] + (-0.899747388529)*x[1]**o + (-0.84846120685)*x[1]
+        ref[(2, 2, 2, 0)]=0.28806359921*x_ref[0]**o + (-0.451736269073)*x_ref[0] + (-0.899747388529)*x_ref[1]**o + (-0.84846120685)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.569186890154*x[0]**o + (0.0883565157086)*x[0] + (0.778473033567)*x[1]**o + (-0.175872981962)*x[1]
+        ref[(2, 2, 2, 1)]=0.569186890154*x_ref[0]**o + (0.0883565157086)*x_ref[0] + (0.778473033567)*x_ref[1]**o + (-0.175872981962)*x_ref[1]
+        arg[(2, 2, 2, 2)]=-0.0504507890789*x[0]**o + (0.103795742618)*x[0] + (0.0861741065973)*x[1]**o + (-0.665370179401)*x[1]
+        ref[(2, 2, 2, 2)]=-0.0504507890789*x_ref[0]**o + (0.103795742618)*x_ref[0] + (0.0861741065973)*x_ref[1]**o + (-0.665370179401)*x_ref[1]
+        arg[(2, 2, 2, 3)]=-0.183522190882*x[0]**o + (0.361119646)*x[0] + (-0.857648987371)*x[1]**o + (-0.531896756301)*x[1]
+        ref[(2, 2, 2, 3)]=-0.183522190882*x_ref[0]**o + (0.361119646)*x_ref[0] + (-0.857648987371)*x_ref[1]**o + (-0.531896756301)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.521721639177*x[0]**o + (-0.336737254585)*x[0] + (0.969203706845)*x[1]**o + (0.564237759341)*x[1]
+        ref[(2, 3, 0, 0)]=0.521721639177*x_ref[0]**o + (-0.336737254585)*x_ref[0] + (0.969203706845)*x_ref[1]**o + (0.564237759341)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.810803892907*x[0]**o + (-0.521601202707)*x[0] + (0.529586867499)*x[1]**o + (-0.270291889213)*x[1]
+        ref[(2, 3, 0, 1)]=0.810803892907*x_ref[0]**o + (-0.521601202707)*x_ref[0] + (0.529586867499)*x_ref[1]**o + (-0.270291889213)*x_ref[1]
+        arg[(2, 3, 0, 2)]=-0.453111256952*x[0]**o + (-0.104464896264)*x[0] + (-0.614589708449)*x[1]**o + (0.449432165078)*x[1]
+        ref[(2, 3, 0, 2)]=-0.453111256952*x_ref[0]**o + (-0.104464896264)*x_ref[0] + (-0.614589708449)*x_ref[1]**o + (0.449432165078)*x_ref[1]
+        arg[(2, 3, 0, 3)]=0.656543297521*x[0]**o + (0.500441528647)*x[0] + (-0.660743987385)*x[1]**o + (-0.652971439073)*x[1]
+        ref[(2, 3, 0, 3)]=0.656543297521*x_ref[0]**o + (0.500441528647)*x_ref[0] + (-0.660743987385)*x_ref[1]**o + (-0.652971439073)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.0493118698816*x[0]**o + (0.461249282776)*x[0] + (0.810374477346)*x[1]**o + (0.206626449056)*x[1]
+        ref[(2, 3, 1, 0)]=0.0493118698816*x_ref[0]**o + (0.461249282776)*x_ref[0] + (0.810374477346)*x_ref[1]**o + (0.206626449056)*x_ref[1]
+        arg[(2, 3, 1, 1)]=0.431565489444*x[0]**o + (0.953759377637)*x[0] + (0.459436638052)*x[1]**o + (-0.845499426018)*x[1]
+        ref[(2, 3, 1, 1)]=0.431565489444*x_ref[0]**o + (0.953759377637)*x_ref[0] + (0.459436638052)*x_ref[1]**o + (-0.845499426018)*x_ref[1]
+        arg[(2, 3, 1, 2)]=0.262888603629*x[0]**o + (0.426140462681)*x[0] + (0.208680721512)*x[1]**o + (0.792219059353)*x[1]
+        ref[(2, 3, 1, 2)]=0.262888603629*x_ref[0]**o + (0.426140462681)*x_ref[0] + (0.208680721512)*x_ref[1]**o + (0.792219059353)*x_ref[1]
+        arg[(2, 3, 1, 3)]=0.790401249494*x[0]**o + (0.686920573853)*x[0] + (-0.133519949966)*x[1]**o + (-0.629513037725)*x[1]
+        ref[(2, 3, 1, 3)]=0.790401249494*x_ref[0]**o + (0.686920573853)*x_ref[0] + (-0.133519949966)*x_ref[1]**o + (-0.629513037725)*x_ref[1]
+        arg[(2, 3, 2, 0)]=-0.825760813386*x[0]**o + (0.031875889216)*x[0] + (-0.474046133029)*x[1]**o + (-0.799075931863)*x[1]
+        ref[(2, 3, 2, 0)]=-0.825760813386*x_ref[0]**o + (0.031875889216)*x_ref[0] + (-0.474046133029)*x_ref[1]**o + (-0.799075931863)*x_ref[1]
+        arg[(2, 3, 2, 1)]=0.15090920568*x[0]**o + (0.178504907434)*x[0] + (-0.085021965812)*x[1]**o + (0.848726153196)*x[1]
+        ref[(2, 3, 2, 1)]=0.15090920568*x_ref[0]**o + (0.178504907434)*x_ref[0] + (-0.085021965812)*x_ref[1]**o + (0.848726153196)*x_ref[1]
+        arg[(2, 3, 2, 2)]=-0.986897125867*x[0]**o + (0.583483096632)*x[0] + (-0.864508015613)*x[1]**o + (-0.800357550345)*x[1]
+        ref[(2, 3, 2, 2)]=-0.986897125867*x_ref[0]**o + (0.583483096632)*x_ref[0] + (-0.864508015613)*x_ref[1]**o + (-0.800357550345)*x_ref[1]
+        arg[(2, 3, 2, 3)]=-0.879713528643*x[0]**o + (0.107199046806)*x[0] + (-0.62066551578)*x[1]**o + (0.04468196116)*x[1]
+        ref[(2, 3, 2, 3)]=-0.879713528643*x_ref[0]**o + (0.107199046806)*x_ref[0] + (-0.62066551578)*x_ref[1]**o + (0.04468196116)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.987362268119*x[2]**o + (-0.796086835547)*x[2]
+            ref[(0, 0, 0, 0)]+=0.987362268119*x_ref[2]**o + (-0.796086835547)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.84237067235*x[2]**o + (-0.59104965009)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.84237067235*x_ref[2]**o + (-0.59104965009)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.833722898628*x[2]**o + (-0.556852885374)*x[2]
+            ref[(0, 0, 0, 2)]+=0.833722898628*x_ref[2]**o + (-0.556852885374)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.503804791028*x[2]**o + (0.170304446953)*x[2]
+            ref[(0, 0, 0, 3)]+=0.503804791028*x_ref[2]**o + (0.170304446953)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.622348722282*x[2]**o + (0.70158986836)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.622348722282*x_ref[2]**o + (0.70158986836)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.0103207870026*x[2]**o + (-0.00605151628128)*x[2]
+            ref[(0, 0, 1, 1)]+=0.0103207870026*x_ref[2]**o + (-0.00605151628128)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.109462535621*x[2]**o + (0.264420961004)*x[2]
+            ref[(0, 0, 1, 2)]+=0.109462535621*x_ref[2]**o + (0.264420961004)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.574953764214*x[2]**o + (0.3564817566)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.574953764214*x_ref[2]**o + (0.3564817566)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.462590441569*x[2]**o + (0.923518071334)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.462590441569*x_ref[2]**o + (0.923518071334)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.855380941761*x[2]**o + (-0.390548642302)*x[2]
+            ref[(0, 0, 2, 1)]+=0.855380941761*x_ref[2]**o + (-0.390548642302)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.849614876474*x[2]**o + (-0.824981317671)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.849614876474*x_ref[2]**o + (-0.824981317671)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.858749786763*x[2]**o + (0.742661607035)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.858749786763*x_ref[2]**o + (0.742661607035)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.217180847834*x[2]**o + (0.281071244267)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.217180847834*x_ref[2]**o + (0.281071244267)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.63578199268*x[2]**o + (0.310607536774)*x[2]
+            ref[(0, 1, 0, 1)]+=0.63578199268*x_ref[2]**o + (0.310607536774)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.402322643583*x[2]**o + (0.731336330654)*x[2]
+            ref[(0, 1, 0, 2)]+=0.402322643583*x_ref[2]**o + (0.731336330654)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.0436784560438*x[2]**o + (-0.000943666305892)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.0436784560438*x_ref[2]**o + (-0.000943666305892)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.648654410479*x[2]**o + (0.657402392482)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.648654410479*x_ref[2]**o + (0.657402392482)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.0327630654577*x[2]**o + (-0.419280167752)*x[2]
+            ref[(0, 1, 1, 1)]+=0.0327630654577*x_ref[2]**o + (-0.419280167752)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.0339898223166*x[2]**o + (-0.165829820371)*x[2]
+            ref[(0, 1, 1, 2)]+=0.0339898223166*x_ref[2]**o + (-0.165829820371)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.861956561444*x[2]**o + (0.574668229371)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.861956561444*x_ref[2]**o + (0.574668229371)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.157620832004*x[2]**o + (-0.944782902443)*x[2]
+            ref[(0, 1, 2, 0)]+=0.157620832004*x_ref[2]**o + (-0.944782902443)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.280425903635*x[2]**o + (-0.6297928757)*x[2]
+            ref[(0, 1, 2, 1)]+=0.280425903635*x_ref[2]**o + (-0.6297928757)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.969788378135*x[2]**o + (-0.34477629725)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.969788378135*x_ref[2]**o + (-0.34477629725)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.41375842412*x[2]**o + (-0.100921051726)*x[2]
+            ref[(0, 1, 2, 3)]+=0.41375842412*x_ref[2]**o + (-0.100921051726)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.0744845996355*x[2]**o + (0.34190914472)*x[2]
+            ref[(0, 2, 0, 0)]+=0.0744845996355*x_ref[2]**o + (0.34190914472)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.0177087820895*x[2]**o + (0.621663890674)*x[2]
+            ref[(0, 2, 0, 1)]+=0.0177087820895*x_ref[2]**o + (0.621663890674)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.751124366485*x[2]**o + (-0.622447448596)*x[2]
+            ref[(0, 2, 0, 2)]+=0.751124366485*x_ref[2]**o + (-0.622447448596)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=-0.0505480411442*x[2]**o + (0.173376858712)*x[2]
+            ref[(0, 2, 0, 3)]+=-0.0505480411442*x_ref[2]**o + (0.173376858712)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.588623310972*x[2]**o + (-0.324829959899)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.588623310972*x_ref[2]**o + (-0.324829959899)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.100369900237*x[2]**o + (0.107550027746)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.100369900237*x_ref[2]**o + (0.107550027746)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.404642117212*x[2]**o + (0.468498331374)*x[2]
+            ref[(0, 2, 1, 2)]+=0.404642117212*x_ref[2]**o + (0.468498331374)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=0.327793128975*x[2]**o + (0.202590387121)*x[2]
+            ref[(0, 2, 1, 3)]+=0.327793128975*x_ref[2]**o + (0.202590387121)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.699321905873*x[2]**o + (-0.0670780564917)*x[2]
+            ref[(0, 2, 2, 0)]+=0.699321905873*x_ref[2]**o + (-0.0670780564917)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.132923690315*x[2]**o + (0.490982680132)*x[2]
+            ref[(0, 2, 2, 1)]+=0.132923690315*x_ref[2]**o + (0.490982680132)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=-0.550367494126*x[2]**o + (-0.486053083108)*x[2]
+            ref[(0, 2, 2, 2)]+=-0.550367494126*x_ref[2]**o + (-0.486053083108)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=0.231364250903*x[2]**o + (0.288360629001)*x[2]
+            ref[(0, 2, 2, 3)]+=0.231364250903*x_ref[2]**o + (0.288360629001)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.459922233967*x[2]**o + (-0.937763282544)*x[2]
+            ref[(0, 3, 0, 0)]+=-0.459922233967*x_ref[2]**o + (-0.937763282544)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=-0.0675789497034*x[2]**o + (-0.929995279588)*x[2]
+            ref[(0, 3, 0, 1)]+=-0.0675789497034*x_ref[2]**o + (-0.929995279588)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=-0.383681605513*x[2]**o + (0.600272592432)*x[2]
+            ref[(0, 3, 0, 2)]+=-0.383681605513*x_ref[2]**o + (0.600272592432)*x_ref[2]
+            arg[(0, 3, 0, 3)]+=-0.477424174929*x[2]**o + (0.994927155822)*x[2]
+            ref[(0, 3, 0, 3)]+=-0.477424174929*x_ref[2]**o + (0.994927155822)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.290741442788*x[2]**o + (0.579936278777)*x[2]
+            ref[(0, 3, 1, 0)]+=0.290741442788*x_ref[2]**o + (0.579936278777)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.60107240217*x[2]**o + (0.454757868685)*x[2]
+            ref[(0, 3, 1, 1)]+=0.60107240217*x_ref[2]**o + (0.454757868685)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.484091463519*x[2]**o + (0.69254246703)*x[2]
+            ref[(0, 3, 1, 2)]+=0.484091463519*x_ref[2]**o + (0.69254246703)*x_ref[2]
+            arg[(0, 3, 1, 3)]+=0.604295287531*x[2]**o + (-0.0265742182727)*x[2]
+            ref[(0, 3, 1, 3)]+=0.604295287531*x_ref[2]**o + (-0.0265742182727)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.506585749817*x[2]**o + (0.758215451674)*x[2]
+            ref[(0, 3, 2, 0)]+=-0.506585749817*x_ref[2]**o + (0.758215451674)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=0.451077839111*x[2]**o + (-0.799701412098)*x[2]
+            ref[(0, 3, 2, 1)]+=0.451077839111*x_ref[2]**o + (-0.799701412098)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=0.197371057445*x[2]**o + (0.513010497912)*x[2]
+            ref[(0, 3, 2, 2)]+=0.197371057445*x_ref[2]**o + (0.513010497912)*x_ref[2]
+            arg[(0, 3, 2, 3)]+=0.369346176835*x[2]**o + (-0.399066524426)*x[2]
+            ref[(0, 3, 2, 3)]+=0.369346176835*x_ref[2]**o + (-0.399066524426)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.0531209121722*x[2]**o + (0.0259985787419)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.0531209121722*x_ref[2]**o + (0.0259985787419)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.426095099023*x[2]**o + (0.0314520943547)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.426095099023*x_ref[2]**o + (0.0314520943547)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.827503704184*x[2]**o + (-0.775482411987)*x[2]
+            ref[(1, 0, 0, 2)]+=0.827503704184*x_ref[2]**o + (-0.775482411987)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.896576325271*x[2]**o + (-0.716404085097)*x[2]
+            ref[(1, 0, 0, 3)]+=0.896576325271*x_ref[2]**o + (-0.716404085097)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.266134712825*x[2]**o + (0.405497975388)*x[2]
+            ref[(1, 0, 1, 0)]+=0.266134712825*x_ref[2]**o + (0.405497975388)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.301192132481*x[2]**o + (-0.250019213108)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.301192132481*x_ref[2]**o + (-0.250019213108)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.852671105076*x[2]**o + (-0.272235071228)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.852671105076*x_ref[2]**o + (-0.272235071228)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.900798022138*x[2]**o + (-0.873708201005)*x[2]
+            ref[(1, 0, 1, 3)]+=0.900798022138*x_ref[2]**o + (-0.873708201005)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.904919024905*x[2]**o + (0.570577113709)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.904919024905*x_ref[2]**o + (0.570577113709)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.294444778663*x[2]**o + (-0.371908800729)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.294444778663*x_ref[2]**o + (-0.371908800729)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.709858230168*x[2]**o + (-0.000879003387753)*x[2]
+            ref[(1, 0, 2, 2)]+=0.709858230168*x_ref[2]**o + (-0.000879003387753)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=0.50043318174*x[2]**o + (-0.0615157686946)*x[2]
+            ref[(1, 0, 2, 3)]+=0.50043318174*x_ref[2]**o + (-0.0615157686946)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.816400586204*x[2]**o + (-0.684381823366)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.816400586204*x_ref[2]**o + (-0.684381823366)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.936543539925*x[2]**o + (-0.365283110275)*x[2]
+            ref[(1, 1, 0, 1)]+=0.936543539925*x_ref[2]**o + (-0.365283110275)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.22308151847*x[2]**o + (-0.478413008575)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.22308151847*x_ref[2]**o + (-0.478413008575)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.564729864177*x[2]**o + (0.61066095011)*x[2]
+            ref[(1, 1, 0, 3)]+=-0.564729864177*x_ref[2]**o + (0.61066095011)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.678485907147*x[2]**o + (-0.384449372934)*x[2]
+            ref[(1, 1, 1, 0)]+=0.678485907147*x_ref[2]**o + (-0.384449372934)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.263358394714*x[2]**o + (0.715356114743)*x[2]
+            ref[(1, 1, 1, 1)]+=0.263358394714*x_ref[2]**o + (0.715356114743)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.162724036635*x[2]**o + (0.48473608594)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.162724036635*x_ref[2]**o + (0.48473608594)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.286414324158*x[2]**o + (0.656021467155)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.286414324158*x_ref[2]**o + (0.656021467155)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.137202658161*x[2]**o + (-0.197751345281)*x[2]
+            ref[(1, 1, 2, 0)]+=0.137202658161*x_ref[2]**o + (-0.197751345281)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.33129996608*x[2]**o + (-0.156494224963)*x[2]
+            ref[(1, 1, 2, 1)]+=0.33129996608*x_ref[2]**o + (-0.156494224963)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.438511037444*x[2]**o + (-0.298467665761)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.438511037444*x_ref[2]**o + (-0.298467665761)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.472568664271*x[2]**o + (0.749147860826)*x[2]
+            ref[(1, 1, 2, 3)]+=0.472568664271*x_ref[2]**o + (0.749147860826)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.300505530913*x[2]**o + (0.151119524552)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.300505530913*x_ref[2]**o + (0.151119524552)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.743311890618*x[2]**o + (-0.328152018591)*x[2]
+            ref[(1, 2, 0, 1)]+=0.743311890618*x_ref[2]**o + (-0.328152018591)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.82623971309*x[2]**o + (-0.111082476423)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.82623971309*x_ref[2]**o + (-0.111082476423)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=-0.00643836564691*x[2]**o + (0.981766258841)*x[2]
+            ref[(1, 2, 0, 3)]+=-0.00643836564691*x_ref[2]**o + (0.981766258841)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.319514627221*x[2]**o + (0.129531250916)*x[2]
+            ref[(1, 2, 1, 0)]+=0.319514627221*x_ref[2]**o + (0.129531250916)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.400553732056*x[2]**o + (0.350695698556)*x[2]
+            ref[(1, 2, 1, 1)]+=0.400553732056*x_ref[2]**o + (0.350695698556)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.668400207768*x[2]**o + (0.471787691842)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.668400207768*x_ref[2]**o + (0.471787691842)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=-0.761677259879*x[2]**o + (-0.535313407894)*x[2]
+            ref[(1, 2, 1, 3)]+=-0.761677259879*x_ref[2]**o + (-0.535313407894)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.290225894814*x[2]**o + (-0.935453645084)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.290225894814*x_ref[2]**o + (-0.935453645084)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.489275999174*x[2]**o + (0.939484488486)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.489275999174*x_ref[2]**o + (0.939484488486)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=-0.921978823453*x[2]**o + (-0.469984151583)*x[2]
+            ref[(1, 2, 2, 2)]+=-0.921978823453*x_ref[2]**o + (-0.469984151583)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=-0.854861639309*x[2]**o + (0.807319033826)*x[2]
+            ref[(1, 2, 2, 3)]+=-0.854861639309*x_ref[2]**o + (0.807319033826)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.467457253818*x[2]**o + (-0.227799446636)*x[2]
+            ref[(1, 3, 0, 0)]+=0.467457253818*x_ref[2]**o + (-0.227799446636)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=8.61535367083e-05*x[2]**o + (0.842818611362)*x[2]
+            ref[(1, 3, 0, 1)]+=8.61535367083e-05*x_ref[2]**o + (0.842818611362)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.165352486455*x[2]**o + (-0.050160112814)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.165352486455*x_ref[2]**o + (-0.050160112814)*x_ref[2]
+            arg[(1, 3, 0, 3)]+=-0.466044038713*x[2]**o + (-0.610280020572)*x[2]
+            ref[(1, 3, 0, 3)]+=-0.466044038713*x_ref[2]**o + (-0.610280020572)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.509869697606*x[2]**o + (0.976705042568)*x[2]
+            ref[(1, 3, 1, 0)]+=0.509869697606*x_ref[2]**o + (0.976705042568)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.578747225836*x[2]**o + (-0.94754390409)*x[2]
+            ref[(1, 3, 1, 1)]+=-0.578747225836*x_ref[2]**o + (-0.94754390409)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.474278638042*x[2]**o + (-0.577871770949)*x[2]
+            ref[(1, 3, 1, 2)]+=0.474278638042*x_ref[2]**o + (-0.577871770949)*x_ref[2]
+            arg[(1, 3, 1, 3)]+=-0.105614229739*x[2]**o + (-0.468603662375)*x[2]
+            ref[(1, 3, 1, 3)]+=-0.105614229739*x_ref[2]**o + (-0.468603662375)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=-0.0222582934397*x[2]**o + (0.304516209425)*x[2]
+            ref[(1, 3, 2, 0)]+=-0.0222582934397*x_ref[2]**o + (0.304516209425)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.0162122610948*x[2]**o + (0.961333740632)*x[2]
+            ref[(1, 3, 2, 1)]+=0.0162122610948*x_ref[2]**o + (0.961333740632)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.469474044934*x[2]**o + (0.820223597963)*x[2]
+            ref[(1, 3, 2, 2)]+=0.469474044934*x_ref[2]**o + (0.820223597963)*x_ref[2]
+            arg[(1, 3, 2, 3)]+=0.93617766601*x[2]**o + (0.210964749571)*x[2]
+            ref[(1, 3, 2, 3)]+=0.93617766601*x_ref[2]**o + (0.210964749571)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.332307085614*x[2]**o + (0.0520705164959)*x[2]
+            ref[(2, 0, 0, 0)]+=0.332307085614*x_ref[2]**o + (0.0520705164959)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.345084396982*x[2]**o + (-0.775371178661)*x[2]
+            ref[(2, 0, 0, 1)]+=0.345084396982*x_ref[2]**o + (-0.775371178661)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.0797871328394*x[2]**o + (0.71123053651)*x[2]
+            ref[(2, 0, 0, 2)]+=0.0797871328394*x_ref[2]**o + (0.71123053651)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.186448855321*x[2]**o + (-0.745930275273)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.186448855321*x_ref[2]**o + (-0.745930275273)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.566951648163*x[2]**o + (-0.463359865682)*x[2]
+            ref[(2, 0, 1, 0)]+=0.566951648163*x_ref[2]**o + (-0.463359865682)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.149874714731*x[2]**o + (0.0744262340799)*x[2]
+            ref[(2, 0, 1, 1)]+=0.149874714731*x_ref[2]**o + (0.0744262340799)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.531322976558*x[2]**o + (-0.0614333822618)*x[2]
+            ref[(2, 0, 1, 2)]+=-0.531322976558*x_ref[2]**o + (-0.0614333822618)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.98193453058*x[2]**o + (-0.642658623725)*x[2]
+            ref[(2, 0, 1, 3)]+=0.98193453058*x_ref[2]**o + (-0.642658623725)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.773617178598*x[2]**o + (-0.0904965988773)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.773617178598*x_ref[2]**o + (-0.0904965988773)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.899332968997*x[2]**o + (0.91779480401)*x[2]
+            ref[(2, 0, 2, 1)]+=0.899332968997*x_ref[2]**o + (0.91779480401)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.558998325521*x[2]**o + (-0.539207579578)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.558998325521*x_ref[2]**o + (-0.539207579578)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=-0.0589024205917*x[2]**o + (-0.0513701899822)*x[2]
+            ref[(2, 0, 2, 3)]+=-0.0589024205917*x_ref[2]**o + (-0.0513701899822)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.121113322741*x[2]**o + (-0.301898881904)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.121113322741*x_ref[2]**o + (-0.301898881904)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.556209424015*x[2]**o + (0.789687150757)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.556209424015*x_ref[2]**o + (0.789687150757)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.988539091467*x[2]**o + (-0.861229268817)*x[2]
+            ref[(2, 1, 0, 2)]+=0.988539091467*x_ref[2]**o + (-0.861229268817)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.589183066307*x[2]**o + (0.136219259691)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.589183066307*x_ref[2]**o + (0.136219259691)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.535624097401*x[2]**o + (0.126250618157)*x[2]
+            ref[(2, 1, 1, 0)]+=0.535624097401*x_ref[2]**o + (0.126250618157)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.085701991919*x[2]**o + (0.84278366995)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.085701991919*x_ref[2]**o + (0.84278366995)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.380821673595*x[2]**o + (0.0660225858107)*x[2]
+            ref[(2, 1, 1, 2)]+=0.380821673595*x_ref[2]**o + (0.0660225858107)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.797601566093*x[2]**o + (0.221100803903)*x[2]
+            ref[(2, 1, 1, 3)]+=-0.797601566093*x_ref[2]**o + (0.221100803903)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.331029506851*x[2]**o + (-0.554472033433)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.331029506851*x_ref[2]**o + (-0.554472033433)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.551475664753*x[2]**o + (0.705660388742)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.551475664753*x_ref[2]**o + (0.705660388742)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.958392045847*x[2]**o + (-0.725198771712)*x[2]
+            ref[(2, 1, 2, 2)]+=0.958392045847*x_ref[2]**o + (-0.725198771712)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=0.160468072974*x[2]**o + (0.254998180336)*x[2]
+            ref[(2, 1, 2, 3)]+=0.160468072974*x_ref[2]**o + (0.254998180336)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.983311586773*x[2]**o + (-0.399751809476)*x[2]
+            ref[(2, 2, 0, 0)]+=0.983311586773*x_ref[2]**o + (-0.399751809476)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.662402897088*x[2]**o + (-0.997278135133)*x[2]
+            ref[(2, 2, 0, 1)]+=0.662402897088*x_ref[2]**o + (-0.997278135133)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.415385342063*x[2]**o + (0.810101312504)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.415385342063*x_ref[2]**o + (0.810101312504)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=-0.109614425147*x[2]**o + (0.570694870768)*x[2]
+            ref[(2, 2, 0, 3)]+=-0.109614425147*x_ref[2]**o + (0.570694870768)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.37966339952*x[2]**o + (0.136719817533)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.37966339952*x_ref[2]**o + (0.136719817533)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.987080884465*x[2]**o + (-0.237789625468)*x[2]
+            ref[(2, 2, 1, 1)]+=0.987080884465*x_ref[2]**o + (-0.237789625468)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.860971503146*x[2]**o + (0.475363973774)*x[2]
+            ref[(2, 2, 1, 2)]+=0.860971503146*x_ref[2]**o + (0.475363973774)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=0.7051387109*x[2]**o + (-0.971976848039)*x[2]
+            ref[(2, 2, 1, 3)]+=0.7051387109*x_ref[2]**o + (-0.971976848039)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.20895268572*x[2]**o + (0.635929357318)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.20895268572*x_ref[2]**o + (0.635929357318)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=-0.0463968812778*x[2]**o + (0.631242659714)*x[2]
+            ref[(2, 2, 2, 1)]+=-0.0463968812778*x_ref[2]**o + (0.631242659714)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=0.090311841314*x[2]**o + (-0.0894264179748)*x[2]
+            ref[(2, 2, 2, 2)]+=0.090311841314*x_ref[2]**o + (-0.0894264179748)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=-0.515134295559*x[2]**o + (0.664708562749)*x[2]
+            ref[(2, 2, 2, 3)]+=-0.515134295559*x_ref[2]**o + (0.664708562749)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=0.909879499225*x[2]**o + (-0.211736633023)*x[2]
+            ref[(2, 3, 0, 0)]+=0.909879499225*x_ref[2]**o + (-0.211736633023)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=-0.13021718766*x[2]**o + (0.416355185213)*x[2]
+            ref[(2, 3, 0, 1)]+=-0.13021718766*x_ref[2]**o + (0.416355185213)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=-0.914319628015*x[2]**o + (0.473866114694)*x[2]
+            ref[(2, 3, 0, 2)]+=-0.914319628015*x_ref[2]**o + (0.473866114694)*x_ref[2]
+            arg[(2, 3, 0, 3)]+=-0.00221313188104*x[2]**o + (-0.467106021623)*x[2]
+            ref[(2, 3, 0, 3)]+=-0.00221313188104*x_ref[2]**o + (-0.467106021623)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.0993620331845*x[2]**o + (0.86000766438)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.0993620331845*x_ref[2]**o + (0.86000766438)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.0361594927962*x[2]**o + (0.920366295565)*x[2]
+            ref[(2, 3, 1, 1)]+=0.0361594927962*x_ref[2]**o + (0.920366295565)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=0.973544583379*x[2]**o + (0.607035363994)*x[2]
+            ref[(2, 3, 1, 2)]+=0.973544583379*x_ref[2]**o + (0.607035363994)*x_ref[2]
+            arg[(2, 3, 1, 3)]+=0.194651019922*x[2]**o + (-0.149277956601)*x[2]
+            ref[(2, 3, 1, 3)]+=0.194651019922*x_ref[2]**o + (-0.149277956601)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=-0.85811589599*x[2]**o + (-0.232023862652)*x[2]
+            ref[(2, 3, 2, 0)]+=-0.85811589599*x_ref[2]**o + (-0.232023862652)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=0.616759369173*x[2]**o + (-0.940382166141)*x[2]
+            ref[(2, 3, 2, 1)]+=0.616759369173*x_ref[2]**o + (-0.940382166141)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=-0.285605893538*x[2]**o + (0.772341565477)*x[2]
+            ref[(2, 3, 2, 2)]+=-0.285605893538*x_ref[2]**o + (0.772341565477)*x_ref[2]
+            arg[(2, 3, 2, 3)]+=-0.901893677767*x[2]**o + (-0.780239802944)*x[2]
+            ref[(2, 3, 2, 3)]+=-0.901893677767*x_ref[2]**o + (-0.780239802944)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.508646694177*x[0] + (0.131112154643)*x[1]
+        ref=-0.508646694177*x_ref[0] + (0.131112154643)*x_ref[1]
+        if dim==3:
+            arg+=(-0.940911842324)*x[2]
+            ref+=(-0.940911842324)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.824958399075*x[0] + (-0.0396141832597)*x[1]
+        ref[(0,)]=-0.824958399075*x_ref[0] + (-0.0396141832597)*x_ref[1]
+        arg[(1,)]=-0.541702819266*x[0] + (0.502725365166)*x[1]
+        ref[(1,)]=-0.541702819266*x_ref[0] + (0.502725365166)*x_ref[1]
+        arg[(2,)]=0.238231617151*x[0] + (-0.905645151193)*x[1]
+        ref[(2,)]=0.238231617151*x_ref[0] + (-0.905645151193)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.0955263326799*x[2]
+            ref[(0,)]+=0.0955263326799*x_ref[2]
+            arg[(1,)]+=-0.511301873333*x[2]
+            ref[(1,)]+=-0.511301873333*x_ref[2]
+            arg[(2,)]+=0.896993050102*x[2]
+            ref[(2,)]+=0.896993050102*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=0.578014262672*x[0] + (0.738188943595)*x[1]
+        ref[(0, 0)]=0.578014262672*x_ref[0] + (0.738188943595)*x_ref[1]
+        arg[(0, 1)]=0.128610685062*x[0] + (0.92155688086)*x[1]
+        ref[(0, 1)]=0.128610685062*x_ref[0] + (0.92155688086)*x_ref[1]
+        arg[(0, 2)]=0.618555855973*x[0] + (0.430481164325)*x[1]
+        ref[(0, 2)]=0.618555855973*x_ref[0] + (0.430481164325)*x_ref[1]
+        arg[(0, 3)]=0.375400196714*x[0] + (0.568253023178)*x[1]
+        ref[(0, 3)]=0.375400196714*x_ref[0] + (0.568253023178)*x_ref[1]
+        arg[(1, 0)]=0.250724356529*x[0] + (-0.647787929701)*x[1]
+        ref[(1, 0)]=0.250724356529*x_ref[0] + (-0.647787929701)*x_ref[1]
+        arg[(1, 1)]=0.750271623989*x[0] + (-0.149021708666)*x[1]
+        ref[(1, 1)]=0.750271623989*x_ref[0] + (-0.149021708666)*x_ref[1]
+        arg[(1, 2)]=-0.460473520436*x[0] + (0.915762619505)*x[1]
+        ref[(1, 2)]=-0.460473520436*x_ref[0] + (0.915762619505)*x_ref[1]
+        arg[(1, 3)]=0.816374377488*x[0] + (-0.30002352127)*x[1]
+        ref[(1, 3)]=0.816374377488*x_ref[0] + (-0.30002352127)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.429434515186*x[2]
+            ref[(0, 0)]+=0.429434515186*x_ref[2]
+            arg[(0, 1)]+=-0.368921519724*x[2]
+            ref[(0, 1)]+=-0.368921519724*x_ref[2]
+            arg[(0, 2)]+=-0.0292326941023*x[2]
+            ref[(0, 2)]+=-0.0292326941023*x_ref[2]
+            arg[(0, 3)]+=-0.349041240059*x[2]
+            ref[(0, 3)]+=-0.349041240059*x_ref[2]
+            arg[(1, 0)]+=-0.845122350923*x[2]
+            ref[(1, 0)]+=-0.845122350923*x_ref[2]
+            arg[(1, 1)]+=-0.889904757677*x[2]
+            ref[(1, 1)]+=-0.889904757677*x_ref[2]
+            arg[(1, 2)]+=0.406759524055*x[2]
+            ref[(1, 2)]+=0.406759524055*x_ref[2]
+            arg[(1, 3)]+=0.897913408972*x[2]
+            ref[(1, 3)]+=0.897913408972*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3),w)
+        ref = Data(0,(3, 3, 3),w_ref)
+        arg[(0, 0, 0)]=0.611254659758*x[0] + (0.775732272207)*x[1]
+        ref[(0, 0, 0)]=0.611254659758*x_ref[0] + (0.775732272207)*x_ref[1]
+        arg[(0, 0, 1)]=0.573713655604*x[0] + (0.373108144619)*x[1]
+        ref[(0, 0, 1)]=0.573713655604*x_ref[0] + (0.373108144619)*x_ref[1]
+        arg[(0, 0, 2)]=0.502661044093*x[0] + (0.768473575496)*x[1]
+        ref[(0, 0, 2)]=0.502661044093*x_ref[0] + (0.768473575496)*x_ref[1]
+        arg[(0, 1, 0)]=-0.587005071819*x[0] + (-0.183576441241)*x[1]
+        ref[(0, 1, 0)]=-0.587005071819*x_ref[0] + (-0.183576441241)*x_ref[1]
+        arg[(0, 1, 1)]=-0.647266162975*x[0] + (-0.402913370476)*x[1]
+        ref[(0, 1, 1)]=-0.647266162975*x_ref[0] + (-0.402913370476)*x_ref[1]
+        arg[(0, 1, 2)]=0.690784806087*x[0] + (0.260665354293)*x[1]
+        ref[(0, 1, 2)]=0.690784806087*x_ref[0] + (0.260665354293)*x_ref[1]
+        arg[(0, 2, 0)]=0.55308974928*x[0] + (0.391899224244)*x[1]
+        ref[(0, 2, 0)]=0.55308974928*x_ref[0] + (0.391899224244)*x_ref[1]
+        arg[(0, 2, 1)]=-0.647344391194*x[0] + (0.871078979493)*x[1]
+        ref[(0, 2, 1)]=-0.647344391194*x_ref[0] + (0.871078979493)*x_ref[1]
+        arg[(0, 2, 2)]=0.0386775864918*x[0] + (0.45058682331)*x[1]
+        ref[(0, 2, 2)]=0.0386775864918*x_ref[0] + (0.45058682331)*x_ref[1]
+        arg[(1, 0, 0)]=0.168239570009*x[0] + (0.804997256117)*x[1]
+        ref[(1, 0, 0)]=0.168239570009*x_ref[0] + (0.804997256117)*x_ref[1]
+        arg[(1, 0, 1)]=-0.684453232825*x[0] + (-0.144531183501)*x[1]
+        ref[(1, 0, 1)]=-0.684453232825*x_ref[0] + (-0.144531183501)*x_ref[1]
+        arg[(1, 0, 2)]=0.190226938363*x[0] + (-0.165096569131)*x[1]
+        ref[(1, 0, 2)]=0.190226938363*x_ref[0] + (-0.165096569131)*x_ref[1]
+        arg[(1, 1, 0)]=0.492929673301*x[0] + (-0.450986085472)*x[1]
+        ref[(1, 1, 0)]=0.492929673301*x_ref[0] + (-0.450986085472)*x_ref[1]
+        arg[(1, 1, 1)]=0.622507438324*x[0] + (-0.900418526655)*x[1]
+        ref[(1, 1, 1)]=0.622507438324*x_ref[0] + (-0.900418526655)*x_ref[1]
+        arg[(1, 1, 2)]=-0.452176788299*x[0] + (0.867505945764)*x[1]
+        ref[(1, 1, 2)]=-0.452176788299*x_ref[0] + (0.867505945764)*x_ref[1]
+        arg[(1, 2, 0)]=-0.829757235151*x[0] + (-0.852700458407)*x[1]
+        ref[(1, 2, 0)]=-0.829757235151*x_ref[0] + (-0.852700458407)*x_ref[1]
+        arg[(1, 2, 1)]=-0.352572374212*x[0] + (0.230637129038)*x[1]
+        ref[(1, 2, 1)]=-0.352572374212*x_ref[0] + (0.230637129038)*x_ref[1]
+        arg[(1, 2, 2)]=-0.640158540555*x[0] + (0.2674217652)*x[1]
+        ref[(1, 2, 2)]=-0.640158540555*x_ref[0] + (0.2674217652)*x_ref[1]
+        arg[(2, 0, 0)]=-0.319421208875*x[0] + (0.237485397431)*x[1]
+        ref[(2, 0, 0)]=-0.319421208875*x_ref[0] + (0.237485397431)*x_ref[1]
+        arg[(2, 0, 1)]=0.0532707363573*x[0] + (-0.866790111289)*x[1]
+        ref[(2, 0, 1)]=0.0532707363573*x_ref[0] + (-0.866790111289)*x_ref[1]
+        arg[(2, 0, 2)]=0.707677831892*x[0] + (-0.793328101896)*x[1]
+        ref[(2, 0, 2)]=0.707677831892*x_ref[0] + (-0.793328101896)*x_ref[1]
+        arg[(2, 1, 0)]=0.490204992055*x[0] + (-0.431451724988)*x[1]
+        ref[(2, 1, 0)]=0.490204992055*x_ref[0] + (-0.431451724988)*x_ref[1]
+        arg[(2, 1, 1)]=-0.759940770099*x[0] + (-0.381741355473)*x[1]
+        ref[(2, 1, 1)]=-0.759940770099*x_ref[0] + (-0.381741355473)*x_ref[1]
+        arg[(2, 1, 2)]=0.53914332232*x[0] + (-0.805961968819)*x[1]
+        ref[(2, 1, 2)]=0.53914332232*x_ref[0] + (-0.805961968819)*x_ref[1]
+        arg[(2, 2, 0)]=-0.226940291294*x[0] + (-0.0291096305013)*x[1]
+        ref[(2, 2, 0)]=-0.226940291294*x_ref[0] + (-0.0291096305013)*x_ref[1]
+        arg[(2, 2, 1)]=-0.793695022137*x[0] + (-0.901526005403)*x[1]
+        ref[(2, 2, 1)]=-0.793695022137*x_ref[0] + (-0.901526005403)*x_ref[1]
+        arg[(2, 2, 2)]=0.182167032526*x[0] + (-0.0043779840736)*x[1]
+        ref[(2, 2, 2)]=0.182167032526*x_ref[0] + (-0.0043779840736)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.549900327604*x[2]
+            ref[(0, 0, 0)]+=0.549900327604*x_ref[2]
+            arg[(0, 0, 1)]+=0.851573839441*x[2]
+            ref[(0, 0, 1)]+=0.851573839441*x_ref[2]
+            arg[(0, 0, 2)]+=-0.428441469558*x[2]
+            ref[(0, 0, 2)]+=-0.428441469558*x_ref[2]
+            arg[(0, 1, 0)]+=-0.128443988894*x[2]
+            ref[(0, 1, 0)]+=-0.128443988894*x_ref[2]
+            arg[(0, 1, 1)]+=0.687728269735*x[2]
+            ref[(0, 1, 1)]+=0.687728269735*x_ref[2]
+            arg[(0, 1, 2)]+=0.701198050099*x[2]
+            ref[(0, 1, 2)]+=0.701198050099*x_ref[2]
+            arg[(0, 2, 0)]+=0.835501622955*x[2]
+            ref[(0, 2, 0)]+=0.835501622955*x_ref[2]
+            arg[(0, 2, 1)]+=0.648596972988*x[2]
+            ref[(0, 2, 1)]+=0.648596972988*x_ref[2]
+            arg[(0, 2, 2)]+=0.873977676277*x[2]
+            ref[(0, 2, 2)]+=0.873977676277*x_ref[2]
+            arg[(1, 0, 0)]+=0.711192402021*x[2]
+            ref[(1, 0, 0)]+=0.711192402021*x_ref[2]
+            arg[(1, 0, 1)]+=0.812503133633*x[2]
+            ref[(1, 0, 1)]+=0.812503133633*x_ref[2]
+            arg[(1, 0, 2)]+=-0.655978868317*x[2]
+            ref[(1, 0, 2)]+=-0.655978868317*x_ref[2]
+            arg[(1, 1, 0)]+=0.844997378601*x[2]
+            ref[(1, 1, 0)]+=0.844997378601*x_ref[2]
+            arg[(1, 1, 1)]+=0.966825602933*x[2]
+            ref[(1, 1, 1)]+=0.966825602933*x_ref[2]
+            arg[(1, 1, 2)]+=0.0222973978547*x[2]
+            ref[(1, 1, 2)]+=0.0222973978547*x_ref[2]
+            arg[(1, 2, 0)]+=0.337617122481*x[2]
+            ref[(1, 2, 0)]+=0.337617122481*x_ref[2]
+            arg[(1, 2, 1)]+=-0.758099294651*x[2]
+            ref[(1, 2, 1)]+=-0.758099294651*x_ref[2]
+            arg[(1, 2, 2)]+=-0.490701810352*x[2]
+            ref[(1, 2, 2)]+=-0.490701810352*x_ref[2]
+            arg[(2, 0, 0)]+=-0.994961531637*x[2]
+            ref[(2, 0, 0)]+=-0.994961531637*x_ref[2]
+            arg[(2, 0, 1)]+=-0.157006730921*x[2]
+            ref[(2, 0, 1)]+=-0.157006730921*x_ref[2]
+            arg[(2, 0, 2)]+=0.283925272237*x[2]
+            ref[(2, 0, 2)]+=0.283925272237*x_ref[2]
+            arg[(2, 1, 0)]+=-0.851716566442*x[2]
+            ref[(2, 1, 0)]+=-0.851716566442*x_ref[2]
+            arg[(2, 1, 1)]+=0.773162432465*x[2]
+            ref[(2, 1, 1)]+=0.773162432465*x_ref[2]
+            arg[(2, 1, 2)]+=0.462627181769*x[2]
+            ref[(2, 1, 2)]+=0.462627181769*x_ref[2]
+            arg[(2, 2, 0)]+=0.30499552396*x[2]
+            ref[(2, 2, 0)]+=0.30499552396*x_ref[2]
+            arg[(2, 2, 1)]+=-0.778512875683*x[2]
+            ref[(2, 2, 1)]+=-0.778512875683*x_ref[2]
+            arg[(2, 2, 2)]+=0.365629140347*x[2]
+            ref[(2, 2, 2)]+=0.365629140347*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2, 4),w)
+        ref = Data(0,(3, 3, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.412329884514*x[0] + (-0.0160734125314)*x[1]
+        ref[(0, 0, 0, 0)]=-0.412329884514*x_ref[0] + (-0.0160734125314)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.0723829298737*x[0] + (0.334349753968)*x[1]
+        ref[(0, 0, 0, 1)]=0.0723829298737*x_ref[0] + (0.334349753968)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.11046633963*x[0] + (-0.452745790587)*x[1]
+        ref[(0, 0, 0, 2)]=-0.11046633963*x_ref[0] + (-0.452745790587)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.434348404283*x[0] + (0.634047195632)*x[1]
+        ref[(0, 0, 0, 3)]=0.434348404283*x_ref[0] + (0.634047195632)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.0328390907919*x[0] + (-0.904427431882)*x[1]
+        ref[(0, 0, 1, 0)]=-0.0328390907919*x_ref[0] + (-0.904427431882)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.71115836696*x[0] + (0.458218178159)*x[1]
+        ref[(0, 0, 1, 1)]=-0.71115836696*x_ref[0] + (0.458218178159)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.0384094231624*x[0] + (0.129507559585)*x[1]
+        ref[(0, 0, 1, 2)]=-0.0384094231624*x_ref[0] + (0.129507559585)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.141642675617*x[0] + (0.600182940894)*x[1]
+        ref[(0, 0, 1, 3)]=-0.141642675617*x_ref[0] + (0.600182940894)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.660152585314*x[0] + (0.0429197284267)*x[1]
+        ref[(0, 1, 0, 0)]=0.660152585314*x_ref[0] + (0.0429197284267)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.181219751947*x[0] + (-0.158736095047)*x[1]
+        ref[(0, 1, 0, 1)]=0.181219751947*x_ref[0] + (-0.158736095047)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.274007312483*x[0] + (0.649957457731)*x[1]
+        ref[(0, 1, 0, 2)]=-0.274007312483*x_ref[0] + (0.649957457731)*x_ref[1]
+        arg[(0, 1, 0, 3)]=-0.0817690488347*x[0] + (-0.925106215986)*x[1]
+        ref[(0, 1, 0, 3)]=-0.0817690488347*x_ref[0] + (-0.925106215986)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.333190755555*x[0] + (0.116897399512)*x[1]
+        ref[(0, 1, 1, 0)]=-0.333190755555*x_ref[0] + (0.116897399512)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.858128850868*x[0] + (0.870354188161)*x[1]
+        ref[(0, 1, 1, 1)]=0.858128850868*x_ref[0] + (0.870354188161)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.178745387311*x[0] + (0.300288364468)*x[1]
+        ref[(0, 1, 1, 2)]=-0.178745387311*x_ref[0] + (0.300288364468)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.652206213901*x[0] + (-0.779045384572)*x[1]
+        ref[(0, 1, 1, 3)]=0.652206213901*x_ref[0] + (-0.779045384572)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.880797348229*x[0] + (0.374461024507)*x[1]
+        ref[(0, 2, 0, 0)]=0.880797348229*x_ref[0] + (0.374461024507)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.156084366633*x[0] + (-0.864864451886)*x[1]
+        ref[(0, 2, 0, 1)]=-0.156084366633*x_ref[0] + (-0.864864451886)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.16052482381*x[0] + (-0.421677513981)*x[1]
+        ref[(0, 2, 0, 2)]=0.16052482381*x_ref[0] + (-0.421677513981)*x_ref[1]
+        arg[(0, 2, 0, 3)]=-0.378040778596*x[0] + (0.635162660178)*x[1]
+        ref[(0, 2, 0, 3)]=-0.378040778596*x_ref[0] + (0.635162660178)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.6088300387*x[0] + (-0.382792558365)*x[1]
+        ref[(0, 2, 1, 0)]=-0.6088300387*x_ref[0] + (-0.382792558365)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.677327095704*x[0] + (-0.244586104541)*x[1]
+        ref[(0, 2, 1, 1)]=-0.677327095704*x_ref[0] + (-0.244586104541)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.784790192818*x[0] + (0.788924449064)*x[1]
+        ref[(0, 2, 1, 2)]=-0.784790192818*x_ref[0] + (0.788924449064)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.0460815522969*x[0] + (-0.614607258437)*x[1]
+        ref[(0, 2, 1, 3)]=0.0460815522969*x_ref[0] + (-0.614607258437)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.18589738331*x[0] + (0.556490249693)*x[1]
+        ref[(1, 0, 0, 0)]=-0.18589738331*x_ref[0] + (0.556490249693)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.750342920504*x[0] + (-0.580694041193)*x[1]
+        ref[(1, 0, 0, 1)]=0.750342920504*x_ref[0] + (-0.580694041193)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.859906706919*x[0] + (0.950916423076)*x[1]
+        ref[(1, 0, 0, 2)]=0.859906706919*x_ref[0] + (0.950916423076)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.198666870398*x[0] + (0.25036208037)*x[1]
+        ref[(1, 0, 0, 3)]=-0.198666870398*x_ref[0] + (0.25036208037)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.543716821425*x[0] + (0.196216560113)*x[1]
+        ref[(1, 0, 1, 0)]=0.543716821425*x_ref[0] + (0.196216560113)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.0325062635545*x[0] + (0.533370664242)*x[1]
+        ref[(1, 0, 1, 1)]=0.0325062635545*x_ref[0] + (0.533370664242)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.998593863498*x[0] + (0.965424789679)*x[1]
+        ref[(1, 0, 1, 2)]=0.998593863498*x_ref[0] + (0.965424789679)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.719315129264*x[0] + (-0.787768172241)*x[1]
+        ref[(1, 0, 1, 3)]=-0.719315129264*x_ref[0] + (-0.787768172241)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.812555878248*x[0] + (0.813499981386)*x[1]
+        ref[(1, 1, 0, 0)]=0.812555878248*x_ref[0] + (0.813499981386)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.0220697561453*x[0] + (0.689691666238)*x[1]
+        ref[(1, 1, 0, 1)]=0.0220697561453*x_ref[0] + (0.689691666238)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.466080314756*x[0] + (0.0920639319903)*x[1]
+        ref[(1, 1, 0, 2)]=-0.466080314756*x_ref[0] + (0.0920639319903)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.679478358584*x[0] + (-0.293331009954)*x[1]
+        ref[(1, 1, 0, 3)]=-0.679478358584*x_ref[0] + (-0.293331009954)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.368637169098*x[0] + (0.880622082125)*x[1]
+        ref[(1, 1, 1, 0)]=-0.368637169098*x_ref[0] + (0.880622082125)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.455688317147*x[0] + (0.694147651031)*x[1]
+        ref[(1, 1, 1, 1)]=-0.455688317147*x_ref[0] + (0.694147651031)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.613709630844*x[0] + (-0.886872718267)*x[1]
+        ref[(1, 1, 1, 2)]=-0.613709630844*x_ref[0] + (-0.886872718267)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.397350065896*x[0] + (-0.815519395773)*x[1]
+        ref[(1, 1, 1, 3)]=-0.397350065896*x_ref[0] + (-0.815519395773)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.134689151537*x[0] + (-0.20353231043)*x[1]
+        ref[(1, 2, 0, 0)]=0.134689151537*x_ref[0] + (-0.20353231043)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.0286753741314*x[0] + (-0.858679298214)*x[1]
+        ref[(1, 2, 0, 1)]=0.0286753741314*x_ref[0] + (-0.858679298214)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.918988459173*x[0] + (0.475839370315)*x[1]
+        ref[(1, 2, 0, 2)]=-0.918988459173*x_ref[0] + (0.475839370315)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.578331283234*x[0] + (0.814142804136)*x[1]
+        ref[(1, 2, 0, 3)]=0.578331283234*x_ref[0] + (0.814142804136)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.227794104564*x[0] + (-0.83464498107)*x[1]
+        ref[(1, 2, 1, 0)]=0.227794104564*x_ref[0] + (-0.83464498107)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.753230489994*x[0] + (-0.44587495254)*x[1]
+        ref[(1, 2, 1, 1)]=-0.753230489994*x_ref[0] + (-0.44587495254)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.170361934967*x[0] + (0.262758769717)*x[1]
+        ref[(1, 2, 1, 2)]=-0.170361934967*x_ref[0] + (0.262758769717)*x_ref[1]
+        arg[(1, 2, 1, 3)]=-0.870182931987*x[0] + (0.801754126649)*x[1]
+        ref[(1, 2, 1, 3)]=-0.870182931987*x_ref[0] + (0.801754126649)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.557401969531*x[0] + (0.543293156123)*x[1]
+        ref[(2, 0, 0, 0)]=0.557401969531*x_ref[0] + (0.543293156123)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.255336999897*x[0] + (0.785117340194)*x[1]
+        ref[(2, 0, 0, 1)]=-0.255336999897*x_ref[0] + (0.785117340194)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.260140972435*x[0] + (0.23890589323)*x[1]
+        ref[(2, 0, 0, 2)]=0.260140972435*x_ref[0] + (0.23890589323)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.205541964887*x[0] + (-0.886051905804)*x[1]
+        ref[(2, 0, 0, 3)]=-0.205541964887*x_ref[0] + (-0.886051905804)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.838639220675*x[0] + (-0.263160587103)*x[1]
+        ref[(2, 0, 1, 0)]=-0.838639220675*x_ref[0] + (-0.263160587103)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.206935205495*x[0] + (0.497359341916)*x[1]
+        ref[(2, 0, 1, 1)]=-0.206935205495*x_ref[0] + (0.497359341916)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.140720080424*x[0] + (-0.0248216368976)*x[1]
+        ref[(2, 0, 1, 2)]=0.140720080424*x_ref[0] + (-0.0248216368976)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.722582273788*x[0] + (0.172776138424)*x[1]
+        ref[(2, 0, 1, 3)]=-0.722582273788*x_ref[0] + (0.172776138424)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.254611015689*x[0] + (0.67812793212)*x[1]
+        ref[(2, 1, 0, 0)]=0.254611015689*x_ref[0] + (0.67812793212)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.240821832819*x[0] + (-0.27159251197)*x[1]
+        ref[(2, 1, 0, 1)]=0.240821832819*x_ref[0] + (-0.27159251197)*x_ref[1]
+        arg[(2, 1, 0, 2)]=0.297984046711*x[0] + (-0.321554805918)*x[1]
+        ref[(2, 1, 0, 2)]=0.297984046711*x_ref[0] + (-0.321554805918)*x_ref[1]
+        arg[(2, 1, 0, 3)]=0.5355315741*x[0] + (-0.700793334126)*x[1]
+        ref[(2, 1, 0, 3)]=0.5355315741*x_ref[0] + (-0.700793334126)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.823990110327*x[0] + (-0.754928288236)*x[1]
+        ref[(2, 1, 1, 0)]=-0.823990110327*x_ref[0] + (-0.754928288236)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.639678278184*x[0] + (0.531122585747)*x[1]
+        ref[(2, 1, 1, 1)]=-0.639678278184*x_ref[0] + (0.531122585747)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.811910169688*x[0] + (-0.984542180204)*x[1]
+        ref[(2, 1, 1, 2)]=0.811910169688*x_ref[0] + (-0.984542180204)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.598205436404*x[0] + (-0.584678317293)*x[1]
+        ref[(2, 1, 1, 3)]=-0.598205436404*x_ref[0] + (-0.584678317293)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.0284448981955*x[0] + (-0.787215699234)*x[1]
+        ref[(2, 2, 0, 0)]=-0.0284448981955*x_ref[0] + (-0.787215699234)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.784306267598*x[0] + (0.129825803862)*x[1]
+        ref[(2, 2, 0, 1)]=-0.784306267598*x_ref[0] + (0.129825803862)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.532054816798*x[0] + (0.770624498665)*x[1]
+        ref[(2, 2, 0, 2)]=-0.532054816798*x_ref[0] + (0.770624498665)*x_ref[1]
+        arg[(2, 2, 0, 3)]=-0.218033122149*x[0] + (0.53211781813)*x[1]
+        ref[(2, 2, 0, 3)]=-0.218033122149*x_ref[0] + (0.53211781813)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.47913351661*x[0] + (0.351282627483)*x[1]
+        ref[(2, 2, 1, 0)]=-0.47913351661*x_ref[0] + (0.351282627483)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.110346701288*x[0] + (-0.165153746822)*x[1]
+        ref[(2, 2, 1, 1)]=-0.110346701288*x_ref[0] + (-0.165153746822)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.372962745708*x[0] + (0.0775501896947)*x[1]
+        ref[(2, 2, 1, 2)]=-0.372962745708*x_ref[0] + (0.0775501896947)*x_ref[1]
+        arg[(2, 2, 1, 3)]=0.680396577286*x[0] + (0.592922032255)*x[1]
+        ref[(2, 2, 1, 3)]=0.680396577286*x_ref[0] + (0.592922032255)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.25786698413*x[2]
+            ref[(0, 0, 0, 0)]+=-0.25786698413*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.113671487273*x[2]
+            ref[(0, 0, 0, 1)]+=-0.113671487273*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.46901073505*x[2]
+            ref[(0, 0, 0, 2)]+=0.46901073505*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.0167587767065*x[2]
+            ref[(0, 0, 0, 3)]+=0.0167587767065*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.665867090379*x[2]
+            ref[(0, 0, 1, 0)]+=0.665867090379*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.119812804466*x[2]
+            ref[(0, 0, 1, 1)]+=0.119812804466*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.514651714086*x[2]
+            ref[(0, 0, 1, 2)]+=0.514651714086*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.284950775428*x[2]
+            ref[(0, 0, 1, 3)]+=0.284950775428*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.982624167901*x[2]
+            ref[(0, 1, 0, 0)]+=-0.982624167901*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.310828000158*x[2]
+            ref[(0, 1, 0, 1)]+=-0.310828000158*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.820224717265*x[2]
+            ref[(0, 1, 0, 2)]+=0.820224717265*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.0661432327045*x[2]
+            ref[(0, 1, 0, 3)]+=-0.0661432327045*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.462728176674*x[2]
+            ref[(0, 1, 1, 0)]+=-0.462728176674*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.947421950984*x[2]
+            ref[(0, 1, 1, 1)]+=-0.947421950984*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.996757723469*x[2]
+            ref[(0, 1, 1, 2)]+=0.996757723469*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.575338628147*x[2]
+            ref[(0, 1, 1, 3)]+=-0.575338628147*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.234814416687*x[2]
+            ref[(0, 2, 0, 0)]+=-0.234814416687*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.773766123462*x[2]
+            ref[(0, 2, 0, 1)]+=0.773766123462*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.066195334905*x[2]
+            ref[(0, 2, 0, 2)]+=0.066195334905*x_ref[2]
+            arg[(0, 2, 0, 3)]+=0.030023121823*x[2]
+            ref[(0, 2, 0, 3)]+=0.030023121823*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.392957678221*x[2]
+            ref[(0, 2, 1, 0)]+=-0.392957678221*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.579382659118*x[2]
+            ref[(0, 2, 1, 1)]+=-0.579382659118*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.632159097602*x[2]
+            ref[(0, 2, 1, 2)]+=-0.632159097602*x_ref[2]
+            arg[(0, 2, 1, 3)]+=0.700579842886*x[2]
+            ref[(0, 2, 1, 3)]+=0.700579842886*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.0124209201761*x[2]
+            ref[(1, 0, 0, 0)]+=-0.0124209201761*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.386347719308*x[2]
+            ref[(1, 0, 0, 1)]+=-0.386347719308*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.433415521151*x[2]
+            ref[(1, 0, 0, 2)]+=-0.433415521151*x_ref[2]
+            arg[(1, 0, 0, 3)]+=-0.50082161297*x[2]
+            ref[(1, 0, 0, 3)]+=-0.50082161297*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.556872776697*x[2]
+            ref[(1, 0, 1, 0)]+=-0.556872776697*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.943539152977*x[2]
+            ref[(1, 0, 1, 1)]+=0.943539152977*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.866308818694*x[2]
+            ref[(1, 0, 1, 2)]+=0.866308818694*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.862923077161*x[2]
+            ref[(1, 0, 1, 3)]+=0.862923077161*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.867694850103*x[2]
+            ref[(1, 1, 0, 0)]+=-0.867694850103*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.0422038175752*x[2]
+            ref[(1, 1, 0, 1)]+=0.0422038175752*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.917001877712*x[2]
+            ref[(1, 1, 0, 2)]+=-0.917001877712*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.100809413691*x[2]
+            ref[(1, 1, 0, 3)]+=-0.100809413691*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.754169183008*x[2]
+            ref[(1, 1, 1, 0)]+=0.754169183008*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.382007556336*x[2]
+            ref[(1, 1, 1, 1)]+=0.382007556336*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.946601270885*x[2]
+            ref[(1, 1, 1, 2)]+=-0.946601270885*x_ref[2]
+            arg[(1, 1, 1, 3)]+=0.347447861021*x[2]
+            ref[(1, 1, 1, 3)]+=0.347447861021*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.907305691212*x[2]
+            ref[(1, 2, 0, 0)]+=0.907305691212*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.474716605417*x[2]
+            ref[(1, 2, 0, 1)]+=-0.474716605417*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.775314664705*x[2]
+            ref[(1, 2, 0, 2)]+=0.775314664705*x_ref[2]
+            arg[(1, 2, 0, 3)]+=-0.37727785918*x[2]
+            ref[(1, 2, 0, 3)]+=-0.37727785918*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.965489714481*x[2]
+            ref[(1, 2, 1, 0)]+=0.965489714481*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.334796931199*x[2]
+            ref[(1, 2, 1, 1)]+=0.334796931199*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.390777634936*x[2]
+            ref[(1, 2, 1, 2)]+=0.390777634936*x_ref[2]
+            arg[(1, 2, 1, 3)]+=-0.0941244381989*x[2]
+            ref[(1, 2, 1, 3)]+=-0.0941244381989*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.168049350211*x[2]
+            ref[(2, 0, 0, 0)]+=-0.168049350211*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.870552176866*x[2]
+            ref[(2, 0, 0, 1)]+=-0.870552176866*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.13635687732*x[2]
+            ref[(2, 0, 0, 2)]+=0.13635687732*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.374017262406*x[2]
+            ref[(2, 0, 0, 3)]+=-0.374017262406*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.623809712805*x[2]
+            ref[(2, 0, 1, 0)]+=-0.623809712805*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.115315384803*x[2]
+            ref[(2, 0, 1, 1)]+=-0.115315384803*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.498336935326*x[2]
+            ref[(2, 0, 1, 2)]+=-0.498336935326*x_ref[2]
+            arg[(2, 0, 1, 3)]+=-0.433428579054*x[2]
+            ref[(2, 0, 1, 3)]+=-0.433428579054*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.911101745001*x[2]
+            ref[(2, 1, 0, 0)]+=-0.911101745001*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.327901059359*x[2]
+            ref[(2, 1, 0, 1)]+=-0.327901059359*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.852922358524*x[2]
+            ref[(2, 1, 0, 2)]+=-0.852922358524*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.0578812706834*x[2]
+            ref[(2, 1, 0, 3)]+=-0.0578812706834*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.92193167602*x[2]
+            ref[(2, 1, 1, 0)]+=-0.92193167602*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.503503118091*x[2]
+            ref[(2, 1, 1, 1)]+=0.503503118091*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.428441943073*x[2]
+            ref[(2, 1, 1, 2)]+=-0.428441943073*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.518847028441*x[2]
+            ref[(2, 1, 1, 3)]+=0.518847028441*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.414784846011*x[2]
+            ref[(2, 2, 0, 0)]+=-0.414784846011*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.583324135735*x[2]
+            ref[(2, 2, 0, 1)]+=0.583324135735*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.00484682995042*x[2]
+            ref[(2, 2, 0, 2)]+=-0.00484682995042*x_ref[2]
+            arg[(2, 2, 0, 3)]+=-0.200491579495*x[2]
+            ref[(2, 2, 0, 3)]+=-0.200491579495*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.801117359629*x[2]
+            ref[(2, 2, 1, 0)]+=0.801117359629*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.268198683463*x[2]
+            ref[(2, 2, 1, 1)]+=0.268198683463*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.732132399896*x[2]
+            ref[(2, 2, 1, 2)]+=0.732132399896*x_ref[2]
+            arg[(2, 2, 1, 3)]+=-0.707626145367*x[2]
+            ref[(2, 2, 1, 3)]+=-0.707626145367*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.994360060082*x[0] + (0.717962715898)*x[1]
+        ref=-0.994360060082*x_ref[0] + (0.717962715898)*x_ref[1]
+        if dim==3:
+            arg+=(0.408040092263)*x[2]
+            ref+=(0.408040092263)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.0614765460942*x[0] + (0.866515321491)*x[1]
+        ref[(0,)]=-0.0614765460942*x_ref[0] + (0.866515321491)*x_ref[1]
+        arg[(1,)]=-0.133408958168*x[0] + (0.810927790425)*x[1]
+        ref[(1,)]=-0.133408958168*x_ref[0] + (0.810927790425)*x_ref[1]
+        arg[(2,)]=-0.107216893294*x[0] + (0.721890001554)*x[1]
+        ref[(2,)]=-0.107216893294*x_ref[0] + (0.721890001554)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.859231991607*x[2]
+            ref[(0,)]+=0.859231991607*x_ref[2]
+            arg[(1,)]+=-0.54035866092*x[2]
+            ref[(1,)]+=-0.54035866092*x_ref[2]
+            arg[(2,)]+=-0.0977746200711*x[2]
+            ref[(2,)]+=-0.0977746200711*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=-0.778962243119*x[0] + (-0.0155682224767)*x[1]
+        ref[(0, 0)]=-0.778962243119*x_ref[0] + (-0.0155682224767)*x_ref[1]
+        arg[(0, 1)]=0.848887883484*x[0] + (0.731216897374)*x[1]
+        ref[(0, 1)]=0.848887883484*x_ref[0] + (0.731216897374)*x_ref[1]
+        arg[(0, 2)]=0.890343336147*x[0] + (-0.911917408593)*x[1]
+        ref[(0, 2)]=0.890343336147*x_ref[0] + (-0.911917408593)*x_ref[1]
+        arg[(1, 0)]=-0.0455017253404*x[0] + (0.488243541083)*x[1]
+        ref[(1, 0)]=-0.0455017253404*x_ref[0] + (0.488243541083)*x_ref[1]
+        arg[(1, 1)]=0.169165950611*x[0] + (-0.804452445571)*x[1]
+        ref[(1, 1)]=0.169165950611*x_ref[0] + (-0.804452445571)*x_ref[1]
+        arg[(1, 2)]=-0.754545849855*x[0] + (-0.237138647698)*x[1]
+        ref[(1, 2)]=-0.754545849855*x_ref[0] + (-0.237138647698)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.283123155212*x[2]
+            ref[(0, 0)]+=-0.283123155212*x_ref[2]
+            arg[(0, 1)]+=0.871085730866*x[2]
+            ref[(0, 1)]+=0.871085730866*x_ref[2]
+            arg[(0, 2)]+=-0.38020290526*x[2]
+            ref[(0, 2)]+=-0.38020290526*x_ref[2]
+            arg[(1, 0)]+=0.917589202437*x[2]
+            ref[(1, 0)]+=0.917589202437*x_ref[2]
+            arg[(1, 1)]+=0.922301238635*x[2]
+            ref[(1, 1)]+=0.922301238635*x_ref[2]
+            arg[(1, 2)]+=-0.991370982825*x[2]
+            ref[(1, 2)]+=-0.991370982825*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=-0.889696437397*x[0] + (0.326432480718)*x[1]
+        ref[(0, 0, 0)]=-0.889696437397*x_ref[0] + (0.326432480718)*x_ref[1]
+        arg[(0, 0, 1)]=0.23468697154*x[0] + (-0.380489829009)*x[1]
+        ref[(0, 0, 1)]=0.23468697154*x_ref[0] + (-0.380489829009)*x_ref[1]
+        arg[(0, 0, 2)]=-0.620390055564*x[0] + (0.934770485366)*x[1]
+        ref[(0, 0, 2)]=-0.620390055564*x_ref[0] + (0.934770485366)*x_ref[1]
+        arg[(0, 1, 0)]=-0.818826407036*x[0] + (0.559971761018)*x[1]
+        ref[(0, 1, 0)]=-0.818826407036*x_ref[0] + (0.559971761018)*x_ref[1]
+        arg[(0, 1, 1)]=0.58259923886*x[0] + (-0.29720732013)*x[1]
+        ref[(0, 1, 1)]=0.58259923886*x_ref[0] + (-0.29720732013)*x_ref[1]
+        arg[(0, 1, 2)]=-0.415667073805*x[0] + (-0.0634165396358)*x[1]
+        ref[(0, 1, 2)]=-0.415667073805*x_ref[0] + (-0.0634165396358)*x_ref[1]
+        arg[(1, 0, 0)]=0.84737584451*x[0] + (-0.0992881002549)*x[1]
+        ref[(1, 0, 0)]=0.84737584451*x_ref[0] + (-0.0992881002549)*x_ref[1]
+        arg[(1, 0, 1)]=-0.557445760661*x[0] + (-0.239935232331)*x[1]
+        ref[(1, 0, 1)]=-0.557445760661*x_ref[0] + (-0.239935232331)*x_ref[1]
+        arg[(1, 0, 2)]=0.962023578932*x[0] + (0.389449729994)*x[1]
+        ref[(1, 0, 2)]=0.962023578932*x_ref[0] + (0.389449729994)*x_ref[1]
+        arg[(1, 1, 0)]=-0.551339970206*x[0] + (-0.0240119723576)*x[1]
+        ref[(1, 1, 0)]=-0.551339970206*x_ref[0] + (-0.0240119723576)*x_ref[1]
+        arg[(1, 1, 1)]=0.785236396173*x[0] + (-0.755610864963)*x[1]
+        ref[(1, 1, 1)]=0.785236396173*x_ref[0] + (-0.755610864963)*x_ref[1]
+        arg[(1, 1, 2)]=-0.28694791076*x[0] + (-0.0946929030941)*x[1]
+        ref[(1, 1, 2)]=-0.28694791076*x_ref[0] + (-0.0946929030941)*x_ref[1]
+        arg[(2, 0, 0)]=0.22075384624*x[0] + (-0.345298557148)*x[1]
+        ref[(2, 0, 0)]=0.22075384624*x_ref[0] + (-0.345298557148)*x_ref[1]
+        arg[(2, 0, 1)]=0.589221931587*x[0] + (-0.293121817438)*x[1]
+        ref[(2, 0, 1)]=0.589221931587*x_ref[0] + (-0.293121817438)*x_ref[1]
+        arg[(2, 0, 2)]=0.237461285178*x[0] + (-0.870359941024)*x[1]
+        ref[(2, 0, 2)]=0.237461285178*x_ref[0] + (-0.870359941024)*x_ref[1]
+        arg[(2, 1, 0)]=-0.52585101566*x[0] + (-0.20389398109)*x[1]
+        ref[(2, 1, 0)]=-0.52585101566*x_ref[0] + (-0.20389398109)*x_ref[1]
+        arg[(2, 1, 1)]=0.419073977552*x[0] + (-0.0761652974857)*x[1]
+        ref[(2, 1, 1)]=0.419073977552*x_ref[0] + (-0.0761652974857)*x_ref[1]
+        arg[(2, 1, 2)]=0.366266056249*x[0] + (-0.570188417722)*x[1]
+        ref[(2, 1, 2)]=0.366266056249*x_ref[0] + (-0.570188417722)*x_ref[1]
+        arg[(3, 0, 0)]=0.190507018872*x[0] + (-0.825363711779)*x[1]
+        ref[(3, 0, 0)]=0.190507018872*x_ref[0] + (-0.825363711779)*x_ref[1]
+        arg[(3, 0, 1)]=0.799458546722*x[0] + (-0.0724186838429)*x[1]
+        ref[(3, 0, 1)]=0.799458546722*x_ref[0] + (-0.0724186838429)*x_ref[1]
+        arg[(3, 0, 2)]=0.368428552413*x[0] + (-0.408237109413)*x[1]
+        ref[(3, 0, 2)]=0.368428552413*x_ref[0] + (-0.408237109413)*x_ref[1]
+        arg[(3, 1, 0)]=-0.348763158941*x[0] + (-0.907672573185)*x[1]
+        ref[(3, 1, 0)]=-0.348763158941*x_ref[0] + (-0.907672573185)*x_ref[1]
+        arg[(3, 1, 1)]=-0.894649142136*x[0] + (-0.164939007751)*x[1]
+        ref[(3, 1, 1)]=-0.894649142136*x_ref[0] + (-0.164939007751)*x_ref[1]
+        arg[(3, 1, 2)]=-0.31853123786*x[0] + (-0.624972948915)*x[1]
+        ref[(3, 1, 2)]=-0.31853123786*x_ref[0] + (-0.624972948915)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.461680732094*x[2]
+            ref[(0, 0, 0)]+=0.461680732094*x_ref[2]
+            arg[(0, 0, 1)]+=0.246911327955*x[2]
+            ref[(0, 0, 1)]+=0.246911327955*x_ref[2]
+            arg[(0, 0, 2)]+=-0.29873398137*x[2]
+            ref[(0, 0, 2)]+=-0.29873398137*x_ref[2]
+            arg[(0, 1, 0)]+=-0.286778001018*x[2]
+            ref[(0, 1, 0)]+=-0.286778001018*x_ref[2]
+            arg[(0, 1, 1)]+=0.153908872158*x[2]
+            ref[(0, 1, 1)]+=0.153908872158*x_ref[2]
+            arg[(0, 1, 2)]+=-0.586717318407*x[2]
+            ref[(0, 1, 2)]+=-0.586717318407*x_ref[2]
+            arg[(1, 0, 0)]+=-0.384733178876*x[2]
+            ref[(1, 0, 0)]+=-0.384733178876*x_ref[2]
+            arg[(1, 0, 1)]+=-0.486152064943*x[2]
+            ref[(1, 0, 1)]+=-0.486152064943*x_ref[2]
+            arg[(1, 0, 2)]+=0.0459856420724*x[2]
+            ref[(1, 0, 2)]+=0.0459856420724*x_ref[2]
+            arg[(1, 1, 0)]+=0.0842312719822*x[2]
+            ref[(1, 1, 0)]+=0.0842312719822*x_ref[2]
+            arg[(1, 1, 1)]+=0.471691081859*x[2]
+            ref[(1, 1, 1)]+=0.471691081859*x_ref[2]
+            arg[(1, 1, 2)]+=0.580966055819*x[2]
+            ref[(1, 1, 2)]+=0.580966055819*x_ref[2]
+            arg[(2, 0, 0)]+=-0.813895234652*x[2]
+            ref[(2, 0, 0)]+=-0.813895234652*x_ref[2]
+            arg[(2, 0, 1)]+=-0.68654008506*x[2]
+            ref[(2, 0, 1)]+=-0.68654008506*x_ref[2]
+            arg[(2, 0, 2)]+=0.833435273817*x[2]
+            ref[(2, 0, 2)]+=0.833435273817*x_ref[2]
+            arg[(2, 1, 0)]+=-0.05382921609*x[2]
+            ref[(2, 1, 0)]+=-0.05382921609*x_ref[2]
+            arg[(2, 1, 1)]+=0.306898158829*x[2]
+            ref[(2, 1, 1)]+=0.306898158829*x_ref[2]
+            arg[(2, 1, 2)]+=0.581834260176*x[2]
+            ref[(2, 1, 2)]+=0.581834260176*x_ref[2]
+            arg[(3, 0, 0)]+=-0.853727778901*x[2]
+            ref[(3, 0, 0)]+=-0.853727778901*x_ref[2]
+            arg[(3, 0, 1)]+=-0.214510217355*x[2]
+            ref[(3, 0, 1)]+=-0.214510217355*x_ref[2]
+            arg[(3, 0, 2)]+=-0.349629627145*x[2]
+            ref[(3, 0, 2)]+=-0.349629627145*x_ref[2]
+            arg[(3, 1, 0)]+=-0.545435587922*x[2]
+            ref[(3, 1, 0)]+=-0.545435587922*x_ref[2]
+            arg[(3, 1, 1)]+=0.0213071525744*x[2]
+            ref[(3, 1, 1)]+=0.0213071525744*x_ref[2]
+            arg[(3, 1, 2)]+=0.523617311784*x[2]
+            ref[(3, 1, 2)]+=0.523617311784*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4, 2),w)
+        ref = Data(0,(2, 4, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.947400008914*x[0] + (0.253552868747)*x[1]
+        ref[(0, 0, 0, 0)]=0.947400008914*x_ref[0] + (0.253552868747)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.332629175092*x[0] + (-0.11967702327)*x[1]
+        ref[(0, 0, 0, 1)]=-0.332629175092*x_ref[0] + (-0.11967702327)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.296354595836*x[0] + (-0.996240568839)*x[1]
+        ref[(0, 0, 1, 0)]=-0.296354595836*x_ref[0] + (-0.996240568839)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.810878880936*x[0] + (-0.928573899098)*x[1]
+        ref[(0, 0, 1, 1)]=-0.810878880936*x_ref[0] + (-0.928573899098)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.820306384517*x[0] + (-0.862124893724)*x[1]
+        ref[(0, 0, 2, 0)]=-0.820306384517*x_ref[0] + (-0.862124893724)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.41348107753*x[0] + (0.884263621615)*x[1]
+        ref[(0, 0, 2, 1)]=-0.41348107753*x_ref[0] + (0.884263621615)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.353627694257*x[0] + (0.0879199811806)*x[1]
+        ref[(0, 0, 3, 0)]=0.353627694257*x_ref[0] + (0.0879199811806)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.0126430447852*x[0] + (0.423205821151)*x[1]
+        ref[(0, 0, 3, 1)]=0.0126430447852*x_ref[0] + (0.423205821151)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.970807183795*x[0] + (-0.743171117188)*x[1]
+        ref[(0, 1, 0, 0)]=-0.970807183795*x_ref[0] + (-0.743171117188)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.204537134434*x[0] + (0.709945049746)*x[1]
+        ref[(0, 1, 0, 1)]=-0.204537134434*x_ref[0] + (0.709945049746)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.618790975656*x[0] + (-0.950563036876)*x[1]
+        ref[(0, 1, 1, 0)]=-0.618790975656*x_ref[0] + (-0.950563036876)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.992352753619*x[0] + (-0.193428265672)*x[1]
+        ref[(0, 1, 1, 1)]=-0.992352753619*x_ref[0] + (-0.193428265672)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.839873586991*x[0] + (0.995358376112)*x[1]
+        ref[(0, 1, 2, 0)]=0.839873586991*x_ref[0] + (0.995358376112)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.32961834481*x[0] + (-0.681450298033)*x[1]
+        ref[(0, 1, 2, 1)]=-0.32961834481*x_ref[0] + (-0.681450298033)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.642163135952*x[0] + (0.0780451293695)*x[1]
+        ref[(0, 1, 3, 0)]=-0.642163135952*x_ref[0] + (0.0780451293695)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.763739841233*x[0] + (0.394499516358)*x[1]
+        ref[(0, 1, 3, 1)]=0.763739841233*x_ref[0] + (0.394499516358)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.23618288466*x[0] + (-0.188016280464)*x[1]
+        ref[(0, 2, 0, 0)]=0.23618288466*x_ref[0] + (-0.188016280464)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.278663121376*x[0] + (0.305065826942)*x[1]
+        ref[(0, 2, 0, 1)]=-0.278663121376*x_ref[0] + (0.305065826942)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.830390625579*x[0] + (0.723281665764)*x[1]
+        ref[(0, 2, 1, 0)]=0.830390625579*x_ref[0] + (0.723281665764)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.377835074453*x[0] + (0.401220853849)*x[1]
+        ref[(0, 2, 1, 1)]=-0.377835074453*x_ref[0] + (0.401220853849)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.117438753213*x[0] + (-0.394553686005)*x[1]
+        ref[(0, 2, 2, 0)]=-0.117438753213*x_ref[0] + (-0.394553686005)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.459151038364*x[0] + (0.666176065305)*x[1]
+        ref[(0, 2, 2, 1)]=0.459151038364*x_ref[0] + (0.666176065305)*x_ref[1]
+        arg[(0, 2, 3, 0)]=0.537665743203*x[0] + (0.330328646283)*x[1]
+        ref[(0, 2, 3, 0)]=0.537665743203*x_ref[0] + (0.330328646283)*x_ref[1]
+        arg[(0, 2, 3, 1)]=-0.328062981561*x[0] + (0.460850725057)*x[1]
+        ref[(0, 2, 3, 1)]=-0.328062981561*x_ref[0] + (0.460850725057)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.819991713931*x[0] + (-0.0654225724873)*x[1]
+        ref[(0, 3, 0, 0)]=0.819991713931*x_ref[0] + (-0.0654225724873)*x_ref[1]
+        arg[(0, 3, 0, 1)]=-0.243081913386*x[0] + (0.912080509269)*x[1]
+        ref[(0, 3, 0, 1)]=-0.243081913386*x_ref[0] + (0.912080509269)*x_ref[1]
+        arg[(0, 3, 1, 0)]=-0.672911799173*x[0] + (0.64487779612)*x[1]
+        ref[(0, 3, 1, 0)]=-0.672911799173*x_ref[0] + (0.64487779612)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.211584652115*x[0] + (-0.110722835736)*x[1]
+        ref[(0, 3, 1, 1)]=0.211584652115*x_ref[0] + (-0.110722835736)*x_ref[1]
+        arg[(0, 3, 2, 0)]=-0.30727767668*x[0] + (0.65871177506)*x[1]
+        ref[(0, 3, 2, 0)]=-0.30727767668*x_ref[0] + (0.65871177506)*x_ref[1]
+        arg[(0, 3, 2, 1)]=-0.857036662249*x[0] + (-0.300330702486)*x[1]
+        ref[(0, 3, 2, 1)]=-0.857036662249*x_ref[0] + (-0.300330702486)*x_ref[1]
+        arg[(0, 3, 3, 0)]=0.602456973985*x[0] + (0.887607357466)*x[1]
+        ref[(0, 3, 3, 0)]=0.602456973985*x_ref[0] + (0.887607357466)*x_ref[1]
+        arg[(0, 3, 3, 1)]=-0.181935402005*x[0] + (0.354666454942)*x[1]
+        ref[(0, 3, 3, 1)]=-0.181935402005*x_ref[0] + (0.354666454942)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.891751000923*x[0] + (0.128235289568)*x[1]
+        ref[(1, 0, 0, 0)]=-0.891751000923*x_ref[0] + (0.128235289568)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.356485063102*x[0] + (0.935213177985)*x[1]
+        ref[(1, 0, 0, 1)]=0.356485063102*x_ref[0] + (0.935213177985)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.393289736606*x[0] + (-0.270736648012)*x[1]
+        ref[(1, 0, 1, 0)]=0.393289736606*x_ref[0] + (-0.270736648012)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.149198857607*x[0] + (0.8847845714)*x[1]
+        ref[(1, 0, 1, 1)]=0.149198857607*x_ref[0] + (0.8847845714)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.565832588722*x[0] + (-0.77044726281)*x[1]
+        ref[(1, 0, 2, 0)]=-0.565832588722*x_ref[0] + (-0.77044726281)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.378861570789*x[0] + (0.306543184313)*x[1]
+        ref[(1, 0, 2, 1)]=0.378861570789*x_ref[0] + (0.306543184313)*x_ref[1]
+        arg[(1, 0, 3, 0)]=0.717261696154*x[0] + (-0.106754378767)*x[1]
+        ref[(1, 0, 3, 0)]=0.717261696154*x_ref[0] + (-0.106754378767)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.714250385323*x[0] + (0.876960015631)*x[1]
+        ref[(1, 0, 3, 1)]=-0.714250385323*x_ref[0] + (0.876960015631)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.0782089849366*x[0] + (0.469602583721)*x[1]
+        ref[(1, 1, 0, 0)]=-0.0782089849366*x_ref[0] + (0.469602583721)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.345885636275*x[0] + (-0.037689911251)*x[1]
+        ref[(1, 1, 0, 1)]=-0.345885636275*x_ref[0] + (-0.037689911251)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.128222700363*x[0] + (-0.276696205767)*x[1]
+        ref[(1, 1, 1, 0)]=0.128222700363*x_ref[0] + (-0.276696205767)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.482895565618*x[0] + (-0.852512133484)*x[1]
+        ref[(1, 1, 1, 1)]=-0.482895565618*x_ref[0] + (-0.852512133484)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.333152839037*x[0] + (-0.69595487019)*x[1]
+        ref[(1, 1, 2, 0)]=-0.333152839037*x_ref[0] + (-0.69595487019)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.897485538709*x[0] + (0.886723802187)*x[1]
+        ref[(1, 1, 2, 1)]=-0.897485538709*x_ref[0] + (0.886723802187)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.411021678051*x[0] + (-0.819950408832)*x[1]
+        ref[(1, 1, 3, 0)]=-0.411021678051*x_ref[0] + (-0.819950408832)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.2423351124*x[0] + (-0.0581032354888)*x[1]
+        ref[(1, 1, 3, 1)]=-0.2423351124*x_ref[0] + (-0.0581032354888)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.662592858119*x[0] + (0.731302825561)*x[1]
+        ref[(1, 2, 0, 0)]=-0.662592858119*x_ref[0] + (0.731302825561)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.463164359065*x[0] + (0.770605994029)*x[1]
+        ref[(1, 2, 0, 1)]=0.463164359065*x_ref[0] + (0.770605994029)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.0401888390228*x[0] + (0.21897892858)*x[1]
+        ref[(1, 2, 1, 0)]=-0.0401888390228*x_ref[0] + (0.21897892858)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.00507791161944*x[0] + (-0.592746392224)*x[1]
+        ref[(1, 2, 1, 1)]=0.00507791161944*x_ref[0] + (-0.592746392224)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.0111014367047*x[0] + (0.303062411424)*x[1]
+        ref[(1, 2, 2, 0)]=0.0111014367047*x_ref[0] + (0.303062411424)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.284787579326*x[0] + (-0.772740384223)*x[1]
+        ref[(1, 2, 2, 1)]=-0.284787579326*x_ref[0] + (-0.772740384223)*x_ref[1]
+        arg[(1, 2, 3, 0)]=-0.86310921696*x[0] + (-0.758174894355)*x[1]
+        ref[(1, 2, 3, 0)]=-0.86310921696*x_ref[0] + (-0.758174894355)*x_ref[1]
+        arg[(1, 2, 3, 1)]=0.724350188856*x[0] + (0.43269378959)*x[1]
+        ref[(1, 2, 3, 1)]=0.724350188856*x_ref[0] + (0.43269378959)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.0282324904458*x[0] + (0.652172097529)*x[1]
+        ref[(1, 3, 0, 0)]=-0.0282324904458*x_ref[0] + (0.652172097529)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.634621005809*x[0] + (-0.8725802186)*x[1]
+        ref[(1, 3, 0, 1)]=-0.634621005809*x_ref[0] + (-0.8725802186)*x_ref[1]
+        arg[(1, 3, 1, 0)]=0.413568276522*x[0] + (-0.917004739524)*x[1]
+        ref[(1, 3, 1, 0)]=0.413568276522*x_ref[0] + (-0.917004739524)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.201215298221*x[0] + (0.978224745358)*x[1]
+        ref[(1, 3, 1, 1)]=0.201215298221*x_ref[0] + (0.978224745358)*x_ref[1]
+        arg[(1, 3, 2, 0)]=-0.844239118978*x[0] + (0.121726625336)*x[1]
+        ref[(1, 3, 2, 0)]=-0.844239118978*x_ref[0] + (0.121726625336)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.871762869019*x[0] + (-0.837159134397)*x[1]
+        ref[(1, 3, 2, 1)]=0.871762869019*x_ref[0] + (-0.837159134397)*x_ref[1]
+        arg[(1, 3, 3, 0)]=-0.0191137454967*x[0] + (-0.465222366146)*x[1]
+        ref[(1, 3, 3, 0)]=-0.0191137454967*x_ref[0] + (-0.465222366146)*x_ref[1]
+        arg[(1, 3, 3, 1)]=-0.0102270112285*x[0] + (0.269206421258)*x[1]
+        ref[(1, 3, 3, 1)]=-0.0102270112285*x_ref[0] + (0.269206421258)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.97904644657*x[2]
+            ref[(0, 0, 0, 0)]+=-0.97904644657*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.947547664739*x[2]
+            ref[(0, 0, 0, 1)]+=-0.947547664739*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.157879365022*x[2]
+            ref[(0, 0, 1, 0)]+=0.157879365022*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.539024131218*x[2]
+            ref[(0, 0, 1, 1)]+=0.539024131218*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.0605687760377*x[2]
+            ref[(0, 0, 2, 0)]+=-0.0605687760377*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.779488812143*x[2]
+            ref[(0, 0, 2, 1)]+=0.779488812143*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.738780104494*x[2]
+            ref[(0, 0, 3, 0)]+=0.738780104494*x_ref[2]
+            arg[(0, 0, 3, 1)]+=-0.138141210979*x[2]
+            ref[(0, 0, 3, 1)]+=-0.138141210979*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.925367312026*x[2]
+            ref[(0, 1, 0, 0)]+=-0.925367312026*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.187091261563*x[2]
+            ref[(0, 1, 0, 1)]+=0.187091261563*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.459380673625*x[2]
+            ref[(0, 1, 1, 0)]+=-0.459380673625*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.846983662199*x[2]
+            ref[(0, 1, 1, 1)]+=0.846983662199*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.75473739403*x[2]
+            ref[(0, 1, 2, 0)]+=-0.75473739403*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.737399045264*x[2]
+            ref[(0, 1, 2, 1)]+=-0.737399045264*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.743335233306*x[2]
+            ref[(0, 1, 3, 0)]+=-0.743335233306*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.848641751007*x[2]
+            ref[(0, 1, 3, 1)]+=-0.848641751007*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.117000539941*x[2]
+            ref[(0, 2, 0, 0)]+=-0.117000539941*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.907856884816*x[2]
+            ref[(0, 2, 0, 1)]+=0.907856884816*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.165017723456*x[2]
+            ref[(0, 2, 1, 0)]+=0.165017723456*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.926291206053*x[2]
+            ref[(0, 2, 1, 1)]+=0.926291206053*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.505626807151*x[2]
+            ref[(0, 2, 2, 0)]+=0.505626807151*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.949803336102*x[2]
+            ref[(0, 2, 2, 1)]+=-0.949803336102*x_ref[2]
+            arg[(0, 2, 3, 0)]+=-0.915572172478*x[2]
+            ref[(0, 2, 3, 0)]+=-0.915572172478*x_ref[2]
+            arg[(0, 2, 3, 1)]+=-0.308452216042*x[2]
+            ref[(0, 2, 3, 1)]+=-0.308452216042*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.467418691676*x[2]
+            ref[(0, 3, 0, 0)]+=-0.467418691676*x_ref[2]
+            arg[(0, 3, 0, 1)]+=-0.462090355915*x[2]
+            ref[(0, 3, 0, 1)]+=-0.462090355915*x_ref[2]
+            arg[(0, 3, 1, 0)]+=-0.618764167193*x[2]
+            ref[(0, 3, 1, 0)]+=-0.618764167193*x_ref[2]
+            arg[(0, 3, 1, 1)]+=-0.290048483668*x[2]
+            ref[(0, 3, 1, 1)]+=-0.290048483668*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.570455575623*x[2]
+            ref[(0, 3, 2, 0)]+=-0.570455575623*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.55932938819*x[2]
+            ref[(0, 3, 2, 1)]+=-0.55932938819*x_ref[2]
+            arg[(0, 3, 3, 0)]+=-0.450475571015*x[2]
+            ref[(0, 3, 3, 0)]+=-0.450475571015*x_ref[2]
+            arg[(0, 3, 3, 1)]+=-0.16413524592*x[2]
+            ref[(0, 3, 3, 1)]+=-0.16413524592*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.648347628477*x[2]
+            ref[(1, 0, 0, 0)]+=-0.648347628477*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.253588463449*x[2]
+            ref[(1, 0, 0, 1)]+=-0.253588463449*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.98219626359*x[2]
+            ref[(1, 0, 1, 0)]+=0.98219626359*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.131146953367*x[2]
+            ref[(1, 0, 1, 1)]+=0.131146953367*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.734422060827*x[2]
+            ref[(1, 0, 2, 0)]+=-0.734422060827*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.797940731619*x[2]
+            ref[(1, 0, 2, 1)]+=0.797940731619*x_ref[2]
+            arg[(1, 0, 3, 0)]+=0.520090587519*x[2]
+            ref[(1, 0, 3, 0)]+=0.520090587519*x_ref[2]
+            arg[(1, 0, 3, 1)]+=0.289551881971*x[2]
+            ref[(1, 0, 3, 1)]+=0.289551881971*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.111259686758*x[2]
+            ref[(1, 1, 0, 0)]+=-0.111259686758*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.467017431622*x[2]
+            ref[(1, 1, 0, 1)]+=-0.467017431622*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.394965004071*x[2]
+            ref[(1, 1, 1, 0)]+=0.394965004071*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.879081143871*x[2]
+            ref[(1, 1, 1, 1)]+=0.879081143871*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.0482340417452*x[2]
+            ref[(1, 1, 2, 0)]+=-0.0482340417452*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.826974269596*x[2]
+            ref[(1, 1, 2, 1)]+=-0.826974269596*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.821756339751*x[2]
+            ref[(1, 1, 3, 0)]+=-0.821756339751*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.27855289819*x[2]
+            ref[(1, 1, 3, 1)]+=-0.27855289819*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.626155234464*x[2]
+            ref[(1, 2, 0, 0)]+=-0.626155234464*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.645776225064*x[2]
+            ref[(1, 2, 0, 1)]+=0.645776225064*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.0804899086826*x[2]
+            ref[(1, 2, 1, 0)]+=0.0804899086826*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.274584027127*x[2]
+            ref[(1, 2, 1, 1)]+=0.274584027127*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.666619746034*x[2]
+            ref[(1, 2, 2, 0)]+=-0.666619746034*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.308068952559*x[2]
+            ref[(1, 2, 2, 1)]+=-0.308068952559*x_ref[2]
+            arg[(1, 2, 3, 0)]+=0.382898966152*x[2]
+            ref[(1, 2, 3, 0)]+=0.382898966152*x_ref[2]
+            arg[(1, 2, 3, 1)]+=0.305379270325*x[2]
+            ref[(1, 2, 3, 1)]+=0.305379270325*x_ref[2]
+            arg[(1, 3, 0, 0)]+=-0.18387629553*x[2]
+            ref[(1, 3, 0, 0)]+=-0.18387629553*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.143987325889*x[2]
+            ref[(1, 3, 0, 1)]+=0.143987325889*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.976017042647*x[2]
+            ref[(1, 3, 1, 0)]+=0.976017042647*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.742845602718*x[2]
+            ref[(1, 3, 1, 1)]+=-0.742845602718*x_ref[2]
+            arg[(1, 3, 2, 0)]+=-0.686132517886*x[2]
+            ref[(1, 3, 2, 0)]+=-0.686132517886*x_ref[2]
+            arg[(1, 3, 2, 1)]+=-0.293960858705*x[2]
+            ref[(1, 3, 2, 1)]+=-0.293960858705*x_ref[2]
+            arg[(1, 3, 3, 0)]+=-0.516815995172*x[2]
+            ref[(1, 3, 3, 0)]+=-0.516815995172*x_ref[2]
+            arg[(1, 3, 3, 1)]+=-0.330946369379*x[2]
+            ref[(1, 3, 3, 1)]+=-0.330946369379*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.423852764909*x[0]**o + (-0.502466793838)*x[0] + (0.687737906202)*x[1]**o + (0.430275712221)*x[1]
+        ref=0.423852764909*x_ref[0]**o + (-0.502466793838)*x_ref[0] + (0.687737906202)*x_ref[1]**o + (0.430275712221)*x_ref[1]
+        if dim==3:
+            arg+=(-0.394226149617)*x[2]**o + (0.854915612592)*x[2]
+            ref+=(-0.394226149617)*x_ref[2]**o + (0.854915612592)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=-0.876901418971*x[0]**o + (-0.85717899698)*x[0] + (0.115195230513)*x[1]**o + (0.886600538724)*x[1]
+        ref[(0,)]=-0.876901418971*x_ref[0]**o + (-0.85717899698)*x_ref[0] + (0.115195230513)*x_ref[1]**o + (0.886600538724)*x_ref[1]
+        arg[(1,)]=-0.267100769878*x[0]**o + (-0.477939094459)*x[0] + (0.855971456187)*x[1]**o + (-0.110881027544)*x[1]
+        ref[(1,)]=-0.267100769878*x_ref[0]**o + (-0.477939094459)*x_ref[0] + (0.855971456187)*x_ref[1]**o + (-0.110881027544)*x_ref[1]
+        arg[(2,)]=-0.531901388243*x[0]**o + (-0.630830610286)*x[0] + (-0.93750272562)*x[1]**o + (-0.998006904038)*x[1]
+        ref[(2,)]=-0.531901388243*x_ref[0]**o + (-0.630830610286)*x_ref[0] + (-0.93750272562)*x_ref[1]**o + (-0.998006904038)*x_ref[1]
+        arg[(3,)]=-0.44313722581*x[0]**o + (0.600879176925)*x[0] + (0.515428871542)*x[1]**o + (-0.759668639588)*x[1]
+        ref[(3,)]=-0.44313722581*x_ref[0]**o + (0.600879176925)*x_ref[0] + (0.515428871542)*x_ref[1]**o + (-0.759668639588)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.590361007499*x[2]**o + (-0.126713722717)*x[2]
+            ref[(0,)]+=0.590361007499*x_ref[2]**o + (-0.126713722717)*x_ref[2]
+            arg[(1,)]+=-0.547206150821*x[2]**o + (-0.771814522354)*x[2]
+            ref[(1,)]+=-0.547206150821*x_ref[2]**o + (-0.771814522354)*x_ref[2]
+            arg[(2,)]+=-0.339028236357*x[2]**o + (-0.019259235775)*x[2]
+            ref[(2,)]+=-0.339028236357*x_ref[2]**o + (-0.019259235775)*x_ref[2]
+            arg[(3,)]+=0.697298576646*x[2]**o + (-0.283173654719)*x[2]
+            ref[(3,)]+=0.697298576646*x_ref[2]**o + (-0.283173654719)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=-0.690472116792*x[0]**o + (-0.871042645016)*x[0] + (-0.89896005556)*x[1]**o + (0.820058011673)*x[1]
+        ref[(0, 0)]=-0.690472116792*x_ref[0]**o + (-0.871042645016)*x_ref[0] + (-0.89896005556)*x_ref[1]**o + (0.820058011673)*x_ref[1]
+        arg[(0, 1)]=0.365003630566*x[0]**o + (0.796094191185)*x[0] + (0.459600172086)*x[1]**o + (-0.776326151806)*x[1]
+        ref[(0, 1)]=0.365003630566*x_ref[0]**o + (0.796094191185)*x_ref[0] + (0.459600172086)*x_ref[1]**o + (-0.776326151806)*x_ref[1]
+        arg[(1, 0)]=0.10074694517*x[0]**o + (0.651966998405)*x[0] + (0.393538095142)*x[1]**o + (-0.884441396443)*x[1]
+        ref[(1, 0)]=0.10074694517*x_ref[0]**o + (0.651966998405)*x_ref[0] + (0.393538095142)*x_ref[1]**o + (-0.884441396443)*x_ref[1]
+        arg[(1, 1)]=0.10715100693*x[0]**o + (-0.265908322741)*x[0] + (0.557495294397)*x[1]**o + (-0.818524256631)*x[1]
+        ref[(1, 1)]=0.10715100693*x_ref[0]**o + (-0.265908322741)*x_ref[0] + (0.557495294397)*x_ref[1]**o + (-0.818524256631)*x_ref[1]
+        arg[(2, 0)]=0.954407863637*x[0]**o + (0.596774660971)*x[0] + (0.12929052461)*x[1]**o + (0.836363005317)*x[1]
+        ref[(2, 0)]=0.954407863637*x_ref[0]**o + (0.596774660971)*x_ref[0] + (0.12929052461)*x_ref[1]**o + (0.836363005317)*x_ref[1]
+        arg[(2, 1)]=0.733821968214*x[0]**o + (0.994951471409)*x[0] + (-0.746273310208)*x[1]**o + (0.271406216836)*x[1]
+        ref[(2, 1)]=0.733821968214*x_ref[0]**o + (0.994951471409)*x_ref[0] + (-0.746273310208)*x_ref[1]**o + (0.271406216836)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.0774370547652*x[2]**o + (-0.73820297074)*x[2]
+            ref[(0, 0)]+=0.0774370547652*x_ref[2]**o + (-0.73820297074)*x_ref[2]
+            arg[(0, 1)]+=0.0340546773321*x[2]**o + (-0.0396427576518)*x[2]
+            ref[(0, 1)]+=0.0340546773321*x_ref[2]**o + (-0.0396427576518)*x_ref[2]
+            arg[(1, 0)]+=-0.863151815699*x[2]**o + (0.673849645037)*x[2]
+            ref[(1, 0)]+=-0.863151815699*x_ref[2]**o + (0.673849645037)*x_ref[2]
+            arg[(1, 1)]+=-0.196167912553*x[2]**o + (-0.169065308442)*x[2]
+            ref[(1, 1)]+=-0.196167912553*x_ref[2]**o + (-0.169065308442)*x_ref[2]
+            arg[(2, 0)]+=-0.767627063272*x[2]**o + (-0.576707061968)*x[2]
+            ref[(2, 0)]+=-0.767627063272*x_ref[2]**o + (-0.576707061968)*x_ref[2]
+            arg[(2, 1)]+=-0.330725476622*x[2]**o + (-0.753078759817)*x[2]
+            ref[(2, 1)]+=-0.330725476622*x_ref[2]**o + (-0.753078759817)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2),w_ref)
+        arg[(0, 0, 0)]=-0.779562589021*x[0]**o + (-0.158434960893)*x[0] + (-0.990007496841)*x[1]**o + (-0.468516690794)*x[1]
+        ref[(0, 0, 0)]=-0.779562589021*x_ref[0]**o + (-0.158434960893)*x_ref[0] + (-0.990007496841)*x_ref[1]**o + (-0.468516690794)*x_ref[1]
+        arg[(0, 0, 1)]=-0.0739543254892*x[0]**o + (0.166337075044)*x[0] + (-0.501923363217)*x[1]**o + (0.823084308477)*x[1]
+        ref[(0, 0, 1)]=-0.0739543254892*x_ref[0]**o + (0.166337075044)*x_ref[0] + (-0.501923363217)*x_ref[1]**o + (0.823084308477)*x_ref[1]
+        arg[(0, 1, 0)]=-0.898359121863*x[0]**o + (-0.985010302393)*x[0] + (-0.873768399218)*x[1]**o + (0.262348756445)*x[1]
+        ref[(0, 1, 0)]=-0.898359121863*x_ref[0]**o + (-0.985010302393)*x_ref[0] + (-0.873768399218)*x_ref[1]**o + (0.262348756445)*x_ref[1]
+        arg[(0, 1, 1)]=0.319140126791*x[0]**o + (-0.949388953348)*x[0] + (0.670171770726)*x[1]**o + (-0.577731571386)*x[1]
+        ref[(0, 1, 1)]=0.319140126791*x_ref[0]**o + (-0.949388953348)*x_ref[0] + (0.670171770726)*x_ref[1]**o + (-0.577731571386)*x_ref[1]
+        arg[(0, 2, 0)]=-0.61705546737*x[0]**o + (0.250907347987)*x[0] + (0.58572033679)*x[1]**o + (0.620600552557)*x[1]
+        ref[(0, 2, 0)]=-0.61705546737*x_ref[0]**o + (0.250907347987)*x_ref[0] + (0.58572033679)*x_ref[1]**o + (0.620600552557)*x_ref[1]
+        arg[(0, 2, 1)]=0.500615281538*x[0]**o + (-0.225404992706)*x[0] + (0.377072242475)*x[1]**o + (0.360870880032)*x[1]
+        ref[(0, 2, 1)]=0.500615281538*x_ref[0]**o + (-0.225404992706)*x_ref[0] + (0.377072242475)*x_ref[1]**o + (0.360870880032)*x_ref[1]
+        arg[(1, 0, 0)]=0.685094281059*x[0]**o + (-0.0516148883709)*x[0] + (-0.991865407359)*x[1]**o + (0.140269619474)*x[1]
+        ref[(1, 0, 0)]=0.685094281059*x_ref[0]**o + (-0.0516148883709)*x_ref[0] + (-0.991865407359)*x_ref[1]**o + (0.140269619474)*x_ref[1]
+        arg[(1, 0, 1)]=0.55993788063*x[0]**o + (-0.264748799903)*x[0] + (-0.673327147044)*x[1]**o + (0.991202808614)*x[1]
+        ref[(1, 0, 1)]=0.55993788063*x_ref[0]**o + (-0.264748799903)*x_ref[0] + (-0.673327147044)*x_ref[1]**o + (0.991202808614)*x_ref[1]
+        arg[(1, 1, 0)]=0.306747561574*x[0]**o + (-0.346653647542)*x[0] + (0.0611794510952)*x[1]**o + (0.272351539188)*x[1]
+        ref[(1, 1, 0)]=0.306747561574*x_ref[0]**o + (-0.346653647542)*x_ref[0] + (0.0611794510952)*x_ref[1]**o + (0.272351539188)*x_ref[1]
+        arg[(1, 1, 1)]=-0.169312401227*x[0]**o + (-0.00540987471869)*x[0] + (-0.0164977116289)*x[1]**o + (0.704925009683)*x[1]
+        ref[(1, 1, 1)]=-0.169312401227*x_ref[0]**o + (-0.00540987471869)*x_ref[0] + (-0.0164977116289)*x_ref[1]**o + (0.704925009683)*x_ref[1]
+        arg[(1, 2, 0)]=-0.448138974828*x[0]**o + (0.431758344205)*x[0] + (-0.245481078247)*x[1]**o + (-0.709014758627)*x[1]
+        ref[(1, 2, 0)]=-0.448138974828*x_ref[0]**o + (0.431758344205)*x_ref[0] + (-0.245481078247)*x_ref[1]**o + (-0.709014758627)*x_ref[1]
+        arg[(1, 2, 1)]=-0.621803241988*x[0]**o + (-0.680375793542)*x[0] + (-0.256506979747)*x[1]**o + (0.791256543865)*x[1]
+        ref[(1, 2, 1)]=-0.621803241988*x_ref[0]**o + (-0.680375793542)*x_ref[0] + (-0.256506979747)*x_ref[1]**o + (0.791256543865)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.53921287176*x[2]**o + (0.657096887107)*x[2]
+            ref[(0, 0, 0)]+=0.53921287176*x_ref[2]**o + (0.657096887107)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.689181548551*x[2]**o + (-0.433345060032)*x[2]
+            ref[(0, 0, 1)]+=-0.689181548551*x_ref[2]**o + (-0.433345060032)*x_ref[2]
+            arg[(0, 1, 0)]+=0.342171723781*x[2]**o + (-0.874702068899)*x[2]
+            ref[(0, 1, 0)]+=0.342171723781*x_ref[2]**o + (-0.874702068899)*x_ref[2]
+            arg[(0, 1, 1)]+=0.503655009404*x[2]**o + (-0.293295216259)*x[2]
+            ref[(0, 1, 1)]+=0.503655009404*x_ref[2]**o + (-0.293295216259)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.835592400828*x[2]**o + (-0.793431781558)*x[2]
+            ref[(0, 2, 0)]+=-0.835592400828*x_ref[2]**o + (-0.793431781558)*x_ref[2]
+            arg[(0, 2, 1)]+=0.534196715827*x[2]**o + (0.998867693947)*x[2]
+            ref[(0, 2, 1)]+=0.534196715827*x_ref[2]**o + (0.998867693947)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.129667054366*x[2]**o + (0.395492303533)*x[2]
+            ref[(1, 0, 0)]+=-0.129667054366*x_ref[2]**o + (0.395492303533)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.835313301037*x[2]**o + (0.968910158871)*x[2]
+            ref[(1, 0, 1)]+=-0.835313301037*x_ref[2]**o + (0.968910158871)*x_ref[2]
+            arg[(1, 1, 0)]+=0.537874663369*x[2]**o + (0.621363428923)*x[2]
+            ref[(1, 1, 0)]+=0.537874663369*x_ref[2]**o + (0.621363428923)*x_ref[2]
+            arg[(1, 1, 1)]+=0.736890850191*x[2]**o + (0.545770395531)*x[2]
+            ref[(1, 1, 1)]+=0.736890850191*x_ref[2]**o + (0.545770395531)*x_ref[2]
+            arg[(1, 2, 0)]+=0.422560330606*x[2]**o + (0.449457143091)*x[2]
+            ref[(1, 2, 0)]+=0.422560330606*x_ref[2]**o + (0.449457143091)*x_ref[2]
+            arg[(1, 2, 1)]+=0.198493781795*x[2]**o + (0.614940523485)*x[2]
+            ref[(1, 2, 1)]+=0.198493781795*x_ref[2]**o + (0.614940523485)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary
+
+        assumptions: ReducedFunctionOnBoundary(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnBoundary(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnBoundary(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4, 4),w)
+        ref = Data(0,(4, 2, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.684590689455*x[0]**o + (0.152230307134)*x[0] + (-0.110706660536)*x[1]**o + (0.224367937045)*x[1]
+        ref[(0, 0, 0, 0)]=0.684590689455*x_ref[0]**o + (0.152230307134)*x_ref[0] + (-0.110706660536)*x_ref[1]**o + (0.224367937045)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.0355233606382*x[0]**o + (0.0274257537088)*x[0] + (0.56045419877)*x[1]**o + (0.400293632689)*x[1]
+        ref[(0, 0, 0, 1)]=0.0355233606382*x_ref[0]**o + (0.0274257537088)*x_ref[0] + (0.56045419877)*x_ref[1]**o + (0.400293632689)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.977007984269*x[0]**o + (-0.52670775231)*x[0] + (0.522474393424)*x[1]**o + (-0.00745481113546)*x[1]
+        ref[(0, 0, 0, 2)]=-0.977007984269*x_ref[0]**o + (-0.52670775231)*x_ref[0] + (0.522474393424)*x_ref[1]**o + (-0.00745481113546)*x_ref[1]
+        arg[(0, 0, 0, 3)]=-0.570562809327*x[0]**o + (-0.497859119287)*x[0] + (-0.870891263322)*x[1]**o + (0.0666528564367)*x[1]
+        ref[(0, 0, 0, 3)]=-0.570562809327*x_ref[0]**o + (-0.497859119287)*x_ref[0] + (-0.870891263322)*x_ref[1]**o + (0.0666528564367)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.896985756879*x[0]**o + (-0.993363256262)*x[0] + (-0.706745276992)*x[1]**o + (0.767509930059)*x[1]
+        ref[(0, 0, 1, 0)]=0.896985756879*x_ref[0]**o + (-0.993363256262)*x_ref[0] + (-0.706745276992)*x_ref[1]**o + (0.767509930059)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.930818240201*x[0]**o + (0.798849847518)*x[0] + (-0.74203698111)*x[1]**o + (-0.320585938304)*x[1]
+        ref[(0, 0, 1, 1)]=0.930818240201*x_ref[0]**o + (0.798849847518)*x_ref[0] + (-0.74203698111)*x_ref[1]**o + (-0.320585938304)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.243310416728*x[0]**o + (-0.568119524309)*x[0] + (0.692811111742)*x[1]**o + (0.198465425851)*x[1]
+        ref[(0, 0, 1, 2)]=-0.243310416728*x_ref[0]**o + (-0.568119524309)*x_ref[0] + (0.692811111742)*x_ref[1]**o + (0.198465425851)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.254138931018*x[0]**o + (-0.389859222198)*x[0] + (0.458207323758)*x[1]**o + (0.763497548911)*x[1]
+        ref[(0, 0, 1, 3)]=-0.254138931018*x_ref[0]**o + (-0.389859222198)*x_ref[0] + (0.458207323758)*x_ref[1]**o + (0.763497548911)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.231640092887*x[0]**o + (-0.545692950006)*x[0] + (-0.248393567865)*x[1]**o + (-0.788516140097)*x[1]
+        ref[(0, 0, 2, 0)]=-0.231640092887*x_ref[0]**o + (-0.545692950006)*x_ref[0] + (-0.248393567865)*x_ref[1]**o + (-0.788516140097)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.899780181918*x[0]**o + (-0.096363177632)*x[0] + (-0.80209465258)*x[1]**o + (0.745903251673)*x[1]
+        ref[(0, 0, 2, 1)]=-0.899780181918*x_ref[0]**o + (-0.096363177632)*x_ref[0] + (-0.80209465258)*x_ref[1]**o + (0.745903251673)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.165803000421*x[0]**o + (0.209939332126)*x[0] + (0.863843392848)*x[1]**o + (-0.0451650267261)*x[1]
+        ref[(0, 0, 2, 2)]=0.165803000421*x_ref[0]**o + (0.209939332126)*x_ref[0] + (0.863843392848)*x_ref[1]**o + (-0.0451650267261)*x_ref[1]
+        arg[(0, 0, 2, 3)]=0.462312333976*x[0]**o + (-0.920592605372)*x[0] + (0.444012535351)*x[1]**o + (0.916694060732)*x[1]
+        ref[(0, 0, 2, 3)]=0.462312333976*x_ref[0]**o + (-0.920592605372)*x_ref[0] + (0.444012535351)*x_ref[1]**o + (0.916694060732)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.796106071102*x[0]**o + (-0.814593601397)*x[0] + (0.642146040034)*x[1]**o + (0.687145065226)*x[1]
+        ref[(0, 0, 3, 0)]=0.796106071102*x_ref[0]**o + (-0.814593601397)*x_ref[0] + (0.642146040034)*x_ref[1]**o + (0.687145065226)*x_ref[1]
+        arg[(0, 0, 3, 1)]=-0.0252961213026*x[0]**o + (0.362708269875)*x[0] + (0.674213701663)*x[1]**o + (0.0565916159926)*x[1]
+        ref[(0, 0, 3, 1)]=-0.0252961213026*x_ref[0]**o + (0.362708269875)*x_ref[0] + (0.674213701663)*x_ref[1]**o + (0.0565916159926)*x_ref[1]
+        arg[(0, 0, 3, 2)]=-0.591038438807*x[0]**o + (0.537885571579)*x[0] + (-0.485154156484)*x[1]**o + (-0.832485391449)*x[1]
+        ref[(0, 0, 3, 2)]=-0.591038438807*x_ref[0]**o + (0.537885571579)*x_ref[0] + (-0.485154156484)*x_ref[1]**o + (-0.832485391449)*x_ref[1]
+        arg[(0, 0, 3, 3)]=0.760278129509*x[0]**o + (-0.556890849123)*x[0] + (-0.748250134879)*x[1]**o + (-0.0194106387808)*x[1]
+        ref[(0, 0, 3, 3)]=0.760278129509*x_ref[0]**o + (-0.556890849123)*x_ref[0] + (-0.748250134879)*x_ref[1]**o + (-0.0194106387808)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.856211700086*x[0]**o + (0.326094700145)*x[0] + (-0.537940620466)*x[1]**o + (0.479628965963)*x[1]
+        ref[(0, 1, 0, 0)]=0.856211700086*x_ref[0]**o + (0.326094700145)*x_ref[0] + (-0.537940620466)*x_ref[1]**o + (0.479628965963)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.526432431727*x[0]**o + (0.606856487788)*x[0] + (-0.760500292866)*x[1]**o + (-0.515546773913)*x[1]
+        ref[(0, 1, 0, 1)]=0.526432431727*x_ref[0]**o + (0.606856487788)*x_ref[0] + (-0.760500292866)*x_ref[1]**o + (-0.515546773913)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.168005756582*x[0]**o + (-0.365846608394)*x[0] + (-0.0245115487785)*x[1]**o + (0.211511404102)*x[1]
+        ref[(0, 1, 0, 2)]=0.168005756582*x_ref[0]**o + (-0.365846608394)*x_ref[0] + (-0.0245115487785)*x_ref[1]**o + (0.211511404102)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.950031195605*x[0]**o + (0.801292864562)*x[0] + (0.750514723793)*x[1]**o + (0.00708579343701)*x[1]
+        ref[(0, 1, 0, 3)]=0.950031195605*x_ref[0]**o + (0.801292864562)*x_ref[0] + (0.750514723793)*x_ref[1]**o + (0.00708579343701)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.255654337181*x[0]**o + (-0.153837136569)*x[0] + (-0.969468326857)*x[1]**o + (-0.305426473502)*x[1]
+        ref[(0, 1, 1, 0)]=-0.255654337181*x_ref[0]**o + (-0.153837136569)*x_ref[0] + (-0.969468326857)*x_ref[1]**o + (-0.305426473502)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.299754766629*x[0]**o + (-0.939407841682)*x[0] + (-0.0211003371983)*x[1]**o + (-0.53822113207)*x[1]
+        ref[(0, 1, 1, 1)]=-0.299754766629*x_ref[0]**o + (-0.939407841682)*x_ref[0] + (-0.0211003371983)*x_ref[1]**o + (-0.53822113207)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.15501062459*x[0]**o + (0.542098957219)*x[0] + (-0.116976442496)*x[1]**o + (0.98533077746)*x[1]
+        ref[(0, 1, 1, 2)]=0.15501062459*x_ref[0]**o + (0.542098957219)*x_ref[0] + (-0.116976442496)*x_ref[1]**o + (0.98533077746)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.515184876131*x[0]**o + (0.592890852105)*x[0] + (0.221216828923)*x[1]**o + (-0.698251159592)*x[1]
+        ref[(0, 1, 1, 3)]=0.515184876131*x_ref[0]**o + (0.592890852105)*x_ref[0] + (0.221216828923)*x_ref[1]**o + (-0.698251159592)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.0135964447243*x[0]**o + (0.896033603409)*x[0] + (-0.0810999050971)*x[1]**o + (-0.987451001929)*x[1]
+        ref[(0, 1, 2, 0)]=0.0135964447243*x_ref[0]**o + (0.896033603409)*x_ref[0] + (-0.0810999050971)*x_ref[1]**o + (-0.987451001929)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.149210652133*x[0]**o + (-0.366373950567)*x[0] + (-0.863373194251)*x[1]**o + (-0.804662790265)*x[1]
+        ref[(0, 1, 2, 1)]=0.149210652133*x_ref[0]**o + (-0.366373950567)*x_ref[0] + (-0.863373194251)*x_ref[1]**o + (-0.804662790265)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.656575482913*x[0]**o + (0.481210233936)*x[0] + (0.779234778396)*x[1]**o + (0.342140982048)*x[1]
+        ref[(0, 1, 2, 2)]=-0.656575482913*x_ref[0]**o + (0.481210233936)*x_ref[0] + (0.779234778396)*x_ref[1]**o + (0.342140982048)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.241888712852*x[0]**o + (-0.255849951332)*x[0] + (0.0965189697854)*x[1]**o + (-0.999705039782)*x[1]
+        ref[(0, 1, 2, 3)]=-0.241888712852*x_ref[0]**o + (-0.255849951332)*x_ref[0] + (0.0965189697854)*x_ref[1]**o + (-0.999705039782)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.755404521059*x[0]**o + (0.666684521576)*x[0] + (0.982321381348)*x[1]**o + (0.331057961022)*x[1]
+        ref[(0, 1, 3, 0)]=0.755404521059*x_ref[0]**o + (0.666684521576)*x_ref[0] + (0.982321381348)*x_ref[1]**o + (0.331057961022)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.862280574348*x[0]**o + (0.819002495009)*x[0] + (0.694290677873)*x[1]**o + (0.319823627248)*x[1]
+        ref[(0, 1, 3, 1)]=-0.862280574348*x_ref[0]**o + (0.819002495009)*x_ref[0] + (0.694290677873)*x_ref[1]**o + (0.319823627248)*x_ref[1]
+        arg[(0, 1, 3, 2)]=0.615731398278*x[0]**o + (0.66051860638)*x[0] + (-0.145464257818)*x[1]**o + (-0.911928517088)*x[1]
+        ref[(0, 1, 3, 2)]=0.615731398278*x_ref[0]**o + (0.66051860638)*x_ref[0] + (-0.145464257818)*x_ref[1]**o + (-0.911928517088)*x_ref[1]
+        arg[(0, 1, 3, 3)]=0.753064158728*x[0]**o + (0.857792599896)*x[0] + (-0.901109834503)*x[1]**o + (-0.914391055892)*x[1]
+        ref[(0, 1, 3, 3)]=0.753064158728*x_ref[0]**o + (0.857792599896)*x_ref[0] + (-0.901109834503)*x_ref[1]**o + (-0.914391055892)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.7058234673*x[0]**o + (-0.755715619532)*x[0] + (-0.945525949815)*x[1]**o + (-0.341352524135)*x[1]
+        ref[(1, 0, 0, 0)]=0.7058234673*x_ref[0]**o + (-0.755715619532)*x_ref[0] + (-0.945525949815)*x_ref[1]**o + (-0.341352524135)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.674894627822*x[0]**o + (-0.183661260711)*x[0] + (-0.203490477857)*x[1]**o + (-0.368417681616)*x[1]
+        ref[(1, 0, 0, 1)]=0.674894627822*x_ref[0]**o + (-0.183661260711)*x_ref[0] + (-0.203490477857)*x_ref[1]**o + (-0.368417681616)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.400581260086*x[0]**o + (0.602594109222)*x[0] + (0.17508810448)*x[1]**o + (-0.399688613495)*x[1]
+        ref[(1, 0, 0, 2)]=-0.400581260086*x_ref[0]**o + (0.602594109222)*x_ref[0] + (0.17508810448)*x_ref[1]**o + (-0.399688613495)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.580078376919*x[0]**o + (-0.0203426694588)*x[0] + (-0.772209373923)*x[1]**o + (-0.994785552175)*x[1]
+        ref[(1, 0, 0, 3)]=-0.580078376919*x_ref[0]**o + (-0.0203426694588)*x_ref[0] + (-0.772209373923)*x_ref[1]**o + (-0.994785552175)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.639370594501*x[0]**o + (0.07071959782)*x[0] + (0.598862393805)*x[1]**o + (-0.767204847078)*x[1]
+        ref[(1, 0, 1, 0)]=0.639370594501*x_ref[0]**o + (0.07071959782)*x_ref[0] + (0.598862393805)*x_ref[1]**o + (-0.767204847078)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.554104841734*x[0]**o + (0.484516843876)*x[0] + (-0.376386375707)*x[1]**o + (-0.2238919487)*x[1]
+        ref[(1, 0, 1, 1)]=0.554104841734*x_ref[0]**o + (0.484516843876)*x_ref[0] + (-0.376386375707)*x_ref[1]**o + (-0.2238919487)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.00265231182636*x[0]**o + (-0.812185079106)*x[0] + (0.640275115693)*x[1]**o + (0.601282759634)*x[1]
+        ref[(1, 0, 1, 2)]=-0.00265231182636*x_ref[0]**o + (-0.812185079106)*x_ref[0] + (0.640275115693)*x_ref[1]**o + (0.601282759634)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.769283587909*x[0]**o + (-0.141002577305)*x[0] + (0.106719783919)*x[1]**o + (-0.633698434357)*x[1]
+        ref[(1, 0, 1, 3)]=-0.769283587909*x_ref[0]**o + (-0.141002577305)*x_ref[0] + (0.106719783919)*x_ref[1]**o + (-0.633698434357)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.880075604734*x[0]**o + (-0.229977204247)*x[0] + (-0.484030917173)*x[1]**o + (0.0483817031168)*x[1]
+        ref[(1, 0, 2, 0)]=0.880075604734*x_ref[0]**o + (-0.229977204247)*x_ref[0] + (-0.484030917173)*x_ref[1]**o + (0.0483817031168)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.959666413939*x[0]**o + (0.245114300563)*x[0] + (-0.349208445957)*x[1]**o + (-0.394760054659)*x[1]
+        ref[(1, 0, 2, 1)]=-0.959666413939*x_ref[0]**o + (0.245114300563)*x_ref[0] + (-0.349208445957)*x_ref[1]**o + (-0.394760054659)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.859451848067*x[0]**o + (0.764165589557)*x[0] + (0.745684658353)*x[1]**o + (0.646540999241)*x[1]
+        ref[(1, 0, 2, 2)]=-0.859451848067*x_ref[0]**o + (0.764165589557)*x_ref[0] + (0.745684658353)*x_ref[1]**o + (0.646540999241)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.62383432807*x[0]**o + (0.0332152651061)*x[0] + (-0.843323708867)*x[1]**o + (0.685613845625)*x[1]
+        ref[(1, 0, 2, 3)]=-0.62383432807*x_ref[0]**o + (0.0332152651061)*x_ref[0] + (-0.843323708867)*x_ref[1]**o + (0.685613845625)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.563799270497*x[0]**o + (-0.85989857225)*x[0] + (0.130455638712)*x[1]**o + (-0.431093905712)*x[1]
+        ref[(1, 0, 3, 0)]=-0.563799270497*x_ref[0]**o + (-0.85989857225)*x_ref[0] + (0.130455638712)*x_ref[1]**o + (-0.431093905712)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.968606753825*x[0]**o + (0.497460582518)*x[0] + (-0.0609620569583)*x[1]**o + (-0.580964491072)*x[1]
+        ref[(1, 0, 3, 1)]=-0.968606753825*x_ref[0]**o + (0.497460582518)*x_ref[0] + (-0.0609620569583)*x_ref[1]**o + (-0.580964491072)*x_ref[1]
+        arg[(1, 0, 3, 2)]=-0.81035621603*x[0]**o + (-0.70947659735)*x[0] + (-0.17401774449)*x[1]**o + (-0.991676803738)*x[1]
+        ref[(1, 0, 3, 2)]=-0.81035621603*x_ref[0]**o + (-0.70947659735)*x_ref[0] + (-0.17401774449)*x_ref[1]**o + (-0.991676803738)*x_ref[1]
+        arg[(1, 0, 3, 3)]=-0.720415269364*x[0]**o + (-0.836466297422)*x[0] + (-0.679788824047)*x[1]**o + (-0.199653299058)*x[1]
+        ref[(1, 0, 3, 3)]=-0.720415269364*x_ref[0]**o + (-0.836466297422)*x_ref[0] + (-0.679788824047)*x_ref[1]**o + (-0.199653299058)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.658552222644*x[0]**o + (-0.476132564091)*x[0] + (-0.0930927778957)*x[1]**o + (0.186393497355)*x[1]
+        ref[(1, 1, 0, 0)]=0.658552222644*x_ref[0]**o + (-0.476132564091)*x_ref[0] + (-0.0930927778957)*x_ref[1]**o + (0.186393497355)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.662287925216*x[0]**o + (0.445692102685)*x[0] + (-0.891739344204)*x[1]**o + (-0.500396363859)*x[1]
+        ref[(1, 1, 0, 1)]=-0.662287925216*x_ref[0]**o + (0.445692102685)*x_ref[0] + (-0.891739344204)*x_ref[1]**o + (-0.500396363859)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.710601191538*x[0]**o + (0.897085028898)*x[0] + (-0.645652384668)*x[1]**o + (0.853853852044)*x[1]
+        ref[(1, 1, 0, 2)]=-0.710601191538*x_ref[0]**o + (0.897085028898)*x_ref[0] + (-0.645652384668)*x_ref[1]**o + (0.853853852044)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.271135255811*x[0]**o + (-0.894057563117)*x[0] + (0.585006313115)*x[1]**o + (0.861107077616)*x[1]
+        ref[(1, 1, 0, 3)]=0.271135255811*x_ref[0]**o + (-0.894057563117)*x_ref[0] + (0.585006313115)*x_ref[1]**o + (0.861107077616)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.862102911179*x[0]**o + (-0.449917432693)*x[0] + (-0.0595087950707)*x[1]**o + (-0.00064656720643)*x[1]
+        ref[(1, 1, 1, 0)]=0.862102911179*x_ref[0]**o + (-0.449917432693)*x_ref[0] + (-0.0595087950707)*x_ref[1]**o + (-0.00064656720643)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.364998471654*x[0]**o + (-0.715454173783)*x[0] + (-0.201186982851)*x[1]**o + (0.470360543753)*x[1]
+        ref[(1, 1, 1, 1)]=-0.364998471654*x_ref[0]**o + (-0.715454173783)*x_ref[0] + (-0.201186982851)*x_ref[1]**o + (0.470360543753)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.744759708815*x[0]**o + (-0.545510216923)*x[0] + (-0.983326074328)*x[1]**o + (0.0123352747796)*x[1]
+        ref[(1, 1, 1, 2)]=0.744759708815*x_ref[0]**o + (-0.545510216923)*x_ref[0] + (-0.983326074328)*x_ref[1]**o + (0.0123352747796)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.692657765435*x[0]**o + (-0.39506964254)*x[0] + (-0.245884282032)*x[1]**o + (-0.468510364974)*x[1]
+        ref[(1, 1, 1, 3)]=0.692657765435*x_ref[0]**o + (-0.39506964254)*x_ref[0] + (-0.245884282032)*x_ref[1]**o + (-0.468510364974)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.991866263649*x[0]**o + (-0.883203670811)*x[0] + (0.0883638794577)*x[1]**o + (0.648121317702)*x[1]
+        ref[(1, 1, 2, 0)]=-0.991866263649*x_ref[0]**o + (-0.883203670811)*x_ref[0] + (0.0883638794577)*x_ref[1]**o + (0.648121317702)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.357314948145*x[0]**o + (0.346795872609)*x[0] + (-0.609080151465)*x[1]**o + (-0.403424680455)*x[1]
+        ref[(1, 1, 2, 1)]=-0.357314948145*x_ref[0]**o + (0.346795872609)*x_ref[0] + (-0.609080151465)*x_ref[1]**o + (-0.403424680455)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.928851581353*x[0]**o + (-0.867721839599)*x[0] + (-0.858856638291)*x[1]**o + (-0.867711920775)*x[1]
+        ref[(1, 1, 2, 2)]=0.928851581353*x_ref[0]**o + (-0.867721839599)*x_ref[0] + (-0.858856638291)*x_ref[1]**o + (-0.867711920775)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.872431332378*x[0]**o + (0.884044148325)*x[0] + (0.987149748538)*x[1]**o + (0.373606343675)*x[1]
+        ref[(1, 1, 2, 3)]=-0.872431332378*x_ref[0]**o + (0.884044148325)*x_ref[0] + (0.987149748538)*x_ref[1]**o + (0.373606343675)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.791751494784*x[0]**o + (0.461950506977)*x[0] + (-0.149449939128)*x[1]**o + (0.00953488024937)*x[1]
+        ref[(1, 1, 3, 0)]=-0.791751494784*x_ref[0]**o + (0.461950506977)*x_ref[0] + (-0.149449939128)*x_ref[1]**o + (0.00953488024937)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.022783703148*x[0]**o + (0.237391853356)*x[0] + (-0.280799410121)*x[1]**o + (0.24614045028)*x[1]
+        ref[(1, 1, 3, 1)]=0.022783703148*x_ref[0]**o + (0.237391853356)*x_ref[0] + (-0.280799410121)*x_ref[1]**o + (0.24614045028)*x_ref[1]
+        arg[(1, 1, 3, 2)]=-0.287199078732*x[0]**o + (0.185519115085)*x[0] + (0.274525169789)*x[1]**o + (0.52832959824)*x[1]
+        ref[(1, 1, 3, 2)]=-0.287199078732*x_ref[0]**o + (0.185519115085)*x_ref[0] + (0.274525169789)*x_ref[1]**o + (0.52832959824)*x_ref[1]
+        arg[(1, 1, 3, 3)]=-0.536257430418*x[0]**o + (0.845502753309)*x[0] + (-0.631589080266)*x[1]**o + (0.276713340427)*x[1]
+        ref[(1, 1, 3, 3)]=-0.536257430418*x_ref[0]**o + (0.845502753309)*x_ref[0] + (-0.631589080266)*x_ref[1]**o + (0.276713340427)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.59609824857*x[0]**o + (-0.299985586563)*x[0] + (0.424021123451)*x[1]**o + (0.547671356096)*x[1]
+        ref[(2, 0, 0, 0)]=0.59609824857*x_ref[0]**o + (-0.299985586563)*x_ref[0] + (0.424021123451)*x_ref[1]**o + (0.547671356096)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.517965740315*x[0]**o + (-0.677570325264)*x[0] + (-0.721542474943)*x[1]**o + (-0.68101428167)*x[1]
+        ref[(2, 0, 0, 1)]=0.517965740315*x_ref[0]**o + (-0.677570325264)*x_ref[0] + (-0.721542474943)*x_ref[1]**o + (-0.68101428167)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.0234525644586*x[0]**o + (-0.532529358089)*x[0] + (0.261947370765)*x[1]**o + (-0.670869245859)*x[1]
+        ref[(2, 0, 0, 2)]=-0.0234525644586*x_ref[0]**o + (-0.532529358089)*x_ref[0] + (0.261947370765)*x_ref[1]**o + (-0.670869245859)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.706547888365*x[0]**o + (-0.723754912723)*x[0] + (-0.522844607276)*x[1]**o + (0.18741054019)*x[1]
+        ref[(2, 0, 0, 3)]=-0.706547888365*x_ref[0]**o + (-0.723754912723)*x_ref[0] + (-0.522844607276)*x_ref[1]**o + (0.18741054019)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.42239008323*x[0]**o + (0.33118288666)*x[0] + (0.15229448693)*x[1]**o + (0.52874578847)*x[1]
+        ref[(2, 0, 1, 0)]=-0.42239008323*x_ref[0]**o + (0.33118288666)*x_ref[0] + (0.15229448693)*x_ref[1]**o + (0.52874578847)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.855113903399*x[0]**o + (-0.137647079625)*x[0] + (0.0728819372649)*x[1]**o + (-0.94716406583)*x[1]
+        ref[(2, 0, 1, 1)]=-0.855113903399*x_ref[0]**o + (-0.137647079625)*x_ref[0] + (0.0728819372649)*x_ref[1]**o + (-0.94716406583)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.703989638705*x[0]**o + (-0.924789193757)*x[0] + (-0.443445863351)*x[1]**o + (-0.114224287485)*x[1]
+        ref[(2, 0, 1, 2)]=0.703989638705*x_ref[0]**o + (-0.924789193757)*x_ref[0] + (-0.443445863351)*x_ref[1]**o + (-0.114224287485)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.415775325136*x[0]**o + (0.0266515077717)*x[0] + (0.3333029496)*x[1]**o + (-0.0391841288044)*x[1]
+        ref[(2, 0, 1, 3)]=-0.415775325136*x_ref[0]**o + (0.0266515077717)*x_ref[0] + (0.3333029496)*x_ref[1]**o + (-0.0391841288044)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.319913985729*x[0]**o + (-0.778446783673)*x[0] + (-0.453407239263)*x[1]**o + (-0.797587621967)*x[1]
+        ref[(2, 0, 2, 0)]=0.319913985729*x_ref[0]**o + (-0.778446783673)*x_ref[0] + (-0.453407239263)*x_ref[1]**o + (-0.797587621967)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.0306199425954*x[0]**o + (0.0493707765118)*x[0] + (-0.952097122531)*x[1]**o + (-0.205746712511)*x[1]
+        ref[(2, 0, 2, 1)]=-0.0306199425954*x_ref[0]**o + (0.0493707765118)*x_ref[0] + (-0.952097122531)*x_ref[1]**o + (-0.205746712511)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.306027452261*x[0]**o + (-0.718526931386)*x[0] + (0.524219290121)*x[1]**o + (0.165118202838)*x[1]
+        ref[(2, 0, 2, 2)]=-0.306027452261*x_ref[0]**o + (-0.718526931386)*x_ref[0] + (0.524219290121)*x_ref[1]**o + (0.165118202838)*x_ref[1]
+        arg[(2, 0, 2, 3)]=0.295368880357*x[0]**o + (0.223061711398)*x[0] + (0.151469598457)*x[1]**o + (0.962558676036)*x[1]
+        ref[(2, 0, 2, 3)]=0.295368880357*x_ref[0]**o + (0.223061711398)*x_ref[0] + (0.151469598457)*x_ref[1]**o + (0.962558676036)*x_ref[1]
+        arg[(2, 0, 3, 0)]=-0.98049051449*x[0]**o + (0.194608354291)*x[0] + (-0.288859383589)*x[1]**o + (0.872213733385)*x[1]
+        ref[(2, 0, 3, 0)]=-0.98049051449*x_ref[0]**o + (0.194608354291)*x_ref[0] + (-0.288859383589)*x_ref[1]**o + (0.872213733385)*x_ref[1]
+        arg[(2, 0, 3, 1)]=0.799943317366*x[0]**o + (0.276400327661)*x[0] + (0.87771494202)*x[1]**o + (0.736805230377)*x[1]
+        ref[(2, 0, 3, 1)]=0.799943317366*x_ref[0]**o + (0.276400327661)*x_ref[0] + (0.87771494202)*x_ref[1]**o + (0.736805230377)*x_ref[1]
+        arg[(2, 0, 3, 2)]=-0.820742708677*x[0]**o + (-0.56161596308)*x[0] + (-0.0386181582783)*x[1]**o + (0.392756517174)*x[1]
+        ref[(2, 0, 3, 2)]=-0.820742708677*x_ref[0]**o + (-0.56161596308)*x_ref[0] + (-0.0386181582783)*x_ref[1]**o + (0.392756517174)*x_ref[1]
+        arg[(2, 0, 3, 3)]=0.772587730896*x[0]**o + (0.556993939438)*x[0] + (-0.529095751826)*x[1]**o + (-0.129377576552)*x[1]
+        ref[(2, 0, 3, 3)]=0.772587730896*x_ref[0]**o + (0.556993939438)*x_ref[0] + (-0.529095751826)*x_ref[1]**o + (-0.129377576552)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.986430661937*x[0]**o + (0.047991279217)*x[0] + (0.0429684877471)*x[1]**o + (-0.612166399451)*x[1]
+        ref[(2, 1, 0, 0)]=-0.986430661937*x_ref[0]**o + (0.047991279217)*x_ref[0] + (0.0429684877471)*x_ref[1]**o + (-0.612166399451)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.30302939003*x[0]**o + (0.336342129639)*x[0] + (-0.397928491087)*x[1]**o + (-0.397005860325)*x[1]
+        ref[(2, 1, 0, 1)]=0.30302939003*x_ref[0]**o + (0.336342129639)*x_ref[0] + (-0.397928491087)*x_ref[1]**o + (-0.397005860325)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.864794960987*x[0]**o + (-1.11485025323e-05)*x[0] + (-0.963970411171)*x[1]**o + (0.273714216096)*x[1]
+        ref[(2, 1, 0, 2)]=-0.864794960987*x_ref[0]**o + (-1.11485025323e-05)*x_ref[0] + (-0.963970411171)*x_ref[1]**o + (0.273714216096)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.458138952573*x[0]**o + (0.429276078472)*x[0] + (0.180857676632)*x[1]**o + (0.395157676128)*x[1]
+        ref[(2, 1, 0, 3)]=-0.458138952573*x_ref[0]**o + (0.429276078472)*x_ref[0] + (0.180857676632)*x_ref[1]**o + (0.395157676128)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.651698978695*x[0]**o + (0.403359700235)*x[0] + (0.112572862427)*x[1]**o + (-0.385967524063)*x[1]
+        ref[(2, 1, 1, 0)]=-0.651698978695*x_ref[0]**o + (0.403359700235)*x_ref[0] + (0.112572862427)*x_ref[1]**o + (-0.385967524063)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.45584100485*x[0]**o + (-0.761979403253)*x[0] + (0.0735874916608)*x[1]**o + (0.142306398977)*x[1]
+        ref[(2, 1, 1, 1)]=-0.45584100485*x_ref[0]**o + (-0.761979403253)*x_ref[0] + (0.0735874916608)*x_ref[1]**o + (0.142306398977)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.9838099845*x[0]**o + (0.950282863902)*x[0] + (-0.585927009903)*x[1]**o + (-0.243492837615)*x[1]
+        ref[(2, 1, 1, 2)]=-0.9838099845*x_ref[0]**o + (0.950282863902)*x_ref[0] + (-0.585927009903)*x_ref[1]**o + (-0.243492837615)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.653716150466*x[0]**o + (-0.216634677135)*x[0] + (-0.640205149699)*x[1]**o + (0.020295312998)*x[1]
+        ref[(2, 1, 1, 3)]=-0.653716150466*x_ref[0]**o + (-0.216634677135)*x_ref[0] + (-0.640205149699)*x_ref[1]**o + (0.020295312998)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.754575257994*x[0]**o + (0.837741207723)*x[0] + (-0.959873800816)*x[1]**o + (0.5814597086)*x[1]
+        ref[(2, 1, 2, 0)]=-0.754575257994*x_ref[0]**o + (0.837741207723)*x_ref[0] + (-0.959873800816)*x_ref[1]**o + (0.5814597086)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.470516076219*x[0]**o + (0.247856132764)*x[0] + (0.520057189982)*x[1]**o + (0.0469925025967)*x[1]
+        ref[(2, 1, 2, 1)]=0.470516076219*x_ref[0]**o + (0.247856132764)*x_ref[0] + (0.520057189982)*x_ref[1]**o + (0.0469925025967)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.980962622579*x[0]**o + (0.151919937631)*x[0] + (0.504373638065)*x[1]**o + (0.35425460027)*x[1]
+        ref[(2, 1, 2, 2)]=0.980962622579*x_ref[0]**o + (0.151919937631)*x_ref[0] + (0.504373638065)*x_ref[1]**o + (0.35425460027)*x_ref[1]
+        arg[(2, 1, 2, 3)]=0.666759827809*x[0]**o + (0.916368495288)*x[0] + (0.375324225213)*x[1]**o + (0.187928444338)*x[1]
+        ref[(2, 1, 2, 3)]=0.666759827809*x_ref[0]**o + (0.916368495288)*x_ref[0] + (0.375324225213)*x_ref[1]**o + (0.187928444338)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.72377123648*x[0]**o + (0.994621774811)*x[0] + (0.622421795089)*x[1]**o + (-0.385715736046)*x[1]
+        ref[(2, 1, 3, 0)]=0.72377123648*x_ref[0]**o + (0.994621774811)*x_ref[0] + (0.622421795089)*x_ref[1]**o + (-0.385715736046)*x_ref[1]
+        arg[(2, 1, 3, 1)]=-0.824673554652*x[0]**o + (0.264123139682)*x[0] + (0.141849959038)*x[1]**o + (-0.187374065298)*x[1]
+        ref[(2, 1, 3, 1)]=-0.824673554652*x_ref[0]**o + (0.264123139682)*x_ref[0] + (0.141849959038)*x_ref[1]**o + (-0.187374065298)*x_ref[1]
+        arg[(2, 1, 3, 2)]=0.174923005759*x[0]**o + (0.069691571853)*x[0] + (-0.00470283482357)*x[1]**o + (0.998557856147)*x[1]
+        ref[(2, 1, 3, 2)]=0.174923005759*x_ref[0]**o + (0.069691571853)*x_ref[0] + (-0.00470283482357)*x_ref[1]**o + (0.998557856147)*x_ref[1]
+        arg[(2, 1, 3, 3)]=-0.738943682271*x[0]**o + (-0.319834413207)*x[0] + (-0.157935627428)*x[1]**o + (0.0953555465715)*x[1]
+        ref[(2, 1, 3, 3)]=-0.738943682271*x_ref[0]**o + (-0.319834413207)*x_ref[0] + (-0.157935627428)*x_ref[1]**o + (0.0953555465715)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.174014677532*x[0]**o + (0.130039057311)*x[0] + (-0.911284538866)*x[1]**o + (-0.656615219931)*x[1]
+        ref[(3, 0, 0, 0)]=0.174014677532*x_ref[0]**o + (0.130039057311)*x_ref[0] + (-0.911284538866)*x_ref[1]**o + (-0.656615219931)*x_ref[1]
+        arg[(3, 0, 0, 1)]=0.865607315095*x[0]**o + (-0.754769604256)*x[0] + (-0.798420570776)*x[1]**o + (-0.398409522617)*x[1]
+        ref[(3, 0, 0, 1)]=0.865607315095*x_ref[0]**o + (-0.754769604256)*x_ref[0] + (-0.798420570776)*x_ref[1]**o + (-0.398409522617)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.21052633102*x[0]**o + (0.826352645515)*x[0] + (-0.664345852789)*x[1]**o + (0.356506348437)*x[1]
+        ref[(3, 0, 0, 2)]=-0.21052633102*x_ref[0]**o + (0.826352645515)*x_ref[0] + (-0.664345852789)*x_ref[1]**o + (0.356506348437)*x_ref[1]
+        arg[(3, 0, 0, 3)]=-0.427482742621*x[0]**o + (-0.720765713142)*x[0] + (0.301109600659)*x[1]**o + (-0.50060686218)*x[1]
+        ref[(3, 0, 0, 3)]=-0.427482742621*x_ref[0]**o + (-0.720765713142)*x_ref[0] + (0.301109600659)*x_ref[1]**o + (-0.50060686218)*x_ref[1]
+        arg[(3, 0, 1, 0)]=-0.187361653619*x[0]**o + (0.883979399325)*x[0] + (-0.885041598035)*x[1]**o + (-0.741408108831)*x[1]
+        ref[(3, 0, 1, 0)]=-0.187361653619*x_ref[0]**o + (0.883979399325)*x_ref[0] + (-0.885041598035)*x_ref[1]**o + (-0.741408108831)*x_ref[1]
+        arg[(3, 0, 1, 1)]=0.0503733969479*x[0]**o + (-0.164452991574)*x[0] + (0.414036091791)*x[1]**o + (-0.868797345418)*x[1]
+        ref[(3, 0, 1, 1)]=0.0503733969479*x_ref[0]**o + (-0.164452991574)*x_ref[0] + (0.414036091791)*x_ref[1]**o + (-0.868797345418)*x_ref[1]
+        arg[(3, 0, 1, 2)]=-0.556518448867*x[0]**o + (0.684400176615)*x[0] + (-0.860653233459)*x[1]**o + (0.788871925674)*x[1]
+        ref[(3, 0, 1, 2)]=-0.556518448867*x_ref[0]**o + (0.684400176615)*x_ref[0] + (-0.860653233459)*x_ref[1]**o + (0.788871925674)*x_ref[1]
+        arg[(3, 0, 1, 3)]=-0.644052869599*x[0]**o + (0.228227633658)*x[0] + (0.7295613236)*x[1]**o + (-0.111671705756)*x[1]
+        ref[(3, 0, 1, 3)]=-0.644052869599*x_ref[0]**o + (0.228227633658)*x_ref[0] + (0.7295613236)*x_ref[1]**o + (-0.111671705756)*x_ref[1]
+        arg[(3, 0, 2, 0)]=-0.354850425114*x[0]**o + (-0.482583066629)*x[0] + (-0.751653187598)*x[1]**o + (-0.715432647632)*x[1]
+        ref[(3, 0, 2, 0)]=-0.354850425114*x_ref[0]**o + (-0.482583066629)*x_ref[0] + (-0.751653187598)*x_ref[1]**o + (-0.715432647632)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.737758761125*x[0]**o + (0.00665853308152)*x[0] + (0.22928686234)*x[1]**o + (-0.973231665991)*x[1]
+        ref[(3, 0, 2, 1)]=0.737758761125*x_ref[0]**o + (0.00665853308152)*x_ref[0] + (0.22928686234)*x_ref[1]**o + (-0.973231665991)*x_ref[1]
+        arg[(3, 0, 2, 2)]=0.924610171896*x[0]**o + (0.207974044764)*x[0] + (0.336322862165)*x[1]**o + (-0.209502930027)*x[1]
+        ref[(3, 0, 2, 2)]=0.924610171896*x_ref[0]**o + (0.207974044764)*x_ref[0] + (0.336322862165)*x_ref[1]**o + (-0.209502930027)*x_ref[1]
+        arg[(3, 0, 2, 3)]=-0.84450193087*x[0]**o + (0.565486615756)*x[0] + (0.473026450191)*x[1]**o + (0.0555244689662)*x[1]
+        ref[(3, 0, 2, 3)]=-0.84450193087*x_ref[0]**o + (0.565486615756)*x_ref[0] + (0.473026450191)*x_ref[1]**o + (0.0555244689662)*x_ref[1]
+        arg[(3, 0, 3, 0)]=0.116964899862*x[0]**o + (-0.900575321515)*x[0] + (0.297483731708)*x[1]**o + (0.633540722849)*x[1]
+        ref[(3, 0, 3, 0)]=0.116964899862*x_ref[0]**o + (-0.900575321515)*x_ref[0] + (0.297483731708)*x_ref[1]**o + (0.633540722849)*x_ref[1]
+        arg[(3, 0, 3, 1)]=0.742558128881*x[0]**o + (-0.162277773462)*x[0] + (-0.437899475687)*x[1]**o + (0.148881703661)*x[1]
+        ref[(3, 0, 3, 1)]=0.742558128881*x_ref[0]**o + (-0.162277773462)*x_ref[0] + (-0.437899475687)*x_ref[1]**o + (0.148881703661)*x_ref[1]
+        arg[(3, 0, 3, 2)]=-0.151807828009*x[0]**o + (-0.947992717527)*x[0] + (0.305910174588)*x[1]**o + (-0.40299180759)*x[1]
+        ref[(3, 0, 3, 2)]=-0.151807828009*x_ref[0]**o + (-0.947992717527)*x_ref[0] + (0.305910174588)*x_ref[1]**o + (-0.40299180759)*x_ref[1]
+        arg[(3, 0, 3, 3)]=0.3080688397*x[0]**o + (-0.730718879981)*x[0] + (-0.24714012516)*x[1]**o + (-0.258543146866)*x[1]
+        ref[(3, 0, 3, 3)]=0.3080688397*x_ref[0]**o + (-0.730718879981)*x_ref[0] + (-0.24714012516)*x_ref[1]**o + (-0.258543146866)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.115316482594*x[0]**o + (0.0963262883061)*x[0] + (0.182383511562)*x[1]**o + (-0.6028507113)*x[1]
+        ref[(3, 1, 0, 0)]=-0.115316482594*x_ref[0]**o + (0.0963262883061)*x_ref[0] + (0.182383511562)*x_ref[1]**o + (-0.6028507113)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.777963302996*x[0]**o + (0.0181519596602)*x[0] + (0.142157978721)*x[1]**o + (-0.199344952073)*x[1]
+        ref[(3, 1, 0, 1)]=0.777963302996*x_ref[0]**o + (0.0181519596602)*x_ref[0] + (0.142157978721)*x_ref[1]**o + (-0.199344952073)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.79502507094*x[0]**o + (0.0428919263535)*x[0] + (-0.202243211341)*x[1]**o + (-0.106765837851)*x[1]
+        ref[(3, 1, 0, 2)]=0.79502507094*x_ref[0]**o + (0.0428919263535)*x_ref[0] + (-0.202243211341)*x_ref[1]**o + (-0.106765837851)*x_ref[1]
+        arg[(3, 1, 0, 3)]=0.067746590062*x[0]**o + (-0.375048154709)*x[0] + (0.238044341932)*x[1]**o + (0.790241908867)*x[1]
+        ref[(3, 1, 0, 3)]=0.067746590062*x_ref[0]**o + (-0.375048154709)*x_ref[0] + (0.238044341932)*x_ref[1]**o + (0.790241908867)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.200304204055*x[0]**o + (-0.66959937254)*x[0] + (-0.581222762052)*x[1]**o + (-0.210499723609)*x[1]
+        ref[(3, 1, 1, 0)]=0.200304204055*x_ref[0]**o + (-0.66959937254)*x_ref[0] + (-0.581222762052)*x_ref[1]**o + (-0.210499723609)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.837710367481*x[0]**o + (0.630132439796)*x[0] + (-0.90412675154)*x[1]**o + (-0.365065823584)*x[1]
+        ref[(3, 1, 1, 1)]=-0.837710367481*x_ref[0]**o + (0.630132439796)*x_ref[0] + (-0.90412675154)*x_ref[1]**o + (-0.365065823584)*x_ref[1]
+        arg[(3, 1, 1, 2)]=0.708921127919*x[0]**o + (0.508694880839)*x[0] + (0.608715461235)*x[1]**o + (-0.713936232723)*x[1]
+        ref[(3, 1, 1, 2)]=0.708921127919*x_ref[0]**o + (0.508694880839)*x_ref[0] + (0.608715461235)*x_ref[1]**o + (-0.713936232723)*x_ref[1]
+        arg[(3, 1, 1, 3)]=0.250321628515*x[0]**o + (0.475342547495)*x[0] + (-0.14051986095)*x[1]**o + (-0.574057610099)*x[1]
+        ref[(3, 1, 1, 3)]=0.250321628515*x_ref[0]**o + (0.475342547495)*x_ref[0] + (-0.14051986095)*x_ref[1]**o + (-0.574057610099)*x_ref[1]
+        arg[(3, 1, 2, 0)]=0.727732632533*x[0]**o + (-0.291422763427)*x[0] + (0.107405030174)*x[1]**o + (-0.149966375283)*x[1]
+        ref[(3, 1, 2, 0)]=0.727732632533*x_ref[0]**o + (-0.291422763427)*x_ref[0] + (0.107405030174)*x_ref[1]**o + (-0.149966375283)*x_ref[1]
+        arg[(3, 1, 2, 1)]=0.443934333622*x[0]**o + (0.288689805363)*x[0] + (-0.897170254773)*x[1]**o + (-0.864014448991)*x[1]
+        ref[(3, 1, 2, 1)]=0.443934333622*x_ref[0]**o + (0.288689805363)*x_ref[0] + (-0.897170254773)*x_ref[1]**o + (-0.864014448991)*x_ref[1]
+        arg[(3, 1, 2, 2)]=0.46577770369*x[0]**o + (-0.742221967855)*x[0] + (0.968208598202)*x[1]**o + (-0.482576058921)*x[1]
+        ref[(3, 1, 2, 2)]=0.46577770369*x_ref[0]**o + (-0.742221967855)*x_ref[0] + (0.968208598202)*x_ref[1]**o + (-0.482576058921)*x_ref[1]
+        arg[(3, 1, 2, 3)]=-0.767716083329*x[0]**o + (0.702725632579)*x[0] + (-0.67650829725)*x[1]**o + (-0.568070053056)*x[1]
+        ref[(3, 1, 2, 3)]=-0.767716083329*x_ref[0]**o + (0.702725632579)*x_ref[0] + (-0.67650829725)*x_ref[1]**o + (-0.568070053056)*x_ref[1]
+        arg[(3, 1, 3, 0)]=0.663587588932*x[0]**o + (0.0178768424036)*x[0] + (-0.248175327691)*x[1]**o + (0.025714801215)*x[1]
+        ref[(3, 1, 3, 0)]=0.663587588932*x_ref[0]**o + (0.0178768424036)*x_ref[0] + (-0.248175327691)*x_ref[1]**o + (0.025714801215)*x_ref[1]
+        arg[(3, 1, 3, 1)]=0.992804524965*x[0]**o + (0.120389657052)*x[0] + (-0.409532743948)*x[1]**o + (-0.0350481288671)*x[1]
+        ref[(3, 1, 3, 1)]=0.992804524965*x_ref[0]**o + (0.120389657052)*x_ref[0] + (-0.409532743948)*x_ref[1]**o + (-0.0350481288671)*x_ref[1]
+        arg[(3, 1, 3, 2)]=0.657956527739*x[0]**o + (0.87182852839)*x[0] + (-0.636008552332)*x[1]**o + (0.91899713004)*x[1]
+        ref[(3, 1, 3, 2)]=0.657956527739*x_ref[0]**o + (0.87182852839)*x_ref[0] + (-0.636008552332)*x_ref[1]**o + (0.91899713004)*x_ref[1]
+        arg[(3, 1, 3, 3)]=0.962558043753*x[0]**o + (0.123349503671)*x[0] + (-0.580958396798)*x[1]**o + (-0.406410999241)*x[1]
+        ref[(3, 1, 3, 3)]=0.962558043753*x_ref[0]**o + (0.123349503671)*x_ref[0] + (-0.580958396798)*x_ref[1]**o + (-0.406410999241)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.696564460869*x[2]**o + (0.707709424719)*x[2]
+            ref[(0, 0, 0, 0)]+=0.696564460869*x_ref[2]**o + (0.707709424719)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.954273631331*x[2]**o + (-0.0858529981835)*x[2]
+            ref[(0, 0, 0, 1)]+=0.954273631331*x_ref[2]**o + (-0.0858529981835)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.996755216106*x[2]**o + (-0.203255443202)*x[2]
+            ref[(0, 0, 0, 2)]+=-0.996755216106*x_ref[2]**o + (-0.203255443202)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=-0.282542995844*x[2]**o + (-0.0730663633072)*x[2]
+            ref[(0, 0, 0, 3)]+=-0.282542995844*x_ref[2]**o + (-0.0730663633072)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.234658914844*x[2]**o + (-0.214728152891)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.234658914844*x_ref[2]**o + (-0.214728152891)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.105284600489*x[2]**o + (-0.954026843742)*x[2]
+            ref[(0, 0, 1, 1)]+=0.105284600489*x_ref[2]**o + (-0.954026843742)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.694394002921*x[2]**o + (0.00178872401298)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.694394002921*x_ref[2]**o + (0.00178872401298)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.891638368151*x[2]**o + (-0.108867547099)*x[2]
+            ref[(0, 0, 1, 3)]+=0.891638368151*x_ref[2]**o + (-0.108867547099)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.291975115905*x[2]**o + (0.317708280862)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.291975115905*x_ref[2]**o + (0.317708280862)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.514285471882*x[2]**o + (0.869771309801)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.514285471882*x_ref[2]**o + (0.869771309801)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.103757260084*x[2]**o + (-0.282574528647)*x[2]
+            ref[(0, 0, 2, 2)]+=0.103757260084*x_ref[2]**o + (-0.282574528647)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.879403578744*x[2]**o + (0.472996353906)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.879403578744*x_ref[2]**o + (0.472996353906)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.372759714978*x[2]**o + (-0.103610985516)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.372759714978*x_ref[2]**o + (-0.103610985516)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.0760378692415*x[2]**o + (0.487971069704)*x[2]
+            ref[(0, 0, 3, 1)]+=0.0760378692415*x_ref[2]**o + (0.487971069704)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=0.316094559303*x[2]**o + (0.556919615535)*x[2]
+            ref[(0, 0, 3, 2)]+=0.316094559303*x_ref[2]**o + (0.556919615535)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=0.127408071406*x[2]**o + (-0.248014676047)*x[2]
+            ref[(0, 0, 3, 3)]+=0.127408071406*x_ref[2]**o + (-0.248014676047)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.944718915265*x[2]**o + (0.447632819865)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.944718915265*x_ref[2]**o + (0.447632819865)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.440250357159*x[2]**o + (0.953227430589)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.440250357159*x_ref[2]**o + (0.953227430589)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.395250446747*x[2]**o + (0.300589630797)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.395250446747*x_ref[2]**o + (0.300589630797)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.40853261065*x[2]**o + (0.779932896053)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.40853261065*x_ref[2]**o + (0.779932896053)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.90791750852*x[2]**o + (0.0804359151812)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.90791750852*x_ref[2]**o + (0.0804359151812)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.166065839535*x[2]**o + (-0.0471470185351)*x[2]
+            ref[(0, 1, 1, 1)]+=0.166065839535*x_ref[2]**o + (-0.0471470185351)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.37995945435*x[2]**o + (-0.590870261033)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.37995945435*x_ref[2]**o + (-0.590870261033)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.466207450307*x[2]**o + (0.0914834570634)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.466207450307*x_ref[2]**o + (0.0914834570634)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.215280473125*x[2]**o + (0.419167354817)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.215280473125*x_ref[2]**o + (0.419167354817)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.402462503482*x[2]**o + (0.729866999369)*x[2]
+            ref[(0, 1, 2, 1)]+=0.402462503482*x_ref[2]**o + (0.729866999369)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.973027071571*x[2]**o + (-0.784786840402)*x[2]
+            ref[(0, 1, 2, 2)]+=0.973027071571*x_ref[2]**o + (-0.784786840402)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.40959950238*x[2]**o + (0.0500083263512)*x[2]
+            ref[(0, 1, 2, 3)]+=0.40959950238*x_ref[2]**o + (0.0500083263512)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.807407646376*x[2]**o + (0.92582549386)*x[2]
+            ref[(0, 1, 3, 0)]+=-0.807407646376*x_ref[2]**o + (0.92582549386)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.0566711922263*x[2]**o + (-0.574523028624)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.0566711922263*x_ref[2]**o + (-0.574523028624)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.344365017146*x[2]**o + (0.945252053587)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.344365017146*x_ref[2]**o + (0.945252053587)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=0.356735293695*x[2]**o + (0.495986027923)*x[2]
+            ref[(0, 1, 3, 3)]+=0.356735293695*x_ref[2]**o + (0.495986027923)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.47652463692*x[2]**o + (0.430823984371)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.47652463692*x_ref[2]**o + (0.430823984371)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.179937033811*x[2]**o + (0.981440431517)*x[2]
+            ref[(1, 0, 0, 1)]+=0.179937033811*x_ref[2]**o + (0.981440431517)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.155584188848*x[2]**o + (0.655717325044)*x[2]
+            ref[(1, 0, 0, 2)]+=0.155584188848*x_ref[2]**o + (0.655717325044)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.13414302166*x[2]**o + (0.805493333739)*x[2]
+            ref[(1, 0, 0, 3)]+=0.13414302166*x_ref[2]**o + (0.805493333739)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.101581418301*x[2]**o + (-0.991704462763)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.101581418301*x_ref[2]**o + (-0.991704462763)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.143795047589*x[2]**o + (-0.278782532507)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.143795047589*x_ref[2]**o + (-0.278782532507)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.944288237473*x[2]**o + (0.463281594141)*x[2]
+            ref[(1, 0, 1, 2)]+=0.944288237473*x_ref[2]**o + (0.463281594141)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.270198993939*x[2]**o + (0.295358293922)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.270198993939*x_ref[2]**o + (0.295358293922)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.0170984417106*x[2]**o + (0.0462163838553)*x[2]
+            ref[(1, 0, 2, 0)]+=0.0170984417106*x_ref[2]**o + (0.0462163838553)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.494703089727*x[2]**o + (0.520048860879)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.494703089727*x_ref[2]**o + (0.520048860879)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.604002947329*x[2]**o + (0.173849117472)*x[2]
+            ref[(1, 0, 2, 2)]+=0.604002947329*x_ref[2]**o + (0.173849117472)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=0.34502226615*x[2]**o + (0.149900399522)*x[2]
+            ref[(1, 0, 2, 3)]+=0.34502226615*x_ref[2]**o + (0.149900399522)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.716496127021*x[2]**o + (0.528458177724)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.716496127021*x_ref[2]**o + (0.528458177724)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.645027492474*x[2]**o + (0.387983180298)*x[2]
+            ref[(1, 0, 3, 1)]+=-0.645027492474*x_ref[2]**o + (0.387983180298)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=-0.96613490219*x[2]**o + (0.116330937496)*x[2]
+            ref[(1, 0, 3, 2)]+=-0.96613490219*x_ref[2]**o + (0.116330937496)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=0.0879228213866*x[2]**o + (0.605496039438)*x[2]
+            ref[(1, 0, 3, 3)]+=0.0879228213866*x_ref[2]**o + (0.605496039438)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.449350685718*x[2]**o + (-0.0165071317207)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.449350685718*x_ref[2]**o + (-0.0165071317207)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.203242755473*x[2]**o + (-0.861291329562)*x[2]
+            ref[(1, 1, 0, 1)]+=0.203242755473*x_ref[2]**o + (-0.861291329562)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.292419286169*x[2]**o + (0.885151728919)*x[2]
+            ref[(1, 1, 0, 2)]+=0.292419286169*x_ref[2]**o + (0.885151728919)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.770624317786*x[2]**o + (-0.869764021782)*x[2]
+            ref[(1, 1, 0, 3)]+=0.770624317786*x_ref[2]**o + (-0.869764021782)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.653539939669*x[2]**o + (-0.956098602337)*x[2]
+            ref[(1, 1, 1, 0)]+=0.653539939669*x_ref[2]**o + (-0.956098602337)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.800776429772*x[2]**o + (-0.0369819042479)*x[2]
+            ref[(1, 1, 1, 1)]+=0.800776429772*x_ref[2]**o + (-0.0369819042479)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.876696380197*x[2]**o + (0.418818631516)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.876696380197*x_ref[2]**o + (0.418818631516)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.575439374824*x[2]**o + (-0.34414481195)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.575439374824*x_ref[2]**o + (-0.34414481195)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.793603685512*x[2]**o + (0.36751641836)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.793603685512*x_ref[2]**o + (0.36751641836)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.154935761139*x[2]**o + (-0.334295466654)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.154935761139*x_ref[2]**o + (-0.334295466654)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.708665537978*x[2]**o + (-0.653508383102)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.708665537978*x_ref[2]**o + (-0.653508383102)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=-0.144945840826*x[2]**o + (-0.250610032642)*x[2]
+            ref[(1, 1, 2, 3)]+=-0.144945840826*x_ref[2]**o + (-0.250610032642)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=0.725879714634*x[2]**o + (-0.695538244657)*x[2]
+            ref[(1, 1, 3, 0)]+=0.725879714634*x_ref[2]**o + (-0.695538244657)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.388273560251*x[2]**o + (-0.806695954733)*x[2]
+            ref[(1, 1, 3, 1)]+=0.388273560251*x_ref[2]**o + (-0.806695954733)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=0.740355571401*x[2]**o + (0.219072015579)*x[2]
+            ref[(1, 1, 3, 2)]+=0.740355571401*x_ref[2]**o + (0.219072015579)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=0.0133621728346*x[2]**o + (0.250161845397)*x[2]
+            ref[(1, 1, 3, 3)]+=0.0133621728346*x_ref[2]**o + (0.250161845397)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.320007695183*x[2]**o + (-0.300875071444)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.320007695183*x_ref[2]**o + (-0.300875071444)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.129248365953*x[2]**o + (0.727336955336)*x[2]
+            ref[(2, 0, 0, 1)]+=0.129248365953*x_ref[2]**o + (0.727336955336)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.987006188284*x[2]**o + (-0.110321575894)*x[2]
+            ref[(2, 0, 0, 2)]+=0.987006188284*x_ref[2]**o + (-0.110321575894)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.675858035239*x[2]**o + (-0.689137114585)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.675858035239*x_ref[2]**o + (-0.689137114585)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.82709675517*x[2]**o + (-0.682917377442)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.82709675517*x_ref[2]**o + (-0.682917377442)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.258912316482*x[2]**o + (0.934193138768)*x[2]
+            ref[(2, 0, 1, 1)]+=0.258912316482*x_ref[2]**o + (0.934193138768)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.0876657796285*x[2]**o + (0.163364082789)*x[2]
+            ref[(2, 0, 1, 2)]+=0.0876657796285*x_ref[2]**o + (0.163364082789)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=-0.566549912313*x[2]**o + (0.047403189568)*x[2]
+            ref[(2, 0, 1, 3)]+=-0.566549912313*x_ref[2]**o + (0.047403189568)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.732268590402*x[2]**o + (0.839465318492)*x[2]
+            ref[(2, 0, 2, 0)]+=0.732268590402*x_ref[2]**o + (0.839465318492)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.369510448418*x[2]**o + (0.885144133704)*x[2]
+            ref[(2, 0, 2, 1)]+=0.369510448418*x_ref[2]**o + (0.885144133704)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=0.0311306568657*x[2]**o + (-0.537828109792)*x[2]
+            ref[(2, 0, 2, 2)]+=0.0311306568657*x_ref[2]**o + (-0.537828109792)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=-0.2317427161*x[2]**o + (0.937405915163)*x[2]
+            ref[(2, 0, 2, 3)]+=-0.2317427161*x_ref[2]**o + (0.937405915163)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.184642722278*x[2]**o + (-0.0786363025487)*x[2]
+            ref[(2, 0, 3, 0)]+=0.184642722278*x_ref[2]**o + (-0.0786363025487)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=0.223946530313*x[2]**o + (-0.806180159181)*x[2]
+            ref[(2, 0, 3, 1)]+=0.223946530313*x_ref[2]**o + (-0.806180159181)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=0.863047932191*x[2]**o + (-0.26825131435)*x[2]
+            ref[(2, 0, 3, 2)]+=0.863047932191*x_ref[2]**o + (-0.26825131435)*x_ref[2]
+            arg[(2, 0, 3, 3)]+=-0.291053218144*x[2]**o + (0.486678105777)*x[2]
+            ref[(2, 0, 3, 3)]+=-0.291053218144*x_ref[2]**o + (0.486678105777)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.33213716533*x[2]**o + (-0.537963566193)*x[2]
+            ref[(2, 1, 0, 0)]+=0.33213716533*x_ref[2]**o + (-0.537963566193)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.752712287133*x[2]**o + (-0.636733905629)*x[2]
+            ref[(2, 1, 0, 1)]+=0.752712287133*x_ref[2]**o + (-0.636733905629)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.799396635169*x[2]**o + (0.946479673472)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.799396635169*x_ref[2]**o + (0.946479673472)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.75540566243*x[2]**o + (-0.489943188759)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.75540566243*x_ref[2]**o + (-0.489943188759)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.926647037817*x[2]**o + (-0.942463285815)*x[2]
+            ref[(2, 1, 1, 0)]+=-0.926647037817*x_ref[2]**o + (-0.942463285815)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.799520983506*x[2]**o + (0.398125947325)*x[2]
+            ref[(2, 1, 1, 1)]+=0.799520983506*x_ref[2]**o + (0.398125947325)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.739253756548*x[2]**o + (0.706597332042)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.739253756548*x_ref[2]**o + (0.706597332042)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.492117780266*x[2]**o + (-0.157439459234)*x[2]
+            ref[(2, 1, 1, 3)]+=-0.492117780266*x_ref[2]**o + (-0.157439459234)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.462961673623*x[2]**o + (-0.439797620506)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.462961673623*x_ref[2]**o + (-0.439797620506)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.969054632999*x[2]**o + (-0.0281992876001)*x[2]
+            ref[(2, 1, 2, 1)]+=0.969054632999*x_ref[2]**o + (-0.0281992876001)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.425321041288*x[2]**o + (-0.240642778999)*x[2]
+            ref[(2, 1, 2, 2)]+=0.425321041288*x_ref[2]**o + (-0.240642778999)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=-0.952568094637*x[2]**o + (0.336679415082)*x[2]
+            ref[(2, 1, 2, 3)]+=-0.952568094637*x_ref[2]**o + (0.336679415082)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=-0.160225932415*x[2]**o + (0.928866302575)*x[2]
+            ref[(2, 1, 3, 0)]+=-0.160225932415*x_ref[2]**o + (0.928866302575)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=-0.321267877806*x[2]**o + (0.906114273414)*x[2]
+            ref[(2, 1, 3, 1)]+=-0.321267877806*x_ref[2]**o + (0.906114273414)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=0.491182498508*x[2]**o + (0.746784051633)*x[2]
+            ref[(2, 1, 3, 2)]+=0.491182498508*x_ref[2]**o + (0.746784051633)*x_ref[2]
+            arg[(2, 1, 3, 3)]+=-0.249147505003*x[2]**o + (0.829907703719)*x[2]
+            ref[(2, 1, 3, 3)]+=-0.249147505003*x_ref[2]**o + (0.829907703719)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=-0.431314488025*x[2]**o + (-0.533875085834)*x[2]
+            ref[(3, 0, 0, 0)]+=-0.431314488025*x_ref[2]**o + (-0.533875085834)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=0.020623352925*x[2]**o + (-0.948437816426)*x[2]
+            ref[(3, 0, 0, 1)]+=0.020623352925*x_ref[2]**o + (-0.948437816426)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.729403770813*x[2]**o + (0.46918687571)*x[2]
+            ref[(3, 0, 0, 2)]+=0.729403770813*x_ref[2]**o + (0.46918687571)*x_ref[2]
+            arg[(3, 0, 0, 3)]+=-0.540359266623*x[2]**o + (-0.20468149262)*x[2]
+            ref[(3, 0, 0, 3)]+=-0.540359266623*x_ref[2]**o + (-0.20468149262)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=-0.872331124537*x[2]**o + (0.292375794447)*x[2]
+            ref[(3, 0, 1, 0)]+=-0.872331124537*x_ref[2]**o + (0.292375794447)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.563539063588*x[2]**o + (0.522536566053)*x[2]
+            ref[(3, 0, 1, 1)]+=0.563539063588*x_ref[2]**o + (0.522536566053)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=-0.543475751185*x[2]**o + (-0.030904335936)*x[2]
+            ref[(3, 0, 1, 2)]+=-0.543475751185*x_ref[2]**o + (-0.030904335936)*x_ref[2]
+            arg[(3, 0, 1, 3)]+=0.797957709532*x[2]**o + (0.87637788638)*x[2]
+            ref[(3, 0, 1, 3)]+=0.797957709532*x_ref[2]**o + (0.87637788638)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=0.854620115337*x[2]**o + (0.115032617402)*x[2]
+            ref[(3, 0, 2, 0)]+=0.854620115337*x_ref[2]**o + (0.115032617402)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=-0.176952176528*x[2]**o + (0.780082159663)*x[2]
+            ref[(3, 0, 2, 1)]+=-0.176952176528*x_ref[2]**o + (0.780082159663)*x_ref[2]
+            arg[(3, 0, 2, 2)]+=-0.898891735519*x[2]**o + (0.677615256366)*x[2]
+            ref[(3, 0, 2, 2)]+=-0.898891735519*x_ref[2]**o + (0.677615256366)*x_ref[2]
+            arg[(3, 0, 2, 3)]+=-0.502430987453*x[2]**o + (0.257778360054)*x[2]
+            ref[(3, 0, 2, 3)]+=-0.502430987453*x_ref[2]**o + (0.257778360054)*x_ref[2]
+            arg[(3, 0, 3, 0)]+=0.272506608327*x[2]**o + (-0.932142445832)*x[2]
+            ref[(3, 0, 3, 0)]+=0.272506608327*x_ref[2]**o + (-0.932142445832)*x_ref[2]
+            arg[(3, 0, 3, 1)]+=-0.42791693389*x[2]**o + (-0.522852929015)*x[2]
+            ref[(3, 0, 3, 1)]+=-0.42791693389*x_ref[2]**o + (-0.522852929015)*x_ref[2]
+            arg[(3, 0, 3, 2)]+=0.94815093151*x[2]**o + (-0.514114688134)*x[2]
+            ref[(3, 0, 3, 2)]+=0.94815093151*x_ref[2]**o + (-0.514114688134)*x_ref[2]
+            arg[(3, 0, 3, 3)]+=0.290522215252*x[2]**o + (-0.360691016106)*x[2]
+            ref[(3, 0, 3, 3)]+=0.290522215252*x_ref[2]**o + (-0.360691016106)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=-0.214241248349*x[2]**o + (0.363744497524)*x[2]
+            ref[(3, 1, 0, 0)]+=-0.214241248349*x_ref[2]**o + (0.363744497524)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.880645881658*x[2]**o + (-0.693480546723)*x[2]
+            ref[(3, 1, 0, 1)]+=0.880645881658*x_ref[2]**o + (-0.693480546723)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=0.0625518606436*x[2]**o + (0.979576297838)*x[2]
+            ref[(3, 1, 0, 2)]+=0.0625518606436*x_ref[2]**o + (0.979576297838)*x_ref[2]
+            arg[(3, 1, 0, 3)]+=0.192630352158*x[2]**o + (-0.999975359519)*x[2]
+            ref[(3, 1, 0, 3)]+=0.192630352158*x_ref[2]**o + (-0.999975359519)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.517456028007*x[2]**o + (-0.562875578201)*x[2]
+            ref[(3, 1, 1, 0)]+=0.517456028007*x_ref[2]**o + (-0.562875578201)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.663219239826*x[2]**o + (-0.666453972321)*x[2]
+            ref[(3, 1, 1, 1)]+=-0.663219239826*x_ref[2]**o + (-0.666453972321)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.411070551611*x[2]**o + (0.473378746422)*x[2]
+            ref[(3, 1, 1, 2)]+=0.411070551611*x_ref[2]**o + (0.473378746422)*x_ref[2]
+            arg[(3, 1, 1, 3)]+=-0.346514989574*x[2]**o + (0.179442627689)*x[2]
+            ref[(3, 1, 1, 3)]+=-0.346514989574*x_ref[2]**o + (0.179442627689)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=0.958287832168*x[2]**o + (0.293189132749)*x[2]
+            ref[(3, 1, 2, 0)]+=0.958287832168*x_ref[2]**o + (0.293189132749)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.453390871424*x[2]**o + (0.631821991781)*x[2]
+            ref[(3, 1, 2, 1)]+=0.453390871424*x_ref[2]**o + (0.631821991781)*x_ref[2]
+            arg[(3, 1, 2, 2)]+=0.910455713095*x[2]**o + (-0.0729782043855)*x[2]
+            ref[(3, 1, 2, 2)]+=0.910455713095*x_ref[2]**o + (-0.0729782043855)*x_ref[2]
+            arg[(3, 1, 2, 3)]+=0.169068081585*x[2]**o + (-0.46300729498)*x[2]
+            ref[(3, 1, 2, 3)]+=0.169068081585*x_ref[2]**o + (-0.46300729498)*x_ref[2]
+            arg[(3, 1, 3, 0)]+=0.409617939118*x[2]**o + (-0.912797355134)*x[2]
+            ref[(3, 1, 3, 0)]+=0.409617939118*x_ref[2]**o + (-0.912797355134)*x_ref[2]
+            arg[(3, 1, 3, 1)]+=-0.150060674652*x[2]**o + (-0.437240052307)*x[2]
+            ref[(3, 1, 3, 1)]+=-0.150060674652*x_ref[2]**o + (-0.437240052307)*x_ref[2]
+            arg[(3, 1, 3, 2)]+=0.26193349266*x[2]**o + (0.260232077576)*x[2]
+            ref[(3, 1, 3, 2)]+=0.26193349266*x_ref[2]**o + (0.260232077576)*x_ref[2]
+            arg[(3, 1, 3, 3)]+=0.556106227981*x[2]**o + (0.0509622455509)*x[2]
+            ref[(3, 1, 3, 3)]+=0.556106227981*x_ref[2]**o + (0.0509622455509)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.180930262858*x[0]**o + (-0.62101045406)*x[0] + (-0.251141768926)*x[1]**o + (0.301679308937)*x[1]
+        ref=0.180930262858*x_ref[0]**o + (-0.62101045406)*x_ref[0] + (-0.251141768926)*x_ref[1]**o + (0.301679308937)*x_ref[1]
+        if dim==3:
+            arg+=(-0.700888136096)*x[2]**o + (0.696829054142)*x[2]
+            ref+=(-0.700888136096)*x_ref[2]**o + (0.696829054142)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=0.106981660874*x[0]**o + (0.700566339763)*x[0] + (0.518759716561)*x[1]**o + (-0.0351158149746)*x[1]
+        ref[(0,)]=0.106981660874*x_ref[0]**o + (0.700566339763)*x_ref[0] + (0.518759716561)*x_ref[1]**o + (-0.0351158149746)*x_ref[1]
+        arg[(1,)]=0.33048935962*x[0]**o + (0.515949052426)*x[0] + (-0.475494847027)*x[1]**o + (0.770159342563)*x[1]
+        ref[(1,)]=0.33048935962*x_ref[0]**o + (0.515949052426)*x_ref[0] + (-0.475494847027)*x_ref[1]**o + (0.770159342563)*x_ref[1]
+        arg[(2,)]=-0.403810390959*x[0]**o + (-0.198889561374)*x[0] + (0.554563646072)*x[1]**o + (0.545393696151)*x[1]
+        ref[(2,)]=-0.403810390959*x_ref[0]**o + (-0.198889561374)*x_ref[0] + (0.554563646072)*x_ref[1]**o + (0.545393696151)*x_ref[1]
+        arg[(3,)]=0.563833269811*x[0]**o + (-0.598240770029)*x[0] + (0.430058591295)*x[1]**o + (0.681476812136)*x[1]
+        ref[(3,)]=0.563833269811*x_ref[0]**o + (-0.598240770029)*x_ref[0] + (0.430058591295)*x_ref[1]**o + (0.681476812136)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.348034013102*x[2]**o + (0.252294818036)*x[2]
+            ref[(0,)]+=0.348034013102*x_ref[2]**o + (0.252294818036)*x_ref[2]
+            arg[(1,)]+=-0.984974043077*x[2]**o + (0.296242844074)*x[2]
+            ref[(1,)]+=-0.984974043077*x_ref[2]**o + (0.296242844074)*x_ref[2]
+            arg[(2,)]+=-0.580009112804*x[2]**o + (-0.393689095754)*x[2]
+            ref[(2,)]+=-0.580009112804*x_ref[2]**o + (-0.393689095754)*x_ref[2]
+            arg[(3,)]+=-0.00395030201742*x[2]**o + (0.284825887077)*x[2]
+            ref[(3,)]+=-0.00395030201742*x_ref[2]**o + (0.284825887077)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=-0.490536844259*x[0]**o + (0.48230214457)*x[0] + (-0.0440406998421)*x[1]**o + (-0.309535136021)*x[1]
+        ref[(0, 0)]=-0.490536844259*x_ref[0]**o + (0.48230214457)*x_ref[0] + (-0.0440406998421)*x_ref[1]**o + (-0.309535136021)*x_ref[1]
+        arg[(0, 1)]=0.785071524638*x[0]**o + (0.101607120245)*x[0] + (-0.599376917764)*x[1]**o + (-0.433247913271)*x[1]
+        ref[(0, 1)]=0.785071524638*x_ref[0]**o + (0.101607120245)*x_ref[0] + (-0.599376917764)*x_ref[1]**o + (-0.433247913271)*x_ref[1]
+        arg[(0, 2)]=-0.973652228257*x[0]**o + (0.138452241622)*x[0] + (0.0166402767062)*x[1]**o + (-0.516771029714)*x[1]
+        ref[(0, 2)]=-0.973652228257*x_ref[0]**o + (0.138452241622)*x_ref[0] + (0.0166402767062)*x_ref[1]**o + (-0.516771029714)*x_ref[1]
+        arg[(0, 3)]=-0.429675175387*x[0]**o + (0.389618327883)*x[0] + (0.620788552954)*x[1]**o + (-0.0850781265232)*x[1]
+        ref[(0, 3)]=-0.429675175387*x_ref[0]**o + (0.389618327883)*x_ref[0] + (0.620788552954)*x_ref[1]**o + (-0.0850781265232)*x_ref[1]
+        arg[(1, 0)]=-0.678004142566*x[0]**o + (-0.121915567833)*x[0] + (0.522615802743)*x[1]**o + (0.838371271853)*x[1]
+        ref[(1, 0)]=-0.678004142566*x_ref[0]**o + (-0.121915567833)*x_ref[0] + (0.522615802743)*x_ref[1]**o + (0.838371271853)*x_ref[1]
+        arg[(1, 1)]=0.426780278604*x[0]**o + (-0.495765355228)*x[0] + (-0.490225301135)*x[1]**o + (-0.453224707097)*x[1]
+        ref[(1, 1)]=0.426780278604*x_ref[0]**o + (-0.495765355228)*x_ref[0] + (-0.490225301135)*x_ref[1]**o + (-0.453224707097)*x_ref[1]
+        arg[(1, 2)]=0.926818211583*x[0]**o + (0.0340769144189)*x[0] + (-0.826380816529)*x[1]**o + (0.177840854959)*x[1]
+        ref[(1, 2)]=0.926818211583*x_ref[0]**o + (0.0340769144189)*x_ref[0] + (-0.826380816529)*x_ref[1]**o + (0.177840854959)*x_ref[1]
+        arg[(1, 3)]=-0.269134638978*x[0]**o + (-0.470947772484)*x[0] + (0.0578940576508)*x[1]**o + (-0.750684648898)*x[1]
+        ref[(1, 3)]=-0.269134638978*x_ref[0]**o + (-0.470947772484)*x_ref[0] + (0.0578940576508)*x_ref[1]**o + (-0.750684648898)*x_ref[1]
+        arg[(2, 0)]=-0.02261483144*x[0]**o + (0.941081031672)*x[0] + (-0.480915261833)*x[1]**o + (-0.171898447845)*x[1]
+        ref[(2, 0)]=-0.02261483144*x_ref[0]**o + (0.941081031672)*x_ref[0] + (-0.480915261833)*x_ref[1]**o + (-0.171898447845)*x_ref[1]
+        arg[(2, 1)]=-0.778800160394*x[0]**o + (0.554502398884)*x[0] + (0.414459174657)*x[1]**o + (-0.0852967469228)*x[1]
+        ref[(2, 1)]=-0.778800160394*x_ref[0]**o + (0.554502398884)*x_ref[0] + (0.414459174657)*x_ref[1]**o + (-0.0852967469228)*x_ref[1]
+        arg[(2, 2)]=-0.254319899681*x[0]**o + (0.749539326452)*x[0] + (0.168188936735)*x[1]**o + (0.922580778409)*x[1]
+        ref[(2, 2)]=-0.254319899681*x_ref[0]**o + (0.749539326452)*x_ref[0] + (0.168188936735)*x_ref[1]**o + (0.922580778409)*x_ref[1]
+        arg[(2, 3)]=-0.622799066859*x[0]**o + (0.877827780061)*x[0] + (0.854590901828)*x[1]**o + (-0.695682106769)*x[1]
+        ref[(2, 3)]=-0.622799066859*x_ref[0]**o + (0.877827780061)*x_ref[0] + (0.854590901828)*x_ref[1]**o + (-0.695682106769)*x_ref[1]
+        arg[(3, 0)]=0.552607765848*x[0]**o + (-0.780917641685)*x[0] + (0.844860781021)*x[1]**o + (-0.456549657165)*x[1]
+        ref[(3, 0)]=0.552607765848*x_ref[0]**o + (-0.780917641685)*x_ref[0] + (0.844860781021)*x_ref[1]**o + (-0.456549657165)*x_ref[1]
+        arg[(3, 1)]=-0.574997640589*x[0]**o + (0.569734575319)*x[0] + (-0.590206331307)*x[1]**o + (-0.344601463486)*x[1]
+        ref[(3, 1)]=-0.574997640589*x_ref[0]**o + (0.569734575319)*x_ref[0] + (-0.590206331307)*x_ref[1]**o + (-0.344601463486)*x_ref[1]
+        arg[(3, 2)]=-0.606132413552*x[0]**o + (0.963928996484)*x[0] + (0.666511368768)*x[1]**o + (0.560553763931)*x[1]
+        ref[(3, 2)]=-0.606132413552*x_ref[0]**o + (0.963928996484)*x_ref[0] + (0.666511368768)*x_ref[1]**o + (0.560553763931)*x_ref[1]
+        arg[(3, 3)]=0.686876449596*x[0]**o + (0.544696785011)*x[0] + (-0.236719460147)*x[1]**o + (0.308876785993)*x[1]
+        ref[(3, 3)]=0.686876449596*x_ref[0]**o + (0.544696785011)*x_ref[0] + (-0.236719460147)*x_ref[1]**o + (0.308876785993)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.832699789434*x[2]**o + (0.219704021057)*x[2]
+            ref[(0, 0)]+=-0.832699789434*x_ref[2]**o + (0.219704021057)*x_ref[2]
+            arg[(0, 1)]+=0.591421001393*x[2]**o + (0.332556580047)*x[2]
+            ref[(0, 1)]+=0.591421001393*x_ref[2]**o + (0.332556580047)*x_ref[2]
+            arg[(0, 2)]+=0.489022429985*x[2]**o + (0.788255144816)*x[2]
+            ref[(0, 2)]+=0.489022429985*x_ref[2]**o + (0.788255144816)*x_ref[2]
+            arg[(0, 3)]+=0.485090187887*x[2]**o + (-0.871956448694)*x[2]
+            ref[(0, 3)]+=0.485090187887*x_ref[2]**o + (-0.871956448694)*x_ref[2]
+            arg[(1, 0)]+=0.97782004445*x[2]**o + (-0.898925565574)*x[2]
+            ref[(1, 0)]+=0.97782004445*x_ref[2]**o + (-0.898925565574)*x_ref[2]
+            arg[(1, 1)]+=0.0174624193015*x[2]**o + (0.41655772206)*x[2]
+            ref[(1, 1)]+=0.0174624193015*x_ref[2]**o + (0.41655772206)*x_ref[2]
+            arg[(1, 2)]+=0.784990707087*x[2]**o + (-0.271648772282)*x[2]
+            ref[(1, 2)]+=0.784990707087*x_ref[2]**o + (-0.271648772282)*x_ref[2]
+            arg[(1, 3)]+=0.55999900198*x[2]**o + (-0.520791396067)*x[2]
+            ref[(1, 3)]+=0.55999900198*x_ref[2]**o + (-0.520791396067)*x_ref[2]
+            arg[(2, 0)]+=0.189337056343*x[2]**o + (0.897410161747)*x[2]
+            ref[(2, 0)]+=0.189337056343*x_ref[2]**o + (0.897410161747)*x_ref[2]
+            arg[(2, 1)]+=0.24486137997*x[2]**o + (0.182480892605)*x[2]
+            ref[(2, 1)]+=0.24486137997*x_ref[2]**o + (0.182480892605)*x_ref[2]
+            arg[(2, 2)]+=0.0797748601783*x[2]**o + (0.669602881575)*x[2]
+            ref[(2, 2)]+=0.0797748601783*x_ref[2]**o + (0.669602881575)*x_ref[2]
+            arg[(2, 3)]+=-0.217426559484*x[2]**o + (0.713480630551)*x[2]
+            ref[(2, 3)]+=-0.217426559484*x_ref[2]**o + (0.713480630551)*x_ref[2]
+            arg[(3, 0)]+=0.048200301104*x[2]**o + (-0.596231323956)*x[2]
+            ref[(3, 0)]+=0.048200301104*x_ref[2]**o + (-0.596231323956)*x_ref[2]
+            arg[(3, 1)]+=-0.4438011146*x[2]**o + (0.180332471433)*x[2]
+            ref[(3, 1)]+=-0.4438011146*x_ref[2]**o + (0.180332471433)*x_ref[2]
+            arg[(3, 2)]+=0.188045152617*x[2]**o + (0.555432850197)*x[2]
+            ref[(3, 2)]+=0.188045152617*x_ref[2]**o + (0.555432850197)*x_ref[2]
+            arg[(3, 3)]+=0.656443482736*x[2]**o + (0.299042972602)*x[2]
+            ref[(3, 3)]+=0.656443482736*x_ref[2]**o + (0.299042972602)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3),w_ref)
+        arg[(0, 0, 0)]=-0.902803708747*x[0]**o + (0.674621299707)*x[0] + (-0.179898796762)*x[1]**o + (0.864737207449)*x[1]
+        ref[(0, 0, 0)]=-0.902803708747*x_ref[0]**o + (0.674621299707)*x_ref[0] + (-0.179898796762)*x_ref[1]**o + (0.864737207449)*x_ref[1]
+        arg[(0, 0, 1)]=-0.550746606987*x[0]**o + (0.129545579846)*x[0] + (-0.784169921551)*x[1]**o + (0.774060475294)*x[1]
+        ref[(0, 0, 1)]=-0.550746606987*x_ref[0]**o + (0.129545579846)*x_ref[0] + (-0.784169921551)*x_ref[1]**o + (0.774060475294)*x_ref[1]
+        arg[(0, 0, 2)]=-0.393444100412*x[0]**o + (0.950807770022)*x[0] + (-0.194964957378)*x[1]**o + (-0.640339787577)*x[1]
+        ref[(0, 0, 2)]=-0.393444100412*x_ref[0]**o + (0.950807770022)*x_ref[0] + (-0.194964957378)*x_ref[1]**o + (-0.640339787577)*x_ref[1]
+        arg[(0, 1, 0)]=0.983372173199*x[0]**o + (0.580966761827)*x[0] + (0.00301645522026)*x[1]**o + (0.435598841224)*x[1]
+        ref[(0, 1, 0)]=0.983372173199*x_ref[0]**o + (0.580966761827)*x_ref[0] + (0.00301645522026)*x_ref[1]**o + (0.435598841224)*x_ref[1]
+        arg[(0, 1, 1)]=0.0113296340486*x[0]**o + (-0.631792930631)*x[0] + (-0.880157942293)*x[1]**o + (0.553487768438)*x[1]
+        ref[(0, 1, 1)]=0.0113296340486*x_ref[0]**o + (-0.631792930631)*x_ref[0] + (-0.880157942293)*x_ref[1]**o + (0.553487768438)*x_ref[1]
+        arg[(0, 1, 2)]=-0.893590006181*x[0]**o + (0.173466359072)*x[0] + (-0.568881989266)*x[1]**o + (-0.270215216353)*x[1]
+        ref[(0, 1, 2)]=-0.893590006181*x_ref[0]**o + (0.173466359072)*x_ref[0] + (-0.568881989266)*x_ref[1]**o + (-0.270215216353)*x_ref[1]
+        arg[(1, 0, 0)]=-0.543429304116*x[0]**o + (0.0234833706516)*x[0] + (-0.671877994153)*x[1]**o + (0.827889942325)*x[1]
+        ref[(1, 0, 0)]=-0.543429304116*x_ref[0]**o + (0.0234833706516)*x_ref[0] + (-0.671877994153)*x_ref[1]**o + (0.827889942325)*x_ref[1]
+        arg[(1, 0, 1)]=0.534254114125*x[0]**o + (0.399388962403)*x[0] + (-0.979724392054)*x[1]**o + (-0.0607589379308)*x[1]
+        ref[(1, 0, 1)]=0.534254114125*x_ref[0]**o + (0.399388962403)*x_ref[0] + (-0.979724392054)*x_ref[1]**o + (-0.0607589379308)*x_ref[1]
+        arg[(1, 0, 2)]=-0.840441480432*x[0]**o + (-0.103810790627)*x[0] + (0.408702521552)*x[1]**o + (0.987806677667)*x[1]
+        ref[(1, 0, 2)]=-0.840441480432*x_ref[0]**o + (-0.103810790627)*x_ref[0] + (0.408702521552)*x_ref[1]**o + (0.987806677667)*x_ref[1]
+        arg[(1, 1, 0)]=0.692976785258*x[0]**o + (0.0988704226223)*x[0] + (-0.518300400327)*x[1]**o + (0.209648730237)*x[1]
+        ref[(1, 1, 0)]=0.692976785258*x_ref[0]**o + (0.0988704226223)*x_ref[0] + (-0.518300400327)*x_ref[1]**o + (0.209648730237)*x_ref[1]
+        arg[(1, 1, 1)]=-0.319974598624*x[0]**o + (0.0422493521305)*x[0] + (-0.287654793871)*x[1]**o + (0.954252062974)*x[1]
+        ref[(1, 1, 1)]=-0.319974598624*x_ref[0]**o + (0.0422493521305)*x_ref[0] + (-0.287654793871)*x_ref[1]**o + (0.954252062974)*x_ref[1]
+        arg[(1, 1, 2)]=0.16205677405*x[0]**o + (0.377960581855)*x[0] + (0.729502565881)*x[1]**o + (-0.307831209814)*x[1]
+        ref[(1, 1, 2)]=0.16205677405*x_ref[0]**o + (0.377960581855)*x_ref[0] + (0.729502565881)*x_ref[1]**o + (-0.307831209814)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.0939933164066*x[2]**o + (-0.244108516503)*x[2]
+            ref[(0, 0, 0)]+=0.0939933164066*x_ref[2]**o + (-0.244108516503)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.0409631930446*x[2]**o + (-0.205062309971)*x[2]
+            ref[(0, 0, 1)]+=-0.0409631930446*x_ref[2]**o + (-0.205062309971)*x_ref[2]
+            arg[(0, 0, 2)]+=0.737989235634*x[2]**o + (-0.185695115204)*x[2]
+            ref[(0, 0, 2)]+=0.737989235634*x_ref[2]**o + (-0.185695115204)*x_ref[2]
+            arg[(0, 1, 0)]+=0.118879599498*x[2]**o + (0.791161447963)*x[2]
+            ref[(0, 1, 0)]+=0.118879599498*x_ref[2]**o + (0.791161447963)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.791324170627*x[2]**o + (-0.612278217259)*x[2]
+            ref[(0, 1, 1)]+=-0.791324170627*x_ref[2]**o + (-0.612278217259)*x_ref[2]
+            arg[(0, 1, 2)]+=0.14448997708*x[2]**o + (0.26854179118)*x[2]
+            ref[(0, 1, 2)]+=0.14448997708*x_ref[2]**o + (0.26854179118)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.0813835232223*x[2]**o + (-0.467673838688)*x[2]
+            ref[(1, 0, 0)]+=-0.0813835232223*x_ref[2]**o + (-0.467673838688)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.24731941494*x[2]**o + (0.638316061767)*x[2]
+            ref[(1, 0, 1)]+=-0.24731941494*x_ref[2]**o + (0.638316061767)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.125747204521*x[2]**o + (-0.647212468004)*x[2]
+            ref[(1, 0, 2)]+=-0.125747204521*x_ref[2]**o + (-0.647212468004)*x_ref[2]
+            arg[(1, 1, 0)]+=0.0406333169629*x[2]**o + (0.376717639715)*x[2]
+            ref[(1, 1, 0)]+=0.0406333169629*x_ref[2]**o + (0.376717639715)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.197943961736*x[2]**o + (-0.97231656565)*x[2]
+            ref[(1, 1, 1)]+=-0.197943961736*x_ref[2]**o + (-0.97231656565)*x_ref[2]
+            arg[(1, 1, 2)]+=-0.722859738507*x[2]**o + (-0.548222610639)*x[2]
+            ref[(1, 1, 2)]+=-0.722859738507*x_ref[2]**o + (-0.548222610639)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Solution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2, 2),w)
+        ref = Data(0,(4, 4, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.467787052663*x[0]**o + (-0.246831530405)*x[0] + (-0.233869006729)*x[1]**o + (-0.466607867907)*x[1]
+        ref[(0, 0, 0, 0)]=0.467787052663*x_ref[0]**o + (-0.246831530405)*x_ref[0] + (-0.233869006729)*x_ref[1]**o + (-0.466607867907)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.958527297273*x[0]**o + (0.569745068802)*x[0] + (0.497123199479)*x[1]**o + (-0.999262526464)*x[1]
+        ref[(0, 0, 0, 1)]=0.958527297273*x_ref[0]**o + (0.569745068802)*x_ref[0] + (0.497123199479)*x_ref[1]**o + (-0.999262526464)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.221466733779*x[0]**o + (-0.80412599948)*x[0] + (0.516055691024)*x[1]**o + (-0.177240997971)*x[1]
+        ref[(0, 0, 1, 0)]=-0.221466733779*x_ref[0]**o + (-0.80412599948)*x_ref[0] + (0.516055691024)*x_ref[1]**o + (-0.177240997971)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.285559763538*x[0]**o + (0.400859166017)*x[0] + (0.921743187493)*x[1]**o + (0.313199066598)*x[1]
+        ref[(0, 0, 1, 1)]=0.285559763538*x_ref[0]**o + (0.400859166017)*x_ref[0] + (0.921743187493)*x_ref[1]**o + (0.313199066598)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.503612870544*x[0]**o + (-0.855096605914)*x[0] + (0.879023869416)*x[1]**o + (0.145909712572)*x[1]
+        ref[(0, 1, 0, 0)]=0.503612870544*x_ref[0]**o + (-0.855096605914)*x_ref[0] + (0.879023869416)*x_ref[1]**o + (0.145909712572)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.487622973683*x[0]**o + (0.374014285028)*x[0] + (0.196111588971)*x[1]**o + (-0.0907927395119)*x[1]
+        ref[(0, 1, 0, 1)]=0.487622973683*x_ref[0]**o + (0.374014285028)*x_ref[0] + (0.196111588971)*x_ref[1]**o + (-0.0907927395119)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.296983410226*x[0]**o + (-0.643227323605)*x[0] + (-0.241605322275)*x[1]**o + (-0.821090127511)*x[1]
+        ref[(0, 1, 1, 0)]=0.296983410226*x_ref[0]**o + (-0.643227323605)*x_ref[0] + (-0.241605322275)*x_ref[1]**o + (-0.821090127511)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.751252151735*x[0]**o + (-0.309014519761)*x[0] + (-0.590950210068)*x[1]**o + (-0.514962462962)*x[1]
+        ref[(0, 1, 1, 1)]=0.751252151735*x_ref[0]**o + (-0.309014519761)*x_ref[0] + (-0.590950210068)*x_ref[1]**o + (-0.514962462962)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.762910767289*x[0]**o + (-0.181171127913)*x[0] + (0.610202350014)*x[1]**o + (-0.0259144481331)*x[1]
+        ref[(0, 2, 0, 0)]=0.762910767289*x_ref[0]**o + (-0.181171127913)*x_ref[0] + (0.610202350014)*x_ref[1]**o + (-0.0259144481331)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.949344388934*x[0]**o + (-0.178145736354)*x[0] + (-0.0675466182324)*x[1]**o + (-0.88233784472)*x[1]
+        ref[(0, 2, 0, 1)]=-0.949344388934*x_ref[0]**o + (-0.178145736354)*x_ref[0] + (-0.0675466182324)*x_ref[1]**o + (-0.88233784472)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.743203495696*x[0]**o + (0.863190150445)*x[0] + (-0.0199943896884)*x[1]**o + (0.825977999226)*x[1]
+        ref[(0, 2, 1, 0)]=0.743203495696*x_ref[0]**o + (0.863190150445)*x_ref[0] + (-0.0199943896884)*x_ref[1]**o + (0.825977999226)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.370545065104*x[0]**o + (0.66755459179)*x[0] + (0.328414010914)*x[1]**o + (0.328362340262)*x[1]
+        ref[(0, 2, 1, 1)]=-0.370545065104*x_ref[0]**o + (0.66755459179)*x_ref[0] + (0.328414010914)*x_ref[1]**o + (0.328362340262)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.866643075394*x[0]**o + (-0.329392807727)*x[0] + (0.581925186595)*x[1]**o + (-0.811706708685)*x[1]
+        ref[(0, 3, 0, 0)]=0.866643075394*x_ref[0]**o + (-0.329392807727)*x_ref[0] + (0.581925186595)*x_ref[1]**o + (-0.811706708685)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.394834317931*x[0]**o + (-0.282075622622)*x[0] + (-0.991162121048)*x[1]**o + (0.441156519631)*x[1]
+        ref[(0, 3, 0, 1)]=0.394834317931*x_ref[0]**o + (-0.282075622622)*x_ref[0] + (-0.991162121048)*x_ref[1]**o + (0.441156519631)*x_ref[1]
+        arg[(0, 3, 1, 0)]=-0.436292239561*x[0]**o + (0.190909727011)*x[0] + (0.718058496757)*x[1]**o + (0.512155891088)*x[1]
+        ref[(0, 3, 1, 0)]=-0.436292239561*x_ref[0]**o + (0.190909727011)*x_ref[0] + (0.718058496757)*x_ref[1]**o + (0.512155891088)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.199702361098*x[0]**o + (-0.187662223586)*x[0] + (0.96210916187)*x[1]**o + (0.217539630329)*x[1]
+        ref[(0, 3, 1, 1)]=0.199702361098*x_ref[0]**o + (-0.187662223586)*x_ref[0] + (0.96210916187)*x_ref[1]**o + (0.217539630329)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.239470457405*x[0]**o + (-0.527142484011)*x[0] + (0.324303436743)*x[1]**o + (0.563804453223)*x[1]
+        ref[(1, 0, 0, 0)]=-0.239470457405*x_ref[0]**o + (-0.527142484011)*x_ref[0] + (0.324303436743)*x_ref[1]**o + (0.563804453223)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.340555513081*x[0]**o + (0.879033276211)*x[0] + (-0.923835755675)*x[1]**o + (0.164337651235)*x[1]
+        ref[(1, 0, 0, 1)]=0.340555513081*x_ref[0]**o + (0.879033276211)*x_ref[0] + (-0.923835755675)*x_ref[1]**o + (0.164337651235)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.0945997848702*x[0]**o + (-0.214058380008)*x[0] + (-0.577186179426)*x[1]**o + (0.338344054152)*x[1]
+        ref[(1, 0, 1, 0)]=-0.0945997848702*x_ref[0]**o + (-0.214058380008)*x_ref[0] + (-0.577186179426)*x_ref[1]**o + (0.338344054152)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.218408160522*x[0]**o + (-0.00517209270699)*x[0] + (-0.94571687628)*x[1]**o + (0.129213095169)*x[1]
+        ref[(1, 0, 1, 1)]=0.218408160522*x_ref[0]**o + (-0.00517209270699)*x_ref[0] + (-0.94571687628)*x_ref[1]**o + (0.129213095169)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.764426353338*x[0]**o + (-0.0422039579566)*x[0] + (0.184772493741)*x[1]**o + (0.255797743719)*x[1]
+        ref[(1, 1, 0, 0)]=-0.764426353338*x_ref[0]**o + (-0.0422039579566)*x_ref[0] + (0.184772493741)*x_ref[1]**o + (0.255797743719)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.701320367887*x[0]**o + (-0.0993781621046)*x[0] + (-0.00152964331073)*x[1]**o + (0.548778645075)*x[1]
+        ref[(1, 1, 0, 1)]=0.701320367887*x_ref[0]**o + (-0.0993781621046)*x_ref[0] + (-0.00152964331073)*x_ref[1]**o + (0.548778645075)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.448071188374*x[0]**o + (-0.499631074788)*x[0] + (-0.650478206273)*x[1]**o + (0.906257499539)*x[1]
+        ref[(1, 1, 1, 0)]=0.448071188374*x_ref[0]**o + (-0.499631074788)*x_ref[0] + (-0.650478206273)*x_ref[1]**o + (0.906257499539)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.270194654802*x[0]**o + (-0.030848505947)*x[0] + (0.0907351771826)*x[1]**o + (-0.470525915659)*x[1]
+        ref[(1, 1, 1, 1)]=-0.270194654802*x_ref[0]**o + (-0.030848505947)*x_ref[0] + (0.0907351771826)*x_ref[1]**o + (-0.470525915659)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.306837540535*x[0]**o + (-0.742536755165)*x[0] + (0.73515352155)*x[1]**o + (0.660571401538)*x[1]
+        ref[(1, 2, 0, 0)]=-0.306837540535*x_ref[0]**o + (-0.742536755165)*x_ref[0] + (0.73515352155)*x_ref[1]**o + (0.660571401538)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.145444443816*x[0]**o + (-0.364357210487)*x[0] + (-0.301958467874)*x[1]**o + (-0.930645534291)*x[1]
+        ref[(1, 2, 0, 1)]=-0.145444443816*x_ref[0]**o + (-0.364357210487)*x_ref[0] + (-0.301958467874)*x_ref[1]**o + (-0.930645534291)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.335785511414*x[0]**o + (0.859029142571)*x[0] + (0.0424496548934)*x[1]**o + (-0.640947662311)*x[1]
+        ref[(1, 2, 1, 0)]=0.335785511414*x_ref[0]**o + (0.859029142571)*x_ref[0] + (0.0424496548934)*x_ref[1]**o + (-0.640947662311)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.984328353691*x[0]**o + (-0.0213405532707)*x[0] + (-0.132243937824)*x[1]**o + (-0.386139656139)*x[1]
+        ref[(1, 2, 1, 1)]=0.984328353691*x_ref[0]**o + (-0.0213405532707)*x_ref[0] + (-0.132243937824)*x_ref[1]**o + (-0.386139656139)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.0272273105715*x[0]**o + (-0.585817133524)*x[0] + (-0.93585206836)*x[1]**o + (0.751250463261)*x[1]
+        ref[(1, 3, 0, 0)]=0.0272273105715*x_ref[0]**o + (-0.585817133524)*x_ref[0] + (-0.93585206836)*x_ref[1]**o + (0.751250463261)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.408384984485*x[0]**o + (-0.521885535869)*x[0] + (0.290459202634)*x[1]**o + (0.733042173028)*x[1]
+        ref[(1, 3, 0, 1)]=-0.408384984485*x_ref[0]**o + (-0.521885535869)*x_ref[0] + (0.290459202634)*x_ref[1]**o + (0.733042173028)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.217421456698*x[0]**o + (-0.579956137842)*x[0] + (-0.185465284453)*x[1]**o + (0.0717611262877)*x[1]
+        ref[(1, 3, 1, 0)]=-0.217421456698*x_ref[0]**o + (-0.579956137842)*x_ref[0] + (-0.185465284453)*x_ref[1]**o + (0.0717611262877)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.702879599024*x[0]**o + (-0.153204348434)*x[0] + (-0.996671676161)*x[1]**o + (-0.635440189225)*x[1]
+        ref[(1, 3, 1, 1)]=0.702879599024*x_ref[0]**o + (-0.153204348434)*x_ref[0] + (-0.996671676161)*x_ref[1]**o + (-0.635440189225)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.112324290334*x[0]**o + (-0.124534140165)*x[0] + (0.563878104168)*x[1]**o + (0.847663408935)*x[1]
+        ref[(2, 0, 0, 0)]=-0.112324290334*x_ref[0]**o + (-0.124534140165)*x_ref[0] + (0.563878104168)*x_ref[1]**o + (0.847663408935)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.682205249179*x[0]**o + (-0.58800160075)*x[0] + (-0.0758865811225)*x[1]**o + (-0.261868848781)*x[1]
+        ref[(2, 0, 0, 1)]=0.682205249179*x_ref[0]**o + (-0.58800160075)*x_ref[0] + (-0.0758865811225)*x_ref[1]**o + (-0.261868848781)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.985830926297*x[0]**o + (0.512169274088)*x[0] + (-0.192901696579)*x[1]**o + (0.935725669682)*x[1]
+        ref[(2, 0, 1, 0)]=0.985830926297*x_ref[0]**o + (0.512169274088)*x_ref[0] + (-0.192901696579)*x_ref[1]**o + (0.935725669682)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.796885240415*x[0]**o + (0.0464034738541)*x[0] + (-0.130170480266)*x[1]**o + (-0.32618536196)*x[1]
+        ref[(2, 0, 1, 1)]=-0.796885240415*x_ref[0]**o + (0.0464034738541)*x_ref[0] + (-0.130170480266)*x_ref[1]**o + (-0.32618536196)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.914526179185*x[0]**o + (-0.154779418418)*x[0] + (-0.111113257703)*x[1]**o + (-0.0398058256888)*x[1]
+        ref[(2, 1, 0, 0)]=-0.914526179185*x_ref[0]**o + (-0.154779418418)*x_ref[0] + (-0.111113257703)*x_ref[1]**o + (-0.0398058256888)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.342729272381*x[0]**o + (-0.207500224928)*x[0] + (-0.334813918118)*x[1]**o + (-0.661237251613)*x[1]
+        ref[(2, 1, 0, 1)]=-0.342729272381*x_ref[0]**o + (-0.207500224928)*x_ref[0] + (-0.334813918118)*x_ref[1]**o + (-0.661237251613)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.73801310022*x[0]**o + (-0.15805668098)*x[0] + (-0.579942220809)*x[1]**o + (0.924098014391)*x[1]
+        ref[(2, 1, 1, 0)]=0.73801310022*x_ref[0]**o + (-0.15805668098)*x_ref[0] + (-0.579942220809)*x_ref[1]**o + (0.924098014391)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.609604320495*x[0]**o + (-0.66130665656)*x[0] + (-0.798533220089)*x[1]**o + (-0.248151019829)*x[1]
+        ref[(2, 1, 1, 1)]=-0.609604320495*x_ref[0]**o + (-0.66130665656)*x_ref[0] + (-0.798533220089)*x_ref[1]**o + (-0.248151019829)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.693048248205*x[0]**o + (0.840147430039)*x[0] + (0.0356229388954)*x[1]**o + (0.759184059726)*x[1]
+        ref[(2, 2, 0, 0)]=-0.693048248205*x_ref[0]**o + (0.840147430039)*x_ref[0] + (0.0356229388954)*x_ref[1]**o + (0.759184059726)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.671696657463*x[0]**o + (-0.142651257878)*x[0] + (0.958323282219)*x[1]**o + (0.0741990537283)*x[1]
+        ref[(2, 2, 0, 1)]=-0.671696657463*x_ref[0]**o + (-0.142651257878)*x_ref[0] + (0.958323282219)*x_ref[1]**o + (0.0741990537283)*x_ref[1]
+        arg[(2, 2, 1, 0)]=0.754055461487*x[0]**o + (-0.351355794402)*x[0] + (-0.308341646761)*x[1]**o + (0.392135145681)*x[1]
+        ref[(2, 2, 1, 0)]=0.754055461487*x_ref[0]**o + (-0.351355794402)*x_ref[0] + (-0.308341646761)*x_ref[1]**o + (0.392135145681)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.857856847285*x[0]**o + (0.387677209419)*x[0] + (0.176027347211)*x[1]**o + (-0.0847131996343)*x[1]
+        ref[(2, 2, 1, 1)]=-0.857856847285*x_ref[0]**o + (0.387677209419)*x_ref[0] + (0.176027347211)*x_ref[1]**o + (-0.0847131996343)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.905911643219*x[0]**o + (-0.552365347713)*x[0] + (-0.482854943852)*x[1]**o + (0.724413325541)*x[1]
+        ref[(2, 3, 0, 0)]=0.905911643219*x_ref[0]**o + (-0.552365347713)*x_ref[0] + (-0.482854943852)*x_ref[1]**o + (0.724413325541)*x_ref[1]
+        arg[(2, 3, 0, 1)]=0.145248985194*x[0]**o + (-0.460270860827)*x[0] + (0.0126233995184)*x[1]**o + (-0.257287698551)*x[1]
+        ref[(2, 3, 0, 1)]=0.145248985194*x_ref[0]**o + (-0.460270860827)*x_ref[0] + (0.0126233995184)*x_ref[1]**o + (-0.257287698551)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.0441603459037*x[0]**o + (-0.394467364804)*x[0] + (-0.602893320718)*x[1]**o + (-0.695788654441)*x[1]
+        ref[(2, 3, 1, 0)]=0.0441603459037*x_ref[0]**o + (-0.394467364804)*x_ref[0] + (-0.602893320718)*x_ref[1]**o + (-0.695788654441)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.0981016239177*x[0]**o + (0.753717719101)*x[0] + (-0.0794843530482)*x[1]**o + (-0.979391201739)*x[1]
+        ref[(2, 3, 1, 1)]=-0.0981016239177*x_ref[0]**o + (0.753717719101)*x_ref[0] + (-0.0794843530482)*x_ref[1]**o + (-0.979391201739)*x_ref[1]
+        arg[(3, 0, 0, 0)]=-0.195530049697*x[0]**o + (-0.313923136713)*x[0] + (-0.20008022751)*x[1]**o + (0.398164248402)*x[1]
+        ref[(3, 0, 0, 0)]=-0.195530049697*x_ref[0]**o + (-0.313923136713)*x_ref[0] + (-0.20008022751)*x_ref[1]**o + (0.398164248402)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.432455159442*x[0]**o + (0.662651916984)*x[0] + (0.0978287741517)*x[1]**o + (-0.520039994624)*x[1]
+        ref[(3, 0, 0, 1)]=-0.432455159442*x_ref[0]**o + (0.662651916984)*x_ref[0] + (0.0978287741517)*x_ref[1]**o + (-0.520039994624)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.310893210931*x[0]**o + (0.697287035576)*x[0] + (0.466999704449)*x[1]**o + (0.828841678326)*x[1]
+        ref[(3, 0, 1, 0)]=0.310893210931*x_ref[0]**o + (0.697287035576)*x_ref[0] + (0.466999704449)*x_ref[1]**o + (0.828841678326)*x_ref[1]
+        arg[(3, 0, 1, 1)]=0.163798355541*x[0]**o + (-0.486989673117)*x[0] + (-0.50027914983)*x[1]**o + (0.467130206686)*x[1]
+        ref[(3, 0, 1, 1)]=0.163798355541*x_ref[0]**o + (-0.486989673117)*x_ref[0] + (-0.50027914983)*x_ref[1]**o + (0.467130206686)*x_ref[1]
+        arg[(3, 1, 0, 0)]=0.0890241593605*x[0]**o + (0.818278922595)*x[0] + (-0.575511155286)*x[1]**o + (-0.947830802775)*x[1]
+        ref[(3, 1, 0, 0)]=0.0890241593605*x_ref[0]**o + (0.818278922595)*x_ref[0] + (-0.575511155286)*x_ref[1]**o + (-0.947830802775)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.148519817106*x[0]**o + (0.80886078557)*x[0] + (0.38280354801)*x[1]**o + (-0.12216470662)*x[1]
+        ref[(3, 1, 0, 1)]=0.148519817106*x_ref[0]**o + (0.80886078557)*x_ref[0] + (0.38280354801)*x_ref[1]**o + (-0.12216470662)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.827136640028*x[0]**o + (0.0442811987397)*x[0] + (0.936542030634)*x[1]**o + (0.0449601340766)*x[1]
+        ref[(3, 1, 1, 0)]=0.827136640028*x_ref[0]**o + (0.0442811987397)*x_ref[0] + (0.936542030634)*x_ref[1]**o + (0.0449601340766)*x_ref[1]
+        arg[(3, 1, 1, 1)]=0.123400346*x[0]**o + (0.63421925213)*x[0] + (0.287098500435)*x[1]**o + (-0.754998013226)*x[1]
+        ref[(3, 1, 1, 1)]=0.123400346*x_ref[0]**o + (0.63421925213)*x_ref[0] + (0.287098500435)*x_ref[1]**o + (-0.754998013226)*x_ref[1]
+        arg[(3, 2, 0, 0)]=-0.276762772213*x[0]**o + (-0.424089948429)*x[0] + (0.479114355409)*x[1]**o + (0.979589057101)*x[1]
+        ref[(3, 2, 0, 0)]=-0.276762772213*x_ref[0]**o + (-0.424089948429)*x_ref[0] + (0.479114355409)*x_ref[1]**o + (0.979589057101)*x_ref[1]
+        arg[(3, 2, 0, 1)]=-0.149859650582*x[0]**o + (0.0251799108588)*x[0] + (-0.715013421569)*x[1]**o + (0.736725793669)*x[1]
+        ref[(3, 2, 0, 1)]=-0.149859650582*x_ref[0]**o + (0.0251799108588)*x_ref[0] + (-0.715013421569)*x_ref[1]**o + (0.736725793669)*x_ref[1]
+        arg[(3, 2, 1, 0)]=-0.445367446278*x[0]**o + (-0.957577403846)*x[0] + (0.917782361017)*x[1]**o + (-0.542483852061)*x[1]
+        ref[(3, 2, 1, 0)]=-0.445367446278*x_ref[0]**o + (-0.957577403846)*x_ref[0] + (0.917782361017)*x_ref[1]**o + (-0.542483852061)*x_ref[1]
+        arg[(3, 2, 1, 1)]=-0.24034630295*x[0]**o + (-0.25888168354)*x[0] + (-0.987414006368)*x[1]**o + (-0.836692527514)*x[1]
+        ref[(3, 2, 1, 1)]=-0.24034630295*x_ref[0]**o + (-0.25888168354)*x_ref[0] + (-0.987414006368)*x_ref[1]**o + (-0.836692527514)*x_ref[1]
+        arg[(3, 3, 0, 0)]=0.618104486455*x[0]**o + (0.451442365484)*x[0] + (0.931016615758)*x[1]**o + (0.227715625728)*x[1]
+        ref[(3, 3, 0, 0)]=0.618104486455*x_ref[0]**o + (0.451442365484)*x_ref[0] + (0.931016615758)*x_ref[1]**o + (0.227715625728)*x_ref[1]
+        arg[(3, 3, 0, 1)]=-0.435704672292*x[0]**o + (-0.650931744723)*x[0] + (-0.14766955874)*x[1]**o + (0.318215835753)*x[1]
+        ref[(3, 3, 0, 1)]=-0.435704672292*x_ref[0]**o + (-0.650931744723)*x_ref[0] + (-0.14766955874)*x_ref[1]**o + (0.318215835753)*x_ref[1]
+        arg[(3, 3, 1, 0)]=0.815208472702*x[0]**o + (-0.88765248209)*x[0] + (-0.208300550015)*x[1]**o + (-0.519774496476)*x[1]
+        ref[(3, 3, 1, 0)]=0.815208472702*x_ref[0]**o + (-0.88765248209)*x_ref[0] + (-0.208300550015)*x_ref[1]**o + (-0.519774496476)*x_ref[1]
+        arg[(3, 3, 1, 1)]=-0.392134883933*x[0]**o + (-0.548682800087)*x[0] + (0.938341192828)*x[1]**o + (-0.474128590591)*x[1]
+        ref[(3, 3, 1, 1)]=-0.392134883933*x_ref[0]**o + (-0.548682800087)*x_ref[0] + (0.938341192828)*x_ref[1]**o + (-0.474128590591)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.134545370997*x[2]**o + (0.827521536287)*x[2]
+            ref[(0, 0, 0, 0)]+=0.134545370997*x_ref[2]**o + (0.827521536287)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.658312999426*x[2]**o + (-0.608726164552)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.658312999426*x_ref[2]**o + (-0.608726164552)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.538123217409*x[2]**o + (-0.86833619882)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.538123217409*x_ref[2]**o + (-0.86833619882)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.0930361473618*x[2]**o + (0.907937327771)*x[2]
+            ref[(0, 0, 1, 1)]+=0.0930361473618*x_ref[2]**o + (0.907937327771)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.271762315155*x[2]**o + (-0.616118314428)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.271762315155*x_ref[2]**o + (-0.616118314428)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.984915201339*x[2]**o + (-0.0366232382795)*x[2]
+            ref[(0, 1, 0, 1)]+=0.984915201339*x_ref[2]**o + (-0.0366232382795)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.759695484413*x[2]**o + (-0.841121824512)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.759695484413*x_ref[2]**o + (-0.841121824512)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.872830696785*x[2]**o + (0.131426100439)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.872830696785*x_ref[2]**o + (0.131426100439)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.0238903942919*x[2]**o + (-0.348196824862)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.0238903942919*x_ref[2]**o + (-0.348196824862)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.772345235203*x[2]**o + (-0.681058879663)*x[2]
+            ref[(0, 2, 0, 1)]+=0.772345235203*x_ref[2]**o + (-0.681058879663)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.42138467499*x[2]**o + (-0.419610004562)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.42138467499*x_ref[2]**o + (-0.419610004562)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.441278932313*x[2]**o + (-0.776741517195)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.441278932313*x_ref[2]**o + (-0.776741517195)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.762816161906*x[2]**o + (-0.0193590811546)*x[2]
+            ref[(0, 3, 0, 0)]+=-0.762816161906*x_ref[2]**o + (-0.0193590811546)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=-0.661401729169*x[2]**o + (0.522338877661)*x[2]
+            ref[(0, 3, 0, 1)]+=-0.661401729169*x_ref[2]**o + (0.522338877661)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.578433889794*x[2]**o + (-0.227995851558)*x[2]
+            ref[(0, 3, 1, 0)]+=0.578433889794*x_ref[2]**o + (-0.227995851558)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.871332838109*x[2]**o + (0.928632285448)*x[2]
+            ref[(0, 3, 1, 1)]+=0.871332838109*x_ref[2]**o + (0.928632285448)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.776165996209*x[2]**o + (-0.563733705648)*x[2]
+            ref[(1, 0, 0, 0)]+=0.776165996209*x_ref[2]**o + (-0.563733705648)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.104488257589*x[2]**o + (0.180698766453)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.104488257589*x_ref[2]**o + (0.180698766453)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.863853623862*x[2]**o + (0.33379617906)*x[2]
+            ref[(1, 0, 1, 0)]+=0.863853623862*x_ref[2]**o + (0.33379617906)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.68273811263*x[2]**o + (0.742903864739)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.68273811263*x_ref[2]**o + (0.742903864739)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.879568075304*x[2]**o + (-0.807185146728)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.879568075304*x_ref[2]**o + (-0.807185146728)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.315550847489*x[2]**o + (-0.565336416371)*x[2]
+            ref[(1, 1, 0, 1)]+=0.315550847489*x_ref[2]**o + (-0.565336416371)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.445793660268*x[2]**o + (0.712887444841)*x[2]
+            ref[(1, 1, 1, 0)]+=0.445793660268*x_ref[2]**o + (0.712887444841)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.0260185667525*x[2]**o + (0.210678021083)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.0260185667525*x_ref[2]**o + (0.210678021083)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.69367558496*x[2]**o + (-0.519679353356)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.69367558496*x_ref[2]**o + (-0.519679353356)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.592186159266*x[2]**o + (0.0436076787289)*x[2]
+            ref[(1, 2, 0, 1)]+=0.592186159266*x_ref[2]**o + (0.0436076787289)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.871128397471*x[2]**o + (0.724644605992)*x[2]
+            ref[(1, 2, 1, 0)]+=0.871128397471*x_ref[2]**o + (0.724644605992)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.559672328586*x[2]**o + (0.492533349099)*x[2]
+            ref[(1, 2, 1, 1)]+=0.559672328586*x_ref[2]**o + (0.492533349099)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=-0.859685355059*x[2]**o + (-0.486405624893)*x[2]
+            ref[(1, 3, 0, 0)]+=-0.859685355059*x_ref[2]**o + (-0.486405624893)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=-0.661893834078*x[2]**o + (-0.480847550469)*x[2]
+            ref[(1, 3, 0, 1)]+=-0.661893834078*x_ref[2]**o + (-0.480847550469)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.117099717751*x[2]**o + (-0.198980081576)*x[2]
+            ref[(1, 3, 1, 0)]+=0.117099717751*x_ref[2]**o + (-0.198980081576)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.173773221625*x[2]**o + (0.87391317298)*x[2]
+            ref[(1, 3, 1, 1)]+=0.173773221625*x_ref[2]**o + (0.87391317298)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.856973549079*x[2]**o + (-0.348903569306)*x[2]
+            ref[(2, 0, 0, 0)]+=0.856973549079*x_ref[2]**o + (-0.348903569306)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.766167966685*x[2]**o + (-0.4840006358)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.766167966685*x_ref[2]**o + (-0.4840006358)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.680740162386*x[2]**o + (-0.308751291115)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.680740162386*x_ref[2]**o + (-0.308751291115)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.110043315534*x[2]**o + (-0.274987030183)*x[2]
+            ref[(2, 0, 1, 1)]+=0.110043315534*x_ref[2]**o + (-0.274987030183)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.171389730263*x[2]**o + (-0.226775953225)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.171389730263*x_ref[2]**o + (-0.226775953225)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.629898264103*x[2]**o + (0.0844381283158)*x[2]
+            ref[(2, 1, 0, 1)]+=0.629898264103*x_ref[2]**o + (0.0844381283158)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.684021054131*x[2]**o + (0.308660461312)*x[2]
+            ref[(2, 1, 1, 0)]+=-0.684021054131*x_ref[2]**o + (0.308660461312)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.485682605543*x[2]**o + (0.0344091823468)*x[2]
+            ref[(2, 1, 1, 1)]+=0.485682605543*x_ref[2]**o + (0.0344091823468)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.352795268141*x[2]**o + (0.0321869153363)*x[2]
+            ref[(2, 2, 0, 0)]+=0.352795268141*x_ref[2]**o + (0.0321869153363)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.346019953269*x[2]**o + (0.232910505988)*x[2]
+            ref[(2, 2, 0, 1)]+=0.346019953269*x_ref[2]**o + (0.232910505988)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.788967642771*x[2]**o + (-0.41992522747)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.788967642771*x_ref[2]**o + (-0.41992522747)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.0222830898285*x[2]**o + (-0.34583589812)*x[2]
+            ref[(2, 2, 1, 1)]+=0.0222830898285*x_ref[2]**o + (-0.34583589812)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.918585679306*x[2]**o + (-0.547017843825)*x[2]
+            ref[(2, 3, 0, 0)]+=-0.918585679306*x_ref[2]**o + (-0.547017843825)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.931532584784*x[2]**o + (0.0495206295199)*x[2]
+            ref[(2, 3, 0, 1)]+=0.931532584784*x_ref[2]**o + (0.0495206295199)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.123539258791*x[2]**o + (0.820828393538)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.123539258791*x_ref[2]**o + (0.820828393538)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.189152317843*x[2]**o + (-0.204644122362)*x[2]
+            ref[(2, 3, 1, 1)]+=0.189152317843*x_ref[2]**o + (-0.204644122362)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=-0.282547186458*x[2]**o + (0.43938025506)*x[2]
+            ref[(3, 0, 0, 0)]+=-0.282547186458*x_ref[2]**o + (0.43938025506)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.0249606326832*x[2]**o + (-0.280257773896)*x[2]
+            ref[(3, 0, 0, 1)]+=-0.0249606326832*x_ref[2]**o + (-0.280257773896)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.804221467909*x[2]**o + (0.439096377248)*x[2]
+            ref[(3, 0, 1, 0)]+=0.804221467909*x_ref[2]**o + (0.439096377248)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.0567879464664*x[2]**o + (-0.0532388933011)*x[2]
+            ref[(3, 0, 1, 1)]+=0.0567879464664*x_ref[2]**o + (-0.0532388933011)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=-0.403527263787*x[2]**o + (-0.98823446862)*x[2]
+            ref[(3, 1, 0, 0)]+=-0.403527263787*x_ref[2]**o + (-0.98823446862)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.00988471059381*x[2]**o + (-0.447843848931)*x[2]
+            ref[(3, 1, 0, 1)]+=0.00988471059381*x_ref[2]**o + (-0.447843848931)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=-0.172487717513*x[2]**o + (0.448275391931)*x[2]
+            ref[(3, 1, 1, 0)]+=-0.172487717513*x_ref[2]**o + (0.448275391931)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=0.050499203894*x[2]**o + (0.171443681576)*x[2]
+            ref[(3, 1, 1, 1)]+=0.050499203894*x_ref[2]**o + (0.171443681576)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=-0.833049357158*x[2]**o + (-0.32430534477)*x[2]
+            ref[(3, 2, 0, 0)]+=-0.833049357158*x_ref[2]**o + (-0.32430534477)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=-0.0284226241642*x[2]**o + (0.285573708531)*x[2]
+            ref[(3, 2, 0, 1)]+=-0.0284226241642*x_ref[2]**o + (0.285573708531)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=0.495904750757*x[2]**o + (-0.755850738205)*x[2]
+            ref[(3, 2, 1, 0)]+=0.495904750757*x_ref[2]**o + (-0.755850738205)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=0.296078091704*x[2]**o + (-0.799707514798)*x[2]
+            ref[(3, 2, 1, 1)]+=0.296078091704*x_ref[2]**o + (-0.799707514798)*x_ref[2]
+            arg[(3, 3, 0, 0)]+=0.521039024319*x[2]**o + (-0.577000341082)*x[2]
+            ref[(3, 3, 0, 0)]+=0.521039024319*x_ref[2]**o + (-0.577000341082)*x_ref[2]
+            arg[(3, 3, 0, 1)]+=-0.839919764279*x[2]**o + (-0.578245409119)*x[2]
+            ref[(3, 3, 0, 1)]+=-0.839919764279*x_ref[2]**o + (-0.578245409119)*x_ref[2]
+            arg[(3, 3, 1, 0)]+=-0.361165895308*x[2]**o + (-0.139348859255)*x[2]
+            ref[(3, 3, 1, 0)]+=-0.361165895308*x_ref[2]**o + (-0.139348859255)*x_ref[2]
+            arg[(3, 3, 1, 1)]+=0.140914722906*x[2]**o + (0.507160700748)*x[2]
+            ref[(3, 3, 1, 1)]+=0.140914722906*x_ref[2]**o + (0.507160700748)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.39254586703*x[0]**o + (-0.558617410644)*x[0] + (-0.874648167001)*x[1]**o + (0.283644611958)*x[1]
+        ref=-0.39254586703*x_ref[0]**o + (-0.558617410644)*x_ref[0] + (-0.874648167001)*x_ref[1]**o + (0.283644611958)*x_ref[1]
+        if dim==3:
+            arg+=(0.5365713747)*x[2]**o + (-0.0012624950012)*x[2]
+            ref+=(0.5365713747)*x_ref[2]**o + (-0.0012624950012)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.730608467801*x[0]**o + (-0.0210497190214)*x[0] + (0.319172463206)*x[1]**o + (-0.965177459598)*x[1]
+        ref[(0,)]=0.730608467801*x_ref[0]**o + (-0.0210497190214)*x_ref[0] + (0.319172463206)*x_ref[1]**o + (-0.965177459598)*x_ref[1]
+        arg[(1,)]=-0.803614686509*x[0]**o + (0.279193170649)*x[0] + (-0.813827066801)*x[1]**o + (0.30229478691)*x[1]
+        ref[(1,)]=-0.803614686509*x_ref[0]**o + (0.279193170649)*x_ref[0] + (-0.813827066801)*x_ref[1]**o + (0.30229478691)*x_ref[1]
+        arg[(2,)]=0.729433384656*x[0]**o + (0.862181552378)*x[0] + (-0.213369124432)*x[1]**o + (-0.26391208472)*x[1]
+        ref[(2,)]=0.729433384656*x_ref[0]**o + (0.862181552378)*x_ref[0] + (-0.213369124432)*x_ref[1]**o + (-0.26391208472)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.70570679873*x[2]**o + (-0.772500589762)*x[2]
+            ref[(0,)]+=0.70570679873*x_ref[2]**o + (-0.772500589762)*x_ref[2]
+            arg[(1,)]+=0.211248569895*x[2]**o + (-0.291323888923)*x[2]
+            ref[(1,)]+=0.211248569895*x_ref[2]**o + (-0.291323888923)*x_ref[2]
+            arg[(2,)]+=0.23317229381*x[2]**o + (-0.557562289724)*x[2]
+            ref[(2,)]+=0.23317229381*x_ref[2]**o + (-0.557562289724)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=-0.14226608834*x[0]**o + (0.49956977824)*x[0] + (0.58434420004)*x[1]**o + (-0.28964000027)*x[1]
+        ref[(0, 0)]=-0.14226608834*x_ref[0]**o + (0.49956977824)*x_ref[0] + (0.58434420004)*x_ref[1]**o + (-0.28964000027)*x_ref[1]
+        arg[(0, 1)]=0.841888088542*x[0]**o + (0.756194922991)*x[0] + (-0.171393498335)*x[1]**o + (-0.135564511363)*x[1]
+        ref[(0, 1)]=0.841888088542*x_ref[0]**o + (0.756194922991)*x_ref[0] + (-0.171393498335)*x_ref[1]**o + (-0.135564511363)*x_ref[1]
+        arg[(1, 0)]=0.205655396732*x[0]**o + (0.158104237538)*x[0] + (0.054827328324)*x[1]**o + (-0.350086373326)*x[1]
+        ref[(1, 0)]=0.205655396732*x_ref[0]**o + (0.158104237538)*x_ref[0] + (0.054827328324)*x_ref[1]**o + (-0.350086373326)*x_ref[1]
+        arg[(1, 1)]=-0.170880207196*x[0]**o + (0.180381017041)*x[0] + (0.792120986278)*x[1]**o + (-0.875235070623)*x[1]
+        ref[(1, 1)]=-0.170880207196*x_ref[0]**o + (0.180381017041)*x_ref[0] + (0.792120986278)*x_ref[1]**o + (-0.875235070623)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.387143692343*x[2]**o + (-0.410686406906)*x[2]
+            ref[(0, 0)]+=-0.387143692343*x_ref[2]**o + (-0.410686406906)*x_ref[2]
+            arg[(0, 1)]+=-0.48505571291*x[2]**o + (0.941180750707)*x[2]
+            ref[(0, 1)]+=-0.48505571291*x_ref[2]**o + (0.941180750707)*x_ref[2]
+            arg[(1, 0)]+=-0.511732923528*x[2]**o + (0.150415166954)*x[2]
+            ref[(1, 0)]+=-0.511732923528*x_ref[2]**o + (0.150415166954)*x_ref[2]
+            arg[(1, 1)]+=0.990764971161*x[2]**o + (-0.718917973908)*x[2]
+            ref[(1, 1)]+=0.990764971161*x_ref[2]**o + (-0.718917973908)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3),w)
+        ref = Data(0,(4, 4, 3),w_ref)
+        arg[(0, 0, 0)]=-0.465057886297*x[0]**o + (-0.854963453142)*x[0] + (0.601510413583)*x[1]**o + (0.261059969359)*x[1]
+        ref[(0, 0, 0)]=-0.465057886297*x_ref[0]**o + (-0.854963453142)*x_ref[0] + (0.601510413583)*x_ref[1]**o + (0.261059969359)*x_ref[1]
+        arg[(0, 0, 1)]=0.776842440825*x[0]**o + (-0.985106480695)*x[0] + (-0.192732449836)*x[1]**o + (0.423488575599)*x[1]
+        ref[(0, 0, 1)]=0.776842440825*x_ref[0]**o + (-0.985106480695)*x_ref[0] + (-0.192732449836)*x_ref[1]**o + (0.423488575599)*x_ref[1]
+        arg[(0, 0, 2)]=0.465931377805*x[0]**o + (0.704854975303)*x[0] + (-0.35989615108)*x[1]**o + (0.420156444919)*x[1]
+        ref[(0, 0, 2)]=0.465931377805*x_ref[0]**o + (0.704854975303)*x_ref[0] + (-0.35989615108)*x_ref[1]**o + (0.420156444919)*x_ref[1]
+        arg[(0, 1, 0)]=-0.112628947341*x[0]**o + (0.654530066201)*x[0] + (-0.793528601068)*x[1]**o + (-0.158366603993)*x[1]
+        ref[(0, 1, 0)]=-0.112628947341*x_ref[0]**o + (0.654530066201)*x_ref[0] + (-0.793528601068)*x_ref[1]**o + (-0.158366603993)*x_ref[1]
+        arg[(0, 1, 1)]=-0.690279708063*x[0]**o + (0.214783801187)*x[0] + (-0.0823302573849)*x[1]**o + (0.999168293133)*x[1]
+        ref[(0, 1, 1)]=-0.690279708063*x_ref[0]**o + (0.214783801187)*x_ref[0] + (-0.0823302573849)*x_ref[1]**o + (0.999168293133)*x_ref[1]
+        arg[(0, 1, 2)]=0.207209350156*x[0]**o + (-0.726495993705)*x[0] + (-0.560835953676)*x[1]**o + (0.930166140941)*x[1]
+        ref[(0, 1, 2)]=0.207209350156*x_ref[0]**o + (-0.726495993705)*x_ref[0] + (-0.560835953676)*x_ref[1]**o + (0.930166140941)*x_ref[1]
+        arg[(0, 2, 0)]=0.397970382928*x[0]**o + (-0.722273356945)*x[0] + (-0.0204780473484)*x[1]**o + (0.913164882305)*x[1]
+        ref[(0, 2, 0)]=0.397970382928*x_ref[0]**o + (-0.722273356945)*x_ref[0] + (-0.0204780473484)*x_ref[1]**o + (0.913164882305)*x_ref[1]
+        arg[(0, 2, 1)]=0.209586679507*x[0]**o + (0.22701940067)*x[0] + (0.680021850205)*x[1]**o + (-0.168364830629)*x[1]
+        ref[(0, 2, 1)]=0.209586679507*x_ref[0]**o + (0.22701940067)*x_ref[0] + (0.680021850205)*x_ref[1]**o + (-0.168364830629)*x_ref[1]
+        arg[(0, 2, 2)]=-0.00644078093473*x[0]**o + (0.26480199687)*x[0] + (-0.485108540529)*x[1]**o + (0.21641333903)*x[1]
+        ref[(0, 2, 2)]=-0.00644078093473*x_ref[0]**o + (0.26480199687)*x_ref[0] + (-0.485108540529)*x_ref[1]**o + (0.21641333903)*x_ref[1]
+        arg[(0, 3, 0)]=-0.979302980065*x[0]**o + (0.473419359584)*x[0] + (0.0526411243753)*x[1]**o + (0.700223186247)*x[1]
+        ref[(0, 3, 0)]=-0.979302980065*x_ref[0]**o + (0.473419359584)*x_ref[0] + (0.0526411243753)*x_ref[1]**o + (0.700223186247)*x_ref[1]
+        arg[(0, 3, 1)]=-0.999958408972*x[0]**o + (0.900041391387)*x[0] + (-0.414255984753)*x[1]**o + (-0.130615993584)*x[1]
+        ref[(0, 3, 1)]=-0.999958408972*x_ref[0]**o + (0.900041391387)*x_ref[0] + (-0.414255984753)*x_ref[1]**o + (-0.130615993584)*x_ref[1]
+        arg[(0, 3, 2)]=0.613914296561*x[0]**o + (0.740131079311)*x[0] + (0.80434130712)*x[1]**o + (0.951690614649)*x[1]
+        ref[(0, 3, 2)]=0.613914296561*x_ref[0]**o + (0.740131079311)*x_ref[0] + (0.80434130712)*x_ref[1]**o + (0.951690614649)*x_ref[1]
+        arg[(1, 0, 0)]=-0.942371033984*x[0]**o + (-0.42071747492)*x[0] + (-0.414702815212)*x[1]**o + (0.326345470015)*x[1]
+        ref[(1, 0, 0)]=-0.942371033984*x_ref[0]**o + (-0.42071747492)*x_ref[0] + (-0.414702815212)*x_ref[1]**o + (0.326345470015)*x_ref[1]
+        arg[(1, 0, 1)]=-0.289674496446*x[0]**o + (0.00285634553399)*x[0] + (0.982510528182)*x[1]**o + (-0.901011075707)*x[1]
+        ref[(1, 0, 1)]=-0.289674496446*x_ref[0]**o + (0.00285634553399)*x_ref[0] + (0.982510528182)*x_ref[1]**o + (-0.901011075707)*x_ref[1]
+        arg[(1, 0, 2)]=0.30575840561*x[0]**o + (-0.44299449452)*x[0] + (-0.940738624995)*x[1]**o + (0.327967468932)*x[1]
+        ref[(1, 0, 2)]=0.30575840561*x_ref[0]**o + (-0.44299449452)*x_ref[0] + (-0.940738624995)*x_ref[1]**o + (0.327967468932)*x_ref[1]
+        arg[(1, 1, 0)]=0.700702002509*x[0]**o + (0.994008183269)*x[0] + (-0.909123265327)*x[1]**o + (-0.852788262521)*x[1]
+        ref[(1, 1, 0)]=0.700702002509*x_ref[0]**o + (0.994008183269)*x_ref[0] + (-0.909123265327)*x_ref[1]**o + (-0.852788262521)*x_ref[1]
+        arg[(1, 1, 1)]=0.761526560741*x[0]**o + (-0.26278418347)*x[0] + (0.637848175434)*x[1]**o + (-0.731516214617)*x[1]
+        ref[(1, 1, 1)]=0.761526560741*x_ref[0]**o + (-0.26278418347)*x_ref[0] + (0.637848175434)*x_ref[1]**o + (-0.731516214617)*x_ref[1]
+        arg[(1, 1, 2)]=-0.207971330471*x[0]**o + (-0.104337570684)*x[0] + (-0.923627447677)*x[1]**o + (-0.627332938933)*x[1]
+        ref[(1, 1, 2)]=-0.207971330471*x_ref[0]**o + (-0.104337570684)*x_ref[0] + (-0.923627447677)*x_ref[1]**o + (-0.627332938933)*x_ref[1]
+        arg[(1, 2, 0)]=0.447053988653*x[0]**o + (-0.362993282631)*x[0] + (-0.695388043595)*x[1]**o + (0.178407980885)*x[1]
+        ref[(1, 2, 0)]=0.447053988653*x_ref[0]**o + (-0.362993282631)*x_ref[0] + (-0.695388043595)*x_ref[1]**o + (0.178407980885)*x_ref[1]
+        arg[(1, 2, 1)]=0.0533320952621*x[0]**o + (0.756011232417)*x[0] + (0.69404556896)*x[1]**o + (0.559554196393)*x[1]
+        ref[(1, 2, 1)]=0.0533320952621*x_ref[0]**o + (0.756011232417)*x_ref[0] + (0.69404556896)*x_ref[1]**o + (0.559554196393)*x_ref[1]
+        arg[(1, 2, 2)]=-0.674359889416*x[0]**o + (0.476256330096)*x[0] + (-0.419701510163)*x[1]**o + (0.940121626346)*x[1]
+        ref[(1, 2, 2)]=-0.674359889416*x_ref[0]**o + (0.476256330096)*x_ref[0] + (-0.419701510163)*x_ref[1]**o + (0.940121626346)*x_ref[1]
+        arg[(1, 3, 0)]=-0.992154680918*x[0]**o + (-0.56000823256)*x[0] + (-0.250310488101)*x[1]**o + (0.113495391943)*x[1]
+        ref[(1, 3, 0)]=-0.992154680918*x_ref[0]**o + (-0.56000823256)*x_ref[0] + (-0.250310488101)*x_ref[1]**o + (0.113495391943)*x_ref[1]
+        arg[(1, 3, 1)]=0.330970723301*x[0]**o + (0.323056792548)*x[0] + (-0.707739405685)*x[1]**o + (0.105072624953)*x[1]
+        ref[(1, 3, 1)]=0.330970723301*x_ref[0]**o + (0.323056792548)*x_ref[0] + (-0.707739405685)*x_ref[1]**o + (0.105072624953)*x_ref[1]
+        arg[(1, 3, 2)]=-0.281536066147*x[0]**o + (0.436405600288)*x[0] + (-0.636218728907)*x[1]**o + (0.653080753687)*x[1]
+        ref[(1, 3, 2)]=-0.281536066147*x_ref[0]**o + (0.436405600288)*x_ref[0] + (-0.636218728907)*x_ref[1]**o + (0.653080753687)*x_ref[1]
+        arg[(2, 0, 0)]=-0.388137726525*x[0]**o + (-0.1587901702)*x[0] + (-0.373326598619)*x[1]**o + (-0.100965934694)*x[1]
+        ref[(2, 0, 0)]=-0.388137726525*x_ref[0]**o + (-0.1587901702)*x_ref[0] + (-0.373326598619)*x_ref[1]**o + (-0.100965934694)*x_ref[1]
+        arg[(2, 0, 1)]=0.503729813725*x[0]**o + (-0.329115526168)*x[0] + (0.265585315506)*x[1]**o + (-0.464103071069)*x[1]
+        ref[(2, 0, 1)]=0.503729813725*x_ref[0]**o + (-0.329115526168)*x_ref[0] + (0.265585315506)*x_ref[1]**o + (-0.464103071069)*x_ref[1]
+        arg[(2, 0, 2)]=-0.607900511062*x[0]**o + (-0.672617463993)*x[0] + (-0.0450573875041)*x[1]**o + (-0.40528388384)*x[1]
+        ref[(2, 0, 2)]=-0.607900511062*x_ref[0]**o + (-0.672617463993)*x_ref[0] + (-0.0450573875041)*x_ref[1]**o + (-0.40528388384)*x_ref[1]
+        arg[(2, 1, 0)]=0.738666513598*x[0]**o + (0.766720063019)*x[0] + (-0.0532957160535)*x[1]**o + (0.203804213088)*x[1]
+        ref[(2, 1, 0)]=0.738666513598*x_ref[0]**o + (0.766720063019)*x_ref[0] + (-0.0532957160535)*x_ref[1]**o + (0.203804213088)*x_ref[1]
+        arg[(2, 1, 1)]=0.671832549331*x[0]**o + (-0.217000337883)*x[0] + (0.377230192264)*x[1]**o + (0.846394823132)*x[1]
+        ref[(2, 1, 1)]=0.671832549331*x_ref[0]**o + (-0.217000337883)*x_ref[0] + (0.377230192264)*x_ref[1]**o + (0.846394823132)*x_ref[1]
+        arg[(2, 1, 2)]=0.432947784233*x[0]**o + (0.907108308662)*x[0] + (0.356984983901)*x[1]**o + (0.73765027833)*x[1]
+        ref[(2, 1, 2)]=0.432947784233*x_ref[0]**o + (0.907108308662)*x_ref[0] + (0.356984983901)*x_ref[1]**o + (0.73765027833)*x_ref[1]
+        arg[(2, 2, 0)]=-0.0829261841093*x[0]**o + (-0.0133778334135)*x[0] + (0.108066861251)*x[1]**o + (0.5357416863)*x[1]
+        ref[(2, 2, 0)]=-0.0829261841093*x_ref[0]**o + (-0.0133778334135)*x_ref[0] + (0.108066861251)*x_ref[1]**o + (0.5357416863)*x_ref[1]
+        arg[(2, 2, 1)]=0.988287394434*x[0]**o + (0.997160832254)*x[0] + (0.534399653282)*x[1]**o + (-0.900179194747)*x[1]
+        ref[(2, 2, 1)]=0.988287394434*x_ref[0]**o + (0.997160832254)*x_ref[0] + (0.534399653282)*x_ref[1]**o + (-0.900179194747)*x_ref[1]
+        arg[(2, 2, 2)]=0.270894489418*x[0]**o + (-0.934181425219)*x[0] + (0.511199977887)*x[1]**o + (-0.465411341382)*x[1]
+        ref[(2, 2, 2)]=0.270894489418*x_ref[0]**o + (-0.934181425219)*x_ref[0] + (0.511199977887)*x_ref[1]**o + (-0.465411341382)*x_ref[1]
+        arg[(2, 3, 0)]=-0.40323630734*x[0]**o + (0.485291080754)*x[0] + (-0.857081762197)*x[1]**o + (0.781433817269)*x[1]
+        ref[(2, 3, 0)]=-0.40323630734*x_ref[0]**o + (0.485291080754)*x_ref[0] + (-0.857081762197)*x_ref[1]**o + (0.781433817269)*x_ref[1]
+        arg[(2, 3, 1)]=0.221577588662*x[0]**o + (-0.719334891178)*x[0] + (0.455534008404)*x[1]**o + (0.047034647381)*x[1]
+        ref[(2, 3, 1)]=0.221577588662*x_ref[0]**o + (-0.719334891178)*x_ref[0] + (0.455534008404)*x_ref[1]**o + (0.047034647381)*x_ref[1]
+        arg[(2, 3, 2)]=0.425400501249*x[0]**o + (0.00491692773493)*x[0] + (0.721034378527)*x[1]**o + (-0.0373666195985)*x[1]
+        ref[(2, 3, 2)]=0.425400501249*x_ref[0]**o + (0.00491692773493)*x_ref[0] + (0.721034378527)*x_ref[1]**o + (-0.0373666195985)*x_ref[1]
+        arg[(3, 0, 0)]=-0.526808500209*x[0]**o + (-0.15793392652)*x[0] + (0.213520630941)*x[1]**o + (-0.695534670862)*x[1]
+        ref[(3, 0, 0)]=-0.526808500209*x_ref[0]**o + (-0.15793392652)*x_ref[0] + (0.213520630941)*x_ref[1]**o + (-0.695534670862)*x_ref[1]
+        arg[(3, 0, 1)]=-0.425529116542*x[0]**o + (0.0730751146349)*x[0] + (0.323171888716)*x[1]**o + (0.606267464363)*x[1]
+        ref[(3, 0, 1)]=-0.425529116542*x_ref[0]**o + (0.0730751146349)*x_ref[0] + (0.323171888716)*x_ref[1]**o + (0.606267464363)*x_ref[1]
+        arg[(3, 0, 2)]=0.455392267247*x[0]**o + (-0.729782109191)*x[0] + (-0.56896464717)*x[1]**o + (-0.801689391813)*x[1]
+        ref[(3, 0, 2)]=0.455392267247*x_ref[0]**o + (-0.729782109191)*x_ref[0] + (-0.56896464717)*x_ref[1]**o + (-0.801689391813)*x_ref[1]
+        arg[(3, 1, 0)]=0.3468613403*x[0]**o + (-0.550489374689)*x[0] + (-0.982376815246)*x[1]**o + (-0.491377092572)*x[1]
+        ref[(3, 1, 0)]=0.3468613403*x_ref[0]**o + (-0.550489374689)*x_ref[0] + (-0.982376815246)*x_ref[1]**o + (-0.491377092572)*x_ref[1]
+        arg[(3, 1, 1)]=-0.858407936403*x[0]**o + (0.285264300133)*x[0] + (0.696811923563)*x[1]**o + (0.300948507321)*x[1]
+        ref[(3, 1, 1)]=-0.858407936403*x_ref[0]**o + (0.285264300133)*x_ref[0] + (0.696811923563)*x_ref[1]**o + (0.300948507321)*x_ref[1]
+        arg[(3, 1, 2)]=-0.520934670758*x[0]**o + (0.936275391732)*x[0] + (-0.515489951285)*x[1]**o + (-0.783175965835)*x[1]
+        ref[(3, 1, 2)]=-0.520934670758*x_ref[0]**o + (0.936275391732)*x_ref[0] + (-0.515489951285)*x_ref[1]**o + (-0.783175965835)*x_ref[1]
+        arg[(3, 2, 0)]=0.0649647508703*x[0]**o + (0.895086424204)*x[0] + (-0.493511989259)*x[1]**o + (0.361612240015)*x[1]
+        ref[(3, 2, 0)]=0.0649647508703*x_ref[0]**o + (0.895086424204)*x_ref[0] + (-0.493511989259)*x_ref[1]**o + (0.361612240015)*x_ref[1]
+        arg[(3, 2, 1)]=-0.680739033877*x[0]**o + (-0.486015705082)*x[0] + (-0.271164002903)*x[1]**o + (0.633200291787)*x[1]
+        ref[(3, 2, 1)]=-0.680739033877*x_ref[0]**o + (-0.486015705082)*x_ref[0] + (-0.271164002903)*x_ref[1]**o + (0.633200291787)*x_ref[1]
+        arg[(3, 2, 2)]=-0.279842616867*x[0]**o + (0.779798104178)*x[0] + (-0.651818819326)*x[1]**o + (0.689921052336)*x[1]
+        ref[(3, 2, 2)]=-0.279842616867*x_ref[0]**o + (0.779798104178)*x_ref[0] + (-0.651818819326)*x_ref[1]**o + (0.689921052336)*x_ref[1]
+        arg[(3, 3, 0)]=-0.172132571425*x[0]**o + (0.954073805433)*x[0] + (0.818204054623)*x[1]**o + (-0.926666156285)*x[1]
+        ref[(3, 3, 0)]=-0.172132571425*x_ref[0]**o + (0.954073805433)*x_ref[0] + (0.818204054623)*x_ref[1]**o + (-0.926666156285)*x_ref[1]
+        arg[(3, 3, 1)]=-0.284945625208*x[0]**o + (-0.0517659585293)*x[0] + (-0.224428510617)*x[1]**o + (0.0740493202001)*x[1]
+        ref[(3, 3, 1)]=-0.284945625208*x_ref[0]**o + (-0.0517659585293)*x_ref[0] + (-0.224428510617)*x_ref[1]**o + (0.0740493202001)*x_ref[1]
+        arg[(3, 3, 2)]=0.573161795284*x[0]**o + (0.156155174608)*x[0] + (0.878706571284)*x[1]**o + (-0.406964677434)*x[1]
+        ref[(3, 3, 2)]=0.573161795284*x_ref[0]**o + (0.156155174608)*x_ref[0] + (0.878706571284)*x_ref[1]**o + (-0.406964677434)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.449205400906*x[2]**o + (0.0989205532617)*x[2]
+            ref[(0, 0, 0)]+=0.449205400906*x_ref[2]**o + (0.0989205532617)*x_ref[2]
+            arg[(0, 0, 1)]+=0.958371620221*x[2]**o + (0.617914618758)*x[2]
+            ref[(0, 0, 1)]+=0.958371620221*x_ref[2]**o + (0.617914618758)*x_ref[2]
+            arg[(0, 0, 2)]+=0.959124242155*x[2]**o + (-0.979246883791)*x[2]
+            ref[(0, 0, 2)]+=0.959124242155*x_ref[2]**o + (-0.979246883791)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.399072224273*x[2]**o + (0.179382354045)*x[2]
+            ref[(0, 1, 0)]+=-0.399072224273*x_ref[2]**o + (0.179382354045)*x_ref[2]
+            arg[(0, 1, 1)]+=0.384773162485*x[2]**o + (-0.57128813889)*x[2]
+            ref[(0, 1, 1)]+=0.384773162485*x_ref[2]**o + (-0.57128813889)*x_ref[2]
+            arg[(0, 1, 2)]+=0.126544482311*x[2]**o + (0.580813276768)*x[2]
+            ref[(0, 1, 2)]+=0.126544482311*x_ref[2]**o + (0.580813276768)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.274383025242*x[2]**o + (-0.529828217433)*x[2]
+            ref[(0, 2, 0)]+=-0.274383025242*x_ref[2]**o + (-0.529828217433)*x_ref[2]
+            arg[(0, 2, 1)]+=0.479370315637*x[2]**o + (-0.962207939407)*x[2]
+            ref[(0, 2, 1)]+=0.479370315637*x_ref[2]**o + (-0.962207939407)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.454148442335*x[2]**o + (0.506232779197)*x[2]
+            ref[(0, 2, 2)]+=-0.454148442335*x_ref[2]**o + (0.506232779197)*x_ref[2]
+            arg[(0, 3, 0)]+=-0.304380757615*x[2]**o + (0.839779617915)*x[2]
+            ref[(0, 3, 0)]+=-0.304380757615*x_ref[2]**o + (0.839779617915)*x_ref[2]
+            arg[(0, 3, 1)]+=-0.318390986733*x[2]**o + (0.679920947)*x[2]
+            ref[(0, 3, 1)]+=-0.318390986733*x_ref[2]**o + (0.679920947)*x_ref[2]
+            arg[(0, 3, 2)]+=-0.804953079586*x[2]**o + (0.187158661265)*x[2]
+            ref[(0, 3, 2)]+=-0.804953079586*x_ref[2]**o + (0.187158661265)*x_ref[2]
+            arg[(1, 0, 0)]+=0.895471677041*x[2]**o + (0.140925545243)*x[2]
+            ref[(1, 0, 0)]+=0.895471677041*x_ref[2]**o + (0.140925545243)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.0212959713587*x[2]**o + (0.160563384761)*x[2]
+            ref[(1, 0, 1)]+=-0.0212959713587*x_ref[2]**o + (0.160563384761)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.0996735700512*x[2]**o + (-0.887050751289)*x[2]
+            ref[(1, 0, 2)]+=-0.0996735700512*x_ref[2]**o + (-0.887050751289)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.268471289287*x[2]**o + (0.216336333953)*x[2]
+            ref[(1, 1, 0)]+=-0.268471289287*x_ref[2]**o + (0.216336333953)*x_ref[2]
+            arg[(1, 1, 1)]+=0.900840050702*x[2]**o + (-0.327570253727)*x[2]
+            ref[(1, 1, 1)]+=0.900840050702*x_ref[2]**o + (-0.327570253727)*x_ref[2]
+            arg[(1, 1, 2)]+=0.236311411728*x[2]**o + (-0.974188150713)*x[2]
+            ref[(1, 1, 2)]+=0.236311411728*x_ref[2]**o + (-0.974188150713)*x_ref[2]
+            arg[(1, 2, 0)]+=0.322755002324*x[2]**o + (0.31914951726)*x[2]
+            ref[(1, 2, 0)]+=0.322755002324*x_ref[2]**o + (0.31914951726)*x_ref[2]
+            arg[(1, 2, 1)]+=0.923880057865*x[2]**o + (-0.0113001971194)*x[2]
+            ref[(1, 2, 1)]+=0.923880057865*x_ref[2]**o + (-0.0113001971194)*x_ref[2]
+            arg[(1, 2, 2)]+=0.215927429006*x[2]**o + (0.568096668879)*x[2]
+            ref[(1, 2, 2)]+=0.215927429006*x_ref[2]**o + (0.568096668879)*x_ref[2]
+            arg[(1, 3, 0)]+=0.491525970034*x[2]**o + (-0.787040779064)*x[2]
+            ref[(1, 3, 0)]+=0.491525970034*x_ref[2]**o + (-0.787040779064)*x_ref[2]
+            arg[(1, 3, 1)]+=0.26896023163*x[2]**o + (-0.882674344518)*x[2]
+            ref[(1, 3, 1)]+=0.26896023163*x_ref[2]**o + (-0.882674344518)*x_ref[2]
+            arg[(1, 3, 2)]+=-0.303951235488*x[2]**o + (-0.472969807767)*x[2]
+            ref[(1, 3, 2)]+=-0.303951235488*x_ref[2]**o + (-0.472969807767)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.936381863102*x[2]**o + (0.937116126629)*x[2]
+            ref[(2, 0, 0)]+=-0.936381863102*x_ref[2]**o + (0.937116126629)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.73330314496*x[2]**o + (0.341792807653)*x[2]
+            ref[(2, 0, 1)]+=-0.73330314496*x_ref[2]**o + (0.341792807653)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.888878989374*x[2]**o + (-0.246570692241)*x[2]
+            ref[(2, 0, 2)]+=-0.888878989374*x_ref[2]**o + (-0.246570692241)*x_ref[2]
+            arg[(2, 1, 0)]+=0.505181022267*x[2]**o + (0.963838404993)*x[2]
+            ref[(2, 1, 0)]+=0.505181022267*x_ref[2]**o + (0.963838404993)*x_ref[2]
+            arg[(2, 1, 1)]+=-0.964646372114*x[2]**o + (-0.878446832697)*x[2]
+            ref[(2, 1, 1)]+=-0.964646372114*x_ref[2]**o + (-0.878446832697)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.0969395027553*x[2]**o + (-0.530734061363)*x[2]
+            ref[(2, 1, 2)]+=-0.0969395027553*x_ref[2]**o + (-0.530734061363)*x_ref[2]
+            arg[(2, 2, 0)]+=0.848567133392*x[2]**o + (0.955049634662)*x[2]
+            ref[(2, 2, 0)]+=0.848567133392*x_ref[2]**o + (0.955049634662)*x_ref[2]
+            arg[(2, 2, 1)]+=0.258304209345*x[2]**o + (-0.196801440331)*x[2]
+            ref[(2, 2, 1)]+=0.258304209345*x_ref[2]**o + (-0.196801440331)*x_ref[2]
+            arg[(2, 2, 2)]+=-0.60075219686*x[2]**o + (0.372199718831)*x[2]
+            ref[(2, 2, 2)]+=-0.60075219686*x_ref[2]**o + (0.372199718831)*x_ref[2]
+            arg[(2, 3, 0)]+=0.285724236151*x[2]**o + (-0.423864510102)*x[2]
+            ref[(2, 3, 0)]+=0.285724236151*x_ref[2]**o + (-0.423864510102)*x_ref[2]
+            arg[(2, 3, 1)]+=0.558317680191*x[2]**o + (0.737296789416)*x[2]
+            ref[(2, 3, 1)]+=0.558317680191*x_ref[2]**o + (0.737296789416)*x_ref[2]
+            arg[(2, 3, 2)]+=-0.687403515245*x[2]**o + (-0.0964188034174)*x[2]
+            ref[(2, 3, 2)]+=-0.687403515245*x_ref[2]**o + (-0.0964188034174)*x_ref[2]
+            arg[(3, 0, 0)]+=-0.178123750027*x[2]**o + (-0.638564567431)*x[2]
+            ref[(3, 0, 0)]+=-0.178123750027*x_ref[2]**o + (-0.638564567431)*x_ref[2]
+            arg[(3, 0, 1)]+=0.0371544204218*x[2]**o + (0.771936810222)*x[2]
+            ref[(3, 0, 1)]+=0.0371544204218*x_ref[2]**o + (0.771936810222)*x_ref[2]
+            arg[(3, 0, 2)]+=-0.115795798936*x[2]**o + (-0.90562114012)*x[2]
+            ref[(3, 0, 2)]+=-0.115795798936*x_ref[2]**o + (-0.90562114012)*x_ref[2]
+            arg[(3, 1, 0)]+=0.754377336754*x[2]**o + (-0.283944880292)*x[2]
+            ref[(3, 1, 0)]+=0.754377336754*x_ref[2]**o + (-0.283944880292)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.80371179142*x[2]**o + (-0.503005810685)*x[2]
+            ref[(3, 1, 1)]+=-0.80371179142*x_ref[2]**o + (-0.503005810685)*x_ref[2]
+            arg[(3, 1, 2)]+=0.457877231652*x[2]**o + (-0.709214368026)*x[2]
+            ref[(3, 1, 2)]+=0.457877231652*x_ref[2]**o + (-0.709214368026)*x_ref[2]
+            arg[(3, 2, 0)]+=0.632042762594*x[2]**o + (-0.0724542888664)*x[2]
+            ref[(3, 2, 0)]+=0.632042762594*x_ref[2]**o + (-0.0724542888664)*x_ref[2]
+            arg[(3, 2, 1)]+=0.253300805398*x[2]**o + (0.28610577238)*x[2]
+            ref[(3, 2, 1)]+=0.253300805398*x_ref[2]**o + (0.28610577238)*x_ref[2]
+            arg[(3, 2, 2)]+=0.187886275015*x[2]**o + (-0.398371203798)*x[2]
+            ref[(3, 2, 2)]+=0.187886275015*x_ref[2]**o + (-0.398371203798)*x_ref[2]
+            arg[(3, 3, 0)]+=0.887770910581*x[2]**o + (-0.820127846964)*x[2]
+            ref[(3, 3, 0)]+=0.887770910581*x_ref[2]**o + (-0.820127846964)*x_ref[2]
+            arg[(3, 3, 1)]+=0.381116663924*x[2]**o + (-0.444153210805)*x[2]
+            ref[(3, 3, 1)]+=0.381116663924*x_ref[2]**o + (-0.444153210805)*x_ref[2]
+            arg[(3, 3, 2)]+=0.274772602148*x[2]**o + (0.31796306)*x[2]
+            ref[(3, 3, 2)]+=0.274772602148*x_ref[2]**o + (0.31796306)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onSolution_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on Solution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to Solution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = Solution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4, 2),w)
+        ref = Data(0,(4, 3, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=-0.831366489245*x[0]**o + (0.683342607215)*x[0] + (0.329695129067)*x[1]**o + (0.256491189714)*x[1]
+        ref[(0, 0, 0, 0)]=-0.831366489245*x_ref[0]**o + (0.683342607215)*x_ref[0] + (0.329695129067)*x_ref[1]**o + (0.256491189714)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.0198083775093*x[0]**o + (0.245306612572)*x[0] + (0.709428739106)*x[1]**o + (0.883152486568)*x[1]
+        ref[(0, 0, 0, 1)]=0.0198083775093*x_ref[0]**o + (0.245306612572)*x_ref[0] + (0.709428739106)*x_ref[1]**o + (0.883152486568)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.0102828875505*x[0]**o + (0.113461896871)*x[0] + (0.925968648696)*x[1]**o + (-0.913244364726)*x[1]
+        ref[(0, 0, 1, 0)]=0.0102828875505*x_ref[0]**o + (0.113461896871)*x_ref[0] + (0.925968648696)*x_ref[1]**o + (-0.913244364726)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.17582546422*x[0]**o + (-0.106883345585)*x[0] + (0.9790913557)*x[1]**o + (0.135188604157)*x[1]
+        ref[(0, 0, 1, 1)]=0.17582546422*x_ref[0]**o + (-0.106883345585)*x_ref[0] + (0.9790913557)*x_ref[1]**o + (0.135188604157)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.811896112648*x[0]**o + (-0.0484912370492)*x[0] + (-0.306444486559)*x[1]**o + (0.823149292834)*x[1]
+        ref[(0, 0, 2, 0)]=0.811896112648*x_ref[0]**o + (-0.0484912370492)*x_ref[0] + (-0.306444486559)*x_ref[1]**o + (0.823149292834)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.741346502703*x[0]**o + (-0.934355066775)*x[0] + (0.864053213896)*x[1]**o + (-0.0501528800581)*x[1]
+        ref[(0, 0, 2, 1)]=-0.741346502703*x_ref[0]**o + (-0.934355066775)*x_ref[0] + (0.864053213896)*x_ref[1]**o + (-0.0501528800581)*x_ref[1]
+        arg[(0, 0, 3, 0)]=-0.594954411245*x[0]**o + (0.858912868126)*x[0] + (0.575235217577)*x[1]**o + (0.448433668147)*x[1]
+        ref[(0, 0, 3, 0)]=-0.594954411245*x_ref[0]**o + (0.858912868126)*x_ref[0] + (0.575235217577)*x_ref[1]**o + (0.448433668147)*x_ref[1]
+        arg[(0, 0, 3, 1)]=-0.208480641606*x[0]**o + (-0.567434879074)*x[0] + (-0.905078428466)*x[1]**o + (-0.522425505931)*x[1]
+        ref[(0, 0, 3, 1)]=-0.208480641606*x_ref[0]**o + (-0.567434879074)*x_ref[0] + (-0.905078428466)*x_ref[1]**o + (-0.522425505931)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.25804222835*x[0]**o + (-0.937645406975)*x[0] + (0.218050440406)*x[1]**o + (0.139114598539)*x[1]
+        ref[(0, 1, 0, 0)]=0.25804222835*x_ref[0]**o + (-0.937645406975)*x_ref[0] + (0.218050440406)*x_ref[1]**o + (0.139114598539)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.0514096542514*x[0]**o + (0.0114691190274)*x[0] + (-0.0721649323592)*x[1]**o + (-0.327893551345)*x[1]
+        ref[(0, 1, 0, 1)]=-0.0514096542514*x_ref[0]**o + (0.0114691190274)*x_ref[0] + (-0.0721649323592)*x_ref[1]**o + (-0.327893551345)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.752257124957*x[0]**o + (0.505262262368)*x[0] + (0.017217402462)*x[1]**o + (0.254811179722)*x[1]
+        ref[(0, 1, 1, 0)]=-0.752257124957*x_ref[0]**o + (0.505262262368)*x_ref[0] + (0.017217402462)*x_ref[1]**o + (0.254811179722)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.223910448486*x[0]**o + (0.589038918053)*x[0] + (-0.756835697989)*x[1]**o + (-0.887156715421)*x[1]
+        ref[(0, 1, 1, 1)]=-0.223910448486*x_ref[0]**o + (0.589038918053)*x_ref[0] + (-0.756835697989)*x_ref[1]**o + (-0.887156715421)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.966440510991*x[0]**o + (-0.975906487283)*x[0] + (0.224677859982)*x[1]**o + (0.508902865925)*x[1]
+        ref[(0, 1, 2, 0)]=-0.966440510991*x_ref[0]**o + (-0.975906487283)*x_ref[0] + (0.224677859982)*x_ref[1]**o + (0.508902865925)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.48689474194*x[0]**o + (0.401196620185)*x[0] + (0.804869705791)*x[1]**o + (0.944932688337)*x[1]
+        ref[(0, 1, 2, 1)]=0.48689474194*x_ref[0]**o + (0.401196620185)*x_ref[0] + (0.804869705791)*x_ref[1]**o + (0.944932688337)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.554806411141*x[0]**o + (0.713328648012)*x[0] + (0.210893556757)*x[1]**o + (-0.9712980176)*x[1]
+        ref[(0, 1, 3, 0)]=0.554806411141*x_ref[0]**o + (0.713328648012)*x_ref[0] + (0.210893556757)*x_ref[1]**o + (-0.9712980176)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.987769769348*x[0]**o + (-0.760425545669)*x[0] + (-0.808509334954)*x[1]**o + (0.932736072732)*x[1]
+        ref[(0, 1, 3, 1)]=-0.987769769348*x_ref[0]**o + (-0.760425545669)*x_ref[0] + (-0.808509334954)*x_ref[1]**o + (0.932736072732)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.613955916297*x[0]**o + (-0.833935824739)*x[0] + (-0.764453752239)*x[1]**o + (-0.717130074942)*x[1]
+        ref[(0, 2, 0, 0)]=0.613955916297*x_ref[0]**o + (-0.833935824739)*x_ref[0] + (-0.764453752239)*x_ref[1]**o + (-0.717130074942)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.927463029524*x[0]**o + (-0.610508616089)*x[0] + (-0.03200824902)*x[1]**o + (0.225563537078)*x[1]
+        ref[(0, 2, 0, 1)]=-0.927463029524*x_ref[0]**o + (-0.610508616089)*x_ref[0] + (-0.03200824902)*x_ref[1]**o + (0.225563537078)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.932908374538*x[0]**o + (0.472689817856)*x[0] + (-0.419321525908)*x[1]**o + (-0.270381943541)*x[1]
+        ref[(0, 2, 1, 0)]=0.932908374538*x_ref[0]**o + (0.472689817856)*x_ref[0] + (-0.419321525908)*x_ref[1]**o + (-0.270381943541)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.927757787331*x[0]**o + (-0.506770467385)*x[0] + (0.861014818076)*x[1]**o + (0.452351339525)*x[1]
+        ref[(0, 2, 1, 1)]=0.927757787331*x_ref[0]**o + (-0.506770467385)*x_ref[0] + (0.861014818076)*x_ref[1]**o + (0.452351339525)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.188228910189*x[0]**o + (0.278907017879)*x[0] + (-0.0411424332197)*x[1]**o + (0.683712601673)*x[1]
+        ref[(0, 2, 2, 0)]=-0.188228910189*x_ref[0]**o + (0.278907017879)*x_ref[0] + (-0.0411424332197)*x_ref[1]**o + (0.683712601673)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.990822783962*x[0]**o + (-0.071359899513)*x[0] + (-0.0560753257459)*x[1]**o + (0.899496003998)*x[1]
+        ref[(0, 2, 2, 1)]=0.990822783962*x_ref[0]**o + (-0.071359899513)*x_ref[0] + (-0.0560753257459)*x_ref[1]**o + (0.899496003998)*x_ref[1]
+        arg[(0, 2, 3, 0)]=-0.707886944153*x[0]**o + (0.538142658957)*x[0] + (-0.270362129266)*x[1]**o + (-0.634646339942)*x[1]
+        ref[(0, 2, 3, 0)]=-0.707886944153*x_ref[0]**o + (0.538142658957)*x_ref[0] + (-0.270362129266)*x_ref[1]**o + (-0.634646339942)*x_ref[1]
+        arg[(0, 2, 3, 1)]=0.120809772127*x[0]**o + (-0.0426795572049)*x[0] + (-0.684131230437)*x[1]**o + (0.857336847847)*x[1]
+        ref[(0, 2, 3, 1)]=0.120809772127*x_ref[0]**o + (-0.0426795572049)*x_ref[0] + (-0.684131230437)*x_ref[1]**o + (0.857336847847)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.846681817395*x[0]**o + (-0.577910598101)*x[0] + (-0.121748512874)*x[1]**o + (-0.214252429314)*x[1]
+        ref[(1, 0, 0, 0)]=0.846681817395*x_ref[0]**o + (-0.577910598101)*x_ref[0] + (-0.121748512874)*x_ref[1]**o + (-0.214252429314)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.983168346251*x[0]**o + (-0.363694465172)*x[0] + (0.521593999728)*x[1]**o + (-0.843205300355)*x[1]
+        ref[(1, 0, 0, 1)]=0.983168346251*x_ref[0]**o + (-0.363694465172)*x_ref[0] + (0.521593999728)*x_ref[1]**o + (-0.843205300355)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.345900526594*x[0]**o + (0.878846290577)*x[0] + (0.115867019399)*x[1]**o + (-0.309379852996)*x[1]
+        ref[(1, 0, 1, 0)]=0.345900526594*x_ref[0]**o + (0.878846290577)*x_ref[0] + (0.115867019399)*x_ref[1]**o + (-0.309379852996)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.476582175827*x[0]**o + (-0.0159035133273)*x[0] + (0.894764035289)*x[1]**o + (-0.896851444423)*x[1]
+        ref[(1, 0, 1, 1)]=-0.476582175827*x_ref[0]**o + (-0.0159035133273)*x_ref[0] + (0.894764035289)*x_ref[1]**o + (-0.896851444423)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.729603114657*x[0]**o + (0.0895136538578)*x[0] + (0.796769599057)*x[1]**o + (0.502451312663)*x[1]
+        ref[(1, 0, 2, 0)]=-0.729603114657*x_ref[0]**o + (0.0895136538578)*x_ref[0] + (0.796769599057)*x_ref[1]**o + (0.502451312663)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.062998222954*x[0]**o + (0.75995494136)*x[0] + (0.169689341646)*x[1]**o + (0.651479997907)*x[1]
+        ref[(1, 0, 2, 1)]=0.062998222954*x_ref[0]**o + (0.75995494136)*x_ref[0] + (0.169689341646)*x_ref[1]**o + (0.651479997907)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.67866840204*x[0]**o + (0.67833802727)*x[0] + (-0.518683678917)*x[1]**o + (-0.681588276443)*x[1]
+        ref[(1, 0, 3, 0)]=-0.67866840204*x_ref[0]**o + (0.67833802727)*x_ref[0] + (-0.518683678917)*x_ref[1]**o + (-0.681588276443)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.356574759527*x[0]**o + (-0.856467274898)*x[0] + (-0.742225017987)*x[1]**o + (0.117269517341)*x[1]
+        ref[(1, 0, 3, 1)]=0.356574759527*x_ref[0]**o + (-0.856467274898)*x_ref[0] + (-0.742225017987)*x_ref[1]**o + (0.117269517341)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.655649823974*x[0]**o + (-0.382178957643)*x[0] + (-0.0149041235082)*x[1]**o + (0.0377895385886)*x[1]
+        ref[(1, 1, 0, 0)]=-0.655649823974*x_ref[0]**o + (-0.382178957643)*x_ref[0] + (-0.0149041235082)*x_ref[1]**o + (0.0377895385886)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.886892399911*x[0]**o + (0.736604517584)*x[0] + (0.0112221648585)*x[1]**o + (0.0899221918651)*x[1]
+        ref[(1, 1, 0, 1)]=0.886892399911*x_ref[0]**o + (0.736604517584)*x_ref[0] + (0.0112221648585)*x_ref[1]**o + (0.0899221918651)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.540156202681*x[0]**o + (-0.913074844901)*x[0] + (0.893458997505)*x[1]**o + (0.563979054412)*x[1]
+        ref[(1, 1, 1, 0)]=-0.540156202681*x_ref[0]**o + (-0.913074844901)*x_ref[0] + (0.893458997505)*x_ref[1]**o + (0.563979054412)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.970608632963*x[0]**o + (-0.548572651136)*x[0] + (-0.307524715571)*x[1]**o + (0.0297699690563)*x[1]
+        ref[(1, 1, 1, 1)]=0.970608632963*x_ref[0]**o + (-0.548572651136)*x_ref[0] + (-0.307524715571)*x_ref[1]**o + (0.0297699690563)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.895306829291*x[0]**o + (0.186045753736)*x[0] + (0.472076723078)*x[1]**o + (0.00519253069637)*x[1]
+        ref[(1, 1, 2, 0)]=-0.895306829291*x_ref[0]**o + (0.186045753736)*x_ref[0] + (0.472076723078)*x_ref[1]**o + (0.00519253069637)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.518776319071*x[0]**o + (0.867830303151)*x[0] + (-0.424265889049)*x[1]**o + (0.308754498138)*x[1]
+        ref[(1, 1, 2, 1)]=-0.518776319071*x_ref[0]**o + (0.867830303151)*x_ref[0] + (-0.424265889049)*x_ref[1]**o + (0.308754498138)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.187930854485*x[0]**o + (0.76689703033)*x[0] + (-0.884193657326)*x[1]**o + (-0.0742457836572)*x[1]
+        ref[(1, 1, 3, 0)]=-0.187930854485*x_ref[0]**o + (0.76689703033)*x_ref[0] + (-0.884193657326)*x_ref[1]**o + (-0.0742457836572)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.0419378526757*x[0]**o + (0.933170729572)*x[0] + (0.245595974447)*x[1]**o + (0.759728780938)*x[1]
+        ref[(1, 1, 3, 1)]=0.0419378526757*x_ref[0]**o + (0.933170729572)*x_ref[0] + (0.245595974447)*x_ref[1]**o + (0.759728780938)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.551992334835*x[0]**o + (-0.979413936046)*x[0] + (0.0905960851595)*x[1]**o + (0.124955227811)*x[1]
+        ref[(1, 2, 0, 0)]=-0.551992334835*x_ref[0]**o + (-0.979413936046)*x_ref[0] + (0.0905960851595)*x_ref[1]**o + (0.124955227811)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.304176876896*x[0]**o + (-0.669683149184)*x[0] + (0.0425120445567)*x[1]**o + (-0.99503659043)*x[1]
+        ref[(1, 2, 0, 1)]=-0.304176876896*x_ref[0]**o + (-0.669683149184)*x_ref[0] + (0.0425120445567)*x_ref[1]**o + (-0.99503659043)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.193441284379*x[0]**o + (0.10856822129)*x[0] + (0.182518449617)*x[1]**o + (-0.755968957692)*x[1]
+        ref[(1, 2, 1, 0)]=0.193441284379*x_ref[0]**o + (0.10856822129)*x_ref[0] + (0.182518449617)*x_ref[1]**o + (-0.755968957692)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.281130807122*x[0]**o + (0.643892883792)*x[0] + (-0.350307848424)*x[1]**o + (-0.293351518883)*x[1]
+        ref[(1, 2, 1, 1)]=0.281130807122*x_ref[0]**o + (0.643892883792)*x_ref[0] + (-0.350307848424)*x_ref[1]**o + (-0.293351518883)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.159133567467*x[0]**o + (0.143713562729)*x[0] + (-0.504527006736)*x[1]**o + (0.38261038453)*x[1]
+        ref[(1, 2, 2, 0)]=0.159133567467*x_ref[0]**o + (0.143713562729)*x_ref[0] + (-0.504527006736)*x_ref[1]**o + (0.38261038453)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.0333990627049*x[0]**o + (-0.99441751955)*x[0] + (0.651250583827)*x[1]**o + (-0.564799901811)*x[1]
+        ref[(1, 2, 2, 1)]=-0.0333990627049*x_ref[0]**o + (-0.99441751955)*x_ref[0] + (0.651250583827)*x_ref[1]**o + (-0.564799901811)*x_ref[1]
+        arg[(1, 2, 3, 0)]=0.468793527192*x[0]**o + (-0.202017871985)*x[0] + (0.677649630396)*x[1]**o + (-0.144081640889)*x[1]
+        ref[(1, 2, 3, 0)]=0.468793527192*x_ref[0]**o + (-0.202017871985)*x_ref[0] + (0.677649630396)*x_ref[1]**o + (-0.144081640889)*x_ref[1]
+        arg[(1, 2, 3, 1)]=0.519578763434*x[0]**o + (-0.39514488095)*x[0] + (-0.580813325495)*x[1]**o + (-0.50922535436)*x[1]
+        ref[(1, 2, 3, 1)]=0.519578763434*x_ref[0]**o + (-0.39514488095)*x_ref[0] + (-0.580813325495)*x_ref[1]**o + (-0.50922535436)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.840810691453*x[0]**o + (-0.538227674081)*x[0] + (-0.878024218975)*x[1]**o + (0.975453258092)*x[1]
+        ref[(2, 0, 0, 0)]=0.840810691453*x_ref[0]**o + (-0.538227674081)*x_ref[0] + (-0.878024218975)*x_ref[1]**o + (0.975453258092)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.706746564577*x[0]**o + (-0.0138295428473)*x[0] + (0.460944149931)*x[1]**o + (0.276655536267)*x[1]
+        ref[(2, 0, 0, 1)]=0.706746564577*x_ref[0]**o + (-0.0138295428473)*x_ref[0] + (0.460944149931)*x_ref[1]**o + (0.276655536267)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.965945211186*x[0]**o + (-0.532729060924)*x[0] + (-0.752414018126)*x[1]**o + (-0.884833297598)*x[1]
+        ref[(2, 0, 1, 0)]=0.965945211186*x_ref[0]**o + (-0.532729060924)*x_ref[0] + (-0.752414018126)*x_ref[1]**o + (-0.884833297598)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.626721755153*x[0]**o + (0.766952942247)*x[0] + (-0.735688397511)*x[1]**o + (0.596070002836)*x[1]
+        ref[(2, 0, 1, 1)]=-0.626721755153*x_ref[0]**o + (0.766952942247)*x_ref[0] + (-0.735688397511)*x_ref[1]**o + (0.596070002836)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.76785548908*x[0]**o + (-0.265853543378)*x[0] + (0.460706498317)*x[1]**o + (-0.215783115929)*x[1]
+        ref[(2, 0, 2, 0)]=-0.76785548908*x_ref[0]**o + (-0.265853543378)*x_ref[0] + (0.460706498317)*x_ref[1]**o + (-0.215783115929)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.743834783968*x[0]**o + (0.101628150629)*x[0] + (-0.294724645413)*x[1]**o + (0.725780787086)*x[1]
+        ref[(2, 0, 2, 1)]=-0.743834783968*x_ref[0]**o + (0.101628150629)*x_ref[0] + (-0.294724645413)*x_ref[1]**o + (0.725780787086)*x_ref[1]
+        arg[(2, 0, 3, 0)]=0.416527539339*x[0]**o + (-0.904930439005)*x[0] + (-0.209566378836)*x[1]**o + (0.272661818723)*x[1]
+        ref[(2, 0, 3, 0)]=0.416527539339*x_ref[0]**o + (-0.904930439005)*x_ref[0] + (-0.209566378836)*x_ref[1]**o + (0.272661818723)*x_ref[1]
+        arg[(2, 0, 3, 1)]=-0.716752252406*x[0]**o + (0.646273068667)*x[0] + (0.844131511506)*x[1]**o + (0.350560882909)*x[1]
+        ref[(2, 0, 3, 1)]=-0.716752252406*x_ref[0]**o + (0.646273068667)*x_ref[0] + (0.844131511506)*x_ref[1]**o + (0.350560882909)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.204807120126*x[0]**o + (-0.901061463658)*x[0] + (-0.177035528329)*x[1]**o + (0.513125409095)*x[1]
+        ref[(2, 1, 0, 0)]=0.204807120126*x_ref[0]**o + (-0.901061463658)*x_ref[0] + (-0.177035528329)*x_ref[1]**o + (0.513125409095)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.0834164357622*x[0]**o + (0.256758797028)*x[0] + (-0.845100837836)*x[1]**o + (0.321573737564)*x[1]
+        ref[(2, 1, 0, 1)]=0.0834164357622*x_ref[0]**o + (0.256758797028)*x_ref[0] + (-0.845100837836)*x_ref[1]**o + (0.321573737564)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.959021012521*x[0]**o + (-0.430596744973)*x[0] + (-0.762780573451)*x[1]**o + (0.65385110807)*x[1]
+        ref[(2, 1, 1, 0)]=-0.959021012521*x_ref[0]**o + (-0.430596744973)*x_ref[0] + (-0.762780573451)*x_ref[1]**o + (0.65385110807)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.165697616234*x[0]**o + (-0.567338858739)*x[0] + (0.0622171084276)*x[1]**o + (0.820732012896)*x[1]
+        ref[(2, 1, 1, 1)]=-0.165697616234*x_ref[0]**o + (-0.567338858739)*x_ref[0] + (0.0622171084276)*x_ref[1]**o + (0.820732012896)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.492474700616*x[0]**o + (0.572567085668)*x[0] + (-0.282971689556)*x[1]**o + (0.864187146823)*x[1]
+        ref[(2, 1, 2, 0)]=-0.492474700616*x_ref[0]**o + (0.572567085668)*x_ref[0] + (-0.282971689556)*x_ref[1]**o + (0.864187146823)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.511989710619*x[0]**o + (0.687563834844)*x[0] + (-0.305634585344)*x[1]**o + (-0.780599826622)*x[1]
+        ref[(2, 1, 2, 1)]=-0.511989710619*x_ref[0]**o + (0.687563834844)*x_ref[0] + (-0.305634585344)*x_ref[1]**o + (-0.780599826622)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.0870294999985*x[0]**o + (-0.347922117895)*x[0] + (0.260685155778)*x[1]**o + (-0.657091990556)*x[1]
+        ref[(2, 1, 3, 0)]=0.0870294999985*x_ref[0]**o + (-0.347922117895)*x_ref[0] + (0.260685155778)*x_ref[1]**o + (-0.657091990556)*x_ref[1]
+        arg[(2, 1, 3, 1)]=-0.372203725713*x[0]**o + (-0.306216734644)*x[0] + (-0.447546387161)*x[1]**o + (0.328195146218)*x[1]
+        ref[(2, 1, 3, 1)]=-0.372203725713*x_ref[0]**o + (-0.306216734644)*x_ref[0] + (-0.447546387161)*x_ref[1]**o + (0.328195146218)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.827169912135*x[0]**o + (-0.786369276994)*x[0] + (-0.429810904155)*x[1]**o + (0.770711790579)*x[1]
+        ref[(2, 2, 0, 0)]=0.827169912135*x_ref[0]**o + (-0.786369276994)*x_ref[0] + (-0.429810904155)*x_ref[1]**o + (0.770711790579)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.989323452241*x[0]**o + (-0.762235852823)*x[0] + (-0.11194210852)*x[1]**o + (-0.862959994212)*x[1]
+        ref[(2, 2, 0, 1)]=-0.989323452241*x_ref[0]**o + (-0.762235852823)*x_ref[0] + (-0.11194210852)*x_ref[1]**o + (-0.862959994212)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.0042618355092*x[0]**o + (0.926577544522)*x[0] + (0.237949739318)*x[1]**o + (-0.287004392412)*x[1]
+        ref[(2, 2, 1, 0)]=-0.0042618355092*x_ref[0]**o + (0.926577544522)*x_ref[0] + (0.237949739318)*x_ref[1]**o + (-0.287004392412)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.224416908785*x[0]**o + (0.573628658897)*x[0] + (-0.9598699014)*x[1]**o + (0.924414627828)*x[1]
+        ref[(2, 2, 1, 1)]=-0.224416908785*x_ref[0]**o + (0.573628658897)*x_ref[0] + (-0.9598699014)*x_ref[1]**o + (0.924414627828)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.365104178079*x[0]**o + (-0.734541679763)*x[0] + (-0.820736279798)*x[1]**o + (-0.424920624234)*x[1]
+        ref[(2, 2, 2, 0)]=-0.365104178079*x_ref[0]**o + (-0.734541679763)*x_ref[0] + (-0.820736279798)*x_ref[1]**o + (-0.424920624234)*x_ref[1]
+        arg[(2, 2, 2, 1)]=-0.205174592576*x[0]**o + (-0.0791913339448)*x[0] + (0.777876307203)*x[1]**o + (0.758146332664)*x[1]
+        ref[(2, 2, 2, 1)]=-0.205174592576*x_ref[0]**o + (-0.0791913339448)*x_ref[0] + (0.777876307203)*x_ref[1]**o + (0.758146332664)*x_ref[1]
+        arg[(2, 2, 3, 0)]=-0.896724861267*x[0]**o + (-0.490989017269)*x[0] + (-0.515586192155)*x[1]**o + (0.958278008818)*x[1]
+        ref[(2, 2, 3, 0)]=-0.896724861267*x_ref[0]**o + (-0.490989017269)*x_ref[0] + (-0.515586192155)*x_ref[1]**o + (0.958278008818)*x_ref[1]
+        arg[(2, 2, 3, 1)]=-0.801281692979*x[0]**o + (0.530933007593)*x[0] + (0.129495700214)*x[1]**o + (0.063542371111)*x[1]
+        ref[(2, 2, 3, 1)]=-0.801281692979*x_ref[0]**o + (0.530933007593)*x_ref[0] + (0.129495700214)*x_ref[1]**o + (0.063542371111)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.429644373305*x[0]**o + (-0.966579180884)*x[0] + (0.767060896548)*x[1]**o + (-0.69733875206)*x[1]
+        ref[(3, 0, 0, 0)]=0.429644373305*x_ref[0]**o + (-0.966579180884)*x_ref[0] + (0.767060896548)*x_ref[1]**o + (-0.69733875206)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.835860494179*x[0]**o + (0.171949760689)*x[0] + (0.504270761408)*x[1]**o + (0.422417960125)*x[1]
+        ref[(3, 0, 0, 1)]=-0.835860494179*x_ref[0]**o + (0.171949760689)*x_ref[0] + (0.504270761408)*x_ref[1]**o + (0.422417960125)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.686493433744*x[0]**o + (-0.369367031649)*x[0] + (0.226511552503)*x[1]**o + (0.165404723303)*x[1]
+        ref[(3, 0, 1, 0)]=0.686493433744*x_ref[0]**o + (-0.369367031649)*x_ref[0] + (0.226511552503)*x_ref[1]**o + (0.165404723303)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.102972009518*x[0]**o + (0.102033530961)*x[0] + (0.623825704824)*x[1]**o + (-0.150737022599)*x[1]
+        ref[(3, 0, 1, 1)]=-0.102972009518*x_ref[0]**o + (0.102033530961)*x_ref[0] + (0.623825704824)*x_ref[1]**o + (-0.150737022599)*x_ref[1]
+        arg[(3, 0, 2, 0)]=0.414331087606*x[0]**o + (0.232676585535)*x[0] + (-0.37773459324)*x[1]**o + (0.273909743937)*x[1]
+        ref[(3, 0, 2, 0)]=0.414331087606*x_ref[0]**o + (0.232676585535)*x_ref[0] + (-0.37773459324)*x_ref[1]**o + (0.273909743937)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.142930467991*x[0]**o + (-0.188806930195)*x[0] + (-0.792962262387)*x[1]**o + (-0.77597641196)*x[1]
+        ref[(3, 0, 2, 1)]=0.142930467991*x_ref[0]**o + (-0.188806930195)*x_ref[0] + (-0.792962262387)*x_ref[1]**o + (-0.77597641196)*x_ref[1]
+        arg[(3, 0, 3, 0)]=-0.132748281011*x[0]**o + (0.743838208995)*x[0] + (-0.849221084091)*x[1]**o + (-0.677995553882)*x[1]
+        ref[(3, 0, 3, 0)]=-0.132748281011*x_ref[0]**o + (0.743838208995)*x_ref[0] + (-0.849221084091)*x_ref[1]**o + (-0.677995553882)*x_ref[1]
+        arg[(3, 0, 3, 1)]=0.66370892577*x[0]**o + (-0.588182557839)*x[0] + (0.0922956792635)*x[1]**o + (0.579679760374)*x[1]
+        ref[(3, 0, 3, 1)]=0.66370892577*x_ref[0]**o + (-0.588182557839)*x_ref[0] + (0.0922956792635)*x_ref[1]**o + (0.579679760374)*x_ref[1]
+        arg[(3, 1, 0, 0)]=0.0880667718186*x[0]**o + (0.524236678)*x[0] + (-0.0781117221658)*x[1]**o + (-0.570129367545)*x[1]
+        ref[(3, 1, 0, 0)]=0.0880667718186*x_ref[0]**o + (0.524236678)*x_ref[0] + (-0.0781117221658)*x_ref[1]**o + (-0.570129367545)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.090089978352*x[0]**o + (-0.480425621446)*x[0] + (-0.42099914331)*x[1]**o + (0.41560913204)*x[1]
+        ref[(3, 1, 0, 1)]=0.090089978352*x_ref[0]**o + (-0.480425621446)*x_ref[0] + (-0.42099914331)*x_ref[1]**o + (0.41560913204)*x_ref[1]
+        arg[(3, 1, 1, 0)]=-0.436202153704*x[0]**o + (0.387716360704)*x[0] + (0.519182110314)*x[1]**o + (0.62957824616)*x[1]
+        ref[(3, 1, 1, 0)]=-0.436202153704*x_ref[0]**o + (0.387716360704)*x_ref[0] + (0.519182110314)*x_ref[1]**o + (0.62957824616)*x_ref[1]
+        arg[(3, 1, 1, 1)]=0.0687754005043*x[0]**o + (-0.548209514944)*x[0] + (0.459510818185)*x[1]**o + (0.015960729555)*x[1]
+        ref[(3, 1, 1, 1)]=0.0687754005043*x_ref[0]**o + (-0.548209514944)*x_ref[0] + (0.459510818185)*x_ref[1]**o + (0.015960729555)*x_ref[1]
+        arg[(3, 1, 2, 0)]=-0.272527855894*x[0]**o + (0.225937515631)*x[0] + (-0.814681896923)*x[1]**o + (-0.451676907718)*x[1]
+        ref[(3, 1, 2, 0)]=-0.272527855894*x_ref[0]**o + (0.225937515631)*x_ref[0] + (-0.814681896923)*x_ref[1]**o + (-0.451676907718)*x_ref[1]
+        arg[(3, 1, 2, 1)]=-0.197945825804*x[0]**o + (-0.0512912118405)*x[0] + (-0.605442959537)*x[1]**o + (-0.748306525906)*x[1]
+        ref[(3, 1, 2, 1)]=-0.197945825804*x_ref[0]**o + (-0.0512912118405)*x_ref[0] + (-0.605442959537)*x_ref[1]**o + (-0.748306525906)*x_ref[1]
+        arg[(3, 1, 3, 0)]=0.881220609429*x[0]**o + (-0.756800223281)*x[0] + (-0.16878778954)*x[1]**o + (0.694889121545)*x[1]
+        ref[(3, 1, 3, 0)]=0.881220609429*x_ref[0]**o + (-0.756800223281)*x_ref[0] + (-0.16878778954)*x_ref[1]**o + (0.694889121545)*x_ref[1]
+        arg[(3, 1, 3, 1)]=-0.0272700664207*x[0]**o + (-0.804662703672)*x[0] + (0.644773880152)*x[1]**o + (0.561180551536)*x[1]
+        ref[(3, 1, 3, 1)]=-0.0272700664207*x_ref[0]**o + (-0.804662703672)*x_ref[0] + (0.644773880152)*x_ref[1]**o + (0.561180551536)*x_ref[1]
+        arg[(3, 2, 0, 0)]=-0.880919114101*x[0]**o + (-0.433718935874)*x[0] + (0.883194636405)*x[1]**o + (-0.750973367746)*x[1]
+        ref[(3, 2, 0, 0)]=-0.880919114101*x_ref[0]**o + (-0.433718935874)*x_ref[0] + (0.883194636405)*x_ref[1]**o + (-0.750973367746)*x_ref[1]
+        arg[(3, 2, 0, 1)]=-0.400040989184*x[0]**o + (-0.841815016537)*x[0] + (0.283581766672)*x[1]**o + (0.367052008072)*x[1]
+        ref[(3, 2, 0, 1)]=-0.400040989184*x_ref[0]**o + (-0.841815016537)*x_ref[0] + (0.283581766672)*x_ref[1]**o + (0.367052008072)*x_ref[1]
+        arg[(3, 2, 1, 0)]=-0.383421655381*x[0]**o + (0.633926957977)*x[0] + (-0.730194502773)*x[1]**o + (-0.281948179475)*x[1]
+        ref[(3, 2, 1, 0)]=-0.383421655381*x_ref[0]**o + (0.633926957977)*x_ref[0] + (-0.730194502773)*x_ref[1]**o + (-0.281948179475)*x_ref[1]
+        arg[(3, 2, 1, 1)]=0.955671630226*x[0]**o + (-0.440901454319)*x[0] + (-0.521526899194)*x[1]**o + (-0.373939329721)*x[1]
+        ref[(3, 2, 1, 1)]=0.955671630226*x_ref[0]**o + (-0.440901454319)*x_ref[0] + (-0.521526899194)*x_ref[1]**o + (-0.373939329721)*x_ref[1]
+        arg[(3, 2, 2, 0)]=0.745937777469*x[0]**o + (-0.237673677425)*x[0] + (0.600102263543)*x[1]**o + (0.786754902637)*x[1]
+        ref[(3, 2, 2, 0)]=0.745937777469*x_ref[0]**o + (-0.237673677425)*x_ref[0] + (0.600102263543)*x_ref[1]**o + (0.786754902637)*x_ref[1]
+        arg[(3, 2, 2, 1)]=-0.413090810324*x[0]**o + (0.958440060053)*x[0] + (0.27895530008)*x[1]**o + (-0.373875009059)*x[1]
+        ref[(3, 2, 2, 1)]=-0.413090810324*x_ref[0]**o + (0.958440060053)*x_ref[0] + (0.27895530008)*x_ref[1]**o + (-0.373875009059)*x_ref[1]
+        arg[(3, 2, 3, 0)]=-0.32277430541*x[0]**o + (-0.964110575189)*x[0] + (0.917630692709)*x[1]**o + (0.712396351693)*x[1]
+        ref[(3, 2, 3, 0)]=-0.32277430541*x_ref[0]**o + (-0.964110575189)*x_ref[0] + (0.917630692709)*x_ref[1]**o + (0.712396351693)*x_ref[1]
+        arg[(3, 2, 3, 1)]=0.0759754906856*x[0]**o + (-0.754198030332)*x[0] + (0.835877633452)*x[1]**o + (0.59513447119)*x[1]
+        ref[(3, 2, 3, 1)]=0.0759754906856*x_ref[0]**o + (-0.754198030332)*x_ref[0] + (0.835877633452)*x_ref[1]**o + (0.59513447119)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.76359160153*x[2]**o + (0.994028314767)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.76359160153*x_ref[2]**o + (0.994028314767)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.279081750116*x[2]**o + (-0.772397385791)*x[2]
+            ref[(0, 0, 0, 1)]+=0.279081750116*x_ref[2]**o + (-0.772397385791)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.247057929521*x[2]**o + (0.158615282214)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.247057929521*x_ref[2]**o + (0.158615282214)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.549458571328*x[2]**o + (0.318311589457)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.549458571328*x_ref[2]**o + (0.318311589457)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.929750384974*x[2]**o + (0.707097529957)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.929750384974*x_ref[2]**o + (0.707097529957)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.236081847745*x[2]**o + (-0.190310258682)*x[2]
+            ref[(0, 0, 2, 1)]+=0.236081847745*x_ref[2]**o + (-0.190310258682)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.642542353569*x[2]**o + (-0.597854734245)*x[2]
+            ref[(0, 0, 3, 0)]+=0.642542353569*x_ref[2]**o + (-0.597854734245)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.124365065941*x[2]**o + (0.276819443256)*x[2]
+            ref[(0, 0, 3, 1)]+=0.124365065941*x_ref[2]**o + (0.276819443256)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.303581740544*x[2]**o + (0.85716509906)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.303581740544*x_ref[2]**o + (0.85716509906)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.936146520137*x[2]**o + (-0.631902222322)*x[2]
+            ref[(0, 1, 0, 1)]+=0.936146520137*x_ref[2]**o + (-0.631902222322)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.63513718286*x[2]**o + (0.705700809538)*x[2]
+            ref[(0, 1, 1, 0)]+=0.63513718286*x_ref[2]**o + (0.705700809538)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.781943479631*x[2]**o + (0.595506380421)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.781943479631*x_ref[2]**o + (0.595506380421)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.102177906227*x[2]**o + (0.96501704543)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.102177906227*x_ref[2]**o + (0.96501704543)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.296502974901*x[2]**o + (0.694298644372)*x[2]
+            ref[(0, 1, 2, 1)]+=0.296502974901*x_ref[2]**o + (0.694298644372)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=0.407182019699*x[2]**o + (0.319609268293)*x[2]
+            ref[(0, 1, 3, 0)]+=0.407182019699*x_ref[2]**o + (0.319609268293)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.126011720368*x[2]**o + (0.0722301158406)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.126011720368*x_ref[2]**o + (0.0722301158406)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.448758440637*x[2]**o + (-0.506871621538)*x[2]
+            ref[(0, 2, 0, 0)]+=0.448758440637*x_ref[2]**o + (-0.506871621538)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.134173469673*x[2]**o + (0.961210018377)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.134173469673*x_ref[2]**o + (0.961210018377)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.774346053365*x[2]**o + (0.31267298119)*x[2]
+            ref[(0, 2, 1, 0)]+=0.774346053365*x_ref[2]**o + (0.31267298119)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.120923231601*x[2]**o + (-0.0864905803486)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.120923231601*x_ref[2]**o + (-0.0864905803486)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.932249005223*x[2]**o + (-0.494884637395)*x[2]
+            ref[(0, 2, 2, 0)]+=-0.932249005223*x_ref[2]**o + (-0.494884637395)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.403478794812*x[2]**o + (0.549763438806)*x[2]
+            ref[(0, 2, 2, 1)]+=-0.403478794812*x_ref[2]**o + (0.549763438806)*x_ref[2]
+            arg[(0, 2, 3, 0)]+=-0.0932713451417*x[2]**o + (-0.991925791795)*x[2]
+            ref[(0, 2, 3, 0)]+=-0.0932713451417*x_ref[2]**o + (-0.991925791795)*x_ref[2]
+            arg[(0, 2, 3, 1)]+=0.180537754848*x[2]**o + (0.142415656456)*x[2]
+            ref[(0, 2, 3, 1)]+=0.180537754848*x_ref[2]**o + (0.142415656456)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.29420250446*x[2]**o + (-0.095397454759)*x[2]
+            ref[(1, 0, 0, 0)]+=0.29420250446*x_ref[2]**o + (-0.095397454759)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.16791869561*x[2]**o + (-0.356522765651)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.16791869561*x_ref[2]**o + (-0.356522765651)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.7672385586*x[2]**o + (0.41301792396)*x[2]
+            ref[(1, 0, 1, 0)]+=0.7672385586*x_ref[2]**o + (0.41301792396)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.639663051727*x[2]**o + (0.155609415455)*x[2]
+            ref[(1, 0, 1, 1)]+=0.639663051727*x_ref[2]**o + (0.155609415455)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.90052957568*x[2]**o + (0.985891787125)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.90052957568*x_ref[2]**o + (0.985891787125)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.675657798594*x[2]**o + (0.193654337863)*x[2]
+            ref[(1, 0, 2, 1)]+=0.675657798594*x_ref[2]**o + (0.193654337863)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.346340030098*x[2]**o + (-0.0116440786741)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.346340030098*x_ref[2]**o + (-0.0116440786741)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.905194728557*x[2]**o + (0.516476452438)*x[2]
+            ref[(1, 0, 3, 1)]+=-0.905194728557*x_ref[2]**o + (0.516476452438)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.809801674272*x[2]**o + (-0.760870617876)*x[2]
+            ref[(1, 1, 0, 0)]+=0.809801674272*x_ref[2]**o + (-0.760870617876)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.985958381929*x[2]**o + (-0.559453278238)*x[2]
+            ref[(1, 1, 0, 1)]+=0.985958381929*x_ref[2]**o + (-0.559453278238)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.237040783453*x[2]**o + (0.682666767657)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.237040783453*x_ref[2]**o + (0.682666767657)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.754136567411*x[2]**o + (-0.000455719088739)*x[2]
+            ref[(1, 1, 1, 1)]+=0.754136567411*x_ref[2]**o + (-0.000455719088739)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.424258489551*x[2]**o + (-0.333095278878)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.424258489551*x_ref[2]**o + (-0.333095278878)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.629658309684*x[2]**o + (0.549097321238)*x[2]
+            ref[(1, 1, 2, 1)]+=0.629658309684*x_ref[2]**o + (0.549097321238)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.432310113841*x[2]**o + (0.476227404746)*x[2]
+            ref[(1, 1, 3, 0)]+=-0.432310113841*x_ref[2]**o + (0.476227404746)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.399085489999*x[2]**o + (0.441434873197)*x[2]
+            ref[(1, 1, 3, 1)]+=0.399085489999*x_ref[2]**o + (0.441434873197)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.633631959083*x[2]**o + (0.428341401297)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.633631959083*x_ref[2]**o + (0.428341401297)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.978505949707*x[2]**o + (-0.918809522545)*x[2]
+            ref[(1, 2, 0, 1)]+=0.978505949707*x_ref[2]**o + (-0.918809522545)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.225206187097*x[2]**o + (-0.0373564609246)*x[2]
+            ref[(1, 2, 1, 0)]+=-0.225206187097*x_ref[2]**o + (-0.0373564609246)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.699087167653*x[2]**o + (0.912003206414)*x[2]
+            ref[(1, 2, 1, 1)]+=0.699087167653*x_ref[2]**o + (0.912003206414)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.652901172076*x[2]**o + (-0.660055064297)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.652901172076*x_ref[2]**o + (-0.660055064297)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.731722090228*x[2]**o + (0.570844626416)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.731722090228*x_ref[2]**o + (0.570844626416)*x_ref[2]
+            arg[(1, 2, 3, 0)]+=-0.100097748495*x[2]**o + (-0.968837251069)*x[2]
+            ref[(1, 2, 3, 0)]+=-0.100097748495*x_ref[2]**o + (-0.968837251069)*x_ref[2]
+            arg[(1, 2, 3, 1)]+=-0.582755922664*x[2]**o + (-0.470858256872)*x[2]
+            ref[(1, 2, 3, 1)]+=-0.582755922664*x_ref[2]**o + (-0.470858256872)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.0350385995779*x[2]**o + (0.851442081326)*x[2]
+            ref[(2, 0, 0, 0)]+=0.0350385995779*x_ref[2]**o + (0.851442081326)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.703234386692*x[2]**o + (-0.596641169592)*x[2]
+            ref[(2, 0, 0, 1)]+=0.703234386692*x_ref[2]**o + (-0.596641169592)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.167912358569*x[2]**o + (0.619217960605)*x[2]
+            ref[(2, 0, 1, 0)]+=0.167912358569*x_ref[2]**o + (0.619217960605)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.420096171131*x[2]**o + (-0.244731611543)*x[2]
+            ref[(2, 0, 1, 1)]+=0.420096171131*x_ref[2]**o + (-0.244731611543)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.168331045*x[2]**o + (-0.0983682718113)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.168331045*x_ref[2]**o + (-0.0983682718113)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.677843398421*x[2]**o + (-0.786415996279)*x[2]
+            ref[(2, 0, 2, 1)]+=0.677843398421*x_ref[2]**o + (-0.786415996279)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.870841083703*x[2]**o + (0.660419688565)*x[2]
+            ref[(2, 0, 3, 0)]+=0.870841083703*x_ref[2]**o + (0.660419688565)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=-0.406731146289*x[2]**o + (-0.938817067033)*x[2]
+            ref[(2, 0, 3, 1)]+=-0.406731146289*x_ref[2]**o + (-0.938817067033)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.186814601847*x[2]**o + (-0.706192365095)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.186814601847*x_ref[2]**o + (-0.706192365095)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.932330025695*x[2]**o + (0.114044812147)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.932330025695*x_ref[2]**o + (0.114044812147)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.677008199488*x[2]**o + (0.702516378741)*x[2]
+            ref[(2, 1, 1, 0)]+=0.677008199488*x_ref[2]**o + (0.702516378741)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.693756410615*x[2]**o + (0.919366288677)*x[2]
+            ref[(2, 1, 1, 1)]+=0.693756410615*x_ref[2]**o + (0.919366288677)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.40794260605*x[2]**o + (-0.94559887128)*x[2]
+            ref[(2, 1, 2, 0)]+=0.40794260605*x_ref[2]**o + (-0.94559887128)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.164469360797*x[2]**o + (-0.404698361402)*x[2]
+            ref[(2, 1, 2, 1)]+=0.164469360797*x_ref[2]**o + (-0.404698361402)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=0.438785606426*x[2]**o + (-0.300891882541)*x[2]
+            ref[(2, 1, 3, 0)]+=0.438785606426*x_ref[2]**o + (-0.300891882541)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=0.879878183482*x[2]**o + (-0.979028111838)*x[2]
+            ref[(2, 1, 3, 1)]+=0.879878183482*x_ref[2]**o + (-0.979028111838)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.450157722719*x[2]**o + (-0.696796696587)*x[2]
+            ref[(2, 2, 0, 0)]+=0.450157722719*x_ref[2]**o + (-0.696796696587)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.910063997256*x[2]**o + (0.755574158283)*x[2]
+            ref[(2, 2, 0, 1)]+=0.910063997256*x_ref[2]**o + (0.755574158283)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.698308142864*x[2]**o + (0.533873237167)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.698308142864*x_ref[2]**o + (0.533873237167)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.0621916047101*x[2]**o + (0.335853494012)*x[2]
+            ref[(2, 2, 1, 1)]+=0.0621916047101*x_ref[2]**o + (0.335853494012)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.804828568968*x[2]**o + (-0.991482097716)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.804828568968*x_ref[2]**o + (-0.991482097716)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.68426477619*x[2]**o + (-0.938365963479)*x[2]
+            ref[(2, 2, 2, 1)]+=0.68426477619*x_ref[2]**o + (-0.938365963479)*x_ref[2]
+            arg[(2, 2, 3, 0)]+=-0.580527013257*x[2]**o + (0.154888276511)*x[2]
+            ref[(2, 2, 3, 0)]+=-0.580527013257*x_ref[2]**o + (0.154888276511)*x_ref[2]
+            arg[(2, 2, 3, 1)]+=0.913162571026*x[2]**o + (0.0615855614471)*x[2]
+            ref[(2, 2, 3, 1)]+=0.913162571026*x_ref[2]**o + (0.0615855614471)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.652852873446*x[2]**o + (-0.392602175914)*x[2]
+            ref[(3, 0, 0, 0)]+=0.652852873446*x_ref[2]**o + (-0.392602175914)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.634021151466*x[2]**o + (-0.742197087112)*x[2]
+            ref[(3, 0, 0, 1)]+=-0.634021151466*x_ref[2]**o + (-0.742197087112)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=-0.402551853712*x[2]**o + (0.449262485601)*x[2]
+            ref[(3, 0, 1, 0)]+=-0.402551853712*x_ref[2]**o + (0.449262485601)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.264080599771*x[2]**o + (0.904300178402)*x[2]
+            ref[(3, 0, 1, 1)]+=0.264080599771*x_ref[2]**o + (0.904300178402)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=-0.961751692412*x[2]**o + (-0.852351636219)*x[2]
+            ref[(3, 0, 2, 0)]+=-0.961751692412*x_ref[2]**o + (-0.852351636219)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=-0.790946538059*x[2]**o + (-0.93784809921)*x[2]
+            ref[(3, 0, 2, 1)]+=-0.790946538059*x_ref[2]**o + (-0.93784809921)*x_ref[2]
+            arg[(3, 0, 3, 0)]+=-0.0781178022087*x[2]**o + (-0.384188870904)*x[2]
+            ref[(3, 0, 3, 0)]+=-0.0781178022087*x_ref[2]**o + (-0.384188870904)*x_ref[2]
+            arg[(3, 0, 3, 1)]+=0.256626903608*x[2]**o + (0.450462945069)*x[2]
+            ref[(3, 0, 3, 1)]+=0.256626903608*x_ref[2]**o + (0.450462945069)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.144468810844*x[2]**o + (-0.07279416384)*x[2]
+            ref[(3, 1, 0, 0)]+=0.144468810844*x_ref[2]**o + (-0.07279416384)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.861231018269*x[2]**o + (-0.617932978396)*x[2]
+            ref[(3, 1, 0, 1)]+=0.861231018269*x_ref[2]**o + (-0.617932978396)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.407982333502*x[2]**o + (0.921394643559)*x[2]
+            ref[(3, 1, 1, 0)]+=0.407982333502*x_ref[2]**o + (0.921394643559)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=0.220695012537*x[2]**o + (-0.479154206361)*x[2]
+            ref[(3, 1, 1, 1)]+=0.220695012537*x_ref[2]**o + (-0.479154206361)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=-0.21541110253*x[2]**o + (0.115918122278)*x[2]
+            ref[(3, 1, 2, 0)]+=-0.21541110253*x_ref[2]**o + (0.115918122278)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=-0.333407799233*x[2]**o + (0.500125455685)*x[2]
+            ref[(3, 1, 2, 1)]+=-0.333407799233*x_ref[2]**o + (0.500125455685)*x_ref[2]
+            arg[(3, 1, 3, 0)]+=0.0167220036117*x[2]**o + (-0.723979538659)*x[2]
+            ref[(3, 1, 3, 0)]+=0.0167220036117*x_ref[2]**o + (-0.723979538659)*x_ref[2]
+            arg[(3, 1, 3, 1)]+=0.340194679741*x[2]**o + (0.55770654202)*x[2]
+            ref[(3, 1, 3, 1)]+=0.340194679741*x_ref[2]**o + (0.55770654202)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=-0.224726091811*x[2]**o + (-0.792547053082)*x[2]
+            ref[(3, 2, 0, 0)]+=-0.224726091811*x_ref[2]**o + (-0.792547053082)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=0.660690050714*x[2]**o + (0.013702963917)*x[2]
+            ref[(3, 2, 0, 1)]+=0.660690050714*x_ref[2]**o + (0.013702963917)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=-0.550403321102*x[2]**o + (-0.877073414416)*x[2]
+            ref[(3, 2, 1, 0)]+=-0.550403321102*x_ref[2]**o + (-0.877073414416)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=-0.878228057332*x[2]**o + (-0.672426824116)*x[2]
+            ref[(3, 2, 1, 1)]+=-0.878228057332*x_ref[2]**o + (-0.672426824116)*x_ref[2]
+            arg[(3, 2, 2, 0)]+=0.74024993705*x[2]**o + (-0.702779546232)*x[2]
+            ref[(3, 2, 2, 0)]+=0.74024993705*x_ref[2]**o + (-0.702779546232)*x_ref[2]
+            arg[(3, 2, 2, 1)]+=-0.712170241895*x[2]**o + (0.533493008977)*x[2]
+            ref[(3, 2, 2, 1)]+=-0.712170241895*x_ref[2]**o + (0.533493008977)*x_ref[2]
+            arg[(3, 2, 3, 0)]+=-0.441993775424*x[2]**o + (-0.537331107031)*x[2]
+            ref[(3, 2, 3, 0)]+=-0.441993775424*x_ref[2]**o + (-0.537331107031)*x_ref[2]
+            arg[(3, 2, 3, 1)]+=0.24036710936*x[2]**o + (-0.432207046628)*x[2]
+            ref[(3, 2, 3, 1)]+=0.24036710936*x_ref[2]**o + (-0.432207046628)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.460506983182*x[0]**o + (-0.0315124556713)*x[0] + (0.568863245029)*x[1]**o + (0.174009453423)*x[1]
+        ref=-0.460506983182*x_ref[0]**o + (-0.0315124556713)*x_ref[0] + (0.568863245029)*x_ref[1]**o + (0.174009453423)*x_ref[1]
+        if dim==3:
+            arg+=(-0.487138715435)*x[2]**o + (-0.546617942106)*x[2]
+            ref+=(-0.487138715435)*x_ref[2]**o + (-0.546617942106)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.109921105214*x[0]**o + (0.908219926224)*x[0] + (0.304443025754)*x[1]**o + (0.828523466771)*x[1]
+        ref[(0,)]=-0.109921105214*x_ref[0]**o + (0.908219926224)*x_ref[0] + (0.304443025754)*x_ref[1]**o + (0.828523466771)*x_ref[1]
+        arg[(1,)]=-0.922061763061*x[0]**o + (-0.912767766811)*x[0] + (-0.881741738003)*x[1]**o + (-0.275283871562)*x[1]
+        ref[(1,)]=-0.922061763061*x_ref[0]**o + (-0.912767766811)*x_ref[0] + (-0.881741738003)*x_ref[1]**o + (-0.275283871562)*x_ref[1]
+        arg[(2,)]=0.323167781697*x[0]**o + (-0.129451726207)*x[0] + (-0.0230619788372)*x[1]**o + (0.206462330204)*x[1]
+        ref[(2,)]=0.323167781697*x_ref[0]**o + (-0.129451726207)*x_ref[0] + (-0.0230619788372)*x_ref[1]**o + (0.206462330204)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.00463076004278*x[2]**o + (-0.340612937246)*x[2]
+            ref[(0,)]+=-0.00463076004278*x_ref[2]**o + (-0.340612937246)*x_ref[2]
+            arg[(1,)]+=0.971389713537*x[2]**o + (0.18461838059)*x[2]
+            ref[(1,)]+=0.971389713537*x_ref[2]**o + (0.18461838059)*x_ref[2]
+            arg[(2,)]+=-0.519236606038*x[2]**o + (0.612541424013)*x[2]
+            ref[(2,)]+=-0.519236606038*x_ref[2]**o + (0.612541424013)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=-0.0907993981655*x[0]**o + (0.995989633179)*x[0] + (0.689997689109)*x[1]**o + (-0.922862302034)*x[1]
+        ref[(0, 0)]=-0.0907993981655*x_ref[0]**o + (0.995989633179)*x_ref[0] + (0.689997689109)*x_ref[1]**o + (-0.922862302034)*x_ref[1]
+        arg[(0, 1)]=0.521931730788*x[0]**o + (0.686515669616)*x[0] + (0.258729470882)*x[1]**o + (0.103472325597)*x[1]
+        ref[(0, 1)]=0.521931730788*x_ref[0]**o + (0.686515669616)*x_ref[0] + (0.258729470882)*x_ref[1]**o + (0.103472325597)*x_ref[1]
+        arg[(0, 2)]=0.397315582529*x[0]**o + (-0.811717038853)*x[0] + (-0.160231586817)*x[1]**o + (0.105917133786)*x[1]
+        ref[(0, 2)]=0.397315582529*x_ref[0]**o + (-0.811717038853)*x_ref[0] + (-0.160231586817)*x_ref[1]**o + (0.105917133786)*x_ref[1]
+        arg[(1, 0)]=-0.882439284399*x[0]**o + (-0.715505986797)*x[0] + (0.368744297022)*x[1]**o + (-0.208356239672)*x[1]
+        ref[(1, 0)]=-0.882439284399*x_ref[0]**o + (-0.715505986797)*x_ref[0] + (0.368744297022)*x_ref[1]**o + (-0.208356239672)*x_ref[1]
+        arg[(1, 1)]=0.537520771731*x[0]**o + (-0.0752831129491)*x[0] + (0.802534209202)*x[1]**o + (0.832115819492)*x[1]
+        ref[(1, 1)]=0.537520771731*x_ref[0]**o + (-0.0752831129491)*x_ref[0] + (0.802534209202)*x_ref[1]**o + (0.832115819492)*x_ref[1]
+        arg[(1, 2)]=0.242329551524*x[0]**o + (-0.582096867504)*x[0] + (0.705823072377)*x[1]**o + (0.54662224635)*x[1]
+        ref[(1, 2)]=0.242329551524*x_ref[0]**o + (-0.582096867504)*x_ref[0] + (0.705823072377)*x_ref[1]**o + (0.54662224635)*x_ref[1]
+        arg[(2, 0)]=-0.180336866317*x[0]**o + (-0.912157887348)*x[0] + (0.728691428989)*x[1]**o + (-0.648114104766)*x[1]
+        ref[(2, 0)]=-0.180336866317*x_ref[0]**o + (-0.912157887348)*x_ref[0] + (0.728691428989)*x_ref[1]**o + (-0.648114104766)*x_ref[1]
+        arg[(2, 1)]=-0.492158682581*x[0]**o + (0.888797716245)*x[0] + (-0.411398029126)*x[1]**o + (0.00316490427563)*x[1]
+        ref[(2, 1)]=-0.492158682581*x_ref[0]**o + (0.888797716245)*x_ref[0] + (-0.411398029126)*x_ref[1]**o + (0.00316490427563)*x_ref[1]
+        arg[(2, 2)]=0.0769705592316*x[0]**o + (-0.848367183126)*x[0] + (-0.431768798461)*x[1]**o + (-0.968571805984)*x[1]
+        ref[(2, 2)]=0.0769705592316*x_ref[0]**o + (-0.848367183126)*x_ref[0] + (-0.431768798461)*x_ref[1]**o + (-0.968571805984)*x_ref[1]
+        arg[(3, 0)]=0.923266355695*x[0]**o + (-0.329014669687)*x[0] + (-0.614149970925)*x[1]**o + (0.265493217331)*x[1]
+        ref[(3, 0)]=0.923266355695*x_ref[0]**o + (-0.329014669687)*x_ref[0] + (-0.614149970925)*x_ref[1]**o + (0.265493217331)*x_ref[1]
+        arg[(3, 1)]=0.34007436076*x[0]**o + (-0.844549087545)*x[0] + (-0.439615991847)*x[1]**o + (-0.905611992849)*x[1]
+        ref[(3, 1)]=0.34007436076*x_ref[0]**o + (-0.844549087545)*x_ref[0] + (-0.439615991847)*x_ref[1]**o + (-0.905611992849)*x_ref[1]
+        arg[(3, 2)]=0.486050171793*x[0]**o + (-0.2764829559)*x[0] + (-0.45778528711)*x[1]**o + (-0.0774876989593)*x[1]
+        ref[(3, 2)]=0.486050171793*x_ref[0]**o + (-0.2764829559)*x_ref[0] + (-0.45778528711)*x_ref[1]**o + (-0.0774876989593)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.775416636241*x[2]**o + (0.840186764446)*x[2]
+            ref[(0, 0)]+=-0.775416636241*x_ref[2]**o + (0.840186764446)*x_ref[2]
+            arg[(0, 1)]+=-0.561535144351*x[2]**o + (-0.172939386499)*x[2]
+            ref[(0, 1)]+=-0.561535144351*x_ref[2]**o + (-0.172939386499)*x_ref[2]
+            arg[(0, 2)]+=-0.807303527267*x[2]**o + (-0.444265534044)*x[2]
+            ref[(0, 2)]+=-0.807303527267*x_ref[2]**o + (-0.444265534044)*x_ref[2]
+            arg[(1, 0)]+=-0.553391039111*x[2]**o + (-0.224816069005)*x[2]
+            ref[(1, 0)]+=-0.553391039111*x_ref[2]**o + (-0.224816069005)*x_ref[2]
+            arg[(1, 1)]+=-0.965039464271*x[2]**o + (0.872850759079)*x[2]
+            ref[(1, 1)]+=-0.965039464271*x_ref[2]**o + (0.872850759079)*x_ref[2]
+            arg[(1, 2)]+=0.709716954234*x[2]**o + (0.595764083276)*x[2]
+            ref[(1, 2)]+=0.709716954234*x_ref[2]**o + (0.595764083276)*x_ref[2]
+            arg[(2, 0)]+=-0.425510097121*x[2]**o + (0.738574539608)*x[2]
+            ref[(2, 0)]+=-0.425510097121*x_ref[2]**o + (0.738574539608)*x_ref[2]
+            arg[(2, 1)]+=0.738880180823*x[2]**o + (-0.17541896644)*x[2]
+            ref[(2, 1)]+=0.738880180823*x_ref[2]**o + (-0.17541896644)*x_ref[2]
+            arg[(2, 2)]+=0.31954672178*x[2]**o + (0.630066565596)*x[2]
+            ref[(2, 2)]+=0.31954672178*x_ref[2]**o + (0.630066565596)*x_ref[2]
+            arg[(3, 0)]+=-0.852544505248*x[2]**o + (0.730471067609)*x[2]
+            ref[(3, 0)]+=-0.852544505248*x_ref[2]**o + (0.730471067609)*x_ref[2]
+            arg[(3, 1)]+=0.412114127123*x[2]**o + (0.710320484489)*x[2]
+            ref[(3, 1)]+=0.412114127123*x_ref[2]**o + (0.710320484489)*x_ref[2]
+            arg[(3, 2)]+=0.529799607979*x[2]**o + (-0.113388212348)*x[2]
+            ref[(3, 2)]+=0.529799607979*x_ref[2]**o + (-0.113388212348)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3),w)
+        ref = Data(0,(3, 3, 3),w_ref)
+        arg[(0, 0, 0)]=-0.664483893477*x[0]**o + (-0.430737073416)*x[0] + (0.00142886652524)*x[1]**o + (0.338558553041)*x[1]
+        ref[(0, 0, 0)]=-0.664483893477*x_ref[0]**o + (-0.430737073416)*x_ref[0] + (0.00142886652524)*x_ref[1]**o + (0.338558553041)*x_ref[1]
+        arg[(0, 0, 1)]=0.124871776662*x[0]**o + (-0.976370944466)*x[0] + (0.745247343006)*x[1]**o + (-0.563592177173)*x[1]
+        ref[(0, 0, 1)]=0.124871776662*x_ref[0]**o + (-0.976370944466)*x_ref[0] + (0.745247343006)*x_ref[1]**o + (-0.563592177173)*x_ref[1]
+        arg[(0, 0, 2)]=-0.333357279813*x[0]**o + (0.149372991875)*x[0] + (-0.00730084774111)*x[1]**o + (0.940785427801)*x[1]
+        ref[(0, 0, 2)]=-0.333357279813*x_ref[0]**o + (0.149372991875)*x_ref[0] + (-0.00730084774111)*x_ref[1]**o + (0.940785427801)*x_ref[1]
+        arg[(0, 1, 0)]=-0.671033768449*x[0]**o + (0.36914667304)*x[0] + (0.0247816535897)*x[1]**o + (-0.977733917794)*x[1]
+        ref[(0, 1, 0)]=-0.671033768449*x_ref[0]**o + (0.36914667304)*x_ref[0] + (0.0247816535897)*x_ref[1]**o + (-0.977733917794)*x_ref[1]
+        arg[(0, 1, 1)]=0.691651353843*x[0]**o + (0.425763159634)*x[0] + (0.351852959819)*x[1]**o + (-0.480074036597)*x[1]
+        ref[(0, 1, 1)]=0.691651353843*x_ref[0]**o + (0.425763159634)*x_ref[0] + (0.351852959819)*x_ref[1]**o + (-0.480074036597)*x_ref[1]
+        arg[(0, 1, 2)]=0.311303431278*x[0]**o + (0.509884090324)*x[0] + (-0.186751065185)*x[1]**o + (-0.113102996462)*x[1]
+        ref[(0, 1, 2)]=0.311303431278*x_ref[0]**o + (0.509884090324)*x_ref[0] + (-0.186751065185)*x_ref[1]**o + (-0.113102996462)*x_ref[1]
+        arg[(0, 2, 0)]=-0.125544858418*x[0]**o + (-0.994150222958)*x[0] + (-0.103205284612)*x[1]**o + (-0.705171033348)*x[1]
+        ref[(0, 2, 0)]=-0.125544858418*x_ref[0]**o + (-0.994150222958)*x_ref[0] + (-0.103205284612)*x_ref[1]**o + (-0.705171033348)*x_ref[1]
+        arg[(0, 2, 1)]=-0.251662792119*x[0]**o + (-0.755231708128)*x[0] + (-0.00552024421247)*x[1]**o + (-0.360114313414)*x[1]
+        ref[(0, 2, 1)]=-0.251662792119*x_ref[0]**o + (-0.755231708128)*x_ref[0] + (-0.00552024421247)*x_ref[1]**o + (-0.360114313414)*x_ref[1]
+        arg[(0, 2, 2)]=-0.302256449995*x[0]**o + (0.0670814028013)*x[0] + (-0.986669657074)*x[1]**o + (0.877010298997)*x[1]
+        ref[(0, 2, 2)]=-0.302256449995*x_ref[0]**o + (0.0670814028013)*x_ref[0] + (-0.986669657074)*x_ref[1]**o + (0.877010298997)*x_ref[1]
+        arg[(1, 0, 0)]=0.0637339645773*x[0]**o + (-0.598180383754)*x[0] + (0.927699571106)*x[1]**o + (-0.998283811)*x[1]
+        ref[(1, 0, 0)]=0.0637339645773*x_ref[0]**o + (-0.598180383754)*x_ref[0] + (0.927699571106)*x_ref[1]**o + (-0.998283811)*x_ref[1]
+        arg[(1, 0, 1)]=-0.869532020757*x[0]**o + (0.592870307159)*x[0] + (-0.595098544923)*x[1]**o + (0.24739681912)*x[1]
+        ref[(1, 0, 1)]=-0.869532020757*x_ref[0]**o + (0.592870307159)*x_ref[0] + (-0.595098544923)*x_ref[1]**o + (0.24739681912)*x_ref[1]
+        arg[(1, 0, 2)]=0.232396753221*x[0]**o + (0.500780922019)*x[0] + (0.225886993137)*x[1]**o + (0.791930251635)*x[1]
+        ref[(1, 0, 2)]=0.232396753221*x_ref[0]**o + (0.500780922019)*x_ref[0] + (0.225886993137)*x_ref[1]**o + (0.791930251635)*x_ref[1]
+        arg[(1, 1, 0)]=0.483970504201*x[0]**o + (0.73182316421)*x[0] + (0.539255322245)*x[1]**o + (-0.525199021929)*x[1]
+        ref[(1, 1, 0)]=0.483970504201*x_ref[0]**o + (0.73182316421)*x_ref[0] + (0.539255322245)*x_ref[1]**o + (-0.525199021929)*x_ref[1]
+        arg[(1, 1, 1)]=-0.679194944218*x[0]**o + (0.749389280046)*x[0] + (-0.791208103959)*x[1]**o + (-0.857700750527)*x[1]
+        ref[(1, 1, 1)]=-0.679194944218*x_ref[0]**o + (0.749389280046)*x_ref[0] + (-0.791208103959)*x_ref[1]**o + (-0.857700750527)*x_ref[1]
+        arg[(1, 1, 2)]=0.04591626694*x[0]**o + (-0.21344491425)*x[0] + (-0.113217493315)*x[1]**o + (0.330931888619)*x[1]
+        ref[(1, 1, 2)]=0.04591626694*x_ref[0]**o + (-0.21344491425)*x_ref[0] + (-0.113217493315)*x_ref[1]**o + (0.330931888619)*x_ref[1]
+        arg[(1, 2, 0)]=-0.930054740891*x[0]**o + (0.318978239584)*x[0] + (-0.100087997473)*x[1]**o + (-0.0281821887486)*x[1]
+        ref[(1, 2, 0)]=-0.930054740891*x_ref[0]**o + (0.318978239584)*x_ref[0] + (-0.100087997473)*x_ref[1]**o + (-0.0281821887486)*x_ref[1]
+        arg[(1, 2, 1)]=0.493244016646*x[0]**o + (-0.964588607658)*x[0] + (0.0408579362572)*x[1]**o + (0.694116124548)*x[1]
+        ref[(1, 2, 1)]=0.493244016646*x_ref[0]**o + (-0.964588607658)*x_ref[0] + (0.0408579362572)*x_ref[1]**o + (0.694116124548)*x_ref[1]
+        arg[(1, 2, 2)]=-0.766230811185*x[0]**o + (-0.638186036839)*x[0] + (0.54197429726)*x[1]**o + (-0.509105244424)*x[1]
+        ref[(1, 2, 2)]=-0.766230811185*x_ref[0]**o + (-0.638186036839)*x_ref[0] + (0.54197429726)*x_ref[1]**o + (-0.509105244424)*x_ref[1]
+        arg[(2, 0, 0)]=0.817154147589*x[0]**o + (-0.613243951679)*x[0] + (-0.451404542398)*x[1]**o + (-0.629666127141)*x[1]
+        ref[(2, 0, 0)]=0.817154147589*x_ref[0]**o + (-0.613243951679)*x_ref[0] + (-0.451404542398)*x_ref[1]**o + (-0.629666127141)*x_ref[1]
+        arg[(2, 0, 1)]=0.419334942848*x[0]**o + (0.94700763663)*x[0] + (-0.19014144992)*x[1]**o + (-0.848272338476)*x[1]
+        ref[(2, 0, 1)]=0.419334942848*x_ref[0]**o + (0.94700763663)*x_ref[0] + (-0.19014144992)*x_ref[1]**o + (-0.848272338476)*x_ref[1]
+        arg[(2, 0, 2)]=0.132709863671*x[0]**o + (0.966075425354)*x[0] + (0.950355090091)*x[1]**o + (-0.487635572336)*x[1]
+        ref[(2, 0, 2)]=0.132709863671*x_ref[0]**o + (0.966075425354)*x_ref[0] + (0.950355090091)*x_ref[1]**o + (-0.487635572336)*x_ref[1]
+        arg[(2, 1, 0)]=-0.925278434803*x[0]**o + (-0.063599891605)*x[0] + (0.16077519826)*x[1]**o + (0.240445530795)*x[1]
+        ref[(2, 1, 0)]=-0.925278434803*x_ref[0]**o + (-0.063599891605)*x_ref[0] + (0.16077519826)*x_ref[1]**o + (0.240445530795)*x_ref[1]
+        arg[(2, 1, 1)]=0.580172472374*x[0]**o + (-0.492131701112)*x[0] + (-0.70784064322)*x[1]**o + (0.784269631079)*x[1]
+        ref[(2, 1, 1)]=0.580172472374*x_ref[0]**o + (-0.492131701112)*x_ref[0] + (-0.70784064322)*x_ref[1]**o + (0.784269631079)*x_ref[1]
+        arg[(2, 1, 2)]=-0.398133193826*x[0]**o + (0.188204516138)*x[0] + (0.183246225485)*x[1]**o + (-0.722433531209)*x[1]
+        ref[(2, 1, 2)]=-0.398133193826*x_ref[0]**o + (0.188204516138)*x_ref[0] + (0.183246225485)*x_ref[1]**o + (-0.722433531209)*x_ref[1]
+        arg[(2, 2, 0)]=0.624411859651*x[0]**o + (0.950130839395)*x[0] + (0.297980846822)*x[1]**o + (0.182055824778)*x[1]
+        ref[(2, 2, 0)]=0.624411859651*x_ref[0]**o + (0.950130839395)*x_ref[0] + (0.297980846822)*x_ref[1]**o + (0.182055824778)*x_ref[1]
+        arg[(2, 2, 1)]=0.730688782803*x[0]**o + (-0.00212278703963)*x[0] + (-0.590154018486)*x[1]**o + (0.650298362868)*x[1]
+        ref[(2, 2, 1)]=0.730688782803*x_ref[0]**o + (-0.00212278703963)*x_ref[0] + (-0.590154018486)*x_ref[1]**o + (0.650298362868)*x_ref[1]
+        arg[(2, 2, 2)]=0.695776099862*x[0]**o + (0.640301517473)*x[0] + (0.920669469431)*x[1]**o + (-0.399942391986)*x[1]
+        ref[(2, 2, 2)]=0.695776099862*x_ref[0]**o + (0.640301517473)*x_ref[0] + (0.920669469431)*x_ref[1]**o + (-0.399942391986)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.391703322504*x[2]**o + (-0.604589345635)*x[2]
+            ref[(0, 0, 0)]+=-0.391703322504*x_ref[2]**o + (-0.604589345635)*x_ref[2]
+            arg[(0, 0, 1)]+=0.857081619768*x[2]**o + (0.312086409831)*x[2]
+            ref[(0, 0, 1)]+=0.857081619768*x_ref[2]**o + (0.312086409831)*x_ref[2]
+            arg[(0, 0, 2)]+=0.250996440434*x[2]**o + (0.309422440642)*x[2]
+            ref[(0, 0, 2)]+=0.250996440434*x_ref[2]**o + (0.309422440642)*x_ref[2]
+            arg[(0, 1, 0)]+=0.583782050518*x[2]**o + (-0.880017429269)*x[2]
+            ref[(0, 1, 0)]+=0.583782050518*x_ref[2]**o + (-0.880017429269)*x_ref[2]
+            arg[(0, 1, 1)]+=0.0494860055995*x[2]**o + (-0.262820834673)*x[2]
+            ref[(0, 1, 1)]+=0.0494860055995*x_ref[2]**o + (-0.262820834673)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.25128597897*x[2]**o + (0.915616914552)*x[2]
+            ref[(0, 1, 2)]+=-0.25128597897*x_ref[2]**o + (0.915616914552)*x_ref[2]
+            arg[(0, 2, 0)]+=0.763052698398*x[2]**o + (-0.184670042804)*x[2]
+            ref[(0, 2, 0)]+=0.763052698398*x_ref[2]**o + (-0.184670042804)*x_ref[2]
+            arg[(0, 2, 1)]+=0.567049671762*x[2]**o + (-0.0609642405173)*x[2]
+            ref[(0, 2, 1)]+=0.567049671762*x_ref[2]**o + (-0.0609642405173)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.822244908559*x[2]**o + (-0.870546497508)*x[2]
+            ref[(0, 2, 2)]+=-0.822244908559*x_ref[2]**o + (-0.870546497508)*x_ref[2]
+            arg[(1, 0, 0)]+=0.356313882107*x[2]**o + (-0.452006434768)*x[2]
+            ref[(1, 0, 0)]+=0.356313882107*x_ref[2]**o + (-0.452006434768)*x_ref[2]
+            arg[(1, 0, 1)]+=0.909919876129*x[2]**o + (-0.626900512848)*x[2]
+            ref[(1, 0, 1)]+=0.909919876129*x_ref[2]**o + (-0.626900512848)*x_ref[2]
+            arg[(1, 0, 2)]+=0.366959224639*x[2]**o + (0.305977295124)*x[2]
+            ref[(1, 0, 2)]+=0.366959224639*x_ref[2]**o + (0.305977295124)*x_ref[2]
+            arg[(1, 1, 0)]+=0.478709055411*x[2]**o + (-0.286365526821)*x[2]
+            ref[(1, 1, 0)]+=0.478709055411*x_ref[2]**o + (-0.286365526821)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.779229553919*x[2]**o + (0.259100123412)*x[2]
+            ref[(1, 1, 1)]+=-0.779229553919*x_ref[2]**o + (0.259100123412)*x_ref[2]
+            arg[(1, 1, 2)]+=0.157850404396*x[2]**o + (0.134971088297)*x[2]
+            ref[(1, 1, 2)]+=0.157850404396*x_ref[2]**o + (0.134971088297)*x_ref[2]
+            arg[(1, 2, 0)]+=0.206669465821*x[2]**o + (0.139279971478)*x[2]
+            ref[(1, 2, 0)]+=0.206669465821*x_ref[2]**o + (0.139279971478)*x_ref[2]
+            arg[(1, 2, 1)]+=-0.227621269177*x[2]**o + (0.179447513775)*x[2]
+            ref[(1, 2, 1)]+=-0.227621269177*x_ref[2]**o + (0.179447513775)*x_ref[2]
+            arg[(1, 2, 2)]+=0.308642897542*x[2]**o + (-0.453706521122)*x[2]
+            ref[(1, 2, 2)]+=0.308642897542*x_ref[2]**o + (-0.453706521122)*x_ref[2]
+            arg[(2, 0, 0)]+=0.292302937564*x[2]**o + (-0.168729853319)*x[2]
+            ref[(2, 0, 0)]+=0.292302937564*x_ref[2]**o + (-0.168729853319)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.0132751859233*x[2]**o + (0.855984026591)*x[2]
+            ref[(2, 0, 1)]+=-0.0132751859233*x_ref[2]**o + (0.855984026591)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.287922545269*x[2]**o + (0.0540766144417)*x[2]
+            ref[(2, 0, 2)]+=-0.287922545269*x_ref[2]**o + (0.0540766144417)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.417913814793*x[2]**o + (0.413915918508)*x[2]
+            ref[(2, 1, 0)]+=-0.417913814793*x_ref[2]**o + (0.413915918508)*x_ref[2]
+            arg[(2, 1, 1)]+=0.201135274079*x[2]**o + (0.0463863756525)*x[2]
+            ref[(2, 1, 1)]+=0.201135274079*x_ref[2]**o + (0.0463863756525)*x_ref[2]
+            arg[(2, 1, 2)]+=0.0238418328929*x[2]**o + (-0.117350506498)*x[2]
+            ref[(2, 1, 2)]+=0.0238418328929*x_ref[2]**o + (-0.117350506498)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.976790062517*x[2]**o + (-0.535534084457)*x[2]
+            ref[(2, 2, 0)]+=-0.976790062517*x_ref[2]**o + (-0.535534084457)*x_ref[2]
+            arg[(2, 2, 1)]+=0.758425091197*x[2]**o + (-0.717645413934)*x[2]
+            ref[(2, 2, 1)]+=0.758425091197*x_ref[2]**o + (-0.717645413934)*x_ref[2]
+            arg[(2, 2, 2)]+=-0.467230005129*x[2]**o + (0.741392088429)*x[2]
+            ref[(2, 2, 2)]+=-0.467230005129*x_ref[2]**o + (0.741392088429)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3, 2),w)
+        ref = Data(0,(2, 2, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.91640819205*x[0]**o + (0.215434872556)*x[0] + (0.733776716312)*x[1]**o + (-0.0747050851868)*x[1]
+        ref[(0, 0, 0, 0)]=0.91640819205*x_ref[0]**o + (0.215434872556)*x_ref[0] + (0.733776716312)*x_ref[1]**o + (-0.0747050851868)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.102993523837*x[0]**o + (0.865745001962)*x[0] + (0.219229794737)*x[1]**o + (0.324424103111)*x[1]
+        ref[(0, 0, 0, 1)]=-0.102993523837*x_ref[0]**o + (0.865745001962)*x_ref[0] + (0.219229794737)*x_ref[1]**o + (0.324424103111)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.460331811701*x[0]**o + (0.0493186261371)*x[0] + (-0.729006250545)*x[1]**o + (0.48979134701)*x[1]
+        ref[(0, 0, 1, 0)]=-0.460331811701*x_ref[0]**o + (0.0493186261371)*x_ref[0] + (-0.729006250545)*x_ref[1]**o + (0.48979134701)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.211342242159*x[0]**o + (0.109509666312)*x[0] + (-0.702835151984)*x[1]**o + (-0.0161156277758)*x[1]
+        ref[(0, 0, 1, 1)]=0.211342242159*x_ref[0]**o + (0.109509666312)*x_ref[0] + (-0.702835151984)*x_ref[1]**o + (-0.0161156277758)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.458159837862*x[0]**o + (-0.031450624425)*x[0] + (0.573366900422)*x[1]**o + (-0.959502013064)*x[1]
+        ref[(0, 0, 2, 0)]=-0.458159837862*x_ref[0]**o + (-0.031450624425)*x_ref[0] + (0.573366900422)*x_ref[1]**o + (-0.959502013064)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.370746050651*x[0]**o + (0.0226010807303)*x[0] + (-0.0512766805494)*x[1]**o + (0.777023192213)*x[1]
+        ref[(0, 0, 2, 1)]=0.370746050651*x_ref[0]**o + (0.0226010807303)*x_ref[0] + (-0.0512766805494)*x_ref[1]**o + (0.777023192213)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.31309491391*x[0]**o + (0.634723618536)*x[0] + (0.966112516611)*x[1]**o + (0.0700405118504)*x[1]
+        ref[(0, 1, 0, 0)]=-0.31309491391*x_ref[0]**o + (0.634723618536)*x_ref[0] + (0.966112516611)*x_ref[1]**o + (0.0700405118504)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.932573524874*x[0]**o + (-0.824504470334)*x[0] + (0.326529872373)*x[1]**o + (-0.99478594286)*x[1]
+        ref[(0, 1, 0, 1)]=-0.932573524874*x_ref[0]**o + (-0.824504470334)*x_ref[0] + (0.326529872373)*x_ref[1]**o + (-0.99478594286)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.483918660693*x[0]**o + (-0.828244645181)*x[0] + (0.453408739178)*x[1]**o + (-0.80395572859)*x[1]
+        ref[(0, 1, 1, 0)]=-0.483918660693*x_ref[0]**o + (-0.828244645181)*x_ref[0] + (0.453408739178)*x_ref[1]**o + (-0.80395572859)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.297193544989*x[0]**o + (-0.525637572574)*x[0] + (0.446816516369)*x[1]**o + (-0.391986524471)*x[1]
+        ref[(0, 1, 1, 1)]=-0.297193544989*x_ref[0]**o + (-0.525637572574)*x_ref[0] + (0.446816516369)*x_ref[1]**o + (-0.391986524471)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.657931485218*x[0]**o + (0.940275884578)*x[0] + (0.593857376859)*x[1]**o + (-0.405242941213)*x[1]
+        ref[(0, 1, 2, 0)]=-0.657931485218*x_ref[0]**o + (0.940275884578)*x_ref[0] + (0.593857376859)*x_ref[1]**o + (-0.405242941213)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.889415012373*x[0]**o + (-0.397419076787)*x[0] + (0.601832331052)*x[1]**o + (0.331750521497)*x[1]
+        ref[(0, 1, 2, 1)]=0.889415012373*x_ref[0]**o + (-0.397419076787)*x_ref[0] + (0.601832331052)*x_ref[1]**o + (0.331750521497)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.677165774363*x[0]**o + (-0.373063199031)*x[0] + (0.753088834489)*x[1]**o + (0.822047736071)*x[1]
+        ref[(1, 0, 0, 0)]=-0.677165774363*x_ref[0]**o + (-0.373063199031)*x_ref[0] + (0.753088834489)*x_ref[1]**o + (0.822047736071)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.929759516075*x[0]**o + (-0.835024732246)*x[0] + (0.967747935595)*x[1]**o + (0.941952793666)*x[1]
+        ref[(1, 0, 0, 1)]=0.929759516075*x_ref[0]**o + (-0.835024732246)*x_ref[0] + (0.967747935595)*x_ref[1]**o + (0.941952793666)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.949879415833*x[0]**o + (0.305664186956)*x[0] + (-0.403398746782)*x[1]**o + (0.27042828586)*x[1]
+        ref[(1, 0, 1, 0)]=-0.949879415833*x_ref[0]**o + (0.305664186956)*x_ref[0] + (-0.403398746782)*x_ref[1]**o + (0.27042828586)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.947655918268*x[0]**o + (0.000909221729522)*x[0] + (-0.608729601352)*x[1]**o + (-0.807021305271)*x[1]
+        ref[(1, 0, 1, 1)]=0.947655918268*x_ref[0]**o + (0.000909221729522)*x_ref[0] + (-0.608729601352)*x_ref[1]**o + (-0.807021305271)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.131991960594*x[0]**o + (0.877153917771)*x[0] + (-0.00703251353667)*x[1]**o + (-0.99002071054)*x[1]
+        ref[(1, 0, 2, 0)]=0.131991960594*x_ref[0]**o + (0.877153917771)*x_ref[0] + (-0.00703251353667)*x_ref[1]**o + (-0.99002071054)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.389268048188*x[0]**o + (-0.0809611329837)*x[0] + (0.680794463813)*x[1]**o + (0.779464738348)*x[1]
+        ref[(1, 0, 2, 1)]=0.389268048188*x_ref[0]**o + (-0.0809611329837)*x_ref[0] + (0.680794463813)*x_ref[1]**o + (0.779464738348)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.57942657995*x[0]**o + (-0.524569306294)*x[0] + (-0.263748678486)*x[1]**o + (0.33846601202)*x[1]
+        ref[(1, 1, 0, 0)]=0.57942657995*x_ref[0]**o + (-0.524569306294)*x_ref[0] + (-0.263748678486)*x_ref[1]**o + (0.33846601202)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.439644523052*x[0]**o + (-0.0250854592353)*x[0] + (0.478699808085)*x[1]**o + (0.152617480345)*x[1]
+        ref[(1, 1, 0, 1)]=-0.439644523052*x_ref[0]**o + (-0.0250854592353)*x_ref[0] + (0.478699808085)*x_ref[1]**o + (0.152617480345)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.996967183772*x[0]**o + (-0.649969058393)*x[0] + (0.574281643214)*x[1]**o + (-0.92179151654)*x[1]
+        ref[(1, 1, 1, 0)]=0.996967183772*x_ref[0]**o + (-0.649969058393)*x_ref[0] + (0.574281643214)*x_ref[1]**o + (-0.92179151654)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.434590859389*x[0]**o + (-0.22461153986)*x[0] + (0.122972451814)*x[1]**o + (0.0128844765431)*x[1]
+        ref[(1, 1, 1, 1)]=-0.434590859389*x_ref[0]**o + (-0.22461153986)*x_ref[0] + (0.122972451814)*x_ref[1]**o + (0.0128844765431)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.352403363338*x[0]**o + (0.986424520031)*x[0] + (0.405426808052)*x[1]**o + (0.41744006638)*x[1]
+        ref[(1, 1, 2, 0)]=0.352403363338*x_ref[0]**o + (0.986424520031)*x_ref[0] + (0.405426808052)*x_ref[1]**o + (0.41744006638)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.148887586638*x[0]**o + (-0.299514019228)*x[0] + (-0.670558295083)*x[1]**o + (0.252929225729)*x[1]
+        ref[(1, 1, 2, 1)]=-0.148887586638*x_ref[0]**o + (-0.299514019228)*x_ref[0] + (-0.670558295083)*x_ref[1]**o + (0.252929225729)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.0841996608325*x[2]**o + (-0.193839439278)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.0841996608325*x_ref[2]**o + (-0.193839439278)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.291367136557*x[2]**o + (0.948727138088)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.291367136557*x_ref[2]**o + (0.948727138088)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.224039220934*x[2]**o + (-0.214470870253)*x[2]
+            ref[(0, 0, 1, 0)]+=0.224039220934*x_ref[2]**o + (-0.214470870253)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.999770014097*x[2]**o + (-0.617367584123)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.999770014097*x_ref[2]**o + (-0.617367584123)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.83707128569*x[2]**o + (0.0450365626193)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.83707128569*x_ref[2]**o + (0.0450365626193)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.41939522936*x[2]**o + (0.164038626149)*x[2]
+            ref[(0, 0, 2, 1)]+=0.41939522936*x_ref[2]**o + (0.164038626149)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.493716902118*x[2]**o + (0.583903086422)*x[2]
+            ref[(0, 1, 0, 0)]+=0.493716902118*x_ref[2]**o + (0.583903086422)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.0891866518462*x[2]**o + (-0.396559819516)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.0891866518462*x_ref[2]**o + (-0.396559819516)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.728499317661*x[2]**o + (-0.377817579175)*x[2]
+            ref[(0, 1, 1, 0)]+=0.728499317661*x_ref[2]**o + (-0.377817579175)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.929448480324*x[2]**o + (0.703037708781)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.929448480324*x_ref[2]**o + (0.703037708781)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.276194977341*x[2]**o + (0.923054722856)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.276194977341*x_ref[2]**o + (0.923054722856)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.475157420579*x[2]**o + (0.617419844385)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.475157420579*x_ref[2]**o + (0.617419844385)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.720046977963*x[2]**o + (0.577534765042)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.720046977963*x_ref[2]**o + (0.577534765042)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.261424098581*x[2]**o + (0.810808952822)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.261424098581*x_ref[2]**o + (0.810808952822)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.538914043683*x[2]**o + (0.329658542247)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.538914043683*x_ref[2]**o + (0.329658542247)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.106160994354*x[2]**o + (-0.208892829532)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.106160994354*x_ref[2]**o + (-0.208892829532)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.917280553887*x[2]**o + (-0.332424616919)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.917280553887*x_ref[2]**o + (-0.332424616919)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.413771105531*x[2]**o + (0.11939902132)*x[2]
+            ref[(1, 0, 2, 1)]+=0.413771105531*x_ref[2]**o + (0.11939902132)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.586856869727*x[2]**o + (-0.0272193682724)*x[2]
+            ref[(1, 1, 0, 0)]+=0.586856869727*x_ref[2]**o + (-0.0272193682724)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.453639670216*x[2]**o + (-0.0901891560676)*x[2]
+            ref[(1, 1, 0, 1)]+=0.453639670216*x_ref[2]**o + (-0.0901891560676)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.533903774655*x[2]**o + (0.282068417271)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.533903774655*x_ref[2]**o + (0.282068417271)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.114559859286*x[2]**o + (0.886156093912)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.114559859286*x_ref[2]**o + (0.886156093912)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.218736452171*x[2]**o + (0.450715845465)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.218736452171*x_ref[2]**o + (0.450715845465)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.0664767165792*x[2]**o + (0.607039752965)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.0664767165792*x_ref[2]**o + (0.607039752965)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.229521524864*x[0]**o + (-0.658894069806)*x[0] + (0.366690206055)*x[1]**o + (0.725813613996)*x[1]
+        ref=0.229521524864*x_ref[0]**o + (-0.658894069806)*x_ref[0] + (0.366690206055)*x_ref[1]**o + (0.725813613996)*x_ref[1]
+        if dim==3:
+            arg+=(0.892939705971)*x[2]**o + (0.532756576087)*x[2]
+            ref+=(0.892939705971)*x_ref[2]**o + (0.532756576087)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=0.30498969699*x[0]**o + (0.292791410601)*x[0] + (-0.94306046968)*x[1]**o + (-0.144719030513)*x[1]
+        ref[(0,)]=0.30498969699*x_ref[0]**o + (0.292791410601)*x_ref[0] + (-0.94306046968)*x_ref[1]**o + (-0.144719030513)*x_ref[1]
+        arg[(1,)]=-0.690753614222*x[0]**o + (-0.294188650607)*x[0] + (-0.311869279705)*x[1]**o + (0.134209921354)*x[1]
+        ref[(1,)]=-0.690753614222*x_ref[0]**o + (-0.294188650607)*x_ref[0] + (-0.311869279705)*x_ref[1]**o + (0.134209921354)*x_ref[1]
+        arg[(2,)]=0.623697364139*x[0]**o + (-0.0580995794245)*x[0] + (-0.140943776334)*x[1]**o + (0.505008392338)*x[1]
+        ref[(2,)]=0.623697364139*x_ref[0]**o + (-0.0580995794245)*x_ref[0] + (-0.140943776334)*x_ref[1]**o + (0.505008392338)*x_ref[1]
+        arg[(3,)]=0.526324510239*x[0]**o + (-0.633948435587)*x[0] + (-0.616778211732)*x[1]**o + (0.325551353581)*x[1]
+        ref[(3,)]=0.526324510239*x_ref[0]**o + (-0.633948435587)*x_ref[0] + (-0.616778211732)*x_ref[1]**o + (0.325551353581)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.474166674608*x[2]**o + (-0.409863773168)*x[2]
+            ref[(0,)]+=-0.474166674608*x_ref[2]**o + (-0.409863773168)*x_ref[2]
+            arg[(1,)]+=0.469736963188*x[2]**o + (-0.954846121093)*x[2]
+            ref[(1,)]+=0.469736963188*x_ref[2]**o + (-0.954846121093)*x_ref[2]
+            arg[(2,)]+=-0.735921883298*x[2]**o + (-0.130751335249)*x[2]
+            ref[(2,)]+=-0.735921883298*x_ref[2]**o + (-0.130751335249)*x_ref[2]
+            arg[(3,)]+=0.0698963353204*x[2]**o + (0.749889288849)*x[2]
+            ref[(3,)]+=0.0698963353204*x_ref[2]**o + (0.749889288849)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=-0.0545972766312*x[0]**o + (-0.717152773697)*x[0] + (-0.888044603449)*x[1]**o + (-0.0228838662369)*x[1]
+        ref[(0, 0)]=-0.0545972766312*x_ref[0]**o + (-0.717152773697)*x_ref[0] + (-0.888044603449)*x_ref[1]**o + (-0.0228838662369)*x_ref[1]
+        arg[(0, 1)]=-0.111519608763*x[0]**o + (-0.332305540549)*x[0] + (0.0473048170059)*x[1]**o + (-0.699825575851)*x[1]
+        ref[(0, 1)]=-0.111519608763*x_ref[0]**o + (-0.332305540549)*x_ref[0] + (0.0473048170059)*x_ref[1]**o + (-0.699825575851)*x_ref[1]
+        arg[(1, 0)]=-0.0660644897544*x[0]**o + (-0.809356663774)*x[0] + (0.681283210462)*x[1]**o + (0.321293223906)*x[1]
+        ref[(1, 0)]=-0.0660644897544*x_ref[0]**o + (-0.809356663774)*x_ref[0] + (0.681283210462)*x_ref[1]**o + (0.321293223906)*x_ref[1]
+        arg[(1, 1)]=0.902507978678*x[0]**o + (-0.811354837802)*x[0] + (0.78296335701)*x[1]**o + (0.687450971134)*x[1]
+        ref[(1, 1)]=0.902507978678*x_ref[0]**o + (-0.811354837802)*x_ref[0] + (0.78296335701)*x_ref[1]**o + (0.687450971134)*x_ref[1]
+        arg[(2, 0)]=-0.288488239445*x[0]**o + (-0.0932617998688)*x[0] + (-0.00977877259988)*x[1]**o + (-0.0649264361719)*x[1]
+        ref[(2, 0)]=-0.288488239445*x_ref[0]**o + (-0.0932617998688)*x_ref[0] + (-0.00977877259988)*x_ref[1]**o + (-0.0649264361719)*x_ref[1]
+        arg[(2, 1)]=-0.190322087748*x[0]**o + (-0.848650215735)*x[0] + (-0.108705903497)*x[1]**o + (0.213609562917)*x[1]
+        ref[(2, 1)]=-0.190322087748*x_ref[0]**o + (-0.848650215735)*x_ref[0] + (-0.108705903497)*x_ref[1]**o + (0.213609562917)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.505219681754*x[2]**o + (0.676966462967)*x[2]
+            ref[(0, 0)]+=0.505219681754*x_ref[2]**o + (0.676966462967)*x_ref[2]
+            arg[(0, 1)]+=0.021808398458*x[2]**o + (0.0483310029626)*x[2]
+            ref[(0, 1)]+=0.021808398458*x_ref[2]**o + (0.0483310029626)*x_ref[2]
+            arg[(1, 0)]+=0.0838659921824*x[2]**o + (0.491349362833)*x[2]
+            ref[(1, 0)]+=0.0838659921824*x_ref[2]**o + (0.491349362833)*x_ref[2]
+            arg[(1, 1)]+=-0.815976917621*x[2]**o + (-0.676820833574)*x[2]
+            ref[(1, 1)]+=-0.815976917621*x_ref[2]**o + (-0.676820833574)*x_ref[2]
+            arg[(2, 0)]+=-0.386591411543*x[2]**o + (0.652759065822)*x[2]
+            ref[(2, 0)]+=-0.386591411543*x_ref[2]**o + (0.652759065822)*x_ref[2]
+            arg[(2, 1)]+=0.320943080448*x[2]**o + (0.0157677624937)*x[2]
+            ref[(2, 1)]+=0.320943080448*x_ref[2]**o + (0.0157677624937)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2),w_ref)
+        arg[(0, 0, 0)]=0.933728527772*x[0]**o + (0.201413157108)*x[0] + (-0.160400047964)*x[1]**o + (0.543925937252)*x[1]
+        ref[(0, 0, 0)]=0.933728527772*x_ref[0]**o + (0.201413157108)*x_ref[0] + (-0.160400047964)*x_ref[1]**o + (0.543925937252)*x_ref[1]
+        arg[(0, 0, 1)]=0.313725831183*x[0]**o + (-0.647027758473)*x[0] + (-0.629839931605)*x[1]**o + (-0.111195622404)*x[1]
+        ref[(0, 0, 1)]=0.313725831183*x_ref[0]**o + (-0.647027758473)*x_ref[0] + (-0.629839931605)*x_ref[1]**o + (-0.111195622404)*x_ref[1]
+        arg[(0, 1, 0)]=0.0145570582943*x[0]**o + (-0.874658664881)*x[0] + (0.314478251152)*x[1]**o + (0.0485000605032)*x[1]
+        ref[(0, 1, 0)]=0.0145570582943*x_ref[0]**o + (-0.874658664881)*x_ref[0] + (0.314478251152)*x_ref[1]**o + (0.0485000605032)*x_ref[1]
+        arg[(0, 1, 1)]=-0.665104712786*x[0]**o + (0.844719882124)*x[0] + (-0.478488059084)*x[1]**o + (0.153330714319)*x[1]
+        ref[(0, 1, 1)]=-0.665104712786*x_ref[0]**o + (0.844719882124)*x_ref[0] + (-0.478488059084)*x_ref[1]**o + (0.153330714319)*x_ref[1]
+        arg[(1, 0, 0)]=-0.275683140181*x[0]**o + (0.262992917051)*x[0] + (0.25410394444)*x[1]**o + (-0.0989564411888)*x[1]
+        ref[(1, 0, 0)]=-0.275683140181*x_ref[0]**o + (0.262992917051)*x_ref[0] + (0.25410394444)*x_ref[1]**o + (-0.0989564411888)*x_ref[1]
+        arg[(1, 0, 1)]=0.649165915015*x[0]**o + (0.766981713532)*x[0] + (0.910302011827)*x[1]**o + (-0.0317553282085)*x[1]
+        ref[(1, 0, 1)]=0.649165915015*x_ref[0]**o + (0.766981713532)*x_ref[0] + (0.910302011827)*x_ref[1]**o + (-0.0317553282085)*x_ref[1]
+        arg[(1, 1, 0)]=0.504384011843*x[0]**o + (-0.530215631638)*x[0] + (0.313224059566)*x[1]**o + (0.148589339392)*x[1]
+        ref[(1, 1, 0)]=0.504384011843*x_ref[0]**o + (-0.530215631638)*x_ref[0] + (0.313224059566)*x_ref[1]**o + (0.148589339392)*x_ref[1]
+        arg[(1, 1, 1)]=-0.506774675464*x[0]**o + (-0.72916056267)*x[0] + (0.594297498878)*x[1]**o + (0.303352517226)*x[1]
+        ref[(1, 1, 1)]=-0.506774675464*x_ref[0]**o + (-0.72916056267)*x_ref[0] + (0.594297498878)*x_ref[1]**o + (0.303352517226)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.392414786949*x[2]**o + (0.621471085049)*x[2]
+            ref[(0, 0, 0)]+=0.392414786949*x_ref[2]**o + (0.621471085049)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.198901534873*x[2]**o + (-0.578133706675)*x[2]
+            ref[(0, 0, 1)]+=-0.198901534873*x_ref[2]**o + (-0.578133706675)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.590388390106*x[2]**o + (0.4946582539)*x[2]
+            ref[(0, 1, 0)]+=-0.590388390106*x_ref[2]**o + (0.4946582539)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.744982347077*x[2]**o + (0.275534145982)*x[2]
+            ref[(0, 1, 1)]+=-0.744982347077*x_ref[2]**o + (0.275534145982)*x_ref[2]
+            arg[(1, 0, 0)]+=0.710138010958*x[2]**o + (-0.568939065768)*x[2]
+            ref[(1, 0, 0)]+=0.710138010958*x_ref[2]**o + (-0.568939065768)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.85128367036*x[2]**o + (-0.399468714796)*x[2]
+            ref[(1, 0, 1)]+=-0.85128367036*x_ref[2]**o + (-0.399468714796)*x_ref[2]
+            arg[(1, 1, 0)]+=0.481252905983*x[2]**o + (-0.327307381274)*x[2]
+            ref[(1, 1, 0)]+=0.481252905983*x_ref[2]**o + (-0.327307381274)*x_ref[2]
+            arg[(1, 1, 1)]+=0.0543242500047*x[2]**o + (0.878415329344)*x[2]
+            ref[(1, 1, 1)]+=0.0543242500047*x_ref[2]**o + (0.878415329344)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4, 4),w)
+        ref = Data(0,(2, 2, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.539589303421*x[0]**o + (-0.788991443618)*x[0] + (0.52022533349)*x[1]**o + (-0.684820242308)*x[1]
+        ref[(0, 0, 0, 0)]=-0.539589303421*x_ref[0]**o + (-0.788991443618)*x_ref[0] + (0.52022533349)*x_ref[1]**o + (-0.684820242308)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.666980534124*x[0]**o + (-0.0800959883932)*x[0] + (-0.455753970262)*x[1]**o + (-0.315615522175)*x[1]
+        ref[(0, 0, 0, 1)]=0.666980534124*x_ref[0]**o + (-0.0800959883932)*x_ref[0] + (-0.455753970262)*x_ref[1]**o + (-0.315615522175)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.584735031747*x[0]**o + (-0.215794451255)*x[0] + (0.592607807061)*x[1]**o + (-0.13702740081)*x[1]
+        ref[(0, 0, 0, 2)]=-0.584735031747*x_ref[0]**o + (-0.215794451255)*x_ref[0] + (0.592607807061)*x_ref[1]**o + (-0.13702740081)*x_ref[1]
+        arg[(0, 0, 0, 3)]=-0.177689988964*x[0]**o + (-0.0587428684922)*x[0] + (-0.78894131795)*x[1]**o + (0.659130138769)*x[1]
+        ref[(0, 0, 0, 3)]=-0.177689988964*x_ref[0]**o + (-0.0587428684922)*x_ref[0] + (-0.78894131795)*x_ref[1]**o + (0.659130138769)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.898792780781*x[0]**o + (-0.367990534635)*x[0] + (0.594775554219)*x[1]**o + (0.92394356521)*x[1]
+        ref[(0, 0, 1, 0)]=0.898792780781*x_ref[0]**o + (-0.367990534635)*x_ref[0] + (0.594775554219)*x_ref[1]**o + (0.92394356521)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.966927673329*x[0]**o + (0.80882732541)*x[0] + (-0.573079427499)*x[1]**o + (0.388350238528)*x[1]
+        ref[(0, 0, 1, 1)]=0.966927673329*x_ref[0]**o + (0.80882732541)*x_ref[0] + (-0.573079427499)*x_ref[1]**o + (0.388350238528)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.012431743976*x[0]**o + (0.574326696879)*x[0] + (-0.137469331752)*x[1]**o + (-0.166312077527)*x[1]
+        ref[(0, 0, 1, 2)]=0.012431743976*x_ref[0]**o + (0.574326696879)*x_ref[0] + (-0.137469331752)*x_ref[1]**o + (-0.166312077527)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.00243464326396*x[0]**o + (0.894993981171)*x[0] + (0.657181642864)*x[1]**o + (0.512617543543)*x[1]
+        ref[(0, 0, 1, 3)]=-0.00243464326396*x_ref[0]**o + (0.894993981171)*x_ref[0] + (0.657181642864)*x_ref[1]**o + (0.512617543543)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.408610252396*x[0]**o + (0.0579437083136)*x[0] + (-0.198988160984)*x[1]**o + (0.856422811098)*x[1]
+        ref[(0, 0, 2, 0)]=-0.408610252396*x_ref[0]**o + (0.0579437083136)*x_ref[0] + (-0.198988160984)*x_ref[1]**o + (0.856422811098)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.454263894086*x[0]**o + (0.668243399496)*x[0] + (0.484266157456)*x[1]**o + (0.603064171063)*x[1]
+        ref[(0, 0, 2, 1)]=-0.454263894086*x_ref[0]**o + (0.668243399496)*x_ref[0] + (0.484266157456)*x_ref[1]**o + (0.603064171063)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.44154832626*x[0]**o + (0.888939001301)*x[0] + (-0.133152745419)*x[1]**o + (0.486158250414)*x[1]
+        ref[(0, 0, 2, 2)]=0.44154832626*x_ref[0]**o + (0.888939001301)*x_ref[0] + (-0.133152745419)*x_ref[1]**o + (0.486158250414)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.333620837548*x[0]**o + (0.655999619376)*x[0] + (0.110425782547)*x[1]**o + (-0.502954074917)*x[1]
+        ref[(0, 0, 2, 3)]=-0.333620837548*x_ref[0]**o + (0.655999619376)*x_ref[0] + (0.110425782547)*x_ref[1]**o + (-0.502954074917)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.127867657717*x[0]**o + (0.802195303736)*x[0] + (0.78365441036)*x[1]**o + (0.895094986882)*x[1]
+        ref[(0, 0, 3, 0)]=0.127867657717*x_ref[0]**o + (0.802195303736)*x_ref[0] + (0.78365441036)*x_ref[1]**o + (0.895094986882)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.225046471937*x[0]**o + (0.266687459931)*x[0] + (0.75332203841)*x[1]**o + (-0.719991255219)*x[1]
+        ref[(0, 0, 3, 1)]=0.225046471937*x_ref[0]**o + (0.266687459931)*x_ref[0] + (0.75332203841)*x_ref[1]**o + (-0.719991255219)*x_ref[1]
+        arg[(0, 0, 3, 2)]=-0.451831653273*x[0]**o + (-0.265186899518)*x[0] + (-0.0160937686084)*x[1]**o + (0.36487246462)*x[1]
+        ref[(0, 0, 3, 2)]=-0.451831653273*x_ref[0]**o + (-0.265186899518)*x_ref[0] + (-0.0160937686084)*x_ref[1]**o + (0.36487246462)*x_ref[1]
+        arg[(0, 0, 3, 3)]=-0.601649473218*x[0]**o + (0.51700695225)*x[0] + (0.181159969371)*x[1]**o + (0.201710480723)*x[1]
+        ref[(0, 0, 3, 3)]=-0.601649473218*x_ref[0]**o + (0.51700695225)*x_ref[0] + (0.181159969371)*x_ref[1]**o + (0.201710480723)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.228480521293*x[0]**o + (-0.722651748314)*x[0] + (-0.241253467212)*x[1]**o + (-0.0170195233843)*x[1]
+        ref[(0, 1, 0, 0)]=-0.228480521293*x_ref[0]**o + (-0.722651748314)*x_ref[0] + (-0.241253467212)*x_ref[1]**o + (-0.0170195233843)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.532872227383*x[0]**o + (0.0394266279674)*x[0] + (-5.59385570109e-05)*x[1]**o + (0.200637735271)*x[1]
+        ref[(0, 1, 0, 1)]=-0.532872227383*x_ref[0]**o + (0.0394266279674)*x_ref[0] + (-5.59385570109e-05)*x_ref[1]**o + (0.200637735271)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.375920634331*x[0]**o + (0.310301576145)*x[0] + (-0.0731326204974)*x[1]**o + (-0.944268749193)*x[1]
+        ref[(0, 1, 0, 2)]=-0.375920634331*x_ref[0]**o + (0.310301576145)*x_ref[0] + (-0.0731326204974)*x_ref[1]**o + (-0.944268749193)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.59622708071*x[0]**o + (0.954824759817)*x[0] + (0.993977149158)*x[1]**o + (0.0941551602428)*x[1]
+        ref[(0, 1, 0, 3)]=0.59622708071*x_ref[0]**o + (0.954824759817)*x_ref[0] + (0.993977149158)*x_ref[1]**o + (0.0941551602428)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.245101576653*x[0]**o + (-0.0560902944437)*x[0] + (-0.42389772539)*x[1]**o + (-0.21427280656)*x[1]
+        ref[(0, 1, 1, 0)]=0.245101576653*x_ref[0]**o + (-0.0560902944437)*x_ref[0] + (-0.42389772539)*x_ref[1]**o + (-0.21427280656)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.229717358503*x[0]**o + (0.00529979344333)*x[0] + (0.907579021308)*x[1]**o + (0.534277264981)*x[1]
+        ref[(0, 1, 1, 1)]=-0.229717358503*x_ref[0]**o + (0.00529979344333)*x_ref[0] + (0.907579021308)*x_ref[1]**o + (0.534277264981)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.733069340272*x[0]**o + (-0.506616143644)*x[0] + (0.95443330994)*x[1]**o + (0.127005652405)*x[1]
+        ref[(0, 1, 1, 2)]=-0.733069340272*x_ref[0]**o + (-0.506616143644)*x_ref[0] + (0.95443330994)*x_ref[1]**o + (0.127005652405)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.237020883132*x[0]**o + (-0.994024123428)*x[0] + (0.769664743255)*x[1]**o + (0.0286659191029)*x[1]
+        ref[(0, 1, 1, 3)]=0.237020883132*x_ref[0]**o + (-0.994024123428)*x_ref[0] + (0.769664743255)*x_ref[1]**o + (0.0286659191029)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.416152457505*x[0]**o + (-0.668082840611)*x[0] + (-0.422115549588)*x[1]**o + (-0.256327675056)*x[1]
+        ref[(0, 1, 2, 0)]=-0.416152457505*x_ref[0]**o + (-0.668082840611)*x_ref[0] + (-0.422115549588)*x_ref[1]**o + (-0.256327675056)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.802195018484*x[0]**o + (0.122299617817)*x[0] + (0.71810176629)*x[1]**o + (-0.846420211045)*x[1]
+        ref[(0, 1, 2, 1)]=-0.802195018484*x_ref[0]**o + (0.122299617817)*x_ref[0] + (0.71810176629)*x_ref[1]**o + (-0.846420211045)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.00328673351299*x[0]**o + (-0.591077294357)*x[0] + (0.859287559348)*x[1]**o + (-0.101163991602)*x[1]
+        ref[(0, 1, 2, 2)]=-0.00328673351299*x_ref[0]**o + (-0.591077294357)*x_ref[0] + (0.859287559348)*x_ref[1]**o + (-0.101163991602)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.439227784292*x[0]**o + (-0.406105588878)*x[0] + (0.783020520449)*x[1]**o + (-0.593246710956)*x[1]
+        ref[(0, 1, 2, 3)]=-0.439227784292*x_ref[0]**o + (-0.406105588878)*x_ref[0] + (0.783020520449)*x_ref[1]**o + (-0.593246710956)*x_ref[1]
+        arg[(0, 1, 3, 0)]=0.955552936774*x[0]**o + (-0.970634124278)*x[0] + (0.231016972359)*x[1]**o + (0.140382096058)*x[1]
+        ref[(0, 1, 3, 0)]=0.955552936774*x_ref[0]**o + (-0.970634124278)*x_ref[0] + (0.231016972359)*x_ref[1]**o + (0.140382096058)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.117894542532*x[0]**o + (-0.988059202354)*x[0] + (-0.599325148826)*x[1]**o + (0.426024781448)*x[1]
+        ref[(0, 1, 3, 1)]=0.117894542532*x_ref[0]**o + (-0.988059202354)*x_ref[0] + (-0.599325148826)*x_ref[1]**o + (0.426024781448)*x_ref[1]
+        arg[(0, 1, 3, 2)]=0.971800785642*x[0]**o + (0.319066126006)*x[0] + (-0.136986723439)*x[1]**o + (0.308039655879)*x[1]
+        ref[(0, 1, 3, 2)]=0.971800785642*x_ref[0]**o + (0.319066126006)*x_ref[0] + (-0.136986723439)*x_ref[1]**o + (0.308039655879)*x_ref[1]
+        arg[(0, 1, 3, 3)]=-0.70149618631*x[0]**o + (0.164965424859)*x[0] + (0.119871408803)*x[1]**o + (-0.346504197089)*x[1]
+        ref[(0, 1, 3, 3)]=-0.70149618631*x_ref[0]**o + (0.164965424859)*x_ref[0] + (0.119871408803)*x_ref[1]**o + (-0.346504197089)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.275590842822*x[0]**o + (0.193467401747)*x[0] + (0.597175464475)*x[1]**o + (0.878041767249)*x[1]
+        ref[(1, 0, 0, 0)]=0.275590842822*x_ref[0]**o + (0.193467401747)*x_ref[0] + (0.597175464475)*x_ref[1]**o + (0.878041767249)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.0733494047286*x[0]**o + (0.47572272179)*x[0] + (-0.581682620292)*x[1]**o + (-0.905398032276)*x[1]
+        ref[(1, 0, 0, 1)]=0.0733494047286*x_ref[0]**o + (0.47572272179)*x_ref[0] + (-0.581682620292)*x_ref[1]**o + (-0.905398032276)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.0184437952117*x[0]**o + (0.847787334015)*x[0] + (-0.0863119383547)*x[1]**o + (-0.260849757508)*x[1]
+        ref[(1, 0, 0, 2)]=-0.0184437952117*x_ref[0]**o + (0.847787334015)*x_ref[0] + (-0.0863119383547)*x_ref[1]**o + (-0.260849757508)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.473828942738*x[0]**o + (0.148836649402)*x[0] + (0.247677881097)*x[1]**o + (0.744627107069)*x[1]
+        ref[(1, 0, 0, 3)]=-0.473828942738*x_ref[0]**o + (0.148836649402)*x_ref[0] + (0.247677881097)*x_ref[1]**o + (0.744627107069)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.321893820078*x[0]**o + (-0.159928423918)*x[0] + (-0.680514911479)*x[1]**o + (0.280848531583)*x[1]
+        ref[(1, 0, 1, 0)]=-0.321893820078*x_ref[0]**o + (-0.159928423918)*x_ref[0] + (-0.680514911479)*x_ref[1]**o + (0.280848531583)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.111002404757*x[0]**o + (-0.883556187637)*x[0] + (-0.890909476059)*x[1]**o + (0.423646757157)*x[1]
+        ref[(1, 0, 1, 1)]=0.111002404757*x_ref[0]**o + (-0.883556187637)*x_ref[0] + (-0.890909476059)*x_ref[1]**o + (0.423646757157)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.720162519832*x[0]**o + (-0.0135616678346)*x[0] + (0.890490585792)*x[1]**o + (0.705550207259)*x[1]
+        ref[(1, 0, 1, 2)]=-0.720162519832*x_ref[0]**o + (-0.0135616678346)*x_ref[0] + (0.890490585792)*x_ref[1]**o + (0.705550207259)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.637750794925*x[0]**o + (-0.110424877466)*x[0] + (-0.682822336735)*x[1]**o + (0.199044367645)*x[1]
+        ref[(1, 0, 1, 3)]=-0.637750794925*x_ref[0]**o + (-0.110424877466)*x_ref[0] + (-0.682822336735)*x_ref[1]**o + (0.199044367645)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.253963091283*x[0]**o + (0.491515777559)*x[0] + (-0.959938536298)*x[1]**o + (-0.136479086858)*x[1]
+        ref[(1, 0, 2, 0)]=0.253963091283*x_ref[0]**o + (0.491515777559)*x_ref[0] + (-0.959938536298)*x_ref[1]**o + (-0.136479086858)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.909742457292*x[0]**o + (-0.134239643557)*x[0] + (-0.913220915635)*x[1]**o + (-0.430110840537)*x[1]
+        ref[(1, 0, 2, 1)]=0.909742457292*x_ref[0]**o + (-0.134239643557)*x_ref[0] + (-0.913220915635)*x_ref[1]**o + (-0.430110840537)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.691279801544*x[0]**o + (0.0106771022925)*x[0] + (-0.190249778961)*x[1]**o + (0.877817868425)*x[1]
+        ref[(1, 0, 2, 2)]=-0.691279801544*x_ref[0]**o + (0.0106771022925)*x_ref[0] + (-0.190249778961)*x_ref[1]**o + (0.877817868425)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.0213390479032*x[0]**o + (-0.0520035888057)*x[0] + (-0.271313573553)*x[1]**o + (0.303042488759)*x[1]
+        ref[(1, 0, 2, 3)]=-0.0213390479032*x_ref[0]**o + (-0.0520035888057)*x_ref[0] + (-0.271313573553)*x_ref[1]**o + (0.303042488759)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.861498252503*x[0]**o + (-0.514262037376)*x[0] + (0.727475095055)*x[1]**o + (0.446453224199)*x[1]
+        ref[(1, 0, 3, 0)]=-0.861498252503*x_ref[0]**o + (-0.514262037376)*x_ref[0] + (0.727475095055)*x_ref[1]**o + (0.446453224199)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.836018055273*x[0]**o + (-0.149264512934)*x[0] + (-0.392539763147)*x[1]**o + (0.67863179789)*x[1]
+        ref[(1, 0, 3, 1)]=-0.836018055273*x_ref[0]**o + (-0.149264512934)*x_ref[0] + (-0.392539763147)*x_ref[1]**o + (0.67863179789)*x_ref[1]
+        arg[(1, 0, 3, 2)]=-0.446092431514*x[0]**o + (-0.405291658378)*x[0] + (-0.181373705168)*x[1]**o + (0.397654793092)*x[1]
+        ref[(1, 0, 3, 2)]=-0.446092431514*x_ref[0]**o + (-0.405291658378)*x_ref[0] + (-0.181373705168)*x_ref[1]**o + (0.397654793092)*x_ref[1]
+        arg[(1, 0, 3, 3)]=-0.19603002603*x[0]**o + (0.629725477988)*x[0] + (0.67320235888)*x[1]**o + (-0.14984852797)*x[1]
+        ref[(1, 0, 3, 3)]=-0.19603002603*x_ref[0]**o + (0.629725477988)*x_ref[0] + (0.67320235888)*x_ref[1]**o + (-0.14984852797)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.120353079339*x[0]**o + (-0.378220684513)*x[0] + (0.596895927876)*x[1]**o + (0.843904211058)*x[1]
+        ref[(1, 1, 0, 0)]=-0.120353079339*x_ref[0]**o + (-0.378220684513)*x_ref[0] + (0.596895927876)*x_ref[1]**o + (0.843904211058)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.100773275692*x[0]**o + (0.163213567614)*x[0] + (-0.0890711674335)*x[1]**o + (0.883308957554)*x[1]
+        ref[(1, 1, 0, 1)]=0.100773275692*x_ref[0]**o + (0.163213567614)*x_ref[0] + (-0.0890711674335)*x_ref[1]**o + (0.883308957554)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.463620677359*x[0]**o + (-0.839990441594)*x[0] + (-0.706076435815)*x[1]**o + (-0.111630769127)*x[1]
+        ref[(1, 1, 0, 2)]=-0.463620677359*x_ref[0]**o + (-0.839990441594)*x_ref[0] + (-0.706076435815)*x_ref[1]**o + (-0.111630769127)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.843468470961*x[0]**o + (-0.629386229726)*x[0] + (-0.697868505362)*x[1]**o + (-0.386200001087)*x[1]
+        ref[(1, 1, 0, 3)]=0.843468470961*x_ref[0]**o + (-0.629386229726)*x_ref[0] + (-0.697868505362)*x_ref[1]**o + (-0.386200001087)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.476834570986*x[0]**o + (-0.55441904847)*x[0] + (0.796675511512)*x[1]**o + (-0.38952518847)*x[1]
+        ref[(1, 1, 1, 0)]=0.476834570986*x_ref[0]**o + (-0.55441904847)*x_ref[0] + (0.796675511512)*x_ref[1]**o + (-0.38952518847)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.15223710043*x[0]**o + (-0.343126306057)*x[0] + (-0.330592556527)*x[1]**o + (0.521564285639)*x[1]
+        ref[(1, 1, 1, 1)]=-0.15223710043*x_ref[0]**o + (-0.343126306057)*x_ref[0] + (-0.330592556527)*x_ref[1]**o + (0.521564285639)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.53797465149*x[0]**o + (-0.754248346662)*x[0] + (0.448049230029)*x[1]**o + (0.00259902363356)*x[1]
+        ref[(1, 1, 1, 2)]=0.53797465149*x_ref[0]**o + (-0.754248346662)*x_ref[0] + (0.448049230029)*x_ref[1]**o + (0.00259902363356)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.67171084111*x[0]**o + (-0.270339616226)*x[0] + (0.030713679897)*x[1]**o + (-0.917436652213)*x[1]
+        ref[(1, 1, 1, 3)]=-0.67171084111*x_ref[0]**o + (-0.270339616226)*x_ref[0] + (0.030713679897)*x_ref[1]**o + (-0.917436652213)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.666313312698*x[0]**o + (-0.0592159488054)*x[0] + (0.672484673024)*x[1]**o + (0.301848025759)*x[1]
+        ref[(1, 1, 2, 0)]=-0.666313312698*x_ref[0]**o + (-0.0592159488054)*x_ref[0] + (0.672484673024)*x_ref[1]**o + (0.301848025759)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.195799492073*x[0]**o + (0.983554872581)*x[0] + (-0.946224867565)*x[1]**o + (-0.189411680614)*x[1]
+        ref[(1, 1, 2, 1)]=-0.195799492073*x_ref[0]**o + (0.983554872581)*x_ref[0] + (-0.946224867565)*x_ref[1]**o + (-0.189411680614)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.548824741581*x[0]**o + (0.416351169629)*x[0] + (0.223814054025)*x[1]**o + (0.261182164119)*x[1]
+        ref[(1, 1, 2, 2)]=0.548824741581*x_ref[0]**o + (0.416351169629)*x_ref[0] + (0.223814054025)*x_ref[1]**o + (0.261182164119)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.937340257763*x[0]**o + (0.923450619493)*x[0] + (-0.0383789194469)*x[1]**o + (-0.382417256124)*x[1]
+        ref[(1, 1, 2, 3)]=-0.937340257763*x_ref[0]**o + (0.923450619493)*x_ref[0] + (-0.0383789194469)*x_ref[1]**o + (-0.382417256124)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.628643520976*x[0]**o + (-0.662284974163)*x[0] + (0.216845591217)*x[1]**o + (-0.618714464538)*x[1]
+        ref[(1, 1, 3, 0)]=-0.628643520976*x_ref[0]**o + (-0.662284974163)*x_ref[0] + (0.216845591217)*x_ref[1]**o + (-0.618714464538)*x_ref[1]
+        arg[(1, 1, 3, 1)]=0.2725491614*x[0]**o + (-0.406148221624)*x[0] + (0.205130978895)*x[1]**o + (-0.783219866557)*x[1]
+        ref[(1, 1, 3, 1)]=0.2725491614*x_ref[0]**o + (-0.406148221624)*x_ref[0] + (0.205130978895)*x_ref[1]**o + (-0.783219866557)*x_ref[1]
+        arg[(1, 1, 3, 2)]=0.523262039661*x[0]**o + (-0.360313599258)*x[0] + (0.633184234176)*x[1]**o + (-0.470484952824)*x[1]
+        ref[(1, 1, 3, 2)]=0.523262039661*x_ref[0]**o + (-0.360313599258)*x_ref[0] + (0.633184234176)*x_ref[1]**o + (-0.470484952824)*x_ref[1]
+        arg[(1, 1, 3, 3)]=0.677235611172*x[0]**o + (-0.788184642827)*x[0] + (0.0894974657587)*x[1]**o + (0.355024579768)*x[1]
+        ref[(1, 1, 3, 3)]=0.677235611172*x_ref[0]**o + (-0.788184642827)*x_ref[0] + (0.0894974657587)*x_ref[1]**o + (0.355024579768)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.363252593584*x[2]**o + (0.535004233614)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.363252593584*x_ref[2]**o + (0.535004233614)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.35800529457*x[2]**o + (-0.976143391265)*x[2]
+            ref[(0, 0, 0, 1)]+=0.35800529457*x_ref[2]**o + (-0.976143391265)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.554207669285*x[2]**o + (0.942818955592)*x[2]
+            ref[(0, 0, 0, 2)]+=-0.554207669285*x_ref[2]**o + (0.942818955592)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=-0.0496307679928*x[2]**o + (0.340920757205)*x[2]
+            ref[(0, 0, 0, 3)]+=-0.0496307679928*x_ref[2]**o + (0.340920757205)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.15008240539*x[2]**o + (0.00292243115607)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.15008240539*x_ref[2]**o + (0.00292243115607)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.471757106056*x[2]**o + (0.0867277747899)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.471757106056*x_ref[2]**o + (0.0867277747899)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.196095488257*x[2]**o + (0.332634535774)*x[2]
+            ref[(0, 0, 1, 2)]+=0.196095488257*x_ref[2]**o + (0.332634535774)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.725981891572*x[2]**o + (-0.00561099525744)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.725981891572*x_ref[2]**o + (-0.00561099525744)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.110497855888*x[2]**o + (0.310393463625)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.110497855888*x_ref[2]**o + (0.310393463625)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.787037783784*x[2]**o + (0.177382434497)*x[2]
+            ref[(0, 0, 2, 1)]+=0.787037783784*x_ref[2]**o + (0.177382434497)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.248037831884*x[2]**o + (0.0237762929982)*x[2]
+            ref[(0, 0, 2, 2)]+=0.248037831884*x_ref[2]**o + (0.0237762929982)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=0.647044209519*x[2]**o + (0.642953240769)*x[2]
+            ref[(0, 0, 2, 3)]+=0.647044209519*x_ref[2]**o + (0.642953240769)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.49635060669*x[2]**o + (0.0451264745643)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.49635060669*x_ref[2]**o + (0.0451264745643)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=-0.793783665548*x[2]**o + (0.405487038045)*x[2]
+            ref[(0, 0, 3, 1)]+=-0.793783665548*x_ref[2]**o + (0.405487038045)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=0.62091691111*x[2]**o + (-0.0433273215145)*x[2]
+            ref[(0, 0, 3, 2)]+=0.62091691111*x_ref[2]**o + (-0.0433273215145)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=-0.275185149775*x[2]**o + (0.620059527137)*x[2]
+            ref[(0, 0, 3, 3)]+=-0.275185149775*x_ref[2]**o + (0.620059527137)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.620016384148*x[2]**o + (-0.199536392092)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.620016384148*x_ref[2]**o + (-0.199536392092)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.208227347434*x[2]**o + (-0.86468264193)*x[2]
+            ref[(0, 1, 0, 1)]+=0.208227347434*x_ref[2]**o + (-0.86468264193)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.926008758283*x[2]**o + (0.464108961384)*x[2]
+            ref[(0, 1, 0, 2)]+=0.926008758283*x_ref[2]**o + (0.464108961384)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.571868052681*x[2]**o + (0.201788452074)*x[2]
+            ref[(0, 1, 0, 3)]+=0.571868052681*x_ref[2]**o + (0.201788452074)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.916023575285*x[2]**o + (0.572021299166)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.916023575285*x_ref[2]**o + (0.572021299166)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.101365709103*x[2]**o + (-0.986308052473)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.101365709103*x_ref[2]**o + (-0.986308052473)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.0385715112664*x[2]**o + (-0.770325535769)*x[2]
+            ref[(0, 1, 1, 2)]+=0.0385715112664*x_ref[2]**o + (-0.770325535769)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=0.27103579772*x[2]**o + (0.0750316438633)*x[2]
+            ref[(0, 1, 1, 3)]+=0.27103579772*x_ref[2]**o + (0.0750316438633)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.174219869758*x[2]**o + (0.612298924878)*x[2]
+            ref[(0, 1, 2, 0)]+=0.174219869758*x_ref[2]**o + (0.612298924878)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.572585648893*x[2]**o + (0.0453804636884)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.572585648893*x_ref[2]**o + (0.0453804636884)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.641528503481*x[2]**o + (0.926472052403)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.641528503481*x_ref[2]**o + (0.926472052403)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.33586821102*x[2]**o + (0.357602444004)*x[2]
+            ref[(0, 1, 2, 3)]+=0.33586821102*x_ref[2]**o + (0.357602444004)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=0.368626412757*x[2]**o + (0.277661211699)*x[2]
+            ref[(0, 1, 3, 0)]+=0.368626412757*x_ref[2]**o + (0.277661211699)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=0.384967206685*x[2]**o + (-0.159846704199)*x[2]
+            ref[(0, 1, 3, 1)]+=0.384967206685*x_ref[2]**o + (-0.159846704199)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.682477965532*x[2]**o + (0.150866298435)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.682477965532*x_ref[2]**o + (0.150866298435)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=-0.955101378221*x[2]**o + (0.0656139949418)*x[2]
+            ref[(0, 1, 3, 3)]+=-0.955101378221*x_ref[2]**o + (0.0656139949418)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.898169446464*x[2]**o + (-0.557465896775)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.898169446464*x_ref[2]**o + (-0.557465896775)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.58377927303*x[2]**o + (0.950062283796)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.58377927303*x_ref[2]**o + (0.950062283796)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.825262606055*x[2]**o + (-0.61029776866)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.825262606055*x_ref[2]**o + (-0.61029776866)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=-0.0355586270341*x[2]**o + (-0.0954442429815)*x[2]
+            ref[(1, 0, 0, 3)]+=-0.0355586270341*x_ref[2]**o + (-0.0954442429815)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.331457879668*x[2]**o + (0.420983911702)*x[2]
+            ref[(1, 0, 1, 0)]+=0.331457879668*x_ref[2]**o + (0.420983911702)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.765699473607*x[2]**o + (-0.862504397309)*x[2]
+            ref[(1, 0, 1, 1)]+=0.765699473607*x_ref[2]**o + (-0.862504397309)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.716975578895*x[2]**o + (0.864553305858)*x[2]
+            ref[(1, 0, 1, 2)]+=0.716975578895*x_ref[2]**o + (0.864553305858)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.731535838694*x[2]**o + (0.0358786141834)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.731535838694*x_ref[2]**o + (0.0358786141834)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.545989000867*x[2]**o + (-0.176453252755)*x[2]
+            ref[(1, 0, 2, 0)]+=0.545989000867*x_ref[2]**o + (-0.176453252755)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.19557759036*x[2]**o + (-0.904067500858)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.19557759036*x_ref[2]**o + (-0.904067500858)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.996199313326*x[2]**o + (0.123696017652)*x[2]
+            ref[(1, 0, 2, 2)]+=0.996199313326*x_ref[2]**o + (0.123696017652)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=0.690549627809*x[2]**o + (-0.492933203539)*x[2]
+            ref[(1, 0, 2, 3)]+=0.690549627809*x_ref[2]**o + (-0.492933203539)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.256706578138*x[2]**o + (-0.735338217828)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.256706578138*x_ref[2]**o + (-0.735338217828)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.581094677557*x[2]**o + (0.382102381113)*x[2]
+            ref[(1, 0, 3, 1)]+=-0.581094677557*x_ref[2]**o + (0.382102381113)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=0.677351784582*x[2]**o + (-0.337605057686)*x[2]
+            ref[(1, 0, 3, 2)]+=0.677351784582*x_ref[2]**o + (-0.337605057686)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=0.811688365868*x[2]**o + (0.787785982657)*x[2]
+            ref[(1, 0, 3, 3)]+=0.811688365868*x_ref[2]**o + (0.787785982657)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.451226348857*x[2]**o + (0.954294281725)*x[2]
+            ref[(1, 1, 0, 0)]+=0.451226348857*x_ref[2]**o + (0.954294281725)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.395563755999*x[2]**o + (-0.692525303037)*x[2]
+            ref[(1, 1, 0, 1)]+=0.395563755999*x_ref[2]**o + (-0.692525303037)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.396333936398*x[2]**o + (-0.439436717588)*x[2]
+            ref[(1, 1, 0, 2)]+=0.396333936398*x_ref[2]**o + (-0.439436717588)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.541548664738*x[2]**o + (0.794245271137)*x[2]
+            ref[(1, 1, 0, 3)]+=0.541548664738*x_ref[2]**o + (0.794245271137)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.96849895236*x[2]**o + (-0.235250237012)*x[2]
+            ref[(1, 1, 1, 0)]+=0.96849895236*x_ref[2]**o + (-0.235250237012)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.616430512864*x[2]**o + (-0.437786484367)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.616430512864*x_ref[2]**o + (-0.437786484367)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.0648901285134*x[2]**o + (-0.109939374191)*x[2]
+            ref[(1, 1, 1, 2)]+=0.0648901285134*x_ref[2]**o + (-0.109939374191)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.689532013731*x[2]**o + (0.302627214642)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.689532013731*x_ref[2]**o + (0.302627214642)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.612023644189*x[2]**o + (0.964095098299)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.612023644189*x_ref[2]**o + (0.964095098299)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.444941816497*x[2]**o + (0.611069112131)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.444941816497*x_ref[2]**o + (0.611069112131)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.322000410123*x[2]**o + (-0.644305608466)*x[2]
+            ref[(1, 1, 2, 2)]+=0.322000410123*x_ref[2]**o + (-0.644305608466)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.911995214509*x[2]**o + (0.821333303417)*x[2]
+            ref[(1, 1, 2, 3)]+=0.911995214509*x_ref[2]**o + (0.821333303417)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.602551062711*x[2]**o + (0.834232435222)*x[2]
+            ref[(1, 1, 3, 0)]+=-0.602551062711*x_ref[2]**o + (0.834232435222)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.990763635775*x[2]**o + (0.50184624261)*x[2]
+            ref[(1, 1, 3, 1)]+=-0.990763635775*x_ref[2]**o + (0.50184624261)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=0.466196148152*x[2]**o + (-0.317130626777)*x[2]
+            ref[(1, 1, 3, 2)]+=0.466196148152*x_ref[2]**o + (-0.317130626777)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=-0.479566323305*x[2]**o + (-0.189310008403)*x[2]
+            ref[(1, 1, 3, 3)]+=-0.479566323305*x_ref[2]**o + (-0.189310008403)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.808296405617*x[0] + (-0.869007242515)*x[1]
+        ref=-0.808296405617*x_ref[0] + (-0.869007242515)*x_ref[1]
+        if dim==3:
+            arg+=(0.63536005197)*x[2]
+            ref+=(0.63536005197)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.372545111955*x[0] + (-0.0823590815224)*x[1]
+        ref[(0,)]=0.372545111955*x_ref[0] + (-0.0823590815224)*x_ref[1]
+        arg[(1,)]=-0.511525219035*x[0] + (-0.232960126777)*x[1]
+        ref[(1,)]=-0.511525219035*x_ref[0] + (-0.232960126777)*x_ref[1]
+        arg[(2,)]=0.970656117333*x[0] + (-0.0674618057503)*x[1]
+        ref[(2,)]=0.970656117333*x_ref[0] + (-0.0674618057503)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.202517915493*x[2]
+            ref[(0,)]+=0.202517915493*x_ref[2]
+            arg[(1,)]+=0.125229967585*x[2]
+            ref[(1,)]+=0.125229967585*x_ref[2]
+            arg[(2,)]+=-0.777844604149*x[2]
+            ref[(2,)]+=-0.777844604149*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2),w_ref)
+        arg[(0, 0)]=0.382104599806*x[0] + (0.737465311268)*x[1]
+        ref[(0, 0)]=0.382104599806*x_ref[0] + (0.737465311268)*x_ref[1]
+        arg[(0, 1)]=0.960432364571*x[0] + (0.605939145051)*x[1]
+        ref[(0, 1)]=0.960432364571*x_ref[0] + (0.605939145051)*x_ref[1]
+        arg[(1, 0)]=-0.214917326973*x[0] + (0.931653306683)*x[1]
+        ref[(1, 0)]=-0.214917326973*x_ref[0] + (0.931653306683)*x_ref[1]
+        arg[(1, 1)]=0.289362892104*x[0] + (0.787702079467)*x[1]
+        ref[(1, 1)]=0.289362892104*x_ref[0] + (0.787702079467)*x_ref[1]
+        arg[(2, 0)]=-0.65840361896*x[0] + (0.873365251784)*x[1]
+        ref[(2, 0)]=-0.65840361896*x_ref[0] + (0.873365251784)*x_ref[1]
+        arg[(2, 1)]=-0.486144399075*x[0] + (-0.213875262777)*x[1]
+        ref[(2, 1)]=-0.486144399075*x_ref[0] + (-0.213875262777)*x_ref[1]
+        arg[(3, 0)]=0.580933875006*x[0] + (-0.0134423021981)*x[1]
+        ref[(3, 0)]=0.580933875006*x_ref[0] + (-0.0134423021981)*x_ref[1]
+        arg[(3, 1)]=-0.903200359554*x[0] + (0.884864499658)*x[1]
+        ref[(3, 1)]=-0.903200359554*x_ref[0] + (0.884864499658)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.299671646649*x[2]
+            ref[(0, 0)]+=-0.299671646649*x_ref[2]
+            arg[(0, 1)]+=0.0848197833043*x[2]
+            ref[(0, 1)]+=0.0848197833043*x_ref[2]
+            arg[(1, 0)]+=0.837274004015*x[2]
+            ref[(1, 0)]+=0.837274004015*x_ref[2]
+            arg[(1, 1)]+=-0.774089908555*x[2]
+            ref[(1, 1)]+=-0.774089908555*x_ref[2]
+            arg[(2, 0)]+=-0.676832800911*x[2]
+            ref[(2, 0)]+=-0.676832800911*x_ref[2]
+            arg[(2, 1)]+=-0.705437507255*x[2]
+            ref[(2, 1)]+=-0.705437507255*x_ref[2]
+            arg[(3, 0)]+=0.306721927005*x[2]
+            ref[(3, 0)]+=0.306721927005*x_ref[2]
+            arg[(3, 1)]+=0.710075153306*x[2]
+            ref[(3, 1)]+=0.710075153306*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4),w_ref)
+        arg[(0, 0, 0)]=-0.605146138354*x[0] + (-0.203283909031)*x[1]
+        ref[(0, 0, 0)]=-0.605146138354*x_ref[0] + (-0.203283909031)*x_ref[1]
+        arg[(0, 0, 1)]=-0.416676640951*x[0] + (0.283338999123)*x[1]
+        ref[(0, 0, 1)]=-0.416676640951*x_ref[0] + (0.283338999123)*x_ref[1]
+        arg[(0, 0, 2)]=0.209681098547*x[0] + (-0.189194693167)*x[1]
+        ref[(0, 0, 2)]=0.209681098547*x_ref[0] + (-0.189194693167)*x_ref[1]
+        arg[(0, 0, 3)]=-0.0933909565534*x[0] + (-0.776378882503)*x[1]
+        ref[(0, 0, 3)]=-0.0933909565534*x_ref[0] + (-0.776378882503)*x_ref[1]
+        arg[(0, 1, 0)]=0.388366694308*x[0] + (-0.486594857727)*x[1]
+        ref[(0, 1, 0)]=0.388366694308*x_ref[0] + (-0.486594857727)*x_ref[1]
+        arg[(0, 1, 1)]=0.964211522616*x[0] + (-0.166773058378)*x[1]
+        ref[(0, 1, 1)]=0.964211522616*x_ref[0] + (-0.166773058378)*x_ref[1]
+        arg[(0, 1, 2)]=0.652513139136*x[0] + (0.904496582048)*x[1]
+        ref[(0, 1, 2)]=0.652513139136*x_ref[0] + (0.904496582048)*x_ref[1]
+        arg[(0, 1, 3)]=0.125401676479*x[0] + (0.753300972943)*x[1]
+        ref[(0, 1, 3)]=0.125401676479*x_ref[0] + (0.753300972943)*x_ref[1]
+        arg[(0, 2, 0)]=0.338974755983*x[0] + (-0.539613550072)*x[1]
+        ref[(0, 2, 0)]=0.338974755983*x_ref[0] + (-0.539613550072)*x_ref[1]
+        arg[(0, 2, 1)]=-0.561341703177*x[0] + (0.346334187195)*x[1]
+        ref[(0, 2, 1)]=-0.561341703177*x_ref[0] + (0.346334187195)*x_ref[1]
+        arg[(0, 2, 2)]=-0.920750683553*x[0] + (0.998871986315)*x[1]
+        ref[(0, 2, 2)]=-0.920750683553*x_ref[0] + (0.998871986315)*x_ref[1]
+        arg[(0, 2, 3)]=-0.191815698297*x[0] + (-0.0839499000805)*x[1]
+        ref[(0, 2, 3)]=-0.191815698297*x_ref[0] + (-0.0839499000805)*x_ref[1]
+        arg[(0, 3, 0)]=0.687957743434*x[0] + (-0.825861221392)*x[1]
+        ref[(0, 3, 0)]=0.687957743434*x_ref[0] + (-0.825861221392)*x_ref[1]
+        arg[(0, 3, 1)]=-0.0673549488819*x[0] + (-0.242686725932)*x[1]
+        ref[(0, 3, 1)]=-0.0673549488819*x_ref[0] + (-0.242686725932)*x_ref[1]
+        arg[(0, 3, 2)]=-0.340968871179*x[0] + (-0.0267016825406)*x[1]
+        ref[(0, 3, 2)]=-0.340968871179*x_ref[0] + (-0.0267016825406)*x_ref[1]
+        arg[(0, 3, 3)]=0.258027045584*x[0] + (0.222945412301)*x[1]
+        ref[(0, 3, 3)]=0.258027045584*x_ref[0] + (0.222945412301)*x_ref[1]
+        arg[(1, 0, 0)]=-0.858636382543*x[0] + (0.401863168663)*x[1]
+        ref[(1, 0, 0)]=-0.858636382543*x_ref[0] + (0.401863168663)*x_ref[1]
+        arg[(1, 0, 1)]=0.887413466417*x[0] + (-0.563724966162)*x[1]
+        ref[(1, 0, 1)]=0.887413466417*x_ref[0] + (-0.563724966162)*x_ref[1]
+        arg[(1, 0, 2)]=0.311550553279*x[0] + (-0.376330098261)*x[1]
+        ref[(1, 0, 2)]=0.311550553279*x_ref[0] + (-0.376330098261)*x_ref[1]
+        arg[(1, 0, 3)]=0.323333424352*x[0] + (-0.45334599397)*x[1]
+        ref[(1, 0, 3)]=0.323333424352*x_ref[0] + (-0.45334599397)*x_ref[1]
+        arg[(1, 1, 0)]=-0.524125268179*x[0] + (-0.8342831667)*x[1]
+        ref[(1, 1, 0)]=-0.524125268179*x_ref[0] + (-0.8342831667)*x_ref[1]
+        arg[(1, 1, 1)]=0.117730704793*x[0] + (-0.455528096303)*x[1]
+        ref[(1, 1, 1)]=0.117730704793*x_ref[0] + (-0.455528096303)*x_ref[1]
+        arg[(1, 1, 2)]=0.757578995877*x[0] + (-0.971156277987)*x[1]
+        ref[(1, 1, 2)]=0.757578995877*x_ref[0] + (-0.971156277987)*x_ref[1]
+        arg[(1, 1, 3)]=-0.224073648354*x[0] + (-0.313004676333)*x[1]
+        ref[(1, 1, 3)]=-0.224073648354*x_ref[0] + (-0.313004676333)*x_ref[1]
+        arg[(1, 2, 0)]=0.587180354185*x[0] + (0.965046848546)*x[1]
+        ref[(1, 2, 0)]=0.587180354185*x_ref[0] + (0.965046848546)*x_ref[1]
+        arg[(1, 2, 1)]=-0.863745237309*x[0] + (-0.826342111976)*x[1]
+        ref[(1, 2, 1)]=-0.863745237309*x_ref[0] + (-0.826342111976)*x_ref[1]
+        arg[(1, 2, 2)]=-0.849466721764*x[0] + (-0.367807482401)*x[1]
+        ref[(1, 2, 2)]=-0.849466721764*x_ref[0] + (-0.367807482401)*x_ref[1]
+        arg[(1, 2, 3)]=-0.944131607242*x[0] + (-0.860228995289)*x[1]
+        ref[(1, 2, 3)]=-0.944131607242*x_ref[0] + (-0.860228995289)*x_ref[1]
+        arg[(1, 3, 0)]=-0.174923422007*x[0] + (0.152007586582)*x[1]
+        ref[(1, 3, 0)]=-0.174923422007*x_ref[0] + (0.152007586582)*x_ref[1]
+        arg[(1, 3, 1)]=-0.723235310352*x[0] + (0.921510568917)*x[1]
+        ref[(1, 3, 1)]=-0.723235310352*x_ref[0] + (0.921510568917)*x_ref[1]
+        arg[(1, 3, 2)]=-0.736402425338*x[0] + (0.952463073038)*x[1]
+        ref[(1, 3, 2)]=-0.736402425338*x_ref[0] + (0.952463073038)*x_ref[1]
+        arg[(1, 3, 3)]=0.173263821114*x[0] + (0.935267688531)*x[1]
+        ref[(1, 3, 3)]=0.173263821114*x_ref[0] + (0.935267688531)*x_ref[1]
+        arg[(2, 0, 0)]=-0.393811134659*x[0] + (0.313702458882)*x[1]
+        ref[(2, 0, 0)]=-0.393811134659*x_ref[0] + (0.313702458882)*x_ref[1]
+        arg[(2, 0, 1)]=-0.484951456555*x[0] + (-0.938182193895)*x[1]
+        ref[(2, 0, 1)]=-0.484951456555*x_ref[0] + (-0.938182193895)*x_ref[1]
+        arg[(2, 0, 2)]=-0.632817538285*x[0] + (0.117795644482)*x[1]
+        ref[(2, 0, 2)]=-0.632817538285*x_ref[0] + (0.117795644482)*x_ref[1]
+        arg[(2, 0, 3)]=-0.59737041971*x[0] + (-0.252700410161)*x[1]
+        ref[(2, 0, 3)]=-0.59737041971*x_ref[0] + (-0.252700410161)*x_ref[1]
+        arg[(2, 1, 0)]=0.29110296658*x[0] + (-0.288743359536)*x[1]
+        ref[(2, 1, 0)]=0.29110296658*x_ref[0] + (-0.288743359536)*x_ref[1]
+        arg[(2, 1, 1)]=0.777106221293*x[0] + (-0.985217272328)*x[1]
+        ref[(2, 1, 1)]=0.777106221293*x_ref[0] + (-0.985217272328)*x_ref[1]
+        arg[(2, 1, 2)]=-0.344344378324*x[0] + (0.414015998183)*x[1]
+        ref[(2, 1, 2)]=-0.344344378324*x_ref[0] + (0.414015998183)*x_ref[1]
+        arg[(2, 1, 3)]=-0.924063877453*x[0] + (0.329510312508)*x[1]
+        ref[(2, 1, 3)]=-0.924063877453*x_ref[0] + (0.329510312508)*x_ref[1]
+        arg[(2, 2, 0)]=0.210581032086*x[0] + (0.433721869147)*x[1]
+        ref[(2, 2, 0)]=0.210581032086*x_ref[0] + (0.433721869147)*x_ref[1]
+        arg[(2, 2, 1)]=-0.026110900512*x[0] + (0.178077747703)*x[1]
+        ref[(2, 2, 1)]=-0.026110900512*x_ref[0] + (0.178077747703)*x_ref[1]
+        arg[(2, 2, 2)]=-0.693895419456*x[0] + (0.240861015561)*x[1]
+        ref[(2, 2, 2)]=-0.693895419456*x_ref[0] + (0.240861015561)*x_ref[1]
+        arg[(2, 2, 3)]=0.251527747511*x[0] + (-0.704288601858)*x[1]
+        ref[(2, 2, 3)]=0.251527747511*x_ref[0] + (-0.704288601858)*x_ref[1]
+        arg[(2, 3, 0)]=0.296113972573*x[0] + (-0.993391117138)*x[1]
+        ref[(2, 3, 0)]=0.296113972573*x_ref[0] + (-0.993391117138)*x_ref[1]
+        arg[(2, 3, 1)]=0.974558967177*x[0] + (-0.265733658612)*x[1]
+        ref[(2, 3, 1)]=0.974558967177*x_ref[0] + (-0.265733658612)*x_ref[1]
+        arg[(2, 3, 2)]=-0.450713128545*x[0] + (-0.265840628187)*x[1]
+        ref[(2, 3, 2)]=-0.450713128545*x_ref[0] + (-0.265840628187)*x_ref[1]
+        arg[(2, 3, 3)]=0.0929113791465*x[0] + (-0.553204075784)*x[1]
+        ref[(2, 3, 3)]=0.0929113791465*x_ref[0] + (-0.553204075784)*x_ref[1]
+        arg[(3, 0, 0)]=0.634150578044*x[0] + (0.0378806047732)*x[1]
+        ref[(3, 0, 0)]=0.634150578044*x_ref[0] + (0.0378806047732)*x_ref[1]
+        arg[(3, 0, 1)]=0.822691228673*x[0] + (0.519079209462)*x[1]
+        ref[(3, 0, 1)]=0.822691228673*x_ref[0] + (0.519079209462)*x_ref[1]
+        arg[(3, 0, 2)]=0.477074004965*x[0] + (-0.979197869144)*x[1]
+        ref[(3, 0, 2)]=0.477074004965*x_ref[0] + (-0.979197869144)*x_ref[1]
+        arg[(3, 0, 3)]=0.121873242544*x[0] + (0.0364238689649)*x[1]
+        ref[(3, 0, 3)]=0.121873242544*x_ref[0] + (0.0364238689649)*x_ref[1]
+        arg[(3, 1, 0)]=-0.755477231939*x[0] + (0.958930176391)*x[1]
+        ref[(3, 1, 0)]=-0.755477231939*x_ref[0] + (0.958930176391)*x_ref[1]
+        arg[(3, 1, 1)]=-0.83910614781*x[0] + (0.929155804964)*x[1]
+        ref[(3, 1, 1)]=-0.83910614781*x_ref[0] + (0.929155804964)*x_ref[1]
+        arg[(3, 1, 2)]=0.105443760116*x[0] + (0.0928013210847)*x[1]
+        ref[(3, 1, 2)]=0.105443760116*x_ref[0] + (0.0928013210847)*x_ref[1]
+        arg[(3, 1, 3)]=-0.877125543387*x[0] + (0.150703629437)*x[1]
+        ref[(3, 1, 3)]=-0.877125543387*x_ref[0] + (0.150703629437)*x_ref[1]
+        arg[(3, 2, 0)]=-0.258625502615*x[0] + (0.155168618579)*x[1]
+        ref[(3, 2, 0)]=-0.258625502615*x_ref[0] + (0.155168618579)*x_ref[1]
+        arg[(3, 2, 1)]=0.393379956028*x[0] + (0.979685003657)*x[1]
+        ref[(3, 2, 1)]=0.393379956028*x_ref[0] + (0.979685003657)*x_ref[1]
+        arg[(3, 2, 2)]=-0.438857072303*x[0] + (-0.0876105030939)*x[1]
+        ref[(3, 2, 2)]=-0.438857072303*x_ref[0] + (-0.0876105030939)*x_ref[1]
+        arg[(3, 2, 3)]=0.074076352062*x[0] + (0.443995833158)*x[1]
+        ref[(3, 2, 3)]=0.074076352062*x_ref[0] + (0.443995833158)*x_ref[1]
+        arg[(3, 3, 0)]=-0.107366966672*x[0] + (-0.0882956075047)*x[1]
+        ref[(3, 3, 0)]=-0.107366966672*x_ref[0] + (-0.0882956075047)*x_ref[1]
+        arg[(3, 3, 1)]=-0.412435469022*x[0] + (-0.234645705186)*x[1]
+        ref[(3, 3, 1)]=-0.412435469022*x_ref[0] + (-0.234645705186)*x_ref[1]
+        arg[(3, 3, 2)]=-0.174017936277*x[0] + (0.200693536305)*x[1]
+        ref[(3, 3, 2)]=-0.174017936277*x_ref[0] + (0.200693536305)*x_ref[1]
+        arg[(3, 3, 3)]=0.907057167668*x[0] + (-0.283320485472)*x[1]
+        ref[(3, 3, 3)]=0.907057167668*x_ref[0] + (-0.283320485472)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.272583652964*x[2]
+            ref[(0, 0, 0)]+=-0.272583652964*x_ref[2]
+            arg[(0, 0, 1)]+=-0.190682476985*x[2]
+            ref[(0, 0, 1)]+=-0.190682476985*x_ref[2]
+            arg[(0, 0, 2)]+=-0.520032338097*x[2]
+            ref[(0, 0, 2)]+=-0.520032338097*x_ref[2]
+            arg[(0, 0, 3)]+=0.587224880911*x[2]
+            ref[(0, 0, 3)]+=0.587224880911*x_ref[2]
+            arg[(0, 1, 0)]+=-0.157780072042*x[2]
+            ref[(0, 1, 0)]+=-0.157780072042*x_ref[2]
+            arg[(0, 1, 1)]+=0.264868660994*x[2]
+            ref[(0, 1, 1)]+=0.264868660994*x_ref[2]
+            arg[(0, 1, 2)]+=0.330897548491*x[2]
+            ref[(0, 1, 2)]+=0.330897548491*x_ref[2]
+            arg[(0, 1, 3)]+=0.677085259977*x[2]
+            ref[(0, 1, 3)]+=0.677085259977*x_ref[2]
+            arg[(0, 2, 0)]+=0.879523564729*x[2]
+            ref[(0, 2, 0)]+=0.879523564729*x_ref[2]
+            arg[(0, 2, 1)]+=0.0143972914443*x[2]
+            ref[(0, 2, 1)]+=0.0143972914443*x_ref[2]
+            arg[(0, 2, 2)]+=0.508105110064*x[2]
+            ref[(0, 2, 2)]+=0.508105110064*x_ref[2]
+            arg[(0, 2, 3)]+=0.455270644207*x[2]
+            ref[(0, 2, 3)]+=0.455270644207*x_ref[2]
+            arg[(0, 3, 0)]+=0.637227798886*x[2]
+            ref[(0, 3, 0)]+=0.637227798886*x_ref[2]
+            arg[(0, 3, 1)]+=-0.550210672537*x[2]
+            ref[(0, 3, 1)]+=-0.550210672537*x_ref[2]
+            arg[(0, 3, 2)]+=0.00567529304651*x[2]
+            ref[(0, 3, 2)]+=0.00567529304651*x_ref[2]
+            arg[(0, 3, 3)]+=0.501028459571*x[2]
+            ref[(0, 3, 3)]+=0.501028459571*x_ref[2]
+            arg[(1, 0, 0)]+=0.473320067272*x[2]
+            ref[(1, 0, 0)]+=0.473320067272*x_ref[2]
+            arg[(1, 0, 1)]+=0.926523601754*x[2]
+            ref[(1, 0, 1)]+=0.926523601754*x_ref[2]
+            arg[(1, 0, 2)]+=0.520385033721*x[2]
+            ref[(1, 0, 2)]+=0.520385033721*x_ref[2]
+            arg[(1, 0, 3)]+=-0.136087212826*x[2]
+            ref[(1, 0, 3)]+=-0.136087212826*x_ref[2]
+            arg[(1, 1, 0)]+=-0.94902198549*x[2]
+            ref[(1, 1, 0)]+=-0.94902198549*x_ref[2]
+            arg[(1, 1, 1)]+=0.0959932096982*x[2]
+            ref[(1, 1, 1)]+=0.0959932096982*x_ref[2]
+            arg[(1, 1, 2)]+=0.998037771795*x[2]
+            ref[(1, 1, 2)]+=0.998037771795*x_ref[2]
+            arg[(1, 1, 3)]+=0.971985241843*x[2]
+            ref[(1, 1, 3)]+=0.971985241843*x_ref[2]
+            arg[(1, 2, 0)]+=-0.199636427083*x[2]
+            ref[(1, 2, 0)]+=-0.199636427083*x_ref[2]
+            arg[(1, 2, 1)]+=0.343488103604*x[2]
+            ref[(1, 2, 1)]+=0.343488103604*x_ref[2]
+            arg[(1, 2, 2)]+=0.860621900433*x[2]
+            ref[(1, 2, 2)]+=0.860621900433*x_ref[2]
+            arg[(1, 2, 3)]+=-0.409353635804*x[2]
+            ref[(1, 2, 3)]+=-0.409353635804*x_ref[2]
+            arg[(1, 3, 0)]+=0.720409266545*x[2]
+            ref[(1, 3, 0)]+=0.720409266545*x_ref[2]
+            arg[(1, 3, 1)]+=0.393788054814*x[2]
+            ref[(1, 3, 1)]+=0.393788054814*x_ref[2]
+            arg[(1, 3, 2)]+=-0.642702724886*x[2]
+            ref[(1, 3, 2)]+=-0.642702724886*x_ref[2]
+            arg[(1, 3, 3)]+=0.379200823686*x[2]
+            ref[(1, 3, 3)]+=0.379200823686*x_ref[2]
+            arg[(2, 0, 0)]+=0.564533484661*x[2]
+            ref[(2, 0, 0)]+=0.564533484661*x_ref[2]
+            arg[(2, 0, 1)]+=-0.075633776099*x[2]
+            ref[(2, 0, 1)]+=-0.075633776099*x_ref[2]
+            arg[(2, 0, 2)]+=0.66444845118*x[2]
+            ref[(2, 0, 2)]+=0.66444845118*x_ref[2]
+            arg[(2, 0, 3)]+=-0.0839853877303*x[2]
+            ref[(2, 0, 3)]+=-0.0839853877303*x_ref[2]
+            arg[(2, 1, 0)]+=0.242793332564*x[2]
+            ref[(2, 1, 0)]+=0.242793332564*x_ref[2]
+            arg[(2, 1, 1)]+=-0.77223603544*x[2]
+            ref[(2, 1, 1)]+=-0.77223603544*x_ref[2]
+            arg[(2, 1, 2)]+=0.576658716108*x[2]
+            ref[(2, 1, 2)]+=0.576658716108*x_ref[2]
+            arg[(2, 1, 3)]+=0.841788966745*x[2]
+            ref[(2, 1, 3)]+=0.841788966745*x_ref[2]
+            arg[(2, 2, 0)]+=0.867809370734*x[2]
+            ref[(2, 2, 0)]+=0.867809370734*x_ref[2]
+            arg[(2, 2, 1)]+=-0.109004316044*x[2]
+            ref[(2, 2, 1)]+=-0.109004316044*x_ref[2]
+            arg[(2, 2, 2)]+=0.772259168508*x[2]
+            ref[(2, 2, 2)]+=0.772259168508*x_ref[2]
+            arg[(2, 2, 3)]+=-0.464833738349*x[2]
+            ref[(2, 2, 3)]+=-0.464833738349*x_ref[2]
+            arg[(2, 3, 0)]+=0.375901189937*x[2]
+            ref[(2, 3, 0)]+=0.375901189937*x_ref[2]
+            arg[(2, 3, 1)]+=0.979210197865*x[2]
+            ref[(2, 3, 1)]+=0.979210197865*x_ref[2]
+            arg[(2, 3, 2)]+=0.563255728761*x[2]
+            ref[(2, 3, 2)]+=0.563255728761*x_ref[2]
+            arg[(2, 3, 3)]+=0.679980295425*x[2]
+            ref[(2, 3, 3)]+=0.679980295425*x_ref[2]
+            arg[(3, 0, 0)]+=0.644997922366*x[2]
+            ref[(3, 0, 0)]+=0.644997922366*x_ref[2]
+            arg[(3, 0, 1)]+=0.999580383012*x[2]
+            ref[(3, 0, 1)]+=0.999580383012*x_ref[2]
+            arg[(3, 0, 2)]+=0.208479011146*x[2]
+            ref[(3, 0, 2)]+=0.208479011146*x_ref[2]
+            arg[(3, 0, 3)]+=-0.901365050858*x[2]
+            ref[(3, 0, 3)]+=-0.901365050858*x_ref[2]
+            arg[(3, 1, 0)]+=0.884950543936*x[2]
+            ref[(3, 1, 0)]+=0.884950543936*x_ref[2]
+            arg[(3, 1, 1)]+=0.93767294827*x[2]
+            ref[(3, 1, 1)]+=0.93767294827*x_ref[2]
+            arg[(3, 1, 2)]+=0.0950477100304*x[2]
+            ref[(3, 1, 2)]+=0.0950477100304*x_ref[2]
+            arg[(3, 1, 3)]+=-0.248335714822*x[2]
+            ref[(3, 1, 3)]+=-0.248335714822*x_ref[2]
+            arg[(3, 2, 0)]+=0.133975444433*x[2]
+            ref[(3, 2, 0)]+=0.133975444433*x_ref[2]
+            arg[(3, 2, 1)]+=-0.99615640055*x[2]
+            ref[(3, 2, 1)]+=-0.99615640055*x_ref[2]
+            arg[(3, 2, 2)]+=-0.142657896449*x[2]
+            ref[(3, 2, 2)]+=-0.142657896449*x_ref[2]
+            arg[(3, 2, 3)]+=-0.258528158478*x[2]
+            ref[(3, 2, 3)]+=-0.258528158478*x_ref[2]
+            arg[(3, 3, 0)]+=0.241763540067*x[2]
+            ref[(3, 3, 0)]+=0.241763540067*x_ref[2]
+            arg[(3, 3, 1)]+=0.647957714685*x[2]
+            ref[(3, 3, 1)]+=0.647957714685*x_ref[2]
+            arg[(3, 3, 2)]+=0.30962047733*x[2]
+            ref[(3, 3, 2)]+=0.30962047733*x_ref[2]
+            arg[(3, 3, 3)]+=-0.853222210263*x[2]
+            ref[(3, 3, 3)]+=-0.853222210263*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2, 2),w)
+        ref = Data(0,(4, 3, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.471387391298*x[0] + (-0.435824371618)*x[1]
+        ref[(0, 0, 0, 0)]=0.471387391298*x_ref[0] + (-0.435824371618)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.341815973089*x[0] + (-0.114788384106)*x[1]
+        ref[(0, 0, 0, 1)]=0.341815973089*x_ref[0] + (-0.114788384106)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.725802648666*x[0] + (0.579415717337)*x[1]
+        ref[(0, 0, 1, 0)]=0.725802648666*x_ref[0] + (0.579415717337)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.144943344992*x[0] + (0.218990980203)*x[1]
+        ref[(0, 0, 1, 1)]=0.144943344992*x_ref[0] + (0.218990980203)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.489381881836*x[0] + (-0.0686249653886)*x[1]
+        ref[(0, 1, 0, 0)]=-0.489381881836*x_ref[0] + (-0.0686249653886)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.145703158475*x[0] + (0.720116635888)*x[1]
+        ref[(0, 1, 0, 1)]=0.145703158475*x_ref[0] + (0.720116635888)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.10854335273*x[0] + (0.0642677188489)*x[1]
+        ref[(0, 1, 1, 0)]=0.10854335273*x_ref[0] + (0.0642677188489)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.0693703988217*x[0] + (0.927040708691)*x[1]
+        ref[(0, 1, 1, 1)]=-0.0693703988217*x_ref[0] + (0.927040708691)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.403357052687*x[0] + (-0.944890172263)*x[1]
+        ref[(0, 2, 0, 0)]=0.403357052687*x_ref[0] + (-0.944890172263)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.795103035681*x[0] + (-0.535960077685)*x[1]
+        ref[(0, 2, 0, 1)]=-0.795103035681*x_ref[0] + (-0.535960077685)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.829200934448*x[0] + (0.141503932084)*x[1]
+        ref[(0, 2, 1, 0)]=-0.829200934448*x_ref[0] + (0.141503932084)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.307550656977*x[0] + (0.163029389678)*x[1]
+        ref[(0, 2, 1, 1)]=0.307550656977*x_ref[0] + (0.163029389678)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.924744105518*x[0] + (0.835409939272)*x[1]
+        ref[(1, 0, 0, 0)]=0.924744105518*x_ref[0] + (0.835409939272)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.833072379769*x[0] + (-0.908384929619)*x[1]
+        ref[(1, 0, 0, 1)]=0.833072379769*x_ref[0] + (-0.908384929619)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.214235249898*x[0] + (-0.959111900739)*x[1]
+        ref[(1, 0, 1, 0)]=-0.214235249898*x_ref[0] + (-0.959111900739)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.528127961217*x[0] + (0.925928142849)*x[1]
+        ref[(1, 0, 1, 1)]=-0.528127961217*x_ref[0] + (0.925928142849)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.842936352843*x[0] + (0.151807965058)*x[1]
+        ref[(1, 1, 0, 0)]=-0.842936352843*x_ref[0] + (0.151807965058)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.829597501628*x[0] + (0.48600177406)*x[1]
+        ref[(1, 1, 0, 1)]=0.829597501628*x_ref[0] + (0.48600177406)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.494956134104*x[0] + (0.114634751701)*x[1]
+        ref[(1, 1, 1, 0)]=-0.494956134104*x_ref[0] + (0.114634751701)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.408330186245*x[0] + (0.783782747339)*x[1]
+        ref[(1, 1, 1, 1)]=0.408330186245*x_ref[0] + (0.783782747339)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.0180265185352*x[0] + (-0.363082384723)*x[1]
+        ref[(1, 2, 0, 0)]=0.0180265185352*x_ref[0] + (-0.363082384723)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.0190544348978*x[0] + (-0.115432496122)*x[1]
+        ref[(1, 2, 0, 1)]=-0.0190544348978*x_ref[0] + (-0.115432496122)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.549489969725*x[0] + (-0.937219092156)*x[1]
+        ref[(1, 2, 1, 0)]=0.549489969725*x_ref[0] + (-0.937219092156)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.171910268123*x[0] + (0.423076617924)*x[1]
+        ref[(1, 2, 1, 1)]=-0.171910268123*x_ref[0] + (0.423076617924)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.485424755678*x[0] + (-0.903531924576)*x[1]
+        ref[(2, 0, 0, 0)]=-0.485424755678*x_ref[0] + (-0.903531924576)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.184668006201*x[0] + (0.588572199297)*x[1]
+        ref[(2, 0, 0, 1)]=0.184668006201*x_ref[0] + (0.588572199297)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.628562266222*x[0] + (-0.112657397382)*x[1]
+        ref[(2, 0, 1, 0)]=-0.628562266222*x_ref[0] + (-0.112657397382)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.00880895629712*x[0] + (0.471125764969)*x[1]
+        ref[(2, 0, 1, 1)]=-0.00880895629712*x_ref[0] + (0.471125764969)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.244142527344*x[0] + (-0.166948933841)*x[1]
+        ref[(2, 1, 0, 0)]=-0.244142527344*x_ref[0] + (-0.166948933841)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.0896274661506*x[0] + (0.681909362669)*x[1]
+        ref[(2, 1, 0, 1)]=0.0896274661506*x_ref[0] + (0.681909362669)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.4618230031*x[0] + (0.0215334106864)*x[1]
+        ref[(2, 1, 1, 0)]=0.4618230031*x_ref[0] + (0.0215334106864)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.137770967338*x[0] + (0.293922187861)*x[1]
+        ref[(2, 1, 1, 1)]=0.137770967338*x_ref[0] + (0.293922187861)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.883739279152*x[0] + (0.385678431384)*x[1]
+        ref[(2, 2, 0, 0)]=-0.883739279152*x_ref[0] + (0.385678431384)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.34352436134*x[0] + (-0.0634767429527)*x[1]
+        ref[(2, 2, 0, 1)]=0.34352436134*x_ref[0] + (-0.0634767429527)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.315207348*x[0] + (-0.209598720621)*x[1]
+        ref[(2, 2, 1, 0)]=-0.315207348*x_ref[0] + (-0.209598720621)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.654960024169*x[0] + (-0.211787809194)*x[1]
+        ref[(2, 2, 1, 1)]=0.654960024169*x_ref[0] + (-0.211787809194)*x_ref[1]
+        arg[(3, 0, 0, 0)]=-0.837044876291*x[0] + (0.172696441895)*x[1]
+        ref[(3, 0, 0, 0)]=-0.837044876291*x_ref[0] + (0.172696441895)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.752055808903*x[0] + (-0.436125675676)*x[1]
+        ref[(3, 0, 0, 1)]=-0.752055808903*x_ref[0] + (-0.436125675676)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.491205770525*x[0] + (-0.0207959076521)*x[1]
+        ref[(3, 0, 1, 0)]=0.491205770525*x_ref[0] + (-0.0207959076521)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.602835203983*x[0] + (0.504913577676)*x[1]
+        ref[(3, 0, 1, 1)]=-0.602835203983*x_ref[0] + (0.504913577676)*x_ref[1]
+        arg[(3, 1, 0, 0)]=0.252180106573*x[0] + (0.0602677415308)*x[1]
+        ref[(3, 1, 0, 0)]=0.252180106573*x_ref[0] + (0.0602677415308)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.40967582075*x[0] + (-0.663529739527)*x[1]
+        ref[(3, 1, 0, 1)]=0.40967582075*x_ref[0] + (-0.663529739527)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.432152830786*x[0] + (0.455975628326)*x[1]
+        ref[(3, 1, 1, 0)]=0.432152830786*x_ref[0] + (0.455975628326)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.701886389809*x[0] + (-0.165982533957)*x[1]
+        ref[(3, 1, 1, 1)]=-0.701886389809*x_ref[0] + (-0.165982533957)*x_ref[1]
+        arg[(3, 2, 0, 0)]=0.282879450845*x[0] + (-0.192836656176)*x[1]
+        ref[(3, 2, 0, 0)]=0.282879450845*x_ref[0] + (-0.192836656176)*x_ref[1]
+        arg[(3, 2, 0, 1)]=-0.728600575951*x[0] + (-0.198688675293)*x[1]
+        ref[(3, 2, 0, 1)]=-0.728600575951*x_ref[0] + (-0.198688675293)*x_ref[1]
+        arg[(3, 2, 1, 0)]=0.185627152445*x[0] + (0.122963176525)*x[1]
+        ref[(3, 2, 1, 0)]=0.185627152445*x_ref[0] + (0.122963176525)*x_ref[1]
+        arg[(3, 2, 1, 1)]=-0.884639601861*x[0] + (-0.471293782372)*x[1]
+        ref[(3, 2, 1, 1)]=-0.884639601861*x_ref[0] + (-0.471293782372)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.603195222473*x[2]
+            ref[(0, 0, 0, 0)]+=0.603195222473*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.566464795899*x[2]
+            ref[(0, 0, 0, 1)]+=0.566464795899*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.353884686457*x[2]
+            ref[(0, 0, 1, 0)]+=0.353884686457*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.192657588944*x[2]
+            ref[(0, 0, 1, 1)]+=-0.192657588944*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.43267814346*x[2]
+            ref[(0, 1, 0, 0)]+=-0.43267814346*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.761062538576*x[2]
+            ref[(0, 1, 0, 1)]+=0.761062538576*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.54193733618*x[2]
+            ref[(0, 1, 1, 0)]+=-0.54193733618*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.666076502276*x[2]
+            ref[(0, 1, 1, 1)]+=-0.666076502276*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.12020605612*x[2]
+            ref[(0, 2, 0, 0)]+=0.12020605612*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.760925272478*x[2]
+            ref[(0, 2, 0, 1)]+=-0.760925272478*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.442853043212*x[2]
+            ref[(0, 2, 1, 0)]+=0.442853043212*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.388527746615*x[2]
+            ref[(0, 2, 1, 1)]+=-0.388527746615*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.182978451002*x[2]
+            ref[(1, 0, 0, 0)]+=0.182978451002*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.323128860947*x[2]
+            ref[(1, 0, 0, 1)]+=0.323128860947*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.802812957598*x[2]
+            ref[(1, 0, 1, 0)]+=-0.802812957598*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.880997806359*x[2]
+            ref[(1, 0, 1, 1)]+=0.880997806359*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.0218583170515*x[2]
+            ref[(1, 1, 0, 0)]+=0.0218583170515*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.970876818855*x[2]
+            ref[(1, 1, 0, 1)]+=-0.970876818855*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.295866459525*x[2]
+            ref[(1, 1, 1, 0)]+=0.295866459525*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.521006634528*x[2]
+            ref[(1, 1, 1, 1)]+=-0.521006634528*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.217859576856*x[2]
+            ref[(1, 2, 0, 0)]+=-0.217859576856*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.520690411607*x[2]
+            ref[(1, 2, 0, 1)]+=-0.520690411607*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.0129294754369*x[2]
+            ref[(1, 2, 1, 0)]+=0.0129294754369*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.386856554522*x[2]
+            ref[(1, 2, 1, 1)]+=0.386856554522*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.874966099769*x[2]
+            ref[(2, 0, 0, 0)]+=0.874966099769*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.685451790883*x[2]
+            ref[(2, 0, 0, 1)]+=0.685451790883*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.853195143696*x[2]
+            ref[(2, 0, 1, 0)]+=0.853195143696*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.0957202278551*x[2]
+            ref[(2, 0, 1, 1)]+=-0.0957202278551*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.619595503959*x[2]
+            ref[(2, 1, 0, 0)]+=0.619595503959*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.498757353667*x[2]
+            ref[(2, 1, 0, 1)]+=0.498757353667*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.620992182439*x[2]
+            ref[(2, 1, 1, 0)]+=0.620992182439*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.933605240455*x[2]
+            ref[(2, 1, 1, 1)]+=-0.933605240455*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.414795309253*x[2]
+            ref[(2, 2, 0, 0)]+=0.414795309253*x_ref[2]
+            arg[(2, 2, 0, 1)]+=-0.547944539709*x[2]
+            ref[(2, 2, 0, 1)]+=-0.547944539709*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.631594777065*x[2]
+            ref[(2, 2, 1, 0)]+=0.631594777065*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.474233602924*x[2]
+            ref[(2, 2, 1, 1)]+=0.474233602924*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.557764378521*x[2]
+            ref[(3, 0, 0, 0)]+=0.557764378521*x_ref[2]
+            arg[(3, 0, 0, 1)]+=0.660283529032*x[2]
+            ref[(3, 0, 0, 1)]+=0.660283529032*x_ref[2]
+            arg[(3, 0, 1, 0)]+=-0.891775254169*x[2]
+            ref[(3, 0, 1, 0)]+=-0.891775254169*x_ref[2]
+            arg[(3, 0, 1, 1)]+=-0.560576139488*x[2]
+            ref[(3, 0, 1, 1)]+=-0.560576139488*x_ref[2]
+            arg[(3, 1, 0, 0)]+=-0.814340524415*x[2]
+            ref[(3, 1, 0, 0)]+=-0.814340524415*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.305493868075*x[2]
+            ref[(3, 1, 0, 1)]+=0.305493868075*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.917447149418*x[2]
+            ref[(3, 1, 1, 0)]+=0.917447149418*x_ref[2]
+            arg[(3, 1, 1, 1)]+=0.7468337303*x[2]
+            ref[(3, 1, 1, 1)]+=0.7468337303*x_ref[2]
+            arg[(3, 2, 0, 0)]+=-0.988562363643*x[2]
+            ref[(3, 2, 0, 0)]+=-0.988562363643*x_ref[2]
+            arg[(3, 2, 0, 1)]+=-0.291822724775*x[2]
+            ref[(3, 2, 0, 1)]+=-0.291822724775*x_ref[2]
+            arg[(3, 2, 1, 0)]+=-0.10762588072*x[2]
+            ref[(3, 2, 1, 0)]+=-0.10762588072*x_ref[2]
+            arg[(3, 2, 1, 1)]+=0.0219135922262*x[2]
+            ref[(3, 2, 1, 1)]+=0.0219135922262*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.585654201094*x[0] + (-0.546634749206)*x[1]
+        ref=-0.585654201094*x_ref[0] + (-0.546634749206)*x_ref[1]
+        if dim==3:
+            arg+=(0.660675878729)*x[2]
+            ref+=(0.660675878729)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.253564491796*x[0] + (0.465693007369)*x[1]
+        ref[(0,)]=0.253564491796*x_ref[0] + (0.465693007369)*x_ref[1]
+        arg[(1,)]=0.18095075812*x[0] + (-0.0661561338306)*x[1]
+        ref[(1,)]=0.18095075812*x_ref[0] + (-0.0661561338306)*x_ref[1]
+        arg[(2,)]=-0.0716581918538*x[0] + (-0.743722329241)*x[1]
+        ref[(2,)]=-0.0716581918538*x_ref[0] + (-0.743722329241)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.199926543094*x[2]
+            ref[(0,)]+=-0.199926543094*x_ref[2]
+            arg[(1,)]+=-0.937836843002*x[2]
+            ref[(1,)]+=-0.937836843002*x_ref[2]
+            arg[(2,)]+=-0.905529203011*x[2]
+            ref[(2,)]+=-0.905529203011*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=-0.0973643949455*x[0] + (0.938905228413)*x[1]
+        ref[(0, 0)]=-0.0973643949455*x_ref[0] + (0.938905228413)*x_ref[1]
+        arg[(0, 1)]=-0.903400013319*x[0] + (-0.624948295964)*x[1]
+        ref[(0, 1)]=-0.903400013319*x_ref[0] + (-0.624948295964)*x_ref[1]
+        arg[(0, 2)]=0.928892663663*x[0] + (-0.456852258424)*x[1]
+        ref[(0, 2)]=0.928892663663*x_ref[0] + (-0.456852258424)*x_ref[1]
+        arg[(0, 3)]=-0.193377550447*x[0] + (-0.760216596867)*x[1]
+        ref[(0, 3)]=-0.193377550447*x_ref[0] + (-0.760216596867)*x_ref[1]
+        arg[(1, 0)]=0.776939404759*x[0] + (0.741863984738)*x[1]
+        ref[(1, 0)]=0.776939404759*x_ref[0] + (0.741863984738)*x_ref[1]
+        arg[(1, 1)]=-0.977290916889*x[0] + (0.742221260481)*x[1]
+        ref[(1, 1)]=-0.977290916889*x_ref[0] + (0.742221260481)*x_ref[1]
+        arg[(1, 2)]=0.224754066365*x[0] + (-0.526043405766)*x[1]
+        ref[(1, 2)]=0.224754066365*x_ref[0] + (-0.526043405766)*x_ref[1]
+        arg[(1, 3)]=-0.767595380232*x[0] + (-0.91048508987)*x[1]
+        ref[(1, 3)]=-0.767595380232*x_ref[0] + (-0.91048508987)*x_ref[1]
+        arg[(2, 0)]=0.579361430133*x[0] + (-0.408262073237)*x[1]
+        ref[(2, 0)]=0.579361430133*x_ref[0] + (-0.408262073237)*x_ref[1]
+        arg[(2, 1)]=0.975745279925*x[0] + (0.5030487808)*x[1]
+        ref[(2, 1)]=0.975745279925*x_ref[0] + (0.5030487808)*x_ref[1]
+        arg[(2, 2)]=-0.926207860551*x[0] + (0.23305263599)*x[1]
+        ref[(2, 2)]=-0.926207860551*x_ref[0] + (0.23305263599)*x_ref[1]
+        arg[(2, 3)]=-0.233299193235*x[0] + (-0.165288241586)*x[1]
+        ref[(2, 3)]=-0.233299193235*x_ref[0] + (-0.165288241586)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.280625478891*x[2]
+            ref[(0, 0)]+=0.280625478891*x_ref[2]
+            arg[(0, 1)]+=-0.31675367192*x[2]
+            ref[(0, 1)]+=-0.31675367192*x_ref[2]
+            arg[(0, 2)]+=-0.53209082785*x[2]
+            ref[(0, 2)]+=-0.53209082785*x_ref[2]
+            arg[(0, 3)]+=-0.924594215533*x[2]
+            ref[(0, 3)]+=-0.924594215533*x_ref[2]
+            arg[(1, 0)]+=0.542470364929*x[2]
+            ref[(1, 0)]+=0.542470364929*x_ref[2]
+            arg[(1, 1)]+=-0.8494864236*x[2]
+            ref[(1, 1)]+=-0.8494864236*x_ref[2]
+            arg[(1, 2)]+=0.272952832744*x[2]
+            ref[(1, 2)]+=0.272952832744*x_ref[2]
+            arg[(1, 3)]+=0.252531464598*x[2]
+            ref[(1, 3)]+=0.252531464598*x_ref[2]
+            arg[(2, 0)]+=0.503403092379*x[2]
+            ref[(2, 0)]+=0.503403092379*x_ref[2]
+            arg[(2, 1)]+=-0.930300046731*x[2]
+            ref[(2, 1)]+=-0.930300046731*x_ref[2]
+            arg[(2, 2)]+=-0.669597322959*x[2]
+            ref[(2, 2)]+=-0.669597322959*x_ref[2]
+            arg[(2, 3)]+=0.16362480049*x[2]
+            ref[(2, 3)]+=0.16362480049*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2),w)
+        ref = Data(0,(4, 2, 2),w_ref)
+        arg[(0, 0, 0)]=-0.199413368057*x[0] + (0.718598149383)*x[1]
+        ref[(0, 0, 0)]=-0.199413368057*x_ref[0] + (0.718598149383)*x_ref[1]
+        arg[(0, 0, 1)]=0.121141297648*x[0] + (-0.967854912401)*x[1]
+        ref[(0, 0, 1)]=0.121141297648*x_ref[0] + (-0.967854912401)*x_ref[1]
+        arg[(0, 1, 0)]=-0.623051183289*x[0] + (0.501274281213)*x[1]
+        ref[(0, 1, 0)]=-0.623051183289*x_ref[0] + (0.501274281213)*x_ref[1]
+        arg[(0, 1, 1)]=0.782541566075*x[0] + (-0.734947571901)*x[1]
+        ref[(0, 1, 1)]=0.782541566075*x_ref[0] + (-0.734947571901)*x_ref[1]
+        arg[(1, 0, 0)]=0.249043034384*x[0] + (0.180480513868)*x[1]
+        ref[(1, 0, 0)]=0.249043034384*x_ref[0] + (0.180480513868)*x_ref[1]
+        arg[(1, 0, 1)]=-0.0111548999729*x[0] + (0.233798886011)*x[1]
+        ref[(1, 0, 1)]=-0.0111548999729*x_ref[0] + (0.233798886011)*x_ref[1]
+        arg[(1, 1, 0)]=0.191024061618*x[0] + (-0.010607352492)*x[1]
+        ref[(1, 1, 0)]=0.191024061618*x_ref[0] + (-0.010607352492)*x_ref[1]
+        arg[(1, 1, 1)]=0.650805437967*x[0] + (0.550089653885)*x[1]
+        ref[(1, 1, 1)]=0.650805437967*x_ref[0] + (0.550089653885)*x_ref[1]
+        arg[(2, 0, 0)]=-0.50935748409*x[0] + (-0.634491477283)*x[1]
+        ref[(2, 0, 0)]=-0.50935748409*x_ref[0] + (-0.634491477283)*x_ref[1]
+        arg[(2, 0, 1)]=-0.374171074746*x[0] + (-0.982620127795)*x[1]
+        ref[(2, 0, 1)]=-0.374171074746*x_ref[0] + (-0.982620127795)*x_ref[1]
+        arg[(2, 1, 0)]=-0.77837810523*x[0] + (0.422988616878)*x[1]
+        ref[(2, 1, 0)]=-0.77837810523*x_ref[0] + (0.422988616878)*x_ref[1]
+        arg[(2, 1, 1)]=-0.0856307229181*x[0] + (-0.1025201811)*x[1]
+        ref[(2, 1, 1)]=-0.0856307229181*x_ref[0] + (-0.1025201811)*x_ref[1]
+        arg[(3, 0, 0)]=-0.355018132047*x[0] + (-0.0852499207025)*x[1]
+        ref[(3, 0, 0)]=-0.355018132047*x_ref[0] + (-0.0852499207025)*x_ref[1]
+        arg[(3, 0, 1)]=0.858871270476*x[0] + (-0.561610717959)*x[1]
+        ref[(3, 0, 1)]=0.858871270476*x_ref[0] + (-0.561610717959)*x_ref[1]
+        arg[(3, 1, 0)]=-0.517510424647*x[0] + (0.223878012641)*x[1]
+        ref[(3, 1, 0)]=-0.517510424647*x_ref[0] + (0.223878012641)*x_ref[1]
+        arg[(3, 1, 1)]=-0.254388516025*x[0] + (0.457298789124)*x[1]
+        ref[(3, 1, 1)]=-0.254388516025*x_ref[0] + (0.457298789124)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.280798123459*x[2]
+            ref[(0, 0, 0)]+=-0.280798123459*x_ref[2]
+            arg[(0, 0, 1)]+=-0.497211129136*x[2]
+            ref[(0, 0, 1)]+=-0.497211129136*x_ref[2]
+            arg[(0, 1, 0)]+=0.548463648011*x[2]
+            ref[(0, 1, 0)]+=0.548463648011*x_ref[2]
+            arg[(0, 1, 1)]+=0.152686304599*x[2]
+            ref[(0, 1, 1)]+=0.152686304599*x_ref[2]
+            arg[(1, 0, 0)]+=-0.938891620859*x[2]
+            ref[(1, 0, 0)]+=-0.938891620859*x_ref[2]
+            arg[(1, 0, 1)]+=-0.149854879038*x[2]
+            ref[(1, 0, 1)]+=-0.149854879038*x_ref[2]
+            arg[(1, 1, 0)]+=-0.630795079233*x[2]
+            ref[(1, 1, 0)]+=-0.630795079233*x_ref[2]
+            arg[(1, 1, 1)]+=0.427378040103*x[2]
+            ref[(1, 1, 1)]+=0.427378040103*x_ref[2]
+            arg[(2, 0, 0)]+=-0.866300856556*x[2]
+            ref[(2, 0, 0)]+=-0.866300856556*x_ref[2]
+            arg[(2, 0, 1)]+=-0.927901885182*x[2]
+            ref[(2, 0, 1)]+=-0.927901885182*x_ref[2]
+            arg[(2, 1, 0)]+=-0.252996820884*x[2]
+            ref[(2, 1, 0)]+=-0.252996820884*x_ref[2]
+            arg[(2, 1, 1)]+=0.39354782415*x[2]
+            ref[(2, 1, 1)]+=0.39354782415*x_ref[2]
+            arg[(3, 0, 0)]+=-0.53441696364*x[2]
+            ref[(3, 0, 0)]+=-0.53441696364*x_ref[2]
+            arg[(3, 0, 1)]+=-0.53966046964*x[2]
+            ref[(3, 0, 1)]+=-0.53966046964*x_ref[2]
+            arg[(3, 1, 0)]+=-0.79672391476*x[2]
+            ref[(3, 1, 0)]+=-0.79672391476*x_ref[2]
+            arg[(3, 1, 1)]+=-0.305963441874*x[2]
+            ref[(3, 1, 1)]+=-0.305963441874*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedSolution
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedSolution(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2, 4),w)
+        ref = Data(0,(3, 4, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.717355557717*x[0] + (0.291374059855)*x[1]
+        ref[(0, 0, 0, 0)]=0.717355557717*x_ref[0] + (0.291374059855)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.547806579391*x[0] + (-0.808319901504)*x[1]
+        ref[(0, 0, 0, 1)]=0.547806579391*x_ref[0] + (-0.808319901504)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.35526760841*x[0] + (-0.992397517406)*x[1]
+        ref[(0, 0, 0, 2)]=-0.35526760841*x_ref[0] + (-0.992397517406)*x_ref[1]
+        arg[(0, 0, 0, 3)]=-0.975135493287*x[0] + (-0.590156779353)*x[1]
+        ref[(0, 0, 0, 3)]=-0.975135493287*x_ref[0] + (-0.590156779353)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.00727174171635*x[0] + (0.36973998926)*x[1]
+        ref[(0, 0, 1, 0)]=0.00727174171635*x_ref[0] + (0.36973998926)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.990670404187*x[0] + (0.039652193735)*x[1]
+        ref[(0, 0, 1, 1)]=0.990670404187*x_ref[0] + (0.039652193735)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.00284672135802*x[0] + (0.841172283606)*x[1]
+        ref[(0, 0, 1, 2)]=0.00284672135802*x_ref[0] + (0.841172283606)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.376455043599*x[0] + (-0.334352194913)*x[1]
+        ref[(0, 0, 1, 3)]=0.376455043599*x_ref[0] + (-0.334352194913)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.658164774966*x[0] + (-0.58606428605)*x[1]
+        ref[(0, 1, 0, 0)]=-0.658164774966*x_ref[0] + (-0.58606428605)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.362730398589*x[0] + (-0.320080162391)*x[1]
+        ref[(0, 1, 0, 1)]=-0.362730398589*x_ref[0] + (-0.320080162391)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.668118643598*x[0] + (-0.763047949146)*x[1]
+        ref[(0, 1, 0, 2)]=0.668118643598*x_ref[0] + (-0.763047949146)*x_ref[1]
+        arg[(0, 1, 0, 3)]=-0.340262641551*x[0] + (-0.77227942467)*x[1]
+        ref[(0, 1, 0, 3)]=-0.340262641551*x_ref[0] + (-0.77227942467)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.858665843433*x[0] + (-0.110077224544)*x[1]
+        ref[(0, 1, 1, 0)]=0.858665843433*x_ref[0] + (-0.110077224544)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.496266055494*x[0] + (0.90566838938)*x[1]
+        ref[(0, 1, 1, 1)]=-0.496266055494*x_ref[0] + (0.90566838938)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.904313342779*x[0] + (-0.524766666231)*x[1]
+        ref[(0, 1, 1, 2)]=-0.904313342779*x_ref[0] + (-0.524766666231)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.101716263101*x[0] + (0.640495554503)*x[1]
+        ref[(0, 1, 1, 3)]=-0.101716263101*x_ref[0] + (0.640495554503)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.24765438179*x[0] + (0.114073437022)*x[1]
+        ref[(0, 2, 0, 0)]=0.24765438179*x_ref[0] + (0.114073437022)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.705824379192*x[0] + (-0.101526071928)*x[1]
+        ref[(0, 2, 0, 1)]=0.705824379192*x_ref[0] + (-0.101526071928)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.546401706441*x[0] + (0.39826666641)*x[1]
+        ref[(0, 2, 0, 2)]=-0.546401706441*x_ref[0] + (0.39826666641)*x_ref[1]
+        arg[(0, 2, 0, 3)]=-0.978611948341*x[0] + (-0.464244108992)*x[1]
+        ref[(0, 2, 0, 3)]=-0.978611948341*x_ref[0] + (-0.464244108992)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.170568181116*x[0] + (-0.18960005313)*x[1]
+        ref[(0, 2, 1, 0)]=0.170568181116*x_ref[0] + (-0.18960005313)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.0470466045409*x[0] + (0.912625741216)*x[1]
+        ref[(0, 2, 1, 1)]=0.0470466045409*x_ref[0] + (0.912625741216)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.159931940484*x[0] + (-0.223945750208)*x[1]
+        ref[(0, 2, 1, 2)]=-0.159931940484*x_ref[0] + (-0.223945750208)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.304355311866*x[0] + (0.788529769914)*x[1]
+        ref[(0, 2, 1, 3)]=0.304355311866*x_ref[0] + (0.788529769914)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.241098288113*x[0] + (-0.633953806127)*x[1]
+        ref[(0, 3, 0, 0)]=0.241098288113*x_ref[0] + (-0.633953806127)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.0439095241558*x[0] + (0.623371862396)*x[1]
+        ref[(0, 3, 0, 1)]=0.0439095241558*x_ref[0] + (0.623371862396)*x_ref[1]
+        arg[(0, 3, 0, 2)]=0.509421683237*x[0] + (-0.513259153023)*x[1]
+        ref[(0, 3, 0, 2)]=0.509421683237*x_ref[0] + (-0.513259153023)*x_ref[1]
+        arg[(0, 3, 0, 3)]=-0.569573759894*x[0] + (-0.369468539924)*x[1]
+        ref[(0, 3, 0, 3)]=-0.569573759894*x_ref[0] + (-0.369468539924)*x_ref[1]
+        arg[(0, 3, 1, 0)]=-0.100170375743*x[0] + (0.779809081493)*x[1]
+        ref[(0, 3, 1, 0)]=-0.100170375743*x_ref[0] + (0.779809081493)*x_ref[1]
+        arg[(0, 3, 1, 1)]=-0.346126119938*x[0] + (-0.0603296818015)*x[1]
+        ref[(0, 3, 1, 1)]=-0.346126119938*x_ref[0] + (-0.0603296818015)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.104172133117*x[0] + (0.177065666405)*x[1]
+        ref[(0, 3, 1, 2)]=-0.104172133117*x_ref[0] + (0.177065666405)*x_ref[1]
+        arg[(0, 3, 1, 3)]=0.537506698908*x[0] + (0.792753758883)*x[1]
+        ref[(0, 3, 1, 3)]=0.537506698908*x_ref[0] + (0.792753758883)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.838934673909*x[0] + (-0.384003737612)*x[1]
+        ref[(1, 0, 0, 0)]=0.838934673909*x_ref[0] + (-0.384003737612)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.124370558711*x[0] + (0.555211379728)*x[1]
+        ref[(1, 0, 0, 1)]=-0.124370558711*x_ref[0] + (0.555211379728)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.387757305744*x[0] + (0.674643238775)*x[1]
+        ref[(1, 0, 0, 2)]=0.387757305744*x_ref[0] + (0.674643238775)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.40088532539*x[0] + (-0.462073987195)*x[1]
+        ref[(1, 0, 0, 3)]=-0.40088532539*x_ref[0] + (-0.462073987195)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.469783134143*x[0] + (-0.571235562)*x[1]
+        ref[(1, 0, 1, 0)]=-0.469783134143*x_ref[0] + (-0.571235562)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.0378277772691*x[0] + (-0.354784897085)*x[1]
+        ref[(1, 0, 1, 1)]=-0.0378277772691*x_ref[0] + (-0.354784897085)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.601875511116*x[0] + (0.237755499303)*x[1]
+        ref[(1, 0, 1, 2)]=0.601875511116*x_ref[0] + (0.237755499303)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.453011915851*x[0] + (-0.188013172968)*x[1]
+        ref[(1, 0, 1, 3)]=0.453011915851*x_ref[0] + (-0.188013172968)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.742786522922*x[0] + (-0.78415206249)*x[1]
+        ref[(1, 1, 0, 0)]=-0.742786522922*x_ref[0] + (-0.78415206249)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.905709007843*x[0] + (-0.485650475202)*x[1]
+        ref[(1, 1, 0, 1)]=0.905709007843*x_ref[0] + (-0.485650475202)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.0155647629453*x[0] + (-0.670702579787)*x[1]
+        ref[(1, 1, 0, 2)]=0.0155647629453*x_ref[0] + (-0.670702579787)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.451914200793*x[0] + (-0.607947905044)*x[1]
+        ref[(1, 1, 0, 3)]=0.451914200793*x_ref[0] + (-0.607947905044)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.647061697727*x[0] + (0.45592559662)*x[1]
+        ref[(1, 1, 1, 0)]=0.647061697727*x_ref[0] + (0.45592559662)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.247430654424*x[0] + (-0.228871816355)*x[1]
+        ref[(1, 1, 1, 1)]=0.247430654424*x_ref[0] + (-0.228871816355)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.901736308827*x[0] + (-0.495909946783)*x[1]
+        ref[(1, 1, 1, 2)]=-0.901736308827*x_ref[0] + (-0.495909946783)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.0490175996538*x[0] + (-0.0821639677493)*x[1]
+        ref[(1, 1, 1, 3)]=0.0490175996538*x_ref[0] + (-0.0821639677493)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.0828361668735*x[0] + (0.024645455665)*x[1]
+        ref[(1, 2, 0, 0)]=0.0828361668735*x_ref[0] + (0.024645455665)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.550652243613*x[0] + (0.103361561928)*x[1]
+        ref[(1, 2, 0, 1)]=-0.550652243613*x_ref[0] + (0.103361561928)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.108997001604*x[0] + (0.891713928201)*x[1]
+        ref[(1, 2, 0, 2)]=-0.108997001604*x_ref[0] + (0.891713928201)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.525648723069*x[0] + (-0.28975811168)*x[1]
+        ref[(1, 2, 0, 3)]=0.525648723069*x_ref[0] + (-0.28975811168)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.0497755114498*x[0] + (0.744847834674)*x[1]
+        ref[(1, 2, 1, 0)]=0.0497755114498*x_ref[0] + (0.744847834674)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.226625257509*x[0] + (0.12106577801)*x[1]
+        ref[(1, 2, 1, 1)]=0.226625257509*x_ref[0] + (0.12106577801)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.834210848574*x[0] + (-0.988707898446)*x[1]
+        ref[(1, 2, 1, 2)]=-0.834210848574*x_ref[0] + (-0.988707898446)*x_ref[1]
+        arg[(1, 2, 1, 3)]=-0.578579343356*x[0] + (-0.292532000226)*x[1]
+        ref[(1, 2, 1, 3)]=-0.578579343356*x_ref[0] + (-0.292532000226)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.956336813843*x[0] + (0.435664026492)*x[1]
+        ref[(1, 3, 0, 0)]=0.956336813843*x_ref[0] + (0.435664026492)*x_ref[1]
+        arg[(1, 3, 0, 1)]=0.743835205341*x[0] + (0.936593657964)*x[1]
+        ref[(1, 3, 0, 1)]=0.743835205341*x_ref[0] + (0.936593657964)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.0644441639203*x[0] + (-0.898711142842)*x[1]
+        ref[(1, 3, 0, 2)]=0.0644441639203*x_ref[0] + (-0.898711142842)*x_ref[1]
+        arg[(1, 3, 0, 3)]=0.240900744211*x[0] + (0.77547761889)*x[1]
+        ref[(1, 3, 0, 3)]=0.240900744211*x_ref[0] + (0.77547761889)*x_ref[1]
+        arg[(1, 3, 1, 0)]=0.935391179344*x[0] + (0.139906703335)*x[1]
+        ref[(1, 3, 1, 0)]=0.935391179344*x_ref[0] + (0.139906703335)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.512370291467*x[0] + (-0.633037772072)*x[1]
+        ref[(1, 3, 1, 1)]=0.512370291467*x_ref[0] + (-0.633037772072)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.0654765287215*x[0] + (0.898947779223)*x[1]
+        ref[(1, 3, 1, 2)]=0.0654765287215*x_ref[0] + (0.898947779223)*x_ref[1]
+        arg[(1, 3, 1, 3)]=0.556338398264*x[0] + (-0.625831180809)*x[1]
+        ref[(1, 3, 1, 3)]=0.556338398264*x_ref[0] + (-0.625831180809)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.326764187627*x[0] + (0.746111145208)*x[1]
+        ref[(2, 0, 0, 0)]=0.326764187627*x_ref[0] + (0.746111145208)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.26563873513*x[0] + (0.642147535264)*x[1]
+        ref[(2, 0, 0, 1)]=-0.26563873513*x_ref[0] + (0.642147535264)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.100280155714*x[0] + (0.982778642854)*x[1]
+        ref[(2, 0, 0, 2)]=0.100280155714*x_ref[0] + (0.982778642854)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.898926823901*x[0] + (0.638602307458)*x[1]
+        ref[(2, 0, 0, 3)]=-0.898926823901*x_ref[0] + (0.638602307458)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.705563395592*x[0] + (0.232066951072)*x[1]
+        ref[(2, 0, 1, 0)]=0.705563395592*x_ref[0] + (0.232066951072)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.244335872744*x[0] + (-0.381514047128)*x[1]
+        ref[(2, 0, 1, 1)]=-0.244335872744*x_ref[0] + (-0.381514047128)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.685990352886*x[0] + (-0.572835720631)*x[1]
+        ref[(2, 0, 1, 2)]=0.685990352886*x_ref[0] + (-0.572835720631)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.65715902032*x[0] + (0.104229396872)*x[1]
+        ref[(2, 0, 1, 3)]=0.65715902032*x_ref[0] + (0.104229396872)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.58154093769*x[0] + (-0.572720254982)*x[1]
+        ref[(2, 1, 0, 0)]=-0.58154093769*x_ref[0] + (-0.572720254982)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.355683046628*x[0] + (0.786882164089)*x[1]
+        ref[(2, 1, 0, 1)]=0.355683046628*x_ref[0] + (0.786882164089)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.26542107023*x[0] + (-0.216642246374)*x[1]
+        ref[(2, 1, 0, 2)]=-0.26542107023*x_ref[0] + (-0.216642246374)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.131542087371*x[0] + (0.957759437557)*x[1]
+        ref[(2, 1, 0, 3)]=-0.131542087371*x_ref[0] + (0.957759437557)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.127738182561*x[0] + (-0.419150119617)*x[1]
+        ref[(2, 1, 1, 0)]=-0.127738182561*x_ref[0] + (-0.419150119617)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.337492626172*x[0] + (0.200825912857)*x[1]
+        ref[(2, 1, 1, 1)]=0.337492626172*x_ref[0] + (0.200825912857)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.109845565778*x[0] + (-0.587634598849)*x[1]
+        ref[(2, 1, 1, 2)]=-0.109845565778*x_ref[0] + (-0.587634598849)*x_ref[1]
+        arg[(2, 1, 1, 3)]=0.544363383793*x[0] + (0.896083268711)*x[1]
+        ref[(2, 1, 1, 3)]=0.544363383793*x_ref[0] + (0.896083268711)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.834297566491*x[0] + (0.656447533044)*x[1]
+        ref[(2, 2, 0, 0)]=-0.834297566491*x_ref[0] + (0.656447533044)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.640731039062*x[0] + (0.259914481155)*x[1]
+        ref[(2, 2, 0, 1)]=0.640731039062*x_ref[0] + (0.259914481155)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.435109125792*x[0] + (-0.256386304685)*x[1]
+        ref[(2, 2, 0, 2)]=-0.435109125792*x_ref[0] + (-0.256386304685)*x_ref[1]
+        arg[(2, 2, 0, 3)]=-0.292697466266*x[0] + (0.739729814228)*x[1]
+        ref[(2, 2, 0, 3)]=-0.292697466266*x_ref[0] + (0.739729814228)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.127130310072*x[0] + (-0.339215817237)*x[1]
+        ref[(2, 2, 1, 0)]=-0.127130310072*x_ref[0] + (-0.339215817237)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.297032092407*x[0] + (-0.751288168569)*x[1]
+        ref[(2, 2, 1, 1)]=0.297032092407*x_ref[0] + (-0.751288168569)*x_ref[1]
+        arg[(2, 2, 1, 2)]=0.70498622417*x[0] + (0.655809717868)*x[1]
+        ref[(2, 2, 1, 2)]=0.70498622417*x_ref[0] + (0.655809717868)*x_ref[1]
+        arg[(2, 2, 1, 3)]=0.3064841459*x[0] + (0.496440428055)*x[1]
+        ref[(2, 2, 1, 3)]=0.3064841459*x_ref[0] + (0.496440428055)*x_ref[1]
+        arg[(2, 3, 0, 0)]=-0.503239993023*x[0] + (-0.0691613533194)*x[1]
+        ref[(2, 3, 0, 0)]=-0.503239993023*x_ref[0] + (-0.0691613533194)*x_ref[1]
+        arg[(2, 3, 0, 1)]=-0.346713102355*x[0] + (-0.863056897496)*x[1]
+        ref[(2, 3, 0, 1)]=-0.346713102355*x_ref[0] + (-0.863056897496)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.451955430406*x[0] + (0.00884081755386)*x[1]
+        ref[(2, 3, 0, 2)]=0.451955430406*x_ref[0] + (0.00884081755386)*x_ref[1]
+        arg[(2, 3, 0, 3)]=-0.370698199015*x[0] + (-0.656698473161)*x[1]
+        ref[(2, 3, 0, 3)]=-0.370698199015*x_ref[0] + (-0.656698473161)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.849863127991*x[0] + (-0.367540340492)*x[1]
+        ref[(2, 3, 1, 0)]=0.849863127991*x_ref[0] + (-0.367540340492)*x_ref[1]
+        arg[(2, 3, 1, 1)]=0.969358830567*x[0] + (-0.280031433729)*x[1]
+        ref[(2, 3, 1, 1)]=0.969358830567*x_ref[0] + (-0.280031433729)*x_ref[1]
+        arg[(2, 3, 1, 2)]=0.39599748328*x[0] + (-0.658217007677)*x[1]
+        ref[(2, 3, 1, 2)]=0.39599748328*x_ref[0] + (-0.658217007677)*x_ref[1]
+        arg[(2, 3, 1, 3)]=-0.541161044811*x[0] + (0.613200329729)*x[1]
+        ref[(2, 3, 1, 3)]=-0.541161044811*x_ref[0] + (0.613200329729)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.301799013356*x[2]
+            ref[(0, 0, 0, 0)]+=-0.301799013356*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.459808980998*x[2]
+            ref[(0, 0, 0, 1)]+=-0.459808980998*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.841923718726*x[2]
+            ref[(0, 0, 0, 2)]+=0.841923718726*x_ref[2]
+            arg[(0, 0, 0, 3)]+=-0.840097229352*x[2]
+            ref[(0, 0, 0, 3)]+=-0.840097229352*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.213200837562*x[2]
+            ref[(0, 0, 1, 0)]+=0.213200837562*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.77948373544*x[2]
+            ref[(0, 0, 1, 1)]+=-0.77948373544*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.67238780444*x[2]
+            ref[(0, 0, 1, 2)]+=0.67238780444*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.786528374581*x[2]
+            ref[(0, 0, 1, 3)]+=0.786528374581*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.513377460054*x[2]
+            ref[(0, 1, 0, 0)]+=-0.513377460054*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.753757839583*x[2]
+            ref[(0, 1, 0, 1)]+=0.753757839583*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.500700958497*x[2]
+            ref[(0, 1, 0, 2)]+=0.500700958497*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.0292250746514*x[2]
+            ref[(0, 1, 0, 3)]+=0.0292250746514*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.197765385109*x[2]
+            ref[(0, 1, 1, 0)]+=-0.197765385109*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.835546142372*x[2]
+            ref[(0, 1, 1, 1)]+=-0.835546142372*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.538082151044*x[2]
+            ref[(0, 1, 1, 2)]+=-0.538082151044*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.0259054482259*x[2]
+            ref[(0, 1, 1, 3)]+=-0.0259054482259*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.848909040028*x[2]
+            ref[(0, 2, 0, 0)]+=0.848909040028*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.699414063357*x[2]
+            ref[(0, 2, 0, 1)]+=0.699414063357*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.0133919309571*x[2]
+            ref[(0, 2, 0, 2)]+=0.0133919309571*x_ref[2]
+            arg[(0, 2, 0, 3)]+=-0.241162553441*x[2]
+            ref[(0, 2, 0, 3)]+=-0.241162553441*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.854032654312*x[2]
+            ref[(0, 2, 1, 0)]+=0.854032654312*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.687384195214*x[2]
+            ref[(0, 2, 1, 1)]+=-0.687384195214*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.479927873878*x[2]
+            ref[(0, 2, 1, 2)]+=0.479927873878*x_ref[2]
+            arg[(0, 2, 1, 3)]+=0.456544688086*x[2]
+            ref[(0, 2, 1, 3)]+=0.456544688086*x_ref[2]
+            arg[(0, 3, 0, 0)]+=9.66202946997e-05*x[2]
+            ref[(0, 3, 0, 0)]+=9.66202946997e-05*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.147257429802*x[2]
+            ref[(0, 3, 0, 1)]+=0.147257429802*x_ref[2]
+            arg[(0, 3, 0, 2)]+=0.997458661335*x[2]
+            ref[(0, 3, 0, 2)]+=0.997458661335*x_ref[2]
+            arg[(0, 3, 0, 3)]+=-0.100844325041*x[2]
+            ref[(0, 3, 0, 3)]+=-0.100844325041*x_ref[2]
+            arg[(0, 3, 1, 0)]+=-0.96198772174*x[2]
+            ref[(0, 3, 1, 0)]+=-0.96198772174*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.197517911748*x[2]
+            ref[(0, 3, 1, 1)]+=0.197517911748*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.285997842574*x[2]
+            ref[(0, 3, 1, 2)]+=0.285997842574*x_ref[2]
+            arg[(0, 3, 1, 3)]+=0.0617212988999*x[2]
+            ref[(0, 3, 1, 3)]+=0.0617212988999*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.524979389249*x[2]
+            ref[(1, 0, 0, 0)]+=-0.524979389249*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.737148269643*x[2]
+            ref[(1, 0, 0, 1)]+=0.737148269643*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.419950721047*x[2]
+            ref[(1, 0, 0, 2)]+=0.419950721047*x_ref[2]
+            arg[(1, 0, 0, 3)]+=-0.161790872487*x[2]
+            ref[(1, 0, 0, 3)]+=-0.161790872487*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.232201936626*x[2]
+            ref[(1, 0, 1, 0)]+=0.232201936626*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.462100246873*x[2]
+            ref[(1, 0, 1, 1)]+=0.462100246873*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.284547536368*x[2]
+            ref[(1, 0, 1, 2)]+=0.284547536368*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.767474373367*x[2]
+            ref[(1, 0, 1, 3)]+=-0.767474373367*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.600731365234*x[2]
+            ref[(1, 1, 0, 0)]+=-0.600731365234*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.342287272366*x[2]
+            ref[(1, 1, 0, 1)]+=0.342287272366*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.324947873098*x[2]
+            ref[(1, 1, 0, 2)]+=-0.324947873098*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.196003915468*x[2]
+            ref[(1, 1, 0, 3)]+=-0.196003915468*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.556131135305*x[2]
+            ref[(1, 1, 1, 0)]+=0.556131135305*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.618810491081*x[2]
+            ref[(1, 1, 1, 1)]+=-0.618810491081*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.626953429943*x[2]
+            ref[(1, 1, 1, 2)]+=0.626953429943*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.462842437078*x[2]
+            ref[(1, 1, 1, 3)]+=-0.462842437078*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.28920353306*x[2]
+            ref[(1, 2, 0, 0)]+=0.28920353306*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.147865733906*x[2]
+            ref[(1, 2, 0, 1)]+=0.147865733906*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.415137764681*x[2]
+            ref[(1, 2, 0, 2)]+=0.415137764681*x_ref[2]
+            arg[(1, 2, 0, 3)]+=0.321555391257*x[2]
+            ref[(1, 2, 0, 3)]+=0.321555391257*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.894306199129*x[2]
+            ref[(1, 2, 1, 0)]+=-0.894306199129*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.205383283825*x[2]
+            ref[(1, 2, 1, 1)]+=-0.205383283825*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.792773150546*x[2]
+            ref[(1, 2, 1, 2)]+=-0.792773150546*x_ref[2]
+            arg[(1, 2, 1, 3)]+=-0.196094312098*x[2]
+            ref[(1, 2, 1, 3)]+=-0.196094312098*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.825989580313*x[2]
+            ref[(1, 3, 0, 0)]+=0.825989580313*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.421486689015*x[2]
+            ref[(1, 3, 0, 1)]+=0.421486689015*x_ref[2]
+            arg[(1, 3, 0, 2)]+=0.661655121499*x[2]
+            ref[(1, 3, 0, 2)]+=0.661655121499*x_ref[2]
+            arg[(1, 3, 0, 3)]+=0.784953061411*x[2]
+            ref[(1, 3, 0, 3)]+=0.784953061411*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.227800574462*x[2]
+            ref[(1, 3, 1, 0)]+=0.227800574462*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.940277356314*x[2]
+            ref[(1, 3, 1, 1)]+=-0.940277356314*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.897406620369*x[2]
+            ref[(1, 3, 1, 2)]+=0.897406620369*x_ref[2]
+            arg[(1, 3, 1, 3)]+=-0.571979538679*x[2]
+            ref[(1, 3, 1, 3)]+=-0.571979538679*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.118106332131*x[2]
+            ref[(2, 0, 0, 0)]+=0.118106332131*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.695566646941*x[2]
+            ref[(2, 0, 0, 1)]+=-0.695566646941*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.0414056035806*x[2]
+            ref[(2, 0, 0, 2)]+=0.0414056035806*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.356513760868*x[2]
+            ref[(2, 0, 0, 3)]+=-0.356513760868*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.279455182417*x[2]
+            ref[(2, 0, 1, 0)]+=-0.279455182417*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.0916879391682*x[2]
+            ref[(2, 0, 1, 1)]+=0.0916879391682*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.205710580945*x[2]
+            ref[(2, 0, 1, 2)]+=-0.205710580945*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.697689655183*x[2]
+            ref[(2, 0, 1, 3)]+=0.697689655183*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.505031160214*x[2]
+            ref[(2, 1, 0, 0)]+=0.505031160214*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.358309316823*x[2]
+            ref[(2, 1, 0, 1)]+=-0.358309316823*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.784471946094*x[2]
+            ref[(2, 1, 0, 2)]+=0.784471946094*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.701306683779*x[2]
+            ref[(2, 1, 0, 3)]+=-0.701306683779*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.502644577777*x[2]
+            ref[(2, 1, 1, 0)]+=0.502644577777*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.976573087722*x[2]
+            ref[(2, 1, 1, 1)]+=0.976573087722*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.494136866135*x[2]
+            ref[(2, 1, 1, 2)]+=-0.494136866135*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.106458287277*x[2]
+            ref[(2, 1, 1, 3)]+=-0.106458287277*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.348101570941*x[2]
+            ref[(2, 2, 0, 0)]+=-0.348101570941*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.288666293412*x[2]
+            ref[(2, 2, 0, 1)]+=0.288666293412*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.686201536913*x[2]
+            ref[(2, 2, 0, 2)]+=-0.686201536913*x_ref[2]
+            arg[(2, 2, 0, 3)]+=-0.0818349305074*x[2]
+            ref[(2, 2, 0, 3)]+=-0.0818349305074*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.245772403349*x[2]
+            ref[(2, 2, 1, 0)]+=0.245772403349*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.23800443729*x[2]
+            ref[(2, 2, 1, 1)]+=-0.23800443729*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.302921691202*x[2]
+            ref[(2, 2, 1, 2)]+=-0.302921691202*x_ref[2]
+            arg[(2, 2, 1, 3)]+=-0.915773799358*x[2]
+            ref[(2, 2, 1, 3)]+=-0.915773799358*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.820421946078*x[2]
+            ref[(2, 3, 0, 0)]+=-0.820421946078*x_ref[2]
+            arg[(2, 3, 0, 1)]+=-0.0608017383315*x[2]
+            ref[(2, 3, 0, 1)]+=-0.0608017383315*x_ref[2]
+            arg[(2, 3, 0, 2)]+=0.803001006781*x[2]
+            ref[(2, 3, 0, 2)]+=0.803001006781*x_ref[2]
+            arg[(2, 3, 0, 3)]+=-0.462202291576*x[2]
+            ref[(2, 3, 0, 3)]+=-0.462202291576*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.523073252927*x[2]
+            ref[(2, 3, 1, 0)]+=-0.523073252927*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.0609546178986*x[2]
+            ref[(2, 3, 1, 1)]+=0.0609546178986*x_ref[2]
+            arg[(2, 3, 1, 2)]+=-0.37697537399*x[2]
+            ref[(2, 3, 1, 2)]+=-0.37697537399*x_ref[2]
+            arg[(2, 3, 1, 3)]+=0.669014966618*x[2]
+            ref[(2, 3, 1, 3)]+=0.669014966618*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.378978430708*x[0]**o + (-0.163569989298)*x[0] + (-0.0372799872876)*x[1]**o + (0.743643471109)*x[1]
+        ref=0.378978430708*x_ref[0]**o + (-0.163569989298)*x_ref[0] + (-0.0372799872876)*x_ref[1]**o + (0.743643471109)*x_ref[1]
+        if dim==3:
+            arg+=(0.0165682002687)*x[2]**o + (-0.553073529331)*x[2]
+            ref+=(0.0165682002687)*x_ref[2]**o + (-0.553073529331)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=-0.896348124834*x[0]**o + (0.446296369148)*x[0] + (-0.904223412033)*x[1]**o + (-0.629185144183)*x[1]
+        ref[(0,)]=-0.896348124834*x_ref[0]**o + (0.446296369148)*x_ref[0] + (-0.904223412033)*x_ref[1]**o + (-0.629185144183)*x_ref[1]
+        arg[(1,)]=-0.930827325045*x[0]**o + (0.749715959648)*x[0] + (0.334071155516)*x[1]**o + (-0.715797890352)*x[1]
+        ref[(1,)]=-0.930827325045*x_ref[0]**o + (0.749715959648)*x_ref[0] + (0.334071155516)*x_ref[1]**o + (-0.715797890352)*x_ref[1]
+        arg[(2,)]=0.873566265289*x[0]**o + (-0.456095774324)*x[0] + (0.912811258266)*x[1]**o + (0.682092231563)*x[1]
+        ref[(2,)]=0.873566265289*x_ref[0]**o + (-0.456095774324)*x_ref[0] + (0.912811258266)*x_ref[1]**o + (0.682092231563)*x_ref[1]
+        arg[(3,)]=-0.821440680849*x[0]**o + (-0.819389877093)*x[0] + (-0.67107710748)*x[1]**o + (-0.109743341662)*x[1]
+        ref[(3,)]=-0.821440680849*x_ref[0]**o + (-0.819389877093)*x_ref[0] + (-0.67107710748)*x_ref[1]**o + (-0.109743341662)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.122232622379*x[2]**o + (-0.431837491215)*x[2]
+            ref[(0,)]+=-0.122232622379*x_ref[2]**o + (-0.431837491215)*x_ref[2]
+            arg[(1,)]+=-0.510106056966*x[2]**o + (-0.19182379431)*x[2]
+            ref[(1,)]+=-0.510106056966*x_ref[2]**o + (-0.19182379431)*x_ref[2]
+            arg[(2,)]+=-0.929262010563*x[2]**o + (0.277860254836)*x[2]
+            ref[(2,)]+=-0.929262010563*x_ref[2]**o + (0.277860254836)*x_ref[2]
+            arg[(3,)]+=0.600462148497*x[2]**o + (-0.779219636228)*x[2]
+            ref[(3,)]+=0.600462148497*x_ref[2]**o + (-0.779219636228)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=-0.337380190098*x[0]**o + (-0.852138992888)*x[0] + (0.298315689764)*x[1]**o + (0.59101134838)*x[1]
+        ref[(0, 0)]=-0.337380190098*x_ref[0]**o + (-0.852138992888)*x_ref[0] + (0.298315689764)*x_ref[1]**o + (0.59101134838)*x_ref[1]
+        arg[(0, 1)]=-0.229297241959*x[0]**o + (-0.974916402795)*x[0] + (0.181906903718)*x[1]**o + (-0.991646987922)*x[1]
+        ref[(0, 1)]=-0.229297241959*x_ref[0]**o + (-0.974916402795)*x_ref[0] + (0.181906903718)*x_ref[1]**o + (-0.991646987922)*x_ref[1]
+        arg[(0, 2)]=-0.226887143532*x[0]**o + (0.421502436537)*x[0] + (0.413650429543)*x[1]**o + (-0.468630698932)*x[1]
+        ref[(0, 2)]=-0.226887143532*x_ref[0]**o + (0.421502436537)*x_ref[0] + (0.413650429543)*x_ref[1]**o + (-0.468630698932)*x_ref[1]
+        arg[(1, 0)]=-0.458000131394*x[0]**o + (-0.0979743294081)*x[0] + (0.931383099796)*x[1]**o + (0.759922086962)*x[1]
+        ref[(1, 0)]=-0.458000131394*x_ref[0]**o + (-0.0979743294081)*x_ref[0] + (0.931383099796)*x_ref[1]**o + (0.759922086962)*x_ref[1]
+        arg[(1, 1)]=0.120606309582*x[0]**o + (0.392410033531)*x[0] + (-0.933789942464)*x[1]**o + (-0.626703662196)*x[1]
+        ref[(1, 1)]=0.120606309582*x_ref[0]**o + (0.392410033531)*x_ref[0] + (-0.933789942464)*x_ref[1]**o + (-0.626703662196)*x_ref[1]
+        arg[(1, 2)]=-0.874922042233*x[0]**o + (-0.754216213113)*x[0] + (-0.415593278444)*x[1]**o + (0.254245389287)*x[1]
+        ref[(1, 2)]=-0.874922042233*x_ref[0]**o + (-0.754216213113)*x_ref[0] + (-0.415593278444)*x_ref[1]**o + (0.254245389287)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.805575013691*x[2]**o + (-0.144731766836)*x[2]
+            ref[(0, 0)]+=-0.805575013691*x_ref[2]**o + (-0.144731766836)*x_ref[2]
+            arg[(0, 1)]+=0.67974768202*x[2]**o + (0.836928322127)*x[2]
+            ref[(0, 1)]+=0.67974768202*x_ref[2]**o + (0.836928322127)*x_ref[2]
+            arg[(0, 2)]+=0.614193795285*x[2]**o + (0.24571317411)*x[2]
+            ref[(0, 2)]+=0.614193795285*x_ref[2]**o + (0.24571317411)*x_ref[2]
+            arg[(1, 0)]+=-0.329803832899*x[2]**o + (0.0848452238992)*x[2]
+            ref[(1, 0)]+=-0.329803832899*x_ref[2]**o + (0.0848452238992)*x_ref[2]
+            arg[(1, 1)]+=-0.945511474415*x[2]**o + (0.493633236604)*x[2]
+            ref[(1, 1)]+=-0.945511474415*x_ref[2]**o + (0.493633236604)*x_ref[2]
+            arg[(1, 2)]+=0.129412439976*x[2]**o + (0.40038801346)*x[2]
+            ref[(1, 2)]+=0.129412439976*x_ref[2]**o + (0.40038801346)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2),w)
+        ref = Data(0,(4, 4, 2),w_ref)
+        arg[(0, 0, 0)]=0.472562290379*x[0]**o + (0.880589657581)*x[0] + (0.383411820398)*x[1]**o + (0.204539941389)*x[1]
+        ref[(0, 0, 0)]=0.472562290379*x_ref[0]**o + (0.880589657581)*x_ref[0] + (0.383411820398)*x_ref[1]**o + (0.204539941389)*x_ref[1]
+        arg[(0, 0, 1)]=-0.518122109009*x[0]**o + (-0.475884169785)*x[0] + (-0.118277065767)*x[1]**o + (-0.564229054407)*x[1]
+        ref[(0, 0, 1)]=-0.518122109009*x_ref[0]**o + (-0.475884169785)*x_ref[0] + (-0.118277065767)*x_ref[1]**o + (-0.564229054407)*x_ref[1]
+        arg[(0, 1, 0)]=-0.194081496658*x[0]**o + (-0.600830146086)*x[0] + (0.447292244468)*x[1]**o + (-0.367309424031)*x[1]
+        ref[(0, 1, 0)]=-0.194081496658*x_ref[0]**o + (-0.600830146086)*x_ref[0] + (0.447292244468)*x_ref[1]**o + (-0.367309424031)*x_ref[1]
+        arg[(0, 1, 1)]=-0.0962817757664*x[0]**o + (-0.210019847742)*x[0] + (0.428639068829)*x[1]**o + (-0.370058727368)*x[1]
+        ref[(0, 1, 1)]=-0.0962817757664*x_ref[0]**o + (-0.210019847742)*x_ref[0] + (0.428639068829)*x_ref[1]**o + (-0.370058727368)*x_ref[1]
+        arg[(0, 2, 0)]=-0.799288127471*x[0]**o + (-0.255268930497)*x[0] + (0.859729589795)*x[1]**o + (-0.937264604608)*x[1]
+        ref[(0, 2, 0)]=-0.799288127471*x_ref[0]**o + (-0.255268930497)*x_ref[0] + (0.859729589795)*x_ref[1]**o + (-0.937264604608)*x_ref[1]
+        arg[(0, 2, 1)]=-0.566948157115*x[0]**o + (-0.257707138104)*x[0] + (0.813358056492)*x[1]**o + (-0.741456999812)*x[1]
+        ref[(0, 2, 1)]=-0.566948157115*x_ref[0]**o + (-0.257707138104)*x_ref[0] + (0.813358056492)*x_ref[1]**o + (-0.741456999812)*x_ref[1]
+        arg[(0, 3, 0)]=0.305379799418*x[0]**o + (0.764066070111)*x[0] + (0.165521342961)*x[1]**o + (-0.429759501217)*x[1]
+        ref[(0, 3, 0)]=0.305379799418*x_ref[0]**o + (0.764066070111)*x_ref[0] + (0.165521342961)*x_ref[1]**o + (-0.429759501217)*x_ref[1]
+        arg[(0, 3, 1)]=-0.054145483978*x[0]**o + (-0.311691824332)*x[0] + (-0.701848479415)*x[1]**o + (0.399019887833)*x[1]
+        ref[(0, 3, 1)]=-0.054145483978*x_ref[0]**o + (-0.311691824332)*x_ref[0] + (-0.701848479415)*x_ref[1]**o + (0.399019887833)*x_ref[1]
+        arg[(1, 0, 0)]=-0.363562249186*x[0]**o + (0.437178639019)*x[0] + (-0.547848572103)*x[1]**o + (0.425250740321)*x[1]
+        ref[(1, 0, 0)]=-0.363562249186*x_ref[0]**o + (0.437178639019)*x_ref[0] + (-0.547848572103)*x_ref[1]**o + (0.425250740321)*x_ref[1]
+        arg[(1, 0, 1)]=0.497767560891*x[0]**o + (-0.561068222162)*x[0] + (0.643475244208)*x[1]**o + (-0.946108992536)*x[1]
+        ref[(1, 0, 1)]=0.497767560891*x_ref[0]**o + (-0.561068222162)*x_ref[0] + (0.643475244208)*x_ref[1]**o + (-0.946108992536)*x_ref[1]
+        arg[(1, 1, 0)]=-0.592035135428*x[0]**o + (-0.00492123817253)*x[0] + (-0.622515434442)*x[1]**o + (0.464343261221)*x[1]
+        ref[(1, 1, 0)]=-0.592035135428*x_ref[0]**o + (-0.00492123817253)*x_ref[0] + (-0.622515434442)*x_ref[1]**o + (0.464343261221)*x_ref[1]
+        arg[(1, 1, 1)]=-0.794708630111*x[0]**o + (-0.955883316749)*x[0] + (0.415108616455)*x[1]**o + (-0.0496642519081)*x[1]
+        ref[(1, 1, 1)]=-0.794708630111*x_ref[0]**o + (-0.955883316749)*x_ref[0] + (0.415108616455)*x_ref[1]**o + (-0.0496642519081)*x_ref[1]
+        arg[(1, 2, 0)]=0.45188568143*x[0]**o + (0.542312163783)*x[0] + (-0.492757078763)*x[1]**o + (0.708987515378)*x[1]
+        ref[(1, 2, 0)]=0.45188568143*x_ref[0]**o + (0.542312163783)*x_ref[0] + (-0.492757078763)*x_ref[1]**o + (0.708987515378)*x_ref[1]
+        arg[(1, 2, 1)]=-0.832639887141*x[0]**o + (0.923592905291)*x[0] + (-0.616116428273)*x[1]**o + (0.0890344114732)*x[1]
+        ref[(1, 2, 1)]=-0.832639887141*x_ref[0]**o + (0.923592905291)*x_ref[0] + (-0.616116428273)*x_ref[1]**o + (0.0890344114732)*x_ref[1]
+        arg[(1, 3, 0)]=0.813687144012*x[0]**o + (-0.017681512003)*x[0] + (0.77298517789)*x[1]**o + (0.676903024087)*x[1]
+        ref[(1, 3, 0)]=0.813687144012*x_ref[0]**o + (-0.017681512003)*x_ref[0] + (0.77298517789)*x_ref[1]**o + (0.676903024087)*x_ref[1]
+        arg[(1, 3, 1)]=-0.14930699162*x[0]**o + (0.127790684909)*x[0] + (-0.0800717411223)*x[1]**o + (0.399089200387)*x[1]
+        ref[(1, 3, 1)]=-0.14930699162*x_ref[0]**o + (0.127790684909)*x_ref[0] + (-0.0800717411223)*x_ref[1]**o + (0.399089200387)*x_ref[1]
+        arg[(2, 0, 0)]=0.469779330559*x[0]**o + (0.717780945751)*x[0] + (0.89311756978)*x[1]**o + (0.202036537409)*x[1]
+        ref[(2, 0, 0)]=0.469779330559*x_ref[0]**o + (0.717780945751)*x_ref[0] + (0.89311756978)*x_ref[1]**o + (0.202036537409)*x_ref[1]
+        arg[(2, 0, 1)]=0.818041585088*x[0]**o + (0.918596198424)*x[0] + (0.353011464885)*x[1]**o + (0.233886900318)*x[1]
+        ref[(2, 0, 1)]=0.818041585088*x_ref[0]**o + (0.918596198424)*x_ref[0] + (0.353011464885)*x_ref[1]**o + (0.233886900318)*x_ref[1]
+        arg[(2, 1, 0)]=0.875783380814*x[0]**o + (0.775301254624)*x[0] + (-0.997255045643)*x[1]**o + (0.747755393187)*x[1]
+        ref[(2, 1, 0)]=0.875783380814*x_ref[0]**o + (0.775301254624)*x_ref[0] + (-0.997255045643)*x_ref[1]**o + (0.747755393187)*x_ref[1]
+        arg[(2, 1, 1)]=-0.459903387428*x[0]**o + (-0.858013130604)*x[0] + (-0.922485803855)*x[1]**o + (0.0351186023909)*x[1]
+        ref[(2, 1, 1)]=-0.459903387428*x_ref[0]**o + (-0.858013130604)*x_ref[0] + (-0.922485803855)*x_ref[1]**o + (0.0351186023909)*x_ref[1]
+        arg[(2, 2, 0)]=0.705723731433*x[0]**o + (0.372391766474)*x[0] + (0.711239872859)*x[1]**o + (0.294291823571)*x[1]
+        ref[(2, 2, 0)]=0.705723731433*x_ref[0]**o + (0.372391766474)*x_ref[0] + (0.711239872859)*x_ref[1]**o + (0.294291823571)*x_ref[1]
+        arg[(2, 2, 1)]=-0.880461967377*x[0]**o + (0.339398558106)*x[0] + (-0.849540338071)*x[1]**o + (0.305083516372)*x[1]
+        ref[(2, 2, 1)]=-0.880461967377*x_ref[0]**o + (0.339398558106)*x_ref[0] + (-0.849540338071)*x_ref[1]**o + (0.305083516372)*x_ref[1]
+        arg[(2, 3, 0)]=0.456912431365*x[0]**o + (0.211178267221)*x[0] + (0.599833438493)*x[1]**o + (0.736820051987)*x[1]
+        ref[(2, 3, 0)]=0.456912431365*x_ref[0]**o + (0.211178267221)*x_ref[0] + (0.599833438493)*x_ref[1]**o + (0.736820051987)*x_ref[1]
+        arg[(2, 3, 1)]=-0.738019437692*x[0]**o + (-0.986653175452)*x[0] + (0.0766988997947)*x[1]**o + (-0.193872421233)*x[1]
+        ref[(2, 3, 1)]=-0.738019437692*x_ref[0]**o + (-0.986653175452)*x_ref[0] + (0.0766988997947)*x_ref[1]**o + (-0.193872421233)*x_ref[1]
+        arg[(3, 0, 0)]=-0.159358845866*x[0]**o + (0.824072238731)*x[0] + (0.431995772788)*x[1]**o + (0.496865055446)*x[1]
+        ref[(3, 0, 0)]=-0.159358845866*x_ref[0]**o + (0.824072238731)*x_ref[0] + (0.431995772788)*x_ref[1]**o + (0.496865055446)*x_ref[1]
+        arg[(3, 0, 1)]=0.644496431528*x[0]**o + (0.024958523433)*x[0] + (-0.5363636591)*x[1]**o + (-0.407528352429)*x[1]
+        ref[(3, 0, 1)]=0.644496431528*x_ref[0]**o + (0.024958523433)*x_ref[0] + (-0.5363636591)*x_ref[1]**o + (-0.407528352429)*x_ref[1]
+        arg[(3, 1, 0)]=0.717493084804*x[0]**o + (0.988679360514)*x[0] + (0.541641019463)*x[1]**o + (0.977894020351)*x[1]
+        ref[(3, 1, 0)]=0.717493084804*x_ref[0]**o + (0.988679360514)*x_ref[0] + (0.541641019463)*x_ref[1]**o + (0.977894020351)*x_ref[1]
+        arg[(3, 1, 1)]=0.869269394608*x[0]**o + (0.491959088902)*x[0] + (-0.0227163024772)*x[1]**o + (0.742856540122)*x[1]
+        ref[(3, 1, 1)]=0.869269394608*x_ref[0]**o + (0.491959088902)*x_ref[0] + (-0.0227163024772)*x_ref[1]**o + (0.742856540122)*x_ref[1]
+        arg[(3, 2, 0)]=0.527612023553*x[0]**o + (0.657320329351)*x[0] + (0.823810645912)*x[1]**o + (-0.892844233701)*x[1]
+        ref[(3, 2, 0)]=0.527612023553*x_ref[0]**o + (0.657320329351)*x_ref[0] + (0.823810645912)*x_ref[1]**o + (-0.892844233701)*x_ref[1]
+        arg[(3, 2, 1)]=0.579067474716*x[0]**o + (0.674355251157)*x[0] + (0.585528382651)*x[1]**o + (-0.779593337298)*x[1]
+        ref[(3, 2, 1)]=0.579067474716*x_ref[0]**o + (0.674355251157)*x_ref[0] + (0.585528382651)*x_ref[1]**o + (-0.779593337298)*x_ref[1]
+        arg[(3, 3, 0)]=-0.597439805761*x[0]**o + (-0.525312079928)*x[0] + (0.494551405312)*x[1]**o + (0.733268102684)*x[1]
+        ref[(3, 3, 0)]=-0.597439805761*x_ref[0]**o + (-0.525312079928)*x_ref[0] + (0.494551405312)*x_ref[1]**o + (0.733268102684)*x_ref[1]
+        arg[(3, 3, 1)]=-0.991367477299*x[0]**o + (-0.122340736332)*x[0] + (0.887503784525)*x[1]**o + (-0.554371788337)*x[1]
+        ref[(3, 3, 1)]=-0.991367477299*x_ref[0]**o + (-0.122340736332)*x_ref[0] + (0.887503784525)*x_ref[1]**o + (-0.554371788337)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.337568091314*x[2]**o + (-0.449432747192)*x[2]
+            ref[(0, 0, 0)]+=-0.337568091314*x_ref[2]**o + (-0.449432747192)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.869432125724*x[2]**o + (0.678845157392)*x[2]
+            ref[(0, 0, 1)]+=-0.869432125724*x_ref[2]**o + (0.678845157392)*x_ref[2]
+            arg[(0, 1, 0)]+=0.137203586228*x[2]**o + (0.382282164676)*x[2]
+            ref[(0, 1, 0)]+=0.137203586228*x_ref[2]**o + (0.382282164676)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.792185293153*x[2]**o + (-0.74327642435)*x[2]
+            ref[(0, 1, 1)]+=-0.792185293153*x_ref[2]**o + (-0.74327642435)*x_ref[2]
+            arg[(0, 2, 0)]+=0.0460749620501*x[2]**o + (0.796148243514)*x[2]
+            ref[(0, 2, 0)]+=0.0460749620501*x_ref[2]**o + (0.796148243514)*x_ref[2]
+            arg[(0, 2, 1)]+=0.242659935167*x[2]**o + (-0.990428755197)*x[2]
+            ref[(0, 2, 1)]+=0.242659935167*x_ref[2]**o + (-0.990428755197)*x_ref[2]
+            arg[(0, 3, 0)]+=0.0753923868134*x[2]**o + (-0.282362211782)*x[2]
+            ref[(0, 3, 0)]+=0.0753923868134*x_ref[2]**o + (-0.282362211782)*x_ref[2]
+            arg[(0, 3, 1)]+=-0.337003118532*x[2]**o + (-0.491829189356)*x[2]
+            ref[(0, 3, 1)]+=-0.337003118532*x_ref[2]**o + (-0.491829189356)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.386779414769*x[2]**o + (0.460000480605)*x[2]
+            ref[(1, 0, 0)]+=-0.386779414769*x_ref[2]**o + (0.460000480605)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.499905015019*x[2]**o + (-0.175142858798)*x[2]
+            ref[(1, 0, 1)]+=-0.499905015019*x_ref[2]**o + (-0.175142858798)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.972275178553*x[2]**o + (0.420738205318)*x[2]
+            ref[(1, 1, 0)]+=-0.972275178553*x_ref[2]**o + (0.420738205318)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.660752402524*x[2]**o + (-0.663503781821)*x[2]
+            ref[(1, 1, 1)]+=-0.660752402524*x_ref[2]**o + (-0.663503781821)*x_ref[2]
+            arg[(1, 2, 0)]+=0.241840958261*x[2]**o + (0.0905689946055)*x[2]
+            ref[(1, 2, 0)]+=0.241840958261*x_ref[2]**o + (0.0905689946055)*x_ref[2]
+            arg[(1, 2, 1)]+=0.981047159125*x[2]**o + (0.300932919306)*x[2]
+            ref[(1, 2, 1)]+=0.981047159125*x_ref[2]**o + (0.300932919306)*x_ref[2]
+            arg[(1, 3, 0)]+=0.396425208523*x[2]**o + (0.69644304502)*x[2]
+            ref[(1, 3, 0)]+=0.396425208523*x_ref[2]**o + (0.69644304502)*x_ref[2]
+            arg[(1, 3, 1)]+=0.172955960472*x[2]**o + (-0.627635652826)*x[2]
+            ref[(1, 3, 1)]+=0.172955960472*x_ref[2]**o + (-0.627635652826)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.998831139178*x[2]**o + (0.0120375567544)*x[2]
+            ref[(2, 0, 0)]+=-0.998831139178*x_ref[2]**o + (0.0120375567544)*x_ref[2]
+            arg[(2, 0, 1)]+=0.601186191004*x[2]**o + (0.694385535842)*x[2]
+            ref[(2, 0, 1)]+=0.601186191004*x_ref[2]**o + (0.694385535842)*x_ref[2]
+            arg[(2, 1, 0)]+=0.82690991911*x[2]**o + (0.372078628916)*x[2]
+            ref[(2, 1, 0)]+=0.82690991911*x_ref[2]**o + (0.372078628916)*x_ref[2]
+            arg[(2, 1, 1)]+=0.338114706418*x[2]**o + (0.691946893952)*x[2]
+            ref[(2, 1, 1)]+=0.338114706418*x_ref[2]**o + (0.691946893952)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.640054235949*x[2]**o + (-0.102491300351)*x[2]
+            ref[(2, 2, 0)]+=-0.640054235949*x_ref[2]**o + (-0.102491300351)*x_ref[2]
+            arg[(2, 2, 1)]+=0.11226557712*x[2]**o + (-0.283525720443)*x[2]
+            ref[(2, 2, 1)]+=0.11226557712*x_ref[2]**o + (-0.283525720443)*x_ref[2]
+            arg[(2, 3, 0)]+=-0.763737568617*x[2]**o + (0.860007057337)*x[2]
+            ref[(2, 3, 0)]+=-0.763737568617*x_ref[2]**o + (0.860007057337)*x_ref[2]
+            arg[(2, 3, 1)]+=-0.632102951484*x[2]**o + (-0.362834716618)*x[2]
+            ref[(2, 3, 1)]+=-0.632102951484*x_ref[2]**o + (-0.362834716618)*x_ref[2]
+            arg[(3, 0, 0)]+=-0.015020451869*x[2]**o + (-0.024580610465)*x[2]
+            ref[(3, 0, 0)]+=-0.015020451869*x_ref[2]**o + (-0.024580610465)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.136421737784*x[2]**o + (0.565299730088)*x[2]
+            ref[(3, 0, 1)]+=-0.136421737784*x_ref[2]**o + (0.565299730088)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.446477492699*x[2]**o + (0.812557315023)*x[2]
+            ref[(3, 1, 0)]+=-0.446477492699*x_ref[2]**o + (0.812557315023)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.483394276897*x[2]**o + (-0.536053880168)*x[2]
+            ref[(3, 1, 1)]+=-0.483394276897*x_ref[2]**o + (-0.536053880168)*x_ref[2]
+            arg[(3, 2, 0)]+=-0.992215920436*x[2]**o + (0.919819184203)*x[2]
+            ref[(3, 2, 0)]+=-0.992215920436*x_ref[2]**o + (0.919819184203)*x_ref[2]
+            arg[(3, 2, 1)]+=0.349453522693*x[2]**o + (0.104196858053)*x[2]
+            ref[(3, 2, 1)]+=0.349453522693*x_ref[2]**o + (0.104196858053)*x_ref[2]
+            arg[(3, 3, 0)]+=-0.111047532857*x[2]**o + (0.405697014817)*x[2]
+            ref[(3, 3, 0)]+=-0.111047532857*x_ref[2]**o + (0.405697014817)*x_ref[2]
+            arg[(3, 3, 1)]+=-0.024567126085*x[2]**o + (0.817534418209)*x[2]
+            ref[(3, 3, 1)]+=-0.024567126085*x_ref[2]**o + (0.817534418209)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3, 4),w)
+        ref = Data(0,(4, 4, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.54345636248*x[0]**o + (-0.304384892665)*x[0] + (0.148570732633)*x[1]**o + (0.173419640542)*x[1]
+        ref[(0, 0, 0, 0)]=0.54345636248*x_ref[0]**o + (-0.304384892665)*x_ref[0] + (0.148570732633)*x_ref[1]**o + (0.173419640542)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.356459593141*x[0]**o + (-0.940165051955)*x[0] + (0.0981333023222)*x[1]**o + (-0.792186537155)*x[1]
+        ref[(0, 0, 0, 1)]=0.356459593141*x_ref[0]**o + (-0.940165051955)*x_ref[0] + (0.0981333023222)*x_ref[1]**o + (-0.792186537155)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.341853978559*x[0]**o + (-0.782652412174)*x[0] + (0.615837095586)*x[1]**o + (-0.0687067488066)*x[1]
+        ref[(0, 0, 0, 2)]=-0.341853978559*x_ref[0]**o + (-0.782652412174)*x_ref[0] + (0.615837095586)*x_ref[1]**o + (-0.0687067488066)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.824187963119*x[0]**o + (-0.485044930554)*x[0] + (0.49969055063)*x[1]**o + (-0.851475602239)*x[1]
+        ref[(0, 0, 0, 3)]=0.824187963119*x_ref[0]**o + (-0.485044930554)*x_ref[0] + (0.49969055063)*x_ref[1]**o + (-0.851475602239)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.423651708717*x[0]**o + (0.468815182217)*x[0] + (-0.217454147671)*x[1]**o + (-0.158403632786)*x[1]
+        ref[(0, 0, 1, 0)]=-0.423651708717*x_ref[0]**o + (0.468815182217)*x_ref[0] + (-0.217454147671)*x_ref[1]**o + (-0.158403632786)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.32620079163*x[0]**o + (-0.979227255434)*x[0] + (0.769677281387)*x[1]**o + (0.920316116385)*x[1]
+        ref[(0, 0, 1, 1)]=-0.32620079163*x_ref[0]**o + (-0.979227255434)*x_ref[0] + (0.769677281387)*x_ref[1]**o + (0.920316116385)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.0809251351338*x[0]**o + (0.811757915459)*x[0] + (0.455233563548)*x[1]**o + (-0.499054155465)*x[1]
+        ref[(0, 0, 1, 2)]=-0.0809251351338*x_ref[0]**o + (0.811757915459)*x_ref[0] + (0.455233563548)*x_ref[1]**o + (-0.499054155465)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.340194778019*x[0]**o + (0.866407759564)*x[0] + (0.260857337753)*x[1]**o + (-0.24369802614)*x[1]
+        ref[(0, 0, 1, 3)]=0.340194778019*x_ref[0]**o + (0.866407759564)*x_ref[0] + (0.260857337753)*x_ref[1]**o + (-0.24369802614)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.960165426692*x[0]**o + (0.103409902071)*x[0] + (-0.466413058307)*x[1]**o + (0.29147373686)*x[1]
+        ref[(0, 0, 2, 0)]=-0.960165426692*x_ref[0]**o + (0.103409902071)*x_ref[0] + (-0.466413058307)*x_ref[1]**o + (0.29147373686)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.795533068503*x[0]**o + (-0.44654239876)*x[0] + (0.953543856499)*x[1]**o + (-0.268824414025)*x[1]
+        ref[(0, 0, 2, 1)]=0.795533068503*x_ref[0]**o + (-0.44654239876)*x_ref[0] + (0.953543856499)*x_ref[1]**o + (-0.268824414025)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.719465669431*x[0]**o + (-0.671659794231)*x[0] + (-0.182746296675)*x[1]**o + (-0.558955931584)*x[1]
+        ref[(0, 0, 2, 2)]=0.719465669431*x_ref[0]**o + (-0.671659794231)*x_ref[0] + (-0.182746296675)*x_ref[1]**o + (-0.558955931584)*x_ref[1]
+        arg[(0, 0, 2, 3)]=0.0271273894004*x[0]**o + (0.526483402238)*x[0] + (0.471624991103)*x[1]**o + (-0.675940098809)*x[1]
+        ref[(0, 0, 2, 3)]=0.0271273894004*x_ref[0]**o + (0.526483402238)*x_ref[0] + (0.471624991103)*x_ref[1]**o + (-0.675940098809)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.957834500879*x[0]**o + (0.548453586975)*x[0] + (-0.942467029547)*x[1]**o + (0.470297100198)*x[1]
+        ref[(0, 1, 0, 0)]=-0.957834500879*x_ref[0]**o + (0.548453586975)*x_ref[0] + (-0.942467029547)*x_ref[1]**o + (0.470297100198)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.367878862082*x[0]**o + (0.0383685142076)*x[0] + (-0.395553697702)*x[1]**o + (-0.952021569587)*x[1]
+        ref[(0, 1, 0, 1)]=-0.367878862082*x_ref[0]**o + (0.0383685142076)*x_ref[0] + (-0.395553697702)*x_ref[1]**o + (-0.952021569587)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.92103627034*x[0]**o + (0.661459891019)*x[0] + (0.186680885614)*x[1]**o + (0.805687490979)*x[1]
+        ref[(0, 1, 0, 2)]=0.92103627034*x_ref[0]**o + (0.661459891019)*x_ref[0] + (0.186680885614)*x_ref[1]**o + (0.805687490979)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.441431647568*x[0]**o + (0.955144742158)*x[0] + (0.226018103517)*x[1]**o + (0.65108006755)*x[1]
+        ref[(0, 1, 0, 3)]=0.441431647568*x_ref[0]**o + (0.955144742158)*x_ref[0] + (0.226018103517)*x_ref[1]**o + (0.65108006755)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.62977857516*x[0]**o + (0.308116924431)*x[0] + (-0.222920930172)*x[1]**o + (-0.734813267573)*x[1]
+        ref[(0, 1, 1, 0)]=0.62977857516*x_ref[0]**o + (0.308116924431)*x_ref[0] + (-0.222920930172)*x_ref[1]**o + (-0.734813267573)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.528270098188*x[0]**o + (-0.876975599968)*x[0] + (0.281040068158)*x[1]**o + (0.520015430107)*x[1]
+        ref[(0, 1, 1, 1)]=-0.528270098188*x_ref[0]**o + (-0.876975599968)*x_ref[0] + (0.281040068158)*x_ref[1]**o + (0.520015430107)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.972964682873*x[0]**o + (-0.999538716612)*x[0] + (-0.452501385736)*x[1]**o + (0.345138099945)*x[1]
+        ref[(0, 1, 1, 2)]=0.972964682873*x_ref[0]**o + (-0.999538716612)*x_ref[0] + (-0.452501385736)*x_ref[1]**o + (0.345138099945)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.858591426264*x[0]**o + (-0.494159605836)*x[0] + (-0.757443747752)*x[1]**o + (-0.196480288667)*x[1]
+        ref[(0, 1, 1, 3)]=-0.858591426264*x_ref[0]**o + (-0.494159605836)*x_ref[0] + (-0.757443747752)*x_ref[1]**o + (-0.196480288667)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.369357834836*x[0]**o + (0.914629964573)*x[0] + (-0.577690884504)*x[1]**o + (-0.801534971853)*x[1]
+        ref[(0, 1, 2, 0)]=0.369357834836*x_ref[0]**o + (0.914629964573)*x_ref[0] + (-0.577690884504)*x_ref[1]**o + (-0.801534971853)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.0782640117066*x[0]**o + (-0.272543221471)*x[0] + (-0.226445229806)*x[1]**o + (0.399552560548)*x[1]
+        ref[(0, 1, 2, 1)]=0.0782640117066*x_ref[0]**o + (-0.272543221471)*x_ref[0] + (-0.226445229806)*x_ref[1]**o + (0.399552560548)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.871214335437*x[0]**o + (-0.796687050321)*x[0] + (-0.599951923905)*x[1]**o + (-0.606042948307)*x[1]
+        ref[(0, 1, 2, 2)]=0.871214335437*x_ref[0]**o + (-0.796687050321)*x_ref[0] + (-0.599951923905)*x_ref[1]**o + (-0.606042948307)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.468715501031*x[0]**o + (-0.399311029929)*x[0] + (0.820389197578)*x[1]**o + (-0.102625959104)*x[1]
+        ref[(0, 1, 2, 3)]=-0.468715501031*x_ref[0]**o + (-0.399311029929)*x_ref[0] + (0.820389197578)*x_ref[1]**o + (-0.102625959104)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.986561506868*x[0]**o + (0.133066085112)*x[0] + (0.797607611722)*x[1]**o + (0.697890370809)*x[1]
+        ref[(0, 2, 0, 0)]=-0.986561506868*x_ref[0]**o + (0.133066085112)*x_ref[0] + (0.797607611722)*x_ref[1]**o + (0.697890370809)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.564155942152*x[0]**o + (-0.696402595413)*x[0] + (0.0903764131415)*x[1]**o + (0.138396700912)*x[1]
+        ref[(0, 2, 0, 1)]=0.564155942152*x_ref[0]**o + (-0.696402595413)*x_ref[0] + (0.0903764131415)*x_ref[1]**o + (0.138396700912)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.254707841935*x[0]**o + (0.771512712636)*x[0] + (-0.666992815076)*x[1]**o + (-0.24018230919)*x[1]
+        ref[(0, 2, 0, 2)]=-0.254707841935*x_ref[0]**o + (0.771512712636)*x_ref[0] + (-0.666992815076)*x_ref[1]**o + (-0.24018230919)*x_ref[1]
+        arg[(0, 2, 0, 3)]=0.241343817735*x[0]**o + (0.112715601013)*x[0] + (0.491593774054)*x[1]**o + (0.277742714327)*x[1]
+        ref[(0, 2, 0, 3)]=0.241343817735*x_ref[0]**o + (0.112715601013)*x_ref[0] + (0.491593774054)*x_ref[1]**o + (0.277742714327)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.908311477842*x[0]**o + (0.914732094895)*x[0] + (0.319736701102)*x[1]**o + (-0.276715467249)*x[1]
+        ref[(0, 2, 1, 0)]=0.908311477842*x_ref[0]**o + (0.914732094895)*x_ref[0] + (0.319736701102)*x_ref[1]**o + (-0.276715467249)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.0245574903429*x[0]**o + (0.458499626582)*x[0] + (0.8733994649)*x[1]**o + (0.0773574240291)*x[1]
+        ref[(0, 2, 1, 1)]=-0.0245574903429*x_ref[0]**o + (0.458499626582)*x_ref[0] + (0.8733994649)*x_ref[1]**o + (0.0773574240291)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.266585075438*x[0]**o + (0.811230008758)*x[0] + (-0.672321580852)*x[1]**o + (0.195222330768)*x[1]
+        ref[(0, 2, 1, 2)]=0.266585075438*x_ref[0]**o + (0.811230008758)*x_ref[0] + (-0.672321580852)*x_ref[1]**o + (0.195222330768)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.994844831099*x[0]**o + (-0.68198270572)*x[0] + (-0.868645841079)*x[1]**o + (0.800680452837)*x[1]
+        ref[(0, 2, 1, 3)]=0.994844831099*x_ref[0]**o + (-0.68198270572)*x_ref[0] + (-0.868645841079)*x_ref[1]**o + (0.800680452837)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.827306001741*x[0]**o + (-0.617580638418)*x[0] + (-0.401643965743)*x[1]**o + (-0.407591407704)*x[1]
+        ref[(0, 2, 2, 0)]=-0.827306001741*x_ref[0]**o + (-0.617580638418)*x_ref[0] + (-0.401643965743)*x_ref[1]**o + (-0.407591407704)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.895651975668*x[0]**o + (0.798596539338)*x[0] + (0.150108015623)*x[1]**o + (0.699918436135)*x[1]
+        ref[(0, 2, 2, 1)]=0.895651975668*x_ref[0]**o + (0.798596539338)*x_ref[0] + (0.150108015623)*x_ref[1]**o + (0.699918436135)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.174169525949*x[0]**o + (0.140186831938)*x[0] + (-0.635147909112)*x[1]**o + (0.520669125283)*x[1]
+        ref[(0, 2, 2, 2)]=-0.174169525949*x_ref[0]**o + (0.140186831938)*x_ref[0] + (-0.635147909112)*x_ref[1]**o + (0.520669125283)*x_ref[1]
+        arg[(0, 2, 2, 3)]=0.529286598042*x[0]**o + (0.653708892052)*x[0] + (0.74594790373)*x[1]**o + (-0.673102622841)*x[1]
+        ref[(0, 2, 2, 3)]=0.529286598042*x_ref[0]**o + (0.653708892052)*x_ref[0] + (0.74594790373)*x_ref[1]**o + (-0.673102622841)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.389985039542*x[0]**o + (-0.906080813028)*x[0] + (0.703816042735)*x[1]**o + (0.133474119279)*x[1]
+        ref[(0, 3, 0, 0)]=0.389985039542*x_ref[0]**o + (-0.906080813028)*x_ref[0] + (0.703816042735)*x_ref[1]**o + (0.133474119279)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.860576655429*x[0]**o + (-0.282609559831)*x[0] + (0.55736034783)*x[1]**o + (0.289964644625)*x[1]
+        ref[(0, 3, 0, 1)]=0.860576655429*x_ref[0]**o + (-0.282609559831)*x_ref[0] + (0.55736034783)*x_ref[1]**o + (0.289964644625)*x_ref[1]
+        arg[(0, 3, 0, 2)]=0.566732265773*x[0]**o + (-0.645348926253)*x[0] + (0.0789185683742)*x[1]**o + (0.839453383501)*x[1]
+        ref[(0, 3, 0, 2)]=0.566732265773*x_ref[0]**o + (-0.645348926253)*x_ref[0] + (0.0789185683742)*x_ref[1]**o + (0.839453383501)*x_ref[1]
+        arg[(0, 3, 0, 3)]=-0.804866452781*x[0]**o + (-0.825059092582)*x[0] + (-0.900824279982)*x[1]**o + (-0.536063018646)*x[1]
+        ref[(0, 3, 0, 3)]=-0.804866452781*x_ref[0]**o + (-0.825059092582)*x_ref[0] + (-0.900824279982)*x_ref[1]**o + (-0.536063018646)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.29237019573*x[0]**o + (0.488390561497)*x[0] + (-0.593394416835)*x[1]**o + (0.48789894827)*x[1]
+        ref[(0, 3, 1, 0)]=0.29237019573*x_ref[0]**o + (0.488390561497)*x_ref[0] + (-0.593394416835)*x_ref[1]**o + (0.48789894827)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.530455774939*x[0]**o + (-0.372188258097)*x[0] + (-0.702281399607)*x[1]**o + (-0.86594950829)*x[1]
+        ref[(0, 3, 1, 1)]=0.530455774939*x_ref[0]**o + (-0.372188258097)*x_ref[0] + (-0.702281399607)*x_ref[1]**o + (-0.86594950829)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.160955273216*x[0]**o + (-0.670256804421)*x[0] + (-0.687062938783)*x[1]**o + (-0.37260810281)*x[1]
+        ref[(0, 3, 1, 2)]=-0.160955273216*x_ref[0]**o + (-0.670256804421)*x_ref[0] + (-0.687062938783)*x_ref[1]**o + (-0.37260810281)*x_ref[1]
+        arg[(0, 3, 1, 3)]=-0.0264959503265*x[0]**o + (-0.660873248756)*x[0] + (-0.435977939982)*x[1]**o + (0.377144346348)*x[1]
+        ref[(0, 3, 1, 3)]=-0.0264959503265*x_ref[0]**o + (-0.660873248756)*x_ref[0] + (-0.435977939982)*x_ref[1]**o + (0.377144346348)*x_ref[1]
+        arg[(0, 3, 2, 0)]=-0.951528912449*x[0]**o + (-0.470483394829)*x[0] + (-0.0133809463071)*x[1]**o + (-0.119166649288)*x[1]
+        ref[(0, 3, 2, 0)]=-0.951528912449*x_ref[0]**o + (-0.470483394829)*x_ref[0] + (-0.0133809463071)*x_ref[1]**o + (-0.119166649288)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.451004167786*x[0]**o + (-0.0276084823065)*x[0] + (-0.895398101734)*x[1]**o + (0.350472570955)*x[1]
+        ref[(0, 3, 2, 1)]=0.451004167786*x_ref[0]**o + (-0.0276084823065)*x_ref[0] + (-0.895398101734)*x_ref[1]**o + (0.350472570955)*x_ref[1]
+        arg[(0, 3, 2, 2)]=-0.60500216799*x[0]**o + (0.237998851554)*x[0] + (-0.338427957828)*x[1]**o + (0.651132201264)*x[1]
+        ref[(0, 3, 2, 2)]=-0.60500216799*x_ref[0]**o + (0.237998851554)*x_ref[0] + (-0.338427957828)*x_ref[1]**o + (0.651132201264)*x_ref[1]
+        arg[(0, 3, 2, 3)]=-0.00890942323662*x[0]**o + (0.0650483305417)*x[0] + (0.0233962335157)*x[1]**o + (-0.851008436436)*x[1]
+        ref[(0, 3, 2, 3)]=-0.00890942323662*x_ref[0]**o + (0.0650483305417)*x_ref[0] + (0.0233962335157)*x_ref[1]**o + (-0.851008436436)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.710430600462*x[0]**o + (0.0754846977523)*x[0] + (0.0966324861248)*x[1]**o + (-0.0365826907533)*x[1]
+        ref[(1, 0, 0, 0)]=0.710430600462*x_ref[0]**o + (0.0754846977523)*x_ref[0] + (0.0966324861248)*x_ref[1]**o + (-0.0365826907533)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.511217231823*x[0]**o + (-0.379450024993)*x[0] + (-0.710584322457)*x[1]**o + (0.74295527514)*x[1]
+        ref[(1, 0, 0, 1)]=0.511217231823*x_ref[0]**o + (-0.379450024993)*x_ref[0] + (-0.710584322457)*x_ref[1]**o + (0.74295527514)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.84568916028*x[0]**o + (-0.732241628691)*x[0] + (-0.407949043288)*x[1]**o + (0.372633795353)*x[1]
+        ref[(1, 0, 0, 2)]=0.84568916028*x_ref[0]**o + (-0.732241628691)*x_ref[0] + (-0.407949043288)*x_ref[1]**o + (0.372633795353)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.580177426463*x[0]**o + (0.110156852316)*x[0] + (-0.491477856178)*x[1]**o + (0.971769831549)*x[1]
+        ref[(1, 0, 0, 3)]=-0.580177426463*x_ref[0]**o + (0.110156852316)*x_ref[0] + (-0.491477856178)*x_ref[1]**o + (0.971769831549)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.941740125009*x[0]**o + (0.806281315184)*x[0] + (0.211203386723)*x[1]**o + (-0.0859626996591)*x[1]
+        ref[(1, 0, 1, 0)]=-0.941740125009*x_ref[0]**o + (0.806281315184)*x_ref[0] + (0.211203386723)*x_ref[1]**o + (-0.0859626996591)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.00256749338589*x[0]**o + (0.0886999831622)*x[0] + (0.741337446711)*x[1]**o + (0.0441685657762)*x[1]
+        ref[(1, 0, 1, 1)]=0.00256749338589*x_ref[0]**o + (0.0886999831622)*x_ref[0] + (0.741337446711)*x_ref[1]**o + (0.0441685657762)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.342723015843*x[0]**o + (-0.208899343225)*x[0] + (0.362571269669)*x[1]**o + (0.244516933816)*x[1]
+        ref[(1, 0, 1, 2)]=-0.342723015843*x_ref[0]**o + (-0.208899343225)*x_ref[0] + (0.362571269669)*x_ref[1]**o + (0.244516933816)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.9298491715*x[0]**o + (0.993528031867)*x[0] + (-0.268353891608)*x[1]**o + (0.467164414001)*x[1]
+        ref[(1, 0, 1, 3)]=-0.9298491715*x_ref[0]**o + (0.993528031867)*x_ref[0] + (-0.268353891608)*x_ref[1]**o + (0.467164414001)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.498838851787*x[0]**o + (-0.451976021006)*x[0] + (0.570801205864)*x[1]**o + (0.143385667117)*x[1]
+        ref[(1, 0, 2, 0)]=0.498838851787*x_ref[0]**o + (-0.451976021006)*x_ref[0] + (0.570801205864)*x_ref[1]**o + (0.143385667117)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.232338964237*x[0]**o + (0.891548499314)*x[0] + (-0.53576502896)*x[1]**o + (-0.193474252541)*x[1]
+        ref[(1, 0, 2, 1)]=0.232338964237*x_ref[0]**o + (0.891548499314)*x_ref[0] + (-0.53576502896)*x_ref[1]**o + (-0.193474252541)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.66779027325*x[0]**o + (-0.792174865353)*x[0] + (-0.443664792646)*x[1]**o + (-0.825118439203)*x[1]
+        ref[(1, 0, 2, 2)]=0.66779027325*x_ref[0]**o + (-0.792174865353)*x_ref[0] + (-0.443664792646)*x_ref[1]**o + (-0.825118439203)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.240161811462*x[0]**o + (-0.94257321378)*x[0] + (0.854452644553)*x[1]**o + (-0.211021595672)*x[1]
+        ref[(1, 0, 2, 3)]=-0.240161811462*x_ref[0]**o + (-0.94257321378)*x_ref[0] + (0.854452644553)*x_ref[1]**o + (-0.211021595672)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.0658634259574*x[0]**o + (0.287024189293)*x[0] + (-0.225195552899)*x[1]**o + (0.239484580431)*x[1]
+        ref[(1, 1, 0, 0)]=0.0658634259574*x_ref[0]**o + (0.287024189293)*x_ref[0] + (-0.225195552899)*x_ref[1]**o + (0.239484580431)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.296234000989*x[0]**o + (-0.647868086232)*x[0] + (-0.661004908397)*x[1]**o + (-0.606062377191)*x[1]
+        ref[(1, 1, 0, 1)]=0.296234000989*x_ref[0]**o + (-0.647868086232)*x_ref[0] + (-0.661004908397)*x_ref[1]**o + (-0.606062377191)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.00999457411449*x[0]**o + (0.0819015096281)*x[0] + (-0.589171172322)*x[1]**o + (0.168141492895)*x[1]
+        ref[(1, 1, 0, 2)]=0.00999457411449*x_ref[0]**o + (0.0819015096281)*x_ref[0] + (-0.589171172322)*x_ref[1]**o + (0.168141492895)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.883040808414*x[0]**o + (-0.0605562920759)*x[0] + (-0.884077083766)*x[1]**o + (0.142177300455)*x[1]
+        ref[(1, 1, 0, 3)]=0.883040808414*x_ref[0]**o + (-0.0605562920759)*x_ref[0] + (-0.884077083766)*x_ref[1]**o + (0.142177300455)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.501560255375*x[0]**o + (-0.497625332923)*x[0] + (0.429138468963)*x[1]**o + (-0.165352735808)*x[1]
+        ref[(1, 1, 1, 0)]=0.501560255375*x_ref[0]**o + (-0.497625332923)*x_ref[0] + (0.429138468963)*x_ref[1]**o + (-0.165352735808)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.59303817376*x[0]**o + (-0.227593595695)*x[0] + (0.075952557797)*x[1]**o + (0.0321182620143)*x[1]
+        ref[(1, 1, 1, 1)]=-0.59303817376*x_ref[0]**o + (-0.227593595695)*x_ref[0] + (0.075952557797)*x_ref[1]**o + (0.0321182620143)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.777695636857*x[0]**o + (0.394814645144)*x[0] + (-0.952305714265)*x[1]**o + (-0.458933230601)*x[1]
+        ref[(1, 1, 1, 2)]=0.777695636857*x_ref[0]**o + (0.394814645144)*x_ref[0] + (-0.952305714265)*x_ref[1]**o + (-0.458933230601)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.918468727495*x[0]**o + (0.608712466411)*x[0] + (-0.0260122107744)*x[1]**o + (0.0312695350393)*x[1]
+        ref[(1, 1, 1, 3)]=-0.918468727495*x_ref[0]**o + (0.608712466411)*x_ref[0] + (-0.0260122107744)*x_ref[1]**o + (0.0312695350393)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.343316601152*x[0]**o + (-0.748575537687)*x[0] + (0.85651392402)*x[1]**o + (0.825660761103)*x[1]
+        ref[(1, 1, 2, 0)]=-0.343316601152*x_ref[0]**o + (-0.748575537687)*x_ref[0] + (0.85651392402)*x_ref[1]**o + (0.825660761103)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.76976629072*x[0]**o + (-0.669484842469)*x[0] + (-0.314566268201)*x[1]**o + (-0.34348251926)*x[1]
+        ref[(1, 1, 2, 1)]=-0.76976629072*x_ref[0]**o + (-0.669484842469)*x_ref[0] + (-0.314566268201)*x_ref[1]**o + (-0.34348251926)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.268601948137*x[0]**o + (-0.230634761868)*x[0] + (0.303651434519)*x[1]**o + (-0.798509471484)*x[1]
+        ref[(1, 1, 2, 2)]=-0.268601948137*x_ref[0]**o + (-0.230634761868)*x_ref[0] + (0.303651434519)*x_ref[1]**o + (-0.798509471484)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.614037744417*x[0]**o + (-0.0514944621087)*x[0] + (-0.223159737464)*x[1]**o + (-0.894755806685)*x[1]
+        ref[(1, 1, 2, 3)]=-0.614037744417*x_ref[0]**o + (-0.0514944621087)*x_ref[0] + (-0.223159737464)*x_ref[1]**o + (-0.894755806685)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.587599385013*x[0]**o + (-0.496321737806)*x[0] + (0.309754037738)*x[1]**o + (0.171033114767)*x[1]
+        ref[(1, 2, 0, 0)]=0.587599385013*x_ref[0]**o + (-0.496321737806)*x_ref[0] + (0.309754037738)*x_ref[1]**o + (0.171033114767)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.220199006099*x[0]**o + (-0.945062384048)*x[0] + (-0.745800032333)*x[1]**o + (-0.604275680466)*x[1]
+        ref[(1, 2, 0, 1)]=-0.220199006099*x_ref[0]**o + (-0.945062384048)*x_ref[0] + (-0.745800032333)*x_ref[1]**o + (-0.604275680466)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.347268332823*x[0]**o + (0.777354837676)*x[0] + (0.701703689149)*x[1]**o + (0.707643737064)*x[1]
+        ref[(1, 2, 0, 2)]=-0.347268332823*x_ref[0]**o + (0.777354837676)*x_ref[0] + (0.701703689149)*x_ref[1]**o + (0.707643737064)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.623972316483*x[0]**o + (-0.593753303732)*x[0] + (0.115652550235)*x[1]**o + (-0.857939391209)*x[1]
+        ref[(1, 2, 0, 3)]=0.623972316483*x_ref[0]**o + (-0.593753303732)*x_ref[0] + (0.115652550235)*x_ref[1]**o + (-0.857939391209)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.883280378609*x[0]**o + (-0.88304628863)*x[0] + (0.691791607733)*x[1]**o + (0.286470666531)*x[1]
+        ref[(1, 2, 1, 0)]=-0.883280378609*x_ref[0]**o + (-0.88304628863)*x_ref[0] + (0.691791607733)*x_ref[1]**o + (0.286470666531)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.763539219664*x[0]**o + (0.778441538541)*x[0] + (-0.826255803796)*x[1]**o + (-0.544302921049)*x[1]
+        ref[(1, 2, 1, 1)]=0.763539219664*x_ref[0]**o + (0.778441538541)*x_ref[0] + (-0.826255803796)*x_ref[1]**o + (-0.544302921049)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.664567953472*x[0]**o + (0.591474330836)*x[0] + (-0.715268622848)*x[1]**o + (-0.17119230103)*x[1]
+        ref[(1, 2, 1, 2)]=-0.664567953472*x_ref[0]**o + (0.591474330836)*x_ref[0] + (-0.715268622848)*x_ref[1]**o + (-0.17119230103)*x_ref[1]
+        arg[(1, 2, 1, 3)]=0.123092239655*x[0]**o + (-0.0382044154702)*x[0] + (-0.908967441707)*x[1]**o + (0.579284043991)*x[1]
+        ref[(1, 2, 1, 3)]=0.123092239655*x_ref[0]**o + (-0.0382044154702)*x_ref[0] + (-0.908967441707)*x_ref[1]**o + (0.579284043991)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.311099089097*x[0]**o + (0.712966657811)*x[0] + (-0.650610501228)*x[1]**o + (0.318912531071)*x[1]
+        ref[(1, 2, 2, 0)]=-0.311099089097*x_ref[0]**o + (0.712966657811)*x_ref[0] + (-0.650610501228)*x_ref[1]**o + (0.318912531071)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.702677822873*x[0]**o + (0.250160762306)*x[0] + (0.216986839845)*x[1]**o + (-0.0781404344879)*x[1]
+        ref[(1, 2, 2, 1)]=-0.702677822873*x_ref[0]**o + (0.250160762306)*x_ref[0] + (0.216986839845)*x_ref[1]**o + (-0.0781404344879)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.481263672942*x[0]**o + (-0.0462039721776)*x[0] + (0.285505761548)*x[1]**o + (0.480418061636)*x[1]
+        ref[(1, 2, 2, 2)]=-0.481263672942*x_ref[0]**o + (-0.0462039721776)*x_ref[0] + (0.285505761548)*x_ref[1]**o + (0.480418061636)*x_ref[1]
+        arg[(1, 2, 2, 3)]=0.317359882612*x[0]**o + (-0.965637954599)*x[0] + (-0.606667884369)*x[1]**o + (0.664632184333)*x[1]
+        ref[(1, 2, 2, 3)]=0.317359882612*x_ref[0]**o + (-0.965637954599)*x_ref[0] + (-0.606667884369)*x_ref[1]**o + (0.664632184333)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.775285035806*x[0]**o + (0.382915100561)*x[0] + (-0.672277084841)*x[1]**o + (-0.864259870814)*x[1]
+        ref[(1, 3, 0, 0)]=-0.775285035806*x_ref[0]**o + (0.382915100561)*x_ref[0] + (-0.672277084841)*x_ref[1]**o + (-0.864259870814)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.367375518306*x[0]**o + (-0.429279730622)*x[0] + (-0.667597732742)*x[1]**o + (0.504512706164)*x[1]
+        ref[(1, 3, 0, 1)]=-0.367375518306*x_ref[0]**o + (-0.429279730622)*x_ref[0] + (-0.667597732742)*x_ref[1]**o + (0.504512706164)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.0337673297964*x[0]**o + (-0.889993325516)*x[0] + (0.477596839559)*x[1]**o + (-0.0699558162847)*x[1]
+        ref[(1, 3, 0, 2)]=0.0337673297964*x_ref[0]**o + (-0.889993325516)*x_ref[0] + (0.477596839559)*x_ref[1]**o + (-0.0699558162847)*x_ref[1]
+        arg[(1, 3, 0, 3)]=-0.418231398015*x[0]**o + (-0.328658170946)*x[0] + (0.807831613405)*x[1]**o + (-0.87289536907)*x[1]
+        ref[(1, 3, 0, 3)]=-0.418231398015*x_ref[0]**o + (-0.328658170946)*x_ref[0] + (0.807831613405)*x_ref[1]**o + (-0.87289536907)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.743750669786*x[0]**o + (-0.238548480461)*x[0] + (0.067508922957)*x[1]**o + (-0.2579039393)*x[1]
+        ref[(1, 3, 1, 0)]=-0.743750669786*x_ref[0]**o + (-0.238548480461)*x_ref[0] + (0.067508922957)*x_ref[1]**o + (-0.2579039393)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.91319962273*x[0]**o + (0.624248253839)*x[0] + (0.174843879141)*x[1]**o + (-0.819331614526)*x[1]
+        ref[(1, 3, 1, 1)]=0.91319962273*x_ref[0]**o + (0.624248253839)*x_ref[0] + (0.174843879141)*x_ref[1]**o + (-0.819331614526)*x_ref[1]
+        arg[(1, 3, 1, 2)]=-0.0973532368414*x[0]**o + (-0.476483082985)*x[0] + (-0.136997587508)*x[1]**o + (-0.856886727008)*x[1]
+        ref[(1, 3, 1, 2)]=-0.0973532368414*x_ref[0]**o + (-0.476483082985)*x_ref[0] + (-0.136997587508)*x_ref[1]**o + (-0.856886727008)*x_ref[1]
+        arg[(1, 3, 1, 3)]=0.370358917161*x[0]**o + (-0.273307274024)*x[0] + (-0.837615757928)*x[1]**o + (-0.403976455648)*x[1]
+        ref[(1, 3, 1, 3)]=0.370358917161*x_ref[0]**o + (-0.273307274024)*x_ref[0] + (-0.837615757928)*x_ref[1]**o + (-0.403976455648)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.717057523444*x[0]**o + (-0.736560255231)*x[0] + (-0.476062882227)*x[1]**o + (-0.438154655346)*x[1]
+        ref[(1, 3, 2, 0)]=0.717057523444*x_ref[0]**o + (-0.736560255231)*x_ref[0] + (-0.476062882227)*x_ref[1]**o + (-0.438154655346)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.141742478177*x[0]**o + (0.882141864313)*x[0] + (-0.685491608245)*x[1]**o + (-0.358824001496)*x[1]
+        ref[(1, 3, 2, 1)]=0.141742478177*x_ref[0]**o + (0.882141864313)*x_ref[0] + (-0.685491608245)*x_ref[1]**o + (-0.358824001496)*x_ref[1]
+        arg[(1, 3, 2, 2)]=0.372299772867*x[0]**o + (0.632033221621)*x[0] + (-0.234205141724)*x[1]**o + (-0.0869934110506)*x[1]
+        ref[(1, 3, 2, 2)]=0.372299772867*x_ref[0]**o + (0.632033221621)*x_ref[0] + (-0.234205141724)*x_ref[1]**o + (-0.0869934110506)*x_ref[1]
+        arg[(1, 3, 2, 3)]=-0.701863453046*x[0]**o + (-0.163619998579)*x[0] + (0.934871184264)*x[1]**o + (0.845173288132)*x[1]
+        ref[(1, 3, 2, 3)]=-0.701863453046*x_ref[0]**o + (-0.163619998579)*x_ref[0] + (0.934871184264)*x_ref[1]**o + (0.845173288132)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.0577433452414*x[0]**o + (-0.758013174437)*x[0] + (0.520132112952)*x[1]**o + (0.358352834225)*x[1]
+        ref[(2, 0, 0, 0)]=0.0577433452414*x_ref[0]**o + (-0.758013174437)*x_ref[0] + (0.520132112952)*x_ref[1]**o + (0.358352834225)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.184393911713*x[0]**o + (-0.0390702562814)*x[0] + (-0.243236564823)*x[1]**o + (0.458899172353)*x[1]
+        ref[(2, 0, 0, 1)]=0.184393911713*x_ref[0]**o + (-0.0390702562814)*x_ref[0] + (-0.243236564823)*x_ref[1]**o + (0.458899172353)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.0451819346122*x[0]**o + (-0.224735420744)*x[0] + (0.174934699525)*x[1]**o + (0.475779056128)*x[1]
+        ref[(2, 0, 0, 2)]=-0.0451819346122*x_ref[0]**o + (-0.224735420744)*x_ref[0] + (0.174934699525)*x_ref[1]**o + (0.475779056128)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.318431935277*x[0]**o + (-0.643028307618)*x[0] + (-0.698670934329)*x[1]**o + (0.464462846985)*x[1]
+        ref[(2, 0, 0, 3)]=-0.318431935277*x_ref[0]**o + (-0.643028307618)*x_ref[0] + (-0.698670934329)*x_ref[1]**o + (0.464462846985)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.726699688335*x[0]**o + (-0.0123004105897)*x[0] + (0.756575003381)*x[1]**o + (-0.172191668466)*x[1]
+        ref[(2, 0, 1, 0)]=0.726699688335*x_ref[0]**o + (-0.0123004105897)*x_ref[0] + (0.756575003381)*x_ref[1]**o + (-0.172191668466)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.266704040222*x[0]**o + (0.261762623117)*x[0] + (0.427489941315)*x[1]**o + (-0.759346748886)*x[1]
+        ref[(2, 0, 1, 1)]=0.266704040222*x_ref[0]**o + (0.261762623117)*x_ref[0] + (0.427489941315)*x_ref[1]**o + (-0.759346748886)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.125994198848*x[0]**o + (-0.874209140785)*x[0] + (-0.640912189011)*x[1]**o + (0.469754666155)*x[1]
+        ref[(2, 0, 1, 2)]=0.125994198848*x_ref[0]**o + (-0.874209140785)*x_ref[0] + (-0.640912189011)*x_ref[1]**o + (0.469754666155)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.0239206656222*x[0]**o + (0.564677841199)*x[0] + (0.689763089113)*x[1]**o + (-0.418853241988)*x[1]
+        ref[(2, 0, 1, 3)]=0.0239206656222*x_ref[0]**o + (0.564677841199)*x_ref[0] + (0.689763089113)*x_ref[1]**o + (-0.418853241988)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.825872160505*x[0]**o + (-0.675431918338)*x[0] + (0.0686929406555)*x[1]**o + (0.7536312189)*x[1]
+        ref[(2, 0, 2, 0)]=0.825872160505*x_ref[0]**o + (-0.675431918338)*x_ref[0] + (0.0686929406555)*x_ref[1]**o + (0.7536312189)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.231748443846*x[0]**o + (-0.437939293751)*x[0] + (0.76903899721)*x[1]**o + (0.577352375596)*x[1]
+        ref[(2, 0, 2, 1)]=0.231748443846*x_ref[0]**o + (-0.437939293751)*x_ref[0] + (0.76903899721)*x_ref[1]**o + (0.577352375596)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.691840788677*x[0]**o + (0.242321050272)*x[0] + (-0.927519169514)*x[1]**o + (-0.162649343169)*x[1]
+        ref[(2, 0, 2, 2)]=-0.691840788677*x_ref[0]**o + (0.242321050272)*x_ref[0] + (-0.927519169514)*x_ref[1]**o + (-0.162649343169)*x_ref[1]
+        arg[(2, 0, 2, 3)]=-0.562425365392*x[0]**o + (-0.999873944757)*x[0] + (0.632948821578)*x[1]**o + (-0.825961346641)*x[1]
+        ref[(2, 0, 2, 3)]=-0.562425365392*x_ref[0]**o + (-0.999873944757)*x_ref[0] + (0.632948821578)*x_ref[1]**o + (-0.825961346641)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.660577324634*x[0]**o + (0.441952243808)*x[0] + (-0.67333817087)*x[1]**o + (0.769543381843)*x[1]
+        ref[(2, 1, 0, 0)]=-0.660577324634*x_ref[0]**o + (0.441952243808)*x_ref[0] + (-0.67333817087)*x_ref[1]**o + (0.769543381843)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.495606536308*x[0]**o + (-0.529773494251)*x[0] + (0.0899827368252)*x[1]**o + (-0.222234301001)*x[1]
+        ref[(2, 1, 0, 1)]=-0.495606536308*x_ref[0]**o + (-0.529773494251)*x_ref[0] + (0.0899827368252)*x_ref[1]**o + (-0.222234301001)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.561258033248*x[0]**o + (0.627017887485)*x[0] + (-0.134152144553)*x[1]**o + (0.293319063035)*x[1]
+        ref[(2, 1, 0, 2)]=-0.561258033248*x_ref[0]**o + (0.627017887485)*x_ref[0] + (-0.134152144553)*x_ref[1]**o + (0.293319063035)*x_ref[1]
+        arg[(2, 1, 0, 3)]=0.381079483595*x[0]**o + (0.365189010821)*x[0] + (0.293607695175)*x[1]**o + (0.61038221264)*x[1]
+        ref[(2, 1, 0, 3)]=0.381079483595*x_ref[0]**o + (0.365189010821)*x_ref[0] + (0.293607695175)*x_ref[1]**o + (0.61038221264)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.0627639846299*x[0]**o + (0.55394612651)*x[0] + (0.94981031827)*x[1]**o + (-0.8187723595)*x[1]
+        ref[(2, 1, 1, 0)]=-0.0627639846299*x_ref[0]**o + (0.55394612651)*x_ref[0] + (0.94981031827)*x_ref[1]**o + (-0.8187723595)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.531872826238*x[0]**o + (0.657379020111)*x[0] + (0.362336785689)*x[1]**o + (-0.478812330675)*x[1]
+        ref[(2, 1, 1, 1)]=-0.531872826238*x_ref[0]**o + (0.657379020111)*x_ref[0] + (0.362336785689)*x_ref[1]**o + (-0.478812330675)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.643097751167*x[0]**o + (-0.955829182861)*x[0] + (-0.665109780201)*x[1]**o + (0.562884510616)*x[1]
+        ref[(2, 1, 1, 2)]=-0.643097751167*x_ref[0]**o + (-0.955829182861)*x_ref[0] + (-0.665109780201)*x_ref[1]**o + (0.562884510616)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.368221442127*x[0]**o + (0.75618877051)*x[0] + (-0.219117457794)*x[1]**o + (0.0526095757342)*x[1]
+        ref[(2, 1, 1, 3)]=-0.368221442127*x_ref[0]**o + (0.75618877051)*x_ref[0] + (-0.219117457794)*x_ref[1]**o + (0.0526095757342)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.834696767274*x[0]**o + (0.274854118124)*x[0] + (-0.0555006681575)*x[1]**o + (-0.0199641734999)*x[1]
+        ref[(2, 1, 2, 0)]=0.834696767274*x_ref[0]**o + (0.274854118124)*x_ref[0] + (-0.0555006681575)*x_ref[1]**o + (-0.0199641734999)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.244830925382*x[0]**o + (0.256809301388)*x[0] + (-0.223299680601)*x[1]**o + (-0.0108818455526)*x[1]
+        ref[(2, 1, 2, 1)]=0.244830925382*x_ref[0]**o + (0.256809301388)*x_ref[0] + (-0.223299680601)*x_ref[1]**o + (-0.0108818455526)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.24795950448*x[0]**o + (0.303795830817)*x[0] + (0.92959033406)*x[1]**o + (-0.399341138171)*x[1]
+        ref[(2, 1, 2, 2)]=-0.24795950448*x_ref[0]**o + (0.303795830817)*x_ref[0] + (0.92959033406)*x_ref[1]**o + (-0.399341138171)*x_ref[1]
+        arg[(2, 1, 2, 3)]=0.44235885938*x[0]**o + (-0.224776846816)*x[0] + (0.927890780948)*x[1]**o + (-0.85226961118)*x[1]
+        ref[(2, 1, 2, 3)]=0.44235885938*x_ref[0]**o + (-0.224776846816)*x_ref[0] + (0.927890780948)*x_ref[1]**o + (-0.85226961118)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.106608882745*x[0]**o + (0.871182612072)*x[0] + (0.692627043535)*x[1]**o + (0.920229506334)*x[1]
+        ref[(2, 2, 0, 0)]=0.106608882745*x_ref[0]**o + (0.871182612072)*x_ref[0] + (0.692627043535)*x_ref[1]**o + (0.920229506334)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.252525859391*x[0]**o + (-0.545710360837)*x[0] + (-0.224341498332)*x[1]**o + (0.183991117918)*x[1]
+        ref[(2, 2, 0, 1)]=-0.252525859391*x_ref[0]**o + (-0.545710360837)*x_ref[0] + (-0.224341498332)*x_ref[1]**o + (0.183991117918)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.83411731453*x[0]**o + (-0.457376029541)*x[0] + (0.413138202133)*x[1]**o + (0.539700536446)*x[1]
+        ref[(2, 2, 0, 2)]=-0.83411731453*x_ref[0]**o + (-0.457376029541)*x_ref[0] + (0.413138202133)*x_ref[1]**o + (0.539700536446)*x_ref[1]
+        arg[(2, 2, 0, 3)]=0.548286706075*x[0]**o + (-0.477390235976)*x[0] + (0.109111196488)*x[1]**o + (-0.172173331421)*x[1]
+        ref[(2, 2, 0, 3)]=0.548286706075*x_ref[0]**o + (-0.477390235976)*x_ref[0] + (0.109111196488)*x_ref[1]**o + (-0.172173331421)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.393019514198*x[0]**o + (-0.656291927921)*x[0] + (0.336690441109)*x[1]**o + (0.916874920225)*x[1]
+        ref[(2, 2, 1, 0)]=-0.393019514198*x_ref[0]**o + (-0.656291927921)*x_ref[0] + (0.336690441109)*x_ref[1]**o + (0.916874920225)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.0726266366313*x[0]**o + (-0.0753814179861)*x[0] + (0.309365769932)*x[1]**o + (-0.496989274637)*x[1]
+        ref[(2, 2, 1, 1)]=-0.0726266366313*x_ref[0]**o + (-0.0753814179861)*x_ref[0] + (0.309365769932)*x_ref[1]**o + (-0.496989274637)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.099946075321*x[0]**o + (0.471140546716)*x[0] + (-0.0375459826382)*x[1]**o + (0.916255694028)*x[1]
+        ref[(2, 2, 1, 2)]=-0.099946075321*x_ref[0]**o + (0.471140546716)*x_ref[0] + (-0.0375459826382)*x_ref[1]**o + (0.916255694028)*x_ref[1]
+        arg[(2, 2, 1, 3)]=-0.021739795267*x[0]**o + (0.677702211174)*x[0] + (-0.311663926746)*x[1]**o + (0.28434352737)*x[1]
+        ref[(2, 2, 1, 3)]=-0.021739795267*x_ref[0]**o + (0.677702211174)*x_ref[0] + (-0.311663926746)*x_ref[1]**o + (0.28434352737)*x_ref[1]
+        arg[(2, 2, 2, 0)]=0.460772446594*x[0]**o + (0.893682367345)*x[0] + (-0.392242116404)*x[1]**o + (-0.399075519)*x[1]
+        ref[(2, 2, 2, 0)]=0.460772446594*x_ref[0]**o + (0.893682367345)*x_ref[0] + (-0.392242116404)*x_ref[1]**o + (-0.399075519)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.689723570222*x[0]**o + (-0.508081663045)*x[0] + (-0.975554257744)*x[1]**o + (-0.634774838258)*x[1]
+        ref[(2, 2, 2, 1)]=0.689723570222*x_ref[0]**o + (-0.508081663045)*x_ref[0] + (-0.975554257744)*x_ref[1]**o + (-0.634774838258)*x_ref[1]
+        arg[(2, 2, 2, 2)]=-0.235062024217*x[0]**o + (0.684682558373)*x[0] + (0.565856296603)*x[1]**o + (0.695604097892)*x[1]
+        ref[(2, 2, 2, 2)]=-0.235062024217*x_ref[0]**o + (0.684682558373)*x_ref[0] + (0.565856296603)*x_ref[1]**o + (0.695604097892)*x_ref[1]
+        arg[(2, 2, 2, 3)]=0.514277704998*x[0]**o + (0.038630594894)*x[0] + (-0.485446715603)*x[1]**o + (-0.834881029712)*x[1]
+        ref[(2, 2, 2, 3)]=0.514277704998*x_ref[0]**o + (0.038630594894)*x_ref[0] + (-0.485446715603)*x_ref[1]**o + (-0.834881029712)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.298741661066*x[0]**o + (0.0149763846616)*x[0] + (-0.359044045129)*x[1]**o + (0.0109251649801)*x[1]
+        ref[(2, 3, 0, 0)]=0.298741661066*x_ref[0]**o + (0.0149763846616)*x_ref[0] + (-0.359044045129)*x_ref[1]**o + (0.0109251649801)*x_ref[1]
+        arg[(2, 3, 0, 1)]=-0.032942532433*x[0]**o + (0.852841782096)*x[0] + (-0.727895021271)*x[1]**o + (0.882062793663)*x[1]
+        ref[(2, 3, 0, 1)]=-0.032942532433*x_ref[0]**o + (0.852841782096)*x_ref[0] + (-0.727895021271)*x_ref[1]**o + (0.882062793663)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.774378040571*x[0]**o + (-0.846472509693)*x[0] + (-0.0618980976116)*x[1]**o + (-0.349965456694)*x[1]
+        ref[(2, 3, 0, 2)]=0.774378040571*x_ref[0]**o + (-0.846472509693)*x_ref[0] + (-0.0618980976116)*x_ref[1]**o + (-0.349965456694)*x_ref[1]
+        arg[(2, 3, 0, 3)]=0.938191399379*x[0]**o + (-0.923137084462)*x[0] + (-0.928066886397)*x[1]**o + (-0.19382722156)*x[1]
+        ref[(2, 3, 0, 3)]=0.938191399379*x_ref[0]**o + (-0.923137084462)*x_ref[0] + (-0.928066886397)*x_ref[1]**o + (-0.19382722156)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.456585775684*x[0]**o + (0.00371403480067)*x[0] + (-0.360396976751)*x[1]**o + (-0.610294229552)*x[1]
+        ref[(2, 3, 1, 0)]=0.456585775684*x_ref[0]**o + (0.00371403480067)*x_ref[0] + (-0.360396976751)*x_ref[1]**o + (-0.610294229552)*x_ref[1]
+        arg[(2, 3, 1, 1)]=0.95370561263*x[0]**o + (0.619229067018)*x[0] + (0.935893194894)*x[1]**o + (0.982184975113)*x[1]
+        ref[(2, 3, 1, 1)]=0.95370561263*x_ref[0]**o + (0.619229067018)*x_ref[0] + (0.935893194894)*x_ref[1]**o + (0.982184975113)*x_ref[1]
+        arg[(2, 3, 1, 2)]=-0.634432565623*x[0]**o + (0.66322434464)*x[0] + (0.537507150815)*x[1]**o + (-0.0974006698146)*x[1]
+        ref[(2, 3, 1, 2)]=-0.634432565623*x_ref[0]**o + (0.66322434464)*x_ref[0] + (0.537507150815)*x_ref[1]**o + (-0.0974006698146)*x_ref[1]
+        arg[(2, 3, 1, 3)]=-0.791197557159*x[0]**o + (0.014661960475)*x[0] + (0.0819935353425)*x[1]**o + (-0.22812063802)*x[1]
+        ref[(2, 3, 1, 3)]=-0.791197557159*x_ref[0]**o + (0.014661960475)*x_ref[0] + (0.0819935353425)*x_ref[1]**o + (-0.22812063802)*x_ref[1]
+        arg[(2, 3, 2, 0)]=0.416950564642*x[0]**o + (-0.963016693461)*x[0] + (-0.397573612816)*x[1]**o + (-0.824459776369)*x[1]
+        ref[(2, 3, 2, 0)]=0.416950564642*x_ref[0]**o + (-0.963016693461)*x_ref[0] + (-0.397573612816)*x_ref[1]**o + (-0.824459776369)*x_ref[1]
+        arg[(2, 3, 2, 1)]=0.774086237046*x[0]**o + (0.0295769736188)*x[0] + (-0.685436369817)*x[1]**o + (0.430469528247)*x[1]
+        ref[(2, 3, 2, 1)]=0.774086237046*x_ref[0]**o + (0.0295769736188)*x_ref[0] + (-0.685436369817)*x_ref[1]**o + (0.430469528247)*x_ref[1]
+        arg[(2, 3, 2, 2)]=-0.270045357043*x[0]**o + (-0.270059016959)*x[0] + (-0.693374239971)*x[1]**o + (0.621131705531)*x[1]
+        ref[(2, 3, 2, 2)]=-0.270045357043*x_ref[0]**o + (-0.270059016959)*x_ref[0] + (-0.693374239971)*x_ref[1]**o + (0.621131705531)*x_ref[1]
+        arg[(2, 3, 2, 3)]=-0.183573266757*x[0]**o + (0.961124699502)*x[0] + (-0.749372499095)*x[1]**o + (0.287394095621)*x[1]
+        ref[(2, 3, 2, 3)]=-0.183573266757*x_ref[0]**o + (0.961124699502)*x_ref[0] + (-0.749372499095)*x_ref[1]**o + (0.287394095621)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.285897713461*x[0]**o + (-0.726824873841)*x[0] + (-0.807587133069)*x[1]**o + (0.771614089417)*x[1]
+        ref[(3, 0, 0, 0)]=0.285897713461*x_ref[0]**o + (-0.726824873841)*x_ref[0] + (-0.807587133069)*x_ref[1]**o + (0.771614089417)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.910071260668*x[0]**o + (-0.04324424345)*x[0] + (0.637675758631)*x[1]**o + (-0.781996532065)*x[1]
+        ref[(3, 0, 0, 1)]=-0.910071260668*x_ref[0]**o + (-0.04324424345)*x_ref[0] + (0.637675758631)*x_ref[1]**o + (-0.781996532065)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.205224032839*x[0]**o + (-0.57303898498)*x[0] + (-0.684323165058)*x[1]**o + (-0.484286306813)*x[1]
+        ref[(3, 0, 0, 2)]=-0.205224032839*x_ref[0]**o + (-0.57303898498)*x_ref[0] + (-0.684323165058)*x_ref[1]**o + (-0.484286306813)*x_ref[1]
+        arg[(3, 0, 0, 3)]=0.347301863977*x[0]**o + (0.68199317722)*x[0] + (0.856873720529)*x[1]**o + (0.00218712761055)*x[1]
+        ref[(3, 0, 0, 3)]=0.347301863977*x_ref[0]**o + (0.68199317722)*x_ref[0] + (0.856873720529)*x_ref[1]**o + (0.00218712761055)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.471455943482*x[0]**o + (0.556379524385)*x[0] + (0.930435035211)*x[1]**o + (0.309027715373)*x[1]
+        ref[(3, 0, 1, 0)]=0.471455943482*x_ref[0]**o + (0.556379524385)*x_ref[0] + (0.930435035211)*x_ref[1]**o + (0.309027715373)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.911399729647*x[0]**o + (0.285822817363)*x[0] + (-0.392788320887)*x[1]**o + (0.430052815865)*x[1]
+        ref[(3, 0, 1, 1)]=-0.911399729647*x_ref[0]**o + (0.285822817363)*x_ref[0] + (-0.392788320887)*x_ref[1]**o + (0.430052815865)*x_ref[1]
+        arg[(3, 0, 1, 2)]=0.539761577355*x[0]**o + (-0.276504239862)*x[0] + (0.248361965844)*x[1]**o + (-0.110944737977)*x[1]
+        ref[(3, 0, 1, 2)]=0.539761577355*x_ref[0]**o + (-0.276504239862)*x_ref[0] + (0.248361965844)*x_ref[1]**o + (-0.110944737977)*x_ref[1]
+        arg[(3, 0, 1, 3)]=0.970741569294*x[0]**o + (-0.473061070811)*x[0] + (0.239393550181)*x[1]**o + (0.371697635332)*x[1]
+        ref[(3, 0, 1, 3)]=0.970741569294*x_ref[0]**o + (-0.473061070811)*x_ref[0] + (0.239393550181)*x_ref[1]**o + (0.371697635332)*x_ref[1]
+        arg[(3, 0, 2, 0)]=0.102208260492*x[0]**o + (0.722337230432)*x[0] + (0.435837777724)*x[1]**o + (-0.235159957326)*x[1]
+        ref[(3, 0, 2, 0)]=0.102208260492*x_ref[0]**o + (0.722337230432)*x_ref[0] + (0.435837777724)*x_ref[1]**o + (-0.235159957326)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.450413075085*x[0]**o + (0.392985900188)*x[0] + (-0.689157481518)*x[1]**o + (-0.582990811516)*x[1]
+        ref[(3, 0, 2, 1)]=0.450413075085*x_ref[0]**o + (0.392985900188)*x_ref[0] + (-0.689157481518)*x_ref[1]**o + (-0.582990811516)*x_ref[1]
+        arg[(3, 0, 2, 2)]=0.199222831832*x[0]**o + (-0.0354560283619)*x[0] + (-0.528846826083)*x[1]**o + (0.718234604421)*x[1]
+        ref[(3, 0, 2, 2)]=0.199222831832*x_ref[0]**o + (-0.0354560283619)*x_ref[0] + (-0.528846826083)*x_ref[1]**o + (0.718234604421)*x_ref[1]
+        arg[(3, 0, 2, 3)]=0.323181221895*x[0]**o + (-0.105605070468)*x[0] + (-0.608004575568)*x[1]**o + (0.604591931035)*x[1]
+        ref[(3, 0, 2, 3)]=0.323181221895*x_ref[0]**o + (-0.105605070468)*x_ref[0] + (-0.608004575568)*x_ref[1]**o + (0.604591931035)*x_ref[1]
+        arg[(3, 1, 0, 0)]=0.864896263976*x[0]**o + (0.0961697271636)*x[0] + (0.50034867438)*x[1]**o + (-0.585781516072)*x[1]
+        ref[(3, 1, 0, 0)]=0.864896263976*x_ref[0]**o + (0.0961697271636)*x_ref[0] + (0.50034867438)*x_ref[1]**o + (-0.585781516072)*x_ref[1]
+        arg[(3, 1, 0, 1)]=-0.502446687677*x[0]**o + (-0.832347596862)*x[0] + (-0.696100830929)*x[1]**o + (0.109055258633)*x[1]
+        ref[(3, 1, 0, 1)]=-0.502446687677*x_ref[0]**o + (-0.832347596862)*x_ref[0] + (-0.696100830929)*x_ref[1]**o + (0.109055258633)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.815372852451*x[0]**o + (0.169830684384)*x[0] + (0.317006858869)*x[1]**o + (0.356512993429)*x[1]
+        ref[(3, 1, 0, 2)]=0.815372852451*x_ref[0]**o + (0.169830684384)*x_ref[0] + (0.317006858869)*x_ref[1]**o + (0.356512993429)*x_ref[1]
+        arg[(3, 1, 0, 3)]=0.194383386342*x[0]**o + (-0.906954164649)*x[0] + (-0.107460714257)*x[1]**o + (-0.204902515322)*x[1]
+        ref[(3, 1, 0, 3)]=0.194383386342*x_ref[0]**o + (-0.906954164649)*x_ref[0] + (-0.107460714257)*x_ref[1]**o + (-0.204902515322)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.76175982117*x[0]**o + (0.87380060212)*x[0] + (-0.623578725593)*x[1]**o + (-0.928809452036)*x[1]
+        ref[(3, 1, 1, 0)]=0.76175982117*x_ref[0]**o + (0.87380060212)*x_ref[0] + (-0.623578725593)*x_ref[1]**o + (-0.928809452036)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.743179158976*x[0]**o + (0.177856524243)*x[0] + (0.337557579521)*x[1]**o + (0.93102024582)*x[1]
+        ref[(3, 1, 1, 1)]=-0.743179158976*x_ref[0]**o + (0.177856524243)*x_ref[0] + (0.337557579521)*x_ref[1]**o + (0.93102024582)*x_ref[1]
+        arg[(3, 1, 1, 2)]=0.727235793113*x[0]**o + (-0.626612181174)*x[0] + (-0.872522645318)*x[1]**o + (0.905533916761)*x[1]
+        ref[(3, 1, 1, 2)]=0.727235793113*x_ref[0]**o + (-0.626612181174)*x_ref[0] + (-0.872522645318)*x_ref[1]**o + (0.905533916761)*x_ref[1]
+        arg[(3, 1, 1, 3)]=0.360037155209*x[0]**o + (0.25216273636)*x[0] + (-0.905489923827)*x[1]**o + (0.803530433107)*x[1]
+        ref[(3, 1, 1, 3)]=0.360037155209*x_ref[0]**o + (0.25216273636)*x_ref[0] + (-0.905489923827)*x_ref[1]**o + (0.803530433107)*x_ref[1]
+        arg[(3, 1, 2, 0)]=-0.1611779522*x[0]**o + (-0.581598634952)*x[0] + (0.864678400954)*x[1]**o + (-0.648300196749)*x[1]
+        ref[(3, 1, 2, 0)]=-0.1611779522*x_ref[0]**o + (-0.581598634952)*x_ref[0] + (0.864678400954)*x_ref[1]**o + (-0.648300196749)*x_ref[1]
+        arg[(3, 1, 2, 1)]=0.816988739498*x[0]**o + (-0.857613220527)*x[0] + (-0.051762363675)*x[1]**o + (0.621773752986)*x[1]
+        ref[(3, 1, 2, 1)]=0.816988739498*x_ref[0]**o + (-0.857613220527)*x_ref[0] + (-0.051762363675)*x_ref[1]**o + (0.621773752986)*x_ref[1]
+        arg[(3, 1, 2, 2)]=-0.835185429569*x[0]**o + (0.45764018339)*x[0] + (0.246398747361)*x[1]**o + (-0.794844448396)*x[1]
+        ref[(3, 1, 2, 2)]=-0.835185429569*x_ref[0]**o + (0.45764018339)*x_ref[0] + (0.246398747361)*x_ref[1]**o + (-0.794844448396)*x_ref[1]
+        arg[(3, 1, 2, 3)]=0.701842477788*x[0]**o + (0.613554797358)*x[0] + (-0.512360169969)*x[1]**o + (0.0137873743975)*x[1]
+        ref[(3, 1, 2, 3)]=0.701842477788*x_ref[0]**o + (0.613554797358)*x_ref[0] + (-0.512360169969)*x_ref[1]**o + (0.0137873743975)*x_ref[1]
+        arg[(3, 2, 0, 0)]=0.368146466272*x[0]**o + (0.136611421829)*x[0] + (0.549957235525)*x[1]**o + (0.738364582781)*x[1]
+        ref[(3, 2, 0, 0)]=0.368146466272*x_ref[0]**o + (0.136611421829)*x_ref[0] + (0.549957235525)*x_ref[1]**o + (0.738364582781)*x_ref[1]
+        arg[(3, 2, 0, 1)]=0.0829921968349*x[0]**o + (-0.993743038066)*x[0] + (0.413032703849)*x[1]**o + (-0.512813485467)*x[1]
+        ref[(3, 2, 0, 1)]=0.0829921968349*x_ref[0]**o + (-0.993743038066)*x_ref[0] + (0.413032703849)*x_ref[1]**o + (-0.512813485467)*x_ref[1]
+        arg[(3, 2, 0, 2)]=0.649545931499*x[0]**o + (-0.766321251779)*x[0] + (0.489212559208)*x[1]**o + (-0.423910773711)*x[1]
+        ref[(3, 2, 0, 2)]=0.649545931499*x_ref[0]**o + (-0.766321251779)*x_ref[0] + (0.489212559208)*x_ref[1]**o + (-0.423910773711)*x_ref[1]
+        arg[(3, 2, 0, 3)]=0.680581437307*x[0]**o + (0.619095016907)*x[0] + (0.296737234717)*x[1]**o + (0.515369085447)*x[1]
+        ref[(3, 2, 0, 3)]=0.680581437307*x_ref[0]**o + (0.619095016907)*x_ref[0] + (0.296737234717)*x_ref[1]**o + (0.515369085447)*x_ref[1]
+        arg[(3, 2, 1, 0)]=-0.536881646834*x[0]**o + (-0.747705882102)*x[0] + (-0.797279379839)*x[1]**o + (-0.770469482671)*x[1]
+        ref[(3, 2, 1, 0)]=-0.536881646834*x_ref[0]**o + (-0.747705882102)*x_ref[0] + (-0.797279379839)*x_ref[1]**o + (-0.770469482671)*x_ref[1]
+        arg[(3, 2, 1, 1)]=0.213567694131*x[0]**o + (0.593344791758)*x[0] + (0.732341140673)*x[1]**o + (0.613695063196)*x[1]
+        ref[(3, 2, 1, 1)]=0.213567694131*x_ref[0]**o + (0.593344791758)*x_ref[0] + (0.732341140673)*x_ref[1]**o + (0.613695063196)*x_ref[1]
+        arg[(3, 2, 1, 2)]=-0.0243137853376*x[0]**o + (0.482246460014)*x[0] + (-0.762292969773)*x[1]**o + (-0.866798693351)*x[1]
+        ref[(3, 2, 1, 2)]=-0.0243137853376*x_ref[0]**o + (0.482246460014)*x_ref[0] + (-0.762292969773)*x_ref[1]**o + (-0.866798693351)*x_ref[1]
+        arg[(3, 2, 1, 3)]=-0.0681020180491*x[0]**o + (-0.196502813136)*x[0] + (0.997009165069)*x[1]**o + (-0.700252550419)*x[1]
+        ref[(3, 2, 1, 3)]=-0.0681020180491*x_ref[0]**o + (-0.196502813136)*x_ref[0] + (0.997009165069)*x_ref[1]**o + (-0.700252550419)*x_ref[1]
+        arg[(3, 2, 2, 0)]=-0.0588162665866*x[0]**o + (0.995245771042)*x[0] + (-0.849554970162)*x[1]**o + (0.927564001705)*x[1]
+        ref[(3, 2, 2, 0)]=-0.0588162665866*x_ref[0]**o + (0.995245771042)*x_ref[0] + (-0.849554970162)*x_ref[1]**o + (0.927564001705)*x_ref[1]
+        arg[(3, 2, 2, 1)]=-0.608785571445*x[0]**o + (0.543119279992)*x[0] + (-0.553251391335)*x[1]**o + (0.76275314426)*x[1]
+        ref[(3, 2, 2, 1)]=-0.608785571445*x_ref[0]**o + (0.543119279992)*x_ref[0] + (-0.553251391335)*x_ref[1]**o + (0.76275314426)*x_ref[1]
+        arg[(3, 2, 2, 2)]=0.698481774019*x[0]**o + (-0.86935585611)*x[0] + (0.331439137472)*x[1]**o + (0.454263516268)*x[1]
+        ref[(3, 2, 2, 2)]=0.698481774019*x_ref[0]**o + (-0.86935585611)*x_ref[0] + (0.331439137472)*x_ref[1]**o + (0.454263516268)*x_ref[1]
+        arg[(3, 2, 2, 3)]=-0.533709250547*x[0]**o + (-0.92084700561)*x[0] + (-0.504177873724)*x[1]**o + (-0.863907503066)*x[1]
+        ref[(3, 2, 2, 3)]=-0.533709250547*x_ref[0]**o + (-0.92084700561)*x_ref[0] + (-0.504177873724)*x_ref[1]**o + (-0.863907503066)*x_ref[1]
+        arg[(3, 3, 0, 0)]=0.674205624002*x[0]**o + (-0.0742669333456)*x[0] + (0.970437586857)*x[1]**o + (-0.853429252933)*x[1]
+        ref[(3, 3, 0, 0)]=0.674205624002*x_ref[0]**o + (-0.0742669333456)*x_ref[0] + (0.970437586857)*x_ref[1]**o + (-0.853429252933)*x_ref[1]
+        arg[(3, 3, 0, 1)]=-0.551371021904*x[0]**o + (0.575894899233)*x[0] + (-0.134339059019)*x[1]**o + (-0.560354089321)*x[1]
+        ref[(3, 3, 0, 1)]=-0.551371021904*x_ref[0]**o + (0.575894899233)*x_ref[0] + (-0.134339059019)*x_ref[1]**o + (-0.560354089321)*x_ref[1]
+        arg[(3, 3, 0, 2)]=-0.359310667998*x[0]**o + (0.881025632805)*x[0] + (0.818791388142)*x[1]**o + (0.942834156165)*x[1]
+        ref[(3, 3, 0, 2)]=-0.359310667998*x_ref[0]**o + (0.881025632805)*x_ref[0] + (0.818791388142)*x_ref[1]**o + (0.942834156165)*x_ref[1]
+        arg[(3, 3, 0, 3)]=-0.938928746214*x[0]**o + (0.341880111739)*x[0] + (0.903290570847)*x[1]**o + (-0.99430615099)*x[1]
+        ref[(3, 3, 0, 3)]=-0.938928746214*x_ref[0]**o + (0.341880111739)*x_ref[0] + (0.903290570847)*x_ref[1]**o + (-0.99430615099)*x_ref[1]
+        arg[(3, 3, 1, 0)]=-0.501153158468*x[0]**o + (-0.347160397077)*x[0] + (-0.245976712719)*x[1]**o + (0.0622736293882)*x[1]
+        ref[(3, 3, 1, 0)]=-0.501153158468*x_ref[0]**o + (-0.347160397077)*x_ref[0] + (-0.245976712719)*x_ref[1]**o + (0.0622736293882)*x_ref[1]
+        arg[(3, 3, 1, 1)]=-0.509703497169*x[0]**o + (0.736924640607)*x[0] + (-0.187235294297)*x[1]**o + (0.0537879103122)*x[1]
+        ref[(3, 3, 1, 1)]=-0.509703497169*x_ref[0]**o + (0.736924640607)*x_ref[0] + (-0.187235294297)*x_ref[1]**o + (0.0537879103122)*x_ref[1]
+        arg[(3, 3, 1, 2)]=0.90284813602*x[0]**o + (0.833335513653)*x[0] + (0.629922387699)*x[1]**o + (0.692627116173)*x[1]
+        ref[(3, 3, 1, 2)]=0.90284813602*x_ref[0]**o + (0.833335513653)*x_ref[0] + (0.629922387699)*x_ref[1]**o + (0.692627116173)*x_ref[1]
+        arg[(3, 3, 1, 3)]=-0.711336284389*x[0]**o + (-0.744422837474)*x[0] + (-0.779601000551)*x[1]**o + (0.363477447354)*x[1]
+        ref[(3, 3, 1, 3)]=-0.711336284389*x_ref[0]**o + (-0.744422837474)*x_ref[0] + (-0.779601000551)*x_ref[1]**o + (0.363477447354)*x_ref[1]
+        arg[(3, 3, 2, 0)]=-0.100268993633*x[0]**o + (0.755559831033)*x[0] + (0.964583260045)*x[1]**o + (0.952097368313)*x[1]
+        ref[(3, 3, 2, 0)]=-0.100268993633*x_ref[0]**o + (0.755559831033)*x_ref[0] + (0.964583260045)*x_ref[1]**o + (0.952097368313)*x_ref[1]
+        arg[(3, 3, 2, 1)]=0.15484492183*x[0]**o + (0.696137216569)*x[0] + (-0.985887412974)*x[1]**o + (-0.439134778248)*x[1]
+        ref[(3, 3, 2, 1)]=0.15484492183*x_ref[0]**o + (0.696137216569)*x_ref[0] + (-0.985887412974)*x_ref[1]**o + (-0.439134778248)*x_ref[1]
+        arg[(3, 3, 2, 2)]=-0.978929075054*x[0]**o + (-0.397826529305)*x[0] + (0.40081690204)*x[1]**o + (-0.749409000351)*x[1]
+        ref[(3, 3, 2, 2)]=-0.978929075054*x_ref[0]**o + (-0.397826529305)*x_ref[0] + (0.40081690204)*x_ref[1]**o + (-0.749409000351)*x_ref[1]
+        arg[(3, 3, 2, 3)]=-0.600574239608*x[0]**o + (-0.907281588876)*x[0] + (0.611163577161)*x[1]**o + (-0.837202214302)*x[1]
+        ref[(3, 3, 2, 3)]=-0.600574239608*x_ref[0]**o + (-0.907281588876)*x_ref[0] + (0.611163577161)*x_ref[1]**o + (-0.837202214302)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.511985229674*x[2]**o + (-0.178909427221)*x[2]
+            ref[(0, 0, 0, 0)]+=0.511985229674*x_ref[2]**o + (-0.178909427221)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.156768034076*x[2]**o + (-0.021351698762)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.156768034076*x_ref[2]**o + (-0.021351698762)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.919675386657*x[2]**o + (0.922663938185)*x[2]
+            ref[(0, 0, 0, 2)]+=0.919675386657*x_ref[2]**o + (0.922663938185)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.268468440839*x[2]**o + (-0.746930214508)*x[2]
+            ref[(0, 0, 0, 3)]+=0.268468440839*x_ref[2]**o + (-0.746930214508)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.169056691228*x[2]**o + (-0.572131767708)*x[2]
+            ref[(0, 0, 1, 0)]+=0.169056691228*x_ref[2]**o + (-0.572131767708)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.125654383061*x[2]**o + (-0.206207571097)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.125654383061*x_ref[2]**o + (-0.206207571097)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.900437209128*x[2]**o + (-0.409604439)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.900437209128*x_ref[2]**o + (-0.409604439)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.641179322149*x[2]**o + (-0.720143644632)*x[2]
+            ref[(0, 0, 1, 3)]+=0.641179322149*x_ref[2]**o + (-0.720143644632)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.713364331927*x[2]**o + (-0.867543142922)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.713364331927*x_ref[2]**o + (-0.867543142922)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.866257290175*x[2]**o + (-0.483722228312)*x[2]
+            ref[(0, 0, 2, 1)]+=0.866257290175*x_ref[2]**o + (-0.483722228312)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.429350116404*x[2]**o + (0.0233706894843)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.429350116404*x_ref[2]**o + (0.0233706894843)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.356783115698*x[2]**o + (-0.228469028659)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.356783115698*x_ref[2]**o + (-0.228469028659)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.797588668051*x[2]**o + (0.298322981753)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.797588668051*x_ref[2]**o + (0.298322981753)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.727871481771*x[2]**o + (-0.0776874806266)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.727871481771*x_ref[2]**o + (-0.0776874806266)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.641788672485*x[2]**o + (0.792933093321)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.641788672485*x_ref[2]**o + (0.792933093321)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.656637879008*x[2]**o + (-0.454162665853)*x[2]
+            ref[(0, 1, 0, 3)]+=0.656637879008*x_ref[2]**o + (-0.454162665853)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.383628157371*x[2]**o + (0.533676674815)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.383628157371*x_ref[2]**o + (0.533676674815)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.0656751393604*x[2]**o + (-0.0469650415118)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.0656751393604*x_ref[2]**o + (-0.0469650415118)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.821010260446*x[2]**o + (0.423475561765)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.821010260446*x_ref[2]**o + (0.423475561765)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.152925923913*x[2]**o + (0.984220683361)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.152925923913*x_ref[2]**o + (0.984220683361)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.629302484213*x[2]**o + (-0.852717970489)*x[2]
+            ref[(0, 1, 2, 0)]+=0.629302484213*x_ref[2]**o + (-0.852717970489)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.247556378*x[2]**o + (0.51680777101)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.247556378*x_ref[2]**o + (0.51680777101)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.561673299068*x[2]**o + (-0.847947418635)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.561673299068*x_ref[2]**o + (-0.847947418635)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.382973523635*x[2]**o + (0.678930419505)*x[2]
+            ref[(0, 1, 2, 3)]+=0.382973523635*x_ref[2]**o + (0.678930419505)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.301868285857*x[2]**o + (-0.913606330567)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.301868285857*x_ref[2]**o + (-0.913606330567)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.441532680372*x[2]**o + (0.019836431391)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.441532680372*x_ref[2]**o + (0.019836431391)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.541891567744*x[2]**o + (0.89958226173)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.541891567744*x_ref[2]**o + (0.89958226173)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=-0.945134452647*x[2]**o + (-0.488313473814)*x[2]
+            ref[(0, 2, 0, 3)]+=-0.945134452647*x_ref[2]**o + (-0.488313473814)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.725331306389*x[2]**o + (0.745100224956)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.725331306389*x_ref[2]**o + (0.745100224956)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.511329177444*x[2]**o + (-0.174843674928)*x[2]
+            ref[(0, 2, 1, 1)]+=0.511329177444*x_ref[2]**o + (-0.174843674928)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.303926908402*x[2]**o + (0.0408402097193)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.303926908402*x_ref[2]**o + (0.0408402097193)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=-0.43781503735*x[2]**o + (-0.209390287687)*x[2]
+            ref[(0, 2, 1, 3)]+=-0.43781503735*x_ref[2]**o + (-0.209390287687)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.700065779515*x[2]**o + (0.762384855694)*x[2]
+            ref[(0, 2, 2, 0)]+=0.700065779515*x_ref[2]**o + (0.762384855694)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.885552203703*x[2]**o + (0.784611391001)*x[2]
+            ref[(0, 2, 2, 1)]+=-0.885552203703*x_ref[2]**o + (0.784611391001)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=-0.780377966953*x[2]**o + (0.61576440027)*x[2]
+            ref[(0, 2, 2, 2)]+=-0.780377966953*x_ref[2]**o + (0.61576440027)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=0.34651677506*x[2]**o + (-0.784059447873)*x[2]
+            ref[(0, 2, 2, 3)]+=0.34651677506*x_ref[2]**o + (-0.784059447873)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.820782251534*x[2]**o + (0.0706603075253)*x[2]
+            ref[(0, 3, 0, 0)]+=-0.820782251534*x_ref[2]**o + (0.0706603075253)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.865818562227*x[2]**o + (0.314621118928)*x[2]
+            ref[(0, 3, 0, 1)]+=0.865818562227*x_ref[2]**o + (0.314621118928)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=-0.19077960227*x[2]**o + (-0.754545387344)*x[2]
+            ref[(0, 3, 0, 2)]+=-0.19077960227*x_ref[2]**o + (-0.754545387344)*x_ref[2]
+            arg[(0, 3, 0, 3)]+=0.875435444613*x[2]**o + (0.319516922987)*x[2]
+            ref[(0, 3, 0, 3)]+=0.875435444613*x_ref[2]**o + (0.319516922987)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.866409361553*x[2]**o + (-0.235865586657)*x[2]
+            ref[(0, 3, 1, 0)]+=0.866409361553*x_ref[2]**o + (-0.235865586657)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.0859634007409*x[2]**o + (-0.336843336316)*x[2]
+            ref[(0, 3, 1, 1)]+=0.0859634007409*x_ref[2]**o + (-0.336843336316)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=-0.571915253077*x[2]**o + (-0.204146040741)*x[2]
+            ref[(0, 3, 1, 2)]+=-0.571915253077*x_ref[2]**o + (-0.204146040741)*x_ref[2]
+            arg[(0, 3, 1, 3)]+=0.348881616594*x[2]**o + (-0.694617484084)*x[2]
+            ref[(0, 3, 1, 3)]+=0.348881616594*x_ref[2]**o + (-0.694617484084)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=0.360499692848*x[2]**o + (0.488166040249)*x[2]
+            ref[(0, 3, 2, 0)]+=0.360499692848*x_ref[2]**o + (0.488166040249)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=0.998906901808*x[2]**o + (-0.884755874127)*x[2]
+            ref[(0, 3, 2, 1)]+=0.998906901808*x_ref[2]**o + (-0.884755874127)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.48441104194*x[2]**o + (-0.479554106178)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.48441104194*x_ref[2]**o + (-0.479554106178)*x_ref[2]
+            arg[(0, 3, 2, 3)]+=0.100376402656*x[2]**o + (-0.569779149317)*x[2]
+            ref[(0, 3, 2, 3)]+=0.100376402656*x_ref[2]**o + (-0.569779149317)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.635048965422*x[2]**o + (-0.748754567646)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.635048965422*x_ref[2]**o + (-0.748754567646)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.11912980791*x[2]**o + (0.229558055913)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.11912980791*x_ref[2]**o + (0.229558055913)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.362663926154*x[2]**o + (-0.929455179515)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.362663926154*x_ref[2]**o + (-0.929455179515)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.829172601466*x[2]**o + (0.91401248835)*x[2]
+            ref[(1, 0, 0, 3)]+=0.829172601466*x_ref[2]**o + (0.91401248835)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.287139680585*x[2]**o + (0.468881953266)*x[2]
+            ref[(1, 0, 1, 0)]+=0.287139680585*x_ref[2]**o + (0.468881953266)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.435745505925*x[2]**o + (0.914843097658)*x[2]
+            ref[(1, 0, 1, 1)]+=0.435745505925*x_ref[2]**o + (0.914843097658)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.852489722467*x[2]**o + (-0.0171799410853)*x[2]
+            ref[(1, 0, 1, 2)]+=0.852489722467*x_ref[2]**o + (-0.0171799410853)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.909336543377*x[2]**o + (0.0307210278015)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.909336543377*x_ref[2]**o + (0.0307210278015)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.897548807059*x[2]**o + (-0.490244902713)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.897548807059*x_ref[2]**o + (-0.490244902713)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.85889430681*x[2]**o + (-0.037757794074)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.85889430681*x_ref[2]**o + (-0.037757794074)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.312700082735*x[2]**o + (-0.913022155193)*x[2]
+            ref[(1, 0, 2, 2)]+=0.312700082735*x_ref[2]**o + (-0.913022155193)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=0.0522567519318*x[2]**o + (-0.787085204464)*x[2]
+            ref[(1, 0, 2, 3)]+=0.0522567519318*x_ref[2]**o + (-0.787085204464)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.930740374456*x[2]**o + (0.752045321925)*x[2]
+            ref[(1, 1, 0, 0)]+=0.930740374456*x_ref[2]**o + (0.752045321925)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.551200485052*x[2]**o + (0.535025812498)*x[2]
+            ref[(1, 1, 0, 1)]+=0.551200485052*x_ref[2]**o + (0.535025812498)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.00610831977848*x[2]**o + (-0.607370483871)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.00610831977848*x_ref[2]**o + (-0.607370483871)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.0270565185234*x[2]**o + (-0.456662416485)*x[2]
+            ref[(1, 1, 0, 3)]+=0.0270565185234*x_ref[2]**o + (-0.456662416485)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.442123578356*x[2]**o + (-0.475397981379)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.442123578356*x_ref[2]**o + (-0.475397981379)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.167795349175*x[2]**o + (-0.642912715366)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.167795349175*x_ref[2]**o + (-0.642912715366)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.74301629719*x[2]**o + (0.913159241376)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.74301629719*x_ref[2]**o + (0.913159241376)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.424548295059*x[2]**o + (-0.780416587277)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.424548295059*x_ref[2]**o + (-0.780416587277)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.243462464263*x[2]**o + (0.597644048566)*x[2]
+            ref[(1, 1, 2, 0)]+=0.243462464263*x_ref[2]**o + (0.597644048566)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.37001059168*x[2]**o + (0.815631625894)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.37001059168*x_ref[2]**o + (0.815631625894)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.835522671331*x[2]**o + (0.564642232478)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.835522671331*x_ref[2]**o + (0.564642232478)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.0032436721189*x[2]**o + (0.302394482869)*x[2]
+            ref[(1, 1, 2, 3)]+=0.0032436721189*x_ref[2]**o + (0.302394482869)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.34042846784*x[2]**o + (-0.415158035837)*x[2]
+            ref[(1, 2, 0, 0)]+=0.34042846784*x_ref[2]**o + (-0.415158035837)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.41790889038*x[2]**o + (-0.855016143316)*x[2]
+            ref[(1, 2, 0, 1)]+=0.41790889038*x_ref[2]**o + (-0.855016143316)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.561685213805*x[2]**o + (-0.565779941949)*x[2]
+            ref[(1, 2, 0, 2)]+=0.561685213805*x_ref[2]**o + (-0.565779941949)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=0.924192521257*x[2]**o + (-0.19881778784)*x[2]
+            ref[(1, 2, 0, 3)]+=0.924192521257*x_ref[2]**o + (-0.19881778784)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.749387146204*x[2]**o + (0.454806735665)*x[2]
+            ref[(1, 2, 1, 0)]+=-0.749387146204*x_ref[2]**o + (0.454806735665)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.457209895844*x[2]**o + (-0.0496434435362)*x[2]
+            ref[(1, 2, 1, 1)]+=0.457209895844*x_ref[2]**o + (-0.0496434435362)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.398192024775*x[2]**o + (-0.909850615254)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.398192024775*x_ref[2]**o + (-0.909850615254)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=0.368083616375*x[2]**o + (-0.0690145724917)*x[2]
+            ref[(1, 2, 1, 3)]+=0.368083616375*x_ref[2]**o + (-0.0690145724917)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=0.887263663063*x[2]**o + (-0.997764626037)*x[2]
+            ref[(1, 2, 2, 0)]+=0.887263663063*x_ref[2]**o + (-0.997764626037)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.369678999662*x[2]**o + (-0.685186055563)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.369678999662*x_ref[2]**o + (-0.685186055563)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.944100477377*x[2]**o + (0.132321135409)*x[2]
+            ref[(1, 2, 2, 2)]+=0.944100477377*x_ref[2]**o + (0.132321135409)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=0.0317280686696*x[2]**o + (-0.328656805874)*x[2]
+            ref[(1, 2, 2, 3)]+=0.0317280686696*x_ref[2]**o + (-0.328656805874)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.858206101885*x[2]**o + (0.347174816445)*x[2]
+            ref[(1, 3, 0, 0)]+=0.858206101885*x_ref[2]**o + (0.347174816445)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.807280553233*x[2]**o + (0.845881235047)*x[2]
+            ref[(1, 3, 0, 1)]+=0.807280553233*x_ref[2]**o + (0.845881235047)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=0.752001700463*x[2]**o + (-0.01341190516)*x[2]
+            ref[(1, 3, 0, 2)]+=0.752001700463*x_ref[2]**o + (-0.01341190516)*x_ref[2]
+            arg[(1, 3, 0, 3)]+=-0.767338830303*x[2]**o + (-0.500793069245)*x[2]
+            ref[(1, 3, 0, 3)]+=-0.767338830303*x_ref[2]**o + (-0.500793069245)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.714020663314*x[2]**o + (0.0425882787793)*x[2]
+            ref[(1, 3, 1, 0)]+=0.714020663314*x_ref[2]**o + (0.0425882787793)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.967135595654*x[2]**o + (-0.949612161)*x[2]
+            ref[(1, 3, 1, 1)]+=-0.967135595654*x_ref[2]**o + (-0.949612161)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.643867513881*x[2]**o + (-0.316101744713)*x[2]
+            ref[(1, 3, 1, 2)]+=0.643867513881*x_ref[2]**o + (-0.316101744713)*x_ref[2]
+            arg[(1, 3, 1, 3)]+=-0.596151296805*x[2]**o + (-0.501553485525)*x[2]
+            ref[(1, 3, 1, 3)]+=-0.596151296805*x_ref[2]**o + (-0.501553485525)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=0.534029659881*x[2]**o + (0.796081988196)*x[2]
+            ref[(1, 3, 2, 0)]+=0.534029659881*x_ref[2]**o + (0.796081988196)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.241192849751*x[2]**o + (0.101796001071)*x[2]
+            ref[(1, 3, 2, 1)]+=0.241192849751*x_ref[2]**o + (0.101796001071)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.537455847441*x[2]**o + (-0.263984969193)*x[2]
+            ref[(1, 3, 2, 2)]+=0.537455847441*x_ref[2]**o + (-0.263984969193)*x_ref[2]
+            arg[(1, 3, 2, 3)]+=0.770238077085*x[2]**o + (0.159730717349)*x[2]
+            ref[(1, 3, 2, 3)]+=0.770238077085*x_ref[2]**o + (0.159730717349)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.911328283994*x[2]**o + (0.277546505818)*x[2]
+            ref[(2, 0, 0, 0)]+=0.911328283994*x_ref[2]**o + (0.277546505818)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.0773396751834*x[2]**o + (-0.398551792172)*x[2]
+            ref[(2, 0, 0, 1)]+=0.0773396751834*x_ref[2]**o + (-0.398551792172)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.923433553786*x[2]**o + (0.901127151555)*x[2]
+            ref[(2, 0, 0, 2)]+=0.923433553786*x_ref[2]**o + (0.901127151555)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.790798191275*x[2]**o + (-0.427303876856)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.790798191275*x_ref[2]**o + (-0.427303876856)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.48730152482*x[2]**o + (-0.890097868546)*x[2]
+            ref[(2, 0, 1, 0)]+=0.48730152482*x_ref[2]**o + (-0.890097868546)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.314511650955*x[2]**o + (-0.343094248935)*x[2]
+            ref[(2, 0, 1, 1)]+=0.314511650955*x_ref[2]**o + (-0.343094248935)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.398249328424*x[2]**o + (-0.159838856135)*x[2]
+            ref[(2, 0, 1, 2)]+=0.398249328424*x_ref[2]**o + (-0.159838856135)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.094739182923*x[2]**o + (-0.579993899572)*x[2]
+            ref[(2, 0, 1, 3)]+=0.094739182923*x_ref[2]**o + (-0.579993899572)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.601431025756*x[2]**o + (-0.398917025053)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.601431025756*x_ref[2]**o + (-0.398917025053)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.652335083094*x[2]**o + (0.125639773999)*x[2]
+            ref[(2, 0, 2, 1)]+=0.652335083094*x_ref[2]**o + (0.125639773999)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=0.666533031449*x[2]**o + (0.0576536080131)*x[2]
+            ref[(2, 0, 2, 2)]+=0.666533031449*x_ref[2]**o + (0.0576536080131)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=0.761872177387*x[2]**o + (0.748004330094)*x[2]
+            ref[(2, 0, 2, 3)]+=0.761872177387*x_ref[2]**o + (0.748004330094)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.861126869944*x[2]**o + (0.157043185349)*x[2]
+            ref[(2, 1, 0, 0)]+=0.861126869944*x_ref[2]**o + (0.157043185349)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.750165022859*x[2]**o + (-0.632038512622)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.750165022859*x_ref[2]**o + (-0.632038512622)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.371596939854*x[2]**o + (0.809882286394)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.371596939854*x_ref[2]**o + (0.809882286394)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.4029443026*x[2]**o + (-0.0420750288779)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.4029443026*x_ref[2]**o + (-0.0420750288779)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.439716274827*x[2]**o + (0.256098265035)*x[2]
+            ref[(2, 1, 1, 0)]+=0.439716274827*x_ref[2]**o + (0.256098265035)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.640466519875*x[2]**o + (-0.94038668266)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.640466519875*x_ref[2]**o + (-0.94038668266)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.322352606816*x[2]**o + (-0.463813921701)*x[2]
+            ref[(2, 1, 1, 2)]+=0.322352606816*x_ref[2]**o + (-0.463813921701)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.280209468562*x[2]**o + (0.6606019291)*x[2]
+            ref[(2, 1, 1, 3)]+=-0.280209468562*x_ref[2]**o + (0.6606019291)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.43609030005*x[2]**o + (0.10988967984)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.43609030005*x_ref[2]**o + (0.10988967984)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.567687664767*x[2]**o + (-0.429661124047)*x[2]
+            ref[(2, 1, 2, 1)]+=0.567687664767*x_ref[2]**o + (-0.429661124047)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.471115208371*x[2]**o + (-0.652383379897)*x[2]
+            ref[(2, 1, 2, 2)]+=0.471115208371*x_ref[2]**o + (-0.652383379897)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=0.332905825581*x[2]**o + (-0.560739610372)*x[2]
+            ref[(2, 1, 2, 3)]+=0.332905825581*x_ref[2]**o + (-0.560739610372)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.191076103188*x[2]**o + (0.678348135214)*x[2]
+            ref[(2, 2, 0, 0)]+=0.191076103188*x_ref[2]**o + (0.678348135214)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.271874230237*x[2]**o + (-0.657218940461)*x[2]
+            ref[(2, 2, 0, 1)]+=0.271874230237*x_ref[2]**o + (-0.657218940461)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=0.218338612175*x[2]**o + (-0.258838952755)*x[2]
+            ref[(2, 2, 0, 2)]+=0.218338612175*x_ref[2]**o + (-0.258838952755)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=0.806039746755*x[2]**o + (-0.948217083149)*x[2]
+            ref[(2, 2, 0, 3)]+=0.806039746755*x_ref[2]**o + (-0.948217083149)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.641774313836*x[2]**o + (0.376483008315)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.641774313836*x_ref[2]**o + (0.376483008315)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.483640453806*x[2]**o + (-0.893212735783)*x[2]
+            ref[(2, 2, 1, 1)]+=0.483640453806*x_ref[2]**o + (-0.893212735783)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.575445319056*x[2]**o + (-0.761882127789)*x[2]
+            ref[(2, 2, 1, 2)]+=0.575445319056*x_ref[2]**o + (-0.761882127789)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=0.945383302646*x[2]**o + (-0.557033891424)*x[2]
+            ref[(2, 2, 1, 3)]+=0.945383302646*x_ref[2]**o + (-0.557033891424)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.359031206086*x[2]**o + (0.475827268104)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.359031206086*x_ref[2]**o + (0.475827268104)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.0972117639539*x[2]**o + (-0.92903811663)*x[2]
+            ref[(2, 2, 2, 1)]+=0.0972117639539*x_ref[2]**o + (-0.92903811663)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=-0.808474971198*x[2]**o + (-0.270009947742)*x[2]
+            ref[(2, 2, 2, 2)]+=-0.808474971198*x_ref[2]**o + (-0.270009947742)*x_ref[2]
+            arg[(2, 2, 2, 3)]+=-0.151476514841*x[2]**o + (0.985868207264)*x[2]
+            ref[(2, 2, 2, 3)]+=-0.151476514841*x_ref[2]**o + (0.985868207264)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.258354252541*x[2]**o + (0.619032811851)*x[2]
+            ref[(2, 3, 0, 0)]+=-0.258354252541*x_ref[2]**o + (0.619032811851)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.120418530552*x[2]**o + (0.481265878445)*x[2]
+            ref[(2, 3, 0, 1)]+=0.120418530552*x_ref[2]**o + (0.481265878445)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=-0.272035377757*x[2]**o + (0.261464453764)*x[2]
+            ref[(2, 3, 0, 2)]+=-0.272035377757*x_ref[2]**o + (0.261464453764)*x_ref[2]
+            arg[(2, 3, 0, 3)]+=0.338547884501*x[2]**o + (0.853886162571)*x[2]
+            ref[(2, 3, 0, 3)]+=0.338547884501*x_ref[2]**o + (0.853886162571)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=-0.826790248586*x[2]**o + (-0.990942290657)*x[2]
+            ref[(2, 3, 1, 0)]+=-0.826790248586*x_ref[2]**o + (-0.990942290657)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.0262408233915*x[2]**o + (-0.972339707105)*x[2]
+            ref[(2, 3, 1, 1)]+=0.0262408233915*x_ref[2]**o + (-0.972339707105)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=0.264209874541*x[2]**o + (0.311973955323)*x[2]
+            ref[(2, 3, 1, 2)]+=0.264209874541*x_ref[2]**o + (0.311973955323)*x_ref[2]
+            arg[(2, 3, 1, 3)]+=-0.119915541591*x[2]**o + (0.19818304611)*x[2]
+            ref[(2, 3, 1, 3)]+=-0.119915541591*x_ref[2]**o + (0.19818304611)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=0.608963882344*x[2]**o + (0.518712106514)*x[2]
+            ref[(2, 3, 2, 0)]+=0.608963882344*x_ref[2]**o + (0.518712106514)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=-0.148751077324*x[2]**o + (0.433386623673)*x[2]
+            ref[(2, 3, 2, 1)]+=-0.148751077324*x_ref[2]**o + (0.433386623673)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=0.36286636688*x[2]**o + (0.395253111144)*x[2]
+            ref[(2, 3, 2, 2)]+=0.36286636688*x_ref[2]**o + (0.395253111144)*x_ref[2]
+            arg[(2, 3, 2, 3)]+=0.076908452816*x[2]**o + (0.850755387399)*x[2]
+            ref[(2, 3, 2, 3)]+=0.076908452816*x_ref[2]**o + (0.850755387399)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=-0.392997618833*x[2]**o + (-0.177102734518)*x[2]
+            ref[(3, 0, 0, 0)]+=-0.392997618833*x_ref[2]**o + (-0.177102734518)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.721637678236*x[2]**o + (-0.29716960128)*x[2]
+            ref[(3, 0, 0, 1)]+=-0.721637678236*x_ref[2]**o + (-0.29716960128)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.509150857813*x[2]**o + (-0.690701661296)*x[2]
+            ref[(3, 0, 0, 2)]+=0.509150857813*x_ref[2]**o + (-0.690701661296)*x_ref[2]
+            arg[(3, 0, 0, 3)]+=-0.101669354766*x[2]**o + (0.231691708491)*x[2]
+            ref[(3, 0, 0, 3)]+=-0.101669354766*x_ref[2]**o + (0.231691708491)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.0597692404766*x[2]**o + (0.129436995453)*x[2]
+            ref[(3, 0, 1, 0)]+=0.0597692404766*x_ref[2]**o + (0.129436995453)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.25614535171*x[2]**o + (0.515729917138)*x[2]
+            ref[(3, 0, 1, 1)]+=0.25614535171*x_ref[2]**o + (0.515729917138)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=0.423304216866*x[2]**o + (-0.68328103273)*x[2]
+            ref[(3, 0, 1, 2)]+=0.423304216866*x_ref[2]**o + (-0.68328103273)*x_ref[2]
+            arg[(3, 0, 1, 3)]+=0.606491152615*x[2]**o + (-0.711705973278)*x[2]
+            ref[(3, 0, 1, 3)]+=0.606491152615*x_ref[2]**o + (-0.711705973278)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=-0.562851186596*x[2]**o + (0.23177556014)*x[2]
+            ref[(3, 0, 2, 0)]+=-0.562851186596*x_ref[2]**o + (0.23177556014)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=0.614468603103*x[2]**o + (-0.129095894294)*x[2]
+            ref[(3, 0, 2, 1)]+=0.614468603103*x_ref[2]**o + (-0.129095894294)*x_ref[2]
+            arg[(3, 0, 2, 2)]+=0.700071234295*x[2]**o + (0.542327934561)*x[2]
+            ref[(3, 0, 2, 2)]+=0.700071234295*x_ref[2]**o + (0.542327934561)*x_ref[2]
+            arg[(3, 0, 2, 3)]+=-0.88480913146*x[2]**o + (0.27816574453)*x[2]
+            ref[(3, 0, 2, 3)]+=-0.88480913146*x_ref[2]**o + (0.27816574453)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=-0.0250525258162*x[2]**o + (0.654300626851)*x[2]
+            ref[(3, 1, 0, 0)]+=-0.0250525258162*x_ref[2]**o + (0.654300626851)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.559176489862*x[2]**o + (-0.323693813778)*x[2]
+            ref[(3, 1, 0, 1)]+=0.559176489862*x_ref[2]**o + (-0.323693813778)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=-0.250755537124*x[2]**o + (0.529199526544)*x[2]
+            ref[(3, 1, 0, 2)]+=-0.250755537124*x_ref[2]**o + (0.529199526544)*x_ref[2]
+            arg[(3, 1, 0, 3)]+=0.992410164942*x[2]**o + (-0.627392055476)*x[2]
+            ref[(3, 1, 0, 3)]+=0.992410164942*x_ref[2]**o + (-0.627392055476)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=-0.648829638263*x[2]**o + (0.306637209363)*x[2]
+            ref[(3, 1, 1, 0)]+=-0.648829638263*x_ref[2]**o + (0.306637209363)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=0.549932040021*x[2]**o + (0.521785906657)*x[2]
+            ref[(3, 1, 1, 1)]+=0.549932040021*x_ref[2]**o + (0.521785906657)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=-0.711064211334*x[2]**o + (0.0823838547805)*x[2]
+            ref[(3, 1, 1, 2)]+=-0.711064211334*x_ref[2]**o + (0.0823838547805)*x_ref[2]
+            arg[(3, 1, 1, 3)]+=0.845335098171*x[2]**o + (-0.809887632507)*x[2]
+            ref[(3, 1, 1, 3)]+=0.845335098171*x_ref[2]**o + (-0.809887632507)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=-0.584573570977*x[2]**o + (-0.602408317011)*x[2]
+            ref[(3, 1, 2, 0)]+=-0.584573570977*x_ref[2]**o + (-0.602408317011)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.826624311816*x[2]**o + (0.928234253801)*x[2]
+            ref[(3, 1, 2, 1)]+=0.826624311816*x_ref[2]**o + (0.928234253801)*x_ref[2]
+            arg[(3, 1, 2, 2)]+=0.370000128072*x[2]**o + (0.82831714428)*x[2]
+            ref[(3, 1, 2, 2)]+=0.370000128072*x_ref[2]**o + (0.82831714428)*x_ref[2]
+            arg[(3, 1, 2, 3)]+=0.377568676567*x[2]**o + (-0.582989017858)*x[2]
+            ref[(3, 1, 2, 3)]+=0.377568676567*x_ref[2]**o + (-0.582989017858)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=-0.865723868874*x[2]**o + (0.262717626905)*x[2]
+            ref[(3, 2, 0, 0)]+=-0.865723868874*x_ref[2]**o + (0.262717626905)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=-0.235608112522*x[2]**o + (0.0798622164597)*x[2]
+            ref[(3, 2, 0, 1)]+=-0.235608112522*x_ref[2]**o + (0.0798622164597)*x_ref[2]
+            arg[(3, 2, 0, 2)]+=-0.752170558408*x[2]**o + (-0.838115407503)*x[2]
+            ref[(3, 2, 0, 2)]+=-0.752170558408*x_ref[2]**o + (-0.838115407503)*x_ref[2]
+            arg[(3, 2, 0, 3)]+=-0.516256409655*x[2]**o + (0.0561585641182)*x[2]
+            ref[(3, 2, 0, 3)]+=-0.516256409655*x_ref[2]**o + (0.0561585641182)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=-0.318618908521*x[2]**o + (-0.678196816886)*x[2]
+            ref[(3, 2, 1, 0)]+=-0.318618908521*x_ref[2]**o + (-0.678196816886)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=0.934243325003*x[2]**o + (0.0108890505107)*x[2]
+            ref[(3, 2, 1, 1)]+=0.934243325003*x_ref[2]**o + (0.0108890505107)*x_ref[2]
+            arg[(3, 2, 1, 2)]+=0.628926839634*x[2]**o + (-0.754003947072)*x[2]
+            ref[(3, 2, 1, 2)]+=0.628926839634*x_ref[2]**o + (-0.754003947072)*x_ref[2]
+            arg[(3, 2, 1, 3)]+=0.636777700009*x[2]**o + (-0.0790056088548)*x[2]
+            ref[(3, 2, 1, 3)]+=0.636777700009*x_ref[2]**o + (-0.0790056088548)*x_ref[2]
+            arg[(3, 2, 2, 0)]+=0.210004771546*x[2]**o + (-0.0985400664074)*x[2]
+            ref[(3, 2, 2, 0)]+=0.210004771546*x_ref[2]**o + (-0.0985400664074)*x_ref[2]
+            arg[(3, 2, 2, 1)]+=0.720035996724*x[2]**o + (-0.0636623597853)*x[2]
+            ref[(3, 2, 2, 1)]+=0.720035996724*x_ref[2]**o + (-0.0636623597853)*x_ref[2]
+            arg[(3, 2, 2, 2)]+=-0.366568539576*x[2]**o + (0.397646731746)*x[2]
+            ref[(3, 2, 2, 2)]+=-0.366568539576*x_ref[2]**o + (0.397646731746)*x_ref[2]
+            arg[(3, 2, 2, 3)]+=0.0618061617038*x[2]**o + (-0.456134392225)*x[2]
+            ref[(3, 2, 2, 3)]+=0.0618061617038*x_ref[2]**o + (-0.456134392225)*x_ref[2]
+            arg[(3, 3, 0, 0)]+=0.318569296248*x[2]**o + (0.229343632539)*x[2]
+            ref[(3, 3, 0, 0)]+=0.318569296248*x_ref[2]**o + (0.229343632539)*x_ref[2]
+            arg[(3, 3, 0, 1)]+=-0.140437589444*x[2]**o + (-0.855093611344)*x[2]
+            ref[(3, 3, 0, 1)]+=-0.140437589444*x_ref[2]**o + (-0.855093611344)*x_ref[2]
+            arg[(3, 3, 0, 2)]+=0.197133109195*x[2]**o + (0.913506974648)*x[2]
+            ref[(3, 3, 0, 2)]+=0.197133109195*x_ref[2]**o + (0.913506974648)*x_ref[2]
+            arg[(3, 3, 0, 3)]+=-0.768611226722*x[2]**o + (-0.851906781555)*x[2]
+            ref[(3, 3, 0, 3)]+=-0.768611226722*x_ref[2]**o + (-0.851906781555)*x_ref[2]
+            arg[(3, 3, 1, 0)]+=0.467709286333*x[2]**o + (0.145784848471)*x[2]
+            ref[(3, 3, 1, 0)]+=0.467709286333*x_ref[2]**o + (0.145784848471)*x_ref[2]
+            arg[(3, 3, 1, 1)]+=-0.262452532587*x[2]**o + (0.598397463363)*x[2]
+            ref[(3, 3, 1, 1)]+=-0.262452532587*x_ref[2]**o + (0.598397463363)*x_ref[2]
+            arg[(3, 3, 1, 2)]+=0.470814193393*x[2]**o + (-0.000505772332136)*x[2]
+            ref[(3, 3, 1, 2)]+=0.470814193393*x_ref[2]**o + (-0.000505772332136)*x_ref[2]
+            arg[(3, 3, 1, 3)]+=-0.38768960297*x[2]**o + (0.411057408647)*x[2]
+            ref[(3, 3, 1, 3)]+=-0.38768960297*x_ref[2]**o + (0.411057408647)*x_ref[2]
+            arg[(3, 3, 2, 0)]+=-0.690722825516*x[2]**o + (-0.130030267951)*x[2]
+            ref[(3, 3, 2, 0)]+=-0.690722825516*x_ref[2]**o + (-0.130030267951)*x_ref[2]
+            arg[(3, 3, 2, 1)]+=-0.283315094026*x[2]**o + (-0.533784583516)*x[2]
+            ref[(3, 3, 2, 1)]+=-0.283315094026*x_ref[2]**o + (-0.533784583516)*x_ref[2]
+            arg[(3, 3, 2, 2)]+=-0.355055766075*x[2]**o + (-0.692410609281)*x[2]
+            ref[(3, 3, 2, 2)]+=-0.355055766075*x_ref[2]**o + (-0.692410609281)*x_ref[2]
+            arg[(3, 3, 2, 3)]+=0.937730681432*x[2]**o + (-0.571241761449)*x[2]
+            ref[(3, 3, 2, 3)]+=0.937730681432*x_ref[2]**o + (-0.571241761449)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.849116902495*x[0]**o + (-0.774472637654)*x[0] + (-0.79829421771)*x[1]**o + (0.865742108214)*x[1]
+        ref=-0.849116902495*x_ref[0]**o + (-0.774472637654)*x_ref[0] + (-0.79829421771)*x_ref[1]**o + (0.865742108214)*x_ref[1]
+        if dim==3:
+            arg+=(-0.670859909765)*x[2]**o + (-0.627890436301)*x[2]
+            ref+=(-0.670859909765)*x_ref[2]**o + (-0.627890436301)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=0.526885778045*x[0]**o + (-0.288355801217)*x[0] + (-0.267327433861)*x[1]**o + (-0.44985151088)*x[1]
+        ref[(0,)]=0.526885778045*x_ref[0]**o + (-0.288355801217)*x_ref[0] + (-0.267327433861)*x_ref[1]**o + (-0.44985151088)*x_ref[1]
+        arg[(1,)]=0.689896020062*x[0]**o + (0.679804837565)*x[0] + (-0.671788368522)*x[1]**o + (-0.126301477671)*x[1]
+        ref[(1,)]=0.689896020062*x_ref[0]**o + (0.679804837565)*x_ref[0] + (-0.671788368522)*x_ref[1]**o + (-0.126301477671)*x_ref[1]
+        arg[(2,)]=-0.801524912475*x[0]**o + (0.983515979769)*x[0] + (-0.683344638491)*x[1]**o + (0.891732233081)*x[1]
+        ref[(2,)]=-0.801524912475*x_ref[0]**o + (0.983515979769)*x_ref[0] + (-0.683344638491)*x_ref[1]**o + (0.891732233081)*x_ref[1]
+        arg[(3,)]=0.307962249723*x[0]**o + (0.666836654672)*x[0] + (0.0712666696704)*x[1]**o + (-0.155462497457)*x[1]
+        ref[(3,)]=0.307962249723*x_ref[0]**o + (0.666836654672)*x_ref[0] + (0.0712666696704)*x_ref[1]**o + (-0.155462497457)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.86537575339*x[2]**o + (-0.135197263706)*x[2]
+            ref[(0,)]+=0.86537575339*x_ref[2]**o + (-0.135197263706)*x_ref[2]
+            arg[(1,)]+=-0.801686040118*x[2]**o + (0.69016732187)*x[2]
+            ref[(1,)]+=-0.801686040118*x_ref[2]**o + (0.69016732187)*x_ref[2]
+            arg[(2,)]+=0.738403849613*x[2]**o + (0.679797162554)*x[2]
+            ref[(2,)]+=0.738403849613*x_ref[2]**o + (0.679797162554)*x_ref[2]
+            arg[(3,)]+=0.894762504131*x[2]**o + (-0.546008289431)*x[2]
+            ref[(3,)]+=0.894762504131*x_ref[2]**o + (-0.546008289431)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=0.613576769194*x[0]**o + (0.937569357519)*x[0] + (-0.94649451199)*x[1]**o + (0.630155087638)*x[1]
+        ref[(0, 0)]=0.613576769194*x_ref[0]**o + (0.937569357519)*x_ref[0] + (-0.94649451199)*x_ref[1]**o + (0.630155087638)*x_ref[1]
+        arg[(0, 1)]=0.935867133264*x[0]**o + (0.338180833988)*x[0] + (-0.822649892155)*x[1]**o + (-0.249283846961)*x[1]
+        ref[(0, 1)]=0.935867133264*x_ref[0]**o + (0.338180833988)*x_ref[0] + (-0.822649892155)*x_ref[1]**o + (-0.249283846961)*x_ref[1]
+        arg[(0, 2)]=0.59433212548*x[0]**o + (0.397338748877)*x[0] + (0.558451765418)*x[1]**o + (0.439519676068)*x[1]
+        ref[(0, 2)]=0.59433212548*x_ref[0]**o + (0.397338748877)*x_ref[0] + (0.558451765418)*x_ref[1]**o + (0.439519676068)*x_ref[1]
+        arg[(1, 0)]=-0.0828730890001*x[0]**o + (-0.36989955286)*x[0] + (-0.260071565048)*x[1]**o + (-0.796243869754)*x[1]
+        ref[(1, 0)]=-0.0828730890001*x_ref[0]**o + (-0.36989955286)*x_ref[0] + (-0.260071565048)*x_ref[1]**o + (-0.796243869754)*x_ref[1]
+        arg[(1, 1)]=-0.609482938218*x[0]**o + (0.0551983891798)*x[0] + (0.626053756107)*x[1]**o + (-0.897166889978)*x[1]
+        ref[(1, 1)]=-0.609482938218*x_ref[0]**o + (0.0551983891798)*x_ref[0] + (0.626053756107)*x_ref[1]**o + (-0.897166889978)*x_ref[1]
+        arg[(1, 2)]=0.343992404158*x[0]**o + (-0.625649340892)*x[0] + (0.168377238201)*x[1]**o + (-0.535128093974)*x[1]
+        ref[(1, 2)]=0.343992404158*x_ref[0]**o + (-0.625649340892)*x_ref[0] + (0.168377238201)*x_ref[1]**o + (-0.535128093974)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.930437098531*x[2]**o + (-0.428006550723)*x[2]
+            ref[(0, 0)]+=-0.930437098531*x_ref[2]**o + (-0.428006550723)*x_ref[2]
+            arg[(0, 1)]+=-0.169500462077*x[2]**o + (0.863357856306)*x[2]
+            ref[(0, 1)]+=-0.169500462077*x_ref[2]**o + (0.863357856306)*x_ref[2]
+            arg[(0, 2)]+=-0.728604089688*x[2]**o + (-0.739824277317)*x[2]
+            ref[(0, 2)]+=-0.728604089688*x_ref[2]**o + (-0.739824277317)*x_ref[2]
+            arg[(1, 0)]+=-0.717921611236*x[2]**o + (-0.123608918943)*x[2]
+            ref[(1, 0)]+=-0.717921611236*x_ref[2]**o + (-0.123608918943)*x_ref[2]
+            arg[(1, 1)]+=0.557730788333*x[2]**o + (0.46139492908)*x[2]
+            ref[(1, 1)]+=0.557730788333*x_ref[2]**o + (0.46139492908)*x_ref[2]
+            arg[(1, 2)]+=-0.663989361036*x[2]**o + (-0.310485214646)*x[2]
+            ref[(1, 2)]+=-0.663989361036*x_ref[2]**o + (-0.310485214646)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3),w)
+        ref = Data(0,(4, 3, 3),w_ref)
+        arg[(0, 0, 0)]=0.032621552723*x[0]**o + (0.121175918362)*x[0] + (0.259564381691)*x[1]**o + (0.407700471832)*x[1]
+        ref[(0, 0, 0)]=0.032621552723*x_ref[0]**o + (0.121175918362)*x_ref[0] + (0.259564381691)*x_ref[1]**o + (0.407700471832)*x_ref[1]
+        arg[(0, 0, 1)]=0.825177857528*x[0]**o + (-0.114729418937)*x[0] + (-0.532518478132)*x[1]**o + (-0.948604313892)*x[1]
+        ref[(0, 0, 1)]=0.825177857528*x_ref[0]**o + (-0.114729418937)*x_ref[0] + (-0.532518478132)*x_ref[1]**o + (-0.948604313892)*x_ref[1]
+        arg[(0, 0, 2)]=-0.596570017031*x[0]**o + (0.82445112417)*x[0] + (0.682160936561)*x[1]**o + (0.638455454798)*x[1]
+        ref[(0, 0, 2)]=-0.596570017031*x_ref[0]**o + (0.82445112417)*x_ref[0] + (0.682160936561)*x_ref[1]**o + (0.638455454798)*x_ref[1]
+        arg[(0, 1, 0)]=-0.650499890101*x[0]**o + (0.712149437554)*x[0] + (-0.302923533453)*x[1]**o + (0.652351658303)*x[1]
+        ref[(0, 1, 0)]=-0.650499890101*x_ref[0]**o + (0.712149437554)*x_ref[0] + (-0.302923533453)*x_ref[1]**o + (0.652351658303)*x_ref[1]
+        arg[(0, 1, 1)]=-0.319609622104*x[0]**o + (-0.331227635196)*x[0] + (0.602483893653)*x[1]**o + (-0.994322210185)*x[1]
+        ref[(0, 1, 1)]=-0.319609622104*x_ref[0]**o + (-0.331227635196)*x_ref[0] + (0.602483893653)*x_ref[1]**o + (-0.994322210185)*x_ref[1]
+        arg[(0, 1, 2)]=0.236203910499*x[0]**o + (0.910530760347)*x[0] + (-0.12327913554)*x[1]**o + (-0.614086058285)*x[1]
+        ref[(0, 1, 2)]=0.236203910499*x_ref[0]**o + (0.910530760347)*x_ref[0] + (-0.12327913554)*x_ref[1]**o + (-0.614086058285)*x_ref[1]
+        arg[(0, 2, 0)]=-0.288547044689*x[0]**o + (-0.498430897105)*x[0] + (-0.712401681451)*x[1]**o + (-0.970162758566)*x[1]
+        ref[(0, 2, 0)]=-0.288547044689*x_ref[0]**o + (-0.498430897105)*x_ref[0] + (-0.712401681451)*x_ref[1]**o + (-0.970162758566)*x_ref[1]
+        arg[(0, 2, 1)]=-0.186183459207*x[0]**o + (-0.589338787829)*x[0] + (0.679757962161)*x[1]**o + (0.728349723498)*x[1]
+        ref[(0, 2, 1)]=-0.186183459207*x_ref[0]**o + (-0.589338787829)*x_ref[0] + (0.679757962161)*x_ref[1]**o + (0.728349723498)*x_ref[1]
+        arg[(0, 2, 2)]=-0.0936319572479*x[0]**o + (0.207294731536)*x[0] + (-0.353673998797)*x[1]**o + (-0.882566497755)*x[1]
+        ref[(0, 2, 2)]=-0.0936319572479*x_ref[0]**o + (0.207294731536)*x_ref[0] + (-0.353673998797)*x_ref[1]**o + (-0.882566497755)*x_ref[1]
+        arg[(1, 0, 0)]=0.808816429556*x[0]**o + (-0.423076841429)*x[0] + (0.436118615371)*x[1]**o + (0.266708415756)*x[1]
+        ref[(1, 0, 0)]=0.808816429556*x_ref[0]**o + (-0.423076841429)*x_ref[0] + (0.436118615371)*x_ref[1]**o + (0.266708415756)*x_ref[1]
+        arg[(1, 0, 1)]=-0.0063047040459*x[0]**o + (0.241667913058)*x[0] + (0.00937826028475)*x[1]**o + (-0.752744434129)*x[1]
+        ref[(1, 0, 1)]=-0.0063047040459*x_ref[0]**o + (0.241667913058)*x_ref[0] + (0.00937826028475)*x_ref[1]**o + (-0.752744434129)*x_ref[1]
+        arg[(1, 0, 2)]=0.566168747056*x[0]**o + (-0.0167876537435)*x[0] + (-0.364726790352)*x[1]**o + (0.279094716946)*x[1]
+        ref[(1, 0, 2)]=0.566168747056*x_ref[0]**o + (-0.0167876537435)*x_ref[0] + (-0.364726790352)*x_ref[1]**o + (0.279094716946)*x_ref[1]
+        arg[(1, 1, 0)]=-0.608749878956*x[0]**o + (-0.480361392828)*x[0] + (0.369239125589)*x[1]**o + (-0.0456895196095)*x[1]
+        ref[(1, 1, 0)]=-0.608749878956*x_ref[0]**o + (-0.480361392828)*x_ref[0] + (0.369239125589)*x_ref[1]**o + (-0.0456895196095)*x_ref[1]
+        arg[(1, 1, 1)]=-0.851711271386*x[0]**o + (0.0917869900373)*x[0] + (-0.838842835544)*x[1]**o + (0.846108158521)*x[1]
+        ref[(1, 1, 1)]=-0.851711271386*x_ref[0]**o + (0.0917869900373)*x_ref[0] + (-0.838842835544)*x_ref[1]**o + (0.846108158521)*x_ref[1]
+        arg[(1, 1, 2)]=0.590405580075*x[0]**o + (0.160028126865)*x[0] + (-0.915521366629)*x[1]**o + (-0.786679860502)*x[1]
+        ref[(1, 1, 2)]=0.590405580075*x_ref[0]**o + (0.160028126865)*x_ref[0] + (-0.915521366629)*x_ref[1]**o + (-0.786679860502)*x_ref[1]
+        arg[(1, 2, 0)]=0.71874065543*x[0]**o + (0.502552984728)*x[0] + (0.00436888125215)*x[1]**o + (0.61100490556)*x[1]
+        ref[(1, 2, 0)]=0.71874065543*x_ref[0]**o + (0.502552984728)*x_ref[0] + (0.00436888125215)*x_ref[1]**o + (0.61100490556)*x_ref[1]
+        arg[(1, 2, 1)]=-0.942048817545*x[0]**o + (-0.741604192281)*x[0] + (0.594175698627)*x[1]**o + (0.917149457112)*x[1]
+        ref[(1, 2, 1)]=-0.942048817545*x_ref[0]**o + (-0.741604192281)*x_ref[0] + (0.594175698627)*x_ref[1]**o + (0.917149457112)*x_ref[1]
+        arg[(1, 2, 2)]=-0.323351867736*x[0]**o + (-0.461347073165)*x[0] + (-0.0166107720577)*x[1]**o + (0.780870617428)*x[1]
+        ref[(1, 2, 2)]=-0.323351867736*x_ref[0]**o + (-0.461347073165)*x_ref[0] + (-0.0166107720577)*x_ref[1]**o + (0.780870617428)*x_ref[1]
+        arg[(2, 0, 0)]=0.0428949239454*x[0]**o + (0.00545899034001)*x[0] + (-0.786445939908)*x[1]**o + (-0.0066335183427)*x[1]
+        ref[(2, 0, 0)]=0.0428949239454*x_ref[0]**o + (0.00545899034001)*x_ref[0] + (-0.786445939908)*x_ref[1]**o + (-0.0066335183427)*x_ref[1]
+        arg[(2, 0, 1)]=-0.388643256029*x[0]**o + (0.719473424213)*x[0] + (-0.285055426242)*x[1]**o + (0.454982977061)*x[1]
+        ref[(2, 0, 1)]=-0.388643256029*x_ref[0]**o + (0.719473424213)*x_ref[0] + (-0.285055426242)*x_ref[1]**o + (0.454982977061)*x_ref[1]
+        arg[(2, 0, 2)]=0.203857953675*x[0]**o + (0.282723081932)*x[0] + (-0.665997379065)*x[1]**o + (-0.745214986385)*x[1]
+        ref[(2, 0, 2)]=0.203857953675*x_ref[0]**o + (0.282723081932)*x_ref[0] + (-0.665997379065)*x_ref[1]**o + (-0.745214986385)*x_ref[1]
+        arg[(2, 1, 0)]=0.967437134209*x[0]**o + (-0.490999256748)*x[0] + (0.779837956868)*x[1]**o + (-0.381959856546)*x[1]
+        ref[(2, 1, 0)]=0.967437134209*x_ref[0]**o + (-0.490999256748)*x_ref[0] + (0.779837956868)*x_ref[1]**o + (-0.381959856546)*x_ref[1]
+        arg[(2, 1, 1)]=-0.232202871078*x[0]**o + (0.330084178664)*x[0] + (-0.933811487655)*x[1]**o + (0.919373545518)*x[1]
+        ref[(2, 1, 1)]=-0.232202871078*x_ref[0]**o + (0.330084178664)*x_ref[0] + (-0.933811487655)*x_ref[1]**o + (0.919373545518)*x_ref[1]
+        arg[(2, 1, 2)]=0.0419650105944*x[0]**o + (0.955771706992)*x[0] + (-0.226266565195)*x[1]**o + (-0.471638990116)*x[1]
+        ref[(2, 1, 2)]=0.0419650105944*x_ref[0]**o + (0.955771706992)*x_ref[0] + (-0.226266565195)*x_ref[1]**o + (-0.471638990116)*x_ref[1]
+        arg[(2, 2, 0)]=0.87547681844*x[0]**o + (0.125257797784)*x[0] + (-0.156471257721)*x[1]**o + (0.585277555749)*x[1]
+        ref[(2, 2, 0)]=0.87547681844*x_ref[0]**o + (0.125257797784)*x_ref[0] + (-0.156471257721)*x_ref[1]**o + (0.585277555749)*x_ref[1]
+        arg[(2, 2, 1)]=-0.371332695718*x[0]**o + (0.720580092437)*x[0] + (-0.126141554584)*x[1]**o + (0.742363575719)*x[1]
+        ref[(2, 2, 1)]=-0.371332695718*x_ref[0]**o + (0.720580092437)*x_ref[0] + (-0.126141554584)*x_ref[1]**o + (0.742363575719)*x_ref[1]
+        arg[(2, 2, 2)]=0.0661413779824*x[0]**o + (0.534744810079)*x[0] + (-0.886531918153)*x[1]**o + (-0.312670401351)*x[1]
+        ref[(2, 2, 2)]=0.0661413779824*x_ref[0]**o + (0.534744810079)*x_ref[0] + (-0.886531918153)*x_ref[1]**o + (-0.312670401351)*x_ref[1]
+        arg[(3, 0, 0)]=0.103424666399*x[0]**o + (0.944183126872)*x[0] + (-0.44159088708)*x[1]**o + (-0.356403357767)*x[1]
+        ref[(3, 0, 0)]=0.103424666399*x_ref[0]**o + (0.944183126872)*x_ref[0] + (-0.44159088708)*x_ref[1]**o + (-0.356403357767)*x_ref[1]
+        arg[(3, 0, 1)]=-0.785727636029*x[0]**o + (-0.39869100903)*x[0] + (0.0727747270054)*x[1]**o + (-0.756183549703)*x[1]
+        ref[(3, 0, 1)]=-0.785727636029*x_ref[0]**o + (-0.39869100903)*x_ref[0] + (0.0727747270054)*x_ref[1]**o + (-0.756183549703)*x_ref[1]
+        arg[(3, 0, 2)]=-0.69497955216*x[0]**o + (0.539316124916)*x[0] + (-0.282632405436)*x[1]**o + (0.478299749274)*x[1]
+        ref[(3, 0, 2)]=-0.69497955216*x_ref[0]**o + (0.539316124916)*x_ref[0] + (-0.282632405436)*x_ref[1]**o + (0.478299749274)*x_ref[1]
+        arg[(3, 1, 0)]=0.931548655475*x[0]**o + (0.862730171248)*x[0] + (0.27856943459)*x[1]**o + (0.284234248923)*x[1]
+        ref[(3, 1, 0)]=0.931548655475*x_ref[0]**o + (0.862730171248)*x_ref[0] + (0.27856943459)*x_ref[1]**o + (0.284234248923)*x_ref[1]
+        arg[(3, 1, 1)]=-0.628229674397*x[0]**o + (-0.067171831819)*x[0] + (0.960481127466)*x[1]**o + (0.83408101311)*x[1]
+        ref[(3, 1, 1)]=-0.628229674397*x_ref[0]**o + (-0.067171831819)*x_ref[0] + (0.960481127466)*x_ref[1]**o + (0.83408101311)*x_ref[1]
+        arg[(3, 1, 2)]=0.502611778842*x[0]**o + (-0.440811932318)*x[0] + (0.261922229969)*x[1]**o + (-0.26725448487)*x[1]
+        ref[(3, 1, 2)]=0.502611778842*x_ref[0]**o + (-0.440811932318)*x_ref[0] + (0.261922229969)*x_ref[1]**o + (-0.26725448487)*x_ref[1]
+        arg[(3, 2, 0)]=-0.902162779452*x[0]**o + (-0.7521904324)*x[0] + (-0.704753645855)*x[1]**o + (-0.552380929734)*x[1]
+        ref[(3, 2, 0)]=-0.902162779452*x_ref[0]**o + (-0.7521904324)*x_ref[0] + (-0.704753645855)*x_ref[1]**o + (-0.552380929734)*x_ref[1]
+        arg[(3, 2, 1)]=0.311930514632*x[0]**o + (-0.224766237634)*x[0] + (-0.91960016637)*x[1]**o + (-0.246526406135)*x[1]
+        ref[(3, 2, 1)]=0.311930514632*x_ref[0]**o + (-0.224766237634)*x_ref[0] + (-0.91960016637)*x_ref[1]**o + (-0.246526406135)*x_ref[1]
+        arg[(3, 2, 2)]=-0.74113111355*x[0]**o + (-0.527358825059)*x[0] + (-0.0122038769703)*x[1]**o + (0.246605840675)*x[1]
+        ref[(3, 2, 2)]=-0.74113111355*x_ref[0]**o + (-0.527358825059)*x_ref[0] + (-0.0122038769703)*x_ref[1]**o + (0.246605840675)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.206603313424*x[2]**o + (0.0947662692473)*x[2]
+            ref[(0, 0, 0)]+=0.206603313424*x_ref[2]**o + (0.0947662692473)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.0496990146322*x[2]**o + (-0.557728428689)*x[2]
+            ref[(0, 0, 1)]+=-0.0496990146322*x_ref[2]**o + (-0.557728428689)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.183326472172*x[2]**o + (-0.80790474343)*x[2]
+            ref[(0, 0, 2)]+=-0.183326472172*x_ref[2]**o + (-0.80790474343)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.00310831898836*x[2]**o + (0.166700395706)*x[2]
+            ref[(0, 1, 0)]+=-0.00310831898836*x_ref[2]**o + (0.166700395706)*x_ref[2]
+            arg[(0, 1, 1)]+=0.23405139493*x[2]**o + (-0.900531753723)*x[2]
+            ref[(0, 1, 1)]+=0.23405139493*x_ref[2]**o + (-0.900531753723)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.0832355061367*x[2]**o + (0.994602302753)*x[2]
+            ref[(0, 1, 2)]+=-0.0832355061367*x_ref[2]**o + (0.994602302753)*x_ref[2]
+            arg[(0, 2, 0)]+=0.0689893300242*x[2]**o + (-0.316920699367)*x[2]
+            ref[(0, 2, 0)]+=0.0689893300242*x_ref[2]**o + (-0.316920699367)*x_ref[2]
+            arg[(0, 2, 1)]+=0.489217270119*x[2]**o + (0.678258579399)*x[2]
+            ref[(0, 2, 1)]+=0.489217270119*x_ref[2]**o + (0.678258579399)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.03276799722*x[2]**o + (-0.447738762478)*x[2]
+            ref[(0, 2, 2)]+=-0.03276799722*x_ref[2]**o + (-0.447738762478)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.378188534292*x[2]**o + (-0.787781327736)*x[2]
+            ref[(1, 0, 0)]+=-0.378188534292*x_ref[2]**o + (-0.787781327736)*x_ref[2]
+            arg[(1, 0, 1)]+=0.0735340099641*x[2]**o + (-0.279563911076)*x[2]
+            ref[(1, 0, 1)]+=0.0735340099641*x_ref[2]**o + (-0.279563911076)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.374249711929*x[2]**o + (-0.403555603739)*x[2]
+            ref[(1, 0, 2)]+=-0.374249711929*x_ref[2]**o + (-0.403555603739)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.787223580292*x[2]**o + (0.734425467725)*x[2]
+            ref[(1, 1, 0)]+=-0.787223580292*x_ref[2]**o + (0.734425467725)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.322108897229*x[2]**o + (0.567884277276)*x[2]
+            ref[(1, 1, 1)]+=-0.322108897229*x_ref[2]**o + (0.567884277276)*x_ref[2]
+            arg[(1, 1, 2)]+=0.505958215615*x[2]**o + (0.874244924339)*x[2]
+            ref[(1, 1, 2)]+=0.505958215615*x_ref[2]**o + (0.874244924339)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.521061471553*x[2]**o + (0.758508831705)*x[2]
+            ref[(1, 2, 0)]+=-0.521061471553*x_ref[2]**o + (0.758508831705)*x_ref[2]
+            arg[(1, 2, 1)]+=0.676570447216*x[2]**o + (0.583468568058)*x[2]
+            ref[(1, 2, 1)]+=0.676570447216*x_ref[2]**o + (0.583468568058)*x_ref[2]
+            arg[(1, 2, 2)]+=0.980258591516*x[2]**o + (-0.789207065544)*x[2]
+            ref[(1, 2, 2)]+=0.980258591516*x_ref[2]**o + (-0.789207065544)*x_ref[2]
+            arg[(2, 0, 0)]+=0.720129014451*x[2]**o + (-0.997875812678)*x[2]
+            ref[(2, 0, 0)]+=0.720129014451*x_ref[2]**o + (-0.997875812678)*x_ref[2]
+            arg[(2, 0, 1)]+=0.15641803134*x[2]**o + (-0.0292012829022)*x[2]
+            ref[(2, 0, 1)]+=0.15641803134*x_ref[2]**o + (-0.0292012829022)*x_ref[2]
+            arg[(2, 0, 2)]+=0.295258879065*x[2]**o + (0.194813145655)*x[2]
+            ref[(2, 0, 2)]+=0.295258879065*x_ref[2]**o + (0.194813145655)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.348875390748*x[2]**o + (0.497992055536)*x[2]
+            ref[(2, 1, 0)]+=-0.348875390748*x_ref[2]**o + (0.497992055536)*x_ref[2]
+            arg[(2, 1, 1)]+=0.364451467987*x[2]**o + (0.513572063871)*x[2]
+            ref[(2, 1, 1)]+=0.364451467987*x_ref[2]**o + (0.513572063871)*x_ref[2]
+            arg[(2, 1, 2)]+=0.574062284896*x[2]**o + (0.338769778845)*x[2]
+            ref[(2, 1, 2)]+=0.574062284896*x_ref[2]**o + (0.338769778845)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.0792274814435*x[2]**o + (-0.2087423957)*x[2]
+            ref[(2, 2, 0)]+=-0.0792274814435*x_ref[2]**o + (-0.2087423957)*x_ref[2]
+            arg[(2, 2, 1)]+=-0.155526806074*x[2]**o + (-0.118041295369)*x[2]
+            ref[(2, 2, 1)]+=-0.155526806074*x_ref[2]**o + (-0.118041295369)*x_ref[2]
+            arg[(2, 2, 2)]+=-0.603619962412*x[2]**o + (0.781917324399)*x[2]
+            ref[(2, 2, 2)]+=-0.603619962412*x_ref[2]**o + (0.781917324399)*x_ref[2]
+            arg[(3, 0, 0)]+=-0.483648341523*x[2]**o + (-0.856687252147)*x[2]
+            ref[(3, 0, 0)]+=-0.483648341523*x_ref[2]**o + (-0.856687252147)*x_ref[2]
+            arg[(3, 0, 1)]+=0.174855681129*x[2]**o + (-0.800467809781)*x[2]
+            ref[(3, 0, 1)]+=0.174855681129*x_ref[2]**o + (-0.800467809781)*x_ref[2]
+            arg[(3, 0, 2)]+=-0.678650901819*x[2]**o + (-0.0702547812583)*x[2]
+            ref[(3, 0, 2)]+=-0.678650901819*x_ref[2]**o + (-0.0702547812583)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.0304519826863*x[2]**o + (-0.156710123304)*x[2]
+            ref[(3, 1, 0)]+=-0.0304519826863*x_ref[2]**o + (-0.156710123304)*x_ref[2]
+            arg[(3, 1, 1)]+=0.289960068812*x[2]**o + (-0.53496355142)*x[2]
+            ref[(3, 1, 1)]+=0.289960068812*x_ref[2]**o + (-0.53496355142)*x_ref[2]
+            arg[(3, 1, 2)]+=0.612441155517*x[2]**o + (0.914499767981)*x[2]
+            ref[(3, 1, 2)]+=0.612441155517*x_ref[2]**o + (0.914499767981)*x_ref[2]
+            arg[(3, 2, 0)]+=-0.961609642464*x[2]**o + (-0.782303361544)*x[2]
+            ref[(3, 2, 0)]+=-0.961609642464*x_ref[2]**o + (-0.782303361544)*x_ref[2]
+            arg[(3, 2, 1)]+=0.404152824812*x[2]**o + (-0.322684398648)*x[2]
+            ref[(3, 2, 1)]+=0.404152824812*x_ref[2]**o + (-0.322684398648)*x_ref[2]
+            arg[(3, 2, 2)]+=-0.0781778895968*x[2]**o + (-0.196544094251)*x[2]
+            ref[(3, 2, 2)]+=-0.0781778895968*x_ref[2]**o + (-0.196544094251)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 3, 3),w)
+        ref = Data(0,(4, 3, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=-0.135317929407*x[0]**o + (0.884294264956)*x[0] + (-0.019086763373)*x[1]**o + (0.198177624634)*x[1]
+        ref[(0, 0, 0, 0)]=-0.135317929407*x_ref[0]**o + (0.884294264956)*x_ref[0] + (-0.019086763373)*x_ref[1]**o + (0.198177624634)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.165658708328*x[0]**o + (-0.529096553466)*x[0] + (-0.624947862257)*x[1]**o + (-0.493141184506)*x[1]
+        ref[(0, 0, 0, 1)]=-0.165658708328*x_ref[0]**o + (-0.529096553466)*x_ref[0] + (-0.624947862257)*x_ref[1]**o + (-0.493141184506)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.842130791241*x[0]**o + (-0.895112448445)*x[0] + (0.448551570616)*x[1]**o + (-0.433708761433)*x[1]
+        ref[(0, 0, 0, 2)]=-0.842130791241*x_ref[0]**o + (-0.895112448445)*x_ref[0] + (0.448551570616)*x_ref[1]**o + (-0.433708761433)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.679832611766*x[0]**o + (-0.0739977058413)*x[0] + (0.85804126822)*x[1]**o + (0.725548342973)*x[1]
+        ref[(0, 0, 1, 0)]=0.679832611766*x_ref[0]**o + (-0.0739977058413)*x_ref[0] + (0.85804126822)*x_ref[1]**o + (0.725548342973)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.272311061706*x[0]**o + (0.5198030959)*x[0] + (0.897026899265)*x[1]**o + (0.117088156396)*x[1]
+        ref[(0, 0, 1, 1)]=-0.272311061706*x_ref[0]**o + (0.5198030959)*x_ref[0] + (0.897026899265)*x_ref[1]**o + (0.117088156396)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.496467187808*x[0]**o + (-0.569419128395)*x[0] + (-0.419697556036)*x[1]**o + (0.445077696173)*x[1]
+        ref[(0, 0, 1, 2)]=-0.496467187808*x_ref[0]**o + (-0.569419128395)*x_ref[0] + (-0.419697556036)*x_ref[1]**o + (0.445077696173)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.363468914516*x[0]**o + (-0.700492427575)*x[0] + (-0.482209495061)*x[1]**o + (-0.779038122173)*x[1]
+        ref[(0, 0, 2, 0)]=-0.363468914516*x_ref[0]**o + (-0.700492427575)*x_ref[0] + (-0.482209495061)*x_ref[1]**o + (-0.779038122173)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.582393281157*x[0]**o + (-0.709281132545)*x[0] + (0.521731413967)*x[1]**o + (0.770158785658)*x[1]
+        ref[(0, 0, 2, 1)]=-0.582393281157*x_ref[0]**o + (-0.709281132545)*x_ref[0] + (0.521731413967)*x_ref[1]**o + (0.770158785658)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.387982288409*x[0]**o + (-0.740903550591)*x[0] + (-0.0391678723934)*x[1]**o + (0.0529449043173)*x[1]
+        ref[(0, 0, 2, 2)]=0.387982288409*x_ref[0]**o + (-0.740903550591)*x_ref[0] + (-0.0391678723934)*x_ref[1]**o + (0.0529449043173)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.365997257686*x[0]**o + (0.365580207323)*x[0] + (0.767670895941)*x[1]**o + (0.902566512575)*x[1]
+        ref[(0, 1, 0, 0)]=0.365997257686*x_ref[0]**o + (0.365580207323)*x_ref[0] + (0.767670895941)*x_ref[1]**o + (0.902566512575)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.858745460472*x[0]**o + (-0.786640585593)*x[0] + (-0.227279104942)*x[1]**o + (0.554349613002)*x[1]
+        ref[(0, 1, 0, 1)]=0.858745460472*x_ref[0]**o + (-0.786640585593)*x_ref[0] + (-0.227279104942)*x_ref[1]**o + (0.554349613002)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.242587131696*x[0]**o + (-0.499523298067)*x[0] + (0.910563128673)*x[1]**o + (-0.0498996628336)*x[1]
+        ref[(0, 1, 0, 2)]=-0.242587131696*x_ref[0]**o + (-0.499523298067)*x_ref[0] + (0.910563128673)*x_ref[1]**o + (-0.0498996628336)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.036028897505*x[0]**o + (0.828828481256)*x[0] + (0.155685321626)*x[1]**o + (0.556528788123)*x[1]
+        ref[(0, 1, 1, 0)]=0.036028897505*x_ref[0]**o + (0.828828481256)*x_ref[0] + (0.155685321626)*x_ref[1]**o + (0.556528788123)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.90985282667*x[0]**o + (0.394042783921)*x[0] + (0.449190134291)*x[1]**o + (-0.535516760651)*x[1]
+        ref[(0, 1, 1, 1)]=0.90985282667*x_ref[0]**o + (0.394042783921)*x_ref[0] + (0.449190134291)*x_ref[1]**o + (-0.535516760651)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.330175972865*x[0]**o + (-0.731515360123)*x[0] + (-0.596857735311)*x[1]**o + (-0.888458903196)*x[1]
+        ref[(0, 1, 1, 2)]=0.330175972865*x_ref[0]**o + (-0.731515360123)*x_ref[0] + (-0.596857735311)*x_ref[1]**o + (-0.888458903196)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.835573053093*x[0]**o + (-0.433854610434)*x[0] + (-0.265928036409)*x[1]**o + (-0.122103209289)*x[1]
+        ref[(0, 1, 2, 0)]=0.835573053093*x_ref[0]**o + (-0.433854610434)*x_ref[0] + (-0.265928036409)*x_ref[1]**o + (-0.122103209289)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.117265432069*x[0]**o + (0.332833596707)*x[0] + (0.464241569983)*x[1]**o + (-0.585260027998)*x[1]
+        ref[(0, 1, 2, 1)]=0.117265432069*x_ref[0]**o + (0.332833596707)*x_ref[0] + (0.464241569983)*x_ref[1]**o + (-0.585260027998)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.235127856393*x[0]**o + (-0.252055031792)*x[0] + (0.565942881176)*x[1]**o + (-0.132328637853)*x[1]
+        ref[(0, 1, 2, 2)]=0.235127856393*x_ref[0]**o + (-0.252055031792)*x_ref[0] + (0.565942881176)*x_ref[1]**o + (-0.132328637853)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.671962654834*x[0]**o + (-0.5751989787)*x[0] + (-0.194981986367)*x[1]**o + (0.465904996431)*x[1]
+        ref[(0, 2, 0, 0)]=0.671962654834*x_ref[0]**o + (-0.5751989787)*x_ref[0] + (-0.194981986367)*x_ref[1]**o + (0.465904996431)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.886435932624*x[0]**o + (-0.0564258457169)*x[0] + (0.541315822282)*x[1]**o + (-0.983342535174)*x[1]
+        ref[(0, 2, 0, 1)]=-0.886435932624*x_ref[0]**o + (-0.0564258457169)*x_ref[0] + (0.541315822282)*x_ref[1]**o + (-0.983342535174)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.303199652124*x[0]**o + (0.164424188265)*x[0] + (0.252733664814)*x[1]**o + (-0.865673201677)*x[1]
+        ref[(0, 2, 0, 2)]=-0.303199652124*x_ref[0]**o + (0.164424188265)*x_ref[0] + (0.252733664814)*x_ref[1]**o + (-0.865673201677)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.266044680319*x[0]**o + (-0.00865102178028)*x[0] + (0.534768871966)*x[1]**o + (0.299177669813)*x[1]
+        ref[(0, 2, 1, 0)]=-0.266044680319*x_ref[0]**o + (-0.00865102178028)*x_ref[0] + (0.534768871966)*x_ref[1]**o + (0.299177669813)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.959045979973*x[0]**o + (-0.783964512718)*x[0] + (-0.216371333718)*x[1]**o + (0.447715589513)*x[1]
+        ref[(0, 2, 1, 1)]=-0.959045979973*x_ref[0]**o + (-0.783964512718)*x_ref[0] + (-0.216371333718)*x_ref[1]**o + (0.447715589513)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.767800048119*x[0]**o + (0.933096935629)*x[0] + (-0.59341190018)*x[1]**o + (0.446184352788)*x[1]
+        ref[(0, 2, 1, 2)]=-0.767800048119*x_ref[0]**o + (0.933096935629)*x_ref[0] + (-0.59341190018)*x_ref[1]**o + (0.446184352788)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.531612304447*x[0]**o + (-0.97863831992)*x[0] + (-0.531114904625)*x[1]**o + (0.225304847144)*x[1]
+        ref[(0, 2, 2, 0)]=-0.531612304447*x_ref[0]**o + (-0.97863831992)*x_ref[0] + (-0.531114904625)*x_ref[1]**o + (0.225304847144)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.870434569417*x[0]**o + (-0.685085454068)*x[0] + (-0.543532156439)*x[1]**o + (0.978480245634)*x[1]
+        ref[(0, 2, 2, 1)]=-0.870434569417*x_ref[0]**o + (-0.685085454068)*x_ref[0] + (-0.543532156439)*x_ref[1]**o + (0.978480245634)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.827947339273*x[0]**o + (-0.165820689578)*x[0] + (-0.950148523652)*x[1]**o + (-0.781323148156)*x[1]
+        ref[(0, 2, 2, 2)]=-0.827947339273*x_ref[0]**o + (-0.165820689578)*x_ref[0] + (-0.950148523652)*x_ref[1]**o + (-0.781323148156)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.607221822224*x[0]**o + (0.324970458139)*x[0] + (-0.214614007304)*x[1]**o + (0.715211401853)*x[1]
+        ref[(1, 0, 0, 0)]=-0.607221822224*x_ref[0]**o + (0.324970458139)*x_ref[0] + (-0.214614007304)*x_ref[1]**o + (0.715211401853)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.573607145612*x[0]**o + (-0.640519310102)*x[0] + (0.652929505654)*x[1]**o + (0.038978112147)*x[1]
+        ref[(1, 0, 0, 1)]=0.573607145612*x_ref[0]**o + (-0.640519310102)*x_ref[0] + (0.652929505654)*x_ref[1]**o + (0.038978112147)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.558463032743*x[0]**o + (-0.47031161976)*x[0] + (0.256782872375)*x[1]**o + (0.618004054729)*x[1]
+        ref[(1, 0, 0, 2)]=-0.558463032743*x_ref[0]**o + (-0.47031161976)*x_ref[0] + (0.256782872375)*x_ref[1]**o + (0.618004054729)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.461003586193*x[0]**o + (0.197922807281)*x[0] + (0.285882626563)*x[1]**o + (0.959572512052)*x[1]
+        ref[(1, 0, 1, 0)]=0.461003586193*x_ref[0]**o + (0.197922807281)*x_ref[0] + (0.285882626563)*x_ref[1]**o + (0.959572512052)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.167114057663*x[0]**o + (-0.126242539753)*x[0] + (0.816937767064)*x[1]**o + (0.690543785957)*x[1]
+        ref[(1, 0, 1, 1)]=0.167114057663*x_ref[0]**o + (-0.126242539753)*x_ref[0] + (0.816937767064)*x_ref[1]**o + (0.690543785957)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.480911841362*x[0]**o + (0.138632236578)*x[0] + (-0.880580007913)*x[1]**o + (0.421166197904)*x[1]
+        ref[(1, 0, 1, 2)]=-0.480911841362*x_ref[0]**o + (0.138632236578)*x_ref[0] + (-0.880580007913)*x_ref[1]**o + (0.421166197904)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.705154730178*x[0]**o + (0.542475942595)*x[0] + (0.0104312974823)*x[1]**o + (0.80750414044)*x[1]
+        ref[(1, 0, 2, 0)]=-0.705154730178*x_ref[0]**o + (0.542475942595)*x_ref[0] + (0.0104312974823)*x_ref[1]**o + (0.80750414044)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.199551913657*x[0]**o + (-0.857864344984)*x[0] + (-0.810545232386)*x[1]**o + (-0.64592265471)*x[1]
+        ref[(1, 0, 2, 1)]=0.199551913657*x_ref[0]**o + (-0.857864344984)*x_ref[0] + (-0.810545232386)*x_ref[1]**o + (-0.64592265471)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.068394467589*x[0]**o + (0.748032432351)*x[0] + (0.865401409061)*x[1]**o + (-0.0369675751832)*x[1]
+        ref[(1, 0, 2, 2)]=-0.068394467589*x_ref[0]**o + (0.748032432351)*x_ref[0] + (0.865401409061)*x_ref[1]**o + (-0.0369675751832)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.231361126271*x[0]**o + (0.25150768468)*x[0] + (0.589987896875)*x[1]**o + (0.198649865167)*x[1]
+        ref[(1, 1, 0, 0)]=0.231361126271*x_ref[0]**o + (0.25150768468)*x_ref[0] + (0.589987896875)*x_ref[1]**o + (0.198649865167)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.719556220228*x[0]**o + (-0.734583923331)*x[0] + (-0.842715267843)*x[1]**o + (-0.844172292329)*x[1]
+        ref[(1, 1, 0, 1)]=0.719556220228*x_ref[0]**o + (-0.734583923331)*x_ref[0] + (-0.842715267843)*x_ref[1]**o + (-0.844172292329)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.920914154773*x[0]**o + (0.176339010845)*x[0] + (0.992196756639)*x[1]**o + (-0.0372359815251)*x[1]
+        ref[(1, 1, 0, 2)]=0.920914154773*x_ref[0]**o + (0.176339010845)*x_ref[0] + (0.992196756639)*x_ref[1]**o + (-0.0372359815251)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.586698978893*x[0]**o + (-0.326995776311)*x[0] + (0.136704476054)*x[1]**o + (-0.477478618977)*x[1]
+        ref[(1, 1, 1, 0)]=-0.586698978893*x_ref[0]**o + (-0.326995776311)*x_ref[0] + (0.136704476054)*x_ref[1]**o + (-0.477478618977)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.0354094003207*x[0]**o + (0.649611921964)*x[0] + (-0.983576246769)*x[1]**o + (-0.129543428119)*x[1]
+        ref[(1, 1, 1, 1)]=-0.0354094003207*x_ref[0]**o + (0.649611921964)*x_ref[0] + (-0.983576246769)*x_ref[1]**o + (-0.129543428119)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.145605053494*x[0]**o + (0.397516227113)*x[0] + (0.87704938232)*x[1]**o + (0.214114976981)*x[1]
+        ref[(1, 1, 1, 2)]=0.145605053494*x_ref[0]**o + (0.397516227113)*x_ref[0] + (0.87704938232)*x_ref[1]**o + (0.214114976981)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.273873442932*x[0]**o + (0.0412975182876)*x[0] + (-0.337801557025)*x[1]**o + (-0.918034487769)*x[1]
+        ref[(1, 1, 2, 0)]=-0.273873442932*x_ref[0]**o + (0.0412975182876)*x_ref[0] + (-0.337801557025)*x_ref[1]**o + (-0.918034487769)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.740309339428*x[0]**o + (-0.0660158004003)*x[0] + (0.422942355227)*x[1]**o + (-0.411781633448)*x[1]
+        ref[(1, 1, 2, 1)]=0.740309339428*x_ref[0]**o + (-0.0660158004003)*x_ref[0] + (0.422942355227)*x_ref[1]**o + (-0.411781633448)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.822700784307*x[0]**o + (0.45107585441)*x[0] + (-0.211649371541)*x[1]**o + (-0.691143994746)*x[1]
+        ref[(1, 1, 2, 2)]=-0.822700784307*x_ref[0]**o + (0.45107585441)*x_ref[0] + (-0.211649371541)*x_ref[1]**o + (-0.691143994746)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.56652707969*x[0]**o + (-0.26458135935)*x[0] + (-0.900204739668)*x[1]**o + (0.0236882756914)*x[1]
+        ref[(1, 2, 0, 0)]=-0.56652707969*x_ref[0]**o + (-0.26458135935)*x_ref[0] + (-0.900204739668)*x_ref[1]**o + (0.0236882756914)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.568945893259*x[0]**o + (-0.771976798769)*x[0] + (0.925600192843)*x[1]**o + (0.301352732947)*x[1]
+        ref[(1, 2, 0, 1)]=0.568945893259*x_ref[0]**o + (-0.771976798769)*x_ref[0] + (0.925600192843)*x_ref[1]**o + (0.301352732947)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.513915304568*x[0]**o + (0.22883255432)*x[0] + (0.217768605529)*x[1]**o + (-0.124661747011)*x[1]
+        ref[(1, 2, 0, 2)]=-0.513915304568*x_ref[0]**o + (0.22883255432)*x_ref[0] + (0.217768605529)*x_ref[1]**o + (-0.124661747011)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.0526874198468*x[0]**o + (0.952856741581)*x[0] + (0.411425516206)*x[1]**o + (0.277758323843)*x[1]
+        ref[(1, 2, 1, 0)]=-0.0526874198468*x_ref[0]**o + (0.952856741581)*x_ref[0] + (0.411425516206)*x_ref[1]**o + (0.277758323843)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.29401718993*x[0]**o + (0.503589723058)*x[0] + (-0.897737334526)*x[1]**o + (-0.982457119956)*x[1]
+        ref[(1, 2, 1, 1)]=0.29401718993*x_ref[0]**o + (0.503589723058)*x_ref[0] + (-0.897737334526)*x_ref[1]**o + (-0.982457119956)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.1396984592*x[0]**o + (0.368236023453)*x[0] + (-0.5192088764)*x[1]**o + (0.401981757107)*x[1]
+        ref[(1, 2, 1, 2)]=0.1396984592*x_ref[0]**o + (0.368236023453)*x_ref[0] + (-0.5192088764)*x_ref[1]**o + (0.401981757107)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.400760658756*x[0]**o + (-0.365652540011)*x[0] + (-0.732571724007)*x[1]**o + (0.0787231639529)*x[1]
+        ref[(1, 2, 2, 0)]=0.400760658756*x_ref[0]**o + (-0.365652540011)*x_ref[0] + (-0.732571724007)*x_ref[1]**o + (0.0787231639529)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.375782737826*x[0]**o + (0.804071122833)*x[0] + (-0.0135398020312)*x[1]**o + (-0.0063040819579)*x[1]
+        ref[(1, 2, 2, 1)]=0.375782737826*x_ref[0]**o + (0.804071122833)*x_ref[0] + (-0.0135398020312)*x_ref[1]**o + (-0.0063040819579)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.964586917226*x[0]**o + (0.759553922474)*x[0] + (0.485290093273)*x[1]**o + (0.296715186321)*x[1]
+        ref[(1, 2, 2, 2)]=-0.964586917226*x_ref[0]**o + (0.759553922474)*x_ref[0] + (0.485290093273)*x_ref[1]**o + (0.296715186321)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.371299122236*x[0]**o + (-0.850880241945)*x[0] + (-0.0184584255185)*x[1]**o + (0.432585125628)*x[1]
+        ref[(2, 0, 0, 0)]=0.371299122236*x_ref[0]**o + (-0.850880241945)*x_ref[0] + (-0.0184584255185)*x_ref[1]**o + (0.432585125628)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.294464972691*x[0]**o + (0.0408881897051)*x[0] + (-0.135683824833)*x[1]**o + (0.449140405697)*x[1]
+        ref[(2, 0, 0, 1)]=0.294464972691*x_ref[0]**o + (0.0408881897051)*x_ref[0] + (-0.135683824833)*x_ref[1]**o + (0.449140405697)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.833469223702*x[0]**o + (-0.479293680633)*x[0] + (0.431278818108)*x[1]**o + (0.605582149099)*x[1]
+        ref[(2, 0, 0, 2)]=-0.833469223702*x_ref[0]**o + (-0.479293680633)*x_ref[0] + (0.431278818108)*x_ref[1]**o + (0.605582149099)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.85859169041*x[0]**o + (0.761829047248)*x[0] + (-0.482435858216)*x[1]**o + (-0.913445298193)*x[1]
+        ref[(2, 0, 1, 0)]=0.85859169041*x_ref[0]**o + (0.761829047248)*x_ref[0] + (-0.482435858216)*x_ref[1]**o + (-0.913445298193)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.910461863972*x[0]**o + (-0.793969823876)*x[0] + (0.397154461545)*x[1]**o + (0.160137374329)*x[1]
+        ref[(2, 0, 1, 1)]=-0.910461863972*x_ref[0]**o + (-0.793969823876)*x_ref[0] + (0.397154461545)*x_ref[1]**o + (0.160137374329)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.790188377333*x[0]**o + (0.576153430287)*x[0] + (0.643623788326)*x[1]**o + (-0.252430814729)*x[1]
+        ref[(2, 0, 1, 2)]=0.790188377333*x_ref[0]**o + (0.576153430287)*x_ref[0] + (0.643623788326)*x_ref[1]**o + (-0.252430814729)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.771188249123*x[0]**o + (0.783928759246)*x[0] + (0.181735281038)*x[1]**o + (-0.597112148535)*x[1]
+        ref[(2, 0, 2, 0)]=0.771188249123*x_ref[0]**o + (0.783928759246)*x_ref[0] + (0.181735281038)*x_ref[1]**o + (-0.597112148535)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.59139194049*x[0]**o + (-0.123940645251)*x[0] + (-0.675001125314)*x[1]**o + (0.129244165324)*x[1]
+        ref[(2, 0, 2, 1)]=-0.59139194049*x_ref[0]**o + (-0.123940645251)*x_ref[0] + (-0.675001125314)*x_ref[1]**o + (0.129244165324)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.190167931923*x[0]**o + (-0.784761712849)*x[0] + (-0.911628487943)*x[1]**o + (-0.495787054133)*x[1]
+        ref[(2, 0, 2, 2)]=-0.190167931923*x_ref[0]**o + (-0.784761712849)*x_ref[0] + (-0.911628487943)*x_ref[1]**o + (-0.495787054133)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.874122638335*x[0]**o + (-0.608350519494)*x[0] + (0.908262133564)*x[1]**o + (0.124098688391)*x[1]
+        ref[(2, 1, 0, 0)]=0.874122638335*x_ref[0]**o + (-0.608350519494)*x_ref[0] + (0.908262133564)*x_ref[1]**o + (0.124098688391)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.645240250577*x[0]**o + (-0.832836403927)*x[0] + (-0.365217322365)*x[1]**o + (0.279934289999)*x[1]
+        ref[(2, 1, 0, 1)]=0.645240250577*x_ref[0]**o + (-0.832836403927)*x_ref[0] + (-0.365217322365)*x_ref[1]**o + (0.279934289999)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.878139681028*x[0]**o + (-0.704824368563)*x[0] + (-0.894818697095)*x[1]**o + (-0.226553529791)*x[1]
+        ref[(2, 1, 0, 2)]=-0.878139681028*x_ref[0]**o + (-0.704824368563)*x_ref[0] + (-0.894818697095)*x_ref[1]**o + (-0.226553529791)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.991546266955*x[0]**o + (-0.939728490336)*x[0] + (-0.962081709894)*x[1]**o + (0.968532367626)*x[1]
+        ref[(2, 1, 1, 0)]=-0.991546266955*x_ref[0]**o + (-0.939728490336)*x_ref[0] + (-0.962081709894)*x_ref[1]**o + (0.968532367626)*x_ref[1]
+        arg[(2, 1, 1, 1)]=0.856301387312*x[0]**o + (-0.807753307714)*x[0] + (0.440614195712)*x[1]**o + (0.189025269919)*x[1]
+        ref[(2, 1, 1, 1)]=0.856301387312*x_ref[0]**o + (-0.807753307714)*x_ref[0] + (0.440614195712)*x_ref[1]**o + (0.189025269919)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.344598318884*x[0]**o + (0.0416863721299)*x[0] + (0.498747869157)*x[1]**o + (0.720252465678)*x[1]
+        ref[(2, 1, 1, 2)]=-0.344598318884*x_ref[0]**o + (0.0416863721299)*x_ref[0] + (0.498747869157)*x_ref[1]**o + (0.720252465678)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.467044497393*x[0]**o + (0.164805893971)*x[0] + (-0.173852593681)*x[1]**o + (-0.571986180009)*x[1]
+        ref[(2, 1, 2, 0)]=-0.467044497393*x_ref[0]**o + (0.164805893971)*x_ref[0] + (-0.173852593681)*x_ref[1]**o + (-0.571986180009)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.692831022759*x[0]**o + (0.522980953362)*x[0] + (0.696560518381)*x[1]**o + (-0.803629417501)*x[1]
+        ref[(2, 1, 2, 1)]=-0.692831022759*x_ref[0]**o + (0.522980953362)*x_ref[0] + (0.696560518381)*x_ref[1]**o + (-0.803629417501)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.744739944371*x[0]**o + (-0.530584261777)*x[0] + (-0.0370302890591)*x[1]**o + (-0.32511589516)*x[1]
+        ref[(2, 1, 2, 2)]=-0.744739944371*x_ref[0]**o + (-0.530584261777)*x_ref[0] + (-0.0370302890591)*x_ref[1]**o + (-0.32511589516)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.787176292339*x[0]**o + (-0.621427543542)*x[0] + (0.880802054216)*x[1]**o + (0.3992251188)*x[1]
+        ref[(2, 2, 0, 0)]=-0.787176292339*x_ref[0]**o + (-0.621427543542)*x_ref[0] + (0.880802054216)*x_ref[1]**o + (0.3992251188)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.00164684051785*x[0]**o + (-0.0588102041567)*x[0] + (-0.835423335833)*x[1]**o + (-0.271502045182)*x[1]
+        ref[(2, 2, 0, 1)]=-0.00164684051785*x_ref[0]**o + (-0.0588102041567)*x_ref[0] + (-0.835423335833)*x_ref[1]**o + (-0.271502045182)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.717406498499*x[0]**o + (-0.619847119332)*x[0] + (0.850447755368)*x[1]**o + (-0.302835724805)*x[1]
+        ref[(2, 2, 0, 2)]=0.717406498499*x_ref[0]**o + (-0.619847119332)*x_ref[0] + (0.850447755368)*x_ref[1]**o + (-0.302835724805)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.084827062974*x[0]**o + (-0.802175996457)*x[0] + (0.715696081519)*x[1]**o + (-0.781109929986)*x[1]
+        ref[(2, 2, 1, 0)]=-0.084827062974*x_ref[0]**o + (-0.802175996457)*x_ref[0] + (0.715696081519)*x_ref[1]**o + (-0.781109929986)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.0710945783141*x[0]**o + (-0.226251566759)*x[0] + (0.499853416547)*x[1]**o + (0.571605199979)*x[1]
+        ref[(2, 2, 1, 1)]=0.0710945783141*x_ref[0]**o + (-0.226251566759)*x_ref[0] + (0.499853416547)*x_ref[1]**o + (0.571605199979)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.37084363419*x[0]**o + (-0.807617434494)*x[0] + (0.961063708465)*x[1]**o + (-0.354253697476)*x[1]
+        ref[(2, 2, 1, 2)]=-0.37084363419*x_ref[0]**o + (-0.807617434494)*x_ref[0] + (0.961063708465)*x_ref[1]**o + (-0.354253697476)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.229263629537*x[0]**o + (-0.273425972673)*x[0] + (-0.560740528342)*x[1]**o + (0.372915126798)*x[1]
+        ref[(2, 2, 2, 0)]=-0.229263629537*x_ref[0]**o + (-0.273425972673)*x_ref[0] + (-0.560740528342)*x_ref[1]**o + (0.372915126798)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.98926965642*x[0]**o + (-0.0342923743482)*x[0] + (-0.623443310218)*x[1]**o + (0.969008018616)*x[1]
+        ref[(2, 2, 2, 1)]=0.98926965642*x_ref[0]**o + (-0.0342923743482)*x_ref[0] + (-0.623443310218)*x_ref[1]**o + (0.969008018616)*x_ref[1]
+        arg[(2, 2, 2, 2)]=0.049673560828*x[0]**o + (-0.0926659534059)*x[0] + (0.100025553493)*x[1]**o + (-0.332439171392)*x[1]
+        ref[(2, 2, 2, 2)]=0.049673560828*x_ref[0]**o + (-0.0926659534059)*x_ref[0] + (0.100025553493)*x_ref[1]**o + (-0.332439171392)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.752413757909*x[0]**o + (-0.0241949568564)*x[0] + (-0.237388015384)*x[1]**o + (0.686366103759)*x[1]
+        ref[(3, 0, 0, 0)]=0.752413757909*x_ref[0]**o + (-0.0241949568564)*x_ref[0] + (-0.237388015384)*x_ref[1]**o + (0.686366103759)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.783232179152*x[0]**o + (0.787225118765)*x[0] + (-0.855476377721)*x[1]**o + (0.739193442306)*x[1]
+        ref[(3, 0, 0, 1)]=-0.783232179152*x_ref[0]**o + (0.787225118765)*x_ref[0] + (-0.855476377721)*x_ref[1]**o + (0.739193442306)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.636544607842*x[0]**o + (-0.322041211792)*x[0] + (0.975861689397)*x[1]**o + (0.496396239152)*x[1]
+        ref[(3, 0, 0, 2)]=-0.636544607842*x_ref[0]**o + (-0.322041211792)*x_ref[0] + (0.975861689397)*x_ref[1]**o + (0.496396239152)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.703321183713*x[0]**o + (-0.594776032355)*x[0] + (0.275365370733)*x[1]**o + (-0.38429100804)*x[1]
+        ref[(3, 0, 1, 0)]=0.703321183713*x_ref[0]**o + (-0.594776032355)*x_ref[0] + (0.275365370733)*x_ref[1]**o + (-0.38429100804)*x_ref[1]
+        arg[(3, 0, 1, 1)]=0.810363777649*x[0]**o + (0.816436682807)*x[0] + (0.761650864842)*x[1]**o + (0.995355547489)*x[1]
+        ref[(3, 0, 1, 1)]=0.810363777649*x_ref[0]**o + (0.816436682807)*x_ref[0] + (0.761650864842)*x_ref[1]**o + (0.995355547489)*x_ref[1]
+        arg[(3, 0, 1, 2)]=0.559527322647*x[0]**o + (-0.515900983673)*x[0] + (0.924238225966)*x[1]**o + (-0.479393953918)*x[1]
+        ref[(3, 0, 1, 2)]=0.559527322647*x_ref[0]**o + (-0.515900983673)*x_ref[0] + (0.924238225966)*x_ref[1]**o + (-0.479393953918)*x_ref[1]
+        arg[(3, 0, 2, 0)]=-0.741516793167*x[0]**o + (0.615901893382)*x[0] + (0.61856948409)*x[1]**o + (-0.795290799385)*x[1]
+        ref[(3, 0, 2, 0)]=-0.741516793167*x_ref[0]**o + (0.615901893382)*x_ref[0] + (0.61856948409)*x_ref[1]**o + (-0.795290799385)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.13892785097*x[0]**o + (-0.120384696819)*x[0] + (0.867922708761)*x[1]**o + (-0.348264900593)*x[1]
+        ref[(3, 0, 2, 1)]=0.13892785097*x_ref[0]**o + (-0.120384696819)*x_ref[0] + (0.867922708761)*x_ref[1]**o + (-0.348264900593)*x_ref[1]
+        arg[(3, 0, 2, 2)]=0.510451893413*x[0]**o + (-0.0279959749437)*x[0] + (0.871826976061)*x[1]**o + (-0.999271795655)*x[1]
+        ref[(3, 0, 2, 2)]=0.510451893413*x_ref[0]**o + (-0.0279959749437)*x_ref[0] + (0.871826976061)*x_ref[1]**o + (-0.999271795655)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.354629239334*x[0]**o + (0.954002826293)*x[0] + (-0.355058727653)*x[1]**o + (0.785262232284)*x[1]
+        ref[(3, 1, 0, 0)]=-0.354629239334*x_ref[0]**o + (0.954002826293)*x_ref[0] + (-0.355058727653)*x_ref[1]**o + (0.785262232284)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.910976004277*x[0]**o + (-0.292278850747)*x[0] + (-0.279382648426)*x[1]**o + (0.190722941997)*x[1]
+        ref[(3, 1, 0, 1)]=0.910976004277*x_ref[0]**o + (-0.292278850747)*x_ref[0] + (-0.279382648426)*x_ref[1]**o + (0.190722941997)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.910913521163*x[0]**o + (0.58668778579)*x[0] + (-0.226885218596)*x[1]**o + (-0.962117414359)*x[1]
+        ref[(3, 1, 0, 2)]=0.910913521163*x_ref[0]**o + (0.58668778579)*x_ref[0] + (-0.226885218596)*x_ref[1]**o + (-0.962117414359)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.367606278233*x[0]**o + (0.911186338932)*x[0] + (-0.0629052881115)*x[1]**o + (-0.0347593012107)*x[1]
+        ref[(3, 1, 1, 0)]=0.367606278233*x_ref[0]**o + (0.911186338932)*x_ref[0] + (-0.0629052881115)*x_ref[1]**o + (-0.0347593012107)*x_ref[1]
+        arg[(3, 1, 1, 1)]=0.706879721147*x[0]**o + (-0.153375061419)*x[0] + (0.937573114346)*x[1]**o + (-0.177969119191)*x[1]
+        ref[(3, 1, 1, 1)]=0.706879721147*x_ref[0]**o + (-0.153375061419)*x_ref[0] + (0.937573114346)*x_ref[1]**o + (-0.177969119191)*x_ref[1]
+        arg[(3, 1, 1, 2)]=0.0669105164676*x[0]**o + (-0.346037124843)*x[0] + (0.305107375629)*x[1]**o + (-0.71648613994)*x[1]
+        ref[(3, 1, 1, 2)]=0.0669105164676*x_ref[0]**o + (-0.346037124843)*x_ref[0] + (0.305107375629)*x_ref[1]**o + (-0.71648613994)*x_ref[1]
+        arg[(3, 1, 2, 0)]=0.848816195694*x[0]**o + (-0.196064797855)*x[0] + (0.170190251012)*x[1]**o + (-0.698515201588)*x[1]
+        ref[(3, 1, 2, 0)]=0.848816195694*x_ref[0]**o + (-0.196064797855)*x_ref[0] + (0.170190251012)*x_ref[1]**o + (-0.698515201588)*x_ref[1]
+        arg[(3, 1, 2, 1)]=0.668437983879*x[0]**o + (-0.0341586394508)*x[0] + (-0.872888731919)*x[1]**o + (0.223671108555)*x[1]
+        ref[(3, 1, 2, 1)]=0.668437983879*x_ref[0]**o + (-0.0341586394508)*x_ref[0] + (-0.872888731919)*x_ref[1]**o + (0.223671108555)*x_ref[1]
+        arg[(3, 1, 2, 2)]=0.520126678613*x[0]**o + (-0.58628734018)*x[0] + (0.635905852699)*x[1]**o + (-0.0361314094571)*x[1]
+        ref[(3, 1, 2, 2)]=0.520126678613*x_ref[0]**o + (-0.58628734018)*x_ref[0] + (0.635905852699)*x_ref[1]**o + (-0.0361314094571)*x_ref[1]
+        arg[(3, 2, 0, 0)]=-0.73226518906*x[0]**o + (-0.818487519105)*x[0] + (0.127476321608)*x[1]**o + (-0.33515070501)*x[1]
+        ref[(3, 2, 0, 0)]=-0.73226518906*x_ref[0]**o + (-0.818487519105)*x_ref[0] + (0.127476321608)*x_ref[1]**o + (-0.33515070501)*x_ref[1]
+        arg[(3, 2, 0, 1)]=0.408319001816*x[0]**o + (0.561568073072)*x[0] + (-0.227529498181)*x[1]**o + (-0.0203392295182)*x[1]
+        ref[(3, 2, 0, 1)]=0.408319001816*x_ref[0]**o + (0.561568073072)*x_ref[0] + (-0.227529498181)*x_ref[1]**o + (-0.0203392295182)*x_ref[1]
+        arg[(3, 2, 0, 2)]=-0.152396334863*x[0]**o + (-0.39812524593)*x[0] + (-0.292580147307)*x[1]**o + (-0.0277401222759)*x[1]
+        ref[(3, 2, 0, 2)]=-0.152396334863*x_ref[0]**o + (-0.39812524593)*x_ref[0] + (-0.292580147307)*x_ref[1]**o + (-0.0277401222759)*x_ref[1]
+        arg[(3, 2, 1, 0)]=0.261769729682*x[0]**o + (-0.74381956573)*x[0] + (0.85426807143)*x[1]**o + (-0.381815747646)*x[1]
+        ref[(3, 2, 1, 0)]=0.261769729682*x_ref[0]**o + (-0.74381956573)*x_ref[0] + (0.85426807143)*x_ref[1]**o + (-0.381815747646)*x_ref[1]
+        arg[(3, 2, 1, 1)]=-0.394708990357*x[0]**o + (-0.0269424888747)*x[0] + (0.0182508705843)*x[1]**o + (-0.945418235002)*x[1]
+        ref[(3, 2, 1, 1)]=-0.394708990357*x_ref[0]**o + (-0.0269424888747)*x_ref[0] + (0.0182508705843)*x_ref[1]**o + (-0.945418235002)*x_ref[1]
+        arg[(3, 2, 1, 2)]=-0.929354307528*x[0]**o + (-0.113096321066)*x[0] + (-0.979331963943)*x[1]**o + (0.931242918512)*x[1]
+        ref[(3, 2, 1, 2)]=-0.929354307528*x_ref[0]**o + (-0.113096321066)*x_ref[0] + (-0.979331963943)*x_ref[1]**o + (0.931242918512)*x_ref[1]
+        arg[(3, 2, 2, 0)]=-0.210675495547*x[0]**o + (0.543215090218)*x[0] + (-0.769616110227)*x[1]**o + (0.824210371726)*x[1]
+        ref[(3, 2, 2, 0)]=-0.210675495547*x_ref[0]**o + (0.543215090218)*x_ref[0] + (-0.769616110227)*x_ref[1]**o + (0.824210371726)*x_ref[1]
+        arg[(3, 2, 2, 1)]=0.739836674585*x[0]**o + (0.407877755956)*x[0] + (0.205767308711)*x[1]**o + (0.753146337349)*x[1]
+        ref[(3, 2, 2, 1)]=0.739836674585*x_ref[0]**o + (0.407877755956)*x_ref[0] + (0.205767308711)*x_ref[1]**o + (0.753146337349)*x_ref[1]
+        arg[(3, 2, 2, 2)]=-0.590096465119*x[0]**o + (-0.547072883477)*x[0] + (0.549777686764)*x[1]**o + (-0.161084420711)*x[1]
+        ref[(3, 2, 2, 2)]=-0.590096465119*x_ref[0]**o + (-0.547072883477)*x_ref[0] + (0.549777686764)*x_ref[1]**o + (-0.161084420711)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.0653840454948*x[2]**o + (-0.25182164455)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.0653840454948*x_ref[2]**o + (-0.25182164455)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.751029586034*x[2]**o + (-0.595431869819)*x[2]
+            ref[(0, 0, 0, 1)]+=0.751029586034*x_ref[2]**o + (-0.595431869819)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.147734098002*x[2]**o + (-0.0813095692009)*x[2]
+            ref[(0, 0, 0, 2)]+=-0.147734098002*x_ref[2]**o + (-0.0813095692009)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.055026789775*x[2]**o + (-0.142389572744)*x[2]
+            ref[(0, 0, 1, 0)]+=0.055026789775*x_ref[2]**o + (-0.142389572744)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.972716257174*x[2]**o + (-0.00947590238948)*x[2]
+            ref[(0, 0, 1, 1)]+=0.972716257174*x_ref[2]**o + (-0.00947590238948)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.916503595524*x[2]**o + (0.0875918772045)*x[2]
+            ref[(0, 0, 1, 2)]+=0.916503595524*x_ref[2]**o + (0.0875918772045)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.0860989895979*x[2]**o + (-0.846842804266)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.0860989895979*x_ref[2]**o + (-0.846842804266)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.0612693074881*x[2]**o + (0.0437334002565)*x[2]
+            ref[(0, 0, 2, 1)]+=0.0612693074881*x_ref[2]**o + (0.0437334002565)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.851116242448*x[2]**o + (-0.769314512331)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.851116242448*x_ref[2]**o + (-0.769314512331)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.112730287057*x[2]**o + (-0.637124847367)*x[2]
+            ref[(0, 1, 0, 0)]+=0.112730287057*x_ref[2]**o + (-0.637124847367)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.0748776077105*x[2]**o + (0.647611346559)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.0748776077105*x_ref[2]**o + (0.647611346559)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.770808199845*x[2]**o + (0.290660180385)*x[2]
+            ref[(0, 1, 0, 2)]+=0.770808199845*x_ref[2]**o + (0.290660180385)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.271878970265*x[2]**o + (0.90616866031)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.271878970265*x_ref[2]**o + (0.90616866031)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.579124805311*x[2]**o + (-0.0859031386061)*x[2]
+            ref[(0, 1, 1, 1)]+=0.579124805311*x_ref[2]**o + (-0.0859031386061)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.743010786649*x[2]**o + (0.0542894875732)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.743010786649*x_ref[2]**o + (0.0542894875732)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.728689108923*x[2]**o + (-0.605418346831)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.728689108923*x_ref[2]**o + (-0.605418346831)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.459763484289*x[2]**o + (-0.582926023527)*x[2]
+            ref[(0, 1, 2, 1)]+=0.459763484289*x_ref[2]**o + (-0.582926023527)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.754920266874*x[2]**o + (-0.53703779285)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.754920266874*x_ref[2]**o + (-0.53703779285)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.00889069049757*x[2]**o + (-0.381955670888)*x[2]
+            ref[(0, 2, 0, 0)]+=0.00889069049757*x_ref[2]**o + (-0.381955670888)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.301810389325*x[2]**o + (0.651401588572)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.301810389325*x_ref[2]**o + (0.651401588572)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.537405522441*x[2]**o + (0.467873774901)*x[2]
+            ref[(0, 2, 0, 2)]+=0.537405522441*x_ref[2]**o + (0.467873774901)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.574582896779*x[2]**o + (0.458919249694)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.574582896779*x_ref[2]**o + (0.458919249694)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.0665506182916*x[2]**o + (0.126473359135)*x[2]
+            ref[(0, 2, 1, 1)]+=0.0665506182916*x_ref[2]**o + (0.126473359135)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.565813995703*x[2]**o + (0.723958595332)*x[2]
+            ref[(0, 2, 1, 2)]+=0.565813995703*x_ref[2]**o + (0.723958595332)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.413308307052*x[2]**o + (0.560857673251)*x[2]
+            ref[(0, 2, 2, 0)]+=-0.413308307052*x_ref[2]**o + (0.560857673251)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.970423850328*x[2]**o + (0.0107252240923)*x[2]
+            ref[(0, 2, 2, 1)]+=-0.970423850328*x_ref[2]**o + (0.0107252240923)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=-0.984822671715*x[2]**o + (-0.338237157141)*x[2]
+            ref[(0, 2, 2, 2)]+=-0.984822671715*x_ref[2]**o + (-0.338237157141)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.578876365152*x[2]**o + (-0.73572822613)*x[2]
+            ref[(1, 0, 0, 0)]+=0.578876365152*x_ref[2]**o + (-0.73572822613)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.450692208618*x[2]**o + (0.509317668314)*x[2]
+            ref[(1, 0, 0, 1)]+=0.450692208618*x_ref[2]**o + (0.509317668314)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.465462848129*x[2]**o + (0.65243321685)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.465462848129*x_ref[2]**o + (0.65243321685)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.993823168048*x[2]**o + (0.395251085468)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.993823168048*x_ref[2]**o + (0.395251085468)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.768448259406*x[2]**o + (0.655550445147)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.768448259406*x_ref[2]**o + (0.655550445147)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.389374055009*x[2]**o + (-0.052969464743)*x[2]
+            ref[(1, 0, 1, 2)]+=0.389374055009*x_ref[2]**o + (-0.052969464743)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.795035227741*x[2]**o + (-0.558134276388)*x[2]
+            ref[(1, 0, 2, 0)]+=0.795035227741*x_ref[2]**o + (-0.558134276388)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.570357826807*x[2]**o + (0.967071673057)*x[2]
+            ref[(1, 0, 2, 1)]+=0.570357826807*x_ref[2]**o + (0.967071673057)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.27354948102*x[2]**o + (0.95152535755)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.27354948102*x_ref[2]**o + (0.95152535755)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.0281342449303*x[2]**o + (0.779835278355)*x[2]
+            ref[(1, 1, 0, 0)]+=0.0281342449303*x_ref[2]**o + (0.779835278355)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.297080874795*x[2]**o + (-0.91955225446)*x[2]
+            ref[(1, 1, 0, 1)]+=0.297080874795*x_ref[2]**o + (-0.91955225446)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.0920907656412*x[2]**o + (-0.943731396986)*x[2]
+            ref[(1, 1, 0, 2)]+=0.0920907656412*x_ref[2]**o + (-0.943731396986)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.97760258054*x[2]**o + (0.0157532066365)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.97760258054*x_ref[2]**o + (0.0157532066365)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.680392014377*x[2]**o + (-0.0594656398755)*x[2]
+            ref[(1, 1, 1, 1)]+=0.680392014377*x_ref[2]**o + (-0.0594656398755)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.738928206599*x[2]**o + (0.329833544041)*x[2]
+            ref[(1, 1, 1, 2)]+=0.738928206599*x_ref[2]**o + (0.329833544041)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.347696799247*x[2]**o + (0.203198672124)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.347696799247*x_ref[2]**o + (0.203198672124)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.447601684555*x[2]**o + (0.597542960355)*x[2]
+            ref[(1, 1, 2, 1)]+=0.447601684555*x_ref[2]**o + (0.597542960355)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.759250546252*x[2]**o + (0.730659754305)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.759250546252*x_ref[2]**o + (0.730659754305)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.499174672456*x[2]**o + (0.710445011198)*x[2]
+            ref[(1, 2, 0, 0)]+=0.499174672456*x_ref[2]**o + (0.710445011198)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.241679507871*x[2]**o + (0.992665544612)*x[2]
+            ref[(1, 2, 0, 1)]+=0.241679507871*x_ref[2]**o + (0.992665544612)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.50443984015*x[2]**o + (0.85673796691)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.50443984015*x_ref[2]**o + (0.85673796691)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.772067500182*x[2]**o + (0.342788415446)*x[2]
+            ref[(1, 2, 1, 0)]+=0.772067500182*x_ref[2]**o + (0.342788415446)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.544087133694*x[2]**o + (-0.672913956447)*x[2]
+            ref[(1, 2, 1, 1)]+=-0.544087133694*x_ref[2]**o + (-0.672913956447)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.327675225255*x[2]**o + (0.994621739267)*x[2]
+            ref[(1, 2, 1, 2)]+=0.327675225255*x_ref[2]**o + (0.994621739267)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=0.118527793274*x[2]**o + (-0.309722213382)*x[2]
+            ref[(1, 2, 2, 0)]+=0.118527793274*x_ref[2]**o + (-0.309722213382)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=0.761751752095*x[2]**o + (-0.3906647767)*x[2]
+            ref[(1, 2, 2, 1)]+=0.761751752095*x_ref[2]**o + (-0.3906647767)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.817749177171*x[2]**o + (0.517206360919)*x[2]
+            ref[(1, 2, 2, 2)]+=0.817749177171*x_ref[2]**o + (0.517206360919)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.258969869973*x[2]**o + (-0.198217128749)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.258969869973*x_ref[2]**o + (-0.198217128749)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.988428205629*x[2]**o + (-0.494739050121)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.988428205629*x_ref[2]**o + (-0.494739050121)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.778041658589*x[2]**o + (-0.273452284013)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.778041658589*x_ref[2]**o + (-0.273452284013)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.300629041907*x[2]**o + (-0.819412522253)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.300629041907*x_ref[2]**o + (-0.819412522253)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.353275993434*x[2]**o + (-0.552077860578)*x[2]
+            ref[(2, 0, 1, 1)]+=0.353275993434*x_ref[2]**o + (-0.552077860578)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.217311785963*x[2]**o + (-0.957130283522)*x[2]
+            ref[(2, 0, 1, 2)]+=-0.217311785963*x_ref[2]**o + (-0.957130283522)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.513616015227*x[2]**o + (0.607105535675)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.513616015227*x_ref[2]**o + (0.607105535675)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.570642487716*x[2]**o + (0.776767952941)*x[2]
+            ref[(2, 0, 2, 1)]+=0.570642487716*x_ref[2]**o + (0.776767952941)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.239840087904*x[2]**o + (0.984256723228)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.239840087904*x_ref[2]**o + (0.984256723228)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.979964781672*x[2]**o + (0.942572192111)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.979964781672*x_ref[2]**o + (0.942572192111)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.142949499468*x[2]**o + (0.593320068657)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.142949499468*x_ref[2]**o + (0.593320068657)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.73272638582*x[2]**o + (-0.387830358891)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.73272638582*x_ref[2]**o + (-0.387830358891)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.0546496715758*x[2]**o + (-0.690836566819)*x[2]
+            ref[(2, 1, 1, 0)]+=0.0546496715758*x_ref[2]**o + (-0.690836566819)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.457064903937*x[2]**o + (-0.964956199082)*x[2]
+            ref[(2, 1, 1, 1)]+=0.457064903937*x_ref[2]**o + (-0.964956199082)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.886283458574*x[2]**o + (0.707158467803)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.886283458574*x_ref[2]**o + (0.707158467803)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=0.570335636296*x[2]**o + (-0.397401761579)*x[2]
+            ref[(2, 1, 2, 0)]+=0.570335636296*x_ref[2]**o + (-0.397401761579)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.17795440033*x[2]**o + (0.626446130758)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.17795440033*x_ref[2]**o + (0.626446130758)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.156671495659*x[2]**o + (0.973131737831)*x[2]
+            ref[(2, 1, 2, 2)]+=0.156671495659*x_ref[2]**o + (0.973131737831)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.599070285776*x[2]**o + (-0.666281681063)*x[2]
+            ref[(2, 2, 0, 0)]+=-0.599070285776*x_ref[2]**o + (-0.666281681063)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.203297500954*x[2]**o + (-0.498925089115)*x[2]
+            ref[(2, 2, 0, 1)]+=0.203297500954*x_ref[2]**o + (-0.498925089115)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=0.416719422629*x[2]**o + (-0.259539198428)*x[2]
+            ref[(2, 2, 0, 2)]+=0.416719422629*x_ref[2]**o + (-0.259539198428)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.673131243047*x[2]**o + (0.194668763242)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.673131243047*x_ref[2]**o + (0.194668763242)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.0637412618748*x[2]**o + (-0.426878866992)*x[2]
+            ref[(2, 2, 1, 1)]+=-0.0637412618748*x_ref[2]**o + (-0.426878866992)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.0342603105694*x[2]**o + (0.758260109007)*x[2]
+            ref[(2, 2, 1, 2)]+=0.0342603105694*x_ref[2]**o + (0.758260109007)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.761724520548*x[2]**o + (0.91336837518)*x[2]
+            ref[(2, 2, 2, 0)]+=-0.761724520548*x_ref[2]**o + (0.91336837518)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.735816816052*x[2]**o + (-0.646744286729)*x[2]
+            ref[(2, 2, 2, 1)]+=0.735816816052*x_ref[2]**o + (-0.646744286729)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=0.46159543021*x[2]**o + (0.960813293158)*x[2]
+            ref[(2, 2, 2, 2)]+=0.46159543021*x_ref[2]**o + (0.960813293158)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.847457737561*x[2]**o + (0.332899731622)*x[2]
+            ref[(3, 0, 0, 0)]+=0.847457737561*x_ref[2]**o + (0.332899731622)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.781072534674*x[2]**o + (0.314971281642)*x[2]
+            ref[(3, 0, 0, 1)]+=-0.781072534674*x_ref[2]**o + (0.314971281642)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.194982377407*x[2]**o + (0.959953812571)*x[2]
+            ref[(3, 0, 0, 2)]+=0.194982377407*x_ref[2]**o + (0.959953812571)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.144202643401*x[2]**o + (0.541587202762)*x[2]
+            ref[(3, 0, 1, 0)]+=0.144202643401*x_ref[2]**o + (0.541587202762)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=-0.305638503215*x[2]**o + (0.0258555599715)*x[2]
+            ref[(3, 0, 1, 1)]+=-0.305638503215*x_ref[2]**o + (0.0258555599715)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=0.114967829249*x[2]**o + (0.239158933366)*x[2]
+            ref[(3, 0, 1, 2)]+=0.114967829249*x_ref[2]**o + (0.239158933366)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=0.474772936207*x[2]**o + (-0.745491781301)*x[2]
+            ref[(3, 0, 2, 0)]+=0.474772936207*x_ref[2]**o + (-0.745491781301)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=-0.885966330242*x[2]**o + (-0.817682061687)*x[2]
+            ref[(3, 0, 2, 1)]+=-0.885966330242*x_ref[2]**o + (-0.817682061687)*x_ref[2]
+            arg[(3, 0, 2, 2)]+=-0.422723276034*x[2]**o + (0.471742052037)*x[2]
+            ref[(3, 0, 2, 2)]+=-0.422723276034*x_ref[2]**o + (0.471742052037)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.842220358128*x[2]**o + (0.666462718505)*x[2]
+            ref[(3, 1, 0, 0)]+=0.842220358128*x_ref[2]**o + (0.666462718505)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=-0.589858715305*x[2]**o + (0.751529928324)*x[2]
+            ref[(3, 1, 0, 1)]+=-0.589858715305*x_ref[2]**o + (0.751529928324)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=0.831506476792*x[2]**o + (0.226732227925)*x[2]
+            ref[(3, 1, 0, 2)]+=0.831506476792*x_ref[2]**o + (0.226732227925)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.4575315254*x[2]**o + (-0.607729676761)*x[2]
+            ref[(3, 1, 1, 0)]+=0.4575315254*x_ref[2]**o + (-0.607729676761)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.704155979794*x[2]**o + (-0.281393304318)*x[2]
+            ref[(3, 1, 1, 1)]+=-0.704155979794*x_ref[2]**o + (-0.281393304318)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.73009013391*x[2]**o + (-0.845725388632)*x[2]
+            ref[(3, 1, 1, 2)]+=0.73009013391*x_ref[2]**o + (-0.845725388632)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=0.764003500851*x[2]**o + (0.392938326424)*x[2]
+            ref[(3, 1, 2, 0)]+=0.764003500851*x_ref[2]**o + (0.392938326424)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.0967575766899*x[2]**o + (-0.614286412607)*x[2]
+            ref[(3, 1, 2, 1)]+=0.0967575766899*x_ref[2]**o + (-0.614286412607)*x_ref[2]
+            arg[(3, 1, 2, 2)]+=0.457499831225*x[2]**o + (-0.630478870327)*x[2]
+            ref[(3, 1, 2, 2)]+=0.457499831225*x_ref[2]**o + (-0.630478870327)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=-0.950302516705*x[2]**o + (0.901501154613)*x[2]
+            ref[(3, 2, 0, 0)]+=-0.950302516705*x_ref[2]**o + (0.901501154613)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=-0.371289538367*x[2]**o + (0.319324237269)*x[2]
+            ref[(3, 2, 0, 1)]+=-0.371289538367*x_ref[2]**o + (0.319324237269)*x_ref[2]
+            arg[(3, 2, 0, 2)]+=-0.862044215097*x[2]**o + (-0.577983008197)*x[2]
+            ref[(3, 2, 0, 2)]+=-0.862044215097*x_ref[2]**o + (-0.577983008197)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=0.330242251607*x[2]**o + (0.737659848122)*x[2]
+            ref[(3, 2, 1, 0)]+=0.330242251607*x_ref[2]**o + (0.737659848122)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=-0.615559047061*x[2]**o + (0.421248885049)*x[2]
+            ref[(3, 2, 1, 1)]+=-0.615559047061*x_ref[2]**o + (0.421248885049)*x_ref[2]
+            arg[(3, 2, 1, 2)]+=0.254440306526*x[2]**o + (0.397763952172)*x[2]
+            ref[(3, 2, 1, 2)]+=0.254440306526*x_ref[2]**o + (0.397763952172)*x_ref[2]
+            arg[(3, 2, 2, 0)]+=0.717216705566*x[2]**o + (0.934436957694)*x[2]
+            ref[(3, 2, 2, 0)]+=0.717216705566*x_ref[2]**o + (0.934436957694)*x_ref[2]
+            arg[(3, 2, 2, 1)]+=0.202382227837*x[2]**o + (0.933673978761)*x[2]
+            ref[(3, 2, 2, 1)]+=0.202382227837*x_ref[2]**o + (0.933673978761)*x_ref[2]
+            arg[(3, 2, 2, 2)]+=-0.688132876321*x[2]**o + (0.823030690511)*x[2]
+            ref[(3, 2, 2, 2)]+=-0.688132876321*x_ref[2]**o + (0.823030690511)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.306298862226*x[0] + (-0.460491692905)*x[1]
+        ref=-0.306298862226*x_ref[0] + (-0.460491692905)*x_ref[1]
+        if dim==3:
+            arg+=(0.197235542626)*x[2]
+            ref+=(0.197235542626)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.981987278747*x[0] + (0.739163256133)*x[1]
+        ref[(0,)]=0.981987278747*x_ref[0] + (0.739163256133)*x_ref[1]
+        arg[(1,)]=-0.566719052674*x[0] + (-0.0223829788224)*x[1]
+        ref[(1,)]=-0.566719052674*x_ref[0] + (-0.0223829788224)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.153932086604*x[2]
+            ref[(0,)]+=0.153932086604*x_ref[2]
+            arg[(1,)]+=0.896117733729*x[2]
+            ref[(1,)]+=0.896117733729*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=-0.951543082026*x[0] + (0.72305282865)*x[1]
+        ref[(0, 0)]=-0.951543082026*x_ref[0] + (0.72305282865)*x_ref[1]
+        arg[(0, 1)]=0.801299151045*x[0] + (-0.982627447104)*x[1]
+        ref[(0, 1)]=0.801299151045*x_ref[0] + (-0.982627447104)*x_ref[1]
+        arg[(1, 0)]=-0.856075600363*x[0] + (0.623225048835)*x[1]
+        ref[(1, 0)]=-0.856075600363*x_ref[0] + (0.623225048835)*x_ref[1]
+        arg[(1, 1)]=-0.58343772215*x[0] + (-0.772359360014)*x[1]
+        ref[(1, 1)]=-0.58343772215*x_ref[0] + (-0.772359360014)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.0959611057032*x[2]
+            ref[(0, 0)]+=0.0959611057032*x_ref[2]
+            arg[(0, 1)]+=-0.509914884488*x[2]
+            ref[(0, 1)]+=-0.509914884488*x_ref[2]
+            arg[(1, 0)]+=-0.0211568455205*x[2]
+            ref[(1, 0)]+=-0.0211568455205*x_ref[2]
+            arg[(1, 1)]+=-0.642681565905*x[2]
+            ref[(1, 1)]+=-0.642681565905*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3),w)
+        ref = Data(0,(2, 3, 3),w_ref)
+        arg[(0, 0, 0)]=-0.917519987125*x[0] + (-0.162842730551)*x[1]
+        ref[(0, 0, 0)]=-0.917519987125*x_ref[0] + (-0.162842730551)*x_ref[1]
+        arg[(0, 0, 1)]=-0.468629749237*x[0] + (0.906354815956)*x[1]
+        ref[(0, 0, 1)]=-0.468629749237*x_ref[0] + (0.906354815956)*x_ref[1]
+        arg[(0, 0, 2)]=0.874235420441*x[0] + (0.446681682593)*x[1]
+        ref[(0, 0, 2)]=0.874235420441*x_ref[0] + (0.446681682593)*x_ref[1]
+        arg[(0, 1, 0)]=0.340243836341*x[0] + (-0.981329594172)*x[1]
+        ref[(0, 1, 0)]=0.340243836341*x_ref[0] + (-0.981329594172)*x_ref[1]
+        arg[(0, 1, 1)]=-0.0144514353865*x[0] + (-0.254294037656)*x[1]
+        ref[(0, 1, 1)]=-0.0144514353865*x_ref[0] + (-0.254294037656)*x_ref[1]
+        arg[(0, 1, 2)]=0.231292707356*x[0] + (0.186425405773)*x[1]
+        ref[(0, 1, 2)]=0.231292707356*x_ref[0] + (0.186425405773)*x_ref[1]
+        arg[(0, 2, 0)]=-0.613576419661*x[0] + (0.589734771601)*x[1]
+        ref[(0, 2, 0)]=-0.613576419661*x_ref[0] + (0.589734771601)*x_ref[1]
+        arg[(0, 2, 1)]=-0.677694485802*x[0] + (-0.337602923423)*x[1]
+        ref[(0, 2, 1)]=-0.677694485802*x_ref[0] + (-0.337602923423)*x_ref[1]
+        arg[(0, 2, 2)]=0.243806332523*x[0] + (-0.975918672413)*x[1]
+        ref[(0, 2, 2)]=0.243806332523*x_ref[0] + (-0.975918672413)*x_ref[1]
+        arg[(1, 0, 0)]=0.81812426468*x[0] + (-0.0321550328604)*x[1]
+        ref[(1, 0, 0)]=0.81812426468*x_ref[0] + (-0.0321550328604)*x_ref[1]
+        arg[(1, 0, 1)]=0.221479205578*x[0] + (-0.818111781866)*x[1]
+        ref[(1, 0, 1)]=0.221479205578*x_ref[0] + (-0.818111781866)*x_ref[1]
+        arg[(1, 0, 2)]=0.180227722423*x[0] + (-0.666225087967)*x[1]
+        ref[(1, 0, 2)]=0.180227722423*x_ref[0] + (-0.666225087967)*x_ref[1]
+        arg[(1, 1, 0)]=0.122361171863*x[0] + (-0.0497548848119)*x[1]
+        ref[(1, 1, 0)]=0.122361171863*x_ref[0] + (-0.0497548848119)*x_ref[1]
+        arg[(1, 1, 1)]=0.675224316312*x[0] + (-0.533079895089)*x[1]
+        ref[(1, 1, 1)]=0.675224316312*x_ref[0] + (-0.533079895089)*x_ref[1]
+        arg[(1, 1, 2)]=0.437166373882*x[0] + (-0.311665347371)*x[1]
+        ref[(1, 1, 2)]=0.437166373882*x_ref[0] + (-0.311665347371)*x_ref[1]
+        arg[(1, 2, 0)]=0.650058066457*x[0] + (0.485682016012)*x[1]
+        ref[(1, 2, 0)]=0.650058066457*x_ref[0] + (0.485682016012)*x_ref[1]
+        arg[(1, 2, 1)]=-0.489537514148*x[0] + (-0.64115126883)*x[1]
+        ref[(1, 2, 1)]=-0.489537514148*x_ref[0] + (-0.64115126883)*x_ref[1]
+        arg[(1, 2, 2)]=0.844290551701*x[0] + (-0.921063308416)*x[1]
+        ref[(1, 2, 2)]=0.844290551701*x_ref[0] + (-0.921063308416)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.137264787304*x[2]
+            ref[(0, 0, 0)]+=0.137264787304*x_ref[2]
+            arg[(0, 0, 1)]+=0.570704719325*x[2]
+            ref[(0, 0, 1)]+=0.570704719325*x_ref[2]
+            arg[(0, 0, 2)]+=-0.204580243429*x[2]
+            ref[(0, 0, 2)]+=-0.204580243429*x_ref[2]
+            arg[(0, 1, 0)]+=-0.162058167625*x[2]
+            ref[(0, 1, 0)]+=-0.162058167625*x_ref[2]
+            arg[(0, 1, 1)]+=-0.710323231369*x[2]
+            ref[(0, 1, 1)]+=-0.710323231369*x_ref[2]
+            arg[(0, 1, 2)]+=0.79224282179*x[2]
+            ref[(0, 1, 2)]+=0.79224282179*x_ref[2]
+            arg[(0, 2, 0)]+=0.844753765341*x[2]
+            ref[(0, 2, 0)]+=0.844753765341*x_ref[2]
+            arg[(0, 2, 1)]+=0.854839692325*x[2]
+            ref[(0, 2, 1)]+=0.854839692325*x_ref[2]
+            arg[(0, 2, 2)]+=0.849737420944*x[2]
+            ref[(0, 2, 2)]+=0.849737420944*x_ref[2]
+            arg[(1, 0, 0)]+=0.43485024868*x[2]
+            ref[(1, 0, 0)]+=0.43485024868*x_ref[2]
+            arg[(1, 0, 1)]+=0.976330000691*x[2]
+            ref[(1, 0, 1)]+=0.976330000691*x_ref[2]
+            arg[(1, 0, 2)]+=0.989455058918*x[2]
+            ref[(1, 0, 2)]+=0.989455058918*x_ref[2]
+            arg[(1, 1, 0)]+=0.278873863159*x[2]
+            ref[(1, 1, 0)]+=0.278873863159*x_ref[2]
+            arg[(1, 1, 1)]+=0.0909421880225*x[2]
+            ref[(1, 1, 1)]+=0.0909421880225*x_ref[2]
+            arg[(1, 1, 2)]+=0.911586959659*x[2]
+            ref[(1, 1, 2)]+=0.911586959659*x_ref[2]
+            arg[(1, 2, 0)]+=0.582575470835*x[2]
+            ref[(1, 2, 0)]+=0.582575470835*x_ref[2]
+            arg[(1, 2, 1)]+=0.91206745008*x[2]
+            ref[(1, 2, 1)]+=0.91206745008*x_ref[2]
+            arg[(1, 2, 2)]+=0.932794285395*x[2]
+            ref[(1, 2, 2)]+=0.932794285395*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3, 3),w)
+        ref = Data(0,(4, 4, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=-0.852805932094*x[0] + (-0.930986320116)*x[1]
+        ref[(0, 0, 0, 0)]=-0.852805932094*x_ref[0] + (-0.930986320116)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.794178667899*x[0] + (0.673436509688)*x[1]
+        ref[(0, 0, 0, 1)]=0.794178667899*x_ref[0] + (0.673436509688)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.402110693362*x[0] + (0.0844702074725)*x[1]
+        ref[(0, 0, 0, 2)]=0.402110693362*x_ref[0] + (0.0844702074725)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.553127283158*x[0] + (-0.160263464441)*x[1]
+        ref[(0, 0, 1, 0)]=-0.553127283158*x_ref[0] + (-0.160263464441)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.550633414047*x[0] + (0.250908922837)*x[1]
+        ref[(0, 0, 1, 1)]=0.550633414047*x_ref[0] + (0.250908922837)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.853941300505*x[0] + (-0.296908145949)*x[1]
+        ref[(0, 0, 1, 2)]=0.853941300505*x_ref[0] + (-0.296908145949)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.733678506977*x[0] + (-0.0537974115663)*x[1]
+        ref[(0, 0, 2, 0)]=-0.733678506977*x_ref[0] + (-0.0537974115663)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.674058300132*x[0] + (0.00102819617103)*x[1]
+        ref[(0, 0, 2, 1)]=-0.674058300132*x_ref[0] + (0.00102819617103)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.376279959576*x[0] + (0.0433428918851)*x[1]
+        ref[(0, 0, 2, 2)]=-0.376279959576*x_ref[0] + (0.0433428918851)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.65031376942*x[0] + (0.709701894186)*x[1]
+        ref[(0, 1, 0, 0)]=0.65031376942*x_ref[0] + (0.709701894186)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.607150242272*x[0] + (-0.539925317191)*x[1]
+        ref[(0, 1, 0, 1)]=0.607150242272*x_ref[0] + (-0.539925317191)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.0407485155687*x[0] + (-0.350805884365)*x[1]
+        ref[(0, 1, 0, 2)]=0.0407485155687*x_ref[0] + (-0.350805884365)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.167495858505*x[0] + (-0.0796413035958)*x[1]
+        ref[(0, 1, 1, 0)]=0.167495858505*x_ref[0] + (-0.0796413035958)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.452896210708*x[0] + (-0.222316558847)*x[1]
+        ref[(0, 1, 1, 1)]=-0.452896210708*x_ref[0] + (-0.222316558847)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.949908575133*x[0] + (-0.431534270807)*x[1]
+        ref[(0, 1, 1, 2)]=-0.949908575133*x_ref[0] + (-0.431534270807)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.185487289814*x[0] + (0.66172546278)*x[1]
+        ref[(0, 1, 2, 0)]=0.185487289814*x_ref[0] + (0.66172546278)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.787288204375*x[0] + (-0.489802701585)*x[1]
+        ref[(0, 1, 2, 1)]=0.787288204375*x_ref[0] + (-0.489802701585)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.432612534085*x[0] + (0.373083856956)*x[1]
+        ref[(0, 1, 2, 2)]=0.432612534085*x_ref[0] + (0.373083856956)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.86718573949*x[0] + (-0.94860595174)*x[1]
+        ref[(0, 2, 0, 0)]=-0.86718573949*x_ref[0] + (-0.94860595174)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.143154231221*x[0] + (-0.651450583839)*x[1]
+        ref[(0, 2, 0, 1)]=0.143154231221*x_ref[0] + (-0.651450583839)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.697359625319*x[0] + (0.427218845672)*x[1]
+        ref[(0, 2, 0, 2)]=0.697359625319*x_ref[0] + (0.427218845672)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.813670167876*x[0] + (0.126112213101)*x[1]
+        ref[(0, 2, 1, 0)]=-0.813670167876*x_ref[0] + (0.126112213101)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.00464960155129*x[0] + (0.792738307996)*x[1]
+        ref[(0, 2, 1, 1)]=0.00464960155129*x_ref[0] + (0.792738307996)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.0802139868471*x[0] + (0.906581899886)*x[1]
+        ref[(0, 2, 1, 2)]=0.0802139868471*x_ref[0] + (0.906581899886)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.661251363598*x[0] + (-0.991643106995)*x[1]
+        ref[(0, 2, 2, 0)]=0.661251363598*x_ref[0] + (-0.991643106995)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.907408871323*x[0] + (0.345874139172)*x[1]
+        ref[(0, 2, 2, 1)]=-0.907408871323*x_ref[0] + (0.345874139172)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.5866195148*x[0] + (0.332045998306)*x[1]
+        ref[(0, 2, 2, 2)]=-0.5866195148*x_ref[0] + (0.332045998306)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.015483409348*x[0] + (-0.786314959393)*x[1]
+        ref[(0, 3, 0, 0)]=0.015483409348*x_ref[0] + (-0.786314959393)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.689832652006*x[0] + (-0.137758453303)*x[1]
+        ref[(0, 3, 0, 1)]=0.689832652006*x_ref[0] + (-0.137758453303)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.673633470984*x[0] + (-0.541444443086)*x[1]
+        ref[(0, 3, 0, 2)]=-0.673633470984*x_ref[0] + (-0.541444443086)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.9567969491*x[0] + (-0.879441488105)*x[1]
+        ref[(0, 3, 1, 0)]=0.9567969491*x_ref[0] + (-0.879441488105)*x_ref[1]
+        arg[(0, 3, 1, 1)]=-0.705850358539*x[0] + (-0.599440401366)*x[1]
+        ref[(0, 3, 1, 1)]=-0.705850358539*x_ref[0] + (-0.599440401366)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.727083334638*x[0] + (0.387708903857)*x[1]
+        ref[(0, 3, 1, 2)]=-0.727083334638*x_ref[0] + (0.387708903857)*x_ref[1]
+        arg[(0, 3, 2, 0)]=0.330030702175*x[0] + (-0.470030388366)*x[1]
+        ref[(0, 3, 2, 0)]=0.330030702175*x_ref[0] + (-0.470030388366)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.550147522644*x[0] + (-0.123342179299)*x[1]
+        ref[(0, 3, 2, 1)]=0.550147522644*x_ref[0] + (-0.123342179299)*x_ref[1]
+        arg[(0, 3, 2, 2)]=0.19456620774*x[0] + (-0.0753667220358)*x[1]
+        ref[(0, 3, 2, 2)]=0.19456620774*x_ref[0] + (-0.0753667220358)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.135085273521*x[0] + (0.15134121821)*x[1]
+        ref[(1, 0, 0, 0)]=0.135085273521*x_ref[0] + (0.15134121821)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.965570953823*x[0] + (-0.522239277338)*x[1]
+        ref[(1, 0, 0, 1)]=-0.965570953823*x_ref[0] + (-0.522239277338)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.419389763697*x[0] + (-0.978857311942)*x[1]
+        ref[(1, 0, 0, 2)]=-0.419389763697*x_ref[0] + (-0.978857311942)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.00335499753328*x[0] + (-0.687831911484)*x[1]
+        ref[(1, 0, 1, 0)]=0.00335499753328*x_ref[0] + (-0.687831911484)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.0196323100298*x[0] + (0.939080267695)*x[1]
+        ref[(1, 0, 1, 1)]=0.0196323100298*x_ref[0] + (0.939080267695)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.121659831277*x[0] + (0.753192640878)*x[1]
+        ref[(1, 0, 1, 2)]=0.121659831277*x_ref[0] + (0.753192640878)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.357541789801*x[0] + (0.423518371008)*x[1]
+        ref[(1, 0, 2, 0)]=0.357541789801*x_ref[0] + (0.423518371008)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.883866949007*x[0] + (0.702954664957)*x[1]
+        ref[(1, 0, 2, 1)]=-0.883866949007*x_ref[0] + (0.702954664957)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.54880190222*x[0] + (-0.871543541633)*x[1]
+        ref[(1, 0, 2, 2)]=-0.54880190222*x_ref[0] + (-0.871543541633)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.131532607708*x[0] + (-0.602938288358)*x[1]
+        ref[(1, 1, 0, 0)]=0.131532607708*x_ref[0] + (-0.602938288358)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.815932275297*x[0] + (-0.0709802690671)*x[1]
+        ref[(1, 1, 0, 1)]=-0.815932275297*x_ref[0] + (-0.0709802690671)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.893670935143*x[0] + (0.609009826383)*x[1]
+        ref[(1, 1, 0, 2)]=0.893670935143*x_ref[0] + (0.609009826383)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.181821038914*x[0] + (-0.26198792012)*x[1]
+        ref[(1, 1, 1, 0)]=0.181821038914*x_ref[0] + (-0.26198792012)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.586299532057*x[0] + (-0.725949249668)*x[1]
+        ref[(1, 1, 1, 1)]=0.586299532057*x_ref[0] + (-0.725949249668)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.0391912467163*x[0] + (-0.313162000351)*x[1]
+        ref[(1, 1, 1, 2)]=-0.0391912467163*x_ref[0] + (-0.313162000351)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.325035844516*x[0] + (-0.718558084378)*x[1]
+        ref[(1, 1, 2, 0)]=0.325035844516*x_ref[0] + (-0.718558084378)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.24329544699*x[0] + (-0.733336288556)*x[1]
+        ref[(1, 1, 2, 1)]=-0.24329544699*x_ref[0] + (-0.733336288556)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.476725889364*x[0] + (0.55650487663)*x[1]
+        ref[(1, 1, 2, 2)]=-0.476725889364*x_ref[0] + (0.55650487663)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.210552848024*x[0] + (0.778310425988)*x[1]
+        ref[(1, 2, 0, 0)]=0.210552848024*x_ref[0] + (0.778310425988)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.689527494658*x[0] + (-0.708238380289)*x[1]
+        ref[(1, 2, 0, 1)]=0.689527494658*x_ref[0] + (-0.708238380289)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.880312712856*x[0] + (0.141423590946)*x[1]
+        ref[(1, 2, 0, 2)]=-0.880312712856*x_ref[0] + (0.141423590946)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.902425131282*x[0] + (-0.201930990917)*x[1]
+        ref[(1, 2, 1, 0)]=0.902425131282*x_ref[0] + (-0.201930990917)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.177271586378*x[0] + (0.871658012608)*x[1]
+        ref[(1, 2, 1, 1)]=0.177271586378*x_ref[0] + (0.871658012608)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.769996860206*x[0] + (0.309621662064)*x[1]
+        ref[(1, 2, 1, 2)]=-0.769996860206*x_ref[0] + (0.309621662064)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.623468227598*x[0] + (-0.597481208421)*x[1]
+        ref[(1, 2, 2, 0)]=0.623468227598*x_ref[0] + (-0.597481208421)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.703106083328*x[0] + (-0.645196152136)*x[1]
+        ref[(1, 2, 2, 1)]=-0.703106083328*x_ref[0] + (-0.645196152136)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.0652158517545*x[0] + (0.1808877588)*x[1]
+        ref[(1, 2, 2, 2)]=-0.0652158517545*x_ref[0] + (0.1808877588)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.440779607206*x[0] + (-0.795535927912)*x[1]
+        ref[(1, 3, 0, 0)]=-0.440779607206*x_ref[0] + (-0.795535927912)*x_ref[1]
+        arg[(1, 3, 0, 1)]=0.858764175858*x[0] + (-0.213580819247)*x[1]
+        ref[(1, 3, 0, 1)]=0.858764175858*x_ref[0] + (-0.213580819247)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.488199391656*x[0] + (-0.353274988975)*x[1]
+        ref[(1, 3, 0, 2)]=0.488199391656*x_ref[0] + (-0.353274988975)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.195696665391*x[0] + (-0.198785314864)*x[1]
+        ref[(1, 3, 1, 0)]=-0.195696665391*x_ref[0] + (-0.198785314864)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.640348245369*x[0] + (-0.527680503282)*x[1]
+        ref[(1, 3, 1, 1)]=0.640348245369*x_ref[0] + (-0.527680503282)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.0265698462816*x[0] + (0.309728146396)*x[1]
+        ref[(1, 3, 1, 2)]=0.0265698462816*x_ref[0] + (0.309728146396)*x_ref[1]
+        arg[(1, 3, 2, 0)]=-0.00801906921662*x[0] + (0.674369637155)*x[1]
+        ref[(1, 3, 2, 0)]=-0.00801906921662*x_ref[0] + (0.674369637155)*x_ref[1]
+        arg[(1, 3, 2, 1)]=-0.939523844745*x[0] + (0.98445090143)*x[1]
+        ref[(1, 3, 2, 1)]=-0.939523844745*x_ref[0] + (0.98445090143)*x_ref[1]
+        arg[(1, 3, 2, 2)]=-0.611692119072*x[0] + (-0.00804038346086)*x[1]
+        ref[(1, 3, 2, 2)]=-0.611692119072*x_ref[0] + (-0.00804038346086)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.112441734344*x[0] + (0.522267831028)*x[1]
+        ref[(2, 0, 0, 0)]=0.112441734344*x_ref[0] + (0.522267831028)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.0119964418866*x[0] + (0.857940349705)*x[1]
+        ref[(2, 0, 0, 1)]=-0.0119964418866*x_ref[0] + (0.857940349705)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.229572272248*x[0] + (-0.519557251497)*x[1]
+        ref[(2, 0, 0, 2)]=0.229572272248*x_ref[0] + (-0.519557251497)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.482761437973*x[0] + (-0.849330262933)*x[1]
+        ref[(2, 0, 1, 0)]=-0.482761437973*x_ref[0] + (-0.849330262933)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.857662332562*x[0] + (-0.780380788033)*x[1]
+        ref[(2, 0, 1, 1)]=0.857662332562*x_ref[0] + (-0.780380788033)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.963633663935*x[0] + (0.493906971477)*x[1]
+        ref[(2, 0, 1, 2)]=0.963633663935*x_ref[0] + (0.493906971477)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.68427753626*x[0] + (0.613019517175)*x[1]
+        ref[(2, 0, 2, 0)]=-0.68427753626*x_ref[0] + (0.613019517175)*x_ref[1]
+        arg[(2, 0, 2, 1)]=-0.745304659264*x[0] + (0.658729556878)*x[1]
+        ref[(2, 0, 2, 1)]=-0.745304659264*x_ref[0] + (0.658729556878)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.935155079145*x[0] + (-0.333275948086)*x[1]
+        ref[(2, 0, 2, 2)]=0.935155079145*x_ref[0] + (-0.333275948086)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.93355172476*x[0] + (0.738017661472)*x[1]
+        ref[(2, 1, 0, 0)]=-0.93355172476*x_ref[0] + (0.738017661472)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.201295444092*x[0] + (0.400535888822)*x[1]
+        ref[(2, 1, 0, 1)]=-0.201295444092*x_ref[0] + (0.400535888822)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.0608050583269*x[0] + (0.25096601028)*x[1]
+        ref[(2, 1, 0, 2)]=-0.0608050583269*x_ref[0] + (0.25096601028)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.770490629128*x[0] + (-0.993674267129)*x[1]
+        ref[(2, 1, 1, 0)]=-0.770490629128*x_ref[0] + (-0.993674267129)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.115096981581*x[0] + (-0.613638251284)*x[1]
+        ref[(2, 1, 1, 1)]=-0.115096981581*x_ref[0] + (-0.613638251284)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.857962254159*x[0] + (-0.16674216532)*x[1]
+        ref[(2, 1, 1, 2)]=-0.857962254159*x_ref[0] + (-0.16674216532)*x_ref[1]
+        arg[(2, 1, 2, 0)]=0.218683982679*x[0] + (-0.389364484899)*x[1]
+        ref[(2, 1, 2, 0)]=0.218683982679*x_ref[0] + (-0.389364484899)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.338764429297*x[0] + (0.292175242853)*x[1]
+        ref[(2, 1, 2, 1)]=-0.338764429297*x_ref[0] + (0.292175242853)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.480366490193*x[0] + (-0.560564492226)*x[1]
+        ref[(2, 1, 2, 2)]=-0.480366490193*x_ref[0] + (-0.560564492226)*x_ref[1]
+        arg[(2, 2, 0, 0)]=-0.00846369026793*x[0] + (-0.557976960326)*x[1]
+        ref[(2, 2, 0, 0)]=-0.00846369026793*x_ref[0] + (-0.557976960326)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.696900990921*x[0] + (-0.458000967684)*x[1]
+        ref[(2, 2, 0, 1)]=-0.696900990921*x_ref[0] + (-0.458000967684)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.0697813097839*x[0] + (0.123984169069)*x[1]
+        ref[(2, 2, 0, 2)]=-0.0697813097839*x_ref[0] + (0.123984169069)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.639615881399*x[0] + (0.0265773019396)*x[1]
+        ref[(2, 2, 1, 0)]=-0.639615881399*x_ref[0] + (0.0265773019396)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.703898593984*x[0] + (-0.0927260658625)*x[1]
+        ref[(2, 2, 1, 1)]=0.703898593984*x_ref[0] + (-0.0927260658625)*x_ref[1]
+        arg[(2, 2, 1, 2)]=0.975703895145*x[0] + (0.71973099972)*x[1]
+        ref[(2, 2, 1, 2)]=0.975703895145*x_ref[0] + (0.71973099972)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.559472020573*x[0] + (-0.515325254649)*x[1]
+        ref[(2, 2, 2, 0)]=-0.559472020573*x_ref[0] + (-0.515325254649)*x_ref[1]
+        arg[(2, 2, 2, 1)]=-0.775225705406*x[0] + (0.84714080791)*x[1]
+        ref[(2, 2, 2, 1)]=-0.775225705406*x_ref[0] + (0.84714080791)*x_ref[1]
+        arg[(2, 2, 2, 2)]=-0.915079755242*x[0] + (-0.485300882466)*x[1]
+        ref[(2, 2, 2, 2)]=-0.915079755242*x_ref[0] + (-0.485300882466)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.142765121327*x[0] + (0.178272441902)*x[1]
+        ref[(2, 3, 0, 0)]=0.142765121327*x_ref[0] + (0.178272441902)*x_ref[1]
+        arg[(2, 3, 0, 1)]=-0.869618231352*x[0] + (0.686906595408)*x[1]
+        ref[(2, 3, 0, 1)]=-0.869618231352*x_ref[0] + (0.686906595408)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.139704179207*x[0] + (0.526093559529)*x[1]
+        ref[(2, 3, 0, 2)]=0.139704179207*x_ref[0] + (0.526093559529)*x_ref[1]
+        arg[(2, 3, 1, 0)]=0.338419272414*x[0] + (0.982248669015)*x[1]
+        ref[(2, 3, 1, 0)]=0.338419272414*x_ref[0] + (0.982248669015)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.915286354049*x[0] + (-0.919682211606)*x[1]
+        ref[(2, 3, 1, 1)]=-0.915286354049*x_ref[0] + (-0.919682211606)*x_ref[1]
+        arg[(2, 3, 1, 2)]=0.622216452454*x[0] + (-0.516316475153)*x[1]
+        ref[(2, 3, 1, 2)]=0.622216452454*x_ref[0] + (-0.516316475153)*x_ref[1]
+        arg[(2, 3, 2, 0)]=-0.944004129504*x[0] + (-0.601651929319)*x[1]
+        ref[(2, 3, 2, 0)]=-0.944004129504*x_ref[0] + (-0.601651929319)*x_ref[1]
+        arg[(2, 3, 2, 1)]=-0.392224246111*x[0] + (0.661557078745)*x[1]
+        ref[(2, 3, 2, 1)]=-0.392224246111*x_ref[0] + (0.661557078745)*x_ref[1]
+        arg[(2, 3, 2, 2)]=-0.315156870712*x[0] + (-0.379572821707)*x[1]
+        ref[(2, 3, 2, 2)]=-0.315156870712*x_ref[0] + (-0.379572821707)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.792009362365*x[0] + (0.725497104566)*x[1]
+        ref[(3, 0, 0, 0)]=0.792009362365*x_ref[0] + (0.725497104566)*x_ref[1]
+        arg[(3, 0, 0, 1)]=0.894971320418*x[0] + (-0.906350636027)*x[1]
+        ref[(3, 0, 0, 1)]=0.894971320418*x_ref[0] + (-0.906350636027)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.743664289226*x[0] + (0.644919225435)*x[1]
+        ref[(3, 0, 0, 2)]=-0.743664289226*x_ref[0] + (0.644919225435)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.336315349634*x[0] + (0.300569242374)*x[1]
+        ref[(3, 0, 1, 0)]=0.336315349634*x_ref[0] + (0.300569242374)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.638473246917*x[0] + (0.179936763011)*x[1]
+        ref[(3, 0, 1, 1)]=-0.638473246917*x_ref[0] + (0.179936763011)*x_ref[1]
+        arg[(3, 0, 1, 2)]=0.0136596967709*x[0] + (0.184050575344)*x[1]
+        ref[(3, 0, 1, 2)]=0.0136596967709*x_ref[0] + (0.184050575344)*x_ref[1]
+        arg[(3, 0, 2, 0)]=-0.859756013648*x[0] + (-0.91396842866)*x[1]
+        ref[(3, 0, 2, 0)]=-0.859756013648*x_ref[0] + (-0.91396842866)*x_ref[1]
+        arg[(3, 0, 2, 1)]=-0.286216911357*x[0] + (0.710004625746)*x[1]
+        ref[(3, 0, 2, 1)]=-0.286216911357*x_ref[0] + (0.710004625746)*x_ref[1]
+        arg[(3, 0, 2, 2)]=0.707006098895*x[0] + (0.666771974543)*x[1]
+        ref[(3, 0, 2, 2)]=0.707006098895*x_ref[0] + (0.666771974543)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.0127904127759*x[0] + (-0.562865360157)*x[1]
+        ref[(3, 1, 0, 0)]=-0.0127904127759*x_ref[0] + (-0.562865360157)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.75350804591*x[0] + (0.486384192876)*x[1]
+        ref[(3, 1, 0, 1)]=0.75350804591*x_ref[0] + (0.486384192876)*x_ref[1]
+        arg[(3, 1, 0, 2)]=-0.546273519168*x[0] + (0.561851423897)*x[1]
+        ref[(3, 1, 0, 2)]=-0.546273519168*x_ref[0] + (0.561851423897)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.245944297188*x[0] + (-0.697303629841)*x[1]
+        ref[(3, 1, 1, 0)]=0.245944297188*x_ref[0] + (-0.697303629841)*x_ref[1]
+        arg[(3, 1, 1, 1)]=0.622329340064*x[0] + (-0.39419227384)*x[1]
+        ref[(3, 1, 1, 1)]=0.622329340064*x_ref[0] + (-0.39419227384)*x_ref[1]
+        arg[(3, 1, 1, 2)]=-0.909721432476*x[0] + (0.653025637947)*x[1]
+        ref[(3, 1, 1, 2)]=-0.909721432476*x_ref[0] + (0.653025637947)*x_ref[1]
+        arg[(3, 1, 2, 0)]=0.0983427258227*x[0] + (0.79093880724)*x[1]
+        ref[(3, 1, 2, 0)]=0.0983427258227*x_ref[0] + (0.79093880724)*x_ref[1]
+        arg[(3, 1, 2, 1)]=-0.145136234862*x[0] + (0.407102594344)*x[1]
+        ref[(3, 1, 2, 1)]=-0.145136234862*x_ref[0] + (0.407102594344)*x_ref[1]
+        arg[(3, 1, 2, 2)]=-0.403165722332*x[0] + (-0.360346908275)*x[1]
+        ref[(3, 1, 2, 2)]=-0.403165722332*x_ref[0] + (-0.360346908275)*x_ref[1]
+        arg[(3, 2, 0, 0)]=0.844449717472*x[0] + (0.934086856385)*x[1]
+        ref[(3, 2, 0, 0)]=0.844449717472*x_ref[0] + (0.934086856385)*x_ref[1]
+        arg[(3, 2, 0, 1)]=-0.882560053815*x[0] + (-0.680358524381)*x[1]
+        ref[(3, 2, 0, 1)]=-0.882560053815*x_ref[0] + (-0.680358524381)*x_ref[1]
+        arg[(3, 2, 0, 2)]=0.88942977235*x[0] + (0.290396887434)*x[1]
+        ref[(3, 2, 0, 2)]=0.88942977235*x_ref[0] + (0.290396887434)*x_ref[1]
+        arg[(3, 2, 1, 0)]=-0.369236340673*x[0] + (0.886381748038)*x[1]
+        ref[(3, 2, 1, 0)]=-0.369236340673*x_ref[0] + (0.886381748038)*x_ref[1]
+        arg[(3, 2, 1, 1)]=-0.989671141685*x[0] + (0.000174592492617)*x[1]
+        ref[(3, 2, 1, 1)]=-0.989671141685*x_ref[0] + (0.000174592492617)*x_ref[1]
+        arg[(3, 2, 1, 2)]=0.0954355703528*x[0] + (-0.92305960039)*x[1]
+        ref[(3, 2, 1, 2)]=0.0954355703528*x_ref[0] + (-0.92305960039)*x_ref[1]
+        arg[(3, 2, 2, 0)]=0.0992721881029*x[0] + (0.856732871366)*x[1]
+        ref[(3, 2, 2, 0)]=0.0992721881029*x_ref[0] + (0.856732871366)*x_ref[1]
+        arg[(3, 2, 2, 1)]=-0.534321382218*x[0] + (0.427787088939)*x[1]
+        ref[(3, 2, 2, 1)]=-0.534321382218*x_ref[0] + (0.427787088939)*x_ref[1]
+        arg[(3, 2, 2, 2)]=0.883849717801*x[0] + (0.437073437189)*x[1]
+        ref[(3, 2, 2, 2)]=0.883849717801*x_ref[0] + (0.437073437189)*x_ref[1]
+        arg[(3, 3, 0, 0)]=-0.678830383538*x[0] + (-0.0943117298613)*x[1]
+        ref[(3, 3, 0, 0)]=-0.678830383538*x_ref[0] + (-0.0943117298613)*x_ref[1]
+        arg[(3, 3, 0, 1)]=-0.883284220639*x[0] + (-0.433367643849)*x[1]
+        ref[(3, 3, 0, 1)]=-0.883284220639*x_ref[0] + (-0.433367643849)*x_ref[1]
+        arg[(3, 3, 0, 2)]=0.377477797061*x[0] + (-0.919445768432)*x[1]
+        ref[(3, 3, 0, 2)]=0.377477797061*x_ref[0] + (-0.919445768432)*x_ref[1]
+        arg[(3, 3, 1, 0)]=-0.236324442551*x[0] + (-0.862722178082)*x[1]
+        ref[(3, 3, 1, 0)]=-0.236324442551*x_ref[0] + (-0.862722178082)*x_ref[1]
+        arg[(3, 3, 1, 1)]=0.6209985827*x[0] + (0.51725305066)*x[1]
+        ref[(3, 3, 1, 1)]=0.6209985827*x_ref[0] + (0.51725305066)*x_ref[1]
+        arg[(3, 3, 1, 2)]=0.0539387410665*x[0] + (-0.319959040873)*x[1]
+        ref[(3, 3, 1, 2)]=0.0539387410665*x_ref[0] + (-0.319959040873)*x_ref[1]
+        arg[(3, 3, 2, 0)]=0.957233743719*x[0] + (0.804397532227)*x[1]
+        ref[(3, 3, 2, 0)]=0.957233743719*x_ref[0] + (0.804397532227)*x_ref[1]
+        arg[(3, 3, 2, 1)]=0.366450898117*x[0] + (0.67808035578)*x[1]
+        ref[(3, 3, 2, 1)]=0.366450898117*x_ref[0] + (0.67808035578)*x_ref[1]
+        arg[(3, 3, 2, 2)]=-0.765406790788*x[0] + (0.310902149132)*x[1]
+        ref[(3, 3, 2, 2)]=-0.765406790788*x_ref[0] + (0.310902149132)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.327884466817*x[2]
+            ref[(0, 0, 0, 0)]+=0.327884466817*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.894073534298*x[2]
+            ref[(0, 0, 0, 1)]+=0.894073534298*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.837747751644*x[2]
+            ref[(0, 0, 0, 2)]+=-0.837747751644*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.346286826134*x[2]
+            ref[(0, 0, 1, 0)]+=-0.346286826134*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.394181032312*x[2]
+            ref[(0, 0, 1, 1)]+=-0.394181032312*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.63083526073*x[2]
+            ref[(0, 0, 1, 2)]+=-0.63083526073*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.0630358480512*x[2]
+            ref[(0, 0, 2, 0)]+=-0.0630358480512*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.252084215275*x[2]
+            ref[(0, 0, 2, 1)]+=0.252084215275*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.448767093355*x[2]
+            ref[(0, 0, 2, 2)]+=0.448767093355*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.186703471896*x[2]
+            ref[(0, 1, 0, 0)]+=0.186703471896*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.289470022529*x[2]
+            ref[(0, 1, 0, 1)]+=-0.289470022529*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.844335141904*x[2]
+            ref[(0, 1, 0, 2)]+=-0.844335141904*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.313956814575*x[2]
+            ref[(0, 1, 1, 0)]+=-0.313956814575*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.336095240092*x[2]
+            ref[(0, 1, 1, 1)]+=-0.336095240092*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.993565980005*x[2]
+            ref[(0, 1, 1, 2)]+=-0.993565980005*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.127857053243*x[2]
+            ref[(0, 1, 2, 0)]+=-0.127857053243*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.204479150429*x[2]
+            ref[(0, 1, 2, 1)]+=0.204479150429*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.855606479987*x[2]
+            ref[(0, 1, 2, 2)]+=0.855606479987*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.714561163188*x[2]
+            ref[(0, 2, 0, 0)]+=-0.714561163188*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.0236594874428*x[2]
+            ref[(0, 2, 0, 1)]+=0.0236594874428*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.299471142825*x[2]
+            ref[(0, 2, 0, 2)]+=0.299471142825*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.100387163135*x[2]
+            ref[(0, 2, 1, 0)]+=-0.100387163135*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.114412202932*x[2]
+            ref[(0, 2, 1, 1)]+=-0.114412202932*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.131950373654*x[2]
+            ref[(0, 2, 1, 2)]+=-0.131950373654*x_ref[2]
+            arg[(0, 2, 2, 0)]+=-0.773329655531*x[2]
+            ref[(0, 2, 2, 0)]+=-0.773329655531*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.20659008675*x[2]
+            ref[(0, 2, 2, 1)]+=0.20659008675*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.332843070142*x[2]
+            ref[(0, 2, 2, 2)]+=0.332843070142*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.106645988575*x[2]
+            ref[(0, 3, 0, 0)]+=-0.106645988575*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.613447918659*x[2]
+            ref[(0, 3, 0, 1)]+=0.613447918659*x_ref[2]
+            arg[(0, 3, 0, 2)]+=-0.298601984485*x[2]
+            ref[(0, 3, 0, 2)]+=-0.298601984485*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.353920861981*x[2]
+            ref[(0, 3, 1, 0)]+=0.353920861981*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.586482741274*x[2]
+            ref[(0, 3, 1, 1)]+=0.586482741274*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.558895057978*x[2]
+            ref[(0, 3, 1, 2)]+=0.558895057978*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.337684067716*x[2]
+            ref[(0, 3, 2, 0)]+=-0.337684067716*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.450310606821*x[2]
+            ref[(0, 3, 2, 1)]+=-0.450310606821*x_ref[2]
+            arg[(0, 3, 2, 2)]+=0.0272175703884*x[2]
+            ref[(0, 3, 2, 2)]+=0.0272175703884*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.551886559076*x[2]
+            ref[(1, 0, 0, 0)]+=0.551886559076*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.488074723991*x[2]
+            ref[(1, 0, 0, 1)]+=-0.488074723991*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.169345804599*x[2]
+            ref[(1, 0, 0, 2)]+=-0.169345804599*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.125191355127*x[2]
+            ref[(1, 0, 1, 0)]+=-0.125191355127*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.951556813897*x[2]
+            ref[(1, 0, 1, 1)]+=-0.951556813897*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.169993979292*x[2]
+            ref[(1, 0, 1, 2)]+=-0.169993979292*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.993925336093*x[2]
+            ref[(1, 0, 2, 0)]+=-0.993925336093*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.402358996377*x[2]
+            ref[(1, 0, 2, 1)]+=-0.402358996377*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.245571260663*x[2]
+            ref[(1, 0, 2, 2)]+=-0.245571260663*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.9521379055*x[2]
+            ref[(1, 1, 0, 0)]+=0.9521379055*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.582788757077*x[2]
+            ref[(1, 1, 0, 1)]+=0.582788757077*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.614550113324*x[2]
+            ref[(1, 1, 0, 2)]+=-0.614550113324*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.844658354892*x[2]
+            ref[(1, 1, 1, 0)]+=0.844658354892*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.0978010539877*x[2]
+            ref[(1, 1, 1, 1)]+=0.0978010539877*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.665609330058*x[2]
+            ref[(1, 1, 1, 2)]+=-0.665609330058*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.711955293605*x[2]
+            ref[(1, 1, 2, 0)]+=0.711955293605*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.984182165051*x[2]
+            ref[(1, 1, 2, 1)]+=-0.984182165051*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.00382889302958*x[2]
+            ref[(1, 1, 2, 2)]+=-0.00382889302958*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.705167300004*x[2]
+            ref[(1, 2, 0, 0)]+=-0.705167300004*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.207500667565*x[2]
+            ref[(1, 2, 0, 1)]+=-0.207500667565*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.653898721936*x[2]
+            ref[(1, 2, 0, 2)]+=-0.653898721936*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.800568609562*x[2]
+            ref[(1, 2, 1, 0)]+=0.800568609562*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.709566815113*x[2]
+            ref[(1, 2, 1, 1)]+=0.709566815113*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.67719613025*x[2]
+            ref[(1, 2, 1, 2)]+=-0.67719613025*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.390279583361*x[2]
+            ref[(1, 2, 2, 0)]+=-0.390279583361*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.211106321151*x[2]
+            ref[(1, 2, 2, 1)]+=-0.211106321151*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.0757099454752*x[2]
+            ref[(1, 2, 2, 2)]+=0.0757099454752*x_ref[2]
+            arg[(1, 3, 0, 0)]+=-0.152468595101*x[2]
+            ref[(1, 3, 0, 0)]+=-0.152468595101*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.603988633082*x[2]
+            ref[(1, 3, 0, 1)]+=0.603988633082*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.918029440908*x[2]
+            ref[(1, 3, 0, 2)]+=-0.918029440908*x_ref[2]
+            arg[(1, 3, 1, 0)]+=-0.459403742646*x[2]
+            ref[(1, 3, 1, 0)]+=-0.459403742646*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.707203955603*x[2]
+            ref[(1, 3, 1, 1)]+=0.707203955603*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.9843353086*x[2]
+            ref[(1, 3, 1, 2)]+=0.9843353086*x_ref[2]
+            arg[(1, 3, 2, 0)]+=-0.884326443072*x[2]
+            ref[(1, 3, 2, 0)]+=-0.884326443072*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.911619540037*x[2]
+            ref[(1, 3, 2, 1)]+=0.911619540037*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.318176302859*x[2]
+            ref[(1, 3, 2, 2)]+=0.318176302859*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.71434293054*x[2]
+            ref[(2, 0, 0, 0)]+=-0.71434293054*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.333338066811*x[2]
+            ref[(2, 0, 0, 1)]+=0.333338066811*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.741143628303*x[2]
+            ref[(2, 0, 0, 2)]+=-0.741143628303*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.369883537519*x[2]
+            ref[(2, 0, 1, 0)]+=-0.369883537519*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.236705233382*x[2]
+            ref[(2, 0, 1, 1)]+=0.236705233382*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.675788529894*x[2]
+            ref[(2, 0, 1, 2)]+=0.675788529894*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.926663484083*x[2]
+            ref[(2, 0, 2, 0)]+=0.926663484083*x_ref[2]
+            arg[(2, 0, 2, 1)]+=0.145140897382*x[2]
+            ref[(2, 0, 2, 1)]+=0.145140897382*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.662310260548*x[2]
+            ref[(2, 0, 2, 2)]+=-0.662310260548*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.620714076737*x[2]
+            ref[(2, 1, 0, 0)]+=-0.620714076737*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.848083690107*x[2]
+            ref[(2, 1, 0, 1)]+=-0.848083690107*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.789283531452*x[2]
+            ref[(2, 1, 0, 2)]+=-0.789283531452*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.05363340476*x[2]
+            ref[(2, 1, 1, 0)]+=0.05363340476*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.0206137594184*x[2]
+            ref[(2, 1, 1, 1)]+=-0.0206137594184*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.849862618286*x[2]
+            ref[(2, 1, 1, 2)]+=-0.849862618286*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.646364991547*x[2]
+            ref[(2, 1, 2, 0)]+=-0.646364991547*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.328470410977*x[2]
+            ref[(2, 1, 2, 1)]+=-0.328470410977*x_ref[2]
+            arg[(2, 1, 2, 2)]+=-0.391194575494*x[2]
+            ref[(2, 1, 2, 2)]+=-0.391194575494*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.748420552753*x[2]
+            ref[(2, 2, 0, 0)]+=0.748420552753*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.0578905094598*x[2]
+            ref[(2, 2, 0, 1)]+=0.0578905094598*x_ref[2]
+            arg[(2, 2, 0, 2)]+=0.213994557136*x[2]
+            ref[(2, 2, 0, 2)]+=0.213994557136*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.452836176431*x[2]
+            ref[(2, 2, 1, 0)]+=0.452836176431*x_ref[2]
+            arg[(2, 2, 1, 1)]+=0.476265002554*x[2]
+            ref[(2, 2, 1, 1)]+=0.476265002554*x_ref[2]
+            arg[(2, 2, 1, 2)]+=-0.110158158932*x[2]
+            ref[(2, 2, 1, 2)]+=-0.110158158932*x_ref[2]
+            arg[(2, 2, 2, 0)]+=-0.415106004881*x[2]
+            ref[(2, 2, 2, 0)]+=-0.415106004881*x_ref[2]
+            arg[(2, 2, 2, 1)]+=0.415313215867*x[2]
+            ref[(2, 2, 2, 1)]+=0.415313215867*x_ref[2]
+            arg[(2, 2, 2, 2)]+=0.231048981187*x[2]
+            ref[(2, 2, 2, 2)]+=0.231048981187*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.201199644011*x[2]
+            ref[(2, 3, 0, 0)]+=-0.201199644011*x_ref[2]
+            arg[(2, 3, 0, 1)]+=-0.277987492387*x[2]
+            ref[(2, 3, 0, 1)]+=-0.277987492387*x_ref[2]
+            arg[(2, 3, 0, 2)]+=-0.213723223716*x[2]
+            ref[(2, 3, 0, 2)]+=-0.213723223716*x_ref[2]
+            arg[(2, 3, 1, 0)]+=0.0178662059935*x[2]
+            ref[(2, 3, 1, 0)]+=0.0178662059935*x_ref[2]
+            arg[(2, 3, 1, 1)]+=-0.33838425307*x[2]
+            ref[(2, 3, 1, 1)]+=-0.33838425307*x_ref[2]
+            arg[(2, 3, 1, 2)]+=-0.384253658294*x[2]
+            ref[(2, 3, 1, 2)]+=-0.384253658294*x_ref[2]
+            arg[(2, 3, 2, 0)]+=0.90550247419*x[2]
+            ref[(2, 3, 2, 0)]+=0.90550247419*x_ref[2]
+            arg[(2, 3, 2, 1)]+=-0.376704866231*x[2]
+            ref[(2, 3, 2, 1)]+=-0.376704866231*x_ref[2]
+            arg[(2, 3, 2, 2)]+=-0.862108222437*x[2]
+            ref[(2, 3, 2, 2)]+=-0.862108222437*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.0297487436104*x[2]
+            ref[(3, 0, 0, 0)]+=0.0297487436104*x_ref[2]
+            arg[(3, 0, 0, 1)]+=0.946681127863*x[2]
+            ref[(3, 0, 0, 1)]+=0.946681127863*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.410302852566*x[2]
+            ref[(3, 0, 0, 2)]+=0.410302852566*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.751150763055*x[2]
+            ref[(3, 0, 1, 0)]+=0.751150763055*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.496764948807*x[2]
+            ref[(3, 0, 1, 1)]+=0.496764948807*x_ref[2]
+            arg[(3, 0, 1, 2)]+=-0.228548735907*x[2]
+            ref[(3, 0, 1, 2)]+=-0.228548735907*x_ref[2]
+            arg[(3, 0, 2, 0)]+=0.845859563945*x[2]
+            ref[(3, 0, 2, 0)]+=0.845859563945*x_ref[2]
+            arg[(3, 0, 2, 1)]+=-0.679627623312*x[2]
+            ref[(3, 0, 2, 1)]+=-0.679627623312*x_ref[2]
+            arg[(3, 0, 2, 2)]+=-0.396989864044*x[2]
+            ref[(3, 0, 2, 2)]+=-0.396989864044*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.657210292807*x[2]
+            ref[(3, 1, 0, 0)]+=0.657210292807*x_ref[2]
+            arg[(3, 1, 0, 1)]+=-0.235246288063*x[2]
+            ref[(3, 1, 0, 1)]+=-0.235246288063*x_ref[2]
+            arg[(3, 1, 0, 2)]+=-0.352216941534*x[2]
+            ref[(3, 1, 0, 2)]+=-0.352216941534*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.38326620921*x[2]
+            ref[(3, 1, 1, 0)]+=0.38326620921*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.23566594172*x[2]
+            ref[(3, 1, 1, 1)]+=-0.23566594172*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.525733365114*x[2]
+            ref[(3, 1, 1, 2)]+=0.525733365114*x_ref[2]
+            arg[(3, 1, 2, 0)]+=-0.0920537435048*x[2]
+            ref[(3, 1, 2, 0)]+=-0.0920537435048*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.230355602736*x[2]
+            ref[(3, 1, 2, 1)]+=0.230355602736*x_ref[2]
+            arg[(3, 1, 2, 2)]+=-0.0418694056207*x[2]
+            ref[(3, 1, 2, 2)]+=-0.0418694056207*x_ref[2]
+            arg[(3, 2, 0, 0)]+=0.76363194047*x[2]
+            ref[(3, 2, 0, 0)]+=0.76363194047*x_ref[2]
+            arg[(3, 2, 0, 1)]+=-0.734927990289*x[2]
+            ref[(3, 2, 0, 1)]+=-0.734927990289*x_ref[2]
+            arg[(3, 2, 0, 2)]+=-0.0322853521983*x[2]
+            ref[(3, 2, 0, 2)]+=-0.0322853521983*x_ref[2]
+            arg[(3, 2, 1, 0)]+=-0.2762992726*x[2]
+            ref[(3, 2, 1, 0)]+=-0.2762992726*x_ref[2]
+            arg[(3, 2, 1, 1)]+=0.73920175288*x[2]
+            ref[(3, 2, 1, 1)]+=0.73920175288*x_ref[2]
+            arg[(3, 2, 1, 2)]+=-0.160369740235*x[2]
+            ref[(3, 2, 1, 2)]+=-0.160369740235*x_ref[2]
+            arg[(3, 2, 2, 0)]+=0.213850787992*x[2]
+            ref[(3, 2, 2, 0)]+=0.213850787992*x_ref[2]
+            arg[(3, 2, 2, 1)]+=-0.396287293986*x[2]
+            ref[(3, 2, 2, 1)]+=-0.396287293986*x_ref[2]
+            arg[(3, 2, 2, 2)]+=0.0398503289342*x[2]
+            ref[(3, 2, 2, 2)]+=0.0398503289342*x_ref[2]
+            arg[(3, 3, 0, 0)]+=-0.45307018942*x[2]
+            ref[(3, 3, 0, 0)]+=-0.45307018942*x_ref[2]
+            arg[(3, 3, 0, 1)]+=0.595196286833*x[2]
+            ref[(3, 3, 0, 1)]+=0.595196286833*x_ref[2]
+            arg[(3, 3, 0, 2)]+=0.625927889092*x[2]
+            ref[(3, 3, 0, 2)]+=0.625927889092*x_ref[2]
+            arg[(3, 3, 1, 0)]+=0.87508330772*x[2]
+            ref[(3, 3, 1, 0)]+=0.87508330772*x_ref[2]
+            arg[(3, 3, 1, 1)]+=-0.911805209435*x[2]
+            ref[(3, 3, 1, 1)]+=-0.911805209435*x_ref[2]
+            arg[(3, 3, 1, 2)]+=0.35089460253*x[2]
+            ref[(3, 3, 1, 2)]+=0.35089460253*x_ref[2]
+            arg[(3, 3, 2, 0)]+=0.991265683719*x[2]
+            ref[(3, 3, 2, 0)]+=0.991265683719*x_ref[2]
+            arg[(3, 3, 2, 1)]+=0.571243277813*x[2]
+            ref[(3, 3, 2, 1)]+=0.571243277813*x_ref[2]
+            arg[(3, 3, 2, 2)]+=-0.673869140997*x[2]
+            ref[(3, 3, 2, 2)]+=-0.673869140997*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.911163200466*x[0] + (0.0231775447825)*x[1]
+        ref=0.911163200466*x_ref[0] + (0.0231775447825)*x_ref[1]
+        if dim==3:
+            arg+=(-0.686236478959)*x[2]
+            ref+=(-0.686236478959)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=-0.564518494411*x[0] + (-0.870296773283)*x[1]
+        ref[(0,)]=-0.564518494411*x_ref[0] + (-0.870296773283)*x_ref[1]
+        arg[(1,)]=0.878715674244*x[0] + (-0.84408988823)*x[1]
+        ref[(1,)]=0.878715674244*x_ref[0] + (-0.84408988823)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.044579661078*x[2]
+            ref[(0,)]+=0.044579661078*x_ref[2]
+            arg[(1,)]+=0.724826024909*x[2]
+            ref[(1,)]+=0.724826024909*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=-0.777801351227*x[0] + (0.535187800251)*x[1]
+        ref[(0, 0)]=-0.777801351227*x_ref[0] + (0.535187800251)*x_ref[1]
+        arg[(0, 1)]=0.83627077681*x[0] + (-0.155845726538)*x[1]
+        ref[(0, 1)]=0.83627077681*x_ref[0] + (-0.155845726538)*x_ref[1]
+        arg[(0, 2)]=0.925052612242*x[0] + (0.428700106063)*x[1]
+        ref[(0, 2)]=0.925052612242*x_ref[0] + (0.428700106063)*x_ref[1]
+        arg[(0, 3)]=0.0696882003134*x[0] + (-0.283784995412)*x[1]
+        ref[(0, 3)]=0.0696882003134*x_ref[0] + (-0.283784995412)*x_ref[1]
+        arg[(1, 0)]=0.592399489425*x[0] + (0.127009350933)*x[1]
+        ref[(1, 0)]=0.592399489425*x_ref[0] + (0.127009350933)*x_ref[1]
+        arg[(1, 1)]=-0.723205944372*x[0] + (-0.280032915743)*x[1]
+        ref[(1, 1)]=-0.723205944372*x_ref[0] + (-0.280032915743)*x_ref[1]
+        arg[(1, 2)]=0.373117170054*x[0] + (-0.210670986329)*x[1]
+        ref[(1, 2)]=0.373117170054*x_ref[0] + (-0.210670986329)*x_ref[1]
+        arg[(1, 3)]=0.350414971752*x[0] + (0.762070317479)*x[1]
+        ref[(1, 3)]=0.350414971752*x_ref[0] + (0.762070317479)*x_ref[1]
+        arg[(2, 0)]=0.775915175548*x[0] + (0.700677756571)*x[1]
+        ref[(2, 0)]=0.775915175548*x_ref[0] + (0.700677756571)*x_ref[1]
+        arg[(2, 1)]=0.1691274709*x[0] + (-0.103105338812)*x[1]
+        ref[(2, 1)]=0.1691274709*x_ref[0] + (-0.103105338812)*x_ref[1]
+        arg[(2, 2)]=0.893608513264*x[0] + (-0.850639897468)*x[1]
+        ref[(2, 2)]=0.893608513264*x_ref[0] + (-0.850639897468)*x_ref[1]
+        arg[(2, 3)]=0.990964913983*x[0] + (0.174313862662)*x[1]
+        ref[(2, 3)]=0.990964913983*x_ref[0] + (0.174313862662)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.202530366998*x[2]
+            ref[(0, 0)]+=-0.202530366998*x_ref[2]
+            arg[(0, 1)]+=0.00609918325248*x[2]
+            ref[(0, 1)]+=0.00609918325248*x_ref[2]
+            arg[(0, 2)]+=-0.10963639189*x[2]
+            ref[(0, 2)]+=-0.10963639189*x_ref[2]
+            arg[(0, 3)]+=0.130086771293*x[2]
+            ref[(0, 3)]+=0.130086771293*x_ref[2]
+            arg[(1, 0)]+=-0.252760569354*x[2]
+            ref[(1, 0)]+=-0.252760569354*x_ref[2]
+            arg[(1, 1)]+=-0.463397263064*x[2]
+            ref[(1, 1)]+=-0.463397263064*x_ref[2]
+            arg[(1, 2)]+=0.106737773264*x[2]
+            ref[(1, 2)]+=0.106737773264*x_ref[2]
+            arg[(1, 3)]+=0.468699578434*x[2]
+            ref[(1, 3)]+=0.468699578434*x_ref[2]
+            arg[(2, 0)]+=0.826859466541*x[2]
+            ref[(2, 0)]+=0.826859466541*x_ref[2]
+            arg[(2, 1)]+=-0.832415690406*x[2]
+            ref[(2, 1)]+=-0.832415690406*x_ref[2]
+            arg[(2, 2)]+=-0.211446620553*x[2]
+            ref[(2, 2)]+=-0.211446620553*x_ref[2]
+            arg[(2, 3)]+=0.640764394392*x[2]
+            ref[(2, 3)]+=0.640764394392*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 2),w)
+        ref = Data(0,(3, 4, 2),w_ref)
+        arg[(0, 0, 0)]=-0.538206183488*x[0] + (-0.0174170064663)*x[1]
+        ref[(0, 0, 0)]=-0.538206183488*x_ref[0] + (-0.0174170064663)*x_ref[1]
+        arg[(0, 0, 1)]=-0.357880559581*x[0] + (-0.798150651096)*x[1]
+        ref[(0, 0, 1)]=-0.357880559581*x_ref[0] + (-0.798150651096)*x_ref[1]
+        arg[(0, 1, 0)]=-0.774728588337*x[0] + (0.618566477504)*x[1]
+        ref[(0, 1, 0)]=-0.774728588337*x_ref[0] + (0.618566477504)*x_ref[1]
+        arg[(0, 1, 1)]=-0.681127234294*x[0] + (-0.353297999109)*x[1]
+        ref[(0, 1, 1)]=-0.681127234294*x_ref[0] + (-0.353297999109)*x_ref[1]
+        arg[(0, 2, 0)]=0.191996745321*x[0] + (0.155735075176)*x[1]
+        ref[(0, 2, 0)]=0.191996745321*x_ref[0] + (0.155735075176)*x_ref[1]
+        arg[(0, 2, 1)]=-0.648484459389*x[0] + (0.962572983441)*x[1]
+        ref[(0, 2, 1)]=-0.648484459389*x_ref[0] + (0.962572983441)*x_ref[1]
+        arg[(0, 3, 0)]=0.621544431866*x[0] + (-0.706386735501)*x[1]
+        ref[(0, 3, 0)]=0.621544431866*x_ref[0] + (-0.706386735501)*x_ref[1]
+        arg[(0, 3, 1)]=0.89269635539*x[0] + (-0.968250550072)*x[1]
+        ref[(0, 3, 1)]=0.89269635539*x_ref[0] + (-0.968250550072)*x_ref[1]
+        arg[(1, 0, 0)]=-0.36961644696*x[0] + (-0.708489461762)*x[1]
+        ref[(1, 0, 0)]=-0.36961644696*x_ref[0] + (-0.708489461762)*x_ref[1]
+        arg[(1, 0, 1)]=0.00807203732195*x[0] + (-0.96033118418)*x[1]
+        ref[(1, 0, 1)]=0.00807203732195*x_ref[0] + (-0.96033118418)*x_ref[1]
+        arg[(1, 1, 0)]=-0.331073889153*x[0] + (-0.111357272192)*x[1]
+        ref[(1, 1, 0)]=-0.331073889153*x_ref[0] + (-0.111357272192)*x_ref[1]
+        arg[(1, 1, 1)]=0.897511265339*x[0] + (-0.249035102599)*x[1]
+        ref[(1, 1, 1)]=0.897511265339*x_ref[0] + (-0.249035102599)*x_ref[1]
+        arg[(1, 2, 0)]=0.836802624154*x[0] + (0.562686099213)*x[1]
+        ref[(1, 2, 0)]=0.836802624154*x_ref[0] + (0.562686099213)*x_ref[1]
+        arg[(1, 2, 1)]=0.136723100037*x[0] + (-0.326401609495)*x[1]
+        ref[(1, 2, 1)]=0.136723100037*x_ref[0] + (-0.326401609495)*x_ref[1]
+        arg[(1, 3, 0)]=-0.537411401406*x[0] + (0.62550043651)*x[1]
+        ref[(1, 3, 0)]=-0.537411401406*x_ref[0] + (0.62550043651)*x_ref[1]
+        arg[(1, 3, 1)]=-0.579465959198*x[0] + (0.436865114474)*x[1]
+        ref[(1, 3, 1)]=-0.579465959198*x_ref[0] + (0.436865114474)*x_ref[1]
+        arg[(2, 0, 0)]=-0.750336352919*x[0] + (-0.528604748596)*x[1]
+        ref[(2, 0, 0)]=-0.750336352919*x_ref[0] + (-0.528604748596)*x_ref[1]
+        arg[(2, 0, 1)]=-0.35383944162*x[0] + (-0.359116240619)*x[1]
+        ref[(2, 0, 1)]=-0.35383944162*x_ref[0] + (-0.359116240619)*x_ref[1]
+        arg[(2, 1, 0)]=0.613383044952*x[0] + (0.361772719695)*x[1]
+        ref[(2, 1, 0)]=0.613383044952*x_ref[0] + (0.361772719695)*x_ref[1]
+        arg[(2, 1, 1)]=0.961911537241*x[0] + (-0.48309022094)*x[1]
+        ref[(2, 1, 1)]=0.961911537241*x_ref[0] + (-0.48309022094)*x_ref[1]
+        arg[(2, 2, 0)]=-0.823904015719*x[0] + (-0.733165279256)*x[1]
+        ref[(2, 2, 0)]=-0.823904015719*x_ref[0] + (-0.733165279256)*x_ref[1]
+        arg[(2, 2, 1)]=0.160354183955*x[0] + (-0.382074476845)*x[1]
+        ref[(2, 2, 1)]=0.160354183955*x_ref[0] + (-0.382074476845)*x_ref[1]
+        arg[(2, 3, 0)]=-0.0960289429226*x[0] + (-0.445037265378)*x[1]
+        ref[(2, 3, 0)]=-0.0960289429226*x_ref[0] + (-0.445037265378)*x_ref[1]
+        arg[(2, 3, 1)]=-0.749714628939*x[0] + (-0.947010369218)*x[1]
+        ref[(2, 3, 1)]=-0.749714628939*x_ref[0] + (-0.947010369218)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.438137580196*x[2]
+            ref[(0, 0, 0)]+=-0.438137580196*x_ref[2]
+            arg[(0, 0, 1)]+=0.601952858384*x[2]
+            ref[(0, 0, 1)]+=0.601952858384*x_ref[2]
+            arg[(0, 1, 0)]+=0.24599019303*x[2]
+            ref[(0, 1, 0)]+=0.24599019303*x_ref[2]
+            arg[(0, 1, 1)]+=0.588000828325*x[2]
+            ref[(0, 1, 1)]+=0.588000828325*x_ref[2]
+            arg[(0, 2, 0)]+=0.653234892719*x[2]
+            ref[(0, 2, 0)]+=0.653234892719*x_ref[2]
+            arg[(0, 2, 1)]+=-0.658688867342*x[2]
+            ref[(0, 2, 1)]+=-0.658688867342*x_ref[2]
+            arg[(0, 3, 0)]+=-0.519842605394*x[2]
+            ref[(0, 3, 0)]+=-0.519842605394*x_ref[2]
+            arg[(0, 3, 1)]+=0.312027637251*x[2]
+            ref[(0, 3, 1)]+=0.312027637251*x_ref[2]
+            arg[(1, 0, 0)]+=-0.918733764096*x[2]
+            ref[(1, 0, 0)]+=-0.918733764096*x_ref[2]
+            arg[(1, 0, 1)]+=-0.669136509667*x[2]
+            ref[(1, 0, 1)]+=-0.669136509667*x_ref[2]
+            arg[(1, 1, 0)]+=-0.572443022458*x[2]
+            ref[(1, 1, 0)]+=-0.572443022458*x_ref[2]
+            arg[(1, 1, 1)]+=0.165170772297*x[2]
+            ref[(1, 1, 1)]+=0.165170772297*x_ref[2]
+            arg[(1, 2, 0)]+=0.257114869794*x[2]
+            ref[(1, 2, 0)]+=0.257114869794*x_ref[2]
+            arg[(1, 2, 1)]+=0.951489495849*x[2]
+            ref[(1, 2, 1)]+=0.951489495849*x_ref[2]
+            arg[(1, 3, 0)]+=-0.838281900789*x[2]
+            ref[(1, 3, 0)]+=-0.838281900789*x_ref[2]
+            arg[(1, 3, 1)]+=0.976031902722*x[2]
+            ref[(1, 3, 1)]+=0.976031902722*x_ref[2]
+            arg[(2, 0, 0)]+=-0.890802486836*x[2]
+            ref[(2, 0, 0)]+=-0.890802486836*x_ref[2]
+            arg[(2, 0, 1)]+=-0.356842238215*x[2]
+            ref[(2, 0, 1)]+=-0.356842238215*x_ref[2]
+            arg[(2, 1, 0)]+=-0.797163982842*x[2]
+            ref[(2, 1, 0)]+=-0.797163982842*x_ref[2]
+            arg[(2, 1, 1)]+=0.904529583405*x[2]
+            ref[(2, 1, 1)]+=0.904529583405*x_ref[2]
+            arg[(2, 2, 0)]+=0.0432774152547*x[2]
+            ref[(2, 2, 0)]+=0.0432774152547*x_ref[2]
+            arg[(2, 2, 1)]+=-0.220820409857*x[2]
+            ref[(2, 2, 1)]+=-0.220820409857*x_ref[2]
+            arg[(2, 3, 0)]+=-0.590132327094*x[2]
+            ref[(2, 3, 0)]+=-0.590132327094*x_ref[2]
+            arg[(2, 3, 1)]+=-0.0895908373345*x[2]
+            ref[(2, 3, 1)]+=-0.0895908373345*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedContinuousFunction
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedContinuousFunction(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2, 4),w)
+        ref = Data(0,(3, 3, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.0339705803038*x[0] + (-0.0370468272831)*x[1]
+        ref[(0, 0, 0, 0)]=-0.0339705803038*x_ref[0] + (-0.0370468272831)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.529927210651*x[0] + (-0.315674055035)*x[1]
+        ref[(0, 0, 0, 1)]=-0.529927210651*x_ref[0] + (-0.315674055035)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.102057731321*x[0] + (0.377479461811)*x[1]
+        ref[(0, 0, 0, 2)]=0.102057731321*x_ref[0] + (0.377479461811)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.265567879415*x[0] + (-0.578789403566)*x[1]
+        ref[(0, 0, 0, 3)]=0.265567879415*x_ref[0] + (-0.578789403566)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.139764146526*x[0] + (0.935041899172)*x[1]
+        ref[(0, 0, 1, 0)]=0.139764146526*x_ref[0] + (0.935041899172)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.799496013552*x[0] + (-0.0761871943872)*x[1]
+        ref[(0, 0, 1, 1)]=0.799496013552*x_ref[0] + (-0.0761871943872)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.0357319918032*x[0] + (-0.38006039803)*x[1]
+        ref[(0, 0, 1, 2)]=-0.0357319918032*x_ref[0] + (-0.38006039803)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.69533120723*x[0] + (-0.192352121032)*x[1]
+        ref[(0, 0, 1, 3)]=0.69533120723*x_ref[0] + (-0.192352121032)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.972008960586*x[0] + (0.604330384838)*x[1]
+        ref[(0, 1, 0, 0)]=0.972008960586*x_ref[0] + (0.604330384838)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.236415653359*x[0] + (0.817592129007)*x[1]
+        ref[(0, 1, 0, 1)]=-0.236415653359*x_ref[0] + (0.817592129007)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.504070869069*x[0] + (0.38827622022)*x[1]
+        ref[(0, 1, 0, 2)]=0.504070869069*x_ref[0] + (0.38827622022)*x_ref[1]
+        arg[(0, 1, 0, 3)]=-0.51316713145*x[0] + (-0.726869293271)*x[1]
+        ref[(0, 1, 0, 3)]=-0.51316713145*x_ref[0] + (-0.726869293271)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.572651834791*x[0] + (-0.0425745858866)*x[1]
+        ref[(0, 1, 1, 0)]=0.572651834791*x_ref[0] + (-0.0425745858866)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.27112509409*x[0] + (-0.0291537353017)*x[1]
+        ref[(0, 1, 1, 1)]=0.27112509409*x_ref[0] + (-0.0291537353017)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.82881422165*x[0] + (0.725098123407)*x[1]
+        ref[(0, 1, 1, 2)]=-0.82881422165*x_ref[0] + (0.725098123407)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.288148129397*x[0] + (-0.158107241945)*x[1]
+        ref[(0, 1, 1, 3)]=-0.288148129397*x_ref[0] + (-0.158107241945)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.0583221250048*x[0] + (-0.218835149806)*x[1]
+        ref[(0, 2, 0, 0)]=-0.0583221250048*x_ref[0] + (-0.218835149806)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.104896343383*x[0] + (-0.290817124141)*x[1]
+        ref[(0, 2, 0, 1)]=0.104896343383*x_ref[0] + (-0.290817124141)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.433839729288*x[0] + (-0.699601464275)*x[1]
+        ref[(0, 2, 0, 2)]=0.433839729288*x_ref[0] + (-0.699601464275)*x_ref[1]
+        arg[(0, 2, 0, 3)]=-0.649227285363*x[0] + (0.222426866483)*x[1]
+        ref[(0, 2, 0, 3)]=-0.649227285363*x_ref[0] + (0.222426866483)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.236781614303*x[0] + (-0.980351832597)*x[1]
+        ref[(0, 2, 1, 0)]=-0.236781614303*x_ref[0] + (-0.980351832597)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.823854641762*x[0] + (0.0958001073971)*x[1]
+        ref[(0, 2, 1, 1)]=-0.823854641762*x_ref[0] + (0.0958001073971)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.949415703657*x[0] + (0.86252640249)*x[1]
+        ref[(0, 2, 1, 2)]=-0.949415703657*x_ref[0] + (0.86252640249)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.602008346955*x[0] + (-0.695221468662)*x[1]
+        ref[(0, 2, 1, 3)]=0.602008346955*x_ref[0] + (-0.695221468662)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.0889263481385*x[0] + (0.151144753841)*x[1]
+        ref[(1, 0, 0, 0)]=-0.0889263481385*x_ref[0] + (0.151144753841)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.732355267671*x[0] + (-0.176253072178)*x[1]
+        ref[(1, 0, 0, 1)]=-0.732355267671*x_ref[0] + (-0.176253072178)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.0143015245641*x[0] + (-0.874465677692)*x[1]
+        ref[(1, 0, 0, 2)]=-0.0143015245641*x_ref[0] + (-0.874465677692)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.969941982469*x[0] + (-0.809668083671)*x[1]
+        ref[(1, 0, 0, 3)]=-0.969941982469*x_ref[0] + (-0.809668083671)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.793215930718*x[0] + (-0.241901342479)*x[1]
+        ref[(1, 0, 1, 0)]=-0.793215930718*x_ref[0] + (-0.241901342479)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.790599916533*x[0] + (0.946059285637)*x[1]
+        ref[(1, 0, 1, 1)]=0.790599916533*x_ref[0] + (0.946059285637)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.649785507755*x[0] + (-0.304430896043)*x[1]
+        ref[(1, 0, 1, 2)]=0.649785507755*x_ref[0] + (-0.304430896043)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.369599675664*x[0] + (0.843469721676)*x[1]
+        ref[(1, 0, 1, 3)]=0.369599675664*x_ref[0] + (0.843469721676)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.378146356869*x[0] + (0.710829576427)*x[1]
+        ref[(1, 1, 0, 0)]=0.378146356869*x_ref[0] + (0.710829576427)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.180398815054*x[0] + (0.0395304726598)*x[1]
+        ref[(1, 1, 0, 1)]=-0.180398815054*x_ref[0] + (0.0395304726598)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.967196619118*x[0] + (0.656034533564)*x[1]
+        ref[(1, 1, 0, 2)]=0.967196619118*x_ref[0] + (0.656034533564)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.960635205779*x[0] + (-0.72071722455)*x[1]
+        ref[(1, 1, 0, 3)]=0.960635205779*x_ref[0] + (-0.72071722455)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.99772273672*x[0] + (0.340054097163)*x[1]
+        ref[(1, 1, 1, 0)]=-0.99772273672*x_ref[0] + (0.340054097163)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.575583683475*x[0] + (-0.0417277546541)*x[1]
+        ref[(1, 1, 1, 1)]=0.575583683475*x_ref[0] + (-0.0417277546541)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.871724585438*x[0] + (-0.260398543253)*x[1]
+        ref[(1, 1, 1, 2)]=-0.871724585438*x_ref[0] + (-0.260398543253)*x_ref[1]
+        arg[(1, 1, 1, 3)]=-0.77145510109*x[0] + (-0.046159336813)*x[1]
+        ref[(1, 1, 1, 3)]=-0.77145510109*x_ref[0] + (-0.046159336813)*x_ref[1]
+        arg[(1, 2, 0, 0)]=0.99958950381*x[0] + (0.555500808364)*x[1]
+        ref[(1, 2, 0, 0)]=0.99958950381*x_ref[0] + (0.555500808364)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.721901045815*x[0] + (-0.954297639938)*x[1]
+        ref[(1, 2, 0, 1)]=0.721901045815*x_ref[0] + (-0.954297639938)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.165522949184*x[0] + (-0.0180140438982)*x[1]
+        ref[(1, 2, 0, 2)]=0.165522949184*x_ref[0] + (-0.0180140438982)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.127298086556*x[0] + (-0.675032877624)*x[1]
+        ref[(1, 2, 0, 3)]=0.127298086556*x_ref[0] + (-0.675032877624)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.982298526695*x[0] + (-0.0804793132413)*x[1]
+        ref[(1, 2, 1, 0)]=-0.982298526695*x_ref[0] + (-0.0804793132413)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.97693199817*x[0] + (-0.984075099641)*x[1]
+        ref[(1, 2, 1, 1)]=0.97693199817*x_ref[0] + (-0.984075099641)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.888377210222*x[0] + (0.397274578984)*x[1]
+        ref[(1, 2, 1, 2)]=-0.888377210222*x_ref[0] + (0.397274578984)*x_ref[1]
+        arg[(1, 2, 1, 3)]=-0.224795094153*x[0] + (0.0584561314873)*x[1]
+        ref[(1, 2, 1, 3)]=-0.224795094153*x_ref[0] + (0.0584561314873)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.9111491689*x[0] + (-0.345438019932)*x[1]
+        ref[(2, 0, 0, 0)]=-0.9111491689*x_ref[0] + (-0.345438019932)*x_ref[1]
+        arg[(2, 0, 0, 1)]=-0.773387064848*x[0] + (-0.491239712886)*x[1]
+        ref[(2, 0, 0, 1)]=-0.773387064848*x_ref[0] + (-0.491239712886)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.145246759737*x[0] + (0.669931064073)*x[1]
+        ref[(2, 0, 0, 2)]=0.145246759737*x_ref[0] + (0.669931064073)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.531402633021*x[0] + (0.322229423789)*x[1]
+        ref[(2, 0, 0, 3)]=-0.531402633021*x_ref[0] + (0.322229423789)*x_ref[1]
+        arg[(2, 0, 1, 0)]=0.37507756776*x[0] + (-0.652533757776)*x[1]
+        ref[(2, 0, 1, 0)]=0.37507756776*x_ref[0] + (-0.652533757776)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.871754569386*x[0] + (0.477948566897)*x[1]
+        ref[(2, 0, 1, 1)]=-0.871754569386*x_ref[0] + (0.477948566897)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.615956092704*x[0] + (0.532521298334)*x[1]
+        ref[(2, 0, 1, 2)]=0.615956092704*x_ref[0] + (0.532521298334)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.232518376422*x[0] + (-0.191014024775)*x[1]
+        ref[(2, 0, 1, 3)]=-0.232518376422*x_ref[0] + (-0.191014024775)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.905485066591*x[0] + (-0.760328343836)*x[1]
+        ref[(2, 1, 0, 0)]=0.905485066591*x_ref[0] + (-0.760328343836)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.525791823004*x[0] + (0.345616546203)*x[1]
+        ref[(2, 1, 0, 1)]=0.525791823004*x_ref[0] + (0.345616546203)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.791110338924*x[0] + (-0.254569695351)*x[1]
+        ref[(2, 1, 0, 2)]=-0.791110338924*x_ref[0] + (-0.254569695351)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.557233568704*x[0] + (0.563764196705)*x[1]
+        ref[(2, 1, 0, 3)]=-0.557233568704*x_ref[0] + (0.563764196705)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.989252890969*x[0] + (-0.375264236171)*x[1]
+        ref[(2, 1, 1, 0)]=0.989252890969*x_ref[0] + (-0.375264236171)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.599984696798*x[0] + (-0.870145607538)*x[1]
+        ref[(2, 1, 1, 1)]=-0.599984696798*x_ref[0] + (-0.870145607538)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.722703044148*x[0] + (0.402622625878)*x[1]
+        ref[(2, 1, 1, 2)]=0.722703044148*x_ref[0] + (0.402622625878)*x_ref[1]
+        arg[(2, 1, 1, 3)]=-0.25424254267*x[0] + (-0.973032614994)*x[1]
+        ref[(2, 1, 1, 3)]=-0.25424254267*x_ref[0] + (-0.973032614994)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.999934364207*x[0] + (-0.672839186746)*x[1]
+        ref[(2, 2, 0, 0)]=0.999934364207*x_ref[0] + (-0.672839186746)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.980063565921*x[0] + (0.835609350273)*x[1]
+        ref[(2, 2, 0, 1)]=0.980063565921*x_ref[0] + (0.835609350273)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.659665138749*x[0] + (-0.734636669594)*x[1]
+        ref[(2, 2, 0, 2)]=0.659665138749*x_ref[0] + (-0.734636669594)*x_ref[1]
+        arg[(2, 2, 0, 3)]=-0.59229211015*x[0] + (-0.277634121682)*x[1]
+        ref[(2, 2, 0, 3)]=-0.59229211015*x_ref[0] + (-0.277634121682)*x_ref[1]
+        arg[(2, 2, 1, 0)]=0.802903145405*x[0] + (0.794575813816)*x[1]
+        ref[(2, 2, 1, 0)]=0.802903145405*x_ref[0] + (0.794575813816)*x_ref[1]
+        arg[(2, 2, 1, 1)]=-0.710643078543*x[0] + (-0.600906732443)*x[1]
+        ref[(2, 2, 1, 1)]=-0.710643078543*x_ref[0] + (-0.600906732443)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.137268693797*x[0] + (0.926812150007)*x[1]
+        ref[(2, 2, 1, 2)]=-0.137268693797*x_ref[0] + (0.926812150007)*x_ref[1]
+        arg[(2, 2, 1, 3)]=0.237002154475*x[0] + (0.437970498936)*x[1]
+        ref[(2, 2, 1, 3)]=0.237002154475*x_ref[0] + (0.437970498936)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.539796635667*x[2]
+            ref[(0, 0, 0, 0)]+=-0.539796635667*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.749987680723*x[2]
+            ref[(0, 0, 0, 1)]+=-0.749987680723*x_ref[2]
+            arg[(0, 0, 0, 2)]+=-0.411203246296*x[2]
+            ref[(0, 0, 0, 2)]+=-0.411203246296*x_ref[2]
+            arg[(0, 0, 0, 3)]+=-0.770549725619*x[2]
+            ref[(0, 0, 0, 3)]+=-0.770549725619*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.0156715034995*x[2]
+            ref[(0, 0, 1, 0)]+=-0.0156715034995*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.0561304969464*x[2]
+            ref[(0, 0, 1, 1)]+=-0.0561304969464*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.357158913622*x[2]
+            ref[(0, 0, 1, 2)]+=0.357158913622*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.211437244393*x[2]
+            ref[(0, 0, 1, 3)]+=-0.211437244393*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.692843125531*x[2]
+            ref[(0, 1, 0, 0)]+=0.692843125531*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.573376166027*x[2]
+            ref[(0, 1, 0, 1)]+=-0.573376166027*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.612573856298*x[2]
+            ref[(0, 1, 0, 2)]+=0.612573856298*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.765180296697*x[2]
+            ref[(0, 1, 0, 3)]+=-0.765180296697*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.940377447034*x[2]
+            ref[(0, 1, 1, 0)]+=-0.940377447034*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.466892518682*x[2]
+            ref[(0, 1, 1, 1)]+=-0.466892518682*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.153101471081*x[2]
+            ref[(0, 1, 1, 2)]+=-0.153101471081*x_ref[2]
+            arg[(0, 1, 1, 3)]+=0.5306116706*x[2]
+            ref[(0, 1, 1, 3)]+=0.5306116706*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.651606252532*x[2]
+            ref[(0, 2, 0, 0)]+=0.651606252532*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.39327307001*x[2]
+            ref[(0, 2, 0, 1)]+=-0.39327307001*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.559857876442*x[2]
+            ref[(0, 2, 0, 2)]+=0.559857876442*x_ref[2]
+            arg[(0, 2, 0, 3)]+=0.665755176655*x[2]
+            ref[(0, 2, 0, 3)]+=0.665755176655*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.100583640891*x[2]
+            ref[(0, 2, 1, 0)]+=0.100583640891*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.452888759435*x[2]
+            ref[(0, 2, 1, 1)]+=0.452888759435*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.309875099298*x[2]
+            ref[(0, 2, 1, 2)]+=0.309875099298*x_ref[2]
+            arg[(0, 2, 1, 3)]+=-0.754626399424*x[2]
+            ref[(0, 2, 1, 3)]+=-0.754626399424*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.982937604441*x[2]
+            ref[(1, 0, 0, 0)]+=-0.982937604441*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.233885059835*x[2]
+            ref[(1, 0, 0, 1)]+=-0.233885059835*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.099263063802*x[2]
+            ref[(1, 0, 0, 2)]+=-0.099263063802*x_ref[2]
+            arg[(1, 0, 0, 3)]+=-0.292299643411*x[2]
+            ref[(1, 0, 0, 3)]+=-0.292299643411*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.164750831972*x[2]
+            ref[(1, 0, 1, 0)]+=-0.164750831972*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.558605150482*x[2]
+            ref[(1, 0, 1, 1)]+=0.558605150482*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.235031270809*x[2]
+            ref[(1, 0, 1, 2)]+=0.235031270809*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.651452737066*x[2]
+            ref[(1, 0, 1, 3)]+=0.651452737066*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.731280807627*x[2]
+            ref[(1, 1, 0, 0)]+=0.731280807627*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.592252322243*x[2]
+            ref[(1, 1, 0, 1)]+=0.592252322243*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.183786608839*x[2]
+            ref[(1, 1, 0, 2)]+=-0.183786608839*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.306784735257*x[2]
+            ref[(1, 1, 0, 3)]+=-0.306784735257*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.473718272428*x[2]
+            ref[(1, 1, 1, 0)]+=-0.473718272428*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.172946482138*x[2]
+            ref[(1, 1, 1, 1)]+=0.172946482138*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.276475007755*x[2]
+            ref[(1, 1, 1, 2)]+=-0.276475007755*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.148228963888*x[2]
+            ref[(1, 1, 1, 3)]+=-0.148228963888*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.267861401191*x[2]
+            ref[(1, 2, 0, 0)]+=0.267861401191*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.909497205779*x[2]
+            ref[(1, 2, 0, 1)]+=0.909497205779*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.412039782723*x[2]
+            ref[(1, 2, 0, 2)]+=-0.412039782723*x_ref[2]
+            arg[(1, 2, 0, 3)]+=-0.905088747098*x[2]
+            ref[(1, 2, 0, 3)]+=-0.905088747098*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.695256701213*x[2]
+            ref[(1, 2, 1, 0)]+=-0.695256701213*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.133777317667*x[2]
+            ref[(1, 2, 1, 1)]+=0.133777317667*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.727582849307*x[2]
+            ref[(1, 2, 1, 2)]+=0.727582849307*x_ref[2]
+            arg[(1, 2, 1, 3)]+=0.98431709626*x[2]
+            ref[(1, 2, 1, 3)]+=0.98431709626*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.748287677814*x[2]
+            ref[(2, 0, 0, 0)]+=-0.748287677814*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.351037678848*x[2]
+            ref[(2, 0, 0, 1)]+=-0.351037678848*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.812486667755*x[2]
+            ref[(2, 0, 0, 2)]+=0.812486667755*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.154289845249*x[2]
+            ref[(2, 0, 0, 3)]+=-0.154289845249*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.257743633506*x[2]
+            ref[(2, 0, 1, 0)]+=-0.257743633506*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.569853363955*x[2]
+            ref[(2, 0, 1, 1)]+=-0.569853363955*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.347621629036*x[2]
+            ref[(2, 0, 1, 2)]+=0.347621629036*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.189812561516*x[2]
+            ref[(2, 0, 1, 3)]+=0.189812561516*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.356016639057*x[2]
+            ref[(2, 1, 0, 0)]+=0.356016639057*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.97194270757*x[2]
+            ref[(2, 1, 0, 1)]+=-0.97194270757*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.316239565158*x[2]
+            ref[(2, 1, 0, 2)]+=0.316239565158*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.858841440431*x[2]
+            ref[(2, 1, 0, 3)]+=-0.858841440431*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.337427032535*x[2]
+            ref[(2, 1, 1, 0)]+=0.337427032535*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.426074795819*x[2]
+            ref[(2, 1, 1, 1)]+=-0.426074795819*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.125375296453*x[2]
+            ref[(2, 1, 1, 2)]+=-0.125375296453*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.295663281036*x[2]
+            ref[(2, 1, 1, 3)]+=0.295663281036*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.930491682109*x[2]
+            ref[(2, 2, 0, 0)]+=0.930491682109*x_ref[2]
+            arg[(2, 2, 0, 1)]+=0.764973187926*x[2]
+            ref[(2, 2, 0, 1)]+=0.764973187926*x_ref[2]
+            arg[(2, 2, 0, 2)]+=0.0413592010137*x[2]
+            ref[(2, 2, 0, 2)]+=0.0413592010137*x_ref[2]
+            arg[(2, 2, 0, 3)]+=-0.8609198351*x[2]
+            ref[(2, 2, 0, 3)]+=-0.8609198351*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.0365010876546*x[2]
+            ref[(2, 2, 1, 0)]+=0.0365010876546*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.710851923884*x[2]
+            ref[(2, 2, 1, 1)]+=-0.710851923884*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.948879557288*x[2]
+            ref[(2, 2, 1, 2)]+=0.948879557288*x_ref[2]
+            arg[(2, 2, 1, 3)]+=0.386404656918*x[2]
+            ref[(2, 2, 1, 3)]+=0.386404656918*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Test_Util_Interpolation(Test_Util_Interpolation_noContact):
+    RES_TOL=1.e-8
+
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.366267785453-0.211649661019j)*x[0]**o + ((-0.966429432128+0.254832986117j))*x[0] + ((0.691224307345+0.358052434321j))*x[1]**o + ((-0.0278893987409-0.765603463263j))*x[1]
+        ref=(0.366267785453-0.211649661019j)*x_ref[0]**o + ((-0.966429432128+0.254832986117j))*x_ref[0] + ((0.691224307345+0.358052434321j))*x_ref[1]**o + ((-0.0278893987409-0.765603463263j))*x_ref[1]
+        if dim==3:
+            arg+=((0.654537288537+0.623159659544j))*x[2]**o + ((0.598426373831+0.466366282024j))*x[2]
+            ref+=((0.654537288537+0.623159659544j))*x_ref[2]**o + ((0.598426373831+0.466366282024j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.0848565664668-0.671290979288j)*x[0]**o + ((-0.478263346064+0.595268770463j))*x[0] + ((-0.756520890005+0.756159929437j))*x[1]**o + ((0.194946860468+0.26030301842j))*x[1]
+        ref[(0,)]=(0.0848565664668-0.671290979288j)*x_ref[0]**o + ((-0.478263346064+0.595268770463j))*x_ref[0] + ((-0.756520890005+0.756159929437j))*x_ref[1]**o + ((0.194946860468+0.26030301842j))*x_ref[1]
+        arg[(1,)]=(0.153343168727-0.861281102682j)*x[0]**o + ((-0.660362508816+0.0733936629371j))*x[0] + ((-0.166446124726+0.357849867586j))*x[1]**o + ((-0.669053125014+0.0344882757253j))*x[1]
+        ref[(1,)]=(0.153343168727-0.861281102682j)*x_ref[0]**o + ((-0.660362508816+0.0733936629371j))*x_ref[0] + ((-0.166446124726+0.357849867586j))*x_ref[1]**o + ((-0.669053125014+0.0344882757253j))*x_ref[1]
+        arg[(2,)]=(0.223918785351+0.777687453953j)*x[0]**o + ((-0.593289732568-0.514958671796j))*x[0] + ((0.994735929432-0.77042940499j))*x[1]**o + ((-0.878112822109-0.67392777727j))*x[1]
+        ref[(2,)]=(0.223918785351+0.777687453953j)*x_ref[0]**o + ((-0.593289732568-0.514958671796j))*x_ref[0] + ((0.994735929432-0.77042940499j))*x_ref[1]**o + ((-0.878112822109-0.67392777727j))*x_ref[1]
+        arg[(3,)]=(-0.834464486747+0.386038500903j)*x[0]**o + ((0.639548086156-0.517334872371j))*x[0] + ((-0.194137202005+0.727079289527j))*x[1]**o + ((0.0974918579881-0.393221639425j))*x[1]
+        ref[(3,)]=(-0.834464486747+0.386038500903j)*x_ref[0]**o + ((0.639548086156-0.517334872371j))*x_ref[0] + ((-0.194137202005+0.727079289527j))*x_ref[1]**o + ((0.0974918579881-0.393221639425j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.193845884975+0.644697259349j)*x[2]**o + ((-0.384115910322-0.236443581396j))*x[2]
+            ref[(0,)]+=(-0.193845884975+0.644697259349j)*x_ref[2]**o + ((-0.384115910322-0.236443581396j))*x_ref[2]
+            arg[(1,)]+=(-0.578552322206-0.154129645678j)*x[2]**o + ((0.0363462290283+0.924197859518j))*x[2]
+            ref[(1,)]+=(-0.578552322206-0.154129645678j)*x_ref[2]**o + ((0.0363462290283+0.924197859518j))*x_ref[2]
+            arg[(2,)]+=(-0.205086064361+0.860503492609j)*x[2]**o + ((-0.639222584406+0.413572318956j))*x[2]
+            ref[(2,)]+=(-0.205086064361+0.860503492609j)*x_ref[2]**o + ((-0.639222584406+0.413572318956j))*x_ref[2]
+            arg[(3,)]+=(-0.825804107237+0.701856524646j)*x[2]**o + ((-0.614171366082-0.304854872406j))*x[2]
+            ref[(3,)]+=(-0.825804107237+0.701856524646j)*x_ref[2]**o + ((-0.614171366082-0.304854872406j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=(-0.625777086837+0.600248664474j)*x[0]**o + ((-0.150997818846+0.764910017901j))*x[0] + ((0.991819727306+0.304506617864j))*x[1]**o + ((-0.552236946263+0.596957647733j))*x[1]
+        ref[(0, 0)]=(-0.625777086837+0.600248664474j)*x_ref[0]**o + ((-0.150997818846+0.764910017901j))*x_ref[0] + ((0.991819727306+0.304506617864j))*x_ref[1]**o + ((-0.552236946263+0.596957647733j))*x_ref[1]
+        arg[(0, 1)]=(0.378612840184-0.776701943225j)*x[0]**o + ((-0.306589101369+0.280635978911j))*x[0] + ((-0.785996515984+0.837416700395j))*x[1]**o + ((-0.945667025153+0.937641031297j))*x[1]
+        ref[(0, 1)]=(0.378612840184-0.776701943225j)*x_ref[0]**o + ((-0.306589101369+0.280635978911j))*x_ref[0] + ((-0.785996515984+0.837416700395j))*x_ref[1]**o + ((-0.945667025153+0.937641031297j))*x_ref[1]
+        arg[(0, 2)]=(0.000387714579155+0.779397638885j)*x[0]**o + ((0.246210796745-0.264324614489j))*x[0] + ((0.255592315216+0.7914463834j))*x[1]**o + ((-0.0349521408552+0.961355614161j))*x[1]
+        ref[(0, 2)]=(0.000387714579155+0.779397638885j)*x_ref[0]**o + ((0.246210796745-0.264324614489j))*x_ref[0] + ((0.255592315216+0.7914463834j))*x_ref[1]**o + ((-0.0349521408552+0.961355614161j))*x_ref[1]
+        arg[(0, 3)]=(0.233099807279-0.0226130934497j)*x[0]**o + ((-0.931152538142+0.638308490666j))*x[0] + ((-0.0891133144686+0.575507597254j))*x[1]**o + ((0.161980532278-0.670895248859j))*x[1]
+        ref[(0, 3)]=(0.233099807279-0.0226130934497j)*x_ref[0]**o + ((-0.931152538142+0.638308490666j))*x_ref[0] + ((-0.0891133144686+0.575507597254j))*x_ref[1]**o + ((0.161980532278-0.670895248859j))*x_ref[1]
+        arg[(1, 0)]=(0.576751851169+0.158153088414j)*x[0]**o + ((0.332233813931-0.657389105057j))*x[0] + ((-0.350383483342+0.523418481386j))*x[1]**o + ((-0.756380894276-0.198314401927j))*x[1]
+        ref[(1, 0)]=(0.576751851169+0.158153088414j)*x_ref[0]**o + ((0.332233813931-0.657389105057j))*x_ref[0] + ((-0.350383483342+0.523418481386j))*x_ref[1]**o + ((-0.756380894276-0.198314401927j))*x_ref[1]
+        arg[(1, 1)]=(0.463151958789-0.631243995708j)*x[0]**o + ((0.666376795682+0.980784858556j))*x[0] + ((0.560541705155-0.894201496844j))*x[1]**o + ((-0.219643699618-0.583464593206j))*x[1]
+        ref[(1, 1)]=(0.463151958789-0.631243995708j)*x_ref[0]**o + ((0.666376795682+0.980784858556j))*x_ref[0] + ((0.560541705155-0.894201496844j))*x_ref[1]**o + ((-0.219643699618-0.583464593206j))*x_ref[1]
+        arg[(1, 2)]=(-0.881718409316+0.431024713643j)*x[0]**o + ((0.589774770085+0.944935066771j))*x[0] + ((-0.0122325179308-0.492248142545j))*x[1]**o + ((-0.820069830251-0.165646975253j))*x[1]
+        ref[(1, 2)]=(-0.881718409316+0.431024713643j)*x_ref[0]**o + ((0.589774770085+0.944935066771j))*x_ref[0] + ((-0.0122325179308-0.492248142545j))*x_ref[1]**o + ((-0.820069830251-0.165646975253j))*x_ref[1]
+        arg[(1, 3)]=(0.65790171146-0.212558161285j)*x[0]**o + ((0.712398433773-0.263013028742j))*x[0] + ((-0.0956887239175-0.602011068132j))*x[1]**o + ((-0.983257467775+0.796561663149j))*x[1]
+        ref[(1, 3)]=(0.65790171146-0.212558161285j)*x_ref[0]**o + ((0.712398433773-0.263013028742j))*x_ref[0] + ((-0.0956887239175-0.602011068132j))*x_ref[1]**o + ((-0.983257467775+0.796561663149j))*x_ref[1]
+        arg[(2, 0)]=(-0.951638661002-0.413230093029j)*x[0]**o + ((0.10268695053-0.158490261208j))*x[0] + ((0.591528219798+0.826812664638j))*x[1]**o + ((0.85644044365+0.266144912809j))*x[1]
+        ref[(2, 0)]=(-0.951638661002-0.413230093029j)*x_ref[0]**o + ((0.10268695053-0.158490261208j))*x_ref[0] + ((0.591528219798+0.826812664638j))*x_ref[1]**o + ((0.85644044365+0.266144912809j))*x_ref[1]
+        arg[(2, 1)]=(0.412052548866+0.242533506625j)*x[0]**o + ((-0.0949107981345+0.698348818986j))*x[0] + ((0.171604064165-0.471154203882j))*x[1]**o + ((-0.133385824002-0.481939769765j))*x[1]
+        ref[(2, 1)]=(0.412052548866+0.242533506625j)*x_ref[0]**o + ((-0.0949107981345+0.698348818986j))*x_ref[0] + ((0.171604064165-0.471154203882j))*x_ref[1]**o + ((-0.133385824002-0.481939769765j))*x_ref[1]
+        arg[(2, 2)]=(-0.965387163622-0.380981131774j)*x[0]**o + ((0.320965933979+0.868962006926j))*x[0] + ((0.591592446142+0.189135900221j))*x[1]**o + ((-0.129259919217+0.58752281925j))*x[1]
+        ref[(2, 2)]=(-0.965387163622-0.380981131774j)*x_ref[0]**o + ((0.320965933979+0.868962006926j))*x_ref[0] + ((0.591592446142+0.189135900221j))*x_ref[1]**o + ((-0.129259919217+0.58752281925j))*x_ref[1]
+        arg[(2, 3)]=(-0.65858685367-0.314658585675j)*x[0]**o + ((0.0246471726706+0.0143908383051j))*x[0] + ((-0.0101793606141-0.0544272060816j))*x[1]**o + ((-0.0314806507528+0.631628559251j))*x[1]
+        ref[(2, 3)]=(-0.65858685367-0.314658585675j)*x_ref[0]**o + ((0.0246471726706+0.0143908383051j))*x_ref[0] + ((-0.0101793606141-0.0544272060816j))*x_ref[1]**o + ((-0.0314806507528+0.631628559251j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.603940232798+0.304367368316j)*x[2]**o + ((0.9591945976-0.588131015081j))*x[2]
+            ref[(0, 0)]+=(-0.603940232798+0.304367368316j)*x_ref[2]**o + ((0.9591945976-0.588131015081j))*x_ref[2]
+            arg[(0, 1)]+=(-0.625397890291-0.86041534392j)*x[2]**o + ((0.26223691701+0.423530041385j))*x[2]
+            ref[(0, 1)]+=(-0.625397890291-0.86041534392j)*x_ref[2]**o + ((0.26223691701+0.423530041385j))*x_ref[2]
+            arg[(0, 2)]+=(-0.0824562900944+0.580252873081j)*x[2]**o + ((-0.396782744494+0.29396094066j))*x[2]
+            ref[(0, 2)]+=(-0.0824562900944+0.580252873081j)*x_ref[2]**o + ((-0.396782744494+0.29396094066j))*x_ref[2]
+            arg[(0, 3)]+=(0.190489457954-0.0450963572611j)*x[2]**o + ((0.800470826492-0.17657978436j))*x[2]
+            ref[(0, 3)]+=(0.190489457954-0.0450963572611j)*x_ref[2]**o + ((0.800470826492-0.17657978436j))*x_ref[2]
+            arg[(1, 0)]+=(-0.423733732566-0.68219169692j)*x[2]**o + ((-0.555087725522+0.246388597247j))*x[2]
+            ref[(1, 0)]+=(-0.423733732566-0.68219169692j)*x_ref[2]**o + ((-0.555087725522+0.246388597247j))*x_ref[2]
+            arg[(1, 1)]+=(-0.735181905304-0.879827192874j)*x[2]**o + ((-0.250281642458+0.121773265258j))*x[2]
+            ref[(1, 1)]+=(-0.735181905304-0.879827192874j)*x_ref[2]**o + ((-0.250281642458+0.121773265258j))*x_ref[2]
+            arg[(1, 2)]+=(0.374910767779-0.368995010437j)*x[2]**o + ((-0.385226145584+0.0669417413465j))*x[2]
+            ref[(1, 2)]+=(0.374910767779-0.368995010437j)*x_ref[2]**o + ((-0.385226145584+0.0669417413465j))*x_ref[2]
+            arg[(1, 3)]+=(0.334001679198+0.955856863202j)*x[2]**o + ((0.299124883562-0.767048199473j))*x[2]
+            ref[(1, 3)]+=(0.334001679198+0.955856863202j)*x_ref[2]**o + ((0.299124883562-0.767048199473j))*x_ref[2]
+            arg[(2, 0)]+=(0.104135300109-0.426556661252j)*x[2]**o + ((0.605626397646+0.0611202678171j))*x[2]
+            ref[(2, 0)]+=(0.104135300109-0.426556661252j)*x_ref[2]**o + ((0.605626397646+0.0611202678171j))*x_ref[2]
+            arg[(2, 1)]+=(-0.633712736148+0.433004927848j)*x[2]**o + ((-0.937592570534-0.811375186733j))*x[2]
+            ref[(2, 1)]+=(-0.633712736148+0.433004927848j)*x_ref[2]**o + ((-0.937592570534-0.811375186733j))*x_ref[2]
+            arg[(2, 2)]+=(-0.686764756896+0.558277410086j)*x[2]**o + ((0.378451480408+0.930189188644j))*x[2]
+            ref[(2, 2)]+=(-0.686764756896+0.558277410086j)*x_ref[2]**o + ((0.378451480408+0.930189188644j))*x_ref[2]
+            arg[(2, 3)]+=(-0.0155500689+0.853433534004j)*x[2]**o + ((-0.472470849125-0.501369720035j))*x[2]
+            ref[(2, 3)]+=(-0.0155500689+0.853433534004j)*x_ref[2]**o + ((-0.472470849125-0.501369720035j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 3),w)
+        ref = Data(0,(3, 2, 3),w_ref)
+        arg[(0, 0, 0)]=(0.841958973288-0.931122103599j)*x[0]**o + ((-0.640040736832-0.23693502113j))*x[0] + ((0.0749402606208-0.656654344841j))*x[1]**o + ((-0.196905596106+0.98137376162j))*x[1]
+        ref[(0, 0, 0)]=(0.841958973288-0.931122103599j)*x_ref[0]**o + ((-0.640040736832-0.23693502113j))*x_ref[0] + ((0.0749402606208-0.656654344841j))*x_ref[1]**o + ((-0.196905596106+0.98137376162j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.488605626819-0.0053604287459j)*x[0]**o + ((0.358748040655-0.127821154715j))*x[0] + ((-0.48905577362-0.79551805008j))*x[1]**o + ((0.144506933331+0.0657856956126j))*x[1]
+        ref[(0, 0, 1)]=(0.488605626819-0.0053604287459j)*x_ref[0]**o + ((0.358748040655-0.127821154715j))*x_ref[0] + ((-0.48905577362-0.79551805008j))*x_ref[1]**o + ((0.144506933331+0.0657856956126j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.100259580069+0.808939767451j)*x[0]**o + ((-0.388842350633+0.94262715739j))*x[0] + ((0.501179205153-0.586901789234j))*x[1]**o + ((0.535775845653+0.852444352018j))*x[1]
+        ref[(0, 0, 2)]=(-0.100259580069+0.808939767451j)*x_ref[0]**o + ((-0.388842350633+0.94262715739j))*x_ref[0] + ((0.501179205153-0.586901789234j))*x_ref[1]**o + ((0.535775845653+0.852444352018j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.767628640623-0.249339970269j)*x[0]**o + ((-0.457312660597+0.27605761646j))*x[0] + ((-0.417881524182+0.273831845528j))*x[1]**o + ((0.00939531219059+0.55227488251j))*x[1]
+        ref[(0, 1, 0)]=(-0.767628640623-0.249339970269j)*x_ref[0]**o + ((-0.457312660597+0.27605761646j))*x_ref[0] + ((-0.417881524182+0.273831845528j))*x_ref[1]**o + ((0.00939531219059+0.55227488251j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.343032334352-0.505447501346j)*x[0]**o + ((-0.470561685548-0.455152521774j))*x[0] + ((0.466099229522-0.0734489728347j))*x[1]**o + ((-0.277415465028+0.331802000935j))*x[1]
+        ref[(0, 1, 1)]=(0.343032334352-0.505447501346j)*x_ref[0]**o + ((-0.470561685548-0.455152521774j))*x_ref[0] + ((0.466099229522-0.0734489728347j))*x_ref[1]**o + ((-0.277415465028+0.331802000935j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.893881072763-0.489670080605j)*x[0]**o + ((-0.463361433424+0.471660135823j))*x[0] + ((-0.999292274956+0.395169994581j))*x[1]**o + ((0.0172064939639-0.125519021669j))*x[1]
+        ref[(0, 1, 2)]=(0.893881072763-0.489670080605j)*x_ref[0]**o + ((-0.463361433424+0.471660135823j))*x_ref[0] + ((-0.999292274956+0.395169994581j))*x_ref[1]**o + ((0.0172064939639-0.125519021669j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.880572494668-0.966442313803j)*x[0]**o + ((0.78751154555+0.995378240865j))*x[0] + ((-0.968519461394-0.232889653509j))*x[1]**o + ((0.771413837009-0.825576496769j))*x[1]
+        ref[(1, 0, 0)]=(0.880572494668-0.966442313803j)*x_ref[0]**o + ((0.78751154555+0.995378240865j))*x_ref[0] + ((-0.968519461394-0.232889653509j))*x_ref[1]**o + ((0.771413837009-0.825576496769j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.990576947611+0.425286268282j)*x[0]**o + ((-0.545823515464+0.811911590911j))*x[0] + ((-0.222695079811+0.994089519239j))*x[1]**o + ((0.0280441193104+0.605134713571j))*x[1]
+        ref[(1, 0, 1)]=(0.990576947611+0.425286268282j)*x_ref[0]**o + ((-0.545823515464+0.811911590911j))*x_ref[0] + ((-0.222695079811+0.994089519239j))*x_ref[1]**o + ((0.0280441193104+0.605134713571j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.431092814791-0.308219573823j)*x[0]**o + ((-0.179013473619-0.112565670663j))*x[0] + ((0.660099666322-0.848485578854j))*x[1]**o + ((-0.582317097414-0.551847371159j))*x[1]
+        ref[(1, 0, 2)]=(0.431092814791-0.308219573823j)*x_ref[0]**o + ((-0.179013473619-0.112565670663j))*x_ref[0] + ((0.660099666322-0.848485578854j))*x_ref[1]**o + ((-0.582317097414-0.551847371159j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.21642473-0.0185778268903j)*x[0]**o + ((0.138935575365+0.207201755282j))*x[0] + ((-0.495182538364+0.961133789656j))*x[1]**o + ((0.377941995571-0.716052922437j))*x[1]
+        ref[(1, 1, 0)]=(-0.21642473-0.0185778268903j)*x_ref[0]**o + ((0.138935575365+0.207201755282j))*x_ref[0] + ((-0.495182538364+0.961133789656j))*x_ref[1]**o + ((0.377941995571-0.716052922437j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.466322866348+0.685171527677j)*x[0]**o + ((-0.526924609443+0.464163491781j))*x[0] + ((0.749970261305-0.237123235972j))*x[1]**o + ((0.796406752731+0.255506225865j))*x[1]
+        ref[(1, 1, 1)]=(-0.466322866348+0.685171527677j)*x_ref[0]**o + ((-0.526924609443+0.464163491781j))*x_ref[0] + ((0.749970261305-0.237123235972j))*x_ref[1]**o + ((0.796406752731+0.255506225865j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.361523931943-0.577708170363j)*x[0]**o + ((0.215731401732+0.443286319124j))*x[0] + ((-0.0129892854582-0.989129267763j))*x[1]**o + ((0.908846176317-0.536514467869j))*x[1]
+        ref[(1, 1, 2)]=(0.361523931943-0.577708170363j)*x_ref[0]**o + ((0.215731401732+0.443286319124j))*x_ref[0] + ((-0.0129892854582-0.989129267763j))*x_ref[1]**o + ((0.908846176317-0.536514467869j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.244803747403-0.543847077208j)*x[0]**o + ((-0.796404671534+0.550886523689j))*x[0] + ((-0.434046247674-0.254169302891j))*x[1]**o + ((0.730886792676+0.291655928238j))*x[1]
+        ref[(2, 0, 0)]=(-0.244803747403-0.543847077208j)*x_ref[0]**o + ((-0.796404671534+0.550886523689j))*x_ref[0] + ((-0.434046247674-0.254169302891j))*x_ref[1]**o + ((0.730886792676+0.291655928238j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.76520343491-0.623433563681j)*x[0]**o + ((0.324851469617-0.495917022519j))*x[0] + ((-0.786787705765+0.371692994179j))*x[1]**o + ((0.332733859404-0.976818870152j))*x[1]
+        ref[(2, 0, 1)]=(0.76520343491-0.623433563681j)*x_ref[0]**o + ((0.324851469617-0.495917022519j))*x_ref[0] + ((-0.786787705765+0.371692994179j))*x_ref[1]**o + ((0.332733859404-0.976818870152j))*x_ref[1]
+        arg[(2, 0, 2)]=(0.447883209835-0.899769282494j)*x[0]**o + ((0.547273571904+0.726183999541j))*x[0] + ((0.596883648871-0.694004131484j))*x[1]**o + ((0.0349190261032+0.271445192152j))*x[1]
+        ref[(2, 0, 2)]=(0.447883209835-0.899769282494j)*x_ref[0]**o + ((0.547273571904+0.726183999541j))*x_ref[0] + ((0.596883648871-0.694004131484j))*x_ref[1]**o + ((0.0349190261032+0.271445192152j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.0750363126043-0.730897222023j)*x[0]**o + ((0.942073041454-0.690290874807j))*x[0] + ((0.596685342405+0.994158954932j))*x[1]**o + ((0.160641807252+0.507951032261j))*x[1]
+        ref[(2, 1, 0)]=(0.0750363126043-0.730897222023j)*x_ref[0]**o + ((0.942073041454-0.690290874807j))*x_ref[0] + ((0.596685342405+0.994158954932j))*x_ref[1]**o + ((0.160641807252+0.507951032261j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.0324552774448-0.972448097951j)*x[0]**o + ((0.858962085854-0.909898398831j))*x[0] + ((-0.418052604657+0.0687300421447j))*x[1]**o + ((-0.819337847371-0.556295469289j))*x[1]
+        ref[(2, 1, 1)]=(0.0324552774448-0.972448097951j)*x_ref[0]**o + ((0.858962085854-0.909898398831j))*x_ref[0] + ((-0.418052604657+0.0687300421447j))*x_ref[1]**o + ((-0.819337847371-0.556295469289j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.287838860514+0.355099528433j)*x[0]**o + ((0.351218346345+0.235539131581j))*x[0] + ((-0.955668798312-0.323044320836j))*x[1]**o + ((0.391498766055+0.856813765282j))*x[1]
+        ref[(2, 1, 2)]=(0.287838860514+0.355099528433j)*x_ref[0]**o + ((0.351218346345+0.235539131581j))*x_ref[0] + ((-0.955668798312-0.323044320836j))*x_ref[1]**o + ((0.391498766055+0.856813765282j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.877585986323+0.575725696891j)*x[2]**o + ((0.134351211473-0.544992115374j))*x[2]
+            ref[(0, 0, 0)]+=(-0.877585986323+0.575725696891j)*x_ref[2]**o + ((0.134351211473-0.544992115374j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.037032124754+0.773530577813j)*x[2]**o + ((-0.0124188981267-0.794118953695j))*x[2]
+            ref[(0, 0, 1)]+=(0.037032124754+0.773530577813j)*x_ref[2]**o + ((-0.0124188981267-0.794118953695j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.31558109581+0.908882184818j)*x[2]**o + ((-0.0610340236637-0.65059996913j))*x[2]
+            ref[(0, 0, 2)]+=(-0.31558109581+0.908882184818j)*x_ref[2]**o + ((-0.0610340236637-0.65059996913j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.183739189775+0.389405559825j)*x[2]**o + ((0.0172253735432-0.0448639719972j))*x[2]
+            ref[(0, 1, 0)]+=(0.183739189775+0.389405559825j)*x_ref[2]**o + ((0.0172253735432-0.0448639719972j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.834170097289-0.519148134315j)*x[2]**o + ((-0.87608531374-0.360041314921j))*x[2]
+            ref[(0, 1, 1)]+=(0.834170097289-0.519148134315j)*x_ref[2]**o + ((-0.87608531374-0.360041314921j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.949480774549-0.476233950631j)*x[2]**o + ((-0.250281598743-0.924539546591j))*x[2]
+            ref[(0, 1, 2)]+=(-0.949480774549-0.476233950631j)*x_ref[2]**o + ((-0.250281598743-0.924539546591j))*x_ref[2]
+            arg[(1, 0, 0)]+=(-0.543165073187+0.593714163665j)*x[2]**o + ((-0.158339481312+0.170893134037j))*x[2]
+            ref[(1, 0, 0)]+=(-0.543165073187+0.593714163665j)*x_ref[2]**o + ((-0.158339481312+0.170893134037j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.118842625504+0.113461590508j)*x[2]**o + ((-0.35976006759+0.770065711139j))*x[2]
+            ref[(1, 0, 1)]+=(0.118842625504+0.113461590508j)*x_ref[2]**o + ((-0.35976006759+0.770065711139j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.187229528766-0.0871853680988j)*x[2]**o + ((0.792265227392+0.171417120799j))*x[2]
+            ref[(1, 0, 2)]+=(-0.187229528766-0.0871853680988j)*x_ref[2]**o + ((0.792265227392+0.171417120799j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.910731002996+0.621438489847j)*x[2]**o + ((-0.787236384737+0.757530005268j))*x[2]
+            ref[(1, 1, 0)]+=(-0.910731002996+0.621438489847j)*x_ref[2]**o + ((-0.787236384737+0.757530005268j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.775297755123+0.987985647442j)*x[2]**o + ((-0.361932746031+0.557469548822j))*x[2]
+            ref[(1, 1, 1)]+=(0.775297755123+0.987985647442j)*x_ref[2]**o + ((-0.361932746031+0.557469548822j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.481456353553-0.868432054011j)*x[2]**o + ((0.861881461057+0.357965203691j))*x[2]
+            ref[(1, 1, 2)]+=(0.481456353553-0.868432054011j)*x_ref[2]**o + ((0.861881461057+0.357965203691j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.178727562898-0.597908986521j)*x[2]**o + ((-0.920704643977-0.888922518913j))*x[2]
+            ref[(2, 0, 0)]+=(0.178727562898-0.597908986521j)*x_ref[2]**o + ((-0.920704643977-0.888922518913j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.129057032106-0.66279934161j)*x[2]**o + ((0.119069721637-0.793315887697j))*x[2]
+            ref[(2, 0, 1)]+=(0.129057032106-0.66279934161j)*x_ref[2]**o + ((0.119069721637-0.793315887697j))*x_ref[2]
+            arg[(2, 0, 2)]+=(-0.218937834017+0.399240111284j)*x[2]**o + ((-0.85827091749-0.847767873405j))*x[2]
+            ref[(2, 0, 2)]+=(-0.218937834017+0.399240111284j)*x_ref[2]**o + ((-0.85827091749-0.847767873405j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.0590423592011-0.812803175458j)*x[2]**o + ((0.621747102312+0.50409286524j))*x[2]
+            ref[(2, 1, 0)]+=(-0.0590423592011-0.812803175458j)*x_ref[2]**o + ((0.621747102312+0.50409286524j))*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.698925995356+0.34419841487j)*x[2]**o + ((0.327808677167-0.810638930723j))*x[2]
+            ref[(2, 1, 1)]+=(-0.698925995356+0.34419841487j)*x_ref[2]**o + ((0.327808677167-0.810638930723j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.650763923888-0.840508962433j)*x[2]**o + ((-0.818686524406+0.179655856624j))*x[2]
+            ref[(2, 1, 2)]+=(-0.650763923888-0.840508962433j)*x_ref[2]**o + ((-0.818686524406+0.179655856624j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 3, 3),w)
+        ref = Data(0,(3, 3, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.976804524097-0.751850152013j)*x[0]**o + ((0.837061660701+0.497969400256j))*x[0] + ((0.935856488392+0.371530744061j))*x[1]**o + ((0.743298306391+0.21791109809j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.976804524097-0.751850152013j)*x_ref[0]**o + ((0.837061660701+0.497969400256j))*x_ref[0] + ((0.935856488392+0.371530744061j))*x_ref[1]**o + ((0.743298306391+0.21791109809j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.567549021005-0.956929088428j)*x[0]**o + ((-0.563289564425-0.435095287846j))*x[0] + ((0.622289976748-0.464464018348j))*x[1]**o + ((-0.412502948569+0.986368915081j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.567549021005-0.956929088428j)*x_ref[0]**o + ((-0.563289564425-0.435095287846j))*x_ref[0] + ((0.622289976748-0.464464018348j))*x_ref[1]**o + ((-0.412502948569+0.986368915081j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.0814120625517+0.419045448824j)*x[0]**o + ((-0.33076002818-0.377669435292j))*x[0] + ((-0.579940138604-0.856019061609j))*x[1]**o + ((0.729097313273+0.57917837224j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.0814120625517+0.419045448824j)*x_ref[0]**o + ((-0.33076002818-0.377669435292j))*x_ref[0] + ((-0.579940138604-0.856019061609j))*x_ref[1]**o + ((0.729097313273+0.57917837224j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.189199649116-0.819022066839j)*x[0]**o + ((-0.194445325727-0.248244454265j))*x[0] + ((0.704458687116+0.59151174152j))*x[1]**o + ((0.731769696629+0.912131397889j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.189199649116-0.819022066839j)*x_ref[0]**o + ((-0.194445325727-0.248244454265j))*x_ref[0] + ((0.704458687116+0.59151174152j))*x_ref[1]**o + ((0.731769696629+0.912131397889j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.825014588688-0.913155821048j)*x[0]**o + ((-0.462179073964+0.869041864068j))*x[0] + ((0.790111234928-0.338833444476j))*x[1]**o + ((0.228945396869+0.506316913352j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.825014588688-0.913155821048j)*x_ref[0]**o + ((-0.462179073964+0.869041864068j))*x_ref[0] + ((0.790111234928-0.338833444476j))*x_ref[1]**o + ((0.228945396869+0.506316913352j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.305738798612+0.912871218207j)*x[0]**o + ((-0.639676505412-0.0218206766183j))*x[0] + ((0.88756167951+0.171930291176j))*x[1]**o + ((0.879071180769+0.829465322111j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.305738798612+0.912871218207j)*x_ref[0]**o + ((-0.639676505412-0.0218206766183j))*x_ref[0] + ((0.88756167951+0.171930291176j))*x_ref[1]**o + ((0.879071180769+0.829465322111j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.787168007761-0.775360879414j)*x[0]**o + ((0.369155189625-0.878693601883j))*x[0] + ((-0.163243123921+0.784536717017j))*x[1]**o + ((-0.705198158144+0.231264436784j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.787168007761-0.775360879414j)*x_ref[0]**o + ((0.369155189625-0.878693601883j))*x_ref[0] + ((-0.163243123921+0.784536717017j))*x_ref[1]**o + ((-0.705198158144+0.231264436784j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.319866125515+0.671059982969j)*x[0]**o + ((-0.644655294563+0.847331568853j))*x[0] + ((0.448241343586-0.400744957243j))*x[1]**o + ((-0.291305519101+0.849329315635j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.319866125515+0.671059982969j)*x_ref[0]**o + ((-0.644655294563+0.847331568853j))*x_ref[0] + ((0.448241343586-0.400744957243j))*x_ref[1]**o + ((-0.291305519101+0.849329315635j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(-0.862739191053+0.268194536479j)*x[0]**o + ((0.372854148908+0.744500855103j))*x[0] + ((-0.0675885286186-0.799041058227j))*x[1]**o + ((0.970654996922-0.514252329821j))*x[1]
+        ref[(0, 0, 2, 2)]=(-0.862739191053+0.268194536479j)*x_ref[0]**o + ((0.372854148908+0.744500855103j))*x_ref[0] + ((-0.0675885286186-0.799041058227j))*x_ref[1]**o + ((0.970654996922-0.514252329821j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.344027954531-0.526630247178j)*x[0]**o + ((0.645331755811-0.480063489512j))*x[0] + ((0.520744452474+0.522527582896j))*x[1]**o + ((-0.695584004597-0.890715647914j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.344027954531-0.526630247178j)*x_ref[0]**o + ((0.645331755811-0.480063489512j))*x_ref[0] + ((0.520744452474+0.522527582896j))*x_ref[1]**o + ((-0.695584004597-0.890715647914j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.145937924907-0.647518783531j)*x[0]**o + ((-0.83118883586-0.0867651956233j))*x[0] + ((-0.35369542133+0.496339786529j))*x[1]**o + ((0.190700029638-0.100192062142j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.145937924907-0.647518783531j)*x_ref[0]**o + ((-0.83118883586-0.0867651956233j))*x_ref[0] + ((-0.35369542133+0.496339786529j))*x_ref[1]**o + ((0.190700029638-0.100192062142j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.502865699075+0.543506977969j)*x[0]**o + ((0.662842867211+0.234177940967j))*x[0] + ((-0.579559778822+0.459267390284j))*x[1]**o + ((0.279534975776+0.287925391038j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.502865699075+0.543506977969j)*x_ref[0]**o + ((0.662842867211+0.234177940967j))*x_ref[0] + ((-0.579559778822+0.459267390284j))*x_ref[1]**o + ((0.279534975776+0.287925391038j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.428012760145-0.976519879152j)*x[0]**o + ((0.594599932384+0.252402097278j))*x[0] + ((-0.337251634626+0.985130876916j))*x[1]**o + ((0.60885992526+0.189491328463j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.428012760145-0.976519879152j)*x_ref[0]**o + ((0.594599932384+0.252402097278j))*x_ref[0] + ((-0.337251634626+0.985130876916j))*x_ref[1]**o + ((0.60885992526+0.189491328463j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.671506289158+0.794708518078j)*x[0]**o + ((0.127773960004-0.165632023689j))*x[0] + ((0.741053888035-0.479380600579j))*x[1]**o + ((0.187813431631+0.478679022862j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.671506289158+0.794708518078j)*x_ref[0]**o + ((0.127773960004-0.165632023689j))*x_ref[0] + ((0.741053888035-0.479380600579j))*x_ref[1]**o + ((0.187813431631+0.478679022862j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.812984155613+0.366092377697j)*x[0]**o + ((0.738916559221+0.231120748049j))*x[0] + ((0.417040341748-0.817276647906j))*x[1]**o + ((-0.474520786891+0.0992821969705j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.812984155613+0.366092377697j)*x_ref[0]**o + ((0.738916559221+0.231120748049j))*x_ref[0] + ((0.417040341748-0.817276647906j))*x_ref[1]**o + ((-0.474520786891+0.0992821969705j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.78064481955-0.160376059737j)*x[0]**o + ((0.508181690038-0.996758599077j))*x[0] + ((0.488881911748+0.443412603815j))*x[1]**o + ((-0.873350455672-0.942385495117j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.78064481955-0.160376059737j)*x_ref[0]**o + ((0.508181690038-0.996758599077j))*x_ref[0] + ((0.488881911748+0.443412603815j))*x_ref[1]**o + ((-0.873350455672-0.942385495117j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.42874007034+0.568082804788j)*x[0]**o + ((0.376907126415+0.133641219346j))*x[0] + ((-0.70111929474-0.977212587597j))*x[1]**o + ((-0.164521271181-0.0182118199158j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.42874007034+0.568082804788j)*x_ref[0]**o + ((0.376907126415+0.133641219346j))*x_ref[0] + ((-0.70111929474-0.977212587597j))*x_ref[1]**o + ((-0.164521271181-0.0182118199158j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.736922868529-0.599789344174j)*x[0]**o + ((0.671348265245-0.289309393473j))*x[0] + ((0.621218776634+0.0539121094746j))*x[1]**o + ((0.331420778253-0.576643802198j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.736922868529-0.599789344174j)*x_ref[0]**o + ((0.671348265245-0.289309393473j))*x_ref[0] + ((0.621218776634+0.0539121094746j))*x_ref[1]**o + ((0.331420778253-0.576643802198j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.277182830611-0.41776531601j)*x[0]**o + ((-0.10130159438-0.65206734342j))*x[0] + ((-0.739855094858+0.293932463614j))*x[1]**o + ((0.0531963490091-0.420908568054j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.277182830611-0.41776531601j)*x_ref[0]**o + ((-0.10130159438-0.65206734342j))*x_ref[0] + ((-0.739855094858+0.293932463614j))*x_ref[1]**o + ((0.0531963490091-0.420908568054j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.725698366283-0.33358900549j)*x[0]**o + ((0.683832364204-0.568980316559j))*x[0] + ((-0.831169201162+0.746950566259j))*x[1]**o + ((0.809281909295+0.0657133791766j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.725698366283-0.33358900549j)*x_ref[0]**o + ((0.683832364204-0.568980316559j))*x_ref[0] + ((-0.831169201162+0.746950566259j))*x_ref[1]**o + ((0.809281909295+0.0657133791766j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(-0.250945088971+0.26201623248j)*x[0]**o + ((-0.663726725467+0.873431844972j))*x[0] + ((0.148158206292+0.00015630574704j))*x[1]**o + ((0.929105688173-0.80687766387j))*x[1]
+        ref[(0, 2, 0, 2)]=(-0.250945088971+0.26201623248j)*x_ref[0]**o + ((-0.663726725467+0.873431844972j))*x_ref[0] + ((0.148158206292+0.00015630574704j))*x_ref[1]**o + ((0.929105688173-0.80687766387j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.125545688046+0.193799863282j)*x[0]**o + ((0.412778082984+0.205825417578j))*x[0] + ((-0.0195613813331-0.112209588874j))*x[1]**o + ((0.278401366109-0.414862867499j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.125545688046+0.193799863282j)*x_ref[0]**o + ((0.412778082984+0.205825417578j))*x_ref[0] + ((-0.0195613813331-0.112209588874j))*x_ref[1]**o + ((0.278401366109-0.414862867499j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.558388815099+0.0447351948892j)*x[0]**o + ((0.663233562254+0.783464779808j))*x[0] + ((-0.740792824777-0.976873918118j))*x[1]**o + ((0.488313508353+0.752159099407j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.558388815099+0.0447351948892j)*x_ref[0]**o + ((0.663233562254+0.783464779808j))*x_ref[0] + ((-0.740792824777-0.976873918118j))*x_ref[1]**o + ((0.488313508353+0.752159099407j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.761718099588+0.438051843934j)*x[0]**o + ((-0.963155914412+0.893044141762j))*x[0] + ((0.031257308018-0.226476994502j))*x[1]**o + ((-0.423333076638-0.398079825389j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.761718099588+0.438051843934j)*x_ref[0]**o + ((-0.963155914412+0.893044141762j))*x_ref[0] + ((0.031257308018-0.226476994502j))*x_ref[1]**o + ((-0.423333076638-0.398079825389j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.77245941021-0.309440367745j)*x[0]**o + ((-0.511864192867+0.0116438426537j))*x[0] + ((0.11282500636-0.589833702676j))*x[1]**o + ((-0.706517614256-0.0253310774248j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.77245941021-0.309440367745j)*x_ref[0]**o + ((-0.511864192867+0.0116438426537j))*x_ref[0] + ((0.11282500636-0.589833702676j))*x_ref[1]**o + ((-0.706517614256-0.0253310774248j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.660695586653+0.142350628364j)*x[0]**o + ((0.922142061136-0.0312540900772j))*x[0] + ((0.0708974045281+0.61639071296j))*x[1]**o + ((-0.217326965751-0.646764059931j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.660695586653+0.142350628364j)*x_ref[0]**o + ((0.922142061136-0.0312540900772j))*x_ref[0] + ((0.0708974045281+0.61639071296j))*x_ref[1]**o + ((-0.217326965751-0.646764059931j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(0.425525151956+0.693236057178j)*x[0]**o + ((0.239705572516+0.557611131892j))*x[0] + ((0.947592569123-0.23864088796j))*x[1]**o + ((-0.341388853513+0.165339254604j))*x[1]
+        ref[(0, 2, 2, 2)]=(0.425525151956+0.693236057178j)*x_ref[0]**o + ((0.239705572516+0.557611131892j))*x_ref[0] + ((0.947592569123-0.23864088796j))*x_ref[1]**o + ((-0.341388853513+0.165339254604j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.272711075584+0.495645996959j)*x[0]**o + ((-0.287902359166+0.62679001393j))*x[0] + ((-0.793895294842-0.725829131792j))*x[1]**o + ((0.775890445402+0.803189117082j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.272711075584+0.495645996959j)*x_ref[0]**o + ((-0.287902359166+0.62679001393j))*x_ref[0] + ((-0.793895294842-0.725829131792j))*x_ref[1]**o + ((0.775890445402+0.803189117082j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.00267926946818-0.880818691547j)*x[0]**o + ((-0.100237874083+0.583154700613j))*x[0] + ((-0.26537507448+0.26873615104j))*x[1]**o + ((-0.985257863948+0.456261966346j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.00267926946818-0.880818691547j)*x_ref[0]**o + ((-0.100237874083+0.583154700613j))*x_ref[0] + ((-0.26537507448+0.26873615104j))*x_ref[1]**o + ((-0.985257863948+0.456261966346j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.863399523373+0.746019887222j)*x[0]**o + ((0.988888496378-0.893411013521j))*x[0] + ((-0.986863596791-0.35243859719j))*x[1]**o + ((0.766712246429+0.360671264996j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.863399523373+0.746019887222j)*x_ref[0]**o + ((0.988888496378-0.893411013521j))*x_ref[0] + ((-0.986863596791-0.35243859719j))*x_ref[1]**o + ((0.766712246429+0.360671264996j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.666018020575-0.333097476379j)*x[0]**o + ((0.944914091826+0.759847471383j))*x[0] + ((-0.765110786485+0.705345338935j))*x[1]**o + ((0.910617020421-0.80044743377j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.666018020575-0.333097476379j)*x_ref[0]**o + ((0.944914091826+0.759847471383j))*x_ref[0] + ((-0.765110786485+0.705345338935j))*x_ref[1]**o + ((0.910617020421-0.80044743377j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.907904000717+0.897056545766j)*x[0]**o + ((0.125522418086-0.492072468053j))*x[0] + ((-0.577332866626-0.523229853091j))*x[1]**o + ((-0.480267648763-0.718382253135j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.907904000717+0.897056545766j)*x_ref[0]**o + ((0.125522418086-0.492072468053j))*x_ref[0] + ((-0.577332866626-0.523229853091j))*x_ref[1]**o + ((-0.480267648763-0.718382253135j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.747337704475-0.949685693317j)*x[0]**o + ((0.619589689534+0.52897353898j))*x[0] + ((0.865360993234+0.306713913456j))*x[1]**o + ((0.559295873855+0.106288205855j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.747337704475-0.949685693317j)*x_ref[0]**o + ((0.619589689534+0.52897353898j))*x_ref[0] + ((0.865360993234+0.306713913456j))*x_ref[1]**o + ((0.559295873855+0.106288205855j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.73561544795+0.459061808129j)*x[0]**o + ((0.996707254166+0.761684137271j))*x[0] + ((-0.550709791505-0.748350732153j))*x[1]**o + ((-0.0121340917047-0.120048373128j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.73561544795+0.459061808129j)*x_ref[0]**o + ((0.996707254166+0.761684137271j))*x_ref[0] + ((-0.550709791505-0.748350732153j))*x_ref[1]**o + ((-0.0121340917047-0.120048373128j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.515960673811-0.103933434364j)*x[0]**o + ((0.354691409044-0.749978114473j))*x[0] + ((-0.711871380306-0.961842838782j))*x[1]**o + ((0.274563207897+0.771449088384j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.515960673811-0.103933434364j)*x_ref[0]**o + ((0.354691409044-0.749978114473j))*x_ref[0] + ((-0.711871380306-0.961842838782j))*x_ref[1]**o + ((0.274563207897+0.771449088384j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.248023655884-0.116859424145j)*x[0]**o + ((0.8277126712+0.573885962725j))*x[0] + ((0.832294664885+0.102356984536j))*x[1]**o + ((-0.111935757363+0.397999508262j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.248023655884-0.116859424145j)*x_ref[0]**o + ((0.8277126712+0.573885962725j))*x_ref[0] + ((0.832294664885+0.102356984536j))*x_ref[1]**o + ((-0.111935757363+0.397999508262j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.887155124461-0.852340249707j)*x[0]**o + ((0.208364051309-0.766024504552j))*x[0] + ((-0.131821768354+0.645552087498j))*x[1]**o + ((-0.763402527443-0.367755262554j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.887155124461-0.852340249707j)*x_ref[0]**o + ((0.208364051309-0.766024504552j))*x_ref[0] + ((-0.131821768354+0.645552087498j))*x_ref[1]**o + ((-0.763402527443-0.367755262554j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.219055732503+0.635322295434j)*x[0]**o + ((-0.987309415195+0.376991836488j))*x[0] + ((0.0109447532221-0.489488877568j))*x[1]**o + ((0.414864525916+0.888589471464j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.219055732503+0.635322295434j)*x_ref[0]**o + ((-0.987309415195+0.376991836488j))*x_ref[0] + ((0.0109447532221-0.489488877568j))*x_ref[1]**o + ((0.414864525916+0.888589471464j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.632027804762+0.813438502003j)*x[0]**o + ((-0.945017411636+0.294799508359j))*x[0] + ((-0.809376902125-0.618636929096j))*x[1]**o + ((-0.29438773481+0.811927260756j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.632027804762+0.813438502003j)*x_ref[0]**o + ((-0.945017411636+0.294799508359j))*x_ref[0] + ((-0.809376902125-0.618636929096j))*x_ref[1]**o + ((-0.29438773481+0.811927260756j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.0380331417853-0.390079675478j)*x[0]**o + ((0.89770940837-0.779932674093j))*x[0] + ((-0.507025600019-0.290370487303j))*x[1]**o + ((0.313399785673-0.919248288765j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.0380331417853-0.390079675478j)*x_ref[0]**o + ((0.89770940837-0.779932674093j))*x_ref[0] + ((-0.507025600019-0.290370487303j))*x_ref[1]**o + ((0.313399785673-0.919248288765j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.910032804294+0.153345739746j)*x[0]**o + ((-0.910135053133+0.820426656834j))*x[0] + ((-0.383173317342+0.322477772172j))*x[1]**o + ((-0.779816424463-0.481418119118j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.910032804294+0.153345739746j)*x_ref[0]**o + ((-0.910135053133+0.820426656834j))*x_ref[0] + ((-0.383173317342+0.322477772172j))*x_ref[1]**o + ((-0.779816424463-0.481418119118j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.0103837773738+0.793534273802j)*x[0]**o + ((-0.131858326107+0.0881709614637j))*x[0] + ((-0.963092719123+0.750683645786j))*x[1]**o + ((0.201957541185-0.250127932008j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.0103837773738+0.793534273802j)*x_ref[0]**o + ((-0.131858326107+0.0881709614637j))*x_ref[0] + ((-0.963092719123+0.750683645786j))*x_ref[1]**o + ((0.201957541185-0.250127932008j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.547168707772+0.550430515427j)*x[0]**o + ((0.784325587508-0.335534512524j))*x[0] + ((-0.67392109642+0.0158063883252j))*x[1]**o + ((-0.204491026244-0.137180835877j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.547168707772+0.550430515427j)*x_ref[0]**o + ((0.784325587508-0.335534512524j))*x_ref[0] + ((-0.67392109642+0.0158063883252j))*x_ref[1]**o + ((-0.204491026244-0.137180835877j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.397011602966+0.483279112097j)*x[0]**o + ((-0.213505185833-0.731271647959j))*x[0] + ((0.376729713791+0.064747257179j))*x[1]**o + ((-0.803515396271-0.331547945494j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.397011602966+0.483279112097j)*x_ref[0]**o + ((-0.213505185833-0.731271647959j))*x_ref[0] + ((0.376729713791+0.064747257179j))*x_ref[1]**o + ((-0.803515396271-0.331547945494j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(0.130299498783-0.952663278257j)*x[0]**o + ((0.430012635486-0.681195566149j))*x[0] + ((-0.919580515626+0.15228461084j))*x[1]**o + ((0.816894971097-0.735573118558j))*x[1]
+        ref[(1, 1, 2, 2)]=(0.130299498783-0.952663278257j)*x_ref[0]**o + ((0.430012635486-0.681195566149j))*x_ref[0] + ((-0.919580515626+0.15228461084j))*x_ref[1]**o + ((0.816894971097-0.735573118558j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.178376752188-0.372848247966j)*x[0]**o + ((0.672494998764+0.0957873128382j))*x[0] + ((-0.312120469653+0.487377682138j))*x[1]**o + ((0.550460189839-0.980969562131j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.178376752188-0.372848247966j)*x_ref[0]**o + ((0.672494998764+0.0957873128382j))*x_ref[0] + ((-0.312120469653+0.487377682138j))*x_ref[1]**o + ((0.550460189839-0.980969562131j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.657572277463+0.166253783024j)*x[0]**o + ((-0.514711359005-0.822711877704j))*x[0] + ((0.98899075289+0.267013556185j))*x[1]**o + ((-0.526927378388+0.846451547615j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.657572277463+0.166253783024j)*x_ref[0]**o + ((-0.514711359005-0.822711877704j))*x_ref[0] + ((0.98899075289+0.267013556185j))*x_ref[1]**o + ((-0.526927378388+0.846451547615j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.946940280729+0.557658863999j)*x[0]**o + ((0.613798951911+0.227595482764j))*x[0] + ((0.129630731842+0.815640277695j))*x[1]**o + ((-0.134488408114-0.436259471359j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.946940280729+0.557658863999j)*x_ref[0]**o + ((0.613798951911+0.227595482764j))*x_ref[0] + ((0.129630731842+0.815640277695j))*x_ref[1]**o + ((-0.134488408114-0.436259471359j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.0159768610863+0.31017799105j)*x[0]**o + ((-0.763613442066-0.112686803525j))*x[0] + ((-0.484377475844+0.16645908185j))*x[1]**o + ((0.821407709876-0.0526171223899j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.0159768610863+0.31017799105j)*x_ref[0]**o + ((-0.763613442066-0.112686803525j))*x_ref[0] + ((-0.484377475844+0.16645908185j))*x_ref[1]**o + ((0.821407709876-0.0526171223899j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.668864242271-0.460701147783j)*x[0]**o + ((-0.113419077946+0.405409400583j))*x[0] + ((0.858181493122-0.858359043652j))*x[1]**o + ((0.0617028207537+0.642295013294j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.668864242271-0.460701147783j)*x_ref[0]**o + ((-0.113419077946+0.405409400583j))*x_ref[0] + ((0.858181493122-0.858359043652j))*x_ref[1]**o + ((0.0617028207537+0.642295013294j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.16445841802+0.499941732559j)*x[0]**o + ((0.87844132954-0.836663699133j))*x[0] + ((0.375909143804+0.610590554689j))*x[1]**o + ((0.95525669069+0.00227755270924j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.16445841802+0.499941732559j)*x_ref[0]**o + ((0.87844132954-0.836663699133j))*x_ref[0] + ((0.375909143804+0.610590554689j))*x_ref[1]**o + ((0.95525669069+0.00227755270924j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.627101162041-0.904487486446j)*x[0]**o + ((0.123408237768+0.219416037526j))*x[0] + ((-0.513253893738-0.671209105228j))*x[1]**o + ((-0.42063602865-0.00719568009012j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.627101162041-0.904487486446j)*x_ref[0]**o + ((0.123408237768+0.219416037526j))*x_ref[0] + ((-0.513253893738-0.671209105228j))*x_ref[1]**o + ((-0.42063602865-0.00719568009012j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.453941201777-0.0878680693298j)*x[0]**o + ((0.325239906019-0.759225715295j))*x[0] + ((-0.0147467576062-0.610017432163j))*x[1]**o + ((0.571246607393+0.819210639145j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.453941201777-0.0878680693298j)*x_ref[0]**o + ((0.325239906019-0.759225715295j))*x_ref[0] + ((-0.0147467576062-0.610017432163j))*x_ref[1]**o + ((0.571246607393+0.819210639145j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(0.474104792767+0.336050378667j)*x[0]**o + ((0.0235117136098-0.918501374933j))*x[0] + ((-0.843360405982-0.952762647243j))*x[1]**o + ((0.860414792773-0.873537045248j))*x[1]
+        ref[(1, 2, 2, 2)]=(0.474104792767+0.336050378667j)*x_ref[0]**o + ((0.0235117136098-0.918501374933j))*x_ref[0] + ((-0.843360405982-0.952762647243j))*x_ref[1]**o + ((0.860414792773-0.873537045248j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.464432345416-0.12811206597j)*x[0]**o + ((0.183861902779-0.581666358549j))*x[0] + ((-0.56275049315+0.377536696438j))*x[1]**o + ((-0.476912568618+0.651740837627j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.464432345416-0.12811206597j)*x_ref[0]**o + ((0.183861902779-0.581666358549j))*x_ref[0] + ((-0.56275049315+0.377536696438j))*x_ref[1]**o + ((-0.476912568618+0.651740837627j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.732064160953-0.391008806163j)*x[0]**o + ((0.666688362063-0.820796393648j))*x[0] + ((-0.445285451886-0.843134732788j))*x[1]**o + ((0.452887553984-0.662996737195j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.732064160953-0.391008806163j)*x_ref[0]**o + ((0.666688362063-0.820796393648j))*x_ref[0] + ((-0.445285451886-0.843134732788j))*x_ref[1]**o + ((0.452887553984-0.662996737195j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.511873963248+0.166008092919j)*x[0]**o + ((-0.826502268512-0.592506096758j))*x[0] + ((0.727914045812-0.498505298796j))*x[1]**o + ((-0.0767662556414-0.218998216108j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.511873963248+0.166008092919j)*x_ref[0]**o + ((-0.826502268512-0.592506096758j))*x_ref[0] + ((0.727914045812-0.498505298796j))*x_ref[1]**o + ((-0.0767662556414-0.218998216108j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.452432319199-0.923675697311j)*x[0]**o + ((-0.529180468555+0.346252158643j))*x[0] + ((0.128431527635-0.94672201976j))*x[1]**o + ((0.764852197352+0.593152890296j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.452432319199-0.923675697311j)*x_ref[0]**o + ((-0.529180468555+0.346252158643j))*x_ref[0] + ((0.128431527635-0.94672201976j))*x_ref[1]**o + ((0.764852197352+0.593152890296j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.276175063868+0.978433663539j)*x[0]**o + ((0.0037520237549-0.179423450706j))*x[0] + ((0.263342226267+0.209439257123j))*x[1]**o + ((-0.551496660513-0.293281181452j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.276175063868+0.978433663539j)*x_ref[0]**o + ((0.0037520237549-0.179423450706j))*x_ref[0] + ((0.263342226267+0.209439257123j))*x_ref[1]**o + ((-0.551496660513-0.293281181452j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.958044382614+0.422446314811j)*x[0]**o + ((0.914347200305-0.578108807927j))*x[0] + ((-0.0641757978244-0.190664648719j))*x[1]**o + ((0.887940566451+0.557303172783j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.958044382614+0.422446314811j)*x_ref[0]**o + ((0.914347200305-0.578108807927j))*x_ref[0] + ((-0.0641757978244-0.190664648719j))*x_ref[1]**o + ((0.887940566451+0.557303172783j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(0.806905546639-0.0773752011748j)*x[0]**o + ((0.0429433225774+0.233547633975j))*x[0] + ((-0.729909199143-0.872864981097j))*x[1]**o + ((-0.0412148934487-0.349010833204j))*x[1]
+        ref[(2, 0, 2, 0)]=(0.806905546639-0.0773752011748j)*x_ref[0]**o + ((0.0429433225774+0.233547633975j))*x_ref[0] + ((-0.729909199143-0.872864981097j))*x_ref[1]**o + ((-0.0412148934487-0.349010833204j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.739413353162-0.532354722868j)*x[0]**o + ((0.390244704863-0.0670130769307j))*x[0] + ((0.427199497419+0.770959375751j))*x[1]**o + ((0.69497349907-0.852477845143j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.739413353162-0.532354722868j)*x_ref[0]**o + ((0.390244704863-0.0670130769307j))*x_ref[0] + ((0.427199497419+0.770959375751j))*x_ref[1]**o + ((0.69497349907-0.852477845143j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(-0.398078176981+0.444743482292j)*x[0]**o + ((0.232708589851+0.795553929105j))*x[0] + ((-0.471511804976+0.0637134115233j))*x[1]**o + ((0.602412859019+0.470393118785j))*x[1]
+        ref[(2, 0, 2, 2)]=(-0.398078176981+0.444743482292j)*x_ref[0]**o + ((0.232708589851+0.795553929105j))*x_ref[0] + ((-0.471511804976+0.0637134115233j))*x_ref[1]**o + ((0.602412859019+0.470393118785j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.589415578844-0.429782809633j)*x[0]**o + ((0.58168008337-0.744267813553j))*x[0] + ((-0.991660149045+0.0513245040093j))*x[1]**o + ((-0.523679652056-0.529924530622j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.589415578844-0.429782809633j)*x_ref[0]**o + ((0.58168008337-0.744267813553j))*x_ref[0] + ((-0.991660149045+0.0513245040093j))*x_ref[1]**o + ((-0.523679652056-0.529924530622j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.163008366413+0.976943735685j)*x[0]**o + ((0.736734022513-0.557153801099j))*x[0] + ((0.787243608608-0.45021547415j))*x[1]**o + ((-0.770736654931+0.522314037709j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.163008366413+0.976943735685j)*x_ref[0]**o + ((0.736734022513-0.557153801099j))*x_ref[0] + ((0.787243608608-0.45021547415j))*x_ref[1]**o + ((-0.770736654931+0.522314037709j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.938776555613+0.782941007348j)*x[0]**o + ((0.200634926167+0.280781530203j))*x[0] + ((0.608080102489+0.179041149346j))*x[1]**o + ((-0.74904598031-0.757168714907j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.938776555613+0.782941007348j)*x_ref[0]**o + ((0.200634926167+0.280781530203j))*x_ref[0] + ((0.608080102489+0.179041149346j))*x_ref[1]**o + ((-0.74904598031-0.757168714907j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.809844133852-0.12229853582j)*x[0]**o + ((0.0922147133591+0.924905645043j))*x[0] + ((-0.953924493206+0.564555658982j))*x[1]**o + ((0.888393593761-0.216114430394j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.809844133852-0.12229853582j)*x_ref[0]**o + ((0.0922147133591+0.924905645043j))*x_ref[0] + ((-0.953924493206+0.564555658982j))*x_ref[1]**o + ((0.888393593761-0.216114430394j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.954297401335+0.345543451316j)*x[0]**o + ((-0.213331114427-0.058027103846j))*x[0] + ((0.803520784424-0.895417735625j))*x[1]**o + ((0.100710923264-0.0383783392055j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.954297401335+0.345543451316j)*x_ref[0]**o + ((-0.213331114427-0.058027103846j))*x_ref[0] + ((0.803520784424-0.895417735625j))*x_ref[1]**o + ((0.100710923264-0.0383783392055j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.962566209255-0.689591241862j)*x[0]**o + ((-0.191885134909-0.843052335432j))*x[0] + ((0.72164979092+0.843057440271j))*x[1]**o + ((0.156390085893+0.33968598191j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.962566209255-0.689591241862j)*x_ref[0]**o + ((-0.191885134909-0.843052335432j))*x_ref[0] + ((0.72164979092+0.843057440271j))*x_ref[1]**o + ((0.156390085893+0.33968598191j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.837623037539-0.282708419715j)*x[0]**o + ((0.073853737938+0.219072859195j))*x[0] + ((-0.806939637829+0.0890494464264j))*x[1]**o + ((-0.745930410679+0.275280635708j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.837623037539-0.282708419715j)*x_ref[0]**o + ((0.073853737938+0.219072859195j))*x_ref[0] + ((-0.806939637829+0.0890494464264j))*x_ref[1]**o + ((-0.745930410679+0.275280635708j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(0.258131114442-0.216788814108j)*x[0]**o + ((0.608759586579-0.58831961448j))*x[0] + ((0.954876161033-0.940295036225j))*x[1]**o + ((-0.111940005249+0.93909739516j))*x[1]
+        ref[(2, 1, 2, 1)]=(0.258131114442-0.216788814108j)*x_ref[0]**o + ((0.608759586579-0.58831961448j))*x_ref[0] + ((0.954876161033-0.940295036225j))*x_ref[1]**o + ((-0.111940005249+0.93909739516j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(-0.622726756104+0.0300139537799j)*x[0]**o + ((0.18496796726+0.235915789905j))*x[0] + ((-0.478079805417-0.115310743556j))*x[1]**o + ((0.956998494175+0.608670792587j))*x[1]
+        ref[(2, 1, 2, 2)]=(-0.622726756104+0.0300139537799j)*x_ref[0]**o + ((0.18496796726+0.235915789905j))*x_ref[0] + ((-0.478079805417-0.115310743556j))*x_ref[1]**o + ((0.956998494175+0.608670792587j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(-0.98482041547+0.637247366785j)*x[0]**o + ((0.173424996163+0.685173646605j))*x[0] + ((-0.861537250059-0.223702018988j))*x[1]**o + ((0.0513176523428-0.714196210332j))*x[1]
+        ref[(2, 2, 0, 0)]=(-0.98482041547+0.637247366785j)*x_ref[0]**o + ((0.173424996163+0.685173646605j))*x_ref[0] + ((-0.861537250059-0.223702018988j))*x_ref[1]**o + ((0.0513176523428-0.714196210332j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.8596816734+0.524663333157j)*x[0]**o + ((0.814292186758+0.980977162174j))*x[0] + ((-0.448277972757+0.427627659554j))*x[1]**o + ((-0.593775293096+0.0421917006767j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.8596816734+0.524663333157j)*x_ref[0]**o + ((0.814292186758+0.980977162174j))*x_ref[0] + ((-0.448277972757+0.427627659554j))*x_ref[1]**o + ((-0.593775293096+0.0421917006767j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(-0.978933917783+0.151776324854j)*x[0]**o + ((0.840960043507-0.167105556667j))*x[0] + ((0.562816983896-0.186625052885j))*x[1]**o + ((-0.134496790045+0.0652269867055j))*x[1]
+        ref[(2, 2, 0, 2)]=(-0.978933917783+0.151776324854j)*x_ref[0]**o + ((0.840960043507-0.167105556667j))*x_ref[0] + ((0.562816983896-0.186625052885j))*x_ref[1]**o + ((-0.134496790045+0.0652269867055j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.507716512256-0.0447662705034j)*x[0]**o + ((0.781531657747-0.724828552184j))*x[0] + ((-0.570459406136+0.0332226288024j))*x[1]**o + ((0.273219292291-0.0710596938105j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.507716512256-0.0447662705034j)*x_ref[0]**o + ((0.781531657747-0.724828552184j))*x_ref[0] + ((-0.570459406136+0.0332226288024j))*x_ref[1]**o + ((0.273219292291-0.0710596938105j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.30924693765+0.713004013679j)*x[0]**o + ((0.229922584898-0.168609501646j))*x[0] + ((0.880244608332-0.257934468418j))*x[1]**o + ((0.554672051993+0.369795345145j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.30924693765+0.713004013679j)*x_ref[0]**o + ((0.229922584898-0.168609501646j))*x_ref[0] + ((0.880244608332-0.257934468418j))*x_ref[1]**o + ((0.554672051993+0.369795345145j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(0.871933422602+0.127783870925j)*x[0]**o + ((0.778880835916-0.577551615074j))*x[0] + ((0.937966644995-0.00790860886498j))*x[1]**o + ((0.464914890907+0.949766162305j))*x[1]
+        ref[(2, 2, 1, 2)]=(0.871933422602+0.127783870925j)*x_ref[0]**o + ((0.778880835916-0.577551615074j))*x_ref[0] + ((0.937966644995-0.00790860886498j))*x_ref[1]**o + ((0.464914890907+0.949766162305j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(-0.31985453775+0.985689612427j)*x[0]**o + ((0.423200215644+0.188566676573j))*x[0] + ((0.207270337478-0.736528603596j))*x[1]**o + ((-0.0459281584448+0.893258438056j))*x[1]
+        ref[(2, 2, 2, 0)]=(-0.31985453775+0.985689612427j)*x_ref[0]**o + ((0.423200215644+0.188566676573j))*x_ref[0] + ((0.207270337478-0.736528603596j))*x_ref[1]**o + ((-0.0459281584448+0.893258438056j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(-0.969789406543+0.218660714758j)*x[0]**o + ((0.37714561683-0.810038917541j))*x[0] + ((-0.932682617944+0.318529385364j))*x[1]**o + ((0.574227365249+0.332089289295j))*x[1]
+        ref[(2, 2, 2, 1)]=(-0.969789406543+0.218660714758j)*x_ref[0]**o + ((0.37714561683-0.810038917541j))*x_ref[0] + ((-0.932682617944+0.318529385364j))*x_ref[1]**o + ((0.574227365249+0.332089289295j))*x_ref[1]
+        arg[(2, 2, 2, 2)]=(-0.225730511621-0.904108557705j)*x[0]**o + ((0.796210286132+0.816506431912j))*x[0] + ((0.231337607402+0.949361577428j))*x[1]**o + ((0.870946817334+0.189803610266j))*x[1]
+        ref[(2, 2, 2, 2)]=(-0.225730511621-0.904108557705j)*x_ref[0]**o + ((0.796210286132+0.816506431912j))*x_ref[0] + ((0.231337607402+0.949361577428j))*x_ref[1]**o + ((0.870946817334+0.189803610266j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.78439488913-0.588259203694j)*x[2]**o + ((-0.139186396666+0.332154670719j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.78439488913-0.588259203694j)*x_ref[2]**o + ((-0.139186396666+0.332154670719j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.358453650587-0.365107968593j)*x[2]**o + ((0.797242842571-0.752601360857j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.358453650587-0.365107968593j)*x_ref[2]**o + ((0.797242842571-0.752601360857j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.303956638238-0.197427910897j)*x[2]**o + ((-0.800313266203+0.948435507286j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.303956638238-0.197427910897j)*x_ref[2]**o + ((-0.800313266203+0.948435507286j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.658271560971+0.189159260018j)*x[2]**o + ((0.895003467194-0.120694066749j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.658271560971+0.189159260018j)*x_ref[2]**o + ((0.895003467194-0.120694066749j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.739804849499-0.545345703216j)*x[2]**o + ((-0.199349912837+0.903103358497j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.739804849499-0.545345703216j)*x_ref[2]**o + ((-0.199349912837+0.903103358497j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.729017367104-0.76298130551j)*x[2]**o + ((-0.744999395393+0.25067851065j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.729017367104-0.76298130551j)*x_ref[2]**o + ((-0.744999395393+0.25067851065j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.821403225951+0.225934218768j)*x[2]**o + ((-0.854811257943-0.861669082833j))*x[2]
+            ref[(0, 0, 2, 0)]+=(0.821403225951+0.225934218768j)*x_ref[2]**o + ((-0.854811257943-0.861669082833j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.859054473606-0.142618608422j)*x[2]**o + ((0.0168671737301+0.128131446906j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.859054473606-0.142618608422j)*x_ref[2]**o + ((0.0168671737301+0.128131446906j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(-0.152299394132-0.558297138658j)*x[2]**o + ((-0.0537858000543-0.716573475647j))*x[2]
+            ref[(0, 0, 2, 2)]+=(-0.152299394132-0.558297138658j)*x_ref[2]**o + ((-0.0537858000543-0.716573475647j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.507562747792+0.953232870806j)*x[2]**o + ((-0.815468259535+0.452240531087j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.507562747792+0.953232870806j)*x_ref[2]**o + ((-0.815468259535+0.452240531087j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.535229575865+0.79557318018j)*x[2]**o + ((0.247452977808-0.680172837455j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.535229575865+0.79557318018j)*x_ref[2]**o + ((0.247452977808-0.680172837455j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.329865802595+0.815246405761j)*x[2]**o + ((-0.97060833118+0.575411802943j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.329865802595+0.815246405761j)*x_ref[2]**o + ((-0.97060833118+0.575411802943j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.549061813769-0.941573647561j)*x[2]**o + ((0.839527178167-0.428523601426j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.549061813769-0.941573647561j)*x_ref[2]**o + ((0.839527178167-0.428523601426j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.278296317911+0.742347780173j)*x[2]**o + ((-0.27283377657-0.379170491053j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.278296317911+0.742347780173j)*x_ref[2]**o + ((-0.27283377657-0.379170491053j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.56330659364-0.0866772647475j)*x[2]**o + ((0.136140897539+0.33392159188j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.56330659364-0.0866772647475j)*x_ref[2]**o + ((0.136140897539+0.33392159188j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.0659681942864+0.4385477518j)*x[2]**o + ((0.984131761441+0.445503927401j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.0659681942864+0.4385477518j)*x_ref[2]**o + ((0.984131761441+0.445503927401j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.507170016792-0.351442118039j)*x[2]**o + ((0.942597393612+0.600142954687j))*x[2]
+            ref[(0, 1, 2, 1)]+=(0.507170016792-0.351442118039j)*x_ref[2]**o + ((0.942597393612+0.600142954687j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(-0.216170903829-0.572841650546j)*x[2]**o + ((0.869156953185-0.167874276766j))*x[2]
+            ref[(0, 1, 2, 2)]+=(-0.216170903829-0.572841650546j)*x_ref[2]**o + ((0.869156953185-0.167874276766j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.422305854258+0.36123058529j)*x[2]**o + ((0.941782121385-0.302401056338j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.422305854258+0.36123058529j)*x_ref[2]**o + ((0.941782121385-0.302401056338j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.54508138863+0.312887916612j)*x[2]**o + ((-0.0870966333008+0.280642690661j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.54508138863+0.312887916612j)*x_ref[2]**o + ((-0.0870966333008+0.280642690661j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.825777810547-0.376401262444j)*x[2]**o + ((-0.215917690531-0.446100400749j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.825777810547-0.376401262444j)*x_ref[2]**o + ((-0.215917690531-0.446100400749j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.58358712203-0.777525576203j)*x[2]**o + ((-0.25125713032+0.00982787456449j))*x[2]
+            ref[(0, 2, 1, 0)]+=(0.58358712203-0.777525576203j)*x_ref[2]**o + ((-0.25125713032+0.00982787456449j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.0333499470966+0.28445682992j)*x[2]**o + ((-0.0986959671532-0.892929482487j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.0333499470966+0.28445682992j)*x_ref[2]**o + ((-0.0986959671532-0.892929482487j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.255405650357+0.418758923649j)*x[2]**o + ((-0.930275895323+0.0678885127891j))*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.255405650357+0.418758923649j)*x_ref[2]**o + ((-0.930275895323+0.0678885127891j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.829616337788-0.492827430378j)*x[2]**o + ((-0.191762728038-0.502021051965j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.829616337788-0.492827430378j)*x_ref[2]**o + ((-0.191762728038-0.502021051965j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.407403630039+0.390331540488j)*x[2]**o + ((-0.119203552408-0.91792257872j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.407403630039+0.390331540488j)*x_ref[2]**o + ((-0.119203552408-0.91792257872j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.460514174489-0.614132204095j)*x[2]**o + ((0.213796374034-0.736399971337j))*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.460514174489-0.614132204095j)*x_ref[2]**o + ((0.213796374034-0.736399971337j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.549775150901-0.616061033506j)*x[2]**o + ((-0.891338342902+0.00342039100195j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.549775150901-0.616061033506j)*x_ref[2]**o + ((-0.891338342902+0.00342039100195j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.333590619223-0.149139756671j)*x[2]**o + ((0.728975071696+0.813961941479j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.333590619223-0.149139756671j)*x_ref[2]**o + ((0.728975071696+0.813961941479j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.28837404611-0.571824995539j)*x[2]**o + ((0.621509138616-0.297911095059j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.28837404611-0.571824995539j)*x_ref[2]**o + ((0.621509138616-0.297911095059j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.968031798279-0.512206492099j)*x[2]**o + ((0.45140075914-0.30137866882j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.968031798279-0.512206492099j)*x_ref[2]**o + ((0.45140075914-0.30137866882j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.557949145212-0.822698342306j)*x[2]**o + ((-0.319726284857+0.153911018492j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.557949145212-0.822698342306j)*x_ref[2]**o + ((-0.319726284857+0.153911018492j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.743642739087-0.294302589135j)*x[2]**o + ((0.70527308906-0.979125604989j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.743642739087-0.294302589135j)*x_ref[2]**o + ((0.70527308906-0.979125604989j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.399888320762+0.0193677662019j)*x[2]**o + ((0.614517495278-0.134988409657j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.399888320762+0.0193677662019j)*x_ref[2]**o + ((0.614517495278-0.134988409657j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.313263377317+0.582206109387j)*x[2]**o + ((0.0276206202315+0.594353187064j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.313263377317+0.582206109387j)*x_ref[2]**o + ((0.0276206202315+0.594353187064j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(0.363005093244+0.087859995396j)*x[2]**o + ((0.201181245584-0.492552275444j))*x[2]
+            ref[(1, 0, 2, 2)]+=(0.363005093244+0.087859995396j)*x_ref[2]**o + ((0.201181245584-0.492552275444j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.576677513998-0.286032240572j)*x[2]**o + ((-0.406517529264+0.0106448968345j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.576677513998-0.286032240572j)*x_ref[2]**o + ((-0.406517529264+0.0106448968345j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.925894631238-0.837111178911j)*x[2]**o + ((-0.929933842081+0.225655538835j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.925894631238-0.837111178911j)*x_ref[2]**o + ((-0.929933842081+0.225655538835j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.971106303569+0.606165491882j)*x[2]**o + ((0.416095170874+0.570988118826j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.971106303569+0.606165491882j)*x_ref[2]**o + ((0.416095170874+0.570988118826j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.863547691487+0.202034231985j)*x[2]**o + ((-0.658248656534-0.00793205772162j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.863547691487+0.202034231985j)*x_ref[2]**o + ((-0.658248656534-0.00793205772162j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.253961074297-0.0639131632386j)*x[2]**o + ((-0.89692782909-0.83903732716j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.253961074297-0.0639131632386j)*x_ref[2]**o + ((-0.89692782909-0.83903732716j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.892311851807+0.567023558952j)*x[2]**o + ((0.37092737577-0.527937347263j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.892311851807+0.567023558952j)*x_ref[2]**o + ((0.37092737577-0.527937347263j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.816813128541+0.147471245091j)*x[2]**o + ((-0.778479250899-0.46123432021j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.816813128541+0.147471245091j)*x_ref[2]**o + ((-0.778479250899-0.46123432021j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.490636570175+0.3028943012j)*x[2]**o + ((-0.610354762071+0.748014763134j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.490636570175+0.3028943012j)*x_ref[2]**o + ((-0.610354762071+0.748014763134j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.670154642231+0.987169233027j)*x[2]**o + ((-0.81935094116+0.929553146465j))*x[2]
+            ref[(1, 1, 2, 2)]+=(0.670154642231+0.987169233027j)*x_ref[2]**o + ((-0.81935094116+0.929553146465j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.469147853903-0.353608174508j)*x[2]**o + ((0.102127404622-0.958913924359j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.469147853903-0.353608174508j)*x_ref[2]**o + ((0.102127404622-0.958913924359j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.675112201878-0.55812749522j)*x[2]**o + ((-0.126261700669-0.0660806246161j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.675112201878-0.55812749522j)*x_ref[2]**o + ((-0.126261700669-0.0660806246161j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.525748180735+0.971864814328j)*x[2]**o + ((0.410660392501+0.185212512218j))*x[2]
+            ref[(1, 2, 0, 2)]+=(0.525748180735+0.971864814328j)*x_ref[2]**o + ((0.410660392501+0.185212512218j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.00841479412381-0.514510080351j)*x[2]**o + ((0.583568432799-0.500104626475j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.00841479412381-0.514510080351j)*x_ref[2]**o + ((0.583568432799-0.500104626475j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.637097628301-0.880249181752j)*x[2]**o + ((0.393837684123+0.898152612112j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.637097628301-0.880249181752j)*x_ref[2]**o + ((0.393837684123+0.898152612112j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(-0.444204386335-0.149447365997j)*x[2]**o + ((0.72428399619-0.135992573586j))*x[2]
+            ref[(1, 2, 1, 2)]+=(-0.444204386335-0.149447365997j)*x_ref[2]**o + ((0.72428399619-0.135992573586j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(0.221562451002-0.667035115171j)*x[2]**o + ((0.876979393095+0.931232380198j))*x[2]
+            ref[(1, 2, 2, 0)]+=(0.221562451002-0.667035115171j)*x_ref[2]**o + ((0.876979393095+0.931232380198j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(-0.413816026247-0.22794482876j)*x[2]**o + ((0.621174395989-0.350772718447j))*x[2]
+            ref[(1, 2, 2, 1)]+=(-0.413816026247-0.22794482876j)*x_ref[2]**o + ((0.621174395989-0.350772718447j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(-0.925074028716-0.592207842431j)*x[2]**o + ((-0.855593463364+0.662698346526j))*x[2]
+            ref[(1, 2, 2, 2)]+=(-0.925074028716-0.592207842431j)*x_ref[2]**o + ((-0.855593463364+0.662698346526j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.48851906684-0.788128556191j)*x[2]**o + ((0.523440608319+0.0715790489137j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.48851906684-0.788128556191j)*x_ref[2]**o + ((0.523440608319+0.0715790489137j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.151112297916-0.893195286378j)*x[2]**o + ((-0.157124623548+0.0386478182655j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.151112297916-0.893195286378j)*x_ref[2]**o + ((-0.157124623548+0.0386478182655j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.258852636742-0.402516978005j)*x[2]**o + ((-0.339168193206+0.41089355031j))*x[2]
+            ref[(2, 0, 0, 2)]+=(0.258852636742-0.402516978005j)*x_ref[2]**o + ((-0.339168193206+0.41089355031j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.441258526916-0.285962357167j)*x[2]**o + ((-0.246820459872+0.902219872131j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.441258526916-0.285962357167j)*x_ref[2]**o + ((-0.246820459872+0.902219872131j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.46058492102+0.995632920199j)*x[2]**o + ((0.179580114071-0.810213006411j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.46058492102+0.995632920199j)*x_ref[2]**o + ((0.179580114071-0.810213006411j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(0.571091027924+0.00480397871205j)*x[2]**o + ((0.89329202414-0.700452068556j))*x[2]
+            ref[(2, 0, 1, 2)]+=(0.571091027924+0.00480397871205j)*x_ref[2]**o + ((0.89329202414-0.700452068556j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.135489137658+0.472135108504j)*x[2]**o + ((0.390274970796+0.867430745085j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.135489137658+0.472135108504j)*x_ref[2]**o + ((0.390274970796+0.867430745085j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.510677417645+0.150681630065j)*x[2]**o + ((-0.663314298057-0.346635223748j))*x[2]
+            ref[(2, 0, 2, 1)]+=(0.510677417645+0.150681630065j)*x_ref[2]**o + ((-0.663314298057-0.346635223748j))*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(-0.64736530874-0.678264590254j)*x[2]**o + ((0.264971643762+0.651760987905j))*x[2]
+            ref[(2, 0, 2, 2)]+=(-0.64736530874-0.678264590254j)*x_ref[2]**o + ((0.264971643762+0.651760987905j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.749181679467+0.344592530939j)*x[2]**o + ((0.787219517705+0.360340707163j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.749181679467+0.344592530939j)*x_ref[2]**o + ((0.787219517705+0.360340707163j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.261364931986-0.35396376131j)*x[2]**o + ((0.423036918915-0.9501779615j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.261364931986-0.35396376131j)*x_ref[2]**o + ((0.423036918915-0.9501779615j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.252906885546+0.0476606945083j)*x[2]**o + ((-0.349611448982-0.66945455553j))*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.252906885546+0.0476606945083j)*x_ref[2]**o + ((-0.349611448982-0.66945455553j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.193486624384-0.20143733189j)*x[2]**o + ((0.149161741475+0.379583344702j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.193486624384-0.20143733189j)*x_ref[2]**o + ((0.149161741475+0.379583344702j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.228668413178+0.681472221866j)*x[2]**o + ((-0.369636174543+0.332544960388j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.228668413178+0.681472221866j)*x_ref[2]**o + ((-0.369636174543+0.332544960388j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.130171742482+0.212723692222j)*x[2]**o + ((-0.532274859366-0.338639102382j))*x[2]
+            ref[(2, 1, 1, 2)]+=(0.130171742482+0.212723692222j)*x_ref[2]**o + ((-0.532274859366-0.338639102382j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.962329938835+0.406180826438j)*x[2]**o + ((0.382844553839+0.418266953626j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.962329938835+0.406180826438j)*x_ref[2]**o + ((0.382844553839+0.418266953626j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.20660265143+0.786439502485j)*x[2]**o + ((-0.645028007227-0.230971173682j))*x[2]
+            ref[(2, 1, 2, 1)]+=(0.20660265143+0.786439502485j)*x_ref[2]**o + ((-0.645028007227-0.230971173682j))*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(-0.561038096398-0.951026004169j)*x[2]**o + ((-0.914799340307+0.017534973861j))*x[2]
+            ref[(2, 1, 2, 2)]+=(-0.561038096398-0.951026004169j)*x_ref[2]**o + ((-0.914799340307+0.017534973861j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.394187583006-0.419434290289j)*x[2]**o + ((-0.0477237569666-0.902948068402j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.394187583006-0.419434290289j)*x_ref[2]**o + ((-0.0477237569666-0.902948068402j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.913162592577-0.324969925095j)*x[2]**o + ((0.0992954993314+0.479979720249j))*x[2]
+            ref[(2, 2, 0, 1)]+=(0.913162592577-0.324969925095j)*x_ref[2]**o + ((0.0992954993314+0.479979720249j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(-0.343400168159-0.552579800137j)*x[2]**o + ((-0.276498302303+0.347328192j))*x[2]
+            ref[(2, 2, 0, 2)]+=(-0.343400168159-0.552579800137j)*x_ref[2]**o + ((-0.276498302303+0.347328192j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.792556300526-0.526281327036j)*x[2]**o + ((0.528042291031-0.255016790122j))*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.792556300526-0.526281327036j)*x_ref[2]**o + ((0.528042291031-0.255016790122j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.713618843217+0.580945312281j)*x[2]**o + ((-0.696031948351+0.520013128513j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.713618843217+0.580945312281j)*x_ref[2]**o + ((-0.696031948351+0.520013128513j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(-0.0175763993539-0.793701746969j)*x[2]**o + ((-0.130315467547+0.376136911599j))*x[2]
+            ref[(2, 2, 1, 2)]+=(-0.0175763993539-0.793701746969j)*x_ref[2]**o + ((-0.130315467547+0.376136911599j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(0.678201670517+0.35398413188j)*x[2]**o + ((0.351465442025+0.0629552350139j))*x[2]
+            ref[(2, 2, 2, 0)]+=(0.678201670517+0.35398413188j)*x_ref[2]**o + ((0.351465442025+0.0629552350139j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(-0.966459234776-0.180049819853j)*x[2]**o + ((0.608818023776+0.687525450068j))*x[2]
+            ref[(2, 2, 2, 1)]+=(-0.966459234776-0.180049819853j)*x_ref[2]**o + ((0.608818023776+0.687525450068j))*x_ref[2]
+            arg[(2, 2, 2, 2)]+=(0.29140335559+0.899840717319j)*x[2]**o + ((0.0484755200651-0.852985916084j))*x[2]
+            ref[(2, 2, 2, 2)]+=(0.29140335559+0.899840717319j)*x_ref[2]**o + ((0.0484755200651-0.852985916084j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.66935213835-0.0106931762908j)*x[0]**o + ((-0.46244854219+0.964437697012j))*x[0] + ((-0.695533390607+0.252158812121j))*x[1]**o + ((-0.279391056854-0.53628410617j))*x[1]
+        ref=(0.66935213835-0.0106931762908j)*x_ref[0]**o + ((-0.46244854219+0.964437697012j))*x_ref[0] + ((-0.695533390607+0.252158812121j))*x_ref[1]**o + ((-0.279391056854-0.53628410617j))*x_ref[1]
+        if dim==3:
+            arg+=((0.911519232439-0.638288871776j))*x[2]**o + ((0.923171857563-0.522519198785j))*x[2]
+            ref+=((0.911519232439-0.638288871776j))*x_ref[2]**o + ((0.923171857563-0.522519198785j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(-0.828546305481+0.125564390517j)*x[0]**o + ((0.466600100402+0.182062293397j))*x[0] + ((0.849907503794-0.0830261264068j))*x[1]**o + ((-0.920817459547-0.69786688474j))*x[1]
+        ref[(0,)]=(-0.828546305481+0.125564390517j)*x_ref[0]**o + ((0.466600100402+0.182062293397j))*x_ref[0] + ((0.849907503794-0.0830261264068j))*x_ref[1]**o + ((-0.920817459547-0.69786688474j))*x_ref[1]
+        arg[(1,)]=(0.0826019314169-0.0147469075428j)*x[0]**o + ((-0.323178818259-0.617649005689j))*x[0] + ((0.139013227471+0.816976347869j))*x[1]**o + ((0.905257068125-0.617643594522j))*x[1]
+        ref[(1,)]=(0.0826019314169-0.0147469075428j)*x_ref[0]**o + ((-0.323178818259-0.617649005689j))*x_ref[0] + ((0.139013227471+0.816976347869j))*x_ref[1]**o + ((0.905257068125-0.617643594522j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.922368707873-0.536079389428j)*x[2]**o + ((-0.642121052594+0.585131318028j))*x[2]
+            ref[(0,)]+=(0.922368707873-0.536079389428j)*x_ref[2]**o + ((-0.642121052594+0.585131318028j))*x_ref[2]
+            arg[(1,)]+=(0.4124595276+0.712457553295j)*x[2]**o + ((0.0631996780409-0.327966809117j))*x[2]
+            ref[(1,)]+=(0.4124595276+0.712457553295j)*x_ref[2]**o + ((0.0631996780409-0.327966809117j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(0.303726170177-0.257523763417j)*x[0]**o + ((-0.266165420297-0.675296833416j))*x[0] + ((0.505216998356+0.0683442656349j))*x[1]**o + ((-0.898605623411+0.831985141144j))*x[1]
+        ref[(0, 0)]=(0.303726170177-0.257523763417j)*x_ref[0]**o + ((-0.266165420297-0.675296833416j))*x_ref[0] + ((0.505216998356+0.0683442656349j))*x_ref[1]**o + ((-0.898605623411+0.831985141144j))*x_ref[1]
+        arg[(0, 1)]=(-0.142240837804-0.100042963607j)*x[0]**o + ((-0.643630327453-0.987708919261j))*x[0] + ((-0.149931274112+0.93587305053j))*x[1]**o + ((-0.564940654779+0.160073591784j))*x[1]
+        ref[(0, 1)]=(-0.142240837804-0.100042963607j)*x_ref[0]**o + ((-0.643630327453-0.987708919261j))*x_ref[0] + ((-0.149931274112+0.93587305053j))*x_ref[1]**o + ((-0.564940654779+0.160073591784j))*x_ref[1]
+        arg[(0, 2)]=(-0.224212999757-0.753399500593j)*x[0]**o + ((0.200314058766-0.488182894707j))*x[0] + ((0.484474446903-0.402488099921j))*x[1]**o + ((-0.18502926207-0.329964813694j))*x[1]
+        ref[(0, 2)]=(-0.224212999757-0.753399500593j)*x_ref[0]**o + ((0.200314058766-0.488182894707j))*x_ref[0] + ((0.484474446903-0.402488099921j))*x_ref[1]**o + ((-0.18502926207-0.329964813694j))*x_ref[1]
+        arg[(1, 0)]=(0.664655389247-0.73625854814j)*x[0]**o + ((-0.59567769604-0.63034369691j))*x[0] + ((0.0145583791079-0.977769913873j))*x[1]**o + ((0.869553444439+0.0292542611931j))*x[1]
+        ref[(1, 0)]=(0.664655389247-0.73625854814j)*x_ref[0]**o + ((-0.59567769604-0.63034369691j))*x_ref[0] + ((0.0145583791079-0.977769913873j))*x_ref[1]**o + ((0.869553444439+0.0292542611931j))*x_ref[1]
+        arg[(1, 1)]=(0.57497844454+0.0133631981273j)*x[0]**o + ((-0.210849134683-0.472549463423j))*x[0] + ((0.961677524105+0.937876433653j))*x[1]**o + ((0.592941825913-0.401743029363j))*x[1]
+        ref[(1, 1)]=(0.57497844454+0.0133631981273j)*x_ref[0]**o + ((-0.210849134683-0.472549463423j))*x_ref[0] + ((0.961677524105+0.937876433653j))*x_ref[1]**o + ((0.592941825913-0.401743029363j))*x_ref[1]
+        arg[(1, 2)]=(0.116709028565+0.38111545725j)*x[0]**o + ((-0.837514707121+0.949361858995j))*x[0] + ((-0.0584507652288-0.726220439222j))*x[1]**o + ((0.989132949523-0.867226965109j))*x[1]
+        ref[(1, 2)]=(0.116709028565+0.38111545725j)*x_ref[0]**o + ((-0.837514707121+0.949361858995j))*x_ref[0] + ((-0.0584507652288-0.726220439222j))*x_ref[1]**o + ((0.989132949523-0.867226965109j))*x_ref[1]
+        arg[(2, 0)]=(-0.0048822527323+0.37474701995j)*x[0]**o + ((-0.318142935826-0.524683401081j))*x[0] + ((0.227240022445+0.20511637751j))*x[1]**o + ((-0.611666879031+0.516406495965j))*x[1]
+        ref[(2, 0)]=(-0.0048822527323+0.37474701995j)*x_ref[0]**o + ((-0.318142935826-0.524683401081j))*x_ref[0] + ((0.227240022445+0.20511637751j))*x_ref[1]**o + ((-0.611666879031+0.516406495965j))*x_ref[1]
+        arg[(2, 1)]=(-0.407008611822+0.197699034509j)*x[0]**o + ((-0.490250700122+0.568574532198j))*x[0] + ((-0.121746066969-0.0343916968866j))*x[1]**o + ((0.847537408768+0.397691968951j))*x[1]
+        ref[(2, 1)]=(-0.407008611822+0.197699034509j)*x_ref[0]**o + ((-0.490250700122+0.568574532198j))*x_ref[0] + ((-0.121746066969-0.0343916968866j))*x_ref[1]**o + ((0.847537408768+0.397691968951j))*x_ref[1]
+        arg[(2, 2)]=(0.527633618796+0.117124950124j)*x[0]**o + ((-0.668720800197-0.0745190970656j))*x[0] + ((0.836746856232+0.822990752026j))*x[1]**o + ((0.105915269714+0.592572087963j))*x[1]
+        ref[(2, 2)]=(0.527633618796+0.117124950124j)*x_ref[0]**o + ((-0.668720800197-0.0745190970656j))*x_ref[0] + ((0.836746856232+0.822990752026j))*x_ref[1]**o + ((0.105915269714+0.592572087963j))*x_ref[1]
+        arg[(3, 0)]=(0.442725315218+0.886318758499j)*x[0]**o + ((0.414208654135-0.783762710834j))*x[0] + ((-0.598934538716+0.951903441863j))*x[1]**o + ((0.679328090773+0.63705219228j))*x[1]
+        ref[(3, 0)]=(0.442725315218+0.886318758499j)*x_ref[0]**o + ((0.414208654135-0.783762710834j))*x_ref[0] + ((-0.598934538716+0.951903441863j))*x_ref[1]**o + ((0.679328090773+0.63705219228j))*x_ref[1]
+        arg[(3, 1)]=(-0.147636925657+0.03545570268j)*x[0]**o + ((0.728767117877-0.307288691663j))*x[0] + ((0.563876068065-0.692285205229j))*x[1]**o + ((0.0589730203096-0.193184059976j))*x[1]
+        ref[(3, 1)]=(-0.147636925657+0.03545570268j)*x_ref[0]**o + ((0.728767117877-0.307288691663j))*x_ref[0] + ((0.563876068065-0.692285205229j))*x_ref[1]**o + ((0.0589730203096-0.193184059976j))*x_ref[1]
+        arg[(3, 2)]=(0.0210975278137+0.328231486401j)*x[0]**o + ((-0.607059088238-0.744247966957j))*x[0] + ((-0.485360708572+0.0884719298064j))*x[1]**o + ((-0.108202494327-0.880587498853j))*x[1]
+        ref[(3, 2)]=(0.0210975278137+0.328231486401j)*x_ref[0]**o + ((-0.607059088238-0.744247966957j))*x_ref[0] + ((-0.485360708572+0.0884719298064j))*x_ref[1]**o + ((-0.108202494327-0.880587498853j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.112715096628-0.993089375863j)*x[2]**o + ((-0.81725301884-0.0998903060495j))*x[2]
+            ref[(0, 0)]+=(-0.112715096628-0.993089375863j)*x_ref[2]**o + ((-0.81725301884-0.0998903060495j))*x_ref[2]
+            arg[(0, 1)]+=(-0.984873132523-0.958702862799j)*x[2]**o + ((0.60012371554-0.326909915924j))*x[2]
+            ref[(0, 1)]+=(-0.984873132523-0.958702862799j)*x_ref[2]**o + ((0.60012371554-0.326909915924j))*x_ref[2]
+            arg[(0, 2)]+=(0.463620515742+0.118859654439j)*x[2]**o + ((0.81454163373-0.187835338766j))*x[2]
+            ref[(0, 2)]+=(0.463620515742+0.118859654439j)*x_ref[2]**o + ((0.81454163373-0.187835338766j))*x_ref[2]
+            arg[(1, 0)]+=(-0.894220168592+0.851061003608j)*x[2]**o + ((-0.131262486694+0.0911626123717j))*x[2]
+            ref[(1, 0)]+=(-0.894220168592+0.851061003608j)*x_ref[2]**o + ((-0.131262486694+0.0911626123717j))*x_ref[2]
+            arg[(1, 1)]+=(-0.832053045783+0.641529672354j)*x[2]**o + ((-0.288329473194+0.408762550361j))*x[2]
+            ref[(1, 1)]+=(-0.832053045783+0.641529672354j)*x_ref[2]**o + ((-0.288329473194+0.408762550361j))*x_ref[2]
+            arg[(1, 2)]+=(-0.888975145712-0.591481109662j)*x[2]**o + ((-0.665086965437-0.373148436714j))*x[2]
+            ref[(1, 2)]+=(-0.888975145712-0.591481109662j)*x_ref[2]**o + ((-0.665086965437-0.373148436714j))*x_ref[2]
+            arg[(2, 0)]+=(-0.0465519788097-0.550493968012j)*x[2]**o + ((0.0133225440005+0.380536012496j))*x[2]
+            ref[(2, 0)]+=(-0.0465519788097-0.550493968012j)*x_ref[2]**o + ((0.0133225440005+0.380536012496j))*x_ref[2]
+            arg[(2, 1)]+=(0.998155224905+0.929180845026j)*x[2]**o + ((-0.730744205151-0.74005109801j))*x[2]
+            ref[(2, 1)]+=(0.998155224905+0.929180845026j)*x_ref[2]**o + ((-0.730744205151-0.74005109801j))*x_ref[2]
+            arg[(2, 2)]+=(0.179153227229+0.576436866929j)*x[2]**o + ((-0.533868344453-0.870214850762j))*x[2]
+            ref[(2, 2)]+=(0.179153227229+0.576436866929j)*x_ref[2]**o + ((-0.533868344453-0.870214850762j))*x_ref[2]
+            arg[(3, 0)]+=(0.631815656388+0.0972862605277j)*x[2]**o + ((-0.742970095856-0.46140905592j))*x[2]
+            ref[(3, 0)]+=(0.631815656388+0.0972862605277j)*x_ref[2]**o + ((-0.742970095856-0.46140905592j))*x_ref[2]
+            arg[(3, 1)]+=(-0.987099247813+0.86513224186j)*x[2]**o + ((-0.200328636027-0.147463665377j))*x[2]
+            ref[(3, 1)]+=(-0.987099247813+0.86513224186j)*x_ref[2]**o + ((-0.200328636027-0.147463665377j))*x_ref[2]
+            arg[(3, 2)]+=(0.982830447298+0.153773363251j)*x[2]**o + ((-0.191921648263-0.164017607737j))*x[2]
+            ref[(3, 2)]+=(0.982830447298+0.153773363251j)*x_ref[2]**o + ((-0.191921648263-0.164017607737j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.10674924992+0.478432219073j)*x[0]**o + ((-0.0279783487665+0.652362178556j))*x[0] + ((-0.123554571483+0.666452893657j))*x[1]**o + ((0.278997533943+0.0774713262833j))*x[1]
+        ref[(0, 0, 0)]=(-0.10674924992+0.478432219073j)*x_ref[0]**o + ((-0.0279783487665+0.652362178556j))*x_ref[0] + ((-0.123554571483+0.666452893657j))*x_ref[1]**o + ((0.278997533943+0.0774713262833j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.100189375844+0.695029725236j)*x[0]**o + ((-0.457314088697-0.407026770371j))*x[0] + ((-0.461052280616-0.924158532286j))*x[1]**o + ((-0.399741326563+0.174071944883j))*x[1]
+        ref[(0, 0, 1)]=(-0.100189375844+0.695029725236j)*x_ref[0]**o + ((-0.457314088697-0.407026770371j))*x_ref[0] + ((-0.461052280616-0.924158532286j))*x_ref[1]**o + ((-0.399741326563+0.174071944883j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.0302340348794-0.0424391393807j)*x[0]**o + ((-0.0438121262394-0.627615561026j))*x[0] + ((0.524887265616-0.143565047118j))*x[1]**o + ((0.611910040484-0.744341180919j))*x[1]
+        ref[(0, 1, 0)]=(-0.0302340348794-0.0424391393807j)*x_ref[0]**o + ((-0.0438121262394-0.627615561026j))*x_ref[0] + ((0.524887265616-0.143565047118j))*x_ref[1]**o + ((0.611910040484-0.744341180919j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.828279509642-0.271788515933j)*x[0]**o + ((-0.225572117796+0.549181586014j))*x[0] + ((-0.534690377196-0.73647554436j))*x[1]**o + ((-0.447519471532-0.236518544931j))*x[1]
+        ref[(0, 1, 1)]=(-0.828279509642-0.271788515933j)*x_ref[0]**o + ((-0.225572117796+0.549181586014j))*x_ref[0] + ((-0.534690377196-0.73647554436j))*x_ref[1]**o + ((-0.447519471532-0.236518544931j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.316244869308-0.637525203871j)*x[0]**o + ((0.0895638859924+0.77590787503j))*x[0] + ((0.842097690279-0.0550596868785j))*x[1]**o + ((0.527228776671-0.248034230447j))*x[1]
+        ref[(0, 2, 0)]=(-0.316244869308-0.637525203871j)*x_ref[0]**o + ((0.0895638859924+0.77590787503j))*x_ref[0] + ((0.842097690279-0.0550596868785j))*x_ref[1]**o + ((0.527228776671-0.248034230447j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.334430042601+0.14863943135j)*x[0]**o + ((-0.69340472258+0.87608300888j))*x[0] + ((-0.490856126219+0.82460720739j))*x[1]**o + ((0.784074995722-0.453831758229j))*x[1]
+        ref[(0, 2, 1)]=(-0.334430042601+0.14863943135j)*x_ref[0]**o + ((-0.69340472258+0.87608300888j))*x_ref[0] + ((-0.490856126219+0.82460720739j))*x_ref[1]**o + ((0.784074995722-0.453831758229j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.603689729221-0.843361726879j)*x[0]**o + ((0.695326981776+0.0252714835344j))*x[0] + ((-0.0251650829761-0.842301177951j))*x[1]**o + ((-0.841778837858+0.642056228576j))*x[1]
+        ref[(1, 0, 0)]=(-0.603689729221-0.843361726879j)*x_ref[0]**o + ((0.695326981776+0.0252714835344j))*x_ref[0] + ((-0.0251650829761-0.842301177951j))*x_ref[1]**o + ((-0.841778837858+0.642056228576j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.406437721732-0.548875611427j)*x[0]**o + ((-0.353624679696+0.982952396668j))*x[0] + ((0.772562047054-0.0410610993246j))*x[1]**o + ((0.463258010969-0.217783384442j))*x[1]
+        ref[(1, 0, 1)]=(-0.406437721732-0.548875611427j)*x_ref[0]**o + ((-0.353624679696+0.982952396668j))*x_ref[0] + ((0.772562047054-0.0410610993246j))*x_ref[1]**o + ((0.463258010969-0.217783384442j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.0248705398412+0.780851971812j)*x[0]**o + ((-0.990470032336+0.352902322898j))*x[0] + ((-0.17111478253-0.278447861043j))*x[1]**o + ((-0.230500707963+0.819878895814j))*x[1]
+        ref[(1, 1, 0)]=(-0.0248705398412+0.780851971812j)*x_ref[0]**o + ((-0.990470032336+0.352902322898j))*x_ref[0] + ((-0.17111478253-0.278447861043j))*x_ref[1]**o + ((-0.230500707963+0.819878895814j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.99088718933-0.926528309409j)*x[0]**o + ((-0.0216707200605+0.959483776302j))*x[0] + ((-0.205283289171+0.556431893322j))*x[1]**o + ((-0.119489274427-0.249491142752j))*x[1]
+        ref[(1, 1, 1)]=(0.99088718933-0.926528309409j)*x_ref[0]**o + ((-0.0216707200605+0.959483776302j))*x_ref[0] + ((-0.205283289171+0.556431893322j))*x_ref[1]**o + ((-0.119489274427-0.249491142752j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.212125055051-0.770580295748j)*x[0]**o + ((0.211265217835+0.617718513585j))*x[0] + ((-0.283043351537-0.206102207548j))*x[1]**o + ((-0.530830129934-0.585438807085j))*x[1]
+        ref[(1, 2, 0)]=(-0.212125055051-0.770580295748j)*x_ref[0]**o + ((0.211265217835+0.617718513585j))*x_ref[0] + ((-0.283043351537-0.206102207548j))*x_ref[1]**o + ((-0.530830129934-0.585438807085j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.592668259901-0.449597083758j)*x[0]**o + ((0.686192754639+0.478291241008j))*x[0] + ((0.797691642408+0.538475412837j))*x[1]**o + ((-0.679867493915-0.101367686731j))*x[1]
+        ref[(1, 2, 1)]=(-0.592668259901-0.449597083758j)*x_ref[0]**o + ((0.686192754639+0.478291241008j))*x_ref[0] + ((0.797691642408+0.538475412837j))*x_ref[1]**o + ((-0.679867493915-0.101367686731j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.841095153267-0.170900589647j)*x[0]**o + ((-0.307158961654+0.14334131113j))*x[0] + ((0.642553547139-0.196267446352j))*x[1]**o + ((-0.918492165607-0.424065176584j))*x[1]
+        ref[(2, 0, 0)]=(-0.841095153267-0.170900589647j)*x_ref[0]**o + ((-0.307158961654+0.14334131113j))*x_ref[0] + ((0.642553547139-0.196267446352j))*x_ref[1]**o + ((-0.918492165607-0.424065176584j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.0423362535332-0.696446951185j)*x[0]**o + ((-0.113835666004-0.730738987807j))*x[0] + ((0.126284949826-0.842172177119j))*x[1]**o + ((-0.614003490885+0.253360131843j))*x[1]
+        ref[(2, 0, 1)]=(0.0423362535332-0.696446951185j)*x_ref[0]**o + ((-0.113835666004-0.730738987807j))*x_ref[0] + ((0.126284949826-0.842172177119j))*x_ref[1]**o + ((-0.614003490885+0.253360131843j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.552784540762+0.0849295946324j)*x[0]**o + ((0.99257281512-0.447551023067j))*x[0] + ((-0.733433892847+0.343065728077j))*x[1]**o + ((-0.154176732054+0.916757144691j))*x[1]
+        ref[(2, 1, 0)]=(-0.552784540762+0.0849295946324j)*x_ref[0]**o + ((0.99257281512-0.447551023067j))*x_ref[0] + ((-0.733433892847+0.343065728077j))*x_ref[1]**o + ((-0.154176732054+0.916757144691j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.580642430598+0.952082245963j)*x[0]**o + ((-0.237321288151-0.07154503994j))*x[0] + ((0.814975382418-0.337725780201j))*x[1]**o + ((-0.180983615652-0.762956346712j))*x[1]
+        ref[(2, 1, 1)]=(0.580642430598+0.952082245963j)*x_ref[0]**o + ((-0.237321288151-0.07154503994j))*x_ref[0] + ((0.814975382418-0.337725780201j))*x_ref[1]**o + ((-0.180983615652-0.762956346712j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.485999272854+0.626062550105j)*x[0]**o + ((0.24420548708-0.204166794927j))*x[0] + ((0.916582559997-0.781892723071j))*x[1]**o + ((-0.219763226355+0.156354832892j))*x[1]
+        ref[(2, 2, 0)]=(-0.485999272854+0.626062550105j)*x_ref[0]**o + ((0.24420548708-0.204166794927j))*x_ref[0] + ((0.916582559997-0.781892723071j))*x_ref[1]**o + ((-0.219763226355+0.156354832892j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.972346451502-0.591783595304j)*x[0]**o + ((0.104797573541-0.927625556204j))*x[0] + ((0.66440736679+0.236614795701j))*x[1]**o + ((-0.531796647334+0.406554608492j))*x[1]
+        ref[(2, 2, 1)]=(-0.972346451502-0.591783595304j)*x_ref[0]**o + ((0.104797573541-0.927625556204j))*x_ref[0] + ((0.66440736679+0.236614795701j))*x_ref[1]**o + ((-0.531796647334+0.406554608492j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.211747196639+0.630749332715j)*x[0]**o + ((-0.785166161561-0.034544409422j))*x[0] + ((0.512239276798-0.255040234745j))*x[1]**o + ((0.980003874796-0.867900066276j))*x[1]
+        ref[(3, 0, 0)]=(-0.211747196639+0.630749332715j)*x_ref[0]**o + ((-0.785166161561-0.034544409422j))*x_ref[0] + ((0.512239276798-0.255040234745j))*x_ref[1]**o + ((0.980003874796-0.867900066276j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.268721121114-0.887687267279j)*x[0]**o + ((-0.968111803111+0.740425040833j))*x[0] + ((0.626112788938+0.367367863295j))*x[1]**o + ((-0.532457183587-0.629910240805j))*x[1]
+        ref[(3, 0, 1)]=(0.268721121114-0.887687267279j)*x_ref[0]**o + ((-0.968111803111+0.740425040833j))*x_ref[0] + ((0.626112788938+0.367367863295j))*x_ref[1]**o + ((-0.532457183587-0.629910240805j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.38107677527+0.58381517632j)*x[0]**o + ((0.0534300701612+0.617762402477j))*x[0] + ((0.590319739205-0.395812508274j))*x[1]**o + ((-0.286268092946+0.855122131343j))*x[1]
+        ref[(3, 1, 0)]=(-0.38107677527+0.58381517632j)*x_ref[0]**o + ((0.0534300701612+0.617762402477j))*x_ref[0] + ((0.590319739205-0.395812508274j))*x_ref[1]**o + ((-0.286268092946+0.855122131343j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.59777182432-0.0370220962051j)*x[0]**o + ((-0.892270101526+0.497112141292j))*x[0] + ((-0.840467119611-0.30705740019j))*x[1]**o + ((-0.897424540159-0.808899972228j))*x[1]
+        ref[(3, 1, 1)]=(-0.59777182432-0.0370220962051j)*x_ref[0]**o + ((-0.892270101526+0.497112141292j))*x_ref[0] + ((-0.840467119611-0.30705740019j))*x_ref[1]**o + ((-0.897424540159-0.808899972228j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.732075751344-0.233182179495j)*x[0]**o + ((-0.949153166799+0.27557366782j))*x[0] + ((-0.288340636788-0.807248589094j))*x[1]**o + ((-0.165889643602+0.255404742806j))*x[1]
+        ref[(3, 2, 0)]=(0.732075751344-0.233182179495j)*x_ref[0]**o + ((-0.949153166799+0.27557366782j))*x_ref[0] + ((-0.288340636788-0.807248589094j))*x_ref[1]**o + ((-0.165889643602+0.255404742806j))*x_ref[1]
+        arg[(3, 2, 1)]=(-0.474705601571-0.287821757015j)*x[0]**o + ((0.620669689901-0.0287469445445j))*x[0] + ((0.797636861109+0.134424728323j))*x[1]**o + ((-0.876656303997-0.19615576673j))*x[1]
+        ref[(3, 2, 1)]=(-0.474705601571-0.287821757015j)*x_ref[0]**o + ((0.620669689901-0.0287469445445j))*x_ref[0] + ((0.797636861109+0.134424728323j))*x_ref[1]**o + ((-0.876656303997-0.19615576673j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.409536128638-0.918511969443j)*x[2]**o + ((-0.953772860182-0.146626157401j))*x[2]
+            ref[(0, 0, 0)]+=(0.409536128638-0.918511969443j)*x_ref[2]**o + ((-0.953772860182-0.146626157401j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.174862528831-0.0858466746401j)*x[2]**o + ((-0.748955663862-0.163647649736j))*x[2]
+            ref[(0, 0, 1)]+=(0.174862528831-0.0858466746401j)*x_ref[2]**o + ((-0.748955663862-0.163647649736j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.142446810999+0.327321735475j)*x[2]**o + ((-0.307932216136+0.95479783015j))*x[2]
+            ref[(0, 1, 0)]+=(-0.142446810999+0.327321735475j)*x_ref[2]**o + ((-0.307932216136+0.95479783015j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.566560097936-0.746590383239j)*x[2]**o + ((-0.780532043485+0.126414054191j))*x[2]
+            ref[(0, 1, 1)]+=(0.566560097936-0.746590383239j)*x_ref[2]**o + ((-0.780532043485+0.126414054191j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.427759724384-0.731734216438j)*x[2]**o + ((-0.912929208503-0.804830295338j))*x[2]
+            ref[(0, 2, 0)]+=(-0.427759724384-0.731734216438j)*x_ref[2]**o + ((-0.912929208503-0.804830295338j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.998563577879-0.870560110857j)*x[2]**o + ((-0.0705331761799-0.00784374057634j))*x[2]
+            ref[(0, 2, 1)]+=(-0.998563577879-0.870560110857j)*x_ref[2]**o + ((-0.0705331761799-0.00784374057634j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.46254497049-0.158625117619j)*x[2]**o + ((-0.706932591351-0.459889281389j))*x[2]
+            ref[(1, 0, 0)]+=(0.46254497049-0.158625117619j)*x_ref[2]**o + ((-0.706932591351-0.459889281389j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.768928796592+0.389865602669j)*x[2]**o + ((0.163981397007+0.66782809926j))*x[2]
+            ref[(1, 0, 1)]+=(-0.768928796592+0.389865602669j)*x_ref[2]**o + ((0.163981397007+0.66782809926j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.776643522868+0.441615342031j)*x[2]**o + ((0.700342396054-0.0613902334759j))*x[2]
+            ref[(1, 1, 0)]+=(-0.776643522868+0.441615342031j)*x_ref[2]**o + ((0.700342396054-0.0613902334759j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.831151297272+0.866014625843j)*x[2]**o + ((-0.465189248733-0.816049669875j))*x[2]
+            ref[(1, 1, 1)]+=(-0.831151297272+0.866014625843j)*x_ref[2]**o + ((-0.465189248733-0.816049669875j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.884835820265-0.0649125780813j)*x[2]**o + ((0.944177041289-0.629628378709j))*x[2]
+            ref[(1, 2, 0)]+=(-0.884835820265-0.0649125780813j)*x_ref[2]**o + ((0.944177041289-0.629628378709j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.484081850285-0.945600218594j)*x[2]**o + ((0.386256612793-0.683289357186j))*x[2]
+            ref[(1, 2, 1)]+=(-0.484081850285-0.945600218594j)*x_ref[2]**o + ((0.386256612793-0.683289357186j))*x_ref[2]
+            arg[(2, 0, 0)]+=(0.304888735214+0.682347846243j)*x[2]**o + ((-0.868740119259-0.960393085237j))*x[2]
+            ref[(2, 0, 0)]+=(0.304888735214+0.682347846243j)*x_ref[2]**o + ((-0.868740119259-0.960393085237j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.313368331484-0.454227660485j)*x[2]**o + ((-0.859561368785+0.595418823219j))*x[2]
+            ref[(2, 0, 1)]+=(-0.313368331484-0.454227660485j)*x_ref[2]**o + ((-0.859561368785+0.595418823219j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.312474303944-0.987442058527j)*x[2]**o + ((0.108831851321+0.237574558135j))*x[2]
+            ref[(2, 1, 0)]+=(-0.312474303944-0.987442058527j)*x_ref[2]**o + ((0.108831851321+0.237574558135j))*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.409304814483+0.283077412471j)*x[2]**o + ((0.580886091222-0.100860506514j))*x[2]
+            ref[(2, 1, 1)]+=(-0.409304814483+0.283077412471j)*x_ref[2]**o + ((0.580886091222-0.100860506514j))*x_ref[2]
+            arg[(2, 2, 0)]+=(0.864540607876-0.0591396603613j)*x[2]**o + ((0.363509764383+0.630948647677j))*x[2]
+            ref[(2, 2, 0)]+=(0.864540607876-0.0591396603613j)*x_ref[2]**o + ((0.363509764383+0.630948647677j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.849075474905-0.418198997328j)*x[2]**o + ((0.298762053844-0.490581596026j))*x[2]
+            ref[(2, 2, 1)]+=(0.849075474905-0.418198997328j)*x_ref[2]**o + ((0.298762053844-0.490581596026j))*x_ref[2]
+            arg[(3, 0, 0)]+=(0.664510225251+0.873262323134j)*x[2]**o + ((0.896617905417+0.748867624614j))*x[2]
+            ref[(3, 0, 0)]+=(0.664510225251+0.873262323134j)*x_ref[2]**o + ((0.896617905417+0.748867624614j))*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.453911632093-0.544517199251j)*x[2]**o + ((0.328933482325+0.787031270964j))*x[2]
+            ref[(3, 0, 1)]+=(-0.453911632093-0.544517199251j)*x_ref[2]**o + ((0.328933482325+0.787031270964j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.0393131296894+0.617948090811j)*x[2]**o + ((-0.90326756805+0.438610139749j))*x[2]
+            ref[(3, 1, 0)]+=(-0.0393131296894+0.617948090811j)*x_ref[2]**o + ((-0.90326756805+0.438610139749j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.792101219892+0.505432701242j)*x[2]**o + ((0.0242341367097+0.381191707668j))*x[2]
+            ref[(3, 1, 1)]+=(0.792101219892+0.505432701242j)*x_ref[2]**o + ((0.0242341367097+0.381191707668j))*x_ref[2]
+            arg[(3, 2, 0)]+=(0.984684216308-0.261888849276j)*x[2]**o + ((0.800084993959-0.910404098298j))*x[2]
+            ref[(3, 2, 0)]+=(0.984684216308-0.261888849276j)*x_ref[2]**o + ((0.800084993959-0.910404098298j))*x_ref[2]
+            arg[(3, 2, 1)]+=(-0.695933869541-0.708681857063j)*x[2]**o + ((-0.400236827353-0.380727021898j))*x[2]
+            ref[(3, 2, 1)]+=(-0.695933869541-0.708681857063j)*x_ref[2]**o + ((-0.400236827353-0.380727021898j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 3, 2),w)
+        ref = Data(0,(2, 4, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.213824583478+0.296656872655j)*x[0]**o + ((-0.340883353323-0.471640347022j))*x[0] + ((-0.567297060306+0.212067256559j))*x[1]**o + ((-0.52988798037-0.901184705397j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.213824583478+0.296656872655j)*x_ref[0]**o + ((-0.340883353323-0.471640347022j))*x_ref[0] + ((-0.567297060306+0.212067256559j))*x_ref[1]**o + ((-0.52988798037-0.901184705397j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.337648240338-0.431906424328j)*x[0]**o + ((0.859714169084+0.636201794183j))*x[0] + ((-0.0532591133462+0.769066822598j))*x[1]**o + ((0.0798021332189+0.956443650967j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.337648240338-0.431906424328j)*x_ref[0]**o + ((0.859714169084+0.636201794183j))*x_ref[0] + ((-0.0532591133462+0.769066822598j))*x_ref[1]**o + ((0.0798021332189+0.956443650967j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.795647872613-0.16445458806j)*x[0]**o + ((-0.470505707579-0.419116924125j))*x[0] + ((0.247937616768+0.395130202632j))*x[1]**o + ((-0.983034614498-0.893641778642j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.795647872613-0.16445458806j)*x_ref[0]**o + ((-0.470505707579-0.419116924125j))*x_ref[0] + ((0.247937616768+0.395130202632j))*x_ref[1]**o + ((-0.983034614498-0.893641778642j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.259799365643-0.517460247746j)*x[0]**o + ((-0.503831869251+0.805927492138j))*x[0] + ((-0.721815741281-0.666099301792j))*x[1]**o + ((-0.674465235831-0.324544671305j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.259799365643-0.517460247746j)*x_ref[0]**o + ((-0.503831869251+0.805927492138j))*x_ref[0] + ((-0.721815741281-0.666099301792j))*x_ref[1]**o + ((-0.674465235831-0.324544671305j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.614125939766-0.00952764350881j)*x[0]**o + ((0.366115927632-0.977708441562j))*x[0] + ((0.135210984614+0.625246706677j))*x[1]**o + ((-0.661230865278+0.780273603389j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.614125939766-0.00952764350881j)*x_ref[0]**o + ((0.366115927632-0.977708441562j))*x_ref[0] + ((0.135210984614+0.625246706677j))*x_ref[1]**o + ((-0.661230865278+0.780273603389j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.801461041719-0.840300500681j)*x[0]**o + ((0.55941681644+0.390611454733j))*x[0] + ((0.578272368501+0.430479026257j))*x[1]**o + ((0.541269774313+0.056881264699j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.801461041719-0.840300500681j)*x_ref[0]**o + ((0.55941681644+0.390611454733j))*x_ref[0] + ((0.578272368501+0.430479026257j))*x_ref[1]**o + ((0.541269774313+0.056881264699j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.358662638681+0.3965273262j)*x[0]**o + ((0.441654485957-0.878302231681j))*x[0] + ((-0.109306234512+0.3326879604j))*x[1]**o + ((0.686627019287+0.949912916372j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.358662638681+0.3965273262j)*x_ref[0]**o + ((0.441654485957-0.878302231681j))*x_ref[0] + ((-0.109306234512+0.3326879604j))*x_ref[1]**o + ((0.686627019287+0.949912916372j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.876225878669+0.85492641691j)*x[0]**o + ((-0.893461816006+0.755527187312j))*x[0] + ((-0.544461169196+0.595030493708j))*x[1]**o + ((0.22768049879+0.209961093654j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.876225878669+0.85492641691j)*x_ref[0]**o + ((-0.893461816006+0.755527187312j))*x_ref[0] + ((-0.544461169196+0.595030493708j))*x_ref[1]**o + ((0.22768049879+0.209961093654j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.726651945579-0.768540670932j)*x[0]**o + ((-0.788742484654-0.485927905716j))*x[0] + ((-0.99145086175+0.691175487273j))*x[1]**o + ((-0.0830178520777-0.817747452792j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.726651945579-0.768540670932j)*x_ref[0]**o + ((-0.788742484654-0.485927905716j))*x_ref[0] + ((-0.99145086175+0.691175487273j))*x_ref[1]**o + ((-0.0830178520777-0.817747452792j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.511013722287+0.735167620954j)*x[0]**o + ((0.551231824557+0.326445633252j))*x[0] + ((-0.348619849268+0.11924922212j))*x[1]**o + ((-0.605360561714+0.561112124328j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.511013722287+0.735167620954j)*x_ref[0]**o + ((0.551231824557+0.326445633252j))*x_ref[0] + ((-0.348619849268+0.11924922212j))*x_ref[1]**o + ((-0.605360561714+0.561112124328j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(-0.8525620872-0.500343284857j)*x[0]**o + ((0.983178268664-0.0219941519224j))*x[0] + ((-0.369560237255+0.693655469878j))*x[1]**o + ((-0.559289196101-0.671998602581j))*x[1]
+        ref[(0, 1, 2, 0)]=(-0.8525620872-0.500343284857j)*x_ref[0]**o + ((0.983178268664-0.0219941519224j))*x_ref[0] + ((-0.369560237255+0.693655469878j))*x_ref[1]**o + ((-0.559289196101-0.671998602581j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.355038641699+0.438594033076j)*x[0]**o + ((-0.985447640284+0.90658689468j))*x[0] + ((-0.537417070682+0.140986086214j))*x[1]**o + ((-0.581604652465-0.240387151143j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.355038641699+0.438594033076j)*x_ref[0]**o + ((-0.985447640284+0.90658689468j))*x_ref[0] + ((-0.537417070682+0.140986086214j))*x_ref[1]**o + ((-0.581604652465-0.240387151143j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.883176550475+0.523105046961j)*x[0]**o + ((0.273945423658-0.875308762875j))*x[0] + ((0.432474970375-0.948076143214j))*x[1]**o + ((0.944638898583-0.267063621889j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.883176550475+0.523105046961j)*x_ref[0]**o + ((0.273945423658-0.875308762875j))*x_ref[0] + ((0.432474970375-0.948076143214j))*x_ref[1]**o + ((0.944638898583-0.267063621889j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.199762897493+0.554744508687j)*x[0]**o + ((-0.304608178411-0.961442387031j))*x[0] + ((0.0501573049675-0.0735784880807j))*x[1]**o + ((-0.715383678992-0.710272741908j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.199762897493+0.554744508687j)*x_ref[0]**o + ((-0.304608178411-0.961442387031j))*x_ref[0] + ((0.0501573049675-0.0735784880807j))*x_ref[1]**o + ((-0.715383678992-0.710272741908j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.889759809072-0.927481787279j)*x[0]**o + ((0.615866897766-0.215438823971j))*x[0] + ((-0.474168021154-0.448465218603j))*x[1]**o + ((0.627161590353-0.0623652192891j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.889759809072-0.927481787279j)*x_ref[0]**o + ((0.615866897766-0.215438823971j))*x_ref[0] + ((-0.474168021154-0.448465218603j))*x_ref[1]**o + ((0.627161590353-0.0623652192891j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.58585640042+0.199758330847j)*x[0]**o + ((0.449404590019-0.237575319148j))*x[0] + ((0.968001652231-0.278205660176j))*x[1]**o + ((-0.178150462415-0.906820679982j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.58585640042+0.199758330847j)*x_ref[0]**o + ((0.449404590019-0.237575319148j))*x_ref[0] + ((0.968001652231-0.278205660176j))*x_ref[1]**o + ((-0.178150462415-0.906820679982j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(0.894087136796+0.42532882269j)*x[0]**o + ((0.421303693671+0.771256481999j))*x[0] + ((0.8223349563-0.392746272473j))*x[1]**o + ((-0.484051418844-0.958940029476j))*x[1]
+        ref[(0, 2, 2, 0)]=(0.894087136796+0.42532882269j)*x_ref[0]**o + ((0.421303693671+0.771256481999j))*x_ref[0] + ((0.8223349563-0.392746272473j))*x_ref[1]**o + ((-0.484051418844-0.958940029476j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.598918689004+0.238809462587j)*x[0]**o + ((-0.0654375132944+0.00843605394703j))*x[0] + ((-0.390736964526+0.365540000406j))*x[1]**o + ((-0.716306453562-0.816149456466j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.598918689004+0.238809462587j)*x_ref[0]**o + ((-0.0654375132944+0.00843605394703j))*x_ref[0] + ((-0.390736964526+0.365540000406j))*x_ref[1]**o + ((-0.716306453562-0.816149456466j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.174567957304-0.354624081617j)*x[0]**o + ((0.589203808023-0.727284768002j))*x[0] + ((0.295384423354-0.969538739892j))*x[1]**o + ((0.256637490145+0.428804593552j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.174567957304-0.354624081617j)*x_ref[0]**o + ((0.589203808023-0.727284768002j))*x_ref[0] + ((0.295384423354-0.969538739892j))*x_ref[1]**o + ((0.256637490145+0.428804593552j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.859748941403-0.880451836013j)*x[0]**o + ((0.311271946556+0.910791394044j))*x[0] + ((0.310410535523+0.647906664687j))*x[1]**o + ((0.780056909405-0.751063637077j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.859748941403-0.880451836013j)*x_ref[0]**o + ((0.311271946556+0.910791394044j))*x_ref[0] + ((0.310410535523+0.647906664687j))*x_ref[1]**o + ((0.780056909405-0.751063637077j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.105421161633-0.896069073061j)*x[0]**o + ((-0.563326653168-0.923926857996j))*x[0] + ((0.752002959153+0.73780216855j))*x[1]**o + ((0.414160676371+0.6906707804j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.105421161633-0.896069073061j)*x_ref[0]**o + ((-0.563326653168-0.923926857996j))*x_ref[0] + ((0.752002959153+0.73780216855j))*x_ref[1]**o + ((0.414160676371+0.6906707804j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.427355859718+0.930615572222j)*x[0]**o + ((0.939673307253-0.959191132911j))*x[0] + ((0.0375204978582-0.272806469918j))*x[1]**o + ((-0.145935974075-0.556157149286j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.427355859718+0.930615572222j)*x_ref[0]**o + ((0.939673307253-0.959191132911j))*x_ref[0] + ((0.0375204978582-0.272806469918j))*x_ref[1]**o + ((-0.145935974075-0.556157149286j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(0.213694296317+0.683643024218j)*x[0]**o + ((0.919209150965-0.913368766659j))*x[0] + ((-0.216041638586-0.644526712564j))*x[1]**o + ((-0.729286632616-0.687708048372j))*x[1]
+        ref[(0, 3, 2, 0)]=(0.213694296317+0.683643024218j)*x_ref[0]**o + ((0.919209150965-0.913368766659j))*x_ref[0] + ((-0.216041638586-0.644526712564j))*x_ref[1]**o + ((-0.729286632616-0.687708048372j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(-0.633172440568+0.448499743149j)*x[0]**o + ((-0.344848705703-0.306196687127j))*x[0] + ((-0.237404584365-0.0121082689456j))*x[1]**o + ((0.939710663009+0.0278108021835j))*x[1]
+        ref[(0, 3, 2, 1)]=(-0.633172440568+0.448499743149j)*x_ref[0]**o + ((-0.344848705703-0.306196687127j))*x_ref[0] + ((-0.237404584365-0.0121082689456j))*x_ref[1]**o + ((0.939710663009+0.0278108021835j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.0365506747894-0.216640221187j)*x[0]**o + ((0.767495790914-0.984615792805j))*x[0] + ((0.400058174245+0.636868343972j))*x[1]**o + ((0.440320894567+0.559690294245j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.0365506747894-0.216640221187j)*x_ref[0]**o + ((0.767495790914-0.984615792805j))*x_ref[0] + ((0.400058174245+0.636868343972j))*x_ref[1]**o + ((0.440320894567+0.559690294245j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.391020311486-0.979244046793j)*x[0]**o + ((-0.299288251586-0.374810536134j))*x[0] + ((0.648482185426-0.356297523813j))*x[1]**o + ((0.496973339171+0.758249622094j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.391020311486-0.979244046793j)*x_ref[0]**o + ((-0.299288251586-0.374810536134j))*x_ref[0] + ((0.648482185426-0.356297523813j))*x_ref[1]**o + ((0.496973339171+0.758249622094j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.16539388835-0.505967718925j)*x[0]**o + ((0.287262943103-0.83903353965j))*x[0] + ((0.891475169073+0.954492771054j))*x[1]**o + ((0.724777320578-0.529009932808j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.16539388835-0.505967718925j)*x_ref[0]**o + ((0.287262943103-0.83903353965j))*x_ref[0] + ((0.891475169073+0.954492771054j))*x_ref[1]**o + ((0.724777320578-0.529009932808j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.688971760492+0.676135933895j)*x[0]**o + ((0.280248543918+0.070923547598j))*x[0] + ((-0.825357947103+0.367704738475j))*x[1]**o + ((0.132807715791+0.885084333297j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.688971760492+0.676135933895j)*x_ref[0]**o + ((0.280248543918+0.070923547598j))*x_ref[0] + ((-0.825357947103+0.367704738475j))*x_ref[1]**o + ((0.132807715791+0.885084333297j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.734693928518-0.414022899268j)*x[0]**o + ((-0.67110605713-0.708472970927j))*x[0] + ((-0.9135049509+0.263919740587j))*x[1]**o + ((0.631349359547-0.883235501157j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.734693928518-0.414022899268j)*x_ref[0]**o + ((-0.67110605713-0.708472970927j))*x_ref[0] + ((-0.9135049509+0.263919740587j))*x_ref[1]**o + ((0.631349359547-0.883235501157j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.729183176546+0.517745005329j)*x[0]**o + ((0.390191791887+0.0204559796174j))*x[0] + ((-0.398924317492-0.463098734702j))*x[1]**o + ((0.00382018640702-0.38642276744j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.729183176546+0.517745005329j)*x_ref[0]**o + ((0.390191791887+0.0204559796174j))*x_ref[0] + ((-0.398924317492-0.463098734702j))*x_ref[1]**o + ((0.00382018640702-0.38642276744j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.752444975612-0.722639499093j)*x[0]**o + ((-0.937658403998+0.0271084797409j))*x[0] + ((0.101750461714+0.783096718168j))*x[1]**o + ((0.737520993627+0.68719004836j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.752444975612-0.722639499093j)*x_ref[0]**o + ((-0.937658403998+0.0271084797409j))*x_ref[0] + ((0.101750461714+0.783096718168j))*x_ref[1]**o + ((0.737520993627+0.68719004836j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.945768225831+0.982008511426j)*x[0]**o + ((0.0771899896078+0.525193916113j))*x[0] + ((-0.903552466905-0.0631022588083j))*x[1]**o + ((0.0766785138145-0.592779607147j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.945768225831+0.982008511426j)*x_ref[0]**o + ((0.0771899896078+0.525193916113j))*x_ref[0] + ((-0.903552466905-0.0631022588083j))*x_ref[1]**o + ((0.0766785138145-0.592779607147j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.755719725503-0.765848057125j)*x[0]**o + ((-0.286348882589-0.559695928303j))*x[0] + ((-0.307011466951-0.599825027482j))*x[1]**o + ((0.212105048847+0.334746380907j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.755719725503-0.765848057125j)*x_ref[0]**o + ((-0.286348882589-0.559695928303j))*x_ref[0] + ((-0.307011466951-0.599825027482j))*x_ref[1]**o + ((0.212105048847+0.334746380907j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.795694578756-0.0305801323231j)*x[0]**o + ((-0.135744425037+0.892325689493j))*x[0] + ((0.599914023127+0.390668367283j))*x[1]**o + ((0.713121594872-0.00813160762364j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.795694578756-0.0305801323231j)*x_ref[0]**o + ((-0.135744425037+0.892325689493j))*x_ref[0] + ((0.599914023127+0.390668367283j))*x_ref[1]**o + ((0.713121594872-0.00813160762364j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.461193687159+0.604538998826j)*x[0]**o + ((-0.579273041549-0.882010819063j))*x[0] + ((-0.189072321534-0.971922688689j))*x[1]**o + ((0.721892082439-0.550837300985j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.461193687159+0.604538998826j)*x_ref[0]**o + ((-0.579273041549-0.882010819063j))*x_ref[0] + ((-0.189072321534-0.971922688689j))*x_ref[1]**o + ((0.721892082439-0.550837300985j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.461995407015+0.277699143176j)*x[0]**o + ((-0.532407701714-0.0475085043823j))*x[0] + ((-0.33219455534+0.0321548459389j))*x[1]**o + ((-0.788031040338-0.128815113543j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.461995407015+0.277699143176j)*x_ref[0]**o + ((-0.532407701714-0.0475085043823j))*x_ref[0] + ((-0.33219455534+0.0321548459389j))*x_ref[1]**o + ((-0.788031040338-0.128815113543j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.980380611524+0.749271231726j)*x[0]**o + ((0.734356589061-0.337821072727j))*x[0] + ((-0.228790397778-0.901700722909j))*x[1]**o + ((0.620280855129+0.884614855944j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.980380611524+0.749271231726j)*x_ref[0]**o + ((0.734356589061-0.337821072727j))*x_ref[0] + ((-0.228790397778-0.901700722909j))*x_ref[1]**o + ((0.620280855129+0.884614855944j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.313130543628+0.902158661434j)*x[0]**o + ((-0.712401090169-0.0405706855796j))*x[0] + ((0.955824111694-0.236681541232j))*x[1]**o + ((-0.876464330524-0.367820575232j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.313130543628+0.902158661434j)*x_ref[0]**o + ((-0.712401090169-0.0405706855796j))*x_ref[0] + ((0.955824111694-0.236681541232j))*x_ref[1]**o + ((-0.876464330524-0.367820575232j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.421025775495+0.132499070285j)*x[0]**o + ((0.8113616152-0.482278273514j))*x[0] + ((0.975800111894-0.812434379843j))*x[1]**o + ((0.572253022381+0.251026949061j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.421025775495+0.132499070285j)*x_ref[0]**o + ((0.8113616152-0.482278273514j))*x_ref[0] + ((0.975800111894-0.812434379843j))*x_ref[1]**o + ((0.572253022381+0.251026949061j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.799728021825+0.918760902171j)*x[0]**o + ((0.192727000835-0.449138319714j))*x[0] + ((0.918671270089+0.566416829296j))*x[1]**o + ((-0.121257051145+0.336560012279j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.799728021825+0.918760902171j)*x_ref[0]**o + ((0.192727000835-0.449138319714j))*x_ref[0] + ((0.918671270089+0.566416829296j))*x_ref[1]**o + ((-0.121257051145+0.336560012279j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.808720292222+0.0445235595239j)*x[0]**o + ((-0.802909745745+0.696421790526j))*x[0] + ((0.24487588225+0.869188328578j))*x[1]**o + ((0.917565400168-0.677904966688j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.808720292222+0.0445235595239j)*x_ref[0]**o + ((-0.802909745745+0.696421790526j))*x_ref[0] + ((0.24487588225+0.869188328578j))*x_ref[1]**o + ((0.917565400168-0.677904966688j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(0.940132802277+0.917157969152j)*x[0]**o + ((0.976122742579-0.233553181292j))*x[0] + ((-0.28902795253-0.56910467339j))*x[1]**o + ((0.580036303414-0.872308052579j))*x[1]
+        ref[(1, 2, 2, 1)]=(0.940132802277+0.917157969152j)*x_ref[0]**o + ((0.976122742579-0.233553181292j))*x_ref[0] + ((-0.28902795253-0.56910467339j))*x_ref[1]**o + ((0.580036303414-0.872308052579j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(0.51226076716-0.790747741085j)*x[0]**o + ((0.80723721522+0.729616877259j))*x[0] + ((-0.925357253268+0.00320745421965j))*x[1]**o + ((-0.156367346689-0.853274617072j))*x[1]
+        ref[(1, 3, 0, 0)]=(0.51226076716-0.790747741085j)*x_ref[0]**o + ((0.80723721522+0.729616877259j))*x_ref[0] + ((-0.925357253268+0.00320745421965j))*x_ref[1]**o + ((-0.156367346689-0.853274617072j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(0.313897796578-0.497925033357j)*x[0]**o + ((-0.858771253564-0.905122722411j))*x[0] + ((0.135657953808+0.822129058426j))*x[1]**o + ((-0.814324555766+0.171427835519j))*x[1]
+        ref[(1, 3, 0, 1)]=(0.313897796578-0.497925033357j)*x_ref[0]**o + ((-0.858771253564-0.905122722411j))*x_ref[0] + ((0.135657953808+0.822129058426j))*x_ref[1]**o + ((-0.814324555766+0.171427835519j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.238220825431-0.722509166408j)*x[0]**o + ((-0.892056932396+0.157838149731j))*x[0] + ((0.0429509161064+0.773293285837j))*x[1]**o + ((-0.447454136405+0.250238683507j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.238220825431-0.722509166408j)*x_ref[0]**o + ((-0.892056932396+0.157838149731j))*x_ref[0] + ((0.0429509161064+0.773293285837j))*x_ref[1]**o + ((-0.447454136405+0.250238683507j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.698657526198+0.211465756195j)*x[0]**o + ((0.0977078011242+0.314629235705j))*x[0] + ((-0.526051168417-0.700360589024j))*x[1]**o + ((-0.296304648348-0.017174968387j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.698657526198+0.211465756195j)*x_ref[0]**o + ((0.0977078011242+0.314629235705j))*x_ref[0] + ((-0.526051168417-0.700360589024j))*x_ref[1]**o + ((-0.296304648348-0.017174968387j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(0.482128826252+0.625789961427j)*x[0]**o + ((0.952156129478+0.0154312562614j))*x[0] + ((0.594166977671+0.111049820308j))*x[1]**o + ((0.0998757984913+0.786410152828j))*x[1]
+        ref[(1, 3, 2, 0)]=(0.482128826252+0.625789961427j)*x_ref[0]**o + ((0.952156129478+0.0154312562614j))*x_ref[0] + ((0.594166977671+0.111049820308j))*x_ref[1]**o + ((0.0998757984913+0.786410152828j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(-0.418629234631+0.868119200965j)*x[0]**o + ((0.579716437858-0.497582793231j))*x[0] + ((-0.990441137602+0.540940295714j))*x[1]**o + ((0.395418326809+0.649791379165j))*x[1]
+        ref[(1, 3, 2, 1)]=(-0.418629234631+0.868119200965j)*x_ref[0]**o + ((0.579716437858-0.497582793231j))*x_ref[0] + ((-0.990441137602+0.540940295714j))*x_ref[1]**o + ((0.395418326809+0.649791379165j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.295900874791-0.959229916381j)*x[2]**o + ((-0.573857271629-0.327134507041j))*x[2]
+            ref[(0, 0, 0, 0)]+=(0.295900874791-0.959229916381j)*x_ref[2]**o + ((-0.573857271629-0.327134507041j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.0966159060121+0.594553334372j)*x[2]**o + ((-0.554615530415-0.597747527526j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.0966159060121+0.594553334372j)*x_ref[2]**o + ((-0.554615530415-0.597747527526j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.304273364299+0.233722701402j)*x[2]**o + ((0.0887000734892-0.620753005125j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.304273364299+0.233722701402j)*x_ref[2]**o + ((0.0887000734892-0.620753005125j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.196963273245-0.376806025653j)*x[2]**o + ((-0.486273188824+0.874474751112j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.196963273245-0.376806025653j)*x_ref[2]**o + ((-0.486273188824+0.874474751112j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.0382609661075+0.263302561674j)*x[2]**o + ((0.0372777684768+0.43795861901j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.0382609661075+0.263302561674j)*x_ref[2]**o + ((0.0372777684768+0.43795861901j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.474380224017-0.259422710623j)*x[2]**o + ((0.403826290914+0.644020928999j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.474380224017-0.259422710623j)*x_ref[2]**o + ((0.403826290914+0.644020928999j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.0967898447953+0.571408070198j)*x[2]**o + ((-0.465695362849+0.474825127887j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.0967898447953+0.571408070198j)*x_ref[2]**o + ((-0.465695362849+0.474825127887j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.905937691159+0.981809983671j)*x[2]**o + ((-0.636380722845+0.981746088963j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.905937691159+0.981809983671j)*x_ref[2]**o + ((-0.636380722845+0.981746088963j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.364467260683-0.314173474884j)*x[2]**o + ((0.357729299644-0.952171257841j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.364467260683-0.314173474884j)*x_ref[2]**o + ((0.357729299644-0.952171257841j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.926893371495+0.615282999756j)*x[2]**o + ((0.169047560528-0.254912191571j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.926893371495+0.615282999756j)*x_ref[2]**o + ((0.169047560528-0.254912191571j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.684732142133-0.178684587047j)*x[2]**o + ((-0.935446067755+0.972552044647j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.684732142133-0.178684587047j)*x_ref[2]**o + ((-0.935446067755+0.972552044647j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.0122218839649+0.277400005359j)*x[2]**o + ((0.826073266391+0.888755701192j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.0122218839649+0.277400005359j)*x_ref[2]**o + ((0.826073266391+0.888755701192j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.3301012127+0.194319648508j)*x[2]**o + ((0.122019570874-0.68574234384j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.3301012127+0.194319648508j)*x_ref[2]**o + ((0.122019570874-0.68574234384j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.227911946543+0.336080412904j)*x[2]**o + ((-0.659620867307+0.707210450468j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.227911946543+0.336080412904j)*x_ref[2]**o + ((-0.659620867307+0.707210450468j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.490698437317-0.424899098241j)*x[2]**o + ((-0.0865133651985-0.485511213779j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.490698437317-0.424899098241j)*x_ref[2]**o + ((-0.0865133651985-0.485511213779j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.190962931489-0.416239762281j)*x[2]**o + ((0.791206036877-0.0769719469269j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.190962931489-0.416239762281j)*x_ref[2]**o + ((0.791206036877-0.0769719469269j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(0.223734180098+0.255177668838j)*x[2]**o + ((-0.927547873368-0.34413123816j))*x[2]
+            ref[(0, 2, 2, 0)]+=(0.223734180098+0.255177668838j)*x_ref[2]**o + ((-0.927547873368-0.34413123816j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.606936873944-0.686410878958j)*x[2]**o + ((0.972229308144-0.0900234396428j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.606936873944-0.686410878958j)*x_ref[2]**o + ((0.972229308144-0.0900234396428j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.33281732828-0.343267333634j)*x[2]**o + ((-0.290086602617-0.848289113263j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.33281732828-0.343267333634j)*x_ref[2]**o + ((-0.290086602617-0.848289113263j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.680779683872-0.232494210272j)*x[2]**o + ((0.60014201423-0.700602575085j))*x[2]
+            ref[(0, 3, 0, 1)]+=(0.680779683872-0.232494210272j)*x_ref[2]**o + ((0.60014201423-0.700602575085j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(0.0514185502547-0.242975405552j)*x[2]**o + ((-0.134751854721+0.0832169708302j))*x[2]
+            ref[(0, 3, 1, 0)]+=(0.0514185502547-0.242975405552j)*x_ref[2]**o + ((-0.134751854721+0.0832169708302j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.946346585796+0.502485117186j)*x[2]**o + ((0.413748968658+0.510594342834j))*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.946346585796+0.502485117186j)*x_ref[2]**o + ((0.413748968658+0.510594342834j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(0.459232321222+0.485126230719j)*x[2]**o + ((-0.372677951623+0.661183220585j))*x[2]
+            ref[(0, 3, 2, 0)]+=(0.459232321222+0.485126230719j)*x_ref[2]**o + ((-0.372677951623+0.661183220585j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(0.641973645907-0.41595249263j)*x[2]**o + ((0.950098465854-0.871071657272j))*x[2]
+            ref[(0, 3, 2, 1)]+=(0.641973645907-0.41595249263j)*x_ref[2]**o + ((0.950098465854-0.871071657272j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.180726275765-0.0591399292106j)*x[2]**o + ((-0.129405498158-0.0672814854637j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.180726275765-0.0591399292106j)*x_ref[2]**o + ((-0.129405498158-0.0672814854637j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.458840397813-0.242000839235j)*x[2]**o + ((0.25032911639-0.795987421376j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.458840397813-0.242000839235j)*x_ref[2]**o + ((0.25032911639-0.795987421376j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.973571134092-0.848564286045j)*x[2]**o + ((-0.390445896511-0.702405889843j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.973571134092-0.848564286045j)*x_ref[2]**o + ((-0.390445896511-0.702405889843j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.80082058079-0.717597126501j)*x[2]**o + ((0.724887705209-0.204142069625j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.80082058079-0.717597126501j)*x_ref[2]**o + ((0.724887705209-0.204142069625j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.257316326003+0.842139758932j)*x[2]**o + ((0.13760416969-0.917982894728j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.257316326003+0.842139758932j)*x_ref[2]**o + ((0.13760416969-0.917982894728j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.470289598242-0.0533484371219j)*x[2]**o + ((0.962941548793+0.200079713712j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.470289598242-0.0533484371219j)*x_ref[2]**o + ((0.962941548793+0.200079713712j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.209373190904+0.986395326054j)*x[2]**o + ((-0.628414571032+0.142273893371j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.209373190904+0.986395326054j)*x_ref[2]**o + ((-0.628414571032+0.142273893371j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.898077214464-0.641004236886j)*x[2]**o + ((-0.665303899974+0.926366465507j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.898077214464-0.641004236886j)*x_ref[2]**o + ((-0.665303899974+0.926366465507j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.0706308041687+0.271659154906j)*x[2]**o + ((-0.126193481457-0.989903983115j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.0706308041687+0.271659154906j)*x_ref[2]**o + ((-0.126193481457-0.989903983115j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.61144118706+0.828947828229j)*x[2]**o + ((0.738508848932+0.191075513175j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.61144118706+0.828947828229j)*x_ref[2]**o + ((0.738508848932+0.191075513175j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.492776803055+0.962208772054j)*x[2]**o + ((0.434649628267+0.853945824921j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.492776803055+0.962208772054j)*x_ref[2]**o + ((0.434649628267+0.853945824921j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.787069738322-0.685306276823j)*x[2]**o + ((-0.996709338194-0.130264714065j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.787069738322-0.685306276823j)*x_ref[2]**o + ((-0.996709338194-0.130264714065j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.509807668624-0.834197702485j)*x[2]**o + ((-0.569748637476-0.0437512104235j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.509807668624-0.834197702485j)*x_ref[2]**o + ((-0.569748637476-0.0437512104235j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.377228839411-0.526161561887j)*x[2]**o + ((-0.330237702039-0.892334775004j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.377228839411-0.526161561887j)*x_ref[2]**o + ((-0.330237702039-0.892334775004j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.913350331637+0.544302721601j)*x[2]**o + ((0.775481748197-0.701260177666j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.913350331637+0.544302721601j)*x_ref[2]**o + ((0.775481748197-0.701260177666j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.83069810459+0.714302584835j)*x[2]**o + ((-0.259202767256-0.0726721122136j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.83069810459+0.714302584835j)*x_ref[2]**o + ((-0.259202767256-0.0726721122136j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.244212977884-0.141750977187j)*x[2]**o + ((0.782977241178+0.0635701952781j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.244212977884-0.141750977187j)*x_ref[2]**o + ((0.782977241178+0.0635701952781j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(-0.257834499399+0.433317390101j)*x[2]**o + ((-0.185257104434+0.4233144521j))*x[2]
+            ref[(1, 2, 2, 1)]+=(-0.257834499399+0.433317390101j)*x_ref[2]**o + ((-0.185257104434+0.4233144521j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.3069486134+0.477777545943j)*x[2]**o + ((-0.942307816029+0.365749734476j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.3069486134+0.477777545943j)*x_ref[2]**o + ((-0.942307816029+0.365749734476j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(0.945316068288-0.927764308323j)*x[2]**o + ((0.145578900842-0.337179304998j))*x[2]
+            ref[(1, 3, 0, 1)]+=(0.945316068288-0.927764308323j)*x_ref[2]**o + ((0.145578900842-0.337179304998j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.828471228917+0.39081188576j)*x[2]**o + ((-0.470050855278-0.422757372768j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.828471228917+0.39081188576j)*x_ref[2]**o + ((-0.470050855278-0.422757372768j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.968652850561-0.0618361964094j)*x[2]**o + ((0.266731947318-0.128630333518j))*x[2]
+            ref[(1, 3, 1, 1)]+=(0.968652850561-0.0618361964094j)*x_ref[2]**o + ((0.266731947318-0.128630333518j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(0.648550388802-0.935500908318j)*x[2]**o + ((-0.59693542179+0.174900148002j))*x[2]
+            ref[(1, 3, 2, 0)]+=(0.648550388802-0.935500908318j)*x_ref[2]**o + ((-0.59693542179+0.174900148002j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.592562991152+0.353003481549j)*x[2]**o + ((0.479926774082+0.396981040034j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.592562991152+0.353003481549j)*x_ref[2]**o + ((0.479926774082+0.396981040034j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.938367266793-0.163161657602j)*x[0] + ((-0.85444400323+0.987120153298j))*x[1]
+        ref=(-0.938367266793-0.163161657602j)*x_ref[0] + ((-0.85444400323+0.987120153298j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.0473009232852+0.170467839363j))*x[2]
+            ref+=((-0.0473009232852+0.170467839363j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.193959976522+0.526005510097j)*x[0] + ((0.713306847198+0.843191569067j))*x[1]
+        ref[(0,)]=(0.193959976522+0.526005510097j)*x_ref[0] + ((0.713306847198+0.843191569067j))*x_ref[1]
+        arg[(1,)]=(0.368052301088-0.934526400935j)*x[0] + ((-0.39260035803+0.179314047682j))*x[1]
+        ref[(1,)]=(0.368052301088-0.934526400935j)*x_ref[0] + ((-0.39260035803+0.179314047682j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.69431280535-0.618257616857j)*x[2]
+            ref[(0,)]+=(0.69431280535-0.618257616857j)*x_ref[2]
+            arg[(1,)]+=(-0.453522141622+0.920785583452j)*x[2]
+            ref[(1,)]+=(-0.453522141622+0.920785583452j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=(-0.323420034826-0.132558854288j)*x[0] + ((-0.743326760624-0.177094591914j))*x[1]
+        ref[(0, 0)]=(-0.323420034826-0.132558854288j)*x_ref[0] + ((-0.743326760624-0.177094591914j))*x_ref[1]
+        arg[(0, 1)]=(0.878879112028+0.554161409482j)*x[0] + ((0.982742859939-0.515493263771j))*x[1]
+        ref[(0, 1)]=(0.878879112028+0.554161409482j)*x_ref[0] + ((0.982742859939-0.515493263771j))*x_ref[1]
+        arg[(0, 2)]=(0.15701000214+0.512423898512j)*x[0] + ((0.517956050191-0.516977925207j))*x[1]
+        ref[(0, 2)]=(0.15701000214+0.512423898512j)*x_ref[0] + ((0.517956050191-0.516977925207j))*x_ref[1]
+        arg[(0, 3)]=(0.795776713376-0.0530742209486j)*x[0] + ((0.567553621607-0.381400892262j))*x[1]
+        ref[(0, 3)]=(0.795776713376-0.0530742209486j)*x_ref[0] + ((0.567553621607-0.381400892262j))*x_ref[1]
+        arg[(1, 0)]=(-0.0575327273153+0.134900585466j)*x[0] + ((-0.974072726613-0.69399143355j))*x[1]
+        ref[(1, 0)]=(-0.0575327273153+0.134900585466j)*x_ref[0] + ((-0.974072726613-0.69399143355j))*x_ref[1]
+        arg[(1, 1)]=(0.86955551632-0.814534032925j)*x[0] + ((-0.625608547019+0.875274409282j))*x[1]
+        ref[(1, 1)]=(0.86955551632-0.814534032925j)*x_ref[0] + ((-0.625608547019+0.875274409282j))*x_ref[1]
+        arg[(1, 2)]=(-0.942266753666-0.383770884363j)*x[0] + ((0.370186829812+0.404960259655j))*x[1]
+        ref[(1, 2)]=(-0.942266753666-0.383770884363j)*x_ref[0] + ((0.370186829812+0.404960259655j))*x_ref[1]
+        arg[(1, 3)]=(-0.129534417227-0.854866965677j)*x[0] + ((-0.749986226861-0.35854483082j))*x[1]
+        ref[(1, 3)]=(-0.129534417227-0.854866965677j)*x_ref[0] + ((-0.749986226861-0.35854483082j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.839531596606-0.0808683565468j)*x[2]
+            ref[(0, 0)]+=(0.839531596606-0.0808683565468j)*x_ref[2]
+            arg[(0, 1)]+=(-0.520849076917+0.342641051534j)*x[2]
+            ref[(0, 1)]+=(-0.520849076917+0.342641051534j)*x_ref[2]
+            arg[(0, 2)]+=(-0.554000663688+0.289864973057j)*x[2]
+            ref[(0, 2)]+=(-0.554000663688+0.289864973057j)*x_ref[2]
+            arg[(0, 3)]+=(0.753265209427+0.15392440605j)*x[2]
+            ref[(0, 3)]+=(0.753265209427+0.15392440605j)*x_ref[2]
+            arg[(1, 0)]+=(-0.713036101956+0.440155354204j)*x[2]
+            ref[(1, 0)]+=(-0.713036101956+0.440155354204j)*x_ref[2]
+            arg[(1, 1)]+=(-0.647165854877-0.134994548178j)*x[2]
+            ref[(1, 1)]+=(-0.647165854877-0.134994548178j)*x_ref[2]
+            arg[(1, 2)]+=(-0.937040975163-0.302362121261j)*x[2]
+            ref[(1, 2)]+=(-0.937040975163-0.302362121261j)*x_ref[2]
+            arg[(1, 3)]+=(0.822153367951-0.523173155886j)*x[2]
+            ref[(1, 3)]+=(0.822153367951-0.523173155886j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 4),w)
+        ref = Data(0,(2, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(0.823460709398+0.960261560357j)*x[0] + ((-0.676951396501+0.651982551028j))*x[1]
+        ref[(0, 0, 0)]=(0.823460709398+0.960261560357j)*x_ref[0] + ((-0.676951396501+0.651982551028j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.819599333479-0.854626974548j)*x[0] + ((-0.487869506795-0.670334059048j))*x[1]
+        ref[(0, 0, 1)]=(-0.819599333479-0.854626974548j)*x_ref[0] + ((-0.487869506795-0.670334059048j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.44976691962-0.521142614013j)*x[0] + ((-0.529308541531+0.953041511197j))*x[1]
+        ref[(0, 0, 2)]=(-0.44976691962-0.521142614013j)*x_ref[0] + ((-0.529308541531+0.953041511197j))*x_ref[1]
+        arg[(0, 0, 3)]=(-0.305864399979-0.0604771589716j)*x[0] + ((0.14742772426+0.824528440941j))*x[1]
+        ref[(0, 0, 3)]=(-0.305864399979-0.0604771589716j)*x_ref[0] + ((0.14742772426+0.824528440941j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.411101523783+0.0862970981927j)*x[0] + ((-0.854729805634-0.173214605495j))*x[1]
+        ref[(0, 1, 0)]=(0.411101523783+0.0862970981927j)*x_ref[0] + ((-0.854729805634-0.173214605495j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.0624921387768-0.629683859553j)*x[0] + ((0.00167674216315-0.647335401309j))*x[1]
+        ref[(0, 1, 1)]=(0.0624921387768-0.629683859553j)*x_ref[0] + ((0.00167674216315-0.647335401309j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.946353346966+0.491139057893j)*x[0] + ((0.907940319757-0.772744772759j))*x[1]
+        ref[(0, 1, 2)]=(0.946353346966+0.491139057893j)*x_ref[0] + ((0.907940319757-0.772744772759j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.488780639512+0.718384053775j)*x[0] + ((-0.976327871111-0.45973330475j))*x[1]
+        ref[(0, 1, 3)]=(-0.488780639512+0.718384053775j)*x_ref[0] + ((-0.976327871111-0.45973330475j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.507732341017-0.359718267552j)*x[0] + ((0.353375309622+0.51877221065j))*x[1]
+        ref[(0, 2, 0)]=(-0.507732341017-0.359718267552j)*x_ref[0] + ((0.353375309622+0.51877221065j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.351039110347-0.168271971154j)*x[0] + ((0.950447516819-0.990528918879j))*x[1]
+        ref[(0, 2, 1)]=(0.351039110347-0.168271971154j)*x_ref[0] + ((0.950447516819-0.990528918879j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.263388293612-0.816022948869j)*x[0] + ((-0.677696793261+0.89587534288j))*x[1]
+        ref[(0, 2, 2)]=(0.263388293612-0.816022948869j)*x_ref[0] + ((-0.677696793261+0.89587534288j))*x_ref[1]
+        arg[(0, 2, 3)]=(0.238326548264+0.294711105104j)*x[0] + ((0.0585161983589+0.903835610929j))*x[1]
+        ref[(0, 2, 3)]=(0.238326548264+0.294711105104j)*x_ref[0] + ((0.0585161983589+0.903835610929j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.471096813212+0.0612673787703j)*x[0] + ((0.157298995642+0.957119802782j))*x[1]
+        ref[(1, 0, 0)]=(-0.471096813212+0.0612673787703j)*x_ref[0] + ((0.157298995642+0.957119802782j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.47725820344-0.824844314705j)*x[0] + ((0.0166537279042+0.491925706842j))*x[1]
+        ref[(1, 0, 1)]=(0.47725820344-0.824844314705j)*x_ref[0] + ((0.0166537279042+0.491925706842j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.0319505936494+0.980625728133j)*x[0] + ((0.788675549598+0.280882008184j))*x[1]
+        ref[(1, 0, 2)]=(-0.0319505936494+0.980625728133j)*x_ref[0] + ((0.788675549598+0.280882008184j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.808075980754+0.92117800488j)*x[0] + ((-0.188355708817-0.662146754472j))*x[1]
+        ref[(1, 0, 3)]=(0.808075980754+0.92117800488j)*x_ref[0] + ((-0.188355708817-0.662146754472j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.334153838694+0.871141707824j)*x[0] + ((-0.677051448955+0.924057143906j))*x[1]
+        ref[(1, 1, 0)]=(-0.334153838694+0.871141707824j)*x_ref[0] + ((-0.677051448955+0.924057143906j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.112186977591+0.259224592514j)*x[0] + ((0.782960266641+0.332989677217j))*x[1]
+        ref[(1, 1, 1)]=(-0.112186977591+0.259224592514j)*x_ref[0] + ((0.782960266641+0.332989677217j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.239514573899-0.798441774734j)*x[0] + ((0.00683888593179+0.31962021178j))*x[1]
+        ref[(1, 1, 2)]=(-0.239514573899-0.798441774734j)*x_ref[0] + ((0.00683888593179+0.31962021178j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.47106443338+0.941297773453j)*x[0] + ((-0.172748868231+0.819161213182j))*x[1]
+        ref[(1, 1, 3)]=(-0.47106443338+0.941297773453j)*x_ref[0] + ((-0.172748868231+0.819161213182j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.410087833762-0.500128601459j)*x[0] + ((0.677241811004+0.0319576242681j))*x[1]
+        ref[(1, 2, 0)]=(-0.410087833762-0.500128601459j)*x_ref[0] + ((0.677241811004+0.0319576242681j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.2549182681-0.812600676741j)*x[0] + ((-0.231256103751-0.783001414806j))*x[1]
+        ref[(1, 2, 1)]=(-0.2549182681-0.812600676741j)*x_ref[0] + ((-0.231256103751-0.783001414806j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.745455575142-0.191460935378j)*x[0] + ((-0.844390852079+0.49699039883j))*x[1]
+        ref[(1, 2, 2)]=(0.745455575142-0.191460935378j)*x_ref[0] + ((-0.844390852079+0.49699039883j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.749244944236-0.908401694912j)*x[0] + ((-0.530159297177+0.464443944756j))*x[1]
+        ref[(1, 2, 3)]=(-0.749244944236-0.908401694912j)*x_ref[0] + ((-0.530159297177+0.464443944756j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.643989404118+0.974434550083j)*x[2]
+            ref[(0, 0, 0)]+=(0.643989404118+0.974434550083j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.947094507785+0.861974441327j)*x[2]
+            ref[(0, 0, 1)]+=(0.947094507785+0.861974441327j)*x_ref[2]
+            arg[(0, 0, 2)]+=(0.0197877572394-0.134509727393j)*x[2]
+            ref[(0, 0, 2)]+=(0.0197877572394-0.134509727393j)*x_ref[2]
+            arg[(0, 0, 3)]+=(0.458461376983+0.278726720068j)*x[2]
+            ref[(0, 0, 3)]+=(0.458461376983+0.278726720068j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.997623105548-0.700190275807j)*x[2]
+            ref[(0, 1, 0)]+=(-0.997623105548-0.700190275807j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.110386909395-0.0706619924778j)*x[2]
+            ref[(0, 1, 1)]+=(-0.110386909395-0.0706619924778j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.87766751818+0.722667697577j)*x[2]
+            ref[(0, 1, 2)]+=(0.87766751818+0.722667697577j)*x_ref[2]
+            arg[(0, 1, 3)]+=(0.146984851313+0.788866044641j)*x[2]
+            ref[(0, 1, 3)]+=(0.146984851313+0.788866044641j)*x_ref[2]
+            arg[(0, 2, 0)]+=(0.0413798879069-0.121918723162j)*x[2]
+            ref[(0, 2, 0)]+=(0.0413798879069-0.121918723162j)*x_ref[2]
+            arg[(0, 2, 1)]+=(0.00100384775046-0.544382680582j)*x[2]
+            ref[(0, 2, 1)]+=(0.00100384775046-0.544382680582j)*x_ref[2]
+            arg[(0, 2, 2)]+=(0.482515268626+0.992777650473j)*x[2]
+            ref[(0, 2, 2)]+=(0.482515268626+0.992777650473j)*x_ref[2]
+            arg[(0, 2, 3)]+=(-0.00575995436205+0.634442463502j)*x[2]
+            ref[(0, 2, 3)]+=(-0.00575995436205+0.634442463502j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.610289508976+0.987803879411j)*x[2]
+            ref[(1, 0, 0)]+=(0.610289508976+0.987803879411j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.28478622184-0.636621936918j)*x[2]
+            ref[(1, 0, 1)]+=(0.28478622184-0.636621936918j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.757309251688+0.856570203552j)*x[2]
+            ref[(1, 0, 2)]+=(0.757309251688+0.856570203552j)*x_ref[2]
+            arg[(1, 0, 3)]+=(-0.305957113288+0.461292225245j)*x[2]
+            ref[(1, 0, 3)]+=(-0.305957113288+0.461292225245j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.703300507222+0.196507425264j)*x[2]
+            ref[(1, 1, 0)]+=(0.703300507222+0.196507425264j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.421371031875-0.710099917374j)*x[2]
+            ref[(1, 1, 1)]+=(-0.421371031875-0.710099917374j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.674110218107-0.282219969471j)*x[2]
+            ref[(1, 1, 2)]+=(0.674110218107-0.282219969471j)*x_ref[2]
+            arg[(1, 1, 3)]+=(0.0543656798959+0.0627442739732j)*x[2]
+            ref[(1, 1, 3)]+=(0.0543656798959+0.0627442739732j)*x_ref[2]
+            arg[(1, 2, 0)]+=(0.29376870759+0.667906859945j)*x[2]
+            ref[(1, 2, 0)]+=(0.29376870759+0.667906859945j)*x_ref[2]
+            arg[(1, 2, 1)]+=(0.979892515329-0.284612172487j)*x[2]
+            ref[(1, 2, 1)]+=(0.979892515329-0.284612172487j)*x_ref[2]
+            arg[(1, 2, 2)]+=(0.894949107601-0.323142955585j)*x[2]
+            ref[(1, 2, 2)]+=(0.894949107601-0.323142955585j)*x_ref[2]
+            arg[(1, 2, 3)]+=(-0.629713777099-0.308961343366j)*x[2]
+            ref[(1, 2, 3)]+=(-0.629713777099-0.308961343366j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2, 3),w)
+        ref = Data(0,(3, 3, 2, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(0.938802201892+0.938999692129j)*x[0] + ((-0.557889926338+0.389170693616j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.938802201892+0.938999692129j)*x_ref[0] + ((-0.557889926338+0.389170693616j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.281972876446-0.11758784562j)*x[0] + ((0.768806240589-0.448806948247j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.281972876446-0.11758784562j)*x_ref[0] + ((0.768806240589-0.448806948247j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(-0.966874233411-0.281540755605j)*x[0] + ((-0.321460022894-0.761224289387j))*x[1]
+        ref[(0, 0, 0, 2)]=(-0.966874233411-0.281540755605j)*x_ref[0] + ((-0.321460022894-0.761224289387j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.741493527449+0.0820955068927j)*x[0] + ((-0.395535434587+0.786877343891j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.741493527449+0.0820955068927j)*x_ref[0] + ((-0.395535434587+0.786877343891j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.478292636096-0.274286860321j)*x[0] + ((-0.685455303802-0.351036367453j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.478292636096-0.274286860321j)*x_ref[0] + ((-0.685455303802-0.351036367453j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.406271777114-0.021143174674j)*x[0] + ((0.822588924202-0.499447440763j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.406271777114-0.021143174674j)*x_ref[0] + ((0.822588924202-0.499447440763j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.0617550802748+0.403172623935j)*x[0] + ((0.50402391575-0.657808169292j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.0617550802748+0.403172623935j)*x_ref[0] + ((0.50402391575-0.657808169292j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.00624385837151+0.777826414747j)*x[0] + ((0.203118228043-0.966489367779j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.00624385837151+0.777826414747j)*x_ref[0] + ((0.203118228043-0.966489367779j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.0769016579532-0.350456828419j)*x[0] + ((0.550254472149+0.123277048497j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.0769016579532-0.350456828419j)*x_ref[0] + ((0.550254472149+0.123277048497j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.379741033259-0.250673038887j)*x[0] + ((0.540508552237+0.595966262926j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.379741033259-0.250673038887j)*x_ref[0] + ((0.540508552237+0.595966262926j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.117156800102-0.102400916648j)*x[0] + ((-0.887531407699-0.921813621771j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.117156800102-0.102400916648j)*x_ref[0] + ((-0.887531407699-0.921813621771j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.0332312521042-0.302590105861j)*x[0] + ((-0.257855259664+0.22255598561j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.0332312521042-0.302590105861j)*x_ref[0] + ((-0.257855259664+0.22255598561j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.113213674379+0.624002617094j)*x[0] + ((0.410359747566+0.633484642113j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.113213674379+0.624002617094j)*x_ref[0] + ((0.410359747566+0.633484642113j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.525184937918-0.673281648688j)*x[0] + ((-0.26562676683-0.0505628202808j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.525184937918-0.673281648688j)*x_ref[0] + ((-0.26562676683-0.0505628202808j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.998968187693+0.992697524514j)*x[0] + ((0.252168992185+0.0351232750919j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.998968187693+0.992697524514j)*x_ref[0] + ((0.252168992185+0.0351232750919j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.737903047791+0.307154125381j)*x[0] + ((0.93699459253-0.178329618001j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.737903047791+0.307154125381j)*x_ref[0] + ((0.93699459253-0.178329618001j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.737461833632-0.376037062916j)*x[0] + ((0.694308307964+0.708282315882j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.737461833632-0.376037062916j)*x_ref[0] + ((0.694308307964+0.708282315882j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(-0.11883290544-0.432985234447j)*x[0] + ((-0.747824473969+0.73175970319j))*x[1]
+        ref[(0, 2, 1, 2)]=(-0.11883290544-0.432985234447j)*x_ref[0] + ((-0.747824473969+0.73175970319j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.530800074807-0.637697102165j)*x[0] + ((0.502544251643-0.0762486654075j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.530800074807-0.637697102165j)*x_ref[0] + ((0.502544251643-0.0762486654075j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.804441994976-0.101283949697j)*x[0] + ((0.763401020517-0.778357120684j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.804441994976-0.101283949697j)*x_ref[0] + ((0.763401020517-0.778357120684j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.552518937293+0.658847095333j)*x[0] + ((-0.765606113492+0.99975531489j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.552518937293+0.658847095333j)*x_ref[0] + ((-0.765606113492+0.99975531489j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.555282110518-0.804071920107j)*x[0] + ((-0.123337090327-0.227535853856j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.555282110518-0.804071920107j)*x_ref[0] + ((-0.123337090327-0.227535853856j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.890249761694+0.348178582373j)*x[0] + ((0.985118933258-0.34633451554j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.890249761694+0.348178582373j)*x_ref[0] + ((0.985118933258-0.34633451554j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.734642347363+0.793422901156j)*x[0] + ((-0.0595310394488-0.620843335733j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.734642347363+0.793422901156j)*x_ref[0] + ((-0.0595310394488-0.620843335733j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.61371885807-0.0269313932089j)*x[0] + ((0.507929744033+0.303165039899j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.61371885807-0.0269313932089j)*x_ref[0] + ((0.507929744033+0.303165039899j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.811168688478-0.228880065411j)*x[0] + ((-0.541270322145-0.982593164699j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.811168688478-0.228880065411j)*x_ref[0] + ((-0.541270322145-0.982593164699j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.732838361974-0.829878539758j)*x[0] + ((-0.494189812193+0.178625830303j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.732838361974-0.829878539758j)*x_ref[0] + ((-0.494189812193+0.178625830303j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.230149003348-0.946166577936j)*x[0] + ((-0.189981810122-0.180156013745j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.230149003348-0.946166577936j)*x_ref[0] + ((-0.189981810122-0.180156013745j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.0473910028384-0.904067157841j)*x[0] + ((0.792130954911-0.753954746461j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.0473910028384-0.904067157841j)*x_ref[0] + ((0.792130954911-0.753954746461j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.385612543355-0.292064942282j)*x[0] + ((0.194889906219+0.669682315488j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.385612543355-0.292064942282j)*x_ref[0] + ((0.194889906219+0.669682315488j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.127604203384+0.674502209536j)*x[0] + ((0.330509999124-0.686032984119j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.127604203384+0.674502209536j)*x_ref[0] + ((0.330509999124-0.686032984119j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.92522352284-0.641899149789j)*x[0] + ((-0.740358974994+0.840318707443j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.92522352284-0.641899149789j)*x_ref[0] + ((-0.740358974994+0.840318707443j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(-0.755209273752+0.366577256422j)*x[0] + ((0.805350011176+0.792270065329j))*x[1]
+        ref[(1, 2, 0, 2)]=(-0.755209273752+0.366577256422j)*x_ref[0] + ((0.805350011176+0.792270065329j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.254132871179+0.322130857281j)*x[0] + ((0.681464326066+0.430682484374j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.254132871179+0.322130857281j)*x_ref[0] + ((0.681464326066+0.430682484374j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.786250588741-0.745761559712j)*x[0] + ((0.155577585208-0.0997656128692j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.786250588741-0.745761559712j)*x_ref[0] + ((0.155577585208-0.0997656128692j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(-0.570434040018-0.0337713995267j)*x[0] + ((-0.0573673489872+0.503304482246j))*x[1]
+        ref[(1, 2, 1, 2)]=(-0.570434040018-0.0337713995267j)*x_ref[0] + ((-0.0573673489872+0.503304482246j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.803298444766-0.88849636999j)*x[0] + ((0.727838025415+0.940237582669j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.803298444766-0.88849636999j)*x_ref[0] + ((0.727838025415+0.940237582669j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.175919409354+0.319190525619j)*x[0] + ((-0.10812603105+0.538298305878j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.175919409354+0.319190525619j)*x_ref[0] + ((-0.10812603105+0.538298305878j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.0800047388351+0.296708408145j)*x[0] + ((0.88957817415-0.780254275145j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.0800047388351+0.296708408145j)*x_ref[0] + ((0.88957817415-0.780254275145j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.746542000926+0.544266063189j)*x[0] + ((0.158953352075+0.109974003714j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.746542000926+0.544266063189j)*x_ref[0] + ((0.158953352075+0.109974003714j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.389835756032-0.646545695242j)*x[0] + ((0.427123352365-0.878805996212j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.389835756032-0.646545695242j)*x_ref[0] + ((0.427123352365-0.878805996212j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.773362751447-0.624667299039j)*x[0] + ((0.887410559805+0.484262812857j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.773362751447-0.624667299039j)*x_ref[0] + ((0.887410559805+0.484262812857j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.0912557886987-0.151499678336j)*x[0] + ((0.712686350844-0.650933334825j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.0912557886987-0.151499678336j)*x_ref[0] + ((0.712686350844-0.650933334825j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.464765415872-0.635106962067j)*x[0] + ((0.276476188477-0.47545100992j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.464765415872-0.635106962067j)*x_ref[0] + ((0.276476188477-0.47545100992j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.382960307007+0.0219337787588j)*x[0] + ((0.413771256379+0.566224535321j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.382960307007+0.0219337787588j)*x_ref[0] + ((0.413771256379+0.566224535321j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.317183979841+0.602841993348j)*x[0] + ((-0.237134080489-0.0400995554135j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.317183979841+0.602841993348j)*x_ref[0] + ((-0.237134080489-0.0400995554135j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.373811142438+0.256595294348j)*x[0] + ((0.895062866569+0.744592973864j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.373811142438+0.256595294348j)*x_ref[0] + ((0.895062866569+0.744592973864j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.94710893129-0.700406261268j)*x[0] + ((-0.744152623937+0.55055945363j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.94710893129-0.700406261268j)*x_ref[0] + ((-0.744152623937+0.55055945363j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.854289343133+0.159842731203j)*x[0] + ((-0.390449859278+0.330866528328j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.854289343133+0.159842731203j)*x_ref[0] + ((-0.390449859278+0.330866528328j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.022900218791-0.281959562464j)*x[0] + ((-0.444837483431-0.159227561546j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.022900218791-0.281959562464j)*x_ref[0] + ((-0.444837483431-0.159227561546j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(0.00784879816285-0.424176842222j)*x[0] + ((0.359551887945+0.585121226766j))*x[1]
+        ref[(2, 2, 0, 2)]=(0.00784879816285-0.424176842222j)*x_ref[0] + ((0.359551887945+0.585121226766j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.20884372436-0.321003065978j)*x[0] + ((0.313416674751+0.068913996806j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.20884372436-0.321003065978j)*x_ref[0] + ((0.313416674751+0.068913996806j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.958199732516-0.498464904511j)*x[0] + ((-0.86584909975-0.693856035573j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.958199732516-0.498464904511j)*x_ref[0] + ((-0.86584909975-0.693856035573j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(-0.949482982178-0.557598924849j)*x[0] + ((-0.163872752801-0.384784633387j))*x[1]
+        ref[(2, 2, 1, 2)]=(-0.949482982178-0.557598924849j)*x_ref[0] + ((-0.163872752801-0.384784633387j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.240865200485-0.31621832635j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.240865200485-0.31621832635j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.270625912149-0.955228278649j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.270625912149-0.955228278649j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.196584453315-0.749378058142j)*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.196584453315-0.749378058142j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.155300762316+0.415850842459j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.155300762316+0.415850842459j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.705161834672+0.189335283528j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.705161834672+0.189335283528j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.775954619524+0.86662693482j)*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.775954619524+0.86662693482j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.637988260605+0.827601531103j)*x[2]
+            ref[(0, 1, 0, 0)]+=(0.637988260605+0.827601531103j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.882722350366-0.839285934975j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.882722350366-0.839285934975j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.220087243466-0.0558462051857j)*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.220087243466-0.0558462051857j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.822734408297-0.349461342954j)*x[2]
+            ref[(0, 1, 1, 0)]+=(0.822734408297-0.349461342954j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.375843102589-0.636269683587j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.375843102589-0.636269683587j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.440397445541-0.167934246637j)*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.440397445541-0.167934246637j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.254579069463-0.736844371561j)*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.254579069463-0.736844371561j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.694453488069+0.127064044466j)*x[2]
+            ref[(0, 2, 0, 1)]+=(0.694453488069+0.127064044466j)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.570741617393-0.353046957118j)*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.570741617393-0.353046957118j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.395036045249+0.996217171958j)*x[2]
+            ref[(0, 2, 1, 0)]+=(0.395036045249+0.996217171958j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.331936345637+0.0511220518414j)*x[2]
+            ref[(0, 2, 1, 1)]+=(0.331936345637+0.0511220518414j)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.46040973568-0.493465636662j)*x[2]
+            ref[(0, 2, 1, 2)]+=(0.46040973568-0.493465636662j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.428187608774+0.975768758242j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.428187608774+0.975768758242j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.468325913232+0.675684095897j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.468325913232+0.675684095897j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.945588345213+0.0150990263417j)*x[2]
+            ref[(1, 0, 0, 2)]+=(0.945588345213+0.0150990263417j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.75296976157-0.30884412034j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.75296976157-0.30884412034j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.339820166377+0.582300353184j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.339820166377+0.582300353184j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.621133339595-0.583538820051j)*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.621133339595-0.583538820051j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.935045531702-0.249730894713j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.935045531702-0.249730894713j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.0384638243273-0.894579816153j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.0384638243273-0.894579816153j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.553760062885+0.762039469996j)*x[2]
+            ref[(1, 1, 0, 2)]+=(0.553760062885+0.762039469996j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.0884245039599+0.425395416003j)*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.0884245039599+0.425395416003j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.949869153929-0.207085842342j)*x[2]
+            ref[(1, 1, 1, 1)]+=(0.949869153929-0.207085842342j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.578623005448+0.543024373427j)*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.578623005448+0.543024373427j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.396519276666-0.228584246043j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.396519276666-0.228584246043j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.302418451124-0.152847694151j)*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.302418451124-0.152847694151j)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.260171873265+0.780401825889j)*x[2]
+            ref[(1, 2, 0, 2)]+=(0.260171873265+0.780401825889j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.820318966791+0.744884073821j)*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.820318966791+0.744884073821j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.760042132943+0.796860994222j)*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.760042132943+0.796860994222j)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.0676968348383+0.935268374722j)*x[2]
+            ref[(1, 2, 1, 2)]+=(0.0676968348383+0.935268374722j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.219444892519-0.770398320037j)*x[2]
+            ref[(2, 0, 0, 0)]+=(0.219444892519-0.770398320037j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.28454987003+0.29878388516j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.28454987003+0.29878388516j)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.455162564654-0.854398793779j)*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.455162564654-0.854398793779j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.822732944265+0.113021784314j)*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.822732944265+0.113021784314j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.399215350818-0.858311974701j)*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.399215350818-0.858311974701j)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.0223294163571-0.65668103641j)*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.0223294163571-0.65668103641j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.201338688944-0.579444176099j)*x[2]
+            ref[(2, 1, 0, 0)]+=(0.201338688944-0.579444176099j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.03168678009+0.158416924575j)*x[2]
+            ref[(2, 1, 0, 1)]+=(0.03168678009+0.158416924575j)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.451971897621-0.494494203697j)*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.451971897621-0.494494203697j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.0076389224478-0.983562492947j)*x[2]
+            ref[(2, 1, 1, 0)]+=(0.0076389224478-0.983562492947j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.164886396704+0.0745255423601j)*x[2]
+            ref[(2, 1, 1, 1)]+=(0.164886396704+0.0745255423601j)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.849286877876-0.158747245864j)*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.849286877876-0.158747245864j)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.540691019571+0.309407615969j)*x[2]
+            ref[(2, 2, 0, 0)]+=(0.540691019571+0.309407615969j)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.605329224336+0.850755077558j)*x[2]
+            ref[(2, 2, 0, 1)]+=(0.605329224336+0.850755077558j)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(-0.420751737747+0.299795562386j)*x[2]
+            ref[(2, 2, 0, 2)]+=(-0.420751737747+0.299795562386j)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.369988684786-0.329821613925j)*x[2]
+            ref[(2, 2, 1, 0)]+=(0.369988684786-0.329821613925j)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.753892509128+0.124505342406j)*x[2]
+            ref[(2, 2, 1, 1)]+=(0.753892509128+0.124505342406j)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(-0.768712732186-0.869658010274j)*x[2]
+            ref[(2, 2, 1, 2)]+=(-0.768712732186-0.869658010274j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.181933321349-0.313900040383j)*x[0] + ((-0.282368794837-0.36307264153j))*x[1]
+        ref=(0.181933321349-0.313900040383j)*x_ref[0] + ((-0.282368794837-0.36307264153j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.751054810927+0.294806850703j))*x[2]
+            ref+=((-0.751054810927+0.294806850703j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(-0.592956602208+0.148844066819j)*x[0] + ((-0.864982095323-0.847498741164j))*x[1]
+        ref[(0,)]=(-0.592956602208+0.148844066819j)*x_ref[0] + ((-0.864982095323-0.847498741164j))*x_ref[1]
+        arg[(1,)]=(-0.155595212841+0.567152151178j)*x[0] + ((0.166382393535+0.0632530882704j))*x[1]
+        ref[(1,)]=(-0.155595212841+0.567152151178j)*x_ref[0] + ((0.166382393535+0.0632530882704j))*x_ref[1]
+        arg[(2,)]=(-0.485734169352-0.968216079618j)*x[0] + ((-0.396275553433-0.917995476339j))*x[1]
+        ref[(2,)]=(-0.485734169352-0.968216079618j)*x_ref[0] + ((-0.396275553433-0.917995476339j))*x_ref[1]
+        arg[(3,)]=(0.734415775793-0.404986744452j)*x[0] + ((0.84157204403-0.709619411534j))*x[1]
+        ref[(3,)]=(0.734415775793-0.404986744452j)*x_ref[0] + ((0.84157204403-0.709619411534j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.675899669208+0.486213931533j)*x[2]
+            ref[(0,)]+=(-0.675899669208+0.486213931533j)*x_ref[2]
+            arg[(1,)]+=(-0.738401528074+0.268294105872j)*x[2]
+            ref[(1,)]+=(-0.738401528074+0.268294105872j)*x_ref[2]
+            arg[(2,)]+=(0.46050353574-0.0652688836023j)*x[2]
+            ref[(2,)]+=(0.46050353574-0.0652688836023j)*x_ref[2]
+            arg[(3,)]+=(-0.359871626363+0.521299174875j)*x[2]
+            ref[(3,)]+=(-0.359871626363+0.521299174875j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=(0.216851089449-0.572058516358j)*x[0] + ((-0.111556919599+0.720307434118j))*x[1]
+        ref[(0, 0)]=(0.216851089449-0.572058516358j)*x_ref[0] + ((-0.111556919599+0.720307434118j))*x_ref[1]
+        arg[(0, 1)]=(0.884683790858-0.0482090799911j)*x[0] + ((-0.917713967411-0.179980195624j))*x[1]
+        ref[(0, 1)]=(0.884683790858-0.0482090799911j)*x_ref[0] + ((-0.917713967411-0.179980195624j))*x_ref[1]
+        arg[(0, 2)]=(0.127934128856-0.323473734865j)*x[0] + ((-0.423478723611+0.084417683654j))*x[1]
+        ref[(0, 2)]=(0.127934128856-0.323473734865j)*x_ref[0] + ((-0.423478723611+0.084417683654j))*x_ref[1]
+        arg[(0, 3)]=(-0.632791332096+0.212814108618j)*x[0] + ((-0.328959281242+0.0353509260077j))*x[1]
+        ref[(0, 3)]=(-0.632791332096+0.212814108618j)*x_ref[0] + ((-0.328959281242+0.0353509260077j))*x_ref[1]
+        arg[(1, 0)]=(-0.227336991655+0.912908802813j)*x[0] + ((-0.194923450609+0.511462317941j))*x[1]
+        ref[(1, 0)]=(-0.227336991655+0.912908802813j)*x_ref[0] + ((-0.194923450609+0.511462317941j))*x_ref[1]
+        arg[(1, 1)]=(-0.0721091243334+0.356097526137j)*x[0] + ((-0.0471340197279+0.799362499006j))*x[1]
+        ref[(1, 1)]=(-0.0721091243334+0.356097526137j)*x_ref[0] + ((-0.0471340197279+0.799362499006j))*x_ref[1]
+        arg[(1, 2)]=(0.371525496112-0.262982377943j)*x[0] + ((-0.727016694395-0.939470870481j))*x[1]
+        ref[(1, 2)]=(0.371525496112-0.262982377943j)*x_ref[0] + ((-0.727016694395-0.939470870481j))*x_ref[1]
+        arg[(1, 3)]=(-0.210050004469-0.634917564076j)*x[0] + ((-0.132481698828+0.737837016081j))*x[1]
+        ref[(1, 3)]=(-0.210050004469-0.634917564076j)*x_ref[0] + ((-0.132481698828+0.737837016081j))*x_ref[1]
+        arg[(2, 0)]=(0.677657130838-0.194203661289j)*x[0] + ((0.753817353636+0.488221254837j))*x[1]
+        ref[(2, 0)]=(0.677657130838-0.194203661289j)*x_ref[0] + ((0.753817353636+0.488221254837j))*x_ref[1]
+        arg[(2, 1)]=(0.755841079621-0.197961867486j)*x[0] + ((0.797407764057-0.981253918234j))*x[1]
+        ref[(2, 1)]=(0.755841079621-0.197961867486j)*x_ref[0] + ((0.797407764057-0.981253918234j))*x_ref[1]
+        arg[(2, 2)]=(0.767340937847-0.944839021498j)*x[0] + ((0.148075615914-0.454462521654j))*x[1]
+        ref[(2, 2)]=(0.767340937847-0.944839021498j)*x_ref[0] + ((0.148075615914-0.454462521654j))*x_ref[1]
+        arg[(2, 3)]=(-0.145437459631-0.476630869717j)*x[0] + ((-0.0758047906262-0.365908614183j))*x[1]
+        ref[(2, 3)]=(-0.145437459631-0.476630869717j)*x_ref[0] + ((-0.0758047906262-0.365908614183j))*x_ref[1]
+        arg[(3, 0)]=(-0.695926767002+0.875027221109j)*x[0] + ((0.467884872242+0.0362356069491j))*x[1]
+        ref[(3, 0)]=(-0.695926767002+0.875027221109j)*x_ref[0] + ((0.467884872242+0.0362356069491j))*x_ref[1]
+        arg[(3, 1)]=(-0.193896919796+0.854322309598j)*x[0] + ((0.715363011245-0.98724108645j))*x[1]
+        ref[(3, 1)]=(-0.193896919796+0.854322309598j)*x_ref[0] + ((0.715363011245-0.98724108645j))*x_ref[1]
+        arg[(3, 2)]=(-0.167697771068+0.980954346332j)*x[0] + ((0.16452169998+0.0313711464242j))*x[1]
+        ref[(3, 2)]=(-0.167697771068+0.980954346332j)*x_ref[0] + ((0.16452169998+0.0313711464242j))*x_ref[1]
+        arg[(3, 3)]=(0.535614380226-0.128788165448j)*x[0] + ((0.934462056253-0.0170108109928j))*x[1]
+        ref[(3, 3)]=(0.535614380226-0.128788165448j)*x_ref[0] + ((0.934462056253-0.0170108109928j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.983096505106-0.390689480094j)*x[2]
+            ref[(0, 0)]+=(-0.983096505106-0.390689480094j)*x_ref[2]
+            arg[(0, 1)]+=(0.624338506419-0.892732583552j)*x[2]
+            ref[(0, 1)]+=(0.624338506419-0.892732583552j)*x_ref[2]
+            arg[(0, 2)]+=(-0.73274972569+0.894301892628j)*x[2]
+            ref[(0, 2)]+=(-0.73274972569+0.894301892628j)*x_ref[2]
+            arg[(0, 3)]+=(0.421819587059+0.772697778433j)*x[2]
+            ref[(0, 3)]+=(0.421819587059+0.772697778433j)*x_ref[2]
+            arg[(1, 0)]+=(0.674304971886-0.815133886348j)*x[2]
+            ref[(1, 0)]+=(0.674304971886-0.815133886348j)*x_ref[2]
+            arg[(1, 1)]+=(-0.0509063431973-0.586317605216j)*x[2]
+            ref[(1, 1)]+=(-0.0509063431973-0.586317605216j)*x_ref[2]
+            arg[(1, 2)]+=(0.0899442670311+0.344957795583j)*x[2]
+            ref[(1, 2)]+=(0.0899442670311+0.344957795583j)*x_ref[2]
+            arg[(1, 3)]+=(-0.224493459296+0.609165681924j)*x[2]
+            ref[(1, 3)]+=(-0.224493459296+0.609165681924j)*x_ref[2]
+            arg[(2, 0)]+=(0.612390108936+0.820641214314j)*x[2]
+            ref[(2, 0)]+=(0.612390108936+0.820641214314j)*x_ref[2]
+            arg[(2, 1)]+=(0.38545205409-0.0965645379506j)*x[2]
+            ref[(2, 1)]+=(0.38545205409-0.0965645379506j)*x_ref[2]
+            arg[(2, 2)]+=(0.802457131314-0.584244769012j)*x[2]
+            ref[(2, 2)]+=(0.802457131314-0.584244769012j)*x_ref[2]
+            arg[(2, 3)]+=(0.10327620411-0.639650957727j)*x[2]
+            ref[(2, 3)]+=(0.10327620411-0.639650957727j)*x_ref[2]
+            arg[(3, 0)]+=(0.751337549988+0.855253322679j)*x[2]
+            ref[(3, 0)]+=(0.751337549988+0.855253322679j)*x_ref[2]
+            arg[(3, 1)]+=(0.408092890594-0.596335088886j)*x[2]
+            ref[(3, 1)]+=(0.408092890594-0.596335088886j)*x_ref[2]
+            arg[(3, 2)]+=(-0.930429140627-0.435791036824j)*x[2]
+            ref[(3, 2)]+=(-0.930429140627-0.435791036824j)*x_ref[2]
+            arg[(3, 3)]+=(0.176479279225+0.304738110568j)*x[2]
+            ref[(3, 3)]+=(0.176479279225+0.304738110568j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3),w)
+        ref = Data(0,(4, 2, 3),w_ref)
+        arg[(0, 0, 0)]=(0.744977449645+0.89486323919j)*x[0] + ((-0.913502461795-0.202044807487j))*x[1]
+        ref[(0, 0, 0)]=(0.744977449645+0.89486323919j)*x_ref[0] + ((-0.913502461795-0.202044807487j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.721772805248+0.394797423792j)*x[0] + ((-0.181926802198-0.10992656357j))*x[1]
+        ref[(0, 0, 1)]=(0.721772805248+0.394797423792j)*x_ref[0] + ((-0.181926802198-0.10992656357j))*x_ref[1]
+        arg[(0, 0, 2)]=(-0.271094547494+0.920668945889j)*x[0] + ((0.886777044014-0.512313996232j))*x[1]
+        ref[(0, 0, 2)]=(-0.271094547494+0.920668945889j)*x_ref[0] + ((0.886777044014-0.512313996232j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.491334517582+0.685161020843j)*x[0] + ((0.564219204708+0.0773883460257j))*x[1]
+        ref[(0, 1, 0)]=(0.491334517582+0.685161020843j)*x_ref[0] + ((0.564219204708+0.0773883460257j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.718807112636-0.0985879214294j)*x[0] + ((-0.108327165747-0.439690250364j))*x[1]
+        ref[(0, 1, 1)]=(-0.718807112636-0.0985879214294j)*x_ref[0] + ((-0.108327165747-0.439690250364j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.6378596041+0.85092466934j)*x[0] + ((-0.551115504431+0.0107327087829j))*x[1]
+        ref[(0, 1, 2)]=(0.6378596041+0.85092466934j)*x_ref[0] + ((-0.551115504431+0.0107327087829j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.0913285372718+0.981068219397j)*x[0] + ((-0.766882046618-0.918404865194j))*x[1]
+        ref[(1, 0, 0)]=(-0.0913285372718+0.981068219397j)*x_ref[0] + ((-0.766882046618-0.918404865194j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.936646567707-0.056691242771j)*x[0] + ((-0.990572993276+0.51357692354j))*x[1]
+        ref[(1, 0, 1)]=(-0.936646567707-0.056691242771j)*x_ref[0] + ((-0.990572993276+0.51357692354j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.0147587873968+0.895829238755j)*x[0] + ((0.594031397885+0.966564672783j))*x[1]
+        ref[(1, 0, 2)]=(0.0147587873968+0.895829238755j)*x_ref[0] + ((0.594031397885+0.966564672783j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.867646377863-0.974739346658j)*x[0] + ((-0.80172552328+0.788455378877j))*x[1]
+        ref[(1, 1, 0)]=(-0.867646377863-0.974739346658j)*x_ref[0] + ((-0.80172552328+0.788455378877j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.0548440540143+0.0706193891696j)*x[0] + ((0.905172926257-0.387519567923j))*x[1]
+        ref[(1, 1, 1)]=(-0.0548440540143+0.0706193891696j)*x_ref[0] + ((0.905172926257-0.387519567923j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.75736772942+0.613555663032j)*x[0] + ((-0.720196177863-0.121301685684j))*x[1]
+        ref[(1, 1, 2)]=(0.75736772942+0.613555663032j)*x_ref[0] + ((-0.720196177863-0.121301685684j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.525967205415+0.224999985903j)*x[0] + ((-0.880418292105+0.263229667984j))*x[1]
+        ref[(2, 0, 0)]=(-0.525967205415+0.224999985903j)*x_ref[0] + ((-0.880418292105+0.263229667984j))*x_ref[1]
+        arg[(2, 0, 1)]=(0.365744987432+0.423210077682j)*x[0] + ((0.609616374486+0.995679991821j))*x[1]
+        ref[(2, 0, 1)]=(0.365744987432+0.423210077682j)*x_ref[0] + ((0.609616374486+0.995679991821j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.635305439563+0.433039351717j)*x[0] + ((-0.708992300047-0.00345097773488j))*x[1]
+        ref[(2, 0, 2)]=(-0.635305439563+0.433039351717j)*x_ref[0] + ((-0.708992300047-0.00345097773488j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.725981194758-0.226237493928j)*x[0] + ((0.298332411105-0.0778122100168j))*x[1]
+        ref[(2, 1, 0)]=(0.725981194758-0.226237493928j)*x_ref[0] + ((0.298332411105-0.0778122100168j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.0193010851564-0.99823563611j)*x[0] + ((0.429885002471+0.127409938505j))*x[1]
+        ref[(2, 1, 1)]=(0.0193010851564-0.99823563611j)*x_ref[0] + ((0.429885002471+0.127409938505j))*x_ref[1]
+        arg[(2, 1, 2)]=(-0.132221174656+0.846492210102j)*x[0] + ((-0.793226574472-0.232067965669j))*x[1]
+        ref[(2, 1, 2)]=(-0.132221174656+0.846492210102j)*x_ref[0] + ((-0.793226574472-0.232067965669j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.743117005917+0.0640155254732j)*x[0] + ((0.874821888798-0.870665769731j))*x[1]
+        ref[(3, 0, 0)]=(0.743117005917+0.0640155254732j)*x_ref[0] + ((0.874821888798-0.870665769731j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.304148308317+0.384798698484j)*x[0] + ((0.58707986027-0.176757203782j))*x[1]
+        ref[(3, 0, 1)]=(-0.304148308317+0.384798698484j)*x_ref[0] + ((0.58707986027-0.176757203782j))*x_ref[1]
+        arg[(3, 0, 2)]=(-0.657067140195+0.453926134899j)*x[0] + ((-0.0886292272266+0.385883490513j))*x[1]
+        ref[(3, 0, 2)]=(-0.657067140195+0.453926134899j)*x_ref[0] + ((-0.0886292272266+0.385883490513j))*x_ref[1]
+        arg[(3, 1, 0)]=(0.322637792058+0.510499316435j)*x[0] + ((0.380548383856+0.791184858059j))*x[1]
+        ref[(3, 1, 0)]=(0.322637792058+0.510499316435j)*x_ref[0] + ((0.380548383856+0.791184858059j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.900122916117+0.346886687868j)*x[0] + ((-0.505025466714-0.341638261184j))*x[1]
+        ref[(3, 1, 1)]=(0.900122916117+0.346886687868j)*x_ref[0] + ((-0.505025466714-0.341638261184j))*x_ref[1]
+        arg[(3, 1, 2)]=(-0.679933236483+0.156523314222j)*x[0] + ((0.760514667438-0.840758751634j))*x[1]
+        ref[(3, 1, 2)]=(-0.679933236483+0.156523314222j)*x_ref[0] + ((0.760514667438-0.840758751634j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.967818835615-0.624376770991j)*x[2]
+            ref[(0, 0, 0)]+=(0.967818835615-0.624376770991j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.0464391630306+0.230037290542j)*x[2]
+            ref[(0, 0, 1)]+=(0.0464391630306+0.230037290542j)*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.601250756624+0.165609474986j)*x[2]
+            ref[(0, 0, 2)]+=(-0.601250756624+0.165609474986j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.352331911761-0.622282882575j)*x[2]
+            ref[(0, 1, 0)]+=(0.352331911761-0.622282882575j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.761362811664+0.800590675739j)*x[2]
+            ref[(0, 1, 1)]+=(-0.761362811664+0.800590675739j)*x_ref[2]
+            arg[(0, 1, 2)]+=(0.124701972547-0.604843646949j)*x[2]
+            ref[(0, 1, 2)]+=(0.124701972547-0.604843646949j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.881305521389+0.0781527511345j)*x[2]
+            ref[(1, 0, 0)]+=(0.881305521389+0.0781527511345j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.551405838387+0.331908918834j)*x[2]
+            ref[(1, 0, 1)]+=(0.551405838387+0.331908918834j)*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.915644238854-0.381774425844j)*x[2]
+            ref[(1, 0, 2)]+=(-0.915644238854-0.381774425844j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.485264288686+0.853894914104j)*x[2]
+            ref[(1, 1, 0)]+=(-0.485264288686+0.853894914104j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.383495596381-0.07683751517j)*x[2]
+            ref[(1, 1, 1)]+=(0.383495596381-0.07683751517j)*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.99710576726+0.295491596365j)*x[2]
+            ref[(1, 1, 2)]+=(-0.99710576726+0.295491596365j)*x_ref[2]
+            arg[(2, 0, 0)]+=(0.145807551811-0.326028720851j)*x[2]
+            ref[(2, 0, 0)]+=(0.145807551811-0.326028720851j)*x_ref[2]
+            arg[(2, 0, 1)]+=(0.416193053485-0.708950143685j)*x[2]
+            ref[(2, 0, 1)]+=(0.416193053485-0.708950143685j)*x_ref[2]
+            arg[(2, 0, 2)]+=(0.98713533363-0.758857043603j)*x[2]
+            ref[(2, 0, 2)]+=(0.98713533363-0.758857043603j)*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.426643931141-0.434665927374j)*x[2]
+            ref[(2, 1, 0)]+=(-0.426643931141-0.434665927374j)*x_ref[2]
+            arg[(2, 1, 1)]+=(0.246136072476-0.953651208908j)*x[2]
+            ref[(2, 1, 1)]+=(0.246136072476-0.953651208908j)*x_ref[2]
+            arg[(2, 1, 2)]+=(0.007122138078+0.474698950052j)*x[2]
+            ref[(2, 1, 2)]+=(0.007122138078+0.474698950052j)*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.225644493567+0.0086018904633j)*x[2]
+            ref[(3, 0, 0)]+=(-0.225644493567+0.0086018904633j)*x_ref[2]
+            arg[(3, 0, 1)]+=(0.200931622692+0.926702788478j)*x[2]
+            ref[(3, 0, 1)]+=(0.200931622692+0.926702788478j)*x_ref[2]
+            arg[(3, 0, 2)]+=(-0.481845798365+0.671369235402j)*x[2]
+            ref[(3, 0, 2)]+=(-0.481845798365+0.671369235402j)*x_ref[2]
+            arg[(3, 1, 0)]+=(0.947243541735-0.00270798310452j)*x[2]
+            ref[(3, 1, 0)]+=(0.947243541735-0.00270798310452j)*x_ref[2]
+            arg[(3, 1, 1)]+=(0.634654855862+0.478283619984j)*x[2]
+            ref[(3, 1, 1)]+=(0.634654855862+0.478283619984j)*x_ref[2]
+            arg[(3, 1, 2)]+=(0.922624986375-0.444510733978j)*x[2]
+            ref[(3, 1, 2)]+=(0.922624986375-0.444510733978j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2, 4),w)
+        ref = Data(0,(4, 3, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.575642629305+0.677727817243j)*x[0] + ((0.0894025824421+0.537483782676j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.575642629305+0.677727817243j)*x_ref[0] + ((0.0894025824421+0.537483782676j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.323035894495-0.112505379478j)*x[0] + ((0.650802892116+0.678257238181j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.323035894495-0.112505379478j)*x_ref[0] + ((0.650802892116+0.678257238181j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.428355598073+0.276038463041j)*x[0] + ((-0.528915427881-0.210479458093j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.428355598073+0.276038463041j)*x_ref[0] + ((-0.528915427881-0.210479458093j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(-0.774714628697-0.301173908815j)*x[0] + ((0.254180761183-0.391614610853j))*x[1]
+        ref[(0, 0, 0, 3)]=(-0.774714628697-0.301173908815j)*x_ref[0] + ((0.254180761183-0.391614610853j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.0811951086711+0.275975634611j)*x[0] + ((0.957086689819+0.594881744287j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.0811951086711+0.275975634611j)*x_ref[0] + ((0.957086689819+0.594881744287j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.122744727486+0.851054084959j)*x[0] + ((0.619666497836-0.858752092158j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.122744727486+0.851054084959j)*x_ref[0] + ((0.619666497836-0.858752092158j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.405945167375-0.663178092989j)*x[0] + ((0.811683035176+0.990646682816j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.405945167375-0.663178092989j)*x_ref[0] + ((0.811683035176+0.990646682816j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(0.187343630644+0.44150990466j)*x[0] + ((0.926298968493+0.177445760493j))*x[1]
+        ref[(0, 0, 1, 3)]=(0.187343630644+0.44150990466j)*x_ref[0] + ((0.926298968493+0.177445760493j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.512649215677-0.781707557959j)*x[0] + ((0.371782826497-0.409387923781j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.512649215677-0.781707557959j)*x_ref[0] + ((0.371782826497-0.409387923781j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.506005687251-0.090989714738j)*x[0] + ((0.0276368291266+0.967879972213j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.506005687251-0.090989714738j)*x_ref[0] + ((0.0276368291266+0.967879972213j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.0108784574866+0.0121243205246j)*x[0] + ((-0.635223436149+0.476559208219j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.0108784574866+0.0121243205246j)*x_ref[0] + ((-0.635223436149+0.476559208219j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(-0.9326416334+0.0809221635795j)*x[0] + ((0.247220282485-0.848087510653j))*x[1]
+        ref[(0, 1, 0, 3)]=(-0.9326416334+0.0809221635795j)*x_ref[0] + ((0.247220282485-0.848087510653j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.598019618612-0.88189133233j)*x[0] + ((0.589819065626+0.714344973756j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.598019618612-0.88189133233j)*x_ref[0] + ((0.589819065626+0.714344973756j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.84798002448+0.0147380177727j)*x[0] + ((0.808990210263+0.487853170251j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.84798002448+0.0147380177727j)*x_ref[0] + ((0.808990210263+0.487853170251j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.0717301848514-0.249456099593j)*x[0] + ((-0.844758586452-0.567691399959j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.0717301848514-0.249456099593j)*x_ref[0] + ((-0.844758586452-0.567691399959j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.969831736705-0.590490219313j)*x[0] + ((-0.701261422674-0.798653604388j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.969831736705-0.590490219313j)*x_ref[0] + ((-0.701261422674-0.798653604388j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.116658692829-0.72640627593j)*x[0] + ((-0.869246148665-0.50055888043j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.116658692829-0.72640627593j)*x_ref[0] + ((-0.869246148665-0.50055888043j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.0311008615564+0.74950397798j)*x[0] + ((0.764477191305+0.467450529478j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.0311008615564+0.74950397798j)*x_ref[0] + ((0.764477191305+0.467450529478j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(-0.91516274473+0.0650431309057j)*x[0] + ((0.237636773116-0.560398351351j))*x[1]
+        ref[(0, 2, 0, 2)]=(-0.91516274473+0.0650431309057j)*x_ref[0] + ((0.237636773116-0.560398351351j))*x_ref[1]
+        arg[(0, 2, 0, 3)]=(-0.844392750617+0.598472613494j)*x[0] + ((0.0532517129386+0.776106560162j))*x[1]
+        ref[(0, 2, 0, 3)]=(-0.844392750617+0.598472613494j)*x_ref[0] + ((0.0532517129386+0.776106560162j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.290915519336+0.480830916448j)*x[0] + ((0.58088677436+0.592696290995j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.290915519336+0.480830916448j)*x_ref[0] + ((0.58088677436+0.592696290995j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.69237657114-0.558927753973j)*x[0] + ((-0.230102157466-0.483498829085j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.69237657114-0.558927753973j)*x_ref[0] + ((-0.230102157466-0.483498829085j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.0509786285852-0.451201428152j)*x[0] + ((-0.123785529557+0.306621666562j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.0509786285852-0.451201428152j)*x_ref[0] + ((-0.123785529557+0.306621666562j))*x_ref[1]
+        arg[(0, 2, 1, 3)]=(0.567907305971+0.815086572653j)*x[0] + ((0.0353717911577+0.905008860003j))*x[1]
+        ref[(0, 2, 1, 3)]=(0.567907305971+0.815086572653j)*x_ref[0] + ((0.0353717911577+0.905008860003j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.931648957641-0.120672443035j)*x[0] + ((0.487812609746-0.882847252107j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.931648957641-0.120672443035j)*x_ref[0] + ((0.487812609746-0.882847252107j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.905656728623+0.743100643077j)*x[0] + ((-0.406706027102-0.89903009746j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.905656728623+0.743100643077j)*x_ref[0] + ((-0.406706027102-0.89903009746j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.943674392399-0.0199758141718j)*x[0] + ((-0.101356563341+0.711846648762j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.943674392399-0.0199758141718j)*x_ref[0] + ((-0.101356563341+0.711846648762j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.73300304425+0.211127701106j)*x[0] + ((-0.0410299876471+0.651069768528j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.73300304425+0.211127701106j)*x_ref[0] + ((-0.0410299876471+0.651069768528j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.801598059824-0.422350659979j)*x[0] + ((-0.125415667891-0.259147877317j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.801598059824-0.422350659979j)*x_ref[0] + ((-0.125415667891-0.259147877317j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.185406827548-0.709248432418j)*x[0] + ((0.422878779965-0.298148224723j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.185406827548-0.709248432418j)*x_ref[0] + ((0.422878779965-0.298148224723j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.757222250393+0.597638198645j)*x[0] + ((-0.900296769234-0.429429572848j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.757222250393+0.597638198645j)*x_ref[0] + ((-0.900296769234-0.429429572848j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.274951386329-0.745453060913j)*x[0] + ((0.394013265587-0.757012410492j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.274951386329-0.745453060913j)*x_ref[0] + ((0.394013265587-0.757012410492j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.824729396312+0.434760911009j)*x[0] + ((0.640713705687-0.161873577967j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.824729396312+0.434760911009j)*x_ref[0] + ((0.640713705687-0.161873577967j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.349056354675-0.961527468637j)*x[0] + ((-0.891275221706+0.756686022914j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.349056354675-0.961527468637j)*x_ref[0] + ((-0.891275221706+0.756686022914j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.351544785635+0.234585162097j)*x[0] + ((-0.244577303592-0.815099585281j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.351544785635+0.234585162097j)*x_ref[0] + ((-0.244577303592-0.815099585281j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.732429343203-0.144120737998j)*x[0] + ((0.32384067113-0.903958412771j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.732429343203-0.144120737998j)*x_ref[0] + ((0.32384067113-0.903958412771j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.34085760472+0.144598624362j)*x[0] + ((-0.0257542436357+0.20007455675j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.34085760472+0.144598624362j)*x_ref[0] + ((-0.0257542436357+0.20007455675j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.583270098295-0.493163861083j)*x[0] + ((-0.0357070326047-0.682764897183j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.583270098295-0.493163861083j)*x_ref[0] + ((-0.0357070326047-0.682764897183j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.499194901641-0.118439818071j)*x[0] + ((-0.634592703744+0.393799191771j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.499194901641-0.118439818071j)*x_ref[0] + ((-0.634592703744+0.393799191771j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.740936003332-0.933636709204j)*x[0] + ((-0.408107911048-0.0900288954056j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.740936003332-0.933636709204j)*x_ref[0] + ((-0.408107911048-0.0900288954056j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.759010693202+0.554133061616j)*x[0] + ((0.936289117369+0.52961501351j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.759010693202+0.554133061616j)*x_ref[0] + ((0.936289117369+0.52961501351j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.433261241224+0.317609309918j)*x[0] + ((0.968910829971-0.548130973492j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.433261241224+0.317609309918j)*x_ref[0] + ((0.968910829971-0.548130973492j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(0.122267191942+0.20544316903j)*x[0] + ((0.677156266001-0.868973612861j))*x[1]
+        ref[(1, 2, 0, 2)]=(0.122267191942+0.20544316903j)*x_ref[0] + ((0.677156266001-0.868973612861j))*x_ref[1]
+        arg[(1, 2, 0, 3)]=(0.324178313816-0.647774445062j)*x[0] + ((-0.624387931536+0.465168299922j))*x[1]
+        ref[(1, 2, 0, 3)]=(0.324178313816-0.647774445062j)*x_ref[0] + ((-0.624387931536+0.465168299922j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.385813712169-0.655234426852j)*x[0] + ((-0.675930335137+0.727399685288j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.385813712169-0.655234426852j)*x_ref[0] + ((-0.675930335137+0.727399685288j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.612562886808-0.97023301477j)*x[0] + ((0.362835117729-0.322214366163j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.612562886808-0.97023301477j)*x_ref[0] + ((0.362835117729-0.322214366163j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(0.404699906899+0.0593987561705j)*x[0] + ((0.376750522458+0.360027038097j))*x[1]
+        ref[(1, 2, 1, 2)]=(0.404699906899+0.0593987561705j)*x_ref[0] + ((0.376750522458+0.360027038097j))*x_ref[1]
+        arg[(1, 2, 1, 3)]=(-0.444404864652+0.35688922738j)*x[0] + ((-0.566458053712+0.0219090818811j))*x[1]
+        ref[(1, 2, 1, 3)]=(-0.444404864652+0.35688922738j)*x_ref[0] + ((-0.566458053712+0.0219090818811j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.580348919153-0.79910860808j)*x[0] + ((-0.264031166332-0.403379867717j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.580348919153-0.79910860808j)*x_ref[0] + ((-0.264031166332-0.403379867717j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.85539596373-0.021830104968j)*x[0] + ((-0.67735619582-0.174886285409j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.85539596373-0.021830104968j)*x_ref[0] + ((-0.67735619582-0.174886285409j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(-0.54720547442+0.232998545017j)*x[0] + ((-0.545435284229+0.0390839097545j))*x[1]
+        ref[(2, 0, 0, 2)]=(-0.54720547442+0.232998545017j)*x_ref[0] + ((-0.545435284229+0.0390839097545j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(-0.807683591683+0.974417909183j)*x[0] + ((0.834908864997+0.43138367034j))*x[1]
+        ref[(2, 0, 0, 3)]=(-0.807683591683+0.974417909183j)*x_ref[0] + ((0.834908864997+0.43138367034j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(-0.748152037015-0.958093470681j)*x[0] + ((0.734299135493-0.699782259438j))*x[1]
+        ref[(2, 0, 1, 0)]=(-0.748152037015-0.958093470681j)*x_ref[0] + ((0.734299135493-0.699782259438j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.709057812382-0.263752332937j)*x[0] + ((0.394786719736-0.876534913119j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.709057812382-0.263752332937j)*x_ref[0] + ((0.394786719736-0.876534913119j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.688126735699+0.221950410483j)*x[0] + ((0.425680682852-0.47133734336j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.688126735699+0.221950410483j)*x_ref[0] + ((0.425680682852-0.47133734336j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.304567551674-0.407561594917j)*x[0] + ((-0.270630535236+0.964045449937j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.304567551674-0.407561594917j)*x_ref[0] + ((-0.270630535236+0.964045449937j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.961691929891-0.468936429159j)*x[0] + ((-0.0763664486081-0.477385277271j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.961691929891-0.468936429159j)*x_ref[0] + ((-0.0763664486081-0.477385277271j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.0524170750629+0.929082112853j)*x[0] + ((0.217975094747-0.882825074324j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.0524170750629+0.929082112853j)*x_ref[0] + ((0.217975094747-0.882825074324j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(0.459560272684+0.761248090666j)*x[0] + ((-0.315608610824+0.195979216325j))*x[1]
+        ref[(2, 1, 0, 2)]=(0.459560272684+0.761248090666j)*x_ref[0] + ((-0.315608610824+0.195979216325j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(0.0982734215048-0.963705985217j)*x[0] + ((-0.53801477027-0.417907050556j))*x[1]
+        ref[(2, 1, 0, 3)]=(0.0982734215048-0.963705985217j)*x_ref[0] + ((-0.53801477027-0.417907050556j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.169076720604-0.932483375771j)*x[0] + ((-0.481686690234-0.921660746603j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.169076720604-0.932483375771j)*x_ref[0] + ((-0.481686690234-0.921660746603j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.813309530444-0.957322083902j)*x[0] + ((-0.545420333596+0.307492982854j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.813309530444-0.957322083902j)*x_ref[0] + ((-0.545420333596+0.307492982854j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.753263963464-0.658785619965j)*x[0] + ((0.575260558924-0.961910905582j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.753263963464-0.658785619965j)*x_ref[0] + ((0.575260558924-0.961910905582j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(0.758509552142-0.0306821930742j)*x[0] + ((0.867146936261-0.625117911846j))*x[1]
+        ref[(2, 1, 1, 3)]=(0.758509552142-0.0306821930742j)*x_ref[0] + ((0.867146936261-0.625117911846j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.179434650118+0.465570948139j)*x[0] + ((0.749536779264+0.509886128208j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.179434650118+0.465570948139j)*x_ref[0] + ((0.749536779264+0.509886128208j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.538287655975-0.343466723194j)*x[0] + ((0.336063100953+0.481624084837j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.538287655975-0.343466723194j)*x_ref[0] + ((0.336063100953+0.481624084837j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(0.322372098584+0.489398382305j)*x[0] + ((0.972283309051-0.353820747249j))*x[1]
+        ref[(2, 2, 0, 2)]=(0.322372098584+0.489398382305j)*x_ref[0] + ((0.972283309051-0.353820747249j))*x_ref[1]
+        arg[(2, 2, 0, 3)]=(0.669935462958-0.132648370965j)*x[0] + ((-0.379382855101+0.347894445317j))*x[1]
+        ref[(2, 2, 0, 3)]=(0.669935462958-0.132648370965j)*x_ref[0] + ((-0.379382855101+0.347894445317j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.627181266397-0.870838614516j)*x[0] + ((0.791687026261+0.20798767372j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.627181266397-0.870838614516j)*x_ref[0] + ((0.791687026261+0.20798767372j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.924768441176+0.0874769130151j)*x[0] + ((0.854417910703-0.471717363576j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.924768441176+0.0874769130151j)*x_ref[0] + ((0.854417910703-0.471717363576j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(-0.238714170507+0.672411414066j)*x[0] + ((0.0794271493226+0.185892330248j))*x[1]
+        ref[(2, 2, 1, 2)]=(-0.238714170507+0.672411414066j)*x_ref[0] + ((0.0794271493226+0.185892330248j))*x_ref[1]
+        arg[(2, 2, 1, 3)]=(0.9042060442+0.355919146118j)*x[0] + ((0.949942220535+0.745051108164j))*x[1]
+        ref[(2, 2, 1, 3)]=(0.9042060442+0.355919146118j)*x_ref[0] + ((0.949942220535+0.745051108164j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.161515410394+0.324309841191j)*x[0] + ((-0.885071776758-0.228718438017j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.161515410394+0.324309841191j)*x_ref[0] + ((-0.885071776758-0.228718438017j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.54183935534-0.939654069664j)*x[0] + ((0.771399848106-0.33186485513j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.54183935534-0.939654069664j)*x_ref[0] + ((0.771399848106-0.33186485513j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(-0.752076078449+0.410431542275j)*x[0] + ((-0.54949017496-0.217045834472j))*x[1]
+        ref[(3, 0, 0, 2)]=(-0.752076078449+0.410431542275j)*x_ref[0] + ((-0.54949017496-0.217045834472j))*x_ref[1]
+        arg[(3, 0, 0, 3)]=(0.404643377072-0.573671461684j)*x[0] + ((-0.548287176293-0.306008451367j))*x[1]
+        ref[(3, 0, 0, 3)]=(0.404643377072-0.573671461684j)*x_ref[0] + ((-0.548287176293-0.306008451367j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.543629379625+0.696363700481j)*x[0] + ((-0.876071788904+0.48820753443j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.543629379625+0.696363700481j)*x_ref[0] + ((-0.876071788904+0.48820753443j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.0672654466794+0.632335164206j)*x[0] + ((-0.773875801128+0.483442460353j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.0672654466794+0.632335164206j)*x_ref[0] + ((-0.773875801128+0.483442460353j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(-0.835876900869-0.627446456241j)*x[0] + ((-0.680128506276+0.775286348766j))*x[1]
+        ref[(3, 0, 1, 2)]=(-0.835876900869-0.627446456241j)*x_ref[0] + ((-0.680128506276+0.775286348766j))*x_ref[1]
+        arg[(3, 0, 1, 3)]=(0.886306645933+0.26870903374j)*x[0] + ((-0.367087948853+0.065621571096j))*x[1]
+        ref[(3, 0, 1, 3)]=(0.886306645933+0.26870903374j)*x_ref[0] + ((-0.367087948853+0.065621571096j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.980387319009+0.905644286065j)*x[0] + ((0.106394612196+0.394237646436j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.980387319009+0.905644286065j)*x_ref[0] + ((0.106394612196+0.394237646436j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.208694059844+0.854663229692j)*x[0] + ((-0.498650849241-0.198039193285j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.208694059844+0.854663229692j)*x_ref[0] + ((-0.498650849241-0.198039193285j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(0.127968905564-0.706952638777j)*x[0] + ((-0.556269525514+0.965987138985j))*x[1]
+        ref[(3, 1, 0, 2)]=(0.127968905564-0.706952638777j)*x_ref[0] + ((-0.556269525514+0.965987138985j))*x_ref[1]
+        arg[(3, 1, 0, 3)]=(0.494579013055-0.482903111713j)*x[0] + ((-0.828734348558+0.400233753066j))*x[1]
+        ref[(3, 1, 0, 3)]=(0.494579013055-0.482903111713j)*x_ref[0] + ((-0.828734348558+0.400233753066j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.558677404958+0.568274288648j)*x[0] + ((0.536138805244+0.775529452894j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.558677404958+0.568274288648j)*x_ref[0] + ((0.536138805244+0.775529452894j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.00439916971799+0.55333752674j)*x[0] + ((-0.283592670849+0.538664305309j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.00439916971799+0.55333752674j)*x_ref[0] + ((-0.283592670849+0.538664305309j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(-0.481228161778-0.685080900497j)*x[0] + ((-0.811188616687-0.369513710129j))*x[1]
+        ref[(3, 1, 1, 2)]=(-0.481228161778-0.685080900497j)*x_ref[0] + ((-0.811188616687-0.369513710129j))*x_ref[1]
+        arg[(3, 1, 1, 3)]=(0.107590759787-0.250255796658j)*x[0] + ((-0.403934613912-0.417183472885j))*x[1]
+        ref[(3, 1, 1, 3)]=(0.107590759787-0.250255796658j)*x_ref[0] + ((-0.403934613912-0.417183472885j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(0.21433848415-0.000525911663677j)*x[0] + ((0.52858542133+0.900033695814j))*x[1]
+        ref[(3, 2, 0, 0)]=(0.21433848415-0.000525911663677j)*x_ref[0] + ((0.52858542133+0.900033695814j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(-0.0447422190145+0.484248903883j)*x[0] + ((0.847950326236-0.541936439911j))*x[1]
+        ref[(3, 2, 0, 1)]=(-0.0447422190145+0.484248903883j)*x_ref[0] + ((0.847950326236-0.541936439911j))*x_ref[1]
+        arg[(3, 2, 0, 2)]=(0.589298841104+0.978117142117j)*x[0] + ((-0.121159404984-0.528618311766j))*x[1]
+        ref[(3, 2, 0, 2)]=(0.589298841104+0.978117142117j)*x_ref[0] + ((-0.121159404984-0.528618311766j))*x_ref[1]
+        arg[(3, 2, 0, 3)]=(0.524804963791-0.455250915985j)*x[0] + ((0.261515736445-0.489522082224j))*x[1]
+        ref[(3, 2, 0, 3)]=(0.524804963791-0.455250915985j)*x_ref[0] + ((0.261515736445-0.489522082224j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.84505395773+0.95314206991j)*x[0] + ((-0.466017544129+0.848487766808j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.84505395773+0.95314206991j)*x_ref[0] + ((-0.466017544129+0.848487766808j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(0.168863766557+0.56763314367j)*x[0] + ((0.202014183117+0.721390361411j))*x[1]
+        ref[(3, 2, 1, 1)]=(0.168863766557+0.56763314367j)*x_ref[0] + ((0.202014183117+0.721390361411j))*x_ref[1]
+        arg[(3, 2, 1, 2)]=(0.861160907396-0.232314432003j)*x[0] + ((0.526831653459+0.812229754101j))*x[1]
+        ref[(3, 2, 1, 2)]=(0.861160907396-0.232314432003j)*x_ref[0] + ((0.526831653459+0.812229754101j))*x_ref[1]
+        arg[(3, 2, 1, 3)]=(0.504565735348-0.526800315087j)*x[0] + ((0.265795726627+0.456308094836j))*x[1]
+        ref[(3, 2, 1, 3)]=(0.504565735348-0.526800315087j)*x_ref[0] + ((0.265795726627+0.456308094836j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.929928066132+0.86878418636j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.929928066132+0.86878418636j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.467496511556-0.538764212036j)*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.467496511556-0.538764212036j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.311435293572-0.303670703941j)*x[2]
+            ref[(0, 0, 0, 2)]+=(0.311435293572-0.303670703941j)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(-0.249705882831+0.901687874062j)*x[2]
+            ref[(0, 0, 0, 3)]+=(-0.249705882831+0.901687874062j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.129337799276+0.706455640329j)*x[2]
+            ref[(0, 0, 1, 0)]+=(0.129337799276+0.706455640329j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.473658049287-0.0692133952182j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.473658049287-0.0692133952182j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.314118966898-0.232928446451j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.314118966898-0.232928446451j)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(0.00622988239408+0.0994183103336j)*x[2]
+            ref[(0, 0, 1, 3)]+=(0.00622988239408+0.0994183103336j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.481846609895+0.463941399882j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.481846609895+0.463941399882j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.100192369847+0.103061533313j)*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.100192369847+0.103061533313j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.33163742229+0.985776323285j)*x[2]
+            ref[(0, 1, 0, 2)]+=(0.33163742229+0.985776323285j)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(0.68490699401+0.654584935351j)*x[2]
+            ref[(0, 1, 0, 3)]+=(0.68490699401+0.654584935351j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.981169274734-0.751667812952j)*x[2]
+            ref[(0, 1, 1, 0)]+=(0.981169274734-0.751667812952j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.872963128136+0.161584250868j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.872963128136+0.161584250868j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.624204606734-0.235924196779j)*x[2]
+            ref[(0, 1, 1, 2)]+=(0.624204606734-0.235924196779j)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(-0.323601533076+0.971242670133j)*x[2]
+            ref[(0, 1, 1, 3)]+=(-0.323601533076+0.971242670133j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.157368585029+0.20292986265j)*x[2]
+            ref[(0, 2, 0, 0)]+=(0.157368585029+0.20292986265j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.497614938033-0.150235947478j)*x[2]
+            ref[(0, 2, 0, 1)]+=(0.497614938033-0.150235947478j)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(0.172036113637+0.711998418161j)*x[2]
+            ref[(0, 2, 0, 2)]+=(0.172036113637+0.711998418161j)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=(-0.936839229937+0.151369685969j)*x[2]
+            ref[(0, 2, 0, 3)]+=(-0.936839229937+0.151369685969j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.189475292305-0.518427492704j)*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.189475292305-0.518427492704j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.818892897966+0.154515467987j)*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.818892897966+0.154515467987j)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(-0.200776260053+0.666268287133j)*x[2]
+            ref[(0, 2, 1, 2)]+=(-0.200776260053+0.666268287133j)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=(0.967106732747+0.721318788853j)*x[2]
+            ref[(0, 2, 1, 3)]+=(0.967106732747+0.721318788853j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.420176124592+0.225350695741j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.420176124592+0.225350695741j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.629641640803+0.23608665281j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.629641640803+0.23608665281j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.371388086287-0.486480601183j)*x[2]
+            ref[(1, 0, 0, 2)]+=(0.371388086287-0.486480601183j)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.626063720071-0.330898231214j)*x[2]
+            ref[(1, 0, 0, 3)]+=(0.626063720071-0.330898231214j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.639753396148+0.446218410165j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.639753396148+0.446218410165j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.337738207302+0.886974827306j)*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.337738207302+0.886974827306j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.773775478751-0.0269439362191j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.773775478751-0.0269439362191j)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.842725851484-0.591591377933j)*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.842725851484-0.591591377933j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(-0.349383903328+0.586120841404j)*x[2]
+            ref[(1, 1, 0, 0)]+=(-0.349383903328+0.586120841404j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.171706639093+0.89277355723j)*x[2]
+            ref[(1, 1, 0, 1)]+=(0.171706639093+0.89277355723j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.906372928023+0.390038913434j)*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.906372928023+0.390038913434j)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.100358211057-0.293703204201j)*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.100358211057-0.293703204201j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.968702602625-0.981893881448j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.968702602625-0.981893881448j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.0813051509081+0.356372129616j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.0813051509081+0.356372129616j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.0907919104973+0.998906895713j)*x[2]
+            ref[(1, 1, 1, 2)]+=(0.0907919104973+0.998906895713j)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(0.833803106699+0.720083567817j)*x[2]
+            ref[(1, 1, 1, 3)]+=(0.833803106699+0.720083567817j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.763226621112+0.650813656137j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.763226621112+0.650813656137j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.737462523758-0.634473321558j)*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.737462523758-0.634473321558j)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.0581001709126-0.384674848912j)*x[2]
+            ref[(1, 2, 0, 2)]+=(0.0581001709126-0.384674848912j)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=(-0.070535987364-0.884646896366j)*x[2]
+            ref[(1, 2, 0, 3)]+=(-0.070535987364-0.884646896366j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.0392840490234-0.38000288984j)*x[2]
+            ref[(1, 2, 1, 0)]+=(0.0392840490234-0.38000288984j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.304409297709+0.314739160118j)*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.304409297709+0.314739160118j)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(-0.267652285837-0.547379749962j)*x[2]
+            ref[(1, 2, 1, 2)]+=(-0.267652285837-0.547379749962j)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=(0.628548312129+0.429460616103j)*x[2]
+            ref[(1, 2, 1, 3)]+=(0.628548312129+0.429460616103j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.193067139934-0.390158252638j)*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.193067139934-0.390158252638j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.178981595692+0.801188214967j)*x[2]
+            ref[(2, 0, 0, 1)]+=(0.178981595692+0.801188214967j)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(0.453527564598+0.959740955816j)*x[2]
+            ref[(2, 0, 0, 2)]+=(0.453527564598+0.959740955816j)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(0.439031634294+0.785911980653j)*x[2]
+            ref[(2, 0, 0, 3)]+=(0.439031634294+0.785911980653j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.401591733659-0.535798084575j)*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.401591733659-0.535798084575j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.745111819086-0.604677752086j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.745111819086-0.604677752086j)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.350169589426-0.717690756697j)*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.350169589426-0.717690756697j)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(0.551888161124-0.17268712888j)*x[2]
+            ref[(2, 0, 1, 3)]+=(0.551888161124-0.17268712888j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.718770414746-0.966532533772j)*x[2]
+            ref[(2, 1, 0, 0)]+=(0.718770414746-0.966532533772j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.457118698323+0.554534066786j)*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.457118698323+0.554534066786j)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.706644924825+0.670812027621j)*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.706644924825+0.670812027621j)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.643641542791-0.983969337421j)*x[2]
+            ref[(2, 1, 0, 3)]+=(0.643641542791-0.983969337421j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.759713955444+0.872789774599j)*x[2]
+            ref[(2, 1, 1, 0)]+=(0.759713955444+0.872789774599j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.771739407696+0.986914656403j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.771739407696+0.986914656403j)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.429786129341-0.382921893696j)*x[2]
+            ref[(2, 1, 1, 2)]+=(0.429786129341-0.382921893696j)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(-0.993737019285+0.68294971373j)*x[2]
+            ref[(2, 1, 1, 3)]+=(-0.993737019285+0.68294971373j)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.143615079495-0.723918195266j)*x[2]
+            ref[(2, 2, 0, 0)]+=(0.143615079495-0.723918195266j)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.820867799557-0.488794460618j)*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.820867799557-0.488794460618j)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(0.672748359547+0.779144586501j)*x[2]
+            ref[(2, 2, 0, 2)]+=(0.672748359547+0.779144586501j)*x_ref[2]
+            arg[(2, 2, 0, 3)]+=(-0.257556132652-0.770054555229j)*x[2]
+            ref[(2, 2, 0, 3)]+=(-0.257556132652-0.770054555229j)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.403199381154-0.938601418361j)*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.403199381154-0.938601418361j)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.543924931921+0.27844629049j)*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.543924931921+0.27844629049j)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(0.423998082957+0.989824810678j)*x[2]
+            ref[(2, 2, 1, 2)]+=(0.423998082957+0.989824810678j)*x_ref[2]
+            arg[(2, 2, 1, 3)]+=(0.684857425664+0.511854621583j)*x[2]
+            ref[(2, 2, 1, 3)]+=(0.684857425664+0.511854621583j)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.280496179027+0.544288305445j)*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.280496179027+0.544288305445j)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.00671225685431+0.64621591226j)*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.00671225685431+0.64621591226j)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(0.56473003905-0.522917716929j)*x[2]
+            ref[(3, 0, 0, 2)]+=(0.56473003905-0.522917716929j)*x_ref[2]
+            arg[(3, 0, 0, 3)]+=(0.0813990589877+0.954985291044j)*x[2]
+            ref[(3, 0, 0, 3)]+=(0.0813990589877+0.954985291044j)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.729134884698+0.305795962473j)*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.729134884698+0.305795962473j)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(0.940910263684-0.294525717618j)*x[2]
+            ref[(3, 0, 1, 1)]+=(0.940910263684-0.294525717618j)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(-0.130287586721+0.869704201681j)*x[2]
+            ref[(3, 0, 1, 2)]+=(-0.130287586721+0.869704201681j)*x_ref[2]
+            arg[(3, 0, 1, 3)]+=(-0.105896616158+0.736510340412j)*x[2]
+            ref[(3, 0, 1, 3)]+=(-0.105896616158+0.736510340412j)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.822518875595+0.199363802963j)*x[2]
+            ref[(3, 1, 0, 0)]+=(0.822518875595+0.199363802963j)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.0785866082893+0.432723811817j)*x[2]
+            ref[(3, 1, 0, 1)]+=(0.0785866082893+0.432723811817j)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(0.168888104276-0.347666656722j)*x[2]
+            ref[(3, 1, 0, 2)]+=(0.168888104276-0.347666656722j)*x_ref[2]
+            arg[(3, 1, 0, 3)]+=(-0.799883092273-0.768620147513j)*x[2]
+            ref[(3, 1, 0, 3)]+=(-0.799883092273-0.768620147513j)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.632742353688+0.392291107764j)*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.632742353688+0.392291107764j)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.590172405852+0.884900668346j)*x[2]
+            ref[(3, 1, 1, 1)]+=(0.590172405852+0.884900668346j)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(-0.810905197851+0.885160933089j)*x[2]
+            ref[(3, 1, 1, 2)]+=(-0.810905197851+0.885160933089j)*x_ref[2]
+            arg[(3, 1, 1, 3)]+=(-0.0771296186825-0.0367352635028j)*x[2]
+            ref[(3, 1, 1, 3)]+=(-0.0771296186825-0.0367352635028j)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(-0.394225420725+0.0242354971466j)*x[2]
+            ref[(3, 2, 0, 0)]+=(-0.394225420725+0.0242354971466j)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(0.0436133503604-0.543898764353j)*x[2]
+            ref[(3, 2, 0, 1)]+=(0.0436133503604-0.543898764353j)*x_ref[2]
+            arg[(3, 2, 0, 2)]+=(-0.0993657370825-0.913268558374j)*x[2]
+            ref[(3, 2, 0, 2)]+=(-0.0993657370825-0.913268558374j)*x_ref[2]
+            arg[(3, 2, 0, 3)]+=(-0.773623185925+0.676495463264j)*x[2]
+            ref[(3, 2, 0, 3)]+=(-0.773623185925+0.676495463264j)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(0.437893979659+0.155839805775j)*x[2]
+            ref[(3, 2, 1, 0)]+=(0.437893979659+0.155839805775j)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(-0.300329957729+0.759744566475j)*x[2]
+            ref[(3, 2, 1, 1)]+=(-0.300329957729+0.759744566475j)*x_ref[2]
+            arg[(3, 2, 1, 2)]+=(-0.119118678235-0.21284966143j)*x[2]
+            ref[(3, 2, 1, 2)]+=(-0.119118678235-0.21284966143j)*x_ref[2]
+            arg[(3, 2, 1, 3)]+=(0.571645211363+0.519811098426j)*x[2]
+            ref[(3, 2, 1, 3)]+=(0.571645211363+0.519811098426j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.337936416086+0.879146035096j)*x[0]**o + ((0.206936745687+0.0469164259985j))*x[0] + ((0.415126067566-0.621601844708j))*x[1]**o + ((-0.837255567149-0.772917562854j))*x[1]
+        ref=(0.337936416086+0.879146035096j)*x_ref[0]**o + ((0.206936745687+0.0469164259985j))*x_ref[0] + ((0.415126067566-0.621601844708j))*x_ref[1]**o + ((-0.837255567149-0.772917562854j))*x_ref[1]
+        if dim==3:
+            arg+=((0.82544815618+0.730388878277j))*x[2]**o + ((-0.483455212327+0.869153990095j))*x[2]
+            ref+=((0.82544815618+0.730388878277j))*x_ref[2]**o + ((-0.483455212327+0.869153990095j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.802062938836+0.894512632468j)*x[0]**o + ((-0.398806257077-0.756569960382j))*x[0] + ((0.403620421406+0.717857142279j))*x[1]**o + ((0.352051166231+0.684040071817j))*x[1]
+        ref[(0,)]=(0.802062938836+0.894512632468j)*x_ref[0]**o + ((-0.398806257077-0.756569960382j))*x_ref[0] + ((0.403620421406+0.717857142279j))*x_ref[1]**o + ((0.352051166231+0.684040071817j))*x_ref[1]
+        arg[(1,)]=(-0.13119165098-0.654757519743j)*x[0]**o + ((-0.676753938872+0.7884439262j))*x[0] + ((0.168806410492+0.16276988472j))*x[1]**o + ((0.72070037131+0.094582943187j))*x[1]
+        ref[(1,)]=(-0.13119165098-0.654757519743j)*x_ref[0]**o + ((-0.676753938872+0.7884439262j))*x_ref[0] + ((0.168806410492+0.16276988472j))*x_ref[1]**o + ((0.72070037131+0.094582943187j))*x_ref[1]
+        arg[(2,)]=(0.727199849313+0.691420452323j)*x[0]**o + ((-0.693388866431-0.132259301172j))*x[0] + ((-0.985502883359-0.011281495423j))*x[1]**o + ((0.721134680893+0.398180324171j))*x[1]
+        ref[(2,)]=(0.727199849313+0.691420452323j)*x_ref[0]**o + ((-0.693388866431-0.132259301172j))*x_ref[0] + ((-0.985502883359-0.011281495423j))*x_ref[1]**o + ((0.721134680893+0.398180324171j))*x_ref[1]
+        arg[(3,)]=(0.212959472218+0.974222255326j)*x[0]**o + ((-0.644906811731+0.365399716144j))*x[0] + ((0.665821870532-0.827987876754j))*x[1]**o + ((0.584722327543+0.314838933668j))*x[1]
+        ref[(3,)]=(0.212959472218+0.974222255326j)*x_ref[0]**o + ((-0.644906811731+0.365399716144j))*x_ref[0] + ((0.665821870532-0.827987876754j))*x_ref[1]**o + ((0.584722327543+0.314838933668j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.53096343108-0.406912512279j)*x[2]**o + ((0.0979870948117-0.524618507014j))*x[2]
+            ref[(0,)]+=(0.53096343108-0.406912512279j)*x_ref[2]**o + ((0.0979870948117-0.524618507014j))*x_ref[2]
+            arg[(1,)]+=(0.592037919818-0.139518864385j)*x[2]**o + ((-0.65322070771-0.6694006404j))*x[2]
+            ref[(1,)]+=(0.592037919818-0.139518864385j)*x_ref[2]**o + ((-0.65322070771-0.6694006404j))*x_ref[2]
+            arg[(2,)]+=(0.140990469387-0.291313383643j)*x[2]**o + ((-0.17781147678-0.587890118763j))*x[2]
+            ref[(2,)]+=(0.140990469387-0.291313383643j)*x_ref[2]**o + ((-0.17781147678-0.587890118763j))*x_ref[2]
+            arg[(3,)]+=(-0.757505974395-0.14202758046j)*x[2]**o + ((0.954741184465-0.995118597995j))*x[2]
+            ref[(3,)]+=(-0.757505974395-0.14202758046j)*x_ref[2]**o + ((0.954741184465-0.995118597995j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=(0.0877959592501+0.527163432785j)*x[0]**o + ((-0.395654607132+0.798140740435j))*x[0] + ((0.270898826442+0.486433843237j))*x[1]**o + ((-0.282568773042+0.472037631238j))*x[1]
+        ref[(0, 0)]=(0.0877959592501+0.527163432785j)*x_ref[0]**o + ((-0.395654607132+0.798140740435j))*x_ref[0] + ((0.270898826442+0.486433843237j))*x_ref[1]**o + ((-0.282568773042+0.472037631238j))*x_ref[1]
+        arg[(0, 1)]=(-0.401576534399-0.544248721063j)*x[0]**o + ((-0.710712681204+0.402487787748j))*x[0] + ((-0.242893860838+0.96728987423j))*x[1]**o + ((0.176988009302-0.111397853347j))*x[1]
+        ref[(0, 1)]=(-0.401576534399-0.544248721063j)*x_ref[0]**o + ((-0.710712681204+0.402487787748j))*x_ref[0] + ((-0.242893860838+0.96728987423j))*x_ref[1]**o + ((0.176988009302-0.111397853347j))*x_ref[1]
+        arg[(0, 2)]=(0.764037017786+0.697921289005j)*x[0]**o + ((-0.714620943329-0.336913186837j))*x[0] + ((0.886584626126+0.826482992215j))*x[1]**o + ((-0.285706624908+0.476813118751j))*x[1]
+        ref[(0, 2)]=(0.764037017786+0.697921289005j)*x_ref[0]**o + ((-0.714620943329-0.336913186837j))*x_ref[0] + ((0.886584626126+0.826482992215j))*x_ref[1]**o + ((-0.285706624908+0.476813118751j))*x_ref[1]
+        arg[(0, 3)]=(0.897424748468-0.142901569456j)*x[0]**o + ((-0.28640656449+0.114412173238j))*x[0] + ((-0.559764233353+0.422220478321j))*x[1]**o + ((0.75170895804-0.399354743716j))*x[1]
+        ref[(0, 3)]=(0.897424748468-0.142901569456j)*x_ref[0]**o + ((-0.28640656449+0.114412173238j))*x_ref[0] + ((-0.559764233353+0.422220478321j))*x_ref[1]**o + ((0.75170895804-0.399354743716j))*x_ref[1]
+        arg[(1, 0)]=(-0.274034396845+0.0687168701409j)*x[0]**o + ((0.308630088975-0.0274700560425j))*x[0] + ((-0.575552173111-0.0508537279931j))*x[1]**o + ((-0.301548571335-0.5771528341j))*x[1]
+        ref[(1, 0)]=(-0.274034396845+0.0687168701409j)*x_ref[0]**o + ((0.308630088975-0.0274700560425j))*x_ref[0] + ((-0.575552173111-0.0508537279931j))*x_ref[1]**o + ((-0.301548571335-0.5771528341j))*x_ref[1]
+        arg[(1, 1)]=(-0.768393575256-0.252089506004j)*x[0]**o + ((-0.577588349762+0.614209613675j))*x[0] + ((0.459274105958-0.968300482473j))*x[1]**o + ((0.496817916553+0.637719970296j))*x[1]
+        ref[(1, 1)]=(-0.768393575256-0.252089506004j)*x_ref[0]**o + ((-0.577588349762+0.614209613675j))*x_ref[0] + ((0.459274105958-0.968300482473j))*x_ref[1]**o + ((0.496817916553+0.637719970296j))*x_ref[1]
+        arg[(1, 2)]=(0.117531281417+0.140112620682j)*x[0]**o + ((-0.784352217972+0.106049617214j))*x[0] + ((-0.928414273086-0.836307924531j))*x[1]**o + ((-0.957388058708-0.684392923577j))*x[1]
+        ref[(1, 2)]=(0.117531281417+0.140112620682j)*x_ref[0]**o + ((-0.784352217972+0.106049617214j))*x_ref[0] + ((-0.928414273086-0.836307924531j))*x_ref[1]**o + ((-0.957388058708-0.684392923577j))*x_ref[1]
+        arg[(1, 3)]=(0.767033150164-0.92830544292j)*x[0]**o + ((-0.0599867345999-0.0240065410546j))*x[0] + ((-0.486920857706-0.0994136776186j))*x[1]**o + ((0.602574445151-0.491414565701j))*x[1]
+        ref[(1, 3)]=(0.767033150164-0.92830544292j)*x_ref[0]**o + ((-0.0599867345999-0.0240065410546j))*x_ref[0] + ((-0.486920857706-0.0994136776186j))*x_ref[1]**o + ((0.602574445151-0.491414565701j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.906726748083-0.467279545735j)*x[2]**o + ((-0.58398396835-0.149599023256j))*x[2]
+            ref[(0, 0)]+=(0.906726748083-0.467279545735j)*x_ref[2]**o + ((-0.58398396835-0.149599023256j))*x_ref[2]
+            arg[(0, 1)]+=(-0.174084974095+0.0248180686261j)*x[2]**o + ((0.804286148635-0.709289609092j))*x[2]
+            ref[(0, 1)]+=(-0.174084974095+0.0248180686261j)*x_ref[2]**o + ((0.804286148635-0.709289609092j))*x_ref[2]
+            arg[(0, 2)]+=(0.778728385527-0.0610189724699j)*x[2]**o + ((-0.481907302572-0.468285342281j))*x[2]
+            ref[(0, 2)]+=(0.778728385527-0.0610189724699j)*x_ref[2]**o + ((-0.481907302572-0.468285342281j))*x_ref[2]
+            arg[(0, 3)]+=(-0.749991346643+0.92717698023j)*x[2]**o + ((0.131231670173-0.683407233735j))*x[2]
+            ref[(0, 3)]+=(-0.749991346643+0.92717698023j)*x_ref[2]**o + ((0.131231670173-0.683407233735j))*x_ref[2]
+            arg[(1, 0)]+=(-0.534754207132-0.739056469564j)*x[2]**o + ((-0.537113602816+0.278235033976j))*x[2]
+            ref[(1, 0)]+=(-0.534754207132-0.739056469564j)*x_ref[2]**o + ((-0.537113602816+0.278235033976j))*x_ref[2]
+            arg[(1, 1)]+=(0.463643118938-0.537716974489j)*x[2]**o + ((0.619775445308+0.94727292256j))*x[2]
+            ref[(1, 1)]+=(0.463643118938-0.537716974489j)*x_ref[2]**o + ((0.619775445308+0.94727292256j))*x_ref[2]
+            arg[(1, 2)]+=(0.778665037803-0.413122459849j)*x[2]**o + ((-0.551822389784-0.555003803299j))*x[2]
+            ref[(1, 2)]+=(0.778665037803-0.413122459849j)*x_ref[2]**o + ((-0.551822389784-0.555003803299j))*x_ref[2]
+            arg[(1, 3)]+=(0.531277183459-0.763356560653j)*x[2]**o + ((-0.109458058191-0.326221820507j))*x[2]
+            ref[(1, 3)]+=(0.531277183459-0.763356560653j)*x_ref[2]**o + ((-0.109458058191-0.326221820507j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 2),w)
+        ref = Data(0,(2, 4, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.407992419238-0.505434091649j)*x[0]**o + ((-0.424392905158+0.584745392994j))*x[0] + ((-0.971973049788+0.780655780261j))*x[1]**o + ((0.767820835371-0.465698853578j))*x[1]
+        ref[(0, 0, 0)]=(-0.407992419238-0.505434091649j)*x_ref[0]**o + ((-0.424392905158+0.584745392994j))*x_ref[0] + ((-0.971973049788+0.780655780261j))*x_ref[1]**o + ((0.767820835371-0.465698853578j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.440830186811-0.654165204653j)*x[0]**o + ((-0.908359226286-0.970427274338j))*x[0] + ((0.545980032789-0.718678739392j))*x[1]**o + ((0.789809069453+0.715439424623j))*x[1]
+        ref[(0, 0, 1)]=(0.440830186811-0.654165204653j)*x_ref[0]**o + ((-0.908359226286-0.970427274338j))*x_ref[0] + ((0.545980032789-0.718678739392j))*x_ref[1]**o + ((0.789809069453+0.715439424623j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.720917319477+0.890830809281j)*x[0]**o + ((-0.796150482721+0.825211169999j))*x[0] + ((-0.551412475768+0.0691311516537j))*x[1]**o + ((-0.871267160417+0.307086282053j))*x[1]
+        ref[(0, 1, 0)]=(0.720917319477+0.890830809281j)*x_ref[0]**o + ((-0.796150482721+0.825211169999j))*x_ref[0] + ((-0.551412475768+0.0691311516537j))*x_ref[1]**o + ((-0.871267160417+0.307086282053j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.535031932762+0.75022519452j)*x[0]**o + ((-0.437871553298-0.621159710059j))*x[0] + ((0.99017778778+0.769051407335j))*x[1]**o + ((0.504122423674+0.783263009014j))*x[1]
+        ref[(0, 1, 1)]=(-0.535031932762+0.75022519452j)*x_ref[0]**o + ((-0.437871553298-0.621159710059j))*x_ref[0] + ((0.99017778778+0.769051407335j))*x_ref[1]**o + ((0.504122423674+0.783263009014j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.1742956699+0.483481393091j)*x[0]**o + ((-0.824733348117-0.778627467032j))*x[0] + ((0.21840093667-0.844363885016j))*x[1]**o + ((0.588844739613-0.74990779271j))*x[1]
+        ref[(0, 2, 0)]=(-0.1742956699+0.483481393091j)*x_ref[0]**o + ((-0.824733348117-0.778627467032j))*x_ref[0] + ((0.21840093667-0.844363885016j))*x_ref[1]**o + ((0.588844739613-0.74990779271j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.142831444787+0.845000670279j)*x[0]**o + ((-0.997383844161+0.914153862891j))*x[0] + ((-0.246606164206+0.38985475605j))*x[1]**o + ((0.343152365751-0.454802569802j))*x[1]
+        ref[(0, 2, 1)]=(0.142831444787+0.845000670279j)*x_ref[0]**o + ((-0.997383844161+0.914153862891j))*x_ref[0] + ((-0.246606164206+0.38985475605j))*x_ref[1]**o + ((0.343152365751-0.454802569802j))*x_ref[1]
+        arg[(0, 3, 0)]=(0.0807730678791+0.170717810646j)*x[0]**o + ((0.80145375076+0.984871805239j))*x[0] + ((-0.248444097302+0.645791423118j))*x[1]**o + ((-0.915846433984+0.288692920119j))*x[1]
+        ref[(0, 3, 0)]=(0.0807730678791+0.170717810646j)*x_ref[0]**o + ((0.80145375076+0.984871805239j))*x_ref[0] + ((-0.248444097302+0.645791423118j))*x_ref[1]**o + ((-0.915846433984+0.288692920119j))*x_ref[1]
+        arg[(0, 3, 1)]=(0.929926765799-0.81526666938j)*x[0]**o + ((0.702349783419+0.559096206758j))*x[0] + ((-0.498740520736+0.411893616276j))*x[1]**o + ((-0.423411199798+0.117550295673j))*x[1]
+        ref[(0, 3, 1)]=(0.929926765799-0.81526666938j)*x_ref[0]**o + ((0.702349783419+0.559096206758j))*x_ref[0] + ((-0.498740520736+0.411893616276j))*x_ref[1]**o + ((-0.423411199798+0.117550295673j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.312026934838-0.282801640822j)*x[0]**o + ((0.034151914247+0.597226080721j))*x[0] + ((0.622619326048-0.0228255434125j))*x[1]**o + ((-0.737703681131+0.0626159172464j))*x[1]
+        ref[(1, 0, 0)]=(-0.312026934838-0.282801640822j)*x_ref[0]**o + ((0.034151914247+0.597226080721j))*x_ref[0] + ((0.622619326048-0.0228255434125j))*x_ref[1]**o + ((-0.737703681131+0.0626159172464j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.73585218898+0.191962522221j)*x[0]**o + ((-0.365651300764+0.661550446866j))*x[0] + ((0.666611754864+0.296017478512j))*x[1]**o + ((-0.845628511361+0.798158906582j))*x[1]
+        ref[(1, 0, 1)]=(0.73585218898+0.191962522221j)*x_ref[0]**o + ((-0.365651300764+0.661550446866j))*x_ref[0] + ((0.666611754864+0.296017478512j))*x_ref[1]**o + ((-0.845628511361+0.798158906582j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.164730039089+0.883655470993j)*x[0]**o + ((-0.900847985126+0.420790128465j))*x[0] + ((0.707274341034-0.186289435542j))*x[1]**o + ((0.892040408635-0.380532815655j))*x[1]
+        ref[(1, 1, 0)]=(0.164730039089+0.883655470993j)*x_ref[0]**o + ((-0.900847985126+0.420790128465j))*x_ref[0] + ((0.707274341034-0.186289435542j))*x_ref[1]**o + ((0.892040408635-0.380532815655j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.974101666026-0.0654025074405j)*x[0]**o + ((-0.75143997344-0.0973313251275j))*x[0] + ((0.364526700221+0.277459669457j))*x[1]**o + ((-0.0712503434036-0.603886373767j))*x[1]
+        ref[(1, 1, 1)]=(-0.974101666026-0.0654025074405j)*x_ref[0]**o + ((-0.75143997344-0.0973313251275j))*x_ref[0] + ((0.364526700221+0.277459669457j))*x_ref[1]**o + ((-0.0712503434036-0.603886373767j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.508655805495-0.275984798341j)*x[0]**o + ((-0.583791978304+0.174588591916j))*x[0] + ((-0.241116991538+0.392207287308j))*x[1]**o + ((-0.92556025412+0.950500909525j))*x[1]
+        ref[(1, 2, 0)]=(-0.508655805495-0.275984798341j)*x_ref[0]**o + ((-0.583791978304+0.174588591916j))*x_ref[0] + ((-0.241116991538+0.392207287308j))*x_ref[1]**o + ((-0.92556025412+0.950500909525j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.639324136963-0.764250551696j)*x[0]**o + ((-0.370548045875-0.618091152662j))*x[0] + ((0.336572734869-0.7067677866j))*x[1]**o + ((-0.22463005321-0.385361673579j))*x[1]
+        ref[(1, 2, 1)]=(-0.639324136963-0.764250551696j)*x_ref[0]**o + ((-0.370548045875-0.618091152662j))*x_ref[0] + ((0.336572734869-0.7067677866j))*x_ref[1]**o + ((-0.22463005321-0.385361673579j))*x_ref[1]
+        arg[(1, 3, 0)]=(0.875260833005-0.826680738464j)*x[0]**o + ((0.294468843516-0.204023610738j))*x[0] + ((0.613700254079-0.501168601247j))*x[1]**o + ((-0.38524744265-0.932131461376j))*x[1]
+        ref[(1, 3, 0)]=(0.875260833005-0.826680738464j)*x_ref[0]**o + ((0.294468843516-0.204023610738j))*x_ref[0] + ((0.613700254079-0.501168601247j))*x_ref[1]**o + ((-0.38524744265-0.932131461376j))*x_ref[1]
+        arg[(1, 3, 1)]=(0.379544978628+0.436703948324j)*x[0]**o + ((-0.69006621183+0.872709620375j))*x[0] + ((0.253094603365+0.842358247968j))*x[1]**o + ((0.16174134908-0.284622718384j))*x[1]
+        ref[(1, 3, 1)]=(0.379544978628+0.436703948324j)*x_ref[0]**o + ((-0.69006621183+0.872709620375j))*x_ref[0] + ((0.253094603365+0.842358247968j))*x_ref[1]**o + ((0.16174134908-0.284622718384j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.72623932705+0.91700039985j)*x[2]**o + ((0.80826124658+0.926118329726j))*x[2]
+            ref[(0, 0, 0)]+=(-0.72623932705+0.91700039985j)*x_ref[2]**o + ((0.80826124658+0.926118329726j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.237228159697-0.487568187559j)*x[2]**o + ((0.926865797317+0.28122071169j))*x[2]
+            ref[(0, 0, 1)]+=(0.237228159697-0.487568187559j)*x_ref[2]**o + ((0.926865797317+0.28122071169j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.851730536087+0.508305600159j)*x[2]**o + ((-0.284079718673-0.0847014446784j))*x[2]
+            ref[(0, 1, 0)]+=(0.851730536087+0.508305600159j)*x_ref[2]**o + ((-0.284079718673-0.0847014446784j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.636630665773+0.916355311453j)*x[2]**o + ((0.240057971039+0.761571971806j))*x[2]
+            ref[(0, 1, 1)]+=(-0.636630665773+0.916355311453j)*x_ref[2]**o + ((0.240057971039+0.761571971806j))*x_ref[2]
+            arg[(0, 2, 0)]+=(0.696825913946-0.0632326357954j)*x[2]**o + ((0.0193442927901-0.85758534393j))*x[2]
+            ref[(0, 2, 0)]+=(0.696825913946-0.0632326357954j)*x_ref[2]**o + ((0.0193442927901-0.85758534393j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.465761186602+0.28233734951j)*x[2]**o + ((0.667320383879+0.0515038564144j))*x[2]
+            ref[(0, 2, 1)]+=(0.465761186602+0.28233734951j)*x_ref[2]**o + ((0.667320383879+0.0515038564144j))*x_ref[2]
+            arg[(0, 3, 0)]+=(-0.0417067443615-0.102452829682j)*x[2]**o + ((0.00428114775828-0.857815716733j))*x[2]
+            ref[(0, 3, 0)]+=(-0.0417067443615-0.102452829682j)*x_ref[2]**o + ((0.00428114775828-0.857815716733j))*x_ref[2]
+            arg[(0, 3, 1)]+=(0.581008991196-0.747489707377j)*x[2]**o + ((-0.0341640866992-0.259980180917j))*x[2]
+            ref[(0, 3, 1)]+=(0.581008991196-0.747489707377j)*x_ref[2]**o + ((-0.0341640866992-0.259980180917j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.245743808239-0.314094139991j)*x[2]**o + ((0.323963648858-0.166070212598j))*x[2]
+            ref[(1, 0, 0)]+=(0.245743808239-0.314094139991j)*x_ref[2]**o + ((0.323963648858-0.166070212598j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.246237048588-0.362452428429j)*x[2]**o + ((0.796177415482-0.556901308389j))*x[2]
+            ref[(1, 0, 1)]+=(-0.246237048588-0.362452428429j)*x_ref[2]**o + ((0.796177415482-0.556901308389j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.00356147369003-0.0311773359843j)*x[2]**o + ((-0.500356874751+0.660794544412j))*x[2]
+            ref[(1, 1, 0)]+=(-0.00356147369003-0.0311773359843j)*x_ref[2]**o + ((-0.500356874751+0.660794544412j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.782782585313+0.867366282234j)*x[2]**o + ((0.557631341932-0.231553913097j))*x[2]
+            ref[(1, 1, 1)]+=(0.782782585313+0.867366282234j)*x_ref[2]**o + ((0.557631341932-0.231553913097j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.915840984318-0.486492380352j)*x[2]**o + ((-0.176420662467+0.447853343229j))*x[2]
+            ref[(1, 2, 0)]+=(-0.915840984318-0.486492380352j)*x_ref[2]**o + ((-0.176420662467+0.447853343229j))*x_ref[2]
+            arg[(1, 2, 1)]+=(0.610352709274+0.595845719372j)*x[2]**o + ((-0.449306468794-0.342613697426j))*x[2]
+            ref[(1, 2, 1)]+=(0.610352709274+0.595845719372j)*x_ref[2]**o + ((-0.449306468794-0.342613697426j))*x_ref[2]
+            arg[(1, 3, 0)]+=(0.651824293191+0.166504570802j)*x[2]**o + ((-0.39717363482+0.0987172912895j))*x[2]
+            ref[(1, 3, 0)]+=(0.651824293191+0.166504570802j)*x_ref[2]**o + ((-0.39717363482+0.0987172912895j))*x_ref[2]
+            arg[(1, 3, 1)]+=(0.661602273487-0.675780254142j)*x[2]**o + ((0.153904703256-0.944833264007j))*x[2]
+            ref[(1, 3, 1)]+=(0.661602273487-0.675780254142j)*x_ref[2]**o + ((0.153904703256-0.944833264007j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 3, 2),w)
+        ref = Data(0,(3, 4, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.734412131632-0.271595161728j)*x[0]**o + ((-0.0513326662446+0.23504128163j))*x[0] + ((-0.206172349949+0.122159501922j))*x[1]**o + ((-0.427694987825-0.881260165278j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.734412131632-0.271595161728j)*x_ref[0]**o + ((-0.0513326662446+0.23504128163j))*x_ref[0] + ((-0.206172349949+0.122159501922j))*x_ref[1]**o + ((-0.427694987825-0.881260165278j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.807489181953+0.217086370746j)*x[0]**o + ((0.584735248542-0.345884178542j))*x[0] + ((0.479736552006-0.266527829773j))*x[1]**o + ((0.501939951337-0.136280311179j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.807489181953+0.217086370746j)*x_ref[0]**o + ((0.584735248542-0.345884178542j))*x_ref[0] + ((0.479736552006-0.266527829773j))*x_ref[1]**o + ((0.501939951337-0.136280311179j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.182431871304+0.736271763812j)*x[0]**o + ((-0.979232194955-0.836124060456j))*x[0] + ((-0.25247606794-0.559369673933j))*x[1]**o + ((-0.701514143723-0.323296683782j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.182431871304+0.736271763812j)*x_ref[0]**o + ((-0.979232194955-0.836124060456j))*x_ref[0] + ((-0.25247606794-0.559369673933j))*x_ref[1]**o + ((-0.701514143723-0.323296683782j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.329643316948-0.868806051998j)*x[0]**o + ((-0.411323935682-0.456905757268j))*x[0] + ((0.197189121265+0.0353746012042j))*x[1]**o + ((0.378371861001-0.645810943323j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.329643316948-0.868806051998j)*x_ref[0]**o + ((-0.411323935682-0.456905757268j))*x_ref[0] + ((0.197189121265+0.0353746012042j))*x_ref[1]**o + ((0.378371861001-0.645810943323j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.727484326443+0.968341463534j)*x[0]**o + ((-0.905347175457+0.30044612251j))*x[0] + ((0.962985850507-0.96019530821j))*x[1]**o + ((-0.266041641466+0.0760379527761j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.727484326443+0.968341463534j)*x_ref[0]**o + ((-0.905347175457+0.30044612251j))*x_ref[0] + ((0.962985850507-0.96019530821j))*x_ref[1]**o + ((-0.266041641466+0.0760379527761j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.937229148681+0.861201592099j)*x[0]**o + ((-0.551776722136-0.448287556984j))*x[0] + ((0.145632530657-0.456280366626j))*x[1]**o + ((-0.530529805521+0.589620130414j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.937229148681+0.861201592099j)*x_ref[0]**o + ((-0.551776722136-0.448287556984j))*x_ref[0] + ((0.145632530657-0.456280366626j))*x_ref[1]**o + ((-0.530529805521+0.589620130414j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.100762668002-0.232947363074j)*x[0]**o + ((0.863835957529-0.0429409760129j))*x[0] + ((-0.239783365238+0.64558824925j))*x[1]**o + ((-0.34051393682-0.741931498037j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.100762668002-0.232947363074j)*x_ref[0]**o + ((0.863835957529-0.0429409760129j))*x_ref[0] + ((-0.239783365238+0.64558824925j))*x_ref[1]**o + ((-0.34051393682-0.741931498037j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.0867389434595+0.923017453079j)*x[0]**o + ((0.692760049335-0.659368390802j))*x[0] + ((-0.66099015449+0.344629203212j))*x[1]**o + ((-0.005693066545-0.299080935794j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.0867389434595+0.923017453079j)*x_ref[0]**o + ((0.692760049335-0.659368390802j))*x_ref[0] + ((-0.66099015449+0.344629203212j))*x_ref[1]**o + ((-0.005693066545-0.299080935794j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.62804128885+0.954141146044j)*x[0]**o + ((-0.462191631018-0.439056089083j))*x[0] + ((-0.517167208043+0.158861827457j))*x[1]**o + ((-0.957162231329-0.981090401532j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.62804128885+0.954141146044j)*x_ref[0]**o + ((-0.462191631018-0.439056089083j))*x_ref[0] + ((-0.517167208043+0.158861827457j))*x_ref[1]**o + ((-0.957162231329-0.981090401532j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.217464275581-0.672926256279j)*x[0]**o + ((0.755295276486-0.0999260702105j))*x[0] + ((-0.0789972534751-0.815559420597j))*x[1]**o + ((0.849242925712+0.542362698663j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.217464275581-0.672926256279j)*x_ref[0]**o + ((0.755295276486-0.0999260702105j))*x_ref[0] + ((-0.0789972534751-0.815559420597j))*x_ref[1]**o + ((0.849242925712+0.542362698663j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.448978317325-0.106430527714j)*x[0]**o + ((0.663275236713-0.128326707418j))*x[0] + ((0.972021105282+0.949924603113j))*x[1]**o + ((0.578381060404+0.795768899377j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.448978317325-0.106430527714j)*x_ref[0]**o + ((0.663275236713-0.128326707418j))*x_ref[0] + ((0.972021105282+0.949924603113j))*x_ref[1]**o + ((0.578381060404+0.795768899377j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.463920943746+0.846207333872j)*x[0]**o + ((0.879937169106+0.207964029649j))*x[0] + ((0.394846060134-0.910560927828j))*x[1]**o + ((0.110173087745+0.211108765306j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.463920943746+0.846207333872j)*x_ref[0]**o + ((0.879937169106+0.207964029649j))*x_ref[0] + ((0.394846060134-0.910560927828j))*x_ref[1]**o + ((0.110173087745+0.211108765306j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.82800908978-0.986727142371j)*x[0]**o + ((-0.256014716717-0.366862947054j))*x[0] + ((-0.677316036942+0.426931462411j))*x[1]**o + ((0.0776228969874-0.399558008511j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.82800908978-0.986727142371j)*x_ref[0]**o + ((-0.256014716717-0.366862947054j))*x_ref[0] + ((-0.677316036942+0.426931462411j))*x_ref[1]**o + ((0.0776228969874-0.399558008511j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.118382975785-0.383490559528j)*x[0]**o + ((0.762258082414-0.102980684384j))*x[0] + ((0.938087844477+0.907745066622j))*x[1]**o + ((-0.700224049374-0.240642324806j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.118382975785-0.383490559528j)*x_ref[0]**o + ((0.762258082414-0.102980684384j))*x_ref[0] + ((0.938087844477+0.907745066622j))*x_ref[1]**o + ((-0.700224049374-0.240642324806j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.967182539919-0.224741533212j)*x[0]**o + ((-0.303571145606+0.633050065772j))*x[0] + ((0.733774818312-0.382789770039j))*x[1]**o + ((-0.530308663745-0.868498412181j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.967182539919-0.224741533212j)*x_ref[0]**o + ((-0.303571145606+0.633050065772j))*x_ref[0] + ((0.733774818312-0.382789770039j))*x_ref[1]**o + ((-0.530308663745-0.868498412181j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.814416920065-0.649938553682j)*x[0]**o + ((-0.416527063199-0.806101996825j))*x[0] + ((0.0755808793873+0.527311670259j))*x[1]**o + ((0.0455241640234+0.426553348948j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.814416920065-0.649938553682j)*x_ref[0]**o + ((-0.416527063199-0.806101996825j))*x_ref[0] + ((0.0755808793873+0.527311670259j))*x_ref[1]**o + ((0.0455241640234+0.426553348948j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.333790068375+0.00857241153395j)*x[0]**o + ((0.950050425068-0.237317596113j))*x[0] + ((0.558352847408+0.642153423677j))*x[1]**o + ((0.428379603721-0.578135685341j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.333790068375+0.00857241153395j)*x_ref[0]**o + ((0.950050425068-0.237317596113j))*x_ref[0] + ((0.558352847408+0.642153423677j))*x_ref[1]**o + ((0.428379603721-0.578135685341j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(0.961991055238+0.489027480771j)*x[0]**o + ((0.185512418624-0.595600978513j))*x[0] + ((0.493170607954-0.0650091080574j))*x[1]**o + ((-0.17634164627-0.452849772991j))*x[1]
+        ref[(0, 2, 2, 1)]=(0.961991055238+0.489027480771j)*x_ref[0]**o + ((0.185512418624-0.595600978513j))*x_ref[0] + ((0.493170607954-0.0650091080574j))*x_ref[1]**o + ((-0.17634164627-0.452849772991j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.202054081598+0.681366866083j)*x[0]**o + ((-0.059358531644+0.115312419733j))*x[0] + ((0.617311928801+0.734619479991j))*x[1]**o + ((0.66235225329+0.679562667876j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.202054081598+0.681366866083j)*x_ref[0]**o + ((-0.059358531644+0.115312419733j))*x_ref[0] + ((0.617311928801+0.734619479991j))*x_ref[1]**o + ((0.66235225329+0.679562667876j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(-0.721581468373+0.256901200385j)*x[0]**o + ((0.387288512118+0.71457681108j))*x[0] + ((0.635247477764+0.365228016513j))*x[1]**o + ((0.450871945107+0.882387271474j))*x[1]
+        ref[(0, 3, 0, 1)]=(-0.721581468373+0.256901200385j)*x_ref[0]**o + ((0.387288512118+0.71457681108j))*x_ref[0] + ((0.635247477764+0.365228016513j))*x_ref[1]**o + ((0.450871945107+0.882387271474j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(-0.679460436028+0.506484632637j)*x[0]**o + ((0.175997565818-0.335374913697j))*x[0] + ((0.00713728523181-0.827340460852j))*x[1]**o + ((0.473546669492+0.635605242054j))*x[1]
+        ref[(0, 3, 1, 0)]=(-0.679460436028+0.506484632637j)*x_ref[0]**o + ((0.175997565818-0.335374913697j))*x_ref[0] + ((0.00713728523181-0.827340460852j))*x_ref[1]**o + ((0.473546669492+0.635605242054j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(0.187673205495+0.660267582408j)*x[0]**o + ((-0.880941876064+0.687656534887j))*x[0] + ((0.90637613274-0.137097500893j))*x[1]**o + ((-0.713740058488+0.218919532737j))*x[1]
+        ref[(0, 3, 1, 1)]=(0.187673205495+0.660267582408j)*x_ref[0]**o + ((-0.880941876064+0.687656534887j))*x_ref[0] + ((0.90637613274-0.137097500893j))*x_ref[1]**o + ((-0.713740058488+0.218919532737j))*x_ref[1]
+        arg[(0, 3, 2, 0)]=(-0.542366518867-0.0651551662697j)*x[0]**o + ((-0.991832155883-0.578004149299j))*x[0] + ((0.982755447735-0.0935002582583j))*x[1]**o + ((-0.803676646054-0.65991926773j))*x[1]
+        ref[(0, 3, 2, 0)]=(-0.542366518867-0.0651551662697j)*x_ref[0]**o + ((-0.991832155883-0.578004149299j))*x_ref[0] + ((0.982755447735-0.0935002582583j))*x_ref[1]**o + ((-0.803676646054-0.65991926773j))*x_ref[1]
+        arg[(0, 3, 2, 1)]=(0.030999090328-0.592388972177j)*x[0]**o + ((0.330206632527+0.986480006522j))*x[0] + ((0.908498876577-0.215545111667j))*x[1]**o + ((-0.466168969041+0.892201079498j))*x[1]
+        ref[(0, 3, 2, 1)]=(0.030999090328-0.592388972177j)*x_ref[0]**o + ((0.330206632527+0.986480006522j))*x_ref[0] + ((0.908498876577-0.215545111667j))*x_ref[1]**o + ((-0.466168969041+0.892201079498j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.203645030808+0.531450951566j)*x[0]**o + ((0.827261384753-0.880236314833j))*x[0] + ((0.735116481851+0.463854868589j))*x[1]**o + ((-0.603195456909+0.723267503028j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.203645030808+0.531450951566j)*x_ref[0]**o + ((0.827261384753-0.880236314833j))*x_ref[0] + ((0.735116481851+0.463854868589j))*x_ref[1]**o + ((-0.603195456909+0.723267503028j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.227597061737-0.173883882588j)*x[0]**o + ((-0.289866376864+0.318218649656j))*x[0] + ((-0.000569895051857+0.746297004606j))*x[1]**o + ((0.804018879922+0.54582421873j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.227597061737-0.173883882588j)*x_ref[0]**o + ((-0.289866376864+0.318218649656j))*x_ref[0] + ((-0.000569895051857+0.746297004606j))*x_ref[1]**o + ((0.804018879922+0.54582421873j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.947942934925-0.866105303468j)*x[0]**o + ((0.631793575383-0.683504615879j))*x[0] + ((0.52203671399+0.0828238665445j))*x[1]**o + ((-0.241739628788-0.945105008014j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.947942934925-0.866105303468j)*x_ref[0]**o + ((0.631793575383-0.683504615879j))*x_ref[0] + ((0.52203671399+0.0828238665445j))*x_ref[1]**o + ((-0.241739628788-0.945105008014j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.901249520645-0.0768834682021j)*x[0]**o + ((0.960272658267-0.445493995962j))*x[0] + ((-0.99976427461-0.685155935323j))*x[1]**o + ((-0.776822743225-0.913828907929j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.901249520645-0.0768834682021j)*x_ref[0]**o + ((0.960272658267-0.445493995962j))*x_ref[0] + ((-0.99976427461-0.685155935323j))*x_ref[1]**o + ((-0.776822743225-0.913828907929j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.195464393607+0.917587122774j)*x[0]**o + ((-0.260406191041-0.455535827754j))*x[0] + ((-0.230874395718-0.684205968949j))*x[1]**o + ((0.217513717617-0.0633145689245j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.195464393607+0.917587122774j)*x_ref[0]**o + ((-0.260406191041-0.455535827754j))*x_ref[0] + ((-0.230874395718-0.684205968949j))*x_ref[1]**o + ((0.217513717617-0.0633145689245j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.343541082765-0.406418167914j)*x[0]**o + ((0.119280194666+0.285646088862j))*x[0] + ((0.13752728345-0.119598625524j))*x[1]**o + ((-0.343829832519+0.627512999066j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.343541082765-0.406418167914j)*x_ref[0]**o + ((0.119280194666+0.285646088862j))*x_ref[0] + ((0.13752728345-0.119598625524j))*x_ref[1]**o + ((-0.343829832519+0.627512999066j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.445896852881-0.698468833564j)*x[0]**o + ((-0.374276249153-0.698891283075j))*x[0] + ((0.316404162098-0.318769144833j))*x[1]**o + ((-0.111638610793+0.225886721719j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.445896852881-0.698468833564j)*x_ref[0]**o + ((-0.374276249153-0.698891283075j))*x_ref[0] + ((0.316404162098-0.318769144833j))*x_ref[1]**o + ((-0.111638610793+0.225886721719j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.891323246056-0.869683924897j)*x[0]**o + ((0.698005168092+0.279845948646j))*x[0] + ((0.222280858586+0.149189054481j))*x[1]**o + ((-0.433474775351-0.404619841864j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.891323246056-0.869683924897j)*x_ref[0]**o + ((0.698005168092+0.279845948646j))*x_ref[0] + ((0.222280858586+0.149189054481j))*x_ref[1]**o + ((-0.433474775351-0.404619841864j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.159774338003+0.256393087838j)*x[0]**o + ((-0.356070554603+0.819452713743j))*x[0] + ((0.651027620172+0.730638021853j))*x[1]**o + ((-0.850599104102-0.54079823755j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.159774338003+0.256393087838j)*x_ref[0]**o + ((-0.356070554603+0.819452713743j))*x_ref[0] + ((0.651027620172+0.730638021853j))*x_ref[1]**o + ((-0.850599104102-0.54079823755j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.872534677861+0.279862991969j)*x[0]**o + ((0.25963493993+0.437115594598j))*x[0] + ((-0.842362856472-0.566732362863j))*x[1]**o + ((0.218299218386-0.195981234507j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.872534677861+0.279862991969j)*x_ref[0]**o + ((0.25963493993+0.437115594598j))*x_ref[0] + ((-0.842362856472-0.566732362863j))*x_ref[1]**o + ((0.218299218386-0.195981234507j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.349791879047-0.308508650782j)*x[0]**o + ((-0.504238207344+0.868249406091j))*x[0] + ((0.43644571793+0.726619715872j))*x[1]**o + ((-0.439297769527-0.450512605907j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.349791879047-0.308508650782j)*x_ref[0]**o + ((-0.504238207344+0.868249406091j))*x_ref[0] + ((0.43644571793+0.726619715872j))*x_ref[1]**o + ((-0.439297769527-0.450512605907j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.350145970683+0.158610406111j)*x[0]**o + ((0.626552902953-0.700850819714j))*x[0] + ((-0.509489382361+0.638396552128j))*x[1]**o + ((0.218777820692+0.283423640008j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.350145970683+0.158610406111j)*x_ref[0]**o + ((0.626552902953-0.700850819714j))*x_ref[0] + ((-0.509489382361+0.638396552128j))*x_ref[1]**o + ((0.218777820692+0.283423640008j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.585335991916-0.588796883011j)*x[0]**o + ((0.821914691876-0.300875530999j))*x[0] + ((-0.231887081687+0.96817090839j))*x[1]**o + ((-0.182040183689+0.875496327026j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.585335991916-0.588796883011j)*x_ref[0]**o + ((0.821914691876-0.300875530999j))*x_ref[0] + ((-0.231887081687+0.96817090839j))*x_ref[1]**o + ((-0.182040183689+0.875496327026j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.0799338965425+0.0711550442775j)*x[0]**o + ((0.86017861648-0.0820547926475j))*x[0] + ((0.0619087250429-0.47891928041j))*x[1]**o + ((0.644290969394-0.956209307341j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.0799338965425+0.0711550442775j)*x_ref[0]**o + ((0.86017861648-0.0820547926475j))*x_ref[0] + ((0.0619087250429-0.47891928041j))*x_ref[1]**o + ((0.644290969394-0.956209307341j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.916180504382-0.117438330353j)*x[0]**o + ((-0.71479175688-0.259012658853j))*x[0] + ((-0.1034704208-0.274993911246j))*x[1]**o + ((-0.28057841749+0.765203352898j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.916180504382-0.117438330353j)*x_ref[0]**o + ((-0.71479175688-0.259012658853j))*x_ref[0] + ((-0.1034704208-0.274993911246j))*x_ref[1]**o + ((-0.28057841749+0.765203352898j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.747660594462-0.76595071223j)*x[0]**o + ((0.934446563035-0.125213672489j))*x[0] + ((0.692643869228+0.469987226743j))*x[1]**o + ((-0.244870443453+0.710563885227j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.747660594462-0.76595071223j)*x_ref[0]**o + ((0.934446563035-0.125213672489j))*x_ref[0] + ((0.692643869228+0.469987226743j))*x_ref[1]**o + ((-0.244870443453+0.710563885227j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.226594639654+0.0832671455649j)*x[0]**o + ((0.622513428626-0.187614198408j))*x[0] + ((-0.719303820762-0.720687109968j))*x[1]**o + ((-0.953281270032-0.113821934985j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.226594639654+0.0832671455649j)*x_ref[0]**o + ((0.622513428626-0.187614198408j))*x_ref[0] + ((-0.719303820762-0.720687109968j))*x_ref[1]**o + ((-0.953281270032-0.113821934985j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(0.178032926979+0.611490979407j)*x[0]**o + ((0.641621790039-0.0769476427398j))*x[0] + ((-0.663538305573-0.846256715456j))*x[1]**o + ((0.902322185868+0.852781129532j))*x[1]
+        ref[(1, 2, 2, 1)]=(0.178032926979+0.611490979407j)*x_ref[0]**o + ((0.641621790039-0.0769476427398j))*x_ref[0] + ((-0.663538305573-0.846256715456j))*x_ref[1]**o + ((0.902322185868+0.852781129532j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.726575447543+0.528592632213j)*x[0]**o + ((-0.240059998904-0.960518524518j))*x[0] + ((0.998969784813-0.922916522509j))*x[1]**o + ((0.190320988857+0.181813731527j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.726575447543+0.528592632213j)*x_ref[0]**o + ((-0.240059998904-0.960518524518j))*x_ref[0] + ((0.998969784813-0.922916522509j))*x_ref[1]**o + ((0.190320988857+0.181813731527j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.864164511637-0.205031553132j)*x[0]**o + ((-0.317214106922-0.764018001559j))*x[0] + ((0.800027156678+0.363092782912j))*x[1]**o + ((0.842685932392+0.595427735976j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.864164511637-0.205031553132j)*x_ref[0]**o + ((-0.317214106922-0.764018001559j))*x_ref[0] + ((0.800027156678+0.363092782912j))*x_ref[1]**o + ((0.842685932392+0.595427735976j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(0.732058467152+0.889080752236j)*x[0]**o + ((-0.503733401676-0.679038152102j))*x[0] + ((-0.755065970685+0.687358196465j))*x[1]**o + ((-0.436546403839+0.383442624577j))*x[1]
+        ref[(1, 3, 1, 0)]=(0.732058467152+0.889080752236j)*x_ref[0]**o + ((-0.503733401676-0.679038152102j))*x_ref[0] + ((-0.755065970685+0.687358196465j))*x_ref[1]**o + ((-0.436546403839+0.383442624577j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(0.463046490207-0.841303812877j)*x[0]**o + ((-0.479081939902-0.342772159026j))*x[0] + ((-0.0438532494785+0.650753170298j))*x[1]**o + ((0.0737538613739+0.925888699644j))*x[1]
+        ref[(1, 3, 1, 1)]=(0.463046490207-0.841303812877j)*x_ref[0]**o + ((-0.479081939902-0.342772159026j))*x_ref[0] + ((-0.0438532494785+0.650753170298j))*x_ref[1]**o + ((0.0737538613739+0.925888699644j))*x_ref[1]
+        arg[(1, 3, 2, 0)]=(-0.404438981699-0.194578881037j)*x[0]**o + ((0.452533365714+0.267768522019j))*x[0] + ((0.608270267656+0.833242930459j))*x[1]**o + ((0.351217767149-0.64348596101j))*x[1]
+        ref[(1, 3, 2, 0)]=(-0.404438981699-0.194578881037j)*x_ref[0]**o + ((0.452533365714+0.267768522019j))*x_ref[0] + ((0.608270267656+0.833242930459j))*x_ref[1]**o + ((0.351217767149-0.64348596101j))*x_ref[1]
+        arg[(1, 3, 2, 1)]=(-0.473086253484-0.0917584994764j)*x[0]**o + ((0.937503878474-0.880326599129j))*x[0] + ((-0.543374574914-0.199450347928j))*x[1]**o + ((0.34531677675-0.227949781826j))*x[1]
+        ref[(1, 3, 2, 1)]=(-0.473086253484-0.0917584994764j)*x_ref[0]**o + ((0.937503878474-0.880326599129j))*x_ref[0] + ((-0.543374574914-0.199450347928j))*x_ref[1]**o + ((0.34531677675-0.227949781826j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.00976165720346+0.770840904474j)*x[0]**o + ((-0.857239967717+0.895602032223j))*x[0] + ((0.422693865395-0.653055068965j))*x[1]**o + ((-0.739329937792+0.867814781868j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.00976165720346+0.770840904474j)*x_ref[0]**o + ((-0.857239967717+0.895602032223j))*x_ref[0] + ((0.422693865395-0.653055068965j))*x_ref[1]**o + ((-0.739329937792+0.867814781868j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.000151773856097-0.113857597938j)*x[0]**o + ((0.665362644209-0.79689129263j))*x[0] + ((-0.0575202661217+0.428806411501j))*x[1]**o + ((0.719385945598-0.692765883439j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.000151773856097-0.113857597938j)*x_ref[0]**o + ((0.665362644209-0.79689129263j))*x_ref[0] + ((-0.0575202661217+0.428806411501j))*x_ref[1]**o + ((0.719385945598-0.692765883439j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.456455571134+0.613705019176j)*x[0]**o + ((-0.187276185315-0.0620060018276j))*x[0] + ((-0.900245718044+0.489570521449j))*x[1]**o + ((-0.263764870349-0.588750883129j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.456455571134+0.613705019176j)*x_ref[0]**o + ((-0.187276185315-0.0620060018276j))*x_ref[0] + ((-0.900245718044+0.489570521449j))*x_ref[1]**o + ((-0.263764870349-0.588750883129j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.865631197028-0.964602684138j)*x[0]**o + ((-0.173060000695-0.733912478909j))*x[0] + ((0.845873634597-0.525632115781j))*x[1]**o + ((-0.212197604645-0.0754612290453j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.865631197028-0.964602684138j)*x_ref[0]**o + ((-0.173060000695-0.733912478909j))*x_ref[0] + ((0.845873634597-0.525632115781j))*x_ref[1]**o + ((-0.212197604645-0.0754612290453j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.449703658832-0.837214317688j)*x[0]**o + ((0.948151899782-0.0742400793366j))*x[0] + ((0.134054863919+0.866413960507j))*x[1]**o + ((0.2702591109+0.253100804106j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.449703658832-0.837214317688j)*x_ref[0]**o + ((0.948151899782-0.0742400793366j))*x_ref[0] + ((0.134054863919+0.866413960507j))*x_ref[1]**o + ((0.2702591109+0.253100804106j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(0.86805049229-0.542030231307j)*x[0]**o + ((0.73225356986-0.815669951092j))*x[0] + ((-0.234715343684+0.522326489792j))*x[1]**o + ((0.0421330490082-0.387258324872j))*x[1]
+        ref[(2, 0, 2, 1)]=(0.86805049229-0.542030231307j)*x_ref[0]**o + ((0.73225356986-0.815669951092j))*x_ref[0] + ((-0.234715343684+0.522326489792j))*x_ref[1]**o + ((0.0421330490082-0.387258324872j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.315262311232+0.121520685747j)*x[0]**o + ((-0.40685180304-0.0572932183943j))*x[0] + ((-0.408112831464-0.377591593967j))*x[1]**o + ((0.812082824098+0.866330966348j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.315262311232+0.121520685747j)*x_ref[0]**o + ((-0.40685180304-0.0572932183943j))*x_ref[0] + ((-0.408112831464-0.377591593967j))*x_ref[1]**o + ((0.812082824098+0.866330966348j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.382579837404-0.557464866585j)*x[0]**o + ((-0.928102608576-0.139373441053j))*x[0] + ((0.932257263623-0.965914472633j))*x[1]**o + ((-0.355166087962+0.370568183866j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.382579837404-0.557464866585j)*x_ref[0]**o + ((-0.928102608576-0.139373441053j))*x_ref[0] + ((0.932257263623-0.965914472633j))*x_ref[1]**o + ((-0.355166087962+0.370568183866j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.86040991304+0.471622855492j)*x[0]**o + ((0.952770421299+0.727527683458j))*x[0] + ((-0.265983105971+0.35167968672j))*x[1]**o + ((-0.539132829416+0.811791802293j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.86040991304+0.471622855492j)*x_ref[0]**o + ((0.952770421299+0.727527683458j))*x_ref[0] + ((-0.265983105971+0.35167968672j))*x_ref[1]**o + ((-0.539132829416+0.811791802293j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.788231633512-0.360334065478j)*x[0]**o + ((0.56121956739+0.619225893178j))*x[0] + ((0.70625158507+0.591905787423j))*x[1]**o + ((-0.299490896361+0.31452468313j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.788231633512-0.360334065478j)*x_ref[0]**o + ((0.56121956739+0.619225893178j))*x_ref[0] + ((0.70625158507+0.591905787423j))*x_ref[1]**o + ((-0.299490896361+0.31452468313j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.919537292503+0.0387988982104j)*x[0]**o + ((0.576732470432-0.102291689539j))*x[0] + ((-0.85626585025-0.351737803836j))*x[1]**o + ((-0.25858804699+0.99358829355j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.919537292503+0.0387988982104j)*x_ref[0]**o + ((0.576732470432-0.102291689539j))*x_ref[0] + ((-0.85626585025-0.351737803836j))*x_ref[1]**o + ((-0.25858804699+0.99358829355j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(0.987198039141-0.975272400128j)*x[0]**o + ((0.222946794461+0.212977249832j))*x[0] + ((0.323837906115+0.741621776026j))*x[1]**o + ((0.253309090335-0.580232759667j))*x[1]
+        ref[(2, 1, 2, 1)]=(0.987198039141-0.975272400128j)*x_ref[0]**o + ((0.222946794461+0.212977249832j))*x_ref[0] + ((0.323837906115+0.741621776026j))*x_ref[1]**o + ((0.253309090335-0.580232759667j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.588079609341-0.0458516015972j)*x[0]**o + ((-0.695319903484-0.0845669559817j))*x[0] + ((-0.224706060188+0.803873546423j))*x[1]**o + ((-0.254533811496-0.846756459469j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.588079609341-0.0458516015972j)*x_ref[0]**o + ((-0.695319903484-0.0845669559817j))*x_ref[0] + ((-0.224706060188+0.803873546423j))*x_ref[1]**o + ((-0.254533811496-0.846756459469j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.946914258357+0.976901655738j)*x[0]**o + ((0.491214018339+0.68137726457j))*x[0] + ((-0.194778893216-0.589323733637j))*x[1]**o + ((0.237617596726-0.0777261832541j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.946914258357+0.976901655738j)*x_ref[0]**o + ((0.491214018339+0.68137726457j))*x_ref[0] + ((-0.194778893216-0.589323733637j))*x_ref[1]**o + ((0.237617596726-0.0777261832541j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.371640052404+0.444818570172j)*x[0]**o + ((-0.169350155713+0.0554790905839j))*x[0] + ((-0.925483537374+0.739157822682j))*x[1]**o + ((0.75449778286+0.736429736219j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.371640052404+0.444818570172j)*x_ref[0]**o + ((-0.169350155713+0.0554790905839j))*x_ref[0] + ((-0.925483537374+0.739157822682j))*x_ref[1]**o + ((0.75449778286+0.736429736219j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.46381308395+0.329991690388j)*x[0]**o + ((0.521939546892-0.185903842486j))*x[0] + ((0.364697245335+0.795508265731j))*x[1]**o + ((-0.390311341584+0.127817093893j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.46381308395+0.329991690388j)*x_ref[0]**o + ((0.521939546892-0.185903842486j))*x_ref[0] + ((0.364697245335+0.795508265731j))*x_ref[1]**o + ((-0.390311341584+0.127817093893j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(0.174072811163+0.727171488993j)*x[0]**o + ((0.941346217162-0.871205006185j))*x[0] + ((0.383538615541+0.114032949325j))*x[1]**o + ((-0.581366829256-0.358134698927j))*x[1]
+        ref[(2, 2, 2, 0)]=(0.174072811163+0.727171488993j)*x_ref[0]**o + ((0.941346217162-0.871205006185j))*x_ref[0] + ((0.383538615541+0.114032949325j))*x_ref[1]**o + ((-0.581366829256-0.358134698927j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.736181772075+0.30729981424j)*x[0]**o + ((0.384145882307+0.693551370167j))*x[0] + ((0.393010236361-0.803605392784j))*x[1]**o + ((0.196331657199+0.749181378036j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.736181772075+0.30729981424j)*x_ref[0]**o + ((0.384145882307+0.693551370167j))*x_ref[0] + ((0.393010236361-0.803605392784j))*x_ref[1]**o + ((0.196331657199+0.749181378036j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(-0.208971670018-0.73344328445j)*x[0]**o + ((-0.404388727624-0.820664761653j))*x[0] + ((0.148091084714+0.138905958666j))*x[1]**o + ((-0.395073178238-0.156781070444j))*x[1]
+        ref[(2, 3, 0, 0)]=(-0.208971670018-0.73344328445j)*x_ref[0]**o + ((-0.404388727624-0.820664761653j))*x_ref[0] + ((0.148091084714+0.138905958666j))*x_ref[1]**o + ((-0.395073178238-0.156781070444j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(-0.717565307193+0.0486341140235j)*x[0]**o + ((-0.731780169348+0.926427147848j))*x[0] + ((0.0845936128223+0.0323322325384j))*x[1]**o + ((0.424421055469+0.533965938506j))*x[1]
+        ref[(2, 3, 0, 1)]=(-0.717565307193+0.0486341140235j)*x_ref[0]**o + ((-0.731780169348+0.926427147848j))*x_ref[0] + ((0.0845936128223+0.0323322325384j))*x_ref[1]**o + ((0.424421055469+0.533965938506j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(0.124679175287-0.19105318049j)*x[0]**o + ((-0.665243824126-0.429706667991j))*x[0] + ((-0.596283899443-0.636885967391j))*x[1]**o + ((-0.36412291568+0.430616858649j))*x[1]
+        ref[(2, 3, 1, 0)]=(0.124679175287-0.19105318049j)*x_ref[0]**o + ((-0.665243824126-0.429706667991j))*x_ref[0] + ((-0.596283899443-0.636885967391j))*x_ref[1]**o + ((-0.36412291568+0.430616858649j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(0.0349111545425+0.958204540956j)*x[0]**o + ((0.99112399378-0.124267323647j))*x[0] + ((0.70310507842-0.170514103396j))*x[1]**o + ((0.786931410407+0.750079698765j))*x[1]
+        ref[(2, 3, 1, 1)]=(0.0349111545425+0.958204540956j)*x_ref[0]**o + ((0.99112399378-0.124267323647j))*x_ref[0] + ((0.70310507842-0.170514103396j))*x_ref[1]**o + ((0.786931410407+0.750079698765j))*x_ref[1]
+        arg[(2, 3, 2, 0)]=(-0.679882729094+0.417194460645j)*x[0]**o + ((-0.400555600408+0.0356319264022j))*x[0] + ((-0.343678783182+0.48006741473j))*x[1]**o + ((-0.588957625341-0.999154040792j))*x[1]
+        ref[(2, 3, 2, 0)]=(-0.679882729094+0.417194460645j)*x_ref[0]**o + ((-0.400555600408+0.0356319264022j))*x_ref[0] + ((-0.343678783182+0.48006741473j))*x_ref[1]**o + ((-0.588957625341-0.999154040792j))*x_ref[1]
+        arg[(2, 3, 2, 1)]=(0.688718487962-0.117703652817j)*x[0]**o + ((0.570339238054-0.5080420554j))*x[0] + ((0.31755973002-0.769785467432j))*x[1]**o + ((-0.82402612419+0.676308825777j))*x[1]
+        ref[(2, 3, 2, 1)]=(0.688718487962-0.117703652817j)*x_ref[0]**o + ((0.570339238054-0.5080420554j))*x_ref[0] + ((0.31755973002-0.769785467432j))*x_ref[1]**o + ((-0.82402612419+0.676308825777j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.184560877788-0.0159541650796j)*x[2]**o + ((-0.382213235705-0.0466245712676j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.184560877788-0.0159541650796j)*x_ref[2]**o + ((-0.382213235705-0.0466245712676j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.812435059263+0.191805545189j)*x[2]**o + ((0.523594193576+0.345571689791j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.812435059263+0.191805545189j)*x_ref[2]**o + ((0.523594193576+0.345571689791j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.397907133849+0.641590858219j)*x[2]**o + ((-0.561076552823-0.712124493434j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.397907133849+0.641590858219j)*x_ref[2]**o + ((-0.561076552823-0.712124493434j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.00659801046916+0.927540559533j)*x[2]**o + ((0.865676337084+0.868087278703j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.00659801046916+0.927540559533j)*x_ref[2]**o + ((0.865676337084+0.868087278703j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.947896294125+0.810427462277j)*x[2]**o + ((-0.210313578338+0.241254360031j))*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.947896294125+0.810427462277j)*x_ref[2]**o + ((-0.210313578338+0.241254360031j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.0838816469827+0.582645074266j)*x[2]**o + ((0.466522239262-0.527038889167j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.0838816469827+0.582645074266j)*x_ref[2]**o + ((0.466522239262-0.527038889167j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.50522947336-0.494948849833j)*x[2]**o + ((0.714436438401-0.0714334578636j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.50522947336-0.494948849833j)*x_ref[2]**o + ((0.714436438401-0.0714334578636j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.308001110908-0.381331086438j)*x[2]**o + ((0.127503212547-0.172304873379j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.308001110908-0.381331086438j)*x_ref[2]**o + ((0.127503212547-0.172304873379j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.529952556792-0.136033999616j)*x[2]**o + ((-0.496418127448+0.79175215626j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.529952556792-0.136033999616j)*x_ref[2]**o + ((-0.496418127448+0.79175215626j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.25204932118-0.33741840845j)*x[2]**o + ((-0.640629735553+0.551598318992j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.25204932118-0.33741840845j)*x_ref[2]**o + ((-0.640629735553+0.551598318992j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.815013209479+0.534929953875j)*x[2]**o + ((-0.984242307454+0.725626848858j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.815013209479+0.534929953875j)*x_ref[2]**o + ((-0.984242307454+0.725626848858j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.918548109824+0.486435757021j)*x[2]**o + ((0.68192765244-0.397482983141j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.918548109824+0.486435757021j)*x_ref[2]**o + ((0.68192765244-0.397482983141j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.504195190644-0.00931227931046j)*x[2]**o + ((-0.00388289740328-0.432913323793j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.504195190644-0.00931227931046j)*x_ref[2]**o + ((-0.00388289740328-0.432913323793j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.420875602261-0.319562024961j)*x[2]**o + ((0.570295296669+0.475687487947j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.420875602261-0.319562024961j)*x_ref[2]**o + ((0.570295296669+0.475687487947j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.821594033729+0.524860913582j)*x[2]**o + ((0.38590929563-0.00296839723312j))*x[2]
+            ref[(0, 2, 1, 0)]+=(0.821594033729+0.524860913582j)*x_ref[2]**o + ((0.38590929563-0.00296839723312j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.904373732243+0.256009009309j)*x[2]**o + ((0.92751563856-0.4535262121j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.904373732243+0.256009009309j)*x_ref[2]**o + ((0.92751563856-0.4535262121j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.500479742614-0.742507399503j)*x[2]**o + ((0.46903997135-0.476013785324j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.500479742614-0.742507399503j)*x_ref[2]**o + ((0.46903997135-0.476013785324j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.566196792894+0.154018687514j)*x[2]**o + ((-0.985778576955+0.895057874957j))*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.566196792894+0.154018687514j)*x_ref[2]**o + ((-0.985778576955+0.895057874957j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(-0.860704158098-0.667502293287j)*x[2]**o + ((-0.267680349866+0.0786309122152j))*x[2]
+            ref[(0, 3, 0, 0)]+=(-0.860704158098-0.667502293287j)*x_ref[2]**o + ((-0.267680349866+0.0786309122152j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(-0.477263862542+0.849972501308j)*x[2]**o + ((-0.570908603911+0.0677408827619j))*x[2]
+            ref[(0, 3, 0, 1)]+=(-0.477263862542+0.849972501308j)*x_ref[2]**o + ((-0.570908603911+0.0677408827619j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.921918260168+0.834486791142j)*x[2]**o + ((-0.271549315932-0.756372986169j))*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.921918260168+0.834486791142j)*x_ref[2]**o + ((-0.271549315932-0.756372986169j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(0.498266603354-0.788754164561j)*x[2]**o + ((0.140618603889-0.109332089744j))*x[2]
+            ref[(0, 3, 1, 1)]+=(0.498266603354-0.788754164561j)*x_ref[2]**o + ((0.140618603889-0.109332089744j))*x_ref[2]
+            arg[(0, 3, 2, 0)]+=(0.645509027063+0.145937074956j)*x[2]**o + ((0.378678104658+0.0707834036175j))*x[2]
+            ref[(0, 3, 2, 0)]+=(0.645509027063+0.145937074956j)*x_ref[2]**o + ((0.378678104658+0.0707834036175j))*x_ref[2]
+            arg[(0, 3, 2, 1)]+=(0.0697447529153-0.614493539459j)*x[2]**o + ((-0.171509195165-0.662517959984j))*x[2]
+            ref[(0, 3, 2, 1)]+=(0.0697447529153-0.614493539459j)*x_ref[2]**o + ((-0.171509195165-0.662517959984j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.940299274905+0.147347181082j)*x[2]**o + ((-0.586585094613-0.718384690136j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.940299274905+0.147347181082j)*x_ref[2]**o + ((-0.586585094613-0.718384690136j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.905282722473+0.916333007588j)*x[2]**o + ((0.0998445552641+0.942968567627j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.905282722473+0.916333007588j)*x_ref[2]**o + ((0.0998445552641+0.942968567627j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.409332855676+0.267947654352j)*x[2]**o + ((0.316840332321-0.352887595627j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.409332855676+0.267947654352j)*x_ref[2]**o + ((0.316840332321-0.352887595627j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.428331499122-0.0470660409649j)*x[2]**o + ((0.589023833967-0.0567393678771j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.428331499122-0.0470660409649j)*x_ref[2]**o + ((0.589023833967-0.0567393678771j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.301942773947+0.878786456078j)*x[2]**o + ((-0.378664868477+0.980375119675j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.301942773947+0.878786456078j)*x_ref[2]**o + ((-0.378664868477+0.980375119675j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.347097894967+0.394537533598j)*x[2]**o + ((-0.15237801127-0.913995649767j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.347097894967+0.394537533598j)*x_ref[2]**o + ((-0.15237801127-0.913995649767j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.556717740197-0.999825214666j)*x[2]**o + ((0.816154566039-0.795570592023j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.556717740197-0.999825214666j)*x_ref[2]**o + ((0.816154566039-0.795570592023j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.746639090413-0.420338751353j)*x[2]**o + ((-0.891269546919-0.27719984735j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.746639090413-0.420338751353j)*x_ref[2]**o + ((-0.891269546919-0.27719984735j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.797346958367+0.204625859626j)*x[2]**o + ((0.902525133994-0.425092554694j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.797346958367+0.204625859626j)*x_ref[2]**o + ((0.902525133994-0.425092554694j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.770826571016+0.992369362147j)*x[2]**o + ((-0.771140642703+0.241330642678j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.770826571016+0.992369362147j)*x_ref[2]**o + ((-0.771140642703+0.241330642678j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.388434650826-0.753372137397j)*x[2]**o + ((0.346937152749+0.242216040459j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.388434650826-0.753372137397j)*x_ref[2]**o + ((0.346937152749+0.242216040459j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.0192705131691+0.383432289617j)*x[2]**o + ((0.455161629898+0.788293843476j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.0192705131691+0.383432289617j)*x_ref[2]**o + ((0.455161629898+0.788293843476j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.740297594299-0.622550495806j)*x[2]**o + ((0.512085763348+0.0638681430278j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.740297594299-0.622550495806j)*x_ref[2]**o + ((0.512085763348+0.0638681430278j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.793952045691-0.290228717367j)*x[2]**o + ((-0.535940703803-0.195855775737j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.793952045691-0.290228717367j)*x_ref[2]**o + ((-0.535940703803-0.195855775737j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.938211800751-0.242685948834j)*x[2]**o + ((-0.110279643115-0.14133877225j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.938211800751-0.242685948834j)*x_ref[2]**o + ((-0.110279643115-0.14133877225j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.848049049421-0.330502671911j)*x[2]**o + ((-0.0417862482691+0.092877897022j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.848049049421-0.330502671911j)*x_ref[2]**o + ((-0.0417862482691+0.092877897022j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.101150705613-0.247400733416j)*x[2]**o + ((0.690876276249+0.549103693891j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.101150705613-0.247400733416j)*x_ref[2]**o + ((0.690876276249+0.549103693891j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.669091644142-0.0240394702216j)*x[2]**o + ((0.0377704047066+0.674348473856j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.669091644142-0.0240394702216j)*x_ref[2]**o + ((0.0377704047066+0.674348473856j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.4434310164-0.0603081494134j)*x[2]**o + ((0.757886781601-0.701891916367j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.4434310164-0.0603081494134j)*x_ref[2]**o + ((0.757886781601-0.701891916367j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.593910022165-0.632188323535j)*x[2]**o + ((0.578056796981+0.444135570756j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.593910022165-0.632188323535j)*x_ref[2]**o + ((0.578056796981+0.444135570756j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(-0.976867533918-0.724224806341j)*x[2]**o + ((0.0530793777269+0.685663062768j))*x[2]
+            ref[(1, 3, 1, 0)]+=(-0.976867533918-0.724224806341j)*x_ref[2]**o + ((0.0530793777269+0.685663062768j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.0635953087051-0.138505376138j)*x[2]**o + ((0.704883860894-0.175989408477j))*x[2]
+            ref[(1, 3, 1, 1)]+=(0.0635953087051-0.138505376138j)*x_ref[2]**o + ((0.704883860894-0.175989408477j))*x_ref[2]
+            arg[(1, 3, 2, 0)]+=(-0.0950610009901+0.0349469212151j)*x[2]**o + ((0.457577075942+0.707433005658j))*x[2]
+            ref[(1, 3, 2, 0)]+=(-0.0950610009901+0.0349469212151j)*x_ref[2]**o + ((0.457577075942+0.707433005658j))*x_ref[2]
+            arg[(1, 3, 2, 1)]+=(0.470445849668+0.13586024309j)*x[2]**o + ((0.14533871118-0.443170958522j))*x[2]
+            ref[(1, 3, 2, 1)]+=(0.470445849668+0.13586024309j)*x_ref[2]**o + ((0.14533871118-0.443170958522j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.400748332831-0.734088060499j)*x[2]**o + ((0.539993370501+0.940092158826j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.400748332831-0.734088060499j)*x_ref[2]**o + ((0.539993370501+0.940092158826j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.495719544007+0.651523214114j)*x[2]**o + ((-0.945168075012+0.533196156147j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.495719544007+0.651523214114j)*x_ref[2]**o + ((-0.945168075012+0.533196156147j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.871099137396+0.777302595306j)*x[2]**o + ((-0.372417581127+0.817712261722j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.871099137396+0.777302595306j)*x_ref[2]**o + ((-0.372417581127+0.817712261722j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.44502574739-0.44147355898j)*x[2]**o + ((0.546034225055-0.715195697739j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.44502574739-0.44147355898j)*x_ref[2]**o + ((0.546034225055-0.715195697739j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.0902618373294+0.204588889346j)*x[2]**o + ((-0.570955602827+0.970246372103j))*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.0902618373294+0.204588889346j)*x_ref[2]**o + ((-0.570955602827+0.970246372103j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(-0.629281926384+0.866627488811j)*x[2]**o + ((-0.750980440774+0.637019186302j))*x[2]
+            ref[(2, 0, 2, 1)]+=(-0.629281926384+0.866627488811j)*x_ref[2]**o + ((-0.750980440774+0.637019186302j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.784451849236-0.912864594638j)*x[2]**o + ((0.803505553955+0.631177392581j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.784451849236-0.912864594638j)*x_ref[2]**o + ((0.803505553955+0.631177392581j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.0327840798955+0.993687941187j)*x[2]**o + ((-0.0214917838775+0.379966676483j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.0327840798955+0.993687941187j)*x_ref[2]**o + ((-0.0214917838775+0.379966676483j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.871518861766-0.115801760187j)*x[2]**o + ((-0.128204216765-0.578636957728j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.871518861766-0.115801760187j)*x_ref[2]**o + ((-0.128204216765-0.578636957728j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.517092876281-0.920326906788j)*x[2]**o + ((0.959554121764-0.871398814385j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.517092876281-0.920326906788j)*x_ref[2]**o + ((0.959554121764-0.871398814385j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.742781956437+0.338201903263j)*x[2]**o + ((-0.18531341993-0.165845824535j))*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.742781956437+0.338201903263j)*x_ref[2]**o + ((-0.18531341993-0.165845824535j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.0353741141573+0.404141426037j)*x[2]**o + ((0.431045950449+0.804789172425j))*x[2]
+            ref[(2, 1, 2, 1)]+=(0.0353741141573+0.404141426037j)*x_ref[2]**o + ((0.431045950449+0.804789172425j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(0.484421707972+0.607096182199j)*x[2]**o + ((-0.600262913369-0.370611939945j))*x[2]
+            ref[(2, 2, 0, 0)]+=(0.484421707972+0.607096182199j)*x_ref[2]**o + ((-0.600262913369-0.370611939945j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.571087362401+0.959537040566j)*x[2]**o + ((0.31654304893+0.956576517346j))*x[2]
+            ref[(2, 2, 0, 1)]+=(0.571087362401+0.959537040566j)*x_ref[2]**o + ((0.31654304893+0.956576517346j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.0230410900223+0.466460572228j)*x[2]**o + ((-0.446815937983+0.407207220783j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.0230410900223+0.466460572228j)*x_ref[2]**o + ((-0.446815937983+0.407207220783j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.496593164742-0.906050177842j)*x[2]**o + ((-0.358705169856-0.0323617149559j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.496593164742-0.906050177842j)*x_ref[2]**o + ((-0.358705169856-0.0323617149559j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(-0.12610252746+0.468938221653j)*x[2]**o + ((-0.753751050779+0.129499353613j))*x[2]
+            ref[(2, 2, 2, 0)]+=(-0.12610252746+0.468938221653j)*x_ref[2]**o + ((-0.753751050779+0.129499353613j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(0.622564807938-0.305848529903j)*x[2]**o + ((0.207481790212+0.0668163333862j))*x[2]
+            ref[(2, 2, 2, 1)]+=(0.622564807938-0.305848529903j)*x_ref[2]**o + ((0.207481790212+0.0668163333862j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(0.599805022102-0.838322340911j)*x[2]**o + ((-0.821381151124+0.569875035422j))*x[2]
+            ref[(2, 3, 0, 0)]+=(0.599805022102-0.838322340911j)*x_ref[2]**o + ((-0.821381151124+0.569875035422j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(-0.701873109325-0.113172978314j)*x[2]**o + ((-0.498091093579-0.0574901752716j))*x[2]
+            ref[(2, 3, 0, 1)]+=(-0.701873109325-0.113172978314j)*x_ref[2]**o + ((-0.498091093579-0.0574901752716j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(-0.587700879953+0.262870449384j)*x[2]**o + ((0.32397222635-0.764384547123j))*x[2]
+            ref[(2, 3, 1, 0)]+=(-0.587700879953+0.262870449384j)*x_ref[2]**o + ((0.32397222635-0.764384547123j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(0.89393068837+0.742436021918j)*x[2]**o + ((-0.221737688693-0.519701061218j))*x[2]
+            ref[(2, 3, 1, 1)]+=(0.89393068837+0.742436021918j)*x_ref[2]**o + ((-0.221737688693-0.519701061218j))*x_ref[2]
+            arg[(2, 3, 2, 0)]+=(0.797680376179+0.530329923482j)*x[2]**o + ((0.0599915720473-0.510397937571j))*x[2]
+            ref[(2, 3, 2, 0)]+=(0.797680376179+0.530329923482j)*x_ref[2]**o + ((0.0599915720473-0.510397937571j))*x_ref[2]
+            arg[(2, 3, 2, 1)]+=(-0.270251907157-0.935924836816j)*x[2]**o + ((0.39203997499+0.308236568033j))*x[2]
+            ref[(2, 3, 2, 1)]+=(-0.270251907157-0.935924836816j)*x_ref[2]**o + ((0.39203997499+0.308236568033j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.501826102942-0.456183104783j)*x[0]**o + ((0.26699388224-0.140300515384j))*x[0] + ((0.3526319632-0.0670314694319j))*x[1]**o + ((0.642156139163+0.872672324489j))*x[1]
+        ref=(0.501826102942-0.456183104783j)*x_ref[0]**o + ((0.26699388224-0.140300515384j))*x_ref[0] + ((0.3526319632-0.0670314694319j))*x_ref[1]**o + ((0.642156139163+0.872672324489j))*x_ref[1]
+        if dim==3:
+            arg+=((0.797392075314+0.961080618767j))*x[2]**o + ((-0.24007273312+0.834312173861j))*x[2]
+            ref+=((0.797392075314+0.961080618767j))*x_ref[2]**o + ((-0.24007273312+0.834312173861j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.628269417794-0.771960520457j)*x[0]**o + ((0.603747695941-0.871815559632j))*x[0] + ((-0.739869974522-0.222206924994j))*x[1]**o + ((-0.181033986941+0.619660084357j))*x[1]
+        ref[(0,)]=(-0.628269417794-0.771960520457j)*x_ref[0]**o + ((0.603747695941-0.871815559632j))*x_ref[0] + ((-0.739869974522-0.222206924994j))*x_ref[1]**o + ((-0.181033986941+0.619660084357j))*x_ref[1]
+        arg[(1,)]=(-0.498002572714-0.770754044692j)*x[0]**o + ((-0.358423697749+0.797954042773j))*x[0] + ((-0.596541733953-0.822680966018j))*x[1]**o + ((0.478411768282-0.148410612656j))*x[1]
+        ref[(1,)]=(-0.498002572714-0.770754044692j)*x_ref[0]**o + ((-0.358423697749+0.797954042773j))*x_ref[0] + ((-0.596541733953-0.822680966018j))*x_ref[1]**o + ((0.478411768282-0.148410612656j))*x_ref[1]
+        arg[(2,)]=(0.347705819436-0.372997919166j)*x[0]**o + ((0.814187011895-0.539010537718j))*x[0] + ((0.22450486873-0.293665694323j))*x[1]**o + ((-0.924346400861+0.951530046134j))*x[1]
+        ref[(2,)]=(0.347705819436-0.372997919166j)*x_ref[0]**o + ((0.814187011895-0.539010537718j))*x_ref[0] + ((0.22450486873-0.293665694323j))*x_ref[1]**o + ((-0.924346400861+0.951530046134j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.874661169626-0.680669802621j)*x[2]**o + ((-0.152297183225+0.73696608995j))*x[2]
+            ref[(0,)]+=(0.874661169626-0.680669802621j)*x_ref[2]**o + ((-0.152297183225+0.73696608995j))*x_ref[2]
+            arg[(1,)]+=(-0.972748699102+0.468058488995j)*x[2]**o + ((0.835954125726+0.390134754677j))*x[2]
+            ref[(1,)]+=(-0.972748699102+0.468058488995j)*x_ref[2]**o + ((0.835954125726+0.390134754677j))*x_ref[2]
+            arg[(2,)]+=(-0.793854172434-0.294287614013j)*x[2]**o + ((0.215720102535-0.59511832418j))*x[2]
+            ref[(2,)]+=(-0.793854172434-0.294287614013j)*x_ref[2]**o + ((0.215720102535-0.59511832418j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3),w_ref)
+        arg[(0, 0)]=(0.823461375406+0.995959975614j)*x[0]**o + ((-0.391674837532+0.9335301104j))*x[0] + ((-0.134102470324-0.459704193645j))*x[1]**o + ((0.27787844644-0.258950104375j))*x[1]
+        ref[(0, 0)]=(0.823461375406+0.995959975614j)*x_ref[0]**o + ((-0.391674837532+0.9335301104j))*x_ref[0] + ((-0.134102470324-0.459704193645j))*x_ref[1]**o + ((0.27787844644-0.258950104375j))*x_ref[1]
+        arg[(0, 1)]=(-0.678885184732+0.702872104227j)*x[0]**o + ((-0.0414694257884-0.707106348409j))*x[0] + ((0.407167535077+0.756524513573j))*x[1]**o + ((0.578816762656+0.944714800645j))*x[1]
+        ref[(0, 1)]=(-0.678885184732+0.702872104227j)*x_ref[0]**o + ((-0.0414694257884-0.707106348409j))*x_ref[0] + ((0.407167535077+0.756524513573j))*x_ref[1]**o + ((0.578816762656+0.944714800645j))*x_ref[1]
+        arg[(0, 2)]=(0.998153432419-0.653503950901j)*x[0]**o + ((-0.671088764766-0.309409174615j))*x[0] + ((-0.700805296763-0.921558624746j))*x[1]**o + ((-0.72912140094+0.420312236186j))*x[1]
+        ref[(0, 2)]=(0.998153432419-0.653503950901j)*x_ref[0]**o + ((-0.671088764766-0.309409174615j))*x_ref[0] + ((-0.700805296763-0.921558624746j))*x_ref[1]**o + ((-0.72912140094+0.420312236186j))*x_ref[1]
+        arg[(1, 0)]=(-0.459267069345+0.277300044215j)*x[0]**o + ((-0.799961681137-0.814615174806j))*x[0] + ((0.348865699559+0.458343680194j))*x[1]**o + ((0.958353944313-0.459274901179j))*x[1]
+        ref[(1, 0)]=(-0.459267069345+0.277300044215j)*x_ref[0]**o + ((-0.799961681137-0.814615174806j))*x_ref[0] + ((0.348865699559+0.458343680194j))*x_ref[1]**o + ((0.958353944313-0.459274901179j))*x_ref[1]
+        arg[(1, 1)]=(-0.0700361090101+0.27868113092j)*x[0]**o + ((-0.384276806937+0.775606719754j))*x[0] + ((0.628413145264+0.231243212117j))*x[1]**o + ((-0.0813776226157-0.1812281509j))*x[1]
+        ref[(1, 1)]=(-0.0700361090101+0.27868113092j)*x_ref[0]**o + ((-0.384276806937+0.775606719754j))*x_ref[0] + ((0.628413145264+0.231243212117j))*x_ref[1]**o + ((-0.0813776226157-0.1812281509j))*x_ref[1]
+        arg[(1, 2)]=(0.100030117116+0.182119243007j)*x[0]**o + ((-0.204214200233+0.0462500445138j))*x[0] + ((-0.436749938302-0.576432355304j))*x[1]**o + ((0.176825378888+0.949457362747j))*x[1]
+        ref[(1, 2)]=(0.100030117116+0.182119243007j)*x_ref[0]**o + ((-0.204214200233+0.0462500445138j))*x_ref[0] + ((-0.436749938302-0.576432355304j))*x_ref[1]**o + ((0.176825378888+0.949457362747j))*x_ref[1]
+        arg[(2, 0)]=(0.184352415009+0.95021033716j)*x[0]**o + ((-0.87888949894-0.484061253402j))*x[0] + ((-0.157548574303-0.587594796684j))*x[1]**o + ((-0.493189991616-0.753424004352j))*x[1]
+        ref[(2, 0)]=(0.184352415009+0.95021033716j)*x_ref[0]**o + ((-0.87888949894-0.484061253402j))*x_ref[0] + ((-0.157548574303-0.587594796684j))*x_ref[1]**o + ((-0.493189991616-0.753424004352j))*x_ref[1]
+        arg[(2, 1)]=(0.328951711558-0.466370433499j)*x[0]**o + ((-0.909908426699-0.34056476501j))*x[0] + ((0.490636218036-0.923473293652j))*x[1]**o + ((0.808170787983-0.784008609197j))*x[1]
+        ref[(2, 1)]=(0.328951711558-0.466370433499j)*x_ref[0]**o + ((-0.909908426699-0.34056476501j))*x_ref[0] + ((0.490636218036-0.923473293652j))*x_ref[1]**o + ((0.808170787983-0.784008609197j))*x_ref[1]
+        arg[(2, 2)]=(0.0347615600401+0.66543539352j)*x[0]**o + ((0.232331782367-0.329121873751j))*x[0] + ((0.431072913366+0.127749889163j))*x[1]**o + ((-0.203008153841+0.711435427465j))*x[1]
+        ref[(2, 2)]=(0.0347615600401+0.66543539352j)*x_ref[0]**o + ((0.232331782367-0.329121873751j))*x_ref[0] + ((0.431072913366+0.127749889163j))*x_ref[1]**o + ((-0.203008153841+0.711435427465j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.604438125572-0.343124672046j)*x[2]**o + ((0.439356702916-0.910258090096j))*x[2]
+            ref[(0, 0)]+=(0.604438125572-0.343124672046j)*x_ref[2]**o + ((0.439356702916-0.910258090096j))*x_ref[2]
+            arg[(0, 1)]+=(-0.997881194944-0.674339874242j)*x[2]**o + ((0.0137671577615+0.294838562491j))*x[2]
+            ref[(0, 1)]+=(-0.997881194944-0.674339874242j)*x_ref[2]**o + ((0.0137671577615+0.294838562491j))*x_ref[2]
+            arg[(0, 2)]+=(-0.899500541974-0.633627644517j)*x[2]**o + ((0.333601011304-0.705311586813j))*x[2]
+            ref[(0, 2)]+=(-0.899500541974-0.633627644517j)*x_ref[2]**o + ((0.333601011304-0.705311586813j))*x_ref[2]
+            arg[(1, 0)]+=(-0.118707291864+0.623147952293j)*x[2]**o + ((-0.0889621041403-0.534128871507j))*x[2]
+            ref[(1, 0)]+=(-0.118707291864+0.623147952293j)*x_ref[2]**o + ((-0.0889621041403-0.534128871507j))*x_ref[2]
+            arg[(1, 1)]+=(0.41611018855+0.777372995766j)*x[2]**o + ((-0.475171884236-0.465376673119j))*x[2]
+            ref[(1, 1)]+=(0.41611018855+0.777372995766j)*x_ref[2]**o + ((-0.475171884236-0.465376673119j))*x_ref[2]
+            arg[(1, 2)]+=(0.187012746209+0.681788778342j)*x[2]**o + ((0.644661444204+0.465799980404j))*x[2]
+            ref[(1, 2)]+=(0.187012746209+0.681788778342j)*x_ref[2]**o + ((0.644661444204+0.465799980404j))*x_ref[2]
+            arg[(2, 0)]+=(0.0469537635109-0.849579972017j)*x[2]**o + ((-0.654205270527-0.683568707793j))*x[2]
+            ref[(2, 0)]+=(0.0469537635109-0.849579972017j)*x_ref[2]**o + ((-0.654205270527-0.683568707793j))*x_ref[2]
+            arg[(2, 1)]+=(-0.534829868081+0.386166404216j)*x[2]**o + ((-0.843460692444-0.726266336463j))*x[2]
+            ref[(2, 1)]+=(-0.534829868081+0.386166404216j)*x_ref[2]**o + ((-0.843460692444-0.726266336463j))*x_ref[2]
+            arg[(2, 2)]+=(0.0408000991296-0.373600739251j)*x[2]**o + ((0.011648401793+0.976804053731j))*x[2]
+            ref[(2, 2)]+=(0.0408000991296-0.373600739251j)*x_ref[2]**o + ((0.011648401793+0.976804053731j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2),w)
+        ref = Data(0,(2, 3, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.662624868181-0.817802523622j)*x[0]**o + ((-0.0298266709288+0.163247382999j))*x[0] + ((0.840185402882+0.336482137132j))*x[1]**o + ((-0.960660454802-0.920536740913j))*x[1]
+        ref[(0, 0, 0)]=(-0.662624868181-0.817802523622j)*x_ref[0]**o + ((-0.0298266709288+0.163247382999j))*x_ref[0] + ((0.840185402882+0.336482137132j))*x_ref[1]**o + ((-0.960660454802-0.920536740913j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.85048335227-0.812716986093j)*x[0]**o + ((0.302924063576+0.958745355704j))*x[0] + ((-0.382954236746+0.693233559106j))*x[1]**o + ((0.651050992832+0.170473497676j))*x[1]
+        ref[(0, 0, 1)]=(-0.85048335227-0.812716986093j)*x_ref[0]**o + ((0.302924063576+0.958745355704j))*x_ref[0] + ((-0.382954236746+0.693233559106j))*x_ref[1]**o + ((0.651050992832+0.170473497676j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.303301296222+0.18408813818j)*x[0]**o + ((0.680517235216-0.852608699358j))*x[0] + ((0.420535806849-0.702443392038j))*x[1]**o + ((-0.684423535279+0.450438130504j))*x[1]
+        ref[(0, 1, 0)]=(-0.303301296222+0.18408813818j)*x_ref[0]**o + ((0.680517235216-0.852608699358j))*x_ref[0] + ((0.420535806849-0.702443392038j))*x_ref[1]**o + ((-0.684423535279+0.450438130504j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.696902511705-0.441075617719j)*x[0]**o + ((0.936915243719+0.39359150505j))*x[0] + ((0.832408033316-0.949885194834j))*x[1]**o + ((0.0504688958389+0.358597234383j))*x[1]
+        ref[(0, 1, 1)]=(0.696902511705-0.441075617719j)*x_ref[0]**o + ((0.936915243719+0.39359150505j))*x_ref[0] + ((0.832408033316-0.949885194834j))*x_ref[1]**o + ((0.0504688958389+0.358597234383j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.983575205883+0.89570038847j)*x[0]**o + ((-0.481840315797-0.250188801403j))*x[0] + ((-0.326983264912+0.404415044527j))*x[1]**o + ((-0.873173841046+0.241443725j))*x[1]
+        ref[(0, 2, 0)]=(0.983575205883+0.89570038847j)*x_ref[0]**o + ((-0.481840315797-0.250188801403j))*x_ref[0] + ((-0.326983264912+0.404415044527j))*x_ref[1]**o + ((-0.873173841046+0.241443725j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.561743259123+0.583722338135j)*x[0]**o + ((-0.704476313173-0.0232609978508j))*x[0] + ((-0.813583578691-0.515354114069j))*x[1]**o + ((-0.39031725332+0.696179311873j))*x[1]
+        ref[(0, 2, 1)]=(-0.561743259123+0.583722338135j)*x_ref[0]**o + ((-0.704476313173-0.0232609978508j))*x_ref[0] + ((-0.813583578691-0.515354114069j))*x_ref[1]**o + ((-0.39031725332+0.696179311873j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.993315524358+0.169969930317j)*x[0]**o + ((0.98847457898-0.295756274727j))*x[0] + ((-0.530707495657+0.94212565567j))*x[1]**o + ((-0.38151151217+0.696491575248j))*x[1]
+        ref[(1, 0, 0)]=(-0.993315524358+0.169969930317j)*x_ref[0]**o + ((0.98847457898-0.295756274727j))*x_ref[0] + ((-0.530707495657+0.94212565567j))*x_ref[1]**o + ((-0.38151151217+0.696491575248j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.751235610432+0.858885104916j)*x[0]**o + ((-0.894802647066-0.488214981206j))*x[0] + ((-0.976536450788-0.466758813954j))*x[1]**o + ((-0.11284529567+0.576928983421j))*x[1]
+        ref[(1, 0, 1)]=(-0.751235610432+0.858885104916j)*x_ref[0]**o + ((-0.894802647066-0.488214981206j))*x_ref[0] + ((-0.976536450788-0.466758813954j))*x_ref[1]**o + ((-0.11284529567+0.576928983421j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.965591996672-0.249332445872j)*x[0]**o + ((0.435515873851+0.99102446791j))*x[0] + ((-0.582592771784+0.715453025903j))*x[1]**o + ((-0.281391859287-0.412690313453j))*x[1]
+        ref[(1, 1, 0)]=(0.965591996672-0.249332445872j)*x_ref[0]**o + ((0.435515873851+0.99102446791j))*x_ref[0] + ((-0.582592771784+0.715453025903j))*x_ref[1]**o + ((-0.281391859287-0.412690313453j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.132867671091+0.529680270413j)*x[0]**o + ((-0.398114246381-0.0654589277887j))*x[0] + ((-0.221308376371-0.648318481025j))*x[1]**o + ((-0.294779625807+0.0356745947348j))*x[1]
+        ref[(1, 1, 1)]=(-0.132867671091+0.529680270413j)*x_ref[0]**o + ((-0.398114246381-0.0654589277887j))*x_ref[0] + ((-0.221308376371-0.648318481025j))*x_ref[1]**o + ((-0.294779625807+0.0356745947348j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.301200797745-0.545856270488j)*x[0]**o + ((0.44967918312+0.780649231088j))*x[0] + ((0.863254371967-0.996455039745j))*x[1]**o + ((-0.515213073258-0.161960063724j))*x[1]
+        ref[(1, 2, 0)]=(-0.301200797745-0.545856270488j)*x_ref[0]**o + ((0.44967918312+0.780649231088j))*x_ref[0] + ((0.863254371967-0.996455039745j))*x_ref[1]**o + ((-0.515213073258-0.161960063724j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.862681615313-0.964897942815j)*x[0]**o + ((0.272055266194-0.358497935481j))*x[0] + ((-0.509370889287-0.262368166051j))*x[1]**o + ((-0.779655346008-0.240349113344j))*x[1]
+        ref[(1, 2, 1)]=(-0.862681615313-0.964897942815j)*x_ref[0]**o + ((0.272055266194-0.358497935481j))*x_ref[0] + ((-0.509370889287-0.262368166051j))*x_ref[1]**o + ((-0.779655346008-0.240349113344j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.93801783138+0.892567536691j)*x[2]**o + ((-0.511883760585+0.328615038854j))*x[2]
+            ref[(0, 0, 0)]+=(-0.93801783138+0.892567536691j)*x_ref[2]**o + ((-0.511883760585+0.328615038854j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.113728894122-0.331731352346j)*x[2]**o + ((-0.442457248594-0.302760220828j))*x[2]
+            ref[(0, 0, 1)]+=(-0.113728894122-0.331731352346j)*x_ref[2]**o + ((-0.442457248594-0.302760220828j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.102149879426-0.274023087501j)*x[2]**o + ((0.499954649038-0.992243060546j))*x[2]
+            ref[(0, 1, 0)]+=(-0.102149879426-0.274023087501j)*x_ref[2]**o + ((0.499954649038-0.992243060546j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.380654664932-0.355383588165j)*x[2]**o + ((-0.438872822286+0.412969085338j))*x[2]
+            ref[(0, 1, 1)]+=(-0.380654664932-0.355383588165j)*x_ref[2]**o + ((-0.438872822286+0.412969085338j))*x_ref[2]
+            arg[(0, 2, 0)]+=(-0.694053252784-0.0589036601985j)*x[2]**o + ((-0.549811505557+0.969214461326j))*x[2]
+            ref[(0, 2, 0)]+=(-0.694053252784-0.0589036601985j)*x_ref[2]**o + ((-0.549811505557+0.969214461326j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.993593505265+0.428149062233j)*x[2]**o + ((-0.262689407234+0.239061106684j))*x[2]
+            ref[(0, 2, 1)]+=(0.993593505265+0.428149062233j)*x_ref[2]**o + ((-0.262689407234+0.239061106684j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.652390145008-0.0339980824722j)*x[2]**o + ((0.634593723304-0.5662110145j))*x[2]
+            ref[(1, 0, 0)]+=(0.652390145008-0.0339980824722j)*x_ref[2]**o + ((0.634593723304-0.5662110145j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.856207148415-0.0932388207843j)*x[2]**o + ((-0.379661536882-0.296397691038j))*x[2]
+            ref[(1, 0, 1)]+=(0.856207148415-0.0932388207843j)*x_ref[2]**o + ((-0.379661536882-0.296397691038j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.278855274022-0.526320292825j)*x[2]**o + ((0.263896615912-0.615492993474j))*x[2]
+            ref[(1, 1, 0)]+=(-0.278855274022-0.526320292825j)*x_ref[2]**o + ((0.263896615912-0.615492993474j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.128945101623-0.725964287494j)*x[2]**o + ((0.680788276406+0.483091666668j))*x[2]
+            ref[(1, 1, 1)]+=(0.128945101623-0.725964287494j)*x_ref[2]**o + ((0.680788276406+0.483091666668j))*x_ref[2]
+            arg[(1, 2, 0)]+=(-0.919845193605-0.527979638256j)*x[2]**o + ((0.827952049195-0.605682936176j))*x[2]
+            ref[(1, 2, 0)]+=(-0.919845193605-0.527979638256j)*x_ref[2]**o + ((0.827952049195-0.605682936176j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.853683173688-0.166001677714j)*x[2]**o + ((0.484673090781+0.139948406871j))*x[2]
+            ref[(1, 2, 1)]+=(-0.853683173688-0.166001677714j)*x_ref[2]**o + ((0.484673090781+0.139948406871j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 2, 2),w)
+        ref = Data(0,(4, 4, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.00185063053711-0.832609170609j)*x[0]**o + ((-0.348911362742+0.185106023184j))*x[0] + ((0.879755569088-0.201834289677j))*x[1]**o + ((-0.851499293491-0.0256476604865j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.00185063053711-0.832609170609j)*x_ref[0]**o + ((-0.348911362742+0.185106023184j))*x_ref[0] + ((0.879755569088-0.201834289677j))*x_ref[1]**o + ((-0.851499293491-0.0256476604865j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.359298401449+0.395324782189j)*x[0]**o + ((-0.85210729836-0.99566280408j))*x[0] + ((0.47159873441-0.231699928144j))*x[1]**o + ((0.0536599927788+0.732241410932j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.359298401449+0.395324782189j)*x_ref[0]**o + ((-0.85210729836-0.99566280408j))*x_ref[0] + ((0.47159873441-0.231699928144j))*x_ref[1]**o + ((0.0536599927788+0.732241410932j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.712911336554-0.883454420956j)*x[0]**o + ((0.867796804053-0.736825782156j))*x[0] + ((0.981751050822-0.0427747307615j))*x[1]**o + ((0.941634257157+0.60954884704j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.712911336554-0.883454420956j)*x_ref[0]**o + ((0.867796804053-0.736825782156j))*x_ref[0] + ((0.981751050822-0.0427747307615j))*x_ref[1]**o + ((0.941634257157+0.60954884704j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.605966593444-0.270225985672j)*x[0]**o + ((-0.108168152929-0.465585115218j))*x[0] + ((0.735907309965+0.899871393213j))*x[1]**o + ((-0.182172054432+0.550627136347j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.605966593444-0.270225985672j)*x_ref[0]**o + ((-0.108168152929-0.465585115218j))*x_ref[0] + ((0.735907309965+0.899871393213j))*x_ref[1]**o + ((-0.182172054432+0.550627136347j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.697765468061-0.66682810381j)*x[0]**o + ((0.42483443286+0.942116041248j))*x[0] + ((0.938695344317-0.959568178716j))*x[1]**o + ((-0.498108833574+0.0803327653949j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.697765468061-0.66682810381j)*x_ref[0]**o + ((0.42483443286+0.942116041248j))*x_ref[0] + ((0.938695344317-0.959568178716j))*x_ref[1]**o + ((-0.498108833574+0.0803327653949j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.585372899208-0.784769163269j)*x[0]**o + ((-0.615610615299+0.310220706542j))*x[0] + ((0.197183142682+0.713263019761j))*x[1]**o + ((0.982019826852-0.411385470165j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.585372899208-0.784769163269j)*x_ref[0]**o + ((-0.615610615299+0.310220706542j))*x_ref[0] + ((0.197183142682+0.713263019761j))*x_ref[1]**o + ((0.982019826852-0.411385470165j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.476886948736+0.579396374089j)*x[0]**o + ((-0.260188092307-0.116549401263j))*x[0] + ((-0.939606475585-0.581701199736j))*x[1]**o + ((0.205244249896-0.662705956278j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.476886948736+0.579396374089j)*x_ref[0]**o + ((-0.260188092307-0.116549401263j))*x_ref[0] + ((-0.939606475585-0.581701199736j))*x_ref[1]**o + ((0.205244249896-0.662705956278j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.194347779265+0.370141486038j)*x[0]**o + ((0.396109559427+0.850445442037j))*x[0] + ((-0.585803283733-0.639959344754j))*x[1]**o + ((-0.250033657322-0.915037418659j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.194347779265+0.370141486038j)*x_ref[0]**o + ((0.396109559427+0.850445442037j))*x_ref[0] + ((-0.585803283733-0.639959344754j))*x_ref[1]**o + ((-0.250033657322-0.915037418659j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.654744178329-0.568227201984j)*x[0]**o + ((-0.158855390242+0.668873064622j))*x[0] + ((-0.121478570373+0.385106370277j))*x[1]**o + ((0.0725520424247+0.287202441784j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.654744178329-0.568227201984j)*x_ref[0]**o + ((-0.158855390242+0.668873064622j))*x_ref[0] + ((-0.121478570373+0.385106370277j))*x_ref[1]**o + ((0.0725520424247+0.287202441784j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.128882289908+0.273019202827j)*x[0]**o + ((-0.470682630788+0.980974530204j))*x[0] + ((0.953849991499-0.89004323823j))*x[1]**o + ((-0.309174187971-0.010490023739j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.128882289908+0.273019202827j)*x_ref[0]**o + ((-0.470682630788+0.980974530204j))*x_ref[0] + ((0.953849991499-0.89004323823j))*x_ref[1]**o + ((-0.309174187971-0.010490023739j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.0708548612044-0.930076240518j)*x[0]**o + ((-0.016798048419-0.3259495599j))*x[0] + ((0.489637942001-0.616457009996j))*x[1]**o + ((-0.464471003779-0.256470297442j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.0708548612044-0.930076240518j)*x_ref[0]**o + ((-0.016798048419-0.3259495599j))*x_ref[0] + ((0.489637942001-0.616457009996j))*x_ref[1]**o + ((-0.464471003779-0.256470297442j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.975621683827+0.15411870229j)*x[0]**o + ((-0.228554284023-0.996417963113j))*x[0] + ((-0.997734984422-0.928185658777j))*x[1]**o + ((0.536953195916-0.504723828227j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.975621683827+0.15411870229j)*x_ref[0]**o + ((-0.228554284023-0.996417963113j))*x_ref[0] + ((-0.997734984422-0.928185658777j))*x_ref[1]**o + ((0.536953195916-0.504723828227j))*x_ref[1]
+        arg[(0, 3, 0, 0)]=(0.858969186488+0.846996444938j)*x[0]**o + ((0.644584901966-0.834037705649j))*x[0] + ((0.275065866537+0.0435861136824j))*x[1]**o + ((-0.239932679785+0.430528133184j))*x[1]
+        ref[(0, 3, 0, 0)]=(0.858969186488+0.846996444938j)*x_ref[0]**o + ((0.644584901966-0.834037705649j))*x_ref[0] + ((0.275065866537+0.0435861136824j))*x_ref[1]**o + ((-0.239932679785+0.430528133184j))*x_ref[1]
+        arg[(0, 3, 0, 1)]=(0.472291716346-0.841475818592j)*x[0]**o + ((0.173697234902+0.873060467947j))*x[0] + ((0.286203522162-0.980120367686j))*x[1]**o + ((0.0781734804691+0.893254328695j))*x[1]
+        ref[(0, 3, 0, 1)]=(0.472291716346-0.841475818592j)*x_ref[0]**o + ((0.173697234902+0.873060467947j))*x_ref[0] + ((0.286203522162-0.980120367686j))*x_ref[1]**o + ((0.0781734804691+0.893254328695j))*x_ref[1]
+        arg[(0, 3, 1, 0)]=(0.704204041097+0.918827500429j)*x[0]**o + ((-0.838447400072-0.505849020508j))*x[0] + ((0.12612241801-0.489356391872j))*x[1]**o + ((-0.909291193564-0.819400238075j))*x[1]
+        ref[(0, 3, 1, 0)]=(0.704204041097+0.918827500429j)*x_ref[0]**o + ((-0.838447400072-0.505849020508j))*x_ref[0] + ((0.12612241801-0.489356391872j))*x_ref[1]**o + ((-0.909291193564-0.819400238075j))*x_ref[1]
+        arg[(0, 3, 1, 1)]=(-0.397171526747-0.492184567715j)*x[0]**o + ((-0.81279521218-0.967579199252j))*x[0] + ((-0.434971838047-0.37965008445j))*x[1]**o + ((0.695493016649-0.346713826741j))*x[1]
+        ref[(0, 3, 1, 1)]=(-0.397171526747-0.492184567715j)*x_ref[0]**o + ((-0.81279521218-0.967579199252j))*x_ref[0] + ((-0.434971838047-0.37965008445j))*x_ref[1]**o + ((0.695493016649-0.346713826741j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.538781006886-0.481394470955j)*x[0]**o + ((-0.616197556985+0.185110351683j))*x[0] + ((-0.909306898193+0.918732667269j))*x[1]**o + ((-0.552851210176+0.686763948189j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.538781006886-0.481394470955j)*x_ref[0]**o + ((-0.616197556985+0.185110351683j))*x_ref[0] + ((-0.909306898193+0.918732667269j))*x_ref[1]**o + ((-0.552851210176+0.686763948189j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.572954767203+0.256127661379j)*x[0]**o + ((0.268425231983-0.96286054238j))*x[0] + ((-0.772335365059-0.926475706746j))*x[1]**o + ((0.419741528007+0.702168063106j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.572954767203+0.256127661379j)*x_ref[0]**o + ((0.268425231983-0.96286054238j))*x_ref[0] + ((-0.772335365059-0.926475706746j))*x_ref[1]**o + ((0.419741528007+0.702168063106j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.193518779984-0.592018676862j)*x[0]**o + ((0.337710741215-0.547829043062j))*x[0] + ((0.00632632044666+0.625492811968j))*x[1]**o + ((-0.0378519719511+0.00994723992071j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.193518779984-0.592018676862j)*x_ref[0]**o + ((0.337710741215-0.547829043062j))*x_ref[0] + ((0.00632632044666+0.625492811968j))*x_ref[1]**o + ((-0.0378519719511+0.00994723992071j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.121686242566-0.40596202106j)*x[0]**o + ((0.239546035309-0.163982920222j))*x[0] + ((-0.172376708792+0.94486595109j))*x[1]**o + ((0.118897963295+0.595610785635j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.121686242566-0.40596202106j)*x_ref[0]**o + ((0.239546035309-0.163982920222j))*x_ref[0] + ((-0.172376708792+0.94486595109j))*x_ref[1]**o + ((0.118897963295+0.595610785635j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.146185905784-0.469438857349j)*x[0]**o + ((-0.512801312825-0.734611837139j))*x[0] + ((0.283169414895-0.98497526882j))*x[1]**o + ((-0.835449921103+0.878980363928j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.146185905784-0.469438857349j)*x_ref[0]**o + ((-0.512801312825-0.734611837139j))*x_ref[0] + ((0.283169414895-0.98497526882j))*x_ref[1]**o + ((-0.835449921103+0.878980363928j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(0.484867357711-0.657866165561j)*x[0]**o + ((-0.353130082339-0.825555780793j))*x[0] + ((0.0427838688806+0.956319740248j))*x[1]**o + ((-0.0435101965843-0.667617154457j))*x[1]
+        ref[(1, 1, 0, 1)]=(0.484867357711-0.657866165561j)*x_ref[0]**o + ((-0.353130082339-0.825555780793j))*x_ref[0] + ((0.0427838688806+0.956319740248j))*x_ref[1]**o + ((-0.0435101965843-0.667617154457j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.696064619702+0.0492563549254j)*x[0]**o + ((0.895033499531-0.50909131991j))*x[0] + ((-0.901926007138+0.316830462491j))*x[1]**o + ((0.27579529907+0.69453471685j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.696064619702+0.0492563549254j)*x_ref[0]**o + ((0.895033499531-0.50909131991j))*x_ref[0] + ((-0.901926007138+0.316830462491j))*x_ref[1]**o + ((0.27579529907+0.69453471685j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.125644995134+0.113665138655j)*x[0]**o + ((0.402513272751-0.542881703914j))*x[0] + ((-0.841412317332-0.26039193768j))*x[1]**o + ((0.298145762916-0.566202654928j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.125644995134+0.113665138655j)*x_ref[0]**o + ((0.402513272751-0.542881703914j))*x_ref[0] + ((-0.841412317332-0.26039193768j))*x_ref[1]**o + ((0.298145762916-0.566202654928j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.625157065531-0.804492973676j)*x[0]**o + ((0.0995104670296+0.405313044954j))*x[0] + ((-0.0094609120024+0.154517904922j))*x[1]**o + ((-0.149043819103-0.0680073878128j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.625157065531-0.804492973676j)*x_ref[0]**o + ((0.0995104670296+0.405313044954j))*x_ref[0] + ((-0.0094609120024+0.154517904922j))*x_ref[1]**o + ((-0.149043819103-0.0680073878128j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.960848871881-0.652109447815j)*x[0]**o + ((-0.895153606224-0.934637864554j))*x[0] + ((0.945618307242-0.224808783672j))*x[1]**o + ((-0.194267755438-0.411816812241j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.960848871881-0.652109447815j)*x_ref[0]**o + ((-0.895153606224-0.934637864554j))*x_ref[0] + ((0.945618307242-0.224808783672j))*x_ref[1]**o + ((-0.194267755438-0.411816812241j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.87811949103+0.23186819942j)*x[0]**o + ((-0.38270524936+0.269240370916j))*x[0] + ((-0.655135617234-0.779164218274j))*x[1]**o + ((0.457019178371-0.711348836572j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.87811949103+0.23186819942j)*x_ref[0]**o + ((-0.38270524936+0.269240370916j))*x_ref[0] + ((-0.655135617234-0.779164218274j))*x_ref[1]**o + ((0.457019178371-0.711348836572j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.841226631773-0.601245668037j)*x[0]**o + ((-0.201714905818-0.435455852354j))*x[0] + ((0.734272617528+0.00221165719818j))*x[1]**o + ((0.896745896053-0.738291880761j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.841226631773-0.601245668037j)*x_ref[0]**o + ((-0.201714905818-0.435455852354j))*x_ref[0] + ((0.734272617528+0.00221165719818j))*x_ref[1]**o + ((0.896745896053-0.738291880761j))*x_ref[1]
+        arg[(1, 3, 0, 0)]=(-0.110223445955+0.45826483739j)*x[0]**o + ((0.278576231856+0.550722979988j))*x[0] + ((-0.930214347063-0.579198302378j))*x[1]**o + ((0.665868774857-0.268297256452j))*x[1]
+        ref[(1, 3, 0, 0)]=(-0.110223445955+0.45826483739j)*x_ref[0]**o + ((0.278576231856+0.550722979988j))*x_ref[0] + ((-0.930214347063-0.579198302378j))*x_ref[1]**o + ((0.665868774857-0.268297256452j))*x_ref[1]
+        arg[(1, 3, 0, 1)]=(-0.60649701453+0.72588214242j)*x[0]**o + ((-0.794062622364-0.544632618465j))*x[0] + ((0.532459063416-0.568809234357j))*x[1]**o + ((-0.415773379143-0.552975723077j))*x[1]
+        ref[(1, 3, 0, 1)]=(-0.60649701453+0.72588214242j)*x_ref[0]**o + ((-0.794062622364-0.544632618465j))*x_ref[0] + ((0.532459063416-0.568809234357j))*x_ref[1]**o + ((-0.415773379143-0.552975723077j))*x_ref[1]
+        arg[(1, 3, 1, 0)]=(-0.346928060114-0.774572276154j)*x[0]**o + ((0.958887781035-0.585814207795j))*x[0] + ((0.484568129448+0.998354909753j))*x[1]**o + ((0.178660070412+0.191975875967j))*x[1]
+        ref[(1, 3, 1, 0)]=(-0.346928060114-0.774572276154j)*x_ref[0]**o + ((0.958887781035-0.585814207795j))*x_ref[0] + ((0.484568129448+0.998354909753j))*x_ref[1]**o + ((0.178660070412+0.191975875967j))*x_ref[1]
+        arg[(1, 3, 1, 1)]=(-0.586910092993+0.585203328369j)*x[0]**o + ((-0.853408729028-0.149249305178j))*x[0] + ((-0.319923875055-0.302145912202j))*x[1]**o + ((-0.976516065423+0.0939875316463j))*x[1]
+        ref[(1, 3, 1, 1)]=(-0.586910092993+0.585203328369j)*x_ref[0]**o + ((-0.853408729028-0.149249305178j))*x_ref[0] + ((-0.319923875055-0.302145912202j))*x_ref[1]**o + ((-0.976516065423+0.0939875316463j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.117847607597+0.272722665141j)*x[0]**o + ((-0.191244677186+0.20532285043j))*x[0] + ((-0.110150438726+0.137715064126j))*x[1]**o + ((-0.973080876452+0.461490242302j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.117847607597+0.272722665141j)*x_ref[0]**o + ((-0.191244677186+0.20532285043j))*x_ref[0] + ((-0.110150438726+0.137715064126j))*x_ref[1]**o + ((-0.973080876452+0.461490242302j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.845906170133-0.0372995777781j)*x[0]**o + ((-0.797778077405+0.529597388356j))*x[0] + ((-0.108647243125-0.254847494481j))*x[1]**o + ((-0.621973370673+0.263290790174j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.845906170133-0.0372995777781j)*x_ref[0]**o + ((-0.797778077405+0.529597388356j))*x_ref[0] + ((-0.108647243125-0.254847494481j))*x_ref[1]**o + ((-0.621973370673+0.263290790174j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.815304002652-0.518763625529j)*x[0]**o + ((0.188764340155-0.968806701356j))*x[0] + ((0.147702900221+0.638278462268j))*x[1]**o + ((0.596708314284-0.295491109403j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.815304002652-0.518763625529j)*x_ref[0]**o + ((0.188764340155-0.968806701356j))*x_ref[0] + ((0.147702900221+0.638278462268j))*x_ref[1]**o + ((0.596708314284-0.295491109403j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.43709768589-0.765894311743j)*x[0]**o + ((-0.0580397674373+0.13764662722j))*x[0] + ((0.435083821068+0.663886160066j))*x[1]**o + ((-0.779450267763+0.666387783159j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.43709768589-0.765894311743j)*x_ref[0]**o + ((-0.0580397674373+0.13764662722j))*x_ref[0] + ((0.435083821068+0.663886160066j))*x_ref[1]**o + ((-0.779450267763+0.666387783159j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.272635085853+0.168396428474j)*x[0]**o + ((0.388353009585-0.301920100644j))*x[0] + ((-0.670297843658-0.530666008101j))*x[1]**o + ((-0.604371578503+0.527265976358j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.272635085853+0.168396428474j)*x_ref[0]**o + ((0.388353009585-0.301920100644j))*x_ref[0] + ((-0.670297843658-0.530666008101j))*x_ref[1]**o + ((-0.604371578503+0.527265976358j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.117451692476+0.832648313884j)*x[0]**o + ((-0.771995001809-0.207933576824j))*x[0] + ((-0.669843883877+0.747171372054j))*x[1]**o + ((-0.538498350268+0.818375267975j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.117451692476+0.832648313884j)*x_ref[0]**o + ((-0.771995001809-0.207933576824j))*x_ref[0] + ((-0.669843883877+0.747171372054j))*x_ref[1]**o + ((-0.538498350268+0.818375267975j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.529799744774-0.807870402141j)*x[0]**o + ((-0.900239853312-0.895672256458j))*x[0] + ((-0.642400153414-0.242996009937j))*x[1]**o + ((-0.926912483876-0.230037858153j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.529799744774-0.807870402141j)*x_ref[0]**o + ((-0.900239853312-0.895672256458j))*x_ref[0] + ((-0.642400153414-0.242996009937j))*x_ref[1]**o + ((-0.926912483876-0.230037858153j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.902612127703-0.804861543422j)*x[0]**o + ((-0.0899392565403-0.474466483608j))*x[0] + ((0.798930078045+0.405396754527j))*x[1]**o + ((0.175932433063-0.485233117474j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.902612127703-0.804861543422j)*x_ref[0]**o + ((-0.0899392565403-0.474466483608j))*x_ref[0] + ((0.798930078045+0.405396754527j))*x_ref[1]**o + ((0.175932433063-0.485233117474j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.56295482665+0.834602682981j)*x[0]**o + ((-0.867186859471-0.00264455235387j))*x[0] + ((0.583573514234+0.561433709751j))*x[1]**o + ((-0.749001296989+0.37117324279j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.56295482665+0.834602682981j)*x_ref[0]**o + ((-0.867186859471-0.00264455235387j))*x_ref[0] + ((0.583573514234+0.561433709751j))*x_ref[1]**o + ((-0.749001296989+0.37117324279j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.18617540925+0.949990683516j)*x[0]**o + ((0.331930271445-0.193770425887j))*x[0] + ((0.600664775779-0.919597664656j))*x[1]**o + ((0.860654866543-0.142926079958j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.18617540925+0.949990683516j)*x_ref[0]**o + ((0.331930271445-0.193770425887j))*x_ref[0] + ((0.600664775779-0.919597664656j))*x_ref[1]**o + ((0.860654866543-0.142926079958j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.79814257102-0.0757927990134j)*x[0]**o + ((-0.29790607502-0.684115827101j))*x[0] + ((0.840485390188+0.596161767943j))*x[1]**o + ((0.688983421766-0.129888831451j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.79814257102-0.0757927990134j)*x_ref[0]**o + ((-0.29790607502-0.684115827101j))*x_ref[0] + ((0.840485390188+0.596161767943j))*x_ref[1]**o + ((0.688983421766-0.129888831451j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(-0.502935347141-0.207352926369j)*x[0]**o + ((0.899190340345+0.267434700583j))*x[0] + ((0.676785254246-0.43002618782j))*x[1]**o + ((0.388324531502+0.160150729522j))*x[1]
+        ref[(2, 2, 1, 1)]=(-0.502935347141-0.207352926369j)*x_ref[0]**o + ((0.899190340345+0.267434700583j))*x_ref[0] + ((0.676785254246-0.43002618782j))*x_ref[1]**o + ((0.388324531502+0.160150729522j))*x_ref[1]
+        arg[(2, 3, 0, 0)]=(0.357037220481-0.334361114099j)*x[0]**o + ((0.74063629905-0.579873567757j))*x[0] + ((-0.586272920338-0.925634389511j))*x[1]**o + ((0.686090496282-0.800783830269j))*x[1]
+        ref[(2, 3, 0, 0)]=(0.357037220481-0.334361114099j)*x_ref[0]**o + ((0.74063629905-0.579873567757j))*x_ref[0] + ((-0.586272920338-0.925634389511j))*x_ref[1]**o + ((0.686090496282-0.800783830269j))*x_ref[1]
+        arg[(2, 3, 0, 1)]=(0.145054218276+0.0329975317894j)*x[0]**o + ((0.829041778588+0.492070078528j))*x[0] + ((-0.73653486942-0.224487040096j))*x[1]**o + ((-0.222592916322-0.0619967856387j))*x[1]
+        ref[(2, 3, 0, 1)]=(0.145054218276+0.0329975317894j)*x_ref[0]**o + ((0.829041778588+0.492070078528j))*x_ref[0] + ((-0.73653486942-0.224487040096j))*x_ref[1]**o + ((-0.222592916322-0.0619967856387j))*x_ref[1]
+        arg[(2, 3, 1, 0)]=(0.140972799292-0.429605845129j)*x[0]**o + ((0.889664800624-0.350633882677j))*x[0] + ((-0.51667167501+0.0335006021046j))*x[1]**o + ((-0.8227855776-0.0273279310874j))*x[1]
+        ref[(2, 3, 1, 0)]=(0.140972799292-0.429605845129j)*x_ref[0]**o + ((0.889664800624-0.350633882677j))*x_ref[0] + ((-0.51667167501+0.0335006021046j))*x_ref[1]**o + ((-0.8227855776-0.0273279310874j))*x_ref[1]
+        arg[(2, 3, 1, 1)]=(0.774548257841-0.118733447043j)*x[0]**o + ((0.711870972517-0.851661617785j))*x[0] + ((-0.378295902777-0.198016145582j))*x[1]**o + ((0.338442919613-0.864584729913j))*x[1]
+        ref[(2, 3, 1, 1)]=(0.774548257841-0.118733447043j)*x_ref[0]**o + ((0.711870972517-0.851661617785j))*x_ref[0] + ((-0.378295902777-0.198016145582j))*x_ref[1]**o + ((0.338442919613-0.864584729913j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.881355795188+0.198807574085j)*x[0]**o + ((-0.944722261131-0.590570235884j))*x[0] + ((0.798298348358-0.839931128034j))*x[1]**o + ((0.0921989847857+0.893486877335j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.881355795188+0.198807574085j)*x_ref[0]**o + ((-0.944722261131-0.590570235884j))*x_ref[0] + ((0.798298348358-0.839931128034j))*x_ref[1]**o + ((0.0921989847857+0.893486877335j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(-0.522241789841-0.316852520497j)*x[0]**o + ((0.586338395198-0.0906972572103j))*x[0] + ((0.0549668534675-0.25387992881j))*x[1]**o + ((-0.873375557283+0.660337018635j))*x[1]
+        ref[(3, 0, 0, 1)]=(-0.522241789841-0.316852520497j)*x_ref[0]**o + ((0.586338395198-0.0906972572103j))*x_ref[0] + ((0.0549668534675-0.25387992881j))*x_ref[1]**o + ((-0.873375557283+0.660337018635j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.12676540114-0.929241739675j)*x[0]**o + ((-0.250121100591+0.0792926713803j))*x[0] + ((-0.819884920024+0.0114296120591j))*x[1]**o + ((-0.47211086065+0.0114406127724j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.12676540114-0.929241739675j)*x_ref[0]**o + ((-0.250121100591+0.0792926713803j))*x_ref[0] + ((-0.819884920024+0.0114296120591j))*x_ref[1]**o + ((-0.47211086065+0.0114406127724j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.660690315538+0.97500749208j)*x[0]**o + ((0.20225798401+0.928962920043j))*x[0] + ((-0.671582535951-0.276939619218j))*x[1]**o + ((-0.316675287029+0.171285422198j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.660690315538+0.97500749208j)*x_ref[0]**o + ((0.20225798401+0.928962920043j))*x_ref[0] + ((-0.671582535951-0.276939619218j))*x_ref[1]**o + ((-0.316675287029+0.171285422198j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.754296962907+0.164682120042j)*x[0]**o + ((0.943880977665+0.208536252253j))*x[0] + ((0.669982205581+0.211468810488j))*x[1]**o + ((0.0422629166396+0.413698615568j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.754296962907+0.164682120042j)*x_ref[0]**o + ((0.943880977665+0.208536252253j))*x_ref[0] + ((0.669982205581+0.211468810488j))*x_ref[1]**o + ((0.0422629166396+0.413698615568j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.834226310631+0.876700772416j)*x[0]**o + ((-0.287000370908+0.498915905654j))*x[0] + ((-0.688805301264-0.419504557005j))*x[1]**o + ((0.423939187739-0.291789378756j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.834226310631+0.876700772416j)*x_ref[0]**o + ((-0.287000370908+0.498915905654j))*x_ref[0] + ((-0.688805301264-0.419504557005j))*x_ref[1]**o + ((0.423939187739-0.291789378756j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.157541785118-0.377114947392j)*x[0]**o + ((-0.954761420013+0.50339152956j))*x[0] + ((-0.590921123232+0.580312318596j))*x[1]**o + ((-0.337535684554-0.491357017303j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.157541785118-0.377114947392j)*x_ref[0]**o + ((-0.954761420013+0.50339152956j))*x_ref[0] + ((-0.590921123232+0.580312318596j))*x_ref[1]**o + ((-0.337535684554-0.491357017303j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.930622291609-0.640368500334j)*x[0]**o + ((-0.933479114666-0.624933723404j))*x[0] + ((-0.427890375448-0.65421422083j))*x[1]**o + ((0.970400924465+0.842178188182j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.930622291609-0.640368500334j)*x_ref[0]**o + ((-0.933479114666-0.624933723404j))*x_ref[0] + ((-0.427890375448-0.65421422083j))*x_ref[1]**o + ((0.970400924465+0.842178188182j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(0.839889386894-0.516769883539j)*x[0]**o + ((-0.893653263652+0.314518245626j))*x[0] + ((0.707908063288-0.277962677889j))*x[1]**o + ((0.465307683881+0.0654899310092j))*x[1]
+        ref[(3, 2, 0, 0)]=(0.839889386894-0.516769883539j)*x_ref[0]**o + ((-0.893653263652+0.314518245626j))*x_ref[0] + ((0.707908063288-0.277962677889j))*x_ref[1]**o + ((0.465307683881+0.0654899310092j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(-0.255705888577-0.818658118651j)*x[0]**o + ((0.421838958579-0.678108075333j))*x[0] + ((0.97382488167-0.556919279213j))*x[1]**o + ((0.858003179106-0.36762216473j))*x[1]
+        ref[(3, 2, 0, 1)]=(-0.255705888577-0.818658118651j)*x_ref[0]**o + ((0.421838958579-0.678108075333j))*x_ref[0] + ((0.97382488167-0.556919279213j))*x_ref[1]**o + ((0.858003179106-0.36762216473j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(-0.315112854885+0.922140769527j)*x[0]**o + ((0.0373152784217-0.768679106854j))*x[0] + ((-0.492019727594+0.484333191945j))*x[1]**o + ((0.394670092236-0.786144700068j))*x[1]
+        ref[(3, 2, 1, 0)]=(-0.315112854885+0.922140769527j)*x_ref[0]**o + ((0.0373152784217-0.768679106854j))*x_ref[0] + ((-0.492019727594+0.484333191945j))*x_ref[1]**o + ((0.394670092236-0.786144700068j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(-0.278603892675+0.0527817823361j)*x[0]**o + ((0.718392389744-0.918825780454j))*x[0] + ((-0.437484188244-0.622226221408j))*x[1]**o + ((0.795757237836-0.358560424852j))*x[1]
+        ref[(3, 2, 1, 1)]=(-0.278603892675+0.0527817823361j)*x_ref[0]**o + ((0.718392389744-0.918825780454j))*x_ref[0] + ((-0.437484188244-0.622226221408j))*x_ref[1]**o + ((0.795757237836-0.358560424852j))*x_ref[1]
+        arg[(3, 3, 0, 0)]=(0.734828432084+0.855024914679j)*x[0]**o + ((0.343856117475-0.620838917678j))*x[0] + ((0.403667796534+0.259511376431j))*x[1]**o + ((0.177745236643-0.134991685825j))*x[1]
+        ref[(3, 3, 0, 0)]=(0.734828432084+0.855024914679j)*x_ref[0]**o + ((0.343856117475-0.620838917678j))*x_ref[0] + ((0.403667796534+0.259511376431j))*x_ref[1]**o + ((0.177745236643-0.134991685825j))*x_ref[1]
+        arg[(3, 3, 0, 1)]=(0.681687956882-0.97689364085j)*x[0]**o + ((0.239900246616+0.0464998225779j))*x[0] + ((-0.487271711391-0.0996568745945j))*x[1]**o + ((0.0570193196117+0.593664980868j))*x[1]
+        ref[(3, 3, 0, 1)]=(0.681687956882-0.97689364085j)*x_ref[0]**o + ((0.239900246616+0.0464998225779j))*x_ref[0] + ((-0.487271711391-0.0996568745945j))*x_ref[1]**o + ((0.0570193196117+0.593664980868j))*x_ref[1]
+        arg[(3, 3, 1, 0)]=(-0.125193944516+0.180327359376j)*x[0]**o + ((0.270728025478-0.244978740375j))*x[0] + ((0.922093528604-0.768564641518j))*x[1]**o + ((-0.971405681538-0.549468369457j))*x[1]
+        ref[(3, 3, 1, 0)]=(-0.125193944516+0.180327359376j)*x_ref[0]**o + ((0.270728025478-0.244978740375j))*x_ref[0] + ((0.922093528604-0.768564641518j))*x_ref[1]**o + ((-0.971405681538-0.549468369457j))*x_ref[1]
+        arg[(3, 3, 1, 1)]=(0.137362843233+0.648424730246j)*x[0]**o + ((0.140025229422+0.027526081199j))*x[0] + ((0.436266674801+0.624772846194j))*x[1]**o + ((0.125879263584-0.70218934543j))*x[1]
+        ref[(3, 3, 1, 1)]=(0.137362843233+0.648424730246j)*x_ref[0]**o + ((0.140025229422+0.027526081199j))*x_ref[0] + ((0.436266674801+0.624772846194j))*x_ref[1]**o + ((0.125879263584-0.70218934543j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.172303944845+0.447026658811j)*x[2]**o + ((0.384227545793-0.260521494773j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.172303944845+0.447026658811j)*x_ref[2]**o + ((0.384227545793-0.260521494773j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.0088766678613+0.0238779661811j)*x[2]**o + ((-0.331411472505+0.433703674756j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.0088766678613+0.0238779661811j)*x_ref[2]**o + ((-0.331411472505+0.433703674756j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.987538638077+0.498737086032j)*x[2]**o + ((-0.231733613084-0.996542496108j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.987538638077+0.498737086032j)*x_ref[2]**o + ((-0.231733613084-0.996542496108j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.230087824513+0.903419298194j)*x[2]**o + ((-0.719602509165-0.330789663866j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.230087824513+0.903419298194j)*x_ref[2]**o + ((-0.719602509165-0.330789663866j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.0907335722384+0.885840498243j)*x[2]**o + ((0.200544786618+0.0351370230559j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.0907335722384+0.885840498243j)*x_ref[2]**o + ((0.200544786618+0.0351370230559j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.506705126963-0.507645761358j)*x[2]**o + ((-0.612036999336+0.447579316561j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.506705126963-0.507645761358j)*x_ref[2]**o + ((-0.612036999336+0.447579316561j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.480971985911-0.910645632956j)*x[2]**o + ((0.670100490067-0.416846490472j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.480971985911-0.910645632956j)*x_ref[2]**o + ((0.670100490067-0.416846490472j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.613689310729-0.75989792698j)*x[2]**o + ((-0.399128932429+0.703381399903j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.613689310729-0.75989792698j)*x_ref[2]**o + ((-0.399128932429+0.703381399903j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.548911663488-0.367070010538j)*x[2]**o + ((0.016751576663+0.00134240084481j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.548911663488-0.367070010538j)*x_ref[2]**o + ((0.016751576663+0.00134240084481j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.20407669593-0.760813870207j)*x[2]**o + ((-0.0147087470519+0.799615725455j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.20407669593-0.760813870207j)*x_ref[2]**o + ((-0.0147087470519+0.799615725455j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.827702879238-0.570852994419j)*x[2]**o + ((-0.304242728219+0.268304571242j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.827702879238-0.570852994419j)*x_ref[2]**o + ((-0.304242728219+0.268304571242j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.520183238194+0.171491877232j)*x[2]**o + ((-0.626325608233+0.677018870399j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.520183238194+0.171491877232j)*x_ref[2]**o + ((-0.626325608233+0.677018870399j))*x_ref[2]
+            arg[(0, 3, 0, 0)]+=(0.907910641978-0.649646882645j)*x[2]**o + ((-0.412026548295+0.788539898873j))*x[2]
+            ref[(0, 3, 0, 0)]+=(0.907910641978-0.649646882645j)*x_ref[2]**o + ((-0.412026548295+0.788539898873j))*x_ref[2]
+            arg[(0, 3, 0, 1)]+=(0.230294097459+0.487530983139j)*x[2]**o + ((-0.822743364456+0.954557231428j))*x[2]
+            ref[(0, 3, 0, 1)]+=(0.230294097459+0.487530983139j)*x_ref[2]**o + ((-0.822743364456+0.954557231428j))*x_ref[2]
+            arg[(0, 3, 1, 0)]+=(-0.786704813874-0.265037798498j)*x[2]**o + ((-0.897068459059+0.717672477807j))*x[2]
+            ref[(0, 3, 1, 0)]+=(-0.786704813874-0.265037798498j)*x_ref[2]**o + ((-0.897068459059+0.717672477807j))*x_ref[2]
+            arg[(0, 3, 1, 1)]+=(-0.323185262844+0.22164199439j)*x[2]**o + ((0.165180118926-0.322331223457j))*x[2]
+            ref[(0, 3, 1, 1)]+=(-0.323185262844+0.22164199439j)*x_ref[2]**o + ((0.165180118926-0.322331223457j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.915282369935+0.759670552828j)*x[2]**o + ((-0.609398899899-0.778140319441j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.915282369935+0.759670552828j)*x_ref[2]**o + ((-0.609398899899-0.778140319441j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.801641805446-0.737223384807j)*x[2]**o + ((-0.34629905919+0.672616071096j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.801641805446-0.737223384807j)*x_ref[2]**o + ((-0.34629905919+0.672616071096j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.375702309553+0.948517438141j)*x[2]**o + ((0.0288419157733-0.845236674857j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.375702309553+0.948517438141j)*x_ref[2]**o + ((0.0288419157733-0.845236674857j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.543438145617+0.0850668768159j)*x[2]**o + ((0.630851585156-0.809702764112j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.543438145617+0.0850668768159j)*x_ref[2]**o + ((0.630851585156-0.809702764112j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.594820310291-0.941052834702j)*x[2]**o + ((-0.0166141361831-0.258141165978j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.594820310291-0.941052834702j)*x_ref[2]**o + ((-0.0166141361831-0.258141165978j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.0855231201938+0.00603785882842j)*x[2]**o + ((0.387698306711-0.486665079189j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.0855231201938+0.00603785882842j)*x_ref[2]**o + ((0.387698306711-0.486665079189j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.460954726566-0.913516006056j)*x[2]**o + ((-0.590890930217-0.42410110204j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.460954726566-0.913516006056j)*x_ref[2]**o + ((-0.590890930217-0.42410110204j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.50443416575+0.293604953395j)*x[2]**o + ((-0.288531415586-0.441284608018j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.50443416575+0.293604953395j)*x_ref[2]**o + ((-0.288531415586-0.441284608018j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(-0.123060124324-0.0402253226713j)*x[2]**o + ((0.653468274861+0.313908372922j))*x[2]
+            ref[(1, 2, 0, 0)]+=(-0.123060124324-0.0402253226713j)*x_ref[2]**o + ((0.653468274861+0.313908372922j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.0722691102112-0.602200129581j)*x[2]**o + ((0.705489007456-0.346431665734j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.0722691102112-0.602200129581j)*x_ref[2]**o + ((0.705489007456-0.346431665734j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.92331961505+0.508202491108j)*x[2]**o + ((0.0435316118154+0.858190472301j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.92331961505+0.508202491108j)*x_ref[2]**o + ((0.0435316118154+0.858190472301j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.867403821494-0.894075246911j)*x[2]**o + ((-0.843181271426-0.585932385186j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.867403821494-0.894075246911j)*x_ref[2]**o + ((-0.843181271426-0.585932385186j))*x_ref[2]
+            arg[(1, 3, 0, 0)]+=(0.275214712132+0.232726716553j)*x[2]**o + ((-0.149673574578+0.023887214875j))*x[2]
+            ref[(1, 3, 0, 0)]+=(0.275214712132+0.232726716553j)*x_ref[2]**o + ((-0.149673574578+0.023887214875j))*x_ref[2]
+            arg[(1, 3, 0, 1)]+=(-0.984089814715+0.56793203675j)*x[2]**o + ((0.239112840293-0.825081129289j))*x[2]
+            ref[(1, 3, 0, 1)]+=(-0.984089814715+0.56793203675j)*x_ref[2]**o + ((0.239112840293-0.825081129289j))*x_ref[2]
+            arg[(1, 3, 1, 0)]+=(0.282243072258-0.124319334958j)*x[2]**o + ((0.485381687804+0.347323545102j))*x[2]
+            ref[(1, 3, 1, 0)]+=(0.282243072258-0.124319334958j)*x_ref[2]**o + ((0.485381687804+0.347323545102j))*x_ref[2]
+            arg[(1, 3, 1, 1)]+=(0.403807564274-0.642107958983j)*x[2]**o + ((-0.481143031834+0.376619821545j))*x[2]
+            ref[(1, 3, 1, 1)]+=(0.403807564274-0.642107958983j)*x_ref[2]**o + ((-0.481143031834+0.376619821545j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.00168380246065+0.643849078888j)*x[2]**o + ((-0.396974701432+0.151193621301j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.00168380246065+0.643849078888j)*x_ref[2]**o + ((-0.396974701432+0.151193621301j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.363879992789+0.994240393948j)*x[2]**o + ((0.257824860961-0.782424079272j))*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.363879992789+0.994240393948j)*x_ref[2]**o + ((0.257824860961-0.782424079272j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.12912550917+0.811071386026j)*x[2]**o + ((0.290618842593+0.962080076786j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.12912550917+0.811071386026j)*x_ref[2]**o + ((0.290618842593+0.962080076786j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.637878588888+0.00815940179507j)*x[2]**o + ((-0.527704185254-0.401306790603j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.637878588888+0.00815940179507j)*x_ref[2]**o + ((-0.527704185254-0.401306790603j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.520625312014-0.944809462145j)*x[2]**o + ((-0.432672088366+0.258722763996j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.520625312014-0.944809462145j)*x_ref[2]**o + ((-0.432672088366+0.258722763996j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.193121402939+0.477278727175j)*x[2]**o + ((0.482008640488-0.139489341146j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.193121402939+0.477278727175j)*x_ref[2]**o + ((0.482008640488-0.139489341146j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.127512144189+0.564483030357j)*x[2]**o + ((0.704942832164-0.0644583071418j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.127512144189+0.564483030357j)*x_ref[2]**o + ((0.704942832164-0.0644583071418j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.986598763402-0.843592708757j)*x[2]**o + ((-0.201865946165+0.1102175514j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.986598763402-0.843592708757j)*x_ref[2]**o + ((-0.201865946165+0.1102175514j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.847126211862+0.244636935637j)*x[2]**o + ((-0.92679667162+0.674331915882j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.847126211862+0.244636935637j)*x_ref[2]**o + ((-0.92679667162+0.674331915882j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(0.324498700088-0.644605009218j)*x[2]**o + ((-0.680898475653+0.292537248253j))*x[2]
+            ref[(2, 2, 0, 1)]+=(0.324498700088-0.644605009218j)*x_ref[2]**o + ((-0.680898475653+0.292537248253j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(0.840452682093+0.29023200495j)*x[2]**o + ((-0.0673135216142+0.789547612454j))*x[2]
+            ref[(2, 2, 1, 0)]+=(0.840452682093+0.29023200495j)*x_ref[2]**o + ((-0.0673135216142+0.789547612454j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.371686078222+0.603552006515j)*x[2]**o + ((0.558620513535+0.150160828239j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.371686078222+0.603552006515j)*x_ref[2]**o + ((0.558620513535+0.150160828239j))*x_ref[2]
+            arg[(2, 3, 0, 0)]+=(-0.607711193956+0.493353640196j)*x[2]**o + ((-0.83604006745-0.687585080996j))*x[2]
+            ref[(2, 3, 0, 0)]+=(-0.607711193956+0.493353640196j)*x_ref[2]**o + ((-0.83604006745-0.687585080996j))*x_ref[2]
+            arg[(2, 3, 0, 1)]+=(-0.596820901756-0.529385984943j)*x[2]**o + ((0.082193066786+0.877836550271j))*x[2]
+            ref[(2, 3, 0, 1)]+=(-0.596820901756-0.529385984943j)*x_ref[2]**o + ((0.082193066786+0.877836550271j))*x_ref[2]
+            arg[(2, 3, 1, 0)]+=(-0.0753535489214-0.716397821228j)*x[2]**o + ((-0.238620022168-0.507331222072j))*x[2]
+            ref[(2, 3, 1, 0)]+=(-0.0753535489214-0.716397821228j)*x_ref[2]**o + ((-0.238620022168-0.507331222072j))*x_ref[2]
+            arg[(2, 3, 1, 1)]+=(-0.748972024976+0.768605484396j)*x[2]**o + ((-0.925163569885-0.742309627826j))*x[2]
+            ref[(2, 3, 1, 1)]+=(-0.748972024976+0.768605484396j)*x_ref[2]**o + ((-0.925163569885-0.742309627826j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(0.516434353414-0.944074918698j)*x[2]**o + ((0.244486353966-0.611313975245j))*x[2]
+            ref[(3, 0, 0, 0)]+=(0.516434353414-0.944074918698j)*x_ref[2]**o + ((0.244486353966-0.611313975245j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.123216200743+0.375494835354j)*x[2]**o + ((0.455661290771-0.719144157377j))*x[2]
+            ref[(3, 0, 0, 1)]+=(0.123216200743+0.375494835354j)*x_ref[2]**o + ((0.455661290771-0.719144157377j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.906912269465+0.439803171477j)*x[2]**o + ((-0.458556367232+0.212411140737j))*x[2]
+            ref[(3, 0, 1, 0)]+=(0.906912269465+0.439803171477j)*x_ref[2]**o + ((-0.458556367232+0.212411140737j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(-0.270440786213+0.965628166411j)*x[2]**o + ((0.275434725809+0.718980899034j))*x[2]
+            ref[(3, 0, 1, 1)]+=(-0.270440786213+0.965628166411j)*x_ref[2]**o + ((0.275434725809+0.718980899034j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(0.511903938392+0.793162558902j)*x[2]**o + ((-0.114882212075-0.868553545675j))*x[2]
+            ref[(3, 1, 0, 0)]+=(0.511903938392+0.793162558902j)*x_ref[2]**o + ((-0.114882212075-0.868553545675j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.197395139639-0.61647862773j)*x[2]**o + ((0.985789840079+0.267096314463j))*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.197395139639-0.61647862773j)*x_ref[2]**o + ((0.985789840079+0.267096314463j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.989048095814-0.141013281501j)*x[2]**o + ((0.473616922216-0.684815928774j))*x[2]
+            ref[(3, 1, 1, 0)]+=(0.989048095814-0.141013281501j)*x_ref[2]**o + ((0.473616922216-0.684815928774j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(-0.622238699852-0.268949077491j)*x[2]**o + ((-0.952261494293+0.632440377193j))*x[2]
+            ref[(3, 1, 1, 1)]+=(-0.622238699852-0.268949077491j)*x_ref[2]**o + ((-0.952261494293+0.632440377193j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(0.326479238702+0.880645296756j)*x[2]**o + ((0.368973918634+0.544074491598j))*x[2]
+            ref[(3, 2, 0, 0)]+=(0.326479238702+0.880645296756j)*x_ref[2]**o + ((0.368973918634+0.544074491598j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(-0.973223526188+0.496890910524j)*x[2]**o + ((-0.43763540946-0.251457339087j))*x[2]
+            ref[(3, 2, 0, 1)]+=(-0.973223526188+0.496890910524j)*x_ref[2]**o + ((-0.43763540946-0.251457339087j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.54015329954+0.669812916352j)*x[2]**o + ((0.685946364288+0.0891606089813j))*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.54015329954+0.669812916352j)*x_ref[2]**o + ((0.685946364288+0.0891606089813j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(-0.0700352839651+0.794673010107j)*x[2]**o + ((-0.440536884277+0.00595695199498j))*x[2]
+            ref[(3, 2, 1, 1)]+=(-0.0700352839651+0.794673010107j)*x_ref[2]**o + ((-0.440536884277+0.00595695199498j))*x_ref[2]
+            arg[(3, 3, 0, 0)]+=(0.681098960616+0.112515443781j)*x[2]**o + ((-0.139823429545-0.079629051321j))*x[2]
+            ref[(3, 3, 0, 0)]+=(0.681098960616+0.112515443781j)*x_ref[2]**o + ((-0.139823429545-0.079629051321j))*x_ref[2]
+            arg[(3, 3, 0, 1)]+=(0.832105876112-0.354186112042j)*x[2]**o + ((0.225973095782-0.544762327998j))*x[2]
+            ref[(3, 3, 0, 1)]+=(0.832105876112-0.354186112042j)*x_ref[2]**o + ((0.225973095782-0.544762327998j))*x_ref[2]
+            arg[(3, 3, 1, 0)]+=(-0.356206023778+0.109789244047j)*x[2]**o + ((0.968106045169+0.538533218112j))*x[2]
+            ref[(3, 3, 1, 0)]+=(-0.356206023778+0.109789244047j)*x_ref[2]**o + ((0.968106045169+0.538533218112j))*x_ref[2]
+            arg[(3, 3, 1, 1)]+=(-0.292923583635+0.370576055222j)*x[2]**o + ((0.473938794139+0.544794858013j))*x[2]
+            ref[(3, 3, 1, 1)]+=(-0.292923583635+0.370576055222j)*x_ref[2]**o + ((0.473938794139+0.544794858013j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.993183623419+0.0519606499032j)*x[0]**o + ((-0.41129664194-0.364927557742j))*x[0] + ((0.719525339314+0.683482723863j))*x[1]**o + ((-0.826752426762-0.187898483682j))*x[1]
+        ref=(-0.993183623419+0.0519606499032j)*x_ref[0]**o + ((-0.41129664194-0.364927557742j))*x_ref[0] + ((0.719525339314+0.683482723863j))*x_ref[1]**o + ((-0.826752426762-0.187898483682j))*x_ref[1]
+        if dim==3:
+            arg+=((0.203837175531+0.0728129482051j))*x[2]**o + ((-0.734067548172+0.124359291279j))*x[2]
+            ref+=((0.203837175531+0.0728129482051j))*x_ref[2]**o + ((-0.734067548172+0.124359291279j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(0.460119764054+0.696469804544j)*x[0]**o + ((0.178921828815-0.785099538562j))*x[0] + ((0.612749797618+0.362466330587j))*x[1]**o + ((0.589442085377-0.472415979687j))*x[1]
+        ref[(0,)]=(0.460119764054+0.696469804544j)*x_ref[0]**o + ((0.178921828815-0.785099538562j))*x_ref[0] + ((0.612749797618+0.362466330587j))*x_ref[1]**o + ((0.589442085377-0.472415979687j))*x_ref[1]
+        arg[(1,)]=(0.874312729139-0.368385243797j)*x[0]**o + ((0.319612639199+0.154516053922j))*x[0] + ((0.687738674899-0.18723242888j))*x[1]**o + ((-0.737598187815-0.786129029425j))*x[1]
+        ref[(1,)]=(0.874312729139-0.368385243797j)*x_ref[0]**o + ((0.319612639199+0.154516053922j))*x_ref[0] + ((0.687738674899-0.18723242888j))*x_ref[1]**o + ((-0.737598187815-0.786129029425j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.825833405874+0.819728515876j)*x[2]**o + ((0.655798063884+0.56332472889j))*x[2]
+            ref[(0,)]+=(-0.825833405874+0.819728515876j)*x_ref[2]**o + ((0.655798063884+0.56332472889j))*x_ref[2]
+            arg[(1,)]+=(-0.47399515888-0.96340566722j)*x[2]**o + ((-0.801006165724+0.473542298113j))*x[2]
+            ref[(1,)]+=(-0.47399515888-0.96340566722j)*x_ref[2]**o + ((-0.801006165724+0.473542298113j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=(0.651214383148-0.986312711324j)*x[0]**o + ((0.350913157991-0.665517900039j))*x[0] + ((-0.466864089912-0.470147708637j))*x[1]**o + ((0.717647574193+0.738374086673j))*x[1]
+        ref[(0, 0)]=(0.651214383148-0.986312711324j)*x_ref[0]**o + ((0.350913157991-0.665517900039j))*x_ref[0] + ((-0.466864089912-0.470147708637j))*x_ref[1]**o + ((0.717647574193+0.738374086673j))*x_ref[1]
+        arg[(0, 1)]=(0.480614768022-0.341282794401j)*x[0]**o + ((0.989573857286+0.967220116759j))*x[0] + ((-0.980190844893-0.677152891106j))*x[1]**o + ((-0.903257233976+0.629720985989j))*x[1]
+        ref[(0, 1)]=(0.480614768022-0.341282794401j)*x_ref[0]**o + ((0.989573857286+0.967220116759j))*x_ref[0] + ((-0.980190844893-0.677152891106j))*x_ref[1]**o + ((-0.903257233976+0.629720985989j))*x_ref[1]
+        arg[(0, 2)]=(0.584003928684+0.669888543177j)*x[0]**o + ((-0.113247711728+0.812674407128j))*x[0] + ((0.619052130106-0.422829299397j))*x[1]**o + ((0.104317696016+0.593447613376j))*x[1]
+        ref[(0, 2)]=(0.584003928684+0.669888543177j)*x_ref[0]**o + ((-0.113247711728+0.812674407128j))*x_ref[0] + ((0.619052130106-0.422829299397j))*x_ref[1]**o + ((0.104317696016+0.593447613376j))*x_ref[1]
+        arg[(0, 3)]=(-0.787619816939+0.312347018938j)*x[0]**o + ((0.521969910293+0.119188794083j))*x[0] + ((0.707545587351-0.435898076938j))*x[1]**o + ((0.808330653834+0.115983953828j))*x[1]
+        ref[(0, 3)]=(-0.787619816939+0.312347018938j)*x_ref[0]**o + ((0.521969910293+0.119188794083j))*x_ref[0] + ((0.707545587351-0.435898076938j))*x_ref[1]**o + ((0.808330653834+0.115983953828j))*x_ref[1]
+        arg[(1, 0)]=(0.265402200491+0.867384574361j)*x[0]**o + ((0.825901677831-0.0110616955962j))*x[0] + ((-0.636130181697+0.957581624176j))*x[1]**o + ((0.290131930642+0.566887157657j))*x[1]
+        ref[(1, 0)]=(0.265402200491+0.867384574361j)*x_ref[0]**o + ((0.825901677831-0.0110616955962j))*x_ref[0] + ((-0.636130181697+0.957581624176j))*x_ref[1]**o + ((0.290131930642+0.566887157657j))*x_ref[1]
+        arg[(1, 1)]=(-0.199783629984-0.716708624537j)*x[0]**o + ((0.104386919211+0.439164711816j))*x[0] + ((0.902887660953+0.386873976321j))*x[1]**o + ((0.38967949571+0.753971387388j))*x[1]
+        ref[(1, 1)]=(-0.199783629984-0.716708624537j)*x_ref[0]**o + ((0.104386919211+0.439164711816j))*x_ref[0] + ((0.902887660953+0.386873976321j))*x_ref[1]**o + ((0.38967949571+0.753971387388j))*x_ref[1]
+        arg[(1, 2)]=(-0.14994581252+0.380227836262j)*x[0]**o + ((0.194258990801-0.771396501081j))*x[0] + ((0.133078230848-0.944991717652j))*x[1]**o + ((-0.646111238502+0.332086036971j))*x[1]
+        ref[(1, 2)]=(-0.14994581252+0.380227836262j)*x_ref[0]**o + ((0.194258990801-0.771396501081j))*x_ref[0] + ((0.133078230848-0.944991717652j))*x_ref[1]**o + ((-0.646111238502+0.332086036971j))*x_ref[1]
+        arg[(1, 3)]=(0.109338272917-0.93954170978j)*x[0]**o + ((0.618545177323-0.326838992235j))*x[0] + ((-0.0632600104033+0.132580390808j))*x[1]**o + ((0.506668782624+0.827605340937j))*x[1]
+        ref[(1, 3)]=(0.109338272917-0.93954170978j)*x_ref[0]**o + ((0.618545177323-0.326838992235j))*x_ref[0] + ((-0.0632600104033+0.132580390808j))*x_ref[1]**o + ((0.506668782624+0.827605340937j))*x_ref[1]
+        arg[(2, 0)]=(-0.496361742019+0.770400631228j)*x[0]**o + ((-0.827827924253+0.392300532813j))*x[0] + ((0.317142426356+0.763509468814j))*x[1]**o + ((0.0056254417554+0.907746496037j))*x[1]
+        ref[(2, 0)]=(-0.496361742019+0.770400631228j)*x_ref[0]**o + ((-0.827827924253+0.392300532813j))*x_ref[0] + ((0.317142426356+0.763509468814j))*x_ref[1]**o + ((0.0056254417554+0.907746496037j))*x_ref[1]
+        arg[(2, 1)]=(0.694474262725+0.135679944093j)*x[0]**o + ((0.979639731911-0.974620349904j))*x[0] + ((-0.976934983806-0.26263164306j))*x[1]**o + ((-0.155755678166+0.894710296273j))*x[1]
+        ref[(2, 1)]=(0.694474262725+0.135679944093j)*x_ref[0]**o + ((0.979639731911-0.974620349904j))*x_ref[0] + ((-0.976934983806-0.26263164306j))*x_ref[1]**o + ((-0.155755678166+0.894710296273j))*x_ref[1]
+        arg[(2, 2)]=(0.289775107568+0.29763874764j)*x[0]**o + ((0.771651720367-0.176403755823j))*x[0] + ((-0.744954102163-0.171482252023j))*x[1]**o + ((-0.881357416089-0.173256645726j))*x[1]
+        ref[(2, 2)]=(0.289775107568+0.29763874764j)*x_ref[0]**o + ((0.771651720367-0.176403755823j))*x_ref[0] + ((-0.744954102163-0.171482252023j))*x_ref[1]**o + ((-0.881357416089-0.173256645726j))*x_ref[1]
+        arg[(2, 3)]=(0.30110164526+0.39899644807j)*x[0]**o + ((0.986942511436-0.691323396177j))*x[0] + ((-0.617295787168-0.967493486162j))*x[1]**o + ((0.608076732635-0.283073747719j))*x[1]
+        ref[(2, 3)]=(0.30110164526+0.39899644807j)*x_ref[0]**o + ((0.986942511436-0.691323396177j))*x_ref[0] + ((-0.617295787168-0.967493486162j))*x_ref[1]**o + ((0.608076732635-0.283073747719j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.423779444028-0.650801748195j)*x[2]**o + ((-0.124060537817+0.639514591789j))*x[2]
+            ref[(0, 0)]+=(0.423779444028-0.650801748195j)*x_ref[2]**o + ((-0.124060537817+0.639514591789j))*x_ref[2]
+            arg[(0, 1)]+=(-0.48947206096-0.32801952667j)*x[2]**o + ((0.308924204014-0.0810133586262j))*x[2]
+            ref[(0, 1)]+=(-0.48947206096-0.32801952667j)*x_ref[2]**o + ((0.308924204014-0.0810133586262j))*x_ref[2]
+            arg[(0, 2)]+=(0.34285236581+0.872555648688j)*x[2]**o + ((0.978908384622+0.9041385004j))*x[2]
+            ref[(0, 2)]+=(0.34285236581+0.872555648688j)*x_ref[2]**o + ((0.978908384622+0.9041385004j))*x_ref[2]
+            arg[(0, 3)]+=(0.230966766272+0.0887350942577j)*x[2]**o + ((0.844333928654+0.858515408085j))*x[2]
+            ref[(0, 3)]+=(0.230966766272+0.0887350942577j)*x_ref[2]**o + ((0.844333928654+0.858515408085j))*x_ref[2]
+            arg[(1, 0)]+=(0.549577408651-0.547826960768j)*x[2]**o + ((-0.829155638343-0.231296830728j))*x[2]
+            ref[(1, 0)]+=(0.549577408651-0.547826960768j)*x_ref[2]**o + ((-0.829155638343-0.231296830728j))*x_ref[2]
+            arg[(1, 1)]+=(0.575867364239+0.939199939384j)*x[2]**o + ((-0.237274815696-0.561747389916j))*x[2]
+            ref[(1, 1)]+=(0.575867364239+0.939199939384j)*x_ref[2]**o + ((-0.237274815696-0.561747389916j))*x_ref[2]
+            arg[(1, 2)]+=(0.946223828484-0.712726147585j)*x[2]**o + ((0.243842950144-0.537923550679j))*x[2]
+            ref[(1, 2)]+=(0.946223828484-0.712726147585j)*x_ref[2]**o + ((0.243842950144-0.537923550679j))*x_ref[2]
+            arg[(1, 3)]+=(0.278434722252-0.872467952433j)*x[2]**o + ((0.640241629043+0.277207345775j))*x[2]
+            ref[(1, 3)]+=(0.278434722252-0.872467952433j)*x_ref[2]**o + ((0.640241629043+0.277207345775j))*x_ref[2]
+            arg[(2, 0)]+=(0.209374041508+0.0654881513814j)*x[2]**o + ((-0.0155003581968-0.37686231208j))*x[2]
+            ref[(2, 0)]+=(0.209374041508+0.0654881513814j)*x_ref[2]**o + ((-0.0155003581968-0.37686231208j))*x_ref[2]
+            arg[(2, 1)]+=(0.426946507472-0.98827308953j)*x[2]**o + ((0.70199860568-0.792370942886j))*x[2]
+            ref[(2, 1)]+=(0.426946507472-0.98827308953j)*x_ref[2]**o + ((0.70199860568-0.792370942886j))*x_ref[2]
+            arg[(2, 2)]+=(0.386411852713-0.493323039942j)*x[2]**o + ((-0.824156991638-0.40449043828j))*x[2]
+            ref[(2, 2)]+=(0.386411852713-0.493323039942j)*x_ref[2]**o + ((-0.824156991638-0.40449043828j))*x_ref[2]
+            arg[(2, 3)]+=(0.684775174239+0.442240272734j)*x[2]**o + ((0.113734133405+0.128150838456j))*x[2]
+            ref[(2, 3)]+=(0.684775174239+0.442240272734j)*x_ref[2]**o + ((0.113734133405+0.128150838456j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2),w_ref)
+        arg[(0, 0, 0)]=(-0.675836295765+0.286411035698j)*x[0]**o + ((-0.775468431828+0.0805215832496j))*x[0] + ((0.882733128694+0.159278563137j))*x[1]**o + ((0.39131564668+0.72375873149j))*x[1]
+        ref[(0, 0, 0)]=(-0.675836295765+0.286411035698j)*x_ref[0]**o + ((-0.775468431828+0.0805215832496j))*x_ref[0] + ((0.882733128694+0.159278563137j))*x_ref[1]**o + ((0.39131564668+0.72375873149j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.469257635125-0.313257403445j)*x[0]**o + ((-0.837162217587+0.315176660498j))*x[0] + ((-0.29192669732+0.512694403194j))*x[1]**o + ((-0.739586651847-0.137820017459j))*x[1]
+        ref[(0, 0, 1)]=(0.469257635125-0.313257403445j)*x_ref[0]**o + ((-0.837162217587+0.315176660498j))*x_ref[0] + ((-0.29192669732+0.512694403194j))*x_ref[1]**o + ((-0.739586651847-0.137820017459j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.612315575079-0.686945961458j)*x[0]**o + ((-0.514560137696-0.227902242349j))*x[0] + ((-0.523183851531-0.668517075848j))*x[1]**o + ((0.360664236565-0.400147428116j))*x[1]
+        ref[(0, 1, 0)]=(-0.612315575079-0.686945961458j)*x_ref[0]**o + ((-0.514560137696-0.227902242349j))*x_ref[0] + ((-0.523183851531-0.668517075848j))*x_ref[1]**o + ((0.360664236565-0.400147428116j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.400230965627+0.0922016553975j)*x[0]**o + ((0.168503846777-0.607066522462j))*x[0] + ((-0.649719055545+0.470783976812j))*x[1]**o + ((-0.165526470769+0.423278487744j))*x[1]
+        ref[(0, 1, 1)]=(0.400230965627+0.0922016553975j)*x_ref[0]**o + ((0.168503846777-0.607066522462j))*x_ref[0] + ((-0.649719055545+0.470783976812j))*x_ref[1]**o + ((-0.165526470769+0.423278487744j))*x_ref[1]
+        arg[(0, 2, 0)]=(-0.787516516983-0.879767918628j)*x[0]**o + ((-0.1798286089+0.372709379047j))*x[0] + ((0.937086526414-0.634560744381j))*x[1]**o + ((0.236645360847-0.202840615407j))*x[1]
+        ref[(0, 2, 0)]=(-0.787516516983-0.879767918628j)*x_ref[0]**o + ((-0.1798286089+0.372709379047j))*x_ref[0] + ((0.937086526414-0.634560744381j))*x_ref[1]**o + ((0.236645360847-0.202840615407j))*x_ref[1]
+        arg[(0, 2, 1)]=(-0.781138328628-0.895844628674j)*x[0]**o + ((-0.498894080487+0.905392717183j))*x[0] + ((-0.648273175251-0.664929555582j))*x[1]**o + ((-0.883144039168+0.433005647382j))*x[1]
+        ref[(0, 2, 1)]=(-0.781138328628-0.895844628674j)*x_ref[0]**o + ((-0.498894080487+0.905392717183j))*x_ref[0] + ((-0.648273175251-0.664929555582j))*x_ref[1]**o + ((-0.883144039168+0.433005647382j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.823600063558+0.416311686355j)*x[0]**o + ((-0.978736193202-0.516522425493j))*x[0] + ((0.76923730759-0.38983067039j))*x[1]**o + ((-0.921503954536-0.575240675471j))*x[1]
+        ref[(1, 0, 0)]=(0.823600063558+0.416311686355j)*x_ref[0]**o + ((-0.978736193202-0.516522425493j))*x_ref[0] + ((0.76923730759-0.38983067039j))*x_ref[1]**o + ((-0.921503954536-0.575240675471j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.292610129216+0.673083261878j)*x[0]**o + ((-0.0458375220145-0.569374891743j))*x[0] + ((0.380560482338-0.0271577767829j))*x[1]**o + ((0.655891403737+0.45222969113j))*x[1]
+        ref[(1, 0, 1)]=(0.292610129216+0.673083261878j)*x_ref[0]**o + ((-0.0458375220145-0.569374891743j))*x_ref[0] + ((0.380560482338-0.0271577767829j))*x_ref[1]**o + ((0.655891403737+0.45222969113j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.322129837922+0.959676459169j)*x[0]**o + ((-0.710096970322-0.952193092235j))*x[0] + ((0.247464925572-0.951249858104j))*x[1]**o + ((0.837878253154+0.437952637808j))*x[1]
+        ref[(1, 1, 0)]=(0.322129837922+0.959676459169j)*x_ref[0]**o + ((-0.710096970322-0.952193092235j))*x_ref[0] + ((0.247464925572-0.951249858104j))*x_ref[1]**o + ((0.837878253154+0.437952637808j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.893195162841+0.441134514626j)*x[0]**o + ((-0.634642846604+0.906433590056j))*x[0] + ((0.375402945302+0.253309907008j))*x[1]**o + ((0.987756025389-0.830455088918j))*x[1]
+        ref[(1, 1, 1)]=(-0.893195162841+0.441134514626j)*x_ref[0]**o + ((-0.634642846604+0.906433590056j))*x_ref[0] + ((0.375402945302+0.253309907008j))*x_ref[1]**o + ((0.987756025389-0.830455088918j))*x_ref[1]
+        arg[(1, 2, 0)]=(0.187010062414+0.222674206298j)*x[0]**o + ((0.543609211408-0.700796481457j))*x[0] + ((0.225909692367-0.594913319975j))*x[1]**o + ((0.579786657826+0.941142613022j))*x[1]
+        ref[(1, 2, 0)]=(0.187010062414+0.222674206298j)*x_ref[0]**o + ((0.543609211408-0.700796481457j))*x_ref[0] + ((0.225909692367-0.594913319975j))*x_ref[1]**o + ((0.579786657826+0.941142613022j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.183353044979-0.973702907837j)*x[0]**o + ((0.0380405587514-0.76719496051j))*x[0] + ((-0.72168524185+0.616463160613j))*x[1]**o + ((-0.603205739687+0.57464163153j))*x[1]
+        ref[(1, 2, 1)]=(-0.183353044979-0.973702907837j)*x_ref[0]**o + ((0.0380405587514-0.76719496051j))*x_ref[0] + ((-0.72168524185+0.616463160613j))*x_ref[1]**o + ((-0.603205739687+0.57464163153j))*x_ref[1]
+        arg[(2, 0, 0)]=(0.540501359393+0.992711559797j)*x[0]**o + ((-0.2096586597+0.304041083284j))*x[0] + ((-0.289550031801-0.529236449038j))*x[1]**o + ((-0.674306524858-0.390099679585j))*x[1]
+        ref[(2, 0, 0)]=(0.540501359393+0.992711559797j)*x_ref[0]**o + ((-0.2096586597+0.304041083284j))*x_ref[0] + ((-0.289550031801-0.529236449038j))*x_ref[1]**o + ((-0.674306524858-0.390099679585j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.45232869289+0.499575970244j)*x[0]**o + ((0.424167612556+0.396367850021j))*x[0] + ((-0.284576792816-0.602204641178j))*x[1]**o + ((0.354406785285-0.662299986596j))*x[1]
+        ref[(2, 0, 1)]=(-0.45232869289+0.499575970244j)*x_ref[0]**o + ((0.424167612556+0.396367850021j))*x_ref[0] + ((-0.284576792816-0.602204641178j))*x_ref[1]**o + ((0.354406785285-0.662299986596j))*x_ref[1]
+        arg[(2, 1, 0)]=(-0.915457922547+0.985498333486j)*x[0]**o + ((-0.998416205375+0.29543940246j))*x[0] + ((-0.824264281556+0.871255369786j))*x[1]**o + ((0.964045305376+0.0676385936508j))*x[1]
+        ref[(2, 1, 0)]=(-0.915457922547+0.985498333486j)*x_ref[0]**o + ((-0.998416205375+0.29543940246j))*x_ref[0] + ((-0.824264281556+0.871255369786j))*x_ref[1]**o + ((0.964045305376+0.0676385936508j))*x_ref[1]
+        arg[(2, 1, 1)]=(0.999200620307-0.651610724549j)*x[0]**o + ((-0.563459002169-0.154786773129j))*x[0] + ((-0.445479544412+0.911417735812j))*x[1]**o + ((0.573738202591-0.630639280395j))*x[1]
+        ref[(2, 1, 1)]=(0.999200620307-0.651610724549j)*x_ref[0]**o + ((-0.563459002169-0.154786773129j))*x_ref[0] + ((-0.445479544412+0.911417735812j))*x_ref[1]**o + ((0.573738202591-0.630639280395j))*x_ref[1]
+        arg[(2, 2, 0)]=(-0.0355021037327+0.244441230902j)*x[0]**o + ((-0.342041412633-0.102122972045j))*x[0] + ((0.681649234829+0.023785132842j))*x[1]**o + ((0.106077444433+0.195691642094j))*x[1]
+        ref[(2, 2, 0)]=(-0.0355021037327+0.244441230902j)*x_ref[0]**o + ((-0.342041412633-0.102122972045j))*x_ref[0] + ((0.681649234829+0.023785132842j))*x_ref[1]**o + ((0.106077444433+0.195691642094j))*x_ref[1]
+        arg[(2, 2, 1)]=(-0.480183765466-0.0574023119632j)*x[0]**o + ((-0.625023311-0.294836775959j))*x[0] + ((0.276483890842+0.687767589142j))*x[1]**o + ((0.850003101603+0.0732468027815j))*x[1]
+        ref[(2, 2, 1)]=(-0.480183765466-0.0574023119632j)*x_ref[0]**o + ((-0.625023311-0.294836775959j))*x_ref[0] + ((0.276483890842+0.687767589142j))*x_ref[1]**o + ((0.850003101603+0.0732468027815j))*x_ref[1]
+        arg[(3, 0, 0)]=(0.294570333324-0.429223950771j)*x[0]**o + ((0.545751800824-0.949881839182j))*x[0] + ((-0.814216233699+0.516556696854j))*x[1]**o + ((0.171998658753+0.584794128971j))*x[1]
+        ref[(3, 0, 0)]=(0.294570333324-0.429223950771j)*x_ref[0]**o + ((0.545751800824-0.949881839182j))*x_ref[0] + ((-0.814216233699+0.516556696854j))*x_ref[1]**o + ((0.171998658753+0.584794128971j))*x_ref[1]
+        arg[(3, 0, 1)]=(0.444118117515+0.925291204213j)*x[0]**o + ((0.594458430134-0.0977331714255j))*x[0] + ((0.511956912018-0.541649465374j))*x[1]**o + ((0.285518344737-0.0787742122737j))*x[1]
+        ref[(3, 0, 1)]=(0.444118117515+0.925291204213j)*x_ref[0]**o + ((0.594458430134-0.0977331714255j))*x_ref[0] + ((0.511956912018-0.541649465374j))*x_ref[1]**o + ((0.285518344737-0.0787742122737j))*x_ref[1]
+        arg[(3, 1, 0)]=(-0.176403764976-0.0851014411586j)*x[0]**o + ((0.323667566496-0.589122868377j))*x[0] + ((-0.823872546749+0.64087249069j))*x[1]**o + ((-0.980863968931+0.643138817223j))*x[1]
+        ref[(3, 1, 0)]=(-0.176403764976-0.0851014411586j)*x_ref[0]**o + ((0.323667566496-0.589122868377j))*x_ref[0] + ((-0.823872546749+0.64087249069j))*x_ref[1]**o + ((-0.980863968931+0.643138817223j))*x_ref[1]
+        arg[(3, 1, 1)]=(-0.129792770508+0.482406643853j)*x[0]**o + ((0.614784727007-0.0569828531763j))*x[0] + ((-0.543009389481+0.556138110066j))*x[1]**o + ((-0.573924937117-0.112773255368j))*x[1]
+        ref[(3, 1, 1)]=(-0.129792770508+0.482406643853j)*x_ref[0]**o + ((0.614784727007-0.0569828531763j))*x_ref[0] + ((-0.543009389481+0.556138110066j))*x_ref[1]**o + ((-0.573924937117-0.112773255368j))*x_ref[1]
+        arg[(3, 2, 0)]=(0.267198090183-0.929536251314j)*x[0]**o + ((-0.171662525492+0.79479963477j))*x[0] + ((0.663250403853-0.787700738665j))*x[1]**o + ((-0.757342857993-0.199658681055j))*x[1]
+        ref[(3, 2, 0)]=(0.267198090183-0.929536251314j)*x_ref[0]**o + ((-0.171662525492+0.79479963477j))*x_ref[0] + ((0.663250403853-0.787700738665j))*x_ref[1]**o + ((-0.757342857993-0.199658681055j))*x_ref[1]
+        arg[(3, 2, 1)]=(-0.490405378804+0.270537680383j)*x[0]**o + ((-0.696626939822-0.0898474583213j))*x[0] + ((0.395125775665+0.300751835827j))*x[1]**o + ((0.821710429473+0.456878473726j))*x[1]
+        ref[(3, 2, 1)]=(-0.490405378804+0.270537680383j)*x_ref[0]**o + ((-0.696626939822-0.0898474583213j))*x_ref[0] + ((0.395125775665+0.300751835827j))*x_ref[1]**o + ((0.821710429473+0.456878473726j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.341194732152+0.53077870343j)*x[2]**o + ((-0.119029921222+0.899230572052j))*x[2]
+            ref[(0, 0, 0)]+=(-0.341194732152+0.53077870343j)*x_ref[2]**o + ((-0.119029921222+0.899230572052j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.691351831766+0.245680818481j)*x[2]**o + ((0.975846198916-0.344310056635j))*x[2]
+            ref[(0, 0, 1)]+=(0.691351831766+0.245680818481j)*x_ref[2]**o + ((0.975846198916-0.344310056635j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.631981598319+0.70138837639j)*x[2]**o + ((0.764530769477-0.590676568672j))*x[2]
+            ref[(0, 1, 0)]+=(0.631981598319+0.70138837639j)*x_ref[2]**o + ((0.764530769477-0.590676568672j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.912992738252+0.609050116415j)*x[2]**o + ((-0.887302273825-0.168667842629j))*x[2]
+            ref[(0, 1, 1)]+=(0.912992738252+0.609050116415j)*x_ref[2]**o + ((-0.887302273825-0.168667842629j))*x_ref[2]
+            arg[(0, 2, 0)]+=(0.00267585555753-0.396533196649j)*x[2]**o + ((-0.52528741052-0.428552201193j))*x[2]
+            ref[(0, 2, 0)]+=(0.00267585555753-0.396533196649j)*x_ref[2]**o + ((-0.52528741052-0.428552201193j))*x_ref[2]
+            arg[(0, 2, 1)]+=(-0.994900890572-0.305147121415j)*x[2]**o + ((-0.754353360907+0.944054806705j))*x[2]
+            ref[(0, 2, 1)]+=(-0.994900890572-0.305147121415j)*x_ref[2]**o + ((-0.754353360907+0.944054806705j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.845911501673+0.305386507517j)*x[2]**o + ((0.304843419989-0.346087893299j))*x[2]
+            ref[(1, 0, 0)]+=(0.845911501673+0.305386507517j)*x_ref[2]**o + ((0.304843419989-0.346087893299j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.497292303675-0.000457193303672j)*x[2]**o + ((0.221430315029+0.946801618077j))*x[2]
+            ref[(1, 0, 1)]+=(0.497292303675-0.000457193303672j)*x_ref[2]**o + ((0.221430315029+0.946801618077j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.16292089351-0.39370070213j)*x[2]**o + ((0.458563000333+0.0957941137625j))*x[2]
+            ref[(1, 1, 0)]+=(0.16292089351-0.39370070213j)*x_ref[2]**o + ((0.458563000333+0.0957941137625j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.874860467744+0.92271032897j)*x[2]**o + ((0.692986568617-0.791863844297j))*x[2]
+            ref[(1, 1, 1)]+=(0.874860467744+0.92271032897j)*x_ref[2]**o + ((0.692986568617-0.791863844297j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.872139051187-0.552601971199j)*x[2]**o + ((-0.189437009165+0.145809804241j))*x[2]
+            ref[(1, 2, 0)]+=(0.872139051187-0.552601971199j)*x_ref[2]**o + ((-0.189437009165+0.145809804241j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.591122469677+0.375738472014j)*x[2]**o + ((-0.221409631439-0.055419696477j))*x[2]
+            ref[(1, 2, 1)]+=(-0.591122469677+0.375738472014j)*x_ref[2]**o + ((-0.221409631439-0.055419696477j))*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.295442478183-0.611791049015j)*x[2]**o + ((-0.204978051583+0.708488137928j))*x[2]
+            ref[(2, 0, 0)]+=(-0.295442478183-0.611791049015j)*x_ref[2]**o + ((-0.204978051583+0.708488137928j))*x_ref[2]
+            arg[(2, 0, 1)]+=(0.716314508556-0.350239855814j)*x[2]**o + ((-0.181695399767-0.608990544113j))*x[2]
+            ref[(2, 0, 1)]+=(0.716314508556-0.350239855814j)*x_ref[2]**o + ((-0.181695399767-0.608990544113j))*x_ref[2]
+            arg[(2, 1, 0)]+=(0.766512474077-0.997520627617j)*x[2]**o + ((0.247961285767-0.847971047682j))*x[2]
+            ref[(2, 1, 0)]+=(0.766512474077-0.997520627617j)*x_ref[2]**o + ((0.247961285767-0.847971047682j))*x_ref[2]
+            arg[(2, 1, 1)]+=(-0.898348981888+0.71530579577j)*x[2]**o + ((0.572450570306+0.584951051575j))*x[2]
+            ref[(2, 1, 1)]+=(-0.898348981888+0.71530579577j)*x_ref[2]**o + ((0.572450570306+0.584951051575j))*x_ref[2]
+            arg[(2, 2, 0)]+=(0.0427591365684+0.770551025984j)*x[2]**o + ((0.571103909483+0.748770673081j))*x[2]
+            ref[(2, 2, 0)]+=(0.0427591365684+0.770551025984j)*x_ref[2]**o + ((0.571103909483+0.748770673081j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.710259429439+0.862862907476j)*x[2]**o + ((-0.957750254165+0.00720233890993j))*x[2]
+            ref[(2, 2, 1)]+=(0.710259429439+0.862862907476j)*x_ref[2]**o + ((-0.957750254165+0.00720233890993j))*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.434259169364+0.19303995176j)*x[2]**o + ((0.504044886702+0.136727085406j))*x[2]
+            ref[(3, 0, 0)]+=(-0.434259169364+0.19303995176j)*x_ref[2]**o + ((0.504044886702+0.136727085406j))*x_ref[2]
+            arg[(3, 0, 1)]+=(-0.386143179913-0.160502382111j)*x[2]**o + ((0.906677915788+0.898808312429j))*x[2]
+            ref[(3, 0, 1)]+=(-0.386143179913-0.160502382111j)*x_ref[2]**o + ((0.906677915788+0.898808312429j))*x_ref[2]
+            arg[(3, 1, 0)]+=(-0.334034789681-0.57796486648j)*x[2]**o + ((0.000910154459598+0.252881864122j))*x[2]
+            ref[(3, 1, 0)]+=(-0.334034789681-0.57796486648j)*x_ref[2]**o + ((0.000910154459598+0.252881864122j))*x_ref[2]
+            arg[(3, 1, 1)]+=(0.555946723906+0.995111304601j)*x[2]**o + ((-0.447968321334-0.166678498126j))*x[2]
+            ref[(3, 1, 1)]+=(0.555946723906+0.995111304601j)*x_ref[2]**o + ((-0.447968321334-0.166678498126j))*x_ref[2]
+            arg[(3, 2, 0)]+=(0.012556619589-0.114650455536j)*x[2]**o + ((0.783248725579-0.790916158987j))*x[2]
+            ref[(3, 2, 0)]+=(0.012556619589-0.114650455536j)*x_ref[2]**o + ((0.783248725579-0.790916158987j))*x_ref[2]
+            arg[(3, 2, 1)]+=(-0.671961445832-0.584089071116j)*x[2]**o + ((-0.482571156205-0.37960724725j))*x[2]
+            ref[(3, 2, 1)]+=(-0.671961445832-0.584089071116j)*x_ref[2]**o + ((-0.482571156205-0.37960724725j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4, 3),w)
+        ref = Data(0,(4, 3, 4, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.864270902053+0.438079809967j)*x[0]**o + ((-0.424371147328+0.502095706256j))*x[0] + ((-0.962231175325+0.943062474117j))*x[1]**o + ((-0.946753829594+0.445578479774j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.864270902053+0.438079809967j)*x_ref[0]**o + ((-0.424371147328+0.502095706256j))*x_ref[0] + ((-0.962231175325+0.943062474117j))*x_ref[1]**o + ((-0.946753829594+0.445578479774j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.00392009439621+0.766894945818j)*x[0]**o + ((-0.354976506827-0.531810520697j))*x[0] + ((0.989566806355+0.833644872609j))*x[1]**o + ((0.423318506169+0.866044457228j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.00392009439621+0.766894945818j)*x_ref[0]**o + ((-0.354976506827-0.531810520697j))*x_ref[0] + ((0.989566806355+0.833644872609j))*x_ref[1]**o + ((0.423318506169+0.866044457228j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.851099109987+0.713427065181j)*x[0]**o + ((0.493035821404-0.778089072915j))*x[0] + ((-0.335398939708+0.977461340905j))*x[1]**o + ((-0.53213664017-0.445130629773j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.851099109987+0.713427065181j)*x_ref[0]**o + ((0.493035821404-0.778089072915j))*x_ref[0] + ((-0.335398939708+0.977461340905j))*x_ref[1]**o + ((-0.53213664017-0.445130629773j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.104749182074-0.413534167605j)*x[0]**o + ((-0.544242569062-0.580582298376j))*x[0] + ((-0.627322358403+0.768578319334j))*x[1]**o + ((-0.905786583026-0.359593605611j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.104749182074-0.413534167605j)*x_ref[0]**o + ((-0.544242569062-0.580582298376j))*x_ref[0] + ((-0.627322358403+0.768578319334j))*x_ref[1]**o + ((-0.905786583026-0.359593605611j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.365890521236+0.736874135872j)*x[0]**o + ((-0.994792302535+0.415356001462j))*x[0] + ((0.753288096509-0.838899611512j))*x[1]**o + ((-0.929247990146-0.42295668638j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.365890521236+0.736874135872j)*x_ref[0]**o + ((-0.994792302535+0.415356001462j))*x_ref[0] + ((0.753288096509-0.838899611512j))*x_ref[1]**o + ((-0.929247990146-0.42295668638j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.915956464204+0.822908240993j)*x[0]**o + ((0.374299711615-0.727079200375j))*x[0] + ((0.700672766491-0.326325872258j))*x[1]**o + ((0.119755100029+0.397289837563j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.915956464204+0.822908240993j)*x_ref[0]**o + ((0.374299711615-0.727079200375j))*x_ref[0] + ((0.700672766491-0.326325872258j))*x_ref[1]**o + ((0.119755100029+0.397289837563j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.112332505843+0.742351346504j)*x[0]**o + ((0.216978626681-0.883570293569j))*x[0] + ((-0.80040723992+0.294395571794j))*x[1]**o + ((0.73413213888-0.642678218796j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.112332505843+0.742351346504j)*x_ref[0]**o + ((0.216978626681-0.883570293569j))*x_ref[0] + ((-0.80040723992+0.294395571794j))*x_ref[1]**o + ((0.73413213888-0.642678218796j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(-0.907038632508-0.0162077909288j)*x[0]**o + ((0.798019596687+0.742010800501j))*x[0] + ((0.440434557111+0.0360721785038j))*x[1]**o + ((-0.164011907217-0.764713402298j))*x[1]
+        ref[(0, 0, 2, 1)]=(-0.907038632508-0.0162077909288j)*x_ref[0]**o + ((0.798019596687+0.742010800501j))*x_ref[0] + ((0.440434557111+0.0360721785038j))*x_ref[1]**o + ((-0.164011907217-0.764713402298j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.842125891052+0.147925218047j)*x[0]**o + ((-0.50168203633+0.612050335417j))*x[0] + ((0.564701313598-0.166981213959j))*x[1]**o + ((-0.738987056645+0.0974653705882j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.842125891052+0.147925218047j)*x_ref[0]**o + ((-0.50168203633+0.612050335417j))*x_ref[0] + ((0.564701313598-0.166981213959j))*x_ref[1]**o + ((-0.738987056645+0.0974653705882j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(0.598567192812-0.772374116317j)*x[0]**o + ((0.0759867384117+0.217191672784j))*x[0] + ((-0.618712934204-0.210596275744j))*x[1]**o + ((0.988145981923-0.255690712587j))*x[1]
+        ref[(0, 0, 3, 0)]=(0.598567192812-0.772374116317j)*x_ref[0]**o + ((0.0759867384117+0.217191672784j))*x_ref[0] + ((-0.618712934204-0.210596275744j))*x_ref[1]**o + ((0.988145981923-0.255690712587j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(0.651784419771+0.494357563795j)*x[0]**o + ((0.0729381905445-0.75704053471j))*x[0] + ((-0.512149072412+0.218595707244j))*x[1]**o + ((-0.576637536525+0.401988604446j))*x[1]
+        ref[(0, 0, 3, 1)]=(0.651784419771+0.494357563795j)*x_ref[0]**o + ((0.0729381905445-0.75704053471j))*x_ref[0] + ((-0.512149072412+0.218595707244j))*x_ref[1]**o + ((-0.576637536525+0.401988604446j))*x_ref[1]
+        arg[(0, 0, 3, 2)]=(-0.583342824537+0.109782977644j)*x[0]**o + ((0.633049917149-0.822191192912j))*x[0] + ((0.839892184743-0.156260514541j))*x[1]**o + ((0.78390968372-0.196822667829j))*x[1]
+        ref[(0, 0, 3, 2)]=(-0.583342824537+0.109782977644j)*x_ref[0]**o + ((0.633049917149-0.822191192912j))*x_ref[0] + ((0.839892184743-0.156260514541j))*x_ref[1]**o + ((0.78390968372-0.196822667829j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.617618568116-0.271236799449j)*x[0]**o + ((-0.341323154934-0.350625253744j))*x[0] + ((0.783382369025-0.518037141092j))*x[1]**o + ((0.279609690599-0.4586522568j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.617618568116-0.271236799449j)*x_ref[0]**o + ((-0.341323154934-0.350625253744j))*x_ref[0] + ((0.783382369025-0.518037141092j))*x_ref[1]**o + ((0.279609690599-0.4586522568j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(0.545763615242+0.595896371887j)*x[0]**o + ((-0.265357907234+0.295419323511j))*x[0] + ((0.667835951636+0.965179624927j))*x[1]**o + ((0.938815946715-0.542557823614j))*x[1]
+        ref[(0, 1, 0, 1)]=(0.545763615242+0.595896371887j)*x_ref[0]**o + ((-0.265357907234+0.295419323511j))*x_ref[0] + ((0.667835951636+0.965179624927j))*x_ref[1]**o + ((0.938815946715-0.542557823614j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.570797033343-0.697914346385j)*x[0]**o + ((-0.250077029239+0.102641745963j))*x[0] + ((-0.153250013004+0.110794960945j))*x[1]**o + ((-0.429943367512+0.780890287792j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.570797033343-0.697914346385j)*x_ref[0]**o + ((-0.250077029239+0.102641745963j))*x_ref[0] + ((-0.153250013004+0.110794960945j))*x_ref[1]**o + ((-0.429943367512+0.780890287792j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.545966656028-0.441986339791j)*x[0]**o + ((-0.746225797796+0.607535485126j))*x[0] + ((0.211232097735-0.438471718874j))*x[1]**o + ((-0.413843374108+0.799692131565j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.545966656028-0.441986339791j)*x_ref[0]**o + ((-0.746225797796+0.607535485126j))*x_ref[0] + ((0.211232097735-0.438471718874j))*x_ref[1]**o + ((-0.413843374108+0.799692131565j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.357493967123+0.765757423635j)*x[0]**o + ((-0.433513274093+0.188863123234j))*x[0] + ((0.916942392921-0.261851734591j))*x[1]**o + ((-0.229234880345-0.90079886744j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.357493967123+0.765757423635j)*x_ref[0]**o + ((-0.433513274093+0.188863123234j))*x_ref[0] + ((0.916942392921-0.261851734591j))*x_ref[1]**o + ((-0.229234880345-0.90079886744j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.317231157159+0.663757746949j)*x[0]**o + ((0.154530729134-0.116724632364j))*x[0] + ((0.00299627499761-0.57057567383j))*x[1]**o + ((0.507230556094-0.0207500621162j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.317231157159+0.663757746949j)*x_ref[0]**o + ((0.154530729134-0.116724632364j))*x_ref[0] + ((0.00299627499761-0.57057567383j))*x_ref[1]**o + ((0.507230556094-0.0207500621162j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.970229911394-0.256685617002j)*x[0]**o + ((-0.14631360191+0.274577847109j))*x[0] + ((-0.198747880991+0.0313155629696j))*x[1]**o + ((-0.0643490688279-0.718801179021j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.970229911394-0.256685617002j)*x_ref[0]**o + ((-0.14631360191+0.274577847109j))*x_ref[0] + ((-0.198747880991+0.0313155629696j))*x_ref[1]**o + ((-0.0643490688279-0.718801179021j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.808694426353+0.331902462232j)*x[0]**o + ((0.495458264797-0.126351615534j))*x[0] + ((0.6484957704-0.00203354515938j))*x[1]**o + ((0.768167635972-0.143484928785j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.808694426353+0.331902462232j)*x_ref[0]**o + ((0.495458264797-0.126351615534j))*x_ref[0] + ((0.6484957704-0.00203354515938j))*x_ref[1]**o + ((0.768167635972-0.143484928785j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(-0.314329604472-0.936716731775j)*x[0]**o + ((-0.0251092192747-0.0987314160266j))*x[0] + ((-0.264325525596-0.0482616386075j))*x[1]**o + ((0.103053188381+0.524404033166j))*x[1]
+        ref[(0, 1, 2, 2)]=(-0.314329604472-0.936716731775j)*x_ref[0]**o + ((-0.0251092192747-0.0987314160266j))*x_ref[0] + ((-0.264325525596-0.0482616386075j))*x_ref[1]**o + ((0.103053188381+0.524404033166j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(0.710522124112-0.717701579061j)*x[0]**o + ((0.379358857953+0.0669046094286j))*x[0] + ((-0.645977777118+0.561965307835j))*x[1]**o + ((-0.726627677525-0.984159154466j))*x[1]
+        ref[(0, 1, 3, 0)]=(0.710522124112-0.717701579061j)*x_ref[0]**o + ((0.379358857953+0.0669046094286j))*x_ref[0] + ((-0.645977777118+0.561965307835j))*x_ref[1]**o + ((-0.726627677525-0.984159154466j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(-0.512250375118-0.157416774617j)*x[0]**o + ((0.687237428364+0.722454377764j))*x[0] + ((-0.7448600953-0.316452240714j))*x[1]**o + ((0.835532606378+0.160611116183j))*x[1]
+        ref[(0, 1, 3, 1)]=(-0.512250375118-0.157416774617j)*x_ref[0]**o + ((0.687237428364+0.722454377764j))*x_ref[0] + ((-0.7448600953-0.316452240714j))*x_ref[1]**o + ((0.835532606378+0.160611116183j))*x_ref[1]
+        arg[(0, 1, 3, 2)]=(0.557372837913-0.0470581487674j)*x[0]**o + ((-0.922886870848+0.711581127666j))*x[0] + ((0.431175371365-0.762522634414j))*x[1]**o + ((-0.542392047825+0.0958244568516j))*x[1]
+        ref[(0, 1, 3, 2)]=(0.557372837913-0.0470581487674j)*x_ref[0]**o + ((-0.922886870848+0.711581127666j))*x_ref[0] + ((0.431175371365-0.762522634414j))*x_ref[1]**o + ((-0.542392047825+0.0958244568516j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.162912973691+0.354203583604j)*x[0]**o + ((0.978996018703+0.253246474909j))*x[0] + ((-0.270546932805-0.304550208997j))*x[1]**o + ((0.386104121658+0.14706852972j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.162912973691+0.354203583604j)*x_ref[0]**o + ((0.978996018703+0.253246474909j))*x_ref[0] + ((-0.270546932805-0.304550208997j))*x_ref[1]**o + ((0.386104121658+0.14706852972j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.656468705025+0.0294472340065j)*x[0]**o + ((-0.847155363743+0.833999874996j))*x[0] + ((0.744135507478-0.949796308426j))*x[1]**o + ((-0.159652626021-0.238583041432j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.656468705025+0.0294472340065j)*x_ref[0]**o + ((-0.847155363743+0.833999874996j))*x_ref[0] + ((0.744135507478-0.949796308426j))*x_ref[1]**o + ((-0.159652626021-0.238583041432j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.947200726022-0.651806474034j)*x[0]**o + ((0.440888179712-0.545401951354j))*x[0] + ((-0.330007232906-0.329874015127j))*x[1]**o + ((0.427975743006-0.594932845528j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.947200726022-0.651806474034j)*x_ref[0]**o + ((0.440888179712-0.545401951354j))*x_ref[0] + ((-0.330007232906-0.329874015127j))*x_ref[1]**o + ((0.427975743006-0.594932845528j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.0501837850305+0.391372164931j)*x[0]**o + ((0.797008807205-0.168471306128j))*x[0] + ((0.4858768862-0.369945640198j))*x[1]**o + ((-0.768040990909+0.119945144148j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.0501837850305+0.391372164931j)*x_ref[0]**o + ((0.797008807205-0.168471306128j))*x_ref[0] + ((0.4858768862-0.369945640198j))*x_ref[1]**o + ((-0.768040990909+0.119945144148j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.542570217413+0.735158612035j)*x[0]**o + ((-0.452715045128+0.235063453983j))*x[0] + ((0.19375897437+0.83861139626j))*x[1]**o + ((0.0605003222642+0.0760646126527j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.542570217413+0.735158612035j)*x_ref[0]**o + ((-0.452715045128+0.235063453983j))*x_ref[0] + ((0.19375897437+0.83861139626j))*x_ref[1]**o + ((0.0605003222642+0.0760646126527j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(-0.379529677845-0.282637523084j)*x[0]**o + ((0.422552793988+0.208812516505j))*x[0] + ((0.469352070413+0.572713199948j))*x[1]**o + ((-0.824144197348+0.999911137738j))*x[1]
+        ref[(0, 2, 1, 2)]=(-0.379529677845-0.282637523084j)*x_ref[0]**o + ((0.422552793988+0.208812516505j))*x_ref[0] + ((0.469352070413+0.572713199948j))*x_ref[1]**o + ((-0.824144197348+0.999911137738j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(-0.906525192204-0.873757344522j)*x[0]**o + ((0.163310598775-0.233126554143j))*x[0] + ((0.335993331254+0.317958225669j))*x[1]**o + ((0.26066188783-0.0867526141897j))*x[1]
+        ref[(0, 2, 2, 0)]=(-0.906525192204-0.873757344522j)*x_ref[0]**o + ((0.163310598775-0.233126554143j))*x_ref[0] + ((0.335993331254+0.317958225669j))*x_ref[1]**o + ((0.26066188783-0.0867526141897j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.487982801816-0.593410165017j)*x[0]**o + ((0.38782238107+0.373683814927j))*x[0] + ((0.0611782713717-0.812189135523j))*x[1]**o + ((-0.463632834292+0.971080571841j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.487982801816-0.593410165017j)*x_ref[0]**o + ((0.38782238107+0.373683814927j))*x_ref[0] + ((0.0611782713717-0.812189135523j))*x_ref[1]**o + ((-0.463632834292+0.971080571841j))*x_ref[1]
+        arg[(0, 2, 2, 2)]=(0.48314634745+0.870245939818j)*x[0]**o + ((-0.458865278068-0.0673180161309j))*x[0] + ((-0.677003669698+0.477298500613j))*x[1]**o + ((-0.660016036444+0.672786480766j))*x[1]
+        ref[(0, 2, 2, 2)]=(0.48314634745+0.870245939818j)*x_ref[0]**o + ((-0.458865278068-0.0673180161309j))*x_ref[0] + ((-0.677003669698+0.477298500613j))*x_ref[1]**o + ((-0.660016036444+0.672786480766j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(0.184602355198+0.392715796004j)*x[0]**o + ((0.0614053908177-0.817054710979j))*x[0] + ((-0.91289714344-0.534383176056j))*x[1]**o + ((0.644608548364+0.0849331054364j))*x[1]
+        ref[(0, 2, 3, 0)]=(0.184602355198+0.392715796004j)*x_ref[0]**o + ((0.0614053908177-0.817054710979j))*x_ref[0] + ((-0.91289714344-0.534383176056j))*x_ref[1]**o + ((0.644608548364+0.0849331054364j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(0.0904186791994+0.792694079875j)*x[0]**o + ((-0.272764622469+0.666268811127j))*x[0] + ((-0.916176519295-0.110585801118j))*x[1]**o + ((-0.530953328488-0.138547379586j))*x[1]
+        ref[(0, 2, 3, 1)]=(0.0904186791994+0.792694079875j)*x_ref[0]**o + ((-0.272764622469+0.666268811127j))*x_ref[0] + ((-0.916176519295-0.110585801118j))*x_ref[1]**o + ((-0.530953328488-0.138547379586j))*x_ref[1]
+        arg[(0, 2, 3, 2)]=(0.361764015888+0.0879110606863j)*x[0]**o + ((0.388404608552-0.991699033264j))*x[0] + ((-0.0126840693998+0.479454459713j))*x[1]**o + ((-0.369484173494-0.43596282005j))*x[1]
+        ref[(0, 2, 3, 2)]=(0.361764015888+0.0879110606863j)*x_ref[0]**o + ((0.388404608552-0.991699033264j))*x_ref[0] + ((-0.0126840693998+0.479454459713j))*x_ref[1]**o + ((-0.369484173494-0.43596282005j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.120723988983-0.0229385064391j)*x[0]**o + ((0.997185984891+0.151631420574j))*x[0] + ((0.378958457228+0.608480492385j))*x[1]**o + ((0.268515245914+0.960900795434j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.120723988983-0.0229385064391j)*x_ref[0]**o + ((0.997185984891+0.151631420574j))*x_ref[0] + ((0.378958457228+0.608480492385j))*x_ref[1]**o + ((0.268515245914+0.960900795434j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.849922985709-0.689828155315j)*x[0]**o + ((-0.720580788416+0.0212152266136j))*x[0] + ((-0.46238408203-0.288079682158j))*x[1]**o + ((-0.611177411503+0.974731528947j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.849922985709-0.689828155315j)*x_ref[0]**o + ((-0.720580788416+0.0212152266136j))*x_ref[0] + ((-0.46238408203-0.288079682158j))*x_ref[1]**o + ((-0.611177411503+0.974731528947j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(0.51237953907+0.548378927014j)*x[0]**o + ((-0.383757969846-0.359458241353j))*x[0] + ((-0.727428986455-0.0757051482409j))*x[1]**o + ((-0.369969887108+0.809515477723j))*x[1]
+        ref[(1, 0, 0, 2)]=(0.51237953907+0.548378927014j)*x_ref[0]**o + ((-0.383757969846-0.359458241353j))*x_ref[0] + ((-0.727428986455-0.0757051482409j))*x_ref[1]**o + ((-0.369969887108+0.809515477723j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.41113567917-0.930470374809j)*x[0]**o + ((0.403443344811-0.633332034369j))*x[0] + ((-0.0297264399055+0.790500115798j))*x[1]**o + ((-0.619011401527-0.38565805177j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.41113567917-0.930470374809j)*x_ref[0]**o + ((0.403443344811-0.633332034369j))*x_ref[0] + ((-0.0297264399055+0.790500115798j))*x_ref[1]**o + ((-0.619011401527-0.38565805177j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.206495898373-0.992614998214j)*x[0]**o + ((-0.342506389444-0.543833441317j))*x[0] + ((-0.702485143431+0.402234688584j))*x[1]**o + ((-0.949499709096-0.443908923022j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.206495898373-0.992614998214j)*x_ref[0]**o + ((-0.342506389444-0.543833441317j))*x_ref[0] + ((-0.702485143431+0.402234688584j))*x_ref[1]**o + ((-0.949499709096-0.443908923022j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.0314193053174+0.83600994971j)*x[0]**o + ((0.209109716828-0.216485926239j))*x[0] + ((0.724289768807-0.658848736722j))*x[1]**o + ((-0.333264811264+0.395642568106j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.0314193053174+0.83600994971j)*x_ref[0]**o + ((0.209109716828-0.216485926239j))*x_ref[0] + ((0.724289768807-0.658848736722j))*x_ref[1]**o + ((-0.333264811264+0.395642568106j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.392550104814+0.844381064522j)*x[0]**o + ((0.431628844073-0.499627245664j))*x[0] + ((-0.59725323989-0.758917441382j))*x[1]**o + ((0.85122321609+0.39427089329j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.392550104814+0.844381064522j)*x_ref[0]**o + ((0.431628844073-0.499627245664j))*x_ref[0] + ((-0.59725323989-0.758917441382j))*x_ref[1]**o + ((0.85122321609+0.39427089329j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.191502587933+0.216214070948j)*x[0]**o + ((-0.0244835926176+0.980913869889j))*x[0] + ((0.42940712953-0.0877583296738j))*x[1]**o + ((-0.15252321497-0.2676968316j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.191502587933+0.216214070948j)*x_ref[0]**o + ((-0.0244835926176+0.980913869889j))*x_ref[0] + ((0.42940712953-0.0877583296738j))*x_ref[1]**o + ((-0.15252321497-0.2676968316j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(0.42634139294+0.658228442834j)*x[0]**o + ((0.179687310497-0.853369453392j))*x[0] + ((-0.3219091797-0.895506347357j))*x[1]**o + ((0.599175960511+0.859233126461j))*x[1]
+        ref[(1, 0, 2, 2)]=(0.42634139294+0.658228442834j)*x_ref[0]**o + ((0.179687310497-0.853369453392j))*x_ref[0] + ((-0.3219091797-0.895506347357j))*x_ref[1]**o + ((0.599175960511+0.859233126461j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(-0.194492798921+0.715274527743j)*x[0]**o + ((0.020206406719-0.695187355843j))*x[0] + ((0.171552597466-0.603934683791j))*x[1]**o + ((0.178457444095+0.272093736434j))*x[1]
+        ref[(1, 0, 3, 0)]=(-0.194492798921+0.715274527743j)*x_ref[0]**o + ((0.020206406719-0.695187355843j))*x_ref[0] + ((0.171552597466-0.603934683791j))*x_ref[1]**o + ((0.178457444095+0.272093736434j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(-0.259258806368+0.975265436165j)*x[0]**o + ((-0.510701024073-0.60127263049j))*x[0] + ((0.244442413613-0.185126140317j))*x[1]**o + ((0.186316984768+0.951448476922j))*x[1]
+        ref[(1, 0, 3, 1)]=(-0.259258806368+0.975265436165j)*x_ref[0]**o + ((-0.510701024073-0.60127263049j))*x_ref[0] + ((0.244442413613-0.185126140317j))*x_ref[1]**o + ((0.186316984768+0.951448476922j))*x_ref[1]
+        arg[(1, 0, 3, 2)]=(0.231553438437+0.0335256939502j)*x[0]**o + ((0.516023543163-0.500579775005j))*x[0] + ((0.347754338322-0.604814461989j))*x[1]**o + ((0.95813403383+0.577344659281j))*x[1]
+        ref[(1, 0, 3, 2)]=(0.231553438437+0.0335256939502j)*x_ref[0]**o + ((0.516023543163-0.500579775005j))*x_ref[0] + ((0.347754338322-0.604814461989j))*x_ref[1]**o + ((0.95813403383+0.577344659281j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.190970818722+0.497475086744j)*x[0]**o + ((-0.827814395618-0.978521185107j))*x[0] + ((0.358351074814+0.401655361626j))*x[1]**o + ((0.749993969849-0.904399914343j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.190970818722+0.497475086744j)*x_ref[0]**o + ((-0.827814395618-0.978521185107j))*x_ref[0] + ((0.358351074814+0.401655361626j))*x_ref[1]**o + ((0.749993969849-0.904399914343j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.529943914301+0.891945704514j)*x[0]**o + ((0.029489433379-0.0842381181081j))*x[0] + ((-0.496379116126+0.567532246109j))*x[1]**o + ((0.574170500995+0.901825733683j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.529943914301+0.891945704514j)*x_ref[0]**o + ((0.029489433379-0.0842381181081j))*x_ref[0] + ((-0.496379116126+0.567532246109j))*x_ref[1]**o + ((0.574170500995+0.901825733683j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.737288725789-0.776506542806j)*x[0]**o + ((-0.351801254139+0.121430100319j))*x[0] + ((0.221905162511-0.250044536898j))*x[1]**o + ((0.67182807439+0.143465452071j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.737288725789-0.776506542806j)*x_ref[0]**o + ((-0.351801254139+0.121430100319j))*x_ref[0] + ((0.221905162511-0.250044536898j))*x_ref[1]**o + ((0.67182807439+0.143465452071j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.860291913706+0.408869189109j)*x[0]**o + ((0.4919012726+0.682345033602j))*x[0] + ((0.446867532724+0.484146859047j))*x[1]**o + ((0.853610606828-0.11179288811j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.860291913706+0.408869189109j)*x_ref[0]**o + ((0.4919012726+0.682345033602j))*x_ref[0] + ((0.446867532724+0.484146859047j))*x_ref[1]**o + ((0.853610606828-0.11179288811j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.0424157781285+0.090777752553j)*x[0]**o + ((0.472432778478-0.26315294374j))*x[0] + ((-0.94213608938-0.603655867884j))*x[1]**o + ((0.490212392303-0.59010163711j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.0424157781285+0.090777752553j)*x_ref[0]**o + ((0.472432778478-0.26315294374j))*x_ref[0] + ((-0.94213608938-0.603655867884j))*x_ref[1]**o + ((0.490212392303-0.59010163711j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.391327097476+0.363727406674j)*x[0]**o + ((0.364609363096-0.868132995938j))*x[0] + ((0.733816210279-0.813069697234j))*x[1]**o + ((-0.200698267097+0.546069392481j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.391327097476+0.363727406674j)*x_ref[0]**o + ((0.364609363096-0.868132995938j))*x_ref[0] + ((0.733816210279-0.813069697234j))*x_ref[1]**o + ((-0.200698267097+0.546069392481j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.097146863316+0.746311465154j)*x[0]**o + ((0.0407618582099+0.883790408445j))*x[0] + ((0.905157686581+0.807886349831j))*x[1]**o + ((-0.498527273837-0.260837045658j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.097146863316+0.746311465154j)*x_ref[0]**o + ((0.0407618582099+0.883790408445j))*x_ref[0] + ((0.905157686581+0.807886349831j))*x_ref[1]**o + ((-0.498527273837-0.260837045658j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.923802329348+0.504615388014j)*x[0]**o + ((0.650603219009+0.564084614652j))*x[0] + ((0.889825652233+0.822082904537j))*x[1]**o + ((0.8551644516-0.198884107776j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.923802329348+0.504615388014j)*x_ref[0]**o + ((0.650603219009+0.564084614652j))*x_ref[0] + ((0.889825652233+0.822082904537j))*x_ref[1]**o + ((0.8551644516-0.198884107776j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(-0.98955214673+0.926676623508j)*x[0]**o + ((-0.218659781677+0.0836113213696j))*x[0] + ((-0.281242157329-0.381415108421j))*x[1]**o + ((-0.493369823524+0.185444706249j))*x[1]
+        ref[(1, 1, 2, 2)]=(-0.98955214673+0.926676623508j)*x_ref[0]**o + ((-0.218659781677+0.0836113213696j))*x_ref[0] + ((-0.281242157329-0.381415108421j))*x_ref[1]**o + ((-0.493369823524+0.185444706249j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(0.436089674347+0.645039953609j)*x[0]**o + ((-0.857831291338+0.665505962057j))*x[0] + ((0.218523057246-0.904953656333j))*x[1]**o + ((-0.804233706301+0.698238881931j))*x[1]
+        ref[(1, 1, 3, 0)]=(0.436089674347+0.645039953609j)*x_ref[0]**o + ((-0.857831291338+0.665505962057j))*x_ref[0] + ((0.218523057246-0.904953656333j))*x_ref[1]**o + ((-0.804233706301+0.698238881931j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(0.795476125261-0.777357006848j)*x[0]**o + ((0.971278913656-0.871758141723j))*x[0] + ((0.603813873059-0.695451332106j))*x[1]**o + ((0.443105706591-0.294317691677j))*x[1]
+        ref[(1, 1, 3, 1)]=(0.795476125261-0.777357006848j)*x_ref[0]**o + ((0.971278913656-0.871758141723j))*x_ref[0] + ((0.603813873059-0.695451332106j))*x_ref[1]**o + ((0.443105706591-0.294317691677j))*x_ref[1]
+        arg[(1, 1, 3, 2)]=(0.480154548372+0.160413873369j)*x[0]**o + ((-0.652823434949-0.290021207247j))*x[0] + ((0.912592709196-0.395886368996j))*x[1]**o + ((0.977128595814+0.977579129971j))*x[1]
+        ref[(1, 1, 3, 2)]=(0.480154548372+0.160413873369j)*x_ref[0]**o + ((-0.652823434949-0.290021207247j))*x_ref[0] + ((0.912592709196-0.395886368996j))*x_ref[1]**o + ((0.977128595814+0.977579129971j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(-0.12660166473+0.429032806298j)*x[0]**o + ((-0.795826420906-0.0813777171509j))*x[0] + ((-0.561914972806+0.400514312886j))*x[1]**o + ((-0.246563764813+0.464416290017j))*x[1]
+        ref[(1, 2, 0, 0)]=(-0.12660166473+0.429032806298j)*x_ref[0]**o + ((-0.795826420906-0.0813777171509j))*x_ref[0] + ((-0.561914972806+0.400514312886j))*x_ref[1]**o + ((-0.246563764813+0.464416290017j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.529184995449-0.779323058655j)*x[0]**o + ((-0.677151148873+0.145420418829j))*x[0] + ((-0.105538045934+0.165193909054j))*x[1]**o + ((0.447748724037-0.0210511625278j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.529184995449-0.779323058655j)*x_ref[0]**o + ((-0.677151148873+0.145420418829j))*x_ref[0] + ((-0.105538045934+0.165193909054j))*x_ref[1]**o + ((0.447748724037-0.0210511625278j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(-0.766685016827+0.561907944366j)*x[0]**o + ((-0.109176644938-0.29354605129j))*x[0] + ((0.72454102628+0.708645462173j))*x[1]**o + ((0.479842896377-0.94930150218j))*x[1]
+        ref[(1, 2, 0, 2)]=(-0.766685016827+0.561907944366j)*x_ref[0]**o + ((-0.109176644938-0.29354605129j))*x_ref[0] + ((0.72454102628+0.708645462173j))*x_ref[1]**o + ((0.479842896377-0.94930150218j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.749255054536-0.20463985242j)*x[0]**o + ((0.746849189573+0.0586591229776j))*x[0] + ((0.110697775954-0.905398635025j))*x[1]**o + ((0.938049748351-0.509643430499j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.749255054536-0.20463985242j)*x_ref[0]**o + ((0.746849189573+0.0586591229776j))*x_ref[0] + ((0.110697775954-0.905398635025j))*x_ref[1]**o + ((0.938049748351-0.509643430499j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.392942712054+0.178667737006j)*x[0]**o + ((-0.835052507379+0.463841516217j))*x[0] + ((0.32940099297-0.230193925855j))*x[1]**o + ((0.0694446752512-0.403021416789j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.392942712054+0.178667737006j)*x_ref[0]**o + ((-0.835052507379+0.463841516217j))*x_ref[0] + ((0.32940099297-0.230193925855j))*x_ref[1]**o + ((0.0694446752512-0.403021416789j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(0.95179393121-9.4404961543e-05j)*x[0]**o + ((0.0301509790749-0.974659782852j))*x[0] + ((-0.860417713089+0.285861338969j))*x[1]**o + ((0.820193825843-0.759360996928j))*x[1]
+        ref[(1, 2, 1, 2)]=(0.95179393121-9.4404961543e-05j)*x_ref[0]**o + ((0.0301509790749-0.974659782852j))*x_ref[0] + ((-0.860417713089+0.285861338969j))*x_ref[1]**o + ((0.820193825843-0.759360996928j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(-0.329468922943+0.942626030661j)*x[0]**o + ((-0.411832962855-0.296648644147j))*x[0] + ((0.426707862742-0.545331659638j))*x[1]**o + ((0.826816370684+0.0455809431743j))*x[1]
+        ref[(1, 2, 2, 0)]=(-0.329468922943+0.942626030661j)*x_ref[0]**o + ((-0.411832962855-0.296648644147j))*x_ref[0] + ((0.426707862742-0.545331659638j))*x_ref[1]**o + ((0.826816370684+0.0455809431743j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.199772902128+0.690300783206j)*x[0]**o + ((-0.965703435149-0.560018785601j))*x[0] + ((0.937239629293-0.816698318227j))*x[1]**o + ((0.00450942966463-0.405426407034j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.199772902128+0.690300783206j)*x_ref[0]**o + ((-0.965703435149-0.560018785601j))*x_ref[0] + ((0.937239629293-0.816698318227j))*x_ref[1]**o + ((0.00450942966463-0.405426407034j))*x_ref[1]
+        arg[(1, 2, 2, 2)]=(-0.799010540525-0.374957031412j)*x[0]**o + ((0.0158872441795-0.919245465516j))*x[0] + ((-0.492712853635-0.477011844974j))*x[1]**o + ((-0.828567550834+0.7137258336j))*x[1]
+        ref[(1, 2, 2, 2)]=(-0.799010540525-0.374957031412j)*x_ref[0]**o + ((0.0158872441795-0.919245465516j))*x_ref[0] + ((-0.492712853635-0.477011844974j))*x_ref[1]**o + ((-0.828567550834+0.7137258336j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(-0.776380030673-0.667659017795j)*x[0]**o + ((0.575276902861+0.797345795482j))*x[0] + ((-0.119530117215+0.00821068625388j))*x[1]**o + ((0.0151047112763+0.767571774787j))*x[1]
+        ref[(1, 2, 3, 0)]=(-0.776380030673-0.667659017795j)*x_ref[0]**o + ((0.575276902861+0.797345795482j))*x_ref[0] + ((-0.119530117215+0.00821068625388j))*x_ref[1]**o + ((0.0151047112763+0.767571774787j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(-0.440091471977+0.095162163133j)*x[0]**o + ((0.990195438847+0.574190830875j))*x[0] + ((-0.770506851722-0.832844176693j))*x[1]**o + ((-0.470579891348-0.41370476468j))*x[1]
+        ref[(1, 2, 3, 1)]=(-0.440091471977+0.095162163133j)*x_ref[0]**o + ((0.990195438847+0.574190830875j))*x_ref[0] + ((-0.770506851722-0.832844176693j))*x_ref[1]**o + ((-0.470579891348-0.41370476468j))*x_ref[1]
+        arg[(1, 2, 3, 2)]=(-0.80533349603-0.686435637508j)*x[0]**o + ((-0.847310208617-0.252823502465j))*x[0] + ((0.52649826067-0.0476541954279j))*x[1]**o + ((0.679603434395-0.982643496243j))*x[1]
+        ref[(1, 2, 3, 2)]=(-0.80533349603-0.686435637508j)*x_ref[0]**o + ((-0.847310208617-0.252823502465j))*x_ref[0] + ((0.52649826067-0.0476541954279j))*x_ref[1]**o + ((0.679603434395-0.982643496243j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.0304401269738+0.893338083588j)*x[0]**o + ((-0.556308360594+0.857208752967j))*x[0] + ((0.963487142858+0.24167298065j))*x[1]**o + ((-0.632823541439-0.30375522516j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.0304401269738+0.893338083588j)*x_ref[0]**o + ((-0.556308360594+0.857208752967j))*x_ref[0] + ((0.963487142858+0.24167298065j))*x_ref[1]**o + ((-0.632823541439-0.30375522516j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.249441671659-0.80664114913j)*x[0]**o + ((0.322790028112+0.462956014729j))*x[0] + ((0.813318681867-0.138243262697j))*x[1]**o + ((-0.0344261166408-0.541911825918j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.249441671659-0.80664114913j)*x_ref[0]**o + ((0.322790028112+0.462956014729j))*x_ref[0] + ((0.813318681867-0.138243262697j))*x_ref[1]**o + ((-0.0344261166408-0.541911825918j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.572041957074-0.226766232149j)*x[0]**o + ((0.689734011117+0.740012901179j))*x[0] + ((0.52381282666-0.0184430309606j))*x[1]**o + ((0.991884047585+0.572542512416j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.572041957074-0.226766232149j)*x_ref[0]**o + ((0.689734011117+0.740012901179j))*x_ref[0] + ((0.52381282666-0.0184430309606j))*x_ref[1]**o + ((0.991884047585+0.572542512416j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.717304159103+0.193336049763j)*x[0]**o + ((-0.794986534126+0.667850173472j))*x[0] + ((-0.25269319818-0.220357261491j))*x[1]**o + ((0.0800528481983-0.11929722887j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.717304159103+0.193336049763j)*x_ref[0]**o + ((-0.794986534126+0.667850173472j))*x_ref[0] + ((-0.25269319818-0.220357261491j))*x_ref[1]**o + ((0.0800528481983-0.11929722887j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.524502912991-0.55419966207j)*x[0]**o + ((0.203909667777+0.44392066468j))*x[0] + ((0.680705339959+0.0116067225395j))*x[1]**o + ((-0.592786311407+0.362501732221j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.524502912991-0.55419966207j)*x_ref[0]**o + ((0.203909667777+0.44392066468j))*x_ref[0] + ((0.680705339959+0.0116067225395j))*x_ref[1]**o + ((-0.592786311407+0.362501732221j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.25776906758-0.298967469369j)*x[0]**o + ((-0.818302475769-0.20495678694j))*x[0] + ((-0.984167336048+0.917726303971j))*x[1]**o + ((0.40892566027-0.256603286555j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.25776906758-0.298967469369j)*x_ref[0]**o + ((-0.818302475769-0.20495678694j))*x_ref[0] + ((-0.984167336048+0.917726303971j))*x_ref[1]**o + ((0.40892566027-0.256603286555j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.8220002554+0.73134455047j)*x[0]**o + ((0.250045150536+0.775483258148j))*x[0] + ((-0.25166423075+0.170507057112j))*x[1]**o + ((-0.462698588531-0.553728330218j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.8220002554+0.73134455047j)*x_ref[0]**o + ((0.250045150536+0.775483258148j))*x_ref[0] + ((-0.25166423075+0.170507057112j))*x_ref[1]**o + ((-0.462698588531-0.553728330218j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(-0.660113457866-0.593260170777j)*x[0]**o + ((-0.017605745812+0.0536974304104j))*x[0] + ((0.790357912302+0.254656575619j))*x[1]**o + ((-0.869709422445-0.859667841761j))*x[1]
+        ref[(2, 0, 2, 1)]=(-0.660113457866-0.593260170777j)*x_ref[0]**o + ((-0.017605745812+0.0536974304104j))*x_ref[0] + ((0.790357912302+0.254656575619j))*x_ref[1]**o + ((-0.869709422445-0.859667841761j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(-0.288319182679-0.173049070067j)*x[0]**o + ((0.780925646645-0.86325244122j))*x[0] + ((-0.728874739068-0.827484855833j))*x[1]**o + ((0.035362384244-0.421831804629j))*x[1]
+        ref[(2, 0, 2, 2)]=(-0.288319182679-0.173049070067j)*x_ref[0]**o + ((0.780925646645-0.86325244122j))*x_ref[0] + ((-0.728874739068-0.827484855833j))*x_ref[1]**o + ((0.035362384244-0.421831804629j))*x_ref[1]
+        arg[(2, 0, 3, 0)]=(-0.926669082484+0.354767588417j)*x[0]**o + ((-0.117103551966+0.362225430288j))*x[0] + ((-0.440048015189-0.348114279792j))*x[1]**o + ((-0.661476867663+0.914783638845j))*x[1]
+        ref[(2, 0, 3, 0)]=(-0.926669082484+0.354767588417j)*x_ref[0]**o + ((-0.117103551966+0.362225430288j))*x_ref[0] + ((-0.440048015189-0.348114279792j))*x_ref[1]**o + ((-0.661476867663+0.914783638845j))*x_ref[1]
+        arg[(2, 0, 3, 1)]=(0.193994363135-0.434655859263j)*x[0]**o + ((-0.636401236735-0.715778758799j))*x[0] + ((-0.563706963294+0.87438745153j))*x[1]**o + ((0.351421583369-0.133617348871j))*x[1]
+        ref[(2, 0, 3, 1)]=(0.193994363135-0.434655859263j)*x_ref[0]**o + ((-0.636401236735-0.715778758799j))*x_ref[0] + ((-0.563706963294+0.87438745153j))*x_ref[1]**o + ((0.351421583369-0.133617348871j))*x_ref[1]
+        arg[(2, 0, 3, 2)]=(-0.00569215144228-0.598469915509j)*x[0]**o + ((0.0458863125661-0.911982913238j))*x[0] + ((-0.295490232676-0.630957218104j))*x[1]**o + ((-0.541721849492-0.176735004717j))*x[1]
+        ref[(2, 0, 3, 2)]=(-0.00569215144228-0.598469915509j)*x_ref[0]**o + ((0.0458863125661-0.911982913238j))*x_ref[0] + ((-0.295490232676-0.630957218104j))*x_ref[1]**o + ((-0.541721849492-0.176735004717j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.729227577602+0.0225803900388j)*x[0]**o + ((0.616931160995+0.941555272094j))*x[0] + ((-0.0433944578881+0.339638449469j))*x[1]**o + ((0.822730808053+0.366225227889j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.729227577602+0.0225803900388j)*x_ref[0]**o + ((0.616931160995+0.941555272094j))*x_ref[0] + ((-0.0433944578881+0.339638449469j))*x_ref[1]**o + ((0.822730808053+0.366225227889j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.226504154887-0.815179913507j)*x[0]**o + ((0.78284349649-0.80198260676j))*x[0] + ((-0.504560716237-0.862900262484j))*x[1]**o + ((0.902584721934+0.298498889493j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.226504154887-0.815179913507j)*x_ref[0]**o + ((0.78284349649-0.80198260676j))*x_ref[0] + ((-0.504560716237-0.862900262484j))*x_ref[1]**o + ((0.902584721934+0.298498889493j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.91373617231+0.691948151339j)*x[0]**o + ((-0.854378058645+0.807165858422j))*x[0] + ((0.78710018945+0.18758907618j))*x[1]**o + ((0.870779804101-0.917881490709j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.91373617231+0.691948151339j)*x_ref[0]**o + ((-0.854378058645+0.807165858422j))*x_ref[0] + ((0.78710018945+0.18758907618j))*x_ref[1]**o + ((0.870779804101-0.917881490709j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.454404502594-0.885783771374j)*x[0]**o + ((-0.00701522131924+0.385373756145j))*x[0] + ((-0.702178093443-0.242632457596j))*x[1]**o + ((-0.75931761741-0.0974111731942j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.454404502594-0.885783771374j)*x_ref[0]**o + ((-0.00701522131924+0.385373756145j))*x_ref[0] + ((-0.702178093443-0.242632457596j))*x_ref[1]**o + ((-0.75931761741-0.0974111731942j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.42177548533+0.892823491937j)*x[0]**o + ((0.555209516505+0.527682079442j))*x[0] + ((0.915115279827+0.248904816613j))*x[1]**o + ((-0.60631607209-0.603556616118j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.42177548533+0.892823491937j)*x_ref[0]**o + ((0.555209516505+0.527682079442j))*x_ref[0] + ((0.915115279827+0.248904816613j))*x_ref[1]**o + ((-0.60631607209-0.603556616118j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(-0.426897114228+0.770272476673j)*x[0]**o + ((-0.739927856618+0.161526748925j))*x[0] + ((0.945524366458-0.993320810574j))*x[1]**o + ((0.234255190188-0.19552746324j))*x[1]
+        ref[(2, 1, 1, 2)]=(-0.426897114228+0.770272476673j)*x_ref[0]**o + ((-0.739927856618+0.161526748925j))*x_ref[0] + ((0.945524366458-0.993320810574j))*x_ref[1]**o + ((0.234255190188-0.19552746324j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.0652011793813+0.274253095248j)*x[0]**o + ((0.605648392003-0.627674036278j))*x[0] + ((-0.371565022926+0.330392270682j))*x[1]**o + ((-0.808321221919+0.805668409408j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.0652011793813+0.274253095248j)*x_ref[0]**o + ((0.605648392003-0.627674036278j))*x_ref[0] + ((-0.371565022926+0.330392270682j))*x_ref[1]**o + ((-0.808321221919+0.805668409408j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.467686419951+0.619265524277j)*x[0]**o + ((0.680173084686+0.735554899402j))*x[0] + ((0.00976549835948-0.608719236705j))*x[1]**o + ((-0.955524980405-0.832622218613j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.467686419951+0.619265524277j)*x_ref[0]**o + ((0.680173084686+0.735554899402j))*x_ref[0] + ((0.00976549835948-0.608719236705j))*x_ref[1]**o + ((-0.955524980405-0.832622218613j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(-0.811505341567+0.379174249131j)*x[0]**o + ((-0.220061722001-0.176482399976j))*x[0] + ((-0.0629796566012-0.610563522959j))*x[1]**o + ((-0.0593689750368+0.682580239491j))*x[1]
+        ref[(2, 1, 2, 2)]=(-0.811505341567+0.379174249131j)*x_ref[0]**o + ((-0.220061722001-0.176482399976j))*x_ref[0] + ((-0.0629796566012-0.610563522959j))*x_ref[1]**o + ((-0.0593689750368+0.682580239491j))*x_ref[1]
+        arg[(2, 1, 3, 0)]=(-0.831658961048+0.246060153521j)*x[0]**o + ((-0.35594411769+0.186630389609j))*x[0] + ((-0.028635594655-0.483541915767j))*x[1]**o + ((-0.831745752393-0.544311163381j))*x[1]
+        ref[(2, 1, 3, 0)]=(-0.831658961048+0.246060153521j)*x_ref[0]**o + ((-0.35594411769+0.186630389609j))*x_ref[0] + ((-0.028635594655-0.483541915767j))*x_ref[1]**o + ((-0.831745752393-0.544311163381j))*x_ref[1]
+        arg[(2, 1, 3, 1)]=(-0.553062708857+0.913166463066j)*x[0]**o + ((0.293809617901+0.683794722559j))*x[0] + ((-0.0959964839407+0.658599187417j))*x[1]**o + ((0.239479048678+0.569987817265j))*x[1]
+        ref[(2, 1, 3, 1)]=(-0.553062708857+0.913166463066j)*x_ref[0]**o + ((0.293809617901+0.683794722559j))*x_ref[0] + ((-0.0959964839407+0.658599187417j))*x_ref[1]**o + ((0.239479048678+0.569987817265j))*x_ref[1]
+        arg[(2, 1, 3, 2)]=(-0.692945859974+0.639058584779j)*x[0]**o + ((0.828773538627-0.702991827319j))*x[0] + ((0.57258095805+0.442025883482j))*x[1]**o + ((0.995459258732-0.754210544011j))*x[1]
+        ref[(2, 1, 3, 2)]=(-0.692945859974+0.639058584779j)*x_ref[0]**o + ((0.828773538627-0.702991827319j))*x_ref[0] + ((0.57258095805+0.442025883482j))*x_ref[1]**o + ((0.995459258732-0.754210544011j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.455480219596+0.459501224652j)*x[0]**o + ((-0.160700943325-0.631599045131j))*x[0] + ((0.777612789845+0.825211052498j))*x[1]**o + ((0.972849935564+0.92305056291j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.455480219596+0.459501224652j)*x_ref[0]**o + ((-0.160700943325-0.631599045131j))*x_ref[0] + ((0.777612789845+0.825211052498j))*x_ref[1]**o + ((0.972849935564+0.92305056291j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(-0.974419773337-0.541124801133j)*x[0]**o + ((0.864513519671-0.775722212991j))*x[0] + ((-0.127418608114+0.302801992398j))*x[1]**o + ((-0.894505036587+0.456233749688j))*x[1]
+        ref[(2, 2, 0, 1)]=(-0.974419773337-0.541124801133j)*x_ref[0]**o + ((0.864513519671-0.775722212991j))*x_ref[0] + ((-0.127418608114+0.302801992398j))*x_ref[1]**o + ((-0.894505036587+0.456233749688j))*x_ref[1]
+        arg[(2, 2, 0, 2)]=(-0.0285412564288+0.995170480286j)*x[0]**o + ((0.501043944221+0.364822760692j))*x[0] + ((-0.0538450676526+0.828104000695j))*x[1]**o + ((0.00214195080811+0.00278102963823j))*x[1]
+        ref[(2, 2, 0, 2)]=(-0.0285412564288+0.995170480286j)*x_ref[0]**o + ((0.501043944221+0.364822760692j))*x_ref[0] + ((-0.0538450676526+0.828104000695j))*x_ref[1]**o + ((0.00214195080811+0.00278102963823j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(0.262348921911+0.939814514288j)*x[0]**o + ((-0.65307867747-0.239892136706j))*x[0] + ((-0.614328763556-0.600627180515j))*x[1]**o + ((0.735359859972-0.815725542493j))*x[1]
+        ref[(2, 2, 1, 0)]=(0.262348921911+0.939814514288j)*x_ref[0]**o + ((-0.65307867747-0.239892136706j))*x_ref[0] + ((-0.614328763556-0.600627180515j))*x_ref[1]**o + ((0.735359859972-0.815725542493j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.503912527911-0.0831723503509j)*x[0]**o + ((-0.196551034368-0.0949912936828j))*x[0] + ((0.88833580298+0.51705746446j))*x[1]**o + ((-0.292333936948-0.923247509173j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.503912527911-0.0831723503509j)*x_ref[0]**o + ((-0.196551034368-0.0949912936828j))*x_ref[0] + ((0.88833580298+0.51705746446j))*x_ref[1]**o + ((-0.292333936948-0.923247509173j))*x_ref[1]
+        arg[(2, 2, 1, 2)]=(-0.390834713341-0.713683978554j)*x[0]**o + ((0.877408683015-0.603335320741j))*x[0] + ((-0.600346251902-0.115547752734j))*x[1]**o + ((0.323343814779-0.573006264163j))*x[1]
+        ref[(2, 2, 1, 2)]=(-0.390834713341-0.713683978554j)*x_ref[0]**o + ((0.877408683015-0.603335320741j))*x_ref[0] + ((-0.600346251902-0.115547752734j))*x_ref[1]**o + ((0.323343814779-0.573006264163j))*x_ref[1]
+        arg[(2, 2, 2, 0)]=(-0.498782234666+0.582242695581j)*x[0]**o + ((-0.862199172557-0.936663386768j))*x[0] + ((0.401074845045-0.893725436963j))*x[1]**o + ((-0.603400036977+0.086490095506j))*x[1]
+        ref[(2, 2, 2, 0)]=(-0.498782234666+0.582242695581j)*x_ref[0]**o + ((-0.862199172557-0.936663386768j))*x_ref[0] + ((0.401074845045-0.893725436963j))*x_ref[1]**o + ((-0.603400036977+0.086490095506j))*x_ref[1]
+        arg[(2, 2, 2, 1)]=(0.849819829769-0.477411347583j)*x[0]**o + ((0.404311632512+0.319852646508j))*x[0] + ((-0.190382515643-0.810384394219j))*x[1]**o + ((-0.939241399475+0.863156435533j))*x[1]
+        ref[(2, 2, 2, 1)]=(0.849819829769-0.477411347583j)*x_ref[0]**o + ((0.404311632512+0.319852646508j))*x_ref[0] + ((-0.190382515643-0.810384394219j))*x_ref[1]**o + ((-0.939241399475+0.863156435533j))*x_ref[1]
+        arg[(2, 2, 2, 2)]=(-0.064698452913-0.5715909524j)*x[0]**o + ((-0.777730013453+0.686584296419j))*x[0] + ((0.364562545103+0.832237341258j))*x[1]**o + ((0.514571292415+0.35359811265j))*x[1]
+        ref[(2, 2, 2, 2)]=(-0.064698452913-0.5715909524j)*x_ref[0]**o + ((-0.777730013453+0.686584296419j))*x_ref[0] + ((0.364562545103+0.832237341258j))*x_ref[1]**o + ((0.514571292415+0.35359811265j))*x_ref[1]
+        arg[(2, 2, 3, 0)]=(-0.206903867714-0.861226756443j)*x[0]**o + ((0.00796039319825-0.301767058361j))*x[0] + ((-0.765937188879-0.0982223947212j))*x[1]**o + ((-0.299257991067+0.414124784066j))*x[1]
+        ref[(2, 2, 3, 0)]=(-0.206903867714-0.861226756443j)*x_ref[0]**o + ((0.00796039319825-0.301767058361j))*x_ref[0] + ((-0.765937188879-0.0982223947212j))*x_ref[1]**o + ((-0.299257991067+0.414124784066j))*x_ref[1]
+        arg[(2, 2, 3, 1)]=(0.810528246528+0.359516517171j)*x[0]**o + ((-0.473803463246+0.431740129438j))*x[0] + ((0.62142413974+0.761823783608j))*x[1]**o + ((-0.179017826399+0.42860317577j))*x[1]
+        ref[(2, 2, 3, 1)]=(0.810528246528+0.359516517171j)*x_ref[0]**o + ((-0.473803463246+0.431740129438j))*x_ref[0] + ((0.62142413974+0.761823783608j))*x_ref[1]**o + ((-0.179017826399+0.42860317577j))*x_ref[1]
+        arg[(2, 2, 3, 2)]=(-0.173593937194-0.616454371213j)*x[0]**o + ((-0.755143495801-0.408416698283j))*x[0] + ((0.1413730837-0.460593050443j))*x[1]**o + ((-0.398593757023+0.690948561586j))*x[1]
+        ref[(2, 2, 3, 2)]=(-0.173593937194-0.616454371213j)*x_ref[0]**o + ((-0.755143495801-0.408416698283j))*x_ref[0] + ((0.1413730837-0.460593050443j))*x_ref[1]**o + ((-0.398593757023+0.690948561586j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(0.119343475158-0.110297767484j)*x[0]**o + ((0.230361022875+0.9370607923j))*x[0] + ((-0.316524290677-0.285488109466j))*x[1]**o + ((0.484444044163-0.834371908039j))*x[1]
+        ref[(3, 0, 0, 0)]=(0.119343475158-0.110297767484j)*x_ref[0]**o + ((0.230361022875+0.9370607923j))*x_ref[0] + ((-0.316524290677-0.285488109466j))*x_ref[1]**o + ((0.484444044163-0.834371908039j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.721484035937-0.00948587416067j)*x[0]**o + ((-0.472265617861-0.563557582214j))*x[0] + ((-0.315621865329-0.649620840565j))*x[1]**o + ((0.906181036344-0.696605144821j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.721484035937-0.00948587416067j)*x_ref[0]**o + ((-0.472265617861-0.563557582214j))*x_ref[0] + ((-0.315621865329-0.649620840565j))*x_ref[1]**o + ((0.906181036344-0.696605144821j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(-0.0237675828436-0.226301470577j)*x[0]**o + ((-0.712659166847-0.341087059304j))*x[0] + ((-0.125667271777-0.105964586853j))*x[1]**o + ((0.254120921152+0.0684922327111j))*x[1]
+        ref[(3, 0, 0, 2)]=(-0.0237675828436-0.226301470577j)*x_ref[0]**o + ((-0.712659166847-0.341087059304j))*x_ref[0] + ((-0.125667271777-0.105964586853j))*x_ref[1]**o + ((0.254120921152+0.0684922327111j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(0.489999927666+0.674216919134j)*x[0]**o + ((-0.388638114021-0.643336643701j))*x[0] + ((-0.648145396914-0.982642788598j))*x[1]**o + ((-0.562759511916+0.791531300488j))*x[1]
+        ref[(3, 0, 1, 0)]=(0.489999927666+0.674216919134j)*x_ref[0]**o + ((-0.388638114021-0.643336643701j))*x_ref[0] + ((-0.648145396914-0.982642788598j))*x_ref[1]**o + ((-0.562759511916+0.791531300488j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(-0.73656533113-0.355907698442j)*x[0]**o + ((-0.780772655765+0.861914483476j))*x[0] + ((0.880695971232+0.816746497681j))*x[1]**o + ((-0.643826471092+0.435529103754j))*x[1]
+        ref[(3, 0, 1, 1)]=(-0.73656533113-0.355907698442j)*x_ref[0]**o + ((-0.780772655765+0.861914483476j))*x_ref[0] + ((0.880695971232+0.816746497681j))*x_ref[1]**o + ((-0.643826471092+0.435529103754j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(-0.42203438304-0.652526321011j)*x[0]**o + ((-0.373136429493+0.100016970146j))*x[0] + ((0.42146809289-0.314539470968j))*x[1]**o + ((-0.959672969882-0.159240691134j))*x[1]
+        ref[(3, 0, 1, 2)]=(-0.42203438304-0.652526321011j)*x_ref[0]**o + ((-0.373136429493+0.100016970146j))*x_ref[0] + ((0.42146809289-0.314539470968j))*x_ref[1]**o + ((-0.959672969882-0.159240691134j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(0.967064694872+0.591990556096j)*x[0]**o + ((-0.0337867360259+0.508282665629j))*x[0] + ((-0.349280971393+0.52230780391j))*x[1]**o + ((-0.709803031915-0.83509273255j))*x[1]
+        ref[(3, 0, 2, 0)]=(0.967064694872+0.591990556096j)*x_ref[0]**o + ((-0.0337867360259+0.508282665629j))*x_ref[0] + ((-0.349280971393+0.52230780391j))*x_ref[1]**o + ((-0.709803031915-0.83509273255j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(0.618104197646+0.0970652978126j)*x[0]**o + ((-0.157110388808+0.240533982197j))*x[0] + ((-0.619705560618-0.761425293118j))*x[1]**o + ((-0.341573764319+0.292846708288j))*x[1]
+        ref[(3, 0, 2, 1)]=(0.618104197646+0.0970652978126j)*x_ref[0]**o + ((-0.157110388808+0.240533982197j))*x_ref[0] + ((-0.619705560618-0.761425293118j))*x_ref[1]**o + ((-0.341573764319+0.292846708288j))*x_ref[1]
+        arg[(3, 0, 2, 2)]=(0.0696642858374+0.203209577004j)*x[0]**o + ((-0.739005321961-0.935655898231j))*x[0] + ((-0.5815082192+0.382483519688j))*x[1]**o + ((-0.128588532115-0.69268690674j))*x[1]
+        ref[(3, 0, 2, 2)]=(0.0696642858374+0.203209577004j)*x_ref[0]**o + ((-0.739005321961-0.935655898231j))*x_ref[0] + ((-0.5815082192+0.382483519688j))*x_ref[1]**o + ((-0.128588532115-0.69268690674j))*x_ref[1]
+        arg[(3, 0, 3, 0)]=(-0.846489286293+0.0581210450176j)*x[0]**o + ((0.406363396687+0.801465630604j))*x[0] + ((0.422877247924-0.867308613003j))*x[1]**o + ((0.733394032858-0.965690790733j))*x[1]
+        ref[(3, 0, 3, 0)]=(-0.846489286293+0.0581210450176j)*x_ref[0]**o + ((0.406363396687+0.801465630604j))*x_ref[0] + ((0.422877247924-0.867308613003j))*x_ref[1]**o + ((0.733394032858-0.965690790733j))*x_ref[1]
+        arg[(3, 0, 3, 1)]=(0.898364882079-0.359100212582j)*x[0]**o + ((0.729032649765-0.431332241729j))*x[0] + ((0.518750048319-0.286089172812j))*x[1]**o + ((-0.844075263058-0.963691615226j))*x[1]
+        ref[(3, 0, 3, 1)]=(0.898364882079-0.359100212582j)*x_ref[0]**o + ((0.729032649765-0.431332241729j))*x_ref[0] + ((0.518750048319-0.286089172812j))*x_ref[1]**o + ((-0.844075263058-0.963691615226j))*x_ref[1]
+        arg[(3, 0, 3, 2)]=(0.0355911382366+0.215141615094j)*x[0]**o + ((0.0229777840057+0.929788254235j))*x[0] + ((0.35916084834-0.850441985194j))*x[1]**o + ((-0.589444304755+0.890125447286j))*x[1]
+        ref[(3, 0, 3, 2)]=(0.0355911382366+0.215141615094j)*x_ref[0]**o + ((0.0229777840057+0.929788254235j))*x_ref[0] + ((0.35916084834-0.850441985194j))*x_ref[1]**o + ((-0.589444304755+0.890125447286j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.566235588324+0.425232254366j)*x[0]**o + ((-0.64306208594-0.24196274473j))*x[0] + ((0.382030724753-0.741999046465j))*x[1]**o + ((0.209937056831-0.213018756511j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.566235588324+0.425232254366j)*x_ref[0]**o + ((-0.64306208594-0.24196274473j))*x_ref[0] + ((0.382030724753-0.741999046465j))*x_ref[1]**o + ((0.209937056831-0.213018756511j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(-0.609636169021-0.0816512742802j)*x[0]**o + ((0.710936370045+0.372290836954j))*x[0] + ((-0.145133118471-0.240083014471j))*x[1]**o + ((-0.0263838047695-0.655001105459j))*x[1]
+        ref[(3, 1, 0, 1)]=(-0.609636169021-0.0816512742802j)*x_ref[0]**o + ((0.710936370045+0.372290836954j))*x_ref[0] + ((-0.145133118471-0.240083014471j))*x_ref[1]**o + ((-0.0263838047695-0.655001105459j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(0.795717405926-0.726456373086j)*x[0]**o + ((0.0374396604932-0.523596305975j))*x[0] + ((-0.862019961222+0.992284116136j))*x[1]**o + ((0.544693739193-0.50909942754j))*x[1]
+        ref[(3, 1, 0, 2)]=(0.795717405926-0.726456373086j)*x_ref[0]**o + ((0.0374396604932-0.523596305975j))*x_ref[0] + ((-0.862019961222+0.992284116136j))*x_ref[1]**o + ((0.544693739193-0.50909942754j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.5294255542-0.269093254549j)*x[0]**o + ((0.715143204704-0.0304707829694j))*x[0] + ((0.0805574648522-0.286518528931j))*x[1]**o + ((0.382684632478+0.0843481245035j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.5294255542-0.269093254549j)*x_ref[0]**o + ((0.715143204704-0.0304707829694j))*x_ref[0] + ((0.0805574648522-0.286518528931j))*x_ref[1]**o + ((0.382684632478+0.0843481245035j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.0594413732725-0.563239523124j)*x[0]**o + ((-0.300643022443+0.50540930871j))*x[0] + ((0.903316408933-0.348679319669j))*x[1]**o + ((0.677120390263+0.968733119098j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.0594413732725-0.563239523124j)*x_ref[0]**o + ((-0.300643022443+0.50540930871j))*x_ref[0] + ((0.903316408933-0.348679319669j))*x_ref[1]**o + ((0.677120390263+0.968733119098j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(-0.983722895234+0.870120562598j)*x[0]**o + ((-0.722086950416-0.000763717892243j))*x[0] + ((0.531870533787-0.757185447832j))*x[1]**o + ((-0.653727051185+0.653300945514j))*x[1]
+        ref[(3, 1, 1, 2)]=(-0.983722895234+0.870120562598j)*x_ref[0]**o + ((-0.722086950416-0.000763717892243j))*x_ref[0] + ((0.531870533787-0.757185447832j))*x_ref[1]**o + ((-0.653727051185+0.653300945514j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(0.335361670402+0.566730679073j)*x[0]**o + ((-0.96804751558+0.380492834388j))*x[0] + ((-0.525449883084+0.639101748708j))*x[1]**o + ((0.854125068338-0.17276842618j))*x[1]
+        ref[(3, 1, 2, 0)]=(0.335361670402+0.566730679073j)*x_ref[0]**o + ((-0.96804751558+0.380492834388j))*x_ref[0] + ((-0.525449883084+0.639101748708j))*x_ref[1]**o + ((0.854125068338-0.17276842618j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(0.120255145617+0.788229566133j)*x[0]**o + ((0.158387052046+0.908829908786j))*x[0] + ((0.597831036933-0.781890893619j))*x[1]**o + ((-0.380729744841+0.53661823349j))*x[1]
+        ref[(3, 1, 2, 1)]=(0.120255145617+0.788229566133j)*x_ref[0]**o + ((0.158387052046+0.908829908786j))*x_ref[0] + ((0.597831036933-0.781890893619j))*x_ref[1]**o + ((-0.380729744841+0.53661823349j))*x_ref[1]
+        arg[(3, 1, 2, 2)]=(0.797593294207+0.655060673129j)*x[0]**o + ((-0.284820082113+0.656453867112j))*x[0] + ((0.861505398852-0.798381167738j))*x[1]**o + ((-0.545531825433-0.27229562188j))*x[1]
+        ref[(3, 1, 2, 2)]=(0.797593294207+0.655060673129j)*x_ref[0]**o + ((-0.284820082113+0.656453867112j))*x_ref[0] + ((0.861505398852-0.798381167738j))*x_ref[1]**o + ((-0.545531825433-0.27229562188j))*x_ref[1]
+        arg[(3, 1, 3, 0)]=(-0.911050775367+0.33823742642j)*x[0]**o + ((0.458591868416+0.193381421171j))*x[0] + ((-0.0811263217328+0.249363860336j))*x[1]**o + ((0.268430655715+0.704375531705j))*x[1]
+        ref[(3, 1, 3, 0)]=(-0.911050775367+0.33823742642j)*x_ref[0]**o + ((0.458591868416+0.193381421171j))*x_ref[0] + ((-0.0811263217328+0.249363860336j))*x_ref[1]**o + ((0.268430655715+0.704375531705j))*x_ref[1]
+        arg[(3, 1, 3, 1)]=(-0.585448613943+0.529621133255j)*x[0]**o + ((0.732117761808+0.140765236949j))*x[0] + ((-0.7137892504+0.685502283066j))*x[1]**o + ((-0.274985300779+0.854475772261j))*x[1]
+        ref[(3, 1, 3, 1)]=(-0.585448613943+0.529621133255j)*x_ref[0]**o + ((0.732117761808+0.140765236949j))*x_ref[0] + ((-0.7137892504+0.685502283066j))*x_ref[1]**o + ((-0.274985300779+0.854475772261j))*x_ref[1]
+        arg[(3, 1, 3, 2)]=(0.598051061775+0.877458633441j)*x[0]**o + ((0.293076200079+0.670823018915j))*x[0] + ((-0.891963457658+0.520248628702j))*x[1]**o + ((-0.964449197795+0.613241168392j))*x[1]
+        ref[(3, 1, 3, 2)]=(0.598051061775+0.877458633441j)*x_ref[0]**o + ((0.293076200079+0.670823018915j))*x_ref[0] + ((-0.891963457658+0.520248628702j))*x_ref[1]**o + ((-0.964449197795+0.613241168392j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(-0.718975863676-0.332664002288j)*x[0]**o + ((-0.443730750724-0.932124077936j))*x[0] + ((0.432848950492+0.907323488326j))*x[1]**o + ((-0.739184176248+0.511285301677j))*x[1]
+        ref[(3, 2, 0, 0)]=(-0.718975863676-0.332664002288j)*x_ref[0]**o + ((-0.443730750724-0.932124077936j))*x_ref[0] + ((0.432848950492+0.907323488326j))*x_ref[1]**o + ((-0.739184176248+0.511285301677j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(-0.237765880273-0.866694715323j)*x[0]**o + ((-0.485636741337+0.230771807971j))*x[0] + ((-0.522061583216+0.621202876092j))*x[1]**o + ((-0.893116128337-0.491995810468j))*x[1]
+        ref[(3, 2, 0, 1)]=(-0.237765880273-0.866694715323j)*x_ref[0]**o + ((-0.485636741337+0.230771807971j))*x_ref[0] + ((-0.522061583216+0.621202876092j))*x_ref[1]**o + ((-0.893116128337-0.491995810468j))*x_ref[1]
+        arg[(3, 2, 0, 2)]=(0.647142887497+0.317778226328j)*x[0]**o + ((0.860288975998-0.730771775046j))*x[0] + ((0.125521881476+0.0900042829667j))*x[1]**o + ((-0.507864282756+0.0099710279617j))*x[1]
+        ref[(3, 2, 0, 2)]=(0.647142887497+0.317778226328j)*x_ref[0]**o + ((0.860288975998-0.730771775046j))*x_ref[0] + ((0.125521881476+0.0900042829667j))*x_ref[1]**o + ((-0.507864282756+0.0099710279617j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.12068421239+0.615043403814j)*x[0]**o + ((-0.510738407329-0.150318785709j))*x[0] + ((0.91678297677+0.0049588894979j))*x[1]**o + ((0.519609994621-0.907671254722j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.12068421239+0.615043403814j)*x_ref[0]**o + ((-0.510738407329-0.150318785709j))*x_ref[0] + ((0.91678297677+0.0049588894979j))*x_ref[1]**o + ((0.519609994621-0.907671254722j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(-0.0371498462898+0.452361793295j)*x[0]**o + ((-0.975397142924-0.899990053725j))*x[0] + ((0.908880380142-0.911660197066j))*x[1]**o + ((0.677658050917-0.845655799768j))*x[1]
+        ref[(3, 2, 1, 1)]=(-0.0371498462898+0.452361793295j)*x_ref[0]**o + ((-0.975397142924-0.899990053725j))*x_ref[0] + ((0.908880380142-0.911660197066j))*x_ref[1]**o + ((0.677658050917-0.845655799768j))*x_ref[1]
+        arg[(3, 2, 1, 2)]=(-0.341373127654-0.639757618725j)*x[0]**o + ((-0.0368444298638-0.15872708785j))*x[0] + ((-0.971974465441+0.922587120951j))*x[1]**o + ((0.733115577169+0.0228638888076j))*x[1]
+        ref[(3, 2, 1, 2)]=(-0.341373127654-0.639757618725j)*x_ref[0]**o + ((-0.0368444298638-0.15872708785j))*x_ref[0] + ((-0.971974465441+0.922587120951j))*x_ref[1]**o + ((0.733115577169+0.0228638888076j))*x_ref[1]
+        arg[(3, 2, 2, 0)]=(-0.165997523089-0.225079098417j)*x[0]**o + ((0.951005768955-0.150345380578j))*x[0] + ((-0.435546691768-0.097941979935j))*x[1]**o + ((-0.822816549977-0.163704937498j))*x[1]
+        ref[(3, 2, 2, 0)]=(-0.165997523089-0.225079098417j)*x_ref[0]**o + ((0.951005768955-0.150345380578j))*x_ref[0] + ((-0.435546691768-0.097941979935j))*x_ref[1]**o + ((-0.822816549977-0.163704937498j))*x_ref[1]
+        arg[(3, 2, 2, 1)]=(-0.275708589804+0.0447242486761j)*x[0]**o + ((-0.784767603912-0.304343810649j))*x[0] + ((0.361920909326-0.368866578393j))*x[1]**o + ((0.129130045681-0.556281196241j))*x[1]
+        ref[(3, 2, 2, 1)]=(-0.275708589804+0.0447242486761j)*x_ref[0]**o + ((-0.784767603912-0.304343810649j))*x_ref[0] + ((0.361920909326-0.368866578393j))*x_ref[1]**o + ((0.129130045681-0.556281196241j))*x_ref[1]
+        arg[(3, 2, 2, 2)]=(-0.858484293875+0.996630292497j)*x[0]**o + ((0.698315458285+0.6521059613j))*x[0] + ((-0.196322872258+0.575150612828j))*x[1]**o + ((-0.292205090398-0.586829953247j))*x[1]
+        ref[(3, 2, 2, 2)]=(-0.858484293875+0.996630292497j)*x_ref[0]**o + ((0.698315458285+0.6521059613j))*x_ref[0] + ((-0.196322872258+0.575150612828j))*x_ref[1]**o + ((-0.292205090398-0.586829953247j))*x_ref[1]
+        arg[(3, 2, 3, 0)]=(-0.304748460983+0.889963336864j)*x[0]**o + ((-0.763203613421-0.598159225837j))*x[0] + ((-0.864008494279+0.625442470717j))*x[1]**o + ((0.326800998559-0.442755845225j))*x[1]
+        ref[(3, 2, 3, 0)]=(-0.304748460983+0.889963336864j)*x_ref[0]**o + ((-0.763203613421-0.598159225837j))*x_ref[0] + ((-0.864008494279+0.625442470717j))*x_ref[1]**o + ((0.326800998559-0.442755845225j))*x_ref[1]
+        arg[(3, 2, 3, 1)]=(0.057202089256-0.255866335516j)*x[0]**o + ((-0.886329357203+0.410200027675j))*x[0] + ((-0.010966137179+0.0909543915578j))*x[1]**o + ((-0.332819305224+0.186446690581j))*x[1]
+        ref[(3, 2, 3, 1)]=(0.057202089256-0.255866335516j)*x_ref[0]**o + ((-0.886329357203+0.410200027675j))*x_ref[0] + ((-0.010966137179+0.0909543915578j))*x_ref[1]**o + ((-0.332819305224+0.186446690581j))*x_ref[1]
+        arg[(3, 2, 3, 2)]=(-0.365869524854+0.581882877101j)*x[0]**o + ((-0.406923336354+0.126332335142j))*x[0] + ((0.138801135073+0.659214768242j))*x[1]**o + ((0.44753456567+0.282545046852j))*x[1]
+        ref[(3, 2, 3, 2)]=(-0.365869524854+0.581882877101j)*x_ref[0]**o + ((-0.406923336354+0.126332335142j))*x_ref[0] + ((0.138801135073+0.659214768242j))*x_ref[1]**o + ((0.44753456567+0.282545046852j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.455669256727+0.585843947431j)*x[2]**o + ((0.826563890548-0.691217762902j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.455669256727+0.585843947431j)*x_ref[2]**o + ((0.826563890548-0.691217762902j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.912160596049+0.987340769126j)*x[2]**o + ((-0.242810303666+0.733236406643j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.912160596049+0.987340769126j)*x_ref[2]**o + ((-0.242810303666+0.733236406643j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.158829064265+0.22595751356j)*x[2]**o + ((0.463508482202-0.876895160867j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.158829064265+0.22595751356j)*x_ref[2]**o + ((0.463508482202-0.876895160867j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.321636041432+0.842476228578j)*x[2]**o + ((-0.786958544162+0.74482992009j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.321636041432+0.842476228578j)*x_ref[2]**o + ((-0.786958544162+0.74482992009j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.737759595883+0.230213992543j)*x[2]**o + ((0.712870126874-0.707335218555j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.737759595883+0.230213992543j)*x_ref[2]**o + ((0.712870126874-0.707335218555j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.730306353229+0.632160237059j)*x[2]**o + ((-0.94446985919-0.676034297403j))*x[2]
+            ref[(0, 0, 1, 2)]+=(0.730306353229+0.632160237059j)*x_ref[2]**o + ((-0.94446985919-0.676034297403j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.320198306797-0.708260006477j)*x[2]**o + ((-0.835302151371+0.8034229943j))*x[2]
+            ref[(0, 0, 2, 0)]+=(0.320198306797-0.708260006477j)*x_ref[2]**o + ((-0.835302151371+0.8034229943j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.759400962983-0.326570599046j)*x[2]**o + ((0.521024054214+0.745076377053j))*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.759400962983-0.326570599046j)*x_ref[2]**o + ((0.521024054214+0.745076377053j))*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(0.493874828854-0.234744659119j)*x[2]**o + ((-0.169387712717-0.357000443227j))*x[2]
+            ref[(0, 0, 2, 2)]+=(0.493874828854-0.234744659119j)*x_ref[2]**o + ((-0.169387712717-0.357000443227j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(-0.730311034128+0.581689566999j)*x[2]**o + ((0.227333577119+0.599244089862j))*x[2]
+            ref[(0, 0, 3, 0)]+=(-0.730311034128+0.581689566999j)*x_ref[2]**o + ((0.227333577119+0.599244089862j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(0.154876204216-0.631857352705j)*x[2]**o + ((-0.392302352159-0.773036386883j))*x[2]
+            ref[(0, 0, 3, 1)]+=(0.154876204216-0.631857352705j)*x_ref[2]**o + ((-0.392302352159-0.773036386883j))*x_ref[2]
+            arg[(0, 0, 3, 2)]+=(0.389245560888-0.964843660055j)*x[2]**o + ((-0.302346855847+0.72386133509j))*x[2]
+            ref[(0, 0, 3, 2)]+=(0.389245560888-0.964843660055j)*x_ref[2]**o + ((-0.302346855847+0.72386133509j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.949270403637-0.920859018445j)*x[2]**o + ((0.666438798341+0.382878451658j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.949270403637-0.920859018445j)*x_ref[2]**o + ((0.666438798341+0.382878451658j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.559024161446-0.0756814111372j)*x[2]**o + ((-0.517014631437+0.19974586699j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.559024161446-0.0756814111372j)*x_ref[2]**o + ((-0.517014631437+0.19974586699j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.72118720451-0.388018213216j)*x[2]**o + ((0.192555389248-0.601762381404j))*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.72118720451-0.388018213216j)*x_ref[2]**o + ((0.192555389248-0.601762381404j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.728201119619+0.226477127936j)*x[2]**o + ((-0.209008848448-0.348930476791j))*x[2]
+            ref[(0, 1, 1, 0)]+=(0.728201119619+0.226477127936j)*x_ref[2]**o + ((-0.209008848448-0.348930476791j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.452228666437+0.834101846439j)*x[2]**o + ((-0.297746488184+0.792947351137j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.452228666437+0.834101846439j)*x_ref[2]**o + ((-0.297746488184+0.792947351137j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.109567951471-0.782507397732j)*x[2]**o + ((0.148232207768+0.346136647058j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.109567951471-0.782507397732j)*x_ref[2]**o + ((0.148232207768+0.346136647058j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(-0.0290256784671-0.32318195467j)*x[2]**o + ((0.260946013121-0.164047788173j))*x[2]
+            ref[(0, 1, 2, 0)]+=(-0.0290256784671-0.32318195467j)*x_ref[2]**o + ((0.260946013121-0.164047788173j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.567241445405-0.314701069878j)*x[2]**o + ((0.706769711686+0.226827565658j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.567241445405-0.314701069878j)*x_ref[2]**o + ((0.706769711686+0.226827565658j))*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(-0.205438716212-0.0788311485517j)*x[2]**o + ((0.277528138496+0.303577866538j))*x[2]
+            ref[(0, 1, 2, 2)]+=(-0.205438716212-0.0788311485517j)*x_ref[2]**o + ((0.277528138496+0.303577866538j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(0.73380166083-0.1227061878j)*x[2]**o + ((0.691032325362+0.44966304132j))*x[2]
+            ref[(0, 1, 3, 0)]+=(0.73380166083-0.1227061878j)*x_ref[2]**o + ((0.691032325362+0.44966304132j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(-0.753304661909-0.0608622838578j)*x[2]**o + ((-0.883824702557+0.923566303186j))*x[2]
+            ref[(0, 1, 3, 1)]+=(-0.753304661909-0.0608622838578j)*x_ref[2]**o + ((-0.883824702557+0.923566303186j))*x_ref[2]
+            arg[(0, 1, 3, 2)]+=(-0.554409734116-0.798567624699j)*x[2]**o + ((-0.34980735242-0.306268470947j))*x[2]
+            ref[(0, 1, 3, 2)]+=(-0.554409734116-0.798567624699j)*x_ref[2]**o + ((-0.34980735242-0.306268470947j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.0744622991279+0.882943386511j)*x[2]**o + ((-0.18525427456-0.747104196425j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.0744622991279+0.882943386511j)*x_ref[2]**o + ((-0.18525427456-0.747104196425j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.379463729754+0.16113121933j)*x[2]**o + ((-0.720214208546-0.421038582519j))*x[2]
+            ref[(0, 2, 0, 1)]+=(0.379463729754+0.16113121933j)*x_ref[2]**o + ((-0.720214208546-0.421038582519j))*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(-0.626130665669-0.0598902395339j)*x[2]**o + ((-0.441509572325-0.128273853894j))*x[2]
+            ref[(0, 2, 0, 2)]+=(-0.626130665669-0.0598902395339j)*x_ref[2]**o + ((-0.441509572325-0.128273853894j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.501966903722+0.692256963656j)*x[2]**o + ((0.142363838746-0.273310717145j))*x[2]
+            ref[(0, 2, 1, 0)]+=(0.501966903722+0.692256963656j)*x_ref[2]**o + ((0.142363838746-0.273310717145j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(0.210475258941-0.298926046329j)*x[2]**o + ((-0.699494305281+0.499693235091j))*x[2]
+            ref[(0, 2, 1, 1)]+=(0.210475258941-0.298926046329j)*x_ref[2]**o + ((-0.699494305281+0.499693235091j))*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.125436286485-0.694129840849j)*x[2]**o + ((-0.679713134234+0.486032593286j))*x[2]
+            ref[(0, 2, 1, 2)]+=(0.125436286485-0.694129840849j)*x_ref[2]**o + ((-0.679713134234+0.486032593286j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.492922850001+0.080661749199j)*x[2]**o + ((-0.988643961102-0.698341374921j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.492922850001+0.080661749199j)*x_ref[2]**o + ((-0.988643961102-0.698341374921j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(0.335372496608+0.751654962742j)*x[2]**o + ((0.484951291727-0.817022582215j))*x[2]
+            ref[(0, 2, 2, 1)]+=(0.335372496608+0.751654962742j)*x_ref[2]**o + ((0.484951291727-0.817022582215j))*x_ref[2]
+            arg[(0, 2, 2, 2)]+=(-0.509569264826+0.577287736681j)*x[2]**o + ((0.562643616674-0.193989703878j))*x[2]
+            ref[(0, 2, 2, 2)]+=(-0.509569264826+0.577287736681j)*x_ref[2]**o + ((0.562643616674-0.193989703878j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(0.0163684652675+0.785251899874j)*x[2]**o + ((0.695706176659-0.333453760644j))*x[2]
+            ref[(0, 2, 3, 0)]+=(0.0163684652675+0.785251899874j)*x_ref[2]**o + ((0.695706176659-0.333453760644j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(0.940746351496-0.211567578205j)*x[2]**o + ((0.617243894967-0.291657990903j))*x[2]
+            ref[(0, 2, 3, 1)]+=(0.940746351496-0.211567578205j)*x_ref[2]**o + ((0.617243894967-0.291657990903j))*x_ref[2]
+            arg[(0, 2, 3, 2)]+=(0.0314008644331+0.0401285003315j)*x[2]**o + ((-0.420343191013-0.0353858431837j))*x[2]
+            ref[(0, 2, 3, 2)]+=(0.0314008644331+0.0401285003315j)*x_ref[2]**o + ((-0.420343191013-0.0353858431837j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.382423181854-0.662752677838j)*x[2]**o + ((-0.242572770747+0.689327181028j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.382423181854-0.662752677838j)*x_ref[2]**o + ((-0.242572770747+0.689327181028j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.199965683209+0.691449014357j)*x[2]**o + ((-0.581977727924-0.740880608061j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.199965683209+0.691449014357j)*x_ref[2]**o + ((-0.581977727924-0.740880608061j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.645310235797+0.793476249651j)*x[2]**o + ((0.476532880406+0.805515365868j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.645310235797+0.793476249651j)*x_ref[2]**o + ((0.476532880406+0.805515365868j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.230306239452-0.26287246807j)*x[2]**o + ((0.53820727281+0.500687842572j))*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.230306239452-0.26287246807j)*x_ref[2]**o + ((0.53820727281+0.500687842572j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.32483812069+0.761848059058j)*x[2]**o + ((0.232713936777+0.189581716189j))*x[2]
+            ref[(1, 0, 1, 1)]+=(0.32483812069+0.761848059058j)*x_ref[2]**o + ((0.232713936777+0.189581716189j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(-0.74555221949+0.762214167518j)*x[2]**o + ((0.742450789932+0.856386399093j))*x[2]
+            ref[(1, 0, 1, 2)]+=(-0.74555221949+0.762214167518j)*x_ref[2]**o + ((0.742450789932+0.856386399093j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(-0.19341945943-0.68381495175j)*x[2]**o + ((0.338089930358-0.354881837523j))*x[2]
+            ref[(1, 0, 2, 0)]+=(-0.19341945943-0.68381495175j)*x_ref[2]**o + ((0.338089930358-0.354881837523j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(-0.9467403546+0.436344343527j)*x[2]**o + ((0.0652205036895-0.0391319966399j))*x[2]
+            ref[(1, 0, 2, 1)]+=(-0.9467403546+0.436344343527j)*x_ref[2]**o + ((0.0652205036895-0.0391319966399j))*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(0.16336979629-0.495780491691j)*x[2]**o + ((-0.581882604675+0.107991555392j))*x[2]
+            ref[(1, 0, 2, 2)]+=(0.16336979629-0.495780491691j)*x_ref[2]**o + ((-0.581882604675+0.107991555392j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(-0.909963071029-0.640526679939j)*x[2]**o + ((-0.918394665458+0.962986501935j))*x[2]
+            ref[(1, 0, 3, 0)]+=(-0.909963071029-0.640526679939j)*x_ref[2]**o + ((-0.918394665458+0.962986501935j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(-0.317035307781-0.771296516916j)*x[2]**o + ((0.350859807753-0.811188354198j))*x[2]
+            ref[(1, 0, 3, 1)]+=(-0.317035307781-0.771296516916j)*x_ref[2]**o + ((0.350859807753-0.811188354198j))*x_ref[2]
+            arg[(1, 0, 3, 2)]+=(-0.461216991382+0.792480519656j)*x[2]**o + ((-0.741091637639-0.805758720606j))*x[2]
+            ref[(1, 0, 3, 2)]+=(-0.461216991382+0.792480519656j)*x_ref[2]**o + ((-0.741091637639-0.805758720606j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.535055157002+0.508284803502j)*x[2]**o + ((-0.573066148017-0.420690207132j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.535055157002+0.508284803502j)*x_ref[2]**o + ((-0.573066148017-0.420690207132j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.785004656162+0.514604567441j)*x[2]**o + ((0.102201805995-0.36957308214j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.785004656162+0.514604567441j)*x_ref[2]**o + ((0.102201805995-0.36957308214j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(0.154497825597-0.930826753891j)*x[2]**o + ((-0.905436566165+0.807116966551j))*x[2]
+            ref[(1, 1, 0, 2)]+=(0.154497825597-0.930826753891j)*x_ref[2]**o + ((-0.905436566165+0.807116966551j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.996301544194-0.511243599541j)*x[2]**o + ((0.174072756853+0.714672621614j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.996301544194-0.511243599541j)*x_ref[2]**o + ((0.174072756853+0.714672621614j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.271270974531+0.727547979684j)*x[2]**o + ((0.638892733017-0.198955925356j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.271270974531+0.727547979684j)*x_ref[2]**o + ((0.638892733017-0.198955925356j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.10959356082+0.735972817962j)*x[2]**o + ((0.727387322769-0.391869061745j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.10959356082+0.735972817962j)*x_ref[2]**o + ((0.727387322769-0.391869061745j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.831217464609-0.952675179302j)*x[2]**o + ((-0.904785340391+0.122558106076j))*x[2]
+            ref[(1, 1, 2, 0)]+=(0.831217464609-0.952675179302j)*x_ref[2]**o + ((-0.904785340391+0.122558106076j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(0.589530312531-0.23091376802j)*x[2]**o + ((0.603897024367-0.28200345595j))*x[2]
+            ref[(1, 1, 2, 1)]+=(0.589530312531-0.23091376802j)*x_ref[2]**o + ((0.603897024367-0.28200345595j))*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(-0.704368992584-0.291394097308j)*x[2]**o + ((0.871612678231+0.0763246254778j))*x[2]
+            ref[(1, 1, 2, 2)]+=(-0.704368992584-0.291394097308j)*x_ref[2]**o + ((0.871612678231+0.0763246254778j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(0.319101601679-0.9924496928j)*x[2]**o + ((0.166353149-0.914057792162j))*x[2]
+            ref[(1, 1, 3, 0)]+=(0.319101601679-0.9924496928j)*x_ref[2]**o + ((0.166353149-0.914057792162j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(-0.507472643255+0.419865445032j)*x[2]**o + ((-0.446644981956+0.759486988566j))*x[2]
+            ref[(1, 1, 3, 1)]+=(-0.507472643255+0.419865445032j)*x_ref[2]**o + ((-0.446644981956+0.759486988566j))*x_ref[2]
+            arg[(1, 1, 3, 2)]+=(0.270795588354-0.350623022033j)*x[2]**o + ((-0.612564226267-0.575036515388j))*x[2]
+            ref[(1, 1, 3, 2)]+=(0.270795588354-0.350623022033j)*x_ref[2]**o + ((-0.612564226267-0.575036515388j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.29089887076+0.653625720883j)*x[2]**o + ((-0.924726051241-0.771532477117j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.29089887076+0.653625720883j)*x_ref[2]**o + ((-0.924726051241-0.771532477117j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.721804619492-0.153301226719j)*x[2]**o + ((-0.742065444766-0.940147055126j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.721804619492-0.153301226719j)*x_ref[2]**o + ((-0.742065444766-0.940147055126j))*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(0.462331473864-0.509824746875j)*x[2]**o + ((0.936008090349-0.694500362899j))*x[2]
+            ref[(1, 2, 0, 2)]+=(0.462331473864-0.509824746875j)*x_ref[2]**o + ((0.936008090349-0.694500362899j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.972625987375+0.794885273634j)*x[2]**o + ((0.774840777821+0.300794792889j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.972625987375+0.794885273634j)*x_ref[2]**o + ((0.774840777821+0.300794792889j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.0205981507618+0.971982119262j)*x[2]**o + ((-0.542865373189-0.747265479787j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.0205981507618+0.971982119262j)*x_ref[2]**o + ((-0.542865373189-0.747265479787j))*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.720689274063-0.26381514471j)*x[2]**o + ((0.919010871645+0.812710136365j))*x[2]
+            ref[(1, 2, 1, 2)]+=(0.720689274063-0.26381514471j)*x_ref[2]**o + ((0.919010871645+0.812710136365j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.168547179487+0.90483529112j)*x[2]**o + ((0.584460438207-0.404337990597j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.168547179487+0.90483529112j)*x_ref[2]**o + ((0.584460438207-0.404337990597j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.526200383751-0.28778700048j)*x[2]**o + ((0.642352723709-0.483528243292j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.526200383751-0.28778700048j)*x_ref[2]**o + ((0.642352723709-0.483528243292j))*x_ref[2]
+            arg[(1, 2, 2, 2)]+=(0.415565675411-0.973602798415j)*x[2]**o + ((0.222402871257-0.592662162052j))*x[2]
+            ref[(1, 2, 2, 2)]+=(0.415565675411-0.973602798415j)*x_ref[2]**o + ((0.222402871257-0.592662162052j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(0.312097998143+0.193149996515j)*x[2]**o + ((-0.457632446499+0.928789704346j))*x[2]
+            ref[(1, 2, 3, 0)]+=(0.312097998143+0.193149996515j)*x_ref[2]**o + ((-0.457632446499+0.928789704346j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(-0.423917378786+0.322402889531j)*x[2]**o + ((-0.219815356265-0.751210124305j))*x[2]
+            ref[(1, 2, 3, 1)]+=(-0.423917378786+0.322402889531j)*x_ref[2]**o + ((-0.219815356265-0.751210124305j))*x_ref[2]
+            arg[(1, 2, 3, 2)]+=(-0.0842257004613-0.673992637662j)*x[2]**o + ((-0.654661275289-0.900696394639j))*x[2]
+            ref[(1, 2, 3, 2)]+=(-0.0842257004613-0.673992637662j)*x_ref[2]**o + ((-0.654661275289-0.900696394639j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.45470589712+0.538585217131j)*x[2]**o + ((0.143411480232-0.876134518158j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.45470589712+0.538585217131j)*x_ref[2]**o + ((0.143411480232-0.876134518158j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.146472506426+0.596295283691j)*x[2]**o + ((0.118639482887+0.734060398743j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.146472506426+0.596295283691j)*x_ref[2]**o + ((0.118639482887+0.734060398743j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.338627020863-0.573962953263j)*x[2]**o + ((0.148506860109+0.540151700823j))*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.338627020863-0.573962953263j)*x_ref[2]**o + ((0.148506860109+0.540151700823j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.0905384976111+0.0845211512512j)*x[2]**o + ((0.508055015315-0.115674913553j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.0905384976111+0.0845211512512j)*x_ref[2]**o + ((0.508055015315-0.115674913553j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.263827702823+0.0314173587656j)*x[2]**o + ((-0.379684623104-0.652701730691j))*x[2]
+            ref[(2, 0, 1, 1)]+=(0.263827702823+0.0314173587656j)*x_ref[2]**o + ((-0.379684623104-0.652701730691j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.587123180142-0.993158843782j)*x[2]**o + ((-0.720430294663-0.897847438806j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.587123180142-0.993158843782j)*x_ref[2]**o + ((-0.720430294663-0.897847438806j))*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(0.896859363164-0.493766830461j)*x[2]**o + ((-0.159133072436+0.564025846187j))*x[2]
+            ref[(2, 0, 2, 0)]+=(0.896859363164-0.493766830461j)*x_ref[2]**o + ((-0.159133072436+0.564025846187j))*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(-0.0654406460297-0.211609224746j)*x[2]**o + ((0.339635477122-0.65078683578j))*x[2]
+            ref[(2, 0, 2, 1)]+=(-0.0654406460297-0.211609224746j)*x_ref[2]**o + ((0.339635477122-0.65078683578j))*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(0.625016834267+0.459302039335j)*x[2]**o + ((0.65334371962-0.996216337764j))*x[2]
+            ref[(2, 0, 2, 2)]+=(0.625016834267+0.459302039335j)*x_ref[2]**o + ((0.65334371962-0.996216337764j))*x_ref[2]
+            arg[(2, 0, 3, 0)]+=(0.186059793761+0.484131321187j)*x[2]**o + ((-0.662584698453+0.589734781982j))*x[2]
+            ref[(2, 0, 3, 0)]+=(0.186059793761+0.484131321187j)*x_ref[2]**o + ((-0.662584698453+0.589734781982j))*x_ref[2]
+            arg[(2, 0, 3, 1)]+=(0.22439272537-0.733734093735j)*x[2]**o + ((0.969370388479-0.70865607743j))*x[2]
+            ref[(2, 0, 3, 1)]+=(0.22439272537-0.733734093735j)*x_ref[2]**o + ((0.969370388479-0.70865607743j))*x_ref[2]
+            arg[(2, 0, 3, 2)]+=(0.859236489947-0.206367725533j)*x[2]**o + ((0.237154476893+0.0323121127375j))*x[2]
+            ref[(2, 0, 3, 2)]+=(0.859236489947-0.206367725533j)*x_ref[2]**o + ((0.237154476893+0.0323121127375j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.52230287294+0.408949194348j)*x[2]**o + ((-0.888747914622-0.541499130692j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.52230287294+0.408949194348j)*x_ref[2]**o + ((-0.888747914622-0.541499130692j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.924185277481+0.510032931658j)*x[2]**o + ((0.484023552923+0.258184430881j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.924185277481+0.510032931658j)*x_ref[2]**o + ((0.484023552923+0.258184430881j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.61349260983-0.81075165681j)*x[2]**o + ((0.359377712944+0.434965393214j))*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.61349260983-0.81075165681j)*x_ref[2]**o + ((0.359377712944+0.434965393214j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.513512080449+0.883196411144j)*x[2]**o + ((0.83064747776-0.661581886568j))*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.513512080449+0.883196411144j)*x_ref[2]**o + ((0.83064747776-0.661581886568j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.190294035211-0.142276177729j)*x[2]**o + ((-0.940138420174-0.645816145049j))*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.190294035211-0.142276177729j)*x_ref[2]**o + ((-0.940138420174-0.645816145049j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.686620304103-0.938026205177j)*x[2]**o + ((-0.701847835422+0.59825505709j))*x[2]
+            ref[(2, 1, 1, 2)]+=(0.686620304103-0.938026205177j)*x_ref[2]**o + ((-0.701847835422+0.59825505709j))*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(0.252008852604+0.663870248034j)*x[2]**o + ((-0.126315460514+0.609134436265j))*x[2]
+            ref[(2, 1, 2, 0)]+=(0.252008852604+0.663870248034j)*x_ref[2]**o + ((-0.126315460514+0.609134436265j))*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(-0.679964509787+0.87354610267j)*x[2]**o + ((0.657414055941+0.5083279384j))*x[2]
+            ref[(2, 1, 2, 1)]+=(-0.679964509787+0.87354610267j)*x_ref[2]**o + ((0.657414055941+0.5083279384j))*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(-0.546112885096-0.573102817131j)*x[2]**o + ((-0.48463038242-0.964455801391j))*x[2]
+            ref[(2, 1, 2, 2)]+=(-0.546112885096-0.573102817131j)*x_ref[2]**o + ((-0.48463038242-0.964455801391j))*x_ref[2]
+            arg[(2, 1, 3, 0)]+=(0.0121649223622-0.148659223599j)*x[2]**o + ((0.924546095294+0.0690406683798j))*x[2]
+            ref[(2, 1, 3, 0)]+=(0.0121649223622-0.148659223599j)*x_ref[2]**o + ((0.924546095294+0.0690406683798j))*x_ref[2]
+            arg[(2, 1, 3, 1)]+=(-0.390975932465-0.883291586093j)*x[2]**o + ((0.0441727017852+0.818151733961j))*x[2]
+            ref[(2, 1, 3, 1)]+=(-0.390975932465-0.883291586093j)*x_ref[2]**o + ((0.0441727017852+0.818151733961j))*x_ref[2]
+            arg[(2, 1, 3, 2)]+=(0.774121900979+0.417343922987j)*x[2]**o + ((0.30212264407+0.872111459729j))*x[2]
+            ref[(2, 1, 3, 2)]+=(0.774121900979+0.417343922987j)*x_ref[2]**o + ((0.30212264407+0.872111459729j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.116776180902-0.846963804019j)*x[2]**o + ((-0.419671627002-0.500004878027j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.116776180902-0.846963804019j)*x_ref[2]**o + ((-0.419671627002-0.500004878027j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.701861821572-0.176040737107j)*x[2]**o + ((-0.265275984528-0.637291408307j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.701861821572-0.176040737107j)*x_ref[2]**o + ((-0.265275984528-0.637291408307j))*x_ref[2]
+            arg[(2, 2, 0, 2)]+=(0.301310026259+0.67810841782j)*x[2]**o + ((0.40925497668-0.400435652921j))*x[2]
+            ref[(2, 2, 0, 2)]+=(0.301310026259+0.67810841782j)*x_ref[2]**o + ((0.40925497668-0.400435652921j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.66259299249+0.295695824659j)*x[2]**o + ((-0.284256105559-0.429297534359j))*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.66259299249+0.295695824659j)*x_ref[2]**o + ((-0.284256105559-0.429297534359j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(-0.310349311997+0.436139828384j)*x[2]**o + ((-0.340380926764-0.723878413492j))*x[2]
+            ref[(2, 2, 1, 1)]+=(-0.310349311997+0.436139828384j)*x_ref[2]**o + ((-0.340380926764-0.723878413492j))*x_ref[2]
+            arg[(2, 2, 1, 2)]+=(0.685225598783-0.844000701115j)*x[2]**o + ((0.558269918274+0.770504433056j))*x[2]
+            ref[(2, 2, 1, 2)]+=(0.685225598783-0.844000701115j)*x_ref[2]**o + ((0.558269918274+0.770504433056j))*x_ref[2]
+            arg[(2, 2, 2, 0)]+=(0.784862715024+0.652313472863j)*x[2]**o + ((-0.528470000878+0.52920466877j))*x[2]
+            ref[(2, 2, 2, 0)]+=(0.784862715024+0.652313472863j)*x_ref[2]**o + ((-0.528470000878+0.52920466877j))*x_ref[2]
+            arg[(2, 2, 2, 1)]+=(0.0553774286236+0.343104358322j)*x[2]**o + ((-0.400165188011+0.429972764596j))*x[2]
+            ref[(2, 2, 2, 1)]+=(0.0553774286236+0.343104358322j)*x_ref[2]**o + ((-0.400165188011+0.429972764596j))*x_ref[2]
+            arg[(2, 2, 2, 2)]+=(0.685252885201-0.401791233366j)*x[2]**o + ((0.96671642936+0.280867332368j))*x[2]
+            ref[(2, 2, 2, 2)]+=(0.685252885201-0.401791233366j)*x_ref[2]**o + ((0.96671642936+0.280867332368j))*x_ref[2]
+            arg[(2, 2, 3, 0)]+=(0.595373621184-0.614842922339j)*x[2]**o + ((0.595995589684+0.532855286839j))*x[2]
+            ref[(2, 2, 3, 0)]+=(0.595373621184-0.614842922339j)*x_ref[2]**o + ((0.595995589684+0.532855286839j))*x_ref[2]
+            arg[(2, 2, 3, 1)]+=(-0.522025554263-0.602380144209j)*x[2]**o + ((-0.00236331975555-0.489567313663j))*x[2]
+            ref[(2, 2, 3, 1)]+=(-0.522025554263-0.602380144209j)*x_ref[2]**o + ((-0.00236331975555-0.489567313663j))*x_ref[2]
+            arg[(2, 2, 3, 2)]+=(0.675857179946+0.320581672894j)*x[2]**o + ((-0.0204603343319-0.01832717029j))*x[2]
+            ref[(2, 2, 3, 2)]+=(0.675857179946+0.320581672894j)*x_ref[2]**o + ((-0.0204603343319-0.01832717029j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.0825924111201+0.709186525855j)*x[2]**o + ((0.604961989952+0.861169597497j))*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.0825924111201+0.709186525855j)*x_ref[2]**o + ((0.604961989952+0.861169597497j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(-0.975124350732+0.202977640371j)*x[2]**o + ((0.809398382186+0.352086509563j))*x[2]
+            ref[(3, 0, 0, 1)]+=(-0.975124350732+0.202977640371j)*x_ref[2]**o + ((0.809398382186+0.352086509563j))*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(-0.0997712226633+0.500036648181j)*x[2]**o + ((0.354616071243-0.0616076902738j))*x[2]
+            ref[(3, 0, 0, 2)]+=(-0.0997712226633+0.500036648181j)*x_ref[2]**o + ((0.354616071243-0.0616076902738j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(-0.0386349447324+0.770815102896j)*x[2]**o + ((-0.534317805479-0.642424340231j))*x[2]
+            ref[(3, 0, 1, 0)]+=(-0.0386349447324+0.770815102896j)*x_ref[2]**o + ((-0.534317805479-0.642424340231j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(0.0198686491044-0.451349640403j)*x[2]**o + ((-0.933818008441-0.360360420459j))*x[2]
+            ref[(3, 0, 1, 1)]+=(0.0198686491044-0.451349640403j)*x_ref[2]**o + ((-0.933818008441-0.360360420459j))*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(0.297849278041+0.84837865836j)*x[2]**o + ((0.882268054909-0.950708844479j))*x[2]
+            ref[(3, 0, 1, 2)]+=(0.297849278041+0.84837865836j)*x_ref[2]**o + ((0.882268054909-0.950708844479j))*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(0.405076853518-0.842694268498j)*x[2]**o + ((-0.511198179381-0.964048094353j))*x[2]
+            ref[(3, 0, 2, 0)]+=(0.405076853518-0.842694268498j)*x_ref[2]**o + ((-0.511198179381-0.964048094353j))*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(0.257756674841-0.838593215215j)*x[2]**o + ((0.608571330054-0.267740149868j))*x[2]
+            ref[(3, 0, 2, 1)]+=(0.257756674841-0.838593215215j)*x_ref[2]**o + ((0.608571330054-0.267740149868j))*x_ref[2]
+            arg[(3, 0, 2, 2)]+=(-0.417041172542-0.964970418239j)*x[2]**o + ((-0.277787853636-0.275843902096j))*x[2]
+            ref[(3, 0, 2, 2)]+=(-0.417041172542-0.964970418239j)*x_ref[2]**o + ((-0.277787853636-0.275843902096j))*x_ref[2]
+            arg[(3, 0, 3, 0)]+=(-0.447961633478-0.0201881465471j)*x[2]**o + ((-0.635730055314-0.0762573023895j))*x[2]
+            ref[(3, 0, 3, 0)]+=(-0.447961633478-0.0201881465471j)*x_ref[2]**o + ((-0.635730055314-0.0762573023895j))*x_ref[2]
+            arg[(3, 0, 3, 1)]+=(0.810670258302-0.485714873576j)*x[2]**o + ((0.73069939168-0.146114962329j))*x[2]
+            ref[(3, 0, 3, 1)]+=(0.810670258302-0.485714873576j)*x_ref[2]**o + ((0.73069939168-0.146114962329j))*x_ref[2]
+            arg[(3, 0, 3, 2)]+=(0.0776924760485-0.173717846448j)*x[2]**o + ((0.668888535082-0.290965096898j))*x[2]
+            ref[(3, 0, 3, 2)]+=(0.0776924760485-0.173717846448j)*x_ref[2]**o + ((0.668888535082-0.290965096898j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(-0.38529193593+0.807028324464j)*x[2]**o + ((0.446693567071+0.549629019174j))*x[2]
+            ref[(3, 1, 0, 0)]+=(-0.38529193593+0.807028324464j)*x_ref[2]**o + ((0.446693567071+0.549629019174j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.132688186848-0.627027590411j)*x[2]**o + ((-0.95209092677+0.413274533536j))*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.132688186848-0.627027590411j)*x_ref[2]**o + ((-0.95209092677+0.413274533536j))*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(-0.900139887065-0.784492392609j)*x[2]**o + ((-0.302751755905+0.8554851137j))*x[2]
+            ref[(3, 1, 0, 2)]+=(-0.900139887065-0.784492392609j)*x_ref[2]**o + ((-0.302751755905+0.8554851137j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.176729778176-0.528826102163j)*x[2]**o + ((-0.401746474749+0.210858178964j))*x[2]
+            ref[(3, 1, 1, 0)]+=(0.176729778176-0.528826102163j)*x_ref[2]**o + ((-0.401746474749+0.210858178964j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.399136553154+0.50440559432j)*x[2]**o + ((-0.936054559599+0.760108827023j))*x[2]
+            ref[(3, 1, 1, 1)]+=(0.399136553154+0.50440559432j)*x_ref[2]**o + ((-0.936054559599+0.760108827023j))*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(0.306876148519+0.671788695803j)*x[2]**o + ((-0.00994352524198+0.120510227483j))*x[2]
+            ref[(3, 1, 1, 2)]+=(0.306876148519+0.671788695803j)*x_ref[2]**o + ((-0.00994352524198+0.120510227483j))*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(-0.231839059514+0.00832363872228j)*x[2]**o + ((-0.836621942879+0.317415472644j))*x[2]
+            ref[(3, 1, 2, 0)]+=(-0.231839059514+0.00832363872228j)*x_ref[2]**o + ((-0.836621942879+0.317415472644j))*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(-0.396261088995+0.291117598179j)*x[2]**o + ((-0.911263120754-0.79111297625j))*x[2]
+            ref[(3, 1, 2, 1)]+=(-0.396261088995+0.291117598179j)*x_ref[2]**o + ((-0.911263120754-0.79111297625j))*x_ref[2]
+            arg[(3, 1, 2, 2)]+=(-0.480287280704+0.838645532276j)*x[2]**o + ((0.666121667371-0.213132175504j))*x[2]
+            ref[(3, 1, 2, 2)]+=(-0.480287280704+0.838645532276j)*x_ref[2]**o + ((0.666121667371-0.213132175504j))*x_ref[2]
+            arg[(3, 1, 3, 0)]+=(-0.394294206758-0.90383468112j)*x[2]**o + ((0.419567195141+0.0755601232596j))*x[2]
+            ref[(3, 1, 3, 0)]+=(-0.394294206758-0.90383468112j)*x_ref[2]**o + ((0.419567195141+0.0755601232596j))*x_ref[2]
+            arg[(3, 1, 3, 1)]+=(0.517542621361-0.940326925179j)*x[2]**o + ((-0.549119584579-0.946217825653j))*x[2]
+            ref[(3, 1, 3, 1)]+=(0.517542621361-0.940326925179j)*x_ref[2]**o + ((-0.549119584579-0.946217825653j))*x_ref[2]
+            arg[(3, 1, 3, 2)]+=(-0.338857167777+0.468619328958j)*x[2]**o + ((0.599604315868+0.834461941617j))*x[2]
+            ref[(3, 1, 3, 2)]+=(-0.338857167777+0.468619328958j)*x_ref[2]**o + ((0.599604315868+0.834461941617j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(-0.547859890177-0.929049690876j)*x[2]**o + ((0.424529707201-0.932212263102j))*x[2]
+            ref[(3, 2, 0, 0)]+=(-0.547859890177-0.929049690876j)*x_ref[2]**o + ((0.424529707201-0.932212263102j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(0.471731653977-0.852060877862j)*x[2]**o + ((0.0462731113903-0.762091476756j))*x[2]
+            ref[(3, 2, 0, 1)]+=(0.471731653977-0.852060877862j)*x_ref[2]**o + ((0.0462731113903-0.762091476756j))*x_ref[2]
+            arg[(3, 2, 0, 2)]+=(-0.533616239439-0.291037021403j)*x[2]**o + ((-0.709831715412+0.358413918105j))*x[2]
+            ref[(3, 2, 0, 2)]+=(-0.533616239439-0.291037021403j)*x_ref[2]**o + ((-0.709831715412+0.358413918105j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(0.495870786144-0.73744664381j)*x[2]**o + ((0.555778029281-0.5455225997j))*x[2]
+            ref[(3, 2, 1, 0)]+=(0.495870786144-0.73744664381j)*x_ref[2]**o + ((0.555778029281-0.5455225997j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.803395511557+0.575235425052j)*x[2]**o + ((-0.973889951839+0.335518380585j))*x[2]
+            ref[(3, 2, 1, 1)]+=(0.803395511557+0.575235425052j)*x_ref[2]**o + ((-0.973889951839+0.335518380585j))*x_ref[2]
+            arg[(3, 2, 1, 2)]+=(0.67921153727+0.188943338892j)*x[2]**o + ((-0.147350562102+0.25837343104j))*x[2]
+            ref[(3, 2, 1, 2)]+=(0.67921153727+0.188943338892j)*x_ref[2]**o + ((-0.147350562102+0.25837343104j))*x_ref[2]
+            arg[(3, 2, 2, 0)]+=(-0.624587559299+0.118402377537j)*x[2]**o + ((0.0898860948722-0.376782853534j))*x[2]
+            ref[(3, 2, 2, 0)]+=(-0.624587559299+0.118402377537j)*x_ref[2]**o + ((0.0898860948722-0.376782853534j))*x_ref[2]
+            arg[(3, 2, 2, 1)]+=(-0.932562821483+0.352461293475j)*x[2]**o + ((-0.597493876825+0.458117485755j))*x[2]
+            ref[(3, 2, 2, 1)]+=(-0.932562821483+0.352461293475j)*x_ref[2]**o + ((-0.597493876825+0.458117485755j))*x_ref[2]
+            arg[(3, 2, 2, 2)]+=(0.764836128492+0.638954695369j)*x[2]**o + ((0.367014553289-0.407687004128j))*x[2]
+            ref[(3, 2, 2, 2)]+=(0.764836128492+0.638954695369j)*x_ref[2]**o + ((0.367014553289-0.407687004128j))*x_ref[2]
+            arg[(3, 2, 3, 0)]+=(-0.035860081198-0.09837024032j)*x[2]**o + ((0.177741264058-0.444131505282j))*x[2]
+            ref[(3, 2, 3, 0)]+=(-0.035860081198-0.09837024032j)*x_ref[2]**o + ((0.177741264058-0.444131505282j))*x_ref[2]
+            arg[(3, 2, 3, 1)]+=(-0.38472867376-0.0347520447542j)*x[2]**o + ((0.247400757585-0.953365519726j))*x[2]
+            ref[(3, 2, 3, 1)]+=(-0.38472867376-0.0347520447542j)*x_ref[2]**o + ((0.247400757585-0.953365519726j))*x_ref[2]
+            arg[(3, 2, 3, 2)]+=(0.723135885515+0.0648483975586j)*x[2]**o + ((-0.521629101136-0.527731955442j))*x[2]
+            ref[(3, 2, 3, 2)]+=(0.723135885515+0.0648483975586j)*x_ref[2]**o + ((-0.521629101136-0.527731955442j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.906852178231-0.0048175631039j)*x[0]**o + ((0.215032060866-0.256051105843j))*x[0] + ((-0.396573145493+0.891068934005j))*x[1]**o + ((0.244419509338-0.504351050587j))*x[1]
+        ref=(0.906852178231-0.0048175631039j)*x_ref[0]**o + ((0.215032060866-0.256051105843j))*x_ref[0] + ((-0.396573145493+0.891068934005j))*x_ref[1]**o + ((0.244419509338-0.504351050587j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.0895704199958-0.0993512786136j))*x[2]**o + ((0.124809442435+0.921746998969j))*x[2]
+            ref+=((-0.0895704199958-0.0993512786136j))*x_ref[2]**o + ((0.124809442435+0.921746998969j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(-0.584503809313-0.264569944259j)*x[0]**o + ((0.0362502248907+0.445554149608j))*x[0] + ((-0.80795105297+0.774998918407j))*x[1]**o + ((0.109420312688+0.640720138459j))*x[1]
+        ref[(0,)]=(-0.584503809313-0.264569944259j)*x_ref[0]**o + ((0.0362502248907+0.445554149608j))*x_ref[0] + ((-0.80795105297+0.774998918407j))*x_ref[1]**o + ((0.109420312688+0.640720138459j))*x_ref[1]
+        arg[(1,)]=(0.604668442109-0.094922422879j)*x[0]**o + ((-0.513782045089+0.370506402633j))*x[0] + ((0.0134073688086-0.311454158402j))*x[1]**o + ((0.859991591873+0.560987420447j))*x[1]
+        ref[(1,)]=(0.604668442109-0.094922422879j)*x_ref[0]**o + ((-0.513782045089+0.370506402633j))*x_ref[0] + ((0.0134073688086-0.311454158402j))*x_ref[1]**o + ((0.859991591873+0.560987420447j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.366525238058-0.0731006494223j)*x[2]**o + ((0.179402936369-0.913237231624j))*x[2]
+            ref[(0,)]+=(-0.366525238058-0.0731006494223j)*x_ref[2]**o + ((0.179402936369-0.913237231624j))*x_ref[2]
+            arg[(1,)]+=(-0.973175879334+0.932093306155j)*x[2]**o + ((0.745549584945-0.00847849553494j))*x[2]
+            ref[(1,)]+=(-0.973175879334+0.932093306155j)*x_ref[2]**o + ((0.745549584945-0.00847849553494j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3),w)
+        ref = Data(0,(4, 3),w_ref)
+        arg[(0, 0)]=(-0.658388761904+0.0712542500697j)*x[0]**o + ((-0.916745910599+0.21701639275j))*x[0] + ((-0.743164812134-0.958934194644j))*x[1]**o + ((0.688530833959-0.0761930664903j))*x[1]
+        ref[(0, 0)]=(-0.658388761904+0.0712542500697j)*x_ref[0]**o + ((-0.916745910599+0.21701639275j))*x_ref[0] + ((-0.743164812134-0.958934194644j))*x_ref[1]**o + ((0.688530833959-0.0761930664903j))*x_ref[1]
+        arg[(0, 1)]=(0.990010107209-0.497091246117j)*x[0]**o + ((0.6048320429+0.807752911978j))*x[0] + ((0.966536650338-0.123672208186j))*x[1]**o + ((-0.723035298935-0.547772117786j))*x[1]
+        ref[(0, 1)]=(0.990010107209-0.497091246117j)*x_ref[0]**o + ((0.6048320429+0.807752911978j))*x_ref[0] + ((0.966536650338-0.123672208186j))*x_ref[1]**o + ((-0.723035298935-0.547772117786j))*x_ref[1]
+        arg[(0, 2)]=(0.492148152946+0.902167891636j)*x[0]**o + ((0.972213527534+0.0920424501835j))*x[0] + ((0.185296262319-0.648828926294j))*x[1]**o + ((-0.985957463641-0.397959817311j))*x[1]
+        ref[(0, 2)]=(0.492148152946+0.902167891636j)*x_ref[0]**o + ((0.972213527534+0.0920424501835j))*x_ref[0] + ((0.185296262319-0.648828926294j))*x_ref[1]**o + ((-0.985957463641-0.397959817311j))*x_ref[1]
+        arg[(1, 0)]=(-0.121236739726-0.328312123139j)*x[0]**o + ((0.863513898094-0.991304599513j))*x[0] + ((-0.404959573236-0.867838753663j))*x[1]**o + ((0.450071340592-0.943963756495j))*x[1]
+        ref[(1, 0)]=(-0.121236739726-0.328312123139j)*x_ref[0]**o + ((0.863513898094-0.991304599513j))*x_ref[0] + ((-0.404959573236-0.867838753663j))*x_ref[1]**o + ((0.450071340592-0.943963756495j))*x_ref[1]
+        arg[(1, 1)]=(0.194721698768+0.427506433088j)*x[0]**o + ((-0.900966773979-0.195919634423j))*x[0] + ((-0.992236811778-0.0607649014621j))*x[1]**o + ((0.186540506063-0.434252891269j))*x[1]
+        ref[(1, 1)]=(0.194721698768+0.427506433088j)*x_ref[0]**o + ((-0.900966773979-0.195919634423j))*x_ref[0] + ((-0.992236811778-0.0607649014621j))*x_ref[1]**o + ((0.186540506063-0.434252891269j))*x_ref[1]
+        arg[(1, 2)]=(-0.969054197587-0.871068970926j)*x[0]**o + ((0.305039773523+0.0980878849495j))*x[0] + ((-0.620230779514+0.979621855819j))*x[1]**o + ((0.26744695938+0.524645059792j))*x[1]
+        ref[(1, 2)]=(-0.969054197587-0.871068970926j)*x_ref[0]**o + ((0.305039773523+0.0980878849495j))*x_ref[0] + ((-0.620230779514+0.979621855819j))*x_ref[1]**o + ((0.26744695938+0.524645059792j))*x_ref[1]
+        arg[(2, 0)]=(0.299062736797-0.319434380659j)*x[0]**o + ((0.10594221746+0.897809538427j))*x[0] + ((-0.168265859074+0.675032757839j))*x[1]**o + ((0.418782792244+0.0198378154709j))*x[1]
+        ref[(2, 0)]=(0.299062736797-0.319434380659j)*x_ref[0]**o + ((0.10594221746+0.897809538427j))*x_ref[0] + ((-0.168265859074+0.675032757839j))*x_ref[1]**o + ((0.418782792244+0.0198378154709j))*x_ref[1]
+        arg[(2, 1)]=(0.164474867318+0.0354112466244j)*x[0]**o + ((0.246694769905-0.085509572237j))*x[0] + ((0.228672530772+0.1840075411j))*x[1]**o + ((-0.505440612392+0.193695657552j))*x[1]
+        ref[(2, 1)]=(0.164474867318+0.0354112466244j)*x_ref[0]**o + ((0.246694769905-0.085509572237j))*x_ref[0] + ((0.228672530772+0.1840075411j))*x_ref[1]**o + ((-0.505440612392+0.193695657552j))*x_ref[1]
+        arg[(2, 2)]=(-0.535306943372+0.279744782043j)*x[0]**o + ((-0.0797195986562+0.898158380741j))*x[0] + ((0.954459670653-0.758893840629j))*x[1]**o + ((0.298711368307-0.448377491941j))*x[1]
+        ref[(2, 2)]=(-0.535306943372+0.279744782043j)*x_ref[0]**o + ((-0.0797195986562+0.898158380741j))*x_ref[0] + ((0.954459670653-0.758893840629j))*x_ref[1]**o + ((0.298711368307-0.448377491941j))*x_ref[1]
+        arg[(3, 0)]=(-0.548658067754-0.787632587266j)*x[0]**o + ((-0.645308611733+0.785882759354j))*x[0] + ((-0.971344191409-0.75540227977j))*x[1]**o + ((-0.654770563581+0.701327263866j))*x[1]
+        ref[(3, 0)]=(-0.548658067754-0.787632587266j)*x_ref[0]**o + ((-0.645308611733+0.785882759354j))*x_ref[0] + ((-0.971344191409-0.75540227977j))*x_ref[1]**o + ((-0.654770563581+0.701327263866j))*x_ref[1]
+        arg[(3, 1)]=(-0.19852251572-0.453397917584j)*x[0]**o + ((-0.224423792297-0.833856466536j))*x[0] + ((0.400098681133+0.888332164716j))*x[1]**o + ((0.650003330894+0.67830933566j))*x[1]
+        ref[(3, 1)]=(-0.19852251572-0.453397917584j)*x_ref[0]**o + ((-0.224423792297-0.833856466536j))*x_ref[0] + ((0.400098681133+0.888332164716j))*x_ref[1]**o + ((0.650003330894+0.67830933566j))*x_ref[1]
+        arg[(3, 2)]=(0.469760871358+0.0639893724751j)*x[0]**o + ((0.65148912046+0.551992030196j))*x[0] + ((0.889211572376-0.137428202395j))*x[1]**o + ((-0.734572856105-0.961649922896j))*x[1]
+        ref[(3, 2)]=(0.469760871358+0.0639893724751j)*x_ref[0]**o + ((0.65148912046+0.551992030196j))*x_ref[0] + ((0.889211572376-0.137428202395j))*x_ref[1]**o + ((-0.734572856105-0.961649922896j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.5704147366-0.981470798914j)*x[2]**o + ((-0.982022552694-0.384757277111j))*x[2]
+            ref[(0, 0)]+=(0.5704147366-0.981470798914j)*x_ref[2]**o + ((-0.982022552694-0.384757277111j))*x_ref[2]
+            arg[(0, 1)]+=(0.940033432385+0.718265360577j)*x[2]**o + ((-0.200985082746-0.0038485326831j))*x[2]
+            ref[(0, 1)]+=(0.940033432385+0.718265360577j)*x_ref[2]**o + ((-0.200985082746-0.0038485326831j))*x_ref[2]
+            arg[(0, 2)]+=(-0.339371583125-0.222170710363j)*x[2]**o + ((0.476039060707+0.0823149789854j))*x[2]
+            ref[(0, 2)]+=(-0.339371583125-0.222170710363j)*x_ref[2]**o + ((0.476039060707+0.0823149789854j))*x_ref[2]
+            arg[(1, 0)]+=(-0.822179097174+0.215252639734j)*x[2]**o + ((0.949834534215+0.523899589963j))*x[2]
+            ref[(1, 0)]+=(-0.822179097174+0.215252639734j)*x_ref[2]**o + ((0.949834534215+0.523899589963j))*x_ref[2]
+            arg[(1, 1)]+=(0.163782252841-0.623637057271j)*x[2]**o + ((-0.273711783086+0.442109301934j))*x[2]
+            ref[(1, 1)]+=(0.163782252841-0.623637057271j)*x_ref[2]**o + ((-0.273711783086+0.442109301934j))*x_ref[2]
+            arg[(1, 2)]+=(0.560322230969-0.130465745933j)*x[2]**o + ((0.634239549929-0.564606399463j))*x[2]
+            ref[(1, 2)]+=(0.560322230969-0.130465745933j)*x_ref[2]**o + ((0.634239549929-0.564606399463j))*x_ref[2]
+            arg[(2, 0)]+=(-0.09962596525+0.775611438549j)*x[2]**o + ((-0.00247789702323+0.410098568571j))*x[2]
+            ref[(2, 0)]+=(-0.09962596525+0.775611438549j)*x_ref[2]**o + ((-0.00247789702323+0.410098568571j))*x_ref[2]
+            arg[(2, 1)]+=(-0.503000590461+0.553599867735j)*x[2]**o + ((-0.15222593428+0.270682007469j))*x[2]
+            ref[(2, 1)]+=(-0.503000590461+0.553599867735j)*x_ref[2]**o + ((-0.15222593428+0.270682007469j))*x_ref[2]
+            arg[(2, 2)]+=(0.751817929285+0.623437507151j)*x[2]**o + ((-0.590094433971+0.0471985541632j))*x[2]
+            ref[(2, 2)]+=(0.751817929285+0.623437507151j)*x_ref[2]**o + ((-0.590094433971+0.0471985541632j))*x_ref[2]
+            arg[(3, 0)]+=(-0.274551635858-0.911710604841j)*x[2]**o + ((0.938824865059+0.0373630938351j))*x[2]
+            ref[(3, 0)]+=(-0.274551635858-0.911710604841j)*x_ref[2]**o + ((0.938824865059+0.0373630938351j))*x_ref[2]
+            arg[(3, 1)]+=(-0.140411311044-0.65467448927j)*x[2]**o + ((-0.451733627555-0.124655879859j))*x[2]
+            ref[(3, 1)]+=(-0.140411311044-0.65467448927j)*x_ref[2]**o + ((-0.451733627555-0.124655879859j))*x_ref[2]
+            arg[(3, 2)]+=(-0.962845198181-0.586046365181j)*x[2]**o + ((0.0873195622606+0.56257606546j))*x[2]
+            ref[(3, 2)]+=(-0.962845198181-0.586046365181j)*x_ref[2]**o + ((0.0873195622606+0.56257606546j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3),w_ref)
+        arg[(0, 0, 0)]=(-0.0855045246805+0.0618800528661j)*x[0]**o + ((0.765040891936-0.497744395822j))*x[0] + ((0.583842087984-0.530372950309j))*x[1]**o + ((0.158493461792+0.260685248752j))*x[1]
+        ref[(0, 0, 0)]=(-0.0855045246805+0.0618800528661j)*x_ref[0]**o + ((0.765040891936-0.497744395822j))*x_ref[0] + ((0.583842087984-0.530372950309j))*x_ref[1]**o + ((0.158493461792+0.260685248752j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.946441964057-0.34107160242j)*x[0]**o + ((0.0164885927899-0.433059706283j))*x[0] + ((0.449329414035-0.29687054382j))*x[1]**o + ((0.305816129783-0.670003604344j))*x[1]
+        ref[(0, 0, 1)]=(-0.946441964057-0.34107160242j)*x_ref[0]**o + ((0.0164885927899-0.433059706283j))*x_ref[0] + ((0.449329414035-0.29687054382j))*x_ref[1]**o + ((0.305816129783-0.670003604344j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.866133321204+0.288740642213j)*x[0]**o + ((-0.0639224652158+0.756359061734j))*x[0] + ((0.432138635281+0.905402281021j))*x[1]**o + ((-0.427732182819-0.888969862363j))*x[1]
+        ref[(0, 0, 2)]=(0.866133321204+0.288740642213j)*x_ref[0]**o + ((-0.0639224652158+0.756359061734j))*x_ref[0] + ((0.432138635281+0.905402281021j))*x_ref[1]**o + ((-0.427732182819-0.888969862363j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.0243399508595+0.0261625681425j)*x[0]**o + ((0.226829866798+0.471403880201j))*x[0] + ((0.867418388214-0.241152048249j))*x[1]**o + ((-0.0592884337346-0.611771549429j))*x[1]
+        ref[(0, 1, 0)]=(-0.0243399508595+0.0261625681425j)*x_ref[0]**o + ((0.226829866798+0.471403880201j))*x_ref[0] + ((0.867418388214-0.241152048249j))*x_ref[1]**o + ((-0.0592884337346-0.611771549429j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.297015264481-0.571757251475j)*x[0]**o + ((0.825854561972-0.551454670589j))*x[0] + ((0.815278860744-0.286869781563j))*x[1]**o + ((0.140555823583+0.431518780385j))*x[1]
+        ref[(0, 1, 1)]=(-0.297015264481-0.571757251475j)*x_ref[0]**o + ((0.825854561972-0.551454670589j))*x_ref[0] + ((0.815278860744-0.286869781563j))*x_ref[1]**o + ((0.140555823583+0.431518780385j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.154396339277+0.477049135493j)*x[0]**o + ((0.250053477839+0.912007031476j))*x[0] + ((-0.754473010092-0.0208046441927j))*x[1]**o + ((-0.579988095942-0.481210135498j))*x[1]
+        ref[(0, 1, 2)]=(0.154396339277+0.477049135493j)*x_ref[0]**o + ((0.250053477839+0.912007031476j))*x_ref[0] + ((-0.754473010092-0.0208046441927j))*x_ref[1]**o + ((-0.579988095942-0.481210135498j))*x_ref[1]
+        arg[(1, 0, 0)]=(-0.235137316203-0.658391630552j)*x[0]**o + ((0.370524646745-0.546788320199j))*x[0] + ((-0.464855941972+0.775244996011j))*x[1]**o + ((-0.228044066784+0.448900856351j))*x[1]
+        ref[(1, 0, 0)]=(-0.235137316203-0.658391630552j)*x_ref[0]**o + ((0.370524646745-0.546788320199j))*x_ref[0] + ((-0.464855941972+0.775244996011j))*x_ref[1]**o + ((-0.228044066784+0.448900856351j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.0209091855489-0.0374283616111j)*x[0]**o + ((-0.014018783963-0.41579568311j))*x[0] + ((-0.94154718478+0.84344956456j))*x[1]**o + ((-0.832195905818-0.617267451276j))*x[1]
+        ref[(1, 0, 1)]=(-0.0209091855489-0.0374283616111j)*x_ref[0]**o + ((-0.014018783963-0.41579568311j))*x_ref[0] + ((-0.94154718478+0.84344956456j))*x_ref[1]**o + ((-0.832195905818-0.617267451276j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.218123885115-0.694333972049j)*x[0]**o + ((0.335723078162-0.0957400551394j))*x[0] + ((-0.703777606853+0.0577720080789j))*x[1]**o + ((0.71806498269+0.0760661108422j))*x[1]
+        ref[(1, 0, 2)]=(0.218123885115-0.694333972049j)*x_ref[0]**o + ((0.335723078162-0.0957400551394j))*x_ref[0] + ((-0.703777606853+0.0577720080789j))*x_ref[1]**o + ((0.71806498269+0.0760661108422j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.00801918609703-0.87314646205j)*x[0]**o + ((0.0440928752265-0.734292284393j))*x[0] + ((0.309310655384-0.0854892986631j))*x[1]**o + ((0.842070628554-0.955742340066j))*x[1]
+        ref[(1, 1, 0)]=(0.00801918609703-0.87314646205j)*x_ref[0]**o + ((0.0440928752265-0.734292284393j))*x_ref[0] + ((0.309310655384-0.0854892986631j))*x_ref[1]**o + ((0.842070628554-0.955742340066j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.175865081232-0.254170278588j)*x[0]**o + ((0.309865058446+0.996335649372j))*x[0] + ((-0.963006530232-0.828499451211j))*x[1]**o + ((-0.583027254155-0.0771022428392j))*x[1]
+        ref[(1, 1, 1)]=(0.175865081232-0.254170278588j)*x_ref[0]**o + ((0.309865058446+0.996335649372j))*x_ref[0] + ((-0.963006530232-0.828499451211j))*x_ref[1]**o + ((-0.583027254155-0.0771022428392j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.138097567227-0.592328618431j)*x[0]**o + ((-0.235393599837+0.417461754616j))*x[0] + ((0.0440968287487+0.632521548139j))*x[1]**o + ((-0.502432963057-0.635496215816j))*x[1]
+        ref[(1, 1, 2)]=(0.138097567227-0.592328618431j)*x_ref[0]**o + ((-0.235393599837+0.417461754616j))*x_ref[0] + ((0.0440968287487+0.632521548139j))*x_ref[1]**o + ((-0.502432963057-0.635496215816j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.941872921251+0.193302384934j)*x[2]**o + ((-0.491740133822-0.696977908455j))*x[2]
+            ref[(0, 0, 0)]+=(-0.941872921251+0.193302384934j)*x_ref[2]**o + ((-0.491740133822-0.696977908455j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.412484785211-0.498238498019j)*x[2]**o + ((-0.880172732006+0.151304822197j))*x[2]
+            ref[(0, 0, 1)]+=(-0.412484785211-0.498238498019j)*x_ref[2]**o + ((-0.880172732006+0.151304822197j))*x_ref[2]
+            arg[(0, 0, 2)]+=(-0.507642999082+0.407655993241j)*x[2]**o + ((0.23208398942+0.454060914016j))*x[2]
+            ref[(0, 0, 2)]+=(-0.507642999082+0.407655993241j)*x_ref[2]**o + ((0.23208398942+0.454060914016j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.822387564187-0.746351203708j)*x[2]**o + ((-0.191480654223+0.934380084388j))*x[2]
+            ref[(0, 1, 0)]+=(-0.822387564187-0.746351203708j)*x_ref[2]**o + ((-0.191480654223+0.934380084388j))*x_ref[2]
+            arg[(0, 1, 1)]+=(0.572899038832-0.0249625982344j)*x[2]**o + ((0.612153263945-0.707056462051j))*x[2]
+            ref[(0, 1, 1)]+=(0.572899038832-0.0249625982344j)*x_ref[2]**o + ((0.612153263945-0.707056462051j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.727449122048-0.391777887691j)*x[2]**o + ((0.405956931026-0.876421183774j))*x[2]
+            ref[(0, 1, 2)]+=(-0.727449122048-0.391777887691j)*x_ref[2]**o + ((0.405956931026-0.876421183774j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.469657952806+0.188342103735j)*x[2]**o + ((-0.663338011961+0.645794288919j))*x[2]
+            ref[(1, 0, 0)]+=(0.469657952806+0.188342103735j)*x_ref[2]**o + ((-0.663338011961+0.645794288919j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.0974524636952-0.706817579344j)*x[2]**o + ((0.137820645068+0.0633824690429j))*x[2]
+            ref[(1, 0, 1)]+=(0.0974524636952-0.706817579344j)*x_ref[2]**o + ((0.137820645068+0.0633824690429j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.525521617423+0.0202497289892j)*x[2]**o + ((0.24747949842+0.182825192361j))*x[2]
+            ref[(1, 0, 2)]+=(-0.525521617423+0.0202497289892j)*x_ref[2]**o + ((0.24747949842+0.182825192361j))*x_ref[2]
+            arg[(1, 1, 0)]+=(0.887072251901+0.918797963741j)*x[2]**o + ((0.202296305488+0.729436444831j))*x[2]
+            ref[(1, 1, 0)]+=(0.887072251901+0.918797963741j)*x_ref[2]**o + ((0.202296305488+0.729436444831j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.0647649267706-0.30434805799j)*x[2]**o + ((0.925832916494+0.663306660098j))*x[2]
+            ref[(1, 1, 1)]+=(0.0647649267706-0.30434805799j)*x_ref[2]**o + ((0.925832916494+0.663306660098j))*x_ref[2]
+            arg[(1, 1, 2)]+=(-0.227081762769+0.727403794093j)*x[2]**o + ((-0.355065315659-0.298325314166j))*x[2]
+            ref[(1, 1, 2)]+=(-0.227081762769+0.727403794093j)*x_ref[2]**o + ((-0.355065315659-0.298325314166j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2, 2),w)
+        ref = Data(0,(4, 3, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(0.461411918525+0.358682098745j)*x[0]**o + ((-0.517134434511-0.89513842827j))*x[0] + ((0.705560002812+0.0834358821286j))*x[1]**o + ((0.133560079669-0.626722279119j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.461411918525+0.358682098745j)*x_ref[0]**o + ((-0.517134434511-0.89513842827j))*x_ref[0] + ((0.705560002812+0.0834358821286j))*x_ref[1]**o + ((0.133560079669-0.626722279119j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.722379013538+0.319746037726j)*x[0]**o + ((0.160867382685-0.10373846922j))*x[0] + ((0.25382412743-0.238042334724j))*x[1]**o + ((0.659541457857-0.133909222118j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.722379013538+0.319746037726j)*x_ref[0]**o + ((0.160867382685-0.10373846922j))*x_ref[0] + ((0.25382412743-0.238042334724j))*x_ref[1]**o + ((0.659541457857-0.133909222118j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.30983864563+0.0846893960533j)*x[0]**o + ((-0.706338469484+0.476648256917j))*x[0] + ((-0.547220690767+0.89703412589j))*x[1]**o + ((0.0779867115532-0.979755068424j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.30983864563+0.0846893960533j)*x_ref[0]**o + ((-0.706338469484+0.476648256917j))*x_ref[0] + ((-0.547220690767+0.89703412589j))*x_ref[1]**o + ((0.0779867115532-0.979755068424j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.443586510716+0.24705438552j)*x[0]**o + ((-0.382611190028+0.520292297871j))*x[0] + ((-0.163007748786-0.761960492688j))*x[1]**o + ((0.905222120757-0.874668417647j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.443586510716+0.24705438552j)*x_ref[0]**o + ((-0.382611190028+0.520292297871j))*x_ref[0] + ((-0.163007748786-0.761960492688j))*x_ref[1]**o + ((0.905222120757-0.874668417647j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.915665066811+0.082760650041j)*x[0]**o + ((-0.619541773903+0.725712740526j))*x[0] + ((0.427014262678-0.695890655457j))*x[1]**o + ((0.953676811103+0.278702380399j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.915665066811+0.082760650041j)*x_ref[0]**o + ((-0.619541773903+0.725712740526j))*x_ref[0] + ((0.427014262678-0.695890655457j))*x_ref[1]**o + ((0.953676811103+0.278702380399j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.0373960256684+0.972107318322j)*x[0]**o + ((0.489608463824-0.910658045926j))*x[0] + ((-0.0975008761262-0.539788452997j))*x[1]**o + ((-0.685268340919-0.367950727356j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.0373960256684+0.972107318322j)*x_ref[0]**o + ((0.489608463824-0.910658045926j))*x_ref[0] + ((-0.0975008761262-0.539788452997j))*x_ref[1]**o + ((-0.685268340919-0.367950727356j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.496509241276+0.347263062393j)*x[0]**o + ((-0.945549956228+0.546835139568j))*x[0] + ((0.272570006004-0.387157594375j))*x[1]**o + ((0.680389840527+0.391109326799j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.496509241276+0.347263062393j)*x_ref[0]**o + ((-0.945549956228+0.546835139568j))*x_ref[0] + ((0.272570006004-0.387157594375j))*x_ref[1]**o + ((0.680389840527+0.391109326799j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.168823886314+0.142822557794j)*x[0]**o + ((0.431501248267+0.688751138315j))*x[0] + ((0.920035686747-0.337496771757j))*x[1]**o + ((-0.300029446656+0.0890854631852j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.168823886314+0.142822557794j)*x_ref[0]**o + ((0.431501248267+0.688751138315j))*x_ref[0] + ((0.920035686747-0.337496771757j))*x_ref[1]**o + ((-0.300029446656+0.0890854631852j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.0495326991609-0.775395079638j)*x[0]**o + ((-0.100496635904-0.435696353348j))*x[0] + ((-0.357255958356-0.0838716808475j))*x[1]**o + ((0.0809277991586+0.314655124642j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.0495326991609-0.775395079638j)*x_ref[0]**o + ((-0.100496635904-0.435696353348j))*x_ref[0] + ((-0.357255958356-0.0838716808475j))*x_ref[1]**o + ((0.0809277991586+0.314655124642j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(0.138685639289+0.119031149323j)*x[0]**o + ((0.866650117478-0.0827884972064j))*x[0] + ((0.686537366428+0.413093308643j))*x[1]**o + ((0.837956322204+0.190965540317j))*x[1]
+        ref[(0, 2, 0, 1)]=(0.138685639289+0.119031149323j)*x_ref[0]**o + ((0.866650117478-0.0827884972064j))*x_ref[0] + ((0.686537366428+0.413093308643j))*x_ref[1]**o + ((0.837956322204+0.190965540317j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.555070955853-0.785048226616j)*x[0]**o + ((0.962004405166-0.849560357274j))*x[0] + ((0.148473670837+0.805030751297j))*x[1]**o + ((-0.00603631998526-0.667066598253j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.555070955853-0.785048226616j)*x_ref[0]**o + ((0.962004405166-0.849560357274j))*x_ref[0] + ((0.148473670837+0.805030751297j))*x_ref[1]**o + ((-0.00603631998526-0.667066598253j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.297797933349+0.390400989551j)*x[0]**o + ((0.971270867644+0.18047811598j))*x[0] + ((0.430817585003+0.760520747937j))*x[1]**o + ((-0.980951225336+0.788019128804j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.297797933349+0.390400989551j)*x_ref[0]**o + ((0.971270867644+0.18047811598j))*x_ref[0] + ((0.430817585003+0.760520747937j))*x_ref[1]**o + ((-0.980951225336+0.788019128804j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.224311274466+0.129900622742j)*x[0]**o + ((0.44761410626-0.123423196201j))*x[0] + ((0.738628060736+0.971508664263j))*x[1]**o + ((0.660088530436+0.633462510881j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.224311274466+0.129900622742j)*x_ref[0]**o + ((0.44761410626-0.123423196201j))*x_ref[0] + ((0.738628060736+0.971508664263j))*x_ref[1]**o + ((0.660088530436+0.633462510881j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.548129515538+0.0616837885751j)*x[0]**o + ((0.864248306118+0.47064578716j))*x[0] + ((0.253371355359+0.425271149997j))*x[1]**o + ((0.822960420729+0.519671091868j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.548129515538+0.0616837885751j)*x_ref[0]**o + ((0.864248306118+0.47064578716j))*x_ref[0] + ((0.253371355359+0.425271149997j))*x_ref[1]**o + ((0.822960420729+0.519671091868j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.959394190431+0.696116507869j)*x[0]**o + ((0.0952186312689-0.972244578412j))*x[0] + ((0.801250244266-0.719786719961j))*x[1]**o + ((0.477842509506-0.326699749445j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.959394190431+0.696116507869j)*x_ref[0]**o + ((0.0952186312689-0.972244578412j))*x_ref[0] + ((0.801250244266-0.719786719961j))*x_ref[1]**o + ((0.477842509506-0.326699749445j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.679818162757-0.282824341915j)*x[0]**o + ((-0.482502382074-0.384143246094j))*x[0] + ((-0.0847816461621+0.949115896875j))*x[1]**o + ((-0.875768823568+0.111080636999j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.679818162757-0.282824341915j)*x_ref[0]**o + ((-0.482502382074-0.384143246094j))*x_ref[0] + ((-0.0847816461621+0.949115896875j))*x_ref[1]**o + ((-0.875768823568+0.111080636999j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.358427969024+0.596756006133j)*x[0]**o + ((-0.230740466144+0.0875621065469j))*x[0] + ((0.0424018488533-0.998619526543j))*x[1]**o + ((0.884755297178+0.35891960254j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.358427969024+0.596756006133j)*x_ref[0]**o + ((-0.230740466144+0.0875621065469j))*x_ref[0] + ((0.0424018488533-0.998619526543j))*x_ref[1]**o + ((0.884755297178+0.35891960254j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.600296584845+0.782838613717j)*x[0]**o + ((0.0170757166179+0.904479374261j))*x[0] + ((0.803710940574+0.504742149655j))*x[1]**o + ((-0.144797525338+0.107150094893j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.600296584845+0.782838613717j)*x_ref[0]**o + ((0.0170757166179+0.904479374261j))*x_ref[0] + ((0.803710940574+0.504742149655j))*x_ref[1]**o + ((-0.144797525338+0.107150094893j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.883612110235-0.0998327430481j)*x[0]**o + ((0.280990740911+0.0228616810453j))*x[0] + ((-0.647032273629-0.18152639446j))*x[1]**o + ((-0.348565858425-0.840966572811j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.883612110235-0.0998327430481j)*x_ref[0]**o + ((0.280990740911+0.0228616810453j))*x_ref[0] + ((-0.647032273629-0.18152639446j))*x_ref[1]**o + ((-0.348565858425-0.840966572811j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.16354488631-0.528228000544j)*x[0]**o + ((-0.517039580121-0.0413191092071j))*x[0] + ((0.556305658194-0.887060920207j))*x[1]**o + ((0.526337918793-0.0725369512349j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.16354488631-0.528228000544j)*x_ref[0]**o + ((-0.517039580121-0.0413191092071j))*x_ref[0] + ((0.556305658194-0.887060920207j))*x_ref[1]**o + ((0.526337918793-0.0725369512349j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.806418513512-0.244091451244j)*x[0]**o + ((-0.233885689234+0.613423058453j))*x[0] + ((-0.643125405219+0.51405415921j))*x[1]**o + ((0.249184243872-0.560134638991j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.806418513512-0.244091451244j)*x_ref[0]**o + ((-0.233885689234+0.613423058453j))*x_ref[0] + ((-0.643125405219+0.51405415921j))*x_ref[1]**o + ((0.249184243872-0.560134638991j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(-0.493770738822-0.472358887312j)*x[0]**o + ((-0.409265925472-0.84670191063j))*x[0] + ((0.893100963084-0.664571143199j))*x[1]**o + ((0.293941487844-0.0668792125126j))*x[1]
+        ref[(1, 2, 0, 1)]=(-0.493770738822-0.472358887312j)*x_ref[0]**o + ((-0.409265925472-0.84670191063j))*x_ref[0] + ((0.893100963084-0.664571143199j))*x_ref[1]**o + ((0.293941487844-0.0668792125126j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.117714081952-0.22034717673j)*x[0]**o + ((-0.557715445609+0.61191788082j))*x[0] + ((-0.15389576161-0.547219536379j))*x[1]**o + ((0.603321217396-0.28263843696j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.117714081952-0.22034717673j)*x_ref[0]**o + ((-0.557715445609+0.61191788082j))*x_ref[0] + ((-0.15389576161-0.547219536379j))*x_ref[1]**o + ((0.603321217396-0.28263843696j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(-0.77204142488-0.361632237633j)*x[0]**o + ((0.367947083206+0.438709032575j))*x[0] + ((0.328695372787-0.643419563249j))*x[1]**o + ((-0.831694971394-0.515840697408j))*x[1]
+        ref[(1, 2, 1, 1)]=(-0.77204142488-0.361632237633j)*x_ref[0]**o + ((0.367947083206+0.438709032575j))*x_ref[0] + ((0.328695372787-0.643419563249j))*x_ref[1]**o + ((-0.831694971394-0.515840697408j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(-0.395425696364+0.0992649095132j)*x[0]**o + ((-0.269697780064-0.561159346467j))*x[0] + ((0.862282995942-0.971198381901j))*x[1]**o + ((-0.864376211994-0.131217849419j))*x[1]
+        ref[(2, 0, 0, 0)]=(-0.395425696364+0.0992649095132j)*x_ref[0]**o + ((-0.269697780064-0.561159346467j))*x_ref[0] + ((0.862282995942-0.971198381901j))*x_ref[1]**o + ((-0.864376211994-0.131217849419j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(0.554619056773-0.888811435764j)*x[0]**o + ((-0.35425714613-0.480326371991j))*x[0] + ((0.285797256466+0.576967994401j))*x[1]**o + ((0.112409777006+0.806845527889j))*x[1]
+        ref[(2, 0, 0, 1)]=(0.554619056773-0.888811435764j)*x_ref[0]**o + ((-0.35425714613-0.480326371991j))*x_ref[0] + ((0.285797256466+0.576967994401j))*x_ref[1]**o + ((0.112409777006+0.806845527889j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.796617083763+0.146654650224j)*x[0]**o + ((-0.981036992313-0.442987655202j))*x[0] + ((-0.317242659552-0.181113876689j))*x[1]**o + ((-0.269886448713-0.736265994066j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.796617083763+0.146654650224j)*x_ref[0]**o + ((-0.981036992313-0.442987655202j))*x_ref[0] + ((-0.317242659552-0.181113876689j))*x_ref[1]**o + ((-0.269886448713-0.736265994066j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.0820497453919+0.445667380721j)*x[0]**o + ((-0.247032424784+0.504966603657j))*x[0] + ((-0.794854437689+0.391640609335j))*x[1]**o + ((-0.726052485029-0.864198303102j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.0820497453919+0.445667380721j)*x_ref[0]**o + ((-0.247032424784+0.504966603657j))*x_ref[0] + ((-0.794854437689+0.391640609335j))*x_ref[1]**o + ((-0.726052485029-0.864198303102j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(-0.574227635272+0.452309678136j)*x[0]**o + ((0.759320566182+0.591975958834j))*x[0] + ((0.918404696811+0.9572015101j))*x[1]**o + ((-0.0210693505457+0.698092689856j))*x[1]
+        ref[(2, 1, 0, 0)]=(-0.574227635272+0.452309678136j)*x_ref[0]**o + ((0.759320566182+0.591975958834j))*x_ref[0] + ((0.918404696811+0.9572015101j))*x_ref[1]**o + ((-0.0210693505457+0.698092689856j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.644203020722-0.540659156271j)*x[0]**o + ((-0.690624322769-0.374259771115j))*x[0] + ((-0.64047015292-0.210315671128j))*x[1]**o + ((-0.727086045777-0.557256263361j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.644203020722-0.540659156271j)*x_ref[0]**o + ((-0.690624322769-0.374259771115j))*x_ref[0] + ((-0.64047015292-0.210315671128j))*x_ref[1]**o + ((-0.727086045777-0.557256263361j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(-0.967120437419-0.0840800063168j)*x[0]**o + ((-0.288142264971-0.224675271664j))*x[0] + ((-0.618708942363-0.79606589651j))*x[1]**o + ((0.846104881739-0.0609468657343j))*x[1]
+        ref[(2, 1, 1, 0)]=(-0.967120437419-0.0840800063168j)*x_ref[0]**o + ((-0.288142264971-0.224675271664j))*x_ref[0] + ((-0.618708942363-0.79606589651j))*x_ref[1]**o + ((0.846104881739-0.0609468657343j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.56146689819+0.83137496758j)*x[0]**o + ((0.732424376262-0.808912380662j))*x[0] + ((0.629535073395+0.532671140912j))*x[1]**o + ((-0.851391005228-0.857591173825j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.56146689819+0.83137496758j)*x_ref[0]**o + ((0.732424376262-0.808912380662j))*x_ref[0] + ((0.629535073395+0.532671140912j))*x_ref[1]**o + ((-0.851391005228-0.857591173825j))*x_ref[1]
+        arg[(2, 2, 0, 0)]=(0.334438693477+0.96935836815j)*x[0]**o + ((0.818883709161-0.119459974196j))*x[0] + ((0.642300967992-0.104809066953j))*x[1]**o + ((-0.303373946975-0.389298628866j))*x[1]
+        ref[(2, 2, 0, 0)]=(0.334438693477+0.96935836815j)*x_ref[0]**o + ((0.818883709161-0.119459974196j))*x_ref[0] + ((0.642300967992-0.104809066953j))*x_ref[1]**o + ((-0.303373946975-0.389298628866j))*x_ref[1]
+        arg[(2, 2, 0, 1)]=(0.0602717002373-0.0038121432197j)*x[0]**o + ((0.560055929288+0.120650606301j))*x[0] + ((0.461065541542-0.727839789941j))*x[1]**o + ((-0.118086462725-0.438963302939j))*x[1]
+        ref[(2, 2, 0, 1)]=(0.0602717002373-0.0038121432197j)*x_ref[0]**o + ((0.560055929288+0.120650606301j))*x_ref[0] + ((0.461065541542-0.727839789941j))*x_ref[1]**o + ((-0.118086462725-0.438963302939j))*x_ref[1]
+        arg[(2, 2, 1, 0)]=(-0.801076743352-0.357133388129j)*x[0]**o + ((0.191019359409+0.552051262251j))*x[0] + ((0.73988861489-0.911619024262j))*x[1]**o + ((-0.54306105578+0.536613819656j))*x[1]
+        ref[(2, 2, 1, 0)]=(-0.801076743352-0.357133388129j)*x_ref[0]**o + ((0.191019359409+0.552051262251j))*x_ref[0] + ((0.73988861489-0.911619024262j))*x_ref[1]**o + ((-0.54306105578+0.536613819656j))*x_ref[1]
+        arg[(2, 2, 1, 1)]=(0.293345552566-0.555430392885j)*x[0]**o + ((0.950626361481-0.826230277965j))*x[0] + ((-0.305025367816-0.763239739138j))*x[1]**o + ((0.741342814672-0.580540289971j))*x[1]
+        ref[(2, 2, 1, 1)]=(0.293345552566-0.555430392885j)*x_ref[0]**o + ((0.950626361481-0.826230277965j))*x_ref[0] + ((-0.305025367816-0.763239739138j))*x_ref[1]**o + ((0.741342814672-0.580540289971j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.626788292084-0.683217669409j)*x[0]**o + ((0.843395995006+0.753626377711j))*x[0] + ((0.0168412470691-0.774463338756j))*x[1]**o + ((-0.907214087992-0.410576117995j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.626788292084-0.683217669409j)*x_ref[0]**o + ((0.843395995006+0.753626377711j))*x_ref[0] + ((0.0168412470691-0.774463338756j))*x_ref[1]**o + ((-0.907214087992-0.410576117995j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(0.250507108153-0.38767919156j)*x[0]**o + ((0.203918960446-0.0864283598913j))*x[0] + ((0.677591283397+0.0929477743358j))*x[1]**o + ((-0.666518044134+0.845413532077j))*x[1]
+        ref[(3, 0, 0, 1)]=(0.250507108153-0.38767919156j)*x_ref[0]**o + ((0.203918960446-0.0864283598913j))*x_ref[0] + ((0.677591283397+0.0929477743358j))*x_ref[1]**o + ((-0.666518044134+0.845413532077j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(-0.318086857161-0.991846460277j)*x[0]**o + ((0.948176293161+0.834438115436j))*x[0] + ((-0.964965343777-0.801489419798j))*x[1]**o + ((-0.736292603774-0.983729367246j))*x[1]
+        ref[(3, 0, 1, 0)]=(-0.318086857161-0.991846460277j)*x_ref[0]**o + ((0.948176293161+0.834438115436j))*x_ref[0] + ((-0.964965343777-0.801489419798j))*x_ref[1]**o + ((-0.736292603774-0.983729367246j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(0.877508742162+0.940527008659j)*x[0]**o + ((0.815307011664+0.0115489612404j))*x[0] + ((-0.166395023051+0.877291292963j))*x[1]**o + ((-0.759667776657-0.702261305619j))*x[1]
+        ref[(3, 0, 1, 1)]=(0.877508742162+0.940527008659j)*x_ref[0]**o + ((0.815307011664+0.0115489612404j))*x_ref[0] + ((-0.166395023051+0.877291292963j))*x_ref[1]**o + ((-0.759667776657-0.702261305619j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(0.00641061274794+0.693758055974j)*x[0]**o + ((-0.207173867114-0.339935306368j))*x[0] + ((0.442370283018+0.649558831401j))*x[1]**o + ((-0.413603659905-0.457706478017j))*x[1]
+        ref[(3, 1, 0, 0)]=(0.00641061274794+0.693758055974j)*x_ref[0]**o + ((-0.207173867114-0.339935306368j))*x_ref[0] + ((0.442370283018+0.649558831401j))*x_ref[1]**o + ((-0.413603659905-0.457706478017j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.381433301943+0.305525197384j)*x[0]**o + ((0.0773720521213-0.762764333315j))*x[0] + ((0.226859435251-0.86600753024j))*x[1]**o + ((0.138707002899+0.547567305543j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.381433301943+0.305525197384j)*x_ref[0]**o + ((0.0773720521213-0.762764333315j))*x_ref[0] + ((0.226859435251-0.86600753024j))*x_ref[1]**o + ((0.138707002899+0.547567305543j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.995589952508-0.824770722144j)*x[0]**o + ((0.967294151225+0.985043934546j))*x[0] + ((-0.926384413715-0.501700905443j))*x[1]**o + ((-0.437938914779-0.493612849028j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.995589952508-0.824770722144j)*x_ref[0]**o + ((0.967294151225+0.985043934546j))*x_ref[0] + ((-0.926384413715-0.501700905443j))*x_ref[1]**o + ((-0.437938914779-0.493612849028j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(0.44290379715+0.156462382614j)*x[0]**o + ((0.687286713555+0.035309099558j))*x[0] + ((-0.271161804117-0.228061861019j))*x[1]**o + ((-0.443033583513+0.357945964744j))*x[1]
+        ref[(3, 1, 1, 1)]=(0.44290379715+0.156462382614j)*x_ref[0]**o + ((0.687286713555+0.035309099558j))*x_ref[0] + ((-0.271161804117-0.228061861019j))*x_ref[1]**o + ((-0.443033583513+0.357945964744j))*x_ref[1]
+        arg[(3, 2, 0, 0)]=(-0.779914262233-0.54576139278j)*x[0]**o + ((-0.835993016727+0.546693422928j))*x[0] + ((0.469902667822+0.478899261842j))*x[1]**o + ((-0.0298347445095-0.777416439158j))*x[1]
+        ref[(3, 2, 0, 0)]=(-0.779914262233-0.54576139278j)*x_ref[0]**o + ((-0.835993016727+0.546693422928j))*x_ref[0] + ((0.469902667822+0.478899261842j))*x_ref[1]**o + ((-0.0298347445095-0.777416439158j))*x_ref[1]
+        arg[(3, 2, 0, 1)]=(-0.657361379345-0.295236363074j)*x[0]**o + ((-0.223564404994+0.779802838434j))*x[0] + ((-0.967896136737+0.460332724899j))*x[1]**o + ((0.677887200792+0.113085069773j))*x[1]
+        ref[(3, 2, 0, 1)]=(-0.657361379345-0.295236363074j)*x_ref[0]**o + ((-0.223564404994+0.779802838434j))*x_ref[0] + ((-0.967896136737+0.460332724899j))*x_ref[1]**o + ((0.677887200792+0.113085069773j))*x_ref[1]
+        arg[(3, 2, 1, 0)]=(0.0667868315742+0.166391782419j)*x[0]**o + ((0.6876723556-0.00346035096245j))*x[0] + ((-0.219362516753+0.0470892142466j))*x[1]**o + ((-0.826523991674-0.690813467157j))*x[1]
+        ref[(3, 2, 1, 0)]=(0.0667868315742+0.166391782419j)*x_ref[0]**o + ((0.6876723556-0.00346035096245j))*x_ref[0] + ((-0.219362516753+0.0470892142466j))*x_ref[1]**o + ((-0.826523991674-0.690813467157j))*x_ref[1]
+        arg[(3, 2, 1, 1)]=(0.212887889166+0.358023742039j)*x[0]**o + ((0.761426670433+0.449585293164j))*x[0] + ((0.0537704502313+0.0953172172311j))*x[1]**o + ((-0.60287618842-0.43765487382j))*x[1]
+        ref[(3, 2, 1, 1)]=(0.212887889166+0.358023742039j)*x_ref[0]**o + ((0.761426670433+0.449585293164j))*x_ref[0] + ((0.0537704502313+0.0953172172311j))*x_ref[1]**o + ((-0.60287618842-0.43765487382j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.208620225978-0.400269063615j)*x[2]**o + ((0.0666522361307-0.426208117276j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.208620225978-0.400269063615j)*x_ref[2]**o + ((0.0666522361307-0.426208117276j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.796096665253-0.623063087306j)*x[2]**o + ((-0.90165759585-0.739407777754j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.796096665253-0.623063087306j)*x_ref[2]**o + ((-0.90165759585-0.739407777754j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.0882586043462-0.0531377222974j)*x[2]**o + ((0.964587198512+0.655761807741j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.0882586043462-0.0531377222974j)*x_ref[2]**o + ((0.964587198512+0.655761807741j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(0.0347038574615-0.117879541797j)*x[2]**o + ((0.566061279004+0.130549792075j))*x[2]
+            ref[(0, 0, 1, 1)]+=(0.0347038574615-0.117879541797j)*x_ref[2]**o + ((0.566061279004+0.130549792075j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(0.0137180360376+0.0658316794116j)*x[2]**o + ((-0.991984627672+0.263342399264j))*x[2]
+            ref[(0, 1, 0, 0)]+=(0.0137180360376+0.0658316794116j)*x_ref[2]**o + ((-0.991984627672+0.263342399264j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.12512649991+0.00976888998498j)*x[2]**o + ((-0.816666462344-0.603958833091j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.12512649991+0.00976888998498j)*x_ref[2]**o + ((-0.816666462344-0.603958833091j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.747122256214-0.454831650919j)*x[2]**o + ((-0.133382269802+0.317536347094j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.747122256214-0.454831650919j)*x_ref[2]**o + ((-0.133382269802+0.317536347094j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.535491604104+0.11941895356j)*x[2]**o + ((0.653084022796+0.0197770150217j))*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.535491604104+0.11941895356j)*x_ref[2]**o + ((0.653084022796+0.0197770150217j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.127231083442-0.0187305451182j)*x[2]**o + ((-0.662137479677-0.923690256444j))*x[2]
+            ref[(0, 2, 0, 0)]+=(0.127231083442-0.0187305451182j)*x_ref[2]**o + ((-0.662137479677-0.923690256444j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.421710713636+0.586368002049j)*x[2]**o + ((-0.0462030916572+0.585454177983j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.421710713636+0.586368002049j)*x_ref[2]**o + ((-0.0462030916572+0.585454177983j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(0.399708614915-0.81747281329j)*x[2]**o + ((-0.349347798983-0.1714572838j))*x[2]
+            ref[(0, 2, 1, 0)]+=(0.399708614915-0.81747281329j)*x_ref[2]**o + ((-0.349347798983-0.1714572838j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.312103978609+0.992868514429j)*x[2]**o + ((0.305535679317-0.557881551738j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.312103978609+0.992868514429j)*x_ref[2]**o + ((0.305535679317-0.557881551738j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.9133468747+0.340523566457j)*x[2]**o + ((0.467165323274-0.535057953369j))*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.9133468747+0.340523566457j)*x_ref[2]**o + ((0.467165323274-0.535057953369j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.460461607791-0.981105281631j)*x[2]**o + ((0.64255004449+0.889891452678j))*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.460461607791-0.981105281631j)*x_ref[2]**o + ((0.64255004449+0.889891452678j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.0247121431123+0.0883661445372j)*x[2]**o + ((-0.645689469008+0.88514739377j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.0247121431123+0.0883661445372j)*x_ref[2]**o + ((-0.645689469008+0.88514739377j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.890245260942-0.974781572501j)*x[2]**o + ((0.676263269675+0.326125783491j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.890245260942-0.974781572501j)*x_ref[2]**o + ((0.676263269675+0.326125783491j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.176673981335-0.513719174334j)*x[2]**o + ((0.377929055273-0.0395082548168j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.176673981335-0.513719174334j)*x_ref[2]**o + ((0.377929055273-0.0395082548168j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.981236905415+0.0743985712354j)*x[2]**o + ((-0.0353292245705-0.716171246323j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.981236905415+0.0743985712354j)*x_ref[2]**o + ((-0.0353292245705-0.716171246323j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.925854811869-0.316880357043j)*x[2]**o + ((0.0881471055715-0.716264226937j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.925854811869-0.316880357043j)*x_ref[2]**o + ((0.0881471055715-0.716264226937j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.508418975943-0.86553766237j)*x[2]**o + ((-0.107029414854-0.553420205149j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.508418975943-0.86553766237j)*x_ref[2]**o + ((-0.107029414854-0.553420205149j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.9104259751-0.092928648109j)*x[2]**o + ((-0.691750482769+0.125185776415j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.9104259751-0.092928648109j)*x_ref[2]**o + ((-0.691750482769+0.125185776415j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(-0.0960593002108-0.124284110009j)*x[2]**o + ((0.0812417051416+0.0256454804952j))*x[2]
+            ref[(1, 2, 0, 1)]+=(-0.0960593002108-0.124284110009j)*x_ref[2]**o + ((0.0812417051416+0.0256454804952j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(0.401075749797-0.524327861516j)*x[2]**o + ((-0.401974734144-0.134879525974j))*x[2]
+            ref[(1, 2, 1, 0)]+=(0.401075749797-0.524327861516j)*x_ref[2]**o + ((-0.401974734144-0.134879525974j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(0.516244648995+0.327015997733j)*x[2]**o + ((0.454614364375-0.812295701732j))*x[2]
+            ref[(1, 2, 1, 1)]+=(0.516244648995+0.327015997733j)*x_ref[2]**o + ((0.454614364375-0.812295701732j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.442592841524+0.982005572607j)*x[2]**o + ((-0.12997798765+0.0970334582309j))*x[2]
+            ref[(2, 0, 0, 0)]+=(0.442592841524+0.982005572607j)*x_ref[2]**o + ((-0.12997798765+0.0970334582309j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.983026279517+0.448964915805j)*x[2]**o + ((-0.571324381695+0.232127221651j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.983026279517+0.448964915805j)*x_ref[2]**o + ((-0.571324381695+0.232127221651j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(0.481899476364+0.487841000238j)*x[2]**o + ((0.830956498674+0.319936654731j))*x[2]
+            ref[(2, 0, 1, 0)]+=(0.481899476364+0.487841000238j)*x_ref[2]**o + ((0.830956498674+0.319936654731j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.306035739198+0.172445272479j)*x[2]**o + ((0.659162319334+0.975562684529j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.306035739198+0.172445272479j)*x_ref[2]**o + ((0.659162319334+0.975562684529j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(-0.558739826514-0.333807325315j)*x[2]**o + ((0.51045765924-0.677716272391j))*x[2]
+            ref[(2, 1, 0, 0)]+=(-0.558739826514-0.333807325315j)*x_ref[2]**o + ((0.51045765924-0.677716272391j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.818255333646+0.923192447255j)*x[2]**o + ((-0.727750664226+0.734514094435j))*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.818255333646+0.923192447255j)*x_ref[2]**o + ((-0.727750664226+0.734514094435j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.46782980943-0.212039038211j)*x[2]**o + ((-0.717019736689+0.522477529244j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.46782980943-0.212039038211j)*x_ref[2]**o + ((-0.717019736689+0.522477529244j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.38110897252+0.995025013398j)*x[2]**o + ((-0.677826617598+0.243579814759j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.38110897252+0.995025013398j)*x_ref[2]**o + ((-0.677826617598+0.243579814759j))*x_ref[2]
+            arg[(2, 2, 0, 0)]+=(-0.0439129745645+0.845877666461j)*x[2]**o + ((-0.546255823053+0.509446287242j))*x[2]
+            ref[(2, 2, 0, 0)]+=(-0.0439129745645+0.845877666461j)*x_ref[2]**o + ((-0.546255823053+0.509446287242j))*x_ref[2]
+            arg[(2, 2, 0, 1)]+=(-0.0518297461222-0.536738218189j)*x[2]**o + ((-0.283591702724+0.935944704018j))*x[2]
+            ref[(2, 2, 0, 1)]+=(-0.0518297461222-0.536738218189j)*x_ref[2]**o + ((-0.283591702724+0.935944704018j))*x_ref[2]
+            arg[(2, 2, 1, 0)]+=(-0.21434305595-0.385764310179j)*x[2]**o + ((0.444335747135+0.884042379936j))*x[2]
+            ref[(2, 2, 1, 0)]+=(-0.21434305595-0.385764310179j)*x_ref[2]**o + ((0.444335747135+0.884042379936j))*x_ref[2]
+            arg[(2, 2, 1, 1)]+=(0.188302046764-0.497179285588j)*x[2]**o + ((-0.423667402633+0.130772576785j))*x[2]
+            ref[(2, 2, 1, 1)]+=(0.188302046764-0.497179285588j)*x_ref[2]**o + ((-0.423667402633+0.130772576785j))*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(0.977231423682+0.538166604678j)*x[2]**o + ((0.92450420907-0.9009011032j))*x[2]
+            ref[(3, 0, 0, 0)]+=(0.977231423682+0.538166604678j)*x_ref[2]**o + ((0.92450420907-0.9009011032j))*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.996352487657-0.341917626658j)*x[2]**o + ((0.557283798572-0.633528383062j))*x[2]
+            ref[(3, 0, 0, 1)]+=(0.996352487657-0.341917626658j)*x_ref[2]**o + ((0.557283798572-0.633528383062j))*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.598598785939-0.693876669377j)*x[2]**o + ((0.495029018458-0.954427544015j))*x[2]
+            ref[(3, 0, 1, 0)]+=(0.598598785939-0.693876669377j)*x_ref[2]**o + ((0.495029018458-0.954427544015j))*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(0.429990832248-0.0801026067725j)*x[2]**o + ((0.315010920331+0.768519090747j))*x[2]
+            ref[(3, 0, 1, 1)]+=(0.429990832248-0.0801026067725j)*x_ref[2]**o + ((0.315010920331+0.768519090747j))*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(-0.425790938046+0.87412083573j)*x[2]**o + ((0.127884812959-0.182149491749j))*x[2]
+            ref[(3, 1, 0, 0)]+=(-0.425790938046+0.87412083573j)*x_ref[2]**o + ((0.127884812959-0.182149491749j))*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(-0.97193020515-0.153971083552j)*x[2]**o + ((0.732091091382+0.979740026034j))*x[2]
+            ref[(3, 1, 0, 1)]+=(-0.97193020515-0.153971083552j)*x_ref[2]**o + ((0.732091091382+0.979740026034j))*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(0.60161912016+0.660393425382j)*x[2]**o + ((0.0109371754263+0.776951842591j))*x[2]
+            ref[(3, 1, 1, 0)]+=(0.60161912016+0.660393425382j)*x_ref[2]**o + ((0.0109371754263+0.776951842591j))*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(-0.399175867045+0.668960369249j)*x[2]**o + ((-0.0989447169322+0.768201864033j))*x[2]
+            ref[(3, 1, 1, 1)]+=(-0.399175867045+0.668960369249j)*x_ref[2]**o + ((-0.0989447169322+0.768201864033j))*x_ref[2]
+            arg[(3, 2, 0, 0)]+=(0.30964504395+0.386457967485j)*x[2]**o + ((-0.639077931386-0.661024759625j))*x[2]
+            ref[(3, 2, 0, 0)]+=(0.30964504395+0.386457967485j)*x_ref[2]**o + ((-0.639077931386-0.661024759625j))*x_ref[2]
+            arg[(3, 2, 0, 1)]+=(-0.409965315455+0.695446390872j)*x[2]**o + ((0.216259065216-0.599676987532j))*x[2]
+            ref[(3, 2, 0, 1)]+=(-0.409965315455+0.695446390872j)*x_ref[2]**o + ((0.216259065216-0.599676987532j))*x_ref[2]
+            arg[(3, 2, 1, 0)]+=(-0.461996085729-0.36601643407j)*x[2]**o + ((0.182784990134+0.885181490555j))*x[2]
+            ref[(3, 2, 1, 0)]+=(-0.461996085729-0.36601643407j)*x_ref[2]**o + ((0.182784990134+0.885181490555j))*x_ref[2]
+            arg[(3, 2, 1, 1)]+=(0.978262639677+0.745260209133j)*x[2]**o + ((-0.920472240609+0.197359108654j))*x[2]
+            ref[(3, 2, 1, 1)]+=(0.978262639677+0.745260209133j)*x_ref[2]**o + ((-0.920472240609+0.197359108654j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.926911776254-0.628389856954j)*x[0] + ((0.559725495102+0.723096475259j))*x[1]
+        ref=(-0.926911776254-0.628389856954j)*x_ref[0] + ((0.559725495102+0.723096475259j))*x_ref[1]
+        if dim==3:
+            arg+=((0.125089761729-0.714377669775j))*x[2]
+            ref+=((0.125089761729-0.714377669775j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=(-0.785271699612+0.273753446694j)*x[0] + ((0.870577130035+0.66452151927j))*x[1]
+        ref[(0,)]=(-0.785271699612+0.273753446694j)*x_ref[0] + ((0.870577130035+0.66452151927j))*x_ref[1]
+        arg[(1,)]=(0.306079061731-0.530202981224j)*x[0] + ((0.345782612924-0.296622898984j))*x[1]
+        ref[(1,)]=(0.306079061731-0.530202981224j)*x_ref[0] + ((0.345782612924-0.296622898984j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.867654640863-0.639222407411j)*x[2]
+            ref[(0,)]+=(-0.867654640863-0.639222407411j)*x_ref[2]
+            arg[(1,)]+=(0.652530517898-0.664963538342j)*x[2]
+            ref[(1,)]+=(0.652530517898-0.664963538342j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=(0.0311923581264+0.418485876477j)*x[0] + ((0.495557239829+0.480239405015j))*x[1]
+        ref[(0, 0)]=(0.0311923581264+0.418485876477j)*x_ref[0] + ((0.495557239829+0.480239405015j))*x_ref[1]
+        arg[(0, 1)]=(-0.610344002375+0.115468841226j)*x[0] + ((-0.694051076493-0.755820755338j))*x[1]
+        ref[(0, 1)]=(-0.610344002375+0.115468841226j)*x_ref[0] + ((-0.694051076493-0.755820755338j))*x_ref[1]
+        arg[(1, 0)]=(0.811216380855-0.403902889202j)*x[0] + ((-0.902349087727-0.950648420133j))*x[1]
+        ref[(1, 0)]=(0.811216380855-0.403902889202j)*x_ref[0] + ((-0.902349087727-0.950648420133j))*x_ref[1]
+        arg[(1, 1)]=(-0.680854755044+0.46036606591j)*x[0] + ((-0.132789220151-0.666916367289j))*x[1]
+        ref[(1, 1)]=(-0.680854755044+0.46036606591j)*x_ref[0] + ((-0.132789220151-0.666916367289j))*x_ref[1]
+        arg[(2, 0)]=(0.673210948322+0.4815072852j)*x[0] + ((-0.350740553759+0.201473923745j))*x[1]
+        ref[(2, 0)]=(0.673210948322+0.4815072852j)*x_ref[0] + ((-0.350740553759+0.201473923745j))*x_ref[1]
+        arg[(2, 1)]=(-0.681769483543-0.533354623984j)*x[0] + ((0.0436570081035-0.550691917623j))*x[1]
+        ref[(2, 1)]=(-0.681769483543-0.533354623984j)*x_ref[0] + ((0.0436570081035-0.550691917623j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.211574341284+0.887705931183j)*x[2]
+            ref[(0, 0)]+=(0.211574341284+0.887705931183j)*x_ref[2]
+            arg[(0, 1)]+=(-0.187863706701+0.839613420044j)*x[2]
+            ref[(0, 1)]+=(-0.187863706701+0.839613420044j)*x_ref[2]
+            arg[(1, 0)]+=(-0.416216286712-0.735903602771j)*x[2]
+            ref[(1, 0)]+=(-0.416216286712-0.735903602771j)*x_ref[2]
+            arg[(1, 1)]+=(-0.770216795777+0.556478083345j)*x[2]
+            ref[(1, 1)]+=(-0.770216795777+0.556478083345j)*x_ref[2]
+            arg[(2, 0)]+=(0.000896708447675+0.143547778551j)*x[2]
+            ref[(2, 0)]+=(0.000896708447675+0.143547778551j)*x_ref[2]
+            arg[(2, 1)]+=(-0.347816875373+0.0764246542504j)*x[2]
+            ref[(2, 1)]+=(-0.347816875373+0.0764246542504j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 2),w)
+        ref = Data(0,(2, 2, 2),w_ref)
+        arg[(0, 0, 0)]=(0.174521612535-0.800233837361j)*x[0] + ((0.950284925551-0.996466345739j))*x[1]
+        ref[(0, 0, 0)]=(0.174521612535-0.800233837361j)*x_ref[0] + ((0.950284925551-0.996466345739j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.958267774786+0.583134280071j)*x[0] + ((-0.276376747725+0.224535867804j))*x[1]
+        ref[(0, 0, 1)]=(-0.958267774786+0.583134280071j)*x_ref[0] + ((-0.276376747725+0.224535867804j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.478538079671-0.741352245578j)*x[0] + ((0.408690688264+0.488821148375j))*x[1]
+        ref[(0, 1, 0)]=(0.478538079671-0.741352245578j)*x_ref[0] + ((0.408690688264+0.488821148375j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.569037963533-0.633018106918j)*x[0] + ((-0.314806311855-0.719788850146j))*x[1]
+        ref[(0, 1, 1)]=(-0.569037963533-0.633018106918j)*x_ref[0] + ((-0.314806311855-0.719788850146j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.0601144046154-0.351076339844j)*x[0] + ((0.312878389466+0.0597081549233j))*x[1]
+        ref[(1, 0, 0)]=(0.0601144046154-0.351076339844j)*x_ref[0] + ((0.312878389466+0.0597081549233j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.898781662074-0.819232117075j)*x[0] + ((0.620777496276-0.42193185306j))*x[1]
+        ref[(1, 0, 1)]=(-0.898781662074-0.819232117075j)*x_ref[0] + ((0.620777496276-0.42193185306j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.187288954342-0.413219950116j)*x[0] + ((-0.258405317588+0.740636436516j))*x[1]
+        ref[(1, 1, 0)]=(-0.187288954342-0.413219950116j)*x_ref[0] + ((-0.258405317588+0.740636436516j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.389072008661+0.803793946221j)*x[0] + ((-0.00136458129803-0.221543809301j))*x[1]
+        ref[(1, 1, 1)]=(-0.389072008661+0.803793946221j)*x_ref[0] + ((-0.00136458129803-0.221543809301j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.290402374051-0.109192907874j)*x[2]
+            ref[(0, 0, 0)]+=(-0.290402374051-0.109192907874j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.759213223652-0.0812070639056j)*x[2]
+            ref[(0, 0, 1)]+=(0.759213223652-0.0812070639056j)*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.237181521622-0.296411217968j)*x[2]
+            ref[(0, 1, 0)]+=(-0.237181521622-0.296411217968j)*x_ref[2]
+            arg[(0, 1, 1)]+=(0.0700290476528+0.648961233477j)*x[2]
+            ref[(0, 1, 1)]+=(0.0700290476528+0.648961233477j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.278598718489+0.470988887328j)*x[2]
+            ref[(1, 0, 0)]+=(0.278598718489+0.470988887328j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.956720460849+0.578225472262j)*x[2]
+            ref[(1, 0, 1)]+=(0.956720460849+0.578225472262j)*x_ref[2]
+            arg[(1, 1, 0)]+=(0.85720462514+0.068976522008j)*x[2]
+            ref[(1, 1, 0)]+=(0.85720462514+0.068976522008j)*x_ref[2]
+            arg[(1, 1, 1)]+=(0.255798355779-0.103116309095j)*x[2]
+            ref[(1, 1, 1)]+=(0.255798355779-0.103116309095j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3, 3),w)
+        ref = Data(0,(4, 2, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.802811128865-0.420867762795j)*x[0] + ((0.660953935976-0.55309006139j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.802811128865-0.420867762795j)*x_ref[0] + ((0.660953935976-0.55309006139j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.553485566872+0.618741912292j)*x[0] + ((-0.406108193411-0.231845677315j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.553485566872+0.618741912292j)*x_ref[0] + ((-0.406108193411-0.231845677315j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.286231123117-0.877349087301j)*x[0] + ((0.559727070839-0.106537388702j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.286231123117-0.877349087301j)*x_ref[0] + ((0.559727070839-0.106537388702j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.0871957144607-0.0696689979794j)*x[0] + ((-0.184458287953+0.0489099628362j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.0871957144607-0.0696689979794j)*x_ref[0] + ((-0.184458287953+0.0489099628362j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.604798189982+0.00334369935648j)*x[0] + ((0.169989326272-0.861321979129j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.604798189982+0.00334369935648j)*x_ref[0] + ((0.169989326272-0.861321979129j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.721416825289+0.334287138957j)*x[0] + ((-0.159136202731-0.028096350655j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.721416825289+0.334287138957j)*x_ref[0] + ((-0.159136202731-0.028096350655j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(0.17859811398-0.626683212658j)*x[0] + ((0.239674012492-0.860730106532j))*x[1]
+        ref[(0, 0, 2, 0)]=(0.17859811398-0.626683212658j)*x_ref[0] + ((0.239674012492-0.860730106532j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.144428234929+0.518533329548j)*x[0] + ((-0.703121859286-0.960540272927j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.144428234929+0.518533329548j)*x_ref[0] + ((-0.703121859286-0.960540272927j))*x_ref[1]
+        arg[(0, 0, 2, 2)]=(0.0609568024481+0.624857213223j)*x[0] + ((-0.00373662603149-0.43283915781j))*x[1]
+        ref[(0, 0, 2, 2)]=(0.0609568024481+0.624857213223j)*x_ref[0] + ((-0.00373662603149-0.43283915781j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(-0.960359536787-0.849030631605j)*x[0] + ((0.706095556375-0.491145422996j))*x[1]
+        ref[(0, 1, 0, 0)]=(-0.960359536787-0.849030631605j)*x_ref[0] + ((0.706095556375-0.491145422996j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.913394344923-0.249453361602j)*x[0] + ((-0.244678968229-0.698599727556j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.913394344923-0.249453361602j)*x_ref[0] + ((-0.244678968229-0.698599727556j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.737542049123-0.560015477358j)*x[0] + ((0.193499809171+0.787316568196j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.737542049123-0.560015477358j)*x_ref[0] + ((0.193499809171+0.787316568196j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.88151893219+0.744345850381j)*x[0] + ((-0.104913898379-0.848307489366j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.88151893219+0.744345850381j)*x_ref[0] + ((-0.104913898379-0.848307489366j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.430301015194-0.325043818492j)*x[0] + ((-0.944260232536+0.241724543006j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.430301015194-0.325043818492j)*x_ref[0] + ((-0.944260232536+0.241724543006j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(-0.543404134861-0.476027292174j)*x[0] + ((0.01337670834-0.15516069894j))*x[1]
+        ref[(0, 1, 1, 2)]=(-0.543404134861-0.476027292174j)*x_ref[0] + ((0.01337670834-0.15516069894j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.889676026206-0.532378239442j)*x[0] + ((0.659407151777-0.766280269383j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.889676026206-0.532378239442j)*x_ref[0] + ((0.659407151777-0.766280269383j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(-0.338465269031-0.172717528455j)*x[0] + ((0.281322064748-0.847118060652j))*x[1]
+        ref[(0, 1, 2, 1)]=(-0.338465269031-0.172717528455j)*x_ref[0] + ((0.281322064748-0.847118060652j))*x_ref[1]
+        arg[(0, 1, 2, 2)]=(0.0380886290772-0.372583982759j)*x[0] + ((-0.94957528612-0.258884182559j))*x[1]
+        ref[(0, 1, 2, 2)]=(0.0380886290772-0.372583982759j)*x_ref[0] + ((-0.94957528612-0.258884182559j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.674672314358-0.17676792239j)*x[0] + ((-0.601141114469+0.18367756712j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.674672314358-0.17676792239j)*x_ref[0] + ((-0.601141114469+0.18367756712j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.825536309232+0.947684396898j)*x[0] + ((-0.993483640714+0.773641935084j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.825536309232+0.947684396898j)*x_ref[0] + ((-0.993483640714+0.773641935084j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.319027105643-0.945984964821j)*x[0] + ((-0.314228317964-0.85818569394j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.319027105643-0.945984964821j)*x_ref[0] + ((-0.314228317964-0.85818569394j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.720489031758-0.311448572838j)*x[0] + ((-0.826628154256-0.813351592026j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.720489031758-0.311448572838j)*x_ref[0] + ((-0.826628154256-0.813351592026j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.0916718113368+0.25193540599j)*x[0] + ((0.215230574285-0.619320815285j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.0916718113368+0.25193540599j)*x_ref[0] + ((0.215230574285-0.619320815285j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.948423726524+0.161132365384j)*x[0] + ((0.837830771911-0.532418937463j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.948423726524+0.161132365384j)*x_ref[0] + ((0.837830771911-0.532418937463j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(0.646911970344-0.970063802687j)*x[0] + ((0.862499187251+0.885218082911j))*x[1]
+        ref[(1, 0, 2, 0)]=(0.646911970344-0.970063802687j)*x_ref[0] + ((0.862499187251+0.885218082911j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(0.374140735289+0.252425279018j)*x[0] + ((-0.482784650273-0.396042803738j))*x[1]
+        ref[(1, 0, 2, 1)]=(0.374140735289+0.252425279018j)*x_ref[0] + ((-0.482784650273-0.396042803738j))*x_ref[1]
+        arg[(1, 0, 2, 2)]=(-0.0336085754799-0.88415180885j)*x[0] + ((-0.885400947586-0.0353158701939j))*x[1]
+        ref[(1, 0, 2, 2)]=(-0.0336085754799-0.88415180885j)*x_ref[0] + ((-0.885400947586-0.0353158701939j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(-0.60787674949+0.339927964195j)*x[0] + ((0.496705783133-0.930548319158j))*x[1]
+        ref[(1, 1, 0, 0)]=(-0.60787674949+0.339927964195j)*x_ref[0] + ((0.496705783133-0.930548319158j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.258862941148+0.264905012455j)*x[0] + ((-0.965262502941-0.842127142151j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.258862941148+0.264905012455j)*x_ref[0] + ((-0.965262502941-0.842127142151j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.587480124639-0.449305722457j)*x[0] + ((0.579490591145-0.0845799234078j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.587480124639-0.449305722457j)*x_ref[0] + ((0.579490591145-0.0845799234078j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.368806805206-0.410270500811j)*x[0] + ((-0.398365415385+0.60699105685j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.368806805206-0.410270500811j)*x_ref[0] + ((-0.398365415385+0.60699105685j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.0665078772128-0.805304193389j)*x[0] + ((0.880785623487+0.158429635551j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.0665078772128-0.805304193389j)*x_ref[0] + ((0.880785623487+0.158429635551j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.506261546546+0.838664228369j)*x[0] + ((0.693648360412+0.108221224886j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.506261546546+0.838664228369j)*x_ref[0] + ((0.693648360412+0.108221224886j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.827400505264-0.974946598691j)*x[0] + ((-0.156712471114-0.321468521431j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.827400505264-0.974946598691j)*x_ref[0] + ((-0.156712471114-0.321468521431j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(0.265100523625+0.892800213009j)*x[0] + ((-0.0537272275803+0.2879335536j))*x[1]
+        ref[(1, 1, 2, 1)]=(0.265100523625+0.892800213009j)*x_ref[0] + ((-0.0537272275803+0.2879335536j))*x_ref[1]
+        arg[(1, 1, 2, 2)]=(0.196218299306+0.0106236421407j)*x[0] + ((-0.305705942017+0.809475798968j))*x[1]
+        ref[(1, 1, 2, 2)]=(0.196218299306+0.0106236421407j)*x_ref[0] + ((-0.305705942017+0.809475798968j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.549791270313-0.366651335582j)*x[0] + ((0.479524954167+0.839091711255j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.549791270313-0.366651335582j)*x_ref[0] + ((0.479524954167+0.839091711255j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.208179683834-0.382382914547j)*x[0] + ((-0.643410506925-0.454259858748j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.208179683834-0.382382914547j)*x_ref[0] + ((-0.643410506925-0.454259858748j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(-0.270007602818+0.657952942539j)*x[0] + ((0.0226985600041+0.251815273424j))*x[1]
+        ref[(2, 0, 0, 2)]=(-0.270007602818+0.657952942539j)*x_ref[0] + ((0.0226985600041+0.251815273424j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.925667288731-0.0151704910949j)*x[0] + ((-0.380871615302+0.562656963967j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.925667288731-0.0151704910949j)*x_ref[0] + ((-0.380871615302+0.562656963967j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(-0.489154302415-0.39969464785j)*x[0] + ((0.829722364894-0.77032941335j))*x[1]
+        ref[(2, 0, 1, 1)]=(-0.489154302415-0.39969464785j)*x_ref[0] + ((0.829722364894-0.77032941335j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(0.416537074454-0.694202286749j)*x[0] + ((0.18883464263-0.0810693899222j))*x[1]
+        ref[(2, 0, 1, 2)]=(0.416537074454-0.694202286749j)*x_ref[0] + ((0.18883464263-0.0810693899222j))*x_ref[1]
+        arg[(2, 0, 2, 0)]=(-0.644819355205+0.0272342060913j)*x[0] + ((0.233417192433-0.104755182967j))*x[1]
+        ref[(2, 0, 2, 0)]=(-0.644819355205+0.0272342060913j)*x_ref[0] + ((0.233417192433-0.104755182967j))*x_ref[1]
+        arg[(2, 0, 2, 1)]=(-0.761443948057+0.564434537398j)*x[0] + ((0.183886352601+0.15096971164j))*x[1]
+        ref[(2, 0, 2, 1)]=(-0.761443948057+0.564434537398j)*x_ref[0] + ((0.183886352601+0.15096971164j))*x_ref[1]
+        arg[(2, 0, 2, 2)]=(-0.864103897043+0.805124106915j)*x[0] + ((0.0520808410014+0.427506755047j))*x[1]
+        ref[(2, 0, 2, 2)]=(-0.864103897043+0.805124106915j)*x_ref[0] + ((0.0520808410014+0.427506755047j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.720979138978+0.245314801702j)*x[0] + ((0.640070726275-0.267141468118j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.720979138978+0.245314801702j)*x_ref[0] + ((0.640070726275-0.267141468118j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(-0.187254219798-0.971081950696j)*x[0] + ((0.344668632345+0.67441554193j))*x[1]
+        ref[(2, 1, 0, 1)]=(-0.187254219798-0.971081950696j)*x_ref[0] + ((0.344668632345+0.67441554193j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.574616144401+0.0967600515191j)*x[0] + ((-0.0596612323192+0.816197178404j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.574616144401+0.0967600515191j)*x_ref[0] + ((-0.0596612323192+0.816197178404j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.336941640243-0.167217490409j)*x[0] + ((-0.780100146922+0.908376891075j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.336941640243-0.167217490409j)*x_ref[0] + ((-0.780100146922+0.908376891075j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(0.576302488863-0.0377929030776j)*x[0] + ((0.981213939673-0.0935935316561j))*x[1]
+        ref[(2, 1, 1, 1)]=(0.576302488863-0.0377929030776j)*x_ref[0] + ((0.981213939673-0.0935935316561j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.855540132839+0.411074518356j)*x[0] + ((-0.349246173683+0.275462274938j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.855540132839+0.411074518356j)*x_ref[0] + ((-0.349246173683+0.275462274938j))*x_ref[1]
+        arg[(2, 1, 2, 0)]=(0.541862482595-0.643103730022j)*x[0] + ((0.784788258545-0.811052221465j))*x[1]
+        ref[(2, 1, 2, 0)]=(0.541862482595-0.643103730022j)*x_ref[0] + ((0.784788258545-0.811052221465j))*x_ref[1]
+        arg[(2, 1, 2, 1)]=(-0.0597032107603+0.735556382044j)*x[0] + ((-0.085056241978+0.289534119326j))*x[1]
+        ref[(2, 1, 2, 1)]=(-0.0597032107603+0.735556382044j)*x_ref[0] + ((-0.085056241978+0.289534119326j))*x_ref[1]
+        arg[(2, 1, 2, 2)]=(0.145801304242+0.876468443862j)*x[0] + ((0.339728140332-0.294504438317j))*x[1]
+        ref[(2, 1, 2, 2)]=(0.145801304242+0.876468443862j)*x_ref[0] + ((0.339728140332-0.294504438317j))*x_ref[1]
+        arg[(3, 0, 0, 0)]=(-0.514944126488+0.671282320891j)*x[0] + ((0.889954355359+0.561051528246j))*x[1]
+        ref[(3, 0, 0, 0)]=(-0.514944126488+0.671282320891j)*x_ref[0] + ((0.889954355359+0.561051528246j))*x_ref[1]
+        arg[(3, 0, 0, 1)]=(-0.545937580724-0.677130576888j)*x[0] + ((-0.124185361425+0.521004196709j))*x[1]
+        ref[(3, 0, 0, 1)]=(-0.545937580724-0.677130576888j)*x_ref[0] + ((-0.124185361425+0.521004196709j))*x_ref[1]
+        arg[(3, 0, 0, 2)]=(0.205303355837+0.967769366374j)*x[0] + ((0.0883684205326+0.441999936309j))*x[1]
+        ref[(3, 0, 0, 2)]=(0.205303355837+0.967769366374j)*x_ref[0] + ((0.0883684205326+0.441999936309j))*x_ref[1]
+        arg[(3, 0, 1, 0)]=(-0.165254319011-0.325107568056j)*x[0] + ((0.593530172835-0.633585846039j))*x[1]
+        ref[(3, 0, 1, 0)]=(-0.165254319011-0.325107568056j)*x_ref[0] + ((0.593530172835-0.633585846039j))*x_ref[1]
+        arg[(3, 0, 1, 1)]=(-0.244315318627+0.88878101021j)*x[0] + ((-0.316140942253+0.625096758033j))*x[1]
+        ref[(3, 0, 1, 1)]=(-0.244315318627+0.88878101021j)*x_ref[0] + ((-0.316140942253+0.625096758033j))*x_ref[1]
+        arg[(3, 0, 1, 2)]=(0.685364049731+0.523631823872j)*x[0] + ((-0.96640916806+0.828250707907j))*x[1]
+        ref[(3, 0, 1, 2)]=(0.685364049731+0.523631823872j)*x_ref[0] + ((-0.96640916806+0.828250707907j))*x_ref[1]
+        arg[(3, 0, 2, 0)]=(-0.264025118055-0.345745929687j)*x[0] + ((-0.930889457879-0.271718695268j))*x[1]
+        ref[(3, 0, 2, 0)]=(-0.264025118055-0.345745929687j)*x_ref[0] + ((-0.930889457879-0.271718695268j))*x_ref[1]
+        arg[(3, 0, 2, 1)]=(0.919551383153+0.361337570246j)*x[0] + ((-0.641547032157+0.349895413759j))*x[1]
+        ref[(3, 0, 2, 1)]=(0.919551383153+0.361337570246j)*x_ref[0] + ((-0.641547032157+0.349895413759j))*x_ref[1]
+        arg[(3, 0, 2, 2)]=(-0.355972615636-0.85762703231j)*x[0] + ((0.566991040021+0.46287020327j))*x[1]
+        ref[(3, 0, 2, 2)]=(-0.355972615636-0.85762703231j)*x_ref[0] + ((0.566991040021+0.46287020327j))*x_ref[1]
+        arg[(3, 1, 0, 0)]=(-0.403704210407+0.516502774395j)*x[0] + ((0.365732199852+0.596147036399j))*x[1]
+        ref[(3, 1, 0, 0)]=(-0.403704210407+0.516502774395j)*x_ref[0] + ((0.365732199852+0.596147036399j))*x_ref[1]
+        arg[(3, 1, 0, 1)]=(0.878453110901-0.382186229441j)*x[0] + ((0.29709434916-0.923077872888j))*x[1]
+        ref[(3, 1, 0, 1)]=(0.878453110901-0.382186229441j)*x_ref[0] + ((0.29709434916-0.923077872888j))*x_ref[1]
+        arg[(3, 1, 0, 2)]=(-0.183233411321-0.9621664784j)*x[0] + ((-0.333343883605+0.00670692667176j))*x[1]
+        ref[(3, 1, 0, 2)]=(-0.183233411321-0.9621664784j)*x_ref[0] + ((-0.333343883605+0.00670692667176j))*x_ref[1]
+        arg[(3, 1, 1, 0)]=(0.796733721338+0.397314001025j)*x[0] + ((0.598694258403+0.9551746503j))*x[1]
+        ref[(3, 1, 1, 0)]=(0.796733721338+0.397314001025j)*x_ref[0] + ((0.598694258403+0.9551746503j))*x_ref[1]
+        arg[(3, 1, 1, 1)]=(-0.744470037942+0.0120078235908j)*x[0] + ((0.942972370821-0.171497434721j))*x[1]
+        ref[(3, 1, 1, 1)]=(-0.744470037942+0.0120078235908j)*x_ref[0] + ((0.942972370821-0.171497434721j))*x_ref[1]
+        arg[(3, 1, 1, 2)]=(0.387032149882+0.933462059016j)*x[0] + ((-0.841947352372-0.941987236573j))*x[1]
+        ref[(3, 1, 1, 2)]=(0.387032149882+0.933462059016j)*x_ref[0] + ((-0.841947352372-0.941987236573j))*x_ref[1]
+        arg[(3, 1, 2, 0)]=(-0.733186389965+0.978390751084j)*x[0] + ((0.91446665852-0.62663032419j))*x[1]
+        ref[(3, 1, 2, 0)]=(-0.733186389965+0.978390751084j)*x_ref[0] + ((0.91446665852-0.62663032419j))*x_ref[1]
+        arg[(3, 1, 2, 1)]=(-0.150964327541+0.748497100876j)*x[0] + ((0.187407372515-0.248266172158j))*x[1]
+        ref[(3, 1, 2, 1)]=(-0.150964327541+0.748497100876j)*x_ref[0] + ((0.187407372515-0.248266172158j))*x_ref[1]
+        arg[(3, 1, 2, 2)]=(-0.666008504197+0.803543378972j)*x[0] + ((0.79831990518+0.245339651253j))*x[1]
+        ref[(3, 1, 2, 2)]=(-0.666008504197+0.803543378972j)*x_ref[0] + ((0.79831990518+0.245339651253j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.39125332488-0.55411053511j)*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.39125332488-0.55411053511j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.872703348097-0.863763600322j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.872703348097-0.863763600322j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.430545504571+0.229073590011j)*x[2]
+            ref[(0, 0, 0, 2)]+=(0.430545504571+0.229073590011j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.334609347539+0.493327734435j)*x[2]
+            ref[(0, 0, 1, 0)]+=(0.334609347539+0.493327734435j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.648655709723+0.867210998204j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.648655709723+0.867210998204j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.417402819254-0.817384855244j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.417402819254-0.817384855244j)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(-0.0743993559628+0.887891666792j)*x[2]
+            ref[(0, 0, 2, 0)]+=(-0.0743993559628+0.887891666792j)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(-0.405459515785+0.342522458719j)*x[2]
+            ref[(0, 0, 2, 1)]+=(-0.405459515785+0.342522458719j)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=(0.324317028787+0.80868163635j)*x[2]
+            ref[(0, 0, 2, 2)]+=(0.324317028787+0.80868163635j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.635168525616-0.13155302208j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.635168525616-0.13155302208j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.375253010716+0.407524920359j)*x[2]
+            ref[(0, 1, 0, 1)]+=(0.375253010716+0.407524920359j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.401735610781+0.48104816626j)*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.401735610781+0.48104816626j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.00359885374327-0.409165278164j)*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.00359885374327-0.409165278164j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.696557062672+0.166009474096j)*x[2]
+            ref[(0, 1, 1, 1)]+=(0.696557062672+0.166009474096j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.333984036234+0.632548762618j)*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.333984036234+0.632548762618j)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.61402471158-0.735332858518j)*x[2]
+            ref[(0, 1, 2, 0)]+=(0.61402471158-0.735332858518j)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(0.694303724746+0.425784799357j)*x[2]
+            ref[(0, 1, 2, 1)]+=(0.694303724746+0.425784799357j)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=(0.909274868806+0.398241682997j)*x[2]
+            ref[(0, 1, 2, 2)]+=(0.909274868806+0.398241682997j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.535057727408-0.100086368352j)*x[2]
+            ref[(1, 0, 0, 0)]+=(0.535057727408-0.100086368352j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(-0.195437116899-0.321859193228j)*x[2]
+            ref[(1, 0, 0, 1)]+=(-0.195437116899-0.321859193228j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.744985613593-0.0789246544926j)*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.744985613593-0.0789246544926j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(-0.660777372039+0.33574889129j)*x[2]
+            ref[(1, 0, 1, 0)]+=(-0.660777372039+0.33574889129j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.696516412916-0.82944825265j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.696516412916-0.82944825265j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.611814127153+0.338227002838j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.611814127153+0.338227002838j)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.209494840098-0.832047062387j)*x[2]
+            ref[(1, 0, 2, 0)]+=(0.209494840098-0.832047062387j)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.214716375852-0.21099863451j)*x[2]
+            ref[(1, 0, 2, 1)]+=(0.214716375852-0.21099863451j)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=(0.0955760406454-0.51267603993j)*x[2]
+            ref[(1, 0, 2, 2)]+=(0.0955760406454-0.51267603993j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.396569422419-0.695163595052j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.396569422419-0.695163595052j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.992876570756-0.884929239239j)*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.992876570756-0.884929239239j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.162661084303+0.839575493602j)*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.162661084303+0.839575493602j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.362271252591+0.901981213936j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.362271252591+0.901981213936j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.530101975944+0.657431699661j)*x[2]
+            ref[(1, 1, 1, 1)]+=(0.530101975944+0.657431699661j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.739601026162+0.0629839903217j)*x[2]
+            ref[(1, 1, 1, 2)]+=(0.739601026162+0.0629839903217j)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(0.0425257531364+0.874896268072j)*x[2]
+            ref[(1, 1, 2, 0)]+=(0.0425257531364+0.874896268072j)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.908720351791+0.23731841614j)*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.908720351791+0.23731841614j)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=(0.801447922868+0.0976369890391j)*x[2]
+            ref[(1, 1, 2, 2)]+=(0.801447922868+0.0976369890391j)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(0.648095323666+0.63259991062j)*x[2]
+            ref[(2, 0, 0, 0)]+=(0.648095323666+0.63259991062j)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(-0.52975924985-0.646276396963j)*x[2]
+            ref[(2, 0, 0, 1)]+=(-0.52975924985-0.646276396963j)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.0581897811226-0.993693801456j)*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.0581897811226-0.993693801456j)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.622555033212+0.0869960583362j)*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.622555033212+0.0869960583362j)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(0.767390330443-0.493366880467j)*x[2]
+            ref[(2, 0, 1, 1)]+=(0.767390330443-0.493366880467j)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.451753826623+0.0601754758236j)*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.451753826623+0.0601754758236j)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=(-0.0780600285129+0.204328171644j)*x[2]
+            ref[(2, 0, 2, 0)]+=(-0.0780600285129+0.204328171644j)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=(0.271357347631+0.687685031498j)*x[2]
+            ref[(2, 0, 2, 1)]+=(0.271357347631+0.687685031498j)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=(-0.601034159022+0.835679753073j)*x[2]
+            ref[(2, 0, 2, 2)]+=(-0.601034159022+0.835679753073j)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.716920603981-0.313594121274j)*x[2]
+            ref[(2, 1, 0, 0)]+=(0.716920603981-0.313594121274j)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(-0.286047465502+0.772446964639j)*x[2]
+            ref[(2, 1, 0, 1)]+=(-0.286047465502+0.772446964639j)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(-0.153686405274+0.317129824023j)*x[2]
+            ref[(2, 1, 0, 2)]+=(-0.153686405274+0.317129824023j)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(-0.45961011427+0.183217229987j)*x[2]
+            ref[(2, 1, 1, 0)]+=(-0.45961011427+0.183217229987j)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(-0.724881672209+0.33233838318j)*x[2]
+            ref[(2, 1, 1, 1)]+=(-0.724881672209+0.33233838318j)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(0.643330094451-0.729236650512j)*x[2]
+            ref[(2, 1, 1, 2)]+=(0.643330094451-0.729236650512j)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=(-0.595059028603+0.362914940792j)*x[2]
+            ref[(2, 1, 2, 0)]+=(-0.595059028603+0.362914940792j)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=(0.941963192409-0.206459526976j)*x[2]
+            ref[(2, 1, 2, 1)]+=(0.941963192409-0.206459526976j)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=(0.899566864944-0.819928631194j)*x[2]
+            ref[(2, 1, 2, 2)]+=(0.899566864944-0.819928631194j)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=(-0.673702417628-0.874337502089j)*x[2]
+            ref[(3, 0, 0, 0)]+=(-0.673702417628-0.874337502089j)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=(0.187356315682+0.0655007775305j)*x[2]
+            ref[(3, 0, 0, 1)]+=(0.187356315682+0.0655007775305j)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=(-0.324836918891-0.875514960778j)*x[2]
+            ref[(3, 0, 0, 2)]+=(-0.324836918891-0.875514960778j)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=(0.0653914486232+0.782275696005j)*x[2]
+            ref[(3, 0, 1, 0)]+=(0.0653914486232+0.782275696005j)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=(0.627162967063+0.770196165825j)*x[2]
+            ref[(3, 0, 1, 1)]+=(0.627162967063+0.770196165825j)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=(0.119200052307-0.249575402485j)*x[2]
+            ref[(3, 0, 1, 2)]+=(0.119200052307-0.249575402485j)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=(0.355448779512-0.13090640004j)*x[2]
+            ref[(3, 0, 2, 0)]+=(0.355448779512-0.13090640004j)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=(-0.00822700750923-0.742579165096j)*x[2]
+            ref[(3, 0, 2, 1)]+=(-0.00822700750923-0.742579165096j)*x_ref[2]
+            arg[(3, 0, 2, 2)]+=(0.717697616964+0.317754325783j)*x[2]
+            ref[(3, 0, 2, 2)]+=(0.717697616964+0.317754325783j)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=(-0.226809588295-0.354902981371j)*x[2]
+            ref[(3, 1, 0, 0)]+=(-0.226809588295-0.354902981371j)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=(0.375891613139+0.489110760392j)*x[2]
+            ref[(3, 1, 0, 1)]+=(0.375891613139+0.489110760392j)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=(-0.764003692939-0.564303897996j)*x[2]
+            ref[(3, 1, 0, 2)]+=(-0.764003692939-0.564303897996j)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=(-0.735343429976+0.390257203507j)*x[2]
+            ref[(3, 1, 1, 0)]+=(-0.735343429976+0.390257203507j)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=(0.495812432428-0.250446588005j)*x[2]
+            ref[(3, 1, 1, 1)]+=(0.495812432428-0.250446588005j)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=(0.297565528298-0.86583084313j)*x[2]
+            ref[(3, 1, 1, 2)]+=(0.297565528298-0.86583084313j)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=(-0.595901779105-0.258669628759j)*x[2]
+            ref[(3, 1, 2, 0)]+=(-0.595901779105-0.258669628759j)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=(0.730474106402+0.91925381975j)*x[2]
+            ref[(3, 1, 2, 1)]+=(0.730474106402+0.91925381975j)*x_ref[2]
+            arg[(3, 1, 2, 2)]+=(-0.755073260976-0.0846858081931j)*x[2]
+            ref[(3, 1, 2, 2)]+=(-0.755073260976-0.0846858081931j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.0406609911973-0.168033909129j)*x[0] + ((0.28792669004-0.603224148966j))*x[1]
+        ref=(0.0406609911973-0.168033909129j)*x_ref[0] + ((0.28792669004-0.603224148966j))*x_ref[1]
+        if dim==3:
+            arg+=((-0.584816523938-0.974667351102j))*x[2]
+            ref+=((-0.584816523938-0.974667351102j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(-0.913742926459+0.884922710354j)*x[0] + ((-0.427328475932+0.50881548187j))*x[1]
+        ref[(0,)]=(-0.913742926459+0.884922710354j)*x_ref[0] + ((-0.427328475932+0.50881548187j))*x_ref[1]
+        arg[(1,)]=(-0.21653466788+0.069915622011j)*x[0] + ((0.663387563549+0.723358641039j))*x[1]
+        ref[(1,)]=(-0.21653466788+0.069915622011j)*x_ref[0] + ((0.663387563549+0.723358641039j))*x_ref[1]
+        arg[(2,)]=(-0.0274520411917+0.250834941682j)*x[0] + ((-0.229477868008+0.866661472128j))*x[1]
+        ref[(2,)]=(-0.0274520411917+0.250834941682j)*x_ref[0] + ((-0.229477868008+0.866661472128j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.8998719581+0.697545906481j)*x[2]
+            ref[(0,)]+=(-0.8998719581+0.697545906481j)*x_ref[2]
+            arg[(1,)]+=(-0.140648210013-0.565618065588j)*x[2]
+            ref[(1,)]+=(-0.140648210013-0.565618065588j)*x_ref[2]
+            arg[(2,)]+=(0.0444223848106-0.150718320212j)*x[2]
+            ref[(2,)]+=(0.0444223848106-0.150718320212j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=(-0.709551966713+0.390066752847j)*x[0] + ((0.717238571856-0.151473873557j))*x[1]
+        ref[(0, 0)]=(-0.709551966713+0.390066752847j)*x_ref[0] + ((0.717238571856-0.151473873557j))*x_ref[1]
+        arg[(0, 1)]=(0.215115184247+0.931357620524j)*x[0] + ((0.732415022402+0.916347086831j))*x[1]
+        ref[(0, 1)]=(0.215115184247+0.931357620524j)*x_ref[0] + ((0.732415022402+0.916347086831j))*x_ref[1]
+        arg[(0, 2)]=(0.323236772853+0.374207781055j)*x[0] + ((0.891135886098+0.63073159444j))*x[1]
+        ref[(0, 2)]=(0.323236772853+0.374207781055j)*x_ref[0] + ((0.891135886098+0.63073159444j))*x_ref[1]
+        arg[(1, 0)]=(0.343927919422+0.0172607455561j)*x[0] + ((-0.60724422473+0.172215790324j))*x[1]
+        ref[(1, 0)]=(0.343927919422+0.0172607455561j)*x_ref[0] + ((-0.60724422473+0.172215790324j))*x_ref[1]
+        arg[(1, 1)]=(0.381078603131-0.852915256442j)*x[0] + ((-0.953743138654-0.80633126029j))*x[1]
+        ref[(1, 1)]=(0.381078603131-0.852915256442j)*x_ref[0] + ((-0.953743138654-0.80633126029j))*x_ref[1]
+        arg[(1, 2)]=(0.600581027335-0.228476557179j)*x[0] + ((0.727319491614+0.901679773324j))*x[1]
+        ref[(1, 2)]=(0.600581027335-0.228476557179j)*x_ref[0] + ((0.727319491614+0.901679773324j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(-0.660180405395-0.581277501349j)*x[2]
+            ref[(0, 0)]+=(-0.660180405395-0.581277501349j)*x_ref[2]
+            arg[(0, 1)]+=(0.12908119151+0.0818813586945j)*x[2]
+            ref[(0, 1)]+=(0.12908119151+0.0818813586945j)*x_ref[2]
+            arg[(0, 2)]+=(0.613882163112-0.0329342624342j)*x[2]
+            ref[(0, 2)]+=(0.613882163112-0.0329342624342j)*x_ref[2]
+            arg[(1, 0)]+=(0.0523172067612-0.162174844546j)*x[2]
+            ref[(1, 0)]+=(0.0523172067612-0.162174844546j)*x_ref[2]
+            arg[(1, 1)]+=(-0.709282355921-0.0605222892963j)*x[2]
+            ref[(1, 1)]+=(-0.709282355921-0.0605222892963j)*x_ref[2]
+            arg[(1, 2)]+=(-0.191370170459+0.0273281072635j)*x[2]
+            ref[(1, 2)]+=(-0.191370170459+0.0273281072635j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3),w)
+        ref = Data(0,(2, 2, 3),w_ref)
+        arg[(0, 0, 0)]=(0.761717125023-0.949497016364j)*x[0] + ((0.818645962303+0.781100802343j))*x[1]
+        ref[(0, 0, 0)]=(0.761717125023-0.949497016364j)*x_ref[0] + ((0.818645962303+0.781100802343j))*x_ref[1]
+        arg[(0, 0, 1)]=(0.325428276485-0.113165213568j)*x[0] + ((-0.686483586419+0.357197196965j))*x[1]
+        ref[(0, 0, 1)]=(0.325428276485-0.113165213568j)*x_ref[0] + ((-0.686483586419+0.357197196965j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.28822036533-0.323980287376j)*x[0] + ((0.75167131465-0.436217457706j))*x[1]
+        ref[(0, 0, 2)]=(0.28822036533-0.323980287376j)*x_ref[0] + ((0.75167131465-0.436217457706j))*x_ref[1]
+        arg[(0, 1, 0)]=(0.0926088946391-0.797789117838j)*x[0] + ((-0.691370372526-0.498821917376j))*x[1]
+        ref[(0, 1, 0)]=(0.0926088946391-0.797789117838j)*x_ref[0] + ((-0.691370372526-0.498821917376j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.778092731141+0.0893948955817j)*x[0] + ((0.481998612216+0.396743236922j))*x[1]
+        ref[(0, 1, 1)]=(0.778092731141+0.0893948955817j)*x_ref[0] + ((0.481998612216+0.396743236922j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.593156999652+0.443685608092j)*x[0] + ((0.467018422018-0.425700027401j))*x[1]
+        ref[(0, 1, 2)]=(0.593156999652+0.443685608092j)*x_ref[0] + ((0.467018422018-0.425700027401j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.0113255422704+0.0685413443542j)*x[0] + ((0.992217798797+0.154223840043j))*x[1]
+        ref[(1, 0, 0)]=(0.0113255422704+0.0685413443542j)*x_ref[0] + ((0.992217798797+0.154223840043j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.175890064951+0.175560063012j)*x[0] + ((0.786841531115+0.887029912407j))*x[1]
+        ref[(1, 0, 1)]=(-0.175890064951+0.175560063012j)*x_ref[0] + ((0.786841531115+0.887029912407j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.990194023733+0.964117359657j)*x[0] + ((-0.147200131724-0.547535196978j))*x[1]
+        ref[(1, 0, 2)]=(-0.990194023733+0.964117359657j)*x_ref[0] + ((-0.147200131724-0.547535196978j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.849194478427+0.265634355385j)*x[0] + ((-0.310398422049+0.586450499141j))*x[1]
+        ref[(1, 1, 0)]=(0.849194478427+0.265634355385j)*x_ref[0] + ((-0.310398422049+0.586450499141j))*x_ref[1]
+        arg[(1, 1, 1)]=(-0.129753249836-0.886798084796j)*x[0] + ((-0.0801485310909+0.539917985796j))*x[1]
+        ref[(1, 1, 1)]=(-0.129753249836-0.886798084796j)*x_ref[0] + ((-0.0801485310909+0.539917985796j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.872865043632-0.392595070193j)*x[0] + ((0.24407834141-0.51243737178j))*x[1]
+        ref[(1, 1, 2)]=(0.872865043632-0.392595070193j)*x_ref[0] + ((0.24407834141-0.51243737178j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.0241204011376+0.969289854172j)*x[2]
+            ref[(0, 0, 0)]+=(0.0241204011376+0.969289854172j)*x_ref[2]
+            arg[(0, 0, 1)]+=(0.528547759035-0.320514719826j)*x[2]
+            ref[(0, 0, 1)]+=(0.528547759035-0.320514719826j)*x_ref[2]
+            arg[(0, 0, 2)]+=(0.377308164547+0.438543636373j)*x[2]
+            ref[(0, 0, 2)]+=(0.377308164547+0.438543636373j)*x_ref[2]
+            arg[(0, 1, 0)]+=(0.0297085078339+0.645918756639j)*x[2]
+            ref[(0, 1, 0)]+=(0.0297085078339+0.645918756639j)*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.469028770657-0.504746313132j)*x[2]
+            ref[(0, 1, 1)]+=(-0.469028770657-0.504746313132j)*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.650242320831-0.922270646249j)*x[2]
+            ref[(0, 1, 2)]+=(-0.650242320831-0.922270646249j)*x_ref[2]
+            arg[(1, 0, 0)]+=(0.868383965116-0.522575513438j)*x[2]
+            ref[(1, 0, 0)]+=(0.868383965116-0.522575513438j)*x_ref[2]
+            arg[(1, 0, 1)]+=(0.798536380186+0.723216688287j)*x[2]
+            ref[(1, 0, 1)]+=(0.798536380186+0.723216688287j)*x_ref[2]
+            arg[(1, 0, 2)]+=(0.982004819826+0.2539954586j)*x[2]
+            ref[(1, 0, 2)]+=(0.982004819826+0.2539954586j)*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.58316361761+0.131370564629j)*x[2]
+            ref[(1, 1, 0)]+=(-0.58316361761+0.131370564629j)*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.687560606204-0.785628713134j)*x[2]
+            ref[(1, 1, 1)]+=(-0.687560606204-0.785628713134j)*x_ref[2]
+            arg[(1, 1, 2)]+=(0.840329888741-0.599980500917j)*x[2]
+            ref[(1, 1, 2)]+=(0.840329888741-0.599980500917j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2, 3),w)
+        ref = Data(0,(2, 3, 2, 3),w_ref)
+        arg[(0, 0, 0, 0)]=(0.698058553877-0.979894581492j)*x[0] + ((0.208629594841+0.202373305456j))*x[1]
+        ref[(0, 0, 0, 0)]=(0.698058553877-0.979894581492j)*x_ref[0] + ((0.208629594841+0.202373305456j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(0.227797042518-0.250100190278j)*x[0] + ((-0.486386747925+0.683959893742j))*x[1]
+        ref[(0, 0, 0, 1)]=(0.227797042518-0.250100190278j)*x_ref[0] + ((-0.486386747925+0.683959893742j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.993599819092+0.141610301501j)*x[0] + ((-0.874974991399-0.199779459549j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.993599819092+0.141610301501j)*x_ref[0] + ((-0.874974991399-0.199779459549j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(-0.0662335762356-0.986130042259j)*x[0] + ((-0.424971124256+0.14672167612j))*x[1]
+        ref[(0, 0, 1, 0)]=(-0.0662335762356-0.986130042259j)*x_ref[0] + ((-0.424971124256+0.14672167612j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.374323202561+0.804801711624j)*x[0] + ((-0.229232968124+0.865118652013j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.374323202561+0.804801711624j)*x_ref[0] + ((-0.229232968124+0.865118652013j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(0.588941761374-0.374932902049j)*x[0] + ((-0.724692076144+0.406179949385j))*x[1]
+        ref[(0, 0, 1, 2)]=(0.588941761374-0.374932902049j)*x_ref[0] + ((-0.724692076144+0.406179949385j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.383416363612+0.358086434646j)*x[0] + ((0.327142778962-0.0561141850301j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.383416363612+0.358086434646j)*x_ref[0] + ((0.327142778962-0.0561141850301j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.979585012693+0.496950621244j)*x[0] + ((-0.0431555568257+0.54936677235j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.979585012693+0.496950621244j)*x_ref[0] + ((-0.0431555568257+0.54936677235j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(0.175858200567-0.841550165748j)*x[0] + ((-0.416172033521+0.581621895248j))*x[1]
+        ref[(0, 1, 0, 2)]=(0.175858200567-0.841550165748j)*x_ref[0] + ((-0.416172033521+0.581621895248j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.753761949423+0.104726575224j)*x[0] + ((0.37081478359-0.379896720474j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.753761949423+0.104726575224j)*x_ref[0] + ((0.37081478359-0.379896720474j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.751347783005+0.893454673497j)*x[0] + ((0.607634530979-0.0327949107224j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.751347783005+0.893454673497j)*x_ref[0] + ((0.607634530979-0.0327949107224j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.675338604189+0.109060602991j)*x[0] + ((-0.568400069327-0.748462648589j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.675338604189+0.109060602991j)*x_ref[0] + ((-0.568400069327-0.748462648589j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.473078068796+0.240600407748j)*x[0] + ((0.457578627254-0.875532483877j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.473078068796+0.240600407748j)*x_ref[0] + ((0.457578627254-0.875532483877j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.727297337681+0.0256707723198j)*x[0] + ((-0.72307179741-0.195435288647j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.727297337681+0.0256707723198j)*x_ref[0] + ((-0.72307179741-0.195435288647j))*x_ref[1]
+        arg[(0, 2, 0, 2)]=(0.322871390345+0.464364442303j)*x[0] + ((0.379946982972+0.0553357194088j))*x[1]
+        ref[(0, 2, 0, 2)]=(0.322871390345+0.464364442303j)*x_ref[0] + ((0.379946982972+0.0553357194088j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(-0.889372843376-0.950748077215j)*x[0] + ((-0.753927636564-0.65755296785j))*x[1]
+        ref[(0, 2, 1, 0)]=(-0.889372843376-0.950748077215j)*x_ref[0] + ((-0.753927636564-0.65755296785j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(0.382048541798+0.306150047694j)*x[0] + ((0.358252954+0.21059467817j))*x[1]
+        ref[(0, 2, 1, 1)]=(0.382048541798+0.306150047694j)*x_ref[0] + ((0.358252954+0.21059467817j))*x_ref[1]
+        arg[(0, 2, 1, 2)]=(0.148899061035+0.682419762637j)*x[0] + ((0.614955934563-0.434408154567j))*x[1]
+        ref[(0, 2, 1, 2)]=(0.148899061035+0.682419762637j)*x_ref[0] + ((0.614955934563-0.434408154567j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.485224866-0.730666760558j)*x[0] + ((-0.144021148962-0.96244260417j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.485224866-0.730666760558j)*x_ref[0] + ((-0.144021148962-0.96244260417j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.708928902392+0.28253153842j)*x[0] + ((0.231598966681+0.214588553808j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.708928902392+0.28253153842j)*x_ref[0] + ((0.231598966681+0.214588553808j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.793290687151+0.0973081586469j)*x[0] + ((0.176212796228+0.418614767389j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.793290687151+0.0973081586469j)*x_ref[0] + ((0.176212796228+0.418614767389j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.496397323974+0.695291375397j)*x[0] + ((0.868697722971+0.989863102525j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.496397323974+0.695291375397j)*x_ref[0] + ((0.868697722971+0.989863102525j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.197693863963+0.571736622406j)*x[0] + ((0.160615757577+0.091240988214j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.197693863963+0.571736622406j)*x_ref[0] + ((0.160615757577+0.091240988214j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(0.182801867885-0.62637528442j)*x[0] + ((0.488780144733+0.57436022497j))*x[1]
+        ref[(1, 0, 1, 2)]=(0.182801867885-0.62637528442j)*x_ref[0] + ((0.488780144733+0.57436022497j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.460876000885-0.860441887389j)*x[0] + ((-0.3351337787+0.679904984266j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.460876000885-0.860441887389j)*x_ref[0] + ((-0.3351337787+0.679904984266j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.193944328203+0.522688408541j)*x[0] + ((-0.508839382508-0.409750433412j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.193944328203+0.522688408541j)*x_ref[0] + ((-0.508839382508-0.409750433412j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(0.300583631992-0.644196547648j)*x[0] + ((-0.338846023746-0.178620931172j))*x[1]
+        ref[(1, 1, 0, 2)]=(0.300583631992-0.644196547648j)*x_ref[0] + ((-0.338846023746-0.178620931172j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.0337777738972+0.921858246695j)*x[0] + ((0.926760728504-0.993858363454j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.0337777738972+0.921858246695j)*x_ref[0] + ((0.926760728504-0.993858363454j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(-0.861965882621+0.762244520423j)*x[0] + ((-0.69182777385+0.0342223677937j))*x[1]
+        ref[(1, 1, 1, 1)]=(-0.861965882621+0.762244520423j)*x_ref[0] + ((-0.69182777385+0.0342223677937j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(-0.758469581796-0.646734940623j)*x[0] + ((0.571971262134+0.0117336586174j))*x[1]
+        ref[(1, 1, 1, 2)]=(-0.758469581796-0.646734940623j)*x_ref[0] + ((0.571971262134+0.0117336586174j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.679605701211-0.0626896144053j)*x[0] + ((0.556656527172-0.272627140271j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.679605701211-0.0626896144053j)*x_ref[0] + ((0.556656527172-0.272627140271j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.0782999156998-0.776469412508j)*x[0] + ((0.866301507667+0.852829336824j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.0782999156998-0.776469412508j)*x_ref[0] + ((0.866301507667+0.852829336824j))*x_ref[1]
+        arg[(1, 2, 0, 2)]=(-0.607101190846+0.65798951325j)*x[0] + ((-0.333159816059-0.532426263306j))*x[1]
+        ref[(1, 2, 0, 2)]=(-0.607101190846+0.65798951325j)*x_ref[0] + ((-0.333159816059-0.532426263306j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(-0.0516868462163-0.994532241895j)*x[0] + ((0.937384880642+0.687266709233j))*x[1]
+        ref[(1, 2, 1, 0)]=(-0.0516868462163-0.994532241895j)*x_ref[0] + ((0.937384880642+0.687266709233j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.289508150111-0.115799376847j)*x[0] + ((-0.46344450358-0.116524601483j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.289508150111-0.115799376847j)*x_ref[0] + ((-0.46344450358-0.116524601483j))*x_ref[1]
+        arg[(1, 2, 1, 2)]=(0.215418650266+0.313252258478j)*x[0] + ((0.416375862317+0.628411107287j))*x[1]
+        ref[(1, 2, 1, 2)]=(0.215418650266+0.313252258478j)*x_ref[0] + ((0.416375862317+0.628411107287j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(0.126489703087-0.208570397897j)*x[2]
+            ref[(0, 0, 0, 0)]+=(0.126489703087-0.208570397897j)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.584185510791+0.768684616476j)*x[2]
+            ref[(0, 0, 0, 1)]+=(0.584185510791+0.768684616476j)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(0.723480286824+0.0900874535105j)*x[2]
+            ref[(0, 0, 0, 2)]+=(0.723480286824+0.0900874535105j)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.648837240266-0.748308092761j)*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.648837240266-0.748308092761j)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.234691342592+0.0782296557317j)*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.234691342592+0.0782296557317j)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(0.148303462239+0.241656432671j)*x[2]
+            ref[(0, 0, 1, 2)]+=(0.148303462239+0.241656432671j)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.467445884065+0.266794277323j)*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.467445884065+0.266794277323j)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.982871421308-0.858262618791j)*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.982871421308-0.858262618791j)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(-0.236964610011+0.900093778363j)*x[2]
+            ref[(0, 1, 0, 2)]+=(-0.236964610011+0.900093778363j)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(0.962830245312-0.11653128146j)*x[2]
+            ref[(0, 1, 1, 0)]+=(0.962830245312-0.11653128146j)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(-0.75665521795-0.625815176525j)*x[2]
+            ref[(0, 1, 1, 1)]+=(-0.75665521795-0.625815176525j)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(-0.400134971551+0.400877364939j)*x[2]
+            ref[(0, 1, 1, 2)]+=(-0.400134971551+0.400877364939j)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(0.221127576283-0.557572368028j)*x[2]
+            ref[(0, 2, 0, 0)]+=(0.221127576283-0.557572368028j)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(0.377056218626+0.918304493481j)*x[2]
+            ref[(0, 2, 0, 1)]+=(0.377056218626+0.918304493481j)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=(0.701900539083+0.390245088426j)*x[2]
+            ref[(0, 2, 0, 2)]+=(0.701900539083+0.390245088426j)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.645786930633+0.127177270611j)*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.645786930633+0.127177270611j)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.188446970165-0.640125899015j)*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.188446970165-0.640125899015j)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=(0.857992153692-0.811413270446j)*x[2]
+            ref[(0, 2, 1, 2)]+=(0.857992153692-0.811413270446j)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(-0.900624541887-0.788948592206j)*x[2]
+            ref[(1, 0, 0, 0)]+=(-0.900624541887-0.788948592206j)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.420906909229-0.106965408798j)*x[2]
+            ref[(1, 0, 0, 1)]+=(0.420906909229-0.106965408798j)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(-0.392076482611-0.708792462539j)*x[2]
+            ref[(1, 0, 0, 2)]+=(-0.392076482611-0.708792462539j)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.700010128236+0.977249757229j)*x[2]
+            ref[(1, 0, 1, 0)]+=(0.700010128236+0.977249757229j)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(0.0706854157127-0.899153723858j)*x[2]
+            ref[(1, 0, 1, 1)]+=(0.0706854157127-0.899153723858j)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.69219543704-0.0521438695923j)*x[2]
+            ref[(1, 0, 1, 2)]+=(0.69219543704-0.0521438695923j)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.638462601326+0.35730599308j)*x[2]
+            ref[(1, 1, 0, 0)]+=(0.638462601326+0.35730599308j)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.831212037956-0.108189351755j)*x[2]
+            ref[(1, 1, 0, 1)]+=(0.831212037956-0.108189351755j)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.636317723941-0.461881789278j)*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.636317723941-0.461881789278j)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.354285744278+0.838399781894j)*x[2]
+            ref[(1, 1, 1, 0)]+=(0.354285744278+0.838399781894j)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.282852474676-0.213293113802j)*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.282852474676-0.213293113802j)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(0.43869613027+0.225539466316j)*x[2]
+            ref[(1, 1, 1, 2)]+=(0.43869613027+0.225539466316j)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.799696037028+0.571031275433j)*x[2]
+            ref[(1, 2, 0, 0)]+=(0.799696037028+0.571031275433j)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.211017853811-0.660307840856j)*x[2]
+            ref[(1, 2, 0, 1)]+=(0.211017853811-0.660307840856j)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=(-0.858672182794-0.493448274592j)*x[2]
+            ref[(1, 2, 0, 2)]+=(-0.858672182794-0.493448274592j)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.840953400141+0.0125345931931j)*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.840953400141+0.0125345931931j)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.266485442471+0.971575548697j)*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.266485442471+0.971575548697j)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=(0.138319962147+0.477366127724j)*x[2]
+            ref[(1, 2, 1, 2)]+=(0.138319962147+0.477366127724j)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(-0.578978649572-0.332193337327j)*x[0]**o + ((0.787504076375+0.807789806439j))*x[0] + ((0.301451586278-0.361936287052j))*x[1]**o + ((-0.550701374093+0.178072203705j))*x[1]
+        ref=(-0.578978649572-0.332193337327j)*x_ref[0]**o + ((0.787504076375+0.807789806439j))*x_ref[0] + ((0.301451586278-0.361936287052j))*x_ref[1]**o + ((-0.550701374093+0.178072203705j))*x_ref[1]
+        if dim==3:
+            arg+=((0.42958653894-0.16101196816j))*x[2]**o + ((-0.708738684318-0.840586182094j))*x[2]
+            ref+=((0.42958653894-0.16101196816j))*x_ref[2]**o + ((-0.708738684318-0.840586182094j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=(0.147253855172+0.939227126197j)*x[0]**o + ((0.532027693967+0.0836001594637j))*x[0] + ((-0.0674254293432+0.358306953719j))*x[1]**o + ((-0.693794814287+0.298410946014j))*x[1]
+        ref[(0,)]=(0.147253855172+0.939227126197j)*x_ref[0]**o + ((0.532027693967+0.0836001594637j))*x_ref[0] + ((-0.0674254293432+0.358306953719j))*x_ref[1]**o + ((-0.693794814287+0.298410946014j))*x_ref[1]
+        arg[(1,)]=(-0.074971289959-0.811940814185j)*x[0]**o + ((0.11839484585-0.220538307164j))*x[0] + ((0.333347626976-0.410923154342j))*x[1]**o + ((-0.582991192893-0.639264724903j))*x[1]
+        ref[(1,)]=(-0.074971289959-0.811940814185j)*x_ref[0]**o + ((0.11839484585-0.220538307164j))*x_ref[0] + ((0.333347626976-0.410923154342j))*x_ref[1]**o + ((-0.582991192893-0.639264724903j))*x_ref[1]
+        arg[(2,)]=(-0.986471786269-0.277415431253j)*x[0]**o + ((0.98856176419-0.0272805652537j))*x[0] + ((0.293386068425+0.949263875853j))*x[1]**o + ((-0.0847608919575-0.419113676561j))*x[1]
+        ref[(2,)]=(-0.986471786269-0.277415431253j)*x_ref[0]**o + ((0.98856176419-0.0272805652537j))*x_ref[0] + ((0.293386068425+0.949263875853j))*x_ref[1]**o + ((-0.0847608919575-0.419113676561j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(0.99337059499-0.969498895411j)*x[2]**o + ((0.893967679603-0.36751823696j))*x[2]
+            ref[(0,)]+=(0.99337059499-0.969498895411j)*x_ref[2]**o + ((0.893967679603-0.36751823696j))*x_ref[2]
+            arg[(1,)]+=(-0.930828036259+0.715657668799j)*x[2]**o + ((-0.845508429362+0.306982129116j))*x[2]
+            ref[(1,)]+=(-0.930828036259+0.715657668799j)*x_ref[2]**o + ((-0.845508429362+0.306982129116j))*x_ref[2]
+            arg[(2,)]+=(0.819442307371-0.94022223744j)*x[2]**o + ((0.401371051591+0.447160196174j))*x[2]
+            ref[(2,)]+=(0.819442307371-0.94022223744j)*x_ref[2]**o + ((0.401371051591+0.447160196174j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=(0.445449940996+0.723235056021j)*x[0]**o + ((0.967109024542+0.428780161702j))*x[0] + ((0.247639455683-0.928297387381j))*x[1]**o + ((-0.0961727100714+0.584359167005j))*x[1]
+        ref[(0, 0)]=(0.445449940996+0.723235056021j)*x_ref[0]**o + ((0.967109024542+0.428780161702j))*x_ref[0] + ((0.247639455683-0.928297387381j))*x_ref[1]**o + ((-0.0961727100714+0.584359167005j))*x_ref[1]
+        arg[(0, 1)]=(-0.958980817217+0.431601980066j)*x[0]**o + ((0.47195871067-0.528309366072j))*x[0] + ((0.982377038441-0.399407058215j))*x[1]**o + ((-0.299919066168+0.75757371075j))*x[1]
+        ref[(0, 1)]=(-0.958980817217+0.431601980066j)*x_ref[0]**o + ((0.47195871067-0.528309366072j))*x_ref[0] + ((0.982377038441-0.399407058215j))*x_ref[1]**o + ((-0.299919066168+0.75757371075j))*x_ref[1]
+        arg[(1, 0)]=(-0.450741331747+0.353274876425j)*x[0]**o + ((0.810930871768-0.737080596971j))*x[0] + ((-0.32236159425+0.583075771663j))*x[1]**o + ((-0.213907992305-0.966246134139j))*x[1]
+        ref[(1, 0)]=(-0.450741331747+0.353274876425j)*x_ref[0]**o + ((0.810930871768-0.737080596971j))*x_ref[0] + ((-0.32236159425+0.583075771663j))*x_ref[1]**o + ((-0.213907992305-0.966246134139j))*x_ref[1]
+        arg[(1, 1)]=(0.510588344365-0.744655815823j)*x[0]**o + ((-0.260069446526-0.506117682246j))*x[0] + ((0.897264854431-0.311448989448j))*x[1]**o + ((-0.387990968149+0.258827182488j))*x[1]
+        ref[(1, 1)]=(0.510588344365-0.744655815823j)*x_ref[0]**o + ((-0.260069446526-0.506117682246j))*x_ref[0] + ((0.897264854431-0.311448989448j))*x_ref[1]**o + ((-0.387990968149+0.258827182488j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.0883727082477-0.465701981558j)*x[2]**o + ((-0.355607299439+0.956269496236j))*x[2]
+            ref[(0, 0)]+=(0.0883727082477-0.465701981558j)*x_ref[2]**o + ((-0.355607299439+0.956269496236j))*x_ref[2]
+            arg[(0, 1)]+=(-0.678901932591+0.831870817162j)*x[2]**o + ((0.23990662333-0.825774452122j))*x[2]
+            ref[(0, 1)]+=(-0.678901932591+0.831870817162j)*x_ref[2]**o + ((0.23990662333-0.825774452122j))*x_ref[2]
+            arg[(1, 0)]+=(-0.844968623306+0.986556247481j)*x[2]**o + ((0.800460516334-0.753890751432j))*x[2]
+            ref[(1, 0)]+=(-0.844968623306+0.986556247481j)*x_ref[2]**o + ((0.800460516334-0.753890751432j))*x_ref[2]
+            arg[(1, 1)]+=(0.876569977407-0.0317585441771j)*x[2]**o + ((0.158154699758+0.879114962846j))*x[2]
+            ref[(1, 1)]+=(0.876569977407-0.0317585441771j)*x_ref[2]**o + ((0.158154699758+0.879114962846j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.294794181708-0.907208549553j)*x[0]**o + ((0.950249492253+0.308880350197j))*x[0] + ((0.48238493766-0.815288075307j))*x[1]**o + ((0.798121860465-0.41272707741j))*x[1]
+        ref[(0, 0, 0)]=(-0.294794181708-0.907208549553j)*x_ref[0]**o + ((0.950249492253+0.308880350197j))*x_ref[0] + ((0.48238493766-0.815288075307j))*x_ref[1]**o + ((0.798121860465-0.41272707741j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.282021821719+0.661804141509j)*x[0]**o + ((0.724485131909-0.402882431337j))*x[0] + ((0.755489908064-0.295563160908j))*x[1]**o + ((-0.552911138532+0.548067124613j))*x[1]
+        ref[(0, 0, 1)]=(-0.282021821719+0.661804141509j)*x_ref[0]**o + ((0.724485131909-0.402882431337j))*x_ref[0] + ((0.755489908064-0.295563160908j))*x_ref[1]**o + ((-0.552911138532+0.548067124613j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.0828647834126-0.791371314554j)*x[0]**o + ((0.791973154541-0.314079669067j))*x[0] + ((-0.262053159956+0.689882564618j))*x[1]**o + ((-0.419716662498-0.130243306931j))*x[1]
+        ref[(0, 0, 2)]=(0.0828647834126-0.791371314554j)*x_ref[0]**o + ((0.791973154541-0.314079669067j))*x_ref[0] + ((-0.262053159956+0.689882564618j))*x_ref[1]**o + ((-0.419716662498-0.130243306931j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.209196622571+0.16394156549j)*x[0]**o + ((-0.856757604549+0.317810914833j))*x[0] + ((0.331966800604-0.455575442694j))*x[1]**o + ((-0.530099437704-0.937682658103j))*x[1]
+        ref[(0, 0, 3)]=(0.209196622571+0.16394156549j)*x_ref[0]**o + ((-0.856757604549+0.317810914833j))*x_ref[0] + ((0.331966800604-0.455575442694j))*x_ref[1]**o + ((-0.530099437704-0.937682658103j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.463875044319-0.336864296378j)*x[0]**o + ((-0.997259999832-0.398081534151j))*x[0] + ((-0.766358948081-0.40815205491j))*x[1]**o + ((0.946304670002-0.261839596151j))*x[1]
+        ref[(0, 1, 0)]=(-0.463875044319-0.336864296378j)*x_ref[0]**o + ((-0.997259999832-0.398081534151j))*x_ref[0] + ((-0.766358948081-0.40815205491j))*x_ref[1]**o + ((0.946304670002-0.261839596151j))*x_ref[1]
+        arg[(0, 1, 1)]=(-0.795301286214+0.599674459915j)*x[0]**o + ((0.919974180543+0.693045286991j))*x[0] + ((0.287248805556+0.308676527741j))*x[1]**o + ((-0.577885239755-0.0990410377528j))*x[1]
+        ref[(0, 1, 1)]=(-0.795301286214+0.599674459915j)*x_ref[0]**o + ((0.919974180543+0.693045286991j))*x_ref[0] + ((0.287248805556+0.308676527741j))*x_ref[1]**o + ((-0.577885239755-0.0990410377528j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.35763527157+0.152102313954j)*x[0]**o + ((0.130951533641-0.073812392063j))*x[0] + ((0.704565164807-0.36005742097j))*x[1]**o + ((0.501628932457+0.724396679721j))*x[1]
+        ref[(0, 1, 2)]=(0.35763527157+0.152102313954j)*x_ref[0]**o + ((0.130951533641-0.073812392063j))*x_ref[0] + ((0.704565164807-0.36005742097j))*x_ref[1]**o + ((0.501628932457+0.724396679721j))*x_ref[1]
+        arg[(0, 1, 3)]=(-0.341737163573-0.679316850068j)*x[0]**o + ((0.529527616838-0.982639537502j))*x[0] + ((0.704639169286+0.735071881715j))*x[1]**o + ((0.5591307123-0.189532790546j))*x[1]
+        ref[(0, 1, 3)]=(-0.341737163573-0.679316850068j)*x_ref[0]**o + ((0.529527616838-0.982639537502j))*x_ref[0] + ((0.704639169286+0.735071881715j))*x_ref[1]**o + ((0.5591307123-0.189532790546j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.0929710087726-0.912689942782j)*x[0]**o + ((-0.53493653082-0.906218991285j))*x[0] + ((-0.305780624484+0.902579304494j))*x[1]**o + ((0.38327643027-0.0381677672381j))*x[1]
+        ref[(1, 0, 0)]=(0.0929710087726-0.912689942782j)*x_ref[0]**o + ((-0.53493653082-0.906218991285j))*x_ref[0] + ((-0.305780624484+0.902579304494j))*x_ref[1]**o + ((0.38327643027-0.0381677672381j))*x_ref[1]
+        arg[(1, 0, 1)]=(0.262703703007+0.720790821733j)*x[0]**o + ((0.737893071998+0.890262840214j))*x[0] + ((0.677018196823+0.860555867892j))*x[1]**o + ((0.823613193196+0.0166525613933j))*x[1]
+        ref[(1, 0, 1)]=(0.262703703007+0.720790821733j)*x_ref[0]**o + ((0.737893071998+0.890262840214j))*x_ref[0] + ((0.677018196823+0.860555867892j))*x_ref[1]**o + ((0.823613193196+0.0166525613933j))*x_ref[1]
+        arg[(1, 0, 2)]=(0.886836592222+0.698627251186j)*x[0]**o + ((-0.0381282588353-0.701966674739j))*x[0] + ((0.318408238051-0.850089896889j))*x[1]**o + ((0.315562004582+0.709963449404j))*x[1]
+        ref[(1, 0, 2)]=(0.886836592222+0.698627251186j)*x_ref[0]**o + ((-0.0381282588353-0.701966674739j))*x_ref[0] + ((0.318408238051-0.850089896889j))*x_ref[1]**o + ((0.315562004582+0.709963449404j))*x_ref[1]
+        arg[(1, 0, 3)]=(0.0433435830226+0.795022373813j)*x[0]**o + ((0.15660395017-0.531512560779j))*x[0] + ((0.626600139166+0.362664011494j))*x[1]**o + ((0.432239763496+0.730317028335j))*x[1]
+        ref[(1, 0, 3)]=(0.0433435830226+0.795022373813j)*x_ref[0]**o + ((0.15660395017-0.531512560779j))*x_ref[0] + ((0.626600139166+0.362664011494j))*x_ref[1]**o + ((0.432239763496+0.730317028335j))*x_ref[1]
+        arg[(1, 1, 0)]=(-0.792285964179+0.683155594881j)*x[0]**o + ((-0.82540713457+0.226214140223j))*x[0] + ((0.144790614441-0.0899409286302j))*x[1]**o + ((0.110694792838+0.127157982475j))*x[1]
+        ref[(1, 1, 0)]=(-0.792285964179+0.683155594881j)*x_ref[0]**o + ((-0.82540713457+0.226214140223j))*x_ref[0] + ((0.144790614441-0.0899409286302j))*x_ref[1]**o + ((0.110694792838+0.127157982475j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.092625308035-0.0931091161647j)*x[0]**o + ((0.266524672529+0.785763754063j))*x[0] + ((0.161515388726+0.73127515382j))*x[1]**o + ((0.459368101845-0.680400822592j))*x[1]
+        ref[(1, 1, 1)]=(0.092625308035-0.0931091161647j)*x_ref[0]**o + ((0.266524672529+0.785763754063j))*x_ref[0] + ((0.161515388726+0.73127515382j))*x_ref[1]**o + ((0.459368101845-0.680400822592j))*x_ref[1]
+        arg[(1, 1, 2)]=(-0.2327858608+0.833072704669j)*x[0]**o + ((0.514796640839+0.982242501826j))*x[0] + ((0.195121654991-0.335125519474j))*x[1]**o + ((0.3145953918+0.0186982915167j))*x[1]
+        ref[(1, 1, 2)]=(-0.2327858608+0.833072704669j)*x_ref[0]**o + ((0.514796640839+0.982242501826j))*x_ref[0] + ((0.195121654991-0.335125519474j))*x_ref[1]**o + ((0.3145953918+0.0186982915167j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.801942168185-0.797600741313j)*x[0]**o + ((0.437616868277-0.802764154476j))*x[0] + ((-0.587266856663+0.118537629045j))*x[1]**o + ((-0.864871750436+0.352222482315j))*x[1]
+        ref[(1, 1, 3)]=(-0.801942168185-0.797600741313j)*x_ref[0]**o + ((0.437616868277-0.802764154476j))*x_ref[0] + ((-0.587266856663+0.118537629045j))*x_ref[1]**o + ((-0.864871750436+0.352222482315j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(-0.819239593427-0.430515612178j)*x[2]**o + ((-0.893910754386+0.900784047605j))*x[2]
+            ref[(0, 0, 0)]+=(-0.819239593427-0.430515612178j)*x_ref[2]**o + ((-0.893910754386+0.900784047605j))*x_ref[2]
+            arg[(0, 0, 1)]+=(0.522154223166+0.360273835831j)*x[2]**o + ((-0.04022689552-0.875052798076j))*x[2]
+            ref[(0, 0, 1)]+=(0.522154223166+0.360273835831j)*x_ref[2]**o + ((-0.04022689552-0.875052798076j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.074757779118-0.299857006085j)*x[2]**o + ((0.617053096537-0.116850951777j))*x[2]
+            ref[(0, 0, 2)]+=(0.074757779118-0.299857006085j)*x_ref[2]**o + ((0.617053096537-0.116850951777j))*x_ref[2]
+            arg[(0, 0, 3)]+=(0.918684631256+0.279292843297j)*x[2]**o + ((0.598471240455-0.90394372292j))*x[2]
+            ref[(0, 0, 3)]+=(0.918684631256+0.279292843297j)*x_ref[2]**o + ((0.598471240455-0.90394372292j))*x_ref[2]
+            arg[(0, 1, 0)]+=(-0.948521167125+0.200298885584j)*x[2]**o + ((-0.634596328817+0.237057362142j))*x[2]
+            ref[(0, 1, 0)]+=(-0.948521167125+0.200298885584j)*x_ref[2]**o + ((-0.634596328817+0.237057362142j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.636448849894-0.946621590888j)*x[2]**o + ((0.125955831613+0.139753849868j))*x[2]
+            ref[(0, 1, 1)]+=(-0.636448849894-0.946621590888j)*x_ref[2]**o + ((0.125955831613+0.139753849868j))*x_ref[2]
+            arg[(0, 1, 2)]+=(-0.802220249563+0.407938336621j)*x[2]**o + ((-0.263669285982+0.0636398120152j))*x[2]
+            ref[(0, 1, 2)]+=(-0.802220249563+0.407938336621j)*x_ref[2]**o + ((-0.263669285982+0.0636398120152j))*x_ref[2]
+            arg[(0, 1, 3)]+=(0.607332160046-0.72190453071j)*x[2]**o + ((-0.541124729926+0.453860219156j))*x[2]
+            ref[(0, 1, 3)]+=(0.607332160046-0.72190453071j)*x_ref[2]**o + ((-0.541124729926+0.453860219156j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.839801237619-0.593527761873j)*x[2]**o + ((-0.882794815601-0.760953258878j))*x[2]
+            ref[(1, 0, 0)]+=(0.839801237619-0.593527761873j)*x_ref[2]**o + ((-0.882794815601-0.760953258878j))*x_ref[2]
+            arg[(1, 0, 1)]+=(0.119227536934+0.540357693615j)*x[2]**o + ((-0.895809318063+0.0221961168896j))*x[2]
+            ref[(1, 0, 1)]+=(0.119227536934+0.540357693615j)*x_ref[2]**o + ((-0.895809318063+0.0221961168896j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.344257509491+0.0837734603936j)*x[2]**o + ((-0.651505296703-0.683823692587j))*x[2]
+            ref[(1, 0, 2)]+=(-0.344257509491+0.0837734603936j)*x_ref[2]**o + ((-0.651505296703-0.683823692587j))*x_ref[2]
+            arg[(1, 0, 3)]+=(0.216545089959-0.408253095532j)*x[2]**o + ((0.839343005507+0.403447310172j))*x[2]
+            ref[(1, 0, 3)]+=(0.216545089959-0.408253095532j)*x_ref[2]**o + ((0.839343005507+0.403447310172j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.14549420797+0.434773405922j)*x[2]**o + ((0.128732837448+0.650718777198j))*x[2]
+            ref[(1, 1, 0)]+=(-0.14549420797+0.434773405922j)*x_ref[2]**o + ((0.128732837448+0.650718777198j))*x_ref[2]
+            arg[(1, 1, 1)]+=(-0.669537391207+0.0471580120153j)*x[2]**o + ((0.694014544905-0.191651397595j))*x[2]
+            ref[(1, 1, 1)]+=(-0.669537391207+0.0471580120153j)*x_ref[2]**o + ((0.694014544905-0.191651397595j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.528367375483+0.821915741664j)*x[2]**o + ((0.272341658996-0.998427909709j))*x[2]
+            ref[(1, 1, 2)]+=(0.528367375483+0.821915741664j)*x_ref[2]**o + ((0.272341658996-0.998427909709j))*x_ref[2]
+            arg[(1, 1, 3)]+=(0.0338409004427-0.583546767945j)*x[2]**o + ((0.292069725119-0.683438953119j))*x[2]
+            ref[(1, 1, 3)]+=(0.0338409004427-0.583546767945j)*x_ref[2]**o + ((0.292069725119-0.683438953119j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 4, 2),w)
+        ref = Data(0,(2, 3, 4, 2),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.614692217188+0.013867440152j)*x[0]**o + ((-0.325733287214-0.773406439718j))*x[0] + ((0.739513733511-0.319696206676j))*x[1]**o + ((-0.701337121966+0.384542626738j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.614692217188+0.013867440152j)*x_ref[0]**o + ((-0.325733287214-0.773406439718j))*x_ref[0] + ((0.739513733511-0.319696206676j))*x_ref[1]**o + ((-0.701337121966+0.384542626738j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.034763104314+0.741006127859j)*x[0]**o + ((0.183019160219+0.528073856314j))*x[0] + ((-0.253951856518-0.690995054093j))*x[1]**o + ((0.803539555939-0.758031347651j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.034763104314+0.741006127859j)*x_ref[0]**o + ((0.183019160219+0.528073856314j))*x_ref[0] + ((-0.253951856518-0.690995054093j))*x_ref[1]**o + ((0.803539555939-0.758031347651j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.520677722923-0.821225899764j)*x[0]**o + ((0.764209257813-0.268866950937j))*x[0] + ((0.756063073189+0.906718460299j))*x[1]**o + ((-0.879097999869+0.116151255622j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.520677722923-0.821225899764j)*x_ref[0]**o + ((0.764209257813-0.268866950937j))*x_ref[0] + ((0.756063073189+0.906718460299j))*x_ref[1]**o + ((-0.879097999869+0.116151255622j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(-0.26467729466-0.518743974009j)*x[0]**o + ((-0.126488465064-0.131781543724j))*x[0] + ((0.945862412395+0.392102196633j))*x[1]**o + ((-0.529951925378-0.680072159264j))*x[1]
+        ref[(0, 0, 1, 1)]=(-0.26467729466-0.518743974009j)*x_ref[0]**o + ((-0.126488465064-0.131781543724j))*x_ref[0] + ((0.945862412395+0.392102196633j))*x_ref[1]**o + ((-0.529951925378-0.680072159264j))*x_ref[1]
+        arg[(0, 0, 2, 0)]=(-0.767695116934+0.578321912763j)*x[0]**o + ((-0.554853275442-0.213106078287j))*x[0] + ((0.930348693555-0.194840838511j))*x[1]**o + ((0.447971020616-0.886921325143j))*x[1]
+        ref[(0, 0, 2, 0)]=(-0.767695116934+0.578321912763j)*x_ref[0]**o + ((-0.554853275442-0.213106078287j))*x_ref[0] + ((0.930348693555-0.194840838511j))*x_ref[1]**o + ((0.447971020616-0.886921325143j))*x_ref[1]
+        arg[(0, 0, 2, 1)]=(0.12609852955+0.49158692063j)*x[0]**o + ((-0.920823439426-0.352764567978j))*x[0] + ((0.222292214816-0.944032654735j))*x[1]**o + ((-0.921835263949+0.423434350198j))*x[1]
+        ref[(0, 0, 2, 1)]=(0.12609852955+0.49158692063j)*x_ref[0]**o + ((-0.920823439426-0.352764567978j))*x_ref[0] + ((0.222292214816-0.944032654735j))*x_ref[1]**o + ((-0.921835263949+0.423434350198j))*x_ref[1]
+        arg[(0, 0, 3, 0)]=(-0.446701740426+0.908011875501j)*x[0]**o + ((-0.347530642603+0.559506690954j))*x[0] + ((-0.747209828996+0.99723276067j))*x[1]**o + ((-0.497928940428+0.44587427698j))*x[1]
+        ref[(0, 0, 3, 0)]=(-0.446701740426+0.908011875501j)*x_ref[0]**o + ((-0.347530642603+0.559506690954j))*x_ref[0] + ((-0.747209828996+0.99723276067j))*x_ref[1]**o + ((-0.497928940428+0.44587427698j))*x_ref[1]
+        arg[(0, 0, 3, 1)]=(-0.47338222635+0.285069351708j)*x[0]**o + ((0.577074462593-0.702990973773j))*x[0] + ((0.128776629737-0.432177850335j))*x[1]**o + ((0.970007474162+0.809559216442j))*x[1]
+        ref[(0, 0, 3, 1)]=(-0.47338222635+0.285069351708j)*x_ref[0]**o + ((0.577074462593-0.702990973773j))*x_ref[0] + ((0.128776629737-0.432177850335j))*x_ref[1]**o + ((0.970007474162+0.809559216442j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.64309675846-0.180999612817j)*x[0]**o + ((-0.580015590637-0.179451515668j))*x[0] + ((-0.409170416592+0.805019866134j))*x[1]**o + ((-0.0229416610087-0.194497881186j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.64309675846-0.180999612817j)*x_ref[0]**o + ((-0.580015590637-0.179451515668j))*x_ref[0] + ((-0.409170416592+0.805019866134j))*x_ref[1]**o + ((-0.0229416610087-0.194497881186j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.0456956222104-0.798046470734j)*x[0]**o + ((-0.98503321211+0.293668169099j))*x[0] + ((-0.326297299597+0.904346493533j))*x[1]**o + ((-0.996018438501+0.740267142074j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.0456956222104-0.798046470734j)*x_ref[0]**o + ((-0.98503321211+0.293668169099j))*x_ref[0] + ((-0.326297299597+0.904346493533j))*x_ref[1]**o + ((-0.996018438501+0.740267142074j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(0.0108358685829+0.958445231872j)*x[0]**o + ((-0.145655515895+0.872618962465j))*x[0] + ((-0.00865982215769+0.64673208978j))*x[1]**o + ((-0.0473028100418+0.00461381818504j))*x[1]
+        ref[(0, 1, 1, 0)]=(0.0108358685829+0.958445231872j)*x_ref[0]**o + ((-0.145655515895+0.872618962465j))*x_ref[0] + ((-0.00865982215769+0.64673208978j))*x_ref[1]**o + ((-0.0473028100418+0.00461381818504j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(0.954294556036+0.506134781968j)*x[0]**o + ((0.877820164059+0.0372279161348j))*x[0] + ((0.796166515022+0.700156644773j))*x[1]**o + ((0.058122007065+0.661576009562j))*x[1]
+        ref[(0, 1, 1, 1)]=(0.954294556036+0.506134781968j)*x_ref[0]**o + ((0.877820164059+0.0372279161348j))*x_ref[0] + ((0.796166515022+0.700156644773j))*x_ref[1]**o + ((0.058122007065+0.661576009562j))*x_ref[1]
+        arg[(0, 1, 2, 0)]=(0.294172562365-0.881342691081j)*x[0]**o + ((0.482724375351-0.475979930461j))*x[0] + ((0.817667477575-0.765466376571j))*x[1]**o + ((0.0562753546536-0.179506488675j))*x[1]
+        ref[(0, 1, 2, 0)]=(0.294172562365-0.881342691081j)*x_ref[0]**o + ((0.482724375351-0.475979930461j))*x_ref[0] + ((0.817667477575-0.765466376571j))*x_ref[1]**o + ((0.0562753546536-0.179506488675j))*x_ref[1]
+        arg[(0, 1, 2, 1)]=(0.0975295056371-0.941143773369j)*x[0]**o + ((0.584704322587+0.178023854993j))*x[0] + ((0.618307073015-6.56703493571e-05j))*x[1]**o + ((0.78602542183+0.781126073042j))*x[1]
+        ref[(0, 1, 2, 1)]=(0.0975295056371-0.941143773369j)*x_ref[0]**o + ((0.584704322587+0.178023854993j))*x_ref[0] + ((0.618307073015-6.56703493571e-05j))*x_ref[1]**o + ((0.78602542183+0.781126073042j))*x_ref[1]
+        arg[(0, 1, 3, 0)]=(-0.97623204179+0.663603276518j)*x[0]**o + ((0.948207251432-0.257475556296j))*x[0] + ((0.91138672901-0.224732544544j))*x[1]**o + ((0.630007629468-0.414243814385j))*x[1]
+        ref[(0, 1, 3, 0)]=(-0.97623204179+0.663603276518j)*x_ref[0]**o + ((0.948207251432-0.257475556296j))*x_ref[0] + ((0.91138672901-0.224732544544j))*x_ref[1]**o + ((0.630007629468-0.414243814385j))*x_ref[1]
+        arg[(0, 1, 3, 1)]=(0.498556290522-0.420802597477j)*x[0]**o + ((-0.0285365620037-0.605788246859j))*x[0] + ((0.760367608325+0.103902053505j))*x[1]**o + ((-0.165974803012-0.371742495347j))*x[1]
+        ref[(0, 1, 3, 1)]=(0.498556290522-0.420802597477j)*x_ref[0]**o + ((-0.0285365620037-0.605788246859j))*x_ref[0] + ((0.760367608325+0.103902053505j))*x_ref[1]**o + ((-0.165974803012-0.371742495347j))*x_ref[1]
+        arg[(0, 2, 0, 0)]=(0.920869706854-0.372274294197j)*x[0]**o + ((-0.800952825763+0.925630466427j))*x[0] + ((-0.48130568695+0.044506666147j))*x[1]**o + ((0.586176467835-0.407384490547j))*x[1]
+        ref[(0, 2, 0, 0)]=(0.920869706854-0.372274294197j)*x_ref[0]**o + ((-0.800952825763+0.925630466427j))*x_ref[0] + ((-0.48130568695+0.044506666147j))*x_ref[1]**o + ((0.586176467835-0.407384490547j))*x_ref[1]
+        arg[(0, 2, 0, 1)]=(-0.305679731588-0.77435420682j)*x[0]**o + ((0.60288572417-0.305065631579j))*x[0] + ((0.664209454102+0.136616424698j))*x[1]**o + ((0.22379772669-0.127296843928j))*x[1]
+        ref[(0, 2, 0, 1)]=(-0.305679731588-0.77435420682j)*x_ref[0]**o + ((0.60288572417-0.305065631579j))*x_ref[0] + ((0.664209454102+0.136616424698j))*x_ref[1]**o + ((0.22379772669-0.127296843928j))*x_ref[1]
+        arg[(0, 2, 1, 0)]=(0.255433491301+0.901295492671j)*x[0]**o + ((0.669599229364-0.176115143547j))*x[0] + ((0.228762848387-0.338648318202j))*x[1]**o + ((-0.254086146482+0.487874243965j))*x[1]
+        ref[(0, 2, 1, 0)]=(0.255433491301+0.901295492671j)*x_ref[0]**o + ((0.669599229364-0.176115143547j))*x_ref[0] + ((0.228762848387-0.338648318202j))*x_ref[1]**o + ((-0.254086146482+0.487874243965j))*x_ref[1]
+        arg[(0, 2, 1, 1)]=(-0.660720044464-0.712154344442j)*x[0]**o + ((-0.647405058219-0.27571199101j))*x[0] + ((-0.16618640683-0.436448727132j))*x[1]**o + ((0.104460556824+0.587528151759j))*x[1]
+        ref[(0, 2, 1, 1)]=(-0.660720044464-0.712154344442j)*x_ref[0]**o + ((-0.647405058219-0.27571199101j))*x_ref[0] + ((-0.16618640683-0.436448727132j))*x_ref[1]**o + ((0.104460556824+0.587528151759j))*x_ref[1]
+        arg[(0, 2, 2, 0)]=(0.639401475764-0.576613928j)*x[0]**o + ((0.587780787677+0.471924723476j))*x[0] + ((-0.611809870129-0.35689110068j))*x[1]**o + ((-0.107533372943+0.41918940984j))*x[1]
+        ref[(0, 2, 2, 0)]=(0.639401475764-0.576613928j)*x_ref[0]**o + ((0.587780787677+0.471924723476j))*x_ref[0] + ((-0.611809870129-0.35689110068j))*x_ref[1]**o + ((-0.107533372943+0.41918940984j))*x_ref[1]
+        arg[(0, 2, 2, 1)]=(-0.297059862635-0.931111723235j)*x[0]**o + ((-0.344871716528+0.82291550294j))*x[0] + ((-0.481875037302+0.604265574555j))*x[1]**o + ((-0.670136773014-0.71000907644j))*x[1]
+        ref[(0, 2, 2, 1)]=(-0.297059862635-0.931111723235j)*x_ref[0]**o + ((-0.344871716528+0.82291550294j))*x_ref[0] + ((-0.481875037302+0.604265574555j))*x_ref[1]**o + ((-0.670136773014-0.71000907644j))*x_ref[1]
+        arg[(0, 2, 3, 0)]=(0.624926818587+0.0690252812948j)*x[0]**o + ((0.565368876443+0.769267037949j))*x[0] + ((-0.706056854632-0.652146557299j))*x[1]**o + ((-0.226600509149-0.727243189353j))*x[1]
+        ref[(0, 2, 3, 0)]=(0.624926818587+0.0690252812948j)*x_ref[0]**o + ((0.565368876443+0.769267037949j))*x_ref[0] + ((-0.706056854632-0.652146557299j))*x_ref[1]**o + ((-0.226600509149-0.727243189353j))*x_ref[1]
+        arg[(0, 2, 3, 1)]=(0.680945876645-0.587268931523j)*x[0]**o + ((-0.409993795834-0.660259290863j))*x[0] + ((-0.698977922096-0.169434915585j))*x[1]**o + ((0.872156086207-0.423182332915j))*x[1]
+        ref[(0, 2, 3, 1)]=(0.680945876645-0.587268931523j)*x_ref[0]**o + ((-0.409993795834-0.660259290863j))*x_ref[0] + ((-0.698977922096-0.169434915585j))*x_ref[1]**o + ((0.872156086207-0.423182332915j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(0.709808858412-0.705987290843j)*x[0]**o + ((0.0273710165934-0.152554618817j))*x[0] + ((-0.559139465105-0.0640990994563j))*x[1]**o + ((-0.708336830317-0.795693748497j))*x[1]
+        ref[(1, 0, 0, 0)]=(0.709808858412-0.705987290843j)*x_ref[0]**o + ((0.0273710165934-0.152554618817j))*x_ref[0] + ((-0.559139465105-0.0640990994563j))*x_ref[1]**o + ((-0.708336830317-0.795693748497j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(0.449983997095+0.175959708017j)*x[0]**o + ((-0.825350355254+0.248894252384j))*x[0] + ((0.923897790892-0.834721805712j))*x[1]**o + ((-0.092569220935+0.539670160217j))*x[1]
+        ref[(1, 0, 0, 1)]=(0.449983997095+0.175959708017j)*x_ref[0]**o + ((-0.825350355254+0.248894252384j))*x_ref[0] + ((0.923897790892-0.834721805712j))*x_ref[1]**o + ((-0.092569220935+0.539670160217j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(0.462188090955-0.353401793916j)*x[0]**o + ((-0.376754786609+0.405224054616j))*x[0] + ((0.796206162121-0.661751369455j))*x[1]**o + ((0.425280740276-0.940607409475j))*x[1]
+        ref[(1, 0, 1, 0)]=(0.462188090955-0.353401793916j)*x_ref[0]**o + ((-0.376754786609+0.405224054616j))*x_ref[0] + ((0.796206162121-0.661751369455j))*x_ref[1]**o + ((0.425280740276-0.940607409475j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(0.192581826059-0.734357284579j)*x[0]**o + ((-0.310330879999-0.263013483329j))*x[0] + ((0.848069337113+0.865685708972j))*x[1]**o + ((-0.565602808869-0.440952806415j))*x[1]
+        ref[(1, 0, 1, 1)]=(0.192581826059-0.734357284579j)*x_ref[0]**o + ((-0.310330879999-0.263013483329j))*x_ref[0] + ((0.848069337113+0.865685708972j))*x_ref[1]**o + ((-0.565602808869-0.440952806415j))*x_ref[1]
+        arg[(1, 0, 2, 0)]=(-0.61810685842-0.524095718529j)*x[0]**o + ((0.358188307228-0.724822954242j))*x[0] + ((0.679543030124-0.22127233743j))*x[1]**o + ((-0.105344957661+0.524104475041j))*x[1]
+        ref[(1, 0, 2, 0)]=(-0.61810685842-0.524095718529j)*x_ref[0]**o + ((0.358188307228-0.724822954242j))*x_ref[0] + ((0.679543030124-0.22127233743j))*x_ref[1]**o + ((-0.105344957661+0.524104475041j))*x_ref[1]
+        arg[(1, 0, 2, 1)]=(-0.338610141071+0.425242518352j)*x[0]**o + ((0.792110512364+0.602121807751j))*x[0] + ((-0.297532668975-0.0943575325236j))*x[1]**o + ((0.194300320775+0.975359286553j))*x[1]
+        ref[(1, 0, 2, 1)]=(-0.338610141071+0.425242518352j)*x_ref[0]**o + ((0.792110512364+0.602121807751j))*x_ref[0] + ((-0.297532668975-0.0943575325236j))*x_ref[1]**o + ((0.194300320775+0.975359286553j))*x_ref[1]
+        arg[(1, 0, 3, 0)]=(0.640485370728-0.623342365058j)*x[0]**o + ((-0.79850853443-0.377613110287j))*x[0] + ((0.00797229636937-0.871513826526j))*x[1]**o + ((0.277250430099+0.395487679439j))*x[1]
+        ref[(1, 0, 3, 0)]=(0.640485370728-0.623342365058j)*x_ref[0]**o + ((-0.79850853443-0.377613110287j))*x_ref[0] + ((0.00797229636937-0.871513826526j))*x_ref[1]**o + ((0.277250430099+0.395487679439j))*x_ref[1]
+        arg[(1, 0, 3, 1)]=(-0.397082966223-0.648811723834j)*x[0]**o + ((0.53007680902-0.275302064257j))*x[0] + ((-0.367777869718-0.222113031204j))*x[1]**o + ((0.0572942602841+0.53432061511j))*x[1]
+        ref[(1, 0, 3, 1)]=(-0.397082966223-0.648811723834j)*x_ref[0]**o + ((0.53007680902-0.275302064257j))*x_ref[0] + ((-0.367777869718-0.222113031204j))*x_ref[1]**o + ((0.0572942602841+0.53432061511j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.909118860899-0.979711129623j)*x[0]**o + ((0.200522902716-0.0655673924429j))*x[0] + ((0.824968205959+0.662711976576j))*x[1]**o + ((-0.398206297189-0.829525304485j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.909118860899-0.979711129623j)*x_ref[0]**o + ((0.200522902716-0.0655673924429j))*x_ref[0] + ((0.824968205959+0.662711976576j))*x_ref[1]**o + ((-0.398206297189-0.829525304485j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.885325659613-0.651953462745j)*x[0]**o + ((0.265927399313-0.93577778275j))*x[0] + ((-0.905704797755+0.441740987328j))*x[1]**o + ((0.727888315885+0.745621467335j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.885325659613-0.651953462745j)*x_ref[0]**o + ((0.265927399313-0.93577778275j))*x_ref[0] + ((-0.905704797755+0.441740987328j))*x_ref[1]**o + ((0.727888315885+0.745621467335j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(0.957648639221-0.954774251333j)*x[0]**o + ((0.00389871183209+0.646422899131j))*x[0] + ((0.969404409141+0.341312132761j))*x[1]**o + ((-0.214554265217-0.02889502955j))*x[1]
+        ref[(1, 1, 1, 0)]=(0.957648639221-0.954774251333j)*x_ref[0]**o + ((0.00389871183209+0.646422899131j))*x_ref[0] + ((0.969404409141+0.341312132761j))*x_ref[1]**o + ((-0.214554265217-0.02889502955j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.841424263345+0.535063732006j)*x[0]**o + ((-0.0273205337874+0.543725150739j))*x[0] + ((0.0296184927731-0.16488523394j))*x[1]**o + ((0.999635390209+0.577920999295j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.841424263345+0.535063732006j)*x_ref[0]**o + ((-0.0273205337874+0.543725150739j))*x_ref[0] + ((0.0296184927731-0.16488523394j))*x_ref[1]**o + ((0.999635390209+0.577920999295j))*x_ref[1]
+        arg[(1, 1, 2, 0)]=(0.220155390489-0.301169233949j)*x[0]**o + ((0.0510052053802+0.275578407147j))*x[0] + ((0.660149990702-0.115463071175j))*x[1]**o + ((0.344436026761+0.939490554477j))*x[1]
+        ref[(1, 1, 2, 0)]=(0.220155390489-0.301169233949j)*x_ref[0]**o + ((0.0510052053802+0.275578407147j))*x_ref[0] + ((0.660149990702-0.115463071175j))*x_ref[1]**o + ((0.344436026761+0.939490554477j))*x_ref[1]
+        arg[(1, 1, 2, 1)]=(-0.415780256628+0.575861714978j)*x[0]**o + ((-0.125166662147-0.929118430655j))*x[0] + ((0.336698565232-0.565236358625j))*x[1]**o + ((0.750823537257+0.0837794774956j))*x[1]
+        ref[(1, 1, 2, 1)]=(-0.415780256628+0.575861714978j)*x_ref[0]**o + ((-0.125166662147-0.929118430655j))*x_ref[0] + ((0.336698565232-0.565236358625j))*x_ref[1]**o + ((0.750823537257+0.0837794774956j))*x_ref[1]
+        arg[(1, 1, 3, 0)]=(0.136749626838-0.00733062323115j)*x[0]**o + ((-0.746997723451-0.465382717975j))*x[0] + ((0.598359722857+0.257539512474j))*x[1]**o + ((-0.970087569754-0.678660034222j))*x[1]
+        ref[(1, 1, 3, 0)]=(0.136749626838-0.00733062323115j)*x_ref[0]**o + ((-0.746997723451-0.465382717975j))*x_ref[0] + ((0.598359722857+0.257539512474j))*x_ref[1]**o + ((-0.970087569754-0.678660034222j))*x_ref[1]
+        arg[(1, 1, 3, 1)]=(-0.12534870164+0.00397098076179j)*x[0]**o + ((-0.356506163116+0.891385920047j))*x[0] + ((0.954939701002+0.856491959414j))*x[1]**o + ((0.132139777026+0.156317674397j))*x[1]
+        ref[(1, 1, 3, 1)]=(-0.12534870164+0.00397098076179j)*x_ref[0]**o + ((-0.356506163116+0.891385920047j))*x_ref[0] + ((0.954939701002+0.856491959414j))*x_ref[1]**o + ((0.132139777026+0.156317674397j))*x_ref[1]
+        arg[(1, 2, 0, 0)]=(0.686488865475+0.551768156153j)*x[0]**o + ((0.776857127446+0.0858821070827j))*x[0] + ((0.805285314863+0.89285140956j))*x[1]**o + ((-0.811228594613+0.467483444386j))*x[1]
+        ref[(1, 2, 0, 0)]=(0.686488865475+0.551768156153j)*x_ref[0]**o + ((0.776857127446+0.0858821070827j))*x_ref[0] + ((0.805285314863+0.89285140956j))*x_ref[1]**o + ((-0.811228594613+0.467483444386j))*x_ref[1]
+        arg[(1, 2, 0, 1)]=(0.695279238003+0.486142553018j)*x[0]**o + ((0.0940567832938-0.227713769813j))*x[0] + ((-0.706021917117+0.218092115735j))*x[1]**o + ((0.709259250654-0.113042866023j))*x[1]
+        ref[(1, 2, 0, 1)]=(0.695279238003+0.486142553018j)*x_ref[0]**o + ((0.0940567832938-0.227713769813j))*x_ref[0] + ((-0.706021917117+0.218092115735j))*x_ref[1]**o + ((0.709259250654-0.113042866023j))*x_ref[1]
+        arg[(1, 2, 1, 0)]=(0.570817994215+0.344920022331j)*x[0]**o + ((0.0522759905973-0.093064534599j))*x[0] + ((-0.639518127607-0.825976744786j))*x[1]**o + ((-0.678842930574+0.303607228383j))*x[1]
+        ref[(1, 2, 1, 0)]=(0.570817994215+0.344920022331j)*x_ref[0]**o + ((0.0522759905973-0.093064534599j))*x_ref[0] + ((-0.639518127607-0.825976744786j))*x_ref[1]**o + ((-0.678842930574+0.303607228383j))*x_ref[1]
+        arg[(1, 2, 1, 1)]=(0.579673355187+0.200526076558j)*x[0]**o + ((0.31459658862-0.321873181811j))*x[0] + ((0.202313170308-0.974060188683j))*x[1]**o + ((-0.572919776021-0.918627409241j))*x[1]
+        ref[(1, 2, 1, 1)]=(0.579673355187+0.200526076558j)*x_ref[0]**o + ((0.31459658862-0.321873181811j))*x_ref[0] + ((0.202313170308-0.974060188683j))*x_ref[1]**o + ((-0.572919776021-0.918627409241j))*x_ref[1]
+        arg[(1, 2, 2, 0)]=(0.690128015133+0.50727386373j)*x[0]**o + ((-0.133052590124-0.042897569296j))*x[0] + ((-0.178732835723-0.0600674030199j))*x[1]**o + ((0.559002285264-0.234465394479j))*x[1]
+        ref[(1, 2, 2, 0)]=(0.690128015133+0.50727386373j)*x_ref[0]**o + ((-0.133052590124-0.042897569296j))*x_ref[0] + ((-0.178732835723-0.0600674030199j))*x_ref[1]**o + ((0.559002285264-0.234465394479j))*x_ref[1]
+        arg[(1, 2, 2, 1)]=(-0.978402411272-0.72571038877j)*x[0]**o + ((-0.886613833268+0.610253547471j))*x[0] + ((0.162589092819+0.0390109584103j))*x[1]**o + ((-0.129143743826+0.38773240736j))*x[1]
+        ref[(1, 2, 2, 1)]=(-0.978402411272-0.72571038877j)*x_ref[0]**o + ((-0.886613833268+0.610253547471j))*x_ref[0] + ((0.162589092819+0.0390109584103j))*x_ref[1]**o + ((-0.129143743826+0.38773240736j))*x_ref[1]
+        arg[(1, 2, 3, 0)]=(-0.578458085477+0.175253604555j)*x[0]**o + ((-0.0988265616621-0.0582937181999j))*x[0] + ((0.250103721575-0.640032101111j))*x[1]**o + ((-0.277459409486+0.255609588442j))*x[1]
+        ref[(1, 2, 3, 0)]=(-0.578458085477+0.175253604555j)*x_ref[0]**o + ((-0.0988265616621-0.0582937181999j))*x_ref[0] + ((0.250103721575-0.640032101111j))*x_ref[1]**o + ((-0.277459409486+0.255609588442j))*x_ref[1]
+        arg[(1, 2, 3, 1)]=(0.226935776501+0.906504202442j)*x[0]**o + ((-0.472668503788-0.170378014994j))*x[0] + ((-0.273121067631+0.124355185781j))*x[1]**o + ((-0.937985875397-0.331659431297j))*x[1]
+        ref[(1, 2, 3, 1)]=(0.226935776501+0.906504202442j)*x_ref[0]**o + ((-0.472668503788-0.170378014994j))*x_ref[0] + ((-0.273121067631+0.124355185781j))*x_ref[1]**o + ((-0.937985875397-0.331659431297j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.679627877829+0.146226527727j)*x[2]**o + ((-0.620407622804-0.96078883843j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.679627877829+0.146226527727j)*x_ref[2]**o + ((-0.620407622804-0.96078883843j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(0.233956763104-0.198950392752j)*x[2]**o + ((0.885666292935-0.738193068083j))*x[2]
+            ref[(0, 0, 0, 1)]+=(0.233956763104-0.198950392752j)*x_ref[2]**o + ((0.885666292935-0.738193068083j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(-0.157068097907-0.163243872018j)*x[2]**o + ((0.156137912272-0.199679399416j))*x[2]
+            ref[(0, 0, 1, 0)]+=(-0.157068097907-0.163243872018j)*x_ref[2]**o + ((0.156137912272-0.199679399416j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.619799637921+0.0494621409503j)*x[2]**o + ((0.962246073314+0.499064722414j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.619799637921+0.0494621409503j)*x_ref[2]**o + ((0.962246073314+0.499064722414j))*x_ref[2]
+            arg[(0, 0, 2, 0)]+=(0.390705876039+0.0746487035512j)*x[2]**o + ((0.672534379627-0.786985787769j))*x[2]
+            ref[(0, 0, 2, 0)]+=(0.390705876039+0.0746487035512j)*x_ref[2]**o + ((0.672534379627-0.786985787769j))*x_ref[2]
+            arg[(0, 0, 2, 1)]+=(0.302709967574-0.682824487135j)*x[2]**o + ((0.0425658417914+0.123873568229j))*x[2]
+            ref[(0, 0, 2, 1)]+=(0.302709967574-0.682824487135j)*x_ref[2]**o + ((0.0425658417914+0.123873568229j))*x_ref[2]
+            arg[(0, 0, 3, 0)]+=(-0.710319482094-0.676720264415j)*x[2]**o + ((-0.322258937159+0.0870270393519j))*x[2]
+            ref[(0, 0, 3, 0)]+=(-0.710319482094-0.676720264415j)*x_ref[2]**o + ((-0.322258937159+0.0870270393519j))*x_ref[2]
+            arg[(0, 0, 3, 1)]+=(-0.378273679533+0.194955068163j)*x[2]**o + ((0.371983261887+0.0874194438621j))*x[2]
+            ref[(0, 0, 3, 1)]+=(-0.378273679533+0.194955068163j)*x_ref[2]**o + ((0.371983261887+0.0874194438621j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.401012185319-0.475304302763j)*x[2]**o + ((-0.150958489096+0.462881195607j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.401012185319-0.475304302763j)*x_ref[2]**o + ((-0.150958489096+0.462881195607j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(-0.481486669082+0.107847715482j)*x[2]**o + ((0.517614886389+0.426241218246j))*x[2]
+            ref[(0, 1, 0, 1)]+=(-0.481486669082+0.107847715482j)*x_ref[2]**o + ((0.517614886389+0.426241218246j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.314653543372-0.380785566576j)*x[2]**o + ((-0.481687920477-0.546038838626j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.314653543372-0.380785566576j)*x_ref[2]**o + ((-0.481687920477-0.546038838626j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.956891400343+0.0732250958184j)*x[2]**o + ((-0.292907866417-0.160963102708j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.956891400343+0.0732250958184j)*x_ref[2]**o + ((-0.292907866417-0.160963102708j))*x_ref[2]
+            arg[(0, 1, 2, 0)]+=(0.0878855521923+0.879660066289j)*x[2]**o + ((-0.373201439116+0.46918598116j))*x[2]
+            ref[(0, 1, 2, 0)]+=(0.0878855521923+0.879660066289j)*x_ref[2]**o + ((-0.373201439116+0.46918598116j))*x_ref[2]
+            arg[(0, 1, 2, 1)]+=(-0.897571720163-0.603712090143j)*x[2]**o + ((-0.437391664849+0.674391321254j))*x[2]
+            ref[(0, 1, 2, 1)]+=(-0.897571720163-0.603712090143j)*x_ref[2]**o + ((-0.437391664849+0.674391321254j))*x_ref[2]
+            arg[(0, 1, 3, 0)]+=(-0.403820597256+0.866244491084j)*x[2]**o + ((0.872322764887+0.750812295804j))*x[2]
+            ref[(0, 1, 3, 0)]+=(-0.403820597256+0.866244491084j)*x_ref[2]**o + ((0.872322764887+0.750812295804j))*x_ref[2]
+            arg[(0, 1, 3, 1)]+=(0.49001741767+0.966383644415j)*x[2]**o + ((0.222439602165-0.543588119511j))*x[2]
+            ref[(0, 1, 3, 1)]+=(0.49001741767+0.966383644415j)*x_ref[2]**o + ((0.222439602165-0.543588119511j))*x_ref[2]
+            arg[(0, 2, 0, 0)]+=(-0.618417186061+0.263591470229j)*x[2]**o + ((0.178432903104-0.0770755938938j))*x[2]
+            ref[(0, 2, 0, 0)]+=(-0.618417186061+0.263591470229j)*x_ref[2]**o + ((0.178432903104-0.0770755938938j))*x_ref[2]
+            arg[(0, 2, 0, 1)]+=(-0.360697454716+0.79540872569j)*x[2]**o + ((0.575017131414+0.757978940311j))*x[2]
+            ref[(0, 2, 0, 1)]+=(-0.360697454716+0.79540872569j)*x_ref[2]**o + ((0.575017131414+0.757978940311j))*x_ref[2]
+            arg[(0, 2, 1, 0)]+=(-0.530473366243+0.762515586651j)*x[2]**o + ((-0.189639433284+0.423077316257j))*x[2]
+            ref[(0, 2, 1, 0)]+=(-0.530473366243+0.762515586651j)*x_ref[2]**o + ((-0.189639433284+0.423077316257j))*x_ref[2]
+            arg[(0, 2, 1, 1)]+=(-0.361099173387-0.569206252862j)*x[2]**o + ((-0.0433643164947-0.656162284636j))*x[2]
+            ref[(0, 2, 1, 1)]+=(-0.361099173387-0.569206252862j)*x_ref[2]**o + ((-0.0433643164947-0.656162284636j))*x_ref[2]
+            arg[(0, 2, 2, 0)]+=(-0.252413938302+0.716954326083j)*x[2]**o + ((0.299936896958+0.0308466811583j))*x[2]
+            ref[(0, 2, 2, 0)]+=(-0.252413938302+0.716954326083j)*x_ref[2]**o + ((0.299936896958+0.0308466811583j))*x_ref[2]
+            arg[(0, 2, 2, 1)]+=(-0.147253117441+0.117826587156j)*x[2]**o + ((0.879868382861-0.598048126887j))*x[2]
+            ref[(0, 2, 2, 1)]+=(-0.147253117441+0.117826587156j)*x_ref[2]**o + ((0.879868382861-0.598048126887j))*x_ref[2]
+            arg[(0, 2, 3, 0)]+=(0.984884115959-0.430742968339j)*x[2]**o + ((-0.0102441678459+0.965412221016j))*x[2]
+            ref[(0, 2, 3, 0)]+=(0.984884115959-0.430742968339j)*x_ref[2]**o + ((-0.0102441678459+0.965412221016j))*x_ref[2]
+            arg[(0, 2, 3, 1)]+=(-0.555702936467+0.375696725765j)*x[2]**o + ((-0.263957568606-0.196145609971j))*x[2]
+            ref[(0, 2, 3, 1)]+=(-0.555702936467+0.375696725765j)*x_ref[2]**o + ((-0.263957568606-0.196145609971j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.88532365689-0.912779776963j)*x[2]**o + ((0.150765712165+0.541762067653j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.88532365689-0.912779776963j)*x_ref[2]**o + ((0.150765712165+0.541762067653j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.529667768036-0.874383484195j)*x[2]**o + ((0.0755439019301-0.776531891879j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.529667768036-0.874383484195j)*x_ref[2]**o + ((0.0755439019301-0.776531891879j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.884707310266-0.696388942768j)*x[2]**o + ((0.959838041171-0.143480891395j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.884707310266-0.696388942768j)*x_ref[2]**o + ((0.959838041171-0.143480891395j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.336319409358-0.543820785365j)*x[2]**o + ((0.781642229425+0.455801413533j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.336319409358-0.543820785365j)*x_ref[2]**o + ((0.781642229425+0.455801413533j))*x_ref[2]
+            arg[(1, 0, 2, 0)]+=(0.0837875412785-0.394026437898j)*x[2]**o + ((0.098704270914-0.225020673614j))*x[2]
+            ref[(1, 0, 2, 0)]+=(0.0837875412785-0.394026437898j)*x_ref[2]**o + ((0.098704270914-0.225020673614j))*x_ref[2]
+            arg[(1, 0, 2, 1)]+=(0.230076755737-0.228525656955j)*x[2]**o + ((-0.85644168768+0.332843424608j))*x[2]
+            ref[(1, 0, 2, 1)]+=(0.230076755737-0.228525656955j)*x_ref[2]**o + ((-0.85644168768+0.332843424608j))*x_ref[2]
+            arg[(1, 0, 3, 0)]+=(-0.0103799032655+0.401277311878j)*x[2]**o + ((0.524084162746+0.0017394959783j))*x[2]
+            ref[(1, 0, 3, 0)]+=(-0.0103799032655+0.401277311878j)*x_ref[2]**o + ((0.524084162746+0.0017394959783j))*x_ref[2]
+            arg[(1, 0, 3, 1)]+=(-0.866564854447+0.664521473062j)*x[2]**o + ((0.891065585763+0.526221479652j))*x[2]
+            ref[(1, 0, 3, 1)]+=(-0.866564854447+0.664521473062j)*x_ref[2]**o + ((0.891065585763+0.526221479652j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.333455048423+0.752787395377j)*x[2]**o + ((-0.0434199977225-0.445313589569j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.333455048423+0.752787395377j)*x_ref[2]**o + ((-0.0434199977225-0.445313589569j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(0.471799449197+0.858220917469j)*x[2]**o + ((0.839345799626+0.661637388509j))*x[2]
+            ref[(1, 1, 0, 1)]+=(0.471799449197+0.858220917469j)*x_ref[2]**o + ((0.839345799626+0.661637388509j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(-0.00626441384564-0.515292215604j)*x[2]**o + ((0.754834314769+0.158007879069j))*x[2]
+            ref[(1, 1, 1, 0)]+=(-0.00626441384564-0.515292215604j)*x_ref[2]**o + ((0.754834314769+0.158007879069j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(0.755208641513+0.101102283847j)*x[2]**o + ((-0.392857172392+0.169041220224j))*x[2]
+            ref[(1, 1, 1, 1)]+=(0.755208641513+0.101102283847j)*x_ref[2]**o + ((-0.392857172392+0.169041220224j))*x_ref[2]
+            arg[(1, 1, 2, 0)]+=(-0.600039335023-0.834409308388j)*x[2]**o + ((-0.81597696498-0.136972985127j))*x[2]
+            ref[(1, 1, 2, 0)]+=(-0.600039335023-0.834409308388j)*x_ref[2]**o + ((-0.81597696498-0.136972985127j))*x_ref[2]
+            arg[(1, 1, 2, 1)]+=(-0.915328375103-0.656242887529j)*x[2]**o + ((0.917503747793-0.328047013334j))*x[2]
+            ref[(1, 1, 2, 1)]+=(-0.915328375103-0.656242887529j)*x_ref[2]**o + ((0.917503747793-0.328047013334j))*x_ref[2]
+            arg[(1, 1, 3, 0)]+=(0.481449085461-0.753194907576j)*x[2]**o + ((0.659261855727-0.421551858466j))*x[2]
+            ref[(1, 1, 3, 0)]+=(0.481449085461-0.753194907576j)*x_ref[2]**o + ((0.659261855727-0.421551858466j))*x_ref[2]
+            arg[(1, 1, 3, 1)]+=(0.547586655213+0.0014880093705j)*x[2]**o + ((-0.740889598326-0.734004195336j))*x[2]
+            ref[(1, 1, 3, 1)]+=(0.547586655213+0.0014880093705j)*x_ref[2]**o + ((-0.740889598326-0.734004195336j))*x_ref[2]
+            arg[(1, 2, 0, 0)]+=(0.125975494554+0.426463808842j)*x[2]**o + ((0.932808490465-0.567410452332j))*x[2]
+            ref[(1, 2, 0, 0)]+=(0.125975494554+0.426463808842j)*x_ref[2]**o + ((0.932808490465-0.567410452332j))*x_ref[2]
+            arg[(1, 2, 0, 1)]+=(0.440990224509-0.0224737178458j)*x[2]**o + ((-0.589543750563-0.393036607492j))*x[2]
+            ref[(1, 2, 0, 1)]+=(0.440990224509-0.0224737178458j)*x_ref[2]**o + ((-0.589543750563-0.393036607492j))*x_ref[2]
+            arg[(1, 2, 1, 0)]+=(-0.133091516542-0.225898576517j)*x[2]**o + ((0.325526080004-0.291135276319j))*x[2]
+            ref[(1, 2, 1, 0)]+=(-0.133091516542-0.225898576517j)*x_ref[2]**o + ((0.325526080004-0.291135276319j))*x_ref[2]
+            arg[(1, 2, 1, 1)]+=(-0.0877014444776+0.445428421217j)*x[2]**o + ((0.610301405737+0.20267505342j))*x[2]
+            ref[(1, 2, 1, 1)]+=(-0.0877014444776+0.445428421217j)*x_ref[2]**o + ((0.610301405737+0.20267505342j))*x_ref[2]
+            arg[(1, 2, 2, 0)]+=(-0.819133807773-0.719533327772j)*x[2]**o + ((0.513966650155-0.0807994953097j))*x[2]
+            ref[(1, 2, 2, 0)]+=(-0.819133807773-0.719533327772j)*x_ref[2]**o + ((0.513966650155-0.0807994953097j))*x_ref[2]
+            arg[(1, 2, 2, 1)]+=(0.978944626847+0.639360498102j)*x[2]**o + ((0.0577854663927-0.0450338756869j))*x[2]
+            ref[(1, 2, 2, 1)]+=(0.978944626847+0.639360498102j)*x_ref[2]**o + ((0.0577854663927-0.0450338756869j))*x_ref[2]
+            arg[(1, 2, 3, 0)]+=(-0.591100589046-0.787565458293j)*x[2]**o + ((0.396452540416-0.322243291274j))*x[2]
+            ref[(1, 2, 3, 0)]+=(-0.591100589046-0.787565458293j)*x_ref[2]**o + ((0.396452540416-0.322243291274j))*x_ref[2]
+            arg[(1, 2, 3, 1)]+=(0.229837692622-0.0747482670748j)*x[2]**o + ((-0.473337904957+0.837579682215j))*x[2]
+            ref[(1, 2, 3, 1)]+=(0.229837692622-0.0747482670748j)*x_ref[2]**o + ((-0.473337904957+0.837579682215j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=(0.899308518251+0.582920821182j)*x[0]**o + ((0.850992454003-0.902655821262j))*x[0] + ((-0.180390104131+0.374924215941j))*x[1]**o + ((-0.177565086837-0.428900070244j))*x[1]
+        ref=(0.899308518251+0.582920821182j)*x_ref[0]**o + ((0.850992454003-0.902655821262j))*x_ref[0] + ((-0.180390104131+0.374924215941j))*x_ref[1]**o + ((-0.177565086837-0.428900070244j))*x_ref[1]
+        if dim==3:
+            arg+=((0.278410107508+0.0467298341204j))*x[2]**o + ((-0.870793278314-0.487449221584j))*x[2]
+            ref+=((0.278410107508+0.0467298341204j))*x_ref[2]**o + ((-0.870793278314-0.487449221584j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=(0.959004208186+0.564003267414j)*x[0]**o + ((0.767893923764+0.154847907214j))*x[0] + ((-0.290413265913+0.0858047309481j))*x[1]**o + ((-0.941608486231+0.23202281785j))*x[1]
+        ref[(0,)]=(0.959004208186+0.564003267414j)*x_ref[0]**o + ((0.767893923764+0.154847907214j))*x_ref[0] + ((-0.290413265913+0.0858047309481j))*x_ref[1]**o + ((-0.941608486231+0.23202281785j))*x_ref[1]
+        arg[(1,)]=(0.338617108022+0.322143184068j)*x[0]**o + ((-0.369044597936+0.162288312914j))*x[0] + ((-0.78015568022-0.252259088661j))*x[1]**o + ((0.74994500075+0.802380108387j))*x[1]
+        ref[(1,)]=(0.338617108022+0.322143184068j)*x_ref[0]**o + ((-0.369044597936+0.162288312914j))*x_ref[0] + ((-0.78015568022-0.252259088661j))*x_ref[1]**o + ((0.74994500075+0.802380108387j))*x_ref[1]
+        arg[(2,)]=(-0.974682597935-0.309785765814j)*x[0]**o + ((0.0682327447696-0.141199950741j))*x[0] + ((-0.598990385785-0.575436867461j))*x[1]**o + ((-0.0555852442824-0.0955655550098j))*x[1]
+        ref[(2,)]=(-0.974682597935-0.309785765814j)*x_ref[0]**o + ((0.0682327447696-0.141199950741j))*x_ref[0] + ((-0.598990385785-0.575436867461j))*x_ref[1]**o + ((-0.0555852442824-0.0955655550098j))*x_ref[1]
+        arg[(3,)]=(0.757899087811+0.378383292834j)*x[0]**o + ((0.0748034900703-0.239583906323j))*x[0] + ((-0.117849971654+0.146021195923j))*x[1]**o + ((-0.583396793602+0.060019559479j))*x[1]
+        ref[(3,)]=(0.757899087811+0.378383292834j)*x_ref[0]**o + ((0.0748034900703-0.239583906323j))*x_ref[0] + ((-0.117849971654+0.146021195923j))*x_ref[1]**o + ((-0.583396793602+0.060019559479j))*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=(-0.338908290581-0.30471424984j)*x[2]**o + ((0.00571969818573-0.0958963657579j))*x[2]
+            ref[(0,)]+=(-0.338908290581-0.30471424984j)*x_ref[2]**o + ((0.00571969818573-0.0958963657579j))*x_ref[2]
+            arg[(1,)]+=(-0.342131004371-0.48475181701j)*x[2]**o + ((0.512846709791+0.785081069951j))*x[2]
+            ref[(1,)]+=(-0.342131004371-0.48475181701j)*x_ref[2]**o + ((0.512846709791+0.785081069951j))*x_ref[2]
+            arg[(2,)]+=(-0.572240577468-0.872934001615j)*x[2]**o + ((0.598474372659-0.54229815319j))*x[2]
+            ref[(2,)]+=(-0.572240577468-0.872934001615j)*x_ref[2]**o + ((0.598474372659-0.54229815319j))*x_ref[2]
+            arg[(3,)]+=(-0.0990021891155-0.0609960828387j)*x[2]**o + ((-0.710307251288-0.191913348315j))*x[2]
+            ref[(3,)]+=(-0.0990021891155-0.0609960828387j)*x_ref[2]**o + ((-0.710307251288-0.191913348315j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4),w)
+        ref = Data(0,(2, 4),w_ref)
+        arg[(0, 0)]=(0.984281051562+0.254020869844j)*x[0]**o + ((0.51249879137-0.730214979928j))*x[0] + ((-0.666067027465-0.396233762429j))*x[1]**o + ((-0.983550471287-0.910513371398j))*x[1]
+        ref[(0, 0)]=(0.984281051562+0.254020869844j)*x_ref[0]**o + ((0.51249879137-0.730214979928j))*x_ref[0] + ((-0.666067027465-0.396233762429j))*x_ref[1]**o + ((-0.983550471287-0.910513371398j))*x_ref[1]
+        arg[(0, 1)]=(-0.685135872607-0.865817932736j)*x[0]**o + ((0.793593067943+0.985640896214j))*x[0] + ((0.808023136026+0.838519604928j))*x[1]**o + ((-0.521891198582-0.535736117974j))*x[1]
+        ref[(0, 1)]=(-0.685135872607-0.865817932736j)*x_ref[0]**o + ((0.793593067943+0.985640896214j))*x_ref[0] + ((0.808023136026+0.838519604928j))*x_ref[1]**o + ((-0.521891198582-0.535736117974j))*x_ref[1]
+        arg[(0, 2)]=(-0.603491622995+0.135923816721j)*x[0]**o + ((-0.591740664423+0.851549768089j))*x[0] + ((-0.279815144156+0.308766428557j))*x[1]**o + ((-0.958742495171+0.467989310983j))*x[1]
+        ref[(0, 2)]=(-0.603491622995+0.135923816721j)*x_ref[0]**o + ((-0.591740664423+0.851549768089j))*x_ref[0] + ((-0.279815144156+0.308766428557j))*x_ref[1]**o + ((-0.958742495171+0.467989310983j))*x_ref[1]
+        arg[(0, 3)]=(-0.818260834717+0.491721867524j)*x[0]**o + ((-0.393332698032+0.718124784948j))*x[0] + ((0.908901683183-0.0280351864383j))*x[1]**o + ((0.617426382479-0.498620291793j))*x[1]
+        ref[(0, 3)]=(-0.818260834717+0.491721867524j)*x_ref[0]**o + ((-0.393332698032+0.718124784948j))*x_ref[0] + ((0.908901683183-0.0280351864383j))*x_ref[1]**o + ((0.617426382479-0.498620291793j))*x_ref[1]
+        arg[(1, 0)]=(0.101141129579-0.0554526941607j)*x[0]**o + ((0.90044231699+0.614660271706j))*x[0] + ((-0.883179243928-0.985932142523j))*x[1]**o + ((-0.663689064403-0.406122026595j))*x[1]
+        ref[(1, 0)]=(0.101141129579-0.0554526941607j)*x_ref[0]**o + ((0.90044231699+0.614660271706j))*x_ref[0] + ((-0.883179243928-0.985932142523j))*x_ref[1]**o + ((-0.663689064403-0.406122026595j))*x_ref[1]
+        arg[(1, 1)]=(0.291812775802-0.266325923486j)*x[0]**o + ((0.754144752636+0.374310811396j))*x[0] + ((0.921277868692+0.680360460617j))*x[1]**o + ((0.106400319006-0.778306552575j))*x[1]
+        ref[(1, 1)]=(0.291812775802-0.266325923486j)*x_ref[0]**o + ((0.754144752636+0.374310811396j))*x_ref[0] + ((0.921277868692+0.680360460617j))*x_ref[1]**o + ((0.106400319006-0.778306552575j))*x_ref[1]
+        arg[(1, 2)]=(-0.498818162014-0.529946769022j)*x[0]**o + ((-0.857564717305-0.96481597991j))*x[0] + ((0.405712102084-0.593539020356j))*x[1]**o + ((-0.284813557071+0.890844747667j))*x[1]
+        ref[(1, 2)]=(-0.498818162014-0.529946769022j)*x_ref[0]**o + ((-0.857564717305-0.96481597991j))*x_ref[0] + ((0.405712102084-0.593539020356j))*x_ref[1]**o + ((-0.284813557071+0.890844747667j))*x_ref[1]
+        arg[(1, 3)]=(-0.0107756453855-0.838722243493j)*x[0]**o + ((-0.535904793703+0.0209265701313j))*x[0] + ((-0.550148551103+0.610492852066j))*x[1]**o + ((-0.643895249352+0.0393883816739j))*x[1]
+        ref[(1, 3)]=(-0.0107756453855-0.838722243493j)*x_ref[0]**o + ((-0.535904793703+0.0209265701313j))*x_ref[0] + ((-0.550148551103+0.610492852066j))*x_ref[1]**o + ((-0.643895249352+0.0393883816739j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=(0.154313216768+0.0489200318997j)*x[2]**o + ((0.848810717748-0.469075853929j))*x[2]
+            ref[(0, 0)]+=(0.154313216768+0.0489200318997j)*x_ref[2]**o + ((0.848810717748-0.469075853929j))*x_ref[2]
+            arg[(0, 1)]+=(-0.874009463251+0.676374276617j)*x[2]**o + ((0.31774648955+0.612555351953j))*x[2]
+            ref[(0, 1)]+=(-0.874009463251+0.676374276617j)*x_ref[2]**o + ((0.31774648955+0.612555351953j))*x_ref[2]
+            arg[(0, 2)]+=(0.776142134196+0.46893561999j)*x[2]**o + ((0.871092817678+0.294396036175j))*x[2]
+            ref[(0, 2)]+=(0.776142134196+0.46893561999j)*x_ref[2]**o + ((0.871092817678+0.294396036175j))*x_ref[2]
+            arg[(0, 3)]+=(0.730045753508-0.0801312908784j)*x[2]**o + ((-0.135827031322-0.874386623106j))*x[2]
+            ref[(0, 3)]+=(0.730045753508-0.0801312908784j)*x_ref[2]**o + ((-0.135827031322-0.874386623106j))*x_ref[2]
+            arg[(1, 0)]+=(-0.773631635815+0.751914973005j)*x[2]**o + ((0.115476877627+0.852500675095j))*x[2]
+            ref[(1, 0)]+=(-0.773631635815+0.751914973005j)*x_ref[2]**o + ((0.115476877627+0.852500675095j))*x_ref[2]
+            arg[(1, 1)]+=(0.197542348078-0.74104842262j)*x[2]**o + ((-0.412660705065+0.564248299302j))*x[2]
+            ref[(1, 1)]+=(0.197542348078-0.74104842262j)*x_ref[2]**o + ((-0.412660705065+0.564248299302j))*x_ref[2]
+            arg[(1, 2)]+=(-0.550889685302+0.809247688731j)*x[2]**o + ((0.142045946793-0.617890051549j))*x[2]
+            ref[(1, 2)]+=(-0.550889685302+0.809247688731j)*x_ref[2]**o + ((0.142045946793-0.617890051549j))*x_ref[2]
+            arg[(1, 3)]+=(0.553538405803+0.0858354591378j)*x[2]**o + ((0.903678349086+0.456749248809j))*x[2]
+            ref[(1, 3)]+=(0.553538405803+0.0858354591378j)*x_ref[2]**o + ((0.903678349086+0.456749248809j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=(-0.0697702691476+0.845282879354j)*x[0]**o + ((0.329871939257-0.879382942814j))*x[0] + ((0.596011963021+0.11204729995j))*x[1]**o + ((0.336637875249-0.191332502485j))*x[1]
+        ref[(0, 0, 0)]=(-0.0697702691476+0.845282879354j)*x_ref[0]**o + ((0.329871939257-0.879382942814j))*x_ref[0] + ((0.596011963021+0.11204729995j))*x_ref[1]**o + ((0.336637875249-0.191332502485j))*x_ref[1]
+        arg[(0, 0, 1)]=(-0.428089703941+0.965871607062j)*x[0]**o + ((0.564658465543-0.0865378698241j))*x[0] + ((-0.790778331262-0.762679472756j))*x[1]**o + ((-0.535406421247-0.105025909837j))*x[1]
+        ref[(0, 0, 1)]=(-0.428089703941+0.965871607062j)*x_ref[0]**o + ((0.564658465543-0.0865378698241j))*x_ref[0] + ((-0.790778331262-0.762679472756j))*x_ref[1]**o + ((-0.535406421247-0.105025909837j))*x_ref[1]
+        arg[(0, 0, 2)]=(0.377791057995+0.552457737j)*x[0]**o + ((0.984829093251-0.580974456596j))*x[0] + ((0.091793091947-0.378980131466j))*x[1]**o + ((-0.644415469425-0.823517734247j))*x[1]
+        ref[(0, 0, 2)]=(0.377791057995+0.552457737j)*x_ref[0]**o + ((0.984829093251-0.580974456596j))*x_ref[0] + ((0.091793091947-0.378980131466j))*x_ref[1]**o + ((-0.644415469425-0.823517734247j))*x_ref[1]
+        arg[(0, 0, 3)]=(0.917283532407-0.0399901056562j)*x[0]**o + ((0.309824600747+0.548008895016j))*x[0] + ((-0.0158234733133-0.673076402817j))*x[1]**o + ((-0.774472269664-0.766805639141j))*x[1]
+        ref[(0, 0, 3)]=(0.917283532407-0.0399901056562j)*x_ref[0]**o + ((0.309824600747+0.548008895016j))*x_ref[0] + ((-0.0158234733133-0.673076402817j))*x_ref[1]**o + ((-0.774472269664-0.766805639141j))*x_ref[1]
+        arg[(0, 1, 0)]=(-0.192460928892+0.600925589986j)*x[0]**o + ((-0.981753803208+0.962779792792j))*x[0] + ((-0.771774580291+0.918852806363j))*x[1]**o + ((0.290837173359+0.819346900269j))*x[1]
+        ref[(0, 1, 0)]=(-0.192460928892+0.600925589986j)*x_ref[0]**o + ((-0.981753803208+0.962779792792j))*x_ref[0] + ((-0.771774580291+0.918852806363j))*x_ref[1]**o + ((0.290837173359+0.819346900269j))*x_ref[1]
+        arg[(0, 1, 1)]=(0.0247000725869-0.748488906579j)*x[0]**o + ((-0.298634670499-0.182219230963j))*x[0] + ((-0.355045769385+0.0856518361113j))*x[1]**o + ((0.697116913101-0.0342520242153j))*x[1]
+        ref[(0, 1, 1)]=(0.0247000725869-0.748488906579j)*x_ref[0]**o + ((-0.298634670499-0.182219230963j))*x_ref[0] + ((-0.355045769385+0.0856518361113j))*x_ref[1]**o + ((0.697116913101-0.0342520242153j))*x_ref[1]
+        arg[(0, 1, 2)]=(0.105774048596-0.512593631322j)*x[0]**o + ((-0.130346333757+0.246137540574j))*x[0] + ((0.0823166869953-0.659001388723j))*x[1]**o + ((0.258463866497-0.254030890036j))*x[1]
+        ref[(0, 1, 2)]=(0.105774048596-0.512593631322j)*x_ref[0]**o + ((-0.130346333757+0.246137540574j))*x_ref[0] + ((0.0823166869953-0.659001388723j))*x_ref[1]**o + ((0.258463866497-0.254030890036j))*x_ref[1]
+        arg[(0, 1, 3)]=(0.599629545253-0.446290654567j)*x[0]**o + ((-0.106951985973-0.823151246382j))*x[0] + ((-0.673785683749-0.724774226952j))*x[1]**o + ((0.487051237642+0.778414462593j))*x[1]
+        ref[(0, 1, 3)]=(0.599629545253-0.446290654567j)*x_ref[0]**o + ((-0.106951985973-0.823151246382j))*x_ref[0] + ((-0.673785683749-0.724774226952j))*x_ref[1]**o + ((0.487051237642+0.778414462593j))*x_ref[1]
+        arg[(0, 2, 0)]=(0.926364499391+0.586843013219j)*x[0]**o + ((0.495122059821-0.0195972329097j))*x[0] + ((-0.805390768892-0.0360821554388j))*x[1]**o + ((-0.68961365355-0.665891770191j))*x[1]
+        ref[(0, 2, 0)]=(0.926364499391+0.586843013219j)*x_ref[0]**o + ((0.495122059821-0.0195972329097j))*x_ref[0] + ((-0.805390768892-0.0360821554388j))*x_ref[1]**o + ((-0.68961365355-0.665891770191j))*x_ref[1]
+        arg[(0, 2, 1)]=(0.923456261476-0.822517436278j)*x[0]**o + ((0.777667680284+0.877474094915j))*x[0] + ((-0.98160323874-0.738952647906j))*x[1]**o + ((-0.0470011262743-0.928135662263j))*x[1]
+        ref[(0, 2, 1)]=(0.923456261476-0.822517436278j)*x_ref[0]**o + ((0.777667680284+0.877474094915j))*x_ref[0] + ((-0.98160323874-0.738952647906j))*x_ref[1]**o + ((-0.0470011262743-0.928135662263j))*x_ref[1]
+        arg[(0, 2, 2)]=(0.565728038998-0.115098487418j)*x[0]**o + ((0.617423141838-0.997549955877j))*x[0] + ((0.103616807072+0.126899082508j))*x[1]**o + ((-0.303753520134+0.212823027351j))*x[1]
+        ref[(0, 2, 2)]=(0.565728038998-0.115098487418j)*x_ref[0]**o + ((0.617423141838-0.997549955877j))*x_ref[0] + ((0.103616807072+0.126899082508j))*x_ref[1]**o + ((-0.303753520134+0.212823027351j))*x_ref[1]
+        arg[(0, 2, 3)]=(-0.753394822216-0.473900794497j)*x[0]**o + ((-0.747287417854+0.894057291469j))*x[0] + ((-0.550132867206+0.952921616819j))*x[1]**o + ((0.705547196623+0.905464323567j))*x[1]
+        ref[(0, 2, 3)]=(-0.753394822216-0.473900794497j)*x_ref[0]**o + ((-0.747287417854+0.894057291469j))*x_ref[0] + ((-0.550132867206+0.952921616819j))*x_ref[1]**o + ((0.705547196623+0.905464323567j))*x_ref[1]
+        arg[(1, 0, 0)]=(0.878883423787+0.1517051168j)*x[0]**o + ((-0.233154437371-0.115214606639j))*x[0] + ((-0.528030313647-0.788371366278j))*x[1]**o + ((0.297369946487-0.855455868721j))*x[1]
+        ref[(1, 0, 0)]=(0.878883423787+0.1517051168j)*x_ref[0]**o + ((-0.233154437371-0.115214606639j))*x_ref[0] + ((-0.528030313647-0.788371366278j))*x_ref[1]**o + ((0.297369946487-0.855455868721j))*x_ref[1]
+        arg[(1, 0, 1)]=(-0.911605985454-0.757243928741j)*x[0]**o + ((0.0397727867663-0.892001632878j))*x[0] + ((0.70412025727+0.255799557347j))*x[1]**o + ((-0.172279653311+0.0960309212263j))*x[1]
+        ref[(1, 0, 1)]=(-0.911605985454-0.757243928741j)*x_ref[0]**o + ((0.0397727867663-0.892001632878j))*x_ref[0] + ((0.70412025727+0.255799557347j))*x_ref[1]**o + ((-0.172279653311+0.0960309212263j))*x_ref[1]
+        arg[(1, 0, 2)]=(-0.521841220742+0.763329606725j)*x[0]**o + ((0.0365277160083+0.239067443018j))*x[0] + ((-0.526370445955-0.907181546634j))*x[1]**o + ((0.0622751927156+0.685523268125j))*x[1]
+        ref[(1, 0, 2)]=(-0.521841220742+0.763329606725j)*x_ref[0]**o + ((0.0365277160083+0.239067443018j))*x_ref[0] + ((-0.526370445955-0.907181546634j))*x_ref[1]**o + ((0.0622751927156+0.685523268125j))*x_ref[1]
+        arg[(1, 0, 3)]=(-0.909524505415-0.0344955677839j)*x[0]**o + ((0.439334384381+0.507997363225j))*x[0] + ((0.818203700879+0.209809049233j))*x[1]**o + ((-0.821154267211-0.150925519547j))*x[1]
+        ref[(1, 0, 3)]=(-0.909524505415-0.0344955677839j)*x_ref[0]**o + ((0.439334384381+0.507997363225j))*x_ref[0] + ((0.818203700879+0.209809049233j))*x_ref[1]**o + ((-0.821154267211-0.150925519547j))*x_ref[1]
+        arg[(1, 1, 0)]=(0.502990026242+0.259913923968j)*x[0]**o + ((-0.414004948149-0.395126407943j))*x[0] + ((0.597815356667-0.947319757813j))*x[1]**o + ((-0.76122419339-0.613810039174j))*x[1]
+        ref[(1, 1, 0)]=(0.502990026242+0.259913923968j)*x_ref[0]**o + ((-0.414004948149-0.395126407943j))*x_ref[0] + ((0.597815356667-0.947319757813j))*x_ref[1]**o + ((-0.76122419339-0.613810039174j))*x_ref[1]
+        arg[(1, 1, 1)]=(0.630446839888-0.0855773713008j)*x[0]**o + ((0.711816729445+0.0311273789222j))*x[0] + ((-0.496657990672-0.0842152815739j))*x[1]**o + ((0.72929895276-0.445479275549j))*x[1]
+        ref[(1, 1, 1)]=(0.630446839888-0.0855773713008j)*x_ref[0]**o + ((0.711816729445+0.0311273789222j))*x_ref[0] + ((-0.496657990672-0.0842152815739j))*x_ref[1]**o + ((0.72929895276-0.445479275549j))*x_ref[1]
+        arg[(1, 1, 2)]=(0.90132676721-0.956391021529j)*x[0]**o + ((-0.565019054115-0.579999072111j))*x[0] + ((-0.812491748302+0.229075031682j))*x[1]**o + ((0.69739211432-0.307791062144j))*x[1]
+        ref[(1, 1, 2)]=(0.90132676721-0.956391021529j)*x_ref[0]**o + ((-0.565019054115-0.579999072111j))*x_ref[0] + ((-0.812491748302+0.229075031682j))*x_ref[1]**o + ((0.69739211432-0.307791062144j))*x_ref[1]
+        arg[(1, 1, 3)]=(-0.22223995718-0.156436111678j)*x[0]**o + ((-0.212815569638-0.508372533377j))*x[0] + ((-0.0329396835558-0.0954939150049j))*x[1]**o + ((-0.276282459817-0.433952042252j))*x[1]
+        ref[(1, 1, 3)]=(-0.22223995718-0.156436111678j)*x_ref[0]**o + ((-0.212815569638-0.508372533377j))*x_ref[0] + ((-0.0329396835558-0.0954939150049j))*x_ref[1]**o + ((-0.276282459817-0.433952042252j))*x_ref[1]
+        arg[(1, 2, 0)]=(-0.109042514719-0.181751073517j)*x[0]**o + ((0.461996861386-0.893568301524j))*x[0] + ((-0.741297977845+0.582187678158j))*x[1]**o + ((0.569486261601-0.0798914644712j))*x[1]
+        ref[(1, 2, 0)]=(-0.109042514719-0.181751073517j)*x_ref[0]**o + ((0.461996861386-0.893568301524j))*x_ref[0] + ((-0.741297977845+0.582187678158j))*x_ref[1]**o + ((0.569486261601-0.0798914644712j))*x_ref[1]
+        arg[(1, 2, 1)]=(-0.608539965972-0.705337836846j)*x[0]**o + ((0.659013506182+0.941952528725j))*x[0] + ((0.830067514252-0.638483336946j))*x[1]**o + ((0.485009537974-0.560542496121j))*x[1]
+        ref[(1, 2, 1)]=(-0.608539965972-0.705337836846j)*x_ref[0]**o + ((0.659013506182+0.941952528725j))*x_ref[0] + ((0.830067514252-0.638483336946j))*x_ref[1]**o + ((0.485009537974-0.560542496121j))*x_ref[1]
+        arg[(1, 2, 2)]=(0.300386338817-0.651944077039j)*x[0]**o + ((-0.71563303724-0.374116495918j))*x[0] + ((0.0252465370672-0.56065947934j))*x[1]**o + ((0.630437728551+0.977783364264j))*x[1]
+        ref[(1, 2, 2)]=(0.300386338817-0.651944077039j)*x_ref[0]**o + ((-0.71563303724-0.374116495918j))*x_ref[0] + ((0.0252465370672-0.56065947934j))*x_ref[1]**o + ((0.630437728551+0.977783364264j))*x_ref[1]
+        arg[(1, 2, 3)]=(-0.818128803318+0.0454930997985j)*x[0]**o + ((0.448062088522-0.821483450586j))*x[0] + ((0.367707451909+0.113509396703j))*x[1]**o + ((0.0434836372419+0.3174636448j))*x[1]
+        ref[(1, 2, 3)]=(-0.818128803318+0.0454930997985j)*x_ref[0]**o + ((0.448062088522-0.821483450586j))*x_ref[0] + ((0.367707451909+0.113509396703j))*x_ref[1]**o + ((0.0434836372419+0.3174636448j))*x_ref[1]
+        arg[(2, 0, 0)]=(-0.893556477085+0.231029382226j)*x[0]**o + ((-0.242090201649+0.672659240565j))*x[0] + ((0.70902908381+0.846422672576j))*x[1]**o + ((-0.598768562123+0.510572803054j))*x[1]
+        ref[(2, 0, 0)]=(-0.893556477085+0.231029382226j)*x_ref[0]**o + ((-0.242090201649+0.672659240565j))*x_ref[0] + ((0.70902908381+0.846422672576j))*x_ref[1]**o + ((-0.598768562123+0.510572803054j))*x_ref[1]
+        arg[(2, 0, 1)]=(-0.910179665598-0.507958911181j)*x[0]**o + ((-0.124300834759+0.00109037622411j))*x[0] + ((-0.630292389049-0.610534872756j))*x[1]**o + ((0.247986443037+0.140676055583j))*x[1]
+        ref[(2, 0, 1)]=(-0.910179665598-0.507958911181j)*x_ref[0]**o + ((-0.124300834759+0.00109037622411j))*x_ref[0] + ((-0.630292389049-0.610534872756j))*x_ref[1]**o + ((0.247986443037+0.140676055583j))*x_ref[1]
+        arg[(2, 0, 2)]=(-0.939196532681-0.237984419655j)*x[0]**o + ((-0.446778854736+0.918282208096j))*x[0] + ((-0.664302071123+0.0809736553736j))*x[1]**o + ((-0.962475576719+0.388169446137j))*x[1]
+        ref[(2, 0, 2)]=(-0.939196532681-0.237984419655j)*x_ref[0]**o + ((-0.446778854736+0.918282208096j))*x_ref[0] + ((-0.664302071123+0.0809736553736j))*x_ref[1]**o + ((-0.962475576719+0.388169446137j))*x_ref[1]
+        arg[(2, 0, 3)]=(-0.392221854542-0.800796068047j)*x[0]**o + ((-0.359904197547-0.375436487108j))*x[0] + ((0.56164339019+0.828842213501j))*x[1]**o + ((0.0346795552466-0.852316750748j))*x[1]
+        ref[(2, 0, 3)]=(-0.392221854542-0.800796068047j)*x_ref[0]**o + ((-0.359904197547-0.375436487108j))*x_ref[0] + ((0.56164339019+0.828842213501j))*x_ref[1]**o + ((0.0346795552466-0.852316750748j))*x_ref[1]
+        arg[(2, 1, 0)]=(0.275619337049+0.538694176983j)*x[0]**o + ((0.228816270277+0.806008461585j))*x[0] + ((0.0736802070728-0.411506730165j))*x[1]**o + ((-0.740086719066-0.162450407667j))*x[1]
+        ref[(2, 1, 0)]=(0.275619337049+0.538694176983j)*x_ref[0]**o + ((0.228816270277+0.806008461585j))*x_ref[0] + ((0.0736802070728-0.411506730165j))*x_ref[1]**o + ((-0.740086719066-0.162450407667j))*x_ref[1]
+        arg[(2, 1, 1)]=(-0.170287912091+0.827848725527j)*x[0]**o + ((0.483222424912-0.406763691673j))*x[0] + ((0.842094034345-0.986717085153j))*x[1]**o + ((0.261921816031+0.250332967759j))*x[1]
+        ref[(2, 1, 1)]=(-0.170287912091+0.827848725527j)*x_ref[0]**o + ((0.483222424912-0.406763691673j))*x_ref[0] + ((0.842094034345-0.986717085153j))*x_ref[1]**o + ((0.261921816031+0.250332967759j))*x_ref[1]
+        arg[(2, 1, 2)]=(0.685643647643-0.695525603797j)*x[0]**o + ((0.360818224419-0.297584278772j))*x[0] + ((-0.798168326334+0.276344520641j))*x[1]**o + ((0.971684209825-0.765096946972j))*x[1]
+        ref[(2, 1, 2)]=(0.685643647643-0.695525603797j)*x_ref[0]**o + ((0.360818224419-0.297584278772j))*x_ref[0] + ((-0.798168326334+0.276344520641j))*x_ref[1]**o + ((0.971684209825-0.765096946972j))*x_ref[1]
+        arg[(2, 1, 3)]=(-0.164126873023-0.619509311086j)*x[0]**o + ((0.00582177356547+0.716136587782j))*x[0] + ((0.6466815844-0.274949536944j))*x[1]**o + ((-0.0460445590308-0.79183738154j))*x[1]
+        ref[(2, 1, 3)]=(-0.164126873023-0.619509311086j)*x_ref[0]**o + ((0.00582177356547+0.716136587782j))*x_ref[0] + ((0.6466815844-0.274949536944j))*x_ref[1]**o + ((-0.0460445590308-0.79183738154j))*x_ref[1]
+        arg[(2, 2, 0)]=(0.503666844986+0.160107518701j)*x[0]**o + ((0.165768831261+0.675363257112j))*x[0] + ((-0.168328320373+0.496401933801j))*x[1]**o + ((0.319400350381+0.592474416353j))*x[1]
+        ref[(2, 2, 0)]=(0.503666844986+0.160107518701j)*x_ref[0]**o + ((0.165768831261+0.675363257112j))*x_ref[0] + ((-0.168328320373+0.496401933801j))*x_ref[1]**o + ((0.319400350381+0.592474416353j))*x_ref[1]
+        arg[(2, 2, 1)]=(0.973205162848-0.69367049602j)*x[0]**o + ((0.436299763571-0.960666528149j))*x[0] + ((0.23449569953+0.0247305350509j))*x[1]**o + ((0.850595193039+0.625850719722j))*x[1]
+        ref[(2, 2, 1)]=(0.973205162848-0.69367049602j)*x_ref[0]**o + ((0.436299763571-0.960666528149j))*x_ref[0] + ((0.23449569953+0.0247305350509j))*x_ref[1]**o + ((0.850595193039+0.625850719722j))*x_ref[1]
+        arg[(2, 2, 2)]=(0.790255863399-0.352177865449j)*x[0]**o + ((0.414960091633+0.511037996023j))*x[0] + ((0.622842965659+0.658735448984j))*x[1]**o + ((-0.917125385868+0.966227213292j))*x[1]
+        ref[(2, 2, 2)]=(0.790255863399-0.352177865449j)*x_ref[0]**o + ((0.414960091633+0.511037996023j))*x_ref[0] + ((0.622842965659+0.658735448984j))*x_ref[1]**o + ((-0.917125385868+0.966227213292j))*x_ref[1]
+        arg[(2, 2, 3)]=(-0.570125516795+0.462487450383j)*x[0]**o + ((-0.156675200097-0.495904762286j))*x[0] + ((0.845261502645-0.773275900552j))*x[1]**o + ((0.936737073831+0.521017596535j))*x[1]
+        ref[(2, 2, 3)]=(-0.570125516795+0.462487450383j)*x_ref[0]**o + ((-0.156675200097-0.495904762286j))*x_ref[0] + ((0.845261502645-0.773275900552j))*x_ref[1]**o + ((0.936737073831+0.521017596535j))*x_ref[1]
+        arg[(3, 0, 0)]=(-0.898961724945+0.150228573005j)*x[0]**o + ((0.134385350025-0.473883863336j))*x[0] + ((0.725255835037+0.995861672427j))*x[1]**o + ((0.575629696403-0.856828332822j))*x[1]
+        ref[(3, 0, 0)]=(-0.898961724945+0.150228573005j)*x_ref[0]**o + ((0.134385350025-0.473883863336j))*x_ref[0] + ((0.725255835037+0.995861672427j))*x_ref[1]**o + ((0.575629696403-0.856828332822j))*x_ref[1]
+        arg[(3, 0, 1)]=(-0.478841240599-0.661718376876j)*x[0]**o + ((-0.420476217128-0.835551324787j))*x[0] + ((-0.0337193791352+0.690406583515j))*x[1]**o + ((0.00846458810935-0.983189280906j))*x[1]
+        ref[(3, 0, 1)]=(-0.478841240599-0.661718376876j)*x_ref[0]**o + ((-0.420476217128-0.835551324787j))*x_ref[0] + ((-0.0337193791352+0.690406583515j))*x_ref[1]**o + ((0.00846458810935-0.983189280906j))*x_ref[1]
+        arg[(3, 0, 2)]=(0.550626640999+0.612079560258j)*x[0]**o + ((0.818255527425-0.729807720817j))*x[0] + ((-0.156954173721+0.553410727606j))*x[1]**o + ((0.356924129329-0.154933809349j))*x[1]
+        ref[(3, 0, 2)]=(0.550626640999+0.612079560258j)*x_ref[0]**o + ((0.818255527425-0.729807720817j))*x_ref[0] + ((-0.156954173721+0.553410727606j))*x_ref[1]**o + ((0.356924129329-0.154933809349j))*x_ref[1]
+        arg[(3, 0, 3)]=(0.640065569658+0.564733680748j)*x[0]**o + ((0.707986740943+0.397487383036j))*x[0] + ((-0.871648378117+0.173713457891j))*x[1]**o + ((0.194285596765+0.340774145451j))*x[1]
+        ref[(3, 0, 3)]=(0.640065569658+0.564733680748j)*x_ref[0]**o + ((0.707986740943+0.397487383036j))*x_ref[0] + ((-0.871648378117+0.173713457891j))*x_ref[1]**o + ((0.194285596765+0.340774145451j))*x_ref[1]
+        arg[(3, 1, 0)]=(0.844147387475+0.281145909811j)*x[0]**o + ((-0.178684356695+0.0380839549352j))*x[0] + ((0.889862280502-0.425145250219j))*x[1]**o + ((-0.216202087401-0.686613403482j))*x[1]
+        ref[(3, 1, 0)]=(0.844147387475+0.281145909811j)*x_ref[0]**o + ((-0.178684356695+0.0380839549352j))*x_ref[0] + ((0.889862280502-0.425145250219j))*x_ref[1]**o + ((-0.216202087401-0.686613403482j))*x_ref[1]
+        arg[(3, 1, 1)]=(0.135633306548-0.102053177426j)*x[0]**o + ((0.119548261577-0.625144364797j))*x[0] + ((-0.781925864889-0.336667691003j))*x[1]**o + ((-0.862573129986+0.621566333597j))*x[1]
+        ref[(3, 1, 1)]=(0.135633306548-0.102053177426j)*x_ref[0]**o + ((0.119548261577-0.625144364797j))*x_ref[0] + ((-0.781925864889-0.336667691003j))*x_ref[1]**o + ((-0.862573129986+0.621566333597j))*x_ref[1]
+        arg[(3, 1, 2)]=(0.376192528734+0.180960349198j)*x[0]**o + ((0.372659110897+0.0722548239856j))*x[0] + ((-0.473228478673-0.0909412872305j))*x[1]**o + ((0.67149673149-0.337178371018j))*x[1]
+        ref[(3, 1, 2)]=(0.376192528734+0.180960349198j)*x_ref[0]**o + ((0.372659110897+0.0722548239856j))*x_ref[0] + ((-0.473228478673-0.0909412872305j))*x_ref[1]**o + ((0.67149673149-0.337178371018j))*x_ref[1]
+        arg[(3, 1, 3)]=(-0.309702509937-0.42358480479j)*x[0]**o + ((0.210858242243-0.872287008424j))*x[0] + ((-0.564840354674-0.0915128657188j))*x[1]**o + ((0.612833045709-0.256408602248j))*x[1]
+        ref[(3, 1, 3)]=(-0.309702509937-0.42358480479j)*x_ref[0]**o + ((0.210858242243-0.872287008424j))*x_ref[0] + ((-0.564840354674-0.0915128657188j))*x_ref[1]**o + ((0.612833045709-0.256408602248j))*x_ref[1]
+        arg[(3, 2, 0)]=(-0.408459083088+0.732901172207j)*x[0]**o + ((-0.636708924786+0.818788789235j))*x[0] + ((-0.729715581015+0.900770467892j))*x[1]**o + ((-0.218118553177+0.210492115317j))*x[1]
+        ref[(3, 2, 0)]=(-0.408459083088+0.732901172207j)*x_ref[0]**o + ((-0.636708924786+0.818788789235j))*x_ref[0] + ((-0.729715581015+0.900770467892j))*x_ref[1]**o + ((-0.218118553177+0.210492115317j))*x_ref[1]
+        arg[(3, 2, 1)]=(-0.291120340467-0.0212374975103j)*x[0]**o + ((-0.303623642985-0.805392331934j))*x[0] + ((-0.60563243484+0.270256283509j))*x[1]**o + ((0.685157005246-0.261755521635j))*x[1]
+        ref[(3, 2, 1)]=(-0.291120340467-0.0212374975103j)*x_ref[0]**o + ((-0.303623642985-0.805392331934j))*x_ref[0] + ((-0.60563243484+0.270256283509j))*x_ref[1]**o + ((0.685157005246-0.261755521635j))*x_ref[1]
+        arg[(3, 2, 2)]=(0.700538908448+0.435573587778j)*x[0]**o + ((0.0524206971052-0.0047738847476j))*x[0] + ((-0.378804080588-0.79176675783j))*x[1]**o + ((-0.83423656794-0.581836164046j))*x[1]
+        ref[(3, 2, 2)]=(0.700538908448+0.435573587778j)*x_ref[0]**o + ((0.0524206971052-0.0047738847476j))*x_ref[0] + ((-0.378804080588-0.79176675783j))*x_ref[1]**o + ((-0.83423656794-0.581836164046j))*x_ref[1]
+        arg[(3, 2, 3)]=(-0.607478681128-0.269094354446j)*x[0]**o + ((-0.9660024012+0.765591865299j))*x[0] + ((0.0192863919674-0.238982609451j))*x[1]**o + ((0.343968667868+0.846919064574j))*x[1]
+        ref[(3, 2, 3)]=(-0.607478681128-0.269094354446j)*x_ref[0]**o + ((-0.9660024012+0.765591865299j))*x_ref[0] + ((0.0192863919674-0.238982609451j))*x_ref[1]**o + ((0.343968667868+0.846919064574j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=(0.323525813523-0.799429165859j)*x[2]**o + ((-0.555366624917+0.174866001833j))*x[2]
+            ref[(0, 0, 0)]+=(0.323525813523-0.799429165859j)*x_ref[2]**o + ((-0.555366624917+0.174866001833j))*x_ref[2]
+            arg[(0, 0, 1)]+=(-0.227752367903+0.0956890921545j)*x[2]**o + ((0.723805245757-0.93536745366j))*x[2]
+            ref[(0, 0, 1)]+=(-0.227752367903+0.0956890921545j)*x_ref[2]**o + ((0.723805245757-0.93536745366j))*x_ref[2]
+            arg[(0, 0, 2)]+=(0.485767334436+0.513648036646j)*x[2]**o + ((-0.380925890975-0.540380011097j))*x[2]
+            ref[(0, 0, 2)]+=(0.485767334436+0.513648036646j)*x_ref[2]**o + ((-0.380925890975-0.540380011097j))*x_ref[2]
+            arg[(0, 0, 3)]+=(0.413926618082+0.411582370544j)*x[2]**o + ((0.337209097121-0.204563931871j))*x[2]
+            ref[(0, 0, 3)]+=(0.413926618082+0.411582370544j)*x_ref[2]**o + ((0.337209097121-0.204563931871j))*x_ref[2]
+            arg[(0, 1, 0)]+=(0.484809743078+0.837912931519j)*x[2]**o + ((-0.0149338137465+0.754894549943j))*x[2]
+            ref[(0, 1, 0)]+=(0.484809743078+0.837912931519j)*x_ref[2]**o + ((-0.0149338137465+0.754894549943j))*x_ref[2]
+            arg[(0, 1, 1)]+=(-0.719880576966-0.365629407597j)*x[2]**o + ((-0.113240566428-0.51992838222j))*x[2]
+            ref[(0, 1, 1)]+=(-0.719880576966-0.365629407597j)*x_ref[2]**o + ((-0.113240566428-0.51992838222j))*x_ref[2]
+            arg[(0, 1, 2)]+=(0.208505063999+0.696260815841j)*x[2]**o + ((-0.624237056508+0.560800899568j))*x[2]
+            ref[(0, 1, 2)]+=(0.208505063999+0.696260815841j)*x_ref[2]**o + ((-0.624237056508+0.560800899568j))*x_ref[2]
+            arg[(0, 1, 3)]+=(0.677565462926-0.954395877039j)*x[2]**o + ((0.374260795839+0.891833659358j))*x[2]
+            ref[(0, 1, 3)]+=(0.677565462926-0.954395877039j)*x_ref[2]**o + ((0.374260795839+0.891833659358j))*x_ref[2]
+            arg[(0, 2, 0)]+=(0.234230574993-0.159170884542j)*x[2]**o + ((-0.112296099586-0.386585272408j))*x[2]
+            ref[(0, 2, 0)]+=(0.234230574993-0.159170884542j)*x_ref[2]**o + ((-0.112296099586-0.386585272408j))*x_ref[2]
+            arg[(0, 2, 1)]+=(0.505949918212-0.566675700436j)*x[2]**o + ((-0.888470940877+0.604572220212j))*x[2]
+            ref[(0, 2, 1)]+=(0.505949918212-0.566675700436j)*x_ref[2]**o + ((-0.888470940877+0.604572220212j))*x_ref[2]
+            arg[(0, 2, 2)]+=(-0.374005483935+0.49522036261j)*x[2]**o + ((0.84700195189-0.82937496775j))*x[2]
+            ref[(0, 2, 2)]+=(-0.374005483935+0.49522036261j)*x_ref[2]**o + ((0.84700195189-0.82937496775j))*x_ref[2]
+            arg[(0, 2, 3)]+=(0.0694123159341+0.070540174464j)*x[2]**o + ((0.735707759521-0.380392951973j))*x[2]
+            ref[(0, 2, 3)]+=(0.0694123159341+0.070540174464j)*x_ref[2]**o + ((0.735707759521-0.380392951973j))*x_ref[2]
+            arg[(1, 0, 0)]+=(0.386065073663-0.997461285241j)*x[2]**o + ((0.199366700999+0.152228382407j))*x[2]
+            ref[(1, 0, 0)]+=(0.386065073663-0.997461285241j)*x_ref[2]**o + ((0.199366700999+0.152228382407j))*x_ref[2]
+            arg[(1, 0, 1)]+=(-0.95277140328+0.210379538389j)*x[2]**o + ((0.0229935664244+0.181548185506j))*x[2]
+            ref[(1, 0, 1)]+=(-0.95277140328+0.210379538389j)*x_ref[2]**o + ((0.0229935664244+0.181548185506j))*x_ref[2]
+            arg[(1, 0, 2)]+=(-0.0255678633931+0.768325396953j)*x[2]**o + ((0.165976097357+0.915748985333j))*x[2]
+            ref[(1, 0, 2)]+=(-0.0255678633931+0.768325396953j)*x_ref[2]**o + ((0.165976097357+0.915748985333j))*x_ref[2]
+            arg[(1, 0, 3)]+=(0.0577373867551-0.53463429932j)*x[2]**o + ((-0.256478244313+0.901649963533j))*x[2]
+            ref[(1, 0, 3)]+=(0.0577373867551-0.53463429932j)*x_ref[2]**o + ((-0.256478244313+0.901649963533j))*x_ref[2]
+            arg[(1, 1, 0)]+=(-0.00845529372876-0.639118670368j)*x[2]**o + ((-0.751336475469-0.237887252159j))*x[2]
+            ref[(1, 1, 0)]+=(-0.00845529372876-0.639118670368j)*x_ref[2]**o + ((-0.751336475469-0.237887252159j))*x_ref[2]
+            arg[(1, 1, 1)]+=(0.116958049777-0.100178822402j)*x[2]**o + ((-0.913331850242+0.0577229451408j))*x[2]
+            ref[(1, 1, 1)]+=(0.116958049777-0.100178822402j)*x_ref[2]**o + ((-0.913331850242+0.0577229451408j))*x_ref[2]
+            arg[(1, 1, 2)]+=(0.238094396196+0.705816879319j)*x[2]**o + ((-0.650928311631-0.18264364593j))*x[2]
+            ref[(1, 1, 2)]+=(0.238094396196+0.705816879319j)*x_ref[2]**o + ((-0.650928311631-0.18264364593j))*x_ref[2]
+            arg[(1, 1, 3)]+=(0.609406621244+0.172710189525j)*x[2]**o + ((0.225877435646+0.528380730548j))*x[2]
+            ref[(1, 1, 3)]+=(0.609406621244+0.172710189525j)*x_ref[2]**o + ((0.225877435646+0.528380730548j))*x_ref[2]
+            arg[(1, 2, 0)]+=(0.349747033334-0.923371223984j)*x[2]**o + ((-0.812211255472+0.91846837354j))*x[2]
+            ref[(1, 2, 0)]+=(0.349747033334-0.923371223984j)*x_ref[2]**o + ((-0.812211255472+0.91846837354j))*x_ref[2]
+            arg[(1, 2, 1)]+=(-0.0674518248255+0.763874129617j)*x[2]**o + ((0.143263579941+0.163103268022j))*x[2]
+            ref[(1, 2, 1)]+=(-0.0674518248255+0.763874129617j)*x_ref[2]**o + ((0.143263579941+0.163103268022j))*x_ref[2]
+            arg[(1, 2, 2)]+=(0.530825672548-0.844344046877j)*x[2]**o + ((0.454577440882+0.460809964038j))*x[2]
+            ref[(1, 2, 2)]+=(0.530825672548-0.844344046877j)*x_ref[2]**o + ((0.454577440882+0.460809964038j))*x_ref[2]
+            arg[(1, 2, 3)]+=(0.729104301866+0.423564244818j)*x[2]**o + ((0.722141289649-0.890627116975j))*x[2]
+            ref[(1, 2, 3)]+=(0.729104301866+0.423564244818j)*x_ref[2]**o + ((0.722141289649-0.890627116975j))*x_ref[2]
+            arg[(2, 0, 0)]+=(-0.323601263492+0.360860119983j)*x[2]**o + ((-0.976167701824-0.66917456325j))*x[2]
+            ref[(2, 0, 0)]+=(-0.323601263492+0.360860119983j)*x_ref[2]**o + ((-0.976167701824-0.66917456325j))*x_ref[2]
+            arg[(2, 0, 1)]+=(-0.205145123627-0.0252011956342j)*x[2]**o + ((-0.596128546274-0.892616075045j))*x[2]
+            ref[(2, 0, 1)]+=(-0.205145123627-0.0252011956342j)*x_ref[2]**o + ((-0.596128546274-0.892616075045j))*x_ref[2]
+            arg[(2, 0, 2)]+=(0.982440899018-0.216530859417j)*x[2]**o + ((0.320124611111-0.691986405437j))*x[2]
+            ref[(2, 0, 2)]+=(0.982440899018-0.216530859417j)*x_ref[2]**o + ((0.320124611111-0.691986405437j))*x_ref[2]
+            arg[(2, 0, 3)]+=(0.997249394551+0.153731346601j)*x[2]**o + ((-0.361643721793+0.443073387355j))*x[2]
+            ref[(2, 0, 3)]+=(0.997249394551+0.153731346601j)*x_ref[2]**o + ((-0.361643721793+0.443073387355j))*x_ref[2]
+            arg[(2, 1, 0)]+=(-0.752546490512+0.132009256214j)*x[2]**o + ((0.549814696254-0.460012580217j))*x[2]
+            ref[(2, 1, 0)]+=(-0.752546490512+0.132009256214j)*x_ref[2]**o + ((0.549814696254-0.460012580217j))*x_ref[2]
+            arg[(2, 1, 1)]+=(0.394019114924+0.919135916407j)*x[2]**o + ((-0.0999214892595+0.651470936353j))*x[2]
+            ref[(2, 1, 1)]+=(0.394019114924+0.919135916407j)*x_ref[2]**o + ((-0.0999214892595+0.651470936353j))*x_ref[2]
+            arg[(2, 1, 2)]+=(-0.885945378751+0.541111395371j)*x[2]**o + ((-0.848958414786+0.775712729559j))*x[2]
+            ref[(2, 1, 2)]+=(-0.885945378751+0.541111395371j)*x_ref[2]**o + ((-0.848958414786+0.775712729559j))*x_ref[2]
+            arg[(2, 1, 3)]+=(0.0973230706914+0.623332158055j)*x[2]**o + ((0.599136606034+0.299010290216j))*x[2]
+            ref[(2, 1, 3)]+=(0.0973230706914+0.623332158055j)*x_ref[2]**o + ((0.599136606034+0.299010290216j))*x_ref[2]
+            arg[(2, 2, 0)]+=(-0.93748038532+0.669586114946j)*x[2]**o + ((0.78638046193-0.473709649961j))*x[2]
+            ref[(2, 2, 0)]+=(-0.93748038532+0.669586114946j)*x_ref[2]**o + ((0.78638046193-0.473709649961j))*x_ref[2]
+            arg[(2, 2, 1)]+=(0.787738625815-0.988080512535j)*x[2]**o + ((-0.949150145422-0.979969586531j))*x[2]
+            ref[(2, 2, 1)]+=(0.787738625815-0.988080512535j)*x_ref[2]**o + ((-0.949150145422-0.979969586531j))*x_ref[2]
+            arg[(2, 2, 2)]+=(0.724846738489-0.755973001048j)*x[2]**o + ((0.954985402561-0.474813555876j))*x[2]
+            ref[(2, 2, 2)]+=(0.724846738489-0.755973001048j)*x_ref[2]**o + ((0.954985402561-0.474813555876j))*x_ref[2]
+            arg[(2, 2, 3)]+=(-0.358955708662+0.000367329898735j)*x[2]**o + ((0.574919120024+0.557760895363j))*x[2]
+            ref[(2, 2, 3)]+=(-0.358955708662+0.000367329898735j)*x_ref[2]**o + ((0.574919120024+0.557760895363j))*x_ref[2]
+            arg[(3, 0, 0)]+=(-0.239552007069-0.586160741441j)*x[2]**o + ((0.735881818272-0.0221780514978j))*x[2]
+            ref[(3, 0, 0)]+=(-0.239552007069-0.586160741441j)*x_ref[2]**o + ((0.735881818272-0.0221780514978j))*x_ref[2]
+            arg[(3, 0, 1)]+=(0.877893408155-0.880307350135j)*x[2]**o + ((0.899737718781-0.801982486102j))*x[2]
+            ref[(3, 0, 1)]+=(0.877893408155-0.880307350135j)*x_ref[2]**o + ((0.899737718781-0.801982486102j))*x_ref[2]
+            arg[(3, 0, 2)]+=(-0.706642046897-0.793391883091j)*x[2]**o + ((-0.111982532514+0.351695565319j))*x[2]
+            ref[(3, 0, 2)]+=(-0.706642046897-0.793391883091j)*x_ref[2]**o + ((-0.111982532514+0.351695565319j))*x_ref[2]
+            arg[(3, 0, 3)]+=(-0.907229585559-0.747938007417j)*x[2]**o + ((-0.888526032629+0.790627197785j))*x[2]
+            ref[(3, 0, 3)]+=(-0.907229585559-0.747938007417j)*x_ref[2]**o + ((-0.888526032629+0.790627197785j))*x_ref[2]
+            arg[(3, 1, 0)]+=(0.918769232639+0.457176200718j)*x[2]**o + ((0.358964975713-0.255366642255j))*x[2]
+            ref[(3, 1, 0)]+=(0.918769232639+0.457176200718j)*x_ref[2]**o + ((0.358964975713-0.255366642255j))*x_ref[2]
+            arg[(3, 1, 1)]+=(-0.485635871898-0.59637029011j)*x[2]**o + ((-0.843868285266+0.175970841014j))*x[2]
+            ref[(3, 1, 1)]+=(-0.485635871898-0.59637029011j)*x_ref[2]**o + ((-0.843868285266+0.175970841014j))*x_ref[2]
+            arg[(3, 1, 2)]+=(-0.298677096805-0.505359599996j)*x[2]**o + ((-0.591682814176-0.277318050715j))*x[2]
+            ref[(3, 1, 2)]+=(-0.298677096805-0.505359599996j)*x_ref[2]**o + ((-0.591682814176-0.277318050715j))*x_ref[2]
+            arg[(3, 1, 3)]+=(-0.629914142962+0.56919736875j)*x[2]**o + ((-0.217934274706-0.515418098037j))*x[2]
+            ref[(3, 1, 3)]+=(-0.629914142962+0.56919736875j)*x_ref[2]**o + ((-0.217934274706-0.515418098037j))*x_ref[2]
+            arg[(3, 2, 0)]+=(0.230258801399+0.966854653403j)*x[2]**o + ((0.216473622541+0.109987187147j))*x[2]
+            ref[(3, 2, 0)]+=(0.230258801399+0.966854653403j)*x_ref[2]**o + ((0.216473622541+0.109987187147j))*x_ref[2]
+            arg[(3, 2, 1)]+=(0.314932735819+0.659272522887j)*x[2]**o + ((-0.731446024252-0.250758289631j))*x[2]
+            ref[(3, 2, 1)]+=(0.314932735819+0.659272522887j)*x_ref[2]**o + ((-0.731446024252-0.250758289631j))*x_ref[2]
+            arg[(3, 2, 2)]+=(0.154615574275-0.157825263501j)*x[2]**o + ((-0.565888993503+0.104044822706j))*x[2]
+            ref[(3, 2, 2)]+=(0.154615574275-0.157825263501j)*x_ref[2]**o + ((-0.565888993503+0.104044822706j))*x_ref[2]
+            arg[(3, 2, 3)]+=(-0.635570896341+0.626701555414j)*x[2]**o + ((-0.696624896596+0.834193621221j))*x[2]
+            ref[(3, 2, 3)]+=(-0.635570896341+0.626701555414j)*x_ref[2]**o + ((-0.696624896596+0.834193621221j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 2, 4),w)
+        ref = Data(0,(3, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=(-0.108033509255+0.222736337981j)*x[0]**o + ((0.40733491878-0.194553932909j))*x[0] + ((-0.375765683759-0.136235618117j))*x[1]**o + ((-0.430323135345+0.52195923128j))*x[1]
+        ref[(0, 0, 0, 0)]=(-0.108033509255+0.222736337981j)*x_ref[0]**o + ((0.40733491878-0.194553932909j))*x_ref[0] + ((-0.375765683759-0.136235618117j))*x_ref[1]**o + ((-0.430323135345+0.52195923128j))*x_ref[1]
+        arg[(0, 0, 0, 1)]=(-0.654024729486+0.000792763149839j)*x[0]**o + ((0.823957023983+0.300491573288j))*x[0] + ((0.324442277655-0.00191281668606j))*x[1]**o + ((-0.267345225934-0.64820381707j))*x[1]
+        ref[(0, 0, 0, 1)]=(-0.654024729486+0.000792763149839j)*x_ref[0]**o + ((0.823957023983+0.300491573288j))*x_ref[0] + ((0.324442277655-0.00191281668606j))*x_ref[1]**o + ((-0.267345225934-0.64820381707j))*x_ref[1]
+        arg[(0, 0, 0, 2)]=(0.227587396843+0.422308530844j)*x[0]**o + ((0.439362243145+0.505976436494j))*x[0] + ((-0.590119027122+0.11001831358j))*x[1]**o + ((0.296647509713+0.213198673938j))*x[1]
+        ref[(0, 0, 0, 2)]=(0.227587396843+0.422308530844j)*x_ref[0]**o + ((0.439362243145+0.505976436494j))*x_ref[0] + ((-0.590119027122+0.11001831358j))*x_ref[1]**o + ((0.296647509713+0.213198673938j))*x_ref[1]
+        arg[(0, 0, 0, 3)]=(0.167711403172-0.0652782106889j)*x[0]**o + ((-0.401950782455-0.695886334129j))*x[0] + ((0.708805627422+0.112056791375j))*x[1]**o + ((-0.894193579703+0.283876101516j))*x[1]
+        ref[(0, 0, 0, 3)]=(0.167711403172-0.0652782106889j)*x_ref[0]**o + ((-0.401950782455-0.695886334129j))*x_ref[0] + ((0.708805627422+0.112056791375j))*x_ref[1]**o + ((-0.894193579703+0.283876101516j))*x_ref[1]
+        arg[(0, 0, 1, 0)]=(0.980328708753+0.595520196826j)*x[0]**o + ((-0.859198482397+0.632248860177j))*x[0] + ((0.152726910136+0.81018885359j))*x[1]**o + ((0.183690155522+0.272800869047j))*x[1]
+        ref[(0, 0, 1, 0)]=(0.980328708753+0.595520196826j)*x_ref[0]**o + ((-0.859198482397+0.632248860177j))*x_ref[0] + ((0.152726910136+0.81018885359j))*x_ref[1]**o + ((0.183690155522+0.272800869047j))*x_ref[1]
+        arg[(0, 0, 1, 1)]=(0.188266104678+0.950119884274j)*x[0]**o + ((-0.561514639106-0.407306996879j))*x[0] + ((0.912785705074-0.837773527387j))*x[1]**o + ((0.715071818654-0.443553962151j))*x[1]
+        ref[(0, 0, 1, 1)]=(0.188266104678+0.950119884274j)*x_ref[0]**o + ((-0.561514639106-0.407306996879j))*x_ref[0] + ((0.912785705074-0.837773527387j))*x_ref[1]**o + ((0.715071818654-0.443553962151j))*x_ref[1]
+        arg[(0, 0, 1, 2)]=(-0.0535662285413+0.460292973746j)*x[0]**o + ((0.448681932514+0.973694791463j))*x[0] + ((-0.0238124015565+0.600251948944j))*x[1]**o + ((0.869394044225+0.883216162322j))*x[1]
+        ref[(0, 0, 1, 2)]=(-0.0535662285413+0.460292973746j)*x_ref[0]**o + ((0.448681932514+0.973694791463j))*x_ref[0] + ((-0.0238124015565+0.600251948944j))*x_ref[1]**o + ((0.869394044225+0.883216162322j))*x_ref[1]
+        arg[(0, 0, 1, 3)]=(-0.821060167274-0.275666942666j)*x[0]**o + ((-0.282866176115+0.958549273667j))*x[0] + ((-0.533946970594+0.405521502508j))*x[1]**o + ((-0.0115029920202-0.84264891188j))*x[1]
+        ref[(0, 0, 1, 3)]=(-0.821060167274-0.275666942666j)*x_ref[0]**o + ((-0.282866176115+0.958549273667j))*x_ref[0] + ((-0.533946970594+0.405521502508j))*x_ref[1]**o + ((-0.0115029920202-0.84264891188j))*x_ref[1]
+        arg[(0, 1, 0, 0)]=(0.709231928742+0.49835399504j)*x[0]**o + ((0.952440957594+0.936480806256j))*x[0] + ((0.745869376088-0.703748223044j))*x[1]**o + ((-0.266116470489-0.377567767116j))*x[1]
+        ref[(0, 1, 0, 0)]=(0.709231928742+0.49835399504j)*x_ref[0]**o + ((0.952440957594+0.936480806256j))*x_ref[0] + ((0.745869376088-0.703748223044j))*x_ref[1]**o + ((-0.266116470489-0.377567767116j))*x_ref[1]
+        arg[(0, 1, 0, 1)]=(-0.309799436276+0.299653969132j)*x[0]**o + ((-0.550558120724-0.409310938729j))*x[0] + ((-0.561475677099-0.154258814392j))*x[1]**o + ((-0.456587989302-0.811859885844j))*x[1]
+        ref[(0, 1, 0, 1)]=(-0.309799436276+0.299653969132j)*x_ref[0]**o + ((-0.550558120724-0.409310938729j))*x_ref[0] + ((-0.561475677099-0.154258814392j))*x_ref[1]**o + ((-0.456587989302-0.811859885844j))*x_ref[1]
+        arg[(0, 1, 0, 2)]=(-0.332752969716+0.349414164333j)*x[0]**o + ((-0.67401696439-0.793400988692j))*x[0] + ((-0.720391710567+0.796406535761j))*x[1]**o + ((0.939381276416-0.0118913651507j))*x[1]
+        ref[(0, 1, 0, 2)]=(-0.332752969716+0.349414164333j)*x_ref[0]**o + ((-0.67401696439-0.793400988692j))*x_ref[0] + ((-0.720391710567+0.796406535761j))*x_ref[1]**o + ((0.939381276416-0.0118913651507j))*x_ref[1]
+        arg[(0, 1, 0, 3)]=(0.00177871733417+0.675489264194j)*x[0]**o + ((0.658337588417-0.913114843125j))*x[0] + ((-0.183552569229-0.71085003948j))*x[1]**o + ((0.569911101009-0.00648024026829j))*x[1]
+        ref[(0, 1, 0, 3)]=(0.00177871733417+0.675489264194j)*x_ref[0]**o + ((0.658337588417-0.913114843125j))*x_ref[0] + ((-0.183552569229-0.71085003948j))*x_ref[1]**o + ((0.569911101009-0.00648024026829j))*x_ref[1]
+        arg[(0, 1, 1, 0)]=(-0.330270963513-0.360599215374j)*x[0]**o + ((-0.841314893091+0.584956522075j))*x[0] + ((-0.520691003819+0.1675572849j))*x[1]**o + ((0.845253862782+0.685523775973j))*x[1]
+        ref[(0, 1, 1, 0)]=(-0.330270963513-0.360599215374j)*x_ref[0]**o + ((-0.841314893091+0.584956522075j))*x_ref[0] + ((-0.520691003819+0.1675572849j))*x_ref[1]**o + ((0.845253862782+0.685523775973j))*x_ref[1]
+        arg[(0, 1, 1, 1)]=(-0.474681819703-0.0217805214318j)*x[0]**o + ((0.13569030998-0.109926345962j))*x[0] + ((0.809567226052+0.0826046642512j))*x[1]**o + ((-0.14549392878-0.378650976952j))*x[1]
+        ref[(0, 1, 1, 1)]=(-0.474681819703-0.0217805214318j)*x_ref[0]**o + ((0.13569030998-0.109926345962j))*x_ref[0] + ((0.809567226052+0.0826046642512j))*x_ref[1]**o + ((-0.14549392878-0.378650976952j))*x_ref[1]
+        arg[(0, 1, 1, 2)]=(0.631215770571-0.0352779694431j)*x[0]**o + ((0.724502921342-0.185635395734j))*x[0] + ((-0.984002240729+0.567886875324j))*x[1]**o + ((-0.0486002008837+0.255483449498j))*x[1]
+        ref[(0, 1, 1, 2)]=(0.631215770571-0.0352779694431j)*x_ref[0]**o + ((0.724502921342-0.185635395734j))*x_ref[0] + ((-0.984002240729+0.567886875324j))*x_ref[1]**o + ((-0.0486002008837+0.255483449498j))*x_ref[1]
+        arg[(0, 1, 1, 3)]=(0.50445729316+0.848477354825j)*x[0]**o + ((0.0720642369462+0.96384899285j))*x[0] + ((-0.988152134438-0.164926839992j))*x[1]**o + ((0.809815254866+0.494187355261j))*x[1]
+        ref[(0, 1, 1, 3)]=(0.50445729316+0.848477354825j)*x_ref[0]**o + ((0.0720642369462+0.96384899285j))*x_ref[0] + ((-0.988152134438-0.164926839992j))*x_ref[1]**o + ((0.809815254866+0.494187355261j))*x_ref[1]
+        arg[(1, 0, 0, 0)]=(-0.75788631951+0.162215986047j)*x[0]**o + ((-0.0147387344888+0.0574125727859j))*x[0] + ((0.633624548308-0.926852744731j))*x[1]**o + ((-0.314643012298-0.384852254428j))*x[1]
+        ref[(1, 0, 0, 0)]=(-0.75788631951+0.162215986047j)*x_ref[0]**o + ((-0.0147387344888+0.0574125727859j))*x_ref[0] + ((0.633624548308-0.926852744731j))*x_ref[1]**o + ((-0.314643012298-0.384852254428j))*x_ref[1]
+        arg[(1, 0, 0, 1)]=(-0.268413514362-0.104053074568j)*x[0]**o + ((-0.738656183292+0.291384530689j))*x[0] + ((0.290144634631+0.727445863021j))*x[1]**o + ((0.987490117765+0.630890810783j))*x[1]
+        ref[(1, 0, 0, 1)]=(-0.268413514362-0.104053074568j)*x_ref[0]**o + ((-0.738656183292+0.291384530689j))*x_ref[0] + ((0.290144634631+0.727445863021j))*x_ref[1]**o + ((0.987490117765+0.630890810783j))*x_ref[1]
+        arg[(1, 0, 0, 2)]=(-0.127221536975+0.0949332486695j)*x[0]**o + ((-0.0594910750919+0.240055541753j))*x[0] + ((0.240023729647-0.515296597672j))*x[1]**o + ((-0.177027863555+0.327143662096j))*x[1]
+        ref[(1, 0, 0, 2)]=(-0.127221536975+0.0949332486695j)*x_ref[0]**o + ((-0.0594910750919+0.240055541753j))*x_ref[0] + ((0.240023729647-0.515296597672j))*x_ref[1]**o + ((-0.177027863555+0.327143662096j))*x_ref[1]
+        arg[(1, 0, 0, 3)]=(-0.485732276951-0.00101763807362j)*x[0]**o + ((0.882170408791+0.446542951845j))*x[0] + ((0.0189629829322+0.669363042854j))*x[1]**o + ((0.831010942292+0.221569140464j))*x[1]
+        ref[(1, 0, 0, 3)]=(-0.485732276951-0.00101763807362j)*x_ref[0]**o + ((0.882170408791+0.446542951845j))*x_ref[0] + ((0.0189629829322+0.669363042854j))*x_ref[1]**o + ((0.831010942292+0.221569140464j))*x_ref[1]
+        arg[(1, 0, 1, 0)]=(-0.736616117632+0.401806885437j)*x[0]**o + ((-0.999071889233-0.0575317089333j))*x[0] + ((0.582331699353-0.353968709849j))*x[1]**o + ((-0.796460646653-0.789113303236j))*x[1]
+        ref[(1, 0, 1, 0)]=(-0.736616117632+0.401806885437j)*x_ref[0]**o + ((-0.999071889233-0.0575317089333j))*x_ref[0] + ((0.582331699353-0.353968709849j))*x_ref[1]**o + ((-0.796460646653-0.789113303236j))*x_ref[1]
+        arg[(1, 0, 1, 1)]=(-0.097531669852+0.177206608958j)*x[0]**o + ((0.0874848003616+0.0392519843742j))*x[0] + ((-0.165623224697+0.840610443329j))*x[1]**o + ((-0.977430982984-0.96515460592j))*x[1]
+        ref[(1, 0, 1, 1)]=(-0.097531669852+0.177206608958j)*x_ref[0]**o + ((0.0874848003616+0.0392519843742j))*x_ref[0] + ((-0.165623224697+0.840610443329j))*x_ref[1]**o + ((-0.977430982984-0.96515460592j))*x_ref[1]
+        arg[(1, 0, 1, 2)]=(-0.0621066076709+0.535511729577j)*x[0]**o + ((-0.0719717418682-0.969821490539j))*x[0] + ((-0.0153733934423+0.691135546995j))*x[1]**o + ((-0.359990598278-0.506883815779j))*x[1]
+        ref[(1, 0, 1, 2)]=(-0.0621066076709+0.535511729577j)*x_ref[0]**o + ((-0.0719717418682-0.969821490539j))*x_ref[0] + ((-0.0153733934423+0.691135546995j))*x_ref[1]**o + ((-0.359990598278-0.506883815779j))*x_ref[1]
+        arg[(1, 0, 1, 3)]=(-0.987331373159+0.520798705301j)*x[0]**o + ((0.971874557655+0.654150976457j))*x[0] + ((-0.706596858767-0.517997542447j))*x[1]**o + ((0.245756414944-0.555532545626j))*x[1]
+        ref[(1, 0, 1, 3)]=(-0.987331373159+0.520798705301j)*x_ref[0]**o + ((0.971874557655+0.654150976457j))*x_ref[0] + ((-0.706596858767-0.517997542447j))*x_ref[1]**o + ((0.245756414944-0.555532545626j))*x_ref[1]
+        arg[(1, 1, 0, 0)]=(0.861814134198-0.699877177252j)*x[0]**o + ((-0.160479607162-0.0925723781927j))*x[0] + ((-0.0487439143904-0.00977249745726j))*x[1]**o + ((0.562624010704+0.496845923759j))*x[1]
+        ref[(1, 1, 0, 0)]=(0.861814134198-0.699877177252j)*x_ref[0]**o + ((-0.160479607162-0.0925723781927j))*x_ref[0] + ((-0.0487439143904-0.00977249745726j))*x_ref[1]**o + ((0.562624010704+0.496845923759j))*x_ref[1]
+        arg[(1, 1, 0, 1)]=(-0.0853634137243-0.254347378505j)*x[0]**o + ((-0.513464178281-0.20636458306j))*x[0] + ((0.135505440602+0.255359685858j))*x[1]**o + ((-0.653855445245-0.883645739246j))*x[1]
+        ref[(1, 1, 0, 1)]=(-0.0853634137243-0.254347378505j)*x_ref[0]**o + ((-0.513464178281-0.20636458306j))*x_ref[0] + ((0.135505440602+0.255359685858j))*x_ref[1]**o + ((-0.653855445245-0.883645739246j))*x_ref[1]
+        arg[(1, 1, 0, 2)]=(-0.86269811558+0.877277330269j)*x[0]**o + ((-0.278208072569-0.202696792498j))*x[0] + ((0.161920622924+0.256705246646j))*x[1]**o + ((-0.917453806826-0.291880717067j))*x[1]
+        ref[(1, 1, 0, 2)]=(-0.86269811558+0.877277330269j)*x_ref[0]**o + ((-0.278208072569-0.202696792498j))*x_ref[0] + ((0.161920622924+0.256705246646j))*x_ref[1]**o + ((-0.917453806826-0.291880717067j))*x_ref[1]
+        arg[(1, 1, 0, 3)]=(0.895935389395+0.485959072921j)*x[0]**o + ((-0.480698868053-0.74873195493j))*x[0] + ((0.854996650496-0.996851570864j))*x[1]**o + ((-0.69274527193-0.110782922191j))*x[1]
+        ref[(1, 1, 0, 3)]=(0.895935389395+0.485959072921j)*x_ref[0]**o + ((-0.480698868053-0.74873195493j))*x_ref[0] + ((0.854996650496-0.996851570864j))*x_ref[1]**o + ((-0.69274527193-0.110782922191j))*x_ref[1]
+        arg[(1, 1, 1, 0)]=(-0.280485670534-0.683287796795j)*x[0]**o + ((0.36092349472+0.825194896954j))*x[0] + ((0.54094617021-0.238405274345j))*x[1]**o + ((0.515197758249-0.199815297821j))*x[1]
+        ref[(1, 1, 1, 0)]=(-0.280485670534-0.683287796795j)*x_ref[0]**o + ((0.36092349472+0.825194896954j))*x_ref[0] + ((0.54094617021-0.238405274345j))*x_ref[1]**o + ((0.515197758249-0.199815297821j))*x_ref[1]
+        arg[(1, 1, 1, 1)]=(0.0214300018284+0.369557938634j)*x[0]**o + ((-0.422766140631-0.832356406162j))*x[0] + ((-0.844084243512+0.412832528042j))*x[1]**o + ((-0.83111298631-0.0124525387054j))*x[1]
+        ref[(1, 1, 1, 1)]=(0.0214300018284+0.369557938634j)*x_ref[0]**o + ((-0.422766140631-0.832356406162j))*x_ref[0] + ((-0.844084243512+0.412832528042j))*x_ref[1]**o + ((-0.83111298631-0.0124525387054j))*x_ref[1]
+        arg[(1, 1, 1, 2)]=(0.838443740333+0.575086785001j)*x[0]**o + ((0.0242017464409-0.75354121843j))*x[0] + ((-0.474842294925-0.297636260901j))*x[1]**o + ((0.450940971644+0.975255630095j))*x[1]
+        ref[(1, 1, 1, 2)]=(0.838443740333+0.575086785001j)*x_ref[0]**o + ((0.0242017464409-0.75354121843j))*x_ref[0] + ((-0.474842294925-0.297636260901j))*x_ref[1]**o + ((0.450940971644+0.975255630095j))*x_ref[1]
+        arg[(1, 1, 1, 3)]=(-0.0763745716982-0.0165348061206j)*x[0]**o + ((0.482482677312-0.87970797696j))*x[0] + ((0.89711733762+0.974806765326j))*x[1]**o + ((-0.639184412698-0.219947474138j))*x[1]
+        ref[(1, 1, 1, 3)]=(-0.0763745716982-0.0165348061206j)*x_ref[0]**o + ((0.482482677312-0.87970797696j))*x_ref[0] + ((0.89711733762+0.974806765326j))*x_ref[1]**o + ((-0.639184412698-0.219947474138j))*x_ref[1]
+        arg[(2, 0, 0, 0)]=(0.612143307142-0.594743814916j)*x[0]**o + ((0.0218621669868-0.0412140117961j))*x[0] + ((0.0669758270052-0.0540787106087j))*x[1]**o + ((-0.130880621895-0.602331078541j))*x[1]
+        ref[(2, 0, 0, 0)]=(0.612143307142-0.594743814916j)*x_ref[0]**o + ((0.0218621669868-0.0412140117961j))*x_ref[0] + ((0.0669758270052-0.0540787106087j))*x_ref[1]**o + ((-0.130880621895-0.602331078541j))*x_ref[1]
+        arg[(2, 0, 0, 1)]=(-0.0278239967655-0.695289149383j)*x[0]**o + ((0.764860988377-0.560203563428j))*x[0] + ((0.142622315385-0.58540709667j))*x[1]**o + ((0.250609188658+0.235449434524j))*x[1]
+        ref[(2, 0, 0, 1)]=(-0.0278239967655-0.695289149383j)*x_ref[0]**o + ((0.764860988377-0.560203563428j))*x_ref[0] + ((0.142622315385-0.58540709667j))*x_ref[1]**o + ((0.250609188658+0.235449434524j))*x_ref[1]
+        arg[(2, 0, 0, 2)]=(0.208780534805-0.275653730956j)*x[0]**o + ((0.596629172991+0.950099364473j))*x[0] + ((0.906290739152-0.359107555787j))*x[1]**o + ((-0.812768914553+0.380506620277j))*x[1]
+        ref[(2, 0, 0, 2)]=(0.208780534805-0.275653730956j)*x_ref[0]**o + ((0.596629172991+0.950099364473j))*x_ref[0] + ((0.906290739152-0.359107555787j))*x_ref[1]**o + ((-0.812768914553+0.380506620277j))*x_ref[1]
+        arg[(2, 0, 0, 3)]=(0.169960953477+0.90545484719j)*x[0]**o + ((-0.548557219675+0.964423768155j))*x[0] + ((-0.64157467188+0.512022895185j))*x[1]**o + ((0.741792644957+0.959279734861j))*x[1]
+        ref[(2, 0, 0, 3)]=(0.169960953477+0.90545484719j)*x_ref[0]**o + ((-0.548557219675+0.964423768155j))*x_ref[0] + ((-0.64157467188+0.512022895185j))*x_ref[1]**o + ((0.741792644957+0.959279734861j))*x_ref[1]
+        arg[(2, 0, 1, 0)]=(0.9613233892+0.24007807697j)*x[0]**o + ((-0.587591636204-0.740087078312j))*x[0] + ((-0.740736111428+0.0940521949054j))*x[1]**o + ((-0.933205091117+0.988815191734j))*x[1]
+        ref[(2, 0, 1, 0)]=(0.9613233892+0.24007807697j)*x_ref[0]**o + ((-0.587591636204-0.740087078312j))*x_ref[0] + ((-0.740736111428+0.0940521949054j))*x_ref[1]**o + ((-0.933205091117+0.988815191734j))*x_ref[1]
+        arg[(2, 0, 1, 1)]=(0.238148101213-0.676188006401j)*x[0]**o + ((-0.0575685661956+0.212548587115j))*x[0] + ((0.674524947872-0.982766695363j))*x[1]**o + ((0.582858309592+0.441105274353j))*x[1]
+        ref[(2, 0, 1, 1)]=(0.238148101213-0.676188006401j)*x_ref[0]**o + ((-0.0575685661956+0.212548587115j))*x_ref[0] + ((0.674524947872-0.982766695363j))*x_ref[1]**o + ((0.582858309592+0.441105274353j))*x_ref[1]
+        arg[(2, 0, 1, 2)]=(-0.741120718133-0.346959156755j)*x[0]**o + ((-0.046060072665+0.090066184194j))*x[0] + ((-0.840016868097-0.874215551301j))*x[1]**o + ((-0.0913169291523+0.0384885759912j))*x[1]
+        ref[(2, 0, 1, 2)]=(-0.741120718133-0.346959156755j)*x_ref[0]**o + ((-0.046060072665+0.090066184194j))*x_ref[0] + ((-0.840016868097-0.874215551301j))*x_ref[1]**o + ((-0.0913169291523+0.0384885759912j))*x_ref[1]
+        arg[(2, 0, 1, 3)]=(-0.760366426357+0.391537720411j)*x[0]**o + ((0.810029278198-0.488855312722j))*x[0] + ((-0.534709012791+0.184402326661j))*x[1]**o + ((-0.675845036414-0.0135629109035j))*x[1]
+        ref[(2, 0, 1, 3)]=(-0.760366426357+0.391537720411j)*x_ref[0]**o + ((0.810029278198-0.488855312722j))*x_ref[0] + ((-0.534709012791+0.184402326661j))*x_ref[1]**o + ((-0.675845036414-0.0135629109035j))*x_ref[1]
+        arg[(2, 1, 0, 0)]=(0.215453372966-0.153793314027j)*x[0]**o + ((-0.435663922707+0.349373303407j))*x[0] + ((-0.0161112195742-0.602879997341j))*x[1]**o + ((-0.00390945941373+0.165968940382j))*x[1]
+        ref[(2, 1, 0, 0)]=(0.215453372966-0.153793314027j)*x_ref[0]**o + ((-0.435663922707+0.349373303407j))*x_ref[0] + ((-0.0161112195742-0.602879997341j))*x_ref[1]**o + ((-0.00390945941373+0.165968940382j))*x_ref[1]
+        arg[(2, 1, 0, 1)]=(0.250734126498+0.888361779074j)*x[0]**o + ((-0.847015925807+0.975989675706j))*x[0] + ((-0.16514771892+0.797771629316j))*x[1]**o + ((-0.428097610147-0.183378450176j))*x[1]
+        ref[(2, 1, 0, 1)]=(0.250734126498+0.888361779074j)*x_ref[0]**o + ((-0.847015925807+0.975989675706j))*x_ref[0] + ((-0.16514771892+0.797771629316j))*x_ref[1]**o + ((-0.428097610147-0.183378450176j))*x_ref[1]
+        arg[(2, 1, 0, 2)]=(-0.0940863861672-0.574313788957j)*x[0]**o + ((0.544712467254+0.321196153478j))*x[0] + ((0.975815969097-0.634213611638j))*x[1]**o + ((-0.224517976645+0.137536431941j))*x[1]
+        ref[(2, 1, 0, 2)]=(-0.0940863861672-0.574313788957j)*x_ref[0]**o + ((0.544712467254+0.321196153478j))*x_ref[0] + ((0.975815969097-0.634213611638j))*x_ref[1]**o + ((-0.224517976645+0.137536431941j))*x_ref[1]
+        arg[(2, 1, 0, 3)]=(0.362290683986-0.234635109148j)*x[0]**o + ((-0.828538125183+0.201300977494j))*x[0] + ((-0.926781949928+0.202440596458j))*x[1]**o + ((-0.647156297222+0.187420151685j))*x[1]
+        ref[(2, 1, 0, 3)]=(0.362290683986-0.234635109148j)*x_ref[0]**o + ((-0.828538125183+0.201300977494j))*x_ref[0] + ((-0.926781949928+0.202440596458j))*x_ref[1]**o + ((-0.647156297222+0.187420151685j))*x_ref[1]
+        arg[(2, 1, 1, 0)]=(0.495340766886+0.626951860058j)*x[0]**o + ((-0.506074795468+0.153558208021j))*x[0] + ((-0.966535593918+0.0540135877131j))*x[1]**o + ((0.826773651457+0.97759971722j))*x[1]
+        ref[(2, 1, 1, 0)]=(0.495340766886+0.626951860058j)*x_ref[0]**o + ((-0.506074795468+0.153558208021j))*x_ref[0] + ((-0.966535593918+0.0540135877131j))*x_ref[1]**o + ((0.826773651457+0.97759971722j))*x_ref[1]
+        arg[(2, 1, 1, 1)]=(-0.151521487251-0.824400462477j)*x[0]**o + ((0.641261563814-0.328952545412j))*x[0] + ((-0.17181033104-0.806995522889j))*x[1]**o + ((-0.164396506296+0.773403849498j))*x[1]
+        ref[(2, 1, 1, 1)]=(-0.151521487251-0.824400462477j)*x_ref[0]**o + ((0.641261563814-0.328952545412j))*x_ref[0] + ((-0.17181033104-0.806995522889j))*x_ref[1]**o + ((-0.164396506296+0.773403849498j))*x_ref[1]
+        arg[(2, 1, 1, 2)]=(0.202775300479-0.814334206182j)*x[0]**o + ((0.906082289585+0.905688014495j))*x[0] + ((-0.673299397369+0.175335883877j))*x[1]**o + ((0.0419810597039-0.265644522059j))*x[1]
+        ref[(2, 1, 1, 2)]=(0.202775300479-0.814334206182j)*x_ref[0]**o + ((0.906082289585+0.905688014495j))*x_ref[0] + ((-0.673299397369+0.175335883877j))*x_ref[1]**o + ((0.0419810597039-0.265644522059j))*x_ref[1]
+        arg[(2, 1, 1, 3)]=(0.890502485921+0.46746433042j)*x[0]**o + ((0.815119971271-0.591649079425j))*x[0] + ((-0.310604231994+0.288733925952j))*x[1]**o + ((-0.277983274411+0.418332177869j))*x[1]
+        ref[(2, 1, 1, 3)]=(0.890502485921+0.46746433042j)*x_ref[0]**o + ((0.815119971271-0.591649079425j))*x_ref[0] + ((-0.310604231994+0.288733925952j))*x_ref[1]**o + ((-0.277983274411+0.418332177869j))*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=(-0.016280022779-0.673207891316j)*x[2]**o + ((-0.889104026756+0.969019264222j))*x[2]
+            ref[(0, 0, 0, 0)]+=(-0.016280022779-0.673207891316j)*x_ref[2]**o + ((-0.889104026756+0.969019264222j))*x_ref[2]
+            arg[(0, 0, 0, 1)]+=(-0.447228359471+0.711075034512j)*x[2]**o + ((-0.939677187238+0.0855739512766j))*x[2]
+            ref[(0, 0, 0, 1)]+=(-0.447228359471+0.711075034512j)*x_ref[2]**o + ((-0.939677187238+0.0855739512766j))*x_ref[2]
+            arg[(0, 0, 0, 2)]+=(-0.151498343633-0.713041892462j)*x[2]**o + ((0.696087000314-0.81193613047j))*x[2]
+            ref[(0, 0, 0, 2)]+=(-0.151498343633-0.713041892462j)*x_ref[2]**o + ((0.696087000314-0.81193613047j))*x_ref[2]
+            arg[(0, 0, 0, 3)]+=(0.136003139583-0.0764675401136j)*x[2]**o + ((0.438862624938-0.569314589447j))*x[2]
+            ref[(0, 0, 0, 3)]+=(0.136003139583-0.0764675401136j)*x_ref[2]**o + ((0.438862624938-0.569314589447j))*x_ref[2]
+            arg[(0, 0, 1, 0)]+=(0.180651168652+0.841897822263j)*x[2]**o + ((0.0977594969547-0.0311119784107j))*x[2]
+            ref[(0, 0, 1, 0)]+=(0.180651168652+0.841897822263j)*x_ref[2]**o + ((0.0977594969547-0.0311119784107j))*x_ref[2]
+            arg[(0, 0, 1, 1)]+=(-0.659728322072-0.619132707374j)*x[2]**o + ((-0.442836798385-0.82082336708j))*x[2]
+            ref[(0, 0, 1, 1)]+=(-0.659728322072-0.619132707374j)*x_ref[2]**o + ((-0.442836798385-0.82082336708j))*x_ref[2]
+            arg[(0, 0, 1, 2)]+=(-0.240588840361-0.575194211014j)*x[2]**o + ((0.0972129246876+0.273172164869j))*x[2]
+            ref[(0, 0, 1, 2)]+=(-0.240588840361-0.575194211014j)*x_ref[2]**o + ((0.0972129246876+0.273172164869j))*x_ref[2]
+            arg[(0, 0, 1, 3)]+=(-0.99220696933+0.66758752683j)*x[2]**o + ((-0.374672484592+0.419940237627j))*x[2]
+            ref[(0, 0, 1, 3)]+=(-0.99220696933+0.66758752683j)*x_ref[2]**o + ((-0.374672484592+0.419940237627j))*x_ref[2]
+            arg[(0, 1, 0, 0)]+=(-0.152679077619+0.447946313024j)*x[2]**o + ((-0.378219005338+0.947147583595j))*x[2]
+            ref[(0, 1, 0, 0)]+=(-0.152679077619+0.447946313024j)*x_ref[2]**o + ((-0.378219005338+0.947147583595j))*x_ref[2]
+            arg[(0, 1, 0, 1)]+=(0.306978310968-0.950173861474j)*x[2]**o + ((-0.225970513278+0.399231735858j))*x[2]
+            ref[(0, 1, 0, 1)]+=(0.306978310968-0.950173861474j)*x_ref[2]**o + ((-0.225970513278+0.399231735858j))*x_ref[2]
+            arg[(0, 1, 0, 2)]+=(0.439495770979+0.924190226876j)*x[2]**o + ((0.905207646531-0.725277426177j))*x[2]
+            ref[(0, 1, 0, 2)]+=(0.439495770979+0.924190226876j)*x_ref[2]**o + ((0.905207646531-0.725277426177j))*x_ref[2]
+            arg[(0, 1, 0, 3)]+=(-0.0974645820189-0.431094247536j)*x[2]**o + ((0.885358736851-0.42803167868j))*x[2]
+            ref[(0, 1, 0, 3)]+=(-0.0974645820189-0.431094247536j)*x_ref[2]**o + ((0.885358736851-0.42803167868j))*x_ref[2]
+            arg[(0, 1, 1, 0)]+=(-0.0413385705155+0.620518968469j)*x[2]**o + ((-0.491637756699-0.625374416797j))*x[2]
+            ref[(0, 1, 1, 0)]+=(-0.0413385705155+0.620518968469j)*x_ref[2]**o + ((-0.491637756699-0.625374416797j))*x_ref[2]
+            arg[(0, 1, 1, 1)]+=(0.106058791677+0.99725740164j)*x[2]**o + ((0.143486411027-0.483136217316j))*x[2]
+            ref[(0, 1, 1, 1)]+=(0.106058791677+0.99725740164j)*x_ref[2]**o + ((0.143486411027-0.483136217316j))*x_ref[2]
+            arg[(0, 1, 1, 2)]+=(0.402369908264+0.419535092839j)*x[2]**o + ((-0.0741717263567+0.357683215014j))*x[2]
+            ref[(0, 1, 1, 2)]+=(0.402369908264+0.419535092839j)*x_ref[2]**o + ((-0.0741717263567+0.357683215014j))*x_ref[2]
+            arg[(0, 1, 1, 3)]+=(0.747547105421+0.85620551509j)*x[2]**o + ((-0.854705518901-0.977996665604j))*x[2]
+            ref[(0, 1, 1, 3)]+=(0.747547105421+0.85620551509j)*x_ref[2]**o + ((-0.854705518901-0.977996665604j))*x_ref[2]
+            arg[(1, 0, 0, 0)]+=(0.106188831129-0.485099566488j)*x[2]**o + ((-0.446849606699+0.589522788173j))*x[2]
+            ref[(1, 0, 0, 0)]+=(0.106188831129-0.485099566488j)*x_ref[2]**o + ((-0.446849606699+0.589522788173j))*x_ref[2]
+            arg[(1, 0, 0, 1)]+=(0.854687270134-0.26454745832j)*x[2]**o + ((0.658620239252+0.110744935805j))*x[2]
+            ref[(1, 0, 0, 1)]+=(0.854687270134-0.26454745832j)*x_ref[2]**o + ((0.658620239252+0.110744935805j))*x_ref[2]
+            arg[(1, 0, 0, 2)]+=(0.217163649684-0.590757113928j)*x[2]**o + ((-0.609634371406-0.843219995851j))*x[2]
+            ref[(1, 0, 0, 2)]+=(0.217163649684-0.590757113928j)*x_ref[2]**o + ((-0.609634371406-0.843219995851j))*x_ref[2]
+            arg[(1, 0, 0, 3)]+=(0.623899937079-0.244016424106j)*x[2]**o + ((-0.143276817393+0.42766840593j))*x[2]
+            ref[(1, 0, 0, 3)]+=(0.623899937079-0.244016424106j)*x_ref[2]**o + ((-0.143276817393+0.42766840593j))*x_ref[2]
+            arg[(1, 0, 1, 0)]+=(0.903378883165+0.620471745133j)*x[2]**o + ((-0.915899737082-0.0160572039224j))*x[2]
+            ref[(1, 0, 1, 0)]+=(0.903378883165+0.620471745133j)*x_ref[2]**o + ((-0.915899737082-0.0160572039224j))*x_ref[2]
+            arg[(1, 0, 1, 1)]+=(-0.275007742279+0.763004983145j)*x[2]**o + ((0.699558209694-0.294787582652j))*x[2]
+            ref[(1, 0, 1, 1)]+=(-0.275007742279+0.763004983145j)*x_ref[2]**o + ((0.699558209694-0.294787582652j))*x_ref[2]
+            arg[(1, 0, 1, 2)]+=(0.448714103039+0.784578655161j)*x[2]**o + ((-0.858970361247-0.117172718568j))*x[2]
+            ref[(1, 0, 1, 2)]+=(0.448714103039+0.784578655161j)*x_ref[2]**o + ((-0.858970361247-0.117172718568j))*x_ref[2]
+            arg[(1, 0, 1, 3)]+=(-0.824359431652+0.415834349138j)*x[2]**o + ((0.0638617834207-0.234453179975j))*x[2]
+            ref[(1, 0, 1, 3)]+=(-0.824359431652+0.415834349138j)*x_ref[2]**o + ((0.0638617834207-0.234453179975j))*x_ref[2]
+            arg[(1, 1, 0, 0)]+=(0.639361198862+0.055626564268j)*x[2]**o + ((0.295635101148+0.469053098611j))*x[2]
+            ref[(1, 1, 0, 0)]+=(0.639361198862+0.055626564268j)*x_ref[2]**o + ((0.295635101148+0.469053098611j))*x_ref[2]
+            arg[(1, 1, 0, 1)]+=(-0.00101563697996-0.204844787382j)*x[2]**o + ((-0.286835041296-0.313980212071j))*x[2]
+            ref[(1, 1, 0, 1)]+=(-0.00101563697996-0.204844787382j)*x_ref[2]**o + ((-0.286835041296-0.313980212071j))*x_ref[2]
+            arg[(1, 1, 0, 2)]+=(-0.685222549382-0.547052192628j)*x[2]**o + ((0.341093326022+0.620461855541j))*x[2]
+            ref[(1, 1, 0, 2)]+=(-0.685222549382-0.547052192628j)*x_ref[2]**o + ((0.341093326022+0.620461855541j))*x_ref[2]
+            arg[(1, 1, 0, 3)]+=(-0.15024369321-0.104117102571j)*x[2]**o + ((-0.622901714363+0.548924850339j))*x[2]
+            ref[(1, 1, 0, 3)]+=(-0.15024369321-0.104117102571j)*x_ref[2]**o + ((-0.622901714363+0.548924850339j))*x_ref[2]
+            arg[(1, 1, 1, 0)]+=(0.63811722849+0.39128436229j)*x[2]**o + ((-0.711189081576-0.0721204057588j))*x[2]
+            ref[(1, 1, 1, 0)]+=(0.63811722849+0.39128436229j)*x_ref[2]**o + ((-0.711189081576-0.0721204057588j))*x_ref[2]
+            arg[(1, 1, 1, 1)]+=(-0.230133679856+0.963076469428j)*x[2]**o + ((-0.114526012723+0.411212621096j))*x[2]
+            ref[(1, 1, 1, 1)]+=(-0.230133679856+0.963076469428j)*x_ref[2]**o + ((-0.114526012723+0.411212621096j))*x_ref[2]
+            arg[(1, 1, 1, 2)]+=(-0.427955202144+0.449361195661j)*x[2]**o + ((-0.967050618391+0.109822565545j))*x[2]
+            ref[(1, 1, 1, 2)]+=(-0.427955202144+0.449361195661j)*x_ref[2]**o + ((-0.967050618391+0.109822565545j))*x_ref[2]
+            arg[(1, 1, 1, 3)]+=(-0.874726697059+0.965151532636j)*x[2]**o + ((0.664061458317-0.798261172884j))*x[2]
+            ref[(1, 1, 1, 3)]+=(-0.874726697059+0.965151532636j)*x_ref[2]**o + ((0.664061458317-0.798261172884j))*x_ref[2]
+            arg[(2, 0, 0, 0)]+=(-0.528299670435-0.0472657950018j)*x[2]**o + ((-0.426377148589+0.80350971025j))*x[2]
+            ref[(2, 0, 0, 0)]+=(-0.528299670435-0.0472657950018j)*x_ref[2]**o + ((-0.426377148589+0.80350971025j))*x_ref[2]
+            arg[(2, 0, 0, 1)]+=(0.851236807133-0.458993721048j)*x[2]**o + ((-0.564464007597+0.925184476549j))*x[2]
+            ref[(2, 0, 0, 1)]+=(0.851236807133-0.458993721048j)*x_ref[2]**o + ((-0.564464007597+0.925184476549j))*x_ref[2]
+            arg[(2, 0, 0, 2)]+=(-0.756171319499-0.0210893710749j)*x[2]**o + ((0.796900830611-0.267661864814j))*x[2]
+            ref[(2, 0, 0, 2)]+=(-0.756171319499-0.0210893710749j)*x_ref[2]**o + ((0.796900830611-0.267661864814j))*x_ref[2]
+            arg[(2, 0, 0, 3)]+=(-0.0744303563074-0.441423858625j)*x[2]**o + ((-0.00865410631329+0.495665500844j))*x[2]
+            ref[(2, 0, 0, 3)]+=(-0.0744303563074-0.441423858625j)*x_ref[2]**o + ((-0.00865410631329+0.495665500844j))*x_ref[2]
+            arg[(2, 0, 1, 0)]+=(-0.032296796225+0.646067111174j)*x[2]**o + ((-0.33479484992-0.764273289931j))*x[2]
+            ref[(2, 0, 1, 0)]+=(-0.032296796225+0.646067111174j)*x_ref[2]**o + ((-0.33479484992-0.764273289931j))*x_ref[2]
+            arg[(2, 0, 1, 1)]+=(-0.995021175395-0.773963007428j)*x[2]**o + ((0.431899295822-0.182986861188j))*x[2]
+            ref[(2, 0, 1, 1)]+=(-0.995021175395-0.773963007428j)*x_ref[2]**o + ((0.431899295822-0.182986861188j))*x_ref[2]
+            arg[(2, 0, 1, 2)]+=(-0.900149766828-0.0894775030338j)*x[2]**o + ((-0.251893681265-0.782897989005j))*x[2]
+            ref[(2, 0, 1, 2)]+=(-0.900149766828-0.0894775030338j)*x_ref[2]**o + ((-0.251893681265-0.782897989005j))*x_ref[2]
+            arg[(2, 0, 1, 3)]+=(0.982691681136+0.508234560543j)*x[2]**o + ((-0.421107608812+0.920281374887j))*x[2]
+            ref[(2, 0, 1, 3)]+=(0.982691681136+0.508234560543j)*x_ref[2]**o + ((-0.421107608812+0.920281374887j))*x_ref[2]
+            arg[(2, 1, 0, 0)]+=(0.778380485405-0.902005146906j)*x[2]**o + ((0.671691181095-0.829078443579j))*x[2]
+            ref[(2, 1, 0, 0)]+=(0.778380485405-0.902005146906j)*x_ref[2]**o + ((0.671691181095-0.829078443579j))*x_ref[2]
+            arg[(2, 1, 0, 1)]+=(0.839445240446-0.80099811079j)*x[2]**o + ((-0.761259316122-0.371755683901j))*x[2]
+            ref[(2, 1, 0, 1)]+=(0.839445240446-0.80099811079j)*x_ref[2]**o + ((-0.761259316122-0.371755683901j))*x_ref[2]
+            arg[(2, 1, 0, 2)]+=(0.663709372898+0.458502914528j)*x[2]**o + ((0.441063674466+0.282926006341j))*x[2]
+            ref[(2, 1, 0, 2)]+=(0.663709372898+0.458502914528j)*x_ref[2]**o + ((0.441063674466+0.282926006341j))*x_ref[2]
+            arg[(2, 1, 0, 3)]+=(0.310399336681+0.784236292904j)*x[2]**o + ((0.265262618611+0.716109364983j))*x[2]
+            ref[(2, 1, 0, 3)]+=(0.310399336681+0.784236292904j)*x_ref[2]**o + ((0.265262618611+0.716109364983j))*x_ref[2]
+            arg[(2, 1, 1, 0)]+=(0.534690941967-0.414387438003j)*x[2]**o + ((0.803702644273-0.895115536341j))*x[2]
+            ref[(2, 1, 1, 0)]+=(0.534690941967-0.414387438003j)*x_ref[2]**o + ((0.803702644273-0.895115536341j))*x_ref[2]
+            arg[(2, 1, 1, 1)]+=(0.442851857409+0.209847475252j)*x[2]**o + ((-0.0567750232328+0.508772780591j))*x[2]
+            ref[(2, 1, 1, 1)]+=(0.442851857409+0.209847475252j)*x_ref[2]**o + ((-0.0567750232328+0.508772780591j))*x_ref[2]
+            arg[(2, 1, 1, 2)]+=(-0.45789131396-0.230451880822j)*x[2]**o + ((-0.471838738674+0.0233645559148j))*x[2]
+            ref[(2, 1, 1, 2)]+=(-0.45789131396-0.230451880822j)*x_ref[2]**o + ((-0.471838738674+0.0233645559148j))*x_ref[2]
+            arg[(2, 1, 1, 3)]+=(0.95275059126+0.770235410868j)*x[2]**o + ((0.765759754812+0.348066160022j))*x[2]
+            ref[(2, 1, 1, 3)]+=(0.95275059126+0.770235410868j)*x_ref[2]**o + ((0.765759754812+0.348066160022j))*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.496293055965*x[0]**o + (0.694272666174)*x[0] + (-0.204425386198)*x[1]**o + (-0.337643671873)*x[1]
+        ref=-0.496293055965*x_ref[0]**o + (0.694272666174)*x_ref[0] + (-0.204425386198)*x_ref[1]**o + (-0.337643671873)*x_ref[1]
+        if dim==3:
+            arg+=(-0.483640149629)*x[2]**o + (-0.973006887818)*x[2]
+            ref+=(-0.483640149629)*x_ref[2]**o + (-0.973006887818)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.347351574961*x[0]**o + (-0.310196909069)*x[0] + (-0.754060834395)*x[1]**o + (0.123778850776)*x[1]
+        ref[(0,)]=0.347351574961*x_ref[0]**o + (-0.310196909069)*x_ref[0] + (-0.754060834395)*x_ref[1]**o + (0.123778850776)*x_ref[1]
+        arg[(1,)]=0.74234361358*x[0]**o + (-0.391864436935)*x[0] + (-0.44699633081)*x[1]**o + (0.492111349231)*x[1]
+        ref[(1,)]=0.74234361358*x_ref[0]**o + (-0.391864436935)*x_ref[0] + (-0.44699633081)*x_ref[1]**o + (0.492111349231)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.0349385089555*x[2]**o + (-0.472105342431)*x[2]
+            ref[(0,)]+=-0.0349385089555*x_ref[2]**o + (-0.472105342431)*x_ref[2]
+            arg[(1,)]+=0.513823619574*x[2]**o + (-0.660955070184)*x[2]
+            ref[(1,)]+=0.513823619574*x_ref[2]**o + (-0.660955070184)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=0.989759207653*x[0]**o + (0.0700648711543)*x[0] + (-0.618174472904)*x[1]**o + (-0.477782948311)*x[1]
+        ref[(0, 0)]=0.989759207653*x_ref[0]**o + (0.0700648711543)*x_ref[0] + (-0.618174472904)*x_ref[1]**o + (-0.477782948311)*x_ref[1]
+        arg[(0, 1)]=0.065033514999*x[0]**o + (-0.0219974060287)*x[0] + (-0.540747004161)*x[1]**o + (0.327620239621)*x[1]
+        ref[(0, 1)]=0.065033514999*x_ref[0]**o + (-0.0219974060287)*x_ref[0] + (-0.540747004161)*x_ref[1]**o + (0.327620239621)*x_ref[1]
+        arg[(0, 2)]=-0.591362434136*x[0]**o + (0.700759681996)*x[0] + (-0.461023810937)*x[1]**o + (0.287847477619)*x[1]
+        ref[(0, 2)]=-0.591362434136*x_ref[0]**o + (0.700759681996)*x_ref[0] + (-0.461023810937)*x_ref[1]**o + (0.287847477619)*x_ref[1]
+        arg[(0, 3)]=0.199899775132*x[0]**o + (-0.597380871279)*x[0] + (-0.192486880386)*x[1]**o + (0.987507116508)*x[1]
+        ref[(0, 3)]=0.199899775132*x_ref[0]**o + (-0.597380871279)*x_ref[0] + (-0.192486880386)*x_ref[1]**o + (0.987507116508)*x_ref[1]
+        arg[(1, 0)]=-0.56739968985*x[0]**o + (-0.663849866616)*x[0] + (0.799521793876)*x[1]**o + (-0.709293993532)*x[1]
+        ref[(1, 0)]=-0.56739968985*x_ref[0]**o + (-0.663849866616)*x_ref[0] + (0.799521793876)*x_ref[1]**o + (-0.709293993532)*x_ref[1]
+        arg[(1, 1)]=0.888990734713*x[0]**o + (0.0339112621023)*x[0] + (-0.789637745683)*x[1]**o + (0.718877341956)*x[1]
+        ref[(1, 1)]=0.888990734713*x_ref[0]**o + (0.0339112621023)*x_ref[0] + (-0.789637745683)*x_ref[1]**o + (0.718877341956)*x_ref[1]
+        arg[(1, 2)]=0.0997757227373*x[0]**o + (-0.657811280162)*x[0] + (0.294722832921)*x[1]**o + (0.0162290029711)*x[1]
+        ref[(1, 2)]=0.0997757227373*x_ref[0]**o + (-0.657811280162)*x_ref[0] + (0.294722832921)*x_ref[1]**o + (0.0162290029711)*x_ref[1]
+        arg[(1, 3)]=-0.298242751226*x[0]**o + (0.112708165827)*x[0] + (0.696354423334)*x[1]**o + (0.74290460909)*x[1]
+        ref[(1, 3)]=-0.298242751226*x_ref[0]**o + (0.112708165827)*x_ref[0] + (0.696354423334)*x_ref[1]**o + (0.74290460909)*x_ref[1]
+        arg[(2, 0)]=-0.999457841546*x[0]**o + (-0.560504464515)*x[0] + (0.965775282055)*x[1]**o + (-0.44212600876)*x[1]
+        ref[(2, 0)]=-0.999457841546*x_ref[0]**o + (-0.560504464515)*x_ref[0] + (0.965775282055)*x_ref[1]**o + (-0.44212600876)*x_ref[1]
+        arg[(2, 1)]=-0.820812526394*x[0]**o + (-0.0211350153416)*x[0] + (-0.877258346056)*x[1]**o + (-0.857639556281)*x[1]
+        ref[(2, 1)]=-0.820812526394*x_ref[0]**o + (-0.0211350153416)*x_ref[0] + (-0.877258346056)*x_ref[1]**o + (-0.857639556281)*x_ref[1]
+        arg[(2, 2)]=-0.507251536513*x[0]**o + (-0.177884447976)*x[0] + (-0.929301371104)*x[1]**o + (0.39870579869)*x[1]
+        ref[(2, 2)]=-0.507251536513*x_ref[0]**o + (-0.177884447976)*x_ref[0] + (-0.929301371104)*x_ref[1]**o + (0.39870579869)*x_ref[1]
+        arg[(2, 3)]=0.289934018226*x[0]**o + (-0.0903453749639)*x[0] + (-0.527244853519)*x[1]**o + (0.566285045804)*x[1]
+        ref[(2, 3)]=0.289934018226*x_ref[0]**o + (-0.0903453749639)*x_ref[0] + (-0.527244853519)*x_ref[1]**o + (0.566285045804)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.713051565487*x[2]**o + (-0.218375255504)*x[2]
+            ref[(0, 0)]+=0.713051565487*x_ref[2]**o + (-0.218375255504)*x_ref[2]
+            arg[(0, 1)]+=0.305013896532*x[2]**o + (0.875899562008)*x[2]
+            ref[(0, 1)]+=0.305013896532*x_ref[2]**o + (0.875899562008)*x_ref[2]
+            arg[(0, 2)]+=-0.218075645195*x[2]**o + (0.507983482168)*x[2]
+            ref[(0, 2)]+=-0.218075645195*x_ref[2]**o + (0.507983482168)*x_ref[2]
+            arg[(0, 3)]+=-0.440702279308*x[2]**o + (0.324072617697)*x[2]
+            ref[(0, 3)]+=-0.440702279308*x_ref[2]**o + (0.324072617697)*x_ref[2]
+            arg[(1, 0)]+=0.473741423834*x[2]**o + (0.286939874679)*x[2]
+            ref[(1, 0)]+=0.473741423834*x_ref[2]**o + (0.286939874679)*x_ref[2]
+            arg[(1, 1)]+=0.767149811337*x[2]**o + (0.549996245622)*x[2]
+            ref[(1, 1)]+=0.767149811337*x_ref[2]**o + (0.549996245622)*x_ref[2]
+            arg[(1, 2)]+=-0.248077988461*x[2]**o + (-0.359321780574)*x[2]
+            ref[(1, 2)]+=-0.248077988461*x_ref[2]**o + (-0.359321780574)*x_ref[2]
+            arg[(1, 3)]+=0.351096305451*x[2]**o + (0.632947000545)*x[2]
+            ref[(1, 3)]+=0.351096305451*x_ref[2]**o + (0.632947000545)*x_ref[2]
+            arg[(2, 0)]+=-0.996152672599*x[2]**o + (0.639437104336)*x[2]
+            ref[(2, 0)]+=-0.996152672599*x_ref[2]**o + (0.639437104336)*x_ref[2]
+            arg[(2, 1)]+=0.998788297272*x[2]**o + (0.685677181874)*x[2]
+            ref[(2, 1)]+=0.998788297272*x_ref[2]**o + (0.685677181874)*x_ref[2]
+            arg[(2, 2)]+=0.495889607309*x[2]**o + (0.849453251708)*x[2]
+            ref[(2, 2)]+=0.495889607309*x_ref[2]**o + (0.849453251708)*x_ref[2]
+            arg[(2, 3)]+=0.667488685931*x[2]**o + (0.400227632924)*x[2]
+            ref[(2, 3)]+=0.667488685931*x_ref[2]**o + (0.400227632924)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 4),w)
+        ref = Data(0,(3, 2, 4),w_ref)
+        arg[(0, 0, 0)]=0.924799364241*x[0]**o + (0.555151222671)*x[0] + (0.534347269823)*x[1]**o + (0.982739972998)*x[1]
+        ref[(0, 0, 0)]=0.924799364241*x_ref[0]**o + (0.555151222671)*x_ref[0] + (0.534347269823)*x_ref[1]**o + (0.982739972998)*x_ref[1]
+        arg[(0, 0, 1)]=-0.44717845639*x[0]**o + (-0.907146018673)*x[0] + (-0.154880964161)*x[1]**o + (0.805551622573)*x[1]
+        ref[(0, 0, 1)]=-0.44717845639*x_ref[0]**o + (-0.907146018673)*x_ref[0] + (-0.154880964161)*x_ref[1]**o + (0.805551622573)*x_ref[1]
+        arg[(0, 0, 2)]=-0.954485390883*x[0]**o + (-0.291173165878)*x[0] + (0.50225410496)*x[1]**o + (-0.976238559353)*x[1]
+        ref[(0, 0, 2)]=-0.954485390883*x_ref[0]**o + (-0.291173165878)*x_ref[0] + (0.50225410496)*x_ref[1]**o + (-0.976238559353)*x_ref[1]
+        arg[(0, 0, 3)]=-0.256453815586*x[0]**o + (-0.707670102563)*x[0] + (0.320745376548)*x[1]**o + (-0.255307288951)*x[1]
+        ref[(0, 0, 3)]=-0.256453815586*x_ref[0]**o + (-0.707670102563)*x_ref[0] + (0.320745376548)*x_ref[1]**o + (-0.255307288951)*x_ref[1]
+        arg[(0, 1, 0)]=-0.842054762011*x[0]**o + (0.275665588698)*x[0] + (0.233388589558)*x[1]**o + (-0.73983134446)*x[1]
+        ref[(0, 1, 0)]=-0.842054762011*x_ref[0]**o + (0.275665588698)*x_ref[0] + (0.233388589558)*x_ref[1]**o + (-0.73983134446)*x_ref[1]
+        arg[(0, 1, 1)]=0.78931876994*x[0]**o + (-0.0804759829226)*x[0] + (0.594310485563)*x[1]**o + (0.775296414202)*x[1]
+        ref[(0, 1, 1)]=0.78931876994*x_ref[0]**o + (-0.0804759829226)*x_ref[0] + (0.594310485563)*x_ref[1]**o + (0.775296414202)*x_ref[1]
+        arg[(0, 1, 2)]=0.483618451977*x[0]**o + (0.282441129596)*x[0] + (-0.662810314694)*x[1]**o + (0.166398803308)*x[1]
+        ref[(0, 1, 2)]=0.483618451977*x_ref[0]**o + (0.282441129596)*x_ref[0] + (-0.662810314694)*x_ref[1]**o + (0.166398803308)*x_ref[1]
+        arg[(0, 1, 3)]=-0.687454378877*x[0]**o + (-0.424278509666)*x[0] + (-0.977262527098)*x[1]**o + (-0.451220633193)*x[1]
+        ref[(0, 1, 3)]=-0.687454378877*x_ref[0]**o + (-0.424278509666)*x_ref[0] + (-0.977262527098)*x_ref[1]**o + (-0.451220633193)*x_ref[1]
+        arg[(1, 0, 0)]=0.646772353859*x[0]**o + (-0.521717938369)*x[0] + (0.36070161786)*x[1]**o + (0.101258891473)*x[1]
+        ref[(1, 0, 0)]=0.646772353859*x_ref[0]**o + (-0.521717938369)*x_ref[0] + (0.36070161786)*x_ref[1]**o + (0.101258891473)*x_ref[1]
+        arg[(1, 0, 1)]=-0.0403355924908*x[0]**o + (-0.015896821726)*x[0] + (-0.316335421566)*x[1]**o + (-0.586619016288)*x[1]
+        ref[(1, 0, 1)]=-0.0403355924908*x_ref[0]**o + (-0.015896821726)*x_ref[0] + (-0.316335421566)*x_ref[1]**o + (-0.586619016288)*x_ref[1]
+        arg[(1, 0, 2)]=0.129901378834*x[0]**o + (0.583010352639)*x[0] + (0.809945126343)*x[1]**o + (0.0699860004062)*x[1]
+        ref[(1, 0, 2)]=0.129901378834*x_ref[0]**o + (0.583010352639)*x_ref[0] + (0.809945126343)*x_ref[1]**o + (0.0699860004062)*x_ref[1]
+        arg[(1, 0, 3)]=0.684415878116*x[0]**o + (0.711268129746)*x[0] + (0.964451661026)*x[1]**o + (0.32924804732)*x[1]
+        ref[(1, 0, 3)]=0.684415878116*x_ref[0]**o + (0.711268129746)*x_ref[0] + (0.964451661026)*x_ref[1]**o + (0.32924804732)*x_ref[1]
+        arg[(1, 1, 0)]=-0.497668778831*x[0]**o + (-0.155571112514)*x[0] + (0.718362546497)*x[1]**o + (-0.00349203305051)*x[1]
+        ref[(1, 1, 0)]=-0.497668778831*x_ref[0]**o + (-0.155571112514)*x_ref[0] + (0.718362546497)*x_ref[1]**o + (-0.00349203305051)*x_ref[1]
+        arg[(1, 1, 1)]=-0.221044253523*x[0]**o + (0.947057846096)*x[0] + (0.4005427643)*x[1]**o + (0.315429405162)*x[1]
+        ref[(1, 1, 1)]=-0.221044253523*x_ref[0]**o + (0.947057846096)*x_ref[0] + (0.4005427643)*x_ref[1]**o + (0.315429405162)*x_ref[1]
+        arg[(1, 1, 2)]=0.362292126095*x[0]**o + (-0.819413458597)*x[0] + (0.354755953107)*x[1]**o + (0.889230260869)*x[1]
+        ref[(1, 1, 2)]=0.362292126095*x_ref[0]**o + (-0.819413458597)*x_ref[0] + (0.354755953107)*x_ref[1]**o + (0.889230260869)*x_ref[1]
+        arg[(1, 1, 3)]=0.908915568763*x[0]**o + (-0.724212958126)*x[0] + (-0.999442993627)*x[1]**o + (-0.59333775921)*x[1]
+        ref[(1, 1, 3)]=0.908915568763*x_ref[0]**o + (-0.724212958126)*x_ref[0] + (-0.999442993627)*x_ref[1]**o + (-0.59333775921)*x_ref[1]
+        arg[(2, 0, 0)]=-0.915186216489*x[0]**o + (-0.284944794056)*x[0] + (-0.332432652589)*x[1]**o + (0.268319569841)*x[1]
+        ref[(2, 0, 0)]=-0.915186216489*x_ref[0]**o + (-0.284944794056)*x_ref[0] + (-0.332432652589)*x_ref[1]**o + (0.268319569841)*x_ref[1]
+        arg[(2, 0, 1)]=0.327795220374*x[0]**o + (0.0659213886528)*x[0] + (-0.258850555643)*x[1]**o + (0.336595379751)*x[1]
+        ref[(2, 0, 1)]=0.327795220374*x_ref[0]**o + (0.0659213886528)*x_ref[0] + (-0.258850555643)*x_ref[1]**o + (0.336595379751)*x_ref[1]
+        arg[(2, 0, 2)]=0.167248900691*x[0]**o + (0.955467922325)*x[0] + (-0.955305453489)*x[1]**o + (0.541113227704)*x[1]
+        ref[(2, 0, 2)]=0.167248900691*x_ref[0]**o + (0.955467922325)*x_ref[0] + (-0.955305453489)*x_ref[1]**o + (0.541113227704)*x_ref[1]
+        arg[(2, 0, 3)]=0.68390453088*x[0]**o + (0.292909028481)*x[0] + (0.402078844281)*x[1]**o + (0.129825109596)*x[1]
+        ref[(2, 0, 3)]=0.68390453088*x_ref[0]**o + (0.292909028481)*x_ref[0] + (0.402078844281)*x_ref[1]**o + (0.129825109596)*x_ref[1]
+        arg[(2, 1, 0)]=0.375612617185*x[0]**o + (0.395594752801)*x[0] + (-0.841338299835)*x[1]**o + (-0.986080354252)*x[1]
+        ref[(2, 1, 0)]=0.375612617185*x_ref[0]**o + (0.395594752801)*x_ref[0] + (-0.841338299835)*x_ref[1]**o + (-0.986080354252)*x_ref[1]
+        arg[(2, 1, 1)]=-0.651939383484*x[0]**o + (-0.620939103677)*x[0] + (0.108412374487)*x[1]**o + (0.803907773614)*x[1]
+        ref[(2, 1, 1)]=-0.651939383484*x_ref[0]**o + (-0.620939103677)*x_ref[0] + (0.108412374487)*x_ref[1]**o + (0.803907773614)*x_ref[1]
+        arg[(2, 1, 2)]=0.785323929571*x[0]**o + (-0.184512655773)*x[0] + (0.659683359218)*x[1]**o + (0.323886295092)*x[1]
+        ref[(2, 1, 2)]=0.785323929571*x_ref[0]**o + (-0.184512655773)*x_ref[0] + (0.659683359218)*x_ref[1]**o + (0.323886295092)*x_ref[1]
+        arg[(2, 1, 3)]=-0.784564101185*x[0]**o + (0.40455125374)*x[0] + (0.139201672286)*x[1]**o + (0.0650663377343)*x[1]
+        ref[(2, 1, 3)]=-0.784564101185*x_ref[0]**o + (0.40455125374)*x_ref[0] + (0.139201672286)*x_ref[1]**o + (0.0650663377343)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.75137023204*x[2]**o + (-0.00248633653983)*x[2]
+            ref[(0, 0, 0)]+=-0.75137023204*x_ref[2]**o + (-0.00248633653983)*x_ref[2]
+            arg[(0, 0, 1)]+=0.262704936793*x[2]**o + (-0.443294998801)*x[2]
+            ref[(0, 0, 1)]+=0.262704936793*x_ref[2]**o + (-0.443294998801)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.950959868018*x[2]**o + (0.890630203212)*x[2]
+            ref[(0, 0, 2)]+=-0.950959868018*x_ref[2]**o + (0.890630203212)*x_ref[2]
+            arg[(0, 0, 3)]+=0.577280098152*x[2]**o + (-0.37091438533)*x[2]
+            ref[(0, 0, 3)]+=0.577280098152*x_ref[2]**o + (-0.37091438533)*x_ref[2]
+            arg[(0, 1, 0)]+=0.503696959589*x[2]**o + (0.317215632952)*x[2]
+            ref[(0, 1, 0)]+=0.503696959589*x_ref[2]**o + (0.317215632952)*x_ref[2]
+            arg[(0, 1, 1)]+=0.0604400091243*x[2]**o + (-0.510617912321)*x[2]
+            ref[(0, 1, 1)]+=0.0604400091243*x_ref[2]**o + (-0.510617912321)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.98787272887*x[2]**o + (0.717849240685)*x[2]
+            ref[(0, 1, 2)]+=-0.98787272887*x_ref[2]**o + (0.717849240685)*x_ref[2]
+            arg[(0, 1, 3)]+=-0.828184365599*x[2]**o + (0.926187322187)*x[2]
+            ref[(0, 1, 3)]+=-0.828184365599*x_ref[2]**o + (0.926187322187)*x_ref[2]
+            arg[(1, 0, 0)]+=0.181556750208*x[2]**o + (-0.715956167193)*x[2]
+            ref[(1, 0, 0)]+=0.181556750208*x_ref[2]**o + (-0.715956167193)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.168320731582*x[2]**o + (0.255736279366)*x[2]
+            ref[(1, 0, 1)]+=-0.168320731582*x_ref[2]**o + (0.255736279366)*x_ref[2]
+            arg[(1, 0, 2)]+=0.61027188121*x[2]**o + (0.465083973258)*x[2]
+            ref[(1, 0, 2)]+=0.61027188121*x_ref[2]**o + (0.465083973258)*x_ref[2]
+            arg[(1, 0, 3)]+=-0.00857484696968*x[2]**o + (-0.392741852924)*x[2]
+            ref[(1, 0, 3)]+=-0.00857484696968*x_ref[2]**o + (-0.392741852924)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.138991056545*x[2]**o + (-0.029315446876)*x[2]
+            ref[(1, 1, 0)]+=-0.138991056545*x_ref[2]**o + (-0.029315446876)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.106726298334*x[2]**o + (-0.94865679226)*x[2]
+            ref[(1, 1, 1)]+=-0.106726298334*x_ref[2]**o + (-0.94865679226)*x_ref[2]
+            arg[(1, 1, 2)]+=-0.931478162337*x[2]**o + (-0.332339826355)*x[2]
+            ref[(1, 1, 2)]+=-0.931478162337*x_ref[2]**o + (-0.332339826355)*x_ref[2]
+            arg[(1, 1, 3)]+=0.173461208569*x[2]**o + (0.175563513513)*x[2]
+            ref[(1, 1, 3)]+=0.173461208569*x_ref[2]**o + (0.175563513513)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.734457647411*x[2]**o + (0.496553662315)*x[2]
+            ref[(2, 0, 0)]+=-0.734457647411*x_ref[2]**o + (0.496553662315)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.432452687599*x[2]**o + (0.421379165922)*x[2]
+            ref[(2, 0, 1)]+=-0.432452687599*x_ref[2]**o + (0.421379165922)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.167402266167*x[2]**o + (-0.506444741565)*x[2]
+            ref[(2, 0, 2)]+=-0.167402266167*x_ref[2]**o + (-0.506444741565)*x_ref[2]
+            arg[(2, 0, 3)]+=-0.031850653223*x[2]**o + (-0.863729079985)*x[2]
+            ref[(2, 0, 3)]+=-0.031850653223*x_ref[2]**o + (-0.863729079985)*x_ref[2]
+            arg[(2, 1, 0)]+=0.51165882492*x[2]**o + (0.810745924857)*x[2]
+            ref[(2, 1, 0)]+=0.51165882492*x_ref[2]**o + (0.810745924857)*x_ref[2]
+            arg[(2, 1, 1)]+=-0.232096162794*x[2]**o + (0.848420721279)*x[2]
+            ref[(2, 1, 1)]+=-0.232096162794*x_ref[2]**o + (0.848420721279)*x_ref[2]
+            arg[(2, 1, 2)]+=0.335993286842*x[2]**o + (-0.157427434057)*x[2]
+            ref[(2, 1, 2)]+=0.335993286842*x_ref[2]**o + (-0.157427434057)*x_ref[2]
+            arg[(2, 1, 3)]+=-0.442924543209*x[2]**o + (-0.237639010422)*x[2]
+            ref[(2, 1, 3)]+=-0.442924543209*x_ref[2]**o + (-0.237639010422)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 2, 4),w)
+        ref = Data(0,(4, 2, 2, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.505464533471*x[0]**o + (-0.516430003189)*x[0] + (0.028115903117)*x[1]**o + (0.677954210495)*x[1]
+        ref[(0, 0, 0, 0)]=0.505464533471*x_ref[0]**o + (-0.516430003189)*x_ref[0] + (0.028115903117)*x_ref[1]**o + (0.677954210495)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.650848681572*x[0]**o + (-0.219736925135)*x[0] + (-0.00223408551541)*x[1]**o + (-0.596876300832)*x[1]
+        ref[(0, 0, 0, 1)]=0.650848681572*x_ref[0]**o + (-0.219736925135)*x_ref[0] + (-0.00223408551541)*x_ref[1]**o + (-0.596876300832)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.988361463321*x[0]**o + (0.695970589919)*x[0] + (0.358417062679)*x[1]**o + (0.720862389032)*x[1]
+        ref[(0, 0, 0, 2)]=-0.988361463321*x_ref[0]**o + (0.695970589919)*x_ref[0] + (0.358417062679)*x_ref[1]**o + (0.720862389032)*x_ref[1]
+        arg[(0, 0, 0, 3)]=-0.686315096707*x[0]**o + (-0.757259071413)*x[0] + (0.238809396088)*x[1]**o + (-0.712005919165)*x[1]
+        ref[(0, 0, 0, 3)]=-0.686315096707*x_ref[0]**o + (-0.757259071413)*x_ref[0] + (0.238809396088)*x_ref[1]**o + (-0.712005919165)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.279029080602*x[0]**o + (-0.440324222718)*x[0] + (0.352578265082)*x[1]**o + (0.426162668942)*x[1]
+        ref[(0, 0, 1, 0)]=0.279029080602*x_ref[0]**o + (-0.440324222718)*x_ref[0] + (0.352578265082)*x_ref[1]**o + (0.426162668942)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.597250216079*x[0]**o + (-0.539703740398)*x[0] + (-0.361824886463)*x[1]**o + (0.0741840260161)*x[1]
+        ref[(0, 0, 1, 1)]=0.597250216079*x_ref[0]**o + (-0.539703740398)*x_ref[0] + (-0.361824886463)*x_ref[1]**o + (0.0741840260161)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.372020994644*x[0]**o + (-0.420132552274)*x[0] + (0.296956588603)*x[1]**o + (-0.283794435185)*x[1]
+        ref[(0, 0, 1, 2)]=0.372020994644*x_ref[0]**o + (-0.420132552274)*x_ref[0] + (0.296956588603)*x_ref[1]**o + (-0.283794435185)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.794988045405*x[0]**o + (-0.105311654213)*x[0] + (-0.626262091618)*x[1]**o + (0.286693827955)*x[1]
+        ref[(0, 0, 1, 3)]=-0.794988045405*x_ref[0]**o + (-0.105311654213)*x_ref[0] + (-0.626262091618)*x_ref[1]**o + (0.286693827955)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.0574537701324*x[0]**o + (0.992240752726)*x[0] + (-0.683102195673)*x[1]**o + (0.978490121878)*x[1]
+        ref[(0, 1, 0, 0)]=0.0574537701324*x_ref[0]**o + (0.992240752726)*x_ref[0] + (-0.683102195673)*x_ref[1]**o + (0.978490121878)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.0255665514416*x[0]**o + (-0.113637889566)*x[0] + (-0.457835627489)*x[1]**o + (0.0926006502771)*x[1]
+        ref[(0, 1, 0, 1)]=0.0255665514416*x_ref[0]**o + (-0.113637889566)*x_ref[0] + (-0.457835627489)*x_ref[1]**o + (0.0926006502771)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.958177344056*x[0]**o + (-0.905983154765)*x[0] + (0.520453753393)*x[1]**o + (0.390670481835)*x[1]
+        ref[(0, 1, 0, 2)]=0.958177344056*x_ref[0]**o + (-0.905983154765)*x_ref[0] + (0.520453753393)*x_ref[1]**o + (0.390670481835)*x_ref[1]
+        arg[(0, 1, 0, 3)]=-0.689385615106*x[0]**o + (-0.370787675093)*x[0] + (-0.602697800902)*x[1]**o + (0.349579482468)*x[1]
+        ref[(0, 1, 0, 3)]=-0.689385615106*x_ref[0]**o + (-0.370787675093)*x_ref[0] + (-0.602697800902)*x_ref[1]**o + (0.349579482468)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.334092162898*x[0]**o + (0.310253611256)*x[0] + (0.724559180122)*x[1]**o + (-0.573641366057)*x[1]
+        ref[(0, 1, 1, 0)]=0.334092162898*x_ref[0]**o + (0.310253611256)*x_ref[0] + (0.724559180122)*x_ref[1]**o + (-0.573641366057)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.656551210871*x[0]**o + (-0.813797969025)*x[0] + (0.894923855931)*x[1]**o + (0.574008315456)*x[1]
+        ref[(0, 1, 1, 1)]=-0.656551210871*x_ref[0]**o + (-0.813797969025)*x_ref[0] + (0.894923855931)*x_ref[1]**o + (0.574008315456)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.61099015938*x[0]**o + (-0.459336020633)*x[0] + (0.331681607458)*x[1]**o + (0.938308957193)*x[1]
+        ref[(0, 1, 1, 2)]=-0.61099015938*x_ref[0]**o + (-0.459336020633)*x_ref[0] + (0.331681607458)*x_ref[1]**o + (0.938308957193)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.577736405262*x[0]**o + (0.758519280148)*x[0] + (-0.0120829896576)*x[1]**o + (0.243703877446)*x[1]
+        ref[(0, 1, 1, 3)]=0.577736405262*x_ref[0]**o + (0.758519280148)*x_ref[0] + (-0.0120829896576)*x_ref[1]**o + (0.243703877446)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.289359799798*x[0]**o + (-0.135676518171)*x[0] + (-0.150146562956)*x[1]**o + (-0.741599877958)*x[1]
+        ref[(1, 0, 0, 0)]=-0.289359799798*x_ref[0]**o + (-0.135676518171)*x_ref[0] + (-0.150146562956)*x_ref[1]**o + (-0.741599877958)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.524781232562*x[0]**o + (0.0848122182732)*x[0] + (-0.789705131318)*x[1]**o + (-0.737941540598)*x[1]
+        ref[(1, 0, 0, 1)]=-0.524781232562*x_ref[0]**o + (0.0848122182732)*x_ref[0] + (-0.789705131318)*x_ref[1]**o + (-0.737941540598)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.413787854405*x[0]**o + (0.568772402387)*x[0] + (0.793887387151)*x[1]**o + (-0.377539322206)*x[1]
+        ref[(1, 0, 0, 2)]=-0.413787854405*x_ref[0]**o + (0.568772402387)*x_ref[0] + (0.793887387151)*x_ref[1]**o + (-0.377539322206)*x_ref[1]
+        arg[(1, 0, 0, 3)]=0.0827536634256*x[0]**o + (0.266285991473)*x[0] + (-0.03599029315)*x[1]**o + (-0.0499298563263)*x[1]
+        ref[(1, 0, 0, 3)]=0.0827536634256*x_ref[0]**o + (0.266285991473)*x_ref[0] + (-0.03599029315)*x_ref[1]**o + (-0.0499298563263)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.782412191264*x[0]**o + (-0.798926079812)*x[0] + (0.387028430055)*x[1]**o + (0.0964935373959)*x[1]
+        ref[(1, 0, 1, 0)]=-0.782412191264*x_ref[0]**o + (-0.798926079812)*x_ref[0] + (0.387028430055)*x_ref[1]**o + (0.0964935373959)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.671132560604*x[0]**o + (-0.441895622987)*x[0] + (-0.563164044752)*x[1]**o + (0.914356718415)*x[1]
+        ref[(1, 0, 1, 1)]=0.671132560604*x_ref[0]**o + (-0.441895622987)*x_ref[0] + (-0.563164044752)*x_ref[1]**o + (0.914356718415)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.711655890877*x[0]**o + (0.856387345582)*x[0] + (-0.236736156146)*x[1]**o + (-0.601442594697)*x[1]
+        ref[(1, 0, 1, 2)]=-0.711655890877*x_ref[0]**o + (0.856387345582)*x_ref[0] + (-0.236736156146)*x_ref[1]**o + (-0.601442594697)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.869769713326*x[0]**o + (-0.303088988282)*x[0] + (-0.92850873435)*x[1]**o + (-0.198062350456)*x[1]
+        ref[(1, 0, 1, 3)]=0.869769713326*x_ref[0]**o + (-0.303088988282)*x_ref[0] + (-0.92850873435)*x_ref[1]**o + (-0.198062350456)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.394803571042*x[0]**o + (0.990829681267)*x[0] + (-0.213015032527)*x[1]**o + (0.334842083304)*x[1]
+        ref[(1, 1, 0, 0)]=-0.394803571042*x_ref[0]**o + (0.990829681267)*x_ref[0] + (-0.213015032527)*x_ref[1]**o + (0.334842083304)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.192212072202*x[0]**o + (-0.420498094999)*x[0] + (-0.597030712238)*x[1]**o + (-0.0105061048528)*x[1]
+        ref[(1, 1, 0, 1)]=0.192212072202*x_ref[0]**o + (-0.420498094999)*x_ref[0] + (-0.597030712238)*x_ref[1]**o + (-0.0105061048528)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.621075355432*x[0]**o + (-0.255382668813)*x[0] + (-0.283754827206)*x[1]**o + (0.0247312598111)*x[1]
+        ref[(1, 1, 0, 2)]=-0.621075355432*x_ref[0]**o + (-0.255382668813)*x_ref[0] + (-0.283754827206)*x_ref[1]**o + (0.0247312598111)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.886000846395*x[0]**o + (-0.76906057362)*x[0] + (0.29541097983)*x[1]**o + (-0.37512768844)*x[1]
+        ref[(1, 1, 0, 3)]=-0.886000846395*x_ref[0]**o + (-0.76906057362)*x_ref[0] + (0.29541097983)*x_ref[1]**o + (-0.37512768844)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.110110580493*x[0]**o + (0.0141399959414)*x[0] + (0.0238655080256)*x[1]**o + (-0.914167428043)*x[1]
+        ref[(1, 1, 1, 0)]=0.110110580493*x_ref[0]**o + (0.0141399959414)*x_ref[0] + (0.0238655080256)*x_ref[1]**o + (-0.914167428043)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.330409968104*x[0]**o + (-0.227774212429)*x[0] + (-0.902543324116)*x[1]**o + (0.406759913091)*x[1]
+        ref[(1, 1, 1, 1)]=-0.330409968104*x_ref[0]**o + (-0.227774212429)*x_ref[0] + (-0.902543324116)*x_ref[1]**o + (0.406759913091)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.93126178*x[0]**o + (0.502706305526)*x[0] + (-0.645062983092)*x[1]**o + (-0.0594030772081)*x[1]
+        ref[(1, 1, 1, 2)]=-0.93126178*x_ref[0]**o + (0.502706305526)*x_ref[0] + (-0.645062983092)*x_ref[1]**o + (-0.0594030772081)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.636787341615*x[0]**o + (-0.635787082967)*x[0] + (0.758089118573)*x[1]**o + (-0.958384430843)*x[1]
+        ref[(1, 1, 1, 3)]=0.636787341615*x_ref[0]**o + (-0.635787082967)*x_ref[0] + (0.758089118573)*x_ref[1]**o + (-0.958384430843)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.941791578188*x[0]**o + (-0.425697255749)*x[0] + (-0.427594823399)*x[1]**o + (-0.154736155916)*x[1]
+        ref[(2, 0, 0, 0)]=0.941791578188*x_ref[0]**o + (-0.425697255749)*x_ref[0] + (-0.427594823399)*x_ref[1]**o + (-0.154736155916)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.129772098285*x[0]**o + (0.435564838023)*x[0] + (-0.595722776064)*x[1]**o + (0.611528024179)*x[1]
+        ref[(2, 0, 0, 1)]=0.129772098285*x_ref[0]**o + (0.435564838023)*x_ref[0] + (-0.595722776064)*x_ref[1]**o + (0.611528024179)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.74784200726*x[0]**o + (-0.618244679342)*x[0] + (-0.28248935793)*x[1]**o + (0.63620756145)*x[1]
+        ref[(2, 0, 0, 2)]=-0.74784200726*x_ref[0]**o + (-0.618244679342)*x_ref[0] + (-0.28248935793)*x_ref[1]**o + (0.63620756145)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.0454857709101*x[0]**o + (0.272443729834)*x[0] + (-0.737725738384)*x[1]**o + (-0.919507110772)*x[1]
+        ref[(2, 0, 0, 3)]=-0.0454857709101*x_ref[0]**o + (0.272443729834)*x_ref[0] + (-0.737725738384)*x_ref[1]**o + (-0.919507110772)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.0345266357602*x[0]**o + (0.629966975892)*x[0] + (0.130680576934)*x[1]**o + (0.145060972465)*x[1]
+        ref[(2, 0, 1, 0)]=-0.0345266357602*x_ref[0]**o + (0.629966975892)*x_ref[0] + (0.130680576934)*x_ref[1]**o + (0.145060972465)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.611810240055*x[0]**o + (-0.626162425071)*x[0] + (0.554988760791)*x[1]**o + (0.20852471902)*x[1]
+        ref[(2, 0, 1, 1)]=0.611810240055*x_ref[0]**o + (-0.626162425071)*x_ref[0] + (0.554988760791)*x_ref[1]**o + (0.20852471902)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.722692353164*x[0]**o + (-0.324898099113)*x[0] + (0.980262100168)*x[1]**o + (0.62432496211)*x[1]
+        ref[(2, 0, 1, 2)]=-0.722692353164*x_ref[0]**o + (-0.324898099113)*x_ref[0] + (0.980262100168)*x_ref[1]**o + (0.62432496211)*x_ref[1]
+        arg[(2, 0, 1, 3)]=0.176534349621*x[0]**o + (0.763799293575)*x[0] + (0.541814651084)*x[1]**o + (0.734489118851)*x[1]
+        ref[(2, 0, 1, 3)]=0.176534349621*x_ref[0]**o + (0.763799293575)*x_ref[0] + (0.541814651084)*x_ref[1]**o + (0.734489118851)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.591434907337*x[0]**o + (0.711227885548)*x[0] + (-0.818742534154)*x[1]**o + (-0.94683078592)*x[1]
+        ref[(2, 1, 0, 0)]=-0.591434907337*x_ref[0]**o + (0.711227885548)*x_ref[0] + (-0.818742534154)*x_ref[1]**o + (-0.94683078592)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.964667254297*x[0]**o + (-0.953319368173)*x[0] + (0.632296215188)*x[1]**o + (0.648274760283)*x[1]
+        ref[(2, 1, 0, 1)]=-0.964667254297*x_ref[0]**o + (-0.953319368173)*x_ref[0] + (0.632296215188)*x_ref[1]**o + (0.648274760283)*x_ref[1]
+        arg[(2, 1, 0, 2)]=0.121180910893*x[0]**o + (0.527818475233)*x[0] + (-0.417486268113)*x[1]**o + (-0.964446532697)*x[1]
+        ref[(2, 1, 0, 2)]=0.121180910893*x_ref[0]**o + (0.527818475233)*x_ref[0] + (-0.417486268113)*x_ref[1]**o + (-0.964446532697)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.750309465215*x[0]**o + (-0.0324162837316)*x[0] + (-0.184095936709)*x[1]**o + (0.750610176031)*x[1]
+        ref[(2, 1, 0, 3)]=-0.750309465215*x_ref[0]**o + (-0.0324162837316)*x_ref[0] + (-0.184095936709)*x_ref[1]**o + (0.750610176031)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.139387031241*x[0]**o + (-0.0528544020954)*x[0] + (0.750089004022)*x[1]**o + (0.082067987811)*x[1]
+        ref[(2, 1, 1, 0)]=0.139387031241*x_ref[0]**o + (-0.0528544020954)*x_ref[0] + (0.750089004022)*x_ref[1]**o + (0.082067987811)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.110413467048*x[0]**o + (-0.592755687899)*x[0] + (-0.177418531218)*x[1]**o + (0.297766020771)*x[1]
+        ref[(2, 1, 1, 1)]=-0.110413467048*x_ref[0]**o + (-0.592755687899)*x_ref[0] + (-0.177418531218)*x_ref[1]**o + (0.297766020771)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.104698755202*x[0]**o + (0.471091208887)*x[0] + (0.378282319838)*x[1]**o + (-0.0948181046082)*x[1]
+        ref[(2, 1, 1, 2)]=0.104698755202*x_ref[0]**o + (0.471091208887)*x_ref[0] + (0.378282319838)*x_ref[1]**o + (-0.0948181046082)*x_ref[1]
+        arg[(2, 1, 1, 3)]=0.700034280077*x[0]**o + (-0.364434991036)*x[0] + (-0.788764605963)*x[1]**o + (-0.160837175405)*x[1]
+        ref[(2, 1, 1, 3)]=0.700034280077*x_ref[0]**o + (-0.364434991036)*x_ref[0] + (-0.788764605963)*x_ref[1]**o + (-0.160837175405)*x_ref[1]
+        arg[(3, 0, 0, 0)]=-0.568545548654*x[0]**o + (-0.41408499092)*x[0] + (0.663803049217)*x[1]**o + (0.763299804119)*x[1]
+        ref[(3, 0, 0, 0)]=-0.568545548654*x_ref[0]**o + (-0.41408499092)*x_ref[0] + (0.663803049217)*x_ref[1]**o + (0.763299804119)*x_ref[1]
+        arg[(3, 0, 0, 1)]=0.494950503138*x[0]**o + (-0.475028416927)*x[0] + (0.89775898474)*x[1]**o + (-0.273769273813)*x[1]
+        ref[(3, 0, 0, 1)]=0.494950503138*x_ref[0]**o + (-0.475028416927)*x_ref[0] + (0.89775898474)*x_ref[1]**o + (-0.273769273813)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.77234676794*x[0]**o + (0.762797230815)*x[0] + (-0.928861378325)*x[1]**o + (-0.0369650732904)*x[1]
+        ref[(3, 0, 0, 2)]=-0.77234676794*x_ref[0]**o + (0.762797230815)*x_ref[0] + (-0.928861378325)*x_ref[1]**o + (-0.0369650732904)*x_ref[1]
+        arg[(3, 0, 0, 3)]=0.924264462693*x[0]**o + (-0.581519640852)*x[0] + (0.418187610302)*x[1]**o + (-0.880253410427)*x[1]
+        ref[(3, 0, 0, 3)]=0.924264462693*x_ref[0]**o + (-0.581519640852)*x_ref[0] + (0.418187610302)*x_ref[1]**o + (-0.880253410427)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.630923006556*x[0]**o + (0.146050958257)*x[0] + (-0.197099588815)*x[1]**o + (-0.948646314371)*x[1]
+        ref[(3, 0, 1, 0)]=0.630923006556*x_ref[0]**o + (0.146050958257)*x_ref[0] + (-0.197099588815)*x_ref[1]**o + (-0.948646314371)*x_ref[1]
+        arg[(3, 0, 1, 1)]=0.432897767835*x[0]**o + (0.321723686718)*x[0] + (0.379285463747)*x[1]**o + (0.569817952786)*x[1]
+        ref[(3, 0, 1, 1)]=0.432897767835*x_ref[0]**o + (0.321723686718)*x_ref[0] + (0.379285463747)*x_ref[1]**o + (0.569817952786)*x_ref[1]
+        arg[(3, 0, 1, 2)]=0.234327012014*x[0]**o + (0.359325774589)*x[0] + (0.448247496296)*x[1]**o + (-0.537179476937)*x[1]
+        ref[(3, 0, 1, 2)]=0.234327012014*x_ref[0]**o + (0.359325774589)*x_ref[0] + (0.448247496296)*x_ref[1]**o + (-0.537179476937)*x_ref[1]
+        arg[(3, 0, 1, 3)]=0.0852834377433*x[0]**o + (-0.95485627186)*x[0] + (0.255955585868)*x[1]**o + (0.310704190732)*x[1]
+        ref[(3, 0, 1, 3)]=0.0852834377433*x_ref[0]**o + (-0.95485627186)*x_ref[0] + (0.255955585868)*x_ref[1]**o + (0.310704190732)*x_ref[1]
+        arg[(3, 1, 0, 0)]=0.615576392468*x[0]**o + (0.709037274801)*x[0] + (0.0458085392131)*x[1]**o + (-0.533260133428)*x[1]
+        ref[(3, 1, 0, 0)]=0.615576392468*x_ref[0]**o + (0.709037274801)*x_ref[0] + (0.0458085392131)*x_ref[1]**o + (-0.533260133428)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.552149457878*x[0]**o + (0.804005101998)*x[0] + (-0.83345608208)*x[1]**o + (0.627746940367)*x[1]
+        ref[(3, 1, 0, 1)]=0.552149457878*x_ref[0]**o + (0.804005101998)*x_ref[0] + (-0.83345608208)*x_ref[1]**o + (0.627746940367)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.415556494483*x[0]**o + (-0.305524336365)*x[0] + (-0.266592414149)*x[1]**o + (-0.182102860605)*x[1]
+        ref[(3, 1, 0, 2)]=0.415556494483*x_ref[0]**o + (-0.305524336365)*x_ref[0] + (-0.266592414149)*x_ref[1]**o + (-0.182102860605)*x_ref[1]
+        arg[(3, 1, 0, 3)]=-0.214418756253*x[0]**o + (0.439683294369)*x[0] + (0.140125102178)*x[1]**o + (-0.913855149048)*x[1]
+        ref[(3, 1, 0, 3)]=-0.214418756253*x_ref[0]**o + (0.439683294369)*x_ref[0] + (0.140125102178)*x_ref[1]**o + (-0.913855149048)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.194702644276*x[0]**o + (-0.480298296174)*x[0] + (0.116680558101)*x[1]**o + (0.184952768981)*x[1]
+        ref[(3, 1, 1, 0)]=0.194702644276*x_ref[0]**o + (-0.480298296174)*x_ref[0] + (0.116680558101)*x_ref[1]**o + (0.184952768981)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.470818010188*x[0]**o + (-0.434857693308)*x[0] + (-0.0379506670357)*x[1]**o + (0.2592570532)*x[1]
+        ref[(3, 1, 1, 1)]=-0.470818010188*x_ref[0]**o + (-0.434857693308)*x_ref[0] + (-0.0379506670357)*x_ref[1]**o + (0.2592570532)*x_ref[1]
+        arg[(3, 1, 1, 2)]=-0.445221342491*x[0]**o + (-0.62609123163)*x[0] + (-0.91409589232)*x[1]**o + (-0.986185938926)*x[1]
+        ref[(3, 1, 1, 2)]=-0.445221342491*x_ref[0]**o + (-0.62609123163)*x_ref[0] + (-0.91409589232)*x_ref[1]**o + (-0.986185938926)*x_ref[1]
+        arg[(3, 1, 1, 3)]=-0.958814559839*x[0]**o + (0.45369771821)*x[0] + (0.643148932298)*x[1]**o + (-0.200651835701)*x[1]
+        ref[(3, 1, 1, 3)]=-0.958814559839*x_ref[0]**o + (0.45369771821)*x_ref[0] + (0.643148932298)*x_ref[1]**o + (-0.200651835701)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.186679829215*x[2]**o + (0.449079721886)*x[2]
+            ref[(0, 0, 0, 0)]+=0.186679829215*x_ref[2]**o + (0.449079721886)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.898316650723*x[2]**o + (0.52830328064)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.898316650723*x_ref[2]**o + (0.52830328064)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.364797121936*x[2]**o + (-0.140200519673)*x[2]
+            ref[(0, 0, 0, 2)]+=0.364797121936*x_ref[2]**o + (-0.140200519673)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.685599034265*x[2]**o + (0.727055922989)*x[2]
+            ref[(0, 0, 0, 3)]+=0.685599034265*x_ref[2]**o + (0.727055922989)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.35037989926*x[2]**o + (0.358598773222)*x[2]
+            ref[(0, 0, 1, 0)]+=0.35037989926*x_ref[2]**o + (0.358598773222)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.090940679788*x[2]**o + (-0.211851008042)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.090940679788*x_ref[2]**o + (-0.211851008042)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.460079593654*x[2]**o + (-0.0349521592703)*x[2]
+            ref[(0, 0, 1, 2)]+=0.460079593654*x_ref[2]**o + (-0.0349521592703)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.406112693138*x[2]**o + (0.168293725069)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.406112693138*x_ref[2]**o + (0.168293725069)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.234829968356*x[2]**o + (0.353652384202)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.234829968356*x_ref[2]**o + (0.353652384202)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.571184154466*x[2]**o + (-0.756213653071)*x[2]
+            ref[(0, 1, 0, 1)]+=0.571184154466*x_ref[2]**o + (-0.756213653071)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.588742346771*x[2]**o + (-0.878031626125)*x[2]
+            ref[(0, 1, 0, 2)]+=0.588742346771*x_ref[2]**o + (-0.878031626125)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.402771973255*x[2]**o + (0.243960657985)*x[2]
+            ref[(0, 1, 0, 3)]+=0.402771973255*x_ref[2]**o + (0.243960657985)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.0578798516269*x[2]**o + (0.584615896745)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.0578798516269*x_ref[2]**o + (0.584615896745)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.587091288435*x[2]**o + (0.128985935531)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.587091288435*x_ref[2]**o + (0.128985935531)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.00868185566543*x[2]**o + (-0.757410286768)*x[2]
+            ref[(0, 1, 1, 2)]+=0.00868185566543*x_ref[2]**o + (-0.757410286768)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.0102680746376*x[2]**o + (0.741317427742)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.0102680746376*x_ref[2]**o + (0.741317427742)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.872643035062*x[2]**o + (0.402574471797)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.872643035062*x_ref[2]**o + (0.402574471797)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.716360973277*x[2]**o + (-0.7821141977)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.716360973277*x_ref[2]**o + (-0.7821141977)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.558626895858*x[2]**o + (0.881275526712)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.558626895858*x_ref[2]**o + (0.881275526712)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.436283259058*x[2]**o + (0.598936871617)*x[2]
+            ref[(1, 0, 0, 3)]+=0.436283259058*x_ref[2]**o + (0.598936871617)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.843183366182*x[2]**o + (-0.322867304238)*x[2]
+            ref[(1, 0, 1, 0)]+=0.843183366182*x_ref[2]**o + (-0.322867304238)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.611896489791*x[2]**o + (-0.667777468793)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.611896489791*x_ref[2]**o + (-0.667777468793)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.911496041101*x[2]**o + (0.167403546447)*x[2]
+            ref[(1, 0, 1, 2)]+=0.911496041101*x_ref[2]**o + (0.167403546447)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.0189912555767*x[2]**o + (-0.893237826084)*x[2]
+            ref[(1, 0, 1, 3)]+=0.0189912555767*x_ref[2]**o + (-0.893237826084)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.833793332265*x[2]**o + (-0.606117625031)*x[2]
+            ref[(1, 1, 0, 0)]+=0.833793332265*x_ref[2]**o + (-0.606117625031)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.587963895903*x[2]**o + (0.948201498683)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.587963895903*x_ref[2]**o + (0.948201498683)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.543694497229*x[2]**o + (-0.949089706103)*x[2]
+            ref[(1, 1, 0, 2)]+=0.543694497229*x_ref[2]**o + (-0.949089706103)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.811616943156*x[2]**o + (-0.313988329857)*x[2]
+            ref[(1, 1, 0, 3)]+=-0.811616943156*x_ref[2]**o + (-0.313988329857)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.471110361101*x[2]**o + (0.400722815874)*x[2]
+            ref[(1, 1, 1, 0)]+=0.471110361101*x_ref[2]**o + (0.400722815874)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.20760509884*x[2]**o + (0.922415186695)*x[2]
+            ref[(1, 1, 1, 1)]+=0.20760509884*x_ref[2]**o + (0.922415186695)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.0785688769979*x[2]**o + (0.912781827166)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.0785688769979*x_ref[2]**o + (0.912781827166)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=0.171761532881*x[2]**o + (-0.946594683357)*x[2]
+            ref[(1, 1, 1, 3)]+=0.171761532881*x_ref[2]**o + (-0.946594683357)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.149884999849*x[2]**o + (-0.905285079831)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.149884999849*x_ref[2]**o + (-0.905285079831)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.567384157889*x[2]**o + (0.115077848289)*x[2]
+            ref[(2, 0, 0, 1)]+=0.567384157889*x_ref[2]**o + (0.115077848289)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.416508869237*x[2]**o + (-0.0605610809553)*x[2]
+            ref[(2, 0, 0, 2)]+=0.416508869237*x_ref[2]**o + (-0.0605610809553)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=0.275720122862*x[2]**o + (-0.499396740643)*x[2]
+            ref[(2, 0, 0, 3)]+=0.275720122862*x_ref[2]**o + (-0.499396740643)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.183240601363*x[2]**o + (0.32612225929)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.183240601363*x_ref[2]**o + (0.32612225929)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.61497457856*x[2]**o + (-0.743592706959)*x[2]
+            ref[(2, 0, 1, 1)]+=0.61497457856*x_ref[2]**o + (-0.743592706959)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=-0.399235712748*x[2]**o + (-0.1142750833)*x[2]
+            ref[(2, 0, 1, 2)]+=-0.399235712748*x_ref[2]**o + (-0.1142750833)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=-0.333816391859*x[2]**o + (-0.876309758641)*x[2]
+            ref[(2, 0, 1, 3)]+=-0.333816391859*x_ref[2]**o + (-0.876309758641)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.709005884422*x[2]**o + (0.00781547470597)*x[2]
+            ref[(2, 1, 0, 0)]+=0.709005884422*x_ref[2]**o + (0.00781547470597)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.754700211859*x[2]**o + (-0.91745612529)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.754700211859*x_ref[2]**o + (-0.91745612529)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.729509706121*x[2]**o + (-0.181807761334)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.729509706121*x_ref[2]**o + (-0.181807761334)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=-0.122766591419*x[2]**o + (0.734274847166)*x[2]
+            ref[(2, 1, 0, 3)]+=-0.122766591419*x_ref[2]**o + (0.734274847166)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.33607039957*x[2]**o + (-0.203876447822)*x[2]
+            ref[(2, 1, 1, 0)]+=0.33607039957*x_ref[2]**o + (-0.203876447822)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.645937244644*x[2]**o + (0.618733353224)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.645937244644*x_ref[2]**o + (0.618733353224)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.194783107795*x[2]**o + (0.797838497867)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.194783107795*x_ref[2]**o + (0.797838497867)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=-0.276908665683*x[2]**o + (0.593797805951)*x[2]
+            ref[(2, 1, 1, 3)]+=-0.276908665683*x_ref[2]**o + (0.593797805951)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.746765327754*x[2]**o + (0.124993764154)*x[2]
+            ref[(3, 0, 0, 0)]+=0.746765327754*x_ref[2]**o + (0.124993764154)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.357704402072*x[2]**o + (0.756378150597)*x[2]
+            ref[(3, 0, 0, 1)]+=-0.357704402072*x_ref[2]**o + (0.756378150597)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.14972668441*x[2]**o + (-0.275780785752)*x[2]
+            ref[(3, 0, 0, 2)]+=0.14972668441*x_ref[2]**o + (-0.275780785752)*x_ref[2]
+            arg[(3, 0, 0, 3)]+=-0.824387661029*x[2]**o + (-0.394928367409)*x[2]
+            ref[(3, 0, 0, 3)]+=-0.824387661029*x_ref[2]**o + (-0.394928367409)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.633472529879*x[2]**o + (-0.532239984083)*x[2]
+            ref[(3, 0, 1, 0)]+=0.633472529879*x_ref[2]**o + (-0.532239984083)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=-0.103904973087*x[2]**o + (-0.102367718491)*x[2]
+            ref[(3, 0, 1, 1)]+=-0.103904973087*x_ref[2]**o + (-0.102367718491)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=0.869198806155*x[2]**o + (-0.917622128788)*x[2]
+            ref[(3, 0, 1, 2)]+=0.869198806155*x_ref[2]**o + (-0.917622128788)*x_ref[2]
+            arg[(3, 0, 1, 3)]+=-0.351343741392*x[2]**o + (-0.0973790542942)*x[2]
+            ref[(3, 0, 1, 3)]+=-0.351343741392*x_ref[2]**o + (-0.0973790542942)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.352817718698*x[2]**o + (-0.376453668975)*x[2]
+            ref[(3, 1, 0, 0)]+=0.352817718698*x_ref[2]**o + (-0.376453668975)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.0957077746728*x[2]**o + (-0.607993745405)*x[2]
+            ref[(3, 1, 0, 1)]+=0.0957077746728*x_ref[2]**o + (-0.607993745405)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=0.938565900606*x[2]**o + (-0.819704963067)*x[2]
+            ref[(3, 1, 0, 2)]+=0.938565900606*x_ref[2]**o + (-0.819704963067)*x_ref[2]
+            arg[(3, 1, 0, 3)]+=-0.830312767467*x[2]**o + (0.586600271219)*x[2]
+            ref[(3, 1, 0, 3)]+=-0.830312767467*x_ref[2]**o + (0.586600271219)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=0.456086232406*x[2]**o + (-0.847145254252)*x[2]
+            ref[(3, 1, 1, 0)]+=0.456086232406*x_ref[2]**o + (-0.847145254252)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=-0.770260778115*x[2]**o + (-0.306317470595)*x[2]
+            ref[(3, 1, 1, 1)]+=-0.770260778115*x_ref[2]**o + (-0.306317470595)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=-0.00225504986891*x[2]**o + (0.891403064954)*x[2]
+            ref[(3, 1, 1, 2)]+=-0.00225504986891*x_ref[2]**o + (0.891403064954)*x_ref[2]
+            arg[(3, 1, 1, 3)]+=0.831327481617*x[2]**o + (0.435155241294)*x[2]
+            ref[(3, 1, 1, 3)]+=0.831327481617*x_ref[2]**o + (0.435155241294)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.540261074702*x[0]**o + (0.0883068359097)*x[0] + (-0.0826559023575)*x[1]**o + (-0.858296828111)*x[1]
+        ref=-0.540261074702*x_ref[0]**o + (0.0883068359097)*x_ref[0] + (-0.0826559023575)*x_ref[1]**o + (-0.858296828111)*x_ref[1]
+        if dim==3:
+            arg+=(0.640455816004)*x[2]**o + (-0.550686359574)*x[2]
+            ref+=(0.640455816004)*x_ref[2]**o + (-0.550686359574)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.658561003256*x[0]**o + (0.126630489221)*x[0] + (-0.811407243301)*x[1]**o + (0.022511092734)*x[1]
+        ref[(0,)]=0.658561003256*x_ref[0]**o + (0.126630489221)*x_ref[0] + (-0.811407243301)*x_ref[1]**o + (0.022511092734)*x_ref[1]
+        arg[(1,)]=-0.0892217702404*x[0]**o + (-0.142776066067)*x[0] + (0.710756488971)*x[1]**o + (0.344474694936)*x[1]
+        ref[(1,)]=-0.0892217702404*x_ref[0]**o + (-0.142776066067)*x_ref[0] + (0.710756488971)*x_ref[1]**o + (0.344474694936)*x_ref[1]
+        arg[(2,)]=-0.531756962755*x[0]**o + (0.135290164924)*x[0] + (0.93026199894)*x[1]**o + (0.659258746643)*x[1]
+        ref[(2,)]=-0.531756962755*x_ref[0]**o + (0.135290164924)*x_ref[0] + (0.93026199894)*x_ref[1]**o + (0.659258746643)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.173642217135*x[2]**o + (-0.729133498583)*x[2]
+            ref[(0,)]+=0.173642217135*x_ref[2]**o + (-0.729133498583)*x_ref[2]
+            arg[(1,)]+=0.337224300735*x[2]**o + (-0.868754948999)*x[2]
+            ref[(1,)]+=0.337224300735*x_ref[2]**o + (-0.868754948999)*x_ref[2]
+            arg[(2,)]+=-0.291453400548*x[2]**o + (0.238651929012)*x[2]
+            ref[(2,)]+=-0.291453400548*x_ref[2]**o + (0.238651929012)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3),w)
+        ref = Data(0,(3, 3),w_ref)
+        arg[(0, 0)]=-0.422203680613*x[0]**o + (0.958448185259)*x[0] + (-0.00477121400323)*x[1]**o + (0.276583691634)*x[1]
+        ref[(0, 0)]=-0.422203680613*x_ref[0]**o + (0.958448185259)*x_ref[0] + (-0.00477121400323)*x_ref[1]**o + (0.276583691634)*x_ref[1]
+        arg[(0, 1)]=0.0291686007863*x[0]**o + (-0.871850649789)*x[0] + (-0.670990072351)*x[1]**o + (-0.0519551502558)*x[1]
+        ref[(0, 1)]=0.0291686007863*x_ref[0]**o + (-0.871850649789)*x_ref[0] + (-0.670990072351)*x_ref[1]**o + (-0.0519551502558)*x_ref[1]
+        arg[(0, 2)]=0.910323470653*x[0]**o + (0.806430990902)*x[0] + (-0.361745838419)*x[1]**o + (-0.851700640875)*x[1]
+        ref[(0, 2)]=0.910323470653*x_ref[0]**o + (0.806430990902)*x_ref[0] + (-0.361745838419)*x_ref[1]**o + (-0.851700640875)*x_ref[1]
+        arg[(1, 0)]=-0.307634581978*x[0]**o + (0.767453783163)*x[0] + (0.32255534299)*x[1]**o + (0.931465871084)*x[1]
+        ref[(1, 0)]=-0.307634581978*x_ref[0]**o + (0.767453783163)*x_ref[0] + (0.32255534299)*x_ref[1]**o + (0.931465871084)*x_ref[1]
+        arg[(1, 1)]=0.669631087935*x[0]**o + (-0.854112331169)*x[0] + (-0.923840118228)*x[1]**o + (0.893388142862)*x[1]
+        ref[(1, 1)]=0.669631087935*x_ref[0]**o + (-0.854112331169)*x_ref[0] + (-0.923840118228)*x_ref[1]**o + (0.893388142862)*x_ref[1]
+        arg[(1, 2)]=0.699732782472*x[0]**o + (0.209353768172)*x[0] + (-0.9185250375)*x[1]**o + (0.214120989782)*x[1]
+        ref[(1, 2)]=0.699732782472*x_ref[0]**o + (0.209353768172)*x_ref[0] + (-0.9185250375)*x_ref[1]**o + (0.214120989782)*x_ref[1]
+        arg[(2, 0)]=0.120827752834*x[0]**o + (0.352636519945)*x[0] + (0.179446221127)*x[1]**o + (0.691516646669)*x[1]
+        ref[(2, 0)]=0.120827752834*x_ref[0]**o + (0.352636519945)*x_ref[0] + (0.179446221127)*x_ref[1]**o + (0.691516646669)*x_ref[1]
+        arg[(2, 1)]=0.157641154902*x[0]**o + (0.716466507527)*x[0] + (0.477805059052)*x[1]**o + (0.591983908787)*x[1]
+        ref[(2, 1)]=0.157641154902*x_ref[0]**o + (0.716466507527)*x_ref[0] + (0.477805059052)*x_ref[1]**o + (0.591983908787)*x_ref[1]
+        arg[(2, 2)]=-0.259539280743*x[0]**o + (0.0862427307623)*x[0] + (0.57669939865)*x[1]**o + (-0.151339107974)*x[1]
+        ref[(2, 2)]=-0.259539280743*x_ref[0]**o + (0.0862427307623)*x_ref[0] + (0.57669939865)*x_ref[1]**o + (-0.151339107974)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.558543571144*x[2]**o + (-0.436008927886)*x[2]
+            ref[(0, 0)]+=-0.558543571144*x_ref[2]**o + (-0.436008927886)*x_ref[2]
+            arg[(0, 1)]+=-0.834021917376*x[2]**o + (0.272265526922)*x[2]
+            ref[(0, 1)]+=-0.834021917376*x_ref[2]**o + (0.272265526922)*x_ref[2]
+            arg[(0, 2)]+=0.340467724703*x[2]**o + (-0.0177590516255)*x[2]
+            ref[(0, 2)]+=0.340467724703*x_ref[2]**o + (-0.0177590516255)*x_ref[2]
+            arg[(1, 0)]+=-0.205410086352*x[2]**o + (0.136079009667)*x[2]
+            ref[(1, 0)]+=-0.205410086352*x_ref[2]**o + (0.136079009667)*x_ref[2]
+            arg[(1, 1)]+=-0.220783134357*x[2]**o + (0.600754162941)*x[2]
+            ref[(1, 1)]+=-0.220783134357*x_ref[2]**o + (0.600754162941)*x_ref[2]
+            arg[(1, 2)]+=-0.541449261736*x[2]**o + (0.809986925358)*x[2]
+            ref[(1, 2)]+=-0.541449261736*x_ref[2]**o + (0.809986925358)*x_ref[2]
+            arg[(2, 0)]+=-0.0302577132867*x[2]**o + (-0.0498138844137)*x[2]
+            ref[(2, 0)]+=-0.0302577132867*x_ref[2]**o + (-0.0498138844137)*x_ref[2]
+            arg[(2, 1)]+=-0.410142082511*x[2]**o + (-0.57625866176)*x[2]
+            ref[(2, 1)]+=-0.410142082511*x_ref[2]**o + (-0.57625866176)*x_ref[2]
+            arg[(2, 2)]+=-0.0886411733153*x[2]**o + (-0.369388361724)*x[2]
+            ref[(2, 2)]+=-0.0886411733153*x_ref[2]**o + (-0.369388361724)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 4),w)
+        ref = Data(0,(2, 3, 4),w_ref)
+        arg[(0, 0, 0)]=-0.279789445192*x[0]**o + (-0.803004545687)*x[0] + (-0.869867780338)*x[1]**o + (-0.723432397807)*x[1]
+        ref[(0, 0, 0)]=-0.279789445192*x_ref[0]**o + (-0.803004545687)*x_ref[0] + (-0.869867780338)*x_ref[1]**o + (-0.723432397807)*x_ref[1]
+        arg[(0, 0, 1)]=0.452838805204*x[0]**o + (0.163820948706)*x[0] + (0.384522748687)*x[1]**o + (-0.319547933731)*x[1]
+        ref[(0, 0, 1)]=0.452838805204*x_ref[0]**o + (0.163820948706)*x_ref[0] + (0.384522748687)*x_ref[1]**o + (-0.319547933731)*x_ref[1]
+        arg[(0, 0, 2)]=-0.26288656835*x[0]**o + (-0.502010285875)*x[0] + (-0.3952062165)*x[1]**o + (-0.874717758456)*x[1]
+        ref[(0, 0, 2)]=-0.26288656835*x_ref[0]**o + (-0.502010285875)*x_ref[0] + (-0.3952062165)*x_ref[1]**o + (-0.874717758456)*x_ref[1]
+        arg[(0, 0, 3)]=0.491825173849*x[0]**o + (-0.678790742797)*x[0] + (0.17700128393)*x[1]**o + (0.518036429254)*x[1]
+        ref[(0, 0, 3)]=0.491825173849*x_ref[0]**o + (-0.678790742797)*x_ref[0] + (0.17700128393)*x_ref[1]**o + (0.518036429254)*x_ref[1]
+        arg[(0, 1, 0)]=0.706683147488*x[0]**o + (-0.675602053079)*x[0] + (-0.832184834449)*x[1]**o + (-0.514812096121)*x[1]
+        ref[(0, 1, 0)]=0.706683147488*x_ref[0]**o + (-0.675602053079)*x_ref[0] + (-0.832184834449)*x_ref[1]**o + (-0.514812096121)*x_ref[1]
+        arg[(0, 1, 1)]=0.653788702582*x[0]**o + (-0.642446099899)*x[0] + (0.186613816868)*x[1]**o + (-0.55469615811)*x[1]
+        ref[(0, 1, 1)]=0.653788702582*x_ref[0]**o + (-0.642446099899)*x_ref[0] + (0.186613816868)*x_ref[1]**o + (-0.55469615811)*x_ref[1]
+        arg[(0, 1, 2)]=0.93366549883*x[0]**o + (-0.0581840324541)*x[0] + (-0.152961132776)*x[1]**o + (-0.168243018354)*x[1]
+        ref[(0, 1, 2)]=0.93366549883*x_ref[0]**o + (-0.0581840324541)*x_ref[0] + (-0.152961132776)*x_ref[1]**o + (-0.168243018354)*x_ref[1]
+        arg[(0, 1, 3)]=-0.190131849829*x[0]**o + (-0.162662483848)*x[0] + (0.658007193724)*x[1]**o + (0.736221204633)*x[1]
+        ref[(0, 1, 3)]=-0.190131849829*x_ref[0]**o + (-0.162662483848)*x_ref[0] + (0.658007193724)*x_ref[1]**o + (0.736221204633)*x_ref[1]
+        arg[(0, 2, 0)]=-0.100400769735*x[0]**o + (0.609652099041)*x[0] + (-0.925198058624)*x[1]**o + (0.603879642148)*x[1]
+        ref[(0, 2, 0)]=-0.100400769735*x_ref[0]**o + (0.609652099041)*x_ref[0] + (-0.925198058624)*x_ref[1]**o + (0.603879642148)*x_ref[1]
+        arg[(0, 2, 1)]=-0.89392302982*x[0]**o + (-0.957910286934)*x[0] + (-0.524477066769)*x[1]**o + (-0.753952272383)*x[1]
+        ref[(0, 2, 1)]=-0.89392302982*x_ref[0]**o + (-0.957910286934)*x_ref[0] + (-0.524477066769)*x_ref[1]**o + (-0.753952272383)*x_ref[1]
+        arg[(0, 2, 2)]=-0.538833506255*x[0]**o + (-0.811031200904)*x[0] + (0.184578229714)*x[1]**o + (-0.963522621075)*x[1]
+        ref[(0, 2, 2)]=-0.538833506255*x_ref[0]**o + (-0.811031200904)*x_ref[0] + (0.184578229714)*x_ref[1]**o + (-0.963522621075)*x_ref[1]
+        arg[(0, 2, 3)]=0.0732383542822*x[0]**o + (-0.440855214032)*x[0] + (0.791163269323)*x[1]**o + (-0.14083649025)*x[1]
+        ref[(0, 2, 3)]=0.0732383542822*x_ref[0]**o + (-0.440855214032)*x_ref[0] + (0.791163269323)*x_ref[1]**o + (-0.14083649025)*x_ref[1]
+        arg[(1, 0, 0)]=0.433657046246*x[0]**o + (-0.117619259964)*x[0] + (0.851764410042)*x[1]**o + (0.46046376776)*x[1]
+        ref[(1, 0, 0)]=0.433657046246*x_ref[0]**o + (-0.117619259964)*x_ref[0] + (0.851764410042)*x_ref[1]**o + (0.46046376776)*x_ref[1]
+        arg[(1, 0, 1)]=-0.199966480599*x[0]**o + (-0.0178603038091)*x[0] + (0.678994261943)*x[1]**o + (-0.420852548919)*x[1]
+        ref[(1, 0, 1)]=-0.199966480599*x_ref[0]**o + (-0.0178603038091)*x_ref[0] + (0.678994261943)*x_ref[1]**o + (-0.420852548919)*x_ref[1]
+        arg[(1, 0, 2)]=0.176428309221*x[0]**o + (-0.683887093229)*x[0] + (0.74408136267)*x[1]**o + (0.473901127728)*x[1]
+        ref[(1, 0, 2)]=0.176428309221*x_ref[0]**o + (-0.683887093229)*x_ref[0] + (0.74408136267)*x_ref[1]**o + (0.473901127728)*x_ref[1]
+        arg[(1, 0, 3)]=-0.273130116804*x[0]**o + (-0.292874589523)*x[0] + (0.259907250976)*x[1]**o + (0.412804981503)*x[1]
+        ref[(1, 0, 3)]=-0.273130116804*x_ref[0]**o + (-0.292874589523)*x_ref[0] + (0.259907250976)*x_ref[1]**o + (0.412804981503)*x_ref[1]
+        arg[(1, 1, 0)]=-0.630036965325*x[0]**o + (-0.263931878124)*x[0] + (-0.993544770065)*x[1]**o + (-0.440348367461)*x[1]
+        ref[(1, 1, 0)]=-0.630036965325*x_ref[0]**o + (-0.263931878124)*x_ref[0] + (-0.993544770065)*x_ref[1]**o + (-0.440348367461)*x_ref[1]
+        arg[(1, 1, 1)]=0.390594194647*x[0]**o + (0.646890184536)*x[0] + (0.48750253553)*x[1]**o + (-0.842224956724)*x[1]
+        ref[(1, 1, 1)]=0.390594194647*x_ref[0]**o + (0.646890184536)*x_ref[0] + (0.48750253553)*x_ref[1]**o + (-0.842224956724)*x_ref[1]
+        arg[(1, 1, 2)]=-0.869730078171*x[0]**o + (-0.846266679277)*x[0] + (-0.466419247749)*x[1]**o + (0.27868016482)*x[1]
+        ref[(1, 1, 2)]=-0.869730078171*x_ref[0]**o + (-0.846266679277)*x_ref[0] + (-0.466419247749)*x_ref[1]**o + (0.27868016482)*x_ref[1]
+        arg[(1, 1, 3)]=-0.590143257806*x[0]**o + (0.631573043054)*x[0] + (-0.264805478625)*x[1]**o + (-0.0462550488686)*x[1]
+        ref[(1, 1, 3)]=-0.590143257806*x_ref[0]**o + (0.631573043054)*x_ref[0] + (-0.264805478625)*x_ref[1]**o + (-0.0462550488686)*x_ref[1]
+        arg[(1, 2, 0)]=-0.968126526827*x[0]**o + (-0.875816294686)*x[0] + (-0.62516137147)*x[1]**o + (-0.803588020751)*x[1]
+        ref[(1, 2, 0)]=-0.968126526827*x_ref[0]**o + (-0.875816294686)*x_ref[0] + (-0.62516137147)*x_ref[1]**o + (-0.803588020751)*x_ref[1]
+        arg[(1, 2, 1)]=0.737508290988*x[0]**o + (0.138199590331)*x[0] + (0.625770001682)*x[1]**o + (0.682684119159)*x[1]
+        ref[(1, 2, 1)]=0.737508290988*x_ref[0]**o + (0.138199590331)*x_ref[0] + (0.625770001682)*x_ref[1]**o + (0.682684119159)*x_ref[1]
+        arg[(1, 2, 2)]=0.0164384695418*x[0]**o + (-0.00784846187135)*x[0] + (0.228852086666)*x[1]**o + (-0.555999551113)*x[1]
+        ref[(1, 2, 2)]=0.0164384695418*x_ref[0]**o + (-0.00784846187135)*x_ref[0] + (0.228852086666)*x_ref[1]**o + (-0.555999551113)*x_ref[1]
+        arg[(1, 2, 3)]=0.980317518879*x[0]**o + (0.0761238919031)*x[0] + (0.810394224863)*x[1]**o + (0.838590749431)*x[1]
+        ref[(1, 2, 3)]=0.980317518879*x_ref[0]**o + (0.0761238919031)*x_ref[0] + (0.810394224863)*x_ref[1]**o + (0.838590749431)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.743275459123*x[2]**o + (0.613302001512)*x[2]
+            ref[(0, 0, 0)]+=-0.743275459123*x_ref[2]**o + (0.613302001512)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.998083297141*x[2]**o + (-0.370417911613)*x[2]
+            ref[(0, 0, 1)]+=-0.998083297141*x_ref[2]**o + (-0.370417911613)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.148284789061*x[2]**o + (0.084764305618)*x[2]
+            ref[(0, 0, 2)]+=-0.148284789061*x_ref[2]**o + (0.084764305618)*x_ref[2]
+            arg[(0, 0, 3)]+=0.919134535612*x[2]**o + (0.684257559449)*x[2]
+            ref[(0, 0, 3)]+=0.919134535612*x_ref[2]**o + (0.684257559449)*x_ref[2]
+            arg[(0, 1, 0)]+=0.430273164507*x[2]**o + (0.228585035484)*x[2]
+            ref[(0, 1, 0)]+=0.430273164507*x_ref[2]**o + (0.228585035484)*x_ref[2]
+            arg[(0, 1, 1)]+=0.612876446312*x[2]**o + (0.945733694426)*x[2]
+            ref[(0, 1, 1)]+=0.612876446312*x_ref[2]**o + (0.945733694426)*x_ref[2]
+            arg[(0, 1, 2)]+=0.874667145156*x[2]**o + (0.358641085261)*x[2]
+            ref[(0, 1, 2)]+=0.874667145156*x_ref[2]**o + (0.358641085261)*x_ref[2]
+            arg[(0, 1, 3)]+=0.421612822165*x[2]**o + (-0.512102660735)*x[2]
+            ref[(0, 1, 3)]+=0.421612822165*x_ref[2]**o + (-0.512102660735)*x_ref[2]
+            arg[(0, 2, 0)]+=0.0369554524228*x[2]**o + (-0.218165773563)*x[2]
+            ref[(0, 2, 0)]+=0.0369554524228*x_ref[2]**o + (-0.218165773563)*x_ref[2]
+            arg[(0, 2, 1)]+=0.029537372455*x[2]**o + (0.112166689207)*x[2]
+            ref[(0, 2, 1)]+=0.029537372455*x_ref[2]**o + (0.112166689207)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.0590599592105*x[2]**o + (-0.699510624928)*x[2]
+            ref[(0, 2, 2)]+=-0.0590599592105*x_ref[2]**o + (-0.699510624928)*x_ref[2]
+            arg[(0, 2, 3)]+=-0.947456471458*x[2]**o + (0.380574711899)*x[2]
+            ref[(0, 2, 3)]+=-0.947456471458*x_ref[2]**o + (0.380574711899)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.47113042343*x[2]**o + (0.992951373319)*x[2]
+            ref[(1, 0, 0)]+=-0.47113042343*x_ref[2]**o + (0.992951373319)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.641520657397*x[2]**o + (0.504607483865)*x[2]
+            ref[(1, 0, 1)]+=-0.641520657397*x_ref[2]**o + (0.504607483865)*x_ref[2]
+            arg[(1, 0, 2)]+=0.770730107723*x[2]**o + (-0.708040888678)*x[2]
+            ref[(1, 0, 2)]+=0.770730107723*x_ref[2]**o + (-0.708040888678)*x_ref[2]
+            arg[(1, 0, 3)]+=0.00984418177831*x[2]**o + (0.829757844855)*x[2]
+            ref[(1, 0, 3)]+=0.00984418177831*x_ref[2]**o + (0.829757844855)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.730735670952*x[2]**o + (-0.382889292544)*x[2]
+            ref[(1, 1, 0)]+=-0.730735670952*x_ref[2]**o + (-0.382889292544)*x_ref[2]
+            arg[(1, 1, 1)]+=0.548924891426*x[2]**o + (0.833213438032)*x[2]
+            ref[(1, 1, 1)]+=0.548924891426*x_ref[2]**o + (0.833213438032)*x_ref[2]
+            arg[(1, 1, 2)]+=0.232717232987*x[2]**o + (0.717919443436)*x[2]
+            ref[(1, 1, 2)]+=0.232717232987*x_ref[2]**o + (0.717919443436)*x_ref[2]
+            arg[(1, 1, 3)]+=-0.693993076093*x[2]**o + (-0.737022653667)*x[2]
+            ref[(1, 1, 3)]+=-0.693993076093*x_ref[2]**o + (-0.737022653667)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.38411972367*x[2]**o + (0.0299800202218)*x[2]
+            ref[(1, 2, 0)]+=-0.38411972367*x_ref[2]**o + (0.0299800202218)*x_ref[2]
+            arg[(1, 2, 1)]+=-0.507103804642*x[2]**o + (-0.829156143047)*x[2]
+            ref[(1, 2, 1)]+=-0.507103804642*x_ref[2]**o + (-0.829156143047)*x_ref[2]
+            arg[(1, 2, 2)]+=-0.675891000083*x[2]**o + (0.0788334620881)*x[2]
+            ref[(1, 2, 2)]+=-0.675891000083*x_ref[2]**o + (0.0788334620881)*x_ref[2]
+            arg[(1, 2, 3)]+=-0.64448546121*x[2]**o + (-0.630946416575)*x[2]
+            ref[(1, 2, 3)]+=-0.64448546121*x_ref[2]**o + (-0.630946416575)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3, 2),w)
+        ref = Data(0,(2, 3, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.808972008177*x[0]**o + (0.932115135693)*x[0] + (0.588942899445)*x[1]**o + (0.903778954161)*x[1]
+        ref[(0, 0, 0, 0)]=0.808972008177*x_ref[0]**o + (0.932115135693)*x_ref[0] + (0.588942899445)*x_ref[1]**o + (0.903778954161)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.421546092866*x[0]**o + (0.45866597591)*x[0] + (-0.524663203304)*x[1]**o + (0.151410462789)*x[1]
+        ref[(0, 0, 0, 1)]=-0.421546092866*x_ref[0]**o + (0.45866597591)*x_ref[0] + (-0.524663203304)*x_ref[1]**o + (0.151410462789)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.0272512534436*x[0]**o + (-0.302740295145)*x[0] + (-0.407008410911)*x[1]**o + (0.785895728238)*x[1]
+        ref[(0, 0, 1, 0)]=-0.0272512534436*x_ref[0]**o + (-0.302740295145)*x_ref[0] + (-0.407008410911)*x_ref[1]**o + (0.785895728238)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.226437535945*x[0]**o + (0.484624856745)*x[0] + (0.0550081918785)*x[1]**o + (0.27177365855)*x[1]
+        ref[(0, 0, 1, 1)]=0.226437535945*x_ref[0]**o + (0.484624856745)*x_ref[0] + (0.0550081918785)*x_ref[1]**o + (0.27177365855)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.135371350699*x[0]**o + (-0.727661108415)*x[0] + (-0.127090766429)*x[1]**o + (0.549287039799)*x[1]
+        ref[(0, 0, 2, 0)]=0.135371350699*x_ref[0]**o + (-0.727661108415)*x_ref[0] + (-0.127090766429)*x_ref[1]**o + (0.549287039799)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.613523622175*x[0]**o + (0.346974021435)*x[0] + (0.377561184775)*x[1]**o + (-0.372825512937)*x[1]
+        ref[(0, 0, 2, 1)]=-0.613523622175*x_ref[0]**o + (0.346974021435)*x_ref[0] + (0.377561184775)*x_ref[1]**o + (-0.372825512937)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.668510802002*x[0]**o + (0.873119034562)*x[0] + (0.716425377022)*x[1]**o + (-0.585891419598)*x[1]
+        ref[(0, 1, 0, 0)]=-0.668510802002*x_ref[0]**o + (0.873119034562)*x_ref[0] + (0.716425377022)*x_ref[1]**o + (-0.585891419598)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.399335292604*x[0]**o + (0.986864583205)*x[0] + (-0.00591549018247)*x[1]**o + (0.778554936603)*x[1]
+        ref[(0, 1, 0, 1)]=0.399335292604*x_ref[0]**o + (0.986864583205)*x_ref[0] + (-0.00591549018247)*x_ref[1]**o + (0.778554936603)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.045660948039*x[0]**o + (0.318874559495)*x[0] + (-0.00514893732773)*x[1]**o + (0.108781341193)*x[1]
+        ref[(0, 1, 1, 0)]=-0.045660948039*x_ref[0]**o + (0.318874559495)*x_ref[0] + (-0.00514893732773)*x_ref[1]**o + (0.108781341193)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.885823449195*x[0]**o + (-0.47728720819)*x[0] + (-0.533528827288)*x[1]**o + (0.712469744908)*x[1]
+        ref[(0, 1, 1, 1)]=-0.885823449195*x_ref[0]**o + (-0.47728720819)*x_ref[0] + (-0.533528827288)*x_ref[1]**o + (0.712469744908)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.145027775071*x[0]**o + (0.262873269026)*x[0] + (0.629428755632)*x[1]**o + (0.146999509703)*x[1]
+        ref[(0, 1, 2, 0)]=0.145027775071*x_ref[0]**o + (0.262873269026)*x_ref[0] + (0.629428755632)*x_ref[1]**o + (0.146999509703)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.307720780386*x[0]**o + (0.550473594814)*x[0] + (0.183000007238)*x[1]**o + (-0.959727902286)*x[1]
+        ref[(0, 1, 2, 1)]=-0.307720780386*x_ref[0]**o + (0.550473594814)*x_ref[0] + (0.183000007238)*x_ref[1]**o + (-0.959727902286)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.387372990858*x[0]**o + (-0.544700877199)*x[0] + (0.392215406279)*x[1]**o + (0.817481397883)*x[1]
+        ref[(0, 2, 0, 0)]=-0.387372990858*x_ref[0]**o + (-0.544700877199)*x_ref[0] + (0.392215406279)*x_ref[1]**o + (0.817481397883)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.785705466724*x[0]**o + (-0.785440368111)*x[0] + (-0.309906968158)*x[1]**o + (-0.507276469039)*x[1]
+        ref[(0, 2, 0, 1)]=0.785705466724*x_ref[0]**o + (-0.785440368111)*x_ref[0] + (-0.309906968158)*x_ref[1]**o + (-0.507276469039)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.852753933801*x[0]**o + (-0.113663850125)*x[0] + (0.250403022034)*x[1]**o + (0.995214023661)*x[1]
+        ref[(0, 2, 1, 0)]=-0.852753933801*x_ref[0]**o + (-0.113663850125)*x_ref[0] + (0.250403022034)*x_ref[1]**o + (0.995214023661)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.660116458511*x[0]**o + (0.765943616317)*x[0] + (-0.497663952834)*x[1]**o + (-0.0513901159794)*x[1]
+        ref[(0, 2, 1, 1)]=-0.660116458511*x_ref[0]**o + (0.765943616317)*x_ref[0] + (-0.497663952834)*x_ref[1]**o + (-0.0513901159794)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.531043045116*x[0]**o + (0.465039070753)*x[0] + (0.884032965262)*x[1]**o + (0.995567943088)*x[1]
+        ref[(0, 2, 2, 0)]=0.531043045116*x_ref[0]**o + (0.465039070753)*x_ref[0] + (0.884032965262)*x_ref[1]**o + (0.995567943088)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.819768632991*x[0]**o + (-0.727041657421)*x[0] + (-0.63433110096)*x[1]**o + (-0.191118608456)*x[1]
+        ref[(0, 2, 2, 1)]=-0.819768632991*x_ref[0]**o + (-0.727041657421)*x_ref[0] + (-0.63433110096)*x_ref[1]**o + (-0.191118608456)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.0878150506454*x[0]**o + (-0.205961796205)*x[0] + (0.367243972279)*x[1]**o + (-0.555958027441)*x[1]
+        ref[(1, 0, 0, 0)]=0.0878150506454*x_ref[0]**o + (-0.205961796205)*x_ref[0] + (0.367243972279)*x_ref[1]**o + (-0.555958027441)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.45403661427*x[0]**o + (-0.019807317304)*x[0] + (-0.951088635888)*x[1]**o + (-0.869606757748)*x[1]
+        ref[(1, 0, 0, 1)]=0.45403661427*x_ref[0]**o + (-0.019807317304)*x_ref[0] + (-0.951088635888)*x_ref[1]**o + (-0.869606757748)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.377057896181*x[0]**o + (-0.414941739379)*x[0] + (0.465455884511)*x[1]**o + (-0.618911266013)*x[1]
+        ref[(1, 0, 1, 0)]=0.377057896181*x_ref[0]**o + (-0.414941739379)*x_ref[0] + (0.465455884511)*x_ref[1]**o + (-0.618911266013)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.38197310485*x[0]**o + (-0.723560841607)*x[0] + (-0.409425063229)*x[1]**o + (0.931142828957)*x[1]
+        ref[(1, 0, 1, 1)]=-0.38197310485*x_ref[0]**o + (-0.723560841607)*x_ref[0] + (-0.409425063229)*x_ref[1]**o + (0.931142828957)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.739936630355*x[0]**o + (-0.849518585343)*x[0] + (0.526587455181)*x[1]**o + (0.628152367953)*x[1]
+        ref[(1, 0, 2, 0)]=-0.739936630355*x_ref[0]**o + (-0.849518585343)*x_ref[0] + (0.526587455181)*x_ref[1]**o + (0.628152367953)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.622998878102*x[0]**o + (0.0163404277017)*x[0] + (-0.459325953301)*x[1]**o + (-0.701197131204)*x[1]
+        ref[(1, 0, 2, 1)]=0.622998878102*x_ref[0]**o + (0.0163404277017)*x_ref[0] + (-0.459325953301)*x_ref[1]**o + (-0.701197131204)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.394553779577*x[0]**o + (0.487279028663)*x[0] + (-0.925460722708)*x[1]**o + (0.512496294968)*x[1]
+        ref[(1, 1, 0, 0)]=0.394553779577*x_ref[0]**o + (0.487279028663)*x_ref[0] + (-0.925460722708)*x_ref[1]**o + (0.512496294968)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.853840673247*x[0]**o + (0.241998032376)*x[0] + (-0.131422005628)*x[1]**o + (-0.061639009816)*x[1]
+        ref[(1, 1, 0, 1)]=0.853840673247*x_ref[0]**o + (0.241998032376)*x_ref[0] + (-0.131422005628)*x_ref[1]**o + (-0.061639009816)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.181782049007*x[0]**o + (-0.980464826165)*x[0] + (0.257345231469)*x[1]**o + (0.671193474114)*x[1]
+        ref[(1, 1, 1, 0)]=-0.181782049007*x_ref[0]**o + (-0.980464826165)*x_ref[0] + (0.257345231469)*x_ref[1]**o + (0.671193474114)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.617517694215*x[0]**o + (-0.153765418408)*x[0] + (-0.562189416761)*x[1]**o + (0.0390328917421)*x[1]
+        ref[(1, 1, 1, 1)]=-0.617517694215*x_ref[0]**o + (-0.153765418408)*x_ref[0] + (-0.562189416761)*x_ref[1]**o + (0.0390328917421)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.910765950175*x[0]**o + (-0.370044426411)*x[0] + (0.643208989101)*x[1]**o + (-0.380048694597)*x[1]
+        ref[(1, 1, 2, 0)]=0.910765950175*x_ref[0]**o + (-0.370044426411)*x_ref[0] + (0.643208989101)*x_ref[1]**o + (-0.380048694597)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.309695553446*x[0]**o + (-0.177501138503)*x[0] + (-0.186957654311)*x[1]**o + (-0.776052095943)*x[1]
+        ref[(1, 1, 2, 1)]=0.309695553446*x_ref[0]**o + (-0.177501138503)*x_ref[0] + (-0.186957654311)*x_ref[1]**o + (-0.776052095943)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.648790281673*x[0]**o + (0.74988853735)*x[0] + (-0.805817728816)*x[1]**o + (-0.507950022726)*x[1]
+        ref[(1, 2, 0, 0)]=-0.648790281673*x_ref[0]**o + (0.74988853735)*x_ref[0] + (-0.805817728816)*x_ref[1]**o + (-0.507950022726)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.483021378981*x[0]**o + (0.997981399858)*x[0] + (-0.318726241756)*x[1]**o + (-0.583567435435)*x[1]
+        ref[(1, 2, 0, 1)]=0.483021378981*x_ref[0]**o + (0.997981399858)*x_ref[0] + (-0.318726241756)*x_ref[1]**o + (-0.583567435435)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.239281740311*x[0]**o + (-0.466613097929)*x[0] + (0.758757453512)*x[1]**o + (-0.926813936263)*x[1]
+        ref[(1, 2, 1, 0)]=-0.239281740311*x_ref[0]**o + (-0.466613097929)*x_ref[0] + (0.758757453512)*x_ref[1]**o + (-0.926813936263)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.306353139133*x[0]**o + (0.334377000866)*x[0] + (-0.349953570214)*x[1]**o + (-0.348191929205)*x[1]
+        ref[(1, 2, 1, 1)]=-0.306353139133*x_ref[0]**o + (0.334377000866)*x_ref[0] + (-0.349953570214)*x_ref[1]**o + (-0.348191929205)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.0700604908831*x[0]**o + (0.765912795051)*x[0] + (0.111119377048)*x[1]**o + (0.262684594992)*x[1]
+        ref[(1, 2, 2, 0)]=-0.0700604908831*x_ref[0]**o + (0.765912795051)*x_ref[0] + (0.111119377048)*x_ref[1]**o + (0.262684594992)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.374790042099*x[0]**o + (0.720844275585)*x[0] + (0.87057329262)*x[1]**o + (0.825305993931)*x[1]
+        ref[(1, 2, 2, 1)]=0.374790042099*x_ref[0]**o + (0.720844275585)*x_ref[0] + (0.87057329262)*x_ref[1]**o + (0.825305993931)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.868538174195*x[2]**o + (-0.197712916591)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.868538174195*x_ref[2]**o + (-0.197712916591)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.800088525271*x[2]**o + (0.3289268375)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.800088525271*x_ref[2]**o + (0.3289268375)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.633362822061*x[2]**o + (0.731268823027)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.633362822061*x_ref[2]**o + (0.731268823027)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.40296568102*x[2]**o + (0.93872768826)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.40296568102*x_ref[2]**o + (0.93872768826)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.96924897941*x[2]**o + (0.141690525747)*x[2]
+            ref[(0, 0, 2, 0)]+=0.96924897941*x_ref[2]**o + (0.141690525747)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.466533638867*x[2]**o + (0.808453273743)*x[2]
+            ref[(0, 0, 2, 1)]+=0.466533638867*x_ref[2]**o + (0.808453273743)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.512842361975*x[2]**o + (-0.685823936286)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.512842361975*x_ref[2]**o + (-0.685823936286)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.678718652837*x[2]**o + (-0.883842086425)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.678718652837*x_ref[2]**o + (-0.883842086425)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.386292083628*x[2]**o + (0.115670047681)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.386292083628*x_ref[2]**o + (0.115670047681)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.664604265714*x[2]**o + (0.373146281594)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.664604265714*x_ref[2]**o + (0.373146281594)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.0158117065519*x[2]**o + (0.822288414629)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.0158117065519*x_ref[2]**o + (0.822288414629)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.0158791335726*x[2]**o + (0.980186682986)*x[2]
+            ref[(0, 1, 2, 1)]+=0.0158791335726*x_ref[2]**o + (0.980186682986)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.102061122329*x[2]**o + (0.489412737555)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.102061122329*x_ref[2]**o + (0.489412737555)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.256977756904*x[2]**o + (0.0147167318801)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.256977756904*x_ref[2]**o + (0.0147167318801)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.158616865085*x[2]**o + (-0.737760206003)*x[2]
+            ref[(0, 2, 1, 0)]+=0.158616865085*x_ref[2]**o + (-0.737760206003)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.589371361947*x[2]**o + (0.879840510852)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.589371361947*x_ref[2]**o + (0.879840510852)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.844742367613*x[2]**o + (0.628647035403)*x[2]
+            ref[(0, 2, 2, 0)]+=0.844742367613*x_ref[2]**o + (0.628647035403)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.861511856302*x[2]**o + (-0.946300427215)*x[2]
+            ref[(0, 2, 2, 1)]+=0.861511856302*x_ref[2]**o + (-0.946300427215)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.045780322074*x[2]**o + (-0.197473294252)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.045780322074*x_ref[2]**o + (-0.197473294252)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.114868095498*x[2]**o + (0.553434470887)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.114868095498*x_ref[2]**o + (0.553434470887)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.343615039026*x[2]**o + (-0.841959703611)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.343615039026*x_ref[2]**o + (-0.841959703611)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.769130011049*x[2]**o + (0.138624365841)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.769130011049*x_ref[2]**o + (0.138624365841)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.432672936925*x[2]**o + (-0.403371643794)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.432672936925*x_ref[2]**o + (-0.403371643794)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.349825153573*x[2]**o + (0.733439312367)*x[2]
+            ref[(1, 0, 2, 1)]+=0.349825153573*x_ref[2]**o + (0.733439312367)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.900738907606*x[2]**o + (-0.601573045964)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.900738907606*x_ref[2]**o + (-0.601573045964)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.499313188488*x[2]**o + (0.720449908809)*x[2]
+            ref[(1, 1, 0, 1)]+=0.499313188488*x_ref[2]**o + (0.720449908809)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.457377673888*x[2]**o + (-0.669706177097)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.457377673888*x_ref[2]**o + (-0.669706177097)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.482280249177*x[2]**o + (-0.285458922183)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.482280249177*x_ref[2]**o + (-0.285458922183)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.833697598791*x[2]**o + (0.912912361033)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.833697598791*x_ref[2]**o + (0.912912361033)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.0670794522936*x[2]**o + (0.593907022696)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.0670794522936*x_ref[2]**o + (0.593907022696)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.857745398358*x[2]**o + (-0.475080377374)*x[2]
+            ref[(1, 2, 0, 0)]+=0.857745398358*x_ref[2]**o + (-0.475080377374)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.718310177573*x[2]**o + (-0.0483406034319)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.718310177573*x_ref[2]**o + (-0.0483406034319)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.837006807955*x[2]**o + (-0.228191572491)*x[2]
+            ref[(1, 2, 1, 0)]+=0.837006807955*x_ref[2]**o + (-0.228191572491)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.257907495706*x[2]**o + (0.634970806106)*x[2]
+            ref[(1, 2, 1, 1)]+=0.257907495706*x_ref[2]**o + (0.634970806106)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.695929330206*x[2]**o + (-0.827548011249)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.695929330206*x_ref[2]**o + (-0.827548011249)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.37067144628*x[2]**o + (-0.74802628629)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.37067144628*x_ref[2]**o + (-0.74802628629)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.151903288673*x[0] + (0.852613250608)*x[1]
+        ref=0.151903288673*x_ref[0] + (0.852613250608)*x_ref[1]
+        if dim==3:
+            arg+=(-0.471035962574)*x[2]
+            ref+=(-0.471035962574)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.557940142953*x[0] + (0.850285246699)*x[1]
+        ref[(0,)]=0.557940142953*x_ref[0] + (0.850285246699)*x_ref[1]
+        arg[(1,)]=-0.341532816525*x[0] + (0.124891415512)*x[1]
+        ref[(1,)]=-0.341532816525*x_ref[0] + (0.124891415512)*x_ref[1]
+        arg[(2,)]=0.177680742601*x[0] + (0.340506643962)*x[1]
+        ref[(2,)]=0.177680742601*x_ref[0] + (0.340506643962)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.357627946661*x[2]
+            ref[(0,)]+=-0.357627946661*x_ref[2]
+            arg[(1,)]+=0.123496037156*x[2]
+            ref[(1,)]+=0.123496037156*x_ref[2]
+            arg[(2,)]+=0.752678048538*x[2]
+            ref[(2,)]+=0.752678048538*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=0.569143684136*x[0] + (0.83004588792)*x[1]
+        ref[(0, 0)]=0.569143684136*x_ref[0] + (0.83004588792)*x_ref[1]
+        arg[(0, 1)]=-0.91976037804*x[0] + (-0.471801750313)*x[1]
+        ref[(0, 1)]=-0.91976037804*x_ref[0] + (-0.471801750313)*x_ref[1]
+        arg[(1, 0)]=-0.491419063423*x[0] + (0.747493264836)*x[1]
+        ref[(1, 0)]=-0.491419063423*x_ref[0] + (0.747493264836)*x_ref[1]
+        arg[(1, 1)]=-0.451296322817*x[0] + (0.722303348103)*x[1]
+        ref[(1, 1)]=-0.451296322817*x_ref[0] + (0.722303348103)*x_ref[1]
+        arg[(2, 0)]=0.0426721275503*x[0] + (0.0567871225572)*x[1]
+        ref[(2, 0)]=0.0426721275503*x_ref[0] + (0.0567871225572)*x_ref[1]
+        arg[(2, 1)]=-0.681942004161*x[0] + (-0.290347776996)*x[1]
+        ref[(2, 1)]=-0.681942004161*x_ref[0] + (-0.290347776996)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.461925771287*x[2]
+            ref[(0, 0)]+=-0.461925771287*x_ref[2]
+            arg[(0, 1)]+=0.979940542722*x[2]
+            ref[(0, 1)]+=0.979940542722*x_ref[2]
+            arg[(1, 0)]+=-0.23033495794*x[2]
+            ref[(1, 0)]+=-0.23033495794*x_ref[2]
+            arg[(1, 1)]+=0.97211060459*x[2]
+            ref[(1, 1)]+=0.97211060459*x_ref[2]
+            arg[(2, 0)]+=0.901739527806*x[2]
+            ref[(2, 0)]+=0.901739527806*x_ref[2]
+            arg[(2, 1)]+=-0.300302547614*x[2]
+            ref[(2, 1)]+=-0.300302547614*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 2),w)
+        ref = Data(0,(4, 3, 2),w_ref)
+        arg[(0, 0, 0)]=0.265791869043*x[0] + (0.296628397465)*x[1]
+        ref[(0, 0, 0)]=0.265791869043*x_ref[0] + (0.296628397465)*x_ref[1]
+        arg[(0, 0, 1)]=-0.268470281562*x[0] + (-0.170031243443)*x[1]
+        ref[(0, 0, 1)]=-0.268470281562*x_ref[0] + (-0.170031243443)*x_ref[1]
+        arg[(0, 1, 0)]=0.196770132723*x[0] + (-0.536717129655)*x[1]
+        ref[(0, 1, 0)]=0.196770132723*x_ref[0] + (-0.536717129655)*x_ref[1]
+        arg[(0, 1, 1)]=0.701409076925*x[0] + (0.175218669673)*x[1]
+        ref[(0, 1, 1)]=0.701409076925*x_ref[0] + (0.175218669673)*x_ref[1]
+        arg[(0, 2, 0)]=-0.346526209276*x[0] + (-0.773119645128)*x[1]
+        ref[(0, 2, 0)]=-0.346526209276*x_ref[0] + (-0.773119645128)*x_ref[1]
+        arg[(0, 2, 1)]=-0.672271817172*x[0] + (-0.597450328161)*x[1]
+        ref[(0, 2, 1)]=-0.672271817172*x_ref[0] + (-0.597450328161)*x_ref[1]
+        arg[(1, 0, 0)]=0.63213621573*x[0] + (-0.286964999571)*x[1]
+        ref[(1, 0, 0)]=0.63213621573*x_ref[0] + (-0.286964999571)*x_ref[1]
+        arg[(1, 0, 1)]=0.0779342113859*x[0] + (-0.150064959362)*x[1]
+        ref[(1, 0, 1)]=0.0779342113859*x_ref[0] + (-0.150064959362)*x_ref[1]
+        arg[(1, 1, 0)]=-0.508670271261*x[0] + (0.968592466016)*x[1]
+        ref[(1, 1, 0)]=-0.508670271261*x_ref[0] + (0.968592466016)*x_ref[1]
+        arg[(1, 1, 1)]=0.821909741336*x[0] + (-0.572130232761)*x[1]
+        ref[(1, 1, 1)]=0.821909741336*x_ref[0] + (-0.572130232761)*x_ref[1]
+        arg[(1, 2, 0)]=-0.236057468805*x[0] + (0.499264866231)*x[1]
+        ref[(1, 2, 0)]=-0.236057468805*x_ref[0] + (0.499264866231)*x_ref[1]
+        arg[(1, 2, 1)]=-0.314509946767*x[0] + (0.216344419344)*x[1]
+        ref[(1, 2, 1)]=-0.314509946767*x_ref[0] + (0.216344419344)*x_ref[1]
+        arg[(2, 0, 0)]=0.152455252311*x[0] + (-0.303450969472)*x[1]
+        ref[(2, 0, 0)]=0.152455252311*x_ref[0] + (-0.303450969472)*x_ref[1]
+        arg[(2, 0, 1)]=-0.283595363186*x[0] + (0.686494680598)*x[1]
+        ref[(2, 0, 1)]=-0.283595363186*x_ref[0] + (0.686494680598)*x_ref[1]
+        arg[(2, 1, 0)]=-0.945258784513*x[0] + (0.576525628271)*x[1]
+        ref[(2, 1, 0)]=-0.945258784513*x_ref[0] + (0.576525628271)*x_ref[1]
+        arg[(2, 1, 1)]=0.0284315028256*x[0] + (-0.715205878511)*x[1]
+        ref[(2, 1, 1)]=0.0284315028256*x_ref[0] + (-0.715205878511)*x_ref[1]
+        arg[(2, 2, 0)]=-0.639598643813*x[0] + (-0.793508842182)*x[1]
+        ref[(2, 2, 0)]=-0.639598643813*x_ref[0] + (-0.793508842182)*x_ref[1]
+        arg[(2, 2, 1)]=0.086653013925*x[0] + (0.125878596364)*x[1]
+        ref[(2, 2, 1)]=0.086653013925*x_ref[0] + (0.125878596364)*x_ref[1]
+        arg[(3, 0, 0)]=-0.3620130453*x[0] + (0.345932256677)*x[1]
+        ref[(3, 0, 0)]=-0.3620130453*x_ref[0] + (0.345932256677)*x_ref[1]
+        arg[(3, 0, 1)]=-0.385756430237*x[0] + (0.942489335355)*x[1]
+        ref[(3, 0, 1)]=-0.385756430237*x_ref[0] + (0.942489335355)*x_ref[1]
+        arg[(3, 1, 0)]=-0.218998563524*x[0] + (-0.188144738139)*x[1]
+        ref[(3, 1, 0)]=-0.218998563524*x_ref[0] + (-0.188144738139)*x_ref[1]
+        arg[(3, 1, 1)]=0.13074703038*x[0] + (-0.544038130627)*x[1]
+        ref[(3, 1, 1)]=0.13074703038*x_ref[0] + (-0.544038130627)*x_ref[1]
+        arg[(3, 2, 0)]=-0.0110718530201*x[0] + (-0.538925109142)*x[1]
+        ref[(3, 2, 0)]=-0.0110718530201*x_ref[0] + (-0.538925109142)*x_ref[1]
+        arg[(3, 2, 1)]=0.514635248614*x[0] + (-0.621845300596)*x[1]
+        ref[(3, 2, 1)]=0.514635248614*x_ref[0] + (-0.621845300596)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.946433364553*x[2]
+            ref[(0, 0, 0)]+=0.946433364553*x_ref[2]
+            arg[(0, 0, 1)]+=0.9899389426*x[2]
+            ref[(0, 0, 1)]+=0.9899389426*x_ref[2]
+            arg[(0, 1, 0)]+=-0.439477929048*x[2]
+            ref[(0, 1, 0)]+=-0.439477929048*x_ref[2]
+            arg[(0, 1, 1)]+=0.922914424837*x[2]
+            ref[(0, 1, 1)]+=0.922914424837*x_ref[2]
+            arg[(0, 2, 0)]+=0.665177407892*x[2]
+            ref[(0, 2, 0)]+=0.665177407892*x_ref[2]
+            arg[(0, 2, 1)]+=0.738026230539*x[2]
+            ref[(0, 2, 1)]+=0.738026230539*x_ref[2]
+            arg[(1, 0, 0)]+=-0.108589137189*x[2]
+            ref[(1, 0, 0)]+=-0.108589137189*x_ref[2]
+            arg[(1, 0, 1)]+=-0.06968546946*x[2]
+            ref[(1, 0, 1)]+=-0.06968546946*x_ref[2]
+            arg[(1, 1, 0)]+=0.868967122385*x[2]
+            ref[(1, 1, 0)]+=0.868967122385*x_ref[2]
+            arg[(1, 1, 1)]+=0.924440051459*x[2]
+            ref[(1, 1, 1)]+=0.924440051459*x_ref[2]
+            arg[(1, 2, 0)]+=-0.871599155561*x[2]
+            ref[(1, 2, 0)]+=-0.871599155561*x_ref[2]
+            arg[(1, 2, 1)]+=-0.529685928844*x[2]
+            ref[(1, 2, 1)]+=-0.529685928844*x_ref[2]
+            arg[(2, 0, 0)]+=0.729361437224*x[2]
+            ref[(2, 0, 0)]+=0.729361437224*x_ref[2]
+            arg[(2, 0, 1)]+=-0.680950269984*x[2]
+            ref[(2, 0, 1)]+=-0.680950269984*x_ref[2]
+            arg[(2, 1, 0)]+=-0.130514982468*x[2]
+            ref[(2, 1, 0)]+=-0.130514982468*x_ref[2]
+            arg[(2, 1, 1)]+=0.270914118441*x[2]
+            ref[(2, 1, 1)]+=0.270914118441*x_ref[2]
+            arg[(2, 2, 0)]+=0.772381770659*x[2]
+            ref[(2, 2, 0)]+=0.772381770659*x_ref[2]
+            arg[(2, 2, 1)]+=-0.738712815697*x[2]
+            ref[(2, 2, 1)]+=-0.738712815697*x_ref[2]
+            arg[(3, 0, 0)]+=-0.172907829191*x[2]
+            ref[(3, 0, 0)]+=-0.172907829191*x_ref[2]
+            arg[(3, 0, 1)]+=-0.877234827604*x[2]
+            ref[(3, 0, 1)]+=-0.877234827604*x_ref[2]
+            arg[(3, 1, 0)]+=-0.342987054258*x[2]
+            ref[(3, 1, 0)]+=-0.342987054258*x_ref[2]
+            arg[(3, 1, 1)]+=-0.348607977691*x[2]
+            ref[(3, 1, 1)]+=-0.348607977691*x_ref[2]
+            arg[(3, 2, 0)]+=-0.510598159328*x[2]
+            ref[(3, 2, 0)]+=-0.510598159328*x_ref[2]
+            arg[(3, 2, 1)]+=-0.114722848103*x[2]
+            ref[(3, 2, 1)]+=-0.114722848103*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3, 2),w)
+        ref = Data(0,(2, 3, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.104665822501*x[0] + (-0.0430827029043)*x[1]
+        ref[(0, 0, 0, 0)]=0.104665822501*x_ref[0] + (-0.0430827029043)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.196353493127*x[0] + (0.859086718482)*x[1]
+        ref[(0, 0, 0, 1)]=0.196353493127*x_ref[0] + (0.859086718482)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.795298513153*x[0] + (-0.797752147898)*x[1]
+        ref[(0, 0, 1, 0)]=0.795298513153*x_ref[0] + (-0.797752147898)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.234033379237*x[0] + (-0.92543881976)*x[1]
+        ref[(0, 0, 1, 1)]=-0.234033379237*x_ref[0] + (-0.92543881976)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.112731500382*x[0] + (-0.784928085348)*x[1]
+        ref[(0, 0, 2, 0)]=-0.112731500382*x_ref[0] + (-0.784928085348)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.946022857785*x[0] + (-0.336613975611)*x[1]
+        ref[(0, 0, 2, 1)]=0.946022857785*x_ref[0] + (-0.336613975611)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.147117263929*x[0] + (-0.449165471138)*x[1]
+        ref[(0, 1, 0, 0)]=0.147117263929*x_ref[0] + (-0.449165471138)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.561764737575*x[0] + (0.759557861586)*x[1]
+        ref[(0, 1, 0, 1)]=-0.561764737575*x_ref[0] + (0.759557861586)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.666374947256*x[0] + (-0.0671378665025)*x[1]
+        ref[(0, 1, 1, 0)]=0.666374947256*x_ref[0] + (-0.0671378665025)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.227385227607*x[0] + (0.924019987118)*x[1]
+        ref[(0, 1, 1, 1)]=0.227385227607*x_ref[0] + (0.924019987118)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.601873103228*x[0] + (-0.450944437589)*x[1]
+        ref[(0, 1, 2, 0)]=0.601873103228*x_ref[0] + (-0.450944437589)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.633679890791*x[0] + (0.531814393784)*x[1]
+        ref[(0, 1, 2, 1)]=0.633679890791*x_ref[0] + (0.531814393784)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.826024646784*x[0] + (0.0637391794451)*x[1]
+        ref[(0, 2, 0, 0)]=-0.826024646784*x_ref[0] + (0.0637391794451)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.886531730155*x[0] + (-0.448522874543)*x[1]
+        ref[(0, 2, 0, 1)]=0.886531730155*x_ref[0] + (-0.448522874543)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.71880396822*x[0] + (0.519051258657)*x[1]
+        ref[(0, 2, 1, 0)]=0.71880396822*x_ref[0] + (0.519051258657)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.119801029271*x[0] + (-0.000777237764668)*x[1]
+        ref[(0, 2, 1, 1)]=-0.119801029271*x_ref[0] + (-0.000777237764668)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.322532798589*x[0] + (-0.899533903526)*x[1]
+        ref[(0, 2, 2, 0)]=-0.322532798589*x_ref[0] + (-0.899533903526)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.334793391907*x[0] + (0.15574751464)*x[1]
+        ref[(0, 2, 2, 1)]=0.334793391907*x_ref[0] + (0.15574751464)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.227043454411*x[0] + (0.629957186933)*x[1]
+        ref[(1, 0, 0, 0)]=-0.227043454411*x_ref[0] + (0.629957186933)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.132008798476*x[0] + (-0.413343748895)*x[1]
+        ref[(1, 0, 0, 1)]=-0.132008798476*x_ref[0] + (-0.413343748895)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.0260625662682*x[0] + (-0.428312960755)*x[1]
+        ref[(1, 0, 1, 0)]=0.0260625662682*x_ref[0] + (-0.428312960755)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.300992930203*x[0] + (-0.306385569395)*x[1]
+        ref[(1, 0, 1, 1)]=0.300992930203*x_ref[0] + (-0.306385569395)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.905845546761*x[0] + (-0.726669332671)*x[1]
+        ref[(1, 0, 2, 0)]=-0.905845546761*x_ref[0] + (-0.726669332671)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.83299826907*x[0] + (-0.241551406502)*x[1]
+        ref[(1, 0, 2, 1)]=-0.83299826907*x_ref[0] + (-0.241551406502)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.713734689836*x[0] + (-0.417591605103)*x[1]
+        ref[(1, 1, 0, 0)]=-0.713734689836*x_ref[0] + (-0.417591605103)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.54581450823*x[0] + (0.120056472275)*x[1]
+        ref[(1, 1, 0, 1)]=0.54581450823*x_ref[0] + (0.120056472275)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.439093477444*x[0] + (0.06443336665)*x[1]
+        ref[(1, 1, 1, 0)]=0.439093477444*x_ref[0] + (0.06443336665)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.317279912837*x[0] + (-0.488340299455)*x[1]
+        ref[(1, 1, 1, 1)]=0.317279912837*x_ref[0] + (-0.488340299455)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.916180689712*x[0] + (-0.869715605854)*x[1]
+        ref[(1, 1, 2, 0)]=0.916180689712*x_ref[0] + (-0.869715605854)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.178421295014*x[0] + (0.584052334266)*x[1]
+        ref[(1, 1, 2, 1)]=0.178421295014*x_ref[0] + (0.584052334266)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.320962847959*x[0] + (-0.0153571874371)*x[1]
+        ref[(1, 2, 0, 0)]=-0.320962847959*x_ref[0] + (-0.0153571874371)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.264261474915*x[0] + (-0.235676390171)*x[1]
+        ref[(1, 2, 0, 1)]=-0.264261474915*x_ref[0] + (-0.235676390171)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.88830987001*x[0] + (-0.546317187796)*x[1]
+        ref[(1, 2, 1, 0)]=0.88830987001*x_ref[0] + (-0.546317187796)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.204000807806*x[0] + (0.999608439739)*x[1]
+        ref[(1, 2, 1, 1)]=-0.204000807806*x_ref[0] + (0.999608439739)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.685699862261*x[0] + (0.261507307484)*x[1]
+        ref[(1, 2, 2, 0)]=0.685699862261*x_ref[0] + (0.261507307484)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.821337979111*x[0] + (0.277462188062)*x[1]
+        ref[(1, 2, 2, 1)]=0.821337979111*x_ref[0] + (0.277462188062)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.0420214845041*x[2]
+            ref[(0, 0, 0, 0)]+=0.0420214845041*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.0211394890758*x[2]
+            ref[(0, 0, 0, 1)]+=0.0211394890758*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.83785317412*x[2]
+            ref[(0, 0, 1, 0)]+=-0.83785317412*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.744769131131*x[2]
+            ref[(0, 0, 1, 1)]+=0.744769131131*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.172076984898*x[2]
+            ref[(0, 0, 2, 0)]+=-0.172076984898*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.456115378428*x[2]
+            ref[(0, 0, 2, 1)]+=-0.456115378428*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.278917380591*x[2]
+            ref[(0, 1, 0, 0)]+=-0.278917380591*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.931155314943*x[2]
+            ref[(0, 1, 0, 1)]+=-0.931155314943*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.82753264127*x[2]
+            ref[(0, 1, 1, 0)]+=-0.82753264127*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.0330711994421*x[2]
+            ref[(0, 1, 1, 1)]+=0.0330711994421*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.701778786189*x[2]
+            ref[(0, 1, 2, 0)]+=-0.701778786189*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.467047010814*x[2]
+            ref[(0, 1, 2, 1)]+=-0.467047010814*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.0975476808346*x[2]
+            ref[(0, 2, 0, 0)]+=-0.0975476808346*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.334144587513*x[2]
+            ref[(0, 2, 0, 1)]+=-0.334144587513*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.641500953179*x[2]
+            ref[(0, 2, 1, 0)]+=0.641500953179*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.569121516049*x[2]
+            ref[(0, 2, 1, 1)]+=0.569121516049*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.286381995768*x[2]
+            ref[(0, 2, 2, 0)]+=0.286381995768*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.43824241547*x[2]
+            ref[(0, 2, 2, 1)]+=0.43824241547*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.534291377155*x[2]
+            ref[(1, 0, 0, 0)]+=-0.534291377155*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.716799619488*x[2]
+            ref[(1, 0, 0, 1)]+=0.716799619488*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.206238489772*x[2]
+            ref[(1, 0, 1, 0)]+=0.206238489772*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.215068849482*x[2]
+            ref[(1, 0, 1, 1)]+=-0.215068849482*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.203493484834*x[2]
+            ref[(1, 0, 2, 0)]+=0.203493484834*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.631550381345*x[2]
+            ref[(1, 0, 2, 1)]+=-0.631550381345*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.729716255423*x[2]
+            ref[(1, 1, 0, 0)]+=-0.729716255423*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.205712741562*x[2]
+            ref[(1, 1, 0, 1)]+=0.205712741562*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.790670851564*x[2]
+            ref[(1, 1, 1, 0)]+=-0.790670851564*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.811248423999*x[2]
+            ref[(1, 1, 1, 1)]+=-0.811248423999*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.833565101982*x[2]
+            ref[(1, 1, 2, 0)]+=0.833565101982*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.828088375423*x[2]
+            ref[(1, 1, 2, 1)]+=-0.828088375423*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.70982669843*x[2]
+            ref[(1, 2, 0, 0)]+=0.70982669843*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.997175627761*x[2]
+            ref[(1, 2, 0, 1)]+=0.997175627761*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.766730969634*x[2]
+            ref[(1, 2, 1, 0)]+=0.766730969634*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.136217214645*x[2]
+            ref[(1, 2, 1, 1)]+=-0.136217214645*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.868239969479*x[2]
+            ref[(1, 2, 2, 0)]+=-0.868239969479*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.482275943896*x[2]
+            ref[(1, 2, 2, 1)]+=-0.482275943896*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.759711562189*x[0] + (-0.767453155826)*x[1]
+        ref=0.759711562189*x_ref[0] + (-0.767453155826)*x_ref[1]
+        if dim==3:
+            arg+=(0.958600145101)*x[2]
+            ref+=(0.958600145101)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=-0.0108640036772*x[0] + (-0.393696771891)*x[1]
+        ref[(0,)]=-0.0108640036772*x_ref[0] + (-0.393696771891)*x_ref[1]
+        arg[(1,)]=-0.689221088757*x[0] + (-0.90347724985)*x[1]
+        ref[(1,)]=-0.689221088757*x_ref[0] + (-0.90347724985)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.78280023977*x[2]
+            ref[(0,)]+=-0.78280023977*x_ref[2]
+            arg[(1,)]+=-0.700731664968*x[2]
+            ref[(1,)]+=-0.700731664968*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=-0.744263737498*x[0] + (0.0750566252916)*x[1]
+        ref[(0, 0)]=-0.744263737498*x_ref[0] + (0.0750566252916)*x_ref[1]
+        arg[(0, 1)]=-0.470045326943*x[0] + (-0.702903528259)*x[1]
+        ref[(0, 1)]=-0.470045326943*x_ref[0] + (-0.702903528259)*x_ref[1]
+        arg[(1, 0)]=-0.537267827926*x[0] + (-0.32112857843)*x[1]
+        ref[(1, 0)]=-0.537267827926*x_ref[0] + (-0.32112857843)*x_ref[1]
+        arg[(1, 1)]=-0.119843784533*x[0] + (-0.149710633724)*x[1]
+        ref[(1, 1)]=-0.119843784533*x_ref[0] + (-0.149710633724)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.722874555913*x[2]
+            ref[(0, 0)]+=-0.722874555913*x_ref[2]
+            arg[(0, 1)]+=0.962790987222*x[2]
+            ref[(0, 1)]+=0.962790987222*x_ref[2]
+            arg[(1, 0)]+=0.876296355892*x[2]
+            ref[(1, 0)]+=0.876296355892*x_ref[2]
+            arg[(1, 1)]+=0.219454161652*x[2]
+            ref[(1, 1)]+=0.219454161652*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4),w)
+        ref = Data(0,(2, 4, 4),w_ref)
+        arg[(0, 0, 0)]=0.928565661443*x[0] + (0.526337940495)*x[1]
+        ref[(0, 0, 0)]=0.928565661443*x_ref[0] + (0.526337940495)*x_ref[1]
+        arg[(0, 0, 1)]=0.801449855519*x[0] + (-0.651662718795)*x[1]
+        ref[(0, 0, 1)]=0.801449855519*x_ref[0] + (-0.651662718795)*x_ref[1]
+        arg[(0, 0, 2)]=0.750924330614*x[0] + (-0.737801325916)*x[1]
+        ref[(0, 0, 2)]=0.750924330614*x_ref[0] + (-0.737801325916)*x_ref[1]
+        arg[(0, 0, 3)]=-0.267323997227*x[0] + (0.0950614932358)*x[1]
+        ref[(0, 0, 3)]=-0.267323997227*x_ref[0] + (0.0950614932358)*x_ref[1]
+        arg[(0, 1, 0)]=0.410386566685*x[0] + (-0.423036543022)*x[1]
+        ref[(0, 1, 0)]=0.410386566685*x_ref[0] + (-0.423036543022)*x_ref[1]
+        arg[(0, 1, 1)]=0.304177654786*x[0] + (0.787382372554)*x[1]
+        ref[(0, 1, 1)]=0.304177654786*x_ref[0] + (0.787382372554)*x_ref[1]
+        arg[(0, 1, 2)]=0.0927448622961*x[0] + (-0.0591965621066)*x[1]
+        ref[(0, 1, 2)]=0.0927448622961*x_ref[0] + (-0.0591965621066)*x_ref[1]
+        arg[(0, 1, 3)]=0.895298166559*x[0] + (0.620414694679)*x[1]
+        ref[(0, 1, 3)]=0.895298166559*x_ref[0] + (0.620414694679)*x_ref[1]
+        arg[(0, 2, 0)]=-0.217768836826*x[0] + (0.628257403967)*x[1]
+        ref[(0, 2, 0)]=-0.217768836826*x_ref[0] + (0.628257403967)*x_ref[1]
+        arg[(0, 2, 1)]=0.60861130942*x[0] + (0.878143238019)*x[1]
+        ref[(0, 2, 1)]=0.60861130942*x_ref[0] + (0.878143238019)*x_ref[1]
+        arg[(0, 2, 2)]=0.863274794843*x[0] + (-0.599233333785)*x[1]
+        ref[(0, 2, 2)]=0.863274794843*x_ref[0] + (-0.599233333785)*x_ref[1]
+        arg[(0, 2, 3)]=-0.997359943887*x[0] + (-0.0773286442827)*x[1]
+        ref[(0, 2, 3)]=-0.997359943887*x_ref[0] + (-0.0773286442827)*x_ref[1]
+        arg[(0, 3, 0)]=0.304578433046*x[0] + (0.931611814754)*x[1]
+        ref[(0, 3, 0)]=0.304578433046*x_ref[0] + (0.931611814754)*x_ref[1]
+        arg[(0, 3, 1)]=0.423030266365*x[0] + (-0.593950112354)*x[1]
+        ref[(0, 3, 1)]=0.423030266365*x_ref[0] + (-0.593950112354)*x_ref[1]
+        arg[(0, 3, 2)]=-0.722561710034*x[0] + (0.95724655426)*x[1]
+        ref[(0, 3, 2)]=-0.722561710034*x_ref[0] + (0.95724655426)*x_ref[1]
+        arg[(0, 3, 3)]=-0.629067041149*x[0] + (0.224674819344)*x[1]
+        ref[(0, 3, 3)]=-0.629067041149*x_ref[0] + (0.224674819344)*x_ref[1]
+        arg[(1, 0, 0)]=0.119670292753*x[0] + (-0.251773441893)*x[1]
+        ref[(1, 0, 0)]=0.119670292753*x_ref[0] + (-0.251773441893)*x_ref[1]
+        arg[(1, 0, 1)]=-0.292144611753*x[0] + (0.0526928163491)*x[1]
+        ref[(1, 0, 1)]=-0.292144611753*x_ref[0] + (0.0526928163491)*x_ref[1]
+        arg[(1, 0, 2)]=-0.858819068257*x[0] + (0.536308244056)*x[1]
+        ref[(1, 0, 2)]=-0.858819068257*x_ref[0] + (0.536308244056)*x_ref[1]
+        arg[(1, 0, 3)]=-0.00424806558931*x[0] + (-0.88756935684)*x[1]
+        ref[(1, 0, 3)]=-0.00424806558931*x_ref[0] + (-0.88756935684)*x_ref[1]
+        arg[(1, 1, 0)]=-0.588054962242*x[0] + (0.151582410861)*x[1]
+        ref[(1, 1, 0)]=-0.588054962242*x_ref[0] + (0.151582410861)*x_ref[1]
+        arg[(1, 1, 1)]=-0.55170883703*x[0] + (0.484223095226)*x[1]
+        ref[(1, 1, 1)]=-0.55170883703*x_ref[0] + (0.484223095226)*x_ref[1]
+        arg[(1, 1, 2)]=-0.522755725728*x[0] + (-0.251664382021)*x[1]
+        ref[(1, 1, 2)]=-0.522755725728*x_ref[0] + (-0.251664382021)*x_ref[1]
+        arg[(1, 1, 3)]=-0.784213375511*x[0] + (0.638257042949)*x[1]
+        ref[(1, 1, 3)]=-0.784213375511*x_ref[0] + (0.638257042949)*x_ref[1]
+        arg[(1, 2, 0)]=0.694108435601*x[0] + (-0.480871402414)*x[1]
+        ref[(1, 2, 0)]=0.694108435601*x_ref[0] + (-0.480871402414)*x_ref[1]
+        arg[(1, 2, 1)]=0.18308311519*x[0] + (-0.190309487095)*x[1]
+        ref[(1, 2, 1)]=0.18308311519*x_ref[0] + (-0.190309487095)*x_ref[1]
+        arg[(1, 2, 2)]=-0.218113924268*x[0] + (0.658959922036)*x[1]
+        ref[(1, 2, 2)]=-0.218113924268*x_ref[0] + (0.658959922036)*x_ref[1]
+        arg[(1, 2, 3)]=0.261058120098*x[0] + (0.102527973785)*x[1]
+        ref[(1, 2, 3)]=0.261058120098*x_ref[0] + (0.102527973785)*x_ref[1]
+        arg[(1, 3, 0)]=0.0345117953971*x[0] + (0.0178577260852)*x[1]
+        ref[(1, 3, 0)]=0.0345117953971*x_ref[0] + (0.0178577260852)*x_ref[1]
+        arg[(1, 3, 1)]=-0.343331681341*x[0] + (0.267475984915)*x[1]
+        ref[(1, 3, 1)]=-0.343331681341*x_ref[0] + (0.267475984915)*x_ref[1]
+        arg[(1, 3, 2)]=0.657000841036*x[0] + (0.281308582059)*x[1]
+        ref[(1, 3, 2)]=0.657000841036*x_ref[0] + (0.281308582059)*x_ref[1]
+        arg[(1, 3, 3)]=0.287938380042*x[0] + (0.745857033844)*x[1]
+        ref[(1, 3, 3)]=0.287938380042*x_ref[0] + (0.745857033844)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.572308938016*x[2]
+            ref[(0, 0, 0)]+=-0.572308938016*x_ref[2]
+            arg[(0, 0, 1)]+=-0.403081118353*x[2]
+            ref[(0, 0, 1)]+=-0.403081118353*x_ref[2]
+            arg[(0, 0, 2)]+=0.456948533742*x[2]
+            ref[(0, 0, 2)]+=0.456948533742*x_ref[2]
+            arg[(0, 0, 3)]+=-0.11695597625*x[2]
+            ref[(0, 0, 3)]+=-0.11695597625*x_ref[2]
+            arg[(0, 1, 0)]+=-0.0214960051008*x[2]
+            ref[(0, 1, 0)]+=-0.0214960051008*x_ref[2]
+            arg[(0, 1, 1)]+=0.189819352517*x[2]
+            ref[(0, 1, 1)]+=0.189819352517*x_ref[2]
+            arg[(0, 1, 2)]+=0.281854120817*x[2]
+            ref[(0, 1, 2)]+=0.281854120817*x_ref[2]
+            arg[(0, 1, 3)]+=-0.744121834273*x[2]
+            ref[(0, 1, 3)]+=-0.744121834273*x_ref[2]
+            arg[(0, 2, 0)]+=0.919158563944*x[2]
+            ref[(0, 2, 0)]+=0.919158563944*x_ref[2]
+            arg[(0, 2, 1)]+=-0.837154108266*x[2]
+            ref[(0, 2, 1)]+=-0.837154108266*x_ref[2]
+            arg[(0, 2, 2)]+=-0.0933367315525*x[2]
+            ref[(0, 2, 2)]+=-0.0933367315525*x_ref[2]
+            arg[(0, 2, 3)]+=-0.00866721515839*x[2]
+            ref[(0, 2, 3)]+=-0.00866721515839*x_ref[2]
+            arg[(0, 3, 0)]+=-0.395075015466*x[2]
+            ref[(0, 3, 0)]+=-0.395075015466*x_ref[2]
+            arg[(0, 3, 1)]+=0.966589477369*x[2]
+            ref[(0, 3, 1)]+=0.966589477369*x_ref[2]
+            arg[(0, 3, 2)]+=-0.294983001973*x[2]
+            ref[(0, 3, 2)]+=-0.294983001973*x_ref[2]
+            arg[(0, 3, 3)]+=-0.385081146505*x[2]
+            ref[(0, 3, 3)]+=-0.385081146505*x_ref[2]
+            arg[(1, 0, 0)]+=-0.4149015541*x[2]
+            ref[(1, 0, 0)]+=-0.4149015541*x_ref[2]
+            arg[(1, 0, 1)]+=0.685013616371*x[2]
+            ref[(1, 0, 1)]+=0.685013616371*x_ref[2]
+            arg[(1, 0, 2)]+=0.803720628182*x[2]
+            ref[(1, 0, 2)]+=0.803720628182*x_ref[2]
+            arg[(1, 0, 3)]+=-0.085884269116*x[2]
+            ref[(1, 0, 3)]+=-0.085884269116*x_ref[2]
+            arg[(1, 1, 0)]+=0.968711058428*x[2]
+            ref[(1, 1, 0)]+=0.968711058428*x_ref[2]
+            arg[(1, 1, 1)]+=-0.196809385987*x[2]
+            ref[(1, 1, 1)]+=-0.196809385987*x_ref[2]
+            arg[(1, 1, 2)]+=-0.516925912957*x[2]
+            ref[(1, 1, 2)]+=-0.516925912957*x_ref[2]
+            arg[(1, 1, 3)]+=-0.999814562424*x[2]
+            ref[(1, 1, 3)]+=-0.999814562424*x_ref[2]
+            arg[(1, 2, 0)]+=-0.0301827970414*x[2]
+            ref[(1, 2, 0)]+=-0.0301827970414*x_ref[2]
+            arg[(1, 2, 1)]+=0.914055002634*x[2]
+            ref[(1, 2, 1)]+=0.914055002634*x_ref[2]
+            arg[(1, 2, 2)]+=0.375928154263*x[2]
+            ref[(1, 2, 2)]+=0.375928154263*x_ref[2]
+            arg[(1, 2, 3)]+=-0.290611775511*x[2]
+            ref[(1, 2, 3)]+=-0.290611775511*x_ref[2]
+            arg[(1, 3, 0)]+=-0.349208237739*x[2]
+            ref[(1, 3, 0)]+=-0.349208237739*x_ref[2]
+            arg[(1, 3, 1)]+=-0.701642994007*x[2]
+            ref[(1, 3, 1)]+=-0.701642994007*x_ref[2]
+            arg[(1, 3, 2)]+=0.899863282894*x[2]
+            ref[(1, 3, 2)]+=0.899863282894*x_ref[2]
+            arg[(1, 3, 3)]+=-0.832948662506*x[2]
+            ref[(1, 3, 3)]+=-0.832948662506*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 3, 2),w)
+        ref = Data(0,(2, 2, 3, 2),w_ref)
+        arg[(0, 0, 0, 0)]=-0.173192148455*x[0] + (0.2218731191)*x[1]
+        ref[(0, 0, 0, 0)]=-0.173192148455*x_ref[0] + (0.2218731191)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.213357395031*x[0] + (-0.566432223975)*x[1]
+        ref[(0, 0, 0, 1)]=-0.213357395031*x_ref[0] + (-0.566432223975)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.3548923833*x[0] + (0.977033927565)*x[1]
+        ref[(0, 0, 1, 0)]=0.3548923833*x_ref[0] + (0.977033927565)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.884747310252*x[0] + (-0.522064007759)*x[1]
+        ref[(0, 0, 1, 1)]=-0.884747310252*x_ref[0] + (-0.522064007759)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.0473000310557*x[0] + (-0.137920148617)*x[1]
+        ref[(0, 0, 2, 0)]=0.0473000310557*x_ref[0] + (-0.137920148617)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.593926588516*x[0] + (0.530409475403)*x[1]
+        ref[(0, 0, 2, 1)]=-0.593926588516*x_ref[0] + (0.530409475403)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.1181606728*x[0] + (0.594419309122)*x[1]
+        ref[(0, 1, 0, 0)]=0.1181606728*x_ref[0] + (0.594419309122)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.741714011674*x[0] + (-0.322414879886)*x[1]
+        ref[(0, 1, 0, 1)]=0.741714011674*x_ref[0] + (-0.322414879886)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.746777061816*x[0] + (0.964589474748)*x[1]
+        ref[(0, 1, 1, 0)]=-0.746777061816*x_ref[0] + (0.964589474748)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.856660516821*x[0] + (-0.53474442861)*x[1]
+        ref[(0, 1, 1, 1)]=-0.856660516821*x_ref[0] + (-0.53474442861)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.0565422211351*x[0] + (-0.939563184644)*x[1]
+        ref[(0, 1, 2, 0)]=-0.0565422211351*x_ref[0] + (-0.939563184644)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.11624643143*x[0] + (0.235210233583)*x[1]
+        ref[(0, 1, 2, 1)]=0.11624643143*x_ref[0] + (0.235210233583)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.796005676445*x[0] + (-0.108173587533)*x[1]
+        ref[(1, 0, 0, 0)]=-0.796005676445*x_ref[0] + (-0.108173587533)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.239779068936*x[0] + (-0.656384625567)*x[1]
+        ref[(1, 0, 0, 1)]=-0.239779068936*x_ref[0] + (-0.656384625567)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.869717039621*x[0] + (0.977633876692)*x[1]
+        ref[(1, 0, 1, 0)]=0.869717039621*x_ref[0] + (0.977633876692)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.985760874168*x[0] + (0.805121857109)*x[1]
+        ref[(1, 0, 1, 1)]=-0.985760874168*x_ref[0] + (0.805121857109)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.719592018867*x[0] + (-0.669364861769)*x[1]
+        ref[(1, 0, 2, 0)]=-0.719592018867*x_ref[0] + (-0.669364861769)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.444308486932*x[0] + (0.421099036018)*x[1]
+        ref[(1, 0, 2, 1)]=-0.444308486932*x_ref[0] + (0.421099036018)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.197330253544*x[0] + (-0.911511601033)*x[1]
+        ref[(1, 1, 0, 0)]=-0.197330253544*x_ref[0] + (-0.911511601033)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.340908152155*x[0] + (-0.274752251943)*x[1]
+        ref[(1, 1, 0, 1)]=-0.340908152155*x_ref[0] + (-0.274752251943)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.5722121934*x[0] + (-0.480676990301)*x[1]
+        ref[(1, 1, 1, 0)]=0.5722121934*x_ref[0] + (-0.480676990301)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.113846043505*x[0] + (-0.742050031466)*x[1]
+        ref[(1, 1, 1, 1)]=-0.113846043505*x_ref[0] + (-0.742050031466)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.441432904862*x[0] + (-0.141345825647)*x[1]
+        ref[(1, 1, 2, 0)]=-0.441432904862*x_ref[0] + (-0.141345825647)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.120512974632*x[0] + (-0.567943821884)*x[1]
+        ref[(1, 1, 2, 1)]=0.120512974632*x_ref[0] + (-0.567943821884)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.0786664800174*x[2]
+            ref[(0, 0, 0, 0)]+=0.0786664800174*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.610149729118*x[2]
+            ref[(0, 0, 0, 1)]+=-0.610149729118*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.609932065598*x[2]
+            ref[(0, 0, 1, 0)]+=-0.609932065598*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.88996323741*x[2]
+            ref[(0, 0, 1, 1)]+=0.88996323741*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.7160823712*x[2]
+            ref[(0, 0, 2, 0)]+=-0.7160823712*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.110880733288*x[2]
+            ref[(0, 0, 2, 1)]+=0.110880733288*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.402536308926*x[2]
+            ref[(0, 1, 0, 0)]+=-0.402536308926*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.230917758881*x[2]
+            ref[(0, 1, 0, 1)]+=0.230917758881*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.783787438948*x[2]
+            ref[(0, 1, 1, 0)]+=-0.783787438948*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.0973151000337*x[2]
+            ref[(0, 1, 1, 1)]+=0.0973151000337*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.440366053245*x[2]
+            ref[(0, 1, 2, 0)]+=0.440366053245*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.628535789015*x[2]
+            ref[(0, 1, 2, 1)]+=-0.628535789015*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.478459918388*x[2]
+            ref[(1, 0, 0, 0)]+=-0.478459918388*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.62853841721*x[2]
+            ref[(1, 0, 0, 1)]+=-0.62853841721*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.947877669253*x[2]
+            ref[(1, 0, 1, 0)]+=-0.947877669253*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.371302586394*x[2]
+            ref[(1, 0, 1, 1)]+=0.371302586394*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.0365257863792*x[2]
+            ref[(1, 0, 2, 0)]+=0.0365257863792*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.625757345914*x[2]
+            ref[(1, 0, 2, 1)]+=0.625757345914*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.124917133245*x[2]
+            ref[(1, 1, 0, 0)]+=0.124917133245*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.004369631936*x[2]
+            ref[(1, 1, 0, 1)]+=-0.004369631936*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.911763170402*x[2]
+            ref[(1, 1, 1, 0)]+=0.911763170402*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.657937429907*x[2]
+            ref[(1, 1, 1, 1)]+=0.657937429907*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.778974031617*x[2]
+            ref[(1, 1, 2, 0)]+=-0.778974031617*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.0159498999733*x[2]
+            ref[(1, 1, 2, 1)]+=0.0159498999733*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.945685280113*x[0]**o + (0.854161156035)*x[0] + (-0.00337357951258)*x[1]**o + (-0.738965891938)*x[1]
+        ref=0.945685280113*x_ref[0]**o + (0.854161156035)*x_ref[0] + (-0.00337357951258)*x_ref[1]**o + (-0.738965891938)*x_ref[1]
+        if dim==3:
+            arg+=(-0.925424014778)*x[2]**o + (0.745813169098)*x[2]
+            ref+=(-0.925424014778)*x_ref[2]**o + (0.745813169098)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2,),w)
+        ref = Data(0,(2,),w_ref)
+        arg[(0,)]=0.839605875715*x[0]**o + (-0.376383207723)*x[0] + (0.306613068042)*x[1]**o + (0.673524096746)*x[1]
+        ref[(0,)]=0.839605875715*x_ref[0]**o + (-0.376383207723)*x_ref[0] + (0.306613068042)*x_ref[1]**o + (0.673524096746)*x_ref[1]
+        arg[(1,)]=0.120334350427*x[0]**o + (0.25415554019)*x[0] + (-0.912602708107)*x[1]**o + (-0.761787984953)*x[1]
+        ref[(1,)]=0.120334350427*x_ref[0]**o + (0.25415554019)*x_ref[0] + (-0.912602708107)*x_ref[1]**o + (-0.761787984953)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.424307406166*x[2]**o + (0.15132660322)*x[2]
+            ref[(0,)]+=-0.424307406166*x_ref[2]**o + (0.15132660322)*x_ref[2]
+            arg[(1,)]+=-0.627258325056*x[2]**o + (0.563424554048)*x[2]
+            ref[(1,)]+=-0.627258325056*x_ref[2]**o + (0.563424554048)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=0.88101403626*x[0]**o + (-0.966668119023)*x[0] + (0.542200189329)*x[1]**o + (0.698577144905)*x[1]
+        ref[(0, 0)]=0.88101403626*x_ref[0]**o + (-0.966668119023)*x_ref[0] + (0.542200189329)*x_ref[1]**o + (0.698577144905)*x_ref[1]
+        arg[(0, 1)]=-0.404615432934*x[0]**o + (-0.42182772401)*x[0] + (-0.976801241337)*x[1]**o + (0.0405483029985)*x[1]
+        ref[(0, 1)]=-0.404615432934*x_ref[0]**o + (-0.42182772401)*x_ref[0] + (-0.976801241337)*x_ref[1]**o + (0.0405483029985)*x_ref[1]
+        arg[(0, 2)]=-0.38194826046*x[0]**o + (0.92600205293)*x[0] + (-0.40628235092)*x[1]**o + (-0.0904608279035)*x[1]
+        ref[(0, 2)]=-0.38194826046*x_ref[0]**o + (0.92600205293)*x_ref[0] + (-0.40628235092)*x_ref[1]**o + (-0.0904608279035)*x_ref[1]
+        arg[(0, 3)]=-0.362820356666*x[0]**o + (-0.482646554276)*x[0] + (-0.0516019316545)*x[1]**o + (-0.301373036254)*x[1]
+        ref[(0, 3)]=-0.362820356666*x_ref[0]**o + (-0.482646554276)*x_ref[0] + (-0.0516019316545)*x_ref[1]**o + (-0.301373036254)*x_ref[1]
+        arg[(1, 0)]=0.182989125097*x[0]**o + (0.776146096762)*x[0] + (0.874655896595)*x[1]**o + (0.737166314874)*x[1]
+        ref[(1, 0)]=0.182989125097*x_ref[0]**o + (0.776146096762)*x_ref[0] + (0.874655896595)*x_ref[1]**o + (0.737166314874)*x_ref[1]
+        arg[(1, 1)]=-0.00206373264458*x[0]**o + (0.916636907865)*x[0] + (-0.312286597214)*x[1]**o + (0.574618947587)*x[1]
+        ref[(1, 1)]=-0.00206373264458*x_ref[0]**o + (0.916636907865)*x_ref[0] + (-0.312286597214)*x_ref[1]**o + (0.574618947587)*x_ref[1]
+        arg[(1, 2)]=0.590565165523*x[0]**o + (-0.410022250693)*x[0] + (-0.0333478792599)*x[1]**o + (0.955341907594)*x[1]
+        ref[(1, 2)]=0.590565165523*x_ref[0]**o + (-0.410022250693)*x_ref[0] + (-0.0333478792599)*x_ref[1]**o + (0.955341907594)*x_ref[1]
+        arg[(1, 3)]=0.746431135551*x[0]**o + (0.848084129069)*x[0] + (-0.463531584868)*x[1]**o + (0.982506090014)*x[1]
+        ref[(1, 3)]=0.746431135551*x_ref[0]**o + (0.848084129069)*x_ref[0] + (-0.463531584868)*x_ref[1]**o + (0.982506090014)*x_ref[1]
+        arg[(2, 0)]=-0.056854886428*x[0]**o + (0.381611870759)*x[0] + (-0.722746733495)*x[1]**o + (0.336549926933)*x[1]
+        ref[(2, 0)]=-0.056854886428*x_ref[0]**o + (0.381611870759)*x_ref[0] + (-0.722746733495)*x_ref[1]**o + (0.336549926933)*x_ref[1]
+        arg[(2, 1)]=0.538398882324*x[0]**o + (0.89722487677)*x[0] + (0.889771272686)*x[1]**o + (-0.0377695739062)*x[1]
+        ref[(2, 1)]=0.538398882324*x_ref[0]**o + (0.89722487677)*x_ref[0] + (0.889771272686)*x_ref[1]**o + (-0.0377695739062)*x_ref[1]
+        arg[(2, 2)]=0.671856661379*x[0]**o + (0.473318723657)*x[0] + (-0.655835871783)*x[1]**o + (-0.492447376291)*x[1]
+        ref[(2, 2)]=0.671856661379*x_ref[0]**o + (0.473318723657)*x_ref[0] + (-0.655835871783)*x_ref[1]**o + (-0.492447376291)*x_ref[1]
+        arg[(2, 3)]=0.871015116351*x[0]**o + (-0.104650812171)*x[0] + (-0.93742520251)*x[1]**o + (0.190744875402)*x[1]
+        ref[(2, 3)]=0.871015116351*x_ref[0]**o + (-0.104650812171)*x_ref[0] + (-0.93742520251)*x_ref[1]**o + (0.190744875402)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.517714337572*x[2]**o + (-0.748284055112)*x[2]
+            ref[(0, 0)]+=-0.517714337572*x_ref[2]**o + (-0.748284055112)*x_ref[2]
+            arg[(0, 1)]+=-0.624583453055*x[2]**o + (-0.912108863943)*x[2]
+            ref[(0, 1)]+=-0.624583453055*x_ref[2]**o + (-0.912108863943)*x_ref[2]
+            arg[(0, 2)]+=-0.120014011066*x[2]**o + (0.390425957255)*x[2]
+            ref[(0, 2)]+=-0.120014011066*x_ref[2]**o + (0.390425957255)*x_ref[2]
+            arg[(0, 3)]+=0.864932315932*x[2]**o + (-0.504099812684)*x[2]
+            ref[(0, 3)]+=0.864932315932*x_ref[2]**o + (-0.504099812684)*x_ref[2]
+            arg[(1, 0)]+=-0.736282378243*x[2]**o + (-0.727463684906)*x[2]
+            ref[(1, 0)]+=-0.736282378243*x_ref[2]**o + (-0.727463684906)*x_ref[2]
+            arg[(1, 1)]+=0.0430439086406*x[2]**o + (0.8657953283)*x[2]
+            ref[(1, 1)]+=0.0430439086406*x_ref[2]**o + (0.8657953283)*x_ref[2]
+            arg[(1, 2)]+=0.130755929102*x[2]**o + (0.391259668373)*x[2]
+            ref[(1, 2)]+=0.130755929102*x_ref[2]**o + (0.391259668373)*x_ref[2]
+            arg[(1, 3)]+=-0.0322949483955*x[2]**o + (0.970333320401)*x[2]
+            ref[(1, 3)]+=-0.0322949483955*x_ref[2]**o + (0.970333320401)*x_ref[2]
+            arg[(2, 0)]+=0.718806407702*x[2]**o + (-0.742765403477)*x[2]
+            ref[(2, 0)]+=0.718806407702*x_ref[2]**o + (-0.742765403477)*x_ref[2]
+            arg[(2, 1)]+=0.210775077172*x[2]**o + (-0.641972413777)*x[2]
+            ref[(2, 1)]+=0.210775077172*x_ref[2]**o + (-0.641972413777)*x_ref[2]
+            arg[(2, 2)]+=0.546787967673*x[2]**o + (-0.115890244518)*x[2]
+            ref[(2, 2)]+=0.546787967673*x_ref[2]**o + (-0.115890244518)*x_ref[2]
+            arg[(2, 3)]+=-0.324885171827*x[2]**o + (0.977493227892)*x[2]
+            ref[(2, 3)]+=-0.324885171827*x_ref[2]**o + (0.977493227892)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=0.941149670481*x[0]**o + (0.782006598085)*x[0] + (-0.801038960261)*x[1]**o + (0.0993117358092)*x[1]
+        ref[(0, 0, 0)]=0.941149670481*x_ref[0]**o + (0.782006598085)*x_ref[0] + (-0.801038960261)*x_ref[1]**o + (0.0993117358092)*x_ref[1]
+        arg[(0, 0, 1)]=0.32878734794*x[0]**o + (-0.520013685436)*x[0] + (0.311143791072)*x[1]**o + (-0.208625222398)*x[1]
+        ref[(0, 0, 1)]=0.32878734794*x_ref[0]**o + (-0.520013685436)*x_ref[0] + (0.311143791072)*x_ref[1]**o + (-0.208625222398)*x_ref[1]
+        arg[(0, 0, 2)]=-0.500537015896*x[0]**o + (0.334654289611)*x[0] + (0.917763237174)*x[1]**o + (-0.333556190596)*x[1]
+        ref[(0, 0, 2)]=-0.500537015896*x_ref[0]**o + (0.334654289611)*x_ref[0] + (0.917763237174)*x_ref[1]**o + (-0.333556190596)*x_ref[1]
+        arg[(0, 0, 3)]=0.73974012163*x[0]**o + (0.833462132465)*x[0] + (0.0981056197612)*x[1]**o + (0.560750857255)*x[1]
+        ref[(0, 0, 3)]=0.73974012163*x_ref[0]**o + (0.833462132465)*x_ref[0] + (0.0981056197612)*x_ref[1]**o + (0.560750857255)*x_ref[1]
+        arg[(0, 1, 0)]=0.621897055204*x[0]**o + (-0.510154771296)*x[0] + (-0.716890463713)*x[1]**o + (-0.548742863777)*x[1]
+        ref[(0, 1, 0)]=0.621897055204*x_ref[0]**o + (-0.510154771296)*x_ref[0] + (-0.716890463713)*x_ref[1]**o + (-0.548742863777)*x_ref[1]
+        arg[(0, 1, 1)]=-0.0279820446784*x[0]**o + (0.683715608611)*x[0] + (0.479508446588)*x[1]**o + (0.167672300395)*x[1]
+        ref[(0, 1, 1)]=-0.0279820446784*x_ref[0]**o + (0.683715608611)*x_ref[0] + (0.479508446588)*x_ref[1]**o + (0.167672300395)*x_ref[1]
+        arg[(0, 1, 2)]=-0.0350564286792*x[0]**o + (-0.724885602619)*x[0] + (0.0948915243816)*x[1]**o + (0.290368491603)*x[1]
+        ref[(0, 1, 2)]=-0.0350564286792*x_ref[0]**o + (-0.724885602619)*x_ref[0] + (0.0948915243816)*x_ref[1]**o + (0.290368491603)*x_ref[1]
+        arg[(0, 1, 3)]=-0.760108805524*x[0]**o + (-0.982692566243)*x[0] + (-0.332083356653)*x[1]**o + (0.329860079782)*x[1]
+        ref[(0, 1, 3)]=-0.760108805524*x_ref[0]**o + (-0.982692566243)*x_ref[0] + (-0.332083356653)*x_ref[1]**o + (0.329860079782)*x_ref[1]
+        arg[(0, 2, 0)]=0.670894838123*x[0]**o + (0.684913956536)*x[0] + (0.0713037971848)*x[1]**o + (-0.0989623901595)*x[1]
+        ref[(0, 2, 0)]=0.670894838123*x_ref[0]**o + (0.684913956536)*x_ref[0] + (0.0713037971848)*x_ref[1]**o + (-0.0989623901595)*x_ref[1]
+        arg[(0, 2, 1)]=0.781635313137*x[0]**o + (-0.374769197131)*x[0] + (-0.514313417998)*x[1]**o + (-0.826023303518)*x[1]
+        ref[(0, 2, 1)]=0.781635313137*x_ref[0]**o + (-0.374769197131)*x_ref[0] + (-0.514313417998)*x_ref[1]**o + (-0.826023303518)*x_ref[1]
+        arg[(0, 2, 2)]=-0.915631307352*x[0]**o + (-0.845609668015)*x[0] + (0.85193211975)*x[1]**o + (-0.871605696929)*x[1]
+        ref[(0, 2, 2)]=-0.915631307352*x_ref[0]**o + (-0.845609668015)*x_ref[0] + (0.85193211975)*x_ref[1]**o + (-0.871605696929)*x_ref[1]
+        arg[(0, 2, 3)]=-0.416817991246*x[0]**o + (-0.776710390871)*x[0] + (-0.107992885465)*x[1]**o + (0.247233927792)*x[1]
+        ref[(0, 2, 3)]=-0.416817991246*x_ref[0]**o + (-0.776710390871)*x_ref[0] + (-0.107992885465)*x_ref[1]**o + (0.247233927792)*x_ref[1]
+        arg[(1, 0, 0)]=-0.219161672571*x[0]**o + (0.663822738855)*x[0] + (-0.618127299491)*x[1]**o + (0.0310691643496)*x[1]
+        ref[(1, 0, 0)]=-0.219161672571*x_ref[0]**o + (0.663822738855)*x_ref[0] + (-0.618127299491)*x_ref[1]**o + (0.0310691643496)*x_ref[1]
+        arg[(1, 0, 1)]=0.42384362132*x[0]**o + (-0.214071657362)*x[0] + (-0.799633530441)*x[1]**o + (0.20151643074)*x[1]
+        ref[(1, 0, 1)]=0.42384362132*x_ref[0]**o + (-0.214071657362)*x_ref[0] + (-0.799633530441)*x_ref[1]**o + (0.20151643074)*x_ref[1]
+        arg[(1, 0, 2)]=-0.0469445153846*x[0]**o + (-0.732897980777)*x[0] + (0.927897238542)*x[1]**o + (-0.80144789292)*x[1]
+        ref[(1, 0, 2)]=-0.0469445153846*x_ref[0]**o + (-0.732897980777)*x_ref[0] + (0.927897238542)*x_ref[1]**o + (-0.80144789292)*x_ref[1]
+        arg[(1, 0, 3)]=0.959543221774*x[0]**o + (0.679312810172)*x[0] + (-0.15658948325)*x[1]**o + (0.490121433252)*x[1]
+        ref[(1, 0, 3)]=0.959543221774*x_ref[0]**o + (0.679312810172)*x_ref[0] + (-0.15658948325)*x_ref[1]**o + (0.490121433252)*x_ref[1]
+        arg[(1, 1, 0)]=0.0776194954751*x[0]**o + (-0.987409008825)*x[0] + (-0.535675764835)*x[1]**o + (-0.522023429969)*x[1]
+        ref[(1, 1, 0)]=0.0776194954751*x_ref[0]**o + (-0.987409008825)*x_ref[0] + (-0.535675764835)*x_ref[1]**o + (-0.522023429969)*x_ref[1]
+        arg[(1, 1, 1)]=-0.633313850855*x[0]**o + (-0.581555555793)*x[0] + (-0.0521922617452)*x[1]**o + (0.390457617856)*x[1]
+        ref[(1, 1, 1)]=-0.633313850855*x_ref[0]**o + (-0.581555555793)*x_ref[0] + (-0.0521922617452)*x_ref[1]**o + (0.390457617856)*x_ref[1]
+        arg[(1, 1, 2)]=-0.395469625341*x[0]**o + (0.450112624228)*x[0] + (0.473327538339)*x[1]**o + (0.735934107039)*x[1]
+        ref[(1, 1, 2)]=-0.395469625341*x_ref[0]**o + (0.450112624228)*x_ref[0] + (0.473327538339)*x_ref[1]**o + (0.735934107039)*x_ref[1]
+        arg[(1, 1, 3)]=0.0376127776571*x[0]**o + (-0.967394489723)*x[0] + (0.0937420879198)*x[1]**o + (0.0960426996751)*x[1]
+        ref[(1, 1, 3)]=0.0376127776571*x_ref[0]**o + (-0.967394489723)*x_ref[0] + (0.0937420879198)*x_ref[1]**o + (0.0960426996751)*x_ref[1]
+        arg[(1, 2, 0)]=0.371831345438*x[0]**o + (0.676415511442)*x[0] + (-0.280985757432)*x[1]**o + (0.690479268807)*x[1]
+        ref[(1, 2, 0)]=0.371831345438*x_ref[0]**o + (0.676415511442)*x_ref[0] + (-0.280985757432)*x_ref[1]**o + (0.690479268807)*x_ref[1]
+        arg[(1, 2, 1)]=-0.501380259601*x[0]**o + (-0.811677595745)*x[0] + (0.26784084657)*x[1]**o + (-0.0410812858756)*x[1]
+        ref[(1, 2, 1)]=-0.501380259601*x_ref[0]**o + (-0.811677595745)*x_ref[0] + (0.26784084657)*x_ref[1]**o + (-0.0410812858756)*x_ref[1]
+        arg[(1, 2, 2)]=-0.654902806283*x[0]**o + (0.0148879004714)*x[0] + (-0.788524841076)*x[1]**o + (-0.611321780465)*x[1]
+        ref[(1, 2, 2)]=-0.654902806283*x_ref[0]**o + (0.0148879004714)*x_ref[0] + (-0.788524841076)*x_ref[1]**o + (-0.611321780465)*x_ref[1]
+        arg[(1, 2, 3)]=0.053814894929*x[0]**o + (-0.462528044204)*x[0] + (-0.944852310245)*x[1]**o + (0.18065401179)*x[1]
+        ref[(1, 2, 3)]=0.053814894929*x_ref[0]**o + (-0.462528044204)*x_ref[0] + (-0.944852310245)*x_ref[1]**o + (0.18065401179)*x_ref[1]
+        arg[(2, 0, 0)]=-0.774657122988*x[0]**o + (0.634873888387)*x[0] + (-0.333184309081)*x[1]**o + (-0.637737580745)*x[1]
+        ref[(2, 0, 0)]=-0.774657122988*x_ref[0]**o + (0.634873888387)*x_ref[0] + (-0.333184309081)*x_ref[1]**o + (-0.637737580745)*x_ref[1]
+        arg[(2, 0, 1)]=0.358905964014*x[0]**o + (0.960817938699)*x[0] + (-0.439676149434)*x[1]**o + (-0.219647763718)*x[1]
+        ref[(2, 0, 1)]=0.358905964014*x_ref[0]**o + (0.960817938699)*x_ref[0] + (-0.439676149434)*x_ref[1]**o + (-0.219647763718)*x_ref[1]
+        arg[(2, 0, 2)]=0.803283652742*x[0]**o + (-0.338108770778)*x[0] + (-0.30660377652)*x[1]**o + (-0.276977493665)*x[1]
+        ref[(2, 0, 2)]=0.803283652742*x_ref[0]**o + (-0.338108770778)*x_ref[0] + (-0.30660377652)*x_ref[1]**o + (-0.276977493665)*x_ref[1]
+        arg[(2, 0, 3)]=0.23019198698*x[0]**o + (-0.0859933948655)*x[0] + (-0.989879062061)*x[1]**o + (0.172730491543)*x[1]
+        ref[(2, 0, 3)]=0.23019198698*x_ref[0]**o + (-0.0859933948655)*x_ref[0] + (-0.989879062061)*x_ref[1]**o + (0.172730491543)*x_ref[1]
+        arg[(2, 1, 0)]=0.799943114376*x[0]**o + (-0.380941655532)*x[0] + (-0.315378840058)*x[1]**o + (0.308146849859)*x[1]
+        ref[(2, 1, 0)]=0.799943114376*x_ref[0]**o + (-0.380941655532)*x_ref[0] + (-0.315378840058)*x_ref[1]**o + (0.308146849859)*x_ref[1]
+        arg[(2, 1, 1)]=-0.975679940658*x[0]**o + (0.582488491679)*x[0] + (0.55078060847)*x[1]**o + (0.361716030863)*x[1]
+        ref[(2, 1, 1)]=-0.975679940658*x_ref[0]**o + (0.582488491679)*x_ref[0] + (0.55078060847)*x_ref[1]**o + (0.361716030863)*x_ref[1]
+        arg[(2, 1, 2)]=-0.0606415689185*x[0]**o + (-0.47239788243)*x[0] + (0.162220984092)*x[1]**o + (0.301507140466)*x[1]
+        ref[(2, 1, 2)]=-0.0606415689185*x_ref[0]**o + (-0.47239788243)*x_ref[0] + (0.162220984092)*x_ref[1]**o + (0.301507140466)*x_ref[1]
+        arg[(2, 1, 3)]=-0.732243529614*x[0]**o + (0.474666805355)*x[0] + (0.0240638452894)*x[1]**o + (-0.338051893823)*x[1]
+        ref[(2, 1, 3)]=-0.732243529614*x_ref[0]**o + (0.474666805355)*x_ref[0] + (0.0240638452894)*x_ref[1]**o + (-0.338051893823)*x_ref[1]
+        arg[(2, 2, 0)]=0.366425397957*x[0]**o + (-0.11855634638)*x[0] + (-0.501669241224)*x[1]**o + (0.419362984024)*x[1]
+        ref[(2, 2, 0)]=0.366425397957*x_ref[0]**o + (-0.11855634638)*x_ref[0] + (-0.501669241224)*x_ref[1]**o + (0.419362984024)*x_ref[1]
+        arg[(2, 2, 1)]=0.484420309672*x[0]**o + (0.360409963447)*x[0] + (-0.25268960821)*x[1]**o + (-0.499020310696)*x[1]
+        ref[(2, 2, 1)]=0.484420309672*x_ref[0]**o + (0.360409963447)*x_ref[0] + (-0.25268960821)*x_ref[1]**o + (-0.499020310696)*x_ref[1]
+        arg[(2, 2, 2)]=-0.00224172493344*x[0]**o + (-0.224090696651)*x[0] + (-0.586520765291)*x[1]**o + (0.170878748959)*x[1]
+        ref[(2, 2, 2)]=-0.00224172493344*x_ref[0]**o + (-0.224090696651)*x_ref[0] + (-0.586520765291)*x_ref[1]**o + (0.170878748959)*x_ref[1]
+        arg[(2, 2, 3)]=0.417900407904*x[0]**o + (0.0504927800101)*x[0] + (0.981631152276)*x[1]**o + (0.314719737306)*x[1]
+        ref[(2, 2, 3)]=0.417900407904*x_ref[0]**o + (0.0504927800101)*x_ref[0] + (0.981631152276)*x_ref[1]**o + (0.314719737306)*x_ref[1]
+        arg[(3, 0, 0)]=-0.876599281656*x[0]**o + (0.654191890186)*x[0] + (0.529941569315)*x[1]**o + (-0.458908268236)*x[1]
+        ref[(3, 0, 0)]=-0.876599281656*x_ref[0]**o + (0.654191890186)*x_ref[0] + (0.529941569315)*x_ref[1]**o + (-0.458908268236)*x_ref[1]
+        arg[(3, 0, 1)]=-0.707607135905*x[0]**o + (0.986116744831)*x[0] + (-0.464949207397)*x[1]**o + (0.0617282847992)*x[1]
+        ref[(3, 0, 1)]=-0.707607135905*x_ref[0]**o + (0.986116744831)*x_ref[0] + (-0.464949207397)*x_ref[1]**o + (0.0617282847992)*x_ref[1]
+        arg[(3, 0, 2)]=0.211773968172*x[0]**o + (-0.500227946944)*x[0] + (-0.642554069458)*x[1]**o + (0.180256633856)*x[1]
+        ref[(3, 0, 2)]=0.211773968172*x_ref[0]**o + (-0.500227946944)*x_ref[0] + (-0.642554069458)*x_ref[1]**o + (0.180256633856)*x_ref[1]
+        arg[(3, 0, 3)]=-0.102493541069*x[0]**o + (-0.745114195592)*x[0] + (0.274125913411)*x[1]**o + (0.170311536533)*x[1]
+        ref[(3, 0, 3)]=-0.102493541069*x_ref[0]**o + (-0.745114195592)*x_ref[0] + (0.274125913411)*x_ref[1]**o + (0.170311536533)*x_ref[1]
+        arg[(3, 1, 0)]=0.666979014255*x[0]**o + (-0.575923079299)*x[0] + (-0.934032125921)*x[1]**o + (0.74986331242)*x[1]
+        ref[(3, 1, 0)]=0.666979014255*x_ref[0]**o + (-0.575923079299)*x_ref[0] + (-0.934032125921)*x_ref[1]**o + (0.74986331242)*x_ref[1]
+        arg[(3, 1, 1)]=0.720560208548*x[0]**o + (-0.77390093008)*x[0] + (0.0877832965942)*x[1]**o + (0.570248615507)*x[1]
+        ref[(3, 1, 1)]=0.720560208548*x_ref[0]**o + (-0.77390093008)*x_ref[0] + (0.0877832965942)*x_ref[1]**o + (0.570248615507)*x_ref[1]
+        arg[(3, 1, 2)]=0.369624003423*x[0]**o + (0.910926962972)*x[0] + (0.254048596643)*x[1]**o + (-0.910798473745)*x[1]
+        ref[(3, 1, 2)]=0.369624003423*x_ref[0]**o + (0.910926962972)*x_ref[0] + (0.254048596643)*x_ref[1]**o + (-0.910798473745)*x_ref[1]
+        arg[(3, 1, 3)]=-0.356543067173*x[0]**o + (-0.667262661494)*x[0] + (-0.651521090594)*x[1]**o + (-0.625059501035)*x[1]
+        ref[(3, 1, 3)]=-0.356543067173*x_ref[0]**o + (-0.667262661494)*x_ref[0] + (-0.651521090594)*x_ref[1]**o + (-0.625059501035)*x_ref[1]
+        arg[(3, 2, 0)]=-0.535285294611*x[0]**o + (-0.469669491365)*x[0] + (-0.964159871642)*x[1]**o + (-0.00329885354097)*x[1]
+        ref[(3, 2, 0)]=-0.535285294611*x_ref[0]**o + (-0.469669491365)*x_ref[0] + (-0.964159871642)*x_ref[1]**o + (-0.00329885354097)*x_ref[1]
+        arg[(3, 2, 1)]=0.349202401256*x[0]**o + (0.946999958006)*x[0] + (0.43667373089)*x[1]**o + (0.708054945293)*x[1]
+        ref[(3, 2, 1)]=0.349202401256*x_ref[0]**o + (0.946999958006)*x_ref[0] + (0.43667373089)*x_ref[1]**o + (0.708054945293)*x_ref[1]
+        arg[(3, 2, 2)]=-0.826648209643*x[0]**o + (-0.599213498998)*x[0] + (0.17671502632)*x[1]**o + (0.464030723323)*x[1]
+        ref[(3, 2, 2)]=-0.826648209643*x_ref[0]**o + (-0.599213498998)*x_ref[0] + (0.17671502632)*x_ref[1]**o + (0.464030723323)*x_ref[1]
+        arg[(3, 2, 3)]=0.608726967328*x[0]**o + (-0.603701588583)*x[0] + (-0.190586486338)*x[1]**o + (0.131281314265)*x[1]
+        ref[(3, 2, 3)]=0.608726967328*x_ref[0]**o + (-0.603701588583)*x_ref[0] + (-0.190586486338)*x_ref[1]**o + (0.131281314265)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.690782477332*x[2]**o + (0.0268822557512)*x[2]
+            ref[(0, 0, 0)]+=0.690782477332*x_ref[2]**o + (0.0268822557512)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.203858778706*x[2]**o + (-0.269540986822)*x[2]
+            ref[(0, 0, 1)]+=-0.203858778706*x_ref[2]**o + (-0.269540986822)*x_ref[2]
+            arg[(0, 0, 2)]+=0.60332366507*x[2]**o + (0.272699952393)*x[2]
+            ref[(0, 0, 2)]+=0.60332366507*x_ref[2]**o + (0.272699952393)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.480110483989*x[2]**o + (-0.515246235441)*x[2]
+            ref[(0, 0, 3)]+=-0.480110483989*x_ref[2]**o + (-0.515246235441)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.500998745166*x[2]**o + (0.237789314309)*x[2]
+            ref[(0, 1, 0)]+=-0.500998745166*x_ref[2]**o + (0.237789314309)*x_ref[2]
+            arg[(0, 1, 1)]+=0.279029475037*x[2]**o + (-0.900872154197)*x[2]
+            ref[(0, 1, 1)]+=0.279029475037*x_ref[2]**o + (-0.900872154197)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.840725871144*x[2]**o + (-0.396090851699)*x[2]
+            ref[(0, 1, 2)]+=-0.840725871144*x_ref[2]**o + (-0.396090851699)*x_ref[2]
+            arg[(0, 1, 3)]+=0.984547896095*x[2]**o + (-0.471971030844)*x[2]
+            ref[(0, 1, 3)]+=0.984547896095*x_ref[2]**o + (-0.471971030844)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.760255909651*x[2]**o + (-0.559238984569)*x[2]
+            ref[(0, 2, 0)]+=-0.760255909651*x_ref[2]**o + (-0.559238984569)*x_ref[2]
+            arg[(0, 2, 1)]+=-0.293221475725*x[2]**o + (-0.532627649878)*x[2]
+            ref[(0, 2, 1)]+=-0.293221475725*x_ref[2]**o + (-0.532627649878)*x_ref[2]
+            arg[(0, 2, 2)]+=-0.0753425348369*x[2]**o + (0.129168027311)*x[2]
+            ref[(0, 2, 2)]+=-0.0753425348369*x_ref[2]**o + (0.129168027311)*x_ref[2]
+            arg[(0, 2, 3)]+=0.389030445191*x[2]**o + (-0.125546268104)*x[2]
+            ref[(0, 2, 3)]+=0.389030445191*x_ref[2]**o + (-0.125546268104)*x_ref[2]
+            arg[(1, 0, 0)]+=0.592716903269*x[2]**o + (0.369890306826)*x[2]
+            ref[(1, 0, 0)]+=0.592716903269*x_ref[2]**o + (0.369890306826)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.244419943902*x[2]**o + (-0.0626117893091)*x[2]
+            ref[(1, 0, 1)]+=-0.244419943902*x_ref[2]**o + (-0.0626117893091)*x_ref[2]
+            arg[(1, 0, 2)]+=0.302271094866*x[2]**o + (0.650630553929)*x[2]
+            ref[(1, 0, 2)]+=0.302271094866*x_ref[2]**o + (0.650630553929)*x_ref[2]
+            arg[(1, 0, 3)]+=0.856641830412*x[2]**o + (0.883860627408)*x[2]
+            ref[(1, 0, 3)]+=0.856641830412*x_ref[2]**o + (0.883860627408)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.555377000301*x[2]**o + (-0.620404202146)*x[2]
+            ref[(1, 1, 0)]+=-0.555377000301*x_ref[2]**o + (-0.620404202146)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.968456318891*x[2]**o + (0.444477187421)*x[2]
+            ref[(1, 1, 1)]+=-0.968456318891*x_ref[2]**o + (0.444477187421)*x_ref[2]
+            arg[(1, 1, 2)]+=0.613494718728*x[2]**o + (0.633688375422)*x[2]
+            ref[(1, 1, 2)]+=0.613494718728*x_ref[2]**o + (0.633688375422)*x_ref[2]
+            arg[(1, 1, 3)]+=0.772235775531*x[2]**o + (-0.666222546761)*x[2]
+            ref[(1, 1, 3)]+=0.772235775531*x_ref[2]**o + (-0.666222546761)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.912062415742*x[2]**o + (-0.743135594482)*x[2]
+            ref[(1, 2, 0)]+=-0.912062415742*x_ref[2]**o + (-0.743135594482)*x_ref[2]
+            arg[(1, 2, 1)]+=-0.692314417233*x[2]**o + (0.756172275073)*x[2]
+            ref[(1, 2, 1)]+=-0.692314417233*x_ref[2]**o + (0.756172275073)*x_ref[2]
+            arg[(1, 2, 2)]+=0.98278999212*x[2]**o + (0.577638825629)*x[2]
+            ref[(1, 2, 2)]+=0.98278999212*x_ref[2]**o + (0.577638825629)*x_ref[2]
+            arg[(1, 2, 3)]+=0.268254267267*x[2]**o + (0.1635032162)*x[2]
+            ref[(1, 2, 3)]+=0.268254267267*x_ref[2]**o + (0.1635032162)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.153402799959*x[2]**o + (-0.951000496246)*x[2]
+            ref[(2, 0, 0)]+=-0.153402799959*x_ref[2]**o + (-0.951000496246)*x_ref[2]
+            arg[(2, 0, 1)]+=-0.714920962825*x[2]**o + (0.128863272404)*x[2]
+            ref[(2, 0, 1)]+=-0.714920962825*x_ref[2]**o + (0.128863272404)*x_ref[2]
+            arg[(2, 0, 2)]+=0.0427378564319*x[2]**o + (0.733941410342)*x[2]
+            ref[(2, 0, 2)]+=0.0427378564319*x_ref[2]**o + (0.733941410342)*x_ref[2]
+            arg[(2, 0, 3)]+=0.747695744923*x[2]**o + (-0.250384680079)*x[2]
+            ref[(2, 0, 3)]+=0.747695744923*x_ref[2]**o + (-0.250384680079)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.134885559398*x[2]**o + (-0.00455545356756)*x[2]
+            ref[(2, 1, 0)]+=-0.134885559398*x_ref[2]**o + (-0.00455545356756)*x_ref[2]
+            arg[(2, 1, 1)]+=0.219562905935*x[2]**o + (-0.211004993888)*x[2]
+            ref[(2, 1, 1)]+=0.219562905935*x_ref[2]**o + (-0.211004993888)*x_ref[2]
+            arg[(2, 1, 2)]+=0.178632169094*x[2]**o + (-0.294572155631)*x[2]
+            ref[(2, 1, 2)]+=0.178632169094*x_ref[2]**o + (-0.294572155631)*x_ref[2]
+            arg[(2, 1, 3)]+=-0.615127778722*x[2]**o + (0.978216595752)*x[2]
+            ref[(2, 1, 3)]+=-0.615127778722*x_ref[2]**o + (0.978216595752)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.423031992659*x[2]**o + (-0.765602862709)*x[2]
+            ref[(2, 2, 0)]+=-0.423031992659*x_ref[2]**o + (-0.765602862709)*x_ref[2]
+            arg[(2, 2, 1)]+=-0.789109321176*x[2]**o + (0.634703695704)*x[2]
+            ref[(2, 2, 1)]+=-0.789109321176*x_ref[2]**o + (0.634703695704)*x_ref[2]
+            arg[(2, 2, 2)]+=-0.51173170939*x[2]**o + (0.636674422821)*x[2]
+            ref[(2, 2, 2)]+=-0.51173170939*x_ref[2]**o + (0.636674422821)*x_ref[2]
+            arg[(2, 2, 3)]+=0.920562397958*x[2]**o + (-0.590981243252)*x[2]
+            ref[(2, 2, 3)]+=0.920562397958*x_ref[2]**o + (-0.590981243252)*x_ref[2]
+            arg[(3, 0, 0)]+=-0.946051059722*x[2]**o + (0.511294083147)*x[2]
+            ref[(3, 0, 0)]+=-0.946051059722*x_ref[2]**o + (0.511294083147)*x_ref[2]
+            arg[(3, 0, 1)]+=0.986330940883*x[2]**o + (0.543101538329)*x[2]
+            ref[(3, 0, 1)]+=0.986330940883*x_ref[2]**o + (0.543101538329)*x_ref[2]
+            arg[(3, 0, 2)]+=0.926948753976*x[2]**o + (-0.780099827303)*x[2]
+            ref[(3, 0, 2)]+=0.926948753976*x_ref[2]**o + (-0.780099827303)*x_ref[2]
+            arg[(3, 0, 3)]+=-0.312423644847*x[2]**o + (0.624618367156)*x[2]
+            ref[(3, 0, 3)]+=-0.312423644847*x_ref[2]**o + (0.624618367156)*x_ref[2]
+            arg[(3, 1, 0)]+=0.186519909488*x[2]**o + (-0.832373019837)*x[2]
+            ref[(3, 1, 0)]+=0.186519909488*x_ref[2]**o + (-0.832373019837)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.0687128951268*x[2]**o + (0.38291725509)*x[2]
+            ref[(3, 1, 1)]+=-0.0687128951268*x_ref[2]**o + (0.38291725509)*x_ref[2]
+            arg[(3, 1, 2)]+=0.0404203996605*x[2]**o + (0.442217983541)*x[2]
+            ref[(3, 1, 2)]+=0.0404203996605*x_ref[2]**o + (0.442217983541)*x_ref[2]
+            arg[(3, 1, 3)]+=-0.643183515455*x[2]**o + (-0.842403752468)*x[2]
+            ref[(3, 1, 3)]+=-0.643183515455*x_ref[2]**o + (-0.842403752468)*x_ref[2]
+            arg[(3, 2, 0)]+=0.312647693625*x[2]**o + (-0.497099179855)*x[2]
+            ref[(3, 2, 0)]+=0.312647693625*x_ref[2]**o + (-0.497099179855)*x_ref[2]
+            arg[(3, 2, 1)]+=-0.251049600525*x[2]**o + (-0.224453250333)*x[2]
+            ref[(3, 2, 1)]+=-0.251049600525*x_ref[2]**o + (-0.224453250333)*x_ref[2]
+            arg[(3, 2, 2)]+=0.420879074392*x[2]**o + (-0.890127677103)*x[2]
+            ref[(3, 2, 2)]+=0.420879074392*x_ref[2]**o + (-0.890127677103)*x_ref[2]
+            arg[(3, 2, 3)]+=-0.442783128387*x[2]**o + (0.579864555185)*x[2]
+            ref[(3, 2, 3)]+=-0.442783128387*x_ref[2]**o + (0.579864555185)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 3, 4),w)
+        ref = Data(0,(2, 3, 3, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.475873326195*x[0]**o + (-0.25459848093)*x[0] + (0.808256401965)*x[1]**o + (0.0915419753649)*x[1]
+        ref[(0, 0, 0, 0)]=-0.475873326195*x_ref[0]**o + (-0.25459848093)*x_ref[0] + (0.808256401965)*x_ref[1]**o + (0.0915419753649)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.59349041997*x[0]**o + (0.921366948301)*x[0] + (-0.416922172111)*x[1]**o + (-0.555658808397)*x[1]
+        ref[(0, 0, 0, 1)]=0.59349041997*x_ref[0]**o + (0.921366948301)*x_ref[0] + (-0.416922172111)*x_ref[1]**o + (-0.555658808397)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.326477608861*x[0]**o + (-0.572782109749)*x[0] + (-0.505001551049)*x[1]**o + (-0.252526718694)*x[1]
+        ref[(0, 0, 0, 2)]=-0.326477608861*x_ref[0]**o + (-0.572782109749)*x_ref[0] + (-0.505001551049)*x_ref[1]**o + (-0.252526718694)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.968031852522*x[0]**o + (-0.598720057415)*x[0] + (-0.222012932861)*x[1]**o + (-0.129199040525)*x[1]
+        ref[(0, 0, 0, 3)]=0.968031852522*x_ref[0]**o + (-0.598720057415)*x_ref[0] + (-0.222012932861)*x_ref[1]**o + (-0.129199040525)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.406652395684*x[0]**o + (-0.538206530626)*x[0] + (-0.466036556926)*x[1]**o + (-0.447431628945)*x[1]
+        ref[(0, 0, 1, 0)]=0.406652395684*x_ref[0]**o + (-0.538206530626)*x_ref[0] + (-0.466036556926)*x_ref[1]**o + (-0.447431628945)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.494756075516*x[0]**o + (0.301928845543)*x[0] + (0.228793686511)*x[1]**o + (-0.52215129289)*x[1]
+        ref[(0, 0, 1, 1)]=0.494756075516*x_ref[0]**o + (0.301928845543)*x_ref[0] + (0.228793686511)*x_ref[1]**o + (-0.52215129289)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.0348333755553*x[0]**o + (-0.16814924338)*x[0] + (-0.728118836271)*x[1]**o + (-0.762904085786)*x[1]
+        ref[(0, 0, 1, 2)]=0.0348333755553*x_ref[0]**o + (-0.16814924338)*x_ref[0] + (-0.728118836271)*x_ref[1]**o + (-0.762904085786)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.0735027560622*x[0]**o + (0.631489794936)*x[0] + (-0.495089093735)*x[1]**o + (-0.27763211513)*x[1]
+        ref[(0, 0, 1, 3)]=0.0735027560622*x_ref[0]**o + (0.631489794936)*x_ref[0] + (-0.495089093735)*x_ref[1]**o + (-0.27763211513)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.648954885676*x[0]**o + (-0.110766978832)*x[0] + (0.487838428827)*x[1]**o + (-0.335520567147)*x[1]
+        ref[(0, 0, 2, 0)]=-0.648954885676*x_ref[0]**o + (-0.110766978832)*x_ref[0] + (0.487838428827)*x_ref[1]**o + (-0.335520567147)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.93703881306*x[0]**o + (-0.0124956627072)*x[0] + (0.046580991118)*x[1]**o + (-0.024597490531)*x[1]
+        ref[(0, 0, 2, 1)]=0.93703881306*x_ref[0]**o + (-0.0124956627072)*x_ref[0] + (0.046580991118)*x_ref[1]**o + (-0.024597490531)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.906558123269*x[0]**o + (-0.0752015042967)*x[0] + (-0.679214278446)*x[1]**o + (-0.0697182460268)*x[1]
+        ref[(0, 0, 2, 2)]=0.906558123269*x_ref[0]**o + (-0.0752015042967)*x_ref[0] + (-0.679214278446)*x_ref[1]**o + (-0.0697182460268)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.217688332904*x[0]**o + (-0.112382118371)*x[0] + (-0.229466021485)*x[1]**o + (0.311229060841)*x[1]
+        ref[(0, 0, 2, 3)]=-0.217688332904*x_ref[0]**o + (-0.112382118371)*x_ref[0] + (-0.229466021485)*x_ref[1]**o + (0.311229060841)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.397590636664*x[0]**o + (-0.408285619151)*x[0] + (0.768968087635)*x[1]**o + (-0.87721799892)*x[1]
+        ref[(0, 1, 0, 0)]=-0.397590636664*x_ref[0]**o + (-0.408285619151)*x_ref[0] + (0.768968087635)*x_ref[1]**o + (-0.87721799892)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.608514626348*x[0]**o + (-0.595020814146)*x[0] + (0.932603363642)*x[1]**o + (-0.86581297269)*x[1]
+        ref[(0, 1, 0, 1)]=0.608514626348*x_ref[0]**o + (-0.595020814146)*x_ref[0] + (0.932603363642)*x_ref[1]**o + (-0.86581297269)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.316030814467*x[0]**o + (-0.281049929804)*x[0] + (0.556469470511)*x[1]**o + (-0.981817261982)*x[1]
+        ref[(0, 1, 0, 2)]=0.316030814467*x_ref[0]**o + (-0.281049929804)*x_ref[0] + (0.556469470511)*x_ref[1]**o + (-0.981817261982)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.658225326772*x[0]**o + (0.312973094361)*x[0] + (0.0442633289916)*x[1]**o + (0.756033922962)*x[1]
+        ref[(0, 1, 0, 3)]=0.658225326772*x_ref[0]**o + (0.312973094361)*x_ref[0] + (0.0442633289916)*x_ref[1]**o + (0.756033922962)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.445929140612*x[0]**o + (-0.423794921033)*x[0] + (0.178483089237)*x[1]**o + (-0.766014046491)*x[1]
+        ref[(0, 1, 1, 0)]=0.445929140612*x_ref[0]**o + (-0.423794921033)*x_ref[0] + (0.178483089237)*x_ref[1]**o + (-0.766014046491)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.218496526429*x[0]**o + (-0.954395042641)*x[0] + (0.0518994085396)*x[1]**o + (-0.161614620425)*x[1]
+        ref[(0, 1, 1, 1)]=0.218496526429*x_ref[0]**o + (-0.954395042641)*x_ref[0] + (0.0518994085396)*x_ref[1]**o + (-0.161614620425)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.526496104899*x[0]**o + (-0.674643823158)*x[0] + (-0.228108392755)*x[1]**o + (-0.964306317364)*x[1]
+        ref[(0, 1, 1, 2)]=0.526496104899*x_ref[0]**o + (-0.674643823158)*x_ref[0] + (-0.228108392755)*x_ref[1]**o + (-0.964306317364)*x_ref[1]
+        arg[(0, 1, 1, 3)]=-0.639107355833*x[0]**o + (0.977401058322)*x[0] + (0.574298877549)*x[1]**o + (-0.889821108237)*x[1]
+        ref[(0, 1, 1, 3)]=-0.639107355833*x_ref[0]**o + (0.977401058322)*x_ref[0] + (0.574298877549)*x_ref[1]**o + (-0.889821108237)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.156777660908*x[0]**o + (0.100465828124)*x[0] + (0.206098671085)*x[1]**o + (0.0989156397479)*x[1]
+        ref[(0, 1, 2, 0)]=-0.156777660908*x_ref[0]**o + (0.100465828124)*x_ref[0] + (0.206098671085)*x_ref[1]**o + (0.0989156397479)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.966923879115*x[0]**o + (0.287501732976)*x[0] + (0.136103858932)*x[1]**o + (0.405337713219)*x[1]
+        ref[(0, 1, 2, 1)]=0.966923879115*x_ref[0]**o + (0.287501732976)*x_ref[0] + (0.136103858932)*x_ref[1]**o + (0.405337713219)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.140245143689*x[0]**o + (0.903503258455)*x[0] + (0.114390789304)*x[1]**o + (-0.170896509723)*x[1]
+        ref[(0, 1, 2, 2)]=-0.140245143689*x_ref[0]**o + (0.903503258455)*x_ref[0] + (0.114390789304)*x_ref[1]**o + (-0.170896509723)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.049704521361*x[0]**o + (0.910663554572)*x[0] + (0.0316167671501)*x[1]**o + (-0.991741980592)*x[1]
+        ref[(0, 1, 2, 3)]=-0.049704521361*x_ref[0]**o + (0.910663554572)*x_ref[0] + (0.0316167671501)*x_ref[1]**o + (-0.991741980592)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.878965490807*x[0]**o + (0.317599069776)*x[0] + (0.379810074187)*x[1]**o + (-0.759355640517)*x[1]
+        ref[(0, 2, 0, 0)]=-0.878965490807*x_ref[0]**o + (0.317599069776)*x_ref[0] + (0.379810074187)*x_ref[1]**o + (-0.759355640517)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.334163799519*x[0]**o + (-0.434498782758)*x[0] + (0.557787477309)*x[1]**o + (0.215116846565)*x[1]
+        ref[(0, 2, 0, 1)]=0.334163799519*x_ref[0]**o + (-0.434498782758)*x_ref[0] + (0.557787477309)*x_ref[1]**o + (0.215116846565)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.0329077269808*x[0]**o + (-0.201191531973)*x[0] + (-0.308157520932)*x[1]**o + (-0.128900708598)*x[1]
+        ref[(0, 2, 0, 2)]=-0.0329077269808*x_ref[0]**o + (-0.201191531973)*x_ref[0] + (-0.308157520932)*x_ref[1]**o + (-0.128900708598)*x_ref[1]
+        arg[(0, 2, 0, 3)]=0.896037815697*x[0]**o + (-0.645354763089)*x[0] + (-0.58467431588)*x[1]**o + (-0.649159692827)*x[1]
+        ref[(0, 2, 0, 3)]=0.896037815697*x_ref[0]**o + (-0.645354763089)*x_ref[0] + (-0.58467431588)*x_ref[1]**o + (-0.649159692827)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.620272056495*x[0]**o + (-0.118579193196)*x[0] + (0.30087775908)*x[1]**o + (0.703029576594)*x[1]
+        ref[(0, 2, 1, 0)]=0.620272056495*x_ref[0]**o + (-0.118579193196)*x_ref[0] + (0.30087775908)*x_ref[1]**o + (0.703029576594)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.863192033923*x[0]**o + (-0.633095040917)*x[0] + (-0.35674636301)*x[1]**o + (0.0174580783489)*x[1]
+        ref[(0, 2, 1, 1)]=0.863192033923*x_ref[0]**o + (-0.633095040917)*x_ref[0] + (-0.35674636301)*x_ref[1]**o + (0.0174580783489)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.704449591429*x[0]**o + (-0.578356416683)*x[0] + (0.241335076459)*x[1]**o + (0.206700046203)*x[1]
+        ref[(0, 2, 1, 2)]=0.704449591429*x_ref[0]**o + (-0.578356416683)*x_ref[0] + (0.241335076459)*x_ref[1]**o + (0.206700046203)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.588927883864*x[0]**o + (0.775619683052)*x[0] + (0.880388933546)*x[1]**o + (-0.477613721909)*x[1]
+        ref[(0, 2, 1, 3)]=0.588927883864*x_ref[0]**o + (0.775619683052)*x_ref[0] + (0.880388933546)*x_ref[1]**o + (-0.477613721909)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.00795418837889*x[0]**o + (-0.293505971061)*x[0] + (0.902549997052)*x[1]**o + (-0.745237301688)*x[1]
+        ref[(0, 2, 2, 0)]=0.00795418837889*x_ref[0]**o + (-0.293505971061)*x_ref[0] + (0.902549997052)*x_ref[1]**o + (-0.745237301688)*x_ref[1]
+        arg[(0, 2, 2, 1)]=-0.667688422755*x[0]**o + (-0.959894639093)*x[0] + (-0.0850607696948)*x[1]**o + (0.203749929149)*x[1]
+        ref[(0, 2, 2, 1)]=-0.667688422755*x_ref[0]**o + (-0.959894639093)*x_ref[0] + (-0.0850607696948)*x_ref[1]**o + (0.203749929149)*x_ref[1]
+        arg[(0, 2, 2, 2)]=0.475843087846*x[0]**o + (-0.751477319472)*x[0] + (-0.443752968685)*x[1]**o + (0.447103361648)*x[1]
+        ref[(0, 2, 2, 2)]=0.475843087846*x_ref[0]**o + (-0.751477319472)*x_ref[0] + (-0.443752968685)*x_ref[1]**o + (0.447103361648)*x_ref[1]
+        arg[(0, 2, 2, 3)]=0.449898338596*x[0]**o + (0.114834661824)*x[0] + (0.802948248298)*x[1]**o + (0.861875400166)*x[1]
+        ref[(0, 2, 2, 3)]=0.449898338596*x_ref[0]**o + (0.114834661824)*x_ref[0] + (0.802948248298)*x_ref[1]**o + (0.861875400166)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.539144745545*x[0]**o + (0.995284404266)*x[0] + (-0.893630338082)*x[1]**o + (0.000417927375993)*x[1]
+        ref[(1, 0, 0, 0)]=-0.539144745545*x_ref[0]**o + (0.995284404266)*x_ref[0] + (-0.893630338082)*x_ref[1]**o + (0.000417927375993)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.376484217189*x[0]**o + (-0.378484402174)*x[0] + (-0.980748280755)*x[1]**o + (0.996066100869)*x[1]
+        ref[(1, 0, 0, 1)]=0.376484217189*x_ref[0]**o + (-0.378484402174)*x_ref[0] + (-0.980748280755)*x_ref[1]**o + (0.996066100869)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.106659510084*x[0]**o + (-0.984022218023)*x[0] + (0.38322877004)*x[1]**o + (-0.10023794004)*x[1]
+        ref[(1, 0, 0, 2)]=0.106659510084*x_ref[0]**o + (-0.984022218023)*x_ref[0] + (0.38322877004)*x_ref[1]**o + (-0.10023794004)*x_ref[1]
+        arg[(1, 0, 0, 3)]=0.797582124118*x[0]**o + (-0.142875305789)*x[0] + (0.784016680119)*x[1]**o + (0.513624589004)*x[1]
+        ref[(1, 0, 0, 3)]=0.797582124118*x_ref[0]**o + (-0.142875305789)*x_ref[0] + (0.784016680119)*x_ref[1]**o + (0.513624589004)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.380908279949*x[0]**o + (0.446747635154)*x[0] + (0.293213231623)*x[1]**o + (0.13992495448)*x[1]
+        ref[(1, 0, 1, 0)]=0.380908279949*x_ref[0]**o + (0.446747635154)*x_ref[0] + (0.293213231623)*x_ref[1]**o + (0.13992495448)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.778904000138*x[0]**o + (-0.424643563342)*x[0] + (-0.376650675758)*x[1]**o + (0.388623089437)*x[1]
+        ref[(1, 0, 1, 1)]=-0.778904000138*x_ref[0]**o + (-0.424643563342)*x_ref[0] + (-0.376650675758)*x_ref[1]**o + (0.388623089437)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.272524007382*x[0]**o + (0.0118174988841)*x[0] + (0.274100850827)*x[1]**o + (-0.880577476856)*x[1]
+        ref[(1, 0, 1, 2)]=-0.272524007382*x_ref[0]**o + (0.0118174988841)*x_ref[0] + (0.274100850827)*x_ref[1]**o + (-0.880577476856)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.778324670231*x[0]**o + (-0.994450355724)*x[0] + (-0.966574861083)*x[1]**o + (0.718876058213)*x[1]
+        ref[(1, 0, 1, 3)]=-0.778324670231*x_ref[0]**o + (-0.994450355724)*x_ref[0] + (-0.966574861083)*x_ref[1]**o + (0.718876058213)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.146339365392*x[0]**o + (-0.0750423391754)*x[0] + (-0.119930542209)*x[1]**o + (0.438742803238)*x[1]
+        ref[(1, 0, 2, 0)]=-0.146339365392*x_ref[0]**o + (-0.0750423391754)*x_ref[0] + (-0.119930542209)*x_ref[1]**o + (0.438742803238)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.280743482595*x[0]**o + (0.483562865444)*x[0] + (0.228560617658)*x[1]**o + (-0.655556976278)*x[1]
+        ref[(1, 0, 2, 1)]=0.280743482595*x_ref[0]**o + (0.483562865444)*x_ref[0] + (0.228560617658)*x_ref[1]**o + (-0.655556976278)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.963494677923*x[0]**o + (0.82165853321)*x[0] + (-0.150500736337)*x[1]**o + (0.147962706461)*x[1]
+        ref[(1, 0, 2, 2)]=-0.963494677923*x_ref[0]**o + (0.82165853321)*x_ref[0] + (-0.150500736337)*x_ref[1]**o + (0.147962706461)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.778944069615*x[0]**o + (-0.828554171671)*x[0] + (-0.687195603092)*x[1]**o + (-0.991879072603)*x[1]
+        ref[(1, 0, 2, 3)]=-0.778944069615*x_ref[0]**o + (-0.828554171671)*x_ref[0] + (-0.687195603092)*x_ref[1]**o + (-0.991879072603)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.597462007314*x[0]**o + (-0.541847074452)*x[0] + (0.981305272739)*x[1]**o + (-0.764135918944)*x[1]
+        ref[(1, 1, 0, 0)]=-0.597462007314*x_ref[0]**o + (-0.541847074452)*x_ref[0] + (0.981305272739)*x_ref[1]**o + (-0.764135918944)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.741106858122*x[0]**o + (-0.16864808869)*x[0] + (0.80831987977)*x[1]**o + (-0.0843464338186)*x[1]
+        ref[(1, 1, 0, 1)]=0.741106858122*x_ref[0]**o + (-0.16864808869)*x_ref[0] + (0.80831987977)*x_ref[1]**o + (-0.0843464338186)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.660802659541*x[0]**o + (0.627488872564)*x[0] + (-0.0404335920799)*x[1]**o + (0.32770113522)*x[1]
+        ref[(1, 1, 0, 2)]=-0.660802659541*x_ref[0]**o + (0.627488872564)*x_ref[0] + (-0.0404335920799)*x_ref[1]**o + (0.32770113522)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.856673490176*x[0]**o + (0.261798965583)*x[0] + (0.0537730901225)*x[1]**o + (-0.326164756351)*x[1]
+        ref[(1, 1, 0, 3)]=-0.856673490176*x_ref[0]**o + (0.261798965583)*x_ref[0] + (0.0537730901225)*x_ref[1]**o + (-0.326164756351)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.00981439772531*x[0]**o + (-0.524408214056)*x[0] + (-0.136664066922)*x[1]**o + (-0.460003943574)*x[1]
+        ref[(1, 1, 1, 0)]=0.00981439772531*x_ref[0]**o + (-0.524408214056)*x_ref[0] + (-0.136664066922)*x_ref[1]**o + (-0.460003943574)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.0206130122735*x[0]**o + (-0.856056516195)*x[0] + (0.167692235132)*x[1]**o + (0.579762716281)*x[1]
+        ref[(1, 1, 1, 1)]=0.0206130122735*x_ref[0]**o + (-0.856056516195)*x_ref[0] + (0.167692235132)*x_ref[1]**o + (0.579762716281)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.492618002866*x[0]**o + (-0.264425604278)*x[0] + (-0.430247250551)*x[1]**o + (0.835476872029)*x[1]
+        ref[(1, 1, 1, 2)]=0.492618002866*x_ref[0]**o + (-0.264425604278)*x_ref[0] + (-0.430247250551)*x_ref[1]**o + (0.835476872029)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.652353048164*x[0]**o + (0.852267260002)*x[0] + (-0.78054658946)*x[1]**o + (0.421935547645)*x[1]
+        ref[(1, 1, 1, 3)]=0.652353048164*x_ref[0]**o + (0.852267260002)*x_ref[0] + (-0.78054658946)*x_ref[1]**o + (0.421935547645)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.0172188273084*x[0]**o + (0.388798278724)*x[0] + (0.512257655379)*x[1]**o + (0.409336136471)*x[1]
+        ref[(1, 1, 2, 0)]=0.0172188273084*x_ref[0]**o + (0.388798278724)*x_ref[0] + (0.512257655379)*x_ref[1]**o + (0.409336136471)*x_ref[1]
+        arg[(1, 1, 2, 1)]=0.819832174873*x[0]**o + (0.543599843263)*x[0] + (-0.51988823384)*x[1]**o + (0.432089825643)*x[1]
+        ref[(1, 1, 2, 1)]=0.819832174873*x_ref[0]**o + (0.543599843263)*x_ref[0] + (-0.51988823384)*x_ref[1]**o + (0.432089825643)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.044056397327*x[0]**o + (-0.391838879901)*x[0] + (0.372227431832)*x[1]**o + (-0.280296836743)*x[1]
+        ref[(1, 1, 2, 2)]=-0.044056397327*x_ref[0]**o + (-0.391838879901)*x_ref[0] + (0.372227431832)*x_ref[1]**o + (-0.280296836743)*x_ref[1]
+        arg[(1, 1, 2, 3)]=-0.812125145487*x[0]**o + (-0.886372967773)*x[0] + (-0.797277656863)*x[1]**o + (-0.092792138893)*x[1]
+        ref[(1, 1, 2, 3)]=-0.812125145487*x_ref[0]**o + (-0.886372967773)*x_ref[0] + (-0.797277656863)*x_ref[1]**o + (-0.092792138893)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.0223809806612*x[0]**o + (0.0742788144382)*x[0] + (-0.998141180671)*x[1]**o + (0.228197427568)*x[1]
+        ref[(1, 2, 0, 0)]=-0.0223809806612*x_ref[0]**o + (0.0742788144382)*x_ref[0] + (-0.998141180671)*x_ref[1]**o + (0.228197427568)*x_ref[1]
+        arg[(1, 2, 0, 1)]=0.291569308246*x[0]**o + (-0.59494867584)*x[0] + (0.0665646071351)*x[1]**o + (0.898228129093)*x[1]
+        ref[(1, 2, 0, 1)]=0.291569308246*x_ref[0]**o + (-0.59494867584)*x_ref[0] + (0.0665646071351)*x_ref[1]**o + (0.898228129093)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.248578989223*x[0]**o + (0.104628158781)*x[0] + (0.564921093391)*x[1]**o + (0.339882093945)*x[1]
+        ref[(1, 2, 0, 2)]=0.248578989223*x_ref[0]**o + (0.104628158781)*x_ref[0] + (0.564921093391)*x_ref[1]**o + (0.339882093945)*x_ref[1]
+        arg[(1, 2, 0, 3)]=0.777177289466*x[0]**o + (-0.87508109608)*x[0] + (0.991865317171)*x[1]**o + (0.707923001192)*x[1]
+        ref[(1, 2, 0, 3)]=0.777177289466*x_ref[0]**o + (-0.87508109608)*x_ref[0] + (0.991865317171)*x_ref[1]**o + (0.707923001192)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.532627959988*x[0]**o + (-0.443926741551)*x[0] + (-0.92678449587)*x[1]**o + (-0.0153448974164)*x[1]
+        ref[(1, 2, 1, 0)]=0.532627959988*x_ref[0]**o + (-0.443926741551)*x_ref[0] + (-0.92678449587)*x_ref[1]**o + (-0.0153448974164)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.722095602451*x[0]**o + (-0.0267741349213)*x[0] + (0.64848359753)*x[1]**o + (0.85201604205)*x[1]
+        ref[(1, 2, 1, 1)]=-0.722095602451*x_ref[0]**o + (-0.0267741349213)*x_ref[0] + (0.64848359753)*x_ref[1]**o + (0.85201604205)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.590926376415*x[0]**o + (0.339717133202)*x[0] + (0.704901709939)*x[1]**o + (0.443509075299)*x[1]
+        ref[(1, 2, 1, 2)]=-0.590926376415*x_ref[0]**o + (0.339717133202)*x_ref[0] + (0.704901709939)*x_ref[1]**o + (0.443509075299)*x_ref[1]
+        arg[(1, 2, 1, 3)]=-0.312862748772*x[0]**o + (0.900355694087)*x[0] + (-0.0266732578158)*x[1]**o + (-0.422136388381)*x[1]
+        ref[(1, 2, 1, 3)]=-0.312862748772*x_ref[0]**o + (0.900355694087)*x_ref[0] + (-0.0266732578158)*x_ref[1]**o + (-0.422136388381)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.999436363554*x[0]**o + (0.194717818023)*x[0] + (-0.00120270783173)*x[1]**o + (-0.0538168053635)*x[1]
+        ref[(1, 2, 2, 0)]=0.999436363554*x_ref[0]**o + (0.194717818023)*x_ref[0] + (-0.00120270783173)*x_ref[1]**o + (-0.0538168053635)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.958449334935*x[0]**o + (-0.773232880045)*x[0] + (0.814394339241)*x[1]**o + (0.261614197411)*x[1]
+        ref[(1, 2, 2, 1)]=-0.958449334935*x_ref[0]**o + (-0.773232880045)*x_ref[0] + (0.814394339241)*x_ref[1]**o + (0.261614197411)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.566475062929*x[0]**o + (0.946649910073)*x[0] + (-0.101904535748)*x[1]**o + (0.38740896466)*x[1]
+        ref[(1, 2, 2, 2)]=-0.566475062929*x_ref[0]**o + (0.946649910073)*x_ref[0] + (-0.101904535748)*x_ref[1]**o + (0.38740896466)*x_ref[1]
+        arg[(1, 2, 2, 3)]=0.202313073579*x[0]**o + (-0.108191117356)*x[0] + (0.897203748265)*x[1]**o + (-0.101670493861)*x[1]
+        ref[(1, 2, 2, 3)]=0.202313073579*x_ref[0]**o + (-0.108191117356)*x_ref[0] + (0.897203748265)*x_ref[1]**o + (-0.101670493861)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.951053666942*x[2]**o + (-0.549593911897)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.951053666942*x_ref[2]**o + (-0.549593911897)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.442679151747*x[2]**o + (-0.102031885964)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.442679151747*x_ref[2]**o + (-0.102031885964)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.0449137351199*x[2]**o + (-0.748798005805)*x[2]
+            ref[(0, 0, 0, 2)]+=0.0449137351199*x_ref[2]**o + (-0.748798005805)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.722126522122*x[2]**o + (0.591254468756)*x[2]
+            ref[(0, 0, 0, 3)]+=0.722126522122*x_ref[2]**o + (0.591254468756)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.292786786984*x[2]**o + (0.384563185354)*x[2]
+            ref[(0, 0, 1, 0)]+=0.292786786984*x_ref[2]**o + (0.384563185354)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.726826509383*x[2]**o + (0.114784036018)*x[2]
+            ref[(0, 0, 1, 1)]+=0.726826509383*x_ref[2]**o + (0.114784036018)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.254009788757*x[2]**o + (0.289852111697)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.254009788757*x_ref[2]**o + (0.289852111697)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.853827769213*x[2]**o + (-0.518772078981)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.853827769213*x_ref[2]**o + (-0.518772078981)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.419498173867*x[2]**o + (-0.478331042394)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.419498173867*x_ref[2]**o + (-0.478331042394)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.644287674768*x[2]**o + (0.678698271622)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.644287674768*x_ref[2]**o + (0.678698271622)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.200554892208*x[2]**o + (-0.570075808055)*x[2]
+            ref[(0, 0, 2, 2)]+=0.200554892208*x_ref[2]**o + (-0.570075808055)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=0.22151412894*x[2]**o + (-0.651554103549)*x[2]
+            ref[(0, 0, 2, 3)]+=0.22151412894*x_ref[2]**o + (-0.651554103549)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.676707226575*x[2]**o + (0.349656188572)*x[2]
+            ref[(0, 1, 0, 0)]+=0.676707226575*x_ref[2]**o + (0.349656188572)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.177997399174*x[2]**o + (-0.161468815578)*x[2]
+            ref[(0, 1, 0, 1)]+=0.177997399174*x_ref[2]**o + (-0.161468815578)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.588753387942*x[2]**o + (-0.284461898532)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.588753387942*x_ref[2]**o + (-0.284461898532)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.347383199468*x[2]**o + (0.776774377646)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.347383199468*x_ref[2]**o + (0.776774377646)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.434490637191*x[2]**o + (-0.0834125422565)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.434490637191*x_ref[2]**o + (-0.0834125422565)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.374674228364*x[2]**o + (-0.126648750059)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.374674228364*x_ref[2]**o + (-0.126648750059)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.162057208077*x[2]**o + (-0.227538648833)*x[2]
+            ref[(0, 1, 1, 2)]+=0.162057208077*x_ref[2]**o + (-0.227538648833)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=0.19248381148*x[2]**o + (-0.0332378650295)*x[2]
+            ref[(0, 1, 1, 3)]+=0.19248381148*x_ref[2]**o + (-0.0332378650295)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.442529968881*x[2]**o + (0.979099721218)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.442529968881*x_ref[2]**o + (0.979099721218)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=0.0695017336341*x[2]**o + (-0.971588084892)*x[2]
+            ref[(0, 1, 2, 1)]+=0.0695017336341*x_ref[2]**o + (-0.971588084892)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.360222290214*x[2]**o + (0.281793433767)*x[2]
+            ref[(0, 1, 2, 2)]+=0.360222290214*x_ref[2]**o + (0.281793433767)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=-0.0074091364752*x[2]**o + (-0.772900582257)*x[2]
+            ref[(0, 1, 2, 3)]+=-0.0074091364752*x_ref[2]**o + (-0.772900582257)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.926131323156*x[2]**o + (0.26132198019)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.926131323156*x_ref[2]**o + (0.26132198019)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.67131385914*x[2]**o + (-0.386177412006)*x[2]
+            ref[(0, 2, 0, 1)]+=0.67131385914*x_ref[2]**o + (-0.386177412006)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.0140986332157*x[2]**o + (0.258414169813)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.0140986332157*x_ref[2]**o + (0.258414169813)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=0.849421318172*x[2]**o + (0.528547538734)*x[2]
+            ref[(0, 2, 0, 3)]+=0.849421318172*x_ref[2]**o + (0.528547538734)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.18553115317*x[2]**o + (-0.0258850454404)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.18553115317*x_ref[2]**o + (-0.0258850454404)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.070668994221*x[2]**o + (0.837126061382)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.070668994221*x_ref[2]**o + (0.837126061382)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.151797266702*x[2]**o + (-0.442052546175)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.151797266702*x_ref[2]**o + (-0.442052546175)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=-0.42534697495*x[2]**o + (0.869701502997)*x[2]
+            ref[(0, 2, 1, 3)]+=-0.42534697495*x_ref[2]**o + (0.869701502997)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.328971036214*x[2]**o + (-0.90236497432)*x[2]
+            ref[(0, 2, 2, 0)]+=0.328971036214*x_ref[2]**o + (-0.90236497432)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.645481701248*x[2]**o + (-0.678503379212)*x[2]
+            ref[(0, 2, 2, 1)]+=0.645481701248*x_ref[2]**o + (-0.678503379212)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.461484562544*x[2]**o + (0.474228013457)*x[2]
+            ref[(0, 2, 2, 2)]+=0.461484562544*x_ref[2]**o + (0.474228013457)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=-0.452723741241*x[2]**o + (0.732763203702)*x[2]
+            ref[(0, 2, 2, 3)]+=-0.452723741241*x_ref[2]**o + (0.732763203702)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.54436493142*x[2]**o + (-0.675294281719)*x[2]
+            ref[(1, 0, 0, 0)]+=0.54436493142*x_ref[2]**o + (-0.675294281719)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.720194557446*x[2]**o + (-0.117447218021)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.720194557446*x_ref[2]**o + (-0.117447218021)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.625654814627*x[2]**o + (0.721998356606)*x[2]
+            ref[(1, 0, 0, 2)]+=0.625654814627*x_ref[2]**o + (0.721998356606)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.393493301801*x[2]**o + (0.706403621737)*x[2]
+            ref[(1, 0, 0, 3)]+=0.393493301801*x_ref[2]**o + (0.706403621737)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.875076720832*x[2]**o + (0.715095117369)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.875076720832*x_ref[2]**o + (0.715095117369)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.829920368999*x[2]**o + (-0.454981038909)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.829920368999*x_ref[2]**o + (-0.454981038909)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.606696099691*x[2]**o + (0.67072930441)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.606696099691*x_ref[2]**o + (0.67072930441)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.0264128797981*x[2]**o + (0.00676192505957)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.0264128797981*x_ref[2]**o + (0.00676192505957)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.83332949844*x[2]**o + (-0.600575905493)*x[2]
+            ref[(1, 0, 2, 0)]+=0.83332949844*x_ref[2]**o + (-0.600575905493)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.278552803838*x[2]**o + (-0.256086440103)*x[2]
+            ref[(1, 0, 2, 1)]+=0.278552803838*x_ref[2]**o + (-0.256086440103)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.329039802912*x[2]**o + (0.967099437682)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.329039802912*x_ref[2]**o + (0.967099437682)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=0.84141084105*x[2]**o + (0.101450674181)*x[2]
+            ref[(1, 0, 2, 3)]+=0.84141084105*x_ref[2]**o + (0.101450674181)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.21293335896*x[2]**o + (0.763522365708)*x[2]
+            ref[(1, 1, 0, 0)]+=-0.21293335896*x_ref[2]**o + (0.763522365708)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.965977703171*x[2]**o + (0.573706534614)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.965977703171*x_ref[2]**o + (0.573706534614)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.987901646063*x[2]**o + (-0.0585489770481)*x[2]
+            ref[(1, 1, 0, 2)]+=0.987901646063*x_ref[2]**o + (-0.0585489770481)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=-0.0180071042802*x[2]**o + (0.856216150228)*x[2]
+            ref[(1, 1, 0, 3)]+=-0.0180071042802*x_ref[2]**o + (0.856216150228)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.0614495603079*x[2]**o + (0.903403476451)*x[2]
+            ref[(1, 1, 1, 0)]+=0.0614495603079*x_ref[2]**o + (0.903403476451)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.307836281633*x[2]**o + (-0.259074264646)*x[2]
+            ref[(1, 1, 1, 1)]+=0.307836281633*x_ref[2]**o + (-0.259074264646)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.625343768091*x[2]**o + (0.0361417058321)*x[2]
+            ref[(1, 1, 1, 2)]+=0.625343768091*x_ref[2]**o + (0.0361417058321)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.168968438496*x[2]**o + (0.303330452834)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.168968438496*x_ref[2]**o + (0.303330452834)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.0557972020139*x[2]**o + (0.806168366657)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.0557972020139*x_ref[2]**o + (0.806168366657)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=-0.801882071725*x[2]**o + (0.980565068462)*x[2]
+            ref[(1, 1, 2, 1)]+=-0.801882071725*x_ref[2]**o + (0.980565068462)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=-0.908713544445*x[2]**o + (0.0279494445762)*x[2]
+            ref[(1, 1, 2, 2)]+=-0.908713544445*x_ref[2]**o + (0.0279494445762)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.773397665446*x[2]**o + (-0.75988629325)*x[2]
+            ref[(1, 1, 2, 3)]+=0.773397665446*x_ref[2]**o + (-0.75988629325)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.486400903326*x[2]**o + (0.703384637191)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.486400903326*x_ref[2]**o + (0.703384637191)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.496759483615*x[2]**o + (-0.840075116561)*x[2]
+            ref[(1, 2, 0, 1)]+=0.496759483615*x_ref[2]**o + (-0.840075116561)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.139174171933*x[2]**o + (0.391735882884)*x[2]
+            ref[(1, 2, 0, 2)]+=0.139174171933*x_ref[2]**o + (0.391735882884)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=-0.706491779558*x[2]**o + (0.229035091668)*x[2]
+            ref[(1, 2, 0, 3)]+=-0.706491779558*x_ref[2]**o + (0.229035091668)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.82253899367*x[2]**o + (0.605421045854)*x[2]
+            ref[(1, 2, 1, 0)]+=0.82253899367*x_ref[2]**o + (0.605421045854)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=-0.742313279876*x[2]**o + (0.231884778944)*x[2]
+            ref[(1, 2, 1, 1)]+=-0.742313279876*x_ref[2]**o + (0.231884778944)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.708451491169*x[2]**o + (0.955764900747)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.708451491169*x_ref[2]**o + (0.955764900747)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=-0.00280398147748*x[2]**o + (0.289484951577)*x[2]
+            ref[(1, 2, 1, 3)]+=-0.00280398147748*x_ref[2]**o + (0.289484951577)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.295858452649*x[2]**o + (0.988475382188)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.295858452649*x_ref[2]**o + (0.988475382188)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=-0.808157163792*x[2]**o + (-0.423389687991)*x[2]
+            ref[(1, 2, 2, 1)]+=-0.808157163792*x_ref[2]**o + (-0.423389687991)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.219144215129*x[2]**o + (-0.785391066525)*x[2]
+            ref[(1, 2, 2, 2)]+=0.219144215129*x_ref[2]**o + (-0.785391066525)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=0.920851247811*x[2]**o + (-0.352349727173)*x[2]
+            ref[(1, 2, 2, 3)]+=0.920851247811*x_ref[2]**o + (-0.352349727173)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.451221910163*x[0]**o + (0.72717948605)*x[0] + (-0.957336100839)*x[1]**o + (0.322645873351)*x[1]
+        ref=-0.451221910163*x_ref[0]**o + (0.72717948605)*x_ref[0] + (-0.957336100839)*x_ref[1]**o + (0.322645873351)*x_ref[1]
+        if dim==3:
+            arg+=(-0.514571991712)*x[2]**o + (0.871442509333)*x[2]
+            ref+=(-0.514571991712)*x_ref[2]**o + (0.871442509333)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.662393271784*x[0]**o + (-0.0792646125681)*x[0] + (0.959406606569)*x[1]**o + (0.371686508676)*x[1]
+        ref[(0,)]=-0.662393271784*x_ref[0]**o + (-0.0792646125681)*x_ref[0] + (0.959406606569)*x_ref[1]**o + (0.371686508676)*x_ref[1]
+        arg[(1,)]=-0.175955236444*x[0]**o + (-0.658103042988)*x[0] + (-0.59474038936)*x[1]**o + (0.787098171203)*x[1]
+        ref[(1,)]=-0.175955236444*x_ref[0]**o + (-0.658103042988)*x_ref[0] + (-0.59474038936)*x_ref[1]**o + (0.787098171203)*x_ref[1]
+        arg[(2,)]=-0.27098686842*x[0]**o + (-0.625372291971)*x[0] + (-0.443095007585)*x[1]**o + (-0.0341450470626)*x[1]
+        ref[(2,)]=-0.27098686842*x_ref[0]**o + (-0.625372291971)*x_ref[0] + (-0.443095007585)*x_ref[1]**o + (-0.0341450470626)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.649491075758*x[2]**o + (-0.174039442765)*x[2]
+            ref[(0,)]+=-0.649491075758*x_ref[2]**o + (-0.174039442765)*x_ref[2]
+            arg[(1,)]+=-0.226845813697*x[2]**o + (-0.568421166342)*x[2]
+            ref[(1,)]+=-0.226845813697*x_ref[2]**o + (-0.568421166342)*x_ref[2]
+            arg[(2,)]+=-0.620521353766*x[2]**o + (0.410197069293)*x[2]
+            ref[(2,)]+=-0.620521353766*x_ref[2]**o + (0.410197069293)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2),w)
+        ref = Data(0,(3, 2),w_ref)
+        arg[(0, 0)]=0.00660461584307*x[0]**o + (-0.783157923035)*x[0] + (0.626217993262)*x[1]**o + (0.698376139795)*x[1]
+        ref[(0, 0)]=0.00660461584307*x_ref[0]**o + (-0.783157923035)*x_ref[0] + (0.626217993262)*x_ref[1]**o + (0.698376139795)*x_ref[1]
+        arg[(0, 1)]=-0.120649312524*x[0]**o + (-0.374659507388)*x[0] + (0.343424249208)*x[1]**o + (0.532846986013)*x[1]
+        ref[(0, 1)]=-0.120649312524*x_ref[0]**o + (-0.374659507388)*x_ref[0] + (0.343424249208)*x_ref[1]**o + (0.532846986013)*x_ref[1]
+        arg[(1, 0)]=-0.15077518907*x[0]**o + (0.365860540506)*x[0] + (-0.987188835809)*x[1]**o + (-0.240138494428)*x[1]
+        ref[(1, 0)]=-0.15077518907*x_ref[0]**o + (0.365860540506)*x_ref[0] + (-0.987188835809)*x_ref[1]**o + (-0.240138494428)*x_ref[1]
+        arg[(1, 1)]=-0.634784068717*x[0]**o + (-0.579420951696)*x[0] + (0.0139060143613)*x[1]**o + (-0.575714618048)*x[1]
+        ref[(1, 1)]=-0.634784068717*x_ref[0]**o + (-0.579420951696)*x_ref[0] + (0.0139060143613)*x_ref[1]**o + (-0.575714618048)*x_ref[1]
+        arg[(2, 0)]=-0.0641024227432*x[0]**o + (-0.200264639871)*x[0] + (-0.859667742164)*x[1]**o + (0.441408544407)*x[1]
+        ref[(2, 0)]=-0.0641024227432*x_ref[0]**o + (-0.200264639871)*x_ref[0] + (-0.859667742164)*x_ref[1]**o + (0.441408544407)*x_ref[1]
+        arg[(2, 1)]=0.226549490405*x[0]**o + (0.780196795151)*x[0] + (-0.622970732608)*x[1]**o + (0.918121801203)*x[1]
+        ref[(2, 1)]=0.226549490405*x_ref[0]**o + (0.780196795151)*x_ref[0] + (-0.622970732608)*x_ref[1]**o + (0.918121801203)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.493703157826*x[2]**o + (-0.521316135922)*x[2]
+            ref[(0, 0)]+=-0.493703157826*x_ref[2]**o + (-0.521316135922)*x_ref[2]
+            arg[(0, 1)]+=-0.941663621128*x[2]**o + (0.878789662533)*x[2]
+            ref[(0, 1)]+=-0.941663621128*x_ref[2]**o + (0.878789662533)*x_ref[2]
+            arg[(1, 0)]+=-0.813299729212*x[2]**o + (-0.156772096132)*x[2]
+            ref[(1, 0)]+=-0.813299729212*x_ref[2]**o + (-0.156772096132)*x_ref[2]
+            arg[(1, 1)]+=-0.312560135814*x[2]**o + (0.521442841728)*x[2]
+            ref[(1, 1)]+=-0.312560135814*x_ref[2]**o + (0.521442841728)*x_ref[2]
+            arg[(2, 0)]+=-0.241234815932*x[2]**o + (-0.233483094891)*x[2]
+            ref[(2, 0)]+=-0.241234815932*x_ref[2]**o + (-0.233483094891)*x_ref[2]
+            arg[(2, 1)]+=0.0907982976834*x[2]**o + (-0.81742229996)*x[2]
+            ref[(2, 1)]+=0.0907982976834*x_ref[2]**o + (-0.81742229996)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 4),w)
+        ref = Data(0,(4, 4, 4),w_ref)
+        arg[(0, 0, 0)]=-0.869764624095*x[0]**o + (-0.526708529025)*x[0] + (0.352496822919)*x[1]**o + (0.343827733671)*x[1]
+        ref[(0, 0, 0)]=-0.869764624095*x_ref[0]**o + (-0.526708529025)*x_ref[0] + (0.352496822919)*x_ref[1]**o + (0.343827733671)*x_ref[1]
+        arg[(0, 0, 1)]=-0.443246265563*x[0]**o + (-0.956491202084)*x[0] + (0.518970316148)*x[1]**o + (-0.699614415759)*x[1]
+        ref[(0, 0, 1)]=-0.443246265563*x_ref[0]**o + (-0.956491202084)*x_ref[0] + (0.518970316148)*x_ref[1]**o + (-0.699614415759)*x_ref[1]
+        arg[(0, 0, 2)]=0.505892115935*x[0]**o + (0.752371705789)*x[0] + (0.0122804015407)*x[1]**o + (0.0603248727114)*x[1]
+        ref[(0, 0, 2)]=0.505892115935*x_ref[0]**o + (0.752371705789)*x_ref[0] + (0.0122804015407)*x_ref[1]**o + (0.0603248727114)*x_ref[1]
+        arg[(0, 0, 3)]=0.501011666158*x[0]**o + (-0.746760101313)*x[0] + (0.714172146128)*x[1]**o + (0.476135253433)*x[1]
+        ref[(0, 0, 3)]=0.501011666158*x_ref[0]**o + (-0.746760101313)*x_ref[0] + (0.714172146128)*x_ref[1]**o + (0.476135253433)*x_ref[1]
+        arg[(0, 1, 0)]=-0.305594066806*x[0]**o + (0.196903358055)*x[0] + (-0.322196911723)*x[1]**o + (-0.403285161551)*x[1]
+        ref[(0, 1, 0)]=-0.305594066806*x_ref[0]**o + (0.196903358055)*x_ref[0] + (-0.322196911723)*x_ref[1]**o + (-0.403285161551)*x_ref[1]
+        arg[(0, 1, 1)]=-0.241772077078*x[0]**o + (0.932398823392)*x[0] + (-0.275945486529)*x[1]**o + (-0.678729433128)*x[1]
+        ref[(0, 1, 1)]=-0.241772077078*x_ref[0]**o + (0.932398823392)*x_ref[0] + (-0.275945486529)*x_ref[1]**o + (-0.678729433128)*x_ref[1]
+        arg[(0, 1, 2)]=0.323251749761*x[0]**o + (-0.512603397497)*x[0] + (-0.61732151688)*x[1]**o + (-0.131144623796)*x[1]
+        ref[(0, 1, 2)]=0.323251749761*x_ref[0]**o + (-0.512603397497)*x_ref[0] + (-0.61732151688)*x_ref[1]**o + (-0.131144623796)*x_ref[1]
+        arg[(0, 1, 3)]=-0.567980915605*x[0]**o + (-0.065310237872)*x[0] + (-0.191303513631)*x[1]**o + (0.247179916279)*x[1]
+        ref[(0, 1, 3)]=-0.567980915605*x_ref[0]**o + (-0.065310237872)*x_ref[0] + (-0.191303513631)*x_ref[1]**o + (0.247179916279)*x_ref[1]
+        arg[(0, 2, 0)]=-0.539852031699*x[0]**o + (0.207566133842)*x[0] + (0.407577809477)*x[1]**o + (0.10800207595)*x[1]
+        ref[(0, 2, 0)]=-0.539852031699*x_ref[0]**o + (0.207566133842)*x_ref[0] + (0.407577809477)*x_ref[1]**o + (0.10800207595)*x_ref[1]
+        arg[(0, 2, 1)]=0.514588673128*x[0]**o + (0.213984598634)*x[0] + (0.0306128886079)*x[1]**o + (-0.907781174612)*x[1]
+        ref[(0, 2, 1)]=0.514588673128*x_ref[0]**o + (0.213984598634)*x_ref[0] + (0.0306128886079)*x_ref[1]**o + (-0.907781174612)*x_ref[1]
+        arg[(0, 2, 2)]=-0.558947516361*x[0]**o + (-0.561216606873)*x[0] + (-0.158415075182)*x[1]**o + (0.383046347444)*x[1]
+        ref[(0, 2, 2)]=-0.558947516361*x_ref[0]**o + (-0.561216606873)*x_ref[0] + (-0.158415075182)*x_ref[1]**o + (0.383046347444)*x_ref[1]
+        arg[(0, 2, 3)]=-0.147185682274*x[0]**o + (0.870333855599)*x[0] + (0.297166945546)*x[1]**o + (-0.375593007974)*x[1]
+        ref[(0, 2, 3)]=-0.147185682274*x_ref[0]**o + (0.870333855599)*x_ref[0] + (0.297166945546)*x_ref[1]**o + (-0.375593007974)*x_ref[1]
+        arg[(0, 3, 0)]=0.0143601733529*x[0]**o + (-0.63662558127)*x[0] + (-0.632254334306)*x[1]**o + (-0.267499781509)*x[1]
+        ref[(0, 3, 0)]=0.0143601733529*x_ref[0]**o + (-0.63662558127)*x_ref[0] + (-0.632254334306)*x_ref[1]**o + (-0.267499781509)*x_ref[1]
+        arg[(0, 3, 1)]=0.579020336987*x[0]**o + (-0.486012903258)*x[0] + (0.880296879019)*x[1]**o + (-0.133075445409)*x[1]
+        ref[(0, 3, 1)]=0.579020336987*x_ref[0]**o + (-0.486012903258)*x_ref[0] + (0.880296879019)*x_ref[1]**o + (-0.133075445409)*x_ref[1]
+        arg[(0, 3, 2)]=-0.808263442574*x[0]**o + (0.334681513624)*x[0] + (-0.398432808743)*x[1]**o + (-0.831155998355)*x[1]
+        ref[(0, 3, 2)]=-0.808263442574*x_ref[0]**o + (0.334681513624)*x_ref[0] + (-0.398432808743)*x_ref[1]**o + (-0.831155998355)*x_ref[1]
+        arg[(0, 3, 3)]=0.601006981285*x[0]**o + (0.10741827835)*x[0] + (0.90391463193)*x[1]**o + (0.582752880332)*x[1]
+        ref[(0, 3, 3)]=0.601006981285*x_ref[0]**o + (0.10741827835)*x_ref[0] + (0.90391463193)*x_ref[1]**o + (0.582752880332)*x_ref[1]
+        arg[(1, 0, 0)]=0.601583292797*x[0]**o + (-0.777627039722)*x[0] + (-0.575190024747)*x[1]**o + (-0.889428696845)*x[1]
+        ref[(1, 0, 0)]=0.601583292797*x_ref[0]**o + (-0.777627039722)*x_ref[0] + (-0.575190024747)*x_ref[1]**o + (-0.889428696845)*x_ref[1]
+        arg[(1, 0, 1)]=0.302699215095*x[0]**o + (-0.834364509942)*x[0] + (-0.0881251711515)*x[1]**o + (-0.711405379787)*x[1]
+        ref[(1, 0, 1)]=0.302699215095*x_ref[0]**o + (-0.834364509942)*x_ref[0] + (-0.0881251711515)*x_ref[1]**o + (-0.711405379787)*x_ref[1]
+        arg[(1, 0, 2)]=-0.508852117787*x[0]**o + (0.0669685898694)*x[0] + (-0.285707475939)*x[1]**o + (0.985241088152)*x[1]
+        ref[(1, 0, 2)]=-0.508852117787*x_ref[0]**o + (0.0669685898694)*x_ref[0] + (-0.285707475939)*x_ref[1]**o + (0.985241088152)*x_ref[1]
+        arg[(1, 0, 3)]=0.792519189415*x[0]**o + (0.550103638271)*x[0] + (0.196023578879)*x[1]**o + (0.696734366367)*x[1]
+        ref[(1, 0, 3)]=0.792519189415*x_ref[0]**o + (0.550103638271)*x_ref[0] + (0.196023578879)*x_ref[1]**o + (0.696734366367)*x_ref[1]
+        arg[(1, 1, 0)]=-0.620700846497*x[0]**o + (0.968883590609)*x[0] + (-0.0957829063366)*x[1]**o + (0.471742728836)*x[1]
+        ref[(1, 1, 0)]=-0.620700846497*x_ref[0]**o + (0.968883590609)*x_ref[0] + (-0.0957829063366)*x_ref[1]**o + (0.471742728836)*x_ref[1]
+        arg[(1, 1, 1)]=0.346674662754*x[0]**o + (-0.354330852476)*x[0] + (-0.14164319134)*x[1]**o + (0.974696226583)*x[1]
+        ref[(1, 1, 1)]=0.346674662754*x_ref[0]**o + (-0.354330852476)*x_ref[0] + (-0.14164319134)*x_ref[1]**o + (0.974696226583)*x_ref[1]
+        arg[(1, 1, 2)]=0.609190425985*x[0]**o + (0.400765630609)*x[0] + (-0.463102751694)*x[1]**o + (-0.187843374518)*x[1]
+        ref[(1, 1, 2)]=0.609190425985*x_ref[0]**o + (0.400765630609)*x_ref[0] + (-0.463102751694)*x_ref[1]**o + (-0.187843374518)*x_ref[1]
+        arg[(1, 1, 3)]=-0.608699818097*x[0]**o + (0.359178134956)*x[0] + (0.347109725162)*x[1]**o + (0.503953368566)*x[1]
+        ref[(1, 1, 3)]=-0.608699818097*x_ref[0]**o + (0.359178134956)*x_ref[0] + (0.347109725162)*x_ref[1]**o + (0.503953368566)*x_ref[1]
+        arg[(1, 2, 0)]=0.0619155219339*x[0]**o + (-0.564445233601)*x[0] + (0.440839537959)*x[1]**o + (0.727916350723)*x[1]
+        ref[(1, 2, 0)]=0.0619155219339*x_ref[0]**o + (-0.564445233601)*x_ref[0] + (0.440839537959)*x_ref[1]**o + (0.727916350723)*x_ref[1]
+        arg[(1, 2, 1)]=-0.824045525851*x[0]**o + (0.9588440889)*x[0] + (-0.345706625215)*x[1]**o + (-0.569216131686)*x[1]
+        ref[(1, 2, 1)]=-0.824045525851*x_ref[0]**o + (0.9588440889)*x_ref[0] + (-0.345706625215)*x_ref[1]**o + (-0.569216131686)*x_ref[1]
+        arg[(1, 2, 2)]=-0.733637888293*x[0]**o + (0.272224283163)*x[0] + (-0.817238639294)*x[1]**o + (0.0395517578792)*x[1]
+        ref[(1, 2, 2)]=-0.733637888293*x_ref[0]**o + (0.272224283163)*x_ref[0] + (-0.817238639294)*x_ref[1]**o + (0.0395517578792)*x_ref[1]
+        arg[(1, 2, 3)]=0.237326170338*x[0]**o + (0.57686483117)*x[0] + (-0.688242779026)*x[1]**o + (0.480858646237)*x[1]
+        ref[(1, 2, 3)]=0.237326170338*x_ref[0]**o + (0.57686483117)*x_ref[0] + (-0.688242779026)*x_ref[1]**o + (0.480858646237)*x_ref[1]
+        arg[(1, 3, 0)]=0.640961994314*x[0]**o + (-0.145632467826)*x[0] + (-0.19672721486)*x[1]**o + (-0.837266615171)*x[1]
+        ref[(1, 3, 0)]=0.640961994314*x_ref[0]**o + (-0.145632467826)*x_ref[0] + (-0.19672721486)*x_ref[1]**o + (-0.837266615171)*x_ref[1]
+        arg[(1, 3, 1)]=0.356946878888*x[0]**o + (-0.999054924576)*x[0] + (-0.267282736542)*x[1]**o + (-0.932773996621)*x[1]
+        ref[(1, 3, 1)]=0.356946878888*x_ref[0]**o + (-0.999054924576)*x_ref[0] + (-0.267282736542)*x_ref[1]**o + (-0.932773996621)*x_ref[1]
+        arg[(1, 3, 2)]=0.913382110689*x[0]**o + (-0.43341766803)*x[0] + (0.811374345615)*x[1]**o + (-0.693387883479)*x[1]
+        ref[(1, 3, 2)]=0.913382110689*x_ref[0]**o + (-0.43341766803)*x_ref[0] + (0.811374345615)*x_ref[1]**o + (-0.693387883479)*x_ref[1]
+        arg[(1, 3, 3)]=0.557258228398*x[0]**o + (0.621665806073)*x[0] + (-0.152437379257)*x[1]**o + (0.359465047152)*x[1]
+        ref[(1, 3, 3)]=0.557258228398*x_ref[0]**o + (0.621665806073)*x_ref[0] + (-0.152437379257)*x_ref[1]**o + (0.359465047152)*x_ref[1]
+        arg[(2, 0, 0)]=0.678693446511*x[0]**o + (-0.525543939265)*x[0] + (0.89459562066)*x[1]**o + (-0.940120023721)*x[1]
+        ref[(2, 0, 0)]=0.678693446511*x_ref[0]**o + (-0.525543939265)*x_ref[0] + (0.89459562066)*x_ref[1]**o + (-0.940120023721)*x_ref[1]
+        arg[(2, 0, 1)]=0.158332305555*x[0]**o + (-0.0436654034938)*x[0] + (-0.0632256772121)*x[1]**o + (0.945088048986)*x[1]
+        ref[(2, 0, 1)]=0.158332305555*x_ref[0]**o + (-0.0436654034938)*x_ref[0] + (-0.0632256772121)*x_ref[1]**o + (0.945088048986)*x_ref[1]
+        arg[(2, 0, 2)]=0.465522647354*x[0]**o + (0.89874962592)*x[0] + (-0.862964300063)*x[1]**o + (0.628839917794)*x[1]
+        ref[(2, 0, 2)]=0.465522647354*x_ref[0]**o + (0.89874962592)*x_ref[0] + (-0.862964300063)*x_ref[1]**o + (0.628839917794)*x_ref[1]
+        arg[(2, 0, 3)]=-0.703827816215*x[0]**o + (-0.407476891259)*x[0] + (0.852787836829)*x[1]**o + (0.0378025169802)*x[1]
+        ref[(2, 0, 3)]=-0.703827816215*x_ref[0]**o + (-0.407476891259)*x_ref[0] + (0.852787836829)*x_ref[1]**o + (0.0378025169802)*x_ref[1]
+        arg[(2, 1, 0)]=0.0579576077348*x[0]**o + (-0.55399769223)*x[0] + (-0.619571009503)*x[1]**o + (-0.347802660503)*x[1]
+        ref[(2, 1, 0)]=0.0579576077348*x_ref[0]**o + (-0.55399769223)*x_ref[0] + (-0.619571009503)*x_ref[1]**o + (-0.347802660503)*x_ref[1]
+        arg[(2, 1, 1)]=0.929715673429*x[0]**o + (-0.0233996853874)*x[0] + (-0.707202635204)*x[1]**o + (0.336675711344)*x[1]
+        ref[(2, 1, 1)]=0.929715673429*x_ref[0]**o + (-0.0233996853874)*x_ref[0] + (-0.707202635204)*x_ref[1]**o + (0.336675711344)*x_ref[1]
+        arg[(2, 1, 2)]=-0.188457109798*x[0]**o + (-0.195750471737)*x[0] + (-0.461950760709)*x[1]**o + (0.873446839484)*x[1]
+        ref[(2, 1, 2)]=-0.188457109798*x_ref[0]**o + (-0.195750471737)*x_ref[0] + (-0.461950760709)*x_ref[1]**o + (0.873446839484)*x_ref[1]
+        arg[(2, 1, 3)]=-0.216264596114*x[0]**o + (-0.274511612338)*x[0] + (0.391356018324)*x[1]**o + (0.273810712849)*x[1]
+        ref[(2, 1, 3)]=-0.216264596114*x_ref[0]**o + (-0.274511612338)*x_ref[0] + (0.391356018324)*x_ref[1]**o + (0.273810712849)*x_ref[1]
+        arg[(2, 2, 0)]=0.851203378362*x[0]**o + (0.199946899661)*x[0] + (0.0891270976538)*x[1]**o + (0.141371781759)*x[1]
+        ref[(2, 2, 0)]=0.851203378362*x_ref[0]**o + (0.199946899661)*x_ref[0] + (0.0891270976538)*x_ref[1]**o + (0.141371781759)*x_ref[1]
+        arg[(2, 2, 1)]=0.519752833436*x[0]**o + (0.493734548789)*x[0] + (0.876282664237)*x[1]**o + (-0.836822905829)*x[1]
+        ref[(2, 2, 1)]=0.519752833436*x_ref[0]**o + (0.493734548789)*x_ref[0] + (0.876282664237)*x_ref[1]**o + (-0.836822905829)*x_ref[1]
+        arg[(2, 2, 2)]=-0.00969849139248*x[0]**o + (0.874830870675)*x[0] + (0.364045862115)*x[1]**o + (0.626939394519)*x[1]
+        ref[(2, 2, 2)]=-0.00969849139248*x_ref[0]**o + (0.874830870675)*x_ref[0] + (0.364045862115)*x_ref[1]**o + (0.626939394519)*x_ref[1]
+        arg[(2, 2, 3)]=-0.117393175769*x[0]**o + (-0.762370237991)*x[0] + (0.977698990434)*x[1]**o + (-0.138034599321)*x[1]
+        ref[(2, 2, 3)]=-0.117393175769*x_ref[0]**o + (-0.762370237991)*x_ref[0] + (0.977698990434)*x_ref[1]**o + (-0.138034599321)*x_ref[1]
+        arg[(2, 3, 0)]=0.665358563022*x[0]**o + (0.104220395267)*x[0] + (-0.706431753337)*x[1]**o + (0.00395691203053)*x[1]
+        ref[(2, 3, 0)]=0.665358563022*x_ref[0]**o + (0.104220395267)*x_ref[0] + (-0.706431753337)*x_ref[1]**o + (0.00395691203053)*x_ref[1]
+        arg[(2, 3, 1)]=0.0966428081676*x[0]**o + (-0.412790132908)*x[0] + (0.41846142249)*x[1]**o + (-0.23076758306)*x[1]
+        ref[(2, 3, 1)]=0.0966428081676*x_ref[0]**o + (-0.412790132908)*x_ref[0] + (0.41846142249)*x_ref[1]**o + (-0.23076758306)*x_ref[1]
+        arg[(2, 3, 2)]=-0.715271592514*x[0]**o + (0.101470191714)*x[0] + (0.836141410107)*x[1]**o + (0.0266650368541)*x[1]
+        ref[(2, 3, 2)]=-0.715271592514*x_ref[0]**o + (0.101470191714)*x_ref[0] + (0.836141410107)*x_ref[1]**o + (0.0266650368541)*x_ref[1]
+        arg[(2, 3, 3)]=-0.838692732139*x[0]**o + (-0.00921931495127)*x[0] + (0.0673507215727)*x[1]**o + (0.943780549818)*x[1]
+        ref[(2, 3, 3)]=-0.838692732139*x_ref[0]**o + (-0.00921931495127)*x_ref[0] + (0.0673507215727)*x_ref[1]**o + (0.943780549818)*x_ref[1]
+        arg[(3, 0, 0)]=0.444111837694*x[0]**o + (0.0740805770707)*x[0] + (0.704758016531)*x[1]**o + (0.540967516062)*x[1]
+        ref[(3, 0, 0)]=0.444111837694*x_ref[0]**o + (0.0740805770707)*x_ref[0] + (0.704758016531)*x_ref[1]**o + (0.540967516062)*x_ref[1]
+        arg[(3, 0, 1)]=-0.638521169415*x[0]**o + (0.613231522004)*x[0] + (-0.163756897698)*x[1]**o + (-0.327531948571)*x[1]
+        ref[(3, 0, 1)]=-0.638521169415*x_ref[0]**o + (0.613231522004)*x_ref[0] + (-0.163756897698)*x_ref[1]**o + (-0.327531948571)*x_ref[1]
+        arg[(3, 0, 2)]=0.27191823208*x[0]**o + (0.979120810965)*x[0] + (0.68645459643)*x[1]**o + (-0.531439410403)*x[1]
+        ref[(3, 0, 2)]=0.27191823208*x_ref[0]**o + (0.979120810965)*x_ref[0] + (0.68645459643)*x_ref[1]**o + (-0.531439410403)*x_ref[1]
+        arg[(3, 0, 3)]=-0.565166214944*x[0]**o + (-0.790112162305)*x[0] + (-0.277231428466)*x[1]**o + (-0.175484140693)*x[1]
+        ref[(3, 0, 3)]=-0.565166214944*x_ref[0]**o + (-0.790112162305)*x_ref[0] + (-0.277231428466)*x_ref[1]**o + (-0.175484140693)*x_ref[1]
+        arg[(3, 1, 0)]=0.316346251279*x[0]**o + (0.195866387097)*x[0] + (-0.41501475715)*x[1]**o + (0.165519282074)*x[1]
+        ref[(3, 1, 0)]=0.316346251279*x_ref[0]**o + (0.195866387097)*x_ref[0] + (-0.41501475715)*x_ref[1]**o + (0.165519282074)*x_ref[1]
+        arg[(3, 1, 1)]=0.649312374537*x[0]**o + (0.744964049492)*x[0] + (-0.513146749931)*x[1]**o + (0.164833040037)*x[1]
+        ref[(3, 1, 1)]=0.649312374537*x_ref[0]**o + (0.744964049492)*x_ref[0] + (-0.513146749931)*x_ref[1]**o + (0.164833040037)*x_ref[1]
+        arg[(3, 1, 2)]=-0.455219706573*x[0]**o + (-0.206942138949)*x[0] + (-0.736253667362)*x[1]**o + (-0.546734823221)*x[1]
+        ref[(3, 1, 2)]=-0.455219706573*x_ref[0]**o + (-0.206942138949)*x_ref[0] + (-0.736253667362)*x_ref[1]**o + (-0.546734823221)*x_ref[1]
+        arg[(3, 1, 3)]=-0.792907517092*x[0]**o + (-0.562180155974)*x[0] + (0.12880949264)*x[1]**o + (0.755943263969)*x[1]
+        ref[(3, 1, 3)]=-0.792907517092*x_ref[0]**o + (-0.562180155974)*x_ref[0] + (0.12880949264)*x_ref[1]**o + (0.755943263969)*x_ref[1]
+        arg[(3, 2, 0)]=0.888296108831*x[0]**o + (0.129349371203)*x[0] + (0.35729594018)*x[1]**o + (0.245912946802)*x[1]
+        ref[(3, 2, 0)]=0.888296108831*x_ref[0]**o + (0.129349371203)*x_ref[0] + (0.35729594018)*x_ref[1]**o + (0.245912946802)*x_ref[1]
+        arg[(3, 2, 1)]=-0.240817470386*x[0]**o + (-0.371235694175)*x[0] + (0.994882653835)*x[1]**o + (0.84369708018)*x[1]
+        ref[(3, 2, 1)]=-0.240817470386*x_ref[0]**o + (-0.371235694175)*x_ref[0] + (0.994882653835)*x_ref[1]**o + (0.84369708018)*x_ref[1]
+        arg[(3, 2, 2)]=-0.403763624461*x[0]**o + (-0.0298936817233)*x[0] + (0.319975318048)*x[1]**o + (-0.773330845978)*x[1]
+        ref[(3, 2, 2)]=-0.403763624461*x_ref[0]**o + (-0.0298936817233)*x_ref[0] + (0.319975318048)*x_ref[1]**o + (-0.773330845978)*x_ref[1]
+        arg[(3, 2, 3)]=-0.0399850118419*x[0]**o + (0.358549475694)*x[0] + (0.773695268853)*x[1]**o + (-0.27891210474)*x[1]
+        ref[(3, 2, 3)]=-0.0399850118419*x_ref[0]**o + (0.358549475694)*x_ref[0] + (0.773695268853)*x_ref[1]**o + (-0.27891210474)*x_ref[1]
+        arg[(3, 3, 0)]=-0.0110612694649*x[0]**o + (0.37793379353)*x[0] + (-0.0281761016408)*x[1]**o + (-0.281035160358)*x[1]
+        ref[(3, 3, 0)]=-0.0110612694649*x_ref[0]**o + (0.37793379353)*x_ref[0] + (-0.0281761016408)*x_ref[1]**o + (-0.281035160358)*x_ref[1]
+        arg[(3, 3, 1)]=-0.262801398982*x[0]**o + (-0.980245055386)*x[0] + (-0.444850419299)*x[1]**o + (-0.573955861827)*x[1]
+        ref[(3, 3, 1)]=-0.262801398982*x_ref[0]**o + (-0.980245055386)*x_ref[0] + (-0.444850419299)*x_ref[1]**o + (-0.573955861827)*x_ref[1]
+        arg[(3, 3, 2)]=-0.412018915922*x[0]**o + (-0.0781479328526)*x[0] + (0.661063188286)*x[1]**o + (-0.0865294391509)*x[1]
+        ref[(3, 3, 2)]=-0.412018915922*x_ref[0]**o + (-0.0781479328526)*x_ref[0] + (0.661063188286)*x_ref[1]**o + (-0.0865294391509)*x_ref[1]
+        arg[(3, 3, 3)]=0.882783673825*x[0]**o + (0.153999841347)*x[0] + (0.148874475289)*x[1]**o + (0.298751635586)*x[1]
+        ref[(3, 3, 3)]=0.882783673825*x_ref[0]**o + (0.153999841347)*x_ref[0] + (0.148874475289)*x_ref[1]**o + (0.298751635586)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.566507279209*x[2]**o + (0.42733663324)*x[2]
+            ref[(0, 0, 0)]+=-0.566507279209*x_ref[2]**o + (0.42733663324)*x_ref[2]
+            arg[(0, 0, 1)]+=0.160973859073*x[2]**o + (-0.0771230963968)*x[2]
+            ref[(0, 0, 1)]+=0.160973859073*x_ref[2]**o + (-0.0771230963968)*x_ref[2]
+            arg[(0, 0, 2)]+=0.604357059681*x[2]**o + (-0.728800095992)*x[2]
+            ref[(0, 0, 2)]+=0.604357059681*x_ref[2]**o + (-0.728800095992)*x_ref[2]
+            arg[(0, 0, 3)]+=0.380238170986*x[2]**o + (-0.613304628307)*x[2]
+            ref[(0, 0, 3)]+=0.380238170986*x_ref[2]**o + (-0.613304628307)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.834859940014*x[2]**o + (0.404214973642)*x[2]
+            ref[(0, 1, 0)]+=-0.834859940014*x_ref[2]**o + (0.404214973642)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.511339365751*x[2]**o + (0.203158549191)*x[2]
+            ref[(0, 1, 1)]+=-0.511339365751*x_ref[2]**o + (0.203158549191)*x_ref[2]
+            arg[(0, 1, 2)]+=0.646547047977*x[2]**o + (0.822332754138)*x[2]
+            ref[(0, 1, 2)]+=0.646547047977*x_ref[2]**o + (0.822332754138)*x_ref[2]
+            arg[(0, 1, 3)]+=0.1412717115*x[2]**o + (0.596140512238)*x[2]
+            ref[(0, 1, 3)]+=0.1412717115*x_ref[2]**o + (0.596140512238)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.449574763475*x[2]**o + (0.417798719292)*x[2]
+            ref[(0, 2, 0)]+=-0.449574763475*x_ref[2]**o + (0.417798719292)*x_ref[2]
+            arg[(0, 2, 1)]+=0.0626164383965*x[2]**o + (-0.271209405373)*x[2]
+            ref[(0, 2, 1)]+=0.0626164383965*x_ref[2]**o + (-0.271209405373)*x_ref[2]
+            arg[(0, 2, 2)]+=0.307991006435*x[2]**o + (-0.461911187547)*x[2]
+            ref[(0, 2, 2)]+=0.307991006435*x_ref[2]**o + (-0.461911187547)*x_ref[2]
+            arg[(0, 2, 3)]+=-0.839168130321*x[2]**o + (-0.33246265904)*x[2]
+            ref[(0, 2, 3)]+=-0.839168130321*x_ref[2]**o + (-0.33246265904)*x_ref[2]
+            arg[(0, 3, 0)]+=-0.705191200806*x[2]**o + (-0.631752518411)*x[2]
+            ref[(0, 3, 0)]+=-0.705191200806*x_ref[2]**o + (-0.631752518411)*x_ref[2]
+            arg[(0, 3, 1)]+=0.718835782939*x[2]**o + (0.200813610019)*x[2]
+            ref[(0, 3, 1)]+=0.718835782939*x_ref[2]**o + (0.200813610019)*x_ref[2]
+            arg[(0, 3, 2)]+=-0.517053712389*x[2]**o + (-0.430853779484)*x[2]
+            ref[(0, 3, 2)]+=-0.517053712389*x_ref[2]**o + (-0.430853779484)*x_ref[2]
+            arg[(0, 3, 3)]+=-0.925142466723*x[2]**o + (0.180148533133)*x[2]
+            ref[(0, 3, 3)]+=-0.925142466723*x_ref[2]**o + (0.180148533133)*x_ref[2]
+            arg[(1, 0, 0)]+=0.677206317064*x[2]**o + (0.782845906495)*x[2]
+            ref[(1, 0, 0)]+=0.677206317064*x_ref[2]**o + (0.782845906495)*x_ref[2]
+            arg[(1, 0, 1)]+=-0.118819306986*x[2]**o + (0.486711160326)*x[2]
+            ref[(1, 0, 1)]+=-0.118819306986*x_ref[2]**o + (0.486711160326)*x_ref[2]
+            arg[(1, 0, 2)]+=-0.619472199518*x[2]**o + (-0.120007891305)*x[2]
+            ref[(1, 0, 2)]+=-0.619472199518*x_ref[2]**o + (-0.120007891305)*x_ref[2]
+            arg[(1, 0, 3)]+=0.458369292954*x[2]**o + (0.547109651301)*x[2]
+            ref[(1, 0, 3)]+=0.458369292954*x_ref[2]**o + (0.547109651301)*x_ref[2]
+            arg[(1, 1, 0)]+=0.359655731037*x[2]**o + (-0.35004019608)*x[2]
+            ref[(1, 1, 0)]+=0.359655731037*x_ref[2]**o + (-0.35004019608)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.512405019364*x[2]**o + (-0.561533920625)*x[2]
+            ref[(1, 1, 1)]+=-0.512405019364*x_ref[2]**o + (-0.561533920625)*x_ref[2]
+            arg[(1, 1, 2)]+=-0.740109501435*x[2]**o + (-0.569059647881)*x[2]
+            ref[(1, 1, 2)]+=-0.740109501435*x_ref[2]**o + (-0.569059647881)*x_ref[2]
+            arg[(1, 1, 3)]+=-0.482687621786*x[2]**o + (-0.0857933431466)*x[2]
+            ref[(1, 1, 3)]+=-0.482687621786*x_ref[2]**o + (-0.0857933431466)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.81680037825*x[2]**o + (0.136661074115)*x[2]
+            ref[(1, 2, 0)]+=-0.81680037825*x_ref[2]**o + (0.136661074115)*x_ref[2]
+            arg[(1, 2, 1)]+=0.342758419356*x[2]**o + (0.492062804558)*x[2]
+            ref[(1, 2, 1)]+=0.342758419356*x_ref[2]**o + (0.492062804558)*x_ref[2]
+            arg[(1, 2, 2)]+=0.903617903917*x[2]**o + (0.254542195172)*x[2]
+            ref[(1, 2, 2)]+=0.903617903917*x_ref[2]**o + (0.254542195172)*x_ref[2]
+            arg[(1, 2, 3)]+=-0.899593121439*x[2]**o + (0.61633634841)*x[2]
+            ref[(1, 2, 3)]+=-0.899593121439*x_ref[2]**o + (0.61633634841)*x_ref[2]
+            arg[(1, 3, 0)]+=-0.157406238237*x[2]**o + (0.203984019814)*x[2]
+            ref[(1, 3, 0)]+=-0.157406238237*x_ref[2]**o + (0.203984019814)*x_ref[2]
+            arg[(1, 3, 1)]+=-0.037109020693*x[2]**o + (0.940615336543)*x[2]
+            ref[(1, 3, 1)]+=-0.037109020693*x_ref[2]**o + (0.940615336543)*x_ref[2]
+            arg[(1, 3, 2)]+=-0.220309755703*x[2]**o + (0.79411930649)*x[2]
+            ref[(1, 3, 2)]+=-0.220309755703*x_ref[2]**o + (0.79411930649)*x_ref[2]
+            arg[(1, 3, 3)]+=-0.388708070707*x[2]**o + (-0.285277146026)*x[2]
+            ref[(1, 3, 3)]+=-0.388708070707*x_ref[2]**o + (-0.285277146026)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.420087574105*x[2]**o + (-0.953213994979)*x[2]
+            ref[(2, 0, 0)]+=-0.420087574105*x_ref[2]**o + (-0.953213994979)*x_ref[2]
+            arg[(2, 0, 1)]+=0.295491776107*x[2]**o + (-0.796623689765)*x[2]
+            ref[(2, 0, 1)]+=0.295491776107*x_ref[2]**o + (-0.796623689765)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.668544770858*x[2]**o + (0.990114288009)*x[2]
+            ref[(2, 0, 2)]+=-0.668544770858*x_ref[2]**o + (0.990114288009)*x_ref[2]
+            arg[(2, 0, 3)]+=0.565833171431*x[2]**o + (0.296441591444)*x[2]
+            ref[(2, 0, 3)]+=0.565833171431*x_ref[2]**o + (0.296441591444)*x_ref[2]
+            arg[(2, 1, 0)]+=0.343052512996*x[2]**o + (0.73092273387)*x[2]
+            ref[(2, 1, 0)]+=0.343052512996*x_ref[2]**o + (0.73092273387)*x_ref[2]
+            arg[(2, 1, 1)]+=0.606750139501*x[2]**o + (-0.10470166811)*x[2]
+            ref[(2, 1, 1)]+=0.606750139501*x_ref[2]**o + (-0.10470166811)*x_ref[2]
+            arg[(2, 1, 2)]+=0.792782920814*x[2]**o + (-0.795170971488)*x[2]
+            ref[(2, 1, 2)]+=0.792782920814*x_ref[2]**o + (-0.795170971488)*x_ref[2]
+            arg[(2, 1, 3)]+=-0.81898866066*x[2]**o + (-0.372743487471)*x[2]
+            ref[(2, 1, 3)]+=-0.81898866066*x_ref[2]**o + (-0.372743487471)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.91148675988*x[2]**o + (0.705676216216)*x[2]
+            ref[(2, 2, 0)]+=-0.91148675988*x_ref[2]**o + (0.705676216216)*x_ref[2]
+            arg[(2, 2, 1)]+=0.557395432728*x[2]**o + (-0.720647876396)*x[2]
+            ref[(2, 2, 1)]+=0.557395432728*x_ref[2]**o + (-0.720647876396)*x_ref[2]
+            arg[(2, 2, 2)]+=0.76218301823*x[2]**o + (0.535393003126)*x[2]
+            ref[(2, 2, 2)]+=0.76218301823*x_ref[2]**o + (0.535393003126)*x_ref[2]
+            arg[(2, 2, 3)]+=0.367388143721*x[2]**o + (0.0964669035246)*x[2]
+            ref[(2, 2, 3)]+=0.367388143721*x_ref[2]**o + (0.0964669035246)*x_ref[2]
+            arg[(2, 3, 0)]+=0.296247737212*x[2]**o + (0.57245905981)*x[2]
+            ref[(2, 3, 0)]+=0.296247737212*x_ref[2]**o + (0.57245905981)*x_ref[2]
+            arg[(2, 3, 1)]+=-0.0230309827552*x[2]**o + (0.930075994896)*x[2]
+            ref[(2, 3, 1)]+=-0.0230309827552*x_ref[2]**o + (0.930075994896)*x_ref[2]
+            arg[(2, 3, 2)]+=0.830615004614*x[2]**o + (0.63851447839)*x[2]
+            ref[(2, 3, 2)]+=0.830615004614*x_ref[2]**o + (0.63851447839)*x_ref[2]
+            arg[(2, 3, 3)]+=0.816901017222*x[2]**o + (0.780887521758)*x[2]
+            ref[(2, 3, 3)]+=0.816901017222*x_ref[2]**o + (0.780887521758)*x_ref[2]
+            arg[(3, 0, 0)]+=-0.955314569483*x[2]**o + (0.285022181891)*x[2]
+            ref[(3, 0, 0)]+=-0.955314569483*x_ref[2]**o + (0.285022181891)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.140238293626*x[2]**o + (0.855209291208)*x[2]
+            ref[(3, 0, 1)]+=-0.140238293626*x_ref[2]**o + (0.855209291208)*x_ref[2]
+            arg[(3, 0, 2)]+=0.128903925311*x[2]**o + (-0.921403230238)*x[2]
+            ref[(3, 0, 2)]+=0.128903925311*x_ref[2]**o + (-0.921403230238)*x_ref[2]
+            arg[(3, 0, 3)]+=0.611949478794*x[2]**o + (0.925709160636)*x[2]
+            ref[(3, 0, 3)]+=0.611949478794*x_ref[2]**o + (0.925709160636)*x_ref[2]
+            arg[(3, 1, 0)]+=0.199403113063*x[2]**o + (-0.799837893881)*x[2]
+            ref[(3, 1, 0)]+=0.199403113063*x_ref[2]**o + (-0.799837893881)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.247924733692*x[2]**o + (0.594241914573)*x[2]
+            ref[(3, 1, 1)]+=-0.247924733692*x_ref[2]**o + (0.594241914573)*x_ref[2]
+            arg[(3, 1, 2)]+=-0.901264776574*x[2]**o + (-0.0192768527128)*x[2]
+            ref[(3, 1, 2)]+=-0.901264776574*x_ref[2]**o + (-0.0192768527128)*x_ref[2]
+            arg[(3, 1, 3)]+=0.414960126028*x[2]**o + (0.217306631405)*x[2]
+            ref[(3, 1, 3)]+=0.414960126028*x_ref[2]**o + (0.217306631405)*x_ref[2]
+            arg[(3, 2, 0)]+=-0.451007460618*x[2]**o + (-0.852477705121)*x[2]
+            ref[(3, 2, 0)]+=-0.451007460618*x_ref[2]**o + (-0.852477705121)*x_ref[2]
+            arg[(3, 2, 1)]+=-0.201164940285*x[2]**o + (-0.406256994613)*x[2]
+            ref[(3, 2, 1)]+=-0.201164940285*x_ref[2]**o + (-0.406256994613)*x_ref[2]
+            arg[(3, 2, 2)]+=0.61157921982*x[2]**o + (0.321665030632)*x[2]
+            ref[(3, 2, 2)]+=0.61157921982*x_ref[2]**o + (0.321665030632)*x_ref[2]
+            arg[(3, 2, 3)]+=-0.734622925361*x[2]**o + (0.361058761123)*x[2]
+            ref[(3, 2, 3)]+=-0.734622925361*x_ref[2]**o + (0.361058761123)*x_ref[2]
+            arg[(3, 3, 0)]+=-0.07278738473*x[2]**o + (0.848164861318)*x[2]
+            ref[(3, 3, 0)]+=-0.07278738473*x_ref[2]**o + (0.848164861318)*x_ref[2]
+            arg[(3, 3, 1)]+=-0.576878280959*x[2]**o + (0.915970122676)*x[2]
+            ref[(3, 3, 1)]+=-0.576878280959*x_ref[2]**o + (0.915970122676)*x_ref[2]
+            arg[(3, 3, 2)]+=-0.470124462161*x[2]**o + (0.0929925726422)*x[2]
+            ref[(3, 3, 2)]+=-0.470124462161*x_ref[2]**o + (0.0929925726422)*x_ref[2]
+            arg[(3, 3, 3)]+=-0.88549354451*x[2]**o + (-0.0637984547827)*x[2]
+            ref[(3, 3, 3)]+=-0.88549354451*x_ref[2]**o + (-0.0637984547827)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactZero(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 2, 4, 4),w)
+        ref = Data(0,(3, 2, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=-0.110830262216*x[0]**o + (-0.679197782635)*x[0] + (-0.426094435441)*x[1]**o + (-0.496759848638)*x[1]
+        ref[(0, 0, 0, 0)]=-0.110830262216*x_ref[0]**o + (-0.679197782635)*x_ref[0] + (-0.426094435441)*x_ref[1]**o + (-0.496759848638)*x_ref[1]
+        arg[(0, 0, 0, 1)]=-0.711077899508*x[0]**o + (0.682657814972)*x[0] + (0.463057168976)*x[1]**o + (0.571905417368)*x[1]
+        ref[(0, 0, 0, 1)]=-0.711077899508*x_ref[0]**o + (0.682657814972)*x_ref[0] + (0.463057168976)*x_ref[1]**o + (0.571905417368)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.56334552751*x[0]**o + (0.551709802733)*x[0] + (0.612682604084)*x[1]**o + (-0.624994859774)*x[1]
+        ref[(0, 0, 0, 2)]=0.56334552751*x_ref[0]**o + (0.551709802733)*x_ref[0] + (0.612682604084)*x_ref[1]**o + (-0.624994859774)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.881957022629*x[0]**o + (0.0645998755063)*x[0] + (0.14454611769)*x[1]**o + (-0.25875762141)*x[1]
+        ref[(0, 0, 0, 3)]=0.881957022629*x_ref[0]**o + (0.0645998755063)*x_ref[0] + (0.14454611769)*x_ref[1]**o + (-0.25875762141)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.180541823681*x[0]**o + (0.200063747285)*x[0] + (-0.212021012348)*x[1]**o + (0.954174471307)*x[1]
+        ref[(0, 0, 1, 0)]=-0.180541823681*x_ref[0]**o + (0.200063747285)*x_ref[0] + (-0.212021012348)*x_ref[1]**o + (0.954174471307)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.769812507885*x[0]**o + (-0.54357661598)*x[0] + (0.0981806577927)*x[1]**o + (0.173916476675)*x[1]
+        ref[(0, 0, 1, 1)]=-0.769812507885*x_ref[0]**o + (-0.54357661598)*x_ref[0] + (0.0981806577927)*x_ref[1]**o + (0.173916476675)*x_ref[1]
+        arg[(0, 0, 1, 2)]=-0.94279434723*x[0]**o + (-0.648425327272)*x[0] + (-0.821661813889)*x[1]**o + (-0.146608074892)*x[1]
+        ref[(0, 0, 1, 2)]=-0.94279434723*x_ref[0]**o + (-0.648425327272)*x_ref[0] + (-0.821661813889)*x_ref[1]**o + (-0.146608074892)*x_ref[1]
+        arg[(0, 0, 1, 3)]=0.354543749534*x[0]**o + (-0.77178983511)*x[0] + (0.783342570904)*x[1]**o + (0.800872877284)*x[1]
+        ref[(0, 0, 1, 3)]=0.354543749534*x_ref[0]**o + (-0.77178983511)*x_ref[0] + (0.783342570904)*x_ref[1]**o + (0.800872877284)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.514134133657*x[0]**o + (-0.838127827444)*x[0] + (0.400709687125)*x[1]**o + (0.834340552279)*x[1]
+        ref[(0, 0, 2, 0)]=0.514134133657*x_ref[0]**o + (-0.838127827444)*x_ref[0] + (0.400709687125)*x_ref[1]**o + (0.834340552279)*x_ref[1]
+        arg[(0, 0, 2, 1)]=-0.221201525526*x[0]**o + (-0.111620696111)*x[0] + (-0.468267896309)*x[1]**o + (0.126267854475)*x[1]
+        ref[(0, 0, 2, 1)]=-0.221201525526*x_ref[0]**o + (-0.111620696111)*x_ref[0] + (-0.468267896309)*x_ref[1]**o + (0.126267854475)*x_ref[1]
+        arg[(0, 0, 2, 2)]=-0.712239237068*x[0]**o + (0.63268285624)*x[0] + (-0.740070475619)*x[1]**o + (-0.970058839121)*x[1]
+        ref[(0, 0, 2, 2)]=-0.712239237068*x_ref[0]**o + (0.63268285624)*x_ref[0] + (-0.740070475619)*x_ref[1]**o + (-0.970058839121)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.989968764652*x[0]**o + (-0.244366760662)*x[0] + (0.623662047859)*x[1]**o + (-0.361889495518)*x[1]
+        ref[(0, 0, 2, 3)]=-0.989968764652*x_ref[0]**o + (-0.244366760662)*x_ref[0] + (0.623662047859)*x_ref[1]**o + (-0.361889495518)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.286684376724*x[0]**o + (-0.64115686113)*x[0] + (0.890221012697)*x[1]**o + (0.0263084434815)*x[1]
+        ref[(0, 0, 3, 0)]=0.286684376724*x_ref[0]**o + (-0.64115686113)*x_ref[0] + (0.890221012697)*x_ref[1]**o + (0.0263084434815)*x_ref[1]
+        arg[(0, 0, 3, 1)]=0.452379152411*x[0]**o + (-0.917883018984)*x[0] + (-0.208391359072)*x[1]**o + (-0.333034280302)*x[1]
+        ref[(0, 0, 3, 1)]=0.452379152411*x_ref[0]**o + (-0.917883018984)*x_ref[0] + (-0.208391359072)*x_ref[1]**o + (-0.333034280302)*x_ref[1]
+        arg[(0, 0, 3, 2)]=-0.76243958955*x[0]**o + (-0.580654666825)*x[0] + (0.788384818669)*x[1]**o + (0.0637445107725)*x[1]
+        ref[(0, 0, 3, 2)]=-0.76243958955*x_ref[0]**o + (-0.580654666825)*x_ref[0] + (0.788384818669)*x_ref[1]**o + (0.0637445107725)*x_ref[1]
+        arg[(0, 0, 3, 3)]=0.730970215003*x[0]**o + (-0.606911073603)*x[0] + (-0.554350253912)*x[1]**o + (-0.927684922193)*x[1]
+        ref[(0, 0, 3, 3)]=0.730970215003*x_ref[0]**o + (-0.606911073603)*x_ref[0] + (-0.554350253912)*x_ref[1]**o + (-0.927684922193)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.426345614965*x[0]**o + (0.099535500205)*x[0] + (0.720078595033)*x[1]**o + (-0.427965882372)*x[1]
+        ref[(0, 1, 0, 0)]=-0.426345614965*x_ref[0]**o + (0.099535500205)*x_ref[0] + (0.720078595033)*x_ref[1]**o + (-0.427965882372)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.641386660913*x[0]**o + (-0.20158219441)*x[0] + (0.319471010992)*x[1]**o + (-0.422633381176)*x[1]
+        ref[(0, 1, 0, 1)]=0.641386660913*x_ref[0]**o + (-0.20158219441)*x_ref[0] + (0.319471010992)*x_ref[1]**o + (-0.422633381176)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.714071486715*x[0]**o + (-0.235866219797)*x[0] + (0.0673256771368)*x[1]**o + (0.953446867113)*x[1]
+        ref[(0, 1, 0, 2)]=0.714071486715*x_ref[0]**o + (-0.235866219797)*x_ref[0] + (0.0673256771368)*x_ref[1]**o + (0.953446867113)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.0814520158613*x[0]**o + (0.0621852386327)*x[0] + (0.89759245011)*x[1]**o + (-0.398958814522)*x[1]
+        ref[(0, 1, 0, 3)]=0.0814520158613*x_ref[0]**o + (0.0621852386327)*x_ref[0] + (0.89759245011)*x_ref[1]**o + (-0.398958814522)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.770850719373*x[0]**o + (0.309637523341)*x[0] + (-0.706667420742)*x[1]**o + (0.530158994979)*x[1]
+        ref[(0, 1, 1, 0)]=-0.770850719373*x_ref[0]**o + (0.309637523341)*x_ref[0] + (-0.706667420742)*x_ref[1]**o + (0.530158994979)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.210160830342*x[0]**o + (-0.6607740026)*x[0] + (0.797058379144)*x[1]**o + (-0.489375156621)*x[1]
+        ref[(0, 1, 1, 1)]=0.210160830342*x_ref[0]**o + (-0.6607740026)*x_ref[0] + (0.797058379144)*x_ref[1]**o + (-0.489375156621)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.878008106403*x[0]**o + (-0.634064566227)*x[0] + (0.415081179737)*x[1]**o + (-0.848986492021)*x[1]
+        ref[(0, 1, 1, 2)]=0.878008106403*x_ref[0]**o + (-0.634064566227)*x_ref[0] + (0.415081179737)*x_ref[1]**o + (-0.848986492021)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.51957601356*x[0]**o + (-0.817527620899)*x[0] + (0.652619573079)*x[1]**o + (0.712349575611)*x[1]
+        ref[(0, 1, 1, 3)]=0.51957601356*x_ref[0]**o + (-0.817527620899)*x_ref[0] + (0.652619573079)*x_ref[1]**o + (0.712349575611)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.442680190551*x[0]**o + (-0.878788287447)*x[0] + (-0.869584617688)*x[1]**o + (-0.450553563384)*x[1]
+        ref[(0, 1, 2, 0)]=-0.442680190551*x_ref[0]**o + (-0.878788287447)*x_ref[0] + (-0.869584617688)*x_ref[1]**o + (-0.450553563384)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.58772465033*x[0]**o + (0.921040797416)*x[0] + (-0.634690587074)*x[1]**o + (0.544459716058)*x[1]
+        ref[(0, 1, 2, 1)]=-0.58772465033*x_ref[0]**o + (0.921040797416)*x_ref[0] + (-0.634690587074)*x_ref[1]**o + (0.544459716058)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.612558309928*x[0]**o + (0.497362143267)*x[0] + (-0.0592839357012)*x[1]**o + (-0.12081994011)*x[1]
+        ref[(0, 1, 2, 2)]=0.612558309928*x_ref[0]**o + (0.497362143267)*x_ref[0] + (-0.0592839357012)*x_ref[1]**o + (-0.12081994011)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.666790784863*x[0]**o + (-0.569834716244)*x[0] + (-0.0162587159895)*x[1]**o + (0.809863459443)*x[1]
+        ref[(0, 1, 2, 3)]=-0.666790784863*x_ref[0]**o + (-0.569834716244)*x_ref[0] + (-0.0162587159895)*x_ref[1]**o + (0.809863459443)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.340952007692*x[0]**o + (-0.241881363006)*x[0] + (0.696820907124)*x[1]**o + (-0.799326695858)*x[1]
+        ref[(0, 1, 3, 0)]=-0.340952007692*x_ref[0]**o + (-0.241881363006)*x_ref[0] + (0.696820907124)*x_ref[1]**o + (-0.799326695858)*x_ref[1]
+        arg[(0, 1, 3, 1)]=0.851099873656*x[0]**o + (0.858589291399)*x[0] + (0.122063551126)*x[1]**o + (0.777686053085)*x[1]
+        ref[(0, 1, 3, 1)]=0.851099873656*x_ref[0]**o + (0.858589291399)*x_ref[0] + (0.122063551126)*x_ref[1]**o + (0.777686053085)*x_ref[1]
+        arg[(0, 1, 3, 2)]=0.959413778713*x[0]**o + (0.619130526859)*x[0] + (-0.132516110471)*x[1]**o + (-0.338583295196)*x[1]
+        ref[(0, 1, 3, 2)]=0.959413778713*x_ref[0]**o + (0.619130526859)*x_ref[0] + (-0.132516110471)*x_ref[1]**o + (-0.338583295196)*x_ref[1]
+        arg[(0, 1, 3, 3)]=0.810977950851*x[0]**o + (0.843891383726)*x[0] + (0.788928858002)*x[1]**o + (0.870316334347)*x[1]
+        ref[(0, 1, 3, 3)]=0.810977950851*x_ref[0]**o + (0.843891383726)*x_ref[0] + (0.788928858002)*x_ref[1]**o + (0.870316334347)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.235292696374*x[0]**o + (0.0244702077219)*x[0] + (0.927021933701)*x[1]**o + (-0.337853223474)*x[1]
+        ref[(1, 0, 0, 0)]=0.235292696374*x_ref[0]**o + (0.0244702077219)*x_ref[0] + (0.927021933701)*x_ref[1]**o + (-0.337853223474)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.402452941233*x[0]**o + (0.651306773475)*x[0] + (-0.363186572997)*x[1]**o + (-0.397596655346)*x[1]
+        ref[(1, 0, 0, 1)]=-0.402452941233*x_ref[0]**o + (0.651306773475)*x_ref[0] + (-0.363186572997)*x_ref[1]**o + (-0.397596655346)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.563122181705*x[0]**o + (-0.538377861195)*x[0] + (-0.372335021094)*x[1]**o + (0.989771384589)*x[1]
+        ref[(1, 0, 0, 2)]=-0.563122181705*x_ref[0]**o + (-0.538377861195)*x_ref[0] + (-0.372335021094)*x_ref[1]**o + (0.989771384589)*x_ref[1]
+        arg[(1, 0, 0, 3)]=-0.889402205451*x[0]**o + (-0.473036189595)*x[0] + (-0.850402099413)*x[1]**o + (-0.131210700606)*x[1]
+        ref[(1, 0, 0, 3)]=-0.889402205451*x_ref[0]**o + (-0.473036189595)*x_ref[0] + (-0.850402099413)*x_ref[1]**o + (-0.131210700606)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.991272915236*x[0]**o + (0.0679907456569)*x[0] + (0.186523556696)*x[1]**o + (-0.338055272099)*x[1]
+        ref[(1, 0, 1, 0)]=-0.991272915236*x_ref[0]**o + (0.0679907456569)*x_ref[0] + (0.186523556696)*x_ref[1]**o + (-0.338055272099)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.578250181763*x[0]**o + (-0.828781568116)*x[0] + (-0.481188107881)*x[1]**o + (-0.466944818278)*x[1]
+        ref[(1, 0, 1, 1)]=-0.578250181763*x_ref[0]**o + (-0.828781568116)*x_ref[0] + (-0.481188107881)*x_ref[1]**o + (-0.466944818278)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.544117150057*x[0]**o + (0.652674623293)*x[0] + (0.571603539746)*x[1]**o + (0.566808822781)*x[1]
+        ref[(1, 0, 1, 2)]=-0.544117150057*x_ref[0]**o + (0.652674623293)*x_ref[0] + (0.571603539746)*x_ref[1]**o + (0.566808822781)*x_ref[1]
+        arg[(1, 0, 1, 3)]=0.613782978654*x[0]**o + (-0.722149798639)*x[0] + (0.776215679077)*x[1]**o + (0.190815665584)*x[1]
+        ref[(1, 0, 1, 3)]=0.613782978654*x_ref[0]**o + (-0.722149798639)*x_ref[0] + (0.776215679077)*x_ref[1]**o + (0.190815665584)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.417193908837*x[0]**o + (0.377660027405)*x[0] + (0.892579283611)*x[1]**o + (0.697370889451)*x[1]
+        ref[(1, 0, 2, 0)]=0.417193908837*x_ref[0]**o + (0.377660027405)*x_ref[0] + (0.892579283611)*x_ref[1]**o + (0.697370889451)*x_ref[1]
+        arg[(1, 0, 2, 1)]=0.348588727481*x[0]**o + (0.525072191408)*x[0] + (0.000810265285708)*x[1]**o + (-0.517782115588)*x[1]
+        ref[(1, 0, 2, 1)]=0.348588727481*x_ref[0]**o + (0.525072191408)*x_ref[0] + (0.000810265285708)*x_ref[1]**o + (-0.517782115588)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.556502641798*x[0]**o + (0.974004592136)*x[0] + (-0.834305789911)*x[1]**o + (-0.147147615127)*x[1]
+        ref[(1, 0, 2, 2)]=0.556502641798*x_ref[0]**o + (0.974004592136)*x_ref[0] + (-0.834305789911)*x_ref[1]**o + (-0.147147615127)*x_ref[1]
+        arg[(1, 0, 2, 3)]=0.242422905337*x[0]**o + (-0.763517812834)*x[0] + (0.953508008845)*x[1]**o + (-0.232392942409)*x[1]
+        ref[(1, 0, 2, 3)]=0.242422905337*x_ref[0]**o + (-0.763517812834)*x_ref[0] + (0.953508008845)*x_ref[1]**o + (-0.232392942409)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.700316303184*x[0]**o + (-0.755341652141)*x[0] + (0.537981831066)*x[1]**o + (0.716885484275)*x[1]
+        ref[(1, 0, 3, 0)]=-0.700316303184*x_ref[0]**o + (-0.755341652141)*x_ref[0] + (0.537981831066)*x_ref[1]**o + (0.716885484275)*x_ref[1]
+        arg[(1, 0, 3, 1)]=0.331367559501*x[0]**o + (-0.675011619092)*x[0] + (0.970206225773)*x[1]**o + (-0.088030215878)*x[1]
+        ref[(1, 0, 3, 1)]=0.331367559501*x_ref[0]**o + (-0.675011619092)*x_ref[0] + (0.970206225773)*x_ref[1]**o + (-0.088030215878)*x_ref[1]
+        arg[(1, 0, 3, 2)]=0.881799615123*x[0]**o + (0.0983131282049)*x[0] + (0.710930620466)*x[1]**o + (-0.289027748935)*x[1]
+        ref[(1, 0, 3, 2)]=0.881799615123*x_ref[0]**o + (0.0983131282049)*x_ref[0] + (0.710930620466)*x_ref[1]**o + (-0.289027748935)*x_ref[1]
+        arg[(1, 0, 3, 3)]=0.606249791009*x[0]**o + (-0.61527997884)*x[0] + (0.608319256033)*x[1]**o + (-0.281480686721)*x[1]
+        ref[(1, 0, 3, 3)]=0.606249791009*x_ref[0]**o + (-0.61527997884)*x_ref[0] + (0.608319256033)*x_ref[1]**o + (-0.281480686721)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.109000634182*x[0]**o + (-0.770938364719)*x[0] + (-0.204440177139)*x[1]**o + (-0.226477440345)*x[1]
+        ref[(1, 1, 0, 0)]=-0.109000634182*x_ref[0]**o + (-0.770938364719)*x_ref[0] + (-0.204440177139)*x_ref[1]**o + (-0.226477440345)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.349847688981*x[0]**o + (0.815264021889)*x[0] + (0.948707784218)*x[1]**o + (-0.206377329396)*x[1]
+        ref[(1, 1, 0, 1)]=0.349847688981*x_ref[0]**o + (0.815264021889)*x_ref[0] + (0.948707784218)*x_ref[1]**o + (-0.206377329396)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.0102907070936*x[0]**o + (-0.0923525446675)*x[0] + (-0.965226740236)*x[1]**o + (0.1230662572)*x[1]
+        ref[(1, 1, 0, 2)]=0.0102907070936*x_ref[0]**o + (-0.0923525446675)*x_ref[0] + (-0.965226740236)*x_ref[1]**o + (0.1230662572)*x_ref[1]
+        arg[(1, 1, 0, 3)]=0.966605988107*x[0]**o + (0.208725503081)*x[0] + (-0.557030645988)*x[1]**o + (-0.425418691494)*x[1]
+        ref[(1, 1, 0, 3)]=0.966605988107*x_ref[0]**o + (0.208725503081)*x_ref[0] + (-0.557030645988)*x_ref[1]**o + (-0.425418691494)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.700315484293*x[0]**o + (-0.195608589689)*x[0] + (0.0267359518911)*x[1]**o + (-0.487878754989)*x[1]
+        ref[(1, 1, 1, 0)]=-0.700315484293*x_ref[0]**o + (-0.195608589689)*x_ref[0] + (0.0267359518911)*x_ref[1]**o + (-0.487878754989)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.145961498764*x[0]**o + (-0.286237980675)*x[0] + (-0.407330354218)*x[1]**o + (-0.691744388392)*x[1]
+        ref[(1, 1, 1, 1)]=-0.145961498764*x_ref[0]**o + (-0.286237980675)*x_ref[0] + (-0.407330354218)*x_ref[1]**o + (-0.691744388392)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.0246669448239*x[0]**o + (0.18716962763)*x[0] + (0.526749519988)*x[1]**o + (0.309893998998)*x[1]
+        ref[(1, 1, 1, 2)]=0.0246669448239*x_ref[0]**o + (0.18716962763)*x_ref[0] + (0.526749519988)*x_ref[1]**o + (0.309893998998)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.209049319458*x[0]**o + (0.478086814987)*x[0] + (0.461270725638)*x[1]**o + (0.1865991357)*x[1]
+        ref[(1, 1, 1, 3)]=0.209049319458*x_ref[0]**o + (0.478086814987)*x_ref[0] + (0.461270725638)*x_ref[1]**o + (0.1865991357)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.408313687325*x[0]**o + (0.0796345931769)*x[0] + (-0.0176655924625)*x[1]**o + (0.577296033639)*x[1]
+        ref[(1, 1, 2, 0)]=-0.408313687325*x_ref[0]**o + (0.0796345931769)*x_ref[0] + (-0.0176655924625)*x_ref[1]**o + (0.577296033639)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.12775247548*x[0]**o + (-0.79772317745)*x[0] + (-0.895724621108)*x[1]**o + (-0.332386535066)*x[1]
+        ref[(1, 1, 2, 1)]=-0.12775247548*x_ref[0]**o + (-0.79772317745)*x_ref[0] + (-0.895724621108)*x_ref[1]**o + (-0.332386535066)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.689853921505*x[0]**o + (-0.815534800024)*x[0] + (0.132095069007)*x[1]**o + (-0.135827590598)*x[1]
+        ref[(1, 1, 2, 2)]=0.689853921505*x_ref[0]**o + (-0.815534800024)*x_ref[0] + (0.132095069007)*x_ref[1]**o + (-0.135827590598)*x_ref[1]
+        arg[(1, 1, 2, 3)]=0.927759722538*x[0]**o + (-0.263002336614)*x[0] + (0.261419636968)*x[1]**o + (0.848282224972)*x[1]
+        ref[(1, 1, 2, 3)]=0.927759722538*x_ref[0]**o + (-0.263002336614)*x_ref[0] + (0.261419636968)*x_ref[1]**o + (0.848282224972)*x_ref[1]
+        arg[(1, 1, 3, 0)]=-0.254758115703*x[0]**o + (0.253305410083)*x[0] + (0.077825909501)*x[1]**o + (-0.347159322658)*x[1]
+        ref[(1, 1, 3, 0)]=-0.254758115703*x_ref[0]**o + (0.253305410083)*x_ref[0] + (0.077825909501)*x_ref[1]**o + (-0.347159322658)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.176507062894*x[0]**o + (-0.945528230758)*x[0] + (0.308498203691)*x[1]**o + (-0.155515260754)*x[1]
+        ref[(1, 1, 3, 1)]=-0.176507062894*x_ref[0]**o + (-0.945528230758)*x_ref[0] + (0.308498203691)*x_ref[1]**o + (-0.155515260754)*x_ref[1]
+        arg[(1, 1, 3, 2)]=0.709884228349*x[0]**o + (-0.126365767138)*x[0] + (0.953560832833)*x[1]**o + (-0.471959957123)*x[1]
+        ref[(1, 1, 3, 2)]=0.709884228349*x_ref[0]**o + (-0.126365767138)*x_ref[0] + (0.953560832833)*x_ref[1]**o + (-0.471959957123)*x_ref[1]
+        arg[(1, 1, 3, 3)]=-0.969147535492*x[0]**o + (-0.810141361359)*x[0] + (0.879335977773)*x[1]**o + (-0.892955615113)*x[1]
+        ref[(1, 1, 3, 3)]=-0.969147535492*x_ref[0]**o + (-0.810141361359)*x_ref[0] + (0.879335977773)*x_ref[1]**o + (-0.892955615113)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.951329649615*x[0]**o + (-0.147534568694)*x[0] + (0.722872744349)*x[1]**o + (0.552372125574)*x[1]
+        ref[(2, 0, 0, 0)]=0.951329649615*x_ref[0]**o + (-0.147534568694)*x_ref[0] + (0.722872744349)*x_ref[1]**o + (0.552372125574)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.9929508986*x[0]**o + (0.428638268276)*x[0] + (-0.110208668687)*x[1]**o + (-0.607559629885)*x[1]
+        ref[(2, 0, 0, 1)]=0.9929508986*x_ref[0]**o + (0.428638268276)*x_ref[0] + (-0.110208668687)*x_ref[1]**o + (-0.607559629885)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.119964303568*x[0]**o + (-0.930554646734)*x[0] + (0.999020296352)*x[1]**o + (0.672179076122)*x[1]
+        ref[(2, 0, 0, 2)]=0.119964303568*x_ref[0]**o + (-0.930554646734)*x_ref[0] + (0.999020296352)*x_ref[1]**o + (0.672179076122)*x_ref[1]
+        arg[(2, 0, 0, 3)]=-0.884397100741*x[0]**o + (0.180421690492)*x[0] + (-0.212124701983)*x[1]**o + (0.549257350202)*x[1]
+        ref[(2, 0, 0, 3)]=-0.884397100741*x_ref[0]**o + (0.180421690492)*x_ref[0] + (-0.212124701983)*x_ref[1]**o + (0.549257350202)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.246112198632*x[0]**o + (0.474568861766)*x[0] + (0.834770600013)*x[1]**o + (0.497729768856)*x[1]
+        ref[(2, 0, 1, 0)]=-0.246112198632*x_ref[0]**o + (0.474568861766)*x_ref[0] + (0.834770600013)*x_ref[1]**o + (0.497729768856)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.0023020001562*x[0]**o + (0.867113893618)*x[0] + (-0.0568692560398)*x[1]**o + (0.471484772955)*x[1]
+        ref[(2, 0, 1, 1)]=0.0023020001562*x_ref[0]**o + (0.867113893618)*x_ref[0] + (-0.0568692560398)*x_ref[1]**o + (0.471484772955)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.301160404632*x[0]**o + (-0.115192475719)*x[0] + (-0.692633741107)*x[1]**o + (0.358578390473)*x[1]
+        ref[(2, 0, 1, 2)]=-0.301160404632*x_ref[0]**o + (-0.115192475719)*x_ref[0] + (-0.692633741107)*x_ref[1]**o + (0.358578390473)*x_ref[1]
+        arg[(2, 0, 1, 3)]=-0.881550951203*x[0]**o + (-0.611725939974)*x[0] + (0.357642435941)*x[1]**o + (0.574719709772)*x[1]
+        ref[(2, 0, 1, 3)]=-0.881550951203*x_ref[0]**o + (-0.611725939974)*x_ref[0] + (0.357642435941)*x_ref[1]**o + (0.574719709772)*x_ref[1]
+        arg[(2, 0, 2, 0)]=0.465075193062*x[0]**o + (-0.389955028576)*x[0] + (-0.871059509422)*x[1]**o + (0.808457210403)*x[1]
+        ref[(2, 0, 2, 0)]=0.465075193062*x_ref[0]**o + (-0.389955028576)*x_ref[0] + (-0.871059509422)*x_ref[1]**o + (0.808457210403)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.295635428581*x[0]**o + (0.120164971171)*x[0] + (0.992697391741)*x[1]**o + (-0.54183198432)*x[1]
+        ref[(2, 0, 2, 1)]=0.295635428581*x_ref[0]**o + (0.120164971171)*x_ref[0] + (0.992697391741)*x_ref[1]**o + (-0.54183198432)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.834412816329*x[0]**o + (0.64475677422)*x[0] + (-0.512548262622)*x[1]**o + (-0.826624824206)*x[1]
+        ref[(2, 0, 2, 2)]=-0.834412816329*x_ref[0]**o + (0.64475677422)*x_ref[0] + (-0.512548262622)*x_ref[1]**o + (-0.826624824206)*x_ref[1]
+        arg[(2, 0, 2, 3)]=0.585904339096*x[0]**o + (0.842208449633)*x[0] + (-0.625621648514)*x[1]**o + (-0.682721659454)*x[1]
+        ref[(2, 0, 2, 3)]=0.585904339096*x_ref[0]**o + (0.842208449633)*x_ref[0] + (-0.625621648514)*x_ref[1]**o + (-0.682721659454)*x_ref[1]
+        arg[(2, 0, 3, 0)]=0.0831378575763*x[0]**o + (0.895357581791)*x[0] + (0.137104192017)*x[1]**o + (0.159691070644)*x[1]
+        ref[(2, 0, 3, 0)]=0.0831378575763*x_ref[0]**o + (0.895357581791)*x_ref[0] + (0.137104192017)*x_ref[1]**o + (0.159691070644)*x_ref[1]
+        arg[(2, 0, 3, 1)]=-0.521581193132*x[0]**o + (-0.0061915951532)*x[0] + (-0.853351941514)*x[1]**o + (0.084887511758)*x[1]
+        ref[(2, 0, 3, 1)]=-0.521581193132*x_ref[0]**o + (-0.0061915951532)*x_ref[0] + (-0.853351941514)*x_ref[1]**o + (0.084887511758)*x_ref[1]
+        arg[(2, 0, 3, 2)]=0.981766376679*x[0]**o + (0.157541303817)*x[0] + (-0.104794286229)*x[1]**o + (0.505803130137)*x[1]
+        ref[(2, 0, 3, 2)]=0.981766376679*x_ref[0]**o + (0.157541303817)*x_ref[0] + (-0.104794286229)*x_ref[1]**o + (0.505803130137)*x_ref[1]
+        arg[(2, 0, 3, 3)]=-0.923736683533*x[0]**o + (0.486760018345)*x[0] + (0.0701371725521)*x[1]**o + (-0.504731361188)*x[1]
+        ref[(2, 0, 3, 3)]=-0.923736683533*x_ref[0]**o + (0.486760018345)*x_ref[0] + (0.0701371725521)*x_ref[1]**o + (-0.504731361188)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.120201071641*x[0]**o + (-0.000699120992862)*x[0] + (-0.588828294307)*x[1]**o + (-0.185114047734)*x[1]
+        ref[(2, 1, 0, 0)]=-0.120201071641*x_ref[0]**o + (-0.000699120992862)*x_ref[0] + (-0.588828294307)*x_ref[1]**o + (-0.185114047734)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.965452150799*x[0]**o + (-0.612643136826)*x[0] + (0.888031789914)*x[1]**o + (0.670524872745)*x[1]
+        ref[(2, 1, 0, 1)]=-0.965452150799*x_ref[0]**o + (-0.612643136826)*x_ref[0] + (0.888031789914)*x_ref[1]**o + (0.670524872745)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.644448307497*x[0]**o + (-0.152727122933)*x[0] + (-0.794530225575)*x[1]**o + (0.620480659725)*x[1]
+        ref[(2, 1, 0, 2)]=-0.644448307497*x_ref[0]**o + (-0.152727122933)*x_ref[0] + (-0.794530225575)*x_ref[1]**o + (0.620480659725)*x_ref[1]
+        arg[(2, 1, 0, 3)]=-0.647562866937*x[0]**o + (0.210794696285)*x[0] + (0.713556317328)*x[1]**o + (-0.937706817968)*x[1]
+        ref[(2, 1, 0, 3)]=-0.647562866937*x_ref[0]**o + (0.210794696285)*x_ref[0] + (0.713556317328)*x_ref[1]**o + (-0.937706817968)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.93981323673*x[0]**o + (-0.15784111495)*x[0] + (-0.099636319791)*x[1]**o + (-0.810916557731)*x[1]
+        ref[(2, 1, 1, 0)]=0.93981323673*x_ref[0]**o + (-0.15784111495)*x_ref[0] + (-0.099636319791)*x_ref[1]**o + (-0.810916557731)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.358547731815*x[0]**o + (-0.0700636524674)*x[0] + (-0.33053596683)*x[1]**o + (-0.41123650182)*x[1]
+        ref[(2, 1, 1, 1)]=-0.358547731815*x_ref[0]**o + (-0.0700636524674)*x_ref[0] + (-0.33053596683)*x_ref[1]**o + (-0.41123650182)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.687587943671*x[0]**o + (0.31040951514)*x[0] + (-0.367386808224)*x[1]**o + (-0.623306827128)*x[1]
+        ref[(2, 1, 1, 2)]=-0.687587943671*x_ref[0]**o + (0.31040951514)*x_ref[0] + (-0.367386808224)*x_ref[1]**o + (-0.623306827128)*x_ref[1]
+        arg[(2, 1, 1, 3)]=0.959312744918*x[0]**o + (-0.925933411323)*x[0] + (0.673315423504)*x[1]**o + (-0.282820946458)*x[1]
+        ref[(2, 1, 1, 3)]=0.959312744918*x_ref[0]**o + (-0.925933411323)*x_ref[0] + (0.673315423504)*x_ref[1]**o + (-0.282820946458)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.0214247627706*x[0]**o + (0.901960910991)*x[0] + (-0.98047426369)*x[1]**o + (-0.736372607039)*x[1]
+        ref[(2, 1, 2, 0)]=-0.0214247627706*x_ref[0]**o + (0.901960910991)*x_ref[0] + (-0.98047426369)*x_ref[1]**o + (-0.736372607039)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.261777232894*x[0]**o + (0.303503536685)*x[0] + (-0.139300022421)*x[1]**o + (-0.219574280136)*x[1]
+        ref[(2, 1, 2, 1)]=0.261777232894*x_ref[0]**o + (0.303503536685)*x_ref[0] + (-0.139300022421)*x_ref[1]**o + (-0.219574280136)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.0676712547684*x[0]**o + (-0.891328536203)*x[0] + (-0.242225970519)*x[1]**o + (0.578856488969)*x[1]
+        ref[(2, 1, 2, 2)]=-0.0676712547684*x_ref[0]**o + (-0.891328536203)*x_ref[0] + (-0.242225970519)*x_ref[1]**o + (0.578856488969)*x_ref[1]
+        arg[(2, 1, 2, 3)]=-0.0116239655704*x[0]**o + (0.922981225169)*x[0] + (0.167237564695)*x[1]**o + (0.593067934567)*x[1]
+        ref[(2, 1, 2, 3)]=-0.0116239655704*x_ref[0]**o + (0.922981225169)*x_ref[0] + (0.167237564695)*x_ref[1]**o + (0.593067934567)*x_ref[1]
+        arg[(2, 1, 3, 0)]=0.196242321749*x[0]**o + (0.0232595425373)*x[0] + (0.671695939954)*x[1]**o + (-0.247813334243)*x[1]
+        ref[(2, 1, 3, 0)]=0.196242321749*x_ref[0]**o + (0.0232595425373)*x_ref[0] + (0.671695939954)*x_ref[1]**o + (-0.247813334243)*x_ref[1]
+        arg[(2, 1, 3, 1)]=0.271086450034*x[0]**o + (0.0848040847399)*x[0] + (-0.550744067078)*x[1]**o + (-0.00228532861863)*x[1]
+        ref[(2, 1, 3, 1)]=0.271086450034*x_ref[0]**o + (0.0848040847399)*x_ref[0] + (-0.550744067078)*x_ref[1]**o + (-0.00228532861863)*x_ref[1]
+        arg[(2, 1, 3, 2)]=0.493803641572*x[0]**o + (0.485530196395)*x[0] + (0.713035236628)*x[1]**o + (0.152539797552)*x[1]
+        ref[(2, 1, 3, 2)]=0.493803641572*x_ref[0]**o + (0.485530196395)*x_ref[0] + (0.713035236628)*x_ref[1]**o + (0.152539797552)*x_ref[1]
+        arg[(2, 1, 3, 3)]=0.812313833419*x[0]**o + (0.5013343952)*x[0] + (0.312262760912)*x[1]**o + (0.237558685305)*x[1]
+        ref[(2, 1, 3, 3)]=0.812313833419*x_ref[0]**o + (0.5013343952)*x_ref[0] + (0.312262760912)*x_ref[1]**o + (0.237558685305)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.517690017265*x[2]**o + (0.375255442564)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.517690017265*x_ref[2]**o + (0.375255442564)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.116078776843*x[2]**o + (0.685345355149)*x[2]
+            ref[(0, 0, 0, 1)]+=0.116078776843*x_ref[2]**o + (0.685345355149)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.461535947321*x[2]**o + (0.691106755641)*x[2]
+            ref[(0, 0, 0, 2)]+=0.461535947321*x_ref[2]**o + (0.691106755641)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.566145405498*x[2]**o + (0.258433799461)*x[2]
+            ref[(0, 0, 0, 3)]+=0.566145405498*x_ref[2]**o + (0.258433799461)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.400379372051*x[2]**o + (-0.182737655892)*x[2]
+            ref[(0, 0, 1, 0)]+=0.400379372051*x_ref[2]**o + (-0.182737655892)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.613384971723*x[2]**o + (-0.449116248765)*x[2]
+            ref[(0, 0, 1, 1)]+=0.613384971723*x_ref[2]**o + (-0.449116248765)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.278835190335*x[2]**o + (-0.224647178615)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.278835190335*x_ref[2]**o + (-0.224647178615)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=0.521346391117*x[2]**o + (0.75377599969)*x[2]
+            ref[(0, 0, 1, 3)]+=0.521346391117*x_ref[2]**o + (0.75377599969)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.730219985949*x[2]**o + (-0.283488102761)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.730219985949*x_ref[2]**o + (-0.283488102761)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.176238569721*x[2]**o + (-0.826148916189)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.176238569721*x_ref[2]**o + (-0.826148916189)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.0635561307597*x[2]**o + (-0.716713422892)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.0635561307597*x_ref[2]**o + (-0.716713422892)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=0.112641734014*x[2]**o + (0.956713597441)*x[2]
+            ref[(0, 0, 2, 3)]+=0.112641734014*x_ref[2]**o + (0.956713597441)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=-0.767087484169*x[2]**o + (-0.658474673206)*x[2]
+            ref[(0, 0, 3, 0)]+=-0.767087484169*x_ref[2]**o + (-0.658474673206)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.625469380793*x[2]**o + (0.581131670645)*x[2]
+            ref[(0, 0, 3, 1)]+=0.625469380793*x_ref[2]**o + (0.581131670645)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=0.164369572943*x[2]**o + (-0.596923445242)*x[2]
+            ref[(0, 0, 3, 2)]+=0.164369572943*x_ref[2]**o + (-0.596923445242)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=0.574697526213*x[2]**o + (0.177221190011)*x[2]
+            ref[(0, 0, 3, 3)]+=0.574697526213*x_ref[2]**o + (0.177221190011)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.57934129207*x[2]**o + (0.58247047615)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.57934129207*x_ref[2]**o + (0.58247047615)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.114601173018*x[2]**o + (-0.27614856099)*x[2]
+            ref[(0, 1, 0, 1)]+=0.114601173018*x_ref[2]**o + (-0.27614856099)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.194164976489*x[2]**o + (0.123732793382)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.194164976489*x_ref[2]**o + (0.123732793382)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=0.0430456489953*x[2]**o + (0.425336318806)*x[2]
+            ref[(0, 1, 0, 3)]+=0.0430456489953*x_ref[2]**o + (0.425336318806)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.345174849755*x[2]**o + (0.12679150517)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.345174849755*x_ref[2]**o + (0.12679150517)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.275435262451*x[2]**o + (-0.987886681593)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.275435262451*x_ref[2]**o + (-0.987886681593)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.111234561191*x[2]**o + (0.53694817775)*x[2]
+            ref[(0, 1, 1, 2)]+=0.111234561191*x_ref[2]**o + (0.53694817775)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.814757622373*x[2]**o + (0.41684173008)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.814757622373*x_ref[2]**o + (0.41684173008)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.436607618427*x[2]**o + (-0.146400805619)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.436607618427*x_ref[2]**o + (-0.146400805619)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.886606284389*x[2]**o + (0.889066162106)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.886606284389*x_ref[2]**o + (0.889066162106)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=1.54788126261e-05*x[2]**o + (0.903584013347)*x[2]
+            ref[(0, 1, 2, 2)]+=1.54788126261e-05*x_ref[2]**o + (0.903584013347)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=-0.780164205265*x[2]**o + (-0.720860723592)*x[2]
+            ref[(0, 1, 2, 3)]+=-0.780164205265*x_ref[2]**o + (-0.720860723592)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=0.344352758779*x[2]**o + (0.602174321955)*x[2]
+            ref[(0, 1, 3, 0)]+=0.344352758779*x_ref[2]**o + (0.602174321955)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=0.694073647988*x[2]**o + (0.671821715829)*x[2]
+            ref[(0, 1, 3, 1)]+=0.694073647988*x_ref[2]**o + (0.671821715829)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=-0.356726761893*x[2]**o + (0.900640725609)*x[2]
+            ref[(0, 1, 3, 2)]+=-0.356726761893*x_ref[2]**o + (0.900640725609)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=-0.226407187328*x[2]**o + (0.728594369392)*x[2]
+            ref[(0, 1, 3, 3)]+=-0.226407187328*x_ref[2]**o + (0.728594369392)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.0547411405299*x[2]**o + (0.655738585014)*x[2]
+            ref[(1, 0, 0, 0)]+=0.0547411405299*x_ref[2]**o + (0.655738585014)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.298170536896*x[2]**o + (0.801851890424)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.298170536896*x_ref[2]**o + (0.801851890424)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.239512742606*x[2]**o + (0.0337907336015)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.239512742606*x_ref[2]**o + (0.0337907336015)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=-0.233944803607*x[2]**o + (0.184280134656)*x[2]
+            ref[(1, 0, 0, 3)]+=-0.233944803607*x_ref[2]**o + (0.184280134656)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.298882932415*x[2]**o + (0.573956244747)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.298882932415*x_ref[2]**o + (0.573956244747)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.0216599935054*x[2]**o + (0.258958668673)*x[2]
+            ref[(1, 0, 1, 1)]+=0.0216599935054*x_ref[2]**o + (0.258958668673)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.797556868326*x[2]**o + (0.132583957945)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.797556868326*x_ref[2]**o + (0.132583957945)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=0.406535906532*x[2]**o + (0.355901132687)*x[2]
+            ref[(1, 0, 1, 3)]+=0.406535906532*x_ref[2]**o + (0.355901132687)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.121043316697*x[2]**o + (0.764889116506)*x[2]
+            ref[(1, 0, 2, 0)]+=0.121043316697*x_ref[2]**o + (0.764889116506)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.790660492566*x[2]**o + (0.233480776188)*x[2]
+            ref[(1, 0, 2, 1)]+=0.790660492566*x_ref[2]**o + (0.233480776188)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.186212511911*x[2]**o + (0.917697369155)*x[2]
+            ref[(1, 0, 2, 2)]+=-0.186212511911*x_ref[2]**o + (0.917697369155)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=-0.176574405239*x[2]**o + (-0.476111154806)*x[2]
+            ref[(1, 0, 2, 3)]+=-0.176574405239*x_ref[2]**o + (-0.476111154806)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=0.508236971884*x[2]**o + (0.430139545985)*x[2]
+            ref[(1, 0, 3, 0)]+=0.508236971884*x_ref[2]**o + (0.430139545985)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.124851084559*x[2]**o + (0.876720031949)*x[2]
+            ref[(1, 0, 3, 1)]+=-0.124851084559*x_ref[2]**o + (0.876720031949)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=-0.132759375051*x[2]**o + (-0.585538576091)*x[2]
+            ref[(1, 0, 3, 2)]+=-0.132759375051*x_ref[2]**o + (-0.585538576091)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=-0.986431500998*x[2]**o + (0.403082162737)*x[2]
+            ref[(1, 0, 3, 3)]+=-0.986431500998*x_ref[2]**o + (0.403082162737)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.00279184104028*x[2]**o + (0.0517667064971)*x[2]
+            ref[(1, 1, 0, 0)]+=0.00279184104028*x_ref[2]**o + (0.0517667064971)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.35645975895*x[2]**o + (0.603021870636)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.35645975895*x_ref[2]**o + (0.603021870636)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.019370675061*x[2]**o + (-0.308202763941)*x[2]
+            ref[(1, 1, 0, 2)]+=0.019370675061*x_ref[2]**o + (-0.308202763941)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.267845540397*x[2]**o + (0.694819962102)*x[2]
+            ref[(1, 1, 0, 3)]+=0.267845540397*x_ref[2]**o + (0.694819962102)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.931291433387*x[2]**o + (-0.789286653524)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.931291433387*x_ref[2]**o + (-0.789286653524)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.984980134033*x[2]**o + (0.850648190995)*x[2]
+            ref[(1, 1, 1, 1)]+=0.984980134033*x_ref[2]**o + (0.850648190995)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.80676532506*x[2]**o + (-0.985207312509)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.80676532506*x_ref[2]**o + (-0.985207312509)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=-0.159029507856*x[2]**o + (0.655175726424)*x[2]
+            ref[(1, 1, 1, 3)]+=-0.159029507856*x_ref[2]**o + (0.655175726424)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.855054773285*x[2]**o + (0.738891839663)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.855054773285*x_ref[2]**o + (0.738891839663)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.470871444473*x[2]**o + (0.0378358059166)*x[2]
+            ref[(1, 1, 2, 1)]+=0.470871444473*x_ref[2]**o + (0.0378358059166)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.224898292426*x[2]**o + (-0.541942413165)*x[2]
+            ref[(1, 1, 2, 2)]+=0.224898292426*x_ref[2]**o + (-0.541942413165)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=0.738177553125*x[2]**o + (-0.776709557024)*x[2]
+            ref[(1, 1, 2, 3)]+=0.738177553125*x_ref[2]**o + (-0.776709557024)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.0697891747193*x[2]**o + (0.201115641186)*x[2]
+            ref[(1, 1, 3, 0)]+=-0.0697891747193*x_ref[2]**o + (0.201115641186)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=0.301913397046*x[2]**o + (-0.21946537969)*x[2]
+            ref[(1, 1, 3, 1)]+=0.301913397046*x_ref[2]**o + (-0.21946537969)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=0.790699695794*x[2]**o + (-0.947612204952)*x[2]
+            ref[(1, 1, 3, 2)]+=0.790699695794*x_ref[2]**o + (-0.947612204952)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=-0.330405159991*x[2]**o + (-0.829815610651)*x[2]
+            ref[(1, 1, 3, 3)]+=-0.330405159991*x_ref[2]**o + (-0.829815610651)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.181229211116*x[2]**o + (0.602820976358)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.181229211116*x_ref[2]**o + (0.602820976358)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.0576332115209*x[2]**o + (0.0111017543991)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.0576332115209*x_ref[2]**o + (0.0111017543991)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.368358896049*x[2]**o + (0.713610051856)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.368358896049*x_ref[2]**o + (0.713610051856)*x_ref[2]
+            arg[(2, 0, 0, 3)]+=-0.23874049979*x[2]**o + (-0.592641208316)*x[2]
+            ref[(2, 0, 0, 3)]+=-0.23874049979*x_ref[2]**o + (-0.592641208316)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.263358197925*x[2]**o + (-0.421952418367)*x[2]
+            ref[(2, 0, 1, 0)]+=0.263358197925*x_ref[2]**o + (-0.421952418367)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.322555650008*x[2]**o + (0.29967361442)*x[2]
+            ref[(2, 0, 1, 1)]+=0.322555650008*x_ref[2]**o + (0.29967361442)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.826261708988*x[2]**o + (-0.794261028208)*x[2]
+            ref[(2, 0, 1, 2)]+=0.826261708988*x_ref[2]**o + (-0.794261028208)*x_ref[2]
+            arg[(2, 0, 1, 3)]+=0.683087092178*x[2]**o + (0.233732895633)*x[2]
+            ref[(2, 0, 1, 3)]+=0.683087092178*x_ref[2]**o + (0.233732895633)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.462565993709*x[2]**o + (0.322059282099)*x[2]
+            ref[(2, 0, 2, 0)]+=-0.462565993709*x_ref[2]**o + (0.322059282099)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.360887926403*x[2]**o + (-0.634204504614)*x[2]
+            ref[(2, 0, 2, 1)]+=-0.360887926403*x_ref[2]**o + (-0.634204504614)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.770169289405*x[2]**o + (0.582292119329)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.770169289405*x_ref[2]**o + (0.582292119329)*x_ref[2]
+            arg[(2, 0, 2, 3)]+=-0.0739586778746*x[2]**o + (0.457386336467)*x[2]
+            ref[(2, 0, 2, 3)]+=-0.0739586778746*x_ref[2]**o + (0.457386336467)*x_ref[2]
+            arg[(2, 0, 3, 0)]+=0.898350664958*x[2]**o + (0.0431123558434)*x[2]
+            ref[(2, 0, 3, 0)]+=0.898350664958*x_ref[2]**o + (0.0431123558434)*x_ref[2]
+            arg[(2, 0, 3, 1)]+=-0.949492345655*x[2]**o + (0.901077361216)*x[2]
+            ref[(2, 0, 3, 1)]+=-0.949492345655*x_ref[2]**o + (0.901077361216)*x_ref[2]
+            arg[(2, 0, 3, 2)]+=-0.759234867855*x[2]**o + (0.493792940379)*x[2]
+            ref[(2, 0, 3, 2)]+=-0.759234867855*x_ref[2]**o + (0.493792940379)*x_ref[2]
+            arg[(2, 0, 3, 3)]+=0.511004679761*x[2]**o + (0.0531831546112)*x[2]
+            ref[(2, 0, 3, 3)]+=0.511004679761*x_ref[2]**o + (0.0531831546112)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.940021465616*x[2]**o + (-0.810792043755)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.940021465616*x_ref[2]**o + (-0.810792043755)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.435380199189*x[2]**o + (0.0903379566933)*x[2]
+            ref[(2, 1, 0, 1)]+=0.435380199189*x_ref[2]**o + (0.0903379566933)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.0794354965115*x[2]**o + (-0.271336949063)*x[2]
+            ref[(2, 1, 0, 2)]+=0.0794354965115*x_ref[2]**o + (-0.271336949063)*x_ref[2]
+            arg[(2, 1, 0, 3)]+=0.83063856958*x[2]**o + (0.790690159508)*x[2]
+            ref[(2, 1, 0, 3)]+=0.83063856958*x_ref[2]**o + (0.790690159508)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.249660588763*x[2]**o + (-0.429012960318)*x[2]
+            ref[(2, 1, 1, 0)]+=-0.249660588763*x_ref[2]**o + (-0.429012960318)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.443726066913*x[2]**o + (-0.291587288076)*x[2]
+            ref[(2, 1, 1, 1)]+=0.443726066913*x_ref[2]**o + (-0.291587288076)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.849235816194*x[2]**o + (0.00142781434306)*x[2]
+            ref[(2, 1, 1, 2)]+=0.849235816194*x_ref[2]**o + (0.00142781434306)*x_ref[2]
+            arg[(2, 1, 1, 3)]+=0.953548959681*x[2]**o + (-0.539750616272)*x[2]
+            ref[(2, 1, 1, 3)]+=0.953548959681*x_ref[2]**o + (-0.539750616272)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.560249475159*x[2]**o + (-0.319832301801)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.560249475159*x_ref[2]**o + (-0.319832301801)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.414150392355*x[2]**o + (-0.185631005895)*x[2]
+            ref[(2, 1, 2, 1)]+=-0.414150392355*x_ref[2]**o + (-0.185631005895)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=-0.566842953093*x[2]**o + (0.494219168289)*x[2]
+            ref[(2, 1, 2, 2)]+=-0.566842953093*x_ref[2]**o + (0.494219168289)*x_ref[2]
+            arg[(2, 1, 2, 3)]+=-0.571334938917*x[2]**o + (-0.638000603222)*x[2]
+            ref[(2, 1, 2, 3)]+=-0.571334938917*x_ref[2]**o + (-0.638000603222)*x_ref[2]
+            arg[(2, 1, 3, 0)]+=0.389142911761*x[2]**o + (0.227853739427)*x[2]
+            ref[(2, 1, 3, 0)]+=0.389142911761*x_ref[2]**o + (0.227853739427)*x_ref[2]
+            arg[(2, 1, 3, 1)]+=0.669428098557*x[2]**o + (-0.377773704946)*x[2]
+            ref[(2, 1, 3, 1)]+=0.669428098557*x_ref[2]**o + (-0.377773704946)*x_ref[2]
+            arg[(2, 1, 3, 2)]+=-0.855866061242*x[2]**o + (-0.988644285111)*x[2]
+            ref[(2, 1, 3, 2)]+=-0.855866061242*x_ref[2]**o + (-0.988644285111)*x_ref[2]
+            arg[(2, 1, 3, 3)]+=0.315015520367*x[2]**o + (0.213786408019)*x[2]
+            ref[(2, 1, 3, 3)]+=0.315015520367*x_ref[2]**o + (0.213786408019)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 2, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.183891430692*x[0]**o + (0.486596289931)*x[0] + (0.393300819669)*x[1]**o + (0.948921424376)*x[1]
+        ref=-0.183891430692*x_ref[0]**o + (0.486596289931)*x_ref[0] + (0.393300819669)*x_ref[1]**o + (0.948921424376)*x_ref[1]
+        if dim==3:
+            arg+=(0.743498194626)*x[2]**o + (-0.399595781689)*x[2]
+            ref+=(0.743498194626)*x_ref[2]**o + (-0.399595781689)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.590975732151*x[0]**o + (0.0947988776011)*x[0] + (0.732171524315)*x[1]**o + (-0.271980853478)*x[1]
+        ref[(0,)]=0.590975732151*x_ref[0]**o + (0.0947988776011)*x_ref[0] + (0.732171524315)*x_ref[1]**o + (-0.271980853478)*x_ref[1]
+        arg[(1,)]=-0.774924291133*x[0]**o + (0.998981528388)*x[0] + (0.37834014129)*x[1]**o + (0.320334953212)*x[1]
+        ref[(1,)]=-0.774924291133*x_ref[0]**o + (0.998981528388)*x_ref[0] + (0.37834014129)*x_ref[1]**o + (0.320334953212)*x_ref[1]
+        arg[(2,)]=0.958064587493*x[0]**o + (-0.100263060452)*x[0] + (-0.38770460031)*x[1]**o + (0.954826363305)*x[1]
+        ref[(2,)]=0.958064587493*x_ref[0]**o + (-0.100263060452)*x_ref[0] + (-0.38770460031)*x_ref[1]**o + (0.954826363305)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.297078224516*x[2]**o + (0.648216815577)*x[2]
+            ref[(0,)]+=0.297078224516*x_ref[2]**o + (0.648216815577)*x_ref[2]
+            arg[(1,)]+=-0.82808380069*x[2]**o + (-0.793445030896)*x[2]
+            ref[(1,)]+=-0.82808380069*x_ref[2]**o + (-0.793445030896)*x_ref[2]
+            arg[(2,)]+=0.12587614358*x[2]**o + (0.619164756411)*x[2]
+            ref[(2,)]+=0.12587614358*x_ref[2]**o + (0.619164756411)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4),w)
+        ref = Data(0,(3, 4),w_ref)
+        arg[(0, 0)]=0.631222515602*x[0]**o + (0.199371860562)*x[0] + (-0.178106523124)*x[1]**o + (0.0651111676114)*x[1]
+        ref[(0, 0)]=0.631222515602*x_ref[0]**o + (0.199371860562)*x_ref[0] + (-0.178106523124)*x_ref[1]**o + (0.0651111676114)*x_ref[1]
+        arg[(0, 1)]=0.534994745084*x[0]**o + (-0.35067731101)*x[0] + (0.255004898384)*x[1]**o + (0.914436957216)*x[1]
+        ref[(0, 1)]=0.534994745084*x_ref[0]**o + (-0.35067731101)*x_ref[0] + (0.255004898384)*x_ref[1]**o + (0.914436957216)*x_ref[1]
+        arg[(0, 2)]=0.575532448074*x[0]**o + (-0.412038795199)*x[0] + (0.875779948284)*x[1]**o + (-0.152824847)*x[1]
+        ref[(0, 2)]=0.575532448074*x_ref[0]**o + (-0.412038795199)*x_ref[0] + (0.875779948284)*x_ref[1]**o + (-0.152824847)*x_ref[1]
+        arg[(0, 3)]=-0.319921250543*x[0]**o + (0.883046195102)*x[0] + (-0.205024091952)*x[1]**o + (-0.690033659062)*x[1]
+        ref[(0, 3)]=-0.319921250543*x_ref[0]**o + (0.883046195102)*x_ref[0] + (-0.205024091952)*x_ref[1]**o + (-0.690033659062)*x_ref[1]
+        arg[(1, 0)]=0.0345632393429*x[0]**o + (0.974766545426)*x[0] + (-0.645911285209)*x[1]**o + (0.779138502292)*x[1]
+        ref[(1, 0)]=0.0345632393429*x_ref[0]**o + (0.974766545426)*x_ref[0] + (-0.645911285209)*x_ref[1]**o + (0.779138502292)*x_ref[1]
+        arg[(1, 1)]=0.761827719869*x[0]**o + (0.136778278262)*x[0] + (-0.300555992417)*x[1]**o + (0.05562235659)*x[1]
+        ref[(1, 1)]=0.761827719869*x_ref[0]**o + (0.136778278262)*x_ref[0] + (-0.300555992417)*x_ref[1]**o + (0.05562235659)*x_ref[1]
+        arg[(1, 2)]=0.792680500079*x[0]**o + (-0.932069716537)*x[0] + (0.42531987643)*x[1]**o + (-0.299926258699)*x[1]
+        ref[(1, 2)]=0.792680500079*x_ref[0]**o + (-0.932069716537)*x_ref[0] + (0.42531987643)*x_ref[1]**o + (-0.299926258699)*x_ref[1]
+        arg[(1, 3)]=-0.997113418184*x[0]**o + (0.387782347212)*x[0] + (0.815898466586)*x[1]**o + (0.968865786019)*x[1]
+        ref[(1, 3)]=-0.997113418184*x_ref[0]**o + (0.387782347212)*x_ref[0] + (0.815898466586)*x_ref[1]**o + (0.968865786019)*x_ref[1]
+        arg[(2, 0)]=-0.656990914365*x[0]**o + (0.762178876048)*x[0] + (-0.954746972936)*x[1]**o + (0.788042249103)*x[1]
+        ref[(2, 0)]=-0.656990914365*x_ref[0]**o + (0.762178876048)*x_ref[0] + (-0.954746972936)*x_ref[1]**o + (0.788042249103)*x_ref[1]
+        arg[(2, 1)]=-0.307557487468*x[0]**o + (0.684406243498)*x[0] + (-0.32001340093)*x[1]**o + (-0.230650803635)*x[1]
+        ref[(2, 1)]=-0.307557487468*x_ref[0]**o + (0.684406243498)*x_ref[0] + (-0.32001340093)*x_ref[1]**o + (-0.230650803635)*x_ref[1]
+        arg[(2, 2)]=0.138313035964*x[0]**o + (-0.56805279084)*x[0] + (0.546570537772)*x[1]**o + (-0.68530664546)*x[1]
+        ref[(2, 2)]=0.138313035964*x_ref[0]**o + (-0.56805279084)*x_ref[0] + (0.546570537772)*x_ref[1]**o + (-0.68530664546)*x_ref[1]
+        arg[(2, 3)]=-0.694069153083*x[0]**o + (0.581433139045)*x[0] + (0.973281505453)*x[1]**o + (0.126176606373)*x[1]
+        ref[(2, 3)]=-0.694069153083*x_ref[0]**o + (0.581433139045)*x_ref[0] + (0.973281505453)*x_ref[1]**o + (0.126176606373)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.696084034434*x[2]**o + (-0.655932477215)*x[2]
+            ref[(0, 0)]+=0.696084034434*x_ref[2]**o + (-0.655932477215)*x_ref[2]
+            arg[(0, 1)]+=0.0880693111792*x[2]**o + (0.771363976256)*x[2]
+            ref[(0, 1)]+=0.0880693111792*x_ref[2]**o + (0.771363976256)*x_ref[2]
+            arg[(0, 2)]+=-0.958950187128*x[2]**o + (-0.766300898903)*x[2]
+            ref[(0, 2)]+=-0.958950187128*x_ref[2]**o + (-0.766300898903)*x_ref[2]
+            arg[(0, 3)]+=0.711608091417*x[2]**o + (-0.18073876633)*x[2]
+            ref[(0, 3)]+=0.711608091417*x_ref[2]**o + (-0.18073876633)*x_ref[2]
+            arg[(1, 0)]+=0.101744960974*x[2]**o + (0.0131330355869)*x[2]
+            ref[(1, 0)]+=0.101744960974*x_ref[2]**o + (0.0131330355869)*x_ref[2]
+            arg[(1, 1)]+=-0.466045624977*x[2]**o + (0.266075585438)*x[2]
+            ref[(1, 1)]+=-0.466045624977*x_ref[2]**o + (0.266075585438)*x_ref[2]
+            arg[(1, 2)]+=0.560509360615*x[2]**o + (0.070015666153)*x[2]
+            ref[(1, 2)]+=0.560509360615*x_ref[2]**o + (0.070015666153)*x_ref[2]
+            arg[(1, 3)]+=-0.089619297629*x[2]**o + (-0.801372963469)*x[2]
+            ref[(1, 3)]+=-0.089619297629*x_ref[2]**o + (-0.801372963469)*x_ref[2]
+            arg[(2, 0)]+=0.579036800502*x[2]**o + (-0.978820023423)*x[2]
+            ref[(2, 0)]+=0.579036800502*x_ref[2]**o + (-0.978820023423)*x_ref[2]
+            arg[(2, 1)]+=-0.428181091746*x[2]**o + (-0.178549227067)*x[2]
+            ref[(2, 1)]+=-0.428181091746*x_ref[2]**o + (-0.178549227067)*x_ref[2]
+            arg[(2, 2)]+=-0.63505264149*x[2]**o + (-0.789577322591)*x[2]
+            ref[(2, 2)]+=-0.63505264149*x_ref[2]**o + (-0.789577322591)*x_ref[2]
+            arg[(2, 3)]+=0.710007905641*x[2]**o + (0.34293434072)*x[2]
+            ref[(2, 3)]+=0.710007905641*x_ref[2]**o + (0.34293434072)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 4, 4),w)
+        ref = Data(0,(3, 4, 4),w_ref)
+        arg[(0, 0, 0)]=-0.90762435417*x[0]**o + (-0.193713238832)*x[0] + (-0.583842158943)*x[1]**o + (-0.891313148967)*x[1]
+        ref[(0, 0, 0)]=-0.90762435417*x_ref[0]**o + (-0.193713238832)*x_ref[0] + (-0.583842158943)*x_ref[1]**o + (-0.891313148967)*x_ref[1]
+        arg[(0, 0, 1)]=-0.0601227668012*x[0]**o + (-0.74797380721)*x[0] + (0.254855660045)*x[1]**o + (-0.22206307144)*x[1]
+        ref[(0, 0, 1)]=-0.0601227668012*x_ref[0]**o + (-0.74797380721)*x_ref[0] + (0.254855660045)*x_ref[1]**o + (-0.22206307144)*x_ref[1]
+        arg[(0, 0, 2)]=-0.676017015182*x[0]**o + (-0.381421055673)*x[0] + (0.735685614947)*x[1]**o + (0.601355624625)*x[1]
+        ref[(0, 0, 2)]=-0.676017015182*x_ref[0]**o + (-0.381421055673)*x_ref[0] + (0.735685614947)*x_ref[1]**o + (0.601355624625)*x_ref[1]
+        arg[(0, 0, 3)]=-0.713873333078*x[0]**o + (-0.838658627663)*x[0] + (-0.630800296613)*x[1]**o + (-0.979485517178)*x[1]
+        ref[(0, 0, 3)]=-0.713873333078*x_ref[0]**o + (-0.838658627663)*x_ref[0] + (-0.630800296613)*x_ref[1]**o + (-0.979485517178)*x_ref[1]
+        arg[(0, 1, 0)]=-0.60758693239*x[0]**o + (-0.905021155861)*x[0] + (0.552920288019)*x[1]**o + (-0.590970128745)*x[1]
+        ref[(0, 1, 0)]=-0.60758693239*x_ref[0]**o + (-0.905021155861)*x_ref[0] + (0.552920288019)*x_ref[1]**o + (-0.590970128745)*x_ref[1]
+        arg[(0, 1, 1)]=0.9945636927*x[0]**o + (0.428723266853)*x[0] + (0.970381921657)*x[1]**o + (0.172617087433)*x[1]
+        ref[(0, 1, 1)]=0.9945636927*x_ref[0]**o + (0.428723266853)*x_ref[0] + (0.970381921657)*x_ref[1]**o + (0.172617087433)*x_ref[1]
+        arg[(0, 1, 2)]=0.651266560591*x[0]**o + (0.182394096361)*x[0] + (-0.327293326909)*x[1]**o + (-0.692348156789)*x[1]
+        ref[(0, 1, 2)]=0.651266560591*x_ref[0]**o + (0.182394096361)*x_ref[0] + (-0.327293326909)*x_ref[1]**o + (-0.692348156789)*x_ref[1]
+        arg[(0, 1, 3)]=-0.90229447235*x[0]**o + (0.913806003311)*x[0] + (0.510481171016)*x[1]**o + (-0.896895093658)*x[1]
+        ref[(0, 1, 3)]=-0.90229447235*x_ref[0]**o + (0.913806003311)*x_ref[0] + (0.510481171016)*x_ref[1]**o + (-0.896895093658)*x_ref[1]
+        arg[(0, 2, 0)]=0.91585879965*x[0]**o + (0.534341295158)*x[0] + (-0.392740405726)*x[1]**o + (-0.591998605839)*x[1]
+        ref[(0, 2, 0)]=0.91585879965*x_ref[0]**o + (0.534341295158)*x_ref[0] + (-0.392740405726)*x_ref[1]**o + (-0.591998605839)*x_ref[1]
+        arg[(0, 2, 1)]=0.866403858469*x[0]**o + (-0.300447644264)*x[0] + (-0.26958481964)*x[1]**o + (-0.362162715036)*x[1]
+        ref[(0, 2, 1)]=0.866403858469*x_ref[0]**o + (-0.300447644264)*x_ref[0] + (-0.26958481964)*x_ref[1]**o + (-0.362162715036)*x_ref[1]
+        arg[(0, 2, 2)]=0.224735225916*x[0]**o + (0.629020851499)*x[0] + (0.265800063152)*x[1]**o + (-0.956392579127)*x[1]
+        ref[(0, 2, 2)]=0.224735225916*x_ref[0]**o + (0.629020851499)*x_ref[0] + (0.265800063152)*x_ref[1]**o + (-0.956392579127)*x_ref[1]
+        arg[(0, 2, 3)]=-0.553302752791*x[0]**o + (0.823330444908)*x[0] + (-0.995383529468)*x[1]**o + (0.0215082181763)*x[1]
+        ref[(0, 2, 3)]=-0.553302752791*x_ref[0]**o + (0.823330444908)*x_ref[0] + (-0.995383529468)*x_ref[1]**o + (0.0215082181763)*x_ref[1]
+        arg[(0, 3, 0)]=0.43222465862*x[0]**o + (-0.772399248726)*x[0] + (0.0771374296292)*x[1]**o + (0.562774742861)*x[1]
+        ref[(0, 3, 0)]=0.43222465862*x_ref[0]**o + (-0.772399248726)*x_ref[0] + (0.0771374296292)*x_ref[1]**o + (0.562774742861)*x_ref[1]
+        arg[(0, 3, 1)]=-0.605777730718*x[0]**o + (-0.703657591003)*x[0] + (-0.494142949881)*x[1]**o + (0.877633027306)*x[1]
+        ref[(0, 3, 1)]=-0.605777730718*x_ref[0]**o + (-0.703657591003)*x_ref[0] + (-0.494142949881)*x_ref[1]**o + (0.877633027306)*x_ref[1]
+        arg[(0, 3, 2)]=-0.924639257665*x[0]**o + (-0.342828359606)*x[0] + (0.706965280229)*x[1]**o + (-0.578604905821)*x[1]
+        ref[(0, 3, 2)]=-0.924639257665*x_ref[0]**o + (-0.342828359606)*x_ref[0] + (0.706965280229)*x_ref[1]**o + (-0.578604905821)*x_ref[1]
+        arg[(0, 3, 3)]=-0.627349928588*x[0]**o + (0.481955222978)*x[0] + (-0.154628979164)*x[1]**o + (-0.340574216612)*x[1]
+        ref[(0, 3, 3)]=-0.627349928588*x_ref[0]**o + (0.481955222978)*x_ref[0] + (-0.154628979164)*x_ref[1]**o + (-0.340574216612)*x_ref[1]
+        arg[(1, 0, 0)]=0.657951855958*x[0]**o + (0.706846733457)*x[0] + (0.574928281817)*x[1]**o + (-0.674213824782)*x[1]
+        ref[(1, 0, 0)]=0.657951855958*x_ref[0]**o + (0.706846733457)*x_ref[0] + (0.574928281817)*x_ref[1]**o + (-0.674213824782)*x_ref[1]
+        arg[(1, 0, 1)]=-0.612904230714*x[0]**o + (0.055843476907)*x[0] + (-0.928648193198)*x[1]**o + (0.229474485006)*x[1]
+        ref[(1, 0, 1)]=-0.612904230714*x_ref[0]**o + (0.055843476907)*x_ref[0] + (-0.928648193198)*x_ref[1]**o + (0.229474485006)*x_ref[1]
+        arg[(1, 0, 2)]=0.376064026391*x[0]**o + (0.11530036853)*x[0] + (-0.61877856641)*x[1]**o + (0.632768522517)*x[1]
+        ref[(1, 0, 2)]=0.376064026391*x_ref[0]**o + (0.11530036853)*x_ref[0] + (-0.61877856641)*x_ref[1]**o + (0.632768522517)*x_ref[1]
+        arg[(1, 0, 3)]=0.727918327305*x[0]**o + (-0.597269449377)*x[0] + (-0.380148661855)*x[1]**o + (-0.620073724196)*x[1]
+        ref[(1, 0, 3)]=0.727918327305*x_ref[0]**o + (-0.597269449377)*x_ref[0] + (-0.380148661855)*x_ref[1]**o + (-0.620073724196)*x_ref[1]
+        arg[(1, 1, 0)]=-0.201033071542*x[0]**o + (0.67208341049)*x[0] + (0.283485673404)*x[1]**o + (-0.438122808924)*x[1]
+        ref[(1, 1, 0)]=-0.201033071542*x_ref[0]**o + (0.67208341049)*x_ref[0] + (0.283485673404)*x_ref[1]**o + (-0.438122808924)*x_ref[1]
+        arg[(1, 1, 1)]=-0.788484553443*x[0]**o + (-0.0918120570184)*x[0] + (0.668962833644)*x[1]**o + (-0.331281291319)*x[1]
+        ref[(1, 1, 1)]=-0.788484553443*x_ref[0]**o + (-0.0918120570184)*x_ref[0] + (0.668962833644)*x_ref[1]**o + (-0.331281291319)*x_ref[1]
+        arg[(1, 1, 2)]=0.492036161321*x[0]**o + (0.074932627897)*x[0] + (0.729237298296)*x[1]**o + (-0.140793593934)*x[1]
+        ref[(1, 1, 2)]=0.492036161321*x_ref[0]**o + (0.074932627897)*x_ref[0] + (0.729237298296)*x_ref[1]**o + (-0.140793593934)*x_ref[1]
+        arg[(1, 1, 3)]=0.345581906807*x[0]**o + (-0.891468645073)*x[0] + (-0.373581751983)*x[1]**o + (-0.994317320191)*x[1]
+        ref[(1, 1, 3)]=0.345581906807*x_ref[0]**o + (-0.891468645073)*x_ref[0] + (-0.373581751983)*x_ref[1]**o + (-0.994317320191)*x_ref[1]
+        arg[(1, 2, 0)]=0.707786140575*x[0]**o + (0.334662075499)*x[0] + (-0.937661258281)*x[1]**o + (0.970561770202)*x[1]
+        ref[(1, 2, 0)]=0.707786140575*x_ref[0]**o + (0.334662075499)*x_ref[0] + (-0.937661258281)*x_ref[1]**o + (0.970561770202)*x_ref[1]
+        arg[(1, 2, 1)]=-0.427660671099*x[0]**o + (-0.158454826151)*x[0] + (0.631731929984)*x[1]**o + (0.674219589996)*x[1]
+        ref[(1, 2, 1)]=-0.427660671099*x_ref[0]**o + (-0.158454826151)*x_ref[0] + (0.631731929984)*x_ref[1]**o + (0.674219589996)*x_ref[1]
+        arg[(1, 2, 2)]=0.939935425106*x[0]**o + (0.0683809815342)*x[0] + (-0.502597232439)*x[1]**o + (-0.515121364994)*x[1]
+        ref[(1, 2, 2)]=0.939935425106*x_ref[0]**o + (0.0683809815342)*x_ref[0] + (-0.502597232439)*x_ref[1]**o + (-0.515121364994)*x_ref[1]
+        arg[(1, 2, 3)]=0.837295769411*x[0]**o + (-0.213581749832)*x[0] + (-0.11413994556)*x[1]**o + (-0.363192485476)*x[1]
+        ref[(1, 2, 3)]=0.837295769411*x_ref[0]**o + (-0.213581749832)*x_ref[0] + (-0.11413994556)*x_ref[1]**o + (-0.363192485476)*x_ref[1]
+        arg[(1, 3, 0)]=-0.906099000992*x[0]**o + (0.41582510293)*x[0] + (-0.425036402803)*x[1]**o + (0.529038756743)*x[1]
+        ref[(1, 3, 0)]=-0.906099000992*x_ref[0]**o + (0.41582510293)*x_ref[0] + (-0.425036402803)*x_ref[1]**o + (0.529038756743)*x_ref[1]
+        arg[(1, 3, 1)]=0.00347917700468*x[0]**o + (-0.314157293828)*x[0] + (0.129417838544)*x[1]**o + (0.244391214969)*x[1]
+        ref[(1, 3, 1)]=0.00347917700468*x_ref[0]**o + (-0.314157293828)*x_ref[0] + (0.129417838544)*x_ref[1]**o + (0.244391214969)*x_ref[1]
+        arg[(1, 3, 2)]=-0.125131619115*x[0]**o + (-0.311814852346)*x[0] + (-0.600769388959)*x[1]**o + (0.17121978936)*x[1]
+        ref[(1, 3, 2)]=-0.125131619115*x_ref[0]**o + (-0.311814852346)*x_ref[0] + (-0.600769388959)*x_ref[1]**o + (0.17121978936)*x_ref[1]
+        arg[(1, 3, 3)]=-0.0197582913631*x[0]**o + (-0.881378342237)*x[0] + (0.023766547644)*x[1]**o + (-0.621087288446)*x[1]
+        ref[(1, 3, 3)]=-0.0197582913631*x_ref[0]**o + (-0.881378342237)*x_ref[0] + (0.023766547644)*x_ref[1]**o + (-0.621087288446)*x_ref[1]
+        arg[(2, 0, 0)]=0.93135408621*x[0]**o + (-0.721370175081)*x[0] + (0.01956545011)*x[1]**o + (0.425277511016)*x[1]
+        ref[(2, 0, 0)]=0.93135408621*x_ref[0]**o + (-0.721370175081)*x_ref[0] + (0.01956545011)*x_ref[1]**o + (0.425277511016)*x_ref[1]
+        arg[(2, 0, 1)]=0.108834511245*x[0]**o + (-0.365516563453)*x[0] + (-0.315695516603)*x[1]**o + (0.979820735783)*x[1]
+        ref[(2, 0, 1)]=0.108834511245*x_ref[0]**o + (-0.365516563453)*x_ref[0] + (-0.315695516603)*x_ref[1]**o + (0.979820735783)*x_ref[1]
+        arg[(2, 0, 2)]=0.9126811747*x[0]**o + (-0.917502401059)*x[0] + (-0.552935415728)*x[1]**o + (0.287515187426)*x[1]
+        ref[(2, 0, 2)]=0.9126811747*x_ref[0]**o + (-0.917502401059)*x_ref[0] + (-0.552935415728)*x_ref[1]**o + (0.287515187426)*x_ref[1]
+        arg[(2, 0, 3)]=0.443144333077*x[0]**o + (0.627597368223)*x[0] + (0.628614677249)*x[1]**o + (0.664766286013)*x[1]
+        ref[(2, 0, 3)]=0.443144333077*x_ref[0]**o + (0.627597368223)*x_ref[0] + (0.628614677249)*x_ref[1]**o + (0.664766286013)*x_ref[1]
+        arg[(2, 1, 0)]=-0.827459387556*x[0]**o + (0.410784767334)*x[0] + (-0.297692873979)*x[1]**o + (-0.339480313006)*x[1]
+        ref[(2, 1, 0)]=-0.827459387556*x_ref[0]**o + (0.410784767334)*x_ref[0] + (-0.297692873979)*x_ref[1]**o + (-0.339480313006)*x_ref[1]
+        arg[(2, 1, 1)]=0.662912696511*x[0]**o + (-0.148596165496)*x[0] + (-0.40475377168)*x[1]**o + (0.776216895877)*x[1]
+        ref[(2, 1, 1)]=0.662912696511*x_ref[0]**o + (-0.148596165496)*x_ref[0] + (-0.40475377168)*x_ref[1]**o + (0.776216895877)*x_ref[1]
+        arg[(2, 1, 2)]=-0.92501412108*x[0]**o + (0.203743600584)*x[0] + (0.937087888137)*x[1]**o + (-0.981996122331)*x[1]
+        ref[(2, 1, 2)]=-0.92501412108*x_ref[0]**o + (0.203743600584)*x_ref[0] + (0.937087888137)*x_ref[1]**o + (-0.981996122331)*x_ref[1]
+        arg[(2, 1, 3)]=-0.49903799192*x[0]**o + (-0.142041300345)*x[0] + (-0.271888451317)*x[1]**o + (-0.580793614069)*x[1]
+        ref[(2, 1, 3)]=-0.49903799192*x_ref[0]**o + (-0.142041300345)*x_ref[0] + (-0.271888451317)*x_ref[1]**o + (-0.580793614069)*x_ref[1]
+        arg[(2, 2, 0)]=0.858335877724*x[0]**o + (-0.398230613192)*x[0] + (-0.248382603402)*x[1]**o + (0.972257311852)*x[1]
+        ref[(2, 2, 0)]=0.858335877724*x_ref[0]**o + (-0.398230613192)*x_ref[0] + (-0.248382603402)*x_ref[1]**o + (0.972257311852)*x_ref[1]
+        arg[(2, 2, 1)]=-0.102823477071*x[0]**o + (0.408476591692)*x[0] + (-0.24921580902)*x[1]**o + (0.961942892319)*x[1]
+        ref[(2, 2, 1)]=-0.102823477071*x_ref[0]**o + (0.408476591692)*x_ref[0] + (-0.24921580902)*x_ref[1]**o + (0.961942892319)*x_ref[1]
+        arg[(2, 2, 2)]=0.885742602255*x[0]**o + (0.469922404829)*x[0] + (0.580916965995)*x[1]**o + (-0.455905186185)*x[1]
+        ref[(2, 2, 2)]=0.885742602255*x_ref[0]**o + (0.469922404829)*x_ref[0] + (0.580916965995)*x_ref[1]**o + (-0.455905186185)*x_ref[1]
+        arg[(2, 2, 3)]=-0.259006602096*x[0]**o + (0.456437694575)*x[0] + (-0.908783718613)*x[1]**o + (-0.790710700238)*x[1]
+        ref[(2, 2, 3)]=-0.259006602096*x_ref[0]**o + (0.456437694575)*x_ref[0] + (-0.908783718613)*x_ref[1]**o + (-0.790710700238)*x_ref[1]
+        arg[(2, 3, 0)]=0.155253535192*x[0]**o + (0.928713318084)*x[0] + (-0.318742947558)*x[1]**o + (-0.983198879148)*x[1]
+        ref[(2, 3, 0)]=0.155253535192*x_ref[0]**o + (0.928713318084)*x_ref[0] + (-0.318742947558)*x_ref[1]**o + (-0.983198879148)*x_ref[1]
+        arg[(2, 3, 1)]=-0.345455538339*x[0]**o + (-0.913596930492)*x[0] + (-0.227033450061)*x[1]**o + (0.392635150938)*x[1]
+        ref[(2, 3, 1)]=-0.345455538339*x_ref[0]**o + (-0.913596930492)*x_ref[0] + (-0.227033450061)*x_ref[1]**o + (0.392635150938)*x_ref[1]
+        arg[(2, 3, 2)]=0.893024636108*x[0]**o + (-0.768573505968)*x[0] + (0.558178657044)*x[1]**o + (-0.925356312821)*x[1]
+        ref[(2, 3, 2)]=0.893024636108*x_ref[0]**o + (-0.768573505968)*x_ref[0] + (0.558178657044)*x_ref[1]**o + (-0.925356312821)*x_ref[1]
+        arg[(2, 3, 3)]=-0.95908413944*x[0]**o + (-0.637131000077)*x[0] + (0.715706311047)*x[1]**o + (-0.176858078844)*x[1]
+        ref[(2, 3, 3)]=-0.95908413944*x_ref[0]**o + (-0.637131000077)*x_ref[0] + (0.715706311047)*x_ref[1]**o + (-0.176858078844)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.641737550786*x[2]**o + (0.488921310853)*x[2]
+            ref[(0, 0, 0)]+=-0.641737550786*x_ref[2]**o + (0.488921310853)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.313438520382*x[2]**o + (0.992025227604)*x[2]
+            ref[(0, 0, 1)]+=-0.313438520382*x_ref[2]**o + (0.992025227604)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.343442659173*x[2]**o + (-0.525276594533)*x[2]
+            ref[(0, 0, 2)]+=-0.343442659173*x_ref[2]**o + (-0.525276594533)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.113018534019*x[2]**o + (0.171794836477)*x[2]
+            ref[(0, 0, 3)]+=-0.113018534019*x_ref[2]**o + (0.171794836477)*x_ref[2]
+            arg[(0, 1, 0)]+=-0.22640701526*x[2]**o + (0.352517742612)*x[2]
+            ref[(0, 1, 0)]+=-0.22640701526*x_ref[2]**o + (0.352517742612)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.425788096856*x[2]**o + (-0.160012725402)*x[2]
+            ref[(0, 1, 1)]+=-0.425788096856*x_ref[2]**o + (-0.160012725402)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.840765498295*x[2]**o + (0.290493117521)*x[2]
+            ref[(0, 1, 2)]+=-0.840765498295*x_ref[2]**o + (0.290493117521)*x_ref[2]
+            arg[(0, 1, 3)]+=0.795845255066*x[2]**o + (0.837374489095)*x[2]
+            ref[(0, 1, 3)]+=0.795845255066*x_ref[2]**o + (0.837374489095)*x_ref[2]
+            arg[(0, 2, 0)]+=0.385029443664*x[2]**o + (-0.981274983694)*x[2]
+            ref[(0, 2, 0)]+=0.385029443664*x_ref[2]**o + (-0.981274983694)*x_ref[2]
+            arg[(0, 2, 1)]+=-0.827622737993*x[2]**o + (-0.435200623119)*x[2]
+            ref[(0, 2, 1)]+=-0.827622737993*x_ref[2]**o + (-0.435200623119)*x_ref[2]
+            arg[(0, 2, 2)]+=0.821415949654*x[2]**o + (0.486140218821)*x[2]
+            ref[(0, 2, 2)]+=0.821415949654*x_ref[2]**o + (0.486140218821)*x_ref[2]
+            arg[(0, 2, 3)]+=0.0228021993967*x[2]**o + (-0.985197419643)*x[2]
+            ref[(0, 2, 3)]+=0.0228021993967*x_ref[2]**o + (-0.985197419643)*x_ref[2]
+            arg[(0, 3, 0)]+=0.977208318252*x[2]**o + (0.25987766936)*x[2]
+            ref[(0, 3, 0)]+=0.977208318252*x_ref[2]**o + (0.25987766936)*x_ref[2]
+            arg[(0, 3, 1)]+=-0.586070763742*x[2]**o + (0.997943272045)*x[2]
+            ref[(0, 3, 1)]+=-0.586070763742*x_ref[2]**o + (0.997943272045)*x_ref[2]
+            arg[(0, 3, 2)]+=0.940829114411*x[2]**o + (0.754466068802)*x[2]
+            ref[(0, 3, 2)]+=0.940829114411*x_ref[2]**o + (0.754466068802)*x_ref[2]
+            arg[(0, 3, 3)]+=0.996023425819*x[2]**o + (0.0633389183816)*x[2]
+            ref[(0, 3, 3)]+=0.996023425819*x_ref[2]**o + (0.0633389183816)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.0598560111808*x[2]**o + (-0.873707173319)*x[2]
+            ref[(1, 0, 0)]+=-0.0598560111808*x_ref[2]**o + (-0.873707173319)*x_ref[2]
+            arg[(1, 0, 1)]+=0.646664138739*x[2]**o + (-0.33505905431)*x[2]
+            ref[(1, 0, 1)]+=0.646664138739*x_ref[2]**o + (-0.33505905431)*x_ref[2]
+            arg[(1, 0, 2)]+=0.172988422104*x[2]**o + (0.0472355421456)*x[2]
+            ref[(1, 0, 2)]+=0.172988422104*x_ref[2]**o + (0.0472355421456)*x_ref[2]
+            arg[(1, 0, 3)]+=0.623618752449*x[2]**o + (-0.488116843092)*x[2]
+            ref[(1, 0, 3)]+=0.623618752449*x_ref[2]**o + (-0.488116843092)*x_ref[2]
+            arg[(1, 1, 0)]+=0.738914719146*x[2]**o + (0.0660301102493)*x[2]
+            ref[(1, 1, 0)]+=0.738914719146*x_ref[2]**o + (0.0660301102493)*x_ref[2]
+            arg[(1, 1, 1)]+=0.0427284334646*x[2]**o + (0.148848821917)*x[2]
+            ref[(1, 1, 1)]+=0.0427284334646*x_ref[2]**o + (0.148848821917)*x_ref[2]
+            arg[(1, 1, 2)]+=-0.444278377596*x[2]**o + (0.792447913641)*x[2]
+            ref[(1, 1, 2)]+=-0.444278377596*x_ref[2]**o + (0.792447913641)*x_ref[2]
+            arg[(1, 1, 3)]+=0.516756745303*x[2]**o + (0.542200026586)*x[2]
+            ref[(1, 1, 3)]+=0.516756745303*x_ref[2]**o + (0.542200026586)*x_ref[2]
+            arg[(1, 2, 0)]+=-0.787007309567*x[2]**o + (-0.376807551177)*x[2]
+            ref[(1, 2, 0)]+=-0.787007309567*x_ref[2]**o + (-0.376807551177)*x_ref[2]
+            arg[(1, 2, 1)]+=0.67399872443*x[2]**o + (-0.0375013399141)*x[2]
+            ref[(1, 2, 1)]+=0.67399872443*x_ref[2]**o + (-0.0375013399141)*x_ref[2]
+            arg[(1, 2, 2)]+=-0.930447543613*x[2]**o + (0.415052681284)*x[2]
+            ref[(1, 2, 2)]+=-0.930447543613*x_ref[2]**o + (0.415052681284)*x_ref[2]
+            arg[(1, 2, 3)]+=-0.646742078477*x[2]**o + (-0.170131719615)*x[2]
+            ref[(1, 2, 3)]+=-0.646742078477*x_ref[2]**o + (-0.170131719615)*x_ref[2]
+            arg[(1, 3, 0)]+=0.307346310596*x[2]**o + (-0.636098236631)*x[2]
+            ref[(1, 3, 0)]+=0.307346310596*x_ref[2]**o + (-0.636098236631)*x_ref[2]
+            arg[(1, 3, 1)]+=0.903620459421*x[2]**o + (-0.481828100297)*x[2]
+            ref[(1, 3, 1)]+=0.903620459421*x_ref[2]**o + (-0.481828100297)*x_ref[2]
+            arg[(1, 3, 2)]+=-0.0370973454381*x[2]**o + (-0.202706143136)*x[2]
+            ref[(1, 3, 2)]+=-0.0370973454381*x_ref[2]**o + (-0.202706143136)*x_ref[2]
+            arg[(1, 3, 3)]+=-0.93743935246*x[2]**o + (0.602039425808)*x[2]
+            ref[(1, 3, 3)]+=-0.93743935246*x_ref[2]**o + (0.602039425808)*x_ref[2]
+            arg[(2, 0, 0)]+=0.410084596045*x[2]**o + (0.533510212928)*x[2]
+            ref[(2, 0, 0)]+=0.410084596045*x_ref[2]**o + (0.533510212928)*x_ref[2]
+            arg[(2, 0, 1)]+=0.70079709576*x[2]**o + (-0.865145599736)*x[2]
+            ref[(2, 0, 1)]+=0.70079709576*x_ref[2]**o + (-0.865145599736)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.702699052799*x[2]**o + (-0.0952291841322)*x[2]
+            ref[(2, 0, 2)]+=-0.702699052799*x_ref[2]**o + (-0.0952291841322)*x_ref[2]
+            arg[(2, 0, 3)]+=-0.550049938786*x[2]**o + (0.188576021667)*x[2]
+            ref[(2, 0, 3)]+=-0.550049938786*x_ref[2]**o + (0.188576021667)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.34848587612*x[2]**o + (-0.687492925703)*x[2]
+            ref[(2, 1, 0)]+=-0.34848587612*x_ref[2]**o + (-0.687492925703)*x_ref[2]
+            arg[(2, 1, 1)]+=0.995477360989*x[2]**o + (0.629196828391)*x[2]
+            ref[(2, 1, 1)]+=0.995477360989*x_ref[2]**o + (0.629196828391)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.586029899217*x[2]**o + (-0.711500395735)*x[2]
+            ref[(2, 1, 2)]+=-0.586029899217*x_ref[2]**o + (-0.711500395735)*x_ref[2]
+            arg[(2, 1, 3)]+=0.7234398573*x[2]**o + (0.938004152955)*x[2]
+            ref[(2, 1, 3)]+=0.7234398573*x_ref[2]**o + (0.938004152955)*x_ref[2]
+            arg[(2, 2, 0)]+=0.561441549952*x[2]**o + (-0.701126861928)*x[2]
+            ref[(2, 2, 0)]+=0.561441549952*x_ref[2]**o + (-0.701126861928)*x_ref[2]
+            arg[(2, 2, 1)]+=-0.477794545452*x[2]**o + (-0.162614155046)*x[2]
+            ref[(2, 2, 1)]+=-0.477794545452*x_ref[2]**o + (-0.162614155046)*x_ref[2]
+            arg[(2, 2, 2)]+=-0.546791653638*x[2]**o + (0.327148612672)*x[2]
+            ref[(2, 2, 2)]+=-0.546791653638*x_ref[2]**o + (0.327148612672)*x_ref[2]
+            arg[(2, 2, 3)]+=-0.18788219457*x[2]**o + (-0.650366512223)*x[2]
+            ref[(2, 2, 3)]+=-0.18788219457*x_ref[2]**o + (-0.650366512223)*x_ref[2]
+            arg[(2, 3, 0)]+=-0.0984165720518*x[2]**o + (0.0886346297964)*x[2]
+            ref[(2, 3, 0)]+=-0.0984165720518*x_ref[2]**o + (0.0886346297964)*x_ref[2]
+            arg[(2, 3, 1)]+=0.280295596485*x[2]**o + (0.526499903833)*x[2]
+            ref[(2, 3, 1)]+=0.280295596485*x_ref[2]**o + (0.526499903833)*x_ref[2]
+            arg[(2, 3, 2)]+=-0.43122605267*x[2]**o + (-0.694160766478)*x[2]
+            ref[(2, 3, 2)]+=-0.43122605267*x_ref[2]**o + (-0.694160766478)*x_ref[2]
+            arg[(2, 3, 3)]+=-0.996711072296*x[2]**o + (-0.0482308289872)*x[2]
+            ref[(2, 3, 3)]+=-0.996711072296*x_ref[2]**o + (-0.0482308289872)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(3, 3, 2, 3),w)
+        ref = Data(0,(3, 3, 2, 3),w_ref)
+        arg[(0, 0, 0, 0)]=-0.0318805155471*x[0]**o + (-0.499117251548)*x[0] + (0.52744053906)*x[1]**o + (-0.655722915931)*x[1]
+        ref[(0, 0, 0, 0)]=-0.0318805155471*x_ref[0]**o + (-0.499117251548)*x_ref[0] + (0.52744053906)*x_ref[1]**o + (-0.655722915931)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.0955586709496*x[0]**o + (-0.705866705723)*x[0] + (-0.582480579066)*x[1]**o + (0.00401025061252)*x[1]
+        ref[(0, 0, 0, 1)]=0.0955586709496*x_ref[0]**o + (-0.705866705723)*x_ref[0] + (-0.582480579066)*x_ref[1]**o + (0.00401025061252)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.143802099233*x[0]**o + (0.0898767973948)*x[0] + (0.506045706907)*x[1]**o + (0.894718637325)*x[1]
+        ref[(0, 0, 0, 2)]=0.143802099233*x_ref[0]**o + (0.0898767973948)*x_ref[0] + (0.506045706907)*x_ref[1]**o + (0.894718637325)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.25292705724*x[0]**o + (0.913963723905)*x[0] + (0.86909938799)*x[1]**o + (0.712924504042)*x[1]
+        ref[(0, 0, 1, 0)]=-0.25292705724*x_ref[0]**o + (0.913963723905)*x_ref[0] + (0.86909938799)*x_ref[1]**o + (0.712924504042)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.755947918543*x[0]**o + (0.975947691947)*x[0] + (-0.252591843604)*x[1]**o + (-0.483972020163)*x[1]
+        ref[(0, 0, 1, 1)]=0.755947918543*x_ref[0]**o + (0.975947691947)*x_ref[0] + (-0.252591843604)*x_ref[1]**o + (-0.483972020163)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.720955255508*x[0]**o + (0.606414870531)*x[0] + (0.931270679119)*x[1]**o + (-0.191355071086)*x[1]
+        ref[(0, 0, 1, 2)]=0.720955255508*x_ref[0]**o + (0.606414870531)*x_ref[0] + (0.931270679119)*x_ref[1]**o + (-0.191355071086)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.053453524942*x[0]**o + (-0.940669528576)*x[0] + (0.598287281985)*x[1]**o + (-0.381533344029)*x[1]
+        ref[(0, 1, 0, 0)]=-0.053453524942*x_ref[0]**o + (-0.940669528576)*x_ref[0] + (0.598287281985)*x_ref[1]**o + (-0.381533344029)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.424231655891*x[0]**o + (0.214047443035)*x[0] + (0.732075993216)*x[1]**o + (0.677835609584)*x[1]
+        ref[(0, 1, 0, 1)]=0.424231655891*x_ref[0]**o + (0.214047443035)*x_ref[0] + (0.732075993216)*x_ref[1]**o + (0.677835609584)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.532231289805*x[0]**o + (-0.40376824886)*x[0] + (0.790175443801)*x[1]**o + (-0.740135794091)*x[1]
+        ref[(0, 1, 0, 2)]=-0.532231289805*x_ref[0]**o + (-0.40376824886)*x_ref[0] + (0.790175443801)*x_ref[1]**o + (-0.740135794091)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.366704788183*x[0]**o + (-0.685669422037)*x[0] + (0.821557888479)*x[1]**o + (0.768287421783)*x[1]
+        ref[(0, 1, 1, 0)]=-0.366704788183*x_ref[0]**o + (-0.685669422037)*x_ref[0] + (0.821557888479)*x_ref[1]**o + (0.768287421783)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.0861949030096*x[0]**o + (-0.084935255057)*x[0] + (0.53169126584)*x[1]**o + (0.634560974033)*x[1]
+        ref[(0, 1, 1, 1)]=-0.0861949030096*x_ref[0]**o + (-0.084935255057)*x_ref[0] + (0.53169126584)*x_ref[1]**o + (0.634560974033)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.922481901683*x[0]**o + (0.743555704223)*x[0] + (0.15519828037)*x[1]**o + (-0.395145067931)*x[1]
+        ref[(0, 1, 1, 2)]=0.922481901683*x_ref[0]**o + (0.743555704223)*x_ref[0] + (0.15519828037)*x_ref[1]**o + (-0.395145067931)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.591928215634*x[0]**o + (-0.332567632996)*x[0] + (0.815305378507)*x[1]**o + (-0.199511126356)*x[1]
+        ref[(0, 2, 0, 0)]=-0.591928215634*x_ref[0]**o + (-0.332567632996)*x_ref[0] + (0.815305378507)*x_ref[1]**o + (-0.199511126356)*x_ref[1]
+        arg[(0, 2, 0, 1)]=0.235616389343*x[0]**o + (-0.104296925852)*x[0] + (0.355857973118)*x[1]**o + (-0.218805945961)*x[1]
+        ref[(0, 2, 0, 1)]=0.235616389343*x_ref[0]**o + (-0.104296925852)*x_ref[0] + (0.355857973118)*x_ref[1]**o + (-0.218805945961)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.129277696712*x[0]**o + (-0.763771384229)*x[0] + (-0.871289791062)*x[1]**o + (-0.995802119438)*x[1]
+        ref[(0, 2, 0, 2)]=0.129277696712*x_ref[0]**o + (-0.763771384229)*x_ref[0] + (-0.871289791062)*x_ref[1]**o + (-0.995802119438)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.895894253646*x[0]**o + (-0.326714500019)*x[0] + (-0.00167957640935)*x[1]**o + (-0.071466011922)*x[1]
+        ref[(0, 2, 1, 0)]=0.895894253646*x_ref[0]**o + (-0.326714500019)*x_ref[0] + (-0.00167957640935)*x_ref[1]**o + (-0.071466011922)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.768024586914*x[0]**o + (0.621013631804)*x[0] + (-0.165824054634)*x[1]**o + (-0.956374511329)*x[1]
+        ref[(0, 2, 1, 1)]=-0.768024586914*x_ref[0]**o + (0.621013631804)*x_ref[0] + (-0.165824054634)*x_ref[1]**o + (-0.956374511329)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.822424726206*x[0]**o + (0.715520452224)*x[0] + (-0.594124319513)*x[1]**o + (0.465192715915)*x[1]
+        ref[(0, 2, 1, 2)]=0.822424726206*x_ref[0]**o + (0.715520452224)*x_ref[0] + (-0.594124319513)*x_ref[1]**o + (0.465192715915)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.208425068869*x[0]**o + (-0.572559490236)*x[0] + (-0.0283823835203)*x[1]**o + (0.233233011312)*x[1]
+        ref[(1, 0, 0, 0)]=0.208425068869*x_ref[0]**o + (-0.572559490236)*x_ref[0] + (-0.0283823835203)*x_ref[1]**o + (0.233233011312)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.109230080532*x[0]**o + (0.43758148193)*x[0] + (0.779060214446)*x[1]**o + (0.617295227987)*x[1]
+        ref[(1, 0, 0, 1)]=-0.109230080532*x_ref[0]**o + (0.43758148193)*x_ref[0] + (0.779060214446)*x_ref[1]**o + (0.617295227987)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.153821452877*x[0]**o + (0.0464539594873)*x[0] + (-0.840490540438)*x[1]**o + (-0.548571893046)*x[1]
+        ref[(1, 0, 0, 2)]=-0.153821452877*x_ref[0]**o + (0.0464539594873)*x_ref[0] + (-0.840490540438)*x_ref[1]**o + (-0.548571893046)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.309249671169*x[0]**o + (-0.989200844932)*x[0] + (0.989889268701)*x[1]**o + (-0.439091609102)*x[1]
+        ref[(1, 0, 1, 0)]=-0.309249671169*x_ref[0]**o + (-0.989200844932)*x_ref[0] + (0.989889268701)*x_ref[1]**o + (-0.439091609102)*x_ref[1]
+        arg[(1, 0, 1, 1)]=-0.430647739803*x[0]**o + (-0.210406385946)*x[0] + (-0.179466121717)*x[1]**o + (0.482873334381)*x[1]
+        ref[(1, 0, 1, 1)]=-0.430647739803*x_ref[0]**o + (-0.210406385946)*x_ref[0] + (-0.179466121717)*x_ref[1]**o + (0.482873334381)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.105759089131*x[0]**o + (-0.361794405074)*x[0] + (-0.58590664762)*x[1]**o + (0.94042121812)*x[1]
+        ref[(1, 0, 1, 2)]=-0.105759089131*x_ref[0]**o + (-0.361794405074)*x_ref[0] + (-0.58590664762)*x_ref[1]**o + (0.94042121812)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.308141275714*x[0]**o + (0.392537010874)*x[0] + (0.202191903867)*x[1]**o + (-0.906572245076)*x[1]
+        ref[(1, 1, 0, 0)]=-0.308141275714*x_ref[0]**o + (0.392537010874)*x_ref[0] + (0.202191903867)*x_ref[1]**o + (-0.906572245076)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.769640153468*x[0]**o + (-0.627874616006)*x[0] + (-0.97303517254)*x[1]**o + (0.431899302942)*x[1]
+        ref[(1, 1, 0, 1)]=0.769640153468*x_ref[0]**o + (-0.627874616006)*x_ref[0] + (-0.97303517254)*x_ref[1]**o + (0.431899302942)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.516006280542*x[0]**o + (-0.97461149988)*x[0] + (0.836603951147)*x[1]**o + (-0.977025870239)*x[1]
+        ref[(1, 1, 0, 2)]=-0.516006280542*x_ref[0]**o + (-0.97461149988)*x_ref[0] + (0.836603951147)*x_ref[1]**o + (-0.977025870239)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.396083102925*x[0]**o + (-0.329431182691)*x[0] + (-0.795717120229)*x[1]**o + (-0.23192515908)*x[1]
+        ref[(1, 1, 1, 0)]=-0.396083102925*x_ref[0]**o + (-0.329431182691)*x_ref[0] + (-0.795717120229)*x_ref[1]**o + (-0.23192515908)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.697590869873*x[0]**o + (0.983747297359)*x[0] + (-0.741915535783)*x[1]**o + (0.082304774991)*x[1]
+        ref[(1, 1, 1, 1)]=-0.697590869873*x_ref[0]**o + (0.983747297359)*x_ref[0] + (-0.741915535783)*x_ref[1]**o + (0.082304774991)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.372901803287*x[0]**o + (0.284757800537)*x[0] + (0.369306275381)*x[1]**o + (0.585102277081)*x[1]
+        ref[(1, 1, 1, 2)]=0.372901803287*x_ref[0]**o + (0.284757800537)*x_ref[0] + (0.369306275381)*x_ref[1]**o + (0.585102277081)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.626966462879*x[0]**o + (-0.448791309197)*x[0] + (-0.00409750416145)*x[1]**o + (0.0118885813816)*x[1]
+        ref[(1, 2, 0, 0)]=-0.626966462879*x_ref[0]**o + (-0.448791309197)*x_ref[0] + (-0.00409750416145)*x_ref[1]**o + (0.0118885813816)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.0501459800815*x[0]**o + (-0.0779566508231)*x[0] + (-0.14238507657)*x[1]**o + (-0.0841556236338)*x[1]
+        ref[(1, 2, 0, 1)]=-0.0501459800815*x_ref[0]**o + (-0.0779566508231)*x_ref[0] + (-0.14238507657)*x_ref[1]**o + (-0.0841556236338)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.827541555146*x[0]**o + (-0.551709305656)*x[0] + (0.557289066617)*x[1]**o + (0.294223566218)*x[1]
+        ref[(1, 2, 0, 2)]=-0.827541555146*x_ref[0]**o + (-0.551709305656)*x_ref[0] + (0.557289066617)*x_ref[1]**o + (0.294223566218)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.837654386978*x[0]**o + (0.0519307877283)*x[0] + (-0.906861582192)*x[1]**o + (-0.0776988115479)*x[1]
+        ref[(1, 2, 1, 0)]=-0.837654386978*x_ref[0]**o + (0.0519307877283)*x_ref[0] + (-0.906861582192)*x_ref[1]**o + (-0.0776988115479)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.499684037198*x[0]**o + (0.145701108717)*x[0] + (0.203351812671)*x[1]**o + (0.0553439385473)*x[1]
+        ref[(1, 2, 1, 1)]=-0.499684037198*x_ref[0]**o + (0.145701108717)*x_ref[0] + (0.203351812671)*x_ref[1]**o + (0.0553439385473)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.754120535068*x[0]**o + (-0.888626448076)*x[0] + (0.093770199704)*x[1]**o + (-0.296846333094)*x[1]
+        ref[(1, 2, 1, 2)]=0.754120535068*x_ref[0]**o + (-0.888626448076)*x_ref[0] + (0.093770199704)*x_ref[1]**o + (-0.296846333094)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.168485058082*x[0]**o + (-0.589338946557)*x[0] + (0.743645371713)*x[1]**o + (0.800112364623)*x[1]
+        ref[(2, 0, 0, 0)]=-0.168485058082*x_ref[0]**o + (-0.589338946557)*x_ref[0] + (0.743645371713)*x_ref[1]**o + (0.800112364623)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.350583686443*x[0]**o + (-0.0596627545853)*x[0] + (-0.212422277216)*x[1]**o + (-0.778893549895)*x[1]
+        ref[(2, 0, 0, 1)]=0.350583686443*x_ref[0]**o + (-0.0596627545853)*x_ref[0] + (-0.212422277216)*x_ref[1]**o + (-0.778893549895)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.972275339834*x[0]**o + (-0.968811515235)*x[0] + (-0.999220254428)*x[1]**o + (-0.105573417605)*x[1]
+        ref[(2, 0, 0, 2)]=-0.972275339834*x_ref[0]**o + (-0.968811515235)*x_ref[0] + (-0.999220254428)*x_ref[1]**o + (-0.105573417605)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.928395808785*x[0]**o + (-0.46408619409)*x[0] + (0.521633247047)*x[1]**o + (0.0684758782818)*x[1]
+        ref[(2, 0, 1, 0)]=-0.928395808785*x_ref[0]**o + (-0.46408619409)*x_ref[0] + (0.521633247047)*x_ref[1]**o + (0.0684758782818)*x_ref[1]
+        arg[(2, 0, 1, 1)]=-0.292595109916*x[0]**o + (-0.867387021047)*x[0] + (0.0487229430919)*x[1]**o + (0.3966051461)*x[1]
+        ref[(2, 0, 1, 1)]=-0.292595109916*x_ref[0]**o + (-0.867387021047)*x_ref[0] + (0.0487229430919)*x_ref[1]**o + (0.3966051461)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.0382603428233*x[0]**o + (0.191632654345)*x[0] + (0.159602302136)*x[1]**o + (-0.385567162519)*x[1]
+        ref[(2, 0, 1, 2)]=-0.0382603428233*x_ref[0]**o + (0.191632654345)*x_ref[0] + (0.159602302136)*x_ref[1]**o + (-0.385567162519)*x_ref[1]
+        arg[(2, 1, 0, 0)]=-0.388101172886*x[0]**o + (-0.0505857247134)*x[0] + (-0.254169314678)*x[1]**o + (0.701591331991)*x[1]
+        ref[(2, 1, 0, 0)]=-0.388101172886*x_ref[0]**o + (-0.0505857247134)*x_ref[0] + (-0.254169314678)*x_ref[1]**o + (0.701591331991)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.564656528002*x[0]**o + (0.511488326832)*x[0] + (-0.00409930013108)*x[1]**o + (0.512057883855)*x[1]
+        ref[(2, 1, 0, 1)]=0.564656528002*x_ref[0]**o + (0.511488326832)*x_ref[0] + (-0.00409930013108)*x_ref[1]**o + (0.512057883855)*x_ref[1]
+        arg[(2, 1, 0, 2)]=0.460459189321*x[0]**o + (-0.473920002616)*x[0] + (0.32691080905)*x[1]**o + (0.624067454588)*x[1]
+        ref[(2, 1, 0, 2)]=0.460459189321*x_ref[0]**o + (-0.473920002616)*x_ref[0] + (0.32691080905)*x_ref[1]**o + (0.624067454588)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.60918690939*x[0]**o + (0.126093388157)*x[0] + (0.350799384253)*x[1]**o + (-0.529916621451)*x[1]
+        ref[(2, 1, 1, 0)]=0.60918690939*x_ref[0]**o + (0.126093388157)*x_ref[0] + (0.350799384253)*x_ref[1]**o + (-0.529916621451)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.326383225773*x[0]**o + (-0.660448872494)*x[0] + (-0.450207852103)*x[1]**o + (-0.0197577475673)*x[1]
+        ref[(2, 1, 1, 1)]=-0.326383225773*x_ref[0]**o + (-0.660448872494)*x_ref[0] + (-0.450207852103)*x_ref[1]**o + (-0.0197577475673)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.0998819630354*x[0]**o + (-0.236962518438)*x[0] + (0.920762152422)*x[1]**o + (0.328376042136)*x[1]
+        ref[(2, 1, 1, 2)]=-0.0998819630354*x_ref[0]**o + (-0.236962518438)*x_ref[0] + (0.920762152422)*x_ref[1]**o + (0.328376042136)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.723845079659*x[0]**o + (0.722571405085)*x[0] + (-0.75050240127)*x[1]**o + (-0.848546975514)*x[1]
+        ref[(2, 2, 0, 0)]=0.723845079659*x_ref[0]**o + (0.722571405085)*x_ref[0] + (-0.75050240127)*x_ref[1]**o + (-0.848546975514)*x_ref[1]
+        arg[(2, 2, 0, 1)]=-0.411348468159*x[0]**o + (-0.863182282027)*x[0] + (-0.553334677117)*x[1]**o + (0.0231552575184)*x[1]
+        ref[(2, 2, 0, 1)]=-0.411348468159*x_ref[0]**o + (-0.863182282027)*x_ref[0] + (-0.553334677117)*x_ref[1]**o + (0.0231552575184)*x_ref[1]
+        arg[(2, 2, 0, 2)]=-0.577471093799*x[0]**o + (0.135525116149)*x[0] + (0.0560037592199)*x[1]**o + (0.951150002002)*x[1]
+        ref[(2, 2, 0, 2)]=-0.577471093799*x_ref[0]**o + (0.135525116149)*x_ref[0] + (0.0560037592199)*x_ref[1]**o + (0.951150002002)*x_ref[1]
+        arg[(2, 2, 1, 0)]=0.573566772151*x[0]**o + (-0.139456195028)*x[0] + (0.566118576707)*x[1]**o + (0.0886998408493)*x[1]
+        ref[(2, 2, 1, 0)]=0.573566772151*x_ref[0]**o + (-0.139456195028)*x_ref[0] + (0.566118576707)*x_ref[1]**o + (0.0886998408493)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.281480373139*x[0]**o + (0.880329657775)*x[0] + (-0.865490325487)*x[1]**o + (0.191326628407)*x[1]
+        ref[(2, 2, 1, 1)]=0.281480373139*x_ref[0]**o + (0.880329657775)*x_ref[0] + (-0.865490325487)*x_ref[1]**o + (0.191326628407)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.370111598244*x[0]**o + (0.766799230949)*x[0] + (0.0851296345886)*x[1]**o + (-0.791029147236)*x[1]
+        ref[(2, 2, 1, 2)]=-0.370111598244*x_ref[0]**o + (0.766799230949)*x_ref[0] + (0.0851296345886)*x_ref[1]**o + (-0.791029147236)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.391532626334*x[2]**o + (-0.545802519395)*x[2]
+            ref[(0, 0, 0, 0)]+=0.391532626334*x_ref[2]**o + (-0.545802519395)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.795715050406*x[2]**o + (0.819990913514)*x[2]
+            ref[(0, 0, 0, 1)]+=0.795715050406*x_ref[2]**o + (0.819990913514)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.0135009883172*x[2]**o + (-0.210965569148)*x[2]
+            ref[(0, 0, 0, 2)]+=0.0135009883172*x_ref[2]**o + (-0.210965569148)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.828008335847*x[2]**o + (0.792403493778)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.828008335847*x_ref[2]**o + (0.792403493778)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.197332395995*x[2]**o + (0.927333357986)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.197332395995*x_ref[2]**o + (0.927333357986)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.52342316773*x[2]**o + (0.0529625971697)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.52342316773*x_ref[2]**o + (0.0529625971697)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.215959870463*x[2]**o + (0.0426406764904)*x[2]
+            ref[(0, 1, 0, 0)]+=0.215959870463*x_ref[2]**o + (0.0426406764904)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.0103762421578*x[2]**o + (-0.850738486633)*x[2]
+            ref[(0, 1, 0, 1)]+=0.0103762421578*x_ref[2]**o + (-0.850738486633)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.820657196698*x[2]**o + (0.780143760525)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.820657196698*x_ref[2]**o + (0.780143760525)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.28362244379*x[2]**o + (0.157515326811)*x[2]
+            ref[(0, 1, 1, 0)]+=0.28362244379*x_ref[2]**o + (0.157515326811)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.195396543144*x[2]**o + (0.787285195317)*x[2]
+            ref[(0, 1, 1, 1)]+=0.195396543144*x_ref[2]**o + (0.787285195317)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.611069826874*x[2]**o + (0.477043939877)*x[2]
+            ref[(0, 1, 1, 2)]+=0.611069826874*x_ref[2]**o + (0.477043939877)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.47876902848*x[2]**o + (0.303429886913)*x[2]
+            ref[(0, 2, 0, 0)]+=0.47876902848*x_ref[2]**o + (0.303429886913)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.376153967814*x[2]**o + (0.290561274253)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.376153967814*x_ref[2]**o + (0.290561274253)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.113781733174*x[2]**o + (0.748033671233)*x[2]
+            ref[(0, 2, 0, 2)]+=0.113781733174*x_ref[2]**o + (0.748033671233)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.176848940061*x[2]**o + (-0.199774807592)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.176848940061*x_ref[2]**o + (-0.199774807592)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.743368393629*x[2]**o + (0.433181767915)*x[2]
+            ref[(0, 2, 1, 1)]+=0.743368393629*x_ref[2]**o + (0.433181767915)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=0.474154699738*x[2]**o + (-0.842972936181)*x[2]
+            ref[(0, 2, 1, 2)]+=0.474154699738*x_ref[2]**o + (-0.842972936181)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.10470247242*x[2]**o + (-0.488788114589)*x[2]
+            ref[(1, 0, 0, 0)]+=0.10470247242*x_ref[2]**o + (-0.488788114589)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.776757311478*x[2]**o + (0.816771569279)*x[2]
+            ref[(1, 0, 0, 1)]+=0.776757311478*x_ref[2]**o + (0.816771569279)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.689606187486*x[2]**o + (0.126960740771)*x[2]
+            ref[(1, 0, 0, 2)]+=0.689606187486*x_ref[2]**o + (0.126960740771)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=0.765609702289*x[2]**o + (-0.219699513998)*x[2]
+            ref[(1, 0, 1, 0)]+=0.765609702289*x_ref[2]**o + (-0.219699513998)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=0.697123957538*x[2]**o + (-0.549826622918)*x[2]
+            ref[(1, 0, 1, 1)]+=0.697123957538*x_ref[2]**o + (-0.549826622918)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.720942837298*x[2]**o + (0.564877658994)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.720942837298*x_ref[2]**o + (0.564877658994)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.417366344124*x[2]**o + (0.466065768224)*x[2]
+            ref[(1, 1, 0, 0)]+=0.417366344124*x_ref[2]**o + (0.466065768224)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.785539149198*x[2]**o + (-0.583777405748)*x[2]
+            ref[(1, 1, 0, 1)]+=0.785539149198*x_ref[2]**o + (-0.583777405748)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.567192955302*x[2]**o + (0.40289353494)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.567192955302*x_ref[2]**o + (0.40289353494)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.966787243234*x[2]**o + (0.529741603252)*x[2]
+            ref[(1, 1, 1, 0)]+=-0.966787243234*x_ref[2]**o + (0.529741603252)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.982627779838*x[2]**o + (-0.784312921239)*x[2]
+            ref[(1, 1, 1, 1)]+=0.982627779838*x_ref[2]**o + (-0.784312921239)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.310056991192*x[2]**o + (0.604072467005)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.310056991192*x_ref[2]**o + (0.604072467005)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.854672534929*x[2]**o + (0.298996804238)*x[2]
+            ref[(1, 2, 0, 0)]+=0.854672534929*x_ref[2]**o + (0.298996804238)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.478022221304*x[2]**o + (0.593233785644)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.478022221304*x_ref[2]**o + (0.593233785644)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.196548189449*x[2]**o + (-0.748427844295)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.196548189449*x_ref[2]**o + (-0.748427844295)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.624905338921*x[2]**o + (-0.378262616379)*x[2]
+            ref[(1, 2, 1, 0)]+=0.624905338921*x_ref[2]**o + (-0.378262616379)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.546155581748*x[2]**o + (0.732384602216)*x[2]
+            ref[(1, 2, 1, 1)]+=0.546155581748*x_ref[2]**o + (0.732384602216)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.857807538062*x[2]**o + (0.70064636592)*x[2]
+            ref[(1, 2, 1, 2)]+=0.857807538062*x_ref[2]**o + (0.70064636592)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.91875930288*x[2]**o + (-0.661218444319)*x[2]
+            ref[(2, 0, 0, 0)]+=0.91875930288*x_ref[2]**o + (-0.661218444319)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.426380275316*x[2]**o + (-0.971948465052)*x[2]
+            ref[(2, 0, 0, 1)]+=-0.426380275316*x_ref[2]**o + (-0.971948465052)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.631064028537*x[2]**o + (-0.73066975193)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.631064028537*x_ref[2]**o + (-0.73066975193)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=-0.594804747935*x[2]**o + (-0.286365627638)*x[2]
+            ref[(2, 0, 1, 0)]+=-0.594804747935*x_ref[2]**o + (-0.286365627638)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.406553519299*x[2]**o + (-0.677186561151)*x[2]
+            ref[(2, 0, 1, 1)]+=0.406553519299*x_ref[2]**o + (-0.677186561151)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.0584099303938*x[2]**o + (0.0570622304605)*x[2]
+            ref[(2, 0, 1, 2)]+=0.0584099303938*x_ref[2]**o + (0.0570622304605)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.379259392722*x[2]**o + (0.946039730042)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.379259392722*x_ref[2]**o + (0.946039730042)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=0.157837837609*x[2]**o + (0.0268004544887)*x[2]
+            ref[(2, 1, 0, 1)]+=0.157837837609*x_ref[2]**o + (0.0268004544887)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.82133131664*x[2]**o + (-0.795026941772)*x[2]
+            ref[(2, 1, 0, 2)]+=0.82133131664*x_ref[2]**o + (-0.795026941772)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.839237917738*x[2]**o + (0.618024310867)*x[2]
+            ref[(2, 1, 1, 0)]+=0.839237917738*x_ref[2]**o + (0.618024310867)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=0.839894270624*x[2]**o + (0.12106395663)*x[2]
+            ref[(2, 1, 1, 1)]+=0.839894270624*x_ref[2]**o + (0.12106395663)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.540611145442*x[2]**o + (-0.224441911601)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.540611145442*x_ref[2]**o + (-0.224441911601)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=0.119905928069*x[2]**o + (-0.604084040166)*x[2]
+            ref[(2, 2, 0, 0)]+=0.119905928069*x_ref[2]**o + (-0.604084040166)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=-0.492150165551*x[2]**o + (0.965439975387)*x[2]
+            ref[(2, 2, 0, 1)]+=-0.492150165551*x_ref[2]**o + (0.965439975387)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=0.960273468038*x[2]**o + (0.602849026817)*x[2]
+            ref[(2, 2, 0, 2)]+=0.960273468038*x_ref[2]**o + (0.602849026817)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=-0.572763881855*x[2]**o + (0.652287120066)*x[2]
+            ref[(2, 2, 1, 0)]+=-0.572763881855*x_ref[2]**o + (0.652287120066)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.88943237775*x[2]**o + (-0.195897374177)*x[2]
+            ref[(2, 2, 1, 1)]+=-0.88943237775*x_ref[2]**o + (-0.195897374177)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.958846887221*x[2]**o + (-0.165357176068)*x[2]
+            ref[(2, 2, 1, 2)]+=0.958846887221*x_ref[2]**o + (-0.165357176068)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3, 3, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=0.560046998768*x[0]**o + (0.210433898255)*x[0] + (-0.204978280678)*x[1]**o + (0.0321362261964)*x[1]
+        ref=0.560046998768*x_ref[0]**o + (0.210433898255)*x_ref[0] + (-0.204978280678)*x_ref[1]**o + (0.0321362261964)*x_ref[1]
+        if dim==3:
+            arg+=(-0.607219150083)*x[2]**o + (-0.87837736897)*x[2]
+            ref+=(-0.607219150083)*x_ref[2]**o + (-0.87837736897)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.426173943913*x[0]**o + (-0.810776907581)*x[0] + (0.723812978424)*x[1]**o + (0.201178058441)*x[1]
+        ref[(0,)]=-0.426173943913*x_ref[0]**o + (-0.810776907581)*x_ref[0] + (0.723812978424)*x_ref[1]**o + (0.201178058441)*x_ref[1]
+        arg[(1,)]=-0.569953164795*x[0]**o + (-0.700938901759)*x[0] + (0.751244000279)*x[1]**o + (-0.811542824308)*x[1]
+        ref[(1,)]=-0.569953164795*x_ref[0]**o + (-0.700938901759)*x_ref[0] + (0.751244000279)*x_ref[1]**o + (-0.811542824308)*x_ref[1]
+        arg[(2,)]=-0.802875985895*x[0]**o + (0.552254119317)*x[0] + (-0.717306598545)*x[1]**o + (-0.736479495436)*x[1]
+        ref[(2,)]=-0.802875985895*x_ref[0]**o + (0.552254119317)*x_ref[0] + (-0.717306598545)*x_ref[1]**o + (-0.736479495436)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.165009021042*x[2]**o + (-0.823280515544)*x[2]
+            ref[(0,)]+=0.165009021042*x_ref[2]**o + (-0.823280515544)*x_ref[2]
+            arg[(1,)]+=-0.696071321481*x[2]**o + (-0.171680737647)*x[2]
+            ref[(1,)]+=-0.696071321481*x_ref[2]**o + (-0.171680737647)*x_ref[2]
+            arg[(2,)]+=-0.899917933743*x[2]**o + (0.370956344457)*x[2]
+            ref[(2,)]+=-0.899917933743*x_ref[2]**o + (0.370956344457)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4),w)
+        ref = Data(0,(4, 4),w_ref)
+        arg[(0, 0)]=0.669450336531*x[0]**o + (-0.332037548318)*x[0] + (0.27460934073)*x[1]**o + (0.0125366258001)*x[1]
+        ref[(0, 0)]=0.669450336531*x_ref[0]**o + (-0.332037548318)*x_ref[0] + (0.27460934073)*x_ref[1]**o + (0.0125366258001)*x_ref[1]
+        arg[(0, 1)]=-0.187256696816*x[0]**o + (0.92838292151)*x[0] + (0.211308778009)*x[1]**o + (-0.36274109424)*x[1]
+        ref[(0, 1)]=-0.187256696816*x_ref[0]**o + (0.92838292151)*x_ref[0] + (0.211308778009)*x_ref[1]**o + (-0.36274109424)*x_ref[1]
+        arg[(0, 2)]=0.905730491649*x[0]**o + (0.712191765709)*x[0] + (0.906848185692)*x[1]**o + (0.998777386902)*x[1]
+        ref[(0, 2)]=0.905730491649*x_ref[0]**o + (0.712191765709)*x_ref[0] + (0.906848185692)*x_ref[1]**o + (0.998777386902)*x_ref[1]
+        arg[(0, 3)]=-0.485544352962*x[0]**o + (-0.476455858006)*x[0] + (-0.319368053911)*x[1]**o + (-0.487131653176)*x[1]
+        ref[(0, 3)]=-0.485544352962*x_ref[0]**o + (-0.476455858006)*x_ref[0] + (-0.319368053911)*x_ref[1]**o + (-0.487131653176)*x_ref[1]
+        arg[(1, 0)]=-0.497272296455*x[0]**o + (0.0299509470518)*x[0] + (0.902165492503)*x[1]**o + (-0.302640470181)*x[1]
+        ref[(1, 0)]=-0.497272296455*x_ref[0]**o + (0.0299509470518)*x_ref[0] + (0.902165492503)*x_ref[1]**o + (-0.302640470181)*x_ref[1]
+        arg[(1, 1)]=0.0584616888263*x[0]**o + (-0.337273821991)*x[0] + (0.558857761275)*x[1]**o + (-0.436583721662)*x[1]
+        ref[(1, 1)]=0.0584616888263*x_ref[0]**o + (-0.337273821991)*x_ref[0] + (0.558857761275)*x_ref[1]**o + (-0.436583721662)*x_ref[1]
+        arg[(1, 2)]=-0.233501698224*x[0]**o + (-0.782095292925)*x[0] + (-0.120788452174)*x[1]**o + (0.279988902798)*x[1]
+        ref[(1, 2)]=-0.233501698224*x_ref[0]**o + (-0.782095292925)*x_ref[0] + (-0.120788452174)*x_ref[1]**o + (0.279988902798)*x_ref[1]
+        arg[(1, 3)]=0.0674699636904*x[0]**o + (0.242502553962)*x[0] + (0.0918885367097)*x[1]**o + (-0.425619062669)*x[1]
+        ref[(1, 3)]=0.0674699636904*x_ref[0]**o + (0.242502553962)*x_ref[0] + (0.0918885367097)*x_ref[1]**o + (-0.425619062669)*x_ref[1]
+        arg[(2, 0)]=-0.936645573456*x[0]**o + (-0.656642200367)*x[0] + (-0.113092280598)*x[1]**o + (0.6132468233)*x[1]
+        ref[(2, 0)]=-0.936645573456*x_ref[0]**o + (-0.656642200367)*x_ref[0] + (-0.113092280598)*x_ref[1]**o + (0.6132468233)*x_ref[1]
+        arg[(2, 1)]=0.624407674302*x[0]**o + (-0.441668132707)*x[0] + (0.888409602365)*x[1]**o + (0.832409799237)*x[1]
+        ref[(2, 1)]=0.624407674302*x_ref[0]**o + (-0.441668132707)*x_ref[0] + (0.888409602365)*x_ref[1]**o + (0.832409799237)*x_ref[1]
+        arg[(2, 2)]=0.468140572564*x[0]**o + (0.593591340468)*x[0] + (-0.197335765082)*x[1]**o + (-0.22568617624)*x[1]
+        ref[(2, 2)]=0.468140572564*x_ref[0]**o + (0.593591340468)*x_ref[0] + (-0.197335765082)*x_ref[1]**o + (-0.22568617624)*x_ref[1]
+        arg[(2, 3)]=0.733357764902*x[0]**o + (-0.691883631373)*x[0] + (-0.766711255017)*x[1]**o + (-0.402394709226)*x[1]
+        ref[(2, 3)]=0.733357764902*x_ref[0]**o + (-0.691883631373)*x_ref[0] + (-0.766711255017)*x_ref[1]**o + (-0.402394709226)*x_ref[1]
+        arg[(3, 0)]=-0.699773788061*x[0]**o + (0.700298175849)*x[0] + (-0.769890889097)*x[1]**o + (0.282618478558)*x[1]
+        ref[(3, 0)]=-0.699773788061*x_ref[0]**o + (0.700298175849)*x_ref[0] + (-0.769890889097)*x_ref[1]**o + (0.282618478558)*x_ref[1]
+        arg[(3, 1)]=0.787930989474*x[0]**o + (-0.18977222974)*x[0] + (0.974085509865)*x[1]**o + (0.210437408474)*x[1]
+        ref[(3, 1)]=0.787930989474*x_ref[0]**o + (-0.18977222974)*x_ref[0] + (0.974085509865)*x_ref[1]**o + (0.210437408474)*x_ref[1]
+        arg[(3, 2)]=-0.606308165617*x[0]**o + (0.302451636037)*x[0] + (-0.159024560779)*x[1]**o + (-0.900729642836)*x[1]
+        ref[(3, 2)]=-0.606308165617*x_ref[0]**o + (0.302451636037)*x_ref[0] + (-0.159024560779)*x_ref[1]**o + (-0.900729642836)*x_ref[1]
+        arg[(3, 3)]=0.0903931872916*x[0]**o + (-0.651824388875)*x[0] + (0.852438276143)*x[1]**o + (-0.545190675463)*x[1]
+        ref[(3, 3)]=0.0903931872916*x_ref[0]**o + (-0.651824388875)*x_ref[0] + (0.852438276143)*x_ref[1]**o + (-0.545190675463)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.634479470434*x[2]**o + (-0.185352348141)*x[2]
+            ref[(0, 0)]+=-0.634479470434*x_ref[2]**o + (-0.185352348141)*x_ref[2]
+            arg[(0, 1)]+=0.47187562974*x[2]**o + (0.523241652681)*x[2]
+            ref[(0, 1)]+=0.47187562974*x_ref[2]**o + (0.523241652681)*x_ref[2]
+            arg[(0, 2)]+=-0.165228959372*x[2]**o + (0.599530805822)*x[2]
+            ref[(0, 2)]+=-0.165228959372*x_ref[2]**o + (0.599530805822)*x_ref[2]
+            arg[(0, 3)]+=-0.20918308263*x[2]**o + (0.0434945070886)*x[2]
+            ref[(0, 3)]+=-0.20918308263*x_ref[2]**o + (0.0434945070886)*x_ref[2]
+            arg[(1, 0)]+=0.231738920998*x[2]**o + (0.89483078921)*x[2]
+            ref[(1, 0)]+=0.231738920998*x_ref[2]**o + (0.89483078921)*x_ref[2]
+            arg[(1, 1)]+=0.446303238636*x[2]**o + (-0.314798571244)*x[2]
+            ref[(1, 1)]+=0.446303238636*x_ref[2]**o + (-0.314798571244)*x_ref[2]
+            arg[(1, 2)]+=0.842925376608*x[2]**o + (-0.20789044023)*x[2]
+            ref[(1, 2)]+=0.842925376608*x_ref[2]**o + (-0.20789044023)*x_ref[2]
+            arg[(1, 3)]+=0.467585248742*x[2]**o + (0.377528483379)*x[2]
+            ref[(1, 3)]+=0.467585248742*x_ref[2]**o + (0.377528483379)*x_ref[2]
+            arg[(2, 0)]+=0.0746574871248*x[2]**o + (0.568116179827)*x[2]
+            ref[(2, 0)]+=0.0746574871248*x_ref[2]**o + (0.568116179827)*x_ref[2]
+            arg[(2, 1)]+=0.388029469289*x[2]**o + (0.0468826077199)*x[2]
+            ref[(2, 1)]+=0.388029469289*x_ref[2]**o + (0.0468826077199)*x_ref[2]
+            arg[(2, 2)]+=0.538990594058*x[2]**o + (-0.363146984845)*x[2]
+            ref[(2, 2)]+=0.538990594058*x_ref[2]**o + (-0.363146984845)*x_ref[2]
+            arg[(2, 3)]+=0.13196780958*x[2]**o + (0.336398895535)*x[2]
+            ref[(2, 3)]+=0.13196780958*x_ref[2]**o + (0.336398895535)*x_ref[2]
+            arg[(3, 0)]+=-0.163923631162*x[2]**o + (0.0103271472424)*x[2]
+            ref[(3, 0)]+=-0.163923631162*x_ref[2]**o + (0.0103271472424)*x_ref[2]
+            arg[(3, 1)]+=0.730069693987*x[2]**o + (-0.438331932001)*x[2]
+            ref[(3, 1)]+=0.730069693987*x_ref[2]**o + (-0.438331932001)*x_ref[2]
+            arg[(3, 2)]+=0.516359614467*x[2]**o + (-0.394894154585)*x[2]
+            ref[(3, 2)]+=0.516359614467*x_ref[2]**o + (-0.394894154585)*x_ref[2]
+            arg[(3, 3)]+=-0.0122810971408*x[2]**o + (-0.533685787264)*x[2]
+            ref[(3, 3)]+=-0.0122810971408*x_ref[2]**o + (-0.533685787264)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 3, 4),w)
+        ref = Data(0,(4, 3, 4),w_ref)
+        arg[(0, 0, 0)]=-0.322217602689*x[0]**o + (-0.180772797473)*x[0] + (0.429231230166)*x[1]**o + (-0.745969139735)*x[1]
+        ref[(0, 0, 0)]=-0.322217602689*x_ref[0]**o + (-0.180772797473)*x_ref[0] + (0.429231230166)*x_ref[1]**o + (-0.745969139735)*x_ref[1]
+        arg[(0, 0, 1)]=-0.483203769269*x[0]**o + (0.287237747617)*x[0] + (0.701210256321)*x[1]**o + (0.696722837861)*x[1]
+        ref[(0, 0, 1)]=-0.483203769269*x_ref[0]**o + (0.287237747617)*x_ref[0] + (0.701210256321)*x_ref[1]**o + (0.696722837861)*x_ref[1]
+        arg[(0, 0, 2)]=-0.620069352556*x[0]**o + (-0.465474680428)*x[0] + (0.359361388788)*x[1]**o + (0.338604772433)*x[1]
+        ref[(0, 0, 2)]=-0.620069352556*x_ref[0]**o + (-0.465474680428)*x_ref[0] + (0.359361388788)*x_ref[1]**o + (0.338604772433)*x_ref[1]
+        arg[(0, 0, 3)]=-0.43445317197*x[0]**o + (-0.641503215875)*x[0] + (0.122710101144)*x[1]**o + (0.911416497569)*x[1]
+        ref[(0, 0, 3)]=-0.43445317197*x_ref[0]**o + (-0.641503215875)*x_ref[0] + (0.122710101144)*x_ref[1]**o + (0.911416497569)*x_ref[1]
+        arg[(0, 1, 0)]=0.613875912689*x[0]**o + (0.315937641112)*x[0] + (0.200471615612)*x[1]**o + (-0.964922619557)*x[1]
+        ref[(0, 1, 0)]=0.613875912689*x_ref[0]**o + (0.315937641112)*x_ref[0] + (0.200471615612)*x_ref[1]**o + (-0.964922619557)*x_ref[1]
+        arg[(0, 1, 1)]=-0.716471962222*x[0]**o + (-0.219919151603)*x[0] + (-0.0390703754612)*x[1]**o + (-0.105107332214)*x[1]
+        ref[(0, 1, 1)]=-0.716471962222*x_ref[0]**o + (-0.219919151603)*x_ref[0] + (-0.0390703754612)*x_ref[1]**o + (-0.105107332214)*x_ref[1]
+        arg[(0, 1, 2)]=-0.44030605033*x[0]**o + (-0.402977385601)*x[0] + (-0.183666881139)*x[1]**o + (0.0246512443561)*x[1]
+        ref[(0, 1, 2)]=-0.44030605033*x_ref[0]**o + (-0.402977385601)*x_ref[0] + (-0.183666881139)*x_ref[1]**o + (0.0246512443561)*x_ref[1]
+        arg[(0, 1, 3)]=-0.547683305159*x[0]**o + (-0.00283746243392)*x[0] + (0.661893381564)*x[1]**o + (0.182024300974)*x[1]
+        ref[(0, 1, 3)]=-0.547683305159*x_ref[0]**o + (-0.00283746243392)*x_ref[0] + (0.661893381564)*x_ref[1]**o + (0.182024300974)*x_ref[1]
+        arg[(0, 2, 0)]=-0.522809817128*x[0]**o + (-0.975953703846)*x[0] + (-0.100150021796)*x[1]**o + (-0.106939027182)*x[1]
+        ref[(0, 2, 0)]=-0.522809817128*x_ref[0]**o + (-0.975953703846)*x_ref[0] + (-0.100150021796)*x_ref[1]**o + (-0.106939027182)*x_ref[1]
+        arg[(0, 2, 1)]=0.202765204329*x[0]**o + (0.220603205713)*x[0] + (-0.358851035197)*x[1]**o + (0.4332637228)*x[1]
+        ref[(0, 2, 1)]=0.202765204329*x_ref[0]**o + (0.220603205713)*x_ref[0] + (-0.358851035197)*x_ref[1]**o + (0.4332637228)*x_ref[1]
+        arg[(0, 2, 2)]=0.585595109289*x[0]**o + (0.459274271317)*x[0] + (0.302716853435)*x[1]**o + (0.902883082261)*x[1]
+        ref[(0, 2, 2)]=0.585595109289*x_ref[0]**o + (0.459274271317)*x_ref[0] + (0.302716853435)*x_ref[1]**o + (0.902883082261)*x_ref[1]
+        arg[(0, 2, 3)]=-0.87854320325*x[0]**o + (-0.642545379031)*x[0] + (-0.32214860439)*x[1]**o + (-0.361496892385)*x[1]
+        ref[(0, 2, 3)]=-0.87854320325*x_ref[0]**o + (-0.642545379031)*x_ref[0] + (-0.32214860439)*x_ref[1]**o + (-0.361496892385)*x_ref[1]
+        arg[(1, 0, 0)]=-0.268347769229*x[0]**o + (-0.302177265266)*x[0] + (0.323642331448)*x[1]**o + (-0.541036361273)*x[1]
+        ref[(1, 0, 0)]=-0.268347769229*x_ref[0]**o + (-0.302177265266)*x_ref[0] + (0.323642331448)*x_ref[1]**o + (-0.541036361273)*x_ref[1]
+        arg[(1, 0, 1)]=0.82205393104*x[0]**o + (0.773203448949)*x[0] + (-0.884580596272)*x[1]**o + (0.589118236554)*x[1]
+        ref[(1, 0, 1)]=0.82205393104*x_ref[0]**o + (0.773203448949)*x_ref[0] + (-0.884580596272)*x_ref[1]**o + (0.589118236554)*x_ref[1]
+        arg[(1, 0, 2)]=0.158698865155*x[0]**o + (0.79463944491)*x[0] + (0.763984656735)*x[1]**o + (0.203770159447)*x[1]
+        ref[(1, 0, 2)]=0.158698865155*x_ref[0]**o + (0.79463944491)*x_ref[0] + (0.763984656735)*x_ref[1]**o + (0.203770159447)*x_ref[1]
+        arg[(1, 0, 3)]=-0.813210099168*x[0]**o + (0.348158634065)*x[0] + (0.561845790864)*x[1]**o + (0.549058145623)*x[1]
+        ref[(1, 0, 3)]=-0.813210099168*x_ref[0]**o + (0.348158634065)*x_ref[0] + (0.561845790864)*x_ref[1]**o + (0.549058145623)*x_ref[1]
+        arg[(1, 1, 0)]=-0.0463860389518*x[0]**o + (0.247995275568)*x[0] + (0.627929983723)*x[1]**o + (0.176525596344)*x[1]
+        ref[(1, 1, 0)]=-0.0463860389518*x_ref[0]**o + (0.247995275568)*x_ref[0] + (0.627929983723)*x_ref[1]**o + (0.176525596344)*x_ref[1]
+        arg[(1, 1, 1)]=-0.0951000823342*x[0]**o + (0.519846256087)*x[0] + (-0.191162482236)*x[1]**o + (0.187517378188)*x[1]
+        ref[(1, 1, 1)]=-0.0951000823342*x_ref[0]**o + (0.519846256087)*x_ref[0] + (-0.191162482236)*x_ref[1]**o + (0.187517378188)*x_ref[1]
+        arg[(1, 1, 2)]=-0.0722916483436*x[0]**o + (0.362529185372)*x[0] + (-0.434093512129)*x[1]**o + (-0.779876348086)*x[1]
+        ref[(1, 1, 2)]=-0.0722916483436*x_ref[0]**o + (0.362529185372)*x_ref[0] + (-0.434093512129)*x_ref[1]**o + (-0.779876348086)*x_ref[1]
+        arg[(1, 1, 3)]=-0.0533821862631*x[0]**o + (-0.587779052755)*x[0] + (-0.482678614409)*x[1]**o + (-0.868003085465)*x[1]
+        ref[(1, 1, 3)]=-0.0533821862631*x_ref[0]**o + (-0.587779052755)*x_ref[0] + (-0.482678614409)*x_ref[1]**o + (-0.868003085465)*x_ref[1]
+        arg[(1, 2, 0)]=-0.0845313519519*x[0]**o + (0.555767710043)*x[0] + (-0.895282808602)*x[1]**o + (0.663706026218)*x[1]
+        ref[(1, 2, 0)]=-0.0845313519519*x_ref[0]**o + (0.555767710043)*x_ref[0] + (-0.895282808602)*x_ref[1]**o + (0.663706026218)*x_ref[1]
+        arg[(1, 2, 1)]=0.00173292604508*x[0]**o + (0.237710022802)*x[0] + (0.883414943364)*x[1]**o + (0.832996910152)*x[1]
+        ref[(1, 2, 1)]=0.00173292604508*x_ref[0]**o + (0.237710022802)*x_ref[0] + (0.883414943364)*x_ref[1]**o + (0.832996910152)*x_ref[1]
+        arg[(1, 2, 2)]=0.337297518271*x[0]**o + (-0.630660971232)*x[0] + (-0.86685511355)*x[1]**o + (0.369026716324)*x[1]
+        ref[(1, 2, 2)]=0.337297518271*x_ref[0]**o + (-0.630660971232)*x_ref[0] + (-0.86685511355)*x_ref[1]**o + (0.369026716324)*x_ref[1]
+        arg[(1, 2, 3)]=0.103325804244*x[0]**o + (0.50880298567)*x[0] + (-0.591654620107)*x[1]**o + (-0.0796602235621)*x[1]
+        ref[(1, 2, 3)]=0.103325804244*x_ref[0]**o + (0.50880298567)*x_ref[0] + (-0.591654620107)*x_ref[1]**o + (-0.0796602235621)*x_ref[1]
+        arg[(2, 0, 0)]=0.214017443515*x[0]**o + (-0.74274959791)*x[0] + (-0.12213176528)*x[1]**o + (-0.673740180878)*x[1]
+        ref[(2, 0, 0)]=0.214017443515*x_ref[0]**o + (-0.74274959791)*x_ref[0] + (-0.12213176528)*x_ref[1]**o + (-0.673740180878)*x_ref[1]
+        arg[(2, 0, 1)]=-0.43885989351*x[0]**o + (0.51912252429)*x[0] + (-0.386138185282)*x[1]**o + (-0.94839723442)*x[1]
+        ref[(2, 0, 1)]=-0.43885989351*x_ref[0]**o + (0.51912252429)*x_ref[0] + (-0.386138185282)*x_ref[1]**o + (-0.94839723442)*x_ref[1]
+        arg[(2, 0, 2)]=-0.831192642477*x[0]**o + (0.277005853879)*x[0] + (-0.745090547687)*x[1]**o + (-0.429361610559)*x[1]
+        ref[(2, 0, 2)]=-0.831192642477*x_ref[0]**o + (0.277005853879)*x_ref[0] + (-0.745090547687)*x_ref[1]**o + (-0.429361610559)*x_ref[1]
+        arg[(2, 0, 3)]=0.431760215449*x[0]**o + (-0.506045642126)*x[0] + (0.66696938099)*x[1]**o + (0.594218836295)*x[1]
+        ref[(2, 0, 3)]=0.431760215449*x_ref[0]**o + (-0.506045642126)*x_ref[0] + (0.66696938099)*x_ref[1]**o + (0.594218836295)*x_ref[1]
+        arg[(2, 1, 0)]=-0.5295164538*x[0]**o + (-0.0993172746405)*x[0] + (0.624722187169)*x[1]**o + (0.0293010549736)*x[1]
+        ref[(2, 1, 0)]=-0.5295164538*x_ref[0]**o + (-0.0993172746405)*x_ref[0] + (0.624722187169)*x_ref[1]**o + (0.0293010549736)*x_ref[1]
+        arg[(2, 1, 1)]=0.375080460048*x[0]**o + (-0.563747997658)*x[0] + (0.939889531539)*x[1]**o + (0.0318662849816)*x[1]
+        ref[(2, 1, 1)]=0.375080460048*x_ref[0]**o + (-0.563747997658)*x_ref[0] + (0.939889531539)*x_ref[1]**o + (0.0318662849816)*x_ref[1]
+        arg[(2, 1, 2)]=0.220082280892*x[0]**o + (-0.163826822821)*x[0] + (-0.362875476203)*x[1]**o + (-0.0871814482314)*x[1]
+        ref[(2, 1, 2)]=0.220082280892*x_ref[0]**o + (-0.163826822821)*x_ref[0] + (-0.362875476203)*x_ref[1]**o + (-0.0871814482314)*x_ref[1]
+        arg[(2, 1, 3)]=-0.739845967575*x[0]**o + (-0.342597356508)*x[0] + (0.658022939844)*x[1]**o + (0.333534209579)*x[1]
+        ref[(2, 1, 3)]=-0.739845967575*x_ref[0]**o + (-0.342597356508)*x_ref[0] + (0.658022939844)*x_ref[1]**o + (0.333534209579)*x_ref[1]
+        arg[(2, 2, 0)]=-0.29829514388*x[0]**o + (-0.424131611306)*x[0] + (0.400007186859)*x[1]**o + (-0.425228545389)*x[1]
+        ref[(2, 2, 0)]=-0.29829514388*x_ref[0]**o + (-0.424131611306)*x_ref[0] + (0.400007186859)*x_ref[1]**o + (-0.425228545389)*x_ref[1]
+        arg[(2, 2, 1)]=-0.849762425458*x[0]**o + (0.743065216132)*x[0] + (0.348259322888)*x[1]**o + (0.126508201406)*x[1]
+        ref[(2, 2, 1)]=-0.849762425458*x_ref[0]**o + (0.743065216132)*x_ref[0] + (0.348259322888)*x_ref[1]**o + (0.126508201406)*x_ref[1]
+        arg[(2, 2, 2)]=-0.391007975419*x[0]**o + (-0.36875898044)*x[0] + (-0.525913157782)*x[1]**o + (-0.839466003493)*x[1]
+        ref[(2, 2, 2)]=-0.391007975419*x_ref[0]**o + (-0.36875898044)*x_ref[0] + (-0.525913157782)*x_ref[1]**o + (-0.839466003493)*x_ref[1]
+        arg[(2, 2, 3)]=-0.0832793738061*x[0]**o + (-0.813795170004)*x[0] + (0.0680758867095)*x[1]**o + (-0.252761072544)*x[1]
+        ref[(2, 2, 3)]=-0.0832793738061*x_ref[0]**o + (-0.813795170004)*x_ref[0] + (0.0680758867095)*x_ref[1]**o + (-0.252761072544)*x_ref[1]
+        arg[(3, 0, 0)]=-0.974863716536*x[0]**o + (-0.0902045306026)*x[0] + (-0.607032422545)*x[1]**o + (0.31998529868)*x[1]
+        ref[(3, 0, 0)]=-0.974863716536*x_ref[0]**o + (-0.0902045306026)*x_ref[0] + (-0.607032422545)*x_ref[1]**o + (0.31998529868)*x_ref[1]
+        arg[(3, 0, 1)]=-0.670793421798*x[0]**o + (-0.336745622177)*x[0] + (-0.687433213063)*x[1]**o + (-0.482140993717)*x[1]
+        ref[(3, 0, 1)]=-0.670793421798*x_ref[0]**o + (-0.336745622177)*x_ref[0] + (-0.687433213063)*x_ref[1]**o + (-0.482140993717)*x_ref[1]
+        arg[(3, 0, 2)]=-0.498926173425*x[0]**o + (-0.552260587672)*x[0] + (0.842261246418)*x[1]**o + (0.0278506700363)*x[1]
+        ref[(3, 0, 2)]=-0.498926173425*x_ref[0]**o + (-0.552260587672)*x_ref[0] + (0.842261246418)*x_ref[1]**o + (0.0278506700363)*x_ref[1]
+        arg[(3, 0, 3)]=-0.721575601387*x[0]**o + (0.803778609648)*x[0] + (0.858232940304)*x[1]**o + (0.164227706767)*x[1]
+        ref[(3, 0, 3)]=-0.721575601387*x_ref[0]**o + (0.803778609648)*x_ref[0] + (0.858232940304)*x_ref[1]**o + (0.164227706767)*x_ref[1]
+        arg[(3, 1, 0)]=0.793766167522*x[0]**o + (-0.669685836937)*x[0] + (0.505892675702)*x[1]**o + (0.00168579849307)*x[1]
+        ref[(3, 1, 0)]=0.793766167522*x_ref[0]**o + (-0.669685836937)*x_ref[0] + (0.505892675702)*x_ref[1]**o + (0.00168579849307)*x_ref[1]
+        arg[(3, 1, 1)]=-0.421793213502*x[0]**o + (-0.53604599783)*x[0] + (0.252017798635)*x[1]**o + (0.829194794464)*x[1]
+        ref[(3, 1, 1)]=-0.421793213502*x_ref[0]**o + (-0.53604599783)*x_ref[0] + (0.252017798635)*x_ref[1]**o + (0.829194794464)*x_ref[1]
+        arg[(3, 1, 2)]=-0.585859782244*x[0]**o + (0.787270534677)*x[0] + (-0.793498035624)*x[1]**o + (0.374942823506)*x[1]
+        ref[(3, 1, 2)]=-0.585859782244*x_ref[0]**o + (0.787270534677)*x_ref[0] + (-0.793498035624)*x_ref[1]**o + (0.374942823506)*x_ref[1]
+        arg[(3, 1, 3)]=-0.840393417997*x[0]**o + (-0.492810896927)*x[0] + (-0.365986015031)*x[1]**o + (0.2263717202)*x[1]
+        ref[(3, 1, 3)]=-0.840393417997*x_ref[0]**o + (-0.492810896927)*x_ref[0] + (-0.365986015031)*x_ref[1]**o + (0.2263717202)*x_ref[1]
+        arg[(3, 2, 0)]=0.690809683418*x[0]**o + (0.930252323901)*x[0] + (0.20051160689)*x[1]**o + (0.964974678877)*x[1]
+        ref[(3, 2, 0)]=0.690809683418*x_ref[0]**o + (0.930252323901)*x_ref[0] + (0.20051160689)*x_ref[1]**o + (0.964974678877)*x_ref[1]
+        arg[(3, 2, 1)]=0.638348641439*x[0]**o + (-0.0734324835985)*x[0] + (0.187243502108)*x[1]**o + (0.224826120426)*x[1]
+        ref[(3, 2, 1)]=0.638348641439*x_ref[0]**o + (-0.0734324835985)*x_ref[0] + (0.187243502108)*x_ref[1]**o + (0.224826120426)*x_ref[1]
+        arg[(3, 2, 2)]=0.617244247354*x[0]**o + (0.190756059346)*x[0] + (0.268618134762)*x[1]**o + (0.809194198182)*x[1]
+        ref[(3, 2, 2)]=0.617244247354*x_ref[0]**o + (0.190756059346)*x_ref[0] + (0.268618134762)*x_ref[1]**o + (0.809194198182)*x_ref[1]
+        arg[(3, 2, 3)]=-0.443246219878*x[0]**o + (-0.664851319415)*x[0] + (0.449373275921)*x[1]**o + (0.0384907843914)*x[1]
+        ref[(3, 2, 3)]=-0.443246219878*x_ref[0]**o + (-0.664851319415)*x_ref[0] + (0.449373275921)*x_ref[1]**o + (0.0384907843914)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.649369927131*x[2]**o + (-0.152120039891)*x[2]
+            ref[(0, 0, 0)]+=0.649369927131*x_ref[2]**o + (-0.152120039891)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.252790079435*x[2]**o + (0.981016801829)*x[2]
+            ref[(0, 0, 1)]+=-0.252790079435*x_ref[2]**o + (0.981016801829)*x_ref[2]
+            arg[(0, 0, 2)]+=0.713901488677*x[2]**o + (0.223127481069)*x[2]
+            ref[(0, 0, 2)]+=0.713901488677*x_ref[2]**o + (0.223127481069)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.410690682118*x[2]**o + (0.658777400638)*x[2]
+            ref[(0, 0, 3)]+=-0.410690682118*x_ref[2]**o + (0.658777400638)*x_ref[2]
+            arg[(0, 1, 0)]+=0.771156109551*x[2]**o + (0.245370731532)*x[2]
+            ref[(0, 1, 0)]+=0.771156109551*x_ref[2]**o + (0.245370731532)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.110515222707*x[2]**o + (-0.71111275568)*x[2]
+            ref[(0, 1, 1)]+=-0.110515222707*x_ref[2]**o + (-0.71111275568)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.121274825341*x[2]**o + (0.101984023168)*x[2]
+            ref[(0, 1, 2)]+=-0.121274825341*x_ref[2]**o + (0.101984023168)*x_ref[2]
+            arg[(0, 1, 3)]+=0.433632391307*x[2]**o + (-0.27572797688)*x[2]
+            ref[(0, 1, 3)]+=0.433632391307*x_ref[2]**o + (-0.27572797688)*x_ref[2]
+            arg[(0, 2, 0)]+=0.288334556271*x[2]**o + (-0.0540618805407)*x[2]
+            ref[(0, 2, 0)]+=0.288334556271*x_ref[2]**o + (-0.0540618805407)*x_ref[2]
+            arg[(0, 2, 1)]+=0.849742392414*x[2]**o + (0.979556831894)*x[2]
+            ref[(0, 2, 1)]+=0.849742392414*x_ref[2]**o + (0.979556831894)*x_ref[2]
+            arg[(0, 2, 2)]+=0.0149377151334*x[2]**o + (-0.0321486496351)*x[2]
+            ref[(0, 2, 2)]+=0.0149377151334*x_ref[2]**o + (-0.0321486496351)*x_ref[2]
+            arg[(0, 2, 3)]+=0.554417049891*x[2]**o + (-0.645137619383)*x[2]
+            ref[(0, 2, 3)]+=0.554417049891*x_ref[2]**o + (-0.645137619383)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.148275072947*x[2]**o + (0.808702903292)*x[2]
+            ref[(1, 0, 0)]+=-0.148275072947*x_ref[2]**o + (0.808702903292)*x_ref[2]
+            arg[(1, 0, 1)]+=0.0634171051153*x[2]**o + (0.0579428437062)*x[2]
+            ref[(1, 0, 1)]+=0.0634171051153*x_ref[2]**o + (0.0579428437062)*x_ref[2]
+            arg[(1, 0, 2)]+=0.579174465176*x[2]**o + (0.777855541852)*x[2]
+            ref[(1, 0, 2)]+=0.579174465176*x_ref[2]**o + (0.777855541852)*x_ref[2]
+            arg[(1, 0, 3)]+=-0.853742952185*x[2]**o + (0.366477670983)*x[2]
+            ref[(1, 0, 3)]+=-0.853742952185*x_ref[2]**o + (0.366477670983)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.745663175204*x[2]**o + (-0.332488509872)*x[2]
+            ref[(1, 1, 0)]+=-0.745663175204*x_ref[2]**o + (-0.332488509872)*x_ref[2]
+            arg[(1, 1, 1)]+=0.833413088096*x[2]**o + (-0.526865811612)*x[2]
+            ref[(1, 1, 1)]+=0.833413088096*x_ref[2]**o + (-0.526865811612)*x_ref[2]
+            arg[(1, 1, 2)]+=0.83934039032*x[2]**o + (-0.53599749954)*x[2]
+            ref[(1, 1, 2)]+=0.83934039032*x_ref[2]**o + (-0.53599749954)*x_ref[2]
+            arg[(1, 1, 3)]+=0.0205647822717*x[2]**o + (-0.854984563289)*x[2]
+            ref[(1, 1, 3)]+=0.0205647822717*x_ref[2]**o + (-0.854984563289)*x_ref[2]
+            arg[(1, 2, 0)]+=0.989107812373*x[2]**o + (0.0858763451613)*x[2]
+            ref[(1, 2, 0)]+=0.989107812373*x_ref[2]**o + (0.0858763451613)*x_ref[2]
+            arg[(1, 2, 1)]+=0.342238342837*x[2]**o + (0.928520239499)*x[2]
+            ref[(1, 2, 1)]+=0.342238342837*x_ref[2]**o + (0.928520239499)*x_ref[2]
+            arg[(1, 2, 2)]+=0.808384998291*x[2]**o + (-0.456637897861)*x[2]
+            ref[(1, 2, 2)]+=0.808384998291*x_ref[2]**o + (-0.456637897861)*x_ref[2]
+            arg[(1, 2, 3)]+=-0.684804692357*x[2]**o + (0.677105703714)*x[2]
+            ref[(1, 2, 3)]+=-0.684804692357*x_ref[2]**o + (0.677105703714)*x_ref[2]
+            arg[(2, 0, 0)]+=0.161945806076*x[2]**o + (-0.132397583611)*x[2]
+            ref[(2, 0, 0)]+=0.161945806076*x_ref[2]**o + (-0.132397583611)*x_ref[2]
+            arg[(2, 0, 1)]+=0.367152107153*x[2]**o + (0.0232801267725)*x[2]
+            ref[(2, 0, 1)]+=0.367152107153*x_ref[2]**o + (0.0232801267725)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.584194586136*x[2]**o + (-0.572752986438)*x[2]
+            ref[(2, 0, 2)]+=-0.584194586136*x_ref[2]**o + (-0.572752986438)*x_ref[2]
+            arg[(2, 0, 3)]+=-0.373550780319*x[2]**o + (-0.0318873923828)*x[2]
+            ref[(2, 0, 3)]+=-0.373550780319*x_ref[2]**o + (-0.0318873923828)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.251790810981*x[2]**o + (0.702192709268)*x[2]
+            ref[(2, 1, 0)]+=-0.251790810981*x_ref[2]**o + (0.702192709268)*x_ref[2]
+            arg[(2, 1, 1)]+=0.657189361023*x[2]**o + (0.650150790557)*x[2]
+            ref[(2, 1, 1)]+=0.657189361023*x_ref[2]**o + (0.650150790557)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.38852474178*x[2]**o + (-0.537683782781)*x[2]
+            ref[(2, 1, 2)]+=-0.38852474178*x_ref[2]**o + (-0.537683782781)*x_ref[2]
+            arg[(2, 1, 3)]+=0.652430822228*x[2]**o + (0.32940217906)*x[2]
+            ref[(2, 1, 3)]+=0.652430822228*x_ref[2]**o + (0.32940217906)*x_ref[2]
+            arg[(2, 2, 0)]+=-0.723522541576*x[2]**o + (0.0259131194841)*x[2]
+            ref[(2, 2, 0)]+=-0.723522541576*x_ref[2]**o + (0.0259131194841)*x_ref[2]
+            arg[(2, 2, 1)]+=0.40067062719*x[2]**o + (-0.326256124021)*x[2]
+            ref[(2, 2, 1)]+=0.40067062719*x_ref[2]**o + (-0.326256124021)*x_ref[2]
+            arg[(2, 2, 2)]+=0.912611108947*x[2]**o + (0.541313607832)*x[2]
+            ref[(2, 2, 2)]+=0.912611108947*x_ref[2]**o + (0.541313607832)*x_ref[2]
+            arg[(2, 2, 3)]+=-0.327505669888*x[2]**o + (-0.817387539088)*x[2]
+            ref[(2, 2, 3)]+=-0.327505669888*x_ref[2]**o + (-0.817387539088)*x_ref[2]
+            arg[(3, 0, 0)]+=0.782884763061*x[2]**o + (-0.0964674251759)*x[2]
+            ref[(3, 0, 0)]+=0.782884763061*x_ref[2]**o + (-0.0964674251759)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.935519054017*x[2]**o + (-0.703127426015)*x[2]
+            ref[(3, 0, 1)]+=-0.935519054017*x_ref[2]**o + (-0.703127426015)*x_ref[2]
+            arg[(3, 0, 2)]+=-0.924911831387*x[2]**o + (-0.327158332121)*x[2]
+            ref[(3, 0, 2)]+=-0.924911831387*x_ref[2]**o + (-0.327158332121)*x_ref[2]
+            arg[(3, 0, 3)]+=-0.862221801738*x[2]**o + (-0.530907618421)*x[2]
+            ref[(3, 0, 3)]+=-0.862221801738*x_ref[2]**o + (-0.530907618421)*x_ref[2]
+            arg[(3, 1, 0)]+=0.383549829692*x[2]**o + (-0.0398571676401)*x[2]
+            ref[(3, 1, 0)]+=0.383549829692*x_ref[2]**o + (-0.0398571676401)*x_ref[2]
+            arg[(3, 1, 1)]+=-0.508940367429*x[2]**o + (0.986772717657)*x[2]
+            ref[(3, 1, 1)]+=-0.508940367429*x_ref[2]**o + (0.986772717657)*x_ref[2]
+            arg[(3, 1, 2)]+=0.776892220292*x[2]**o + (0.464551675789)*x[2]
+            ref[(3, 1, 2)]+=0.776892220292*x_ref[2]**o + (0.464551675789)*x_ref[2]
+            arg[(3, 1, 3)]+=0.259081424008*x[2]**o + (-0.510709588741)*x[2]
+            ref[(3, 1, 3)]+=0.259081424008*x_ref[2]**o + (-0.510709588741)*x_ref[2]
+            arg[(3, 2, 0)]+=-0.903014780423*x[2]**o + (0.742332030042)*x[2]
+            ref[(3, 2, 0)]+=-0.903014780423*x_ref[2]**o + (0.742332030042)*x_ref[2]
+            arg[(3, 2, 1)]+=-0.519468460302*x[2]**o + (-0.297549467841)*x[2]
+            ref[(3, 2, 1)]+=-0.519468460302*x_ref[2]**o + (-0.297549467841)*x_ref[2]
+            arg[(3, 2, 2)]+=0.395843455303*x[2]**o + (-0.0152340424679)*x[2]
+            ref[(3, 2, 2)]+=0.395843455303*x_ref[2]**o + (-0.0152340424679)*x_ref[2]
+            arg[(3, 2, 3)]+=0.32534723587*x[2]**o + (-0.289610435244)*x[2]
+            ref[(3, 2, 3)]+=0.32534723587*x_ref[2]**o + (-0.289610435244)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: Solution(self.domain) exists
+                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = Solution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3, 3),w)
+        ref = Data(0,(4, 4, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=0.0806085157452*x[0]**o + (0.745397072562)*x[0] + (-0.57244740673)*x[1]**o + (0.924905168252)*x[1]
+        ref[(0, 0, 0, 0)]=0.0806085157452*x_ref[0]**o + (0.745397072562)*x_ref[0] + (-0.57244740673)*x_ref[1]**o + (0.924905168252)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.418988733226*x[0]**o + (-0.579488754644)*x[0] + (-0.849372839461)*x[1]**o + (-0.125305595719)*x[1]
+        ref[(0, 0, 0, 1)]=0.418988733226*x_ref[0]**o + (-0.579488754644)*x_ref[0] + (-0.849372839461)*x_ref[1]**o + (-0.125305595719)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.328682495779*x[0]**o + (0.431431717991)*x[0] + (0.777453651618)*x[1]**o + (-0.448668276718)*x[1]
+        ref[(0, 0, 0, 2)]=-0.328682495779*x_ref[0]**o + (0.431431717991)*x_ref[0] + (0.777453651618)*x_ref[1]**o + (-0.448668276718)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.981677114253*x[0]**o + (-0.518479943419)*x[0] + (0.0178165226435)*x[1]**o + (-0.612054488763)*x[1]
+        ref[(0, 0, 1, 0)]=0.981677114253*x_ref[0]**o + (-0.518479943419)*x_ref[0] + (0.0178165226435)*x_ref[1]**o + (-0.612054488763)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.981929658836*x[0]**o + (-0.529293735207)*x[0] + (0.946465087303)*x[1]**o + (0.777854925309)*x[1]
+        ref[(0, 0, 1, 1)]=0.981929658836*x_ref[0]**o + (-0.529293735207)*x_ref[0] + (0.946465087303)*x_ref[1]**o + (0.777854925309)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.943691552637*x[0]**o + (0.207707248416)*x[0] + (0.390873269993)*x[1]**o + (0.478681117533)*x[1]
+        ref[(0, 0, 1, 2)]=0.943691552637*x_ref[0]**o + (0.207707248416)*x_ref[0] + (0.390873269993)*x_ref[1]**o + (0.478681117533)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.544444409882*x[0]**o + (0.951562927991)*x[0] + (-0.516425837574)*x[1]**o + (-0.663106720564)*x[1]
+        ref[(0, 0, 2, 0)]=0.544444409882*x_ref[0]**o + (0.951562927991)*x_ref[0] + (-0.516425837574)*x_ref[1]**o + (-0.663106720564)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.742216023981*x[0]**o + (-0.583317674519)*x[0] + (0.190480413155)*x[1]**o + (-0.265983207546)*x[1]
+        ref[(0, 0, 2, 1)]=0.742216023981*x_ref[0]**o + (-0.583317674519)*x_ref[0] + (0.190480413155)*x_ref[1]**o + (-0.265983207546)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.579075019377*x[0]**o + (-0.0555656560429)*x[0] + (-0.346076850764)*x[1]**o + (0.277038481733)*x[1]
+        ref[(0, 0, 2, 2)]=0.579075019377*x_ref[0]**o + (-0.0555656560429)*x_ref[0] + (-0.346076850764)*x_ref[1]**o + (0.277038481733)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.406719747158*x[0]**o + (0.778608253656)*x[0] + (0.653090778471)*x[1]**o + (-0.346868083843)*x[1]
+        ref[(0, 1, 0, 0)]=0.406719747158*x_ref[0]**o + (0.778608253656)*x_ref[0] + (0.653090778471)*x_ref[1]**o + (-0.346868083843)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.0474244245248*x[0]**o + (0.37629662848)*x[0] + (0.853593370135)*x[1]**o + (0.0431230951266)*x[1]
+        ref[(0, 1, 0, 1)]=-0.0474244245248*x_ref[0]**o + (0.37629662848)*x_ref[0] + (0.853593370135)*x_ref[1]**o + (0.0431230951266)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.276114901764*x[0]**o + (0.675174172003)*x[0] + (0.912843374176)*x[1]**o + (-0.258918881825)*x[1]
+        ref[(0, 1, 0, 2)]=-0.276114901764*x_ref[0]**o + (0.675174172003)*x_ref[0] + (0.912843374176)*x_ref[1]**o + (-0.258918881825)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.221506622618*x[0]**o + (-0.128074716103)*x[0] + (0.0675428215742)*x[1]**o + (-0.503064972894)*x[1]
+        ref[(0, 1, 1, 0)]=-0.221506622618*x_ref[0]**o + (-0.128074716103)*x_ref[0] + (0.0675428215742)*x_ref[1]**o + (-0.503064972894)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.244210050031*x[0]**o + (0.142354192013)*x[0] + (-0.58231792117)*x[1]**o + (0.0722140449825)*x[1]
+        ref[(0, 1, 1, 1)]=0.244210050031*x_ref[0]**o + (0.142354192013)*x_ref[0] + (-0.58231792117)*x_ref[1]**o + (0.0722140449825)*x_ref[1]
+        arg[(0, 1, 1, 2)]=0.47399250593*x[0]**o + (-0.125821154534)*x[0] + (-0.508679516925)*x[1]**o + (-0.302330619201)*x[1]
+        ref[(0, 1, 1, 2)]=0.47399250593*x_ref[0]**o + (-0.125821154534)*x_ref[0] + (-0.508679516925)*x_ref[1]**o + (-0.302330619201)*x_ref[1]
+        arg[(0, 1, 2, 0)]=0.320106132337*x[0]**o + (0.970182512311)*x[0] + (0.510813693926)*x[1]**o + (-0.276913820102)*x[1]
+        ref[(0, 1, 2, 0)]=0.320106132337*x_ref[0]**o + (0.970182512311)*x_ref[0] + (0.510813693926)*x_ref[1]**o + (-0.276913820102)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.60162657092*x[0]**o + (0.60876209478)*x[0] + (0.109481215427)*x[1]**o + (0.39622137673)*x[1]
+        ref[(0, 1, 2, 1)]=-0.60162657092*x_ref[0]**o + (0.60876209478)*x_ref[0] + (0.109481215427)*x_ref[1]**o + (0.39622137673)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.40872851314*x[0]**o + (-0.584962642792)*x[0] + (0.480412639318)*x[1]**o + (-0.0476955493753)*x[1]
+        ref[(0, 1, 2, 2)]=0.40872851314*x_ref[0]**o + (-0.584962642792)*x_ref[0] + (0.480412639318)*x_ref[1]**o + (-0.0476955493753)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.360617234265*x[0]**o + (0.901076716376)*x[0] + (-0.0295062149193)*x[1]**o + (-0.24555452555)*x[1]
+        ref[(0, 2, 0, 0)]=-0.360617234265*x_ref[0]**o + (0.901076716376)*x_ref[0] + (-0.0295062149193)*x_ref[1]**o + (-0.24555452555)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.695787796025*x[0]**o + (0.491029250753)*x[0] + (0.363416595201)*x[1]**o + (0.680720992921)*x[1]
+        ref[(0, 2, 0, 1)]=-0.695787796025*x_ref[0]**o + (0.491029250753)*x_ref[0] + (0.363416595201)*x_ref[1]**o + (0.680720992921)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.405935414182*x[0]**o + (0.625800211694)*x[0] + (-0.230132538649)*x[1]**o + (-0.0781275599289)*x[1]
+        ref[(0, 2, 0, 2)]=-0.405935414182*x_ref[0]**o + (0.625800211694)*x_ref[0] + (-0.230132538649)*x_ref[1]**o + (-0.0781275599289)*x_ref[1]
+        arg[(0, 2, 1, 0)]=-0.667715621901*x[0]**o + (0.833495674542)*x[0] + (0.565521287037)*x[1]**o + (-0.988249130645)*x[1]
+        ref[(0, 2, 1, 0)]=-0.667715621901*x_ref[0]**o + (0.833495674542)*x_ref[0] + (0.565521287037)*x_ref[1]**o + (-0.988249130645)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.432558957793*x[0]**o + (-0.835717335436)*x[0] + (0.463544441931)*x[1]**o + (-0.976186467034)*x[1]
+        ref[(0, 2, 1, 1)]=-0.432558957793*x_ref[0]**o + (-0.835717335436)*x_ref[0] + (0.463544441931)*x_ref[1]**o + (-0.976186467034)*x_ref[1]
+        arg[(0, 2, 1, 2)]=-0.912154354877*x[0]**o + (-0.495744992694)*x[0] + (0.210272454612)*x[1]**o + (0.434387693561)*x[1]
+        ref[(0, 2, 1, 2)]=-0.912154354877*x_ref[0]**o + (-0.495744992694)*x_ref[0] + (0.210272454612)*x_ref[1]**o + (0.434387693561)*x_ref[1]
+        arg[(0, 2, 2, 0)]=0.374325347842*x[0]**o + (-0.885502772485)*x[0] + (-0.388943150609)*x[1]**o + (-0.629324446941)*x[1]
+        ref[(0, 2, 2, 0)]=0.374325347842*x_ref[0]**o + (-0.885502772485)*x_ref[0] + (-0.388943150609)*x_ref[1]**o + (-0.629324446941)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.511840039998*x[0]**o + (-0.0992851248567)*x[0] + (0.634135515578)*x[1]**o + (-0.16912881683)*x[1]
+        ref[(0, 2, 2, 1)]=0.511840039998*x_ref[0]**o + (-0.0992851248567)*x_ref[0] + (0.634135515578)*x_ref[1]**o + (-0.16912881683)*x_ref[1]
+        arg[(0, 2, 2, 2)]=-0.962137577318*x[0]**o + (-0.251434159353)*x[0] + (0.823556390167)*x[1]**o + (0.156779125217)*x[1]
+        ref[(0, 2, 2, 2)]=-0.962137577318*x_ref[0]**o + (-0.251434159353)*x_ref[0] + (0.823556390167)*x_ref[1]**o + (0.156779125217)*x_ref[1]
+        arg[(0, 3, 0, 0)]=0.705603199869*x[0]**o + (0.314117794364)*x[0] + (-0.295079776077)*x[1]**o + (0.0967171624702)*x[1]
+        ref[(0, 3, 0, 0)]=0.705603199869*x_ref[0]**o + (0.314117794364)*x_ref[0] + (-0.295079776077)*x_ref[1]**o + (0.0967171624702)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.195343047843*x[0]**o + (0.13844734058)*x[0] + (-0.752013949531)*x[1]**o + (0.327836087634)*x[1]
+        ref[(0, 3, 0, 1)]=0.195343047843*x_ref[0]**o + (0.13844734058)*x_ref[0] + (-0.752013949531)*x_ref[1]**o + (0.327836087634)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.47604811076*x[0]**o + (-0.366254669474)*x[0] + (0.619834492529)*x[1]**o + (0.48074740224)*x[1]
+        ref[(0, 3, 0, 2)]=-0.47604811076*x_ref[0]**o + (-0.366254669474)*x_ref[0] + (0.619834492529)*x_ref[1]**o + (0.48074740224)*x_ref[1]
+        arg[(0, 3, 1, 0)]=-0.294124486637*x[0]**o + (-0.678636752141)*x[0] + (0.97150647576)*x[1]**o + (-0.112056511532)*x[1]
+        ref[(0, 3, 1, 0)]=-0.294124486637*x_ref[0]**o + (-0.678636752141)*x_ref[0] + (0.97150647576)*x_ref[1]**o + (-0.112056511532)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.734331905377*x[0]**o + (0.133454469412)*x[0] + (-0.702681219162)*x[1]**o + (-0.0362890286963)*x[1]
+        ref[(0, 3, 1, 1)]=0.734331905377*x_ref[0]**o + (0.133454469412)*x_ref[0] + (-0.702681219162)*x_ref[1]**o + (-0.0362890286963)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.492960570077*x[0]**o + (0.26362121253)*x[0] + (-0.107773080897)*x[1]**o + (0.370637555782)*x[1]
+        ref[(0, 3, 1, 2)]=-0.492960570077*x_ref[0]**o + (0.26362121253)*x_ref[0] + (-0.107773080897)*x_ref[1]**o + (0.370637555782)*x_ref[1]
+        arg[(0, 3, 2, 0)]=0.913733681561*x[0]**o + (-0.437863281836)*x[0] + (0.93734214912)*x[1]**o + (-0.529720120957)*x[1]
+        ref[(0, 3, 2, 0)]=0.913733681561*x_ref[0]**o + (-0.437863281836)*x_ref[0] + (0.93734214912)*x_ref[1]**o + (-0.529720120957)*x_ref[1]
+        arg[(0, 3, 2, 1)]=0.680853861273*x[0]**o + (0.684174532796)*x[0] + (0.667614182669)*x[1]**o + (-0.888762625517)*x[1]
+        ref[(0, 3, 2, 1)]=0.680853861273*x_ref[0]**o + (0.684174532796)*x_ref[0] + (0.667614182669)*x_ref[1]**o + (-0.888762625517)*x_ref[1]
+        arg[(0, 3, 2, 2)]=-0.691380704662*x[0]**o + (0.462639415048)*x[0] + (0.698291273068)*x[1]**o + (0.0622831747585)*x[1]
+        ref[(0, 3, 2, 2)]=-0.691380704662*x_ref[0]**o + (0.462639415048)*x_ref[0] + (0.698291273068)*x_ref[1]**o + (0.0622831747585)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.944002089798*x[0]**o + (0.613785636079)*x[0] + (-0.0443825693662)*x[1]**o + (0.162844116056)*x[1]
+        ref[(1, 0, 0, 0)]=-0.944002089798*x_ref[0]**o + (0.613785636079)*x_ref[0] + (-0.0443825693662)*x_ref[1]**o + (0.162844116056)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.497958264533*x[0]**o + (0.65059415198)*x[0] + (0.0473130347662)*x[1]**o + (-0.480915845936)*x[1]
+        ref[(1, 0, 0, 1)]=-0.497958264533*x_ref[0]**o + (0.65059415198)*x_ref[0] + (0.0473130347662)*x_ref[1]**o + (-0.480915845936)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.284194674046*x[0]**o + (-0.740377061673)*x[0] + (0.865967208919)*x[1]**o + (0.689490035161)*x[1]
+        ref[(1, 0, 0, 2)]=0.284194674046*x_ref[0]**o + (-0.740377061673)*x_ref[0] + (0.865967208919)*x_ref[1]**o + (0.689490035161)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.707329628344*x[0]**o + (-0.820283402969)*x[0] + (0.382057971791)*x[1]**o + (-0.618709810935)*x[1]
+        ref[(1, 0, 1, 0)]=-0.707329628344*x_ref[0]**o + (-0.820283402969)*x_ref[0] + (0.382057971791)*x_ref[1]**o + (-0.618709810935)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.367414747626*x[0]**o + (-0.244801374036)*x[0] + (0.272718139797)*x[1]**o + (0.0987663692151)*x[1]
+        ref[(1, 0, 1, 1)]=0.367414747626*x_ref[0]**o + (-0.244801374036)*x_ref[0] + (0.272718139797)*x_ref[1]**o + (0.0987663692151)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.0967434077819*x[0]**o + (-0.412128404434)*x[0] + (0.0599447353494)*x[1]**o + (0.105948287523)*x[1]
+        ref[(1, 0, 1, 2)]=0.0967434077819*x_ref[0]**o + (-0.412128404434)*x_ref[0] + (0.0599447353494)*x_ref[1]**o + (0.105948287523)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.25230769002*x[0]**o + (-0.948062034749)*x[0] + (-0.978082351271)*x[1]**o + (0.391356529176)*x[1]
+        ref[(1, 0, 2, 0)]=-0.25230769002*x_ref[0]**o + (-0.948062034749)*x_ref[0] + (-0.978082351271)*x_ref[1]**o + (0.391356529176)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.414217098482*x[0]**o + (0.154143732461)*x[0] + (0.707357613471)*x[1]**o + (-0.372673001937)*x[1]
+        ref[(1, 0, 2, 1)]=-0.414217098482*x_ref[0]**o + (0.154143732461)*x_ref[0] + (0.707357613471)*x_ref[1]**o + (-0.372673001937)*x_ref[1]
+        arg[(1, 0, 2, 2)]=0.889286156699*x[0]**o + (-0.947600249299)*x[0] + (0.279456388337)*x[1]**o + (-0.81776523498)*x[1]
+        ref[(1, 0, 2, 2)]=0.889286156699*x_ref[0]**o + (-0.947600249299)*x_ref[0] + (0.279456388337)*x_ref[1]**o + (-0.81776523498)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.462982346697*x[0]**o + (0.397638032469)*x[0] + (-0.680138017764)*x[1]**o + (-0.639609101771)*x[1]
+        ref[(1, 1, 0, 0)]=0.462982346697*x_ref[0]**o + (0.397638032469)*x_ref[0] + (-0.680138017764)*x_ref[1]**o + (-0.639609101771)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.363583154311*x[0]**o + (0.110939904556)*x[0] + (0.267550644968)*x[1]**o + (-0.431089696389)*x[1]
+        ref[(1, 1, 0, 1)]=0.363583154311*x_ref[0]**o + (0.110939904556)*x_ref[0] + (0.267550644968)*x_ref[1]**o + (-0.431089696389)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.415873367791*x[0]**o + (0.0165985729573)*x[0] + (-0.261704645249)*x[1]**o + (-0.105771536746)*x[1]
+        ref[(1, 1, 0, 2)]=0.415873367791*x_ref[0]**o + (0.0165985729573)*x_ref[0] + (-0.261704645249)*x_ref[1]**o + (-0.105771536746)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.682665131084*x[0]**o + (0.509175679093)*x[0] + (0.750421682031)*x[1]**o + (0.587241619844)*x[1]
+        ref[(1, 1, 1, 0)]=0.682665131084*x_ref[0]**o + (0.509175679093)*x_ref[0] + (0.750421682031)*x_ref[1]**o + (0.587241619844)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.434499963977*x[0]**o + (0.239156456786)*x[0] + (0.389508934288)*x[1]**o + (0.129109157821)*x[1]
+        ref[(1, 1, 1, 1)]=-0.434499963977*x_ref[0]**o + (0.239156456786)*x_ref[0] + (0.389508934288)*x_ref[1]**o + (0.129109157821)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.609271789591*x[0]**o + (0.683128799228)*x[0] + (-0.633848289485)*x[1]**o + (0.500743545175)*x[1]
+        ref[(1, 1, 1, 2)]=0.609271789591*x_ref[0]**o + (0.683128799228)*x_ref[0] + (-0.633848289485)*x_ref[1]**o + (0.500743545175)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.536170752887*x[0]**o + (-0.157315560884)*x[0] + (-0.715324749332)*x[1]**o + (0.0588422787032)*x[1]
+        ref[(1, 1, 2, 0)]=0.536170752887*x_ref[0]**o + (-0.157315560884)*x_ref[0] + (-0.715324749332)*x_ref[1]**o + (0.0588422787032)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.643396983991*x[0]**o + (-0.386268872491)*x[0] + (-0.252481912796)*x[1]**o + (-0.980220903262)*x[1]
+        ref[(1, 1, 2, 1)]=-0.643396983991*x_ref[0]**o + (-0.386268872491)*x_ref[0] + (-0.252481912796)*x_ref[1]**o + (-0.980220903262)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.957745995507*x[0]**o + (-0.492967135472)*x[0] + (0.681626597794)*x[1]**o + (0.374082143715)*x[1]
+        ref[(1, 1, 2, 2)]=0.957745995507*x_ref[0]**o + (-0.492967135472)*x_ref[0] + (0.681626597794)*x_ref[1]**o + (0.374082143715)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.0148267975235*x[0]**o + (-0.582733439851)*x[0] + (-0.46662561314)*x[1]**o + (-0.230384263904)*x[1]
+        ref[(1, 2, 0, 0)]=-0.0148267975235*x_ref[0]**o + (-0.582733439851)*x_ref[0] + (-0.46662561314)*x_ref[1]**o + (-0.230384263904)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.217176918641*x[0]**o + (-0.0620643148388)*x[0] + (-0.946858639277)*x[1]**o + (-0.811311849855)*x[1]
+        ref[(1, 2, 0, 1)]=-0.217176918641*x_ref[0]**o + (-0.0620643148388)*x_ref[0] + (-0.946858639277)*x_ref[1]**o + (-0.811311849855)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.547585039987*x[0]**o + (0.520143540732)*x[0] + (-0.446262665365)*x[1]**o + (0.243328449006)*x[1]
+        ref[(1, 2, 0, 2)]=-0.547585039987*x_ref[0]**o + (0.520143540732)*x_ref[0] + (-0.446262665365)*x_ref[1]**o + (0.243328449006)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.704404806442*x[0]**o + (-0.704778707087)*x[0] + (-0.565712661659)*x[1]**o + (0.946462302243)*x[1]
+        ref[(1, 2, 1, 0)]=-0.704404806442*x_ref[0]**o + (-0.704778707087)*x_ref[0] + (-0.565712661659)*x_ref[1]**o + (0.946462302243)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.571710609191*x[0]**o + (-0.0492346144272)*x[0] + (0.119546676394)*x[1]**o + (-0.993023565258)*x[1]
+        ref[(1, 2, 1, 1)]=0.571710609191*x_ref[0]**o + (-0.0492346144272)*x_ref[0] + (0.119546676394)*x_ref[1]**o + (-0.993023565258)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.869837265427*x[0]**o + (-0.0544514849216)*x[0] + (0.288000475587)*x[1]**o + (0.286001411095)*x[1]
+        ref[(1, 2, 1, 2)]=-0.869837265427*x_ref[0]**o + (-0.0544514849216)*x_ref[0] + (0.288000475587)*x_ref[1]**o + (0.286001411095)*x_ref[1]
+        arg[(1, 2, 2, 0)]=-0.743888006628*x[0]**o + (-0.00981252253807)*x[0] + (-0.642149621723)*x[1]**o + (-0.34863005022)*x[1]
+        ref[(1, 2, 2, 0)]=-0.743888006628*x_ref[0]**o + (-0.00981252253807)*x_ref[0] + (-0.642149621723)*x_ref[1]**o + (-0.34863005022)*x_ref[1]
+        arg[(1, 2, 2, 1)]=-0.386286679284*x[0]**o + (-0.187149941942)*x[0] + (-0.913587992103)*x[1]**o + (-0.339271706316)*x[1]
+        ref[(1, 2, 2, 1)]=-0.386286679284*x_ref[0]**o + (-0.187149941942)*x_ref[0] + (-0.913587992103)*x_ref[1]**o + (-0.339271706316)*x_ref[1]
+        arg[(1, 2, 2, 2)]=0.97923663002*x[0]**o + (-0.934597174121)*x[0] + (-0.377218721901)*x[1]**o + (-0.945422043855)*x[1]
+        ref[(1, 2, 2, 2)]=0.97923663002*x_ref[0]**o + (-0.934597174121)*x_ref[0] + (-0.377218721901)*x_ref[1]**o + (-0.945422043855)*x_ref[1]
+        arg[(1, 3, 0, 0)]=-0.710416522126*x[0]**o + (-0.692815002341)*x[0] + (-0.911369386564)*x[1]**o + (0.592054182229)*x[1]
+        ref[(1, 3, 0, 0)]=-0.710416522126*x_ref[0]**o + (-0.692815002341)*x_ref[0] + (-0.911369386564)*x_ref[1]**o + (0.592054182229)*x_ref[1]
+        arg[(1, 3, 0, 1)]=0.907588837853*x[0]**o + (0.994460145852)*x[0] + (0.739477496112)*x[1]**o + (-0.836237149936)*x[1]
+        ref[(1, 3, 0, 1)]=0.907588837853*x_ref[0]**o + (0.994460145852)*x_ref[0] + (0.739477496112)*x_ref[1]**o + (-0.836237149936)*x_ref[1]
+        arg[(1, 3, 0, 2)]=-0.635419547005*x[0]**o + (-0.783851484961)*x[0] + (-0.0610806639267)*x[1]**o + (-0.962782206351)*x[1]
+        ref[(1, 3, 0, 2)]=-0.635419547005*x_ref[0]**o + (-0.783851484961)*x_ref[0] + (-0.0610806639267)*x_ref[1]**o + (-0.962782206351)*x_ref[1]
+        arg[(1, 3, 1, 0)]=0.439317909852*x[0]**o + (-0.565283618192)*x[0] + (0.366820861337)*x[1]**o + (-0.701308283242)*x[1]
+        ref[(1, 3, 1, 0)]=0.439317909852*x_ref[0]**o + (-0.565283618192)*x_ref[0] + (0.366820861337)*x_ref[1]**o + (-0.701308283242)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.775764470437*x[0]**o + (0.990426958109)*x[0] + (-0.67770387023)*x[1]**o + (0.945234230227)*x[1]
+        ref[(1, 3, 1, 1)]=0.775764470437*x_ref[0]**o + (0.990426958109)*x_ref[0] + (-0.67770387023)*x_ref[1]**o + (0.945234230227)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.0793403866472*x[0]**o + (0.840175922467)*x[0] + (-0.209136557284)*x[1]**o + (0.414709752426)*x[1]
+        ref[(1, 3, 1, 2)]=0.0793403866472*x_ref[0]**o + (0.840175922467)*x_ref[0] + (-0.209136557284)*x_ref[1]**o + (0.414709752426)*x_ref[1]
+        arg[(1, 3, 2, 0)]=0.62267827376*x[0]**o + (0.943004813008)*x[0] + (-0.861859701074)*x[1]**o + (-0.990435808446)*x[1]
+        ref[(1, 3, 2, 0)]=0.62267827376*x_ref[0]**o + (0.943004813008)*x_ref[0] + (-0.861859701074)*x_ref[1]**o + (-0.990435808446)*x_ref[1]
+        arg[(1, 3, 2, 1)]=-0.238770689719*x[0]**o + (0.966024841681)*x[0] + (-0.963420737557)*x[1]**o + (-0.14362007818)*x[1]
+        ref[(1, 3, 2, 1)]=-0.238770689719*x_ref[0]**o + (0.966024841681)*x_ref[0] + (-0.963420737557)*x_ref[1]**o + (-0.14362007818)*x_ref[1]
+        arg[(1, 3, 2, 2)]=0.434852911545*x[0]**o + (0.814041824511)*x[0] + (-0.582952852198)*x[1]**o + (-0.55085367808)*x[1]
+        ref[(1, 3, 2, 2)]=0.434852911545*x_ref[0]**o + (0.814041824511)*x_ref[0] + (-0.582952852198)*x_ref[1]**o + (-0.55085367808)*x_ref[1]
+        arg[(2, 0, 0, 0)]=0.580594713244*x[0]**o + (-0.401874967959)*x[0] + (-0.41313036463)*x[1]**o + (-0.811294241457)*x[1]
+        ref[(2, 0, 0, 0)]=0.580594713244*x_ref[0]**o + (-0.401874967959)*x_ref[0] + (-0.41313036463)*x_ref[1]**o + (-0.811294241457)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.714917577328*x[0]**o + (0.0858682595996)*x[0] + (0.19130797189)*x[1]**o + (-0.783291244711)*x[1]
+        ref[(2, 0, 0, 1)]=0.714917577328*x_ref[0]**o + (0.0858682595996)*x_ref[0] + (0.19130797189)*x_ref[1]**o + (-0.783291244711)*x_ref[1]
+        arg[(2, 0, 0, 2)]=0.461778902526*x[0]**o + (-0.678434294822)*x[0] + (-0.101506479907)*x[1]**o + (0.148073409275)*x[1]
+        ref[(2, 0, 0, 2)]=0.461778902526*x_ref[0]**o + (-0.678434294822)*x_ref[0] + (-0.101506479907)*x_ref[1]**o + (0.148073409275)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.953982594056*x[0]**o + (-0.708926876449)*x[0] + (-0.964732545368)*x[1]**o + (-0.968066963447)*x[1]
+        ref[(2, 0, 1, 0)]=-0.953982594056*x_ref[0]**o + (-0.708926876449)*x_ref[0] + (-0.964732545368)*x_ref[1]**o + (-0.968066963447)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.751356260881*x[0]**o + (0.14681559692)*x[0] + (-0.368173534076)*x[1]**o + (0.452226751202)*x[1]
+        ref[(2, 0, 1, 1)]=0.751356260881*x_ref[0]**o + (0.14681559692)*x_ref[0] + (-0.368173534076)*x_ref[1]**o + (0.452226751202)*x_ref[1]
+        arg[(2, 0, 1, 2)]=-0.802851007596*x[0]**o + (-0.749200370174)*x[0] + (-0.822086827828)*x[1]**o + (-0.470688488051)*x[1]
+        ref[(2, 0, 1, 2)]=-0.802851007596*x_ref[0]**o + (-0.749200370174)*x_ref[0] + (-0.822086827828)*x_ref[1]**o + (-0.470688488051)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.0523744697569*x[0]**o + (0.110505219785)*x[0] + (-0.223694863988)*x[1]**o + (0.405086226285)*x[1]
+        ref[(2, 0, 2, 0)]=-0.0523744697569*x_ref[0]**o + (0.110505219785)*x_ref[0] + (-0.223694863988)*x_ref[1]**o + (0.405086226285)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.150479551933*x[0]**o + (0.740208919001)*x[0] + (-0.247700629559)*x[1]**o + (-0.422797820244)*x[1]
+        ref[(2, 0, 2, 1)]=0.150479551933*x_ref[0]**o + (0.740208919001)*x_ref[0] + (-0.247700629559)*x_ref[1]**o + (-0.422797820244)*x_ref[1]
+        arg[(2, 0, 2, 2)]=-0.339077918788*x[0]**o + (-0.118392013492)*x[0] + (0.0879029210813)*x[1]**o + (-0.541970963949)*x[1]
+        ref[(2, 0, 2, 2)]=-0.339077918788*x_ref[0]**o + (-0.118392013492)*x_ref[0] + (0.0879029210813)*x_ref[1]**o + (-0.541970963949)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.124226544823*x[0]**o + (-0.211768674138)*x[0] + (-0.0503951570569)*x[1]**o + (0.284719895208)*x[1]
+        ref[(2, 1, 0, 0)]=0.124226544823*x_ref[0]**o + (-0.211768674138)*x_ref[0] + (-0.0503951570569)*x_ref[1]**o + (0.284719895208)*x_ref[1]
+        arg[(2, 1, 0, 1)]=0.523440904179*x[0]**o + (-0.461659703853)*x[0] + (0.332619231146)*x[1]**o + (-0.856749673391)*x[1]
+        ref[(2, 1, 0, 1)]=0.523440904179*x_ref[0]**o + (-0.461659703853)*x_ref[0] + (0.332619231146)*x_ref[1]**o + (-0.856749673391)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.775181458608*x[0]**o + (0.843333333523)*x[0] + (0.701113730955)*x[1]**o + (-0.370655253721)*x[1]
+        ref[(2, 1, 0, 2)]=-0.775181458608*x_ref[0]**o + (0.843333333523)*x_ref[0] + (0.701113730955)*x_ref[1]**o + (-0.370655253721)*x_ref[1]
+        arg[(2, 1, 1, 0)]=-0.455314847554*x[0]**o + (0.845229477355)*x[0] + (-0.603658088914)*x[1]**o + (0.704975334396)*x[1]
+        ref[(2, 1, 1, 0)]=-0.455314847554*x_ref[0]**o + (0.845229477355)*x_ref[0] + (-0.603658088914)*x_ref[1]**o + (0.704975334396)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.850616071792*x[0]**o + (-0.902187202743)*x[0] + (-0.854571946272)*x[1]**o + (-0.963318732788)*x[1]
+        ref[(2, 1, 1, 1)]=-0.850616071792*x_ref[0]**o + (-0.902187202743)*x_ref[0] + (-0.854571946272)*x_ref[1]**o + (-0.963318732788)*x_ref[1]
+        arg[(2, 1, 1, 2)]=-0.544048457739*x[0]**o + (-0.456985802082)*x[0] + (-0.0568441648202)*x[1]**o + (-0.950060951978)*x[1]
+        ref[(2, 1, 1, 2)]=-0.544048457739*x_ref[0]**o + (-0.456985802082)*x_ref[0] + (-0.0568441648202)*x_ref[1]**o + (-0.950060951978)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.356220620391*x[0]**o + (0.679841162821)*x[0] + (0.119739341139)*x[1]**o + (-0.741383485959)*x[1]
+        ref[(2, 1, 2, 0)]=-0.356220620391*x_ref[0]**o + (0.679841162821)*x_ref[0] + (0.119739341139)*x_ref[1]**o + (-0.741383485959)*x_ref[1]
+        arg[(2, 1, 2, 1)]=-0.871022581124*x[0]**o + (-0.768150935293)*x[0] + (-0.59413131754)*x[1]**o + (-0.603343017339)*x[1]
+        ref[(2, 1, 2, 1)]=-0.871022581124*x_ref[0]**o + (-0.768150935293)*x_ref[0] + (-0.59413131754)*x_ref[1]**o + (-0.603343017339)*x_ref[1]
+        arg[(2, 1, 2, 2)]=-0.0172304697641*x[0]**o + (0.741903067652)*x[0] + (0.630932334274)*x[1]**o + (-0.547328212577)*x[1]
+        ref[(2, 1, 2, 2)]=-0.0172304697641*x_ref[0]**o + (0.741903067652)*x_ref[0] + (0.630932334274)*x_ref[1]**o + (-0.547328212577)*x_ref[1]
+        arg[(2, 2, 0, 0)]=0.31918301081*x[0]**o + (-0.671428888522)*x[0] + (0.15821521073)*x[1]**o + (0.635584059912)*x[1]
+        ref[(2, 2, 0, 0)]=0.31918301081*x_ref[0]**o + (-0.671428888522)*x_ref[0] + (0.15821521073)*x_ref[1]**o + (0.635584059912)*x_ref[1]
+        arg[(2, 2, 0, 1)]=0.735578457757*x[0]**o + (0.328122568816)*x[0] + (0.802279332362)*x[1]**o + (0.560719803324)*x[1]
+        ref[(2, 2, 0, 1)]=0.735578457757*x_ref[0]**o + (0.328122568816)*x_ref[0] + (0.802279332362)*x_ref[1]**o + (0.560719803324)*x_ref[1]
+        arg[(2, 2, 0, 2)]=0.979247702166*x[0]**o + (-0.31560727465)*x[0] + (-0.508223610187)*x[1]**o + (0.366134200137)*x[1]
+        ref[(2, 2, 0, 2)]=0.979247702166*x_ref[0]**o + (-0.31560727465)*x_ref[0] + (-0.508223610187)*x_ref[1]**o + (0.366134200137)*x_ref[1]
+        arg[(2, 2, 1, 0)]=-0.84781047353*x[0]**o + (0.399035700392)*x[0] + (-0.194334000332)*x[1]**o + (-0.360142802053)*x[1]
+        ref[(2, 2, 1, 0)]=-0.84781047353*x_ref[0]**o + (0.399035700392)*x_ref[0] + (-0.194334000332)*x_ref[1]**o + (-0.360142802053)*x_ref[1]
+        arg[(2, 2, 1, 1)]=0.807302428418*x[0]**o + (0.45499413872)*x[0] + (0.0367864566206)*x[1]**o + (-0.261163229873)*x[1]
+        ref[(2, 2, 1, 1)]=0.807302428418*x_ref[0]**o + (0.45499413872)*x_ref[0] + (0.0367864566206)*x_ref[1]**o + (-0.261163229873)*x_ref[1]
+        arg[(2, 2, 1, 2)]=-0.148083929062*x[0]**o + (-0.709220978278)*x[0] + (-0.100272312119)*x[1]**o + (0.201118977985)*x[1]
+        ref[(2, 2, 1, 2)]=-0.148083929062*x_ref[0]**o + (-0.709220978278)*x_ref[0] + (-0.100272312119)*x_ref[1]**o + (0.201118977985)*x_ref[1]
+        arg[(2, 2, 2, 0)]=-0.364306657969*x[0]**o + (0.396578813207)*x[0] + (-0.293227493463)*x[1]**o + (-0.01809654143)*x[1]
+        ref[(2, 2, 2, 0)]=-0.364306657969*x_ref[0]**o + (0.396578813207)*x_ref[0] + (-0.293227493463)*x_ref[1]**o + (-0.01809654143)*x_ref[1]
+        arg[(2, 2, 2, 1)]=0.944748960504*x[0]**o + (0.249225762763)*x[0] + (-0.979719385941)*x[1]**o + (-0.186459204587)*x[1]
+        ref[(2, 2, 2, 1)]=0.944748960504*x_ref[0]**o + (0.249225762763)*x_ref[0] + (-0.979719385941)*x_ref[1]**o + (-0.186459204587)*x_ref[1]
+        arg[(2, 2, 2, 2)]=-0.797746080904*x[0]**o + (-0.724415004932)*x[0] + (0.498439162262)*x[1]**o + (-0.934158653089)*x[1]
+        ref[(2, 2, 2, 2)]=-0.797746080904*x_ref[0]**o + (-0.724415004932)*x_ref[0] + (0.498439162262)*x_ref[1]**o + (-0.934158653089)*x_ref[1]
+        arg[(2, 3, 0, 0)]=0.212494337021*x[0]**o + (-0.753151610418)*x[0] + (-0.969069346225)*x[1]**o + (-0.978565219972)*x[1]
+        ref[(2, 3, 0, 0)]=0.212494337021*x_ref[0]**o + (-0.753151610418)*x_ref[0] + (-0.969069346225)*x_ref[1]**o + (-0.978565219972)*x_ref[1]
+        arg[(2, 3, 0, 1)]=-0.24040760034*x[0]**o + (-0.109154576802)*x[0] + (0.503078202889)*x[1]**o + (0.539435107634)*x[1]
+        ref[(2, 3, 0, 1)]=-0.24040760034*x_ref[0]**o + (-0.109154576802)*x_ref[0] + (0.503078202889)*x_ref[1]**o + (0.539435107634)*x_ref[1]
+        arg[(2, 3, 0, 2)]=0.357971073288*x[0]**o + (-0.878077731275)*x[0] + (-0.618243193369)*x[1]**o + (0.401615353141)*x[1]
+        ref[(2, 3, 0, 2)]=0.357971073288*x_ref[0]**o + (-0.878077731275)*x_ref[0] + (-0.618243193369)*x_ref[1]**o + (0.401615353141)*x_ref[1]
+        arg[(2, 3, 1, 0)]=-0.00156241575712*x[0]**o + (0.190144202132)*x[0] + (-0.435545291702)*x[1]**o + (0.783268308406)*x[1]
+        ref[(2, 3, 1, 0)]=-0.00156241575712*x_ref[0]**o + (0.190144202132)*x_ref[0] + (-0.435545291702)*x_ref[1]**o + (0.783268308406)*x_ref[1]
+        arg[(2, 3, 1, 1)]=-0.322937055121*x[0]**o + (0.180331166133)*x[0] + (-0.837416147609)*x[1]**o + (0.872481727551)*x[1]
+        ref[(2, 3, 1, 1)]=-0.322937055121*x_ref[0]**o + (0.180331166133)*x_ref[0] + (-0.837416147609)*x_ref[1]**o + (0.872481727551)*x_ref[1]
+        arg[(2, 3, 1, 2)]=-0.671447704487*x[0]**o + (0.394789854499)*x[0] + (0.0796371334856)*x[1]**o + (0.858618044377)*x[1]
+        ref[(2, 3, 1, 2)]=-0.671447704487*x_ref[0]**o + (0.394789854499)*x_ref[0] + (0.0796371334856)*x_ref[1]**o + (0.858618044377)*x_ref[1]
+        arg[(2, 3, 2, 0)]=0.0824083164867*x[0]**o + (0.865017710513)*x[0] + (-0.498853867835)*x[1]**o + (-0.870448818938)*x[1]
+        ref[(2, 3, 2, 0)]=0.0824083164867*x_ref[0]**o + (0.865017710513)*x_ref[0] + (-0.498853867835)*x_ref[1]**o + (-0.870448818938)*x_ref[1]
+        arg[(2, 3, 2, 1)]=0.0528787105556*x[0]**o + (0.707528409176)*x[0] + (-0.153871387425)*x[1]**o + (0.456671161014)*x[1]
+        ref[(2, 3, 2, 1)]=0.0528787105556*x_ref[0]**o + (0.707528409176)*x_ref[0] + (-0.153871387425)*x_ref[1]**o + (0.456671161014)*x_ref[1]
+        arg[(2, 3, 2, 2)]=-0.993679065842*x[0]**o + (0.934175345278)*x[0] + (0.486141426652)*x[1]**o + (0.683865056896)*x[1]
+        ref[(2, 3, 2, 2)]=-0.993679065842*x_ref[0]**o + (0.934175345278)*x_ref[0] + (0.486141426652)*x_ref[1]**o + (0.683865056896)*x_ref[1]
+        arg[(3, 0, 0, 0)]=0.452066887441*x[0]**o + (-0.695473732892)*x[0] + (0.570092759457)*x[1]**o + (0.55915994027)*x[1]
+        ref[(3, 0, 0, 0)]=0.452066887441*x_ref[0]**o + (-0.695473732892)*x_ref[0] + (0.570092759457)*x_ref[1]**o + (0.55915994027)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.815107614924*x[0]**o + (-0.473232292032)*x[0] + (-0.305018607879)*x[1]**o + (-0.187859026405)*x[1]
+        ref[(3, 0, 0, 1)]=-0.815107614924*x_ref[0]**o + (-0.473232292032)*x_ref[0] + (-0.305018607879)*x_ref[1]**o + (-0.187859026405)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.665946412399*x[0]**o + (0.865328521311)*x[0] + (-0.00487269217181)*x[1]**o + (0.850742871661)*x[1]
+        ref[(3, 0, 0, 2)]=-0.665946412399*x_ref[0]**o + (0.865328521311)*x_ref[0] + (-0.00487269217181)*x_ref[1]**o + (0.850742871661)*x_ref[1]
+        arg[(3, 0, 1, 0)]=-0.52917106747*x[0]**o + (-0.979234823461)*x[0] + (-0.548893450609)*x[1]**o + (0.625992454069)*x[1]
+        ref[(3, 0, 1, 0)]=-0.52917106747*x_ref[0]**o + (-0.979234823461)*x_ref[0] + (-0.548893450609)*x_ref[1]**o + (0.625992454069)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.0498934640033*x[0]**o + (0.474987526172)*x[0] + (-0.101983622537)*x[1]**o + (-0.974760085753)*x[1]
+        ref[(3, 0, 1, 1)]=-0.0498934640033*x_ref[0]**o + (0.474987526172)*x_ref[0] + (-0.101983622537)*x_ref[1]**o + (-0.974760085753)*x_ref[1]
+        arg[(3, 0, 1, 2)]=0.638027974769*x[0]**o + (-0.458805418128)*x[0] + (0.481975731758)*x[1]**o + (-0.4072433282)*x[1]
+        ref[(3, 0, 1, 2)]=0.638027974769*x_ref[0]**o + (-0.458805418128)*x_ref[0] + (0.481975731758)*x_ref[1]**o + (-0.4072433282)*x_ref[1]
+        arg[(3, 0, 2, 0)]=0.999583661192*x[0]**o + (0.624262941021)*x[0] + (-0.838820358302)*x[1]**o + (0.0715742259912)*x[1]
+        ref[(3, 0, 2, 0)]=0.999583661192*x_ref[0]**o + (0.624262941021)*x_ref[0] + (-0.838820358302)*x_ref[1]**o + (0.0715742259912)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.446200385024*x[0]**o + (-0.549090078966)*x[0] + (-0.792135718394)*x[1]**o + (0.410376496134)*x[1]
+        ref[(3, 0, 2, 1)]=0.446200385024*x_ref[0]**o + (-0.549090078966)*x_ref[0] + (-0.792135718394)*x_ref[1]**o + (0.410376496134)*x_ref[1]
+        arg[(3, 0, 2, 2)]=-0.675658058869*x[0]**o + (0.862230932168)*x[0] + (-0.0399155516966)*x[1]**o + (-0.572789524474)*x[1]
+        ref[(3, 0, 2, 2)]=-0.675658058869*x_ref[0]**o + (0.862230932168)*x_ref[0] + (-0.0399155516966)*x_ref[1]**o + (-0.572789524474)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.429113319096*x[0]**o + (0.295311592128)*x[0] + (-0.715582852707)*x[1]**o + (-0.114975160446)*x[1]
+        ref[(3, 1, 0, 0)]=-0.429113319096*x_ref[0]**o + (0.295311592128)*x_ref[0] + (-0.715582852707)*x_ref[1]**o + (-0.114975160446)*x_ref[1]
+        arg[(3, 1, 0, 1)]=0.16068882895*x[0]**o + (-0.318575924516)*x[0] + (-0.509686148317)*x[1]**o + (-0.72338150462)*x[1]
+        ref[(3, 1, 0, 1)]=0.16068882895*x_ref[0]**o + (-0.318575924516)*x_ref[0] + (-0.509686148317)*x_ref[1]**o + (-0.72338150462)*x_ref[1]
+        arg[(3, 1, 0, 2)]=-0.312580387808*x[0]**o + (-0.7614611254)*x[0] + (0.0224698271887)*x[1]**o + (-0.414227837581)*x[1]
+        ref[(3, 1, 0, 2)]=-0.312580387808*x_ref[0]**o + (-0.7614611254)*x_ref[0] + (0.0224698271887)*x_ref[1]**o + (-0.414227837581)*x_ref[1]
+        arg[(3, 1, 1, 0)]=0.729930183926*x[0]**o + (0.249224709445)*x[0] + (0.282842037974)*x[1]**o + (0.79897595749)*x[1]
+        ref[(3, 1, 1, 0)]=0.729930183926*x_ref[0]**o + (0.249224709445)*x_ref[0] + (0.282842037974)*x_ref[1]**o + (0.79897595749)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.358317453384*x[0]**o + (0.456776281446)*x[0] + (0.738592504463)*x[1]**o + (0.139021189966)*x[1]
+        ref[(3, 1, 1, 1)]=-0.358317453384*x_ref[0]**o + (0.456776281446)*x_ref[0] + (0.738592504463)*x_ref[1]**o + (0.139021189966)*x_ref[1]
+        arg[(3, 1, 1, 2)]=-0.290463935518*x[0]**o + (0.247760437242)*x[0] + (0.355414047847)*x[1]**o + (-0.43632077343)*x[1]
+        ref[(3, 1, 1, 2)]=-0.290463935518*x_ref[0]**o + (0.247760437242)*x_ref[0] + (0.355414047847)*x_ref[1]**o + (-0.43632077343)*x_ref[1]
+        arg[(3, 1, 2, 0)]=-0.355592475462*x[0]**o + (-0.565946370101)*x[0] + (-0.809286193079)*x[1]**o + (0.322944241314)*x[1]
+        ref[(3, 1, 2, 0)]=-0.355592475462*x_ref[0]**o + (-0.565946370101)*x_ref[0] + (-0.809286193079)*x_ref[1]**o + (0.322944241314)*x_ref[1]
+        arg[(3, 1, 2, 1)]=-0.241748837647*x[0]**o + (0.245859421319)*x[0] + (-0.919452815578)*x[1]**o + (-0.783444451589)*x[1]
+        ref[(3, 1, 2, 1)]=-0.241748837647*x_ref[0]**o + (0.245859421319)*x_ref[0] + (-0.919452815578)*x_ref[1]**o + (-0.783444451589)*x_ref[1]
+        arg[(3, 1, 2, 2)]=0.77548942199*x[0]**o + (-0.143188654788)*x[0] + (0.723569536666)*x[1]**o + (-0.644931342934)*x[1]
+        ref[(3, 1, 2, 2)]=0.77548942199*x_ref[0]**o + (-0.143188654788)*x_ref[0] + (0.723569536666)*x_ref[1]**o + (-0.644931342934)*x_ref[1]
+        arg[(3, 2, 0, 0)]=0.405396172867*x[0]**o + (-0.107329157922)*x[0] + (0.76346533969)*x[1]**o + (0.297982839964)*x[1]
+        ref[(3, 2, 0, 0)]=0.405396172867*x_ref[0]**o + (-0.107329157922)*x_ref[0] + (0.76346533969)*x_ref[1]**o + (0.297982839964)*x_ref[1]
+        arg[(3, 2, 0, 1)]=-0.0944765997802*x[0]**o + (0.0606619076861)*x[0] + (-0.166778004425)*x[1]**o + (0.69692410422)*x[1]
+        ref[(3, 2, 0, 1)]=-0.0944765997802*x_ref[0]**o + (0.0606619076861)*x_ref[0] + (-0.166778004425)*x_ref[1]**o + (0.69692410422)*x_ref[1]
+        arg[(3, 2, 0, 2)]=-0.89130791008*x[0]**o + (-0.555787398572)*x[0] + (-0.650607248839)*x[1]**o + (-0.875978037051)*x[1]
+        ref[(3, 2, 0, 2)]=-0.89130791008*x_ref[0]**o + (-0.555787398572)*x_ref[0] + (-0.650607248839)*x_ref[1]**o + (-0.875978037051)*x_ref[1]
+        arg[(3, 2, 1, 0)]=-0.867264407642*x[0]**o + (0.0253504045218)*x[0] + (-0.572899876767)*x[1]**o + (-0.0415750459123)*x[1]
+        ref[(3, 2, 1, 0)]=-0.867264407642*x_ref[0]**o + (0.0253504045218)*x_ref[0] + (-0.572899876767)*x_ref[1]**o + (-0.0415750459123)*x_ref[1]
+        arg[(3, 2, 1, 1)]=0.560445537243*x[0]**o + (-0.223802896332)*x[0] + (-0.643657873112)*x[1]**o + (0.150405265235)*x[1]
+        ref[(3, 2, 1, 1)]=0.560445537243*x_ref[0]**o + (-0.223802896332)*x_ref[0] + (-0.643657873112)*x_ref[1]**o + (0.150405265235)*x_ref[1]
+        arg[(3, 2, 1, 2)]=-0.745092674197*x[0]**o + (0.600540496562)*x[0] + (-0.869100994697)*x[1]**o + (0.377343812469)*x[1]
+        ref[(3, 2, 1, 2)]=-0.745092674197*x_ref[0]**o + (0.600540496562)*x_ref[0] + (-0.869100994697)*x_ref[1]**o + (0.377343812469)*x_ref[1]
+        arg[(3, 2, 2, 0)]=-0.881892340397*x[0]**o + (-0.295007566766)*x[0] + (-0.126838280388)*x[1]**o + (-0.474964683925)*x[1]
+        ref[(3, 2, 2, 0)]=-0.881892340397*x_ref[0]**o + (-0.295007566766)*x_ref[0] + (-0.126838280388)*x_ref[1]**o + (-0.474964683925)*x_ref[1]
+        arg[(3, 2, 2, 1)]=-0.348330961991*x[0]**o + (-0.820204057104)*x[0] + (-0.517588088468)*x[1]**o + (0.74535448394)*x[1]
+        ref[(3, 2, 2, 1)]=-0.348330961991*x_ref[0]**o + (-0.820204057104)*x_ref[0] + (-0.517588088468)*x_ref[1]**o + (0.74535448394)*x_ref[1]
+        arg[(3, 2, 2, 2)]=-0.965130837913*x[0]**o + (0.352980982433)*x[0] + (0.780553860564)*x[1]**o + (-0.0313987846668)*x[1]
+        ref[(3, 2, 2, 2)]=-0.965130837913*x_ref[0]**o + (0.352980982433)*x_ref[0] + (0.780553860564)*x_ref[1]**o + (-0.0313987846668)*x_ref[1]
+        arg[(3, 3, 0, 0)]=0.523617719015*x[0]**o + (-0.175248245533)*x[0] + (0.588768637049)*x[1]**o + (0.720562365696)*x[1]
+        ref[(3, 3, 0, 0)]=0.523617719015*x_ref[0]**o + (-0.175248245533)*x_ref[0] + (0.588768637049)*x_ref[1]**o + (0.720562365696)*x_ref[1]
+        arg[(3, 3, 0, 1)]=0.437730665202*x[0]**o + (-0.220638654529)*x[0] + (-0.406515741936)*x[1]**o + (-0.929753943596)*x[1]
+        ref[(3, 3, 0, 1)]=0.437730665202*x_ref[0]**o + (-0.220638654529)*x_ref[0] + (-0.406515741936)*x_ref[1]**o + (-0.929753943596)*x_ref[1]
+        arg[(3, 3, 0, 2)]=-0.899469211474*x[0]**o + (-0.740651836136)*x[0] + (-0.530765693227)*x[1]**o + (-0.566823930796)*x[1]
+        ref[(3, 3, 0, 2)]=-0.899469211474*x_ref[0]**o + (-0.740651836136)*x_ref[0] + (-0.530765693227)*x_ref[1]**o + (-0.566823930796)*x_ref[1]
+        arg[(3, 3, 1, 0)]=0.979730224219*x[0]**o + (-0.279998504784)*x[0] + (0.97422976287)*x[1]**o + (-0.475914911378)*x[1]
+        ref[(3, 3, 1, 0)]=0.979730224219*x_ref[0]**o + (-0.279998504784)*x_ref[0] + (0.97422976287)*x_ref[1]**o + (-0.475914911378)*x_ref[1]
+        arg[(3, 3, 1, 1)]=0.832592196005*x[0]**o + (0.591272846843)*x[0] + (0.980256707769)*x[1]**o + (0.656626012494)*x[1]
+        ref[(3, 3, 1, 1)]=0.832592196005*x_ref[0]**o + (0.591272846843)*x_ref[0] + (0.980256707769)*x_ref[1]**o + (0.656626012494)*x_ref[1]
+        arg[(3, 3, 1, 2)]=0.160777570193*x[0]**o + (-0.644965677963)*x[0] + (0.531557651065)*x[1]**o + (0.109146774056)*x[1]
+        ref[(3, 3, 1, 2)]=0.160777570193*x_ref[0]**o + (-0.644965677963)*x_ref[0] + (0.531557651065)*x_ref[1]**o + (0.109146774056)*x_ref[1]
+        arg[(3, 3, 2, 0)]=0.250038873776*x[0]**o + (-0.270774413342)*x[0] + (0.411670520311)*x[1]**o + (-0.632129775653)*x[1]
+        ref[(3, 3, 2, 0)]=0.250038873776*x_ref[0]**o + (-0.270774413342)*x_ref[0] + (0.411670520311)*x_ref[1]**o + (-0.632129775653)*x_ref[1]
+        arg[(3, 3, 2, 1)]=0.660138197466*x[0]**o + (0.593650866411)*x[0] + (0.233583760032)*x[1]**o + (0.584687942334)*x[1]
+        ref[(3, 3, 2, 1)]=0.660138197466*x_ref[0]**o + (0.593650866411)*x_ref[0] + (0.233583760032)*x_ref[1]**o + (0.584687942334)*x_ref[1]
+        arg[(3, 3, 2, 2)]=0.534077861503*x[0]**o + (0.867610241545)*x[0] + (0.301155006582)*x[1]**o + (0.203602440982)*x[1]
+        ref[(3, 3, 2, 2)]=0.534077861503*x_ref[0]**o + (0.867610241545)*x_ref[0] + (0.301155006582)*x_ref[1]**o + (0.203602440982)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.344889218877*x[2]**o + (0.897479076066)*x[2]
+            ref[(0, 0, 0, 0)]+=0.344889218877*x_ref[2]**o + (0.897479076066)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.465596080015*x[2]**o + (0.487043036439)*x[2]
+            ref[(0, 0, 0, 1)]+=0.465596080015*x_ref[2]**o + (0.487043036439)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.549754914203*x[2]**o + (-0.980609299342)*x[2]
+            ref[(0, 0, 0, 2)]+=0.549754914203*x_ref[2]**o + (-0.980609299342)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=0.600475012483*x[2]**o + (0.91762164965)*x[2]
+            ref[(0, 0, 1, 0)]+=0.600475012483*x_ref[2]**o + (0.91762164965)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.509679525854*x[2]**o + (0.422051856083)*x[2]
+            ref[(0, 0, 1, 1)]+=-0.509679525854*x_ref[2]**o + (0.422051856083)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.319409305768*x[2]**o + (-0.964953097518)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.319409305768*x_ref[2]**o + (-0.964953097518)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=-0.309544820436*x[2]**o + (-0.415760108087)*x[2]
+            ref[(0, 0, 2, 0)]+=-0.309544820436*x_ref[2]**o + (-0.415760108087)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.829585418235*x[2]**o + (-0.487263329245)*x[2]
+            ref[(0, 0, 2, 1)]+=-0.829585418235*x_ref[2]**o + (-0.487263329245)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=0.397937351829*x[2]**o + (0.804392603433)*x[2]
+            ref[(0, 0, 2, 2)]+=0.397937351829*x_ref[2]**o + (0.804392603433)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.00986650618863*x[2]**o + (-0.318740882772)*x[2]
+            ref[(0, 1, 0, 0)]+=0.00986650618863*x_ref[2]**o + (-0.318740882772)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.170936481747*x[2]**o + (0.0936698061411)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.170936481747*x_ref[2]**o + (0.0936698061411)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.713166814727*x[2]**o + (-0.564585972608)*x[2]
+            ref[(0, 1, 0, 2)]+=0.713166814727*x_ref[2]**o + (-0.564585972608)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=-0.205204717099*x[2]**o + (0.348182796734)*x[2]
+            ref[(0, 1, 1, 0)]+=-0.205204717099*x_ref[2]**o + (0.348182796734)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.583402950379*x[2]**o + (0.055767362638)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.583402950379*x_ref[2]**o + (0.055767362638)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.222702326743*x[2]**o + (-0.71632379523)*x[2]
+            ref[(0, 1, 1, 2)]+=-0.222702326743*x_ref[2]**o + (-0.71632379523)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.721083131033*x[2]**o + (-0.149464481818)*x[2]
+            ref[(0, 1, 2, 0)]+=-0.721083131033*x_ref[2]**o + (-0.149464481818)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.376407483378*x[2]**o + (0.724939997231)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.376407483378*x_ref[2]**o + (0.724939997231)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=-0.860712116828*x[2]**o + (-0.807216516275)*x[2]
+            ref[(0, 1, 2, 2)]+=-0.860712116828*x_ref[2]**o + (-0.807216516275)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.568188579732*x[2]**o + (-0.027325784189)*x[2]
+            ref[(0, 2, 0, 0)]+=0.568188579732*x_ref[2]**o + (-0.027325784189)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.977745642966*x[2]**o + (-0.208930870224)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.977745642966*x_ref[2]**o + (-0.208930870224)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.359919165088*x[2]**o + (-0.399538000253)*x[2]
+            ref[(0, 2, 0, 2)]+=0.359919165088*x_ref[2]**o + (-0.399538000253)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.430228961766*x[2]**o + (-0.288443823952)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.430228961766*x_ref[2]**o + (-0.288443823952)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.851053342563*x[2]**o + (-0.851105645897)*x[2]
+            ref[(0, 2, 1, 1)]+=0.851053342563*x_ref[2]**o + (-0.851105645897)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.460486968138*x[2]**o + (-0.916283949778)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.460486968138*x_ref[2]**o + (-0.916283949778)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.744667384611*x[2]**o + (0.634879827622)*x[2]
+            ref[(0, 2, 2, 0)]+=0.744667384611*x_ref[2]**o + (0.634879827622)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=-0.447843540455*x[2]**o + (0.0741085331183)*x[2]
+            ref[(0, 2, 2, 1)]+=-0.447843540455*x_ref[2]**o + (0.0741085331183)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=-0.681381692837*x[2]**o + (-0.662403984942)*x[2]
+            ref[(0, 2, 2, 2)]+=-0.681381692837*x_ref[2]**o + (-0.662403984942)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=-0.0977489322069*x[2]**o + (-0.370852022753)*x[2]
+            ref[(0, 3, 0, 0)]+=-0.0977489322069*x_ref[2]**o + (-0.370852022753)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.265229719546*x[2]**o + (0.734213844159)*x[2]
+            ref[(0, 3, 0, 1)]+=0.265229719546*x_ref[2]**o + (0.734213844159)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=0.840435927738*x[2]**o + (0.62818321566)*x[2]
+            ref[(0, 3, 0, 2)]+=0.840435927738*x_ref[2]**o + (0.62818321566)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.503468010059*x[2]**o + (-0.537056323055)*x[2]
+            ref[(0, 3, 1, 0)]+=0.503468010059*x_ref[2]**o + (-0.537056323055)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.882466467165*x[2]**o + (0.132589068997)*x[2]
+            ref[(0, 3, 1, 1)]+=0.882466467165*x_ref[2]**o + (0.132589068997)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.735032774076*x[2]**o + (-0.931519495339)*x[2]
+            ref[(0, 3, 1, 2)]+=0.735032774076*x_ref[2]**o + (-0.931519495339)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=-0.523829095706*x[2]**o + (-0.416054473508)*x[2]
+            ref[(0, 3, 2, 0)]+=-0.523829095706*x_ref[2]**o + (-0.416054473508)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.529546898656*x[2]**o + (0.554202574721)*x[2]
+            ref[(0, 3, 2, 1)]+=-0.529546898656*x_ref[2]**o + (0.554202574721)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.0374445446333*x[2]**o + (0.618602286922)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.0374445446333*x_ref[2]**o + (0.618602286922)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.452295779819*x[2]**o + (0.891146153059)*x[2]
+            ref[(1, 0, 0, 0)]+=0.452295779819*x_ref[2]**o + (0.891146153059)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.0761192907315*x[2]**o + (-0.392611632906)*x[2]
+            ref[(1, 0, 0, 1)]+=-0.0761192907315*x_ref[2]**o + (-0.392611632906)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.418514822508*x[2]**o + (-0.887311498033)*x[2]
+            ref[(1, 0, 0, 2)]+=0.418514822508*x_ref[2]**o + (-0.887311498033)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.933738063291*x[2]**o + (-0.643872812941)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.933738063291*x_ref[2]**o + (-0.643872812941)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.0150475678842*x[2]**o + (0.073756467564)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.0150475678842*x_ref[2]**o + (0.073756467564)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.0533022361014*x[2]**o + (0.652186115307)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.0533022361014*x_ref[2]**o + (0.652186115307)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=0.850388220921*x[2]**o + (0.664102332346)*x[2]
+            ref[(1, 0, 2, 0)]+=0.850388220921*x_ref[2]**o + (0.664102332346)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.500935662812*x[2]**o + (0.339898895682)*x[2]
+            ref[(1, 0, 2, 1)]+=-0.500935662812*x_ref[2]**o + (0.339898895682)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.0552944023408*x[2]**o + (0.890363246497)*x[2]
+            ref[(1, 0, 2, 2)]+=0.0552944023408*x_ref[2]**o + (0.890363246497)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.0890987358538*x[2]**o + (-0.970875798606)*x[2]
+            ref[(1, 1, 0, 0)]+=0.0890987358538*x_ref[2]**o + (-0.970875798606)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.750955074103*x[2]**o + (-0.72730217464)*x[2]
+            ref[(1, 1, 0, 1)]+=0.750955074103*x_ref[2]**o + (-0.72730217464)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.031885862369*x[2]**o + (-0.841655574218)*x[2]
+            ref[(1, 1, 0, 2)]+=0.031885862369*x_ref[2]**o + (-0.841655574218)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.772125867824*x[2]**o + (-0.616757689818)*x[2]
+            ref[(1, 1, 1, 0)]+=0.772125867824*x_ref[2]**o + (-0.616757689818)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.657134018325*x[2]**o + (-0.912183573123)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.657134018325*x_ref[2]**o + (-0.912183573123)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.294626993944*x[2]**o + (-0.542128153711)*x[2]
+            ref[(1, 1, 1, 2)]+=0.294626993944*x_ref[2]**o + (-0.542128153711)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.106589015741*x[2]**o + (0.00371148399166)*x[2]
+            ref[(1, 1, 2, 0)]+=-0.106589015741*x_ref[2]**o + (0.00371148399166)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.438909288651*x[2]**o + (0.91499367774)*x[2]
+            ref[(1, 1, 2, 1)]+=0.438909288651*x_ref[2]**o + (0.91499367774)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.02255587083*x[2]**o + (-0.806368757835)*x[2]
+            ref[(1, 1, 2, 2)]+=0.02255587083*x_ref[2]**o + (-0.806368757835)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.548971574546*x[2]**o + (-0.125091497077)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.548971574546*x_ref[2]**o + (-0.125091497077)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.432251279586*x[2]**o + (0.00875781187435)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.432251279586*x_ref[2]**o + (0.00875781187435)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.282690901597*x[2]**o + (-0.345539741423)*x[2]
+            ref[(1, 2, 0, 2)]+=0.282690901597*x_ref[2]**o + (-0.345539741423)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=-0.463049212889*x[2]**o + (-0.618979903371)*x[2]
+            ref[(1, 2, 1, 0)]+=-0.463049212889*x_ref[2]**o + (-0.618979903371)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.810073534772*x[2]**o + (-0.755049222598)*x[2]
+            ref[(1, 2, 1, 1)]+=0.810073534772*x_ref[2]**o + (-0.755049222598)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.232640507314*x[2]**o + (-0.435895765756)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.232640507314*x_ref[2]**o + (-0.435895765756)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=0.170733013798*x[2]**o + (0.661116598308)*x[2]
+            ref[(1, 2, 2, 0)]+=0.170733013798*x_ref[2]**o + (0.661116598308)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=0.707149815239*x[2]**o + (-0.82507878369)*x[2]
+            ref[(1, 2, 2, 1)]+=0.707149815239*x_ref[2]**o + (-0.82507878369)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=0.189241543155*x[2]**o + (-0.820912487211)*x[2]
+            ref[(1, 2, 2, 2)]+=0.189241543155*x_ref[2]**o + (-0.820912487211)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=0.484044792316*x[2]**o + (-0.446629192475)*x[2]
+            ref[(1, 3, 0, 0)]+=0.484044792316*x_ref[2]**o + (-0.446629192475)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.00171819334611*x[2]**o + (0.480653390778)*x[2]
+            ref[(1, 3, 0, 1)]+=0.00171819334611*x_ref[2]**o + (0.480653390778)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.739740002094*x[2]**o + (0.464395874461)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.739740002094*x_ref[2]**o + (0.464395874461)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.391905403051*x[2]**o + (-0.704183406959)*x[2]
+            ref[(1, 3, 1, 0)]+=0.391905403051*x_ref[2]**o + (-0.704183406959)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=-0.557053386356*x[2]**o + (-0.954648161773)*x[2]
+            ref[(1, 3, 1, 1)]+=-0.557053386356*x_ref[2]**o + (-0.954648161773)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.802123765656*x[2]**o + (-0.957526807407)*x[2]
+            ref[(1, 3, 1, 2)]+=0.802123765656*x_ref[2]**o + (-0.957526807407)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=-0.79903077215*x[2]**o + (-0.167037977527)*x[2]
+            ref[(1, 3, 2, 0)]+=-0.79903077215*x_ref[2]**o + (-0.167037977527)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=0.056893038986*x[2]**o + (0.888067562632)*x[2]
+            ref[(1, 3, 2, 1)]+=0.056893038986*x_ref[2]**o + (0.888067562632)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=-0.389756531267*x[2]**o + (0.538467370975)*x[2]
+            ref[(1, 3, 2, 2)]+=-0.389756531267*x_ref[2]**o + (0.538467370975)*x_ref[2]
+            arg[(2, 0, 0, 0)]+=-0.934694162147*x[2]**o + (0.638427587822)*x[2]
+            ref[(2, 0, 0, 0)]+=-0.934694162147*x_ref[2]**o + (0.638427587822)*x_ref[2]
+            arg[(2, 0, 0, 1)]+=0.898138999505*x[2]**o + (-0.957780273534)*x[2]
+            ref[(2, 0, 0, 1)]+=0.898138999505*x_ref[2]**o + (-0.957780273534)*x_ref[2]
+            arg[(2, 0, 0, 2)]+=-0.848982982992*x[2]**o + (-0.260343391946)*x[2]
+            ref[(2, 0, 0, 2)]+=-0.848982982992*x_ref[2]**o + (-0.260343391946)*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.788616110057*x[2]**o + (0.328034217682)*x[2]
+            ref[(2, 0, 1, 0)]+=0.788616110057*x_ref[2]**o + (0.328034217682)*x_ref[2]
+            arg[(2, 0, 1, 1)]+=0.818619096039*x[2]**o + (0.644125459861)*x[2]
+            ref[(2, 0, 1, 1)]+=0.818619096039*x_ref[2]**o + (0.644125459861)*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.350565419046*x[2]**o + (0.835732662934)*x[2]
+            ref[(2, 0, 1, 2)]+=0.350565419046*x_ref[2]**o + (0.835732662934)*x_ref[2]
+            arg[(2, 0, 2, 0)]+=0.127736978351*x[2]**o + (-0.766573198546)*x[2]
+            ref[(2, 0, 2, 0)]+=0.127736978351*x_ref[2]**o + (-0.766573198546)*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.189438873158*x[2]**o + (0.164093244416)*x[2]
+            ref[(2, 0, 2, 1)]+=-0.189438873158*x_ref[2]**o + (0.164093244416)*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.78444499298*x[2]**o + (-0.717091435143)*x[2]
+            ref[(2, 0, 2, 2)]+=-0.78444499298*x_ref[2]**o + (-0.717091435143)*x_ref[2]
+            arg[(2, 1, 0, 0)]+=-0.559340937189*x[2]**o + (-0.568459180351)*x[2]
+            ref[(2, 1, 0, 0)]+=-0.559340937189*x_ref[2]**o + (-0.568459180351)*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.660604028428*x[2]**o + (0.661602242847)*x[2]
+            ref[(2, 1, 0, 1)]+=-0.660604028428*x_ref[2]**o + (0.661602242847)*x_ref[2]
+            arg[(2, 1, 0, 2)]+=-0.691415225374*x[2]**o + (-0.141588783612)*x[2]
+            ref[(2, 1, 0, 2)]+=-0.691415225374*x_ref[2]**o + (-0.141588783612)*x_ref[2]
+            arg[(2, 1, 1, 0)]+=0.399564713325*x[2]**o + (-0.296830536997)*x[2]
+            ref[(2, 1, 1, 0)]+=0.399564713325*x_ref[2]**o + (-0.296830536997)*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.92018206026*x[2]**o + (0.35956658673)*x[2]
+            ref[(2, 1, 1, 1)]+=-0.92018206026*x_ref[2]**o + (0.35956658673)*x_ref[2]
+            arg[(2, 1, 1, 2)]+=-0.162882584986*x[2]**o + (-0.966988950876)*x[2]
+            ref[(2, 1, 1, 2)]+=-0.162882584986*x_ref[2]**o + (-0.966988950876)*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.941631195976*x[2]**o + (0.0993891335548)*x[2]
+            ref[(2, 1, 2, 0)]+=-0.941631195976*x_ref[2]**o + (0.0993891335548)*x_ref[2]
+            arg[(2, 1, 2, 1)]+=0.443682250326*x[2]**o + (0.464309315849)*x[2]
+            ref[(2, 1, 2, 1)]+=0.443682250326*x_ref[2]**o + (0.464309315849)*x_ref[2]
+            arg[(2, 1, 2, 2)]+=-0.523323129457*x[2]**o + (-0.246463067769)*x[2]
+            ref[(2, 1, 2, 2)]+=-0.523323129457*x_ref[2]**o + (-0.246463067769)*x_ref[2]
+            arg[(2, 2, 0, 0)]+=-0.715448388703*x[2]**o + (0.196923177373)*x[2]
+            ref[(2, 2, 0, 0)]+=-0.715448388703*x_ref[2]**o + (0.196923177373)*x_ref[2]
+            arg[(2, 2, 0, 1)]+=-0.691220858117*x[2]**o + (-0.239047350323)*x[2]
+            ref[(2, 2, 0, 1)]+=-0.691220858117*x_ref[2]**o + (-0.239047350323)*x_ref[2]
+            arg[(2, 2, 0, 2)]+=-0.377026490179*x[2]**o + (0.875420415641)*x[2]
+            ref[(2, 2, 0, 2)]+=-0.377026490179*x_ref[2]**o + (0.875420415641)*x_ref[2]
+            arg[(2, 2, 1, 0)]+=0.0919429342102*x[2]**o + (0.0924546954513)*x[2]
+            ref[(2, 2, 1, 0)]+=0.0919429342102*x_ref[2]**o + (0.0924546954513)*x_ref[2]
+            arg[(2, 2, 1, 1)]+=-0.0935071764586*x[2]**o + (0.122637309514)*x[2]
+            ref[(2, 2, 1, 1)]+=-0.0935071764586*x_ref[2]**o + (0.122637309514)*x_ref[2]
+            arg[(2, 2, 1, 2)]+=0.552797897408*x[2]**o + (0.556968728628)*x[2]
+            ref[(2, 2, 1, 2)]+=0.552797897408*x_ref[2]**o + (0.556968728628)*x_ref[2]
+            arg[(2, 2, 2, 0)]+=0.417104610923*x[2]**o + (-0.945652895397)*x[2]
+            ref[(2, 2, 2, 0)]+=0.417104610923*x_ref[2]**o + (-0.945652895397)*x_ref[2]
+            arg[(2, 2, 2, 1)]+=-0.0219255297629*x[2]**o + (-0.295795468562)*x[2]
+            ref[(2, 2, 2, 1)]+=-0.0219255297629*x_ref[2]**o + (-0.295795468562)*x_ref[2]
+            arg[(2, 2, 2, 2)]+=-0.0992232627865*x[2]**o + (0.460882267076)*x[2]
+            ref[(2, 2, 2, 2)]+=-0.0992232627865*x_ref[2]**o + (0.460882267076)*x_ref[2]
+            arg[(2, 3, 0, 0)]+=-0.627157909435*x[2]**o + (0.241655270667)*x[2]
+            ref[(2, 3, 0, 0)]+=-0.627157909435*x_ref[2]**o + (0.241655270667)*x_ref[2]
+            arg[(2, 3, 0, 1)]+=0.537435902657*x[2]**o + (0.41212193274)*x[2]
+            ref[(2, 3, 0, 1)]+=0.537435902657*x_ref[2]**o + (0.41212193274)*x_ref[2]
+            arg[(2, 3, 0, 2)]+=-0.421569811899*x[2]**o + (0.460855493074)*x[2]
+            ref[(2, 3, 0, 2)]+=-0.421569811899*x_ref[2]**o + (0.460855493074)*x_ref[2]
+            arg[(2, 3, 1, 0)]+=0.331498752327*x[2]**o + (-0.787712612483)*x[2]
+            ref[(2, 3, 1, 0)]+=0.331498752327*x_ref[2]**o + (-0.787712612483)*x_ref[2]
+            arg[(2, 3, 1, 1)]+=0.90663238513*x[2]**o + (-0.272193461064)*x[2]
+            ref[(2, 3, 1, 1)]+=0.90663238513*x_ref[2]**o + (-0.272193461064)*x_ref[2]
+            arg[(2, 3, 1, 2)]+=0.0652420623521*x[2]**o + (-0.449313446166)*x[2]
+            ref[(2, 3, 1, 2)]+=0.0652420623521*x_ref[2]**o + (-0.449313446166)*x_ref[2]
+            arg[(2, 3, 2, 0)]+=-0.349124523168*x[2]**o + (-0.301720704009)*x[2]
+            ref[(2, 3, 2, 0)]+=-0.349124523168*x_ref[2]**o + (-0.301720704009)*x_ref[2]
+            arg[(2, 3, 2, 1)]+=-0.62366452116*x[2]**o + (-0.493921442592)*x[2]
+            ref[(2, 3, 2, 1)]+=-0.62366452116*x_ref[2]**o + (-0.493921442592)*x_ref[2]
+            arg[(2, 3, 2, 2)]+=0.319205980848*x[2]**o + (0.703713845258)*x[2]
+            ref[(2, 3, 2, 2)]+=0.319205980848*x_ref[2]**o + (0.703713845258)*x_ref[2]
+            arg[(3, 0, 0, 0)]+=-0.666376775332*x[2]**o + (-0.596698200966)*x[2]
+            ref[(3, 0, 0, 0)]+=-0.666376775332*x_ref[2]**o + (-0.596698200966)*x_ref[2]
+            arg[(3, 0, 0, 1)]+=-0.875748824418*x[2]**o + (0.0822846837538)*x[2]
+            ref[(3, 0, 0, 1)]+=-0.875748824418*x_ref[2]**o + (0.0822846837538)*x_ref[2]
+            arg[(3, 0, 0, 2)]+=-0.615729196419*x[2]**o + (0.467811078237)*x[2]
+            ref[(3, 0, 0, 2)]+=-0.615729196419*x_ref[2]**o + (0.467811078237)*x_ref[2]
+            arg[(3, 0, 1, 0)]+=-0.650621796254*x[2]**o + (0.908597858963)*x[2]
+            ref[(3, 0, 1, 0)]+=-0.650621796254*x_ref[2]**o + (0.908597858963)*x_ref[2]
+            arg[(3, 0, 1, 1)]+=-0.0990922695276*x[2]**o + (0.716984708885)*x[2]
+            ref[(3, 0, 1, 1)]+=-0.0990922695276*x_ref[2]**o + (0.716984708885)*x_ref[2]
+            arg[(3, 0, 1, 2)]+=0.0978543648946*x[2]**o + (-0.899513951531)*x[2]
+            ref[(3, 0, 1, 2)]+=0.0978543648946*x_ref[2]**o + (-0.899513951531)*x_ref[2]
+            arg[(3, 0, 2, 0)]+=-0.306636856354*x[2]**o + (-0.0200243551591)*x[2]
+            ref[(3, 0, 2, 0)]+=-0.306636856354*x_ref[2]**o + (-0.0200243551591)*x_ref[2]
+            arg[(3, 0, 2, 1)]+=0.41392483152*x[2]**o + (-0.197149965066)*x[2]
+            ref[(3, 0, 2, 1)]+=0.41392483152*x_ref[2]**o + (-0.197149965066)*x_ref[2]
+            arg[(3, 0, 2, 2)]+=0.614313733134*x[2]**o + (-0.745224068266)*x[2]
+            ref[(3, 0, 2, 2)]+=0.614313733134*x_ref[2]**o + (-0.745224068266)*x_ref[2]
+            arg[(3, 1, 0, 0)]+=0.744602277236*x[2]**o + (-0.398466587476)*x[2]
+            ref[(3, 1, 0, 0)]+=0.744602277236*x_ref[2]**o + (-0.398466587476)*x_ref[2]
+            arg[(3, 1, 0, 1)]+=-0.4869835381*x[2]**o + (-0.143254561548)*x[2]
+            ref[(3, 1, 0, 1)]+=-0.4869835381*x_ref[2]**o + (-0.143254561548)*x_ref[2]
+            arg[(3, 1, 0, 2)]+=-0.755861593221*x[2]**o + (-0.347154227111)*x[2]
+            ref[(3, 1, 0, 2)]+=-0.755861593221*x_ref[2]**o + (-0.347154227111)*x_ref[2]
+            arg[(3, 1, 1, 0)]+=-0.453424915676*x[2]**o + (0.60532206567)*x[2]
+            ref[(3, 1, 1, 0)]+=-0.453424915676*x_ref[2]**o + (0.60532206567)*x_ref[2]
+            arg[(3, 1, 1, 1)]+=0.565148914691*x[2]**o + (0.1062125493)*x[2]
+            ref[(3, 1, 1, 1)]+=0.565148914691*x_ref[2]**o + (0.1062125493)*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.0585466874179*x[2]**o + (0.634448814857)*x[2]
+            ref[(3, 1, 1, 2)]+=0.0585466874179*x_ref[2]**o + (0.634448814857)*x_ref[2]
+            arg[(3, 1, 2, 0)]+=-0.396291978765*x[2]**o + (0.44104964549)*x[2]
+            ref[(3, 1, 2, 0)]+=-0.396291978765*x_ref[2]**o + (0.44104964549)*x_ref[2]
+            arg[(3, 1, 2, 1)]+=0.0462306101757*x[2]**o + (-0.470453248522)*x[2]
+            ref[(3, 1, 2, 1)]+=0.0462306101757*x_ref[2]**o + (-0.470453248522)*x_ref[2]
+            arg[(3, 1, 2, 2)]+=-0.670739286017*x[2]**o + (-0.612463124128)*x[2]
+            ref[(3, 1, 2, 2)]+=-0.670739286017*x_ref[2]**o + (-0.612463124128)*x_ref[2]
+            arg[(3, 2, 0, 0)]+=0.167642513638*x[2]**o + (0.895772141845)*x[2]
+            ref[(3, 2, 0, 0)]+=0.167642513638*x_ref[2]**o + (0.895772141845)*x_ref[2]
+            arg[(3, 2, 0, 1)]+=0.939970079342*x[2]**o + (0.296039381091)*x[2]
+            ref[(3, 2, 0, 1)]+=0.939970079342*x_ref[2]**o + (0.296039381091)*x_ref[2]
+            arg[(3, 2, 0, 2)]+=-0.104202699185*x[2]**o + (0.857568263873)*x[2]
+            ref[(3, 2, 0, 2)]+=-0.104202699185*x_ref[2]**o + (0.857568263873)*x_ref[2]
+            arg[(3, 2, 1, 0)]+=0.962690902643*x[2]**o + (0.568828013245)*x[2]
+            ref[(3, 2, 1, 0)]+=0.962690902643*x_ref[2]**o + (0.568828013245)*x_ref[2]
+            arg[(3, 2, 1, 1)]+=0.0712969530624*x[2]**o + (0.592154155248)*x[2]
+            ref[(3, 2, 1, 1)]+=0.0712969530624*x_ref[2]**o + (0.592154155248)*x_ref[2]
+            arg[(3, 2, 1, 2)]+=-0.273786617173*x[2]**o + (0.589985509153)*x[2]
+            ref[(3, 2, 1, 2)]+=-0.273786617173*x_ref[2]**o + (0.589985509153)*x_ref[2]
+            arg[(3, 2, 2, 0)]+=-0.73919997767*x[2]**o + (0.356727372182)*x[2]
+            ref[(3, 2, 2, 0)]+=-0.73919997767*x_ref[2]**o + (0.356727372182)*x_ref[2]
+            arg[(3, 2, 2, 1)]+=-0.061112920431*x[2]**o + (0.645267715163)*x[2]
+            ref[(3, 2, 2, 1)]+=-0.061112920431*x_ref[2]**o + (0.645267715163)*x_ref[2]
+            arg[(3, 2, 2, 2)]+=0.0380020301112*x[2]**o + (0.851737669039)*x[2]
+            ref[(3, 2, 2, 2)]+=0.0380020301112*x_ref[2]**o + (0.851737669039)*x_ref[2]
+            arg[(3, 3, 0, 0)]+=-0.535509773574*x[2]**o + (0.149852922007)*x[2]
+            ref[(3, 3, 0, 0)]+=-0.535509773574*x_ref[2]**o + (0.149852922007)*x_ref[2]
+            arg[(3, 3, 0, 1)]+=-0.518748981715*x[2]**o + (-0.13103704636)*x[2]
+            ref[(3, 3, 0, 1)]+=-0.518748981715*x_ref[2]**o + (-0.13103704636)*x_ref[2]
+            arg[(3, 3, 0, 2)]+=-0.689212364603*x[2]**o + (-0.72498464473)*x[2]
+            ref[(3, 3, 0, 2)]+=-0.689212364603*x_ref[2]**o + (-0.72498464473)*x_ref[2]
+            arg[(3, 3, 1, 0)]+=0.220146797115*x[2]**o + (0.377452333172)*x[2]
+            ref[(3, 3, 1, 0)]+=0.220146797115*x_ref[2]**o + (0.377452333172)*x_ref[2]
+            arg[(3, 3, 1, 1)]+=0.850960922537*x[2]**o + (-0.365583694354)*x[2]
+            ref[(3, 3, 1, 1)]+=0.850960922537*x_ref[2]**o + (-0.365583694354)*x_ref[2]
+            arg[(3, 3, 1, 2)]+=0.0685972040734*x[2]**o + (-0.21299264686)*x[2]
+            ref[(3, 3, 1, 2)]+=0.0685972040734*x_ref[2]**o + (-0.21299264686)*x_ref[2]
+            arg[(3, 3, 2, 0)]+=0.372047074924*x[2]**o + (0.587014427395)*x[2]
+            ref[(3, 3, 2, 0)]+=0.372047074924*x_ref[2]**o + (0.587014427395)*x_ref[2]
+            arg[(3, 3, 2, 1)]+=0.618609053946*x[2]**o + (-0.547613338903)*x[2]
+            ref[(3, 3, 2, 1)]+=0.618609053946*x_ref[2]**o + (-0.547613338903)*x_ref[2]
+            arg[(3, 3, 2, 2)]+=0.100972281361*x[2]**o + (0.714725561296)*x[2]
+            ref[(3, 3, 2, 2)]+=0.100972281361*x_ref[2]**o + (0.714725561296)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.69032340068*x[0] + (-0.622130695958)*x[1]
+        ref=-0.69032340068*x_ref[0] + (-0.622130695958)*x_ref[1]
+        if dim==3:
+            arg+=(0.398684099635)*x[2]
+            ref+=(0.398684099635)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=-0.606593432397*x[0] + (-0.047184380172)*x[1]
+        ref[(0,)]=-0.606593432397*x_ref[0] + (-0.047184380172)*x_ref[1]
+        arg[(1,)]=0.201020639553*x[0] + (-0.943919049061)*x[1]
+        ref[(1,)]=0.201020639553*x_ref[0] + (-0.943919049061)*x_ref[1]
+        arg[(2,)]=-0.494934963176*x[0] + (0.786382740707)*x[1]
+        ref[(2,)]=-0.494934963176*x_ref[0] + (0.786382740707)*x_ref[1]
+        arg[(3,)]=-0.0107114267844*x[0] + (-0.891652710566)*x[1]
+        ref[(3,)]=-0.0107114267844*x_ref[0] + (-0.891652710566)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.636520051647*x[2]
+            ref[(0,)]+=0.636520051647*x_ref[2]
+            arg[(1,)]+=0.592345673244*x[2]
+            ref[(1,)]+=0.592345673244*x_ref[2]
+            arg[(2,)]+=0.56521347906*x[2]
+            ref[(2,)]+=0.56521347906*x_ref[2]
+            arg[(3,)]+=-0.90543087067*x[2]
+            ref[(3,)]+=-0.90543087067*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=0.24511143118*x[0] + (0.101836763509)*x[1]
+        ref[(0, 0)]=0.24511143118*x_ref[0] + (0.101836763509)*x_ref[1]
+        arg[(0, 1)]=-0.47893740709*x[0] + (-0.506003380391)*x[1]
+        ref[(0, 1)]=-0.47893740709*x_ref[0] + (-0.506003380391)*x_ref[1]
+        arg[(0, 2)]=0.687104569635*x[0] + (0.633871616609)*x[1]
+        ref[(0, 2)]=0.687104569635*x_ref[0] + (0.633871616609)*x_ref[1]
+        arg[(1, 0)]=-0.183242723026*x[0] + (0.68486171759)*x[1]
+        ref[(1, 0)]=-0.183242723026*x_ref[0] + (0.68486171759)*x_ref[1]
+        arg[(1, 1)]=0.886533577164*x[0] + (0.246611293063)*x[1]
+        ref[(1, 1)]=0.886533577164*x_ref[0] + (0.246611293063)*x_ref[1]
+        arg[(1, 2)]=0.237749097846*x[0] + (0.93658622397)*x[1]
+        ref[(1, 2)]=0.237749097846*x_ref[0] + (0.93658622397)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.483985126237*x[2]
+            ref[(0, 0)]+=-0.483985126237*x_ref[2]
+            arg[(0, 1)]+=-0.586908460063*x[2]
+            ref[(0, 1)]+=-0.586908460063*x_ref[2]
+            arg[(0, 2)]+=-0.0578907779376*x[2]
+            ref[(0, 2)]+=-0.0578907779376*x_ref[2]
+            arg[(1, 0)]+=-0.902713502344*x[2]
+            ref[(1, 0)]+=-0.902713502344*x_ref[2]
+            arg[(1, 1)]+=0.427780722364*x[2]
+            ref[(1, 1)]+=0.427780722364*x_ref[2]
+            arg[(1, 2)]+=-0.590752701517*x[2]
+            ref[(1, 2)]+=-0.590752701517*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2, 4),w)
+        ref = Data(0,(2, 2, 4),w_ref)
+        arg[(0, 0, 0)]=-0.0714628281151*x[0] + (-0.572284045063)*x[1]
+        ref[(0, 0, 0)]=-0.0714628281151*x_ref[0] + (-0.572284045063)*x_ref[1]
+        arg[(0, 0, 1)]=0.220534697109*x[0] + (0.266027059066)*x[1]
+        ref[(0, 0, 1)]=0.220534697109*x_ref[0] + (0.266027059066)*x_ref[1]
+        arg[(0, 0, 2)]=0.54054403625*x[0] + (0.978806579298)*x[1]
+        ref[(0, 0, 2)]=0.54054403625*x_ref[0] + (0.978806579298)*x_ref[1]
+        arg[(0, 0, 3)]=-0.0679103574518*x[0] + (-0.467100156181)*x[1]
+        ref[(0, 0, 3)]=-0.0679103574518*x_ref[0] + (-0.467100156181)*x_ref[1]
+        arg[(0, 1, 0)]=0.993238545771*x[0] + (0.973308211929)*x[1]
+        ref[(0, 1, 0)]=0.993238545771*x_ref[0] + (0.973308211929)*x_ref[1]
+        arg[(0, 1, 1)]=-0.653762636648*x[0] + (0.135149324806)*x[1]
+        ref[(0, 1, 1)]=-0.653762636648*x_ref[0] + (0.135149324806)*x_ref[1]
+        arg[(0, 1, 2)]=-0.309030044739*x[0] + (-0.0070245021943)*x[1]
+        ref[(0, 1, 2)]=-0.309030044739*x_ref[0] + (-0.0070245021943)*x_ref[1]
+        arg[(0, 1, 3)]=0.676642406119*x[0] + (-0.315794495768)*x[1]
+        ref[(0, 1, 3)]=0.676642406119*x_ref[0] + (-0.315794495768)*x_ref[1]
+        arg[(1, 0, 0)]=0.0788387964701*x[0] + (-0.574220641142)*x[1]
+        ref[(1, 0, 0)]=0.0788387964701*x_ref[0] + (-0.574220641142)*x_ref[1]
+        arg[(1, 0, 1)]=0.772982588528*x[0] + (0.321069825664)*x[1]
+        ref[(1, 0, 1)]=0.772982588528*x_ref[0] + (0.321069825664)*x_ref[1]
+        arg[(1, 0, 2)]=0.115321410501*x[0] + (0.949340448167)*x[1]
+        ref[(1, 0, 2)]=0.115321410501*x_ref[0] + (0.949340448167)*x_ref[1]
+        arg[(1, 0, 3)]=-0.294571632308*x[0] + (0.0933688062338)*x[1]
+        ref[(1, 0, 3)]=-0.294571632308*x_ref[0] + (0.0933688062338)*x_ref[1]
+        arg[(1, 1, 0)]=-0.666761799402*x[0] + (0.173308613334)*x[1]
+        ref[(1, 1, 0)]=-0.666761799402*x_ref[0] + (0.173308613334)*x_ref[1]
+        arg[(1, 1, 1)]=0.826283748986*x[0] + (-0.700833043346)*x[1]
+        ref[(1, 1, 1)]=0.826283748986*x_ref[0] + (-0.700833043346)*x_ref[1]
+        arg[(1, 1, 2)]=0.877254069382*x[0] + (0.658885703135)*x[1]
+        ref[(1, 1, 2)]=0.877254069382*x_ref[0] + (0.658885703135)*x_ref[1]
+        arg[(1, 1, 3)]=0.385142677505*x[0] + (-0.930368563677)*x[1]
+        ref[(1, 1, 3)]=0.385142677505*x_ref[0] + (-0.930368563677)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.276380178135*x[2]
+            ref[(0, 0, 0)]+=0.276380178135*x_ref[2]
+            arg[(0, 0, 1)]+=0.479518361679*x[2]
+            ref[(0, 0, 1)]+=0.479518361679*x_ref[2]
+            arg[(0, 0, 2)]+=0.146884981568*x[2]
+            ref[(0, 0, 2)]+=0.146884981568*x_ref[2]
+            arg[(0, 0, 3)]+=-0.833461083515*x[2]
+            ref[(0, 0, 3)]+=-0.833461083515*x_ref[2]
+            arg[(0, 1, 0)]+=0.106262105309*x[2]
+            ref[(0, 1, 0)]+=0.106262105309*x_ref[2]
+            arg[(0, 1, 1)]+=-0.568412338055*x[2]
+            ref[(0, 1, 1)]+=-0.568412338055*x_ref[2]
+            arg[(0, 1, 2)]+=-0.0258701503054*x[2]
+            ref[(0, 1, 2)]+=-0.0258701503054*x_ref[2]
+            arg[(0, 1, 3)]+=0.983962331136*x[2]
+            ref[(0, 1, 3)]+=0.983962331136*x_ref[2]
+            arg[(1, 0, 0)]+=0.713206804397*x[2]
+            ref[(1, 0, 0)]+=0.713206804397*x_ref[2]
+            arg[(1, 0, 1)]+=0.791461858674*x[2]
+            ref[(1, 0, 1)]+=0.791461858674*x_ref[2]
+            arg[(1, 0, 2)]+=-0.519223005203*x[2]
+            ref[(1, 0, 2)]+=-0.519223005203*x_ref[2]
+            arg[(1, 0, 3)]+=-0.476001877762*x[2]
+            ref[(1, 0, 3)]+=-0.476001877762*x_ref[2]
+            arg[(1, 1, 0)]+=0.80086341799*x[2]
+            ref[(1, 1, 0)]+=0.80086341799*x_ref[2]
+            arg[(1, 1, 1)]+=0.324004877043*x[2]
+            ref[(1, 1, 1)]+=0.324004877043*x_ref[2]
+            arg[(1, 1, 2)]+=-0.0121916915003*x[2]
+            ref[(1, 1, 2)]+=-0.0121916915003*x_ref[2]
+            arg[(1, 1, 3)]+=0.329996771254*x[2]
+            ref[(1, 1, 3)]+=0.329996771254*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedSolution(self.domain) exists
+                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedSolution(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3, 2, 2),w)
+        ref = Data(0,(2, 3, 2, 2),w_ref)
+        arg[(0, 0, 0, 0)]=0.113487563779*x[0] + (-0.633682203759)*x[1]
+        ref[(0, 0, 0, 0)]=0.113487563779*x_ref[0] + (-0.633682203759)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.143796121594*x[0] + (0.503336547988)*x[1]
+        ref[(0, 0, 0, 1)]=0.143796121594*x_ref[0] + (0.503336547988)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.102595090024*x[0] + (0.546052157875)*x[1]
+        ref[(0, 0, 1, 0)]=0.102595090024*x_ref[0] + (0.546052157875)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.018417690058*x[0] + (-0.78774433258)*x[1]
+        ref[(0, 0, 1, 1)]=0.018417690058*x_ref[0] + (-0.78774433258)*x_ref[1]
+        arg[(0, 1, 0, 0)]=-0.299454529489*x[0] + (0.203517438146)*x[1]
+        ref[(0, 1, 0, 0)]=-0.299454529489*x_ref[0] + (0.203517438146)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.191730410638*x[0] + (-0.902722533607)*x[1]
+        ref[(0, 1, 0, 1)]=0.191730410638*x_ref[0] + (-0.902722533607)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.000635298718865*x[0] + (0.31694377868)*x[1]
+        ref[(0, 1, 1, 0)]=0.000635298718865*x_ref[0] + (0.31694377868)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.855428324664*x[0] + (-0.0159819801585)*x[1]
+        ref[(0, 1, 1, 1)]=0.855428324664*x_ref[0] + (-0.0159819801585)*x_ref[1]
+        arg[(0, 2, 0, 0)]=-0.732458853594*x[0] + (-0.275378738472)*x[1]
+        ref[(0, 2, 0, 0)]=-0.732458853594*x_ref[0] + (-0.275378738472)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.373617476651*x[0] + (0.546362772817)*x[1]
+        ref[(0, 2, 0, 1)]=-0.373617476651*x_ref[0] + (0.546362772817)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.0186839232644*x[0] + (-0.566652093935)*x[1]
+        ref[(0, 2, 1, 0)]=0.0186839232644*x_ref[0] + (-0.566652093935)*x_ref[1]
+        arg[(0, 2, 1, 1)]=-0.308264099375*x[0] + (0.0686171269866)*x[1]
+        ref[(0, 2, 1, 1)]=-0.308264099375*x_ref[0] + (0.0686171269866)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.166453482816*x[0] + (-0.244128090873)*x[1]
+        ref[(1, 0, 0, 0)]=-0.166453482816*x_ref[0] + (-0.244128090873)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.117899025161*x[0] + (-0.716822873682)*x[1]
+        ref[(1, 0, 0, 1)]=-0.117899025161*x_ref[0] + (-0.716822873682)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.99361485574*x[0] + (-0.637560719601)*x[1]
+        ref[(1, 0, 1, 0)]=-0.99361485574*x_ref[0] + (-0.637560719601)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.436755591882*x[0] + (-0.000438577020933)*x[1]
+        ref[(1, 0, 1, 1)]=0.436755591882*x_ref[0] + (-0.000438577020933)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.699712863625*x[0] + (0.298932408972)*x[1]
+        ref[(1, 1, 0, 0)]=-0.699712863625*x_ref[0] + (0.298932408972)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.162353035142*x[0] + (0.980527727253)*x[1]
+        ref[(1, 1, 0, 1)]=0.162353035142*x_ref[0] + (0.980527727253)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.603905200052*x[0] + (0.551754046768)*x[1]
+        ref[(1, 1, 1, 0)]=0.603905200052*x_ref[0] + (0.551754046768)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.751351261064*x[0] + (0.617250072053)*x[1]
+        ref[(1, 1, 1, 1)]=0.751351261064*x_ref[0] + (0.617250072053)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.51358334563*x[0] + (0.436468669223)*x[1]
+        ref[(1, 2, 0, 0)]=-0.51358334563*x_ref[0] + (0.436468669223)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.613128275188*x[0] + (-0.359685747211)*x[1]
+        ref[(1, 2, 0, 1)]=-0.613128275188*x_ref[0] + (-0.359685747211)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.191610309493*x[0] + (-0.910365026007)*x[1]
+        ref[(1, 2, 1, 0)]=0.191610309493*x_ref[0] + (-0.910365026007)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.479258639154*x[0] + (0.997510533998)*x[1]
+        ref[(1, 2, 1, 1)]=0.479258639154*x_ref[0] + (0.997510533998)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=0.681571634473*x[2]
+            ref[(0, 0, 0, 0)]+=0.681571634473*x_ref[2]
+            arg[(0, 0, 0, 1)]+=0.614838153773*x[2]
+            ref[(0, 0, 0, 1)]+=0.614838153773*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.220849645348*x[2]
+            ref[(0, 0, 1, 0)]+=-0.220849645348*x_ref[2]
+            arg[(0, 0, 1, 1)]+=-0.340490520644*x[2]
+            ref[(0, 0, 1, 1)]+=-0.340490520644*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.476501923484*x[2]
+            ref[(0, 1, 0, 0)]+=-0.476501923484*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.865149466572*x[2]
+            ref[(0, 1, 0, 1)]+=-0.865149466572*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.80912105102*x[2]
+            ref[(0, 1, 1, 0)]+=0.80912105102*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.565234597609*x[2]
+            ref[(0, 1, 1, 1)]+=-0.565234597609*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.507292777421*x[2]
+            ref[(0, 2, 0, 0)]+=0.507292777421*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.712627327105*x[2]
+            ref[(0, 2, 0, 1)]+=-0.712627327105*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.0288573461923*x[2]
+            ref[(0, 2, 1, 0)]+=0.0288573461923*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.175124519968*x[2]
+            ref[(0, 2, 1, 1)]+=-0.175124519968*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.657164178091*x[2]
+            ref[(1, 0, 0, 0)]+=-0.657164178091*x_ref[2]
+            arg[(1, 0, 0, 1)]+=-0.0227874147178*x[2]
+            ref[(1, 0, 0, 1)]+=-0.0227874147178*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.460284979154*x[2]
+            ref[(1, 0, 1, 0)]+=-0.460284979154*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.982750006904*x[2]
+            ref[(1, 0, 1, 1)]+=-0.982750006904*x_ref[2]
+            arg[(1, 1, 0, 0)]+=-0.726584747916*x[2]
+            ref[(1, 1, 0, 0)]+=-0.726584747916*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.078486450621*x[2]
+            ref[(1, 1, 0, 1)]+=-0.078486450621*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.656516668495*x[2]
+            ref[(1, 1, 1, 0)]+=-0.656516668495*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.476916878995*x[2]
+            ref[(1, 1, 1, 1)]+=0.476916878995*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.458838201093*x[2]
+            ref[(1, 2, 0, 0)]+=0.458838201093*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.602653398054*x[2]
+            ref[(1, 2, 0, 1)]+=0.602653398054*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.376102083282*x[2]
+            ref[(1, 2, 1, 0)]+=0.376102083282*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.0199320930354*x[2]
+            ref[(1, 2, 1, 1)]+=0.0199320930354*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3, 2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.118681421618*x[0] + (0.990659765123)*x[1]
+        ref=-0.118681421618*x_ref[0] + (0.990659765123)*x_ref[1]
+        if dim==3:
+            arg+=(-0.921536834836)*x[2]
+            ref+=(-0.921536834836)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4,),w)
+        ref = Data(0,(4,),w_ref)
+        arg[(0,)]=-0.593125731329*x[0] + (0.651049909063)*x[1]
+        ref[(0,)]=-0.593125731329*x_ref[0] + (0.651049909063)*x_ref[1]
+        arg[(1,)]=-0.669524095338*x[0] + (-0.859770185998)*x[1]
+        ref[(1,)]=-0.669524095338*x_ref[0] + (-0.859770185998)*x_ref[1]
+        arg[(2,)]=-0.074137006965*x[0] + (-0.0217309056075)*x[1]
+        ref[(2,)]=-0.074137006965*x_ref[0] + (-0.0217309056075)*x_ref[1]
+        arg[(3,)]=-0.054055424268*x[0] + (-0.942686523909)*x[1]
+        ref[(3,)]=-0.054055424268*x_ref[0] + (-0.942686523909)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.641652612726*x[2]
+            ref[(0,)]+=0.641652612726*x_ref[2]
+            arg[(1,)]+=0.727552208432*x[2]
+            ref[(1,)]+=0.727552208432*x_ref[2]
+            arg[(2,)]+=-0.572120144846*x[2]
+            ref[(2,)]+=-0.572120144846*x_ref[2]
+            arg[(3,)]+=-0.551306472836*x[2]
+            ref[(3,)]+=-0.551306472836*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 3),w)
+        ref = Data(0,(2, 3),w_ref)
+        arg[(0, 0)]=0.844549018598*x[0] + (-0.999740823313)*x[1]
+        ref[(0, 0)]=0.844549018598*x_ref[0] + (-0.999740823313)*x_ref[1]
+        arg[(0, 1)]=0.41238903538*x[0] + (0.196729021268)*x[1]
+        ref[(0, 1)]=0.41238903538*x_ref[0] + (0.196729021268)*x_ref[1]
+        arg[(0, 2)]=-0.121446706435*x[0] + (-0.0369106046355)*x[1]
+        ref[(0, 2)]=-0.121446706435*x_ref[0] + (-0.0369106046355)*x_ref[1]
+        arg[(1, 0)]=-0.842646683887*x[0] + (-0.737852891809)*x[1]
+        ref[(1, 0)]=-0.842646683887*x_ref[0] + (-0.737852891809)*x_ref[1]
+        arg[(1, 1)]=0.987180727237*x[0] + (-0.368287535615)*x[1]
+        ref[(1, 1)]=0.987180727237*x_ref[0] + (-0.368287535615)*x_ref[1]
+        arg[(1, 2)]=0.505020739808*x[0] + (-0.891038640141)*x[1]
+        ref[(1, 2)]=0.505020739808*x_ref[0] + (-0.891038640141)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=-0.670350705167*x[2]
+            ref[(0, 0)]+=-0.670350705167*x_ref[2]
+            arg[(0, 1)]+=0.87896926076*x[2]
+            ref[(0, 1)]+=0.87896926076*x_ref[2]
+            arg[(0, 2)]+=-0.699194070009*x[2]
+            ref[(0, 2)]+=-0.699194070009*x_ref[2]
+            arg[(1, 0)]+=0.799375439908*x[2]
+            ref[(1, 0)]+=0.799375439908*x_ref[2]
+            arg[(1, 1)]+=0.436617181551*x[2]
+            ref[(1, 1)]+=0.436617181551*x_ref[2]
+            arg[(1, 2)]+=-0.859514212022*x[2]
+            ref[(1, 2)]+=-0.859514212022*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 2),w)
+        ref = Data(0,(2, 4, 2),w_ref)
+        arg[(0, 0, 0)]=-0.0833941203095*x[0] + (0.715440268613)*x[1]
+        ref[(0, 0, 0)]=-0.0833941203095*x_ref[0] + (0.715440268613)*x_ref[1]
+        arg[(0, 0, 1)]=0.568064881495*x[0] + (-0.537592253557)*x[1]
+        ref[(0, 0, 1)]=0.568064881495*x_ref[0] + (-0.537592253557)*x_ref[1]
+        arg[(0, 1, 0)]=-0.329653105619*x[0] + (-0.395105719367)*x[1]
+        ref[(0, 1, 0)]=-0.329653105619*x_ref[0] + (-0.395105719367)*x_ref[1]
+        arg[(0, 1, 1)]=-0.655979952272*x[0] + (0.258453378528)*x[1]
+        ref[(0, 1, 1)]=-0.655979952272*x_ref[0] + (0.258453378528)*x_ref[1]
+        arg[(0, 2, 0)]=-0.269675397278*x[0] + (-0.0144753474292)*x[1]
+        ref[(0, 2, 0)]=-0.269675397278*x_ref[0] + (-0.0144753474292)*x_ref[1]
+        arg[(0, 2, 1)]=-0.77898104251*x[0] + (-0.895375085209)*x[1]
+        ref[(0, 2, 1)]=-0.77898104251*x_ref[0] + (-0.895375085209)*x_ref[1]
+        arg[(0, 3, 0)]=0.89006000505*x[0] + (0.824305834763)*x[1]
+        ref[(0, 3, 0)]=0.89006000505*x_ref[0] + (0.824305834763)*x_ref[1]
+        arg[(0, 3, 1)]=0.372004968637*x[0] + (0.969245516024)*x[1]
+        ref[(0, 3, 1)]=0.372004968637*x_ref[0] + (0.969245516024)*x_ref[1]
+        arg[(1, 0, 0)]=-0.0701218012598*x[0] + (0.310146284517)*x[1]
+        ref[(1, 0, 0)]=-0.0701218012598*x_ref[0] + (0.310146284517)*x_ref[1]
+        arg[(1, 0, 1)]=0.364446477692*x[0] + (0.0560010022934)*x[1]
+        ref[(1, 0, 1)]=0.364446477692*x_ref[0] + (0.0560010022934)*x_ref[1]
+        arg[(1, 1, 0)]=0.519586939444*x[0] + (0.0427614917717)*x[1]
+        ref[(1, 1, 0)]=0.519586939444*x_ref[0] + (0.0427614917717)*x_ref[1]
+        arg[(1, 1, 1)]=0.541898262849*x[0] + (0.729321860773)*x[1]
+        ref[(1, 1, 1)]=0.541898262849*x_ref[0] + (0.729321860773)*x_ref[1]
+        arg[(1, 2, 0)]=0.171148726716*x[0] + (0.250290999404)*x[1]
+        ref[(1, 2, 0)]=0.171148726716*x_ref[0] + (0.250290999404)*x_ref[1]
+        arg[(1, 2, 1)]=0.0845378277169*x[0] + (0.679731081852)*x[1]
+        ref[(1, 2, 1)]=0.0845378277169*x_ref[0] + (0.679731081852)*x_ref[1]
+        arg[(1, 3, 0)]=-0.92972323688*x[0] + (-0.129094622304)*x[1]
+        ref[(1, 3, 0)]=-0.92972323688*x_ref[0] + (-0.129094622304)*x_ref[1]
+        arg[(1, 3, 1)]=-0.197851453972*x[0] + (0.133637462389)*x[1]
+        ref[(1, 3, 1)]=-0.197851453972*x_ref[0] + (0.133637462389)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.790196275046*x[2]
+            ref[(0, 0, 0)]+=-0.790196275046*x_ref[2]
+            arg[(0, 0, 1)]+=0.734630902283*x[2]
+            ref[(0, 0, 1)]+=0.734630902283*x_ref[2]
+            arg[(0, 1, 0)]+=0.938527177667*x[2]
+            ref[(0, 1, 0)]+=0.938527177667*x_ref[2]
+            arg[(0, 1, 1)]+=0.772506949696*x[2]
+            ref[(0, 1, 1)]+=0.772506949696*x_ref[2]
+            arg[(0, 2, 0)]+=-0.0455406656276*x[2]
+            ref[(0, 2, 0)]+=-0.0455406656276*x_ref[2]
+            arg[(0, 2, 1)]+=-0.336500153212*x[2]
+            ref[(0, 2, 1)]+=-0.336500153212*x_ref[2]
+            arg[(0, 3, 0)]+=0.863517123476*x[2]
+            ref[(0, 3, 0)]+=0.863517123476*x_ref[2]
+            arg[(0, 3, 1)]+=0.813913696846*x[2]
+            ref[(0, 3, 1)]+=0.813913696846*x_ref[2]
+            arg[(1, 0, 0)]+=-0.943150455518*x[2]
+            ref[(1, 0, 0)]+=-0.943150455518*x_ref[2]
+            arg[(1, 0, 1)]+=0.089399096157*x[2]
+            ref[(1, 0, 1)]+=0.089399096157*x_ref[2]
+            arg[(1, 1, 0)]+=0.851743150621*x[2]
+            ref[(1, 1, 0)]+=0.851743150621*x_ref[2]
+            arg[(1, 1, 1)]+=0.0403297270159*x[2]
+            ref[(1, 1, 1)]+=0.0403297270159*x_ref[2]
+            arg[(1, 2, 0)]+=-0.324251661199*x[2]
+            ref[(1, 2, 0)]+=-0.324251661199*x_ref[2]
+            arg[(1, 2, 1)]+=-0.153197851935*x[2]
+            ref[(1, 2, 1)]+=-0.153197851935*x_ref[2]
+            arg[(1, 3, 0)]+=-0.49888415047*x[2]
+            ref[(1, 3, 0)]+=-0.49888415047*x_ref[2]
+            arg[(1, 3, 1)]+=0.133850830603*x[2]
+            ref[(1, 3, 1)]+=0.133850830603*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedContinuousFunction(self.domain) exists
+                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedContinuousFunction(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 3, 3),w)
+        ref = Data(0,(4, 2, 3, 3),w_ref)
+        arg[(0, 0, 0, 0)]=0.719775542908*x[0] + (-0.841899929244)*x[1]
+        ref[(0, 0, 0, 0)]=0.719775542908*x_ref[0] + (-0.841899929244)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.588998527072*x[0] + (-0.777344535964)*x[1]
+        ref[(0, 0, 0, 1)]=0.588998527072*x_ref[0] + (-0.777344535964)*x_ref[1]
+        arg[(0, 0, 0, 2)]=-0.308653521355*x[0] + (0.493170795836)*x[1]
+        ref[(0, 0, 0, 2)]=-0.308653521355*x_ref[0] + (0.493170795836)*x_ref[1]
+        arg[(0, 0, 1, 0)]=0.170664535949*x[0] + (-0.677281220856)*x[1]
+        ref[(0, 0, 1, 0)]=0.170664535949*x_ref[0] + (-0.677281220856)*x_ref[1]
+        arg[(0, 0, 1, 1)]=-0.872064182682*x[0] + (0.648223205129)*x[1]
+        ref[(0, 0, 1, 1)]=-0.872064182682*x_ref[0] + (0.648223205129)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.570743888193*x[0] + (-0.268629618989)*x[1]
+        ref[(0, 0, 1, 2)]=0.570743888193*x_ref[0] + (-0.268629618989)*x_ref[1]
+        arg[(0, 0, 2, 0)]=0.802456432757*x[0] + (-0.258366508912)*x[1]
+        ref[(0, 0, 2, 0)]=0.802456432757*x_ref[0] + (-0.258366508912)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.478023953043*x[0] + (-0.722709938108)*x[1]
+        ref[(0, 0, 2, 1)]=0.478023953043*x_ref[0] + (-0.722709938108)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.369065772054*x[0] + (-0.301255272042)*x[1]
+        ref[(0, 0, 2, 2)]=0.369065772054*x_ref[0] + (-0.301255272042)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.944617606764*x[0] + (0.179420230079)*x[1]
+        ref[(0, 1, 0, 0)]=0.944617606764*x_ref[0] + (0.179420230079)*x_ref[1]
+        arg[(0, 1, 0, 1)]=0.230797298631*x[0] + (0.934098934608)*x[1]
+        ref[(0, 1, 0, 1)]=0.230797298631*x_ref[0] + (0.934098934608)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.242344761625*x[0] + (0.749181273498)*x[1]
+        ref[(0, 1, 0, 2)]=-0.242344761625*x_ref[0] + (0.749181273498)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.91874479393*x[0] + (0.0837830512174)*x[1]
+        ref[(0, 1, 1, 0)]=-0.91874479393*x_ref[0] + (0.0837830512174)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.810547401238*x[0] + (-0.56396691935)*x[1]
+        ref[(0, 1, 1, 1)]=0.810547401238*x_ref[0] + (-0.56396691935)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.688690118291*x[0] + (-0.74696930811)*x[1]
+        ref[(0, 1, 1, 2)]=-0.688690118291*x_ref[0] + (-0.74696930811)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.947886851958*x[0] + (0.63070811827)*x[1]
+        ref[(0, 1, 2, 0)]=-0.947886851958*x_ref[0] + (0.63070811827)*x_ref[1]
+        arg[(0, 1, 2, 1)]=-0.933954681271*x[0] + (0.186116465867)*x[1]
+        ref[(0, 1, 2, 1)]=-0.933954681271*x_ref[0] + (0.186116465867)*x_ref[1]
+        arg[(0, 1, 2, 2)]=0.851141961372*x[0] + (-0.0625228223146)*x[1]
+        ref[(0, 1, 2, 2)]=0.851141961372*x_ref[0] + (-0.0625228223146)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.547336052496*x[0] + (0.488064306311)*x[1]
+        ref[(1, 0, 0, 0)]=0.547336052496*x_ref[0] + (0.488064306311)*x_ref[1]
+        arg[(1, 0, 0, 1)]=-0.563197467273*x[0] + (-0.989141932427)*x[1]
+        ref[(1, 0, 0, 1)]=-0.563197467273*x_ref[0] + (-0.989141932427)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.537192392153*x[0] + (0.788283971831)*x[1]
+        ref[(1, 0, 0, 2)]=0.537192392153*x_ref[0] + (0.788283971831)*x_ref[1]
+        arg[(1, 0, 1, 0)]=-0.623202068421*x[0] + (0.719843594312)*x[1]
+        ref[(1, 0, 1, 0)]=-0.623202068421*x_ref[0] + (0.719843594312)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.448989311259*x[0] + (0.0798747301544)*x[1]
+        ref[(1, 0, 1, 1)]=0.448989311259*x_ref[0] + (0.0798747301544)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.0672320439386*x[0] + (0.16628074509)*x[1]
+        ref[(1, 0, 1, 2)]=-0.0672320439386*x_ref[0] + (0.16628074509)*x_ref[1]
+        arg[(1, 0, 2, 0)]=0.859728547873*x[0] + (-0.695992971479)*x[1]
+        ref[(1, 0, 2, 0)]=0.859728547873*x_ref[0] + (-0.695992971479)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.880392746774*x[0] + (-0.870249638557)*x[1]
+        ref[(1, 0, 2, 1)]=-0.880392746774*x_ref[0] + (-0.870249638557)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.757492809527*x[0] + (0.658882589484)*x[1]
+        ref[(1, 0, 2, 2)]=-0.757492809527*x_ref[0] + (0.658882589484)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.765949588026*x[0] + (-0.530347340442)*x[1]
+        ref[(1, 1, 0, 0)]=-0.765949588026*x_ref[0] + (-0.530347340442)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.51225797749*x[0] + (-0.283550013794)*x[1]
+        ref[(1, 1, 0, 1)]=-0.51225797749*x_ref[0] + (-0.283550013794)*x_ref[1]
+        arg[(1, 1, 0, 2)]=0.43530694229*x[0] + (0.622003951475)*x[1]
+        ref[(1, 1, 0, 2)]=0.43530694229*x_ref[0] + (0.622003951475)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.721983440777*x[0] + (-0.840661706015)*x[1]
+        ref[(1, 1, 1, 0)]=0.721983440777*x_ref[0] + (-0.840661706015)*x_ref[1]
+        arg[(1, 1, 1, 1)]=-0.587600897755*x[0] + (-0.0765237596805)*x[1]
+        ref[(1, 1, 1, 1)]=-0.587600897755*x_ref[0] + (-0.0765237596805)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.796338284106*x[0] + (0.480421996626)*x[1]
+        ref[(1, 1, 1, 2)]=-0.796338284106*x_ref[0] + (0.480421996626)*x_ref[1]
+        arg[(1, 1, 2, 0)]=-0.23288376238*x[0] + (-0.253429588026)*x[1]
+        ref[(1, 1, 2, 0)]=-0.23288376238*x_ref[0] + (-0.253429588026)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.570753575209*x[0] + (-0.812606890874)*x[1]
+        ref[(1, 1, 2, 1)]=-0.570753575209*x_ref[0] + (-0.812606890874)*x_ref[1]
+        arg[(1, 1, 2, 2)]=-0.821571115323*x[0] + (-0.0952331206977)*x[1]
+        ref[(1, 1, 2, 2)]=-0.821571115323*x_ref[0] + (-0.0952331206977)*x_ref[1]
+        arg[(2, 0, 0, 0)]=-0.902800415098*x[0] + (0.143935889279)*x[1]
+        ref[(2, 0, 0, 0)]=-0.902800415098*x_ref[0] + (0.143935889279)*x_ref[1]
+        arg[(2, 0, 0, 1)]=0.0928055854543*x[0] + (-0.681956870274)*x[1]
+        ref[(2, 0, 0, 1)]=0.0928055854543*x_ref[0] + (-0.681956870274)*x_ref[1]
+        arg[(2, 0, 0, 2)]=-0.353030126798*x[0] + (-0.480594746941)*x[1]
+        ref[(2, 0, 0, 2)]=-0.353030126798*x_ref[0] + (-0.480594746941)*x_ref[1]
+        arg[(2, 0, 1, 0)]=-0.00341378094007*x[0] + (-0.263660176783)*x[1]
+        ref[(2, 0, 1, 0)]=-0.00341378094007*x_ref[0] + (-0.263660176783)*x_ref[1]
+        arg[(2, 0, 1, 1)]=0.454258534143*x[0] + (-0.0723222081186)*x[1]
+        ref[(2, 0, 1, 1)]=0.454258534143*x_ref[0] + (-0.0723222081186)*x_ref[1]
+        arg[(2, 0, 1, 2)]=0.859487082554*x[0] + (-0.861590932805)*x[1]
+        ref[(2, 0, 1, 2)]=0.859487082554*x_ref[0] + (-0.861590932805)*x_ref[1]
+        arg[(2, 0, 2, 0)]=-0.719639284995*x[0] + (-0.073806809252)*x[1]
+        ref[(2, 0, 2, 0)]=-0.719639284995*x_ref[0] + (-0.073806809252)*x_ref[1]
+        arg[(2, 0, 2, 1)]=0.419221639354*x[0] + (-0.827962851522)*x[1]
+        ref[(2, 0, 2, 1)]=0.419221639354*x_ref[0] + (-0.827962851522)*x_ref[1]
+        arg[(2, 0, 2, 2)]=0.17733548076*x[0] + (0.44928946518)*x[1]
+        ref[(2, 0, 2, 2)]=0.17733548076*x_ref[0] + (0.44928946518)*x_ref[1]
+        arg[(2, 1, 0, 0)]=0.626354554993*x[0] + (0.011737487851)*x[1]
+        ref[(2, 1, 0, 0)]=0.626354554993*x_ref[0] + (0.011737487851)*x_ref[1]
+        arg[(2, 1, 0, 1)]=-0.957930951594*x[0] + (0.836034592776)*x[1]
+        ref[(2, 1, 0, 1)]=-0.957930951594*x_ref[0] + (0.836034592776)*x_ref[1]
+        arg[(2, 1, 0, 2)]=-0.253289545508*x[0] + (-0.018778835251)*x[1]
+        ref[(2, 1, 0, 2)]=-0.253289545508*x_ref[0] + (-0.018778835251)*x_ref[1]
+        arg[(2, 1, 1, 0)]=0.349230496572*x[0] + (0.650188575864)*x[1]
+        ref[(2, 1, 1, 0)]=0.349230496572*x_ref[0] + (0.650188575864)*x_ref[1]
+        arg[(2, 1, 1, 1)]=-0.468048372295*x[0] + (0.696965150536)*x[1]
+        ref[(2, 1, 1, 1)]=-0.468048372295*x_ref[0] + (0.696965150536)*x_ref[1]
+        arg[(2, 1, 1, 2)]=0.56213654436*x[0] + (0.0461946225697)*x[1]
+        ref[(2, 1, 1, 2)]=0.56213654436*x_ref[0] + (0.0461946225697)*x_ref[1]
+        arg[(2, 1, 2, 0)]=-0.614553364577*x[0] + (-0.147227860179)*x[1]
+        ref[(2, 1, 2, 0)]=-0.614553364577*x_ref[0] + (-0.147227860179)*x_ref[1]
+        arg[(2, 1, 2, 1)]=0.083077477696*x[0] + (-0.18708096379)*x[1]
+        ref[(2, 1, 2, 1)]=0.083077477696*x_ref[0] + (-0.18708096379)*x_ref[1]
+        arg[(2, 1, 2, 2)]=0.464530016071*x[0] + (0.22604272521)*x[1]
+        ref[(2, 1, 2, 2)]=0.464530016071*x_ref[0] + (0.22604272521)*x_ref[1]
+        arg[(3, 0, 0, 0)]=-0.115990517004*x[0] + (0.0919509329682)*x[1]
+        ref[(3, 0, 0, 0)]=-0.115990517004*x_ref[0] + (0.0919509329682)*x_ref[1]
+        arg[(3, 0, 0, 1)]=-0.520082122204*x[0] + (0.596488992035)*x[1]
+        ref[(3, 0, 0, 1)]=-0.520082122204*x_ref[0] + (0.596488992035)*x_ref[1]
+        arg[(3, 0, 0, 2)]=-0.963767964236*x[0] + (0.63448634864)*x[1]
+        ref[(3, 0, 0, 2)]=-0.963767964236*x_ref[0] + (0.63448634864)*x_ref[1]
+        arg[(3, 0, 1, 0)]=0.271711491387*x[0] + (0.52676272953)*x[1]
+        ref[(3, 0, 1, 0)]=0.271711491387*x_ref[0] + (0.52676272953)*x_ref[1]
+        arg[(3, 0, 1, 1)]=-0.835043964897*x[0] + (-0.72788962063)*x[1]
+        ref[(3, 0, 1, 1)]=-0.835043964897*x_ref[0] + (-0.72788962063)*x_ref[1]
+        arg[(3, 0, 1, 2)]=0.0260181694197*x[0] + (0.387734350018)*x[1]
+        ref[(3, 0, 1, 2)]=0.0260181694197*x_ref[0] + (0.387734350018)*x_ref[1]
+        arg[(3, 0, 2, 0)]=-0.187823975298*x[0] + (0.344205740066)*x[1]
+        ref[(3, 0, 2, 0)]=-0.187823975298*x_ref[0] + (0.344205740066)*x_ref[1]
+        arg[(3, 0, 2, 1)]=0.110011086914*x[0] + (-0.231012255181)*x[1]
+        ref[(3, 0, 2, 1)]=0.110011086914*x_ref[0] + (-0.231012255181)*x_ref[1]
+        arg[(3, 0, 2, 2)]=0.894786107047*x[0] + (0.824737621514)*x[1]
+        ref[(3, 0, 2, 2)]=0.894786107047*x_ref[0] + (0.824737621514)*x_ref[1]
+        arg[(3, 1, 0, 0)]=-0.540627241379*x[0] + (0.399388642274)*x[1]
+        ref[(3, 1, 0, 0)]=-0.540627241379*x_ref[0] + (0.399388642274)*x_ref[1]
+        arg[(3, 1, 0, 1)]=-0.32345929616*x[0] + (0.214859362457)*x[1]
+        ref[(3, 1, 0, 1)]=-0.32345929616*x_ref[0] + (0.214859362457)*x_ref[1]
+        arg[(3, 1, 0, 2)]=0.864346857901*x[0] + (-0.745660596808)*x[1]
+        ref[(3, 1, 0, 2)]=0.864346857901*x_ref[0] + (-0.745660596808)*x_ref[1]
+        arg[(3, 1, 1, 0)]=-0.979016284711*x[0] + (-0.808936543765)*x[1]
+        ref[(3, 1, 1, 0)]=-0.979016284711*x_ref[0] + (-0.808936543765)*x_ref[1]
+        arg[(3, 1, 1, 1)]=-0.279831097005*x[0] + (-0.798337908896)*x[1]
+        ref[(3, 1, 1, 1)]=-0.279831097005*x_ref[0] + (-0.798337908896)*x_ref[1]
+        arg[(3, 1, 1, 2)]=-0.881275561054*x[0] + (-0.919046976565)*x[1]
+        ref[(3, 1, 1, 2)]=-0.881275561054*x_ref[0] + (-0.919046976565)*x_ref[1]
+        arg[(3, 1, 2, 0)]=0.234509380086*x[0] + (-0.113355382125)*x[1]
+        ref[(3, 1, 2, 0)]=0.234509380086*x_ref[0] + (-0.113355382125)*x_ref[1]
+        arg[(3, 1, 2, 1)]=0.940922599521*x[0] + (0.553645009252)*x[1]
+        ref[(3, 1, 2, 1)]=0.940922599521*x_ref[0] + (0.553645009252)*x_ref[1]
+        arg[(3, 1, 2, 2)]=0.26764927968*x[0] + (-0.665606901664)*x[1]
+        ref[(3, 1, 2, 2)]=0.26764927968*x_ref[0] + (-0.665606901664)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.318042615517*x[2]
+            ref[(0, 0, 0, 0)]+=-0.318042615517*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.0662052197375*x[2]
+            ref[(0, 0, 0, 1)]+=-0.0662052197375*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.811147564362*x[2]
+            ref[(0, 0, 0, 2)]+=0.811147564362*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.13438779707*x[2]
+            ref[(0, 0, 1, 0)]+=-0.13438779707*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.658751612901*x[2]
+            ref[(0, 0, 1, 1)]+=0.658751612901*x_ref[2]
+            arg[(0, 0, 1, 2)]+=0.546516446881*x[2]
+            ref[(0, 0, 1, 2)]+=0.546516446881*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.541550204005*x[2]
+            ref[(0, 0, 2, 0)]+=0.541550204005*x_ref[2]
+            arg[(0, 0, 2, 1)]+=-0.0614547787613*x[2]
+            ref[(0, 0, 2, 1)]+=-0.0614547787613*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.121284745006*x[2]
+            ref[(0, 0, 2, 2)]+=-0.121284745006*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.649835896389*x[2]
+            ref[(0, 1, 0, 0)]+=-0.649835896389*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.50744902467*x[2]
+            ref[(0, 1, 0, 1)]+=-0.50744902467*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.373054459547*x[2]
+            ref[(0, 1, 0, 2)]+=-0.373054459547*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.575617214868*x[2]
+            ref[(0, 1, 1, 0)]+=0.575617214868*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.699876039726*x[2]
+            ref[(0, 1, 1, 1)]+=0.699876039726*x_ref[2]
+            arg[(0, 1, 1, 2)]+=-0.81081663402*x[2]
+            ref[(0, 1, 1, 2)]+=-0.81081663402*x_ref[2]
+            arg[(0, 1, 2, 0)]+=-0.0701430736375*x[2]
+            ref[(0, 1, 2, 0)]+=-0.0701430736375*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.200095632674*x[2]
+            ref[(0, 1, 2, 1)]+=-0.200095632674*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.55066114299*x[2]
+            ref[(0, 1, 2, 2)]+=0.55066114299*x_ref[2]
+            arg[(1, 0, 0, 0)]+=0.307654776506*x[2]
+            ref[(1, 0, 0, 0)]+=0.307654776506*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.518455649014*x[2]
+            ref[(1, 0, 0, 1)]+=0.518455649014*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.625738162909*x[2]
+            ref[(1, 0, 0, 2)]+=-0.625738162909*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.224026794653*x[2]
+            ref[(1, 0, 1, 0)]+=-0.224026794653*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.392653056705*x[2]
+            ref[(1, 0, 1, 1)]+=-0.392653056705*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.746339863718*x[2]
+            ref[(1, 0, 1, 2)]+=-0.746339863718*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.726591066389*x[2]
+            ref[(1, 0, 2, 0)]+=-0.726591066389*x_ref[2]
+            arg[(1, 0, 2, 1)]+=-0.164314705679*x[2]
+            ref[(1, 0, 2, 1)]+=-0.164314705679*x_ref[2]
+            arg[(1, 0, 2, 2)]+=-0.691209029368*x[2]
+            ref[(1, 0, 2, 2)]+=-0.691209029368*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.827528828419*x[2]
+            ref[(1, 1, 0, 0)]+=0.827528828419*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.197854998523*x[2]
+            ref[(1, 1, 0, 1)]+=0.197854998523*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.199461842604*x[2]
+            ref[(1, 1, 0, 2)]+=-0.199461842604*x_ref[2]
+            arg[(1, 1, 1, 0)]+=-0.518324551558*x[2]
+            ref[(1, 1, 1, 0)]+=-0.518324551558*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.183735165067*x[2]
+            ref[(1, 1, 1, 1)]+=0.183735165067*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.403864377476*x[2]
+            ref[(1, 1, 1, 2)]+=0.403864377476*x_ref[2]
+            arg[(1, 1, 2, 0)]+=-0.694398265233*x[2]
+            ref[(1, 1, 2, 0)]+=-0.694398265233*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.654034301059*x[2]
+            ref[(1, 1, 2, 1)]+=0.654034301059*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.938972873224*x[2]
+            ref[(1, 1, 2, 2)]+=0.938972873224*x_ref[2]
+            arg[(2, 0, 0, 0)]+=0.799825501841*x[2]
+            ref[(2, 0, 0, 0)]+=0.799825501841*x_ref[2]
+            arg[(2, 0, 0, 1)]+=-0.90578996068*x[2]
+            ref[(2, 0, 0, 1)]+=-0.90578996068*x_ref[2]
+            arg[(2, 0, 0, 2)]+=0.279678874112*x[2]
+            ref[(2, 0, 0, 2)]+=0.279678874112*x_ref[2]
+            arg[(2, 0, 1, 0)]+=0.23632307896*x[2]
+            ref[(2, 0, 1, 0)]+=0.23632307896*x_ref[2]
+            arg[(2, 0, 1, 1)]+=-0.0665728735094*x[2]
+            ref[(2, 0, 1, 1)]+=-0.0665728735094*x_ref[2]
+            arg[(2, 0, 1, 2)]+=0.412851896106*x[2]
+            ref[(2, 0, 1, 2)]+=0.412851896106*x_ref[2]
+            arg[(2, 0, 2, 0)]+=-0.79862948771*x[2]
+            ref[(2, 0, 2, 0)]+=-0.79862948771*x_ref[2]
+            arg[(2, 0, 2, 1)]+=-0.836134710249*x[2]
+            ref[(2, 0, 2, 1)]+=-0.836134710249*x_ref[2]
+            arg[(2, 0, 2, 2)]+=-0.667569411873*x[2]
+            ref[(2, 0, 2, 2)]+=-0.667569411873*x_ref[2]
+            arg[(2, 1, 0, 0)]+=0.592739881226*x[2]
+            ref[(2, 1, 0, 0)]+=0.592739881226*x_ref[2]
+            arg[(2, 1, 0, 1)]+=-0.345085690784*x[2]
+            ref[(2, 1, 0, 1)]+=-0.345085690784*x_ref[2]
+            arg[(2, 1, 0, 2)]+=0.393488579345*x[2]
+            ref[(2, 1, 0, 2)]+=0.393488579345*x_ref[2]
+            arg[(2, 1, 1, 0)]+=-0.225740657926*x[2]
+            ref[(2, 1, 1, 0)]+=-0.225740657926*x_ref[2]
+            arg[(2, 1, 1, 1)]+=-0.0600074442022*x[2]
+            ref[(2, 1, 1, 1)]+=-0.0600074442022*x_ref[2]
+            arg[(2, 1, 1, 2)]+=0.112207737944*x[2]
+            ref[(2, 1, 1, 2)]+=0.112207737944*x_ref[2]
+            arg[(2, 1, 2, 0)]+=-0.445034230858*x[2]
+            ref[(2, 1, 2, 0)]+=-0.445034230858*x_ref[2]
+            arg[(2, 1, 2, 1)]+=-0.20537535916*x[2]
+            ref[(2, 1, 2, 1)]+=-0.20537535916*x_ref[2]
+            arg[(2, 1, 2, 2)]+=0.7982664634*x[2]
+            ref[(2, 1, 2, 2)]+=0.7982664634*x_ref[2]
+            arg[(3, 0, 0, 0)]+=0.717377256924*x[2]
+            ref[(3, 0, 0, 0)]+=0.717377256924*x_ref[2]
+            arg[(3, 0, 0, 1)]+=0.392398531299*x[2]
+            ref[(3, 0, 0, 1)]+=0.392398531299*x_ref[2]
+            arg[(3, 0, 0, 2)]+=0.825527526539*x[2]
+            ref[(3, 0, 0, 2)]+=0.825527526539*x_ref[2]
+            arg[(3, 0, 1, 0)]+=0.12473894876*x[2]
+            ref[(3, 0, 1, 0)]+=0.12473894876*x_ref[2]
+            arg[(3, 0, 1, 1)]+=0.34896329044*x[2]
+            ref[(3, 0, 1, 1)]+=0.34896329044*x_ref[2]
+            arg[(3, 0, 1, 2)]+=-0.130412234895*x[2]
+            ref[(3, 0, 1, 2)]+=-0.130412234895*x_ref[2]
+            arg[(3, 0, 2, 0)]+=-0.133198287921*x[2]
+            ref[(3, 0, 2, 0)]+=-0.133198287921*x_ref[2]
+            arg[(3, 0, 2, 1)]+=-0.413514418969*x[2]
+            ref[(3, 0, 2, 1)]+=-0.413514418969*x_ref[2]
+            arg[(3, 0, 2, 2)]+=0.111856668613*x[2]
+            ref[(3, 0, 2, 2)]+=0.111856668613*x_ref[2]
+            arg[(3, 1, 0, 0)]+=-0.767443560802*x[2]
+            ref[(3, 1, 0, 0)]+=-0.767443560802*x_ref[2]
+            arg[(3, 1, 0, 1)]+=0.298505134285*x[2]
+            ref[(3, 1, 0, 1)]+=0.298505134285*x_ref[2]
+            arg[(3, 1, 0, 2)]+=-0.115491794289*x[2]
+            ref[(3, 1, 0, 2)]+=-0.115491794289*x_ref[2]
+            arg[(3, 1, 1, 0)]+=-0.0301453990033*x[2]
+            ref[(3, 1, 1, 0)]+=-0.0301453990033*x_ref[2]
+            arg[(3, 1, 1, 1)]+=0.300456258554*x[2]
+            ref[(3, 1, 1, 1)]+=0.300456258554*x_ref[2]
+            arg[(3, 1, 1, 2)]+=0.0982956942527*x[2]
+            ref[(3, 1, 1, 2)]+=0.0982956942527*x_ref[2]
+            arg[(3, 1, 2, 0)]+=-0.809589727345*x[2]
+            ref[(3, 1, 2, 0)]+=-0.809589727345*x_ref[2]
+            arg[(3, 1, 2, 1)]+=-0.510255295098*x[2]
+            ref[(3, 1, 2, 1)]+=-0.510255295098*x_ref[2]
+            arg[(3, 1, 2, 2)]+=0.321149616057*x[2]
+            ref[(3, 1, 2, 2)]+=0.321149616057*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 3, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.376799320001*x[0]**o + (0.72030889118)*x[0] + (0.0821405922467)*x[1]**o + (0.569454350694)*x[1]
+        ref=-0.376799320001*x_ref[0]**o + (0.72030889118)*x_ref[0] + (0.0821405922467)*x_ref[1]**o + (0.569454350694)*x_ref[1]
+        if dim==3:
+            arg+=(-0.95955739919)*x[2]**o + (0.0108061076362)*x[2]
+            ref+=(-0.95955739919)*x_ref[2]**o + (0.0108061076362)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=0.39387913936*x[0]**o + (-0.147169478403)*x[0] + (0.721343723921)*x[1]**o + (-0.3599542584)*x[1]
+        ref[(0,)]=0.39387913936*x_ref[0]**o + (-0.147169478403)*x_ref[0] + (0.721343723921)*x_ref[1]**o + (-0.3599542584)*x_ref[1]
+        arg[(1,)]=-0.44562467517*x[0]**o + (0.263594734982)*x[0] + (-0.639475848868)*x[1]**o + (-0.969156714895)*x[1]
+        ref[(1,)]=-0.44562467517*x_ref[0]**o + (0.263594734982)*x_ref[0] + (-0.639475848868)*x_ref[1]**o + (-0.969156714895)*x_ref[1]
+        arg[(2,)]=-0.0569765569915*x[0]**o + (0.553800582826)*x[0] + (-0.541859703801)*x[1]**o + (-0.891407455528)*x[1]
+        ref[(2,)]=-0.0569765569915*x_ref[0]**o + (0.553800582826)*x_ref[0] + (-0.541859703801)*x_ref[1]**o + (-0.891407455528)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=-0.95329210676*x[2]**o + (-0.185757460412)*x[2]
+            ref[(0,)]+=-0.95329210676*x_ref[2]**o + (-0.185757460412)*x_ref[2]
+            arg[(1,)]+=0.257969123564*x[2]**o + (0.146938122433)*x[2]
+            ref[(1,)]+=0.257969123564*x_ref[2]**o + (0.146938122433)*x_ref[2]
+            arg[(2,)]+=-0.960585765123*x[2]**o + (0.838242945142)*x[2]
+            ref[(2,)]+=-0.960585765123*x_ref[2]**o + (0.838242945142)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 2),w)
+        ref = Data(0,(2, 2),w_ref)
+        arg[(0, 0)]=-0.620194237611*x[0]**o + (-0.581184541716)*x[0] + (-0.983656267365)*x[1]**o + (0.525282885173)*x[1]
+        ref[(0, 0)]=-0.620194237611*x_ref[0]**o + (-0.581184541716)*x_ref[0] + (-0.983656267365)*x_ref[1]**o + (0.525282885173)*x_ref[1]
+        arg[(0, 1)]=-0.00512526655122*x[0]**o + (0.168628841496)*x[0] + (-0.711423954092)*x[1]**o + (-0.774434788804)*x[1]
+        ref[(0, 1)]=-0.00512526655122*x_ref[0]**o + (0.168628841496)*x_ref[0] + (-0.711423954092)*x_ref[1]**o + (-0.774434788804)*x_ref[1]
+        arg[(1, 0)]=-0.502383159265*x[0]**o + (0.482778992676)*x[0] + (0.642543429683)*x[1]**o + (-0.664443257479)*x[1]
+        ref[(1, 0)]=-0.502383159265*x_ref[0]**o + (0.482778992676)*x_ref[0] + (0.642543429683)*x_ref[1]**o + (-0.664443257479)*x_ref[1]
+        arg[(1, 1)]=0.188068568567*x[0]**o + (0.832973356892)*x[0] + (0.724177174787)*x[1]**o + (-0.328246038655)*x[1]
+        ref[(1, 1)]=0.188068568567*x_ref[0]**o + (0.832973356892)*x_ref[0] + (0.724177174787)*x_ref[1]**o + (-0.328246038655)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.510899233239*x[2]**o + (-0.0572352070754)*x[2]
+            ref[(0, 0)]+=0.510899233239*x_ref[2]**o + (-0.0572352070754)*x_ref[2]
+            arg[(0, 1)]+=-0.86475678166*x[2]**o + (0.715417153955)*x[2]
+            ref[(0, 1)]+=-0.86475678166*x_ref[2]**o + (0.715417153955)*x_ref[2]
+            arg[(1, 0)]+=0.694134294229*x[2]**o + (0.189235522727)*x[2]
+            ref[(1, 0)]+=0.694134294229*x_ref[2]**o + (0.189235522727)*x_ref[2]
+            arg[(1, 1)]+=-0.961817173911*x[2]**o + (-0.00107734585214)*x[2]
+            ref[(1, 1)]+=-0.961817173911*x_ref[2]**o + (-0.00107734585214)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2, 4),w)
+        ref = Data(0,(4, 2, 4),w_ref)
+        arg[(0, 0, 0)]=0.721890600056*x[0]**o + (0.601865084986)*x[0] + (-0.521738733733)*x[1]**o + (-0.175894394564)*x[1]
+        ref[(0, 0, 0)]=0.721890600056*x_ref[0]**o + (0.601865084986)*x_ref[0] + (-0.521738733733)*x_ref[1]**o + (-0.175894394564)*x_ref[1]
+        arg[(0, 0, 1)]=-0.0431316328574*x[0]**o + (-0.319426717524)*x[0] + (-0.195014184372)*x[1]**o + (-0.820710673746)*x[1]
+        ref[(0, 0, 1)]=-0.0431316328574*x_ref[0]**o + (-0.319426717524)*x_ref[0] + (-0.195014184372)*x_ref[1]**o + (-0.820710673746)*x_ref[1]
+        arg[(0, 0, 2)]=0.614468712456*x[0]**o + (-0.459017520933)*x[0] + (0.334432275868)*x[1]**o + (0.00415215145876)*x[1]
+        ref[(0, 0, 2)]=0.614468712456*x_ref[0]**o + (-0.459017520933)*x_ref[0] + (0.334432275868)*x_ref[1]**o + (0.00415215145876)*x_ref[1]
+        arg[(0, 0, 3)]=0.0162523987848*x[0]**o + (-0.671771759491)*x[0] + (0.200394253032)*x[1]**o + (0.415991907863)*x[1]
+        ref[(0, 0, 3)]=0.0162523987848*x_ref[0]**o + (-0.671771759491)*x_ref[0] + (0.200394253032)*x_ref[1]**o + (0.415991907863)*x_ref[1]
+        arg[(0, 1, 0)]=-0.0351934794465*x[0]**o + (-0.656124212196)*x[0] + (-0.770515750422)*x[1]**o + (-0.0162475827262)*x[1]
+        ref[(0, 1, 0)]=-0.0351934794465*x_ref[0]**o + (-0.656124212196)*x_ref[0] + (-0.770515750422)*x_ref[1]**o + (-0.0162475827262)*x_ref[1]
+        arg[(0, 1, 1)]=-0.897912370221*x[0]**o + (0.632951434873)*x[0] + (0.879822316377)*x[1]**o + (-0.508856047369)*x[1]
+        ref[(0, 1, 1)]=-0.897912370221*x_ref[0]**o + (0.632951434873)*x_ref[0] + (0.879822316377)*x_ref[1]**o + (-0.508856047369)*x_ref[1]
+        arg[(0, 1, 2)]=0.578270100472*x[0]**o + (0.803477070404)*x[0] + (-0.531953190394)*x[1]**o + (-0.380147260233)*x[1]
+        ref[(0, 1, 2)]=0.578270100472*x_ref[0]**o + (0.803477070404)*x_ref[0] + (-0.531953190394)*x_ref[1]**o + (-0.380147260233)*x_ref[1]
+        arg[(0, 1, 3)]=0.655846456861*x[0]**o + (0.229913827083)*x[0] + (0.527667953071)*x[1]**o + (0.627065513202)*x[1]
+        ref[(0, 1, 3)]=0.655846456861*x_ref[0]**o + (0.229913827083)*x_ref[0] + (0.527667953071)*x_ref[1]**o + (0.627065513202)*x_ref[1]
+        arg[(1, 0, 0)]=0.646880395168*x[0]**o + (-0.122046459199)*x[0] + (0.345743015928)*x[1]**o + (-0.274050830137)*x[1]
+        ref[(1, 0, 0)]=0.646880395168*x_ref[0]**o + (-0.122046459199)*x_ref[0] + (0.345743015928)*x_ref[1]**o + (-0.274050830137)*x_ref[1]
+        arg[(1, 0, 1)]=-0.818561952674*x[0]**o + (-0.758054526443)*x[0] + (-0.979167837484)*x[1]**o + (0.627695928399)*x[1]
+        ref[(1, 0, 1)]=-0.818561952674*x_ref[0]**o + (-0.758054526443)*x_ref[0] + (-0.979167837484)*x_ref[1]**o + (0.627695928399)*x_ref[1]
+        arg[(1, 0, 2)]=-0.550811943933*x[0]**o + (0.43234915819)*x[0] + (-0.795118705151)*x[1]**o + (-0.313890272799)*x[1]
+        ref[(1, 0, 2)]=-0.550811943933*x_ref[0]**o + (0.43234915819)*x_ref[0] + (-0.795118705151)*x_ref[1]**o + (-0.313890272799)*x_ref[1]
+        arg[(1, 0, 3)]=-0.283087101407*x[0]**o + (0.157816671899)*x[0] + (-0.88957154117)*x[1]**o + (0.729708737367)*x[1]
+        ref[(1, 0, 3)]=-0.283087101407*x_ref[0]**o + (0.157816671899)*x_ref[0] + (-0.88957154117)*x_ref[1]**o + (0.729708737367)*x_ref[1]
+        arg[(1, 1, 0)]=-0.330519735397*x[0]**o + (0.232981669684)*x[0] + (-0.652989703277)*x[1]**o + (-0.7285097295)*x[1]
+        ref[(1, 1, 0)]=-0.330519735397*x_ref[0]**o + (0.232981669684)*x_ref[0] + (-0.652989703277)*x_ref[1]**o + (-0.7285097295)*x_ref[1]
+        arg[(1, 1, 1)]=0.95472906736*x[0]**o + (-0.0368248427551)*x[0] + (-0.798908242737)*x[1]**o + (-0.617460070074)*x[1]
+        ref[(1, 1, 1)]=0.95472906736*x_ref[0]**o + (-0.0368248427551)*x_ref[0] + (-0.798908242737)*x_ref[1]**o + (-0.617460070074)*x_ref[1]
+        arg[(1, 1, 2)]=-0.211411368048*x[0]**o + (0.332311199972)*x[0] + (-0.0339126495831)*x[1]**o + (0.626582934864)*x[1]
+        ref[(1, 1, 2)]=-0.211411368048*x_ref[0]**o + (0.332311199972)*x_ref[0] + (-0.0339126495831)*x_ref[1]**o + (0.626582934864)*x_ref[1]
+        arg[(1, 1, 3)]=-0.662114239834*x[0]**o + (0.653278815732)*x[0] + (0.141706075531)*x[1]**o + (-0.203202320031)*x[1]
+        ref[(1, 1, 3)]=-0.662114239834*x_ref[0]**o + (0.653278815732)*x_ref[0] + (0.141706075531)*x_ref[1]**o + (-0.203202320031)*x_ref[1]
+        arg[(2, 0, 0)]=0.907949066902*x[0]**o + (0.462340617013)*x[0] + (0.358425565443)*x[1]**o + (-0.649195494984)*x[1]
+        ref[(2, 0, 0)]=0.907949066902*x_ref[0]**o + (0.462340617013)*x_ref[0] + (0.358425565443)*x_ref[1]**o + (-0.649195494984)*x_ref[1]
+        arg[(2, 0, 1)]=-0.77002271856*x[0]**o + (0.587098777344)*x[0] + (-0.0184065443168)*x[1]**o + (0.145211189084)*x[1]
+        ref[(2, 0, 1)]=-0.77002271856*x_ref[0]**o + (0.587098777344)*x_ref[0] + (-0.0184065443168)*x_ref[1]**o + (0.145211189084)*x_ref[1]
+        arg[(2, 0, 2)]=0.337665597527*x[0]**o + (-0.385834756386)*x[0] + (0.47462164883)*x[1]**o + (-0.446793837408)*x[1]
+        ref[(2, 0, 2)]=0.337665597527*x_ref[0]**o + (-0.385834756386)*x_ref[0] + (0.47462164883)*x_ref[1]**o + (-0.446793837408)*x_ref[1]
+        arg[(2, 0, 3)]=0.258660067907*x[0]**o + (-0.676612043594)*x[0] + (-0.148370540694)*x[1]**o + (-0.075365296916)*x[1]
+        ref[(2, 0, 3)]=0.258660067907*x_ref[0]**o + (-0.676612043594)*x_ref[0] + (-0.148370540694)*x_ref[1]**o + (-0.075365296916)*x_ref[1]
+        arg[(2, 1, 0)]=-0.621992495078*x[0]**o + (0.622775205117)*x[0] + (-0.044953240202)*x[1]**o + (0.434118246044)*x[1]
+        ref[(2, 1, 0)]=-0.621992495078*x_ref[0]**o + (0.622775205117)*x_ref[0] + (-0.044953240202)*x_ref[1]**o + (0.434118246044)*x_ref[1]
+        arg[(2, 1, 1)]=-0.182429944948*x[0]**o + (-0.88872988888)*x[0] + (0.391746563723)*x[1]**o + (-0.199096577582)*x[1]
+        ref[(2, 1, 1)]=-0.182429944948*x_ref[0]**o + (-0.88872988888)*x_ref[0] + (0.391746563723)*x_ref[1]**o + (-0.199096577582)*x_ref[1]
+        arg[(2, 1, 2)]=-0.126374551674*x[0]**o + (-0.416597486927)*x[0] + (-0.144220769982)*x[1]**o + (0.280088356521)*x[1]
+        ref[(2, 1, 2)]=-0.126374551674*x_ref[0]**o + (-0.416597486927)*x_ref[0] + (-0.144220769982)*x_ref[1]**o + (0.280088356521)*x_ref[1]
+        arg[(2, 1, 3)]=0.24987273919*x[0]**o + (-0.310326246261)*x[0] + (0.424453573437)*x[1]**o + (-0.40588870511)*x[1]
+        ref[(2, 1, 3)]=0.24987273919*x_ref[0]**o + (-0.310326246261)*x_ref[0] + (0.424453573437)*x_ref[1]**o + (-0.40588870511)*x_ref[1]
+        arg[(3, 0, 0)]=0.0570302560054*x[0]**o + (0.369061981947)*x[0] + (0.483255016198)*x[1]**o + (0.366336673888)*x[1]
+        ref[(3, 0, 0)]=0.0570302560054*x_ref[0]**o + (0.369061981947)*x_ref[0] + (0.483255016198)*x_ref[1]**o + (0.366336673888)*x_ref[1]
+        arg[(3, 0, 1)]=-0.84427552697*x[0]**o + (-0.700122752443)*x[0] + (0.0760980722292)*x[1]**o + (-0.677638939089)*x[1]
+        ref[(3, 0, 1)]=-0.84427552697*x_ref[0]**o + (-0.700122752443)*x_ref[0] + (0.0760980722292)*x_ref[1]**o + (-0.677638939089)*x_ref[1]
+        arg[(3, 0, 2)]=-0.117643454169*x[0]**o + (-0.469170832101)*x[0] + (-0.455372753746)*x[1]**o + (0.0356174805039)*x[1]
+        ref[(3, 0, 2)]=-0.117643454169*x_ref[0]**o + (-0.469170832101)*x_ref[0] + (-0.455372753746)*x_ref[1]**o + (0.0356174805039)*x_ref[1]
+        arg[(3, 0, 3)]=0.259558997677*x[0]**o + (-0.5018518802)*x[0] + (-0.531611805586)*x[1]**o + (0.0978730329991)*x[1]
+        ref[(3, 0, 3)]=0.259558997677*x_ref[0]**o + (-0.5018518802)*x_ref[0] + (-0.531611805586)*x_ref[1]**o + (0.0978730329991)*x_ref[1]
+        arg[(3, 1, 0)]=-0.693664024477*x[0]**o + (-0.759105080235)*x[0] + (0.177192777893)*x[1]**o + (-0.372224885529)*x[1]
+        ref[(3, 1, 0)]=-0.693664024477*x_ref[0]**o + (-0.759105080235)*x_ref[0] + (0.177192777893)*x_ref[1]**o + (-0.372224885529)*x_ref[1]
+        arg[(3, 1, 1)]=-0.191931201556*x[0]**o + (0.391241864183)*x[0] + (-0.805581046952)*x[1]**o + (0.999482157249)*x[1]
+        ref[(3, 1, 1)]=-0.191931201556*x_ref[0]**o + (0.391241864183)*x_ref[0] + (-0.805581046952)*x_ref[1]**o + (0.999482157249)*x_ref[1]
+        arg[(3, 1, 2)]=0.0780841418548*x[0]**o + (0.883031124039)*x[0] + (0.268012947368)*x[1]**o + (-0.996755942654)*x[1]
+        ref[(3, 1, 2)]=0.0780841418548*x_ref[0]**o + (0.883031124039)*x_ref[0] + (0.268012947368)*x_ref[1]**o + (-0.996755942654)*x_ref[1]
+        arg[(3, 1, 3)]=-0.14909296892*x[0]**o + (-0.133785667056)*x[0] + (-0.598821308952)*x[1]**o + (0.0108219605757)*x[1]
+        ref[(3, 1, 3)]=-0.14909296892*x_ref[0]**o + (-0.133785667056)*x_ref[0] + (-0.598821308952)*x_ref[1]**o + (0.0108219605757)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=-0.127862185542*x[2]**o + (0.89260960002)*x[2]
+            ref[(0, 0, 0)]+=-0.127862185542*x_ref[2]**o + (0.89260960002)*x_ref[2]
+            arg[(0, 0, 1)]+=0.0867063855781*x[2]**o + (-0.0149693287174)*x[2]
+            ref[(0, 0, 1)]+=0.0867063855781*x_ref[2]**o + (-0.0149693287174)*x_ref[2]
+            arg[(0, 0, 2)]+=0.980276807988*x[2]**o + (-0.194780924769)*x[2]
+            ref[(0, 0, 2)]+=0.980276807988*x_ref[2]**o + (-0.194780924769)*x_ref[2]
+            arg[(0, 0, 3)]+=-0.967930652808*x[2]**o + (-0.517370857241)*x[2]
+            ref[(0, 0, 3)]+=-0.967930652808*x_ref[2]**o + (-0.517370857241)*x_ref[2]
+            arg[(0, 1, 0)]+=0.245963065942*x[2]**o + (-0.891403140964)*x[2]
+            ref[(0, 1, 0)]+=0.245963065942*x_ref[2]**o + (-0.891403140964)*x_ref[2]
+            arg[(0, 1, 1)]+=-0.915634588253*x[2]**o + (0.391314253192)*x[2]
+            ref[(0, 1, 1)]+=-0.915634588253*x_ref[2]**o + (0.391314253192)*x_ref[2]
+            arg[(0, 1, 2)]+=0.0194330387922*x[2]**o + (0.64641308294)*x[2]
+            ref[(0, 1, 2)]+=0.0194330387922*x_ref[2]**o + (0.64641308294)*x_ref[2]
+            arg[(0, 1, 3)]+=-0.758093819102*x[2]**o + (0.52891355722)*x[2]
+            ref[(0, 1, 3)]+=-0.758093819102*x_ref[2]**o + (0.52891355722)*x_ref[2]
+            arg[(1, 0, 0)]+=-0.658478934026*x[2]**o + (-0.56110146348)*x[2]
+            ref[(1, 0, 0)]+=-0.658478934026*x_ref[2]**o + (-0.56110146348)*x_ref[2]
+            arg[(1, 0, 1)]+=0.61987793528*x[2]**o + (-0.593153726731)*x[2]
+            ref[(1, 0, 1)]+=0.61987793528*x_ref[2]**o + (-0.593153726731)*x_ref[2]
+            arg[(1, 0, 2)]+=0.567104397263*x[2]**o + (0.923947253161)*x[2]
+            ref[(1, 0, 2)]+=0.567104397263*x_ref[2]**o + (0.923947253161)*x_ref[2]
+            arg[(1, 0, 3)]+=-0.952993783388*x[2]**o + (-0.420966108849)*x[2]
+            ref[(1, 0, 3)]+=-0.952993783388*x_ref[2]**o + (-0.420966108849)*x_ref[2]
+            arg[(1, 1, 0)]+=-0.301904152484*x[2]**o + (0.471778767692)*x[2]
+            ref[(1, 1, 0)]+=-0.301904152484*x_ref[2]**o + (0.471778767692)*x_ref[2]
+            arg[(1, 1, 1)]+=-0.900900305947*x[2]**o + (0.117638696248)*x[2]
+            ref[(1, 1, 1)]+=-0.900900305947*x_ref[2]**o + (0.117638696248)*x_ref[2]
+            arg[(1, 1, 2)]+=0.480295673628*x[2]**o + (0.639296900048)*x[2]
+            ref[(1, 1, 2)]+=0.480295673628*x_ref[2]**o + (0.639296900048)*x_ref[2]
+            arg[(1, 1, 3)]+=0.743102617014*x[2]**o + (-0.21585947276)*x[2]
+            ref[(1, 1, 3)]+=0.743102617014*x_ref[2]**o + (-0.21585947276)*x_ref[2]
+            arg[(2, 0, 0)]+=0.248738405612*x[2]**o + (-0.68632199112)*x[2]
+            ref[(2, 0, 0)]+=0.248738405612*x_ref[2]**o + (-0.68632199112)*x_ref[2]
+            arg[(2, 0, 1)]+=0.548952270215*x[2]**o + (-0.556856278785)*x[2]
+            ref[(2, 0, 1)]+=0.548952270215*x_ref[2]**o + (-0.556856278785)*x_ref[2]
+            arg[(2, 0, 2)]+=-0.801056380244*x[2]**o + (-0.785635815801)*x[2]
+            ref[(2, 0, 2)]+=-0.801056380244*x_ref[2]**o + (-0.785635815801)*x_ref[2]
+            arg[(2, 0, 3)]+=-0.110261920582*x[2]**o + (-0.104600776501)*x[2]
+            ref[(2, 0, 3)]+=-0.110261920582*x_ref[2]**o + (-0.104600776501)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.943128740985*x[2]**o + (-0.766614429796)*x[2]
+            ref[(2, 1, 0)]+=-0.943128740985*x_ref[2]**o + (-0.766614429796)*x_ref[2]
+            arg[(2, 1, 1)]+=0.378974890783*x[2]**o + (-0.294054901575)*x[2]
+            ref[(2, 1, 1)]+=0.378974890783*x_ref[2]**o + (-0.294054901575)*x_ref[2]
+            arg[(2, 1, 2)]+=0.646675979391*x[2]**o + (0.985120797585)*x[2]
+            ref[(2, 1, 2)]+=0.646675979391*x_ref[2]**o + (0.985120797585)*x_ref[2]
+            arg[(2, 1, 3)]+=0.399837572608*x[2]**o + (-0.59192189078)*x[2]
+            ref[(2, 1, 3)]+=0.399837572608*x_ref[2]**o + (-0.59192189078)*x_ref[2]
+            arg[(3, 0, 0)]+=0.32952423235*x[2]**o + (0.930165115076)*x[2]
+            ref[(3, 0, 0)]+=0.32952423235*x_ref[2]**o + (0.930165115076)*x_ref[2]
+            arg[(3, 0, 1)]+=0.44882147943*x[2]**o + (0.760213810004)*x[2]
+            ref[(3, 0, 1)]+=0.44882147943*x_ref[2]**o + (0.760213810004)*x_ref[2]
+            arg[(3, 0, 2)]+=-0.626660004481*x[2]**o + (-0.177004634539)*x[2]
+            ref[(3, 0, 2)]+=-0.626660004481*x_ref[2]**o + (-0.177004634539)*x_ref[2]
+            arg[(3, 0, 3)]+=0.614097767003*x[2]**o + (-0.223157231344)*x[2]
+            ref[(3, 0, 3)]+=0.614097767003*x_ref[2]**o + (-0.223157231344)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.358248112969*x[2]**o + (0.680613601223)*x[2]
+            ref[(3, 1, 0)]+=-0.358248112969*x_ref[2]**o + (0.680613601223)*x_ref[2]
+            arg[(3, 1, 1)]+=0.830912277733*x[2]**o + (-0.618495115228)*x[2]
+            ref[(3, 1, 1)]+=0.830912277733*x_ref[2]**o + (-0.618495115228)*x_ref[2]
+            arg[(3, 1, 2)]+=-0.0670317487795*x[2]**o + (-0.963255943446)*x[2]
+            ref[(3, 1, 2)]+=-0.0670317487795*x_ref[2]**o + (-0.963255943446)*x_ref[2]
+            arg[(3, 1, 3)]+=0.00797257517127*x[2]**o + (-0.303796336369)*x[2]
+            ref[(3, 1, 3)]+=0.00797257517127*x_ref[2]**o + (-0.303796336369)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactZero(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactZero(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 2, 3),w)
+        ref = Data(0,(2, 4, 2, 3),w_ref)
+        arg[(0, 0, 0, 0)]=0.0113253421012*x[0]**o + (-0.734641217036)*x[0] + (0.114731398727)*x[1]**o + (0.768719610948)*x[1]
+        ref[(0, 0, 0, 0)]=0.0113253421012*x_ref[0]**o + (-0.734641217036)*x_ref[0] + (0.114731398727)*x_ref[1]**o + (0.768719610948)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.324813065248*x[0]**o + (-0.771049736194)*x[0] + (0.048121594792)*x[1]**o + (-0.660683794214)*x[1]
+        ref[(0, 0, 0, 1)]=0.324813065248*x_ref[0]**o + (-0.771049736194)*x_ref[0] + (0.048121594792)*x_ref[1]**o + (-0.660683794214)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.839031267045*x[0]**o + (0.965680604824)*x[0] + (0.707390362761)*x[1]**o + (-0.869245393526)*x[1]
+        ref[(0, 0, 0, 2)]=0.839031267045*x_ref[0]**o + (0.965680604824)*x_ref[0] + (0.707390362761)*x_ref[1]**o + (-0.869245393526)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.990666476693*x[0]**o + (0.326619009989)*x[0] + (0.55994741845)*x[1]**o + (-0.775293602032)*x[1]
+        ref[(0, 0, 1, 0)]=-0.990666476693*x_ref[0]**o + (0.326619009989)*x_ref[0] + (0.55994741845)*x_ref[1]**o + (-0.775293602032)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.237600428413*x[0]**o + (-0.892502733716)*x[0] + (0.14074069683)*x[1]**o + (0.182559766578)*x[1]
+        ref[(0, 0, 1, 1)]=0.237600428413*x_ref[0]**o + (-0.892502733716)*x_ref[0] + (0.14074069683)*x_ref[1]**o + (0.182559766578)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.112549465018*x[0]**o + (0.637499516998)*x[0] + (-0.912160316493)*x[1]**o + (0.217073559751)*x[1]
+        ref[(0, 0, 1, 2)]=0.112549465018*x_ref[0]**o + (0.637499516998)*x_ref[0] + (-0.912160316493)*x_ref[1]**o + (0.217073559751)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.0128847395016*x[0]**o + (-0.945525927539)*x[0] + (0.34036871408)*x[1]**o + (0.136045783004)*x[1]
+        ref[(0, 1, 0, 0)]=0.0128847395016*x_ref[0]**o + (-0.945525927539)*x_ref[0] + (0.34036871408)*x_ref[1]**o + (0.136045783004)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.655029552407*x[0]**o + (-0.961056228194)*x[0] + (0.704764651921)*x[1]**o + (0.428600751355)*x[1]
+        ref[(0, 1, 0, 1)]=-0.655029552407*x_ref[0]**o + (-0.961056228194)*x_ref[0] + (0.704764651921)*x_ref[1]**o + (0.428600751355)*x_ref[1]
+        arg[(0, 1, 0, 2)]=-0.794910487776*x[0]**o + (-0.397030856759)*x[0] + (0.927884733603)*x[1]**o + (0.120947651985)*x[1]
+        ref[(0, 1, 0, 2)]=-0.794910487776*x_ref[0]**o + (-0.397030856759)*x_ref[0] + (0.927884733603)*x_ref[1]**o + (0.120947651985)*x_ref[1]
+        arg[(0, 1, 1, 0)]=-0.26458600963*x[0]**o + (-0.0969801553876)*x[0] + (-0.411667450508)*x[1]**o + (-0.878275021331)*x[1]
+        ref[(0, 1, 1, 0)]=-0.26458600963*x_ref[0]**o + (-0.0969801553876)*x_ref[0] + (-0.411667450508)*x_ref[1]**o + (-0.878275021331)*x_ref[1]
+        arg[(0, 1, 1, 1)]=-0.822266581258*x[0]**o + (0.952551247088)*x[0] + (0.779520562082)*x[1]**o + (0.569402492496)*x[1]
+        ref[(0, 1, 1, 1)]=-0.822266581258*x_ref[0]**o + (0.952551247088)*x_ref[0] + (0.779520562082)*x_ref[1]**o + (0.569402492496)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.718816473251*x[0]**o + (-0.499210296401)*x[0] + (-0.873156146568)*x[1]**o + (0.923337582598)*x[1]
+        ref[(0, 1, 1, 2)]=-0.718816473251*x_ref[0]**o + (-0.499210296401)*x_ref[0] + (-0.873156146568)*x_ref[1]**o + (0.923337582598)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.81526645876*x[0]**o + (0.99368631639)*x[0] + (0.890817747327)*x[1]**o + (0.76424930884)*x[1]
+        ref[(0, 2, 0, 0)]=0.81526645876*x_ref[0]**o + (0.99368631639)*x_ref[0] + (0.890817747327)*x_ref[1]**o + (0.76424930884)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.227184632154*x[0]**o + (0.693888529854)*x[0] + (-0.8582143786)*x[1]**o + (-0.674750973628)*x[1]
+        ref[(0, 2, 0, 1)]=-0.227184632154*x_ref[0]**o + (0.693888529854)*x_ref[0] + (-0.8582143786)*x_ref[1]**o + (-0.674750973628)*x_ref[1]
+        arg[(0, 2, 0, 2)]=0.400220410544*x[0]**o + (-0.398797560853)*x[0] + (-0.365425451315)*x[1]**o + (0.0795794304888)*x[1]
+        ref[(0, 2, 0, 2)]=0.400220410544*x_ref[0]**o + (-0.398797560853)*x_ref[0] + (-0.365425451315)*x_ref[1]**o + (0.0795794304888)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.0481023499105*x[0]**o + (0.311797379004)*x[0] + (0.859067907155)*x[1]**o + (-0.841672764112)*x[1]
+        ref[(0, 2, 1, 0)]=0.0481023499105*x_ref[0]**o + (0.311797379004)*x_ref[0] + (0.859067907155)*x_ref[1]**o + (-0.841672764112)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.938745282898*x[0]**o + (0.819277967595)*x[0] + (0.526825325751)*x[1]**o + (-0.614942623567)*x[1]
+        ref[(0, 2, 1, 1)]=0.938745282898*x_ref[0]**o + (0.819277967595)*x_ref[0] + (0.526825325751)*x_ref[1]**o + (-0.614942623567)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.815112295025*x[0]**o + (0.73817183642)*x[0] + (0.301528654679)*x[1]**o + (-0.668801298297)*x[1]
+        ref[(0, 2, 1, 2)]=0.815112295025*x_ref[0]**o + (0.73817183642)*x_ref[0] + (0.301528654679)*x_ref[1]**o + (-0.668801298297)*x_ref[1]
+        arg[(0, 3, 0, 0)]=-0.252823696037*x[0]**o + (0.656120351491)*x[0] + (0.254782762172)*x[1]**o + (0.0201518442006)*x[1]
+        ref[(0, 3, 0, 0)]=-0.252823696037*x_ref[0]**o + (0.656120351491)*x_ref[0] + (0.254782762172)*x_ref[1]**o + (0.0201518442006)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.495794418813*x[0]**o + (0.403331704937)*x[0] + (-0.982931812785)*x[1]**o + (-0.948423767775)*x[1]
+        ref[(0, 3, 0, 1)]=0.495794418813*x_ref[0]**o + (0.403331704937)*x_ref[0] + (-0.982931812785)*x_ref[1]**o + (-0.948423767775)*x_ref[1]
+        arg[(0, 3, 0, 2)]=0.962620716495*x[0]**o + (0.297371614924)*x[0] + (-0.180819176324)*x[1]**o + (0.73477944469)*x[1]
+        ref[(0, 3, 0, 2)]=0.962620716495*x_ref[0]**o + (0.297371614924)*x_ref[0] + (-0.180819176324)*x_ref[1]**o + (0.73477944469)*x_ref[1]
+        arg[(0, 3, 1, 0)]=0.895010064361*x[0]**o + (-0.62639537595)*x[0] + (0.802628096806)*x[1]**o + (-0.550301208177)*x[1]
+        ref[(0, 3, 1, 0)]=0.895010064361*x_ref[0]**o + (-0.62639537595)*x_ref[0] + (0.802628096806)*x_ref[1]**o + (-0.550301208177)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.527660391142*x[0]**o + (-0.585293721668)*x[0] + (0.380162299233)*x[1]**o + (0.151224533466)*x[1]
+        ref[(0, 3, 1, 1)]=0.527660391142*x_ref[0]**o + (-0.585293721668)*x_ref[0] + (0.380162299233)*x_ref[1]**o + (0.151224533466)*x_ref[1]
+        arg[(0, 3, 1, 2)]=0.236858604134*x[0]**o + (0.915240911084)*x[0] + (0.0586825834281)*x[1]**o + (0.547654545828)*x[1]
+        ref[(0, 3, 1, 2)]=0.236858604134*x_ref[0]**o + (0.915240911084)*x_ref[0] + (0.0586825834281)*x_ref[1]**o + (0.547654545828)*x_ref[1]
+        arg[(1, 0, 0, 0)]=0.659747656955*x[0]**o + (0.0662684482178)*x[0] + (0.653690791245)*x[1]**o + (-0.293741086584)*x[1]
+        ref[(1, 0, 0, 0)]=0.659747656955*x_ref[0]**o + (0.0662684482178)*x_ref[0] + (0.653690791245)*x_ref[1]**o + (-0.293741086584)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.0437009781905*x[0]**o + (-0.680129549679)*x[0] + (0.755987495953)*x[1]**o + (0.424377013947)*x[1]
+        ref[(1, 0, 0, 1)]=0.0437009781905*x_ref[0]**o + (-0.680129549679)*x_ref[0] + (0.755987495953)*x_ref[1]**o + (0.424377013947)*x_ref[1]
+        arg[(1, 0, 0, 2)]=0.58152178103*x[0]**o + (0.843667768132)*x[0] + (-0.624553361071)*x[1]**o + (0.309418351595)*x[1]
+        ref[(1, 0, 0, 2)]=0.58152178103*x_ref[0]**o + (0.843667768132)*x_ref[0] + (-0.624553361071)*x_ref[1]**o + (0.309418351595)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.51500318991*x[0]**o + (-0.0131284151854)*x[0] + (0.261356125431)*x[1]**o + (0.54950420532)*x[1]
+        ref[(1, 0, 1, 0)]=0.51500318991*x_ref[0]**o + (-0.0131284151854)*x_ref[0] + (0.261356125431)*x_ref[1]**o + (0.54950420532)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.846603436419*x[0]**o + (-0.615395733442)*x[0] + (0.660578106551)*x[1]**o + (0.421463211236)*x[1]
+        ref[(1, 0, 1, 1)]=0.846603436419*x_ref[0]**o + (-0.615395733442)*x_ref[0] + (0.660578106551)*x_ref[1]**o + (0.421463211236)*x_ref[1]
+        arg[(1, 0, 1, 2)]=-0.690028359033*x[0]**o + (0.139744205832)*x[0] + (0.991668805662)*x[1]**o + (-0.991304371219)*x[1]
+        ref[(1, 0, 1, 2)]=-0.690028359033*x_ref[0]**o + (0.139744205832)*x_ref[0] + (0.991668805662)*x_ref[1]**o + (-0.991304371219)*x_ref[1]
+        arg[(1, 1, 0, 0)]=0.0683716565567*x[0]**o + (-0.420562918856)*x[0] + (0.935529009192)*x[1]**o + (0.915381070116)*x[1]
+        ref[(1, 1, 0, 0)]=0.0683716565567*x_ref[0]**o + (-0.420562918856)*x_ref[0] + (0.935529009192)*x_ref[1]**o + (0.915381070116)*x_ref[1]
+        arg[(1, 1, 0, 1)]=-0.882650278586*x[0]**o + (0.42673554624)*x[0] + (0.858352545573)*x[1]**o + (-0.0832093726807)*x[1]
+        ref[(1, 1, 0, 1)]=-0.882650278586*x_ref[0]**o + (0.42673554624)*x_ref[0] + (0.858352545573)*x_ref[1]**o + (-0.0832093726807)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.800432581097*x[0]**o + (0.380908965291)*x[0] + (-0.380822798363)*x[1]**o + (-0.692744310869)*x[1]
+        ref[(1, 1, 0, 2)]=-0.800432581097*x_ref[0]**o + (0.380908965291)*x_ref[0] + (-0.380822798363)*x_ref[1]**o + (-0.692744310869)*x_ref[1]
+        arg[(1, 1, 1, 0)]=0.427469954264*x[0]**o + (-0.685202130936)*x[0] + (0.452893272353)*x[1]**o + (-0.264364022138)*x[1]
+        ref[(1, 1, 1, 0)]=0.427469954264*x_ref[0]**o + (-0.685202130936)*x_ref[0] + (0.452893272353)*x_ref[1]**o + (-0.264364022138)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.873217062587*x[0]**o + (-0.0824823103137)*x[0] + (-0.596818762462)*x[1]**o + (-0.0359261088583)*x[1]
+        ref[(1, 1, 1, 1)]=0.873217062587*x_ref[0]**o + (-0.0824823103137)*x_ref[0] + (-0.596818762462)*x_ref[1]**o + (-0.0359261088583)*x_ref[1]
+        arg[(1, 1, 1, 2)]=-0.768569262599*x[0]**o + (0.470553089037)*x[0] + (-0.0417730261189)*x[1]**o + (-0.348922967684)*x[1]
+        ref[(1, 1, 1, 2)]=-0.768569262599*x_ref[0]**o + (0.470553089037)*x_ref[0] + (-0.0417730261189)*x_ref[1]**o + (-0.348922967684)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.789737172723*x[0]**o + (-0.195526169222)*x[0] + (0.00402823575456)*x[1]**o + (-0.676623095614)*x[1]
+        ref[(1, 2, 0, 0)]=-0.789737172723*x_ref[0]**o + (-0.195526169222)*x_ref[0] + (0.00402823575456)*x_ref[1]**o + (-0.676623095614)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.220994171444*x[0]**o + (-0.473946790463)*x[0] + (0.346183250516)*x[1]**o + (0.593952048633)*x[1]
+        ref[(1, 2, 0, 1)]=-0.220994171444*x_ref[0]**o + (-0.473946790463)*x_ref[0] + (0.346183250516)*x_ref[1]**o + (0.593952048633)*x_ref[1]
+        arg[(1, 2, 0, 2)]=-0.0331937755549*x[0]**o + (0.214137004123)*x[0] + (0.423511728385)*x[1]**o + (-0.37132453664)*x[1]
+        ref[(1, 2, 0, 2)]=-0.0331937755549*x_ref[0]**o + (0.214137004123)*x_ref[0] + (0.423511728385)*x_ref[1]**o + (-0.37132453664)*x_ref[1]
+        arg[(1, 2, 1, 0)]=0.391462615809*x[0]**o + (-0.282684242404)*x[0] + (-0.616067322787)*x[1]**o + (-0.950541455907)*x[1]
+        ref[(1, 2, 1, 0)]=0.391462615809*x_ref[0]**o + (-0.282684242404)*x_ref[0] + (-0.616067322787)*x_ref[1]**o + (-0.950541455907)*x_ref[1]
+        arg[(1, 2, 1, 1)]=-0.665715124507*x[0]**o + (-0.996362004615)*x[0] + (-0.629806996138)*x[1]**o + (0.0041521195589)*x[1]
+        ref[(1, 2, 1, 1)]=-0.665715124507*x_ref[0]**o + (-0.996362004615)*x_ref[0] + (-0.629806996138)*x_ref[1]**o + (0.0041521195589)*x_ref[1]
+        arg[(1, 2, 1, 2)]=0.444724439968*x[0]**o + (-0.490452744174)*x[0] + (-0.485862306022)*x[1]**o + (0.652467101323)*x[1]
+        ref[(1, 2, 1, 2)]=0.444724439968*x_ref[0]**o + (-0.490452744174)*x_ref[0] + (-0.485862306022)*x_ref[1]**o + (0.652467101323)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.271975406858*x[0]**o + (0.0229274164027)*x[0] + (0.681727304148)*x[1]**o + (0.0202599031268)*x[1]
+        ref[(1, 3, 0, 0)]=0.271975406858*x_ref[0]**o + (0.0229274164027)*x_ref[0] + (0.681727304148)*x_ref[1]**o + (0.0202599031268)*x_ref[1]
+        arg[(1, 3, 0, 1)]=-0.897893558938*x[0]**o + (-0.382138050483)*x[0] + (0.334638587882)*x[1]**o + (0.669728523712)*x[1]
+        ref[(1, 3, 0, 1)]=-0.897893558938*x_ref[0]**o + (-0.382138050483)*x_ref[0] + (0.334638587882)*x_ref[1]**o + (0.669728523712)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.794267004308*x[0]**o + (0.697154099163)*x[0] + (-0.126448950644)*x[1]**o + (-0.707374218459)*x[1]
+        ref[(1, 3, 0, 2)]=0.794267004308*x_ref[0]**o + (0.697154099163)*x_ref[0] + (-0.126448950644)*x_ref[1]**o + (-0.707374218459)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.090208014807*x[0]**o + (-0.267452565912)*x[0] + (-0.559935593682)*x[1]**o + (0.769415194126)*x[1]
+        ref[(1, 3, 1, 0)]=-0.090208014807*x_ref[0]**o + (-0.267452565912)*x_ref[0] + (-0.559935593682)*x_ref[1]**o + (0.769415194126)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.621109374911*x[0]**o + (0.442668854356)*x[0] + (-0.567415790872)*x[1]**o + (0.570422647543)*x[1]
+        ref[(1, 3, 1, 1)]=0.621109374911*x_ref[0]**o + (0.442668854356)*x_ref[0] + (-0.567415790872)*x_ref[1]**o + (0.570422647543)*x_ref[1]
+        arg[(1, 3, 1, 2)]=0.354381473768*x[0]**o + (-0.477874675711)*x[0] + (-0.8134631009)*x[1]**o + (-0.966229449918)*x[1]
+        ref[(1, 3, 1, 2)]=0.354381473768*x_ref[0]**o + (-0.477874675711)*x_ref[0] + (-0.8134631009)*x_ref[1]**o + (-0.966229449918)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.0989051979727*x[2]**o + (-0.658033163763)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.0989051979727*x_ref[2]**o + (-0.658033163763)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.582900756588*x[2]**o + (-0.851588640624)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.582900756588*x_ref[2]**o + (-0.851588640624)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.0611428109483*x[2]**o + (-0.183647149829)*x[2]
+            ref[(0, 0, 0, 2)]+=0.0611428109483*x_ref[2]**o + (-0.183647149829)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.705628116377*x[2]**o + (0.73714821095)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.705628116377*x_ref[2]**o + (0.73714821095)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.920400230644*x[2]**o + (-0.995431797457)*x[2]
+            ref[(0, 0, 1, 1)]+=0.920400230644*x_ref[2]**o + (-0.995431797457)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.836569878051*x[2]**o + (0.0979627354586)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.836569878051*x_ref[2]**o + (0.0979627354586)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=0.591552032285*x[2]**o + (0.487132911007)*x[2]
+            ref[(0, 1, 0, 0)]+=0.591552032285*x_ref[2]**o + (0.487132911007)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=0.589578455913*x[2]**o + (0.151130274432)*x[2]
+            ref[(0, 1, 0, 1)]+=0.589578455913*x_ref[2]**o + (0.151130274432)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=-0.154832010531*x[2]**o + (0.678890486531)*x[2]
+            ref[(0, 1, 0, 2)]+=-0.154832010531*x_ref[2]**o + (0.678890486531)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.0333918521437*x[2]**o + (0.153310029667)*x[2]
+            ref[(0, 1, 1, 0)]+=0.0333918521437*x_ref[2]**o + (0.153310029667)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=-0.780495575336*x[2]**o + (-0.985162728939)*x[2]
+            ref[(0, 1, 1, 1)]+=-0.780495575336*x_ref[2]**o + (-0.985162728939)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.391035455342*x[2]**o + (-0.0779476989226)*x[2]
+            ref[(0, 1, 1, 2)]+=0.391035455342*x_ref[2]**o + (-0.0779476989226)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=0.806567783479*x[2]**o + (-0.513939035518)*x[2]
+            ref[(0, 2, 0, 0)]+=0.806567783479*x_ref[2]**o + (-0.513939035518)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=-0.781442333304*x[2]**o + (0.883530020549)*x[2]
+            ref[(0, 2, 0, 1)]+=-0.781442333304*x_ref[2]**o + (0.883530020549)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=-0.967121761525*x[2]**o + (-0.450496752909)*x[2]
+            ref[(0, 2, 0, 2)]+=-0.967121761525*x_ref[2]**o + (-0.450496752909)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=-0.796376067664*x[2]**o + (0.855642898912)*x[2]
+            ref[(0, 2, 1, 0)]+=-0.796376067664*x_ref[2]**o + (0.855642898912)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=0.661379360305*x[2]**o + (0.83905412534)*x[2]
+            ref[(0, 2, 1, 1)]+=0.661379360305*x_ref[2]**o + (0.83905412534)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.215198203075*x[2]**o + (0.0974984583552)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.215198203075*x_ref[2]**o + (0.0974984583552)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=0.214539899639*x[2]**o + (-0.525928755777)*x[2]
+            ref[(0, 3, 0, 0)]+=0.214539899639*x_ref[2]**o + (-0.525928755777)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.327068941402*x[2]**o + (0.926128488054)*x[2]
+            ref[(0, 3, 0, 1)]+=0.327068941402*x_ref[2]**o + (0.926128488054)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=0.772657228301*x[2]**o + (-0.493325153942)*x[2]
+            ref[(0, 3, 0, 2)]+=0.772657228301*x_ref[2]**o + (-0.493325153942)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=0.930090322139*x[2]**o + (-0.116391133566)*x[2]
+            ref[(0, 3, 1, 0)]+=0.930090322139*x_ref[2]**o + (-0.116391133566)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.885426994457*x[2]**o + (-0.326479082303)*x[2]
+            ref[(0, 3, 1, 1)]+=0.885426994457*x_ref[2]**o + (-0.326479082303)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.0146429787244*x[2]**o + (-0.634440673418)*x[2]
+            ref[(0, 3, 1, 2)]+=0.0146429787244*x_ref[2]**o + (-0.634440673418)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.680424760003*x[2]**o + (0.551831752051)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.680424760003*x_ref[2]**o + (0.551831752051)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.307516026797*x[2]**o + (-0.0902419044052)*x[2]
+            ref[(1, 0, 0, 1)]+=0.307516026797*x_ref[2]**o + (-0.0902419044052)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=0.889979770963*x[2]**o + (-0.760142116796)*x[2]
+            ref[(1, 0, 0, 2)]+=0.889979770963*x_ref[2]**o + (-0.760142116796)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.902647596305*x[2]**o + (-0.468237947554)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.902647596305*x_ref[2]**o + (-0.468237947554)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.455574604371*x[2]**o + (-0.477787882414)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.455574604371*x_ref[2]**o + (-0.477787882414)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=-0.82189861178*x[2]**o + (0.0106744562853)*x[2]
+            ref[(1, 0, 1, 2)]+=-0.82189861178*x_ref[2]**o + (0.0106744562853)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.987351179729*x[2]**o + (-0.342631000513)*x[2]
+            ref[(1, 1, 0, 0)]+=0.987351179729*x_ref[2]**o + (-0.342631000513)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=-0.175250824714*x[2]**o + (-0.462800966355)*x[2]
+            ref[(1, 1, 0, 1)]+=-0.175250824714*x_ref[2]**o + (-0.462800966355)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=0.144450525401*x[2]**o + (-0.489697130772)*x[2]
+            ref[(1, 1, 0, 2)]+=0.144450525401*x_ref[2]**o + (-0.489697130772)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.805297750693*x[2]**o + (0.913885084656)*x[2]
+            ref[(1, 1, 1, 0)]+=0.805297750693*x_ref[2]**o + (0.913885084656)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=-0.858332572957*x[2]**o + (-0.782317795748)*x[2]
+            ref[(1, 1, 1, 1)]+=-0.858332572957*x_ref[2]**o + (-0.782317795748)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=-0.525009114509*x[2]**o + (-0.726044473633)*x[2]
+            ref[(1, 1, 1, 2)]+=-0.525009114509*x_ref[2]**o + (-0.726044473633)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=0.614283205373*x[2]**o + (0.554304648934)*x[2]
+            ref[(1, 2, 0, 0)]+=0.614283205373*x_ref[2]**o + (0.554304648934)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=0.0624249717314*x[2]**o + (-0.402658280113)*x[2]
+            ref[(1, 2, 0, 1)]+=0.0624249717314*x_ref[2]**o + (-0.402658280113)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=0.338077047714*x[2]**o + (0.706000819118)*x[2]
+            ref[(1, 2, 0, 2)]+=0.338077047714*x_ref[2]**o + (0.706000819118)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.583926791498*x[2]**o + (-0.112855684795)*x[2]
+            ref[(1, 2, 1, 0)]+=0.583926791498*x_ref[2]**o + (-0.112855684795)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.361865255933*x[2]**o + (0.958072740476)*x[2]
+            ref[(1, 2, 1, 1)]+=0.361865255933*x_ref[2]**o + (0.958072740476)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=-0.299294768225*x[2]**o + (0.67770166824)*x[2]
+            ref[(1, 2, 1, 2)]+=-0.299294768225*x_ref[2]**o + (0.67770166824)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=-0.196439984146*x[2]**o + (0.0786387233057)*x[2]
+            ref[(1, 3, 0, 0)]+=-0.196439984146*x_ref[2]**o + (0.0786387233057)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=-0.281445072617*x[2]**o + (-0.0784106358307)*x[2]
+            ref[(1, 3, 0, 1)]+=-0.281445072617*x_ref[2]**o + (-0.0784106358307)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.782841568899*x[2]**o + (-0.210746036573)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.782841568899*x_ref[2]**o + (-0.210746036573)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.0720585909441*x[2]**o + (-0.33008959048)*x[2]
+            ref[(1, 3, 1, 0)]+=0.0720585909441*x_ref[2]**o + (-0.33008959048)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.968806494845*x[2]**o + (-0.433563704399)*x[2]
+            ref[(1, 3, 1, 1)]+=0.968806494845*x_ref[2]**o + (-0.433563704399)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=-0.802702954641*x[2]**o + (-0.411817436088)*x[2]
+            ref[(1, 3, 1, 2)]+=-0.802702954641*x_ref[2]**o + (-0.411817436088)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 2, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
+        """
+        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(),w)
+        ref = Data(0,(),w_ref)
+        arg=-0.294858128628*x[0]**o + (0.129754865954)*x[0] + (-0.729601963043)*x[1]**o + (0.875621687839)*x[1]
+        ref=-0.294858128628*x_ref[0]**o + (0.129754865954)*x_ref[0] + (-0.729601963043)*x_ref[1]**o + (0.875621687839)*x_ref[1]
+        if dim==3:
+            arg+=(-0.11420347978)*x[2]**o + (-0.296738925613)*x[2]
+            ref+=(-0.11420347978)*x_ref[2]**o + (-0.296738925613)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
+        """
+        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(3,),w)
+        ref = Data(0,(3,),w_ref)
+        arg[(0,)]=-0.173505345299*x[0]**o + (-0.0637155494277)*x[0] + (-0.566485756465)*x[1]**o + (0.131508228492)*x[1]
+        ref[(0,)]=-0.173505345299*x_ref[0]**o + (-0.0637155494277)*x_ref[0] + (-0.566485756465)*x_ref[1]**o + (0.131508228492)*x_ref[1]
+        arg[(1,)]=-0.266407818457*x[0]**o + (0.75222834696)*x[0] + (0.785609712085)*x[1]**o + (0.321927862552)*x[1]
+        ref[(1,)]=-0.266407818457*x_ref[0]**o + (0.75222834696)*x_ref[0] + (0.785609712085)*x_ref[1]**o + (0.321927862552)*x_ref[1]
+        arg[(2,)]=0.274831978604*x[0]**o + (0.129914582651)*x[0] + (0.358516202842)*x[1]**o + (0.663567316362)*x[1]
+        ref[(2,)]=0.274831978604*x_ref[0]**o + (0.129914582651)*x_ref[0] + (0.358516202842)*x_ref[1]**o + (0.663567316362)*x_ref[1]
+        if dim==3:
+            arg[(0,)]+=0.524446323814*x[2]**o + (0.853649995093)*x[2]
+            ref[(0,)]+=0.524446323814*x_ref[2]**o + (0.853649995093)*x_ref[2]
+            arg[(1,)]+=0.0244978725833*x[2]**o + (0.73585343739)*x[2]
+            ref[(1,)]+=0.0244978725833*x_ref[2]**o + (0.73585343739)*x_ref[2]
+            arg[(2,)]+=-0.69379992731*x[2]**o + (0.498524980568)*x[2]
+            ref[(2,)]+=-0.69379992731*x_ref[2]**o + (0.498524980568)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
+        """
+        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 2),w)
+        ref = Data(0,(4, 2),w_ref)
+        arg[(0, 0)]=-0.769889271865*x[0]**o + (0.599053564709)*x[0] + (0.599323253913)*x[1]**o + (0.946253642644)*x[1]
+        ref[(0, 0)]=-0.769889271865*x_ref[0]**o + (0.599053564709)*x_ref[0] + (0.599323253913)*x_ref[1]**o + (0.946253642644)*x_ref[1]
+        arg[(0, 1)]=0.18188646188*x[0]**o + (-0.646964220014)*x[0] + (-0.969128712854)*x[1]**o + (-0.580218348719)*x[1]
+        ref[(0, 1)]=0.18188646188*x_ref[0]**o + (-0.646964220014)*x_ref[0] + (-0.969128712854)*x_ref[1]**o + (-0.580218348719)*x_ref[1]
+        arg[(1, 0)]=0.859604939349*x[0]**o + (0.529169399072)*x[0] + (0.437693924302)*x[1]**o + (-0.478369825349)*x[1]
+        ref[(1, 0)]=0.859604939349*x_ref[0]**o + (0.529169399072)*x_ref[0] + (0.437693924302)*x_ref[1]**o + (-0.478369825349)*x_ref[1]
+        arg[(1, 1)]=0.728937290844*x[0]**o + (-0.552705584183)*x[0] + (0.302404657534)*x[1]**o + (0.0329546719139)*x[1]
+        ref[(1, 1)]=0.728937290844*x_ref[0]**o + (-0.552705584183)*x_ref[0] + (0.302404657534)*x_ref[1]**o + (0.0329546719139)*x_ref[1]
+        arg[(2, 0)]=0.623504893779*x[0]**o + (0.268878898226)*x[0] + (-0.533828021916)*x[1]**o + (-0.4114074867)*x[1]
+        ref[(2, 0)]=0.623504893779*x_ref[0]**o + (0.268878898226)*x_ref[0] + (-0.533828021916)*x_ref[1]**o + (-0.4114074867)*x_ref[1]
+        arg[(2, 1)]=0.940573693226*x[0]**o + (0.167818162219)*x[0] + (-0.296831245246)*x[1]**o + (-0.389432762234)*x[1]
+        ref[(2, 1)]=0.940573693226*x_ref[0]**o + (0.167818162219)*x_ref[0] + (-0.296831245246)*x_ref[1]**o + (-0.389432762234)*x_ref[1]
+        arg[(3, 0)]=0.623184576032*x[0]**o + (0.9452066268)*x[0] + (-0.842558543084)*x[1]**o + (0.946111911798)*x[1]
+        ref[(3, 0)]=0.623184576032*x_ref[0]**o + (0.9452066268)*x_ref[0] + (-0.842558543084)*x_ref[1]**o + (0.946111911798)*x_ref[1]
+        arg[(3, 1)]=0.851363215154*x[0]**o + (-0.411618251121)*x[0] + (-0.968281116671)*x[1]**o + (0.0325740632594)*x[1]
+        ref[(3, 1)]=0.851363215154*x_ref[0]**o + (-0.411618251121)*x_ref[0] + (-0.968281116671)*x_ref[1]**o + (0.0325740632594)*x_ref[1]
+        if dim==3:
+            arg[(0, 0)]+=0.558494081401*x[2]**o + (0.699721007748)*x[2]
+            ref[(0, 0)]+=0.558494081401*x_ref[2]**o + (0.699721007748)*x_ref[2]
+            arg[(0, 1)]+=-0.84836831095*x[2]**o + (0.380774229599)*x[2]
+            ref[(0, 1)]+=-0.84836831095*x_ref[2]**o + (0.380774229599)*x_ref[2]
+            arg[(1, 0)]+=-0.565344990991*x[2]**o + (0.941603915181)*x[2]
+            ref[(1, 0)]+=-0.565344990991*x_ref[2]**o + (0.941603915181)*x_ref[2]
+            arg[(1, 1)]+=-0.797138393014*x[2]**o + (-0.553385548579)*x[2]
+            ref[(1, 1)]+=-0.797138393014*x_ref[2]**o + (-0.553385548579)*x_ref[2]
+            arg[(2, 0)]+=0.728871232*x[2]**o + (-0.854439796477)*x[2]
+            ref[(2, 0)]+=0.728871232*x_ref[2]**o + (-0.854439796477)*x_ref[2]
+            arg[(2, 1)]+=0.485847198402*x[2]**o + (0.439103169785)*x[2]
+            ref[(2, 1)]+=0.485847198402*x_ref[2]**o + (0.439103169785)*x_ref[2]
+            arg[(3, 0)]+=-0.736798990337*x[2]**o + (-0.589450427738)*x[2]
+            ref[(3, 0)]+=-0.736798990337*x_ref[2]**o + (-0.589450427738)*x_ref[2]
+            arg[(3, 1)]+=-0.985311092263*x[2]**o + (-0.16054981985)*x[2]
+            ref[(3, 1)]+=-0.985311092263*x_ref[2]**o + (-0.16054981985)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
+        """
+        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(4, 4, 3),w)
+        ref = Data(0,(4, 4, 3),w_ref)
+        arg[(0, 0, 0)]=-0.840164215234*x[0]**o + (-0.828720129665)*x[0] + (-0.492897330373)*x[1]**o + (-0.377419003849)*x[1]
+        ref[(0, 0, 0)]=-0.840164215234*x_ref[0]**o + (-0.828720129665)*x_ref[0] + (-0.492897330373)*x_ref[1]**o + (-0.377419003849)*x_ref[1]
+        arg[(0, 0, 1)]=0.717305820057*x[0]**o + (0.728830123804)*x[0] + (0.328792171561)*x[1]**o + (0.936787347651)*x[1]
+        ref[(0, 0, 1)]=0.717305820057*x_ref[0]**o + (0.728830123804)*x_ref[0] + (0.328792171561)*x_ref[1]**o + (0.936787347651)*x_ref[1]
+        arg[(0, 0, 2)]=0.99052759677*x[0]**o + (0.445562118803)*x[0] + (0.684407643613)*x[1]**o + (-0.402081568529)*x[1]
+        ref[(0, 0, 2)]=0.99052759677*x_ref[0]**o + (0.445562118803)*x_ref[0] + (0.684407643613)*x_ref[1]**o + (-0.402081568529)*x_ref[1]
+        arg[(0, 1, 0)]=-0.792940137244*x[0]**o + (-0.359068790812)*x[0] + (-0.240161897107)*x[1]**o + (0.742731543744)*x[1]
+        ref[(0, 1, 0)]=-0.792940137244*x_ref[0]**o + (-0.359068790812)*x_ref[0] + (-0.240161897107)*x_ref[1]**o + (0.742731543744)*x_ref[1]
+        arg[(0, 1, 1)]=0.578565072209*x[0]**o + (0.680387144445)*x[0] + (0.185838911228)*x[1]**o + (-0.697688308639)*x[1]
+        ref[(0, 1, 1)]=0.578565072209*x_ref[0]**o + (0.680387144445)*x_ref[0] + (0.185838911228)*x_ref[1]**o + (-0.697688308639)*x_ref[1]
+        arg[(0, 1, 2)]=-0.97850635348*x[0]**o + (-0.153308584417)*x[0] + (-0.00800995905602)*x[1]**o + (0.57363837471)*x[1]
+        ref[(0, 1, 2)]=-0.97850635348*x_ref[0]**o + (-0.153308584417)*x_ref[0] + (-0.00800995905602)*x_ref[1]**o + (0.57363837471)*x_ref[1]
+        arg[(0, 2, 0)]=0.0602803098167*x[0]**o + (0.597785916584)*x[0] + (-0.286967690424)*x[1]**o + (-0.431480038961)*x[1]
+        ref[(0, 2, 0)]=0.0602803098167*x_ref[0]**o + (0.597785916584)*x_ref[0] + (-0.286967690424)*x_ref[1]**o + (-0.431480038961)*x_ref[1]
+        arg[(0, 2, 1)]=-0.30625195894*x[0]**o + (0.189839679081)*x[0] + (-0.67107103516)*x[1]**o + (0.423383441101)*x[1]
+        ref[(0, 2, 1)]=-0.30625195894*x_ref[0]**o + (0.189839679081)*x_ref[0] + (-0.67107103516)*x_ref[1]**o + (0.423383441101)*x_ref[1]
+        arg[(0, 2, 2)]=0.16688414742*x[0]**o + (0.601329359646)*x[0] + (0.815725229144)*x[1]**o + (-0.476770463196)*x[1]
+        ref[(0, 2, 2)]=0.16688414742*x_ref[0]**o + (0.601329359646)*x_ref[0] + (0.815725229144)*x_ref[1]**o + (-0.476770463196)*x_ref[1]
+        arg[(0, 3, 0)]=0.963966707223*x[0]**o + (-0.242158411175)*x[0] + (0.921754467341)*x[1]**o + (-0.148514121501)*x[1]
+        ref[(0, 3, 0)]=0.963966707223*x_ref[0]**o + (-0.242158411175)*x_ref[0] + (0.921754467341)*x_ref[1]**o + (-0.148514121501)*x_ref[1]
+        arg[(0, 3, 1)]=-0.858334618223*x[0]**o + (0.0620943652602)*x[0] + (-0.74895526366)*x[1]**o + (0.675521921251)*x[1]
+        ref[(0, 3, 1)]=-0.858334618223*x_ref[0]**o + (0.0620943652602)*x_ref[0] + (-0.74895526366)*x_ref[1]**o + (0.675521921251)*x_ref[1]
+        arg[(0, 3, 2)]=0.250541687717*x[0]**o + (-0.501090513981)*x[0] + (-0.446614572393)*x[1]**o + (0.586676305597)*x[1]
+        ref[(0, 3, 2)]=0.250541687717*x_ref[0]**o + (-0.501090513981)*x_ref[0] + (-0.446614572393)*x_ref[1]**o + (0.586676305597)*x_ref[1]
+        arg[(1, 0, 0)]=0.929473049555*x[0]**o + (0.532312365321)*x[0] + (0.132392507088)*x[1]**o + (-0.652317699994)*x[1]
+        ref[(1, 0, 0)]=0.929473049555*x_ref[0]**o + (0.532312365321)*x_ref[0] + (0.132392507088)*x_ref[1]**o + (-0.652317699994)*x_ref[1]
+        arg[(1, 0, 1)]=-0.531199386193*x[0]**o + (-0.337336259032)*x[0] + (-0.305630886422)*x[1]**o + (0.0669261935486)*x[1]
+        ref[(1, 0, 1)]=-0.531199386193*x_ref[0]**o + (-0.337336259032)*x_ref[0] + (-0.305630886422)*x_ref[1]**o + (0.0669261935486)*x_ref[1]
+        arg[(1, 0, 2)]=0.391594509186*x[0]**o + (0.44897227136)*x[0] + (-0.724682667053)*x[1]**o + (-0.348361142453)*x[1]
+        ref[(1, 0, 2)]=0.391594509186*x_ref[0]**o + (0.44897227136)*x_ref[0] + (-0.724682667053)*x_ref[1]**o + (-0.348361142453)*x_ref[1]
+        arg[(1, 1, 0)]=-0.470203628724*x[0]**o + (-0.711696278321)*x[0] + (0.068731652388)*x[1]**o + (0.0259102691552)*x[1]
+        ref[(1, 1, 0)]=-0.470203628724*x_ref[0]**o + (-0.711696278321)*x_ref[0] + (0.068731652388)*x_ref[1]**o + (0.0259102691552)*x_ref[1]
+        arg[(1, 1, 1)]=0.839554986422*x[0]**o + (0.49611805538)*x[0] + (-0.110911345666)*x[1]**o + (0.740627978164)*x[1]
+        ref[(1, 1, 1)]=0.839554986422*x_ref[0]**o + (0.49611805538)*x_ref[0] + (-0.110911345666)*x_ref[1]**o + (0.740627978164)*x_ref[1]
+        arg[(1, 1, 2)]=-0.702594659649*x[0]**o + (0.576247859814)*x[0] + (-0.775827810175)*x[1]**o + (0.453575171272)*x[1]
+        ref[(1, 1, 2)]=-0.702594659649*x_ref[0]**o + (0.576247859814)*x_ref[0] + (-0.775827810175)*x_ref[1]**o + (0.453575171272)*x_ref[1]
+        arg[(1, 2, 0)]=0.833160199078*x[0]**o + (0.31696937243)*x[0] + (0.474939612916)*x[1]**o + (-0.189334837983)*x[1]
+        ref[(1, 2, 0)]=0.833160199078*x_ref[0]**o + (0.31696937243)*x_ref[0] + (0.474939612916)*x_ref[1]**o + (-0.189334837983)*x_ref[1]
+        arg[(1, 2, 1)]=-0.230831967748*x[0]**o + (0.904539049293)*x[0] + (-0.592278076697)*x[1]**o + (-0.0511920222158)*x[1]
+        ref[(1, 2, 1)]=-0.230831967748*x_ref[0]**o + (0.904539049293)*x_ref[0] + (-0.592278076697)*x_ref[1]**o + (-0.0511920222158)*x_ref[1]
+        arg[(1, 2, 2)]=-0.446026989177*x[0]**o + (-0.53669587275)*x[0] + (0.104922021786)*x[1]**o + (-0.812307568392)*x[1]
+        ref[(1, 2, 2)]=-0.446026989177*x_ref[0]**o + (-0.53669587275)*x_ref[0] + (0.104922021786)*x_ref[1]**o + (-0.812307568392)*x_ref[1]
+        arg[(1, 3, 0)]=0.836800877429*x[0]**o + (0.388684140482)*x[0] + (0.61621081963)*x[1]**o + (-0.711697577497)*x[1]
+        ref[(1, 3, 0)]=0.836800877429*x_ref[0]**o + (0.388684140482)*x_ref[0] + (0.61621081963)*x_ref[1]**o + (-0.711697577497)*x_ref[1]
+        arg[(1, 3, 1)]=-0.915231452717*x[0]**o + (-0.209859734581)*x[0] + (0.96719457335)*x[1]**o + (-0.672303427769)*x[1]
+        ref[(1, 3, 1)]=-0.915231452717*x_ref[0]**o + (-0.209859734581)*x_ref[0] + (0.96719457335)*x_ref[1]**o + (-0.672303427769)*x_ref[1]
+        arg[(1, 3, 2)]=0.563217806193*x[0]**o + (-0.0750005301103)*x[0] + (-0.466749472759)*x[1]**o + (-0.602047971485)*x[1]
+        ref[(1, 3, 2)]=0.563217806193*x_ref[0]**o + (-0.0750005301103)*x_ref[0] + (-0.466749472759)*x_ref[1]**o + (-0.602047971485)*x_ref[1]
+        arg[(2, 0, 0)]=-0.0823847312719*x[0]**o + (0.952474614824)*x[0] + (-0.889559805258)*x[1]**o + (-0.455496522459)*x[1]
+        ref[(2, 0, 0)]=-0.0823847312719*x_ref[0]**o + (0.952474614824)*x_ref[0] + (-0.889559805258)*x_ref[1]**o + (-0.455496522459)*x_ref[1]
+        arg[(2, 0, 1)]=0.507347888925*x[0]**o + (-0.371720733934)*x[0] + (0.96037807576)*x[1]**o + (0.674706847997)*x[1]
+        ref[(2, 0, 1)]=0.507347888925*x_ref[0]**o + (-0.371720733934)*x_ref[0] + (0.96037807576)*x_ref[1]**o + (0.674706847997)*x_ref[1]
+        arg[(2, 0, 2)]=-0.953277962176*x[0]**o + (0.399654967303)*x[0] + (0.600505157781)*x[1]**o + (-0.57479390767)*x[1]
+        ref[(2, 0, 2)]=-0.953277962176*x_ref[0]**o + (0.399654967303)*x_ref[0] + (0.600505157781)*x_ref[1]**o + (-0.57479390767)*x_ref[1]
+        arg[(2, 1, 0)]=0.691703422363*x[0]**o + (-0.990887425631)*x[0] + (-0.564526335969)*x[1]**o + (-0.749054005962)*x[1]
+        ref[(2, 1, 0)]=0.691703422363*x_ref[0]**o + (-0.990887425631)*x_ref[0] + (-0.564526335969)*x_ref[1]**o + (-0.749054005962)*x_ref[1]
+        arg[(2, 1, 1)]=-0.400623184778*x[0]**o + (-0.977392588961)*x[0] + (0.801729844236)*x[1]**o + (-0.457634236371)*x[1]
+        ref[(2, 1, 1)]=-0.400623184778*x_ref[0]**o + (-0.977392588961)*x_ref[0] + (0.801729844236)*x_ref[1]**o + (-0.457634236371)*x_ref[1]
+        arg[(2, 1, 2)]=-0.371424768358*x[0]**o + (-0.652727227203)*x[0] + (0.07512632707)*x[1]**o + (0.158441371267)*x[1]
+        ref[(2, 1, 2)]=-0.371424768358*x_ref[0]**o + (-0.652727227203)*x_ref[0] + (0.07512632707)*x_ref[1]**o + (0.158441371267)*x_ref[1]
+        arg[(2, 2, 0)]=0.958368212771*x[0]**o + (-0.651905320827)*x[0] + (0.0470226116932)*x[1]**o + (-0.689864644956)*x[1]
+        ref[(2, 2, 0)]=0.958368212771*x_ref[0]**o + (-0.651905320827)*x_ref[0] + (0.0470226116932)*x_ref[1]**o + (-0.689864644956)*x_ref[1]
+        arg[(2, 2, 1)]=-0.995996960882*x[0]**o + (0.524540835582)*x[0] + (-0.382829678382)*x[1]**o + (-0.403708050592)*x[1]
+        ref[(2, 2, 1)]=-0.995996960882*x_ref[0]**o + (0.524540835582)*x_ref[0] + (-0.382829678382)*x_ref[1]**o + (-0.403708050592)*x_ref[1]
+        arg[(2, 2, 2)]=0.996133448178*x[0]**o + (0.910649810409)*x[0] + (0.0531741785885)*x[1]**o + (0.607527450886)*x[1]
+        ref[(2, 2, 2)]=0.996133448178*x_ref[0]**o + (0.910649810409)*x_ref[0] + (0.0531741785885)*x_ref[1]**o + (0.607527450886)*x_ref[1]
+        arg[(2, 3, 0)]=-0.844439331871*x[0]**o + (0.26074027089)*x[0] + (-0.950442729294)*x[1]**o + (-0.825556168722)*x[1]
+        ref[(2, 3, 0)]=-0.844439331871*x_ref[0]**o + (0.26074027089)*x_ref[0] + (-0.950442729294)*x_ref[1]**o + (-0.825556168722)*x_ref[1]
+        arg[(2, 3, 1)]=0.537986584233*x[0]**o + (0.99595241359)*x[0] + (0.67065268972)*x[1]**o + (0.391514752212)*x[1]
+        ref[(2, 3, 1)]=0.537986584233*x_ref[0]**o + (0.99595241359)*x_ref[0] + (0.67065268972)*x_ref[1]**o + (0.391514752212)*x_ref[1]
+        arg[(2, 3, 2)]=-0.251290498744*x[0]**o + (0.796883193586)*x[0] + (-0.6777489921)*x[1]**o + (0.23636693919)*x[1]
+        ref[(2, 3, 2)]=-0.251290498744*x_ref[0]**o + (0.796883193586)*x_ref[0] + (-0.6777489921)*x_ref[1]**o + (0.23636693919)*x_ref[1]
+        arg[(3, 0, 0)]=-0.629287247371*x[0]**o + (-0.78911025418)*x[0] + (0.762628792099)*x[1]**o + (0.936997724352)*x[1]
+        ref[(3, 0, 0)]=-0.629287247371*x_ref[0]**o + (-0.78911025418)*x_ref[0] + (0.762628792099)*x_ref[1]**o + (0.936997724352)*x_ref[1]
+        arg[(3, 0, 1)]=0.0976004309208*x[0]**o + (0.72349585127)*x[0] + (-0.701542349443)*x[1]**o + (0.694041067069)*x[1]
+        ref[(3, 0, 1)]=0.0976004309208*x_ref[0]**o + (0.72349585127)*x_ref[0] + (-0.701542349443)*x_ref[1]**o + (0.694041067069)*x_ref[1]
+        arg[(3, 0, 2)]=-0.870724287272*x[0]**o + (-0.717621955624)*x[0] + (-0.672740748078)*x[1]**o + (-0.0566808276322)*x[1]
+        ref[(3, 0, 2)]=-0.870724287272*x_ref[0]**o + (-0.717621955624)*x_ref[0] + (-0.672740748078)*x_ref[1]**o + (-0.0566808276322)*x_ref[1]
+        arg[(3, 1, 0)]=0.432360447085*x[0]**o + (-0.428534069477)*x[0] + (-0.0206555364006)*x[1]**o + (0.694878820212)*x[1]
+        ref[(3, 1, 0)]=0.432360447085*x_ref[0]**o + (-0.428534069477)*x_ref[0] + (-0.0206555364006)*x_ref[1]**o + (0.694878820212)*x_ref[1]
+        arg[(3, 1, 1)]=0.295376401732*x[0]**o + (0.548208392052)*x[0] + (-0.618585776337)*x[1]**o + (-0.294145531123)*x[1]
+        ref[(3, 1, 1)]=0.295376401732*x_ref[0]**o + (0.548208392052)*x_ref[0] + (-0.618585776337)*x_ref[1]**o + (-0.294145531123)*x_ref[1]
+        arg[(3, 1, 2)]=0.103910521347*x[0]**o + (0.807397907206)*x[0] + (-0.434517186231)*x[1]**o + (0.442108265736)*x[1]
+        ref[(3, 1, 2)]=0.103910521347*x_ref[0]**o + (0.807397907206)*x_ref[0] + (-0.434517186231)*x_ref[1]**o + (0.442108265736)*x_ref[1]
+        arg[(3, 2, 0)]=-0.397592841805*x[0]**o + (0.668997861943)*x[0] + (-0.469022870317)*x[1]**o + (0.916561725096)*x[1]
+        ref[(3, 2, 0)]=-0.397592841805*x_ref[0]**o + (0.668997861943)*x_ref[0] + (-0.469022870317)*x_ref[1]**o + (0.916561725096)*x_ref[1]
+        arg[(3, 2, 1)]=-0.0775339521228*x[0]**o + (0.426220783164)*x[0] + (0.74854838927)*x[1]**o + (-0.929511885583)*x[1]
+        ref[(3, 2, 1)]=-0.0775339521228*x_ref[0]**o + (0.426220783164)*x_ref[0] + (0.74854838927)*x_ref[1]**o + (-0.929511885583)*x_ref[1]
+        arg[(3, 2, 2)]=0.269976440472*x[0]**o + (0.382262377084)*x[0] + (0.481661128633)*x[1]**o + (0.184841613036)*x[1]
+        ref[(3, 2, 2)]=0.269976440472*x_ref[0]**o + (0.382262377084)*x_ref[0] + (0.481661128633)*x_ref[1]**o + (0.184841613036)*x_ref[1]
+        arg[(3, 3, 0)]=-0.681275615146*x[0]**o + (0.0867309573896)*x[0] + (0.983303127284)*x[1]**o + (-0.986093720221)*x[1]
+        ref[(3, 3, 0)]=-0.681275615146*x_ref[0]**o + (0.0867309573896)*x_ref[0] + (0.983303127284)*x_ref[1]**o + (-0.986093720221)*x_ref[1]
+        arg[(3, 3, 1)]=0.893257778269*x[0]**o + (0.943012493469)*x[0] + (0.439196309855)*x[1]**o + (-0.411934210513)*x[1]
+        ref[(3, 3, 1)]=0.893257778269*x_ref[0]**o + (0.943012493469)*x_ref[0] + (0.439196309855)*x_ref[1]**o + (-0.411934210513)*x_ref[1]
+        arg[(3, 3, 2)]=0.883451067582*x[0]**o + (-0.116806074401)*x[0] + (0.286527995466)*x[1]**o + (-0.883326297421)*x[1]
+        ref[(3, 3, 2)]=0.883451067582*x_ref[0]**o + (-0.116806074401)*x_ref[0] + (0.286527995466)*x_ref[1]**o + (-0.883326297421)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0)]+=0.87936405845*x[2]**o + (-0.0870170873789)*x[2]
+            ref[(0, 0, 0)]+=0.87936405845*x_ref[2]**o + (-0.0870170873789)*x_ref[2]
+            arg[(0, 0, 1)]+=-0.429966272794*x[2]**o + (-0.528394199392)*x[2]
+            ref[(0, 0, 1)]+=-0.429966272794*x_ref[2]**o + (-0.528394199392)*x_ref[2]
+            arg[(0, 0, 2)]+=-0.971406148898*x[2]**o + (0.31644386837)*x[2]
+            ref[(0, 0, 2)]+=-0.971406148898*x_ref[2]**o + (0.31644386837)*x_ref[2]
+            arg[(0, 1, 0)]+=0.240529253076*x[2]**o + (0.557265723573)*x[2]
+            ref[(0, 1, 0)]+=0.240529253076*x_ref[2]**o + (0.557265723573)*x_ref[2]
+            arg[(0, 1, 1)]+=0.205763765837*x[2]**o + (-0.137066789293)*x[2]
+            ref[(0, 1, 1)]+=0.205763765837*x_ref[2]**o + (-0.137066789293)*x_ref[2]
+            arg[(0, 1, 2)]+=-0.176201340683*x[2]**o + (0.82420694478)*x[2]
+            ref[(0, 1, 2)]+=-0.176201340683*x_ref[2]**o + (0.82420694478)*x_ref[2]
+            arg[(0, 2, 0)]+=-0.478123304507*x[2]**o + (0.083201720793)*x[2]
+            ref[(0, 2, 0)]+=-0.478123304507*x_ref[2]**o + (0.083201720793)*x_ref[2]
+            arg[(0, 2, 1)]+=0.220858631487*x[2]**o + (-0.863079881717)*x[2]
+            ref[(0, 2, 1)]+=0.220858631487*x_ref[2]**o + (-0.863079881717)*x_ref[2]
+            arg[(0, 2, 2)]+=0.167017662333*x[2]**o + (0.14694559005)*x[2]
+            ref[(0, 2, 2)]+=0.167017662333*x_ref[2]**o + (0.14694559005)*x_ref[2]
+            arg[(0, 3, 0)]+=0.495504090544*x[2]**o + (-0.218229062769)*x[2]
+            ref[(0, 3, 0)]+=0.495504090544*x_ref[2]**o + (-0.218229062769)*x_ref[2]
+            arg[(0, 3, 1)]+=0.205813615281*x[2]**o + (-0.538717628776)*x[2]
+            ref[(0, 3, 1)]+=0.205813615281*x_ref[2]**o + (-0.538717628776)*x_ref[2]
+            arg[(0, 3, 2)]+=-0.00743092242137*x[2]**o + (0.0424989364184)*x[2]
+            ref[(0, 3, 2)]+=-0.00743092242137*x_ref[2]**o + (0.0424989364184)*x_ref[2]
+            arg[(1, 0, 0)]+=0.497116956894*x[2]**o + (0.0193432983156)*x[2]
+            ref[(1, 0, 0)]+=0.497116956894*x_ref[2]**o + (0.0193432983156)*x_ref[2]
+            arg[(1, 0, 1)]+=0.28933566494*x[2]**o + (0.322128285654)*x[2]
+            ref[(1, 0, 1)]+=0.28933566494*x_ref[2]**o + (0.322128285654)*x_ref[2]
+            arg[(1, 0, 2)]+=0.5489836604*x[2]**o + (-0.153600145641)*x[2]
+            ref[(1, 0, 2)]+=0.5489836604*x_ref[2]**o + (-0.153600145641)*x_ref[2]
+            arg[(1, 1, 0)]+=0.800325939676*x[2]**o + (-0.208568657071)*x[2]
+            ref[(1, 1, 0)]+=0.800325939676*x_ref[2]**o + (-0.208568657071)*x_ref[2]
+            arg[(1, 1, 1)]+=0.0061330670081*x[2]**o + (-0.669264283315)*x[2]
+            ref[(1, 1, 1)]+=0.0061330670081*x_ref[2]**o + (-0.669264283315)*x_ref[2]
+            arg[(1, 1, 2)]+=0.151370641654*x[2]**o + (-0.479232352646)*x[2]
+            ref[(1, 1, 2)]+=0.151370641654*x_ref[2]**o + (-0.479232352646)*x_ref[2]
+            arg[(1, 2, 0)]+=0.805565081923*x[2]**o + (-0.182813810655)*x[2]
+            ref[(1, 2, 0)]+=0.805565081923*x_ref[2]**o + (-0.182813810655)*x_ref[2]
+            arg[(1, 2, 1)]+=0.677105023169*x[2]**o + (0.00745210315208)*x[2]
+            ref[(1, 2, 1)]+=0.677105023169*x_ref[2]**o + (0.00745210315208)*x_ref[2]
+            arg[(1, 2, 2)]+=-0.75660924383*x[2]**o + (0.29119357815)*x[2]
+            ref[(1, 2, 2)]+=-0.75660924383*x_ref[2]**o + (0.29119357815)*x_ref[2]
+            arg[(1, 3, 0)]+=-0.35566633826*x[2]**o + (-0.521818373257)*x[2]
+            ref[(1, 3, 0)]+=-0.35566633826*x_ref[2]**o + (-0.521818373257)*x_ref[2]
+            arg[(1, 3, 1)]+=0.776535486856*x[2]**o + (0.52759646193)*x[2]
+            ref[(1, 3, 1)]+=0.776535486856*x_ref[2]**o + (0.52759646193)*x_ref[2]
+            arg[(1, 3, 2)]+=-0.389742930386*x[2]**o + (-0.0395320110145)*x[2]
+            ref[(1, 3, 2)]+=-0.389742930386*x_ref[2]**o + (-0.0395320110145)*x_ref[2]
+            arg[(2, 0, 0)]+=-0.874406778559*x[2]**o + (-0.400192566137)*x[2]
+            ref[(2, 0, 0)]+=-0.874406778559*x_ref[2]**o + (-0.400192566137)*x_ref[2]
+            arg[(2, 0, 1)]+=0.471869524239*x[2]**o + (0.681619806218)*x[2]
+            ref[(2, 0, 1)]+=0.471869524239*x_ref[2]**o + (0.681619806218)*x_ref[2]
+            arg[(2, 0, 2)]+=0.909401898586*x[2]**o + (-0.156415733327)*x[2]
+            ref[(2, 0, 2)]+=0.909401898586*x_ref[2]**o + (-0.156415733327)*x_ref[2]
+            arg[(2, 1, 0)]+=-0.044838397427*x[2]**o + (-0.0841898448374)*x[2]
+            ref[(2, 1, 0)]+=-0.044838397427*x_ref[2]**o + (-0.0841898448374)*x_ref[2]
+            arg[(2, 1, 1)]+=-0.391664729644*x[2]**o + (0.390549463671)*x[2]
+            ref[(2, 1, 1)]+=-0.391664729644*x_ref[2]**o + (0.390549463671)*x_ref[2]
+            arg[(2, 1, 2)]+=-0.745160368154*x[2]**o + (0.669894856535)*x[2]
+            ref[(2, 1, 2)]+=-0.745160368154*x_ref[2]**o + (0.669894856535)*x_ref[2]
+            arg[(2, 2, 0)]+=0.257788206355*x[2]**o + (-0.00735158658505)*x[2]
+            ref[(2, 2, 0)]+=0.257788206355*x_ref[2]**o + (-0.00735158658505)*x_ref[2]
+            arg[(2, 2, 1)]+=-0.316534118331*x[2]**o + (0.973918454845)*x[2]
+            ref[(2, 2, 1)]+=-0.316534118331*x_ref[2]**o + (0.973918454845)*x_ref[2]
+            arg[(2, 2, 2)]+=0.589389436357*x[2]**o + (-0.47067691692)*x[2]
+            ref[(2, 2, 2)]+=0.589389436357*x_ref[2]**o + (-0.47067691692)*x_ref[2]
+            arg[(2, 3, 0)]+=-0.422240879323*x[2]**o + (-0.0163593247341)*x[2]
+            ref[(2, 3, 0)]+=-0.422240879323*x_ref[2]**o + (-0.0163593247341)*x_ref[2]
+            arg[(2, 3, 1)]+=0.965982560096*x[2]**o + (-0.465597966255)*x[2]
+            ref[(2, 3, 1)]+=0.965982560096*x_ref[2]**o + (-0.465597966255)*x_ref[2]
+            arg[(2, 3, 2)]+=-0.18861435244*x[2]**o + (0.230473847505)*x[2]
+            ref[(2, 3, 2)]+=-0.18861435244*x_ref[2]**o + (0.230473847505)*x_ref[2]
+            arg[(3, 0, 0)]+=0.423620709078*x[2]**o + (0.16349180271)*x[2]
+            ref[(3, 0, 0)]+=0.423620709078*x_ref[2]**o + (0.16349180271)*x_ref[2]
+            arg[(3, 0, 1)]+=-0.651299386326*x[2]**o + (-0.563401593939)*x[2]
+            ref[(3, 0, 1)]+=-0.651299386326*x_ref[2]**o + (-0.563401593939)*x_ref[2]
+            arg[(3, 0, 2)]+=0.634712782796*x[2]**o + (-0.948065925362)*x[2]
+            ref[(3, 0, 2)]+=0.634712782796*x_ref[2]**o + (-0.948065925362)*x_ref[2]
+            arg[(3, 1, 0)]+=-0.0219246682763*x[2]**o + (0.672448364552)*x[2]
+            ref[(3, 1, 0)]+=-0.0219246682763*x_ref[2]**o + (0.672448364552)*x_ref[2]
+            arg[(3, 1, 1)]+=0.897939716172*x[2]**o + (-0.642443266409)*x[2]
+            ref[(3, 1, 1)]+=0.897939716172*x_ref[2]**o + (-0.642443266409)*x_ref[2]
+            arg[(3, 1, 2)]+=0.736998839291*x[2]**o + (0.696587417889)*x[2]
+            ref[(3, 1, 2)]+=0.736998839291*x_ref[2]**o + (0.696587417889)*x_ref[2]
+            arg[(3, 2, 0)]+=0.326661848932*x[2]**o + (-0.422497940858)*x[2]
+            ref[(3, 2, 0)]+=0.326661848932*x_ref[2]**o + (-0.422497940858)*x_ref[2]
+            arg[(3, 2, 1)]+=0.438705767023*x[2]**o + (-0.43973011509)*x[2]
+            ref[(3, 2, 1)]+=0.438705767023*x_ref[2]**o + (-0.43973011509)*x_ref[2]
+            arg[(3, 2, 2)]+=-0.582200995538*x[2]**o + (-0.279242162981)*x[2]
+            ref[(3, 2, 2)]+=-0.582200995538*x_ref[2]**o + (-0.279242162981)*x_ref[2]
+            arg[(3, 3, 0)]+=-0.597338868958*x[2]**o + (0.463740602691)*x[2]
+            ref[(3, 3, 0)]+=-0.597338868958*x_ref[2]**o + (0.463740602691)*x_ref[2]
+            arg[(3, 3, 1)]+=0.608277081346*x[2]**o + (0.406456160265)*x[2]
+            ref[(3, 3, 1)]+=0.608277081346*x_ref[2]**o + (0.406456160265)*x_ref[2]
+            arg[(3, 3, 2)]+=-0.729067742001*x[2]**o + (-0.882363342905)*x[2]
+            ref[(3, 3, 2)]+=-0.729067742001*x_ref[2]**o + (-0.882363342905)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (4, 4, 3),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
+        """
+        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne
+
+        assumptions: ReducedFunctionOnContactOne(self.domain) exists
+                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
+        """
+        o = self.order
+        dim = self.domain.getDim()
+        w_ref = ReducedFunctionOnContactOne(self.domain)
+        x_ref = w_ref.getX()
+        w = ReducedFunctionOnContactOne(self.domain)
+        x = w.getX()
+        arg = Data(0,(2, 4, 4, 4),w)
+        ref = Data(0,(2, 4, 4, 4),w_ref)
+        arg[(0, 0, 0, 0)]=0.580164423151*x[0]**o + (-0.222193655086)*x[0] + (-0.0741857937968)*x[1]**o + (-0.535860711173)*x[1]
+        ref[(0, 0, 0, 0)]=0.580164423151*x_ref[0]**o + (-0.222193655086)*x_ref[0] + (-0.0741857937968)*x_ref[1]**o + (-0.535860711173)*x_ref[1]
+        arg[(0, 0, 0, 1)]=0.236696023369*x[0]**o + (-0.78649041653)*x[0] + (0.40246009142)*x[1]**o + (0.949880490989)*x[1]
+        ref[(0, 0, 0, 1)]=0.236696023369*x_ref[0]**o + (-0.78649041653)*x_ref[0] + (0.40246009142)*x_ref[1]**o + (0.949880490989)*x_ref[1]
+        arg[(0, 0, 0, 2)]=0.55185500939*x[0]**o + (0.433651622853)*x[0] + (0.59460978449)*x[1]**o + (0.332195937988)*x[1]
+        ref[(0, 0, 0, 2)]=0.55185500939*x_ref[0]**o + (0.433651622853)*x_ref[0] + (0.59460978449)*x_ref[1]**o + (0.332195937988)*x_ref[1]
+        arg[(0, 0, 0, 3)]=0.604553519545*x[0]**o + (-0.526793658435)*x[0] + (-0.915929372166)*x[1]**o + (0.247351657351)*x[1]
+        ref[(0, 0, 0, 3)]=0.604553519545*x_ref[0]**o + (-0.526793658435)*x_ref[0] + (-0.915929372166)*x_ref[1]**o + (0.247351657351)*x_ref[1]
+        arg[(0, 0, 1, 0)]=-0.371605716163*x[0]**o + (-0.00298736467728)*x[0] + (0.969984865114)*x[1]**o + (-0.787278253074)*x[1]
+        ref[(0, 0, 1, 0)]=-0.371605716163*x_ref[0]**o + (-0.00298736467728)*x_ref[0] + (0.969984865114)*x_ref[1]**o + (-0.787278253074)*x_ref[1]
+        arg[(0, 0, 1, 1)]=0.175431238465*x[0]**o + (-0.424779410292)*x[0] + (0.460471168545)*x[1]**o + (0.769033288415)*x[1]
+        ref[(0, 0, 1, 1)]=0.175431238465*x_ref[0]**o + (-0.424779410292)*x_ref[0] + (0.460471168545)*x_ref[1]**o + (0.769033288415)*x_ref[1]
+        arg[(0, 0, 1, 2)]=0.684914486541*x[0]**o + (-0.044878266068)*x[0] + (-0.394322378855)*x[1]**o + (-0.372228112532)*x[1]
+        ref[(0, 0, 1, 2)]=0.684914486541*x_ref[0]**o + (-0.044878266068)*x_ref[0] + (-0.394322378855)*x_ref[1]**o + (-0.372228112532)*x_ref[1]
+        arg[(0, 0, 1, 3)]=-0.750228922862*x[0]**o + (0.157891297069)*x[0] + (0.112981952807)*x[1]**o + (0.0802716572209)*x[1]
+        ref[(0, 0, 1, 3)]=-0.750228922862*x_ref[0]**o + (0.157891297069)*x_ref[0] + (0.112981952807)*x_ref[1]**o + (0.0802716572209)*x_ref[1]
+        arg[(0, 0, 2, 0)]=-0.769549257544*x[0]**o + (0.574215998529)*x[0] + (-0.789824706416)*x[1]**o + (0.543084097169)*x[1]
+        ref[(0, 0, 2, 0)]=-0.769549257544*x_ref[0]**o + (0.574215998529)*x_ref[0] + (-0.789824706416)*x_ref[1]**o + (0.543084097169)*x_ref[1]
+        arg[(0, 0, 2, 1)]=0.836293796221*x[0]**o + (-0.337119838864)*x[0] + (-0.998242004288)*x[1]**o + (0.731017415076)*x[1]
+        ref[(0, 0, 2, 1)]=0.836293796221*x_ref[0]**o + (-0.337119838864)*x_ref[0] + (-0.998242004288)*x_ref[1]**o + (0.731017415076)*x_ref[1]
+        arg[(0, 0, 2, 2)]=0.912184208463*x[0]**o + (-0.24946726222)*x[0] + (0.253610034609)*x[1]**o + (-0.588048398526)*x[1]
+        ref[(0, 0, 2, 2)]=0.912184208463*x_ref[0]**o + (-0.24946726222)*x_ref[0] + (0.253610034609)*x_ref[1]**o + (-0.588048398526)*x_ref[1]
+        arg[(0, 0, 2, 3)]=-0.0600423242318*x[0]**o + (-0.793408535094)*x[0] + (-0.166269558151)*x[1]**o + (-0.130401288195)*x[1]
+        ref[(0, 0, 2, 3)]=-0.0600423242318*x_ref[0]**o + (-0.793408535094)*x_ref[0] + (-0.166269558151)*x_ref[1]**o + (-0.130401288195)*x_ref[1]
+        arg[(0, 0, 3, 0)]=0.493832867014*x[0]**o + (0.00598841966125)*x[0] + (-0.998520033341)*x[1]**o + (-0.321920126858)*x[1]
+        ref[(0, 0, 3, 0)]=0.493832867014*x_ref[0]**o + (0.00598841966125)*x_ref[0] + (-0.998520033341)*x_ref[1]**o + (-0.321920126858)*x_ref[1]
+        arg[(0, 0, 3, 1)]=-0.838085964477*x[0]**o + (-0.963805073601)*x[0] + (-0.36829595052)*x[1]**o + (0.661539262412)*x[1]
+        ref[(0, 0, 3, 1)]=-0.838085964477*x_ref[0]**o + (-0.963805073601)*x_ref[0] + (-0.36829595052)*x_ref[1]**o + (0.661539262412)*x_ref[1]
+        arg[(0, 0, 3, 2)]=0.0456539600465*x[0]**o + (0.872025045793)*x[0] + (0.614052825328)*x[1]**o + (0.813017863468)*x[1]
+        ref[(0, 0, 3, 2)]=0.0456539600465*x_ref[0]**o + (0.872025045793)*x_ref[0] + (0.614052825328)*x_ref[1]**o + (0.813017863468)*x_ref[1]
+        arg[(0, 0, 3, 3)]=-0.846627905611*x[0]**o + (0.875485543769)*x[0] + (0.488813022591)*x[1]**o + (-0.386660628761)*x[1]
+        ref[(0, 0, 3, 3)]=-0.846627905611*x_ref[0]**o + (0.875485543769)*x_ref[0] + (0.488813022591)*x_ref[1]**o + (-0.386660628761)*x_ref[1]
+        arg[(0, 1, 0, 0)]=0.266335710122*x[0]**o + (-0.657395311303)*x[0] + (0.339839351885)*x[1]**o + (0.290902470425)*x[1]
+        ref[(0, 1, 0, 0)]=0.266335710122*x_ref[0]**o + (-0.657395311303)*x_ref[0] + (0.339839351885)*x_ref[1]**o + (0.290902470425)*x_ref[1]
+        arg[(0, 1, 0, 1)]=-0.828881124927*x[0]**o + (0.629740708466)*x[0] + (0.543383057952)*x[1]**o + (-0.328768410001)*x[1]
+        ref[(0, 1, 0, 1)]=-0.828881124927*x_ref[0]**o + (0.629740708466)*x_ref[0] + (0.543383057952)*x_ref[1]**o + (-0.328768410001)*x_ref[1]
+        arg[(0, 1, 0, 2)]=0.563945005799*x[0]**o + (-0.375528858447)*x[0] + (0.693352535291)*x[1]**o + (-0.719218051185)*x[1]
+        ref[(0, 1, 0, 2)]=0.563945005799*x_ref[0]**o + (-0.375528858447)*x_ref[0] + (0.693352535291)*x_ref[1]**o + (-0.719218051185)*x_ref[1]
+        arg[(0, 1, 0, 3)]=0.375376651338*x[0]**o + (0.726023645674)*x[0] + (-0.249928867528)*x[1]**o + (0.779710068551)*x[1]
+        ref[(0, 1, 0, 3)]=0.375376651338*x_ref[0]**o + (0.726023645674)*x_ref[0] + (-0.249928867528)*x_ref[1]**o + (0.779710068551)*x_ref[1]
+        arg[(0, 1, 1, 0)]=0.88940414108*x[0]**o + (0.0732302559883)*x[0] + (0.253313066712)*x[1]**o + (-0.488712807849)*x[1]
+        ref[(0, 1, 1, 0)]=0.88940414108*x_ref[0]**o + (0.0732302559883)*x_ref[0] + (0.253313066712)*x_ref[1]**o + (-0.488712807849)*x_ref[1]
+        arg[(0, 1, 1, 1)]=0.129970734617*x[0]**o + (0.563902718592)*x[0] + (0.54604012223)*x[1]**o + (-0.223845035511)*x[1]
+        ref[(0, 1, 1, 1)]=0.129970734617*x_ref[0]**o + (0.563902718592)*x_ref[0] + (0.54604012223)*x_ref[1]**o + (-0.223845035511)*x_ref[1]
+        arg[(0, 1, 1, 2)]=-0.705437942462*x[0]**o + (0.237559402434)*x[0] + (-0.328257204561)*x[1]**o + (0.821839176133)*x[1]
+        ref[(0, 1, 1, 2)]=-0.705437942462*x_ref[0]**o + (0.237559402434)*x_ref[0] + (-0.328257204561)*x_ref[1]**o + (0.821839176133)*x_ref[1]
+        arg[(0, 1, 1, 3)]=0.740208686589*x[0]**o + (-0.700907863749)*x[0] + (-0.751861398576)*x[1]**o + (-0.887142229283)*x[1]
+        ref[(0, 1, 1, 3)]=0.740208686589*x_ref[0]**o + (-0.700907863749)*x_ref[0] + (-0.751861398576)*x_ref[1]**o + (-0.887142229283)*x_ref[1]
+        arg[(0, 1, 2, 0)]=-0.0448499611122*x[0]**o + (0.376976747707)*x[0] + (-0.256555692487)*x[1]**o + (-0.77856080663)*x[1]
+        ref[(0, 1, 2, 0)]=-0.0448499611122*x_ref[0]**o + (0.376976747707)*x_ref[0] + (-0.256555692487)*x_ref[1]**o + (-0.77856080663)*x_ref[1]
+        arg[(0, 1, 2, 1)]=0.889179162879*x[0]**o + (0.00110470944187)*x[0] + (0.965258754399)*x[1]**o + (-0.919678463479)*x[1]
+        ref[(0, 1, 2, 1)]=0.889179162879*x_ref[0]**o + (0.00110470944187)*x_ref[0] + (0.965258754399)*x_ref[1]**o + (-0.919678463479)*x_ref[1]
+        arg[(0, 1, 2, 2)]=-0.194781930024*x[0]**o + (-0.873422648705)*x[0] + (0.0478710132668)*x[1]**o + (-0.61321234963)*x[1]
+        ref[(0, 1, 2, 2)]=-0.194781930024*x_ref[0]**o + (-0.873422648705)*x_ref[0] + (0.0478710132668)*x_ref[1]**o + (-0.61321234963)*x_ref[1]
+        arg[(0, 1, 2, 3)]=-0.497978190355*x[0]**o + (0.942925059105)*x[0] + (0.46848562331)*x[1]**o + (-0.686032464862)*x[1]
+        ref[(0, 1, 2, 3)]=-0.497978190355*x_ref[0]**o + (0.942925059105)*x_ref[0] + (0.46848562331)*x_ref[1]**o + (-0.686032464862)*x_ref[1]
+        arg[(0, 1, 3, 0)]=-0.104598001766*x[0]**o + (0.0739604694342)*x[0] + (0.884255655981)*x[1]**o + (0.932736302748)*x[1]
+        ref[(0, 1, 3, 0)]=-0.104598001766*x_ref[0]**o + (0.0739604694342)*x_ref[0] + (0.884255655981)*x_ref[1]**o + (0.932736302748)*x_ref[1]
+        arg[(0, 1, 3, 1)]=-0.614058496591*x[0]**o + (0.184317354223)*x[0] + (0.299910764895)*x[1]**o + (0.326855819176)*x[1]
+        ref[(0, 1, 3, 1)]=-0.614058496591*x_ref[0]**o + (0.184317354223)*x_ref[0] + (0.299910764895)*x_ref[1]**o + (0.326855819176)*x_ref[1]
+        arg[(0, 1, 3, 2)]=-0.805157746123*x[0]**o + (0.535021016725)*x[0] + (0.0204325571075)*x[1]**o + (-0.239962753709)*x[1]
+        ref[(0, 1, 3, 2)]=-0.805157746123*x_ref[0]**o + (0.535021016725)*x_ref[0] + (0.0204325571075)*x_ref[1]**o + (-0.239962753709)*x_ref[1]
+        arg[(0, 1, 3, 3)]=-0.430844536328*x[0]**o + (-0.442492895595)*x[0] + (0.81111350893)*x[1]**o + (-0.597680393369)*x[1]
+        ref[(0, 1, 3, 3)]=-0.430844536328*x_ref[0]**o + (-0.442492895595)*x_ref[0] + (0.81111350893)*x_ref[1]**o + (-0.597680393369)*x_ref[1]
+        arg[(0, 2, 0, 0)]=0.822591046491*x[0]**o + (-0.278306734554)*x[0] + (-0.0451376069359)*x[1]**o + (0.392839077564)*x[1]
+        ref[(0, 2, 0, 0)]=0.822591046491*x_ref[0]**o + (-0.278306734554)*x_ref[0] + (-0.0451376069359)*x_ref[1]**o + (0.392839077564)*x_ref[1]
+        arg[(0, 2, 0, 1)]=-0.650922270216*x[0]**o + (0.625250563608)*x[0] + (-0.55071785467)*x[1]**o + (0.488093969417)*x[1]
+        ref[(0, 2, 0, 1)]=-0.650922270216*x_ref[0]**o + (0.625250563608)*x_ref[0] + (-0.55071785467)*x_ref[1]**o + (0.488093969417)*x_ref[1]
+        arg[(0, 2, 0, 2)]=-0.216767996559*x[0]**o + (-0.454777519358)*x[0] + (-0.940141242903)*x[1]**o + (0.01651425168)*x[1]
+        ref[(0, 2, 0, 2)]=-0.216767996559*x_ref[0]**o + (-0.454777519358)*x_ref[0] + (-0.940141242903)*x_ref[1]**o + (0.01651425168)*x_ref[1]
+        arg[(0, 2, 0, 3)]=-0.105688352826*x[0]**o + (0.525427714172)*x[0] + (-0.786588024779)*x[1]**o + (-0.399257946625)*x[1]
+        ref[(0, 2, 0, 3)]=-0.105688352826*x_ref[0]**o + (0.525427714172)*x_ref[0] + (-0.786588024779)*x_ref[1]**o + (-0.399257946625)*x_ref[1]
+        arg[(0, 2, 1, 0)]=0.556234123183*x[0]**o + (0.439962279041)*x[0] + (0.628895787727)*x[1]**o + (-0.0514844148814)*x[1]
+        ref[(0, 2, 1, 0)]=0.556234123183*x_ref[0]**o + (0.439962279041)*x_ref[0] + (0.628895787727)*x_ref[1]**o + (-0.0514844148814)*x_ref[1]
+        arg[(0, 2, 1, 1)]=0.786541259676*x[0]**o + (-0.23925951584)*x[0] + (-0.633791053094)*x[1]**o + (-0.998586528762)*x[1]
+        ref[(0, 2, 1, 1)]=0.786541259676*x_ref[0]**o + (-0.23925951584)*x_ref[0] + (-0.633791053094)*x_ref[1]**o + (-0.998586528762)*x_ref[1]
+        arg[(0, 2, 1, 2)]=0.194556541826*x[0]**o + (0.28275964984)*x[0] + (0.310688225769)*x[1]**o + (0.614166965887)*x[1]
+        ref[(0, 2, 1, 2)]=0.194556541826*x_ref[0]**o + (0.28275964984)*x_ref[0] + (0.310688225769)*x_ref[1]**o + (0.614166965887)*x_ref[1]
+        arg[(0, 2, 1, 3)]=0.961733457465*x[0]**o + (-0.398628479569)*x[0] + (0.594917846139)*x[1]**o + (-0.258486241791)*x[1]
+        ref[(0, 2, 1, 3)]=0.961733457465*x_ref[0]**o + (-0.398628479569)*x_ref[0] + (0.594917846139)*x_ref[1]**o + (-0.258486241791)*x_ref[1]
+        arg[(0, 2, 2, 0)]=-0.831900408126*x[0]**o + (-0.0905898144939)*x[0] + (0.599700346933)*x[1]**o + (-0.748722915036)*x[1]
+        ref[(0, 2, 2, 0)]=-0.831900408126*x_ref[0]**o + (-0.0905898144939)*x_ref[0] + (0.599700346933)*x_ref[1]**o + (-0.748722915036)*x_ref[1]
+        arg[(0, 2, 2, 1)]=0.316356589247*x[0]**o + (-0.0155737628829)*x[0] + (-0.884730503827)*x[1]**o + (0.559152835532)*x[1]
+        ref[(0, 2, 2, 1)]=0.316356589247*x_ref[0]**o + (-0.0155737628829)*x_ref[0] + (-0.884730503827)*x_ref[1]**o + (0.559152835532)*x_ref[1]
+        arg[(0, 2, 2, 2)]=0.128299531268*x[0]**o + (-0.126674645457)*x[0] + (0.840994119336)*x[1]**o + (0.457566338331)*x[1]
+        ref[(0, 2, 2, 2)]=0.128299531268*x_ref[0]**o + (-0.126674645457)*x_ref[0] + (0.840994119336)*x_ref[1]**o + (0.457566338331)*x_ref[1]
+        arg[(0, 2, 2, 3)]=0.0984059845964*x[0]**o + (0.896400967327)*x[0] + (0.784393387228)*x[1]**o + (-0.0478227877188)*x[1]
+        ref[(0, 2, 2, 3)]=0.0984059845964*x_ref[0]**o + (0.896400967327)*x_ref[0] + (0.784393387228)*x_ref[1]**o + (-0.0478227877188)*x_ref[1]
+        arg[(0, 2, 3, 0)]=0.257673300679*x[0]**o + (-0.887330458149)*x[0] + (0.420465543233)*x[1]**o + (-0.293620924755)*x[1]
+        ref[(0, 2, 3, 0)]=0.257673300679*x_ref[0]**o + (-0.887330458149)*x_ref[0] + (0.420465543233)*x_ref[1]**o + (-0.293620924755)*x_ref[1]
+        arg[(0, 2, 3, 1)]=0.165705328788*x[0]**o + (-0.032295083405)*x[0] + (0.922237920391)*x[1]**o + (0.461469039053)*x[1]
+        ref[(0, 2, 3, 1)]=0.165705328788*x_ref[0]**o + (-0.032295083405)*x_ref[0] + (0.922237920391)*x_ref[1]**o + (0.461469039053)*x_ref[1]
+        arg[(0, 2, 3, 2)]=0.642889268679*x[0]**o + (-0.99528915398)*x[0] + (-0.728938814001)*x[1]**o + (0.30333602914)*x[1]
+        ref[(0, 2, 3, 2)]=0.642889268679*x_ref[0]**o + (-0.99528915398)*x_ref[0] + (-0.728938814001)*x_ref[1]**o + (0.30333602914)*x_ref[1]
+        arg[(0, 2, 3, 3)]=0.268916439729*x[0]**o + (0.561118356764)*x[0] + (-0.226199322817)*x[1]**o + (0.736559293858)*x[1]
+        ref[(0, 2, 3, 3)]=0.268916439729*x_ref[0]**o + (0.561118356764)*x_ref[0] + (-0.226199322817)*x_ref[1]**o + (0.736559293858)*x_ref[1]
+        arg[(0, 3, 0, 0)]=-0.669261381488*x[0]**o + (-0.0159344337713)*x[0] + (-0.168038160212)*x[1]**o + (0.0383246655906)*x[1]
+        ref[(0, 3, 0, 0)]=-0.669261381488*x_ref[0]**o + (-0.0159344337713)*x_ref[0] + (-0.168038160212)*x_ref[1]**o + (0.0383246655906)*x_ref[1]
+        arg[(0, 3, 0, 1)]=0.275365233475*x[0]**o + (-0.274538775999)*x[0] + (0.58809825285)*x[1]**o + (-0.479078134167)*x[1]
+        ref[(0, 3, 0, 1)]=0.275365233475*x_ref[0]**o + (-0.274538775999)*x_ref[0] + (0.58809825285)*x_ref[1]**o + (-0.479078134167)*x_ref[1]
+        arg[(0, 3, 0, 2)]=-0.131769146131*x[0]**o + (0.894644193315)*x[0] + (0.739788658622)*x[1]**o + (-0.499166028174)*x[1]
+        ref[(0, 3, 0, 2)]=-0.131769146131*x_ref[0]**o + (0.894644193315)*x_ref[0] + (0.739788658622)*x_ref[1]**o + (-0.499166028174)*x_ref[1]
+        arg[(0, 3, 0, 3)]=0.263293756688*x[0]**o + (-0.865441881442)*x[0] + (0.639512469421)*x[1]**o + (-0.142351283423)*x[1]
+        ref[(0, 3, 0, 3)]=0.263293756688*x_ref[0]**o + (-0.865441881442)*x_ref[0] + (0.639512469421)*x_ref[1]**o + (-0.142351283423)*x_ref[1]
+        arg[(0, 3, 1, 0)]=-0.741932307703*x[0]**o + (-0.762224860638)*x[0] + (0.553250203243)*x[1]**o + (-0.284594664732)*x[1]
+        ref[(0, 3, 1, 0)]=-0.741932307703*x_ref[0]**o + (-0.762224860638)*x_ref[0] + (0.553250203243)*x_ref[1]**o + (-0.284594664732)*x_ref[1]
+        arg[(0, 3, 1, 1)]=0.341220067111*x[0]**o + (0.107810698716)*x[0] + (-0.799322972968)*x[1]**o + (0.941699298937)*x[1]
+        ref[(0, 3, 1, 1)]=0.341220067111*x_ref[0]**o + (0.107810698716)*x_ref[0] + (-0.799322972968)*x_ref[1]**o + (0.941699298937)*x_ref[1]
+        arg[(0, 3, 1, 2)]=-0.709277764927*x[0]**o + (0.648391362226)*x[0] + (0.0598900318036)*x[1]**o + (0.777942308518)*x[1]
+        ref[(0, 3, 1, 2)]=-0.709277764927*x_ref[0]**o + (0.648391362226)*x_ref[0] + (0.0598900318036)*x_ref[1]**o + (0.777942308518)*x_ref[1]
+        arg[(0, 3, 1, 3)]=-0.477118237633*x[0]**o + (0.314012097611)*x[0] + (0.564575109914)*x[1]**o + (-0.115217288053)*x[1]
+        ref[(0, 3, 1, 3)]=-0.477118237633*x_ref[0]**o + (0.314012097611)*x_ref[0] + (0.564575109914)*x_ref[1]**o + (-0.115217288053)*x_ref[1]
+        arg[(0, 3, 2, 0)]=0.721472640079*x[0]**o + (-0.516182743814)*x[0] + (0.135527183579)*x[1]**o + (0.800116141683)*x[1]
+        ref[(0, 3, 2, 0)]=0.721472640079*x_ref[0]**o + (-0.516182743814)*x_ref[0] + (0.135527183579)*x_ref[1]**o + (0.800116141683)*x_ref[1]
+        arg[(0, 3, 2, 1)]=-0.680602425156*x[0]**o + (-0.402782280715)*x[0] + (-0.324602581142)*x[1]**o + (-0.210044504228)*x[1]
+        ref[(0, 3, 2, 1)]=-0.680602425156*x_ref[0]**o + (-0.402782280715)*x_ref[0] + (-0.324602581142)*x_ref[1]**o + (-0.210044504228)*x_ref[1]
+        arg[(0, 3, 2, 2)]=0.255198857197*x[0]**o + (-0.783943555898)*x[0] + (-0.649891405292)*x[1]**o + (0.721533551802)*x[1]
+        ref[(0, 3, 2, 2)]=0.255198857197*x_ref[0]**o + (-0.783943555898)*x_ref[0] + (-0.649891405292)*x_ref[1]**o + (0.721533551802)*x_ref[1]
+        arg[(0, 3, 2, 3)]=0.437122116781*x[0]**o + (0.692627906085)*x[0] + (-0.498951851815)*x[1]**o + (0.491375100245)*x[1]
+        ref[(0, 3, 2, 3)]=0.437122116781*x_ref[0]**o + (0.692627906085)*x_ref[0] + (-0.498951851815)*x_ref[1]**o + (0.491375100245)*x_ref[1]
+        arg[(0, 3, 3, 0)]=0.13774283897*x[0]**o + (-0.595304763076)*x[0] + (-0.173632025634)*x[1]**o + (-0.97946892307)*x[1]
+        ref[(0, 3, 3, 0)]=0.13774283897*x_ref[0]**o + (-0.595304763076)*x_ref[0] + (-0.173632025634)*x_ref[1]**o + (-0.97946892307)*x_ref[1]
+        arg[(0, 3, 3, 1)]=0.488717847779*x[0]**o + (0.186256457387)*x[0] + (-0.594744493547)*x[1]**o + (-0.221934670618)*x[1]
+        ref[(0, 3, 3, 1)]=0.488717847779*x_ref[0]**o + (0.186256457387)*x_ref[0] + (-0.594744493547)*x_ref[1]**o + (-0.221934670618)*x_ref[1]
+        arg[(0, 3, 3, 2)]=0.343986907696*x[0]**o + (0.725853431549)*x[0] + (0.389880574428)*x[1]**o + (0.263057084505)*x[1]
+        ref[(0, 3, 3, 2)]=0.343986907696*x_ref[0]**o + (0.725853431549)*x_ref[0] + (0.389880574428)*x_ref[1]**o + (0.263057084505)*x_ref[1]
+        arg[(0, 3, 3, 3)]=-0.830098562995*x[0]**o + (0.344732283774)*x[0] + (0.753633438935)*x[1]**o + (0.732522497552)*x[1]
+        ref[(0, 3, 3, 3)]=-0.830098562995*x_ref[0]**o + (0.344732283774)*x_ref[0] + (0.753633438935)*x_ref[1]**o + (0.732522497552)*x_ref[1]
+        arg[(1, 0, 0, 0)]=-0.757242186608*x[0]**o + (0.403269076468)*x[0] + (-0.2964335468)*x[1]**o + (0.0953499702814)*x[1]
+        ref[(1, 0, 0, 0)]=-0.757242186608*x_ref[0]**o + (0.403269076468)*x_ref[0] + (-0.2964335468)*x_ref[1]**o + (0.0953499702814)*x_ref[1]
+        arg[(1, 0, 0, 1)]=0.699432613756*x[0]**o + (-0.331715427701)*x[0] + (-0.115428093445)*x[1]**o + (-0.278319899391)*x[1]
+        ref[(1, 0, 0, 1)]=0.699432613756*x_ref[0]**o + (-0.331715427701)*x_ref[0] + (-0.115428093445)*x_ref[1]**o + (-0.278319899391)*x_ref[1]
+        arg[(1, 0, 0, 2)]=-0.245183847019*x[0]**o + (0.478290634104)*x[0] + (0.847017214891)*x[1]**o + (0.96804987868)*x[1]
+        ref[(1, 0, 0, 2)]=-0.245183847019*x_ref[0]**o + (0.478290634104)*x_ref[0] + (0.847017214891)*x_ref[1]**o + (0.96804987868)*x_ref[1]
+        arg[(1, 0, 0, 3)]=0.565253439564*x[0]**o + (-0.530222942571)*x[0] + (0.244049514235)*x[1]**o + (-0.414362025266)*x[1]
+        ref[(1, 0, 0, 3)]=0.565253439564*x_ref[0]**o + (-0.530222942571)*x_ref[0] + (0.244049514235)*x_ref[1]**o + (-0.414362025266)*x_ref[1]
+        arg[(1, 0, 1, 0)]=0.361264782625*x[0]**o + (-0.189890174871)*x[0] + (-0.202530168728)*x[1]**o + (0.594549481449)*x[1]
+        ref[(1, 0, 1, 0)]=0.361264782625*x_ref[0]**o + (-0.189890174871)*x_ref[0] + (-0.202530168728)*x_ref[1]**o + (0.594549481449)*x_ref[1]
+        arg[(1, 0, 1, 1)]=0.694336461119*x[0]**o + (-0.397572313291)*x[0] + (0.0454747057992)*x[1]**o + (-0.36579405994)*x[1]
+        ref[(1, 0, 1, 1)]=0.694336461119*x_ref[0]**o + (-0.397572313291)*x_ref[0] + (0.0454747057992)*x_ref[1]**o + (-0.36579405994)*x_ref[1]
+        arg[(1, 0, 1, 2)]=0.629384873257*x[0]**o + (-0.171558531791)*x[0] + (-0.57301167511)*x[1]**o + (-0.706918828465)*x[1]
+        ref[(1, 0, 1, 2)]=0.629384873257*x_ref[0]**o + (-0.171558531791)*x_ref[0] + (-0.57301167511)*x_ref[1]**o + (-0.706918828465)*x_ref[1]
+        arg[(1, 0, 1, 3)]=-0.757036990613*x[0]**o + (0.0408740849484)*x[0] + (0.0344643037895)*x[1]**o + (0.541550601865)*x[1]
+        ref[(1, 0, 1, 3)]=-0.757036990613*x_ref[0]**o + (0.0408740849484)*x_ref[0] + (0.0344643037895)*x_ref[1]**o + (0.541550601865)*x_ref[1]
+        arg[(1, 0, 2, 0)]=-0.659151677563*x[0]**o + (-0.655519375144)*x[0] + (-0.898736502682)*x[1]**o + (0.776907764123)*x[1]
+        ref[(1, 0, 2, 0)]=-0.659151677563*x_ref[0]**o + (-0.655519375144)*x_ref[0] + (-0.898736502682)*x_ref[1]**o + (0.776907764123)*x_ref[1]
+        arg[(1, 0, 2, 1)]=-0.464629675914*x[0]**o + (-0.0142786425273)*x[0] + (0.800041692731)*x[1]**o + (0.139828809376)*x[1]
+        ref[(1, 0, 2, 1)]=-0.464629675914*x_ref[0]**o + (-0.0142786425273)*x_ref[0] + (0.800041692731)*x_ref[1]**o + (0.139828809376)*x_ref[1]
+        arg[(1, 0, 2, 2)]=-0.54743330998*x[0]**o + (0.788832401365)*x[0] + (0.378845055329)*x[1]**o + (-0.878691980682)*x[1]
+        ref[(1, 0, 2, 2)]=-0.54743330998*x_ref[0]**o + (0.788832401365)*x_ref[0] + (0.378845055329)*x_ref[1]**o + (-0.878691980682)*x_ref[1]
+        arg[(1, 0, 2, 3)]=-0.600196794147*x[0]**o + (0.409363691377)*x[0] + (0.925509081219)*x[1]**o + (-0.368793408584)*x[1]
+        ref[(1, 0, 2, 3)]=-0.600196794147*x_ref[0]**o + (0.409363691377)*x_ref[0] + (0.925509081219)*x_ref[1]**o + (-0.368793408584)*x_ref[1]
+        arg[(1, 0, 3, 0)]=-0.133764549002*x[0]**o + (-0.429246587536)*x[0] + (-0.00903526239009)*x[1]**o + (-0.624707223524)*x[1]
+        ref[(1, 0, 3, 0)]=-0.133764549002*x_ref[0]**o + (-0.429246587536)*x_ref[0] + (-0.00903526239009)*x_ref[1]**o + (-0.624707223524)*x_ref[1]
+        arg[(1, 0, 3, 1)]=-0.802674673605*x[0]**o + (-0.320023062189)*x[0] + (0.262274721742)*x[1]**o + (-0.372703298355)*x[1]
+        ref[(1, 0, 3, 1)]=-0.802674673605*x_ref[0]**o + (-0.320023062189)*x_ref[0] + (0.262274721742)*x_ref[1]**o + (-0.372703298355)*x_ref[1]
+        arg[(1, 0, 3, 2)]=0.943636887307*x[0]**o + (0.419339216045)*x[0] + (-0.764247222464)*x[1]**o + (-0.473329226998)*x[1]
+        ref[(1, 0, 3, 2)]=0.943636887307*x_ref[0]**o + (0.419339216045)*x_ref[0] + (-0.764247222464)*x_ref[1]**o + (-0.473329226998)*x_ref[1]
+        arg[(1, 0, 3, 3)]=0.628187005439*x[0]**o + (-0.999878663117)*x[0] + (0.0887000221029)*x[1]**o + (-0.526195512314)*x[1]
+        ref[(1, 0, 3, 3)]=0.628187005439*x_ref[0]**o + (-0.999878663117)*x_ref[0] + (0.0887000221029)*x_ref[1]**o + (-0.526195512314)*x_ref[1]
+        arg[(1, 1, 0, 0)]=-0.17294195965*x[0]**o + (0.0173274118779)*x[0] + (-0.701612233902)*x[1]**o + (-0.515665335581)*x[1]
+        ref[(1, 1, 0, 0)]=-0.17294195965*x_ref[0]**o + (0.0173274118779)*x_ref[0] + (-0.701612233902)*x_ref[1]**o + (-0.515665335581)*x_ref[1]
+        arg[(1, 1, 0, 1)]=0.713230320233*x[0]**o + (-0.681861390264)*x[0] + (0.884039304766)*x[1]**o + (-0.646891541658)*x[1]
+        ref[(1, 1, 0, 1)]=0.713230320233*x_ref[0]**o + (-0.681861390264)*x_ref[0] + (0.884039304766)*x_ref[1]**o + (-0.646891541658)*x_ref[1]
+        arg[(1, 1, 0, 2)]=-0.110752429675*x[0]**o + (0.637653165309)*x[0] + (-0.284976836898)*x[1]**o + (-0.748369461106)*x[1]
+        ref[(1, 1, 0, 2)]=-0.110752429675*x_ref[0]**o + (0.637653165309)*x_ref[0] + (-0.284976836898)*x_ref[1]**o + (-0.748369461106)*x_ref[1]
+        arg[(1, 1, 0, 3)]=-0.249109355835*x[0]**o + (-0.807053262293)*x[0] + (-0.783372156528)*x[1]**o + (-0.03938605078)*x[1]
+        ref[(1, 1, 0, 3)]=-0.249109355835*x_ref[0]**o + (-0.807053262293)*x_ref[0] + (-0.783372156528)*x_ref[1]**o + (-0.03938605078)*x_ref[1]
+        arg[(1, 1, 1, 0)]=-0.319963445005*x[0]**o + (-0.554554064062)*x[0] + (0.948436269255)*x[1]**o + (-0.53647144689)*x[1]
+        ref[(1, 1, 1, 0)]=-0.319963445005*x_ref[0]**o + (-0.554554064062)*x_ref[0] + (0.948436269255)*x_ref[1]**o + (-0.53647144689)*x_ref[1]
+        arg[(1, 1, 1, 1)]=0.953547411836*x[0]**o + (-0.125119945286)*x[0] + (-0.967670064537)*x[1]**o + (0.260163693003)*x[1]
+        ref[(1, 1, 1, 1)]=0.953547411836*x_ref[0]**o + (-0.125119945286)*x_ref[0] + (-0.967670064537)*x_ref[1]**o + (0.260163693003)*x_ref[1]
+        arg[(1, 1, 1, 2)]=0.693785397858*x[0]**o + (0.887349438965)*x[0] + (-0.155320056077)*x[1]**o + (0.996052155705)*x[1]
+        ref[(1, 1, 1, 2)]=0.693785397858*x_ref[0]**o + (0.887349438965)*x_ref[0] + (-0.155320056077)*x_ref[1]**o + (0.996052155705)*x_ref[1]
+        arg[(1, 1, 1, 3)]=0.910064330868*x[0]**o + (-0.914654095987)*x[0] + (-0.0496934891052)*x[1]**o + (-0.464697914826)*x[1]
+        ref[(1, 1, 1, 3)]=0.910064330868*x_ref[0]**o + (-0.914654095987)*x_ref[0] + (-0.0496934891052)*x_ref[1]**o + (-0.464697914826)*x_ref[1]
+        arg[(1, 1, 2, 0)]=0.245776482657*x[0]**o + (-0.0953729944695)*x[0] + (0.142566787891)*x[1]**o + (-0.755857483421)*x[1]
+        ref[(1, 1, 2, 0)]=0.245776482657*x_ref[0]**o + (-0.0953729944695)*x_ref[0] + (0.142566787891)*x_ref[1]**o + (-0.755857483421)*x_ref[1]
+        arg[(1, 1, 2, 1)]=-0.154032641414*x[0]**o + (0.0866375241162)*x[0] + (-0.351511159973)*x[1]**o + (-0.187096263668)*x[1]
+        ref[(1, 1, 2, 1)]=-0.154032641414*x_ref[0]**o + (0.0866375241162)*x_ref[0] + (-0.351511159973)*x_ref[1]**o + (-0.187096263668)*x_ref[1]
+        arg[(1, 1, 2, 2)]=0.270670236924*x[0]**o + (-0.807027121121)*x[0] + (-0.911851287083)*x[1]**o + (0.298143062073)*x[1]
+        ref[(1, 1, 2, 2)]=0.270670236924*x_ref[0]**o + (-0.807027121121)*x_ref[0] + (-0.911851287083)*x_ref[1]**o + (0.298143062073)*x_ref[1]
+        arg[(1, 1, 2, 3)]=0.559598618823*x[0]**o + (0.67052407428)*x[0] + (-0.137359380008)*x[1]**o + (-0.51513426878)*x[1]
+        ref[(1, 1, 2, 3)]=0.559598618823*x_ref[0]**o + (0.67052407428)*x_ref[0] + (-0.137359380008)*x_ref[1]**o + (-0.51513426878)*x_ref[1]
+        arg[(1, 1, 3, 0)]=0.120133257184*x[0]**o + (0.0455319493175)*x[0] + (-0.682662143099)*x[1]**o + (0.736555044296)*x[1]
+        ref[(1, 1, 3, 0)]=0.120133257184*x_ref[0]**o + (0.0455319493175)*x_ref[0] + (-0.682662143099)*x_ref[1]**o + (0.736555044296)*x_ref[1]
+        arg[(1, 1, 3, 1)]=-0.542032088646*x[0]**o + (0.745946019704)*x[0] + (0.0279995674497)*x[1]**o + (0.46712657333)*x[1]
+        ref[(1, 1, 3, 1)]=-0.542032088646*x_ref[0]**o + (0.745946019704)*x_ref[0] + (0.0279995674497)*x_ref[1]**o + (0.46712657333)*x_ref[1]
+        arg[(1, 1, 3, 2)]=0.650836075346*x[0]**o + (-0.404411662405)*x[0] + (-0.498730656204)*x[1]**o + (-0.950891728521)*x[1]
+        ref[(1, 1, 3, 2)]=0.650836075346*x_ref[0]**o + (-0.404411662405)*x_ref[0] + (-0.498730656204)*x_ref[1]**o + (-0.950891728521)*x_ref[1]
+        arg[(1, 1, 3, 3)]=-0.094073203313*x[0]**o + (-0.842711405423)*x[0] + (-0.80751419236)*x[1]**o + (-0.191457076651)*x[1]
+        ref[(1, 1, 3, 3)]=-0.094073203313*x_ref[0]**o + (-0.842711405423)*x_ref[0] + (-0.80751419236)*x_ref[1]**o + (-0.191457076651)*x_ref[1]
+        arg[(1, 2, 0, 0)]=-0.820030685593*x[0]**o + (0.699266354812)*x[0] + (0.856888476628)*x[1]**o + (0.591286317647)*x[1]
+        ref[(1, 2, 0, 0)]=-0.820030685593*x_ref[0]**o + (0.699266354812)*x_ref[0] + (0.856888476628)*x_ref[1]**o + (0.591286317647)*x_ref[1]
+        arg[(1, 2, 0, 1)]=-0.0390576450703*x[0]**o + (0.126435021653)*x[0] + (-0.145601529618)*x[1]**o + (-0.1652226015)*x[1]
+        ref[(1, 2, 0, 1)]=-0.0390576450703*x_ref[0]**o + (0.126435021653)*x_ref[0] + (-0.145601529618)*x_ref[1]**o + (-0.1652226015)*x_ref[1]
+        arg[(1, 2, 0, 2)]=0.609340507817*x[0]**o + (-0.0311995912562)*x[0] + (-0.829241085657)*x[1]**o + (0.758611416542)*x[1]
+        ref[(1, 2, 0, 2)]=0.609340507817*x_ref[0]**o + (-0.0311995912562)*x_ref[0] + (-0.829241085657)*x_ref[1]**o + (0.758611416542)*x_ref[1]
+        arg[(1, 2, 0, 3)]=-0.289245474398*x[0]**o + (-0.541315724289)*x[0] + (-0.710860952064)*x[1]**o + (-0.404984835448)*x[1]
+        ref[(1, 2, 0, 3)]=-0.289245474398*x_ref[0]**o + (-0.541315724289)*x_ref[0] + (-0.710860952064)*x_ref[1]**o + (-0.404984835448)*x_ref[1]
+        arg[(1, 2, 1, 0)]=-0.0772940871136*x[0]**o + (-0.548305963525)*x[0] + (-0.671256308402)*x[1]**o + (0.571176219933)*x[1]
+        ref[(1, 2, 1, 0)]=-0.0772940871136*x_ref[0]**o + (-0.548305963525)*x_ref[0] + (-0.671256308402)*x_ref[1]**o + (0.571176219933)*x_ref[1]
+        arg[(1, 2, 1, 1)]=0.668086350572*x[0]**o + (-0.469397354079)*x[0] + (-0.928943755899)*x[1]**o + (-0.462861141588)*x[1]
+        ref[(1, 2, 1, 1)]=0.668086350572*x_ref[0]**o + (-0.469397354079)*x_ref[0] + (-0.928943755899)*x_ref[1]**o + (-0.462861141588)*x_ref[1]
+        arg[(1, 2, 1, 2)]=-0.744218311856*x[0]**o + (0.981657479346)*x[0] + (0.291621714158)*x[1]**o + (-0.107193830645)*x[1]
+        ref[(1, 2, 1, 2)]=-0.744218311856*x_ref[0]**o + (0.981657479346)*x_ref[0] + (0.291621714158)*x_ref[1]**o + (-0.107193830645)*x_ref[1]
+        arg[(1, 2, 1, 3)]=0.64365499714*x[0]**o + (0.506448376439)*x[0] + (0.0153721857471)*x[1]**o + (-0.742402732912)*x[1]
+        ref[(1, 2, 1, 3)]=0.64365499714*x_ref[0]**o + (0.506448376439)*x_ref[0] + (0.0153721857471)*x_ref[1]**o + (-0.742402732912)*x_ref[1]
+        arg[(1, 2, 2, 0)]=0.716428336966*x[0]**o + (0.401626023971)*x[0] + (-0.494639430928)*x[1]**o + (-0.879253959723)*x[1]
+        ref[(1, 2, 2, 0)]=0.716428336966*x_ref[0]**o + (0.401626023971)*x_ref[0] + (-0.494639430928)*x_ref[1]**o + (-0.879253959723)*x_ref[1]
+        arg[(1, 2, 2, 1)]=0.977841980557*x[0]**o + (0.537720495152)*x[0] + (0.967854035227)*x[1]**o + (-0.404107741554)*x[1]
+        ref[(1, 2, 2, 1)]=0.977841980557*x_ref[0]**o + (0.537720495152)*x_ref[0] + (0.967854035227)*x_ref[1]**o + (-0.404107741554)*x_ref[1]
+        arg[(1, 2, 2, 2)]=-0.855738288559*x[0]**o + (0.36568964913)*x[0] + (0.00579524688075)*x[1]**o + (0.213669648021)*x[1]
+        ref[(1, 2, 2, 2)]=-0.855738288559*x_ref[0]**o + (0.36568964913)*x_ref[0] + (0.00579524688075)*x_ref[1]**o + (0.213669648021)*x_ref[1]
+        arg[(1, 2, 2, 3)]=-0.00859358993073*x[0]**o + (-0.144838214496)*x[0] + (0.606664046129)*x[1]**o + (-0.0665802020909)*x[1]
+        ref[(1, 2, 2, 3)]=-0.00859358993073*x_ref[0]**o + (-0.144838214496)*x_ref[0] + (0.606664046129)*x_ref[1]**o + (-0.0665802020909)*x_ref[1]
+        arg[(1, 2, 3, 0)]=0.436099001557*x[0]**o + (-0.99010185342)*x[0] + (0.0931532549611)*x[1]**o + (-0.427125974397)*x[1]
+        ref[(1, 2, 3, 0)]=0.436099001557*x_ref[0]**o + (-0.99010185342)*x_ref[0] + (0.0931532549611)*x_ref[1]**o + (-0.427125974397)*x_ref[1]
+        arg[(1, 2, 3, 1)]=0.945226251807*x[0]**o + (-0.991340616301)*x[0] + (0.156055139402)*x[1]**o + (-0.138511163979)*x[1]
+        ref[(1, 2, 3, 1)]=0.945226251807*x_ref[0]**o + (-0.991340616301)*x_ref[0] + (0.156055139402)*x_ref[1]**o + (-0.138511163979)*x_ref[1]
+        arg[(1, 2, 3, 2)]=0.294489125715*x[0]**o + (-0.891810607918)*x[0] + (0.291198545684)*x[1]**o + (0.487681032445)*x[1]
+        ref[(1, 2, 3, 2)]=0.294489125715*x_ref[0]**o + (-0.891810607918)*x_ref[0] + (0.291198545684)*x_ref[1]**o + (0.487681032445)*x_ref[1]
+        arg[(1, 2, 3, 3)]=-0.2094061864*x[0]**o + (-0.497288356817)*x[0] + (0.351580022175)*x[1]**o + (-0.568196624681)*x[1]
+        ref[(1, 2, 3, 3)]=-0.2094061864*x_ref[0]**o + (-0.497288356817)*x_ref[0] + (0.351580022175)*x_ref[1]**o + (-0.568196624681)*x_ref[1]
+        arg[(1, 3, 0, 0)]=0.151292782351*x[0]**o + (-0.526954967077)*x[0] + (0.163378266778)*x[1]**o + (-0.259660473574)*x[1]
+        ref[(1, 3, 0, 0)]=0.151292782351*x_ref[0]**o + (-0.526954967077)*x_ref[0] + (0.163378266778)*x_ref[1]**o + (-0.259660473574)*x_ref[1]
+        arg[(1, 3, 0, 1)]=0.117030359252*x[0]**o + (0.939660458381)*x[0] + (-0.322396553243)*x[1]**o + (-0.492216558799)*x[1]
+        ref[(1, 3, 0, 1)]=0.117030359252*x_ref[0]**o + (0.939660458381)*x_ref[0] + (-0.322396553243)*x_ref[1]**o + (-0.492216558799)*x_ref[1]
+        arg[(1, 3, 0, 2)]=0.959804233925*x[0]**o + (-0.205278919714)*x[0] + (0.798420010316)*x[1]**o + (-0.951517576277)*x[1]
+        ref[(1, 3, 0, 2)]=0.959804233925*x_ref[0]**o + (-0.205278919714)*x_ref[0] + (0.798420010316)*x_ref[1]**o + (-0.951517576277)*x_ref[1]
+        arg[(1, 3, 0, 3)]=-0.739862803281*x[0]**o + (-0.802955065805)*x[0] + (0.490989208623)*x[1]**o + (-0.35092205639)*x[1]
+        ref[(1, 3, 0, 3)]=-0.739862803281*x_ref[0]**o + (-0.802955065805)*x_ref[0] + (0.490989208623)*x_ref[1]**o + (-0.35092205639)*x_ref[1]
+        arg[(1, 3, 1, 0)]=-0.324041800705*x[0]**o + (0.86773907508)*x[0] + (-0.293705237271)*x[1]**o + (0.849217230594)*x[1]
+        ref[(1, 3, 1, 0)]=-0.324041800705*x_ref[0]**o + (0.86773907508)*x_ref[0] + (-0.293705237271)*x_ref[1]**o + (0.849217230594)*x_ref[1]
+        arg[(1, 3, 1, 1)]=0.00957380959786*x[0]**o + (0.387257272664)*x[0] + (0.699514133474)*x[1]**o + (-0.574248531301)*x[1]
+        ref[(1, 3, 1, 1)]=0.00957380959786*x_ref[0]**o + (0.387257272664)*x_ref[0] + (0.699514133474)*x_ref[1]**o + (-0.574248531301)*x_ref[1]
+        arg[(1, 3, 1, 2)]=-0.240769752394*x[0]**o + (0.786367445948)*x[0] + (0.571337349813)*x[1]**o + (-0.770703576378)*x[1]
+        ref[(1, 3, 1, 2)]=-0.240769752394*x_ref[0]**o + (0.786367445948)*x_ref[0] + (0.571337349813)*x_ref[1]**o + (-0.770703576378)*x_ref[1]
+        arg[(1, 3, 1, 3)]=0.226686721203*x[0]**o + (0.356915917428)*x[0] + (-0.716917089127)*x[1]**o + (0.382751438075)*x[1]
+        ref[(1, 3, 1, 3)]=0.226686721203*x_ref[0]**o + (0.356915917428)*x_ref[0] + (-0.716917089127)*x_ref[1]**o + (0.382751438075)*x_ref[1]
+        arg[(1, 3, 2, 0)]=-0.446427484109*x[0]**o + (-0.971198701881)*x[0] + (-0.908182593601)*x[1]**o + (-0.218742458414)*x[1]
+        ref[(1, 3, 2, 0)]=-0.446427484109*x_ref[0]**o + (-0.971198701881)*x_ref[0] + (-0.908182593601)*x_ref[1]**o + (-0.218742458414)*x_ref[1]
+        arg[(1, 3, 2, 1)]=0.39791650181*x[0]**o + (-0.753043881006)*x[0] + (-0.0163374980927)*x[1]**o + (-0.184583069918)*x[1]
+        ref[(1, 3, 2, 1)]=0.39791650181*x_ref[0]**o + (-0.753043881006)*x_ref[0] + (-0.0163374980927)*x_ref[1]**o + (-0.184583069918)*x_ref[1]
+        arg[(1, 3, 2, 2)]=-0.621834663001*x[0]**o + (0.978120095896)*x[0] + (-0.739525686376)*x[1]**o + (0.049081502497)*x[1]
+        ref[(1, 3, 2, 2)]=-0.621834663001*x_ref[0]**o + (0.978120095896)*x_ref[0] + (-0.739525686376)*x_ref[1]**o + (0.049081502497)*x_ref[1]
+        arg[(1, 3, 2, 3)]=-0.585887715107*x[0]**o + (0.290263427246)*x[0] + (-0.3788762965)*x[1]**o + (0.364817601611)*x[1]
+        ref[(1, 3, 2, 3)]=-0.585887715107*x_ref[0]**o + (0.290263427246)*x_ref[0] + (-0.3788762965)*x_ref[1]**o + (0.364817601611)*x_ref[1]
+        arg[(1, 3, 3, 0)]=-0.119788946383*x[0]**o + (-0.817257149499)*x[0] + (-0.0065409250288)*x[1]**o + (-0.269708354698)*x[1]
+        ref[(1, 3, 3, 0)]=-0.119788946383*x_ref[0]**o + (-0.817257149499)*x_ref[0] + (-0.0065409250288)*x_ref[1]**o + (-0.269708354698)*x_ref[1]
+        arg[(1, 3, 3, 1)]=0.410078853495*x[0]**o + (-0.345902363119)*x[0] + (0.665995425929)*x[1]**o + (-0.491137670173)*x[1]
+        ref[(1, 3, 3, 1)]=0.410078853495*x_ref[0]**o + (-0.345902363119)*x_ref[0] + (0.665995425929)*x_ref[1]**o + (-0.491137670173)*x_ref[1]
+        arg[(1, 3, 3, 2)]=-0.024275853602*x[0]**o + (0.0131847117437)*x[0] + (-0.652517222087)*x[1]**o + (0.0243256312635)*x[1]
+        ref[(1, 3, 3, 2)]=-0.024275853602*x_ref[0]**o + (0.0131847117437)*x_ref[0] + (-0.652517222087)*x_ref[1]**o + (0.0243256312635)*x_ref[1]
+        arg[(1, 3, 3, 3)]=0.0334889683804*x[0]**o + (-0.561337026076)*x[0] + (0.737104172172)*x[1]**o + (0.491612627019)*x[1]
+        ref[(1, 3, 3, 3)]=0.0334889683804*x_ref[0]**o + (-0.561337026076)*x_ref[0] + (0.737104172172)*x_ref[1]**o + (0.491612627019)*x_ref[1]
+        if dim==3:
+            arg[(0, 0, 0, 0)]+=-0.354822360839*x[2]**o + (-0.28204262433)*x[2]
+            ref[(0, 0, 0, 0)]+=-0.354822360839*x_ref[2]**o + (-0.28204262433)*x_ref[2]
+            arg[(0, 0, 0, 1)]+=-0.182476333361*x[2]**o + (-0.537346236239)*x[2]
+            ref[(0, 0, 0, 1)]+=-0.182476333361*x_ref[2]**o + (-0.537346236239)*x_ref[2]
+            arg[(0, 0, 0, 2)]+=0.841939059087*x[2]**o + (0.317587393818)*x[2]
+            ref[(0, 0, 0, 2)]+=0.841939059087*x_ref[2]**o + (0.317587393818)*x_ref[2]
+            arg[(0, 0, 0, 3)]+=0.910820406551*x[2]**o + (-0.941482792514)*x[2]
+            ref[(0, 0, 0, 3)]+=0.910820406551*x_ref[2]**o + (-0.941482792514)*x_ref[2]
+            arg[(0, 0, 1, 0)]+=-0.963681593143*x[2]**o + (0.615561929929)*x[2]
+            ref[(0, 0, 1, 0)]+=-0.963681593143*x_ref[2]**o + (0.615561929929)*x_ref[2]
+            arg[(0, 0, 1, 1)]+=0.661274860699*x[2]**o + (0.114192240575)*x[2]
+            ref[(0, 0, 1, 1)]+=0.661274860699*x_ref[2]**o + (0.114192240575)*x_ref[2]
+            arg[(0, 0, 1, 2)]+=-0.285266600351*x[2]**o + (0.0513472948633)*x[2]
+            ref[(0, 0, 1, 2)]+=-0.285266600351*x_ref[2]**o + (0.0513472948633)*x_ref[2]
+            arg[(0, 0, 1, 3)]+=-0.168437711912*x[2]**o + (-0.155403453723)*x[2]
+            ref[(0, 0, 1, 3)]+=-0.168437711912*x_ref[2]**o + (-0.155403453723)*x_ref[2]
+            arg[(0, 0, 2, 0)]+=0.0625105501581*x[2]**o + (0.267553944644)*x[2]
+            ref[(0, 0, 2, 0)]+=0.0625105501581*x_ref[2]**o + (0.267553944644)*x_ref[2]
+            arg[(0, 0, 2, 1)]+=0.578951657569*x[2]**o + (0.598663072206)*x[2]
+            ref[(0, 0, 2, 1)]+=0.578951657569*x_ref[2]**o + (0.598663072206)*x_ref[2]
+            arg[(0, 0, 2, 2)]+=-0.669120063902*x[2]**o + (-0.860720322425)*x[2]
+            ref[(0, 0, 2, 2)]+=-0.669120063902*x_ref[2]**o + (-0.860720322425)*x_ref[2]
+            arg[(0, 0, 2, 3)]+=-0.524353448793*x[2]**o + (0.309196229856)*x[2]
+            ref[(0, 0, 2, 3)]+=-0.524353448793*x_ref[2]**o + (0.309196229856)*x_ref[2]
+            arg[(0, 0, 3, 0)]+=0.795335854754*x[2]**o + (-0.0359625315779)*x[2]
+            ref[(0, 0, 3, 0)]+=0.795335854754*x_ref[2]**o + (-0.0359625315779)*x_ref[2]
+            arg[(0, 0, 3, 1)]+=0.997695946248*x[2]**o + (0.933178508467)*x[2]
+            ref[(0, 0, 3, 1)]+=0.997695946248*x_ref[2]**o + (0.933178508467)*x_ref[2]
+            arg[(0, 0, 3, 2)]+=0.0996068814032*x[2]**o + (-0.324966394492)*x[2]
+            ref[(0, 0, 3, 2)]+=0.0996068814032*x_ref[2]**o + (-0.324966394492)*x_ref[2]
+            arg[(0, 0, 3, 3)]+=-0.840240895729*x[2]**o + (-0.56300077064)*x[2]
+            ref[(0, 0, 3, 3)]+=-0.840240895729*x_ref[2]**o + (-0.56300077064)*x_ref[2]
+            arg[(0, 1, 0, 0)]+=-0.625926893898*x[2]**o + (0.667822700303)*x[2]
+            ref[(0, 1, 0, 0)]+=-0.625926893898*x_ref[2]**o + (0.667822700303)*x_ref[2]
+            arg[(0, 1, 0, 1)]+=-0.29543141481*x[2]**o + (0.663604778195)*x[2]
+            ref[(0, 1, 0, 1)]+=-0.29543141481*x_ref[2]**o + (0.663604778195)*x_ref[2]
+            arg[(0, 1, 0, 2)]+=0.264324916027*x[2]**o + (0.988930734328)*x[2]
+            ref[(0, 1, 0, 2)]+=0.264324916027*x_ref[2]**o + (0.988930734328)*x_ref[2]
+            arg[(0, 1, 0, 3)]+=-0.0675078846211*x[2]**o + (-0.43215909653)*x[2]
+            ref[(0, 1, 0, 3)]+=-0.0675078846211*x_ref[2]**o + (-0.43215909653)*x_ref[2]
+            arg[(0, 1, 1, 0)]+=0.408785342499*x[2]**o + (-0.675605557157)*x[2]
+            ref[(0, 1, 1, 0)]+=0.408785342499*x_ref[2]**o + (-0.675605557157)*x_ref[2]
+            arg[(0, 1, 1, 1)]+=0.923826524352*x[2]**o + (-0.986749959981)*x[2]
+            ref[(0, 1, 1, 1)]+=0.923826524352*x_ref[2]**o + (-0.986749959981)*x_ref[2]
+            arg[(0, 1, 1, 2)]+=0.817288789237*x[2]**o + (-0.678627231865)*x[2]
+            ref[(0, 1, 1, 2)]+=0.817288789237*x_ref[2]**o + (-0.678627231865)*x_ref[2]
+            arg[(0, 1, 1, 3)]+=-0.954479742428*x[2]**o + (0.160376795692)*x[2]
+            ref[(0, 1, 1, 3)]+=-0.954479742428*x_ref[2]**o + (0.160376795692)*x_ref[2]
+            arg[(0, 1, 2, 0)]+=0.656012904378*x[2]**o + (-0.59342229801)*x[2]
+            ref[(0, 1, 2, 0)]+=0.656012904378*x_ref[2]**o + (-0.59342229801)*x_ref[2]
+            arg[(0, 1, 2, 1)]+=-0.175926232565*x[2]**o + (0.115082810971)*x[2]
+            ref[(0, 1, 2, 1)]+=-0.175926232565*x_ref[2]**o + (0.115082810971)*x_ref[2]
+            arg[(0, 1, 2, 2)]+=0.369959329587*x[2]**o + (-0.676460244659)*x[2]
+            ref[(0, 1, 2, 2)]+=0.369959329587*x_ref[2]**o + (-0.676460244659)*x_ref[2]
+            arg[(0, 1, 2, 3)]+=0.695779058585*x[2]**o + (0.921248181488)*x[2]
+            ref[(0, 1, 2, 3)]+=0.695779058585*x_ref[2]**o + (0.921248181488)*x_ref[2]
+            arg[(0, 1, 3, 0)]+=-0.506337145528*x[2]**o + (0.8446425121)*x[2]
+            ref[(0, 1, 3, 0)]+=-0.506337145528*x_ref[2]**o + (0.8446425121)*x_ref[2]
+            arg[(0, 1, 3, 1)]+=-0.177479644972*x[2]**o + (-0.235617459289)*x[2]
+            ref[(0, 1, 3, 1)]+=-0.177479644972*x_ref[2]**o + (-0.235617459289)*x_ref[2]
+            arg[(0, 1, 3, 2)]+=0.0379297579754*x[2]**o + (-0.968020376281)*x[2]
+            ref[(0, 1, 3, 2)]+=0.0379297579754*x_ref[2]**o + (-0.968020376281)*x_ref[2]
+            arg[(0, 1, 3, 3)]+=0.291089965807*x[2]**o + (0.33551424709)*x[2]
+            ref[(0, 1, 3, 3)]+=0.291089965807*x_ref[2]**o + (0.33551424709)*x_ref[2]
+            arg[(0, 2, 0, 0)]+=-0.619739021212*x[2]**o + (-0.897793192975)*x[2]
+            ref[(0, 2, 0, 0)]+=-0.619739021212*x_ref[2]**o + (-0.897793192975)*x_ref[2]
+            arg[(0, 2, 0, 1)]+=0.134305097671*x[2]**o + (0.100248871685)*x[2]
+            ref[(0, 2, 0, 1)]+=0.134305097671*x_ref[2]**o + (0.100248871685)*x_ref[2]
+            arg[(0, 2, 0, 2)]+=0.671700901348*x[2]**o + (-0.758952117952)*x[2]
+            ref[(0, 2, 0, 2)]+=0.671700901348*x_ref[2]**o + (-0.758952117952)*x_ref[2]
+            arg[(0, 2, 0, 3)]+=0.56107003303*x[2]**o + (0.995813429786)*x[2]
+            ref[(0, 2, 0, 3)]+=0.56107003303*x_ref[2]**o + (0.995813429786)*x_ref[2]
+            arg[(0, 2, 1, 0)]+=0.437483053132*x[2]**o + (-0.882156170862)*x[2]
+            ref[(0, 2, 1, 0)]+=0.437483053132*x_ref[2]**o + (-0.882156170862)*x_ref[2]
+            arg[(0, 2, 1, 1)]+=-0.654544196118*x[2]**o + (-0.998650048858)*x[2]
+            ref[(0, 2, 1, 1)]+=-0.654544196118*x_ref[2]**o + (-0.998650048858)*x_ref[2]
+            arg[(0, 2, 1, 2)]+=-0.8385652258*x[2]**o + (-0.0893285610414)*x[2]
+            ref[(0, 2, 1, 2)]+=-0.8385652258*x_ref[2]**o + (-0.0893285610414)*x_ref[2]
+            arg[(0, 2, 1, 3)]+=0.288594828994*x[2]**o + (0.089123754379)*x[2]
+            ref[(0, 2, 1, 3)]+=0.288594828994*x_ref[2]**o + (0.089123754379)*x_ref[2]
+            arg[(0, 2, 2, 0)]+=0.318601022281*x[2]**o + (-0.885808339742)*x[2]
+            ref[(0, 2, 2, 0)]+=0.318601022281*x_ref[2]**o + (-0.885808339742)*x_ref[2]
+            arg[(0, 2, 2, 1)]+=0.62990457089*x[2]**o + (0.198078150959)*x[2]
+            ref[(0, 2, 2, 1)]+=0.62990457089*x_ref[2]**o + (0.198078150959)*x_ref[2]
+            arg[(0, 2, 2, 2)]+=0.511313181006*x[2]**o + (0.334240990633)*x[2]
+            ref[(0, 2, 2, 2)]+=0.511313181006*x_ref[2]**o + (0.334240990633)*x_ref[2]
+            arg[(0, 2, 2, 3)]+=0.465458952102*x[2]**o + (-0.203624573287)*x[2]
+            ref[(0, 2, 2, 3)]+=0.465458952102*x_ref[2]**o + (-0.203624573287)*x_ref[2]
+            arg[(0, 2, 3, 0)]+=0.837755044737*x[2]**o + (0.565425117059)*x[2]
+            ref[(0, 2, 3, 0)]+=0.837755044737*x_ref[2]**o + (0.565425117059)*x_ref[2]
+            arg[(0, 2, 3, 1)]+=-0.0280806172415*x[2]**o + (0.626585709309)*x[2]
+            ref[(0, 2, 3, 1)]+=-0.0280806172415*x_ref[2]**o + (0.626585709309)*x_ref[2]
+            arg[(0, 2, 3, 2)]+=0.752680834862*x[2]**o + (0.126063857601)*x[2]
+            ref[(0, 2, 3, 2)]+=0.752680834862*x_ref[2]**o + (0.126063857601)*x_ref[2]
+            arg[(0, 2, 3, 3)]+=-0.655731040889*x[2]**o + (0.69091862546)*x[2]
+            ref[(0, 2, 3, 3)]+=-0.655731040889*x_ref[2]**o + (0.69091862546)*x_ref[2]
+            arg[(0, 3, 0, 0)]+=0.416154700882*x[2]**o + (0.33686390172)*x[2]
+            ref[(0, 3, 0, 0)]+=0.416154700882*x_ref[2]**o + (0.33686390172)*x_ref[2]
+            arg[(0, 3, 0, 1)]+=0.825379774034*x[2]**o + (0.743416672614)*x[2]
+            ref[(0, 3, 0, 1)]+=0.825379774034*x_ref[2]**o + (0.743416672614)*x_ref[2]
+            arg[(0, 3, 0, 2)]+=0.416807706665*x[2]**o + (0.726525511782)*x[2]
+            ref[(0, 3, 0, 2)]+=0.416807706665*x_ref[2]**o + (0.726525511782)*x_ref[2]
+            arg[(0, 3, 0, 3)]+=0.394856138284*x[2]**o + (0.50556548156)*x[2]
+            ref[(0, 3, 0, 3)]+=0.394856138284*x_ref[2]**o + (0.50556548156)*x_ref[2]
+            arg[(0, 3, 1, 0)]+=-0.928303631104*x[2]**o + (-0.00761365757309)*x[2]
+            ref[(0, 3, 1, 0)]+=-0.928303631104*x_ref[2]**o + (-0.00761365757309)*x_ref[2]
+            arg[(0, 3, 1, 1)]+=0.530638644525*x[2]**o + (-0.777735497666)*x[2]
+            ref[(0, 3, 1, 1)]+=0.530638644525*x_ref[2]**o + (-0.777735497666)*x_ref[2]
+            arg[(0, 3, 1, 2)]+=0.2426879138*x[2]**o + (-0.843376336373)*x[2]
+            ref[(0, 3, 1, 2)]+=0.2426879138*x_ref[2]**o + (-0.843376336373)*x_ref[2]
+            arg[(0, 3, 1, 3)]+=0.61407151696*x[2]**o + (-0.994096889838)*x[2]
+            ref[(0, 3, 1, 3)]+=0.61407151696*x_ref[2]**o + (-0.994096889838)*x_ref[2]
+            arg[(0, 3, 2, 0)]+=0.568438357355*x[2]**o + (0.640296862781)*x[2]
+            ref[(0, 3, 2, 0)]+=0.568438357355*x_ref[2]**o + (0.640296862781)*x_ref[2]
+            arg[(0, 3, 2, 1)]+=-0.296056680035*x[2]**o + (-0.792613403206)*x[2]
+            ref[(0, 3, 2, 1)]+=-0.296056680035*x_ref[2]**o + (-0.792613403206)*x_ref[2]
+            arg[(0, 3, 2, 2)]+=-0.234144317411*x[2]**o + (0.900139863039)*x[2]
+            ref[(0, 3, 2, 2)]+=-0.234144317411*x_ref[2]**o + (0.900139863039)*x_ref[2]
+            arg[(0, 3, 2, 3)]+=-0.288597090039*x[2]**o + (0.277689927419)*x[2]
+            ref[(0, 3, 2, 3)]+=-0.288597090039*x_ref[2]**o + (0.277689927419)*x_ref[2]
+            arg[(0, 3, 3, 0)]+=-0.269464171345*x[2]**o + (0.595402760877)*x[2]
+            ref[(0, 3, 3, 0)]+=-0.269464171345*x_ref[2]**o + (0.595402760877)*x_ref[2]
+            arg[(0, 3, 3, 1)]+=0.342209539036*x[2]**o + (0.910922456263)*x[2]
+            ref[(0, 3, 3, 1)]+=0.342209539036*x_ref[2]**o + (0.910922456263)*x_ref[2]
+            arg[(0, 3, 3, 2)]+=-0.201084629317*x[2]**o + (0.989292788637)*x[2]
+            ref[(0, 3, 3, 2)]+=-0.201084629317*x_ref[2]**o + (0.989292788637)*x_ref[2]
+            arg[(0, 3, 3, 3)]+=0.307720069024*x[2]**o + (0.503038760841)*x[2]
+            ref[(0, 3, 3, 3)]+=0.307720069024*x_ref[2]**o + (0.503038760841)*x_ref[2]
+            arg[(1, 0, 0, 0)]+=-0.670380459056*x[2]**o + (0.724212590758)*x[2]
+            ref[(1, 0, 0, 0)]+=-0.670380459056*x_ref[2]**o + (0.724212590758)*x_ref[2]
+            arg[(1, 0, 0, 1)]+=0.559242335518*x[2]**o + (0.0149938181344)*x[2]
+            ref[(1, 0, 0, 1)]+=0.559242335518*x_ref[2]**o + (0.0149938181344)*x_ref[2]
+            arg[(1, 0, 0, 2)]+=-0.264925985939*x[2]**o + (-0.151349803799)*x[2]
+            ref[(1, 0, 0, 2)]+=-0.264925985939*x_ref[2]**o + (-0.151349803799)*x_ref[2]
+            arg[(1, 0, 0, 3)]+=0.388537966573*x[2]**o + (0.625858552279)*x[2]
+            ref[(1, 0, 0, 3)]+=0.388537966573*x_ref[2]**o + (0.625858552279)*x_ref[2]
+            arg[(1, 0, 1, 0)]+=-0.559907679414*x[2]**o + (0.223109116527)*x[2]
+            ref[(1, 0, 1, 0)]+=-0.559907679414*x_ref[2]**o + (0.223109116527)*x_ref[2]
+            arg[(1, 0, 1, 1)]+=-0.558249132963*x[2]**o + (-0.168527578981)*x[2]
+            ref[(1, 0, 1, 1)]+=-0.558249132963*x_ref[2]**o + (-0.168527578981)*x_ref[2]
+            arg[(1, 0, 1, 2)]+=0.67265618843*x[2]**o + (0.45750077565)*x[2]
+            ref[(1, 0, 1, 2)]+=0.67265618843*x_ref[2]**o + (0.45750077565)*x_ref[2]
+            arg[(1, 0, 1, 3)]+=-0.0942928911615*x[2]**o + (0.665703271464)*x[2]
+            ref[(1, 0, 1, 3)]+=-0.0942928911615*x_ref[2]**o + (0.665703271464)*x_ref[2]
+            arg[(1, 0, 2, 0)]+=-0.902434599709*x[2]**o + (-0.536665137693)*x[2]
+            ref[(1, 0, 2, 0)]+=-0.902434599709*x_ref[2]**o + (-0.536665137693)*x_ref[2]
+            arg[(1, 0, 2, 1)]+=0.667787493949*x[2]**o + (-0.274846790208)*x[2]
+            ref[(1, 0, 2, 1)]+=0.667787493949*x_ref[2]**o + (-0.274846790208)*x_ref[2]
+            arg[(1, 0, 2, 2)]+=0.0529521031859*x[2]**o + (0.845950112087)*x[2]
+            ref[(1, 0, 2, 2)]+=0.0529521031859*x_ref[2]**o + (0.845950112087)*x_ref[2]
+            arg[(1, 0, 2, 3)]+=0.535214349781*x[2]**o + (-0.38377023811)*x[2]
+            ref[(1, 0, 2, 3)]+=0.535214349781*x_ref[2]**o + (-0.38377023811)*x_ref[2]
+            arg[(1, 0, 3, 0)]+=-0.06319335443*x[2]**o + (0.49879011801)*x[2]
+            ref[(1, 0, 3, 0)]+=-0.06319335443*x_ref[2]**o + (0.49879011801)*x_ref[2]
+            arg[(1, 0, 3, 1)]+=-0.156501811688*x[2]**o + (-0.46054594725)*x[2]
+            ref[(1, 0, 3, 1)]+=-0.156501811688*x_ref[2]**o + (-0.46054594725)*x_ref[2]
+            arg[(1, 0, 3, 2)]+=-0.636168944901*x[2]**o + (0.0725632198102)*x[2]
+            ref[(1, 0, 3, 2)]+=-0.636168944901*x_ref[2]**o + (0.0725632198102)*x_ref[2]
+            arg[(1, 0, 3, 3)]+=0.524829067931*x[2]**o + (0.488181992449)*x[2]
+            ref[(1, 0, 3, 3)]+=0.524829067931*x_ref[2]**o + (0.488181992449)*x_ref[2]
+            arg[(1, 1, 0, 0)]+=0.158720091548*x[2]**o + (0.232813379021)*x[2]
+            ref[(1, 1, 0, 0)]+=0.158720091548*x_ref[2]**o + (0.232813379021)*x_ref[2]
+            arg[(1, 1, 0, 1)]+=0.190327108713*x[2]**o + (-0.165984659579)*x[2]
+            ref[(1, 1, 0, 1)]+=0.190327108713*x_ref[2]**o + (-0.165984659579)*x_ref[2]
+            arg[(1, 1, 0, 2)]+=-0.104754994212*x[2]**o + (-0.0768706765056)*x[2]
+            ref[(1, 1, 0, 2)]+=-0.104754994212*x_ref[2]**o + (-0.0768706765056)*x_ref[2]
+            arg[(1, 1, 0, 3)]+=0.143222234196*x[2]**o + (-0.713416306767)*x[2]
+            ref[(1, 1, 0, 3)]+=0.143222234196*x_ref[2]**o + (-0.713416306767)*x_ref[2]
+            arg[(1, 1, 1, 0)]+=0.768727881317*x[2]**o + (0.870181669389)*x[2]
+            ref[(1, 1, 1, 0)]+=0.768727881317*x_ref[2]**o + (0.870181669389)*x_ref[2]
+            arg[(1, 1, 1, 1)]+=0.92722384995*x[2]**o + (-0.819861222461)*x[2]
+            ref[(1, 1, 1, 1)]+=0.92722384995*x_ref[2]**o + (-0.819861222461)*x_ref[2]
+            arg[(1, 1, 1, 2)]+=0.94319100388*x[2]**o + (-0.333876462713)*x[2]
+            ref[(1, 1, 1, 2)]+=0.94319100388*x_ref[2]**o + (-0.333876462713)*x_ref[2]
+            arg[(1, 1, 1, 3)]+=0.0833783599583*x[2]**o + (0.960185242701)*x[2]
+            ref[(1, 1, 1, 3)]+=0.0833783599583*x_ref[2]**o + (0.960185242701)*x_ref[2]
+            arg[(1, 1, 2, 0)]+=0.237349431522*x[2]**o + (-0.599854378813)*x[2]
+            ref[(1, 1, 2, 0)]+=0.237349431522*x_ref[2]**o + (-0.599854378813)*x_ref[2]
+            arg[(1, 1, 2, 1)]+=0.953911243011*x[2]**o + (0.335621783673)*x[2]
+            ref[(1, 1, 2, 1)]+=0.953911243011*x_ref[2]**o + (0.335621783673)*x_ref[2]
+            arg[(1, 1, 2, 2)]+=0.59348562858*x[2]**o + (-0.135498610249)*x[2]
+            ref[(1, 1, 2, 2)]+=0.59348562858*x_ref[2]**o + (-0.135498610249)*x_ref[2]
+            arg[(1, 1, 2, 3)]+=-0.92229832495*x[2]**o + (-0.125912815555)*x[2]
+            ref[(1, 1, 2, 3)]+=-0.92229832495*x_ref[2]**o + (-0.125912815555)*x_ref[2]
+            arg[(1, 1, 3, 0)]+=-0.623230055104*x[2]**o + (0.763268241175)*x[2]
+            ref[(1, 1, 3, 0)]+=-0.623230055104*x_ref[2]**o + (0.763268241175)*x_ref[2]
+            arg[(1, 1, 3, 1)]+=-0.236278482249*x[2]**o + (0.58596286819)*x[2]
+            ref[(1, 1, 3, 1)]+=-0.236278482249*x_ref[2]**o + (0.58596286819)*x_ref[2]
+            arg[(1, 1, 3, 2)]+=-0.975478027389*x[2]**o + (-0.45010522421)*x[2]
+            ref[(1, 1, 3, 2)]+=-0.975478027389*x_ref[2]**o + (-0.45010522421)*x_ref[2]
+            arg[(1, 1, 3, 3)]+=0.735688118742*x[2]**o + (0.803054730677)*x[2]
+            ref[(1, 1, 3, 3)]+=0.735688118742*x_ref[2]**o + (0.803054730677)*x_ref[2]
+            arg[(1, 2, 0, 0)]+=-0.0752871630694*x[2]**o + (0.0876727207136)*x[2]
+            ref[(1, 2, 0, 0)]+=-0.0752871630694*x_ref[2]**o + (0.0876727207136)*x_ref[2]
+            arg[(1, 2, 0, 1)]+=-0.310188806749*x[2]**o + (-0.467093025979)*x[2]
+            ref[(1, 2, 0, 1)]+=-0.310188806749*x_ref[2]**o + (-0.467093025979)*x_ref[2]
+            arg[(1, 2, 0, 2)]+=-0.316331554841*x[2]**o + (0.376531026852)*x[2]
+            ref[(1, 2, 0, 2)]+=-0.316331554841*x_ref[2]**o + (0.376531026852)*x_ref[2]
+            arg[(1, 2, 0, 3)]+=0.443507290032*x[2]**o + (0.260533251216)*x[2]
+            ref[(1, 2, 0, 3)]+=0.443507290032*x_ref[2]**o + (0.260533251216)*x_ref[2]
+            arg[(1, 2, 1, 0)]+=0.497031604686*x[2]**o + (0.536108363607)*x[2]
+            ref[(1, 2, 1, 0)]+=0.497031604686*x_ref[2]**o + (0.536108363607)*x_ref[2]
+            arg[(1, 2, 1, 1)]+=0.802656768783*x[2]**o + (-0.513056286485)*x[2]
+            ref[(1, 2, 1, 1)]+=0.802656768783*x_ref[2]**o + (-0.513056286485)*x_ref[2]
+            arg[(1, 2, 1, 2)]+=0.197440607572*x[2]**o + (0.155077929009)*x[2]
+            ref[(1, 2, 1, 2)]+=0.197440607572*x_ref[2]**o + (0.155077929009)*x_ref[2]
+            arg[(1, 2, 1, 3)]+=0.91935289968*x[2]**o + (-0.995317199616)*x[2]
+            ref[(1, 2, 1, 3)]+=0.91935289968*x_ref[2]**o + (-0.995317199616)*x_ref[2]
+            arg[(1, 2, 2, 0)]+=-0.170874939872*x[2]**o + (0.563508633934)*x[2]
+            ref[(1, 2, 2, 0)]+=-0.170874939872*x_ref[2]**o + (0.563508633934)*x_ref[2]
+            arg[(1, 2, 2, 1)]+=0.532311157439*x[2]**o + (-0.900017368614)*x[2]
+            ref[(1, 2, 2, 1)]+=0.532311157439*x_ref[2]**o + (-0.900017368614)*x_ref[2]
+            arg[(1, 2, 2, 2)]+=-0.2530269203*x[2]**o + (0.733296855795)*x[2]
+            ref[(1, 2, 2, 2)]+=-0.2530269203*x_ref[2]**o + (0.733296855795)*x_ref[2]
+            arg[(1, 2, 2, 3)]+=-0.147673123503*x[2]**o + (-0.0391052342532)*x[2]
+            ref[(1, 2, 2, 3)]+=-0.147673123503*x_ref[2]**o + (-0.0391052342532)*x_ref[2]
+            arg[(1, 2, 3, 0)]+=-0.548810825906*x[2]**o + (-0.645422565578)*x[2]
+            ref[(1, 2, 3, 0)]+=-0.548810825906*x_ref[2]**o + (-0.645422565578)*x_ref[2]
+            arg[(1, 2, 3, 1)]+=0.00756914488622*x[2]**o + (-0.955503581222)*x[2]
+            ref[(1, 2, 3, 1)]+=0.00756914488622*x_ref[2]**o + (-0.955503581222)*x_ref[2]
+            arg[(1, 2, 3, 2)]+=-0.339680511022*x[2]**o + (0.36858287689)*x[2]
+            ref[(1, 2, 3, 2)]+=-0.339680511022*x_ref[2]**o + (0.36858287689)*x_ref[2]
+            arg[(1, 2, 3, 3)]+=-0.98436744662*x[2]**o + (-0.152905511429)*x[2]
+            ref[(1, 2, 3, 3)]+=-0.98436744662*x_ref[2]**o + (-0.152905511429)*x_ref[2]
+            arg[(1, 3, 0, 0)]+=-0.39055997147*x[2]**o + (0.701217545453)*x[2]
+            ref[(1, 3, 0, 0)]+=-0.39055997147*x_ref[2]**o + (0.701217545453)*x_ref[2]
+            arg[(1, 3, 0, 1)]+=0.68484848781*x[2]**o + (0.53322287774)*x[2]
+            ref[(1, 3, 0, 1)]+=0.68484848781*x_ref[2]**o + (0.53322287774)*x_ref[2]
+            arg[(1, 3, 0, 2)]+=-0.46815803374*x[2]**o + (0.147582254454)*x[2]
+            ref[(1, 3, 0, 2)]+=-0.46815803374*x_ref[2]**o + (0.147582254454)*x_ref[2]
+            arg[(1, 3, 0, 3)]+=-0.506594063071*x[2]**o + (-0.576198413014)*x[2]
+            ref[(1, 3, 0, 3)]+=-0.506594063071*x_ref[2]**o + (-0.576198413014)*x_ref[2]
+            arg[(1, 3, 1, 0)]+=0.865671107983*x[2]**o + (-0.680394776522)*x[2]
+            ref[(1, 3, 1, 0)]+=0.865671107983*x_ref[2]**o + (-0.680394776522)*x_ref[2]
+            arg[(1, 3, 1, 1)]+=0.136952800633*x[2]**o + (-0.930829194016)*x[2]
+            ref[(1, 3, 1, 1)]+=0.136952800633*x_ref[2]**o + (-0.930829194016)*x_ref[2]
+            arg[(1, 3, 1, 2)]+=0.0117021997808*x[2]**o + (0.369501523469)*x[2]
+            ref[(1, 3, 1, 2)]+=0.0117021997808*x_ref[2]**o + (0.369501523469)*x_ref[2]
+            arg[(1, 3, 1, 3)]+=-0.127483200153*x[2]**o + (-0.0132949685505)*x[2]
+            ref[(1, 3, 1, 3)]+=-0.127483200153*x_ref[2]**o + (-0.0132949685505)*x_ref[2]
+            arg[(1, 3, 2, 0)]+=0.583260707258*x[2]**o + (0.133481780386)*x[2]
+            ref[(1, 3, 2, 0)]+=0.583260707258*x_ref[2]**o + (0.133481780386)*x_ref[2]
+            arg[(1, 3, 2, 1)]+=-0.286717598836*x[2]**o + (0.651762055693)*x[2]
+            ref[(1, 3, 2, 1)]+=-0.286717598836*x_ref[2]**o + (0.651762055693)*x_ref[2]
+            arg[(1, 3, 2, 2)]+=0.916724082161*x[2]**o + (-0.0968197813034)*x[2]
+            ref[(1, 3, 2, 2)]+=0.916724082161*x_ref[2]**o + (-0.0968197813034)*x_ref[2]
+            arg[(1, 3, 2, 3)]+=0.930789413831*x[2]**o + (0.254648320405)*x[2]
+            ref[(1, 3, 2, 3)]+=0.930789413831*x_ref[2]**o + (0.254648320405)*x_ref[2]
+            arg[(1, 3, 3, 0)]+=-0.235770401371*x[2]**o + (-0.401153576338)*x[2]
+            ref[(1, 3, 3, 0)]+=-0.235770401371*x_ref[2]**o + (-0.401153576338)*x_ref[2]
+            arg[(1, 3, 3, 1)]+=-0.408964789689*x[2]**o + (0.922706127051)*x[2]
+            ref[(1, 3, 3, 1)]+=-0.408964789689*x_ref[2]**o + (0.922706127051)*x_ref[2]
+            arg[(1, 3, 3, 2)]+=-0.967090953117*x[2]**o + (-0.870668225578)*x[2]
+            ref[(1, 3, 3, 2)]+=-0.967090953117*x_ref[2]**o + (-0.870668225578)*x_ref[2]
+            arg[(1, 3, 3, 3)]+=0.624076645106*x[2]**o + (-0.142708755695)*x[2]
+            ref[(1, 3, 3, 3)]+=0.624076645106*x_ref[2]**o + (-0.142708755695)*x_ref[2]
+        res=interpolate(arg, where=w_ref)
+        self.assertTrue(isinstance(res,Data),'wrong type of result.')
+        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
+        self.assertEqual(res.getShape(), (2, 4, 4, 4),'wrong shape of result.')
+        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/escriptcore/test/python/test_util_overloaded_binary_no_tagged_data.py b/escriptcore/test/python/test_util_overloaded_binary_no_tagged_data.py
index 0a76a25..3f12e50 100644
--- a/escriptcore/test/python/test_util_overloaded_binary_no_tagged_data.py
+++ b/escriptcore/test/python/test_util_overloaded_binary_no_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_overloaded_binary_with_tagged_data.py b/escriptcore/test/python/test_util_overloaded_binary_with_tagged_data.py
index a7fb194..33968d0 100644
--- a/escriptcore/test/python/test_util_overloaded_binary_with_tagged_data.py
+++ b/escriptcore/test/python/test_util_overloaded_binary_with_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_reduction_new.py b/escriptcore/test/python/test_util_reduction_new.py
new file mode 100644
index 0000000..3caec35
--- /dev/null
+++ b/escriptcore/test/python/test_util_reduction_new.py
@@ -0,0 +1,154 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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-2017 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"
+
+"""
+test for util operations for reduction operations with tagged data
+
+:remark: use see `test_util`
+:var __author__: name of author
+:var __copyright__: copyrights
+:var __license__: licence agreement
+:var __url__: url entry point on documentation
+:var __version__: version
+:var __date__: date of the version
+"""
+
+__author__="Joel Fenwick, joelfenwick at uq.edu.au"
+
+import esys.escriptcore.utestselect as unittest
+import numpy
+from esys.escript import *
+from test_util_base import Test_util_base, Test_util_values
+
+def zero_to_nan(obj):
+    f=1./obj
+    return f/f
+
+class Test_util_reduction_new(Test_util_base, Test_util_values):        
+    def test_Lsup_new(self):
+        supportcplx=True
+        opstring="Lsup(a)"
+        misccheck="isinstance(res,float)"
+        oraclecheck="abs(ref).max()"
+        opname="Lsup"
+        update1="max(abs(r).max(),abs(r2).max())"
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+
+    def test_sup_new(self):
+        supportcplx=False
+        opstring="sup(a)"
+        misccheck="isinstance(res,float)"
+        oraclecheck="ref.max()"
+        opname="sup"
+        update1="max(r.max(), r2.max())"
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+
+    def test_inf_new(self):
+        supportcplx=False
+        opstring="inf(a)"
+        misccheck="isinstance(res,float)"
+        oraclecheck="ref.min()"
+        opname="inf"
+        update1="min(r.min(),r2.min())"
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+        
+    @unittest.skipIf(not hasFeature('NAN_CHECK'), "test only fires if NAN_CHECK is enabled")
+    def test_hasNaN(self):
+        # Need to check for hasNaN as well
+        supportcplx=True
+        opstring="a.hasNaN()"
+        misccheck=None
+        oraclecheck="0 in ref"
+        opname="hasNaN"
+        update1="bool(numpy.isnan(r).max()) or bool(numpy.isnan(r2).max())"       # numpy.bool_ is not bool
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=zero_to_nan, no_scalars=True)   
+        
+    # It would be a bit tricky to reformulate this into the new form 
+    # This will not test all possible type combinations 
+    @unittest.skipIf(not hasFeature('NAN_CHECK'), "test only fires if NAN_CHECK is enabled")
+    def test_NaNReduction_constData_rank4(self):
+        oarg=Data(numpy.array([[[[0.50544713768476202, 0.96922321849050874, -0.81524480218696649, -0.36499730379849193], 
+[-0.48131882706974372, 0.026812357207576465, 0.090903267401989618, -0.24742363369877829], [-0.51631372893805438, 
+0.30410275437953183, -0.75149566289642533, -0.19930300338453599]], [[0.82034878499482788, -0.70904661587698792, 
+-0.27637223434426073, -0.34818734117560401], [0.11686048779802416, -0.76746266142163178, -0.75578186306174833, 
+0.14509316330390232], [0.1590050723141736, 0.69684384552537937, -0.58747105640080832, -0.28640840371441523]]], 
+[[[0.14956532194045669, 0.081514192262221119, 0.32061383569406399, -0.2444346881437609], [0.79564139071785278, 
+-0.5456680167461434, 0.24722978802719742, 0.28286130725068315], [0.10385207763921711, -0.064749181840278336, 
+0.21325254547672734, -0.71875644540473838]], [[0.58552496009870802, 0.35472373485671338, -0.18411162994671826, 
+0.71609038134967773], [-0.20966804574945064, -0.49286619989346314, 0.85116051808632553, -0.94417114370961075], 
+[-0.40434528979823714, 0.62250343758157611, 0.64860074098639742, 0.0043146814280992096]]], [[[-0.14242849200713259, 
+0.42551908502898095, 0.7691157770973962, -0.37595641162856674], [0.026655444032149589, -0.82186407521644167, 
+0.40285091480648783, -0.53328831035315982], [-0.12887729257054481, 0.75610663428133451, 0.022049613835531723, 
+0.59949338706293043]], [[-0.34506254315071772, 0.019719877473602043, 0.10216765908478709, 0.022681548062032153], 
+[0.2228614880408597, 0.26944547311401901, -0.10122095357202965, -0.51019076850180589], [-0.081439546799124463, 
+0.18829632566943544, 0.12366885442775377, 0]]]]),self.functionspace)
+        arg=1/oarg       #will get us an inf
+        arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
+        self.assertTrue(numpy.isnan(sup(arg)),"wrong result")
+        self.assertTrue(numpy.isnan(inf(arg)),"wrong result")
+        self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")
+        arg=(1+0j)/oarg
+        arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
+        self.assertRaises(RuntimeError,sup, arg)
+        self.assertRaises(RuntimeError,inf, arg)
+        self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")
+        # Now testing tagged
+        arg.tag()
+        self.assertRaises(RuntimeError,sup, arg)
+        self.assertRaises(RuntimeError,inf, arg)
+        self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")        
+                
+    @unittest.skipIf(not hasFeature('NAN_CHECK'), "test only fires if NAN_CHECK is enabled")
+    def test_NaNReduction_expandedData_rank4(self):
+        oarg=Data(numpy.array([[[[0.50544713768476202, 0.96922321849050874, -0.81524480218696649, -0.36499730379849193], 
+[-0.48131882706974372, 0.026812357207576465, 0.090903267401989618, -0.24742363369877829], [-0.51631372893805438, 
+0.30410275437953183, -0.75149566289642533, -0.19930300338453599]], [[0.82034878499482788, -0.70904661587698792, 
+-0.27637223434426073, -0.34818734117560401], [0.11686048779802416, -0.76746266142163178, -0.75578186306174833, 
+0.14509316330390232], [0.1590050723141736, 0.69684384552537937, -0.58747105640080832, -0.28640840371441523]]], 
+[[[0.14956532194045669, 0.081514192262221119, 0.32061383569406399, -0.2444346881437609], [0.79564139071785278, 
+-0.5456680167461434, 0.24722978802719742, 0.28286130725068315], [0.10385207763921711, -0.064749181840278336, 
+0.21325254547672734, -0.71875644540473838]], [[0.58552496009870802, 0.35472373485671338, -0.18411162994671826, 
+0.71609038134967773], [-0.20966804574945064, -0.49286619989346314, 0.85116051808632553, -0.94417114370961075], 
+[-0.40434528979823714, 0.62250343758157611, 0.64860074098639742, 0.0043146814280992096]]], [[[-0.14242849200713259, 
+0.42551908502898095, 0.7691157770973962, -0.37595641162856674], [0.026655444032149589, -0.82186407521644167, 
+0.40285091480648783, -0.53328831035315982], [-0.12887729257054481, 0.75610663428133451, 0.022049613835531723, 
+0.59949338706293043]], [[-0.34506254315071772, 0.019719877473602043, 0.10216765908478709, 0.022681548062032153], 
+[0.2228614880408597, 0.26944547311401901, -0.10122095357202965, -0.51019076850180589], [-0.081439546799124463, 
+0.18829632566943544, 0.12366885442775377, 0]]]]),self.functionspace, True)
+        arg=1/oarg       #will get us an inf
+        arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
+        self.assertTrue(numpy.isnan(sup(arg)),"wrong result")
+        self.assertTrue(numpy.isnan(inf(arg)),"wrong result")
+        self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result") 
+        oarg.resolve()  # to prevent autolazy and complex interfering
+        arg=(1+0j)/oarg
+        arg.resolve() # to prevent autolazy and complex interfering
+        arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
+        self.assertRaises(RuntimeError,sup, arg)
+        self.assertRaises(RuntimeError,inf, arg)
+        self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")        
+    
+
+        
diff --git a/escriptcore/test/python/test_util_reduction_no_tagged_data.py b/escriptcore/test/python/test_util_reduction_no_tagged_data.py
deleted file mode 100644
index 3076921..0000000
--- a/escriptcore/test/python/test_util_reduction_no_tagged_data.py
+++ /dev/null
@@ -1,760 +0,0 @@
-
-##############################################################################
-#
-# Copyright (c) 2003-2016 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-2016 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"
-
-"""
-test for util operations for reduction operations without tagged data
-
-:remark: use see `test_util`
-:var __author__: name of author
-:var __copyright__: copyrights
-:var __license__: licence agreement
-:var __url__: url entry point on documentation
-:var __version__: version
-:var __date__: date of the version
-"""
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-import numpy
-from esys.escript import *
-from test_util_base import Test_util_base
-
-class Test_util_reduction_no_tagged_data(Test_util_base):
-   """
-   test for reduction operation Lsup,sup,inf. no tagged data are used
-   """
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_float_rank0(self):
-      arg=0.479077251703
-      ref=0.479077251703
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_array_rank0(self):
-      arg=0.352800421569
-      ref=0.352800421569
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_array_rank1(self):
-      arg=numpy.array([0.58364106865247445, 0.19224319360367659])
-      ref=0.583641068652
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_array_rank2(self):
-      arg=numpy.array([[0.67017748174064184, 0.27426357568545234, 0.99809374007262508, 0.0068333566694658288, 
--0.27942939334057559], [-0.41062296082648619, -0.036816602223561423, -0.50580074937952246, 0.93227848108675948, 
--0.061517050082725788], [0.36561750746233845, 0.41114839130078873, 0.52258027672142848, -0.16534372330544111, 
-0.20772668552253304], [0.821900382760401, -0.84255628577421948, -0.69396587198625026, -0.57918798921236458, 
--0.72171447032975466]])
-      ref=0.998093740073
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_array_rank3(self):
-      arg=numpy.array([[[0.058641541671277109, -0.90451294682583527], [-0.24359709498927606, -0.57748558070477163]], 
-[[0.035804882991596898, 0.62841290637910441], [-0.28533080116748288, -0.97886508166774955]], [[0.31393622401598642, 
--0.43905852202615403], [-0.86251727012547685, 0.028980168735740941]], [[0.64796855283921229, -0.48583038861071492], 
-[0.18113352051559328, -0.41145930584343637]], [[0.039393878628251944, 0.8768398562091233], [-0.17607723439655953, 
--0.88597401556177768]], [[-0.015710131346685419, -0.1460065558640582], [0.97739538148461858, -0.96991499683153215]]])
-      ref=0.978865081668
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_array_rank4(self):
-      arg=numpy.array([[[[-0.78982105495266985, -0.63220666806337955, 0.17512704833203396, 0.87905338838606228], 
-[0.23198845220692799, 0.039972475068823288, 0.012169097173197807, 0.44188750570302382], [0.76550090905039703, 
-0.31693138180972436, 0.1053031163896907, -0.35110494947362092]], [[0.98438531435704557, 0.64830270240860366, 
-0.17255823042313656, -0.89376135594562944], [-0.24129437029981871, -0.142955980423916, 0.16557185988864043, 
-0.97182386578689162], [0.68369373227893937, -0.86170550438838256, 0.30120477894454822, 0.38702330237685523]]], 
-[[[0.77139284396922037, 0.20032741426304668, 0.57845916425558697, -0.29867163908832151], [-0.068269410287581156, 
-0.5940891737261742, 0.076472990825278808, -0.099092183170674364], [-0.052727700907511776, 0.86303703635283835, 
--0.87561628108225542, 0.98706354430335175]], [[0.59243014649382819, 0.1550040875984271, -0.2755507051420949, 
--0.0013143184448647371], [0.49341486033505921, 0.47331310491746503, -0.79931467469262252, -0.90673470029976722], 
-[-0.032268150780954796, 0.296035852616644, 0.51579882806939303, 0.46437108203184607]]], [[[-0.54940019219066349, 
-0.063961557315018069, 0.58950734587654585, -0.98334853918198539], [-0.3624096661573355, 0.41744569348555416, 
-0.30209950686844023, 0.51268273249278518], [0.18884359916930848, -0.71707023426140903, -0.30560603652072227, 
-0.50521867139895282]], [[0.48925658559264695, -0.22791551552340583, -0.0018172920946346593, -0.35038144063572618], 
-[-0.92608233760416425, -0.58447575161042908, 0.6419293813902982, -0.9165521427783867], [0.32116313637555338, 
-0.64441081354246466, 0.57516697859586241, -0.30456483792192746]]]])
-      ref=0.987063544303
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_constData_rank0(self):
-      arg=Data(0.196366308048,self.functionspace)
-      ref=0.196366308048
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_constData_rank1(self):
-      arg=Data(numpy.array([-0.013183241788205846, 0.30081447346639489]),self.functionspace)
-      ref=0.300814473466
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_constData_rank2(self):
-      arg=Data(numpy.array([[0.5711180583492661, 0.70931947195628298, -0.66895311699347904, 0.96005746113679025, 
-0.73085528334644767], [-0.63904611175106618, 0.2843691804450883, 0.44023994297671054, 0.74230048057601272, 
-0.32582591826440876], [0.058605148358656045, 0.17856553839104938, 0.92397360311332144, -0.96449976222010503, 
--0.2936728605307215], [-0.54599501106213921, 0.76941479487476183, 0.071247548913826231, 0.19101147233175308, 
--0.1697403800152153]]),self.functionspace)
-      ref=0.96449976222
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_constData_rank3(self):
-      arg=Data(numpy.array([[[0.72501574945437675, 0.097442689963523454], [0.81136110912526904, 0.30019286779005516]], 
-[[-0.49590270028453376, 0.89873757442194169], [-0.77574675514072333, 0.00090692035026496143]], [[0.30313499990678294, 
--0.22304437168798286], [0.26434595235717628, 0.56043553186944139]], [[-0.82536121216538372, 0.017266274277504934], 
-[0.15087851023611853, 0.85422443819044291]], [[-0.85528228633213454, 0.21599153787828373], [-0.8320606477196939, 
-0.8359530516934528]], [[-0.32478507656272382, 0.11549647741760993], [-0.87438785398253049, 
-0.58454806081387956]]]),self.functionspace)
-      ref=0.898737574422
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_constData_rank4(self):
-      arg=Data(numpy.array([[[[-0.1675633776917147, 0.33827478137880718, -0.93890402023643449, 0.65020437341791437], 
-[0.29507018847480526, 0.98622587753446878, 0.12652012726316597, -0.31134038684685694], [-0.046095794370747178, 
-0.52924578464459526, -0.6479404156998898, -0.50108997075395512]], [[-0.89461015899273821, -0.079360196866752331, 
-0.24950542226018069, 0.6689436082056277], [0.92392213781413735, 0.3873078097702356, 0.19593123983162242, -0.24092882483013001], 
-[-0.64621424798001881, 0.9822743623774457, 0.89791841241748926, 0.61910184653693512]]], [[[-0.93993640130694156, 
-0.86452728798536005, 0.094496916350070848, 0.59825417382728907], [0.55042390382543216, 0.83625046124041091, 
--0.59865905280251042, 0.60081510989738351], [0.96300656863917622, 0.45676715577013183, 0.96765574240961594, 
-0.35217159943804499]], [[-0.44344990079738578, -0.62540931368504271, 0.47046830875624712, 0.56727920796684694], 
-[0.68754074058706793, -0.20419202844112316, -0.0095491803785341389, 0.013299778291189002], [0.17824394120278897, 
--0.27714200037108694, -0.2616405339148673, -0.32155257707876661]]], [[[0.47113927793594357, -0.99306136743656892, 
-0.30468996581271934, -0.55558797016447881], [0.83216176170936151, 0.016003159554198287, 0.50607924358488665, 
--0.44441953149310631], [0.81919419287951278, -0.65849894919643503, 0.91897977494732008, -0.52338741357416407]], 
-[[0.71408966944475138, -0.49347702658095161, 0.35676281330171133, 0.87268025092466872], [0.38401738326898771, 
--0.66323897612738114, 0.57309433517459518, 0.72101582669934583], [-0.0289954568811297, 0.55204032281174009, 
-0.51120867863750807, -0.67373936301915327]]]]),self.functionspace)
-      ref=0.993061367437
-      res=Lsup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_expandedData_rank0(self):
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*0.907507663119+(1.-msk)*0.907507663119
-
-      res=Lsup(arg)
-      ref=0.907507663119
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_expandedData_rank1(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([0.64842023599463228, 0.7950449048151853])+(1.-msk)*numpy.array([-0.53356920308809608, 
--0.30392740367264159])
-
-      res=Lsup(arg)
-      ref=0.795044904815
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_expandedData_rank2(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[0.72772455370935374, -0.47120637916343311, -0.82075870555018726, -0.13186541688079845, 
-0.14046405940683471], [0.10791450121551649, 0.043686402172190775, 0.4587164889316806, -0.16569163575870283, 
-0.64477762072726041], [0.62628246294878309, -0.46538827310659792, 0.58089235621217727, -0.745300901798017, 
--0.1072674226756638], [0.93074707226494824, 0.17195108914746116, 0.77645205158899833, -0.55814650711894975, 
--0.68929261213084403]])+(1.-msk)*numpy.array([[-0.25856012658041871, -0.64132706411711782, -0.90934384682634128, 
-0.13076992241789931, 0.23456684296051011], [0.54052140856785269, 0.78868044275368643, 0.20419986484049479, 0.64782383948156319, 
-0.12883249735345115], [-0.44575026820636654, -0.86972644697707824, 0.74937006939719653, 0.64390867433141019, 
-0.57227950445890885], [-0.59430616226417832, -0.77932115906125854, 0.60864641730739155, 0.909083762068297, 
--0.5444504332265574]])
-
-      res=Lsup(arg)
-      ref=0.930747072265
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_expandedData_rank3(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[[0.31609964814729086, -0.59322042077218184], [0.62671563648606643, -0.99924882354010092]], 
-[[-0.81285219908299133, -0.91261945476639861], [-0.66394864058744174, -0.070011911370653657]], [[-0.4798784324091383, 
--0.017929635369934749], [0.87935995021589952, 0.73748462709583618]], [[-0.89673095768516986, 0.44255562883781563], 
-[-0.33009427566326166, 0.89415170271508537]], [[-0.070411620428932897, 0.34854312339042304], [-0.54088506672687542, 
-0.57996368816677069]], [[0.98447862226498417, 0.31010343079927294], [0.18832525314748882, 
-0.46594491838516161]]])+(1.-msk)*numpy.array([[[0.036725320623094637, -0.95874317021810596], [-0.66138152872168576, 
--0.52870418789420959]], [[0.59182952544611012, -0.31117513196914603], [0.17957160072325573, -0.93130315483187909]], 
-[[0.33548100103066814, -0.6503677585469938], [-0.15995741665912955, -0.79138987042982367]], [[0.12353483100690976, 
--0.72197260504479188], [-0.35933752275788389, -0.46752695895022667]], [[0.7611306903818762, -0.88807332904594882], 
-[0.91131651925077373, 0.81255438802194258]], [[-0.56892641899978824, 0.0010213385566093525], [0.40194539652124472, 
--0.006585080723547021]]])
-
-      res=Lsup(arg)
-      ref=0.99924882354
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_expandedData_rank4(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[[[0.4996033665120716, -0.074132654028136846, 0.2908837888281397, 0.79804117547820219], 
-[0.25334186456470942, -0.10892196087517791, 0.90411872189757747, -0.21372334914190327], [0.65549677694560438, 
-0.97979738684954532, -0.29737844854710138, 0.93659843329597914]], [[0.22668444631484608, -0.92481913749465305, 
--0.9980815386745403, -0.022502768980955601], [-0.21769755240946398, 0.77216348666766876, -0.19843685166706204, 
-0.54270333879579558], [-0.11274856721131221, -0.29600869223659299, 0.1458222910080329, -0.83739782177046851]]], 
-[[[0.86722932032155531, 0.39888432468517876, -0.8991679849590255, -0.088621935923834272], [-0.58464076321585412, 
--0.09564380294323116, 0.18232602464536307, 0.7910046931530843], [0.15923450234841652, -0.39331159996226872, 
-0.18298541750645669, 0.99889484861795563]], [[0.36793558813747418, -0.64593764280975363, 0.048503028175158613, 
--0.8304805399530264], [0.072019074767407432, -0.066883567381289311, -0.55849542620276127, -0.32521841292447484], 
-[0.83256632210175896, -0.52124955617445723, -0.0047287521832242163, 0.84184001532121422]]], [[[-0.81375499823702158, 
-0.12901434959756353, -0.51500727423485215, 0.52626362435118912], [-0.47602620905811044, 0.81525173294213982, 
-0.023145745277130203, 0.5818744103097242], [-0.26074066195347489, 0.62737248392572886, 0.24246935026650718, 
-0.86155298917514145]], [[0.40180649524587109, -0.13468267908829512, -0.66576279256576543, -0.97664336021962694], 
-[-0.81183732113700424, -0.10477655696019839, -0.90212494842448732, 0.50784279020015499], [0.29352929816605089, 
-0.10640245030222295, -0.16640870997460122, 0.91371366707232826]]]])+(1.-msk)*numpy.array([[[[0.6465819200939884, 
-0.21755363919340609, 0.73973535907059662, -0.36114669719855241], [0.16087051863228452, -0.96295075570141986, 
-0.93283344105282717, 0.8498346294196879], [-0.62871563035312805, 0.028501977366871101, -0.76183996578150004, 
--0.42396762024023338]], [[0.45139869884828876, 0.9085099092003921, 0.90516675545818392, -0.2797423591331305], 
-[-0.012176715080714828, 0.40935600076669765, -0.010156279663344314, -0.45527372677880185], [-0.56697253731600106, 
--0.88076957837377901, -0.43708368779823448, -0.98115855535334329]]], [[[-0.6812131434679467, -0.75007359636996074, 
-0.52195871968240559, 0.74207747673309732], [0.53576769134014213, -0.19432873205999046, -0.87970756195132904, 
--0.36970944422105911], [0.18377651984390431, -0.30093639418244189, 0.30640551056952825, -0.95779743159891284]], 
-[[0.3069655071293016, 0.42532244942656305, 0.27182877898608804, 0.89926151593228765], [-0.94227360921249192, 
-0.17309985459832045, -0.067341615594060267, -0.24017528169767255], [0.72377020653147883, -0.60287365881872312, 
-0.17612550848074338, -0.89499327987049915]]], [[[-0.8985020338092089, -0.27805317471704494, -0.096352572725887375, 
-0.26107376060313836], [-0.98264038134460852, -0.40101944215897967, 0.80787105663414827, -0.91046803072373206], 
-[-0.11056024039811629, -0.35146855329949345, 0.62639019941990948, 0.029258586953160748]], [[0.5190564210634494, 
-0.25178673168519605, -0.095466912631134937, -0.66223610619416462], [0.86572944270431917, -0.0070686656495086986, 
--0.56404011740509774, 0.5156978630437381], [0.15106963134402651, 0.12900511640038159, 0.6022471822104567, 
-0.48643914768022012]]]])
-
-      res=Lsup(arg)
-      ref=0.998894848618
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_float_rank0(self):
-      arg=0.870743835413
-      ref=0.870743835413
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_array_rank0(self):
-      arg=0.469212543992
-      ref=0.469212543992
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_array_rank1(self):
-      arg=numpy.array([0.8163530200305178, 0.7844191729334391])
-      ref=0.816353020031
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_array_rank2(self):
-      arg=numpy.array([[-0.52338785100595131, 0.72523140545134046, -0.23883623210726745, 0.29329903553233394, 
-0.77300897701720128], [0.56646202903477705, -0.67833617682539948, 0.71280801753916911, 0.108973189514324, 
--0.86675353843929437], [0.37080584846118247, 0.61817009100957776, -0.20780655998890807, 0.085315295987765438, 
--0.73527023026482174], [-0.97586476277122935, 0.14501540684207481, 0.57375473938632338, 0.08516777342367865, 
--0.22644451314946301]])
-      ref=0.773008977017
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_array_rank3(self):
-      arg=numpy.array([[[0.16933183602716984, -0.42964457496769226], [-0.63714228263554573, -0.28513481547494179]], 
-[[0.72479530443714335, -0.097501515360919111], [-0.28611653510816737, -0.58370472731498535]], [[-0.18432738416022554, 
-0.79010596522300558], [-0.65367387441910196, 0.90861652898349976]], [[0.56004415223670123, 0.20178156913861489], 
-[0.90730594499457595, 0.91196305151516754]], [[-0.46179421349599847, -0.54555869532019163], [0.36014998847058499, 
--0.70585188726413306]], [[0.49988705904335418, -0.52181171665742077], [0.14475259007357621, -0.94336078709637383]]])
-      ref=0.911963051515
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_array_rank4(self):
-      arg=numpy.array([[[[0.085213773984220698, -0.9837351364458633, -0.23428780807935823, -0.54350985593703971], 
-[-0.021654619752513593, -0.58267295960777465, -0.95135334805945893, -0.82172163939108089], [0.92970460708060565, 
-0.12721615089598348, 0.36243089042630872, 0.50434042290503855]], [[0.20617957875725845, 0.13657289785878368, 
-0.7942986246389756, -0.92641374730818571], [0.30431241116181762, -0.13563881945622858, 0.37921852742514695, 
--0.39275408991812211], [-0.016546769015328033, 0.50932041928102878, -0.27343457607173893, -0.0076289641375255624]]], 
-[[[0.97189015970083137, -0.71286035174080009, 0.10143028964095313, -0.41856292303563181], [-0.97563458262665792, 
-0.79724078659701769, -0.70932749973904685, 0.018497784992804522], [-0.86374122662275021, 0.047715471334789816, 
--0.95453593058418518, 0.54562170290354794]], [[0.40249406070198157, -0.54609432046574469, -0.22682900899629166, 
-0.98394939138178539], [0.11049172557176901, 0.42172241721325388, 0.71050000578192951, 0.35353993854713206], 
-[0.35412886303451896, -0.98169699399727617, 0.04758881049644037, 0.96971205948237493]]], [[[0.44672925866052249, 
--0.51476498049696828, 0.56442823935318875, -0.39769248164928039], [-0.40340965812893304, -0.87947712857546945, 
-0.55927022788356706, -0.89941016574892707], [-0.43878304559423431, 0.20915357555548764, -0.76548553334601799, 
--0.67202522557876954]], [[-0.56749721271516318, -0.10244683680777245, 0.17727779142251943, -0.57219284260940473], 
-[-0.17044718853145446, 0.91117482665936023, -0.30039592703806584, -0.73813808369358713], [0.63771084365736663, 
--0.61427668096170129, 0.34365587989446378, -0.11877233448104674]]]])
-      ref=0.983949391382
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_constData_rank0(self):
-      arg=Data(0.165371505685,self.functionspace)
-      ref=0.165371505685
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_constData_rank1(self):
-      arg=Data(numpy.array([-0.89603386749185288, -0.68712608295212729]),self.functionspace)
-      ref=-0.687126082952
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_constData_rank2(self):
-      arg=Data(numpy.array([[0.60272743728014655, 0.26067131689446787, -0.48488892003697837, -0.54328378217335027, 
--0.96627165443113894], [0.38861396631681999, -0.14210447298121753, -0.84480805358330624, -0.25397651427390566, 
-0.25670041011662192], [-0.062982523786134337, -0.149708363807598, -0.63332360725934489, -0.49175302564011525, 
--0.97647588301352473], [0.52022334705669038, -0.69717039787412727, -0.28284586409251511, 0.99642563937215467, 
--0.67058148736338885]]),self.functionspace)
-      ref=0.996425639372
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_constData_rank3(self):
-      arg=Data(numpy.array([[[-0.98552936119306023, -0.58995212270861552], [0.51743177430155907, 0.68576837981065508]], 
-[[-0.61618414432919089, -0.12325580790677049], [0.32387395300714172, -0.95456083598524333]], [[0.89779642579517049, 
-0.98676270760314266], [0.71959629907181966, -0.9949078223284622]], [[-0.81547040114414271, 0.10033634427970006], 
-[-0.21591232734408217, -0.68608679705274822]], [[0.30423138886571999, 0.34122142527426802], [-0.4344532377066066, 
--0.31076903154305779]], [[-0.46111628105416602, -0.18371998359850483], [0.63606993796228117, 
--0.10703087143670587]]]),self.functionspace)
-      ref=0.986762707603
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_constData_rank4(self):
-      arg=Data(numpy.array([[[[0.89488524023952776, 0.8669396968091807, -0.45769331537553315, -0.89738195395075349], 
-[0.39077366764066168, -0.71075932241646922, -0.51096889323130612, 0.87130290122807663], [0.17079807940685177, 
--0.6198922248677714, -0.41261700237404653, -0.30627765803812368]], [[-0.0659839868001868, -0.54367942190111385, 
-0.79254440140135607, -0.28895269724305006], [0.2554732744127961, -0.0076696085190677277, 0.6846601760873452, 
-0.38696598742090393], [-0.77125424651939789, 0.63909999575689591, -0.87840142433528379, 0.41711809974302594]]], 
-[[[-0.99322035791310692, 0.27097830567855352, -0.4253855401144222, 0.15768186455727529], [-0.49181115516922302, 
--0.36126829134959304, 0.52357599944776667, 0.91209852597809005], [0.069076441159411361, -0.18292686281510551, 
--0.6497679800515983, 0.022610374934600719]], [[0.28755759348156507, -0.08281906224050295, 0.76036900801429907, 
-0.54802231074240826], [-0.033682724326368874, -0.7414032372095134, -0.86699767465780231, 0.40592904057808044], 
-[0.51593363738292841, -0.72087130860034332, 0.35672334112134374, -0.090721746979026463]]], [[[-0.54866684145444511, 
--0.96738751715836968, -0.21201752332220436, -0.099425492405464277], [-0.76528700517307313, -0.85955622688708644, 
--0.10492266626403257, 0.69311319310724762], [-0.33886276086664902, -0.6846128323156393, 0.05873264876508566, 
-0.88498228323799433]], [[-0.28404277561384639, -0.63570388064518468, -0.67775264818658387, 0.20825454125346576], 
-[-0.84788984114351473, 0.037932422136330635, 0.021981819447397299, -0.2709264612684219], [-0.64072476278735468, 
-0.46126191894728197, -0.37456096950035489, 0.85599593427453957]]]]),self.functionspace)
-      ref=0.912098525978
-      res=sup(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_expandedData_rank0(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*0.842459260157+(1.-msk)*0.985691469761
-
-      res=sup(arg)
-      ref=0.985691469761
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_expandedData_rank1(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([0.47024430020620023, -0.40410868427962021])+(1.-msk)*numpy.array([0.34568516056640197, 
--0.43342673126146103])
-
-      res=sup(arg)
-      ref=0.470244300206
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_expandedData_rank2(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[-0.88351146515427814, 0.87526615684362929, 0.80242059303502922, -0.6048006248682789, 
-0.42108402102305953], [0.11385226207304888, -0.66232044805160473, 0.69874162972474063, 0.22449470583280284, 
--0.19986159203927545], [0.17102700533232951, -0.9790459454968905, 0.4374092200111821, -0.4343902463997138, 
-0.72993175063985705], [-0.42636794385375065, -0.88420160799308434, -0.073357336228458081, -0.96071213693656698, 
--0.28591564459422769]])+(1.-msk)*numpy.array([[-0.66507554751323883, 0.90956185314332916, 0.39373039994051529, 
-0.20185922272970869, 0.56272045770025914], [-0.81603670050480082, -0.98308666677421708, 0.081972418155825233, 
-0.98933334281872432, -0.67280110519862579], [-0.67384516784043069, 0.19168471924963759, -0.59938113619504896, 
-0.22266455997006829, -0.93324865777959265], [0.93134589933544842, -0.10311385886401503, -0.2331509870020978, 
-0.37315747180467018, 0.73551730577813057]])
-
-      res=sup(arg)
-      ref=0.989333342819
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_expandedData_rank3(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[[-0.69867440642271283, -0.37489565319806606], [-0.66485463581725601, 0.18238313710104448]], 
-[[-0.78388494323459157, 0.24027472943325923], [-0.4377158808146262, -0.34262284842949864]], [[-0.8539094490313166, 
-0.62109328106735684], [-0.20715549218162899, -0.33320905765908693]], [[-0.25702886172082651, 0.94651536183641283], 
-[-0.2229696935051404, 0.84771132395539794]], [[0.52244706935442076, -0.89344888833386804], [0.064322796922618108, 
-0.36966382541443532]], [[0.55710175300577691, -0.22780561634551688], [0.89548548132750594, 
--0.77561238906399077]]])+(1.-msk)*numpy.array([[[-0.86933240372621312, 0.32078825553642276], [0.36873095289245739, 
-0.20578150283627239]], [[-0.13143164944725427, 0.89920065296927199], [0.79295913398164197, 0.78838875458878954]], 
-[[0.068510791358111334, 0.87754319283313054], [-0.96880448620091553, -0.012058603734139028]], [[0.44680342907934811, 
--0.52293412412648466], [0.51117158355443149, -0.6794979840301234]], [[0.55644022070667498, 0.082838767459920026], 
-[-0.64861425420762142, -0.20781169747814943]], [[0.52302454039265078, -0.71078210239352546], [0.67348959224612859, 
-0.18668184392186915]]])
-
-      res=sup(arg)
-      ref=0.946515361836
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_expandedData_rank4(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[[[-0.97992610933200397, -0.25896245628971326, -0.70483438344031946, -0.99381143197943023], 
-[-0.94915117581748709, -0.41900816047650036, -0.73354223723879386, 0.75059333884969881], [-0.76848095939834238, 
--0.75674819943701244, 0.065477641668864495, -0.42345850130975426]], [[-0.86758200423510234, -0.91179084363212071, 
--0.95127824910458103, 0.44686792515820439], [0.24843166983163689, -0.78829756520109728, -0.29421842880871774, 
-0.081312723661290498], [-0.73676127398786795, 0.91442315487631975, -0.64075473615377643, -0.68228346762450576]]], 
-[[[-0.52913624371899504, 0.18611492696208209, 0.87647965087074042, 0.81733477764270401], [-0.45994626037000352, 
--0.72068350777641998, -0.67722337882139305, 0.53688427407036721], [-0.62155086776441348, -0.16407031198819877, 
-0.27545162813408264, 0.82180316351563087]], [[0.86221555518143278, -0.038942303505028031, 0.99073092777336114, 
--0.59207542384567113], [-0.42324210154238218, 0.76649013040311842, 0.86242470461616949, 0.49956796372115009], 
-[-0.3983839684487791, 0.50100130531149967, -0.61285700166494195, -0.77581662400471862]]], [[[0.393847951204221, 
--0.72453857578029801, 0.97194727576353768, -0.95039782864739597], [-0.33546269250215266, 0.4831646699512071, 
--0.36084136685304102, -0.21835205500655297], [-0.82932637046105562, 0.70351683765540218, -0.058619290451321637, 
--0.2054802590132303]], [[0.94447147902776929, -0.42312399627562503, -0.11683182283655591, -0.40970199303413191], 
-[-0.057628087834810326, -0.92418858637343759, 0.17632737701884516, -0.45930384359491305], [-0.47612419752878798, 
--0.96256404924809247, 0.10415265869578216, -0.63202348546194909]]]])+(1.-msk)*numpy.array([[[[-0.97434762405813102, 
-0.7014239623245393, 0.62448079624150288, -0.37769806924712546], [-0.85193729675303742, -0.77375392434251022, 
-0.36142120851055592, 0.26580596564769365], [-0.87276378893603579, 0.38973819311591718, 0.98354255063199636, 
--0.66795317131402343]], [[0.90231744676982428, -0.27585106370360957, -0.32108129691288001, 0.60440834831736634], 
-[-0.045905880902579188, -0.29199624499256793, 0.025945636614535861, -0.098321374439206854], [-0.56344512008582659, 
--0.3766256629210043, -0.16641839175601203, -0.47355537095296341]]], [[[-0.98963277387073156, -0.84954014836916003, 
-0.58413699452656576, -0.90574771672091781], [-0.076165236495137068, -0.33185579541568311, 0.71508582816996036, 
-0.092982625872773284], [-0.59803076383019627, 0.96534061564337792, -0.86101074809006883, 0.4514321077629706]], 
-[[0.68169942993010979, -0.46839019201575827, 0.86748862862295062, 0.077239140299438347], [-0.41039932807903745, 
-0.77351932859252215, -0.91858786520587499, -0.83803209999478323], [-0.66149540952220676, 0.21690925014134543, 
-0.49329666114093262, 0.22750525795569843]]], [[[0.49476796496001074, 0.54374663478072427, -0.64963120626875592, 
-0.57704965092442939], [0.74520801893525035, -0.18704889796101698, -0.73119506283113278, 0.30233417986347821], 
-[-0.40842036405150561, -0.58450470869605797, 0.084020496164487923, -0.58538663622202569]], [[0.75611417989143481, 
--0.52196566347687212, 0.47144797786301607, -0.99505702762998172], [-0.0043333507755138889, -0.8740422871734248, 
-0.69683145050592943, -0.015830354510735223], [-0.047302931197539255, -0.033238606395723957, -0.95126827803180114, 
-0.88954001433619978]]]])
-
-      res=sup(arg)
-      ref=0.990730927773
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_float_rank0(self):
-      arg=0.857535693433
-      ref=0.857535693433
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_array_rank0(self):
-      arg=0.170725403135
-      ref=0.170725403135
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_array_rank1(self):
-      arg=numpy.array([-0.20582799927627726, 0.0065475369467946631])
-      ref=-0.205827999276
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_array_rank2(self):
-      arg=numpy.array([[-0.00088705991533410966, -0.78884753663192009, 0.51871980588812661, -0.58204851803513313, 
-0.14241101940826861], [0.79094574969805964, 0.79672216617995617, -0.5690477768894624, 0.51157272654417052, 
-0.18066938665191556], [0.32364745994353683, 0.4748425103497671, 0.66679519455306924, -0.69644515487912217, 
--0.37494171775165297], [-0.18679695095262239, -0.78312977298360509, 0.044885312146701661, -0.44016241609550066, 
--0.49756845096624081]])
-      ref=-0.788847536632
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_array_rank3(self):
-      arg=numpy.array([[[-0.8081125483464171, -0.39512178653285135], [-0.88509761616456495, 0.27821695074525521]], 
-[[-0.12065704909614361, 0.68332883926843135], [0.3403814721074454, -0.32879966956330042]], [[-0.7045229028656752, 
--0.1577338131736914], [-0.5966034105188045, 0.73456332700634985]], [[0.87843639147943997, 0.94490362642776882], 
-[-0.45552277927474183, -0.9768135246661469]], [[-0.65451540143458864, -0.2796668209543185], [-0.085396852552783953, 
-0.83466766003117332]], [[0.43465138886082078, 0.61441480296663342], [0.92555078046558337, -0.24612584648713121]]])
-      ref=-0.976813524666
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_array_rank4(self):
-      arg=numpy.array([[[[-0.05536021838962446, -0.0098764348632232046, -0.52953548051740618, 0.58523070076080819], 
-[0.10613609818504877, 0.67324697282212087, 0.54615663777618906, -0.67572666188479613], [-0.14390410848091539, 
-0.54011444546397591, -0.85609073171970373, 0.077099187121419277]], [[-0.20493469025659716, 0.90647730634569368, 
--0.71749107354722064, -0.12332697315517271], [0.63551267588618598, -0.60802528409862266, 0.052319255834022638, 
--0.95394697709081688], [-0.88612629669117959, 0.32248454322667519, 0.0072741938614420132, -0.69013368898879235]]], 
-[[[-0.10462047858216028, -0.30097012474135698, -0.050016775782701028, 0.54822125876578376], [0.84395749034726886, 
--0.53249513893193168, -0.88004100855031275, -0.80779542570577179], [-0.79677629667791683, 0.95096027764472169, 
-0.63643207567783144, 0.97757008271555401]], [[-0.65415697736192047, -0.97050764835238645, -0.84814693021942777, 
--0.43855897064286542], [-0.37135308255264543, 0.041120751125186095, 0.036995657114785807, -0.35706630152349828], 
-[-0.0030591331649565401, 0.48192500000712779, 0.18102011879743984, -0.78573775232009435]]], [[[-0.31965876602783605, 
-0.10351748464331689, 0.067424791069963907, -0.049524027182576535], [-0.5213817364489115, 0.027521683153738818, 
--0.24734661576641237, 0.24321699964875232], [-0.83947613904690699, 0.77162806253216987, -0.90740945316368071, 
--0.3420545897410685]], [[0.91845344502663262, -0.70878381509801414, 0.90861837177726379, -0.4013061463136427], 
-[-0.18540388033546473, 0.9254510240675875, 0.30634230347058677, -0.97817133509804033], [-0.43975591131244984, 
-0.30020642565479139, 0.36841633323637479, 0.3066739733421715]]]])
-      ref=-0.978171335098
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_constData_rank0(self):
-      arg=Data(0.0114629834279,self.functionspace)
-      ref=0.0114629834279
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_constData_rank1(self):
-      arg=Data(numpy.array([-0.13734485813185704, -0.54812466656634307]),self.functionspace)
-      ref=-0.548124666566
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_constData_rank2(self):
-      arg=Data(numpy.array([[-0.89509582806410015, 0.10780316690435621, -0.93073500763754335, -0.38534759506991545, 
--0.6935160645644014], [-0.056672310128515813, 0.6285075027787359, 0.73632355512072167, -0.60238897825476267, 
-0.77403597203864094], [-0.5930215600641755, 0.72623233579382429, -0.32117191475695361, -0.081104170523293773, 
-0.62137628665436373], [0.2669734570396014, -0.65030905665614136, -0.53589374176691495, -0.48334830355881309, 
--0.89125004784938211]]),self.functionspace)
-      ref=-0.930735007638
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_constData_rank3(self):
-      arg=Data(numpy.array([[[0.94493948950092999, 0.13737629155757691], [-0.81599535906086107, -0.35832278646984816]], 
-[[-0.53692839435234041, 0.53679590218669571], [0.038856705021854232, -0.18543838436402926]], [[0.19718168292863836, 
--0.55405958298613656], [0.16477861536800242, 0.17787953041277582]], [[0.51547288009005165, 0.35889372726595203], 
-[-0.033476505587150873, -0.42142418570614026]], [[0.80507204877418204, -0.79581688922832838], [-0.85909254497735588, 
-0.66095083521227149]], [[0.46206420953978222, 0.53654696439305005], [0.57618105395776831, 
--0.22241758047110038]]]),self.functionspace)
-      ref=-0.859092544977
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-      
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_constData_rank4(self):
-      arg=Data(numpy.array([[[[0.50544713768476202, 0.96922321849050874, -0.81524480218696649, -0.36499730379849193], 
-[-0.48131882706974372, 0.026812357207576465, 0.090903267401989618, -0.24742363369877829], [-0.51631372893805438, 
-0.30410275437953183, -0.75149566289642533, -0.19930300338453599]], [[0.82034878499482788, -0.70904661587698792, 
--0.27637223434426073, -0.34818734117560401], [0.11686048779802416, -0.76746266142163178, -0.75578186306174833, 
-0.14509316330390232], [0.1590050723141736, 0.69684384552537937, -0.58747105640080832, -0.28640840371441523]]], 
-[[[0.14956532194045669, 0.081514192262221119, 0.32061383569406399, -0.2444346881437609], [0.79564139071785278, 
--0.5456680167461434, 0.24722978802719742, 0.28286130725068315], [0.10385207763921711, -0.064749181840278336, 
-0.21325254547672734, -0.71875644540473838]], [[0.58552496009870802, 0.35472373485671338, -0.18411162994671826, 
-0.71609038134967773], [-0.20966804574945064, -0.49286619989346314, 0.85116051808632553, -0.94417114370961075], 
-[-0.40434528979823714, 0.62250343758157611, 0.64860074098639742, 0.0043146814280992096]]], [[[-0.14242849200713259, 
-0.42551908502898095, 0.7691157770973962, -0.37595641162856674], [0.026655444032149589, -0.82186407521644167, 
-0.40285091480648783, -0.53328831035315982], [-0.12887729257054481, 0.75610663428133451, 0.022049613835531723, 
-0.59949338706293043]], [[-0.34506254315071772, 0.019719877473602043, 0.10216765908478709, 0.022681548062032153], 
-[0.2228614880408597, 0.26944547311401901, -0.10122095357202965, -0.51019076850180589], [-0.081439546799124463, 
-0.18829632566943544, 0.12366885442775377, 0.73651436499107814]]]]),self.functionspace)
-      ref=-0.94417114371
-      res=inf(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-      
-   def test_NaNReduction_constData_rank4(self):
-        arg=Data(numpy.array([[[[0.50544713768476202, 0.96922321849050874, -0.81524480218696649, -0.36499730379849193], 
-[-0.48131882706974372, 0.026812357207576465, 0.090903267401989618, -0.24742363369877829], [-0.51631372893805438, 
-0.30410275437953183, -0.75149566289642533, -0.19930300338453599]], [[0.82034878499482788, -0.70904661587698792, 
--0.27637223434426073, -0.34818734117560401], [0.11686048779802416, -0.76746266142163178, -0.75578186306174833, 
-0.14509316330390232], [0.1590050723141736, 0.69684384552537937, -0.58747105640080832, -0.28640840371441523]]], 
-[[[0.14956532194045669, 0.081514192262221119, 0.32061383569406399, -0.2444346881437609], [0.79564139071785278, 
--0.5456680167461434, 0.24722978802719742, 0.28286130725068315], [0.10385207763921711, -0.064749181840278336, 
-0.21325254547672734, -0.71875644540473838]], [[0.58552496009870802, 0.35472373485671338, -0.18411162994671826, 
-0.71609038134967773], [-0.20966804574945064, -0.49286619989346314, 0.85116051808632553, -0.94417114370961075], 
-[-0.40434528979823714, 0.62250343758157611, 0.64860074098639742, 0.0043146814280992096]]], [[[-0.14242849200713259, 
-0.42551908502898095, 0.7691157770973962, -0.37595641162856674], [0.026655444032149589, -0.82186407521644167, 
-0.40285091480648783, -0.53328831035315982], [-0.12887729257054481, 0.75610663428133451, 0.022049613835531723, 
-0.59949338706293043]], [[-0.34506254315071772, 0.019719877473602043, 0.10216765908478709, 0.022681548062032153], 
-[0.2228614880408597, 0.26944547311401901, -0.10122095357202965, -0.51019076850180589], [-0.081439546799124463, 
-0.18829632566943544, 0.12366885442775377, 0]]]]),self.functionspace)
-        if getEscriptParamInt('NAN_CHECK')==1:
-                arg=1/arg       #will get us an inf
-                arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
-                self.assertTrue(numpy.isnan(sup(arg)),"wrong result")
-                self.assertTrue(numpy.isnan(inf(arg)),"wrong result")
-                self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")          
-                
-
-   def test_NaNReduction_expandedData_rank4(self):
-        arg=Data(numpy.array([[[[0.50544713768476202, 0.96922321849050874, -0.81524480218696649, -0.36499730379849193], 
-[-0.48131882706974372, 0.026812357207576465, 0.090903267401989618, -0.24742363369877829], [-0.51631372893805438, 
-0.30410275437953183, -0.75149566289642533, -0.19930300338453599]], [[0.82034878499482788, -0.70904661587698792, 
--0.27637223434426073, -0.34818734117560401], [0.11686048779802416, -0.76746266142163178, -0.75578186306174833, 
-0.14509316330390232], [0.1590050723141736, 0.69684384552537937, -0.58747105640080832, -0.28640840371441523]]], 
-[[[0.14956532194045669, 0.081514192262221119, 0.32061383569406399, -0.2444346881437609], [0.79564139071785278, 
--0.5456680167461434, 0.24722978802719742, 0.28286130725068315], [0.10385207763921711, -0.064749181840278336, 
-0.21325254547672734, -0.71875644540473838]], [[0.58552496009870802, 0.35472373485671338, -0.18411162994671826, 
-0.71609038134967773], [-0.20966804574945064, -0.49286619989346314, 0.85116051808632553, -0.94417114370961075], 
-[-0.40434528979823714, 0.62250343758157611, 0.64860074098639742, 0.0043146814280992096]]], [[[-0.14242849200713259, 
-0.42551908502898095, 0.7691157770973962, -0.37595641162856674], [0.026655444032149589, -0.82186407521644167, 
-0.40285091480648783, -0.53328831035315982], [-0.12887729257054481, 0.75610663428133451, 0.022049613835531723, 
-0.59949338706293043]], [[-0.34506254315071772, 0.019719877473602043, 0.10216765908478709, 0.022681548062032153], 
-[0.2228614880408597, 0.26944547311401901, -0.10122095357202965, -0.51019076850180589], [-0.081439546799124463, 
-0.18829632566943544, 0.12366885442775377, 0]]]]),self.functionspace, True)
-        if getEscriptParamInt('NAN_CHECK')==1:
-                arg=1/arg       #will get us an inf
-                arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
-                self.assertTrue(numpy.isnan(sup(arg)),"wrong result")
-                self.assertTrue(numpy.isnan(inf(arg)),"wrong result")
-                self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")  
-           
-           
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_expandedData_rank0(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*0.97331285569+(1.-msk)*0.911344578019
-
-      res=inf(arg)
-      ref=0.911344578019
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_expandedData_rank1(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([-0.025782649803792301, 0.15017595667012174])+(1.-msk)*numpy.array([-0.69996944983865683, 
-0.23286168827412723])
-
-      res=inf(arg)
-      ref=-0.699969449839
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_expandedData_rank2(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[-0.11924617230337731, -0.69281409701569552, 0.8819805848672797, 0.67606672557817737, 
--0.15719846909292801], [-0.91958498979699277, 0.35156143886023572, -0.66768679685578647, -0.48673444352737993, 
--0.33274286155542288], [-0.011930486621410052, -0.035661622752792166, 0.8109198510155371, 0.2680383999767102, 
-0.38679270088753159], [-0.64107995512896321, 0.58836944145799008, -0.55856121453754959, 0.63346354980998365, 
--0.74990799644898765]])+(1.-msk)*numpy.array([[0.075603512293304975, 0.65374459813382813, -0.68190855977115938, 
-0.023184369691352069, -0.15500904033575869], [-0.28865053906142646, 0.94679590620919218, -0.53701383780009748, 
--0.5413294941411595, -0.1693286769782183], [-0.34870739946353968, -0.92230175409787241, -0.95867600429924127, 
--0.0012605712136730673, 0.33180267589091184], [-0.60152160703395885, 0.3397221706065463, 0.58860878406913142, 
-0.59589494790106934, -0.96157487116725071]])
-
-      res=inf(arg)
-      ref=-0.961574871167
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_expandedData_rank3(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[[0.76729109013175933, 0.93446692332588199], [-0.85883010569426133, 0.94426468618035608]], 
-[[0.93376991286356659, -0.31027020688815887], [0.68776369494826284, -0.71422083083074273]], [[0.88895851954297633, 
--0.0041028262794304826], [-0.56213269421968981, -0.53305350433881493]], [[0.91080353792869873, 0.87460732654624618], 
-[-0.43411934331432445, -0.66454826732696648]], [[-0.7458989571542316, 0.0054889915153857327], [-0.43786572648758848, 
-0.45559010284736901]], [[0.97274627384999923, 0.28719064869132427], [-0.068944574283213989, 
-0.92462015394940389]]])+(1.-msk)*numpy.array([[[0.45653716082021401, -0.23702471933521396], [-0.45177153258555913, 
--0.41351543065221219]], [[0.24913453932538854, -0.29954039408048372], [0.47106013214852771, -0.86663080347446608]], 
-[[-0.75781905181266151, 0.18918623668675538], [-0.66636479853389385, 0.74776214919244066]], [[-0.1199599974824086, 
-0.90306995612278795], [0.77248429149482201, 0.094536885699270545]], [[-0.5505821492977705, -0.42454185319972981], 
-[-0.035064708067998662, -0.75303714911308206]], [[-0.63966405281134198, -0.5545794126646626], [-0.010523374154368881, 
--0.6779302443539712]]])
-
-      res=inf(arg)
-      ref=-0.866630803474
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_expandedData_rank4(self):
-
-      msk=whereNegative(self.functionspace.getX()[0]-0.5)
-      arg=msk*numpy.array([[[[0.59301561766072242, 0.6053289847447505, 0.1720524601196014, 0.4833679091408507], 
-[-0.09424534157102582, 0.91976800441974427, -0.11950945037648264, -0.10547294628619919], [0.045302052907340462, 
--0.26699801365763864, -0.59100789693502542, 0.8220898248447317]], [[-0.71764117646989489, -0.31097048109028447, 
--0.36880919201656037, -0.12380648590370025], [0.71171672214402615, -0.87716399369053821, 0.53673002158727501, 
--0.29732656272582969], [-0.71737153055394787, -0.18861795164190798, -0.55325559014387649, 0.50828072891961451]]], 
-[[[0.7139879661021804, -0.54655602578694507, -0.62738810494945163, -0.71453639471562314], [0.25287437655577372, 
-0.47571671295036144, -0.86354401602062025, -0.45354287599804666], [0.44863440392806031, -0.64112646326775291, 
-0.91877609169151908, 0.98277738739744636]], [[-0.23627452345538003, 0.26824331838587279, -0.11255839194272887, 
-0.62327509528972769], [0.87773514238000572, 0.62819546928589953, 0.53463187163744053, -0.11780048176113112], 
-[0.17743656841726674, -0.47418242507357755, 0.37012543459814751, 0.84217962384585232]]], [[[-0.51615332690558602, 
--0.32180746309362296, -0.86871747985681558, -0.89347967000489548], [0.79236651642797762, -0.82769899986382356, 
--0.27503369025221813, 0.70491420567015894], [-0.46319485284379014, -0.71191635366918904, -0.4935498645964489, 
-0.42096986386791024]], [[-0.95241673224815648, -0.99507534300684708, -0.76759978752396862, -0.1621109099401965], 
-[0.011495974208982407, 0.90547796535927083, -0.79651097416963368, 0.44382172569512224], [-0.11210429012307821, 
-0.28303519643554576, -0.59783370185364437, 0.75478113456483809]]]])+(1.-msk)*numpy.array([[[[0.70392145790103089, 
--0.7532260844479588, -0.53422583924595046, 0.29798767877629717], [0.87516135156666075, -0.40276494310086908, 
--0.070320230959511232, 0.13669067815714553], [0.26690559342737163, -0.0067218741792103298, 0.79272133073277207, 
--0.90080452301155178]], [[-0.90606808543363915, 0.94927254364127123, -0.15130300474521019, -0.34632615506118936], 
-[0.29908319964670294, -0.71717585217034374, -0.11325472101126977, 0.60911487311528911], [0.055579283773870003, 
--0.42895625110409941, 0.22788310989168781, 0.50000680777627848]]], [[[-0.56683598589959683, 0.05720680440798942, 
-0.27949696950971137, 0.028472427888231566], [-0.51619860801944828, 0.73067372155966415, 0.81910302859539108, 
-0.97736576074434089], [-0.68851989268805447, 0.93303896549540433, -0.21083269397032622, -0.93122611728597304]], 
-[[-0.13573136829275501, -0.30858456571228721, 0.86534434039603658, 0.79114631697533278], [-0.32870753097283112, 
-0.68472493656951161, -0.071089197922887593, -0.032936485145198757], [0.40875380316397925, -0.27280027645573401, 
--0.27155299841136848, -0.81500786568603067]]], [[[0.080473457255322733, -0.54931257643900566, 0.19082193004877501, 
--0.52744293877995374], [0.44447571282767639, -0.0060974808128133606, -0.87810788913565485, -0.92670043304972327], 
-[0.45760340069120065, -0.7504981866011311, -0.95431384972577082, 0.4644557658783679]], [[0.18449401878090566, 
--0.73315009595487135, -0.59404794479416467, 0.076556365298426687], [0.65441299213898763, -0.91649003079073932, 
--0.082437357750317686, 0.88150531806538579], [-0.45829076922310796, 0.91236619416957021, -0.91128142664652279, 
-0.9524897339484899]]]])
-
-      res=inf(arg)
-      ref=-0.995075343007
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-
-
diff --git a/escriptcore/test/python/test_util_reduction_with_tagged_data.py b/escriptcore/test/python/test_util_reduction_with_tagged_data.py
deleted file mode 100644
index 9d7dac3..0000000
--- a/escriptcore/test/python/test_util_reduction_with_tagged_data.py
+++ /dev/null
@@ -1,358 +0,0 @@
-
-##############################################################################
-#
-# Copyright (c) 2003-2016 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-2016 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"
-
-"""
-test for util operations for reduction operations with tagged data
-
-:remark: use see `test_util`
-:var __author__: name of author
-:var __copyright__: copyrights
-:var __license__: licence agreement
-:var __url__: url entry point on documentation
-:var __version__: version
-:var __date__: date of the version
-"""
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-import numpy
-from esys.escript import *
-from test_util_base import Test_util_base
-
-class Test_util_reduction_with_tagged_data(Test_util_base):
-   """
-   test for reduction operation Lsup,sup,inf with tagged data only
-   """
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_taggedData_rank0(self):
-      defval=0.860813503322
-      arg=Data(defval,self.functionspace)
-      arg.setTaggedValue(1,0.086081350332)
-      res=Lsup(arg)
-      ref1=0.086081350332
-      ref2=0.860813503322
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref1)<=self.RES_TOL*abs(ref1),"wrong result")
-      arg.setTaggedValue(2,defval)
-      res=Lsup(arg)
-      self.assertTrue(abs(res-ref2)<=self.RES_TOL*abs(ref2),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_taggedData_rank1(self):
-      arg=Data(numpy.array([-0.54932912559284452, 0.29396676960376178]),self.functionspace)
-      arg.setTaggedValue(1,[0.98025125990414441, -0.070257235982443378])
-      res=Lsup(arg)
-      ref=0.980251259904
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_taggedData_rank2(self):
-      arg=Data(numpy.array([[-0.86895475746708128, 0.45103596542916824, 0.89202718384469271, 0.66165880808530297, 
-0.71929063210904221], [-0.054750345740449236, -0.26270085023397649, -0.44869339310367407, 0.84127602579890803, 
-0.4084040169910117], [-0.80258081555352101, 0.71946204694435134, -0.97606916814646971, -0.88087380297928397, 
-0.91540441306863141], [0.53133024472568935, -0.60623654813712635, 0.82280414663810242, 0.64010933901991374, 
-0.62566314353300356]]),self.functionspace)
-      arg.setTaggedValue(1,[[-0.84852153765445437, 0.13244202632711666, -0.64133508534494599, -0.73706953458433633, 
-0.55834403408867184], [0.27998214461793847, 0.31446145164831063, -0.63410404784852048, 0.2813747329563423, 
-0.41221195047082393], [-0.79513090436643696, 0.92563876120768263, 0.80602538500705001, 0.21092919617246042, 
--0.21449414451693616], [0.50885151366468984, -0.53247783698745965, -0.98502684901017235, 0.36104863911630503, 
--0.68481313205160554]])
-      res=Lsup(arg)
-      ref=0.98502684901
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_taggedData_rank3(self):
-      arg=Data(numpy.array([[[-0.0289179522354861, -0.53873332225554216], [-0.87313007813556509, -0.47147149825784584]], 
-[[0.046403579054177468, -0.66499184318911042], [-0.14945300648197457, 0.33023752485562841]], [[0.73609028529612153, 
-0.62400582710031194], [0.18047782954118574, 0.98299132707347403]], [[0.97452943106570422, -0.80052218344822124], 
-[0.90989474269184356, 0.74467116925414456]], [[-0.40975095375636039, 0.35721815590834538], [-0.023117827122894896, 
-0.38726163442133732]], [[0.35214474483480052, 0.79626235681759927], [0.072063982160859297, 
--0.13255981975702369]]]),self.functionspace)
-      arg.setTaggedValue(1,[[[0.35540494212277429, -0.40452986468200347], [0.92646378475498059, -0.60976701230157482]], 
-[[-0.17488076275939557, 0.1383489038535719], [0.87222102776136068, 0.05521388649844039]], [[-0.45846974731683399, 
-0.84645585780786292], [-0.36620222778926448, 0.8758026265447818]], [[0.55804586547774848, -0.19954715807059986], 
-[0.51849302021923482, 0.29871500421422281]], [[0.98995968883285035, -0.78797081527577162], [0.3108075746688399, 
-0.5474101080348186]], [[-0.74670637823709085, 0.16925394395842575], [-0.76281911656771095, 0.79574461985041189]]])
-      res=Lsup(arg)
-      ref=0.989959688833
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_Lsup_taggedData_rank4(self):
-      arg=Data(numpy.array([[[[-0.17143955149003642, -0.0089504254973518105, 0.53089483578382191, 0.32381408252152899], 
-[-0.77296292864801019, -0.089110721047862773, 0.46285355679515883, 0.62221785170960708], [-0.67474474335134915, 
-0.34682047265462157, 0.9384448074012548, 0.5682850087388498]], [[0.52652198841191855, 0.52394055634009762, 0.41923325950497858, 
--0.48507989905455706], [-0.90073796582592069, -0.40217266425438258, -0.60530063652424215, 0.68062718938448441], 
-[-0.59931923693732347, -0.79549982795384744, -0.70714734772804722, -0.46042778371080284]]], [[[0.58538756755140686, 
-0.98385384505005846, 0.7777811719634411, -0.64306377174574281], [0.72961354558815694, 0.10696472171933968, 
--0.11372282342784068, 0.87929133681948879], [-0.67126196529672244, -0.64730190047646907, 0.64547629928395711, 
-0.50361974274373145]], [[0.96265942240931546, -0.20746026072477042, 0.47323657518133921, -0.78443796621025053], 
-[0.61977887181220659, -0.0192018581010025, -0.0016015804221325425, 0.25446656696052594], [0.19964691572203019, 
--0.44122579240360293, 0.89836148991232134, -0.97914559157737457]]], [[[-0.32474221003830039, 0.50501185871734799, 
-0.081832847990893409, 0.49226411509256796], [-0.58561709012191865, -0.97753141368900409, 0.50702769958783778, 
-0.46965610524959978], [0.19394052487354463, 0.32118138849740641, 0.48348630138165749, -0.61570132061285632]], 
-[[0.78997938799317668, 0.48729593728848108, 0.86690961213187001, -0.55317005853484491], [-0.38985400756166189, 
--0.79197087340853445, 0.150444446088422, 0.30366473850354492], [0.16673919050825758, -0.28616432413953641, 
--0.49042930009947883, -0.80964116966434485]]]]),self.functionspace)
-      arg.setTaggedValue(1,[[[[-0.72676590268291097, 0.98420782971554899, -0.58004995296952444, 0.37649505647780179], 
-[-0.36963117451708949, -0.38478644500667469, 0.1606599749645139, 0.26146427896482427], [-0.99755391430668583, 
-0.96243322443760793, -0.34748898506056713, 0.28223401802658166]], [[0.41892282572460227, -0.068327589700850844, 
--0.92249969532644394, -0.2927104302765704], [0.63237889769391709, -0.61446924102341649, -0.9271255632289408, 
-0.72693928120951368], [-0.099138333893530106, -0.93278471458000989, 0.16805036953472618, 0.13406769552186848]]], 
-[[[0.1322308020971239, -0.15094779056740282, 0.48419178200868274, -0.90259173990902308], [0.088806733010250438, 
--0.44134645109664827, 0.50169033175317468, -0.16413576472992863], [0.10447947060273766, 0.59946651445651744, 
--0.28648625172498821, -0.26114646276357711]], [[-0.17647875332717788, -0.95243401465773969, 0.066994364736289391, 
-0.76072295812282875], [-0.29974152935779652, -0.87018574916912828, -0.40027227651920905, -0.27566894336852044], 
-[-0.87505794257603342, 0.53786153286888583, -0.23579951775243324, 0.29461110217796826]]], [[[-0.031292782596848978, 
-0.19001451946176351, 0.51137483078731094, 0.35855090738394124], [-0.62796181019314523, -0.017622867812650655, 
--0.20994152673731148, 0.21972116995451207], [-0.53419638828850147, 0.61964526276926013, 0.83633801914948402, 
--0.22627427949817003]], [[-0.25275677187826617, 0.92174213140825789, 0.29387486254521544, 0.2851840648022741], 
-[0.99521823294639589, 0.30976825827796484, 0.39585066725930163, -0.037512976967312373], [-0.0098417329760405181, 
--0.72834591016301697, -0.2368701950529164, -0.075161686057492183]]]])
-      res=Lsup(arg)
-      ref=0.997553914307
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_taggedData_rank0(self):
-      arg=Data(0.162086575852,self.functionspace)
-      arg.setTaggedValue(1,0.162086575852)
-      res=inf(arg)
-      ref=0.162086575852
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_taggedData_rank1(self):
-      arg=Data(numpy.array([0.97502548554439095, 0.14468929449768342]),self.functionspace)
-      arg.setTaggedValue(1,[-0.80902425002058509, -0.89805781018804365])
-      res=inf(arg)
-      ref=-0.898057810188
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_taggedData_rank2(self):
-      arg=Data(numpy.array([[-0.5694816711808135, 0.80659676528259427, 0.30198257784452243, -0.056794149786052461, 
-0.28747138649972137], [-0.55351234371619573, -0.7889070920065997, 0.88098536867480282, 0.18532519445126572, 
-0.4953885498039805], [0.034981671345569287, 0.32837659010563613, -0.12027778324017335, 0.6186028529626495, 
-0.94436199061580317], [-0.32534943311134756, 0.54392552535517247, -0.07184818553543626, -0.32050443715783694, 
--0.85778834873938736]]),self.functionspace)
-      arg.setTaggedValue(1,[[-0.39066692582632312, 0.56443807842368665, 0.50983381732205602, 0.8533352755557535, 
-0.26857966396123456], [-0.43675811505896145, 0.061780174738994775, -0.70572251236028349, 0.58277425693964768, 
--0.77149002637252218], [0.21410554898576928, 0.63314655619690563, 0.83857171132417307, -0.64841751958506944, 
-0.49689361559212686], [-0.77395862547728433, -0.49190916492680103, -0.96727611195835639, 0.75749173365014144, 
-0.31952116010595022]])
-      res=inf(arg)
-      ref=-0.967276111958
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_taggedData_rank3(self):
-      arg=Data(numpy.array([[[-0.42552857556236279, -0.35412978699074116], [0.32347364437155268, -0.06660424254888464]], 
-[[0.69470606979783533, -0.27025063802848237], [0.60488222118615087, 0.75136007820911765]], [[-0.18334541260777715, 
-0.46826845351595714], [0.50971438744602593, -0.75173109388533477]], [[-0.83925390214063711, 0.10222838155029201], 
-[0.97240290055902889, 0.61070698842426729]], [[-0.096661305892300042, 0.3060232400934193], [0.44355296215710527, 
--0.42328090263660423]], [[-0.37229736098865907, -0.61446651581066591], [-0.59861049707188863, 
--0.083231793539160881]]]),self.functionspace)
-      arg.setTaggedValue(1,[[[0.098193175227128116, 0.70584535076979682], [0.64798160196689181, -0.4003221305355702]], 
-[[-0.04270365807543719, -0.81717683614201619], [-0.40362171906510702, -0.64589178916948042]], [[-0.34373454409447479, 
--0.77185875470824516], [-0.0065539211815313081, 0.83912029516917275]], [[0.50979364877951405, 0.43268906334074786], 
-[0.97762994631388556, 0.097902836960438]], [[0.25841131938252593, -0.075670175812033058], [-0.57350008458063262, 
--0.54227522655426319]], [[0.023586725726449931, 0.51624902917426008], [-0.88765839495000032, 0.61903659822536805]]])
-      res=inf(arg)
-      ref=-0.88765839495
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_inf_taggedData_rank4(self):
-      defval=numpy.array([[[[-0.28454409743308506, -0.5668179780431859, 0.94184808892377703, 0.92323038327044005], 
-[-0.62255144042695854, 0.10076051065495695, -0.75730451262334242, 0.92747176366592243], [-0.27419623999345366, 
--0.2073834606691658, -0.80951479323876696, 0.7135757150367612]], [[-0.97314628579045248, 0.68637741632500915, 
-0.53335906255833199, 0.96086938773033026], [-0.94945339539011386, -0.81392220879720334, -0.85288194032365472, 
--0.16477859877633083], [-0.21874528606061738, 0.02516499720401133, -0.049189220512075194, 0.037621105958556278]]], 
-[[[-0.047849568456701519, 0.17313004158353174, -0.73652898602638794, 0.54596512107217787], [0.53827755889057149, 
-0.82310276090363499, -0.28442357567638377, -0.27179900237071242], [-0.19399624326093612, -0.12349387443529247, 
--0.56735519289734504, -0.68464632829023375]], [[0.33637651162122606, 0.22878413048564927, -0.70679532991608829, 
--0.25607454879877101], [-0.29261869752827607, -0.210849838585774, -0.15002781188439474, -0.40403456108229485], 
-[0.98194953410530106, -0.10120885200799257, -0.73197515875287644, -0.79609802011910569]]], [[[-0.25327135865022421, 
--0.57325273532977317, 0.81059261361542845, -0.046095046141370499], [0.96531384124283903, -0.61153728454098477, 
--0.97457818352675707, -0.62195519514120923], [0.69039154876488285, 0.92574092049825851, -0.16814749709359544, 
--0.10824422727782279]], [[-0.54851863859404215, -0.6147932835008143, -0.12084391085229162, 0.57476183090130717], 
-[0.23951711064034398, -0.54814262685597792, 0.94406155895646182, 0.5501815266421175], [0.21626599181010975, 
--0.9661525769220054, 0.85862231711120418, 0.97115736784479956]]]])
-      arg=Data(defval,self.functionspace)
-      arg.setTaggedValue(1,[[[[-0.44268265295180487, -0.94661739524160704, -0.58229956703493468, -0.83249621866194934], 
-[-0.68913939538381319, -0.75804956419646286, 0.64749957799330526, 0.32616508244527531], [-0.14277223200775602, 
-0.74824266545401041, -0.75701815640062908, 0.27359871030382887]], [[-0.48033424095007193, -0.067929127807738965, 
-0.45865972622825102, -0.21732884173055611], [-0.84531291000880504, 0.83240578985878577, -0.25004340292634253, 
-0.21302689907942329], [0.46335645072330633, -0.10408082112144545, 0.96768118368872202, -0.14088569164618203]]], 
-[[[0.28258575728428736, -0.45763983811002018, -0.29020353090870232, -0.35290974430439914], [0.8698073989711228, 
-0.99501431931359741, 0.36030715281910175, -0.27073779707934853], [-0.86095060819411717, -0.85818974539956372, 
-0.88449786126964258, -0.4780560878654454]], [[-0.12884556589949114, 0.46614981239408104, -0.82753211385973646, 
-0.71952728123859067], [-0.43573431868291923, 0.41690370693945611, -0.024901756894041061, 0.14934111352857715], 
-[0.78047901800597619, 0.26373552686712709, -0.95380580583786689, 0.63288455897048768]]], [[[-0.94242811017558603, 
--0.2101877288188847, 0.91797691709730911, 0.45617540058153594], [-0.93413158750269942, -0.70238302965184563, 
-0.36501953522261488, -0.43956770565509551], [-0.056597755835613439, 0.41357120112496037, -0.60521324615373961, 
--0.2181851605833629]], [[-0.21130451442872822, 0.53289932629760295, -0.72866050065430343, -0.90245795340674695], 
-[0.1171412044571345, -0.91170721460310178, 0.58826690518723557, -0.39254304440341792], [-0.60338068872893746, 
--0.40393966609543219, -0.69793709205007581, -0.50271106301761193]]]])
-      res=inf(arg)
-      ref1=-0.953805805838      # There is a lower value in default but the tags in use prevent it being processed
-      ref2=-0.974578183527
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref1)<=self.RES_TOL*abs(ref1),"wrong result")
-      arg.setTaggedValue(2,defval)
-      res=inf(arg)
-      self.assertTrue(abs(res-ref2)<=self.RES_TOL*abs(ref2),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_taggedData_rank0(self):
-      arg=Data(0.649634736435,self.functionspace)
-      arg.setTaggedValue(1,0.649634736435)
-      res=sup(arg)
-      ref=0.649634736435
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_taggedData_rank1(self):
-      arg=Data(numpy.array([-0.91775874675364899, -0.44518660348335226]),self.functionspace)
-      arg.setTaggedValue(1,[-0.91030878048996744, -0.36380755471992954])
-      res=sup(arg)
-      ref=-0.36380755472
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_taggedData_rank2(self):
-      arg=Data(numpy.array([[-0.086523811957357255, -0.42774060865319008, 0.35170422393945833, -0.24772487756509576, 
-0.85056214851195744], [-0.31877386278938702, 0.28773006836605641, 0.44932528141129979, -0.56724416115855569, 
-0.80633095352264816], [-0.53652434245562564, -0.26697043576159984, -0.88767305488188519, -0.029691195696610828, 
-0.67899103041623876], [0.92484508322389836, 0.18625473102022339, -0.27285903116359256, 0.63921542460538938, 
--0.9221199231145456]]),self.functionspace)
-      arg.setTaggedValue(1,[[0.65738567253805136, -0.6778218395330815, 0.40806699669092361, 0.34540048412849589, 
--0.11704616494950493], [0.38512651510421825, 0.74221788961938562, 0.95314896284964967, -0.040871082359481337, 
-0.73045537711619035], [0.10490367249326416, -0.24457205097868751, 0.23569203929084925, -0.4833470179537227, 
-0.13727107062761412], [-0.34956075762939753, -0.40510846111177878, -0.60113099618774268, -0.8694743269747125, 
-0.8300938895447072]])
-      res=sup(arg)
-      ref=0.95314896285
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_taggedData_rank3(self):
-      arg=Data(numpy.array([[[0.50181406381755478, 0.12696291412348604], [0.45580252908683372, -0.69381529096260919]], 
-[[-0.44711719663105876, -0.49939480373343814], [0.49163505815095565, 0.70755602744123269]], [[-0.32952519817455106, 
--0.56163922933132882], [0.020194551395573912, 0.74013090992747421]], [[-0.13639620097611793, -0.5402749306510144], 
-[-0.71348777995694368, -0.07149424731352183]], [[-0.81298057712035066, -0.12510197890662789], [-0.30874509775629533, 
--0.58120893128076712]], [[0.86654409796596377, -0.50673775089683915], [-0.12239574780538409, 
-0.81691821472857717]]]),self.functionspace)
-      arg.setTaggedValue(1,[[[-0.57151921079320256, 0.95258628100636189], [-0.77681734612402287, 0.95978727375688866]], 
-[[0.76493561669286803, 0.51125225923442486], [-0.24392383855124655, 0.014944647833669666]], [[-0.93836576145690231, 
--0.044479851632975853], [-0.30511938835638897, 0.0091738439461943599]], [[0.71921984284603702, -0.22105010374862499], 
-[-0.78589399511594116, -0.8895142672649694]], [[0.6735135460868733, -0.56646772685337399], [0.73605625715117484, 
--0.68735959525940049]], [[0.38440898374441201, 0.87186026279634277], [-0.59320035048324327, -0.87430848491656854]]])
-      res=sup(arg)
-      ref=0.959787273757
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref)<=self.RES_TOL*abs(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_sup_taggedData_rank4(self):
-      defval=numpy.array([[[[0.65078702842768221, -0.73900875462993776, -0.65984653996722176, -0.97539191158251093], 
-[0.99720731720088596, -0.19242629799409516, -0.16320360691406655, -0.043083875914333492], [0.59108757025274139, 
-0.88522336612612706, 0.74088460755604268, 0.80676177752104627]], [[0.82498945289642323, 0.23110039892583623, 
--0.13089698664065774, -0.400241064232296], [-0.67523171276117, -0.72699269118844501, 0.53208807038398409, 
--0.49611668096456474], [-0.20482996861953673, 0.83614314521551858, -0.82232394050773272, -0.71904026227092044]]], 
-[[[0.34003140388599551, 0.31905118515154363, 0.51883291903272832, -0.76898011700894209], [-0.00054352334236540401, 
--0.42459032663080087, 0.72331023817772211, -0.50647033418441123], [0.76195696335445318, -0.22666337528546276, 
--0.40740135145605061, -0.81651333897992373]], [[-0.9819499586934739, -0.95616911480063527, -0.2900474363658565, 
--0.16636609538100222], [0.66435123810546681, -0.30523563374854135, -0.21355210817886849, -0.74243246288718034], 
-[0.82105586828161425, -0.93524621329362057, 0.36308161224720026, 0.76840492117538539]]], [[[-0.22872302699935965, 
-0.047300841535470761, -0.93216772922157576, -0.40541971639813301], [0.22921538079079262, 0.1958937804621288, 
-0.27198494374967619, 0.55888236453433282], [0.97179646000620856, 0.53691052552944973, -0.13695340427959324, 
--0.10499588580374764]], [[-0.4821448283439782, -0.96593591454069139, -0.95284453814535297, -0.35311046977499583], 
-[0.4857495870271038, -0.66584818036412852, -0.04957796396188785, 0.28223147859593767], [-0.2171789936962405, 
--0.016212404435609562, 0.16258357268143042, -0.6781166044152207]]]])
-      arg=Data(defval,self.functionspace)
-      arg.setTaggedValue(1,[[[[0.80768589260978896, -0.22702941364663487, -0.72896606223385407, 0.11413326357409237], 
-[0.40571664072592251, -0.9311405487001907, 0.80450361552618688, 0.56480640933432991], [-0.33782609968052979, 
-0.39512515837757123, 0.73591694462004398, 0.24768959674737778]], [[0.56569618270183164, -0.93779341659685, 0.64969642196738708, 
--0.77336556098096976], [0.41311175212178153, 0.056953746906872826, 0.25300968955971204, -0.35019321925911262], 
-[-0.8863122403302417, -0.89705763853428677, 0.3060047535556778, -0.92592167036041095]]], [[[0.45649019646929379, 
--0.29843125838513096, -0.20714508244855367, 0.246705639144563], [-0.32477747411703084, 0.30488751585973306, 
-0.53390827733820756, -0.84339943975046583], [-0.12373671376305295, -0.1640054521913612, -0.87414144472044897, 
--0.0021211693404443732]], [[0.38273461960506805, 0.70999974995969617, 0.22361687978370237, -0.098549468178965371], 
-[0.81724211804899904, -0.88965787513620009, -0.39375673885748119, 0.69490920308416371], [-0.65400552410197754, 
--0.82376412930222931, 0.046545365304690778, -0.21012949605343434]]], [[[-0.27643919361415081, -0.44880727610691973, 
--0.57364607821939151, -0.14013355075911993], [-0.99302452440223621, 0.70400083788517742, 0.29183091261608896, 
-0.57457780218190213], [0.20084128112884403, 0.98904695078892235, 0.87503585272015294, -0.26131933340055569]], 
-[[0.94633204265993198, -0.73295197510079446, 0.56975658926329098, -0.83390352955122538], [0.2617682886960544, 
-0.14649180808291562, -0.29972426982703726, -0.015848496464521356], [-0.96680270201151153, -0.79982829582732196, 
--0.29552300849179347, 0.66620264190912515]]]])
-      res=sup(arg)
-      ref1=0.989046950789
-      ref2=0.997207317201
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(abs(res-ref1)<=self.RES_TOL*abs(ref1),"wrong result")
-      arg.setTaggedValue(2,defval);
-      res=sup(arg)
-      self.assertTrue(abs(res-ref2)<=self.RES_TOL*abs(ref2),"wrong result")
-
-
-   def test_NaN_taggedData_rank4(self):
-      defval=numpy.array([[[[0.65078702842768221, -0.73900875462993776, -0.65984653996722176, -0.97539191158251093], 
-[0.99720731720088596, -0.19242629799409516, -0.16320360691406655, -0.043083875914333492], [0.59108757025274139, 
-0.88522336612612706, 0.74088460755604268, 0.80676177752104627]], [[0.82498945289642323, 0.23110039892583623, 
--0.13089698664065774, -0.400241064232296], [-0.67523171276117, -0.72699269118844501, 0.53208807038398409, 
--0.49611668096456474], [-0.20482996861953673, 0.83614314521551858, -0.82232394050773272, -0.71904026227092044]]], 
-[[[0.34003140388599551, 0.31905118515154363, 0.51883291903272832, -0.76898011700894209], [-0.00054352334236540401, 
--0.42459032663080087, 0.72331023817772211, -0.50647033418441123], [0.76195696335445318, -0.22666337528546276, 
--0.40740135145605061, -0.81651333897992373]], [[-0.9819499586934739, -0.95616911480063527, -0.2900474363658565, 
--0.16636609538100222], [0.66435123810546681, -0.30523563374854135, -0.21355210817886849, -0.74243246288718034], 
-[0.82105586828161425, -0.93524621329362057, 0.36308161224720026, 0.76840492117538539]]], [[[-0.22872302699935965, 
-0.047300841535470761, -0.93216772922157576, -0.40541971639813301], [0.22921538079079262, 0.1958937804621288, 
-0.27198494374967619, 0.55888236453433282], [0.97179646000620856, 0.53691052552944973, -0.13695340427959324, 
--0.10499588580374764]], [[-0.4821448283439782, -0.96593591454069139, -0.95284453814535297, -0.35311046977499583], 
-[0.4857495870271038, -0.66584818036412852, -0.04957796396188785, 0.28223147859593767], [-0.2171789936962405, 
--0.016212404435609562, 0.16258357268143042, -0.6781166044152207]]]])
-      arg=Data(defval,self.functionspace)
-      arg.setTaggedValue(1,[[[[0.80768589260978896, -0.22702941364663487, -0.72896606223385407, 0.11413326357409237], 
-[0.40571664072592251, -0.9311405487001907, 0.80450361552618688, 0.56480640933432991], [-0.33782609968052979, 
-0.39512515837757123, 0.73591694462004398, 0.24768959674737778]], [[0.56569618270183164, -0.93779341659685, 0.64969642196738708, 
--0.77336556098096976], [0.41311175212178153, 0.056953746906872826, 0.25300968955971204, -0.35019321925911262], 
-[-0.8863122403302417, -0.89705763853428677, 0.3060047535556778, -0.92592167036041095]]], [[[0.45649019646929379, 
--0.29843125838513096, -0.20714508244855367, 0.246705639144563], [-0.32477747411703084, 0.30488751585973306, 
-0.53390827733820756, -0.84339943975046583], [-0.12373671376305295, -0.1640054521913612, -0.87414144472044897, 
--0.0021211693404443732]], [[0.38273461960506805, 0.70999974995969617, 0.22361687978370237, -0.098549468178965371], 
-[0.81724211804899904, -0.88965787513620009, -0.39375673885748119, 0.69490920308416371], [-0.65400552410197754, 
--0.82376412930222931, 0.046545365304690778, -0.21012949605343434]]], [[[-0.27643919361415081, -0.44880727610691973, 
--0.57364607821939151, -0.14013355075911993], [-0.99302452440223621, 0.70400083788517742, 0.29183091261608896, 
-0.57457780218190213], [0.20084128112884403, 0.98904695078892235, 0.87503585272015294, -0.26131933340055569]], 
-[[0.94633204265993198, -0.73295197510079446, 0.56975658926329098, -0.83390352955122538], [0.2617682886960544, 
-0.14649180808291562, -0.29972426982703726, -0.015848496464521356], [-0.96680270201151153, -0.79982829582732196, 
--0.29552300849179347, 0]]]])
-      if getEscriptParamInt('NAN_CHECK')==1:
-                arg=1/arg       #will get us an inf
-                arg=arg/arg     #will give a NaN in the last position, yes we could have just sqrt(arg) but I wanted last pos
-                self.assertTrue(numpy.isnan(sup(arg)),"wrong result")
-                self.assertTrue(numpy.isnan(inf(arg)),"wrong result")
-                self.assertTrue(numpy.isnan(Lsup(arg)),"wrong result")  
diff --git a/escriptcore/test/python/test_util_slicing_no_tagged_data.py b/escriptcore/test/python/test_util_slicing_no_tagged_data.py
index e7619fa..59208bb 100644
--- a/escriptcore/test/python/test_util_slicing_no_tagged_data.py
+++ b/escriptcore/test/python/test_util_slicing_no_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_slicing_with_tagged_data.py b/escriptcore/test/python/test_util_slicing_with_tagged_data.py
index 890a130..9a89c2f 100644
--- a/escriptcore/test/python/test_util_slicing_with_tagged_data.py
+++ b/escriptcore/test/python/test_util_slicing_with_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_spatial_functions1.py b/escriptcore/test/python/test_util_spatial_functions1.py
index 15a55db..4d2e27f 100644
--- a/escriptcore/test/python/test_util_spatial_functions1.py
+++ b/escriptcore/test/python/test_util_spatial_functions1.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -44,7 +44,11 @@ from esys.escript import *
 from numpy import array
 import numpy
 
-class Test_Util_SpatialFunctions_noGradOnBoundary_noContact(unittest.TestCase):
+from test_util_grad import Test_Util_Gradient_noBoundary
+from test_util_integrals import Test_Util_Integration_noContact
+from test_util_interpolation import Test_Util_Interpolation_noContact
+
+class Test_Util_SpatialFunctions_noGradOnBoundary_noContact(Test_Util_Integration_noContact, Test_Util_Interpolation_noContact, Test_Util_Gradient_noBoundary):
    RES_TOL=1.e-8
    def test_x_ofDomain(self):
      """
@@ -133,42334 +137,6 @@ class Test_Util_SpatialFunctions_noGradOnBoundary_noContact(unittest.TestCase):
      self.assertLess(Lsup(ref-res), self.RES_TOL, "wrong result")
 
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_integrate_onFunction_fromData_ContinuousFunction_rank0(self):
-      """
-      tests integral of rank 0 Data on the 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.465976690369)*x[0]**o+(-0.25136070196)*x[0]+(0.409576841566)*x[1]**o+(0.726707772754)*x[1]
-        ref=(0.875553531935)/(o+1.)+(0.237673535397)
-      else:
-        arg=(0.567785895928)*x[0]**o+(0.928477128396)*x[0]+(-0.625720943088)*x[1]**o+(-0.681460841298)*x[1]+(-0.866801010069)*x[2]**o+(0.159594300637)*x[2]
-        ref=(-0.924736057229)/(o+1.)+(0.203305293867)
-      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 the 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.839020088668)*x[0]**o+(-0.880288035177)*x[0]+(0.260951734364)*x[1]**o+(-0.624208000982)*x[1]
-        arg[1]=(0.985421831314)*x[0]**o+(0.660399229451)*x[0]+(-0.514003848134)*x[1]**o+(0.0312162082593)*x[1]
-        ref[0]=(-0.578068354304)/(o+1.)+(-0.75224801808)
-        ref[1]=(0.47141798318)/(o+1.)+(0.345807718855)
-      else:
-        arg[0]=(-0.627307316929)*x[0]**o+(0.500432411035)*x[0]+(0.233895908313)*x[1]**o+(-0.125048135432)*x[1]+(0.0695114009632)*x[2]**o+(0.995170977074)*x[2]
-        arg[1]=(0.760033715785)*x[0]**o+(0.48895905139)*x[0]+(0.240372023176)*x[1]**o+(0.33946689896)*x[1]+(-0.774638489419)*x[2]**o+(-0.0777240871074)*x[2]
-        ref[0]=(-0.323900007653)/(o+1.)+(0.685277626338)
-        ref[1]=(0.225767249542)/(o+1.)+(0.375350931622)
-      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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.844492048883)*x[0]**o+(0.727132679659)*x[0]+(-0.862576284722)*x[1]**o+(0.502937561417)*x[1]
-        arg[0,1]=(-0.587157419309)*x[0]**o+(0.00327068097107)*x[0]+(0.422592349683)*x[1]**o+(0.167479615369)*x[1]
-        arg[0,2]=(0.771156665672)*x[0]**o+(-0.371091138833)*x[0]+(-0.867750378658)*x[1]**o+(-0.744394290185)*x[1]
-        arg[0,3]=(0.669718598855)*x[0]**o+(-0.0825909409121)*x[0]+(0.868872948791)*x[1]**o+(0.141891982204)*x[1]
-        arg[0,4]=(-0.441072764653)*x[0]**o+(-0.929654649265)*x[0]+(-0.35883498816)*x[1]**o+(-0.84045480381)*x[1]
-        arg[1,0]=(0.555668196622)*x[0]**o+(0.94306681043)*x[0]+(0.586512446245)*x[1]**o+(0.702007276327)*x[1]
-        arg[1,1]=(0.792083771005)*x[0]**o+(-0.865830139617)*x[0]+(0.0929971631615)*x[1]**o+(0.620446289121)*x[1]
-        arg[1,2]=(-0.201978375472)*x[0]**o+(-0.0777206885918)*x[0]+(0.798755459687)*x[1]**o+(-0.278086468846)*x[1]
-        arg[1,3]=(0.063028419572)*x[0]**o+(-0.454786232294)*x[0]+(-0.0481393324293)*x[1]**o+(-0.612657132834)*x[1]
-        arg[1,4]=(-0.743283787964)*x[0]**o+(0.854827303846)*x[0]+(0.94241635825)*x[1]**o+(0.436937526521)*x[1]
-        arg[2,0]=(-0.814975695669)*x[0]**o+(0.579477783769)*x[0]+(0.00998264005965)*x[1]**o+(-0.913665878657)*x[1]
-        arg[2,1]=(-0.526833976369)*x[0]**o+(-0.800386086232)*x[0]+(-0.487600053086)*x[1]**o+(0.00242562519003)*x[1]
-        arg[2,2]=(-0.964119591874)*x[0]**o+(0.203212394214)*x[0]+(-0.96850837954)*x[1]**o+(-0.214886132512)*x[1]
-        arg[2,3]=(-0.356249104564)*x[0]**o+(0.329769293221)*x[0]+(0.936664928754)*x[1]**o+(0.520603503283)*x[1]
-        arg[2,4]=(0.255464219424)*x[0]**o+(-0.157783294516)*x[0]+(0.519451787865)*x[1]**o+(0.00960521397376)*x[1]
-        arg[3,0]=(-0.117250486034)*x[0]**o+(0.192945431273)*x[0]+(-0.7580154297)*x[1]**o+(-0.308801650294)*x[1]
-        arg[3,1]=(0.243931002845)*x[0]**o+(-0.626714191745)*x[0]+(-0.365870571265)*x[1]**o+(0.652257582021)*x[1]
-        arg[3,2]=(-0.769756656122)*x[0]**o+(0.711106390017)*x[0]+(0.150749630653)*x[1]**o+(-0.0441309732448)*x[1]
-        arg[3,3]=(0.92677837493)*x[0]**o+(0.507199859313)*x[0]+(-0.542275490828)*x[1]**o+(-0.0907270087228)*x[1]
-        arg[3,4]=(-0.0306175885885)*x[0]**o+(-0.434666505018)*x[0]+(-0.815633427562)*x[1]**o+(-0.916424797903)*x[1]
-        ref[0,0]=(-1.70706833361)/(o+1.)+(0.615035120538)
-        ref[0,1]=(-0.164565069626)/(o+1.)+(0.08537514817)
-        ref[0,2]=(-0.0965937129851)/(o+1.)+(-0.557742714509)
-        ref[0,3]=(1.53859154765)/(o+1.)+(0.0296505206459)
-        ref[0,4]=(-0.799907752814)/(o+1.)+(-0.885054726537)
-        ref[1,0]=(1.14218064287)/(o+1.)+(0.822537043379)
-        ref[1,1]=(0.885080934167)/(o+1.)+(-0.122691925248)
-        ref[1,2]=(0.596777084215)/(o+1.)+(-0.177903578719)
-        ref[1,3]=(0.0148890871427)/(o+1.)+(-0.533721682564)
-        ref[1,4]=(0.199132570285)/(o+1.)+(0.645882415184)
-        ref[2,0]=(-0.80499305561)/(o+1.)+(-0.167094047444)
-        ref[2,1]=(-1.01443402945)/(o+1.)+(-0.398980230521)
-        ref[2,2]=(-1.93262797141)/(o+1.)+(-0.00583686914904)
-        ref[2,3]=(0.580415824189)/(o+1.)+(0.425186398252)
-        ref[2,4]=(0.774916007289)/(o+1.)+(-0.074089040271)
-        ref[3,0]=(-0.875265915734)/(o+1.)+(-0.0579281095106)
-        ref[3,1]=(-0.12193956842)/(o+1.)+(0.0127716951382)
-        ref[3,2]=(-0.619007025469)/(o+1.)+(0.333487708386)
-        ref[3,3]=(0.384502884102)/(o+1.)+(0.208236425295)
-        ref[3,4]=(-0.846251016151)/(o+1.)+(-0.675545651461)
-      else:
-        arg[0,0]=(0.596538443259)*x[0]**o+(0.479462980373)*x[0]+(-0.334469126403)*x[1]**o+(0.784201085556)*x[1]+(-0.231474140531)*x[2]**o+(-0.368096345589)*x[2]
-        arg[0,1]=(0.188945383338)*x[0]**o+(-0.95033024122)*x[0]+(0.567904901047)*x[1]**o+(-0.76703296351)*x[1]+(-0.0116083690376)*x[2]**o+(-0.211176589764)*x[2]
-        arg[0,2]=(0.225412552449)*x[0]**o+(-0.731615155924)*x[0]+(-0.362727501637)*x[1]**o+(-0.195442119344)*x[1]+(-0.215444456285)*x[2]**o+(0.412715796392)*x[2]
-        arg[0,3]=(-0.00941287481408)*x[0]**o+(-0.207271678463)*x[0]+(0.66582433583)*x[1]**o+(-0.297871484308)*x[1]+(-0.819460465536)*x[2]**o+(-0.3316307033)*x[2]
-        arg[0,4]=(-0.172265683581)*x[0]**o+(0.881658164973)*x[0]+(0.0267816673708)*x[1]**o+(-0.526757427521)*x[1]+(-0.666953449252)*x[2]**o+(0.366533690002)*x[2]
-        arg[1,0]=(-0.575272180021)*x[0]**o+(-0.707236339163)*x[0]+(-0.734723292219)*x[1]**o+(-0.872019568084)*x[1]+(-0.513269190461)*x[2]**o+(-0.95077853535)*x[2]
-        arg[1,1]=(0.687652562435)*x[0]**o+(0.500668143461)*x[0]+(0.127678854367)*x[1]**o+(0.135196530391)*x[1]+(0.219757431874)*x[2]**o+(0.43373842168)*x[2]
-        arg[1,2]=(-0.674120744855)*x[0]**o+(-0.792769889708)*x[0]+(0.0414602844391)*x[1]**o+(-0.159887164563)*x[1]+(0.406441555189)*x[2]**o+(-0.662210077269)*x[2]
-        arg[1,3]=(-0.623120612358)*x[0]**o+(0.895951757448)*x[0]+(0.957407224559)*x[1]**o+(-0.472225118848)*x[1]+(-0.294551998847)*x[2]**o+(0.503584320886)*x[2]
-        arg[1,4]=(-0.304220645545)*x[0]**o+(0.812321371589)*x[0]+(0.932257196386)*x[1]**o+(0.736014913915)*x[1]+(0.119140391025)*x[2]**o+(0.910696940879)*x[2]
-        arg[2,0]=(0.275470013797)*x[0]**o+(-0.903754203548)*x[0]+(-0.443211232771)*x[1]**o+(0.78815938507)*x[1]+(-0.0802934106722)*x[2]**o+(0.096532189886)*x[2]
-        arg[2,1]=(-0.4505392488)*x[0]**o+(-0.668542586506)*x[0]+(0.487967999984)*x[1]**o+(-0.642310745404)*x[1]+(-0.956530771836)*x[2]**o+(0.517544404873)*x[2]
-        arg[2,2]=(-0.984032885692)*x[0]**o+(-0.606688527142)*x[0]+(0.0565483776156)*x[1]**o+(-0.945228520749)*x[1]+(0.433070187921)*x[2]**o+(-0.599983370996)*x[2]
-        arg[2,3]=(-0.673469008741)*x[0]**o+(0.612144012035)*x[0]+(-0.169497339443)*x[1]**o+(0.267990057152)*x[1]+(0.431716413548)*x[2]**o+(0.188904436012)*x[2]
-        arg[2,4]=(0.320782309844)*x[0]**o+(-0.830068082984)*x[0]+(0.900183436056)*x[1]**o+(-0.343951186189)*x[1]+(-0.00137135137854)*x[2]**o+(-0.655764522249)*x[2]
-        arg[3,0]=(-0.936193981767)*x[0]**o+(0.885260284217)*x[0]+(0.00397725971098)*x[1]**o+(-0.0864751234501)*x[1]+(0.25001166345)*x[2]**o+(-0.127859505667)*x[2]
-        arg[3,1]=(-0.0841986843231)*x[0]**o+(-0.95678469673)*x[0]+(0.867049114883)*x[1]**o+(0.154499266839)*x[1]+(0.0217146474622)*x[2]**o+(-0.945774319527)*x[2]
-        arg[3,2]=(-0.668161122306)*x[0]**o+(0.779140555525)*x[0]+(0.217613826157)*x[1]**o+(0.900077039607)*x[1]+(-0.251881965789)*x[2]**o+(-0.331281723354)*x[2]
-        arg[3,3]=(-0.95624079226)*x[0]**o+(-0.403226291225)*x[0]+(0.303340462877)*x[1]**o+(-0.269819286355)*x[1]+(0.605804508829)*x[2]**o+(-0.461404715818)*x[2]
-        arg[3,4]=(-0.933059329973)*x[0]**o+(-0.00851461368762)*x[0]+(0.0588544443918)*x[1]**o+(-0.682939702389)*x[1]+(-0.213965742261)*x[2]**o+(-0.102965977964)*x[2]
-        ref[0,0]=(0.0305951763245)/(o+1.)+(0.44778386017)
-        ref[0,1]=(0.745241915348)/(o+1.)+(-0.964269897247)
-        ref[0,2]=(-0.352759405473)/(o+1.)+(-0.257170739438)
-        ref[0,3]=(-0.163049004521)/(o+1.)+(-0.418386933036)
-        ref[0,4]=(-0.812437465462)/(o+1.)+(0.360717213727)
-        ref[1,0]=(-1.8232646627)/(o+1.)+(-1.2650172213)
-        ref[1,1]=(1.03508884868)/(o+1.)+(0.534801547766)
-        ref[1,2]=(-0.226218905227)/(o+1.)+(-0.80743356577)
-        ref[1,3]=(0.0397346133545)/(o+1.)+(0.463655479743)
-        ref[1,4]=(0.747176941866)/(o+1.)+(1.22951661319)
-        ref[2,0]=(-0.248034629647)/(o+1.)+(-0.00953131429598)
-        ref[2,1]=(-0.919102020652)/(o+1.)+(-0.396654463518)
-        ref[2,2]=(-0.494414320156)/(o+1.)+(-1.07595020944)
-        ref[2,3]=(-0.411249934637)/(o+1.)+(0.534519252599)
-        ref[2,4]=(1.21959439452)/(o+1.)+(-0.914891895711)
-        ref[3,0]=(-0.682205058606)/(o+1.)+(0.33546282755)
-        ref[3,1]=(0.804565078022)/(o+1.)+(-0.874029874709)
-        ref[3,2]=(-0.702429261938)/(o+1.)+(0.673967935889)
-        ref[3,3]=(-0.0470958205546)/(o+1.)+(-0.567225146699)
-        ref[3,4]=(-1.08817062784)/(o+1.)+(-0.39721014702)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.401537399178)*x[0]**o+(-0.868937065568)*x[0]+(0.356734884346)*x[1]**o+(0.0137485089422)*x[1]
-        arg[0,0,1]=(0.705383698155)*x[0]**o+(-0.884988282352)*x[0]+(-0.979185994641)*x[1]**o+(0.929576942519)*x[1]
-        arg[0,1,0]=(-0.292540086272)*x[0]**o+(-0.223230840915)*x[0]+(0.717291109855)*x[1]**o+(-0.826233591275)*x[1]
-        arg[0,1,1]=(0.55739919643)*x[0]**o+(0.2571407205)*x[0]+(0.00434404142287)*x[1]**o+(0.200305144451)*x[1]
-        arg[1,0,0]=(0.451841947443)*x[0]**o+(-0.576279050146)*x[0]+(-0.128142118055)*x[1]**o+(0.316406960557)*x[1]
-        arg[1,0,1]=(-0.07174792925)*x[0]**o+(-0.392935435009)*x[0]+(-0.343535485172)*x[1]**o+(0.619131193274)*x[1]
-        arg[1,1,0]=(-0.667031669611)*x[0]**o+(-0.184806094874)*x[0]+(-0.199375296384)*x[1]**o+(0.449351889815)*x[1]
-        arg[1,1,1]=(-0.51924508404)*x[0]**o+(0.870508122509)*x[0]+(-0.274149433148)*x[1]**o+(-0.762367215962)*x[1]
-        arg[2,0,0]=(-0.501546909709)*x[0]**o+(0.164122129343)*x[0]+(-0.601370828214)*x[1]**o+(0.888046948888)*x[1]
-        arg[2,0,1]=(0.272472486899)*x[0]**o+(-0.958776296738)*x[0]+(-0.334676045163)*x[1]**o+(0.410943596779)*x[1]
-        arg[2,1,0]=(0.363478201368)*x[0]**o+(0.753492598803)*x[0]+(-0.663726768274)*x[1]**o+(0.875443816963)*x[1]
-        arg[2,1,1]=(0.995788536211)*x[0]**o+(-0.123932097555)*x[0]+(0.143025171293)*x[1]**o+(0.724918059214)*x[1]
-        arg[3,0,0]=(-0.578717829755)*x[0]**o+(-0.899523186929)*x[0]+(0.58523203854)*x[1]**o+(0.751620714771)*x[1]
-        arg[3,0,1]=(0.179841033744)*x[0]**o+(0.268015839688)*x[0]+(0.860292991989)*x[1]**o+(0.0117969420991)*x[1]
-        arg[3,1,0]=(-0.575777000777)*x[0]**o+(0.170047012345)*x[0]+(-0.418743243278)*x[1]**o+(-0.278415849566)*x[1]
-        arg[3,1,1]=(-0.913076795648)*x[0]**o+(0.486330450107)*x[0]+(-0.423570363453)*x[1]**o+(0.388575474946)*x[1]
-        arg[4,0,0]=(0.16695368621)*x[0]**o+(0.133497460585)*x[0]+(-0.444434659151)*x[1]**o+(-0.895229636275)*x[1]
-        arg[4,0,1]=(0.432018868106)*x[0]**o+(-0.281976075625)*x[0]+(-0.0455135209769)*x[1]**o+(0.76870037059)*x[1]
-        arg[4,1,0]=(0.238542836112)*x[0]**o+(-0.806931884409)*x[0]+(-0.0365533871189)*x[1]**o+(0.731336634477)*x[1]
-        arg[4,1,1]=(0.512035255059)*x[0]**o+(-0.683560978902)*x[0]+(-0.953782277737)*x[1]**o+(-0.311664210765)*x[1]
-        arg[5,0,0]=(-0.842399299624)*x[0]**o+(0.460676816656)*x[0]+(-0.251781603841)*x[1]**o+(0.321792359074)*x[1]
-        arg[5,0,1]=(-0.900576257062)*x[0]**o+(0.842393710528)*x[0]+(0.630445446843)*x[1]**o+(-0.647745144739)*x[1]
-        arg[5,1,0]=(0.136687908652)*x[0]**o+(0.0252907890641)*x[0]+(0.813054611844)*x[1]**o+(-0.459930787056)*x[1]
-        arg[5,1,1]=(-0.00242518550941)*x[0]**o+(-0.558785348137)*x[0]+(0.0568659980522)*x[1]**o+(0.689293614051)*x[1]
-        ref[0,0,0]=(0.758272283524)/(o+1.)+(-0.427594278313)
-        ref[0,0,1]=(-0.273802296487)/(o+1.)+(0.0222943300833)
-        ref[0,1,0]=(0.424751023583)/(o+1.)+(-0.524732216095)
-        ref[0,1,1]=(0.561743237852)/(o+1.)+(0.228722932476)
-        ref[1,0,0]=(0.323699829388)/(o+1.)+(-0.129936044795)
-        ref[1,0,1]=(-0.415283414421)/(o+1.)+(0.113097879133)
-        ref[1,1,0]=(-0.866406965995)/(o+1.)+(0.132272897471)
-        ref[1,1,1]=(-0.793394517189)/(o+1.)+(0.0540704532731)
-        ref[2,0,0]=(-1.10291773792)/(o+1.)+(0.526084539115)
-        ref[2,0,1]=(-0.0622035582637)/(o+1.)+(-0.273916349979)
-        ref[2,1,0]=(-0.300248566906)/(o+1.)+(0.814468207883)
-        ref[2,1,1]=(1.1388137075)/(o+1.)+(0.300492980829)
-        ref[3,0,0]=(0.00651420878498)/(o+1.)+(-0.073951236079)
-        ref[3,0,1]=(1.04013402573)/(o+1.)+(0.139906390894)
-        ref[3,1,0]=(-0.994520244055)/(o+1.)+(-0.0541844186105)
-        ref[3,1,1]=(-1.3366471591)/(o+1.)+(0.437452962527)
-        ref[4,0,0]=(-0.27748097294)/(o+1.)+(-0.380866087845)
-        ref[4,0,1]=(0.386505347129)/(o+1.)+(0.243362147483)
-        ref[4,1,0]=(0.201989448993)/(o+1.)+(-0.0377976249661)
-        ref[4,1,1]=(-0.441747022678)/(o+1.)+(-0.497612594833)
-        ref[5,0,0]=(-1.09418090346)/(o+1.)+(0.391234587865)
-        ref[5,0,1]=(-0.270130810219)/(o+1.)+(0.0973242828949)
-        ref[5,1,0]=(0.949742520497)/(o+1.)+(-0.217319998996)
-        ref[5,1,1]=(0.0544408125428)/(o+1.)+(0.0652541329568)
-      else:
-        arg[0,0,0]=(0.411788818613)*x[0]**o+(0.324151698669)*x[0]+(0.656551349616)*x[1]**o+(0.801577401197)*x[1]+(0.690440431022)*x[2]**o+(0.776409870151)*x[2]
-        arg[0,0,1]=(-0.224985947659)*x[0]**o+(-0.564703086188)*x[0]+(-0.37196336116)*x[1]**o+(-0.114979853172)*x[1]+(0.274462080499)*x[2]**o+(-0.988489021983)*x[2]
-        arg[0,1,0]=(0.512331530009)*x[0]**o+(0.519617843594)*x[0]+(-0.515174861158)*x[1]**o+(-0.675953902994)*x[1]+(0.796111490716)*x[2]**o+(0.229569489858)*x[2]
-        arg[0,1,1]=(0.347765144376)*x[0]**o+(-0.0110194730031)*x[0]+(-0.593936645599)*x[1]**o+(-0.372786558089)*x[1]+(-0.604691321362)*x[2]**o+(-0.888002521077)*x[2]
-        arg[1,0,0]=(-0.575954903433)*x[0]**o+(0.0160235655616)*x[0]+(0.305335632724)*x[1]**o+(-0.259402553796)*x[1]+(-0.221276854741)*x[2]**o+(-0.519932341069)*x[2]
-        arg[1,0,1]=(-0.674987647238)*x[0]**o+(-0.45852667934)*x[0]+(-0.758937440978)*x[1]**o+(0.80566898197)*x[1]+(-0.961619154322)*x[2]**o+(0.861564430243)*x[2]
-        arg[1,1,0]=(-0.297475412437)*x[0]**o+(0.881828705604)*x[0]+(-0.823267615874)*x[1]**o+(-0.0232728101313)*x[1]+(-0.676220001453)*x[2]**o+(-0.382414036981)*x[2]
-        arg[1,1,1]=(-0.31008204616)*x[0]**o+(0.805195900401)*x[0]+(-0.758209772143)*x[1]**o+(0.861379709073)*x[1]+(0.0631063866518)*x[2]**o+(0.356607080553)*x[2]
-        arg[2,0,0]=(0.305214964591)*x[0]**o+(0.815106526139)*x[0]+(0.138797156005)*x[1]**o+(-0.241921896332)*x[1]+(-0.103783035058)*x[2]**o+(-0.161952044984)*x[2]
-        arg[2,0,1]=(-0.925375677635)*x[0]**o+(0.0341347568201)*x[0]+(-0.706905924964)*x[1]**o+(-0.193304368451)*x[1]+(-0.449866757104)*x[2]**o+(-0.894963680869)*x[2]
-        arg[2,1,0]=(0.822676224279)*x[0]**o+(-0.28758006682)*x[0]+(-0.869025918917)*x[1]**o+(0.0107602044744)*x[1]+(-0.832322765163)*x[2]**o+(0.748440319389)*x[2]
-        arg[2,1,1]=(-0.415326508997)*x[0]**o+(-0.879521424817)*x[0]+(-0.971781441062)*x[1]**o+(0.527586634108)*x[1]+(0.336682669856)*x[2]**o+(-0.948414041149)*x[2]
-        arg[3,0,0]=(-0.345788531715)*x[0]**o+(0.626583498807)*x[0]+(-0.186418683649)*x[1]**o+(0.3141628424)*x[1]+(-0.781119787783)*x[2]**o+(0.972708430266)*x[2]
-        arg[3,0,1]=(0.175536279095)*x[0]**o+(-0.150027774295)*x[0]+(-0.506653680683)*x[1]**o+(-0.482544397029)*x[1]+(-0.59090996152)*x[2]**o+(0.618123625026)*x[2]
-        arg[3,1,0]=(0.737984493124)*x[0]**o+(0.650901680297)*x[0]+(-0.361389200009)*x[1]**o+(-0.784304665396)*x[1]+(-0.954132232142)*x[2]**o+(0.684341934348)*x[2]
-        arg[3,1,1]=(-0.385757579645)*x[0]**o+(0.251136919845)*x[0]+(0.95143939933)*x[1]**o+(0.501860043225)*x[1]+(-0.675673011184)*x[2]**o+(0.337315450579)*x[2]
-        arg[4,0,0]=(-0.740183402139)*x[0]**o+(-0.828278760743)*x[0]+(0.88000889117)*x[1]**o+(-0.0226801022184)*x[1]+(0.6811397662)*x[2]**o+(-0.254627446498)*x[2]
-        arg[4,0,1]=(-0.194128952361)*x[0]**o+(-0.524854896388)*x[0]+(0.341100326577)*x[1]**o+(-0.26072443499)*x[1]+(-0.197396331776)*x[2]**o+(-0.589037632112)*x[2]
-        arg[4,1,0]=(0.261995024865)*x[0]**o+(0.214193793699)*x[0]+(0.572024600244)*x[1]**o+(0.230659327198)*x[1]+(0.420971705453)*x[2]**o+(0.333445049827)*x[2]
-        arg[4,1,1]=(-0.0679525054395)*x[0]**o+(0.0756646296473)*x[0]+(-0.299865836239)*x[1]**o+(-0.828294764914)*x[1]+(0.606170745631)*x[2]**o+(0.624267827393)*x[2]
-        arg[5,0,0]=(0.312565542211)*x[0]**o+(-0.368815496171)*x[0]+(-0.0615973473105)*x[1]**o+(0.205012835971)*x[1]+(0.310818553076)*x[2]**o+(-0.287393908304)*x[2]
-        arg[5,0,1]=(-0.409626309069)*x[0]**o+(0.977953573562)*x[0]+(0.583013544138)*x[1]**o+(0.542907128677)*x[1]+(0.488538336366)*x[2]**o+(-0.85823611123)*x[2]
-        arg[5,1,0]=(-0.899607109395)*x[0]**o+(-0.0459053040522)*x[0]+(0.938423293041)*x[1]**o+(-0.112431665317)*x[1]+(0.620609328687)*x[2]**o+(-0.663082429319)*x[2]
-        arg[5,1,1]=(0.00370253144626)*x[0]**o+(0.503733497956)*x[0]+(0.362457785043)*x[1]**o+(0.417891957303)*x[1]+(0.404543677829)*x[2]**o+(0.117828669122)*x[2]
-        ref[0,0,0]=(1.75878059925)/(o+1.)+(0.951069485009)
-        ref[0,0,1]=(-0.32248722832)/(o+1.)+(-0.834085980672)
-        ref[0,1,0]=(0.793268159567)/(o+1.)+(0.036616715229)
-        ref[0,1,1]=(-0.850862822585)/(o+1.)+(-0.635904276085)
-        ref[1,0,0]=(-0.49189612545)/(o+1.)+(-0.381655664652)
-        ref[1,0,1]=(-2.39554424254)/(o+1.)+(0.604353366437)
-        ref[1,1,0]=(-1.79696302976)/(o+1.)+(0.238070929246)
-        ref[1,1,1]=(-1.00518543165)/(o+1.)+(1.01159134501)
-        ref[2,0,0]=(0.340229085537)/(o+1.)+(0.205616292412)
-        ref[2,0,1]=(-2.0821483597)/(o+1.)+(-0.52706664625)
-        ref[2,1,0]=(-0.878672459802)/(o+1.)+(0.235810228522)
-        ref[2,1,1]=(-1.0504252802)/(o+1.)+(-0.650174415929)
-        ref[3,0,0]=(-1.31332700315)/(o+1.)+(0.956727385736)
-        ref[3,0,1]=(-0.922027363109)/(o+1.)+(-0.00722427314892)
-        ref[3,1,0]=(-0.577536939027)/(o+1.)+(0.275469474624)
-        ref[3,1,1]=(-0.109991191499)/(o+1.)+(0.545156206825)
-        ref[4,0,0]=(0.820965255231)/(o+1.)+(-0.55279315473)
-        ref[4,0,1]=(-0.0504249575602)/(o+1.)+(-0.687308481745)
-        ref[4,1,0]=(1.25499133056)/(o+1.)+(0.389149085362)
-        ref[4,1,1]=(0.238352403952)/(o+1.)+(-0.0641811539369)
-        ref[5,0,0]=(0.561786747976)/(o+1.)+(-0.225598284252)
-        ref[5,0,1]=(0.661925571434)/(o+1.)+(0.331312295504)
-        ref[5,1,0]=(0.659425512333)/(o+1.)+(-0.410709699344)
-        ref[5,1,1]=(0.770703994319)/(o+1.)+(0.519727062191)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.164405890316)*x[0]**o+(-0.323303939764)*x[0]+(-0.0516829984856)*x[1]**o+(-0.220765052533)*x[1]
-        arg[0,0,0,1]=(0.152172612108)*x[0]**o+(-0.166242164365)*x[0]+(0.807177808571)*x[1]**o+(0.0404817109573)*x[1]
-        arg[0,0,1,0]=(0.016912808567)*x[0]**o+(0.623923316774)*x[0]+(-0.542886934905)*x[1]**o+(0.0110784560205)*x[1]
-        arg[0,0,1,1]=(-0.663885786909)*x[0]**o+(-0.55563355485)*x[0]+(0.191993284382)*x[1]**o+(0.734973556043)*x[1]
-        arg[0,0,2,0]=(-0.110316754183)*x[0]**o+(-0.584022783672)*x[0]+(0.56471376011)*x[1]**o+(0.846317747143)*x[1]
-        arg[0,0,2,1]=(-0.767988009278)*x[0]**o+(0.440997912352)*x[0]+(0.45366348093)*x[1]**o+(0.376620990318)*x[1]
-        arg[0,1,0,0]=(-0.138006508051)*x[0]**o+(0.8450564766)*x[0]+(-0.273559897633)*x[1]**o+(0.683678615645)*x[1]
-        arg[0,1,0,1]=(-0.467521625474)*x[0]**o+(0.32289306962)*x[0]+(0.340974562152)*x[1]**o+(-0.58109391053)*x[1]
-        arg[0,1,1,0]=(0.76867991208)*x[0]**o+(0.683527735131)*x[0]+(0.762986872389)*x[1]**o+(-0.189342734286)*x[1]
-        arg[0,1,1,1]=(0.125150175351)*x[0]**o+(-0.175190872876)*x[0]+(-0.569766488076)*x[1]**o+(0.787503755206)*x[1]
-        arg[0,1,2,0]=(-0.339695860559)*x[0]**o+(0.119452596206)*x[0]+(0.474378864192)*x[1]**o+(0.845982555265)*x[1]
-        arg[0,1,2,1]=(0.820551334836)*x[0]**o+(-0.200024721285)*x[0]+(-0.525871855871)*x[1]**o+(-0.714639297791)*x[1]
-        arg[0,2,0,0]=(-0.145788788262)*x[0]**o+(-0.695717636982)*x[0]+(0.736564332801)*x[1]**o+(0.634307016587)*x[1]
-        arg[0,2,0,1]=(-0.25142006947)*x[0]**o+(0.027028767127)*x[0]+(-0.614777438028)*x[1]**o+(-0.691417785617)*x[1]
-        arg[0,2,1,0]=(0.366081140839)*x[0]**o+(0.477490533426)*x[0]+(-0.116611335116)*x[1]**o+(-0.863552165712)*x[1]
-        arg[0,2,1,1]=(-0.467659558308)*x[0]**o+(0.0836299545334)*x[0]+(0.903093252833)*x[1]**o+(-0.956858182533)*x[1]
-        arg[0,2,2,0]=(0.870921031579)*x[0]**o+(-0.801681014465)*x[0]+(-0.951819608329)*x[1]**o+(-0.626222917084)*x[1]
-        arg[0,2,2,1]=(0.414973183041)*x[0]**o+(-0.444580205703)*x[0]+(-0.346458764208)*x[1]**o+(-0.679140100745)*x[1]
-        arg[0,3,0,0]=(-0.725326935158)*x[0]**o+(-0.914034759513)*x[0]+(0.702614377806)*x[1]**o+(0.819004276317)*x[1]
-        arg[0,3,0,1]=(0.617099932352)*x[0]**o+(-0.155182850011)*x[0]+(-0.066428715129)*x[1]**o+(-0.286480585435)*x[1]
-        arg[0,3,1,0]=(0.710942545488)*x[0]**o+(-0.734509277268)*x[0]+(-0.807474546329)*x[1]**o+(0.307631760449)*x[1]
-        arg[0,3,1,1]=(-0.709966924732)*x[0]**o+(-0.462297022374)*x[0]+(0.773787774038)*x[1]**o+(0.762137020991)*x[1]
-        arg[0,3,2,0]=(-0.425660932209)*x[0]**o+(-0.562130300181)*x[0]+(-0.516719014647)*x[1]**o+(-0.547832887369)*x[1]
-        arg[0,3,2,1]=(0.149573176879)*x[0]**o+(-0.208999629436)*x[0]+(-0.191426033553)*x[1]**o+(-0.119046538873)*x[1]
-        arg[0,4,0,0]=(-0.99932317151)*x[0]**o+(-0.832461558068)*x[0]+(-0.847073271676)*x[1]**o+(0.882046887729)*x[1]
-        arg[0,4,0,1]=(0.14235557233)*x[0]**o+(-0.352572053276)*x[0]+(-0.231989519255)*x[1]**o+(0.146855135398)*x[1]
-        arg[0,4,1,0]=(0.550561449012)*x[0]**o+(0.530745681425)*x[0]+(0.198889689472)*x[1]**o+(0.165503108658)*x[1]
-        arg[0,4,1,1]=(0.059663401309)*x[0]**o+(0.168377411751)*x[0]+(-0.224682723925)*x[1]**o+(-0.255406907757)*x[1]
-        arg[0,4,2,0]=(-0.747776894683)*x[0]**o+(-0.281763358533)*x[0]+(0.660369838923)*x[1]**o+(0.348541234687)*x[1]
-        arg[0,4,2,1]=(-0.886248366716)*x[0]**o+(0.665256341312)*x[0]+(-0.118041122298)*x[1]**o+(0.192284814559)*x[1]
-        arg[1,0,0,0]=(-0.212291422817)*x[0]**o+(-0.16123490382)*x[0]+(-0.884220059537)*x[1]**o+(-0.40104775897)*x[1]
-        arg[1,0,0,1]=(0.389745305389)*x[0]**o+(0.544302066739)*x[0]+(-0.504770065056)*x[1]**o+(0.903371132654)*x[1]
-        arg[1,0,1,0]=(0.983764499357)*x[0]**o+(0.0707766278425)*x[0]+(-0.119851167133)*x[1]**o+(0.668490934432)*x[1]
-        arg[1,0,1,1]=(-0.61333738947)*x[0]**o+(-0.515837139916)*x[0]+(-0.825015725806)*x[1]**o+(-0.858420009384)*x[1]
-        arg[1,0,2,0]=(0.838488008532)*x[0]**o+(0.320020900158)*x[0]+(0.265140913892)*x[1]**o+(0.493460973766)*x[1]
-        arg[1,0,2,1]=(-0.957171379585)*x[0]**o+(0.911667647687)*x[0]+(0.0634495769152)*x[1]**o+(-0.244783653159)*x[1]
-        arg[1,1,0,0]=(0.854312398231)*x[0]**o+(0.0177604750376)*x[0]+(-0.263135825468)*x[1]**o+(0.196452389095)*x[1]
-        arg[1,1,0,1]=(0.496952473267)*x[0]**o+(-0.505581680291)*x[0]+(0.227653536528)*x[1]**o+(-0.138354150837)*x[1]
-        arg[1,1,1,0]=(0.569682536816)*x[0]**o+(-0.523174667456)*x[0]+(-0.434073415962)*x[1]**o+(-0.853667257479)*x[1]
-        arg[1,1,1,1]=(0.636882167235)*x[0]**o+(-0.122206427025)*x[0]+(0.934361025063)*x[1]**o+(-0.43037160177)*x[1]
-        arg[1,1,2,0]=(0.0798318147504)*x[0]**o+(0.825231320185)*x[0]+(0.810701650808)*x[1]**o+(-0.544356371381)*x[1]
-        arg[1,1,2,1]=(-0.426710170704)*x[0]**o+(0.200697079677)*x[0]+(0.242027752153)*x[1]**o+(0.746762119874)*x[1]
-        arg[1,2,0,0]=(-0.497091856216)*x[0]**o+(0.0953816987137)*x[0]+(-0.388615292775)*x[1]**o+(0.794962452203)*x[1]
-        arg[1,2,0,1]=(0.484769626964)*x[0]**o+(0.700484219762)*x[0]+(-0.230377697673)*x[1]**o+(-0.110327221848)*x[1]
-        arg[1,2,1,0]=(-0.791806541129)*x[0]**o+(0.0199911517557)*x[0]+(-0.441657020836)*x[1]**o+(-0.972999930466)*x[1]
-        arg[1,2,1,1]=(-0.566750983493)*x[0]**o+(0.193689535753)*x[0]+(0.659310468709)*x[1]**o+(0.209045229813)*x[1]
-        arg[1,2,2,0]=(0.852553900341)*x[0]**o+(-0.869275488172)*x[0]+(-0.308429715369)*x[1]**o+(0.096335995297)*x[1]
-        arg[1,2,2,1]=(0.169351018917)*x[0]**o+(0.269577471686)*x[0]+(-0.226840840616)*x[1]**o+(-0.94229540867)*x[1]
-        arg[1,3,0,0]=(0.481711489234)*x[0]**o+(0.293576608201)*x[0]+(0.101998881767)*x[1]**o+(-0.10730442531)*x[1]
-        arg[1,3,0,1]=(-0.824144820539)*x[0]**o+(0.174754759038)*x[0]+(-0.251803196848)*x[1]**o+(-0.389656255459)*x[1]
-        arg[1,3,1,0]=(0.438310633462)*x[0]**o+(-0.268051020546)*x[0]+(0.670456978527)*x[1]**o+(-0.547393352784)*x[1]
-        arg[1,3,1,1]=(-0.95082246973)*x[0]**o+(0.739061218443)*x[0]+(0.209495253219)*x[1]**o+(-0.604801908581)*x[1]
-        arg[1,3,2,0]=(0.696900724687)*x[0]**o+(0.501191311274)*x[0]+(0.982952568975)*x[1]**o+(0.1345704134)*x[1]
-        arg[1,3,2,1]=(0.823865642457)*x[0]**o+(0.344980106206)*x[0]+(0.0740071873515)*x[1]**o+(-0.950460516779)*x[1]
-        arg[1,4,0,0]=(-0.428525532814)*x[0]**o+(0.496012936411)*x[0]+(-0.0756953876324)*x[1]**o+(0.8382068924)*x[1]
-        arg[1,4,0,1]=(0.950388644852)*x[0]**o+(-0.225116488186)*x[0]+(0.515802878592)*x[1]**o+(-0.51004230039)*x[1]
-        arg[1,4,1,0]=(0.868733254296)*x[0]**o+(-0.506544709529)*x[0]+(0.28935579533)*x[1]**o+(0.100277736612)*x[1]
-        arg[1,4,1,1]=(-0.104533384722)*x[0]**o+(0.598995288066)*x[0]+(-0.738946772839)*x[1]**o+(-0.23245555216)*x[1]
-        arg[1,4,2,0]=(-0.286232179213)*x[0]**o+(-0.31267596034)*x[0]+(0.588681250431)*x[1]**o+(-0.579857978487)*x[1]
-        arg[1,4,2,1]=(0.405666376198)*x[0]**o+(0.380029842735)*x[0]+(-0.646672003588)*x[1]**o+(0.419606979519)*x[1]
-        arg[2,0,0,0]=(0.183075434304)*x[0]**o+(0.0929532345426)*x[0]+(-0.742007638693)*x[1]**o+(-0.521914593386)*x[1]
-        arg[2,0,0,1]=(0.292878118412)*x[0]**o+(-0.427165220789)*x[0]+(0.540033289295)*x[1]**o+(0.997945616043)*x[1]
-        arg[2,0,1,0]=(0.872801856197)*x[0]**o+(0.0427577769706)*x[0]+(0.595354626662)*x[1]**o+(-0.878459740609)*x[1]
-        arg[2,0,1,1]=(-0.259988866684)*x[0]**o+(0.154043636253)*x[0]+(0.0580047878991)*x[1]**o+(0.40696744056)*x[1]
-        arg[2,0,2,0]=(-0.602648518466)*x[0]**o+(0.30877596654)*x[0]+(-0.268563459489)*x[1]**o+(-0.526379663585)*x[1]
-        arg[2,0,2,1]=(-0.375777994931)*x[0]**o+(-0.175440011709)*x[0]+(-0.578650003477)*x[1]**o+(0.822157683321)*x[1]
-        arg[2,1,0,0]=(-0.44389226502)*x[0]**o+(0.683580346916)*x[0]+(0.471857559282)*x[1]**o+(-0.869624665398)*x[1]
-        arg[2,1,0,1]=(0.768272315036)*x[0]**o+(-0.709688321973)*x[0]+(0.200727881948)*x[1]**o+(0.617326752785)*x[1]
-        arg[2,1,1,0]=(-0.371169228982)*x[0]**o+(-0.0248248405104)*x[0]+(-0.899904749204)*x[1]**o+(0.796779883083)*x[1]
-        arg[2,1,1,1]=(0.220088670807)*x[0]**o+(0.691718163435)*x[0]+(-0.0834793048429)*x[1]**o+(-0.748110928988)*x[1]
-        arg[2,1,2,0]=(0.246045293748)*x[0]**o+(-0.669660154233)*x[0]+(0.601040129345)*x[1]**o+(-0.0893792369983)*x[1]
-        arg[2,1,2,1]=(0.318708374425)*x[0]**o+(-0.973048583674)*x[0]+(-0.575891882633)*x[1]**o+(0.229050058038)*x[1]
-        arg[2,2,0,0]=(0.358008410645)*x[0]**o+(-0.834388697702)*x[0]+(0.0931465346237)*x[1]**o+(0.503934981947)*x[1]
-        arg[2,2,0,1]=(-0.257597986495)*x[0]**o+(-0.58070568528)*x[0]+(0.735541935653)*x[1]**o+(-0.704666216263)*x[1]
-        arg[2,2,1,0]=(0.0207421250729)*x[0]**o+(-0.724644198871)*x[0]+(0.637124335031)*x[1]**o+(-0.547300138808)*x[1]
-        arg[2,2,1,1]=(0.280179217797)*x[0]**o+(-0.387279903944)*x[0]+(0.516275341085)*x[1]**o+(0.781250973385)*x[1]
-        arg[2,2,2,0]=(-0.97771111517)*x[0]**o+(-0.140997969015)*x[0]+(-0.495112130955)*x[1]**o+(0.151523726543)*x[1]
-        arg[2,2,2,1]=(-0.48638258963)*x[0]**o+(-0.251363723104)*x[0]+(-0.484911659879)*x[1]**o+(-0.841285872322)*x[1]
-        arg[2,3,0,0]=(-0.70159761565)*x[0]**o+(-0.661658396735)*x[0]+(-0.380920250292)*x[1]**o+(0.682598882025)*x[1]
-        arg[2,3,0,1]=(0.477056088757)*x[0]**o+(0.697397619448)*x[0]+(0.28617323153)*x[1]**o+(-0.0443690469658)*x[1]
-        arg[2,3,1,0]=(-0.823038323615)*x[0]**o+(-0.742146866184)*x[0]+(0.258604766787)*x[1]**o+(-0.740368164141)*x[1]
-        arg[2,3,1,1]=(0.958751077013)*x[0]**o+(0.353976218746)*x[0]+(-0.954344840728)*x[1]**o+(0.436915389196)*x[1]
-        arg[2,3,2,0]=(0.432342075923)*x[0]**o+(-0.0699761039653)*x[0]+(0.701490046186)*x[1]**o+(0.0888793443125)*x[1]
-        arg[2,3,2,1]=(0.612536667525)*x[0]**o+(0.107433723026)*x[0]+(-0.611874456965)*x[1]**o+(-0.253338899867)*x[1]
-        arg[2,4,0,0]=(-0.0234819568317)*x[0]**o+(-0.0642964170457)*x[0]+(0.556679188908)*x[1]**o+(0.865922901373)*x[1]
-        arg[2,4,0,1]=(0.669235019483)*x[0]**o+(0.744361910609)*x[0]+(0.383397302403)*x[1]**o+(0.669587709042)*x[1]
-        arg[2,4,1,0]=(-0.143461051192)*x[0]**o+(-0.0272388772724)*x[0]+(0.723868767782)*x[1]**o+(0.303617835707)*x[1]
-        arg[2,4,1,1]=(-0.829765013546)*x[0]**o+(-0.784193619495)*x[0]+(0.384376849236)*x[1]**o+(0.280904709362)*x[1]
-        arg[2,4,2,0]=(0.38737050935)*x[0]**o+(0.749614613361)*x[0]+(-0.340848293488)*x[1]**o+(0.96291850214)*x[1]
-        arg[2,4,2,1]=(0.619896872679)*x[0]**o+(0.970694589398)*x[0]+(-0.300698305892)*x[1]**o+(0.794408153506)*x[1]
-        arg[3,0,0,0]=(-0.808442463698)*x[0]**o+(-0.527555255968)*x[0]+(0.246776596713)*x[1]**o+(-0.719809811547)*x[1]
-        arg[3,0,0,1]=(-0.390016002326)*x[0]**o+(-0.864168521951)*x[0]+(-0.154649478359)*x[1]**o+(0.210766031283)*x[1]
-        arg[3,0,1,0]=(-0.941916382966)*x[0]**o+(-0.0352551994705)*x[0]+(-0.660026082442)*x[1]**o+(-0.869241000235)*x[1]
-        arg[3,0,1,1]=(-0.287992443961)*x[0]**o+(0.292551506636)*x[0]+(-0.619953648778)*x[1]**o+(0.746095811695)*x[1]
-        arg[3,0,2,0]=(-0.233659077726)*x[0]**o+(-0.568647415596)*x[0]+(-0.22048065705)*x[1]**o+(0.658105381132)*x[1]
-        arg[3,0,2,1]=(0.871784854897)*x[0]**o+(-0.118389479971)*x[0]+(0.143290959871)*x[1]**o+(0.753198625961)*x[1]
-        arg[3,1,0,0]=(0.993988451174)*x[0]**o+(0.451849763406)*x[0]+(-0.972805640824)*x[1]**o+(0.796893857099)*x[1]
-        arg[3,1,0,1]=(-0.424353439197)*x[0]**o+(-0.575799061446)*x[0]+(-0.233936106648)*x[1]**o+(-0.451864349448)*x[1]
-        arg[3,1,1,0]=(0.639821887614)*x[0]**o+(0.771041944334)*x[0]+(0.420297869214)*x[1]**o+(0.671734395857)*x[1]
-        arg[3,1,1,1]=(0.398121897075)*x[0]**o+(0.647679737081)*x[0]+(-0.544457308885)*x[1]**o+(0.58955287395)*x[1]
-        arg[3,1,2,0]=(-0.118222351008)*x[0]**o+(-0.943807502172)*x[0]+(0.866866987138)*x[1]**o+(-0.0793340319339)*x[1]
-        arg[3,1,2,1]=(-0.157286204244)*x[0]**o+(-0.789214982692)*x[0]+(0.646008960971)*x[1]**o+(0.866687256647)*x[1]
-        arg[3,2,0,0]=(-0.620625598995)*x[0]**o+(-0.12874444072)*x[0]+(0.4402928966)*x[1]**o+(-0.0344340173898)*x[1]
-        arg[3,2,0,1]=(-0.714597102332)*x[0]**o+(0.730206152989)*x[0]+(0.795717819655)*x[1]**o+(0.0543647593833)*x[1]
-        arg[3,2,1,0]=(0.698721346048)*x[0]**o+(0.599204472096)*x[0]+(0.323529910402)*x[1]**o+(0.362678869119)*x[1]
-        arg[3,2,1,1]=(0.976107824554)*x[0]**o+(0.559889392243)*x[0]+(0.240016231718)*x[1]**o+(0.343322878078)*x[1]
-        arg[3,2,2,0]=(0.609695396838)*x[0]**o+(0.786331471916)*x[0]+(-0.965489152976)*x[1]**o+(0.553653504493)*x[1]
-        arg[3,2,2,1]=(0.897952533418)*x[0]**o+(0.227242627929)*x[0]+(-0.121752169524)*x[1]**o+(0.844617689997)*x[1]
-        arg[3,3,0,0]=(-0.249698211819)*x[0]**o+(-0.400095108874)*x[0]+(-0.44300562221)*x[1]**o+(0.387777895056)*x[1]
-        arg[3,3,0,1]=(0.626469203641)*x[0]**o+(0.741893669108)*x[0]+(0.261882509899)*x[1]**o+(-0.726628233604)*x[1]
-        arg[3,3,1,0]=(-0.525223500134)*x[0]**o+(0.918314547123)*x[0]+(0.426441176651)*x[1]**o+(0.338058005974)*x[1]
-        arg[3,3,1,1]=(-0.31358142709)*x[0]**o+(-0.411070225036)*x[0]+(0.0902340021221)*x[1]**o+(0.404135075929)*x[1]
-        arg[3,3,2,0]=(0.528842663849)*x[0]**o+(0.474768688828)*x[0]+(0.697643730083)*x[1]**o+(-0.170335125341)*x[1]
-        arg[3,3,2,1]=(0.875221054674)*x[0]**o+(-0.441830492507)*x[0]+(-0.60312069438)*x[1]**o+(0.664895429753)*x[1]
-        arg[3,4,0,0]=(0.563422972203)*x[0]**o+(-0.595004250424)*x[0]+(0.888927367905)*x[1]**o+(0.553640735136)*x[1]
-        arg[3,4,0,1]=(0.79563891979)*x[0]**o+(-0.461626171695)*x[0]+(0.700194671524)*x[1]**o+(-0.687505010217)*x[1]
-        arg[3,4,1,0]=(0.655248139354)*x[0]**o+(0.588175755435)*x[0]+(-0.29236593461)*x[1]**o+(0.575186295035)*x[1]
-        arg[3,4,1,1]=(0.405730566113)*x[0]**o+(-0.161117488254)*x[0]+(0.912224633472)*x[1]**o+(0.0292423764587)*x[1]
-        arg[3,4,2,0]=(-0.405819525278)*x[0]**o+(-0.362840757195)*x[0]+(0.961950188511)*x[1]**o+(0.205213542149)*x[1]
-        arg[3,4,2,1]=(0.703066280254)*x[0]**o+(-0.936055321446)*x[0]+(0.861070629413)*x[1]**o+(0.0856428368256)*x[1]
-        ref[0,0,0,0]=(-0.216088888802)/(o+1.)+(-0.272034496148)
-        ref[0,0,0,1]=(0.959350420679)/(o+1.)+(-0.062880226704)
-        ref[0,0,1,0]=(-0.525974126338)/(o+1.)+(0.317500886397)
-        ref[0,0,1,1]=(-0.471892502528)/(o+1.)+(0.0896700005967)
-        ref[0,0,2,0]=(0.454397005927)/(o+1.)+(0.131147481736)
-        ref[0,0,2,1]=(-0.314324528348)/(o+1.)+(0.408809451335)
-        ref[0,1,0,0]=(-0.411566405684)/(o+1.)+(0.764367546122)
-        ref[0,1,0,1]=(-0.126547063321)/(o+1.)+(-0.129100420455)
-        ref[0,1,1,0]=(1.53166678447)/(o+1.)+(0.247092500423)
-        ref[0,1,1,1]=(-0.444616312725)/(o+1.)+(0.306156441165)
-        ref[0,1,2,0]=(0.134683003633)/(o+1.)+(0.482717575736)
-        ref[0,1,2,1]=(0.294679478965)/(o+1.)+(-0.457332009538)
-        ref[0,2,0,0]=(0.590775544538)/(o+1.)+(-0.0307053101973)
-        ref[0,2,0,1]=(-0.866197507498)/(o+1.)+(-0.332194509245)
-        ref[0,2,1,0]=(0.249469805723)/(o+1.)+(-0.193030816143)
-        ref[0,2,1,1]=(0.435433694525)/(o+1.)+(-0.436614114)
-        ref[0,2,2,0]=(-0.0808985767498)/(o+1.)+(-0.713951965774)
-        ref[0,2,2,1]=(0.0685144188336)/(o+1.)+(-0.561860153224)
-        ref[0,3,0,0]=(-0.0227125573528)/(o+1.)+(-0.0475152415978)
-        ref[0,3,0,1]=(0.550671217223)/(o+1.)+(-0.220831717723)
-        ref[0,3,1,0]=(-0.0965320008409)/(o+1.)+(-0.213438758409)
-        ref[0,3,1,1]=(0.0638208493064)/(o+1.)+(0.149919999309)
-        ref[0,3,2,0]=(-0.942379946856)/(o+1.)+(-0.554981593775)
-        ref[0,3,2,1]=(-0.0418528566735)/(o+1.)+(-0.164023084154)
-        ref[0,4,0,0]=(-1.84639644319)/(o+1.)+(0.0247926648306)
-        ref[0,4,0,1]=(-0.0896339469252)/(o+1.)+(-0.102858458939)
-        ref[0,4,1,0]=(0.749451138484)/(o+1.)+(0.348124395042)
-        ref[0,4,1,1]=(-0.165019322616)/(o+1.)+(-0.0435147480027)
-        ref[0,4,2,0]=(-0.0874070557597)/(o+1.)+(0.033388938077)
-        ref[0,4,2,1]=(-1.00428948901)/(o+1.)+(0.428770577935)
-        ref[1,0,0,0]=(-1.09651148235)/(o+1.)+(-0.281141331395)
-        ref[1,0,0,1]=(-0.115024759667)/(o+1.)+(0.723836599697)
-        ref[1,0,1,0]=(0.863913332224)/(o+1.)+(0.369633781137)
-        ref[1,0,1,1]=(-1.43835311528)/(o+1.)+(-0.68712857465)
-        ref[1,0,2,0]=(1.10362892242)/(o+1.)+(0.406740936962)
-        ref[1,0,2,1]=(-0.893721802669)/(o+1.)+(0.333441997264)
-        ref[1,1,0,0]=(0.591176572763)/(o+1.)+(0.107106432066)
-        ref[1,1,0,1]=(0.724606009795)/(o+1.)+(-0.321967915564)
-        ref[1,1,1,0]=(0.135609120854)/(o+1.)+(-0.688420962467)
-        ref[1,1,1,1]=(1.5712431923)/(o+1.)+(-0.276289014397)
-        ref[1,1,2,0]=(0.890533465558)/(o+1.)+(0.140437474402)
-        ref[1,1,2,1]=(-0.184682418551)/(o+1.)+(0.473729599776)
-        ref[1,2,0,0]=(-0.88570714899)/(o+1.)+(0.445172075458)
-        ref[1,2,0,1]=(0.254391929291)/(o+1.)+(0.295078498957)
-        ref[1,2,1,0]=(-1.23346356196)/(o+1.)+(-0.476504389355)
-        ref[1,2,1,1]=(0.0925594852161)/(o+1.)+(0.201367382783)
-        ref[1,2,2,0]=(0.544124184972)/(o+1.)+(-0.386469746437)
-        ref[1,2,2,1]=(-0.057489821699)/(o+1.)+(-0.336358968492)
-        ref[1,3,0,0]=(0.583710371001)/(o+1.)+(0.0931360914458)
-        ref[1,3,0,1]=(-1.07594801739)/(o+1.)+(-0.107450748211)
-        ref[1,3,1,0]=(1.10876761199)/(o+1.)+(-0.407722186665)
-        ref[1,3,1,1]=(-0.741327216511)/(o+1.)+(0.0671296549307)
-        ref[1,3,2,0]=(1.67985329366)/(o+1.)+(0.317880862337)
-        ref[1,3,2,1]=(0.897872829808)/(o+1.)+(-0.302740205287)
-        ref[1,4,0,0]=(-0.504220920447)/(o+1.)+(0.667109914405)
-        ref[1,4,0,1]=(1.46619152344)/(o+1.)+(-0.367579394288)
-        ref[1,4,1,0]=(1.15808904963)/(o+1.)+(-0.203133486458)
-        ref[1,4,1,1]=(-0.843480157561)/(o+1.)+(0.183269867953)
-        ref[1,4,2,0]=(0.302449071217)/(o+1.)+(-0.446266969414)
-        ref[1,4,2,1]=(-0.24100562739)/(o+1.)+(0.399818411127)
-        ref[2,0,0,0]=(-0.558932204389)/(o+1.)+(-0.214480679421)
-        ref[2,0,0,1]=(0.832911407707)/(o+1.)+(0.285390197627)
-        ref[2,0,1,0]=(1.46815648286)/(o+1.)+(-0.417850981819)
-        ref[2,0,1,1]=(-0.201984078785)/(o+1.)+(0.280505538406)
-        ref[2,0,2,0]=(-0.871211977955)/(o+1.)+(-0.108801848522)
-        ref[2,0,2,1]=(-0.954427998409)/(o+1.)+(0.323358835806)
-        ref[2,1,0,0]=(0.0279652942615)/(o+1.)+(-0.0930221592407)
-        ref[2,1,0,1]=(0.969000196983)/(o+1.)+(-0.0461807845941)
-        ref[2,1,1,0]=(-1.27107397819)/(o+1.)+(0.385977521287)
-        ref[2,1,1,1]=(0.136609365964)/(o+1.)+(-0.0281963827764)
-        ref[2,1,2,0]=(0.847085423093)/(o+1.)+(-0.379519695616)
-        ref[2,1,2,1]=(-0.257183508208)/(o+1.)+(-0.371999262818)
-        ref[2,2,0,0]=(0.451154945268)/(o+1.)+(-0.165226857878)
-        ref[2,2,0,1]=(0.477943949158)/(o+1.)+(-0.642685950772)
-        ref[2,2,1,0]=(0.657866460103)/(o+1.)+(-0.635972168839)
-        ref[2,2,1,1]=(0.796454558882)/(o+1.)+(0.19698553472)
-        ref[2,2,2,0]=(-1.47282324613)/(o+1.)+(0.00526287876389)
-        ref[2,2,2,1]=(-0.971294249509)/(o+1.)+(-0.546324797713)
-        ref[2,3,0,0]=(-1.08251786594)/(o+1.)+(0.0104702426452)
-        ref[2,3,0,1]=(0.763229320287)/(o+1.)+(0.326514286241)
-        ref[2,3,1,0]=(-0.564433556829)/(o+1.)+(-0.741257515163)
-        ref[2,3,1,1]=(0.00440623628526)/(o+1.)+(0.395445803971)
-        ref[2,3,2,0]=(1.13383212211)/(o+1.)+(0.0094516201736)
-        ref[2,3,2,1]=(0.000662210559809)/(o+1.)+(-0.0729525884203)
-        ref[2,4,0,0]=(0.533197232076)/(o+1.)+(0.400813242164)
-        ref[2,4,0,1]=(1.05263232189)/(o+1.)+(0.706974809826)
-        ref[2,4,1,0]=(0.580407716589)/(o+1.)+(0.138189479217)
-        ref[2,4,1,1]=(-0.44538816431)/(o+1.)+(-0.251644455066)
-        ref[2,4,2,0]=(0.0465222158616)/(o+1.)+(0.85626655775)
-        ref[2,4,2,1]=(0.319198566788)/(o+1.)+(0.882551371452)
-        ref[3,0,0,0]=(-0.561665866984)/(o+1.)+(-0.623682533758)
-        ref[3,0,0,1]=(-0.544665480685)/(o+1.)+(-0.326701245334)
-        ref[3,0,1,0]=(-1.60194246541)/(o+1.)+(-0.452248099853)
-        ref[3,0,1,1]=(-0.907946092739)/(o+1.)+(0.519323659165)
-        ref[3,0,2,0]=(-0.454139734776)/(o+1.)+(0.0447289827682)
-        ref[3,0,2,1]=(1.01507581477)/(o+1.)+(0.317404572995)
-        ref[3,1,0,0]=(0.0211828103496)/(o+1.)+(0.624371810253)
-        ref[3,1,0,1]=(-0.658289545845)/(o+1.)+(-0.513831705447)
-        ref[3,1,1,0]=(1.06011975683)/(o+1.)+(0.721388170095)
-        ref[3,1,1,1]=(-0.14633541181)/(o+1.)+(0.618616305516)
-        ref[3,1,2,0]=(0.74864463613)/(o+1.)+(-0.511570767053)
-        ref[3,1,2,1]=(0.488722756727)/(o+1.)+(0.0387361369774)
-        ref[3,2,0,0]=(-0.180332702395)/(o+1.)+(-0.0815892290549)
-        ref[3,2,0,1]=(0.0811207173227)/(o+1.)+(0.392285456186)
-        ref[3,2,1,0]=(1.02225125645)/(o+1.)+(0.480941670608)
-        ref[3,2,1,1]=(1.21612405627)/(o+1.)+(0.45160613516)
-        ref[3,2,2,0]=(-0.355793756138)/(o+1.)+(0.669992488205)
-        ref[3,2,2,1]=(0.776200363894)/(o+1.)+(0.535930158963)
-        ref[3,3,0,0]=(-0.692703834029)/(o+1.)+(-0.00615860690903)
-        ref[3,3,0,1]=(0.88835171354)/(o+1.)+(0.00763271775166)
-        ref[3,3,1,0]=(-0.0987823234827)/(o+1.)+(0.628186276549)
-        ref[3,3,1,1]=(-0.223347424968)/(o+1.)+(-0.00346757455392)
-        ref[3,3,2,0]=(1.22648639393)/(o+1.)+(0.152216781743)
-        ref[3,3,2,1]=(0.272100360294)/(o+1.)+(0.111532468623)
-        ref[3,4,0,0]=(1.45235034011)/(o+1.)+(-0.0206817576441)
-        ref[3,4,0,1]=(1.49583359131)/(o+1.)+(-0.574565590956)
-        ref[3,4,1,0]=(0.362882204744)/(o+1.)+(0.581681025235)
-        ref[3,4,1,1]=(1.31795519959)/(o+1.)+(-0.0659375558974)
-        ref[3,4,2,0]=(0.556130663233)/(o+1.)+(-0.078813607523)
-        ref[3,4,2,1]=(1.56413690967)/(o+1.)+(-0.42520624231)
-      else:
-        arg[0,0,0,0]=(0.956854727968)*x[0]**o+(-0.43263548815)*x[0]+(-0.1485543705)*x[1]**o+(-0.411060684134)*x[1]+(-0.306829513954)*x[2]**o+(0.89077924839)*x[2]
-        arg[0,0,0,1]=(0.125905642347)*x[0]**o+(-0.645491335766)*x[0]+(-0.237571989123)*x[1]**o+(-0.239301942511)*x[1]+(-0.384215893518)*x[2]**o+(-0.371218179274)*x[2]
-        arg[0,0,1,0]=(0.0204273419969)*x[0]**o+(0.354631489501)*x[0]+(0.235086936835)*x[1]**o+(0.647551574475)*x[1]+(-0.729066874572)*x[2]**o+(0.177733791046)*x[2]
-        arg[0,0,1,1]=(-0.0938492166558)*x[0]**o+(-0.484339074939)*x[0]+(0.619333193491)*x[1]**o+(0.809157671781)*x[1]+(-0.28367956249)*x[2]**o+(-0.1758249267)*x[2]
-        arg[0,0,2,0]=(-0.334944259519)*x[0]**o+(-0.126145567301)*x[0]+(-0.646972616146)*x[1]**o+(0.20287553181)*x[1]+(-0.383816067326)*x[2]**o+(-0.0265591031498)*x[2]
-        arg[0,0,2,1]=(0.103308564583)*x[0]**o+(0.016108181951)*x[0]+(-0.367450237136)*x[1]**o+(0.657618788015)*x[1]+(-0.8327532511)*x[2]**o+(-0.267286876849)*x[2]
-        arg[0,1,0,0]=(0.688995722152)*x[0]**o+(-0.982012541087)*x[0]+(-0.232339851099)*x[1]**o+(-0.097863461266)*x[1]+(0.25916639806)*x[2]**o+(0.0538637018789)*x[2]
-        arg[0,1,0,1]=(0.446698337789)*x[0]**o+(-0.309434573629)*x[0]+(0.617004214016)*x[1]**o+(0.747666594435)*x[1]+(-0.869684246717)*x[2]**o+(0.75016186442)*x[2]
-        arg[0,1,1,0]=(-0.559974353252)*x[0]**o+(0.966642794905)*x[0]+(-0.228473000256)*x[1]**o+(-0.435093965632)*x[1]+(0.426986383284)*x[2]**o+(0.131300817321)*x[2]
-        arg[0,1,1,1]=(-0.696027598385)*x[0]**o+(-0.804778535506)*x[0]+(0.930171049019)*x[1]**o+(-0.900826020873)*x[1]+(0.844689166523)*x[2]**o+(0.0349718139676)*x[2]
-        arg[0,1,2,0]=(0.359170897328)*x[0]**o+(0.992944582308)*x[0]+(0.579162388074)*x[1]**o+(0.743410851741)*x[1]+(-0.204325306226)*x[2]**o+(-0.992005484878)*x[2]
-        arg[0,1,2,1]=(-0.883554988936)*x[0]**o+(0.486947073334)*x[0]+(-0.78078860326)*x[1]**o+(-0.134196299284)*x[1]+(-0.980852067031)*x[2]**o+(0.453023187355)*x[2]
-        arg[0,2,0,0]=(0.804524524371)*x[0]**o+(0.397924403155)*x[0]+(0.712297039229)*x[1]**o+(0.713485622558)*x[1]+(-0.966783610543)*x[2]**o+(0.497869404576)*x[2]
-        arg[0,2,0,1]=(-0.564706930001)*x[0]**o+(-0.482026983244)*x[0]+(0.284926154564)*x[1]**o+(0.844423322149)*x[1]+(0.444203847061)*x[2]**o+(0.333244188639)*x[2]
-        arg[0,2,1,0]=(-0.630410083438)*x[0]**o+(-0.831218126629)*x[0]+(0.400237927956)*x[1]**o+(-0.70518378137)*x[1]+(-0.803754805917)*x[2]**o+(0.60059455602)*x[2]
-        arg[0,2,1,1]=(0.198272547853)*x[0]**o+(0.0840356091496)*x[0]+(0.114385146155)*x[1]**o+(0.731057038288)*x[1]+(-0.976056408523)*x[2]**o+(-0.132565954304)*x[2]
-        arg[0,2,2,0]=(0.983300141657)*x[0]**o+(-0.733168195162)*x[0]+(-0.948802450335)*x[1]**o+(-0.756616078178)*x[1]+(0.450302374372)*x[2]**o+(0.802115535717)*x[2]
-        arg[0,2,2,1]=(-0.680853503774)*x[0]**o+(-0.910402862928)*x[0]+(0.583775613868)*x[1]**o+(0.741516645611)*x[1]+(-0.550498467533)*x[2]**o+(-0.610648481959)*x[2]
-        arg[0,3,0,0]=(0.981909313325)*x[0]**o+(0.148145112359)*x[0]+(-0.989721117518)*x[1]**o+(0.0246558730659)*x[1]+(0.721439979982)*x[2]**o+(0.896052837889)*x[2]
-        arg[0,3,0,1]=(0.109831691542)*x[0]**o+(-0.349555366958)*x[0]+(-0.54822642636)*x[1]**o+(0.121919022172)*x[1]+(-0.580228247481)*x[2]**o+(0.564276455713)*x[2]
-        arg[0,3,1,0]=(0.106091093353)*x[0]**o+(0.410111742327)*x[0]+(-0.0669026478824)*x[1]**o+(-0.662684907574)*x[1]+(-0.351815520918)*x[2]**o+(-0.324802958038)*x[2]
-        arg[0,3,1,1]=(0.857685803258)*x[0]**o+(-0.782627954043)*x[0]+(-0.555036389439)*x[1]**o+(-0.0126716685608)*x[1]+(0.260461379777)*x[2]**o+(0.117590260591)*x[2]
-        arg[0,3,2,0]=(-0.987873674604)*x[0]**o+(0.0779662295512)*x[0]+(-0.928229202803)*x[1]**o+(0.508015712707)*x[1]+(0.248638760509)*x[2]**o+(-0.712158091156)*x[2]
-        arg[0,3,2,1]=(-0.977973356138)*x[0]**o+(0.270015563339)*x[0]+(0.811157094127)*x[1]**o+(-0.756460384936)*x[1]+(-0.735557557504)*x[2]**o+(0.780333584929)*x[2]
-        arg[0,4,0,0]=(-0.762444411646)*x[0]**o+(0.386894014691)*x[0]+(0.763898738855)*x[1]**o+(-0.422896581278)*x[1]+(0.428591445563)*x[2]**o+(-0.617626926396)*x[2]
-        arg[0,4,0,1]=(-0.269524167286)*x[0]**o+(0.996895823788)*x[0]+(0.771396605337)*x[1]**o+(-0.993794940262)*x[1]+(-0.534803587481)*x[2]**o+(-0.928627946122)*x[2]
-        arg[0,4,1,0]=(0.978497459584)*x[0]**o+(-0.343496507186)*x[0]+(-0.250581087884)*x[1]**o+(-0.855743445852)*x[1]+(-0.127512246124)*x[2]**o+(-0.133936486447)*x[2]
-        arg[0,4,1,1]=(-0.844450818471)*x[0]**o+(0.263329730105)*x[0]+(0.411212783735)*x[1]**o+(-0.816379748952)*x[1]+(-0.443806901857)*x[2]**o+(0.1262969097)*x[2]
-        arg[0,4,2,0]=(-0.326938381124)*x[0]**o+(-0.707054728551)*x[0]+(-0.725513874889)*x[1]**o+(0.655254977879)*x[1]+(0.772734170665)*x[2]**o+(-0.963856465024)*x[2]
-        arg[0,4,2,1]=(0.896415185133)*x[0]**o+(-0.722431478737)*x[0]+(0.942058336843)*x[1]**o+(0.838230971246)*x[1]+(-0.279821311439)*x[2]**o+(-0.330130961206)*x[2]
-        arg[1,0,0,0]=(-0.466537465363)*x[0]**o+(0.86493624537)*x[0]+(-0.943049537777)*x[1]**o+(0.658727518981)*x[1]+(-0.130355508544)*x[2]**o+(-0.158245981876)*x[2]
-        arg[1,0,0,1]=(0.247046604605)*x[0]**o+(-0.287683750248)*x[0]+(0.266630203142)*x[1]**o+(0.372409648579)*x[1]+(-0.239411725166)*x[2]**o+(0.537339451105)*x[2]
-        arg[1,0,1,0]=(-0.232312387253)*x[0]**o+(-0.0493954012747)*x[0]+(-0.461085479525)*x[1]**o+(-0.0744729096417)*x[1]+(-0.795163064273)*x[2]**o+(0.613075576806)*x[2]
-        arg[1,0,1,1]=(-0.68570821748)*x[0]**o+(-0.492507082229)*x[0]+(-0.0673636097828)*x[1]**o+(0.569119992806)*x[1]+(-0.227653595613)*x[2]**o+(0.0337433636837)*x[2]
-        arg[1,0,2,0]=(-0.124371489405)*x[0]**o+(-0.726635218442)*x[0]+(-0.835418167414)*x[1]**o+(-0.00414597707753)*x[1]+(0.8365917104)*x[2]**o+(-0.507314639615)*x[2]
-        arg[1,0,2,1]=(-0.973228057052)*x[0]**o+(0.123228228923)*x[0]+(0.545712842666)*x[1]**o+(-0.451331566047)*x[1]+(0.299501907067)*x[2]**o+(-0.24898389883)*x[2]
-        arg[1,1,0,0]=(-0.940690906836)*x[0]**o+(-0.357571197214)*x[0]+(0.98643983012)*x[1]**o+(-0.82113140872)*x[1]+(0.460009285424)*x[2]**o+(-0.0298714172583)*x[2]
-        arg[1,1,0,1]=(-0.881543245921)*x[0]**o+(-0.640741814727)*x[0]+(-0.749244677096)*x[1]**o+(0.47161101909)*x[1]+(0.712893375828)*x[2]**o+(0.600151133959)*x[2]
-        arg[1,1,1,0]=(-0.217214692405)*x[0]**o+(-0.504211076658)*x[0]+(0.857127736087)*x[1]**o+(0.0439761116172)*x[1]+(0.956380848189)*x[2]**o+(0.698482155013)*x[2]
-        arg[1,1,1,1]=(-0.288969728734)*x[0]**o+(-0.63960886193)*x[0]+(-0.741293494258)*x[1]**o+(-0.125034323955)*x[1]+(-0.608855286755)*x[2]**o+(0.462427737944)*x[2]
-        arg[1,1,2,0]=(0.126242043984)*x[0]**o+(0.811846484451)*x[0]+(-0.522920862127)*x[1]**o+(0.678142081935)*x[1]+(0.0392586436898)*x[2]**o+(0.403908304728)*x[2]
-        arg[1,1,2,1]=(-0.290103861843)*x[0]**o+(0.336130241928)*x[0]+(-0.872641307678)*x[1]**o+(-0.372020796526)*x[1]+(0.172572077906)*x[2]**o+(-0.789431556966)*x[2]
-        arg[1,2,0,0]=(-0.158114079913)*x[0]**o+(0.954919898537)*x[0]+(-0.711834968234)*x[1]**o+(-0.390487270434)*x[1]+(-0.086581514295)*x[2]**o+(0.442047084988)*x[2]
-        arg[1,2,0,1]=(-0.914034594356)*x[0]**o+(0.521137372279)*x[0]+(0.12454416569)*x[1]**o+(0.627815188423)*x[1]+(0.770244577882)*x[2]**o+(-0.846691748091)*x[2]
-        arg[1,2,1,0]=(0.769631824465)*x[0]**o+(0.988840796717)*x[0]+(-0.401836868027)*x[1]**o+(0.401846957832)*x[1]+(-0.877826997285)*x[2]**o+(0.857725824229)*x[2]
-        arg[1,2,1,1]=(0.173539365276)*x[0]**o+(0.373206670706)*x[0]+(-0.597288730366)*x[1]**o+(-0.770220794555)*x[1]+(-0.586510454467)*x[2]**o+(-0.569370842441)*x[2]
-        arg[1,2,2,0]=(0.673765155818)*x[0]**o+(-0.642914516709)*x[0]+(0.794438851788)*x[1]**o+(-0.17557754186)*x[1]+(0.997565143863)*x[2]**o+(0.722460144483)*x[2]
-        arg[1,2,2,1]=(-0.878452482718)*x[0]**o+(-0.846862156166)*x[0]+(0.462351027504)*x[1]**o+(0.267435606154)*x[1]+(-0.452135086983)*x[2]**o+(0.701577407252)*x[2]
-        arg[1,3,0,0]=(-0.0557389135964)*x[0]**o+(-0.781831460089)*x[0]+(0.214846092931)*x[1]**o+(0.597436260353)*x[1]+(0.713968428327)*x[2]**o+(-0.456335676572)*x[2]
-        arg[1,3,0,1]=(0.288266531585)*x[0]**o+(-0.259529556521)*x[0]+(0.0286107975184)*x[1]**o+(0.465095455484)*x[1]+(-0.747648909025)*x[2]**o+(0.682866470382)*x[2]
-        arg[1,3,1,0]=(-0.720339104668)*x[0]**o+(0.961100526257)*x[0]+(0.0814885381756)*x[1]**o+(-0.448775223649)*x[1]+(0.250972143198)*x[2]**o+(-0.240231439947)*x[2]
-        arg[1,3,1,1]=(-0.459305786748)*x[0]**o+(0.272222143865)*x[0]+(-0.499164099401)*x[1]**o+(-0.225162547271)*x[1]+(-0.92261124167)*x[2]**o+(-0.436659790026)*x[2]
-        arg[1,3,2,0]=(0.890752966329)*x[0]**o+(-0.775207922011)*x[0]+(0.715960284721)*x[1]**o+(0.843422841789)*x[1]+(0.513788850466)*x[2]**o+(-0.325733710281)*x[2]
-        arg[1,3,2,1]=(0.958726172433)*x[0]**o+(-0.743672393249)*x[0]+(-0.523783133945)*x[1]**o+(0.133861976051)*x[1]+(-0.109230940116)*x[2]**o+(0.819716327751)*x[2]
-        arg[1,4,0,0]=(0.54439729551)*x[0]**o+(0.0763503792087)*x[0]+(0.0634218657498)*x[1]**o+(-0.405471845044)*x[1]+(0.316327091756)*x[2]**o+(-0.539493863939)*x[2]
-        arg[1,4,0,1]=(0.527330373182)*x[0]**o+(0.77531447123)*x[0]+(-0.481869315442)*x[1]**o+(0.556927692362)*x[1]+(-0.267215098309)*x[2]**o+(0.958919406465)*x[2]
-        arg[1,4,1,0]=(0.540950372012)*x[0]**o+(-0.95002626611)*x[0]+(-0.523544509893)*x[1]**o+(-0.583056635057)*x[1]+(-0.00288409928193)*x[2]**o+(0.671385098427)*x[2]
-        arg[1,4,1,1]=(-0.39802076092)*x[0]**o+(-0.583264022146)*x[0]+(-0.656261495961)*x[1]**o+(-0.527677078418)*x[1]+(-0.2632498932)*x[2]**o+(-0.537632951507)*x[2]
-        arg[1,4,2,0]=(-0.77176416566)*x[0]**o+(0.812696440735)*x[0]+(0.0925789242005)*x[1]**o+(0.299698967601)*x[1]+(-0.0185377066587)*x[2]**o+(-0.883247318682)*x[2]
-        arg[1,4,2,1]=(0.360949407452)*x[0]**o+(-0.463659754812)*x[0]+(0.799066387132)*x[1]**o+(0.0318151346916)*x[1]+(-0.380675976437)*x[2]**o+(-0.299341342112)*x[2]
-        arg[2,0,0,0]=(-0.985332287141)*x[0]**o+(0.33398206098)*x[0]+(0.39204502373)*x[1]**o+(-0.586826360517)*x[1]+(0.868240161369)*x[2]**o+(-0.257897525907)*x[2]
-        arg[2,0,0,1]=(-0.801369266967)*x[0]**o+(0.333496542809)*x[0]+(0.459444994717)*x[1]**o+(-0.950297568688)*x[1]+(-0.760722281765)*x[2]**o+(0.0933850221377)*x[2]
-        arg[2,0,1,0]=(0.53372811812)*x[0]**o+(0.999551098511)*x[0]+(-0.761650890163)*x[1]**o+(-0.80456940786)*x[1]+(-0.452089806623)*x[2]**o+(-0.40841169158)*x[2]
-        arg[2,0,1,1]=(-0.782294374468)*x[0]**o+(0.614736817827)*x[0]+(0.262995910218)*x[1]**o+(0.067349886804)*x[1]+(-0.167494656909)*x[2]**o+(-0.730462378769)*x[2]
-        arg[2,0,2,0]=(0.261001857862)*x[0]**o+(0.959318765248)*x[0]+(-0.177224016298)*x[1]**o+(-0.979637664014)*x[1]+(0.858937930292)*x[2]**o+(-0.627116377798)*x[2]
-        arg[2,0,2,1]=(-0.238083578675)*x[0]**o+(0.586367991705)*x[0]+(0.747378561289)*x[1]**o+(-0.540178926415)*x[1]+(-0.519781240185)*x[2]**o+(-0.42715014981)*x[2]
-        arg[2,1,0,0]=(-0.21022574437)*x[0]**o+(-0.292359099348)*x[0]+(0.449614855785)*x[1]**o+(-0.416904619153)*x[1]+(0.507537288404)*x[2]**o+(0.943584716996)*x[2]
-        arg[2,1,0,1]=(-0.410591525695)*x[0]**o+(-0.258796394127)*x[0]+(-0.474714731399)*x[1]**o+(-0.518288451462)*x[1]+(-0.15640903664)*x[2]**o+(0.97242574307)*x[2]
-        arg[2,1,1,0]=(-0.930865834892)*x[0]**o+(0.961887630616)*x[0]+(0.688706862295)*x[1]**o+(-0.375163634404)*x[1]+(0.378954001649)*x[2]**o+(-0.747140890466)*x[2]
-        arg[2,1,1,1]=(0.0454701384411)*x[0]**o+(-0.37651801332)*x[0]+(0.0808750051583)*x[1]**o+(-0.530355850075)*x[1]+(0.769675417234)*x[2]**o+(-0.767046792016)*x[2]
-        arg[2,1,2,0]=(0.179573418696)*x[0]**o+(-0.0547918709025)*x[0]+(0.739792606043)*x[1]**o+(0.849619562235)*x[1]+(-0.92840796838)*x[2]**o+(-0.302941296337)*x[2]
-        arg[2,1,2,1]=(0.160657807137)*x[0]**o+(0.551943403654)*x[0]+(0.649164334204)*x[1]**o+(0.298882266215)*x[1]+(0.33872360276)*x[2]**o+(-0.558910868754)*x[2]
-        arg[2,2,0,0]=(-0.704330511528)*x[0]**o+(-0.326943167116)*x[0]+(0.626863819473)*x[1]**o+(-0.107147718189)*x[1]+(0.00668670393016)*x[2]**o+(0.572223662188)*x[2]
-        arg[2,2,0,1]=(0.879695137799)*x[0]**o+(-0.313488700497)*x[0]+(-0.113134766565)*x[1]**o+(-0.131007759381)*x[1]+(0.55460969593)*x[2]**o+(0.898706374575)*x[2]
-        arg[2,2,1,0]=(0.329932124981)*x[0]**o+(-0.624965470976)*x[0]+(0.82906774364)*x[1]**o+(-0.681403786977)*x[1]+(-0.447119491747)*x[2]**o+(0.143763601614)*x[2]
-        arg[2,2,1,1]=(0.0367746207528)*x[0]**o+(0.47553259605)*x[0]+(-0.517723045973)*x[1]**o+(0.263932783195)*x[1]+(-0.131032589284)*x[2]**o+(-0.132729291841)*x[2]
-        arg[2,2,2,0]=(-0.108349266564)*x[0]**o+(-0.684748849483)*x[0]+(0.203271582231)*x[1]**o+(-0.860842085896)*x[1]+(0.469684577785)*x[2]**o+(0.195736308182)*x[2]
-        arg[2,2,2,1]=(0.915666799349)*x[0]**o+(0.383338953756)*x[0]+(-0.554011249579)*x[1]**o+(0.232285573367)*x[1]+(0.39288151674)*x[2]**o+(0.692592233016)*x[2]
-        arg[2,3,0,0]=(0.81179207663)*x[0]**o+(0.786809236572)*x[0]+(-0.814758445611)*x[1]**o+(-0.78461653396)*x[1]+(0.171435802778)*x[2]**o+(0.660186909193)*x[2]
-        arg[2,3,0,1]=(0.752694523669)*x[0]**o+(0.301473785296)*x[0]+(0.610379955695)*x[1]**o+(0.573729399495)*x[1]+(0.225983751859)*x[2]**o+(-0.349530143446)*x[2]
-        arg[2,3,1,0]=(-0.647825490424)*x[0]**o+(-0.232573858642)*x[0]+(0.773519085771)*x[1]**o+(-0.224497979868)*x[1]+(-0.681726885952)*x[2]**o+(-0.217968759388)*x[2]
-        arg[2,3,1,1]=(0.391888417642)*x[0]**o+(-0.240556139087)*x[0]+(-0.852397797723)*x[1]**o+(0.318342758913)*x[1]+(-0.773804983598)*x[2]**o+(-0.957590491908)*x[2]
-        arg[2,3,2,0]=(0.7126582007)*x[0]**o+(0.806022164546)*x[0]+(0.232348951782)*x[1]**o+(-0.985774366344)*x[1]+(-0.365161907541)*x[2]**o+(0.0218977623299)*x[2]
-        arg[2,3,2,1]=(-0.775068843872)*x[0]**o+(-0.595291330879)*x[0]+(0.681122481841)*x[1]**o+(0.152514252732)*x[1]+(0.510976191808)*x[2]**o+(-0.69539067488)*x[2]
-        arg[2,4,0,0]=(-0.362761749405)*x[0]**o+(0.494347958562)*x[0]+(0.215244694522)*x[1]**o+(-0.527767969217)*x[1]+(-0.115976071059)*x[2]**o+(-0.998233415841)*x[2]
-        arg[2,4,0,1]=(0.620291015098)*x[0]**o+(-0.222644358028)*x[0]+(0.0377714785847)*x[1]**o+(0.663978623913)*x[1]+(0.996481523389)*x[2]**o+(-0.689519418095)*x[2]
-        arg[2,4,1,0]=(-0.0374746407394)*x[0]**o+(0.3186355021)*x[0]+(-0.704305640533)*x[1]**o+(-0.632264150766)*x[1]+(-0.166691199609)*x[2]**o+(-0.794128441334)*x[2]
-        arg[2,4,1,1]=(0.117806334919)*x[0]**o+(-0.717334572919)*x[0]+(0.665341054571)*x[1]**o+(0.354208273372)*x[1]+(0.349883631586)*x[2]**o+(-0.260626035314)*x[2]
-        arg[2,4,2,0]=(0.160337827685)*x[0]**o+(-0.92734430881)*x[0]+(0.872112181363)*x[1]**o+(-0.796372970466)*x[1]+(-0.776882702685)*x[2]**o+(0.246816968474)*x[2]
-        arg[2,4,2,1]=(-0.317926812571)*x[0]**o+(-0.795779593996)*x[0]+(0.785287724793)*x[1]**o+(0.839033515634)*x[1]+(0.433187943714)*x[2]**o+(0.308175885606)*x[2]
-        arg[3,0,0,0]=(-0.555193292291)*x[0]**o+(-0.0280452948283)*x[0]+(0.988455127227)*x[1]**o+(-0.637707060271)*x[1]+(-0.95062571916)*x[2]**o+(-0.563121211553)*x[2]
-        arg[3,0,0,1]=(-0.169558534946)*x[0]**o+(0.886096637835)*x[0]+(-0.666307491933)*x[1]**o+(0.650321801985)*x[1]+(-0.268934932123)*x[2]**o+(-0.406617199906)*x[2]
-        arg[3,0,1,0]=(0.497351781449)*x[0]**o+(0.768617651685)*x[0]+(0.200962956226)*x[1]**o+(0.694236078954)*x[1]+(0.0323702864321)*x[2]**o+(-0.666046265832)*x[2]
-        arg[3,0,1,1]=(0.425151807387)*x[0]**o+(-0.886432438604)*x[0]+(-0.963257203569)*x[1]**o+(-0.698524427437)*x[1]+(0.0165810713355)*x[2]**o+(-0.142193988951)*x[2]
-        arg[3,0,2,0]=(0.965746112788)*x[0]**o+(-0.333068915886)*x[0]+(0.331031372002)*x[1]**o+(-0.384004796757)*x[1]+(0.0144121092048)*x[2]**o+(-0.352607264387)*x[2]
-        arg[3,0,2,1]=(-0.391557775789)*x[0]**o+(0.127020330586)*x[0]+(0.758832450081)*x[1]**o+(0.49669414469)*x[1]+(0.358403498634)*x[2]**o+(0.184963946351)*x[2]
-        arg[3,1,0,0]=(0.978053897464)*x[0]**o+(-0.211787313494)*x[0]+(0.927706482976)*x[1]**o+(-0.451292956408)*x[1]+(0.592824645174)*x[2]**o+(0.896240907546)*x[2]
-        arg[3,1,0,1]=(0.0780568875295)*x[0]**o+(0.130098698523)*x[0]+(-0.281871571918)*x[1]**o+(-0.596362849045)*x[1]+(-0.436455789199)*x[2]**o+(-0.657145053021)*x[2]
-        arg[3,1,1,0]=(-0.278111817329)*x[0]**o+(-0.627384158565)*x[0]+(-0.995802044048)*x[1]**o+(0.42485189159)*x[1]+(0.483473275475)*x[2]**o+(-0.177928974458)*x[2]
-        arg[3,1,1,1]=(0.127721047557)*x[0]**o+(0.93147711978)*x[0]+(-0.350992052283)*x[1]**o+(0.0993773637672)*x[1]+(0.29111744653)*x[2]**o+(-0.821710278883)*x[2]
-        arg[3,1,2,0]=(-0.697941918276)*x[0]**o+(-0.585872232852)*x[0]+(0.697967779925)*x[1]**o+(-0.811186381728)*x[1]+(0.708726108998)*x[2]**o+(0.289602027081)*x[2]
-        arg[3,1,2,1]=(-0.461424409147)*x[0]**o+(0.335089386385)*x[0]+(-0.964838280406)*x[1]**o+(0.828627561583)*x[1]+(-0.861416281013)*x[2]**o+(0.898354675269)*x[2]
-        arg[3,2,0,0]=(0.752543705358)*x[0]**o+(0.164487088496)*x[0]+(0.756164002406)*x[1]**o+(-0.740019514032)*x[1]+(0.107245489678)*x[2]**o+(0.677707700079)*x[2]
-        arg[3,2,0,1]=(0.763792557134)*x[0]**o+(0.725507550672)*x[0]+(0.171323949629)*x[1]**o+(-0.287172075258)*x[1]+(-0.94865226715)*x[2]**o+(-0.163093465336)*x[2]
-        arg[3,2,1,0]=(-0.327892721048)*x[0]**o+(0.334145897353)*x[0]+(-0.936827293436)*x[1]**o+(0.0822687872593)*x[1]+(0.259794829604)*x[2]**o+(0.376908280759)*x[2]
-        arg[3,2,1,1]=(0.595012545955)*x[0]**o+(0.617490014693)*x[0]+(-0.658036388462)*x[1]**o+(-0.921055393527)*x[1]+(-0.257878085344)*x[2]**o+(-0.623113089161)*x[2]
-        arg[3,2,2,0]=(0.961175705937)*x[0]**o+(0.656031660842)*x[0]+(0.964101580317)*x[1]**o+(0.824033157042)*x[1]+(0.510244886658)*x[2]**o+(-0.236501162729)*x[2]
-        arg[3,2,2,1]=(-0.128405588923)*x[0]**o+(-0.0327141502894)*x[0]+(0.909941485131)*x[1]**o+(0.79947258121)*x[1]+(0.635883050534)*x[2]**o+(0.841997575796)*x[2]
-        arg[3,3,0,0]=(-0.906234907643)*x[0]**o+(-0.316076976009)*x[0]+(0.863208664533)*x[1]**o+(-0.968640170523)*x[1]+(0.791637381686)*x[2]**o+(-0.543353462098)*x[2]
-        arg[3,3,0,1]=(-0.586709036832)*x[0]**o+(-0.299493216592)*x[0]+(-0.173966725899)*x[1]**o+(0.0971838711677)*x[1]+(0.385662922244)*x[2]**o+(0.288932625368)*x[2]
-        arg[3,3,1,0]=(-0.33865322795)*x[0]**o+(0.442176445777)*x[0]+(0.706183231282)*x[1]**o+(0.62528018966)*x[1]+(-0.377746006979)*x[2]**o+(-0.261455124139)*x[2]
-        arg[3,3,1,1]=(0.834855553776)*x[0]**o+(0.755005824764)*x[0]+(0.446589332183)*x[1]**o+(0.41883521757)*x[1]+(0.820177207209)*x[2]**o+(0.603811552083)*x[2]
-        arg[3,3,2,0]=(-0.624282266193)*x[0]**o+(0.28109086861)*x[0]+(0.44286011655)*x[1]**o+(-0.117876187343)*x[1]+(-0.267660131821)*x[2]**o+(0.880359406159)*x[2]
-        arg[3,3,2,1]=(-0.0722687033317)*x[0]**o+(-0.7013147214)*x[0]+(0.00614303249005)*x[1]**o+(-0.658138946692)*x[1]+(0.0557277088337)*x[2]**o+(0.614362766103)*x[2]
-        arg[3,4,0,0]=(0.935244440586)*x[0]**o+(-0.0699305155896)*x[0]+(-0.849303362918)*x[1]**o+(0.728062537708)*x[1]+(0.404621498028)*x[2]**o+(0.611486631437)*x[2]
-        arg[3,4,0,1]=(0.168117782017)*x[0]**o+(-0.0454396423181)*x[0]+(0.46021270423)*x[1]**o+(0.597343569492)*x[1]+(0.561215321486)*x[2]**o+(0.715771227777)*x[2]
-        arg[3,4,1,0]=(-0.502675682461)*x[0]**o+(0.543910335185)*x[0]+(0.721732643536)*x[1]**o+(-0.862126899566)*x[1]+(0.794704104653)*x[2]**o+(-0.284248276797)*x[2]
-        arg[3,4,1,1]=(-0.580751817984)*x[0]**o+(0.482838505281)*x[0]+(-0.426066109367)*x[1]**o+(-0.456724382007)*x[1]+(-0.770655426938)*x[2]**o+(-0.226232224569)*x[2]
-        arg[3,4,2,0]=(0.199832861603)*x[0]**o+(-0.586239366436)*x[0]+(0.730019631541)*x[1]**o+(0.185265476259)*x[1]+(0.514243351617)*x[2]**o+(-0.757742857839)*x[2]
-        arg[3,4,2,1]=(-0.941843068195)*x[0]**o+(0.211732407161)*x[0]+(-0.99705602485)*x[1]**o+(-0.198037742645)*x[1]+(0.154058794178)*x[2]**o+(0.0675962671791)*x[2]
-        ref[0,0,0,0]=(0.501470843513)/(o+1.)+(0.0235415380528)
-        ref[0,0,0,1]=(-0.495882240293)/(o+1.)+(-0.628005728776)
-        ref[0,0,1,0]=(-0.47355259574)/(o+1.)+(0.589958427511)
-        ref[0,0,1,1]=(0.241804414345)/(o+1.)+(0.0744968350706)
-        ref[0,0,2,0]=(-1.36573294299)/(o+1.)+(0.0250854306796)
-        ref[0,0,2,1]=(-1.09689492365)/(o+1.)+(0.203220046558)
-        ref[0,1,0,0]=(0.715822269113)/(o+1.)+(-0.513006150237)
-        ref[0,1,0,1]=(0.194018305088)/(o+1.)+(0.594196942613)
-        ref[0,1,1,0]=(-0.361460970224)/(o+1.)+(0.331424823297)
-        ref[0,1,1,1]=(1.07883261716)/(o+1.)+(-0.835316371206)
-        ref[0,1,2,0]=(0.734007979175)/(o+1.)+(0.372174974585)
-        ref[0,1,2,1]=(-2.64519565923)/(o+1.)+(0.402886980703)
-        ref[0,2,0,0]=(0.550037953057)/(o+1.)+(0.804639715144)
-        ref[0,2,0,1]=(0.164423071623)/(o+1.)+(0.347820263772)
-        ref[0,2,1,0]=(-1.0339269614)/(o+1.)+(-0.46790367599)
-        ref[0,2,1,1]=(-0.663398714515)/(o+1.)+(0.341263346566)
-        ref[0,2,2,0]=(0.484800065694)/(o+1.)+(-0.343834368812)
-        ref[0,2,2,1]=(-0.647576357439)/(o+1.)+(-0.389767349638)
-        ref[0,3,0,0]=(0.713628175789)/(o+1.)+(0.534426911657)
-        ref[0,3,0,1]=(-1.0186229823)/(o+1.)+(0.168320055464)
-        ref[0,3,1,0]=(-0.312627075447)/(o+1.)+(-0.288688061643)
-        ref[0,3,1,1]=(0.563110793595)/(o+1.)+(-0.338854681006)
-        ref[0,3,2,0]=(-1.6674641169)/(o+1.)+(-0.0630880744491)
-        ref[0,3,2,1]=(-0.902373819515)/(o+1.)+(0.146944381666)
-        ref[0,4,0,0]=(0.430045772773)/(o+1.)+(-0.326814746492)
-        ref[0,4,0,1]=(-0.0329311494305)/(o+1.)+(-0.462763531298)
-        ref[0,4,1,0]=(0.600404125575)/(o+1.)+(-0.666588219743)
-        ref[0,4,1,1]=(-0.877044936593)/(o+1.)+(-0.213376554573)
-        ref[0,4,2,0]=(-0.279718085349)/(o+1.)+(-0.507828107848)
-        ref[0,4,2,1]=(1.55865221054)/(o+1.)+(-0.107165734349)
-        ref[1,0,0,0]=(-1.53994251168)/(o+1.)+(0.682708891237)
-        ref[1,0,0,1]=(0.27426508258)/(o+1.)+(0.311032674718)
-        ref[1,0,1,0]=(-1.48856093105)/(o+1.)+(0.244603632945)
-        ref[1,0,1,1]=(-0.980725422876)/(o+1.)+(0.0551781371305)
-        ref[1,0,2,0]=(-0.123197946419)/(o+1.)+(-0.619047917567)
-        ref[1,0,2,1]=(-0.128013307318)/(o+1.)+(-0.288543617977)
-        ref[1,1,0,0]=(0.505758208708)/(o+1.)+(-0.604287011596)
-        ref[1,1,0,1]=(-0.917894547188)/(o+1.)+(0.215510169161)
-        ref[1,1,1,0]=(1.59629389187)/(o+1.)+(0.119123594986)
-        ref[1,1,1,1]=(-1.63911850975)/(o+1.)+(-0.15110772397)
-        ref[1,1,2,0]=(-0.357420174452)/(o+1.)+(0.946948435557)
-        ref[1,1,2,1]=(-0.990173091615)/(o+1.)+(-0.412661055782)
-        ref[1,2,0,0]=(-0.956530562442)/(o+1.)+(0.503239856545)
-        ref[1,2,0,1]=(-0.0192458507848)/(o+1.)+(0.151130406306)
-        ref[1,2,1,0]=(-0.510032040848)/(o+1.)+(1.12420678939)
-        ref[1,2,1,1]=(-1.01025981956)/(o+1.)+(-0.483192483145)
-        ref[1,2,2,0]=(2.46576915147)/(o+1.)+(-0.0480159570431)
-        ref[1,2,2,1]=(-0.868236542197)/(o+1.)+(0.0610754286198)
-        ref[1,3,0,0]=(0.873075607662)/(o+1.)+(-0.320365438154)
-        ref[1,3,0,1]=(-0.430771579922)/(o+1.)+(0.444216184672)
-        ref[1,3,1,0]=(-0.387878423294)/(o+1.)+(0.13604693133)
-        ref[1,3,1,1]=(-1.88108112782)/(o+1.)+(-0.194800096716)
-        ref[1,3,2,0]=(2.12050210152)/(o+1.)+(-0.128759395251)
-        ref[1,3,2,1]=(0.325712098372)/(o+1.)+(0.104952955276)
-        ref[1,4,0,0]=(0.924146253016)/(o+1.)+(-0.434307664887)
-        ref[1,4,0,1]=(-0.221754040568)/(o+1.)+(1.14558078503)
-        ref[1,4,1,0]=(0.0145217628367)/(o+1.)+(-0.43084890137)
-        ref[1,4,1,1]=(-1.31753215008)/(o+1.)+(-0.824287026036)
-        ref[1,4,2,0]=(-0.697722948118)/(o+1.)+(0.114574044827)
-        ref[1,4,2,1]=(0.779339818147)/(o+1.)+(-0.365592981116)
-        ref[2,0,0,0]=(0.274952897958)/(o+1.)+(-0.255370912722)
-        ref[2,0,0,1]=(-1.10264655401)/(o+1.)+(-0.261708001871)
-        ref[2,0,1,0]=(-0.680012578665)/(o+1.)+(-0.106715000464)
-        ref[2,0,1,1]=(-0.686793121159)/(o+1.)+(-0.0241878370688)
-        ref[2,0,2,0]=(0.942715771856)/(o+1.)+(-0.323717638282)
-        ref[2,0,2,1]=(-0.0104862575713)/(o+1.)+(-0.19048054226)
-        ref[2,1,0,0]=(0.746926399818)/(o+1.)+(0.117160499248)
-        ref[2,1,0,1]=(-1.04171529373)/(o+1.)+(0.0976704487401)
-        ref[2,1,1,0]=(0.136795029052)/(o+1.)+(-0.0802084471266)
-        ref[2,1,1,1]=(0.896020560833)/(o+1.)+(-0.836960327706)
-        ref[2,1,2,0]=(-0.00904194364113)/(o+1.)+(0.245943197498)
-        ref[2,1,2,1]=(1.1485457441)/(o+1.)+(0.145957400558)
-        ref[2,2,0,0]=(-0.0707799881243)/(o+1.)+(0.0690663884416)
-        ref[2,2,0,1]=(1.32117006716)/(o+1.)+(0.227104957348)
-        ref[2,2,1,0]=(0.711880376874)/(o+1.)+(-0.58130282817)
-        ref[2,2,1,1]=(-0.611981014504)/(o+1.)+(0.303368043702)
-        ref[2,2,2,0]=(0.564606893452)/(o+1.)+(-0.674927313599)
-        ref[2,2,2,1]=(0.754537066511)/(o+1.)+(0.654108380069)
-        ref[2,3,0,0]=(0.168469433796)/(o+1.)+(0.331189805903)
-        ref[2,3,0,1]=(1.58905823122)/(o+1.)+(0.262836520673)
-        ref[2,3,1,0]=(-0.556033290604)/(o+1.)+(-0.337520298949)
-        ref[2,3,1,1]=(-1.23431436368)/(o+1.)+(-0.439901936041)
-        ref[2,3,2,0]=(0.579845244941)/(o+1.)+(-0.0789272197338)
-        ref[2,3,2,1]=(0.417029829778)/(o+1.)+(-0.569083876513)
-        ref[2,4,0,0]=(-0.263493125943)/(o+1.)+(-0.515826713248)
-        ref[2,4,0,1]=(1.65454401707)/(o+1.)+(-0.124092576105)
-        ref[2,4,1,0]=(-0.908471480882)/(o+1.)+(-0.553878545)
-        ref[2,4,1,1]=(1.13303102108)/(o+1.)+(-0.31187616743)
-        ref[2,4,2,0]=(0.255567306363)/(o+1.)+(-0.738450155401)
-        ref[2,4,2,1]=(0.900548855936)/(o+1.)+(0.175714903622)
-        ref[3,0,0,0]=(-0.517363884224)/(o+1.)+(-0.614436783326)
-        ref[3,0,0,1]=(-1.104800959)/(o+1.)+(0.564900619957)
-        ref[3,0,1,0]=(0.730685024108)/(o+1.)+(0.398403732404)
-        ref[3,0,1,1]=(-0.521524324846)/(o+1.)+(-0.863575427496)
-        ref[3,0,2,0]=(1.31118959399)/(o+1.)+(-0.534840488515)
-        ref[3,0,2,1]=(0.725678172925)/(o+1.)+(0.404339210814)
-        ref[3,1,0,0]=(2.49858502561)/(o+1.)+(0.116580318822)
-        ref[3,1,0,1]=(-0.640270473588)/(o+1.)+(-0.561704601771)
-        ref[3,1,1,0]=(-0.790440585902)/(o+1.)+(-0.190230620716)
-        ref[3,1,1,1]=(0.0678464418036)/(o+1.)+(0.104572102332)
-        ref[3,1,2,0]=(0.708751970646)/(o+1.)+(-0.553728293749)
-        ref[3,1,2,1]=(-2.28767897057)/(o+1.)+(1.03103581162)
-        ref[3,2,0,0]=(1.61595319744)/(o+1.)+(0.0510876372718)
-        ref[3,2,0,1]=(-0.0135357603866)/(o+1.)+(0.137621005039)
-        ref[3,2,1,0]=(-1.00492518488)/(o+1.)+(0.396661482686)
-        ref[3,2,1,1]=(-0.320901927851)/(o+1.)+(-0.463339233997)
-        ref[3,2,2,0]=(2.43552217291)/(o+1.)+(0.621781827577)
-        ref[3,2,2,1]=(1.41741894674)/(o+1.)+(0.804378003359)
-        ref[3,3,0,0]=(0.748611138576)/(o+1.)+(-0.914035304315)
-        ref[3,3,0,1]=(-0.375012840487)/(o+1.)+(0.0433116399723)
-        ref[3,3,1,0]=(-0.0102160036467)/(o+1.)+(0.403000755649)
-        ref[3,3,1,1]=(2.10162209317)/(o+1.)+(0.888826297208)
-        ref[3,3,2,0]=(-0.449082281464)/(o+1.)+(0.521787043713)
-        ref[3,3,2,1]=(-0.0103979620079)/(o+1.)+(-0.372545450994)
-        ref[3,4,0,0]=(0.490562575696)/(o+1.)+(0.634809326777)
-        ref[3,4,0,1]=(1.18954580773)/(o+1.)+(0.633837577475)
-        ref[3,4,1,0]=(1.01376106573)/(o+1.)+(-0.301232420589)
-        ref[3,4,1,1]=(-1.77747335429)/(o+1.)+(-0.100059050648)
-        ref[3,4,2,0]=(1.44409584476)/(o+1.)+(-0.579358374008)
-        ref[3,4,2,1]=(-1.78484029887)/(o+1.)+(0.0406454658476)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 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 the 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.788336609161)*x[0]**o+(-0.46539601764)*x[0]+(0.0970136798824)*x[1]**o+(-0.120665298671)*x[1]
-        ref=(-0.691322929278)/(o+1.)+(-0.293030658156)
-      else:
-        arg=(0.922255261003)*x[0]**o+(0.0862232364707)*x[0]+(-0.94152635039)*x[1]**o+(0.771078486789)*x[1]+(-0.487642191181)*x[2]**o+(0.971754960362)*x[2]
-        ref=(-0.506913280568)/(o+1.)+(0.914528341811)
-      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 the 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.float_)
-      if dim==2:
-        arg[0]=(-0.193071015033)*x[0]**o+(-0.281957941612)*x[0]+(0.269334552863)*x[1]**o+(0.0332262192804)*x[1]
-        arg[1]=(-0.982634724425)*x[0]**o+(0.872638820737)*x[0]+(0.828028964603)*x[1]**o+(0.70464418136)*x[1]
-        ref[0]=(0.0762635378296)/(o+1.)+(-0.124365861166)
-        ref[1]=(-0.154605759822)/(o+1.)+(0.788641501048)
-      else:
-        arg[0]=(0.0746983082972)*x[0]**o+(0.281818436343)*x[0]+(-0.835321029206)*x[1]**o+(-0.349524270524)*x[1]+(-0.471905088601)*x[2]**o+(0.156327167402)*x[2]
-        arg[1]=(-0.971935771255)*x[0]**o+(0.943151542057)*x[0]+(-0.60084258169)*x[1]**o+(0.458392855527)*x[1]+(-0.0173384187065)*x[2]**o+(0.538410338758)*x[2]
-        ref[0]=(-1.23252780951)/(o+1.)+(0.0443106666103)
-        ref[1]=(-1.59011677165)/(o+1.)+(0.969977368171)
-      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_Solution_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.568783264759)*x[0]**o+(0.690377280868)*x[0]+(-0.689750922806)*x[1]**o+(-0.262828324126)*x[1]
-        arg[0,1]=(-0.981657284673)*x[0]**o+(0.37118874852)*x[0]+(0.733992104146)*x[1]**o+(0.350268735699)*x[1]
-        arg[0,2]=(0.713336100765)*x[0]**o+(0.737674447814)*x[0]+(0.239606043833)*x[1]**o+(0.814911366356)*x[1]
-        arg[0,3]=(0.171706130967)*x[0]**o+(0.56324398491)*x[0]+(0.328884588679)*x[1]**o+(0.13307521808)*x[1]
-        arg[0,4]=(-0.309130885049)*x[0]**o+(0.353596646674)*x[0]+(-0.282764686556)*x[1]**o+(-0.56977508596)*x[1]
-        arg[1,0]=(0.974136161109)*x[0]**o+(-0.432477120938)*x[0]+(-0.841212164751)*x[1]**o+(-0.429211937256)*x[1]
-        arg[1,1]=(0.0303890146585)*x[0]**o+(-0.712865964696)*x[0]+(0.572471431129)*x[1]**o+(-0.194324510922)*x[1]
-        arg[1,2]=(-0.757134870981)*x[0]**o+(-0.018314520594)*x[0]+(0.250423290169)*x[1]**o+(-0.876678823729)*x[1]
-        arg[1,3]=(-0.351885929068)*x[0]**o+(-0.561258605321)*x[0]+(0.208995575986)*x[1]**o+(0.428437856056)*x[1]
-        arg[1,4]=(-0.313383912526)*x[0]**o+(-0.713484404328)*x[0]+(-0.279619274966)*x[1]**o+(0.72420661494)*x[1]
-        arg[2,0]=(-0.686382641827)*x[0]**o+(0.678578408675)*x[0]+(-0.696532353786)*x[1]**o+(-0.154644995634)*x[1]
-        arg[2,1]=(0.368548759951)*x[0]**o+(-0.674856247769)*x[0]+(0.908734263899)*x[1]**o+(0.331173572353)*x[1]
-        arg[2,2]=(-0.1279136556)*x[0]**o+(-0.161474840876)*x[0]+(-0.775009015881)*x[1]**o+(-0.689552100815)*x[1]
-        arg[2,3]=(-0.638450048485)*x[0]**o+(0.755485009392)*x[0]+(-0.793363159431)*x[1]**o+(0.255883452369)*x[1]
-        arg[2,4]=(-0.831891512113)*x[0]**o+(-0.811678751836)*x[0]+(-0.487866621558)*x[1]**o+(0.240951890349)*x[1]
-        arg[3,0]=(0.448249735424)*x[0]**o+(0.0809467993259)*x[0]+(0.232269153692)*x[1]**o+(0.477512628661)*x[1]
-        arg[3,1]=(0.494093407104)*x[0]**o+(0.196761586998)*x[0]+(-0.702155296644)*x[1]**o+(-0.748641693731)*x[1]
-        arg[3,2]=(0.432370067164)*x[0]**o+(-0.365671005874)*x[0]+(0.452009309356)*x[1]**o+(-0.951328172558)*x[1]
-        arg[3,3]=(-0.993290240028)*x[0]**o+(0.172534714933)*x[0]+(0.00917693958413)*x[1]**o+(0.417515657393)*x[1]
-        arg[3,4]=(0.541299019375)*x[0]**o+(0.479118172057)*x[0]+(-0.502475287154)*x[1]**o+(-0.04397899716)*x[1]
-        ref[0,0]=(-0.120967658047)/(o+1.)+(0.213774478371)
-        ref[0,1]=(-0.247665180527)/(o+1.)+(0.360728742109)
-        ref[0,2]=(0.952942144598)/(o+1.)+(0.776292907085)
-        ref[0,3]=(0.500590719646)/(o+1.)+(0.348159601495)
-        ref[0,4]=(-0.591895571605)/(o+1.)+(-0.108089219643)
-        ref[1,0]=(0.132923996358)/(o+1.)+(-0.430844529097)
-        ref[1,1]=(0.602860445788)/(o+1.)+(-0.453595237809)
-        ref[1,2]=(-0.506711580812)/(o+1.)+(-0.447496672161)
-        ref[1,3]=(-0.142890353081)/(o+1.)+(-0.066410374632)
-        ref[1,4]=(-0.593003187492)/(o+1.)+(0.00536110530621)
-        ref[2,0]=(-1.38291499561)/(o+1.)+(0.261966706521)
-        ref[2,1]=(1.27728302385)/(o+1.)+(-0.171841337708)
-        ref[2,2]=(-0.902922671481)/(o+1.)+(-0.425513470846)
-        ref[2,3]=(-1.43181320792)/(o+1.)+(0.505684230881)
-        ref[2,4]=(-1.31975813367)/(o+1.)+(-0.285363430743)
-        ref[3,0]=(0.680518889117)/(o+1.)+(0.279229713993)
-        ref[3,1]=(-0.20806188954)/(o+1.)+(-0.275940053366)
-        ref[3,2]=(0.88437937652)/(o+1.)+(-0.658499589216)
-        ref[3,3]=(-0.984113300443)/(o+1.)+(0.295025186163)
-        ref[3,4]=(0.0388237322207)/(o+1.)+(0.217569587448)
-      else:
-        arg[0,0]=(-0.866239193113)*x[0]**o+(0.479559390215)*x[0]+(0.512920648125)*x[1]**o+(-0.504775214511)*x[1]+(0.462210441279)*x[2]**o+(0.000249131516168)*x[2]
-        arg[0,1]=(-0.11397206495)*x[0]**o+(0.0762933475692)*x[0]+(0.347716642793)*x[1]**o+(0.373262578958)*x[1]+(0.965468442129)*x[2]**o+(-0.743205128452)*x[2]
-        arg[0,2]=(-0.214519408107)*x[0]**o+(-0.663675446512)*x[0]+(-0.424102625804)*x[1]**o+(-0.426644021856)*x[1]+(-0.0731662128704)*x[2]**o+(-0.375185307096)*x[2]
-        arg[0,3]=(0.599595484989)*x[0]**o+(-0.303187098474)*x[0]+(0.278524134467)*x[1]**o+(-0.579432425528)*x[1]+(0.006698672684)*x[2]**o+(-0.820721120517)*x[2]
-        arg[0,4]=(0.538847126305)*x[0]**o+(0.58093792853)*x[0]+(-0.21189097773)*x[1]**o+(0.637101424777)*x[1]+(0.0155994636183)*x[2]**o+(0.488675370945)*x[2]
-        arg[1,0]=(-0.775581481064)*x[0]**o+(-0.968381856562)*x[0]+(-0.660755920498)*x[1]**o+(0.746481830633)*x[1]+(-0.300061615221)*x[2]**o+(-0.720031101537)*x[2]
-        arg[1,1]=(0.990001351802)*x[0]**o+(-0.168997300944)*x[0]+(0.0134555819367)*x[1]**o+(0.969355591009)*x[1]+(-0.347553438064)*x[2]**o+(0.648537935984)*x[2]
-        arg[1,2]=(-0.327760535516)*x[0]**o+(0.517489199537)*x[0]+(-0.0589046196438)*x[1]**o+(-0.893401439507)*x[1]+(-0.0821634552571)*x[2]**o+(0.861266440343)*x[2]
-        arg[1,3]=(-0.808782893446)*x[0]**o+(-0.196363777506)*x[0]+(0.623837845847)*x[1]**o+(-0.05392424847)*x[1]+(0.616011657554)*x[2]**o+(0.800682023434)*x[2]
-        arg[1,4]=(-0.425073222968)*x[0]**o+(-0.635248695204)*x[0]+(0.947222621311)*x[1]**o+(0.253198813179)*x[1]+(-0.907568459712)*x[2]**o+(-0.513049744062)*x[2]
-        arg[2,0]=(-0.103867107528)*x[0]**o+(0.893031214224)*x[0]+(0.151292631908)*x[1]**o+(-0.407189878657)*x[1]+(0.618120612304)*x[2]**o+(0.983992964931)*x[2]
-        arg[2,1]=(0.310432646627)*x[0]**o+(0.235143842057)*x[0]+(0.729683627093)*x[1]**o+(0.891778928523)*x[1]+(-0.148927367367)*x[2]**o+(0.913403960844)*x[2]
-        arg[2,2]=(0.610293692912)*x[0]**o+(-0.28497731539)*x[0]+(-0.926462472232)*x[1]**o+(-0.427657211191)*x[1]+(0.467905160751)*x[2]**o+(0.195578740767)*x[2]
-        arg[2,3]=(0.854869452114)*x[0]**o+(-0.752530632831)*x[0]+(0.0128220565485)*x[1]**o+(-0.726013651836)*x[1]+(-0.0979888078519)*x[2]**o+(-0.658955703807)*x[2]
-        arg[2,4]=(0.536447848289)*x[0]**o+(-0.658205406579)*x[0]+(0.66427484293)*x[1]**o+(-0.250014589496)*x[1]+(-0.0654257159073)*x[2]**o+(0.538196496913)*x[2]
-        arg[3,0]=(-0.514665034974)*x[0]**o+(-0.278189747423)*x[0]+(0.402996329453)*x[1]**o+(-0.0362969716175)*x[1]+(-0.707890815004)*x[2]**o+(-0.298762865096)*x[2]
-        arg[3,1]=(0.7342439327)*x[0]**o+(-0.387336714116)*x[0]+(-0.67888634151)*x[1]**o+(0.647322640846)*x[1]+(-0.0346274738413)*x[2]**o+(0.985950301913)*x[2]
-        arg[3,2]=(0.687555064124)*x[0]**o+(0.345506248144)*x[0]+(0.658692258064)*x[1]**o+(0.810796031447)*x[1]+(0.102608006398)*x[2]**o+(0.349877767777)*x[2]
-        arg[3,3]=(-0.456241806837)*x[0]**o+(-0.181224535865)*x[0]+(0.401842456169)*x[1]**o+(-0.413936620519)*x[1]+(0.436794604974)*x[2]**o+(0.95051042082)*x[2]
-        arg[3,4]=(-0.330739393408)*x[0]**o+(-0.261876658969)*x[0]+(0.287474017623)*x[1]**o+(0.463691723118)*x[1]+(0.757597823206)*x[2]**o+(0.49336246207)*x[2]
-        ref[0,0]=(0.108891896292)/(o+1.)+(-0.01248334639)
-        ref[0,1]=(1.19921301997)/(o+1.)+(-0.146824600962)
-        ref[0,2]=(-0.711788246781)/(o+1.)+(-0.732752387732)
-        ref[0,3]=(0.88481829214)/(o+1.)+(-0.85167032226)
-        ref[0,4]=(0.342555612194)/(o+1.)+(0.853357362126)
-        ref[1,0]=(-1.73639901678)/(o+1.)+(-0.470965563733)
-        ref[1,1]=(0.655903495675)/(o+1.)+(0.724448113024)
-        ref[1,2]=(-0.468828610417)/(o+1.)+(0.242677100186)
-        ref[1,3]=(0.431066609955)/(o+1.)+(0.275196998729)
-        ref[1,4]=(-0.385419061368)/(o+1.)+(-0.447549813044)
-        ref[2,0]=(0.665546136685)/(o+1.)+(0.734917150249)
-        ref[2,1]=(0.891188906354)/(o+1.)+(1.02016336571)
-        ref[2,2]=(0.151736381432)/(o+1.)+(-0.258527892907)
-        ref[2,3]=(0.76970270081)/(o+1.)+(-1.06874999424)
-        ref[2,4]=(1.13529697531)/(o+1.)+(-0.185011749581)
-        ref[3,0]=(-0.819559520525)/(o+1.)+(-0.306624792068)
-        ref[3,1]=(0.020730117348)/(o+1.)+(0.622968114321)
-        ref[3,2]=(1.44885532859)/(o+1.)+(0.753090023684)
-        ref[3,3]=(0.382395254306)/(o+1.)+(0.177674632218)
-        ref[3,4]=(0.714332447421)/(o+1.)+(0.34758876311)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.779261125448)*x[0]**o+(-0.640503838419)*x[0]+(0.589085035572)*x[1]**o+(-0.0426687544445)*x[1]
-        arg[0,0,1]=(-0.419361292473)*x[0]**o+(0.0850684591011)*x[0]+(-0.440758336688)*x[1]**o+(0.151015611594)*x[1]
-        arg[0,1,0]=(-0.727043966709)*x[0]**o+(0.711730063365)*x[0]+(0.657759819512)*x[1]**o+(-0.210981156609)*x[1]
-        arg[0,1,1]=(-0.276491768644)*x[0]**o+(-0.324865684188)*x[0]+(-0.921856877627)*x[1]**o+(-0.246833902926)*x[1]
-        arg[1,0,0]=(0.720541615152)*x[0]**o+(-0.0406851820986)*x[0]+(0.33976001267)*x[1]**o+(0.937989079378)*x[1]
-        arg[1,0,1]=(0.239272962875)*x[0]**o+(0.482026352856)*x[0]+(0.159148474482)*x[1]**o+(0.680831564145)*x[1]
-        arg[1,1,0]=(0.55170300456)*x[0]**o+(-0.261357073238)*x[0]+(0.298185649596)*x[1]**o+(-0.540598468483)*x[1]
-        arg[1,1,1]=(0.508262701362)*x[0]**o+(-0.531692643817)*x[0]+(0.151424571021)*x[1]**o+(-0.77488755481)*x[1]
-        arg[2,0,0]=(0.265201389846)*x[0]**o+(0.377300848247)*x[0]+(0.0402148688087)*x[1]**o+(0.0263806695524)*x[1]
-        arg[2,0,1]=(0.321397565411)*x[0]**o+(-0.277650913698)*x[0]+(0.909430556637)*x[1]**o+(-0.43244155765)*x[1]
-        arg[2,1,0]=(-0.671417887851)*x[0]**o+(-0.772328065901)*x[0]+(0.0896878386442)*x[1]**o+(0.584773963567)*x[1]
-        arg[2,1,1]=(0.318995094412)*x[0]**o+(-0.396578444213)*x[0]+(-0.627767362562)*x[1]**o+(-0.588717342984)*x[1]
-        arg[3,0,0]=(-0.154999830633)*x[0]**o+(-0.263434767944)*x[0]+(0.0704862479101)*x[1]**o+(0.216237505495)*x[1]
-        arg[3,0,1]=(0.956868643095)*x[0]**o+(-0.0331644426873)*x[0]+(-0.236340025853)*x[1]**o+(-0.814705425837)*x[1]
-        arg[3,1,0]=(-0.477985064084)*x[0]**o+(-0.368896833289)*x[0]+(0.208122873207)*x[1]**o+(-0.566525593432)*x[1]
-        arg[3,1,1]=(-0.299257275248)*x[0]**o+(0.937022356746)*x[0]+(0.671724793932)*x[1]**o+(0.80705820341)*x[1]
-        arg[4,0,0]=(0.857855249735)*x[0]**o+(0.537756541143)*x[0]+(0.611784225987)*x[1]**o+(0.944061991186)*x[1]
-        arg[4,0,1]=(0.825779290308)*x[0]**o+(-0.636461636739)*x[0]+(-0.382007450888)*x[1]**o+(0.170178262303)*x[1]
-        arg[4,1,0]=(0.275666857657)*x[0]**o+(-0.404983003194)*x[0]+(0.476932065223)*x[1]**o+(0.931645726493)*x[1]
-        arg[4,1,1]=(0.956182179652)*x[0]**o+(0.543482655321)*x[0]+(0.60492494312)*x[1]**o+(0.384497838341)*x[1]
-        arg[5,0,0]=(0.476937368598)*x[0]**o+(-0.588434801718)*x[0]+(0.865080125217)*x[1]**o+(-0.954493375041)*x[1]
-        arg[5,0,1]=(0.151850214007)*x[0]**o+(0.252651124764)*x[0]+(-0.570132867968)*x[1]**o+(-0.0885902498736)*x[1]
-        arg[5,1,0]=(-0.69330471578)*x[0]**o+(0.165874518143)*x[0]+(-0.610503496045)*x[1]**o+(-0.871951964138)*x[1]
-        arg[5,1,1]=(-0.539191264945)*x[0]**o+(0.558474736927)*x[0]+(0.752045569996)*x[1]**o+(-0.5305308467)*x[1]
-        ref[0,0,0]=(1.36834616102)/(o+1.)+(-0.341586296432)
-        ref[0,0,1]=(-0.860119629161)/(o+1.)+(0.118042035348)
-        ref[0,1,0]=(-0.0692841471964)/(o+1.)+(0.250374453378)
-        ref[0,1,1]=(-1.19834864627)/(o+1.)+(-0.285849793557)
-        ref[1,0,0]=(1.06030162782)/(o+1.)+(0.448651948639)
-        ref[1,0,1]=(0.398421437357)/(o+1.)+(0.5814289585)
-        ref[1,1,0]=(0.849888654155)/(o+1.)+(-0.400977770861)
-        ref[1,1,1]=(0.659687272383)/(o+1.)+(-0.653290099314)
-        ref[2,0,0]=(0.305416258655)/(o+1.)+(0.2018407589)
-        ref[2,0,1]=(1.23082812205)/(o+1.)+(-0.355046235674)
-        ref[2,1,0]=(-0.581730049206)/(o+1.)+(-0.0937770511668)
-        ref[2,1,1]=(-0.30877226815)/(o+1.)+(-0.492647893598)
-        ref[3,0,0]=(-0.0845135827233)/(o+1.)+(-0.0235986312242)
-        ref[3,0,1]=(0.720528617241)/(o+1.)+(-0.423934934262)
-        ref[3,1,0]=(-0.269862190877)/(o+1.)+(-0.46771121336)
-        ref[3,1,1]=(0.372467518684)/(o+1.)+(0.872040280078)
-        ref[4,0,0]=(1.46963947572)/(o+1.)+(0.740909266165)
-        ref[4,0,1]=(0.44377183942)/(o+1.)+(-0.233141687218)
-        ref[4,1,0]=(0.75259892288)/(o+1.)+(0.26333136165)
-        ref[4,1,1]=(1.56110712277)/(o+1.)+(0.463990246831)
-        ref[5,0,0]=(1.34201749382)/(o+1.)+(-0.771464088379)
-        ref[5,0,1]=(-0.418282653961)/(o+1.)+(0.0820304374451)
-        ref[5,1,0]=(-1.30380821182)/(o+1.)+(-0.353038722997)
-        ref[5,1,1]=(0.212854305051)/(o+1.)+(0.0139719451134)
-      else:
-        arg[0,0,0]=(-0.825926001774)*x[0]**o+(0.418049316138)*x[0]+(0.668695279849)*x[1]**o+(-0.7323605258)*x[1]+(-0.637717742224)*x[2]**o+(0.257065974143)*x[2]
-        arg[0,0,1]=(-0.169779448443)*x[0]**o+(-0.648612931029)*x[0]+(-0.643814352995)*x[1]**o+(0.396704595574)*x[1]+(-0.248766540261)*x[2]**o+(-0.736410673282)*x[2]
-        arg[0,1,0]=(-0.371929441192)*x[0]**o+(0.438661796459)*x[0]+(-0.893450426264)*x[1]**o+(0.643494077636)*x[1]+(0.252099102122)*x[2]**o+(-0.0857798075076)*x[2]
-        arg[0,1,1]=(0.336251711034)*x[0]**o+(-0.317426111079)*x[0]+(-0.801221986791)*x[1]**o+(0.281123033042)*x[1]+(0.921153543163)*x[2]**o+(0.497003835923)*x[2]
-        arg[1,0,0]=(0.40897311872)*x[0]**o+(0.326894801733)*x[0]+(0.216268807497)*x[1]**o+(0.946235364974)*x[1]+(-0.480995485096)*x[2]**o+(0.869772937982)*x[2]
-        arg[1,0,1]=(0.108715554449)*x[0]**o+(0.0847529231253)*x[0]+(0.866120965844)*x[1]**o+(0.43989772616)*x[1]+(0.67962061792)*x[2]**o+(0.90311988632)*x[2]
-        arg[1,1,0]=(0.28571484173)*x[0]**o+(0.593050819853)*x[0]+(-0.384864010146)*x[1]**o+(-0.57920566259)*x[1]+(-0.304024223769)*x[2]**o+(-0.0279518764989)*x[2]
-        arg[1,1,1]=(0.249126658892)*x[0]**o+(0.243355410215)*x[0]+(0.154816978135)*x[1]**o+(-0.260343533153)*x[1]+(-0.973133787852)*x[2]**o+(0.752545508531)*x[2]
-        arg[2,0,0]=(0.103612497259)*x[0]**o+(0.0919234144108)*x[0]+(0.416394965635)*x[1]**o+(-0.0132359939268)*x[1]+(-0.522775855178)*x[2]**o+(-0.985811066906)*x[2]
-        arg[2,0,1]=(-0.592641488144)*x[0]**o+(0.703703144485)*x[0]+(-0.0149046721584)*x[1]**o+(0.220368283581)*x[1]+(-0.656858164281)*x[2]**o+(0.165951102113)*x[2]
-        arg[2,1,0]=(0.309492848012)*x[0]**o+(-0.301037623847)*x[0]+(-0.224814259669)*x[1]**o+(-0.950794406688)*x[1]+(-0.296088293363)*x[2]**o+(-0.712930293168)*x[2]
-        arg[2,1,1]=(0.0592633594166)*x[0]**o+(-0.179007619512)*x[0]+(-0.922169690831)*x[1]**o+(-0.778228075089)*x[1]+(-0.135749453777)*x[2]**o+(-0.146265051618)*x[2]
-        arg[3,0,0]=(-0.71773633584)*x[0]**o+(0.471551385738)*x[0]+(-0.041415831943)*x[1]**o+(0.343380640343)*x[1]+(-0.211821446187)*x[2]**o+(-0.661201893183)*x[2]
-        arg[3,0,1]=(-0.159071045836)*x[0]**o+(0.216715127143)*x[0]+(-0.846847485213)*x[1]**o+(0.662226888693)*x[1]+(0.050806337433)*x[2]**o+(0.744071347051)*x[2]
-        arg[3,1,0]=(-0.363431877105)*x[0]**o+(-0.461513470653)*x[0]+(-0.130947882739)*x[1]**o+(-0.624729599981)*x[1]+(0.778572567699)*x[2]**o+(0.324584316744)*x[2]
-        arg[3,1,1]=(0.395432262346)*x[0]**o+(0.826450301981)*x[0]+(0.176721657975)*x[1]**o+(-0.370954952405)*x[1]+(-0.708437370609)*x[2]**o+(-0.150075114354)*x[2]
-        arg[4,0,0]=(-0.18662583335)*x[0]**o+(-0.0120831234457)*x[0]+(0.805686139762)*x[1]**o+(0.30195413136)*x[1]+(0.648067854031)*x[2]**o+(0.28073240632)*x[2]
-        arg[4,0,1]=(-0.913625644854)*x[0]**o+(-0.264637827098)*x[0]+(-0.6531590441)*x[1]**o+(0.396422722623)*x[1]+(0.280591271146)*x[2]**o+(0.498346191707)*x[2]
-        arg[4,1,0]=(0.208029597907)*x[0]**o+(-0.295747909396)*x[0]+(-0.541509895186)*x[1]**o+(-0.511394562575)*x[1]+(-0.459197562982)*x[2]**o+(-0.749433614666)*x[2]
-        arg[4,1,1]=(-0.29700028905)*x[0]**o+(-0.590932598278)*x[0]+(0.36219700213)*x[1]**o+(0.482759242709)*x[1]+(-0.135696240971)*x[2]**o+(0.49658807849)*x[2]
-        arg[5,0,0]=(-0.800345624219)*x[0]**o+(0.259709746207)*x[0]+(0.480073493816)*x[1]**o+(0.499332550127)*x[1]+(0.691794186846)*x[2]**o+(-0.319369042249)*x[2]
-        arg[5,0,1]=(0.300879052118)*x[0]**o+(-0.985396817441)*x[0]+(0.971136879002)*x[1]**o+(0.806560091745)*x[1]+(0.361308859099)*x[2]**o+(0.264277089732)*x[2]
-        arg[5,1,0]=(0.271857906548)*x[0]**o+(0.338260411675)*x[0]+(-0.170292665803)*x[1]**o+(0.675491566142)*x[1]+(0.897921755421)*x[2]**o+(-0.829233864443)*x[2]
-        arg[5,1,1]=(0.673366845241)*x[0]**o+(0.121940550422)*x[0]+(0.116054155545)*x[1]**o+(0.0456556938689)*x[1]+(-0.978127590673)*x[2]**o+(0.180985351995)*x[2]
-        ref[0,0,0]=(-0.794948464148)/(o+1.)+(-0.0286226177598)
-        ref[0,0,1]=(-1.0623603417)/(o+1.)+(-0.494159504368)
-        ref[0,1,0]=(-1.01328076533)/(o+1.)+(0.498188033294)
-        ref[0,1,1]=(0.456183267406)/(o+1.)+(0.230350378943)
-        ref[1,0,0]=(0.144246441122)/(o+1.)+(1.07145155234)
-        ref[1,0,1]=(1.65445713821)/(o+1.)+(0.713885267803)
-        ref[1,1,0]=(-0.403173392185)/(o+1.)+(-0.0070533596178)
-        ref[1,1,1]=(-0.569190150825)/(o+1.)+(0.367778692797)
-        ref[2,0,0]=(-0.00276839228366)/(o+1.)+(-0.453561823211)
-        ref[2,0,1]=(-1.26440432458)/(o+1.)+(0.545011265089)
-        ref[2,1,0]=(-0.21140970502)/(o+1.)+(-0.982381161851)
-        ref[2,1,1]=(-0.998655785191)/(o+1.)+(-0.55175037311)
-        ref[3,0,0]=(-0.97097361397)/(o+1.)+(0.0768650664488)
-        ref[3,0,1]=(-0.955112193616)/(o+1.)+(0.811506681444)
-        ref[3,1,0]=(0.284192807855)/(o+1.)+(-0.380829376946)
-        ref[3,1,1]=(-0.136283450288)/(o+1.)+(0.152710117611)
-        ref[4,0,0]=(1.26712816044)/(o+1.)+(0.285301707117)
-        ref[4,0,1]=(-1.28619341781)/(o+1.)+(0.315065543616)
-        ref[4,1,0]=(-0.792677860261)/(o+1.)+(-0.778288043318)
-        ref[4,1,1]=(-0.0704995278906)/(o+1.)+(0.194207361461)
-        ref[5,0,0]=(0.371522056443)/(o+1.)+(0.219836627043)
-        ref[5,0,1]=(1.63332479022)/(o+1.)+(0.0427201820182)
-        ref[5,1,0]=(0.999486996166)/(o+1.)+(0.0922590566873)
-        ref[5,1,1]=(-0.188706589887)/(o+1.)+(0.174290798143)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.647932589381)*x[0]**o+(-0.092686685918)*x[0]+(0.167888464541)*x[1]**o+(0.698445840627)*x[1]
-        arg[0,0,0,1]=(0.413204959658)*x[0]**o+(0.772926029512)*x[0]+(-0.63702948026)*x[1]**o+(0.608392823861)*x[1]
-        arg[0,0,1,0]=(0.303506932052)*x[0]**o+(0.650309664063)*x[0]+(-0.805238344485)*x[1]**o+(-0.62971680995)*x[1]
-        arg[0,0,1,1]=(-0.205701190736)*x[0]**o+(-0.0834042840814)*x[0]+(-0.525839398431)*x[1]**o+(0.779973223005)*x[1]
-        arg[0,0,2,0]=(-0.97954633631)*x[0]**o+(-0.298973871114)*x[0]+(0.858022652298)*x[1]**o+(0.667671796632)*x[1]
-        arg[0,0,2,1]=(-0.790133712345)*x[0]**o+(-0.733743414808)*x[0]+(0.337185148145)*x[1]**o+(-0.927853051244)*x[1]
-        arg[0,1,0,0]=(0.617198112458)*x[0]**o+(0.70438849416)*x[0]+(-0.861661596364)*x[1]**o+(-0.251796116219)*x[1]
-        arg[0,1,0,1]=(0.37107453636)*x[0]**o+(-0.490440661153)*x[0]+(0.849252675242)*x[1]**o+(-0.896547775077)*x[1]
-        arg[0,1,1,0]=(0.375080744007)*x[0]**o+(-0.609557663503)*x[0]+(-0.930846980977)*x[1]**o+(0.0623096843381)*x[1]
-        arg[0,1,1,1]=(-0.809863615805)*x[0]**o+(-0.999724521803)*x[0]+(0.493027030633)*x[1]**o+(-0.672546253752)*x[1]
-        arg[0,1,2,0]=(0.219294077412)*x[0]**o+(-0.7854819847)*x[0]+(-0.353026321798)*x[1]**o+(-0.965348418509)*x[1]
-        arg[0,1,2,1]=(0.177236321722)*x[0]**o+(-0.860491592895)*x[0]+(-0.458724268899)*x[1]**o+(-0.476508229653)*x[1]
-        arg[0,2,0,0]=(0.0760611767074)*x[0]**o+(-0.00296398964042)*x[0]+(-0.972843039436)*x[1]**o+(-0.0422057743881)*x[1]
-        arg[0,2,0,1]=(-0.926737777701)*x[0]**o+(-0.895791593378)*x[0]+(-0.776529150964)*x[1]**o+(0.557115706978)*x[1]
-        arg[0,2,1,0]=(0.353264702858)*x[0]**o+(0.632583933138)*x[0]+(-0.354112684469)*x[1]**o+(0.0541346174117)*x[1]
-        arg[0,2,1,1]=(-0.124181989217)*x[0]**o+(-0.803262099858)*x[0]+(0.733246361984)*x[1]**o+(0.0639821744038)*x[1]
-        arg[0,2,2,0]=(-0.446733845136)*x[0]**o+(-0.187373171381)*x[0]+(-0.312309043572)*x[1]**o+(0.830789380477)*x[1]
-        arg[0,2,2,1]=(0.403889932995)*x[0]**o+(-0.243474625233)*x[0]+(0.35707779102)*x[1]**o+(0.29725421988)*x[1]
-        arg[0,3,0,0]=(-0.856376546696)*x[0]**o+(0.448431504377)*x[0]+(-0.535187100108)*x[1]**o+(-0.90994242894)*x[1]
-        arg[0,3,0,1]=(-0.321475754775)*x[0]**o+(0.0389358177737)*x[0]+(-0.0949733279735)*x[1]**o+(0.921937240884)*x[1]
-        arg[0,3,1,0]=(0.591276336387)*x[0]**o+(-0.598236438303)*x[0]+(-0.829829995185)*x[1]**o+(0.539669346291)*x[1]
-        arg[0,3,1,1]=(-0.944726366074)*x[0]**o+(-0.796928273271)*x[0]+(-0.424606656681)*x[1]**o+(0.35341306063)*x[1]
-        arg[0,3,2,0]=(-0.850914599406)*x[0]**o+(0.791179202404)*x[0]+(-0.0220845565851)*x[1]**o+(0.594756136957)*x[1]
-        arg[0,3,2,1]=(0.355862680641)*x[0]**o+(0.134261680432)*x[0]+(0.477798827075)*x[1]**o+(0.508452338499)*x[1]
-        arg[0,4,0,0]=(0.481974944781)*x[0]**o+(0.259271175551)*x[0]+(0.953827692515)*x[1]**o+(0.364160709544)*x[1]
-        arg[0,4,0,1]=(-0.316627315143)*x[0]**o+(-0.856616735533)*x[0]+(0.308508314695)*x[1]**o+(-0.677602758367)*x[1]
-        arg[0,4,1,0]=(-0.76069824745)*x[0]**o+(0.282351651183)*x[0]+(-0.15964276552)*x[1]**o+(-0.344276428838)*x[1]
-        arg[0,4,1,1]=(9.00669303738e-05)*x[0]**o+(0.948498888115)*x[0]+(0.690370267333)*x[1]**o+(0.619119188327)*x[1]
-        arg[0,4,2,0]=(0.957692561039)*x[0]**o+(-0.147005436631)*x[0]+(-0.177840574215)*x[1]**o+(-0.28259452614)*x[1]
-        arg[0,4,2,1]=(-0.431771943451)*x[0]**o+(-0.158132166651)*x[0]+(-0.134385316147)*x[1]**o+(0.751243590835)*x[1]
-        arg[1,0,0,0]=(-0.816841420645)*x[0]**o+(0.55608373851)*x[0]+(-0.885838014201)*x[1]**o+(-0.467159163867)*x[1]
-        arg[1,0,0,1]=(-0.543361117401)*x[0]**o+(0.329490019675)*x[0]+(0.942703992489)*x[1]**o+(-0.261273838803)*x[1]
-        arg[1,0,1,0]=(0.865108106801)*x[0]**o+(-0.376972427024)*x[0]+(-0.0257304693919)*x[1]**o+(0.694210909726)*x[1]
-        arg[1,0,1,1]=(0.428354498121)*x[0]**o+(0.962704601892)*x[0]+(-0.442636806139)*x[1]**o+(0.424724924149)*x[1]
-        arg[1,0,2,0]=(-0.157277242299)*x[0]**o+(0.487588443251)*x[0]+(-0.813089096341)*x[1]**o+(0.0406316718829)*x[1]
-        arg[1,0,2,1]=(0.345322702588)*x[0]**o+(0.224429042659)*x[0]+(-0.24109926586)*x[1]**o+(0.433141241931)*x[1]
-        arg[1,1,0,0]=(0.956901263519)*x[0]**o+(0.48418062914)*x[0]+(0.14089030013)*x[1]**o+(-0.492352201717)*x[1]
-        arg[1,1,0,1]=(-0.679781695411)*x[0]**o+(0.29857196636)*x[0]+(-0.234968984185)*x[1]**o+(0.114575919411)*x[1]
-        arg[1,1,1,0]=(0.488378272934)*x[0]**o+(-0.358508327343)*x[0]+(-0.337958846849)*x[1]**o+(0.189303452912)*x[1]
-        arg[1,1,1,1]=(-0.506993859574)*x[0]**o+(-0.682478021258)*x[0]+(-0.540344338899)*x[1]**o+(0.366965535976)*x[1]
-        arg[1,1,2,0]=(-0.681151638572)*x[0]**o+(0.790837550009)*x[0]+(-0.810785716023)*x[1]**o+(-0.00739097962416)*x[1]
-        arg[1,1,2,1]=(-0.355290573677)*x[0]**o+(-0.263294580108)*x[0]+(0.10469018402)*x[1]**o+(-0.650388283116)*x[1]
-        arg[1,2,0,0]=(0.906212689905)*x[0]**o+(-0.673956103538)*x[0]+(0.305335278934)*x[1]**o+(-0.0805949628719)*x[1]
-        arg[1,2,0,1]=(-0.98311373852)*x[0]**o+(-0.165316704542)*x[0]+(0.197637770603)*x[1]**o+(0.647989184342)*x[1]
-        arg[1,2,1,0]=(0.415990736251)*x[0]**o+(-0.710476520822)*x[0]+(0.791512786296)*x[1]**o+(-0.10853188742)*x[1]
-        arg[1,2,1,1]=(0.04337234954)*x[0]**o+(0.595650094449)*x[0]+(0.228098665648)*x[1]**o+(-0.868930899722)*x[1]
-        arg[1,2,2,0]=(-0.791842482688)*x[0]**o+(-0.611246387621)*x[0]+(0.0504978789412)*x[1]**o+(0.624626300694)*x[1]
-        arg[1,2,2,1]=(0.0207375595263)*x[0]**o+(0.560638072838)*x[0]+(0.44126312508)*x[1]**o+(0.169151353084)*x[1]
-        arg[1,3,0,0]=(-0.0512069089279)*x[0]**o+(0.51110271913)*x[0]+(0.0785633458626)*x[1]**o+(0.836821453174)*x[1]
-        arg[1,3,0,1]=(0.185737468851)*x[0]**o+(0.516071031227)*x[0]+(0.0995388802342)*x[1]**o+(0.25527909092)*x[1]
-        arg[1,3,1,0]=(0.318240681435)*x[0]**o+(-0.442725217398)*x[0]+(0.533066616909)*x[1]**o+(0.679570707339)*x[1]
-        arg[1,3,1,1]=(0.353367397644)*x[0]**o+(-0.396487189861)*x[0]+(-0.117773711001)*x[1]**o+(0.885897675293)*x[1]
-        arg[1,3,2,0]=(-0.647645988694)*x[0]**o+(-0.755258662164)*x[0]+(0.288300257472)*x[1]**o+(0.505342385389)*x[1]
-        arg[1,3,2,1]=(0.000781386924262)*x[0]**o+(0.190244787656)*x[0]+(0.589388834071)*x[1]**o+(0.669705413859)*x[1]
-        arg[1,4,0,0]=(0.320107896841)*x[0]**o+(0.673508197912)*x[0]+(0.667026895874)*x[1]**o+(-0.818578971562)*x[1]
-        arg[1,4,0,1]=(-0.226755915796)*x[0]**o+(0.71800207991)*x[0]+(0.850490212043)*x[1]**o+(0.261708964138)*x[1]
-        arg[1,4,1,0]=(-0.0147350282361)*x[0]**o+(0.743889536542)*x[0]+(-0.898802067607)*x[1]**o+(0.711589170571)*x[1]
-        arg[1,4,1,1]=(-0.816145493818)*x[0]**o+(0.405931568806)*x[0]+(0.159156576579)*x[1]**o+(0.143576116984)*x[1]
-        arg[1,4,2,0]=(0.994791165013)*x[0]**o+(0.65054901122)*x[0]+(0.039218059733)*x[1]**o+(-0.662978657934)*x[1]
-        arg[1,4,2,1]=(-0.792277825616)*x[0]**o+(-0.257224872111)*x[0]+(-0.244502392787)*x[1]**o+(-0.276042189495)*x[1]
-        arg[2,0,0,0]=(0.133211578016)*x[0]**o+(0.10029141733)*x[0]+(-0.52480547182)*x[1]**o+(0.814652707336)*x[1]
-        arg[2,0,0,1]=(0.836429340685)*x[0]**o+(-0.837709322969)*x[0]+(-0.442953015462)*x[1]**o+(-0.984757344044)*x[1]
-        arg[2,0,1,0]=(0.893738853578)*x[0]**o+(-0.238050980408)*x[0]+(-0.913668527302)*x[1]**o+(0.895136777323)*x[1]
-        arg[2,0,1,1]=(-0.0457361766611)*x[0]**o+(0.414814798208)*x[0]+(-0.57261759439)*x[1]**o+(-0.358969048076)*x[1]
-        arg[2,0,2,0]=(-0.320394419991)*x[0]**o+(-0.990129952721)*x[0]+(0.890888895016)*x[1]**o+(0.241063301452)*x[1]
-        arg[2,0,2,1]=(-0.604164679932)*x[0]**o+(-0.598939404114)*x[0]+(-0.606633388454)*x[1]**o+(-0.666879580873)*x[1]
-        arg[2,1,0,0]=(0.68515547034)*x[0]**o+(0.892247437859)*x[0]+(0.642003383991)*x[1]**o+(0.569240970392)*x[1]
-        arg[2,1,0,1]=(0.918713108587)*x[0]**o+(0.865547962284)*x[0]+(0.517952260633)*x[1]**o+(-0.307334010857)*x[1]
-        arg[2,1,1,0]=(0.353382468404)*x[0]**o+(-0.542718692644)*x[0]+(-0.957182863451)*x[1]**o+(-0.889352632225)*x[1]
-        arg[2,1,1,1]=(0.505185847817)*x[0]**o+(-0.71137143775)*x[0]+(0.853785404375)*x[1]**o+(-0.731028307335)*x[1]
-        arg[2,1,2,0]=(-0.0805774093876)*x[0]**o+(0.949831911897)*x[0]+(0.511009248375)*x[1]**o+(-0.0192710206538)*x[1]
-        arg[2,1,2,1]=(-0.987709862593)*x[0]**o+(-0.536077508064)*x[0]+(-0.0726882784026)*x[1]**o+(-0.27275457372)*x[1]
-        arg[2,2,0,0]=(0.271001953238)*x[0]**o+(0.0446246860776)*x[0]+(0.103657462724)*x[1]**o+(0.359900072694)*x[1]
-        arg[2,2,0,1]=(0.613460277623)*x[0]**o+(-0.23324730519)*x[0]+(0.188458167579)*x[1]**o+(-0.574087648909)*x[1]
-        arg[2,2,1,0]=(-0.787444207567)*x[0]**o+(0.143772612473)*x[0]+(-0.720451072166)*x[1]**o+(0.936819171338)*x[1]
-        arg[2,2,1,1]=(-0.219701379296)*x[0]**o+(-0.343100221149)*x[0]+(-0.972737482064)*x[1]**o+(-0.614208415137)*x[1]
-        arg[2,2,2,0]=(0.0292070295438)*x[0]**o+(-0.694263454424)*x[0]+(0.188064440036)*x[1]**o+(0.0901763471697)*x[1]
-        arg[2,2,2,1]=(0.407629585245)*x[0]**o+(-0.745619322197)*x[0]+(0.949044983116)*x[1]**o+(-0.316057288128)*x[1]
-        arg[2,3,0,0]=(0.124212182643)*x[0]**o+(0.621703244759)*x[0]+(-0.0592136772296)*x[1]**o+(0.571981450786)*x[1]
-        arg[2,3,0,1]=(-0.683989210442)*x[0]**o+(-0.318774594157)*x[0]+(0.850235115277)*x[1]**o+(-0.871075179838)*x[1]
-        arg[2,3,1,0]=(0.478657634044)*x[0]**o+(-0.43702074673)*x[0]+(0.535572237843)*x[1]**o+(0.22354698199)*x[1]
-        arg[2,3,1,1]=(0.0391087869133)*x[0]**o+(0.765140505702)*x[0]+(-0.66279875624)*x[1]**o+(-0.41964006149)*x[1]
-        arg[2,3,2,0]=(-0.11123799186)*x[0]**o+(0.533398540082)*x[0]+(-0.931488199925)*x[1]**o+(-0.83080969281)*x[1]
-        arg[2,3,2,1]=(-0.138259313941)*x[0]**o+(-0.508937684332)*x[0]+(0.583603445711)*x[1]**o+(-0.0782724872225)*x[1]
-        arg[2,4,0,0]=(-0.316223936951)*x[0]**o+(0.329776289164)*x[0]+(-0.692491559115)*x[1]**o+(0.814572730294)*x[1]
-        arg[2,4,0,1]=(0.74890960681)*x[0]**o+(-0.79167945549)*x[0]+(0.175328119487)*x[1]**o+(-0.253003240064)*x[1]
-        arg[2,4,1,0]=(0.657827625141)*x[0]**o+(-0.268878597055)*x[0]+(0.247374286921)*x[1]**o+(0.414500041415)*x[1]
-        arg[2,4,1,1]=(-0.187587046202)*x[0]**o+(-0.594983066039)*x[0]+(-0.203784406879)*x[1]**o+(0.122237566739)*x[1]
-        arg[2,4,2,0]=(0.671210794607)*x[0]**o+(0.886706498415)*x[0]+(-0.368997114212)*x[1]**o+(0.0418311781187)*x[1]
-        arg[2,4,2,1]=(-0.272424416171)*x[0]**o+(-0.537477247783)*x[0]+(0.0405655834868)*x[1]**o+(-0.179684833703)*x[1]
-        arg[3,0,0,0]=(0.457602964193)*x[0]**o+(-0.186625111516)*x[0]+(-0.75244105343)*x[1]**o+(-0.278893445377)*x[1]
-        arg[3,0,0,1]=(-0.690378721784)*x[0]**o+(0.0157608350188)*x[0]+(-0.203765434813)*x[1]**o+(0.69771096957)*x[1]
-        arg[3,0,1,0]=(-0.884824688493)*x[0]**o+(0.26613451569)*x[0]+(0.226081491639)*x[1]**o+(0.597724298389)*x[1]
-        arg[3,0,1,1]=(0.0372124540969)*x[0]**o+(-0.420242551812)*x[0]+(-0.625683613012)*x[1]**o+(0.279682305563)*x[1]
-        arg[3,0,2,0]=(-0.570873872458)*x[0]**o+(-0.82361574923)*x[0]+(0.970204188337)*x[1]**o+(-0.242725003569)*x[1]
-        arg[3,0,2,1]=(-0.714826095124)*x[0]**o+(-0.334939427182)*x[0]+(-0.730058530908)*x[1]**o+(0.287148154312)*x[1]
-        arg[3,1,0,0]=(0.164234307274)*x[0]**o+(-0.388849394356)*x[0]+(0.391518896617)*x[1]**o+(0.00142750126236)*x[1]
-        arg[3,1,0,1]=(-0.327700781196)*x[0]**o+(0.0442604682565)*x[0]+(-0.683834466536)*x[1]**o+(-0.665567774985)*x[1]
-        arg[3,1,1,0]=(0.135979934041)*x[0]**o+(-0.822614011173)*x[0]+(-0.946061768113)*x[1]**o+(-0.585442102671)*x[1]
-        arg[3,1,1,1]=(0.235568769871)*x[0]**o+(0.738233870703)*x[0]+(0.437750339594)*x[1]**o+(-0.44521724321)*x[1]
-        arg[3,1,2,0]=(0.449256898185)*x[0]**o+(-0.464211755196)*x[0]+(0.616886411002)*x[1]**o+(0.885500269963)*x[1]
-        arg[3,1,2,1]=(0.0851105760559)*x[0]**o+(0.888976499957)*x[0]+(0.0842441111314)*x[1]**o+(-0.366994083394)*x[1]
-        arg[3,2,0,0]=(0.77120050858)*x[0]**o+(0.354835584949)*x[0]+(0.406813878866)*x[1]**o+(-0.600042478179)*x[1]
-        arg[3,2,0,1]=(-0.747876879184)*x[0]**o+(0.527204926634)*x[0]+(0.134965492713)*x[1]**o+(0.497662739459)*x[1]
-        arg[3,2,1,0]=(0.367550591163)*x[0]**o+(-0.700608509353)*x[0]+(0.0737696587931)*x[1]**o+(-0.164466899816)*x[1]
-        arg[3,2,1,1]=(0.0908791429433)*x[0]**o+(-0.168468767791)*x[0]+(0.85978873292)*x[1]**o+(-0.785241412884)*x[1]
-        arg[3,2,2,0]=(-0.296455818292)*x[0]**o+(-0.0277004420512)*x[0]+(0.409183414933)*x[1]**o+(-0.879831945543)*x[1]
-        arg[3,2,2,1]=(0.971512010223)*x[0]**o+(-0.811249982262)*x[0]+(-0.846549204737)*x[1]**o+(0.689986186691)*x[1]
-        arg[3,3,0,0]=(-0.800235545702)*x[0]**o+(-0.796021196346)*x[0]+(-0.0660744375539)*x[1]**o+(-0.826632192842)*x[1]
-        arg[3,3,0,1]=(0.305678237361)*x[0]**o+(0.203936000462)*x[0]+(-0.583171879217)*x[1]**o+(0.924112859119)*x[1]
-        arg[3,3,1,0]=(-0.937148913762)*x[0]**o+(-0.172547991203)*x[0]+(0.928491154238)*x[1]**o+(-0.502876301351)*x[1]
-        arg[3,3,1,1]=(0.731413856616)*x[0]**o+(0.837213097155)*x[0]+(-0.650032764358)*x[1]**o+(0.96973961589)*x[1]
-        arg[3,3,2,0]=(-0.501994458598)*x[0]**o+(-0.705938508685)*x[0]+(0.664394117366)*x[1]**o+(0.692950029135)*x[1]
-        arg[3,3,2,1]=(-0.0948399323409)*x[0]**o+(-0.686744554674)*x[0]+(0.577765681583)*x[1]**o+(0.969310750204)*x[1]
-        arg[3,4,0,0]=(-0.484011788432)*x[0]**o+(-0.560744139846)*x[0]+(0.072097608773)*x[1]**o+(-0.103052228904)*x[1]
-        arg[3,4,0,1]=(-0.201158934695)*x[0]**o+(0.463105335811)*x[0]+(0.733365706682)*x[1]**o+(-0.330035241794)*x[1]
-        arg[3,4,1,0]=(0.252379277102)*x[0]**o+(-0.110596657969)*x[0]+(0.763687257878)*x[1]**o+(-0.345598371263)*x[1]
-        arg[3,4,1,1]=(0.0868412855617)*x[0]**o+(0.385098679406)*x[0]+(0.291487288978)*x[1]**o+(-0.112145846209)*x[1]
-        arg[3,4,2,0]=(-0.913724685255)*x[0]**o+(-0.0348735884313)*x[0]+(0.550688528861)*x[1]**o+(0.798394152329)*x[1]
-        arg[3,4,2,1]=(-0.92870523219)*x[0]**o+(0.177354002469)*x[0]+(0.350393765313)*x[1]**o+(-0.974997198741)*x[1]
-        ref[0,0,0,0]=(0.815821053922)/(o+1.)+(0.302879577355)
-        ref[0,0,0,1]=(-0.223824520603)/(o+1.)+(0.690659426687)
-        ref[0,0,1,0]=(-0.501731412433)/(o+1.)+(0.0102964270565)
-        ref[0,0,1,1]=(-0.731540589167)/(o+1.)+(0.348284469462)
-        ref[0,0,2,0]=(-0.121523684012)/(o+1.)+(0.184348962759)
-        ref[0,0,2,1]=(-0.4529485642)/(o+1.)+(-0.830798233026)
-        ref[0,1,0,0]=(-0.244463483906)/(o+1.)+(0.226296188971)
-        ref[0,1,0,1]=(1.2203272116)/(o+1.)+(-0.693494218115)
-        ref[0,1,1,0]=(-0.55576623697)/(o+1.)+(-0.273623989583)
-        ref[0,1,1,1]=(-0.316836585171)/(o+1.)+(-0.836135387777)
-        ref[0,1,2,0]=(-0.133732244387)/(o+1.)+(-0.875415201605)
-        ref[0,1,2,1]=(-0.281487947177)/(o+1.)+(-0.668499911274)
-        ref[0,2,0,0]=(-0.896781862729)/(o+1.)+(-0.0225848820142)
-        ref[0,2,0,1]=(-1.70326692867)/(o+1.)+(-0.1693379432)
-        ref[0,2,1,0]=(-0.00084798161079)/(o+1.)+(0.343359275275)
-        ref[0,2,1,1]=(0.609064372767)/(o+1.)+(-0.369639962727)
-        ref[0,2,2,0]=(-0.759042888708)/(o+1.)+(0.321708104548)
-        ref[0,2,2,1]=(0.760967724015)/(o+1.)+(0.0268897973234)
-        ref[0,3,0,0]=(-1.3915636468)/(o+1.)+(-0.230755462281)
-        ref[0,3,0,1]=(-0.416449082748)/(o+1.)+(0.480436529329)
-        ref[0,3,1,0]=(-0.238553658798)/(o+1.)+(-0.029283546006)
-        ref[0,3,1,1]=(-1.36933302275)/(o+1.)+(-0.221757606321)
-        ref[0,3,2,0]=(-0.872999155991)/(o+1.)+(0.69296766968)
-        ref[0,3,2,1]=(0.833661507716)/(o+1.)+(0.321357009466)
-        ref[0,4,0,0]=(1.4358026373)/(o+1.)+(0.311715942547)
-        ref[0,4,0,1]=(-0.00811900044778)/(o+1.)+(-0.76710974695)
-        ref[0,4,1,0]=(-0.92034101297)/(o+1.)+(-0.0309623888275)
-        ref[0,4,1,1]=(0.690460334263)/(o+1.)+(0.783809038221)
-        ref[0,4,2,0]=(0.779851986824)/(o+1.)+(-0.214799981386)
-        ref[0,4,2,1]=(-0.566157259598)/(o+1.)+(0.296555712092)
-        ref[1,0,0,0]=(-1.70267943485)/(o+1.)+(0.0444622873215)
-        ref[1,0,0,1]=(0.399342875087)/(o+1.)+(0.0341080904363)
-        ref[1,0,1,0]=(0.839377637409)/(o+1.)+(0.158619241351)
-        ref[1,0,1,1]=(-0.0142823080176)/(o+1.)+(0.693714763021)
-        ref[1,0,2,0]=(-0.97036633864)/(o+1.)+(0.264110057567)
-        ref[1,0,2,1]=(0.104223436728)/(o+1.)+(0.328785142295)
-        ref[1,1,0,0]=(1.09779156365)/(o+1.)+(-0.00408578628855)
-        ref[1,1,0,1]=(-0.914750679597)/(o+1.)+(0.206573942886)
-        ref[1,1,1,0]=(0.150419426085)/(o+1.)+(-0.0846024372156)
-        ref[1,1,1,1]=(-1.04733819847)/(o+1.)+(-0.157756242641)
-        ref[1,1,2,0]=(-1.49193735459)/(o+1.)+(0.391723285192)
-        ref[1,1,2,1]=(-0.250600389657)/(o+1.)+(-0.456841431612)
-        ref[1,2,0,0]=(1.21154796884)/(o+1.)+(-0.377275533205)
-        ref[1,2,0,1]=(-0.785475967917)/(o+1.)+(0.2413362399)
-        ref[1,2,1,0]=(1.20750352255)/(o+1.)+(-0.409504204121)
-        ref[1,2,1,1]=(0.271471015188)/(o+1.)+(-0.136640402636)
-        ref[1,2,2,0]=(-0.741344603747)/(o+1.)+(0.00668995653618)
-        ref[1,2,2,1]=(0.462000684606)/(o+1.)+(0.364894712961)
-        ref[1,3,0,0]=(0.0273564369347)/(o+1.)+(0.673962086152)
-        ref[1,3,0,1]=(0.285276349085)/(o+1.)+(0.385675061073)
-        ref[1,3,1,0]=(0.851307298344)/(o+1.)+(0.118422744971)
-        ref[1,3,1,1]=(0.235593686643)/(o+1.)+(0.244705242716)
-        ref[1,3,2,0]=(-0.359345731222)/(o+1.)+(-0.124958138388)
-        ref[1,3,2,1]=(0.590170220995)/(o+1.)+(0.429975100757)
-        ref[1,4,0,0]=(0.987134792715)/(o+1.)+(-0.0725353868253)
-        ref[1,4,0,1]=(0.623734296247)/(o+1.)+(0.489855522024)
-        ref[1,4,1,0]=(-0.913537095843)/(o+1.)+(0.727739353556)
-        ref[1,4,1,1]=(-0.656988917238)/(o+1.)+(0.274753842895)
-        ref[1,4,2,0]=(1.03400922475)/(o+1.)+(-0.00621482335664)
-        ref[1,4,2,1]=(-1.0367802184)/(o+1.)+(-0.266633530803)
-        ref[2,0,0,0]=(-0.391593893803)/(o+1.)+(0.457472062333)
-        ref[2,0,0,1]=(0.393476325223)/(o+1.)+(-0.911233333506)
-        ref[2,0,1,0]=(-0.0199296737245)/(o+1.)+(0.328542898457)
-        ref[2,0,1,1]=(-0.618353771051)/(o+1.)+(0.0279228750664)
-        ref[2,0,2,0]=(0.570494475025)/(o+1.)+(-0.374533325635)
-        ref[2,0,2,1]=(-1.21079806839)/(o+1.)+(-0.632909492494)
-        ref[2,1,0,0]=(1.32715885433)/(o+1.)+(0.730744204126)
-        ref[2,1,0,1]=(1.43666536922)/(o+1.)+(0.279106975714)
-        ref[2,1,1,0]=(-0.603800395047)/(o+1.)+(-0.716035662434)
-        ref[2,1,1,1]=(1.35897125219)/(o+1.)+(-0.721199872542)
-        ref[2,1,2,0]=(0.430431838988)/(o+1.)+(0.465280445622)
-        ref[2,1,2,1]=(-1.060398141)/(o+1.)+(-0.404416040892)
-        ref[2,2,0,0]=(0.374659415961)/(o+1.)+(0.202262379386)
-        ref[2,2,0,1]=(0.801918445202)/(o+1.)+(-0.403667477049)
-        ref[2,2,1,0]=(-1.50789527973)/(o+1.)+(0.540295891905)
-        ref[2,2,1,1]=(-1.19243886136)/(o+1.)+(-0.478654318143)
-        ref[2,2,2,0]=(0.21727146958)/(o+1.)+(-0.302043553627)
-        ref[2,2,2,1]=(1.35667456836)/(o+1.)+(-0.530838305162)
-        ref[2,3,0,0]=(0.0649985054133)/(o+1.)+(0.596842347772)
-        ref[2,3,0,1]=(0.166245904835)/(o+1.)+(-0.594924886997)
-        ref[2,3,1,0]=(1.01422987189)/(o+1.)+(-0.10673688237)
-        ref[2,3,1,1]=(-0.623689969327)/(o+1.)+(0.172750222106)
-        ref[2,3,2,0]=(-1.04272619178)/(o+1.)+(-0.148705576364)
-        ref[2,3,2,1]=(0.445344131771)/(o+1.)+(-0.293605085777)
-        ref[2,4,0,0]=(-1.00871549607)/(o+1.)+(0.572174509729)
-        ref[2,4,0,1]=(0.924237726297)/(o+1.)+(-0.522341347777)
-        ref[2,4,1,0]=(0.905201912063)/(o+1.)+(0.0728107221801)
-        ref[2,4,1,1]=(-0.391371453081)/(o+1.)+(-0.23637274965)
-        ref[2,4,2,0]=(0.302213680395)/(o+1.)+(0.464268838267)
-        ref[2,4,2,1]=(-0.231858832685)/(o+1.)+(-0.358581040743)
-        ref[3,0,0,0]=(-0.294838089237)/(o+1.)+(-0.232759278447)
-        ref[3,0,0,1]=(-0.894144156597)/(o+1.)+(0.356735902294)
-        ref[3,0,1,0]=(-0.658743196854)/(o+1.)+(0.43192940704)
-        ref[3,0,1,1]=(-0.588471158915)/(o+1.)+(-0.0702801231243)
-        ref[3,0,2,0]=(0.399330315879)/(o+1.)+(-0.5331703764)
-        ref[3,0,2,1]=(-1.44488462603)/(o+1.)+(-0.0238956364351)
-        ref[3,1,0,0]=(0.555753203891)/(o+1.)+(-0.193710946547)
-        ref[3,1,0,1]=(-1.01153524773)/(o+1.)+(-0.310653653364)
-        ref[3,1,1,0]=(-0.810081834072)/(o+1.)+(-0.704028056922)
-        ref[3,1,1,1]=(0.673319109465)/(o+1.)+(0.146508313746)
-        ref[3,1,2,0]=(1.06614330919)/(o+1.)+(0.210644257384)
-        ref[3,1,2,1]=(0.169354687187)/(o+1.)+(0.260991208281)
-        ref[3,2,0,0]=(1.17801438745)/(o+1.)+(-0.122603446615)
-        ref[3,2,0,1]=(-0.612911386471)/(o+1.)+(0.512433833047)
-        ref[3,2,1,0]=(0.441320249956)/(o+1.)+(-0.432537704584)
-        ref[3,2,1,1]=(0.950667875863)/(o+1.)+(-0.476855090338)
-        ref[3,2,2,0]=(0.112727596641)/(o+1.)+(-0.453766193797)
-        ref[3,2,2,1]=(0.124962805486)/(o+1.)+(-0.0606318977858)
-        ref[3,3,0,0]=(-0.866309983256)/(o+1.)+(-0.811326694594)
-        ref[3,3,0,1]=(-0.277493641857)/(o+1.)+(0.564024429791)
-        ref[3,3,1,0]=(-0.00865775952435)/(o+1.)+(-0.337712146277)
-        ref[3,3,1,1]=(0.0813810922576)/(o+1.)+(0.903476356523)
-        ref[3,3,2,0]=(0.162399658768)/(o+1.)+(-0.00649423977499)
-        ref[3,3,2,1]=(0.482925749243)/(o+1.)+(0.141283097765)
-        ref[3,4,0,0]=(-0.411914179659)/(o+1.)+(-0.331898184375)
-        ref[3,4,0,1]=(0.532206771987)/(o+1.)+(0.0665350470083)
-        ref[3,4,1,0]=(1.01606653498)/(o+1.)+(-0.228097514616)
-        ref[3,4,1,1]=(0.37832857454)/(o+1.)+(0.136476416599)
-        ref[3,4,2,0]=(-0.363036156393)/(o+1.)+(0.381760281949)
-        ref[3,4,2,1]=(-0.578311466877)/(o+1.)+(-0.398821598136)
-      else:
-        arg[0,0,0,0]=(0.860676142569)*x[0]**o+(-0.156046991162)*x[0]+(-0.0462355579656)*x[1]**o+(0.70842844961)*x[1]+(0.617299123548)*x[2]**o+(-0.865174329565)*x[2]
-        arg[0,0,0,1]=(-0.284308060865)*x[0]**o+(0.788848579389)*x[0]+(0.629321669042)*x[1]**o+(0.066637849809)*x[1]+(0.114152381009)*x[2]**o+(-0.466687745846)*x[2]
-        arg[0,0,1,0]=(-0.690823198517)*x[0]**o+(-0.141510804573)*x[0]+(0.969978831967)*x[1]**o+(0.307926382658)*x[1]+(0.710373009094)*x[2]**o+(-0.494828315907)*x[2]
-        arg[0,0,1,1]=(0.953361413913)*x[0]**o+(-0.103742611936)*x[0]+(0.63934955554)*x[1]**o+(-0.0778114476564)*x[1]+(-0.221185122698)*x[2]**o+(-0.287432047404)*x[2]
-        arg[0,0,2,0]=(0.378306380558)*x[0]**o+(-0.117743922672)*x[0]+(-0.0606376630208)*x[1]**o+(-0.59439189505)*x[1]+(0.10507320657)*x[2]**o+(0.856411423067)*x[2]
-        arg[0,0,2,1]=(0.777734672779)*x[0]**o+(0.286956002007)*x[0]+(-0.931811626583)*x[1]**o+(-0.806626659661)*x[1]+(-0.420390949282)*x[2]**o+(0.854080006578)*x[2]
-        arg[0,1,0,0]=(0.403426948964)*x[0]**o+(0.707099419296)*x[0]+(0.593137130456)*x[1]**o+(-0.757560771598)*x[1]+(0.369632217934)*x[2]**o+(-0.348480285397)*x[2]
-        arg[0,1,0,1]=(-0.491454189782)*x[0]**o+(0.547276640565)*x[0]+(-0.955045542708)*x[1]**o+(0.529989872531)*x[1]+(-0.161086874799)*x[2]**o+(-0.181810040724)*x[2]
-        arg[0,1,1,0]=(0.46282177104)*x[0]**o+(0.254346937251)*x[0]+(0.824797105546)*x[1]**o+(-0.449979162246)*x[1]+(0.22307703071)*x[2]**o+(-0.592072135668)*x[2]
-        arg[0,1,1,1]=(0.329230675141)*x[0]**o+(-0.733034697145)*x[0]+(0.762195609347)*x[1]**o+(-0.639097591362)*x[1]+(0.765354927905)*x[2]**o+(0.313571493405)*x[2]
-        arg[0,1,2,0]=(0.3874127072)*x[0]**o+(-0.0569429727569)*x[0]+(-0.203121198708)*x[1]**o+(-0.736379499164)*x[1]+(-0.980629375436)*x[2]**o+(0.955793660048)*x[2]
-        arg[0,1,2,1]=(-0.656255469455)*x[0]**o+(0.711904808699)*x[0]+(-0.363253678399)*x[1]**o+(0.921875000807)*x[1]+(0.686394816431)*x[2]**o+(0.818500716704)*x[2]
-        arg[0,2,0,0]=(-0.931555347846)*x[0]**o+(-0.249573400742)*x[0]+(0.617166716404)*x[1]**o+(-0.929587051108)*x[1]+(0.830928715064)*x[2]**o+(0.461637431613)*x[2]
-        arg[0,2,0,1]=(-0.8677719945)*x[0]**o+(-0.176892180445)*x[0]+(-0.881887456464)*x[1]**o+(0.923355677513)*x[1]+(-0.978544668453)*x[2]**o+(-0.427009384287)*x[2]
-        arg[0,2,1,0]=(-0.0707937433084)*x[0]**o+(-0.872892141393)*x[0]+(0.606234798381)*x[1]**o+(0.935845076847)*x[1]+(-0.97559052201)*x[2]**o+(-0.31138518209)*x[2]
-        arg[0,2,1,1]=(0.450210597865)*x[0]**o+(0.842939440378)*x[0]+(-0.333422856577)*x[1]**o+(-0.492809679443)*x[1]+(-0.254728278043)*x[2]**o+(-0.0702767077952)*x[2]
-        arg[0,2,2,0]=(-0.250463216903)*x[0]**o+(0.756576293763)*x[0]+(0.596902629953)*x[1]**o+(-0.887080794947)*x[1]+(0.027319948008)*x[2]**o+(0.552496782776)*x[2]
-        arg[0,2,2,1]=(-0.0883102140591)*x[0]**o+(0.988759610101)*x[0]+(-0.208152392508)*x[1]**o+(0.938999108564)*x[1]+(-0.773883611417)*x[2]**o+(0.653413306338)*x[2]
-        arg[0,3,0,0]=(-0.399644211606)*x[0]**o+(-0.978595776407)*x[0]+(0.99454650986)*x[1]**o+(0.143313668715)*x[1]+(0.328592750842)*x[2]**o+(-0.958804581101)*x[2]
-        arg[0,3,0,1]=(-0.0667966885959)*x[0]**o+(0.332653574704)*x[0]+(-0.762025150916)*x[1]**o+(0.895044013374)*x[1]+(0.627013843362)*x[2]**o+(-0.682392672232)*x[2]
-        arg[0,3,1,0]=(-0.834479453773)*x[0]**o+(-0.375930859033)*x[0]+(0.129507966861)*x[1]**o+(0.995364280408)*x[1]+(-0.126081191572)*x[2]**o+(0.0344262779491)*x[2]
-        arg[0,3,1,1]=(0.796952126596)*x[0]**o+(0.310562243091)*x[0]+(0.854548623788)*x[1]**o+(-0.719100537284)*x[1]+(-0.236266783438)*x[2]**o+(-0.646647129209)*x[2]
-        arg[0,3,2,0]=(0.844073289115)*x[0]**o+(0.423300345347)*x[0]+(0.126354796852)*x[1]**o+(0.180372257606)*x[1]+(-0.564712722146)*x[2]**o+(0.466988430183)*x[2]
-        arg[0,3,2,1]=(0.228775824367)*x[0]**o+(0.40701094831)*x[0]+(0.223101054593)*x[1]**o+(-0.894937905383)*x[1]+(0.425392942773)*x[2]**o+(-0.844238667169)*x[2]
-        arg[0,4,0,0]=(0.3363848738)*x[0]**o+(-0.985327066062)*x[0]+(-0.107847971678)*x[1]**o+(0.596121801488)*x[1]+(0.655589801663)*x[2]**o+(-0.729650731949)*x[2]
-        arg[0,4,0,1]=(-0.176435679219)*x[0]**o+(0.382558711725)*x[0]+(-0.658212492337)*x[1]**o+(0.584904267612)*x[1]+(-0.534684876705)*x[2]**o+(-0.441262614915)*x[2]
-        arg[0,4,1,0]=(0.281301737167)*x[0]**o+(-0.642486274791)*x[0]+(0.420753884869)*x[1]**o+(0.482835955591)*x[1]+(0.169431333788)*x[2]**o+(0.922841193825)*x[2]
-        arg[0,4,1,1]=(0.235812590604)*x[0]**o+(-0.446233855396)*x[0]+(0.465015868566)*x[1]**o+(-0.780441276888)*x[1]+(0.513632761351)*x[2]**o+(-0.0576482811678)*x[2]
-        arg[0,4,2,0]=(-0.617245874462)*x[0]**o+(0.183661473466)*x[0]+(-0.711148911239)*x[1]**o+(0.125228991306)*x[1]+(-0.500218603959)*x[2]**o+(0.70597577229)*x[2]
-        arg[0,4,2,1]=(0.56330304117)*x[0]**o+(0.631284986628)*x[0]+(-0.222485175776)*x[1]**o+(0.0639235737228)*x[1]+(-0.276613868747)*x[2]**o+(0.407488564857)*x[2]
-        arg[1,0,0,0]=(0.159032146915)*x[0]**o+(-0.716040989693)*x[0]+(0.410709172613)*x[1]**o+(-0.527667963652)*x[1]+(-0.160515156497)*x[2]**o+(0.294448742382)*x[2]
-        arg[1,0,0,1]=(0.941139035835)*x[0]**o+(0.707410046094)*x[0]+(-0.172095410803)*x[1]**o+(-0.967035204304)*x[1]+(0.870395272646)*x[2]**o+(0.830870986802)*x[2]
-        arg[1,0,1,0]=(0.731015285309)*x[0]**o+(0.450519048697)*x[0]+(-0.484568714675)*x[1]**o+(0.454201220108)*x[1]+(-0.161850459099)*x[2]**o+(-0.617463263396)*x[2]
-        arg[1,0,1,1]=(-0.958841628847)*x[0]**o+(-0.0667813400021)*x[0]+(0.659551780082)*x[1]**o+(0.514424015304)*x[1]+(0.920583608125)*x[2]**o+(0.89564899572)*x[2]
-        arg[1,0,2,0]=(0.0482630479817)*x[0]**o+(0.911326064322)*x[0]+(-0.275134422092)*x[1]**o+(0.216495232459)*x[1]+(-0.973586171195)*x[2]**o+(0.275694688611)*x[2]
-        arg[1,0,2,1]=(0.769733688293)*x[0]**o+(0.771829018421)*x[0]+(-0.22434549079)*x[1]**o+(0.131966885817)*x[1]+(-0.109424705679)*x[2]**o+(-0.369585136379)*x[2]
-        arg[1,1,0,0]=(-0.0160180905877)*x[0]**o+(-0.268260755267)*x[0]+(-0.213940412022)*x[1]**o+(0.665987805279)*x[1]+(0.968879828017)*x[2]**o+(-0.449435538913)*x[2]
-        arg[1,1,0,1]=(0.361055351825)*x[0]**o+(0.463294478488)*x[0]+(0.692655668486)*x[1]**o+(0.151415573206)*x[1]+(0.902280461515)*x[2]**o+(0.690926934073)*x[2]
-        arg[1,1,1,0]=(0.591998602299)*x[0]**o+(0.516482177709)*x[0]+(-0.298511909182)*x[1]**o+(0.281818071894)*x[1]+(0.207089953979)*x[2]**o+(0.917004722388)*x[2]
-        arg[1,1,1,1]=(0.479832408236)*x[0]**o+(-0.643374914165)*x[0]+(0.370844835249)*x[1]**o+(0.560458499239)*x[1]+(-0.865852319767)*x[2]**o+(0.560572130123)*x[2]
-        arg[1,1,2,0]=(0.709293526635)*x[0]**o+(-0.388347223155)*x[0]+(0.60797330273)*x[1]**o+(-0.847624783099)*x[1]+(-0.0476367756382)*x[2]**o+(0.637841988478)*x[2]
-        arg[1,1,2,1]=(0.343458045422)*x[0]**o+(-0.764451449587)*x[0]+(-0.444256801761)*x[1]**o+(0.385385997921)*x[1]+(-0.722095136671)*x[2]**o+(0.677852473207)*x[2]
-        arg[1,2,0,0]=(0.710372887392)*x[0]**o+(-0.628494679119)*x[0]+(-0.59513507905)*x[1]**o+(-0.527824874295)*x[1]+(-0.611189170789)*x[2]**o+(0.090651976806)*x[2]
-        arg[1,2,0,1]=(-0.980160150289)*x[0]**o+(-0.0286097581598)*x[0]+(-0.407906975953)*x[1]**o+(-0.319422835951)*x[1]+(-0.489787310147)*x[2]**o+(-0.694386341354)*x[2]
-        arg[1,2,1,0]=(-0.416867224376)*x[0]**o+(0.631406877489)*x[0]+(-0.93939195942)*x[1]**o+(0.266858600313)*x[1]+(0.982173221612)*x[2]**o+(0.112901364617)*x[2]
-        arg[1,2,1,1]=(0.412001480348)*x[0]**o+(0.624281489887)*x[0]+(0.306558457751)*x[1]**o+(0.95864454419)*x[1]+(0.299175627954)*x[2]**o+(-0.0531991017347)*x[2]
-        arg[1,2,2,0]=(-0.0342261621741)*x[0]**o+(-0.587245704486)*x[0]+(-0.976407464107)*x[1]**o+(-0.0157215030322)*x[1]+(-0.529857472095)*x[2]**o+(-0.419626697673)*x[2]
-        arg[1,2,2,1]=(-0.681737301037)*x[0]**o+(-0.980349460702)*x[0]+(-0.839469631393)*x[1]**o+(-0.412417814907)*x[1]+(0.451717398947)*x[2]**o+(0.962167685987)*x[2]
-        arg[1,3,0,0]=(0.283453965913)*x[0]**o+(0.204445403787)*x[0]+(-0.806150376236)*x[1]**o+(0.122187094069)*x[1]+(-0.679291367964)*x[2]**o+(-0.875353966489)*x[2]
-        arg[1,3,0,1]=(0.115974475175)*x[0]**o+(0.701473497654)*x[0]+(0.298012120304)*x[1]**o+(0.567597901709)*x[1]+(0.721211831476)*x[2]**o+(-0.255389572775)*x[2]
-        arg[1,3,1,0]=(0.393891431092)*x[0]**o+(-0.563382537925)*x[0]+(0.974194829106)*x[1]**o+(0.659688559688)*x[1]+(-0.394266143828)*x[2]**o+(0.875266200191)*x[2]
-        arg[1,3,1,1]=(-0.456930975697)*x[0]**o+(0.334590626231)*x[0]+(-0.227176883362)*x[1]**o+(0.76775699173)*x[1]+(0.839371167887)*x[2]**o+(-0.155473916326)*x[2]
-        arg[1,3,2,0]=(0.346761981787)*x[0]**o+(-0.625121706322)*x[0]+(0.340655154638)*x[1]**o+(-0.0646323546999)*x[1]+(-0.211347402677)*x[2]**o+(0.233661266919)*x[2]
-        arg[1,3,2,1]=(-0.086096644956)*x[0]**o+(-0.845623653209)*x[0]+(-0.0866093549957)*x[1]**o+(-0.467286349011)*x[1]+(-0.0621455515357)*x[2]**o+(0.164779979085)*x[2]
-        arg[1,4,0,0]=(0.42022138208)*x[0]**o+(0.136984451355)*x[0]+(0.664770979086)*x[1]**o+(-0.537368896193)*x[1]+(0.874256726691)*x[2]**o+(-0.58614100824)*x[2]
-        arg[1,4,0,1]=(-0.805860964792)*x[0]**o+(0.758511304044)*x[0]+(-0.574686863541)*x[1]**o+(-0.410873101247)*x[1]+(0.932015171551)*x[2]**o+(0.439987195351)*x[2]
-        arg[1,4,1,0]=(-0.515187049123)*x[0]**o+(0.308078404334)*x[0]+(0.940959771774)*x[1]**o+(0.466269579691)*x[1]+(-0.190617144843)*x[2]**o+(0.738172533582)*x[2]
-        arg[1,4,1,1]=(0.283326036586)*x[0]**o+(-0.693631747857)*x[0]+(0.478965080319)*x[1]**o+(-0.0465389396775)*x[1]+(-0.72886286959)*x[2]**o+(-0.9346424149)*x[2]
-        arg[1,4,2,0]=(-0.71539766285)*x[0]**o+(0.361875987071)*x[0]+(0.905270678876)*x[1]**o+(-0.675024725702)*x[1]+(0.378259473658)*x[2]**o+(0.0520394226711)*x[2]
-        arg[1,4,2,1]=(-0.319600525923)*x[0]**o+(0.0449956327134)*x[0]+(0.707418658521)*x[1]**o+(0.210137972776)*x[1]+(-0.767860728688)*x[2]**o+(0.232340825758)*x[2]
-        arg[2,0,0,0]=(0.92844243651)*x[0]**o+(0.956810319504)*x[0]+(0.762198571194)*x[1]**o+(-0.363107634629)*x[1]+(0.0750393505254)*x[2]**o+(-0.43573581041)*x[2]
-        arg[2,0,0,1]=(-0.193613121742)*x[0]**o+(0.440027871839)*x[0]+(-0.607905506346)*x[1]**o+(0.894840354958)*x[1]+(0.601279436178)*x[2]**o+(0.46806560762)*x[2]
-        arg[2,0,1,0]=(0.370901517567)*x[0]**o+(-0.738769905647)*x[0]+(-0.698692979664)*x[1]**o+(-0.286318840335)*x[1]+(-0.879367315688)*x[2]**o+(-0.959912132991)*x[2]
-        arg[2,0,1,1]=(-0.278939533774)*x[0]**o+(0.183795552426)*x[0]+(-0.341943551466)*x[1]**o+(0.491847260291)*x[1]+(-0.141030429384)*x[2]**o+(0.256287855539)*x[2]
-        arg[2,0,2,0]=(-0.135930357616)*x[0]**o+(-0.382515749949)*x[0]+(-0.43030873581)*x[1]**o+(-0.0211891159981)*x[1]+(-0.377865120002)*x[2]**o+(0.109942325029)*x[2]
-        arg[2,0,2,1]=(0.288827267201)*x[0]**o+(-0.907970544468)*x[0]+(-0.622258309213)*x[1]**o+(-0.763273879894)*x[1]+(0.438715013671)*x[2]**o+(-0.93873140988)*x[2]
-        arg[2,1,0,0]=(-0.963487369906)*x[0]**o+(0.899051290288)*x[0]+(-0.268257956548)*x[1]**o+(-0.229092726584)*x[1]+(0.427024112314)*x[2]**o+(0.0435138095138)*x[2]
-        arg[2,1,0,1]=(0.89996926597)*x[0]**o+(-0.206500706229)*x[0]+(-0.191769123095)*x[1]**o+(-0.348924155298)*x[1]+(-0.74405653776)*x[2]**o+(0.0724946691864)*x[2]
-        arg[2,1,1,0]=(0.338170397901)*x[0]**o+(-0.725761081242)*x[0]+(-0.45928272676)*x[1]**o+(0.795535326783)*x[1]+(-0.316443844644)*x[2]**o+(-0.844205401892)*x[2]
-        arg[2,1,1,1]=(0.509131757681)*x[0]**o+(0.319175801535)*x[0]+(-0.807058926279)*x[1]**o+(0.63928269996)*x[1]+(0.219324073432)*x[2]**o+(0.351217517434)*x[2]
-        arg[2,1,2,0]=(-0.534090721611)*x[0]**o+(0.27146424294)*x[0]+(0.250778065716)*x[1]**o+(-0.901322994167)*x[1]+(-0.57588768699)*x[2]**o+(0.405043003456)*x[2]
-        arg[2,1,2,1]=(0.101699906269)*x[0]**o+(0.361960318738)*x[0]+(0.278974923593)*x[1]**o+(-0.336289352037)*x[1]+(-0.677353936215)*x[2]**o+(0.0726793347753)*x[2]
-        arg[2,2,0,0]=(-0.734961283823)*x[0]**o+(-0.593268557578)*x[0]+(0.310896858565)*x[1]**o+(-0.482326137951)*x[1]+(0.886472957099)*x[2]**o+(-0.0403563476581)*x[2]
-        arg[2,2,0,1]=(-0.166071725106)*x[0]**o+(-0.454245686818)*x[0]+(-0.892674508991)*x[1]**o+(0.581554190251)*x[1]+(0.995323654908)*x[2]**o+(-0.0336714433349)*x[2]
-        arg[2,2,1,0]=(-0.437491848099)*x[0]**o+(-0.195039508213)*x[0]+(0.822011086215)*x[1]**o+(0.771044412863)*x[1]+(0.697534261252)*x[2]**o+(0.666510217725)*x[2]
-        arg[2,2,1,1]=(-0.529148276275)*x[0]**o+(-0.093016460024)*x[0]+(0.663641010649)*x[1]**o+(0.940439359843)*x[1]+(0.754151159716)*x[2]**o+(0.852349310591)*x[2]
-        arg[2,2,2,0]=(0.859523244682)*x[0]**o+(0.704825125128)*x[0]+(0.221832129598)*x[1]**o+(0.573940020456)*x[1]+(0.935673751591)*x[2]**o+(0.23235170475)*x[2]
-        arg[2,2,2,1]=(0.0359047473512)*x[0]**o+(0.836816935443)*x[0]+(0.6411608273)*x[1]**o+(0.291526953908)*x[1]+(0.735564515362)*x[2]**o+(-0.465781621769)*x[2]
-        arg[2,3,0,0]=(0.352740040216)*x[0]**o+(0.54224020581)*x[0]+(0.681356174115)*x[1]**o+(-0.97589117869)*x[1]+(0.880755719884)*x[2]**o+(0.562259403362)*x[2]
-        arg[2,3,0,1]=(0.563708471054)*x[0]**o+(0.525523219723)*x[0]+(0.423068360374)*x[1]**o+(0.29239160821)*x[1]+(0.874360368885)*x[2]**o+(0.922265851359)*x[2]
-        arg[2,3,1,0]=(0.694309936305)*x[0]**o+(-0.409224769672)*x[0]+(-0.748835864803)*x[1]**o+(-0.21841534641)*x[1]+(0.497059735624)*x[2]**o+(-0.753234694148)*x[2]
-        arg[2,3,1,1]=(0.109706510352)*x[0]**o+(-0.0160720403678)*x[0]+(0.888778080744)*x[1]**o+(-0.938692716268)*x[1]+(0.529262951478)*x[2]**o+(0.481430680214)*x[2]
-        arg[2,3,2,0]=(0.65368659132)*x[0]**o+(-0.988176396392)*x[0]+(0.989546739333)*x[1]**o+(0.23178715846)*x[1]+(-0.557645438328)*x[2]**o+(0.063228513147)*x[2]
-        arg[2,3,2,1]=(0.286316141831)*x[0]**o+(0.668138463424)*x[0]+(-0.950430671533)*x[1]**o+(-0.978012107187)*x[1]+(-0.107618382464)*x[2]**o+(-0.684084421276)*x[2]
-        arg[2,4,0,0]=(-0.63510659432)*x[0]**o+(0.264242935995)*x[0]+(0.960647241624)*x[1]**o+(0.58483379289)*x[1]+(0.7255270271)*x[2]**o+(-0.476151653985)*x[2]
-        arg[2,4,0,1]=(-0.221953908705)*x[0]**o+(-0.994143786509)*x[0]+(-0.359525421944)*x[1]**o+(0.533966197668)*x[1]+(-0.29739666047)*x[2]**o+(-0.0824204124466)*x[2]
-        arg[2,4,1,0]=(-0.447043625871)*x[0]**o+(-0.904485300564)*x[0]+(0.26179071803)*x[1]**o+(0.437320719437)*x[1]+(-0.56501466909)*x[2]**o+(0.129662379166)*x[2]
-        arg[2,4,1,1]=(0.259809756366)*x[0]**o+(0.446788808701)*x[0]+(-0.143702396023)*x[1]**o+(0.879531090832)*x[1]+(0.410047703156)*x[2]**o+(0.755750006468)*x[2]
-        arg[2,4,2,0]=(-0.730881615951)*x[0]**o+(-0.357110792705)*x[0]+(0.552722654621)*x[1]**o+(0.965623848242)*x[1]+(0.555951256049)*x[2]**o+(0.259021370764)*x[2]
-        arg[2,4,2,1]=(-0.465880467377)*x[0]**o+(-0.840984822217)*x[0]+(0.665817382039)*x[1]**o+(-0.390932961529)*x[1]+(-0.0857939888315)*x[2]**o+(-0.712185917672)*x[2]
-        arg[3,0,0,0]=(0.710281429223)*x[0]**o+(-0.723903639057)*x[0]+(-0.267455509065)*x[1]**o+(-0.731684188612)*x[1]+(-0.287442751768)*x[2]**o+(-0.266871749947)*x[2]
-        arg[3,0,0,1]=(0.460723870663)*x[0]**o+(0.0502154310124)*x[0]+(-0.260241363193)*x[1]**o+(-0.516473088648)*x[1]+(-0.925984113039)*x[2]**o+(-0.0297616649018)*x[2]
-        arg[3,0,1,0]=(0.523186648278)*x[0]**o+(0.937042293367)*x[0]+(0.811740916657)*x[1]**o+(0.0544805175015)*x[1]+(-0.543484279955)*x[2]**o+(0.244714198306)*x[2]
-        arg[3,0,1,1]=(-0.69212630167)*x[0]**o+(0.868708276385)*x[0]+(0.473290025811)*x[1]**o+(0.137043602294)*x[1]+(-0.19291314113)*x[2]**o+(-0.755147036188)*x[2]
-        arg[3,0,2,0]=(0.0472638421122)*x[0]**o+(0.403135551064)*x[0]+(0.290083188289)*x[1]**o+(0.96419060449)*x[1]+(-0.240544184077)*x[2]**o+(-0.183028108529)*x[2]
-        arg[3,0,2,1]=(0.354253383908)*x[0]**o+(0.628816528774)*x[0]+(0.588194429756)*x[1]**o+(-0.852128734457)*x[1]+(-0.84774778925)*x[2]**o+(0.796310123562)*x[2]
-        arg[3,1,0,0]=(0.528880495806)*x[0]**o+(-0.74176589205)*x[0]+(-0.447816938371)*x[1]**o+(0.611297564802)*x[1]+(0.742134198482)*x[2]**o+(-0.625840664202)*x[2]
-        arg[3,1,0,1]=(0.419633746259)*x[0]**o+(-0.247742274578)*x[0]+(0.302328885303)*x[1]**o+(-0.629854480502)*x[1]+(0.493919301288)*x[2]**o+(0.902910119017)*x[2]
-        arg[3,1,1,0]=(0.509160481656)*x[0]**o+(-0.388129364133)*x[0]+(-0.595185230598)*x[1]**o+(-0.289592836865)*x[1]+(0.615663908134)*x[2]**o+(-0.560687711511)*x[2]
-        arg[3,1,1,1]=(0.647782473568)*x[0]**o+(0.935840881725)*x[0]+(0.440348212287)*x[1]**o+(-0.489797988572)*x[1]+(0.766592631787)*x[2]**o+(0.217399649246)*x[2]
-        arg[3,1,2,0]=(0.64944026906)*x[0]**o+(0.487409918475)*x[0]+(-0.0322210593784)*x[1]**o+(0.281311337861)*x[1]+(-0.694252407571)*x[2]**o+(-0.659678386121)*x[2]
-        arg[3,1,2,1]=(0.806357278285)*x[0]**o+(0.419430374567)*x[0]+(-0.0525796600116)*x[1]**o+(-0.556886341914)*x[1]+(-0.288209814683)*x[2]**o+(-0.309696771495)*x[2]
-        arg[3,2,0,0]=(-0.300806388527)*x[0]**o+(-0.39334416908)*x[0]+(0.000711617540648)*x[1]**o+(-0.618539958736)*x[1]+(0.0574098223152)*x[2]**o+(-0.351595384168)*x[2]
-        arg[3,2,0,1]=(-0.898675793892)*x[0]**o+(0.904479958277)*x[0]+(0.0781945046018)*x[1]**o+(-0.0461053392586)*x[1]+(0.844798127031)*x[2]**o+(-0.82306838709)*x[2]
-        arg[3,2,1,0]=(-0.268742335093)*x[0]**o+(-0.532639944208)*x[0]+(0.0101227109551)*x[1]**o+(-0.438312865518)*x[1]+(0.104288648246)*x[2]**o+(-0.115669027311)*x[2]
-        arg[3,2,1,1]=(0.639871308792)*x[0]**o+(0.260847628514)*x[0]+(-0.455670719167)*x[1]**o+(0.210619035618)*x[1]+(-0.401809068119)*x[2]**o+(-0.0625194517026)*x[2]
-        arg[3,2,2,0]=(-0.713684223829)*x[0]**o+(0.214281604766)*x[0]+(-0.60152592324)*x[1]**o+(0.249807228316)*x[1]+(-0.939395078261)*x[2]**o+(-0.519744396388)*x[2]
-        arg[3,2,2,1]=(-0.340588993443)*x[0]**o+(-0.0165543854997)*x[0]+(-0.366479789338)*x[1]**o+(0.316347630987)*x[1]+(-0.457055798679)*x[2]**o+(-0.132368055553)*x[2]
-        arg[3,3,0,0]=(-0.745211736715)*x[0]**o+(0.0106787556884)*x[0]+(-0.448180943446)*x[1]**o+(0.694982281891)*x[1]+(0.924431258221)*x[2]**o+(-0.841633806168)*x[2]
-        arg[3,3,0,1]=(0.368054364362)*x[0]**o+(0.19288251992)*x[0]+(0.565854068035)*x[1]**o+(0.747534544754)*x[1]+(0.473165789569)*x[2]**o+(-0.59399986706)*x[2]
-        arg[3,3,1,0]=(-0.142707671693)*x[0]**o+(0.177095043535)*x[0]+(-0.348946846847)*x[1]**o+(-0.545430013244)*x[1]+(-0.671405653136)*x[2]**o+(-0.531699969702)*x[2]
-        arg[3,3,1,1]=(0.783201055631)*x[0]**o+(0.899495042323)*x[0]+(0.117802924059)*x[1]**o+(-0.277400900172)*x[1]+(-0.351268362305)*x[2]**o+(0.52756480897)*x[2]
-        arg[3,3,2,0]=(-0.866758006698)*x[0]**o+(0.293139875238)*x[0]+(-0.318394231317)*x[1]**o+(-0.783701622124)*x[1]+(-0.95137399655)*x[2]**o+(-0.474198736639)*x[2]
-        arg[3,3,2,1]=(0.0428398560619)*x[0]**o+(-0.970180601102)*x[0]+(-0.753897573393)*x[1]**o+(-0.0873352699251)*x[1]+(-0.131440532574)*x[2]**o+(0.875241605077)*x[2]
-        arg[3,4,0,0]=(0.32399493643)*x[0]**o+(0.67295092524)*x[0]+(-0.29221110671)*x[1]**o+(0.118066079866)*x[1]+(-0.566541154667)*x[2]**o+(-0.806367499079)*x[2]
-        arg[3,4,0,1]=(0.278776399755)*x[0]**o+(0.472327826919)*x[0]+(-0.956871861949)*x[1]**o+(0.109236874792)*x[1]+(-0.494095116883)*x[2]**o+(-0.194313775518)*x[2]
-        arg[3,4,1,0]=(0.650920037415)*x[0]**o+(0.977698516929)*x[0]+(-0.0730777837998)*x[1]**o+(-0.576543152032)*x[1]+(0.781481934657)*x[2]**o+(-0.389328840554)*x[2]
-        arg[3,4,1,1]=(-0.798341529522)*x[0]**o+(-0.630245234712)*x[0]+(-0.444550323489)*x[1]**o+(-0.539189248295)*x[1]+(-0.904964423673)*x[2]**o+(-0.611560462796)*x[2]
-        arg[3,4,2,0]=(-0.392991417685)*x[0]**o+(0.313599061567)*x[0]+(-0.215747337398)*x[1]**o+(-0.310316872476)*x[1]+(-0.269452617785)*x[2]**o+(0.684353794645)*x[2]
-        arg[3,4,2,1]=(-0.586668781403)*x[0]**o+(-0.0711284937177)*x[0]+(0.408273850302)*x[1]**o+(0.761860299288)*x[1]+(0.902079242449)*x[2]**o+(0.70161017722)*x[2]
-        ref[0,0,0,0]=(1.43173970815)/(o+1.)+(-0.156396435558)
-        ref[0,0,0,1]=(0.459165989186)/(o+1.)+(0.194399341676)
-        ref[0,0,1,0]=(0.989528642545)/(o+1.)+(-0.164206368911)
-        ref[0,0,1,1]=(1.37152584676)/(o+1.)+(-0.234493053498)
-        ref[0,0,2,0]=(0.422741924108)/(o+1.)+(0.0721378026728)
-        ref[0,0,2,1]=(-0.574467903086)/(o+1.)+(0.167204674462)
-        ref[0,1,0,0]=(1.36619629735)/(o+1.)+(-0.19947081885)
-        ref[0,1,0,1]=(-1.60758660729)/(o+1.)+(0.447728236186)
-        ref[0,1,1,0]=(1.5106959073)/(o+1.)+(-0.393852180331)
-        ref[0,1,1,1]=(1.85678121239)/(o+1.)+(-0.529280397551)
-        ref[0,1,2,0]=(-0.796337866944)/(o+1.)+(0.0812355940636)
-        ref[0,1,2,1]=(-0.333114331422)/(o+1.)+(1.22614026311)
-        ref[0,2,0,0]=(0.516540083621)/(o+1.)+(-0.358761510118)
-        ref[0,2,0,1]=(-2.72820411942)/(o+1.)+(0.15972705639)
-        ref[0,2,1,0]=(-0.440149466937)/(o+1.)+(-0.124216123318)
-        ref[0,2,1,1]=(-0.137940536755)/(o+1.)+(0.13992652657)
-        ref[0,2,2,0]=(0.373759361058)/(o+1.)+(0.210996140796)
-        ref[0,2,2,1]=(-1.07034621798)/(o+1.)+(1.2905860125)
-        ref[0,3,0,0]=(0.923495049095)/(o+1.)+(-0.897043344396)
-        ref[0,3,0,1]=(-0.20180799615)/(o+1.)+(0.272652457923)
-        ref[0,3,1,0]=(-0.831052678484)/(o+1.)+(0.326929849662)
-        ref[0,3,1,1]=(1.41523396695)/(o+1.)+(-0.5275927117)
-        ref[0,3,2,0]=(0.405715363821)/(o+1.)+(0.535330516568)
-        ref[0,3,2,1]=(0.877269821733)/(o+1.)+(-0.666082812121)
-        ref[0,4,0,0]=(0.884126703786)/(o+1.)+(-0.559427998262)
-        ref[0,4,0,1]=(-1.36933304826)/(o+1.)+(0.263100182211)
-        ref[0,4,1,0]=(0.871486955825)/(o+1.)+(0.381595437312)
-        ref[0,4,1,1]=(1.21446122052)/(o+1.)+(-0.642161706726)
-        ref[0,4,2,0]=(-1.82861338966)/(o+1.)+(0.507433118531)
-        ref[0,4,2,1]=(0.0642039966469)/(o+1.)+(0.551348562604)
-        ref[1,0,0,0]=(0.40922616303)/(o+1.)+(-0.474630105482)
-        ref[1,0,0,1]=(1.63943889768)/(o+1.)+(0.285622914296)
-        ref[1,0,1,0]=(0.0845961115353)/(o+1.)+(0.143628502705)
-        ref[1,0,1,1]=(0.62129375936)/(o+1.)+(0.671645835511)
-        ref[1,0,2,0]=(-1.2004575453)/(o+1.)+(0.701757992696)
-        ref[1,0,2,1]=(0.435963491825)/(o+1.)+(0.26710538393)
-        ref[1,1,0,0]=(0.738921325407)/(o+1.)+(-0.0258542444502)
-        ref[1,1,0,1]=(1.95599148183)/(o+1.)+(0.652818492883)
-        ref[1,1,1,0]=(0.500576647095)/(o+1.)+(0.857652485995)
-        ref[1,1,1,1]=(-0.0151750762821)/(o+1.)+(0.238827857598)
-        ref[1,1,2,0]=(1.26963005373)/(o+1.)+(-0.299065008888)
-        ref[1,1,2,1]=(-0.82289389301)/(o+1.)+(0.14939351077)
-        ref[1,2,0,0]=(-0.495951362447)/(o+1.)+(-0.532833788304)
-        ref[1,2,0,1]=(-1.87785443639)/(o+1.)+(-0.521209467732)
-        ref[1,2,1,0]=(-0.374085962184)/(o+1.)+(0.505583421209)
-        ref[1,2,1,1]=(1.01773556605)/(o+1.)+(0.764863466171)
-        ref[1,2,2,0]=(-1.54049109838)/(o+1.)+(-0.511296952595)
-        ref[1,2,2,1]=(-1.06948953348)/(o+1.)+(-0.215299794811)
-        ref[1,3,0,0]=(-1.20198777829)/(o+1.)+(-0.274360734317)
-        ref[1,3,0,1]=(1.13519842695)/(o+1.)+(0.506840913294)
-        ref[1,3,1,0]=(0.973820116369)/(o+1.)+(0.485786110977)
-        ref[1,3,1,1]=(0.155263308828)/(o+1.)+(0.473436850817)
-        ref[1,3,2,0]=(0.476069733748)/(o+1.)+(-0.228046397052)
-        ref[1,3,2,1]=(-0.234851551487)/(o+1.)+(-0.574065011567)
-        ref[1,4,0,0]=(1.95924908786)/(o+1.)+(-0.493262726539)
-        ref[1,4,0,1]=(-0.448532656782)/(o+1.)+(0.393812699074)
-        ref[1,4,1,0]=(0.235155577808)/(o+1.)+(0.756260258803)
-        ref[1,4,1,1]=(0.0334282473144)/(o+1.)+(-0.837406551217)
-        ref[1,4,2,0]=(0.568132489684)/(o+1.)+(-0.13055465798)
-        ref[1,4,2,1]=(-0.380042596089)/(o+1.)+(0.243737215624)
-        ref[2,0,0,0]=(1.76568035823)/(o+1.)+(0.0789834372326)
-        ref[2,0,0,1]=(-0.20023919191)/(o+1.)+(0.901466917208)
-        ref[2,0,1,0]=(-1.20715877778)/(o+1.)+(-0.992500439486)
-        ref[2,0,1,1]=(-0.761913514624)/(o+1.)+(0.465965334128)
-        ref[2,0,2,0]=(-0.944104213428)/(o+1.)+(-0.146881270459)
-        ref[2,0,2,1]=(0.105283971659)/(o+1.)+(-1.30498791712)
-        ref[2,1,0,0]=(-0.804721214141)/(o+1.)+(0.356736186609)
-        ref[2,1,0,1]=(-0.0358563948854)/(o+1.)+(-0.24146509617)
-        ref[2,1,1,0]=(-0.437556173502)/(o+1.)+(-0.387215578175)
-        ref[2,1,1,1]=(-0.0786030951662)/(o+1.)+(0.654838009465)
-        ref[2,1,2,0]=(-0.859200342885)/(o+1.)+(-0.112407873885)
-        ref[2,1,2,1]=(-0.296679106354)/(o+1.)+(0.0491751507381)
-        ref[2,2,0,0]=(0.462408531841)/(o+1.)+(-0.557975521593)
-        ref[2,2,0,1]=(-0.0634225791893)/(o+1.)+(0.0468185300489)
-        ref[2,2,1,0]=(1.08205349937)/(o+1.)+(0.621257561187)
-        ref[2,2,1,1]=(0.88864389409)/(o+1.)+(0.849886105205)
-        ref[2,2,2,0]=(2.01702912587)/(o+1.)+(0.755558425167)
-        ref[2,2,2,1]=(1.41263009001)/(o+1.)+(0.331281133791)
-        ref[2,3,0,0]=(1.91485193421)/(o+1.)+(0.0643042152414)
-        ref[2,3,0,1]=(1.86113720031)/(o+1.)+(0.870090339646)
-        ref[2,3,1,0]=(0.442533807126)/(o+1.)+(-0.690437405116)
-        ref[2,3,1,1]=(1.52774754257)/(o+1.)+(-0.236667038211)
-        ref[2,3,2,0]=(1.08558789233)/(o+1.)+(-0.346580362392)
-        ref[2,3,2,1]=(-0.771732912166)/(o+1.)+(-0.49697903252)
-        ref[2,4,0,0]=(1.0510676744)/(o+1.)+(0.18646253745)
-        ref[2,4,0,1]=(-0.878875991119)/(o+1.)+(-0.271299000644)
-        ref[2,4,1,0]=(-0.75026757693)/(o+1.)+(-0.168751100981)
-        ref[2,4,1,1]=(0.526155063499)/(o+1.)+(1.041034953)
-        ref[2,4,2,0]=(0.377792294719)/(o+1.)+(0.433767213151)
-        ref[2,4,2,1]=(0.114142925831)/(o+1.)+(-0.972051850709)
-        ref[3,0,0,0]=(0.15538316839)/(o+1.)+(-0.861229788808)
-        ref[3,0,0,1]=(-0.725501605569)/(o+1.)+(-0.248009661269)
-        ref[3,0,1,0]=(0.791443284981)/(o+1.)+(0.618118504587)
-        ref[3,0,1,1]=(-0.411749416988)/(o+1.)+(0.125302421245)
-        ref[3,0,2,0]=(0.0968028463245)/(o+1.)+(0.592149023513)
-        ref[3,0,2,1]=(0.0947000244134)/(o+1.)+(0.286498958939)
-        ref[3,1,0,0]=(0.823197755916)/(o+1.)+(-0.378154495725)
-        ref[3,1,0,1]=(1.21588193285)/(o+1.)+(0.0126566819682)
-        ref[3,1,1,0]=(0.529639159192)/(o+1.)+(-0.619204956255)
-        ref[3,1,1,1]=(1.85472331764)/(o+1.)+(0.3317212712)
-        ref[3,1,2,0]=(-0.0770331978898)/(o+1.)+(0.0545214351076)
-        ref[3,1,2,1]=(0.46556780359)/(o+1.)+(-0.223576369421)
-        ref[3,2,0,0]=(-0.242684948671)/(o+1.)+(-0.681739755992)
-        ref[3,2,0,1]=(0.0243168377401)/(o+1.)+(0.0176531159642)
-        ref[3,2,1,0]=(-0.154330975892)/(o+1.)+(-0.543310918519)
-        ref[3,2,1,1]=(-0.217608478494)/(o+1.)+(0.204473606215)
-        ref[3,2,2,0]=(-2.25460522533)/(o+1.)+(-0.0278277816531)
-        ref[3,2,2,1]=(-1.16412458146)/(o+1.)+(0.0837125949668)
-        ref[3,3,0,0]=(-0.26896142194)/(o+1.)+(-0.0679863842941)
-        ref[3,3,0,1]=(1.40707422197)/(o+1.)+(0.173208598807)
-        ref[3,3,1,0]=(-1.16306017168)/(o+1.)+(-0.450017469706)
-        ref[3,3,1,1]=(0.549735617385)/(o+1.)+(0.57482947556)
-        ref[3,3,2,0]=(-2.13652623456)/(o+1.)+(-0.482380241762)
-        ref[3,3,2,1]=(-0.842498249905)/(o+1.)+(-0.0911371329748)
-        ref[3,4,0,0]=(-0.534757324947)/(o+1.)+(-0.00767524698684)
-        ref[3,4,0,1]=(-1.17219057908)/(o+1.)+(0.193625463097)
-        ref[3,4,1,0]=(1.35932418827)/(o+1.)+(0.00591326217154)
-        ref[3,4,1,1]=(-2.14785627668)/(o+1.)+(-0.890497472901)
-        ref[3,4,2,0]=(-0.878191372868)/(o+1.)+(0.343817991868)
-        ref[3,4,2,1]=(0.723684311348)/(o+1.)+(0.696170991395)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      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.729700679932)*x[0]+(-1.38329769179)*x[1]
-        ref=(0.329728333821)/(o+1.)+(-0.491662672839)
-      else:
-        arg=(-1.75076012766)*x[0]+(-0.0862990889349)*x[1]+(0.637429232833)*x[2]
-        ref=(-0.577517867896)/(o+1.)+(-0.311056057931)
-      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 the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(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]=(1.0296233191)*x[0]+(-0.347985432388)*x[1]
-        arg[1]=(-0.182082548052)*x[0]+(0.114822539064)*x[1]
-        ref[0]=(0.876900301573)/(o+1.)+(-0.0976312074308)
-        ref[1]=(-1.09276229827)/(o+1.)+(0.512751144643)
-      else:
-        arg[0]=(0.390938934986)*x[0]+(-0.17813109236)*x[1]+(0.92611177061)*x[2]
-        arg[1]=(0.169562781554)*x[0]+(-0.149625135256)*x[1]+(0.357445984273)*x[2]
-        ref[0]=(1.07308269316)/(o+1.)+(0.0329184600363)
-        ref[1]=(-1.07527269336)/(o+1.)+(0.726328161966)
-      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_ReducedSolution_rank2(self):
-      """
-      tests integral of rank 2 Data on the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.798668686601)*x[0]+(-0.502017718729)*x[1]
-        arg[0,1]=(-0.682368031728)*x[0]+(-0.915048032379)*x[1]
-        arg[0,2]=(-0.0237771508029)*x[0]+(0.177441262563)*x[1]
-        arg[0,3]=(0.135600942216)*x[0]+(0.496697614771)*x[1]
-        arg[0,4]=(0.495272681631)*x[0]+(-0.457599050745)*x[1]
-        arg[1,0]=(-0.252415627225)*x[0]+(-0.820872546406)*x[1]
-        arg[1,1]=(-0.183362696688)*x[0]+(-0.721277471492)*x[1]
-        arg[1,2]=(0.401101418876)*x[0]+(0.0483185737314)*x[1]
-        arg[1,3]=(0.251246583055)*x[0]+(-0.837901564153)*x[1]
-        arg[1,4]=(0.2984760032)*x[0]+(0.0504569221307)*x[1]
-        arg[2,0]=(1.18468310151)*x[0]+(-0.545612792222)*x[1]
-        arg[2,1]=(-1.08451540544)*x[0]+(0.820927137753)*x[1]
-        arg[2,2]=(0.85435600905)*x[0]+(-0.309819803422)*x[1]
-        arg[2,3]=(-0.184148030844)*x[0]+(0.978315441698)*x[1]
-        arg[2,4]=(1.36943188922)*x[0]+(-1.3176984733)*x[1]
-        arg[3,0]=(0.42189213134)*x[0]+(1.23097633986)*x[1]
-        arg[3,1]=(0.0409353425792)*x[0]+(-1.15555830367)*x[1]
-        arg[3,2]=(0.557942070395)*x[0]+(-0.591659744114)*x[1]
-        arg[3,3]=(-1.07432449167)*x[0]+(-0.665475086161)*x[1]
-        arg[3,4]=(-1.00421972544)*x[0]+(1.16737316771)*x[1]
-        ref[0,0]=(-0.400434079596)/(o+1.)+(-0.450126162867)
-        ref[0,1]=(-1.35836659237)/(o+1.)+(-0.11952473587)
-        ref[0,2]=(0.154775934077)/(o+1.)+(-0.000555911158727)
-        ref[0,3]=(-0.177525502969)/(o+1.)+(0.404912029978)
-        ref[0,4]=(1.00122501632)/(o+1.)+(-0.481775692719)
-        ref[1,0]=(-1.37507083806)/(o+1.)+(0.150891332214)
-        ref[1,1]=(-1.37429063854)/(o+1.)+(0.234825235182)
-        ref[1,2]=(1.30069236547)/(o+1.)+(-0.425636186429)
-        ref[1,3]=(-0.414658324515)/(o+1.)+(-0.0859983282917)
-        ref[1,4]=(0.757097138678)/(o+1.)+(-0.204082106674)
-        ref[2,0]=(1.09244584366)/(o+1.)+(-0.226687767185)
-        ref[2,1]=(0.109481169277)/(o+1.)+(-0.186534718481)
-        ref[2,2]=(0.587125473152)/(o+1.)+(-0.0212946337622)
-        ref[2,3]=(0.00878695699842)/(o+1.)+(0.392690226928)
-        ref[2,4]=(0.306810290785)/(o+1.)+(-0.127538437433)
-        ref[3,0]=(0.317826050636)/(o+1.)+(0.667521210281)
-        ref[3,1]=(-0.276254182573)/(o+1.)+(-0.419184389261)
-        ref[3,2]=(-0.753831729065)/(o+1.)+(0.360057027673)
-        ref[3,3]=(-1.40505001195)/(o+1.)+(-0.167374782943)
-        ref[3,4]=(0.53112066724)/(o+1.)+(-0.183983612488)
-      else:
-        arg[0,0]=(1.54447818842)*x[0]+(-0.560568590939)*x[1]+(-1.33749549019)*x[2]
-        arg[0,1]=(-0.535544800192)*x[0]+(-0.732513980801)*x[1]+(0.309855030569)*x[2]
-        arg[0,2]=(-0.45251604551)*x[0]+(-0.0933932995351)*x[1]+(-0.465724167794)*x[2]
-        arg[0,3]=(0.10344455234)*x[0]+(-0.0451254971766)*x[1]+(-1.39912042607)*x[2]
-        arg[0,4]=(0.617585449939)*x[0]+(1.27357810776)*x[1]+(-0.840161322302)*x[2]
-        arg[1,0]=(0.650274355535)*x[0]+(0.547805408891)*x[1]+(0.314350326062)*x[2]
-        arg[1,1]=(0.697200474806)*x[0]+(0.558681734309)*x[1]+(-0.0277936766536)*x[2]
-        arg[1,2]=(-0.508578328229)*x[0]+(-0.513894226666)*x[1]+(-0.528417418023)*x[2]
-        arg[1,3]=(-1.50391414876)*x[0]+(0.174080260823)*x[1]+(-1.48528641514)*x[2]
-        arg[1,4]=(0.859470776434)*x[0]+(-0.121348493404)*x[1]+(1.69796346547)*x[2]
-        arg[2,0]=(1.00593912049)*x[0]+(0.794254020467)*x[1]+(-1.02770358461)*x[2]
-        arg[2,1]=(-1.64586076188)*x[0]+(-0.83927167526)*x[1]+(-1.13088449805)*x[2]
-        arg[2,2]=(0.0628777004357)*x[0]+(-1.27316091149)*x[1]+(0.417655047748)*x[2]
-        arg[2,3]=(-1.43661526118)*x[0]+(0.0676042964527)*x[1]+(0.174947572442)*x[2]
-        arg[2,4]=(0.504347051098)*x[0]+(-1.62976096707)*x[1]+(0.61579932957)*x[2]
-        arg[3,0]=(1.05212645875)*x[0]+(-1.10517003049)*x[1]+(0.902242097595)*x[2]
-        arg[3,1]=(-0.997611854104)*x[0]+(-1.53611378293)*x[1]+(0.322835276897)*x[2]
-        arg[3,2]=(-0.815135194015)*x[0]+(0.357734619962)*x[1]+(0.684966069635)*x[2]
-        arg[3,3]=(0.4545417685)*x[0]+(0.386262464083)*x[1]+(0.131414279708)*x[2]
-        arg[3,4]=(-0.222694646001)*x[0]+(-0.470499833621)*x[1]+(-0.593290862391)*x[2]
-        ref[0,0]=(-0.593803934901)/(o+1.)+(0.120109021094)
-        ref[0,1]=(0.0569115377867)/(o+1.)+(-0.507557644105)
-        ref[0,2]=(-0.202741590274)/(o+1.)+(-0.404445961283)
-        ref[0,3]=(-0.516888777015)/(o+1.)+(-0.411956296948)
-        ref[0,4]=(0.52292787417)/(o+1.)+(0.264037180616)
-        ref[1,0]=(-0.102685279742)/(o+1.)+(0.807557685115)
-        ref[1,1]=(1.44527264276)/(o+1.)+(-0.108592055148)
-        ref[1,2]=(-0.448767718864)/(o+1.)+(-0.551061127027)
-        ref[1,3]=(-1.19936004685)/(o+1.)+(-0.807880128113)
-        ref[1,4]=(1.09918755605)/(o+1.)+(0.668449096223)
-        ref[2,0]=(-0.873708007453)/(o+1.)+(0.823098781902)
-        ref[2,1]=(-1.9697776018)/(o+1.)+(-0.823119666698)
-        ref[2,2]=(0.598023292545)/(o+1.)+(-0.695325727928)
-        ref[2,3]=(-0.486077421455)/(o+1.)+(-0.353992985415)
-        ref[2,4]=(0.65037669171)/(o+1.)+(-0.579995639058)
-        ref[3,0]=(0.115401170876)/(o+1.)+(0.366898677493)
-        ref[3,1]=(-0.836209920174)/(o+1.)+(-0.68734021998)
-        ref[3,2]=(0.753819223079)/(o+1.)+(-0.263126863749)
-        ref[3,3]=(-0.75294945942)/(o+1.)+(0.862583985856)
-        ref[3,4]=(-1.44356156537)/(o+1.)+(0.0785381116785)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.409425595197)*x[0]+(-0.992427840513)*x[1]
-        arg[0,0,1]=(0.645693185569)*x[0]+(-1.38338827813)*x[1]
-        arg[0,1,0]=(0.838847764041)*x[0]+(-1.01358491173)*x[1]
-        arg[0,1,1]=(0.381938057912)*x[0]+(0.61979806953)*x[1]
-        arg[1,0,0]=(-1.36783302742)*x[0]+(-0.132422986617)*x[1]
-        arg[1,0,1]=(-0.137283745381)*x[0]+(0.633534018338)*x[1]
-        arg[1,1,0]=(0.0698189930006)*x[0]+(-1.45980415637)*x[1]
-        arg[1,1,1]=(-0.391725001578)*x[0]+(0.355258883756)*x[1]
-        arg[2,0,0]=(-0.596091494216)*x[0]+(-0.911870026464)*x[1]
-        arg[2,0,1]=(0.138007894626)*x[0]+(1.76859278751)*x[1]
-        arg[2,1,0]=(-0.791803431843)*x[0]+(-0.813170959331)*x[1]
-        arg[2,1,1]=(-1.05466714677)*x[0]+(-1.12822729059)*x[1]
-        arg[3,0,0]=(-0.417845531677)*x[0]+(1.13689234148)*x[1]
-        arg[3,0,1]=(-0.0323347813877)*x[0]+(1.14381520037)*x[1]
-        arg[3,1,0]=(0.639524393892)*x[0]+(0.864696525716)*x[1]
-        arg[3,1,1]=(0.593104139176)*x[0]+(0.812642260561)*x[1]
-        arg[4,0,0]=(-0.0580034066457)*x[0]+(0.802938738147)*x[1]
-        arg[4,0,1]=(0.722143376522)*x[0]+(0.843814429252)*x[1]
-        arg[4,1,0]=(-0.574057925551)*x[0]+(-0.298232158953)*x[1]
-        arg[4,1,1]=(0.422529038525)*x[0]+(0.841942812244)*x[1]
-        arg[5,0,0]=(1.90272013575)*x[0]+(-1.84811498267)*x[1]
-        arg[5,0,1]=(-1.52156314991)*x[0]+(-0.797833417606)*x[1]
-        arg[5,1,0]=(0.723748480291)*x[0]+(0.8667659268)*x[1]
-        arg[5,1,1]=(-0.70289499551)*x[0]+(-0.726595802952)*x[1]
-        ref[0,0,0]=(-1.1719312491)/(o+1.)+(-0.114961093303)
-        ref[0,0,1]=(0.229993657297)/(o+1.)+(-0.483844374927)
-        ref[0,1,0]=(-0.630442924796)/(o+1.)+(0.227852888553)
-        ref[0,1,1]=(-0.806392286115)/(o+1.)+(0.904064206778)
-        ref[1,0,0]=(-1.38312106397)/(o+1.)+(-0.0585674750338)
-        ref[1,0,1]=(0.595552955095)/(o+1.)+(-0.049651341069)
-        ref[1,1,0]=(-1.63606241234)/(o+1.)+(0.123038624483)
-        ref[1,1,1]=(-0.340463713286)/(o+1.)+(0.151998797732)
-        ref[2,0,0]=(-1.31925158304)/(o+1.)+(-0.094354968822)
-        ref[2,0,1]=(0.699277735512)/(o+1.)+(0.60366147331)
-        ref[2,1,0]=(-0.219878898763)/(o+1.)+(-0.692547746205)
-        ref[2,1,1]=(-1.46750249607)/(o+1.)+(-0.357695970647)
-        ref[3,0,0]=(0.71941698906)/(o+1.)+(-0.000185089626866)
-        ref[3,0,1]=(-0.526993313502)/(o+1.)+(0.819236866243)
-        ref[3,1,0]=(1.51671320209)/(o+1.)+(-0.00624614123899)
-        ref[3,1,1]=(1.05185683613)/(o+1.)+(0.176944781803)
-        ref[4,0,0]=(1.20432711487)/(o+1.)+(-0.229695891683)
-        ref[4,0,1]=(1.26863112516)/(o+1.)+(0.14866334031)
-        ref[4,1,0]=(0.34377834331)/(o+1.)+(-0.608034213907)
-        ref[4,1,1]=(-0.189568721058)/(o+1.)+(0.727020285914)
-        ref[5,0,0]=(0.116981035747)/(o+1.)+(-0.0311879413343)
-        ref[5,0,1]=(-0.638728138162)/(o+1.)+(-0.840334214679)
-        ref[5,1,0]=(0.891634589919)/(o+1.)+(0.349439908586)
-        ref[5,1,1]=(-0.552480077628)/(o+1.)+(-0.438505360418)
-      else:
-        arg[0,0,0]=(-0.662295604848)*x[0]+(1.04606412328)*x[1]+(-0.376008345205)*x[2]
-        arg[0,0,1]=(1.25030158303)*x[0]+(-0.0735167236581)*x[1]+(1.31623868156)*x[2]
-        arg[0,1,0]=(0.717953620717)*x[0]+(-0.700464709991)*x[1]+(0.0345381771501)*x[2]
-        arg[0,1,1]=(0.225944321569)*x[0]+(-1.09510173632)*x[1]+(-0.371235420166)*x[2]
-        arg[1,0,0]=(-0.0755865552996)*x[0]+(-0.168214695387)*x[1]+(-0.437427629408)*x[2]
-        arg[1,0,1]=(-1.52674685128)*x[0]+(-0.408158359188)*x[1]+(0.750091649824)*x[2]
-        arg[1,1,0]=(-0.572400948498)*x[0]+(-0.802826119419)*x[1]+(-1.0233358643)*x[2]
-        arg[1,1,1]=(0.623156259061)*x[0]+(0.378774331134)*x[1]+(0.0419766309042)*x[2]
-        arg[2,0,0]=(0.443271002813)*x[0]+(-0.930092172267)*x[1]+(-0.20199150178)*x[2]
-        arg[2,0,1]=(0.408614848881)*x[0]+(-1.3007040171)*x[1]+(-0.872615408174)*x[2]
-        arg[2,1,0]=(-0.174910742406)*x[0]+(1.64872582781)*x[1]+(0.701172036891)*x[2]
-        arg[2,1,1]=(0.417145974895)*x[0]+(0.428983721984)*x[1]+(-0.000787616769604)*x[2]
-        arg[3,0,0]=(0.655644872855)*x[0]+(-0.268612479186)*x[1]+(0.11779790898)*x[2]
-        arg[3,0,1]=(-0.244670332245)*x[0]+(-0.857502890419)*x[1]+(0.111792341131)*x[2]
-        arg[3,1,0]=(0.131303542183)*x[0]+(0.231230724482)*x[1]+(0.116997126513)*x[2]
-        arg[3,1,1]=(0.725434968911)*x[0]+(1.00206695553)*x[1]+(-0.319715936784)*x[2]
-        arg[4,0,0]=(1.30949067662)*x[0]+(-1.14809917605)*x[1]+(0.00529778192088)*x[2]
-        arg[4,0,1]=(0.969626585498)*x[0]+(-0.517908035476)*x[1]+(1.0467168328)*x[2]
-        arg[4,1,0]=(0.362824899886)*x[0]+(0.890586602899)*x[1]+(-0.135163953653)*x[2]
-        arg[4,1,1]=(-0.10353577028)*x[0]+(-0.0997924233294)*x[1]+(0.308973949876)*x[2]
-        arg[5,0,0]=(-1.37242244095)*x[0]+(-0.746928231432)*x[1]+(-1.37385481504)*x[2]
-        arg[5,0,1]=(0.231730881472)*x[0]+(-0.250265629505)*x[1]+(-0.903599685792)*x[2]
-        arg[5,1,0]=(-0.813783753893)*x[0]+(0.41081474894)*x[1]+(-0.541868665288)*x[2]
-        arg[5,1,1]=(0.19296641571)*x[0]+(1.8056250646)*x[1]+(0.283675443031)*x[2]
-        ref[0,0,0]=(0.859538687531)/(o+1.)+(-0.425889257151)
-        ref[0,0,1]=(-0.0674840316504)/(o+1.)+(1.28025378629)
-        ref[0,1,0]=(-0.76922088579)/(o+1.)+(0.410623986833)
-        ref[0,1,1]=(-0.582981712778)/(o+1.)+(-0.328705561068)
-        ref[1,0,0]=(1.25605113432)/(o+1.)+(-0.968640007206)
-        ref[1,0,1]=(-1.59448994908)/(o+1.)+(0.204838194218)
-        ref[1,1,0]=(-2.07497671334)/(o+1.)+(-0.161793109438)
-        ref[1,1,1]=(0.199659680372)/(o+1.)+(0.422123770364)
-        ref[2,0,0]=(-1.86970457224)/(o+1.)+(0.590445950504)
-        ref[2,0,1]=(-1.09505237157)/(o+1.)+(-0.334826102411)
-        ref[2,1,0]=(0.395146564722)/(o+1.)+(0.889920278785)
-        ref[2,1,1]=(1.13315474193)/(o+1.)+(-0.143906330909)
-        ref[3,0,0]=(-0.804398097072)/(o+1.)+(0.65461419986)
-        ref[3,0,1]=(-0.829074327243)/(o+1.)+(-0.0806532771448)
-        ref[3,1,0]=(0.126278821088)/(o+1.)+(0.176626286045)
-        ref[3,1,1]=(-0.498753315826)/(o+1.)+(0.953269651743)
-        ref[4,0,0]=(0.33849802718)/(o+1.)+(-0.0859043723417)
-        ref[4,0,1]=(0.153172891455)/(o+1.)+(0.672631245684)
-        ref[4,1,0]=(1.42803542207)/(o+1.)+(-0.154893936468)
-        ref[4,1,1]=(0.605555698814)/(o+1.)+(-0.249954971274)
-        ref[5,0,0]=(-1.21823919194)/(o+1.)+(-1.13748314774)
-        ref[5,0,1]=(-1.13684484437)/(o+1.)+(0.107355205274)
-        ref[5,1,0]=(-1.21991007491)/(o+1.)+(0.137536202333)
-        ref[5,1,1]=(2.05825898341)/(o+1.)+(0.112003969962)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.2631296794)*x[0]+(-0.130117190301)*x[1]
-        arg[0,0,0,1]=(0.635732952218)*x[0]+(-0.647555274619)*x[1]
-        arg[0,0,1,0]=(1.06301179339)*x[0]+(-0.227813591181)*x[1]
-        arg[0,0,1,1]=(-0.519979711376)*x[0]+(1.04747480856)*x[1]
-        arg[0,0,2,0]=(0.0232818794686)*x[0]+(-1.14799687633)*x[1]
-        arg[0,0,2,1]=(0.359605391616)*x[0]+(-1.32942998109)*x[1]
-        arg[0,1,0,0]=(-0.555284020205)*x[0]+(0.11676202509)*x[1]
-        arg[0,1,0,1]=(-1.83479976366)*x[0]+(0.413168061643)*x[1]
-        arg[0,1,1,0]=(0.239736306037)*x[0]+(0.680002261596)*x[1]
-        arg[0,1,1,1]=(0.0555978436642)*x[0]+(1.28910533087)*x[1]
-        arg[0,1,2,0]=(0.732696470486)*x[0]+(0.538837927425)*x[1]
-        arg[0,1,2,1]=(0.528018376979)*x[0]+(1.20428218411)*x[1]
-        arg[0,2,0,0]=(0.863803666388)*x[0]+(0.187082373754)*x[1]
-        arg[0,2,0,1]=(-1.41490739709)*x[0]+(-0.741935114995)*x[1]
-        arg[0,2,1,0]=(0.0501211708116)*x[0]+(-0.370371645307)*x[1]
-        arg[0,2,1,1]=(-0.0353423795999)*x[0]+(1.00911245551)*x[1]
-        arg[0,2,2,0]=(1.79997397117)*x[0]+(0.240103369892)*x[1]
-        arg[0,2,2,1]=(0.926052414873)*x[0]+(0.00914357056458)*x[1]
-        arg[0,3,0,0]=(-1.38911305622)*x[0]+(-1.29285413766)*x[1]
-        arg[0,3,0,1]=(0.464908270265)*x[0]+(-0.354824878801)*x[1]
-        arg[0,3,1,0]=(0.17477491298)*x[0]+(0.882807721541)*x[1]
-        arg[0,3,1,1]=(0.633177386897)*x[0]+(-0.312628707154)*x[1]
-        arg[0,3,2,0]=(0.0841289229919)*x[0]+(-0.244085514309)*x[1]
-        arg[0,3,2,1]=(0.198631529554)*x[0]+(-0.324387433152)*x[1]
-        arg[0,4,0,0]=(-1.41503119851)*x[0]+(-0.760818812719)*x[1]
-        arg[0,4,0,1]=(-0.0326236565753)*x[0]+(0.835716629913)*x[1]
-        arg[0,4,1,0]=(1.84482629546)*x[0]+(-0.341557269651)*x[1]
-        arg[0,4,1,1]=(-0.380600663728)*x[0]+(-0.295663906776)*x[1]
-        arg[0,4,2,0]=(0.411308057157)*x[0]+(1.0109767907)*x[1]
-        arg[0,4,2,1]=(-1.10494637617)*x[0]+(0.401374247774)*x[1]
-        arg[1,0,0,0]=(0.437019391027)*x[0]+(0.0507256248679)*x[1]
-        arg[1,0,0,1]=(-0.399457976892)*x[0]+(1.60118981524)*x[1]
-        arg[1,0,1,0]=(-1.51289007675)*x[0]+(0.821406477166)*x[1]
-        arg[1,0,1,1]=(0.405770274494)*x[0]+(0.637591733337)*x[1]
-        arg[1,0,2,0]=(-1.4945593715)*x[0]+(1.0919176668)*x[1]
-        arg[1,0,2,1]=(-0.482868528044)*x[0]+(0.578004764959)*x[1]
-        arg[1,1,0,0]=(-1.44298476434)*x[0]+(0.197151370973)*x[1]
-        arg[1,1,0,1]=(1.38517677391)*x[0]+(0.915352009234)*x[1]
-        arg[1,1,1,0]=(1.69025511761)*x[0]+(0.0203268727501)*x[1]
-        arg[1,1,1,1]=(0.615392847773)*x[0]+(-0.301873832451)*x[1]
-        arg[1,1,2,0]=(0.3081860115)*x[0]+(-0.495230532585)*x[1]
-        arg[1,1,2,1]=(-0.0258752746808)*x[0]+(0.441629273958)*x[1]
-        arg[1,2,0,0]=(-0.947577742489)*x[0]+(0.218632343222)*x[1]
-        arg[1,2,0,1]=(0.520029690788)*x[0]+(0.403806873912)*x[1]
-        arg[1,2,1,0]=(1.32820278922)*x[0]+(-1.68314905373)*x[1]
-        arg[1,2,1,1]=(1.30409876916)*x[0]+(-0.721819171819)*x[1]
-        arg[1,2,2,0]=(1.37872038109)*x[0]+(0.0725139769178)*x[1]
-        arg[1,2,2,1]=(0.35593830057)*x[0]+(0.28751298465)*x[1]
-        arg[1,3,0,0]=(-1.17950311406)*x[0]+(-0.232819397686)*x[1]
-        arg[1,3,0,1]=(0.17340184781)*x[0]+(-0.43329852484)*x[1]
-        arg[1,3,1,0]=(-1.71125828064)*x[0]+(0.957284609667)*x[1]
-        arg[1,3,1,1]=(-0.429043922461)*x[0]+(0.15749154348)*x[1]
-        arg[1,3,2,0]=(-1.42626208855)*x[0]+(-1.12812746347)*x[1]
-        arg[1,3,2,1]=(0.490516645689)*x[0]+(0.559039786338)*x[1]
-        arg[1,4,0,0]=(0.436395831147)*x[0]+(0.382691724897)*x[1]
-        arg[1,4,0,1]=(1.27903773839)*x[0]+(-0.0642376846324)*x[1]
-        arg[1,4,1,0]=(0.503159792753)*x[0]+(0.392973700403)*x[1]
-        arg[1,4,1,1]=(0.0881500114326)*x[0]+(0.834121935361)*x[1]
-        arg[1,4,2,0]=(-0.620745962116)*x[0]+(-0.0770814791601)*x[1]
-        arg[1,4,2,1]=(0.0231684675117)*x[0]+(-1.33994827808)*x[1]
-        arg[2,0,0,0]=(-0.972311570714)*x[0]+(-0.235293375636)*x[1]
-        arg[2,0,0,1]=(0.21633355466)*x[0]+(0.11325401613)*x[1]
-        arg[2,0,1,0]=(0.922986727965)*x[0]+(-1.00516246282)*x[1]
-        arg[2,0,1,1]=(-0.740778981838)*x[0]+(0.616728971608)*x[1]
-        arg[2,0,2,0]=(1.73201175195)*x[0]+(-1.1634325209)*x[1]
-        arg[2,0,2,1]=(1.15829744421)*x[0]+(-1.87219685708)*x[1]
-        arg[2,1,0,0]=(-0.458901790255)*x[0]+(1.13812715713)*x[1]
-        arg[2,1,0,1]=(1.03315725208)*x[0]+(-0.112487270341)*x[1]
-        arg[2,1,1,0]=(-1.7070220527)*x[0]+(0.126058081856)*x[1]
-        arg[2,1,1,1]=(0.863301459388)*x[0]+(0.226670498194)*x[1]
-        arg[2,1,2,0]=(-1.0012992544)*x[0]+(-0.195604893926)*x[1]
-        arg[2,1,2,1]=(-0.128048233768)*x[0]+(0.827383267773)*x[1]
-        arg[2,2,0,0]=(-0.0876478859699)*x[0]+(1.69600082596)*x[1]
-        arg[2,2,0,1]=(-0.616278041482)*x[0]+(-0.995548774612)*x[1]
-        arg[2,2,1,0]=(0.780699602657)*x[0]+(-0.721498796198)*x[1]
-        arg[2,2,1,1]=(-1.17591990575)*x[0]+(-0.66080847955)*x[1]
-        arg[2,2,2,0]=(1.71259481962)*x[0]+(-1.12456334234)*x[1]
-        arg[2,2,2,1]=(-0.721345747555)*x[0]+(-1.28222132706)*x[1]
-        arg[2,3,0,0]=(-1.25971324146)*x[0]+(-0.00559590465243)*x[1]
-        arg[2,3,0,1]=(-0.49234245798)*x[0]+(0.30900436328)*x[1]
-        arg[2,3,1,0]=(1.3068919966)*x[0]+(-0.891484126193)*x[1]
-        arg[2,3,1,1]=(0.319277203381)*x[0]+(-0.535113401495)*x[1]
-        arg[2,3,2,0]=(0.529480518887)*x[0]+(0.00452686996008)*x[1]
-        arg[2,3,2,1]=(-1.0978905592)*x[0]+(-0.421513714335)*x[1]
-        arg[2,4,0,0]=(-1.27711509307)*x[0]+(-1.42208296178)*x[1]
-        arg[2,4,0,1]=(-0.621292314868)*x[0]+(-1.10962518414)*x[1]
-        arg[2,4,1,0]=(-0.183478331213)*x[0]+(1.0775900659)*x[1]
-        arg[2,4,1,1]=(1.07354953663)*x[0]+(0.869765287054)*x[1]
-        arg[2,4,2,0]=(-0.696050139647)*x[0]+(-0.120769338549)*x[1]
-        arg[2,4,2,1]=(-0.895597167617)*x[0]+(1.41025466606)*x[1]
-        arg[3,0,0,0]=(1.15262876611)*x[0]+(-0.505428168285)*x[1]
-        arg[3,0,0,1]=(-0.277585299138)*x[0]+(0.352683243558)*x[1]
-        arg[3,0,1,0]=(0.218694567952)*x[0]+(-0.170325565499)*x[1]
-        arg[3,0,1,1]=(0.297325594036)*x[0]+(0.459308129811)*x[1]
-        arg[3,0,2,0]=(-0.572509624935)*x[0]+(0.756188981433)*x[1]
-        arg[3,0,2,1]=(0.226462444009)*x[0]+(-1.42100784266)*x[1]
-        arg[3,1,0,0]=(-0.28388824767)*x[0]+(-0.306064847514)*x[1]
-        arg[3,1,0,1]=(-0.805831316478)*x[0]+(0.756933495912)*x[1]
-        arg[3,1,1,0]=(1.37344361233)*x[0]+(-0.377600924857)*x[1]
-        arg[3,1,1,1]=(-0.0725302533884)*x[0]+(-0.425074450201)*x[1]
-        arg[3,1,2,0]=(-0.066659431931)*x[0]+(1.39252394891)*x[1]
-        arg[3,1,2,1]=(0.593440019224)*x[0]+(-0.945629564385)*x[1]
-        arg[3,2,0,0]=(0.101850471598)*x[0]+(0.0552356415787)*x[1]
-        arg[3,2,0,1]=(-0.407603005372)*x[0]+(-0.849371670514)*x[1]
-        arg[3,2,1,0]=(0.435403192155)*x[0]+(0.213673097377)*x[1]
-        arg[3,2,1,1]=(0.424081872219)*x[0]+(-0.0800529063085)*x[1]
-        arg[3,2,2,0]=(0.189428134309)*x[0]+(-0.205813522374)*x[1]
-        arg[3,2,2,1]=(-0.51449771505)*x[0]+(0.0570738169919)*x[1]
-        arg[3,3,0,0]=(1.05431625119)*x[0]+(-0.0583139615539)*x[1]
-        arg[3,3,0,1]=(0.0292261008496)*x[0]+(-0.569482715214)*x[1]
-        arg[3,3,1,0]=(-0.155861158232)*x[0]+(0.628422800294)*x[1]
-        arg[3,3,1,1]=(-1.24050157391)*x[0]+(-1.83949885089)*x[1]
-        arg[3,3,2,0]=(-0.140709404689)*x[0]+(0.975529832713)*x[1]
-        arg[3,3,2,1]=(-0.290824210426)*x[0]+(-0.198373932879)*x[1]
-        arg[3,4,0,0]=(0.627236720719)*x[0]+(-0.306676521516)*x[1]
-        arg[3,4,0,1]=(-0.964303098626)*x[0]+(-0.701698363587)*x[1]
-        arg[3,4,1,0]=(-0.0447860906704)*x[0]+(0.324659175162)*x[1]
-        arg[3,4,1,1]=(1.28273443124)*x[0]+(-0.764329261143)*x[1]
-        arg[3,4,2,0]=(-0.023232709502)*x[0]+(-0.124231212653)*x[1]
-        arg[3,4,2,1]=(0.510754136991)*x[0]+(0.570492207442)*x[1]
-        ref[0,0,0,0]=(0.648764087616)/(o+1.)+(-0.521005478658)
-        ref[0,0,0,1]=(-0.0127476670646)/(o+1.)+(0.000462672331599)
-        ref[0,0,1,0]=(0.258601710827)/(o+1.)+(0.288298245692)
-        ref[0,0,1,1]=(0.0577415806545)/(o+1.)+(0.234876758266)
-        ref[0,0,2,0]=(-0.91129780757)/(o+1.)+(-0.106708594644)
-        ref[0,0,2,1]=(0.0841946322525)/(o+1.)+(-0.527009610865)
-        ref[0,1,0,0]=(0.111101563297)/(o+1.)+(-0.274811779206)
-        ref[0,1,0,1]=(-0.504062576651)/(o+1.)+(-0.458784562683)
-        ref[0,1,1,0]=(0.65560969277)/(o+1.)+(0.132064437431)
-        ref[0,1,1,1]=(0.0866382135955)/(o+1.)+(0.629032480469)
-        ref[0,1,2,0]=(1.36074036394)/(o+1.)+(-0.0446029830125)
-        ref[0,1,2,1]=(1.16071753175)/(o+1.)+(0.285791514672)
-        ref[0,2,0,0]=(0.693065154772)/(o+1.)+(0.178910442685)
-        ref[0,2,0,1]=(-1.41209835364)/(o+1.)+(-0.372372079222)
-        ref[0,2,1,0]=(-0.542625642859)/(o+1.)+(0.111187584182)
-        ref[0,2,1,1]=(0.628714449405)/(o+1.)+(0.172527813253)
-        ref[0,2,2,0]=(1.62887921583)/(o+1.)+(0.205599062617)
-        ref[0,2,2,1]=(1.0640301541)/(o+1.)+(-0.0644170843301)
-        ref[0,3,0,0]=(-1.09870552313)/(o+1.)+(-0.791630835375)
-        ref[0,3,0,1]=(0.260706656546)/(o+1.)+(-0.0753116325413)
-        ref[0,3,1,0]=(-0.0543842358149)/(o+1.)+(0.555983435168)
-        ref[0,3,1,1]=(0.0369075211917)/(o+1.)+(0.141820579276)
-        ref[0,3,2,0]=(-0.784250881508)/(o+1.)+(0.312147145095)
-        ref[0,3,2,1]=(-0.178450092422)/(o+1.)+(0.0263470944113)
-        ref[0,4,0,0]=(-0.993852999635)/(o+1.)+(-0.590998505799)
-        ref[0,4,0,1]=(-0.0449039600312)/(o+1.)+(0.423998466684)
-        ref[0,4,1,0]=(0.583535069477)/(o+1.)+(0.459866978166)
-        ref[0,4,1,1]=(-0.251020886878)/(o+1.)+(-0.212621841813)
-        ref[0,4,2,0]=(0.408688561613)/(o+1.)+(0.506798143121)
-        ref[0,4,2,1]=(0.537090447747)/(o+1.)+(-0.620331288072)
-        ref[1,0,0,0]=(0.37428496839)/(o+1.)+(0.0567300237522)
-        ref[1,0,0,1]=(0.777672833448)/(o+1.)+(0.212029502451)
-        ref[1,0,1,0]=(-0.745422608709)/(o+1.)+(0.026969504563)
-        ref[1,0,1,1]=(0.466434983875)/(o+1.)+(0.288463511978)
-        ref[1,0,2,0]=(0.237457788829)/(o+1.)+(-0.320049746767)
-        ref[1,0,2,1]=(0.346974181328)/(o+1.)+(-0.125918972207)
-        ref[1,1,0,0]=(-0.823737519034)/(o+1.)+(-0.211047937165)
-        ref[1,1,0,1]=(1.00324369541)/(o+1.)+(0.648642543871)
-        ref[1,1,1,0]=(0.674013158596)/(o+1.)+(0.518284415882)
-        ref[1,1,1,1]=(0.403142463029)/(o+1.)+(-0.0448117238535)
-        ref[1,1,2,0]=(0.0399328921703)/(o+1.)+(-0.113488706628)
-        ref[1,1,2,1]=(0.111446633645)/(o+1.)+(0.152153682816)
-        ref[1,2,0,0]=(-0.481646721692)/(o+1.)+(-0.123649338787)
-        ref[1,2,0,1]=(0.857170000026)/(o+1.)+(0.033333282337)
-        ref[1,2,1,0]=(-0.445362398126)/(o+1.)+(0.0452080668082)
-        ref[1,2,1,1]=(-0.256201827386)/(o+1.)+(0.419240712362)
-        ref[1,2,2,0]=(1.02991996311)/(o+1.)+(0.210657197448)
-        ref[1,2,2,1]=(0.355299316895)/(o+1.)+(0.144075984162)
-        ref[1,3,0,0]=(-0.679726322154)/(o+1.)+(-0.366298094796)
-        ref[1,3,0,1]=(-0.67885027329)/(o+1.)+(0.20947679813)
-        ref[1,3,1,0]=(-0.163081485233)/(o+1.)+(-0.295446092868)
-        ref[1,3,1,1]=(-0.035768623673)/(o+1.)+(-0.117891877654)
-        ref[1,3,2,0]=(-0.639368943038)/(o+1.)+(-0.957510304493)
-        ref[1,3,2,1]=(0.160615066001)/(o+1.)+(0.444470683013)
-        ref[1,4,0,0]=(1.0649487216)/(o+1.)+(-0.122930582777)
-        ref[1,4,0,1]=(0.22766574122)/(o+1.)+(0.493567156271)
-        ref[1,4,1,0]=(-0.481296537412)/(o+1.)+(0.688715015285)
-        ref[1,4,1,1]=(-0.195268237132)/(o+1.)+(0.558770091963)
-        ref[1,4,2,0]=(0.180618258117)/(o+1.)+(-0.439222849696)
-        ref[1,4,2,1]=(0.0261012984826)/(o+1.)+(-0.671440554524)
-        ref[2,0,0,0]=(-0.301101739758)/(o+1.)+(-0.453251603296)
-        ref[2,0,0,1]=(0.00878006761908)/(o+1.)+(0.160403751586)
-        ref[2,0,1,0]=(-0.80011300584)/(o+1.)+(0.35896863549)
-        ref[2,0,1,1]=(0.00248831604776)/(o+1.)+(-0.0632691631389)
-        ref[2,0,2,0]=(-0.0569220251136)/(o+1.)+(0.312750628078)
-        ref[2,0,2,1]=(-0.440109525096)/(o+1.)+(-0.136894943888)
-        ref[2,1,0,0]=(-0.465652661854)/(o+1.)+(0.572439014362)
-        ref[2,1,0,1]=(0.0522958647723)/(o+1.)+(0.434187058485)
-        ref[2,1,1,0]=(0.00194260180185)/(o+1.)+(-0.791453286324)
-        ref[2,1,1,1]=(0.981996325082)/(o+1.)+(0.0539878162501)
-        ref[2,1,2,0]=(-0.243334369882)/(o+1.)+(-0.476784889223)
-        ref[2,1,2,1]=(1.53208640175)/(o+1.)+(-0.416375683873)
-        ref[2,2,0,0]=(1.27849139532)/(o+1.)+(0.164930772337)
-        ref[2,2,0,1]=(-1.4813889023)/(o+1.)+(-0.0652189568992)
-        ref[2,2,1,0]=(-0.728282325831)/(o+1.)+(0.393741566145)
-        ref[2,2,1,1]=(-0.537765426582)/(o+1.)+(-0.649481479359)
-        ref[2,2,2,0]=(-0.266224153785)/(o+1.)+(0.427127815533)
-        ref[2,2,2,1]=(-0.862349098277)/(o+1.)+(-0.570608988167)
-        ref[2,3,0,0]=(-1.09340368619)/(o+1.)+(-0.0859527299593)
-        ref[2,3,0,1]=(1.02842400947)/(o+1.)+(-0.605881052086)
-        ref[2,3,1,0]=(0.0131810342609)/(o+1.)+(0.20111341807)
-        ref[2,3,1,1]=(-1.11244447248)/(o+1.)+(0.448304137186)
-        ref[2,3,2,0]=(-0.978348257673)/(o+1.)+(0.75617782326)
-        ref[2,3,2,1]=(-0.140801959181)/(o+1.)+(-0.689301157175)
-        ref[2,4,0,0]=(-0.733659962936)/(o+1.)+(-0.982769045955)
-        ref[2,4,0,1]=(-1.6278906672)/(o+1.)+(-0.0515134159034)
-        ref[2,4,1,0]=(1.52117858199)/(o+1.)+(-0.313533423654)
-        ref[2,4,1,1]=(0.621221455007)/(o+1.)+(0.661046684337)
-        ref[2,4,2,0]=(-0.157580028393)/(o+1.)+(-0.329619724901)
-        ref[2,4,2,1]=(0.52303412622)/(o+1.)+(-0.00418831388809)
-        ref[3,0,0,0]=(0.337890126112)/(o+1.)+(0.154655235856)
-        ref[3,0,0,1]=(-0.100490423466)/(o+1.)+(0.0877941839427)
-        ref[3,0,1,0]=(0.37549944857)/(o+1.)+(-0.163565223059)
-        ref[3,0,1,1]=(-0.3212149071)/(o+1.)+(0.538924315474)
-        ref[3,0,2,0]=(-0.359815373231)/(o+1.)+(0.271747364864)
-        ref[3,0,2,1]=(-0.890575856923)/(o+1.)+(-0.151984770865)
-        ref[3,1,0,0]=(-1.10384271628)/(o+1.)+(0.256944810546)
-        ref[3,1,0,1]=(0.647425296535)/(o+1.)+(-0.348161558551)
-        ref[3,1,1,0]=(1.41806770884)/(o+1.)+(-0.211112510685)
-        ref[3,1,1,1]=(0.106528838317)/(o+1.)+(-0.302066770953)
-        ref[3,1,2,0]=(0.917213295746)/(o+1.)+(0.204325610614)
-        ref[3,1,2,1]=(-0.24738513406)/(o+1.)+(-0.0524022055505)
-        ref[3,2,0,0]=(-0.0537683888373)/(o+1.)+(0.105427251007)
-        ref[3,2,0,1]=(-1.24647336894)/(o+1.)+(-0.00525065347416)
-        ref[3,2,1,0]=(0.187132797735)/(o+1.)+(0.230971745898)
-        ref[3,2,1,1]=(0.492750417331)/(o+1.)+(-0.0743607257106)
-        ref[3,2,2,0]=(0.062835017839)/(o+1.)+(-0.0396102029518)
-        ref[3,2,2,1]=(-0.967272854749)/(o+1.)+(0.254924478345)
-        ref[3,3,0,0]=(1.41291903854)/(o+1.)+(-0.208458374448)
-        ref[3,3,0,1]=(-0.740922121718)/(o+1.)+(0.100332753677)
-        ref[3,3,1,0]=(1.2839228132)/(o+1.)+(-0.405680585568)
-        ref[3,3,1,1]=(-1.69516258968)/(o+1.)+(-0.69241891756)
-        ref[3,3,2,0]=(0.216594952745)/(o+1.)+(0.309112737639)
-        ref[3,3,2,1]=(-0.634806027047)/(o+1.)+(0.0728039418712)
-        ref[3,4,0,0]=(-0.310491357088)/(o+1.)+(0.315525778146)
-        ref[3,4,0,1]=(-0.751915044154)/(o+1.)+(-0.457043209029)
-        ref[3,4,1,0]=(-0.339963591836)/(o+1.)+(0.309918338163)
-        ref[3,4,1,1]=(0.0720250143477)/(o+1.)+(0.223190077872)
-        ref[3,4,2,0]=(-0.0508554115866)/(o+1.)+(-0.0483042552841)
-        ref[3,4,2,1]=(0.754037720807)/(o+1.)+(0.163604311813)
-      else:
-        arg[0,0,0,0]=(-1.24350959032)*x[0]+(-0.580181370761)*x[1]+(-0.174543112173)*x[2]
-        arg[0,0,0,1]=(1.43450421585)*x[0]+(0.717062915298)*x[1]+(-0.91866562143)*x[2]
-        arg[0,0,1,0]=(0.0188823859409)*x[0]+(1.24568141807)*x[1]+(0.0842604494481)*x[2]
-        arg[0,0,1,1]=(0.871591276766)*x[0]+(0.653031319605)*x[1]+(0.037714556611)*x[2]
-        arg[0,0,2,0]=(1.60473786555)*x[0]+(1.47509195705)*x[1]+(-0.103485610136)*x[2]
-        arg[0,0,2,1]=(1.68030531336)*x[0]+(0.551201281257)*x[1]+(1.26951824468)*x[2]
-        arg[0,1,0,0]=(0.491638014782)*x[0]+(1.26264219762)*x[1]+(-0.921297094204)*x[2]
-        arg[0,1,0,1]=(0.20108233628)*x[0]+(-1.36096031252)*x[1]+(-0.878077046379)*x[2]
-        arg[0,1,1,0]=(0.900775475455)*x[0]+(0.193423726606)*x[1]+(-0.139955126775)*x[2]
-        arg[0,1,1,1]=(-0.0354326925578)*x[0]+(-0.464646718718)*x[1]+(1.49240476583)*x[2]
-        arg[0,1,2,0]=(-1.40991971664)*x[0]+(-1.7747715584)*x[1]+(-0.96387650203)*x[2]
-        arg[0,1,2,1]=(-0.476443682267)*x[0]+(0.55076135194)*x[1]+(0.190289559512)*x[2]
-        arg[0,2,0,0]=(0.535490315669)*x[0]+(0.566915366497)*x[1]+(-0.41513643529)*x[2]
-        arg[0,2,0,1]=(-0.18986562478)*x[0]+(-0.62347050233)*x[1]+(1.18004907973)*x[2]
-        arg[0,2,1,0]=(-0.288440432828)*x[0]+(0.0375642125411)*x[1]+(0.574653643212)*x[2]
-        arg[0,2,1,1]=(1.03327739612)*x[0]+(-0.0443874572943)*x[1]+(0.972142765323)*x[2]
-        arg[0,2,2,0]=(-1.27131901306)*x[0]+(0.619179457229)*x[1]+(-0.436029340417)*x[2]
-        arg[0,2,2,1]=(0.0573099137019)*x[0]+(0.211373076629)*x[1]+(0.859991510967)*x[2]
-        arg[0,3,0,0]=(0.650974277613)*x[0]+(-0.926352792387)*x[1]+(-1.84479828618)*x[2]
-        arg[0,3,0,1]=(-0.293748564815)*x[0]+(0.53683587198)*x[1]+(1.51147453744)*x[2]
-        arg[0,3,1,0]=(0.837889627485)*x[0]+(0.62568225238)*x[1]+(0.365321068424)*x[2]
-        arg[0,3,1,1]=(-0.671841278343)*x[0]+(-0.00822894090357)*x[1]+(-1.35180265459)*x[2]
-        arg[0,3,2,0]=(0.823443588183)*x[0]+(-0.366903894987)*x[1]+(-0.878402795844)*x[2]
-        arg[0,3,2,1]=(-0.856292830088)*x[0]+(-0.134584368493)*x[1]+(-0.299126849425)*x[2]
-        arg[0,4,0,0]=(0.62792423481)*x[0]+(0.781414088068)*x[1]+(-1.12299220031)*x[2]
-        arg[0,4,0,1]=(-0.00743646774917)*x[0]+(0.52784004028)*x[1]+(-1.44284109205)*x[2]
-        arg[0,4,1,0]=(-0.855519018884)*x[0]+(-0.222306698876)*x[1]+(0.0502517275952)*x[2]
-        arg[0,4,1,1]=(-0.311060622512)*x[0]+(0.321283094479)*x[1]+(-0.484147152851)*x[2]
-        arg[0,4,2,0]=(-1.43220161062)*x[0]+(-0.27822988291)*x[1]+(-0.692367106541)*x[2]
-        arg[0,4,2,1]=(1.3956686934)*x[0]+(-1.26426333906)*x[1]+(-1.09343602989)*x[2]
-        arg[1,0,0,0]=(0.122525927098)*x[0]+(-0.484009414389)*x[1]+(-0.822036495419)*x[2]
-        arg[1,0,0,1]=(-0.276748173334)*x[0]+(0.35307031133)*x[1]+(-1.23466402387)*x[2]
-        arg[1,0,1,0]=(-0.479355493223)*x[0]+(-0.56368304348)*x[1]+(0.54679107219)*x[2]
-        arg[1,0,1,1]=(-0.483618214285)*x[0]+(1.60438722757)*x[1]+(0.542389963596)*x[2]
-        arg[1,0,2,0]=(0.130988624202)*x[0]+(-0.449468495509)*x[1]+(0.254640520023)*x[2]
-        arg[1,0,2,1]=(1.13790232796)*x[0]+(-0.716218913004)*x[1]+(-0.193031264955)*x[2]
-        arg[1,1,0,0]=(-0.0653152151059)*x[0]+(1.07890922508)*x[1]+(0.324995864884)*x[2]
-        arg[1,1,0,1]=(0.769151345051)*x[0]+(-1.35911748672)*x[1]+(0.299326803785)*x[2]
-        arg[1,1,1,0]=(-0.431128032697)*x[0]+(1.09261915758)*x[1]+(-0.029871998484)*x[2]
-        arg[1,1,1,1]=(-0.922618915502)*x[0]+(1.30318141394)*x[1]+(-0.324039981399)*x[2]
-        arg[1,1,2,0]=(-0.668178375077)*x[0]+(0.132203602988)*x[1]+(0.236035070297)*x[2]
-        arg[1,1,2,1]=(-0.518594419598)*x[0]+(-0.0429695477263)*x[1]+(1.11877941395)*x[2]
-        arg[1,2,0,0]=(0.610776644247)*x[0]+(-0.023900598958)*x[1]+(0.0480141870788)*x[2]
-        arg[1,2,0,1]=(0.562736426016)*x[0]+(-0.294969624732)*x[1]+(-0.23898469143)*x[2]
-        arg[1,2,1,0]=(0.645173726197)*x[0]+(-1.18365074993)*x[1]+(0.102581636468)*x[2]
-        arg[1,2,1,1]=(-0.518976597355)*x[0]+(0.372817596528)*x[1]+(0.49035249397)*x[2]
-        arg[1,2,2,0]=(0.0192623731103)*x[0]+(-0.241279406644)*x[1]+(-0.420015571981)*x[2]
-        arg[1,2,2,1]=(0.318641827599)*x[0]+(-1.5357263392)*x[1]+(0.350150621892)*x[2]
-        arg[1,3,0,0]=(-0.719401628191)*x[0]+(-1.77806447133)*x[1]+(1.19750443209)*x[2]
-        arg[1,3,0,1]=(-1.00122204304)*x[0]+(0.675162216383)*x[1]+(1.1180105058)*x[2]
-        arg[1,3,1,0]=(0.331149947519)*x[0]+(0.310832741708)*x[1]+(0.087866556795)*x[2]
-        arg[1,3,1,1]=(-0.156343054316)*x[0]+(1.00796776488)*x[1]+(-1.53460740228)*x[2]
-        arg[1,3,2,0]=(0.714240747972)*x[0]+(0.968170992322)*x[1]+(-0.962819191598)*x[2]
-        arg[1,3,2,1]=(-0.200412114379)*x[0]+(-0.173781234544)*x[1]+(0.899584749309)*x[2]
-        arg[1,4,0,0]=(-1.38011177642)*x[0]+(-0.316506470647)*x[1]+(0.266952180469)*x[2]
-        arg[1,4,0,1]=(0.343359684584)*x[0]+(-1.13244466712)*x[1]+(-0.81840155125)*x[2]
-        arg[1,4,1,0]=(0.295299129957)*x[0]+(0.199810907018)*x[1]+(0.631717407771)*x[2]
-        arg[1,4,1,1]=(-0.46840784478)*x[0]+(-0.402683932206)*x[1]+(-0.782209293177)*x[2]
-        arg[1,4,2,0]=(-1.8006389736)*x[0]+(0.119727360087)*x[1]+(0.482076626168)*x[2]
-        arg[1,4,2,1]=(0.96553885281)*x[0]+(0.425097333238)*x[1]+(0.54533551085)*x[2]
-        arg[2,0,0,0]=(0.932725602425)*x[0]+(-0.513780652569)*x[1]+(0.275742915648)*x[2]
-        arg[2,0,0,1]=(1.10053578072)*x[0]+(0.787895323287)*x[1]+(-1.46544221328)*x[2]
-        arg[2,0,1,0]=(0.83657269666)*x[0]+(-1.15717482853)*x[1]+(1.1090271297)*x[2]
-        arg[2,0,1,1]=(1.59370135994)*x[0]+(0.452015708845)*x[1]+(0.0862230059082)*x[2]
-        arg[2,0,2,0]=(-0.954832509866)*x[0]+(0.51192257473)*x[1]+(-1.48499771643)*x[2]
-        arg[2,0,2,1]=(-0.556993361475)*x[0]+(0.438110051421)*x[1]+(0.237254018143)*x[2]
-        arg[2,1,0,0]=(-0.318980966383)*x[0]+(-0.263071719097)*x[1]+(-0.348122442404)*x[2]
-        arg[2,1,0,1]=(0.100191287326)*x[0]+(-0.422996999974)*x[1]+(-0.850702087112)*x[2]
-        arg[2,1,1,0]=(-0.198942237141)*x[0]+(0.277459568173)*x[1]+(-1.66195774421)*x[2]
-        arg[2,1,1,1]=(-1.62211381863)*x[0]+(-0.13417844308)*x[1]+(1.07441481356)*x[2]
-        arg[2,1,2,0]=(-0.183120762554)*x[0]+(-0.158546687568)*x[1]+(1.05938565108)*x[2]
-        arg[2,1,2,1]=(-0.530596736933)*x[0]+(-0.507872303289)*x[1]+(0.0437745116021)*x[2]
-        arg[2,2,0,0]=(-0.430338834548)*x[0]+(-1.01989755268)*x[1]+(0.0364152729771)*x[2]
-        arg[2,2,0,1]=(-0.55129175645)*x[0]+(0.283907226465)*x[1]+(0.281403899376)*x[2]
-        arg[2,2,1,0]=(0.119036949181)*x[0]+(0.187265158741)*x[1]+(-0.0845814658663)*x[2]
-        arg[2,2,1,1]=(1.39900884968)*x[0]+(1.42806588781)*x[1]+(0.211444691268)*x[2]
-        arg[2,2,2,0]=(-0.609664666581)*x[0]+(-0.29988332429)*x[1]+(-0.28125800646)*x[2]
-        arg[2,2,2,1]=(-1.77545247157)*x[0]+(0.337828315779)*x[1]+(-0.239141292616)*x[2]
-        arg[2,3,0,0]=(-1.23141604656)*x[0]+(0.322998749903)*x[1]+(-1.70685281816)*x[2]
-        arg[2,3,0,1]=(-1.4416737434)*x[0]+(1.49740114642)*x[1]+(0.732057753882)*x[2]
-        arg[2,3,1,0]=(-1.59112622077)*x[0]+(0.665317566947)*x[1]+(0.826417253499)*x[2]
-        arg[2,3,1,1]=(-1.22000830454)*x[0]+(0.618713896065)*x[1]+(1.27354984534)*x[2]
-        arg[2,3,2,0]=(0.125639723221)*x[0]+(0.663241510656)*x[1]+(-0.426459288281)*x[2]
-        arg[2,3,2,1]=(1.39120212155)*x[0]+(0.9115748844)*x[1]+(1.77889030223)*x[2]
-        arg[2,4,0,0]=(-0.217927656387)*x[0]+(1.20391185439)*x[1]+(-0.188197734908)*x[2]
-        arg[2,4,0,1]=(-0.442009082947)*x[0]+(0.399477101959)*x[1]+(-1.33974368956)*x[2]
-        arg[2,4,1,0]=(0.636534809382)*x[0]+(0.872923470503)*x[1]+(-0.922286702006)*x[2]
-        arg[2,4,1,1]=(-0.831840624431)*x[0]+(0.946223248622)*x[1]+(0.380300039133)*x[2]
-        arg[2,4,2,0]=(0.0803088903901)*x[0]+(-0.857685204574)*x[1]+(-0.479475079431)*x[2]
-        arg[2,4,2,1]=(-1.7233942516)*x[0]+(-1.38771345941)*x[1]+(0.761958201633)*x[2]
-        arg[3,0,0,0]=(-0.738032075796)*x[0]+(1.33264583681)*x[1]+(-1.21101988385)*x[2]
-        arg[3,0,0,1]=(1.40336327022)*x[0]+(-0.77078885213)*x[1]+(1.70960627204)*x[2]
-        arg[3,0,1,0]=(0.452477629041)*x[0]+(0.235432009434)*x[1]+(1.69314009822)*x[2]
-        arg[3,0,1,1]=(-0.816213143646)*x[0]+(-1.42050350309)*x[1]+(-0.0806105456758)*x[2]
-        arg[3,0,2,0]=(0.0400708086023)*x[0]+(-0.336948609628)*x[1]+(-0.113687293995)*x[2]
-        arg[3,0,2,1]=(0.414077492095)*x[0]+(-1.06937716207)*x[1]+(1.25972041173)*x[2]
-        arg[3,1,0,0]=(-1.02975555201)*x[0]+(-0.123306171085)*x[1]+(-1.74750909033)*x[2]
-        arg[3,1,0,1]=(-1.01988698009)*x[0]+(-0.142188487205)*x[1]+(0.274514515492)*x[2]
-        arg[3,1,1,0]=(0.440626586141)*x[0]+(-0.0569580581917)*x[1]+(-0.77065631367)*x[2]
-        arg[3,1,1,1]=(0.987903067972)*x[0]+(-1.47543187274)*x[1]+(-0.0888962732893)*x[2]
-        arg[3,1,2,0]=(0.150506204416)*x[0]+(0.035476396146)*x[1]+(-0.852061690418)*x[2]
-        arg[3,1,2,1]=(-1.15179800132)*x[0]+(-0.425570974979)*x[1]+(1.10092214699)*x[2]
-        arg[3,2,0,0]=(1.01255188057)*x[0]+(1.24279465527)*x[1]+(1.25190246102)*x[2]
-        arg[3,2,0,1]=(-1.16275538385)*x[0]+(1.13672085108)*x[1]+(0.131953731231)*x[2]
-        arg[3,2,1,0]=(0.774290747173)*x[0]+(0.275410883089)*x[1]+(-0.825692266439)*x[2]
-        arg[3,2,1,1]=(-1.07241838074)*x[0]+(-0.0974675737726)*x[1]+(1.1856849697)*x[2]
-        arg[3,2,2,0]=(0.234209248938)*x[0]+(0.756893234577)*x[1]+(-0.365141055079)*x[2]
-        arg[3,2,2,1]=(-1.6668858309)*x[0]+(-0.916769120288)*x[1]+(-0.716365681217)*x[2]
-        arg[3,3,0,0]=(-0.36890215249)*x[0]+(-0.581062815398)*x[1]+(1.6280164507)*x[2]
-        arg[3,3,0,1]=(-0.933634743559)*x[0]+(-0.0657657779145)*x[1]+(1.35011362804)*x[2]
-        arg[3,3,1,0]=(1.13739289322)*x[0]+(0.0103208127738)*x[1]+(1.01628193014)*x[2]
-        arg[3,3,1,1]=(0.037979696459)*x[0]+(-1.76926650495)*x[1]+(-1.28602572757)*x[2]
-        arg[3,3,2,0]=(0.797830431467)*x[0]+(0.732108360923)*x[1]+(-0.436390867333)*x[2]
-        arg[3,3,2,1]=(-0.571865447888)*x[0]+(0.895109047357)*x[1]+(-0.673234648776)*x[2]
-        arg[3,4,0,0]=(-1.59667195158)*x[0]+(-1.06146105331)*x[1]+(-1.81255923783)*x[2]
-        arg[3,4,0,1]=(-0.0721327214647)*x[0]+(1.23982376787)*x[1]+(1.43101011)*x[2]
-        arg[3,4,1,0]=(0.117288395573)*x[0]+(-0.37678966212)*x[1]+(-1.14107285089)*x[2]
-        arg[3,4,1,1]=(-0.303270532321)*x[0]+(1.33784402324)*x[1]+(-0.651624796413)*x[2]
-        arg[3,4,2,0]=(0.215849013256)*x[0]+(0.247315697644)*x[1]+(0.404644392153)*x[2]
-        arg[3,4,2,1]=(0.975781190478)*x[0]+(-0.252285063767)*x[1]+(-0.145694910854)*x[2]
-        ref[0,0,0,0]=(-0.718934738033)/(o+1.)+(-0.639649667608)
-        ref[0,0,0,1]=(1.01007662915)/(o+1.)+(0.111412440284)
-        ref[0,0,1,0]=(0.827868953278)/(o+1.)+(0.26047765009)
-        ref[0,0,1,1]=(1.48122352358)/(o+1.)+(0.0405568147034)
-        ref[0,0,2,0]=(1.33282099436)/(o+1.)+(0.821761609054)
-        ref[0,0,2,1]=(1.65298089862)/(o+1.)+(0.924021970342)
-        ref[0,1,0,0]=(0.930162571453)/(o+1.)+(-0.0485897266263)
-        ref[0,1,0,1]=(-0.347599158269)/(o+1.)+(-0.845177932176)
-        ref[0,1,1,0]=(0.623152121663)/(o+1.)+(0.165545976811)
-        ref[0,1,1,1]=(0.0506217690841)/(o+1.)+(0.470851792737)
-        ref[0,1,2,0]=(-1.99181491207)/(o+1.)+(-1.0783764325)
-        ref[0,1,2,1]=(-0.731065007801)/(o+1.)+(0.497836118493)
-        ref[0,2,0,0]=(-0.0812249009151)/(o+1.)+(0.384247073896)
-        ref[0,2,0,1]=(-0.115768505253)/(o+1.)+(0.241240728938)
-        ref[0,2,1,0]=(0.152728009607)/(o+1.)+(0.0855247066589)
-        ref[0,2,1,1]=(1.43086526503)/(o+1.)+(0.265083719563)
-        ref[0,2,2,0]=(-0.967906369418)/(o+1.)+(-0.060131263415)
-        ref[0,2,2,1]=(-0.269269238419)/(o+1.)+(0.698971869859)
-        ref[0,3,0,0]=(-1.71659801402)/(o+1.)+(-0.201789393467)
-        ref[0,3,0,1]=(0.265343635273)/(o+1.)+(0.744609104665)
-        ref[0,3,1,0]=(1.83021875237)/(o+1.)+(-0.000662902039879)
-        ref[0,3,1,1]=(-0.317529833375)/(o+1.)+(-0.857171520229)
-        ref[0,3,2,0]=(-0.705757693524)/(o+1.)+(0.141947295438)
-        ref[0,3,2,1]=(-1.27000495392)/(o+1.)+(-0.00999954704202)
-        ref[0,4,0,0]=(0.061892522425)/(o+1.)+(0.112226800069)
-        ref[0,4,0,1]=(-0.747062267148)/(o+1.)+(-0.0876876261864)
-        ref[0,4,1,0]=(-1.19488448842)/(o+1.)+(0.0836552491261)
-        ref[0,4,1,1]=(1.36573976292)/(o+1.)+(-0.9198322219)
-        ref[0,4,2,0]=(-1.67982141697)/(o+1.)+(-0.361488591554)
-        ref[0,4,2,1]=(-0.598050084547)/(o+1.)+(-0.181990295501)
-        ref[1,0,0,0]=(-2.45927674426)/(o+1.)+(0.637878380777)
-        ref[1,0,0,1]=(-0.575223026885)/(o+1.)+(-0.291559429493)
-        ref[1,0,1,0]=(0.0871765959469)/(o+1.)+(-0.29171203023)
-        ref[1,0,1,1]=(0.94050575309)/(o+1.)+(0.361326611893)
-        ref[1,0,2,0]=(-0.306500880914)/(o+1.)+(0.121330764815)
-        ref[1,0,2,1]=(1.60748296414)/(o+1.)+(-0.689415407072)
-        ref[1,1,0,0]=(0.640401899755)/(o+1.)+(0.34909398755)
-        ref[1,1,0,1]=(0.134022909144)/(o+1.)+(-0.212331123516)
-        ref[1,1,1,0]=(0.248008519593)/(o+1.)+(0.191805303402)
-        ref[1,1,1,1]=(0.638911732328)/(o+1.)+(-0.291194607647)
-        ref[1,1,2,0]=(0.109264462855)/(o+1.)+(-0.204602082323)
-        ref[1,1,2,1]=(-0.185963112656)/(o+1.)+(0.371589279643)
-        ref[1,2,0,0]=(-0.590669733193)/(o+1.)+(0.61277998278)
-        ref[1,2,0,1]=(-1.15856908266)/(o+1.)+(0.593675596257)
-        ref[1,2,1,0]=(-0.451642187813)/(o+1.)+(0.00787340027166)
-        ref[1,2,1,1]=(-0.428757501259)/(o+1.)+(0.386475497201)
-        ref[1,2,2,0]=(-0.414532914271)/(o+1.)+(-0.113749845622)
-        ref[1,2,2,1]=(-0.513613710163)/(o+1.)+(-0.176660089771)
-        ref[1,3,0,0]=(-0.890487934256)/(o+1.)+(-0.20473686659)
-        ref[1,3,0,1]=(1.64512779208)/(o+1.)+(-0.426588556466)
-        ref[1,3,1,0]=(0.831527595966)/(o+1.)+(-0.0508391749725)
-        ref[1,3,1,1]=(-0.718921003194)/(o+1.)+(0.0179691557385)
-        ref[1,3,2,0]=(0.405959213301)/(o+1.)+(0.156816667697)
-        ref[1,3,2,1]=(0.426319486322)/(o+1.)+(0.0495359570318)
-        ref[1,4,0,0]=(-1.11364330874)/(o+1.)+(-0.158011378929)
-        ref[1,4,0,1]=(-0.0993967101457)/(o+1.)+(-0.754044911817)
-        ref[1,4,1,0]=(0.979493241598)/(o+1.)+(0.0736671015741)
-        ref[1,4,1,1]=(-1.78692478393)/(o+1.)+(0.0668118568857)
-        ref[1,4,2,0]=(-0.691473647622)/(o+1.)+(-0.253680669863)
-        ref[1,4,2,1]=(1.16914997228)/(o+1.)+(0.383410862311)
-        ref[2,0,0,0]=(0.790187638399)/(o+1.)+(-0.047749886448)
-        ref[2,0,0,1]=(0.429625240932)/(o+1.)+(-0.00331817510394)
-        ref[2,0,1,0]=(-0.101344997877)/(o+1.)+(0.444884997853)
-        ref[2,0,1,1]=(2.15519953039)/(o+1.)+(-0.0116297278494)
-        ref[2,0,2,0]=(-1.40159594866)/(o+1.)+(-0.263155851453)
-        ref[2,0,2,1]=(-0.658391287862)/(o+1.)+(0.388380997976)
-        ref[2,1,0,0]=(-0.773933630328)/(o+1.)+(-0.0781207487777)
-        ref[2,1,0,1]=(0.0015551432788)/(o+1.)+(-0.587531471519)
-        ref[2,1,1,0]=(0.122693324758)/(o+1.)+(-0.853066868967)
-        ref[2,1,1,1]=(-0.219255630453)/(o+1.)+(-0.231310908847)
-        ref[2,1,2,0]=(1.33176471286)/(o+1.)+(-0.307023255951)
-        ref[2,1,2,1]=(-1.67471265259)/(o+1.)+(0.340009061986)
-        ref[2,2,0,0]=(-0.727222063897)/(o+1.)+(-0.343299525178)
-        ref[2,2,0,1]=(-1.87667590405)/(o+1.)+(0.945347636719)
-        ref[2,2,1,0]=(0.776003927859)/(o+1.)+(-0.277141642902)
-        ref[2,2,1,1]=(1.62850322537)/(o+1.)+(0.705008101698)
-        ref[2,2,2,0]=(1.31869548331)/(o+1.)+(-1.25475074032)
-        ref[2,2,2,1]=(-1.71691241115)/(o+1.)+(0.0200734813728)
-        ref[2,3,0,0]=(-0.37741220744)/(o+1.)+(-1.11892895368)
-        ref[2,3,0,1]=(0.684763737686)/(o+1.)+(0.0515107096073)
-        ref[2,3,1,0]=(-0.0572023243047)/(o+1.)+(-0.0210945380092)
-        ref[2,3,1,1]=(0.031457290932)/(o+1.)+(0.320399072966)
-        ref[2,3,2,0]=(-0.71613334286)/(o+1.)+(0.539277644228)
-        ref[2,3,2,1]=(2.10068005021)/(o+1.)+(0.990493628981)
-        ref[2,4,0,0]=(0.830379294407)/(o+1.)+(-0.016296415655)
-        ref[2,4,0,1]=(-1.05197706105)/(o+1.)+(-0.165149304749)
-        ref[2,4,1,0]=(-0.0854959336547)/(o+1.)+(0.336333755767)
-        ref[2,4,1,1]=(1.15845594915)/(o+1.)+(-0.331886642912)
-        ref[2,4,2,0]=(-1.25248721318)/(o+1.)+(-0.00218209021539)
-        ref[2,4,2,1]=(-0.991752052473)/(o+1.)+(-0.678698728452)
-        ref[3,0,0,0]=(-0.262071815816)/(o+1.)+(-0.177167153508)
-        ref[3,0,0,1]=(1.20598261029)/(o+1.)+(0.568099039922)
-        ref[3,0,1,0]=(1.21237099375)/(o+1.)+(0.584339371474)
-        ref[3,0,1,1]=(-1.04628498282)/(o+1.)+(-0.635521104799)
-        ref[3,0,2,0]=(0.630843868383)/(o+1.)+(-0.520704481702)
-        ref[3,0,2,1]=(1.56136208039)/(o+1.)+(-0.478470669318)
-        ref[3,1,0,0]=(-0.372752943047)/(o+1.)+(-1.26390893519)
-        ref[3,1,0,1]=(0.192139112377)/(o+1.)+(-0.53985003209)
-        ref[3,1,1,0]=(-1.18480584023)/(o+1.)+(0.398909027255)
-        ref[3,1,1,1]=(0.402069277892)/(o+1.)+(-0.489247177975)
-        ref[3,1,2,0]=(0.27608763117)/(o+1.)+(-0.471083360513)
-        ref[3,1,2,1]=(-0.273636427696)/(o+1.)+(-0.101405200809)
-        ref[3,2,0,0]=(1.92572771773)/(o+1.)+(0.790760639563)
-        ref[3,2,0,1]=(0.16264122626)/(o+1.)+(-0.0283610138982)
-        ref[3,2,1,0]=(0.377561018039)/(o+1.)+(-0.076775827108)
-        ref[3,2,1,1]=(-0.652466873272)/(o+1.)+(0.334132944227)
-        ref[3,2,2,0]=(-0.0304721826842)/(o+1.)+(0.32821680556)
-        ref[3,2,2,1]=(-1.52932569088)/(o+1.)+(-0.885347470761)
-        ref[3,3,0,0]=(-0.451938162279)/(o+1.)+(0.564994822546)
-        ref[3,3,0,1]=(-0.477583137662)/(o+1.)+(0.414148122113)
-        ref[3,3,1,0]=(1.38037325689)/(o+1.)+(0.391811189625)
-        ref[3,3,1,1]=(-1.01333159097)/(o+1.)+(-1.00199047255)
-        ref[3,3,2,0]=(1.3222644334)/(o+1.)+(-0.114358254173)
-        ref[3,3,2,1]=(-0.248989333346)/(o+1.)+(-0.0505008579799)
-        ref[3,4,0,0]=(-1.92196761736)/(o+1.)+(-1.27436231268)
-        ref[3,4,0,1]=(0.894404962457)/(o+1.)+(0.852148096971)
-        ref[3,4,1,0]=(0.868763436571)/(o+1.)+(-1.134668777)
-        ref[3,4,1,1]=(0.438747123022)/(o+1.)+(-0.0278992142568)
-        ref[3,4,2,0]=(0.532575431402)/(o+1.)+(0.167616835826)
-        ref[3,4,2,1]=(0.796744496799)/(o+1.)+(-0.109471640471)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      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.729700679932)*x[0]+(-1.38329769179)*x[1]
-        ref=(0.329728333821)/(o+1.)+(-0.491662672839)
-      else:
-        arg=(-1.75076012766)*x[0]+(-0.0862990889349)*x[1]+(0.637429232833)*x[2]
-        ref=(-0.577517867896)/(o+1.)+(-0.311056057931)
-      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 the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      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]=(1.0296233191)*x[0]+(-0.347985432388)*x[1]
-        arg[1]=(-0.182082548052)*x[0]+(0.114822539064)*x[1]
-        ref[0]=(0.876900301573)/(o+1.)+(-0.0976312074308)
-        ref[1]=(-1.09276229827)/(o+1.)+(0.512751144643)
-      else:
-        arg[0]=(0.390938934986)*x[0]+(-0.17813109236)*x[1]+(0.92611177061)*x[2]
-        arg[1]=(0.169562781554)*x[0]+(-0.149625135256)*x[1]+(0.357445984273)*x[2]
-        ref[0]=(1.07308269316)/(o+1.)+(0.0329184600363)
-        ref[1]=(-1.07527269336)/(o+1.)+(0.726328161966)
-      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 the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.798668686601)*x[0]+(-0.502017718729)*x[1]
-        arg[0,1]=(-0.682368031728)*x[0]+(-0.915048032379)*x[1]
-        arg[0,2]=(-0.0237771508029)*x[0]+(0.177441262563)*x[1]
-        arg[0,3]=(0.135600942216)*x[0]+(0.496697614771)*x[1]
-        arg[0,4]=(0.495272681631)*x[0]+(-0.457599050745)*x[1]
-        arg[1,0]=(-0.252415627225)*x[0]+(-0.820872546406)*x[1]
-        arg[1,1]=(-0.183362696688)*x[0]+(-0.721277471492)*x[1]
-        arg[1,2]=(0.401101418876)*x[0]+(0.0483185737314)*x[1]
-        arg[1,3]=(0.251246583055)*x[0]+(-0.837901564153)*x[1]
-        arg[1,4]=(0.2984760032)*x[0]+(0.0504569221307)*x[1]
-        arg[2,0]=(1.18468310151)*x[0]+(-0.545612792222)*x[1]
-        arg[2,1]=(-1.08451540544)*x[0]+(0.820927137753)*x[1]
-        arg[2,2]=(0.85435600905)*x[0]+(-0.309819803422)*x[1]
-        arg[2,3]=(-0.184148030844)*x[0]+(0.978315441698)*x[1]
-        arg[2,4]=(1.36943188922)*x[0]+(-1.3176984733)*x[1]
-        arg[3,0]=(0.42189213134)*x[0]+(1.23097633986)*x[1]
-        arg[3,1]=(0.0409353425792)*x[0]+(-1.15555830367)*x[1]
-        arg[3,2]=(0.557942070395)*x[0]+(-0.591659744114)*x[1]
-        arg[3,3]=(-1.07432449167)*x[0]+(-0.665475086161)*x[1]
-        arg[3,4]=(-1.00421972544)*x[0]+(1.16737316771)*x[1]
-        ref[0,0]=(-0.400434079596)/(o+1.)+(-0.450126162867)
-        ref[0,1]=(-1.35836659237)/(o+1.)+(-0.11952473587)
-        ref[0,2]=(0.154775934077)/(o+1.)+(-0.000555911158727)
-        ref[0,3]=(-0.177525502969)/(o+1.)+(0.404912029978)
-        ref[0,4]=(1.00122501632)/(o+1.)+(-0.481775692719)
-        ref[1,0]=(-1.37507083806)/(o+1.)+(0.150891332214)
-        ref[1,1]=(-1.37429063854)/(o+1.)+(0.234825235182)
-        ref[1,2]=(1.30069236547)/(o+1.)+(-0.425636186429)
-        ref[1,3]=(-0.414658324515)/(o+1.)+(-0.0859983282917)
-        ref[1,4]=(0.757097138678)/(o+1.)+(-0.204082106674)
-        ref[2,0]=(1.09244584366)/(o+1.)+(-0.226687767185)
-        ref[2,1]=(0.109481169277)/(o+1.)+(-0.186534718481)
-        ref[2,2]=(0.587125473152)/(o+1.)+(-0.0212946337622)
-        ref[2,3]=(0.00878695699842)/(o+1.)+(0.392690226928)
-        ref[2,4]=(0.306810290785)/(o+1.)+(-0.127538437433)
-        ref[3,0]=(0.317826050636)/(o+1.)+(0.667521210281)
-        ref[3,1]=(-0.276254182573)/(o+1.)+(-0.419184389261)
-        ref[3,2]=(-0.753831729065)/(o+1.)+(0.360057027673)
-        ref[3,3]=(-1.40505001195)/(o+1.)+(-0.167374782943)
-        ref[3,4]=(0.53112066724)/(o+1.)+(-0.183983612488)
-      else:
-        arg[0,0]=(1.54447818842)*x[0]+(-0.560568590939)*x[1]+(-1.33749549019)*x[2]
-        arg[0,1]=(-0.535544800192)*x[0]+(-0.732513980801)*x[1]+(0.309855030569)*x[2]
-        arg[0,2]=(-0.45251604551)*x[0]+(-0.0933932995351)*x[1]+(-0.465724167794)*x[2]
-        arg[0,3]=(0.10344455234)*x[0]+(-0.0451254971766)*x[1]+(-1.39912042607)*x[2]
-        arg[0,4]=(0.617585449939)*x[0]+(1.27357810776)*x[1]+(-0.840161322302)*x[2]
-        arg[1,0]=(0.650274355535)*x[0]+(0.547805408891)*x[1]+(0.314350326062)*x[2]
-        arg[1,1]=(0.697200474806)*x[0]+(0.558681734309)*x[1]+(-0.0277936766536)*x[2]
-        arg[1,2]=(-0.508578328229)*x[0]+(-0.513894226666)*x[1]+(-0.528417418023)*x[2]
-        arg[1,3]=(-1.50391414876)*x[0]+(0.174080260823)*x[1]+(-1.48528641514)*x[2]
-        arg[1,4]=(0.859470776434)*x[0]+(-0.121348493404)*x[1]+(1.69796346547)*x[2]
-        arg[2,0]=(1.00593912049)*x[0]+(0.794254020467)*x[1]+(-1.02770358461)*x[2]
-        arg[2,1]=(-1.64586076188)*x[0]+(-0.83927167526)*x[1]+(-1.13088449805)*x[2]
-        arg[2,2]=(0.0628777004357)*x[0]+(-1.27316091149)*x[1]+(0.417655047748)*x[2]
-        arg[2,3]=(-1.43661526118)*x[0]+(0.0676042964527)*x[1]+(0.174947572442)*x[2]
-        arg[2,4]=(0.504347051098)*x[0]+(-1.62976096707)*x[1]+(0.61579932957)*x[2]
-        arg[3,0]=(1.05212645875)*x[0]+(-1.10517003049)*x[1]+(0.902242097595)*x[2]
-        arg[3,1]=(-0.997611854104)*x[0]+(-1.53611378293)*x[1]+(0.322835276897)*x[2]
-        arg[3,2]=(-0.815135194015)*x[0]+(0.357734619962)*x[1]+(0.684966069635)*x[2]
-        arg[3,3]=(0.4545417685)*x[0]+(0.386262464083)*x[1]+(0.131414279708)*x[2]
-        arg[3,4]=(-0.222694646001)*x[0]+(-0.470499833621)*x[1]+(-0.593290862391)*x[2]
-        ref[0,0]=(-0.593803934901)/(o+1.)+(0.120109021094)
-        ref[0,1]=(0.0569115377867)/(o+1.)+(-0.507557644105)
-        ref[0,2]=(-0.202741590274)/(o+1.)+(-0.404445961283)
-        ref[0,3]=(-0.516888777015)/(o+1.)+(-0.411956296948)
-        ref[0,4]=(0.52292787417)/(o+1.)+(0.264037180616)
-        ref[1,0]=(-0.102685279742)/(o+1.)+(0.807557685115)
-        ref[1,1]=(1.44527264276)/(o+1.)+(-0.108592055148)
-        ref[1,2]=(-0.448767718864)/(o+1.)+(-0.551061127027)
-        ref[1,3]=(-1.19936004685)/(o+1.)+(-0.807880128113)
-        ref[1,4]=(1.09918755605)/(o+1.)+(0.668449096223)
-        ref[2,0]=(-0.873708007453)/(o+1.)+(0.823098781902)
-        ref[2,1]=(-1.9697776018)/(o+1.)+(-0.823119666698)
-        ref[2,2]=(0.598023292545)/(o+1.)+(-0.695325727928)
-        ref[2,3]=(-0.486077421455)/(o+1.)+(-0.353992985415)
-        ref[2,4]=(0.65037669171)/(o+1.)+(-0.579995639058)
-        ref[3,0]=(0.115401170876)/(o+1.)+(0.366898677493)
-        ref[3,1]=(-0.836209920174)/(o+1.)+(-0.68734021998)
-        ref[3,2]=(0.753819223079)/(o+1.)+(-0.263126863749)
-        ref[3,3]=(-0.75294945942)/(o+1.)+(0.862583985856)
-        ref[3,4]=(-1.44356156537)/(o+1.)+(0.0785381116785)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.409425595197)*x[0]+(-0.992427840513)*x[1]
-        arg[0,0,1]=(0.645693185569)*x[0]+(-1.38338827813)*x[1]
-        arg[0,1,0]=(0.838847764041)*x[0]+(-1.01358491173)*x[1]
-        arg[0,1,1]=(0.381938057912)*x[0]+(0.61979806953)*x[1]
-        arg[1,0,0]=(-1.36783302742)*x[0]+(-0.132422986617)*x[1]
-        arg[1,0,1]=(-0.137283745381)*x[0]+(0.633534018338)*x[1]
-        arg[1,1,0]=(0.0698189930006)*x[0]+(-1.45980415637)*x[1]
-        arg[1,1,1]=(-0.391725001578)*x[0]+(0.355258883756)*x[1]
-        arg[2,0,0]=(-0.596091494216)*x[0]+(-0.911870026464)*x[1]
-        arg[2,0,1]=(0.138007894626)*x[0]+(1.76859278751)*x[1]
-        arg[2,1,0]=(-0.791803431843)*x[0]+(-0.813170959331)*x[1]
-        arg[2,1,1]=(-1.05466714677)*x[0]+(-1.12822729059)*x[1]
-        arg[3,0,0]=(-0.417845531677)*x[0]+(1.13689234148)*x[1]
-        arg[3,0,1]=(-0.0323347813877)*x[0]+(1.14381520037)*x[1]
-        arg[3,1,0]=(0.639524393892)*x[0]+(0.864696525716)*x[1]
-        arg[3,1,1]=(0.593104139176)*x[0]+(0.812642260561)*x[1]
-        arg[4,0,0]=(-0.0580034066457)*x[0]+(0.802938738147)*x[1]
-        arg[4,0,1]=(0.722143376522)*x[0]+(0.843814429252)*x[1]
-        arg[4,1,0]=(-0.574057925551)*x[0]+(-0.298232158953)*x[1]
-        arg[4,1,1]=(0.422529038525)*x[0]+(0.841942812244)*x[1]
-        arg[5,0,0]=(1.90272013575)*x[0]+(-1.84811498267)*x[1]
-        arg[5,0,1]=(-1.52156314991)*x[0]+(-0.797833417606)*x[1]
-        arg[5,1,0]=(0.723748480291)*x[0]+(0.8667659268)*x[1]
-        arg[5,1,1]=(-0.70289499551)*x[0]+(-0.726595802952)*x[1]
-        ref[0,0,0]=(-1.1719312491)/(o+1.)+(-0.114961093303)
-        ref[0,0,1]=(0.229993657297)/(o+1.)+(-0.483844374927)
-        ref[0,1,0]=(-0.630442924796)/(o+1.)+(0.227852888553)
-        ref[0,1,1]=(-0.806392286115)/(o+1.)+(0.904064206778)
-        ref[1,0,0]=(-1.38312106397)/(o+1.)+(-0.0585674750338)
-        ref[1,0,1]=(0.595552955095)/(o+1.)+(-0.049651341069)
-        ref[1,1,0]=(-1.63606241234)/(o+1.)+(0.123038624483)
-        ref[1,1,1]=(-0.340463713286)/(o+1.)+(0.151998797732)
-        ref[2,0,0]=(-1.31925158304)/(o+1.)+(-0.094354968822)
-        ref[2,0,1]=(0.699277735512)/(o+1.)+(0.60366147331)
-        ref[2,1,0]=(-0.219878898763)/(o+1.)+(-0.692547746205)
-        ref[2,1,1]=(-1.46750249607)/(o+1.)+(-0.357695970647)
-        ref[3,0,0]=(0.71941698906)/(o+1.)+(-0.000185089626866)
-        ref[3,0,1]=(-0.526993313502)/(o+1.)+(0.819236866243)
-        ref[3,1,0]=(1.51671320209)/(o+1.)+(-0.00624614123899)
-        ref[3,1,1]=(1.05185683613)/(o+1.)+(0.176944781803)
-        ref[4,0,0]=(1.20432711487)/(o+1.)+(-0.229695891683)
-        ref[4,0,1]=(1.26863112516)/(o+1.)+(0.14866334031)
-        ref[4,1,0]=(0.34377834331)/(o+1.)+(-0.608034213907)
-        ref[4,1,1]=(-0.189568721058)/(o+1.)+(0.727020285914)
-        ref[5,0,0]=(0.116981035747)/(o+1.)+(-0.0311879413343)
-        ref[5,0,1]=(-0.638728138162)/(o+1.)+(-0.840334214679)
-        ref[5,1,0]=(0.891634589919)/(o+1.)+(0.349439908586)
-        ref[5,1,1]=(-0.552480077628)/(o+1.)+(-0.438505360418)
-      else:
-        arg[0,0,0]=(-0.662295604848)*x[0]+(1.04606412328)*x[1]+(-0.376008345205)*x[2]
-        arg[0,0,1]=(1.25030158303)*x[0]+(-0.0735167236581)*x[1]+(1.31623868156)*x[2]
-        arg[0,1,0]=(0.717953620717)*x[0]+(-0.700464709991)*x[1]+(0.0345381771501)*x[2]
-        arg[0,1,1]=(0.225944321569)*x[0]+(-1.09510173632)*x[1]+(-0.371235420166)*x[2]
-        arg[1,0,0]=(-0.0755865552996)*x[0]+(-0.168214695387)*x[1]+(-0.437427629408)*x[2]
-        arg[1,0,1]=(-1.52674685128)*x[0]+(-0.408158359188)*x[1]+(0.750091649824)*x[2]
-        arg[1,1,0]=(-0.572400948498)*x[0]+(-0.802826119419)*x[1]+(-1.0233358643)*x[2]
-        arg[1,1,1]=(0.623156259061)*x[0]+(0.378774331134)*x[1]+(0.0419766309042)*x[2]
-        arg[2,0,0]=(0.443271002813)*x[0]+(-0.930092172267)*x[1]+(-0.20199150178)*x[2]
-        arg[2,0,1]=(0.408614848881)*x[0]+(-1.3007040171)*x[1]+(-0.872615408174)*x[2]
-        arg[2,1,0]=(-0.174910742406)*x[0]+(1.64872582781)*x[1]+(0.701172036891)*x[2]
-        arg[2,1,1]=(0.417145974895)*x[0]+(0.428983721984)*x[1]+(-0.000787616769604)*x[2]
-        arg[3,0,0]=(0.655644872855)*x[0]+(-0.268612479186)*x[1]+(0.11779790898)*x[2]
-        arg[3,0,1]=(-0.244670332245)*x[0]+(-0.857502890419)*x[1]+(0.111792341131)*x[2]
-        arg[3,1,0]=(0.131303542183)*x[0]+(0.231230724482)*x[1]+(0.116997126513)*x[2]
-        arg[3,1,1]=(0.725434968911)*x[0]+(1.00206695553)*x[1]+(-0.319715936784)*x[2]
-        arg[4,0,0]=(1.30949067662)*x[0]+(-1.14809917605)*x[1]+(0.00529778192088)*x[2]
-        arg[4,0,1]=(0.969626585498)*x[0]+(-0.517908035476)*x[1]+(1.0467168328)*x[2]
-        arg[4,1,0]=(0.362824899886)*x[0]+(0.890586602899)*x[1]+(-0.135163953653)*x[2]
-        arg[4,1,1]=(-0.10353577028)*x[0]+(-0.0997924233294)*x[1]+(0.308973949876)*x[2]
-        arg[5,0,0]=(-1.37242244095)*x[0]+(-0.746928231432)*x[1]+(-1.37385481504)*x[2]
-        arg[5,0,1]=(0.231730881472)*x[0]+(-0.250265629505)*x[1]+(-0.903599685792)*x[2]
-        arg[5,1,0]=(-0.813783753893)*x[0]+(0.41081474894)*x[1]+(-0.541868665288)*x[2]
-        arg[5,1,1]=(0.19296641571)*x[0]+(1.8056250646)*x[1]+(0.283675443031)*x[2]
-        ref[0,0,0]=(0.859538687531)/(o+1.)+(-0.425889257151)
-        ref[0,0,1]=(-0.0674840316504)/(o+1.)+(1.28025378629)
-        ref[0,1,0]=(-0.76922088579)/(o+1.)+(0.410623986833)
-        ref[0,1,1]=(-0.582981712778)/(o+1.)+(-0.328705561068)
-        ref[1,0,0]=(1.25605113432)/(o+1.)+(-0.968640007206)
-        ref[1,0,1]=(-1.59448994908)/(o+1.)+(0.204838194218)
-        ref[1,1,0]=(-2.07497671334)/(o+1.)+(-0.161793109438)
-        ref[1,1,1]=(0.199659680372)/(o+1.)+(0.422123770364)
-        ref[2,0,0]=(-1.86970457224)/(o+1.)+(0.590445950504)
-        ref[2,0,1]=(-1.09505237157)/(o+1.)+(-0.334826102411)
-        ref[2,1,0]=(0.395146564722)/(o+1.)+(0.889920278785)
-        ref[2,1,1]=(1.13315474193)/(o+1.)+(-0.143906330909)
-        ref[3,0,0]=(-0.804398097072)/(o+1.)+(0.65461419986)
-        ref[3,0,1]=(-0.829074327243)/(o+1.)+(-0.0806532771448)
-        ref[3,1,0]=(0.126278821088)/(o+1.)+(0.176626286045)
-        ref[3,1,1]=(-0.498753315826)/(o+1.)+(0.953269651743)
-        ref[4,0,0]=(0.33849802718)/(o+1.)+(-0.0859043723417)
-        ref[4,0,1]=(0.153172891455)/(o+1.)+(0.672631245684)
-        ref[4,1,0]=(1.42803542207)/(o+1.)+(-0.154893936468)
-        ref[4,1,1]=(0.605555698814)/(o+1.)+(-0.249954971274)
-        ref[5,0,0]=(-1.21823919194)/(o+1.)+(-1.13748314774)
-        ref[5,0,1]=(-1.13684484437)/(o+1.)+(0.107355205274)
-        ref[5,1,0]=(-1.21991007491)/(o+1.)+(0.137536202333)
-        ref[5,1,1]=(2.05825898341)/(o+1.)+(0.112003969962)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.2631296794)*x[0]+(-0.130117190301)*x[1]
-        arg[0,0,0,1]=(0.635732952218)*x[0]+(-0.647555274619)*x[1]
-        arg[0,0,1,0]=(1.06301179339)*x[0]+(-0.227813591181)*x[1]
-        arg[0,0,1,1]=(-0.519979711376)*x[0]+(1.04747480856)*x[1]
-        arg[0,0,2,0]=(0.0232818794686)*x[0]+(-1.14799687633)*x[1]
-        arg[0,0,2,1]=(0.359605391616)*x[0]+(-1.32942998109)*x[1]
-        arg[0,1,0,0]=(-0.555284020205)*x[0]+(0.11676202509)*x[1]
-        arg[0,1,0,1]=(-1.83479976366)*x[0]+(0.413168061643)*x[1]
-        arg[0,1,1,0]=(0.239736306037)*x[0]+(0.680002261596)*x[1]
-        arg[0,1,1,1]=(0.0555978436642)*x[0]+(1.28910533087)*x[1]
-        arg[0,1,2,0]=(0.732696470486)*x[0]+(0.538837927425)*x[1]
-        arg[0,1,2,1]=(0.528018376979)*x[0]+(1.20428218411)*x[1]
-        arg[0,2,0,0]=(0.863803666388)*x[0]+(0.187082373754)*x[1]
-        arg[0,2,0,1]=(-1.41490739709)*x[0]+(-0.741935114995)*x[1]
-        arg[0,2,1,0]=(0.0501211708116)*x[0]+(-0.370371645307)*x[1]
-        arg[0,2,1,1]=(-0.0353423795999)*x[0]+(1.00911245551)*x[1]
-        arg[0,2,2,0]=(1.79997397117)*x[0]+(0.240103369892)*x[1]
-        arg[0,2,2,1]=(0.926052414873)*x[0]+(0.00914357056458)*x[1]
-        arg[0,3,0,0]=(-1.38911305622)*x[0]+(-1.29285413766)*x[1]
-        arg[0,3,0,1]=(0.464908270265)*x[0]+(-0.354824878801)*x[1]
-        arg[0,3,1,0]=(0.17477491298)*x[0]+(0.882807721541)*x[1]
-        arg[0,3,1,1]=(0.633177386897)*x[0]+(-0.312628707154)*x[1]
-        arg[0,3,2,0]=(0.0841289229919)*x[0]+(-0.244085514309)*x[1]
-        arg[0,3,2,1]=(0.198631529554)*x[0]+(-0.324387433152)*x[1]
-        arg[0,4,0,0]=(-1.41503119851)*x[0]+(-0.760818812719)*x[1]
-        arg[0,4,0,1]=(-0.0326236565753)*x[0]+(0.835716629913)*x[1]
-        arg[0,4,1,0]=(1.84482629546)*x[0]+(-0.341557269651)*x[1]
-        arg[0,4,1,1]=(-0.380600663728)*x[0]+(-0.295663906776)*x[1]
-        arg[0,4,2,0]=(0.411308057157)*x[0]+(1.0109767907)*x[1]
-        arg[0,4,2,1]=(-1.10494637617)*x[0]+(0.401374247774)*x[1]
-        arg[1,0,0,0]=(0.437019391027)*x[0]+(0.0507256248679)*x[1]
-        arg[1,0,0,1]=(-0.399457976892)*x[0]+(1.60118981524)*x[1]
-        arg[1,0,1,0]=(-1.51289007675)*x[0]+(0.821406477166)*x[1]
-        arg[1,0,1,1]=(0.405770274494)*x[0]+(0.637591733337)*x[1]
-        arg[1,0,2,0]=(-1.4945593715)*x[0]+(1.0919176668)*x[1]
-        arg[1,0,2,1]=(-0.482868528044)*x[0]+(0.578004764959)*x[1]
-        arg[1,1,0,0]=(-1.44298476434)*x[0]+(0.197151370973)*x[1]
-        arg[1,1,0,1]=(1.38517677391)*x[0]+(0.915352009234)*x[1]
-        arg[1,1,1,0]=(1.69025511761)*x[0]+(0.0203268727501)*x[1]
-        arg[1,1,1,1]=(0.615392847773)*x[0]+(-0.301873832451)*x[1]
-        arg[1,1,2,0]=(0.3081860115)*x[0]+(-0.495230532585)*x[1]
-        arg[1,1,2,1]=(-0.0258752746808)*x[0]+(0.441629273958)*x[1]
-        arg[1,2,0,0]=(-0.947577742489)*x[0]+(0.218632343222)*x[1]
-        arg[1,2,0,1]=(0.520029690788)*x[0]+(0.403806873912)*x[1]
-        arg[1,2,1,0]=(1.32820278922)*x[0]+(-1.68314905373)*x[1]
-        arg[1,2,1,1]=(1.30409876916)*x[0]+(-0.721819171819)*x[1]
-        arg[1,2,2,0]=(1.37872038109)*x[0]+(0.0725139769178)*x[1]
-        arg[1,2,2,1]=(0.35593830057)*x[0]+(0.28751298465)*x[1]
-        arg[1,3,0,0]=(-1.17950311406)*x[0]+(-0.232819397686)*x[1]
-        arg[1,3,0,1]=(0.17340184781)*x[0]+(-0.43329852484)*x[1]
-        arg[1,3,1,0]=(-1.71125828064)*x[0]+(0.957284609667)*x[1]
-        arg[1,3,1,1]=(-0.429043922461)*x[0]+(0.15749154348)*x[1]
-        arg[1,3,2,0]=(-1.42626208855)*x[0]+(-1.12812746347)*x[1]
-        arg[1,3,2,1]=(0.490516645689)*x[0]+(0.559039786338)*x[1]
-        arg[1,4,0,0]=(0.436395831147)*x[0]+(0.382691724897)*x[1]
-        arg[1,4,0,1]=(1.27903773839)*x[0]+(-0.0642376846324)*x[1]
-        arg[1,4,1,0]=(0.503159792753)*x[0]+(0.392973700403)*x[1]
-        arg[1,4,1,1]=(0.0881500114326)*x[0]+(0.834121935361)*x[1]
-        arg[1,4,2,0]=(-0.620745962116)*x[0]+(-0.0770814791601)*x[1]
-        arg[1,4,2,1]=(0.0231684675117)*x[0]+(-1.33994827808)*x[1]
-        arg[2,0,0,0]=(-0.972311570714)*x[0]+(-0.235293375636)*x[1]
-        arg[2,0,0,1]=(0.21633355466)*x[0]+(0.11325401613)*x[1]
-        arg[2,0,1,0]=(0.922986727965)*x[0]+(-1.00516246282)*x[1]
-        arg[2,0,1,1]=(-0.740778981838)*x[0]+(0.616728971608)*x[1]
-        arg[2,0,2,0]=(1.73201175195)*x[0]+(-1.1634325209)*x[1]
-        arg[2,0,2,1]=(1.15829744421)*x[0]+(-1.87219685708)*x[1]
-        arg[2,1,0,0]=(-0.458901790255)*x[0]+(1.13812715713)*x[1]
-        arg[2,1,0,1]=(1.03315725208)*x[0]+(-0.112487270341)*x[1]
-        arg[2,1,1,0]=(-1.7070220527)*x[0]+(0.126058081856)*x[1]
-        arg[2,1,1,1]=(0.863301459388)*x[0]+(0.226670498194)*x[1]
-        arg[2,1,2,0]=(-1.0012992544)*x[0]+(-0.195604893926)*x[1]
-        arg[2,1,2,1]=(-0.128048233768)*x[0]+(0.827383267773)*x[1]
-        arg[2,2,0,0]=(-0.0876478859699)*x[0]+(1.69600082596)*x[1]
-        arg[2,2,0,1]=(-0.616278041482)*x[0]+(-0.995548774612)*x[1]
-        arg[2,2,1,0]=(0.780699602657)*x[0]+(-0.721498796198)*x[1]
-        arg[2,2,1,1]=(-1.17591990575)*x[0]+(-0.66080847955)*x[1]
-        arg[2,2,2,0]=(1.71259481962)*x[0]+(-1.12456334234)*x[1]
-        arg[2,2,2,1]=(-0.721345747555)*x[0]+(-1.28222132706)*x[1]
-        arg[2,3,0,0]=(-1.25971324146)*x[0]+(-0.00559590465243)*x[1]
-        arg[2,3,0,1]=(-0.49234245798)*x[0]+(0.30900436328)*x[1]
-        arg[2,3,1,0]=(1.3068919966)*x[0]+(-0.891484126193)*x[1]
-        arg[2,3,1,1]=(0.319277203381)*x[0]+(-0.535113401495)*x[1]
-        arg[2,3,2,0]=(0.529480518887)*x[0]+(0.00452686996008)*x[1]
-        arg[2,3,2,1]=(-1.0978905592)*x[0]+(-0.421513714335)*x[1]
-        arg[2,4,0,0]=(-1.27711509307)*x[0]+(-1.42208296178)*x[1]
-        arg[2,4,0,1]=(-0.621292314868)*x[0]+(-1.10962518414)*x[1]
-        arg[2,4,1,0]=(-0.183478331213)*x[0]+(1.0775900659)*x[1]
-        arg[2,4,1,1]=(1.07354953663)*x[0]+(0.869765287054)*x[1]
-        arg[2,4,2,0]=(-0.696050139647)*x[0]+(-0.120769338549)*x[1]
-        arg[2,4,2,1]=(-0.895597167617)*x[0]+(1.41025466606)*x[1]
-        arg[3,0,0,0]=(1.15262876611)*x[0]+(-0.505428168285)*x[1]
-        arg[3,0,0,1]=(-0.277585299138)*x[0]+(0.352683243558)*x[1]
-        arg[3,0,1,0]=(0.218694567952)*x[0]+(-0.170325565499)*x[1]
-        arg[3,0,1,1]=(0.297325594036)*x[0]+(0.459308129811)*x[1]
-        arg[3,0,2,0]=(-0.572509624935)*x[0]+(0.756188981433)*x[1]
-        arg[3,0,2,1]=(0.226462444009)*x[0]+(-1.42100784266)*x[1]
-        arg[3,1,0,0]=(-0.28388824767)*x[0]+(-0.306064847514)*x[1]
-        arg[3,1,0,1]=(-0.805831316478)*x[0]+(0.756933495912)*x[1]
-        arg[3,1,1,0]=(1.37344361233)*x[0]+(-0.377600924857)*x[1]
-        arg[3,1,1,1]=(-0.0725302533884)*x[0]+(-0.425074450201)*x[1]
-        arg[3,1,2,0]=(-0.066659431931)*x[0]+(1.39252394891)*x[1]
-        arg[3,1,2,1]=(0.593440019224)*x[0]+(-0.945629564385)*x[1]
-        arg[3,2,0,0]=(0.101850471598)*x[0]+(0.0552356415787)*x[1]
-        arg[3,2,0,1]=(-0.407603005372)*x[0]+(-0.849371670514)*x[1]
-        arg[3,2,1,0]=(0.435403192155)*x[0]+(0.213673097377)*x[1]
-        arg[3,2,1,1]=(0.424081872219)*x[0]+(-0.0800529063085)*x[1]
-        arg[3,2,2,0]=(0.189428134309)*x[0]+(-0.205813522374)*x[1]
-        arg[3,2,2,1]=(-0.51449771505)*x[0]+(0.0570738169919)*x[1]
-        arg[3,3,0,0]=(1.05431625119)*x[0]+(-0.0583139615539)*x[1]
-        arg[3,3,0,1]=(0.0292261008496)*x[0]+(-0.569482715214)*x[1]
-        arg[3,3,1,0]=(-0.155861158232)*x[0]+(0.628422800294)*x[1]
-        arg[3,3,1,1]=(-1.24050157391)*x[0]+(-1.83949885089)*x[1]
-        arg[3,3,2,0]=(-0.140709404689)*x[0]+(0.975529832713)*x[1]
-        arg[3,3,2,1]=(-0.290824210426)*x[0]+(-0.198373932879)*x[1]
-        arg[3,4,0,0]=(0.627236720719)*x[0]+(-0.306676521516)*x[1]
-        arg[3,4,0,1]=(-0.964303098626)*x[0]+(-0.701698363587)*x[1]
-        arg[3,4,1,0]=(-0.0447860906704)*x[0]+(0.324659175162)*x[1]
-        arg[3,4,1,1]=(1.28273443124)*x[0]+(-0.764329261143)*x[1]
-        arg[3,4,2,0]=(-0.023232709502)*x[0]+(-0.124231212653)*x[1]
-        arg[3,4,2,1]=(0.510754136991)*x[0]+(0.570492207442)*x[1]
-        ref[0,0,0,0]=(0.648764087616)/(o+1.)+(-0.521005478658)
-        ref[0,0,0,1]=(-0.0127476670646)/(o+1.)+(0.000462672331599)
-        ref[0,0,1,0]=(0.258601710827)/(o+1.)+(0.288298245692)
-        ref[0,0,1,1]=(0.0577415806545)/(o+1.)+(0.234876758266)
-        ref[0,0,2,0]=(-0.91129780757)/(o+1.)+(-0.106708594644)
-        ref[0,0,2,1]=(0.0841946322525)/(o+1.)+(-0.527009610865)
-        ref[0,1,0,0]=(0.111101563297)/(o+1.)+(-0.274811779206)
-        ref[0,1,0,1]=(-0.504062576651)/(o+1.)+(-0.458784562683)
-        ref[0,1,1,0]=(0.65560969277)/(o+1.)+(0.132064437431)
-        ref[0,1,1,1]=(0.0866382135955)/(o+1.)+(0.629032480469)
-        ref[0,1,2,0]=(1.36074036394)/(o+1.)+(-0.0446029830125)
-        ref[0,1,2,1]=(1.16071753175)/(o+1.)+(0.285791514672)
-        ref[0,2,0,0]=(0.693065154772)/(o+1.)+(0.178910442685)
-        ref[0,2,0,1]=(-1.41209835364)/(o+1.)+(-0.372372079222)
-        ref[0,2,1,0]=(-0.542625642859)/(o+1.)+(0.111187584182)
-        ref[0,2,1,1]=(0.628714449405)/(o+1.)+(0.172527813253)
-        ref[0,2,2,0]=(1.62887921583)/(o+1.)+(0.205599062617)
-        ref[0,2,2,1]=(1.0640301541)/(o+1.)+(-0.0644170843301)
-        ref[0,3,0,0]=(-1.09870552313)/(o+1.)+(-0.791630835375)
-        ref[0,3,0,1]=(0.260706656546)/(o+1.)+(-0.0753116325413)
-        ref[0,3,1,0]=(-0.0543842358149)/(o+1.)+(0.555983435168)
-        ref[0,3,1,1]=(0.0369075211917)/(o+1.)+(0.141820579276)
-        ref[0,3,2,0]=(-0.784250881508)/(o+1.)+(0.312147145095)
-        ref[0,3,2,1]=(-0.178450092422)/(o+1.)+(0.0263470944113)
-        ref[0,4,0,0]=(-0.993852999635)/(o+1.)+(-0.590998505799)
-        ref[0,4,0,1]=(-0.0449039600312)/(o+1.)+(0.423998466684)
-        ref[0,4,1,0]=(0.583535069477)/(o+1.)+(0.459866978166)
-        ref[0,4,1,1]=(-0.251020886878)/(o+1.)+(-0.212621841813)
-        ref[0,4,2,0]=(0.408688561613)/(o+1.)+(0.506798143121)
-        ref[0,4,2,1]=(0.537090447747)/(o+1.)+(-0.620331288072)
-        ref[1,0,0,0]=(0.37428496839)/(o+1.)+(0.0567300237522)
-        ref[1,0,0,1]=(0.777672833448)/(o+1.)+(0.212029502451)
-        ref[1,0,1,0]=(-0.745422608709)/(o+1.)+(0.026969504563)
-        ref[1,0,1,1]=(0.466434983875)/(o+1.)+(0.288463511978)
-        ref[1,0,2,0]=(0.237457788829)/(o+1.)+(-0.320049746767)
-        ref[1,0,2,1]=(0.346974181328)/(o+1.)+(-0.125918972207)
-        ref[1,1,0,0]=(-0.823737519034)/(o+1.)+(-0.211047937165)
-        ref[1,1,0,1]=(1.00324369541)/(o+1.)+(0.648642543871)
-        ref[1,1,1,0]=(0.674013158596)/(o+1.)+(0.518284415882)
-        ref[1,1,1,1]=(0.403142463029)/(o+1.)+(-0.0448117238535)
-        ref[1,1,2,0]=(0.0399328921703)/(o+1.)+(-0.113488706628)
-        ref[1,1,2,1]=(0.111446633645)/(o+1.)+(0.152153682816)
-        ref[1,2,0,0]=(-0.481646721692)/(o+1.)+(-0.123649338787)
-        ref[1,2,0,1]=(0.857170000026)/(o+1.)+(0.033333282337)
-        ref[1,2,1,0]=(-0.445362398126)/(o+1.)+(0.0452080668082)
-        ref[1,2,1,1]=(-0.256201827386)/(o+1.)+(0.419240712362)
-        ref[1,2,2,0]=(1.02991996311)/(o+1.)+(0.210657197448)
-        ref[1,2,2,1]=(0.355299316895)/(o+1.)+(0.144075984162)
-        ref[1,3,0,0]=(-0.679726322154)/(o+1.)+(-0.366298094796)
-        ref[1,3,0,1]=(-0.67885027329)/(o+1.)+(0.20947679813)
-        ref[1,3,1,0]=(-0.163081485233)/(o+1.)+(-0.295446092868)
-        ref[1,3,1,1]=(-0.035768623673)/(o+1.)+(-0.117891877654)
-        ref[1,3,2,0]=(-0.639368943038)/(o+1.)+(-0.957510304493)
-        ref[1,3,2,1]=(0.160615066001)/(o+1.)+(0.444470683013)
-        ref[1,4,0,0]=(1.0649487216)/(o+1.)+(-0.122930582777)
-        ref[1,4,0,1]=(0.22766574122)/(o+1.)+(0.493567156271)
-        ref[1,4,1,0]=(-0.481296537412)/(o+1.)+(0.688715015285)
-        ref[1,4,1,1]=(-0.195268237132)/(o+1.)+(0.558770091963)
-        ref[1,4,2,0]=(0.180618258117)/(o+1.)+(-0.439222849696)
-        ref[1,4,2,1]=(0.0261012984826)/(o+1.)+(-0.671440554524)
-        ref[2,0,0,0]=(-0.301101739758)/(o+1.)+(-0.453251603296)
-        ref[2,0,0,1]=(0.00878006761908)/(o+1.)+(0.160403751586)
-        ref[2,0,1,0]=(-0.80011300584)/(o+1.)+(0.35896863549)
-        ref[2,0,1,1]=(0.00248831604776)/(o+1.)+(-0.0632691631389)
-        ref[2,0,2,0]=(-0.0569220251136)/(o+1.)+(0.312750628078)
-        ref[2,0,2,1]=(-0.440109525096)/(o+1.)+(-0.136894943888)
-        ref[2,1,0,0]=(-0.465652661854)/(o+1.)+(0.572439014362)
-        ref[2,1,0,1]=(0.0522958647723)/(o+1.)+(0.434187058485)
-        ref[2,1,1,0]=(0.00194260180185)/(o+1.)+(-0.791453286324)
-        ref[2,1,1,1]=(0.981996325082)/(o+1.)+(0.0539878162501)
-        ref[2,1,2,0]=(-0.243334369882)/(o+1.)+(-0.476784889223)
-        ref[2,1,2,1]=(1.53208640175)/(o+1.)+(-0.416375683873)
-        ref[2,2,0,0]=(1.27849139532)/(o+1.)+(0.164930772337)
-        ref[2,2,0,1]=(-1.4813889023)/(o+1.)+(-0.0652189568992)
-        ref[2,2,1,0]=(-0.728282325831)/(o+1.)+(0.393741566145)
-        ref[2,2,1,1]=(-0.537765426582)/(o+1.)+(-0.649481479359)
-        ref[2,2,2,0]=(-0.266224153785)/(o+1.)+(0.427127815533)
-        ref[2,2,2,1]=(-0.862349098277)/(o+1.)+(-0.570608988167)
-        ref[2,3,0,0]=(-1.09340368619)/(o+1.)+(-0.0859527299593)
-        ref[2,3,0,1]=(1.02842400947)/(o+1.)+(-0.605881052086)
-        ref[2,3,1,0]=(0.0131810342609)/(o+1.)+(0.20111341807)
-        ref[2,3,1,1]=(-1.11244447248)/(o+1.)+(0.448304137186)
-        ref[2,3,2,0]=(-0.978348257673)/(o+1.)+(0.75617782326)
-        ref[2,3,2,1]=(-0.140801959181)/(o+1.)+(-0.689301157175)
-        ref[2,4,0,0]=(-0.733659962936)/(o+1.)+(-0.982769045955)
-        ref[2,4,0,1]=(-1.6278906672)/(o+1.)+(-0.0515134159034)
-        ref[2,4,1,0]=(1.52117858199)/(o+1.)+(-0.313533423654)
-        ref[2,4,1,1]=(0.621221455007)/(o+1.)+(0.661046684337)
-        ref[2,4,2,0]=(-0.157580028393)/(o+1.)+(-0.329619724901)
-        ref[2,4,2,1]=(0.52303412622)/(o+1.)+(-0.00418831388809)
-        ref[3,0,0,0]=(0.337890126112)/(o+1.)+(0.154655235856)
-        ref[3,0,0,1]=(-0.100490423466)/(o+1.)+(0.0877941839427)
-        ref[3,0,1,0]=(0.37549944857)/(o+1.)+(-0.163565223059)
-        ref[3,0,1,1]=(-0.3212149071)/(o+1.)+(0.538924315474)
-        ref[3,0,2,0]=(-0.359815373231)/(o+1.)+(0.271747364864)
-        ref[3,0,2,1]=(-0.890575856923)/(o+1.)+(-0.151984770865)
-        ref[3,1,0,0]=(-1.10384271628)/(o+1.)+(0.256944810546)
-        ref[3,1,0,1]=(0.647425296535)/(o+1.)+(-0.348161558551)
-        ref[3,1,1,0]=(1.41806770884)/(o+1.)+(-0.211112510685)
-        ref[3,1,1,1]=(0.106528838317)/(o+1.)+(-0.302066770953)
-        ref[3,1,2,0]=(0.917213295746)/(o+1.)+(0.204325610614)
-        ref[3,1,2,1]=(-0.24738513406)/(o+1.)+(-0.0524022055505)
-        ref[3,2,0,0]=(-0.0537683888373)/(o+1.)+(0.105427251007)
-        ref[3,2,0,1]=(-1.24647336894)/(o+1.)+(-0.00525065347416)
-        ref[3,2,1,0]=(0.187132797735)/(o+1.)+(0.230971745898)
-        ref[3,2,1,1]=(0.492750417331)/(o+1.)+(-0.0743607257106)
-        ref[3,2,2,0]=(0.062835017839)/(o+1.)+(-0.0396102029518)
-        ref[3,2,2,1]=(-0.967272854749)/(o+1.)+(0.254924478345)
-        ref[3,3,0,0]=(1.41291903854)/(o+1.)+(-0.208458374448)
-        ref[3,3,0,1]=(-0.740922121718)/(o+1.)+(0.100332753677)
-        ref[3,3,1,0]=(1.2839228132)/(o+1.)+(-0.405680585568)
-        ref[3,3,1,1]=(-1.69516258968)/(o+1.)+(-0.69241891756)
-        ref[3,3,2,0]=(0.216594952745)/(o+1.)+(0.309112737639)
-        ref[3,3,2,1]=(-0.634806027047)/(o+1.)+(0.0728039418712)
-        ref[3,4,0,0]=(-0.310491357088)/(o+1.)+(0.315525778146)
-        ref[3,4,0,1]=(-0.751915044154)/(o+1.)+(-0.457043209029)
-        ref[3,4,1,0]=(-0.339963591836)/(o+1.)+(0.309918338163)
-        ref[3,4,1,1]=(0.0720250143477)/(o+1.)+(0.223190077872)
-        ref[3,4,2,0]=(-0.0508554115866)/(o+1.)+(-0.0483042552841)
-        ref[3,4,2,1]=(0.754037720807)/(o+1.)+(0.163604311813)
-      else:
-        arg[0,0,0,0]=(-1.24350959032)*x[0]+(-0.580181370761)*x[1]+(-0.174543112173)*x[2]
-        arg[0,0,0,1]=(1.43450421585)*x[0]+(0.717062915298)*x[1]+(-0.91866562143)*x[2]
-        arg[0,0,1,0]=(0.0188823859409)*x[0]+(1.24568141807)*x[1]+(0.0842604494481)*x[2]
-        arg[0,0,1,1]=(0.871591276766)*x[0]+(0.653031319605)*x[1]+(0.037714556611)*x[2]
-        arg[0,0,2,0]=(1.60473786555)*x[0]+(1.47509195705)*x[1]+(-0.103485610136)*x[2]
-        arg[0,0,2,1]=(1.68030531336)*x[0]+(0.551201281257)*x[1]+(1.26951824468)*x[2]
-        arg[0,1,0,0]=(0.491638014782)*x[0]+(1.26264219762)*x[1]+(-0.921297094204)*x[2]
-        arg[0,1,0,1]=(0.20108233628)*x[0]+(-1.36096031252)*x[1]+(-0.878077046379)*x[2]
-        arg[0,1,1,0]=(0.900775475455)*x[0]+(0.193423726606)*x[1]+(-0.139955126775)*x[2]
-        arg[0,1,1,1]=(-0.0354326925578)*x[0]+(-0.464646718718)*x[1]+(1.49240476583)*x[2]
-        arg[0,1,2,0]=(-1.40991971664)*x[0]+(-1.7747715584)*x[1]+(-0.96387650203)*x[2]
-        arg[0,1,2,1]=(-0.476443682267)*x[0]+(0.55076135194)*x[1]+(0.190289559512)*x[2]
-        arg[0,2,0,0]=(0.535490315669)*x[0]+(0.566915366497)*x[1]+(-0.41513643529)*x[2]
-        arg[0,2,0,1]=(-0.18986562478)*x[0]+(-0.62347050233)*x[1]+(1.18004907973)*x[2]
-        arg[0,2,1,0]=(-0.288440432828)*x[0]+(0.0375642125411)*x[1]+(0.574653643212)*x[2]
-        arg[0,2,1,1]=(1.03327739612)*x[0]+(-0.0443874572943)*x[1]+(0.972142765323)*x[2]
-        arg[0,2,2,0]=(-1.27131901306)*x[0]+(0.619179457229)*x[1]+(-0.436029340417)*x[2]
-        arg[0,2,2,1]=(0.0573099137019)*x[0]+(0.211373076629)*x[1]+(0.859991510967)*x[2]
-        arg[0,3,0,0]=(0.650974277613)*x[0]+(-0.926352792387)*x[1]+(-1.84479828618)*x[2]
-        arg[0,3,0,1]=(-0.293748564815)*x[0]+(0.53683587198)*x[1]+(1.51147453744)*x[2]
-        arg[0,3,1,0]=(0.837889627485)*x[0]+(0.62568225238)*x[1]+(0.365321068424)*x[2]
-        arg[0,3,1,1]=(-0.671841278343)*x[0]+(-0.00822894090357)*x[1]+(-1.35180265459)*x[2]
-        arg[0,3,2,0]=(0.823443588183)*x[0]+(-0.366903894987)*x[1]+(-0.878402795844)*x[2]
-        arg[0,3,2,1]=(-0.856292830088)*x[0]+(-0.134584368493)*x[1]+(-0.299126849425)*x[2]
-        arg[0,4,0,0]=(0.62792423481)*x[0]+(0.781414088068)*x[1]+(-1.12299220031)*x[2]
-        arg[0,4,0,1]=(-0.00743646774917)*x[0]+(0.52784004028)*x[1]+(-1.44284109205)*x[2]
-        arg[0,4,1,0]=(-0.855519018884)*x[0]+(-0.222306698876)*x[1]+(0.0502517275952)*x[2]
-        arg[0,4,1,1]=(-0.311060622512)*x[0]+(0.321283094479)*x[1]+(-0.484147152851)*x[2]
-        arg[0,4,2,0]=(-1.43220161062)*x[0]+(-0.27822988291)*x[1]+(-0.692367106541)*x[2]
-        arg[0,4,2,1]=(1.3956686934)*x[0]+(-1.26426333906)*x[1]+(-1.09343602989)*x[2]
-        arg[1,0,0,0]=(0.122525927098)*x[0]+(-0.484009414389)*x[1]+(-0.822036495419)*x[2]
-        arg[1,0,0,1]=(-0.276748173334)*x[0]+(0.35307031133)*x[1]+(-1.23466402387)*x[2]
-        arg[1,0,1,0]=(-0.479355493223)*x[0]+(-0.56368304348)*x[1]+(0.54679107219)*x[2]
-        arg[1,0,1,1]=(-0.483618214285)*x[0]+(1.60438722757)*x[1]+(0.542389963596)*x[2]
-        arg[1,0,2,0]=(0.130988624202)*x[0]+(-0.449468495509)*x[1]+(0.254640520023)*x[2]
-        arg[1,0,2,1]=(1.13790232796)*x[0]+(-0.716218913004)*x[1]+(-0.193031264955)*x[2]
-        arg[1,1,0,0]=(-0.0653152151059)*x[0]+(1.07890922508)*x[1]+(0.324995864884)*x[2]
-        arg[1,1,0,1]=(0.769151345051)*x[0]+(-1.35911748672)*x[1]+(0.299326803785)*x[2]
-        arg[1,1,1,0]=(-0.431128032697)*x[0]+(1.09261915758)*x[1]+(-0.029871998484)*x[2]
-        arg[1,1,1,1]=(-0.922618915502)*x[0]+(1.30318141394)*x[1]+(-0.324039981399)*x[2]
-        arg[1,1,2,0]=(-0.668178375077)*x[0]+(0.132203602988)*x[1]+(0.236035070297)*x[2]
-        arg[1,1,2,1]=(-0.518594419598)*x[0]+(-0.0429695477263)*x[1]+(1.11877941395)*x[2]
-        arg[1,2,0,0]=(0.610776644247)*x[0]+(-0.023900598958)*x[1]+(0.0480141870788)*x[2]
-        arg[1,2,0,1]=(0.562736426016)*x[0]+(-0.294969624732)*x[1]+(-0.23898469143)*x[2]
-        arg[1,2,1,0]=(0.645173726197)*x[0]+(-1.18365074993)*x[1]+(0.102581636468)*x[2]
-        arg[1,2,1,1]=(-0.518976597355)*x[0]+(0.372817596528)*x[1]+(0.49035249397)*x[2]
-        arg[1,2,2,0]=(0.0192623731103)*x[0]+(-0.241279406644)*x[1]+(-0.420015571981)*x[2]
-        arg[1,2,2,1]=(0.318641827599)*x[0]+(-1.5357263392)*x[1]+(0.350150621892)*x[2]
-        arg[1,3,0,0]=(-0.719401628191)*x[0]+(-1.77806447133)*x[1]+(1.19750443209)*x[2]
-        arg[1,3,0,1]=(-1.00122204304)*x[0]+(0.675162216383)*x[1]+(1.1180105058)*x[2]
-        arg[1,3,1,0]=(0.331149947519)*x[0]+(0.310832741708)*x[1]+(0.087866556795)*x[2]
-        arg[1,3,1,1]=(-0.156343054316)*x[0]+(1.00796776488)*x[1]+(-1.53460740228)*x[2]
-        arg[1,3,2,0]=(0.714240747972)*x[0]+(0.968170992322)*x[1]+(-0.962819191598)*x[2]
-        arg[1,3,2,1]=(-0.200412114379)*x[0]+(-0.173781234544)*x[1]+(0.899584749309)*x[2]
-        arg[1,4,0,0]=(-1.38011177642)*x[0]+(-0.316506470647)*x[1]+(0.266952180469)*x[2]
-        arg[1,4,0,1]=(0.343359684584)*x[0]+(-1.13244466712)*x[1]+(-0.81840155125)*x[2]
-        arg[1,4,1,0]=(0.295299129957)*x[0]+(0.199810907018)*x[1]+(0.631717407771)*x[2]
-        arg[1,4,1,1]=(-0.46840784478)*x[0]+(-0.402683932206)*x[1]+(-0.782209293177)*x[2]
-        arg[1,4,2,0]=(-1.8006389736)*x[0]+(0.119727360087)*x[1]+(0.482076626168)*x[2]
-        arg[1,4,2,1]=(0.96553885281)*x[0]+(0.425097333238)*x[1]+(0.54533551085)*x[2]
-        arg[2,0,0,0]=(0.932725602425)*x[0]+(-0.513780652569)*x[1]+(0.275742915648)*x[2]
-        arg[2,0,0,1]=(1.10053578072)*x[0]+(0.787895323287)*x[1]+(-1.46544221328)*x[2]
-        arg[2,0,1,0]=(0.83657269666)*x[0]+(-1.15717482853)*x[1]+(1.1090271297)*x[2]
-        arg[2,0,1,1]=(1.59370135994)*x[0]+(0.452015708845)*x[1]+(0.0862230059082)*x[2]
-        arg[2,0,2,0]=(-0.954832509866)*x[0]+(0.51192257473)*x[1]+(-1.48499771643)*x[2]
-        arg[2,0,2,1]=(-0.556993361475)*x[0]+(0.438110051421)*x[1]+(0.237254018143)*x[2]
-        arg[2,1,0,0]=(-0.318980966383)*x[0]+(-0.263071719097)*x[1]+(-0.348122442404)*x[2]
-        arg[2,1,0,1]=(0.100191287326)*x[0]+(-0.422996999974)*x[1]+(-0.850702087112)*x[2]
-        arg[2,1,1,0]=(-0.198942237141)*x[0]+(0.277459568173)*x[1]+(-1.66195774421)*x[2]
-        arg[2,1,1,1]=(-1.62211381863)*x[0]+(-0.13417844308)*x[1]+(1.07441481356)*x[2]
-        arg[2,1,2,0]=(-0.183120762554)*x[0]+(-0.158546687568)*x[1]+(1.05938565108)*x[2]
-        arg[2,1,2,1]=(-0.530596736933)*x[0]+(-0.507872303289)*x[1]+(0.0437745116021)*x[2]
-        arg[2,2,0,0]=(-0.430338834548)*x[0]+(-1.01989755268)*x[1]+(0.0364152729771)*x[2]
-        arg[2,2,0,1]=(-0.55129175645)*x[0]+(0.283907226465)*x[1]+(0.281403899376)*x[2]
-        arg[2,2,1,0]=(0.119036949181)*x[0]+(0.187265158741)*x[1]+(-0.0845814658663)*x[2]
-        arg[2,2,1,1]=(1.39900884968)*x[0]+(1.42806588781)*x[1]+(0.211444691268)*x[2]
-        arg[2,2,2,0]=(-0.609664666581)*x[0]+(-0.29988332429)*x[1]+(-0.28125800646)*x[2]
-        arg[2,2,2,1]=(-1.77545247157)*x[0]+(0.337828315779)*x[1]+(-0.239141292616)*x[2]
-        arg[2,3,0,0]=(-1.23141604656)*x[0]+(0.322998749903)*x[1]+(-1.70685281816)*x[2]
-        arg[2,3,0,1]=(-1.4416737434)*x[0]+(1.49740114642)*x[1]+(0.732057753882)*x[2]
-        arg[2,3,1,0]=(-1.59112622077)*x[0]+(0.665317566947)*x[1]+(0.826417253499)*x[2]
-        arg[2,3,1,1]=(-1.22000830454)*x[0]+(0.618713896065)*x[1]+(1.27354984534)*x[2]
-        arg[2,3,2,0]=(0.125639723221)*x[0]+(0.663241510656)*x[1]+(-0.426459288281)*x[2]
-        arg[2,3,2,1]=(1.39120212155)*x[0]+(0.9115748844)*x[1]+(1.77889030223)*x[2]
-        arg[2,4,0,0]=(-0.217927656387)*x[0]+(1.20391185439)*x[1]+(-0.188197734908)*x[2]
-        arg[2,4,0,1]=(-0.442009082947)*x[0]+(0.399477101959)*x[1]+(-1.33974368956)*x[2]
-        arg[2,4,1,0]=(0.636534809382)*x[0]+(0.872923470503)*x[1]+(-0.922286702006)*x[2]
-        arg[2,4,1,1]=(-0.831840624431)*x[0]+(0.946223248622)*x[1]+(0.380300039133)*x[2]
-        arg[2,4,2,0]=(0.0803088903901)*x[0]+(-0.857685204574)*x[1]+(-0.479475079431)*x[2]
-        arg[2,4,2,1]=(-1.7233942516)*x[0]+(-1.38771345941)*x[1]+(0.761958201633)*x[2]
-        arg[3,0,0,0]=(-0.738032075796)*x[0]+(1.33264583681)*x[1]+(-1.21101988385)*x[2]
-        arg[3,0,0,1]=(1.40336327022)*x[0]+(-0.77078885213)*x[1]+(1.70960627204)*x[2]
-        arg[3,0,1,0]=(0.452477629041)*x[0]+(0.235432009434)*x[1]+(1.69314009822)*x[2]
-        arg[3,0,1,1]=(-0.816213143646)*x[0]+(-1.42050350309)*x[1]+(-0.0806105456758)*x[2]
-        arg[3,0,2,0]=(0.0400708086023)*x[0]+(-0.336948609628)*x[1]+(-0.113687293995)*x[2]
-        arg[3,0,2,1]=(0.414077492095)*x[0]+(-1.06937716207)*x[1]+(1.25972041173)*x[2]
-        arg[3,1,0,0]=(-1.02975555201)*x[0]+(-0.123306171085)*x[1]+(-1.74750909033)*x[2]
-        arg[3,1,0,1]=(-1.01988698009)*x[0]+(-0.142188487205)*x[1]+(0.274514515492)*x[2]
-        arg[3,1,1,0]=(0.440626586141)*x[0]+(-0.0569580581917)*x[1]+(-0.77065631367)*x[2]
-        arg[3,1,1,1]=(0.987903067972)*x[0]+(-1.47543187274)*x[1]+(-0.0888962732893)*x[2]
-        arg[3,1,2,0]=(0.150506204416)*x[0]+(0.035476396146)*x[1]+(-0.852061690418)*x[2]
-        arg[3,1,2,1]=(-1.15179800132)*x[0]+(-0.425570974979)*x[1]+(1.10092214699)*x[2]
-        arg[3,2,0,0]=(1.01255188057)*x[0]+(1.24279465527)*x[1]+(1.25190246102)*x[2]
-        arg[3,2,0,1]=(-1.16275538385)*x[0]+(1.13672085108)*x[1]+(0.131953731231)*x[2]
-        arg[3,2,1,0]=(0.774290747173)*x[0]+(0.275410883089)*x[1]+(-0.825692266439)*x[2]
-        arg[3,2,1,1]=(-1.07241838074)*x[0]+(-0.0974675737726)*x[1]+(1.1856849697)*x[2]
-        arg[3,2,2,0]=(0.234209248938)*x[0]+(0.756893234577)*x[1]+(-0.365141055079)*x[2]
-        arg[3,2,2,1]=(-1.6668858309)*x[0]+(-0.916769120288)*x[1]+(-0.716365681217)*x[2]
-        arg[3,3,0,0]=(-0.36890215249)*x[0]+(-0.581062815398)*x[1]+(1.6280164507)*x[2]
-        arg[3,3,0,1]=(-0.933634743559)*x[0]+(-0.0657657779145)*x[1]+(1.35011362804)*x[2]
-        arg[3,3,1,0]=(1.13739289322)*x[0]+(0.0103208127738)*x[1]+(1.01628193014)*x[2]
-        arg[3,3,1,1]=(0.037979696459)*x[0]+(-1.76926650495)*x[1]+(-1.28602572757)*x[2]
-        arg[3,3,2,0]=(0.797830431467)*x[0]+(0.732108360923)*x[1]+(-0.436390867333)*x[2]
-        arg[3,3,2,1]=(-0.571865447888)*x[0]+(0.895109047357)*x[1]+(-0.673234648776)*x[2]
-        arg[3,4,0,0]=(-1.59667195158)*x[0]+(-1.06146105331)*x[1]+(-1.81255923783)*x[2]
-        arg[3,4,0,1]=(-0.0721327214647)*x[0]+(1.23982376787)*x[1]+(1.43101011)*x[2]
-        arg[3,4,1,0]=(0.117288395573)*x[0]+(-0.37678966212)*x[1]+(-1.14107285089)*x[2]
-        arg[3,4,1,1]=(-0.303270532321)*x[0]+(1.33784402324)*x[1]+(-0.651624796413)*x[2]
-        arg[3,4,2,0]=(0.215849013256)*x[0]+(0.247315697644)*x[1]+(0.404644392153)*x[2]
-        arg[3,4,2,1]=(0.975781190478)*x[0]+(-0.252285063767)*x[1]+(-0.145694910854)*x[2]
-        ref[0,0,0,0]=(-0.718934738033)/(o+1.)+(-0.639649667608)
-        ref[0,0,0,1]=(1.01007662915)/(o+1.)+(0.111412440284)
-        ref[0,0,1,0]=(0.827868953278)/(o+1.)+(0.26047765009)
-        ref[0,0,1,1]=(1.48122352358)/(o+1.)+(0.0405568147034)
-        ref[0,0,2,0]=(1.33282099436)/(o+1.)+(0.821761609054)
-        ref[0,0,2,1]=(1.65298089862)/(o+1.)+(0.924021970342)
-        ref[0,1,0,0]=(0.930162571453)/(o+1.)+(-0.0485897266263)
-        ref[0,1,0,1]=(-0.347599158269)/(o+1.)+(-0.845177932176)
-        ref[0,1,1,0]=(0.623152121663)/(o+1.)+(0.165545976811)
-        ref[0,1,1,1]=(0.0506217690841)/(o+1.)+(0.470851792737)
-        ref[0,1,2,0]=(-1.99181491207)/(o+1.)+(-1.0783764325)
-        ref[0,1,2,1]=(-0.731065007801)/(o+1.)+(0.497836118493)
-        ref[0,2,0,0]=(-0.0812249009151)/(o+1.)+(0.384247073896)
-        ref[0,2,0,1]=(-0.115768505253)/(o+1.)+(0.241240728938)
-        ref[0,2,1,0]=(0.152728009607)/(o+1.)+(0.0855247066589)
-        ref[0,2,1,1]=(1.43086526503)/(o+1.)+(0.265083719563)
-        ref[0,2,2,0]=(-0.967906369418)/(o+1.)+(-0.060131263415)
-        ref[0,2,2,1]=(-0.269269238419)/(o+1.)+(0.698971869859)
-        ref[0,3,0,0]=(-1.71659801402)/(o+1.)+(-0.201789393467)
-        ref[0,3,0,1]=(0.265343635273)/(o+1.)+(0.744609104665)
-        ref[0,3,1,0]=(1.83021875237)/(o+1.)+(-0.000662902039879)
-        ref[0,3,1,1]=(-0.317529833375)/(o+1.)+(-0.857171520229)
-        ref[0,3,2,0]=(-0.705757693524)/(o+1.)+(0.141947295438)
-        ref[0,3,2,1]=(-1.27000495392)/(o+1.)+(-0.00999954704202)
-        ref[0,4,0,0]=(0.061892522425)/(o+1.)+(0.112226800069)
-        ref[0,4,0,1]=(-0.747062267148)/(o+1.)+(-0.0876876261864)
-        ref[0,4,1,0]=(-1.19488448842)/(o+1.)+(0.0836552491261)
-        ref[0,4,1,1]=(1.36573976292)/(o+1.)+(-0.9198322219)
-        ref[0,4,2,0]=(-1.67982141697)/(o+1.)+(-0.361488591554)
-        ref[0,4,2,1]=(-0.598050084547)/(o+1.)+(-0.181990295501)
-        ref[1,0,0,0]=(-2.45927674426)/(o+1.)+(0.637878380777)
-        ref[1,0,0,1]=(-0.575223026885)/(o+1.)+(-0.291559429493)
-        ref[1,0,1,0]=(0.0871765959469)/(o+1.)+(-0.29171203023)
-        ref[1,0,1,1]=(0.94050575309)/(o+1.)+(0.361326611893)
-        ref[1,0,2,0]=(-0.306500880914)/(o+1.)+(0.121330764815)
-        ref[1,0,2,1]=(1.60748296414)/(o+1.)+(-0.689415407072)
-        ref[1,1,0,0]=(0.640401899755)/(o+1.)+(0.34909398755)
-        ref[1,1,0,1]=(0.134022909144)/(o+1.)+(-0.212331123516)
-        ref[1,1,1,0]=(0.248008519593)/(o+1.)+(0.191805303402)
-        ref[1,1,1,1]=(0.638911732328)/(o+1.)+(-0.291194607647)
-        ref[1,1,2,0]=(0.109264462855)/(o+1.)+(-0.204602082323)
-        ref[1,1,2,1]=(-0.185963112656)/(o+1.)+(0.371589279643)
-        ref[1,2,0,0]=(-0.590669733193)/(o+1.)+(0.61277998278)
-        ref[1,2,0,1]=(-1.15856908266)/(o+1.)+(0.593675596257)
-        ref[1,2,1,0]=(-0.451642187813)/(o+1.)+(0.00787340027166)
-        ref[1,2,1,1]=(-0.428757501259)/(o+1.)+(0.386475497201)
-        ref[1,2,2,0]=(-0.414532914271)/(o+1.)+(-0.113749845622)
-        ref[1,2,2,1]=(-0.513613710163)/(o+1.)+(-0.176660089771)
-        ref[1,3,0,0]=(-0.890487934256)/(o+1.)+(-0.20473686659)
-        ref[1,3,0,1]=(1.64512779208)/(o+1.)+(-0.426588556466)
-        ref[1,3,1,0]=(0.831527595966)/(o+1.)+(-0.0508391749725)
-        ref[1,3,1,1]=(-0.718921003194)/(o+1.)+(0.0179691557385)
-        ref[1,3,2,0]=(0.405959213301)/(o+1.)+(0.156816667697)
-        ref[1,3,2,1]=(0.426319486322)/(o+1.)+(0.0495359570318)
-        ref[1,4,0,0]=(-1.11364330874)/(o+1.)+(-0.158011378929)
-        ref[1,4,0,1]=(-0.0993967101457)/(o+1.)+(-0.754044911817)
-        ref[1,4,1,0]=(0.979493241598)/(o+1.)+(0.0736671015741)
-        ref[1,4,1,1]=(-1.78692478393)/(o+1.)+(0.0668118568857)
-        ref[1,4,2,0]=(-0.691473647622)/(o+1.)+(-0.253680669863)
-        ref[1,4,2,1]=(1.16914997228)/(o+1.)+(0.383410862311)
-        ref[2,0,0,0]=(0.790187638399)/(o+1.)+(-0.047749886448)
-        ref[2,0,0,1]=(0.429625240932)/(o+1.)+(-0.00331817510394)
-        ref[2,0,1,0]=(-0.101344997877)/(o+1.)+(0.444884997853)
-        ref[2,0,1,1]=(2.15519953039)/(o+1.)+(-0.0116297278494)
-        ref[2,0,2,0]=(-1.40159594866)/(o+1.)+(-0.263155851453)
-        ref[2,0,2,1]=(-0.658391287862)/(o+1.)+(0.388380997976)
-        ref[2,1,0,0]=(-0.773933630328)/(o+1.)+(-0.0781207487777)
-        ref[2,1,0,1]=(0.0015551432788)/(o+1.)+(-0.587531471519)
-        ref[2,1,1,0]=(0.122693324758)/(o+1.)+(-0.853066868967)
-        ref[2,1,1,1]=(-0.219255630453)/(o+1.)+(-0.231310908847)
-        ref[2,1,2,0]=(1.33176471286)/(o+1.)+(-0.307023255951)
-        ref[2,1,2,1]=(-1.67471265259)/(o+1.)+(0.340009061986)
-        ref[2,2,0,0]=(-0.727222063897)/(o+1.)+(-0.343299525178)
-        ref[2,2,0,1]=(-1.87667590405)/(o+1.)+(0.945347636719)
-        ref[2,2,1,0]=(0.776003927859)/(o+1.)+(-0.277141642902)
-        ref[2,2,1,1]=(1.62850322537)/(o+1.)+(0.705008101698)
-        ref[2,2,2,0]=(1.31869548331)/(o+1.)+(-1.25475074032)
-        ref[2,2,2,1]=(-1.71691241115)/(o+1.)+(0.0200734813728)
-        ref[2,3,0,0]=(-0.37741220744)/(o+1.)+(-1.11892895368)
-        ref[2,3,0,1]=(0.684763737686)/(o+1.)+(0.0515107096073)
-        ref[2,3,1,0]=(-0.0572023243047)/(o+1.)+(-0.0210945380092)
-        ref[2,3,1,1]=(0.031457290932)/(o+1.)+(0.320399072966)
-        ref[2,3,2,0]=(-0.71613334286)/(o+1.)+(0.539277644228)
-        ref[2,3,2,1]=(2.10068005021)/(o+1.)+(0.990493628981)
-        ref[2,4,0,0]=(0.830379294407)/(o+1.)+(-0.016296415655)
-        ref[2,4,0,1]=(-1.05197706105)/(o+1.)+(-0.165149304749)
-        ref[2,4,1,0]=(-0.0854959336547)/(o+1.)+(0.336333755767)
-        ref[2,4,1,1]=(1.15845594915)/(o+1.)+(-0.331886642912)
-        ref[2,4,2,0]=(-1.25248721318)/(o+1.)+(-0.00218209021539)
-        ref[2,4,2,1]=(-0.991752052473)/(o+1.)+(-0.678698728452)
-        ref[3,0,0,0]=(-0.262071815816)/(o+1.)+(-0.177167153508)
-        ref[3,0,0,1]=(1.20598261029)/(o+1.)+(0.568099039922)
-        ref[3,0,1,0]=(1.21237099375)/(o+1.)+(0.584339371474)
-        ref[3,0,1,1]=(-1.04628498282)/(o+1.)+(-0.635521104799)
-        ref[3,0,2,0]=(0.630843868383)/(o+1.)+(-0.520704481702)
-        ref[3,0,2,1]=(1.56136208039)/(o+1.)+(-0.478470669318)
-        ref[3,1,0,0]=(-0.372752943047)/(o+1.)+(-1.26390893519)
-        ref[3,1,0,1]=(0.192139112377)/(o+1.)+(-0.53985003209)
-        ref[3,1,1,0]=(-1.18480584023)/(o+1.)+(0.398909027255)
-        ref[3,1,1,1]=(0.402069277892)/(o+1.)+(-0.489247177975)
-        ref[3,1,2,0]=(0.27608763117)/(o+1.)+(-0.471083360513)
-        ref[3,1,2,1]=(-0.273636427696)/(o+1.)+(-0.101405200809)
-        ref[3,2,0,0]=(1.92572771773)/(o+1.)+(0.790760639563)
-        ref[3,2,0,1]=(0.16264122626)/(o+1.)+(-0.0283610138982)
-        ref[3,2,1,0]=(0.377561018039)/(o+1.)+(-0.076775827108)
-        ref[3,2,1,1]=(-0.652466873272)/(o+1.)+(0.334132944227)
-        ref[3,2,2,0]=(-0.0304721826842)/(o+1.)+(0.32821680556)
-        ref[3,2,2,1]=(-1.52932569088)/(o+1.)+(-0.885347470761)
-        ref[3,3,0,0]=(-0.451938162279)/(o+1.)+(0.564994822546)
-        ref[3,3,0,1]=(-0.477583137662)/(o+1.)+(0.414148122113)
-        ref[3,3,1,0]=(1.38037325689)/(o+1.)+(0.391811189625)
-        ref[3,3,1,1]=(-1.01333159097)/(o+1.)+(-1.00199047255)
-        ref[3,3,2,0]=(1.3222644334)/(o+1.)+(-0.114358254173)
-        ref[3,3,2,1]=(-0.248989333346)/(o+1.)+(-0.0505008579799)
-        ref[3,4,0,0]=(-1.92196761736)/(o+1.)+(-1.27436231268)
-        ref[3,4,0,1]=(0.894404962457)/(o+1.)+(0.852148096971)
-        ref[3,4,1,0]=(0.868763436571)/(o+1.)+(-1.134668777)
-        ref[3,4,1,1]=(0.438747123022)/(o+1.)+(-0.0278992142568)
-        ref[3,4,2,0]=(0.532575431402)/(o+1.)+(0.167616835826)
-        ref[3,4,2,1]=(0.796744496799)/(o+1.)+(-0.109471640471)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 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 the 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.217470460227)*x[0]**o+(0.664132905811)*x[0]+(0.493878617743)*x[1]**o+(0.111327715714)*x[1]
-        ref=(0.276408157516)/(o+1.)+(0.387730310763)
-      else:
-        arg=(0.371937838886)*x[0]**o+(0.653846807778)*x[0]+(0.172358058188)*x[1]**o+(-0.928017916614)*x[1]+(0.116156616174)*x[2]**o+(0.371332501889)*x[2]
-        ref=(0.660452513249)/(o+1.)+(0.0485806965265)
-      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 the 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,(2,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(-0.329952046701)*x[0]**o+(0.12757022314)*x[0]+(0.198280362833)*x[1]**o+(0.129179854334)*x[1]
-        arg[1]=(0.185895161332)*x[0]**o+(0.270740935936)*x[0]+(0.630122833594)*x[1]**o+(-0.0696403698787)*x[1]
-        ref[0]=(-0.131671683869)/(o+1.)+(0.128375038737)
-        ref[1]=(0.816017994925)/(o+1.)+(0.100550283029)
-      else:
-        arg[0]=(0.526257699936)*x[0]**o+(0.0731442796396)*x[0]+(-0.266121642119)*x[1]**o+(-0.929478242136)*x[1]+(0.743092861949)*x[2]**o+(0.22690419858)*x[2]
-        arg[1]=(-0.121387039147)*x[0]**o+(-0.0580608263784)*x[0]+(0.761164059949)*x[1]**o+(0.821938972431)*x[1]+(-0.756423175962)*x[2]**o+(0.213207132353)*x[2]
-        ref[0]=(1.00322891977)/(o+1.)+(-0.314714881958)
-        ref[1]=(-0.11664615516)/(o+1.)+(0.488542639203)
-      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_onFunction_fromData_Function_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.963318847499)*x[0]**o+(-0.184977238308)*x[0]+(0.153633231879)*x[1]**o+(-0.640028315216)*x[1]
-        arg[0,1]=(0.0879103656102)*x[0]**o+(-0.928854425726)*x[0]+(-0.138566176095)*x[1]**o+(-0.670118398936)*x[1]
-        arg[0,2]=(0.920856326204)*x[0]**o+(0.461047594595)*x[0]+(-0.914778320363)*x[1]**o+(-0.561644217568)*x[1]
-        arg[0,3]=(0.506148289443)*x[0]**o+(-0.474044343536)*x[0]+(0.742127575836)*x[1]**o+(-0.52349314159)*x[1]
-        arg[0,4]=(0.0810224543145)*x[0]**o+(-0.307992483498)*x[0]+(0.749673245291)*x[1]**o+(-0.554099873044)*x[1]
-        arg[1,0]=(-0.270897099553)*x[0]**o+(-0.222178461886)*x[0]+(0.755729049844)*x[1]**o+(0.740743777894)*x[1]
-        arg[1,1]=(0.0220934176819)*x[0]**o+(-0.309641658323)*x[0]+(-0.951833592348)*x[1]**o+(0.430554526918)*x[1]
-        arg[1,2]=(0.176033311218)*x[0]**o+(0.728188001962)*x[0]+(-0.428357954006)*x[1]**o+(0.955059500699)*x[1]
-        arg[1,3]=(0.946680422474)*x[0]**o+(-0.251968148743)*x[0]+(-0.3704600461)*x[1]**o+(0.692080922297)*x[1]
-        arg[1,4]=(0.122655375591)*x[0]**o+(0.617285886533)*x[0]+(0.729184247986)*x[1]**o+(0.30369620264)*x[1]
-        arg[2,0]=(-0.957780501271)*x[0]**o+(0.438290429468)*x[0]+(-0.504841431279)*x[1]**o+(0.935350834608)*x[1]
-        arg[2,1]=(-0.49410765407)*x[0]**o+(-0.635142349002)*x[0]+(0.700131616572)*x[1]**o+(0.99523209861)*x[1]
-        arg[2,2]=(0.0967686936303)*x[0]**o+(0.987754073381)*x[0]+(-0.161220173386)*x[1]**o+(-0.343926097784)*x[1]
-        arg[2,3]=(0.560040886628)*x[0]**o+(-0.843778720323)*x[0]+(0.345354034369)*x[1]**o+(0.440584543858)*x[1]
-        arg[2,4]=(0.988977815245)*x[0]**o+(0.661922598357)*x[0]+(-0.425421002549)*x[1]**o+(0.624279872655)*x[1]
-        arg[3,0]=(-0.997217068098)*x[0]**o+(-0.973497091595)*x[0]+(-0.0980683851598)*x[1]**o+(0.408081557041)*x[1]
-        arg[3,1]=(0.0827616522414)*x[0]**o+(0.931022772362)*x[0]+(-0.588688206358)*x[1]**o+(0.900467348992)*x[1]
-        arg[3,2]=(0.0933642874383)*x[0]**o+(0.398732664158)*x[0]+(-0.437102212783)*x[1]**o+(-0.126538302466)*x[1]
-        arg[3,3]=(0.251989644486)*x[0]**o+(0.765809815972)*x[0]+(-0.325455283605)*x[1]**o+(0.171819372538)*x[1]
-        arg[3,4]=(0.649407682145)*x[0]**o+(0.963776897105)*x[0]+(0.671915752131)*x[1]**o+(-0.468729629153)*x[1]
-        ref[0,0]=(-0.80968561562)/(o+1.)+(-0.412502776762)
-        ref[0,1]=(-0.0506558104848)/(o+1.)+(-0.799486412331)
-        ref[0,2]=(0.00607800584081)/(o+1.)+(-0.0502983114867)
-        ref[0,3]=(1.24827586528)/(o+1.)+(-0.498768742563)
-        ref[0,4]=(0.830695699605)/(o+1.)+(-0.431046178271)
-        ref[1,0]=(0.484831950292)/(o+1.)+(0.259282658004)
-        ref[1,1]=(-0.929740174666)/(o+1.)+(0.0604564342974)
-        ref[1,2]=(-0.252324642788)/(o+1.)+(0.84162375133)
-        ref[1,3]=(0.576220376373)/(o+1.)+(0.220056386777)
-        ref[1,4]=(0.851839623577)/(o+1.)+(0.460491044586)
-        ref[2,0]=(-1.46262193255)/(o+1.)+(0.686820632038)
-        ref[2,1]=(0.206023962501)/(o+1.)+(0.180044874804)
-        ref[2,2]=(-0.0644514797559)/(o+1.)+(0.321913987798)
-        ref[2,3]=(0.905394920997)/(o+1.)+(-0.201597088233)
-        ref[2,4]=(0.563556812695)/(o+1.)+(0.643101235506)
-        ref[3,0]=(-1.09528545326)/(o+1.)+(-0.282707767277)
-        ref[3,1]=(-0.505926554117)/(o+1.)+(0.915745060677)
-        ref[3,2]=(-0.343737925345)/(o+1.)+(0.136097180846)
-        ref[3,3]=(-0.0734656391194)/(o+1.)+(0.468814594255)
-        ref[3,4]=(1.32132343428)/(o+1.)+(0.247523633976)
-      else:
-        arg[0,0]=(-0.512698606017)*x[0]**o+(-0.156853163498)*x[0]+(0.247997355633)*x[1]**o+(-0.363003068904)*x[1]+(-0.940097989108)*x[2]**o+(-0.661063850288)*x[2]
-        arg[0,1]=(-0.886390181577)*x[0]**o+(0.724049511142)*x[0]+(0.260684592163)*x[1]**o+(0.265648885034)*x[1]+(0.123084281693)*x[2]**o+(0.181492979151)*x[2]
-        arg[0,2]=(-0.570543998851)*x[0]**o+(0.0541041165388)*x[0]+(0.630994990544)*x[1]**o+(-0.89311079559)*x[1]+(0.750714073617)*x[2]**o+(-0.0684796380527)*x[2]
-        arg[0,3]=(0.605486031268)*x[0]**o+(0.0387617487672)*x[0]+(-0.365027101406)*x[1]**o+(0.323275180514)*x[1]+(-0.763142660003)*x[2]**o+(-0.331069480921)*x[2]
-        arg[0,4]=(-0.0779035848472)*x[0]**o+(-0.0234904624931)*x[0]+(0.591635786678)*x[1]**o+(-0.793680126332)*x[1]+(-0.874742296757)*x[2]**o+(-0.184528885157)*x[2]
-        arg[1,0]=(-0.62480972544)*x[0]**o+(-0.99242215547)*x[0]+(0.634250679117)*x[1]**o+(-0.785448642692)*x[1]+(-0.013335654402)*x[2]**o+(0.52112750417)*x[2]
-        arg[1,1]=(0.611541580179)*x[0]**o+(-0.203144044802)*x[0]+(-0.411277184995)*x[1]**o+(0.373487145939)*x[1]+(-0.679339345026)*x[2]**o+(-0.632413536218)*x[2]
-        arg[1,2]=(-0.258927016205)*x[0]**o+(0.0242628959926)*x[0]+(-0.596909760383)*x[1]**o+(-0.295787354787)*x[1]+(-0.337930022823)*x[2]**o+(-0.825085100446)*x[2]
-        arg[1,3]=(-0.0976663781507)*x[0]**o+(0.716600132838)*x[0]+(-0.682155341898)*x[1]**o+(-0.154484864167)*x[1]+(0.754686874908)*x[2]**o+(-0.102453470268)*x[2]
-        arg[1,4]=(0.268714339964)*x[0]**o+(0.974234398844)*x[0]+(-0.370113158384)*x[1]**o+(0.0745228956861)*x[1]+(-0.0674370676047)*x[2]**o+(0.132605448278)*x[2]
-        arg[2,0]=(-0.00750893262562)*x[0]**o+(0.507641887134)*x[0]+(0.638483932117)*x[1]**o+(-0.940295540912)*x[1]+(-0.201492519698)*x[2]**o+(0.504878595818)*x[2]
-        arg[2,1]=(-0.0283522980593)*x[0]**o+(-0.76577346605)*x[0]+(0.0863472830598)*x[1]**o+(-0.904447859187)*x[1]+(-0.203390005492)*x[2]**o+(-0.741629136645)*x[2]
-        arg[2,2]=(-0.0196123831667)*x[0]**o+(-0.320721372799)*x[0]+(0.0670421287749)*x[1]**o+(-0.415029682416)*x[1]+(0.450269143475)*x[2]**o+(-0.735201210502)*x[2]
-        arg[2,3]=(-0.621537330758)*x[0]**o+(0.21573881897)*x[0]+(0.0364275955835)*x[1]**o+(0.873908952751)*x[1]+(-0.197046790303)*x[2]**o+(0.655654722165)*x[2]
-        arg[2,4]=(0.432531007791)*x[0]**o+(-0.65605251166)*x[0]+(0.728245204833)*x[1]**o+(-0.769998936989)*x[1]+(-0.797879623133)*x[2]**o+(0.36575554332)*x[2]
-        arg[3,0]=(0.512219734043)*x[0]**o+(-0.177942735603)*x[0]+(-0.307293350237)*x[1]**o+(-0.780181541911)*x[1]+(-0.510201727643)*x[2]**o+(-0.567980715525)*x[2]
-        arg[3,1]=(-0.405123989366)*x[0]**o+(-0.133316566583)*x[0]+(0.552868689995)*x[1]**o+(-0.921149434884)*x[1]+(0.510851078054)*x[2]**o+(0.7207533866)*x[2]
-        arg[3,2]=(0.150011788901)*x[0]**o+(-0.55947555552)*x[0]+(-0.353366762442)*x[1]**o+(0.204954197301)*x[1]+(-0.48254632377)*x[2]**o+(-0.272738900127)*x[2]
-        arg[3,3]=(-0.690981207461)*x[0]**o+(0.38683432128)*x[0]+(0.655731808738)*x[1]**o+(0.162269870301)*x[1]+(-0.373468659959)*x[2]**o+(-0.841431521009)*x[2]
-        arg[3,4]=(0.156455675319)*x[0]**o+(0.501690084272)*x[0]+(-0.339255791314)*x[1]**o+(0.0832260784264)*x[1]+(0.394137401365)*x[2]**o+(-0.92403906326)*x[2]
-        ref[0,0]=(-1.20479923949)/(o+1.)+(-0.590460041345)
-        ref[0,1]=(-0.502621307721)/(o+1.)+(0.585595687663)
-        ref[0,2]=(0.811165065311)/(o+1.)+(-0.453743158552)
-        ref[0,3]=(-0.522683730141)/(o+1.)+(0.0154837241797)
-        ref[0,4]=(-0.361010094926)/(o+1.)+(-0.500849736991)
-        ref[1,0]=(-0.00389470072479)/(o+1.)+(-0.628371646996)
-        ref[1,1]=(-0.479074949842)/(o+1.)+(-0.23103521754)
-        ref[1,2]=(-1.19376679941)/(o+1.)+(-0.54830477962)
-        ref[1,3]=(-0.0251348451402)/(o+1.)+(0.229830899202)
-        ref[1,4]=(-0.168835886025)/(o+1.)+(0.590681371404)
-        ref[2,0]=(0.429482479793)/(o+1.)+(0.0361124710203)
-        ref[2,1]=(-0.145395020492)/(o+1.)+(-1.20592523094)
-        ref[2,2]=(0.497698889084)/(o+1.)+(-0.735476132859)
-        ref[2,3]=(-0.782156525477)/(o+1.)+(0.872651246943)
-        ref[2,4]=(0.362896589491)/(o+1.)+(-0.530147952664)
-        ref[3,0]=(-0.305275343837)/(o+1.)+(-0.763052496519)
-        ref[3,1]=(0.658595778683)/(o+1.)+(-0.166856307434)
-        ref[3,2]=(-0.685901297311)/(o+1.)+(-0.313630129173)
-        ref[3,3]=(-0.408718058683)/(o+1.)+(-0.146163664714)
-        ref[3,4]=(0.21133728537)/(o+1.)+(-0.169561450281)
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.165423911829)*x[0]**o+(0.912542062064)*x[0]+(0.515840721225)*x[1]**o+(-0.855922021017)*x[1]
-        arg[0,0,1]=(0.591873802546)*x[0]**o+(-0.039385167187)*x[0]+(0.0261484884274)*x[1]**o+(0.227950240434)*x[1]
-        arg[0,1,0]=(-0.825833712046)*x[0]**o+(0.989606797765)*x[0]+(0.975260558791)*x[1]**o+(0.297963603984)*x[1]
-        arg[0,1,1]=(-0.658054502482)*x[0]**o+(-0.865505090963)*x[0]+(0.817184084453)*x[1]**o+(-0.409588098899)*x[1]
-        arg[1,0,0]=(0.538456987198)*x[0]**o+(-0.0768787509391)*x[0]+(0.424620431835)*x[1]**o+(0.799917948831)*x[1]
-        arg[1,0,1]=(0.125945558199)*x[0]**o+(-0.48320049996)*x[0]+(0.105474962327)*x[1]**o+(-0.090713555582)*x[1]
-        arg[1,1,0]=(0.835213375418)*x[0]**o+(-0.513407038769)*x[0]+(-0.342890811735)*x[1]**o+(-0.285057736244)*x[1]
-        arg[1,1,1]=(0.762782085749)*x[0]**o+(-0.308457087352)*x[0]+(0.23756726753)*x[1]**o+(-0.909365956504)*x[1]
-        arg[2,0,0]=(-0.76467980678)*x[0]**o+(-0.265552922006)*x[0]+(-0.261862355539)*x[1]**o+(-0.399407404618)*x[1]
-        arg[2,0,1]=(0.79401193617)*x[0]**o+(-0.0300461495216)*x[0]+(-0.978834133508)*x[1]**o+(-0.984845382599)*x[1]
-        arg[2,1,0]=(0.898033018534)*x[0]**o+(-0.184513430159)*x[0]+(0.0430634098526)*x[1]**o+(0.62213313954)*x[1]
-        arg[2,1,1]=(0.126926439246)*x[0]**o+(0.671259428917)*x[0]+(-0.396062855417)*x[1]**o+(0.0461825691916)*x[1]
-        arg[3,0,0]=(0.185756594279)*x[0]**o+(0.570946291973)*x[0]+(0.0673731944956)*x[1]**o+(0.367766610292)*x[1]
-        arg[3,0,1]=(0.021269224946)*x[0]**o+(-0.463663279063)*x[0]+(-0.687930988068)*x[1]**o+(0.184714204849)*x[1]
-        arg[3,1,0]=(0.754288639303)*x[0]**o+(-0.94612827517)*x[0]+(0.802463196709)*x[1]**o+(0.202355582077)*x[1]
-        arg[3,1,1]=(0.840002857786)*x[0]**o+(-0.692207739447)*x[0]+(0.486569391181)*x[1]**o+(-0.713960793192)*x[1]
-        arg[4,0,0]=(-0.205794539655)*x[0]**o+(-0.930458992533)*x[0]+(-0.62580205172)*x[1]**o+(-0.884738110673)*x[1]
-        arg[4,0,1]=(-0.91433612349)*x[0]**o+(0.694961527804)*x[0]+(-0.510941334746)*x[1]**o+(-0.510725271706)*x[1]
-        arg[4,1,0]=(0.852785499366)*x[0]**o+(0.870826628851)*x[0]+(-0.577529754198)*x[1]**o+(-0.583793684857)*x[1]
-        arg[4,1,1]=(-0.604869226881)*x[0]**o+(0.482463572402)*x[0]+(0.829654316885)*x[1]**o+(0.597543822455)*x[1]
-        arg[5,0,0]=(0.413459469749)*x[0]**o+(0.865143264083)*x[0]+(0.986197644249)*x[1]**o+(-0.2511021346)*x[1]
-        arg[5,0,1]=(0.811572168213)*x[0]**o+(-0.110121334437)*x[0]+(-0.985492232242)*x[1]**o+(-0.913436084156)*x[1]
-        arg[5,1,0]=(-0.660869051422)*x[0]**o+(-0.743235620427)*x[0]+(0.205393778238)*x[1]**o+(0.296069404687)*x[1]
-        arg[5,1,1]=(-0.13285011267)*x[0]**o+(0.659400366834)*x[0]+(-0.889984368942)*x[1]**o+(0.584893563559)*x[1]
-        ref[0,0,0]=(0.350416809396)/(o+1.)+(0.0283100205234)
-        ref[0,0,1]=(0.618022290973)/(o+1.)+(0.0942825366236)
-        ref[0,1,0]=(0.149426846745)/(o+1.)+(0.643785200874)
-        ref[0,1,1]=(0.159129581971)/(o+1.)+(-0.637546594931)
-        ref[1,0,0]=(0.963077419032)/(o+1.)+(0.361519598946)
-        ref[1,0,1]=(0.231420520526)/(o+1.)+(-0.286957027771)
-        ref[1,1,0]=(0.492322563683)/(o+1.)+(-0.399232387506)
-        ref[1,1,1]=(1.00034935328)/(o+1.)+(-0.608911521928)
-        ref[2,0,0]=(-1.02654216232)/(o+1.)+(-0.332480163312)
-        ref[2,0,1]=(-0.184822197338)/(o+1.)+(-0.507445766061)
-        ref[2,1,0]=(0.941096428387)/(o+1.)+(0.21880985469)
-        ref[2,1,1]=(-0.269136416172)/(o+1.)+(0.358720999054)
-        ref[3,0,0]=(0.253129788774)/(o+1.)+(0.469356451133)
-        ref[3,0,1]=(-0.666661763122)/(o+1.)+(-0.139474537107)
-        ref[3,1,0]=(1.55675183601)/(o+1.)+(-0.371886346546)
-        ref[3,1,1]=(1.32657224897)/(o+1.)+(-0.703084266319)
-        ref[4,0,0]=(-0.831596591375)/(o+1.)+(-0.907598551603)
-        ref[4,0,1]=(-1.42527745824)/(o+1.)+(0.0921181280487)
-        ref[4,1,0]=(0.275255745168)/(o+1.)+(0.143516471997)
-        ref[4,1,1]=(0.224785090004)/(o+1.)+(0.540003697429)
-        ref[5,0,0]=(1.399657114)/(o+1.)+(0.307020564742)
-        ref[5,0,1]=(-0.173920064028)/(o+1.)+(-0.511778709296)
-        ref[5,1,0]=(-0.455475273184)/(o+1.)+(-0.22358310787)
-        ref[5,1,1]=(-1.02283448161)/(o+1.)+(0.622146965196)
-      else:
-        arg[0,0,0]=(-0.564478749422)*x[0]**o+(-0.0357223504179)*x[0]+(0.396603298865)*x[1]**o+(-0.461941327703)*x[1]+(-0.667580657928)*x[2]**o+(-0.589957067263)*x[2]
-        arg[0,0,1]=(0.930616008951)*x[0]**o+(-0.764067565635)*x[0]+(-0.71350617205)*x[1]**o+(-0.530942701898)*x[1]+(-0.103797356434)*x[2]**o+(0.410704036673)*x[2]
-        arg[0,1,0]=(-0.59127392299)*x[0]**o+(0.452490122131)*x[0]+(0.714793625631)*x[1]**o+(-0.933114051133)*x[1]+(-0.693437840325)*x[2]**o+(0.979267231764)*x[2]
-        arg[0,1,1]=(0.179682332267)*x[0]**o+(-0.419960476425)*x[0]+(-0.10986598341)*x[1]**o+(0.912986428497)*x[1]+(0.0886946782573)*x[2]**o+(0.516065958873)*x[2]
-        arg[1,0,0]=(0.524446863481)*x[0]**o+(-0.439668193423)*x[0]+(0.681259811488)*x[1]**o+(0.439275262258)*x[1]+(0.84573881706)*x[2]**o+(0.377640553175)*x[2]
-        arg[1,0,1]=(-0.007464905203)*x[0]**o+(0.234727832471)*x[0]+(0.0428956356618)*x[1]**o+(0.195772930172)*x[1]+(0.457790934614)*x[2]**o+(0.445309166495)*x[2]
-        arg[1,1,0]=(0.821283375827)*x[0]**o+(0.212480005798)*x[0]+(0.148817990961)*x[1]**o+(0.119716150877)*x[1]+(0.658959126865)*x[2]**o+(-0.346216916131)*x[2]
-        arg[1,1,1]=(-0.0587222422894)*x[0]**o+(-0.325321661973)*x[0]+(0.149293818689)*x[1]**o+(-0.632073115037)*x[1]+(0.018604271874)*x[2]**o+(-0.412288240166)*x[2]
-        arg[2,0,0]=(-0.22588082169)*x[0]**o+(0.197780461217)*x[0]+(0.387336989213)*x[1]**o+(-0.680021661016)*x[1]+(-0.903782254346)*x[2]**o+(-0.273268109853)*x[2]
-        arg[2,0,1]=(0.415876394297)*x[0]**o+(0.199596795904)*x[0]+(-0.445817134682)*x[1]**o+(0.672539590684)*x[1]+(0.907825473964)*x[2]**o+(0.459560469691)*x[2]
-        arg[2,1,0]=(-0.052146887134)*x[0]**o+(-0.229450574738)*x[0]+(0.0929720151604)*x[1]**o+(-0.893861034491)*x[1]+(-0.294030328982)*x[2]**o+(-0.193256779109)*x[2]
-        arg[2,1,1]=(0.361171422066)*x[0]**o+(-0.212022056495)*x[0]+(0.0672221746963)*x[1]**o+(0.57506871515)*x[1]+(0.654894469509)*x[2]**o+(0.0749777260533)*x[2]
-        arg[3,0,0]=(0.505355253404)*x[0]**o+(-0.0753563586359)*x[0]+(0.544299279727)*x[1]**o+(-0.781954131328)*x[1]+(0.534390713891)*x[2]**o+(-0.719289344378)*x[2]
-        arg[3,0,1]=(-0.589309652827)*x[0]**o+(-0.0557421151178)*x[0]+(-0.275311076837)*x[1]**o+(0.998180518149)*x[1]+(-0.844823856433)*x[2]**o+(-0.988843805162)*x[2]
-        arg[3,1,0]=(-0.411075104301)*x[0]**o+(-0.405896828894)*x[0]+(0.242301856034)*x[1]**o+(-0.760648969984)*x[1]+(0.0940367373673)*x[2]**o+(-0.121420230853)*x[2]
-        arg[3,1,1]=(-0.201426146967)*x[0]**o+(0.722847134095)*x[0]+(-0.00743580369433)*x[1]**o+(-0.593158423904)*x[1]+(0.630575332064)*x[2]**o+(-0.309839791343)*x[2]
-        arg[4,0,0]=(0.370057366738)*x[0]**o+(0.35683022394)*x[0]+(0.886304520049)*x[1]**o+(0.834488899465)*x[1]+(0.27408661832)*x[2]**o+(0.325007409933)*x[2]
-        arg[4,0,1]=(0.386153377977)*x[0]**o+(-0.889700309398)*x[0]+(-0.60695970137)*x[1]**o+(0.701208035732)*x[1]+(0.435164510485)*x[2]**o+(0.40223148148)*x[2]
-        arg[4,1,0]=(-0.227256041906)*x[0]**o+(-0.0406115125763)*x[0]+(-0.0298974314183)*x[1]**o+(0.887167464033)*x[1]+(0.1004751563)*x[2]**o+(0.826924545719)*x[2]
-        arg[4,1,1]=(0.733575640137)*x[0]**o+(-0.376269474248)*x[0]+(-0.841290711112)*x[1]**o+(-0.0633013917179)*x[1]+(0.335730636406)*x[2]**o+(0.913607658221)*x[2]
-        arg[5,0,0]=(-0.896019254334)*x[0]**o+(0.465470987762)*x[0]+(0.338543664838)*x[1]**o+(0.182102591196)*x[1]+(0.476317455739)*x[2]**o+(0.191367623163)*x[2]
-        arg[5,0,1]=(0.828458939676)*x[0]**o+(-0.37853033744)*x[0]+(-0.540809170906)*x[1]**o+(0.367869598038)*x[1]+(0.321196361443)*x[2]**o+(0.548981819769)*x[2]
-        arg[5,1,0]=(-0.0805871335579)*x[0]**o+(-0.554679375424)*x[0]+(-0.259438414137)*x[1]**o+(0.72362534417)*x[1]+(-0.838855028889)*x[2]**o+(0.929802758377)*x[2]
-        arg[5,1,1]=(-0.947910259125)*x[0]**o+(0.654012824998)*x[0]+(0.425232602078)*x[1]**o+(-0.649345176159)*x[1]+(-0.946280438348)*x[2]**o+(-0.429547284912)*x[2]
-        ref[0,0,0]=(-0.835456108484)/(o+1.)+(-0.543810372692)
-        ref[0,0,1]=(0.113312480467)/(o+1.)+(-0.44215311543)
-        ref[0,1,0]=(-0.569918137684)/(o+1.)+(0.249321651381)
-        ref[0,1,1]=(0.158511027114)/(o+1.)+(0.504545955472)
-        ref[1,0,0]=(2.05144549203)/(o+1.)+(0.188623811006)
-        ref[1,0,1]=(0.493221665073)/(o+1.)+(0.437904964569)
-        ref[1,1,0]=(1.62906049365)/(o+1.)+(-0.00701037972825)
-        ref[1,1,1]=(0.109175848273)/(o+1.)+(-0.684841508588)
-        ref[2,0,0]=(-0.742326086822)/(o+1.)+(-0.377754654826)
-        ref[2,0,1]=(0.877884733578)/(o+1.)+(0.665848428139)
-        ref[2,1,0]=(-0.253205200956)/(o+1.)+(-0.658284194169)
-        ref[2,1,1]=(1.08328806627)/(o+1.)+(0.219012192354)
-        ref[3,0,0]=(1.58404524702)/(o+1.)+(-0.788299917171)
-        ref[3,0,1]=(-1.7094445861)/(o+1.)+(-0.0232027010654)
-        ref[3,1,0]=(-0.0747365109002)/(o+1.)+(-0.643983014866)
-        ref[3,1,1]=(0.421713381403)/(o+1.)+(-0.0900755405762)
-        ref[4,0,0]=(1.53044850511)/(o+1.)+(0.758163266669)
-        ref[4,0,1]=(0.214358187092)/(o+1.)+(0.106869603907)
-        ref[4,1,0]=(-0.156678317024)/(o+1.)+(0.836740248588)
-        ref[4,1,1]=(0.228015565432)/(o+1.)+(0.237018396127)
-        ref[5,0,0]=(-0.0811581337568)/(o+1.)+(0.419470601061)
-        ref[5,0,1]=(0.608846130213)/(o+1.)+(0.269160540183)
-        ref[5,1,0]=(-1.17888057658)/(o+1.)+(0.549374363561)
-        ref[5,1,1]=(-1.4689580954)/(o+1.)+(-0.212439818036)
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.216014106349)*x[0]**o+(0.98826230471)*x[0]+(0.522566177319)*x[1]**o+(-0.672520997452)*x[1]
-        arg[0,0,0,1]=(0.368024408084)*x[0]**o+(0.047972971332)*x[0]+(-0.307374327321)*x[1]**o+(0.0745169735457)*x[1]
-        arg[0,0,1,0]=(0.438735045452)*x[0]**o+(0.76355958752)*x[0]+(0.200829025437)*x[1]**o+(0.56912407759)*x[1]
-        arg[0,0,1,1]=(-0.0328769393712)*x[0]**o+(-0.39701363611)*x[0]+(0.704125532519)*x[1]**o+(-0.6602435084)*x[1]
-        arg[0,0,2,0]=(-0.547717992717)*x[0]**o+(-0.844256763776)*x[0]+(0.621300470147)*x[1]**o+(-0.105216181226)*x[1]
-        arg[0,0,2,1]=(-0.723474063234)*x[0]**o+(-0.980738972901)*x[0]+(-0.183578659566)*x[1]**o+(0.586038450047)*x[1]
-        arg[0,1,0,0]=(0.505379907001)*x[0]**o+(-0.470514711277)*x[0]+(0.799116811747)*x[1]**o+(0.682760846386)*x[1]
-        arg[0,1,0,1]=(0.353992609198)*x[0]**o+(-0.848107655585)*x[0]+(-0.774065459855)*x[1]**o+(0.0323137462292)*x[1]
-        arg[0,1,1,0]=(0.799068805694)*x[0]**o+(-0.979761821209)*x[0]+(0.642674987867)*x[1]**o+(-0.639029952044)*x[1]
-        arg[0,1,1,1]=(0.542556683327)*x[0]**o+(0.876753086356)*x[0]+(-0.387121297643)*x[1]**o+(0.377543179628)*x[1]
-        arg[0,1,2,0]=(0.424672899596)*x[0]**o+(-0.134184751569)*x[0]+(-0.561877304114)*x[1]**o+(0.549933699347)*x[1]
-        arg[0,1,2,1]=(-0.126173294501)*x[0]**o+(-0.338964866844)*x[0]+(-0.163536115759)*x[1]**o+(0.747551558186)*x[1]
-        arg[0,2,0,0]=(0.304334183452)*x[0]**o+(0.927809971187)*x[0]+(0.961504942988)*x[1]**o+(0.0698014252396)*x[1]
-        arg[0,2,0,1]=(0.488820088455)*x[0]**o+(0.890735247208)*x[0]+(0.686782901398)*x[1]**o+(0.972954994564)*x[1]
-        arg[0,2,1,0]=(-0.737577792766)*x[0]**o+(-0.351698913646)*x[0]+(0.392591489865)*x[1]**o+(0.79238240143)*x[1]
-        arg[0,2,1,1]=(-0.997254027544)*x[0]**o+(0.579800166465)*x[0]+(-0.95000690643)*x[1]**o+(-0.166463083476)*x[1]
-        arg[0,2,2,0]=(-0.999703749644)*x[0]**o+(0.0415211466468)*x[0]+(0.0816160245139)*x[1]**o+(-0.0921114587195)*x[1]
-        arg[0,2,2,1]=(-0.172818721386)*x[0]**o+(0.10475692446)*x[0]+(-0.855815339933)*x[1]**o+(-0.50842580034)*x[1]
-        arg[0,3,0,0]=(-0.154563121513)*x[0]**o+(-0.0956305513369)*x[0]+(-0.893783521038)*x[1]**o+(0.10772474638)*x[1]
-        arg[0,3,0,1]=(0.365331678349)*x[0]**o+(0.403124820832)*x[0]+(-0.0750500521493)*x[1]**o+(0.62559762808)*x[1]
-        arg[0,3,1,0]=(-0.42235875521)*x[0]**o+(0.831133238533)*x[0]+(-0.893322944982)*x[1]**o+(0.936074096319)*x[1]
-        arg[0,3,1,1]=(0.587382334689)*x[0]**o+(0.996190710631)*x[0]+(-0.796032791654)*x[1]**o+(0.783491453801)*x[1]
-        arg[0,3,2,0]=(-0.369527027508)*x[0]**o+(-0.501417552089)*x[0]+(-0.372105439045)*x[1]**o+(0.653283000152)*x[1]
-        arg[0,3,2,1]=(0.914893750314)*x[0]**o+(-0.769183323793)*x[0]+(0.571638486717)*x[1]**o+(-0.939784652259)*x[1]
-        arg[0,4,0,0]=(0.134859060251)*x[0]**o+(-0.297363165275)*x[0]+(0.198957028974)*x[1]**o+(-0.828531725127)*x[1]
-        arg[0,4,0,1]=(-0.371375370217)*x[0]**o+(-0.0422058718402)*x[0]+(0.502010302278)*x[1]**o+(0.442051802597)*x[1]
-        arg[0,4,1,0]=(0.513346571173)*x[0]**o+(0.182640867356)*x[0]+(0.76200283664)*x[1]**o+(0.134640432361)*x[1]
-        arg[0,4,1,1]=(-0.815543712756)*x[0]**o+(0.0306226823724)*x[0]+(-0.0211231926242)*x[1]**o+(-0.718800228294)*x[1]
-        arg[0,4,2,0]=(-0.980596107555)*x[0]**o+(-0.714237107759)*x[0]+(0.547986215851)*x[1]**o+(0.180131474534)*x[1]
-        arg[0,4,2,1]=(-0.460780402239)*x[0]**o+(-0.483771113997)*x[0]+(-0.017140263255)*x[1]**o+(-0.127947184627)*x[1]
-        arg[1,0,0,0]=(-0.0187443155707)*x[0]**o+(-0.490914415873)*x[0]+(-0.720022496093)*x[1]**o+(0.0265633770733)*x[1]
-        arg[1,0,0,1]=(-0.634855765904)*x[0]**o+(0.345031954366)*x[0]+(-0.0532392363316)*x[1]**o+(0.983295524564)*x[1]
-        arg[1,0,1,0]=(0.262182040476)*x[0]**o+(-0.883857758733)*x[0]+(0.880670543535)*x[1]**o+(0.193477695378)*x[1]
-        arg[1,0,1,1]=(-0.0825976168371)*x[0]**o+(0.161838720337)*x[0]+(-0.0110587499089)*x[1]**o+(-0.634455402489)*x[1]
-        arg[1,0,2,0]=(0.284221958342)*x[0]**o+(-0.948548729029)*x[0]+(0.430914344458)*x[1]**o+(-0.18563638241)*x[1]
-        arg[1,0,2,1]=(-0.459558022898)*x[0]**o+(0.431907572866)*x[0]+(-0.0597669070218)*x[1]**o+(0.0694271372225)*x[1]
-        arg[1,1,0,0]=(0.54071078447)*x[0]**o+(-0.244570994356)*x[0]+(0.00506219762373)*x[1]**o+(-0.0816378019186)*x[1]
-        arg[1,1,0,1]=(-0.100752221379)*x[0]**o+(0.535738345566)*x[0]+(0.730325284553)*x[1]**o+(-0.885044748717)*x[1]
-        arg[1,1,1,0]=(-0.0422460353138)*x[0]**o+(-0.986416505995)*x[0]+(-0.111766776997)*x[1]**o+(-0.842179226197)*x[1]
-        arg[1,1,1,1]=(0.0690281593169)*x[0]**o+(-0.885054188663)*x[0]+(-0.680349314907)*x[1]**o+(0.00277190934345)*x[1]
-        arg[1,1,2,0]=(0.502632146841)*x[0]**o+(-0.197332151163)*x[0]+(-0.0942257361149)*x[1]**o+(0.045171692749)*x[1]
-        arg[1,1,2,1]=(0.427910466818)*x[0]**o+(-0.61355947216)*x[0]+(0.465128040517)*x[1]**o+(0.0874536555354)*x[1]
-        arg[1,2,0,0]=(0.943819415417)*x[0]**o+(0.884020001869)*x[0]+(-0.769166027477)*x[1]**o+(-0.10032307068)*x[1]
-        arg[1,2,0,1]=(0.0670224828564)*x[0]**o+(-0.645424481071)*x[0]+(-0.756361652678)*x[1]**o+(-0.274687916196)*x[1]
-        arg[1,2,1,0]=(0.397836742229)*x[0]**o+(-0.708791058745)*x[0]+(0.920869587663)*x[1]**o+(-0.250037069918)*x[1]
-        arg[1,2,1,1]=(0.722570486719)*x[0]**o+(-0.358082774936)*x[0]+(0.786344673969)*x[1]**o+(0.310591893637)*x[1]
-        arg[1,2,2,0]=(-0.379404573553)*x[0]**o+(-0.969753501645)*x[0]+(-0.0745714915337)*x[1]**o+(-0.262943796911)*x[1]
-        arg[1,2,2,1]=(0.817999459632)*x[0]**o+(0.731516351792)*x[0]+(-0.531411613325)*x[1]**o+(-0.824858061154)*x[1]
-        arg[1,3,0,0]=(-0.206295444021)*x[0]**o+(-0.781973944918)*x[0]+(-0.173845545382)*x[1]**o+(-0.360122364573)*x[1]
-        arg[1,3,0,1]=(-0.0604068005719)*x[0]**o+(0.238691416507)*x[0]+(-0.82262982031)*x[1]**o+(-0.893751755968)*x[1]
-        arg[1,3,1,0]=(-0.686409669386)*x[0]**o+(0.711830599399)*x[0]+(0.0839688142166)*x[1]**o+(-0.99463449684)*x[1]
-        arg[1,3,1,1]=(-0.0864745975077)*x[0]**o+(0.00068907895313)*x[0]+(-0.766810513534)*x[1]**o+(0.685236202954)*x[1]
-        arg[1,3,2,0]=(0.0909338812695)*x[0]**o+(-0.709595654169)*x[0]+(-0.483428504499)*x[1]**o+(-0.0707341191006)*x[1]
-        arg[1,3,2,1]=(-0.38342983855)*x[0]**o+(-0.0407824575865)*x[0]+(-0.201329040891)*x[1]**o+(0.0240007937141)*x[1]
-        arg[1,4,0,0]=(0.512465803173)*x[0]**o+(-0.371898603608)*x[0]+(-0.79453595861)*x[1]**o+(0.340546986375)*x[1]
-        arg[1,4,0,1]=(0.742383198442)*x[0]**o+(-0.603548189912)*x[0]+(-0.270277825546)*x[1]**o+(-0.525100913894)*x[1]
-        arg[1,4,1,0]=(-0.693074384029)*x[0]**o+(-0.825037404844)*x[0]+(-0.626116177978)*x[1]**o+(0.628159342479)*x[1]
-        arg[1,4,1,1]=(-0.595844943255)*x[0]**o+(0.250758194807)*x[0]+(0.504390052142)*x[1]**o+(-0.124588859702)*x[1]
-        arg[1,4,2,0]=(-0.651727490997)*x[0]**o+(0.411138504151)*x[0]+(0.323769160331)*x[1]**o+(0.904379126671)*x[1]
-        arg[1,4,2,1]=(-0.71307850178)*x[0]**o+(0.734964608119)*x[0]+(0.348693698506)*x[1]**o+(0.272270639772)*x[1]
-        arg[2,0,0,0]=(0.558236567771)*x[0]**o+(0.516985445776)*x[0]+(0.0278915137861)*x[1]**o+(-0.268619977833)*x[1]
-        arg[2,0,0,1]=(-0.871181709658)*x[0]**o+(-0.132251987744)*x[0]+(-0.215497073461)*x[1]**o+(0.508008002082)*x[1]
-        arg[2,0,1,0]=(0.880795999572)*x[0]**o+(-0.231151166496)*x[0]+(-0.698846681617)*x[1]**o+(0.914483413825)*x[1]
-        arg[2,0,1,1]=(0.684792911211)*x[0]**o+(-0.801408782989)*x[0]+(0.689713232168)*x[1]**o+(0.142847173797)*x[1]
-        arg[2,0,2,0]=(-0.912566319945)*x[0]**o+(0.811138574657)*x[0]+(-0.884250879071)*x[1]**o+(-0.177206225477)*x[1]
-        arg[2,0,2,1]=(-0.898648046678)*x[0]**o+(0.581554373688)*x[0]+(0.567642878443)*x[1]**o+(0.636312832751)*x[1]
-        arg[2,1,0,0]=(-0.788853365648)*x[0]**o+(-0.135329327941)*x[0]+(0.180850147594)*x[1]**o+(0.742619029335)*x[1]
-        arg[2,1,0,1]=(-0.824539980645)*x[0]**o+(0.857173393615)*x[0]+(0.850455264916)*x[1]**o+(0.975422322464)*x[1]
-        arg[2,1,1,0]=(0.462293517317)*x[0]**o+(-0.173835273794)*x[0]+(-0.800072514276)*x[1]**o+(0.140214114627)*x[1]
-        arg[2,1,1,1]=(-0.187890814293)*x[0]**o+(0.534472364495)*x[0]+(-0.799640665571)*x[1]**o+(0.301287955302)*x[1]
-        arg[2,1,2,0]=(0.278901492946)*x[0]**o+(0.620544326886)*x[0]+(-0.705702443752)*x[1]**o+(-0.489690636328)*x[1]
-        arg[2,1,2,1]=(-0.926772900235)*x[0]**o+(0.134654742845)*x[0]+(0.356561975337)*x[1]**o+(-0.919999359857)*x[1]
-        arg[2,2,0,0]=(-0.675956301416)*x[0]**o+(0.149582589205)*x[0]+(0.186440827385)*x[1]**o+(0.88381610446)*x[1]
-        arg[2,2,0,1]=(-0.697267962915)*x[0]**o+(0.991366596424)*x[0]+(0.310290094618)*x[1]**o+(-0.881771505066)*x[1]
-        arg[2,2,1,0]=(0.506027358474)*x[0]**o+(0.294136137354)*x[0]+(0.732003937836)*x[1]**o+(0.633469131504)*x[1]
-        arg[2,2,1,1]=(-0.427146039728)*x[0]**o+(-0.975737063903)*x[0]+(-0.934913653772)*x[1]**o+(-0.662568325005)*x[1]
-        arg[2,2,2,0]=(0.477849916621)*x[0]**o+(-0.798883883367)*x[0]+(-0.154217684441)*x[1]**o+(-0.175817547912)*x[1]
-        arg[2,2,2,1]=(0.935192620387)*x[0]**o+(-0.193802588249)*x[0]+(0.406181949213)*x[1]**o+(0.20422475396)*x[1]
-        arg[2,3,0,0]=(0.965944278856)*x[0]**o+(-0.736175411725)*x[0]+(0.92404347386)*x[1]**o+(0.273152788392)*x[1]
-        arg[2,3,0,1]=(-0.606944412413)*x[0]**o+(0.692555413476)*x[0]+(0.812085676275)*x[1]**o+(-0.0809920218886)*x[1]
-        arg[2,3,1,0]=(-0.314634777406)*x[0]**o+(0.750181618592)*x[0]+(0.0554739779642)*x[1]**o+(-0.333788326726)*x[1]
-        arg[2,3,1,1]=(0.85610815703)*x[0]**o+(0.910096005524)*x[0]+(-0.227092814843)*x[1]**o+(-0.0849532598914)*x[1]
-        arg[2,3,2,0]=(0.735064128504)*x[0]**o+(-0.253919528943)*x[0]+(0.8457463307)*x[1]**o+(0.865727345925)*x[1]
-        arg[2,3,2,1]=(0.520607989389)*x[0]**o+(0.569210317105)*x[0]+(0.500780081677)*x[1]**o+(-0.787630914351)*x[1]
-        arg[2,4,0,0]=(0.179774694296)*x[0]**o+(-0.890872128607)*x[0]+(-0.185758177247)*x[1]**o+(0.888231734606)*x[1]
-        arg[2,4,0,1]=(0.059863462227)*x[0]**o+(-0.0796463123948)*x[0]+(-0.104564520504)*x[1]**o+(-0.336182528617)*x[1]
-        arg[2,4,1,0]=(-0.636828275967)*x[0]**o+(0.156894572218)*x[0]+(-0.884260096115)*x[1]**o+(-0.967431438795)*x[1]
-        arg[2,4,1,1]=(-0.958168110389)*x[0]**o+(-0.0424772631477)*x[0]+(0.512363473316)*x[1]**o+(-0.716729419668)*x[1]
-        arg[2,4,2,0]=(0.19736654467)*x[0]**o+(-0.288723518002)*x[0]+(0.243674007033)*x[1]**o+(0.911210601142)*x[1]
-        arg[2,4,2,1]=(-0.847493343055)*x[0]**o+(0.115003265593)*x[0]+(0.360071936714)*x[1]**o+(-0.0265385061141)*x[1]
-        arg[3,0,0,0]=(-0.510550590836)*x[0]**o+(-0.266174606631)*x[0]+(0.771580708159)*x[1]**o+(-0.770554374259)*x[1]
-        arg[3,0,0,1]=(-0.65795024738)*x[0]**o+(-0.83394628525)*x[0]+(0.812461325452)*x[1]**o+(0.191593733482)*x[1]
-        arg[3,0,1,0]=(0.136878718548)*x[0]**o+(-0.000345061692795)*x[0]+(-0.0780280205008)*x[1]**o+(0.173925537373)*x[1]
-        arg[3,0,1,1]=(0.584079470149)*x[0]**o+(0.138674493948)*x[0]+(-0.563553909861)*x[1]**o+(-0.254304838008)*x[1]
-        arg[3,0,2,0]=(0.326192887554)*x[0]**o+(0.993615980303)*x[0]+(-0.26995279693)*x[1]**o+(0.216112615287)*x[1]
-        arg[3,0,2,1]=(0.684786021819)*x[0]**o+(0.158934017292)*x[0]+(-0.457448199191)*x[1]**o+(0.644722228163)*x[1]
-        arg[3,1,0,0]=(-0.198252162262)*x[0]**o+(-0.821832378445)*x[0]+(0.831807441916)*x[1]**o+(-0.70643670471)*x[1]
-        arg[3,1,0,1]=(0.361698759016)*x[0]**o+(0.556511107101)*x[0]+(0.892219700601)*x[1]**o+(-0.861598520361)*x[1]
-        arg[3,1,1,0]=(-0.107946706634)*x[0]**o+(-0.910191934756)*x[0]+(0.502507607871)*x[1]**o+(0.649089810516)*x[1]
-        arg[3,1,1,1]=(-0.92959760672)*x[0]**o+(0.950682520961)*x[0]+(0.103321004187)*x[1]**o+(-0.631562667815)*x[1]
-        arg[3,1,2,0]=(0.858565242025)*x[0]**o+(-0.106810606075)*x[0]+(0.236377425048)*x[1]**o+(-0.296320858145)*x[1]
-        arg[3,1,2,1]=(0.148558873625)*x[0]**o+(0.458488334082)*x[0]+(-0.0172824905523)*x[1]**o+(-0.321212766581)*x[1]
-        arg[3,2,0,0]=(-0.239733890336)*x[0]**o+(0.558819103697)*x[0]+(-0.151683129885)*x[1]**o+(0.153995780645)*x[1]
-        arg[3,2,0,1]=(-0.949100270937)*x[0]**o+(0.0687171499139)*x[0]+(0.968028021831)*x[1]**o+(-0.935600499345)*x[1]
-        arg[3,2,1,0]=(-0.739823767237)*x[0]**o+(0.417825150389)*x[0]+(0.318612170707)*x[1]**o+(0.627557337421)*x[1]
-        arg[3,2,1,1]=(-0.965142167324)*x[0]**o+(0.981446854383)*x[0]+(0.266191185951)*x[1]**o+(-0.581303142841)*x[1]
-        arg[3,2,2,0]=(-0.00312606993817)*x[0]**o+(-0.191885030828)*x[0]+(-0.342525068561)*x[1]**o+(-0.953710538626)*x[1]
-        arg[3,2,2,1]=(-0.689127187476)*x[0]**o+(-0.107190366063)*x[0]+(-0.0556716250594)*x[1]**o+(-0.609462166754)*x[1]
-        arg[3,3,0,0]=(-0.765237197853)*x[0]**o+(-0.0707283944117)*x[0]+(0.891789872287)*x[1]**o+(-0.255939791858)*x[1]
-        arg[3,3,0,1]=(-0.367658362103)*x[0]**o+(0.27406309422)*x[0]+(0.866288683947)*x[1]**o+(0.403194030287)*x[1]
-        arg[3,3,1,0]=(-0.362795000993)*x[0]**o+(-0.498774415158)*x[0]+(0.0726808331583)*x[1]**o+(-0.871066791136)*x[1]
-        arg[3,3,1,1]=(-0.177149059814)*x[0]**o+(0.287463753612)*x[0]+(0.101726559941)*x[1]**o+(0.561797204517)*x[1]
-        arg[3,3,2,0]=(0.770615121039)*x[0]**o+(-0.503402148251)*x[0]+(0.319753007634)*x[1]**o+(0.586868894261)*x[1]
-        arg[3,3,2,1]=(0.924125904724)*x[0]**o+(-0.508988920423)*x[0]+(-0.866752504824)*x[1]**o+(0.518544700652)*x[1]
-        arg[3,4,0,0]=(-0.973660291124)*x[0]**o+(0.746869369283)*x[0]+(-0.634097171844)*x[1]**o+(0.723638944736)*x[1]
-        arg[3,4,0,1]=(-0.599366869066)*x[0]**o+(-0.59893829688)*x[0]+(0.124483401866)*x[1]**o+(-0.924820315792)*x[1]
-        arg[3,4,1,0]=(-0.707374787729)*x[0]**o+(-0.494748755022)*x[0]+(0.391752209698)*x[1]**o+(0.149710640116)*x[1]
-        arg[3,4,1,1]=(0.329587748119)*x[0]**o+(-0.788289803764)*x[0]+(-0.145100163626)*x[1]**o+(0.141493810237)*x[1]
-        arg[3,4,2,0]=(0.17496644337)*x[0]**o+(-0.270242104589)*x[0]+(0.996684379179)*x[1]**o+(-0.751697440046)*x[1]
-        arg[3,4,2,1]=(0.79046837395)*x[0]**o+(0.568394473062)*x[0]+(0.359419854016)*x[1]**o+(0.630686948244)*x[1]
-        ref[0,0,0,0]=(0.306552070969)/(o+1.)+(0.157870653629)
-        ref[0,0,0,1]=(0.0606500807631)/(o+1.)+(0.0612449724389)
-        ref[0,0,1,0]=(0.639564070889)/(o+1.)+(0.666341832555)
-        ref[0,0,1,1]=(0.671248593147)/(o+1.)+(-0.528628572255)
-        ref[0,0,2,0]=(0.0735824774293)/(o+1.)+(-0.474736472501)
-        ref[0,0,2,1]=(-0.9070527228)/(o+1.)+(-0.197350261427)
-        ref[0,1,0,0]=(1.30449671875)/(o+1.)+(0.106123067554)
-        ref[0,1,0,1]=(-0.420072850657)/(o+1.)+(-0.407896954678)
-        ref[0,1,1,0]=(1.44174379356)/(o+1.)+(-0.809395886627)
-        ref[0,1,1,1]=(0.155435385684)/(o+1.)+(0.627148132992)
-        ref[0,1,2,0]=(-0.137204404518)/(o+1.)+(0.207874473889)
-        ref[0,1,2,1]=(-0.289709410261)/(o+1.)+(0.204293345671)
-        ref[0,2,0,0]=(1.26583912644)/(o+1.)+(0.498805698213)
-        ref[0,2,0,1]=(1.17560298985)/(o+1.)+(0.931845120886)
-        ref[0,2,1,0]=(-0.344986302901)/(o+1.)+(0.220341743892)
-        ref[0,2,1,1]=(-1.94726093397)/(o+1.)+(0.206668541494)
-        ref[0,2,2,0]=(-0.91808772513)/(o+1.)+(-0.0252951560363)
-        ref[0,2,2,1]=(-1.02863406132)/(o+1.)+(-0.20183443794)
-        ref[0,3,0,0]=(-1.04834664255)/(o+1.)+(0.00604709752155)
-        ref[0,3,0,1]=(0.2902816262)/(o+1.)+(0.514361224456)
-        ref[0,3,1,0]=(-1.31568170019)/(o+1.)+(0.883603667426)
-        ref[0,3,1,1]=(-0.208650456965)/(o+1.)+(0.889841082216)
-        ref[0,3,2,0]=(-0.741632466554)/(o+1.)+(0.0759327240318)
-        ref[0,3,2,1]=(1.48653223703)/(o+1.)+(-0.854483988026)
-        ref[0,4,0,0]=(0.333816089225)/(o+1.)+(-0.562947445201)
-        ref[0,4,0,1]=(0.130634932061)/(o+1.)+(0.199922965378)
-        ref[0,4,1,0]=(1.27534940781)/(o+1.)+(0.158640649858)
-        ref[0,4,1,1]=(-0.83666690538)/(o+1.)+(-0.344088772961)
-        ref[0,4,2,0]=(-0.432609891704)/(o+1.)+(-0.267052816612)
-        ref[0,4,2,1]=(-0.477920665494)/(o+1.)+(-0.305859149312)
-        ref[1,0,0,0]=(-0.738766811663)/(o+1.)+(-0.2321755194)
-        ref[1,0,0,1]=(-0.688095002235)/(o+1.)+(0.664163739465)
-        ref[1,0,1,0]=(1.14285258401)/(o+1.)+(-0.345190031677)
-        ref[1,0,1,1]=(-0.093656366746)/(o+1.)+(-0.236308341076)
-        ref[1,0,2,0]=(0.7151363028)/(o+1.)+(-0.56709255572)
-        ref[1,0,2,1]=(-0.51932492992)/(o+1.)+(0.250667355044)
-        ref[1,1,0,0]=(0.545772982093)/(o+1.)+(-0.163104398138)
-        ref[1,1,0,1]=(0.629573063174)/(o+1.)+(-0.174653201576)
-        ref[1,1,1,0]=(-0.154012812311)/(o+1.)+(-0.914297866096)
-        ref[1,1,1,1]=(-0.61132115559)/(o+1.)+(-0.44114113966)
-        ref[1,1,2,0]=(0.408406410726)/(o+1.)+(-0.076080229207)
-        ref[1,1,2,1]=(0.893038507335)/(o+1.)+(-0.263052908312)
-        ref[1,2,0,0]=(0.17465338794)/(o+1.)+(0.391848465594)
-        ref[1,2,0,1]=(-0.689339169821)/(o+1.)+(-0.460056198634)
-        ref[1,2,1,0]=(1.31870632989)/(o+1.)+(-0.479414064332)
-        ref[1,2,1,1]=(1.50891516069)/(o+1.)+(-0.0237454406495)
-        ref[1,2,2,0]=(-0.453976065087)/(o+1.)+(-0.616348649278)
-        ref[1,2,2,1]=(0.286587846307)/(o+1.)+(-0.0466708546809)
-        ref[1,3,0,0]=(-0.380140989403)/(o+1.)+(-0.571048154745)
-        ref[1,3,0,1]=(-0.883036620882)/(o+1.)+(-0.32753016973)
-        ref[1,3,1,0]=(-0.60244085517)/(o+1.)+(-0.141401948721)
-        ref[1,3,1,1]=(-0.853285111042)/(o+1.)+(0.342962640954)
-        ref[1,3,2,0]=(-0.39249462323)/(o+1.)+(-0.390164886635)
-        ref[1,3,2,1]=(-0.584758879441)/(o+1.)+(-0.00839083193621)
-        ref[1,4,0,0]=(-0.282070155438)/(o+1.)+(-0.0156758086169)
-        ref[1,4,0,1]=(0.472105372896)/(o+1.)+(-0.564324551903)
-        ref[1,4,1,0]=(-1.31919056201)/(o+1.)+(-0.0984390311826)
-        ref[1,4,1,1]=(-0.0914548911124)/(o+1.)+(0.0630846675525)
-        ref[1,4,2,0]=(-0.327958330666)/(o+1.)+(0.657758815411)
-        ref[1,4,2,1]=(-0.364384803274)/(o+1.)+(0.503617623946)
-        ref[2,0,0,0]=(0.586128081557)/(o+1.)+(0.124182733972)
-        ref[2,0,0,1]=(-1.08667878312)/(o+1.)+(0.187878007169)
-        ref[2,0,1,0]=(0.181949317955)/(o+1.)+(0.341666123665)
-        ref[2,0,1,1]=(1.37450614338)/(o+1.)+(-0.329280804596)
-        ref[2,0,2,0]=(-1.79681719902)/(o+1.)+(0.31696617459)
-        ref[2,0,2,1]=(-0.331005168235)/(o+1.)+(0.608933603219)
-        ref[2,1,0,0]=(-0.608003218053)/(o+1.)+(0.303644850697)
-        ref[2,1,0,1]=(0.0259152842714)/(o+1.)+(0.916297858039)
-        ref[2,1,1,0]=(-0.33777899696)/(o+1.)+(-0.0168105795836)
-        ref[2,1,1,1]=(-0.987531479864)/(o+1.)+(0.417880159899)
-        ref[2,1,2,0]=(-0.426800950806)/(o+1.)+(0.0654268452787)
-        ref[2,1,2,1]=(-0.570210924898)/(o+1.)+(-0.392672308506)
-        ref[2,2,0,0]=(-0.489515474032)/(o+1.)+(0.516699346832)
-        ref[2,2,0,1]=(-0.386977868298)/(o+1.)+(0.054797545679)
-        ref[2,2,1,0]=(1.23803129631)/(o+1.)+(0.463802634429)
-        ref[2,2,1,1]=(-1.3620596935)/(o+1.)+(-0.819152694454)
-        ref[2,2,2,0]=(0.32363223218)/(o+1.)+(-0.48735071564)
-        ref[2,2,2,1]=(1.3413745696)/(o+1.)+(0.00521108285542)
-        ref[2,3,0,0]=(1.88998775272)/(o+1.)+(-0.231511311666)
-        ref[2,3,0,1]=(0.205141263861)/(o+1.)+(0.305781695794)
-        ref[2,3,1,0]=(-0.259160799442)/(o+1.)+(0.208196645933)
-        ref[2,3,1,1]=(0.629015342187)/(o+1.)+(0.412571372816)
-        ref[2,3,2,0]=(1.5808104592)/(o+1.)+(0.305903908491)
-        ref[2,3,2,1]=(1.02138807107)/(o+1.)+(-0.109210298623)
-        ref[2,4,0,0]=(-0.00598348295078)/(o+1.)+(-0.00132019700044)
-        ref[2,4,0,1]=(-0.0447010582767)/(o+1.)+(-0.207914420506)
-        ref[2,4,1,0]=(-1.52108837208)/(o+1.)+(-0.405268433289)
-        ref[2,4,1,1]=(-0.445804637073)/(o+1.)+(-0.379603341408)
-        ref[2,4,2,0]=(0.441040551703)/(o+1.)+(0.31124354157)
-        ref[2,4,2,1]=(-0.487421406342)/(o+1.)+(0.0442323797396)
-        ref[3,0,0,0]=(0.261030117323)/(o+1.)+(-0.518364490445)
-        ref[3,0,0,1]=(0.154511078072)/(o+1.)+(-0.321176275884)
-        ref[3,0,1,0]=(0.0588506980476)/(o+1.)+(0.0867902378403)
-        ref[3,0,1,1]=(0.0205255602871)/(o+1.)+(-0.0578151720304)
-        ref[3,0,2,0]=(0.0562400906237)/(o+1.)+(0.604864297795)
-        ref[3,0,2,1]=(0.227337822629)/(o+1.)+(0.401828122727)
-        ref[3,1,0,0]=(0.633555279654)/(o+1.)+(-0.764134541578)
-        ref[3,1,0,1]=(1.25391845962)/(o+1.)+(-0.15254370663)
-        ref[3,1,1,0]=(0.394560901238)/(o+1.)+(-0.13055106212)
-        ref[3,1,1,1]=(-0.826276602534)/(o+1.)+(0.159559926573)
-        ref[3,1,2,0]=(1.09494266707)/(o+1.)+(-0.20156573211)
-        ref[3,1,2,1]=(0.131276383073)/(o+1.)+(0.0686377837506)
-        ref[3,2,0,0]=(-0.391417020221)/(o+1.)+(0.356407442171)
-        ref[3,2,0,1]=(0.0189277508933)/(o+1.)+(-0.433441674716)
-        ref[3,2,1,0]=(-0.42121159653)/(o+1.)+(0.522691243905)
-        ref[3,2,1,1]=(-0.698950981373)/(o+1.)+(0.200071855771)
-        ref[3,2,2,0]=(-0.345651138499)/(o+1.)+(-0.572797784727)
-        ref[3,2,2,1]=(-0.744798812536)/(o+1.)+(-0.358326266408)
-        ref[3,3,0,0]=(0.126552674434)/(o+1.)+(-0.163334093135)
-        ref[3,3,0,1]=(0.498630321844)/(o+1.)+(0.338628562253)
-        ref[3,3,1,0]=(-0.290114167835)/(o+1.)+(-0.684920603147)
-        ref[3,3,1,1]=(-0.0754224998727)/(o+1.)+(0.424630479064)
-        ref[3,3,2,0]=(1.09036812867)/(o+1.)+(0.0417333730049)
-        ref[3,3,2,1]=(0.0573733998999)/(o+1.)+(0.00477789011464)
-        ref[3,4,0,0]=(-1.60775746297)/(o+1.)+(0.73525415701)
-        ref[3,4,0,1]=(-0.4748834672)/(o+1.)+(-0.761879306336)
-        ref[3,4,1,0]=(-0.31562257803)/(o+1.)+(-0.172519057453)
-        ref[3,4,1,1]=(0.184487584493)/(o+1.)+(-0.323397996764)
-        ref[3,4,2,0]=(1.17165082255)/(o+1.)+(-0.510969772317)
-        ref[3,4,2,1]=(1.14988822797)/(o+1.)+(0.599540710653)
-      else:
-        arg[0,0,0,0]=(-0.517412938774)*x[0]**o+(0.824804313111)*x[0]+(-0.681706563374)*x[1]**o+(-0.259540440272)*x[1]+(0.876735283937)*x[2]**o+(0.307072859807)*x[2]
-        arg[0,0,0,1]=(-0.545981202251)*x[0]**o+(-0.530080933212)*x[0]+(-0.339289111599)*x[1]**o+(-0.726311605088)*x[1]+(0.334837705444)*x[2]**o+(-0.422667311064)*x[2]
-        arg[0,0,1,0]=(-0.94261387328)*x[0]**o+(-0.315825326734)*x[0]+(0.542502801277)*x[1]**o+(-0.927525943646)*x[1]+(-0.802118238213)*x[2]**o+(-0.106512314706)*x[2]
-        arg[0,0,1,1]=(-0.877940099286)*x[0]**o+(-0.801256557869)*x[0]+(-0.155983792242)*x[1]**o+(0.200547191496)*x[1]+(-0.960553133432)*x[2]**o+(0.968862792367)*x[2]
-        arg[0,0,2,0]=(-0.870342547946)*x[0]**o+(-0.956447402661)*x[0]+(-0.506797803004)*x[1]**o+(0.342841675107)*x[1]+(0.528354159344)*x[2]**o+(-0.824546729564)*x[2]
-        arg[0,0,2,1]=(-0.411899137296)*x[0]**o+(0.133736458559)*x[0]+(0.852726131619)*x[1]**o+(0.692795229813)*x[1]+(0.047372576403)*x[2]**o+(0.810485765945)*x[2]
-        arg[0,1,0,0]=(0.961758233254)*x[0]**o+(-0.606307924964)*x[0]+(0.0612696412665)*x[1]**o+(-0.947823541802)*x[1]+(-0.113021104365)*x[2]**o+(-0.00802440322155)*x[2]
-        arg[0,1,0,1]=(-0.684097052467)*x[0]**o+(0.467140835537)*x[0]+(-0.0742537091205)*x[1]**o+(0.541641916143)*x[1]+(0.987491548505)*x[2]**o+(-0.558380262255)*x[2]
-        arg[0,1,1,0]=(-0.901821988855)*x[0]**o+(0.34443714654)*x[0]+(-0.682552654793)*x[1]**o+(0.398276086461)*x[1]+(0.334644264965)*x[2]**o+(0.21454845251)*x[2]
-        arg[0,1,1,1]=(0.929614060295)*x[0]**o+(-0.322609307947)*x[0]+(-0.426962200724)*x[1]**o+(0.464659992564)*x[1]+(-0.13983863674)*x[2]**o+(-0.681648817325)*x[2]
-        arg[0,1,2,0]=(0.504166508914)*x[0]**o+(-0.978562859041)*x[0]+(-0.769650404806)*x[1]**o+(0.443500137153)*x[1]+(0.969669965936)*x[2]**o+(0.401742207403)*x[2]
-        arg[0,1,2,1]=(-0.478561324822)*x[0]**o+(-0.772019838834)*x[0]+(-0.779194844829)*x[1]**o+(-0.747980400065)*x[1]+(0.827885608192)*x[2]**o+(0.135571151528)*x[2]
-        arg[0,2,0,0]=(-0.210426221052)*x[0]**o+(-0.464938141903)*x[0]+(-0.776844066203)*x[1]**o+(0.267244555705)*x[1]+(-0.773135929429)*x[2]**o+(-0.00846060888954)*x[2]
-        arg[0,2,0,1]=(0.0945858334531)*x[0]**o+(-0.492400895713)*x[0]+(-0.128564669727)*x[1]**o+(-0.0951458189983)*x[1]+(-0.54426715378)*x[2]**o+(0.106545346072)*x[2]
-        arg[0,2,1,0]=(-0.482424571392)*x[0]**o+(0.0431208155652)*x[0]+(0.557138601636)*x[1]**o+(-0.725564282551)*x[1]+(0.9081107419)*x[2]**o+(0.0179201585352)*x[2]
-        arg[0,2,1,1]=(-0.555731853052)*x[0]**o+(0.447137254671)*x[0]+(0.820958717703)*x[1]**o+(-0.580251434504)*x[1]+(0.227884622965)*x[2]**o+(0.34460189453)*x[2]
-        arg[0,2,2,0]=(-0.25868983898)*x[0]**o+(0.759165881486)*x[0]+(-0.499903058341)*x[1]**o+(0.896471093639)*x[1]+(0.351955520633)*x[2]**o+(0.16566756566)*x[2]
-        arg[0,2,2,1]=(-0.37859354794)*x[0]**o+(0.925387188779)*x[0]+(0.0111055293719)*x[1]**o+(-0.311998642154)*x[1]+(0.441009182046)*x[2]**o+(0.0968247918271)*x[2]
-        arg[0,3,0,0]=(-0.461665900641)*x[0]**o+(0.812002051396)*x[0]+(-0.767456852027)*x[1]**o+(0.809069781575)*x[1]+(0.690416953885)*x[2]**o+(0.171662369216)*x[2]
-        arg[0,3,0,1]=(-0.804811324639)*x[0]**o+(-0.0962711523954)*x[0]+(0.980130059825)*x[1]**o+(0.98279180603)*x[1]+(-0.0614353559054)*x[2]**o+(0.645637153538)*x[2]
-        arg[0,3,1,0]=(0.97878415369)*x[0]**o+(-0.676321251698)*x[0]+(0.916075195717)*x[1]**o+(0.244509683371)*x[1]+(-0.939563193145)*x[2]**o+(-0.866506108913)*x[2]
-        arg[0,3,1,1]=(-0.676965895162)*x[0]**o+(-0.124355338519)*x[0]+(0.680151101195)*x[1]**o+(-0.839412433156)*x[1]+(0.434088587223)*x[2]**o+(-0.275286048166)*x[2]
-        arg[0,3,2,0]=(0.414822536626)*x[0]**o+(0.493836498194)*x[0]+(0.967077097745)*x[1]**o+(-0.0115301157869)*x[1]+(-0.307994657929)*x[2]**o+(-0.967766608312)*x[2]
-        arg[0,3,2,1]=(-0.34064670348)*x[0]**o+(-0.975121872905)*x[0]+(0.0839457874766)*x[1]**o+(0.0995106978636)*x[1]+(-0.533837237516)*x[2]**o+(0.771268044302)*x[2]
-        arg[0,4,0,0]=(0.223197544637)*x[0]**o+(0.712738871576)*x[0]+(-0.386972075747)*x[1]**o+(0.289829507744)*x[1]+(0.153418793839)*x[2]**o+(0.876087048492)*x[2]
-        arg[0,4,0,1]=(0.696750948653)*x[0]**o+(0.466905335953)*x[0]+(-0.611476041907)*x[1]**o+(-0.939902457901)*x[1]+(-0.752675432265)*x[2]**o+(-0.869502717044)*x[2]
-        arg[0,4,1,0]=(-0.465562201723)*x[0]**o+(-0.388716352051)*x[0]+(0.260044093503)*x[1]**o+(0.919379163294)*x[1]+(-0.902453394797)*x[2]**o+(0.378318744505)*x[2]
-        arg[0,4,1,1]=(0.121990842946)*x[0]**o+(-0.691267894153)*x[0]+(-0.703960568755)*x[1]**o+(-0.582404896428)*x[1]+(0.57560180036)*x[2]**o+(0.537099448589)*x[2]
-        arg[0,4,2,0]=(-0.495452196513)*x[0]**o+(-0.939389935669)*x[0]+(-0.237205717598)*x[1]**o+(0.61376516207)*x[1]+(-0.506082738728)*x[2]**o+(0.407704148542)*x[2]
-        arg[0,4,2,1]=(0.450976180771)*x[0]**o+(-0.00739258898437)*x[0]+(0.210130848093)*x[1]**o+(0.624639007009)*x[1]+(0.173795671727)*x[2]**o+(0.508269170853)*x[2]
-        arg[1,0,0,0]=(0.609685942177)*x[0]**o+(0.609299494609)*x[0]+(0.321046388121)*x[1]**o+(0.598197189498)*x[1]+(0.536092177618)*x[2]**o+(0.576427431157)*x[2]
-        arg[1,0,0,1]=(0.412500706234)*x[0]**o+(0.905942239017)*x[0]+(-0.974980343169)*x[1]**o+(-0.131245997607)*x[1]+(0.745809068018)*x[2]**o+(0.543470258153)*x[2]
-        arg[1,0,1,0]=(-0.903032545947)*x[0]**o+(-0.778693321051)*x[0]+(0.399342164105)*x[1]**o+(0.478212896767)*x[1]+(0.254596269802)*x[2]**o+(0.70308382001)*x[2]
-        arg[1,0,1,1]=(-0.281529506793)*x[0]**o+(0.74166036027)*x[0]+(0.629713747725)*x[1]**o+(-0.275164746597)*x[1]+(0.37523909979)*x[2]**o+(-0.878026427978)*x[2]
-        arg[1,0,2,0]=(0.236027764061)*x[0]**o+(-0.816910805083)*x[0]+(0.0782011624185)*x[1]**o+(-0.644004245666)*x[1]+(0.293586462602)*x[2]**o+(0.557045894695)*x[2]
-        arg[1,0,2,1]=(0.868061727269)*x[0]**o+(0.53329318943)*x[0]+(0.367603915235)*x[1]**o+(0.89280277925)*x[1]+(-0.316595424948)*x[2]**o+(0.593830565147)*x[2]
-        arg[1,1,0,0]=(0.886950595996)*x[0]**o+(-0.290323112286)*x[0]+(-0.863347030089)*x[1]**o+(0.545096994541)*x[1]+(0.338200944281)*x[2]**o+(-0.79898415048)*x[2]
-        arg[1,1,0,1]=(0.103761462006)*x[0]**o+(-0.046916161864)*x[0]+(0.0312549239467)*x[1]**o+(0.214045118984)*x[1]+(-0.523161766402)*x[2]**o+(0.714207028317)*x[2]
-        arg[1,1,1,0]=(0.494943183987)*x[0]**o+(-0.0543096386006)*x[0]+(-0.263875120588)*x[1]**o+(0.776031489925)*x[1]+(0.881224752145)*x[2]**o+(-0.650038283228)*x[2]
-        arg[1,1,1,1]=(0.0871887540513)*x[0]**o+(-0.953848841349)*x[0]+(-0.223751459589)*x[1]**o+(0.227400823993)*x[1]+(-0.224200553009)*x[2]**o+(0.594012970899)*x[2]
-        arg[1,1,2,0]=(-0.443116951346)*x[0]**o+(0.891806149626)*x[0]+(0.94731530917)*x[1]**o+(0.739499894809)*x[1]+(-0.92613053703)*x[2]**o+(0.464883087528)*x[2]
-        arg[1,1,2,1]=(-0.149831145559)*x[0]**o+(0.913999704597)*x[0]+(0.76082978152)*x[1]**o+(-0.441535347622)*x[1]+(0.902841586936)*x[2]**o+(-0.509022004948)*x[2]
-        arg[1,2,0,0]=(0.508230188489)*x[0]**o+(0.241669921231)*x[0]+(-0.802811365056)*x[1]**o+(0.298424305948)*x[1]+(-0.949407454532)*x[2]**o+(-0.131426880214)*x[2]
-        arg[1,2,0,1]=(0.65372313274)*x[0]**o+(0.195891642771)*x[0]+(-0.160845429219)*x[1]**o+(0.500815823724)*x[1]+(0.875785249339)*x[2]**o+(0.325024339211)*x[2]
-        arg[1,2,1,0]=(0.908405682536)*x[0]**o+(-0.146675166477)*x[0]+(0.24033815873)*x[1]**o+(-0.62814219771)*x[1]+(-0.512365788351)*x[2]**o+(-0.103817191415)*x[2]
-        arg[1,2,1,1]=(0.824305237501)*x[0]**o+(0.175753992729)*x[0]+(0.992502114126)*x[1]**o+(0.973110627555)*x[1]+(0.355352002177)*x[2]**o+(0.112252263955)*x[2]
-        arg[1,2,2,0]=(-0.485996285003)*x[0]**o+(-0.532551123887)*x[0]+(0.708205121405)*x[1]**o+(-0.803269038441)*x[1]+(-0.232049124534)*x[2]**o+(0.55437652866)*x[2]
-        arg[1,2,2,1]=(0.551934776224)*x[0]**o+(0.727629664538)*x[0]+(0.197393511049)*x[1]**o+(-0.146619812174)*x[1]+(0.316592306936)*x[2]**o+(0.0263881493809)*x[2]
-        arg[1,3,0,0]=(-0.918554166254)*x[0]**o+(-0.839150758884)*x[0]+(0.436713305329)*x[1]**o+(-0.410131731387)*x[1]+(0.321246028791)*x[2]**o+(0.706389384376)*x[2]
-        arg[1,3,0,1]=(-0.870168753295)*x[0]**o+(-0.00473364206025)*x[0]+(0.594648540734)*x[1]**o+(-0.924887214906)*x[1]+(0.58858894515)*x[2]**o+(0.0152152159566)*x[2]
-        arg[1,3,1,0]=(0.64005604234)*x[0]**o+(0.308265334836)*x[0]+(0.321645661286)*x[1]**o+(0.670017614875)*x[1]+(0.712764136703)*x[2]**o+(0.458986964342)*x[2]
-        arg[1,3,1,1]=(-0.201376578944)*x[0]**o+(-0.271793865118)*x[0]+(-0.798181331582)*x[1]**o+(0.690100877945)*x[1]+(0.600350295622)*x[2]**o+(0.341066858436)*x[2]
-        arg[1,3,2,0]=(0.459832113137)*x[0]**o+(0.0566780273877)*x[0]+(0.221723079112)*x[1]**o+(-0.681001728734)*x[1]+(0.265505135729)*x[2]**o+(-0.389365671367)*x[2]
-        arg[1,3,2,1]=(0.715444384493)*x[0]**o+(-0.705697520786)*x[0]+(0.945208081248)*x[1]**o+(0.0233171867808)*x[1]+(0.740156166802)*x[2]**o+(-0.144314337012)*x[2]
-        arg[1,4,0,0]=(-0.490162545806)*x[0]**o+(0.542981268396)*x[0]+(-0.841471465564)*x[1]**o+(0.79091798393)*x[1]+(0.245598142884)*x[2]**o+(0.4740296042)*x[2]
-        arg[1,4,0,1]=(-0.504504615322)*x[0]**o+(0.45494067251)*x[0]+(-0.612427248728)*x[1]**o+(0.0880340051743)*x[1]+(0.645906227711)*x[2]**o+(0.772038416622)*x[2]
-        arg[1,4,1,0]=(0.945538632492)*x[0]**o+(0.98519603491)*x[0]+(-0.245495451859)*x[1]**o+(-0.70732864026)*x[1]+(0.378733662069)*x[2]**o+(0.579554415018)*x[2]
-        arg[1,4,1,1]=(0.886659064398)*x[0]**o+(-0.491870874438)*x[0]+(0.751814742427)*x[1]**o+(0.430589443767)*x[1]+(-0.729193959143)*x[2]**o+(-0.699344758538)*x[2]
-        arg[1,4,2,0]=(-0.4190140481)*x[0]**o+(0.84509612452)*x[0]+(-0.263608911857)*x[1]**o+(0.693648282371)*x[1]+(-0.144463932166)*x[2]**o+(0.384293689266)*x[2]
-        arg[1,4,2,1]=(-0.266973780787)*x[0]**o+(0.613988367707)*x[0]+(0.686955199789)*x[1]**o+(-0.301585818785)*x[1]+(-0.574601202558)*x[2]**o+(-0.430718616071)*x[2]
-        arg[2,0,0,0]=(-0.117390727803)*x[0]**o+(-0.25850139145)*x[0]+(0.324909086031)*x[1]**o+(-0.593112241553)*x[1]+(-0.51016768177)*x[2]**o+(0.392299415334)*x[2]
-        arg[2,0,0,1]=(0.290478531696)*x[0]**o+(0.758153023626)*x[0]+(0.531003993361)*x[1]**o+(-0.112481510374)*x[1]+(0.950222158203)*x[2]**o+(-0.742480526204)*x[2]
-        arg[2,0,1,0]=(-0.754820921225)*x[0]**o+(-0.408482044077)*x[0]+(-0.229697426486)*x[1]**o+(-0.983010424713)*x[1]+(-0.286618604257)*x[2]**o+(-0.489034108451)*x[2]
-        arg[2,0,1,1]=(0.96775757822)*x[0]**o+(0.797765725721)*x[0]+(-0.90936176648)*x[1]**o+(-0.372755885193)*x[1]+(-0.144727874143)*x[2]**o+(0.341624944551)*x[2]
-        arg[2,0,2,0]=(0.672779422278)*x[0]**o+(-0.936102224964)*x[0]+(-0.763620352857)*x[1]**o+(0.265802509744)*x[1]+(0.275798875047)*x[2]**o+(0.235397520942)*x[2]
-        arg[2,0,2,1]=(0.192866248041)*x[0]**o+(0.656863606616)*x[0]+(-0.902796948663)*x[1]**o+(0.692123089256)*x[1]+(0.311287987388)*x[2]**o+(0.555427507546)*x[2]
-        arg[2,1,0,0]=(0.464585537593)*x[0]**o+(0.161744615208)*x[0]+(-0.325569920662)*x[1]**o+(-0.47142644441)*x[1]+(0.885151021784)*x[2]**o+(-0.840595219086)*x[2]
-        arg[2,1,0,1]=(-0.659253397488)*x[0]**o+(0.54391314862)*x[0]+(-0.595612529952)*x[1]**o+(-0.0472758114379)*x[1]+(0.876391930188)*x[2]**o+(-0.440313199946)*x[2]
-        arg[2,1,1,0]=(-0.445591423364)*x[0]**o+(0.179144841652)*x[0]+(-0.294166502086)*x[1]**o+(-0.373820778739)*x[1]+(0.464609314863)*x[2]**o+(0.407893781978)*x[2]
-        arg[2,1,1,1]=(-0.767512700255)*x[0]**o+(0.63198312168)*x[0]+(0.652318598902)*x[1]**o+(0.817874971823)*x[1]+(0.397211574885)*x[2]**o+(0.33174354886)*x[2]
-        arg[2,1,2,0]=(0.473801282131)*x[0]**o+(-0.778895701394)*x[0]+(-0.801488721847)*x[1]**o+(-0.585840161723)*x[1]+(-0.805496721223)*x[2]**o+(0.585971840421)*x[2]
-        arg[2,1,2,1]=(0.472329620891)*x[0]**o+(-0.0473805663117)*x[0]+(0.0894117727522)*x[1]**o+(-0.308473625733)*x[1]+(-0.658376953956)*x[2]**o+(0.32027592346)*x[2]
-        arg[2,2,0,0]=(0.843241796369)*x[0]**o+(0.346857959798)*x[0]+(0.0111223078269)*x[1]**o+(-0.949623227267)*x[1]+(-0.152362393376)*x[2]**o+(-0.886340001141)*x[2]
-        arg[2,2,0,1]=(-0.555393018762)*x[0]**o+(0.666364344488)*x[0]+(0.181237902671)*x[1]**o+(0.670959040345)*x[1]+(0.57383285317)*x[2]**o+(-0.451027832775)*x[2]
-        arg[2,2,1,0]=(0.249709446431)*x[0]**o+(0.568753063379)*x[0]+(-0.812386750097)*x[1]**o+(0.506805124672)*x[1]+(-0.454844217662)*x[2]**o+(0.843435269288)*x[2]
-        arg[2,2,1,1]=(0.753144930025)*x[0]**o+(0.0181642998269)*x[0]+(0.622635241593)*x[1]**o+(-0.372883842874)*x[1]+(0.366920965577)*x[2]**o+(-0.092391524816)*x[2]
-        arg[2,2,2,0]=(0.309601906611)*x[0]**o+(-0.502573192965)*x[0]+(-0.420795137333)*x[1]**o+(-0.807109356307)*x[1]+(-0.802887583918)*x[2]**o+(0.552609684817)*x[2]
-        arg[2,2,2,1]=(0.320933223342)*x[0]**o+(0.541931544704)*x[0]+(0.988715316931)*x[1]**o+(-0.4197325237)*x[1]+(-0.438705512435)*x[2]**o+(-0.540175093599)*x[2]
-        arg[2,3,0,0]=(0.018870015518)*x[0]**o+(-0.615120691773)*x[0]+(0.596295280542)*x[1]**o+(0.210874310884)*x[1]+(-0.652194502321)*x[2]**o+(0.74019575754)*x[2]
-        arg[2,3,0,1]=(0.820285141622)*x[0]**o+(0.130985741886)*x[0]+(-0.397387767472)*x[1]**o+(0.975103051154)*x[1]+(0.0887369214611)*x[2]**o+(0.88498731668)*x[2]
-        arg[2,3,1,0]=(0.160503336808)*x[0]**o+(0.641180113144)*x[0]+(-0.408109675737)*x[1]**o+(-0.355443951133)*x[1]+(-0.429622016495)*x[2]**o+(0.998729833779)*x[2]
-        arg[2,3,1,1]=(-0.646524352112)*x[0]**o+(-0.289894880059)*x[0]+(0.909761879864)*x[1]**o+(0.30453651619)*x[1]+(0.884596709091)*x[2]**o+(0.329408737003)*x[2]
-        arg[2,3,2,0]=(0.459385919432)*x[0]**o+(0.416447271916)*x[0]+(-0.400798659819)*x[1]**o+(-0.769043818187)*x[1]+(-0.631682400803)*x[2]**o+(-0.80150361084)*x[2]
-        arg[2,3,2,1]=(-0.544824298969)*x[0]**o+(0.191301965562)*x[0]+(0.41061102918)*x[1]**o+(-0.999195759064)*x[1]+(-0.0226105975802)*x[2]**o+(-0.137078691725)*x[2]
-        arg[2,4,0,0]=(-0.624033952375)*x[0]**o+(0.0792222332007)*x[0]+(0.766756718455)*x[1]**o+(0.581487379511)*x[1]+(-0.437940391245)*x[2]**o+(0.115617341492)*x[2]
-        arg[2,4,0,1]=(-0.300526068838)*x[0]**o+(-0.822844066866)*x[0]+(0.660949310367)*x[1]**o+(-0.0993949179102)*x[1]+(0.599884615655)*x[2]**o+(-0.903177033523)*x[2]
-        arg[2,4,1,0]=(-0.654642517091)*x[0]**o+(0.428391621765)*x[0]+(0.932377441464)*x[1]**o+(-0.459525189684)*x[1]+(0.667425199675)*x[2]**o+(-0.937213410686)*x[2]
-        arg[2,4,1,1]=(0.258067525957)*x[0]**o+(0.619943768383)*x[0]+(0.458217567511)*x[1]**o+(0.0812191081554)*x[1]+(0.743260637332)*x[2]**o+(-0.796150472293)*x[2]
-        arg[2,4,2,0]=(0.782473636556)*x[0]**o+(-0.441405613305)*x[0]+(0.3951595327)*x[1]**o+(-0.449855781187)*x[1]+(-0.964130179212)*x[2]**o+(-0.299199410525)*x[2]
-        arg[2,4,2,1]=(-0.878340584397)*x[0]**o+(-0.674575785429)*x[0]+(0.838137461257)*x[1]**o+(-0.498710475715)*x[1]+(-0.117205127994)*x[2]**o+(0.0934669704542)*x[2]
-        arg[3,0,0,0]=(0.139631366137)*x[0]**o+(-0.893001605238)*x[0]+(-0.420780773096)*x[1]**o+(0.439055863393)*x[1]+(0.173113363237)*x[2]**o+(0.893867443017)*x[2]
-        arg[3,0,0,1]=(-0.804823042124)*x[0]**o+(0.250231181298)*x[0]+(0.358464048439)*x[1]**o+(-0.847391231172)*x[1]+(-0.515391975323)*x[2]**o+(-0.999640302937)*x[2]
-        arg[3,0,1,0]=(0.328676968943)*x[0]**o+(-0.0521242139559)*x[0]+(0.861548411537)*x[1]**o+(-0.288979961428)*x[1]+(-0.927901849987)*x[2]**o+(0.857869958971)*x[2]
-        arg[3,0,1,1]=(-0.654866876537)*x[0]**o+(-0.0515462321916)*x[0]+(-0.224164685097)*x[1]**o+(-0.84207399757)*x[1]+(-0.442392040219)*x[2]**o+(-0.915734076984)*x[2]
-        arg[3,0,2,0]=(-0.322517406382)*x[0]**o+(-0.757146499161)*x[0]+(-0.541690197465)*x[1]**o+(0.931090695413)*x[1]+(-0.355505263744)*x[2]**o+(-0.773185404514)*x[2]
-        arg[3,0,2,1]=(0.421030649833)*x[0]**o+(-0.83768939688)*x[0]+(-0.863791071447)*x[1]**o+(0.78393205545)*x[1]+(-0.489893911681)*x[2]**o+(-0.291989245709)*x[2]
-        arg[3,1,0,0]=(0.550839051007)*x[0]**o+(-0.883853789938)*x[0]+(-0.339529971923)*x[1]**o+(-0.756936847344)*x[1]+(0.724888858656)*x[2]**o+(-0.981057762224)*x[2]
-        arg[3,1,0,1]=(0.711792743156)*x[0]**o+(0.233248429378)*x[0]+(0.526076154408)*x[1]**o+(0.349364804166)*x[1]+(0.271475992486)*x[2]**o+(0.782429402713)*x[2]
-        arg[3,1,1,0]=(-0.499072848146)*x[0]**o+(-0.0604888692308)*x[0]+(0.545442893272)*x[1]**o+(-0.688797522515)*x[1]+(0.305341295222)*x[2]**o+(0.130010601331)*x[2]
-        arg[3,1,1,1]=(0.940695359452)*x[0]**o+(0.113015472294)*x[0]+(-0.506254395321)*x[1]**o+(-0.252044277039)*x[1]+(0.0172784972094)*x[2]**o+(-0.184256978193)*x[2]
-        arg[3,1,2,0]=(0.550472143981)*x[0]**o+(-0.729809590776)*x[0]+(-0.293765999495)*x[1]**o+(-0.378042976721)*x[1]+(0.973242167993)*x[2]**o+(-0.75350391134)*x[2]
-        arg[3,1,2,1]=(0.369266178598)*x[0]**o+(-0.764034492366)*x[0]+(-0.713325992328)*x[1]**o+(0.948932375717)*x[1]+(-0.335074977323)*x[2]**o+(0.117829591745)*x[2]
-        arg[3,2,0,0]=(0.426458076699)*x[0]**o+(-0.520551329627)*x[0]+(-0.773464312884)*x[1]**o+(0.26332468989)*x[1]+(0.143497828773)*x[2]**o+(0.0676278275986)*x[2]
-        arg[3,2,0,1]=(0.85806016531)*x[0]**o+(0.755361032731)*x[0]+(0.403942188112)*x[1]**o+(0.0113665816202)*x[1]+(-0.439835633198)*x[2]**o+(0.620930145183)*x[2]
-        arg[3,2,1,0]=(-0.852838624821)*x[0]**o+(-0.918594624263)*x[0]+(-0.572898555139)*x[1]**o+(-0.14353390918)*x[1]+(-0.716010071307)*x[2]**o+(0.134687635305)*x[2]
-        arg[3,2,1,1]=(-0.14282590746)*x[0]**o+(-0.169314199229)*x[0]+(0.880745511071)*x[1]**o+(0.540733710441)*x[1]+(-0.131424658303)*x[2]**o+(-0.93209431119)*x[2]
-        arg[3,2,2,0]=(-0.864016075688)*x[0]**o+(-0.265794760131)*x[0]+(0.444625188371)*x[1]**o+(0.133693703972)*x[1]+(-0.749799597936)*x[2]**o+(0.886355820615)*x[2]
-        arg[3,2,2,1]=(0.676281241167)*x[0]**o+(-0.351800298325)*x[0]+(-0.751498380099)*x[1]**o+(-0.561737786104)*x[1]+(-0.984872672853)*x[2]**o+(0.476840947707)*x[2]
-        arg[3,3,0,0]=(0.457874366022)*x[0]**o+(-0.126929649966)*x[0]+(0.666077559139)*x[1]**o+(-0.966437669224)*x[1]+(-0.849000502816)*x[2]**o+(0.990790747926)*x[2]
-        arg[3,3,0,1]=(0.45136859326)*x[0]**o+(0.771355456911)*x[0]+(-0.678558472676)*x[1]**o+(0.0366869703264)*x[1]+(-0.257247358952)*x[2]**o+(-0.290852285538)*x[2]
-        arg[3,3,1,0]=(-0.623007069616)*x[0]**o+(-0.365255080044)*x[0]+(0.441927420573)*x[1]**o+(0.331640625664)*x[1]+(-0.21153951456)*x[2]**o+(0.297967669123)*x[2]
-        arg[3,3,1,1]=(-0.836057742118)*x[0]**o+(0.959873293328)*x[0]+(-0.52034405502)*x[1]**o+(-0.178838686591)*x[1]+(0.317610563306)*x[2]**o+(-0.555134650833)*x[2]
-        arg[3,3,2,0]=(0.0819108022024)*x[0]**o+(0.69432296821)*x[0]+(-0.23685434367)*x[1]**o+(-0.0442137744391)*x[1]+(-0.879175086057)*x[2]**o+(-0.28031950012)*x[2]
-        arg[3,3,2,1]=(0.340083286763)*x[0]**o+(-0.381942838645)*x[0]+(0.570579443852)*x[1]**o+(0.772192708863)*x[1]+(0.42813556157)*x[2]**o+(0.735683065499)*x[2]
-        arg[3,4,0,0]=(-0.866813692418)*x[0]**o+(-0.53715159706)*x[0]+(0.0725900211922)*x[1]**o+(0.0891167848614)*x[1]+(-0.381482922347)*x[2]**o+(-0.521504123034)*x[2]
-        arg[3,4,0,1]=(0.487750922723)*x[0]**o+(0.967820473849)*x[0]+(0.305600886352)*x[1]**o+(0.350777657643)*x[1]+(-0.383731485788)*x[2]**o+(0.814016126476)*x[2]
-        arg[3,4,1,0]=(-0.186663244344)*x[0]**o+(0.144872424379)*x[0]+(0.844454339304)*x[1]**o+(0.252133708483)*x[1]+(-0.748235508222)*x[2]**o+(0.702952185343)*x[2]
-        arg[3,4,1,1]=(-0.962296047927)*x[0]**o+(0.874277032826)*x[0]+(-0.404689253219)*x[1]**o+(-0.174075799004)*x[1]+(0.65086350106)*x[2]**o+(-0.109850650677)*x[2]
-        arg[3,4,2,0]=(-0.59515836027)*x[0]**o+(-0.0917296352911)*x[0]+(0.834779238353)*x[1]**o+(0.951252871777)*x[1]+(0.983008684497)*x[2]**o+(-0.784806954891)*x[2]
-        arg[3,4,2,1]=(0.603110971708)*x[0]**o+(0.291507042984)*x[0]+(-0.401523286981)*x[1]**o+(-0.994760476862)*x[1]+(0.410516007475)*x[2]**o+(0.368982230001)*x[2]
-        ref[0,0,0,0]=(-0.322384218211)/(o+1.)+(0.436168366323)
-        ref[0,0,0,1]=(-0.550432608405)/(o+1.)+(-0.839529924682)
-        ref[0,0,1,0]=(-1.20222931022)/(o+1.)+(-0.674931792543)
-        ref[0,0,1,1]=(-1.99447702496)/(o+1.)+(0.184076712997)
-        ref[0,0,2,0]=(-0.848786191606)/(o+1.)+(-0.719076228559)
-        ref[0,0,2,1]=(0.488199570726)/(o+1.)+(0.818508727159)
-        ref[0,1,0,0]=(0.910006770156)/(o+1.)+(-0.781077934994)
-        ref[0,1,0,1]=(0.229140786917)/(o+1.)+(0.225201244712)
-        ref[0,1,1,0]=(-1.24973037868)/(o+1.)+(0.478630842756)
-        ref[0,1,1,1]=(0.362813222831)/(o+1.)+(-0.269799066354)
-        ref[0,1,2,0]=(0.704186070044)/(o+1.)+(-0.0666602572428)
-        ref[0,1,2,1]=(-0.429870561459)/(o+1.)+(-0.692214543685)
-        ref[0,2,0,0]=(-1.76040621668)/(o+1.)+(-0.103077097544)
-        ref[0,2,0,1]=(-0.578245990054)/(o+1.)+(-0.24050068432)
-        ref[0,2,1,0]=(0.982824772144)/(o+1.)+(-0.332261654225)
-        ref[0,2,1,1]=(0.493111487615)/(o+1.)+(0.105743857349)
-        ref[0,2,2,0]=(-0.406637376689)/(o+1.)+(0.910652270393)
-        ref[0,2,2,1]=(0.0735211634779)/(o+1.)+(0.355106669226)
-        ref[0,3,0,0]=(-0.538705798782)/(o+1.)+(0.896367101094)
-        ref[0,3,0,1]=(0.11388337928)/(o+1.)+(0.766078903586)
-        ref[0,3,1,0]=(0.955296156262)/(o+1.)+(-0.64915883862)
-        ref[0,3,1,1]=(0.437273793256)/(o+1.)+(-0.61952690992)
-        ref[0,3,2,0]=(1.07390497644)/(o+1.)+(-0.242730112953)
-        ref[0,3,2,1]=(-0.79053815352)/(o+1.)+(-0.0521715653697)
-        ref[0,4,0,0]=(-0.0103557372704)/(o+1.)+(0.939327713906)
-        ref[0,4,0,1]=(-0.66740052552)/(o+1.)+(-0.671249919496)
-        ref[0,4,1,0]=(-1.10797150302)/(o+1.)+(0.454490777873)
-        ref[0,4,1,1]=(-0.00636792544909)/(o+1.)+(-0.368286670996)
-        ref[0,4,2,0]=(-1.23874065284)/(o+1.)+(0.0410396874718)
-        ref[0,4,2,1]=(0.834902700591)/(o+1.)+(0.562757794439)
-        ref[1,0,0,0]=(1.46682450791)/(o+1.)+(0.891962057632)
-        ref[1,0,0,1]=(0.183329431084)/(o+1.)+(0.659083249781)
-        ref[1,0,1,0]=(-0.24909411204)/(o+1.)+(0.201301697863)
-        ref[1,0,1,1]=(0.723423340723)/(o+1.)+(-0.205765407152)
-        ref[1,0,2,0]=(0.607815389082)/(o+1.)+(-0.451934578027)
-        ref[1,0,2,1]=(0.919070217555)/(o+1.)+(1.00996326691)
-        ref[1,1,0,0]=(0.361804510188)/(o+1.)+(-0.272105134113)
-        ref[1,1,0,1]=(-0.388145380449)/(o+1.)+(0.440667992719)
-        ref[1,1,1,0]=(1.11229281554)/(o+1.)+(0.0358417840478)
-        ref[1,1,1,1]=(-0.360763258547)/(o+1.)+(-0.0662175232282)
-        ref[1,1,2,0]=(-0.421932179206)/(o+1.)+(1.04809456598)
-        ref[1,1,2,1]=(1.5138402229)/(o+1.)+(-0.0182788239862)
-        ref[1,2,0,0]=(-1.2439886311)/(o+1.)+(0.204333673483)
-        ref[1,2,0,1]=(1.36866295286)/(o+1.)+(0.510865902853)
-        ref[1,2,1,0]=(0.636378052915)/(o+1.)+(-0.439317277801)
-        ref[1,2,1,1]=(2.1721593538)/(o+1.)+(0.63055844212)
-        ref[1,2,2,0]=(-0.00984028813171)/(o+1.)+(-0.390721816834)
-        ref[1,2,2,1]=(1.06592059421)/(o+1.)+(0.303699000873)
-        ref[1,3,0,0]=(-0.160594832134)/(o+1.)+(-0.271446552947)
-        ref[1,3,0,1]=(0.313068732589)/(o+1.)+(-0.457202820505)
-        ref[1,3,1,0]=(1.67446584033)/(o+1.)+(0.718634957026)
-        ref[1,3,1,1]=(-0.399207614903)/(o+1.)+(0.379686935632)
-        ref[1,3,2,0]=(0.947060327978)/(o+1.)+(-0.506844686357)
-        ref[1,3,2,1]=(2.40080863254)/(o+1.)+(-0.413347335508)
-        ref[1,4,0,0]=(-1.08603586849)/(o+1.)+(0.903964428263)
-        ref[1,4,0,1]=(-0.471025636339)/(o+1.)+(0.657506547153)
-        ref[1,4,1,0]=(1.0787768427)/(o+1.)+(0.428710904834)
-        ref[1,4,1,1]=(0.909279847682)/(o+1.)+(-0.380313094604)
-        ref[1,4,2,0]=(-0.827086892123)/(o+1.)+(0.961519048079)
-        ref[1,4,2,1]=(-0.154619783556)/(o+1.)+(-0.0591580335741)
-        ref[2,0,0,0]=(-0.302649323542)/(o+1.)+(-0.229657108834)
-        ref[2,0,0,1]=(1.77170468326)/(o+1.)+(-0.0484045064764)
-        ref[2,0,1,0]=(-1.27113695197)/(o+1.)+(-0.94026328862)
-        ref[2,0,1,1]=(-0.0863320624027)/(o+1.)+(0.383317392539)
-        ref[2,0,2,0]=(0.184957944467)/(o+1.)+(-0.217451097139)
-        ref[2,0,2,1]=(-0.398642713235)/(o+1.)+(0.952207101709)
-        ref[2,1,0,0]=(1.02416663872)/(o+1.)+(-0.575138524144)
-        ref[2,1,0,1]=(-0.378473997252)/(o+1.)+(0.0281620686178)
-        ref[2,1,1,0]=(-0.275148610588)/(o+1.)+(0.106608922446)
-        ref[2,1,1,1]=(0.282017473532)/(o+1.)+(0.890800821181)
-        ref[2,1,2,0]=(-1.13318416094)/(o+1.)+(-0.389382011348)
-        ref[2,1,2,1]=(-0.0966355603128)/(o+1.)+(-0.0177891342927)
-        ref[2,2,0,0]=(0.70200171082)/(o+1.)+(-0.744552634305)
-        ref[2,2,0,1]=(0.199677737079)/(o+1.)+(0.443147776029)
-        ref[2,2,1,0]=(-1.01752152133)/(o+1.)+(0.959496728669)
-        ref[2,2,1,1]=(1.74270113719)/(o+1.)+(-0.223555533932)
-        ref[2,2,2,0]=(-0.91408081464)/(o+1.)+(-0.378536432227)
-        ref[2,2,2,1]=(0.870943027839)/(o+1.)+(-0.208988036298)
-        ref[2,3,0,0]=(-0.0370292062615)/(o+1.)+(0.167974688326)
-        ref[2,3,0,1]=(0.51163429561)/(o+1.)+(0.99553805486)
-        ref[2,3,1,0]=(-0.677228355424)/(o+1.)+(0.642232997895)
-        ref[2,3,1,1]=(1.14783423684)/(o+1.)+(0.172025186567)
-        ref[2,3,2,0]=(-0.57309514119)/(o+1.)+(-0.577050078555)
-        ref[2,3,2,1]=(-0.156823867369)/(o+1.)+(-0.472486242613)
-        ref[2,4,0,0]=(-0.295217625165)/(o+1.)+(0.388163477102)
-        ref[2,4,0,1]=(0.960307857184)/(o+1.)+(-0.91270800915)
-        ref[2,4,1,0]=(0.945160124047)/(o+1.)+(-0.484173489303)
-        ref[2,4,1,1]=(1.4595457308)/(o+1.)+(-0.0474937978771)
-        ref[2,4,2,0]=(0.213502990044)/(o+1.)+(-0.595230402509)
-        ref[2,4,2,1]=(-0.157408251134)/(o+1.)+(-0.539909645345)
-        ref[3,0,0,0]=(-0.108036043722)/(o+1.)+(0.219960850586)
-        ref[3,0,0,1]=(-0.961750969008)/(o+1.)+(-0.798400176406)
-        ref[3,0,1,0]=(0.262323530493)/(o+1.)+(0.258382891794)
-        ref[3,0,1,1]=(-1.32142360185)/(o+1.)+(-0.904677153373)
-        ref[3,0,2,0]=(-1.21971286759)/(o+1.)+(-0.299620604131)
-        ref[3,0,2,1]=(-0.932654333294)/(o+1.)+(-0.17287329357)
-        ref[3,1,0,0]=(0.93619793774)/(o+1.)+(-1.31092419975)
-        ref[3,1,0,1]=(1.50934489005)/(o+1.)+(0.682521318129)
-        ref[3,1,1,0]=(0.351711340348)/(o+1.)+(-0.309637895207)
-        ref[3,1,1,1]=(0.451719461341)/(o+1.)+(-0.161642891469)
-        ref[3,1,2,0]=(1.22994831248)/(o+1.)+(-0.930678239419)
-        ref[3,1,2,1]=(-0.679134791053)/(o+1.)+(0.151363737548)
-        ref[3,2,0,0]=(-0.203508407413)/(o+1.)+(-0.0947994060691)
-        ref[3,2,0,1]=(0.822166720224)/(o+1.)+(0.693828879767)
-        ref[3,2,1,0]=(-2.14174725127)/(o+1.)+(-0.463720449069)
-        ref[3,2,1,1]=(0.606494945308)/(o+1.)+(-0.280337399989)
-        ref[3,2,2,0]=(-1.16919048525)/(o+1.)+(0.377127382228)
-        ref[3,2,2,1]=(-1.06008981178)/(o+1.)+(-0.218348568361)
-        ref[3,3,0,0]=(0.274951422345)/(o+1.)+(-0.0512882856318)
-        ref[3,3,0,1]=(-0.484437238367)/(o+1.)+(0.25859507085)
-        ref[3,3,1,0]=(-0.392619163603)/(o+1.)+(0.132176607371)
-        ref[3,3,1,1]=(-1.03879123383)/(o+1.)+(0.112949977952)
-        ref[3,3,2,0]=(-1.03411862752)/(o+1.)+(0.184894846825)
-        ref[3,3,2,1]=(1.33879829218)/(o+1.)+(0.562966467859)
-        ref[3,4,0,0]=(-1.17570659357)/(o+1.)+(-0.484769467616)
-        ref[3,4,0,1]=(0.409620323287)/(o+1.)+(1.06630712898)
-        ref[3,4,1,0]=(-0.0904444132627)/(o+1.)+(0.549979159103)
-        ref[3,4,1,1]=(-0.716121800087)/(o+1.)+(0.295175291572)
-        ref[3,4,2,0]=(1.22262956258)/(o+1.)+(0.0373581407971)
-        ref[3,4,2,1]=(0.612103692201)/(o+1.)+(-0.167135601938)
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 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 the 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.465976690369)*x[0]**o+(-0.25136070196)*x[0]+(0.409576841566)*x[1]**o+(0.726707772754)*x[1]
-        ref=(0.875553531935)/(o+1.)+(0.237673535397)
-      else:
-        arg=(0.567785895928)*x[0]**o+(0.928477128396)*x[0]+(-0.625720943088)*x[1]**o+(-0.681460841298)*x[1]+(-0.866801010069)*x[2]**o+(0.159594300637)*x[2]
-        ref=(-0.924736057229)/(o+1.)+(0.203305293867)
-      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 the 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,(2,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(-0.839020088668)*x[0]**o+(-0.880288035177)*x[0]+(0.260951734364)*x[1]**o+(-0.624208000982)*x[1]
-        arg[1]=(0.985421831314)*x[0]**o+(0.660399229451)*x[0]+(-0.514003848134)*x[1]**o+(0.0312162082593)*x[1]
-        ref[0]=(-0.578068354304)/(o+1.)+(-0.75224801808)
-        ref[1]=(0.47141798318)/(o+1.)+(0.345807718855)
-      else:
-        arg[0]=(-0.627307316929)*x[0]**o+(0.500432411035)*x[0]+(0.233895908313)*x[1]**o+(-0.125048135432)*x[1]+(0.0695114009632)*x[2]**o+(0.995170977074)*x[2]
-        arg[1]=(0.760033715785)*x[0]**o+(0.48895905139)*x[0]+(0.240372023176)*x[1]**o+(0.33946689896)*x[1]+(-0.774638489419)*x[2]**o+(-0.0777240871074)*x[2]
-        ref[0]=(-0.323900007653)/(o+1.)+(0.685277626338)
-        ref[1]=(0.225767249542)/(o+1.)+(0.375350931622)
-      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_ContinuousFunction_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.844492048883)*x[0]**o+(0.727132679659)*x[0]+(-0.862576284722)*x[1]**o+(0.502937561417)*x[1]
-        arg[0,1]=(-0.587157419309)*x[0]**o+(0.00327068097107)*x[0]+(0.422592349683)*x[1]**o+(0.167479615369)*x[1]
-        arg[0,2]=(0.771156665672)*x[0]**o+(-0.371091138833)*x[0]+(-0.867750378658)*x[1]**o+(-0.744394290185)*x[1]
-        arg[0,3]=(0.669718598855)*x[0]**o+(-0.0825909409121)*x[0]+(0.868872948791)*x[1]**o+(0.141891982204)*x[1]
-        arg[0,4]=(-0.441072764653)*x[0]**o+(-0.929654649265)*x[0]+(-0.35883498816)*x[1]**o+(-0.84045480381)*x[1]
-        arg[1,0]=(0.555668196622)*x[0]**o+(0.94306681043)*x[0]+(0.586512446245)*x[1]**o+(0.702007276327)*x[1]
-        arg[1,1]=(0.792083771005)*x[0]**o+(-0.865830139617)*x[0]+(0.0929971631615)*x[1]**o+(0.620446289121)*x[1]
-        arg[1,2]=(-0.201978375472)*x[0]**o+(-0.0777206885918)*x[0]+(0.798755459687)*x[1]**o+(-0.278086468846)*x[1]
-        arg[1,3]=(0.063028419572)*x[0]**o+(-0.454786232294)*x[0]+(-0.0481393324293)*x[1]**o+(-0.612657132834)*x[1]
-        arg[1,4]=(-0.743283787964)*x[0]**o+(0.854827303846)*x[0]+(0.94241635825)*x[1]**o+(0.436937526521)*x[1]
-        arg[2,0]=(-0.814975695669)*x[0]**o+(0.579477783769)*x[0]+(0.00998264005965)*x[1]**o+(-0.913665878657)*x[1]
-        arg[2,1]=(-0.526833976369)*x[0]**o+(-0.800386086232)*x[0]+(-0.487600053086)*x[1]**o+(0.00242562519003)*x[1]
-        arg[2,2]=(-0.964119591874)*x[0]**o+(0.203212394214)*x[0]+(-0.96850837954)*x[1]**o+(-0.214886132512)*x[1]
-        arg[2,3]=(-0.356249104564)*x[0]**o+(0.329769293221)*x[0]+(0.936664928754)*x[1]**o+(0.520603503283)*x[1]
-        arg[2,4]=(0.255464219424)*x[0]**o+(-0.157783294516)*x[0]+(0.519451787865)*x[1]**o+(0.00960521397376)*x[1]
-        arg[3,0]=(-0.117250486034)*x[0]**o+(0.192945431273)*x[0]+(-0.7580154297)*x[1]**o+(-0.308801650294)*x[1]
-        arg[3,1]=(0.243931002845)*x[0]**o+(-0.626714191745)*x[0]+(-0.365870571265)*x[1]**o+(0.652257582021)*x[1]
-        arg[3,2]=(-0.769756656122)*x[0]**o+(0.711106390017)*x[0]+(0.150749630653)*x[1]**o+(-0.0441309732448)*x[1]
-        arg[3,3]=(0.92677837493)*x[0]**o+(0.507199859313)*x[0]+(-0.542275490828)*x[1]**o+(-0.0907270087228)*x[1]
-        arg[3,4]=(-0.0306175885885)*x[0]**o+(-0.434666505018)*x[0]+(-0.815633427562)*x[1]**o+(-0.916424797903)*x[1]
-        ref[0,0]=(-1.70706833361)/(o+1.)+(0.615035120538)
-        ref[0,1]=(-0.164565069626)/(o+1.)+(0.08537514817)
-        ref[0,2]=(-0.0965937129851)/(o+1.)+(-0.557742714509)
-        ref[0,3]=(1.53859154765)/(o+1.)+(0.0296505206459)
-        ref[0,4]=(-0.799907752814)/(o+1.)+(-0.885054726537)
-        ref[1,0]=(1.14218064287)/(o+1.)+(0.822537043379)
-        ref[1,1]=(0.885080934167)/(o+1.)+(-0.122691925248)
-        ref[1,2]=(0.596777084215)/(o+1.)+(-0.177903578719)
-        ref[1,3]=(0.0148890871427)/(o+1.)+(-0.533721682564)
-        ref[1,4]=(0.199132570285)/(o+1.)+(0.645882415184)
-        ref[2,0]=(-0.80499305561)/(o+1.)+(-0.167094047444)
-        ref[2,1]=(-1.01443402945)/(o+1.)+(-0.398980230521)
-        ref[2,2]=(-1.93262797141)/(o+1.)+(-0.00583686914904)
-        ref[2,3]=(0.580415824189)/(o+1.)+(0.425186398252)
-        ref[2,4]=(0.774916007289)/(o+1.)+(-0.074089040271)
-        ref[3,0]=(-0.875265915734)/(o+1.)+(-0.0579281095106)
-        ref[3,1]=(-0.12193956842)/(o+1.)+(0.0127716951382)
-        ref[3,2]=(-0.619007025469)/(o+1.)+(0.333487708386)
-        ref[3,3]=(0.384502884102)/(o+1.)+(0.208236425295)
-        ref[3,4]=(-0.846251016151)/(o+1.)+(-0.675545651461)
-      else:
-        arg[0,0]=(0.596538443259)*x[0]**o+(0.479462980373)*x[0]+(-0.334469126403)*x[1]**o+(0.784201085556)*x[1]+(-0.231474140531)*x[2]**o+(-0.368096345589)*x[2]
-        arg[0,1]=(0.188945383338)*x[0]**o+(-0.95033024122)*x[0]+(0.567904901047)*x[1]**o+(-0.76703296351)*x[1]+(-0.0116083690376)*x[2]**o+(-0.211176589764)*x[2]
-        arg[0,2]=(0.225412552449)*x[0]**o+(-0.731615155924)*x[0]+(-0.362727501637)*x[1]**o+(-0.195442119344)*x[1]+(-0.215444456285)*x[2]**o+(0.412715796392)*x[2]
-        arg[0,3]=(-0.00941287481408)*x[0]**o+(-0.207271678463)*x[0]+(0.66582433583)*x[1]**o+(-0.297871484308)*x[1]+(-0.819460465536)*x[2]**o+(-0.3316307033)*x[2]
-        arg[0,4]=(-0.172265683581)*x[0]**o+(0.881658164973)*x[0]+(0.0267816673708)*x[1]**o+(-0.526757427521)*x[1]+(-0.666953449252)*x[2]**o+(0.366533690002)*x[2]
-        arg[1,0]=(-0.575272180021)*x[0]**o+(-0.707236339163)*x[0]+(-0.734723292219)*x[1]**o+(-0.872019568084)*x[1]+(-0.513269190461)*x[2]**o+(-0.95077853535)*x[2]
-        arg[1,1]=(0.687652562435)*x[0]**o+(0.500668143461)*x[0]+(0.127678854367)*x[1]**o+(0.135196530391)*x[1]+(0.219757431874)*x[2]**o+(0.43373842168)*x[2]
-        arg[1,2]=(-0.674120744855)*x[0]**o+(-0.792769889708)*x[0]+(0.0414602844391)*x[1]**o+(-0.159887164563)*x[1]+(0.406441555189)*x[2]**o+(-0.662210077269)*x[2]
-        arg[1,3]=(-0.623120612358)*x[0]**o+(0.895951757448)*x[0]+(0.957407224559)*x[1]**o+(-0.472225118848)*x[1]+(-0.294551998847)*x[2]**o+(0.503584320886)*x[2]
-        arg[1,4]=(-0.304220645545)*x[0]**o+(0.812321371589)*x[0]+(0.932257196386)*x[1]**o+(0.736014913915)*x[1]+(0.119140391025)*x[2]**o+(0.910696940879)*x[2]
-        arg[2,0]=(0.275470013797)*x[0]**o+(-0.903754203548)*x[0]+(-0.443211232771)*x[1]**o+(0.78815938507)*x[1]+(-0.0802934106722)*x[2]**o+(0.096532189886)*x[2]
-        arg[2,1]=(-0.4505392488)*x[0]**o+(-0.668542586506)*x[0]+(0.487967999984)*x[1]**o+(-0.642310745404)*x[1]+(-0.956530771836)*x[2]**o+(0.517544404873)*x[2]
-        arg[2,2]=(-0.984032885692)*x[0]**o+(-0.606688527142)*x[0]+(0.0565483776156)*x[1]**o+(-0.945228520749)*x[1]+(0.433070187921)*x[2]**o+(-0.599983370996)*x[2]
-        arg[2,3]=(-0.673469008741)*x[0]**o+(0.612144012035)*x[0]+(-0.169497339443)*x[1]**o+(0.267990057152)*x[1]+(0.431716413548)*x[2]**o+(0.188904436012)*x[2]
-        arg[2,4]=(0.320782309844)*x[0]**o+(-0.830068082984)*x[0]+(0.900183436056)*x[1]**o+(-0.343951186189)*x[1]+(-0.00137135137854)*x[2]**o+(-0.655764522249)*x[2]
-        arg[3,0]=(-0.936193981767)*x[0]**o+(0.885260284217)*x[0]+(0.00397725971098)*x[1]**o+(-0.0864751234501)*x[1]+(0.25001166345)*x[2]**o+(-0.127859505667)*x[2]
-        arg[3,1]=(-0.0841986843231)*x[0]**o+(-0.95678469673)*x[0]+(0.867049114883)*x[1]**o+(0.154499266839)*x[1]+(0.0217146474622)*x[2]**o+(-0.945774319527)*x[2]
-        arg[3,2]=(-0.668161122306)*x[0]**o+(0.779140555525)*x[0]+(0.217613826157)*x[1]**o+(0.900077039607)*x[1]+(-0.251881965789)*x[2]**o+(-0.331281723354)*x[2]
-        arg[3,3]=(-0.95624079226)*x[0]**o+(-0.403226291225)*x[0]+(0.303340462877)*x[1]**o+(-0.269819286355)*x[1]+(0.605804508829)*x[2]**o+(-0.461404715818)*x[2]
-        arg[3,4]=(-0.933059329973)*x[0]**o+(-0.00851461368762)*x[0]+(0.0588544443918)*x[1]**o+(-0.682939702389)*x[1]+(-0.213965742261)*x[2]**o+(-0.102965977964)*x[2]
-        ref[0,0]=(0.0305951763245)/(o+1.)+(0.44778386017)
-        ref[0,1]=(0.745241915348)/(o+1.)+(-0.964269897247)
-        ref[0,2]=(-0.352759405473)/(o+1.)+(-0.257170739438)
-        ref[0,3]=(-0.163049004521)/(o+1.)+(-0.418386933036)
-        ref[0,4]=(-0.812437465462)/(o+1.)+(0.360717213727)
-        ref[1,0]=(-1.8232646627)/(o+1.)+(-1.2650172213)
-        ref[1,1]=(1.03508884868)/(o+1.)+(0.534801547766)
-        ref[1,2]=(-0.226218905227)/(o+1.)+(-0.80743356577)
-        ref[1,3]=(0.0397346133545)/(o+1.)+(0.463655479743)
-        ref[1,4]=(0.747176941866)/(o+1.)+(1.22951661319)
-        ref[2,0]=(-0.248034629647)/(o+1.)+(-0.00953131429598)
-        ref[2,1]=(-0.919102020652)/(o+1.)+(-0.396654463518)
-        ref[2,2]=(-0.494414320156)/(o+1.)+(-1.07595020944)
-        ref[2,3]=(-0.411249934637)/(o+1.)+(0.534519252599)
-        ref[2,4]=(1.21959439452)/(o+1.)+(-0.914891895711)
-        ref[3,0]=(-0.682205058606)/(o+1.)+(0.33546282755)
-        ref[3,1]=(0.804565078022)/(o+1.)+(-0.874029874709)
-        ref[3,2]=(-0.702429261938)/(o+1.)+(0.673967935889)
-        ref[3,3]=(-0.0470958205546)/(o+1.)+(-0.567225146699)
-        ref[3,4]=(-1.08817062784)/(o+1.)+(-0.39721014702)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.401537399178)*x[0]**o+(-0.868937065568)*x[0]+(0.356734884346)*x[1]**o+(0.0137485089422)*x[1]
-        arg[0,0,1]=(0.705383698155)*x[0]**o+(-0.884988282352)*x[0]+(-0.979185994641)*x[1]**o+(0.929576942519)*x[1]
-        arg[0,1,0]=(-0.292540086272)*x[0]**o+(-0.223230840915)*x[0]+(0.717291109855)*x[1]**o+(-0.826233591275)*x[1]
-        arg[0,1,1]=(0.55739919643)*x[0]**o+(0.2571407205)*x[0]+(0.00434404142287)*x[1]**o+(0.200305144451)*x[1]
-        arg[1,0,0]=(0.451841947443)*x[0]**o+(-0.576279050146)*x[0]+(-0.128142118055)*x[1]**o+(0.316406960557)*x[1]
-        arg[1,0,1]=(-0.07174792925)*x[0]**o+(-0.392935435009)*x[0]+(-0.343535485172)*x[1]**o+(0.619131193274)*x[1]
-        arg[1,1,0]=(-0.667031669611)*x[0]**o+(-0.184806094874)*x[0]+(-0.199375296384)*x[1]**o+(0.449351889815)*x[1]
-        arg[1,1,1]=(-0.51924508404)*x[0]**o+(0.870508122509)*x[0]+(-0.274149433148)*x[1]**o+(-0.762367215962)*x[1]
-        arg[2,0,0]=(-0.501546909709)*x[0]**o+(0.164122129343)*x[0]+(-0.601370828214)*x[1]**o+(0.888046948888)*x[1]
-        arg[2,0,1]=(0.272472486899)*x[0]**o+(-0.958776296738)*x[0]+(-0.334676045163)*x[1]**o+(0.410943596779)*x[1]
-        arg[2,1,0]=(0.363478201368)*x[0]**o+(0.753492598803)*x[0]+(-0.663726768274)*x[1]**o+(0.875443816963)*x[1]
-        arg[2,1,1]=(0.995788536211)*x[0]**o+(-0.123932097555)*x[0]+(0.143025171293)*x[1]**o+(0.724918059214)*x[1]
-        arg[3,0,0]=(-0.578717829755)*x[0]**o+(-0.899523186929)*x[0]+(0.58523203854)*x[1]**o+(0.751620714771)*x[1]
-        arg[3,0,1]=(0.179841033744)*x[0]**o+(0.268015839688)*x[0]+(0.860292991989)*x[1]**o+(0.0117969420991)*x[1]
-        arg[3,1,0]=(-0.575777000777)*x[0]**o+(0.170047012345)*x[0]+(-0.418743243278)*x[1]**o+(-0.278415849566)*x[1]
-        arg[3,1,1]=(-0.913076795648)*x[0]**o+(0.486330450107)*x[0]+(-0.423570363453)*x[1]**o+(0.388575474946)*x[1]
-        arg[4,0,0]=(0.16695368621)*x[0]**o+(0.133497460585)*x[0]+(-0.444434659151)*x[1]**o+(-0.895229636275)*x[1]
-        arg[4,0,1]=(0.432018868106)*x[0]**o+(-0.281976075625)*x[0]+(-0.0455135209769)*x[1]**o+(0.76870037059)*x[1]
-        arg[4,1,0]=(0.238542836112)*x[0]**o+(-0.806931884409)*x[0]+(-0.0365533871189)*x[1]**o+(0.731336634477)*x[1]
-        arg[4,1,1]=(0.512035255059)*x[0]**o+(-0.683560978902)*x[0]+(-0.953782277737)*x[1]**o+(-0.311664210765)*x[1]
-        arg[5,0,0]=(-0.842399299624)*x[0]**o+(0.460676816656)*x[0]+(-0.251781603841)*x[1]**o+(0.321792359074)*x[1]
-        arg[5,0,1]=(-0.900576257062)*x[0]**o+(0.842393710528)*x[0]+(0.630445446843)*x[1]**o+(-0.647745144739)*x[1]
-        arg[5,1,0]=(0.136687908652)*x[0]**o+(0.0252907890641)*x[0]+(0.813054611844)*x[1]**o+(-0.459930787056)*x[1]
-        arg[5,1,1]=(-0.00242518550941)*x[0]**o+(-0.558785348137)*x[0]+(0.0568659980522)*x[1]**o+(0.689293614051)*x[1]
-        ref[0,0,0]=(0.758272283524)/(o+1.)+(-0.427594278313)
-        ref[0,0,1]=(-0.273802296487)/(o+1.)+(0.0222943300833)
-        ref[0,1,0]=(0.424751023583)/(o+1.)+(-0.524732216095)
-        ref[0,1,1]=(0.561743237852)/(o+1.)+(0.228722932476)
-        ref[1,0,0]=(0.323699829388)/(o+1.)+(-0.129936044795)
-        ref[1,0,1]=(-0.415283414421)/(o+1.)+(0.113097879133)
-        ref[1,1,0]=(-0.866406965995)/(o+1.)+(0.132272897471)
-        ref[1,1,1]=(-0.793394517189)/(o+1.)+(0.0540704532731)
-        ref[2,0,0]=(-1.10291773792)/(o+1.)+(0.526084539115)
-        ref[2,0,1]=(-0.0622035582637)/(o+1.)+(-0.273916349979)
-        ref[2,1,0]=(-0.300248566906)/(o+1.)+(0.814468207883)
-        ref[2,1,1]=(1.1388137075)/(o+1.)+(0.300492980829)
-        ref[3,0,0]=(0.00651420878498)/(o+1.)+(-0.073951236079)
-        ref[3,0,1]=(1.04013402573)/(o+1.)+(0.139906390894)
-        ref[3,1,0]=(-0.994520244055)/(o+1.)+(-0.0541844186105)
-        ref[3,1,1]=(-1.3366471591)/(o+1.)+(0.437452962527)
-        ref[4,0,0]=(-0.27748097294)/(o+1.)+(-0.380866087845)
-        ref[4,0,1]=(0.386505347129)/(o+1.)+(0.243362147483)
-        ref[4,1,0]=(0.201989448993)/(o+1.)+(-0.0377976249661)
-        ref[4,1,1]=(-0.441747022678)/(o+1.)+(-0.497612594833)
-        ref[5,0,0]=(-1.09418090346)/(o+1.)+(0.391234587865)
-        ref[5,0,1]=(-0.270130810219)/(o+1.)+(0.0973242828949)
-        ref[5,1,0]=(0.949742520497)/(o+1.)+(-0.217319998996)
-        ref[5,1,1]=(0.0544408125428)/(o+1.)+(0.0652541329568)
-      else:
-        arg[0,0,0]=(0.411788818613)*x[0]**o+(0.324151698669)*x[0]+(0.656551349616)*x[1]**o+(0.801577401197)*x[1]+(0.690440431022)*x[2]**o+(0.776409870151)*x[2]
-        arg[0,0,1]=(-0.224985947659)*x[0]**o+(-0.564703086188)*x[0]+(-0.37196336116)*x[1]**o+(-0.114979853172)*x[1]+(0.274462080499)*x[2]**o+(-0.988489021983)*x[2]
-        arg[0,1,0]=(0.512331530009)*x[0]**o+(0.519617843594)*x[0]+(-0.515174861158)*x[1]**o+(-0.675953902994)*x[1]+(0.796111490716)*x[2]**o+(0.229569489858)*x[2]
-        arg[0,1,1]=(0.347765144376)*x[0]**o+(-0.0110194730031)*x[0]+(-0.593936645599)*x[1]**o+(-0.372786558089)*x[1]+(-0.604691321362)*x[2]**o+(-0.888002521077)*x[2]
-        arg[1,0,0]=(-0.575954903433)*x[0]**o+(0.0160235655616)*x[0]+(0.305335632724)*x[1]**o+(-0.259402553796)*x[1]+(-0.221276854741)*x[2]**o+(-0.519932341069)*x[2]
-        arg[1,0,1]=(-0.674987647238)*x[0]**o+(-0.45852667934)*x[0]+(-0.758937440978)*x[1]**o+(0.80566898197)*x[1]+(-0.961619154322)*x[2]**o+(0.861564430243)*x[2]
-        arg[1,1,0]=(-0.297475412437)*x[0]**o+(0.881828705604)*x[0]+(-0.823267615874)*x[1]**o+(-0.0232728101313)*x[1]+(-0.676220001453)*x[2]**o+(-0.382414036981)*x[2]
-        arg[1,1,1]=(-0.31008204616)*x[0]**o+(0.805195900401)*x[0]+(-0.758209772143)*x[1]**o+(0.861379709073)*x[1]+(0.0631063866518)*x[2]**o+(0.356607080553)*x[2]
-        arg[2,0,0]=(0.305214964591)*x[0]**o+(0.815106526139)*x[0]+(0.138797156005)*x[1]**o+(-0.241921896332)*x[1]+(-0.103783035058)*x[2]**o+(-0.161952044984)*x[2]
-        arg[2,0,1]=(-0.925375677635)*x[0]**o+(0.0341347568201)*x[0]+(-0.706905924964)*x[1]**o+(-0.193304368451)*x[1]+(-0.449866757104)*x[2]**o+(-0.894963680869)*x[2]
-        arg[2,1,0]=(0.822676224279)*x[0]**o+(-0.28758006682)*x[0]+(-0.869025918917)*x[1]**o+(0.0107602044744)*x[1]+(-0.832322765163)*x[2]**o+(0.748440319389)*x[2]
-        arg[2,1,1]=(-0.415326508997)*x[0]**o+(-0.879521424817)*x[0]+(-0.971781441062)*x[1]**o+(0.527586634108)*x[1]+(0.336682669856)*x[2]**o+(-0.948414041149)*x[2]
-        arg[3,0,0]=(-0.345788531715)*x[0]**o+(0.626583498807)*x[0]+(-0.186418683649)*x[1]**o+(0.3141628424)*x[1]+(-0.781119787783)*x[2]**o+(0.972708430266)*x[2]
-        arg[3,0,1]=(0.175536279095)*x[0]**o+(-0.150027774295)*x[0]+(-0.506653680683)*x[1]**o+(-0.482544397029)*x[1]+(-0.59090996152)*x[2]**o+(0.618123625026)*x[2]
-        arg[3,1,0]=(0.737984493124)*x[0]**o+(0.650901680297)*x[0]+(-0.361389200009)*x[1]**o+(-0.784304665396)*x[1]+(-0.954132232142)*x[2]**o+(0.684341934348)*x[2]
-        arg[3,1,1]=(-0.385757579645)*x[0]**o+(0.251136919845)*x[0]+(0.95143939933)*x[1]**o+(0.501860043225)*x[1]+(-0.675673011184)*x[2]**o+(0.337315450579)*x[2]
-        arg[4,0,0]=(-0.740183402139)*x[0]**o+(-0.828278760743)*x[0]+(0.88000889117)*x[1]**o+(-0.0226801022184)*x[1]+(0.6811397662)*x[2]**o+(-0.254627446498)*x[2]
-        arg[4,0,1]=(-0.194128952361)*x[0]**o+(-0.524854896388)*x[0]+(0.341100326577)*x[1]**o+(-0.26072443499)*x[1]+(-0.197396331776)*x[2]**o+(-0.589037632112)*x[2]
-        arg[4,1,0]=(0.261995024865)*x[0]**o+(0.214193793699)*x[0]+(0.572024600244)*x[1]**o+(0.230659327198)*x[1]+(0.420971705453)*x[2]**o+(0.333445049827)*x[2]
-        arg[4,1,1]=(-0.0679525054395)*x[0]**o+(0.0756646296473)*x[0]+(-0.299865836239)*x[1]**o+(-0.828294764914)*x[1]+(0.606170745631)*x[2]**o+(0.624267827393)*x[2]
-        arg[5,0,0]=(0.312565542211)*x[0]**o+(-0.368815496171)*x[0]+(-0.0615973473105)*x[1]**o+(0.205012835971)*x[1]+(0.310818553076)*x[2]**o+(-0.287393908304)*x[2]
-        arg[5,0,1]=(-0.409626309069)*x[0]**o+(0.977953573562)*x[0]+(0.583013544138)*x[1]**o+(0.542907128677)*x[1]+(0.488538336366)*x[2]**o+(-0.85823611123)*x[2]
-        arg[5,1,0]=(-0.899607109395)*x[0]**o+(-0.0459053040522)*x[0]+(0.938423293041)*x[1]**o+(-0.112431665317)*x[1]+(0.620609328687)*x[2]**o+(-0.663082429319)*x[2]
-        arg[5,1,1]=(0.00370253144626)*x[0]**o+(0.503733497956)*x[0]+(0.362457785043)*x[1]**o+(0.417891957303)*x[1]+(0.404543677829)*x[2]**o+(0.117828669122)*x[2]
-        ref[0,0,0]=(1.75878059925)/(o+1.)+(0.951069485009)
-        ref[0,0,1]=(-0.32248722832)/(o+1.)+(-0.834085980672)
-        ref[0,1,0]=(0.793268159567)/(o+1.)+(0.036616715229)
-        ref[0,1,1]=(-0.850862822585)/(o+1.)+(-0.635904276085)
-        ref[1,0,0]=(-0.49189612545)/(o+1.)+(-0.381655664652)
-        ref[1,0,1]=(-2.39554424254)/(o+1.)+(0.604353366437)
-        ref[1,1,0]=(-1.79696302976)/(o+1.)+(0.238070929246)
-        ref[1,1,1]=(-1.00518543165)/(o+1.)+(1.01159134501)
-        ref[2,0,0]=(0.340229085537)/(o+1.)+(0.205616292412)
-        ref[2,0,1]=(-2.0821483597)/(o+1.)+(-0.52706664625)
-        ref[2,1,0]=(-0.878672459802)/(o+1.)+(0.235810228522)
-        ref[2,1,1]=(-1.0504252802)/(o+1.)+(-0.650174415929)
-        ref[3,0,0]=(-1.31332700315)/(o+1.)+(0.956727385736)
-        ref[3,0,1]=(-0.922027363109)/(o+1.)+(-0.00722427314892)
-        ref[3,1,0]=(-0.577536939027)/(o+1.)+(0.275469474624)
-        ref[3,1,1]=(-0.109991191499)/(o+1.)+(0.545156206825)
-        ref[4,0,0]=(0.820965255231)/(o+1.)+(-0.55279315473)
-        ref[4,0,1]=(-0.0504249575602)/(o+1.)+(-0.687308481745)
-        ref[4,1,0]=(1.25499133056)/(o+1.)+(0.389149085362)
-        ref[4,1,1]=(0.238352403952)/(o+1.)+(-0.0641811539369)
-        ref[5,0,0]=(0.561786747976)/(o+1.)+(-0.225598284252)
-        ref[5,0,1]=(0.661925571434)/(o+1.)+(0.331312295504)
-        ref[5,1,0]=(0.659425512333)/(o+1.)+(-0.410709699344)
-        ref[5,1,1]=(0.770703994319)/(o+1.)+(0.519727062191)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.164405890316)*x[0]**o+(-0.323303939764)*x[0]+(-0.0516829984856)*x[1]**o+(-0.220765052533)*x[1]
-        arg[0,0,0,1]=(0.152172612108)*x[0]**o+(-0.166242164365)*x[0]+(0.807177808571)*x[1]**o+(0.0404817109573)*x[1]
-        arg[0,0,1,0]=(0.016912808567)*x[0]**o+(0.623923316774)*x[0]+(-0.542886934905)*x[1]**o+(0.0110784560205)*x[1]
-        arg[0,0,1,1]=(-0.663885786909)*x[0]**o+(-0.55563355485)*x[0]+(0.191993284382)*x[1]**o+(0.734973556043)*x[1]
-        arg[0,0,2,0]=(-0.110316754183)*x[0]**o+(-0.584022783672)*x[0]+(0.56471376011)*x[1]**o+(0.846317747143)*x[1]
-        arg[0,0,2,1]=(-0.767988009278)*x[0]**o+(0.440997912352)*x[0]+(0.45366348093)*x[1]**o+(0.376620990318)*x[1]
-        arg[0,1,0,0]=(-0.138006508051)*x[0]**o+(0.8450564766)*x[0]+(-0.273559897633)*x[1]**o+(0.683678615645)*x[1]
-        arg[0,1,0,1]=(-0.467521625474)*x[0]**o+(0.32289306962)*x[0]+(0.340974562152)*x[1]**o+(-0.58109391053)*x[1]
-        arg[0,1,1,0]=(0.76867991208)*x[0]**o+(0.683527735131)*x[0]+(0.762986872389)*x[1]**o+(-0.189342734286)*x[1]
-        arg[0,1,1,1]=(0.125150175351)*x[0]**o+(-0.175190872876)*x[0]+(-0.569766488076)*x[1]**o+(0.787503755206)*x[1]
-        arg[0,1,2,0]=(-0.339695860559)*x[0]**o+(0.119452596206)*x[0]+(0.474378864192)*x[1]**o+(0.845982555265)*x[1]
-        arg[0,1,2,1]=(0.820551334836)*x[0]**o+(-0.200024721285)*x[0]+(-0.525871855871)*x[1]**o+(-0.714639297791)*x[1]
-        arg[0,2,0,0]=(-0.145788788262)*x[0]**o+(-0.695717636982)*x[0]+(0.736564332801)*x[1]**o+(0.634307016587)*x[1]
-        arg[0,2,0,1]=(-0.25142006947)*x[0]**o+(0.027028767127)*x[0]+(-0.614777438028)*x[1]**o+(-0.691417785617)*x[1]
-        arg[0,2,1,0]=(0.366081140839)*x[0]**o+(0.477490533426)*x[0]+(-0.116611335116)*x[1]**o+(-0.863552165712)*x[1]
-        arg[0,2,1,1]=(-0.467659558308)*x[0]**o+(0.0836299545334)*x[0]+(0.903093252833)*x[1]**o+(-0.956858182533)*x[1]
-        arg[0,2,2,0]=(0.870921031579)*x[0]**o+(-0.801681014465)*x[0]+(-0.951819608329)*x[1]**o+(-0.626222917084)*x[1]
-        arg[0,2,2,1]=(0.414973183041)*x[0]**o+(-0.444580205703)*x[0]+(-0.346458764208)*x[1]**o+(-0.679140100745)*x[1]
-        arg[0,3,0,0]=(-0.725326935158)*x[0]**o+(-0.914034759513)*x[0]+(0.702614377806)*x[1]**o+(0.819004276317)*x[1]
-        arg[0,3,0,1]=(0.617099932352)*x[0]**o+(-0.155182850011)*x[0]+(-0.066428715129)*x[1]**o+(-0.286480585435)*x[1]
-        arg[0,3,1,0]=(0.710942545488)*x[0]**o+(-0.734509277268)*x[0]+(-0.807474546329)*x[1]**o+(0.307631760449)*x[1]
-        arg[0,3,1,1]=(-0.709966924732)*x[0]**o+(-0.462297022374)*x[0]+(0.773787774038)*x[1]**o+(0.762137020991)*x[1]
-        arg[0,3,2,0]=(-0.425660932209)*x[0]**o+(-0.562130300181)*x[0]+(-0.516719014647)*x[1]**o+(-0.547832887369)*x[1]
-        arg[0,3,2,1]=(0.149573176879)*x[0]**o+(-0.208999629436)*x[0]+(-0.191426033553)*x[1]**o+(-0.119046538873)*x[1]
-        arg[0,4,0,0]=(-0.99932317151)*x[0]**o+(-0.832461558068)*x[0]+(-0.847073271676)*x[1]**o+(0.882046887729)*x[1]
-        arg[0,4,0,1]=(0.14235557233)*x[0]**o+(-0.352572053276)*x[0]+(-0.231989519255)*x[1]**o+(0.146855135398)*x[1]
-        arg[0,4,1,0]=(0.550561449012)*x[0]**o+(0.530745681425)*x[0]+(0.198889689472)*x[1]**o+(0.165503108658)*x[1]
-        arg[0,4,1,1]=(0.059663401309)*x[0]**o+(0.168377411751)*x[0]+(-0.224682723925)*x[1]**o+(-0.255406907757)*x[1]
-        arg[0,4,2,0]=(-0.747776894683)*x[0]**o+(-0.281763358533)*x[0]+(0.660369838923)*x[1]**o+(0.348541234687)*x[1]
-        arg[0,4,2,1]=(-0.886248366716)*x[0]**o+(0.665256341312)*x[0]+(-0.118041122298)*x[1]**o+(0.192284814559)*x[1]
-        arg[1,0,0,0]=(-0.212291422817)*x[0]**o+(-0.16123490382)*x[0]+(-0.884220059537)*x[1]**o+(-0.40104775897)*x[1]
-        arg[1,0,0,1]=(0.389745305389)*x[0]**o+(0.544302066739)*x[0]+(-0.504770065056)*x[1]**o+(0.903371132654)*x[1]
-        arg[1,0,1,0]=(0.983764499357)*x[0]**o+(0.0707766278425)*x[0]+(-0.119851167133)*x[1]**o+(0.668490934432)*x[1]
-        arg[1,0,1,1]=(-0.61333738947)*x[0]**o+(-0.515837139916)*x[0]+(-0.825015725806)*x[1]**o+(-0.858420009384)*x[1]
-        arg[1,0,2,0]=(0.838488008532)*x[0]**o+(0.320020900158)*x[0]+(0.265140913892)*x[1]**o+(0.493460973766)*x[1]
-        arg[1,0,2,1]=(-0.957171379585)*x[0]**o+(0.911667647687)*x[0]+(0.0634495769152)*x[1]**o+(-0.244783653159)*x[1]
-        arg[1,1,0,0]=(0.854312398231)*x[0]**o+(0.0177604750376)*x[0]+(-0.263135825468)*x[1]**o+(0.196452389095)*x[1]
-        arg[1,1,0,1]=(0.496952473267)*x[0]**o+(-0.505581680291)*x[0]+(0.227653536528)*x[1]**o+(-0.138354150837)*x[1]
-        arg[1,1,1,0]=(0.569682536816)*x[0]**o+(-0.523174667456)*x[0]+(-0.434073415962)*x[1]**o+(-0.853667257479)*x[1]
-        arg[1,1,1,1]=(0.636882167235)*x[0]**o+(-0.122206427025)*x[0]+(0.934361025063)*x[1]**o+(-0.43037160177)*x[1]
-        arg[1,1,2,0]=(0.0798318147504)*x[0]**o+(0.825231320185)*x[0]+(0.810701650808)*x[1]**o+(-0.544356371381)*x[1]
-        arg[1,1,2,1]=(-0.426710170704)*x[0]**o+(0.200697079677)*x[0]+(0.242027752153)*x[1]**o+(0.746762119874)*x[1]
-        arg[1,2,0,0]=(-0.497091856216)*x[0]**o+(0.0953816987137)*x[0]+(-0.388615292775)*x[1]**o+(0.794962452203)*x[1]
-        arg[1,2,0,1]=(0.484769626964)*x[0]**o+(0.700484219762)*x[0]+(-0.230377697673)*x[1]**o+(-0.110327221848)*x[1]
-        arg[1,2,1,0]=(-0.791806541129)*x[0]**o+(0.0199911517557)*x[0]+(-0.441657020836)*x[1]**o+(-0.972999930466)*x[1]
-        arg[1,2,1,1]=(-0.566750983493)*x[0]**o+(0.193689535753)*x[0]+(0.659310468709)*x[1]**o+(0.209045229813)*x[1]
-        arg[1,2,2,0]=(0.852553900341)*x[0]**o+(-0.869275488172)*x[0]+(-0.308429715369)*x[1]**o+(0.096335995297)*x[1]
-        arg[1,2,2,1]=(0.169351018917)*x[0]**o+(0.269577471686)*x[0]+(-0.226840840616)*x[1]**o+(-0.94229540867)*x[1]
-        arg[1,3,0,0]=(0.481711489234)*x[0]**o+(0.293576608201)*x[0]+(0.101998881767)*x[1]**o+(-0.10730442531)*x[1]
-        arg[1,3,0,1]=(-0.824144820539)*x[0]**o+(0.174754759038)*x[0]+(-0.251803196848)*x[1]**o+(-0.389656255459)*x[1]
-        arg[1,3,1,0]=(0.438310633462)*x[0]**o+(-0.268051020546)*x[0]+(0.670456978527)*x[1]**o+(-0.547393352784)*x[1]
-        arg[1,3,1,1]=(-0.95082246973)*x[0]**o+(0.739061218443)*x[0]+(0.209495253219)*x[1]**o+(-0.604801908581)*x[1]
-        arg[1,3,2,0]=(0.696900724687)*x[0]**o+(0.501191311274)*x[0]+(0.982952568975)*x[1]**o+(0.1345704134)*x[1]
-        arg[1,3,2,1]=(0.823865642457)*x[0]**o+(0.344980106206)*x[0]+(0.0740071873515)*x[1]**o+(-0.950460516779)*x[1]
-        arg[1,4,0,0]=(-0.428525532814)*x[0]**o+(0.496012936411)*x[0]+(-0.0756953876324)*x[1]**o+(0.8382068924)*x[1]
-        arg[1,4,0,1]=(0.950388644852)*x[0]**o+(-0.225116488186)*x[0]+(0.515802878592)*x[1]**o+(-0.51004230039)*x[1]
-        arg[1,4,1,0]=(0.868733254296)*x[0]**o+(-0.506544709529)*x[0]+(0.28935579533)*x[1]**o+(0.100277736612)*x[1]
-        arg[1,4,1,1]=(-0.104533384722)*x[0]**o+(0.598995288066)*x[0]+(-0.738946772839)*x[1]**o+(-0.23245555216)*x[1]
-        arg[1,4,2,0]=(-0.286232179213)*x[0]**o+(-0.31267596034)*x[0]+(0.588681250431)*x[1]**o+(-0.579857978487)*x[1]
-        arg[1,4,2,1]=(0.405666376198)*x[0]**o+(0.380029842735)*x[0]+(-0.646672003588)*x[1]**o+(0.419606979519)*x[1]
-        arg[2,0,0,0]=(0.183075434304)*x[0]**o+(0.0929532345426)*x[0]+(-0.742007638693)*x[1]**o+(-0.521914593386)*x[1]
-        arg[2,0,0,1]=(0.292878118412)*x[0]**o+(-0.427165220789)*x[0]+(0.540033289295)*x[1]**o+(0.997945616043)*x[1]
-        arg[2,0,1,0]=(0.872801856197)*x[0]**o+(0.0427577769706)*x[0]+(0.595354626662)*x[1]**o+(-0.878459740609)*x[1]
-        arg[2,0,1,1]=(-0.259988866684)*x[0]**o+(0.154043636253)*x[0]+(0.0580047878991)*x[1]**o+(0.40696744056)*x[1]
-        arg[2,0,2,0]=(-0.602648518466)*x[0]**o+(0.30877596654)*x[0]+(-0.268563459489)*x[1]**o+(-0.526379663585)*x[1]
-        arg[2,0,2,1]=(-0.375777994931)*x[0]**o+(-0.175440011709)*x[0]+(-0.578650003477)*x[1]**o+(0.822157683321)*x[1]
-        arg[2,1,0,0]=(-0.44389226502)*x[0]**o+(0.683580346916)*x[0]+(0.471857559282)*x[1]**o+(-0.869624665398)*x[1]
-        arg[2,1,0,1]=(0.768272315036)*x[0]**o+(-0.709688321973)*x[0]+(0.200727881948)*x[1]**o+(0.617326752785)*x[1]
-        arg[2,1,1,0]=(-0.371169228982)*x[0]**o+(-0.0248248405104)*x[0]+(-0.899904749204)*x[1]**o+(0.796779883083)*x[1]
-        arg[2,1,1,1]=(0.220088670807)*x[0]**o+(0.691718163435)*x[0]+(-0.0834793048429)*x[1]**o+(-0.748110928988)*x[1]
-        arg[2,1,2,0]=(0.246045293748)*x[0]**o+(-0.669660154233)*x[0]+(0.601040129345)*x[1]**o+(-0.0893792369983)*x[1]
-        arg[2,1,2,1]=(0.318708374425)*x[0]**o+(-0.973048583674)*x[0]+(-0.575891882633)*x[1]**o+(0.229050058038)*x[1]
-        arg[2,2,0,0]=(0.358008410645)*x[0]**o+(-0.834388697702)*x[0]+(0.0931465346237)*x[1]**o+(0.503934981947)*x[1]
-        arg[2,2,0,1]=(-0.257597986495)*x[0]**o+(-0.58070568528)*x[0]+(0.735541935653)*x[1]**o+(-0.704666216263)*x[1]
-        arg[2,2,1,0]=(0.0207421250729)*x[0]**o+(-0.724644198871)*x[0]+(0.637124335031)*x[1]**o+(-0.547300138808)*x[1]
-        arg[2,2,1,1]=(0.280179217797)*x[0]**o+(-0.387279903944)*x[0]+(0.516275341085)*x[1]**o+(0.781250973385)*x[1]
-        arg[2,2,2,0]=(-0.97771111517)*x[0]**o+(-0.140997969015)*x[0]+(-0.495112130955)*x[1]**o+(0.151523726543)*x[1]
-        arg[2,2,2,1]=(-0.48638258963)*x[0]**o+(-0.251363723104)*x[0]+(-0.484911659879)*x[1]**o+(-0.841285872322)*x[1]
-        arg[2,3,0,0]=(-0.70159761565)*x[0]**o+(-0.661658396735)*x[0]+(-0.380920250292)*x[1]**o+(0.682598882025)*x[1]
-        arg[2,3,0,1]=(0.477056088757)*x[0]**o+(0.697397619448)*x[0]+(0.28617323153)*x[1]**o+(-0.0443690469658)*x[1]
-        arg[2,3,1,0]=(-0.823038323615)*x[0]**o+(-0.742146866184)*x[0]+(0.258604766787)*x[1]**o+(-0.740368164141)*x[1]
-        arg[2,3,1,1]=(0.958751077013)*x[0]**o+(0.353976218746)*x[0]+(-0.954344840728)*x[1]**o+(0.436915389196)*x[1]
-        arg[2,3,2,0]=(0.432342075923)*x[0]**o+(-0.0699761039653)*x[0]+(0.701490046186)*x[1]**o+(0.0888793443125)*x[1]
-        arg[2,3,2,1]=(0.612536667525)*x[0]**o+(0.107433723026)*x[0]+(-0.611874456965)*x[1]**o+(-0.253338899867)*x[1]
-        arg[2,4,0,0]=(-0.0234819568317)*x[0]**o+(-0.0642964170457)*x[0]+(0.556679188908)*x[1]**o+(0.865922901373)*x[1]
-        arg[2,4,0,1]=(0.669235019483)*x[0]**o+(0.744361910609)*x[0]+(0.383397302403)*x[1]**o+(0.669587709042)*x[1]
-        arg[2,4,1,0]=(-0.143461051192)*x[0]**o+(-0.0272388772724)*x[0]+(0.723868767782)*x[1]**o+(0.303617835707)*x[1]
-        arg[2,4,1,1]=(-0.829765013546)*x[0]**o+(-0.784193619495)*x[0]+(0.384376849236)*x[1]**o+(0.280904709362)*x[1]
-        arg[2,4,2,0]=(0.38737050935)*x[0]**o+(0.749614613361)*x[0]+(-0.340848293488)*x[1]**o+(0.96291850214)*x[1]
-        arg[2,4,2,1]=(0.619896872679)*x[0]**o+(0.970694589398)*x[0]+(-0.300698305892)*x[1]**o+(0.794408153506)*x[1]
-        arg[3,0,0,0]=(-0.808442463698)*x[0]**o+(-0.527555255968)*x[0]+(0.246776596713)*x[1]**o+(-0.719809811547)*x[1]
-        arg[3,0,0,1]=(-0.390016002326)*x[0]**o+(-0.864168521951)*x[0]+(-0.154649478359)*x[1]**o+(0.210766031283)*x[1]
-        arg[3,0,1,0]=(-0.941916382966)*x[0]**o+(-0.0352551994705)*x[0]+(-0.660026082442)*x[1]**o+(-0.869241000235)*x[1]
-        arg[3,0,1,1]=(-0.287992443961)*x[0]**o+(0.292551506636)*x[0]+(-0.619953648778)*x[1]**o+(0.746095811695)*x[1]
-        arg[3,0,2,0]=(-0.233659077726)*x[0]**o+(-0.568647415596)*x[0]+(-0.22048065705)*x[1]**o+(0.658105381132)*x[1]
-        arg[3,0,2,1]=(0.871784854897)*x[0]**o+(-0.118389479971)*x[0]+(0.143290959871)*x[1]**o+(0.753198625961)*x[1]
-        arg[3,1,0,0]=(0.993988451174)*x[0]**o+(0.451849763406)*x[0]+(-0.972805640824)*x[1]**o+(0.796893857099)*x[1]
-        arg[3,1,0,1]=(-0.424353439197)*x[0]**o+(-0.575799061446)*x[0]+(-0.233936106648)*x[1]**o+(-0.451864349448)*x[1]
-        arg[3,1,1,0]=(0.639821887614)*x[0]**o+(0.771041944334)*x[0]+(0.420297869214)*x[1]**o+(0.671734395857)*x[1]
-        arg[3,1,1,1]=(0.398121897075)*x[0]**o+(0.647679737081)*x[0]+(-0.544457308885)*x[1]**o+(0.58955287395)*x[1]
-        arg[3,1,2,0]=(-0.118222351008)*x[0]**o+(-0.943807502172)*x[0]+(0.866866987138)*x[1]**o+(-0.0793340319339)*x[1]
-        arg[3,1,2,1]=(-0.157286204244)*x[0]**o+(-0.789214982692)*x[0]+(0.646008960971)*x[1]**o+(0.866687256647)*x[1]
-        arg[3,2,0,0]=(-0.620625598995)*x[0]**o+(-0.12874444072)*x[0]+(0.4402928966)*x[1]**o+(-0.0344340173898)*x[1]
-        arg[3,2,0,1]=(-0.714597102332)*x[0]**o+(0.730206152989)*x[0]+(0.795717819655)*x[1]**o+(0.0543647593833)*x[1]
-        arg[3,2,1,0]=(0.698721346048)*x[0]**o+(0.599204472096)*x[0]+(0.323529910402)*x[1]**o+(0.362678869119)*x[1]
-        arg[3,2,1,1]=(0.976107824554)*x[0]**o+(0.559889392243)*x[0]+(0.240016231718)*x[1]**o+(0.343322878078)*x[1]
-        arg[3,2,2,0]=(0.609695396838)*x[0]**o+(0.786331471916)*x[0]+(-0.965489152976)*x[1]**o+(0.553653504493)*x[1]
-        arg[3,2,2,1]=(0.897952533418)*x[0]**o+(0.227242627929)*x[0]+(-0.121752169524)*x[1]**o+(0.844617689997)*x[1]
-        arg[3,3,0,0]=(-0.249698211819)*x[0]**o+(-0.400095108874)*x[0]+(-0.44300562221)*x[1]**o+(0.387777895056)*x[1]
-        arg[3,3,0,1]=(0.626469203641)*x[0]**o+(0.741893669108)*x[0]+(0.261882509899)*x[1]**o+(-0.726628233604)*x[1]
-        arg[3,3,1,0]=(-0.525223500134)*x[0]**o+(0.918314547123)*x[0]+(0.426441176651)*x[1]**o+(0.338058005974)*x[1]
-        arg[3,3,1,1]=(-0.31358142709)*x[0]**o+(-0.411070225036)*x[0]+(0.0902340021221)*x[1]**o+(0.404135075929)*x[1]
-        arg[3,3,2,0]=(0.528842663849)*x[0]**o+(0.474768688828)*x[0]+(0.697643730083)*x[1]**o+(-0.170335125341)*x[1]
-        arg[3,3,2,1]=(0.875221054674)*x[0]**o+(-0.441830492507)*x[0]+(-0.60312069438)*x[1]**o+(0.664895429753)*x[1]
-        arg[3,4,0,0]=(0.563422972203)*x[0]**o+(-0.595004250424)*x[0]+(0.888927367905)*x[1]**o+(0.553640735136)*x[1]
-        arg[3,4,0,1]=(0.79563891979)*x[0]**o+(-0.461626171695)*x[0]+(0.700194671524)*x[1]**o+(-0.687505010217)*x[1]
-        arg[3,4,1,0]=(0.655248139354)*x[0]**o+(0.588175755435)*x[0]+(-0.29236593461)*x[1]**o+(0.575186295035)*x[1]
-        arg[3,4,1,1]=(0.405730566113)*x[0]**o+(-0.161117488254)*x[0]+(0.912224633472)*x[1]**o+(0.0292423764587)*x[1]
-        arg[3,4,2,0]=(-0.405819525278)*x[0]**o+(-0.362840757195)*x[0]+(0.961950188511)*x[1]**o+(0.205213542149)*x[1]
-        arg[3,4,2,1]=(0.703066280254)*x[0]**o+(-0.936055321446)*x[0]+(0.861070629413)*x[1]**o+(0.0856428368256)*x[1]
-        ref[0,0,0,0]=(-0.216088888802)/(o+1.)+(-0.272034496148)
-        ref[0,0,0,1]=(0.959350420679)/(o+1.)+(-0.062880226704)
-        ref[0,0,1,0]=(-0.525974126338)/(o+1.)+(0.317500886397)
-        ref[0,0,1,1]=(-0.471892502528)/(o+1.)+(0.0896700005967)
-        ref[0,0,2,0]=(0.454397005927)/(o+1.)+(0.131147481736)
-        ref[0,0,2,1]=(-0.314324528348)/(o+1.)+(0.408809451335)
-        ref[0,1,0,0]=(-0.411566405684)/(o+1.)+(0.764367546122)
-        ref[0,1,0,1]=(-0.126547063321)/(o+1.)+(-0.129100420455)
-        ref[0,1,1,0]=(1.53166678447)/(o+1.)+(0.247092500423)
-        ref[0,1,1,1]=(-0.444616312725)/(o+1.)+(0.306156441165)
-        ref[0,1,2,0]=(0.134683003633)/(o+1.)+(0.482717575736)
-        ref[0,1,2,1]=(0.294679478965)/(o+1.)+(-0.457332009538)
-        ref[0,2,0,0]=(0.590775544538)/(o+1.)+(-0.0307053101973)
-        ref[0,2,0,1]=(-0.866197507498)/(o+1.)+(-0.332194509245)
-        ref[0,2,1,0]=(0.249469805723)/(o+1.)+(-0.193030816143)
-        ref[0,2,1,1]=(0.435433694525)/(o+1.)+(-0.436614114)
-        ref[0,2,2,0]=(-0.0808985767498)/(o+1.)+(-0.713951965774)
-        ref[0,2,2,1]=(0.0685144188336)/(o+1.)+(-0.561860153224)
-        ref[0,3,0,0]=(-0.0227125573528)/(o+1.)+(-0.0475152415978)
-        ref[0,3,0,1]=(0.550671217223)/(o+1.)+(-0.220831717723)
-        ref[0,3,1,0]=(-0.0965320008409)/(o+1.)+(-0.213438758409)
-        ref[0,3,1,1]=(0.0638208493064)/(o+1.)+(0.149919999309)
-        ref[0,3,2,0]=(-0.942379946856)/(o+1.)+(-0.554981593775)
-        ref[0,3,2,1]=(-0.0418528566735)/(o+1.)+(-0.164023084154)
-        ref[0,4,0,0]=(-1.84639644319)/(o+1.)+(0.0247926648306)
-        ref[0,4,0,1]=(-0.0896339469252)/(o+1.)+(-0.102858458939)
-        ref[0,4,1,0]=(0.749451138484)/(o+1.)+(0.348124395042)
-        ref[0,4,1,1]=(-0.165019322616)/(o+1.)+(-0.0435147480027)
-        ref[0,4,2,0]=(-0.0874070557597)/(o+1.)+(0.033388938077)
-        ref[0,4,2,1]=(-1.00428948901)/(o+1.)+(0.428770577935)
-        ref[1,0,0,0]=(-1.09651148235)/(o+1.)+(-0.281141331395)
-        ref[1,0,0,1]=(-0.115024759667)/(o+1.)+(0.723836599697)
-        ref[1,0,1,0]=(0.863913332224)/(o+1.)+(0.369633781137)
-        ref[1,0,1,1]=(-1.43835311528)/(o+1.)+(-0.68712857465)
-        ref[1,0,2,0]=(1.10362892242)/(o+1.)+(0.406740936962)
-        ref[1,0,2,1]=(-0.893721802669)/(o+1.)+(0.333441997264)
-        ref[1,1,0,0]=(0.591176572763)/(o+1.)+(0.107106432066)
-        ref[1,1,0,1]=(0.724606009795)/(o+1.)+(-0.321967915564)
-        ref[1,1,1,0]=(0.135609120854)/(o+1.)+(-0.688420962467)
-        ref[1,1,1,1]=(1.5712431923)/(o+1.)+(-0.276289014397)
-        ref[1,1,2,0]=(0.890533465558)/(o+1.)+(0.140437474402)
-        ref[1,1,2,1]=(-0.184682418551)/(o+1.)+(0.473729599776)
-        ref[1,2,0,0]=(-0.88570714899)/(o+1.)+(0.445172075458)
-        ref[1,2,0,1]=(0.254391929291)/(o+1.)+(0.295078498957)
-        ref[1,2,1,0]=(-1.23346356196)/(o+1.)+(-0.476504389355)
-        ref[1,2,1,1]=(0.0925594852161)/(o+1.)+(0.201367382783)
-        ref[1,2,2,0]=(0.544124184972)/(o+1.)+(-0.386469746437)
-        ref[1,2,2,1]=(-0.057489821699)/(o+1.)+(-0.336358968492)
-        ref[1,3,0,0]=(0.583710371001)/(o+1.)+(0.0931360914458)
-        ref[1,3,0,1]=(-1.07594801739)/(o+1.)+(-0.107450748211)
-        ref[1,3,1,0]=(1.10876761199)/(o+1.)+(-0.407722186665)
-        ref[1,3,1,1]=(-0.741327216511)/(o+1.)+(0.0671296549307)
-        ref[1,3,2,0]=(1.67985329366)/(o+1.)+(0.317880862337)
-        ref[1,3,2,1]=(0.897872829808)/(o+1.)+(-0.302740205287)
-        ref[1,4,0,0]=(-0.504220920447)/(o+1.)+(0.667109914405)
-        ref[1,4,0,1]=(1.46619152344)/(o+1.)+(-0.367579394288)
-        ref[1,4,1,0]=(1.15808904963)/(o+1.)+(-0.203133486458)
-        ref[1,4,1,1]=(-0.843480157561)/(o+1.)+(0.183269867953)
-        ref[1,4,2,0]=(0.302449071217)/(o+1.)+(-0.446266969414)
-        ref[1,4,2,1]=(-0.24100562739)/(o+1.)+(0.399818411127)
-        ref[2,0,0,0]=(-0.558932204389)/(o+1.)+(-0.214480679421)
-        ref[2,0,0,1]=(0.832911407707)/(o+1.)+(0.285390197627)
-        ref[2,0,1,0]=(1.46815648286)/(o+1.)+(-0.417850981819)
-        ref[2,0,1,1]=(-0.201984078785)/(o+1.)+(0.280505538406)
-        ref[2,0,2,0]=(-0.871211977955)/(o+1.)+(-0.108801848522)
-        ref[2,0,2,1]=(-0.954427998409)/(o+1.)+(0.323358835806)
-        ref[2,1,0,0]=(0.0279652942615)/(o+1.)+(-0.0930221592407)
-        ref[2,1,0,1]=(0.969000196983)/(o+1.)+(-0.0461807845941)
-        ref[2,1,1,0]=(-1.27107397819)/(o+1.)+(0.385977521287)
-        ref[2,1,1,1]=(0.136609365964)/(o+1.)+(-0.0281963827764)
-        ref[2,1,2,0]=(0.847085423093)/(o+1.)+(-0.379519695616)
-        ref[2,1,2,1]=(-0.257183508208)/(o+1.)+(-0.371999262818)
-        ref[2,2,0,0]=(0.451154945268)/(o+1.)+(-0.165226857878)
-        ref[2,2,0,1]=(0.477943949158)/(o+1.)+(-0.642685950772)
-        ref[2,2,1,0]=(0.657866460103)/(o+1.)+(-0.635972168839)
-        ref[2,2,1,1]=(0.796454558882)/(o+1.)+(0.19698553472)
-        ref[2,2,2,0]=(-1.47282324613)/(o+1.)+(0.00526287876389)
-        ref[2,2,2,1]=(-0.971294249509)/(o+1.)+(-0.546324797713)
-        ref[2,3,0,0]=(-1.08251786594)/(o+1.)+(0.0104702426452)
-        ref[2,3,0,1]=(0.763229320287)/(o+1.)+(0.326514286241)
-        ref[2,3,1,0]=(-0.564433556829)/(o+1.)+(-0.741257515163)
-        ref[2,3,1,1]=(0.00440623628526)/(o+1.)+(0.395445803971)
-        ref[2,3,2,0]=(1.13383212211)/(o+1.)+(0.0094516201736)
-        ref[2,3,2,1]=(0.000662210559809)/(o+1.)+(-0.0729525884203)
-        ref[2,4,0,0]=(0.533197232076)/(o+1.)+(0.400813242164)
-        ref[2,4,0,1]=(1.05263232189)/(o+1.)+(0.706974809826)
-        ref[2,4,1,0]=(0.580407716589)/(o+1.)+(0.138189479217)
-        ref[2,4,1,1]=(-0.44538816431)/(o+1.)+(-0.251644455066)
-        ref[2,4,2,0]=(0.0465222158616)/(o+1.)+(0.85626655775)
-        ref[2,4,2,1]=(0.319198566788)/(o+1.)+(0.882551371452)
-        ref[3,0,0,0]=(-0.561665866984)/(o+1.)+(-0.623682533758)
-        ref[3,0,0,1]=(-0.544665480685)/(o+1.)+(-0.326701245334)
-        ref[3,0,1,0]=(-1.60194246541)/(o+1.)+(-0.452248099853)
-        ref[3,0,1,1]=(-0.907946092739)/(o+1.)+(0.519323659165)
-        ref[3,0,2,0]=(-0.454139734776)/(o+1.)+(0.0447289827682)
-        ref[3,0,2,1]=(1.01507581477)/(o+1.)+(0.317404572995)
-        ref[3,1,0,0]=(0.0211828103496)/(o+1.)+(0.624371810253)
-        ref[3,1,0,1]=(-0.658289545845)/(o+1.)+(-0.513831705447)
-        ref[3,1,1,0]=(1.06011975683)/(o+1.)+(0.721388170095)
-        ref[3,1,1,1]=(-0.14633541181)/(o+1.)+(0.618616305516)
-        ref[3,1,2,0]=(0.74864463613)/(o+1.)+(-0.511570767053)
-        ref[3,1,2,1]=(0.488722756727)/(o+1.)+(0.0387361369774)
-        ref[3,2,0,0]=(-0.180332702395)/(o+1.)+(-0.0815892290549)
-        ref[3,2,0,1]=(0.0811207173227)/(o+1.)+(0.392285456186)
-        ref[3,2,1,0]=(1.02225125645)/(o+1.)+(0.480941670608)
-        ref[3,2,1,1]=(1.21612405627)/(o+1.)+(0.45160613516)
-        ref[3,2,2,0]=(-0.355793756138)/(o+1.)+(0.669992488205)
-        ref[3,2,2,1]=(0.776200363894)/(o+1.)+(0.535930158963)
-        ref[3,3,0,0]=(-0.692703834029)/(o+1.)+(-0.00615860690903)
-        ref[3,3,0,1]=(0.88835171354)/(o+1.)+(0.00763271775166)
-        ref[3,3,1,0]=(-0.0987823234827)/(o+1.)+(0.628186276549)
-        ref[3,3,1,1]=(-0.223347424968)/(o+1.)+(-0.00346757455392)
-        ref[3,3,2,0]=(1.22648639393)/(o+1.)+(0.152216781743)
-        ref[3,3,2,1]=(0.272100360294)/(o+1.)+(0.111532468623)
-        ref[3,4,0,0]=(1.45235034011)/(o+1.)+(-0.0206817576441)
-        ref[3,4,0,1]=(1.49583359131)/(o+1.)+(-0.574565590956)
-        ref[3,4,1,0]=(0.362882204744)/(o+1.)+(0.581681025235)
-        ref[3,4,1,1]=(1.31795519959)/(o+1.)+(-0.0659375558974)
-        ref[3,4,2,0]=(0.556130663233)/(o+1.)+(-0.078813607523)
-        ref[3,4,2,1]=(1.56413690967)/(o+1.)+(-0.42520624231)
-      else:
-        arg[0,0,0,0]=(0.956854727968)*x[0]**o+(-0.43263548815)*x[0]+(-0.1485543705)*x[1]**o+(-0.411060684134)*x[1]+(-0.306829513954)*x[2]**o+(0.89077924839)*x[2]
-        arg[0,0,0,1]=(0.125905642347)*x[0]**o+(-0.645491335766)*x[0]+(-0.237571989123)*x[1]**o+(-0.239301942511)*x[1]+(-0.384215893518)*x[2]**o+(-0.371218179274)*x[2]
-        arg[0,0,1,0]=(0.0204273419969)*x[0]**o+(0.354631489501)*x[0]+(0.235086936835)*x[1]**o+(0.647551574475)*x[1]+(-0.729066874572)*x[2]**o+(0.177733791046)*x[2]
-        arg[0,0,1,1]=(-0.0938492166558)*x[0]**o+(-0.484339074939)*x[0]+(0.619333193491)*x[1]**o+(0.809157671781)*x[1]+(-0.28367956249)*x[2]**o+(-0.1758249267)*x[2]
-        arg[0,0,2,0]=(-0.334944259519)*x[0]**o+(-0.126145567301)*x[0]+(-0.646972616146)*x[1]**o+(0.20287553181)*x[1]+(-0.383816067326)*x[2]**o+(-0.0265591031498)*x[2]
-        arg[0,0,2,1]=(0.103308564583)*x[0]**o+(0.016108181951)*x[0]+(-0.367450237136)*x[1]**o+(0.657618788015)*x[1]+(-0.8327532511)*x[2]**o+(-0.267286876849)*x[2]
-        arg[0,1,0,0]=(0.688995722152)*x[0]**o+(-0.982012541087)*x[0]+(-0.232339851099)*x[1]**o+(-0.097863461266)*x[1]+(0.25916639806)*x[2]**o+(0.0538637018789)*x[2]
-        arg[0,1,0,1]=(0.446698337789)*x[0]**o+(-0.309434573629)*x[0]+(0.617004214016)*x[1]**o+(0.747666594435)*x[1]+(-0.869684246717)*x[2]**o+(0.75016186442)*x[2]
-        arg[0,1,1,0]=(-0.559974353252)*x[0]**o+(0.966642794905)*x[0]+(-0.228473000256)*x[1]**o+(-0.435093965632)*x[1]+(0.426986383284)*x[2]**o+(0.131300817321)*x[2]
-        arg[0,1,1,1]=(-0.696027598385)*x[0]**o+(-0.804778535506)*x[0]+(0.930171049019)*x[1]**o+(-0.900826020873)*x[1]+(0.844689166523)*x[2]**o+(0.0349718139676)*x[2]
-        arg[0,1,2,0]=(0.359170897328)*x[0]**o+(0.992944582308)*x[0]+(0.579162388074)*x[1]**o+(0.743410851741)*x[1]+(-0.204325306226)*x[2]**o+(-0.992005484878)*x[2]
-        arg[0,1,2,1]=(-0.883554988936)*x[0]**o+(0.486947073334)*x[0]+(-0.78078860326)*x[1]**o+(-0.134196299284)*x[1]+(-0.980852067031)*x[2]**o+(0.453023187355)*x[2]
-        arg[0,2,0,0]=(0.804524524371)*x[0]**o+(0.397924403155)*x[0]+(0.712297039229)*x[1]**o+(0.713485622558)*x[1]+(-0.966783610543)*x[2]**o+(0.497869404576)*x[2]
-        arg[0,2,0,1]=(-0.564706930001)*x[0]**o+(-0.482026983244)*x[0]+(0.284926154564)*x[1]**o+(0.844423322149)*x[1]+(0.444203847061)*x[2]**o+(0.333244188639)*x[2]
-        arg[0,2,1,0]=(-0.630410083438)*x[0]**o+(-0.831218126629)*x[0]+(0.400237927956)*x[1]**o+(-0.70518378137)*x[1]+(-0.803754805917)*x[2]**o+(0.60059455602)*x[2]
-        arg[0,2,1,1]=(0.198272547853)*x[0]**o+(0.0840356091496)*x[0]+(0.114385146155)*x[1]**o+(0.731057038288)*x[1]+(-0.976056408523)*x[2]**o+(-0.132565954304)*x[2]
-        arg[0,2,2,0]=(0.983300141657)*x[0]**o+(-0.733168195162)*x[0]+(-0.948802450335)*x[1]**o+(-0.756616078178)*x[1]+(0.450302374372)*x[2]**o+(0.802115535717)*x[2]
-        arg[0,2,2,1]=(-0.680853503774)*x[0]**o+(-0.910402862928)*x[0]+(0.583775613868)*x[1]**o+(0.741516645611)*x[1]+(-0.550498467533)*x[2]**o+(-0.610648481959)*x[2]
-        arg[0,3,0,0]=(0.981909313325)*x[0]**o+(0.148145112359)*x[0]+(-0.989721117518)*x[1]**o+(0.0246558730659)*x[1]+(0.721439979982)*x[2]**o+(0.896052837889)*x[2]
-        arg[0,3,0,1]=(0.109831691542)*x[0]**o+(-0.349555366958)*x[0]+(-0.54822642636)*x[1]**o+(0.121919022172)*x[1]+(-0.580228247481)*x[2]**o+(0.564276455713)*x[2]
-        arg[0,3,1,0]=(0.106091093353)*x[0]**o+(0.410111742327)*x[0]+(-0.0669026478824)*x[1]**o+(-0.662684907574)*x[1]+(-0.351815520918)*x[2]**o+(-0.324802958038)*x[2]
-        arg[0,3,1,1]=(0.857685803258)*x[0]**o+(-0.782627954043)*x[0]+(-0.555036389439)*x[1]**o+(-0.0126716685608)*x[1]+(0.260461379777)*x[2]**o+(0.117590260591)*x[2]
-        arg[0,3,2,0]=(-0.987873674604)*x[0]**o+(0.0779662295512)*x[0]+(-0.928229202803)*x[1]**o+(0.508015712707)*x[1]+(0.248638760509)*x[2]**o+(-0.712158091156)*x[2]
-        arg[0,3,2,1]=(-0.977973356138)*x[0]**o+(0.270015563339)*x[0]+(0.811157094127)*x[1]**o+(-0.756460384936)*x[1]+(-0.735557557504)*x[2]**o+(0.780333584929)*x[2]
-        arg[0,4,0,0]=(-0.762444411646)*x[0]**o+(0.386894014691)*x[0]+(0.763898738855)*x[1]**o+(-0.422896581278)*x[1]+(0.428591445563)*x[2]**o+(-0.617626926396)*x[2]
-        arg[0,4,0,1]=(-0.269524167286)*x[0]**o+(0.996895823788)*x[0]+(0.771396605337)*x[1]**o+(-0.993794940262)*x[1]+(-0.534803587481)*x[2]**o+(-0.928627946122)*x[2]
-        arg[0,4,1,0]=(0.978497459584)*x[0]**o+(-0.343496507186)*x[0]+(-0.250581087884)*x[1]**o+(-0.855743445852)*x[1]+(-0.127512246124)*x[2]**o+(-0.133936486447)*x[2]
-        arg[0,4,1,1]=(-0.844450818471)*x[0]**o+(0.263329730105)*x[0]+(0.411212783735)*x[1]**o+(-0.816379748952)*x[1]+(-0.443806901857)*x[2]**o+(0.1262969097)*x[2]
-        arg[0,4,2,0]=(-0.326938381124)*x[0]**o+(-0.707054728551)*x[0]+(-0.725513874889)*x[1]**o+(0.655254977879)*x[1]+(0.772734170665)*x[2]**o+(-0.963856465024)*x[2]
-        arg[0,4,2,1]=(0.896415185133)*x[0]**o+(-0.722431478737)*x[0]+(0.942058336843)*x[1]**o+(0.838230971246)*x[1]+(-0.279821311439)*x[2]**o+(-0.330130961206)*x[2]
-        arg[1,0,0,0]=(-0.466537465363)*x[0]**o+(0.86493624537)*x[0]+(-0.943049537777)*x[1]**o+(0.658727518981)*x[1]+(-0.130355508544)*x[2]**o+(-0.158245981876)*x[2]
-        arg[1,0,0,1]=(0.247046604605)*x[0]**o+(-0.287683750248)*x[0]+(0.266630203142)*x[1]**o+(0.372409648579)*x[1]+(-0.239411725166)*x[2]**o+(0.537339451105)*x[2]
-        arg[1,0,1,0]=(-0.232312387253)*x[0]**o+(-0.0493954012747)*x[0]+(-0.461085479525)*x[1]**o+(-0.0744729096417)*x[1]+(-0.795163064273)*x[2]**o+(0.613075576806)*x[2]
-        arg[1,0,1,1]=(-0.68570821748)*x[0]**o+(-0.492507082229)*x[0]+(-0.0673636097828)*x[1]**o+(0.569119992806)*x[1]+(-0.227653595613)*x[2]**o+(0.0337433636837)*x[2]
-        arg[1,0,2,0]=(-0.124371489405)*x[0]**o+(-0.726635218442)*x[0]+(-0.835418167414)*x[1]**o+(-0.00414597707753)*x[1]+(0.8365917104)*x[2]**o+(-0.507314639615)*x[2]
-        arg[1,0,2,1]=(-0.973228057052)*x[0]**o+(0.123228228923)*x[0]+(0.545712842666)*x[1]**o+(-0.451331566047)*x[1]+(0.299501907067)*x[2]**o+(-0.24898389883)*x[2]
-        arg[1,1,0,0]=(-0.940690906836)*x[0]**o+(-0.357571197214)*x[0]+(0.98643983012)*x[1]**o+(-0.82113140872)*x[1]+(0.460009285424)*x[2]**o+(-0.0298714172583)*x[2]
-        arg[1,1,0,1]=(-0.881543245921)*x[0]**o+(-0.640741814727)*x[0]+(-0.749244677096)*x[1]**o+(0.47161101909)*x[1]+(0.712893375828)*x[2]**o+(0.600151133959)*x[2]
-        arg[1,1,1,0]=(-0.217214692405)*x[0]**o+(-0.504211076658)*x[0]+(0.857127736087)*x[1]**o+(0.0439761116172)*x[1]+(0.956380848189)*x[2]**o+(0.698482155013)*x[2]
-        arg[1,1,1,1]=(-0.288969728734)*x[0]**o+(-0.63960886193)*x[0]+(-0.741293494258)*x[1]**o+(-0.125034323955)*x[1]+(-0.608855286755)*x[2]**o+(0.462427737944)*x[2]
-        arg[1,1,2,0]=(0.126242043984)*x[0]**o+(0.811846484451)*x[0]+(-0.522920862127)*x[1]**o+(0.678142081935)*x[1]+(0.0392586436898)*x[2]**o+(0.403908304728)*x[2]
-        arg[1,1,2,1]=(-0.290103861843)*x[0]**o+(0.336130241928)*x[0]+(-0.872641307678)*x[1]**o+(-0.372020796526)*x[1]+(0.172572077906)*x[2]**o+(-0.789431556966)*x[2]
-        arg[1,2,0,0]=(-0.158114079913)*x[0]**o+(0.954919898537)*x[0]+(-0.711834968234)*x[1]**o+(-0.390487270434)*x[1]+(-0.086581514295)*x[2]**o+(0.442047084988)*x[2]
-        arg[1,2,0,1]=(-0.914034594356)*x[0]**o+(0.521137372279)*x[0]+(0.12454416569)*x[1]**o+(0.627815188423)*x[1]+(0.770244577882)*x[2]**o+(-0.846691748091)*x[2]
-        arg[1,2,1,0]=(0.769631824465)*x[0]**o+(0.988840796717)*x[0]+(-0.401836868027)*x[1]**o+(0.401846957832)*x[1]+(-0.877826997285)*x[2]**o+(0.857725824229)*x[2]
-        arg[1,2,1,1]=(0.173539365276)*x[0]**o+(0.373206670706)*x[0]+(-0.597288730366)*x[1]**o+(-0.770220794555)*x[1]+(-0.586510454467)*x[2]**o+(-0.569370842441)*x[2]
-        arg[1,2,2,0]=(0.673765155818)*x[0]**o+(-0.642914516709)*x[0]+(0.794438851788)*x[1]**o+(-0.17557754186)*x[1]+(0.997565143863)*x[2]**o+(0.722460144483)*x[2]
-        arg[1,2,2,1]=(-0.878452482718)*x[0]**o+(-0.846862156166)*x[0]+(0.462351027504)*x[1]**o+(0.267435606154)*x[1]+(-0.452135086983)*x[2]**o+(0.701577407252)*x[2]
-        arg[1,3,0,0]=(-0.0557389135964)*x[0]**o+(-0.781831460089)*x[0]+(0.214846092931)*x[1]**o+(0.597436260353)*x[1]+(0.713968428327)*x[2]**o+(-0.456335676572)*x[2]
-        arg[1,3,0,1]=(0.288266531585)*x[0]**o+(-0.259529556521)*x[0]+(0.0286107975184)*x[1]**o+(0.465095455484)*x[1]+(-0.747648909025)*x[2]**o+(0.682866470382)*x[2]
-        arg[1,3,1,0]=(-0.720339104668)*x[0]**o+(0.961100526257)*x[0]+(0.0814885381756)*x[1]**o+(-0.448775223649)*x[1]+(0.250972143198)*x[2]**o+(-0.240231439947)*x[2]
-        arg[1,3,1,1]=(-0.459305786748)*x[0]**o+(0.272222143865)*x[0]+(-0.499164099401)*x[1]**o+(-0.225162547271)*x[1]+(-0.92261124167)*x[2]**o+(-0.436659790026)*x[2]
-        arg[1,3,2,0]=(0.890752966329)*x[0]**o+(-0.775207922011)*x[0]+(0.715960284721)*x[1]**o+(0.843422841789)*x[1]+(0.513788850466)*x[2]**o+(-0.325733710281)*x[2]
-        arg[1,3,2,1]=(0.958726172433)*x[0]**o+(-0.743672393249)*x[0]+(-0.523783133945)*x[1]**o+(0.133861976051)*x[1]+(-0.109230940116)*x[2]**o+(0.819716327751)*x[2]
-        arg[1,4,0,0]=(0.54439729551)*x[0]**o+(0.0763503792087)*x[0]+(0.0634218657498)*x[1]**o+(-0.405471845044)*x[1]+(0.316327091756)*x[2]**o+(-0.539493863939)*x[2]
-        arg[1,4,0,1]=(0.527330373182)*x[0]**o+(0.77531447123)*x[0]+(-0.481869315442)*x[1]**o+(0.556927692362)*x[1]+(-0.267215098309)*x[2]**o+(0.958919406465)*x[2]
-        arg[1,4,1,0]=(0.540950372012)*x[0]**o+(-0.95002626611)*x[0]+(-0.523544509893)*x[1]**o+(-0.583056635057)*x[1]+(-0.00288409928193)*x[2]**o+(0.671385098427)*x[2]
-        arg[1,4,1,1]=(-0.39802076092)*x[0]**o+(-0.583264022146)*x[0]+(-0.656261495961)*x[1]**o+(-0.527677078418)*x[1]+(-0.2632498932)*x[2]**o+(-0.537632951507)*x[2]
-        arg[1,4,2,0]=(-0.77176416566)*x[0]**o+(0.812696440735)*x[0]+(0.0925789242005)*x[1]**o+(0.299698967601)*x[1]+(-0.0185377066587)*x[2]**o+(-0.883247318682)*x[2]
-        arg[1,4,2,1]=(0.360949407452)*x[0]**o+(-0.463659754812)*x[0]+(0.799066387132)*x[1]**o+(0.0318151346916)*x[1]+(-0.380675976437)*x[2]**o+(-0.299341342112)*x[2]
-        arg[2,0,0,0]=(-0.985332287141)*x[0]**o+(0.33398206098)*x[0]+(0.39204502373)*x[1]**o+(-0.586826360517)*x[1]+(0.868240161369)*x[2]**o+(-0.257897525907)*x[2]
-        arg[2,0,0,1]=(-0.801369266967)*x[0]**o+(0.333496542809)*x[0]+(0.459444994717)*x[1]**o+(-0.950297568688)*x[1]+(-0.760722281765)*x[2]**o+(0.0933850221377)*x[2]
-        arg[2,0,1,0]=(0.53372811812)*x[0]**o+(0.999551098511)*x[0]+(-0.761650890163)*x[1]**o+(-0.80456940786)*x[1]+(-0.452089806623)*x[2]**o+(-0.40841169158)*x[2]
-        arg[2,0,1,1]=(-0.782294374468)*x[0]**o+(0.614736817827)*x[0]+(0.262995910218)*x[1]**o+(0.067349886804)*x[1]+(-0.167494656909)*x[2]**o+(-0.730462378769)*x[2]
-        arg[2,0,2,0]=(0.261001857862)*x[0]**o+(0.959318765248)*x[0]+(-0.177224016298)*x[1]**o+(-0.979637664014)*x[1]+(0.858937930292)*x[2]**o+(-0.627116377798)*x[2]
-        arg[2,0,2,1]=(-0.238083578675)*x[0]**o+(0.586367991705)*x[0]+(0.747378561289)*x[1]**o+(-0.540178926415)*x[1]+(-0.519781240185)*x[2]**o+(-0.42715014981)*x[2]
-        arg[2,1,0,0]=(-0.21022574437)*x[0]**o+(-0.292359099348)*x[0]+(0.449614855785)*x[1]**o+(-0.416904619153)*x[1]+(0.507537288404)*x[2]**o+(0.943584716996)*x[2]
-        arg[2,1,0,1]=(-0.410591525695)*x[0]**o+(-0.258796394127)*x[0]+(-0.474714731399)*x[1]**o+(-0.518288451462)*x[1]+(-0.15640903664)*x[2]**o+(0.97242574307)*x[2]
-        arg[2,1,1,0]=(-0.930865834892)*x[0]**o+(0.961887630616)*x[0]+(0.688706862295)*x[1]**o+(-0.375163634404)*x[1]+(0.378954001649)*x[2]**o+(-0.747140890466)*x[2]
-        arg[2,1,1,1]=(0.0454701384411)*x[0]**o+(-0.37651801332)*x[0]+(0.0808750051583)*x[1]**o+(-0.530355850075)*x[1]+(0.769675417234)*x[2]**o+(-0.767046792016)*x[2]
-        arg[2,1,2,0]=(0.179573418696)*x[0]**o+(-0.0547918709025)*x[0]+(0.739792606043)*x[1]**o+(0.849619562235)*x[1]+(-0.92840796838)*x[2]**o+(-0.302941296337)*x[2]
-        arg[2,1,2,1]=(0.160657807137)*x[0]**o+(0.551943403654)*x[0]+(0.649164334204)*x[1]**o+(0.298882266215)*x[1]+(0.33872360276)*x[2]**o+(-0.558910868754)*x[2]
-        arg[2,2,0,0]=(-0.704330511528)*x[0]**o+(-0.326943167116)*x[0]+(0.626863819473)*x[1]**o+(-0.107147718189)*x[1]+(0.00668670393016)*x[2]**o+(0.572223662188)*x[2]
-        arg[2,2,0,1]=(0.879695137799)*x[0]**o+(-0.313488700497)*x[0]+(-0.113134766565)*x[1]**o+(-0.131007759381)*x[1]+(0.55460969593)*x[2]**o+(0.898706374575)*x[2]
-        arg[2,2,1,0]=(0.329932124981)*x[0]**o+(-0.624965470976)*x[0]+(0.82906774364)*x[1]**o+(-0.681403786977)*x[1]+(-0.447119491747)*x[2]**o+(0.143763601614)*x[2]
-        arg[2,2,1,1]=(0.0367746207528)*x[0]**o+(0.47553259605)*x[0]+(-0.517723045973)*x[1]**o+(0.263932783195)*x[1]+(-0.131032589284)*x[2]**o+(-0.132729291841)*x[2]
-        arg[2,2,2,0]=(-0.108349266564)*x[0]**o+(-0.684748849483)*x[0]+(0.203271582231)*x[1]**o+(-0.860842085896)*x[1]+(0.469684577785)*x[2]**o+(0.195736308182)*x[2]
-        arg[2,2,2,1]=(0.915666799349)*x[0]**o+(0.383338953756)*x[0]+(-0.554011249579)*x[1]**o+(0.232285573367)*x[1]+(0.39288151674)*x[2]**o+(0.692592233016)*x[2]
-        arg[2,3,0,0]=(0.81179207663)*x[0]**o+(0.786809236572)*x[0]+(-0.814758445611)*x[1]**o+(-0.78461653396)*x[1]+(0.171435802778)*x[2]**o+(0.660186909193)*x[2]
-        arg[2,3,0,1]=(0.752694523669)*x[0]**o+(0.301473785296)*x[0]+(0.610379955695)*x[1]**o+(0.573729399495)*x[1]+(0.225983751859)*x[2]**o+(-0.349530143446)*x[2]
-        arg[2,3,1,0]=(-0.647825490424)*x[0]**o+(-0.232573858642)*x[0]+(0.773519085771)*x[1]**o+(-0.224497979868)*x[1]+(-0.681726885952)*x[2]**o+(-0.217968759388)*x[2]
-        arg[2,3,1,1]=(0.391888417642)*x[0]**o+(-0.240556139087)*x[0]+(-0.852397797723)*x[1]**o+(0.318342758913)*x[1]+(-0.773804983598)*x[2]**o+(-0.957590491908)*x[2]
-        arg[2,3,2,0]=(0.7126582007)*x[0]**o+(0.806022164546)*x[0]+(0.232348951782)*x[1]**o+(-0.985774366344)*x[1]+(-0.365161907541)*x[2]**o+(0.0218977623299)*x[2]
-        arg[2,3,2,1]=(-0.775068843872)*x[0]**o+(-0.595291330879)*x[0]+(0.681122481841)*x[1]**o+(0.152514252732)*x[1]+(0.510976191808)*x[2]**o+(-0.69539067488)*x[2]
-        arg[2,4,0,0]=(-0.362761749405)*x[0]**o+(0.494347958562)*x[0]+(0.215244694522)*x[1]**o+(-0.527767969217)*x[1]+(-0.115976071059)*x[2]**o+(-0.998233415841)*x[2]
-        arg[2,4,0,1]=(0.620291015098)*x[0]**o+(-0.222644358028)*x[0]+(0.0377714785847)*x[1]**o+(0.663978623913)*x[1]+(0.996481523389)*x[2]**o+(-0.689519418095)*x[2]
-        arg[2,4,1,0]=(-0.0374746407394)*x[0]**o+(0.3186355021)*x[0]+(-0.704305640533)*x[1]**o+(-0.632264150766)*x[1]+(-0.166691199609)*x[2]**o+(-0.794128441334)*x[2]
-        arg[2,4,1,1]=(0.117806334919)*x[0]**o+(-0.717334572919)*x[0]+(0.665341054571)*x[1]**o+(0.354208273372)*x[1]+(0.349883631586)*x[2]**o+(-0.260626035314)*x[2]
-        arg[2,4,2,0]=(0.160337827685)*x[0]**o+(-0.92734430881)*x[0]+(0.872112181363)*x[1]**o+(-0.796372970466)*x[1]+(-0.776882702685)*x[2]**o+(0.246816968474)*x[2]
-        arg[2,4,2,1]=(-0.317926812571)*x[0]**o+(-0.795779593996)*x[0]+(0.785287724793)*x[1]**o+(0.839033515634)*x[1]+(0.433187943714)*x[2]**o+(0.308175885606)*x[2]
-        arg[3,0,0,0]=(-0.555193292291)*x[0]**o+(-0.0280452948283)*x[0]+(0.988455127227)*x[1]**o+(-0.637707060271)*x[1]+(-0.95062571916)*x[2]**o+(-0.563121211553)*x[2]
-        arg[3,0,0,1]=(-0.169558534946)*x[0]**o+(0.886096637835)*x[0]+(-0.666307491933)*x[1]**o+(0.650321801985)*x[1]+(-0.268934932123)*x[2]**o+(-0.406617199906)*x[2]
-        arg[3,0,1,0]=(0.497351781449)*x[0]**o+(0.768617651685)*x[0]+(0.200962956226)*x[1]**o+(0.694236078954)*x[1]+(0.0323702864321)*x[2]**o+(-0.666046265832)*x[2]
-        arg[3,0,1,1]=(0.425151807387)*x[0]**o+(-0.886432438604)*x[0]+(-0.963257203569)*x[1]**o+(-0.698524427437)*x[1]+(0.0165810713355)*x[2]**o+(-0.142193988951)*x[2]
-        arg[3,0,2,0]=(0.965746112788)*x[0]**o+(-0.333068915886)*x[0]+(0.331031372002)*x[1]**o+(-0.384004796757)*x[1]+(0.0144121092048)*x[2]**o+(-0.352607264387)*x[2]
-        arg[3,0,2,1]=(-0.391557775789)*x[0]**o+(0.127020330586)*x[0]+(0.758832450081)*x[1]**o+(0.49669414469)*x[1]+(0.358403498634)*x[2]**o+(0.184963946351)*x[2]
-        arg[3,1,0,0]=(0.978053897464)*x[0]**o+(-0.211787313494)*x[0]+(0.927706482976)*x[1]**o+(-0.451292956408)*x[1]+(0.592824645174)*x[2]**o+(0.896240907546)*x[2]
-        arg[3,1,0,1]=(0.0780568875295)*x[0]**o+(0.130098698523)*x[0]+(-0.281871571918)*x[1]**o+(-0.596362849045)*x[1]+(-0.436455789199)*x[2]**o+(-0.657145053021)*x[2]
-        arg[3,1,1,0]=(-0.278111817329)*x[0]**o+(-0.627384158565)*x[0]+(-0.995802044048)*x[1]**o+(0.42485189159)*x[1]+(0.483473275475)*x[2]**o+(-0.177928974458)*x[2]
-        arg[3,1,1,1]=(0.127721047557)*x[0]**o+(0.93147711978)*x[0]+(-0.350992052283)*x[1]**o+(0.0993773637672)*x[1]+(0.29111744653)*x[2]**o+(-0.821710278883)*x[2]
-        arg[3,1,2,0]=(-0.697941918276)*x[0]**o+(-0.585872232852)*x[0]+(0.697967779925)*x[1]**o+(-0.811186381728)*x[1]+(0.708726108998)*x[2]**o+(0.289602027081)*x[2]
-        arg[3,1,2,1]=(-0.461424409147)*x[0]**o+(0.335089386385)*x[0]+(-0.964838280406)*x[1]**o+(0.828627561583)*x[1]+(-0.861416281013)*x[2]**o+(0.898354675269)*x[2]
-        arg[3,2,0,0]=(0.752543705358)*x[0]**o+(0.164487088496)*x[0]+(0.756164002406)*x[1]**o+(-0.740019514032)*x[1]+(0.107245489678)*x[2]**o+(0.677707700079)*x[2]
-        arg[3,2,0,1]=(0.763792557134)*x[0]**o+(0.725507550672)*x[0]+(0.171323949629)*x[1]**o+(-0.287172075258)*x[1]+(-0.94865226715)*x[2]**o+(-0.163093465336)*x[2]
-        arg[3,2,1,0]=(-0.327892721048)*x[0]**o+(0.334145897353)*x[0]+(-0.936827293436)*x[1]**o+(0.0822687872593)*x[1]+(0.259794829604)*x[2]**o+(0.376908280759)*x[2]
-        arg[3,2,1,1]=(0.595012545955)*x[0]**o+(0.617490014693)*x[0]+(-0.658036388462)*x[1]**o+(-0.921055393527)*x[1]+(-0.257878085344)*x[2]**o+(-0.623113089161)*x[2]
-        arg[3,2,2,0]=(0.961175705937)*x[0]**o+(0.656031660842)*x[0]+(0.964101580317)*x[1]**o+(0.824033157042)*x[1]+(0.510244886658)*x[2]**o+(-0.236501162729)*x[2]
-        arg[3,2,2,1]=(-0.128405588923)*x[0]**o+(-0.0327141502894)*x[0]+(0.909941485131)*x[1]**o+(0.79947258121)*x[1]+(0.635883050534)*x[2]**o+(0.841997575796)*x[2]
-        arg[3,3,0,0]=(-0.906234907643)*x[0]**o+(-0.316076976009)*x[0]+(0.863208664533)*x[1]**o+(-0.968640170523)*x[1]+(0.791637381686)*x[2]**o+(-0.543353462098)*x[2]
-        arg[3,3,0,1]=(-0.586709036832)*x[0]**o+(-0.299493216592)*x[0]+(-0.173966725899)*x[1]**o+(0.0971838711677)*x[1]+(0.385662922244)*x[2]**o+(0.288932625368)*x[2]
-        arg[3,3,1,0]=(-0.33865322795)*x[0]**o+(0.442176445777)*x[0]+(0.706183231282)*x[1]**o+(0.62528018966)*x[1]+(-0.377746006979)*x[2]**o+(-0.261455124139)*x[2]
-        arg[3,3,1,1]=(0.834855553776)*x[0]**o+(0.755005824764)*x[0]+(0.446589332183)*x[1]**o+(0.41883521757)*x[1]+(0.820177207209)*x[2]**o+(0.603811552083)*x[2]
-        arg[3,3,2,0]=(-0.624282266193)*x[0]**o+(0.28109086861)*x[0]+(0.44286011655)*x[1]**o+(-0.117876187343)*x[1]+(-0.267660131821)*x[2]**o+(0.880359406159)*x[2]
-        arg[3,3,2,1]=(-0.0722687033317)*x[0]**o+(-0.7013147214)*x[0]+(0.00614303249005)*x[1]**o+(-0.658138946692)*x[1]+(0.0557277088337)*x[2]**o+(0.614362766103)*x[2]
-        arg[3,4,0,0]=(0.935244440586)*x[0]**o+(-0.0699305155896)*x[0]+(-0.849303362918)*x[1]**o+(0.728062537708)*x[1]+(0.404621498028)*x[2]**o+(0.611486631437)*x[2]
-        arg[3,4,0,1]=(0.168117782017)*x[0]**o+(-0.0454396423181)*x[0]+(0.46021270423)*x[1]**o+(0.597343569492)*x[1]+(0.561215321486)*x[2]**o+(0.715771227777)*x[2]
-        arg[3,4,1,0]=(-0.502675682461)*x[0]**o+(0.543910335185)*x[0]+(0.721732643536)*x[1]**o+(-0.862126899566)*x[1]+(0.794704104653)*x[2]**o+(-0.284248276797)*x[2]
-        arg[3,4,1,1]=(-0.580751817984)*x[0]**o+(0.482838505281)*x[0]+(-0.426066109367)*x[1]**o+(-0.456724382007)*x[1]+(-0.770655426938)*x[2]**o+(-0.226232224569)*x[2]
-        arg[3,4,2,0]=(0.199832861603)*x[0]**o+(-0.586239366436)*x[0]+(0.730019631541)*x[1]**o+(0.185265476259)*x[1]+(0.514243351617)*x[2]**o+(-0.757742857839)*x[2]
-        arg[3,4,2,1]=(-0.941843068195)*x[0]**o+(0.211732407161)*x[0]+(-0.99705602485)*x[1]**o+(-0.198037742645)*x[1]+(0.154058794178)*x[2]**o+(0.0675962671791)*x[2]
-        ref[0,0,0,0]=(0.501470843513)/(o+1.)+(0.0235415380528)
-        ref[0,0,0,1]=(-0.495882240293)/(o+1.)+(-0.628005728776)
-        ref[0,0,1,0]=(-0.47355259574)/(o+1.)+(0.589958427511)
-        ref[0,0,1,1]=(0.241804414345)/(o+1.)+(0.0744968350706)
-        ref[0,0,2,0]=(-1.36573294299)/(o+1.)+(0.0250854306796)
-        ref[0,0,2,1]=(-1.09689492365)/(o+1.)+(0.203220046558)
-        ref[0,1,0,0]=(0.715822269113)/(o+1.)+(-0.513006150237)
-        ref[0,1,0,1]=(0.194018305088)/(o+1.)+(0.594196942613)
-        ref[0,1,1,0]=(-0.361460970224)/(o+1.)+(0.331424823297)
-        ref[0,1,1,1]=(1.07883261716)/(o+1.)+(-0.835316371206)
-        ref[0,1,2,0]=(0.734007979175)/(o+1.)+(0.372174974585)
-        ref[0,1,2,1]=(-2.64519565923)/(o+1.)+(0.402886980703)
-        ref[0,2,0,0]=(0.550037953057)/(o+1.)+(0.804639715144)
-        ref[0,2,0,1]=(0.164423071623)/(o+1.)+(0.347820263772)
-        ref[0,2,1,0]=(-1.0339269614)/(o+1.)+(-0.46790367599)
-        ref[0,2,1,1]=(-0.663398714515)/(o+1.)+(0.341263346566)
-        ref[0,2,2,0]=(0.484800065694)/(o+1.)+(-0.343834368812)
-        ref[0,2,2,1]=(-0.647576357439)/(o+1.)+(-0.389767349638)
-        ref[0,3,0,0]=(0.713628175789)/(o+1.)+(0.534426911657)
-        ref[0,3,0,1]=(-1.0186229823)/(o+1.)+(0.168320055464)
-        ref[0,3,1,0]=(-0.312627075447)/(o+1.)+(-0.288688061643)
-        ref[0,3,1,1]=(0.563110793595)/(o+1.)+(-0.338854681006)
-        ref[0,3,2,0]=(-1.6674641169)/(o+1.)+(-0.0630880744491)
-        ref[0,3,2,1]=(-0.902373819515)/(o+1.)+(0.146944381666)
-        ref[0,4,0,0]=(0.430045772773)/(o+1.)+(-0.326814746492)
-        ref[0,4,0,1]=(-0.0329311494305)/(o+1.)+(-0.462763531298)
-        ref[0,4,1,0]=(0.600404125575)/(o+1.)+(-0.666588219743)
-        ref[0,4,1,1]=(-0.877044936593)/(o+1.)+(-0.213376554573)
-        ref[0,4,2,0]=(-0.279718085349)/(o+1.)+(-0.507828107848)
-        ref[0,4,2,1]=(1.55865221054)/(o+1.)+(-0.107165734349)
-        ref[1,0,0,0]=(-1.53994251168)/(o+1.)+(0.682708891237)
-        ref[1,0,0,1]=(0.27426508258)/(o+1.)+(0.311032674718)
-        ref[1,0,1,0]=(-1.48856093105)/(o+1.)+(0.244603632945)
-        ref[1,0,1,1]=(-0.980725422876)/(o+1.)+(0.0551781371305)
-        ref[1,0,2,0]=(-0.123197946419)/(o+1.)+(-0.619047917567)
-        ref[1,0,2,1]=(-0.128013307318)/(o+1.)+(-0.288543617977)
-        ref[1,1,0,0]=(0.505758208708)/(o+1.)+(-0.604287011596)
-        ref[1,1,0,1]=(-0.917894547188)/(o+1.)+(0.215510169161)
-        ref[1,1,1,0]=(1.59629389187)/(o+1.)+(0.119123594986)
-        ref[1,1,1,1]=(-1.63911850975)/(o+1.)+(-0.15110772397)
-        ref[1,1,2,0]=(-0.357420174452)/(o+1.)+(0.946948435557)
-        ref[1,1,2,1]=(-0.990173091615)/(o+1.)+(-0.412661055782)
-        ref[1,2,0,0]=(-0.956530562442)/(o+1.)+(0.503239856545)
-        ref[1,2,0,1]=(-0.0192458507848)/(o+1.)+(0.151130406306)
-        ref[1,2,1,0]=(-0.510032040848)/(o+1.)+(1.12420678939)
-        ref[1,2,1,1]=(-1.01025981956)/(o+1.)+(-0.483192483145)
-        ref[1,2,2,0]=(2.46576915147)/(o+1.)+(-0.0480159570431)
-        ref[1,2,2,1]=(-0.868236542197)/(o+1.)+(0.0610754286198)
-        ref[1,3,0,0]=(0.873075607662)/(o+1.)+(-0.320365438154)
-        ref[1,3,0,1]=(-0.430771579922)/(o+1.)+(0.444216184672)
-        ref[1,3,1,0]=(-0.387878423294)/(o+1.)+(0.13604693133)
-        ref[1,3,1,1]=(-1.88108112782)/(o+1.)+(-0.194800096716)
-        ref[1,3,2,0]=(2.12050210152)/(o+1.)+(-0.128759395251)
-        ref[1,3,2,1]=(0.325712098372)/(o+1.)+(0.104952955276)
-        ref[1,4,0,0]=(0.924146253016)/(o+1.)+(-0.434307664887)
-        ref[1,4,0,1]=(-0.221754040568)/(o+1.)+(1.14558078503)
-        ref[1,4,1,0]=(0.0145217628367)/(o+1.)+(-0.43084890137)
-        ref[1,4,1,1]=(-1.31753215008)/(o+1.)+(-0.824287026036)
-        ref[1,4,2,0]=(-0.697722948118)/(o+1.)+(0.114574044827)
-        ref[1,4,2,1]=(0.779339818147)/(o+1.)+(-0.365592981116)
-        ref[2,0,0,0]=(0.274952897958)/(o+1.)+(-0.255370912722)
-        ref[2,0,0,1]=(-1.10264655401)/(o+1.)+(-0.261708001871)
-        ref[2,0,1,0]=(-0.680012578665)/(o+1.)+(-0.106715000464)
-        ref[2,0,1,1]=(-0.686793121159)/(o+1.)+(-0.0241878370688)
-        ref[2,0,2,0]=(0.942715771856)/(o+1.)+(-0.323717638282)
-        ref[2,0,2,1]=(-0.0104862575713)/(o+1.)+(-0.19048054226)
-        ref[2,1,0,0]=(0.746926399818)/(o+1.)+(0.117160499248)
-        ref[2,1,0,1]=(-1.04171529373)/(o+1.)+(0.0976704487401)
-        ref[2,1,1,0]=(0.136795029052)/(o+1.)+(-0.0802084471266)
-        ref[2,1,1,1]=(0.896020560833)/(o+1.)+(-0.836960327706)
-        ref[2,1,2,0]=(-0.00904194364113)/(o+1.)+(0.245943197498)
-        ref[2,1,2,1]=(1.1485457441)/(o+1.)+(0.145957400558)
-        ref[2,2,0,0]=(-0.0707799881243)/(o+1.)+(0.0690663884416)
-        ref[2,2,0,1]=(1.32117006716)/(o+1.)+(0.227104957348)
-        ref[2,2,1,0]=(0.711880376874)/(o+1.)+(-0.58130282817)
-        ref[2,2,1,1]=(-0.611981014504)/(o+1.)+(0.303368043702)
-        ref[2,2,2,0]=(0.564606893452)/(o+1.)+(-0.674927313599)
-        ref[2,2,2,1]=(0.754537066511)/(o+1.)+(0.654108380069)
-        ref[2,3,0,0]=(0.168469433796)/(o+1.)+(0.331189805903)
-        ref[2,3,0,1]=(1.58905823122)/(o+1.)+(0.262836520673)
-        ref[2,3,1,0]=(-0.556033290604)/(o+1.)+(-0.337520298949)
-        ref[2,3,1,1]=(-1.23431436368)/(o+1.)+(-0.439901936041)
-        ref[2,3,2,0]=(0.579845244941)/(o+1.)+(-0.0789272197338)
-        ref[2,3,2,1]=(0.417029829778)/(o+1.)+(-0.569083876513)
-        ref[2,4,0,0]=(-0.263493125943)/(o+1.)+(-0.515826713248)
-        ref[2,4,0,1]=(1.65454401707)/(o+1.)+(-0.124092576105)
-        ref[2,4,1,0]=(-0.908471480882)/(o+1.)+(-0.553878545)
-        ref[2,4,1,1]=(1.13303102108)/(o+1.)+(-0.31187616743)
-        ref[2,4,2,0]=(0.255567306363)/(o+1.)+(-0.738450155401)
-        ref[2,4,2,1]=(0.900548855936)/(o+1.)+(0.175714903622)
-        ref[3,0,0,0]=(-0.517363884224)/(o+1.)+(-0.614436783326)
-        ref[3,0,0,1]=(-1.104800959)/(o+1.)+(0.564900619957)
-        ref[3,0,1,0]=(0.730685024108)/(o+1.)+(0.398403732404)
-        ref[3,0,1,1]=(-0.521524324846)/(o+1.)+(-0.863575427496)
-        ref[3,0,2,0]=(1.31118959399)/(o+1.)+(-0.534840488515)
-        ref[3,0,2,1]=(0.725678172925)/(o+1.)+(0.404339210814)
-        ref[3,1,0,0]=(2.49858502561)/(o+1.)+(0.116580318822)
-        ref[3,1,0,1]=(-0.640270473588)/(o+1.)+(-0.561704601771)
-        ref[3,1,1,0]=(-0.790440585902)/(o+1.)+(-0.190230620716)
-        ref[3,1,1,1]=(0.0678464418036)/(o+1.)+(0.104572102332)
-        ref[3,1,2,0]=(0.708751970646)/(o+1.)+(-0.553728293749)
-        ref[3,1,2,1]=(-2.28767897057)/(o+1.)+(1.03103581162)
-        ref[3,2,0,0]=(1.61595319744)/(o+1.)+(0.0510876372718)
-        ref[3,2,0,1]=(-0.0135357603866)/(o+1.)+(0.137621005039)
-        ref[3,2,1,0]=(-1.00492518488)/(o+1.)+(0.396661482686)
-        ref[3,2,1,1]=(-0.320901927851)/(o+1.)+(-0.463339233997)
-        ref[3,2,2,0]=(2.43552217291)/(o+1.)+(0.621781827577)
-        ref[3,2,2,1]=(1.41741894674)/(o+1.)+(0.804378003359)
-        ref[3,3,0,0]=(0.748611138576)/(o+1.)+(-0.914035304315)
-        ref[3,3,0,1]=(-0.375012840487)/(o+1.)+(0.0433116399723)
-        ref[3,3,1,0]=(-0.0102160036467)/(o+1.)+(0.403000755649)
-        ref[3,3,1,1]=(2.10162209317)/(o+1.)+(0.888826297208)
-        ref[3,3,2,0]=(-0.449082281464)/(o+1.)+(0.521787043713)
-        ref[3,3,2,1]=(-0.0103979620079)/(o+1.)+(-0.372545450994)
-        ref[3,4,0,0]=(0.490562575696)/(o+1.)+(0.634809326777)
-        ref[3,4,0,1]=(1.18954580773)/(o+1.)+(0.633837577475)
-        ref[3,4,1,0]=(1.01376106573)/(o+1.)+(-0.301232420589)
-        ref[3,4,1,1]=(-1.77747335429)/(o+1.)+(-0.100059050648)
-        ref[3,4,2,0]=(1.44409584476)/(o+1.)+(-0.579358374008)
-        ref[3,4,2,1]=(-1.78484029887)/(o+1.)+(0.0406454658476)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 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 the 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.788336609161)*x[0]**o+(-0.46539601764)*x[0]+(0.0970136798824)*x[1]**o+(-0.120665298671)*x[1]
-        ref=(-0.691322929278)/(o+1.)+(-0.293030658156)
-      else:
-        arg=(0.922255261003)*x[0]**o+(0.0862232364707)*x[0]+(-0.94152635039)*x[1]**o+(0.771078486789)*x[1]+(-0.487642191181)*x[2]**o+(0.971754960362)*x[2]
-        ref=(-0.506913280568)/(o+1.)+(0.914528341811)
-      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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(-0.193071015033)*x[0]**o+(-0.281957941612)*x[0]+(0.269334552863)*x[1]**o+(0.0332262192804)*x[1]
-        arg[1]=(-0.982634724425)*x[0]**o+(0.872638820737)*x[0]+(0.828028964603)*x[1]**o+(0.70464418136)*x[1]
-        ref[0]=(0.0762635378296)/(o+1.)+(-0.124365861166)
-        ref[1]=(-0.154605759822)/(o+1.)+(0.788641501048)
-      else:
-        arg[0]=(0.0746983082972)*x[0]**o+(0.281818436343)*x[0]+(-0.835321029206)*x[1]**o+(-0.349524270524)*x[1]+(-0.471905088601)*x[2]**o+(0.156327167402)*x[2]
-        arg[1]=(-0.971935771255)*x[0]**o+(0.943151542057)*x[0]+(-0.60084258169)*x[1]**o+(0.458392855527)*x[1]+(-0.0173384187065)*x[2]**o+(0.538410338758)*x[2]
-        ref[0]=(-1.23252780951)/(o+1.)+(0.0443106666103)
-        ref[1]=(-1.59011677165)/(o+1.)+(0.969977368171)
-      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_Solution_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.568783264759)*x[0]**o+(0.690377280868)*x[0]+(-0.689750922806)*x[1]**o+(-0.262828324126)*x[1]
-        arg[0,1]=(-0.981657284673)*x[0]**o+(0.37118874852)*x[0]+(0.733992104146)*x[1]**o+(0.350268735699)*x[1]
-        arg[0,2]=(0.713336100765)*x[0]**o+(0.737674447814)*x[0]+(0.239606043833)*x[1]**o+(0.814911366356)*x[1]
-        arg[0,3]=(0.171706130967)*x[0]**o+(0.56324398491)*x[0]+(0.328884588679)*x[1]**o+(0.13307521808)*x[1]
-        arg[0,4]=(-0.309130885049)*x[0]**o+(0.353596646674)*x[0]+(-0.282764686556)*x[1]**o+(-0.56977508596)*x[1]
-        arg[1,0]=(0.974136161109)*x[0]**o+(-0.432477120938)*x[0]+(-0.841212164751)*x[1]**o+(-0.429211937256)*x[1]
-        arg[1,1]=(0.0303890146585)*x[0]**o+(-0.712865964696)*x[0]+(0.572471431129)*x[1]**o+(-0.194324510922)*x[1]
-        arg[1,2]=(-0.757134870981)*x[0]**o+(-0.018314520594)*x[0]+(0.250423290169)*x[1]**o+(-0.876678823729)*x[1]
-        arg[1,3]=(-0.351885929068)*x[0]**o+(-0.561258605321)*x[0]+(0.208995575986)*x[1]**o+(0.428437856056)*x[1]
-        arg[1,4]=(-0.313383912526)*x[0]**o+(-0.713484404328)*x[0]+(-0.279619274966)*x[1]**o+(0.72420661494)*x[1]
-        arg[2,0]=(-0.686382641827)*x[0]**o+(0.678578408675)*x[0]+(-0.696532353786)*x[1]**o+(-0.154644995634)*x[1]
-        arg[2,1]=(0.368548759951)*x[0]**o+(-0.674856247769)*x[0]+(0.908734263899)*x[1]**o+(0.331173572353)*x[1]
-        arg[2,2]=(-0.1279136556)*x[0]**o+(-0.161474840876)*x[0]+(-0.775009015881)*x[1]**o+(-0.689552100815)*x[1]
-        arg[2,3]=(-0.638450048485)*x[0]**o+(0.755485009392)*x[0]+(-0.793363159431)*x[1]**o+(0.255883452369)*x[1]
-        arg[2,4]=(-0.831891512113)*x[0]**o+(-0.811678751836)*x[0]+(-0.487866621558)*x[1]**o+(0.240951890349)*x[1]
-        arg[3,0]=(0.448249735424)*x[0]**o+(0.0809467993259)*x[0]+(0.232269153692)*x[1]**o+(0.477512628661)*x[1]
-        arg[3,1]=(0.494093407104)*x[0]**o+(0.196761586998)*x[0]+(-0.702155296644)*x[1]**o+(-0.748641693731)*x[1]
-        arg[3,2]=(0.432370067164)*x[0]**o+(-0.365671005874)*x[0]+(0.452009309356)*x[1]**o+(-0.951328172558)*x[1]
-        arg[3,3]=(-0.993290240028)*x[0]**o+(0.172534714933)*x[0]+(0.00917693958413)*x[1]**o+(0.417515657393)*x[1]
-        arg[3,4]=(0.541299019375)*x[0]**o+(0.479118172057)*x[0]+(-0.502475287154)*x[1]**o+(-0.04397899716)*x[1]
-        ref[0,0]=(-0.120967658047)/(o+1.)+(0.213774478371)
-        ref[0,1]=(-0.247665180527)/(o+1.)+(0.360728742109)
-        ref[0,2]=(0.952942144598)/(o+1.)+(0.776292907085)
-        ref[0,3]=(0.500590719646)/(o+1.)+(0.348159601495)
-        ref[0,4]=(-0.591895571605)/(o+1.)+(-0.108089219643)
-        ref[1,0]=(0.132923996358)/(o+1.)+(-0.430844529097)
-        ref[1,1]=(0.602860445788)/(o+1.)+(-0.453595237809)
-        ref[1,2]=(-0.506711580812)/(o+1.)+(-0.447496672161)
-        ref[1,3]=(-0.142890353081)/(o+1.)+(-0.066410374632)
-        ref[1,4]=(-0.593003187492)/(o+1.)+(0.00536110530621)
-        ref[2,0]=(-1.38291499561)/(o+1.)+(0.261966706521)
-        ref[2,1]=(1.27728302385)/(o+1.)+(-0.171841337708)
-        ref[2,2]=(-0.902922671481)/(o+1.)+(-0.425513470846)
-        ref[2,3]=(-1.43181320792)/(o+1.)+(0.505684230881)
-        ref[2,4]=(-1.31975813367)/(o+1.)+(-0.285363430743)
-        ref[3,0]=(0.680518889117)/(o+1.)+(0.279229713993)
-        ref[3,1]=(-0.20806188954)/(o+1.)+(-0.275940053366)
-        ref[3,2]=(0.88437937652)/(o+1.)+(-0.658499589216)
-        ref[3,3]=(-0.984113300443)/(o+1.)+(0.295025186163)
-        ref[3,4]=(0.0388237322207)/(o+1.)+(0.217569587448)
-      else:
-        arg[0,0]=(-0.866239193113)*x[0]**o+(0.479559390215)*x[0]+(0.512920648125)*x[1]**o+(-0.504775214511)*x[1]+(0.462210441279)*x[2]**o+(0.000249131516168)*x[2]
-        arg[0,1]=(-0.11397206495)*x[0]**o+(0.0762933475692)*x[0]+(0.347716642793)*x[1]**o+(0.373262578958)*x[1]+(0.965468442129)*x[2]**o+(-0.743205128452)*x[2]
-        arg[0,2]=(-0.214519408107)*x[0]**o+(-0.663675446512)*x[0]+(-0.424102625804)*x[1]**o+(-0.426644021856)*x[1]+(-0.0731662128704)*x[2]**o+(-0.375185307096)*x[2]
-        arg[0,3]=(0.599595484989)*x[0]**o+(-0.303187098474)*x[0]+(0.278524134467)*x[1]**o+(-0.579432425528)*x[1]+(0.006698672684)*x[2]**o+(-0.820721120517)*x[2]
-        arg[0,4]=(0.538847126305)*x[0]**o+(0.58093792853)*x[0]+(-0.21189097773)*x[1]**o+(0.637101424777)*x[1]+(0.0155994636183)*x[2]**o+(0.488675370945)*x[2]
-        arg[1,0]=(-0.775581481064)*x[0]**o+(-0.968381856562)*x[0]+(-0.660755920498)*x[1]**o+(0.746481830633)*x[1]+(-0.300061615221)*x[2]**o+(-0.720031101537)*x[2]
-        arg[1,1]=(0.990001351802)*x[0]**o+(-0.168997300944)*x[0]+(0.0134555819367)*x[1]**o+(0.969355591009)*x[1]+(-0.347553438064)*x[2]**o+(0.648537935984)*x[2]
-        arg[1,2]=(-0.327760535516)*x[0]**o+(0.517489199537)*x[0]+(-0.0589046196438)*x[1]**o+(-0.893401439507)*x[1]+(-0.0821634552571)*x[2]**o+(0.861266440343)*x[2]
-        arg[1,3]=(-0.808782893446)*x[0]**o+(-0.196363777506)*x[0]+(0.623837845847)*x[1]**o+(-0.05392424847)*x[1]+(0.616011657554)*x[2]**o+(0.800682023434)*x[2]
-        arg[1,4]=(-0.425073222968)*x[0]**o+(-0.635248695204)*x[0]+(0.947222621311)*x[1]**o+(0.253198813179)*x[1]+(-0.907568459712)*x[2]**o+(-0.513049744062)*x[2]
-        arg[2,0]=(-0.103867107528)*x[0]**o+(0.893031214224)*x[0]+(0.151292631908)*x[1]**o+(-0.407189878657)*x[1]+(0.618120612304)*x[2]**o+(0.983992964931)*x[2]
-        arg[2,1]=(0.310432646627)*x[0]**o+(0.235143842057)*x[0]+(0.729683627093)*x[1]**o+(0.891778928523)*x[1]+(-0.148927367367)*x[2]**o+(0.913403960844)*x[2]
-        arg[2,2]=(0.610293692912)*x[0]**o+(-0.28497731539)*x[0]+(-0.926462472232)*x[1]**o+(-0.427657211191)*x[1]+(0.467905160751)*x[2]**o+(0.195578740767)*x[2]
-        arg[2,3]=(0.854869452114)*x[0]**o+(-0.752530632831)*x[0]+(0.0128220565485)*x[1]**o+(-0.726013651836)*x[1]+(-0.0979888078519)*x[2]**o+(-0.658955703807)*x[2]
-        arg[2,4]=(0.536447848289)*x[0]**o+(-0.658205406579)*x[0]+(0.66427484293)*x[1]**o+(-0.250014589496)*x[1]+(-0.0654257159073)*x[2]**o+(0.538196496913)*x[2]
-        arg[3,0]=(-0.514665034974)*x[0]**o+(-0.278189747423)*x[0]+(0.402996329453)*x[1]**o+(-0.0362969716175)*x[1]+(-0.707890815004)*x[2]**o+(-0.298762865096)*x[2]
-        arg[3,1]=(0.7342439327)*x[0]**o+(-0.387336714116)*x[0]+(-0.67888634151)*x[1]**o+(0.647322640846)*x[1]+(-0.0346274738413)*x[2]**o+(0.985950301913)*x[2]
-        arg[3,2]=(0.687555064124)*x[0]**o+(0.345506248144)*x[0]+(0.658692258064)*x[1]**o+(0.810796031447)*x[1]+(0.102608006398)*x[2]**o+(0.349877767777)*x[2]
-        arg[3,3]=(-0.456241806837)*x[0]**o+(-0.181224535865)*x[0]+(0.401842456169)*x[1]**o+(-0.413936620519)*x[1]+(0.436794604974)*x[2]**o+(0.95051042082)*x[2]
-        arg[3,4]=(-0.330739393408)*x[0]**o+(-0.261876658969)*x[0]+(0.287474017623)*x[1]**o+(0.463691723118)*x[1]+(0.757597823206)*x[2]**o+(0.49336246207)*x[2]
-        ref[0,0]=(0.108891896292)/(o+1.)+(-0.01248334639)
-        ref[0,1]=(1.19921301997)/(o+1.)+(-0.146824600962)
-        ref[0,2]=(-0.711788246781)/(o+1.)+(-0.732752387732)
-        ref[0,3]=(0.88481829214)/(o+1.)+(-0.85167032226)
-        ref[0,4]=(0.342555612194)/(o+1.)+(0.853357362126)
-        ref[1,0]=(-1.73639901678)/(o+1.)+(-0.470965563733)
-        ref[1,1]=(0.655903495675)/(o+1.)+(0.724448113024)
-        ref[1,2]=(-0.468828610417)/(o+1.)+(0.242677100186)
-        ref[1,3]=(0.431066609955)/(o+1.)+(0.275196998729)
-        ref[1,4]=(-0.385419061368)/(o+1.)+(-0.447549813044)
-        ref[2,0]=(0.665546136685)/(o+1.)+(0.734917150249)
-        ref[2,1]=(0.891188906354)/(o+1.)+(1.02016336571)
-        ref[2,2]=(0.151736381432)/(o+1.)+(-0.258527892907)
-        ref[2,3]=(0.76970270081)/(o+1.)+(-1.06874999424)
-        ref[2,4]=(1.13529697531)/(o+1.)+(-0.185011749581)
-        ref[3,0]=(-0.819559520525)/(o+1.)+(-0.306624792068)
-        ref[3,1]=(0.020730117348)/(o+1.)+(0.622968114321)
-        ref[3,2]=(1.44885532859)/(o+1.)+(0.753090023684)
-        ref[3,3]=(0.382395254306)/(o+1.)+(0.177674632218)
-        ref[3,4]=(0.714332447421)/(o+1.)+(0.34758876311)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.779261125448)*x[0]**o+(-0.640503838419)*x[0]+(0.589085035572)*x[1]**o+(-0.0426687544445)*x[1]
-        arg[0,0,1]=(-0.419361292473)*x[0]**o+(0.0850684591011)*x[0]+(-0.440758336688)*x[1]**o+(0.151015611594)*x[1]
-        arg[0,1,0]=(-0.727043966709)*x[0]**o+(0.711730063365)*x[0]+(0.657759819512)*x[1]**o+(-0.210981156609)*x[1]
-        arg[0,1,1]=(-0.276491768644)*x[0]**o+(-0.324865684188)*x[0]+(-0.921856877627)*x[1]**o+(-0.246833902926)*x[1]
-        arg[1,0,0]=(0.720541615152)*x[0]**o+(-0.0406851820986)*x[0]+(0.33976001267)*x[1]**o+(0.937989079378)*x[1]
-        arg[1,0,1]=(0.239272962875)*x[0]**o+(0.482026352856)*x[0]+(0.159148474482)*x[1]**o+(0.680831564145)*x[1]
-        arg[1,1,0]=(0.55170300456)*x[0]**o+(-0.261357073238)*x[0]+(0.298185649596)*x[1]**o+(-0.540598468483)*x[1]
-        arg[1,1,1]=(0.508262701362)*x[0]**o+(-0.531692643817)*x[0]+(0.151424571021)*x[1]**o+(-0.77488755481)*x[1]
-        arg[2,0,0]=(0.265201389846)*x[0]**o+(0.377300848247)*x[0]+(0.0402148688087)*x[1]**o+(0.0263806695524)*x[1]
-        arg[2,0,1]=(0.321397565411)*x[0]**o+(-0.277650913698)*x[0]+(0.909430556637)*x[1]**o+(-0.43244155765)*x[1]
-        arg[2,1,0]=(-0.671417887851)*x[0]**o+(-0.772328065901)*x[0]+(0.0896878386442)*x[1]**o+(0.584773963567)*x[1]
-        arg[2,1,1]=(0.318995094412)*x[0]**o+(-0.396578444213)*x[0]+(-0.627767362562)*x[1]**o+(-0.588717342984)*x[1]
-        arg[3,0,0]=(-0.154999830633)*x[0]**o+(-0.263434767944)*x[0]+(0.0704862479101)*x[1]**o+(0.216237505495)*x[1]
-        arg[3,0,1]=(0.956868643095)*x[0]**o+(-0.0331644426873)*x[0]+(-0.236340025853)*x[1]**o+(-0.814705425837)*x[1]
-        arg[3,1,0]=(-0.477985064084)*x[0]**o+(-0.368896833289)*x[0]+(0.208122873207)*x[1]**o+(-0.566525593432)*x[1]
-        arg[3,1,1]=(-0.299257275248)*x[0]**o+(0.937022356746)*x[0]+(0.671724793932)*x[1]**o+(0.80705820341)*x[1]
-        arg[4,0,0]=(0.857855249735)*x[0]**o+(0.537756541143)*x[0]+(0.611784225987)*x[1]**o+(0.944061991186)*x[1]
-        arg[4,0,1]=(0.825779290308)*x[0]**o+(-0.636461636739)*x[0]+(-0.382007450888)*x[1]**o+(0.170178262303)*x[1]
-        arg[4,1,0]=(0.275666857657)*x[0]**o+(-0.404983003194)*x[0]+(0.476932065223)*x[1]**o+(0.931645726493)*x[1]
-        arg[4,1,1]=(0.956182179652)*x[0]**o+(0.543482655321)*x[0]+(0.60492494312)*x[1]**o+(0.384497838341)*x[1]
-        arg[5,0,0]=(0.476937368598)*x[0]**o+(-0.588434801718)*x[0]+(0.865080125217)*x[1]**o+(-0.954493375041)*x[1]
-        arg[5,0,1]=(0.151850214007)*x[0]**o+(0.252651124764)*x[0]+(-0.570132867968)*x[1]**o+(-0.0885902498736)*x[1]
-        arg[5,1,0]=(-0.69330471578)*x[0]**o+(0.165874518143)*x[0]+(-0.610503496045)*x[1]**o+(-0.871951964138)*x[1]
-        arg[5,1,1]=(-0.539191264945)*x[0]**o+(0.558474736927)*x[0]+(0.752045569996)*x[1]**o+(-0.5305308467)*x[1]
-        ref[0,0,0]=(1.36834616102)/(o+1.)+(-0.341586296432)
-        ref[0,0,1]=(-0.860119629161)/(o+1.)+(0.118042035348)
-        ref[0,1,0]=(-0.0692841471964)/(o+1.)+(0.250374453378)
-        ref[0,1,1]=(-1.19834864627)/(o+1.)+(-0.285849793557)
-        ref[1,0,0]=(1.06030162782)/(o+1.)+(0.448651948639)
-        ref[1,0,1]=(0.398421437357)/(o+1.)+(0.5814289585)
-        ref[1,1,0]=(0.849888654155)/(o+1.)+(-0.400977770861)
-        ref[1,1,1]=(0.659687272383)/(o+1.)+(-0.653290099314)
-        ref[2,0,0]=(0.305416258655)/(o+1.)+(0.2018407589)
-        ref[2,0,1]=(1.23082812205)/(o+1.)+(-0.355046235674)
-        ref[2,1,0]=(-0.581730049206)/(o+1.)+(-0.0937770511668)
-        ref[2,1,1]=(-0.30877226815)/(o+1.)+(-0.492647893598)
-        ref[3,0,0]=(-0.0845135827233)/(o+1.)+(-0.0235986312242)
-        ref[3,0,1]=(0.720528617241)/(o+1.)+(-0.423934934262)
-        ref[3,1,0]=(-0.269862190877)/(o+1.)+(-0.46771121336)
-        ref[3,1,1]=(0.372467518684)/(o+1.)+(0.872040280078)
-        ref[4,0,0]=(1.46963947572)/(o+1.)+(0.740909266165)
-        ref[4,0,1]=(0.44377183942)/(o+1.)+(-0.233141687218)
-        ref[4,1,0]=(0.75259892288)/(o+1.)+(0.26333136165)
-        ref[4,1,1]=(1.56110712277)/(o+1.)+(0.463990246831)
-        ref[5,0,0]=(1.34201749382)/(o+1.)+(-0.771464088379)
-        ref[5,0,1]=(-0.418282653961)/(o+1.)+(0.0820304374451)
-        ref[5,1,0]=(-1.30380821182)/(o+1.)+(-0.353038722997)
-        ref[5,1,1]=(0.212854305051)/(o+1.)+(0.0139719451134)
-      else:
-        arg[0,0,0]=(-0.825926001774)*x[0]**o+(0.418049316138)*x[0]+(0.668695279849)*x[1]**o+(-0.7323605258)*x[1]+(-0.637717742224)*x[2]**o+(0.257065974143)*x[2]
-        arg[0,0,1]=(-0.169779448443)*x[0]**o+(-0.648612931029)*x[0]+(-0.643814352995)*x[1]**o+(0.396704595574)*x[1]+(-0.248766540261)*x[2]**o+(-0.736410673282)*x[2]
-        arg[0,1,0]=(-0.371929441192)*x[0]**o+(0.438661796459)*x[0]+(-0.893450426264)*x[1]**o+(0.643494077636)*x[1]+(0.252099102122)*x[2]**o+(-0.0857798075076)*x[2]
-        arg[0,1,1]=(0.336251711034)*x[0]**o+(-0.317426111079)*x[0]+(-0.801221986791)*x[1]**o+(0.281123033042)*x[1]+(0.921153543163)*x[2]**o+(0.497003835923)*x[2]
-        arg[1,0,0]=(0.40897311872)*x[0]**o+(0.326894801733)*x[0]+(0.216268807497)*x[1]**o+(0.946235364974)*x[1]+(-0.480995485096)*x[2]**o+(0.869772937982)*x[2]
-        arg[1,0,1]=(0.108715554449)*x[0]**o+(0.0847529231253)*x[0]+(0.866120965844)*x[1]**o+(0.43989772616)*x[1]+(0.67962061792)*x[2]**o+(0.90311988632)*x[2]
-        arg[1,1,0]=(0.28571484173)*x[0]**o+(0.593050819853)*x[0]+(-0.384864010146)*x[1]**o+(-0.57920566259)*x[1]+(-0.304024223769)*x[2]**o+(-0.0279518764989)*x[2]
-        arg[1,1,1]=(0.249126658892)*x[0]**o+(0.243355410215)*x[0]+(0.154816978135)*x[1]**o+(-0.260343533153)*x[1]+(-0.973133787852)*x[2]**o+(0.752545508531)*x[2]
-        arg[2,0,0]=(0.103612497259)*x[0]**o+(0.0919234144108)*x[0]+(0.416394965635)*x[1]**o+(-0.0132359939268)*x[1]+(-0.522775855178)*x[2]**o+(-0.985811066906)*x[2]
-        arg[2,0,1]=(-0.592641488144)*x[0]**o+(0.703703144485)*x[0]+(-0.0149046721584)*x[1]**o+(0.220368283581)*x[1]+(-0.656858164281)*x[2]**o+(0.165951102113)*x[2]
-        arg[2,1,0]=(0.309492848012)*x[0]**o+(-0.301037623847)*x[0]+(-0.224814259669)*x[1]**o+(-0.950794406688)*x[1]+(-0.296088293363)*x[2]**o+(-0.712930293168)*x[2]
-        arg[2,1,1]=(0.0592633594166)*x[0]**o+(-0.179007619512)*x[0]+(-0.922169690831)*x[1]**o+(-0.778228075089)*x[1]+(-0.135749453777)*x[2]**o+(-0.146265051618)*x[2]
-        arg[3,0,0]=(-0.71773633584)*x[0]**o+(0.471551385738)*x[0]+(-0.041415831943)*x[1]**o+(0.343380640343)*x[1]+(-0.211821446187)*x[2]**o+(-0.661201893183)*x[2]
-        arg[3,0,1]=(-0.159071045836)*x[0]**o+(0.216715127143)*x[0]+(-0.846847485213)*x[1]**o+(0.662226888693)*x[1]+(0.050806337433)*x[2]**o+(0.744071347051)*x[2]
-        arg[3,1,0]=(-0.363431877105)*x[0]**o+(-0.461513470653)*x[0]+(-0.130947882739)*x[1]**o+(-0.624729599981)*x[1]+(0.778572567699)*x[2]**o+(0.324584316744)*x[2]
-        arg[3,1,1]=(0.395432262346)*x[0]**o+(0.826450301981)*x[0]+(0.176721657975)*x[1]**o+(-0.370954952405)*x[1]+(-0.708437370609)*x[2]**o+(-0.150075114354)*x[2]
-        arg[4,0,0]=(-0.18662583335)*x[0]**o+(-0.0120831234457)*x[0]+(0.805686139762)*x[1]**o+(0.30195413136)*x[1]+(0.648067854031)*x[2]**o+(0.28073240632)*x[2]
-        arg[4,0,1]=(-0.913625644854)*x[0]**o+(-0.264637827098)*x[0]+(-0.6531590441)*x[1]**o+(0.396422722623)*x[1]+(0.280591271146)*x[2]**o+(0.498346191707)*x[2]
-        arg[4,1,0]=(0.208029597907)*x[0]**o+(-0.295747909396)*x[0]+(-0.541509895186)*x[1]**o+(-0.511394562575)*x[1]+(-0.459197562982)*x[2]**o+(-0.749433614666)*x[2]
-        arg[4,1,1]=(-0.29700028905)*x[0]**o+(-0.590932598278)*x[0]+(0.36219700213)*x[1]**o+(0.482759242709)*x[1]+(-0.135696240971)*x[2]**o+(0.49658807849)*x[2]
-        arg[5,0,0]=(-0.800345624219)*x[0]**o+(0.259709746207)*x[0]+(0.480073493816)*x[1]**o+(0.499332550127)*x[1]+(0.691794186846)*x[2]**o+(-0.319369042249)*x[2]
-        arg[5,0,1]=(0.300879052118)*x[0]**o+(-0.985396817441)*x[0]+(0.971136879002)*x[1]**o+(0.806560091745)*x[1]+(0.361308859099)*x[2]**o+(0.264277089732)*x[2]
-        arg[5,1,0]=(0.271857906548)*x[0]**o+(0.338260411675)*x[0]+(-0.170292665803)*x[1]**o+(0.675491566142)*x[1]+(0.897921755421)*x[2]**o+(-0.829233864443)*x[2]
-        arg[5,1,1]=(0.673366845241)*x[0]**o+(0.121940550422)*x[0]+(0.116054155545)*x[1]**o+(0.0456556938689)*x[1]+(-0.978127590673)*x[2]**o+(0.180985351995)*x[2]
-        ref[0,0,0]=(-0.794948464148)/(o+1.)+(-0.0286226177598)
-        ref[0,0,1]=(-1.0623603417)/(o+1.)+(-0.494159504368)
-        ref[0,1,0]=(-1.01328076533)/(o+1.)+(0.498188033294)
-        ref[0,1,1]=(0.456183267406)/(o+1.)+(0.230350378943)
-        ref[1,0,0]=(0.144246441122)/(o+1.)+(1.07145155234)
-        ref[1,0,1]=(1.65445713821)/(o+1.)+(0.713885267803)
-        ref[1,1,0]=(-0.403173392185)/(o+1.)+(-0.0070533596178)
-        ref[1,1,1]=(-0.569190150825)/(o+1.)+(0.367778692797)
-        ref[2,0,0]=(-0.00276839228366)/(o+1.)+(-0.453561823211)
-        ref[2,0,1]=(-1.26440432458)/(o+1.)+(0.545011265089)
-        ref[2,1,0]=(-0.21140970502)/(o+1.)+(-0.982381161851)
-        ref[2,1,1]=(-0.998655785191)/(o+1.)+(-0.55175037311)
-        ref[3,0,0]=(-0.97097361397)/(o+1.)+(0.0768650664488)
-        ref[3,0,1]=(-0.955112193616)/(o+1.)+(0.811506681444)
-        ref[3,1,0]=(0.284192807855)/(o+1.)+(-0.380829376946)
-        ref[3,1,1]=(-0.136283450288)/(o+1.)+(0.152710117611)
-        ref[4,0,0]=(1.26712816044)/(o+1.)+(0.285301707117)
-        ref[4,0,1]=(-1.28619341781)/(o+1.)+(0.315065543616)
-        ref[4,1,0]=(-0.792677860261)/(o+1.)+(-0.778288043318)
-        ref[4,1,1]=(-0.0704995278906)/(o+1.)+(0.194207361461)
-        ref[5,0,0]=(0.371522056443)/(o+1.)+(0.219836627043)
-        ref[5,0,1]=(1.63332479022)/(o+1.)+(0.0427201820182)
-        ref[5,1,0]=(0.999486996166)/(o+1.)+(0.0922590566873)
-        ref[5,1,1]=(-0.188706589887)/(o+1.)+(0.174290798143)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.647932589381)*x[0]**o+(-0.092686685918)*x[0]+(0.167888464541)*x[1]**o+(0.698445840627)*x[1]
-        arg[0,0,0,1]=(0.413204959658)*x[0]**o+(0.772926029512)*x[0]+(-0.63702948026)*x[1]**o+(0.608392823861)*x[1]
-        arg[0,0,1,0]=(0.303506932052)*x[0]**o+(0.650309664063)*x[0]+(-0.805238344485)*x[1]**o+(-0.62971680995)*x[1]
-        arg[0,0,1,1]=(-0.205701190736)*x[0]**o+(-0.0834042840814)*x[0]+(-0.525839398431)*x[1]**o+(0.779973223005)*x[1]
-        arg[0,0,2,0]=(-0.97954633631)*x[0]**o+(-0.298973871114)*x[0]+(0.858022652298)*x[1]**o+(0.667671796632)*x[1]
-        arg[0,0,2,1]=(-0.790133712345)*x[0]**o+(-0.733743414808)*x[0]+(0.337185148145)*x[1]**o+(-0.927853051244)*x[1]
-        arg[0,1,0,0]=(0.617198112458)*x[0]**o+(0.70438849416)*x[0]+(-0.861661596364)*x[1]**o+(-0.251796116219)*x[1]
-        arg[0,1,0,1]=(0.37107453636)*x[0]**o+(-0.490440661153)*x[0]+(0.849252675242)*x[1]**o+(-0.896547775077)*x[1]
-        arg[0,1,1,0]=(0.375080744007)*x[0]**o+(-0.609557663503)*x[0]+(-0.930846980977)*x[1]**o+(0.0623096843381)*x[1]
-        arg[0,1,1,1]=(-0.809863615805)*x[0]**o+(-0.999724521803)*x[0]+(0.493027030633)*x[1]**o+(-0.672546253752)*x[1]
-        arg[0,1,2,0]=(0.219294077412)*x[0]**o+(-0.7854819847)*x[0]+(-0.353026321798)*x[1]**o+(-0.965348418509)*x[1]
-        arg[0,1,2,1]=(0.177236321722)*x[0]**o+(-0.860491592895)*x[0]+(-0.458724268899)*x[1]**o+(-0.476508229653)*x[1]
-        arg[0,2,0,0]=(0.0760611767074)*x[0]**o+(-0.00296398964042)*x[0]+(-0.972843039436)*x[1]**o+(-0.0422057743881)*x[1]
-        arg[0,2,0,1]=(-0.926737777701)*x[0]**o+(-0.895791593378)*x[0]+(-0.776529150964)*x[1]**o+(0.557115706978)*x[1]
-        arg[0,2,1,0]=(0.353264702858)*x[0]**o+(0.632583933138)*x[0]+(-0.354112684469)*x[1]**o+(0.0541346174117)*x[1]
-        arg[0,2,1,1]=(-0.124181989217)*x[0]**o+(-0.803262099858)*x[0]+(0.733246361984)*x[1]**o+(0.0639821744038)*x[1]
-        arg[0,2,2,0]=(-0.446733845136)*x[0]**o+(-0.187373171381)*x[0]+(-0.312309043572)*x[1]**o+(0.830789380477)*x[1]
-        arg[0,2,2,1]=(0.403889932995)*x[0]**o+(-0.243474625233)*x[0]+(0.35707779102)*x[1]**o+(0.29725421988)*x[1]
-        arg[0,3,0,0]=(-0.856376546696)*x[0]**o+(0.448431504377)*x[0]+(-0.535187100108)*x[1]**o+(-0.90994242894)*x[1]
-        arg[0,3,0,1]=(-0.321475754775)*x[0]**o+(0.0389358177737)*x[0]+(-0.0949733279735)*x[1]**o+(0.921937240884)*x[1]
-        arg[0,3,1,0]=(0.591276336387)*x[0]**o+(-0.598236438303)*x[0]+(-0.829829995185)*x[1]**o+(0.539669346291)*x[1]
-        arg[0,3,1,1]=(-0.944726366074)*x[0]**o+(-0.796928273271)*x[0]+(-0.424606656681)*x[1]**o+(0.35341306063)*x[1]
-        arg[0,3,2,0]=(-0.850914599406)*x[0]**o+(0.791179202404)*x[0]+(-0.0220845565851)*x[1]**o+(0.594756136957)*x[1]
-        arg[0,3,2,1]=(0.355862680641)*x[0]**o+(0.134261680432)*x[0]+(0.477798827075)*x[1]**o+(0.508452338499)*x[1]
-        arg[0,4,0,0]=(0.481974944781)*x[0]**o+(0.259271175551)*x[0]+(0.953827692515)*x[1]**o+(0.364160709544)*x[1]
-        arg[0,4,0,1]=(-0.316627315143)*x[0]**o+(-0.856616735533)*x[0]+(0.308508314695)*x[1]**o+(-0.677602758367)*x[1]
-        arg[0,4,1,0]=(-0.76069824745)*x[0]**o+(0.282351651183)*x[0]+(-0.15964276552)*x[1]**o+(-0.344276428838)*x[1]
-        arg[0,4,1,1]=(9.00669303738e-05)*x[0]**o+(0.948498888115)*x[0]+(0.690370267333)*x[1]**o+(0.619119188327)*x[1]
-        arg[0,4,2,0]=(0.957692561039)*x[0]**o+(-0.147005436631)*x[0]+(-0.177840574215)*x[1]**o+(-0.28259452614)*x[1]
-        arg[0,4,2,1]=(-0.431771943451)*x[0]**o+(-0.158132166651)*x[0]+(-0.134385316147)*x[1]**o+(0.751243590835)*x[1]
-        arg[1,0,0,0]=(-0.816841420645)*x[0]**o+(0.55608373851)*x[0]+(-0.885838014201)*x[1]**o+(-0.467159163867)*x[1]
-        arg[1,0,0,1]=(-0.543361117401)*x[0]**o+(0.329490019675)*x[0]+(0.942703992489)*x[1]**o+(-0.261273838803)*x[1]
-        arg[1,0,1,0]=(0.865108106801)*x[0]**o+(-0.376972427024)*x[0]+(-0.0257304693919)*x[1]**o+(0.694210909726)*x[1]
-        arg[1,0,1,1]=(0.428354498121)*x[0]**o+(0.962704601892)*x[0]+(-0.442636806139)*x[1]**o+(0.424724924149)*x[1]
-        arg[1,0,2,0]=(-0.157277242299)*x[0]**o+(0.487588443251)*x[0]+(-0.813089096341)*x[1]**o+(0.0406316718829)*x[1]
-        arg[1,0,2,1]=(0.345322702588)*x[0]**o+(0.224429042659)*x[0]+(-0.24109926586)*x[1]**o+(0.433141241931)*x[1]
-        arg[1,1,0,0]=(0.956901263519)*x[0]**o+(0.48418062914)*x[0]+(0.14089030013)*x[1]**o+(-0.492352201717)*x[1]
-        arg[1,1,0,1]=(-0.679781695411)*x[0]**o+(0.29857196636)*x[0]+(-0.234968984185)*x[1]**o+(0.114575919411)*x[1]
-        arg[1,1,1,0]=(0.488378272934)*x[0]**o+(-0.358508327343)*x[0]+(-0.337958846849)*x[1]**o+(0.189303452912)*x[1]
-        arg[1,1,1,1]=(-0.506993859574)*x[0]**o+(-0.682478021258)*x[0]+(-0.540344338899)*x[1]**o+(0.366965535976)*x[1]
-        arg[1,1,2,0]=(-0.681151638572)*x[0]**o+(0.790837550009)*x[0]+(-0.810785716023)*x[1]**o+(-0.00739097962416)*x[1]
-        arg[1,1,2,1]=(-0.355290573677)*x[0]**o+(-0.263294580108)*x[0]+(0.10469018402)*x[1]**o+(-0.650388283116)*x[1]
-        arg[1,2,0,0]=(0.906212689905)*x[0]**o+(-0.673956103538)*x[0]+(0.305335278934)*x[1]**o+(-0.0805949628719)*x[1]
-        arg[1,2,0,1]=(-0.98311373852)*x[0]**o+(-0.165316704542)*x[0]+(0.197637770603)*x[1]**o+(0.647989184342)*x[1]
-        arg[1,2,1,0]=(0.415990736251)*x[0]**o+(-0.710476520822)*x[0]+(0.791512786296)*x[1]**o+(-0.10853188742)*x[1]
-        arg[1,2,1,1]=(0.04337234954)*x[0]**o+(0.595650094449)*x[0]+(0.228098665648)*x[1]**o+(-0.868930899722)*x[1]
-        arg[1,2,2,0]=(-0.791842482688)*x[0]**o+(-0.611246387621)*x[0]+(0.0504978789412)*x[1]**o+(0.624626300694)*x[1]
-        arg[1,2,2,1]=(0.0207375595263)*x[0]**o+(0.560638072838)*x[0]+(0.44126312508)*x[1]**o+(0.169151353084)*x[1]
-        arg[1,3,0,0]=(-0.0512069089279)*x[0]**o+(0.51110271913)*x[0]+(0.0785633458626)*x[1]**o+(0.836821453174)*x[1]
-        arg[1,3,0,1]=(0.185737468851)*x[0]**o+(0.516071031227)*x[0]+(0.0995388802342)*x[1]**o+(0.25527909092)*x[1]
-        arg[1,3,1,0]=(0.318240681435)*x[0]**o+(-0.442725217398)*x[0]+(0.533066616909)*x[1]**o+(0.679570707339)*x[1]
-        arg[1,3,1,1]=(0.353367397644)*x[0]**o+(-0.396487189861)*x[0]+(-0.117773711001)*x[1]**o+(0.885897675293)*x[1]
-        arg[1,3,2,0]=(-0.647645988694)*x[0]**o+(-0.755258662164)*x[0]+(0.288300257472)*x[1]**o+(0.505342385389)*x[1]
-        arg[1,3,2,1]=(0.000781386924262)*x[0]**o+(0.190244787656)*x[0]+(0.589388834071)*x[1]**o+(0.669705413859)*x[1]
-        arg[1,4,0,0]=(0.320107896841)*x[0]**o+(0.673508197912)*x[0]+(0.667026895874)*x[1]**o+(-0.818578971562)*x[1]
-        arg[1,4,0,1]=(-0.226755915796)*x[0]**o+(0.71800207991)*x[0]+(0.850490212043)*x[1]**o+(0.261708964138)*x[1]
-        arg[1,4,1,0]=(-0.0147350282361)*x[0]**o+(0.743889536542)*x[0]+(-0.898802067607)*x[1]**o+(0.711589170571)*x[1]
-        arg[1,4,1,1]=(-0.816145493818)*x[0]**o+(0.405931568806)*x[0]+(0.159156576579)*x[1]**o+(0.143576116984)*x[1]
-        arg[1,4,2,0]=(0.994791165013)*x[0]**o+(0.65054901122)*x[0]+(0.039218059733)*x[1]**o+(-0.662978657934)*x[1]
-        arg[1,4,2,1]=(-0.792277825616)*x[0]**o+(-0.257224872111)*x[0]+(-0.244502392787)*x[1]**o+(-0.276042189495)*x[1]
-        arg[2,0,0,0]=(0.133211578016)*x[0]**o+(0.10029141733)*x[0]+(-0.52480547182)*x[1]**o+(0.814652707336)*x[1]
-        arg[2,0,0,1]=(0.836429340685)*x[0]**o+(-0.837709322969)*x[0]+(-0.442953015462)*x[1]**o+(-0.984757344044)*x[1]
-        arg[2,0,1,0]=(0.893738853578)*x[0]**o+(-0.238050980408)*x[0]+(-0.913668527302)*x[1]**o+(0.895136777323)*x[1]
-        arg[2,0,1,1]=(-0.0457361766611)*x[0]**o+(0.414814798208)*x[0]+(-0.57261759439)*x[1]**o+(-0.358969048076)*x[1]
-        arg[2,0,2,0]=(-0.320394419991)*x[0]**o+(-0.990129952721)*x[0]+(0.890888895016)*x[1]**o+(0.241063301452)*x[1]
-        arg[2,0,2,1]=(-0.604164679932)*x[0]**o+(-0.598939404114)*x[0]+(-0.606633388454)*x[1]**o+(-0.666879580873)*x[1]
-        arg[2,1,0,0]=(0.68515547034)*x[0]**o+(0.892247437859)*x[0]+(0.642003383991)*x[1]**o+(0.569240970392)*x[1]
-        arg[2,1,0,1]=(0.918713108587)*x[0]**o+(0.865547962284)*x[0]+(0.517952260633)*x[1]**o+(-0.307334010857)*x[1]
-        arg[2,1,1,0]=(0.353382468404)*x[0]**o+(-0.542718692644)*x[0]+(-0.957182863451)*x[1]**o+(-0.889352632225)*x[1]
-        arg[2,1,1,1]=(0.505185847817)*x[0]**o+(-0.71137143775)*x[0]+(0.853785404375)*x[1]**o+(-0.731028307335)*x[1]
-        arg[2,1,2,0]=(-0.0805774093876)*x[0]**o+(0.949831911897)*x[0]+(0.511009248375)*x[1]**o+(-0.0192710206538)*x[1]
-        arg[2,1,2,1]=(-0.987709862593)*x[0]**o+(-0.536077508064)*x[0]+(-0.0726882784026)*x[1]**o+(-0.27275457372)*x[1]
-        arg[2,2,0,0]=(0.271001953238)*x[0]**o+(0.0446246860776)*x[0]+(0.103657462724)*x[1]**o+(0.359900072694)*x[1]
-        arg[2,2,0,1]=(0.613460277623)*x[0]**o+(-0.23324730519)*x[0]+(0.188458167579)*x[1]**o+(-0.574087648909)*x[1]
-        arg[2,2,1,0]=(-0.787444207567)*x[0]**o+(0.143772612473)*x[0]+(-0.720451072166)*x[1]**o+(0.936819171338)*x[1]
-        arg[2,2,1,1]=(-0.219701379296)*x[0]**o+(-0.343100221149)*x[0]+(-0.972737482064)*x[1]**o+(-0.614208415137)*x[1]
-        arg[2,2,2,0]=(0.0292070295438)*x[0]**o+(-0.694263454424)*x[0]+(0.188064440036)*x[1]**o+(0.0901763471697)*x[1]
-        arg[2,2,2,1]=(0.407629585245)*x[0]**o+(-0.745619322197)*x[0]+(0.949044983116)*x[1]**o+(-0.316057288128)*x[1]
-        arg[2,3,0,0]=(0.124212182643)*x[0]**o+(0.621703244759)*x[0]+(-0.0592136772296)*x[1]**o+(0.571981450786)*x[1]
-        arg[2,3,0,1]=(-0.683989210442)*x[0]**o+(-0.318774594157)*x[0]+(0.850235115277)*x[1]**o+(-0.871075179838)*x[1]
-        arg[2,3,1,0]=(0.478657634044)*x[0]**o+(-0.43702074673)*x[0]+(0.535572237843)*x[1]**o+(0.22354698199)*x[1]
-        arg[2,3,1,1]=(0.0391087869133)*x[0]**o+(0.765140505702)*x[0]+(-0.66279875624)*x[1]**o+(-0.41964006149)*x[1]
-        arg[2,3,2,0]=(-0.11123799186)*x[0]**o+(0.533398540082)*x[0]+(-0.931488199925)*x[1]**o+(-0.83080969281)*x[1]
-        arg[2,3,2,1]=(-0.138259313941)*x[0]**o+(-0.508937684332)*x[0]+(0.583603445711)*x[1]**o+(-0.0782724872225)*x[1]
-        arg[2,4,0,0]=(-0.316223936951)*x[0]**o+(0.329776289164)*x[0]+(-0.692491559115)*x[1]**o+(0.814572730294)*x[1]
-        arg[2,4,0,1]=(0.74890960681)*x[0]**o+(-0.79167945549)*x[0]+(0.175328119487)*x[1]**o+(-0.253003240064)*x[1]
-        arg[2,4,1,0]=(0.657827625141)*x[0]**o+(-0.268878597055)*x[0]+(0.247374286921)*x[1]**o+(0.414500041415)*x[1]
-        arg[2,4,1,1]=(-0.187587046202)*x[0]**o+(-0.594983066039)*x[0]+(-0.203784406879)*x[1]**o+(0.122237566739)*x[1]
-        arg[2,4,2,0]=(0.671210794607)*x[0]**o+(0.886706498415)*x[0]+(-0.368997114212)*x[1]**o+(0.0418311781187)*x[1]
-        arg[2,4,2,1]=(-0.272424416171)*x[0]**o+(-0.537477247783)*x[0]+(0.0405655834868)*x[1]**o+(-0.179684833703)*x[1]
-        arg[3,0,0,0]=(0.457602964193)*x[0]**o+(-0.186625111516)*x[0]+(-0.75244105343)*x[1]**o+(-0.278893445377)*x[1]
-        arg[3,0,0,1]=(-0.690378721784)*x[0]**o+(0.0157608350188)*x[0]+(-0.203765434813)*x[1]**o+(0.69771096957)*x[1]
-        arg[3,0,1,0]=(-0.884824688493)*x[0]**o+(0.26613451569)*x[0]+(0.226081491639)*x[1]**o+(0.597724298389)*x[1]
-        arg[3,0,1,1]=(0.0372124540969)*x[0]**o+(-0.420242551812)*x[0]+(-0.625683613012)*x[1]**o+(0.279682305563)*x[1]
-        arg[3,0,2,0]=(-0.570873872458)*x[0]**o+(-0.82361574923)*x[0]+(0.970204188337)*x[1]**o+(-0.242725003569)*x[1]
-        arg[3,0,2,1]=(-0.714826095124)*x[0]**o+(-0.334939427182)*x[0]+(-0.730058530908)*x[1]**o+(0.287148154312)*x[1]
-        arg[3,1,0,0]=(0.164234307274)*x[0]**o+(-0.388849394356)*x[0]+(0.391518896617)*x[1]**o+(0.00142750126236)*x[1]
-        arg[3,1,0,1]=(-0.327700781196)*x[0]**o+(0.0442604682565)*x[0]+(-0.683834466536)*x[1]**o+(-0.665567774985)*x[1]
-        arg[3,1,1,0]=(0.135979934041)*x[0]**o+(-0.822614011173)*x[0]+(-0.946061768113)*x[1]**o+(-0.585442102671)*x[1]
-        arg[3,1,1,1]=(0.235568769871)*x[0]**o+(0.738233870703)*x[0]+(0.437750339594)*x[1]**o+(-0.44521724321)*x[1]
-        arg[3,1,2,0]=(0.449256898185)*x[0]**o+(-0.464211755196)*x[0]+(0.616886411002)*x[1]**o+(0.885500269963)*x[1]
-        arg[3,1,2,1]=(0.0851105760559)*x[0]**o+(0.888976499957)*x[0]+(0.0842441111314)*x[1]**o+(-0.366994083394)*x[1]
-        arg[3,2,0,0]=(0.77120050858)*x[0]**o+(0.354835584949)*x[0]+(0.406813878866)*x[1]**o+(-0.600042478179)*x[1]
-        arg[3,2,0,1]=(-0.747876879184)*x[0]**o+(0.527204926634)*x[0]+(0.134965492713)*x[1]**o+(0.497662739459)*x[1]
-        arg[3,2,1,0]=(0.367550591163)*x[0]**o+(-0.700608509353)*x[0]+(0.0737696587931)*x[1]**o+(-0.164466899816)*x[1]
-        arg[3,2,1,1]=(0.0908791429433)*x[0]**o+(-0.168468767791)*x[0]+(0.85978873292)*x[1]**o+(-0.785241412884)*x[1]
-        arg[3,2,2,0]=(-0.296455818292)*x[0]**o+(-0.0277004420512)*x[0]+(0.409183414933)*x[1]**o+(-0.879831945543)*x[1]
-        arg[3,2,2,1]=(0.971512010223)*x[0]**o+(-0.811249982262)*x[0]+(-0.846549204737)*x[1]**o+(0.689986186691)*x[1]
-        arg[3,3,0,0]=(-0.800235545702)*x[0]**o+(-0.796021196346)*x[0]+(-0.0660744375539)*x[1]**o+(-0.826632192842)*x[1]
-        arg[3,3,0,1]=(0.305678237361)*x[0]**o+(0.203936000462)*x[0]+(-0.583171879217)*x[1]**o+(0.924112859119)*x[1]
-        arg[3,3,1,0]=(-0.937148913762)*x[0]**o+(-0.172547991203)*x[0]+(0.928491154238)*x[1]**o+(-0.502876301351)*x[1]
-        arg[3,3,1,1]=(0.731413856616)*x[0]**o+(0.837213097155)*x[0]+(-0.650032764358)*x[1]**o+(0.96973961589)*x[1]
-        arg[3,3,2,0]=(-0.501994458598)*x[0]**o+(-0.705938508685)*x[0]+(0.664394117366)*x[1]**o+(0.692950029135)*x[1]
-        arg[3,3,2,1]=(-0.0948399323409)*x[0]**o+(-0.686744554674)*x[0]+(0.577765681583)*x[1]**o+(0.969310750204)*x[1]
-        arg[3,4,0,0]=(-0.484011788432)*x[0]**o+(-0.560744139846)*x[0]+(0.072097608773)*x[1]**o+(-0.103052228904)*x[1]
-        arg[3,4,0,1]=(-0.201158934695)*x[0]**o+(0.463105335811)*x[0]+(0.733365706682)*x[1]**o+(-0.330035241794)*x[1]
-        arg[3,4,1,0]=(0.252379277102)*x[0]**o+(-0.110596657969)*x[0]+(0.763687257878)*x[1]**o+(-0.345598371263)*x[1]
-        arg[3,4,1,1]=(0.0868412855617)*x[0]**o+(0.385098679406)*x[0]+(0.291487288978)*x[1]**o+(-0.112145846209)*x[1]
-        arg[3,4,2,0]=(-0.913724685255)*x[0]**o+(-0.0348735884313)*x[0]+(0.550688528861)*x[1]**o+(0.798394152329)*x[1]
-        arg[3,4,2,1]=(-0.92870523219)*x[0]**o+(0.177354002469)*x[0]+(0.350393765313)*x[1]**o+(-0.974997198741)*x[1]
-        ref[0,0,0,0]=(0.815821053922)/(o+1.)+(0.302879577355)
-        ref[0,0,0,1]=(-0.223824520603)/(o+1.)+(0.690659426687)
-        ref[0,0,1,0]=(-0.501731412433)/(o+1.)+(0.0102964270565)
-        ref[0,0,1,1]=(-0.731540589167)/(o+1.)+(0.348284469462)
-        ref[0,0,2,0]=(-0.121523684012)/(o+1.)+(0.184348962759)
-        ref[0,0,2,1]=(-0.4529485642)/(o+1.)+(-0.830798233026)
-        ref[0,1,0,0]=(-0.244463483906)/(o+1.)+(0.226296188971)
-        ref[0,1,0,1]=(1.2203272116)/(o+1.)+(-0.693494218115)
-        ref[0,1,1,0]=(-0.55576623697)/(o+1.)+(-0.273623989583)
-        ref[0,1,1,1]=(-0.316836585171)/(o+1.)+(-0.836135387777)
-        ref[0,1,2,0]=(-0.133732244387)/(o+1.)+(-0.875415201605)
-        ref[0,1,2,1]=(-0.281487947177)/(o+1.)+(-0.668499911274)
-        ref[0,2,0,0]=(-0.896781862729)/(o+1.)+(-0.0225848820142)
-        ref[0,2,0,1]=(-1.70326692867)/(o+1.)+(-0.1693379432)
-        ref[0,2,1,0]=(-0.00084798161079)/(o+1.)+(0.343359275275)
-        ref[0,2,1,1]=(0.609064372767)/(o+1.)+(-0.369639962727)
-        ref[0,2,2,0]=(-0.759042888708)/(o+1.)+(0.321708104548)
-        ref[0,2,2,1]=(0.760967724015)/(o+1.)+(0.0268897973234)
-        ref[0,3,0,0]=(-1.3915636468)/(o+1.)+(-0.230755462281)
-        ref[0,3,0,1]=(-0.416449082748)/(o+1.)+(0.480436529329)
-        ref[0,3,1,0]=(-0.238553658798)/(o+1.)+(-0.029283546006)
-        ref[0,3,1,1]=(-1.36933302275)/(o+1.)+(-0.221757606321)
-        ref[0,3,2,0]=(-0.872999155991)/(o+1.)+(0.69296766968)
-        ref[0,3,2,1]=(0.833661507716)/(o+1.)+(0.321357009466)
-        ref[0,4,0,0]=(1.4358026373)/(o+1.)+(0.311715942547)
-        ref[0,4,0,1]=(-0.00811900044778)/(o+1.)+(-0.76710974695)
-        ref[0,4,1,0]=(-0.92034101297)/(o+1.)+(-0.0309623888275)
-        ref[0,4,1,1]=(0.690460334263)/(o+1.)+(0.783809038221)
-        ref[0,4,2,0]=(0.779851986824)/(o+1.)+(-0.214799981386)
-        ref[0,4,2,1]=(-0.566157259598)/(o+1.)+(0.296555712092)
-        ref[1,0,0,0]=(-1.70267943485)/(o+1.)+(0.0444622873215)
-        ref[1,0,0,1]=(0.399342875087)/(o+1.)+(0.0341080904363)
-        ref[1,0,1,0]=(0.839377637409)/(o+1.)+(0.158619241351)
-        ref[1,0,1,1]=(-0.0142823080176)/(o+1.)+(0.693714763021)
-        ref[1,0,2,0]=(-0.97036633864)/(o+1.)+(0.264110057567)
-        ref[1,0,2,1]=(0.104223436728)/(o+1.)+(0.328785142295)
-        ref[1,1,0,0]=(1.09779156365)/(o+1.)+(-0.00408578628855)
-        ref[1,1,0,1]=(-0.914750679597)/(o+1.)+(0.206573942886)
-        ref[1,1,1,0]=(0.150419426085)/(o+1.)+(-0.0846024372156)
-        ref[1,1,1,1]=(-1.04733819847)/(o+1.)+(-0.157756242641)
-        ref[1,1,2,0]=(-1.49193735459)/(o+1.)+(0.391723285192)
-        ref[1,1,2,1]=(-0.250600389657)/(o+1.)+(-0.456841431612)
-        ref[1,2,0,0]=(1.21154796884)/(o+1.)+(-0.377275533205)
-        ref[1,2,0,1]=(-0.785475967917)/(o+1.)+(0.2413362399)
-        ref[1,2,1,0]=(1.20750352255)/(o+1.)+(-0.409504204121)
-        ref[1,2,1,1]=(0.271471015188)/(o+1.)+(-0.136640402636)
-        ref[1,2,2,0]=(-0.741344603747)/(o+1.)+(0.00668995653618)
-        ref[1,2,2,1]=(0.462000684606)/(o+1.)+(0.364894712961)
-        ref[1,3,0,0]=(0.0273564369347)/(o+1.)+(0.673962086152)
-        ref[1,3,0,1]=(0.285276349085)/(o+1.)+(0.385675061073)
-        ref[1,3,1,0]=(0.851307298344)/(o+1.)+(0.118422744971)
-        ref[1,3,1,1]=(0.235593686643)/(o+1.)+(0.244705242716)
-        ref[1,3,2,0]=(-0.359345731222)/(o+1.)+(-0.124958138388)
-        ref[1,3,2,1]=(0.590170220995)/(o+1.)+(0.429975100757)
-        ref[1,4,0,0]=(0.987134792715)/(o+1.)+(-0.0725353868253)
-        ref[1,4,0,1]=(0.623734296247)/(o+1.)+(0.489855522024)
-        ref[1,4,1,0]=(-0.913537095843)/(o+1.)+(0.727739353556)
-        ref[1,4,1,1]=(-0.656988917238)/(o+1.)+(0.274753842895)
-        ref[1,4,2,0]=(1.03400922475)/(o+1.)+(-0.00621482335664)
-        ref[1,4,2,1]=(-1.0367802184)/(o+1.)+(-0.266633530803)
-        ref[2,0,0,0]=(-0.391593893803)/(o+1.)+(0.457472062333)
-        ref[2,0,0,1]=(0.393476325223)/(o+1.)+(-0.911233333506)
-        ref[2,0,1,0]=(-0.0199296737245)/(o+1.)+(0.328542898457)
-        ref[2,0,1,1]=(-0.618353771051)/(o+1.)+(0.0279228750664)
-        ref[2,0,2,0]=(0.570494475025)/(o+1.)+(-0.374533325635)
-        ref[2,0,2,1]=(-1.21079806839)/(o+1.)+(-0.632909492494)
-        ref[2,1,0,0]=(1.32715885433)/(o+1.)+(0.730744204126)
-        ref[2,1,0,1]=(1.43666536922)/(o+1.)+(0.279106975714)
-        ref[2,1,1,0]=(-0.603800395047)/(o+1.)+(-0.716035662434)
-        ref[2,1,1,1]=(1.35897125219)/(o+1.)+(-0.721199872542)
-        ref[2,1,2,0]=(0.430431838988)/(o+1.)+(0.465280445622)
-        ref[2,1,2,1]=(-1.060398141)/(o+1.)+(-0.404416040892)
-        ref[2,2,0,0]=(0.374659415961)/(o+1.)+(0.202262379386)
-        ref[2,2,0,1]=(0.801918445202)/(o+1.)+(-0.403667477049)
-        ref[2,2,1,0]=(-1.50789527973)/(o+1.)+(0.540295891905)
-        ref[2,2,1,1]=(-1.19243886136)/(o+1.)+(-0.478654318143)
-        ref[2,2,2,0]=(0.21727146958)/(o+1.)+(-0.302043553627)
-        ref[2,2,2,1]=(1.35667456836)/(o+1.)+(-0.530838305162)
-        ref[2,3,0,0]=(0.0649985054133)/(o+1.)+(0.596842347772)
-        ref[2,3,0,1]=(0.166245904835)/(o+1.)+(-0.594924886997)
-        ref[2,3,1,0]=(1.01422987189)/(o+1.)+(-0.10673688237)
-        ref[2,3,1,1]=(-0.623689969327)/(o+1.)+(0.172750222106)
-        ref[2,3,2,0]=(-1.04272619178)/(o+1.)+(-0.148705576364)
-        ref[2,3,2,1]=(0.445344131771)/(o+1.)+(-0.293605085777)
-        ref[2,4,0,0]=(-1.00871549607)/(o+1.)+(0.572174509729)
-        ref[2,4,0,1]=(0.924237726297)/(o+1.)+(-0.522341347777)
-        ref[2,4,1,0]=(0.905201912063)/(o+1.)+(0.0728107221801)
-        ref[2,4,1,1]=(-0.391371453081)/(o+1.)+(-0.23637274965)
-        ref[2,4,2,0]=(0.302213680395)/(o+1.)+(0.464268838267)
-        ref[2,4,2,1]=(-0.231858832685)/(o+1.)+(-0.358581040743)
-        ref[3,0,0,0]=(-0.294838089237)/(o+1.)+(-0.232759278447)
-        ref[3,0,0,1]=(-0.894144156597)/(o+1.)+(0.356735902294)
-        ref[3,0,1,0]=(-0.658743196854)/(o+1.)+(0.43192940704)
-        ref[3,0,1,1]=(-0.588471158915)/(o+1.)+(-0.0702801231243)
-        ref[3,0,2,0]=(0.399330315879)/(o+1.)+(-0.5331703764)
-        ref[3,0,2,1]=(-1.44488462603)/(o+1.)+(-0.0238956364351)
-        ref[3,1,0,0]=(0.555753203891)/(o+1.)+(-0.193710946547)
-        ref[3,1,0,1]=(-1.01153524773)/(o+1.)+(-0.310653653364)
-        ref[3,1,1,0]=(-0.810081834072)/(o+1.)+(-0.704028056922)
-        ref[3,1,1,1]=(0.673319109465)/(o+1.)+(0.146508313746)
-        ref[3,1,2,0]=(1.06614330919)/(o+1.)+(0.210644257384)
-        ref[3,1,2,1]=(0.169354687187)/(o+1.)+(0.260991208281)
-        ref[3,2,0,0]=(1.17801438745)/(o+1.)+(-0.122603446615)
-        ref[3,2,0,1]=(-0.612911386471)/(o+1.)+(0.512433833047)
-        ref[3,2,1,0]=(0.441320249956)/(o+1.)+(-0.432537704584)
-        ref[3,2,1,1]=(0.950667875863)/(o+1.)+(-0.476855090338)
-        ref[3,2,2,0]=(0.112727596641)/(o+1.)+(-0.453766193797)
-        ref[3,2,2,1]=(0.124962805486)/(o+1.)+(-0.0606318977858)
-        ref[3,3,0,0]=(-0.866309983256)/(o+1.)+(-0.811326694594)
-        ref[3,3,0,1]=(-0.277493641857)/(o+1.)+(0.564024429791)
-        ref[3,3,1,0]=(-0.00865775952435)/(o+1.)+(-0.337712146277)
-        ref[3,3,1,1]=(0.0813810922576)/(o+1.)+(0.903476356523)
-        ref[3,3,2,0]=(0.162399658768)/(o+1.)+(-0.00649423977499)
-        ref[3,3,2,1]=(0.482925749243)/(o+1.)+(0.141283097765)
-        ref[3,4,0,0]=(-0.411914179659)/(o+1.)+(-0.331898184375)
-        ref[3,4,0,1]=(0.532206771987)/(o+1.)+(0.0665350470083)
-        ref[3,4,1,0]=(1.01606653498)/(o+1.)+(-0.228097514616)
-        ref[3,4,1,1]=(0.37832857454)/(o+1.)+(0.136476416599)
-        ref[3,4,2,0]=(-0.363036156393)/(o+1.)+(0.381760281949)
-        ref[3,4,2,1]=(-0.578311466877)/(o+1.)+(-0.398821598136)
-      else:
-        arg[0,0,0,0]=(0.860676142569)*x[0]**o+(-0.156046991162)*x[0]+(-0.0462355579656)*x[1]**o+(0.70842844961)*x[1]+(0.617299123548)*x[2]**o+(-0.865174329565)*x[2]
-        arg[0,0,0,1]=(-0.284308060865)*x[0]**o+(0.788848579389)*x[0]+(0.629321669042)*x[1]**o+(0.066637849809)*x[1]+(0.114152381009)*x[2]**o+(-0.466687745846)*x[2]
-        arg[0,0,1,0]=(-0.690823198517)*x[0]**o+(-0.141510804573)*x[0]+(0.969978831967)*x[1]**o+(0.307926382658)*x[1]+(0.710373009094)*x[2]**o+(-0.494828315907)*x[2]
-        arg[0,0,1,1]=(0.953361413913)*x[0]**o+(-0.103742611936)*x[0]+(0.63934955554)*x[1]**o+(-0.0778114476564)*x[1]+(-0.221185122698)*x[2]**o+(-0.287432047404)*x[2]
-        arg[0,0,2,0]=(0.378306380558)*x[0]**o+(-0.117743922672)*x[0]+(-0.0606376630208)*x[1]**o+(-0.59439189505)*x[1]+(0.10507320657)*x[2]**o+(0.856411423067)*x[2]
-        arg[0,0,2,1]=(0.777734672779)*x[0]**o+(0.286956002007)*x[0]+(-0.931811626583)*x[1]**o+(-0.806626659661)*x[1]+(-0.420390949282)*x[2]**o+(0.854080006578)*x[2]
-        arg[0,1,0,0]=(0.403426948964)*x[0]**o+(0.707099419296)*x[0]+(0.593137130456)*x[1]**o+(-0.757560771598)*x[1]+(0.369632217934)*x[2]**o+(-0.348480285397)*x[2]
-        arg[0,1,0,1]=(-0.491454189782)*x[0]**o+(0.547276640565)*x[0]+(-0.955045542708)*x[1]**o+(0.529989872531)*x[1]+(-0.161086874799)*x[2]**o+(-0.181810040724)*x[2]
-        arg[0,1,1,0]=(0.46282177104)*x[0]**o+(0.254346937251)*x[0]+(0.824797105546)*x[1]**o+(-0.449979162246)*x[1]+(0.22307703071)*x[2]**o+(-0.592072135668)*x[2]
-        arg[0,1,1,1]=(0.329230675141)*x[0]**o+(-0.733034697145)*x[0]+(0.762195609347)*x[1]**o+(-0.639097591362)*x[1]+(0.765354927905)*x[2]**o+(0.313571493405)*x[2]
-        arg[0,1,2,0]=(0.3874127072)*x[0]**o+(-0.0569429727569)*x[0]+(-0.203121198708)*x[1]**o+(-0.736379499164)*x[1]+(-0.980629375436)*x[2]**o+(0.955793660048)*x[2]
-        arg[0,1,2,1]=(-0.656255469455)*x[0]**o+(0.711904808699)*x[0]+(-0.363253678399)*x[1]**o+(0.921875000807)*x[1]+(0.686394816431)*x[2]**o+(0.818500716704)*x[2]
-        arg[0,2,0,0]=(-0.931555347846)*x[0]**o+(-0.249573400742)*x[0]+(0.617166716404)*x[1]**o+(-0.929587051108)*x[1]+(0.830928715064)*x[2]**o+(0.461637431613)*x[2]
-        arg[0,2,0,1]=(-0.8677719945)*x[0]**o+(-0.176892180445)*x[0]+(-0.881887456464)*x[1]**o+(0.923355677513)*x[1]+(-0.978544668453)*x[2]**o+(-0.427009384287)*x[2]
-        arg[0,2,1,0]=(-0.0707937433084)*x[0]**o+(-0.872892141393)*x[0]+(0.606234798381)*x[1]**o+(0.935845076847)*x[1]+(-0.97559052201)*x[2]**o+(-0.31138518209)*x[2]
-        arg[0,2,1,1]=(0.450210597865)*x[0]**o+(0.842939440378)*x[0]+(-0.333422856577)*x[1]**o+(-0.492809679443)*x[1]+(-0.254728278043)*x[2]**o+(-0.0702767077952)*x[2]
-        arg[0,2,2,0]=(-0.250463216903)*x[0]**o+(0.756576293763)*x[0]+(0.596902629953)*x[1]**o+(-0.887080794947)*x[1]+(0.027319948008)*x[2]**o+(0.552496782776)*x[2]
-        arg[0,2,2,1]=(-0.0883102140591)*x[0]**o+(0.988759610101)*x[0]+(-0.208152392508)*x[1]**o+(0.938999108564)*x[1]+(-0.773883611417)*x[2]**o+(0.653413306338)*x[2]
-        arg[0,3,0,0]=(-0.399644211606)*x[0]**o+(-0.978595776407)*x[0]+(0.99454650986)*x[1]**o+(0.143313668715)*x[1]+(0.328592750842)*x[2]**o+(-0.958804581101)*x[2]
-        arg[0,3,0,1]=(-0.0667966885959)*x[0]**o+(0.332653574704)*x[0]+(-0.762025150916)*x[1]**o+(0.895044013374)*x[1]+(0.627013843362)*x[2]**o+(-0.682392672232)*x[2]
-        arg[0,3,1,0]=(-0.834479453773)*x[0]**o+(-0.375930859033)*x[0]+(0.129507966861)*x[1]**o+(0.995364280408)*x[1]+(-0.126081191572)*x[2]**o+(0.0344262779491)*x[2]
-        arg[0,3,1,1]=(0.796952126596)*x[0]**o+(0.310562243091)*x[0]+(0.854548623788)*x[1]**o+(-0.719100537284)*x[1]+(-0.236266783438)*x[2]**o+(-0.646647129209)*x[2]
-        arg[0,3,2,0]=(0.844073289115)*x[0]**o+(0.423300345347)*x[0]+(0.126354796852)*x[1]**o+(0.180372257606)*x[1]+(-0.564712722146)*x[2]**o+(0.466988430183)*x[2]
-        arg[0,3,2,1]=(0.228775824367)*x[0]**o+(0.40701094831)*x[0]+(0.223101054593)*x[1]**o+(-0.894937905383)*x[1]+(0.425392942773)*x[2]**o+(-0.844238667169)*x[2]
-        arg[0,4,0,0]=(0.3363848738)*x[0]**o+(-0.985327066062)*x[0]+(-0.107847971678)*x[1]**o+(0.596121801488)*x[1]+(0.655589801663)*x[2]**o+(-0.729650731949)*x[2]
-        arg[0,4,0,1]=(-0.176435679219)*x[0]**o+(0.382558711725)*x[0]+(-0.658212492337)*x[1]**o+(0.584904267612)*x[1]+(-0.534684876705)*x[2]**o+(-0.441262614915)*x[2]
-        arg[0,4,1,0]=(0.281301737167)*x[0]**o+(-0.642486274791)*x[0]+(0.420753884869)*x[1]**o+(0.482835955591)*x[1]+(0.169431333788)*x[2]**o+(0.922841193825)*x[2]
-        arg[0,4,1,1]=(0.235812590604)*x[0]**o+(-0.446233855396)*x[0]+(0.465015868566)*x[1]**o+(-0.780441276888)*x[1]+(0.513632761351)*x[2]**o+(-0.0576482811678)*x[2]
-        arg[0,4,2,0]=(-0.617245874462)*x[0]**o+(0.183661473466)*x[0]+(-0.711148911239)*x[1]**o+(0.125228991306)*x[1]+(-0.500218603959)*x[2]**o+(0.70597577229)*x[2]
-        arg[0,4,2,1]=(0.56330304117)*x[0]**o+(0.631284986628)*x[0]+(-0.222485175776)*x[1]**o+(0.0639235737228)*x[1]+(-0.276613868747)*x[2]**o+(0.407488564857)*x[2]
-        arg[1,0,0,0]=(0.159032146915)*x[0]**o+(-0.716040989693)*x[0]+(0.410709172613)*x[1]**o+(-0.527667963652)*x[1]+(-0.160515156497)*x[2]**o+(0.294448742382)*x[2]
-        arg[1,0,0,1]=(0.941139035835)*x[0]**o+(0.707410046094)*x[0]+(-0.172095410803)*x[1]**o+(-0.967035204304)*x[1]+(0.870395272646)*x[2]**o+(0.830870986802)*x[2]
-        arg[1,0,1,0]=(0.731015285309)*x[0]**o+(0.450519048697)*x[0]+(-0.484568714675)*x[1]**o+(0.454201220108)*x[1]+(-0.161850459099)*x[2]**o+(-0.617463263396)*x[2]
-        arg[1,0,1,1]=(-0.958841628847)*x[0]**o+(-0.0667813400021)*x[0]+(0.659551780082)*x[1]**o+(0.514424015304)*x[1]+(0.920583608125)*x[2]**o+(0.89564899572)*x[2]
-        arg[1,0,2,0]=(0.0482630479817)*x[0]**o+(0.911326064322)*x[0]+(-0.275134422092)*x[1]**o+(0.216495232459)*x[1]+(-0.973586171195)*x[2]**o+(0.275694688611)*x[2]
-        arg[1,0,2,1]=(0.769733688293)*x[0]**o+(0.771829018421)*x[0]+(-0.22434549079)*x[1]**o+(0.131966885817)*x[1]+(-0.109424705679)*x[2]**o+(-0.369585136379)*x[2]
-        arg[1,1,0,0]=(-0.0160180905877)*x[0]**o+(-0.268260755267)*x[0]+(-0.213940412022)*x[1]**o+(0.665987805279)*x[1]+(0.968879828017)*x[2]**o+(-0.449435538913)*x[2]
-        arg[1,1,0,1]=(0.361055351825)*x[0]**o+(0.463294478488)*x[0]+(0.692655668486)*x[1]**o+(0.151415573206)*x[1]+(0.902280461515)*x[2]**o+(0.690926934073)*x[2]
-        arg[1,1,1,0]=(0.591998602299)*x[0]**o+(0.516482177709)*x[0]+(-0.298511909182)*x[1]**o+(0.281818071894)*x[1]+(0.207089953979)*x[2]**o+(0.917004722388)*x[2]
-        arg[1,1,1,1]=(0.479832408236)*x[0]**o+(-0.643374914165)*x[0]+(0.370844835249)*x[1]**o+(0.560458499239)*x[1]+(-0.865852319767)*x[2]**o+(0.560572130123)*x[2]
-        arg[1,1,2,0]=(0.709293526635)*x[0]**o+(-0.388347223155)*x[0]+(0.60797330273)*x[1]**o+(-0.847624783099)*x[1]+(-0.0476367756382)*x[2]**o+(0.637841988478)*x[2]
-        arg[1,1,2,1]=(0.343458045422)*x[0]**o+(-0.764451449587)*x[0]+(-0.444256801761)*x[1]**o+(0.385385997921)*x[1]+(-0.722095136671)*x[2]**o+(0.677852473207)*x[2]
-        arg[1,2,0,0]=(0.710372887392)*x[0]**o+(-0.628494679119)*x[0]+(-0.59513507905)*x[1]**o+(-0.527824874295)*x[1]+(-0.611189170789)*x[2]**o+(0.090651976806)*x[2]
-        arg[1,2,0,1]=(-0.980160150289)*x[0]**o+(-0.0286097581598)*x[0]+(-0.407906975953)*x[1]**o+(-0.319422835951)*x[1]+(-0.489787310147)*x[2]**o+(-0.694386341354)*x[2]
-        arg[1,2,1,0]=(-0.416867224376)*x[0]**o+(0.631406877489)*x[0]+(-0.93939195942)*x[1]**o+(0.266858600313)*x[1]+(0.982173221612)*x[2]**o+(0.112901364617)*x[2]
-        arg[1,2,1,1]=(0.412001480348)*x[0]**o+(0.624281489887)*x[0]+(0.306558457751)*x[1]**o+(0.95864454419)*x[1]+(0.299175627954)*x[2]**o+(-0.0531991017347)*x[2]
-        arg[1,2,2,0]=(-0.0342261621741)*x[0]**o+(-0.587245704486)*x[0]+(-0.976407464107)*x[1]**o+(-0.0157215030322)*x[1]+(-0.529857472095)*x[2]**o+(-0.419626697673)*x[2]
-        arg[1,2,2,1]=(-0.681737301037)*x[0]**o+(-0.980349460702)*x[0]+(-0.839469631393)*x[1]**o+(-0.412417814907)*x[1]+(0.451717398947)*x[2]**o+(0.962167685987)*x[2]
-        arg[1,3,0,0]=(0.283453965913)*x[0]**o+(0.204445403787)*x[0]+(-0.806150376236)*x[1]**o+(0.122187094069)*x[1]+(-0.679291367964)*x[2]**o+(-0.875353966489)*x[2]
-        arg[1,3,0,1]=(0.115974475175)*x[0]**o+(0.701473497654)*x[0]+(0.298012120304)*x[1]**o+(0.567597901709)*x[1]+(0.721211831476)*x[2]**o+(-0.255389572775)*x[2]
-        arg[1,3,1,0]=(0.393891431092)*x[0]**o+(-0.563382537925)*x[0]+(0.974194829106)*x[1]**o+(0.659688559688)*x[1]+(-0.394266143828)*x[2]**o+(0.875266200191)*x[2]
-        arg[1,3,1,1]=(-0.456930975697)*x[0]**o+(0.334590626231)*x[0]+(-0.227176883362)*x[1]**o+(0.76775699173)*x[1]+(0.839371167887)*x[2]**o+(-0.155473916326)*x[2]
-        arg[1,3,2,0]=(0.346761981787)*x[0]**o+(-0.625121706322)*x[0]+(0.340655154638)*x[1]**o+(-0.0646323546999)*x[1]+(-0.211347402677)*x[2]**o+(0.233661266919)*x[2]
-        arg[1,3,2,1]=(-0.086096644956)*x[0]**o+(-0.845623653209)*x[0]+(-0.0866093549957)*x[1]**o+(-0.467286349011)*x[1]+(-0.0621455515357)*x[2]**o+(0.164779979085)*x[2]
-        arg[1,4,0,0]=(0.42022138208)*x[0]**o+(0.136984451355)*x[0]+(0.664770979086)*x[1]**o+(-0.537368896193)*x[1]+(0.874256726691)*x[2]**o+(-0.58614100824)*x[2]
-        arg[1,4,0,1]=(-0.805860964792)*x[0]**o+(0.758511304044)*x[0]+(-0.574686863541)*x[1]**o+(-0.410873101247)*x[1]+(0.932015171551)*x[2]**o+(0.439987195351)*x[2]
-        arg[1,4,1,0]=(-0.515187049123)*x[0]**o+(0.308078404334)*x[0]+(0.940959771774)*x[1]**o+(0.466269579691)*x[1]+(-0.190617144843)*x[2]**o+(0.738172533582)*x[2]
-        arg[1,4,1,1]=(0.283326036586)*x[0]**o+(-0.693631747857)*x[0]+(0.478965080319)*x[1]**o+(-0.0465389396775)*x[1]+(-0.72886286959)*x[2]**o+(-0.9346424149)*x[2]
-        arg[1,4,2,0]=(-0.71539766285)*x[0]**o+(0.361875987071)*x[0]+(0.905270678876)*x[1]**o+(-0.675024725702)*x[1]+(0.378259473658)*x[2]**o+(0.0520394226711)*x[2]
-        arg[1,4,2,1]=(-0.319600525923)*x[0]**o+(0.0449956327134)*x[0]+(0.707418658521)*x[1]**o+(0.210137972776)*x[1]+(-0.767860728688)*x[2]**o+(0.232340825758)*x[2]
-        arg[2,0,0,0]=(0.92844243651)*x[0]**o+(0.956810319504)*x[0]+(0.762198571194)*x[1]**o+(-0.363107634629)*x[1]+(0.0750393505254)*x[2]**o+(-0.43573581041)*x[2]
-        arg[2,0,0,1]=(-0.193613121742)*x[0]**o+(0.440027871839)*x[0]+(-0.607905506346)*x[1]**o+(0.894840354958)*x[1]+(0.601279436178)*x[2]**o+(0.46806560762)*x[2]
-        arg[2,0,1,0]=(0.370901517567)*x[0]**o+(-0.738769905647)*x[0]+(-0.698692979664)*x[1]**o+(-0.286318840335)*x[1]+(-0.879367315688)*x[2]**o+(-0.959912132991)*x[2]
-        arg[2,0,1,1]=(-0.278939533774)*x[0]**o+(0.183795552426)*x[0]+(-0.341943551466)*x[1]**o+(0.491847260291)*x[1]+(-0.141030429384)*x[2]**o+(0.256287855539)*x[2]
-        arg[2,0,2,0]=(-0.135930357616)*x[0]**o+(-0.382515749949)*x[0]+(-0.43030873581)*x[1]**o+(-0.0211891159981)*x[1]+(-0.377865120002)*x[2]**o+(0.109942325029)*x[2]
-        arg[2,0,2,1]=(0.288827267201)*x[0]**o+(-0.907970544468)*x[0]+(-0.622258309213)*x[1]**o+(-0.763273879894)*x[1]+(0.438715013671)*x[2]**o+(-0.93873140988)*x[2]
-        arg[2,1,0,0]=(-0.963487369906)*x[0]**o+(0.899051290288)*x[0]+(-0.268257956548)*x[1]**o+(-0.229092726584)*x[1]+(0.427024112314)*x[2]**o+(0.0435138095138)*x[2]
-        arg[2,1,0,1]=(0.89996926597)*x[0]**o+(-0.206500706229)*x[0]+(-0.191769123095)*x[1]**o+(-0.348924155298)*x[1]+(-0.74405653776)*x[2]**o+(0.0724946691864)*x[2]
-        arg[2,1,1,0]=(0.338170397901)*x[0]**o+(-0.725761081242)*x[0]+(-0.45928272676)*x[1]**o+(0.795535326783)*x[1]+(-0.316443844644)*x[2]**o+(-0.844205401892)*x[2]
-        arg[2,1,1,1]=(0.509131757681)*x[0]**o+(0.319175801535)*x[0]+(-0.807058926279)*x[1]**o+(0.63928269996)*x[1]+(0.219324073432)*x[2]**o+(0.351217517434)*x[2]
-        arg[2,1,2,0]=(-0.534090721611)*x[0]**o+(0.27146424294)*x[0]+(0.250778065716)*x[1]**o+(-0.901322994167)*x[1]+(-0.57588768699)*x[2]**o+(0.405043003456)*x[2]
-        arg[2,1,2,1]=(0.101699906269)*x[0]**o+(0.361960318738)*x[0]+(0.278974923593)*x[1]**o+(-0.336289352037)*x[1]+(-0.677353936215)*x[2]**o+(0.0726793347753)*x[2]
-        arg[2,2,0,0]=(-0.734961283823)*x[0]**o+(-0.593268557578)*x[0]+(0.310896858565)*x[1]**o+(-0.482326137951)*x[1]+(0.886472957099)*x[2]**o+(-0.0403563476581)*x[2]
-        arg[2,2,0,1]=(-0.166071725106)*x[0]**o+(-0.454245686818)*x[0]+(-0.892674508991)*x[1]**o+(0.581554190251)*x[1]+(0.995323654908)*x[2]**o+(-0.0336714433349)*x[2]
-        arg[2,2,1,0]=(-0.437491848099)*x[0]**o+(-0.195039508213)*x[0]+(0.822011086215)*x[1]**o+(0.771044412863)*x[1]+(0.697534261252)*x[2]**o+(0.666510217725)*x[2]
-        arg[2,2,1,1]=(-0.529148276275)*x[0]**o+(-0.093016460024)*x[0]+(0.663641010649)*x[1]**o+(0.940439359843)*x[1]+(0.754151159716)*x[2]**o+(0.852349310591)*x[2]
-        arg[2,2,2,0]=(0.859523244682)*x[0]**o+(0.704825125128)*x[0]+(0.221832129598)*x[1]**o+(0.573940020456)*x[1]+(0.935673751591)*x[2]**o+(0.23235170475)*x[2]
-        arg[2,2,2,1]=(0.0359047473512)*x[0]**o+(0.836816935443)*x[0]+(0.6411608273)*x[1]**o+(0.291526953908)*x[1]+(0.735564515362)*x[2]**o+(-0.465781621769)*x[2]
-        arg[2,3,0,0]=(0.352740040216)*x[0]**o+(0.54224020581)*x[0]+(0.681356174115)*x[1]**o+(-0.97589117869)*x[1]+(0.880755719884)*x[2]**o+(0.562259403362)*x[2]
-        arg[2,3,0,1]=(0.563708471054)*x[0]**o+(0.525523219723)*x[0]+(0.423068360374)*x[1]**o+(0.29239160821)*x[1]+(0.874360368885)*x[2]**o+(0.922265851359)*x[2]
-        arg[2,3,1,0]=(0.694309936305)*x[0]**o+(-0.409224769672)*x[0]+(-0.748835864803)*x[1]**o+(-0.21841534641)*x[1]+(0.497059735624)*x[2]**o+(-0.753234694148)*x[2]
-        arg[2,3,1,1]=(0.109706510352)*x[0]**o+(-0.0160720403678)*x[0]+(0.888778080744)*x[1]**o+(-0.938692716268)*x[1]+(0.529262951478)*x[2]**o+(0.481430680214)*x[2]
-        arg[2,3,2,0]=(0.65368659132)*x[0]**o+(-0.988176396392)*x[0]+(0.989546739333)*x[1]**o+(0.23178715846)*x[1]+(-0.557645438328)*x[2]**o+(0.063228513147)*x[2]
-        arg[2,3,2,1]=(0.286316141831)*x[0]**o+(0.668138463424)*x[0]+(-0.950430671533)*x[1]**o+(-0.978012107187)*x[1]+(-0.107618382464)*x[2]**o+(-0.684084421276)*x[2]
-        arg[2,4,0,0]=(-0.63510659432)*x[0]**o+(0.264242935995)*x[0]+(0.960647241624)*x[1]**o+(0.58483379289)*x[1]+(0.7255270271)*x[2]**o+(-0.476151653985)*x[2]
-        arg[2,4,0,1]=(-0.221953908705)*x[0]**o+(-0.994143786509)*x[0]+(-0.359525421944)*x[1]**o+(0.533966197668)*x[1]+(-0.29739666047)*x[2]**o+(-0.0824204124466)*x[2]
-        arg[2,4,1,0]=(-0.447043625871)*x[0]**o+(-0.904485300564)*x[0]+(0.26179071803)*x[1]**o+(0.437320719437)*x[1]+(-0.56501466909)*x[2]**o+(0.129662379166)*x[2]
-        arg[2,4,1,1]=(0.259809756366)*x[0]**o+(0.446788808701)*x[0]+(-0.143702396023)*x[1]**o+(0.879531090832)*x[1]+(0.410047703156)*x[2]**o+(0.755750006468)*x[2]
-        arg[2,4,2,0]=(-0.730881615951)*x[0]**o+(-0.357110792705)*x[0]+(0.552722654621)*x[1]**o+(0.965623848242)*x[1]+(0.555951256049)*x[2]**o+(0.259021370764)*x[2]
-        arg[2,4,2,1]=(-0.465880467377)*x[0]**o+(-0.840984822217)*x[0]+(0.665817382039)*x[1]**o+(-0.390932961529)*x[1]+(-0.0857939888315)*x[2]**o+(-0.712185917672)*x[2]
-        arg[3,0,0,0]=(0.710281429223)*x[0]**o+(-0.723903639057)*x[0]+(-0.267455509065)*x[1]**o+(-0.731684188612)*x[1]+(-0.287442751768)*x[2]**o+(-0.266871749947)*x[2]
-        arg[3,0,0,1]=(0.460723870663)*x[0]**o+(0.0502154310124)*x[0]+(-0.260241363193)*x[1]**o+(-0.516473088648)*x[1]+(-0.925984113039)*x[2]**o+(-0.0297616649018)*x[2]
-        arg[3,0,1,0]=(0.523186648278)*x[0]**o+(0.937042293367)*x[0]+(0.811740916657)*x[1]**o+(0.0544805175015)*x[1]+(-0.543484279955)*x[2]**o+(0.244714198306)*x[2]
-        arg[3,0,1,1]=(-0.69212630167)*x[0]**o+(0.868708276385)*x[0]+(0.473290025811)*x[1]**o+(0.137043602294)*x[1]+(-0.19291314113)*x[2]**o+(-0.755147036188)*x[2]
-        arg[3,0,2,0]=(0.0472638421122)*x[0]**o+(0.403135551064)*x[0]+(0.290083188289)*x[1]**o+(0.96419060449)*x[1]+(-0.240544184077)*x[2]**o+(-0.183028108529)*x[2]
-        arg[3,0,2,1]=(0.354253383908)*x[0]**o+(0.628816528774)*x[0]+(0.588194429756)*x[1]**o+(-0.852128734457)*x[1]+(-0.84774778925)*x[2]**o+(0.796310123562)*x[2]
-        arg[3,1,0,0]=(0.528880495806)*x[0]**o+(-0.74176589205)*x[0]+(-0.447816938371)*x[1]**o+(0.611297564802)*x[1]+(0.742134198482)*x[2]**o+(-0.625840664202)*x[2]
-        arg[3,1,0,1]=(0.419633746259)*x[0]**o+(-0.247742274578)*x[0]+(0.302328885303)*x[1]**o+(-0.629854480502)*x[1]+(0.493919301288)*x[2]**o+(0.902910119017)*x[2]
-        arg[3,1,1,0]=(0.509160481656)*x[0]**o+(-0.388129364133)*x[0]+(-0.595185230598)*x[1]**o+(-0.289592836865)*x[1]+(0.615663908134)*x[2]**o+(-0.560687711511)*x[2]
-        arg[3,1,1,1]=(0.647782473568)*x[0]**o+(0.935840881725)*x[0]+(0.440348212287)*x[1]**o+(-0.489797988572)*x[1]+(0.766592631787)*x[2]**o+(0.217399649246)*x[2]
-        arg[3,1,2,0]=(0.64944026906)*x[0]**o+(0.487409918475)*x[0]+(-0.0322210593784)*x[1]**o+(0.281311337861)*x[1]+(-0.694252407571)*x[2]**o+(-0.659678386121)*x[2]
-        arg[3,1,2,1]=(0.806357278285)*x[0]**o+(0.419430374567)*x[0]+(-0.0525796600116)*x[1]**o+(-0.556886341914)*x[1]+(-0.288209814683)*x[2]**o+(-0.309696771495)*x[2]
-        arg[3,2,0,0]=(-0.300806388527)*x[0]**o+(-0.39334416908)*x[0]+(0.000711617540648)*x[1]**o+(-0.618539958736)*x[1]+(0.0574098223152)*x[2]**o+(-0.351595384168)*x[2]
-        arg[3,2,0,1]=(-0.898675793892)*x[0]**o+(0.904479958277)*x[0]+(0.0781945046018)*x[1]**o+(-0.0461053392586)*x[1]+(0.844798127031)*x[2]**o+(-0.82306838709)*x[2]
-        arg[3,2,1,0]=(-0.268742335093)*x[0]**o+(-0.532639944208)*x[0]+(0.0101227109551)*x[1]**o+(-0.438312865518)*x[1]+(0.104288648246)*x[2]**o+(-0.115669027311)*x[2]
-        arg[3,2,1,1]=(0.639871308792)*x[0]**o+(0.260847628514)*x[0]+(-0.455670719167)*x[1]**o+(0.210619035618)*x[1]+(-0.401809068119)*x[2]**o+(-0.0625194517026)*x[2]
-        arg[3,2,2,0]=(-0.713684223829)*x[0]**o+(0.214281604766)*x[0]+(-0.60152592324)*x[1]**o+(0.249807228316)*x[1]+(-0.939395078261)*x[2]**o+(-0.519744396388)*x[2]
-        arg[3,2,2,1]=(-0.340588993443)*x[0]**o+(-0.0165543854997)*x[0]+(-0.366479789338)*x[1]**o+(0.316347630987)*x[1]+(-0.457055798679)*x[2]**o+(-0.132368055553)*x[2]
-        arg[3,3,0,0]=(-0.745211736715)*x[0]**o+(0.0106787556884)*x[0]+(-0.448180943446)*x[1]**o+(0.694982281891)*x[1]+(0.924431258221)*x[2]**o+(-0.841633806168)*x[2]
-        arg[3,3,0,1]=(0.368054364362)*x[0]**o+(0.19288251992)*x[0]+(0.565854068035)*x[1]**o+(0.747534544754)*x[1]+(0.473165789569)*x[2]**o+(-0.59399986706)*x[2]
-        arg[3,3,1,0]=(-0.142707671693)*x[0]**o+(0.177095043535)*x[0]+(-0.348946846847)*x[1]**o+(-0.545430013244)*x[1]+(-0.671405653136)*x[2]**o+(-0.531699969702)*x[2]
-        arg[3,3,1,1]=(0.783201055631)*x[0]**o+(0.899495042323)*x[0]+(0.117802924059)*x[1]**o+(-0.277400900172)*x[1]+(-0.351268362305)*x[2]**o+(0.52756480897)*x[2]
-        arg[3,3,2,0]=(-0.866758006698)*x[0]**o+(0.293139875238)*x[0]+(-0.318394231317)*x[1]**o+(-0.783701622124)*x[1]+(-0.95137399655)*x[2]**o+(-0.474198736639)*x[2]
-        arg[3,3,2,1]=(0.0428398560619)*x[0]**o+(-0.970180601102)*x[0]+(-0.753897573393)*x[1]**o+(-0.0873352699251)*x[1]+(-0.131440532574)*x[2]**o+(0.875241605077)*x[2]
-        arg[3,4,0,0]=(0.32399493643)*x[0]**o+(0.67295092524)*x[0]+(-0.29221110671)*x[1]**o+(0.118066079866)*x[1]+(-0.566541154667)*x[2]**o+(-0.806367499079)*x[2]
-        arg[3,4,0,1]=(0.278776399755)*x[0]**o+(0.472327826919)*x[0]+(-0.956871861949)*x[1]**o+(0.109236874792)*x[1]+(-0.494095116883)*x[2]**o+(-0.194313775518)*x[2]
-        arg[3,4,1,0]=(0.650920037415)*x[0]**o+(0.977698516929)*x[0]+(-0.0730777837998)*x[1]**o+(-0.576543152032)*x[1]+(0.781481934657)*x[2]**o+(-0.389328840554)*x[2]
-        arg[3,4,1,1]=(-0.798341529522)*x[0]**o+(-0.630245234712)*x[0]+(-0.444550323489)*x[1]**o+(-0.539189248295)*x[1]+(-0.904964423673)*x[2]**o+(-0.611560462796)*x[2]
-        arg[3,4,2,0]=(-0.392991417685)*x[0]**o+(0.313599061567)*x[0]+(-0.215747337398)*x[1]**o+(-0.310316872476)*x[1]+(-0.269452617785)*x[2]**o+(0.684353794645)*x[2]
-        arg[3,4,2,1]=(-0.586668781403)*x[0]**o+(-0.0711284937177)*x[0]+(0.408273850302)*x[1]**o+(0.761860299288)*x[1]+(0.902079242449)*x[2]**o+(0.70161017722)*x[2]
-        ref[0,0,0,0]=(1.43173970815)/(o+1.)+(-0.156396435558)
-        ref[0,0,0,1]=(0.459165989186)/(o+1.)+(0.194399341676)
-        ref[0,0,1,0]=(0.989528642545)/(o+1.)+(-0.164206368911)
-        ref[0,0,1,1]=(1.37152584676)/(o+1.)+(-0.234493053498)
-        ref[0,0,2,0]=(0.422741924108)/(o+1.)+(0.0721378026728)
-        ref[0,0,2,1]=(-0.574467903086)/(o+1.)+(0.167204674462)
-        ref[0,1,0,0]=(1.36619629735)/(o+1.)+(-0.19947081885)
-        ref[0,1,0,1]=(-1.60758660729)/(o+1.)+(0.447728236186)
-        ref[0,1,1,0]=(1.5106959073)/(o+1.)+(-0.393852180331)
-        ref[0,1,1,1]=(1.85678121239)/(o+1.)+(-0.529280397551)
-        ref[0,1,2,0]=(-0.796337866944)/(o+1.)+(0.0812355940636)
-        ref[0,1,2,1]=(-0.333114331422)/(o+1.)+(1.22614026311)
-        ref[0,2,0,0]=(0.516540083621)/(o+1.)+(-0.358761510118)
-        ref[0,2,0,1]=(-2.72820411942)/(o+1.)+(0.15972705639)
-        ref[0,2,1,0]=(-0.440149466937)/(o+1.)+(-0.124216123318)
-        ref[0,2,1,1]=(-0.137940536755)/(o+1.)+(0.13992652657)
-        ref[0,2,2,0]=(0.373759361058)/(o+1.)+(0.210996140796)
-        ref[0,2,2,1]=(-1.07034621798)/(o+1.)+(1.2905860125)
-        ref[0,3,0,0]=(0.923495049095)/(o+1.)+(-0.897043344396)
-        ref[0,3,0,1]=(-0.20180799615)/(o+1.)+(0.272652457923)
-        ref[0,3,1,0]=(-0.831052678484)/(o+1.)+(0.326929849662)
-        ref[0,3,1,1]=(1.41523396695)/(o+1.)+(-0.5275927117)
-        ref[0,3,2,0]=(0.405715363821)/(o+1.)+(0.535330516568)
-        ref[0,3,2,1]=(0.877269821733)/(o+1.)+(-0.666082812121)
-        ref[0,4,0,0]=(0.884126703786)/(o+1.)+(-0.559427998262)
-        ref[0,4,0,1]=(-1.36933304826)/(o+1.)+(0.263100182211)
-        ref[0,4,1,0]=(0.871486955825)/(o+1.)+(0.381595437312)
-        ref[0,4,1,1]=(1.21446122052)/(o+1.)+(-0.642161706726)
-        ref[0,4,2,0]=(-1.82861338966)/(o+1.)+(0.507433118531)
-        ref[0,4,2,1]=(0.0642039966469)/(o+1.)+(0.551348562604)
-        ref[1,0,0,0]=(0.40922616303)/(o+1.)+(-0.474630105482)
-        ref[1,0,0,1]=(1.63943889768)/(o+1.)+(0.285622914296)
-        ref[1,0,1,0]=(0.0845961115353)/(o+1.)+(0.143628502705)
-        ref[1,0,1,1]=(0.62129375936)/(o+1.)+(0.671645835511)
-        ref[1,0,2,0]=(-1.2004575453)/(o+1.)+(0.701757992696)
-        ref[1,0,2,1]=(0.435963491825)/(o+1.)+(0.26710538393)
-        ref[1,1,0,0]=(0.738921325407)/(o+1.)+(-0.0258542444502)
-        ref[1,1,0,1]=(1.95599148183)/(o+1.)+(0.652818492883)
-        ref[1,1,1,0]=(0.500576647095)/(o+1.)+(0.857652485995)
-        ref[1,1,1,1]=(-0.0151750762821)/(o+1.)+(0.238827857598)
-        ref[1,1,2,0]=(1.26963005373)/(o+1.)+(-0.299065008888)
-        ref[1,1,2,1]=(-0.82289389301)/(o+1.)+(0.14939351077)
-        ref[1,2,0,0]=(-0.495951362447)/(o+1.)+(-0.532833788304)
-        ref[1,2,0,1]=(-1.87785443639)/(o+1.)+(-0.521209467732)
-        ref[1,2,1,0]=(-0.374085962184)/(o+1.)+(0.505583421209)
-        ref[1,2,1,1]=(1.01773556605)/(o+1.)+(0.764863466171)
-        ref[1,2,2,0]=(-1.54049109838)/(o+1.)+(-0.511296952595)
-        ref[1,2,2,1]=(-1.06948953348)/(o+1.)+(-0.215299794811)
-        ref[1,3,0,0]=(-1.20198777829)/(o+1.)+(-0.274360734317)
-        ref[1,3,0,1]=(1.13519842695)/(o+1.)+(0.506840913294)
-        ref[1,3,1,0]=(0.973820116369)/(o+1.)+(0.485786110977)
-        ref[1,3,1,1]=(0.155263308828)/(o+1.)+(0.473436850817)
-        ref[1,3,2,0]=(0.476069733748)/(o+1.)+(-0.228046397052)
-        ref[1,3,2,1]=(-0.234851551487)/(o+1.)+(-0.574065011567)
-        ref[1,4,0,0]=(1.95924908786)/(o+1.)+(-0.493262726539)
-        ref[1,4,0,1]=(-0.448532656782)/(o+1.)+(0.393812699074)
-        ref[1,4,1,0]=(0.235155577808)/(o+1.)+(0.756260258803)
-        ref[1,4,1,1]=(0.0334282473144)/(o+1.)+(-0.837406551217)
-        ref[1,4,2,0]=(0.568132489684)/(o+1.)+(-0.13055465798)
-        ref[1,4,2,1]=(-0.380042596089)/(o+1.)+(0.243737215624)
-        ref[2,0,0,0]=(1.76568035823)/(o+1.)+(0.0789834372326)
-        ref[2,0,0,1]=(-0.20023919191)/(o+1.)+(0.901466917208)
-        ref[2,0,1,0]=(-1.20715877778)/(o+1.)+(-0.992500439486)
-        ref[2,0,1,1]=(-0.761913514624)/(o+1.)+(0.465965334128)
-        ref[2,0,2,0]=(-0.944104213428)/(o+1.)+(-0.146881270459)
-        ref[2,0,2,1]=(0.105283971659)/(o+1.)+(-1.30498791712)
-        ref[2,1,0,0]=(-0.804721214141)/(o+1.)+(0.356736186609)
-        ref[2,1,0,1]=(-0.0358563948854)/(o+1.)+(-0.24146509617)
-        ref[2,1,1,0]=(-0.437556173502)/(o+1.)+(-0.387215578175)
-        ref[2,1,1,1]=(-0.0786030951662)/(o+1.)+(0.654838009465)
-        ref[2,1,2,0]=(-0.859200342885)/(o+1.)+(-0.112407873885)
-        ref[2,1,2,1]=(-0.296679106354)/(o+1.)+(0.0491751507381)
-        ref[2,2,0,0]=(0.462408531841)/(o+1.)+(-0.557975521593)
-        ref[2,2,0,1]=(-0.0634225791893)/(o+1.)+(0.0468185300489)
-        ref[2,2,1,0]=(1.08205349937)/(o+1.)+(0.621257561187)
-        ref[2,2,1,1]=(0.88864389409)/(o+1.)+(0.849886105205)
-        ref[2,2,2,0]=(2.01702912587)/(o+1.)+(0.755558425167)
-        ref[2,2,2,1]=(1.41263009001)/(o+1.)+(0.331281133791)
-        ref[2,3,0,0]=(1.91485193421)/(o+1.)+(0.0643042152414)
-        ref[2,3,0,1]=(1.86113720031)/(o+1.)+(0.870090339646)
-        ref[2,3,1,0]=(0.442533807126)/(o+1.)+(-0.690437405116)
-        ref[2,3,1,1]=(1.52774754257)/(o+1.)+(-0.236667038211)
-        ref[2,3,2,0]=(1.08558789233)/(o+1.)+(-0.346580362392)
-        ref[2,3,2,1]=(-0.771732912166)/(o+1.)+(-0.49697903252)
-        ref[2,4,0,0]=(1.0510676744)/(o+1.)+(0.18646253745)
-        ref[2,4,0,1]=(-0.878875991119)/(o+1.)+(-0.271299000644)
-        ref[2,4,1,0]=(-0.75026757693)/(o+1.)+(-0.168751100981)
-        ref[2,4,1,1]=(0.526155063499)/(o+1.)+(1.041034953)
-        ref[2,4,2,0]=(0.377792294719)/(o+1.)+(0.433767213151)
-        ref[2,4,2,1]=(0.114142925831)/(o+1.)+(-0.972051850709)
-        ref[3,0,0,0]=(0.15538316839)/(o+1.)+(-0.861229788808)
-        ref[3,0,0,1]=(-0.725501605569)/(o+1.)+(-0.248009661269)
-        ref[3,0,1,0]=(0.791443284981)/(o+1.)+(0.618118504587)
-        ref[3,0,1,1]=(-0.411749416988)/(o+1.)+(0.125302421245)
-        ref[3,0,2,0]=(0.0968028463245)/(o+1.)+(0.592149023513)
-        ref[3,0,2,1]=(0.0947000244134)/(o+1.)+(0.286498958939)
-        ref[3,1,0,0]=(0.823197755916)/(o+1.)+(-0.378154495725)
-        ref[3,1,0,1]=(1.21588193285)/(o+1.)+(0.0126566819682)
-        ref[3,1,1,0]=(0.529639159192)/(o+1.)+(-0.619204956255)
-        ref[3,1,1,1]=(1.85472331764)/(o+1.)+(0.3317212712)
-        ref[3,1,2,0]=(-0.0770331978898)/(o+1.)+(0.0545214351076)
-        ref[3,1,2,1]=(0.46556780359)/(o+1.)+(-0.223576369421)
-        ref[3,2,0,0]=(-0.242684948671)/(o+1.)+(-0.681739755992)
-        ref[3,2,0,1]=(0.0243168377401)/(o+1.)+(0.0176531159642)
-        ref[3,2,1,0]=(-0.154330975892)/(o+1.)+(-0.543310918519)
-        ref[3,2,1,1]=(-0.217608478494)/(o+1.)+(0.204473606215)
-        ref[3,2,2,0]=(-2.25460522533)/(o+1.)+(-0.0278277816531)
-        ref[3,2,2,1]=(-1.16412458146)/(o+1.)+(0.0837125949668)
-        ref[3,3,0,0]=(-0.26896142194)/(o+1.)+(-0.0679863842941)
-        ref[3,3,0,1]=(1.40707422197)/(o+1.)+(0.173208598807)
-        ref[3,3,1,0]=(-1.16306017168)/(o+1.)+(-0.450017469706)
-        ref[3,3,1,1]=(0.549735617385)/(o+1.)+(0.57482947556)
-        ref[3,3,2,0]=(-2.13652623456)/(o+1.)+(-0.482380241762)
-        ref[3,3,2,1]=(-0.842498249905)/(o+1.)+(-0.0911371329748)
-        ref[3,4,0,0]=(-0.534757324947)/(o+1.)+(-0.00767524698684)
-        ref[3,4,0,1]=(-1.17219057908)/(o+1.)+(0.193625463097)
-        ref[3,4,1,0]=(1.35932418827)/(o+1.)+(0.00591326217154)
-        ref[3,4,1,1]=(-2.14785627668)/(o+1.)+(-0.890497472901)
-        ref[3,4,2,0]=(-0.878191372868)/(o+1.)+(0.343817991868)
-        ref[3,4,2,1]=(0.723684311348)/(o+1.)+(0.696170991395)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      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.729700679932)*x[0]+(-1.38329769179)*x[1]
-        ref=(0.329728333821)/(o+1.)+(-0.491662672839)
-      else:
-        arg=(-1.75076012766)*x[0]+(-0.0862990889349)*x[1]+(0.637429232833)*x[2]
-        ref=(-0.577517867896)/(o+1.)+(-0.311056057931)
-      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 the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(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]=(1.0296233191)*x[0]+(-0.347985432388)*x[1]
-        arg[1]=(-0.182082548052)*x[0]+(0.114822539064)*x[1]
-        ref[0]=(0.876900301573)/(o+1.)+(-0.0976312074308)
-        ref[1]=(-1.09276229827)/(o+1.)+(0.512751144643)
-      else:
-        arg[0]=(0.390938934986)*x[0]+(-0.17813109236)*x[1]+(0.92611177061)*x[2]
-        arg[1]=(0.169562781554)*x[0]+(-0.149625135256)*x[1]+(0.357445984273)*x[2]
-        ref[0]=(1.07308269316)/(o+1.)+(0.0329184600363)
-        ref[1]=(-1.07527269336)/(o+1.)+(0.726328161966)
-      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_ReducedSolution_rank2(self):
-      """
-      tests integral of rank 2 Data on the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.798668686601)*x[0]+(-0.502017718729)*x[1]
-        arg[0,1]=(-0.682368031728)*x[0]+(-0.915048032379)*x[1]
-        arg[0,2]=(-0.0237771508029)*x[0]+(0.177441262563)*x[1]
-        arg[0,3]=(0.135600942216)*x[0]+(0.496697614771)*x[1]
-        arg[0,4]=(0.495272681631)*x[0]+(-0.457599050745)*x[1]
-        arg[1,0]=(-0.252415627225)*x[0]+(-0.820872546406)*x[1]
-        arg[1,1]=(-0.183362696688)*x[0]+(-0.721277471492)*x[1]
-        arg[1,2]=(0.401101418876)*x[0]+(0.0483185737314)*x[1]
-        arg[1,3]=(0.251246583055)*x[0]+(-0.837901564153)*x[1]
-        arg[1,4]=(0.2984760032)*x[0]+(0.0504569221307)*x[1]
-        arg[2,0]=(1.18468310151)*x[0]+(-0.545612792222)*x[1]
-        arg[2,1]=(-1.08451540544)*x[0]+(0.820927137753)*x[1]
-        arg[2,2]=(0.85435600905)*x[0]+(-0.309819803422)*x[1]
-        arg[2,3]=(-0.184148030844)*x[0]+(0.978315441698)*x[1]
-        arg[2,4]=(1.36943188922)*x[0]+(-1.3176984733)*x[1]
-        arg[3,0]=(0.42189213134)*x[0]+(1.23097633986)*x[1]
-        arg[3,1]=(0.0409353425792)*x[0]+(-1.15555830367)*x[1]
-        arg[3,2]=(0.557942070395)*x[0]+(-0.591659744114)*x[1]
-        arg[3,3]=(-1.07432449167)*x[0]+(-0.665475086161)*x[1]
-        arg[3,4]=(-1.00421972544)*x[0]+(1.16737316771)*x[1]
-        ref[0,0]=(-0.400434079596)/(o+1.)+(-0.450126162867)
-        ref[0,1]=(-1.35836659237)/(o+1.)+(-0.11952473587)
-        ref[0,2]=(0.154775934077)/(o+1.)+(-0.000555911158727)
-        ref[0,3]=(-0.177525502969)/(o+1.)+(0.404912029978)
-        ref[0,4]=(1.00122501632)/(o+1.)+(-0.481775692719)
-        ref[1,0]=(-1.37507083806)/(o+1.)+(0.150891332214)
-        ref[1,1]=(-1.37429063854)/(o+1.)+(0.234825235182)
-        ref[1,2]=(1.30069236547)/(o+1.)+(-0.425636186429)
-        ref[1,3]=(-0.414658324515)/(o+1.)+(-0.0859983282917)
-        ref[1,4]=(0.757097138678)/(o+1.)+(-0.204082106674)
-        ref[2,0]=(1.09244584366)/(o+1.)+(-0.226687767185)
-        ref[2,1]=(0.109481169277)/(o+1.)+(-0.186534718481)
-        ref[2,2]=(0.587125473152)/(o+1.)+(-0.0212946337622)
-        ref[2,3]=(0.00878695699842)/(o+1.)+(0.392690226928)
-        ref[2,4]=(0.306810290785)/(o+1.)+(-0.127538437433)
-        ref[3,0]=(0.317826050636)/(o+1.)+(0.667521210281)
-        ref[3,1]=(-0.276254182573)/(o+1.)+(-0.419184389261)
-        ref[3,2]=(-0.753831729065)/(o+1.)+(0.360057027673)
-        ref[3,3]=(-1.40505001195)/(o+1.)+(-0.167374782943)
-        ref[3,4]=(0.53112066724)/(o+1.)+(-0.183983612488)
-      else:
-        arg[0,0]=(1.54447818842)*x[0]+(-0.560568590939)*x[1]+(-1.33749549019)*x[2]
-        arg[0,1]=(-0.535544800192)*x[0]+(-0.732513980801)*x[1]+(0.309855030569)*x[2]
-        arg[0,2]=(-0.45251604551)*x[0]+(-0.0933932995351)*x[1]+(-0.465724167794)*x[2]
-        arg[0,3]=(0.10344455234)*x[0]+(-0.0451254971766)*x[1]+(-1.39912042607)*x[2]
-        arg[0,4]=(0.617585449939)*x[0]+(1.27357810776)*x[1]+(-0.840161322302)*x[2]
-        arg[1,0]=(0.650274355535)*x[0]+(0.547805408891)*x[1]+(0.314350326062)*x[2]
-        arg[1,1]=(0.697200474806)*x[0]+(0.558681734309)*x[1]+(-0.0277936766536)*x[2]
-        arg[1,2]=(-0.508578328229)*x[0]+(-0.513894226666)*x[1]+(-0.528417418023)*x[2]
-        arg[1,3]=(-1.50391414876)*x[0]+(0.174080260823)*x[1]+(-1.48528641514)*x[2]
-        arg[1,4]=(0.859470776434)*x[0]+(-0.121348493404)*x[1]+(1.69796346547)*x[2]
-        arg[2,0]=(1.00593912049)*x[0]+(0.794254020467)*x[1]+(-1.02770358461)*x[2]
-        arg[2,1]=(-1.64586076188)*x[0]+(-0.83927167526)*x[1]+(-1.13088449805)*x[2]
-        arg[2,2]=(0.0628777004357)*x[0]+(-1.27316091149)*x[1]+(0.417655047748)*x[2]
-        arg[2,3]=(-1.43661526118)*x[0]+(0.0676042964527)*x[1]+(0.174947572442)*x[2]
-        arg[2,4]=(0.504347051098)*x[0]+(-1.62976096707)*x[1]+(0.61579932957)*x[2]
-        arg[3,0]=(1.05212645875)*x[0]+(-1.10517003049)*x[1]+(0.902242097595)*x[2]
-        arg[3,1]=(-0.997611854104)*x[0]+(-1.53611378293)*x[1]+(0.322835276897)*x[2]
-        arg[3,2]=(-0.815135194015)*x[0]+(0.357734619962)*x[1]+(0.684966069635)*x[2]
-        arg[3,3]=(0.4545417685)*x[0]+(0.386262464083)*x[1]+(0.131414279708)*x[2]
-        arg[3,4]=(-0.222694646001)*x[0]+(-0.470499833621)*x[1]+(-0.593290862391)*x[2]
-        ref[0,0]=(-0.593803934901)/(o+1.)+(0.120109021094)
-        ref[0,1]=(0.0569115377867)/(o+1.)+(-0.507557644105)
-        ref[0,2]=(-0.202741590274)/(o+1.)+(-0.404445961283)
-        ref[0,3]=(-0.516888777015)/(o+1.)+(-0.411956296948)
-        ref[0,4]=(0.52292787417)/(o+1.)+(0.264037180616)
-        ref[1,0]=(-0.102685279742)/(o+1.)+(0.807557685115)
-        ref[1,1]=(1.44527264276)/(o+1.)+(-0.108592055148)
-        ref[1,2]=(-0.448767718864)/(o+1.)+(-0.551061127027)
-        ref[1,3]=(-1.19936004685)/(o+1.)+(-0.807880128113)
-        ref[1,4]=(1.09918755605)/(o+1.)+(0.668449096223)
-        ref[2,0]=(-0.873708007453)/(o+1.)+(0.823098781902)
-        ref[2,1]=(-1.9697776018)/(o+1.)+(-0.823119666698)
-        ref[2,2]=(0.598023292545)/(o+1.)+(-0.695325727928)
-        ref[2,3]=(-0.486077421455)/(o+1.)+(-0.353992985415)
-        ref[2,4]=(0.65037669171)/(o+1.)+(-0.579995639058)
-        ref[3,0]=(0.115401170876)/(o+1.)+(0.366898677493)
-        ref[3,1]=(-0.836209920174)/(o+1.)+(-0.68734021998)
-        ref[3,2]=(0.753819223079)/(o+1.)+(-0.263126863749)
-        ref[3,3]=(-0.75294945942)/(o+1.)+(0.862583985856)
-        ref[3,4]=(-1.44356156537)/(o+1.)+(0.0785381116785)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.409425595197)*x[0]+(-0.992427840513)*x[1]
-        arg[0,0,1]=(0.645693185569)*x[0]+(-1.38338827813)*x[1]
-        arg[0,1,0]=(0.838847764041)*x[0]+(-1.01358491173)*x[1]
-        arg[0,1,1]=(0.381938057912)*x[0]+(0.61979806953)*x[1]
-        arg[1,0,0]=(-1.36783302742)*x[0]+(-0.132422986617)*x[1]
-        arg[1,0,1]=(-0.137283745381)*x[0]+(0.633534018338)*x[1]
-        arg[1,1,0]=(0.0698189930006)*x[0]+(-1.45980415637)*x[1]
-        arg[1,1,1]=(-0.391725001578)*x[0]+(0.355258883756)*x[1]
-        arg[2,0,0]=(-0.596091494216)*x[0]+(-0.911870026464)*x[1]
-        arg[2,0,1]=(0.138007894626)*x[0]+(1.76859278751)*x[1]
-        arg[2,1,0]=(-0.791803431843)*x[0]+(-0.813170959331)*x[1]
-        arg[2,1,1]=(-1.05466714677)*x[0]+(-1.12822729059)*x[1]
-        arg[3,0,0]=(-0.417845531677)*x[0]+(1.13689234148)*x[1]
-        arg[3,0,1]=(-0.0323347813877)*x[0]+(1.14381520037)*x[1]
-        arg[3,1,0]=(0.639524393892)*x[0]+(0.864696525716)*x[1]
-        arg[3,1,1]=(0.593104139176)*x[0]+(0.812642260561)*x[1]
-        arg[4,0,0]=(-0.0580034066457)*x[0]+(0.802938738147)*x[1]
-        arg[4,0,1]=(0.722143376522)*x[0]+(0.843814429252)*x[1]
-        arg[4,1,0]=(-0.574057925551)*x[0]+(-0.298232158953)*x[1]
-        arg[4,1,1]=(0.422529038525)*x[0]+(0.841942812244)*x[1]
-        arg[5,0,0]=(1.90272013575)*x[0]+(-1.84811498267)*x[1]
-        arg[5,0,1]=(-1.52156314991)*x[0]+(-0.797833417606)*x[1]
-        arg[5,1,0]=(0.723748480291)*x[0]+(0.8667659268)*x[1]
-        arg[5,1,1]=(-0.70289499551)*x[0]+(-0.726595802952)*x[1]
-        ref[0,0,0]=(-1.1719312491)/(o+1.)+(-0.114961093303)
-        ref[0,0,1]=(0.229993657297)/(o+1.)+(-0.483844374927)
-        ref[0,1,0]=(-0.630442924796)/(o+1.)+(0.227852888553)
-        ref[0,1,1]=(-0.806392286115)/(o+1.)+(0.904064206778)
-        ref[1,0,0]=(-1.38312106397)/(o+1.)+(-0.0585674750338)
-        ref[1,0,1]=(0.595552955095)/(o+1.)+(-0.049651341069)
-        ref[1,1,0]=(-1.63606241234)/(o+1.)+(0.123038624483)
-        ref[1,1,1]=(-0.340463713286)/(o+1.)+(0.151998797732)
-        ref[2,0,0]=(-1.31925158304)/(o+1.)+(-0.094354968822)
-        ref[2,0,1]=(0.699277735512)/(o+1.)+(0.60366147331)
-        ref[2,1,0]=(-0.219878898763)/(o+1.)+(-0.692547746205)
-        ref[2,1,1]=(-1.46750249607)/(o+1.)+(-0.357695970647)
-        ref[3,0,0]=(0.71941698906)/(o+1.)+(-0.000185089626866)
-        ref[3,0,1]=(-0.526993313502)/(o+1.)+(0.819236866243)
-        ref[3,1,0]=(1.51671320209)/(o+1.)+(-0.00624614123899)
-        ref[3,1,1]=(1.05185683613)/(o+1.)+(0.176944781803)
-        ref[4,0,0]=(1.20432711487)/(o+1.)+(-0.229695891683)
-        ref[4,0,1]=(1.26863112516)/(o+1.)+(0.14866334031)
-        ref[4,1,0]=(0.34377834331)/(o+1.)+(-0.608034213907)
-        ref[4,1,1]=(-0.189568721058)/(o+1.)+(0.727020285914)
-        ref[5,0,0]=(0.116981035747)/(o+1.)+(-0.0311879413343)
-        ref[5,0,1]=(-0.638728138162)/(o+1.)+(-0.840334214679)
-        ref[5,1,0]=(0.891634589919)/(o+1.)+(0.349439908586)
-        ref[5,1,1]=(-0.552480077628)/(o+1.)+(-0.438505360418)
-      else:
-        arg[0,0,0]=(-0.662295604848)*x[0]+(1.04606412328)*x[1]+(-0.376008345205)*x[2]
-        arg[0,0,1]=(1.25030158303)*x[0]+(-0.0735167236581)*x[1]+(1.31623868156)*x[2]
-        arg[0,1,0]=(0.717953620717)*x[0]+(-0.700464709991)*x[1]+(0.0345381771501)*x[2]
-        arg[0,1,1]=(0.225944321569)*x[0]+(-1.09510173632)*x[1]+(-0.371235420166)*x[2]
-        arg[1,0,0]=(-0.0755865552996)*x[0]+(-0.168214695387)*x[1]+(-0.437427629408)*x[2]
-        arg[1,0,1]=(-1.52674685128)*x[0]+(-0.408158359188)*x[1]+(0.750091649824)*x[2]
-        arg[1,1,0]=(-0.572400948498)*x[0]+(-0.802826119419)*x[1]+(-1.0233358643)*x[2]
-        arg[1,1,1]=(0.623156259061)*x[0]+(0.378774331134)*x[1]+(0.0419766309042)*x[2]
-        arg[2,0,0]=(0.443271002813)*x[0]+(-0.930092172267)*x[1]+(-0.20199150178)*x[2]
-        arg[2,0,1]=(0.408614848881)*x[0]+(-1.3007040171)*x[1]+(-0.872615408174)*x[2]
-        arg[2,1,0]=(-0.174910742406)*x[0]+(1.64872582781)*x[1]+(0.701172036891)*x[2]
-        arg[2,1,1]=(0.417145974895)*x[0]+(0.428983721984)*x[1]+(-0.000787616769604)*x[2]
-        arg[3,0,0]=(0.655644872855)*x[0]+(-0.268612479186)*x[1]+(0.11779790898)*x[2]
-        arg[3,0,1]=(-0.244670332245)*x[0]+(-0.857502890419)*x[1]+(0.111792341131)*x[2]
-        arg[3,1,0]=(0.131303542183)*x[0]+(0.231230724482)*x[1]+(0.116997126513)*x[2]
-        arg[3,1,1]=(0.725434968911)*x[0]+(1.00206695553)*x[1]+(-0.319715936784)*x[2]
-        arg[4,0,0]=(1.30949067662)*x[0]+(-1.14809917605)*x[1]+(0.00529778192088)*x[2]
-        arg[4,0,1]=(0.969626585498)*x[0]+(-0.517908035476)*x[1]+(1.0467168328)*x[2]
-        arg[4,1,0]=(0.362824899886)*x[0]+(0.890586602899)*x[1]+(-0.135163953653)*x[2]
-        arg[4,1,1]=(-0.10353577028)*x[0]+(-0.0997924233294)*x[1]+(0.308973949876)*x[2]
-        arg[5,0,0]=(-1.37242244095)*x[0]+(-0.746928231432)*x[1]+(-1.37385481504)*x[2]
-        arg[5,0,1]=(0.231730881472)*x[0]+(-0.250265629505)*x[1]+(-0.903599685792)*x[2]
-        arg[5,1,0]=(-0.813783753893)*x[0]+(0.41081474894)*x[1]+(-0.541868665288)*x[2]
-        arg[5,1,1]=(0.19296641571)*x[0]+(1.8056250646)*x[1]+(0.283675443031)*x[2]
-        ref[0,0,0]=(0.859538687531)/(o+1.)+(-0.425889257151)
-        ref[0,0,1]=(-0.0674840316504)/(o+1.)+(1.28025378629)
-        ref[0,1,0]=(-0.76922088579)/(o+1.)+(0.410623986833)
-        ref[0,1,1]=(-0.582981712778)/(o+1.)+(-0.328705561068)
-        ref[1,0,0]=(1.25605113432)/(o+1.)+(-0.968640007206)
-        ref[1,0,1]=(-1.59448994908)/(o+1.)+(0.204838194218)
-        ref[1,1,0]=(-2.07497671334)/(o+1.)+(-0.161793109438)
-        ref[1,1,1]=(0.199659680372)/(o+1.)+(0.422123770364)
-        ref[2,0,0]=(-1.86970457224)/(o+1.)+(0.590445950504)
-        ref[2,0,1]=(-1.09505237157)/(o+1.)+(-0.334826102411)
-        ref[2,1,0]=(0.395146564722)/(o+1.)+(0.889920278785)
-        ref[2,1,1]=(1.13315474193)/(o+1.)+(-0.143906330909)
-        ref[3,0,0]=(-0.804398097072)/(o+1.)+(0.65461419986)
-        ref[3,0,1]=(-0.829074327243)/(o+1.)+(-0.0806532771448)
-        ref[3,1,0]=(0.126278821088)/(o+1.)+(0.176626286045)
-        ref[3,1,1]=(-0.498753315826)/(o+1.)+(0.953269651743)
-        ref[4,0,0]=(0.33849802718)/(o+1.)+(-0.0859043723417)
-        ref[4,0,1]=(0.153172891455)/(o+1.)+(0.672631245684)
-        ref[4,1,0]=(1.42803542207)/(o+1.)+(-0.154893936468)
-        ref[4,1,1]=(0.605555698814)/(o+1.)+(-0.249954971274)
-        ref[5,0,0]=(-1.21823919194)/(o+1.)+(-1.13748314774)
-        ref[5,0,1]=(-1.13684484437)/(o+1.)+(0.107355205274)
-        ref[5,1,0]=(-1.21991007491)/(o+1.)+(0.137536202333)
-        ref[5,1,1]=(2.05825898341)/(o+1.)+(0.112003969962)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.2631296794)*x[0]+(-0.130117190301)*x[1]
-        arg[0,0,0,1]=(0.635732952218)*x[0]+(-0.647555274619)*x[1]
-        arg[0,0,1,0]=(1.06301179339)*x[0]+(-0.227813591181)*x[1]
-        arg[0,0,1,1]=(-0.519979711376)*x[0]+(1.04747480856)*x[1]
-        arg[0,0,2,0]=(0.0232818794686)*x[0]+(-1.14799687633)*x[1]
-        arg[0,0,2,1]=(0.359605391616)*x[0]+(-1.32942998109)*x[1]
-        arg[0,1,0,0]=(-0.555284020205)*x[0]+(0.11676202509)*x[1]
-        arg[0,1,0,1]=(-1.83479976366)*x[0]+(0.413168061643)*x[1]
-        arg[0,1,1,0]=(0.239736306037)*x[0]+(0.680002261596)*x[1]
-        arg[0,1,1,1]=(0.0555978436642)*x[0]+(1.28910533087)*x[1]
-        arg[0,1,2,0]=(0.732696470486)*x[0]+(0.538837927425)*x[1]
-        arg[0,1,2,1]=(0.528018376979)*x[0]+(1.20428218411)*x[1]
-        arg[0,2,0,0]=(0.863803666388)*x[0]+(0.187082373754)*x[1]
-        arg[0,2,0,1]=(-1.41490739709)*x[0]+(-0.741935114995)*x[1]
-        arg[0,2,1,0]=(0.0501211708116)*x[0]+(-0.370371645307)*x[1]
-        arg[0,2,1,1]=(-0.0353423795999)*x[0]+(1.00911245551)*x[1]
-        arg[0,2,2,0]=(1.79997397117)*x[0]+(0.240103369892)*x[1]
-        arg[0,2,2,1]=(0.926052414873)*x[0]+(0.00914357056458)*x[1]
-        arg[0,3,0,0]=(-1.38911305622)*x[0]+(-1.29285413766)*x[1]
-        arg[0,3,0,1]=(0.464908270265)*x[0]+(-0.354824878801)*x[1]
-        arg[0,3,1,0]=(0.17477491298)*x[0]+(0.882807721541)*x[1]
-        arg[0,3,1,1]=(0.633177386897)*x[0]+(-0.312628707154)*x[1]
-        arg[0,3,2,0]=(0.0841289229919)*x[0]+(-0.244085514309)*x[1]
-        arg[0,3,2,1]=(0.198631529554)*x[0]+(-0.324387433152)*x[1]
-        arg[0,4,0,0]=(-1.41503119851)*x[0]+(-0.760818812719)*x[1]
-        arg[0,4,0,1]=(-0.0326236565753)*x[0]+(0.835716629913)*x[1]
-        arg[0,4,1,0]=(1.84482629546)*x[0]+(-0.341557269651)*x[1]
-        arg[0,4,1,1]=(-0.380600663728)*x[0]+(-0.295663906776)*x[1]
-        arg[0,4,2,0]=(0.411308057157)*x[0]+(1.0109767907)*x[1]
-        arg[0,4,2,1]=(-1.10494637617)*x[0]+(0.401374247774)*x[1]
-        arg[1,0,0,0]=(0.437019391027)*x[0]+(0.0507256248679)*x[1]
-        arg[1,0,0,1]=(-0.399457976892)*x[0]+(1.60118981524)*x[1]
-        arg[1,0,1,0]=(-1.51289007675)*x[0]+(0.821406477166)*x[1]
-        arg[1,0,1,1]=(0.405770274494)*x[0]+(0.637591733337)*x[1]
-        arg[1,0,2,0]=(-1.4945593715)*x[0]+(1.0919176668)*x[1]
-        arg[1,0,2,1]=(-0.482868528044)*x[0]+(0.578004764959)*x[1]
-        arg[1,1,0,0]=(-1.44298476434)*x[0]+(0.197151370973)*x[1]
-        arg[1,1,0,1]=(1.38517677391)*x[0]+(0.915352009234)*x[1]
-        arg[1,1,1,0]=(1.69025511761)*x[0]+(0.0203268727501)*x[1]
-        arg[1,1,1,1]=(0.615392847773)*x[0]+(-0.301873832451)*x[1]
-        arg[1,1,2,0]=(0.3081860115)*x[0]+(-0.495230532585)*x[1]
-        arg[1,1,2,1]=(-0.0258752746808)*x[0]+(0.441629273958)*x[1]
-        arg[1,2,0,0]=(-0.947577742489)*x[0]+(0.218632343222)*x[1]
-        arg[1,2,0,1]=(0.520029690788)*x[0]+(0.403806873912)*x[1]
-        arg[1,2,1,0]=(1.32820278922)*x[0]+(-1.68314905373)*x[1]
-        arg[1,2,1,1]=(1.30409876916)*x[0]+(-0.721819171819)*x[1]
-        arg[1,2,2,0]=(1.37872038109)*x[0]+(0.0725139769178)*x[1]
-        arg[1,2,2,1]=(0.35593830057)*x[0]+(0.28751298465)*x[1]
-        arg[1,3,0,0]=(-1.17950311406)*x[0]+(-0.232819397686)*x[1]
-        arg[1,3,0,1]=(0.17340184781)*x[0]+(-0.43329852484)*x[1]
-        arg[1,3,1,0]=(-1.71125828064)*x[0]+(0.957284609667)*x[1]
-        arg[1,3,1,1]=(-0.429043922461)*x[0]+(0.15749154348)*x[1]
-        arg[1,3,2,0]=(-1.42626208855)*x[0]+(-1.12812746347)*x[1]
-        arg[1,3,2,1]=(0.490516645689)*x[0]+(0.559039786338)*x[1]
-        arg[1,4,0,0]=(0.436395831147)*x[0]+(0.382691724897)*x[1]
-        arg[1,4,0,1]=(1.27903773839)*x[0]+(-0.0642376846324)*x[1]
-        arg[1,4,1,0]=(0.503159792753)*x[0]+(0.392973700403)*x[1]
-        arg[1,4,1,1]=(0.0881500114326)*x[0]+(0.834121935361)*x[1]
-        arg[1,4,2,0]=(-0.620745962116)*x[0]+(-0.0770814791601)*x[1]
-        arg[1,4,2,1]=(0.0231684675117)*x[0]+(-1.33994827808)*x[1]
-        arg[2,0,0,0]=(-0.972311570714)*x[0]+(-0.235293375636)*x[1]
-        arg[2,0,0,1]=(0.21633355466)*x[0]+(0.11325401613)*x[1]
-        arg[2,0,1,0]=(0.922986727965)*x[0]+(-1.00516246282)*x[1]
-        arg[2,0,1,1]=(-0.740778981838)*x[0]+(0.616728971608)*x[1]
-        arg[2,0,2,0]=(1.73201175195)*x[0]+(-1.1634325209)*x[1]
-        arg[2,0,2,1]=(1.15829744421)*x[0]+(-1.87219685708)*x[1]
-        arg[2,1,0,0]=(-0.458901790255)*x[0]+(1.13812715713)*x[1]
-        arg[2,1,0,1]=(1.03315725208)*x[0]+(-0.112487270341)*x[1]
-        arg[2,1,1,0]=(-1.7070220527)*x[0]+(0.126058081856)*x[1]
-        arg[2,1,1,1]=(0.863301459388)*x[0]+(0.226670498194)*x[1]
-        arg[2,1,2,0]=(-1.0012992544)*x[0]+(-0.195604893926)*x[1]
-        arg[2,1,2,1]=(-0.128048233768)*x[0]+(0.827383267773)*x[1]
-        arg[2,2,0,0]=(-0.0876478859699)*x[0]+(1.69600082596)*x[1]
-        arg[2,2,0,1]=(-0.616278041482)*x[0]+(-0.995548774612)*x[1]
-        arg[2,2,1,0]=(0.780699602657)*x[0]+(-0.721498796198)*x[1]
-        arg[2,2,1,1]=(-1.17591990575)*x[0]+(-0.66080847955)*x[1]
-        arg[2,2,2,0]=(1.71259481962)*x[0]+(-1.12456334234)*x[1]
-        arg[2,2,2,1]=(-0.721345747555)*x[0]+(-1.28222132706)*x[1]
-        arg[2,3,0,0]=(-1.25971324146)*x[0]+(-0.00559590465243)*x[1]
-        arg[2,3,0,1]=(-0.49234245798)*x[0]+(0.30900436328)*x[1]
-        arg[2,3,1,0]=(1.3068919966)*x[0]+(-0.891484126193)*x[1]
-        arg[2,3,1,1]=(0.319277203381)*x[0]+(-0.535113401495)*x[1]
-        arg[2,3,2,0]=(0.529480518887)*x[0]+(0.00452686996008)*x[1]
-        arg[2,3,2,1]=(-1.0978905592)*x[0]+(-0.421513714335)*x[1]
-        arg[2,4,0,0]=(-1.27711509307)*x[0]+(-1.42208296178)*x[1]
-        arg[2,4,0,1]=(-0.621292314868)*x[0]+(-1.10962518414)*x[1]
-        arg[2,4,1,0]=(-0.183478331213)*x[0]+(1.0775900659)*x[1]
-        arg[2,4,1,1]=(1.07354953663)*x[0]+(0.869765287054)*x[1]
-        arg[2,4,2,0]=(-0.696050139647)*x[0]+(-0.120769338549)*x[1]
-        arg[2,4,2,1]=(-0.895597167617)*x[0]+(1.41025466606)*x[1]
-        arg[3,0,0,0]=(1.15262876611)*x[0]+(-0.505428168285)*x[1]
-        arg[3,0,0,1]=(-0.277585299138)*x[0]+(0.352683243558)*x[1]
-        arg[3,0,1,0]=(0.218694567952)*x[0]+(-0.170325565499)*x[1]
-        arg[3,0,1,1]=(0.297325594036)*x[0]+(0.459308129811)*x[1]
-        arg[3,0,2,0]=(-0.572509624935)*x[0]+(0.756188981433)*x[1]
-        arg[3,0,2,1]=(0.226462444009)*x[0]+(-1.42100784266)*x[1]
-        arg[3,1,0,0]=(-0.28388824767)*x[0]+(-0.306064847514)*x[1]
-        arg[3,1,0,1]=(-0.805831316478)*x[0]+(0.756933495912)*x[1]
-        arg[3,1,1,0]=(1.37344361233)*x[0]+(-0.377600924857)*x[1]
-        arg[3,1,1,1]=(-0.0725302533884)*x[0]+(-0.425074450201)*x[1]
-        arg[3,1,2,0]=(-0.066659431931)*x[0]+(1.39252394891)*x[1]
-        arg[3,1,2,1]=(0.593440019224)*x[0]+(-0.945629564385)*x[1]
-        arg[3,2,0,0]=(0.101850471598)*x[0]+(0.0552356415787)*x[1]
-        arg[3,2,0,1]=(-0.407603005372)*x[0]+(-0.849371670514)*x[1]
-        arg[3,2,1,0]=(0.435403192155)*x[0]+(0.213673097377)*x[1]
-        arg[3,2,1,1]=(0.424081872219)*x[0]+(-0.0800529063085)*x[1]
-        arg[3,2,2,0]=(0.189428134309)*x[0]+(-0.205813522374)*x[1]
-        arg[3,2,2,1]=(-0.51449771505)*x[0]+(0.0570738169919)*x[1]
-        arg[3,3,0,0]=(1.05431625119)*x[0]+(-0.0583139615539)*x[1]
-        arg[3,3,0,1]=(0.0292261008496)*x[0]+(-0.569482715214)*x[1]
-        arg[3,3,1,0]=(-0.155861158232)*x[0]+(0.628422800294)*x[1]
-        arg[3,3,1,1]=(-1.24050157391)*x[0]+(-1.83949885089)*x[1]
-        arg[3,3,2,0]=(-0.140709404689)*x[0]+(0.975529832713)*x[1]
-        arg[3,3,2,1]=(-0.290824210426)*x[0]+(-0.198373932879)*x[1]
-        arg[3,4,0,0]=(0.627236720719)*x[0]+(-0.306676521516)*x[1]
-        arg[3,4,0,1]=(-0.964303098626)*x[0]+(-0.701698363587)*x[1]
-        arg[3,4,1,0]=(-0.0447860906704)*x[0]+(0.324659175162)*x[1]
-        arg[3,4,1,1]=(1.28273443124)*x[0]+(-0.764329261143)*x[1]
-        arg[3,4,2,0]=(-0.023232709502)*x[0]+(-0.124231212653)*x[1]
-        arg[3,4,2,1]=(0.510754136991)*x[0]+(0.570492207442)*x[1]
-        ref[0,0,0,0]=(0.648764087616)/(o+1.)+(-0.521005478658)
-        ref[0,0,0,1]=(-0.0127476670646)/(o+1.)+(0.000462672331599)
-        ref[0,0,1,0]=(0.258601710827)/(o+1.)+(0.288298245692)
-        ref[0,0,1,1]=(0.0577415806545)/(o+1.)+(0.234876758266)
-        ref[0,0,2,0]=(-0.91129780757)/(o+1.)+(-0.106708594644)
-        ref[0,0,2,1]=(0.0841946322525)/(o+1.)+(-0.527009610865)
-        ref[0,1,0,0]=(0.111101563297)/(o+1.)+(-0.274811779206)
-        ref[0,1,0,1]=(-0.504062576651)/(o+1.)+(-0.458784562683)
-        ref[0,1,1,0]=(0.65560969277)/(o+1.)+(0.132064437431)
-        ref[0,1,1,1]=(0.0866382135955)/(o+1.)+(0.629032480469)
-        ref[0,1,2,0]=(1.36074036394)/(o+1.)+(-0.0446029830125)
-        ref[0,1,2,1]=(1.16071753175)/(o+1.)+(0.285791514672)
-        ref[0,2,0,0]=(0.693065154772)/(o+1.)+(0.178910442685)
-        ref[0,2,0,1]=(-1.41209835364)/(o+1.)+(-0.372372079222)
-        ref[0,2,1,0]=(-0.542625642859)/(o+1.)+(0.111187584182)
-        ref[0,2,1,1]=(0.628714449405)/(o+1.)+(0.172527813253)
-        ref[0,2,2,0]=(1.62887921583)/(o+1.)+(0.205599062617)
-        ref[0,2,2,1]=(1.0640301541)/(o+1.)+(-0.0644170843301)
-        ref[0,3,0,0]=(-1.09870552313)/(o+1.)+(-0.791630835375)
-        ref[0,3,0,1]=(0.260706656546)/(o+1.)+(-0.0753116325413)
-        ref[0,3,1,0]=(-0.0543842358149)/(o+1.)+(0.555983435168)
-        ref[0,3,1,1]=(0.0369075211917)/(o+1.)+(0.141820579276)
-        ref[0,3,2,0]=(-0.784250881508)/(o+1.)+(0.312147145095)
-        ref[0,3,2,1]=(-0.178450092422)/(o+1.)+(0.0263470944113)
-        ref[0,4,0,0]=(-0.993852999635)/(o+1.)+(-0.590998505799)
-        ref[0,4,0,1]=(-0.0449039600312)/(o+1.)+(0.423998466684)
-        ref[0,4,1,0]=(0.583535069477)/(o+1.)+(0.459866978166)
-        ref[0,4,1,1]=(-0.251020886878)/(o+1.)+(-0.212621841813)
-        ref[0,4,2,0]=(0.408688561613)/(o+1.)+(0.506798143121)
-        ref[0,4,2,1]=(0.537090447747)/(o+1.)+(-0.620331288072)
-        ref[1,0,0,0]=(0.37428496839)/(o+1.)+(0.0567300237522)
-        ref[1,0,0,1]=(0.777672833448)/(o+1.)+(0.212029502451)
-        ref[1,0,1,0]=(-0.745422608709)/(o+1.)+(0.026969504563)
-        ref[1,0,1,1]=(0.466434983875)/(o+1.)+(0.288463511978)
-        ref[1,0,2,0]=(0.237457788829)/(o+1.)+(-0.320049746767)
-        ref[1,0,2,1]=(0.346974181328)/(o+1.)+(-0.125918972207)
-        ref[1,1,0,0]=(-0.823737519034)/(o+1.)+(-0.211047937165)
-        ref[1,1,0,1]=(1.00324369541)/(o+1.)+(0.648642543871)
-        ref[1,1,1,0]=(0.674013158596)/(o+1.)+(0.518284415882)
-        ref[1,1,1,1]=(0.403142463029)/(o+1.)+(-0.0448117238535)
-        ref[1,1,2,0]=(0.0399328921703)/(o+1.)+(-0.113488706628)
-        ref[1,1,2,1]=(0.111446633645)/(o+1.)+(0.152153682816)
-        ref[1,2,0,0]=(-0.481646721692)/(o+1.)+(-0.123649338787)
-        ref[1,2,0,1]=(0.857170000026)/(o+1.)+(0.033333282337)
-        ref[1,2,1,0]=(-0.445362398126)/(o+1.)+(0.0452080668082)
-        ref[1,2,1,1]=(-0.256201827386)/(o+1.)+(0.419240712362)
-        ref[1,2,2,0]=(1.02991996311)/(o+1.)+(0.210657197448)
-        ref[1,2,2,1]=(0.355299316895)/(o+1.)+(0.144075984162)
-        ref[1,3,0,0]=(-0.679726322154)/(o+1.)+(-0.366298094796)
-        ref[1,3,0,1]=(-0.67885027329)/(o+1.)+(0.20947679813)
-        ref[1,3,1,0]=(-0.163081485233)/(o+1.)+(-0.295446092868)
-        ref[1,3,1,1]=(-0.035768623673)/(o+1.)+(-0.117891877654)
-        ref[1,3,2,0]=(-0.639368943038)/(o+1.)+(-0.957510304493)
-        ref[1,3,2,1]=(0.160615066001)/(o+1.)+(0.444470683013)
-        ref[1,4,0,0]=(1.0649487216)/(o+1.)+(-0.122930582777)
-        ref[1,4,0,1]=(0.22766574122)/(o+1.)+(0.493567156271)
-        ref[1,4,1,0]=(-0.481296537412)/(o+1.)+(0.688715015285)
-        ref[1,4,1,1]=(-0.195268237132)/(o+1.)+(0.558770091963)
-        ref[1,4,2,0]=(0.180618258117)/(o+1.)+(-0.439222849696)
-        ref[1,4,2,1]=(0.0261012984826)/(o+1.)+(-0.671440554524)
-        ref[2,0,0,0]=(-0.301101739758)/(o+1.)+(-0.453251603296)
-        ref[2,0,0,1]=(0.00878006761908)/(o+1.)+(0.160403751586)
-        ref[2,0,1,0]=(-0.80011300584)/(o+1.)+(0.35896863549)
-        ref[2,0,1,1]=(0.00248831604776)/(o+1.)+(-0.0632691631389)
-        ref[2,0,2,0]=(-0.0569220251136)/(o+1.)+(0.312750628078)
-        ref[2,0,2,1]=(-0.440109525096)/(o+1.)+(-0.136894943888)
-        ref[2,1,0,0]=(-0.465652661854)/(o+1.)+(0.572439014362)
-        ref[2,1,0,1]=(0.0522958647723)/(o+1.)+(0.434187058485)
-        ref[2,1,1,0]=(0.00194260180185)/(o+1.)+(-0.791453286324)
-        ref[2,1,1,1]=(0.981996325082)/(o+1.)+(0.0539878162501)
-        ref[2,1,2,0]=(-0.243334369882)/(o+1.)+(-0.476784889223)
-        ref[2,1,2,1]=(1.53208640175)/(o+1.)+(-0.416375683873)
-        ref[2,2,0,0]=(1.27849139532)/(o+1.)+(0.164930772337)
-        ref[2,2,0,1]=(-1.4813889023)/(o+1.)+(-0.0652189568992)
-        ref[2,2,1,0]=(-0.728282325831)/(o+1.)+(0.393741566145)
-        ref[2,2,1,1]=(-0.537765426582)/(o+1.)+(-0.649481479359)
-        ref[2,2,2,0]=(-0.266224153785)/(o+1.)+(0.427127815533)
-        ref[2,2,2,1]=(-0.862349098277)/(o+1.)+(-0.570608988167)
-        ref[2,3,0,0]=(-1.09340368619)/(o+1.)+(-0.0859527299593)
-        ref[2,3,0,1]=(1.02842400947)/(o+1.)+(-0.605881052086)
-        ref[2,3,1,0]=(0.0131810342609)/(o+1.)+(0.20111341807)
-        ref[2,3,1,1]=(-1.11244447248)/(o+1.)+(0.448304137186)
-        ref[2,3,2,0]=(-0.978348257673)/(o+1.)+(0.75617782326)
-        ref[2,3,2,1]=(-0.140801959181)/(o+1.)+(-0.689301157175)
-        ref[2,4,0,0]=(-0.733659962936)/(o+1.)+(-0.982769045955)
-        ref[2,4,0,1]=(-1.6278906672)/(o+1.)+(-0.0515134159034)
-        ref[2,4,1,0]=(1.52117858199)/(o+1.)+(-0.313533423654)
-        ref[2,4,1,1]=(0.621221455007)/(o+1.)+(0.661046684337)
-        ref[2,4,2,0]=(-0.157580028393)/(o+1.)+(-0.329619724901)
-        ref[2,4,2,1]=(0.52303412622)/(o+1.)+(-0.00418831388809)
-        ref[3,0,0,0]=(0.337890126112)/(o+1.)+(0.154655235856)
-        ref[3,0,0,1]=(-0.100490423466)/(o+1.)+(0.0877941839427)
-        ref[3,0,1,0]=(0.37549944857)/(o+1.)+(-0.163565223059)
-        ref[3,0,1,1]=(-0.3212149071)/(o+1.)+(0.538924315474)
-        ref[3,0,2,0]=(-0.359815373231)/(o+1.)+(0.271747364864)
-        ref[3,0,2,1]=(-0.890575856923)/(o+1.)+(-0.151984770865)
-        ref[3,1,0,0]=(-1.10384271628)/(o+1.)+(0.256944810546)
-        ref[3,1,0,1]=(0.647425296535)/(o+1.)+(-0.348161558551)
-        ref[3,1,1,0]=(1.41806770884)/(o+1.)+(-0.211112510685)
-        ref[3,1,1,1]=(0.106528838317)/(o+1.)+(-0.302066770953)
-        ref[3,1,2,0]=(0.917213295746)/(o+1.)+(0.204325610614)
-        ref[3,1,2,1]=(-0.24738513406)/(o+1.)+(-0.0524022055505)
-        ref[3,2,0,0]=(-0.0537683888373)/(o+1.)+(0.105427251007)
-        ref[3,2,0,1]=(-1.24647336894)/(o+1.)+(-0.00525065347416)
-        ref[3,2,1,0]=(0.187132797735)/(o+1.)+(0.230971745898)
-        ref[3,2,1,1]=(0.492750417331)/(o+1.)+(-0.0743607257106)
-        ref[3,2,2,0]=(0.062835017839)/(o+1.)+(-0.0396102029518)
-        ref[3,2,2,1]=(-0.967272854749)/(o+1.)+(0.254924478345)
-        ref[3,3,0,0]=(1.41291903854)/(o+1.)+(-0.208458374448)
-        ref[3,3,0,1]=(-0.740922121718)/(o+1.)+(0.100332753677)
-        ref[3,3,1,0]=(1.2839228132)/(o+1.)+(-0.405680585568)
-        ref[3,3,1,1]=(-1.69516258968)/(o+1.)+(-0.69241891756)
-        ref[3,3,2,0]=(0.216594952745)/(o+1.)+(0.309112737639)
-        ref[3,3,2,1]=(-0.634806027047)/(o+1.)+(0.0728039418712)
-        ref[3,4,0,0]=(-0.310491357088)/(o+1.)+(0.315525778146)
-        ref[3,4,0,1]=(-0.751915044154)/(o+1.)+(-0.457043209029)
-        ref[3,4,1,0]=(-0.339963591836)/(o+1.)+(0.309918338163)
-        ref[3,4,1,1]=(0.0720250143477)/(o+1.)+(0.223190077872)
-        ref[3,4,2,0]=(-0.0508554115866)/(o+1.)+(-0.0483042552841)
-        ref[3,4,2,1]=(0.754037720807)/(o+1.)+(0.163604311813)
-      else:
-        arg[0,0,0,0]=(-1.24350959032)*x[0]+(-0.580181370761)*x[1]+(-0.174543112173)*x[2]
-        arg[0,0,0,1]=(1.43450421585)*x[0]+(0.717062915298)*x[1]+(-0.91866562143)*x[2]
-        arg[0,0,1,0]=(0.0188823859409)*x[0]+(1.24568141807)*x[1]+(0.0842604494481)*x[2]
-        arg[0,0,1,1]=(0.871591276766)*x[0]+(0.653031319605)*x[1]+(0.037714556611)*x[2]
-        arg[0,0,2,0]=(1.60473786555)*x[0]+(1.47509195705)*x[1]+(-0.103485610136)*x[2]
-        arg[0,0,2,1]=(1.68030531336)*x[0]+(0.551201281257)*x[1]+(1.26951824468)*x[2]
-        arg[0,1,0,0]=(0.491638014782)*x[0]+(1.26264219762)*x[1]+(-0.921297094204)*x[2]
-        arg[0,1,0,1]=(0.20108233628)*x[0]+(-1.36096031252)*x[1]+(-0.878077046379)*x[2]
-        arg[0,1,1,0]=(0.900775475455)*x[0]+(0.193423726606)*x[1]+(-0.139955126775)*x[2]
-        arg[0,1,1,1]=(-0.0354326925578)*x[0]+(-0.464646718718)*x[1]+(1.49240476583)*x[2]
-        arg[0,1,2,0]=(-1.40991971664)*x[0]+(-1.7747715584)*x[1]+(-0.96387650203)*x[2]
-        arg[0,1,2,1]=(-0.476443682267)*x[0]+(0.55076135194)*x[1]+(0.190289559512)*x[2]
-        arg[0,2,0,0]=(0.535490315669)*x[0]+(0.566915366497)*x[1]+(-0.41513643529)*x[2]
-        arg[0,2,0,1]=(-0.18986562478)*x[0]+(-0.62347050233)*x[1]+(1.18004907973)*x[2]
-        arg[0,2,1,0]=(-0.288440432828)*x[0]+(0.0375642125411)*x[1]+(0.574653643212)*x[2]
-        arg[0,2,1,1]=(1.03327739612)*x[0]+(-0.0443874572943)*x[1]+(0.972142765323)*x[2]
-        arg[0,2,2,0]=(-1.27131901306)*x[0]+(0.619179457229)*x[1]+(-0.436029340417)*x[2]
-        arg[0,2,2,1]=(0.0573099137019)*x[0]+(0.211373076629)*x[1]+(0.859991510967)*x[2]
-        arg[0,3,0,0]=(0.650974277613)*x[0]+(-0.926352792387)*x[1]+(-1.84479828618)*x[2]
-        arg[0,3,0,1]=(-0.293748564815)*x[0]+(0.53683587198)*x[1]+(1.51147453744)*x[2]
-        arg[0,3,1,0]=(0.837889627485)*x[0]+(0.62568225238)*x[1]+(0.365321068424)*x[2]
-        arg[0,3,1,1]=(-0.671841278343)*x[0]+(-0.00822894090357)*x[1]+(-1.35180265459)*x[2]
-        arg[0,3,2,0]=(0.823443588183)*x[0]+(-0.366903894987)*x[1]+(-0.878402795844)*x[2]
-        arg[0,3,2,1]=(-0.856292830088)*x[0]+(-0.134584368493)*x[1]+(-0.299126849425)*x[2]
-        arg[0,4,0,0]=(0.62792423481)*x[0]+(0.781414088068)*x[1]+(-1.12299220031)*x[2]
-        arg[0,4,0,1]=(-0.00743646774917)*x[0]+(0.52784004028)*x[1]+(-1.44284109205)*x[2]
-        arg[0,4,1,0]=(-0.855519018884)*x[0]+(-0.222306698876)*x[1]+(0.0502517275952)*x[2]
-        arg[0,4,1,1]=(-0.311060622512)*x[0]+(0.321283094479)*x[1]+(-0.484147152851)*x[2]
-        arg[0,4,2,0]=(-1.43220161062)*x[0]+(-0.27822988291)*x[1]+(-0.692367106541)*x[2]
-        arg[0,4,2,1]=(1.3956686934)*x[0]+(-1.26426333906)*x[1]+(-1.09343602989)*x[2]
-        arg[1,0,0,0]=(0.122525927098)*x[0]+(-0.484009414389)*x[1]+(-0.822036495419)*x[2]
-        arg[1,0,0,1]=(-0.276748173334)*x[0]+(0.35307031133)*x[1]+(-1.23466402387)*x[2]
-        arg[1,0,1,0]=(-0.479355493223)*x[0]+(-0.56368304348)*x[1]+(0.54679107219)*x[2]
-        arg[1,0,1,1]=(-0.483618214285)*x[0]+(1.60438722757)*x[1]+(0.542389963596)*x[2]
-        arg[1,0,2,0]=(0.130988624202)*x[0]+(-0.449468495509)*x[1]+(0.254640520023)*x[2]
-        arg[1,0,2,1]=(1.13790232796)*x[0]+(-0.716218913004)*x[1]+(-0.193031264955)*x[2]
-        arg[1,1,0,0]=(-0.0653152151059)*x[0]+(1.07890922508)*x[1]+(0.324995864884)*x[2]
-        arg[1,1,0,1]=(0.769151345051)*x[0]+(-1.35911748672)*x[1]+(0.299326803785)*x[2]
-        arg[1,1,1,0]=(-0.431128032697)*x[0]+(1.09261915758)*x[1]+(-0.029871998484)*x[2]
-        arg[1,1,1,1]=(-0.922618915502)*x[0]+(1.30318141394)*x[1]+(-0.324039981399)*x[2]
-        arg[1,1,2,0]=(-0.668178375077)*x[0]+(0.132203602988)*x[1]+(0.236035070297)*x[2]
-        arg[1,1,2,1]=(-0.518594419598)*x[0]+(-0.0429695477263)*x[1]+(1.11877941395)*x[2]
-        arg[1,2,0,0]=(0.610776644247)*x[0]+(-0.023900598958)*x[1]+(0.0480141870788)*x[2]
-        arg[1,2,0,1]=(0.562736426016)*x[0]+(-0.294969624732)*x[1]+(-0.23898469143)*x[2]
-        arg[1,2,1,0]=(0.645173726197)*x[0]+(-1.18365074993)*x[1]+(0.102581636468)*x[2]
-        arg[1,2,1,1]=(-0.518976597355)*x[0]+(0.372817596528)*x[1]+(0.49035249397)*x[2]
-        arg[1,2,2,0]=(0.0192623731103)*x[0]+(-0.241279406644)*x[1]+(-0.420015571981)*x[2]
-        arg[1,2,2,1]=(0.318641827599)*x[0]+(-1.5357263392)*x[1]+(0.350150621892)*x[2]
-        arg[1,3,0,0]=(-0.719401628191)*x[0]+(-1.77806447133)*x[1]+(1.19750443209)*x[2]
-        arg[1,3,0,1]=(-1.00122204304)*x[0]+(0.675162216383)*x[1]+(1.1180105058)*x[2]
-        arg[1,3,1,0]=(0.331149947519)*x[0]+(0.310832741708)*x[1]+(0.087866556795)*x[2]
-        arg[1,3,1,1]=(-0.156343054316)*x[0]+(1.00796776488)*x[1]+(-1.53460740228)*x[2]
-        arg[1,3,2,0]=(0.714240747972)*x[0]+(0.968170992322)*x[1]+(-0.962819191598)*x[2]
-        arg[1,3,2,1]=(-0.200412114379)*x[0]+(-0.173781234544)*x[1]+(0.899584749309)*x[2]
-        arg[1,4,0,0]=(-1.38011177642)*x[0]+(-0.316506470647)*x[1]+(0.266952180469)*x[2]
-        arg[1,4,0,1]=(0.343359684584)*x[0]+(-1.13244466712)*x[1]+(-0.81840155125)*x[2]
-        arg[1,4,1,0]=(0.295299129957)*x[0]+(0.199810907018)*x[1]+(0.631717407771)*x[2]
-        arg[1,4,1,1]=(-0.46840784478)*x[0]+(-0.402683932206)*x[1]+(-0.782209293177)*x[2]
-        arg[1,4,2,0]=(-1.8006389736)*x[0]+(0.119727360087)*x[1]+(0.482076626168)*x[2]
-        arg[1,4,2,1]=(0.96553885281)*x[0]+(0.425097333238)*x[1]+(0.54533551085)*x[2]
-        arg[2,0,0,0]=(0.932725602425)*x[0]+(-0.513780652569)*x[1]+(0.275742915648)*x[2]
-        arg[2,0,0,1]=(1.10053578072)*x[0]+(0.787895323287)*x[1]+(-1.46544221328)*x[2]
-        arg[2,0,1,0]=(0.83657269666)*x[0]+(-1.15717482853)*x[1]+(1.1090271297)*x[2]
-        arg[2,0,1,1]=(1.59370135994)*x[0]+(0.452015708845)*x[1]+(0.0862230059082)*x[2]
-        arg[2,0,2,0]=(-0.954832509866)*x[0]+(0.51192257473)*x[1]+(-1.48499771643)*x[2]
-        arg[2,0,2,1]=(-0.556993361475)*x[0]+(0.438110051421)*x[1]+(0.237254018143)*x[2]
-        arg[2,1,0,0]=(-0.318980966383)*x[0]+(-0.263071719097)*x[1]+(-0.348122442404)*x[2]
-        arg[2,1,0,1]=(0.100191287326)*x[0]+(-0.422996999974)*x[1]+(-0.850702087112)*x[2]
-        arg[2,1,1,0]=(-0.198942237141)*x[0]+(0.277459568173)*x[1]+(-1.66195774421)*x[2]
-        arg[2,1,1,1]=(-1.62211381863)*x[0]+(-0.13417844308)*x[1]+(1.07441481356)*x[2]
-        arg[2,1,2,0]=(-0.183120762554)*x[0]+(-0.158546687568)*x[1]+(1.05938565108)*x[2]
-        arg[2,1,2,1]=(-0.530596736933)*x[0]+(-0.507872303289)*x[1]+(0.0437745116021)*x[2]
-        arg[2,2,0,0]=(-0.430338834548)*x[0]+(-1.01989755268)*x[1]+(0.0364152729771)*x[2]
-        arg[2,2,0,1]=(-0.55129175645)*x[0]+(0.283907226465)*x[1]+(0.281403899376)*x[2]
-        arg[2,2,1,0]=(0.119036949181)*x[0]+(0.187265158741)*x[1]+(-0.0845814658663)*x[2]
-        arg[2,2,1,1]=(1.39900884968)*x[0]+(1.42806588781)*x[1]+(0.211444691268)*x[2]
-        arg[2,2,2,0]=(-0.609664666581)*x[0]+(-0.29988332429)*x[1]+(-0.28125800646)*x[2]
-        arg[2,2,2,1]=(-1.77545247157)*x[0]+(0.337828315779)*x[1]+(-0.239141292616)*x[2]
-        arg[2,3,0,0]=(-1.23141604656)*x[0]+(0.322998749903)*x[1]+(-1.70685281816)*x[2]
-        arg[2,3,0,1]=(-1.4416737434)*x[0]+(1.49740114642)*x[1]+(0.732057753882)*x[2]
-        arg[2,3,1,0]=(-1.59112622077)*x[0]+(0.665317566947)*x[1]+(0.826417253499)*x[2]
-        arg[2,3,1,1]=(-1.22000830454)*x[0]+(0.618713896065)*x[1]+(1.27354984534)*x[2]
-        arg[2,3,2,0]=(0.125639723221)*x[0]+(0.663241510656)*x[1]+(-0.426459288281)*x[2]
-        arg[2,3,2,1]=(1.39120212155)*x[0]+(0.9115748844)*x[1]+(1.77889030223)*x[2]
-        arg[2,4,0,0]=(-0.217927656387)*x[0]+(1.20391185439)*x[1]+(-0.188197734908)*x[2]
-        arg[2,4,0,1]=(-0.442009082947)*x[0]+(0.399477101959)*x[1]+(-1.33974368956)*x[2]
-        arg[2,4,1,0]=(0.636534809382)*x[0]+(0.872923470503)*x[1]+(-0.922286702006)*x[2]
-        arg[2,4,1,1]=(-0.831840624431)*x[0]+(0.946223248622)*x[1]+(0.380300039133)*x[2]
-        arg[2,4,2,0]=(0.0803088903901)*x[0]+(-0.857685204574)*x[1]+(-0.479475079431)*x[2]
-        arg[2,4,2,1]=(-1.7233942516)*x[0]+(-1.38771345941)*x[1]+(0.761958201633)*x[2]
-        arg[3,0,0,0]=(-0.738032075796)*x[0]+(1.33264583681)*x[1]+(-1.21101988385)*x[2]
-        arg[3,0,0,1]=(1.40336327022)*x[0]+(-0.77078885213)*x[1]+(1.70960627204)*x[2]
-        arg[3,0,1,0]=(0.452477629041)*x[0]+(0.235432009434)*x[1]+(1.69314009822)*x[2]
-        arg[3,0,1,1]=(-0.816213143646)*x[0]+(-1.42050350309)*x[1]+(-0.0806105456758)*x[2]
-        arg[3,0,2,0]=(0.0400708086023)*x[0]+(-0.336948609628)*x[1]+(-0.113687293995)*x[2]
-        arg[3,0,2,1]=(0.414077492095)*x[0]+(-1.06937716207)*x[1]+(1.25972041173)*x[2]
-        arg[3,1,0,0]=(-1.02975555201)*x[0]+(-0.123306171085)*x[1]+(-1.74750909033)*x[2]
-        arg[3,1,0,1]=(-1.01988698009)*x[0]+(-0.142188487205)*x[1]+(0.274514515492)*x[2]
-        arg[3,1,1,0]=(0.440626586141)*x[0]+(-0.0569580581917)*x[1]+(-0.77065631367)*x[2]
-        arg[3,1,1,1]=(0.987903067972)*x[0]+(-1.47543187274)*x[1]+(-0.0888962732893)*x[2]
-        arg[3,1,2,0]=(0.150506204416)*x[0]+(0.035476396146)*x[1]+(-0.852061690418)*x[2]
-        arg[3,1,2,1]=(-1.15179800132)*x[0]+(-0.425570974979)*x[1]+(1.10092214699)*x[2]
-        arg[3,2,0,0]=(1.01255188057)*x[0]+(1.24279465527)*x[1]+(1.25190246102)*x[2]
-        arg[3,2,0,1]=(-1.16275538385)*x[0]+(1.13672085108)*x[1]+(0.131953731231)*x[2]
-        arg[3,2,1,0]=(0.774290747173)*x[0]+(0.275410883089)*x[1]+(-0.825692266439)*x[2]
-        arg[3,2,1,1]=(-1.07241838074)*x[0]+(-0.0974675737726)*x[1]+(1.1856849697)*x[2]
-        arg[3,2,2,0]=(0.234209248938)*x[0]+(0.756893234577)*x[1]+(-0.365141055079)*x[2]
-        arg[3,2,2,1]=(-1.6668858309)*x[0]+(-0.916769120288)*x[1]+(-0.716365681217)*x[2]
-        arg[3,3,0,0]=(-0.36890215249)*x[0]+(-0.581062815398)*x[1]+(1.6280164507)*x[2]
-        arg[3,3,0,1]=(-0.933634743559)*x[0]+(-0.0657657779145)*x[1]+(1.35011362804)*x[2]
-        arg[3,3,1,0]=(1.13739289322)*x[0]+(0.0103208127738)*x[1]+(1.01628193014)*x[2]
-        arg[3,3,1,1]=(0.037979696459)*x[0]+(-1.76926650495)*x[1]+(-1.28602572757)*x[2]
-        arg[3,3,2,0]=(0.797830431467)*x[0]+(0.732108360923)*x[1]+(-0.436390867333)*x[2]
-        arg[3,3,2,1]=(-0.571865447888)*x[0]+(0.895109047357)*x[1]+(-0.673234648776)*x[2]
-        arg[3,4,0,0]=(-1.59667195158)*x[0]+(-1.06146105331)*x[1]+(-1.81255923783)*x[2]
-        arg[3,4,0,1]=(-0.0721327214647)*x[0]+(1.23982376787)*x[1]+(1.43101011)*x[2]
-        arg[3,4,1,0]=(0.117288395573)*x[0]+(-0.37678966212)*x[1]+(-1.14107285089)*x[2]
-        arg[3,4,1,1]=(-0.303270532321)*x[0]+(1.33784402324)*x[1]+(-0.651624796413)*x[2]
-        arg[3,4,2,0]=(0.215849013256)*x[0]+(0.247315697644)*x[1]+(0.404644392153)*x[2]
-        arg[3,4,2,1]=(0.975781190478)*x[0]+(-0.252285063767)*x[1]+(-0.145694910854)*x[2]
-        ref[0,0,0,0]=(-0.718934738033)/(o+1.)+(-0.639649667608)
-        ref[0,0,0,1]=(1.01007662915)/(o+1.)+(0.111412440284)
-        ref[0,0,1,0]=(0.827868953278)/(o+1.)+(0.26047765009)
-        ref[0,0,1,1]=(1.48122352358)/(o+1.)+(0.0405568147034)
-        ref[0,0,2,0]=(1.33282099436)/(o+1.)+(0.821761609054)
-        ref[0,0,2,1]=(1.65298089862)/(o+1.)+(0.924021970342)
-        ref[0,1,0,0]=(0.930162571453)/(o+1.)+(-0.0485897266263)
-        ref[0,1,0,1]=(-0.347599158269)/(o+1.)+(-0.845177932176)
-        ref[0,1,1,0]=(0.623152121663)/(o+1.)+(0.165545976811)
-        ref[0,1,1,1]=(0.0506217690841)/(o+1.)+(0.470851792737)
-        ref[0,1,2,0]=(-1.99181491207)/(o+1.)+(-1.0783764325)
-        ref[0,1,2,1]=(-0.731065007801)/(o+1.)+(0.497836118493)
-        ref[0,2,0,0]=(-0.0812249009151)/(o+1.)+(0.384247073896)
-        ref[0,2,0,1]=(-0.115768505253)/(o+1.)+(0.241240728938)
-        ref[0,2,1,0]=(0.152728009607)/(o+1.)+(0.0855247066589)
-        ref[0,2,1,1]=(1.43086526503)/(o+1.)+(0.265083719563)
-        ref[0,2,2,0]=(-0.967906369418)/(o+1.)+(-0.060131263415)
-        ref[0,2,2,1]=(-0.269269238419)/(o+1.)+(0.698971869859)
-        ref[0,3,0,0]=(-1.71659801402)/(o+1.)+(-0.201789393467)
-        ref[0,3,0,1]=(0.265343635273)/(o+1.)+(0.744609104665)
-        ref[0,3,1,0]=(1.83021875237)/(o+1.)+(-0.000662902039879)
-        ref[0,3,1,1]=(-0.317529833375)/(o+1.)+(-0.857171520229)
-        ref[0,3,2,0]=(-0.705757693524)/(o+1.)+(0.141947295438)
-        ref[0,3,2,1]=(-1.27000495392)/(o+1.)+(-0.00999954704202)
-        ref[0,4,0,0]=(0.061892522425)/(o+1.)+(0.112226800069)
-        ref[0,4,0,1]=(-0.747062267148)/(o+1.)+(-0.0876876261864)
-        ref[0,4,1,0]=(-1.19488448842)/(o+1.)+(0.0836552491261)
-        ref[0,4,1,1]=(1.36573976292)/(o+1.)+(-0.9198322219)
-        ref[0,4,2,0]=(-1.67982141697)/(o+1.)+(-0.361488591554)
-        ref[0,4,2,1]=(-0.598050084547)/(o+1.)+(-0.181990295501)
-        ref[1,0,0,0]=(-2.45927674426)/(o+1.)+(0.637878380777)
-        ref[1,0,0,1]=(-0.575223026885)/(o+1.)+(-0.291559429493)
-        ref[1,0,1,0]=(0.0871765959469)/(o+1.)+(-0.29171203023)
-        ref[1,0,1,1]=(0.94050575309)/(o+1.)+(0.361326611893)
-        ref[1,0,2,0]=(-0.306500880914)/(o+1.)+(0.121330764815)
-        ref[1,0,2,1]=(1.60748296414)/(o+1.)+(-0.689415407072)
-        ref[1,1,0,0]=(0.640401899755)/(o+1.)+(0.34909398755)
-        ref[1,1,0,1]=(0.134022909144)/(o+1.)+(-0.212331123516)
-        ref[1,1,1,0]=(0.248008519593)/(o+1.)+(0.191805303402)
-        ref[1,1,1,1]=(0.638911732328)/(o+1.)+(-0.291194607647)
-        ref[1,1,2,0]=(0.109264462855)/(o+1.)+(-0.204602082323)
-        ref[1,1,2,1]=(-0.185963112656)/(o+1.)+(0.371589279643)
-        ref[1,2,0,0]=(-0.590669733193)/(o+1.)+(0.61277998278)
-        ref[1,2,0,1]=(-1.15856908266)/(o+1.)+(0.593675596257)
-        ref[1,2,1,0]=(-0.451642187813)/(o+1.)+(0.00787340027166)
-        ref[1,2,1,1]=(-0.428757501259)/(o+1.)+(0.386475497201)
-        ref[1,2,2,0]=(-0.414532914271)/(o+1.)+(-0.113749845622)
-        ref[1,2,2,1]=(-0.513613710163)/(o+1.)+(-0.176660089771)
-        ref[1,3,0,0]=(-0.890487934256)/(o+1.)+(-0.20473686659)
-        ref[1,3,0,1]=(1.64512779208)/(o+1.)+(-0.426588556466)
-        ref[1,3,1,0]=(0.831527595966)/(o+1.)+(-0.0508391749725)
-        ref[1,3,1,1]=(-0.718921003194)/(o+1.)+(0.0179691557385)
-        ref[1,3,2,0]=(0.405959213301)/(o+1.)+(0.156816667697)
-        ref[1,3,2,1]=(0.426319486322)/(o+1.)+(0.0495359570318)
-        ref[1,4,0,0]=(-1.11364330874)/(o+1.)+(-0.158011378929)
-        ref[1,4,0,1]=(-0.0993967101457)/(o+1.)+(-0.754044911817)
-        ref[1,4,1,0]=(0.979493241598)/(o+1.)+(0.0736671015741)
-        ref[1,4,1,1]=(-1.78692478393)/(o+1.)+(0.0668118568857)
-        ref[1,4,2,0]=(-0.691473647622)/(o+1.)+(-0.253680669863)
-        ref[1,4,2,1]=(1.16914997228)/(o+1.)+(0.383410862311)
-        ref[2,0,0,0]=(0.790187638399)/(o+1.)+(-0.047749886448)
-        ref[2,0,0,1]=(0.429625240932)/(o+1.)+(-0.00331817510394)
-        ref[2,0,1,0]=(-0.101344997877)/(o+1.)+(0.444884997853)
-        ref[2,0,1,1]=(2.15519953039)/(o+1.)+(-0.0116297278494)
-        ref[2,0,2,0]=(-1.40159594866)/(o+1.)+(-0.263155851453)
-        ref[2,0,2,1]=(-0.658391287862)/(o+1.)+(0.388380997976)
-        ref[2,1,0,0]=(-0.773933630328)/(o+1.)+(-0.0781207487777)
-        ref[2,1,0,1]=(0.0015551432788)/(o+1.)+(-0.587531471519)
-        ref[2,1,1,0]=(0.122693324758)/(o+1.)+(-0.853066868967)
-        ref[2,1,1,1]=(-0.219255630453)/(o+1.)+(-0.231310908847)
-        ref[2,1,2,0]=(1.33176471286)/(o+1.)+(-0.307023255951)
-        ref[2,1,2,1]=(-1.67471265259)/(o+1.)+(0.340009061986)
-        ref[2,2,0,0]=(-0.727222063897)/(o+1.)+(-0.343299525178)
-        ref[2,2,0,1]=(-1.87667590405)/(o+1.)+(0.945347636719)
-        ref[2,2,1,0]=(0.776003927859)/(o+1.)+(-0.277141642902)
-        ref[2,2,1,1]=(1.62850322537)/(o+1.)+(0.705008101698)
-        ref[2,2,2,0]=(1.31869548331)/(o+1.)+(-1.25475074032)
-        ref[2,2,2,1]=(-1.71691241115)/(o+1.)+(0.0200734813728)
-        ref[2,3,0,0]=(-0.37741220744)/(o+1.)+(-1.11892895368)
-        ref[2,3,0,1]=(0.684763737686)/(o+1.)+(0.0515107096073)
-        ref[2,3,1,0]=(-0.0572023243047)/(o+1.)+(-0.0210945380092)
-        ref[2,3,1,1]=(0.031457290932)/(o+1.)+(0.320399072966)
-        ref[2,3,2,0]=(-0.71613334286)/(o+1.)+(0.539277644228)
-        ref[2,3,2,1]=(2.10068005021)/(o+1.)+(0.990493628981)
-        ref[2,4,0,0]=(0.830379294407)/(o+1.)+(-0.016296415655)
-        ref[2,4,0,1]=(-1.05197706105)/(o+1.)+(-0.165149304749)
-        ref[2,4,1,0]=(-0.0854959336547)/(o+1.)+(0.336333755767)
-        ref[2,4,1,1]=(1.15845594915)/(o+1.)+(-0.331886642912)
-        ref[2,4,2,0]=(-1.25248721318)/(o+1.)+(-0.00218209021539)
-        ref[2,4,2,1]=(-0.991752052473)/(o+1.)+(-0.678698728452)
-        ref[3,0,0,0]=(-0.262071815816)/(o+1.)+(-0.177167153508)
-        ref[3,0,0,1]=(1.20598261029)/(o+1.)+(0.568099039922)
-        ref[3,0,1,0]=(1.21237099375)/(o+1.)+(0.584339371474)
-        ref[3,0,1,1]=(-1.04628498282)/(o+1.)+(-0.635521104799)
-        ref[3,0,2,0]=(0.630843868383)/(o+1.)+(-0.520704481702)
-        ref[3,0,2,1]=(1.56136208039)/(o+1.)+(-0.478470669318)
-        ref[3,1,0,0]=(-0.372752943047)/(o+1.)+(-1.26390893519)
-        ref[3,1,0,1]=(0.192139112377)/(o+1.)+(-0.53985003209)
-        ref[3,1,1,0]=(-1.18480584023)/(o+1.)+(0.398909027255)
-        ref[3,1,1,1]=(0.402069277892)/(o+1.)+(-0.489247177975)
-        ref[3,1,2,0]=(0.27608763117)/(o+1.)+(-0.471083360513)
-        ref[3,1,2,1]=(-0.273636427696)/(o+1.)+(-0.101405200809)
-        ref[3,2,0,0]=(1.92572771773)/(o+1.)+(0.790760639563)
-        ref[3,2,0,1]=(0.16264122626)/(o+1.)+(-0.0283610138982)
-        ref[3,2,1,0]=(0.377561018039)/(o+1.)+(-0.076775827108)
-        ref[3,2,1,1]=(-0.652466873272)/(o+1.)+(0.334132944227)
-        ref[3,2,2,0]=(-0.0304721826842)/(o+1.)+(0.32821680556)
-        ref[3,2,2,1]=(-1.52932569088)/(o+1.)+(-0.885347470761)
-        ref[3,3,0,0]=(-0.451938162279)/(o+1.)+(0.564994822546)
-        ref[3,3,0,1]=(-0.477583137662)/(o+1.)+(0.414148122113)
-        ref[3,3,1,0]=(1.38037325689)/(o+1.)+(0.391811189625)
-        ref[3,3,1,1]=(-1.01333159097)/(o+1.)+(-1.00199047255)
-        ref[3,3,2,0]=(1.3222644334)/(o+1.)+(-0.114358254173)
-        ref[3,3,2,1]=(-0.248989333346)/(o+1.)+(-0.0505008579799)
-        ref[3,4,0,0]=(-1.92196761736)/(o+1.)+(-1.27436231268)
-        ref[3,4,0,1]=(0.894404962457)/(o+1.)+(0.852148096971)
-        ref[3,4,1,0]=(0.868763436571)/(o+1.)+(-1.134668777)
-        ref[3,4,1,1]=(0.438747123022)/(o+1.)+(-0.0278992142568)
-        ref[3,4,2,0]=(0.532575431402)/(o+1.)+(0.167616835826)
-        ref[3,4,2,1]=(0.796744496799)/(o+1.)+(-0.109471640471)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 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 the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      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.729700679932)*x[0]+(-1.38329769179)*x[1]
-        ref=(0.329728333821)/(o+1.)+(-0.491662672839)
-      else:
-        arg=(-1.75076012766)*x[0]+(-0.0862990889349)*x[1]+(0.637429232833)*x[2]
-        ref=(-0.577517867896)/(o+1.)+(-0.311056057931)
-      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 the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      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]=(1.0296233191)*x[0]+(-0.347985432388)*x[1]
-        arg[1]=(-0.182082548052)*x[0]+(0.114822539064)*x[1]
-        ref[0]=(0.876900301573)/(o+1.)+(-0.0976312074308)
-        ref[1]=(-1.09276229827)/(o+1.)+(0.512751144643)
-      else:
-        arg[0]=(0.390938934986)*x[0]+(-0.17813109236)*x[1]+(0.92611177061)*x[2]
-        arg[1]=(0.169562781554)*x[0]+(-0.149625135256)*x[1]+(0.357445984273)*x[2]
-        ref[0]=(1.07308269316)/(o+1.)+(0.0329184600363)
-        ref[1]=(-1.07527269336)/(o+1.)+(0.726328161966)
-      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 the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.798668686601)*x[0]+(-0.502017718729)*x[1]
-        arg[0,1]=(-0.682368031728)*x[0]+(-0.915048032379)*x[1]
-        arg[0,2]=(-0.0237771508029)*x[0]+(0.177441262563)*x[1]
-        arg[0,3]=(0.135600942216)*x[0]+(0.496697614771)*x[1]
-        arg[0,4]=(0.495272681631)*x[0]+(-0.457599050745)*x[1]
-        arg[1,0]=(-0.252415627225)*x[0]+(-0.820872546406)*x[1]
-        arg[1,1]=(-0.183362696688)*x[0]+(-0.721277471492)*x[1]
-        arg[1,2]=(0.401101418876)*x[0]+(0.0483185737314)*x[1]
-        arg[1,3]=(0.251246583055)*x[0]+(-0.837901564153)*x[1]
-        arg[1,4]=(0.2984760032)*x[0]+(0.0504569221307)*x[1]
-        arg[2,0]=(1.18468310151)*x[0]+(-0.545612792222)*x[1]
-        arg[2,1]=(-1.08451540544)*x[0]+(0.820927137753)*x[1]
-        arg[2,2]=(0.85435600905)*x[0]+(-0.309819803422)*x[1]
-        arg[2,3]=(-0.184148030844)*x[0]+(0.978315441698)*x[1]
-        arg[2,4]=(1.36943188922)*x[0]+(-1.3176984733)*x[1]
-        arg[3,0]=(0.42189213134)*x[0]+(1.23097633986)*x[1]
-        arg[3,1]=(0.0409353425792)*x[0]+(-1.15555830367)*x[1]
-        arg[3,2]=(0.557942070395)*x[0]+(-0.591659744114)*x[1]
-        arg[3,3]=(-1.07432449167)*x[0]+(-0.665475086161)*x[1]
-        arg[3,4]=(-1.00421972544)*x[0]+(1.16737316771)*x[1]
-        ref[0,0]=(-0.400434079596)/(o+1.)+(-0.450126162867)
-        ref[0,1]=(-1.35836659237)/(o+1.)+(-0.11952473587)
-        ref[0,2]=(0.154775934077)/(o+1.)+(-0.000555911158727)
-        ref[0,3]=(-0.177525502969)/(o+1.)+(0.404912029978)
-        ref[0,4]=(1.00122501632)/(o+1.)+(-0.481775692719)
-        ref[1,0]=(-1.37507083806)/(o+1.)+(0.150891332214)
-        ref[1,1]=(-1.37429063854)/(o+1.)+(0.234825235182)
-        ref[1,2]=(1.30069236547)/(o+1.)+(-0.425636186429)
-        ref[1,3]=(-0.414658324515)/(o+1.)+(-0.0859983282917)
-        ref[1,4]=(0.757097138678)/(o+1.)+(-0.204082106674)
-        ref[2,0]=(1.09244584366)/(o+1.)+(-0.226687767185)
-        ref[2,1]=(0.109481169277)/(o+1.)+(-0.186534718481)
-        ref[2,2]=(0.587125473152)/(o+1.)+(-0.0212946337622)
-        ref[2,3]=(0.00878695699842)/(o+1.)+(0.392690226928)
-        ref[2,4]=(0.306810290785)/(o+1.)+(-0.127538437433)
-        ref[3,0]=(0.317826050636)/(o+1.)+(0.667521210281)
-        ref[3,1]=(-0.276254182573)/(o+1.)+(-0.419184389261)
-        ref[3,2]=(-0.753831729065)/(o+1.)+(0.360057027673)
-        ref[3,3]=(-1.40505001195)/(o+1.)+(-0.167374782943)
-        ref[3,4]=(0.53112066724)/(o+1.)+(-0.183983612488)
-      else:
-        arg[0,0]=(1.54447818842)*x[0]+(-0.560568590939)*x[1]+(-1.33749549019)*x[2]
-        arg[0,1]=(-0.535544800192)*x[0]+(-0.732513980801)*x[1]+(0.309855030569)*x[2]
-        arg[0,2]=(-0.45251604551)*x[0]+(-0.0933932995351)*x[1]+(-0.465724167794)*x[2]
-        arg[0,3]=(0.10344455234)*x[0]+(-0.0451254971766)*x[1]+(-1.39912042607)*x[2]
-        arg[0,4]=(0.617585449939)*x[0]+(1.27357810776)*x[1]+(-0.840161322302)*x[2]
-        arg[1,0]=(0.650274355535)*x[0]+(0.547805408891)*x[1]+(0.314350326062)*x[2]
-        arg[1,1]=(0.697200474806)*x[0]+(0.558681734309)*x[1]+(-0.0277936766536)*x[2]
-        arg[1,2]=(-0.508578328229)*x[0]+(-0.513894226666)*x[1]+(-0.528417418023)*x[2]
-        arg[1,3]=(-1.50391414876)*x[0]+(0.174080260823)*x[1]+(-1.48528641514)*x[2]
-        arg[1,4]=(0.859470776434)*x[0]+(-0.121348493404)*x[1]+(1.69796346547)*x[2]
-        arg[2,0]=(1.00593912049)*x[0]+(0.794254020467)*x[1]+(-1.02770358461)*x[2]
-        arg[2,1]=(-1.64586076188)*x[0]+(-0.83927167526)*x[1]+(-1.13088449805)*x[2]
-        arg[2,2]=(0.0628777004357)*x[0]+(-1.27316091149)*x[1]+(0.417655047748)*x[2]
-        arg[2,3]=(-1.43661526118)*x[0]+(0.0676042964527)*x[1]+(0.174947572442)*x[2]
-        arg[2,4]=(0.504347051098)*x[0]+(-1.62976096707)*x[1]+(0.61579932957)*x[2]
-        arg[3,0]=(1.05212645875)*x[0]+(-1.10517003049)*x[1]+(0.902242097595)*x[2]
-        arg[3,1]=(-0.997611854104)*x[0]+(-1.53611378293)*x[1]+(0.322835276897)*x[2]
-        arg[3,2]=(-0.815135194015)*x[0]+(0.357734619962)*x[1]+(0.684966069635)*x[2]
-        arg[3,3]=(0.4545417685)*x[0]+(0.386262464083)*x[1]+(0.131414279708)*x[2]
-        arg[3,4]=(-0.222694646001)*x[0]+(-0.470499833621)*x[1]+(-0.593290862391)*x[2]
-        ref[0,0]=(-0.593803934901)/(o+1.)+(0.120109021094)
-        ref[0,1]=(0.0569115377867)/(o+1.)+(-0.507557644105)
-        ref[0,2]=(-0.202741590274)/(o+1.)+(-0.404445961283)
-        ref[0,3]=(-0.516888777015)/(o+1.)+(-0.411956296948)
-        ref[0,4]=(0.52292787417)/(o+1.)+(0.264037180616)
-        ref[1,0]=(-0.102685279742)/(o+1.)+(0.807557685115)
-        ref[1,1]=(1.44527264276)/(o+1.)+(-0.108592055148)
-        ref[1,2]=(-0.448767718864)/(o+1.)+(-0.551061127027)
-        ref[1,3]=(-1.19936004685)/(o+1.)+(-0.807880128113)
-        ref[1,4]=(1.09918755605)/(o+1.)+(0.668449096223)
-        ref[2,0]=(-0.873708007453)/(o+1.)+(0.823098781902)
-        ref[2,1]=(-1.9697776018)/(o+1.)+(-0.823119666698)
-        ref[2,2]=(0.598023292545)/(o+1.)+(-0.695325727928)
-        ref[2,3]=(-0.486077421455)/(o+1.)+(-0.353992985415)
-        ref[2,4]=(0.65037669171)/(o+1.)+(-0.579995639058)
-        ref[3,0]=(0.115401170876)/(o+1.)+(0.366898677493)
-        ref[3,1]=(-0.836209920174)/(o+1.)+(-0.68734021998)
-        ref[3,2]=(0.753819223079)/(o+1.)+(-0.263126863749)
-        ref[3,3]=(-0.75294945942)/(o+1.)+(0.862583985856)
-        ref[3,4]=(-1.44356156537)/(o+1.)+(0.0785381116785)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.409425595197)*x[0]+(-0.992427840513)*x[1]
-        arg[0,0,1]=(0.645693185569)*x[0]+(-1.38338827813)*x[1]
-        arg[0,1,0]=(0.838847764041)*x[0]+(-1.01358491173)*x[1]
-        arg[0,1,1]=(0.381938057912)*x[0]+(0.61979806953)*x[1]
-        arg[1,0,0]=(-1.36783302742)*x[0]+(-0.132422986617)*x[1]
-        arg[1,0,1]=(-0.137283745381)*x[0]+(0.633534018338)*x[1]
-        arg[1,1,0]=(0.0698189930006)*x[0]+(-1.45980415637)*x[1]
-        arg[1,1,1]=(-0.391725001578)*x[0]+(0.355258883756)*x[1]
-        arg[2,0,0]=(-0.596091494216)*x[0]+(-0.911870026464)*x[1]
-        arg[2,0,1]=(0.138007894626)*x[0]+(1.76859278751)*x[1]
-        arg[2,1,0]=(-0.791803431843)*x[0]+(-0.813170959331)*x[1]
-        arg[2,1,1]=(-1.05466714677)*x[0]+(-1.12822729059)*x[1]
-        arg[3,0,0]=(-0.417845531677)*x[0]+(1.13689234148)*x[1]
-        arg[3,0,1]=(-0.0323347813877)*x[0]+(1.14381520037)*x[1]
-        arg[3,1,0]=(0.639524393892)*x[0]+(0.864696525716)*x[1]
-        arg[3,1,1]=(0.593104139176)*x[0]+(0.812642260561)*x[1]
-        arg[4,0,0]=(-0.0580034066457)*x[0]+(0.802938738147)*x[1]
-        arg[4,0,1]=(0.722143376522)*x[0]+(0.843814429252)*x[1]
-        arg[4,1,0]=(-0.574057925551)*x[0]+(-0.298232158953)*x[1]
-        arg[4,1,1]=(0.422529038525)*x[0]+(0.841942812244)*x[1]
-        arg[5,0,0]=(1.90272013575)*x[0]+(-1.84811498267)*x[1]
-        arg[5,0,1]=(-1.52156314991)*x[0]+(-0.797833417606)*x[1]
-        arg[5,1,0]=(0.723748480291)*x[0]+(0.8667659268)*x[1]
-        arg[5,1,1]=(-0.70289499551)*x[0]+(-0.726595802952)*x[1]
-        ref[0,0,0]=(-1.1719312491)/(o+1.)+(-0.114961093303)
-        ref[0,0,1]=(0.229993657297)/(o+1.)+(-0.483844374927)
-        ref[0,1,0]=(-0.630442924796)/(o+1.)+(0.227852888553)
-        ref[0,1,1]=(-0.806392286115)/(o+1.)+(0.904064206778)
-        ref[1,0,0]=(-1.38312106397)/(o+1.)+(-0.0585674750338)
-        ref[1,0,1]=(0.595552955095)/(o+1.)+(-0.049651341069)
-        ref[1,1,0]=(-1.63606241234)/(o+1.)+(0.123038624483)
-        ref[1,1,1]=(-0.340463713286)/(o+1.)+(0.151998797732)
-        ref[2,0,0]=(-1.31925158304)/(o+1.)+(-0.094354968822)
-        ref[2,0,1]=(0.699277735512)/(o+1.)+(0.60366147331)
-        ref[2,1,0]=(-0.219878898763)/(o+1.)+(-0.692547746205)
-        ref[2,1,1]=(-1.46750249607)/(o+1.)+(-0.357695970647)
-        ref[3,0,0]=(0.71941698906)/(o+1.)+(-0.000185089626866)
-        ref[3,0,1]=(-0.526993313502)/(o+1.)+(0.819236866243)
-        ref[3,1,0]=(1.51671320209)/(o+1.)+(-0.00624614123899)
-        ref[3,1,1]=(1.05185683613)/(o+1.)+(0.176944781803)
-        ref[4,0,0]=(1.20432711487)/(o+1.)+(-0.229695891683)
-        ref[4,0,1]=(1.26863112516)/(o+1.)+(0.14866334031)
-        ref[4,1,0]=(0.34377834331)/(o+1.)+(-0.608034213907)
-        ref[4,1,1]=(-0.189568721058)/(o+1.)+(0.727020285914)
-        ref[5,0,0]=(0.116981035747)/(o+1.)+(-0.0311879413343)
-        ref[5,0,1]=(-0.638728138162)/(o+1.)+(-0.840334214679)
-        ref[5,1,0]=(0.891634589919)/(o+1.)+(0.349439908586)
-        ref[5,1,1]=(-0.552480077628)/(o+1.)+(-0.438505360418)
-      else:
-        arg[0,0,0]=(-0.662295604848)*x[0]+(1.04606412328)*x[1]+(-0.376008345205)*x[2]
-        arg[0,0,1]=(1.25030158303)*x[0]+(-0.0735167236581)*x[1]+(1.31623868156)*x[2]
-        arg[0,1,0]=(0.717953620717)*x[0]+(-0.700464709991)*x[1]+(0.0345381771501)*x[2]
-        arg[0,1,1]=(0.225944321569)*x[0]+(-1.09510173632)*x[1]+(-0.371235420166)*x[2]
-        arg[1,0,0]=(-0.0755865552996)*x[0]+(-0.168214695387)*x[1]+(-0.437427629408)*x[2]
-        arg[1,0,1]=(-1.52674685128)*x[0]+(-0.408158359188)*x[1]+(0.750091649824)*x[2]
-        arg[1,1,0]=(-0.572400948498)*x[0]+(-0.802826119419)*x[1]+(-1.0233358643)*x[2]
-        arg[1,1,1]=(0.623156259061)*x[0]+(0.378774331134)*x[1]+(0.0419766309042)*x[2]
-        arg[2,0,0]=(0.443271002813)*x[0]+(-0.930092172267)*x[1]+(-0.20199150178)*x[2]
-        arg[2,0,1]=(0.408614848881)*x[0]+(-1.3007040171)*x[1]+(-0.872615408174)*x[2]
-        arg[2,1,0]=(-0.174910742406)*x[0]+(1.64872582781)*x[1]+(0.701172036891)*x[2]
-        arg[2,1,1]=(0.417145974895)*x[0]+(0.428983721984)*x[1]+(-0.000787616769604)*x[2]
-        arg[3,0,0]=(0.655644872855)*x[0]+(-0.268612479186)*x[1]+(0.11779790898)*x[2]
-        arg[3,0,1]=(-0.244670332245)*x[0]+(-0.857502890419)*x[1]+(0.111792341131)*x[2]
-        arg[3,1,0]=(0.131303542183)*x[0]+(0.231230724482)*x[1]+(0.116997126513)*x[2]
-        arg[3,1,1]=(0.725434968911)*x[0]+(1.00206695553)*x[1]+(-0.319715936784)*x[2]
-        arg[4,0,0]=(1.30949067662)*x[0]+(-1.14809917605)*x[1]+(0.00529778192088)*x[2]
-        arg[4,0,1]=(0.969626585498)*x[0]+(-0.517908035476)*x[1]+(1.0467168328)*x[2]
-        arg[4,1,0]=(0.362824899886)*x[0]+(0.890586602899)*x[1]+(-0.135163953653)*x[2]
-        arg[4,1,1]=(-0.10353577028)*x[0]+(-0.0997924233294)*x[1]+(0.308973949876)*x[2]
-        arg[5,0,0]=(-1.37242244095)*x[0]+(-0.746928231432)*x[1]+(-1.37385481504)*x[2]
-        arg[5,0,1]=(0.231730881472)*x[0]+(-0.250265629505)*x[1]+(-0.903599685792)*x[2]
-        arg[5,1,0]=(-0.813783753893)*x[0]+(0.41081474894)*x[1]+(-0.541868665288)*x[2]
-        arg[5,1,1]=(0.19296641571)*x[0]+(1.8056250646)*x[1]+(0.283675443031)*x[2]
-        ref[0,0,0]=(0.859538687531)/(o+1.)+(-0.425889257151)
-        ref[0,0,1]=(-0.0674840316504)/(o+1.)+(1.28025378629)
-        ref[0,1,0]=(-0.76922088579)/(o+1.)+(0.410623986833)
-        ref[0,1,1]=(-0.582981712778)/(o+1.)+(-0.328705561068)
-        ref[1,0,0]=(1.25605113432)/(o+1.)+(-0.968640007206)
-        ref[1,0,1]=(-1.59448994908)/(o+1.)+(0.204838194218)
-        ref[1,1,0]=(-2.07497671334)/(o+1.)+(-0.161793109438)
-        ref[1,1,1]=(0.199659680372)/(o+1.)+(0.422123770364)
-        ref[2,0,0]=(-1.86970457224)/(o+1.)+(0.590445950504)
-        ref[2,0,1]=(-1.09505237157)/(o+1.)+(-0.334826102411)
-        ref[2,1,0]=(0.395146564722)/(o+1.)+(0.889920278785)
-        ref[2,1,1]=(1.13315474193)/(o+1.)+(-0.143906330909)
-        ref[3,0,0]=(-0.804398097072)/(o+1.)+(0.65461419986)
-        ref[3,0,1]=(-0.829074327243)/(o+1.)+(-0.0806532771448)
-        ref[3,1,0]=(0.126278821088)/(o+1.)+(0.176626286045)
-        ref[3,1,1]=(-0.498753315826)/(o+1.)+(0.953269651743)
-        ref[4,0,0]=(0.33849802718)/(o+1.)+(-0.0859043723417)
-        ref[4,0,1]=(0.153172891455)/(o+1.)+(0.672631245684)
-        ref[4,1,0]=(1.42803542207)/(o+1.)+(-0.154893936468)
-        ref[4,1,1]=(0.605555698814)/(o+1.)+(-0.249954971274)
-        ref[5,0,0]=(-1.21823919194)/(o+1.)+(-1.13748314774)
-        ref[5,0,1]=(-1.13684484437)/(o+1.)+(0.107355205274)
-        ref[5,1,0]=(-1.21991007491)/(o+1.)+(0.137536202333)
-        ref[5,1,1]=(2.05825898341)/(o+1.)+(0.112003969962)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 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 the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.2631296794)*x[0]+(-0.130117190301)*x[1]
-        arg[0,0,0,1]=(0.635732952218)*x[0]+(-0.647555274619)*x[1]
-        arg[0,0,1,0]=(1.06301179339)*x[0]+(-0.227813591181)*x[1]
-        arg[0,0,1,1]=(-0.519979711376)*x[0]+(1.04747480856)*x[1]
-        arg[0,0,2,0]=(0.0232818794686)*x[0]+(-1.14799687633)*x[1]
-        arg[0,0,2,1]=(0.359605391616)*x[0]+(-1.32942998109)*x[1]
-        arg[0,1,0,0]=(-0.555284020205)*x[0]+(0.11676202509)*x[1]
-        arg[0,1,0,1]=(-1.83479976366)*x[0]+(0.413168061643)*x[1]
-        arg[0,1,1,0]=(0.239736306037)*x[0]+(0.680002261596)*x[1]
-        arg[0,1,1,1]=(0.0555978436642)*x[0]+(1.28910533087)*x[1]
-        arg[0,1,2,0]=(0.732696470486)*x[0]+(0.538837927425)*x[1]
-        arg[0,1,2,1]=(0.528018376979)*x[0]+(1.20428218411)*x[1]
-        arg[0,2,0,0]=(0.863803666388)*x[0]+(0.187082373754)*x[1]
-        arg[0,2,0,1]=(-1.41490739709)*x[0]+(-0.741935114995)*x[1]
-        arg[0,2,1,0]=(0.0501211708116)*x[0]+(-0.370371645307)*x[1]
-        arg[0,2,1,1]=(-0.0353423795999)*x[0]+(1.00911245551)*x[1]
-        arg[0,2,2,0]=(1.79997397117)*x[0]+(0.240103369892)*x[1]
-        arg[0,2,2,1]=(0.926052414873)*x[0]+(0.00914357056458)*x[1]
-        arg[0,3,0,0]=(-1.38911305622)*x[0]+(-1.29285413766)*x[1]
-        arg[0,3,0,1]=(0.464908270265)*x[0]+(-0.354824878801)*x[1]
-        arg[0,3,1,0]=(0.17477491298)*x[0]+(0.882807721541)*x[1]
-        arg[0,3,1,1]=(0.633177386897)*x[0]+(-0.312628707154)*x[1]
-        arg[0,3,2,0]=(0.0841289229919)*x[0]+(-0.244085514309)*x[1]
-        arg[0,3,2,1]=(0.198631529554)*x[0]+(-0.324387433152)*x[1]
-        arg[0,4,0,0]=(-1.41503119851)*x[0]+(-0.760818812719)*x[1]
-        arg[0,4,0,1]=(-0.0326236565753)*x[0]+(0.835716629913)*x[1]
-        arg[0,4,1,0]=(1.84482629546)*x[0]+(-0.341557269651)*x[1]
-        arg[0,4,1,1]=(-0.380600663728)*x[0]+(-0.295663906776)*x[1]
-        arg[0,4,2,0]=(0.411308057157)*x[0]+(1.0109767907)*x[1]
-        arg[0,4,2,1]=(-1.10494637617)*x[0]+(0.401374247774)*x[1]
-        arg[1,0,0,0]=(0.437019391027)*x[0]+(0.0507256248679)*x[1]
-        arg[1,0,0,1]=(-0.399457976892)*x[0]+(1.60118981524)*x[1]
-        arg[1,0,1,0]=(-1.51289007675)*x[0]+(0.821406477166)*x[1]
-        arg[1,0,1,1]=(0.405770274494)*x[0]+(0.637591733337)*x[1]
-        arg[1,0,2,0]=(-1.4945593715)*x[0]+(1.0919176668)*x[1]
-        arg[1,0,2,1]=(-0.482868528044)*x[0]+(0.578004764959)*x[1]
-        arg[1,1,0,0]=(-1.44298476434)*x[0]+(0.197151370973)*x[1]
-        arg[1,1,0,1]=(1.38517677391)*x[0]+(0.915352009234)*x[1]
-        arg[1,1,1,0]=(1.69025511761)*x[0]+(0.0203268727501)*x[1]
-        arg[1,1,1,1]=(0.615392847773)*x[0]+(-0.301873832451)*x[1]
-        arg[1,1,2,0]=(0.3081860115)*x[0]+(-0.495230532585)*x[1]
-        arg[1,1,2,1]=(-0.0258752746808)*x[0]+(0.441629273958)*x[1]
-        arg[1,2,0,0]=(-0.947577742489)*x[0]+(0.218632343222)*x[1]
-        arg[1,2,0,1]=(0.520029690788)*x[0]+(0.403806873912)*x[1]
-        arg[1,2,1,0]=(1.32820278922)*x[0]+(-1.68314905373)*x[1]
-        arg[1,2,1,1]=(1.30409876916)*x[0]+(-0.721819171819)*x[1]
-        arg[1,2,2,0]=(1.37872038109)*x[0]+(0.0725139769178)*x[1]
-        arg[1,2,2,1]=(0.35593830057)*x[0]+(0.28751298465)*x[1]
-        arg[1,3,0,0]=(-1.17950311406)*x[0]+(-0.232819397686)*x[1]
-        arg[1,3,0,1]=(0.17340184781)*x[0]+(-0.43329852484)*x[1]
-        arg[1,3,1,0]=(-1.71125828064)*x[0]+(0.957284609667)*x[1]
-        arg[1,3,1,1]=(-0.429043922461)*x[0]+(0.15749154348)*x[1]
-        arg[1,3,2,0]=(-1.42626208855)*x[0]+(-1.12812746347)*x[1]
-        arg[1,3,2,1]=(0.490516645689)*x[0]+(0.559039786338)*x[1]
-        arg[1,4,0,0]=(0.436395831147)*x[0]+(0.382691724897)*x[1]
-        arg[1,4,0,1]=(1.27903773839)*x[0]+(-0.0642376846324)*x[1]
-        arg[1,4,1,0]=(0.503159792753)*x[0]+(0.392973700403)*x[1]
-        arg[1,4,1,1]=(0.0881500114326)*x[0]+(0.834121935361)*x[1]
-        arg[1,4,2,0]=(-0.620745962116)*x[0]+(-0.0770814791601)*x[1]
-        arg[1,4,2,1]=(0.0231684675117)*x[0]+(-1.33994827808)*x[1]
-        arg[2,0,0,0]=(-0.972311570714)*x[0]+(-0.235293375636)*x[1]
-        arg[2,0,0,1]=(0.21633355466)*x[0]+(0.11325401613)*x[1]
-        arg[2,0,1,0]=(0.922986727965)*x[0]+(-1.00516246282)*x[1]
-        arg[2,0,1,1]=(-0.740778981838)*x[0]+(0.616728971608)*x[1]
-        arg[2,0,2,0]=(1.73201175195)*x[0]+(-1.1634325209)*x[1]
-        arg[2,0,2,1]=(1.15829744421)*x[0]+(-1.87219685708)*x[1]
-        arg[2,1,0,0]=(-0.458901790255)*x[0]+(1.13812715713)*x[1]
-        arg[2,1,0,1]=(1.03315725208)*x[0]+(-0.112487270341)*x[1]
-        arg[2,1,1,0]=(-1.7070220527)*x[0]+(0.126058081856)*x[1]
-        arg[2,1,1,1]=(0.863301459388)*x[0]+(0.226670498194)*x[1]
-        arg[2,1,2,0]=(-1.0012992544)*x[0]+(-0.195604893926)*x[1]
-        arg[2,1,2,1]=(-0.128048233768)*x[0]+(0.827383267773)*x[1]
-        arg[2,2,0,0]=(-0.0876478859699)*x[0]+(1.69600082596)*x[1]
-        arg[2,2,0,1]=(-0.616278041482)*x[0]+(-0.995548774612)*x[1]
-        arg[2,2,1,0]=(0.780699602657)*x[0]+(-0.721498796198)*x[1]
-        arg[2,2,1,1]=(-1.17591990575)*x[0]+(-0.66080847955)*x[1]
-        arg[2,2,2,0]=(1.71259481962)*x[0]+(-1.12456334234)*x[1]
-        arg[2,2,2,1]=(-0.721345747555)*x[0]+(-1.28222132706)*x[1]
-        arg[2,3,0,0]=(-1.25971324146)*x[0]+(-0.00559590465243)*x[1]
-        arg[2,3,0,1]=(-0.49234245798)*x[0]+(0.30900436328)*x[1]
-        arg[2,3,1,0]=(1.3068919966)*x[0]+(-0.891484126193)*x[1]
-        arg[2,3,1,1]=(0.319277203381)*x[0]+(-0.535113401495)*x[1]
-        arg[2,3,2,0]=(0.529480518887)*x[0]+(0.00452686996008)*x[1]
-        arg[2,3,2,1]=(-1.0978905592)*x[0]+(-0.421513714335)*x[1]
-        arg[2,4,0,0]=(-1.27711509307)*x[0]+(-1.42208296178)*x[1]
-        arg[2,4,0,1]=(-0.621292314868)*x[0]+(-1.10962518414)*x[1]
-        arg[2,4,1,0]=(-0.183478331213)*x[0]+(1.0775900659)*x[1]
-        arg[2,4,1,1]=(1.07354953663)*x[0]+(0.869765287054)*x[1]
-        arg[2,4,2,0]=(-0.696050139647)*x[0]+(-0.120769338549)*x[1]
-        arg[2,4,2,1]=(-0.895597167617)*x[0]+(1.41025466606)*x[1]
-        arg[3,0,0,0]=(1.15262876611)*x[0]+(-0.505428168285)*x[1]
-        arg[3,0,0,1]=(-0.277585299138)*x[0]+(0.352683243558)*x[1]
-        arg[3,0,1,0]=(0.218694567952)*x[0]+(-0.170325565499)*x[1]
-        arg[3,0,1,1]=(0.297325594036)*x[0]+(0.459308129811)*x[1]
-        arg[3,0,2,0]=(-0.572509624935)*x[0]+(0.756188981433)*x[1]
-        arg[3,0,2,1]=(0.226462444009)*x[0]+(-1.42100784266)*x[1]
-        arg[3,1,0,0]=(-0.28388824767)*x[0]+(-0.306064847514)*x[1]
-        arg[3,1,0,1]=(-0.805831316478)*x[0]+(0.756933495912)*x[1]
-        arg[3,1,1,0]=(1.37344361233)*x[0]+(-0.377600924857)*x[1]
-        arg[3,1,1,1]=(-0.0725302533884)*x[0]+(-0.425074450201)*x[1]
-        arg[3,1,2,0]=(-0.066659431931)*x[0]+(1.39252394891)*x[1]
-        arg[3,1,2,1]=(0.593440019224)*x[0]+(-0.945629564385)*x[1]
-        arg[3,2,0,0]=(0.101850471598)*x[0]+(0.0552356415787)*x[1]
-        arg[3,2,0,1]=(-0.407603005372)*x[0]+(-0.849371670514)*x[1]
-        arg[3,2,1,0]=(0.435403192155)*x[0]+(0.213673097377)*x[1]
-        arg[3,2,1,1]=(0.424081872219)*x[0]+(-0.0800529063085)*x[1]
-        arg[3,2,2,0]=(0.189428134309)*x[0]+(-0.205813522374)*x[1]
-        arg[3,2,2,1]=(-0.51449771505)*x[0]+(0.0570738169919)*x[1]
-        arg[3,3,0,0]=(1.05431625119)*x[0]+(-0.0583139615539)*x[1]
-        arg[3,3,0,1]=(0.0292261008496)*x[0]+(-0.569482715214)*x[1]
-        arg[3,3,1,0]=(-0.155861158232)*x[0]+(0.628422800294)*x[1]
-        arg[3,3,1,1]=(-1.24050157391)*x[0]+(-1.83949885089)*x[1]
-        arg[3,3,2,0]=(-0.140709404689)*x[0]+(0.975529832713)*x[1]
-        arg[3,3,2,1]=(-0.290824210426)*x[0]+(-0.198373932879)*x[1]
-        arg[3,4,0,0]=(0.627236720719)*x[0]+(-0.306676521516)*x[1]
-        arg[3,4,0,1]=(-0.964303098626)*x[0]+(-0.701698363587)*x[1]
-        arg[3,4,1,0]=(-0.0447860906704)*x[0]+(0.324659175162)*x[1]
-        arg[3,4,1,1]=(1.28273443124)*x[0]+(-0.764329261143)*x[1]
-        arg[3,4,2,0]=(-0.023232709502)*x[0]+(-0.124231212653)*x[1]
-        arg[3,4,2,1]=(0.510754136991)*x[0]+(0.570492207442)*x[1]
-        ref[0,0,0,0]=(0.648764087616)/(o+1.)+(-0.521005478658)
-        ref[0,0,0,1]=(-0.0127476670646)/(o+1.)+(0.000462672331599)
-        ref[0,0,1,0]=(0.258601710827)/(o+1.)+(0.288298245692)
-        ref[0,0,1,1]=(0.0577415806545)/(o+1.)+(0.234876758266)
-        ref[0,0,2,0]=(-0.91129780757)/(o+1.)+(-0.106708594644)
-        ref[0,0,2,1]=(0.0841946322525)/(o+1.)+(-0.527009610865)
-        ref[0,1,0,0]=(0.111101563297)/(o+1.)+(-0.274811779206)
-        ref[0,1,0,1]=(-0.504062576651)/(o+1.)+(-0.458784562683)
-        ref[0,1,1,0]=(0.65560969277)/(o+1.)+(0.132064437431)
-        ref[0,1,1,1]=(0.0866382135955)/(o+1.)+(0.629032480469)
-        ref[0,1,2,0]=(1.36074036394)/(o+1.)+(-0.0446029830125)
-        ref[0,1,2,1]=(1.16071753175)/(o+1.)+(0.285791514672)
-        ref[0,2,0,0]=(0.693065154772)/(o+1.)+(0.178910442685)
-        ref[0,2,0,1]=(-1.41209835364)/(o+1.)+(-0.372372079222)
-        ref[0,2,1,0]=(-0.542625642859)/(o+1.)+(0.111187584182)
-        ref[0,2,1,1]=(0.628714449405)/(o+1.)+(0.172527813253)
-        ref[0,2,2,0]=(1.62887921583)/(o+1.)+(0.205599062617)
-        ref[0,2,2,1]=(1.0640301541)/(o+1.)+(-0.0644170843301)
-        ref[0,3,0,0]=(-1.09870552313)/(o+1.)+(-0.791630835375)
-        ref[0,3,0,1]=(0.260706656546)/(o+1.)+(-0.0753116325413)
-        ref[0,3,1,0]=(-0.0543842358149)/(o+1.)+(0.555983435168)
-        ref[0,3,1,1]=(0.0369075211917)/(o+1.)+(0.141820579276)
-        ref[0,3,2,0]=(-0.784250881508)/(o+1.)+(0.312147145095)
-        ref[0,3,2,1]=(-0.178450092422)/(o+1.)+(0.0263470944113)
-        ref[0,4,0,0]=(-0.993852999635)/(o+1.)+(-0.590998505799)
-        ref[0,4,0,1]=(-0.0449039600312)/(o+1.)+(0.423998466684)
-        ref[0,4,1,0]=(0.583535069477)/(o+1.)+(0.459866978166)
-        ref[0,4,1,1]=(-0.251020886878)/(o+1.)+(-0.212621841813)
-        ref[0,4,2,0]=(0.408688561613)/(o+1.)+(0.506798143121)
-        ref[0,4,2,1]=(0.537090447747)/(o+1.)+(-0.620331288072)
-        ref[1,0,0,0]=(0.37428496839)/(o+1.)+(0.0567300237522)
-        ref[1,0,0,1]=(0.777672833448)/(o+1.)+(0.212029502451)
-        ref[1,0,1,0]=(-0.745422608709)/(o+1.)+(0.026969504563)
-        ref[1,0,1,1]=(0.466434983875)/(o+1.)+(0.288463511978)
-        ref[1,0,2,0]=(0.237457788829)/(o+1.)+(-0.320049746767)
-        ref[1,0,2,1]=(0.346974181328)/(o+1.)+(-0.125918972207)
-        ref[1,1,0,0]=(-0.823737519034)/(o+1.)+(-0.211047937165)
-        ref[1,1,0,1]=(1.00324369541)/(o+1.)+(0.648642543871)
-        ref[1,1,1,0]=(0.674013158596)/(o+1.)+(0.518284415882)
-        ref[1,1,1,1]=(0.403142463029)/(o+1.)+(-0.0448117238535)
-        ref[1,1,2,0]=(0.0399328921703)/(o+1.)+(-0.113488706628)
-        ref[1,1,2,1]=(0.111446633645)/(o+1.)+(0.152153682816)
-        ref[1,2,0,0]=(-0.481646721692)/(o+1.)+(-0.123649338787)
-        ref[1,2,0,1]=(0.857170000026)/(o+1.)+(0.033333282337)
-        ref[1,2,1,0]=(-0.445362398126)/(o+1.)+(0.0452080668082)
-        ref[1,2,1,1]=(-0.256201827386)/(o+1.)+(0.419240712362)
-        ref[1,2,2,0]=(1.02991996311)/(o+1.)+(0.210657197448)
-        ref[1,2,2,1]=(0.355299316895)/(o+1.)+(0.144075984162)
-        ref[1,3,0,0]=(-0.679726322154)/(o+1.)+(-0.366298094796)
-        ref[1,3,0,1]=(-0.67885027329)/(o+1.)+(0.20947679813)
-        ref[1,3,1,0]=(-0.163081485233)/(o+1.)+(-0.295446092868)
-        ref[1,3,1,1]=(-0.035768623673)/(o+1.)+(-0.117891877654)
-        ref[1,3,2,0]=(-0.639368943038)/(o+1.)+(-0.957510304493)
-        ref[1,3,2,1]=(0.160615066001)/(o+1.)+(0.444470683013)
-        ref[1,4,0,0]=(1.0649487216)/(o+1.)+(-0.122930582777)
-        ref[1,4,0,1]=(0.22766574122)/(o+1.)+(0.493567156271)
-        ref[1,4,1,0]=(-0.481296537412)/(o+1.)+(0.688715015285)
-        ref[1,4,1,1]=(-0.195268237132)/(o+1.)+(0.558770091963)
-        ref[1,4,2,0]=(0.180618258117)/(o+1.)+(-0.439222849696)
-        ref[1,4,2,1]=(0.0261012984826)/(o+1.)+(-0.671440554524)
-        ref[2,0,0,0]=(-0.301101739758)/(o+1.)+(-0.453251603296)
-        ref[2,0,0,1]=(0.00878006761908)/(o+1.)+(0.160403751586)
-        ref[2,0,1,0]=(-0.80011300584)/(o+1.)+(0.35896863549)
-        ref[2,0,1,1]=(0.00248831604776)/(o+1.)+(-0.0632691631389)
-        ref[2,0,2,0]=(-0.0569220251136)/(o+1.)+(0.312750628078)
-        ref[2,0,2,1]=(-0.440109525096)/(o+1.)+(-0.136894943888)
-        ref[2,1,0,0]=(-0.465652661854)/(o+1.)+(0.572439014362)
-        ref[2,1,0,1]=(0.0522958647723)/(o+1.)+(0.434187058485)
-        ref[2,1,1,0]=(0.00194260180185)/(o+1.)+(-0.791453286324)
-        ref[2,1,1,1]=(0.981996325082)/(o+1.)+(0.0539878162501)
-        ref[2,1,2,0]=(-0.243334369882)/(o+1.)+(-0.476784889223)
-        ref[2,1,2,1]=(1.53208640175)/(o+1.)+(-0.416375683873)
-        ref[2,2,0,0]=(1.27849139532)/(o+1.)+(0.164930772337)
-        ref[2,2,0,1]=(-1.4813889023)/(o+1.)+(-0.0652189568992)
-        ref[2,2,1,0]=(-0.728282325831)/(o+1.)+(0.393741566145)
-        ref[2,2,1,1]=(-0.537765426582)/(o+1.)+(-0.649481479359)
-        ref[2,2,2,0]=(-0.266224153785)/(o+1.)+(0.427127815533)
-        ref[2,2,2,1]=(-0.862349098277)/(o+1.)+(-0.570608988167)
-        ref[2,3,0,0]=(-1.09340368619)/(o+1.)+(-0.0859527299593)
-        ref[2,3,0,1]=(1.02842400947)/(o+1.)+(-0.605881052086)
-        ref[2,3,1,0]=(0.0131810342609)/(o+1.)+(0.20111341807)
-        ref[2,3,1,1]=(-1.11244447248)/(o+1.)+(0.448304137186)
-        ref[2,3,2,0]=(-0.978348257673)/(o+1.)+(0.75617782326)
-        ref[2,3,2,1]=(-0.140801959181)/(o+1.)+(-0.689301157175)
-        ref[2,4,0,0]=(-0.733659962936)/(o+1.)+(-0.982769045955)
-        ref[2,4,0,1]=(-1.6278906672)/(o+1.)+(-0.0515134159034)
-        ref[2,4,1,0]=(1.52117858199)/(o+1.)+(-0.313533423654)
-        ref[2,4,1,1]=(0.621221455007)/(o+1.)+(0.661046684337)
-        ref[2,4,2,0]=(-0.157580028393)/(o+1.)+(-0.329619724901)
-        ref[2,4,2,1]=(0.52303412622)/(o+1.)+(-0.00418831388809)
-        ref[3,0,0,0]=(0.337890126112)/(o+1.)+(0.154655235856)
-        ref[3,0,0,1]=(-0.100490423466)/(o+1.)+(0.0877941839427)
-        ref[3,0,1,0]=(0.37549944857)/(o+1.)+(-0.163565223059)
-        ref[3,0,1,1]=(-0.3212149071)/(o+1.)+(0.538924315474)
-        ref[3,0,2,0]=(-0.359815373231)/(o+1.)+(0.271747364864)
-        ref[3,0,2,1]=(-0.890575856923)/(o+1.)+(-0.151984770865)
-        ref[3,1,0,0]=(-1.10384271628)/(o+1.)+(0.256944810546)
-        ref[3,1,0,1]=(0.647425296535)/(o+1.)+(-0.348161558551)
-        ref[3,1,1,0]=(1.41806770884)/(o+1.)+(-0.211112510685)
-        ref[3,1,1,1]=(0.106528838317)/(o+1.)+(-0.302066770953)
-        ref[3,1,2,0]=(0.917213295746)/(o+1.)+(0.204325610614)
-        ref[3,1,2,1]=(-0.24738513406)/(o+1.)+(-0.0524022055505)
-        ref[3,2,0,0]=(-0.0537683888373)/(o+1.)+(0.105427251007)
-        ref[3,2,0,1]=(-1.24647336894)/(o+1.)+(-0.00525065347416)
-        ref[3,2,1,0]=(0.187132797735)/(o+1.)+(0.230971745898)
-        ref[3,2,1,1]=(0.492750417331)/(o+1.)+(-0.0743607257106)
-        ref[3,2,2,0]=(0.062835017839)/(o+1.)+(-0.0396102029518)
-        ref[3,2,2,1]=(-0.967272854749)/(o+1.)+(0.254924478345)
-        ref[3,3,0,0]=(1.41291903854)/(o+1.)+(-0.208458374448)
-        ref[3,3,0,1]=(-0.740922121718)/(o+1.)+(0.100332753677)
-        ref[3,3,1,0]=(1.2839228132)/(o+1.)+(-0.405680585568)
-        ref[3,3,1,1]=(-1.69516258968)/(o+1.)+(-0.69241891756)
-        ref[3,3,2,0]=(0.216594952745)/(o+1.)+(0.309112737639)
-        ref[3,3,2,1]=(-0.634806027047)/(o+1.)+(0.0728039418712)
-        ref[3,4,0,0]=(-0.310491357088)/(o+1.)+(0.315525778146)
-        ref[3,4,0,1]=(-0.751915044154)/(o+1.)+(-0.457043209029)
-        ref[3,4,1,0]=(-0.339963591836)/(o+1.)+(0.309918338163)
-        ref[3,4,1,1]=(0.0720250143477)/(o+1.)+(0.223190077872)
-        ref[3,4,2,0]=(-0.0508554115866)/(o+1.)+(-0.0483042552841)
-        ref[3,4,2,1]=(0.754037720807)/(o+1.)+(0.163604311813)
-      else:
-        arg[0,0,0,0]=(-1.24350959032)*x[0]+(-0.580181370761)*x[1]+(-0.174543112173)*x[2]
-        arg[0,0,0,1]=(1.43450421585)*x[0]+(0.717062915298)*x[1]+(-0.91866562143)*x[2]
-        arg[0,0,1,0]=(0.0188823859409)*x[0]+(1.24568141807)*x[1]+(0.0842604494481)*x[2]
-        arg[0,0,1,1]=(0.871591276766)*x[0]+(0.653031319605)*x[1]+(0.037714556611)*x[2]
-        arg[0,0,2,0]=(1.60473786555)*x[0]+(1.47509195705)*x[1]+(-0.103485610136)*x[2]
-        arg[0,0,2,1]=(1.68030531336)*x[0]+(0.551201281257)*x[1]+(1.26951824468)*x[2]
-        arg[0,1,0,0]=(0.491638014782)*x[0]+(1.26264219762)*x[1]+(-0.921297094204)*x[2]
-        arg[0,1,0,1]=(0.20108233628)*x[0]+(-1.36096031252)*x[1]+(-0.878077046379)*x[2]
-        arg[0,1,1,0]=(0.900775475455)*x[0]+(0.193423726606)*x[1]+(-0.139955126775)*x[2]
-        arg[0,1,1,1]=(-0.0354326925578)*x[0]+(-0.464646718718)*x[1]+(1.49240476583)*x[2]
-        arg[0,1,2,0]=(-1.40991971664)*x[0]+(-1.7747715584)*x[1]+(-0.96387650203)*x[2]
-        arg[0,1,2,1]=(-0.476443682267)*x[0]+(0.55076135194)*x[1]+(0.190289559512)*x[2]
-        arg[0,2,0,0]=(0.535490315669)*x[0]+(0.566915366497)*x[1]+(-0.41513643529)*x[2]
-        arg[0,2,0,1]=(-0.18986562478)*x[0]+(-0.62347050233)*x[1]+(1.18004907973)*x[2]
-        arg[0,2,1,0]=(-0.288440432828)*x[0]+(0.0375642125411)*x[1]+(0.574653643212)*x[2]
-        arg[0,2,1,1]=(1.03327739612)*x[0]+(-0.0443874572943)*x[1]+(0.972142765323)*x[2]
-        arg[0,2,2,0]=(-1.27131901306)*x[0]+(0.619179457229)*x[1]+(-0.436029340417)*x[2]
-        arg[0,2,2,1]=(0.0573099137019)*x[0]+(0.211373076629)*x[1]+(0.859991510967)*x[2]
-        arg[0,3,0,0]=(0.650974277613)*x[0]+(-0.926352792387)*x[1]+(-1.84479828618)*x[2]
-        arg[0,3,0,1]=(-0.293748564815)*x[0]+(0.53683587198)*x[1]+(1.51147453744)*x[2]
-        arg[0,3,1,0]=(0.837889627485)*x[0]+(0.62568225238)*x[1]+(0.365321068424)*x[2]
-        arg[0,3,1,1]=(-0.671841278343)*x[0]+(-0.00822894090357)*x[1]+(-1.35180265459)*x[2]
-        arg[0,3,2,0]=(0.823443588183)*x[0]+(-0.366903894987)*x[1]+(-0.878402795844)*x[2]
-        arg[0,3,2,1]=(-0.856292830088)*x[0]+(-0.134584368493)*x[1]+(-0.299126849425)*x[2]
-        arg[0,4,0,0]=(0.62792423481)*x[0]+(0.781414088068)*x[1]+(-1.12299220031)*x[2]
-        arg[0,4,0,1]=(-0.00743646774917)*x[0]+(0.52784004028)*x[1]+(-1.44284109205)*x[2]
-        arg[0,4,1,0]=(-0.855519018884)*x[0]+(-0.222306698876)*x[1]+(0.0502517275952)*x[2]
-        arg[0,4,1,1]=(-0.311060622512)*x[0]+(0.321283094479)*x[1]+(-0.484147152851)*x[2]
-        arg[0,4,2,0]=(-1.43220161062)*x[0]+(-0.27822988291)*x[1]+(-0.692367106541)*x[2]
-        arg[0,4,2,1]=(1.3956686934)*x[0]+(-1.26426333906)*x[1]+(-1.09343602989)*x[2]
-        arg[1,0,0,0]=(0.122525927098)*x[0]+(-0.484009414389)*x[1]+(-0.822036495419)*x[2]
-        arg[1,0,0,1]=(-0.276748173334)*x[0]+(0.35307031133)*x[1]+(-1.23466402387)*x[2]
-        arg[1,0,1,0]=(-0.479355493223)*x[0]+(-0.56368304348)*x[1]+(0.54679107219)*x[2]
-        arg[1,0,1,1]=(-0.483618214285)*x[0]+(1.60438722757)*x[1]+(0.542389963596)*x[2]
-        arg[1,0,2,0]=(0.130988624202)*x[0]+(-0.449468495509)*x[1]+(0.254640520023)*x[2]
-        arg[1,0,2,1]=(1.13790232796)*x[0]+(-0.716218913004)*x[1]+(-0.193031264955)*x[2]
-        arg[1,1,0,0]=(-0.0653152151059)*x[0]+(1.07890922508)*x[1]+(0.324995864884)*x[2]
-        arg[1,1,0,1]=(0.769151345051)*x[0]+(-1.35911748672)*x[1]+(0.299326803785)*x[2]
-        arg[1,1,1,0]=(-0.431128032697)*x[0]+(1.09261915758)*x[1]+(-0.029871998484)*x[2]
-        arg[1,1,1,1]=(-0.922618915502)*x[0]+(1.30318141394)*x[1]+(-0.324039981399)*x[2]
-        arg[1,1,2,0]=(-0.668178375077)*x[0]+(0.132203602988)*x[1]+(0.236035070297)*x[2]
-        arg[1,1,2,1]=(-0.518594419598)*x[0]+(-0.0429695477263)*x[1]+(1.11877941395)*x[2]
-        arg[1,2,0,0]=(0.610776644247)*x[0]+(-0.023900598958)*x[1]+(0.0480141870788)*x[2]
-        arg[1,2,0,1]=(0.562736426016)*x[0]+(-0.294969624732)*x[1]+(-0.23898469143)*x[2]
-        arg[1,2,1,0]=(0.645173726197)*x[0]+(-1.18365074993)*x[1]+(0.102581636468)*x[2]
-        arg[1,2,1,1]=(-0.518976597355)*x[0]+(0.372817596528)*x[1]+(0.49035249397)*x[2]
-        arg[1,2,2,0]=(0.0192623731103)*x[0]+(-0.241279406644)*x[1]+(-0.420015571981)*x[2]
-        arg[1,2,2,1]=(0.318641827599)*x[0]+(-1.5357263392)*x[1]+(0.350150621892)*x[2]
-        arg[1,3,0,0]=(-0.719401628191)*x[0]+(-1.77806447133)*x[1]+(1.19750443209)*x[2]
-        arg[1,3,0,1]=(-1.00122204304)*x[0]+(0.675162216383)*x[1]+(1.1180105058)*x[2]
-        arg[1,3,1,0]=(0.331149947519)*x[0]+(0.310832741708)*x[1]+(0.087866556795)*x[2]
-        arg[1,3,1,1]=(-0.156343054316)*x[0]+(1.00796776488)*x[1]+(-1.53460740228)*x[2]
-        arg[1,3,2,0]=(0.714240747972)*x[0]+(0.968170992322)*x[1]+(-0.962819191598)*x[2]
-        arg[1,3,2,1]=(-0.200412114379)*x[0]+(-0.173781234544)*x[1]+(0.899584749309)*x[2]
-        arg[1,4,0,0]=(-1.38011177642)*x[0]+(-0.316506470647)*x[1]+(0.266952180469)*x[2]
-        arg[1,4,0,1]=(0.343359684584)*x[0]+(-1.13244466712)*x[1]+(-0.81840155125)*x[2]
-        arg[1,4,1,0]=(0.295299129957)*x[0]+(0.199810907018)*x[1]+(0.631717407771)*x[2]
-        arg[1,4,1,1]=(-0.46840784478)*x[0]+(-0.402683932206)*x[1]+(-0.782209293177)*x[2]
-        arg[1,4,2,0]=(-1.8006389736)*x[0]+(0.119727360087)*x[1]+(0.482076626168)*x[2]
-        arg[1,4,2,1]=(0.96553885281)*x[0]+(0.425097333238)*x[1]+(0.54533551085)*x[2]
-        arg[2,0,0,0]=(0.932725602425)*x[0]+(-0.513780652569)*x[1]+(0.275742915648)*x[2]
-        arg[2,0,0,1]=(1.10053578072)*x[0]+(0.787895323287)*x[1]+(-1.46544221328)*x[2]
-        arg[2,0,1,0]=(0.83657269666)*x[0]+(-1.15717482853)*x[1]+(1.1090271297)*x[2]
-        arg[2,0,1,1]=(1.59370135994)*x[0]+(0.452015708845)*x[1]+(0.0862230059082)*x[2]
-        arg[2,0,2,0]=(-0.954832509866)*x[0]+(0.51192257473)*x[1]+(-1.48499771643)*x[2]
-        arg[2,0,2,1]=(-0.556993361475)*x[0]+(0.438110051421)*x[1]+(0.237254018143)*x[2]
-        arg[2,1,0,0]=(-0.318980966383)*x[0]+(-0.263071719097)*x[1]+(-0.348122442404)*x[2]
-        arg[2,1,0,1]=(0.100191287326)*x[0]+(-0.422996999974)*x[1]+(-0.850702087112)*x[2]
-        arg[2,1,1,0]=(-0.198942237141)*x[0]+(0.277459568173)*x[1]+(-1.66195774421)*x[2]
-        arg[2,1,1,1]=(-1.62211381863)*x[0]+(-0.13417844308)*x[1]+(1.07441481356)*x[2]
-        arg[2,1,2,0]=(-0.183120762554)*x[0]+(-0.158546687568)*x[1]+(1.05938565108)*x[2]
-        arg[2,1,2,1]=(-0.530596736933)*x[0]+(-0.507872303289)*x[1]+(0.0437745116021)*x[2]
-        arg[2,2,0,0]=(-0.430338834548)*x[0]+(-1.01989755268)*x[1]+(0.0364152729771)*x[2]
-        arg[2,2,0,1]=(-0.55129175645)*x[0]+(0.283907226465)*x[1]+(0.281403899376)*x[2]
-        arg[2,2,1,0]=(0.119036949181)*x[0]+(0.187265158741)*x[1]+(-0.0845814658663)*x[2]
-        arg[2,2,1,1]=(1.39900884968)*x[0]+(1.42806588781)*x[1]+(0.211444691268)*x[2]
-        arg[2,2,2,0]=(-0.609664666581)*x[0]+(-0.29988332429)*x[1]+(-0.28125800646)*x[2]
-        arg[2,2,2,1]=(-1.77545247157)*x[0]+(0.337828315779)*x[1]+(-0.239141292616)*x[2]
-        arg[2,3,0,0]=(-1.23141604656)*x[0]+(0.322998749903)*x[1]+(-1.70685281816)*x[2]
-        arg[2,3,0,1]=(-1.4416737434)*x[0]+(1.49740114642)*x[1]+(0.732057753882)*x[2]
-        arg[2,3,1,0]=(-1.59112622077)*x[0]+(0.665317566947)*x[1]+(0.826417253499)*x[2]
-        arg[2,3,1,1]=(-1.22000830454)*x[0]+(0.618713896065)*x[1]+(1.27354984534)*x[2]
-        arg[2,3,2,0]=(0.125639723221)*x[0]+(0.663241510656)*x[1]+(-0.426459288281)*x[2]
-        arg[2,3,2,1]=(1.39120212155)*x[0]+(0.9115748844)*x[1]+(1.77889030223)*x[2]
-        arg[2,4,0,0]=(-0.217927656387)*x[0]+(1.20391185439)*x[1]+(-0.188197734908)*x[2]
-        arg[2,4,0,1]=(-0.442009082947)*x[0]+(0.399477101959)*x[1]+(-1.33974368956)*x[2]
-        arg[2,4,1,0]=(0.636534809382)*x[0]+(0.872923470503)*x[1]+(-0.922286702006)*x[2]
-        arg[2,4,1,1]=(-0.831840624431)*x[0]+(0.946223248622)*x[1]+(0.380300039133)*x[2]
-        arg[2,4,2,0]=(0.0803088903901)*x[0]+(-0.857685204574)*x[1]+(-0.479475079431)*x[2]
-        arg[2,4,2,1]=(-1.7233942516)*x[0]+(-1.38771345941)*x[1]+(0.761958201633)*x[2]
-        arg[3,0,0,0]=(-0.738032075796)*x[0]+(1.33264583681)*x[1]+(-1.21101988385)*x[2]
-        arg[3,0,0,1]=(1.40336327022)*x[0]+(-0.77078885213)*x[1]+(1.70960627204)*x[2]
-        arg[3,0,1,0]=(0.452477629041)*x[0]+(0.235432009434)*x[1]+(1.69314009822)*x[2]
-        arg[3,0,1,1]=(-0.816213143646)*x[0]+(-1.42050350309)*x[1]+(-0.0806105456758)*x[2]
-        arg[3,0,2,0]=(0.0400708086023)*x[0]+(-0.336948609628)*x[1]+(-0.113687293995)*x[2]
-        arg[3,0,2,1]=(0.414077492095)*x[0]+(-1.06937716207)*x[1]+(1.25972041173)*x[2]
-        arg[3,1,0,0]=(-1.02975555201)*x[0]+(-0.123306171085)*x[1]+(-1.74750909033)*x[2]
-        arg[3,1,0,1]=(-1.01988698009)*x[0]+(-0.142188487205)*x[1]+(0.274514515492)*x[2]
-        arg[3,1,1,0]=(0.440626586141)*x[0]+(-0.0569580581917)*x[1]+(-0.77065631367)*x[2]
-        arg[3,1,1,1]=(0.987903067972)*x[0]+(-1.47543187274)*x[1]+(-0.0888962732893)*x[2]
-        arg[3,1,2,0]=(0.150506204416)*x[0]+(0.035476396146)*x[1]+(-0.852061690418)*x[2]
-        arg[3,1,2,1]=(-1.15179800132)*x[0]+(-0.425570974979)*x[1]+(1.10092214699)*x[2]
-        arg[3,2,0,0]=(1.01255188057)*x[0]+(1.24279465527)*x[1]+(1.25190246102)*x[2]
-        arg[3,2,0,1]=(-1.16275538385)*x[0]+(1.13672085108)*x[1]+(0.131953731231)*x[2]
-        arg[3,2,1,0]=(0.774290747173)*x[0]+(0.275410883089)*x[1]+(-0.825692266439)*x[2]
-        arg[3,2,1,1]=(-1.07241838074)*x[0]+(-0.0974675737726)*x[1]+(1.1856849697)*x[2]
-        arg[3,2,2,0]=(0.234209248938)*x[0]+(0.756893234577)*x[1]+(-0.365141055079)*x[2]
-        arg[3,2,2,1]=(-1.6668858309)*x[0]+(-0.916769120288)*x[1]+(-0.716365681217)*x[2]
-        arg[3,3,0,0]=(-0.36890215249)*x[0]+(-0.581062815398)*x[1]+(1.6280164507)*x[2]
-        arg[3,3,0,1]=(-0.933634743559)*x[0]+(-0.0657657779145)*x[1]+(1.35011362804)*x[2]
-        arg[3,3,1,0]=(1.13739289322)*x[0]+(0.0103208127738)*x[1]+(1.01628193014)*x[2]
-        arg[3,3,1,1]=(0.037979696459)*x[0]+(-1.76926650495)*x[1]+(-1.28602572757)*x[2]
-        arg[3,3,2,0]=(0.797830431467)*x[0]+(0.732108360923)*x[1]+(-0.436390867333)*x[2]
-        arg[3,3,2,1]=(-0.571865447888)*x[0]+(0.895109047357)*x[1]+(-0.673234648776)*x[2]
-        arg[3,4,0,0]=(-1.59667195158)*x[0]+(-1.06146105331)*x[1]+(-1.81255923783)*x[2]
-        arg[3,4,0,1]=(-0.0721327214647)*x[0]+(1.23982376787)*x[1]+(1.43101011)*x[2]
-        arg[3,4,1,0]=(0.117288395573)*x[0]+(-0.37678966212)*x[1]+(-1.14107285089)*x[2]
-        arg[3,4,1,1]=(-0.303270532321)*x[0]+(1.33784402324)*x[1]+(-0.651624796413)*x[2]
-        arg[3,4,2,0]=(0.215849013256)*x[0]+(0.247315697644)*x[1]+(0.404644392153)*x[2]
-        arg[3,4,2,1]=(0.975781190478)*x[0]+(-0.252285063767)*x[1]+(-0.145694910854)*x[2]
-        ref[0,0,0,0]=(-0.718934738033)/(o+1.)+(-0.639649667608)
-        ref[0,0,0,1]=(1.01007662915)/(o+1.)+(0.111412440284)
-        ref[0,0,1,0]=(0.827868953278)/(o+1.)+(0.26047765009)
-        ref[0,0,1,1]=(1.48122352358)/(o+1.)+(0.0405568147034)
-        ref[0,0,2,0]=(1.33282099436)/(o+1.)+(0.821761609054)
-        ref[0,0,2,1]=(1.65298089862)/(o+1.)+(0.924021970342)
-        ref[0,1,0,0]=(0.930162571453)/(o+1.)+(-0.0485897266263)
-        ref[0,1,0,1]=(-0.347599158269)/(o+1.)+(-0.845177932176)
-        ref[0,1,1,0]=(0.623152121663)/(o+1.)+(0.165545976811)
-        ref[0,1,1,1]=(0.0506217690841)/(o+1.)+(0.470851792737)
-        ref[0,1,2,0]=(-1.99181491207)/(o+1.)+(-1.0783764325)
-        ref[0,1,2,1]=(-0.731065007801)/(o+1.)+(0.497836118493)
-        ref[0,2,0,0]=(-0.0812249009151)/(o+1.)+(0.384247073896)
-        ref[0,2,0,1]=(-0.115768505253)/(o+1.)+(0.241240728938)
-        ref[0,2,1,0]=(0.152728009607)/(o+1.)+(0.0855247066589)
-        ref[0,2,1,1]=(1.43086526503)/(o+1.)+(0.265083719563)
-        ref[0,2,2,0]=(-0.967906369418)/(o+1.)+(-0.060131263415)
-        ref[0,2,2,1]=(-0.269269238419)/(o+1.)+(0.698971869859)
-        ref[0,3,0,0]=(-1.71659801402)/(o+1.)+(-0.201789393467)
-        ref[0,3,0,1]=(0.265343635273)/(o+1.)+(0.744609104665)
-        ref[0,3,1,0]=(1.83021875237)/(o+1.)+(-0.000662902039879)
-        ref[0,3,1,1]=(-0.317529833375)/(o+1.)+(-0.857171520229)
-        ref[0,3,2,0]=(-0.705757693524)/(o+1.)+(0.141947295438)
-        ref[0,3,2,1]=(-1.27000495392)/(o+1.)+(-0.00999954704202)
-        ref[0,4,0,0]=(0.061892522425)/(o+1.)+(0.112226800069)
-        ref[0,4,0,1]=(-0.747062267148)/(o+1.)+(-0.0876876261864)
-        ref[0,4,1,0]=(-1.19488448842)/(o+1.)+(0.0836552491261)
-        ref[0,4,1,1]=(1.36573976292)/(o+1.)+(-0.9198322219)
-        ref[0,4,2,0]=(-1.67982141697)/(o+1.)+(-0.361488591554)
-        ref[0,4,2,1]=(-0.598050084547)/(o+1.)+(-0.181990295501)
-        ref[1,0,0,0]=(-2.45927674426)/(o+1.)+(0.637878380777)
-        ref[1,0,0,1]=(-0.575223026885)/(o+1.)+(-0.291559429493)
-        ref[1,0,1,0]=(0.0871765959469)/(o+1.)+(-0.29171203023)
-        ref[1,0,1,1]=(0.94050575309)/(o+1.)+(0.361326611893)
-        ref[1,0,2,0]=(-0.306500880914)/(o+1.)+(0.121330764815)
-        ref[1,0,2,1]=(1.60748296414)/(o+1.)+(-0.689415407072)
-        ref[1,1,0,0]=(0.640401899755)/(o+1.)+(0.34909398755)
-        ref[1,1,0,1]=(0.134022909144)/(o+1.)+(-0.212331123516)
-        ref[1,1,1,0]=(0.248008519593)/(o+1.)+(0.191805303402)
-        ref[1,1,1,1]=(0.638911732328)/(o+1.)+(-0.291194607647)
-        ref[1,1,2,0]=(0.109264462855)/(o+1.)+(-0.204602082323)
-        ref[1,1,2,1]=(-0.185963112656)/(o+1.)+(0.371589279643)
-        ref[1,2,0,0]=(-0.590669733193)/(o+1.)+(0.61277998278)
-        ref[1,2,0,1]=(-1.15856908266)/(o+1.)+(0.593675596257)
-        ref[1,2,1,0]=(-0.451642187813)/(o+1.)+(0.00787340027166)
-        ref[1,2,1,1]=(-0.428757501259)/(o+1.)+(0.386475497201)
-        ref[1,2,2,0]=(-0.414532914271)/(o+1.)+(-0.113749845622)
-        ref[1,2,2,1]=(-0.513613710163)/(o+1.)+(-0.176660089771)
-        ref[1,3,0,0]=(-0.890487934256)/(o+1.)+(-0.20473686659)
-        ref[1,3,0,1]=(1.64512779208)/(o+1.)+(-0.426588556466)
-        ref[1,3,1,0]=(0.831527595966)/(o+1.)+(-0.0508391749725)
-        ref[1,3,1,1]=(-0.718921003194)/(o+1.)+(0.0179691557385)
-        ref[1,3,2,0]=(0.405959213301)/(o+1.)+(0.156816667697)
-        ref[1,3,2,1]=(0.426319486322)/(o+1.)+(0.0495359570318)
-        ref[1,4,0,0]=(-1.11364330874)/(o+1.)+(-0.158011378929)
-        ref[1,4,0,1]=(-0.0993967101457)/(o+1.)+(-0.754044911817)
-        ref[1,4,1,0]=(0.979493241598)/(o+1.)+(0.0736671015741)
-        ref[1,4,1,1]=(-1.78692478393)/(o+1.)+(0.0668118568857)
-        ref[1,4,2,0]=(-0.691473647622)/(o+1.)+(-0.253680669863)
-        ref[1,4,2,1]=(1.16914997228)/(o+1.)+(0.383410862311)
-        ref[2,0,0,0]=(0.790187638399)/(o+1.)+(-0.047749886448)
-        ref[2,0,0,1]=(0.429625240932)/(o+1.)+(-0.00331817510394)
-        ref[2,0,1,0]=(-0.101344997877)/(o+1.)+(0.444884997853)
-        ref[2,0,1,1]=(2.15519953039)/(o+1.)+(-0.0116297278494)
-        ref[2,0,2,0]=(-1.40159594866)/(o+1.)+(-0.263155851453)
-        ref[2,0,2,1]=(-0.658391287862)/(o+1.)+(0.388380997976)
-        ref[2,1,0,0]=(-0.773933630328)/(o+1.)+(-0.0781207487777)
-        ref[2,1,0,1]=(0.0015551432788)/(o+1.)+(-0.587531471519)
-        ref[2,1,1,0]=(0.122693324758)/(o+1.)+(-0.853066868967)
-        ref[2,1,1,1]=(-0.219255630453)/(o+1.)+(-0.231310908847)
-        ref[2,1,2,0]=(1.33176471286)/(o+1.)+(-0.307023255951)
-        ref[2,1,2,1]=(-1.67471265259)/(o+1.)+(0.340009061986)
-        ref[2,2,0,0]=(-0.727222063897)/(o+1.)+(-0.343299525178)
-        ref[2,2,0,1]=(-1.87667590405)/(o+1.)+(0.945347636719)
-        ref[2,2,1,0]=(0.776003927859)/(o+1.)+(-0.277141642902)
-        ref[2,2,1,1]=(1.62850322537)/(o+1.)+(0.705008101698)
-        ref[2,2,2,0]=(1.31869548331)/(o+1.)+(-1.25475074032)
-        ref[2,2,2,1]=(-1.71691241115)/(o+1.)+(0.0200734813728)
-        ref[2,3,0,0]=(-0.37741220744)/(o+1.)+(-1.11892895368)
-        ref[2,3,0,1]=(0.684763737686)/(o+1.)+(0.0515107096073)
-        ref[2,3,1,0]=(-0.0572023243047)/(o+1.)+(-0.0210945380092)
-        ref[2,3,1,1]=(0.031457290932)/(o+1.)+(0.320399072966)
-        ref[2,3,2,0]=(-0.71613334286)/(o+1.)+(0.539277644228)
-        ref[2,3,2,1]=(2.10068005021)/(o+1.)+(0.990493628981)
-        ref[2,4,0,0]=(0.830379294407)/(o+1.)+(-0.016296415655)
-        ref[2,4,0,1]=(-1.05197706105)/(o+1.)+(-0.165149304749)
-        ref[2,4,1,0]=(-0.0854959336547)/(o+1.)+(0.336333755767)
-        ref[2,4,1,1]=(1.15845594915)/(o+1.)+(-0.331886642912)
-        ref[2,4,2,0]=(-1.25248721318)/(o+1.)+(-0.00218209021539)
-        ref[2,4,2,1]=(-0.991752052473)/(o+1.)+(-0.678698728452)
-        ref[3,0,0,0]=(-0.262071815816)/(o+1.)+(-0.177167153508)
-        ref[3,0,0,1]=(1.20598261029)/(o+1.)+(0.568099039922)
-        ref[3,0,1,0]=(1.21237099375)/(o+1.)+(0.584339371474)
-        ref[3,0,1,1]=(-1.04628498282)/(o+1.)+(-0.635521104799)
-        ref[3,0,2,0]=(0.630843868383)/(o+1.)+(-0.520704481702)
-        ref[3,0,2,1]=(1.56136208039)/(o+1.)+(-0.478470669318)
-        ref[3,1,0,0]=(-0.372752943047)/(o+1.)+(-1.26390893519)
-        ref[3,1,0,1]=(0.192139112377)/(o+1.)+(-0.53985003209)
-        ref[3,1,1,0]=(-1.18480584023)/(o+1.)+(0.398909027255)
-        ref[3,1,1,1]=(0.402069277892)/(o+1.)+(-0.489247177975)
-        ref[3,1,2,0]=(0.27608763117)/(o+1.)+(-0.471083360513)
-        ref[3,1,2,1]=(-0.273636427696)/(o+1.)+(-0.101405200809)
-        ref[3,2,0,0]=(1.92572771773)/(o+1.)+(0.790760639563)
-        ref[3,2,0,1]=(0.16264122626)/(o+1.)+(-0.0283610138982)
-        ref[3,2,1,0]=(0.377561018039)/(o+1.)+(-0.076775827108)
-        ref[3,2,1,1]=(-0.652466873272)/(o+1.)+(0.334132944227)
-        ref[3,2,2,0]=(-0.0304721826842)/(o+1.)+(0.32821680556)
-        ref[3,2,2,1]=(-1.52932569088)/(o+1.)+(-0.885347470761)
-        ref[3,3,0,0]=(-0.451938162279)/(o+1.)+(0.564994822546)
-        ref[3,3,0,1]=(-0.477583137662)/(o+1.)+(0.414148122113)
-        ref[3,3,1,0]=(1.38037325689)/(o+1.)+(0.391811189625)
-        ref[3,3,1,1]=(-1.01333159097)/(o+1.)+(-1.00199047255)
-        ref[3,3,2,0]=(1.3222644334)/(o+1.)+(-0.114358254173)
-        ref[3,3,2,1]=(-0.248989333346)/(o+1.)+(-0.0505008579799)
-        ref[3,4,0,0]=(-1.92196761736)/(o+1.)+(-1.27436231268)
-        ref[3,4,0,1]=(0.894404962457)/(o+1.)+(0.852148096971)
-        ref[3,4,1,0]=(0.868763436571)/(o+1.)+(-1.134668777)
-        ref[3,4,1,1]=(0.438747123022)/(o+1.)+(-0.0278992142568)
-        ref[3,4,2,0]=(0.532575431402)/(o+1.)+(0.167616835826)
-        ref[3,4,2,1]=(0.796744496799)/(o+1.)+(-0.109471640471)
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 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 the 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.217470460227)*x[0]**o+(0.664132905811)*x[0]+(0.493878617743)*x[1]**o+(0.111327715714)*x[1]
-        ref=(0.276408157516)/(o+1.)+(0.387730310763)
-      else:
-        arg=(0.371937838886)*x[0]**o+(0.653846807778)*x[0]+(0.172358058188)*x[1]**o+(-0.928017916614)*x[1]+(0.116156616174)*x[2]**o+(0.371332501889)*x[2]
-        ref=(0.660452513249)/(o+1.)+(0.0485806965265)
-      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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(-0.329952046701)*x[0]**o+(0.12757022314)*x[0]+(0.198280362833)*x[1]**o+(0.129179854334)*x[1]
-        arg[1]=(0.185895161332)*x[0]**o+(0.270740935936)*x[0]+(0.630122833594)*x[1]**o+(-0.0696403698787)*x[1]
-        ref[0]=(-0.131671683869)/(o+1.)+(0.128375038737)
-        ref[1]=(0.816017994925)/(o+1.)+(0.100550283029)
-      else:
-        arg[0]=(0.526257699936)*x[0]**o+(0.0731442796396)*x[0]+(-0.266121642119)*x[1]**o+(-0.929478242136)*x[1]+(0.743092861949)*x[2]**o+(0.22690419858)*x[2]
-        arg[1]=(-0.121387039147)*x[0]**o+(-0.0580608263784)*x[0]+(0.761164059949)*x[1]**o+(0.821938972431)*x[1]+(-0.756423175962)*x[2]**o+(0.213207132353)*x[2]
-        ref[0]=(1.00322891977)/(o+1.)+(-0.314714881958)
-        ref[1]=(-0.11664615516)/(o+1.)+(0.488542639203)
-      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_onReducedFunction_fromData_ReducedFunction_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.963318847499)*x[0]**o+(-0.184977238308)*x[0]+(0.153633231879)*x[1]**o+(-0.640028315216)*x[1]
-        arg[0,1]=(0.0879103656102)*x[0]**o+(-0.928854425726)*x[0]+(-0.138566176095)*x[1]**o+(-0.670118398936)*x[1]
-        arg[0,2]=(0.920856326204)*x[0]**o+(0.461047594595)*x[0]+(-0.914778320363)*x[1]**o+(-0.561644217568)*x[1]
-        arg[0,3]=(0.506148289443)*x[0]**o+(-0.474044343536)*x[0]+(0.742127575836)*x[1]**o+(-0.52349314159)*x[1]
-        arg[0,4]=(0.0810224543145)*x[0]**o+(-0.307992483498)*x[0]+(0.749673245291)*x[1]**o+(-0.554099873044)*x[1]
-        arg[1,0]=(-0.270897099553)*x[0]**o+(-0.222178461886)*x[0]+(0.755729049844)*x[1]**o+(0.740743777894)*x[1]
-        arg[1,1]=(0.0220934176819)*x[0]**o+(-0.309641658323)*x[0]+(-0.951833592348)*x[1]**o+(0.430554526918)*x[1]
-        arg[1,2]=(0.176033311218)*x[0]**o+(0.728188001962)*x[0]+(-0.428357954006)*x[1]**o+(0.955059500699)*x[1]
-        arg[1,3]=(0.946680422474)*x[0]**o+(-0.251968148743)*x[0]+(-0.3704600461)*x[1]**o+(0.692080922297)*x[1]
-        arg[1,4]=(0.122655375591)*x[0]**o+(0.617285886533)*x[0]+(0.729184247986)*x[1]**o+(0.30369620264)*x[1]
-        arg[2,0]=(-0.957780501271)*x[0]**o+(0.438290429468)*x[0]+(-0.504841431279)*x[1]**o+(0.935350834608)*x[1]
-        arg[2,1]=(-0.49410765407)*x[0]**o+(-0.635142349002)*x[0]+(0.700131616572)*x[1]**o+(0.99523209861)*x[1]
-        arg[2,2]=(0.0967686936303)*x[0]**o+(0.987754073381)*x[0]+(-0.161220173386)*x[1]**o+(-0.343926097784)*x[1]
-        arg[2,3]=(0.560040886628)*x[0]**o+(-0.843778720323)*x[0]+(0.345354034369)*x[1]**o+(0.440584543858)*x[1]
-        arg[2,4]=(0.988977815245)*x[0]**o+(0.661922598357)*x[0]+(-0.425421002549)*x[1]**o+(0.624279872655)*x[1]
-        arg[3,0]=(-0.997217068098)*x[0]**o+(-0.973497091595)*x[0]+(-0.0980683851598)*x[1]**o+(0.408081557041)*x[1]
-        arg[3,1]=(0.0827616522414)*x[0]**o+(0.931022772362)*x[0]+(-0.588688206358)*x[1]**o+(0.900467348992)*x[1]
-        arg[3,2]=(0.0933642874383)*x[0]**o+(0.398732664158)*x[0]+(-0.437102212783)*x[1]**o+(-0.126538302466)*x[1]
-        arg[3,3]=(0.251989644486)*x[0]**o+(0.765809815972)*x[0]+(-0.325455283605)*x[1]**o+(0.171819372538)*x[1]
-        arg[3,4]=(0.649407682145)*x[0]**o+(0.963776897105)*x[0]+(0.671915752131)*x[1]**o+(-0.468729629153)*x[1]
-        ref[0,0]=(-0.80968561562)/(o+1.)+(-0.412502776762)
-        ref[0,1]=(-0.0506558104848)/(o+1.)+(-0.799486412331)
-        ref[0,2]=(0.00607800584081)/(o+1.)+(-0.0502983114867)
-        ref[0,3]=(1.24827586528)/(o+1.)+(-0.498768742563)
-        ref[0,4]=(0.830695699605)/(o+1.)+(-0.431046178271)
-        ref[1,0]=(0.484831950292)/(o+1.)+(0.259282658004)
-        ref[1,1]=(-0.929740174666)/(o+1.)+(0.0604564342974)
-        ref[1,2]=(-0.252324642788)/(o+1.)+(0.84162375133)
-        ref[1,3]=(0.576220376373)/(o+1.)+(0.220056386777)
-        ref[1,4]=(0.851839623577)/(o+1.)+(0.460491044586)
-        ref[2,0]=(-1.46262193255)/(o+1.)+(0.686820632038)
-        ref[2,1]=(0.206023962501)/(o+1.)+(0.180044874804)
-        ref[2,2]=(-0.0644514797559)/(o+1.)+(0.321913987798)
-        ref[2,3]=(0.905394920997)/(o+1.)+(-0.201597088233)
-        ref[2,4]=(0.563556812695)/(o+1.)+(0.643101235506)
-        ref[3,0]=(-1.09528545326)/(o+1.)+(-0.282707767277)
-        ref[3,1]=(-0.505926554117)/(o+1.)+(0.915745060677)
-        ref[3,2]=(-0.343737925345)/(o+1.)+(0.136097180846)
-        ref[3,3]=(-0.0734656391194)/(o+1.)+(0.468814594255)
-        ref[3,4]=(1.32132343428)/(o+1.)+(0.247523633976)
-      else:
-        arg[0,0]=(-0.512698606017)*x[0]**o+(-0.156853163498)*x[0]+(0.247997355633)*x[1]**o+(-0.363003068904)*x[1]+(-0.940097989108)*x[2]**o+(-0.661063850288)*x[2]
-        arg[0,1]=(-0.886390181577)*x[0]**o+(0.724049511142)*x[0]+(0.260684592163)*x[1]**o+(0.265648885034)*x[1]+(0.123084281693)*x[2]**o+(0.181492979151)*x[2]
-        arg[0,2]=(-0.570543998851)*x[0]**o+(0.0541041165388)*x[0]+(0.630994990544)*x[1]**o+(-0.89311079559)*x[1]+(0.750714073617)*x[2]**o+(-0.0684796380527)*x[2]
-        arg[0,3]=(0.605486031268)*x[0]**o+(0.0387617487672)*x[0]+(-0.365027101406)*x[1]**o+(0.323275180514)*x[1]+(-0.763142660003)*x[2]**o+(-0.331069480921)*x[2]
-        arg[0,4]=(-0.0779035848472)*x[0]**o+(-0.0234904624931)*x[0]+(0.591635786678)*x[1]**o+(-0.793680126332)*x[1]+(-0.874742296757)*x[2]**o+(-0.184528885157)*x[2]
-        arg[1,0]=(-0.62480972544)*x[0]**o+(-0.99242215547)*x[0]+(0.634250679117)*x[1]**o+(-0.785448642692)*x[1]+(-0.013335654402)*x[2]**o+(0.52112750417)*x[2]
-        arg[1,1]=(0.611541580179)*x[0]**o+(-0.203144044802)*x[0]+(-0.411277184995)*x[1]**o+(0.373487145939)*x[1]+(-0.679339345026)*x[2]**o+(-0.632413536218)*x[2]
-        arg[1,2]=(-0.258927016205)*x[0]**o+(0.0242628959926)*x[0]+(-0.596909760383)*x[1]**o+(-0.295787354787)*x[1]+(-0.337930022823)*x[2]**o+(-0.825085100446)*x[2]
-        arg[1,3]=(-0.0976663781507)*x[0]**o+(0.716600132838)*x[0]+(-0.682155341898)*x[1]**o+(-0.154484864167)*x[1]+(0.754686874908)*x[2]**o+(-0.102453470268)*x[2]
-        arg[1,4]=(0.268714339964)*x[0]**o+(0.974234398844)*x[0]+(-0.370113158384)*x[1]**o+(0.0745228956861)*x[1]+(-0.0674370676047)*x[2]**o+(0.132605448278)*x[2]
-        arg[2,0]=(-0.00750893262562)*x[0]**o+(0.507641887134)*x[0]+(0.638483932117)*x[1]**o+(-0.940295540912)*x[1]+(-0.201492519698)*x[2]**o+(0.504878595818)*x[2]
-        arg[2,1]=(-0.0283522980593)*x[0]**o+(-0.76577346605)*x[0]+(0.0863472830598)*x[1]**o+(-0.904447859187)*x[1]+(-0.203390005492)*x[2]**o+(-0.741629136645)*x[2]
-        arg[2,2]=(-0.0196123831667)*x[0]**o+(-0.320721372799)*x[0]+(0.0670421287749)*x[1]**o+(-0.415029682416)*x[1]+(0.450269143475)*x[2]**o+(-0.735201210502)*x[2]
-        arg[2,3]=(-0.621537330758)*x[0]**o+(0.21573881897)*x[0]+(0.0364275955835)*x[1]**o+(0.873908952751)*x[1]+(-0.197046790303)*x[2]**o+(0.655654722165)*x[2]
-        arg[2,4]=(0.432531007791)*x[0]**o+(-0.65605251166)*x[0]+(0.728245204833)*x[1]**o+(-0.769998936989)*x[1]+(-0.797879623133)*x[2]**o+(0.36575554332)*x[2]
-        arg[3,0]=(0.512219734043)*x[0]**o+(-0.177942735603)*x[0]+(-0.307293350237)*x[1]**o+(-0.780181541911)*x[1]+(-0.510201727643)*x[2]**o+(-0.567980715525)*x[2]
-        arg[3,1]=(-0.405123989366)*x[0]**o+(-0.133316566583)*x[0]+(0.552868689995)*x[1]**o+(-0.921149434884)*x[1]+(0.510851078054)*x[2]**o+(0.7207533866)*x[2]
-        arg[3,2]=(0.150011788901)*x[0]**o+(-0.55947555552)*x[0]+(-0.353366762442)*x[1]**o+(0.204954197301)*x[1]+(-0.48254632377)*x[2]**o+(-0.272738900127)*x[2]
-        arg[3,3]=(-0.690981207461)*x[0]**o+(0.38683432128)*x[0]+(0.655731808738)*x[1]**o+(0.162269870301)*x[1]+(-0.373468659959)*x[2]**o+(-0.841431521009)*x[2]
-        arg[3,4]=(0.156455675319)*x[0]**o+(0.501690084272)*x[0]+(-0.339255791314)*x[1]**o+(0.0832260784264)*x[1]+(0.394137401365)*x[2]**o+(-0.92403906326)*x[2]
-        ref[0,0]=(-1.20479923949)/(o+1.)+(-0.590460041345)
-        ref[0,1]=(-0.502621307721)/(o+1.)+(0.585595687663)
-        ref[0,2]=(0.811165065311)/(o+1.)+(-0.453743158552)
-        ref[0,3]=(-0.522683730141)/(o+1.)+(0.0154837241797)
-        ref[0,4]=(-0.361010094926)/(o+1.)+(-0.500849736991)
-        ref[1,0]=(-0.00389470072479)/(o+1.)+(-0.628371646996)
-        ref[1,1]=(-0.479074949842)/(o+1.)+(-0.23103521754)
-        ref[1,2]=(-1.19376679941)/(o+1.)+(-0.54830477962)
-        ref[1,3]=(-0.0251348451402)/(o+1.)+(0.229830899202)
-        ref[1,4]=(-0.168835886025)/(o+1.)+(0.590681371404)
-        ref[2,0]=(0.429482479793)/(o+1.)+(0.0361124710203)
-        ref[2,1]=(-0.145395020492)/(o+1.)+(-1.20592523094)
-        ref[2,2]=(0.497698889084)/(o+1.)+(-0.735476132859)
-        ref[2,3]=(-0.782156525477)/(o+1.)+(0.872651246943)
-        ref[2,4]=(0.362896589491)/(o+1.)+(-0.530147952664)
-        ref[3,0]=(-0.305275343837)/(o+1.)+(-0.763052496519)
-        ref[3,1]=(0.658595778683)/(o+1.)+(-0.166856307434)
-        ref[3,2]=(-0.685901297311)/(o+1.)+(-0.313630129173)
-        ref[3,3]=(-0.408718058683)/(o+1.)+(-0.146163664714)
-        ref[3,4]=(0.21133728537)/(o+1.)+(-0.169561450281)
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.165423911829)*x[0]**o+(0.912542062064)*x[0]+(0.515840721225)*x[1]**o+(-0.855922021017)*x[1]
-        arg[0,0,1]=(0.591873802546)*x[0]**o+(-0.039385167187)*x[0]+(0.0261484884274)*x[1]**o+(0.227950240434)*x[1]
-        arg[0,1,0]=(-0.825833712046)*x[0]**o+(0.989606797765)*x[0]+(0.975260558791)*x[1]**o+(0.297963603984)*x[1]
-        arg[0,1,1]=(-0.658054502482)*x[0]**o+(-0.865505090963)*x[0]+(0.817184084453)*x[1]**o+(-0.409588098899)*x[1]
-        arg[1,0,0]=(0.538456987198)*x[0]**o+(-0.0768787509391)*x[0]+(0.424620431835)*x[1]**o+(0.799917948831)*x[1]
-        arg[1,0,1]=(0.125945558199)*x[0]**o+(-0.48320049996)*x[0]+(0.105474962327)*x[1]**o+(-0.090713555582)*x[1]
-        arg[1,1,0]=(0.835213375418)*x[0]**o+(-0.513407038769)*x[0]+(-0.342890811735)*x[1]**o+(-0.285057736244)*x[1]
-        arg[1,1,1]=(0.762782085749)*x[0]**o+(-0.308457087352)*x[0]+(0.23756726753)*x[1]**o+(-0.909365956504)*x[1]
-        arg[2,0,0]=(-0.76467980678)*x[0]**o+(-0.265552922006)*x[0]+(-0.261862355539)*x[1]**o+(-0.399407404618)*x[1]
-        arg[2,0,1]=(0.79401193617)*x[0]**o+(-0.0300461495216)*x[0]+(-0.978834133508)*x[1]**o+(-0.984845382599)*x[1]
-        arg[2,1,0]=(0.898033018534)*x[0]**o+(-0.184513430159)*x[0]+(0.0430634098526)*x[1]**o+(0.62213313954)*x[1]
-        arg[2,1,1]=(0.126926439246)*x[0]**o+(0.671259428917)*x[0]+(-0.396062855417)*x[1]**o+(0.0461825691916)*x[1]
-        arg[3,0,0]=(0.185756594279)*x[0]**o+(0.570946291973)*x[0]+(0.0673731944956)*x[1]**o+(0.367766610292)*x[1]
-        arg[3,0,1]=(0.021269224946)*x[0]**o+(-0.463663279063)*x[0]+(-0.687930988068)*x[1]**o+(0.184714204849)*x[1]
-        arg[3,1,0]=(0.754288639303)*x[0]**o+(-0.94612827517)*x[0]+(0.802463196709)*x[1]**o+(0.202355582077)*x[1]
-        arg[3,1,1]=(0.840002857786)*x[0]**o+(-0.692207739447)*x[0]+(0.486569391181)*x[1]**o+(-0.713960793192)*x[1]
-        arg[4,0,0]=(-0.205794539655)*x[0]**o+(-0.930458992533)*x[0]+(-0.62580205172)*x[1]**o+(-0.884738110673)*x[1]
-        arg[4,0,1]=(-0.91433612349)*x[0]**o+(0.694961527804)*x[0]+(-0.510941334746)*x[1]**o+(-0.510725271706)*x[1]
-        arg[4,1,0]=(0.852785499366)*x[0]**o+(0.870826628851)*x[0]+(-0.577529754198)*x[1]**o+(-0.583793684857)*x[1]
-        arg[4,1,1]=(-0.604869226881)*x[0]**o+(0.482463572402)*x[0]+(0.829654316885)*x[1]**o+(0.597543822455)*x[1]
-        arg[5,0,0]=(0.413459469749)*x[0]**o+(0.865143264083)*x[0]+(0.986197644249)*x[1]**o+(-0.2511021346)*x[1]
-        arg[5,0,1]=(0.811572168213)*x[0]**o+(-0.110121334437)*x[0]+(-0.985492232242)*x[1]**o+(-0.913436084156)*x[1]
-        arg[5,1,0]=(-0.660869051422)*x[0]**o+(-0.743235620427)*x[0]+(0.205393778238)*x[1]**o+(0.296069404687)*x[1]
-        arg[5,1,1]=(-0.13285011267)*x[0]**o+(0.659400366834)*x[0]+(-0.889984368942)*x[1]**o+(0.584893563559)*x[1]
-        ref[0,0,0]=(0.350416809396)/(o+1.)+(0.0283100205234)
-        ref[0,0,1]=(0.618022290973)/(o+1.)+(0.0942825366236)
-        ref[0,1,0]=(0.149426846745)/(o+1.)+(0.643785200874)
-        ref[0,1,1]=(0.159129581971)/(o+1.)+(-0.637546594931)
-        ref[1,0,0]=(0.963077419032)/(o+1.)+(0.361519598946)
-        ref[1,0,1]=(0.231420520526)/(o+1.)+(-0.286957027771)
-        ref[1,1,0]=(0.492322563683)/(o+1.)+(-0.399232387506)
-        ref[1,1,1]=(1.00034935328)/(o+1.)+(-0.608911521928)
-        ref[2,0,0]=(-1.02654216232)/(o+1.)+(-0.332480163312)
-        ref[2,0,1]=(-0.184822197338)/(o+1.)+(-0.507445766061)
-        ref[2,1,0]=(0.941096428387)/(o+1.)+(0.21880985469)
-        ref[2,1,1]=(-0.269136416172)/(o+1.)+(0.358720999054)
-        ref[3,0,0]=(0.253129788774)/(o+1.)+(0.469356451133)
-        ref[3,0,1]=(-0.666661763122)/(o+1.)+(-0.139474537107)
-        ref[3,1,0]=(1.55675183601)/(o+1.)+(-0.371886346546)
-        ref[3,1,1]=(1.32657224897)/(o+1.)+(-0.703084266319)
-        ref[4,0,0]=(-0.831596591375)/(o+1.)+(-0.907598551603)
-        ref[4,0,1]=(-1.42527745824)/(o+1.)+(0.0921181280487)
-        ref[4,1,0]=(0.275255745168)/(o+1.)+(0.143516471997)
-        ref[4,1,1]=(0.224785090004)/(o+1.)+(0.540003697429)
-        ref[5,0,0]=(1.399657114)/(o+1.)+(0.307020564742)
-        ref[5,0,1]=(-0.173920064028)/(o+1.)+(-0.511778709296)
-        ref[5,1,0]=(-0.455475273184)/(o+1.)+(-0.22358310787)
-        ref[5,1,1]=(-1.02283448161)/(o+1.)+(0.622146965196)
-      else:
-        arg[0,0,0]=(-0.564478749422)*x[0]**o+(-0.0357223504179)*x[0]+(0.396603298865)*x[1]**o+(-0.461941327703)*x[1]+(-0.667580657928)*x[2]**o+(-0.589957067263)*x[2]
-        arg[0,0,1]=(0.930616008951)*x[0]**o+(-0.764067565635)*x[0]+(-0.71350617205)*x[1]**o+(-0.530942701898)*x[1]+(-0.103797356434)*x[2]**o+(0.410704036673)*x[2]
-        arg[0,1,0]=(-0.59127392299)*x[0]**o+(0.452490122131)*x[0]+(0.714793625631)*x[1]**o+(-0.933114051133)*x[1]+(-0.693437840325)*x[2]**o+(0.979267231764)*x[2]
-        arg[0,1,1]=(0.179682332267)*x[0]**o+(-0.419960476425)*x[0]+(-0.10986598341)*x[1]**o+(0.912986428497)*x[1]+(0.0886946782573)*x[2]**o+(0.516065958873)*x[2]
-        arg[1,0,0]=(0.524446863481)*x[0]**o+(-0.439668193423)*x[0]+(0.681259811488)*x[1]**o+(0.439275262258)*x[1]+(0.84573881706)*x[2]**o+(0.377640553175)*x[2]
-        arg[1,0,1]=(-0.007464905203)*x[0]**o+(0.234727832471)*x[0]+(0.0428956356618)*x[1]**o+(0.195772930172)*x[1]+(0.457790934614)*x[2]**o+(0.445309166495)*x[2]
-        arg[1,1,0]=(0.821283375827)*x[0]**o+(0.212480005798)*x[0]+(0.148817990961)*x[1]**o+(0.119716150877)*x[1]+(0.658959126865)*x[2]**o+(-0.346216916131)*x[2]
-        arg[1,1,1]=(-0.0587222422894)*x[0]**o+(-0.325321661973)*x[0]+(0.149293818689)*x[1]**o+(-0.632073115037)*x[1]+(0.018604271874)*x[2]**o+(-0.412288240166)*x[2]
-        arg[2,0,0]=(-0.22588082169)*x[0]**o+(0.197780461217)*x[0]+(0.387336989213)*x[1]**o+(-0.680021661016)*x[1]+(-0.903782254346)*x[2]**o+(-0.273268109853)*x[2]
-        arg[2,0,1]=(0.415876394297)*x[0]**o+(0.199596795904)*x[0]+(-0.445817134682)*x[1]**o+(0.672539590684)*x[1]+(0.907825473964)*x[2]**o+(0.459560469691)*x[2]
-        arg[2,1,0]=(-0.052146887134)*x[0]**o+(-0.229450574738)*x[0]+(0.0929720151604)*x[1]**o+(-0.893861034491)*x[1]+(-0.294030328982)*x[2]**o+(-0.193256779109)*x[2]
-        arg[2,1,1]=(0.361171422066)*x[0]**o+(-0.212022056495)*x[0]+(0.0672221746963)*x[1]**o+(0.57506871515)*x[1]+(0.654894469509)*x[2]**o+(0.0749777260533)*x[2]
-        arg[3,0,0]=(0.505355253404)*x[0]**o+(-0.0753563586359)*x[0]+(0.544299279727)*x[1]**o+(-0.781954131328)*x[1]+(0.534390713891)*x[2]**o+(-0.719289344378)*x[2]
-        arg[3,0,1]=(-0.589309652827)*x[0]**o+(-0.0557421151178)*x[0]+(-0.275311076837)*x[1]**o+(0.998180518149)*x[1]+(-0.844823856433)*x[2]**o+(-0.988843805162)*x[2]
-        arg[3,1,0]=(-0.411075104301)*x[0]**o+(-0.405896828894)*x[0]+(0.242301856034)*x[1]**o+(-0.760648969984)*x[1]+(0.0940367373673)*x[2]**o+(-0.121420230853)*x[2]
-        arg[3,1,1]=(-0.201426146967)*x[0]**o+(0.722847134095)*x[0]+(-0.00743580369433)*x[1]**o+(-0.593158423904)*x[1]+(0.630575332064)*x[2]**o+(-0.309839791343)*x[2]
-        arg[4,0,0]=(0.370057366738)*x[0]**o+(0.35683022394)*x[0]+(0.886304520049)*x[1]**o+(0.834488899465)*x[1]+(0.27408661832)*x[2]**o+(0.325007409933)*x[2]
-        arg[4,0,1]=(0.386153377977)*x[0]**o+(-0.889700309398)*x[0]+(-0.60695970137)*x[1]**o+(0.701208035732)*x[1]+(0.435164510485)*x[2]**o+(0.40223148148)*x[2]
-        arg[4,1,0]=(-0.227256041906)*x[0]**o+(-0.0406115125763)*x[0]+(-0.0298974314183)*x[1]**o+(0.887167464033)*x[1]+(0.1004751563)*x[2]**o+(0.826924545719)*x[2]
-        arg[4,1,1]=(0.733575640137)*x[0]**o+(-0.376269474248)*x[0]+(-0.841290711112)*x[1]**o+(-0.0633013917179)*x[1]+(0.335730636406)*x[2]**o+(0.913607658221)*x[2]
-        arg[5,0,0]=(-0.896019254334)*x[0]**o+(0.465470987762)*x[0]+(0.338543664838)*x[1]**o+(0.182102591196)*x[1]+(0.476317455739)*x[2]**o+(0.191367623163)*x[2]
-        arg[5,0,1]=(0.828458939676)*x[0]**o+(-0.37853033744)*x[0]+(-0.540809170906)*x[1]**o+(0.367869598038)*x[1]+(0.321196361443)*x[2]**o+(0.548981819769)*x[2]
-        arg[5,1,0]=(-0.0805871335579)*x[0]**o+(-0.554679375424)*x[0]+(-0.259438414137)*x[1]**o+(0.72362534417)*x[1]+(-0.838855028889)*x[2]**o+(0.929802758377)*x[2]
-        arg[5,1,1]=(-0.947910259125)*x[0]**o+(0.654012824998)*x[0]+(0.425232602078)*x[1]**o+(-0.649345176159)*x[1]+(-0.946280438348)*x[2]**o+(-0.429547284912)*x[2]
-        ref[0,0,0]=(-0.835456108484)/(o+1.)+(-0.543810372692)
-        ref[0,0,1]=(0.113312480467)/(o+1.)+(-0.44215311543)
-        ref[0,1,0]=(-0.569918137684)/(o+1.)+(0.249321651381)
-        ref[0,1,1]=(0.158511027114)/(o+1.)+(0.504545955472)
-        ref[1,0,0]=(2.05144549203)/(o+1.)+(0.188623811006)
-        ref[1,0,1]=(0.493221665073)/(o+1.)+(0.437904964569)
-        ref[1,1,0]=(1.62906049365)/(o+1.)+(-0.00701037972825)
-        ref[1,1,1]=(0.109175848273)/(o+1.)+(-0.684841508588)
-        ref[2,0,0]=(-0.742326086822)/(o+1.)+(-0.377754654826)
-        ref[2,0,1]=(0.877884733578)/(o+1.)+(0.665848428139)
-        ref[2,1,0]=(-0.253205200956)/(o+1.)+(-0.658284194169)
-        ref[2,1,1]=(1.08328806627)/(o+1.)+(0.219012192354)
-        ref[3,0,0]=(1.58404524702)/(o+1.)+(-0.788299917171)
-        ref[3,0,1]=(-1.7094445861)/(o+1.)+(-0.0232027010654)
-        ref[3,1,0]=(-0.0747365109002)/(o+1.)+(-0.643983014866)
-        ref[3,1,1]=(0.421713381403)/(o+1.)+(-0.0900755405762)
-        ref[4,0,0]=(1.53044850511)/(o+1.)+(0.758163266669)
-        ref[4,0,1]=(0.214358187092)/(o+1.)+(0.106869603907)
-        ref[4,1,0]=(-0.156678317024)/(o+1.)+(0.836740248588)
-        ref[4,1,1]=(0.228015565432)/(o+1.)+(0.237018396127)
-        ref[5,0,0]=(-0.0811581337568)/(o+1.)+(0.419470601061)
-        ref[5,0,1]=(0.608846130213)/(o+1.)+(0.269160540183)
-        ref[5,1,0]=(-1.17888057658)/(o+1.)+(0.549374363561)
-        ref[5,1,1]=(-1.4689580954)/(o+1.)+(-0.212439818036)
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 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 the 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,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.216014106349)*x[0]**o+(0.98826230471)*x[0]+(0.522566177319)*x[1]**o+(-0.672520997452)*x[1]
-        arg[0,0,0,1]=(0.368024408084)*x[0]**o+(0.047972971332)*x[0]+(-0.307374327321)*x[1]**o+(0.0745169735457)*x[1]
-        arg[0,0,1,0]=(0.438735045452)*x[0]**o+(0.76355958752)*x[0]+(0.200829025437)*x[1]**o+(0.56912407759)*x[1]
-        arg[0,0,1,1]=(-0.0328769393712)*x[0]**o+(-0.39701363611)*x[0]+(0.704125532519)*x[1]**o+(-0.6602435084)*x[1]
-        arg[0,0,2,0]=(-0.547717992717)*x[0]**o+(-0.844256763776)*x[0]+(0.621300470147)*x[1]**o+(-0.105216181226)*x[1]
-        arg[0,0,2,1]=(-0.723474063234)*x[0]**o+(-0.980738972901)*x[0]+(-0.183578659566)*x[1]**o+(0.586038450047)*x[1]
-        arg[0,1,0,0]=(0.505379907001)*x[0]**o+(-0.470514711277)*x[0]+(0.799116811747)*x[1]**o+(0.682760846386)*x[1]
-        arg[0,1,0,1]=(0.353992609198)*x[0]**o+(-0.848107655585)*x[0]+(-0.774065459855)*x[1]**o+(0.0323137462292)*x[1]
-        arg[0,1,1,0]=(0.799068805694)*x[0]**o+(-0.979761821209)*x[0]+(0.642674987867)*x[1]**o+(-0.639029952044)*x[1]
-        arg[0,1,1,1]=(0.542556683327)*x[0]**o+(0.876753086356)*x[0]+(-0.387121297643)*x[1]**o+(0.377543179628)*x[1]
-        arg[0,1,2,0]=(0.424672899596)*x[0]**o+(-0.134184751569)*x[0]+(-0.561877304114)*x[1]**o+(0.549933699347)*x[1]
-        arg[0,1,2,1]=(-0.126173294501)*x[0]**o+(-0.338964866844)*x[0]+(-0.163536115759)*x[1]**o+(0.747551558186)*x[1]
-        arg[0,2,0,0]=(0.304334183452)*x[0]**o+(0.927809971187)*x[0]+(0.961504942988)*x[1]**o+(0.0698014252396)*x[1]
-        arg[0,2,0,1]=(0.488820088455)*x[0]**o+(0.890735247208)*x[0]+(0.686782901398)*x[1]**o+(0.972954994564)*x[1]
-        arg[0,2,1,0]=(-0.737577792766)*x[0]**o+(-0.351698913646)*x[0]+(0.392591489865)*x[1]**o+(0.79238240143)*x[1]
-        arg[0,2,1,1]=(-0.997254027544)*x[0]**o+(0.579800166465)*x[0]+(-0.95000690643)*x[1]**o+(-0.166463083476)*x[1]
-        arg[0,2,2,0]=(-0.999703749644)*x[0]**o+(0.0415211466468)*x[0]+(0.0816160245139)*x[1]**o+(-0.0921114587195)*x[1]
-        arg[0,2,2,1]=(-0.172818721386)*x[0]**o+(0.10475692446)*x[0]+(-0.855815339933)*x[1]**o+(-0.50842580034)*x[1]
-        arg[0,3,0,0]=(-0.154563121513)*x[0]**o+(-0.0956305513369)*x[0]+(-0.893783521038)*x[1]**o+(0.10772474638)*x[1]
-        arg[0,3,0,1]=(0.365331678349)*x[0]**o+(0.403124820832)*x[0]+(-0.0750500521493)*x[1]**o+(0.62559762808)*x[1]
-        arg[0,3,1,0]=(-0.42235875521)*x[0]**o+(0.831133238533)*x[0]+(-0.893322944982)*x[1]**o+(0.936074096319)*x[1]
-        arg[0,3,1,1]=(0.587382334689)*x[0]**o+(0.996190710631)*x[0]+(-0.796032791654)*x[1]**o+(0.783491453801)*x[1]
-        arg[0,3,2,0]=(-0.369527027508)*x[0]**o+(-0.501417552089)*x[0]+(-0.372105439045)*x[1]**o+(0.653283000152)*x[1]
-        arg[0,3,2,1]=(0.914893750314)*x[0]**o+(-0.769183323793)*x[0]+(0.571638486717)*x[1]**o+(-0.939784652259)*x[1]
-        arg[0,4,0,0]=(0.134859060251)*x[0]**o+(-0.297363165275)*x[0]+(0.198957028974)*x[1]**o+(-0.828531725127)*x[1]
-        arg[0,4,0,1]=(-0.371375370217)*x[0]**o+(-0.0422058718402)*x[0]+(0.502010302278)*x[1]**o+(0.442051802597)*x[1]
-        arg[0,4,1,0]=(0.513346571173)*x[0]**o+(0.182640867356)*x[0]+(0.76200283664)*x[1]**o+(0.134640432361)*x[1]
-        arg[0,4,1,1]=(-0.815543712756)*x[0]**o+(0.0306226823724)*x[0]+(-0.0211231926242)*x[1]**o+(-0.718800228294)*x[1]
-        arg[0,4,2,0]=(-0.980596107555)*x[0]**o+(-0.714237107759)*x[0]+(0.547986215851)*x[1]**o+(0.180131474534)*x[1]
-        arg[0,4,2,1]=(-0.460780402239)*x[0]**o+(-0.483771113997)*x[0]+(-0.017140263255)*x[1]**o+(-0.127947184627)*x[1]
-        arg[1,0,0,0]=(-0.0187443155707)*x[0]**o+(-0.490914415873)*x[0]+(-0.720022496093)*x[1]**o+(0.0265633770733)*x[1]
-        arg[1,0,0,1]=(-0.634855765904)*x[0]**o+(0.345031954366)*x[0]+(-0.0532392363316)*x[1]**o+(0.983295524564)*x[1]
-        arg[1,0,1,0]=(0.262182040476)*x[0]**o+(-0.883857758733)*x[0]+(0.880670543535)*x[1]**o+(0.193477695378)*x[1]
-        arg[1,0,1,1]=(-0.0825976168371)*x[0]**o+(0.161838720337)*x[0]+(-0.0110587499089)*x[1]**o+(-0.634455402489)*x[1]
-        arg[1,0,2,0]=(0.284221958342)*x[0]**o+(-0.948548729029)*x[0]+(0.430914344458)*x[1]**o+(-0.18563638241)*x[1]
-        arg[1,0,2,1]=(-0.459558022898)*x[0]**o+(0.431907572866)*x[0]+(-0.0597669070218)*x[1]**o+(0.0694271372225)*x[1]
-        arg[1,1,0,0]=(0.54071078447)*x[0]**o+(-0.244570994356)*x[0]+(0.00506219762373)*x[1]**o+(-0.0816378019186)*x[1]
-        arg[1,1,0,1]=(-0.100752221379)*x[0]**o+(0.535738345566)*x[0]+(0.730325284553)*x[1]**o+(-0.885044748717)*x[1]
-        arg[1,1,1,0]=(-0.0422460353138)*x[0]**o+(-0.986416505995)*x[0]+(-0.111766776997)*x[1]**o+(-0.842179226197)*x[1]
-        arg[1,1,1,1]=(0.0690281593169)*x[0]**o+(-0.885054188663)*x[0]+(-0.680349314907)*x[1]**o+(0.00277190934345)*x[1]
-        arg[1,1,2,0]=(0.502632146841)*x[0]**o+(-0.197332151163)*x[0]+(-0.0942257361149)*x[1]**o+(0.045171692749)*x[1]
-        arg[1,1,2,1]=(0.427910466818)*x[0]**o+(-0.61355947216)*x[0]+(0.465128040517)*x[1]**o+(0.0874536555354)*x[1]
-        arg[1,2,0,0]=(0.943819415417)*x[0]**o+(0.884020001869)*x[0]+(-0.769166027477)*x[1]**o+(-0.10032307068)*x[1]
-        arg[1,2,0,1]=(0.0670224828564)*x[0]**o+(-0.645424481071)*x[0]+(-0.756361652678)*x[1]**o+(-0.274687916196)*x[1]
-        arg[1,2,1,0]=(0.397836742229)*x[0]**o+(-0.708791058745)*x[0]+(0.920869587663)*x[1]**o+(-0.250037069918)*x[1]
-        arg[1,2,1,1]=(0.722570486719)*x[0]**o+(-0.358082774936)*x[0]+(0.786344673969)*x[1]**o+(0.310591893637)*x[1]
-        arg[1,2,2,0]=(-0.379404573553)*x[0]**o+(-0.969753501645)*x[0]+(-0.0745714915337)*x[1]**o+(-0.262943796911)*x[1]
-        arg[1,2,2,1]=(0.817999459632)*x[0]**o+(0.731516351792)*x[0]+(-0.531411613325)*x[1]**o+(-0.824858061154)*x[1]
-        arg[1,3,0,0]=(-0.206295444021)*x[0]**o+(-0.781973944918)*x[0]+(-0.173845545382)*x[1]**o+(-0.360122364573)*x[1]
-        arg[1,3,0,1]=(-0.0604068005719)*x[0]**o+(0.238691416507)*x[0]+(-0.82262982031)*x[1]**o+(-0.893751755968)*x[1]
-        arg[1,3,1,0]=(-0.686409669386)*x[0]**o+(0.711830599399)*x[0]+(0.0839688142166)*x[1]**o+(-0.99463449684)*x[1]
-        arg[1,3,1,1]=(-0.0864745975077)*x[0]**o+(0.00068907895313)*x[0]+(-0.766810513534)*x[1]**o+(0.685236202954)*x[1]
-        arg[1,3,2,0]=(0.0909338812695)*x[0]**o+(-0.709595654169)*x[0]+(-0.483428504499)*x[1]**o+(-0.0707341191006)*x[1]
-        arg[1,3,2,1]=(-0.38342983855)*x[0]**o+(-0.0407824575865)*x[0]+(-0.201329040891)*x[1]**o+(0.0240007937141)*x[1]
-        arg[1,4,0,0]=(0.512465803173)*x[0]**o+(-0.371898603608)*x[0]+(-0.79453595861)*x[1]**o+(0.340546986375)*x[1]
-        arg[1,4,0,1]=(0.742383198442)*x[0]**o+(-0.603548189912)*x[0]+(-0.270277825546)*x[1]**o+(-0.525100913894)*x[1]
-        arg[1,4,1,0]=(-0.693074384029)*x[0]**o+(-0.825037404844)*x[0]+(-0.626116177978)*x[1]**o+(0.628159342479)*x[1]
-        arg[1,4,1,1]=(-0.595844943255)*x[0]**o+(0.250758194807)*x[0]+(0.504390052142)*x[1]**o+(-0.124588859702)*x[1]
-        arg[1,4,2,0]=(-0.651727490997)*x[0]**o+(0.411138504151)*x[0]+(0.323769160331)*x[1]**o+(0.904379126671)*x[1]
-        arg[1,4,2,1]=(-0.71307850178)*x[0]**o+(0.734964608119)*x[0]+(0.348693698506)*x[1]**o+(0.272270639772)*x[1]
-        arg[2,0,0,0]=(0.558236567771)*x[0]**o+(0.516985445776)*x[0]+(0.0278915137861)*x[1]**o+(-0.268619977833)*x[1]
-        arg[2,0,0,1]=(-0.871181709658)*x[0]**o+(-0.132251987744)*x[0]+(-0.215497073461)*x[1]**o+(0.508008002082)*x[1]
-        arg[2,0,1,0]=(0.880795999572)*x[0]**o+(-0.231151166496)*x[0]+(-0.698846681617)*x[1]**o+(0.914483413825)*x[1]
-        arg[2,0,1,1]=(0.684792911211)*x[0]**o+(-0.801408782989)*x[0]+(0.689713232168)*x[1]**o+(0.142847173797)*x[1]
-        arg[2,0,2,0]=(-0.912566319945)*x[0]**o+(0.811138574657)*x[0]+(-0.884250879071)*x[1]**o+(-0.177206225477)*x[1]
-        arg[2,0,2,1]=(-0.898648046678)*x[0]**o+(0.581554373688)*x[0]+(0.567642878443)*x[1]**o+(0.636312832751)*x[1]
-        arg[2,1,0,0]=(-0.788853365648)*x[0]**o+(-0.135329327941)*x[0]+(0.180850147594)*x[1]**o+(0.742619029335)*x[1]
-        arg[2,1,0,1]=(-0.824539980645)*x[0]**o+(0.857173393615)*x[0]+(0.850455264916)*x[1]**o+(0.975422322464)*x[1]
-        arg[2,1,1,0]=(0.462293517317)*x[0]**o+(-0.173835273794)*x[0]+(-0.800072514276)*x[1]**o+(0.140214114627)*x[1]
-        arg[2,1,1,1]=(-0.187890814293)*x[0]**o+(0.534472364495)*x[0]+(-0.799640665571)*x[1]**o+(0.301287955302)*x[1]
-        arg[2,1,2,0]=(0.278901492946)*x[0]**o+(0.620544326886)*x[0]+(-0.705702443752)*x[1]**o+(-0.489690636328)*x[1]
-        arg[2,1,2,1]=(-0.926772900235)*x[0]**o+(0.134654742845)*x[0]+(0.356561975337)*x[1]**o+(-0.919999359857)*x[1]
-        arg[2,2,0,0]=(-0.675956301416)*x[0]**o+(0.149582589205)*x[0]+(0.186440827385)*x[1]**o+(0.88381610446)*x[1]
-        arg[2,2,0,1]=(-0.697267962915)*x[0]**o+(0.991366596424)*x[0]+(0.310290094618)*x[1]**o+(-0.881771505066)*x[1]
-        arg[2,2,1,0]=(0.506027358474)*x[0]**o+(0.294136137354)*x[0]+(0.732003937836)*x[1]**o+(0.633469131504)*x[1]
-        arg[2,2,1,1]=(-0.427146039728)*x[0]**o+(-0.975737063903)*x[0]+(-0.934913653772)*x[1]**o+(-0.662568325005)*x[1]
-        arg[2,2,2,0]=(0.477849916621)*x[0]**o+(-0.798883883367)*x[0]+(-0.154217684441)*x[1]**o+(-0.175817547912)*x[1]
-        arg[2,2,2,1]=(0.935192620387)*x[0]**o+(-0.193802588249)*x[0]+(0.406181949213)*x[1]**o+(0.20422475396)*x[1]
-        arg[2,3,0,0]=(0.965944278856)*x[0]**o+(-0.736175411725)*x[0]+(0.92404347386)*x[1]**o+(0.273152788392)*x[1]
-        arg[2,3,0,1]=(-0.606944412413)*x[0]**o+(0.692555413476)*x[0]+(0.812085676275)*x[1]**o+(-0.0809920218886)*x[1]
-        arg[2,3,1,0]=(-0.314634777406)*x[0]**o+(0.750181618592)*x[0]+(0.0554739779642)*x[1]**o+(-0.333788326726)*x[1]
-        arg[2,3,1,1]=(0.85610815703)*x[0]**o+(0.910096005524)*x[0]+(-0.227092814843)*x[1]**o+(-0.0849532598914)*x[1]
-        arg[2,3,2,0]=(0.735064128504)*x[0]**o+(-0.253919528943)*x[0]+(0.8457463307)*x[1]**o+(0.865727345925)*x[1]
-        arg[2,3,2,1]=(0.520607989389)*x[0]**o+(0.569210317105)*x[0]+(0.500780081677)*x[1]**o+(-0.787630914351)*x[1]
-        arg[2,4,0,0]=(0.179774694296)*x[0]**o+(-0.890872128607)*x[0]+(-0.185758177247)*x[1]**o+(0.888231734606)*x[1]
-        arg[2,4,0,1]=(0.059863462227)*x[0]**o+(-0.0796463123948)*x[0]+(-0.104564520504)*x[1]**o+(-0.336182528617)*x[1]
-        arg[2,4,1,0]=(-0.636828275967)*x[0]**o+(0.156894572218)*x[0]+(-0.884260096115)*x[1]**o+(-0.967431438795)*x[1]
-        arg[2,4,1,1]=(-0.958168110389)*x[0]**o+(-0.0424772631477)*x[0]+(0.512363473316)*x[1]**o+(-0.716729419668)*x[1]
-        arg[2,4,2,0]=(0.19736654467)*x[0]**o+(-0.288723518002)*x[0]+(0.243674007033)*x[1]**o+(0.911210601142)*x[1]
-        arg[2,4,2,1]=(-0.847493343055)*x[0]**o+(0.115003265593)*x[0]+(0.360071936714)*x[1]**o+(-0.0265385061141)*x[1]
-        arg[3,0,0,0]=(-0.510550590836)*x[0]**o+(-0.266174606631)*x[0]+(0.771580708159)*x[1]**o+(-0.770554374259)*x[1]
-        arg[3,0,0,1]=(-0.65795024738)*x[0]**o+(-0.83394628525)*x[0]+(0.812461325452)*x[1]**o+(0.191593733482)*x[1]
-        arg[3,0,1,0]=(0.136878718548)*x[0]**o+(-0.000345061692795)*x[0]+(-0.0780280205008)*x[1]**o+(0.173925537373)*x[1]
-        arg[3,0,1,1]=(0.584079470149)*x[0]**o+(0.138674493948)*x[0]+(-0.563553909861)*x[1]**o+(-0.254304838008)*x[1]
-        arg[3,0,2,0]=(0.326192887554)*x[0]**o+(0.993615980303)*x[0]+(-0.26995279693)*x[1]**o+(0.216112615287)*x[1]
-        arg[3,0,2,1]=(0.684786021819)*x[0]**o+(0.158934017292)*x[0]+(-0.457448199191)*x[1]**o+(0.644722228163)*x[1]
-        arg[3,1,0,0]=(-0.198252162262)*x[0]**o+(-0.821832378445)*x[0]+(0.831807441916)*x[1]**o+(-0.70643670471)*x[1]
-        arg[3,1,0,1]=(0.361698759016)*x[0]**o+(0.556511107101)*x[0]+(0.892219700601)*x[1]**o+(-0.861598520361)*x[1]
-        arg[3,1,1,0]=(-0.107946706634)*x[0]**o+(-0.910191934756)*x[0]+(0.502507607871)*x[1]**o+(0.649089810516)*x[1]
-        arg[3,1,1,1]=(-0.92959760672)*x[0]**o+(0.950682520961)*x[0]+(0.103321004187)*x[1]**o+(-0.631562667815)*x[1]
-        arg[3,1,2,0]=(0.858565242025)*x[0]**o+(-0.106810606075)*x[0]+(0.236377425048)*x[1]**o+(-0.296320858145)*x[1]
-        arg[3,1,2,1]=(0.148558873625)*x[0]**o+(0.458488334082)*x[0]+(-0.0172824905523)*x[1]**o+(-0.321212766581)*x[1]
-        arg[3,2,0,0]=(-0.239733890336)*x[0]**o+(0.558819103697)*x[0]+(-0.151683129885)*x[1]**o+(0.153995780645)*x[1]
-        arg[3,2,0,1]=(-0.949100270937)*x[0]**o+(0.0687171499139)*x[0]+(0.968028021831)*x[1]**o+(-0.935600499345)*x[1]
-        arg[3,2,1,0]=(-0.739823767237)*x[0]**o+(0.417825150389)*x[0]+(0.318612170707)*x[1]**o+(0.627557337421)*x[1]
-        arg[3,2,1,1]=(-0.965142167324)*x[0]**o+(0.981446854383)*x[0]+(0.266191185951)*x[1]**o+(-0.581303142841)*x[1]
-        arg[3,2,2,0]=(-0.00312606993817)*x[0]**o+(-0.191885030828)*x[0]+(-0.342525068561)*x[1]**o+(-0.953710538626)*x[1]
-        arg[3,2,2,1]=(-0.689127187476)*x[0]**o+(-0.107190366063)*x[0]+(-0.0556716250594)*x[1]**o+(-0.609462166754)*x[1]
-        arg[3,3,0,0]=(-0.765237197853)*x[0]**o+(-0.0707283944117)*x[0]+(0.891789872287)*x[1]**o+(-0.255939791858)*x[1]
-        arg[3,3,0,1]=(-0.367658362103)*x[0]**o+(0.27406309422)*x[0]+(0.866288683947)*x[1]**o+(0.403194030287)*x[1]
-        arg[3,3,1,0]=(-0.362795000993)*x[0]**o+(-0.498774415158)*x[0]+(0.0726808331583)*x[1]**o+(-0.871066791136)*x[1]
-        arg[3,3,1,1]=(-0.177149059814)*x[0]**o+(0.287463753612)*x[0]+(0.101726559941)*x[1]**o+(0.561797204517)*x[1]
-        arg[3,3,2,0]=(0.770615121039)*x[0]**o+(-0.503402148251)*x[0]+(0.319753007634)*x[1]**o+(0.586868894261)*x[1]
-        arg[3,3,2,1]=(0.924125904724)*x[0]**o+(-0.508988920423)*x[0]+(-0.866752504824)*x[1]**o+(0.518544700652)*x[1]
-        arg[3,4,0,0]=(-0.973660291124)*x[0]**o+(0.746869369283)*x[0]+(-0.634097171844)*x[1]**o+(0.723638944736)*x[1]
-        arg[3,4,0,1]=(-0.599366869066)*x[0]**o+(-0.59893829688)*x[0]+(0.124483401866)*x[1]**o+(-0.924820315792)*x[1]
-        arg[3,4,1,0]=(-0.707374787729)*x[0]**o+(-0.494748755022)*x[0]+(0.391752209698)*x[1]**o+(0.149710640116)*x[1]
-        arg[3,4,1,1]=(0.329587748119)*x[0]**o+(-0.788289803764)*x[0]+(-0.145100163626)*x[1]**o+(0.141493810237)*x[1]
-        arg[3,4,2,0]=(0.17496644337)*x[0]**o+(-0.270242104589)*x[0]+(0.996684379179)*x[1]**o+(-0.751697440046)*x[1]
-        arg[3,4,2,1]=(0.79046837395)*x[0]**o+(0.568394473062)*x[0]+(0.359419854016)*x[1]**o+(0.630686948244)*x[1]
-        ref[0,0,0,0]=(0.306552070969)/(o+1.)+(0.157870653629)
-        ref[0,0,0,1]=(0.0606500807631)/(o+1.)+(0.0612449724389)
-        ref[0,0,1,0]=(0.639564070889)/(o+1.)+(0.666341832555)
-        ref[0,0,1,1]=(0.671248593147)/(o+1.)+(-0.528628572255)
-        ref[0,0,2,0]=(0.0735824774293)/(o+1.)+(-0.474736472501)
-        ref[0,0,2,1]=(-0.9070527228)/(o+1.)+(-0.197350261427)
-        ref[0,1,0,0]=(1.30449671875)/(o+1.)+(0.106123067554)
-        ref[0,1,0,1]=(-0.420072850657)/(o+1.)+(-0.407896954678)
-        ref[0,1,1,0]=(1.44174379356)/(o+1.)+(-0.809395886627)
-        ref[0,1,1,1]=(0.155435385684)/(o+1.)+(0.627148132992)
-        ref[0,1,2,0]=(-0.137204404518)/(o+1.)+(0.207874473889)
-        ref[0,1,2,1]=(-0.289709410261)/(o+1.)+(0.204293345671)
-        ref[0,2,0,0]=(1.26583912644)/(o+1.)+(0.498805698213)
-        ref[0,2,0,1]=(1.17560298985)/(o+1.)+(0.931845120886)
-        ref[0,2,1,0]=(-0.344986302901)/(o+1.)+(0.220341743892)
-        ref[0,2,1,1]=(-1.94726093397)/(o+1.)+(0.206668541494)
-        ref[0,2,2,0]=(-0.91808772513)/(o+1.)+(-0.0252951560363)
-        ref[0,2,2,1]=(-1.02863406132)/(o+1.)+(-0.20183443794)
-        ref[0,3,0,0]=(-1.04834664255)/(o+1.)+(0.00604709752155)
-        ref[0,3,0,1]=(0.2902816262)/(o+1.)+(0.514361224456)
-        ref[0,3,1,0]=(-1.31568170019)/(o+1.)+(0.883603667426)
-        ref[0,3,1,1]=(-0.208650456965)/(o+1.)+(0.889841082216)
-        ref[0,3,2,0]=(-0.741632466554)/(o+1.)+(0.0759327240318)
-        ref[0,3,2,1]=(1.48653223703)/(o+1.)+(-0.854483988026)
-        ref[0,4,0,0]=(0.333816089225)/(o+1.)+(-0.562947445201)
-        ref[0,4,0,1]=(0.130634932061)/(o+1.)+(0.199922965378)
-        ref[0,4,1,0]=(1.27534940781)/(o+1.)+(0.158640649858)
-        ref[0,4,1,1]=(-0.83666690538)/(o+1.)+(-0.344088772961)
-        ref[0,4,2,0]=(-0.432609891704)/(o+1.)+(-0.267052816612)
-        ref[0,4,2,1]=(-0.477920665494)/(o+1.)+(-0.305859149312)
-        ref[1,0,0,0]=(-0.738766811663)/(o+1.)+(-0.2321755194)
-        ref[1,0,0,1]=(-0.688095002235)/(o+1.)+(0.664163739465)
-        ref[1,0,1,0]=(1.14285258401)/(o+1.)+(-0.345190031677)
-        ref[1,0,1,1]=(-0.093656366746)/(o+1.)+(-0.236308341076)
-        ref[1,0,2,0]=(0.7151363028)/(o+1.)+(-0.56709255572)
-        ref[1,0,2,1]=(-0.51932492992)/(o+1.)+(0.250667355044)
-        ref[1,1,0,0]=(0.545772982093)/(o+1.)+(-0.163104398138)
-        ref[1,1,0,1]=(0.629573063174)/(o+1.)+(-0.174653201576)
-        ref[1,1,1,0]=(-0.154012812311)/(o+1.)+(-0.914297866096)
-        ref[1,1,1,1]=(-0.61132115559)/(o+1.)+(-0.44114113966)
-        ref[1,1,2,0]=(0.408406410726)/(o+1.)+(-0.076080229207)
-        ref[1,1,2,1]=(0.893038507335)/(o+1.)+(-0.263052908312)
-        ref[1,2,0,0]=(0.17465338794)/(o+1.)+(0.391848465594)
-        ref[1,2,0,1]=(-0.689339169821)/(o+1.)+(-0.460056198634)
-        ref[1,2,1,0]=(1.31870632989)/(o+1.)+(-0.479414064332)
-        ref[1,2,1,1]=(1.50891516069)/(o+1.)+(-0.0237454406495)
-        ref[1,2,2,0]=(-0.453976065087)/(o+1.)+(-0.616348649278)
-        ref[1,2,2,1]=(0.286587846307)/(o+1.)+(-0.0466708546809)
-        ref[1,3,0,0]=(-0.380140989403)/(o+1.)+(-0.571048154745)
-        ref[1,3,0,1]=(-0.883036620882)/(o+1.)+(-0.32753016973)
-        ref[1,3,1,0]=(-0.60244085517)/(o+1.)+(-0.141401948721)
-        ref[1,3,1,1]=(-0.853285111042)/(o+1.)+(0.342962640954)
-        ref[1,3,2,0]=(-0.39249462323)/(o+1.)+(-0.390164886635)
-        ref[1,3,2,1]=(-0.584758879441)/(o+1.)+(-0.00839083193621)
-        ref[1,4,0,0]=(-0.282070155438)/(o+1.)+(-0.0156758086169)
-        ref[1,4,0,1]=(0.472105372896)/(o+1.)+(-0.564324551903)
-        ref[1,4,1,0]=(-1.31919056201)/(o+1.)+(-0.0984390311826)
-        ref[1,4,1,1]=(-0.0914548911124)/(o+1.)+(0.0630846675525)
-        ref[1,4,2,0]=(-0.327958330666)/(o+1.)+(0.657758815411)
-        ref[1,4,2,1]=(-0.364384803274)/(o+1.)+(0.503617623946)
-        ref[2,0,0,0]=(0.586128081557)/(o+1.)+(0.124182733972)
-        ref[2,0,0,1]=(-1.08667878312)/(o+1.)+(0.187878007169)
-        ref[2,0,1,0]=(0.181949317955)/(o+1.)+(0.341666123665)
-        ref[2,0,1,1]=(1.37450614338)/(o+1.)+(-0.329280804596)
-        ref[2,0,2,0]=(-1.79681719902)/(o+1.)+(0.31696617459)
-        ref[2,0,2,1]=(-0.331005168235)/(o+1.)+(0.608933603219)
-        ref[2,1,0,0]=(-0.608003218053)/(o+1.)+(0.303644850697)
-        ref[2,1,0,1]=(0.0259152842714)/(o+1.)+(0.916297858039)
-        ref[2,1,1,0]=(-0.33777899696)/(o+1.)+(-0.0168105795836)
-        ref[2,1,1,1]=(-0.987531479864)/(o+1.)+(0.417880159899)
-        ref[2,1,2,0]=(-0.426800950806)/(o+1.)+(0.0654268452787)
-        ref[2,1,2,1]=(-0.570210924898)/(o+1.)+(-0.392672308506)
-        ref[2,2,0,0]=(-0.489515474032)/(o+1.)+(0.516699346832)
-        ref[2,2,0,1]=(-0.386977868298)/(o+1.)+(0.054797545679)
-        ref[2,2,1,0]=(1.23803129631)/(o+1.)+(0.463802634429)
-        ref[2,2,1,1]=(-1.3620596935)/(o+1.)+(-0.819152694454)
-        ref[2,2,2,0]=(0.32363223218)/(o+1.)+(-0.48735071564)
-        ref[2,2,2,1]=(1.3413745696)/(o+1.)+(0.00521108285542)
-        ref[2,3,0,0]=(1.88998775272)/(o+1.)+(-0.231511311666)
-        ref[2,3,0,1]=(0.205141263861)/(o+1.)+(0.305781695794)
-        ref[2,3,1,0]=(-0.259160799442)/(o+1.)+(0.208196645933)
-        ref[2,3,1,1]=(0.629015342187)/(o+1.)+(0.412571372816)
-        ref[2,3,2,0]=(1.5808104592)/(o+1.)+(0.305903908491)
-        ref[2,3,2,1]=(1.02138807107)/(o+1.)+(-0.109210298623)
-        ref[2,4,0,0]=(-0.00598348295078)/(o+1.)+(-0.00132019700044)
-        ref[2,4,0,1]=(-0.0447010582767)/(o+1.)+(-0.207914420506)
-        ref[2,4,1,0]=(-1.52108837208)/(o+1.)+(-0.405268433289)
-        ref[2,4,1,1]=(-0.445804637073)/(o+1.)+(-0.379603341408)
-        ref[2,4,2,0]=(0.441040551703)/(o+1.)+(0.31124354157)
-        ref[2,4,2,1]=(-0.487421406342)/(o+1.)+(0.0442323797396)
-        ref[3,0,0,0]=(0.261030117323)/(o+1.)+(-0.518364490445)
-        ref[3,0,0,1]=(0.154511078072)/(o+1.)+(-0.321176275884)
-        ref[3,0,1,0]=(0.0588506980476)/(o+1.)+(0.0867902378403)
-        ref[3,0,1,1]=(0.0205255602871)/(o+1.)+(-0.0578151720304)
-        ref[3,0,2,0]=(0.0562400906237)/(o+1.)+(0.604864297795)
-        ref[3,0,2,1]=(0.227337822629)/(o+1.)+(0.401828122727)
-        ref[3,1,0,0]=(0.633555279654)/(o+1.)+(-0.764134541578)
-        ref[3,1,0,1]=(1.25391845962)/(o+1.)+(-0.15254370663)
-        ref[3,1,1,0]=(0.394560901238)/(o+1.)+(-0.13055106212)
-        ref[3,1,1,1]=(-0.826276602534)/(o+1.)+(0.159559926573)
-        ref[3,1,2,0]=(1.09494266707)/(o+1.)+(-0.20156573211)
-        ref[3,1,2,1]=(0.131276383073)/(o+1.)+(0.0686377837506)
-        ref[3,2,0,0]=(-0.391417020221)/(o+1.)+(0.356407442171)
-        ref[3,2,0,1]=(0.0189277508933)/(o+1.)+(-0.433441674716)
-        ref[3,2,1,0]=(-0.42121159653)/(o+1.)+(0.522691243905)
-        ref[3,2,1,1]=(-0.698950981373)/(o+1.)+(0.200071855771)
-        ref[3,2,2,0]=(-0.345651138499)/(o+1.)+(-0.572797784727)
-        ref[3,2,2,1]=(-0.744798812536)/(o+1.)+(-0.358326266408)
-        ref[3,3,0,0]=(0.126552674434)/(o+1.)+(-0.163334093135)
-        ref[3,3,0,1]=(0.498630321844)/(o+1.)+(0.338628562253)
-        ref[3,3,1,0]=(-0.290114167835)/(o+1.)+(-0.684920603147)
-        ref[3,3,1,1]=(-0.0754224998727)/(o+1.)+(0.424630479064)
-        ref[3,3,2,0]=(1.09036812867)/(o+1.)+(0.0417333730049)
-        ref[3,3,2,1]=(0.0573733998999)/(o+1.)+(0.00477789011464)
-        ref[3,4,0,0]=(-1.60775746297)/(o+1.)+(0.73525415701)
-        ref[3,4,0,1]=(-0.4748834672)/(o+1.)+(-0.761879306336)
-        ref[3,4,1,0]=(-0.31562257803)/(o+1.)+(-0.172519057453)
-        ref[3,4,1,1]=(0.184487584493)/(o+1.)+(-0.323397996764)
-        ref[3,4,2,0]=(1.17165082255)/(o+1.)+(-0.510969772317)
-        ref[3,4,2,1]=(1.14988822797)/(o+1.)+(0.599540710653)
-      else:
-        arg[0,0,0,0]=(-0.517412938774)*x[0]**o+(0.824804313111)*x[0]+(-0.681706563374)*x[1]**o+(-0.259540440272)*x[1]+(0.876735283937)*x[2]**o+(0.307072859807)*x[2]
-        arg[0,0,0,1]=(-0.545981202251)*x[0]**o+(-0.530080933212)*x[0]+(-0.339289111599)*x[1]**o+(-0.726311605088)*x[1]+(0.334837705444)*x[2]**o+(-0.422667311064)*x[2]
-        arg[0,0,1,0]=(-0.94261387328)*x[0]**o+(-0.315825326734)*x[0]+(0.542502801277)*x[1]**o+(-0.927525943646)*x[1]+(-0.802118238213)*x[2]**o+(-0.106512314706)*x[2]
-        arg[0,0,1,1]=(-0.877940099286)*x[0]**o+(-0.801256557869)*x[0]+(-0.155983792242)*x[1]**o+(0.200547191496)*x[1]+(-0.960553133432)*x[2]**o+(0.968862792367)*x[2]
-        arg[0,0,2,0]=(-0.870342547946)*x[0]**o+(-0.956447402661)*x[0]+(-0.506797803004)*x[1]**o+(0.342841675107)*x[1]+(0.528354159344)*x[2]**o+(-0.824546729564)*x[2]
-        arg[0,0,2,1]=(-0.411899137296)*x[0]**o+(0.133736458559)*x[0]+(0.852726131619)*x[1]**o+(0.692795229813)*x[1]+(0.047372576403)*x[2]**o+(0.810485765945)*x[2]
-        arg[0,1,0,0]=(0.961758233254)*x[0]**o+(-0.606307924964)*x[0]+(0.0612696412665)*x[1]**o+(-0.947823541802)*x[1]+(-0.113021104365)*x[2]**o+(-0.00802440322155)*x[2]
-        arg[0,1,0,1]=(-0.684097052467)*x[0]**o+(0.467140835537)*x[0]+(-0.0742537091205)*x[1]**o+(0.541641916143)*x[1]+(0.987491548505)*x[2]**o+(-0.558380262255)*x[2]
-        arg[0,1,1,0]=(-0.901821988855)*x[0]**o+(0.34443714654)*x[0]+(-0.682552654793)*x[1]**o+(0.398276086461)*x[1]+(0.334644264965)*x[2]**o+(0.21454845251)*x[2]
-        arg[0,1,1,1]=(0.929614060295)*x[0]**o+(-0.322609307947)*x[0]+(-0.426962200724)*x[1]**o+(0.464659992564)*x[1]+(-0.13983863674)*x[2]**o+(-0.681648817325)*x[2]
-        arg[0,1,2,0]=(0.504166508914)*x[0]**o+(-0.978562859041)*x[0]+(-0.769650404806)*x[1]**o+(0.443500137153)*x[1]+(0.969669965936)*x[2]**o+(0.401742207403)*x[2]
-        arg[0,1,2,1]=(-0.478561324822)*x[0]**o+(-0.772019838834)*x[0]+(-0.779194844829)*x[1]**o+(-0.747980400065)*x[1]+(0.827885608192)*x[2]**o+(0.135571151528)*x[2]
-        arg[0,2,0,0]=(-0.210426221052)*x[0]**o+(-0.464938141903)*x[0]+(-0.776844066203)*x[1]**o+(0.267244555705)*x[1]+(-0.773135929429)*x[2]**o+(-0.00846060888954)*x[2]
-        arg[0,2,0,1]=(0.0945858334531)*x[0]**o+(-0.492400895713)*x[0]+(-0.128564669727)*x[1]**o+(-0.0951458189983)*x[1]+(-0.54426715378)*x[2]**o+(0.106545346072)*x[2]
-        arg[0,2,1,0]=(-0.482424571392)*x[0]**o+(0.0431208155652)*x[0]+(0.557138601636)*x[1]**o+(-0.725564282551)*x[1]+(0.9081107419)*x[2]**o+(0.0179201585352)*x[2]
-        arg[0,2,1,1]=(-0.555731853052)*x[0]**o+(0.447137254671)*x[0]+(0.820958717703)*x[1]**o+(-0.580251434504)*x[1]+(0.227884622965)*x[2]**o+(0.34460189453)*x[2]
-        arg[0,2,2,0]=(-0.25868983898)*x[0]**o+(0.759165881486)*x[0]+(-0.499903058341)*x[1]**o+(0.896471093639)*x[1]+(0.351955520633)*x[2]**o+(0.16566756566)*x[2]
-        arg[0,2,2,1]=(-0.37859354794)*x[0]**o+(0.925387188779)*x[0]+(0.0111055293719)*x[1]**o+(-0.311998642154)*x[1]+(0.441009182046)*x[2]**o+(0.0968247918271)*x[2]
-        arg[0,3,0,0]=(-0.461665900641)*x[0]**o+(0.812002051396)*x[0]+(-0.767456852027)*x[1]**o+(0.809069781575)*x[1]+(0.690416953885)*x[2]**o+(0.171662369216)*x[2]
-        arg[0,3,0,1]=(-0.804811324639)*x[0]**o+(-0.0962711523954)*x[0]+(0.980130059825)*x[1]**o+(0.98279180603)*x[1]+(-0.0614353559054)*x[2]**o+(0.645637153538)*x[2]
-        arg[0,3,1,0]=(0.97878415369)*x[0]**o+(-0.676321251698)*x[0]+(0.916075195717)*x[1]**o+(0.244509683371)*x[1]+(-0.939563193145)*x[2]**o+(-0.866506108913)*x[2]
-        arg[0,3,1,1]=(-0.676965895162)*x[0]**o+(-0.124355338519)*x[0]+(0.680151101195)*x[1]**o+(-0.839412433156)*x[1]+(0.434088587223)*x[2]**o+(-0.275286048166)*x[2]
-        arg[0,3,2,0]=(0.414822536626)*x[0]**o+(0.493836498194)*x[0]+(0.967077097745)*x[1]**o+(-0.0115301157869)*x[1]+(-0.307994657929)*x[2]**o+(-0.967766608312)*x[2]
-        arg[0,3,2,1]=(-0.34064670348)*x[0]**o+(-0.975121872905)*x[0]+(0.0839457874766)*x[1]**o+(0.0995106978636)*x[1]+(-0.533837237516)*x[2]**o+(0.771268044302)*x[2]
-        arg[0,4,0,0]=(0.223197544637)*x[0]**o+(0.712738871576)*x[0]+(-0.386972075747)*x[1]**o+(0.289829507744)*x[1]+(0.153418793839)*x[2]**o+(0.876087048492)*x[2]
-        arg[0,4,0,1]=(0.696750948653)*x[0]**o+(0.466905335953)*x[0]+(-0.611476041907)*x[1]**o+(-0.939902457901)*x[1]+(-0.752675432265)*x[2]**o+(-0.869502717044)*x[2]
-        arg[0,4,1,0]=(-0.465562201723)*x[0]**o+(-0.388716352051)*x[0]+(0.260044093503)*x[1]**o+(0.919379163294)*x[1]+(-0.902453394797)*x[2]**o+(0.378318744505)*x[2]
-        arg[0,4,1,1]=(0.121990842946)*x[0]**o+(-0.691267894153)*x[0]+(-0.703960568755)*x[1]**o+(-0.582404896428)*x[1]+(0.57560180036)*x[2]**o+(0.537099448589)*x[2]
-        arg[0,4,2,0]=(-0.495452196513)*x[0]**o+(-0.939389935669)*x[0]+(-0.237205717598)*x[1]**o+(0.61376516207)*x[1]+(-0.506082738728)*x[2]**o+(0.407704148542)*x[2]
-        arg[0,4,2,1]=(0.450976180771)*x[0]**o+(-0.00739258898437)*x[0]+(0.210130848093)*x[1]**o+(0.624639007009)*x[1]+(0.173795671727)*x[2]**o+(0.508269170853)*x[2]
-        arg[1,0,0,0]=(0.609685942177)*x[0]**o+(0.609299494609)*x[0]+(0.321046388121)*x[1]**o+(0.598197189498)*x[1]+(0.536092177618)*x[2]**o+(0.576427431157)*x[2]
-        arg[1,0,0,1]=(0.412500706234)*x[0]**o+(0.905942239017)*x[0]+(-0.974980343169)*x[1]**o+(-0.131245997607)*x[1]+(0.745809068018)*x[2]**o+(0.543470258153)*x[2]
-        arg[1,0,1,0]=(-0.903032545947)*x[0]**o+(-0.778693321051)*x[0]+(0.399342164105)*x[1]**o+(0.478212896767)*x[1]+(0.254596269802)*x[2]**o+(0.70308382001)*x[2]
-        arg[1,0,1,1]=(-0.281529506793)*x[0]**o+(0.74166036027)*x[0]+(0.629713747725)*x[1]**o+(-0.275164746597)*x[1]+(0.37523909979)*x[2]**o+(-0.878026427978)*x[2]
-        arg[1,0,2,0]=(0.236027764061)*x[0]**o+(-0.816910805083)*x[0]+(0.0782011624185)*x[1]**o+(-0.644004245666)*x[1]+(0.293586462602)*x[2]**o+(0.557045894695)*x[2]
-        arg[1,0,2,1]=(0.868061727269)*x[0]**o+(0.53329318943)*x[0]+(0.367603915235)*x[1]**o+(0.89280277925)*x[1]+(-0.316595424948)*x[2]**o+(0.593830565147)*x[2]
-        arg[1,1,0,0]=(0.886950595996)*x[0]**o+(-0.290323112286)*x[0]+(-0.863347030089)*x[1]**o+(0.545096994541)*x[1]+(0.338200944281)*x[2]**o+(-0.79898415048)*x[2]
-        arg[1,1,0,1]=(0.103761462006)*x[0]**o+(-0.046916161864)*x[0]+(0.0312549239467)*x[1]**o+(0.214045118984)*x[1]+(-0.523161766402)*x[2]**o+(0.714207028317)*x[2]
-        arg[1,1,1,0]=(0.494943183987)*x[0]**o+(-0.0543096386006)*x[0]+(-0.263875120588)*x[1]**o+(0.776031489925)*x[1]+(0.881224752145)*x[2]**o+(-0.650038283228)*x[2]
-        arg[1,1,1,1]=(0.0871887540513)*x[0]**o+(-0.953848841349)*x[0]+(-0.223751459589)*x[1]**o+(0.227400823993)*x[1]+(-0.224200553009)*x[2]**o+(0.594012970899)*x[2]
-        arg[1,1,2,0]=(-0.443116951346)*x[0]**o+(0.891806149626)*x[0]+(0.94731530917)*x[1]**o+(0.739499894809)*x[1]+(-0.92613053703)*x[2]**o+(0.464883087528)*x[2]
-        arg[1,1,2,1]=(-0.149831145559)*x[0]**o+(0.913999704597)*x[0]+(0.76082978152)*x[1]**o+(-0.441535347622)*x[1]+(0.902841586936)*x[2]**o+(-0.509022004948)*x[2]
-        arg[1,2,0,0]=(0.508230188489)*x[0]**o+(0.241669921231)*x[0]+(-0.802811365056)*x[1]**o+(0.298424305948)*x[1]+(-0.949407454532)*x[2]**o+(-0.131426880214)*x[2]
-        arg[1,2,0,1]=(0.65372313274)*x[0]**o+(0.195891642771)*x[0]+(-0.160845429219)*x[1]**o+(0.500815823724)*x[1]+(0.875785249339)*x[2]**o+(0.325024339211)*x[2]
-        arg[1,2,1,0]=(0.908405682536)*x[0]**o+(-0.146675166477)*x[0]+(0.24033815873)*x[1]**o+(-0.62814219771)*x[1]+(-0.512365788351)*x[2]**o+(-0.103817191415)*x[2]
-        arg[1,2,1,1]=(0.824305237501)*x[0]**o+(0.175753992729)*x[0]+(0.992502114126)*x[1]**o+(0.973110627555)*x[1]+(0.355352002177)*x[2]**o+(0.112252263955)*x[2]
-        arg[1,2,2,0]=(-0.485996285003)*x[0]**o+(-0.532551123887)*x[0]+(0.708205121405)*x[1]**o+(-0.803269038441)*x[1]+(-0.232049124534)*x[2]**o+(0.55437652866)*x[2]
-        arg[1,2,2,1]=(0.551934776224)*x[0]**o+(0.727629664538)*x[0]+(0.197393511049)*x[1]**o+(-0.146619812174)*x[1]+(0.316592306936)*x[2]**o+(0.0263881493809)*x[2]
-        arg[1,3,0,0]=(-0.918554166254)*x[0]**o+(-0.839150758884)*x[0]+(0.436713305329)*x[1]**o+(-0.410131731387)*x[1]+(0.321246028791)*x[2]**o+(0.706389384376)*x[2]
-        arg[1,3,0,1]=(-0.870168753295)*x[0]**o+(-0.00473364206025)*x[0]+(0.594648540734)*x[1]**o+(-0.924887214906)*x[1]+(0.58858894515)*x[2]**o+(0.0152152159566)*x[2]
-        arg[1,3,1,0]=(0.64005604234)*x[0]**o+(0.308265334836)*x[0]+(0.321645661286)*x[1]**o+(0.670017614875)*x[1]+(0.712764136703)*x[2]**o+(0.458986964342)*x[2]
-        arg[1,3,1,1]=(-0.201376578944)*x[0]**o+(-0.271793865118)*x[0]+(-0.798181331582)*x[1]**o+(0.690100877945)*x[1]+(0.600350295622)*x[2]**o+(0.341066858436)*x[2]
-        arg[1,3,2,0]=(0.459832113137)*x[0]**o+(0.0566780273877)*x[0]+(0.221723079112)*x[1]**o+(-0.681001728734)*x[1]+(0.265505135729)*x[2]**o+(-0.389365671367)*x[2]
-        arg[1,3,2,1]=(0.715444384493)*x[0]**o+(-0.705697520786)*x[0]+(0.945208081248)*x[1]**o+(0.0233171867808)*x[1]+(0.740156166802)*x[2]**o+(-0.144314337012)*x[2]
-        arg[1,4,0,0]=(-0.490162545806)*x[0]**o+(0.542981268396)*x[0]+(-0.841471465564)*x[1]**o+(0.79091798393)*x[1]+(0.245598142884)*x[2]**o+(0.4740296042)*x[2]
-        arg[1,4,0,1]=(-0.504504615322)*x[0]**o+(0.45494067251)*x[0]+(-0.612427248728)*x[1]**o+(0.0880340051743)*x[1]+(0.645906227711)*x[2]**o+(0.772038416622)*x[2]
-        arg[1,4,1,0]=(0.945538632492)*x[0]**o+(0.98519603491)*x[0]+(-0.245495451859)*x[1]**o+(-0.70732864026)*x[1]+(0.378733662069)*x[2]**o+(0.579554415018)*x[2]
-        arg[1,4,1,1]=(0.886659064398)*x[0]**o+(-0.491870874438)*x[0]+(0.751814742427)*x[1]**o+(0.430589443767)*x[1]+(-0.729193959143)*x[2]**o+(-0.699344758538)*x[2]
-        arg[1,4,2,0]=(-0.4190140481)*x[0]**o+(0.84509612452)*x[0]+(-0.263608911857)*x[1]**o+(0.693648282371)*x[1]+(-0.144463932166)*x[2]**o+(0.384293689266)*x[2]
-        arg[1,4,2,1]=(-0.266973780787)*x[0]**o+(0.613988367707)*x[0]+(0.686955199789)*x[1]**o+(-0.301585818785)*x[1]+(-0.574601202558)*x[2]**o+(-0.430718616071)*x[2]
-        arg[2,0,0,0]=(-0.117390727803)*x[0]**o+(-0.25850139145)*x[0]+(0.324909086031)*x[1]**o+(-0.593112241553)*x[1]+(-0.51016768177)*x[2]**o+(0.392299415334)*x[2]
-        arg[2,0,0,1]=(0.290478531696)*x[0]**o+(0.758153023626)*x[0]+(0.531003993361)*x[1]**o+(-0.112481510374)*x[1]+(0.950222158203)*x[2]**o+(-0.742480526204)*x[2]
-        arg[2,0,1,0]=(-0.754820921225)*x[0]**o+(-0.408482044077)*x[0]+(-0.229697426486)*x[1]**o+(-0.983010424713)*x[1]+(-0.286618604257)*x[2]**o+(-0.489034108451)*x[2]
-        arg[2,0,1,1]=(0.96775757822)*x[0]**o+(0.797765725721)*x[0]+(-0.90936176648)*x[1]**o+(-0.372755885193)*x[1]+(-0.144727874143)*x[2]**o+(0.341624944551)*x[2]
-        arg[2,0,2,0]=(0.672779422278)*x[0]**o+(-0.936102224964)*x[0]+(-0.763620352857)*x[1]**o+(0.265802509744)*x[1]+(0.275798875047)*x[2]**o+(0.235397520942)*x[2]
-        arg[2,0,2,1]=(0.192866248041)*x[0]**o+(0.656863606616)*x[0]+(-0.902796948663)*x[1]**o+(0.692123089256)*x[1]+(0.311287987388)*x[2]**o+(0.555427507546)*x[2]
-        arg[2,1,0,0]=(0.464585537593)*x[0]**o+(0.161744615208)*x[0]+(-0.325569920662)*x[1]**o+(-0.47142644441)*x[1]+(0.885151021784)*x[2]**o+(-0.840595219086)*x[2]
-        arg[2,1,0,1]=(-0.659253397488)*x[0]**o+(0.54391314862)*x[0]+(-0.595612529952)*x[1]**o+(-0.0472758114379)*x[1]+(0.876391930188)*x[2]**o+(-0.440313199946)*x[2]
-        arg[2,1,1,0]=(-0.445591423364)*x[0]**o+(0.179144841652)*x[0]+(-0.294166502086)*x[1]**o+(-0.373820778739)*x[1]+(0.464609314863)*x[2]**o+(0.407893781978)*x[2]
-        arg[2,1,1,1]=(-0.767512700255)*x[0]**o+(0.63198312168)*x[0]+(0.652318598902)*x[1]**o+(0.817874971823)*x[1]+(0.397211574885)*x[2]**o+(0.33174354886)*x[2]
-        arg[2,1,2,0]=(0.473801282131)*x[0]**o+(-0.778895701394)*x[0]+(-0.801488721847)*x[1]**o+(-0.585840161723)*x[1]+(-0.805496721223)*x[2]**o+(0.585971840421)*x[2]
-        arg[2,1,2,1]=(0.472329620891)*x[0]**o+(-0.0473805663117)*x[0]+(0.0894117727522)*x[1]**o+(-0.308473625733)*x[1]+(-0.658376953956)*x[2]**o+(0.32027592346)*x[2]
-        arg[2,2,0,0]=(0.843241796369)*x[0]**o+(0.346857959798)*x[0]+(0.0111223078269)*x[1]**o+(-0.949623227267)*x[1]+(-0.152362393376)*x[2]**o+(-0.886340001141)*x[2]
-        arg[2,2,0,1]=(-0.555393018762)*x[0]**o+(0.666364344488)*x[0]+(0.181237902671)*x[1]**o+(0.670959040345)*x[1]+(0.57383285317)*x[2]**o+(-0.451027832775)*x[2]
-        arg[2,2,1,0]=(0.249709446431)*x[0]**o+(0.568753063379)*x[0]+(-0.812386750097)*x[1]**o+(0.506805124672)*x[1]+(-0.454844217662)*x[2]**o+(0.843435269288)*x[2]
-        arg[2,2,1,1]=(0.753144930025)*x[0]**o+(0.0181642998269)*x[0]+(0.622635241593)*x[1]**o+(-0.372883842874)*x[1]+(0.366920965577)*x[2]**o+(-0.092391524816)*x[2]
-        arg[2,2,2,0]=(0.309601906611)*x[0]**o+(-0.502573192965)*x[0]+(-0.420795137333)*x[1]**o+(-0.807109356307)*x[1]+(-0.802887583918)*x[2]**o+(0.552609684817)*x[2]
-        arg[2,2,2,1]=(0.320933223342)*x[0]**o+(0.541931544704)*x[0]+(0.988715316931)*x[1]**o+(-0.4197325237)*x[1]+(-0.438705512435)*x[2]**o+(-0.540175093599)*x[2]
-        arg[2,3,0,0]=(0.018870015518)*x[0]**o+(-0.615120691773)*x[0]+(0.596295280542)*x[1]**o+(0.210874310884)*x[1]+(-0.652194502321)*x[2]**o+(0.74019575754)*x[2]
-        arg[2,3,0,1]=(0.820285141622)*x[0]**o+(0.130985741886)*x[0]+(-0.397387767472)*x[1]**o+(0.975103051154)*x[1]+(0.0887369214611)*x[2]**o+(0.88498731668)*x[2]
-        arg[2,3,1,0]=(0.160503336808)*x[0]**o+(0.641180113144)*x[0]+(-0.408109675737)*x[1]**o+(-0.355443951133)*x[1]+(-0.429622016495)*x[2]**o+(0.998729833779)*x[2]
-        arg[2,3,1,1]=(-0.646524352112)*x[0]**o+(-0.289894880059)*x[0]+(0.909761879864)*x[1]**o+(0.30453651619)*x[1]+(0.884596709091)*x[2]**o+(0.329408737003)*x[2]
-        arg[2,3,2,0]=(0.459385919432)*x[0]**o+(0.416447271916)*x[0]+(-0.400798659819)*x[1]**o+(-0.769043818187)*x[1]+(-0.631682400803)*x[2]**o+(-0.80150361084)*x[2]
-        arg[2,3,2,1]=(-0.544824298969)*x[0]**o+(0.191301965562)*x[0]+(0.41061102918)*x[1]**o+(-0.999195759064)*x[1]+(-0.0226105975802)*x[2]**o+(-0.137078691725)*x[2]
-        arg[2,4,0,0]=(-0.624033952375)*x[0]**o+(0.0792222332007)*x[0]+(0.766756718455)*x[1]**o+(0.581487379511)*x[1]+(-0.437940391245)*x[2]**o+(0.115617341492)*x[2]
-        arg[2,4,0,1]=(-0.300526068838)*x[0]**o+(-0.822844066866)*x[0]+(0.660949310367)*x[1]**o+(-0.0993949179102)*x[1]+(0.599884615655)*x[2]**o+(-0.903177033523)*x[2]
-        arg[2,4,1,0]=(-0.654642517091)*x[0]**o+(0.428391621765)*x[0]+(0.932377441464)*x[1]**o+(-0.459525189684)*x[1]+(0.667425199675)*x[2]**o+(-0.937213410686)*x[2]
-        arg[2,4,1,1]=(0.258067525957)*x[0]**o+(0.619943768383)*x[0]+(0.458217567511)*x[1]**o+(0.0812191081554)*x[1]+(0.743260637332)*x[2]**o+(-0.796150472293)*x[2]
-        arg[2,4,2,0]=(0.782473636556)*x[0]**o+(-0.441405613305)*x[0]+(0.3951595327)*x[1]**o+(-0.449855781187)*x[1]+(-0.964130179212)*x[2]**o+(-0.299199410525)*x[2]
-        arg[2,4,2,1]=(-0.878340584397)*x[0]**o+(-0.674575785429)*x[0]+(0.838137461257)*x[1]**o+(-0.498710475715)*x[1]+(-0.117205127994)*x[2]**o+(0.0934669704542)*x[2]
-        arg[3,0,0,0]=(0.139631366137)*x[0]**o+(-0.893001605238)*x[0]+(-0.420780773096)*x[1]**o+(0.439055863393)*x[1]+(0.173113363237)*x[2]**o+(0.893867443017)*x[2]
-        arg[3,0,0,1]=(-0.804823042124)*x[0]**o+(0.250231181298)*x[0]+(0.358464048439)*x[1]**o+(-0.847391231172)*x[1]+(-0.515391975323)*x[2]**o+(-0.999640302937)*x[2]
-        arg[3,0,1,0]=(0.328676968943)*x[0]**o+(-0.0521242139559)*x[0]+(0.861548411537)*x[1]**o+(-0.288979961428)*x[1]+(-0.927901849987)*x[2]**o+(0.857869958971)*x[2]
-        arg[3,0,1,1]=(-0.654866876537)*x[0]**o+(-0.0515462321916)*x[0]+(-0.224164685097)*x[1]**o+(-0.84207399757)*x[1]+(-0.442392040219)*x[2]**o+(-0.915734076984)*x[2]
-        arg[3,0,2,0]=(-0.322517406382)*x[0]**o+(-0.757146499161)*x[0]+(-0.541690197465)*x[1]**o+(0.931090695413)*x[1]+(-0.355505263744)*x[2]**o+(-0.773185404514)*x[2]
-        arg[3,0,2,1]=(0.421030649833)*x[0]**o+(-0.83768939688)*x[0]+(-0.863791071447)*x[1]**o+(0.78393205545)*x[1]+(-0.489893911681)*x[2]**o+(-0.291989245709)*x[2]
-        arg[3,1,0,0]=(0.550839051007)*x[0]**o+(-0.883853789938)*x[0]+(-0.339529971923)*x[1]**o+(-0.756936847344)*x[1]+(0.724888858656)*x[2]**o+(-0.981057762224)*x[2]
-        arg[3,1,0,1]=(0.711792743156)*x[0]**o+(0.233248429378)*x[0]+(0.526076154408)*x[1]**o+(0.349364804166)*x[1]+(0.271475992486)*x[2]**o+(0.782429402713)*x[2]
-        arg[3,1,1,0]=(-0.499072848146)*x[0]**o+(-0.0604888692308)*x[0]+(0.545442893272)*x[1]**o+(-0.688797522515)*x[1]+(0.305341295222)*x[2]**o+(0.130010601331)*x[2]
-        arg[3,1,1,1]=(0.940695359452)*x[0]**o+(0.113015472294)*x[0]+(-0.506254395321)*x[1]**o+(-0.252044277039)*x[1]+(0.0172784972094)*x[2]**o+(-0.184256978193)*x[2]
-        arg[3,1,2,0]=(0.550472143981)*x[0]**o+(-0.729809590776)*x[0]+(-0.293765999495)*x[1]**o+(-0.378042976721)*x[1]+(0.973242167993)*x[2]**o+(-0.75350391134)*x[2]
-        arg[3,1,2,1]=(0.369266178598)*x[0]**o+(-0.764034492366)*x[0]+(-0.713325992328)*x[1]**o+(0.948932375717)*x[1]+(-0.335074977323)*x[2]**o+(0.117829591745)*x[2]
-        arg[3,2,0,0]=(0.426458076699)*x[0]**o+(-0.520551329627)*x[0]+(-0.773464312884)*x[1]**o+(0.26332468989)*x[1]+(0.143497828773)*x[2]**o+(0.0676278275986)*x[2]
-        arg[3,2,0,1]=(0.85806016531)*x[0]**o+(0.755361032731)*x[0]+(0.403942188112)*x[1]**o+(0.0113665816202)*x[1]+(-0.439835633198)*x[2]**o+(0.620930145183)*x[2]
-        arg[3,2,1,0]=(-0.852838624821)*x[0]**o+(-0.918594624263)*x[0]+(-0.572898555139)*x[1]**o+(-0.14353390918)*x[1]+(-0.716010071307)*x[2]**o+(0.134687635305)*x[2]
-        arg[3,2,1,1]=(-0.14282590746)*x[0]**o+(-0.169314199229)*x[0]+(0.880745511071)*x[1]**o+(0.540733710441)*x[1]+(-0.131424658303)*x[2]**o+(-0.93209431119)*x[2]
-        arg[3,2,2,0]=(-0.864016075688)*x[0]**o+(-0.265794760131)*x[0]+(0.444625188371)*x[1]**o+(0.133693703972)*x[1]+(-0.749799597936)*x[2]**o+(0.886355820615)*x[2]
-        arg[3,2,2,1]=(0.676281241167)*x[0]**o+(-0.351800298325)*x[0]+(-0.751498380099)*x[1]**o+(-0.561737786104)*x[1]+(-0.984872672853)*x[2]**o+(0.476840947707)*x[2]
-        arg[3,3,0,0]=(0.457874366022)*x[0]**o+(-0.126929649966)*x[0]+(0.666077559139)*x[1]**o+(-0.966437669224)*x[1]+(-0.849000502816)*x[2]**o+(0.990790747926)*x[2]
-        arg[3,3,0,1]=(0.45136859326)*x[0]**o+(0.771355456911)*x[0]+(-0.678558472676)*x[1]**o+(0.0366869703264)*x[1]+(-0.257247358952)*x[2]**o+(-0.290852285538)*x[2]
-        arg[3,3,1,0]=(-0.623007069616)*x[0]**o+(-0.365255080044)*x[0]+(0.441927420573)*x[1]**o+(0.331640625664)*x[1]+(-0.21153951456)*x[2]**o+(0.297967669123)*x[2]
-        arg[3,3,1,1]=(-0.836057742118)*x[0]**o+(0.959873293328)*x[0]+(-0.52034405502)*x[1]**o+(-0.178838686591)*x[1]+(0.317610563306)*x[2]**o+(-0.555134650833)*x[2]
-        arg[3,3,2,0]=(0.0819108022024)*x[0]**o+(0.69432296821)*x[0]+(-0.23685434367)*x[1]**o+(-0.0442137744391)*x[1]+(-0.879175086057)*x[2]**o+(-0.28031950012)*x[2]
-        arg[3,3,2,1]=(0.340083286763)*x[0]**o+(-0.381942838645)*x[0]+(0.570579443852)*x[1]**o+(0.772192708863)*x[1]+(0.42813556157)*x[2]**o+(0.735683065499)*x[2]
-        arg[3,4,0,0]=(-0.866813692418)*x[0]**o+(-0.53715159706)*x[0]+(0.0725900211922)*x[1]**o+(0.0891167848614)*x[1]+(-0.381482922347)*x[2]**o+(-0.521504123034)*x[2]
-        arg[3,4,0,1]=(0.487750922723)*x[0]**o+(0.967820473849)*x[0]+(0.305600886352)*x[1]**o+(0.350777657643)*x[1]+(-0.383731485788)*x[2]**o+(0.814016126476)*x[2]
-        arg[3,4,1,0]=(-0.186663244344)*x[0]**o+(0.144872424379)*x[0]+(0.844454339304)*x[1]**o+(0.252133708483)*x[1]+(-0.748235508222)*x[2]**o+(0.702952185343)*x[2]
-        arg[3,4,1,1]=(-0.962296047927)*x[0]**o+(0.874277032826)*x[0]+(-0.404689253219)*x[1]**o+(-0.174075799004)*x[1]+(0.65086350106)*x[2]**o+(-0.109850650677)*x[2]
-        arg[3,4,2,0]=(-0.59515836027)*x[0]**o+(-0.0917296352911)*x[0]+(0.834779238353)*x[1]**o+(0.951252871777)*x[1]+(0.983008684497)*x[2]**o+(-0.784806954891)*x[2]
-        arg[3,4,2,1]=(0.603110971708)*x[0]**o+(0.291507042984)*x[0]+(-0.401523286981)*x[1]**o+(-0.994760476862)*x[1]+(0.410516007475)*x[2]**o+(0.368982230001)*x[2]
-        ref[0,0,0,0]=(-0.322384218211)/(o+1.)+(0.436168366323)
-        ref[0,0,0,1]=(-0.550432608405)/(o+1.)+(-0.839529924682)
-        ref[0,0,1,0]=(-1.20222931022)/(o+1.)+(-0.674931792543)
-        ref[0,0,1,1]=(-1.99447702496)/(o+1.)+(0.184076712997)
-        ref[0,0,2,0]=(-0.848786191606)/(o+1.)+(-0.719076228559)
-        ref[0,0,2,1]=(0.488199570726)/(o+1.)+(0.818508727159)
-        ref[0,1,0,0]=(0.910006770156)/(o+1.)+(-0.781077934994)
-        ref[0,1,0,1]=(0.229140786917)/(o+1.)+(0.225201244712)
-        ref[0,1,1,0]=(-1.24973037868)/(o+1.)+(0.478630842756)
-        ref[0,1,1,1]=(0.362813222831)/(o+1.)+(-0.269799066354)
-        ref[0,1,2,0]=(0.704186070044)/(o+1.)+(-0.0666602572428)
-        ref[0,1,2,1]=(-0.429870561459)/(o+1.)+(-0.692214543685)
-        ref[0,2,0,0]=(-1.76040621668)/(o+1.)+(-0.103077097544)
-        ref[0,2,0,1]=(-0.578245990054)/(o+1.)+(-0.24050068432)
-        ref[0,2,1,0]=(0.982824772144)/(o+1.)+(-0.332261654225)
-        ref[0,2,1,1]=(0.493111487615)/(o+1.)+(0.105743857349)
-        ref[0,2,2,0]=(-0.406637376689)/(o+1.)+(0.910652270393)
-        ref[0,2,2,1]=(0.0735211634779)/(o+1.)+(0.355106669226)
-        ref[0,3,0,0]=(-0.538705798782)/(o+1.)+(0.896367101094)
-        ref[0,3,0,1]=(0.11388337928)/(o+1.)+(0.766078903586)
-        ref[0,3,1,0]=(0.955296156262)/(o+1.)+(-0.64915883862)
-        ref[0,3,1,1]=(0.437273793256)/(o+1.)+(-0.61952690992)
-        ref[0,3,2,0]=(1.07390497644)/(o+1.)+(-0.242730112953)
-        ref[0,3,2,1]=(-0.79053815352)/(o+1.)+(-0.0521715653697)
-        ref[0,4,0,0]=(-0.0103557372704)/(o+1.)+(0.939327713906)
-        ref[0,4,0,1]=(-0.66740052552)/(o+1.)+(-0.671249919496)
-        ref[0,4,1,0]=(-1.10797150302)/(o+1.)+(0.454490777873)
-        ref[0,4,1,1]=(-0.00636792544909)/(o+1.)+(-0.368286670996)
-        ref[0,4,2,0]=(-1.23874065284)/(o+1.)+(0.0410396874718)
-        ref[0,4,2,1]=(0.834902700591)/(o+1.)+(0.562757794439)
-        ref[1,0,0,0]=(1.46682450791)/(o+1.)+(0.891962057632)
-        ref[1,0,0,1]=(0.183329431084)/(o+1.)+(0.659083249781)
-        ref[1,0,1,0]=(-0.24909411204)/(o+1.)+(0.201301697863)
-        ref[1,0,1,1]=(0.723423340723)/(o+1.)+(-0.205765407152)
-        ref[1,0,2,0]=(0.607815389082)/(o+1.)+(-0.451934578027)
-        ref[1,0,2,1]=(0.919070217555)/(o+1.)+(1.00996326691)
-        ref[1,1,0,0]=(0.361804510188)/(o+1.)+(-0.272105134113)
-        ref[1,1,0,1]=(-0.388145380449)/(o+1.)+(0.440667992719)
-        ref[1,1,1,0]=(1.11229281554)/(o+1.)+(0.0358417840478)
-        ref[1,1,1,1]=(-0.360763258547)/(o+1.)+(-0.0662175232282)
-        ref[1,1,2,0]=(-0.421932179206)/(o+1.)+(1.04809456598)
-        ref[1,1,2,1]=(1.5138402229)/(o+1.)+(-0.0182788239862)
-        ref[1,2,0,0]=(-1.2439886311)/(o+1.)+(0.204333673483)
-        ref[1,2,0,1]=(1.36866295286)/(o+1.)+(0.510865902853)
-        ref[1,2,1,0]=(0.636378052915)/(o+1.)+(-0.439317277801)
-        ref[1,2,1,1]=(2.1721593538)/(o+1.)+(0.63055844212)
-        ref[1,2,2,0]=(-0.00984028813171)/(o+1.)+(-0.390721816834)
-        ref[1,2,2,1]=(1.06592059421)/(o+1.)+(0.303699000873)
-        ref[1,3,0,0]=(-0.160594832134)/(o+1.)+(-0.271446552947)
-        ref[1,3,0,1]=(0.313068732589)/(o+1.)+(-0.457202820505)
-        ref[1,3,1,0]=(1.67446584033)/(o+1.)+(0.718634957026)
-        ref[1,3,1,1]=(-0.399207614903)/(o+1.)+(0.379686935632)
-        ref[1,3,2,0]=(0.947060327978)/(o+1.)+(-0.506844686357)
-        ref[1,3,2,1]=(2.40080863254)/(o+1.)+(-0.413347335508)
-        ref[1,4,0,0]=(-1.08603586849)/(o+1.)+(0.903964428263)
-        ref[1,4,0,1]=(-0.471025636339)/(o+1.)+(0.657506547153)
-        ref[1,4,1,0]=(1.0787768427)/(o+1.)+(0.428710904834)
-        ref[1,4,1,1]=(0.909279847682)/(o+1.)+(-0.380313094604)
-        ref[1,4,2,0]=(-0.827086892123)/(o+1.)+(0.961519048079)
-        ref[1,4,2,1]=(-0.154619783556)/(o+1.)+(-0.0591580335741)
-        ref[2,0,0,0]=(-0.302649323542)/(o+1.)+(-0.229657108834)
-        ref[2,0,0,1]=(1.77170468326)/(o+1.)+(-0.0484045064764)
-        ref[2,0,1,0]=(-1.27113695197)/(o+1.)+(-0.94026328862)
-        ref[2,0,1,1]=(-0.0863320624027)/(o+1.)+(0.383317392539)
-        ref[2,0,2,0]=(0.184957944467)/(o+1.)+(-0.217451097139)
-        ref[2,0,2,1]=(-0.398642713235)/(o+1.)+(0.952207101709)
-        ref[2,1,0,0]=(1.02416663872)/(o+1.)+(-0.575138524144)
-        ref[2,1,0,1]=(-0.378473997252)/(o+1.)+(0.0281620686178)
-        ref[2,1,1,0]=(-0.275148610588)/(o+1.)+(0.106608922446)
-        ref[2,1,1,1]=(0.282017473532)/(o+1.)+(0.890800821181)
-        ref[2,1,2,0]=(-1.13318416094)/(o+1.)+(-0.389382011348)
-        ref[2,1,2,1]=(-0.0966355603128)/(o+1.)+(-0.0177891342927)
-        ref[2,2,0,0]=(0.70200171082)/(o+1.)+(-0.744552634305)
-        ref[2,2,0,1]=(0.199677737079)/(o+1.)+(0.443147776029)
-        ref[2,2,1,0]=(-1.01752152133)/(o+1.)+(0.959496728669)
-        ref[2,2,1,1]=(1.74270113719)/(o+1.)+(-0.223555533932)
-        ref[2,2,2,0]=(-0.91408081464)/(o+1.)+(-0.378536432227)
-        ref[2,2,2,1]=(0.870943027839)/(o+1.)+(-0.208988036298)
-        ref[2,3,0,0]=(-0.0370292062615)/(o+1.)+(0.167974688326)
-        ref[2,3,0,1]=(0.51163429561)/(o+1.)+(0.99553805486)
-        ref[2,3,1,0]=(-0.677228355424)/(o+1.)+(0.642232997895)
-        ref[2,3,1,1]=(1.14783423684)/(o+1.)+(0.172025186567)
-        ref[2,3,2,0]=(-0.57309514119)/(o+1.)+(-0.577050078555)
-        ref[2,3,2,1]=(-0.156823867369)/(o+1.)+(-0.472486242613)
-        ref[2,4,0,0]=(-0.295217625165)/(o+1.)+(0.388163477102)
-        ref[2,4,0,1]=(0.960307857184)/(o+1.)+(-0.91270800915)
-        ref[2,4,1,0]=(0.945160124047)/(o+1.)+(-0.484173489303)
-        ref[2,4,1,1]=(1.4595457308)/(o+1.)+(-0.0474937978771)
-        ref[2,4,2,0]=(0.213502990044)/(o+1.)+(-0.595230402509)
-        ref[2,4,2,1]=(-0.157408251134)/(o+1.)+(-0.539909645345)
-        ref[3,0,0,0]=(-0.108036043722)/(o+1.)+(0.219960850586)
-        ref[3,0,0,1]=(-0.961750969008)/(o+1.)+(-0.798400176406)
-        ref[3,0,1,0]=(0.262323530493)/(o+1.)+(0.258382891794)
-        ref[3,0,1,1]=(-1.32142360185)/(o+1.)+(-0.904677153373)
-        ref[3,0,2,0]=(-1.21971286759)/(o+1.)+(-0.299620604131)
-        ref[3,0,2,1]=(-0.932654333294)/(o+1.)+(-0.17287329357)
-        ref[3,1,0,0]=(0.93619793774)/(o+1.)+(-1.31092419975)
-        ref[3,1,0,1]=(1.50934489005)/(o+1.)+(0.682521318129)
-        ref[3,1,1,0]=(0.351711340348)/(o+1.)+(-0.309637895207)
-        ref[3,1,1,1]=(0.451719461341)/(o+1.)+(-0.161642891469)
-        ref[3,1,2,0]=(1.22994831248)/(o+1.)+(-0.930678239419)
-        ref[3,1,2,1]=(-0.679134791053)/(o+1.)+(0.151363737548)
-        ref[3,2,0,0]=(-0.203508407413)/(o+1.)+(-0.0947994060691)
-        ref[3,2,0,1]=(0.822166720224)/(o+1.)+(0.693828879767)
-        ref[3,2,1,0]=(-2.14174725127)/(o+1.)+(-0.463720449069)
-        ref[3,2,1,1]=(0.606494945308)/(o+1.)+(-0.280337399989)
-        ref[3,2,2,0]=(-1.16919048525)/(o+1.)+(0.377127382228)
-        ref[3,2,2,1]=(-1.06008981178)/(o+1.)+(-0.218348568361)
-        ref[3,3,0,0]=(0.274951422345)/(o+1.)+(-0.0512882856318)
-        ref[3,3,0,1]=(-0.484437238367)/(o+1.)+(0.25859507085)
-        ref[3,3,1,0]=(-0.392619163603)/(o+1.)+(0.132176607371)
-        ref[3,3,1,1]=(-1.03879123383)/(o+1.)+(0.112949977952)
-        ref[3,3,2,0]=(-1.03411862752)/(o+1.)+(0.184894846825)
-        ref[3,3,2,1]=(1.33879829218)/(o+1.)+(0.562966467859)
-        ref[3,4,0,0]=(-1.17570659357)/(o+1.)+(-0.484769467616)
-        ref[3,4,0,1]=(0.409620323287)/(o+1.)+(1.06630712898)
-        ref[3,4,1,0]=(-0.0904444132627)/(o+1.)+(0.549979159103)
-        ref[3,4,1,1]=(-0.716121800087)/(o+1.)+(0.295175291572)
-        ref[3,4,2,0]=(1.22262956258)/(o+1.)+(0.0373581407971)
-        ref[3,4,2,1]=(0.612103692201)/(o+1.)+(-0.167135601938)
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the 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.506621877215)*x[0]**o+(-0.45560383685)*x[0]+(-0.598137301806)*x[1]**o+(0.784241595615)*x[1]
-        ref=(-0.0915154245913)*(1+2.*(dim-1.)/(o+1.))+(0.328637758765)*dim
-      else:
-        arg=(-0.505489131484)*x[0]**o+(0.58139159259)*x[0]+(0.458086828888)*x[1]**o+(0.549090746672)*x[1]+(-0.0882325936167)*x[2]**o+(0.0170295954808)*x[2]
-        ref=(-0.135634896213)*(1+2.*(dim-1.)/(o+1.))+(1.14751193474)*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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(-0.88779433873)*x[0]**o+(0.507955012301)*x[0]+(0.652739274924)*x[1]**o+(-0.971975755989)*x[1]
-        arg[1]=(-0.0812690931139)*x[0]**o+(-0.283880962354)*x[0]+(0.094904517439)*x[1]**o+(-0.940528164353)*x[1]
-        ref[0]=(-0.235055063806)*(1+2.*(dim-1.)/(o+1.))+(-0.464020743688)*dim
-        ref[1]=(0.0136354243251)*(1+2.*(dim-1.)/(o+1.))+(-1.22440912671)*dim
-      else:
-        arg[0]=(-0.506412384389)*x[0]**o+(-0.465794405394)*x[0]+(0.346977499982)*x[1]**o+(0.386181176987)*x[1]+(-0.476729572397)*x[2]**o+(-0.956945933508)*x[2]
-        arg[1]=(0.267092807416)*x[0]**o+(-0.54211155802)*x[0]+(-0.27815411727)*x[1]**o+(-0.984542450102)*x[1]+(0.656389296076)*x[2]**o+(0.0395863971401)*x[2]
-        ref[0]=(-0.636164456804)*(1+2.*(dim-1.)/(o+1.))+(-1.03655916191)*dim
-        ref[1]=(0.645327986222)*(1+2.*(dim-1.)/(o+1.))+(-1.48706761098)*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_ContinuousFunction_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.0607636892262)*x[0]**o+(0.740866012668)*x[0]+(0.145223136928)*x[1]**o+(-0.738387773526)*x[1]
-        arg[0,1]=(0.0292598484511)*x[0]**o+(-0.189208290889)*x[0]+(0.902021405165)*x[1]**o+(0.423106545559)*x[1]
-        arg[0,2]=(0.519658217226)*x[0]**o+(-0.768406018136)*x[0]+(-0.189532527097)*x[1]**o+(0.256417429833)*x[1]
-        arg[0,3]=(-0.565327663481)*x[0]**o+(0.876762003673)*x[0]+(-0.243804758063)*x[1]**o+(0.399476036454)*x[1]
-        arg[0,4]=(0.0632252409818)*x[0]**o+(0.0951130662538)*x[0]+(0.185662425763)*x[1]**o+(0.907446482506)*x[1]
-        arg[1,0]=(-0.430504584794)*x[0]**o+(0.864814314023)*x[0]+(0.47460095501)*x[1]**o+(-0.599679142188)*x[1]
-        arg[1,1]=(0.699618175298)*x[0]**o+(-0.561782605517)*x[0]+(-0.304250865015)*x[1]**o+(-0.341836776795)*x[1]
-        arg[1,2]=(0.856956767316)*x[0]**o+(0.610026903213)*x[0]+(-0.666749954599)*x[1]**o+(0.885388885234)*x[1]
-        arg[1,3]=(0.699377007631)*x[0]**o+(0.699906750287)*x[0]+(0.486690669414)*x[1]**o+(0.167425901549)*x[1]
-        arg[1,4]=(0.466701415896)*x[0]**o+(-0.0719752759126)*x[0]+(0.795662047062)*x[1]**o+(0.979862503926)*x[1]
-        arg[2,0]=(-0.912218732612)*x[0]**o+(0.950990472894)*x[0]+(-0.527999708902)*x[1]**o+(0.695735593043)*x[1]
-        arg[2,1]=(-0.223468270048)*x[0]**o+(-0.882565147673)*x[0]+(0.750516681645)*x[1]**o+(-0.652794590093)*x[1]
-        arg[2,2]=(0.897646682412)*x[0]**o+(-0.815401214058)*x[0]+(0.629680741327)*x[1]**o+(-0.9716988156)*x[1]
-        arg[2,3]=(0.279739517524)*x[0]**o+(-0.0859797206016)*x[0]+(-0.0454325622757)*x[1]**o+(0.301214753868)*x[1]
-        arg[2,4]=(-0.358056827092)*x[0]**o+(0.254207762658)*x[0]+(0.831499219864)*x[1]**o+(0.0930388028811)*x[1]
-        arg[3,0]=(0.0761520020047)*x[0]**o+(0.650696394486)*x[0]+(-0.132369660678)*x[1]**o+(-0.321220385971)*x[1]
-        arg[3,1]=(0.238715231585)*x[0]**o+(-0.297219391083)*x[0]+(-0.15446552614)*x[1]**o+(0.860560615056)*x[1]
-        arg[3,2]=(0.708864754538)*x[0]**o+(-0.221186702958)*x[0]+(-0.478127729891)*x[1]**o+(0.0309604412212)*x[1]
-        arg[3,3]=(0.362909366479)*x[0]**o+(0.382279106813)*x[0]+(0.827905062086)*x[1]**o+(-0.303048355949)*x[1]
-        arg[3,4]=(0.573736946844)*x[0]**o+(0.645059764766)*x[0]+(0.301945383678)*x[1]**o+(-0.103083649994)*x[1]
-        ref[0,0]=(0.205986826154)*(1+2.*(dim-1.)/(o+1.))+(0.0024782391428)*dim
-        ref[0,1]=(0.931281253617)*(1+2.*(dim-1.)/(o+1.))+(0.23389825467)*dim
-        ref[0,2]=(0.330125690129)*(1+2.*(dim-1.)/(o+1.))+(-0.511988588303)*dim
-        ref[0,3]=(-0.809132421544)*(1+2.*(dim-1.)/(o+1.))+(1.27623804013)*dim
-        ref[0,4]=(0.248887666745)*(1+2.*(dim-1.)/(o+1.))+(1.00255954876)*dim
-        ref[1,0]=(0.044096370216)*(1+2.*(dim-1.)/(o+1.))+(0.265135171835)*dim
-        ref[1,1]=(0.395367310283)*(1+2.*(dim-1.)/(o+1.))+(-0.903619382312)*dim
-        ref[1,2]=(0.190206812717)*(1+2.*(dim-1.)/(o+1.))+(1.49541578845)*dim
-        ref[1,3]=(1.18606767705)*(1+2.*(dim-1.)/(o+1.))+(0.867332651836)*dim
-        ref[1,4]=(1.26236346296)*(1+2.*(dim-1.)/(o+1.))+(0.907887228013)*dim
-        ref[2,0]=(-1.44021844151)*(1+2.*(dim-1.)/(o+1.))+(1.64672606594)*dim
-        ref[2,1]=(0.527048411596)*(1+2.*(dim-1.)/(o+1.))+(-1.53535973777)*dim
-        ref[2,2]=(1.52732742374)*(1+2.*(dim-1.)/(o+1.))+(-1.78710002966)*dim
-        ref[2,3]=(0.234306955249)*(1+2.*(dim-1.)/(o+1.))+(0.215235033266)*dim
-        ref[2,4]=(0.473442392772)*(1+2.*(dim-1.)/(o+1.))+(0.34724656554)*dim
-        ref[3,0]=(-0.0562176586729)*(1+2.*(dim-1.)/(o+1.))+(0.329476008516)*dim
-        ref[3,1]=(0.0842497054449)*(1+2.*(dim-1.)/(o+1.))+(0.563341223973)*dim
-        ref[3,2]=(0.230737024647)*(1+2.*(dim-1.)/(o+1.))+(-0.190226261737)*dim
-        ref[3,3]=(1.19081442856)*(1+2.*(dim-1.)/(o+1.))+(0.079230750864)*dim
-        ref[3,4]=(0.875682330522)*(1+2.*(dim-1.)/(o+1.))+(0.541976114772)*dim
-      else:
-        arg[0,0]=(0.0640108068236)*x[0]**o+(0.0322830166043)*x[0]+(-0.703691335255)*x[1]**o+(-0.185228770711)*x[1]+(-0.738714166313)*x[2]**o+(-0.423576647077)*x[2]
-        arg[0,1]=(-0.738341351945)*x[0]**o+(0.396306395436)*x[0]+(-0.369974848568)*x[1]**o+(0.750933208783)*x[1]+(0.554069869127)*x[2]**o+(0.634275493051)*x[2]
-        arg[0,2]=(-0.259193248708)*x[0]**o+(-0.900007449583)*x[0]+(0.894379436915)*x[1]**o+(0.997814320752)*x[1]+(0.233192116622)*x[2]**o+(0.986616259649)*x[2]
-        arg[0,3]=(0.381480250594)*x[0]**o+(0.734823219057)*x[0]+(0.569912440169)*x[1]**o+(-0.441084504695)*x[1]+(0.312539701584)*x[2]**o+(-0.3733004974)*x[2]
-        arg[0,4]=(-0.779059807622)*x[0]**o+(0.538777922322)*x[0]+(-0.0695879211612)*x[1]**o+(-0.204862216499)*x[1]+(-0.0109698525672)*x[2]**o+(0.981875117617)*x[2]
-        arg[1,0]=(-0.415857630044)*x[0]**o+(-0.356607866913)*x[0]+(-0.628854326903)*x[1]**o+(0.0401233333505)*x[1]+(0.687470169579)*x[2]**o+(-0.565349753114)*x[2]
-        arg[1,1]=(-0.438364910402)*x[0]**o+(0.498078194367)*x[0]+(-0.120729597948)*x[1]**o+(-0.622076117713)*x[1]+(0.995130029172)*x[2]**o+(-0.7234601064)*x[2]
-        arg[1,2]=(-0.957869585558)*x[0]**o+(0.374693219824)*x[0]+(0.0355192120972)*x[1]**o+(-0.516770140651)*x[1]+(0.521887953791)*x[2]**o+(0.00771564236502)*x[2]
-        arg[1,3]=(-0.0495580194062)*x[0]**o+(-0.183895326318)*x[0]+(-0.55304086303)*x[1]**o+(0.920204449879)*x[1]+(0.143165855157)*x[2]**o+(-0.773684620462)*x[2]
-        arg[1,4]=(0.795913131087)*x[0]**o+(0.653826129199)*x[0]+(-0.585562760813)*x[1]**o+(0.274083108918)*x[1]+(-0.165275654116)*x[2]**o+(0.358678758212)*x[2]
-        arg[2,0]=(-0.0699685857843)*x[0]**o+(-0.42922435931)*x[0]+(-0.0494308981938)*x[1]**o+(-0.956597829176)*x[1]+(-0.912941305307)*x[2]**o+(0.214777332562)*x[2]
-        arg[2,1]=(-0.900983338173)*x[0]**o+(-0.779729884378)*x[0]+(-0.860100306508)*x[1]**o+(0.14211537281)*x[1]+(-0.984439938285)*x[2]**o+(-0.549987779842)*x[2]
-        arg[2,2]=(0.801489512389)*x[0]**o+(0.896468923826)*x[0]+(-0.155737972887)*x[1]**o+(0.639864330477)*x[1]+(0.798598705038)*x[2]**o+(-0.863019041525)*x[2]
-        arg[2,3]=(-0.453612136504)*x[0]**o+(0.522662491688)*x[0]+(-0.463058076486)*x[1]**o+(0.398018809499)*x[1]+(-0.612044961611)*x[2]**o+(-0.481951883217)*x[2]
-        arg[2,4]=(-0.0739336519425)*x[0]**o+(-0.241753740154)*x[0]+(0.0176292058898)*x[1]**o+(0.435641132809)*x[1]+(-0.0592828584976)*x[2]**o+(0.430115620801)*x[2]
-        arg[3,0]=(0.604784358152)*x[0]**o+(-0.817214179503)*x[0]+(-0.423104272008)*x[1]**o+(0.287787881773)*x[1]+(0.678036469241)*x[2]**o+(0.578347129563)*x[2]
-        arg[3,1]=(0.362390778598)*x[0]**o+(-0.389066580119)*x[0]+(-0.934087580396)*x[1]**o+(0.907587485226)*x[1]+(-0.902083043406)*x[2]**o+(0.904707538314)*x[2]
-        arg[3,2]=(0.862463207465)*x[0]**o+(0.904923219336)*x[0]+(0.421361696042)*x[1]**o+(-0.779329196171)*x[1]+(0.059521522394)*x[2]**o+(-0.744510067387)*x[2]
-        arg[3,3]=(0.412029226851)*x[0]**o+(-0.649730143511)*x[0]+(0.579628017001)*x[1]**o+(-0.949180147129)*x[1]+(-0.073016492309)*x[2]**o+(0.666554170757)*x[2]
-        arg[3,4]=(-0.700401396504)*x[0]**o+(-0.89194120812)*x[0]+(0.592387042213)*x[1]**o+(-0.906632787891)*x[1]+(-0.486072860812)*x[2]**o+(-0.505386176523)*x[2]
-        ref[0,0]=(-1.37839469474)*(1+2.*(dim-1.)/(o+1.))+(-0.576522401184)*dim
-        ref[0,1]=(-0.554246331386)*(1+2.*(dim-1.)/(o+1.))+(1.78151509727)*dim
-        ref[0,2]=(0.868378304829)*(1+2.*(dim-1.)/(o+1.))+(1.08442313082)*dim
-        ref[0,3]=(1.26393239235)*(1+2.*(dim-1.)/(o+1.))+(-0.0795617830385)*dim
-        ref[0,4]=(-0.85961758135)*(1+2.*(dim-1.)/(o+1.))+(1.31579082344)*dim
-        ref[1,0]=(-0.357241787368)*(1+2.*(dim-1.)/(o+1.))+(-0.881834286676)*dim
-        ref[1,1]=(0.436035520821)*(1+2.*(dim-1.)/(o+1.))+(-0.847458029746)*dim
-        ref[1,2]=(-0.40046241967)*(1+2.*(dim-1.)/(o+1.))+(-0.134361278462)*dim
-        ref[1,3]=(-0.459433027279)*(1+2.*(dim-1.)/(o+1.))+(-0.0373754969011)*dim
-        ref[1,4]=(0.0450747161574)*(1+2.*(dim-1.)/(o+1.))+(1.28658799633)*dim
-        ref[2,0]=(-1.03234078929)*(1+2.*(dim-1.)/(o+1.))+(-1.17104485592)*dim
-        ref[2,1]=(-2.74552358297)*(1+2.*(dim-1.)/(o+1.))+(-1.18760229141)*dim
-        ref[2,2]=(1.44435024454)*(1+2.*(dim-1.)/(o+1.))+(0.673314212777)*dim
-        ref[2,3]=(-1.5287151746)*(1+2.*(dim-1.)/(o+1.))+(0.43872941797)*dim
-        ref[2,4]=(-0.11558730455)*(1+2.*(dim-1.)/(o+1.))+(0.624003013456)*dim
-        ref[3,0]=(0.859716555385)*(1+2.*(dim-1.)/(o+1.))+(0.0489208318321)*dim
-        ref[3,1]=(-1.4737798452)*(1+2.*(dim-1.)/(o+1.))+(1.42322844342)*dim
-        ref[3,2]=(1.3433464259)*(1+2.*(dim-1.)/(o+1.))+(-0.618916044222)*dim
-        ref[3,3]=(0.918640751542)*(1+2.*(dim-1.)/(o+1.))+(-0.932356119883)*dim
-        ref[3,4]=(-0.594087215103)*(1+2.*(dim-1.)/(o+1.))+(-2.30396017253)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.662707930283)*x[0]**o+(0.625512077969)*x[0]+(-0.222208840922)*x[1]**o+(0.374614317804)*x[1]
-        arg[0,0,1]=(0.685952252808)*x[0]**o+(-0.88219802797)*x[0]+(-0.948918831634)*x[1]**o+(-0.00615202896776)*x[1]
-        arg[0,1,0]=(-0.555231206657)*x[0]**o+(0.997112425959)*x[0]+(-0.186247870511)*x[1]**o+(-0.0658892046229)*x[1]
-        arg[0,1,1]=(-0.735288285178)*x[0]**o+(0.941234848614)*x[0]+(-0.307761737256)*x[1]**o+(0.933293069433)*x[1]
-        arg[1,0,0]=(-0.618191337825)*x[0]**o+(-0.12930895166)*x[0]+(0.76213325083)*x[1]**o+(-0.744049403156)*x[1]
-        arg[1,0,1]=(-0.793412570981)*x[0]**o+(0.533175323401)*x[0]+(-0.87398581932)*x[1]**o+(-0.279651754725)*x[1]
-        arg[1,1,0]=(-0.0654077907694)*x[0]**o+(0.239040458488)*x[0]+(0.730639927837)*x[1]**o+(0.805020533329)*x[1]
-        arg[1,1,1]=(-0.560195748542)*x[0]**o+(-0.265389430135)*x[0]+(-0.295142324741)*x[1]**o+(-0.929699771024)*x[1]
-        arg[2,0,0]=(0.935760865577)*x[0]**o+(-0.332458843131)*x[0]+(0.257302695187)*x[1]**o+(-0.347547927033)*x[1]
-        arg[2,0,1]=(-0.245770653276)*x[0]**o+(0.126945988409)*x[0]+(0.302793434995)*x[1]**o+(-0.997483200172)*x[1]
-        arg[2,1,0]=(0.523494364951)*x[0]**o+(-0.323782740449)*x[0]+(-0.563752593454)*x[1]**o+(-0.358325752838)*x[1]
-        arg[2,1,1]=(-0.506330114515)*x[0]**o+(-0.733234050567)*x[0]+(0.734774667778)*x[1]**o+(0.795264566776)*x[1]
-        arg[3,0,0]=(-0.21258295235)*x[0]**o+(-0.929331330718)*x[0]+(-0.546061847742)*x[1]**o+(0.0613931491065)*x[1]
-        arg[3,0,1]=(-0.357847946656)*x[0]**o+(-0.133795684508)*x[0]+(-0.796646028688)*x[1]**o+(0.875795801429)*x[1]
-        arg[3,1,0]=(0.923717804039)*x[0]**o+(-0.176266633621)*x[0]+(-0.605892867534)*x[1]**o+(0.633377612365)*x[1]
-        arg[3,1,1]=(0.729025508129)*x[0]**o+(0.412034955257)*x[0]+(0.0933054864485)*x[1]**o+(0.386019085532)*x[1]
-        arg[4,0,0]=(-0.0705524918008)*x[0]**o+(-0.869605321304)*x[0]+(0.244351267755)*x[1]**o+(0.898883388102)*x[1]
-        arg[4,0,1]=(-0.453297333327)*x[0]**o+(-0.67824185123)*x[0]+(0.0497322840245)*x[1]**o+(0.581677879069)*x[1]
-        arg[4,1,0]=(0.343975006358)*x[0]**o+(0.724084357103)*x[0]+(-0.186292335362)*x[1]**o+(-0.257997075018)*x[1]
-        arg[4,1,1]=(-0.389731923798)*x[0]**o+(0.0949155578616)*x[0]+(-0.298428138752)*x[1]**o+(0.819510069666)*x[1]
-        arg[5,0,0]=(0.827670169513)*x[0]**o+(-0.584607978668)*x[0]+(0.669056948658)*x[1]**o+(-0.393158541985)*x[1]
-        arg[5,0,1]=(-0.471551968206)*x[0]**o+(-0.339964831396)*x[0]+(0.354554393554)*x[1]**o+(-0.334773591957)*x[1]
-        arg[5,1,0]=(0.113562904864)*x[0]**o+(-0.775045505123)*x[0]+(0.783044874931)*x[1]**o+(0.52265843873)*x[1]
-        arg[5,1,1]=(-0.115476036205)*x[0]**o+(-0.290822012728)*x[0]+(-0.398510477854)*x[1]**o+(0.398737205542)*x[1]
-        ref[0,0,0]=(0.440499089362)*(1+2.*(dim-1.)/(o+1.))+(1.00012639577)*dim
-        ref[0,0,1]=(-0.262966578826)*(1+2.*(dim-1.)/(o+1.))+(-0.888350056938)*dim
-        ref[0,1,0]=(-0.741479077167)*(1+2.*(dim-1.)/(o+1.))+(0.931223221336)*dim
-        ref[0,1,1]=(-1.04305002243)*(1+2.*(dim-1.)/(o+1.))+(1.87452791805)*dim
-        ref[1,0,0]=(0.143941913005)*(1+2.*(dim-1.)/(o+1.))+(-0.873358354816)*dim
-        ref[1,0,1]=(-1.6673983903)*(1+2.*(dim-1.)/(o+1.))+(0.253523568676)*dim
-        ref[1,1,0]=(0.665232137068)*(1+2.*(dim-1.)/(o+1.))+(1.04406099182)*dim
-        ref[1,1,1]=(-0.855338073283)*(1+2.*(dim-1.)/(o+1.))+(-1.19508920116)*dim
-        ref[2,0,0]=(1.19306356076)*(1+2.*(dim-1.)/(o+1.))+(-0.680006770164)*dim
-        ref[2,0,1]=(0.0570227817187)*(1+2.*(dim-1.)/(o+1.))+(-0.870537211764)*dim
-        ref[2,1,0]=(-0.0402582285028)*(1+2.*(dim-1.)/(o+1.))+(-0.682108493287)*dim
-        ref[2,1,1]=(0.228444553263)*(1+2.*(dim-1.)/(o+1.))+(0.0620305162089)*dim
-        ref[3,0,0]=(-0.758644800093)*(1+2.*(dim-1.)/(o+1.))+(-0.867938181611)*dim
-        ref[3,0,1]=(-1.15449397534)*(1+2.*(dim-1.)/(o+1.))+(0.742000116921)*dim
-        ref[3,1,0]=(0.317824936505)*(1+2.*(dim-1.)/(o+1.))+(0.457110978744)*dim
-        ref[3,1,1]=(0.822330994578)*(1+2.*(dim-1.)/(o+1.))+(0.798054040789)*dim
-        ref[4,0,0]=(0.173798775954)*(1+2.*(dim-1.)/(o+1.))+(0.0292780667983)*dim
-        ref[4,0,1]=(-0.403565049303)*(1+2.*(dim-1.)/(o+1.))+(-0.0965639721601)*dim
-        ref[4,1,0]=(0.157682670995)*(1+2.*(dim-1.)/(o+1.))+(0.466087282085)*dim
-        ref[4,1,1]=(-0.68816006255)*(1+2.*(dim-1.)/(o+1.))+(0.914425627528)*dim
-        ref[5,0,0]=(1.49672711817)*(1+2.*(dim-1.)/(o+1.))+(-0.977766520654)*dim
-        ref[5,0,1]=(-0.116997574651)*(1+2.*(dim-1.)/(o+1.))+(-0.674738423353)*dim
-        ref[5,1,0]=(0.896607779795)*(1+2.*(dim-1.)/(o+1.))+(-0.252387066394)*dim
-        ref[5,1,1]=(-0.513986514058)*(1+2.*(dim-1.)/(o+1.))+(0.107915192814)*dim
-      else:
-        arg[0,0,0]=(-0.418671467289)*x[0]**o+(0.498387164484)*x[0]+(0.208896299314)*x[1]**o+(-0.643038678771)*x[1]+(-0.85475466439)*x[2]**o+(0.59586368009)*x[2]
-        arg[0,0,1]=(0.149229891253)*x[0]**o+(0.229836799955)*x[0]+(0.557946253001)*x[1]**o+(-0.434223003739)*x[1]+(-0.250979831671)*x[2]**o+(0.762582320269)*x[2]
-        arg[0,1,0]=(-0.950902166094)*x[0]**o+(-0.312913424444)*x[0]+(-0.573887973428)*x[1]**o+(-0.372485255069)*x[1]+(-0.18228472562)*x[2]**o+(-0.566679093436)*x[2]
-        arg[0,1,1]=(-0.191769651257)*x[0]**o+(-0.344504306057)*x[0]+(0.355926399715)*x[1]**o+(-0.721341598375)*x[1]+(0.362401271289)*x[2]**o+(0.601351093654)*x[2]
-        arg[1,0,0]=(-0.375572370375)*x[0]**o+(-0.532723139333)*x[0]+(-0.738166755424)*x[1]**o+(0.785506757134)*x[1]+(0.192667976423)*x[2]**o+(-0.06534893872)*x[2]
-        arg[1,0,1]=(-0.353750712453)*x[0]**o+(0.401872866285)*x[0]+(-0.747783222746)*x[1]**o+(0.663116752574)*x[1]+(-0.162954382466)*x[2]**o+(0.318112656687)*x[2]
-        arg[1,1,0]=(-0.711345828912)*x[0]**o+(0.764701438614)*x[0]+(-0.232576947703)*x[1]**o+(-0.50541791533)*x[1]+(0.604603682696)*x[2]**o+(0.498828792648)*x[2]
-        arg[1,1,1]=(-0.72474879447)*x[0]**o+(0.888266999605)*x[0]+(0.639903282531)*x[1]**o+(-0.777435844156)*x[1]+(-0.0814738680964)*x[2]**o+(-0.0135286853237)*x[2]
-        arg[2,0,0]=(0.839793308998)*x[0]**o+(0.374051014226)*x[0]+(0.594653957466)*x[1]**o+(-0.962352782345)*x[1]+(0.888632514336)*x[2]**o+(0.491195067464)*x[2]
-        arg[2,0,1]=(-0.827615661598)*x[0]**o+(0.675227575488)*x[0]+(-0.93068580658)*x[1]**o+(0.694434337954)*x[1]+(0.3583179263)*x[2]**o+(0.775147111187)*x[2]
-        arg[2,1,0]=(-0.772656999491)*x[0]**o+(-0.464476706435)*x[0]+(0.569832694977)*x[1]**o+(0.500517676542)*x[1]+(-0.272153062279)*x[2]**o+(-0.398436498506)*x[2]
-        arg[2,1,1]=(-0.3065198839)*x[0]**o+(-0.454353346315)*x[0]+(-0.539448433869)*x[1]**o+(0.776950547078)*x[1]+(-0.987178147402)*x[2]**o+(0.368935549126)*x[2]
-        arg[3,0,0]=(-0.516131622594)*x[0]**o+(-0.680922252714)*x[0]+(0.304951059501)*x[1]**o+(-0.236361364379)*x[1]+(-0.37983306233)*x[2]**o+(0.693426329316)*x[2]
-        arg[3,0,1]=(0.85094983056)*x[0]**o+(-0.356782375867)*x[0]+(0.362116478047)*x[1]**o+(0.269126381543)*x[1]+(0.950254707197)*x[2]**o+(0.592028802301)*x[2]
-        arg[3,1,0]=(-0.17721437307)*x[0]**o+(-0.127432965766)*x[0]+(-0.754975923735)*x[1]**o+(0.755938625221)*x[1]+(0.776393089777)*x[2]**o+(0.913028629874)*x[2]
-        arg[3,1,1]=(-0.779840479711)*x[0]**o+(0.432392796542)*x[0]+(0.0457670482312)*x[1]**o+(0.493363120993)*x[1]+(-0.290308698356)*x[2]**o+(0.263565329052)*x[2]
-        arg[4,0,0]=(-0.594371032991)*x[0]**o+(0.673573089348)*x[0]+(0.0301238273919)*x[1]**o+(-0.900766544194)*x[1]+(0.937125579182)*x[2]**o+(-0.360512287398)*x[2]
-        arg[4,0,1]=(-0.187561420369)*x[0]**o+(-0.727058667406)*x[0]+(0.643904893485)*x[1]**o+(0.547358609515)*x[1]+(-0.810276689361)*x[2]**o+(0.347967967049)*x[2]
-        arg[4,1,0]=(0.0261452776327)*x[0]**o+(0.630125453041)*x[0]+(0.884509651558)*x[1]**o+(-0.580251885597)*x[1]+(0.141608918047)*x[2]**o+(0.417140237181)*x[2]
-        arg[4,1,1]=(0.943149763428)*x[0]**o+(0.0414421588123)*x[0]+(-0.453944232191)*x[1]**o+(0.817963360891)*x[1]+(-0.0132464046434)*x[2]**o+(-0.247024507218)*x[2]
-        arg[5,0,0]=(0.993356103007)*x[0]**o+(-0.604991443085)*x[0]+(-0.0141942193536)*x[1]**o+(-0.467982818195)*x[1]+(0.907608332852)*x[2]**o+(-0.918494340721)*x[2]
-        arg[5,0,1]=(0.782079295393)*x[0]**o+(0.0125642236587)*x[0]+(-0.512764292821)*x[1]**o+(-0.0699705327379)*x[1]+(0.141341885735)*x[2]**o+(0.420508183565)*x[2]
-        arg[5,1,0]=(-0.835665486427)*x[0]**o+(-0.536850925449)*x[0]+(-0.0958499285885)*x[1]**o+(-0.541119926637)*x[1]+(0.341886033336)*x[2]**o+(-0.772823771771)*x[2]
-        arg[5,1,1]=(-0.391737530391)*x[0]**o+(-0.160045087084)*x[0]+(-0.984350699381)*x[1]**o+(0.303782477449)*x[1]+(-0.279906615513)*x[2]**o+(-0.690872289955)*x[2]
-        ref[0,0,0]=(-1.06452983237)*(1+2.*(dim-1.)/(o+1.))+(0.451212165803)*dim
-        ref[0,0,1]=(0.456196312583)*(1+2.*(dim-1.)/(o+1.))+(0.558196116486)*dim
-        ref[0,1,0]=(-1.70707486514)*(1+2.*(dim-1.)/(o+1.))+(-1.25207777295)*dim
-        ref[0,1,1]=(0.526558019747)*(1+2.*(dim-1.)/(o+1.))+(-0.464494810779)*dim
-        ref[1,0,0]=(-0.921071149376)*(1+2.*(dim-1.)/(o+1.))+(0.187434679081)*dim
-        ref[1,0,1]=(-1.26448831766)*(1+2.*(dim-1.)/(o+1.))+(1.38310227555)*dim
-        ref[1,1,0]=(-0.339319093919)*(1+2.*(dim-1.)/(o+1.))+(0.758112315932)*dim
-        ref[1,1,1]=(-0.166319380035)*(1+2.*(dim-1.)/(o+1.))+(0.0973024701251)*dim
-        ref[2,0,0]=(2.3230797808)*(1+2.*(dim-1.)/(o+1.))+(-0.0971067006546)*dim
-        ref[2,0,1]=(-1.39998354188)*(1+2.*(dim-1.)/(o+1.))+(2.14480902463)*dim
-        ref[2,1,0]=(-0.474977366793)*(1+2.*(dim-1.)/(o+1.))+(-0.362395528399)*dim
-        ref[2,1,1]=(-1.83314646517)*(1+2.*(dim-1.)/(o+1.))+(0.69153274989)*dim
-        ref[3,0,0]=(-0.591013625423)*(1+2.*(dim-1.)/(o+1.))+(-0.223857287777)*dim
-        ref[3,0,1]=(2.1633210158)*(1+2.*(dim-1.)/(o+1.))+(0.504372807977)*dim
-        ref[3,1,0]=(-0.155797207029)*(1+2.*(dim-1.)/(o+1.))+(1.54153428933)*dim
-        ref[3,1,1]=(-1.02438212984)*(1+2.*(dim-1.)/(o+1.))+(1.18932124659)*dim
-        ref[4,0,0]=(0.372878373583)*(1+2.*(dim-1.)/(o+1.))+(-0.587705742243)*dim
-        ref[4,0,1]=(-0.353933216245)*(1+2.*(dim-1.)/(o+1.))+(0.168267909158)*dim
-        ref[4,1,0]=(1.05226384724)*(1+2.*(dim-1.)/(o+1.))+(0.467013804625)*dim
-        ref[4,1,1]=(0.475959126593)*(1+2.*(dim-1.)/(o+1.))+(0.612381012486)*dim
-        ref[5,0,0]=(1.88677021651)*(1+2.*(dim-1.)/(o+1.))+(-1.991468602)*dim
-        ref[5,0,1]=(0.410656888307)*(1+2.*(dim-1.)/(o+1.))+(0.363101874486)*dim
-        ref[5,1,0]=(-0.58962938168)*(1+2.*(dim-1.)/(o+1.))+(-1.85079462386)*dim
-        ref[5,1,1]=(-1.65599484529)*(1+2.*(dim-1.)/(o+1.))+(-0.54713489959)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.606358724075)*x[0]**o+(-0.6326664687)*x[0]+(-0.521101256804)*x[1]**o+(0.702113497865)*x[1]
-        arg[0,0,0,1]=(0.528315511137)*x[0]**o+(-0.116566989978)*x[0]+(-0.350847384045)*x[1]**o+(-0.581988878345)*x[1]
-        arg[0,0,1,0]=(0.565076347032)*x[0]**o+(0.752532782601)*x[0]+(0.00706163321089)*x[1]**o+(-0.89265244135)*x[1]
-        arg[0,0,1,1]=(-0.342136497951)*x[0]**o+(0.753153993866)*x[0]+(-0.199643944066)*x[1]**o+(0.995411752312)*x[1]
-        arg[0,0,2,0]=(0.621283193015)*x[0]**o+(0.591186318333)*x[0]+(0.880169584588)*x[1]**o+(-0.11839698224)*x[1]
-        arg[0,0,2,1]=(-0.831745199475)*x[0]**o+(0.293656166596)*x[0]+(0.0717745661823)*x[1]**o+(0.827680695965)*x[1]
-        arg[0,1,0,0]=(0.686864676707)*x[0]**o+(-0.6552976723)*x[0]+(-0.65589888943)*x[1]**o+(-0.878054891784)*x[1]
-        arg[0,1,0,1]=(-0.43359086203)*x[0]**o+(0.723819586663)*x[0]+(0.0741799035834)*x[1]**o+(0.13005305188)*x[1]
-        arg[0,1,1,0]=(-0.0605346127445)*x[0]**o+(-0.717729061173)*x[0]+(0.825539660518)*x[1]**o+(0.873033938391)*x[1]
-        arg[0,1,1,1]=(-0.286483607332)*x[0]**o+(-0.577255191498)*x[0]+(-0.328362280683)*x[1]**o+(0.499078653745)*x[1]
-        arg[0,1,2,0]=(-0.334132932545)*x[0]**o+(0.462461110225)*x[0]+(-0.932311565873)*x[1]**o+(0.934683608666)*x[1]
-        arg[0,1,2,1]=(-0.383203086272)*x[0]**o+(0.261035781624)*x[0]+(-0.203936125231)*x[1]**o+(0.657584310755)*x[1]
-        arg[0,2,0,0]=(-0.637642146695)*x[0]**o+(0.80524493224)*x[0]+(-0.139137135459)*x[1]**o+(0.947434162736)*x[1]
-        arg[0,2,0,1]=(-0.0738996477961)*x[0]**o+(0.0663360260869)*x[0]+(-0.599113718918)*x[1]**o+(-0.349514990363)*x[1]
-        arg[0,2,1,0]=(-0.0539211250603)*x[0]**o+(0.262567947534)*x[0]+(0.115386681137)*x[1]**o+(-0.68179682822)*x[1]
-        arg[0,2,1,1]=(-0.770114869627)*x[0]**o+(-0.388068404619)*x[0]+(-0.712914716647)*x[1]**o+(-0.810536809871)*x[1]
-        arg[0,2,2,0]=(0.274425895455)*x[0]**o+(0.338467327995)*x[0]+(-0.78223636363)*x[1]**o+(0.406149090351)*x[1]
-        arg[0,2,2,1]=(-0.748672361572)*x[0]**o+(0.508311939723)*x[0]+(0.875797107098)*x[1]**o+(0.0992795348726)*x[1]
-        arg[0,3,0,0]=(-0.547350688209)*x[0]**o+(0.671683747412)*x[0]+(-0.0954212965969)*x[1]**o+(0.983487887304)*x[1]
-        arg[0,3,0,1]=(0.626104338883)*x[0]**o+(-0.825311449834)*x[0]+(-0.422521614246)*x[1]**o+(0.304208397592)*x[1]
-        arg[0,3,1,0]=(0.698777992012)*x[0]**o+(0.00291670095874)*x[0]+(0.327527809646)*x[1]**o+(0.283289333886)*x[1]
-        arg[0,3,1,1]=(-0.0197648150597)*x[0]**o+(-0.902860814776)*x[0]+(0.663961228673)*x[1]**o+(0.675952386365)*x[1]
-        arg[0,3,2,0]=(0.286747814345)*x[0]**o+(-0.0641946364041)*x[0]+(0.812019228115)*x[1]**o+(-0.225698609001)*x[1]
-        arg[0,3,2,1]=(0.879776322226)*x[0]**o+(-0.251856143047)*x[0]+(-0.252403834757)*x[1]**o+(0.650790406323)*x[1]
-        arg[0,4,0,0]=(-0.58782572388)*x[0]**o+(-0.144122228965)*x[0]+(0.521707348991)*x[1]**o+(-0.0460840614459)*x[1]
-        arg[0,4,0,1]=(-0.777497837497)*x[0]**o+(-0.229011563089)*x[0]+(0.754657080443)*x[1]**o+(-0.690675521089)*x[1]
-        arg[0,4,1,0]=(0.351528557097)*x[0]**o+(0.00192986530026)*x[0]+(-0.414849484269)*x[1]**o+(-0.250205659505)*x[1]
-        arg[0,4,1,1]=(-0.814037796843)*x[0]**o+(0.00188512986627)*x[0]+(-0.810799710998)*x[1]**o+(-0.114406174711)*x[1]
-        arg[0,4,2,0]=(-0.755511212878)*x[0]**o+(-0.502206951212)*x[0]+(0.555738333365)*x[1]**o+(-0.220359547926)*x[1]
-        arg[0,4,2,1]=(0.247108894345)*x[0]**o+(0.479239235148)*x[0]+(0.663958827816)*x[1]**o+(0.220938477625)*x[1]
-        arg[1,0,0,0]=(0.818774052595)*x[0]**o+(-0.651584728881)*x[0]+(-0.780674092348)*x[1]**o+(-0.397277502644)*x[1]
-        arg[1,0,0,1]=(0.482101508249)*x[0]**o+(-0.523618202277)*x[0]+(0.806406836488)*x[1]**o+(-0.883738297664)*x[1]
-        arg[1,0,1,0]=(0.272517667346)*x[0]**o+(-0.700461889638)*x[0]+(0.280736354342)*x[1]**o+(0.182983247089)*x[1]
-        arg[1,0,1,1]=(0.566589111451)*x[0]**o+(-0.876744547538)*x[0]+(-0.934741703566)*x[1]**o+(-0.562770667492)*x[1]
-        arg[1,0,2,0]=(-0.954128714623)*x[0]**o+(0.115699770127)*x[0]+(-0.580663262426)*x[1]**o+(-0.451619694161)*x[1]
-        arg[1,0,2,1]=(0.268605150185)*x[0]**o+(-0.233415174179)*x[0]+(0.477143801066)*x[1]**o+(0.443696994244)*x[1]
-        arg[1,1,0,0]=(-0.00240846686485)*x[0]**o+(0.776336851643)*x[0]+(0.488314964094)*x[1]**o+(-0.840196476788)*x[1]
-        arg[1,1,0,1]=(-0.511732155638)*x[0]**o+(0.528782039485)*x[0]+(0.51274502262)*x[1]**o+(-0.700213610705)*x[1]
-        arg[1,1,1,0]=(0.300359000499)*x[0]**o+(0.405101876401)*x[0]+(-0.47022583299)*x[1]**o+(-0.977634916267)*x[1]
-        arg[1,1,1,1]=(-0.494482318948)*x[0]**o+(0.254112728167)*x[0]+(-0.541672595343)*x[1]**o+(-0.270970064522)*x[1]
-        arg[1,1,2,0]=(-0.586624294233)*x[0]**o+(0.629601920904)*x[0]+(-0.525092252936)*x[1]**o+(-0.44611635978)*x[1]
-        arg[1,1,2,1]=(0.716927085139)*x[0]**o+(0.700193925267)*x[0]+(0.0624921446647)*x[1]**o+(0.109485129877)*x[1]
-        arg[1,2,0,0]=(0.325729307898)*x[0]**o+(0.773432634097)*x[0]+(-0.675612597356)*x[1]**o+(-0.0554913733692)*x[1]
-        arg[1,2,0,1]=(-0.381606382262)*x[0]**o+(-0.689040382854)*x[0]+(-0.580191973398)*x[1]**o+(0.951689147387)*x[1]
-        arg[1,2,1,0]=(-0.527642403744)*x[0]**o+(-0.936915203927)*x[0]+(0.631733997289)*x[1]**o+(-0.715975680015)*x[1]
-        arg[1,2,1,1]=(0.0886898373323)*x[0]**o+(-0.0943320873915)*x[0]+(0.470668750443)*x[1]**o+(0.773832960093)*x[1]
-        arg[1,2,2,0]=(-0.727720290197)*x[0]**o+(0.422119803173)*x[0]+(0.705882951779)*x[1]**o+(-0.350801865244)*x[1]
-        arg[1,2,2,1]=(0.879335475407)*x[0]**o+(-0.0307168471577)*x[0]+(0.458578151544)*x[1]**o+(0.788796576339)*x[1]
-        arg[1,3,0,0]=(0.182143508146)*x[0]**o+(-0.680787176288)*x[0]+(0.626099489145)*x[1]**o+(-0.771540378408)*x[1]
-        arg[1,3,0,1]=(-0.578341681282)*x[0]**o+(0.856407179963)*x[0]+(0.525319425356)*x[1]**o+(0.345651851179)*x[1]
-        arg[1,3,1,0]=(-0.316652838058)*x[0]**o+(0.652409898929)*x[0]+(-0.82123442746)*x[1]**o+(-0.136868558081)*x[1]
-        arg[1,3,1,1]=(-0.755530700082)*x[0]**o+(0.354429731374)*x[0]+(-0.14330437792)*x[1]**o+(-0.221454495186)*x[1]
-        arg[1,3,2,0]=(-0.520261483769)*x[0]**o+(0.0873707179205)*x[0]+(-0.882995356682)*x[1]**o+(-0.773921687804)*x[1]
-        arg[1,3,2,1]=(0.404278952718)*x[0]**o+(0.651166017764)*x[0]+(-0.496695253747)*x[1]**o+(0.625671754182)*x[1]
-        arg[1,4,0,0]=(-0.730831539043)*x[0]**o+(0.219467989041)*x[0]+(-0.853784008431)*x[1]**o+(0.274799624897)*x[1]
-        arg[1,4,0,1]=(0.893313801855)*x[0]**o+(-0.539687651773)*x[0]+(-0.411582029239)*x[1]**o+(-0.293521483805)*x[1]
-        arg[1,4,1,0]=(0.484878049594)*x[0]**o+(0.218930293134)*x[0]+(-0.138362733141)*x[1]**o+(-0.663241354177)*x[1]
-        arg[1,4,1,1]=(-0.608410207857)*x[0]**o+(-0.0921006917331)*x[0]+(-0.885705130565)*x[1]**o+(0.103724764404)*x[1]
-        arg[1,4,2,0]=(0.150946260009)*x[0]**o+(-0.601834829203)*x[0]+(0.0141091402169)*x[1]**o+(-0.98316187826)*x[1]
-        arg[1,4,2,1]=(0.98764918249)*x[0]**o+(-0.841155365687)*x[0]+(0.185525084432)*x[1]**o+(-0.613421841538)*x[1]
-        arg[2,0,0,0]=(0.485337970037)*x[0]**o+(-0.898602108837)*x[0]+(0.847812629133)*x[1]**o+(-0.23522051021)*x[1]
-        arg[2,0,0,1]=(0.835641029366)*x[0]**o+(-0.0524661277338)*x[0]+(0.41697147238)*x[1]**o+(-0.622813671618)*x[1]
-        arg[2,0,1,0]=(0.505181088966)*x[0]**o+(-0.870141755006)*x[0]+(0.451139050304)*x[1]**o+(0.957790881903)*x[1]
-        arg[2,0,1,1]=(0.822955028051)*x[0]**o+(-0.103028201548)*x[0]+(-0.604614127349)*x[1]**o+(-0.655334670762)*x[1]
-        arg[2,0,2,0]=(-0.166647802545)*x[0]**o+(-0.466885186725)*x[0]+(0.0782333081578)*x[1]**o+(0.814414769115)*x[1]
-        arg[2,0,2,1]=(-0.980310280968)*x[0]**o+(-0.884306329761)*x[0]+(-0.895550319566)*x[1]**o+(0.160657671233)*x[1]
-        arg[2,1,0,0]=(-0.846405435483)*x[0]**o+(-0.625465093616)*x[0]+(-0.0789995975268)*x[1]**o+(-0.440180761086)*x[1]
-        arg[2,1,0,1]=(-0.949855662419)*x[0]**o+(-0.013707742372)*x[0]+(0.0397729185783)*x[1]**o+(-0.836054083952)*x[1]
-        arg[2,1,1,0]=(0.427246928002)*x[0]**o+(0.835369889909)*x[0]+(0.925300799558)*x[1]**o+(-0.328266770631)*x[1]
-        arg[2,1,1,1]=(-0.36143365614)*x[0]**o+(-0.744107540819)*x[0]+(-0.358554131639)*x[1]**o+(-0.562674543946)*x[1]
-        arg[2,1,2,0]=(0.60580594275)*x[0]**o+(0.644796993923)*x[0]+(-0.682407021927)*x[1]**o+(0.938016908061)*x[1]
-        arg[2,1,2,1]=(-0.934393274317)*x[0]**o+(-0.718420272664)*x[0]+(0.0357039032065)*x[1]**o+(0.446387943344)*x[1]
-        arg[2,2,0,0]=(-0.329105411737)*x[0]**o+(0.588935500072)*x[0]+(-0.833362483432)*x[1]**o+(0.629996961074)*x[1]
-        arg[2,2,0,1]=(0.723977530226)*x[0]**o+(0.0698430385616)*x[0]+(-0.503761809156)*x[1]**o+(0.907472279839)*x[1]
-        arg[2,2,1,0]=(-0.767545510793)*x[0]**o+(0.615094783682)*x[0]+(0.894594933703)*x[1]**o+(0.922357219049)*x[1]
-        arg[2,2,1,1]=(-0.155739055576)*x[0]**o+(0.646142299486)*x[0]+(0.865932681534)*x[1]**o+(-0.126887380871)*x[1]
-        arg[2,2,2,0]=(-0.629534320112)*x[0]**o+(-0.0904366301836)*x[0]+(0.193019806731)*x[1]**o+(-0.866080160466)*x[1]
-        arg[2,2,2,1]=(-0.714527761053)*x[0]**o+(-0.813712879405)*x[0]+(-0.291734238438)*x[1]**o+(0.232675536415)*x[1]
-        arg[2,3,0,0]=(-0.447474292879)*x[0]**o+(-0.639046887788)*x[0]+(0.159616683647)*x[1]**o+(0.564127141623)*x[1]
-        arg[2,3,0,1]=(-0.608953936619)*x[0]**o+(0.273179484103)*x[0]+(0.42693156927)*x[1]**o+(-0.983331075647)*x[1]
-        arg[2,3,1,0]=(0.855859483301)*x[0]**o+(-0.432495503925)*x[0]+(-0.67928203769)*x[1]**o+(-0.856541006702)*x[1]
-        arg[2,3,1,1]=(-0.581185594204)*x[0]**o+(0.947720323693)*x[0]+(-0.520212852628)*x[1]**o+(-0.37563221594)*x[1]
-        arg[2,3,2,0]=(0.351358492535)*x[0]**o+(0.367210525846)*x[0]+(0.97870179383)*x[1]**o+(-0.199559052968)*x[1]
-        arg[2,3,2,1]=(0.797294518541)*x[0]**o+(0.546397721552)*x[0]+(0.374121851646)*x[1]**o+(0.704436689798)*x[1]
-        arg[2,4,0,0]=(-0.756047775149)*x[0]**o+(-0.705403684825)*x[0]+(-0.662421213376)*x[1]**o+(0.390069314234)*x[1]
-        arg[2,4,0,1]=(-0.658842889869)*x[0]**o+(0.766273769822)*x[0]+(-0.779201775962)*x[1]**o+(-0.968670270742)*x[1]
-        arg[2,4,1,0]=(-0.336220564628)*x[0]**o+(-0.134745604319)*x[0]+(0.391939888428)*x[1]**o+(-0.113113999792)*x[1]
-        arg[2,4,1,1]=(-0.8345363851)*x[0]**o+(0.339223929857)*x[0]+(0.628403353717)*x[1]**o+(0.799364167182)*x[1]
-        arg[2,4,2,0]=(-0.898050446701)*x[0]**o+(-0.666373288962)*x[0]+(-0.620778021659)*x[1]**o+(-0.990359850049)*x[1]
-        arg[2,4,2,1]=(-0.933931027675)*x[0]**o+(-0.119077281033)*x[0]+(0.557313533556)*x[1]**o+(0.160336158304)*x[1]
-        arg[3,0,0,0]=(0.972462636314)*x[0]**o+(0.607913740671)*x[0]+(0.490168539257)*x[1]**o+(-0.12515921391)*x[1]
-        arg[3,0,0,1]=(0.856370886333)*x[0]**o+(-0.143225009869)*x[0]+(-0.330381845603)*x[1]**o+(-0.271958059018)*x[1]
-        arg[3,0,1,0]=(0.86742129112)*x[0]**o+(-0.0259756341823)*x[0]+(-0.0137047849942)*x[1]**o+(-0.0165444161044)*x[1]
-        arg[3,0,1,1]=(-0.445996036941)*x[0]**o+(0.247936136111)*x[0]+(-0.381484740124)*x[1]**o+(0.836678417006)*x[1]
-        arg[3,0,2,0]=(0.161387456771)*x[0]**o+(0.687533753311)*x[0]+(-0.463845417603)*x[1]**o+(0.665023823118)*x[1]
-        arg[3,0,2,1]=(0.243410612742)*x[0]**o+(-0.52431675734)*x[0]+(0.75630192488)*x[1]**o+(-0.703601557317)*x[1]
-        arg[3,1,0,0]=(0.793530689056)*x[0]**o+(0.814806726176)*x[0]+(0.582051068232)*x[1]**o+(0.692432923027)*x[1]
-        arg[3,1,0,1]=(-0.283506909465)*x[0]**o+(0.21438128538)*x[0]+(-0.327476122861)*x[1]**o+(0.990178870269)*x[1]
-        arg[3,1,1,0]=(-0.117386491827)*x[0]**o+(0.747771272481)*x[0]+(-0.439767754004)*x[1]**o+(-0.905218338639)*x[1]
-        arg[3,1,1,1]=(-0.544805647706)*x[0]**o+(-0.0484033735345)*x[0]+(0.861443439156)*x[1]**o+(-0.992086899129)*x[1]
-        arg[3,1,2,0]=(0.596208599112)*x[0]**o+(-0.276136075021)*x[0]+(0.079604120535)*x[1]**o+(0.124232758054)*x[1]
-        arg[3,1,2,1]=(0.809847641841)*x[0]**o+(0.956041370087)*x[0]+(0.65224420189)*x[1]**o+(0.565327743771)*x[1]
-        arg[3,2,0,0]=(-0.264599479107)*x[0]**o+(-0.276726556903)*x[0]+(0.577911819561)*x[1]**o+(-0.656157381756)*x[1]
-        arg[3,2,0,1]=(-0.0636193103458)*x[0]**o+(0.941482878452)*x[0]+(0.877581030494)*x[1]**o+(-0.254911385455)*x[1]
-        arg[3,2,1,0]=(-0.28083673633)*x[0]**o+(0.849095032935)*x[0]+(0.6825284068)*x[1]**o+(0.445605171749)*x[1]
-        arg[3,2,1,1]=(-0.729331034619)*x[0]**o+(0.036400895394)*x[0]+(0.365733359214)*x[1]**o+(0.0305324156609)*x[1]
-        arg[3,2,2,0]=(-0.70932226428)*x[0]**o+(0.310455571562)*x[0]+(-0.101305643894)*x[1]**o+(0.346873071627)*x[1]
-        arg[3,2,2,1]=(0.712053329488)*x[0]**o+(-0.845042122758)*x[0]+(0.909517101069)*x[1]**o+(-0.163109058477)*x[1]
-        arg[3,3,0,0]=(0.451744730688)*x[0]**o+(0.308756227526)*x[0]+(0.13963307493)*x[1]**o+(-0.945789640023)*x[1]
-        arg[3,3,0,1]=(-0.852609785834)*x[0]**o+(-0.821513824231)*x[0]+(-0.544690113726)*x[1]**o+(0.335547843106)*x[1]
-        arg[3,3,1,0]=(0.337600834432)*x[0]**o+(-0.170181468776)*x[0]+(-0.302415145845)*x[1]**o+(0.985425450212)*x[1]
-        arg[3,3,1,1]=(-0.638242591048)*x[0]**o+(-0.0221442303187)*x[0]+(0.421311946694)*x[1]**o+(-0.43495081316)*x[1]
-        arg[3,3,2,0]=(-0.734168622382)*x[0]**o+(-0.889300572069)*x[0]+(0.808161580285)*x[1]**o+(-0.526348332439)*x[1]
-        arg[3,3,2,1]=(0.998918324168)*x[0]**o+(-0.953729666152)*x[0]+(0.665101882861)*x[1]**o+(-0.581118145725)*x[1]
-        arg[3,4,0,0]=(-0.251226888098)*x[0]**o+(-0.711615999514)*x[0]+(0.291022154479)*x[1]**o+(0.0772744442604)*x[1]
-        arg[3,4,0,1]=(0.162379537091)*x[0]**o+(0.363750962136)*x[0]+(0.635943839083)*x[1]**o+(0.513856953389)*x[1]
-        arg[3,4,1,0]=(-0.99052354199)*x[0]**o+(0.289202668813)*x[0]+(-0.759078503012)*x[1]**o+(-0.588801682903)*x[1]
-        arg[3,4,1,1]=(-0.942278699306)*x[0]**o+(0.476003512559)*x[0]+(0.873920293292)*x[1]**o+(0.867413991424)*x[1]
-        arg[3,4,2,0]=(-0.602386702281)*x[0]**o+(0.694432164577)*x[0]+(0.367008950869)*x[1]**o+(-0.803331549449)*x[1]
-        arg[3,4,2,1]=(-0.00204465287104)*x[0]**o+(-0.697572466685)*x[0]+(-0.84755978799)*x[1]**o+(-0.758946055726)*x[1]
-        ref[0,0,0,0]=(0.0852574672711)*(1+2.*(dim-1.)/(o+1.))+(0.069447029165)*dim
-        ref[0,0,0,1]=(0.177468127092)*(1+2.*(dim-1.)/(o+1.))+(-0.698555868323)*dim
-        ref[0,0,1,0]=(0.572137980243)*(1+2.*(dim-1.)/(o+1.))+(-0.140119658749)*dim
-        ref[0,0,1,1]=(-0.541780442017)*(1+2.*(dim-1.)/(o+1.))+(1.74856574618)*dim
-        ref[0,0,2,0]=(1.5014527776)*(1+2.*(dim-1.)/(o+1.))+(0.472789336092)*dim
-        ref[0,0,2,1]=(-0.759970633293)*(1+2.*(dim-1.)/(o+1.))+(1.12133686256)*dim
-        ref[0,1,0,0]=(0.030965787278)*(1+2.*(dim-1.)/(o+1.))+(-1.53335256408)*dim
-        ref[0,1,0,1]=(-0.359410958446)*(1+2.*(dim-1.)/(o+1.))+(0.853872638544)*dim
-        ref[0,1,1,0]=(0.765005047774)*(1+2.*(dim-1.)/(o+1.))+(0.155304877218)*dim
-        ref[0,1,1,1]=(-0.614845888015)*(1+2.*(dim-1.)/(o+1.))+(-0.0781765377528)*dim
-        ref[0,1,2,0]=(-1.26644449842)*(1+2.*(dim-1.)/(o+1.))+(1.39714471889)*dim
-        ref[0,1,2,1]=(-0.587139211502)*(1+2.*(dim-1.)/(o+1.))+(0.918620092379)*dim
-        ref[0,2,0,0]=(-0.776779282155)*(1+2.*(dim-1.)/(o+1.))+(1.75267909498)*dim
-        ref[0,2,0,1]=(-0.673013366714)*(1+2.*(dim-1.)/(o+1.))+(-0.283178964276)*dim
-        ref[0,2,1,0]=(0.0614655560763)*(1+2.*(dim-1.)/(o+1.))+(-0.419228880686)*dim
-        ref[0,2,1,1]=(-1.48302958627)*(1+2.*(dim-1.)/(o+1.))+(-1.19860521449)*dim
-        ref[0,2,2,0]=(-0.507810468175)*(1+2.*(dim-1.)/(o+1.))+(0.744616418346)*dim
-        ref[0,2,2,1]=(0.127124745526)*(1+2.*(dim-1.)/(o+1.))+(0.607591474596)*dim
-        ref[0,3,0,0]=(-0.642771984806)*(1+2.*(dim-1.)/(o+1.))+(1.65517163472)*dim
-        ref[0,3,0,1]=(0.203582724637)*(1+2.*(dim-1.)/(o+1.))+(-0.521103052242)*dim
-        ref[0,3,1,0]=(1.02630580166)*(1+2.*(dim-1.)/(o+1.))+(0.286206034845)*dim
-        ref[0,3,1,1]=(0.644196413613)*(1+2.*(dim-1.)/(o+1.))+(-0.226908428411)*dim
-        ref[0,3,2,0]=(1.09876704246)*(1+2.*(dim-1.)/(o+1.))+(-0.289893245405)*dim
-        ref[0,3,2,1]=(0.627372487469)*(1+2.*(dim-1.)/(o+1.))+(0.398934263276)*dim
-        ref[0,4,0,0]=(-0.0661183748894)*(1+2.*(dim-1.)/(o+1.))+(-0.190206290411)*dim
-        ref[0,4,0,1]=(-0.022840757054)*(1+2.*(dim-1.)/(o+1.))+(-0.919687084178)*dim
-        ref[0,4,1,0]=(-0.063320927172)*(1+2.*(dim-1.)/(o+1.))+(-0.248275794205)*dim
-        ref[0,4,1,1]=(-1.62483750784)*(1+2.*(dim-1.)/(o+1.))+(-0.112521044845)*dim
-        ref[0,4,2,0]=(-0.199772879513)*(1+2.*(dim-1.)/(o+1.))+(-0.722566499138)*dim
-        ref[0,4,2,1]=(0.911067722161)*(1+2.*(dim-1.)/(o+1.))+(0.700177712774)*dim
-        ref[1,0,0,0]=(0.0380999602468)*(1+2.*(dim-1.)/(o+1.))+(-1.04886223152)*dim
-        ref[1,0,0,1]=(1.28850834474)*(1+2.*(dim-1.)/(o+1.))+(-1.40735649994)*dim
-        ref[1,0,1,0]=(0.553254021688)*(1+2.*(dim-1.)/(o+1.))+(-0.517478642549)*dim
-        ref[1,0,1,1]=(-0.368152592115)*(1+2.*(dim-1.)/(o+1.))+(-1.43951521503)*dim
-        ref[1,0,2,0]=(-1.53479197705)*(1+2.*(dim-1.)/(o+1.))+(-0.335919924034)*dim
-        ref[1,0,2,1]=(0.745748951251)*(1+2.*(dim-1.)/(o+1.))+(0.210281820065)*dim
-        ref[1,1,0,0]=(0.485906497229)*(1+2.*(dim-1.)/(o+1.))+(-0.0638596251453)*dim
-        ref[1,1,0,1]=(0.00101286698233)*(1+2.*(dim-1.)/(o+1.))+(-0.17143157122)*dim
-        ref[1,1,1,0]=(-0.169866832491)*(1+2.*(dim-1.)/(o+1.))+(-0.572533039866)*dim
-        ref[1,1,1,1]=(-1.03615491429)*(1+2.*(dim-1.)/(o+1.))+(-0.016857336355)*dim
-        ref[1,1,2,0]=(-1.11171654717)*(1+2.*(dim-1.)/(o+1.))+(0.183485561125)*dim
-        ref[1,1,2,1]=(0.779419229804)*(1+2.*(dim-1.)/(o+1.))+(0.809679055143)*dim
-        ref[1,2,0,0]=(-0.349883289458)*(1+2.*(dim-1.)/(o+1.))+(0.717941260728)*dim
-        ref[1,2,0,1]=(-0.96179835566)*(1+2.*(dim-1.)/(o+1.))+(0.262648764533)*dim
-        ref[1,2,1,0]=(0.104091593546)*(1+2.*(dim-1.)/(o+1.))+(-1.65289088394)*dim
-        ref[1,2,1,1]=(0.559358587775)*(1+2.*(dim-1.)/(o+1.))+(0.679500872701)*dim
-        ref[1,2,2,0]=(-0.0218373384179)*(1+2.*(dim-1.)/(o+1.))+(0.0713179379289)*dim
-        ref[1,2,2,1]=(1.33791362695)*(1+2.*(dim-1.)/(o+1.))+(0.758079729181)*dim
-        ref[1,3,0,0]=(0.808242997292)*(1+2.*(dim-1.)/(o+1.))+(-1.4523275547)*dim
-        ref[1,3,0,1]=(-0.0530222559262)*(1+2.*(dim-1.)/(o+1.))+(1.20205903114)*dim
-        ref[1,3,1,0]=(-1.13788726552)*(1+2.*(dim-1.)/(o+1.))+(0.515541340848)*dim
-        ref[1,3,1,1]=(-0.898835078002)*(1+2.*(dim-1.)/(o+1.))+(0.132975236188)*dim
-        ref[1,3,2,0]=(-1.40325684045)*(1+2.*(dim-1.)/(o+1.))+(-0.686550969884)*dim
-        ref[1,3,2,1]=(-0.0924163010291)*(1+2.*(dim-1.)/(o+1.))+(1.27683777195)*dim
-        ref[1,4,0,0]=(-1.58461554747)*(1+2.*(dim-1.)/(o+1.))+(0.494267613937)*dim
-        ref[1,4,0,1]=(0.481731772616)*(1+2.*(dim-1.)/(o+1.))+(-0.833209135578)*dim
-        ref[1,4,1,0]=(0.346515316453)*(1+2.*(dim-1.)/(o+1.))+(-0.444311061043)*dim
-        ref[1,4,1,1]=(-1.49411533842)*(1+2.*(dim-1.)/(o+1.))+(0.0116240726713)*dim
-        ref[1,4,2,0]=(0.165055400226)*(1+2.*(dim-1.)/(o+1.))+(-1.58499670746)*dim
-        ref[1,4,2,1]=(1.17317426692)*(1+2.*(dim-1.)/(o+1.))+(-1.45457720722)*dim
-        ref[2,0,0,0]=(1.33315059917)*(1+2.*(dim-1.)/(o+1.))+(-1.13382261905)*dim
-        ref[2,0,0,1]=(1.25261250175)*(1+2.*(dim-1.)/(o+1.))+(-0.675279799352)*dim
-        ref[2,0,1,0]=(0.95632013927)*(1+2.*(dim-1.)/(o+1.))+(0.0876491268976)*dim
-        ref[2,0,1,1]=(0.218340900702)*(1+2.*(dim-1.)/(o+1.))+(-0.75836287231)*dim
-        ref[2,0,2,0]=(-0.0884144943875)*(1+2.*(dim-1.)/(o+1.))+(0.34752958239)*dim
-        ref[2,0,2,1]=(-1.87586060053)*(1+2.*(dim-1.)/(o+1.))+(-0.723648658528)*dim
-        ref[2,1,0,0]=(-0.92540503301)*(1+2.*(dim-1.)/(o+1.))+(-1.0656458547)*dim
-        ref[2,1,0,1]=(-0.910082743841)*(1+2.*(dim-1.)/(o+1.))+(-0.849761826324)*dim
-        ref[2,1,1,0]=(1.35254772756)*(1+2.*(dim-1.)/(o+1.))+(0.507103119278)*dim
-        ref[2,1,1,1]=(-0.719987787779)*(1+2.*(dim-1.)/(o+1.))+(-1.30678208477)*dim
-        ref[2,1,2,0]=(-0.0766010791773)*(1+2.*(dim-1.)/(o+1.))+(1.58281390198)*dim
-        ref[2,1,2,1]=(-0.89868937111)*(1+2.*(dim-1.)/(o+1.))+(-0.27203232932)*dim
-        ref[2,2,0,0]=(-1.16246789517)*(1+2.*(dim-1.)/(o+1.))+(1.21893246115)*dim
-        ref[2,2,0,1]=(0.22021572107)*(1+2.*(dim-1.)/(o+1.))+(0.977315318401)*dim
-        ref[2,2,1,0]=(0.12704942291)*(1+2.*(dim-1.)/(o+1.))+(1.53745200273)*dim
-        ref[2,2,1,1]=(0.710193625958)*(1+2.*(dim-1.)/(o+1.))+(0.519254918615)*dim
-        ref[2,2,2,0]=(-0.43651451338)*(1+2.*(dim-1.)/(o+1.))+(-0.956516790649)*dim
-        ref[2,2,2,1]=(-1.00626199949)*(1+2.*(dim-1.)/(o+1.))+(-0.581037342991)*dim
-        ref[2,3,0,0]=(-0.287857609232)*(1+2.*(dim-1.)/(o+1.))+(-0.0749197461649)*dim
-        ref[2,3,0,1]=(-0.182022367349)*(1+2.*(dim-1.)/(o+1.))+(-0.710151591543)*dim
-        ref[2,3,1,0]=(0.176577445611)*(1+2.*(dim-1.)/(o+1.))+(-1.28903651063)*dim
-        ref[2,3,1,1]=(-1.10139844683)*(1+2.*(dim-1.)/(o+1.))+(0.572088107754)*dim
-        ref[2,3,2,0]=(1.33006028637)*(1+2.*(dim-1.)/(o+1.))+(0.167651472878)*dim
-        ref[2,3,2,1]=(1.17141637019)*(1+2.*(dim-1.)/(o+1.))+(1.25083441135)*dim
-        ref[2,4,0,0]=(-1.41846898852)*(1+2.*(dim-1.)/(o+1.))+(-0.315334370591)*dim
-        ref[2,4,0,1]=(-1.43804466583)*(1+2.*(dim-1.)/(o+1.))+(-0.20239650092)*dim
-        ref[2,4,1,0]=(0.0557193237997)*(1+2.*(dim-1.)/(o+1.))+(-0.247859604111)*dim
-        ref[2,4,1,1]=(-0.206133031383)*(1+2.*(dim-1.)/(o+1.))+(1.13858809704)*dim
-        ref[2,4,2,0]=(-1.51882846836)*(1+2.*(dim-1.)/(o+1.))+(-1.65673313901)*dim
-        ref[2,4,2,1]=(-0.376617494119)*(1+2.*(dim-1.)/(o+1.))+(0.041258877271)*dim
-        ref[3,0,0,0]=(1.46263117557)*(1+2.*(dim-1.)/(o+1.))+(0.482754526761)*dim
-        ref[3,0,0,1]=(0.52598904073)*(1+2.*(dim-1.)/(o+1.))+(-0.415183068887)*dim
-        ref[3,0,1,0]=(0.853716506126)*(1+2.*(dim-1.)/(o+1.))+(-0.0425200502867)*dim
-        ref[3,0,1,1]=(-0.827480777065)*(1+2.*(dim-1.)/(o+1.))+(1.08461455312)*dim
-        ref[3,0,2,0]=(-0.302457960832)*(1+2.*(dim-1.)/(o+1.))+(1.35255757643)*dim
-        ref[3,0,2,1]=(0.999712537623)*(1+2.*(dim-1.)/(o+1.))+(-1.22791831466)*dim
-        ref[3,1,0,0]=(1.37558175729)*(1+2.*(dim-1.)/(o+1.))+(1.5072396492)*dim
-        ref[3,1,0,1]=(-0.610983032326)*(1+2.*(dim-1.)/(o+1.))+(1.20456015565)*dim
-        ref[3,1,1,0]=(-0.557154245831)*(1+2.*(dim-1.)/(o+1.))+(-0.157447066158)*dim
-        ref[3,1,1,1]=(0.316637791451)*(1+2.*(dim-1.)/(o+1.))+(-1.04049027266)*dim
-        ref[3,1,2,0]=(0.675812719647)*(1+2.*(dim-1.)/(o+1.))+(-0.151903316967)*dim
-        ref[3,1,2,1]=(1.46209184373)*(1+2.*(dim-1.)/(o+1.))+(1.52136911386)*dim
-        ref[3,2,0,0]=(0.313312340454)*(1+2.*(dim-1.)/(o+1.))+(-0.93288393866)*dim
-        ref[3,2,0,1]=(0.813961720148)*(1+2.*(dim-1.)/(o+1.))+(0.686571492997)*dim
-        ref[3,2,1,0]=(0.40169167047)*(1+2.*(dim-1.)/(o+1.))+(1.29470020468)*dim
-        ref[3,2,1,1]=(-0.363597675405)*(1+2.*(dim-1.)/(o+1.))+(0.066933311055)*dim
-        ref[3,2,2,0]=(-0.810627908174)*(1+2.*(dim-1.)/(o+1.))+(0.657328643189)*dim
-        ref[3,2,2,1]=(1.62157043056)*(1+2.*(dim-1.)/(o+1.))+(-1.00815118124)*dim
-        ref[3,3,0,0]=(0.591377805617)*(1+2.*(dim-1.)/(o+1.))+(-0.637033412497)*dim
-        ref[3,3,0,1]=(-1.39729989956)*(1+2.*(dim-1.)/(o+1.))+(-0.485965981125)*dim
-        ref[3,3,1,0]=(0.0351856885862)*(1+2.*(dim-1.)/(o+1.))+(0.815243981437)*dim
-        ref[3,3,1,1]=(-0.216930644354)*(1+2.*(dim-1.)/(o+1.))+(-0.457095043478)*dim
-        ref[3,3,2,0]=(0.0739929579029)*(1+2.*(dim-1.)/(o+1.))+(-1.41564890451)*dim
-        ref[3,3,2,1]=(1.66402020703)*(1+2.*(dim-1.)/(o+1.))+(-1.53484781188)*dim
-        ref[3,4,0,0]=(0.0397952663815)*(1+2.*(dim-1.)/(o+1.))+(-0.634341555254)*dim
-        ref[3,4,0,1]=(0.798323376174)*(1+2.*(dim-1.)/(o+1.))+(0.877607915525)*dim
-        ref[3,4,1,0]=(-1.749602045)*(1+2.*(dim-1.)/(o+1.))+(-0.29959901409)*dim
-        ref[3,4,1,1]=(-0.0683584060144)*(1+2.*(dim-1.)/(o+1.))+(1.34341750398)*dim
-        ref[3,4,2,0]=(-0.235377751413)*(1+2.*(dim-1.)/(o+1.))+(-0.108899384872)*dim
-        ref[3,4,2,1]=(-0.849604440861)*(1+2.*(dim-1.)/(o+1.))+(-1.45651852241)*dim
-      else:
-        arg[0,0,0,0]=(-0.229219068739)*x[0]**o+(0.293241016924)*x[0]+(-0.2730739542)*x[1]**o+(0.980438707356)*x[1]+(-0.712463216466)*x[2]**o+(0.201036317883)*x[2]
-        arg[0,0,0,1]=(0.626271947422)*x[0]**o+(0.379293769575)*x[0]+(-0.476378592342)*x[1]**o+(-0.0089906260934)*x[1]+(-0.433154385811)*x[2]**o+(0.126766298748)*x[2]
-        arg[0,0,1,0]=(-0.517950283035)*x[0]**o+(-0.219780986066)*x[0]+(0.345048580545)*x[1]**o+(0.116833851128)*x[1]+(-0.790641523314)*x[2]**o+(0.40506306417)*x[2]
-        arg[0,0,1,1]=(0.910924420538)*x[0]**o+(0.281102231596)*x[0]+(0.115454208619)*x[1]**o+(0.164254056171)*x[1]+(0.44960060103)*x[2]**o+(-0.14238069165)*x[2]
-        arg[0,0,2,0]=(0.86195808217)*x[0]**o+(0.775425956811)*x[0]+(0.214559021523)*x[1]**o+(0.400663063038)*x[1]+(0.995663608954)*x[2]**o+(0.228658543268)*x[2]
-        arg[0,0,2,1]=(0.9025917492)*x[0]**o+(0.643205662573)*x[0]+(-0.304382459664)*x[1]**o+(-0.653256441532)*x[1]+(0.591142459807)*x[2]**o+(-0.888899030043)*x[2]
-        arg[0,1,0,0]=(-0.874720784838)*x[0]**o+(-0.961456282274)*x[0]+(-0.954972993457)*x[1]**o+(0.00963939708746)*x[1]+(-0.884848381277)*x[2]**o+(-0.859924591622)*x[2]
-        arg[0,1,0,1]=(0.133592941787)*x[0]**o+(0.12505415793)*x[0]+(-0.872197297559)*x[1]**o+(-0.666936976734)*x[1]+(-0.540166108036)*x[2]**o+(0.739145002101)*x[2]
-        arg[0,1,1,0]=(0.543825266564)*x[0]**o+(0.167854064952)*x[0]+(-0.876426395953)*x[1]**o+(0.317538118917)*x[1]+(0.0454531201303)*x[2]**o+(0.822731343286)*x[2]
-        arg[0,1,1,1]=(0.294557050513)*x[0]**o+(0.811698886899)*x[0]+(0.906213580147)*x[1]**o+(0.47895749797)*x[1]+(-0.937617554883)*x[2]**o+(0.171907458148)*x[2]
-        arg[0,1,2,0]=(-0.843310949654)*x[0]**o+(0.766452648675)*x[0]+(-0.801151193917)*x[1]**o+(-0.373068887299)*x[1]+(-0.908043738284)*x[2]**o+(0.742278324563)*x[2]
-        arg[0,1,2,1]=(-0.83259110525)*x[0]**o+(-0.303796015231)*x[0]+(0.153727560059)*x[1]**o+(-0.848393854019)*x[1]+(0.887795931916)*x[2]**o+(0.713486413074)*x[2]
-        arg[0,2,0,0]=(-0.928603918182)*x[0]**o+(0.631213545526)*x[0]+(0.0149216054247)*x[1]**o+(0.136454313226)*x[1]+(-0.182080277504)*x[2]**o+(-0.898437757742)*x[2]
-        arg[0,2,0,1]=(0.553844129645)*x[0]**o+(0.91439079798)*x[0]+(0.260424446678)*x[1]**o+(0.786629777779)*x[1]+(-0.412353876109)*x[2]**o+(0.496953000487)*x[2]
-        arg[0,2,1,0]=(-0.48365422571)*x[0]**o+(-0.772252454664)*x[0]+(0.692592845143)*x[1]**o+(0.861992232175)*x[1]+(0.65169271692)*x[2]**o+(0.889175716524)*x[2]
-        arg[0,2,1,1]=(-0.761086015475)*x[0]**o+(-0.616528617148)*x[0]+(-0.949399556926)*x[1]**o+(-0.783355074724)*x[1]+(-0.260470660608)*x[2]**o+(-0.854537542803)*x[2]
-        arg[0,2,2,0]=(-0.812649439778)*x[0]**o+(-0.844862957855)*x[0]+(0.719928253134)*x[1]**o+(-0.892803903061)*x[1]+(-0.434753054503)*x[2]**o+(0.814188548451)*x[2]
-        arg[0,2,2,1]=(-0.831106881173)*x[0]**o+(0.893305297647)*x[0]+(-0.351357795644)*x[1]**o+(0.0318574503478)*x[1]+(0.721896657873)*x[2]**o+(-0.75215838035)*x[2]
-        arg[0,3,0,0]=(-0.868084492214)*x[0]**o+(-0.108398365838)*x[0]+(0.994384983885)*x[1]**o+(0.199445529335)*x[1]+(-0.570120483013)*x[2]**o+(0.992752456282)*x[2]
-        arg[0,3,0,1]=(-0.304553428923)*x[0]**o+(-0.589461304318)*x[0]+(-0.570142565817)*x[1]**o+(-0.858530013475)*x[1]+(0.0690574539796)*x[2]**o+(-0.0321587525658)*x[2]
-        arg[0,3,1,0]=(-0.729413026954)*x[0]**o+(-0.728248951404)*x[0]+(-0.568598599095)*x[1]**o+(0.0823012989572)*x[1]+(0.248614424573)*x[2]**o+(-0.116584878805)*x[2]
-        arg[0,3,1,1]=(0.586846538084)*x[0]**o+(-0.406933529762)*x[0]+(0.839125682244)*x[1]**o+(0.237338453386)*x[1]+(-0.953101889056)*x[2]**o+(0.164147861616)*x[2]
-        arg[0,3,2,0]=(-0.603895026116)*x[0]**o+(-0.401045478885)*x[0]+(-0.524739550832)*x[1]**o+(-0.077907095917)*x[1]+(0.535404409567)*x[2]**o+(0.745721528391)*x[2]
-        arg[0,3,2,1]=(-0.189151084147)*x[0]**o+(-0.865927541126)*x[0]+(0.55265091657)*x[1]**o+(-0.592847311104)*x[1]+(-0.467509383222)*x[2]**o+(-0.779649276678)*x[2]
-        arg[0,4,0,0]=(-0.564283606569)*x[0]**o+(-0.588029571592)*x[0]+(0.544948665159)*x[1]**o+(0.140885576219)*x[1]+(-0.333531842397)*x[2]**o+(-0.579095398292)*x[2]
-        arg[0,4,0,1]=(-0.189127238455)*x[0]**o+(-0.693907127162)*x[0]+(0.40947793861)*x[1]**o+(-0.371098494308)*x[1]+(-0.189273002147)*x[2]**o+(-0.863169616331)*x[2]
-        arg[0,4,1,0]=(-0.929838141145)*x[0]**o+(-0.0237583231579)*x[0]+(0.721069982341)*x[1]**o+(0.0378559913864)*x[1]+(-0.354729434476)*x[2]**o+(0.486256042969)*x[2]
-        arg[0,4,1,1]=(0.349085173473)*x[0]**o+(0.398939355666)*x[0]+(-0.165772805366)*x[1]**o+(-0.532771334584)*x[1]+(-0.971868054413)*x[2]**o+(-0.38430185761)*x[2]
-        arg[0,4,2,0]=(0.0330282399287)*x[0]**o+(0.157336131691)*x[0]+(-0.232739262685)*x[1]**o+(-0.280149712596)*x[1]+(0.374058430291)*x[2]**o+(0.594113015973)*x[2]
-        arg[0,4,2,1]=(0.841740974112)*x[0]**o+(-0.454359680369)*x[0]+(-0.29970574726)*x[1]**o+(-0.234747232007)*x[1]+(0.590942390095)*x[2]**o+(-0.241807214234)*x[2]
-        arg[1,0,0,0]=(0.815585848775)*x[0]**o+(-0.915020392674)*x[0]+(-0.0246530790781)*x[1]**o+(-0.783552074981)*x[1]+(0.539847778607)*x[2]**o+(-0.239345161181)*x[2]
-        arg[1,0,0,1]=(-0.34212551354)*x[0]**o+(-0.231769108271)*x[0]+(-0.495709071836)*x[1]**o+(-0.301124823696)*x[1]+(-0.567450536966)*x[2]**o+(0.553640896859)*x[2]
-        arg[1,0,1,0]=(0.507091065517)*x[0]**o+(-0.844317985101)*x[0]+(0.488126307787)*x[1]**o+(-0.624165922596)*x[1]+(0.00960189690918)*x[2]**o+(-0.35617062688)*x[2]
-        arg[1,0,1,1]=(-0.219877421252)*x[0]**o+(-0.574843930095)*x[0]+(-0.846995760292)*x[1]**o+(-0.778496435041)*x[1]+(-0.817593097977)*x[2]**o+(0.387406829939)*x[2]
-        arg[1,0,2,0]=(-0.774922277048)*x[0]**o+(-0.238152671014)*x[0]+(-0.913770877808)*x[1]**o+(-0.737305937434)*x[1]+(-0.13977056904)*x[2]**o+(-0.0156668131016)*x[2]
-        arg[1,0,2,1]=(0.565993265911)*x[0]**o+(0.0690768496992)*x[0]+(-0.019845214223)*x[1]**o+(0.16253166701)*x[1]+(0.848117215885)*x[2]**o+(0.838075165243)*x[2]
-        arg[1,1,0,0]=(0.871499694148)*x[0]**o+(-0.640851595157)*x[0]+(-0.170827284611)*x[1]**o+(-0.855550549988)*x[1]+(0.796086141249)*x[2]**o+(-0.214410672377)*x[2]
-        arg[1,1,0,1]=(-0.903644604832)*x[0]**o+(0.0604780584681)*x[0]+(0.12800839523)*x[1]**o+(-0.594186752891)*x[1]+(0.415537334962)*x[2]**o+(0.122944611099)*x[2]
-        arg[1,1,1,0]=(-0.611432775957)*x[0]**o+(0.391078622669)*x[0]+(-0.943091949273)*x[1]**o+(0.952739057317)*x[1]+(0.205104161722)*x[2]**o+(-0.946040001739)*x[2]
-        arg[1,1,1,1]=(0.122941344579)*x[0]**o+(0.836981501711)*x[0]+(0.488970739079)*x[1]**o+(0.210062341907)*x[1]+(0.0264620393683)*x[2]**o+(-0.396386059797)*x[2]
-        arg[1,1,2,0]=(-0.782658774038)*x[0]**o+(0.00611865020069)*x[0]+(0.806802875462)*x[1]**o+(-0.504323859583)*x[1]+(0.796276800331)*x[2]**o+(-0.792865116401)*x[2]
-        arg[1,1,2,1]=(-0.249170081188)*x[0]**o+(-0.0234780571796)*x[0]+(-0.314017467872)*x[1]**o+(-0.0819148249592)*x[1]+(-0.71553368486)*x[2]**o+(0.763463207899)*x[2]
-        arg[1,2,0,0]=(-0.722263632571)*x[0]**o+(-0.922870211147)*x[0]+(0.380794419995)*x[1]**o+(-0.76088532378)*x[1]+(0.417253071012)*x[2]**o+(0.152980049966)*x[2]
-        arg[1,2,0,1]=(-0.667661997967)*x[0]**o+(-0.520570751147)*x[0]+(0.526368189149)*x[1]**o+(-0.0729376045288)*x[1]+(-0.434764684251)*x[2]**o+(0.124284939267)*x[2]
-        arg[1,2,1,0]=(0.610868035553)*x[0]**o+(0.958644088455)*x[0]+(0.876029854699)*x[1]**o+(-0.278348787699)*x[1]+(-0.576695356283)*x[2]**o+(-0.302696556744)*x[2]
-        arg[1,2,1,1]=(-0.224897853162)*x[0]**o+(0.89405397732)*x[0]+(-0.865281799513)*x[1]**o+(0.778866760053)*x[1]+(-0.939295291326)*x[2]**o+(0.256725768393)*x[2]
-        arg[1,2,2,0]=(0.763785330202)*x[0]**o+(-0.92861265304)*x[0]+(-0.73488309202)*x[1]**o+(0.912711310857)*x[1]+(-0.359622626692)*x[2]**o+(-0.901261216611)*x[2]
-        arg[1,2,2,1]=(-0.70687794303)*x[0]**o+(0.186497640523)*x[0]+(-0.587602932017)*x[1]**o+(0.439204174904)*x[1]+(0.0527573129765)*x[2]**o+(-0.121921819047)*x[2]
-        arg[1,3,0,0]=(-0.576513727689)*x[0]**o+(0.228971758182)*x[0]+(0.282735129059)*x[1]**o+(-0.375270097915)*x[1]+(0.360087142563)*x[2]**o+(-0.0629946372113)*x[2]
-        arg[1,3,0,1]=(-0.934375471561)*x[0]**o+(-0.710481522462)*x[0]+(-0.506438555546)*x[1]**o+(0.515278994703)*x[1]+(-0.789552111338)*x[2]**o+(0.556694887963)*x[2]
-        arg[1,3,1,0]=(0.418081142778)*x[0]**o+(-0.990334755424)*x[0]+(0.465998147831)*x[1]**o+(0.85211792131)*x[1]+(0.64293315455)*x[2]**o+(0.418636667223)*x[2]
-        arg[1,3,1,1]=(-0.192682640907)*x[0]**o+(-0.367176463246)*x[0]+(-0.512565915338)*x[1]**o+(0.431102518715)*x[1]+(-0.0213613616827)*x[2]**o+(-0.329868944656)*x[2]
-        arg[1,3,2,0]=(-0.63277285658)*x[0]**o+(0.679819079734)*x[0]+(0.986520110022)*x[1]**o+(0.988046257154)*x[1]+(0.973419900492)*x[2]**o+(-0.177540534942)*x[2]
-        arg[1,3,2,1]=(-0.660456888389)*x[0]**o+(0.546277948387)*x[0]+(-0.437065207396)*x[1]**o+(-0.310754727958)*x[1]+(-0.786950057282)*x[2]**o+(0.959526365177)*x[2]
-        arg[1,4,0,0]=(0.764190976082)*x[0]**o+(0.970535029727)*x[0]+(0.389051006993)*x[1]**o+(-0.289346925704)*x[1]+(-0.386263606576)*x[2]**o+(0.624234063589)*x[2]
-        arg[1,4,0,1]=(-0.982030683687)*x[0]**o+(-0.310500292581)*x[0]+(-0.559096285575)*x[1]**o+(-0.622541272039)*x[1]+(0.49924233081)*x[2]**o+(-0.219258681197)*x[2]
-        arg[1,4,1,0]=(-0.124268932891)*x[0]**o+(0.102696501388)*x[0]+(-0.135123912862)*x[1]**o+(-0.960215132796)*x[1]+(-0.63171550556)*x[2]**o+(-0.493725285999)*x[2]
-        arg[1,4,1,1]=(-0.397915436399)*x[0]**o+(-0.629822230732)*x[0]+(-0.65097233947)*x[1]**o+(0.915396047247)*x[1]+(0.835684562564)*x[2]**o+(-0.538096550078)*x[2]
-        arg[1,4,2,0]=(-0.946429448216)*x[0]**o+(-0.310412085571)*x[0]+(-0.0984587257278)*x[1]**o+(-0.662090989911)*x[1]+(-0.424711481307)*x[2]**o+(0.00916879493127)*x[2]
-        arg[1,4,2,1]=(0.919399549311)*x[0]**o+(-0.890110018315)*x[0]+(-0.685928475328)*x[1]**o+(-0.4731186395)*x[1]+(0.961887038718)*x[2]**o+(0.850957316131)*x[2]
-        arg[2,0,0,0]=(0.834851801283)*x[0]**o+(-0.401572429371)*x[0]+(0.313309302528)*x[1]**o+(0.0368590314435)*x[1]+(-0.299807168778)*x[2]**o+(0.250599904818)*x[2]
-        arg[2,0,0,1]=(-0.717562866174)*x[0]**o+(0.374797888506)*x[0]+(0.254329847579)*x[1]**o+(-0.987429692718)*x[1]+(-0.886758521324)*x[2]**o+(0.309486900444)*x[2]
-        arg[2,0,1,0]=(0.139962143021)*x[0]**o+(-0.134735774213)*x[0]+(-0.231254041503)*x[1]**o+(0.0694785371931)*x[1]+(0.769929630132)*x[2]**o+(0.486646094292)*x[2]
-        arg[2,0,1,1]=(0.349691701871)*x[0]**o+(-0.0308285150496)*x[0]+(0.00977143515921)*x[1]**o+(0.0970015800122)*x[1]+(-0.725991176667)*x[2]**o+(0.433663449433)*x[2]
-        arg[2,0,2,0]=(0.564474039592)*x[0]**o+(0.950620065312)*x[0]+(0.256658075134)*x[1]**o+(0.774458453189)*x[1]+(0.00181734756534)*x[2]**o+(-0.270638852561)*x[2]
-        arg[2,0,2,1]=(-0.175813811707)*x[0]**o+(0.821341326493)*x[0]+(-0.464966990893)*x[1]**o+(-0.310747066257)*x[1]+(-0.413557861251)*x[2]**o+(-0.799160067701)*x[2]
-        arg[2,1,0,0]=(-0.449817381621)*x[0]**o+(-0.0573780378383)*x[0]+(-0.22675349133)*x[1]**o+(-0.150314340624)*x[1]+(-0.116693721705)*x[2]**o+(-0.20577625675)*x[2]
-        arg[2,1,0,1]=(0.955318430674)*x[0]**o+(-0.148100168239)*x[0]+(0.741705440574)*x[1]**o+(-0.0768022054634)*x[1]+(-0.721807872287)*x[2]**o+(-0.898235041116)*x[2]
-        arg[2,1,1,0]=(-0.183120810472)*x[0]**o+(0.307305712226)*x[0]+(0.699835684443)*x[1]**o+(0.964082351856)*x[1]+(-0.0348051023458)*x[2]**o+(0.544435382916)*x[2]
-        arg[2,1,1,1]=(0.786862912642)*x[0]**o+(0.37388939814)*x[0]+(0.608937302857)*x[1]**o+(0.122305286217)*x[1]+(-0.892536849678)*x[2]**o+(0.119257478145)*x[2]
-        arg[2,1,2,0]=(0.758154908623)*x[0]**o+(0.695188856067)*x[0]+(0.458313343957)*x[1]**o+(0.979157471455)*x[1]+(0.194237063725)*x[2]**o+(0.773001101454)*x[2]
-        arg[2,1,2,1]=(0.0754678814151)*x[0]**o+(-0.639556181007)*x[0]+(0.934627102078)*x[1]**o+(0.0832082572611)*x[1]+(0.668822756858)*x[2]**o+(0.627532210297)*x[2]
-        arg[2,2,0,0]=(-0.192921889174)*x[0]**o+(0.989703287553)*x[0]+(0.00517568784693)*x[1]**o+(-0.360076937731)*x[1]+(0.947056110784)*x[2]**o+(0.469841550381)*x[2]
-        arg[2,2,0,1]=(0.201501669595)*x[0]**o+(-0.959957961834)*x[0]+(0.0229159090152)*x[1]**o+(0.396188263084)*x[1]+(0.186211667989)*x[2]**o+(0.304503474778)*x[2]
-        arg[2,2,1,0]=(0.333974995608)*x[0]**o+(0.210202867626)*x[0]+(-0.410565897643)*x[1]**o+(0.52659985644)*x[1]+(0.983960564934)*x[2]**o+(-0.439323691866)*x[2]
-        arg[2,2,1,1]=(0.706119074329)*x[0]**o+(-0.00220875175563)*x[0]+(0.143693169123)*x[1]**o+(0.217254593235)*x[1]+(-0.412057975252)*x[2]**o+(-0.967360361422)*x[2]
-        arg[2,2,2,0]=(0.217307356597)*x[0]**o+(0.861728452163)*x[0]+(-0.193239462241)*x[1]**o+(0.872273176526)*x[1]+(-0.436414721507)*x[2]**o+(-0.62398425635)*x[2]
-        arg[2,2,2,1]=(0.467099668794)*x[0]**o+(0.109742400918)*x[0]+(-0.987522191801)*x[1]**o+(-0.250251964275)*x[1]+(0.442152166523)*x[2]**o+(-0.709157679576)*x[2]
-        arg[2,3,0,0]=(0.769666242031)*x[0]**o+(0.2352745864)*x[0]+(-0.302893533611)*x[1]**o+(0.0806677655098)*x[1]+(0.886434893279)*x[2]**o+(0.366016417047)*x[2]
-        arg[2,3,0,1]=(-0.612204706187)*x[0]**o+(-0.242961993133)*x[0]+(0.946225816441)*x[1]**o+(0.528642650581)*x[1]+(-0.0166837450337)*x[2]**o+(-0.0889397945206)*x[2]
-        arg[2,3,1,0]=(0.218589745288)*x[0]**o+(-0.296125811204)*x[0]+(0.358743045538)*x[1]**o+(-0.945778818656)*x[1]+(-0.33155158646)*x[2]**o+(-0.293038455557)*x[2]
-        arg[2,3,1,1]=(0.753737723433)*x[0]**o+(-0.772926141856)*x[0]+(-0.0107183417902)*x[1]**o+(0.125538612735)*x[1]+(0.225277420156)*x[2]**o+(-0.54876651451)*x[2]
-        arg[2,3,2,0]=(0.947419453319)*x[0]**o+(-0.101935160067)*x[0]+(0.481841505589)*x[1]**o+(-0.873842146032)*x[1]+(-0.377764402402)*x[2]**o+(-0.361560947647)*x[2]
-        arg[2,3,2,1]=(0.745703609187)*x[0]**o+(-0.488401078192)*x[0]+(0.190261500318)*x[1]**o+(-0.22176180212)*x[1]+(0.80182740764)*x[2]**o+(-0.504953098351)*x[2]
-        arg[2,4,0,0]=(0.476355625206)*x[0]**o+(0.452225231178)*x[0]+(0.669315429911)*x[1]**o+(0.159511010158)*x[1]+(0.652056592943)*x[2]**o+(0.44515033609)*x[2]
-        arg[2,4,0,1]=(0.512194809916)*x[0]**o+(0.654452558318)*x[0]+(-0.526832882528)*x[1]**o+(0.590859897981)*x[1]+(-0.155989159043)*x[2]**o+(-0.689178072559)*x[2]
-        arg[2,4,1,0]=(0.0450244624553)*x[0]**o+(0.0790299000335)*x[0]+(-0.690643908994)*x[1]**o+(-0.262426911912)*x[1]+(-0.426935471303)*x[2]**o+(-0.434570506153)*x[2]
-        arg[2,4,1,1]=(-0.04445890079)*x[0]**o+(-0.541574770252)*x[0]+(-0.879290270122)*x[1]**o+(0.545302743626)*x[1]+(-0.836472565261)*x[2]**o+(0.66750272736)*x[2]
-        arg[2,4,2,0]=(-0.477788509677)*x[0]**o+(0.706195950613)*x[0]+(0.628430029293)*x[1]**o+(-0.297608932813)*x[1]+(0.38364501438)*x[2]**o+(0.855444938831)*x[2]
-        arg[2,4,2,1]=(0.123183000451)*x[0]**o+(0.41176132265)*x[0]+(-0.379498883356)*x[1]**o+(-0.53442961658)*x[1]+(-0.101215056317)*x[2]**o+(0.247971839461)*x[2]
-        arg[3,0,0,0]=(-0.239170701904)*x[0]**o+(0.369420936359)*x[0]+(0.972913513036)*x[1]**o+(0.775248415403)*x[1]+(-0.850310640223)*x[2]**o+(-0.815345534491)*x[2]
-        arg[3,0,0,1]=(0.591124498004)*x[0]**o+(0.529522171858)*x[0]+(-0.974005221641)*x[1]**o+(0.430102201571)*x[1]+(0.570519406976)*x[2]**o+(-0.0915083364671)*x[2]
-        arg[3,0,1,0]=(-0.27678065557)*x[0]**o+(-0.53225308602)*x[0]+(0.902356190541)*x[1]**o+(-0.564808732046)*x[1]+(0.0981283775668)*x[2]**o+(-0.64957631107)*x[2]
-        arg[3,0,1,1]=(0.230523873408)*x[0]**o+(-0.382745197262)*x[0]+(0.41507101812)*x[1]**o+(0.48492708335)*x[1]+(-0.11672353881)*x[2]**o+(-0.56902283397)*x[2]
-        arg[3,0,2,0]=(-0.400023140104)*x[0]**o+(-0.406234012546)*x[0]+(-0.17810623045)*x[1]**o+(-0.833748300281)*x[1]+(-0.463689953863)*x[2]**o+(-0.11095482465)*x[2]
-        arg[3,0,2,1]=(0.448885918108)*x[0]**o+(0.0447046792888)*x[0]+(-0.781652457281)*x[1]**o+(-0.893726375109)*x[1]+(0.918099233406)*x[2]**o+(0.560717614604)*x[2]
-        arg[3,1,0,0]=(0.046700262853)*x[0]**o+(0.729867044213)*x[0]+(-0.870868205823)*x[1]**o+(-0.711267787629)*x[1]+(0.760550112312)*x[2]**o+(-0.0188334901698)*x[2]
-        arg[3,1,0,1]=(0.304305551549)*x[0]**o+(-0.73527291962)*x[0]+(0.722134673974)*x[1]**o+(-0.40822784698)*x[1]+(0.912464122456)*x[2]**o+(-0.857656020349)*x[2]
-        arg[3,1,1,0]=(-0.857864508282)*x[0]**o+(-0.22160002809)*x[0]+(-0.0892530574233)*x[1]**o+(-0.547259900671)*x[1]+(0.641858628113)*x[2]**o+(-0.203700292205)*x[2]
-        arg[3,1,1,1]=(-0.47064403668)*x[0]**o+(-0.105885697358)*x[0]+(-0.899570240486)*x[1]**o+(0.660942689756)*x[1]+(-0.365836826289)*x[2]**o+(0.9593955249)*x[2]
-        arg[3,1,2,0]=(-0.51407433496)*x[0]**o+(0.369092182634)*x[0]+(-0.740281092517)*x[1]**o+(0.383443939366)*x[1]+(-0.140318759419)*x[2]**o+(-0.481274651104)*x[2]
-        arg[3,1,2,1]=(-0.938924125636)*x[0]**o+(0.41994781084)*x[0]+(-0.946320511542)*x[1]**o+(-0.86702606561)*x[1]+(0.63547569926)*x[2]**o+(0.923988068696)*x[2]
-        arg[3,2,0,0]=(0.212833889165)*x[0]**o+(-0.0823077975238)*x[0]+(0.038483237489)*x[1]**o+(0.393784376623)*x[1]+(0.573190557103)*x[2]**o+(0.403015743632)*x[2]
-        arg[3,2,0,1]=(-0.169294531943)*x[0]**o+(-0.769228919251)*x[0]+(-0.907462814057)*x[1]**o+(-0.188574782291)*x[1]+(-0.859793027531)*x[2]**o+(-0.673334626964)*x[2]
-        arg[3,2,1,0]=(0.646744388517)*x[0]**o+(0.346749855021)*x[0]+(-0.314382791156)*x[1]**o+(-0.0396545336605)*x[1]+(0.844678566939)*x[2]**o+(0.724721336727)*x[2]
-        arg[3,2,1,1]=(-0.471761417345)*x[0]**o+(-0.801631597222)*x[0]+(-0.376444012893)*x[1]**o+(0.920939382926)*x[1]+(-0.728019331398)*x[2]**o+(0.905808341144)*x[2]
-        arg[3,2,2,0]=(-0.713759272803)*x[0]**o+(-0.930638013429)*x[0]+(0.864451879958)*x[1]**o+(0.0566794358824)*x[1]+(-0.292092226905)*x[2]**o+(-0.195695530268)*x[2]
-        arg[3,2,2,1]=(0.843437618194)*x[0]**o+(0.214911962718)*x[0]+(0.475690162826)*x[1]**o+(0.0744570063618)*x[1]+(0.351711310616)*x[2]**o+(-0.187223450548)*x[2]
-        arg[3,3,0,0]=(0.108651500878)*x[0]**o+(-0.402624590847)*x[0]+(0.120700159277)*x[1]**o+(-0.363139807635)*x[1]+(-0.62413441951)*x[2]**o+(-0.474236131596)*x[2]
-        arg[3,3,0,1]=(-0.0836636547536)*x[0]**o+(-0.187959781777)*x[0]+(0.756983584308)*x[1]**o+(0.756573839599)*x[1]+(0.195640878564)*x[2]**o+(-0.566596474032)*x[2]
-        arg[3,3,1,0]=(-0.171427844449)*x[0]**o+(-0.266807792484)*x[0]+(0.380046037965)*x[1]**o+(-0.129297371793)*x[1]+(0.79139100315)*x[2]**o+(0.223804751067)*x[2]
-        arg[3,3,1,1]=(-0.054757303264)*x[0]**o+(-0.823878124196)*x[0]+(0.80695256107)*x[1]**o+(0.583250192211)*x[1]+(0.894937939133)*x[2]**o+(0.878757173892)*x[2]
-        arg[3,3,2,0]=(0.13923802434)*x[0]**o+(-0.600732296834)*x[0]+(0.111226716676)*x[1]**o+(-0.474524749496)*x[1]+(0.674290476359)*x[2]**o+(-0.06714767759)*x[2]
-        arg[3,3,2,1]=(0.246187769682)*x[0]**o+(-0.871969439162)*x[0]+(0.56748693564)*x[1]**o+(-0.0831774328079)*x[1]+(-0.27380467532)*x[2]**o+(-0.623711953244)*x[2]
-        arg[3,4,0,0]=(-0.345947366312)*x[0]**o+(-0.304842609526)*x[0]+(-0.720722450633)*x[1]**o+(0.889712922756)*x[1]+(-0.0451362945237)*x[2]**o+(-0.52344522887)*x[2]
-        arg[3,4,0,1]=(-0.830119647904)*x[0]**o+(0.577888363835)*x[0]+(0.180691945154)*x[1]**o+(-0.489554894073)*x[1]+(0.848489044545)*x[2]**o+(-0.243139985297)*x[2]
-        arg[3,4,1,0]=(0.846597693999)*x[0]**o+(0.757477455396)*x[0]+(-0.827604908657)*x[1]**o+(-0.108392312717)*x[1]+(0.597454707613)*x[2]**o+(0.35846243312)*x[2]
-        arg[3,4,1,1]=(0.107973753109)*x[0]**o+(0.578649460223)*x[0]+(0.609012033524)*x[1]**o+(-0.8428861922)*x[1]+(0.42144759968)*x[2]**o+(-0.938952208084)*x[2]
-        arg[3,4,2,0]=(0.286586330618)*x[0]**o+(0.7324646289)*x[0]+(-0.448461377611)*x[1]**o+(0.62562408085)*x[1]+(0.352429283116)*x[2]**o+(0.112047034296)*x[2]
-        arg[3,4,2,1]=(-0.431663387082)*x[0]**o+(-0.612934322552)*x[0]+(-0.426644797074)*x[1]**o+(0.768645027094)*x[1]+(-0.453242885757)*x[2]**o+(0.893748345809)*x[2]
-        ref[0,0,0,0]=(-1.2147562394)*(1+2.*(dim-1.)/(o+1.))+(1.47471604216)*dim
-        ref[0,0,0,1]=(-0.283261030731)*(1+2.*(dim-1.)/(o+1.))+(0.49706944223)*dim
-        ref[0,0,1,0]=(-0.963543225803)*(1+2.*(dim-1.)/(o+1.))+(0.302115929232)*dim
-        ref[0,0,1,1]=(1.47597923019)*(1+2.*(dim-1.)/(o+1.))+(0.302975596116)*dim
-        ref[0,0,2,0]=(2.07218071265)*(1+2.*(dim-1.)/(o+1.))+(1.40474756312)*dim
-        ref[0,0,2,1]=(1.18935174934)*(1+2.*(dim-1.)/(o+1.))+(-0.898949809002)*dim
-        ref[0,1,0,0]=(-2.71454215957)*(1+2.*(dim-1.)/(o+1.))+(-1.81174147681)*dim
-        ref[0,1,0,1]=(-1.27877046381)*(1+2.*(dim-1.)/(o+1.))+(0.197262183297)*dim
-        ref[0,1,1,0]=(-0.287148009258)*(1+2.*(dim-1.)/(o+1.))+(1.30812352716)*dim
-        ref[0,1,1,1]=(0.263153075777)*(1+2.*(dim-1.)/(o+1.))+(1.46256384302)*dim
-        ref[0,1,2,0]=(-2.55250588186)*(1+2.*(dim-1.)/(o+1.))+(1.13566208594)*dim
-        ref[0,1,2,1]=(0.208932386724)*(1+2.*(dim-1.)/(o+1.))+(-0.438703456176)*dim
-        ref[0,2,0,0]=(-1.09576259026)*(1+2.*(dim-1.)/(o+1.))+(-0.13076989899)*dim
-        ref[0,2,0,1]=(0.401914700214)*(1+2.*(dim-1.)/(o+1.))+(2.19797357625)*dim
-        ref[0,2,1,0]=(0.860631336354)*(1+2.*(dim-1.)/(o+1.))+(0.978915494035)*dim
-        ref[0,2,1,1]=(-1.97095623301)*(1+2.*(dim-1.)/(o+1.))+(-2.25442123467)*dim
-        ref[0,2,2,0]=(-0.527474241147)*(1+2.*(dim-1.)/(o+1.))+(-0.923478312465)*dim
-        ref[0,2,2,1]=(-0.460568018944)*(1+2.*(dim-1.)/(o+1.))+(0.173004367644)*dim
-        ref[0,3,0,0]=(-0.443819991343)*(1+2.*(dim-1.)/(o+1.))+(1.08379961978)*dim
-        ref[0,3,0,1]=(-0.80563854076)*(1+2.*(dim-1.)/(o+1.))+(-1.48015007036)*dim
-        ref[0,3,1,0]=(-1.04939720148)*(1+2.*(dim-1.)/(o+1.))+(-0.762532531252)*dim
-        ref[0,3,1,1]=(0.472870331273)*(1+2.*(dim-1.)/(o+1.))+(-0.00544721475928)*dim
-        ref[0,3,2,0]=(-0.593230167381)*(1+2.*(dim-1.)/(o+1.))+(0.26676895359)*dim
-        ref[0,3,2,1]=(-0.104009550799)*(1+2.*(dim-1.)/(o+1.))+(-2.23842412891)*dim
-        ref[0,4,0,0]=(-0.352866783806)*(1+2.*(dim-1.)/(o+1.))+(-1.02623939367)*dim
-        ref[0,4,0,1]=(0.0310776980081)*(1+2.*(dim-1.)/(o+1.))+(-1.9281752378)*dim
-        ref[0,4,1,0]=(-0.56349759328)*(1+2.*(dim-1.)/(o+1.))+(0.500353711197)*dim
-        ref[0,4,1,1]=(-0.788555686306)*(1+2.*(dim-1.)/(o+1.))+(-0.518133836527)*dim
-        ref[0,4,2,0]=(0.174347407535)*(1+2.*(dim-1.)/(o+1.))+(0.471299435068)*dim
-        ref[0,4,2,1]=(1.13297761695)*(1+2.*(dim-1.)/(o+1.))+(-0.93091412661)*dim
-        ref[1,0,0,0]=(1.3307805483)*(1+2.*(dim-1.)/(o+1.))+(-1.93791762884)*dim
-        ref[1,0,0,1]=(-1.40528512234)*(1+2.*(dim-1.)/(o+1.))+(0.0207469648915)*dim
-        ref[1,0,1,0]=(1.00481927021)*(1+2.*(dim-1.)/(o+1.))+(-1.82465453458)*dim
-        ref[1,0,1,1]=(-1.88446627952)*(1+2.*(dim-1.)/(o+1.))+(-0.965933535196)*dim
-        ref[1,0,2,0]=(-1.8284637239)*(1+2.*(dim-1.)/(o+1.))+(-0.991125421549)*dim
-        ref[1,0,2,1]=(1.39426526757)*(1+2.*(dim-1.)/(o+1.))+(1.06968368195)*dim
-        ref[1,1,0,0]=(1.49675855079)*(1+2.*(dim-1.)/(o+1.))+(-1.71081281752)*dim
-        ref[1,1,0,1]=(-0.36009887464)*(1+2.*(dim-1.)/(o+1.))+(-0.410764083324)*dim
-        ref[1,1,1,0]=(-1.34942056351)*(1+2.*(dim-1.)/(o+1.))+(0.397777678247)*dim
-        ref[1,1,1,1]=(0.638374123027)*(1+2.*(dim-1.)/(o+1.))+(0.650657783821)*dim
-        ref[1,1,2,0]=(0.820420901755)*(1+2.*(dim-1.)/(o+1.))+(-1.29107032578)*dim
-        ref[1,1,2,1]=(-1.27872123392)*(1+2.*(dim-1.)/(o+1.))+(0.65807032576)*dim
-        ref[1,2,0,0]=(0.075783858436)*(1+2.*(dim-1.)/(o+1.))+(-1.53077548496)*dim
-        ref[1,2,0,1]=(-0.576058493068)*(1+2.*(dim-1.)/(o+1.))+(-0.469223416409)*dim
-        ref[1,2,1,0]=(0.91020253397)*(1+2.*(dim-1.)/(o+1.))+(0.377598744012)*dim
-        ref[1,2,1,1]=(-2.029474944)*(1+2.*(dim-1.)/(o+1.))+(1.92964650577)*dim
-        ref[1,2,2,0]=(-0.330720388509)*(1+2.*(dim-1.)/(o+1.))+(-0.917162558794)*dim
-        ref[1,2,2,1]=(-1.24172356207)*(1+2.*(dim-1.)/(o+1.))+(0.503779996381)*dim
-        ref[1,3,0,0]=(0.0663085439332)*(1+2.*(dim-1.)/(o+1.))+(-0.209292976945)*dim
-        ref[1,3,0,1]=(-2.23036613844)*(1+2.*(dim-1.)/(o+1.))+(0.361492360204)*dim
-        ref[1,3,1,0]=(1.52701244516)*(1+2.*(dim-1.)/(o+1.))+(0.280419833109)*dim
-        ref[1,3,1,1]=(-0.726609917928)*(1+2.*(dim-1.)/(o+1.))+(-0.265942889187)*dim
-        ref[1,3,2,0]=(1.32716715393)*(1+2.*(dim-1.)/(o+1.))+(1.49032480195)*dim
-        ref[1,3,2,1]=(-1.88447215307)*(1+2.*(dim-1.)/(o+1.))+(1.19504958561)*dim
-        ref[1,4,0,0]=(0.766978376499)*(1+2.*(dim-1.)/(o+1.))+(1.30542216761)*dim
-        ref[1,4,0,1]=(-1.04188463845)*(1+2.*(dim-1.)/(o+1.))+(-1.15230024582)*dim
-        ref[1,4,1,0]=(-0.891108351313)*(1+2.*(dim-1.)/(o+1.))+(-1.35124391741)*dim
-        ref[1,4,1,1]=(-0.213203213304)*(1+2.*(dim-1.)/(o+1.))+(-0.252522733564)*dim
-        ref[1,4,2,0]=(-1.46959965525)*(1+2.*(dim-1.)/(o+1.))+(-0.963334280551)*dim
-        ref[1,4,2,1]=(1.1953581127)*(1+2.*(dim-1.)/(o+1.))+(-0.512271341684)*dim
-        ref[2,0,0,0]=(0.848353935033)*(1+2.*(dim-1.)/(o+1.))+(-0.11411349311)*dim
-        ref[2,0,0,1]=(-1.34999153992)*(1+2.*(dim-1.)/(o+1.))+(-0.303144903768)*dim
-        ref[2,0,1,0]=(0.67863773165)*(1+2.*(dim-1.)/(o+1.))+(0.421388857272)*dim
-        ref[2,0,1,1]=(-0.366528039637)*(1+2.*(dim-1.)/(o+1.))+(0.499836514396)*dim
-        ref[2,0,2,0]=(0.822949462292)*(1+2.*(dim-1.)/(o+1.))+(1.45443966594)*dim
-        ref[2,0,2,1]=(-1.05433866385)*(1+2.*(dim-1.)/(o+1.))+(-0.288565807465)*dim
-        ref[2,1,0,0]=(-0.793264594657)*(1+2.*(dim-1.)/(o+1.))+(-0.413468635212)*dim
-        ref[2,1,0,1]=(0.975215998961)*(1+2.*(dim-1.)/(o+1.))+(-1.12313741482)*dim
-        ref[2,1,1,0]=(0.481909771625)*(1+2.*(dim-1.)/(o+1.))+(1.815823447)*dim
-        ref[2,1,1,1]=(0.503263365821)*(1+2.*(dim-1.)/(o+1.))+(0.615452162503)*dim
-        ref[2,1,2,0]=(1.41070531631)*(1+2.*(dim-1.)/(o+1.))+(2.44734742898)*dim
-        ref[2,1,2,1]=(1.67891774035)*(1+2.*(dim-1.)/(o+1.))+(0.0711842865505)*dim
-        ref[2,2,0,0]=(0.759309909457)*(1+2.*(dim-1.)/(o+1.))+(1.0994679002)*dim
-        ref[2,2,0,1]=(0.410629246599)*(1+2.*(dim-1.)/(o+1.))+(-0.259266223972)*dim
-        ref[2,2,1,0]=(0.907369662899)*(1+2.*(dim-1.)/(o+1.))+(0.297479032201)*dim
-        ref[2,2,1,1]=(0.437754268199)*(1+2.*(dim-1.)/(o+1.))+(-0.752314519943)*dim
-        ref[2,2,2,0]=(-0.412346827151)*(1+2.*(dim-1.)/(o+1.))+(1.11001737234)*dim
-        ref[2,2,2,1]=(-0.0782703564833)*(1+2.*(dim-1.)/(o+1.))+(-0.849667242932)*dim
-        ref[2,3,0,0]=(1.3532076017)*(1+2.*(dim-1.)/(o+1.))+(0.681958768956)*dim
-        ref[2,3,0,1]=(0.317337365221)*(1+2.*(dim-1.)/(o+1.))+(0.196740862928)*dim
-        ref[2,3,1,0]=(0.245781204366)*(1+2.*(dim-1.)/(o+1.))+(-1.53494308542)*dim
-        ref[2,3,1,1]=(0.968296801799)*(1+2.*(dim-1.)/(o+1.))+(-1.19615404363)*dim
-        ref[2,3,2,0]=(1.05149655651)*(1+2.*(dim-1.)/(o+1.))+(-1.33733825375)*dim
-        ref[2,3,2,1]=(1.73779251715)*(1+2.*(dim-1.)/(o+1.))+(-1.21511597866)*dim
-        ref[2,4,0,0]=(1.79772764806)*(1+2.*(dim-1.)/(o+1.))+(1.05688657743)*dim
-        ref[2,4,0,1]=(-0.170627231654)*(1+2.*(dim-1.)/(o+1.))+(0.55613438374)*dim
-        ref[2,4,1,0]=(-1.07255491784)*(1+2.*(dim-1.)/(o+1.))+(-0.617967518031)*dim
-        ref[2,4,1,1]=(-1.76022173617)*(1+2.*(dim-1.)/(o+1.))+(0.671230700733)*dim
-        ref[2,4,2,0]=(0.534286533995)*(1+2.*(dim-1.)/(o+1.))+(1.26403195663)*dim
-        ref[2,4,2,1]=(-0.357530939222)*(1+2.*(dim-1.)/(o+1.))+(0.12530354553)*dim
-        ref[3,0,0,0]=(-0.11656782909)*(1+2.*(dim-1.)/(o+1.))+(0.32932381727)*dim
-        ref[3,0,0,1]=(0.187638683339)*(1+2.*(dim-1.)/(o+1.))+(0.868116036962)*dim
-        ref[3,0,1,0]=(0.723703912538)*(1+2.*(dim-1.)/(o+1.))+(-1.74663812914)*dim
-        ref[3,0,1,1]=(0.528871352717)*(1+2.*(dim-1.)/(o+1.))+(-0.466840947882)*dim
-        ref[3,0,2,0]=(-1.04181932442)*(1+2.*(dim-1.)/(o+1.))+(-1.35093713748)*dim
-        ref[3,0,2,1]=(0.585332694234)*(1+2.*(dim-1.)/(o+1.))+(-0.288304081216)*dim
-        ref[3,1,0,0]=(-0.0636178306576)*(1+2.*(dim-1.)/(o+1.))+(-0.000234233586678)*dim
-        ref[3,1,0,1]=(1.93890434798)*(1+2.*(dim-1.)/(o+1.))+(-2.00115678695)*dim
-        ref[3,1,1,0]=(-0.305258937592)*(1+2.*(dim-1.)/(o+1.))+(-0.972560220966)*dim
-        ref[3,1,1,1]=(-1.73605110346)*(1+2.*(dim-1.)/(o+1.))+(1.5144525173)*dim
-        ref[3,1,2,0]=(-1.3946741869)*(1+2.*(dim-1.)/(o+1.))+(0.271261470896)*dim
-        ref[3,1,2,1]=(-1.24976893792)*(1+2.*(dim-1.)/(o+1.))+(0.476909813927)*dim
-        ref[3,2,0,0]=(0.824507683756)*(1+2.*(dim-1.)/(o+1.))+(0.71449232273)*dim
-        ref[3,2,0,1]=(-1.93655037353)*(1+2.*(dim-1.)/(o+1.))+(-1.63113832851)*dim
-        ref[3,2,1,0]=(1.1770401643)*(1+2.*(dim-1.)/(o+1.))+(1.03181665809)*dim
-        ref[3,2,1,1]=(-1.57622476164)*(1+2.*(dim-1.)/(o+1.))+(1.02511612685)*dim
-        ref[3,2,2,0]=(-0.141399619749)*(1+2.*(dim-1.)/(o+1.))+(-1.06965410781)*dim
-        ref[3,2,2,1]=(1.67083909164)*(1+2.*(dim-1.)/(o+1.))+(0.102145518531)*dim
-        ref[3,3,0,0]=(-0.394782759355)*(1+2.*(dim-1.)/(o+1.))+(-1.24000053008)*dim
-        ref[3,3,0,1]=(0.868960808118)*(1+2.*(dim-1.)/(o+1.))+(0.00201758379073)*dim
-        ref[3,3,1,0]=(1.00000919667)*(1+2.*(dim-1.)/(o+1.))+(-0.17230041321)*dim
-        ref[3,3,1,1]=(1.64713319694)*(1+2.*(dim-1.)/(o+1.))+(0.638129241907)*dim
-        ref[3,3,2,0]=(0.924755217374)*(1+2.*(dim-1.)/(o+1.))+(-1.14240472392)*dim
-        ref[3,3,2,1]=(0.539870030002)*(1+2.*(dim-1.)/(o+1.))+(-1.57885882521)*dim
-        ref[3,4,0,0]=(-1.11180611147)*(1+2.*(dim-1.)/(o+1.))+(0.0614250843596)*dim
-        ref[3,4,0,1]=(0.199061341795)*(1+2.*(dim-1.)/(o+1.))+(-0.154806515534)*dim
-        ref[3,4,1,0]=(0.616447492955)*(1+2.*(dim-1.)/(o+1.))+(1.0075475758)*dim
-        ref[3,4,1,1]=(1.13843338631)*(1+2.*(dim-1.)/(o+1.))+(-1.20318894006)*dim
-        ref[3,4,2,0]=(0.190554236123)*(1+2.*(dim-1.)/(o+1.))+(1.47013574405)*dim
-        ref[3,4,2,1]=(-1.31155106991)*(1+2.*(dim-1.)/(o+1.))+(1.04945905035)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the 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.416878137535)*x[0]**o+(0.0809721296208)*x[0]+(-0.275084069478)*x[1]**o+(-0.704226656249)*x[1]
-        ref=(0.141794068057)*(1+2.*(dim-1.)/(o+1.))+(-0.623254526628)*dim
-      else:
-        arg=(0.587142789605)*x[0]**o+(0.894018391929)*x[0]+(-0.417709558814)*x[1]**o+(0.0970658484968)*x[1]+(-0.840982437679)*x[2]**o+(-0.400242562091)*x[2]
-        ref=(-0.671549206889)*(1+2.*(dim-1.)/(o+1.))+(0.590841678335)*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 the 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.051335729494)*x[0]**o+(0.257057962305)*x[0]+(0.00794214446212)*x[1]**o+(0.52307365061)*x[1]
-        arg[1]=(0.419915493803)*x[0]**o+(-0.0105826268931)*x[0]+(0.369274332127)*x[1]**o+(0.340796701053)*x[1]
-        ref[0]=(0.0592778739561)*(1+2.*(dim-1.)/(o+1.))+(0.780131612915)*dim
-        ref[1]=(0.789189825931)*(1+2.*(dim-1.)/(o+1.))+(0.33021407416)*dim
-      else:
-        arg[0]=(-0.483302491019)*x[0]**o+(0.223892398776)*x[0]+(-0.555612541317)*x[1]**o+(0.75535374219)*x[1]+(-0.208573228788)*x[2]**o+(0.479879212564)*x[2]
-        arg[1]=(-0.012341185885)*x[0]**o+(-0.959474230066)*x[0]+(0.397671123434)*x[1]**o+(-0.120340696903)*x[1]+(-0.645757653205)*x[2]**o+(-0.216057959957)*x[2]
-        ref[0]=(-1.24748826112)*(1+2.*(dim-1.)/(o+1.))+(1.45912535353)*dim
-        ref[1]=(-0.260427715657)*(1+2.*(dim-1.)/(o+1.))+(-1.29587288693)*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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.493237934301)*x[0]**o+(-0.977176505302)*x[0]+(-0.837740403623)*x[1]**o+(0.204709065496)*x[1]
-        arg[0,1]=(0.794064508577)*x[0]**o+(-0.917060945623)*x[0]+(0.0114185601474)*x[1]**o+(0.547108694374)*x[1]
-        arg[0,2]=(-0.989778984923)*x[0]**o+(-0.499651095311)*x[0]+(-0.126817505183)*x[1]**o+(0.889077385524)*x[1]
-        arg[0,3]=(-0.223453594493)*x[0]**o+(-0.17983229649)*x[0]+(0.352602269148)*x[1]**o+(0.00617724258273)*x[1]
-        arg[0,4]=(0.401784356952)*x[0]**o+(0.839308128877)*x[0]+(0.322943402455)*x[1]**o+(0.770206521944)*x[1]
-        arg[1,0]=(0.491015078355)*x[0]**o+(0.194909202321)*x[0]+(0.38986016491)*x[1]**o+(0.671106836372)*x[1]
-        arg[1,1]=(0.200697856784)*x[0]**o+(0.389746053244)*x[0]+(0.850237988574)*x[1]**o+(-0.677750684271)*x[1]
-        arg[1,2]=(0.300444129016)*x[0]**o+(-0.502811932395)*x[0]+(0.390751425646)*x[1]**o+(-0.0234058348564)*x[1]
-        arg[1,3]=(-0.451410318068)*x[0]**o+(0.0959092789621)*x[0]+(0.364602756931)*x[1]**o+(-0.637883149677)*x[1]
-        arg[1,4]=(0.84148898142)*x[0]**o+(0.447701396385)*x[0]+(-0.925960934959)*x[1]**o+(-0.216915201171)*x[1]
-        arg[2,0]=(0.497685540053)*x[0]**o+(0.706445401439)*x[0]+(0.278688226804)*x[1]**o+(0.263560807934)*x[1]
-        arg[2,1]=(0.846700886302)*x[0]**o+(0.794459987626)*x[0]+(0.206707548962)*x[1]**o+(0.536938178952)*x[1]
-        arg[2,2]=(-0.825060225713)*x[0]**o+(0.00650901742391)*x[0]+(0.500591036904)*x[1]**o+(0.86251606869)*x[1]
-        arg[2,3]=(-0.490203731083)*x[0]**o+(-0.758885551614)*x[0]+(0.44212368096)*x[1]**o+(0.422183463853)*x[1]
-        arg[2,4]=(0.326180837967)*x[0]**o+(0.0511693925274)*x[0]+(0.450713817213)*x[1]**o+(-0.788372992203)*x[1]
-        arg[3,0]=(0.427328335694)*x[0]**o+(-0.549570782632)*x[0]+(0.0484849428866)*x[1]**o+(-0.488921618371)*x[1]
-        arg[3,1]=(-0.000395237589224)*x[0]**o+(-0.902889768871)*x[0]+(-0.991821787559)*x[1]**o+(-0.907842202962)*x[1]
-        arg[3,2]=(0.737156280391)*x[0]**o+(0.104714673958)*x[0]+(0.102528971835)*x[1]**o+(-0.0982626427735)*x[1]
-        arg[3,3]=(0.971460723075)*x[0]**o+(-0.759821212391)*x[0]+(0.385963754923)*x[1]**o+(-0.533924725996)*x[1]
-        arg[3,4]=(0.25440424638)*x[0]**o+(-0.82432588605)*x[0]+(0.759285911224)*x[1]**o+(0.328467600746)*x[1]
-        ref[0,0]=(-1.33097833792)*(1+2.*(dim-1.)/(o+1.))+(-0.772467439806)*dim
-        ref[0,1]=(0.805483068724)*(1+2.*(dim-1.)/(o+1.))+(-0.36995225125)*dim
-        ref[0,2]=(-1.11659649011)*(1+2.*(dim-1.)/(o+1.))+(0.389426290213)*dim
-        ref[0,3]=(0.129148674655)*(1+2.*(dim-1.)/(o+1.))+(-0.173655053907)*dim
-        ref[0,4]=(0.724727759407)*(1+2.*(dim-1.)/(o+1.))+(1.60951465082)*dim
-        ref[1,0]=(0.880875243265)*(1+2.*(dim-1.)/(o+1.))+(0.866016038693)*dim
-        ref[1,1]=(1.05093584536)*(1+2.*(dim-1.)/(o+1.))+(-0.288004631027)*dim
-        ref[1,2]=(0.691195554662)*(1+2.*(dim-1.)/(o+1.))+(-0.526217767251)*dim
-        ref[1,3]=(-0.0868075611369)*(1+2.*(dim-1.)/(o+1.))+(-0.541973870715)*dim
-        ref[1,4]=(-0.0844719535392)*(1+2.*(dim-1.)/(o+1.))+(0.230786195214)*dim
-        ref[2,0]=(0.776373766857)*(1+2.*(dim-1.)/(o+1.))+(0.970006209374)*dim
-        ref[2,1]=(1.05340843526)*(1+2.*(dim-1.)/(o+1.))+(1.33139816658)*dim
-        ref[2,2]=(-0.324469188808)*(1+2.*(dim-1.)/(o+1.))+(0.869025086114)*dim
-        ref[2,3]=(-0.0480800501232)*(1+2.*(dim-1.)/(o+1.))+(-0.336702087761)*dim
-        ref[2,4]=(0.776894655179)*(1+2.*(dim-1.)/(o+1.))+(-0.737203599675)*dim
-        ref[3,0]=(0.47581327858)*(1+2.*(dim-1.)/(o+1.))+(-1.038492401)*dim
-        ref[3,1]=(-0.992217025148)*(1+2.*(dim-1.)/(o+1.))+(-1.81073197183)*dim
-        ref[3,2]=(0.839685252226)*(1+2.*(dim-1.)/(o+1.))+(0.00645203118434)*dim
-        ref[3,3]=(1.357424478)*(1+2.*(dim-1.)/(o+1.))+(-1.29374593839)*dim
-        ref[3,4]=(1.0136901576)*(1+2.*(dim-1.)/(o+1.))+(-0.495858285305)*dim
-      else:
-        arg[0,0]=(-0.543785449843)*x[0]**o+(-0.593471310422)*x[0]+(0.223732084513)*x[1]**o+(-0.126390494354)*x[1]+(0.602561108649)*x[2]**o+(-0.879650196727)*x[2]
-        arg[0,1]=(-0.373708985284)*x[0]**o+(0.274723212925)*x[0]+(0.0901068561926)*x[1]**o+(0.0705878267418)*x[1]+(-0.87124855534)*x[2]**o+(-0.342156987834)*x[2]
-        arg[0,2]=(0.197662792758)*x[0]**o+(0.993389348528)*x[0]+(0.300080063659)*x[1]**o+(-0.87329423474)*x[1]+(-0.708861668092)*x[2]**o+(-0.145567510817)*x[2]
-        arg[0,3]=(-0.641680604707)*x[0]**o+(0.502870155472)*x[0]+(0.726460257571)*x[1]**o+(-0.796246941548)*x[1]+(-0.034138694789)*x[2]**o+(-0.756773445728)*x[2]
-        arg[0,4]=(-0.910301138852)*x[0]**o+(0.370603440687)*x[0]+(0.30908632679)*x[1]**o+(0.399307258883)*x[1]+(0.734329887794)*x[2]**o+(-0.105355323212)*x[2]
-        arg[1,0]=(-0.998162269861)*x[0]**o+(0.744436497607)*x[0]+(0.474991680035)*x[1]**o+(-0.523297766774)*x[1]+(-0.147411103004)*x[2]**o+(-0.366260797475)*x[2]
-        arg[1,1]=(-0.895068058812)*x[0]**o+(-0.543026567202)*x[0]+(0.681910579939)*x[1]**o+(0.839238385122)*x[1]+(-0.943454697555)*x[2]**o+(-0.942882687085)*x[2]
-        arg[1,2]=(-0.0327934757673)*x[0]**o+(-0.551060110327)*x[0]+(0.0246419122114)*x[1]**o+(0.290492943846)*x[1]+(-0.81629260256)*x[2]**o+(-0.0703654573398)*x[2]
-        arg[1,3]=(0.0101368428324)*x[0]**o+(0.169228100407)*x[0]+(-0.0720675504637)*x[1]**o+(0.854569517064)*x[1]+(-0.185495614033)*x[2]**o+(0.159402892807)*x[2]
-        arg[1,4]=(-0.879056526056)*x[0]**o+(-0.499865495878)*x[0]+(0.389281340553)*x[1]**o+(0.208323326648)*x[1]+(0.201495185869)*x[2]**o+(0.287693342543)*x[2]
-        arg[2,0]=(-0.0980367959573)*x[0]**o+(-0.743908923973)*x[0]+(0.612332291133)*x[1]**o+(-0.833162883242)*x[1]+(-0.149234146487)*x[2]**o+(-0.265352382043)*x[2]
-        arg[2,1]=(-0.731053054407)*x[0]**o+(-0.328824749845)*x[0]+(-0.270771833154)*x[1]**o+(-0.924718425874)*x[1]+(-0.333737248999)*x[2]**o+(-0.437707530432)*x[2]
-        arg[2,2]=(0.0568240255423)*x[0]**o+(0.889929679474)*x[0]+(-0.550346007257)*x[1]**o+(-0.276114383355)*x[1]+(0.818856335741)*x[2]**o+(0.949830759195)*x[2]
-        arg[2,3]=(-0.487278099196)*x[0]**o+(0.621833922878)*x[0]+(-0.641187646288)*x[1]**o+(-0.62187991518)*x[1]+(0.193101177186)*x[2]**o+(0.574039256278)*x[2]
-        arg[2,4]=(0.411046922073)*x[0]**o+(-0.10196277248)*x[0]+(-0.880065306034)*x[1]**o+(0.629582927604)*x[1]+(-0.364618567951)*x[2]**o+(0.130293365676)*x[2]
-        arg[3,0]=(-0.625244224555)*x[0]**o+(0.50345243521)*x[0]+(0.701616120451)*x[1]**o+(0.44401843794)*x[1]+(-0.881068054195)*x[2]**o+(0.337405641389)*x[2]
-        arg[3,1]=(0.244113319139)*x[0]**o+(0.739760310044)*x[0]+(0.439528183979)*x[1]**o+(0.808496622595)*x[1]+(0.432069187682)*x[2]**o+(-0.106394550529)*x[2]
-        arg[3,2]=(-0.200973139796)*x[0]**o+(-0.373932231384)*x[0]+(-0.438946407503)*x[1]**o+(0.543079830762)*x[1]+(-0.499599010695)*x[2]**o+(0.501967674296)*x[2]
-        arg[3,3]=(-0.128263000609)*x[0]**o+(-0.408181851435)*x[0]+(0.403315054177)*x[1]**o+(0.75067593555)*x[1]+(0.361607987217)*x[2]**o+(0.269483801463)*x[2]
-        arg[3,4]=(0.821969994275)*x[0]**o+(0.350771424951)*x[0]+(-0.761235507511)*x[1]**o+(0.148329827876)*x[1]+(-0.918493845231)*x[2]**o+(0.592094636272)*x[2]
-        ref[0,0]=(0.282507743319)*(1+2.*(dim-1.)/(o+1.))+(-1.5995120015)*dim
-        ref[0,1]=(-1.15485068443)*(1+2.*(dim-1.)/(o+1.))+(0.00315405183214)*dim
-        ref[0,2]=(-0.211118811675)*(1+2.*(dim-1.)/(o+1.))+(-0.0254723970291)*dim
-        ref[0,3]=(0.0506409580755)*(1+2.*(dim-1.)/(o+1.))+(-1.0501502318)*dim
-        ref[0,4]=(0.133115075732)*(1+2.*(dim-1.)/(o+1.))+(0.664555376358)*dim
-        ref[1,0]=(-0.67058169283)*(1+2.*(dim-1.)/(o+1.))+(-0.145122066642)*dim
-        ref[1,1]=(-1.15661217643)*(1+2.*(dim-1.)/(o+1.))+(-0.646670869164)*dim
-        ref[1,2]=(-0.824444166116)*(1+2.*(dim-1.)/(o+1.))+(-0.330932623821)*dim
-        ref[1,3]=(-0.247426321664)*(1+2.*(dim-1.)/(o+1.))+(1.18320051028)*dim
-        ref[1,4]=(-0.288279999634)*(1+2.*(dim-1.)/(o+1.))+(-0.00384882668765)*dim
-        ref[2,0]=(0.365061348688)*(1+2.*(dim-1.)/(o+1.))+(-1.84242418926)*dim
-        ref[2,1]=(-1.33556213656)*(1+2.*(dim-1.)/(o+1.))+(-1.69125070615)*dim
-        ref[2,2]=(0.325334354026)*(1+2.*(dim-1.)/(o+1.))+(1.56364605531)*dim
-        ref[2,3]=(-0.935364568298)*(1+2.*(dim-1.)/(o+1.))+(0.573993263976)*dim
-        ref[2,4]=(-0.833636951913)*(1+2.*(dim-1.)/(o+1.))+(0.6579135208)*dim
-        ref[3,0]=(-0.804696158299)*(1+2.*(dim-1.)/(o+1.))+(1.28487651454)*dim
-        ref[3,1]=(1.1157106908)*(1+2.*(dim-1.)/(o+1.))+(1.44186238211)*dim
-        ref[3,2]=(-1.13951855799)*(1+2.*(dim-1.)/(o+1.))+(0.671115273674)*dim
-        ref[3,3]=(0.636660040784)*(1+2.*(dim-1.)/(o+1.))+(0.611977885578)*dim
-        ref[3,4]=(-0.857759358467)*(1+2.*(dim-1.)/(o+1.))+(1.0911958891)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.331954160625)*x[0]**o+(0.713423346586)*x[0]+(0.922333771405)*x[1]**o+(-0.306799323245)*x[1]
-        arg[0,0,1]=(-0.837278273696)*x[0]**o+(-0.322068356249)*x[0]+(-0.952056283446)*x[1]**o+(0.78147215355)*x[1]
-        arg[0,1,0]=(-0.71217197633)*x[0]**o+(-0.222121067189)*x[0]+(-0.740851323426)*x[1]**o+(-0.664415003166)*x[1]
-        arg[0,1,1]=(0.304797844524)*x[0]**o+(-0.644642249615)*x[0]+(-0.942312793933)*x[1]**o+(0.758857258357)*x[1]
-        arg[1,0,0]=(-0.978734634026)*x[0]**o+(0.697829375729)*x[0]+(-0.161023313194)*x[1]**o+(0.61960280308)*x[1]
-        arg[1,0,1]=(0.65091302745)*x[0]**o+(-0.411592147008)*x[0]+(0.748017319704)*x[1]**o+(0.751661257345)*x[1]
-        arg[1,1,0]=(-0.752749816617)*x[0]**o+(-0.889417028079)*x[0]+(0.187075769961)*x[1]**o+(0.96605423194)*x[1]
-        arg[1,1,1]=(-0.791276410919)*x[0]**o+(-0.66910236639)*x[0]+(-0.107283654349)*x[1]**o+(0.556315348977)*x[1]
-        arg[2,0,0]=(0.0717781211643)*x[0]**o+(-0.895974517834)*x[0]+(-0.388350799289)*x[1]**o+(0.55541171641)*x[1]
-        arg[2,0,1]=(0.886475701949)*x[0]**o+(0.0794480579219)*x[0]+(-0.77671944551)*x[1]**o+(-0.29611930088)*x[1]
-        arg[2,1,0]=(0.891530897911)*x[0]**o+(-0.767892439984)*x[0]+(-0.692871902002)*x[1]**o+(0.296346783431)*x[1]
-        arg[2,1,1]=(0.904417221616)*x[0]**o+(-0.379208335246)*x[0]+(0.491675297059)*x[1]**o+(0.994131453216)*x[1]
-        arg[3,0,0]=(-0.278750282129)*x[0]**o+(-0.889235749208)*x[0]+(-0.970025256676)*x[1]**o+(0.459265023633)*x[1]
-        arg[3,0,1]=(-0.718548177793)*x[0]**o+(-0.801618785436)*x[0]+(-0.0489351007933)*x[1]**o+(-0.0331281021404)*x[1]
-        arg[3,1,0]=(0.838645233036)*x[0]**o+(0.174830460073)*x[0]+(0.343887140274)*x[1]**o+(0.475643625956)*x[1]
-        arg[3,1,1]=(-0.376629360434)*x[0]**o+(0.965850026388)*x[0]+(-0.62284011199)*x[1]**o+(-0.548261522438)*x[1]
-        arg[4,0,0]=(-0.747109622101)*x[0]**o+(-0.793286186527)*x[0]+(0.700502366132)*x[1]**o+(0.708459489695)*x[1]
-        arg[4,0,1]=(-0.372920704339)*x[0]**o+(-0.856662712404)*x[0]+(0.735191558102)*x[1]**o+(0.451959287084)*x[1]
-        arg[4,1,0]=(-0.825227447648)*x[0]**o+(-0.978701927456)*x[0]+(0.856562109765)*x[1]**o+(0.226820057686)*x[1]
-        arg[4,1,1]=(-0.883951567752)*x[0]**o+(0.346114896878)*x[0]+(0.22103721575)*x[1]**o+(0.766907412924)*x[1]
-        arg[5,0,0]=(0.440140408264)*x[0]**o+(0.576442002932)*x[0]+(0.181136518153)*x[1]**o+(0.467290325887)*x[1]
-        arg[5,0,1]=(0.323653297993)*x[0]**o+(-0.0169080219964)*x[0]+(-0.790889359324)*x[1]**o+(-0.752609210154)*x[1]
-        arg[5,1,0]=(-0.771859095701)*x[0]**o+(0.392074466446)*x[0]+(0.672832544535)*x[1]**o+(-0.518196376899)*x[1]
-        arg[5,1,1]=(-0.714106835785)*x[0]**o+(-0.392974811152)*x[0]+(0.477349412757)*x[1]**o+(-0.978738343032)*x[1]
-        ref[0,0,0]=(0.59037961078)*(1+2.*(dim-1.)/(o+1.))+(0.406624023341)*dim
-        ref[0,0,1]=(-1.78933455714)*(1+2.*(dim-1.)/(o+1.))+(0.459403797301)*dim
-        ref[0,1,0]=(-1.45302329976)*(1+2.*(dim-1.)/(o+1.))+(-0.886536070355)*dim
-        ref[0,1,1]=(-0.637514949409)*(1+2.*(dim-1.)/(o+1.))+(0.114215008741)*dim
-        ref[1,0,0]=(-1.13975794722)*(1+2.*(dim-1.)/(o+1.))+(1.31743217881)*dim
-        ref[1,0,1]=(1.39893034715)*(1+2.*(dim-1.)/(o+1.))+(0.340069110337)*dim
-        ref[1,1,0]=(-0.565674046656)*(1+2.*(dim-1.)/(o+1.))+(0.076637203861)*dim
-        ref[1,1,1]=(-0.898560065268)*(1+2.*(dim-1.)/(o+1.))+(-0.112787017413)*dim
-        ref[2,0,0]=(-0.316572678125)*(1+2.*(dim-1.)/(o+1.))+(-0.340562801424)*dim
-        ref[2,0,1]=(0.10975625644)*(1+2.*(dim-1.)/(o+1.))+(-0.216671242958)*dim
-        ref[2,1,0]=(0.198658995909)*(1+2.*(dim-1.)/(o+1.))+(-0.471545656553)*dim
-        ref[2,1,1]=(1.39609251868)*(1+2.*(dim-1.)/(o+1.))+(0.614923117971)*dim
-        ref[3,0,0]=(-1.2487755388)*(1+2.*(dim-1.)/(o+1.))+(-0.429970725575)*dim
-        ref[3,0,1]=(-0.767483278586)*(1+2.*(dim-1.)/(o+1.))+(-0.834746887577)*dim
-        ref[3,1,0]=(1.18253237331)*(1+2.*(dim-1.)/(o+1.))+(0.650474086029)*dim
-        ref[3,1,1]=(-0.999469472424)*(1+2.*(dim-1.)/(o+1.))+(0.41758850395)*dim
-        ref[4,0,0]=(-0.0466072559697)*(1+2.*(dim-1.)/(o+1.))+(-0.0848266968319)*dim
-        ref[4,0,1]=(0.362270853763)*(1+2.*(dim-1.)/(o+1.))+(-0.404703425319)*dim
-        ref[4,1,0]=(0.0313346621166)*(1+2.*(dim-1.)/(o+1.))+(-0.75188186977)*dim
-        ref[4,1,1]=(-0.662914352001)*(1+2.*(dim-1.)/(o+1.))+(1.1130223098)*dim
-        ref[5,0,0]=(0.621276926417)*(1+2.*(dim-1.)/(o+1.))+(1.04373232882)*dim
-        ref[5,0,1]=(-0.467236061331)*(1+2.*(dim-1.)/(o+1.))+(-0.76951723215)*dim
-        ref[5,1,0]=(-0.0990265511653)*(1+2.*(dim-1.)/(o+1.))+(-0.126121910453)*dim
-        ref[5,1,1]=(-0.236757423028)*(1+2.*(dim-1.)/(o+1.))+(-1.37171315418)*dim
-      else:
-        arg[0,0,0]=(-0.676850371385)*x[0]**o+(0.343194249293)*x[0]+(-0.289569238124)*x[1]**o+(0.546143025789)*x[1]+(-0.292429216951)*x[2]**o+(0.100638805907)*x[2]
-        arg[0,0,1]=(-0.558403199885)*x[0]**o+(0.369265961569)*x[0]+(0.098539502761)*x[1]**o+(-0.555747072012)*x[1]+(0.0142505043744)*x[2]**o+(0.110677590143)*x[2]
-        arg[0,1,0]=(0.480265324249)*x[0]**o+(-0.0801799981418)*x[0]+(-0.659040110213)*x[1]**o+(0.315685251032)*x[1]+(0.146222780181)*x[2]**o+(-0.307845817615)*x[2]
-        arg[0,1,1]=(-0.469643195547)*x[0]**o+(0.631180947887)*x[0]+(0.0873749097691)*x[1]**o+(-0.907805635326)*x[1]+(-0.445238378297)*x[2]**o+(-0.583750385876)*x[2]
-        arg[1,0,0]=(-0.519648347947)*x[0]**o+(-0.580046561107)*x[0]+(-0.474702629402)*x[1]**o+(-0.76698196707)*x[1]+(0.631290211156)*x[2]**o+(0.283150656338)*x[2]
-        arg[1,0,1]=(0.828049802595)*x[0]**o+(-0.0996271417739)*x[0]+(0.13247948046)*x[1]**o+(0.64657332105)*x[1]+(0.901448888477)*x[2]**o+(0.895379597076)*x[2]
-        arg[1,1,0]=(-0.197367099356)*x[0]**o+(-0.933210661759)*x[0]+(-0.0134349749548)*x[1]**o+(-0.651111981269)*x[1]+(0.256945439519)*x[2]**o+(0.528412689094)*x[2]
-        arg[1,1,1]=(-0.922943172982)*x[0]**o+(-0.883102479542)*x[0]+(-0.0037345936911)*x[1]**o+(-0.598256159261)*x[1]+(-0.8562089409)*x[2]**o+(-0.298502617143)*x[2]
-        arg[2,0,0]=(0.499285053237)*x[0]**o+(-0.347877602065)*x[0]+(0.783117300662)*x[1]**o+(0.0413016895448)*x[1]+(0.22555777414)*x[2]**o+(0.089246166469)*x[2]
-        arg[2,0,1]=(-0.180602931202)*x[0]**o+(0.883958054663)*x[0]+(0.904974519387)*x[1]**o+(-0.169618307434)*x[1]+(0.361963890467)*x[2]**o+(-0.364236450353)*x[2]
-        arg[2,1,0]=(0.332239090882)*x[0]**o+(-0.392239851855)*x[0]+(0.905142609029)*x[1]**o+(-0.471493540964)*x[1]+(-0.305327788141)*x[2]**o+(0.581213078834)*x[2]
-        arg[2,1,1]=(0.481276189253)*x[0]**o+(0.645400809127)*x[0]+(-0.840844470697)*x[1]**o+(-0.47587396865)*x[1]+(0.134145050668)*x[2]**o+(-0.315081369951)*x[2]
-        arg[3,0,0]=(-0.480497217552)*x[0]**o+(0.595345393671)*x[0]+(0.776315451392)*x[1]**o+(-0.396110510671)*x[1]+(0.0437422791996)*x[2]**o+(0.348675326203)*x[2]
-        arg[3,0,1]=(0.867117243092)*x[0]**o+(-0.222483151231)*x[0]+(0.0856439550139)*x[1]**o+(0.355855801395)*x[1]+(-0.779380984653)*x[2]**o+(0.799440639884)*x[2]
-        arg[3,1,0]=(-0.869234399353)*x[0]**o+(-0.747500724089)*x[0]+(-0.83154206968)*x[1]**o+(-0.771906212766)*x[1]+(-0.188734869619)*x[2]**o+(0.7312382704)*x[2]
-        arg[3,1,1]=(-0.729677636148)*x[0]**o+(-0.358066533942)*x[0]+(-0.342651052704)*x[1]**o+(-0.531453801913)*x[1]+(-0.898300547827)*x[2]**o+(0.0387220517653)*x[2]
-        arg[4,0,0]=(-0.380489041999)*x[0]**o+(0.517823660835)*x[0]+(0.722149782685)*x[1]**o+(0.510169845258)*x[1]+(-0.979340093133)*x[2]**o+(0.846050053391)*x[2]
-        arg[4,0,1]=(0.390895580804)*x[0]**o+(0.122461788897)*x[0]+(-0.809243912452)*x[1]**o+(0.871689879803)*x[1]+(-0.991689466458)*x[2]**o+(-0.0373953689911)*x[2]
-        arg[4,1,0]=(0.00670611033858)*x[0]**o+(-0.700084486793)*x[0]+(0.365358002826)*x[1]**o+(-0.928347441251)*x[1]+(-0.675081280461)*x[2]**o+(-0.262871553902)*x[2]
-        arg[4,1,1]=(-0.566521655794)*x[0]**o+(-0.23325381374)*x[0]+(0.744538505444)*x[1]**o+(0.263970013855)*x[1]+(0.360984907343)*x[2]**o+(0.704696800059)*x[2]
-        arg[5,0,0]=(0.754229123633)*x[0]**o+(-0.523353302691)*x[0]+(0.404181763418)*x[1]**o+(0.175414644029)*x[1]+(0.627455124887)*x[2]**o+(-0.450163514418)*x[2]
-        arg[5,0,1]=(0.804547370453)*x[0]**o+(-0.748034210243)*x[0]+(-0.943261499953)*x[1]**o+(0.360715335834)*x[1]+(-0.952785406204)*x[2]**o+(0.188838771539)*x[2]
-        arg[5,1,0]=(0.653730390007)*x[0]**o+(0.663746229033)*x[0]+(0.454911944273)*x[1]**o+(-0.548110740107)*x[1]+(0.799171265206)*x[2]**o+(-0.646356900812)*x[2]
-        arg[5,1,1]=(0.533464266683)*x[0]**o+(-0.0650985333228)*x[0]+(-0.599880569232)*x[1]**o+(0.645120695827)*x[1]+(0.985316456657)*x[2]**o+(0.527848503917)*x[2]
-        ref[0,0,0]=(-1.25884882646)*(1+2.*(dim-1.)/(o+1.))+(0.989976080988)*dim
-        ref[0,0,1]=(-0.445613192749)*(1+2.*(dim-1.)/(o+1.))+(-0.0758035202994)*dim
-        ref[0,1,0]=(-0.0325520057832)*(1+2.*(dim-1.)/(o+1.))+(-0.0723405647253)*dim
-        ref[0,1,1]=(-0.827506664075)*(1+2.*(dim-1.)/(o+1.))+(-0.860375073315)*dim
-        ref[1,0,0]=(-0.363060766193)*(1+2.*(dim-1.)/(o+1.))+(-1.06387787184)*dim
-        ref[1,0,1]=(1.86197817153)*(1+2.*(dim-1.)/(o+1.))+(1.44232577635)*dim
-        ref[1,1,0]=(0.0461433652081)*(1+2.*(dim-1.)/(o+1.))+(-1.05590995393)*dim
-        ref[1,1,1]=(-1.78288670757)*(1+2.*(dim-1.)/(o+1.))+(-1.77986125595)*dim
-        ref[2,0,0]=(1.50796012804)*(1+2.*(dim-1.)/(o+1.))+(-0.217329746051)*dim
-        ref[2,0,1]=(1.08633547865)*(1+2.*(dim-1.)/(o+1.))+(0.350103296876)*dim
-        ref[2,1,0]=(0.932053911771)*(1+2.*(dim-1.)/(o+1.))+(-0.282520313985)*dim
-        ref[2,1,1]=(-0.225423230776)*(1+2.*(dim-1.)/(o+1.))+(-0.145554529474)*dim
-        ref[3,0,0]=(0.33956051304)*(1+2.*(dim-1.)/(o+1.))+(0.547910209204)*dim
-        ref[3,0,1]=(0.173380213454)*(1+2.*(dim-1.)/(o+1.))+(0.932813290049)*dim
-        ref[3,1,0]=(-1.88951133865)*(1+2.*(dim-1.)/(o+1.))+(-0.788168666455)*dim
-        ref[3,1,1]=(-1.97062923668)*(1+2.*(dim-1.)/(o+1.))+(-0.850798284089)*dim
-        ref[4,0,0]=(-0.637679352447)*(1+2.*(dim-1.)/(o+1.))+(1.87404355948)*dim
-        ref[4,0,1]=(-1.41003779811)*(1+2.*(dim-1.)/(o+1.))+(0.956756299709)*dim
-        ref[4,1,0]=(-0.303017167297)*(1+2.*(dim-1.)/(o+1.))+(-1.89130348195)*dim
-        ref[4,1,1]=(0.539001756993)*(1+2.*(dim-1.)/(o+1.))+(0.735413000173)*dim
-        ref[5,0,0]=(1.78586601194)*(1+2.*(dim-1.)/(o+1.))+(-0.79810217308)*dim
-        ref[5,0,1]=(-1.0914995357)*(1+2.*(dim-1.)/(o+1.))+(-0.198480102871)*dim
-        ref[5,1,0]=(1.90781359949)*(1+2.*(dim-1.)/(o+1.))+(-0.530721411887)*dim
-        ref[5,1,1]=(0.918900154108)*(1+2.*(dim-1.)/(o+1.))+(1.10787066642)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.181966612335)*x[0]**o+(-0.461883712153)*x[0]+(-0.420217253531)*x[1]**o+(0.52197109374)*x[1]
-        arg[0,0,0,1]=(-0.122704378373)*x[0]**o+(0.549708706786)*x[0]+(-0.728108908074)*x[1]**o+(-0.839262748545)*x[1]
-        arg[0,0,1,0]=(0.58557741427)*x[0]**o+(-0.970633305521)*x[0]+(0.215513381389)*x[1]**o+(-0.178877868196)*x[1]
-        arg[0,0,1,1]=(0.646118894595)*x[0]**o+(0.839917605008)*x[0]+(-0.608843960266)*x[1]**o+(-0.840842208189)*x[1]
-        arg[0,0,2,0]=(-0.126004594384)*x[0]**o+(0.663487355648)*x[0]+(0.801751176464)*x[1]**o+(-0.76620842256)*x[1]
-        arg[0,0,2,1]=(-0.244425023768)*x[0]**o+(0.736809513316)*x[0]+(0.736776514098)*x[1]**o+(0.382648973627)*x[1]
-        arg[0,1,0,0]=(-0.264460763052)*x[0]**o+(-0.325868872518)*x[0]+(-0.0636203008538)*x[1]**o+(-0.398059740187)*x[1]
-        arg[0,1,0,1]=(0.443639751435)*x[0]**o+(0.523903519493)*x[0]+(-0.222575248757)*x[1]**o+(-0.168203019401)*x[1]
-        arg[0,1,1,0]=(-0.329523829258)*x[0]**o+(-0.908408437436)*x[0]+(0.695441587034)*x[1]**o+(-0.236957609006)*x[1]
-        arg[0,1,1,1]=(-0.57363301023)*x[0]**o+(-0.168677045141)*x[0]+(0.455235475098)*x[1]**o+(-0.498803217861)*x[1]
-        arg[0,1,2,0]=(0.09906404243)*x[0]**o+(0.48682122702)*x[0]+(-0.250940180366)*x[1]**o+(-0.641013418008)*x[1]
-        arg[0,1,2,1]=(-0.963193555161)*x[0]**o+(0.129868691037)*x[0]+(0.821192174481)*x[1]**o+(-0.245576703223)*x[1]
-        arg[0,2,0,0]=(-0.867410251576)*x[0]**o+(0.170194043006)*x[0]+(0.837669366536)*x[1]**o+(0.285772890787)*x[1]
-        arg[0,2,0,1]=(0.767089114154)*x[0]**o+(-0.425174482112)*x[0]+(-0.460840645159)*x[1]**o+(-0.314295694392)*x[1]
-        arg[0,2,1,0]=(-0.932934920269)*x[0]**o+(0.399552332498)*x[0]+(-0.137764102275)*x[1]**o+(-0.0375128952657)*x[1]
-        arg[0,2,1,1]=(0.507999826854)*x[0]**o+(-0.60826518686)*x[0]+(0.766838061511)*x[1]**o+(0.800723296773)*x[1]
-        arg[0,2,2,0]=(0.372064864992)*x[0]**o+(0.29029476011)*x[0]+(0.203299629846)*x[1]**o+(-0.386357855884)*x[1]
-        arg[0,2,2,1]=(0.661268311956)*x[0]**o+(0.60257115577)*x[0]+(0.88881711536)*x[1]**o+(0.335431084294)*x[1]
-        arg[0,3,0,0]=(-0.756295024079)*x[0]**o+(-0.982472476783)*x[0]+(-0.264060825724)*x[1]**o+(0.082684535426)*x[1]
-        arg[0,3,0,1]=(0.514580120205)*x[0]**o+(0.524816925461)*x[0]+(-0.745096223094)*x[1]**o+(-0.0796881815577)*x[1]
-        arg[0,3,1,0]=(0.597556449974)*x[0]**o+(0.527680495979)*x[0]+(0.517638167762)*x[1]**o+(-0.357836534374)*x[1]
-        arg[0,3,1,1]=(0.354366560101)*x[0]**o+(-0.617697325436)*x[0]+(0.339071431286)*x[1]**o+(0.299934132319)*x[1]
-        arg[0,3,2,0]=(0.26563455123)*x[0]**o+(0.821495614519)*x[0]+(0.177496963332)*x[1]**o+(-0.154521746257)*x[1]
-        arg[0,3,2,1]=(0.983477388632)*x[0]**o+(0.524806318175)*x[0]+(-0.604096007297)*x[1]**o+(0.350360164328)*x[1]
-        arg[0,4,0,0]=(0.311369778768)*x[0]**o+(-0.648416457513)*x[0]+(0.463469290711)*x[1]**o+(0.0719628828709)*x[1]
-        arg[0,4,0,1]=(-0.743081056195)*x[0]**o+(-0.803573973461)*x[0]+(-0.766982068691)*x[1]**o+(0.387240020398)*x[1]
-        arg[0,4,1,0]=(-0.0715117411345)*x[0]**o+(-0.341871715212)*x[0]+(0.0593378446291)*x[1]**o+(-0.10183864979)*x[1]
-        arg[0,4,1,1]=(0.538850329978)*x[0]**o+(0.0280201497914)*x[0]+(0.350206859589)*x[1]**o+(0.316831165676)*x[1]
-        arg[0,4,2,0]=(-0.327852385434)*x[0]**o+(0.408866306659)*x[0]+(0.940378517318)*x[1]**o+(0.578309623908)*x[1]
-        arg[0,4,2,1]=(0.378380112483)*x[0]**o+(0.696828716067)*x[0]+(-0.908233000582)*x[1]**o+(-0.328611483675)*x[1]
-        arg[1,0,0,0]=(0.753991558436)*x[0]**o+(0.0542891140783)*x[0]+(-0.428934638249)*x[1]**o+(0.318155063446)*x[1]
-        arg[1,0,0,1]=(-0.387609085343)*x[0]**o+(0.711023478158)*x[0]+(-0.969026331169)*x[1]**o+(0.456175434422)*x[1]
-        arg[1,0,1,0]=(-0.468504469917)*x[0]**o+(-0.314756281356)*x[0]+(0.0145647044588)*x[1]**o+(0.074035761055)*x[1]
-        arg[1,0,1,1]=(0.240749620446)*x[0]**o+(0.906736060537)*x[0]+(0.391320123368)*x[1]**o+(-0.261639387239)*x[1]
-        arg[1,0,2,0]=(-0.461436333094)*x[0]**o+(-0.809258428817)*x[0]+(0.0670777162266)*x[1]**o+(-0.445304287721)*x[1]
-        arg[1,0,2,1]=(-0.569794448172)*x[0]**o+(-0.0624052432724)*x[0]+(-0.759840810858)*x[1]**o+(-0.609106375016)*x[1]
-        arg[1,1,0,0]=(0.751570143287)*x[0]**o+(0.78189919599)*x[0]+(-0.103246458909)*x[1]**o+(0.732156635312)*x[1]
-        arg[1,1,0,1]=(-0.0126214545951)*x[0]**o+(-0.612853966263)*x[0]+(-0.238555698245)*x[1]**o+(-0.668009933698)*x[1]
-        arg[1,1,1,0]=(0.816325838743)*x[0]**o+(0.545518357738)*x[0]+(0.893296287925)*x[1]**o+(0.694579919864)*x[1]
-        arg[1,1,1,1]=(0.927638834795)*x[0]**o+(0.750347688466)*x[0]+(-0.15924462002)*x[1]**o+(-0.952995938892)*x[1]
-        arg[1,1,2,0]=(0.970761253678)*x[0]**o+(0.205308852313)*x[0]+(0.909209906751)*x[1]**o+(-0.178635180174)*x[1]
-        arg[1,1,2,1]=(-0.632065128479)*x[0]**o+(-0.300905398347)*x[0]+(0.865317638002)*x[1]**o+(0.886398250669)*x[1]
-        arg[1,2,0,0]=(-0.0529293620539)*x[0]**o+(-0.909022003179)*x[0]+(0.235231916345)*x[1]**o+(-0.623380752415)*x[1]
-        arg[1,2,0,1]=(0.873344987616)*x[0]**o+(0.144231546529)*x[0]+(0.307375566381)*x[1]**o+(-0.201617507084)*x[1]
-        arg[1,2,1,0]=(-0.957945047658)*x[0]**o+(-0.432955474381)*x[0]+(0.0742288164869)*x[1]**o+(-0.106080430366)*x[1]
-        arg[1,2,1,1]=(-0.664227561512)*x[0]**o+(0.0821007781774)*x[0]+(-0.541506076231)*x[1]**o+(-0.88307957937)*x[1]
-        arg[1,2,2,0]=(0.754702675232)*x[0]**o+(0.175176916913)*x[0]+(0.519607893979)*x[1]**o+(-0.24129526204)*x[1]
-        arg[1,2,2,1]=(-0.415660998528)*x[0]**o+(-0.964071393069)*x[0]+(0.458656303526)*x[1]**o+(0.752153826846)*x[1]
-        arg[1,3,0,0]=(-0.15638393187)*x[0]**o+(0.0828824719)*x[0]+(-0.0846205011509)*x[1]**o+(-0.438939463736)*x[1]
-        arg[1,3,0,1]=(0.222994482074)*x[0]**o+(-0.488426101986)*x[0]+(-0.799262651825)*x[1]**o+(0.0638880385288)*x[1]
-        arg[1,3,1,0]=(0.690529298963)*x[0]**o+(-0.845248154386)*x[0]+(0.748635110096)*x[1]**o+(0.820882250869)*x[1]
-        arg[1,3,1,1]=(-0.0989162396328)*x[0]**o+(-0.171252734498)*x[0]+(-0.363447812361)*x[1]**o+(-0.06937701403)*x[1]
-        arg[1,3,2,0]=(-0.739647298124)*x[0]**o+(-0.83384135572)*x[0]+(0.546124768813)*x[1]**o+(0.415761104064)*x[1]
-        arg[1,3,2,1]=(0.859487140106)*x[0]**o+(0.481214854724)*x[0]+(0.788685241166)*x[1]**o+(-0.776410333263)*x[1]
-        arg[1,4,0,0]=(-0.312428038681)*x[0]**o+(-0.178596293803)*x[0]+(-0.229770546807)*x[1]**o+(-0.43765633326)*x[1]
-        arg[1,4,0,1]=(-0.974305286188)*x[0]**o+(-0.978154435248)*x[0]+(-0.671799350916)*x[1]**o+(0.645287291694)*x[1]
-        arg[1,4,1,0]=(-0.219711371151)*x[0]**o+(-0.432784911532)*x[0]+(0.552940388883)*x[1]**o+(-0.622742205614)*x[1]
-        arg[1,4,1,1]=(0.677289749287)*x[0]**o+(-0.92825132284)*x[0]+(0.818767358259)*x[1]**o+(-0.426000012305)*x[1]
-        arg[1,4,2,0]=(-0.507474696573)*x[0]**o+(0.0882151625837)*x[0]+(0.826611187078)*x[1]**o+(0.157884229299)*x[1]
-        arg[1,4,2,1]=(0.902398378671)*x[0]**o+(-0.372679984773)*x[0]+(-0.998272135687)*x[1]**o+(0.292294917465)*x[1]
-        arg[2,0,0,0]=(0.699035433674)*x[0]**o+(0.380640017665)*x[0]+(-0.650735771214)*x[1]**o+(-0.55187467604)*x[1]
-        arg[2,0,0,1]=(0.703438074924)*x[0]**o+(0.795508285134)*x[0]+(-0.0650847718675)*x[1]**o+(-0.0250766383001)*x[1]
-        arg[2,0,1,0]=(0.493174434488)*x[0]**o+(-0.775523541313)*x[0]+(0.23184619496)*x[1]**o+(0.343368328234)*x[1]
-        arg[2,0,1,1]=(0.404974280918)*x[0]**o+(0.0673627086244)*x[0]+(-0.843957699955)*x[1]**o+(0.645895713789)*x[1]
-        arg[2,0,2,0]=(0.985047143685)*x[0]**o+(0.969582300743)*x[0]+(0.929427858098)*x[1]**o+(-0.951787413112)*x[1]
-        arg[2,0,2,1]=(0.618505056215)*x[0]**o+(0.685760720523)*x[0]+(0.14594727158)*x[1]**o+(0.816579780815)*x[1]
-        arg[2,1,0,0]=(0.0824953418089)*x[0]**o+(-0.896753351387)*x[0]+(0.415841596602)*x[1]**o+(0.349436600222)*x[1]
-        arg[2,1,0,1]=(-0.904246301273)*x[0]**o+(0.51403543319)*x[0]+(0.0950147832662)*x[1]**o+(0.0482220256459)*x[1]
-        arg[2,1,1,0]=(0.653418547332)*x[0]**o+(0.703094950575)*x[0]+(-0.294924381355)*x[1]**o+(0.889408306649)*x[1]
-        arg[2,1,1,1]=(-0.329361050221)*x[0]**o+(-0.93072021487)*x[0]+(0.0845194032793)*x[1]**o+(-0.310617126183)*x[1]
-        arg[2,1,2,0]=(-0.282371473471)*x[0]**o+(0.387458491178)*x[0]+(0.643908016757)*x[1]**o+(0.303741991451)*x[1]
-        arg[2,1,2,1]=(-0.416872502153)*x[0]**o+(0.373465764073)*x[0]+(-0.90689140487)*x[1]**o+(-0.351052228378)*x[1]
-        arg[2,2,0,0]=(0.494198770026)*x[0]**o+(0.744917026846)*x[0]+(-0.806591346974)*x[1]**o+(-0.812396479226)*x[1]
-        arg[2,2,0,1]=(0.230573331783)*x[0]**o+(-0.449815323831)*x[0]+(-0.662178492084)*x[1]**o+(0.0281786827584)*x[1]
-        arg[2,2,1,0]=(-0.546296599764)*x[0]**o+(-0.457939754236)*x[0]+(-0.0432225723667)*x[1]**o+(0.0431706529852)*x[1]
-        arg[2,2,1,1]=(-0.808174460895)*x[0]**o+(-0.473584203382)*x[0]+(0.567514752294)*x[1]**o+(-0.115780229631)*x[1]
-        arg[2,2,2,0]=(-0.134425008633)*x[0]**o+(-0.103550646345)*x[0]+(-0.588484951305)*x[1]**o+(0.955148281194)*x[1]
-        arg[2,2,2,1]=(0.550095417437)*x[0]**o+(0.943564321046)*x[0]+(-0.990366145789)*x[1]**o+(0.872652302953)*x[1]
-        arg[2,3,0,0]=(0.209341033615)*x[0]**o+(-0.285197252362)*x[0]+(0.961111991429)*x[1]**o+(0.810022268034)*x[1]
-        arg[2,3,0,1]=(0.238319839582)*x[0]**o+(-0.714990515235)*x[0]+(0.0925371590198)*x[1]**o+(0.938145796375)*x[1]
-        arg[2,3,1,0]=(0.889068347007)*x[0]**o+(-0.301904392078)*x[0]+(0.41386941601)*x[1]**o+(-0.973115118701)*x[1]
-        arg[2,3,1,1]=(-0.522083695846)*x[0]**o+(-0.582455208417)*x[0]+(0.725431346859)*x[1]**o+(-0.950157996033)*x[1]
-        arg[2,3,2,0]=(-0.897838142917)*x[0]**o+(0.745488698358)*x[0]+(-0.38910727894)*x[1]**o+(0.614539961316)*x[1]
-        arg[2,3,2,1]=(0.924500645496)*x[0]**o+(-0.68988446876)*x[0]+(-0.466238481805)*x[1]**o+(-0.957703006413)*x[1]
-        arg[2,4,0,0]=(0.280692018949)*x[0]**o+(0.600320489083)*x[0]+(-0.402390231845)*x[1]**o+(0.906721159456)*x[1]
-        arg[2,4,0,1]=(0.50594574787)*x[0]**o+(0.130986910768)*x[0]+(0.272643351394)*x[1]**o+(0.53790545383)*x[1]
-        arg[2,4,1,0]=(-0.627308461808)*x[0]**o+(0.690560028115)*x[0]+(-0.455768647207)*x[1]**o+(0.134926199015)*x[1]
-        arg[2,4,1,1]=(-0.501163279392)*x[0]**o+(0.980144824993)*x[0]+(-0.0358930723173)*x[1]**o+(0.720157452357)*x[1]
-        arg[2,4,2,0]=(-0.609861117539)*x[0]**o+(0.965699461849)*x[0]+(0.305674136837)*x[1]**o+(-0.578333683729)*x[1]
-        arg[2,4,2,1]=(-0.921051416627)*x[0]**o+(-0.703479746028)*x[0]+(-0.0189027931731)*x[1]**o+(0.403415497212)*x[1]
-        arg[3,0,0,0]=(-0.846266714886)*x[0]**o+(-0.103621657972)*x[0]+(0.217340457606)*x[1]**o+(-0.537654290693)*x[1]
-        arg[3,0,0,1]=(0.186251745403)*x[0]**o+(0.694458841658)*x[0]+(0.126837362883)*x[1]**o+(0.0997502401792)*x[1]
-        arg[3,0,1,0]=(0.153737843143)*x[0]**o+(0.811590040899)*x[0]+(0.189363446699)*x[1]**o+(0.00688399857093)*x[1]
-        arg[3,0,1,1]=(-0.912444421339)*x[0]**o+(-0.68504171198)*x[0]+(-0.820717153919)*x[1]**o+(-0.00475951426309)*x[1]
-        arg[3,0,2,0]=(0.908522439455)*x[0]**o+(-0.911126936858)*x[0]+(0.0424198145962)*x[1]**o+(-0.352097158128)*x[1]
-        arg[3,0,2,1]=(0.935127271967)*x[0]**o+(0.154700792222)*x[0]+(-0.283148208173)*x[1]**o+(-0.607541482501)*x[1]
-        arg[3,1,0,0]=(-0.131329160543)*x[0]**o+(0.24170180662)*x[0]+(-0.00893591013587)*x[1]**o+(0.262635048958)*x[1]
-        arg[3,1,0,1]=(-0.559200924561)*x[0]**o+(0.509310116425)*x[0]+(0.484486720282)*x[1]**o+(-0.89314080386)*x[1]
-        arg[3,1,1,0]=(0.355094442114)*x[0]**o+(-0.748398915688)*x[0]+(-0.379187476624)*x[1]**o+(0.447409858108)*x[1]
-        arg[3,1,1,1]=(0.170855109103)*x[0]**o+(-0.48925054508)*x[0]+(0.840559727559)*x[1]**o+(0.0359562471889)*x[1]
-        arg[3,1,2,0]=(0.827586094521)*x[0]**o+(0.0231820503547)*x[0]+(0.457192172855)*x[1]**o+(0.826960230377)*x[1]
-        arg[3,1,2,1]=(-0.962890676345)*x[0]**o+(-0.112439391098)*x[0]+(-0.865510686025)*x[1]**o+(-0.539059426684)*x[1]
-        arg[3,2,0,0]=(-0.165030011664)*x[0]**o+(-0.285694090419)*x[0]+(-0.522579583443)*x[1]**o+(0.73946640768)*x[1]
-        arg[3,2,0,1]=(0.809351962503)*x[0]**o+(-0.872047628102)*x[0]+(0.61415433255)*x[1]**o+(0.132268088986)*x[1]
-        arg[3,2,1,0]=(-0.587823544835)*x[0]**o+(-0.416092975475)*x[0]+(0.829027070431)*x[1]**o+(0.805271620727)*x[1]
-        arg[3,2,1,1]=(-0.0107935093527)*x[0]**o+(0.988434287979)*x[0]+(0.941743055822)*x[1]**o+(0.137807879334)*x[1]
-        arg[3,2,2,0]=(-0.855931527408)*x[0]**o+(0.575075608849)*x[0]+(0.11916967111)*x[1]**o+(-0.472844336533)*x[1]
-        arg[3,2,2,1]=(-0.542112514875)*x[0]**o+(0.081308081083)*x[0]+(-0.934575648869)*x[1]**o+(-0.218208369535)*x[1]
-        arg[3,3,0,0]=(0.486635391195)*x[0]**o+(0.995728500002)*x[0]+(-0.686767180456)*x[1]**o+(0.246849483855)*x[1]
-        arg[3,3,0,1]=(-0.331571848212)*x[0]**o+(0.801870431206)*x[0]+(-0.91142654055)*x[1]**o+(0.089854528457)*x[1]
-        arg[3,3,1,0]=(-0.657455652936)*x[0]**o+(-0.721466128651)*x[0]+(0.0420989631458)*x[1]**o+(-0.982316453325)*x[1]
-        arg[3,3,1,1]=(-0.709257565086)*x[0]**o+(0.689028730506)*x[0]+(-0.196516960475)*x[1]**o+(-0.216704841188)*x[1]
-        arg[3,3,2,0]=(-0.910547650394)*x[0]**o+(-0.977471949987)*x[0]+(0.37319115353)*x[1]**o+(-0.248978955796)*x[1]
-        arg[3,3,2,1]=(-0.71025804576)*x[0]**o+(0.373559860529)*x[0]+(-0.9064074733)*x[1]**o+(-0.542012058073)*x[1]
-        arg[3,4,0,0]=(-0.649273580176)*x[0]**o+(0.525784948768)*x[0]+(-0.213929862516)*x[1]**o+(-0.162295172275)*x[1]
-        arg[3,4,0,1]=(0.209784328978)*x[0]**o+(-0.972601183002)*x[0]+(-0.730886568265)*x[1]**o+(0.966415518759)*x[1]
-        arg[3,4,1,0]=(-0.334060094293)*x[0]**o+(0.29371522739)*x[0]+(0.936156150108)*x[1]**o+(-0.257026769476)*x[1]
-        arg[3,4,1,1]=(-0.0465451767064)*x[0]**o+(0.115525862669)*x[0]+(0.891280073228)*x[1]**o+(-0.0436233989979)*x[1]
-        arg[3,4,2,0]=(-0.748697989123)*x[0]**o+(0.246672415445)*x[0]+(0.62642302161)*x[1]**o+(-0.411644161038)*x[1]
-        arg[3,4,2,1]=(0.850132316298)*x[0]**o+(0.939463534845)*x[0]+(0.0437756618735)*x[1]**o+(-0.955198146074)*x[1]
-        ref[0,0,0,0]=(-0.238250641196)*(1+2.*(dim-1.)/(o+1.))+(0.0600873815876)*dim
-        ref[0,0,0,1]=(-0.850813286447)*(1+2.*(dim-1.)/(o+1.))+(-0.28955404176)*dim
-        ref[0,0,1,0]=(0.801090795659)*(1+2.*(dim-1.)/(o+1.))+(-1.14951117372)*dim
-        ref[0,0,1,1]=(0.0372749343294)*(1+2.*(dim-1.)/(o+1.))+(-0.000924603180129)*dim
-        ref[0,0,2,0]=(0.675746582079)*(1+2.*(dim-1.)/(o+1.))+(-0.102721066912)*dim
-        ref[0,0,2,1]=(0.49235149033)*(1+2.*(dim-1.)/(o+1.))+(1.11945848694)*dim
-        ref[0,1,0,0]=(-0.328081063906)*(1+2.*(dim-1.)/(o+1.))+(-0.723928612706)*dim
-        ref[0,1,0,1]=(0.221064502678)*(1+2.*(dim-1.)/(o+1.))+(0.355700500092)*dim
-        ref[0,1,1,0]=(0.365917757777)*(1+2.*(dim-1.)/(o+1.))+(-1.14536604644)*dim
-        ref[0,1,1,1]=(-0.118397535132)*(1+2.*(dim-1.)/(o+1.))+(-0.667480263002)*dim
-        ref[0,1,2,0]=(-0.151876137936)*(1+2.*(dim-1.)/(o+1.))+(-0.154192190988)*dim
-        ref[0,1,2,1]=(-0.14200138068)*(1+2.*(dim-1.)/(o+1.))+(-0.115708012186)*dim
-        ref[0,2,0,0]=(-0.0297408850402)*(1+2.*(dim-1.)/(o+1.))+(0.455966933793)*dim
-        ref[0,2,0,1]=(0.306248468995)*(1+2.*(dim-1.)/(o+1.))+(-0.739470176504)*dim
-        ref[0,2,1,0]=(-1.07069902254)*(1+2.*(dim-1.)/(o+1.))+(0.362039437233)*dim
-        ref[0,2,1,1]=(1.27483788836)*(1+2.*(dim-1.)/(o+1.))+(0.192458109913)*dim
-        ref[0,2,2,0]=(0.575364494839)*(1+2.*(dim-1.)/(o+1.))+(-0.0960630957749)*dim
-        ref[0,2,2,1]=(1.55008542732)*(1+2.*(dim-1.)/(o+1.))+(0.938002240064)*dim
-        ref[0,3,0,0]=(-1.0203558498)*(1+2.*(dim-1.)/(o+1.))+(-0.899787941357)*dim
-        ref[0,3,0,1]=(-0.230516102889)*(1+2.*(dim-1.)/(o+1.))+(0.445128743903)*dim
-        ref[0,3,1,0]=(1.11519461774)*(1+2.*(dim-1.)/(o+1.))+(0.169843961604)*dim
-        ref[0,3,1,1]=(0.693437991388)*(1+2.*(dim-1.)/(o+1.))+(-0.317763193117)*dim
-        ref[0,3,2,0]=(0.443131514562)*(1+2.*(dim-1.)/(o+1.))+(0.666973868262)*dim
-        ref[0,3,2,1]=(0.379381381335)*(1+2.*(dim-1.)/(o+1.))+(0.875166482503)*dim
-        ref[0,4,0,0]=(0.774839069479)*(1+2.*(dim-1.)/(o+1.))+(-0.576453574642)*dim
-        ref[0,4,0,1]=(-1.51006312489)*(1+2.*(dim-1.)/(o+1.))+(-0.416333953063)*dim
-        ref[0,4,1,0]=(-0.0121738965054)*(1+2.*(dim-1.)/(o+1.))+(-0.443710365002)*dim
-        ref[0,4,1,1]=(0.889057189568)*(1+2.*(dim-1.)/(o+1.))+(0.344851315468)*dim
-        ref[0,4,2,0]=(0.612526131884)*(1+2.*(dim-1.)/(o+1.))+(0.987175930567)*dim
-        ref[0,4,2,1]=(-0.529852888099)*(1+2.*(dim-1.)/(o+1.))+(0.368217232392)*dim
-        ref[1,0,0,0]=(0.325056920187)*(1+2.*(dim-1.)/(o+1.))+(0.372444177524)*dim
-        ref[1,0,0,1]=(-1.35663541651)*(1+2.*(dim-1.)/(o+1.))+(1.16719891258)*dim
-        ref[1,0,1,0]=(-0.453939765458)*(1+2.*(dim-1.)/(o+1.))+(-0.240720520301)*dim
-        ref[1,0,1,1]=(0.632069743814)*(1+2.*(dim-1.)/(o+1.))+(0.645096673298)*dim
-        ref[1,0,2,0]=(-0.394358616867)*(1+2.*(dim-1.)/(o+1.))+(-1.25456271654)*dim
-        ref[1,0,2,1]=(-1.32963525903)*(1+2.*(dim-1.)/(o+1.))+(-0.671511618288)*dim
-        ref[1,1,0,0]=(0.648323684378)*(1+2.*(dim-1.)/(o+1.))+(1.5140558313)*dim
-        ref[1,1,0,1]=(-0.251177152841)*(1+2.*(dim-1.)/(o+1.))+(-1.28086389996)*dim
-        ref[1,1,1,0]=(1.70962212667)*(1+2.*(dim-1.)/(o+1.))+(1.2400982776)*dim
-        ref[1,1,1,1]=(0.768394214775)*(1+2.*(dim-1.)/(o+1.))+(-0.202648250425)*dim
-        ref[1,1,2,0]=(1.87997116043)*(1+2.*(dim-1.)/(o+1.))+(0.0266736721392)*dim
-        ref[1,1,2,1]=(0.233252509524)*(1+2.*(dim-1.)/(o+1.))+(0.585492852322)*dim
-        ref[1,2,0,0]=(0.182302554291)*(1+2.*(dim-1.)/(o+1.))+(-1.53240275559)*dim
-        ref[1,2,0,1]=(1.180720554)*(1+2.*(dim-1.)/(o+1.))+(-0.0573859605549)*dim
-        ref[1,2,1,0]=(-0.883716231171)*(1+2.*(dim-1.)/(o+1.))+(-0.539035904746)*dim
-        ref[1,2,1,1]=(-1.20573363774)*(1+2.*(dim-1.)/(o+1.))+(-0.800978801193)*dim
-        ref[1,2,2,0]=(1.27431056921)*(1+2.*(dim-1.)/(o+1.))+(-0.066118345127)*dim
-        ref[1,2,2,1]=(0.0429953049979)*(1+2.*(dim-1.)/(o+1.))+(-0.211917566223)*dim
-        ref[1,3,0,0]=(-0.241004433021)*(1+2.*(dim-1.)/(o+1.))+(-0.356056991836)*dim
-        ref[1,3,0,1]=(-0.576268169751)*(1+2.*(dim-1.)/(o+1.))+(-0.424538063457)*dim
-        ref[1,3,1,0]=(1.43916440906)*(1+2.*(dim-1.)/(o+1.))+(-0.0243659035174)*dim
-        ref[1,3,1,1]=(-0.462364051993)*(1+2.*(dim-1.)/(o+1.))+(-0.240629748528)*dim
-        ref[1,3,2,0]=(-0.193522529311)*(1+2.*(dim-1.)/(o+1.))+(-0.418080251656)*dim
-        ref[1,3,2,1]=(1.64817238127)*(1+2.*(dim-1.)/(o+1.))+(-0.295195478539)*dim
-        ref[1,4,0,0]=(-0.542198585489)*(1+2.*(dim-1.)/(o+1.))+(-0.616252627062)*dim
-        ref[1,4,0,1]=(-1.6461046371)*(1+2.*(dim-1.)/(o+1.))+(-0.332867143554)*dim
-        ref[1,4,1,0]=(0.333229017732)*(1+2.*(dim-1.)/(o+1.))+(-1.05552711715)*dim
-        ref[1,4,1,1]=(1.49605710755)*(1+2.*(dim-1.)/(o+1.))+(-1.35425133515)*dim
-        ref[1,4,2,0]=(0.319136490505)*(1+2.*(dim-1.)/(o+1.))+(0.246099391883)*dim
-        ref[1,4,2,1]=(-0.0958737570155)*(1+2.*(dim-1.)/(o+1.))+(-0.0803850673082)*dim
-        ref[2,0,0,0]=(0.0482996624604)*(1+2.*(dim-1.)/(o+1.))+(-0.171234658375)*dim
-        ref[2,0,0,1]=(0.638353303057)*(1+2.*(dim-1.)/(o+1.))+(0.770431646834)*dim
-        ref[2,0,1,0]=(0.725020629449)*(1+2.*(dim-1.)/(o+1.))+(-0.432155213079)*dim
-        ref[2,0,1,1]=(-0.438983419037)*(1+2.*(dim-1.)/(o+1.))+(0.713258422414)*dim
-        ref[2,0,2,0]=(1.91447500178)*(1+2.*(dim-1.)/(o+1.))+(0.0177948876308)*dim
-        ref[2,0,2,1]=(0.764452327795)*(1+2.*(dim-1.)/(o+1.))+(1.50234050134)*dim
-        ref[2,1,0,0]=(0.498336938411)*(1+2.*(dim-1.)/(o+1.))+(-0.547316751164)*dim
-        ref[2,1,0,1]=(-0.809231518007)*(1+2.*(dim-1.)/(o+1.))+(0.562257458836)*dim
-        ref[2,1,1,0]=(0.358494165977)*(1+2.*(dim-1.)/(o+1.))+(1.59250325722)*dim
-        ref[2,1,1,1]=(-0.244841646941)*(1+2.*(dim-1.)/(o+1.))+(-1.24133734105)*dim
-        ref[2,1,2,0]=(0.361536543287)*(1+2.*(dim-1.)/(o+1.))+(0.691200482629)*dim
-        ref[2,1,2,1]=(-1.32376390702)*(1+2.*(dim-1.)/(o+1.))+(0.0224135356952)*dim
-        ref[2,2,0,0]=(-0.312392576948)*(1+2.*(dim-1.)/(o+1.))+(-0.06747945238)*dim
-        ref[2,2,0,1]=(-0.431605160301)*(1+2.*(dim-1.)/(o+1.))+(-0.421636641073)*dim
-        ref[2,2,1,0]=(-0.589519172131)*(1+2.*(dim-1.)/(o+1.))+(-0.414769101251)*dim
-        ref[2,2,1,1]=(-0.240659708601)*(1+2.*(dim-1.)/(o+1.))+(-0.589364433013)*dim
-        ref[2,2,2,0]=(-0.722909959939)*(1+2.*(dim-1.)/(o+1.))+(0.851597634849)*dim
-        ref[2,2,2,1]=(-0.440270728352)*(1+2.*(dim-1.)/(o+1.))+(1.816216624)*dim
-        ref[2,3,0,0]=(1.17045302504)*(1+2.*(dim-1.)/(o+1.))+(0.524825015672)*dim
-        ref[2,3,0,1]=(0.330856998602)*(1+2.*(dim-1.)/(o+1.))+(0.22315528114)*dim
-        ref[2,3,1,0]=(1.30293776302)*(1+2.*(dim-1.)/(o+1.))+(-1.27501951078)*dim
-        ref[2,3,1,1]=(0.203347651013)*(1+2.*(dim-1.)/(o+1.))+(-1.53261320445)*dim
-        ref[2,3,2,0]=(-1.28694542186)*(1+2.*(dim-1.)/(o+1.))+(1.36002865967)*dim
-        ref[2,3,2,1]=(0.458262163691)*(1+2.*(dim-1.)/(o+1.))+(-1.64758747517)*dim
-        ref[2,4,0,0]=(-0.121698212896)*(1+2.*(dim-1.)/(o+1.))+(1.50704164854)*dim
-        ref[2,4,0,1]=(0.778589099264)*(1+2.*(dim-1.)/(o+1.))+(0.668892364598)*dim
-        ref[2,4,1,0]=(-1.08307710902)*(1+2.*(dim-1.)/(o+1.))+(0.82548622713)*dim
-        ref[2,4,1,1]=(-0.537056351709)*(1+2.*(dim-1.)/(o+1.))+(1.70030227735)*dim
-        ref[2,4,2,0]=(-0.304186980702)*(1+2.*(dim-1.)/(o+1.))+(0.38736577812)*dim
-        ref[2,4,2,1]=(-0.9399542098)*(1+2.*(dim-1.)/(o+1.))+(-0.300064248815)*dim
-        ref[3,0,0,0]=(-0.62892625728)*(1+2.*(dim-1.)/(o+1.))+(-0.641275948665)*dim
-        ref[3,0,0,1]=(0.313089108286)*(1+2.*(dim-1.)/(o+1.))+(0.794209081837)*dim
-        ref[3,0,1,0]=(0.343101289842)*(1+2.*(dim-1.)/(o+1.))+(0.81847403947)*dim
-        ref[3,0,1,1]=(-1.73316157526)*(1+2.*(dim-1.)/(o+1.))+(-0.689801226243)*dim
-        ref[3,0,2,0]=(0.950942254051)*(1+2.*(dim-1.)/(o+1.))+(-1.26322409499)*dim
-        ref[3,0,2,1]=(0.651979063795)*(1+2.*(dim-1.)/(o+1.))+(-0.452840690279)*dim
-        ref[3,1,0,0]=(-0.140265070679)*(1+2.*(dim-1.)/(o+1.))+(0.504336855579)*dim
-        ref[3,1,0,1]=(-0.074714204279)*(1+2.*(dim-1.)/(o+1.))+(-0.383830687435)*dim
-        ref[3,1,1,0]=(-0.0240930345095)*(1+2.*(dim-1.)/(o+1.))+(-0.30098905758)*dim
-        ref[3,1,1,1]=(1.01141483666)*(1+2.*(dim-1.)/(o+1.))+(-0.453294297891)*dim
-        ref[3,1,2,0]=(1.28477826738)*(1+2.*(dim-1.)/(o+1.))+(0.850142280731)*dim
-        ref[3,1,2,1]=(-1.82840136237)*(1+2.*(dim-1.)/(o+1.))+(-0.651498817783)*dim
-        ref[3,2,0,0]=(-0.687609595107)*(1+2.*(dim-1.)/(o+1.))+(0.453772317262)*dim
-        ref[3,2,0,1]=(1.42350629505)*(1+2.*(dim-1.)/(o+1.))+(-0.739779539116)*dim
-        ref[3,2,1,0]=(0.241203525596)*(1+2.*(dim-1.)/(o+1.))+(0.389178645253)*dim
-        ref[3,2,1,1]=(0.930949546469)*(1+2.*(dim-1.)/(o+1.))+(1.12624216731)*dim
-        ref[3,2,2,0]=(-0.736761856298)*(1+2.*(dim-1.)/(o+1.))+(0.102231272315)*dim
-        ref[3,2,2,1]=(-1.47668816374)*(1+2.*(dim-1.)/(o+1.))+(-0.136900288452)*dim
-        ref[3,3,0,0]=(-0.200131789262)*(1+2.*(dim-1.)/(o+1.))+(1.24257798386)*dim
-        ref[3,3,0,1]=(-1.24299838876)*(1+2.*(dim-1.)/(o+1.))+(0.891724959663)*dim
-        ref[3,3,1,0]=(-0.61535668979)*(1+2.*(dim-1.)/(o+1.))+(-1.70378258198)*dim
-        ref[3,3,1,1]=(-0.905774525561)*(1+2.*(dim-1.)/(o+1.))+(0.472323889318)*dim
-        ref[3,3,2,0]=(-0.537356496864)*(1+2.*(dim-1.)/(o+1.))+(-1.22645090578)*dim
-        ref[3,3,2,1]=(-1.61666551906)*(1+2.*(dim-1.)/(o+1.))+(-0.168452197544)*dim
-        ref[3,4,0,0]=(-0.863203442693)*(1+2.*(dim-1.)/(o+1.))+(0.363489776493)*dim
-        ref[3,4,0,1]=(-0.521102239287)*(1+2.*(dim-1.)/(o+1.))+(-0.00618566424301)*dim
-        ref[3,4,1,0]=(0.602096055815)*(1+2.*(dim-1.)/(o+1.))+(0.0366884579134)*dim
-        ref[3,4,1,1]=(0.844734896522)*(1+2.*(dim-1.)/(o+1.))+(0.0719024636709)*dim
-        ref[3,4,2,0]=(-0.122274967513)*(1+2.*(dim-1.)/(o+1.))+(-0.164971745593)*dim
-        ref[3,4,2,1]=(0.893907978172)*(1+2.*(dim-1.)/(o+1.))+(-0.0157346112292)*dim
-      else:
-        arg[0,0,0,0]=(-0.0445963085788)*x[0]**o+(0.649401127647)*x[0]+(-0.949035518207)*x[1]**o+(0.620675629012)*x[1]+(0.379727527503)*x[2]**o+(0.0321033403935)*x[2]
-        arg[0,0,0,1]=(-0.334483142061)*x[0]**o+(-0.408749824143)*x[0]+(-0.427042441291)*x[1]**o+(-0.263818177378)*x[1]+(-0.0490001897328)*x[2]**o+(0.925792628022)*x[2]
-        arg[0,0,1,0]=(0.632498844224)*x[0]**o+(-0.756487058254)*x[0]+(-0.0277391041902)*x[1]**o+(0.615017171892)*x[1]+(-0.0956053270216)*x[2]**o+(-0.0383148218356)*x[2]
-        arg[0,0,1,1]=(0.560189295143)*x[0]**o+(-0.565632451768)*x[0]+(0.131609132282)*x[1]**o+(0.689012872903)*x[1]+(-0.0542418297927)*x[2]**o+(-0.816694105058)*x[2]
-        arg[0,0,2,0]=(-0.606523401606)*x[0]**o+(-0.129782638438)*x[0]+(0.286554604329)*x[1]**o+(-0.264164004519)*x[1]+(-0.145168356054)*x[2]**o+(0.346147680755)*x[2]
-        arg[0,0,2,1]=(-0.847528471559)*x[0]**o+(-0.50641170288)*x[0]+(-0.773325001399)*x[1]**o+(0.517649361249)*x[1]+(-0.531000881434)*x[2]**o+(0.220222077563)*x[2]
-        arg[0,1,0,0]=(-0.0946495378384)*x[0]**o+(-0.312650449416)*x[0]+(0.183321918505)*x[1]**o+(-0.359448777446)*x[1]+(0.713219915733)*x[2]**o+(-0.436742264028)*x[2]
-        arg[0,1,0,1]=(0.856947337921)*x[0]**o+(0.497228192699)*x[0]+(0.351718755501)*x[1]**o+(-0.928210477058)*x[1]+(0.586853747677)*x[2]**o+(-0.915642724205)*x[2]
-        arg[0,1,1,0]=(-0.745330469339)*x[0]**o+(-0.724610807566)*x[0]+(0.821804346007)*x[1]**o+(0.241991559492)*x[1]+(0.508380905493)*x[2]**o+(0.756706999359)*x[2]
-        arg[0,1,1,1]=(-0.647952004012)*x[0]**o+(0.940964624139)*x[0]+(-0.620895246845)*x[1]**o+(0.577736885116)*x[1]+(0.228716730257)*x[2]**o+(0.336914427419)*x[2]
-        arg[0,1,2,0]=(-0.671541115529)*x[0]**o+(0.153595444626)*x[0]+(0.420649971716)*x[1]**o+(-0.459078302559)*x[1]+(-0.583263239511)*x[2]**o+(-0.927250932344)*x[2]
-        arg[0,1,2,1]=(-0.893954406097)*x[0]**o+(0.266297374506)*x[0]+(-0.777463374391)*x[1]**o+(0.0905062188555)*x[1]+(-0.668756964585)*x[2]**o+(-0.580980380472)*x[2]
-        arg[0,2,0,0]=(0.424449538697)*x[0]**o+(0.0787502268502)*x[0]+(-0.645996834851)*x[1]**o+(-0.0409730346273)*x[1]+(0.835463212243)*x[2]**o+(0.716052012249)*x[2]
-        arg[0,2,0,1]=(0.0241441154932)*x[0]**o+(-0.580242261617)*x[0]+(0.693484316968)*x[1]**o+(0.198598746328)*x[1]+(-0.586283866696)*x[2]**o+(-0.595008846645)*x[2]
-        arg[0,2,1,0]=(0.074643270363)*x[0]**o+(0.454053362138)*x[0]+(0.861855819289)*x[1]**o+(-0.0310194739742)*x[1]+(-0.35738290172)*x[2]**o+(-0.400226698584)*x[2]
-        arg[0,2,1,1]=(0.61780464269)*x[0]**o+(-0.702818770068)*x[0]+(0.0840653474306)*x[1]**o+(0.786842849442)*x[1]+(0.0704342755849)*x[2]**o+(0.386459053939)*x[2]
-        arg[0,2,2,0]=(-0.815363379053)*x[0]**o+(-0.621823615812)*x[0]+(-0.13535005543)*x[1]**o+(-0.127080917834)*x[1]+(-0.178866000441)*x[2]**o+(-0.0753933476244)*x[2]
-        arg[0,2,2,1]=(0.400194366678)*x[0]**o+(0.075003395019)*x[0]+(-0.35708995046)*x[1]**o+(-0.370028795924)*x[1]+(-0.674944523932)*x[2]**o+(-0.437373855225)*x[2]
-        arg[0,3,0,0]=(-0.736317751792)*x[0]**o+(0.671627391036)*x[0]+(0.0768737429532)*x[1]**o+(-0.90036869218)*x[1]+(0.796767364925)*x[2]**o+(-0.185034722102)*x[2]
-        arg[0,3,0,1]=(0.530921403378)*x[0]**o+(0.970385957718)*x[0]+(-0.75659968724)*x[1]**o+(-0.437200812366)*x[1]+(0.0519374612092)*x[2]**o+(0.657323406602)*x[2]
-        arg[0,3,1,0]=(-0.109751102222)*x[0]**o+(-0.154990305064)*x[0]+(-0.502004367351)*x[1]**o+(0.535266424739)*x[1]+(-0.968926773395)*x[2]**o+(-0.138032126456)*x[2]
-        arg[0,3,1,1]=(0.509506900641)*x[0]**o+(-0.872357145765)*x[0]+(-0.154129018225)*x[1]**o+(0.0190914956768)*x[1]+(0.119094726078)*x[2]**o+(0.29593674915)*x[2]
-        arg[0,3,2,0]=(-0.133398979819)*x[0]**o+(-0.780852347888)*x[0]+(-0.346576066687)*x[1]**o+(0.187923380934)*x[1]+(0.939817544138)*x[2]**o+(-0.497081081638)*x[2]
-        arg[0,3,2,1]=(-0.908783140711)*x[0]**o+(0.541754659297)*x[0]+(-0.297350066105)*x[1]**o+(0.118676031731)*x[1]+(0.985854358996)*x[2]**o+(-0.424715359194)*x[2]
-        arg[0,4,0,0]=(0.341191520307)*x[0]**o+(-0.252381555804)*x[0]+(-0.307289805415)*x[1]**o+(0.762228901652)*x[1]+(0.390901852611)*x[2]**o+(0.147349139229)*x[2]
-        arg[0,4,0,1]=(0.236625833503)*x[0]**o+(0.856322905978)*x[0]+(-0.160244298088)*x[1]**o+(-0.971940590481)*x[1]+(-0.0829366716357)*x[2]**o+(-0.687610358703)*x[2]
-        arg[0,4,1,0]=(0.619591455739)*x[0]**o+(-0.62589432832)*x[0]+(-0.0275687591477)*x[1]**o+(0.367590198294)*x[1]+(0.745367285277)*x[2]**o+(0.232571513762)*x[2]
-        arg[0,4,1,1]=(0.317669904199)*x[0]**o+(0.741734360559)*x[0]+(-0.923644886773)*x[1]**o+(-0.725994528938)*x[1]+(-0.949385908603)*x[2]**o+(-0.0515088731457)*x[2]
-        arg[0,4,2,0]=(0.82547889841)*x[0]**o+(-0.926970312436)*x[0]+(0.946941744691)*x[1]**o+(-0.171582097545)*x[1]+(-0.185628570945)*x[2]**o+(0.40495393086)*x[2]
-        arg[0,4,2,1]=(0.51879613184)*x[0]**o+(-0.517447781109)*x[0]+(-0.288826585096)*x[1]**o+(-0.736890998485)*x[1]+(-0.167119326999)*x[2]**o+(-0.653082372893)*x[2]
-        arg[1,0,0,0]=(-0.879008868811)*x[0]**o+(-0.0613987509179)*x[0]+(-0.671288168832)*x[1]**o+(-0.959517297906)*x[1]+(0.292554039162)*x[2]**o+(0.942246368678)*x[2]
-        arg[1,0,0,1]=(0.599956815218)*x[0]**o+(0.731601305574)*x[0]+(-0.61593947163)*x[1]**o+(-0.597924796707)*x[1]+(-0.791620695721)*x[2]**o+(-0.562978718552)*x[2]
-        arg[1,0,1,0]=(0.448381207242)*x[0]**o+(-0.178004176549)*x[0]+(0.631841924913)*x[1]**o+(0.311836637044)*x[1]+(0.0619475841251)*x[2]**o+(0.606564490624)*x[2]
-        arg[1,0,1,1]=(0.159907398582)*x[0]**o+(-0.278605461684)*x[0]+(0.822914081538)*x[1]**o+(0.75112795022)*x[1]+(0.91389895436)*x[2]**o+(0.929177149059)*x[2]
-        arg[1,0,2,0]=(-0.472286972241)*x[0]**o+(0.00950883684535)*x[0]+(0.41110884679)*x[1]**o+(0.109422159345)*x[1]+(-0.707436024011)*x[2]**o+(0.795057014561)*x[2]
-        arg[1,0,2,1]=(-0.0156784802605)*x[0]**o+(-0.657283760492)*x[0]+(-0.0422880440635)*x[1]**o+(-0.326436491982)*x[1]+(-0.543917764251)*x[2]**o+(-0.691698129266)*x[2]
-        arg[1,1,0,0]=(-0.814424723604)*x[0]**o+(0.746801606056)*x[0]+(0.22025107532)*x[1]**o+(-0.785254149057)*x[1]+(-0.845637273475)*x[2]**o+(-0.468272754144)*x[2]
-        arg[1,1,0,1]=(-0.0815177460988)*x[0]**o+(-0.47210691717)*x[0]+(-0.285964111717)*x[1]**o+(0.527387496664)*x[1]+(0.87059583429)*x[2]**o+(-0.543899395468)*x[2]
-        arg[1,1,1,0]=(0.424163426295)*x[0]**o+(0.649692204305)*x[0]+(0.0570010318344)*x[1]**o+(-0.426047169951)*x[1]+(0.334750596342)*x[2]**o+(-0.746549570927)*x[2]
-        arg[1,1,1,1]=(-0.120493849358)*x[0]**o+(0.567677110538)*x[0]+(-0.355891513526)*x[1]**o+(0.68069794787)*x[1]+(0.786560156246)*x[2]**o+(-0.422804642829)*x[2]
-        arg[1,1,2,0]=(-0.80298202932)*x[0]**o+(-0.674766348751)*x[0]+(-0.29945072468)*x[1]**o+(0.385941328636)*x[1]+(-0.756272624651)*x[2]**o+(-0.607541099269)*x[2]
-        arg[1,1,2,1]=(0.915020713521)*x[0]**o+(-0.875957199283)*x[0]+(0.0217597029367)*x[1]**o+(-0.0649461013997)*x[1]+(-0.302450259541)*x[2]**o+(0.738498325526)*x[2]
-        arg[1,2,0,0]=(0.239905462913)*x[0]**o+(0.197348893262)*x[0]+(-0.151173414577)*x[1]**o+(0.368405558905)*x[1]+(0.891448032058)*x[2]**o+(0.874975769684)*x[2]
-        arg[1,2,0,1]=(-0.304971614823)*x[0]**o+(-0.0166065674003)*x[0]+(0.883397157318)*x[1]**o+(-0.918803270424)*x[1]+(0.590875856583)*x[2]**o+(-0.360659400522)*x[2]
-        arg[1,2,1,0]=(0.185368540041)*x[0]**o+(0.498866146124)*x[0]+(0.591601152982)*x[1]**o+(-0.986932631453)*x[1]+(-0.525706872664)*x[2]**o+(-0.0462993899877)*x[2]
-        arg[1,2,1,1]=(0.260677894495)*x[0]**o+(-0.216847258131)*x[0]+(0.932876363707)*x[1]**o+(0.761630676808)*x[1]+(0.260889221066)*x[2]**o+(0.546259908582)*x[2]
-        arg[1,2,2,0]=(-0.316803600202)*x[0]**o+(-0.898044300642)*x[0]+(-0.0865001657852)*x[1]**o+(0.760424275199)*x[1]+(0.771564532427)*x[2]**o+(-0.0852237819025)*x[2]
-        arg[1,2,2,1]=(-0.54274371504)*x[0]**o+(0.0822524750896)*x[0]+(0.872655885939)*x[1]**o+(0.594054041006)*x[1]+(0.322150325252)*x[2]**o+(0.774020612668)*x[2]
-        arg[1,3,0,0]=(0.034593806358)*x[0]**o+(0.541638857337)*x[0]+(0.291359214696)*x[1]**o+(-0.203872730757)*x[1]+(0.0312260615928)*x[2]**o+(0.62568815669)*x[2]
-        arg[1,3,0,1]=(-0.31929050432)*x[0]**o+(-0.931756481553)*x[0]+(0.755537511071)*x[1]**o+(-0.182578278538)*x[1]+(0.00958902784528)*x[2]**o+(0.345520390047)*x[2]
-        arg[1,3,1,0]=(-0.435083251076)*x[0]**o+(0.248332963857)*x[0]+(-0.122701495966)*x[1]**o+(0.669350594899)*x[1]+(-0.0758596665333)*x[2]**o+(0.0784997907526)*x[2]
-        arg[1,3,1,1]=(-0.725479421981)*x[0]**o+(0.657242746138)*x[0]+(-0.199958263735)*x[1]**o+(-0.784165440236)*x[1]+(-0.550936676647)*x[2]**o+(-0.31907813038)*x[2]
-        arg[1,3,2,0]=(0.657177346512)*x[0]**o+(-0.168053866293)*x[0]+(0.782142168258)*x[1]**o+(0.660514922866)*x[1]+(0.788106295165)*x[2]**o+(-0.254290645125)*x[2]
-        arg[1,3,2,1]=(-0.215166688682)*x[0]**o+(0.743577328376)*x[0]+(-0.374827404054)*x[1]**o+(0.267885661143)*x[1]+(0.728818301014)*x[2]**o+(0.6828999278)*x[2]
-        arg[1,4,0,0]=(0.371646403413)*x[0]**o+(0.00998777673275)*x[0]+(-0.313378345871)*x[1]**o+(-0.952580545501)*x[1]+(-0.680596974717)*x[2]**o+(-0.181426263871)*x[2]
-        arg[1,4,0,1]=(-0.828437965469)*x[0]**o+(0.302443878606)*x[0]+(0.581310358652)*x[1]**o+(0.714092786618)*x[1]+(0.650179420347)*x[2]**o+(0.663482256421)*x[2]
-        arg[1,4,1,0]=(0.220318191456)*x[0]**o+(0.443108440795)*x[0]+(-0.538413779146)*x[1]**o+(0.660052783252)*x[1]+(-0.846698606343)*x[2]**o+(-0.0447806256913)*x[2]
-        arg[1,4,1,1]=(0.866921895372)*x[0]**o+(0.776291161128)*x[0]+(-0.385318933957)*x[1]**o+(0.841514060614)*x[1]+(-0.401465329431)*x[2]**o+(0.474475442638)*x[2]
-        arg[1,4,2,0]=(-0.222535436657)*x[0]**o+(0.921341450452)*x[0]+(-0.765043798058)*x[1]**o+(-0.492946667792)*x[1]+(0.758817008648)*x[2]**o+(0.0950595321909)*x[2]
-        arg[1,4,2,1]=(0.333884542089)*x[0]**o+(0.671265678974)*x[0]+(-0.719262407869)*x[1]**o+(0.498176251457)*x[1]+(-0.867726438404)*x[2]**o+(-0.872614195608)*x[2]
-        arg[2,0,0,0]=(-0.303331399994)*x[0]**o+(-0.563887060818)*x[0]+(0.64537626236)*x[1]**o+(-0.657611314342)*x[1]+(0.800882746828)*x[2]**o+(0.700671892157)*x[2]
-        arg[2,0,0,1]=(0.417691239931)*x[0]**o+(-0.822789801933)*x[0]+(0.712214951539)*x[1]**o+(0.160960575173)*x[1]+(0.0400205244239)*x[2]**o+(0.49892939112)*x[2]
-        arg[2,0,1,0]=(-0.828677767124)*x[0]**o+(-0.347411290435)*x[0]+(-0.700177402223)*x[1]**o+(-0.42498634463)*x[1]+(0.984172081328)*x[2]**o+(-0.677168643292)*x[2]
-        arg[2,0,1,1]=(-0.423091398412)*x[0]**o+(-0.786913239913)*x[0]+(-0.888102258019)*x[1]**o+(-0.119525894432)*x[1]+(-0.158513498081)*x[2]**o+(0.503403674219)*x[2]
-        arg[2,0,2,0]=(0.547217868614)*x[0]**o+(-0.737401808325)*x[0]+(-0.865530737659)*x[1]**o+(-0.750671412749)*x[1]+(-0.06731420082)*x[2]**o+(0.658572191108)*x[2]
-        arg[2,0,2,1]=(0.501785022047)*x[0]**o+(-0.0542441989122)*x[0]+(-0.379614025724)*x[1]**o+(-0.785618793316)*x[1]+(0.994476365391)*x[2]**o+(-0.436996817494)*x[2]
-        arg[2,1,0,0]=(0.0329439903445)*x[0]**o+(0.688097592632)*x[0]+(0.554030860489)*x[1]**o+(0.60949736297)*x[1]+(0.499716171437)*x[2]**o+(0.501464282299)*x[2]
-        arg[2,1,0,1]=(0.459629414019)*x[0]**o+(0.810658146454)*x[0]+(-0.902023596001)*x[1]**o+(-0.982998009297)*x[1]+(0.487736529196)*x[2]**o+(-0.509164692477)*x[2]
-        arg[2,1,1,0]=(0.0818151896334)*x[0]**o+(-0.931023788966)*x[0]+(-0.217349745187)*x[1]**o+(-0.785586110912)*x[1]+(0.16783052001)*x[2]**o+(-0.515867681053)*x[2]
-        arg[2,1,1,1]=(-0.758874975703)*x[0]**o+(0.219408816573)*x[0]+(0.508187203896)*x[1]**o+(0.306700464008)*x[1]+(-0.641891226105)*x[2]**o+(-0.137752888266)*x[2]
-        arg[2,1,2,0]=(-0.952430879482)*x[0]**o+(0.179895758684)*x[0]+(0.502285174801)*x[1]**o+(-0.82300826605)*x[1]+(-0.267848001419)*x[2]**o+(-0.882529775244)*x[2]
-        arg[2,1,2,1]=(0.371372868601)*x[0]**o+(-0.521801538326)*x[0]+(0.894906517432)*x[1]**o+(0.205799057307)*x[1]+(-0.315840560279)*x[2]**o+(0.65823096555)*x[2]
-        arg[2,2,0,0]=(0.585088762354)*x[0]**o+(0.527662713737)*x[0]+(0.83511043292)*x[1]**o+(-0.263597549489)*x[1]+(-0.342210974079)*x[2]**o+(0.532149528802)*x[2]
-        arg[2,2,0,1]=(0.985868978475)*x[0]**o+(0.162798954854)*x[0]+(-0.887525429296)*x[1]**o+(0.618905848201)*x[1]+(-0.213643353241)*x[2]**o+(0.0170513098359)*x[2]
-        arg[2,2,1,0]=(-0.216402064475)*x[0]**o+(0.350853951704)*x[0]+(0.592219675443)*x[1]**o+(-0.915293916561)*x[1]+(0.160588856435)*x[2]**o+(-0.574686420146)*x[2]
-        arg[2,2,1,1]=(0.233118497878)*x[0]**o+(0.482035958353)*x[0]+(-0.581971661478)*x[1]**o+(0.832450520208)*x[1]+(-0.430914444794)*x[2]**o+(-0.791658025494)*x[2]
-        arg[2,2,2,0]=(-0.710516844)*x[0]**o+(0.0266391730256)*x[0]+(-0.154541997151)*x[1]**o+(-0.232843778379)*x[1]+(0.453522207498)*x[2]**o+(-0.688939516711)*x[2]
-        arg[2,2,2,1]=(0.26860058468)*x[0]**o+(-0.969638661751)*x[0]+(0.623784614857)*x[1]**o+(0.686359051774)*x[1]+(0.677056704385)*x[2]**o+(0.156688176847)*x[2]
-        arg[2,3,0,0]=(-0.0620909841534)*x[0]**o+(-0.364946660535)*x[0]+(-0.388275430806)*x[1]**o+(-0.947908160286)*x[1]+(0.0774302410344)*x[2]**o+(0.374469033649)*x[2]
-        arg[2,3,0,1]=(0.164845147121)*x[0]**o+(0.480213031852)*x[0]+(0.58157030274)*x[1]**o+(0.882820521347)*x[1]+(0.584714825748)*x[2]**o+(0.0285154925376)*x[2]
-        arg[2,3,1,0]=(0.664711234489)*x[0]**o+(0.247415435607)*x[0]+(0.741592287061)*x[1]**o+(0.963505986041)*x[1]+(-0.987844687003)*x[2]**o+(0.998294459659)*x[2]
-        arg[2,3,1,1]=(-0.734529316764)*x[0]**o+(-0.177480004713)*x[0]+(0.923555424779)*x[1]**o+(0.727331498256)*x[1]+(0.452312367674)*x[2]**o+(0.00652243396085)*x[2]
-        arg[2,3,2,0]=(-0.367377897953)*x[0]**o+(-0.157529442804)*x[0]+(-0.121881528621)*x[1]**o+(0.865116726884)*x[1]+(-0.200087079925)*x[2]**o+(0.930889629788)*x[2]
-        arg[2,3,2,1]=(-0.900394562978)*x[0]**o+(-0.762334071565)*x[0]+(-0.723776245294)*x[1]**o+(0.332728994729)*x[1]+(0.390453779523)*x[2]**o+(0.0447350797932)*x[2]
-        arg[2,4,0,0]=(0.178230443819)*x[0]**o+(0.0898732089623)*x[0]+(0.808448952186)*x[1]**o+(0.164579824494)*x[1]+(-0.553032263217)*x[2]**o+(-0.782141879825)*x[2]
-        arg[2,4,0,1]=(-0.105582488753)*x[0]**o+(0.995415696949)*x[0]+(0.978971670365)*x[1]**o+(-0.977866735017)*x[1]+(0.156938966924)*x[2]**o+(-0.120871488936)*x[2]
-        arg[2,4,1,0]=(0.652354601889)*x[0]**o+(0.381186764672)*x[0]+(-0.783479778972)*x[1]**o+(-0.158898829615)*x[1]+(0.794693790129)*x[2]**o+(0.914720093741)*x[2]
-        arg[2,4,1,1]=(0.571506419376)*x[0]**o+(0.906086581152)*x[0]+(-0.798519792125)*x[1]**o+(-0.22840897962)*x[1]+(-0.750891721145)*x[2]**o+(-0.591014038221)*x[2]
-        arg[2,4,2,0]=(0.515982716306)*x[0]**o+(0.299569326845)*x[0]+(-0.407423180268)*x[1]**o+(-0.252103363573)*x[1]+(-0.0228238994531)*x[2]**o+(-0.282150542844)*x[2]
-        arg[2,4,2,1]=(0.5335415942)*x[0]**o+(-0.885728570489)*x[0]+(-0.750810131327)*x[1]**o+(0.604053940679)*x[1]+(-0.0946405866686)*x[2]**o+(-0.423845465234)*x[2]
-        arg[3,0,0,0]=(-0.498025341136)*x[0]**o+(-0.296354416633)*x[0]+(-0.600874889655)*x[1]**o+(0.544042300882)*x[1]+(0.318784851038)*x[2]**o+(-0.801109111437)*x[2]
-        arg[3,0,0,1]=(-0.492361949745)*x[0]**o+(-0.708188092599)*x[0]+(-0.863737808435)*x[1]**o+(0.674889485553)*x[1]+(-0.982254652233)*x[2]**o+(0.682172862189)*x[2]
-        arg[3,0,1,0]=(-0.872692397532)*x[0]**o+(0.563852836655)*x[0]+(-0.0219331486599)*x[1]**o+(-0.858175679559)*x[1]+(0.802432631538)*x[2]**o+(-0.655545287387)*x[2]
-        arg[3,0,1,1]=(-0.538117166854)*x[0]**o+(-0.62507518352)*x[0]+(0.101524298816)*x[1]**o+(0.590432448393)*x[1]+(0.668057302006)*x[2]**o+(0.405382330056)*x[2]
-        arg[3,0,2,0]=(-0.322916455064)*x[0]**o+(0.950624857669)*x[0]+(0.485623846818)*x[1]**o+(-0.12611522301)*x[1]+(0.503586393973)*x[2]**o+(0.109451719709)*x[2]
-        arg[3,0,2,1]=(0.0289965995645)*x[0]**o+(0.0101440661359)*x[0]+(-0.303827119958)*x[1]**o+(0.355269935141)*x[1]+(0.29889427526)*x[2]**o+(-0.707999988781)*x[2]
-        arg[3,1,0,0]=(-0.541382521848)*x[0]**o+(0.534108535206)*x[0]+(0.875610773119)*x[1]**o+(-0.575849439451)*x[1]+(-0.0836939606164)*x[2]**o+(0.433678856889)*x[2]
-        arg[3,1,0,1]=(0.0322576144027)*x[0]**o+(0.794219359514)*x[0]+(0.629442621265)*x[1]**o+(0.0517726053499)*x[1]+(-0.776050101686)*x[2]**o+(0.697910196708)*x[2]
-        arg[3,1,1,0]=(-0.198211682395)*x[0]**o+(-0.926268101941)*x[0]+(-0.904760383993)*x[1]**o+(-0.820075667018)*x[1]+(-0.101262044428)*x[2]**o+(-0.0621221772941)*x[2]
-        arg[3,1,1,1]=(-0.531324749521)*x[0]**o+(0.736017207718)*x[0]+(0.487299696259)*x[1]**o+(-0.00604423021253)*x[1]+(-0.635722590088)*x[2]**o+(-0.143501730927)*x[2]
-        arg[3,1,2,0]=(-0.731421637848)*x[0]**o+(-0.0371648783851)*x[0]+(-0.290362466891)*x[1]**o+(-0.375048584106)*x[1]+(-0.854622532092)*x[2]**o+(-0.794295905388)*x[2]
-        arg[3,1,2,1]=(-0.766383422105)*x[0]**o+(0.149248159984)*x[0]+(0.970103674649)*x[1]**o+(-0.117794368107)*x[1]+(0.0178775633047)*x[2]**o+(-0.221126829278)*x[2]
-        arg[3,2,0,0]=(0.706586887601)*x[0]**o+(0.162520023447)*x[0]+(-0.731539880336)*x[1]**o+(-0.992558519713)*x[1]+(0.426569303014)*x[2]**o+(0.0451783819487)*x[2]
-        arg[3,2,0,1]=(0.0392295508272)*x[0]**o+(-0.157929005382)*x[0]+(0.0636418899878)*x[1]**o+(0.892501759578)*x[1]+(-0.368161001401)*x[2]**o+(-0.715520794543)*x[2]
-        arg[3,2,1,0]=(0.889667707133)*x[0]**o+(0.308604168817)*x[0]+(-0.275558663983)*x[1]**o+(-0.408210095215)*x[1]+(-0.0918000869138)*x[2]**o+(0.142754064645)*x[2]
-        arg[3,2,1,1]=(0.585831954407)*x[0]**o+(-0.705004375516)*x[0]+(0.657277099061)*x[1]**o+(-0.972401794257)*x[1]+(-0.658049310396)*x[2]**o+(-0.553961555706)*x[2]
-        arg[3,2,2,0]=(0.88916769079)*x[0]**o+(-0.1401162684)*x[0]+(-0.396496633317)*x[1]**o+(0.215029522669)*x[1]+(-0.619023294208)*x[2]**o+(-0.187670706968)*x[2]
-        arg[3,2,2,1]=(-0.262983340384)*x[0]**o+(-0.763236528477)*x[0]+(-0.339720289405)*x[1]**o+(-0.283077066751)*x[1]+(0.625600522278)*x[2]**o+(-0.132697432298)*x[2]
-        arg[3,3,0,0]=(-0.346408105223)*x[0]**o+(0.299760534041)*x[0]+(0.567951405594)*x[1]**o+(-0.880683463459)*x[1]+(0.784127947661)*x[2]**o+(0.268895744072)*x[2]
-        arg[3,3,0,1]=(0.064159345936)*x[0]**o+(-0.685098798117)*x[0]+(-0.182310885124)*x[1]**o+(-0.700081075257)*x[1]+(0.543959312437)*x[2]**o+(0.125104170434)*x[2]
-        arg[3,3,1,0]=(0.460375837083)*x[0]**o+(0.82355800923)*x[0]+(-0.186000244328)*x[1]**o+(0.8418355439)*x[1]+(-0.375269292115)*x[2]**o+(0.712431840155)*x[2]
-        arg[3,3,1,1]=(0.57260867805)*x[0]**o+(-0.146405851776)*x[0]+(-0.50640779246)*x[1]**o+(0.741760309299)*x[1]+(0.069752390409)*x[2]**o+(-0.376724191471)*x[2]
-        arg[3,3,2,0]=(0.795493408403)*x[0]**o+(0.396861648344)*x[0]+(-0.728716068325)*x[1]**o+(0.739330072416)*x[1]+(0.202019645585)*x[2]**o+(0.841240509566)*x[2]
-        arg[3,3,2,1]=(-0.967372744621)*x[0]**o+(-0.334044549662)*x[0]+(-0.0686982670779)*x[1]**o+(0.180083293629)*x[1]+(-0.208697793793)*x[2]**o+(0.0305446253751)*x[2]
-        arg[3,4,0,0]=(0.94168350996)*x[0]**o+(0.0545532586137)*x[0]+(-0.300430532207)*x[1]**o+(-0.960362884765)*x[1]+(0.738261342527)*x[2]**o+(-0.351477574571)*x[2]
-        arg[3,4,0,1]=(-0.525893857873)*x[0]**o+(0.227252001588)*x[0]+(0.179831911446)*x[1]**o+(0.350952712138)*x[1]+(-0.671550635312)*x[2]**o+(-0.338834217909)*x[2]
-        arg[3,4,1,0]=(-0.60610056656)*x[0]**o+(0.219192673102)*x[0]+(-0.801595717702)*x[1]**o+(-0.696853420225)*x[1]+(-0.495201990047)*x[2]**o+(-0.500683649414)*x[2]
-        arg[3,4,1,1]=(-0.37343020332)*x[0]**o+(-0.585536591527)*x[0]+(0.81794997494)*x[1]**o+(-0.240232527585)*x[1]+(-0.538970681636)*x[2]**o+(-0.146105210473)*x[2]
-        arg[3,4,2,0]=(0.857322149358)*x[0]**o+(-0.552847286493)*x[0]+(0.530970378294)*x[1]**o+(0.0746811386922)*x[1]+(0.946170976628)*x[2]**o+(-0.329916962713)*x[2]
-        arg[3,4,2,1]=(-0.353323100685)*x[0]**o+(0.808796594618)*x[0]+(0.481450588496)*x[1]**o+(0.1202874944)*x[1]+(0.671293736572)*x[2]**o+(-0.905074286629)*x[2]
-        ref[0,0,0,0]=(-0.613904299283)*(1+2.*(dim-1.)/(o+1.))+(1.30218009705)*dim
-        ref[0,0,0,1]=(-0.810525773084)*(1+2.*(dim-1.)/(o+1.))+(0.253224626501)*dim
-        ref[0,0,1,0]=(0.509154413012)*(1+2.*(dim-1.)/(o+1.))+(-0.179784708198)*dim
-        ref[0,0,1,1]=(0.637556597632)*(1+2.*(dim-1.)/(o+1.))+(-0.693313683923)*dim
-        ref[0,0,2,0]=(-0.465137153331)*(1+2.*(dim-1.)/(o+1.))+(-0.0477989622018)*dim
-        ref[0,0,2,1]=(-2.15185435439)*(1+2.*(dim-1.)/(o+1.))+(0.231459735932)*dim
-        ref[0,1,0,0]=(0.8018922964)*(1+2.*(dim-1.)/(o+1.))+(-1.10884149089)*dim
-        ref[0,1,0,1]=(1.7955198411)*(1+2.*(dim-1.)/(o+1.))+(-1.34662500856)*dim
-        ref[0,1,1,0]=(0.584854782162)*(1+2.*(dim-1.)/(o+1.))+(0.274087751285)*dim
-        ref[0,1,1,1]=(-1.0401305206)*(1+2.*(dim-1.)/(o+1.))+(1.85561593667)*dim
-        ref[0,1,2,0]=(-0.834154383324)*(1+2.*(dim-1.)/(o+1.))+(-1.23273379028)*dim
-        ref[0,1,2,1]=(-2.34017474507)*(1+2.*(dim-1.)/(o+1.))+(-0.224176787111)*dim
-        ref[0,2,0,0]=(0.613915916089)*(1+2.*(dim-1.)/(o+1.))+(0.753829204471)*dim
-        ref[0,2,0,1]=(0.131344565765)*(1+2.*(dim-1.)/(o+1.))+(-0.976652361934)*dim
-        ref[0,2,1,0]=(0.579116187931)*(1+2.*(dim-1.)/(o+1.))+(0.0228071895801)*dim
-        ref[0,2,1,1]=(0.772304265705)*(1+2.*(dim-1.)/(o+1.))+(0.470483133313)*dim
-        ref[0,2,2,0]=(-1.12957943492)*(1+2.*(dim-1.)/(o+1.))+(-0.82429788127)*dim
-        ref[0,2,2,1]=(-0.631840107715)*(1+2.*(dim-1.)/(o+1.))+(-0.732399256131)*dim
-        ref[0,3,0,0]=(0.137323356087)*(1+2.*(dim-1.)/(o+1.))+(-0.413776023245)*dim
-        ref[0,3,0,1]=(-0.173740822652)*(1+2.*(dim-1.)/(o+1.))+(1.19050855195)*dim
-        ref[0,3,1,0]=(-1.58068224297)*(1+2.*(dim-1.)/(o+1.))+(0.24224399322)*dim
-        ref[0,3,1,1]=(0.474472608494)*(1+2.*(dim-1.)/(o+1.))+(-0.557328900938)*dim
-        ref[0,3,2,0]=(0.459842497633)*(1+2.*(dim-1.)/(o+1.))+(-1.09001004859)*dim
-        ref[0,3,2,1]=(-0.22027884782)*(1+2.*(dim-1.)/(o+1.))+(0.235715331835)*dim
-        ref[0,4,0,0]=(0.424803567504)*(1+2.*(dim-1.)/(o+1.))+(0.657196485077)*dim
-        ref[0,4,0,1]=(-0.00655513622033)*(1+2.*(dim-1.)/(o+1.))+(-0.803228043207)*dim
-        ref[0,4,1,0]=(1.33738998187)*(1+2.*(dim-1.)/(o+1.))+(-0.0257326162636)*dim
-        ref[0,4,1,1]=(-1.55536089118)*(1+2.*(dim-1.)/(o+1.))+(-0.0357690415245)*dim
-        ref[0,4,2,0]=(1.58679207216)*(1+2.*(dim-1.)/(o+1.))+(-0.693598479122)*dim
-        ref[0,4,2,1]=(0.0628502197447)*(1+2.*(dim-1.)/(o+1.))+(-1.90742115249)*dim
-        ref[1,0,0,0]=(-1.25774299848)*(1+2.*(dim-1.)/(o+1.))+(-0.0786696801461)*dim
-        ref[1,0,0,1]=(-0.807603352133)*(1+2.*(dim-1.)/(o+1.))+(-0.429302209684)*dim
-        ref[1,0,1,0]=(1.14217071628)*(1+2.*(dim-1.)/(o+1.))+(0.740396951119)*dim
-        ref[1,0,1,1]=(1.89672043448)*(1+2.*(dim-1.)/(o+1.))+(1.4016996376)*dim
-        ref[1,0,2,0]=(-0.768614149462)*(1+2.*(dim-1.)/(o+1.))+(0.913988010751)*dim
-        ref[1,0,2,1]=(-0.601884288575)*(1+2.*(dim-1.)/(o+1.))+(-1.67541838174)*dim
-        ref[1,1,0,0]=(-1.43981092176)*(1+2.*(dim-1.)/(o+1.))+(-0.506725297145)*dim
-        ref[1,1,0,1]=(0.503113976474)*(1+2.*(dim-1.)/(o+1.))+(-0.488618815974)*dim
-        ref[1,1,1,0]=(0.815915054472)*(1+2.*(dim-1.)/(o+1.))+(-0.522904536573)*dim
-        ref[1,1,1,1]=(0.310174793362)*(1+2.*(dim-1.)/(o+1.))+(0.825570415579)*dim
-        ref[1,1,2,0]=(-1.85870537865)*(1+2.*(dim-1.)/(o+1.))+(-0.896366119383)*dim
-        ref[1,1,2,1]=(0.634330156916)*(1+2.*(dim-1.)/(o+1.))+(-0.202404975156)*dim
-        ref[1,2,0,0]=(0.980180080393)*(1+2.*(dim-1.)/(o+1.))+(1.44073022185)*dim
-        ref[1,2,0,1]=(1.16930139908)*(1+2.*(dim-1.)/(o+1.))+(-1.29606923835)*dim
-        ref[1,2,1,0]=(0.251262820359)*(1+2.*(dim-1.)/(o+1.))+(-0.534365875316)*dim
-        ref[1,2,1,1]=(1.45444347927)*(1+2.*(dim-1.)/(o+1.))+(1.09104332726)*dim
-        ref[1,2,2,0]=(0.36826076644)*(1+2.*(dim-1.)/(o+1.))+(-0.222843807345)*dim
-        ref[1,2,2,1]=(0.652062496151)*(1+2.*(dim-1.)/(o+1.))+(1.45032712876)*dim
-        ref[1,3,0,0]=(0.357179082647)*(1+2.*(dim-1.)/(o+1.))+(0.96345428327)*dim
-        ref[1,3,0,1]=(0.445836034597)*(1+2.*(dim-1.)/(o+1.))+(-0.768814370045)*dim
-        ref[1,3,1,0]=(-0.633644413575)*(1+2.*(dim-1.)/(o+1.))+(0.996183349509)*dim
-        ref[1,3,1,1]=(-1.47637436236)*(1+2.*(dim-1.)/(o+1.))+(-0.446000824477)*dim
-        ref[1,3,2,0]=(2.22742580994)*(1+2.*(dim-1.)/(o+1.))+(0.238170411449)*dim
-        ref[1,3,2,1]=(0.138824208277)*(1+2.*(dim-1.)/(o+1.))+(1.69436291732)*dim
-        ref[1,4,0,0]=(-0.622328917175)*(1+2.*(dim-1.)/(o+1.))+(-1.12401903264)*dim
-        ref[1,4,0,1]=(0.40305181353)*(1+2.*(dim-1.)/(o+1.))+(1.68001892165)*dim
-        ref[1,4,1,0]=(-1.16479419403)*(1+2.*(dim-1.)/(o+1.))+(1.05838059836)*dim
-        ref[1,4,1,1]=(0.0801376319834)*(1+2.*(dim-1.)/(o+1.))+(2.09228066438)*dim
-        ref[1,4,2,0]=(-0.228762226067)*(1+2.*(dim-1.)/(o+1.))+(0.523454314851)*dim
-        ref[1,4,2,1]=(-1.25310430418)*(1+2.*(dim-1.)/(o+1.))+(0.296827734822)*dim
-        ref[2,0,0,0]=(1.14292760919)*(1+2.*(dim-1.)/(o+1.))+(-0.520826483003)*dim
-        ref[2,0,0,1]=(1.16992671589)*(1+2.*(dim-1.)/(o+1.))+(-0.162899835641)*dim
-        ref[2,0,1,0]=(-0.544683088018)*(1+2.*(dim-1.)/(o+1.))+(-1.44956627836)*dim
-        ref[2,0,1,1]=(-1.46970715451)*(1+2.*(dim-1.)/(o+1.))+(-0.403035460127)*dim
-        ref[2,0,2,0]=(-0.385627069865)*(1+2.*(dim-1.)/(o+1.))+(-0.829501029966)*dim
-        ref[2,0,2,1]=(1.11664736171)*(1+2.*(dim-1.)/(o+1.))+(-1.27685980972)*dim
-        ref[2,1,0,0]=(1.08669102227)*(1+2.*(dim-1.)/(o+1.))+(1.7990592379)*dim
-        ref[2,1,0,1]=(0.0453423472143)*(1+2.*(dim-1.)/(o+1.))+(-0.68150455532)*dim
-        ref[2,1,1,0]=(0.0322959644566)*(1+2.*(dim-1.)/(o+1.))+(-2.23247758093)*dim
-        ref[2,1,1,1]=(-0.892578997912)*(1+2.*(dim-1.)/(o+1.))+(0.388356392315)*dim
-        ref[2,1,2,0]=(-0.7179937061)*(1+2.*(dim-1.)/(o+1.))+(-1.52564228261)*dim
-        ref[2,1,2,1]=(0.950438825754)*(1+2.*(dim-1.)/(o+1.))+(0.342228484532)*dim
-        ref[2,2,0,0]=(1.0779882212)*(1+2.*(dim-1.)/(o+1.))+(0.796214693049)*dim
-        ref[2,2,0,1]=(-0.115299804062)*(1+2.*(dim-1.)/(o+1.))+(0.798756112891)*dim
-        ref[2,2,1,0]=(0.536406467403)*(1+2.*(dim-1.)/(o+1.))+(-1.139126385)*dim
-        ref[2,2,1,1]=(-0.779767608394)*(1+2.*(dim-1.)/(o+1.))+(0.522828453067)*dim
-        ref[2,2,2,0]=(-0.411536633652)*(1+2.*(dim-1.)/(o+1.))+(-0.895144122064)*dim
-        ref[2,2,2,1]=(1.56944190392)*(1+2.*(dim-1.)/(o+1.))+(-0.12659143313)*dim
-        ref[2,3,0,0]=(-0.372936173925)*(1+2.*(dim-1.)/(o+1.))+(-0.938385787171)*dim
-        ref[2,3,0,1]=(1.33113027561)*(1+2.*(dim-1.)/(o+1.))+(1.39154904574)*dim
-        ref[2,3,1,0]=(0.418458834548)*(1+2.*(dim-1.)/(o+1.))+(2.20921588131)*dim
-        ref[2,3,1,1]=(0.64133847569)*(1+2.*(dim-1.)/(o+1.))+(0.556373927504)*dim
-        ref[2,3,2,0]=(-0.689346506499)*(1+2.*(dim-1.)/(o+1.))+(1.63847691387)*dim
-        ref[2,3,2,1]=(-1.23371702875)*(1+2.*(dim-1.)/(o+1.))+(-0.384869997042)*dim
-        ref[2,4,0,0]=(0.433647132788)*(1+2.*(dim-1.)/(o+1.))+(-0.527688846368)*dim
-        ref[2,4,0,1]=(1.03032814854)*(1+2.*(dim-1.)/(o+1.))+(-0.103322527004)*dim
-        ref[2,4,1,0]=(0.663568613046)*(1+2.*(dim-1.)/(o+1.))+(1.1370080288)*dim
-        ref[2,4,1,1]=(-0.977905093893)*(1+2.*(dim-1.)/(o+1.))+(0.0866635633103)*dim
-        ref[2,4,2,0]=(0.085735636585)*(1+2.*(dim-1.)/(o+1.))+(-0.234684579572)*dim
-        ref[2,4,2,1]=(-0.311909123795)*(1+2.*(dim-1.)/(o+1.))+(-0.705520095044)*dim
-        ref[3,0,0,0]=(-0.780115379753)*(1+2.*(dim-1.)/(o+1.))+(-0.553421227188)*dim
-        ref[3,0,0,1]=(-2.33835441041)*(1+2.*(dim-1.)/(o+1.))+(0.648874255143)*dim
-        ref[3,0,1,0]=(-0.0921929146543)*(1+2.*(dim-1.)/(o+1.))+(-0.949868130291)*dim
-        ref[3,0,1,1]=(0.231464433969)*(1+2.*(dim-1.)/(o+1.))+(0.370739594929)*dim
-        ref[3,0,2,0]=(0.666293785727)*(1+2.*(dim-1.)/(o+1.))+(0.933961354368)*dim
-        ref[3,0,2,1]=(0.0240637548661)*(1+2.*(dim-1.)/(o+1.))+(-0.342585987504)*dim
-        ref[3,1,0,0]=(0.250534290654)*(1+2.*(dim-1.)/(o+1.))+(0.391937952644)*dim
-        ref[3,1,0,1]=(-0.114349866018)*(1+2.*(dim-1.)/(o+1.))+(1.54390216157)*dim
-        ref[3,1,1,0]=(-1.20423411082)*(1+2.*(dim-1.)/(o+1.))+(-1.80846594625)*dim
-        ref[3,1,1,1]=(-0.679747643349)*(1+2.*(dim-1.)/(o+1.))+(0.586471246578)*dim
-        ref[3,1,2,0]=(-1.87640663683)*(1+2.*(dim-1.)/(o+1.))+(-1.20650936788)*dim
-        ref[3,1,2,1]=(0.221597815849)*(1+2.*(dim-1.)/(o+1.))+(-0.189673037401)*dim
-        ref[3,2,0,0]=(0.40161631028)*(1+2.*(dim-1.)/(o+1.))+(-0.784860114318)*dim
-        ref[3,2,0,1]=(-0.265289560586)*(1+2.*(dim-1.)/(o+1.))+(0.0190519596518)*dim
-        ref[3,2,1,0]=(0.522308956237)*(1+2.*(dim-1.)/(o+1.))+(0.0431481382473)*dim
-        ref[3,2,1,1]=(0.585059743072)*(1+2.*(dim-1.)/(o+1.))+(-2.23136772548)*dim
-        ref[3,2,2,0]=(-0.126352236735)*(1+2.*(dim-1.)/(o+1.))+(-0.112757452698)*dim
-        ref[3,2,2,1]=(0.0228968924883)*(1+2.*(dim-1.)/(o+1.))+(-1.17901102753)*dim
-        ref[3,3,0,0]=(1.00567124803)*(1+2.*(dim-1.)/(o+1.))+(-0.312027185345)*dim
-        ref[3,3,0,1]=(0.425807773249)*(1+2.*(dim-1.)/(o+1.))+(-1.26007570294)*dim
-        ref[3,3,1,0]=(-0.10089369936)*(1+2.*(dim-1.)/(o+1.))+(2.37782539328)*dim
-        ref[3,3,1,1]=(0.135953275999)*(1+2.*(dim-1.)/(o+1.))+(0.218630266051)*dim
-        ref[3,3,2,0]=(0.268796985663)*(1+2.*(dim-1.)/(o+1.))+(1.97743223033)*dim
-        ref[3,3,2,1]=(-1.24476880549)*(1+2.*(dim-1.)/(o+1.))+(-0.123416630658)*dim
-        ref[3,4,0,0]=(1.37951432028)*(1+2.*(dim-1.)/(o+1.))+(-1.25728720072)*dim
-        ref[3,4,0,1]=(-1.01761258174)*(1+2.*(dim-1.)/(o+1.))+(0.239370495817)*dim
-        ref[3,4,1,0]=(-1.90289827431)*(1+2.*(dim-1.)/(o+1.))+(-0.978344396537)*dim
-        ref[3,4,1,1]=(-0.0944509100161)*(1+2.*(dim-1.)/(o+1.))+(-0.971874329585)*dim
-        ref[3,4,2,0]=(2.33446350428)*(1+2.*(dim-1.)/(o+1.))+(-0.808083110513)*dim
-        ref[3,4,2,1]=(0.799421224383)*(1+2.*(dim-1.)/(o+1.))+(0.0240098023897)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      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.0177156089276)*x[0]+(-1.07750293477)*x[1]
-        ref=(0.674554765151)*(1+2.*(dim-1.)/(o+1.))+(-1.76977330884)*dim
-      else:
-        arg=(0.304688056778)*x[0]+(0.548485298428)*x[1]+(0.672370309114)*x[2]
-        ref=(0.0121419382123)*(1+2.*(dim-1.)/(o+1.))+(1.51340172611)*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 the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(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]=(-1.81332918209)*x[0]+(0.825631690982)*x[1]
-        arg[1]=(0.568335098118)*x[0]+(-0.504485431124)*x[1]
-        ref[0]=(0.0338855214148)*(1+2.*(dim-1.)/(o+1.))+(-1.02158301252)*dim
-        ref[1]=(0.348045520014)*(1+2.*(dim-1.)/(o+1.))+(-0.284195853019)*dim
-      else:
-        arg[0]=(-0.34247651789)*x[0]+(0.952434108232)*x[1]+(0.956872478767)*x[2]
-        arg[1]=(-0.73212870207)*x[0]+(1.25659546958)*x[1]+(-0.690842998605)*x[2]
-        ref[0]=(1.22184577749)*(1+2.*(dim-1.)/(o+1.))+(0.344984291617)*dim
-        ref[1]=(-0.600249739257)*(1+2.*(dim-1.)/(o+1.))+(0.433873508162)*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_ReducedSolution_rank2(self):
-      """
-      tests integral of rank 2 Data on the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-1.78262197231)*x[0]+(1.45174573417)*x[1]
-        arg[0,1]=(0.213586223199)*x[0]+(-0.917876059198)*x[1]
-        arg[0,2]=(-1.12034819339)*x[0]+(0.59993130233)*x[1]
-        arg[0,3]=(-0.156732957083)*x[0]+(0.744660873695)*x[1]
-        arg[0,4]=(0.217327014577)*x[0]+(1.40157420042)*x[1]
-        arg[1,0]=(0.0588042984116)*x[0]+(1.40376148561)*x[1]
-        arg[1,1]=(-0.264973303233)*x[0]+(1.77692483003)*x[1]
-        arg[1,2]=(-1.17910097102)*x[0]+(-1.20301960774)*x[1]
-        arg[1,3]=(-0.511409983468)*x[0]+(-1.02065230228)*x[1]
-        arg[1,4]=(1.1254497221)*x[0]+(-1.23163629376)*x[1]
-        arg[2,0]=(-0.780207200735)*x[0]+(-1.49983791458)*x[1]
-        arg[2,1]=(0.20679132359)*x[0]+(0.640203014983)*x[1]
-        arg[2,2]=(0.198135205267)*x[0]+(0.30781411018)*x[1]
-        arg[2,3]=(0.465906968942)*x[0]+(-0.812198212)*x[1]
-        arg[2,4]=(0.190357350559)*x[0]+(-1.5894498455)*x[1]
-        arg[3,0]=(-1.1362863086)*x[0]+(-0.0654142353086)*x[1]
-        arg[3,1]=(0.0545924852084)*x[0]+(0.00262152155818)*x[1]
-        arg[3,2]=(-0.0497600832907)*x[0]+(-0.609396009303)*x[1]
-        arg[3,3]=(0.347834191962)*x[0]+(-0.768159599963)*x[1]
-        arg[3,4]=(-0.178383166761)*x[0]+(-0.0690942212822)*x[1]
-        ref[0,0]=(0.0436748214249)*(1+2.*(dim-1.)/(o+1.))+(-0.374551059559)*dim
-        ref[0,1]=(-1.05854206043)*(1+2.*(dim-1.)/(o+1.))+(0.354252224435)*dim
-        ref[0,2]=(-0.71782952995)*(1+2.*(dim-1.)/(o+1.))+(0.197412638885)*dim
-        ref[0,3]=(-0.255252590976)*(1+2.*(dim-1.)/(o+1.))+(0.843180507587)*dim
-        ref[0,4]=(0.177908820578)*(1+2.*(dim-1.)/(o+1.))+(1.44099239442)*dim
-        ref[1,0]=(1.56040501086)*(1+2.*(dim-1.)/(o+1.))+(-0.0978392268304)*dim
-        ref[1,1]=(1.33164571828)*(1+2.*(dim-1.)/(o+1.))+(0.180305808513)*dim
-        ref[1,2]=(-0.885397553926)*(1+2.*(dim-1.)/(o+1.))+(-1.49672302484)*dim
-        ref[1,3]=(0.105451964854)*(1+2.*(dim-1.)/(o+1.))+(-1.63751425061)*dim
-        ref[1,4]=(-0.774237262923)*(1+2.*(dim-1.)/(o+1.))+(0.668050691269)*dim
-        ref[2,0]=(-0.626493344552)*(1+2.*(dim-1.)/(o+1.))+(-1.65355177076)*dim
-        ref[2,1]=(0.383826450148)*(1+2.*(dim-1.)/(o+1.))+(0.463167888425)*dim
-        ref[2,2]=(-0.530241676713)*(1+2.*(dim-1.)/(o+1.))+(1.03619099216)*dim
-        ref[2,3]=(-1.18245389658)*(1+2.*(dim-1.)/(o+1.))+(0.836162653525)*dim
-        ref[2,4]=(-1.32396763993)*(1+2.*(dim-1.)/(o+1.))+(-0.0751248550082)*dim
-        ref[3,0]=(0.15610314985)*(1+2.*(dim-1.)/(o+1.))+(-1.35780369376)*dim
-        ref[3,1]=(-0.376931239611)*(1+2.*(dim-1.)/(o+1.))+(0.434145246378)*dim
-        ref[3,2]=(0.0188741177717)*(1+2.*(dim-1.)/(o+1.))+(-0.678030210365)*dim
-        ref[3,3]=(-0.264501990209)*(1+2.*(dim-1.)/(o+1.))+(-0.155823417792)*dim
-        ref[3,4]=(-0.394609208758)*(1+2.*(dim-1.)/(o+1.))+(0.147131820715)*dim
-      else:
-        arg[0,0]=(-1.55600852596)*x[0]+(-0.624393737912)*x[1]+(-0.747032596279)*x[2]
-        arg[0,1]=(0.158636782846)*x[0]+(-0.751760245066)*x[1]+(-1.62081735864)*x[2]
-        arg[0,2]=(1.18083264152)*x[0]+(-1.16696814878)*x[1]+(-0.567354369023)*x[2]
-        arg[0,3]=(0.176344525636)*x[0]+(-0.825319538089)*x[1]+(0.32760822446)*x[2]
-        arg[0,4]=(0.570849136808)*x[0]+(-0.86277959325)*x[1]+(-0.253106033513)*x[2]
-        arg[1,0]=(0.325475826081)*x[0]+(0.338988467638)*x[1]+(-0.596090654044)*x[2]
-        arg[1,1]=(-1.29950586693)*x[0]+(-0.980591079821)*x[1]+(-0.7995507704)*x[2]
-        arg[1,2]=(0.108948096835)*x[0]+(0.323001832704)*x[1]+(1.09678982473)*x[2]
-        arg[1,3]=(-0.0307191696266)*x[0]+(0.134014984197)*x[1]+(-0.271363693134)*x[2]
-        arg[1,4]=(0.0166805959434)*x[0]+(-0.323260440667)*x[1]+(-0.0168023639197)*x[2]
-        arg[2,0]=(1.66243206086)*x[0]+(-0.478403313987)*x[1]+(1.45469230407)*x[2]
-        arg[2,1]=(0.635927142861)*x[0]+(0.00628277747568)*x[1]+(-0.335502970321)*x[2]
-        arg[2,2]=(-0.168440428449)*x[0]+(-0.302470381257)*x[1]+(1.26059253147)*x[2]
-        arg[2,3]=(-0.0183286590129)*x[0]+(-0.0950506276918)*x[1]+(-0.721364110928)*x[2]
-        arg[2,4]=(-1.04551179644)*x[0]+(0.20728433783)*x[1]+(-0.631521487025)*x[2]
-        arg[3,0]=(1.0112442447)*x[0]+(0.0279472213885)*x[1]+(-1.24445628735)*x[2]
-        arg[3,1]=(-1.36197290176)*x[0]+(0.145431495907)*x[1]+(0.518562214899)*x[2]
-        arg[3,2]=(-0.249567074212)*x[0]+(-1.02991047199)*x[1]+(1.34627546588)*x[2]
-        arg[3,3]=(1.72315708213)*x[0]+(0.00515532937983)*x[1]+(-0.479917704073)*x[2]
-        arg[3,4]=(1.16297504595)*x[0]+(-0.176518851423)*x[1]+(0.184727222764)*x[2]
-        ref[0,0]=(-2.09480681002)*(1+2.*(dim-1.)/(o+1.))+(-0.832628050126)*dim
-        ref[0,1]=(-0.759565702286)*(1+2.*(dim-1.)/(o+1.))+(-1.45437511857)*dim
-        ref[0,2]=(-1.08318812741)*(1+2.*(dim-1.)/(o+1.))+(0.529698251127)*dim
-        ref[0,3]=(1.48988138495)*(1+2.*(dim-1.)/(o+1.))+(-1.81124817294)*dim
-        ref[0,4]=(0.116706866039)*(1+2.*(dim-1.)/(o+1.))+(-0.661743355994)*dim
-        ref[1,0]=(0.584176790043)*(1+2.*(dim-1.)/(o+1.))+(-0.515803150369)*dim
-        ref[1,1]=(-1.25638916576)*(1+2.*(dim-1.)/(o+1.))+(-1.82325855139)*dim
-        ref[1,2]=(-0.276318333951)*(1+2.*(dim-1.)/(o+1.))+(1.80505808822)*dim
-        ref[1,3]=(-0.732277841606)*(1+2.*(dim-1.)/(o+1.))+(0.564209963043)*dim
-        ref[1,4]=(-0.540285295646)*(1+2.*(dim-1.)/(o+1.))+(0.216903087004)*dim
-        ref[2,0]=(2.23339929969)*(1+2.*(dim-1.)/(o+1.))+(0.405321751257)*dim
-        ref[2,1]=(0.706137929075)*(1+2.*(dim-1.)/(o+1.))+(-0.39943097906)*dim
-        ref[2,2]=(-0.474421381251)*(1+2.*(dim-1.)/(o+1.))+(1.26410310301)*dim
-        ref[2,3]=(1.43870260444)*(1+2.*(dim-1.)/(o+1.))+(-2.27344600207)*dim
-        ref[2,4]=(-1.00154864599)*(1+2.*(dim-1.)/(o+1.))+(-0.468200299646)*dim
-        ref[3,0]=(-1.42181650401)*(1+2.*(dim-1.)/(o+1.))+(1.21655168275)*dim
-        ref[3,1]=(-0.853191175508)*(1+2.*(dim-1.)/(o+1.))+(0.155211984554)*dim
-        ref[3,2]=(-0.823496284217)*(1+2.*(dim-1.)/(o+1.))+(0.890294203901)*dim
-        ref[3,3]=(1.54168027082)*(1+2.*(dim-1.)/(o+1.))+(-0.293285563378)*dim
-        ref[3,4]=(1.66366656195)*(1+2.*(dim-1.)/(o+1.))+(-0.492483144667)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.775903850503)*x[0]+(0.20657985447)*x[1]
-        arg[0,0,1]=(1.42793412139)*x[0]+(1.11703130088)*x[1]
-        arg[0,1,0]=(1.89750028353)*x[0]+(1.77903425203)*x[1]
-        arg[0,1,1]=(-0.67280619036)*x[0]+(-0.283600511942)*x[1]
-        arg[1,0,0]=(0.12590667282)*x[0]+(-0.109778270548)*x[1]
-        arg[1,0,1]=(-1.06454156291)*x[0]+(-0.952754071628)*x[1]
-        arg[1,1,0]=(1.27939438243)*x[0]+(1.41358757535)*x[1]
-        arg[1,1,1]=(-1.68847666929)*x[0]+(-0.13467497005)*x[1]
-        arg[2,0,0]=(0.116194220064)*x[0]+(0.457728827844)*x[1]
-        arg[2,0,1]=(0.205487821412)*x[0]+(-0.657189976052)*x[1]
-        arg[2,1,0]=(0.276192450801)*x[0]+(0.998191496643)*x[1]
-        arg[2,1,1]=(1.63929218914)*x[0]+(0.268648283241)*x[1]
-        arg[3,0,0]=(-0.419114071163)*x[0]+(-0.365697048391)*x[1]
-        arg[3,0,1]=(0.802747458947)*x[0]+(0.137023645119)*x[1]
-        arg[3,1,0]=(-0.0712635889142)*x[0]+(0.495489688269)*x[1]
-        arg[3,1,1]=(-0.559073395964)*x[0]+(0.248364992354)*x[1]
-        arg[4,0,0]=(0.372130696656)*x[0]+(1.22892579337)*x[1]
-        arg[4,0,1]=(-1.47944537272)*x[0]+(1.46750125425)*x[1]
-        arg[4,1,0]=(-0.0683410762004)*x[0]+(0.0982446782745)*x[1]
-        arg[4,1,1]=(0.0698227670903)*x[0]+(0.227875508249)*x[1]
-        arg[5,0,0]=(0.237110604157)*x[0]+(0.814767844631)*x[1]
-        arg[5,0,1]=(0.172109909542)*x[0]+(-1.56055537357)*x[1]
-        arg[5,1,0]=(0.92885449265)*x[0]+(0.820977987322)*x[1]
-        arg[5,1,1]=(-1.76483093472)*x[0]+(0.526316351009)*x[1]
-        ref[0,0,0]=(0.574633189339)*(1+2.*(dim-1.)/(o+1.))+(-1.14395718537)*dim
-        ref[0,0,1]=(1.25832290545)*(1+2.*(dim-1.)/(o+1.))+(1.28664251682)*dim
-        ref[0,1,0]=(1.75085914739)*(1+2.*(dim-1.)/(o+1.))+(1.92567538817)*dim
-        ref[0,1,1]=(-1.57747201281)*(1+2.*(dim-1.)/(o+1.))+(0.621065310511)*dim
-        ref[1,0,0]=(0.710883587246)*(1+2.*(dim-1.)/(o+1.))+(-0.694755184974)*dim
-        ref[1,0,1]=(-0.870861363869)*(1+2.*(dim-1.)/(o+1.))+(-1.14643427067)*dim
-        ref[1,1,0]=(1.21302125269)*(1+2.*(dim-1.)/(o+1.))+(1.4799607051)*dim
-        ref[1,1,1]=(-0.163344093083)*(1+2.*(dim-1.)/(o+1.))+(-1.65980754626)*dim
-        ref[2,0,0]=(1.18070929814)*(1+2.*(dim-1.)/(o+1.))+(-0.606786250235)*dim
-        ref[2,0,1]=(-1.26011538751)*(1+2.*(dim-1.)/(o+1.))+(0.808413232875)*dim
-        ref[2,1,0]=(-0.128253427149)*(1+2.*(dim-1.)/(o+1.))+(1.40263737459)*dim
-        ref[2,1,1]=(1.22388877116)*(1+2.*(dim-1.)/(o+1.))+(0.68405170122)*dim
-        ref[3,0,0]=(-1.51984063257)*(1+2.*(dim-1.)/(o+1.))+(0.735029513018)*dim
-        ref[3,0,1]=(1.63702893126)*(1+2.*(dim-1.)/(o+1.))+(-0.697257827196)*dim
-        ref[3,1,0]=(-0.274208683077)*(1+2.*(dim-1.)/(o+1.))+(0.698434782432)*dim
-        ref[3,1,1]=(0.649113059071)*(1+2.*(dim-1.)/(o+1.))+(-0.95982146268)*dim
-        ref[4,0,0]=(1.11723294318)*(1+2.*(dim-1.)/(o+1.))+(0.483823546848)*dim
-        ref[4,0,1]=(-0.0369311601619)*(1+2.*(dim-1.)/(o+1.))+(0.0249870416905)*dim
-        ref[4,1,0]=(-0.0969818481854)*(1+2.*(dim-1.)/(o+1.))+(0.126885450259)*dim
-        ref[4,1,1]=(0.607834304349)*(1+2.*(dim-1.)/(o+1.))+(-0.31013602901)*dim
-        ref[5,0,0]=(0.612356854718)*(1+2.*(dim-1.)/(o+1.))+(0.43952159407)*dim
-        ref[5,0,1]=(-0.245849747535)*(1+2.*(dim-1.)/(o+1.))+(-1.1425957165)*dim
-        ref[5,1,0]=(0.218025498167)*(1+2.*(dim-1.)/(o+1.))+(1.5318069818)*dim
-        ref[5,1,1]=(-0.39419356418)*(1+2.*(dim-1.)/(o+1.))+(-0.844321019532)*dim
-      else:
-        arg[0,0,0]=(1.52622777835)*x[0]+(-0.627217363559)*x[1]+(-0.221339024656)*x[2]
-        arg[0,0,1]=(-0.0735955925339)*x[0]+(-1.44492195287)*x[1]+(-0.0704081180966)*x[2]
-        arg[0,1,0]=(-0.330700790074)*x[0]+(-1.04769579979)*x[1]+(0.508799976666)*x[2]
-        arg[0,1,1]=(0.349349373439)*x[0]+(0.174054703574)*x[1]+(-0.129296220879)*x[2]
-        arg[1,0,0]=(0.0683757878129)*x[0]+(1.33394387082)*x[1]+(0.892302980732)*x[2]
-        arg[1,0,1]=(0.61014567223)*x[0]+(1.23846801628)*x[1]+(-0.990674941877)*x[2]
-        arg[1,1,0]=(0.964575308424)*x[0]+(0.354822939168)*x[1]+(-0.466180761866)*x[2]
-        arg[1,1,1]=(-1.79700594499)*x[0]+(-1.41821199521)*x[1]+(0.366764057361)*x[2]
-        arg[2,0,0]=(0.670092254407)*x[0]+(-0.188523225253)*x[1]+(0.363046866484)*x[2]
-        arg[2,0,1]=(0.420367065732)*x[0]+(0.798321474665)*x[1]+(-1.11347160928)*x[2]
-        arg[2,1,0]=(0.54732858526)*x[0]+(0.249248458735)*x[1]+(1.33905485076)*x[2]
-        arg[2,1,1]=(-1.45292600653)*x[0]+(-0.0838212918177)*x[1]+(-0.210961166185)*x[2]
-        arg[3,0,0]=(-0.406792355772)*x[0]+(-0.230709788944)*x[1]+(1.12300383125)*x[2]
-        arg[3,0,1]=(-1.02748413184)*x[0]+(-1.3840845484)*x[1]+(-0.181262479318)*x[2]
-        arg[3,1,0]=(-1.39003872882)*x[0]+(-0.302577309791)*x[1]+(-0.627070288119)*x[2]
-        arg[3,1,1]=(0.258496709277)*x[0]+(-1.32012543621)*x[1]+(0.921022534515)*x[2]
-        arg[4,0,0]=(-0.639952053735)*x[0]+(0.172303718581)*x[1]+(-1.55894055416)*x[2]
-        arg[4,0,1]=(-1.27660129414)*x[0]+(0.142177942574)*x[1]+(0.84156755899)*x[2]
-        arg[4,1,0]=(0.49812465572)*x[0]+(1.53755810837)*x[1]+(0.10504146131)*x[2]
-        arg[4,1,1]=(0.114534785643)*x[0]+(0.616103931999)*x[1]+(0.515764206037)*x[2]
-        arg[5,0,0]=(0.22562941228)*x[0]+(0.70743104453)*x[1]+(0.882965136406)*x[2]
-        arg[5,0,1]=(0.674003358504)*x[0]+(0.753008881236)*x[1]+(0.033083269963)*x[2]
-        arg[5,1,0]=(-0.495809169314)*x[0]+(-1.09613938465)*x[1]+(-1.03297996938)*x[2]
-        arg[5,1,1]=(-0.5222251005)*x[0]+(-0.56129023192)*x[1]+(0.529084741893)*x[2]
-        ref[0,0,0]=(0.164333186185)*(1+2.*(dim-1.)/(o+1.))+(0.513338203948)*dim
-        ref[0,0,1]=(-0.322072217228)*(1+2.*(dim-1.)/(o+1.))+(-1.26685344627)*dim
-        ref[0,1,0]=(1.37061498302)*(1+2.*(dim-1.)/(o+1.))+(-2.24021159622)*dim
-        ref[0,1,1]=(0.65996582358)*(1+2.*(dim-1.)/(o+1.))+(-0.265857967445)*dim
-        ref[1,0,0]=(1.83616555678)*(1+2.*(dim-1.)/(o+1.))+(0.458457082585)*dim
-        ref[1,0,1]=(1.01886896436)*(1+2.*(dim-1.)/(o+1.))+(-0.160930217723)*dim
-        ref[1,1,0]=(0.95375222959)*(1+2.*(dim-1.)/(o+1.))+(-0.100534743865)*dim
-        ref[1,1,1]=(-1.48059917075)*(1+2.*(dim-1.)/(o+1.))+(-1.3678547121)*dim
-        ref[2,0,0]=(-0.0805152837328)*(1+2.*(dim-1.)/(o+1.))+(0.925131179371)*dim
-        ref[2,0,1]=(0.155604473013)*(1+2.*(dim-1.)/(o+1.))+(-0.0503875419008)*dim
-        ref[2,1,0]=(0.117237902139)*(1+2.*(dim-1.)/(o+1.))+(2.01839399262)*dim
-        ref[2,1,1]=(0.196870433027)*(1+2.*(dim-1.)/(o+1.))+(-1.94457889755)*dim
-        ref[3,0,0]=(-1.16272511547)*(1+2.*(dim-1.)/(o+1.))+(1.648226802)*dim
-        ref[3,0,1]=(-1.54275766077)*(1+2.*(dim-1.)/(o+1.))+(-1.05007349878)*dim
-        ref[3,1,0]=(-2.21939430114)*(1+2.*(dim-1.)/(o+1.))+(-0.100292025596)*dim
-        ref[3,1,1]=(-0.974866109202)*(1+2.*(dim-1.)/(o+1.))+(0.834259916779)*dim
-        ref[4,0,0]=(-1.81015652027)*(1+2.*(dim-1.)/(o+1.))+(-0.216432369042)*dim
-        ref[4,0,1]=(-0.0692225921476)*(1+2.*(dim-1.)/(o+1.))+(-0.223633200428)*dim
-        ref[4,1,0]=(0.907628019251)*(1+2.*(dim-1.)/(o+1.))+(1.23309620615)*dim
-        ref[4,1,1]=(-0.77625708658)*(1+2.*(dim-1.)/(o+1.))+(2.02266001026)*dim
-        ref[5,0,0]=(0.040336826806)*(1+2.*(dim-1.)/(o+1.))+(1.77568876641)*dim
-        ref[5,0,1]=(-0.741065482842)*(1+2.*(dim-1.)/(o+1.))+(2.20116099255)*dim
-        ref[5,1,0]=(-1.93385845474)*(1+2.*(dim-1.)/(o+1.))+(-0.691070068594)*dim
-        ref[5,1,1]=(-0.539652361393)*(1+2.*(dim-1.)/(o+1.))+(-0.014778229134)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.139765044323)*x[0]+(0.763652540371)*x[1]
-        arg[0,0,0,1]=(1.22422998499)*x[0]+(-0.704059494925)*x[1]
-        arg[0,0,1,0]=(-0.0738568759745)*x[0]+(0.227297731345)*x[1]
-        arg[0,0,1,1]=(-0.438016525512)*x[0]+(-0.00290173552923)*x[1]
-        arg[0,0,2,0]=(-0.142466265385)*x[0]+(0.159086109387)*x[1]
-        arg[0,0,2,1]=(-1.29207470861)*x[0]+(0.171024552932)*x[1]
-        arg[0,1,0,0]=(0.228469040214)*x[0]+(-1.11207386711)*x[1]
-        arg[0,1,0,1]=(-0.0716121324998)*x[0]+(-0.293214318059)*x[1]
-        arg[0,1,1,0]=(-0.552331240231)*x[0]+(0.483311325934)*x[1]
-        arg[0,1,1,1]=(0.759050036013)*x[0]+(-0.192218075397)*x[1]
-        arg[0,1,2,0]=(0.736408127399)*x[0]+(0.61962966835)*x[1]
-        arg[0,1,2,1]=(-0.170110592043)*x[0]+(1.12024324836)*x[1]
-        arg[0,2,0,0]=(1.15358129137)*x[0]+(0.00288801991025)*x[1]
-        arg[0,2,0,1]=(0.34101930461)*x[0]+(1.44561406668)*x[1]
-        arg[0,2,1,0]=(1.20180064935)*x[0]+(1.53696717349)*x[1]
-        arg[0,2,1,1]=(-0.955282659666)*x[0]+(-0.232022391367)*x[1]
-        arg[0,2,2,0]=(0.0907361523468)*x[0]+(0.0735957910178)*x[1]
-        arg[0,2,2,1]=(0.377295180443)*x[0]+(-0.694318356175)*x[1]
-        arg[0,3,0,0]=(1.38936937129)*x[0]+(-1.11460156576)*x[1]
-        arg[0,3,0,1]=(-0.477623155591)*x[0]+(-1.38984205639)*x[1]
-        arg[0,3,1,0]=(0.0643534425446)*x[0]+(1.38744715898)*x[1]
-        arg[0,3,1,1]=(0.0144448337619)*x[0]+(-0.107478295727)*x[1]
-        arg[0,3,2,0]=(0.494522779873)*x[0]+(-0.623994602046)*x[1]
-        arg[0,3,2,1]=(0.865352526765)*x[0]+(-0.0330471549519)*x[1]
-        arg[0,4,0,0]=(0.876802965861)*x[0]+(-0.72991482831)*x[1]
-        arg[0,4,0,1]=(-1.59217671369)*x[0]+(-1.17443275047)*x[1]
-        arg[0,4,1,0]=(0.980556838858)*x[0]+(-0.134374268551)*x[1]
-        arg[0,4,1,1]=(-0.799387621998)*x[0]+(0.290707689722)*x[1]
-        arg[0,4,2,0]=(-0.152070506377)*x[0]+(-0.720051351365)*x[1]
-        arg[0,4,2,1]=(-0.726386342076)*x[0]+(-0.821126213298)*x[1]
-        arg[1,0,0,0]=(0.0108792321621)*x[0]+(1.08482229519)*x[1]
-        arg[1,0,0,1]=(0.395066734758)*x[0]+(-0.147576996716)*x[1]
-        arg[1,0,1,0]=(1.34674167646)*x[0]+(-1.7762597766)*x[1]
-        arg[1,0,1,1]=(0.145955749421)*x[0]+(0.0758020791017)*x[1]
-        arg[1,0,2,0]=(-1.3779896638)*x[0]+(0.879047617812)*x[1]
-        arg[1,0,2,1]=(-0.034533186491)*x[0]+(-0.961616456719)*x[1]
-        arg[1,1,0,0]=(1.93531133223)*x[0]+(0.085806770105)*x[1]
-        arg[1,1,0,1]=(-1.40810156335)*x[0]+(0.647954800386)*x[1]
-        arg[1,1,1,0]=(-0.898682130534)*x[0]+(0.0293908578939)*x[1]
-        arg[1,1,1,1]=(0.906365050374)*x[0]+(0.493604087615)*x[1]
-        arg[1,1,2,0]=(0.200697611638)*x[0]+(0.595460978794)*x[1]
-        arg[1,1,2,1]=(-0.137201357175)*x[0]+(-0.456327010456)*x[1]
-        arg[1,2,0,0]=(-0.435882659968)*x[0]+(-0.0312083604574)*x[1]
-        arg[1,2,0,1]=(-0.678923893852)*x[0]+(-0.559827568731)*x[1]
-        arg[1,2,1,0]=(-0.721204171338)*x[0]+(-0.054379212442)*x[1]
-        arg[1,2,1,1]=(-0.0624007046506)*x[0]+(0.168316149134)*x[1]
-        arg[1,2,2,0]=(-1.58839995565)*x[0]+(-0.212071943846)*x[1]
-        arg[1,2,2,1]=(-1.12936118963)*x[0]+(1.37132899453)*x[1]
-        arg[1,3,0,0]=(-0.382791970195)*x[0]+(-1.08331380956)*x[1]
-        arg[1,3,0,1]=(-0.83075188923)*x[0]+(-0.771795988467)*x[1]
-        arg[1,3,1,0]=(-0.491393878842)*x[0]+(0.256082770048)*x[1]
-        arg[1,3,1,1]=(1.16535762668)*x[0]+(1.15868916612)*x[1]
-        arg[1,3,2,0]=(0.930916100823)*x[0]+(0.447810335514)*x[1]
-        arg[1,3,2,1]=(0.542008480891)*x[0]+(0.428660301354)*x[1]
-        arg[1,4,0,0]=(0.820283847448)*x[0]+(-0.861049765761)*x[1]
-        arg[1,4,0,1]=(0.794597952616)*x[0]+(0.484963133102)*x[1]
-        arg[1,4,1,0]=(-0.0864183500936)*x[0]+(-0.48652009912)*x[1]
-        arg[1,4,1,1]=(-0.729261074705)*x[0]+(0.572520019661)*x[1]
-        arg[1,4,2,0]=(0.874563670592)*x[0]+(-1.03978413308)*x[1]
-        arg[1,4,2,1]=(-0.119980177921)*x[0]+(-0.416981275935)*x[1]
-        arg[2,0,0,0]=(0.00851163981688)*x[0]+(0.0537719250367)*x[1]
-        arg[2,0,0,1]=(0.325152071307)*x[0]+(0.852063357275)*x[1]
-        arg[2,0,1,0]=(0.3798978673)*x[0]+(0.103107604149)*x[1]
-        arg[2,0,1,1]=(0.241778324259)*x[0]+(0.840767359849)*x[1]
-        arg[2,0,2,0]=(0.504220642882)*x[0]+(-0.296421218478)*x[1]
-        arg[2,0,2,1]=(1.21850888213)*x[0]+(0.361422173343)*x[1]
-        arg[2,1,0,0]=(1.23948863042)*x[0]+(-0.454591957846)*x[1]
-        arg[2,1,0,1]=(-0.834341417745)*x[0]+(0.836809823188)*x[1]
-        arg[2,1,1,0]=(0.305283593888)*x[0]+(-0.443709359754)*x[1]
-        arg[2,1,1,1]=(-1.73751494542)*x[0]+(0.28249619071)*x[1]
-        arg[2,1,2,0]=(1.64628846378)*x[0]+(0.929422692022)*x[1]
-        arg[2,1,2,1]=(1.55964953056)*x[0]+(0.294507226966)*x[1]
-        arg[2,2,0,0]=(-0.122178600734)*x[0]+(-0.836106215351)*x[1]
-        arg[2,2,0,1]=(0.0560920262009)*x[0]+(-0.959524453552)*x[1]
-        arg[2,2,1,0]=(-0.0235093950509)*x[0]+(1.00069942275)*x[1]
-        arg[2,2,1,1]=(-1.6685983361)*x[0]+(-0.283415608089)*x[1]
-        arg[2,2,2,0]=(1.88757268407)*x[0]+(-0.0970308753337)*x[1]
-        arg[2,2,2,1]=(-0.620474974074)*x[0]+(0.24769276713)*x[1]
-        arg[2,3,0,0]=(1.01637595389)*x[0]+(0.705160942822)*x[1]
-        arg[2,3,0,1]=(1.14707395208)*x[0]+(0.705275592532)*x[1]
-        arg[2,3,1,0]=(-0.758160952494)*x[0]+(0.305309048122)*x[1]
-        arg[2,3,1,1]=(0.772402918026)*x[0]+(-0.052854508055)*x[1]
-        arg[2,3,2,0]=(-0.154978687298)*x[0]+(0.418368826949)*x[1]
-        arg[2,3,2,1]=(-0.845976442257)*x[0]+(0.20623978887)*x[1]
-        arg[2,4,0,0]=(-0.466185710519)*x[0]+(-0.233766119139)*x[1]
-        arg[2,4,0,1]=(-0.922877220469)*x[0]+(-0.688487528304)*x[1]
-        arg[2,4,1,0]=(0.95836287786)*x[0]+(0.939609093639)*x[1]
-        arg[2,4,1,1]=(-0.11982304155)*x[0]+(-0.257073186684)*x[1]
-        arg[2,4,2,0]=(0.345817495959)*x[0]+(0.151979044778)*x[1]
-        arg[2,4,2,1]=(-1.05379548205)*x[0]+(-0.436065928744)*x[1]
-        arg[3,0,0,0]=(0.744945706398)*x[0]+(-0.649458468468)*x[1]
-        arg[3,0,0,1]=(-1.04958965249)*x[0]+(0.639942303499)*x[1]
-        arg[3,0,1,0]=(0.337716118074)*x[0]+(1.93458666396)*x[1]
-        arg[3,0,1,1]=(0.303244531116)*x[0]+(0.436648998724)*x[1]
-        arg[3,0,2,0]=(-1.55484904142)*x[0]+(0.0691158242075)*x[1]
-        arg[3,0,2,1]=(-0.184571563941)*x[0]+(-0.617496186026)*x[1]
-        arg[3,1,0,0]=(0.54665472418)*x[0]+(-0.685197219861)*x[1]
-        arg[3,1,0,1]=(0.270341054659)*x[0]+(0.0123904138595)*x[1]
-        arg[3,1,1,0]=(-0.551927232745)*x[0]+(-0.0835992799883)*x[1]
-        arg[3,1,1,1]=(-0.731741032186)*x[0]+(0.351597478907)*x[1]
-        arg[3,1,2,0]=(-0.678408784965)*x[0]+(-0.0779391332051)*x[1]
-        arg[3,1,2,1]=(-0.873182924195)*x[0]+(-0.641772673128)*x[1]
-        arg[3,2,0,0]=(-0.826223714873)*x[0]+(0.631844849849)*x[1]
-        arg[3,2,0,1]=(-0.899714515249)*x[0]+(-0.010350665009)*x[1]
-        arg[3,2,1,0]=(0.290678744119)*x[0]+(-0.5871053663)*x[1]
-        arg[3,2,1,1]=(0.208288673139)*x[0]+(0.631917010925)*x[1]
-        arg[3,2,2,0]=(-0.262706136542)*x[0]+(0.0853212850096)*x[1]
-        arg[3,2,2,1]=(-1.28934754486)*x[0]+(0.686855142119)*x[1]
-        arg[3,3,0,0]=(-1.36704032596)*x[0]+(-1.55543480824)*x[1]
-        arg[3,3,0,1]=(-1.17014698336)*x[0]+(-0.652446157654)*x[1]
-        arg[3,3,1,0]=(-0.547499757476)*x[0]+(-0.156519515585)*x[1]
-        arg[3,3,1,1]=(0.228140026291)*x[0]+(-1.41014817371)*x[1]
-        arg[3,3,2,0]=(-0.055056583329)*x[0]+(-0.412525603966)*x[1]
-        arg[3,3,2,1]=(-0.524790489086)*x[0]+(-0.774411367008)*x[1]
-        arg[3,4,0,0]=(-1.33491047191)*x[0]+(1.47855022808)*x[1]
-        arg[3,4,0,1]=(-0.301405501225)*x[0]+(0.687178741851)*x[1]
-        arg[3,4,1,0]=(0.213050803289)*x[0]+(0.428086322291)*x[1]
-        arg[3,4,1,1]=(-1.67469009469)*x[0]+(0.857275314994)*x[1]
-        arg[3,4,2,0]=(0.748812148687)*x[0]+(-0.0339722859922)*x[1]
-        arg[3,4,2,1]=(-0.829454912563)*x[0]+(-0.637161668052)*x[1]
-        ref[0,0,0,0]=(0.538138880568)*(1+2.*(dim-1.)/(o+1.))+(0.365278704126)*dim
-        ref[0,0,0,1]=(0.532354921417)*(1+2.*(dim-1.)/(o+1.))+(-0.0121844313566)*dim
-        ref[0,0,1,0]=(1.27037934234)*(1+2.*(dim-1.)/(o+1.))+(-1.11693848697)*dim
-        ref[0,0,1,1]=(-0.317494874699)*(1+2.*(dim-1.)/(o+1.))+(-0.123423386343)*dim
-        ref[0,0,2,0]=(-0.274542501137)*(1+2.*(dim-1.)/(o+1.))+(0.291162345138)*dim
-        ref[0,0,2,1]=(-0.669231324784)*(1+2.*(dim-1.)/(o+1.))+(-0.451818830894)*dim
-        ref[0,1,0,0]=(-1.55791021679)*(1+2.*(dim-1.)/(o+1.))+(0.674305389899)*dim
-        ref[0,1,0,1]=(-1.04225461385)*(1+2.*(dim-1.)/(o+1.))+(0.67742816329)*dim
-        ref[0,1,1,0]=(-0.553787932867)*(1+2.*(dim-1.)/(o+1.))+(0.48476801857)*dim
-        ref[0,1,1,1]=(0.774284436582)*(1+2.*(dim-1.)/(o+1.))+(-0.207452475966)*dim
-        ref[0,1,2,0]=(0.754663298028)*(1+2.*(dim-1.)/(o+1.))+(0.601374497721)*dim
-        ref[0,1,2,1]=(0.378489135155)*(1+2.*(dim-1.)/(o+1.))+(0.571643521166)*dim
-        ref[0,2,0,0]=(0.84270626402)*(1+2.*(dim-1.)/(o+1.))+(0.313763047258)*dim
-        ref[0,2,0,1]=(0.741388749098)*(1+2.*(dim-1.)/(o+1.))+(1.0452446222)*dim
-        ref[0,2,1,0]=(1.31801677967)*(1+2.*(dim-1.)/(o+1.))+(1.42075104317)*dim
-        ref[0,2,1,1]=(0.342128499103)*(1+2.*(dim-1.)/(o+1.))+(-1.52943355014)*dim
-        ref[0,2,2,0]=(-0.2097885639)*(1+2.*(dim-1.)/(o+1.))+(0.374120507264)*dim
-        ref[0,2,2,1]=(0.517181369396)*(1+2.*(dim-1.)/(o+1.))+(-0.834204545127)*dim
-        ref[0,3,0,0]=(0.546538945104)*(1+2.*(dim-1.)/(o+1.))+(-0.271771139576)*dim
-        ref[0,3,0,1]=(-1.11041658618)*(1+2.*(dim-1.)/(o+1.))+(-0.757048625806)*dim
-        ref[0,3,1,0]=(1.71248931933)*(1+2.*(dim-1.)/(o+1.))+(-0.260688717804)*dim
-        ref[0,3,1,1]=(0.426783834682)*(1+2.*(dim-1.)/(o+1.))+(-0.519817296646)*dim
-        ref[0,3,2,0]=(-0.159038051631)*(1+2.*(dim-1.)/(o+1.))+(0.0295662294573)*dim
-        ref[0,3,2,1]=(-0.0935533877409)*(1+2.*(dim-1.)/(o+1.))+(0.925858759554)*dim
-        ref[0,4,0,0]=(0.254413611162)*(1+2.*(dim-1.)/(o+1.))+(-0.107525473611)*dim
-        ref[0,4,0,1]=(-1.80344635667)*(1+2.*(dim-1.)/(o+1.))+(-0.963163107492)*dim
-        ref[0,4,1,0]=(0.77936654687)*(1+2.*(dim-1.)/(o+1.))+(0.0668160234379)*dim
-        ref[0,4,1,1]=(-0.854656189741)*(1+2.*(dim-1.)/(o+1.))+(0.345976257465)*dim
-        ref[0,4,2,0]=(0.236075361826)*(1+2.*(dim-1.)/(o+1.))+(-1.10819721957)*dim
-        ref[0,4,2,1]=(-1.41443045549)*(1+2.*(dim-1.)/(o+1.))+(-0.133082099885)*dim
-        ref[1,0,0,0]=(0.254601110632)*(1+2.*(dim-1.)/(o+1.))+(0.841100416717)*dim
-        ref[1,0,0,1]=(-1.05142234949)*(1+2.*(dim-1.)/(o+1.))+(1.29891208753)*dim
-        ref[1,0,1,0]=(-0.476182365596)*(1+2.*(dim-1.)/(o+1.))+(0.0466642654563)*dim
-        ref[1,0,1,1]=(-1.2117362156)*(1+2.*(dim-1.)/(o+1.))+(1.43349404413)*dim
-        ref[1,0,2,0]=(-0.82694411065)*(1+2.*(dim-1.)/(o+1.))+(0.328002064662)*dim
-        ref[1,0,2,1]=(-0.784489634199)*(1+2.*(dim-1.)/(o+1.))+(-0.211660009011)*dim
-        ref[1,1,0,0]=(1.67906802629)*(1+2.*(dim-1.)/(o+1.))+(0.342050076043)*dim
-        ref[1,1,0,1]=(-0.798764638314)*(1+2.*(dim-1.)/(o+1.))+(0.03861787535)*dim
-        ref[1,1,1,0]=(0.348279136631)*(1+2.*(dim-1.)/(o+1.))+(-1.21757040927)*dim
-        ref[1,1,1,1]=(0.452104104709)*(1+2.*(dim-1.)/(o+1.))+(0.94786503328)*dim
-        ref[1,1,2,0]=(0.855057493837)*(1+2.*(dim-1.)/(o+1.))+(-0.0588989034046)*dim
-        ref[1,1,2,1]=(-0.666495642664)*(1+2.*(dim-1.)/(o+1.))+(0.0729672750328)*dim
-        ref[1,2,0,0]=(-0.566691483673)*(1+2.*(dim-1.)/(o+1.))+(0.0996004632473)*dim
-        ref[1,2,0,1]=(-0.127941886194)*(1+2.*(dim-1.)/(o+1.))+(-1.11080957639)*dim
-        ref[1,2,1,0]=(-0.249856548379)*(1+2.*(dim-1.)/(o+1.))+(-0.525726835401)*dim
-        ref[1,2,1,1]=(1.00195986166)*(1+2.*(dim-1.)/(o+1.))+(-0.896044417179)*dim
-        ref[1,2,2,0]=(-0.96849834562)*(1+2.*(dim-1.)/(o+1.))+(-0.831973553872)*dim
-        ref[1,2,2,1]=(0.204504064885)*(1+2.*(dim-1.)/(o+1.))+(0.0374637400154)*dim
-        ref[1,3,0,0]=(-0.587139938504)*(1+2.*(dim-1.)/(o+1.))+(-0.878965841253)*dim
-        ref[1,3,0,1]=(-0.013960550118)*(1+2.*(dim-1.)/(o+1.))+(-1.58858732758)*dim
-        ref[1,3,1,0]=(-0.626445648631)*(1+2.*(dim-1.)/(o+1.))+(0.391134539838)*dim
-        ref[1,3,1,1]=(0.793357894316)*(1+2.*(dim-1.)/(o+1.))+(1.53068889848)*dim
-        ref[1,3,2,0]=(-0.30795291971)*(1+2.*(dim-1.)/(o+1.))+(1.68667935605)*dim
-        ref[1,3,2,1]=(0.865506632636)*(1+2.*(dim-1.)/(o+1.))+(0.105162149608)*dim
-        ref[1,4,0,0]=(0.0142921032519)*(1+2.*(dim-1.)/(o+1.))+(-0.0550580215643)*dim
-        ref[1,4,0,1]=(1.74635688975)*(1+2.*(dim-1.)/(o+1.))+(-0.466795804028)*dim
-        ref[1,4,1,0]=(0.202247079284)*(1+2.*(dim-1.)/(o+1.))+(-0.775185528498)*dim
-        ref[1,4,1,1]=(0.518302547238)*(1+2.*(dim-1.)/(o+1.))+(-0.675043602282)*dim
-        ref[1,4,2,0]=(-0.0110996487494)*(1+2.*(dim-1.)/(o+1.))+(-0.154120813742)*dim
-        ref[1,4,2,1]=(0.445368223328)*(1+2.*(dim-1.)/(o+1.))+(-0.982329677184)*dim
-        ref[2,0,0,0]=(1.11858205689)*(1+2.*(dim-1.)/(o+1.))+(-1.05629849203)*dim
-        ref[2,0,0,1]=(0.326749663749)*(1+2.*(dim-1.)/(o+1.))+(0.850465764833)*dim
-        ref[2,0,1,0]=(1.17260350442)*(1+2.*(dim-1.)/(o+1.))+(-0.689598032967)*dim
-        ref[2,0,1,1]=(1.26453211291)*(1+2.*(dim-1.)/(o+1.))+(-0.181986428807)*dim
-        ref[2,0,2,0]=(0.28543047736)*(1+2.*(dim-1.)/(o+1.))+(-0.0776310529561)*dim
-        ref[2,0,2,1]=(1.67283723918)*(1+2.*(dim-1.)/(o+1.))+(-0.092906183711)*dim
-        ref[2,1,0,0]=(0.375606493975)*(1+2.*(dim-1.)/(o+1.))+(0.409290178597)*dim
-        ref[2,1,0,1]=(0.391717224425)*(1+2.*(dim-1.)/(o+1.))+(-0.389248818981)*dim
-        ref[2,1,1,0]=(0.540376031372)*(1+2.*(dim-1.)/(o+1.))+(-0.678801797238)*dim
-        ref[2,1,1,1]=(-0.781880488997)*(1+2.*(dim-1.)/(o+1.))+(-0.673138265714)*dim
-        ref[2,1,2,0]=(1.19474704445)*(1+2.*(dim-1.)/(o+1.))+(1.38096411135)*dim
-        ref[2,1,2,1]=(0.3333062674)*(1+2.*(dim-1.)/(o+1.))+(1.52085049012)*dim
-        ref[2,2,0,0]=(-0.570564746042)*(1+2.*(dim-1.)/(o+1.))+(-0.387720070044)*dim
-        ref[2,2,0,1]=(-0.906439974412)*(1+2.*(dim-1.)/(o+1.))+(0.00300754706095)*dim
-        ref[2,2,1,0]=(1.35643048678)*(1+2.*(dim-1.)/(o+1.))+(-0.379240459088)*dim
-        ref[2,2,1,1]=(-1.68522696847)*(1+2.*(dim-1.)/(o+1.))+(-0.266786975721)*dim
-        ref[2,2,2,0]=(1.64773077393)*(1+2.*(dim-1.)/(o+1.))+(0.14281103481)*dim
-        ref[2,2,2,1]=(0.161577377439)*(1+2.*(dim-1.)/(o+1.))+(-0.534359584383)*dim
-        ref[2,3,0,0]=(0.117577368411)*(1+2.*(dim-1.)/(o+1.))+(1.6039595283)*dim
-        ref[2,3,0,1]=(1.07270794583)*(1+2.*(dim-1.)/(o+1.))+(0.779641598778)*dim
-        ref[2,3,1,0]=(0.940083930247)*(1+2.*(dim-1.)/(o+1.))+(-1.39293583462)*dim
-        ref[2,3,1,1]=(-0.322170646263)*(1+2.*(dim-1.)/(o+1.))+(1.04171905623)*dim
-        ref[2,3,2,0]=(-1.00498391043)*(1+2.*(dim-1.)/(o+1.))+(1.26837405008)*dim
-        ref[2,3,2,1]=(0.148227404921)*(1+2.*(dim-1.)/(o+1.))+(-0.787964058307)*dim
-        ref[2,4,0,0]=(-0.567878073929)*(1+2.*(dim-1.)/(o+1.))+(-0.132073755729)*dim
-        ref[2,4,0,1]=(-0.265369521409)*(1+2.*(dim-1.)/(o+1.))+(-1.34599522736)*dim
-        ref[2,4,1,0]=(0.87362235129)*(1+2.*(dim-1.)/(o+1.))+(1.02434962021)*dim
-        ref[2,4,1,1]=(-1.05435356817)*(1+2.*(dim-1.)/(o+1.))+(0.67745733994)*dim
-        ref[2,4,2,0]=(-0.0889174414067)*(1+2.*(dim-1.)/(o+1.))+(0.586713982143)*dim
-        ref[2,4,2,1]=(-0.950446212097)*(1+2.*(dim-1.)/(o+1.))+(-0.539415198695)*dim
-        ref[3,0,0,0]=(0.585351095733)*(1+2.*(dim-1.)/(o+1.))+(-0.489863857802)*dim
-        ref[3,0,0,1]=(0.0818488289135)*(1+2.*(dim-1.)/(o+1.))+(-0.491496177908)*dim
-        ref[3,0,1,0]=(1.83790469827)*(1+2.*(dim-1.)/(o+1.))+(0.43439808376)*dim
-        ref[3,0,1,1]=(-0.812249042145)*(1+2.*(dim-1.)/(o+1.))+(1.55214257198)*dim
-        ref[3,0,2,0]=(-1.62498605972)*(1+2.*(dim-1.)/(o+1.))+(0.139252842511)*dim
-        ref[3,0,2,1]=(0.248660359392)*(1+2.*(dim-1.)/(o+1.))+(-1.05072810936)*dim
-        ref[3,1,0,0]=(0.701570774477)*(1+2.*(dim-1.)/(o+1.))+(-0.840113270158)*dim
-        ref[3,1,0,1]=(-1.01112314775)*(1+2.*(dim-1.)/(o+1.))+(1.29385461627)*dim
-        ref[3,1,1,0]=(-0.38604780773)*(1+2.*(dim-1.)/(o+1.))+(-0.249478705003)*dim
-        ref[3,1,1,1]=(-0.505728989541)*(1+2.*(dim-1.)/(o+1.))+(0.125585436262)*dim
-        ref[3,1,2,0]=(0.170090820399)*(1+2.*(dim-1.)/(o+1.))+(-0.926438738569)*dim
-        ref[3,1,2,1]=(-0.929125306455)*(1+2.*(dim-1.)/(o+1.))+(-0.585830290868)*dim
-        ref[3,2,0,0]=(-0.155713736332)*(1+2.*(dim-1.)/(o+1.))+(-0.038665128691)*dim
-        ref[3,2,0,1]=(-1.52172024486)*(1+2.*(dim-1.)/(o+1.))+(0.6116550646)*dim
-        ref[3,2,1,0]=(0.320960641588)*(1+2.*(dim-1.)/(o+1.))+(-0.617387263769)*dim
-        ref[3,2,1,1]=(1.35000898226)*(1+2.*(dim-1.)/(o+1.))+(-0.509803298192)*dim
-        ref[3,2,2,0]=(-1.08694938974)*(1+2.*(dim-1.)/(o+1.))+(0.909564538204)*dim
-        ref[3,2,2,1]=(-0.484173893901)*(1+2.*(dim-1.)/(o+1.))+(-0.11831850884)*dim
-        ref[3,3,0,0]=(-1.30137401361)*(1+2.*(dim-1.)/(o+1.))+(-1.62110112059)*dim
-        ref[3,3,0,1]=(-1.01955795295)*(1+2.*(dim-1.)/(o+1.))+(-0.803035188058)*dim
-        ref[3,3,1,0]=(-0.86522946065)*(1+2.*(dim-1.)/(o+1.))+(0.161210187589)*dim
-        ref[3,3,1,1]=(-1.45434545656)*(1+2.*(dim-1.)/(o+1.))+(0.272337309144)*dim
-        ref[3,3,2,0]=(-1.09044516001)*(1+2.*(dim-1.)/(o+1.))+(0.622862972717)*dim
-        ref[3,3,2,1]=(-1.56164744337)*(1+2.*(dim-1.)/(o+1.))+(0.262445587275)*dim
-        ref[3,4,0,0]=(-0.0717688395634)*(1+2.*(dim-1.)/(o+1.))+(0.215408595737)*dim
-        ref[3,4,0,1]=(-0.361057910751)*(1+2.*(dim-1.)/(o+1.))+(0.746831151378)*dim
-        ref[3,4,1,0]=(1.3065764036)*(1+2.*(dim-1.)/(o+1.))+(-0.665439278018)*dim
-        ref[3,4,1,1]=(0.00897444539195)*(1+2.*(dim-1.)/(o+1.))+(-0.826389225091)*dim
-        ref[3,4,2,0]=(0.0968985993748)*(1+2.*(dim-1.)/(o+1.))+(0.61794126332)*dim
-        ref[3,4,2,1]=(-0.247002319776)*(1+2.*(dim-1.)/(o+1.))+(-1.21961426084)*dim
-      else:
-        arg[0,0,0,0]=(0.249559417601)*x[0]+(-1.12919415836)*x[1]+(0.535083953587)*x[2]
-        arg[0,0,0,1]=(-1.61154525877)*x[0]+(-0.339535503099)*x[1]+(-0.3734414422)*x[2]
-        arg[0,0,1,0]=(-1.33426413331)*x[0]+(0.503654661149)*x[1]+(0.900718166029)*x[2]
-        arg[0,0,1,1]=(-1.47348135079)*x[0]+(0.294426872223)*x[1]+(-0.092932038156)*x[2]
-        arg[0,0,2,0]=(-0.659338105033)*x[0]+(0.276825152205)*x[1]+(-0.825904690993)*x[2]
-        arg[0,0,2,1]=(-0.871512897535)*x[0]+(0.16237107696)*x[1]+(-1.37935248231)*x[2]
-        arg[0,1,0,0]=(-0.83315792018)*x[0]+(-0.00675809409276)*x[1]+(0.464774846632)*x[2]
-        arg[0,1,0,1]=(0.527155362932)*x[0]+(0.856707619808)*x[1]+(-1.68267649456)*x[2]
-        arg[0,1,1,0]=(-0.524091384241)*x[0]+(-0.540620074365)*x[1]+(0.992745803077)*x[2]
-        arg[0,1,1,1]=(1.61356254869)*x[0]+(1.50422956091)*x[1]+(0.522074610423)*x[2]
-        arg[0,1,2,0]=(-0.786383950132)*x[0]+(0.240998133454)*x[1]+(-0.609039834527)*x[2]
-        arg[0,1,2,1]=(-0.549608404174)*x[0]+(-0.850827315095)*x[1]+(0.267519458624)*x[2]
-        arg[0,2,0,0]=(-0.171255468598)*x[0]+(-0.315808418391)*x[1]+(-1.31408126593)*x[2]
-        arg[0,2,0,1]=(-0.0537048497397)*x[0]+(-1.05283989597)*x[1]+(-0.230505226375)*x[2]
-        arg[0,2,1,0]=(0.175422426556)*x[0]+(-1.37203245283)*x[1]+(-1.31579047196)*x[2]
-        arg[0,2,1,1]=(-0.678719594441)*x[0]+(0.325375648943)*x[1]+(-1.3715383088)*x[2]
-        arg[0,2,2,0]=(1.34295310191)*x[0]+(-1.29856762722)*x[1]+(-0.604804069008)*x[2]
-        arg[0,2,2,1]=(-0.38925176646)*x[0]+(-0.391078913511)*x[1]+(-0.147119806342)*x[2]
-        arg[0,3,0,0]=(0.55897935716)*x[0]+(-0.938161813577)*x[1]+(-1.01170144437)*x[2]
-        arg[0,3,0,1]=(-0.214720994691)*x[0]+(-0.936636326408)*x[1]+(1.23434495942)*x[2]
-        arg[0,3,1,0]=(0.665136478224)*x[0]+(-0.223132283946)*x[1]+(0.513937660496)*x[2]
-        arg[0,3,1,1]=(0.99663942166)*x[0]+(-0.870793744717)*x[1]+(-0.44642261239)*x[2]
-        arg[0,3,2,0]=(0.426708530385)*x[0]+(-0.399913590631)*x[1]+(0.621569032554)*x[2]
-        arg[0,3,2,1]=(-0.385564378699)*x[0]+(-1.17310910463)*x[1]+(-0.386725711607)*x[2]
-        arg[0,4,0,0]=(-0.907605366918)*x[0]+(-1.15620807313)*x[1]+(0.690709991448)*x[2]
-        arg[0,4,0,1]=(0.68925487184)*x[0]+(-0.731402302062)*x[1]+(-0.278506722879)*x[2]
-        arg[0,4,1,0]=(0.607545316973)*x[0]+(-0.480514687124)*x[1]+(-0.261850296368)*x[2]
-        arg[0,4,1,1]=(1.39016358303)*x[0]+(0.571194445557)*x[1]+(1.02359000173)*x[2]
-        arg[0,4,2,0]=(1.19042892582)*x[0]+(-0.265599567429)*x[1]+(-0.412933583721)*x[2]
-        arg[0,4,2,1]=(0.105768402681)*x[0]+(0.529442827604)*x[1]+(1.70332495695)*x[2]
-        arg[1,0,0,0]=(-0.466512450689)*x[0]+(-0.821724116037)*x[1]+(0.315646947734)*x[2]
-        arg[1,0,0,1]=(-0.343965024161)*x[0]+(-0.718276908655)*x[1]+(-0.89648206258)*x[2]
-        arg[1,0,1,0]=(0.533001165605)*x[0]+(0.0431632707839)*x[1]+(-0.34028160642)*x[2]
-        arg[1,0,1,1]=(-0.0905898060243)*x[0]+(-0.634642149101)*x[1]+(-1.13501642684)*x[2]
-        arg[1,0,2,0]=(0.660943497868)*x[0]+(-0.354792953445)*x[1]+(1.28780893672)*x[2]
-        arg[1,0,2,1]=(-1.2338460337)*x[0]+(-1.07489268654)*x[1]+(-1.32063885434)*x[2]
-        arg[1,1,0,0]=(-0.564276365398)*x[0]+(1.03120151704)*x[1]+(-1.15799041025)*x[2]
-        arg[1,1,0,1]=(0.715308242213)*x[0]+(1.38372056508)*x[1]+(0.143855804663)*x[2]
-        arg[1,1,1,0]=(-0.359352464902)*x[0]+(1.12698364061)*x[1]+(0.592356171876)*x[2]
-        arg[1,1,1,1]=(-0.450554686066)*x[0]+(-0.546866217679)*x[1]+(1.0842968414)*x[2]
-        arg[1,1,2,0]=(-0.477267172046)*x[0]+(-0.863491255396)*x[1]+(-0.991333852913)*x[2]
-        arg[1,1,2,1]=(0.402599196931)*x[0]+(-0.635287203482)*x[1]+(-0.277210261227)*x[2]
-        arg[1,2,0,0]=(-1.56932441015)*x[0]+(-1.56442238007)*x[1]+(-0.375354109955)*x[2]
-        arg[1,2,0,1]=(0.193969262086)*x[0]+(-0.0913153952113)*x[1]+(-0.764434182025)*x[2]
-        arg[1,2,1,0]=(-0.836765580561)*x[0]+(0.84683301026)*x[1]+(-1.05033967172)*x[2]
-        arg[1,2,1,1]=(1.68348957076)*x[0]+(-1.14474223991)*x[1]+(-0.0028142026612)*x[2]
-        arg[1,2,2,0]=(-0.0921618478149)*x[0]+(-0.555660652821)*x[1]+(-0.398214997034)*x[2]
-        arg[1,2,2,1]=(1.03261791276)*x[0]+(-0.650225649301)*x[1]+(1.63375423051)*x[2]
-        arg[1,3,0,0]=(-0.348599695393)*x[0]+(-1.20215183267)*x[1]+(-0.1129459677)*x[2]
-        arg[1,3,0,1]=(0.877317784105)*x[0]+(-0.587978566735)*x[1]+(1.10042804546)*x[2]
-        arg[1,3,1,0]=(-0.547033849227)*x[0]+(-1.28198893788)*x[1]+(-0.424854587074)*x[2]
-        arg[1,3,1,1]=(0.739360669292)*x[0]+(-0.66359460621)*x[1]+(1.08588749669)*x[2]
-        arg[1,3,2,0]=(0.137130432185)*x[0]+(-0.123436803848)*x[1]+(-1.31161936702)*x[2]
-        arg[1,3,2,1]=(-0.0171220220237)*x[0]+(1.44556512776)*x[1]+(0.665008556384)*x[2]
-        arg[1,4,0,0]=(-0.304568160155)*x[0]+(-0.453489411096)*x[1]+(0.769736915169)*x[2]
-        arg[1,4,0,1]=(-0.389567079496)*x[0]+(1.01465816808)*x[1]+(1.05389792181)*x[2]
-        arg[1,4,1,0]=(-0.293019902659)*x[0]+(0.935020375302)*x[1]+(0.465003429909)*x[2]
-        arg[1,4,1,1]=(1.26426164192)*x[0]+(0.53660188438)*x[1]+(-1.26997852414)*x[2]
-        arg[1,4,2,0]=(0.447013260347)*x[0]+(-0.292646095073)*x[1]+(-0.141236248636)*x[2]
-        arg[1,4,2,1]=(0.627246227193)*x[0]+(-1.07310030602)*x[1]+(0.414244174014)*x[2]
-        arg[2,0,0,0]=(0.0450404092088)*x[0]+(-0.092484507099)*x[1]+(0.416562031216)*x[2]
-        arg[2,0,0,1]=(0.437290559939)*x[0]+(-1.00144259207)*x[1]+(1.26666155425)*x[2]
-        arg[2,0,1,0]=(0.0919297766737)*x[0]+(0.925519273623)*x[1]+(-0.582669368425)*x[2]
-        arg[2,0,1,1]=(1.40247347323)*x[0]+(-0.896360612277)*x[1]+(-0.235401929947)*x[2]
-        arg[2,0,2,0]=(-0.0760543780641)*x[0]+(-1.12543060216)*x[1]+(-1.73005861985)*x[2]
-        arg[2,0,2,1]=(-0.0540914682488)*x[0]+(0.686173107995)*x[1]+(-0.499264219762)*x[2]
-        arg[2,1,0,0]=(1.29412006754)*x[0]+(1.17564161143)*x[1]+(0.30140132879)*x[2]
-        arg[2,1,0,1]=(-0.987572082341)*x[0]+(-1.73401714184)*x[1]+(0.542753625023)*x[2]
-        arg[2,1,1,0]=(-0.162426291727)*x[0]+(0.508287986142)*x[1]+(0.42345261935)*x[2]
-        arg[2,1,1,1]=(-0.436007145923)*x[0]+(0.344485478615)*x[1]+(0.867081685885)*x[2]
-        arg[2,1,2,0]=(1.23340638096)*x[0]+(1.16627983483)*x[1]+(0.291792397233)*x[2]
-        arg[2,1,2,1]=(1.81405521045)*x[0]+(-0.358711641776)*x[1]+(1.67495221975)*x[2]
-        arg[2,2,0,0]=(-0.998776647505)*x[0]+(1.38487801142)*x[1]+(-0.199886556937)*x[2]
-        arg[2,2,0,1]=(-0.151564577745)*x[0]+(0.100245326484)*x[1]+(-0.98457000197)*x[2]
-        arg[2,2,1,0]=(-0.767959771993)*x[0]+(-0.641538616024)*x[1]+(0.0206020120898)*x[2]
-        arg[2,2,1,1]=(-0.116988718822)*x[0]+(-1.15499563681)*x[1]+(-0.187589599016)*x[2]
-        arg[2,2,2,0]=(0.682354528276)*x[0]+(0.606005834005)*x[1]+(0.11468472132)*x[2]
-        arg[2,2,2,1]=(-0.547781355521)*x[0]+(1.23047427005)*x[1]+(0.854018236174)*x[2]
-        arg[2,3,0,0]=(0.368349078554)*x[0]+(-1.12153473446)*x[1]+(0.114116055257)*x[2]
-        arg[2,3,0,1]=(0.838089123891)*x[0]+(0.283469213399)*x[1]+(0.249874271688)*x[2]
-        arg[2,3,1,0]=(-1.03882746612)*x[0]+(0.159711106612)*x[1]+(-1.57272656988)*x[2]
-        arg[2,3,1,1]=(-1.25439210606)*x[0]+(-0.801588333704)*x[1]+(-0.166928557775)*x[2]
-        arg[2,3,2,0]=(0.0650011438717)*x[0]+(0.879974749381)*x[1]+(-0.276534309239)*x[2]
-        arg[2,3,2,1]=(-0.774913691581)*x[0]+(-0.360358063631)*x[1]+(-0.368288145309)*x[2]
-        arg[2,4,0,0]=(-0.855093207242)*x[0]+(0.82049336972)*x[1]+(-0.496007273696)*x[2]
-        arg[2,4,0,1]=(-0.113408635338)*x[0]+(0.116297312211)*x[1]+(-1.05279504872)*x[2]
-        arg[2,4,1,0]=(1.59034968962)*x[0]+(-0.993664270946)*x[1]+(-1.44097244774)*x[2]
-        arg[2,4,1,1]=(-0.554191144546)*x[0]+(-1.30747375036)*x[1]+(-1.17946836248)*x[2]
-        arg[2,4,2,0]=(0.626012137217)*x[0]+(0.518243725142)*x[1]+(0.0933303150622)*x[2]
-        arg[2,4,2,1]=(-0.10169564723)*x[0]+(1.45820149276)*x[1]+(-0.0393269028179)*x[2]
-        arg[3,0,0,0]=(-0.0404687905735)*x[0]+(0.0715700915639)*x[1]+(1.45121483418)*x[2]
-        arg[3,0,0,1]=(1.25470808156)*x[0]+(-0.119317783496)*x[1]+(0.28341020961)*x[2]
-        arg[3,0,1,0]=(0.352807293701)*x[0]+(0.230591898707)*x[1]+(-0.580416381826)*x[2]
-        arg[3,0,1,1]=(1.6169875055)*x[0]+(0.515147269207)*x[1]+(-0.461088044559)*x[2]
-        arg[3,0,2,0]=(0.345374169211)*x[0]+(0.165179946106)*x[1]+(0.0761591935161)*x[2]
-        arg[3,0,2,1]=(-0.367306414632)*x[0]+(-0.236156646602)*x[1]+(-0.388955870267)*x[2]
-        arg[3,1,0,0]=(-0.27984693051)*x[0]+(-0.0431489812153)*x[1]+(-0.315624571395)*x[2]
-        arg[3,1,0,1]=(-0.923109329983)*x[0]+(0.71133451696)*x[1]+(-0.793551470792)*x[2]
-        arg[3,1,1,0]=(-0.434858211337)*x[0]+(0.943115368224)*x[1]+(0.195339633021)*x[2]
-        arg[3,1,1,1]=(0.517533657447)*x[0]+(-0.975487574798)*x[1]+(0.00389777788827)*x[2]
-        arg[3,1,2,0]=(-1.29728995298)*x[0]+(-0.519355341481)*x[1]+(-0.986985327874)*x[2]
-        arg[3,1,2,1]=(-0.104824066468)*x[0]+(0.155059832097)*x[1]+(-0.513194354212)*x[2]
-        arg[3,2,0,0]=(-0.053676798897)*x[0]+(-0.957854779002)*x[1]+(0.575673251241)*x[2]
-        arg[3,2,0,1]=(0.828930053602)*x[0]+(0.122518313839)*x[1]+(-0.711848816688)*x[2]
-        arg[3,2,1,0]=(0.468063581449)*x[0]+(0.233244036405)*x[1]+(-1.06333921952)*x[2]
-        arg[3,2,1,1]=(-0.178080946586)*x[0]+(0.481804828166)*x[1]+(-0.25332042181)*x[2]
-        arg[3,2,2,0]=(-0.2520881536)*x[0]+(-1.03459378989)*x[1]+(-0.284550808049)*x[2]
-        arg[3,2,2,1]=(-0.778922518429)*x[0]+(1.0037625091)*x[1]+(-0.252088333444)*x[2]
-        arg[3,3,0,0]=(0.467759844055)*x[0]+(0.598630111441)*x[1]+(-0.180631591223)*x[2]
-        arg[3,3,0,1]=(-0.704465112342)*x[0]+(0.577992884135)*x[1]+(0.614639798328)*x[2]
-        arg[3,3,1,0]=(0.58772281958)*x[0]+(0.267751378071)*x[1]+(0.11546949909)*x[2]
-        arg[3,3,1,1]=(-0.220490484007)*x[0]+(-0.346075755455)*x[1]+(0.709249188793)*x[2]
-        arg[3,3,2,0]=(-0.03823885045)*x[0]+(1.0070390689)*x[1]+(0.786191739951)*x[2]
-        arg[3,3,2,1]=(0.468772686804)*x[0]+(-0.416774817651)*x[1]+(1.65342478719)*x[2]
-        arg[3,4,0,0]=(0.69436779527)*x[0]+(-0.644342658009)*x[1]+(-0.6765845785)*x[2]
-        arg[3,4,0,1]=(0.210253965392)*x[0]+(0.208735045316)*x[1]+(-0.553442080096)*x[2]
-        arg[3,4,1,0]=(-0.0680478107141)*x[0]+(0.770215954791)*x[1]+(-0.876270039559)*x[2]
-        arg[3,4,1,1]=(-0.384812708168)*x[0]+(-0.482707860969)*x[1]+(1.00274437781)*x[2]
-        arg[3,4,2,0]=(-0.144567417774)*x[0]+(0.277773632892)*x[1]+(1.3123295509)*x[2]
-        arg[3,4,2,1]=(0.00870646304914)*x[0]+(-0.254229329332)*x[1]+(-1.66538680273)*x[2]
-        ref[0,0,0,0]=(0.841760617241)*(1+2.*(dim-1.)/(o+1.))+(-1.18631140441)*dim
-        ref[0,0,0,1]=(-0.610007337864)*(1+2.*(dim-1.)/(o+1.))+(-1.71451486621)*dim
-        ref[0,0,1,0]=(-0.765605897612)*(1+2.*(dim-1.)/(o+1.))+(0.83571459148)*dim
-        ref[0,0,1,1]=(-0.128014940891)*(1+2.*(dim-1.)/(o+1.))+(-1.14397157584)*dim
-        ref[0,0,2,0]=(-0.969876086955)*(1+2.*(dim-1.)/(o+1.))+(-0.238541556867)*dim
-        ref[0,0,2,1]=(-0.434074835341)*(1+2.*(dim-1.)/(o+1.))+(-1.65441946755)*dim
-        ref[0,1,0,0]=(0.346878720962)*(1+2.*(dim-1.)/(o+1.))+(-0.722019888602)*dim
-        ref[0,1,0,1]=(-0.163332213104)*(1+2.*(dim-1.)/(o+1.))+(-0.135481298717)*dim
-        ref[0,1,1,0]=(0.64836517897)*(1+2.*(dim-1.)/(o+1.))+(-0.720330834499)*dim
-        ref[0,1,1,1]=(1.50578185724)*(1+2.*(dim-1.)/(o+1.))+(2.13408486278)*dim
-        ref[0,1,2,0]=(-1.24719412419)*(1+2.*(dim-1.)/(o+1.))+(0.0927684729819)*dim
-        ref[0,1,2,1]=(0.798388744364)*(1+2.*(dim-1.)/(o+1.))+(-1.93130500501)*dim
-        ref[0,2,0,0]=(-1.9926882083)*(1+2.*(dim-1.)/(o+1.))+(0.191543055387)*dim
-        ref[0,2,0,1]=(-2.16203894433)*(1+2.*(dim-1.)/(o+1.))+(0.824988972246)*dim
-        ref[0,2,1,0]=(-2.24934415172)*(1+2.*(dim-1.)/(o+1.))+(-0.263056346511)*dim
-        ref[0,2,1,1]=(-0.719152132879)*(1+2.*(dim-1.)/(o+1.))+(-1.00573012142)*dim
-        ref[0,2,2,0]=(-0.83751635258)*(1+2.*(dim-1.)/(o+1.))+(0.277097758257)*dim
-        ref[0,2,2,1]=(-0.979077481565)*(1+2.*(dim-1.)/(o+1.))+(0.0516269952525)*dim
-        ref[0,3,0,0]=(-0.623873484234)*(1+2.*(dim-1.)/(o+1.))+(-0.767010416553)*dim
-        ref[0,3,0,1]=(-1.0425822452)*(1+2.*(dim-1.)/(o+1.))+(1.12556988353)*dim
-        ref[0,3,1,0]=(0.548600253744)*(1+2.*(dim-1.)/(o+1.))+(0.407341601031)*dim
-        ref[0,3,1,1]=(-0.531963828356)*(1+2.*(dim-1.)/(o+1.))+(0.211386892908)*dim
-        ref[0,3,2,0]=(1.33006849004)*(1+2.*(dim-1.)/(o+1.))+(-0.681704517735)*dim
-        ref[0,3,2,1]=(-1.98393315604)*(1+2.*(dim-1.)/(o+1.))+(0.0385339611081)*dim
-        ref[0,4,0,0]=(-0.381511396261)*(1+2.*(dim-1.)/(o+1.))+(-0.991592052336)*dim
-        ref[0,4,0,1]=(1.00472425157)*(1+2.*(dim-1.)/(o+1.))+(-1.32537840467)*dim
-        ref[0,4,1,0]=(1.04630307783)*(1+2.*(dim-1.)/(o+1.))+(-1.18112274434)*dim
-        ref[0,4,1,1]=(1.61731240292)*(1+2.*(dim-1.)/(o+1.))+(1.3676356274)*dim
-        ref[0,4,2,0]=(1.41653781097)*(1+2.*(dim-1.)/(o+1.))+(-0.904642036296)*dim
-        ref[0,4,2,1]=(1.61515833451)*(1+2.*(dim-1.)/(o+1.))+(0.723377852725)*dim
-        ref[1,0,0,0]=(-0.879218635)*(1+2.*(dim-1.)/(o+1.))+(-0.0933709839921)*dim
-        ref[1,0,0,1]=(-1.26687353853)*(1+2.*(dim-1.)/(o+1.))+(-0.691850456865)*dim
-        ref[1,0,1,0]=(1.79928802103)*(1+2.*(dim-1.)/(o+1.))+(-1.56340519106)*dim
-        ref[1,0,1,1]=(-1.05495675007)*(1+2.*(dim-1.)/(o+1.))+(-0.805291631901)*dim
-        ref[1,0,2,0]=(-0.339423840638)*(1+2.*(dim-1.)/(o+1.))+(1.93338332178)*dim
-        ref[1,0,2,1]=(-1.15347644771)*(1+2.*(dim-1.)/(o+1.))+(-2.47590112686)*dim
-        ref[1,1,0,0]=(-1.22232845026)*(1+2.*(dim-1.)/(o+1.))+(0.531263191656)*dim
-        ref[1,1,0,1]=(0.318005373727)*(1+2.*(dim-1.)/(o+1.))+(1.92487923823)*dim
-        ref[1,1,1,0]=(0.157193055461)*(1+2.*(dim-1.)/(o+1.))+(1.20279429213)*dim
-        ref[1,1,1,1]=(0.0525914033484)*(1+2.*(dim-1.)/(o+1.))+(0.0342845343071)*dim
-        ref[1,1,2,0]=(-0.319573431275)*(1+2.*(dim-1.)/(o+1.))+(-2.01251884908)*dim
-        ref[1,1,2,1]=(-1.67524932091)*(1+2.*(dim-1.)/(o+1.))+(1.16535105313)*dim
-        ref[1,2,0,0]=(-2.25088459423)*(1+2.*(dim-1.)/(o+1.))+(-1.25821630594)*dim
-        ref[1,2,0,1]=(-0.447759463011)*(1+2.*(dim-1.)/(o+1.))+(-0.214020852139)*dim
-        ref[1,2,1,0]=(-1.26590071291)*(1+2.*(dim-1.)/(o+1.))+(0.225628470886)*dim
-        ref[1,2,1,1]=(-0.372878924951)*(1+2.*(dim-1.)/(o+1.))+(0.90881205314)*dim
-        ref[1,2,2,0]=(1.36047043606)*(1+2.*(dim-1.)/(o+1.))+(-2.40650793373)*dim
-        ref[1,2,2,1]=(1.13871462186)*(1+2.*(dim-1.)/(o+1.))+(0.877431872103)*dim
-        ref[1,3,0,0]=(-1.17967356605)*(1+2.*(dim-1.)/(o+1.))+(-0.48402392971)*dim
-        ref[1,3,0,1]=(-0.177974933247)*(1+2.*(dim-1.)/(o+1.))+(1.56774219607)*dim
-        ref[1,3,1,0]=(-1.40936193115)*(1+2.*(dim-1.)/(o+1.))+(-0.844515443034)*dim
-        ref[1,3,1,1]=(0.790537554795)*(1+2.*(dim-1.)/(o+1.))+(0.371116004973)*dim
-        ref[1,3,2,0]=(0.242057644413)*(1+2.*(dim-1.)/(o+1.))+(-1.5399833831)*dim
-        ref[1,3,2,1]=(1.70371239948)*(1+2.*(dim-1.)/(o+1.))+(0.389739262639)*dim
-        ref[1,4,0,0]=(-0.375645743677)*(1+2.*(dim-1.)/(o+1.))+(0.387325087595)*dim
-        ref[1,4,0,1]=(0.0489286471987)*(1+2.*(dim-1.)/(o+1.))+(1.63006036319)*dim
-        ref[1,4,1,0]=(1.33203691786)*(1+2.*(dim-1.)/(o+1.))+(-0.225033015313)*dim
-        ref[1,4,1,1]=(0.332297845981)*(1+2.*(dim-1.)/(o+1.))+(0.198587156175)*dim
-        ref[1,4,2,0]=(-1.22288078692)*(1+2.*(dim-1.)/(o+1.))+(1.23601170355)*dim
-        ref[1,4,2,1]=(0.0299493142028)*(1+2.*(dim-1.)/(o+1.))+(-0.0615592190171)*dim
-        ref[2,0,0,0]=(0.0963155205346)*(1+2.*(dim-1.)/(o+1.))+(0.272802412791)*dim
-        ref[2,0,0,1]=(1.12280541023)*(1+2.*(dim-1.)/(o+1.))+(-0.420295888105)*dim
-        ref[2,0,1,0]=(-0.296878488858)*(1+2.*(dim-1.)/(o+1.))+(0.73165817073)*dim
-        ref[2,0,1,1]=(-0.407704337172)*(1+2.*(dim-1.)/(o+1.))+(0.678415268175)*dim
-        ref[2,0,2,0]=(-2.37402978977)*(1+2.*(dim-1.)/(o+1.))+(-0.557513810308)*dim
-        ref[2,0,2,1]=(1.2564150767)*(1+2.*(dim-1.)/(o+1.))+(-1.12359765672)*dim
-        ref[2,1,0,0]=(0.824412811392)*(1+2.*(dim-1.)/(o+1.))+(1.94675019637)*dim
-        ref[2,1,0,1]=(-1.06505178789)*(1+2.*(dim-1.)/(o+1.))+(-1.11378381126)*dim
-        ref[2,1,1,0]=(0.200096305752)*(1+2.*(dim-1.)/(o+1.))+(0.569218008012)*dim
-        ref[2,1,1,1]=(1.08680720067)*(1+2.*(dim-1.)/(o+1.))+(-0.311247182096)*dim
-        ref[2,1,2,0]=(1.3764914842)*(1+2.*(dim-1.)/(o+1.))+(1.31498712883)*dim
-        ref[2,1,2,1]=(2.26537199157)*(1+2.*(dim-1.)/(o+1.))+(0.864923796858)*dim
-        ref[2,2,0,0]=(0.750025182887)*(1+2.*(dim-1.)/(o+1.))+(-0.563810375913)*dim
-        ref[2,2,0,1]=(-0.806933575047)*(1+2.*(dim-1.)/(o+1.))+(-0.228955678184)*dim
-        ref[2,2,1,0]=(-1.53132620021)*(1+2.*(dim-1.)/(o+1.))+(0.14242982428)*dim
-        ref[2,2,1,1]=(-0.889411443106)*(1+2.*(dim-1.)/(o+1.))+(-0.570162511538)*dim
-        ref[2,2,2,0]=(-0.0309717316948)*(1+2.*(dim-1.)/(o+1.))+(1.4340168153)*dim
-        ref[2,2,2,1]=(1.48963237375)*(1+2.*(dim-1.)/(o+1.))+(0.0470787769518)*dim
-        ref[2,3,0,0]=(-0.0184174113004)*(1+2.*(dim-1.)/(o+1.))+(-0.620652189349)*dim
-        ref[2,3,0,1]=(0.597433991421)*(1+2.*(dim-1.)/(o+1.))+(0.773998617557)*dim
-        ref[2,3,1,0]=(-1.10704622688)*(1+2.*(dim-1.)/(o+1.))+(-1.34479670251)*dim
-        ref[2,3,1,1]=(-0.369209798891)*(1+2.*(dim-1.)/(o+1.))+(-1.85369919864)*dim
-        ref[2,3,2,0]=(-0.286165609161)*(1+2.*(dim-1.)/(o+1.))+(0.954607193175)*dim
-        ref[2,3,2,1]=(-0.0948450773617)*(1+2.*(dim-1.)/(o+1.))+(-1.40871482316)*dim
-        ref[2,4,0,0]=(-0.350521344827)*(1+2.*(dim-1.)/(o+1.))+(-0.180085766391)*dim
-        ref[2,4,0,1]=(-1.10948105015)*(1+2.*(dim-1.)/(o+1.))+(0.0595746783013)*dim
-        ref[2,4,1,0]=(-0.251521967553)*(1+2.*(dim-1.)/(o+1.))+(-0.592765061514)*dim
-        ref[2,4,1,1]=(-2.22732408506)*(1+2.*(dim-1.)/(o+1.))+(-0.813809172329)*dim
-        ref[2,4,2,0]=(-1.4091057051)*(1+2.*(dim-1.)/(o+1.))+(2.64669188252)*dim
-        ref[2,4,2,1]=(-0.0262518153279)*(1+2.*(dim-1.)/(o+1.))+(1.34343075804)*dim
-        ref[3,0,0,0]=(2.08524442815)*(1+2.*(dim-1.)/(o+1.))+(-0.602928292982)*dim
-        ref[3,0,0,1]=(0.227442743255)*(1+2.*(dim-1.)/(o+1.))+(1.19135776442)*dim
-        ref[3,0,1,0]=(1.03371796145)*(1+2.*(dim-1.)/(o+1.))+(-1.03073515087)*dim
-        ref[3,0,1,1]=(0.205903763449)*(1+2.*(dim-1.)/(o+1.))+(1.4651429667)*dim
-        ref[3,0,2,0]=(1.54387435524)*(1+2.*(dim-1.)/(o+1.))+(-0.957161046404)*dim
-        ref[3,0,2,1]=(-0.487693556268)*(1+2.*(dim-1.)/(o+1.))+(-0.504725375232)*dim
-        ref[3,1,0,0]=(0.319450917291)*(1+2.*(dim-1.)/(o+1.))+(-0.958071400411)*dim
-        ref[3,1,0,1]=(-0.0756676477654)*(1+2.*(dim-1.)/(o+1.))+(-0.929658636049)*dim
-        ref[3,1,1,0]=(0.0109030665653)*(1+2.*(dim-1.)/(o+1.))+(0.692693723343)*dim
-        ref[3,1,1,1]=(0.540904091106)*(1+2.*(dim-1.)/(o+1.))+(-0.994960230569)*dim
-        ref[3,1,2,0]=(-1.39229945953)*(1+2.*(dim-1.)/(o+1.))+(-1.4113311628)*dim
-        ref[3,1,2,1]=(-0.120906779216)*(1+2.*(dim-1.)/(o+1.))+(-0.342051809366)*dim
-        ref[3,2,0,0]=(-0.61477618653)*(1+2.*(dim-1.)/(o+1.))+(0.178917859873)*dim
-        ref[3,2,0,1]=(0.286238606318)*(1+2.*(dim-1.)/(o+1.))+(-0.0466390555654)*dim
-        ref[3,2,1,0]=(-0.0560560726323)*(1+2.*(dim-1.)/(o+1.))+(-0.305975529033)*dim
-        ref[3,2,1,1]=(0.935166077059)*(1+2.*(dim-1.)/(o+1.))+(-0.884762617288)*dim
-        ref[3,2,2,0]=(0.57015079501)*(1+2.*(dim-1.)/(o+1.))+(-2.14138354655)*dim
-        ref[3,2,2,1]=(-0.699470490706)*(1+2.*(dim-1.)/(o+1.))+(0.672222147932)*dim
-        ref[3,3,0,0]=(1.33431543118)*(1+2.*(dim-1.)/(o+1.))+(-0.448557066912)*dim
-        ref[3,3,0,1]=(-1.03724498716)*(1+2.*(dim-1.)/(o+1.))+(1.52541255729)*dim
-        ref[3,3,1,0]=(-0.00371131395733)*(1+2.*(dim-1.)/(o+1.))+(0.974655010698)*dim
-        ref[3,3,1,1]=(0.0918410742793)*(1+2.*(dim-1.)/(o+1.))+(0.0508418750519)*dim
-        ref[3,3,2,0]=(1.63372857769)*(1+2.*(dim-1.)/(o+1.))+(0.121263380706)*dim
-        ref[3,3,2,1]=(0.761569446324)*(1+2.*(dim-1.)/(o+1.))+(0.943853210019)*dim
-        ref[3,4,0,0]=(-0.625751279162)*(1+2.*(dim-1.)/(o+1.))+(-0.000808162076656)*dim
-        ref[3,4,0,1]=(-0.113324890356)*(1+2.*(dim-1.)/(o+1.))+(-0.0211281790319)*dim
-        ref[3,4,1,0]=(0.296144237506)*(1+2.*(dim-1.)/(o+1.))+(-0.470246132989)*dim
-        ref[3,4,1,1]=(0.194264324372)*(1+2.*(dim-1.)/(o+1.))+(-0.0590405157015)*dim
-        ref[3,4,2,0]=(1.63851379122)*(1+2.*(dim-1.)/(o+1.))+(-0.192978025203)*dim
-        ref[3,4,2,1]=(-0.757374882295)*(1+2.*(dim-1.)/(o+1.))+(-1.15353478672)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      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.0177156089276)*x[0]+(-1.07750293477)*x[1]
-        ref=(0.674554765151)*(1+2.*(dim-1.)/(o+1.))+(-1.76977330884)*dim
-      else:
-        arg=(0.304688056778)*x[0]+(0.548485298428)*x[1]+(0.672370309114)*x[2]
-        ref=(0.0121419382123)*(1+2.*(dim-1.)/(o+1.))+(1.51340172611)*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 the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      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.float_)
-      if dim==2:
-        arg[0]=(-1.81332918209)*x[0]+(0.825631690982)*x[1]
-        arg[1]=(0.568335098118)*x[0]+(-0.504485431124)*x[1]
-        ref[0]=(0.0338855214148)*(1+2.*(dim-1.)/(o+1.))+(-1.02158301252)*dim
-        ref[1]=(0.348045520014)*(1+2.*(dim-1.)/(o+1.))+(-0.284195853019)*dim
-      else:
-        arg[0]=(-0.34247651789)*x[0]+(0.952434108232)*x[1]+(0.956872478767)*x[2]
-        arg[1]=(-0.73212870207)*x[0]+(1.25659546958)*x[1]+(-0.690842998605)*x[2]
-        ref[0]=(1.22184577749)*(1+2.*(dim-1.)/(o+1.))+(0.344984291617)*dim
-        ref[1]=(-0.600249739257)*(1+2.*(dim-1.)/(o+1.))+(0.433873508162)*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_ReducedContinuousFunction_rank2(self):
-      """
-      tests integral of rank 2 Data on the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-1.78262197231)*x[0]+(1.45174573417)*x[1]
-        arg[0,1]=(0.213586223199)*x[0]+(-0.917876059198)*x[1]
-        arg[0,2]=(-1.12034819339)*x[0]+(0.59993130233)*x[1]
-        arg[0,3]=(-0.156732957083)*x[0]+(0.744660873695)*x[1]
-        arg[0,4]=(0.217327014577)*x[0]+(1.40157420042)*x[1]
-        arg[1,0]=(0.0588042984116)*x[0]+(1.40376148561)*x[1]
-        arg[1,1]=(-0.264973303233)*x[0]+(1.77692483003)*x[1]
-        arg[1,2]=(-1.17910097102)*x[0]+(-1.20301960774)*x[1]
-        arg[1,3]=(-0.511409983468)*x[0]+(-1.02065230228)*x[1]
-        arg[1,4]=(1.1254497221)*x[0]+(-1.23163629376)*x[1]
-        arg[2,0]=(-0.780207200735)*x[0]+(-1.49983791458)*x[1]
-        arg[2,1]=(0.20679132359)*x[0]+(0.640203014983)*x[1]
-        arg[2,2]=(0.198135205267)*x[0]+(0.30781411018)*x[1]
-        arg[2,3]=(0.465906968942)*x[0]+(-0.812198212)*x[1]
-        arg[2,4]=(0.190357350559)*x[0]+(-1.5894498455)*x[1]
-        arg[3,0]=(-1.1362863086)*x[0]+(-0.0654142353086)*x[1]
-        arg[3,1]=(0.0545924852084)*x[0]+(0.00262152155818)*x[1]
-        arg[3,2]=(-0.0497600832907)*x[0]+(-0.609396009303)*x[1]
-        arg[3,3]=(0.347834191962)*x[0]+(-0.768159599963)*x[1]
-        arg[3,4]=(-0.178383166761)*x[0]+(-0.0690942212822)*x[1]
-        ref[0,0]=(0.0436748214249)*(1+2.*(dim-1.)/(o+1.))+(-0.374551059559)*dim
-        ref[0,1]=(-1.05854206043)*(1+2.*(dim-1.)/(o+1.))+(0.354252224435)*dim
-        ref[0,2]=(-0.71782952995)*(1+2.*(dim-1.)/(o+1.))+(0.197412638885)*dim
-        ref[0,3]=(-0.255252590976)*(1+2.*(dim-1.)/(o+1.))+(0.843180507587)*dim
-        ref[0,4]=(0.177908820578)*(1+2.*(dim-1.)/(o+1.))+(1.44099239442)*dim
-        ref[1,0]=(1.56040501086)*(1+2.*(dim-1.)/(o+1.))+(-0.0978392268304)*dim
-        ref[1,1]=(1.33164571828)*(1+2.*(dim-1.)/(o+1.))+(0.180305808513)*dim
-        ref[1,2]=(-0.885397553926)*(1+2.*(dim-1.)/(o+1.))+(-1.49672302484)*dim
-        ref[1,3]=(0.105451964854)*(1+2.*(dim-1.)/(o+1.))+(-1.63751425061)*dim
-        ref[1,4]=(-0.774237262923)*(1+2.*(dim-1.)/(o+1.))+(0.668050691269)*dim
-        ref[2,0]=(-0.626493344552)*(1+2.*(dim-1.)/(o+1.))+(-1.65355177076)*dim
-        ref[2,1]=(0.383826450148)*(1+2.*(dim-1.)/(o+1.))+(0.463167888425)*dim
-        ref[2,2]=(-0.530241676713)*(1+2.*(dim-1.)/(o+1.))+(1.03619099216)*dim
-        ref[2,3]=(-1.18245389658)*(1+2.*(dim-1.)/(o+1.))+(0.836162653525)*dim
-        ref[2,4]=(-1.32396763993)*(1+2.*(dim-1.)/(o+1.))+(-0.0751248550082)*dim
-        ref[3,0]=(0.15610314985)*(1+2.*(dim-1.)/(o+1.))+(-1.35780369376)*dim
-        ref[3,1]=(-0.376931239611)*(1+2.*(dim-1.)/(o+1.))+(0.434145246378)*dim
-        ref[3,2]=(0.0188741177717)*(1+2.*(dim-1.)/(o+1.))+(-0.678030210365)*dim
-        ref[3,3]=(-0.264501990209)*(1+2.*(dim-1.)/(o+1.))+(-0.155823417792)*dim
-        ref[3,4]=(-0.394609208758)*(1+2.*(dim-1.)/(o+1.))+(0.147131820715)*dim
-      else:
-        arg[0,0]=(-1.55600852596)*x[0]+(-0.624393737912)*x[1]+(-0.747032596279)*x[2]
-        arg[0,1]=(0.158636782846)*x[0]+(-0.751760245066)*x[1]+(-1.62081735864)*x[2]
-        arg[0,2]=(1.18083264152)*x[0]+(-1.16696814878)*x[1]+(-0.567354369023)*x[2]
-        arg[0,3]=(0.176344525636)*x[0]+(-0.825319538089)*x[1]+(0.32760822446)*x[2]
-        arg[0,4]=(0.570849136808)*x[0]+(-0.86277959325)*x[1]+(-0.253106033513)*x[2]
-        arg[1,0]=(0.325475826081)*x[0]+(0.338988467638)*x[1]+(-0.596090654044)*x[2]
-        arg[1,1]=(-1.29950586693)*x[0]+(-0.980591079821)*x[1]+(-0.7995507704)*x[2]
-        arg[1,2]=(0.108948096835)*x[0]+(0.323001832704)*x[1]+(1.09678982473)*x[2]
-        arg[1,3]=(-0.0307191696266)*x[0]+(0.134014984197)*x[1]+(-0.271363693134)*x[2]
-        arg[1,4]=(0.0166805959434)*x[0]+(-0.323260440667)*x[1]+(-0.0168023639197)*x[2]
-        arg[2,0]=(1.66243206086)*x[0]+(-0.478403313987)*x[1]+(1.45469230407)*x[2]
-        arg[2,1]=(0.635927142861)*x[0]+(0.00628277747568)*x[1]+(-0.335502970321)*x[2]
-        arg[2,2]=(-0.168440428449)*x[0]+(-0.302470381257)*x[1]+(1.26059253147)*x[2]
-        arg[2,3]=(-0.0183286590129)*x[0]+(-0.0950506276918)*x[1]+(-0.721364110928)*x[2]
-        arg[2,4]=(-1.04551179644)*x[0]+(0.20728433783)*x[1]+(-0.631521487025)*x[2]
-        arg[3,0]=(1.0112442447)*x[0]+(0.0279472213885)*x[1]+(-1.24445628735)*x[2]
-        arg[3,1]=(-1.36197290176)*x[0]+(0.145431495907)*x[1]+(0.518562214899)*x[2]
-        arg[3,2]=(-0.249567074212)*x[0]+(-1.02991047199)*x[1]+(1.34627546588)*x[2]
-        arg[3,3]=(1.72315708213)*x[0]+(0.00515532937983)*x[1]+(-0.479917704073)*x[2]
-        arg[3,4]=(1.16297504595)*x[0]+(-0.176518851423)*x[1]+(0.184727222764)*x[2]
-        ref[0,0]=(-2.09480681002)*(1+2.*(dim-1.)/(o+1.))+(-0.832628050126)*dim
-        ref[0,1]=(-0.759565702286)*(1+2.*(dim-1.)/(o+1.))+(-1.45437511857)*dim
-        ref[0,2]=(-1.08318812741)*(1+2.*(dim-1.)/(o+1.))+(0.529698251127)*dim
-        ref[0,3]=(1.48988138495)*(1+2.*(dim-1.)/(o+1.))+(-1.81124817294)*dim
-        ref[0,4]=(0.116706866039)*(1+2.*(dim-1.)/(o+1.))+(-0.661743355994)*dim
-        ref[1,0]=(0.584176790043)*(1+2.*(dim-1.)/(o+1.))+(-0.515803150369)*dim
-        ref[1,1]=(-1.25638916576)*(1+2.*(dim-1.)/(o+1.))+(-1.82325855139)*dim
-        ref[1,2]=(-0.276318333951)*(1+2.*(dim-1.)/(o+1.))+(1.80505808822)*dim
-        ref[1,3]=(-0.732277841606)*(1+2.*(dim-1.)/(o+1.))+(0.564209963043)*dim
-        ref[1,4]=(-0.540285295646)*(1+2.*(dim-1.)/(o+1.))+(0.216903087004)*dim
-        ref[2,0]=(2.23339929969)*(1+2.*(dim-1.)/(o+1.))+(0.405321751257)*dim
-        ref[2,1]=(0.706137929075)*(1+2.*(dim-1.)/(o+1.))+(-0.39943097906)*dim
-        ref[2,2]=(-0.474421381251)*(1+2.*(dim-1.)/(o+1.))+(1.26410310301)*dim
-        ref[2,3]=(1.43870260444)*(1+2.*(dim-1.)/(o+1.))+(-2.27344600207)*dim
-        ref[2,4]=(-1.00154864599)*(1+2.*(dim-1.)/(o+1.))+(-0.468200299646)*dim
-        ref[3,0]=(-1.42181650401)*(1+2.*(dim-1.)/(o+1.))+(1.21655168275)*dim
-        ref[3,1]=(-0.853191175508)*(1+2.*(dim-1.)/(o+1.))+(0.155211984554)*dim
-        ref[3,2]=(-0.823496284217)*(1+2.*(dim-1.)/(o+1.))+(0.890294203901)*dim
-        ref[3,3]=(1.54168027082)*(1+2.*(dim-1.)/(o+1.))+(-0.293285563378)*dim
-        ref[3,4]=(1.66366656195)*(1+2.*(dim-1.)/(o+1.))+(-0.492483144667)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.775903850503)*x[0]+(0.20657985447)*x[1]
-        arg[0,0,1]=(1.42793412139)*x[0]+(1.11703130088)*x[1]
-        arg[0,1,0]=(1.89750028353)*x[0]+(1.77903425203)*x[1]
-        arg[0,1,1]=(-0.67280619036)*x[0]+(-0.283600511942)*x[1]
-        arg[1,0,0]=(0.12590667282)*x[0]+(-0.109778270548)*x[1]
-        arg[1,0,1]=(-1.06454156291)*x[0]+(-0.952754071628)*x[1]
-        arg[1,1,0]=(1.27939438243)*x[0]+(1.41358757535)*x[1]
-        arg[1,1,1]=(-1.68847666929)*x[0]+(-0.13467497005)*x[1]
-        arg[2,0,0]=(0.116194220064)*x[0]+(0.457728827844)*x[1]
-        arg[2,0,1]=(0.205487821412)*x[0]+(-0.657189976052)*x[1]
-        arg[2,1,0]=(0.276192450801)*x[0]+(0.998191496643)*x[1]
-        arg[2,1,1]=(1.63929218914)*x[0]+(0.268648283241)*x[1]
-        arg[3,0,0]=(-0.419114071163)*x[0]+(-0.365697048391)*x[1]
-        arg[3,0,1]=(0.802747458947)*x[0]+(0.137023645119)*x[1]
-        arg[3,1,0]=(-0.0712635889142)*x[0]+(0.495489688269)*x[1]
-        arg[3,1,1]=(-0.559073395964)*x[0]+(0.248364992354)*x[1]
-        arg[4,0,0]=(0.372130696656)*x[0]+(1.22892579337)*x[1]
-        arg[4,0,1]=(-1.47944537272)*x[0]+(1.46750125425)*x[1]
-        arg[4,1,0]=(-0.0683410762004)*x[0]+(0.0982446782745)*x[1]
-        arg[4,1,1]=(0.0698227670903)*x[0]+(0.227875508249)*x[1]
-        arg[5,0,0]=(0.237110604157)*x[0]+(0.814767844631)*x[1]
-        arg[5,0,1]=(0.172109909542)*x[0]+(-1.56055537357)*x[1]
-        arg[5,1,0]=(0.92885449265)*x[0]+(0.820977987322)*x[1]
-        arg[5,1,1]=(-1.76483093472)*x[0]+(0.526316351009)*x[1]
-        ref[0,0,0]=(0.574633189339)*(1+2.*(dim-1.)/(o+1.))+(-1.14395718537)*dim
-        ref[0,0,1]=(1.25832290545)*(1+2.*(dim-1.)/(o+1.))+(1.28664251682)*dim
-        ref[0,1,0]=(1.75085914739)*(1+2.*(dim-1.)/(o+1.))+(1.92567538817)*dim
-        ref[0,1,1]=(-1.57747201281)*(1+2.*(dim-1.)/(o+1.))+(0.621065310511)*dim
-        ref[1,0,0]=(0.710883587246)*(1+2.*(dim-1.)/(o+1.))+(-0.694755184974)*dim
-        ref[1,0,1]=(-0.870861363869)*(1+2.*(dim-1.)/(o+1.))+(-1.14643427067)*dim
-        ref[1,1,0]=(1.21302125269)*(1+2.*(dim-1.)/(o+1.))+(1.4799607051)*dim
-        ref[1,1,1]=(-0.163344093083)*(1+2.*(dim-1.)/(o+1.))+(-1.65980754626)*dim
-        ref[2,0,0]=(1.18070929814)*(1+2.*(dim-1.)/(o+1.))+(-0.606786250235)*dim
-        ref[2,0,1]=(-1.26011538751)*(1+2.*(dim-1.)/(o+1.))+(0.808413232875)*dim
-        ref[2,1,0]=(-0.128253427149)*(1+2.*(dim-1.)/(o+1.))+(1.40263737459)*dim
-        ref[2,1,1]=(1.22388877116)*(1+2.*(dim-1.)/(o+1.))+(0.68405170122)*dim
-        ref[3,0,0]=(-1.51984063257)*(1+2.*(dim-1.)/(o+1.))+(0.735029513018)*dim
-        ref[3,0,1]=(1.63702893126)*(1+2.*(dim-1.)/(o+1.))+(-0.697257827196)*dim
-        ref[3,1,0]=(-0.274208683077)*(1+2.*(dim-1.)/(o+1.))+(0.698434782432)*dim
-        ref[3,1,1]=(0.649113059071)*(1+2.*(dim-1.)/(o+1.))+(-0.95982146268)*dim
-        ref[4,0,0]=(1.11723294318)*(1+2.*(dim-1.)/(o+1.))+(0.483823546848)*dim
-        ref[4,0,1]=(-0.0369311601619)*(1+2.*(dim-1.)/(o+1.))+(0.0249870416905)*dim
-        ref[4,1,0]=(-0.0969818481854)*(1+2.*(dim-1.)/(o+1.))+(0.126885450259)*dim
-        ref[4,1,1]=(0.607834304349)*(1+2.*(dim-1.)/(o+1.))+(-0.31013602901)*dim
-        ref[5,0,0]=(0.612356854718)*(1+2.*(dim-1.)/(o+1.))+(0.43952159407)*dim
-        ref[5,0,1]=(-0.245849747535)*(1+2.*(dim-1.)/(o+1.))+(-1.1425957165)*dim
-        ref[5,1,0]=(0.218025498167)*(1+2.*(dim-1.)/(o+1.))+(1.5318069818)*dim
-        ref[5,1,1]=(-0.39419356418)*(1+2.*(dim-1.)/(o+1.))+(-0.844321019532)*dim
-      else:
-        arg[0,0,0]=(1.52622777835)*x[0]+(-0.627217363559)*x[1]+(-0.221339024656)*x[2]
-        arg[0,0,1]=(-0.0735955925339)*x[0]+(-1.44492195287)*x[1]+(-0.0704081180966)*x[2]
-        arg[0,1,0]=(-0.330700790074)*x[0]+(-1.04769579979)*x[1]+(0.508799976666)*x[2]
-        arg[0,1,1]=(0.349349373439)*x[0]+(0.174054703574)*x[1]+(-0.129296220879)*x[2]
-        arg[1,0,0]=(0.0683757878129)*x[0]+(1.33394387082)*x[1]+(0.892302980732)*x[2]
-        arg[1,0,1]=(0.61014567223)*x[0]+(1.23846801628)*x[1]+(-0.990674941877)*x[2]
-        arg[1,1,0]=(0.964575308424)*x[0]+(0.354822939168)*x[1]+(-0.466180761866)*x[2]
-        arg[1,1,1]=(-1.79700594499)*x[0]+(-1.41821199521)*x[1]+(0.366764057361)*x[2]
-        arg[2,0,0]=(0.670092254407)*x[0]+(-0.188523225253)*x[1]+(0.363046866484)*x[2]
-        arg[2,0,1]=(0.420367065732)*x[0]+(0.798321474665)*x[1]+(-1.11347160928)*x[2]
-        arg[2,1,0]=(0.54732858526)*x[0]+(0.249248458735)*x[1]+(1.33905485076)*x[2]
-        arg[2,1,1]=(-1.45292600653)*x[0]+(-0.0838212918177)*x[1]+(-0.210961166185)*x[2]
-        arg[3,0,0]=(-0.406792355772)*x[0]+(-0.230709788944)*x[1]+(1.12300383125)*x[2]
-        arg[3,0,1]=(-1.02748413184)*x[0]+(-1.3840845484)*x[1]+(-0.181262479318)*x[2]
-        arg[3,1,0]=(-1.39003872882)*x[0]+(-0.302577309791)*x[1]+(-0.627070288119)*x[2]
-        arg[3,1,1]=(0.258496709277)*x[0]+(-1.32012543621)*x[1]+(0.921022534515)*x[2]
-        arg[4,0,0]=(-0.639952053735)*x[0]+(0.172303718581)*x[1]+(-1.55894055416)*x[2]
-        arg[4,0,1]=(-1.27660129414)*x[0]+(0.142177942574)*x[1]+(0.84156755899)*x[2]
-        arg[4,1,0]=(0.49812465572)*x[0]+(1.53755810837)*x[1]+(0.10504146131)*x[2]
-        arg[4,1,1]=(0.114534785643)*x[0]+(0.616103931999)*x[1]+(0.515764206037)*x[2]
-        arg[5,0,0]=(0.22562941228)*x[0]+(0.70743104453)*x[1]+(0.882965136406)*x[2]
-        arg[5,0,1]=(0.674003358504)*x[0]+(0.753008881236)*x[1]+(0.033083269963)*x[2]
-        arg[5,1,0]=(-0.495809169314)*x[0]+(-1.09613938465)*x[1]+(-1.03297996938)*x[2]
-        arg[5,1,1]=(-0.5222251005)*x[0]+(-0.56129023192)*x[1]+(0.529084741893)*x[2]
-        ref[0,0,0]=(0.164333186185)*(1+2.*(dim-1.)/(o+1.))+(0.513338203948)*dim
-        ref[0,0,1]=(-0.322072217228)*(1+2.*(dim-1.)/(o+1.))+(-1.26685344627)*dim
-        ref[0,1,0]=(1.37061498302)*(1+2.*(dim-1.)/(o+1.))+(-2.24021159622)*dim
-        ref[0,1,1]=(0.65996582358)*(1+2.*(dim-1.)/(o+1.))+(-0.265857967445)*dim
-        ref[1,0,0]=(1.83616555678)*(1+2.*(dim-1.)/(o+1.))+(0.458457082585)*dim
-        ref[1,0,1]=(1.01886896436)*(1+2.*(dim-1.)/(o+1.))+(-0.160930217723)*dim
-        ref[1,1,0]=(0.95375222959)*(1+2.*(dim-1.)/(o+1.))+(-0.100534743865)*dim
-        ref[1,1,1]=(-1.48059917075)*(1+2.*(dim-1.)/(o+1.))+(-1.3678547121)*dim
-        ref[2,0,0]=(-0.0805152837328)*(1+2.*(dim-1.)/(o+1.))+(0.925131179371)*dim
-        ref[2,0,1]=(0.155604473013)*(1+2.*(dim-1.)/(o+1.))+(-0.0503875419008)*dim
-        ref[2,1,0]=(0.117237902139)*(1+2.*(dim-1.)/(o+1.))+(2.01839399262)*dim
-        ref[2,1,1]=(0.196870433027)*(1+2.*(dim-1.)/(o+1.))+(-1.94457889755)*dim
-        ref[3,0,0]=(-1.16272511547)*(1+2.*(dim-1.)/(o+1.))+(1.648226802)*dim
-        ref[3,0,1]=(-1.54275766077)*(1+2.*(dim-1.)/(o+1.))+(-1.05007349878)*dim
-        ref[3,1,0]=(-2.21939430114)*(1+2.*(dim-1.)/(o+1.))+(-0.100292025596)*dim
-        ref[3,1,1]=(-0.974866109202)*(1+2.*(dim-1.)/(o+1.))+(0.834259916779)*dim
-        ref[4,0,0]=(-1.81015652027)*(1+2.*(dim-1.)/(o+1.))+(-0.216432369042)*dim
-        ref[4,0,1]=(-0.0692225921476)*(1+2.*(dim-1.)/(o+1.))+(-0.223633200428)*dim
-        ref[4,1,0]=(0.907628019251)*(1+2.*(dim-1.)/(o+1.))+(1.23309620615)*dim
-        ref[4,1,1]=(-0.77625708658)*(1+2.*(dim-1.)/(o+1.))+(2.02266001026)*dim
-        ref[5,0,0]=(0.040336826806)*(1+2.*(dim-1.)/(o+1.))+(1.77568876641)*dim
-        ref[5,0,1]=(-0.741065482842)*(1+2.*(dim-1.)/(o+1.))+(2.20116099255)*dim
-        ref[5,1,0]=(-1.93385845474)*(1+2.*(dim-1.)/(o+1.))+(-0.691070068594)*dim
-        ref[5,1,1]=(-0.539652361393)*(1+2.*(dim-1.)/(o+1.))+(-0.014778229134)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.139765044323)*x[0]+(0.763652540371)*x[1]
-        arg[0,0,0,1]=(1.22422998499)*x[0]+(-0.704059494925)*x[1]
-        arg[0,0,1,0]=(-0.0738568759745)*x[0]+(0.227297731345)*x[1]
-        arg[0,0,1,1]=(-0.438016525512)*x[0]+(-0.00290173552923)*x[1]
-        arg[0,0,2,0]=(-0.142466265385)*x[0]+(0.159086109387)*x[1]
-        arg[0,0,2,1]=(-1.29207470861)*x[0]+(0.171024552932)*x[1]
-        arg[0,1,0,0]=(0.228469040214)*x[0]+(-1.11207386711)*x[1]
-        arg[0,1,0,1]=(-0.0716121324998)*x[0]+(-0.293214318059)*x[1]
-        arg[0,1,1,0]=(-0.552331240231)*x[0]+(0.483311325934)*x[1]
-        arg[0,1,1,1]=(0.759050036013)*x[0]+(-0.192218075397)*x[1]
-        arg[0,1,2,0]=(0.736408127399)*x[0]+(0.61962966835)*x[1]
-        arg[0,1,2,1]=(-0.170110592043)*x[0]+(1.12024324836)*x[1]
-        arg[0,2,0,0]=(1.15358129137)*x[0]+(0.00288801991025)*x[1]
-        arg[0,2,0,1]=(0.34101930461)*x[0]+(1.44561406668)*x[1]
-        arg[0,2,1,0]=(1.20180064935)*x[0]+(1.53696717349)*x[1]
-        arg[0,2,1,1]=(-0.955282659666)*x[0]+(-0.232022391367)*x[1]
-        arg[0,2,2,0]=(0.0907361523468)*x[0]+(0.0735957910178)*x[1]
-        arg[0,2,2,1]=(0.377295180443)*x[0]+(-0.694318356175)*x[1]
-        arg[0,3,0,0]=(1.38936937129)*x[0]+(-1.11460156576)*x[1]
-        arg[0,3,0,1]=(-0.477623155591)*x[0]+(-1.38984205639)*x[1]
-        arg[0,3,1,0]=(0.0643534425446)*x[0]+(1.38744715898)*x[1]
-        arg[0,3,1,1]=(0.0144448337619)*x[0]+(-0.107478295727)*x[1]
-        arg[0,3,2,0]=(0.494522779873)*x[0]+(-0.623994602046)*x[1]
-        arg[0,3,2,1]=(0.865352526765)*x[0]+(-0.0330471549519)*x[1]
-        arg[0,4,0,0]=(0.876802965861)*x[0]+(-0.72991482831)*x[1]
-        arg[0,4,0,1]=(-1.59217671369)*x[0]+(-1.17443275047)*x[1]
-        arg[0,4,1,0]=(0.980556838858)*x[0]+(-0.134374268551)*x[1]
-        arg[0,4,1,1]=(-0.799387621998)*x[0]+(0.290707689722)*x[1]
-        arg[0,4,2,0]=(-0.152070506377)*x[0]+(-0.720051351365)*x[1]
-        arg[0,4,2,1]=(-0.726386342076)*x[0]+(-0.821126213298)*x[1]
-        arg[1,0,0,0]=(0.0108792321621)*x[0]+(1.08482229519)*x[1]
-        arg[1,0,0,1]=(0.395066734758)*x[0]+(-0.147576996716)*x[1]
-        arg[1,0,1,0]=(1.34674167646)*x[0]+(-1.7762597766)*x[1]
-        arg[1,0,1,1]=(0.145955749421)*x[0]+(0.0758020791017)*x[1]
-        arg[1,0,2,0]=(-1.3779896638)*x[0]+(0.879047617812)*x[1]
-        arg[1,0,2,1]=(-0.034533186491)*x[0]+(-0.961616456719)*x[1]
-        arg[1,1,0,0]=(1.93531133223)*x[0]+(0.085806770105)*x[1]
-        arg[1,1,0,1]=(-1.40810156335)*x[0]+(0.647954800386)*x[1]
-        arg[1,1,1,0]=(-0.898682130534)*x[0]+(0.0293908578939)*x[1]
-        arg[1,1,1,1]=(0.906365050374)*x[0]+(0.493604087615)*x[1]
-        arg[1,1,2,0]=(0.200697611638)*x[0]+(0.595460978794)*x[1]
-        arg[1,1,2,1]=(-0.137201357175)*x[0]+(-0.456327010456)*x[1]
-        arg[1,2,0,0]=(-0.435882659968)*x[0]+(-0.0312083604574)*x[1]
-        arg[1,2,0,1]=(-0.678923893852)*x[0]+(-0.559827568731)*x[1]
-        arg[1,2,1,0]=(-0.721204171338)*x[0]+(-0.054379212442)*x[1]
-        arg[1,2,1,1]=(-0.0624007046506)*x[0]+(0.168316149134)*x[1]
-        arg[1,2,2,0]=(-1.58839995565)*x[0]+(-0.212071943846)*x[1]
-        arg[1,2,2,1]=(-1.12936118963)*x[0]+(1.37132899453)*x[1]
-        arg[1,3,0,0]=(-0.382791970195)*x[0]+(-1.08331380956)*x[1]
-        arg[1,3,0,1]=(-0.83075188923)*x[0]+(-0.771795988467)*x[1]
-        arg[1,3,1,0]=(-0.491393878842)*x[0]+(0.256082770048)*x[1]
-        arg[1,3,1,1]=(1.16535762668)*x[0]+(1.15868916612)*x[1]
-        arg[1,3,2,0]=(0.930916100823)*x[0]+(0.447810335514)*x[1]
-        arg[1,3,2,1]=(0.542008480891)*x[0]+(0.428660301354)*x[1]
-        arg[1,4,0,0]=(0.820283847448)*x[0]+(-0.861049765761)*x[1]
-        arg[1,4,0,1]=(0.794597952616)*x[0]+(0.484963133102)*x[1]
-        arg[1,4,1,0]=(-0.0864183500936)*x[0]+(-0.48652009912)*x[1]
-        arg[1,4,1,1]=(-0.729261074705)*x[0]+(0.572520019661)*x[1]
-        arg[1,4,2,0]=(0.874563670592)*x[0]+(-1.03978413308)*x[1]
-        arg[1,4,2,1]=(-0.119980177921)*x[0]+(-0.416981275935)*x[1]
-        arg[2,0,0,0]=(0.00851163981688)*x[0]+(0.0537719250367)*x[1]
-        arg[2,0,0,1]=(0.325152071307)*x[0]+(0.852063357275)*x[1]
-        arg[2,0,1,0]=(0.3798978673)*x[0]+(0.103107604149)*x[1]
-        arg[2,0,1,1]=(0.241778324259)*x[0]+(0.840767359849)*x[1]
-        arg[2,0,2,0]=(0.504220642882)*x[0]+(-0.296421218478)*x[1]
-        arg[2,0,2,1]=(1.21850888213)*x[0]+(0.361422173343)*x[1]
-        arg[2,1,0,0]=(1.23948863042)*x[0]+(-0.454591957846)*x[1]
-        arg[2,1,0,1]=(-0.834341417745)*x[0]+(0.836809823188)*x[1]
-        arg[2,1,1,0]=(0.305283593888)*x[0]+(-0.443709359754)*x[1]
-        arg[2,1,1,1]=(-1.73751494542)*x[0]+(0.28249619071)*x[1]
-        arg[2,1,2,0]=(1.64628846378)*x[0]+(0.929422692022)*x[1]
-        arg[2,1,2,1]=(1.55964953056)*x[0]+(0.294507226966)*x[1]
-        arg[2,2,0,0]=(-0.122178600734)*x[0]+(-0.836106215351)*x[1]
-        arg[2,2,0,1]=(0.0560920262009)*x[0]+(-0.959524453552)*x[1]
-        arg[2,2,1,0]=(-0.0235093950509)*x[0]+(1.00069942275)*x[1]
-        arg[2,2,1,1]=(-1.6685983361)*x[0]+(-0.283415608089)*x[1]
-        arg[2,2,2,0]=(1.88757268407)*x[0]+(-0.0970308753337)*x[1]
-        arg[2,2,2,1]=(-0.620474974074)*x[0]+(0.24769276713)*x[1]
-        arg[2,3,0,0]=(1.01637595389)*x[0]+(0.705160942822)*x[1]
-        arg[2,3,0,1]=(1.14707395208)*x[0]+(0.705275592532)*x[1]
-        arg[2,3,1,0]=(-0.758160952494)*x[0]+(0.305309048122)*x[1]
-        arg[2,3,1,1]=(0.772402918026)*x[0]+(-0.052854508055)*x[1]
-        arg[2,3,2,0]=(-0.154978687298)*x[0]+(0.418368826949)*x[1]
-        arg[2,3,2,1]=(-0.845976442257)*x[0]+(0.20623978887)*x[1]
-        arg[2,4,0,0]=(-0.466185710519)*x[0]+(-0.233766119139)*x[1]
-        arg[2,4,0,1]=(-0.922877220469)*x[0]+(-0.688487528304)*x[1]
-        arg[2,4,1,0]=(0.95836287786)*x[0]+(0.939609093639)*x[1]
-        arg[2,4,1,1]=(-0.11982304155)*x[0]+(-0.257073186684)*x[1]
-        arg[2,4,2,0]=(0.345817495959)*x[0]+(0.151979044778)*x[1]
-        arg[2,4,2,1]=(-1.05379548205)*x[0]+(-0.436065928744)*x[1]
-        arg[3,0,0,0]=(0.744945706398)*x[0]+(-0.649458468468)*x[1]
-        arg[3,0,0,1]=(-1.04958965249)*x[0]+(0.639942303499)*x[1]
-        arg[3,0,1,0]=(0.337716118074)*x[0]+(1.93458666396)*x[1]
-        arg[3,0,1,1]=(0.303244531116)*x[0]+(0.436648998724)*x[1]
-        arg[3,0,2,0]=(-1.55484904142)*x[0]+(0.0691158242075)*x[1]
-        arg[3,0,2,1]=(-0.184571563941)*x[0]+(-0.617496186026)*x[1]
-        arg[3,1,0,0]=(0.54665472418)*x[0]+(-0.685197219861)*x[1]
-        arg[3,1,0,1]=(0.270341054659)*x[0]+(0.0123904138595)*x[1]
-        arg[3,1,1,0]=(-0.551927232745)*x[0]+(-0.0835992799883)*x[1]
-        arg[3,1,1,1]=(-0.731741032186)*x[0]+(0.351597478907)*x[1]
-        arg[3,1,2,0]=(-0.678408784965)*x[0]+(-0.0779391332051)*x[1]
-        arg[3,1,2,1]=(-0.873182924195)*x[0]+(-0.641772673128)*x[1]
-        arg[3,2,0,0]=(-0.826223714873)*x[0]+(0.631844849849)*x[1]
-        arg[3,2,0,1]=(-0.899714515249)*x[0]+(-0.010350665009)*x[1]
-        arg[3,2,1,0]=(0.290678744119)*x[0]+(-0.5871053663)*x[1]
-        arg[3,2,1,1]=(0.208288673139)*x[0]+(0.631917010925)*x[1]
-        arg[3,2,2,0]=(-0.262706136542)*x[0]+(0.0853212850096)*x[1]
-        arg[3,2,2,1]=(-1.28934754486)*x[0]+(0.686855142119)*x[1]
-        arg[3,3,0,0]=(-1.36704032596)*x[0]+(-1.55543480824)*x[1]
-        arg[3,3,0,1]=(-1.17014698336)*x[0]+(-0.652446157654)*x[1]
-        arg[3,3,1,0]=(-0.547499757476)*x[0]+(-0.156519515585)*x[1]
-        arg[3,3,1,1]=(0.228140026291)*x[0]+(-1.41014817371)*x[1]
-        arg[3,3,2,0]=(-0.055056583329)*x[0]+(-0.412525603966)*x[1]
-        arg[3,3,2,1]=(-0.524790489086)*x[0]+(-0.774411367008)*x[1]
-        arg[3,4,0,0]=(-1.33491047191)*x[0]+(1.47855022808)*x[1]
-        arg[3,4,0,1]=(-0.301405501225)*x[0]+(0.687178741851)*x[1]
-        arg[3,4,1,0]=(0.213050803289)*x[0]+(0.428086322291)*x[1]
-        arg[3,4,1,1]=(-1.67469009469)*x[0]+(0.857275314994)*x[1]
-        arg[3,4,2,0]=(0.748812148687)*x[0]+(-0.0339722859922)*x[1]
-        arg[3,4,2,1]=(-0.829454912563)*x[0]+(-0.637161668052)*x[1]
-        ref[0,0,0,0]=(0.538138880568)*(1+2.*(dim-1.)/(o+1.))+(0.365278704126)*dim
-        ref[0,0,0,1]=(0.532354921417)*(1+2.*(dim-1.)/(o+1.))+(-0.0121844313566)*dim
-        ref[0,0,1,0]=(1.27037934234)*(1+2.*(dim-1.)/(o+1.))+(-1.11693848697)*dim
-        ref[0,0,1,1]=(-0.317494874699)*(1+2.*(dim-1.)/(o+1.))+(-0.123423386343)*dim
-        ref[0,0,2,0]=(-0.274542501137)*(1+2.*(dim-1.)/(o+1.))+(0.291162345138)*dim
-        ref[0,0,2,1]=(-0.669231324784)*(1+2.*(dim-1.)/(o+1.))+(-0.451818830894)*dim
-        ref[0,1,0,0]=(-1.55791021679)*(1+2.*(dim-1.)/(o+1.))+(0.674305389899)*dim
-        ref[0,1,0,1]=(-1.04225461385)*(1+2.*(dim-1.)/(o+1.))+(0.67742816329)*dim
-        ref[0,1,1,0]=(-0.553787932867)*(1+2.*(dim-1.)/(o+1.))+(0.48476801857)*dim
-        ref[0,1,1,1]=(0.774284436582)*(1+2.*(dim-1.)/(o+1.))+(-0.207452475966)*dim
-        ref[0,1,2,0]=(0.754663298028)*(1+2.*(dim-1.)/(o+1.))+(0.601374497721)*dim
-        ref[0,1,2,1]=(0.378489135155)*(1+2.*(dim-1.)/(o+1.))+(0.571643521166)*dim
-        ref[0,2,0,0]=(0.84270626402)*(1+2.*(dim-1.)/(o+1.))+(0.313763047258)*dim
-        ref[0,2,0,1]=(0.741388749098)*(1+2.*(dim-1.)/(o+1.))+(1.0452446222)*dim
-        ref[0,2,1,0]=(1.31801677967)*(1+2.*(dim-1.)/(o+1.))+(1.42075104317)*dim
-        ref[0,2,1,1]=(0.342128499103)*(1+2.*(dim-1.)/(o+1.))+(-1.52943355014)*dim
-        ref[0,2,2,0]=(-0.2097885639)*(1+2.*(dim-1.)/(o+1.))+(0.374120507264)*dim
-        ref[0,2,2,1]=(0.517181369396)*(1+2.*(dim-1.)/(o+1.))+(-0.834204545127)*dim
-        ref[0,3,0,0]=(0.546538945104)*(1+2.*(dim-1.)/(o+1.))+(-0.271771139576)*dim
-        ref[0,3,0,1]=(-1.11041658618)*(1+2.*(dim-1.)/(o+1.))+(-0.757048625806)*dim
-        ref[0,3,1,0]=(1.71248931933)*(1+2.*(dim-1.)/(o+1.))+(-0.260688717804)*dim
-        ref[0,3,1,1]=(0.426783834682)*(1+2.*(dim-1.)/(o+1.))+(-0.519817296646)*dim
-        ref[0,3,2,0]=(-0.159038051631)*(1+2.*(dim-1.)/(o+1.))+(0.0295662294573)*dim
-        ref[0,3,2,1]=(-0.0935533877409)*(1+2.*(dim-1.)/(o+1.))+(0.925858759554)*dim
-        ref[0,4,0,0]=(0.254413611162)*(1+2.*(dim-1.)/(o+1.))+(-0.107525473611)*dim
-        ref[0,4,0,1]=(-1.80344635667)*(1+2.*(dim-1.)/(o+1.))+(-0.963163107492)*dim
-        ref[0,4,1,0]=(0.77936654687)*(1+2.*(dim-1.)/(o+1.))+(0.0668160234379)*dim
-        ref[0,4,1,1]=(-0.854656189741)*(1+2.*(dim-1.)/(o+1.))+(0.345976257465)*dim
-        ref[0,4,2,0]=(0.236075361826)*(1+2.*(dim-1.)/(o+1.))+(-1.10819721957)*dim
-        ref[0,4,2,1]=(-1.41443045549)*(1+2.*(dim-1.)/(o+1.))+(-0.133082099885)*dim
-        ref[1,0,0,0]=(0.254601110632)*(1+2.*(dim-1.)/(o+1.))+(0.841100416717)*dim
-        ref[1,0,0,1]=(-1.05142234949)*(1+2.*(dim-1.)/(o+1.))+(1.29891208753)*dim
-        ref[1,0,1,0]=(-0.476182365596)*(1+2.*(dim-1.)/(o+1.))+(0.0466642654563)*dim
-        ref[1,0,1,1]=(-1.2117362156)*(1+2.*(dim-1.)/(o+1.))+(1.43349404413)*dim
-        ref[1,0,2,0]=(-0.82694411065)*(1+2.*(dim-1.)/(o+1.))+(0.328002064662)*dim
-        ref[1,0,2,1]=(-0.784489634199)*(1+2.*(dim-1.)/(o+1.))+(-0.211660009011)*dim
-        ref[1,1,0,0]=(1.67906802629)*(1+2.*(dim-1.)/(o+1.))+(0.342050076043)*dim
-        ref[1,1,0,1]=(-0.798764638314)*(1+2.*(dim-1.)/(o+1.))+(0.03861787535)*dim
-        ref[1,1,1,0]=(0.348279136631)*(1+2.*(dim-1.)/(o+1.))+(-1.21757040927)*dim
-        ref[1,1,1,1]=(0.452104104709)*(1+2.*(dim-1.)/(o+1.))+(0.94786503328)*dim
-        ref[1,1,2,0]=(0.855057493837)*(1+2.*(dim-1.)/(o+1.))+(-0.0588989034046)*dim
-        ref[1,1,2,1]=(-0.666495642664)*(1+2.*(dim-1.)/(o+1.))+(0.0729672750328)*dim
-        ref[1,2,0,0]=(-0.566691483673)*(1+2.*(dim-1.)/(o+1.))+(0.0996004632473)*dim
-        ref[1,2,0,1]=(-0.127941886194)*(1+2.*(dim-1.)/(o+1.))+(-1.11080957639)*dim
-        ref[1,2,1,0]=(-0.249856548379)*(1+2.*(dim-1.)/(o+1.))+(-0.525726835401)*dim
-        ref[1,2,1,1]=(1.00195986166)*(1+2.*(dim-1.)/(o+1.))+(-0.896044417179)*dim
-        ref[1,2,2,0]=(-0.96849834562)*(1+2.*(dim-1.)/(o+1.))+(-0.831973553872)*dim
-        ref[1,2,2,1]=(0.204504064885)*(1+2.*(dim-1.)/(o+1.))+(0.0374637400154)*dim
-        ref[1,3,0,0]=(-0.587139938504)*(1+2.*(dim-1.)/(o+1.))+(-0.878965841253)*dim
-        ref[1,3,0,1]=(-0.013960550118)*(1+2.*(dim-1.)/(o+1.))+(-1.58858732758)*dim
-        ref[1,3,1,0]=(-0.626445648631)*(1+2.*(dim-1.)/(o+1.))+(0.391134539838)*dim
-        ref[1,3,1,1]=(0.793357894316)*(1+2.*(dim-1.)/(o+1.))+(1.53068889848)*dim
-        ref[1,3,2,0]=(-0.30795291971)*(1+2.*(dim-1.)/(o+1.))+(1.68667935605)*dim
-        ref[1,3,2,1]=(0.865506632636)*(1+2.*(dim-1.)/(o+1.))+(0.105162149608)*dim
-        ref[1,4,0,0]=(0.0142921032519)*(1+2.*(dim-1.)/(o+1.))+(-0.0550580215643)*dim
-        ref[1,4,0,1]=(1.74635688975)*(1+2.*(dim-1.)/(o+1.))+(-0.466795804028)*dim
-        ref[1,4,1,0]=(0.202247079284)*(1+2.*(dim-1.)/(o+1.))+(-0.775185528498)*dim
-        ref[1,4,1,1]=(0.518302547238)*(1+2.*(dim-1.)/(o+1.))+(-0.675043602282)*dim
-        ref[1,4,2,0]=(-0.0110996487494)*(1+2.*(dim-1.)/(o+1.))+(-0.154120813742)*dim
-        ref[1,4,2,1]=(0.445368223328)*(1+2.*(dim-1.)/(o+1.))+(-0.982329677184)*dim
-        ref[2,0,0,0]=(1.11858205689)*(1+2.*(dim-1.)/(o+1.))+(-1.05629849203)*dim
-        ref[2,0,0,1]=(0.326749663749)*(1+2.*(dim-1.)/(o+1.))+(0.850465764833)*dim
-        ref[2,0,1,0]=(1.17260350442)*(1+2.*(dim-1.)/(o+1.))+(-0.689598032967)*dim
-        ref[2,0,1,1]=(1.26453211291)*(1+2.*(dim-1.)/(o+1.))+(-0.181986428807)*dim
-        ref[2,0,2,0]=(0.28543047736)*(1+2.*(dim-1.)/(o+1.))+(-0.0776310529561)*dim
-        ref[2,0,2,1]=(1.67283723918)*(1+2.*(dim-1.)/(o+1.))+(-0.092906183711)*dim
-        ref[2,1,0,0]=(0.375606493975)*(1+2.*(dim-1.)/(o+1.))+(0.409290178597)*dim
-        ref[2,1,0,1]=(0.391717224425)*(1+2.*(dim-1.)/(o+1.))+(-0.389248818981)*dim
-        ref[2,1,1,0]=(0.540376031372)*(1+2.*(dim-1.)/(o+1.))+(-0.678801797238)*dim
-        ref[2,1,1,1]=(-0.781880488997)*(1+2.*(dim-1.)/(o+1.))+(-0.673138265714)*dim
-        ref[2,1,2,0]=(1.19474704445)*(1+2.*(dim-1.)/(o+1.))+(1.38096411135)*dim
-        ref[2,1,2,1]=(0.3333062674)*(1+2.*(dim-1.)/(o+1.))+(1.52085049012)*dim
-        ref[2,2,0,0]=(-0.570564746042)*(1+2.*(dim-1.)/(o+1.))+(-0.387720070044)*dim
-        ref[2,2,0,1]=(-0.906439974412)*(1+2.*(dim-1.)/(o+1.))+(0.00300754706095)*dim
-        ref[2,2,1,0]=(1.35643048678)*(1+2.*(dim-1.)/(o+1.))+(-0.379240459088)*dim
-        ref[2,2,1,1]=(-1.68522696847)*(1+2.*(dim-1.)/(o+1.))+(-0.266786975721)*dim
-        ref[2,2,2,0]=(1.64773077393)*(1+2.*(dim-1.)/(o+1.))+(0.14281103481)*dim
-        ref[2,2,2,1]=(0.161577377439)*(1+2.*(dim-1.)/(o+1.))+(-0.534359584383)*dim
-        ref[2,3,0,0]=(0.117577368411)*(1+2.*(dim-1.)/(o+1.))+(1.6039595283)*dim
-        ref[2,3,0,1]=(1.07270794583)*(1+2.*(dim-1.)/(o+1.))+(0.779641598778)*dim
-        ref[2,3,1,0]=(0.940083930247)*(1+2.*(dim-1.)/(o+1.))+(-1.39293583462)*dim
-        ref[2,3,1,1]=(-0.322170646263)*(1+2.*(dim-1.)/(o+1.))+(1.04171905623)*dim
-        ref[2,3,2,0]=(-1.00498391043)*(1+2.*(dim-1.)/(o+1.))+(1.26837405008)*dim
-        ref[2,3,2,1]=(0.148227404921)*(1+2.*(dim-1.)/(o+1.))+(-0.787964058307)*dim
-        ref[2,4,0,0]=(-0.567878073929)*(1+2.*(dim-1.)/(o+1.))+(-0.132073755729)*dim
-        ref[2,4,0,1]=(-0.265369521409)*(1+2.*(dim-1.)/(o+1.))+(-1.34599522736)*dim
-        ref[2,4,1,0]=(0.87362235129)*(1+2.*(dim-1.)/(o+1.))+(1.02434962021)*dim
-        ref[2,4,1,1]=(-1.05435356817)*(1+2.*(dim-1.)/(o+1.))+(0.67745733994)*dim
-        ref[2,4,2,0]=(-0.0889174414067)*(1+2.*(dim-1.)/(o+1.))+(0.586713982143)*dim
-        ref[2,4,2,1]=(-0.950446212097)*(1+2.*(dim-1.)/(o+1.))+(-0.539415198695)*dim
-        ref[3,0,0,0]=(0.585351095733)*(1+2.*(dim-1.)/(o+1.))+(-0.489863857802)*dim
-        ref[3,0,0,1]=(0.0818488289135)*(1+2.*(dim-1.)/(o+1.))+(-0.491496177908)*dim
-        ref[3,0,1,0]=(1.83790469827)*(1+2.*(dim-1.)/(o+1.))+(0.43439808376)*dim
-        ref[3,0,1,1]=(-0.812249042145)*(1+2.*(dim-1.)/(o+1.))+(1.55214257198)*dim
-        ref[3,0,2,0]=(-1.62498605972)*(1+2.*(dim-1.)/(o+1.))+(0.139252842511)*dim
-        ref[3,0,2,1]=(0.248660359392)*(1+2.*(dim-1.)/(o+1.))+(-1.05072810936)*dim
-        ref[3,1,0,0]=(0.701570774477)*(1+2.*(dim-1.)/(o+1.))+(-0.840113270158)*dim
-        ref[3,1,0,1]=(-1.01112314775)*(1+2.*(dim-1.)/(o+1.))+(1.29385461627)*dim
-        ref[3,1,1,0]=(-0.38604780773)*(1+2.*(dim-1.)/(o+1.))+(-0.249478705003)*dim
-        ref[3,1,1,1]=(-0.505728989541)*(1+2.*(dim-1.)/(o+1.))+(0.125585436262)*dim
-        ref[3,1,2,0]=(0.170090820399)*(1+2.*(dim-1.)/(o+1.))+(-0.926438738569)*dim
-        ref[3,1,2,1]=(-0.929125306455)*(1+2.*(dim-1.)/(o+1.))+(-0.585830290868)*dim
-        ref[3,2,0,0]=(-0.155713736332)*(1+2.*(dim-1.)/(o+1.))+(-0.038665128691)*dim
-        ref[3,2,0,1]=(-1.52172024486)*(1+2.*(dim-1.)/(o+1.))+(0.6116550646)*dim
-        ref[3,2,1,0]=(0.320960641588)*(1+2.*(dim-1.)/(o+1.))+(-0.617387263769)*dim
-        ref[3,2,1,1]=(1.35000898226)*(1+2.*(dim-1.)/(o+1.))+(-0.509803298192)*dim
-        ref[3,2,2,0]=(-1.08694938974)*(1+2.*(dim-1.)/(o+1.))+(0.909564538204)*dim
-        ref[3,2,2,1]=(-0.484173893901)*(1+2.*(dim-1.)/(o+1.))+(-0.11831850884)*dim
-        ref[3,3,0,0]=(-1.30137401361)*(1+2.*(dim-1.)/(o+1.))+(-1.62110112059)*dim
-        ref[3,3,0,1]=(-1.01955795295)*(1+2.*(dim-1.)/(o+1.))+(-0.803035188058)*dim
-        ref[3,3,1,0]=(-0.86522946065)*(1+2.*(dim-1.)/(o+1.))+(0.161210187589)*dim
-        ref[3,3,1,1]=(-1.45434545656)*(1+2.*(dim-1.)/(o+1.))+(0.272337309144)*dim
-        ref[3,3,2,0]=(-1.09044516001)*(1+2.*(dim-1.)/(o+1.))+(0.622862972717)*dim
-        ref[3,3,2,1]=(-1.56164744337)*(1+2.*(dim-1.)/(o+1.))+(0.262445587275)*dim
-        ref[3,4,0,0]=(-0.0717688395634)*(1+2.*(dim-1.)/(o+1.))+(0.215408595737)*dim
-        ref[3,4,0,1]=(-0.361057910751)*(1+2.*(dim-1.)/(o+1.))+(0.746831151378)*dim
-        ref[3,4,1,0]=(1.3065764036)*(1+2.*(dim-1.)/(o+1.))+(-0.665439278018)*dim
-        ref[3,4,1,1]=(0.00897444539195)*(1+2.*(dim-1.)/(o+1.))+(-0.826389225091)*dim
-        ref[3,4,2,0]=(0.0968985993748)*(1+2.*(dim-1.)/(o+1.))+(0.61794126332)*dim
-        ref[3,4,2,1]=(-0.247002319776)*(1+2.*(dim-1.)/(o+1.))+(-1.21961426084)*dim
-      else:
-        arg[0,0,0,0]=(0.249559417601)*x[0]+(-1.12919415836)*x[1]+(0.535083953587)*x[2]
-        arg[0,0,0,1]=(-1.61154525877)*x[0]+(-0.339535503099)*x[1]+(-0.3734414422)*x[2]
-        arg[0,0,1,0]=(-1.33426413331)*x[0]+(0.503654661149)*x[1]+(0.900718166029)*x[2]
-        arg[0,0,1,1]=(-1.47348135079)*x[0]+(0.294426872223)*x[1]+(-0.092932038156)*x[2]
-        arg[0,0,2,0]=(-0.659338105033)*x[0]+(0.276825152205)*x[1]+(-0.825904690993)*x[2]
-        arg[0,0,2,1]=(-0.871512897535)*x[0]+(0.16237107696)*x[1]+(-1.37935248231)*x[2]
-        arg[0,1,0,0]=(-0.83315792018)*x[0]+(-0.00675809409276)*x[1]+(0.464774846632)*x[2]
-        arg[0,1,0,1]=(0.527155362932)*x[0]+(0.856707619808)*x[1]+(-1.68267649456)*x[2]
-        arg[0,1,1,0]=(-0.524091384241)*x[0]+(-0.540620074365)*x[1]+(0.992745803077)*x[2]
-        arg[0,1,1,1]=(1.61356254869)*x[0]+(1.50422956091)*x[1]+(0.522074610423)*x[2]
-        arg[0,1,2,0]=(-0.786383950132)*x[0]+(0.240998133454)*x[1]+(-0.609039834527)*x[2]
-        arg[0,1,2,1]=(-0.549608404174)*x[0]+(-0.850827315095)*x[1]+(0.267519458624)*x[2]
-        arg[0,2,0,0]=(-0.171255468598)*x[0]+(-0.315808418391)*x[1]+(-1.31408126593)*x[2]
-        arg[0,2,0,1]=(-0.0537048497397)*x[0]+(-1.05283989597)*x[1]+(-0.230505226375)*x[2]
-        arg[0,2,1,0]=(0.175422426556)*x[0]+(-1.37203245283)*x[1]+(-1.31579047196)*x[2]
-        arg[0,2,1,1]=(-0.678719594441)*x[0]+(0.325375648943)*x[1]+(-1.3715383088)*x[2]
-        arg[0,2,2,0]=(1.34295310191)*x[0]+(-1.29856762722)*x[1]+(-0.604804069008)*x[2]
-        arg[0,2,2,1]=(-0.38925176646)*x[0]+(-0.391078913511)*x[1]+(-0.147119806342)*x[2]
-        arg[0,3,0,0]=(0.55897935716)*x[0]+(-0.938161813577)*x[1]+(-1.01170144437)*x[2]
-        arg[0,3,0,1]=(-0.214720994691)*x[0]+(-0.936636326408)*x[1]+(1.23434495942)*x[2]
-        arg[0,3,1,0]=(0.665136478224)*x[0]+(-0.223132283946)*x[1]+(0.513937660496)*x[2]
-        arg[0,3,1,1]=(0.99663942166)*x[0]+(-0.870793744717)*x[1]+(-0.44642261239)*x[2]
-        arg[0,3,2,0]=(0.426708530385)*x[0]+(-0.399913590631)*x[1]+(0.621569032554)*x[2]
-        arg[0,3,2,1]=(-0.385564378699)*x[0]+(-1.17310910463)*x[1]+(-0.386725711607)*x[2]
-        arg[0,4,0,0]=(-0.907605366918)*x[0]+(-1.15620807313)*x[1]+(0.690709991448)*x[2]
-        arg[0,4,0,1]=(0.68925487184)*x[0]+(-0.731402302062)*x[1]+(-0.278506722879)*x[2]
-        arg[0,4,1,0]=(0.607545316973)*x[0]+(-0.480514687124)*x[1]+(-0.261850296368)*x[2]
-        arg[0,4,1,1]=(1.39016358303)*x[0]+(0.571194445557)*x[1]+(1.02359000173)*x[2]
-        arg[0,4,2,0]=(1.19042892582)*x[0]+(-0.265599567429)*x[1]+(-0.412933583721)*x[2]
-        arg[0,4,2,1]=(0.105768402681)*x[0]+(0.529442827604)*x[1]+(1.70332495695)*x[2]
-        arg[1,0,0,0]=(-0.466512450689)*x[0]+(-0.821724116037)*x[1]+(0.315646947734)*x[2]
-        arg[1,0,0,1]=(-0.343965024161)*x[0]+(-0.718276908655)*x[1]+(-0.89648206258)*x[2]
-        arg[1,0,1,0]=(0.533001165605)*x[0]+(0.0431632707839)*x[1]+(-0.34028160642)*x[2]
-        arg[1,0,1,1]=(-0.0905898060243)*x[0]+(-0.634642149101)*x[1]+(-1.13501642684)*x[2]
-        arg[1,0,2,0]=(0.660943497868)*x[0]+(-0.354792953445)*x[1]+(1.28780893672)*x[2]
-        arg[1,0,2,1]=(-1.2338460337)*x[0]+(-1.07489268654)*x[1]+(-1.32063885434)*x[2]
-        arg[1,1,0,0]=(-0.564276365398)*x[0]+(1.03120151704)*x[1]+(-1.15799041025)*x[2]
-        arg[1,1,0,1]=(0.715308242213)*x[0]+(1.38372056508)*x[1]+(0.143855804663)*x[2]
-        arg[1,1,1,0]=(-0.359352464902)*x[0]+(1.12698364061)*x[1]+(0.592356171876)*x[2]
-        arg[1,1,1,1]=(-0.450554686066)*x[0]+(-0.546866217679)*x[1]+(1.0842968414)*x[2]
-        arg[1,1,2,0]=(-0.477267172046)*x[0]+(-0.863491255396)*x[1]+(-0.991333852913)*x[2]
-        arg[1,1,2,1]=(0.402599196931)*x[0]+(-0.635287203482)*x[1]+(-0.277210261227)*x[2]
-        arg[1,2,0,0]=(-1.56932441015)*x[0]+(-1.56442238007)*x[1]+(-0.375354109955)*x[2]
-        arg[1,2,0,1]=(0.193969262086)*x[0]+(-0.0913153952113)*x[1]+(-0.764434182025)*x[2]
-        arg[1,2,1,0]=(-0.836765580561)*x[0]+(0.84683301026)*x[1]+(-1.05033967172)*x[2]
-        arg[1,2,1,1]=(1.68348957076)*x[0]+(-1.14474223991)*x[1]+(-0.0028142026612)*x[2]
-        arg[1,2,2,0]=(-0.0921618478149)*x[0]+(-0.555660652821)*x[1]+(-0.398214997034)*x[2]
-        arg[1,2,2,1]=(1.03261791276)*x[0]+(-0.650225649301)*x[1]+(1.63375423051)*x[2]
-        arg[1,3,0,0]=(-0.348599695393)*x[0]+(-1.20215183267)*x[1]+(-0.1129459677)*x[2]
-        arg[1,3,0,1]=(0.877317784105)*x[0]+(-0.587978566735)*x[1]+(1.10042804546)*x[2]
-        arg[1,3,1,0]=(-0.547033849227)*x[0]+(-1.28198893788)*x[1]+(-0.424854587074)*x[2]
-        arg[1,3,1,1]=(0.739360669292)*x[0]+(-0.66359460621)*x[1]+(1.08588749669)*x[2]
-        arg[1,3,2,0]=(0.137130432185)*x[0]+(-0.123436803848)*x[1]+(-1.31161936702)*x[2]
-        arg[1,3,2,1]=(-0.0171220220237)*x[0]+(1.44556512776)*x[1]+(0.665008556384)*x[2]
-        arg[1,4,0,0]=(-0.304568160155)*x[0]+(-0.453489411096)*x[1]+(0.769736915169)*x[2]
-        arg[1,4,0,1]=(-0.389567079496)*x[0]+(1.01465816808)*x[1]+(1.05389792181)*x[2]
-        arg[1,4,1,0]=(-0.293019902659)*x[0]+(0.935020375302)*x[1]+(0.465003429909)*x[2]
-        arg[1,4,1,1]=(1.26426164192)*x[0]+(0.53660188438)*x[1]+(-1.26997852414)*x[2]
-        arg[1,4,2,0]=(0.447013260347)*x[0]+(-0.292646095073)*x[1]+(-0.141236248636)*x[2]
-        arg[1,4,2,1]=(0.627246227193)*x[0]+(-1.07310030602)*x[1]+(0.414244174014)*x[2]
-        arg[2,0,0,0]=(0.0450404092088)*x[0]+(-0.092484507099)*x[1]+(0.416562031216)*x[2]
-        arg[2,0,0,1]=(0.437290559939)*x[0]+(-1.00144259207)*x[1]+(1.26666155425)*x[2]
-        arg[2,0,1,0]=(0.0919297766737)*x[0]+(0.925519273623)*x[1]+(-0.582669368425)*x[2]
-        arg[2,0,1,1]=(1.40247347323)*x[0]+(-0.896360612277)*x[1]+(-0.235401929947)*x[2]
-        arg[2,0,2,0]=(-0.0760543780641)*x[0]+(-1.12543060216)*x[1]+(-1.73005861985)*x[2]
-        arg[2,0,2,1]=(-0.0540914682488)*x[0]+(0.686173107995)*x[1]+(-0.499264219762)*x[2]
-        arg[2,1,0,0]=(1.29412006754)*x[0]+(1.17564161143)*x[1]+(0.30140132879)*x[2]
-        arg[2,1,0,1]=(-0.987572082341)*x[0]+(-1.73401714184)*x[1]+(0.542753625023)*x[2]
-        arg[2,1,1,0]=(-0.162426291727)*x[0]+(0.508287986142)*x[1]+(0.42345261935)*x[2]
-        arg[2,1,1,1]=(-0.436007145923)*x[0]+(0.344485478615)*x[1]+(0.867081685885)*x[2]
-        arg[2,1,2,0]=(1.23340638096)*x[0]+(1.16627983483)*x[1]+(0.291792397233)*x[2]
-        arg[2,1,2,1]=(1.81405521045)*x[0]+(-0.358711641776)*x[1]+(1.67495221975)*x[2]
-        arg[2,2,0,0]=(-0.998776647505)*x[0]+(1.38487801142)*x[1]+(-0.199886556937)*x[2]
-        arg[2,2,0,1]=(-0.151564577745)*x[0]+(0.100245326484)*x[1]+(-0.98457000197)*x[2]
-        arg[2,2,1,0]=(-0.767959771993)*x[0]+(-0.641538616024)*x[1]+(0.0206020120898)*x[2]
-        arg[2,2,1,1]=(-0.116988718822)*x[0]+(-1.15499563681)*x[1]+(-0.187589599016)*x[2]
-        arg[2,2,2,0]=(0.682354528276)*x[0]+(0.606005834005)*x[1]+(0.11468472132)*x[2]
-        arg[2,2,2,1]=(-0.547781355521)*x[0]+(1.23047427005)*x[1]+(0.854018236174)*x[2]
-        arg[2,3,0,0]=(0.368349078554)*x[0]+(-1.12153473446)*x[1]+(0.114116055257)*x[2]
-        arg[2,3,0,1]=(0.838089123891)*x[0]+(0.283469213399)*x[1]+(0.249874271688)*x[2]
-        arg[2,3,1,0]=(-1.03882746612)*x[0]+(0.159711106612)*x[1]+(-1.57272656988)*x[2]
-        arg[2,3,1,1]=(-1.25439210606)*x[0]+(-0.801588333704)*x[1]+(-0.166928557775)*x[2]
-        arg[2,3,2,0]=(0.0650011438717)*x[0]+(0.879974749381)*x[1]+(-0.276534309239)*x[2]
-        arg[2,3,2,1]=(-0.774913691581)*x[0]+(-0.360358063631)*x[1]+(-0.368288145309)*x[2]
-        arg[2,4,0,0]=(-0.855093207242)*x[0]+(0.82049336972)*x[1]+(-0.496007273696)*x[2]
-        arg[2,4,0,1]=(-0.113408635338)*x[0]+(0.116297312211)*x[1]+(-1.05279504872)*x[2]
-        arg[2,4,1,0]=(1.59034968962)*x[0]+(-0.993664270946)*x[1]+(-1.44097244774)*x[2]
-        arg[2,4,1,1]=(-0.554191144546)*x[0]+(-1.30747375036)*x[1]+(-1.17946836248)*x[2]
-        arg[2,4,2,0]=(0.626012137217)*x[0]+(0.518243725142)*x[1]+(0.0933303150622)*x[2]
-        arg[2,4,2,1]=(-0.10169564723)*x[0]+(1.45820149276)*x[1]+(-0.0393269028179)*x[2]
-        arg[3,0,0,0]=(-0.0404687905735)*x[0]+(0.0715700915639)*x[1]+(1.45121483418)*x[2]
-        arg[3,0,0,1]=(1.25470808156)*x[0]+(-0.119317783496)*x[1]+(0.28341020961)*x[2]
-        arg[3,0,1,0]=(0.352807293701)*x[0]+(0.230591898707)*x[1]+(-0.580416381826)*x[2]
-        arg[3,0,1,1]=(1.6169875055)*x[0]+(0.515147269207)*x[1]+(-0.461088044559)*x[2]
-        arg[3,0,2,0]=(0.345374169211)*x[0]+(0.165179946106)*x[1]+(0.0761591935161)*x[2]
-        arg[3,0,2,1]=(-0.367306414632)*x[0]+(-0.236156646602)*x[1]+(-0.388955870267)*x[2]
-        arg[3,1,0,0]=(-0.27984693051)*x[0]+(-0.0431489812153)*x[1]+(-0.315624571395)*x[2]
-        arg[3,1,0,1]=(-0.923109329983)*x[0]+(0.71133451696)*x[1]+(-0.793551470792)*x[2]
-        arg[3,1,1,0]=(-0.434858211337)*x[0]+(0.943115368224)*x[1]+(0.195339633021)*x[2]
-        arg[3,1,1,1]=(0.517533657447)*x[0]+(-0.975487574798)*x[1]+(0.00389777788827)*x[2]
-        arg[3,1,2,0]=(-1.29728995298)*x[0]+(-0.519355341481)*x[1]+(-0.986985327874)*x[2]
-        arg[3,1,2,1]=(-0.104824066468)*x[0]+(0.155059832097)*x[1]+(-0.513194354212)*x[2]
-        arg[3,2,0,0]=(-0.053676798897)*x[0]+(-0.957854779002)*x[1]+(0.575673251241)*x[2]
-        arg[3,2,0,1]=(0.828930053602)*x[0]+(0.122518313839)*x[1]+(-0.711848816688)*x[2]
-        arg[3,2,1,0]=(0.468063581449)*x[0]+(0.233244036405)*x[1]+(-1.06333921952)*x[2]
-        arg[3,2,1,1]=(-0.178080946586)*x[0]+(0.481804828166)*x[1]+(-0.25332042181)*x[2]
-        arg[3,2,2,0]=(-0.2520881536)*x[0]+(-1.03459378989)*x[1]+(-0.284550808049)*x[2]
-        arg[3,2,2,1]=(-0.778922518429)*x[0]+(1.0037625091)*x[1]+(-0.252088333444)*x[2]
-        arg[3,3,0,0]=(0.467759844055)*x[0]+(0.598630111441)*x[1]+(-0.180631591223)*x[2]
-        arg[3,3,0,1]=(-0.704465112342)*x[0]+(0.577992884135)*x[1]+(0.614639798328)*x[2]
-        arg[3,3,1,0]=(0.58772281958)*x[0]+(0.267751378071)*x[1]+(0.11546949909)*x[2]
-        arg[3,3,1,1]=(-0.220490484007)*x[0]+(-0.346075755455)*x[1]+(0.709249188793)*x[2]
-        arg[3,3,2,0]=(-0.03823885045)*x[0]+(1.0070390689)*x[1]+(0.786191739951)*x[2]
-        arg[3,3,2,1]=(0.468772686804)*x[0]+(-0.416774817651)*x[1]+(1.65342478719)*x[2]
-        arg[3,4,0,0]=(0.69436779527)*x[0]+(-0.644342658009)*x[1]+(-0.6765845785)*x[2]
-        arg[3,4,0,1]=(0.210253965392)*x[0]+(0.208735045316)*x[1]+(-0.553442080096)*x[2]
-        arg[3,4,1,0]=(-0.0680478107141)*x[0]+(0.770215954791)*x[1]+(-0.876270039559)*x[2]
-        arg[3,4,1,1]=(-0.384812708168)*x[0]+(-0.482707860969)*x[1]+(1.00274437781)*x[2]
-        arg[3,4,2,0]=(-0.144567417774)*x[0]+(0.277773632892)*x[1]+(1.3123295509)*x[2]
-        arg[3,4,2,1]=(0.00870646304914)*x[0]+(-0.254229329332)*x[1]+(-1.66538680273)*x[2]
-        ref[0,0,0,0]=(0.841760617241)*(1+2.*(dim-1.)/(o+1.))+(-1.18631140441)*dim
-        ref[0,0,0,1]=(-0.610007337864)*(1+2.*(dim-1.)/(o+1.))+(-1.71451486621)*dim
-        ref[0,0,1,0]=(-0.765605897612)*(1+2.*(dim-1.)/(o+1.))+(0.83571459148)*dim
-        ref[0,0,1,1]=(-0.128014940891)*(1+2.*(dim-1.)/(o+1.))+(-1.14397157584)*dim
-        ref[0,0,2,0]=(-0.969876086955)*(1+2.*(dim-1.)/(o+1.))+(-0.238541556867)*dim
-        ref[0,0,2,1]=(-0.434074835341)*(1+2.*(dim-1.)/(o+1.))+(-1.65441946755)*dim
-        ref[0,1,0,0]=(0.346878720962)*(1+2.*(dim-1.)/(o+1.))+(-0.722019888602)*dim
-        ref[0,1,0,1]=(-0.163332213104)*(1+2.*(dim-1.)/(o+1.))+(-0.135481298717)*dim
-        ref[0,1,1,0]=(0.64836517897)*(1+2.*(dim-1.)/(o+1.))+(-0.720330834499)*dim
-        ref[0,1,1,1]=(1.50578185724)*(1+2.*(dim-1.)/(o+1.))+(2.13408486278)*dim
-        ref[0,1,2,0]=(-1.24719412419)*(1+2.*(dim-1.)/(o+1.))+(0.0927684729819)*dim
-        ref[0,1,2,1]=(0.798388744364)*(1+2.*(dim-1.)/(o+1.))+(-1.93130500501)*dim
-        ref[0,2,0,0]=(-1.9926882083)*(1+2.*(dim-1.)/(o+1.))+(0.191543055387)*dim
-        ref[0,2,0,1]=(-2.16203894433)*(1+2.*(dim-1.)/(o+1.))+(0.824988972246)*dim
-        ref[0,2,1,0]=(-2.24934415172)*(1+2.*(dim-1.)/(o+1.))+(-0.263056346511)*dim
-        ref[0,2,1,1]=(-0.719152132879)*(1+2.*(dim-1.)/(o+1.))+(-1.00573012142)*dim
-        ref[0,2,2,0]=(-0.83751635258)*(1+2.*(dim-1.)/(o+1.))+(0.277097758257)*dim
-        ref[0,2,2,1]=(-0.979077481565)*(1+2.*(dim-1.)/(o+1.))+(0.0516269952525)*dim
-        ref[0,3,0,0]=(-0.623873484234)*(1+2.*(dim-1.)/(o+1.))+(-0.767010416553)*dim
-        ref[0,3,0,1]=(-1.0425822452)*(1+2.*(dim-1.)/(o+1.))+(1.12556988353)*dim
-        ref[0,3,1,0]=(0.548600253744)*(1+2.*(dim-1.)/(o+1.))+(0.407341601031)*dim
-        ref[0,3,1,1]=(-0.531963828356)*(1+2.*(dim-1.)/(o+1.))+(0.211386892908)*dim
-        ref[0,3,2,0]=(1.33006849004)*(1+2.*(dim-1.)/(o+1.))+(-0.681704517735)*dim
-        ref[0,3,2,1]=(-1.98393315604)*(1+2.*(dim-1.)/(o+1.))+(0.0385339611081)*dim
-        ref[0,4,0,0]=(-0.381511396261)*(1+2.*(dim-1.)/(o+1.))+(-0.991592052336)*dim
-        ref[0,4,0,1]=(1.00472425157)*(1+2.*(dim-1.)/(o+1.))+(-1.32537840467)*dim
-        ref[0,4,1,0]=(1.04630307783)*(1+2.*(dim-1.)/(o+1.))+(-1.18112274434)*dim
-        ref[0,4,1,1]=(1.61731240292)*(1+2.*(dim-1.)/(o+1.))+(1.3676356274)*dim
-        ref[0,4,2,0]=(1.41653781097)*(1+2.*(dim-1.)/(o+1.))+(-0.904642036296)*dim
-        ref[0,4,2,1]=(1.61515833451)*(1+2.*(dim-1.)/(o+1.))+(0.723377852725)*dim
-        ref[1,0,0,0]=(-0.879218635)*(1+2.*(dim-1.)/(o+1.))+(-0.0933709839921)*dim
-        ref[1,0,0,1]=(-1.26687353853)*(1+2.*(dim-1.)/(o+1.))+(-0.691850456865)*dim
-        ref[1,0,1,0]=(1.79928802103)*(1+2.*(dim-1.)/(o+1.))+(-1.56340519106)*dim
-        ref[1,0,1,1]=(-1.05495675007)*(1+2.*(dim-1.)/(o+1.))+(-0.805291631901)*dim
-        ref[1,0,2,0]=(-0.339423840638)*(1+2.*(dim-1.)/(o+1.))+(1.93338332178)*dim
-        ref[1,0,2,1]=(-1.15347644771)*(1+2.*(dim-1.)/(o+1.))+(-2.47590112686)*dim
-        ref[1,1,0,0]=(-1.22232845026)*(1+2.*(dim-1.)/(o+1.))+(0.531263191656)*dim
-        ref[1,1,0,1]=(0.318005373727)*(1+2.*(dim-1.)/(o+1.))+(1.92487923823)*dim
-        ref[1,1,1,0]=(0.157193055461)*(1+2.*(dim-1.)/(o+1.))+(1.20279429213)*dim
-        ref[1,1,1,1]=(0.0525914033484)*(1+2.*(dim-1.)/(o+1.))+(0.0342845343071)*dim
-        ref[1,1,2,0]=(-0.319573431275)*(1+2.*(dim-1.)/(o+1.))+(-2.01251884908)*dim
-        ref[1,1,2,1]=(-1.67524932091)*(1+2.*(dim-1.)/(o+1.))+(1.16535105313)*dim
-        ref[1,2,0,0]=(-2.25088459423)*(1+2.*(dim-1.)/(o+1.))+(-1.25821630594)*dim
-        ref[1,2,0,1]=(-0.447759463011)*(1+2.*(dim-1.)/(o+1.))+(-0.214020852139)*dim
-        ref[1,2,1,0]=(-1.26590071291)*(1+2.*(dim-1.)/(o+1.))+(0.225628470886)*dim
-        ref[1,2,1,1]=(-0.372878924951)*(1+2.*(dim-1.)/(o+1.))+(0.90881205314)*dim
-        ref[1,2,2,0]=(1.36047043606)*(1+2.*(dim-1.)/(o+1.))+(-2.40650793373)*dim
-        ref[1,2,2,1]=(1.13871462186)*(1+2.*(dim-1.)/(o+1.))+(0.877431872103)*dim
-        ref[1,3,0,0]=(-1.17967356605)*(1+2.*(dim-1.)/(o+1.))+(-0.48402392971)*dim
-        ref[1,3,0,1]=(-0.177974933247)*(1+2.*(dim-1.)/(o+1.))+(1.56774219607)*dim
-        ref[1,3,1,0]=(-1.40936193115)*(1+2.*(dim-1.)/(o+1.))+(-0.844515443034)*dim
-        ref[1,3,1,1]=(0.790537554795)*(1+2.*(dim-1.)/(o+1.))+(0.371116004973)*dim
-        ref[1,3,2,0]=(0.242057644413)*(1+2.*(dim-1.)/(o+1.))+(-1.5399833831)*dim
-        ref[1,3,2,1]=(1.70371239948)*(1+2.*(dim-1.)/(o+1.))+(0.389739262639)*dim
-        ref[1,4,0,0]=(-0.375645743677)*(1+2.*(dim-1.)/(o+1.))+(0.387325087595)*dim
-        ref[1,4,0,1]=(0.0489286471987)*(1+2.*(dim-1.)/(o+1.))+(1.63006036319)*dim
-        ref[1,4,1,0]=(1.33203691786)*(1+2.*(dim-1.)/(o+1.))+(-0.225033015313)*dim
-        ref[1,4,1,1]=(0.332297845981)*(1+2.*(dim-1.)/(o+1.))+(0.198587156175)*dim
-        ref[1,4,2,0]=(-1.22288078692)*(1+2.*(dim-1.)/(o+1.))+(1.23601170355)*dim
-        ref[1,4,2,1]=(0.0299493142028)*(1+2.*(dim-1.)/(o+1.))+(-0.0615592190171)*dim
-        ref[2,0,0,0]=(0.0963155205346)*(1+2.*(dim-1.)/(o+1.))+(0.272802412791)*dim
-        ref[2,0,0,1]=(1.12280541023)*(1+2.*(dim-1.)/(o+1.))+(-0.420295888105)*dim
-        ref[2,0,1,0]=(-0.296878488858)*(1+2.*(dim-1.)/(o+1.))+(0.73165817073)*dim
-        ref[2,0,1,1]=(-0.407704337172)*(1+2.*(dim-1.)/(o+1.))+(0.678415268175)*dim
-        ref[2,0,2,0]=(-2.37402978977)*(1+2.*(dim-1.)/(o+1.))+(-0.557513810308)*dim
-        ref[2,0,2,1]=(1.2564150767)*(1+2.*(dim-1.)/(o+1.))+(-1.12359765672)*dim
-        ref[2,1,0,0]=(0.824412811392)*(1+2.*(dim-1.)/(o+1.))+(1.94675019637)*dim
-        ref[2,1,0,1]=(-1.06505178789)*(1+2.*(dim-1.)/(o+1.))+(-1.11378381126)*dim
-        ref[2,1,1,0]=(0.200096305752)*(1+2.*(dim-1.)/(o+1.))+(0.569218008012)*dim
-        ref[2,1,1,1]=(1.08680720067)*(1+2.*(dim-1.)/(o+1.))+(-0.311247182096)*dim
-        ref[2,1,2,0]=(1.3764914842)*(1+2.*(dim-1.)/(o+1.))+(1.31498712883)*dim
-        ref[2,1,2,1]=(2.26537199157)*(1+2.*(dim-1.)/(o+1.))+(0.864923796858)*dim
-        ref[2,2,0,0]=(0.750025182887)*(1+2.*(dim-1.)/(o+1.))+(-0.563810375913)*dim
-        ref[2,2,0,1]=(-0.806933575047)*(1+2.*(dim-1.)/(o+1.))+(-0.228955678184)*dim
-        ref[2,2,1,0]=(-1.53132620021)*(1+2.*(dim-1.)/(o+1.))+(0.14242982428)*dim
-        ref[2,2,1,1]=(-0.889411443106)*(1+2.*(dim-1.)/(o+1.))+(-0.570162511538)*dim
-        ref[2,2,2,0]=(-0.0309717316948)*(1+2.*(dim-1.)/(o+1.))+(1.4340168153)*dim
-        ref[2,2,2,1]=(1.48963237375)*(1+2.*(dim-1.)/(o+1.))+(0.0470787769518)*dim
-        ref[2,3,0,0]=(-0.0184174113004)*(1+2.*(dim-1.)/(o+1.))+(-0.620652189349)*dim
-        ref[2,3,0,1]=(0.597433991421)*(1+2.*(dim-1.)/(o+1.))+(0.773998617557)*dim
-        ref[2,3,1,0]=(-1.10704622688)*(1+2.*(dim-1.)/(o+1.))+(-1.34479670251)*dim
-        ref[2,3,1,1]=(-0.369209798891)*(1+2.*(dim-1.)/(o+1.))+(-1.85369919864)*dim
-        ref[2,3,2,0]=(-0.286165609161)*(1+2.*(dim-1.)/(o+1.))+(0.954607193175)*dim
-        ref[2,3,2,1]=(-0.0948450773617)*(1+2.*(dim-1.)/(o+1.))+(-1.40871482316)*dim
-        ref[2,4,0,0]=(-0.350521344827)*(1+2.*(dim-1.)/(o+1.))+(-0.180085766391)*dim
-        ref[2,4,0,1]=(-1.10948105015)*(1+2.*(dim-1.)/(o+1.))+(0.0595746783013)*dim
-        ref[2,4,1,0]=(-0.251521967553)*(1+2.*(dim-1.)/(o+1.))+(-0.592765061514)*dim
-        ref[2,4,1,1]=(-2.22732408506)*(1+2.*(dim-1.)/(o+1.))+(-0.813809172329)*dim
-        ref[2,4,2,0]=(-1.4091057051)*(1+2.*(dim-1.)/(o+1.))+(2.64669188252)*dim
-        ref[2,4,2,1]=(-0.0262518153279)*(1+2.*(dim-1.)/(o+1.))+(1.34343075804)*dim
-        ref[3,0,0,0]=(2.08524442815)*(1+2.*(dim-1.)/(o+1.))+(-0.602928292982)*dim
-        ref[3,0,0,1]=(0.227442743255)*(1+2.*(dim-1.)/(o+1.))+(1.19135776442)*dim
-        ref[3,0,1,0]=(1.03371796145)*(1+2.*(dim-1.)/(o+1.))+(-1.03073515087)*dim
-        ref[3,0,1,1]=(0.205903763449)*(1+2.*(dim-1.)/(o+1.))+(1.4651429667)*dim
-        ref[3,0,2,0]=(1.54387435524)*(1+2.*(dim-1.)/(o+1.))+(-0.957161046404)*dim
-        ref[3,0,2,1]=(-0.487693556268)*(1+2.*(dim-1.)/(o+1.))+(-0.504725375232)*dim
-        ref[3,1,0,0]=(0.319450917291)*(1+2.*(dim-1.)/(o+1.))+(-0.958071400411)*dim
-        ref[3,1,0,1]=(-0.0756676477654)*(1+2.*(dim-1.)/(o+1.))+(-0.929658636049)*dim
-        ref[3,1,1,0]=(0.0109030665653)*(1+2.*(dim-1.)/(o+1.))+(0.692693723343)*dim
-        ref[3,1,1,1]=(0.540904091106)*(1+2.*(dim-1.)/(o+1.))+(-0.994960230569)*dim
-        ref[3,1,2,0]=(-1.39229945953)*(1+2.*(dim-1.)/(o+1.))+(-1.4113311628)*dim
-        ref[3,1,2,1]=(-0.120906779216)*(1+2.*(dim-1.)/(o+1.))+(-0.342051809366)*dim
-        ref[3,2,0,0]=(-0.61477618653)*(1+2.*(dim-1.)/(o+1.))+(0.178917859873)*dim
-        ref[3,2,0,1]=(0.286238606318)*(1+2.*(dim-1.)/(o+1.))+(-0.0466390555654)*dim
-        ref[3,2,1,0]=(-0.0560560726323)*(1+2.*(dim-1.)/(o+1.))+(-0.305975529033)*dim
-        ref[3,2,1,1]=(0.935166077059)*(1+2.*(dim-1.)/(o+1.))+(-0.884762617288)*dim
-        ref[3,2,2,0]=(0.57015079501)*(1+2.*(dim-1.)/(o+1.))+(-2.14138354655)*dim
-        ref[3,2,2,1]=(-0.699470490706)*(1+2.*(dim-1.)/(o+1.))+(0.672222147932)*dim
-        ref[3,3,0,0]=(1.33431543118)*(1+2.*(dim-1.)/(o+1.))+(-0.448557066912)*dim
-        ref[3,3,0,1]=(-1.03724498716)*(1+2.*(dim-1.)/(o+1.))+(1.52541255729)*dim
-        ref[3,3,1,0]=(-0.00371131395733)*(1+2.*(dim-1.)/(o+1.))+(0.974655010698)*dim
-        ref[3,3,1,1]=(0.0918410742793)*(1+2.*(dim-1.)/(o+1.))+(0.0508418750519)*dim
-        ref[3,3,2,0]=(1.63372857769)*(1+2.*(dim-1.)/(o+1.))+(0.121263380706)*dim
-        ref[3,3,2,1]=(0.761569446324)*(1+2.*(dim-1.)/(o+1.))+(0.943853210019)*dim
-        ref[3,4,0,0]=(-0.625751279162)*(1+2.*(dim-1.)/(o+1.))+(-0.000808162076656)*dim
-        ref[3,4,0,1]=(-0.113324890356)*(1+2.*(dim-1.)/(o+1.))+(-0.0211281790319)*dim
-        ref[3,4,1,0]=(0.296144237506)*(1+2.*(dim-1.)/(o+1.))+(-0.470246132989)*dim
-        ref[3,4,1,1]=(0.194264324372)*(1+2.*(dim-1.)/(o+1.))+(-0.0590405157015)*dim
-        ref[3,4,2,0]=(1.63851379122)*(1+2.*(dim-1.)/(o+1.))+(-0.192978025203)*dim
-        ref[3,4,2,1]=(-0.757374882295)*(1+2.*(dim-1.)/(o+1.))+(-1.15353478672)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 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 the 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.626062912046)*x[0]**o+(0.600712856149)*x[0]+(0.0478861882442)*x[1]**o+(0.77008552734)*x[1]
-        ref=(0.67394910029)*(1+2.*(dim-1.)/(o+1.))+(1.37079838349)*dim
-      else:
-        arg=(0.85588880126)*x[0]**o+(-0.898804533462)*x[0]+(-0.270816921088)*x[1]**o+(-0.842823912373)*x[1]+(-0.47559690762)*x[2]**o+(0.751770125129)*x[2]
-        ref=(0.109474972552)*(1+2.*(dim-1.)/(o+1.))+(-0.989858320706)*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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(0.298913063662)*x[0]**o+(-0.250822875451)*x[0]+(0.707311253225)*x[1]**o+(0.0408091445557)*x[1]
-        arg[1]=(-0.70143850042)*x[0]**o+(-0.80121227022)*x[0]+(0.0731514590408)*x[1]**o+(0.621969876113)*x[1]
-        ref[0]=(1.00622431689)*(1+2.*(dim-1.)/(o+1.))+(-0.210013730895)*dim
-        ref[1]=(-0.628287041379)*(1+2.*(dim-1.)/(o+1.))+(-0.179242394108)*dim
-      else:
-        arg[0]=(0.676976938336)*x[0]**o+(-0.928207054947)*x[0]+(0.864749399199)*x[1]**o+(0.864358390848)*x[1]+(-0.0255569869984)*x[2]**o+(0.0268536872793)*x[2]
-        arg[1]=(0.270542056965)*x[0]**o+(0.0696194435081)*x[0]+(0.401360001043)*x[1]**o+(0.917064528874)*x[1]+(-0.755510144559)*x[2]**o+(0.881244515908)*x[2]
-        ref[0]=(1.51616935054)*(1+2.*(dim-1.)/(o+1.))+(-0.0369949768193)*dim
-        ref[1]=(-0.083608086551)*(1+2.*(dim-1.)/(o+1.))+(1.86792848829)*dim
-      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_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.381843423534)*x[0]**o+(-0.563210012057)*x[0]+(0.730631055205)*x[1]**o+(0.13636238698)*x[1]
-        arg[0,1]=(0.306357653338)*x[0]**o+(-0.797201232101)*x[0]+(-0.66333793372)*x[1]**o+(-0.943650360464)*x[1]
-        arg[0,2]=(-0.34058649734)*x[0]**o+(-0.27047792232)*x[0]+(0.57156687267)*x[1]**o+(-0.659114355468)*x[1]
-        arg[0,3]=(0.73319004289)*x[0]**o+(0.229139540294)*x[0]+(-0.51558765225)*x[1]**o+(0.45052521066)*x[1]
-        arg[0,4]=(-0.264117198359)*x[0]**o+(0.807950109095)*x[0]+(-0.290558748289)*x[1]**o+(0.161864708045)*x[1]
-        arg[1,0]=(0.988732415297)*x[0]**o+(-0.725047414136)*x[0]+(-0.722337599885)*x[1]**o+(0.739130135256)*x[1]
-        arg[1,1]=(-0.315086233906)*x[0]**o+(-0.783177846939)*x[0]+(-0.271931454399)*x[1]**o+(-0.935744613016)*x[1]
-        arg[1,2]=(-0.787047622811)*x[0]**o+(0.00746242211892)*x[0]+(-0.539716273578)*x[1]**o+(-0.340449115622)*x[1]
-        arg[1,3]=(-0.782830405823)*x[0]**o+(0.842318742811)*x[0]+(-0.118894493096)*x[1]**o+(0.645943277412)*x[1]
-        arg[1,4]=(0.0594068367647)*x[0]**o+(-0.184711682975)*x[0]+(-0.0643050731295)*x[1]**o+(-0.981593287261)*x[1]
-        arg[2,0]=(0.17170754931)*x[0]**o+(0.582651363494)*x[0]+(0.334422749985)*x[1]**o+(0.852747429144)*x[1]
-        arg[2,1]=(0.683967516208)*x[0]**o+(-0.612989314204)*x[0]+(0.845175135723)*x[1]**o+(0.374223395314)*x[1]
-        arg[2,2]=(0.588917536035)*x[0]**o+(0.0130713873939)*x[0]+(0.881942872071)*x[1]**o+(0.683941046151)*x[1]
-        arg[2,3]=(-0.63861264887)*x[0]**o+(0.453919752415)*x[0]+(0.448731342326)*x[1]**o+(-0.259183783496)*x[1]
-        arg[2,4]=(-0.132175638549)*x[0]**o+(0.710071566415)*x[0]+(-0.870119332524)*x[1]**o+(0.523394538403)*x[1]
-        arg[3,0]=(0.768036036634)*x[0]**o+(-0.218321673662)*x[0]+(0.50224512768)*x[1]**o+(0.694191572559)*x[1]
-        arg[3,1]=(-0.298369075336)*x[0]**o+(-0.276776010079)*x[0]+(-0.659309162004)*x[1]**o+(0.436841182692)*x[1]
-        arg[3,2]=(-0.00370049871499)*x[0]**o+(-0.41700259949)*x[0]+(0.726806931339)*x[1]**o+(-0.113165181924)*x[1]
-        arg[3,3]=(0.288175924931)*x[0]**o+(-0.489667003521)*x[0]+(-0.531842953651)*x[1]**o+(-0.443517285929)*x[1]
-        arg[3,4]=(-0.645574931589)*x[0]**o+(0.464738749544)*x[0]+(-0.538213524368)*x[1]**o+(-0.94443292146)*x[1]
-        ref[0,0]=(0.348787631671)*(1+2.*(dim-1.)/(o+1.))+(-0.426847625077)*dim
-        ref[0,1]=(-0.356980280382)*(1+2.*(dim-1.)/(o+1.))+(-1.74085159257)*dim
-        ref[0,2]=(0.23098037533)*(1+2.*(dim-1.)/(o+1.))+(-0.929592277787)*dim
-        ref[0,3]=(0.21760239064)*(1+2.*(dim-1.)/(o+1.))+(0.679664750954)*dim
-        ref[0,4]=(-0.554675946648)*(1+2.*(dim-1.)/(o+1.))+(0.96981481714)*dim
-        ref[1,0]=(0.266394815412)*(1+2.*(dim-1.)/(o+1.))+(0.0140827211195)*dim
-        ref[1,1]=(-0.587017688304)*(1+2.*(dim-1.)/(o+1.))+(-1.71892245996)*dim
-        ref[1,2]=(-1.32676389639)*(1+2.*(dim-1.)/(o+1.))+(-0.332986693503)*dim
-        ref[1,3]=(-0.901724898919)*(1+2.*(dim-1.)/(o+1.))+(1.48826202022)*dim
-        ref[1,4]=(-0.00489823636486)*(1+2.*(dim-1.)/(o+1.))+(-1.16630497024)*dim
-        ref[2,0]=(0.506130299295)*(1+2.*(dim-1.)/(o+1.))+(1.43539879264)*dim
-        ref[2,1]=(1.52914265193)*(1+2.*(dim-1.)/(o+1.))+(-0.238765918889)*dim
-        ref[2,2]=(1.47086040811)*(1+2.*(dim-1.)/(o+1.))+(0.697012433545)*dim
-        ref[2,3]=(-0.189881306544)*(1+2.*(dim-1.)/(o+1.))+(0.194735968919)*dim
-        ref[2,4]=(-1.00229497107)*(1+2.*(dim-1.)/(o+1.))+(1.23346610482)*dim
-        ref[3,0]=(1.27028116431)*(1+2.*(dim-1.)/(o+1.))+(0.475869898897)*dim
-        ref[3,1]=(-0.957678237339)*(1+2.*(dim-1.)/(o+1.))+(0.160065172613)*dim
-        ref[3,2]=(0.723106432624)*(1+2.*(dim-1.)/(o+1.))+(-0.530167781414)*dim
-        ref[3,3]=(-0.243667028719)*(1+2.*(dim-1.)/(o+1.))+(-0.93318428945)*dim
-        ref[3,4]=(-1.18378845596)*(1+2.*(dim-1.)/(o+1.))+(-0.479694171917)*dim
-      else:
-        arg[0,0]=(0.751222317885)*x[0]**o+(0.953666267123)*x[0]+(-0.707417048158)*x[1]**o+(0.310686543483)*x[1]+(0.326267797641)*x[2]**o+(-0.722772500437)*x[2]
-        arg[0,1]=(-0.038709086264)*x[0]**o+(-0.483307819428)*x[0]+(0.611120835303)*x[1]**o+(0.885935954604)*x[1]+(0.630199910046)*x[2]**o+(-0.101764126615)*x[2]
-        arg[0,2]=(0.890606731439)*x[0]**o+(-0.0555491679283)*x[0]+(0.334835177686)*x[1]**o+(0.999030888839)*x[1]+(-0.891653525154)*x[2]**o+(-0.14056280616)*x[2]
-        arg[0,3]=(-0.458305223634)*x[0]**o+(0.679075077126)*x[0]+(0.1176620176)*x[1]**o+(0.685223087684)*x[1]+(-0.952262623464)*x[2]**o+(-0.905568306628)*x[2]
-        arg[0,4]=(0.623179050934)*x[0]**o+(-0.0150847487218)*x[0]+(0.0823495403769)*x[1]**o+(0.48303169009)*x[1]+(0.610276253905)*x[2]**o+(0.353104308072)*x[2]
-        arg[1,0]=(-0.709185342895)*x[0]**o+(0.789980598884)*x[0]+(0.655538102878)*x[1]**o+(0.713913568814)*x[1]+(0.222131732773)*x[2]**o+(0.712644729381)*x[2]
-        arg[1,1]=(-0.683646421822)*x[0]**o+(-0.943691516528)*x[0]+(-0.134261002557)*x[1]**o+(0.28225941018)*x[1]+(0.906235993779)*x[2]**o+(-0.819214603609)*x[2]
-        arg[1,2]=(0.713781993938)*x[0]**o+(-0.189551367619)*x[0]+(-0.021310841804)*x[1]**o+(-0.873466428012)*x[1]+(0.248337664546)*x[2]**o+(0.911824874935)*x[2]
-        arg[1,3]=(-0.393142772637)*x[0]**o+(0.773501237865)*x[0]+(0.759039429922)*x[1]**o+(0.67036876499)*x[1]+(-0.921411979023)*x[2]**o+(-0.649371534276)*x[2]
-        arg[1,4]=(0.526708082723)*x[0]**o+(-0.522449586718)*x[0]+(0.951176548558)*x[1]**o+(0.604602039898)*x[1]+(0.345888192325)*x[2]**o+(-0.973729954334)*x[2]
-        arg[2,0]=(-0.139931215293)*x[0]**o+(-0.996072915638)*x[0]+(-0.0451731431264)*x[1]**o+(0.433694224874)*x[1]+(-0.955189760302)*x[2]**o+(-0.68361667242)*x[2]
-        arg[2,1]=(0.139626552661)*x[0]**o+(-0.91217468751)*x[0]+(-0.854252204911)*x[1]**o+(0.417539913464)*x[1]+(0.557096050124)*x[2]**o+(-0.195272359868)*x[2]
-        arg[2,2]=(0.960352725049)*x[0]**o+(0.98274500341)*x[0]+(0.967782565025)*x[1]**o+(0.566011353381)*x[1]+(0.583885094583)*x[2]**o+(-0.943173847936)*x[2]
-        arg[2,3]=(0.959388333494)*x[0]**o+(0.531908797155)*x[0]+(-0.62531126203)*x[1]**o+(-0.288763293646)*x[1]+(-0.823398780526)*x[2]**o+(-0.164348871248)*x[2]
-        arg[2,4]=(0.73397702179)*x[0]**o+(0.407844592399)*x[0]+(-0.835769355727)*x[1]**o+(0.742360626394)*x[1]+(0.31130186529)*x[2]**o+(0.114221168872)*x[2]
-        arg[3,0]=(-0.42278940444)*x[0]**o+(-0.513158064442)*x[0]+(-0.133233894233)*x[1]**o+(0.701381913887)*x[1]+(0.283776333553)*x[2]**o+(-0.805096661642)*x[2]
-        arg[3,1]=(-0.417338508269)*x[0]**o+(0.535961900783)*x[0]+(0.0836386907734)*x[1]**o+(0.449680928704)*x[1]+(0.998998322868)*x[2]**o+(0.983057825698)*x[2]
-        arg[3,2]=(0.24102382276)*x[0]**o+(0.0291470157398)*x[0]+(-0.539542451698)*x[1]**o+(0.281017043631)*x[1]+(-0.464652133499)*x[2]**o+(0.652828720185)*x[2]
-        arg[3,3]=(-0.482577920013)*x[0]**o+(0.931756756394)*x[0]+(0.96648206338)*x[1]**o+(0.73941459549)*x[1]+(0.136743015429)*x[2]**o+(0.41477914722)*x[2]
-        arg[3,4]=(0.879881885972)*x[0]**o+(0.208970079585)*x[0]+(-0.200079958414)*x[1]**o+(-0.0291238772241)*x[1]+(-0.333569505857)*x[2]**o+(0.846835729875)*x[2]
-        ref[0,0]=(0.370073067368)*(1+2.*(dim-1.)/(o+1.))+(0.541580310169)*dim
-        ref[0,1]=(1.20261165909)*(1+2.*(dim-1.)/(o+1.))+(0.300864008561)*dim
-        ref[0,2]=(0.333788383971)*(1+2.*(dim-1.)/(o+1.))+(0.80291891475)*dim
-        ref[0,3]=(-1.2929058295)*(1+2.*(dim-1.)/(o+1.))+(0.458729858183)*dim
-        ref[0,4]=(1.31580484522)*(1+2.*(dim-1.)/(o+1.))+(0.82105124944)*dim
-        ref[1,0]=(0.168484492756)*(1+2.*(dim-1.)/(o+1.))+(2.21653889708)*dim
-        ref[1,1]=(0.0883285694004)*(1+2.*(dim-1.)/(o+1.))+(-1.48064670996)*dim
-        ref[1,2]=(0.940808816681)*(1+2.*(dim-1.)/(o+1.))+(-0.151192920696)*dim
-        ref[1,3]=(-0.555515321739)*(1+2.*(dim-1.)/(o+1.))+(0.79449846858)*dim
-        ref[1,4]=(1.82377282361)*(1+2.*(dim-1.)/(o+1.))+(-0.891577501154)*dim
-        ref[2,0]=(-1.14029411872)*(1+2.*(dim-1.)/(o+1.))+(-1.24599536318)*dim
-        ref[2,1]=(-0.157529602127)*(1+2.*(dim-1.)/(o+1.))+(-0.689907133913)*dim
-        ref[2,2]=(2.51202038466)*(1+2.*(dim-1.)/(o+1.))+(0.605582508855)*dim
-        ref[2,3]=(-0.489321709063)*(1+2.*(dim-1.)/(o+1.))+(0.0787966322607)*dim
-        ref[2,4]=(0.209509531353)*(1+2.*(dim-1.)/(o+1.))+(1.26442638766)*dim
-        ref[3,0]=(-0.27224696512)*(1+2.*(dim-1.)/(o+1.))+(-0.616872812198)*dim
-        ref[3,1]=(0.665298505372)*(1+2.*(dim-1.)/(o+1.))+(1.96870065519)*dim
-        ref[3,2]=(-0.763170762437)*(1+2.*(dim-1.)/(o+1.))+(0.962992779555)*dim
-        ref[3,3]=(0.620647158797)*(1+2.*(dim-1.)/(o+1.))+(2.0859504991)*dim
-        ref[3,4]=(0.346232421701)*(1+2.*(dim-1.)/(o+1.))+(1.02668193224)*dim
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.201115186772)*x[0]**o+(0.324758103748)*x[0]+(0.285065583242)*x[1]**o+(0.0264985832782)*x[1]
-        arg[0,0,1]=(-0.443023003973)*x[0]**o+(-0.194732927607)*x[0]+(0.64414908519)*x[1]**o+(-0.248261857779)*x[1]
-        arg[0,1,0]=(0.587534172195)*x[0]**o+(0.021088951369)*x[0]+(-0.986195557459)*x[1]**o+(0.595659005312)*x[1]
-        arg[0,1,1]=(-0.916961145134)*x[0]**o+(-0.766484469605)*x[0]+(-0.281345964683)*x[1]**o+(-0.399113856826)*x[1]
-        arg[1,0,0]=(0.175943424949)*x[0]**o+(0.344853386001)*x[0]+(0.175474681848)*x[1]**o+(-0.0775102874697)*x[1]
-        arg[1,0,1]=(-0.874074467007)*x[0]**o+(0.903506914387)*x[0]+(0.177699372538)*x[1]**o+(0.969818154968)*x[1]
-        arg[1,1,0]=(0.765751472387)*x[0]**o+(-0.0288724203687)*x[0]+(0.655676828008)*x[1]**o+(0.22281307247)*x[1]
-        arg[1,1,1]=(0.871009077152)*x[0]**o+(-0.20052353101)*x[0]+(-0.889496767621)*x[1]**o+(0.8458762887)*x[1]
-        arg[2,0,0]=(-0.15377513542)*x[0]**o+(0.963714892768)*x[0]+(0.942514815983)*x[1]**o+(0.846111018838)*x[1]
-        arg[2,0,1]=(0.000727086938663)*x[0]**o+(0.243136987492)*x[0]+(-0.308674899886)*x[1]**o+(-0.963435664436)*x[1]
-        arg[2,1,0]=(0.780912245051)*x[0]**o+(0.227139041778)*x[0]+(-0.336203258384)*x[1]**o+(0.092568284679)*x[1]
-        arg[2,1,1]=(0.0464862681168)*x[0]**o+(0.284493375176)*x[0]+(-0.811073509077)*x[1]**o+(0.54280235419)*x[1]
-        arg[3,0,0]=(0.605642304612)*x[0]**o+(-0.103442921567)*x[0]+(0.106253324829)*x[1]**o+(0.562480007904)*x[1]
-        arg[3,0,1]=(0.497668538008)*x[0]**o+(-0.859679982844)*x[0]+(-0.255499355194)*x[1]**o+(0.0725919239243)*x[1]
-        arg[3,1,0]=(0.641826893201)*x[0]**o+(0.889514581887)*x[0]+(-0.211781857836)*x[1]**o+(0.45900873193)*x[1]
-        arg[3,1,1]=(-0.29349600565)*x[0]**o+(-0.627542961817)*x[0]+(0.313009642686)*x[1]**o+(0.338028134809)*x[1]
-        arg[4,0,0]=(-0.641915241397)*x[0]**o+(-0.682547311604)*x[0]+(-0.106472077451)*x[1]**o+(0.103402239052)*x[1]
-        arg[4,0,1]=(-0.822562520978)*x[0]**o+(-0.430539530156)*x[0]+(-0.0225528898923)*x[1]**o+(-0.0908986665674)*x[1]
-        arg[4,1,0]=(-0.456160645978)*x[0]**o+(-0.264592336242)*x[0]+(-0.672702978868)*x[1]**o+(-0.893197955639)*x[1]
-        arg[4,1,1]=(-0.714689169676)*x[0]**o+(0.513612105215)*x[0]+(-0.3093340377)*x[1]**o+(-0.34467035156)*x[1]
-        arg[5,0,0]=(-0.993761664154)*x[0]**o+(0.375953817044)*x[0]+(0.0463240503072)*x[1]**o+(-0.595646829466)*x[1]
-        arg[5,0,1]=(0.453145186545)*x[0]**o+(0.331353840672)*x[0]+(-0.908533078632)*x[1]**o+(0.755175839674)*x[1]
-        arg[5,1,0]=(-0.736874540101)*x[0]**o+(-0.867437170846)*x[0]+(-0.472395301622)*x[1]**o+(0.78289019661)*x[1]
-        arg[5,1,1]=(-0.900966156016)*x[0]**o+(-0.160363876891)*x[0]+(-0.0969222200475)*x[1]**o+(0.0527983470624)*x[1]
-        ref[0,0,0]=(0.486180770014)*(1+2.*(dim-1.)/(o+1.))+(0.351256687026)*dim
-        ref[0,0,1]=(0.201126081217)*(1+2.*(dim-1.)/(o+1.))+(-0.442994785386)*dim
-        ref[0,1,0]=(-0.398661385264)*(1+2.*(dim-1.)/(o+1.))+(0.616747956681)*dim
-        ref[0,1,1]=(-1.19830710982)*(1+2.*(dim-1.)/(o+1.))+(-1.16559832643)*dim
-        ref[1,0,0]=(0.351418106797)*(1+2.*(dim-1.)/(o+1.))+(0.267343098531)*dim
-        ref[1,0,1]=(-0.696375094469)*(1+2.*(dim-1.)/(o+1.))+(1.87332506936)*dim
-        ref[1,1,0]=(1.42142830039)*(1+2.*(dim-1.)/(o+1.))+(0.193940652101)*dim
-        ref[1,1,1]=(-0.0184876904693)*(1+2.*(dim-1.)/(o+1.))+(0.64535275769)*dim
-        ref[2,0,0]=(0.788739680562)*(1+2.*(dim-1.)/(o+1.))+(1.80982591161)*dim
-        ref[2,0,1]=(-0.307947812947)*(1+2.*(dim-1.)/(o+1.))+(-0.720298676944)*dim
-        ref[2,1,0]=(0.444708986667)*(1+2.*(dim-1.)/(o+1.))+(0.319707326457)*dim
-        ref[2,1,1]=(-0.76458724096)*(1+2.*(dim-1.)/(o+1.))+(0.827295729366)*dim
-        ref[3,0,0]=(0.711895629441)*(1+2.*(dim-1.)/(o+1.))+(0.459037086337)*dim
-        ref[3,0,1]=(0.242169182814)*(1+2.*(dim-1.)/(o+1.))+(-0.78708805892)*dim
-        ref[3,1,0]=(0.430045035365)*(1+2.*(dim-1.)/(o+1.))+(1.34852331382)*dim
-        ref[3,1,1]=(0.019513637036)*(1+2.*(dim-1.)/(o+1.))+(-0.289514827008)*dim
-        ref[4,0,0]=(-0.748387318848)*(1+2.*(dim-1.)/(o+1.))+(-0.579145072551)*dim
-        ref[4,0,1]=(-0.845115410871)*(1+2.*(dim-1.)/(o+1.))+(-0.521438196723)*dim
-        ref[4,1,0]=(-1.12886362485)*(1+2.*(dim-1.)/(o+1.))+(-1.15779029188)*dim
-        ref[4,1,1]=(-1.02402320738)*(1+2.*(dim-1.)/(o+1.))+(0.168941753655)*dim
-        ref[5,0,0]=(-0.947437613847)*(1+2.*(dim-1.)/(o+1.))+(-0.219693012422)*dim
-        ref[5,0,1]=(-0.455387892087)*(1+2.*(dim-1.)/(o+1.))+(1.08652968035)*dim
-        ref[5,1,0]=(-1.20926984172)*(1+2.*(dim-1.)/(o+1.))+(-0.0845469742352)*dim
-        ref[5,1,1]=(-0.997888376064)*(1+2.*(dim-1.)/(o+1.))+(-0.107565529828)*dim
-      else:
-        arg[0,0,0]=(-0.760764230601)*x[0]**o+(-0.955215307904)*x[0]+(0.376251560231)*x[1]**o+(0.147849416477)*x[1]+(0.627037741745)*x[2]**o+(-0.93996244415)*x[2]
-        arg[0,0,1]=(0.904449671196)*x[0]**o+(-0.297804849063)*x[0]+(0.773059038176)*x[1]**o+(-0.836104534497)*x[1]+(-0.150040994258)*x[2]**o+(0.837988726131)*x[2]
-        arg[0,1,0]=(0.354255190058)*x[0]**o+(0.463977999833)*x[0]+(0.218855388406)*x[1]**o+(-0.163086423536)*x[1]+(0.653790071045)*x[2]**o+(-0.457721486689)*x[2]
-        arg[0,1,1]=(0.357317871424)*x[0]**o+(-0.752862019242)*x[0]+(0.674187130836)*x[1]**o+(-0.983503125785)*x[1]+(-0.776153051078)*x[2]**o+(0.390700377058)*x[2]
-        arg[1,0,0]=(-0.465423805042)*x[0]**o+(0.629855541232)*x[0]+(-0.405300083887)*x[1]**o+(-0.211254598072)*x[1]+(0.502581881406)*x[2]**o+(-0.853779249469)*x[2]
-        arg[1,0,1]=(0.716025450344)*x[0]**o+(0.876021396077)*x[0]+(-0.530324190586)*x[1]**o+(0.700207449985)*x[1]+(-0.788565669024)*x[2]**o+(0.963118484198)*x[2]
-        arg[1,1,0]=(0.813943574582)*x[0]**o+(-0.938778607938)*x[0]+(-0.451619613547)*x[1]**o+(-0.916990884105)*x[1]+(-0.671730738367)*x[2]**o+(0.109664560689)*x[2]
-        arg[1,1,1]=(-0.557598711518)*x[0]**o+(-0.541691706474)*x[0]+(0.500874328683)*x[1]**o+(-0.959653364589)*x[1]+(0.572057415183)*x[2]**o+(-0.842306660222)*x[2]
-        arg[2,0,0]=(0.0470537168687)*x[0]**o+(-0.151521222488)*x[0]+(0.168279496456)*x[1]**o+(0.869948894317)*x[1]+(-0.554196665086)*x[2]**o+(0.444189090676)*x[2]
-        arg[2,0,1]=(-0.662480394662)*x[0]**o+(0.506778773041)*x[0]+(0.664368833417)*x[1]**o+(-0.76728005759)*x[1]+(0.729668063743)*x[2]**o+(-0.476499535761)*x[2]
-        arg[2,1,0]=(0.40405640406)*x[0]**o+(0.537691275434)*x[0]+(0.675845932799)*x[1]**o+(-0.663037107454)*x[1]+(-0.947246204559)*x[2]**o+(-0.210977364198)*x[2]
-        arg[2,1,1]=(-0.460999541334)*x[0]**o+(-0.403551870206)*x[0]+(-0.59751233801)*x[1]**o+(0.389018763902)*x[1]+(-0.916883519483)*x[2]**o+(0.712714107738)*x[2]
-        arg[3,0,0]=(-0.547139864054)*x[0]**o+(0.91774354334)*x[0]+(-0.953248927323)*x[1]**o+(0.693673610785)*x[1]+(-0.474082903895)*x[2]**o+(0.187174904886)*x[2]
-        arg[3,0,1]=(0.538597533339)*x[0]**o+(0.903368885629)*x[0]+(-0.548058780044)*x[1]**o+(-0.380406303455)*x[1]+(-0.389244091021)*x[2]**o+(0.137402766164)*x[2]
-        arg[3,1,0]=(-0.11691167078)*x[0]**o+(-0.812294829383)*x[0]+(0.592192015269)*x[1]**o+(-0.3278056345)*x[1]+(-0.60462640896)*x[2]**o+(-0.701541632465)*x[2]
-        arg[3,1,1]=(-0.196382907034)*x[0]**o+(-0.496234735923)*x[0]+(-0.646502033751)*x[1]**o+(-0.18981379172)*x[1]+(0.627608199527)*x[2]**o+(-0.468659552408)*x[2]
-        arg[4,0,0]=(0.56789650708)*x[0]**o+(0.854984079971)*x[0]+(-0.641473205573)*x[1]**o+(-0.791240666887)*x[1]+(0.453562162212)*x[2]**o+(0.849111318036)*x[2]
-        arg[4,0,1]=(0.90836228457)*x[0]**o+(-0.666684673376)*x[0]+(0.245928632693)*x[1]**o+(0.313580017685)*x[1]+(0.353126203728)*x[2]**o+(0.467530918033)*x[2]
-        arg[4,1,0]=(0.670926585272)*x[0]**o+(0.768555336283)*x[0]+(-0.170656824353)*x[1]**o+(-0.346425800834)*x[1]+(-0.969641886683)*x[2]**o+(0.775335418066)*x[2]
-        arg[4,1,1]=(-0.152500967035)*x[0]**o+(0.575400101502)*x[0]+(0.901331752685)*x[1]**o+(-0.672576642993)*x[1]+(0.803176375377)*x[2]**o+(0.202785337179)*x[2]
-        arg[5,0,0]=(-0.798851736802)*x[0]**o+(-0.221276048656)*x[0]+(0.773295190339)*x[1]**o+(0.0903112854292)*x[1]+(0.884961364642)*x[2]**o+(0.326429585537)*x[2]
-        arg[5,0,1]=(0.482124059007)*x[0]**o+(-0.39227677557)*x[0]+(-0.23074922677)*x[1]**o+(0.986783507045)*x[1]+(0.591759402442)*x[2]**o+(-0.680278617308)*x[2]
-        arg[5,1,0]=(-0.857456972644)*x[0]**o+(-0.200661025977)*x[0]+(-0.850031395341)*x[1]**o+(0.830863037447)*x[1]+(-0.323765625026)*x[2]**o+(-0.969463605839)*x[2]
-        arg[5,1,1]=(-0.582538216697)*x[0]**o+(-0.495303456972)*x[0]+(0.0134139524699)*x[1]**o+(-0.750144603651)*x[1]+(-0.632380446311)*x[2]**o+(0.38782755017)*x[2]
-        ref[0,0,0]=(0.242525071375)*(1+2.*(dim-1.)/(o+1.))+(-1.74732833558)*dim
-        ref[0,0,1]=(1.52746771511)*(1+2.*(dim-1.)/(o+1.))+(-0.295920657428)*dim
-        ref[0,1,0]=(1.22690064951)*(1+2.*(dim-1.)/(o+1.))+(-0.156829910392)*dim
-        ref[0,1,1]=(0.255351951182)*(1+2.*(dim-1.)/(o+1.))+(-1.34566476797)*dim
-        ref[1,0,0]=(-0.368142007523)*(1+2.*(dim-1.)/(o+1.))+(-0.43517830631)*dim
-        ref[1,0,1]=(-0.602864409266)*(1+2.*(dim-1.)/(o+1.))+(2.53934733026)*dim
-        ref[1,1,0]=(-0.309406777332)*(1+2.*(dim-1.)/(o+1.))+(-1.74610493135)*dim
-        ref[1,1,1]=(0.515333032348)*(1+2.*(dim-1.)/(o+1.))+(-2.34365173129)*dim
-        ref[2,0,0]=(-0.338863451761)*(1+2.*(dim-1.)/(o+1.))+(1.16261676251)*dim
-        ref[2,0,1]=(0.731556502498)*(1+2.*(dim-1.)/(o+1.))+(-0.73700082031)*dim
-        ref[2,1,0]=(0.132656132299)*(1+2.*(dim-1.)/(o+1.))+(-0.336323196217)*dim
-        ref[2,1,1]=(-1.97539539883)*(1+2.*(dim-1.)/(o+1.))+(0.698181001434)*dim
-        ref[3,0,0]=(-1.97447169527)*(1+2.*(dim-1.)/(o+1.))+(1.79859205901)*dim
-        ref[3,0,1]=(-0.398705337727)*(1+2.*(dim-1.)/(o+1.))+(0.660365348338)*dim
-        ref[3,1,0]=(-0.129346064471)*(1+2.*(dim-1.)/(o+1.))+(-1.84164209635)*dim
-        ref[3,1,1]=(-0.215276741258)*(1+2.*(dim-1.)/(o+1.))+(-1.15470808005)*dim
-        ref[4,0,0]=(0.379985463719)*(1+2.*(dim-1.)/(o+1.))+(0.91285473112)*dim
-        ref[4,0,1]=(1.50741712099)*(1+2.*(dim-1.)/(o+1.))+(0.114426262342)*dim
-        ref[4,1,0]=(-0.469372125764)*(1+2.*(dim-1.)/(o+1.))+(1.19746495352)*dim
-        ref[4,1,1]=(1.55200716103)*(1+2.*(dim-1.)/(o+1.))+(0.105608795688)*dim
-        ref[5,0,0]=(0.859404818179)*(1+2.*(dim-1.)/(o+1.))+(0.19546482231)*dim
-        ref[5,0,1]=(0.843134234679)*(1+2.*(dim-1.)/(o+1.))+(-0.085771885833)*dim
-        ref[5,1,0]=(-2.03125399301)*(1+2.*(dim-1.)/(o+1.))+(-0.339261594369)*dim
-        ref[5,1,1]=(-1.20150471054)*(1+2.*(dim-1.)/(o+1.))+(-0.857620510454)*dim
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.161068279134)*x[0]**o+(-0.20016693624)*x[0]+(0.360967926263)*x[1]**o+(0.519774730324)*x[1]
-        arg[0,0,0,1]=(-0.470257945181)*x[0]**o+(0.0652334206708)*x[0]+(0.652139991357)*x[1]**o+(-0.592482756578)*x[1]
-        arg[0,0,1,0]=(0.143126570256)*x[0]**o+(0.683474249212)*x[0]+(0.839611756722)*x[1]**o+(-0.436612603526)*x[1]
-        arg[0,0,1,1]=(-0.82328367976)*x[0]**o+(-0.848145278113)*x[0]+(-0.649046694126)*x[1]**o+(0.7686615034)*x[1]
-        arg[0,0,2,0]=(-0.89676527056)*x[0]**o+(-0.466316806084)*x[0]+(-0.454908744166)*x[1]**o+(0.425524454897)*x[1]
-        arg[0,0,2,1]=(-0.720978656424)*x[0]**o+(-0.655449460498)*x[0]+(0.466383340682)*x[1]**o+(-0.609615749634)*x[1]
-        arg[0,1,0,0]=(-0.358670380794)*x[0]**o+(-0.764939003508)*x[0]+(-0.550898156906)*x[1]**o+(0.803150103728)*x[1]
-        arg[0,1,0,1]=(-0.652241076457)*x[0]**o+(-0.614033274928)*x[0]+(-0.308770011731)*x[1]**o+(0.925847136965)*x[1]
-        arg[0,1,1,0]=(0.710539026622)*x[0]**o+(-0.345587804078)*x[0]+(-0.170026226995)*x[1]**o+(0.340557574804)*x[1]
-        arg[0,1,1,1]=(0.348069554895)*x[0]**o+(-0.633629515001)*x[0]+(-0.199233786202)*x[1]**o+(0.500291488845)*x[1]
-        arg[0,1,2,0]=(0.262179751197)*x[0]**o+(-0.55460029497)*x[0]+(-0.354335283745)*x[1]**o+(0.301130103531)*x[1]
-        arg[0,1,2,1]=(0.212709964525)*x[0]**o+(0.205907518129)*x[0]+(0.167040570615)*x[1]**o+(-0.0684155270612)*x[1]
-        arg[0,2,0,0]=(-0.272141616042)*x[0]**o+(0.187045318075)*x[0]+(-0.364974531949)*x[1]**o+(-0.969702579161)*x[1]
-        arg[0,2,0,1]=(-0.997155483171)*x[0]**o+(0.864439328971)*x[0]+(0.887907754657)*x[1]**o+(-0.323021835147)*x[1]
-        arg[0,2,1,0]=(-0.544228085563)*x[0]**o+(-0.56752289714)*x[0]+(-0.389234395916)*x[1]**o+(-0.969287386144)*x[1]
-        arg[0,2,1,1]=(-0.786136450866)*x[0]**o+(0.589465339989)*x[0]+(-0.411595778776)*x[1]**o+(0.726975706536)*x[1]
-        arg[0,2,2,0]=(-0.788299350517)*x[0]**o+(0.697037609691)*x[0]+(-0.391342918209)*x[1]**o+(0.432368662365)*x[1]
-        arg[0,2,2,1]=(-0.390536554506)*x[0]**o+(0.547528359725)*x[0]+(0.58957966188)*x[1]**o+(0.146918361066)*x[1]
-        arg[0,3,0,0]=(0.176059579799)*x[0]**o+(-0.774041865433)*x[0]+(0.52369869825)*x[1]**o+(-0.812474996262)*x[1]
-        arg[0,3,0,1]=(-0.938727595513)*x[0]**o+(0.734277246158)*x[0]+(-0.500452658276)*x[1]**o+(0.591562924701)*x[1]
-        arg[0,3,1,0]=(-0.109970490351)*x[0]**o+(-0.463382333915)*x[0]+(0.430588389365)*x[1]**o+(-0.174978181104)*x[1]
-        arg[0,3,1,1]=(-0.564486046162)*x[0]**o+(0.325599920584)*x[0]+(-0.177334934858)*x[1]**o+(-0.789210879368)*x[1]
-        arg[0,3,2,0]=(-0.409769653157)*x[0]**o+(-0.674668709075)*x[0]+(0.977465383205)*x[1]**o+(-0.178249094926)*x[1]
-        arg[0,3,2,1]=(0.112394584736)*x[0]**o+(-0.229767891006)*x[0]+(0.952422132907)*x[1]**o+(-0.133952947363)*x[1]
-        arg[0,4,0,0]=(0.927747625444)*x[0]**o+(-0.147390883234)*x[0]+(-0.0523168758823)*x[1]**o+(0.698643952882)*x[1]
-        arg[0,4,0,1]=(0.986627759385)*x[0]**o+(-0.0486375625834)*x[0]+(0.27598075052)*x[1]**o+(0.970272004318)*x[1]
-        arg[0,4,1,0]=(-0.461643441984)*x[0]**o+(-0.815261492927)*x[0]+(-0.0806771439228)*x[1]**o+(0.877302861263)*x[1]
-        arg[0,4,1,1]=(-0.108403920958)*x[0]**o+(0.651566419087)*x[0]+(-0.629972296369)*x[1]**o+(-0.235413582155)*x[1]
-        arg[0,4,2,0]=(-0.177527213798)*x[0]**o+(0.987202381273)*x[0]+(-0.15522298966)*x[1]**o+(0.234268561378)*x[1]
-        arg[0,4,2,1]=(0.521954293269)*x[0]**o+(-0.776898814469)*x[0]+(0.783085515988)*x[1]**o+(-0.469921197982)*x[1]
-        arg[1,0,0,0]=(0.858157489751)*x[0]**o+(0.444181035326)*x[0]+(0.3426806552)*x[1]**o+(-0.219249318925)*x[1]
-        arg[1,0,0,1]=(0.405857394564)*x[0]**o+(0.178361294933)*x[0]+(0.0879917927852)*x[1]**o+(-0.0689581267347)*x[1]
-        arg[1,0,1,0]=(0.63175565694)*x[0]**o+(0.0810462363705)*x[0]+(0.0350399072162)*x[1]**o+(-0.269906961338)*x[1]
-        arg[1,0,1,1]=(-0.273973794035)*x[0]**o+(0.824519533391)*x[0]+(0.596785621044)*x[1]**o+(-0.243043370261)*x[1]
-        arg[1,0,2,0]=(-0.959246118913)*x[0]**o+(0.3570024829)*x[0]+(-0.260098162669)*x[1]**o+(0.341044029457)*x[1]
-        arg[1,0,2,1]=(0.966671029776)*x[0]**o+(0.598898116395)*x[0]+(0.392360541053)*x[1]**o+(-0.322723646751)*x[1]
-        arg[1,1,0,0]=(-0.658365963559)*x[0]**o+(-0.674107595463)*x[0]+(-0.0103911551403)*x[1]**o+(0.858879803218)*x[1]
-        arg[1,1,0,1]=(0.340459206102)*x[0]**o+(-0.681434505015)*x[0]+(0.917412924129)*x[1]**o+(0.703699154381)*x[1]
-        arg[1,1,1,0]=(0.0473840209756)*x[0]**o+(-0.787070458106)*x[0]+(0.11979244907)*x[1]**o+(0.541238063489)*x[1]
-        arg[1,1,1,1]=(0.184943768213)*x[0]**o+(-0.942961758488)*x[0]+(-0.844785429901)*x[1]**o+(-0.0109779269179)*x[1]
-        arg[1,1,2,0]=(0.921469748172)*x[0]**o+(-0.122684636542)*x[0]+(0.149552532716)*x[1]**o+(-0.0102623511735)*x[1]
-        arg[1,1,2,1]=(-0.720466710917)*x[0]**o+(-0.755841224189)*x[0]+(0.372635950892)*x[1]**o+(0.271604227274)*x[1]
-        arg[1,2,0,0]=(-0.548557725319)*x[0]**o+(0.745340396995)*x[0]+(0.461556064961)*x[1]**o+(0.696460891668)*x[1]
-        arg[1,2,0,1]=(-0.738939238644)*x[0]**o+(0.344829756443)*x[0]+(0.272341172248)*x[1]**o+(0.768063359753)*x[1]
-        arg[1,2,1,0]=(-0.213161389496)*x[0]**o+(0.458730188555)*x[0]+(-0.783049463147)*x[1]**o+(0.785273989074)*x[1]
-        arg[1,2,1,1]=(0.189092239774)*x[0]**o+(-0.0649917239139)*x[0]+(0.0171281685468)*x[1]**o+(0.397065812267)*x[1]
-        arg[1,2,2,0]=(-0.809663598067)*x[0]**o+(0.587214021528)*x[0]+(0.912814601228)*x[1]**o+(0.860792008172)*x[1]
-        arg[1,2,2,1]=(0.487927123118)*x[0]**o+(-0.760831928598)*x[0]+(-0.770486346056)*x[1]**o+(-0.715077841171)*x[1]
-        arg[1,3,0,0]=(0.0202747853647)*x[0]**o+(0.0666642857036)*x[0]+(-0.717756666598)*x[1]**o+(-0.481009806467)*x[1]
-        arg[1,3,0,1]=(-0.251164550146)*x[0]**o+(0.0519935051437)*x[0]+(-0.703400138413)*x[1]**o+(-0.990329903234)*x[1]
-        arg[1,3,1,0]=(0.970793375169)*x[0]**o+(-0.365675269998)*x[0]+(0.77706784549)*x[1]**o+(-0.237785293481)*x[1]
-        arg[1,3,1,1]=(-0.162786953006)*x[0]**o+(0.985402077919)*x[0]+(0.739483663725)*x[1]**o+(0.559554321882)*x[1]
-        arg[1,3,2,0]=(0.184701463663)*x[0]**o+(0.946173117295)*x[0]+(-0.451420616712)*x[1]**o+(0.244506578089)*x[1]
-        arg[1,3,2,1]=(0.894307549357)*x[0]**o+(0.474983970689)*x[0]+(0.626273940678)*x[1]**o+(0.107985157225)*x[1]
-        arg[1,4,0,0]=(-0.180994231135)*x[0]**o+(-0.899808624585)*x[0]+(0.395935138342)*x[1]**o+(-0.387788497342)*x[1]
-        arg[1,4,0,1]=(0.0713358452056)*x[0]**o+(0.505276043139)*x[0]+(-0.635565006093)*x[1]**o+(0.956951408169)*x[1]
-        arg[1,4,1,0]=(0.355608577722)*x[0]**o+(0.58482326687)*x[0]+(0.654137690443)*x[1]**o+(-0.849016362888)*x[1]
-        arg[1,4,1,1]=(-0.275966957458)*x[0]**o+(0.856095068377)*x[0]+(-0.760077050664)*x[1]**o+(-0.904159432699)*x[1]
-        arg[1,4,2,0]=(-0.0637454805096)*x[0]**o+(-0.833057387633)*x[0]+(0.279008913569)*x[1]**o+(-0.093356790193)*x[1]
-        arg[1,4,2,1]=(0.165869666472)*x[0]**o+(-0.4554345089)*x[0]+(0.697149094381)*x[1]**o+(0.244460087482)*x[1]
-        arg[2,0,0,0]=(0.388188511348)*x[0]**o+(-0.00552398040882)*x[0]+(0.0679336322536)*x[1]**o+(-0.281132460216)*x[1]
-        arg[2,0,0,1]=(0.968019690109)*x[0]**o+(0.525335591339)*x[0]+(0.660069087546)*x[1]**o+(-0.795388487336)*x[1]
-        arg[2,0,1,0]=(-0.444010450901)*x[0]**o+(-0.498771184141)*x[0]+(-0.394999176962)*x[1]**o+(-0.579230388911)*x[1]
-        arg[2,0,1,1]=(-0.96211072138)*x[0]**o+(-0.0977519108256)*x[0]+(0.206179333903)*x[1]**o+(-0.206155312014)*x[1]
-        arg[2,0,2,0]=(0.131307090845)*x[0]**o+(0.179396626286)*x[0]+(-0.436118623166)*x[1]**o+(0.829727875456)*x[1]
-        arg[2,0,2,1]=(-0.206336435516)*x[0]**o+(0.175744210813)*x[0]+(0.818204199205)*x[1]**o+(0.433292546177)*x[1]
-        arg[2,1,0,0]=(0.920189410059)*x[0]**o+(-0.629286762249)*x[0]+(-0.14444305096)*x[1]**o+(0.564022686795)*x[1]
-        arg[2,1,0,1]=(0.43550707444)*x[0]**o+(-0.0203691253164)*x[0]+(0.632472807002)*x[1]**o+(0.722390213081)*x[1]
-        arg[2,1,1,0]=(0.827084071535)*x[0]**o+(0.864139638834)*x[0]+(0.795893591186)*x[1]**o+(0.0492667773115)*x[1]
-        arg[2,1,1,1]=(0.863813787478)*x[0]**o+(0.268800194137)*x[0]+(-0.567637801205)*x[1]**o+(0.931221493563)*x[1]
-        arg[2,1,2,0]=(-0.613463525024)*x[0]**o+(-0.0688030533166)*x[0]+(-0.786395692457)*x[1]**o+(0.862189706883)*x[1]
-        arg[2,1,2,1]=(0.315306814851)*x[0]**o+(0.76879509223)*x[0]+(0.451451342779)*x[1]**o+(-0.478873421268)*x[1]
-        arg[2,2,0,0]=(-0.785116047841)*x[0]**o+(0.347614087057)*x[0]+(-0.0106716042015)*x[1]**o+(-0.350898768187)*x[1]
-        arg[2,2,0,1]=(-0.987778931187)*x[0]**o+(-0.380379654757)*x[0]+(-0.383604999655)*x[1]**o+(0.022203803886)*x[1]
-        arg[2,2,1,0]=(0.508327115069)*x[0]**o+(0.443678958632)*x[0]+(-0.320069211602)*x[1]**o+(-0.778140184171)*x[1]
-        arg[2,2,1,1]=(-0.532025577107)*x[0]**o+(-0.0475799386434)*x[0]+(0.650417175266)*x[1]**o+(0.33739661369)*x[1]
-        arg[2,2,2,0]=(-0.406412097333)*x[0]**o+(0.0510500610605)*x[0]+(-0.25755890225)*x[1]**o+(-0.350209779392)*x[1]
-        arg[2,2,2,1]=(0.401361048956)*x[0]**o+(-0.594793585281)*x[0]+(0.155257431052)*x[1]**o+(-0.674885216524)*x[1]
-        arg[2,3,0,0]=(0.352606222236)*x[0]**o+(0.64529574473)*x[0]+(-0.838258091233)*x[1]**o+(0.527911574536)*x[1]
-        arg[2,3,0,1]=(-0.62652610251)*x[0]**o+(0.879664434218)*x[0]+(0.730845316192)*x[1]**o+(0.0318659384791)*x[1]
-        arg[2,3,1,0]=(-0.311152313179)*x[0]**o+(-0.333154399786)*x[0]+(0.743640958069)*x[1]**o+(0.313394944493)*x[1]
-        arg[2,3,1,1]=(-0.728968478378)*x[0]**o+(0.500229380574)*x[0]+(0.756628133572)*x[1]**o+(0.270533146994)*x[1]
-        arg[2,3,2,0]=(-0.219775843272)*x[0]**o+(0.882943220401)*x[0]+(0.79341547188)*x[1]**o+(0.503486054551)*x[1]
-        arg[2,3,2,1]=(-0.850285149353)*x[0]**o+(0.78820884302)*x[0]+(0.348024963962)*x[1]**o+(0.83743616537)*x[1]
-        arg[2,4,0,0]=(0.868649421127)*x[0]**o+(-0.622361223999)*x[0]+(0.836321867516)*x[1]**o+(0.423582994131)*x[1]
-        arg[2,4,0,1]=(0.140963355402)*x[0]**o+(0.190496469385)*x[0]+(0.765311231744)*x[1]**o+(0.368696267095)*x[1]
-        arg[2,4,1,0]=(-0.680854080076)*x[0]**o+(-0.729641193897)*x[0]+(-0.843347646585)*x[1]**o+(-0.0993036180842)*x[1]
-        arg[2,4,1,1]=(-0.130039648356)*x[0]**o+(0.534197300899)*x[0]+(-0.142588861186)*x[1]**o+(-0.308376644249)*x[1]
-        arg[2,4,2,0]=(0.331212825202)*x[0]**o+(0.466247840288)*x[0]+(-0.201714210846)*x[1]**o+(0.80521345364)*x[1]
-        arg[2,4,2,1]=(0.454299813247)*x[0]**o+(0.646694941459)*x[0]+(-0.929854585458)*x[1]**o+(-0.365252296746)*x[1]
-        arg[3,0,0,0]=(-0.623915395721)*x[0]**o+(-0.789827882448)*x[0]+(-0.862568457189)*x[1]**o+(-0.141799958679)*x[1]
-        arg[3,0,0,1]=(0.197040281353)*x[0]**o+(0.155785418081)*x[0]+(-0.587898788817)*x[1]**o+(0.700612189317)*x[1]
-        arg[3,0,1,0]=(-0.899654954269)*x[0]**o+(-0.801426785588)*x[0]+(-0.528678401571)*x[1]**o+(-0.224185097206)*x[1]
-        arg[3,0,1,1]=(0.291298188198)*x[0]**o+(0.786698690825)*x[0]+(0.925634940697)*x[1]**o+(0.617661715197)*x[1]
-        arg[3,0,2,0]=(0.788272473274)*x[0]**o+(-0.0400044705274)*x[0]+(-0.669092974469)*x[1]**o+(-0.063697728491)*x[1]
-        arg[3,0,2,1]=(-0.0612398565521)*x[0]**o+(-0.884311783009)*x[0]+(0.444689078628)*x[1]**o+(0.302741981611)*x[1]
-        arg[3,1,0,0]=(0.483756249722)*x[0]**o+(-0.214185139167)*x[0]+(0.526387014144)*x[1]**o+(-0.172619975799)*x[1]
-        arg[3,1,0,1]=(0.0685836489777)*x[0]**o+(-0.425861440836)*x[0]+(0.94669899123)*x[1]**o+(-0.649068988929)*x[1]
-        arg[3,1,1,0]=(0.935225203148)*x[0]**o+(-0.649378812349)*x[0]+(-0.791553458732)*x[1]**o+(0.776307740809)*x[1]
-        arg[3,1,1,1]=(-0.45319945403)*x[0]**o+(-0.473310763902)*x[0]+(-0.268480872039)*x[1]**o+(0.847382076174)*x[1]
-        arg[3,1,2,0]=(-0.573022434421)*x[0]**o+(0.584143976397)*x[0]+(0.131688457808)*x[1]**o+(-0.628894863435)*x[1]
-        arg[3,1,2,1]=(0.628566928363)*x[0]**o+(-0.868564569338)*x[0]+(-0.482273553287)*x[1]**o+(0.679652796519)*x[1]
-        arg[3,2,0,0]=(-0.64046509323)*x[0]**o+(-0.108928537952)*x[0]+(-0.512288515479)*x[1]**o+(0.683072290041)*x[1]
-        arg[3,2,0,1]=(0.472589328326)*x[0]**o+(0.219741638671)*x[0]+(0.136368535311)*x[1]**o+(-0.525113003647)*x[1]
-        arg[3,2,1,0]=(-0.45731256203)*x[0]**o+(0.0854410475382)*x[0]+(0.257725845542)*x[1]**o+(0.430430185351)*x[1]
-        arg[3,2,1,1]=(0.948699678725)*x[0]**o+(-0.00538658505415)*x[0]+(0.921898600708)*x[1]**o+(-0.448522286404)*x[1]
-        arg[3,2,2,0]=(-0.0863353766204)*x[0]**o+(-0.652417730681)*x[0]+(0.755871413533)*x[1]**o+(0.206065623655)*x[1]
-        arg[3,2,2,1]=(0.263075920527)*x[0]**o+(0.94162407402)*x[0]+(0.750015836722)*x[1]**o+(-0.815154267718)*x[1]
-        arg[3,3,0,0]=(-0.606984299829)*x[0]**o+(0.120704522147)*x[0]+(-0.324211323778)*x[1]**o+(-0.123647081263)*x[1]
-        arg[3,3,0,1]=(0.838995936232)*x[0]**o+(0.854147779134)*x[0]+(-0.192271552952)*x[1]**o+(0.0281108740635)*x[1]
-        arg[3,3,1,0]=(-0.0343159887291)*x[0]**o+(0.242432659911)*x[0]+(-0.37299830191)*x[1]**o+(-0.456792158625)*x[1]
-        arg[3,3,1,1]=(-0.305277044867)*x[0]**o+(-0.930386582491)*x[0]+(-0.979921197617)*x[1]**o+(-0.507736755766)*x[1]
-        arg[3,3,2,0]=(0.548675744195)*x[0]**o+(0.755596482286)*x[0]+(0.0722267054576)*x[1]**o+(-0.393768047035)*x[1]
-        arg[3,3,2,1]=(0.74781993508)*x[0]**o+(-0.655033306209)*x[0]+(0.480653847364)*x[1]**o+(-0.169400714085)*x[1]
-        arg[3,4,0,0]=(0.269186769422)*x[0]**o+(-0.0786214595922)*x[0]+(-0.975508552024)*x[1]**o+(-0.798249509899)*x[1]
-        arg[3,4,0,1]=(-0.599201275441)*x[0]**o+(0.473490319504)*x[0]+(0.0277044125859)*x[1]**o+(0.818107843614)*x[1]
-        arg[3,4,1,0]=(-0.46272642862)*x[0]**o+(0.740282148493)*x[0]+(0.35998379499)*x[1]**o+(-0.938681489717)*x[1]
-        arg[3,4,1,1]=(0.187067286301)*x[0]**o+(-0.284171344521)*x[0]+(0.612229918327)*x[1]**o+(0.3917984881)*x[1]
-        arg[3,4,2,0]=(-0.535270910341)*x[0]**o+(-0.00723888213927)*x[0]+(-0.776984534618)*x[1]**o+(-0.0899536033273)*x[1]
-        arg[3,4,2,1]=(-0.382290376155)*x[0]**o+(-0.0593490177599)*x[0]+(-0.19716515678)*x[1]**o+(-0.268991693613)*x[1]
-        ref[0,0,0,0]=(0.19989964713)*(1+2.*(dim-1.)/(o+1.))+(0.319607794084)*dim
-        ref[0,0,0,1]=(0.181882046176)*(1+2.*(dim-1.)/(o+1.))+(-0.527249335907)*dim
-        ref[0,0,1,0]=(0.982738326978)*(1+2.*(dim-1.)/(o+1.))+(0.246861645686)*dim
-        ref[0,0,1,1]=(-1.47233037389)*(1+2.*(dim-1.)/(o+1.))+(-0.0794837747136)*dim
-        ref[0,0,2,0]=(-1.35167401473)*(1+2.*(dim-1.)/(o+1.))+(-0.0407923511861)*dim
-        ref[0,0,2,1]=(-0.254595315742)*(1+2.*(dim-1.)/(o+1.))+(-1.26506521013)*dim
-        ref[0,1,0,0]=(-0.909568537701)*(1+2.*(dim-1.)/(o+1.))+(0.0382111002203)*dim
-        ref[0,1,0,1]=(-0.961011088187)*(1+2.*(dim-1.)/(o+1.))+(0.311813862038)*dim
-        ref[0,1,1,0]=(0.540512799627)*(1+2.*(dim-1.)/(o+1.))+(-0.00503022927381)*dim
-        ref[0,1,1,1]=(0.148835768693)*(1+2.*(dim-1.)/(o+1.))+(-0.133338026157)*dim
-        ref[0,1,2,0]=(-0.0921555325482)*(1+2.*(dim-1.)/(o+1.))+(-0.253470191439)*dim
-        ref[0,1,2,1]=(0.37975053514)*(1+2.*(dim-1.)/(o+1.))+(0.137491991068)*dim
-        ref[0,2,0,0]=(-0.637116147991)*(1+2.*(dim-1.)/(o+1.))+(-0.782657261086)*dim
-        ref[0,2,0,1]=(-0.109247728514)*(1+2.*(dim-1.)/(o+1.))+(0.541417493824)*dim
-        ref[0,2,1,0]=(-0.933462481479)*(1+2.*(dim-1.)/(o+1.))+(-1.53681028328)*dim
-        ref[0,2,1,1]=(-1.19773222964)*(1+2.*(dim-1.)/(o+1.))+(1.31644104653)*dim
-        ref[0,2,2,0]=(-1.17964226873)*(1+2.*(dim-1.)/(o+1.))+(1.12940627206)*dim
-        ref[0,2,2,1]=(0.199043107375)*(1+2.*(dim-1.)/(o+1.))+(0.694446720792)*dim
-        ref[0,3,0,0]=(0.699758278049)*(1+2.*(dim-1.)/(o+1.))+(-1.5865168617)*dim
-        ref[0,3,0,1]=(-1.43918025379)*(1+2.*(dim-1.)/(o+1.))+(1.32584017086)*dim
-        ref[0,3,1,0]=(0.320617899014)*(1+2.*(dim-1.)/(o+1.))+(-0.63836051502)*dim
-        ref[0,3,1,1]=(-0.741820981021)*(1+2.*(dim-1.)/(o+1.))+(-0.463610958784)*dim
-        ref[0,3,2,0]=(0.567695730048)*(1+2.*(dim-1.)/(o+1.))+(-0.852917804)*dim
-        ref[0,3,2,1]=(1.06481671764)*(1+2.*(dim-1.)/(o+1.))+(-0.363720838369)*dim
-        ref[0,4,0,0]=(0.875430749562)*(1+2.*(dim-1.)/(o+1.))+(0.551253069648)*dim
-        ref[0,4,0,1]=(1.26260850991)*(1+2.*(dim-1.)/(o+1.))+(0.921634441735)*dim
-        ref[0,4,1,0]=(-0.542320585907)*(1+2.*(dim-1.)/(o+1.))+(0.0620413683361)*dim
-        ref[0,4,1,1]=(-0.738376217327)*(1+2.*(dim-1.)/(o+1.))+(0.416152836932)*dim
-        ref[0,4,2,0]=(-0.332750203458)*(1+2.*(dim-1.)/(o+1.))+(1.22147094265)*dim
-        ref[0,4,2,1]=(1.30503980926)*(1+2.*(dim-1.)/(o+1.))+(-1.24682001245)*dim
-        ref[1,0,0,0]=(1.20083814495)*(1+2.*(dim-1.)/(o+1.))+(0.224931716401)*dim
-        ref[1,0,0,1]=(0.493849187349)*(1+2.*(dim-1.)/(o+1.))+(0.109403168198)*dim
-        ref[1,0,1,0]=(0.666795564157)*(1+2.*(dim-1.)/(o+1.))+(-0.188860724968)*dim
-        ref[1,0,1,1]=(0.322811827009)*(1+2.*(dim-1.)/(o+1.))+(0.58147616313)*dim
-        ref[1,0,2,0]=(-1.21934428158)*(1+2.*(dim-1.)/(o+1.))+(0.698046512357)*dim
-        ref[1,0,2,1]=(1.35903157083)*(1+2.*(dim-1.)/(o+1.))+(0.276174469644)*dim
-        ref[1,1,0,0]=(-0.668757118699)*(1+2.*(dim-1.)/(o+1.))+(0.184772207756)*dim
-        ref[1,1,0,1]=(1.25787213023)*(1+2.*(dim-1.)/(o+1.))+(0.0222646493659)*dim
-        ref[1,1,1,0]=(0.167176470046)*(1+2.*(dim-1.)/(o+1.))+(-0.245832394617)*dim
-        ref[1,1,1,1]=(-0.659841661688)*(1+2.*(dim-1.)/(o+1.))+(-0.953939685406)*dim
-        ref[1,1,2,0]=(1.07102228089)*(1+2.*(dim-1.)/(o+1.))+(-0.132946987715)*dim
-        ref[1,1,2,1]=(-0.347830760025)*(1+2.*(dim-1.)/(o+1.))+(-0.484236996915)*dim
-        ref[1,2,0,0]=(-0.087001660358)*(1+2.*(dim-1.)/(o+1.))+(1.44180128866)*dim
-        ref[1,2,0,1]=(-0.466598066397)*(1+2.*(dim-1.)/(o+1.))+(1.1128931162)*dim
-        ref[1,2,1,0]=(-0.996210852643)*(1+2.*(dim-1.)/(o+1.))+(1.24400417763)*dim
-        ref[1,2,1,1]=(0.206220408321)*(1+2.*(dim-1.)/(o+1.))+(0.332074088353)*dim
-        ref[1,2,2,0]=(0.103151003161)*(1+2.*(dim-1.)/(o+1.))+(1.4480060297)*dim
-        ref[1,2,2,1]=(-0.282559222939)*(1+2.*(dim-1.)/(o+1.))+(-1.47590976977)*dim
-        ref[1,3,0,0]=(-0.697481881234)*(1+2.*(dim-1.)/(o+1.))+(-0.414345520764)*dim
-        ref[1,3,0,1]=(-0.954564688559)*(1+2.*(dim-1.)/(o+1.))+(-0.93833639809)*dim
-        ref[1,3,1,0]=(1.74786122066)*(1+2.*(dim-1.)/(o+1.))+(-0.603460563479)*dim
-        ref[1,3,1,1]=(0.576696710719)*(1+2.*(dim-1.)/(o+1.))+(1.5449563998)*dim
-        ref[1,3,2,0]=(-0.26671915305)*(1+2.*(dim-1.)/(o+1.))+(1.19067969538)*dim
-        ref[1,3,2,1]=(1.52058149003)*(1+2.*(dim-1.)/(o+1.))+(0.582969127914)*dim
-        ref[1,4,0,0]=(0.214940907208)*(1+2.*(dim-1.)/(o+1.))+(-1.28759712193)*dim
-        ref[1,4,0,1]=(-0.564229160887)*(1+2.*(dim-1.)/(o+1.))+(1.46222745131)*dim
-        ref[1,4,1,0]=(1.00974626816)*(1+2.*(dim-1.)/(o+1.))+(-0.264193096019)*dim
-        ref[1,4,1,1]=(-1.03604400812)*(1+2.*(dim-1.)/(o+1.))+(-0.048064364322)*dim
-        ref[1,4,2,0]=(0.215263433059)*(1+2.*(dim-1.)/(o+1.))+(-0.926414177826)*dim
-        ref[1,4,2,1]=(0.863018760853)*(1+2.*(dim-1.)/(o+1.))+(-0.210974421418)*dim
-        ref[2,0,0,0]=(0.456122143601)*(1+2.*(dim-1.)/(o+1.))+(-0.286656440625)*dim
-        ref[2,0,0,1]=(1.62808877765)*(1+2.*(dim-1.)/(o+1.))+(-0.270052895997)*dim
-        ref[2,0,1,0]=(-0.839009627862)*(1+2.*(dim-1.)/(o+1.))+(-1.07800157305)*dim
-        ref[2,0,1,1]=(-0.755931387477)*(1+2.*(dim-1.)/(o+1.))+(-0.30390722284)*dim
-        ref[2,0,2,0]=(-0.304811532322)*(1+2.*(dim-1.)/(o+1.))+(1.00912450174)*dim
-        ref[2,0,2,1]=(0.61186776369)*(1+2.*(dim-1.)/(o+1.))+(0.60903675699)*dim
-        ref[2,1,0,0]=(0.775746359099)*(1+2.*(dim-1.)/(o+1.))+(-0.0652640754538)*dim
-        ref[2,1,0,1]=(1.06797988144)*(1+2.*(dim-1.)/(o+1.))+(0.702021087765)*dim
-        ref[2,1,1,0]=(1.62297766272)*(1+2.*(dim-1.)/(o+1.))+(0.913406416145)*dim
-        ref[2,1,1,1]=(0.296175986273)*(1+2.*(dim-1.)/(o+1.))+(1.2000216877)*dim
-        ref[2,1,2,0]=(-1.39985921748)*(1+2.*(dim-1.)/(o+1.))+(0.793386653567)*dim
-        ref[2,1,2,1]=(0.76675815763)*(1+2.*(dim-1.)/(o+1.))+(0.289921670962)*dim
-        ref[2,2,0,0]=(-0.795787652043)*(1+2.*(dim-1.)/(o+1.))+(-0.0032846811301)*dim
-        ref[2,2,0,1]=(-1.37138393084)*(1+2.*(dim-1.)/(o+1.))+(-0.358175850871)*dim
-        ref[2,2,1,0]=(0.188257903467)*(1+2.*(dim-1.)/(o+1.))+(-0.334461225539)*dim
-        ref[2,2,1,1]=(0.118391598158)*(1+2.*(dim-1.)/(o+1.))+(0.289816675047)*dim
-        ref[2,2,2,0]=(-0.663970999582)*(1+2.*(dim-1.)/(o+1.))+(-0.299159718332)*dim
-        ref[2,2,2,1]=(0.556618480008)*(1+2.*(dim-1.)/(o+1.))+(-1.2696788018)*dim
-        ref[2,3,0,0]=(-0.485651868997)*(1+2.*(dim-1.)/(o+1.))+(1.17320731927)*dim
-        ref[2,3,0,1]=(0.104319213682)*(1+2.*(dim-1.)/(o+1.))+(0.911530372697)*dim
-        ref[2,3,1,0]=(0.43248864489)*(1+2.*(dim-1.)/(o+1.))+(-0.0197594552935)*dim
-        ref[2,3,1,1]=(0.0276596551936)*(1+2.*(dim-1.)/(o+1.))+(0.770762527568)*dim
-        ref[2,3,2,0]=(0.573639628608)*(1+2.*(dim-1.)/(o+1.))+(1.38642927495)*dim
-        ref[2,3,2,1]=(-0.502260185391)*(1+2.*(dim-1.)/(o+1.))+(1.62564500839)*dim
-        ref[2,4,0,0]=(1.70497128864)*(1+2.*(dim-1.)/(o+1.))+(-0.198778229868)*dim
-        ref[2,4,0,1]=(0.906274587146)*(1+2.*(dim-1.)/(o+1.))+(0.55919273648)*dim
-        ref[2,4,1,0]=(-1.52420172666)*(1+2.*(dim-1.)/(o+1.))+(-0.828944811982)*dim
-        ref[2,4,1,1]=(-0.272628509541)*(1+2.*(dim-1.)/(o+1.))+(0.225820656649)*dim
-        ref[2,4,2,0]=(0.129498614356)*(1+2.*(dim-1.)/(o+1.))+(1.27146129393)*dim
-        ref[2,4,2,1]=(-0.475554772211)*(1+2.*(dim-1.)/(o+1.))+(0.281442644713)*dim
-        ref[3,0,0,0]=(-1.48648385291)*(1+2.*(dim-1.)/(o+1.))+(-0.931627841127)*dim
-        ref[3,0,0,1]=(-0.390858507465)*(1+2.*(dim-1.)/(o+1.))+(0.856397607398)*dim
-        ref[3,0,1,0]=(-1.42833335584)*(1+2.*(dim-1.)/(o+1.))+(-1.02561188279)*dim
-        ref[3,0,1,1]=(1.2169331289)*(1+2.*(dim-1.)/(o+1.))+(1.40436040602)*dim
-        ref[3,0,2,0]=(0.119179498805)*(1+2.*(dim-1.)/(o+1.))+(-0.103702199018)*dim
-        ref[3,0,2,1]=(0.383449222076)*(1+2.*(dim-1.)/(o+1.))+(-0.581569801398)*dim
-        ref[3,1,0,0]=(1.01014326387)*(1+2.*(dim-1.)/(o+1.))+(-0.386805114966)*dim
-        ref[3,1,0,1]=(1.01528264021)*(1+2.*(dim-1.)/(o+1.))+(-1.07493042977)*dim
-        ref[3,1,1,0]=(0.143671744416)*(1+2.*(dim-1.)/(o+1.))+(0.12692892846)*dim
-        ref[3,1,1,1]=(-0.721680326068)*(1+2.*(dim-1.)/(o+1.))+(0.374071312272)*dim
-        ref[3,1,2,0]=(-0.441333976613)*(1+2.*(dim-1.)/(o+1.))+(-0.0447508870373)*dim
-        ref[3,1,2,1]=(0.146293375075)*(1+2.*(dim-1.)/(o+1.))+(-0.188911772819)*dim
-        ref[3,2,0,0]=(-1.15275360871)*(1+2.*(dim-1.)/(o+1.))+(0.57414375209)*dim
-        ref[3,2,0,1]=(0.608957863637)*(1+2.*(dim-1.)/(o+1.))+(-0.305371364976)*dim
-        ref[3,2,1,0]=(-0.199586716488)*(1+2.*(dim-1.)/(o+1.))+(0.515871232889)*dim
-        ref[3,2,1,1]=(1.87059827943)*(1+2.*(dim-1.)/(o+1.))+(-0.453908871458)*dim
-        ref[3,2,2,0]=(0.669536036913)*(1+2.*(dim-1.)/(o+1.))+(-0.446352107026)*dim
-        ref[3,2,2,1]=(1.01309175725)*(1+2.*(dim-1.)/(o+1.))+(0.126469806303)*dim
-        ref[3,3,0,0]=(-0.931195623607)*(1+2.*(dim-1.)/(o+1.))+(-0.00294255911617)*dim
-        ref[3,3,0,1]=(0.64672438328)*(1+2.*(dim-1.)/(o+1.))+(0.882258653197)*dim
-        ref[3,3,1,0]=(-0.407314290639)*(1+2.*(dim-1.)/(o+1.))+(-0.214359498715)*dim
-        ref[3,3,1,1]=(-1.28519824248)*(1+2.*(dim-1.)/(o+1.))+(-1.43812333826)*dim
-        ref[3,3,2,0]=(0.620902449652)*(1+2.*(dim-1.)/(o+1.))+(0.361828435252)*dim
-        ref[3,3,2,1]=(1.22847378244)*(1+2.*(dim-1.)/(o+1.))+(-0.824434020294)*dim
-        ref[3,4,0,0]=(-0.706321782603)*(1+2.*(dim-1.)/(o+1.))+(-0.876870969492)*dim
-        ref[3,4,0,1]=(-0.571496862855)*(1+2.*(dim-1.)/(o+1.))+(1.29159816312)*dim
-        ref[3,4,1,0]=(-0.102742633631)*(1+2.*(dim-1.)/(o+1.))+(-0.198399341224)*dim
-        ref[3,4,1,1]=(0.799297204627)*(1+2.*(dim-1.)/(o+1.))+(0.107627143578)*dim
-        ref[3,4,2,0]=(-1.31225544496)*(1+2.*(dim-1.)/(o+1.))+(-0.0971924854666)*dim
-        ref[3,4,2,1]=(-0.579455532935)*(1+2.*(dim-1.)/(o+1.))+(-0.328340711373)*dim
-      else:
-        arg[0,0,0,0]=(-0.727570048979)*x[0]**o+(-0.769770353069)*x[0]+(-0.532381054852)*x[1]**o+(0.590589994369)*x[1]+(0.775348726284)*x[2]**o+(-0.840239939796)*x[2]
-        arg[0,0,0,1]=(-0.441856577751)*x[0]**o+(-0.39234308235)*x[0]+(-0.834378647798)*x[1]**o+(0.84269918161)*x[1]+(0.441102591728)*x[2]**o+(0.166331058665)*x[2]
-        arg[0,0,1,0]=(0.391773069521)*x[0]**o+(0.496759920942)*x[0]+(0.555386226902)*x[1]**o+(0.980197783628)*x[1]+(0.549622021652)*x[2]**o+(-0.596179893504)*x[2]
-        arg[0,0,1,1]=(-0.104197387892)*x[0]**o+(-0.64636505375)*x[0]+(0.377612339028)*x[1]**o+(-0.215111619231)*x[1]+(0.637249692625)*x[2]**o+(-0.0998227822351)*x[2]
-        arg[0,0,2,0]=(0.780693043561)*x[0]**o+(0.571405344342)*x[0]+(-0.793680154472)*x[1]**o+(-0.0481469136436)*x[1]+(0.959561051293)*x[2]**o+(0.0756152497582)*x[2]
-        arg[0,0,2,1]=(0.88678762282)*x[0]**o+(0.254753272214)*x[0]+(0.344376798516)*x[1]**o+(-0.908135902735)*x[1]+(-0.3584387726)*x[2]**o+(-0.890225037617)*x[2]
-        arg[0,1,0,0]=(0.680262917473)*x[0]**o+(0.65860357305)*x[0]+(0.859832322473)*x[1]**o+(0.326105580592)*x[1]+(0.132170297876)*x[2]**o+(-0.928606849775)*x[2]
-        arg[0,1,0,1]=(-0.500503822293)*x[0]**o+(-0.456331012174)*x[0]+(0.900478846187)*x[1]**o+(0.350542503874)*x[1]+(0.755849038617)*x[2]**o+(-0.514240007142)*x[2]
-        arg[0,1,1,0]=(0.124404217291)*x[0]**o+(-0.499651000805)*x[0]+(-0.968178694708)*x[1]**o+(0.306780500818)*x[1]+(-0.946470794819)*x[2]**o+(0.919424575523)*x[2]
-        arg[0,1,1,1]=(0.722520017474)*x[0]**o+(-0.718216593718)*x[0]+(0.801196051455)*x[1]**o+(-0.791951278546)*x[1]+(-0.675975417529)*x[2]**o+(0.355069676047)*x[2]
-        arg[0,1,2,0]=(-0.137017428857)*x[0]**o+(-0.760267879487)*x[0]+(0.625869259413)*x[1]**o+(-0.697626713352)*x[1]+(-0.467876751423)*x[2]**o+(0.456475454123)*x[2]
-        arg[0,1,2,1]=(0.646536442797)*x[0]**o+(0.0981671744166)*x[0]+(0.477147756414)*x[1]**o+(-0.23211823966)*x[1]+(-0.553808167147)*x[2]**o+(0.405402676302)*x[2]
-        arg[0,2,0,0]=(-0.0604502966371)*x[0]**o+(0.297995946813)*x[0]+(0.837045433858)*x[1]**o+(-0.270340963575)*x[1]+(-0.58462190484)*x[2]**o+(0.292953993287)*x[2]
-        arg[0,2,0,1]=(-0.463109088268)*x[0]**o+(0.346260157368)*x[0]+(0.0228615151352)*x[1]**o+(0.905507471559)*x[1]+(-0.423777553665)*x[2]**o+(-0.45964535654)*x[2]
-        arg[0,2,1,0]=(-0.50761294542)*x[0]**o+(-0.465260578419)*x[0]+(-0.729953382373)*x[1]**o+(0.903666219263)*x[1]+(-0.756794344711)*x[2]**o+(0.817263008431)*x[2]
-        arg[0,2,1,1]=(-0.551253781393)*x[0]**o+(-0.911481117802)*x[0]+(0.180349330394)*x[1]**o+(0.419118491074)*x[1]+(-0.691917875703)*x[2]**o+(-0.835365504347)*x[2]
-        arg[0,2,2,0]=(0.32567932803)*x[0]**o+(0.413167839883)*x[0]+(0.781320691089)*x[1]**o+(-0.777223093057)*x[1]+(0.297556831029)*x[2]**o+(-0.952676550814)*x[2]
-        arg[0,2,2,1]=(0.226250474873)*x[0]**o+(0.279287242249)*x[0]+(0.421824124143)*x[1]**o+(-0.97664927412)*x[1]+(0.703245736838)*x[2]**o+(-0.629660622476)*x[2]
-        arg[0,3,0,0]=(-0.138403445102)*x[0]**o+(0.0979152923187)*x[0]+(-0.177116218507)*x[1]**o+(0.0100523961708)*x[1]+(-0.634159492232)*x[2]**o+(-0.847618220907)*x[2]
-        arg[0,3,0,1]=(0.612268738957)*x[0]**o+(-0.462682392204)*x[0]+(-0.146623835506)*x[1]**o+(0.699258469487)*x[1]+(0.0139983038691)*x[2]**o+(0.236461011719)*x[2]
-        arg[0,3,1,0]=(-0.0518123102809)*x[0]**o+(0.386822059696)*x[0]+(-0.208858744655)*x[1]**o+(0.971393362011)*x[1]+(-0.171649562077)*x[2]**o+(-0.507479926411)*x[2]
-        arg[0,3,1,1]=(0.0140396270391)*x[0]**o+(-0.837711757872)*x[0]+(-0.00108924459289)*x[1]**o+(-0.724087080496)*x[1]+(-0.793071741694)*x[2]**o+(0.38654936043)*x[2]
-        arg[0,3,2,0]=(-0.897711437057)*x[0]**o+(0.562533782571)*x[0]+(-0.354013039442)*x[1]**o+(-0.473034213198)*x[1]+(0.4598333464)*x[2]**o+(0.467503992754)*x[2]
-        arg[0,3,2,1]=(-0.198441232877)*x[0]**o+(-0.411568849672)*x[0]+(0.0850211273328)*x[1]**o+(-0.333702582633)*x[1]+(0.727888461746)*x[2]**o+(-0.174835541819)*x[2]
-        arg[0,4,0,0]=(-0.114679585752)*x[0]**o+(0.0446596462171)*x[0]+(-0.950604674991)*x[1]**o+(-0.307622186566)*x[1]+(0.956712754366)*x[2]**o+(0.334630480874)*x[2]
-        arg[0,4,0,1]=(0.345475911118)*x[0]**o+(0.834620576123)*x[0]+(0.903176273684)*x[1]**o+(-0.364211856466)*x[1]+(0.910903954488)*x[2]**o+(0.392248545744)*x[2]
-        arg[0,4,1,0]=(-0.593360797686)*x[0]**o+(-0.0199892857836)*x[0]+(0.293839091284)*x[1]**o+(0.580208854742)*x[1]+(0.060499817751)*x[2]**o+(0.907498841261)*x[2]
-        arg[0,4,1,1]=(-0.446192713548)*x[0]**o+(0.29870251614)*x[0]+(0.754231657585)*x[1]**o+(0.321710920549)*x[1]+(0.287978396665)*x[2]**o+(-0.963473165492)*x[2]
-        arg[0,4,2,0]=(0.780174386478)*x[0]**o+(0.603377914483)*x[0]+(-0.841703120145)*x[1]**o+(0.316522795462)*x[1]+(-0.192916583378)*x[2]**o+(-0.734091913995)*x[2]
-        arg[0,4,2,1]=(-0.130567656486)*x[0]**o+(-0.342928842892)*x[0]+(-0.0827376128775)*x[1]**o+(-0.771104057041)*x[1]+(0.733571283734)*x[2]**o+(-0.880531838119)*x[2]
-        arg[1,0,0,0]=(-0.634428121043)*x[0]**o+(0.294135783753)*x[0]+(-0.566305561339)*x[1]**o+(0.0332700472211)*x[1]+(0.128130119463)*x[2]**o+(0.0468678470468)*x[2]
-        arg[1,0,0,1]=(0.82168858107)*x[0]**o+(-0.75544177649)*x[0]+(0.260115562827)*x[1]**o+(-0.149575433725)*x[1]+(-0.780945910032)*x[2]**o+(-0.0539291857071)*x[2]
-        arg[1,0,1,0]=(-0.97885291605)*x[0]**o+(0.777955971883)*x[0]+(0.115355866293)*x[1]**o+(-0.456449594589)*x[1]+(-0.832816352387)*x[2]**o+(-0.418070257158)*x[2]
-        arg[1,0,1,1]=(-0.908396506245)*x[0]**o+(-0.982147653872)*x[0]+(0.138657052347)*x[1]**o+(0.633837624386)*x[1]+(-0.529748303776)*x[2]**o+(-0.950225664343)*x[2]
-        arg[1,0,2,0]=(0.733974435377)*x[0]**o+(-0.758228777635)*x[0]+(0.841368499977)*x[1]**o+(0.871715889444)*x[1]+(0.541055759071)*x[2]**o+(0.669798500731)*x[2]
-        arg[1,0,2,1]=(-0.572994548563)*x[0]**o+(0.806241853906)*x[0]+(0.141217952929)*x[1]**o+(0.832291361477)*x[1]+(0.207737014762)*x[2]**o+(-0.279769695917)*x[2]
-        arg[1,1,0,0]=(-0.394247339923)*x[0]**o+(0.548338039327)*x[0]+(-0.845822483858)*x[1]**o+(-0.941161341738)*x[1]+(-0.244513027249)*x[2]**o+(-0.524790843131)*x[2]
-        arg[1,1,0,1]=(0.509994957918)*x[0]**o+(0.691470630092)*x[0]+(0.249241759795)*x[1]**o+(-0.995293157716)*x[1]+(0.162652088127)*x[2]**o+(0.873578806104)*x[2]
-        arg[1,1,1,0]=(-0.22367137056)*x[0]**o+(-0.896306406631)*x[0]+(0.613214186844)*x[1]**o+(-0.460055562163)*x[1]+(-0.704736634406)*x[2]**o+(-0.517741014186)*x[2]
-        arg[1,1,1,1]=(-0.426072795689)*x[0]**o+(-0.13452184053)*x[0]+(0.908778671123)*x[1]**o+(0.194472828672)*x[1]+(-0.658909495204)*x[2]**o+(-0.234260758459)*x[2]
-        arg[1,1,2,0]=(0.236086562474)*x[0]**o+(0.33312461561)*x[0]+(0.867089643801)*x[1]**o+(-0.720157305369)*x[1]+(0.812845198077)*x[2]**o+(-0.375694713863)*x[2]
-        arg[1,1,2,1]=(-0.561145817489)*x[0]**o+(0.746630137163)*x[0]+(-0.809280840008)*x[1]**o+(-0.690912076356)*x[1]+(0.88933641231)*x[2]**o+(0.246647817564)*x[2]
-        arg[1,2,0,0]=(0.701319152729)*x[0]**o+(-0.309074024603)*x[0]+(0.567988628717)*x[1]**o+(-0.0596939135728)*x[1]+(0.242135294918)*x[2]**o+(-0.101136005445)*x[2]
-        arg[1,2,0,1]=(0.880665674235)*x[0]**o+(-0.833066777852)*x[0]+(-0.0556340786728)*x[1]**o+(0.620095583249)*x[1]+(-0.390556829051)*x[2]**o+(0.793481461864)*x[2]
-        arg[1,2,1,0]=(0.832046852431)*x[0]**o+(0.4276990324)*x[0]+(-0.486292331356)*x[1]**o+(0.990296730852)*x[1]+(-0.381732943927)*x[2]**o+(0.225838720655)*x[2]
-        arg[1,2,1,1]=(-0.971477034333)*x[0]**o+(0.819409035213)*x[0]+(-0.610341797903)*x[1]**o+(0.842186877805)*x[1]+(0.571187503044)*x[2]**o+(-0.150565006374)*x[2]
-        arg[1,2,2,0]=(0.266080624706)*x[0]**o+(0.893377400845)*x[0]+(0.718525426441)*x[1]**o+(-0.847615622286)*x[1]+(0.614914866)*x[2]**o+(0.826503774974)*x[2]
-        arg[1,2,2,1]=(0.998060871997)*x[0]**o+(-0.572523112154)*x[0]+(-0.786785614822)*x[1]**o+(0.556952019953)*x[1]+(0.804849394796)*x[2]**o+(-0.201157281118)*x[2]
-        arg[1,3,0,0]=(-0.322048105751)*x[0]**o+(0.215441634353)*x[0]+(0.203298400258)*x[1]**o+(0.452071048161)*x[1]+(0.0134315902731)*x[2]**o+(0.240098266028)*x[2]
-        arg[1,3,0,1]=(-0.109845136841)*x[0]**o+(0.0479663457074)*x[0]+(0.899394604931)*x[1]**o+(0.853608214151)*x[1]+(-0.27487885579)*x[2]**o+(-0.0236702866567)*x[2]
-        arg[1,3,1,0]=(0.948550474293)*x[0]**o+(0.359077475995)*x[0]+(0.655387467125)*x[1]**o+(-0.0501114084308)*x[1]+(-0.244470769181)*x[2]**o+(0.670276065978)*x[2]
-        arg[1,3,1,1]=(-0.860769147822)*x[0]**o+(-0.738449680804)*x[0]+(0.840959189643)*x[1]**o+(0.229930283198)*x[1]+(-0.521034843253)*x[2]**o+(-0.50213233896)*x[2]
-        arg[1,3,2,0]=(0.29910216992)*x[0]**o+(0.411953562132)*x[0]+(0.777584507308)*x[1]**o+(0.41482951697)*x[1]+(-0.948751119313)*x[2]**o+(-0.526573791564)*x[2]
-        arg[1,3,2,1]=(-0.768167653244)*x[0]**o+(-0.318762199437)*x[0]+(0.7566706966)*x[1]**o+(-0.151347269999)*x[1]+(-0.626690637485)*x[2]**o+(-0.731518248609)*x[2]
-        arg[1,4,0,0]=(0.0147733854143)*x[0]**o+(-0.812988077571)*x[0]+(0.815385483312)*x[1]**o+(0.285326283687)*x[1]+(0.872502797762)*x[2]**o+(-0.748392032843)*x[2]
-        arg[1,4,0,1]=(0.172931930795)*x[0]**o+(0.425088340505)*x[0]+(0.0122969950852)*x[1]**o+(0.556865378995)*x[1]+(0.614686173604)*x[2]**o+(0.966581266651)*x[2]
-        arg[1,4,1,0]=(0.725270959871)*x[0]**o+(-0.672683754253)*x[0]+(0.486696038678)*x[1]**o+(-0.53856418144)*x[1]+(-0.295197744155)*x[2]**o+(0.0610876962829)*x[2]
-        arg[1,4,1,1]=(0.942300770794)*x[0]**o+(0.876440453364)*x[0]+(0.432652207093)*x[1]**o+(-0.562629961162)*x[1]+(0.497526473424)*x[2]**o+(-0.165824324383)*x[2]
-        arg[1,4,2,0]=(-0.668927175078)*x[0]**o+(0.587283304457)*x[0]+(0.588305038304)*x[1]**o+(0.087906366831)*x[1]+(-0.907721198172)*x[2]**o+(-0.506067369924)*x[2]
-        arg[1,4,2,1]=(0.899071894553)*x[0]**o+(0.920678485704)*x[0]+(-0.244107214117)*x[1]**o+(0.196327093214)*x[1]+(-0.538075261013)*x[2]**o+(-0.925646646321)*x[2]
-        arg[2,0,0,0]=(-0.113452114076)*x[0]**o+(0.541178389983)*x[0]+(0.501083424074)*x[1]**o+(-0.234654083639)*x[1]+(-0.435569149263)*x[2]**o+(0.671517947867)*x[2]
-        arg[2,0,0,1]=(-0.00139653535956)*x[0]**o+(-0.93731587459)*x[0]+(-0.387786776826)*x[1]**o+(0.361445822788)*x[1]+(-0.0958490804452)*x[2]**o+(0.22475163005)*x[2]
-        arg[2,0,1,0]=(0.100832420019)*x[0]**o+(-0.957577198313)*x[0]+(0.244479124631)*x[1]**o+(-0.589295650233)*x[1]+(-0.11020792463)*x[2]**o+(0.969023424875)*x[2]
-        arg[2,0,1,1]=(-0.82757398282)*x[0]**o+(0.665274113482)*x[0]+(0.219624146627)*x[1]**o+(0.604687589384)*x[1]+(0.539774513376)*x[2]**o+(0.676136495778)*x[2]
-        arg[2,0,2,0]=(-0.869539421193)*x[0]**o+(0.449645390105)*x[0]+(-0.216356671763)*x[1]**o+(-0.191616800811)*x[1]+(-0.324126591392)*x[2]**o+(0.726527544226)*x[2]
-        arg[2,0,2,1]=(-0.522340761977)*x[0]**o+(-0.253136332372)*x[0]+(-0.993693358789)*x[1]**o+(0.689338979208)*x[1]+(-0.73030598892)*x[2]**o+(0.604868622965)*x[2]
-        arg[2,1,0,0]=(-0.87285436276)*x[0]**o+(-0.665917385941)*x[0]+(0.105570880359)*x[1]**o+(0.773780432278)*x[1]+(-0.0932677950401)*x[2]**o+(0.55563257373)*x[2]
-        arg[2,1,0,1]=(-0.717823895492)*x[0]**o+(-0.843992380543)*x[0]+(0.348730031558)*x[1]**o+(-0.0641727895105)*x[1]+(-0.575332519937)*x[2]**o+(0.566731137573)*x[2]
-        arg[2,1,1,0]=(-0.749216309273)*x[0]**o+(0.945232679736)*x[0]+(-0.984694983452)*x[1]**o+(-0.697422850579)*x[1]+(0.573407778839)*x[2]**o+(0.654548962131)*x[2]
-        arg[2,1,1,1]=(-0.951637762959)*x[0]**o+(-0.0299724748286)*x[0]+(-0.784527116834)*x[1]**o+(0.490138786409)*x[1]+(0.945743565011)*x[2]**o+(0.158024494836)*x[2]
-        arg[2,1,2,0]=(0.80439224967)*x[0]**o+(0.889509225531)*x[0]+(-0.178335319647)*x[1]**o+(-0.365669987413)*x[1]+(-0.170055755127)*x[2]**o+(0.258843711555)*x[2]
-        arg[2,1,2,1]=(0.520706901588)*x[0]**o+(0.897178241272)*x[0]+(-0.128495163664)*x[1]**o+(-0.404742110163)*x[1]+(0.140333496135)*x[2]**o+(0.31429703244)*x[2]
-        arg[2,2,0,0]=(-0.933201442136)*x[0]**o+(0.0083650170184)*x[0]+(-0.281807642508)*x[1]**o+(-0.09193002721)*x[1]+(-0.422582781227)*x[2]**o+(0.358915935551)*x[2]
-        arg[2,2,0,1]=(-0.09712053324)*x[0]**o+(-0.0752448353447)*x[0]+(0.41291697894)*x[1]**o+(0.593823615119)*x[1]+(0.954183095989)*x[2]**o+(0.479576723309)*x[2]
-        arg[2,2,1,0]=(-0.48592273499)*x[0]**o+(-0.555807193072)*x[0]+(0.842926147107)*x[1]**o+(-0.0760474608316)*x[1]+(0.864590424311)*x[2]**o+(-0.854721691042)*x[2]
-        arg[2,2,1,1]=(0.238261310086)*x[0]**o+(-0.506114025767)*x[0]+(-0.534154656267)*x[1]**o+(-0.282262066272)*x[1]+(-0.241950678835)*x[2]**o+(-0.596913007205)*x[2]
-        arg[2,2,2,0]=(0.35002425052)*x[0]**o+(-0.724235915518)*x[0]+(-0.443311896206)*x[1]**o+(0.0183169190559)*x[1]+(-0.180995873436)*x[2]**o+(0.949105760518)*x[2]
-        arg[2,2,2,1]=(-0.524596480672)*x[0]**o+(-0.72511087285)*x[0]+(-0.793159588655)*x[1]**o+(0.197579071177)*x[1]+(0.214510478855)*x[2]**o+(0.592011219443)*x[2]
-        arg[2,3,0,0]=(-0.777144207151)*x[0]**o+(0.821815068413)*x[0]+(0.828183715461)*x[1]**o+(-0.77742744879)*x[1]+(0.520088528639)*x[2]**o+(0.564796500907)*x[2]
-        arg[2,3,0,1]=(-0.444252706506)*x[0]**o+(-0.999658246414)*x[0]+(0.458490846376)*x[1]**o+(0.206371738627)*x[1]+(-0.5943830165)*x[2]**o+(0.125954475804)*x[2]
-        arg[2,3,1,0]=(-0.499555379078)*x[0]**o+(0.667767779032)*x[0]+(-0.169053599596)*x[1]**o+(0.587608309525)*x[1]+(-0.99317016838)*x[2]**o+(-0.580232194372)*x[2]
-        arg[2,3,1,1]=(0.881736170108)*x[0]**o+(-0.0221128885544)*x[0]+(-0.239202356219)*x[1]**o+(-0.825250840397)*x[1]+(-0.34138233902)*x[2]**o+(-0.900437209752)*x[2]
-        arg[2,3,2,0]=(-0.810415345283)*x[0]**o+(0.671639285402)*x[0]+(0.0577696593549)*x[1]**o+(0.12466039802)*x[1]+(-0.164952472389)*x[2]**o+(-0.881356759483)*x[2]
-        arg[2,3,2,1]=(0.641411687742)*x[0]**o+(0.939465110042)*x[0]+(0.182541049996)*x[1]**o+(-0.502132165421)*x[1]+(-0.914212670088)*x[2]**o+(0.361356243622)*x[2]
-        arg[2,4,0,0]=(0.696033328872)*x[0]**o+(0.854329989895)*x[0]+(0.66092830442)*x[1]**o+(-0.165623528752)*x[1]+(0.587322879532)*x[2]**o+(-0.441145527759)*x[2]
-        arg[2,4,0,1]=(0.885589185979)*x[0]**o+(0.170856006811)*x[0]+(-0.500114387063)*x[1]**o+(-0.772574748562)*x[1]+(0.599300325869)*x[2]**o+(0.0950082175327)*x[2]
-        arg[2,4,1,0]=(0.877739402691)*x[0]**o+(0.494715865857)*x[0]+(-0.4548916845)*x[1]**o+(-0.108381552398)*x[1]+(-0.620522177203)*x[2]**o+(-0.375546939131)*x[2]
-        arg[2,4,1,1]=(-0.108044365878)*x[0]**o+(-0.592058059304)*x[0]+(-0.64481990676)*x[1]**o+(-0.903674017194)*x[1]+(0.0964052945913)*x[2]**o+(0.357819426568)*x[2]
-        arg[2,4,2,0]=(-0.686157836559)*x[0]**o+(0.585514351597)*x[0]+(-0.5623443108)*x[1]**o+(-0.636059380122)*x[1]+(0.469863235081)*x[2]**o+(0.374567303622)*x[2]
-        arg[2,4,2,1]=(0.214800008136)*x[0]**o+(0.0680448664819)*x[0]+(0.722930302776)*x[1]**o+(0.107573165145)*x[1]+(0.0027804595356)*x[2]**o+(0.725566605544)*x[2]
-        arg[3,0,0,0]=(-0.273256791086)*x[0]**o+(0.801129507153)*x[0]+(-0.840227644476)*x[1]**o+(-0.31594258736)*x[1]+(-0.140806177065)*x[2]**o+(-0.0958103115672)*x[2]
-        arg[3,0,0,1]=(0.588534583503)*x[0]**o+(0.242235627811)*x[0]+(-0.541539488722)*x[1]**o+(0.624385574868)*x[1]+(-0.0641371754789)*x[2]**o+(-0.635676751281)*x[2]
-        arg[3,0,1,0]=(0.81967100218)*x[0]**o+(0.671597165436)*x[0]+(0.160179001916)*x[1]**o+(-0.226714136475)*x[1]+(-0.523709112534)*x[2]**o+(0.932797007296)*x[2]
-        arg[3,0,1,1]=(0.707793115256)*x[0]**o+(-0.0995173271712)*x[0]+(-0.594597614398)*x[1]**o+(-0.72096550461)*x[1]+(-0.373631371949)*x[2]**o+(-0.282151921803)*x[2]
-        arg[3,0,2,0]=(0.873307297971)*x[0]**o+(0.0950091191819)*x[0]+(-0.534108539131)*x[1]**o+(0.567381193719)*x[1]+(-0.276691140405)*x[2]**o+(0.84882104254)*x[2]
-        arg[3,0,2,1]=(-0.895148878411)*x[0]**o+(-0.880973451462)*x[0]+(0.105602819158)*x[1]**o+(-0.836475687487)*x[1]+(-0.18380164164)*x[2]**o+(-0.391643939001)*x[2]
-        arg[3,1,0,0]=(-0.144070349397)*x[0]**o+(-0.247578520564)*x[0]+(0.512469248899)*x[1]**o+(0.0369808259097)*x[1]+(0.67517925106)*x[2]**o+(-0.306122403522)*x[2]
-        arg[3,1,0,1]=(0.389023591419)*x[0]**o+(0.0335324297663)*x[0]+(0.166380432563)*x[1]**o+(0.415133512101)*x[1]+(-0.956055398028)*x[2]**o+(-0.069254560597)*x[2]
-        arg[3,1,1,0]=(-0.253194755795)*x[0]**o+(-0.432240637655)*x[0]+(0.886730830871)*x[1]**o+(0.94685399231)*x[1]+(-0.0193581886643)*x[2]**o+(-0.828124732153)*x[2]
-        arg[3,1,1,1]=(0.948739050057)*x[0]**o+(-0.200402018913)*x[0]+(0.062573402994)*x[1]**o+(-0.408727698463)*x[1]+(-0.0334411087309)*x[2]**o+(-0.676147119957)*x[2]
-        arg[3,1,2,0]=(0.249237167322)*x[0]**o+(-0.621387879739)*x[0]+(-0.745335388751)*x[1]**o+(-0.183173004074)*x[1]+(0.56632553768)*x[2]**o+(-0.519909176525)*x[2]
-        arg[3,1,2,1]=(-0.660822495815)*x[0]**o+(0.0459275869317)*x[0]+(-0.0853936912232)*x[1]**o+(-0.895502076207)*x[1]+(0.150013238845)*x[2]**o+(0.201527905115)*x[2]
-        arg[3,2,0,0]=(0.0846880899978)*x[0]**o+(-0.450721252185)*x[0]+(0.0100224498309)*x[1]**o+(-0.729399043167)*x[1]+(0.249073157161)*x[2]**o+(-0.313056982897)*x[2]
-        arg[3,2,0,1]=(0.349123663394)*x[0]**o+(-0.0439266646004)*x[0]+(0.201749457716)*x[1]**o+(-0.29961557135)*x[1]+(0.247657591065)*x[2]**o+(0.702448030656)*x[2]
-        arg[3,2,1,0]=(-0.67551758529)*x[0]**o+(-0.856271486186)*x[0]+(-0.337698270178)*x[1]**o+(-0.855526501932)*x[1]+(0.204628923051)*x[2]**o+(0.0425229547861)*x[2]
-        arg[3,2,1,1]=(0.913895958603)*x[0]**o+(0.33488814727)*x[0]+(0.725768429772)*x[1]**o+(0.31487179035)*x[1]+(-0.926895768372)*x[2]**o+(-0.303623128744)*x[2]
-        arg[3,2,2,0]=(0.695497510732)*x[0]**o+(-0.71819800795)*x[0]+(0.0949892877746)*x[1]**o+(-0.371952684199)*x[1]+(-0.712679288901)*x[2]**o+(-0.839032166941)*x[2]
-        arg[3,2,2,1]=(0.847915632309)*x[0]**o+(0.489320767225)*x[0]+(0.884694888545)*x[1]**o+(-0.836734066966)*x[1]+(-0.782643394677)*x[2]**o+(0.998012000062)*x[2]
-        arg[3,3,0,0]=(0.400343531732)*x[0]**o+(-0.977399566427)*x[0]+(-0.0491815761683)*x[1]**o+(0.820343030844)*x[1]+(0.145276965371)*x[2]**o+(0.106181410329)*x[2]
-        arg[3,3,0,1]=(0.39509119571)*x[0]**o+(-0.532152199068)*x[0]+(0.0961163031465)*x[1]**o+(-0.845734786516)*x[1]+(0.0685207262665)*x[2]**o+(0.10725771579)*x[2]
-        arg[3,3,1,0]=(-0.326475146957)*x[0]**o+(0.0491193078417)*x[0]+(-0.193405294452)*x[1]**o+(0.283579426128)*x[1]+(0.885442239373)*x[2]**o+(-0.838544460442)*x[2]
-        arg[3,3,1,1]=(-0.502234549601)*x[0]**o+(-0.764617462736)*x[0]+(0.52701849705)*x[1]**o+(-0.423245302614)*x[1]+(0.728096320995)*x[2]**o+(0.143356081954)*x[2]
-        arg[3,3,2,0]=(0.924562662058)*x[0]**o+(-0.0120799887424)*x[0]+(-0.342886608544)*x[1]**o+(0.609435784717)*x[1]+(0.392296911228)*x[2]**o+(0.572866548262)*x[2]
-        arg[3,3,2,1]=(0.661267105524)*x[0]**o+(-0.71847134372)*x[0]+(-0.913866381825)*x[1]**o+(-0.502556458508)*x[1]+(0.201214639904)*x[2]**o+(-0.431939125167)*x[2]
-        arg[3,4,0,0]=(0.391785002874)*x[0]**o+(0.424885787931)*x[0]+(-0.377558346944)*x[1]**o+(-0.556924666311)*x[1]+(0.511852194353)*x[2]**o+(0.514261734074)*x[2]
-        arg[3,4,0,1]=(-0.269148156354)*x[0]**o+(0.692033978804)*x[0]+(-0.390604590454)*x[1]**o+(-0.551681907742)*x[1]+(0.0613720420346)*x[2]**o+(-0.508841982991)*x[2]
-        arg[3,4,1,0]=(0.593170387694)*x[0]**o+(-0.00676980821753)*x[0]+(0.788564472913)*x[1]**o+(0.823094059865)*x[1]+(0.52895485971)*x[2]**o+(0.88849618397)*x[2]
-        arg[3,4,1,1]=(0.772185283881)*x[0]**o+(0.759014894154)*x[0]+(-0.142739578724)*x[1]**o+(-0.141899255898)*x[1]+(0.479086662114)*x[2]**o+(0.68993908918)*x[2]
-        arg[3,4,2,0]=(0.998097253401)*x[0]**o+(0.621254339576)*x[0]+(-0.692540865624)*x[1]**o+(0.716545091382)*x[1]+(0.478209703594)*x[2]**o+(0.259063088226)*x[2]
-        arg[3,4,2,1]=(-0.321962318028)*x[0]**o+(0.0377531939042)*x[0]+(-0.362041758315)*x[1]**o+(0.632474956936)*x[1]+(0.133972776903)*x[2]**o+(-0.341803258375)*x[2]
-        ref[0,0,0,0]=(-0.484602377547)*(1+2.*(dim-1.)/(o+1.))+(-1.0194202985)*dim
-        ref[0,0,0,1]=(-0.835132633821)*(1+2.*(dim-1.)/(o+1.))+(0.616687157924)*dim
-        ref[0,0,1,0]=(1.49678131808)*(1+2.*(dim-1.)/(o+1.))+(0.880777811066)*dim
-        ref[0,0,1,1]=(0.910664643761)*(1+2.*(dim-1.)/(o+1.))+(-0.961299455217)*dim
-        ref[0,0,2,0]=(0.946573940383)*(1+2.*(dim-1.)/(o+1.))+(0.598873680457)*dim
-        ref[0,0,2,1]=(0.872725648736)*(1+2.*(dim-1.)/(o+1.))+(-1.54360766814)*dim
-        ref[0,1,0,0]=(1.67226553782)*(1+2.*(dim-1.)/(o+1.))+(0.0561023038674)*dim
-        ref[0,1,0,1]=(1.15582406251)*(1+2.*(dim-1.)/(o+1.))+(-0.620028515442)*dim
-        ref[0,1,1,0]=(-1.79024527224)*(1+2.*(dim-1.)/(o+1.))+(0.726554075535)*dim
-        ref[0,1,1,1]=(0.8477406514)*(1+2.*(dim-1.)/(o+1.))+(-1.15509819622)*dim
-        ref[0,1,2,0]=(0.0209750791326)*(1+2.*(dim-1.)/(o+1.))+(-1.00141913872)*dim
-        ref[0,1,2,1]=(0.569876032064)*(1+2.*(dim-1.)/(o+1.))+(0.271451611059)*dim
-        ref[0,2,0,0]=(0.19197323238)*(1+2.*(dim-1.)/(o+1.))+(0.320608976525)*dim
-        ref[0,2,0,1]=(-0.864025126798)*(1+2.*(dim-1.)/(o+1.))+(0.792122272387)*dim
-        ref[0,2,1,0]=(-1.9943606725)*(1+2.*(dim-1.)/(o+1.))+(1.25566864927)*dim
-        ref[0,2,1,1]=(-1.0628223267)*(1+2.*(dim-1.)/(o+1.))+(-1.32772813107)*dim
-        ref[0,2,2,0]=(1.40455685015)*(1+2.*(dim-1.)/(o+1.))+(-1.31673180399)*dim
-        ref[0,2,2,1]=(1.35132033585)*(1+2.*(dim-1.)/(o+1.))+(-1.32702265435)*dim
-        ref[0,3,0,0]=(-0.949679155841)*(1+2.*(dim-1.)/(o+1.))+(-0.739650532418)*dim
-        ref[0,3,0,1]=(0.47964320732)*(1+2.*(dim-1.)/(o+1.))+(0.473037089003)*dim
-        ref[0,3,1,0]=(-0.432320617013)*(1+2.*(dim-1.)/(o+1.))+(0.850735495297)*dim
-        ref[0,3,1,1]=(-0.780121359247)*(1+2.*(dim-1.)/(o+1.))+(-1.17524947794)*dim
-        ref[0,3,2,0]=(-0.791891130098)*(1+2.*(dim-1.)/(o+1.))+(0.557003562128)*dim
-        ref[0,3,2,1]=(0.614468356202)*(1+2.*(dim-1.)/(o+1.))+(-0.920106974125)*dim
-        ref[0,4,0,0]=(-0.108571506377)*(1+2.*(dim-1.)/(o+1.))+(0.0716679405256)*dim
-        ref[0,4,0,1]=(2.15955613929)*(1+2.*(dim-1.)/(o+1.))+(0.862657265402)*dim
-        ref[0,4,1,0]=(-0.239021888652)*(1+2.*(dim-1.)/(o+1.))+(1.46771841022)*dim
-        ref[0,4,1,1]=(0.596017340702)*(1+2.*(dim-1.)/(o+1.))+(-0.343059728803)*dim
-        ref[0,4,2,0]=(-0.254445317045)*(1+2.*(dim-1.)/(o+1.))+(0.185808795951)*dim
-        ref[0,4,2,1]=(0.520266014371)*(1+2.*(dim-1.)/(o+1.))+(-1.99456473805)*dim
-        ref[1,0,0,0]=(-1.07260356292)*(1+2.*(dim-1.)/(o+1.))+(0.374273678021)*dim
-        ref[1,0,0,1]=(0.300858233864)*(1+2.*(dim-1.)/(o+1.))+(-0.958946395922)*dim
-        ref[1,0,1,0]=(-1.69631340214)*(1+2.*(dim-1.)/(o+1.))+(-0.096563879864)*dim
-        ref[1,0,1,1]=(-1.29948775767)*(1+2.*(dim-1.)/(o+1.))+(-1.29853569383)*dim
-        ref[1,0,2,0]=(2.11639869443)*(1+2.*(dim-1.)/(o+1.))+(0.783285612541)*dim
-        ref[1,0,2,1]=(-0.224039580872)*(1+2.*(dim-1.)/(o+1.))+(1.35876351947)*dim
-        ref[1,1,0,0]=(-1.48458285103)*(1+2.*(dim-1.)/(o+1.))+(-0.917614145542)*dim
-        ref[1,1,0,1]=(0.92188880584)*(1+2.*(dim-1.)/(o+1.))+(0.569756278479)*dim
-        ref[1,1,1,0]=(-0.315193818122)*(1+2.*(dim-1.)/(o+1.))+(-1.87410298298)*dim
-        ref[1,1,1,1]=(-0.17620361977)*(1+2.*(dim-1.)/(o+1.))+(-0.174309770317)*dim
-        ref[1,1,2,0]=(1.91602140435)*(1+2.*(dim-1.)/(o+1.))+(-0.762727403622)*dim
-        ref[1,1,2,1]=(-0.481090245186)*(1+2.*(dim-1.)/(o+1.))+(0.302365878371)*dim
-        ref[1,2,0,0]=(1.51144307636)*(1+2.*(dim-1.)/(o+1.))+(-0.469903943621)*dim
-        ref[1,2,0,1]=(0.434474766511)*(1+2.*(dim-1.)/(o+1.))+(0.580510267262)*dim
-        ref[1,2,1,0]=(-0.0359784228521)*(1+2.*(dim-1.)/(o+1.))+(1.64383448391)*dim
-        ref[1,2,1,1]=(-1.01063132919)*(1+2.*(dim-1.)/(o+1.))+(1.51103090664)*dim
-        ref[1,2,2,0]=(1.59952091715)*(1+2.*(dim-1.)/(o+1.))+(0.872265553532)*dim
-        ref[1,2,2,1]=(1.01612465197)*(1+2.*(dim-1.)/(o+1.))+(-0.216728373319)*dim
-        ref[1,3,0,0]=(-0.10531811522)*(1+2.*(dim-1.)/(o+1.))+(0.907610948542)*dim
-        ref[1,3,0,1]=(0.5146706123)*(1+2.*(dim-1.)/(o+1.))+(0.877904273202)*dim
-        ref[1,3,1,0]=(1.35946717224)*(1+2.*(dim-1.)/(o+1.))+(0.979242133542)*dim
-        ref[1,3,1,1]=(-0.540844801432)*(1+2.*(dim-1.)/(o+1.))+(-1.01065173657)*dim
-        ref[1,3,2,0]=(0.127935557915)*(1+2.*(dim-1.)/(o+1.))+(0.300209287538)*dim
-        ref[1,3,2,1]=(-0.63818759413)*(1+2.*(dim-1.)/(o+1.))+(-1.20162771805)*dim
-        ref[1,4,0,0]=(1.70266166649)*(1+2.*(dim-1.)/(o+1.))+(-1.27605382673)*dim
-        ref[1,4,0,1]=(0.799915099484)*(1+2.*(dim-1.)/(o+1.))+(1.94853498615)*dim
-        ref[1,4,1,0]=(0.916769254394)*(1+2.*(dim-1.)/(o+1.))+(-1.15016023941)*dim
-        ref[1,4,1,1]=(1.87247945131)*(1+2.*(dim-1.)/(o+1.))+(0.147986167818)*dim
-        ref[1,4,2,0]=(-0.988343334946)*(1+2.*(dim-1.)/(o+1.))+(0.169122301365)*dim
-        ref[1,4,2,1]=(0.116889419423)*(1+2.*(dim-1.)/(o+1.))+(0.191358932597)*dim
-        ref[2,0,0,0]=(-0.0479378392653)*(1+2.*(dim-1.)/(o+1.))+(0.978042254211)*dim
-        ref[2,0,0,1]=(-0.485032392631)*(1+2.*(dim-1.)/(o+1.))+(-0.351118421752)*dim
-        ref[2,0,1,0]=(0.23510362002)*(1+2.*(dim-1.)/(o+1.))+(-0.577849423671)*dim
-        ref[2,0,1,1]=(-0.068175322817)*(1+2.*(dim-1.)/(o+1.))+(1.94609819864)*dim
-        ref[2,0,2,0]=(-1.41002268435)*(1+2.*(dim-1.)/(o+1.))+(0.98455613352)*dim
-        ref[2,0,2,1]=(-2.24634010969)*(1+2.*(dim-1.)/(o+1.))+(1.0410712698)*dim
-        ref[2,1,0,0]=(-0.860551277441)*(1+2.*(dim-1.)/(o+1.))+(0.663495620068)*dim
-        ref[2,1,0,1]=(-0.944426383871)*(1+2.*(dim-1.)/(o+1.))+(-0.341434032481)*dim
-        ref[2,1,1,0]=(-1.16050351389)*(1+2.*(dim-1.)/(o+1.))+(0.902358791288)*dim
-        ref[2,1,1,1]=(-0.790421314781)*(1+2.*(dim-1.)/(o+1.))+(0.618190806416)*dim
-        ref[2,1,2,0]=(0.456001174897)*(1+2.*(dim-1.)/(o+1.))+(0.782682949672)*dim
-        ref[2,1,2,1]=(0.532545234059)*(1+2.*(dim-1.)/(o+1.))+(0.806733163549)*dim
-        ref[2,2,0,0]=(-1.63759186587)*(1+2.*(dim-1.)/(o+1.))+(0.275350925359)*dim
-        ref[2,2,0,1]=(1.26997954169)*(1+2.*(dim-1.)/(o+1.))+(0.998155503083)*dim
-        ref[2,2,1,0]=(1.22159383643)*(1+2.*(dim-1.)/(o+1.))+(-1.48657634495)*dim
-        ref[2,2,1,1]=(-0.537844025016)*(1+2.*(dim-1.)/(o+1.))+(-1.38528909924)*dim
-        ref[2,2,2,0]=(-0.274283519122)*(1+2.*(dim-1.)/(o+1.))+(0.243186764056)*dim
-        ref[2,2,2,1]=(-1.10324559047)*(1+2.*(dim-1.)/(o+1.))+(0.0644794177698)*dim
-        ref[2,3,0,0]=(0.571128036949)*(1+2.*(dim-1.)/(o+1.))+(0.60918412053)*dim
-        ref[2,3,0,1]=(-0.580144876629)*(1+2.*(dim-1.)/(o+1.))+(-0.667332031982)*dim
-        ref[2,3,1,0]=(-1.66177914705)*(1+2.*(dim-1.)/(o+1.))+(0.675143894185)*dim
-        ref[2,3,1,1]=(0.301151474869)*(1+2.*(dim-1.)/(o+1.))+(-1.7478009387)*dim
-        ref[2,3,2,0]=(-0.917598158317)*(1+2.*(dim-1.)/(o+1.))+(-0.0850570760611)*dim
-        ref[2,3,2,1]=(-0.09025993235)*(1+2.*(dim-1.)/(o+1.))+(0.798689188243)*dim
-        ref[2,4,0,0]=(1.94428451282)*(1+2.*(dim-1.)/(o+1.))+(0.247560933384)*dim
-        ref[2,4,0,1]=(0.984775124785)*(1+2.*(dim-1.)/(o+1.))+(-0.506710524219)*dim
-        ref[2,4,1,0]=(-0.197674459012)*(1+2.*(dim-1.)/(o+1.))+(0.0107873743289)*dim
-        ref[2,4,1,1]=(-0.656458978046)*(1+2.*(dim-1.)/(o+1.))+(-1.13791264993)*dim
-        ref[2,4,2,0]=(-0.778638912279)*(1+2.*(dim-1.)/(o+1.))+(0.324022275097)*dim
-        ref[2,4,2,1]=(0.940510770447)*(1+2.*(dim-1.)/(o+1.))+(0.901184637171)*dim
-        ref[3,0,0,0]=(-1.25429061263)*(1+2.*(dim-1.)/(o+1.))+(0.389376608226)*dim
-        ref[3,0,0,1]=(-0.0171420806973)*(1+2.*(dim-1.)/(o+1.))+(0.230944451397)*dim
-        ref[3,0,1,0]=(0.456140891562)*(1+2.*(dim-1.)/(o+1.))+(1.37768003626)*dim
-        ref[3,0,1,1]=(-0.260435871091)*(1+2.*(dim-1.)/(o+1.))+(-1.10263475358)*dim
-        ref[3,0,2,0]=(0.0625076184349)*(1+2.*(dim-1.)/(o+1.))+(1.51121135544)*dim
-        ref[3,0,2,1]=(-0.973347700893)*(1+2.*(dim-1.)/(o+1.))+(-2.10909307795)*dim
-        ref[3,1,0,0]=(1.04357815056)*(1+2.*(dim-1.)/(o+1.))+(-0.516720098176)*dim
-        ref[3,1,0,1]=(-0.400651374046)*(1+2.*(dim-1.)/(o+1.))+(0.37941138127)*dim
-        ref[3,1,1,0]=(0.614177886412)*(1+2.*(dim-1.)/(o+1.))+(-0.313511377498)*dim
-        ref[3,1,1,1]=(0.97787134432)*(1+2.*(dim-1.)/(o+1.))+(-1.28527683733)*dim
-        ref[3,1,2,0]=(0.0702273162506)*(1+2.*(dim-1.)/(o+1.))+(-1.32447006034)*dim
-        ref[3,1,2,1]=(-0.596202948193)*(1+2.*(dim-1.)/(o+1.))+(-0.648046584161)*dim
-        ref[3,2,0,0]=(0.34378369699)*(1+2.*(dim-1.)/(o+1.))+(-1.49317727825)*dim
-        ref[3,2,0,1]=(0.798530712175)*(1+2.*(dim-1.)/(o+1.))+(0.358905794706)*dim
-        ref[3,2,1,0]=(-0.808586932417)*(1+2.*(dim-1.)/(o+1.))+(-1.66927503333)*dim
-        ref[3,2,1,1]=(0.712768620002)*(1+2.*(dim-1.)/(o+1.))+(0.346136808876)*dim
-        ref[3,2,2,0]=(0.0778075096053)*(1+2.*(dim-1.)/(o+1.))+(-1.92918285909)*dim
-        ref[3,2,2,1]=(0.949967126178)*(1+2.*(dim-1.)/(o+1.))+(0.650598700321)*dim
-        ref[3,3,0,0]=(0.496438920934)*(1+2.*(dim-1.)/(o+1.))+(-0.0508751252546)*dim
-        ref[3,3,0,1]=(0.559728225123)*(1+2.*(dim-1.)/(o+1.))+(-1.27062926979)*dim
-        ref[3,3,1,0]=(0.365561797964)*(1+2.*(dim-1.)/(o+1.))+(-0.505845726473)*dim
-        ref[3,3,1,1]=(0.752880268444)*(1+2.*(dim-1.)/(o+1.))+(-1.0445066834)*dim
-        ref[3,3,2,0]=(0.973972964742)*(1+2.*(dim-1.)/(o+1.))+(1.17022234424)*dim
-        ref[3,3,2,1]=(-0.0513846363967)*(1+2.*(dim-1.)/(o+1.))+(-1.65296692739)*dim
-        ref[3,4,0,0]=(0.526078850284)*(1+2.*(dim-1.)/(o+1.))+(0.382222855695)*dim
-        ref[3,4,0,1]=(-0.598380704773)*(1+2.*(dim-1.)/(o+1.))+(-0.368489911929)*dim
-        ref[3,4,1,0]=(1.91068972032)*(1+2.*(dim-1.)/(o+1.))+(1.70482043562)*dim
-        ref[3,4,1,1]=(1.10853236727)*(1+2.*(dim-1.)/(o+1.))+(1.30705472744)*dim
-        ref[3,4,2,0]=(0.78376609137)*(1+2.*(dim-1.)/(o+1.))+(1.59686251918)*dim
-        ref[3,4,2,1]=(-0.550031299439)*(1+2.*(dim-1.)/(o+1.))+(0.328424892465)*dim
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 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 the 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.506621877215)*x[0]**o+(-0.45560383685)*x[0]+(-0.598137301806)*x[1]**o+(0.784241595615)*x[1]
-        ref=(-0.0915154245913)*(1+2.*(dim-1.)/(o+1.))+(0.328637758765)*dim
-      else:
-        arg=(-0.505489131484)*x[0]**o+(0.58139159259)*x[0]+(0.458086828888)*x[1]**o+(0.549090746672)*x[1]+(-0.0882325936167)*x[2]**o+(0.0170295954808)*x[2]
-        ref=(-0.135634896213)*(1+2.*(dim-1.)/(o+1.))+(1.14751193474)*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 the 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.float_)
-      if dim==2:
-        arg[0]=(-0.88779433873)*x[0]**o+(0.507955012301)*x[0]+(0.652739274924)*x[1]**o+(-0.971975755989)*x[1]
-        arg[1]=(-0.0812690931139)*x[0]**o+(-0.283880962354)*x[0]+(0.094904517439)*x[1]**o+(-0.940528164353)*x[1]
-        ref[0]=(-0.235055063806)*(1+2.*(dim-1.)/(o+1.))+(-0.464020743688)*dim
-        ref[1]=(0.0136354243251)*(1+2.*(dim-1.)/(o+1.))+(-1.22440912671)*dim
-      else:
-        arg[0]=(-0.506412384389)*x[0]**o+(-0.465794405394)*x[0]+(0.346977499982)*x[1]**o+(0.386181176987)*x[1]+(-0.476729572397)*x[2]**o+(-0.956945933508)*x[2]
-        arg[1]=(0.267092807416)*x[0]**o+(-0.54211155802)*x[0]+(-0.27815411727)*x[1]**o+(-0.984542450102)*x[1]+(0.656389296076)*x[2]**o+(0.0395863971401)*x[2]
-        ref[0]=(-0.636164456804)*(1+2.*(dim-1.)/(o+1.))+(-1.03655916191)*dim
-        ref[1]=(0.645327986222)*(1+2.*(dim-1.)/(o+1.))+(-1.48706761098)*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_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.0607636892262)*x[0]**o+(0.740866012668)*x[0]+(0.145223136928)*x[1]**o+(-0.738387773526)*x[1]
-        arg[0,1]=(0.0292598484511)*x[0]**o+(-0.189208290889)*x[0]+(0.902021405165)*x[1]**o+(0.423106545559)*x[1]
-        arg[0,2]=(0.519658217226)*x[0]**o+(-0.768406018136)*x[0]+(-0.189532527097)*x[1]**o+(0.256417429833)*x[1]
-        arg[0,3]=(-0.565327663481)*x[0]**o+(0.876762003673)*x[0]+(-0.243804758063)*x[1]**o+(0.399476036454)*x[1]
-        arg[0,4]=(0.0632252409818)*x[0]**o+(0.0951130662538)*x[0]+(0.185662425763)*x[1]**o+(0.907446482506)*x[1]
-        arg[1,0]=(-0.430504584794)*x[0]**o+(0.864814314023)*x[0]+(0.47460095501)*x[1]**o+(-0.599679142188)*x[1]
-        arg[1,1]=(0.699618175298)*x[0]**o+(-0.561782605517)*x[0]+(-0.304250865015)*x[1]**o+(-0.341836776795)*x[1]
-        arg[1,2]=(0.856956767316)*x[0]**o+(0.610026903213)*x[0]+(-0.666749954599)*x[1]**o+(0.885388885234)*x[1]
-        arg[1,3]=(0.699377007631)*x[0]**o+(0.699906750287)*x[0]+(0.486690669414)*x[1]**o+(0.167425901549)*x[1]
-        arg[1,4]=(0.466701415896)*x[0]**o+(-0.0719752759126)*x[0]+(0.795662047062)*x[1]**o+(0.979862503926)*x[1]
-        arg[2,0]=(-0.912218732612)*x[0]**o+(0.950990472894)*x[0]+(-0.527999708902)*x[1]**o+(0.695735593043)*x[1]
-        arg[2,1]=(-0.223468270048)*x[0]**o+(-0.882565147673)*x[0]+(0.750516681645)*x[1]**o+(-0.652794590093)*x[1]
-        arg[2,2]=(0.897646682412)*x[0]**o+(-0.815401214058)*x[0]+(0.629680741327)*x[1]**o+(-0.9716988156)*x[1]
-        arg[2,3]=(0.279739517524)*x[0]**o+(-0.0859797206016)*x[0]+(-0.0454325622757)*x[1]**o+(0.301214753868)*x[1]
-        arg[2,4]=(-0.358056827092)*x[0]**o+(0.254207762658)*x[0]+(0.831499219864)*x[1]**o+(0.0930388028811)*x[1]
-        arg[3,0]=(0.0761520020047)*x[0]**o+(0.650696394486)*x[0]+(-0.132369660678)*x[1]**o+(-0.321220385971)*x[1]
-        arg[3,1]=(0.238715231585)*x[0]**o+(-0.297219391083)*x[0]+(-0.15446552614)*x[1]**o+(0.860560615056)*x[1]
-        arg[3,2]=(0.708864754538)*x[0]**o+(-0.221186702958)*x[0]+(-0.478127729891)*x[1]**o+(0.0309604412212)*x[1]
-        arg[3,3]=(0.362909366479)*x[0]**o+(0.382279106813)*x[0]+(0.827905062086)*x[1]**o+(-0.303048355949)*x[1]
-        arg[3,4]=(0.573736946844)*x[0]**o+(0.645059764766)*x[0]+(0.301945383678)*x[1]**o+(-0.103083649994)*x[1]
-        ref[0,0]=(0.205986826154)*(1+2.*(dim-1.)/(o+1.))+(0.0024782391428)*dim
-        ref[0,1]=(0.931281253617)*(1+2.*(dim-1.)/(o+1.))+(0.23389825467)*dim
-        ref[0,2]=(0.330125690129)*(1+2.*(dim-1.)/(o+1.))+(-0.511988588303)*dim
-        ref[0,3]=(-0.809132421544)*(1+2.*(dim-1.)/(o+1.))+(1.27623804013)*dim
-        ref[0,4]=(0.248887666745)*(1+2.*(dim-1.)/(o+1.))+(1.00255954876)*dim
-        ref[1,0]=(0.044096370216)*(1+2.*(dim-1.)/(o+1.))+(0.265135171835)*dim
-        ref[1,1]=(0.395367310283)*(1+2.*(dim-1.)/(o+1.))+(-0.903619382312)*dim
-        ref[1,2]=(0.190206812717)*(1+2.*(dim-1.)/(o+1.))+(1.49541578845)*dim
-        ref[1,3]=(1.18606767705)*(1+2.*(dim-1.)/(o+1.))+(0.867332651836)*dim
-        ref[1,4]=(1.26236346296)*(1+2.*(dim-1.)/(o+1.))+(0.907887228013)*dim
-        ref[2,0]=(-1.44021844151)*(1+2.*(dim-1.)/(o+1.))+(1.64672606594)*dim
-        ref[2,1]=(0.527048411596)*(1+2.*(dim-1.)/(o+1.))+(-1.53535973777)*dim
-        ref[2,2]=(1.52732742374)*(1+2.*(dim-1.)/(o+1.))+(-1.78710002966)*dim
-        ref[2,3]=(0.234306955249)*(1+2.*(dim-1.)/(o+1.))+(0.215235033266)*dim
-        ref[2,4]=(0.473442392772)*(1+2.*(dim-1.)/(o+1.))+(0.34724656554)*dim
-        ref[3,0]=(-0.0562176586729)*(1+2.*(dim-1.)/(o+1.))+(0.329476008516)*dim
-        ref[3,1]=(0.0842497054449)*(1+2.*(dim-1.)/(o+1.))+(0.563341223973)*dim
-        ref[3,2]=(0.230737024647)*(1+2.*(dim-1.)/(o+1.))+(-0.190226261737)*dim
-        ref[3,3]=(1.19081442856)*(1+2.*(dim-1.)/(o+1.))+(0.079230750864)*dim
-        ref[3,4]=(0.875682330522)*(1+2.*(dim-1.)/(o+1.))+(0.541976114772)*dim
-      else:
-        arg[0,0]=(0.0640108068236)*x[0]**o+(0.0322830166043)*x[0]+(-0.703691335255)*x[1]**o+(-0.185228770711)*x[1]+(-0.738714166313)*x[2]**o+(-0.423576647077)*x[2]
-        arg[0,1]=(-0.738341351945)*x[0]**o+(0.396306395436)*x[0]+(-0.369974848568)*x[1]**o+(0.750933208783)*x[1]+(0.554069869127)*x[2]**o+(0.634275493051)*x[2]
-        arg[0,2]=(-0.259193248708)*x[0]**o+(-0.900007449583)*x[0]+(0.894379436915)*x[1]**o+(0.997814320752)*x[1]+(0.233192116622)*x[2]**o+(0.986616259649)*x[2]
-        arg[0,3]=(0.381480250594)*x[0]**o+(0.734823219057)*x[0]+(0.569912440169)*x[1]**o+(-0.441084504695)*x[1]+(0.312539701584)*x[2]**o+(-0.3733004974)*x[2]
-        arg[0,4]=(-0.779059807622)*x[0]**o+(0.538777922322)*x[0]+(-0.0695879211612)*x[1]**o+(-0.204862216499)*x[1]+(-0.0109698525672)*x[2]**o+(0.981875117617)*x[2]
-        arg[1,0]=(-0.415857630044)*x[0]**o+(-0.356607866913)*x[0]+(-0.628854326903)*x[1]**o+(0.0401233333505)*x[1]+(0.687470169579)*x[2]**o+(-0.565349753114)*x[2]
-        arg[1,1]=(-0.438364910402)*x[0]**o+(0.498078194367)*x[0]+(-0.120729597948)*x[1]**o+(-0.622076117713)*x[1]+(0.995130029172)*x[2]**o+(-0.7234601064)*x[2]
-        arg[1,2]=(-0.957869585558)*x[0]**o+(0.374693219824)*x[0]+(0.0355192120972)*x[1]**o+(-0.516770140651)*x[1]+(0.521887953791)*x[2]**o+(0.00771564236502)*x[2]
-        arg[1,3]=(-0.0495580194062)*x[0]**o+(-0.183895326318)*x[0]+(-0.55304086303)*x[1]**o+(0.920204449879)*x[1]+(0.143165855157)*x[2]**o+(-0.773684620462)*x[2]
-        arg[1,4]=(0.795913131087)*x[0]**o+(0.653826129199)*x[0]+(-0.585562760813)*x[1]**o+(0.274083108918)*x[1]+(-0.165275654116)*x[2]**o+(0.358678758212)*x[2]
-        arg[2,0]=(-0.0699685857843)*x[0]**o+(-0.42922435931)*x[0]+(-0.0494308981938)*x[1]**o+(-0.956597829176)*x[1]+(-0.912941305307)*x[2]**o+(0.214777332562)*x[2]
-        arg[2,1]=(-0.900983338173)*x[0]**o+(-0.779729884378)*x[0]+(-0.860100306508)*x[1]**o+(0.14211537281)*x[1]+(-0.984439938285)*x[2]**o+(-0.549987779842)*x[2]
-        arg[2,2]=(0.801489512389)*x[0]**o+(0.896468923826)*x[0]+(-0.155737972887)*x[1]**o+(0.639864330477)*x[1]+(0.798598705038)*x[2]**o+(-0.863019041525)*x[2]
-        arg[2,3]=(-0.453612136504)*x[0]**o+(0.522662491688)*x[0]+(-0.463058076486)*x[1]**o+(0.398018809499)*x[1]+(-0.612044961611)*x[2]**o+(-0.481951883217)*x[2]
-        arg[2,4]=(-0.0739336519425)*x[0]**o+(-0.241753740154)*x[0]+(0.0176292058898)*x[1]**o+(0.435641132809)*x[1]+(-0.0592828584976)*x[2]**o+(0.430115620801)*x[2]
-        arg[3,0]=(0.604784358152)*x[0]**o+(-0.817214179503)*x[0]+(-0.423104272008)*x[1]**o+(0.287787881773)*x[1]+(0.678036469241)*x[2]**o+(0.578347129563)*x[2]
-        arg[3,1]=(0.362390778598)*x[0]**o+(-0.389066580119)*x[0]+(-0.934087580396)*x[1]**o+(0.907587485226)*x[1]+(-0.902083043406)*x[2]**o+(0.904707538314)*x[2]
-        arg[3,2]=(0.862463207465)*x[0]**o+(0.904923219336)*x[0]+(0.421361696042)*x[1]**o+(-0.779329196171)*x[1]+(0.059521522394)*x[2]**o+(-0.744510067387)*x[2]
-        arg[3,3]=(0.412029226851)*x[0]**o+(-0.649730143511)*x[0]+(0.579628017001)*x[1]**o+(-0.949180147129)*x[1]+(-0.073016492309)*x[2]**o+(0.666554170757)*x[2]
-        arg[3,4]=(-0.700401396504)*x[0]**o+(-0.89194120812)*x[0]+(0.592387042213)*x[1]**o+(-0.906632787891)*x[1]+(-0.486072860812)*x[2]**o+(-0.505386176523)*x[2]
-        ref[0,0]=(-1.37839469474)*(1+2.*(dim-1.)/(o+1.))+(-0.576522401184)*dim
-        ref[0,1]=(-0.554246331386)*(1+2.*(dim-1.)/(o+1.))+(1.78151509727)*dim
-        ref[0,2]=(0.868378304829)*(1+2.*(dim-1.)/(o+1.))+(1.08442313082)*dim
-        ref[0,3]=(1.26393239235)*(1+2.*(dim-1.)/(o+1.))+(-0.0795617830385)*dim
-        ref[0,4]=(-0.85961758135)*(1+2.*(dim-1.)/(o+1.))+(1.31579082344)*dim
-        ref[1,0]=(-0.357241787368)*(1+2.*(dim-1.)/(o+1.))+(-0.881834286676)*dim
-        ref[1,1]=(0.436035520821)*(1+2.*(dim-1.)/(o+1.))+(-0.847458029746)*dim
-        ref[1,2]=(-0.40046241967)*(1+2.*(dim-1.)/(o+1.))+(-0.134361278462)*dim
-        ref[1,3]=(-0.459433027279)*(1+2.*(dim-1.)/(o+1.))+(-0.0373754969011)*dim
-        ref[1,4]=(0.0450747161574)*(1+2.*(dim-1.)/(o+1.))+(1.28658799633)*dim
-        ref[2,0]=(-1.03234078929)*(1+2.*(dim-1.)/(o+1.))+(-1.17104485592)*dim
-        ref[2,1]=(-2.74552358297)*(1+2.*(dim-1.)/(o+1.))+(-1.18760229141)*dim
-        ref[2,2]=(1.44435024454)*(1+2.*(dim-1.)/(o+1.))+(0.673314212777)*dim
-        ref[2,3]=(-1.5287151746)*(1+2.*(dim-1.)/(o+1.))+(0.43872941797)*dim
-        ref[2,4]=(-0.11558730455)*(1+2.*(dim-1.)/(o+1.))+(0.624003013456)*dim
-        ref[3,0]=(0.859716555385)*(1+2.*(dim-1.)/(o+1.))+(0.0489208318321)*dim
-        ref[3,1]=(-1.4737798452)*(1+2.*(dim-1.)/(o+1.))+(1.42322844342)*dim
-        ref[3,2]=(1.3433464259)*(1+2.*(dim-1.)/(o+1.))+(-0.618916044222)*dim
-        ref[3,3]=(0.918640751542)*(1+2.*(dim-1.)/(o+1.))+(-0.932356119883)*dim
-        ref[3,4]=(-0.594087215103)*(1+2.*(dim-1.)/(o+1.))+(-2.30396017253)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.662707930283)*x[0]**o+(0.625512077969)*x[0]+(-0.222208840922)*x[1]**o+(0.374614317804)*x[1]
-        arg[0,0,1]=(0.685952252808)*x[0]**o+(-0.88219802797)*x[0]+(-0.948918831634)*x[1]**o+(-0.00615202896776)*x[1]
-        arg[0,1,0]=(-0.555231206657)*x[0]**o+(0.997112425959)*x[0]+(-0.186247870511)*x[1]**o+(-0.0658892046229)*x[1]
-        arg[0,1,1]=(-0.735288285178)*x[0]**o+(0.941234848614)*x[0]+(-0.307761737256)*x[1]**o+(0.933293069433)*x[1]
-        arg[1,0,0]=(-0.618191337825)*x[0]**o+(-0.12930895166)*x[0]+(0.76213325083)*x[1]**o+(-0.744049403156)*x[1]
-        arg[1,0,1]=(-0.793412570981)*x[0]**o+(0.533175323401)*x[0]+(-0.87398581932)*x[1]**o+(-0.279651754725)*x[1]
-        arg[1,1,0]=(-0.0654077907694)*x[0]**o+(0.239040458488)*x[0]+(0.730639927837)*x[1]**o+(0.805020533329)*x[1]
-        arg[1,1,1]=(-0.560195748542)*x[0]**o+(-0.265389430135)*x[0]+(-0.295142324741)*x[1]**o+(-0.929699771024)*x[1]
-        arg[2,0,0]=(0.935760865577)*x[0]**o+(-0.332458843131)*x[0]+(0.257302695187)*x[1]**o+(-0.347547927033)*x[1]
-        arg[2,0,1]=(-0.245770653276)*x[0]**o+(0.126945988409)*x[0]+(0.302793434995)*x[1]**o+(-0.997483200172)*x[1]
-        arg[2,1,0]=(0.523494364951)*x[0]**o+(-0.323782740449)*x[0]+(-0.563752593454)*x[1]**o+(-0.358325752838)*x[1]
-        arg[2,1,1]=(-0.506330114515)*x[0]**o+(-0.733234050567)*x[0]+(0.734774667778)*x[1]**o+(0.795264566776)*x[1]
-        arg[3,0,0]=(-0.21258295235)*x[0]**o+(-0.929331330718)*x[0]+(-0.546061847742)*x[1]**o+(0.0613931491065)*x[1]
-        arg[3,0,1]=(-0.357847946656)*x[0]**o+(-0.133795684508)*x[0]+(-0.796646028688)*x[1]**o+(0.875795801429)*x[1]
-        arg[3,1,0]=(0.923717804039)*x[0]**o+(-0.176266633621)*x[0]+(-0.605892867534)*x[1]**o+(0.633377612365)*x[1]
-        arg[3,1,1]=(0.729025508129)*x[0]**o+(0.412034955257)*x[0]+(0.0933054864485)*x[1]**o+(0.386019085532)*x[1]
-        arg[4,0,0]=(-0.0705524918008)*x[0]**o+(-0.869605321304)*x[0]+(0.244351267755)*x[1]**o+(0.898883388102)*x[1]
-        arg[4,0,1]=(-0.453297333327)*x[0]**o+(-0.67824185123)*x[0]+(0.0497322840245)*x[1]**o+(0.581677879069)*x[1]
-        arg[4,1,0]=(0.343975006358)*x[0]**o+(0.724084357103)*x[0]+(-0.186292335362)*x[1]**o+(-0.257997075018)*x[1]
-        arg[4,1,1]=(-0.389731923798)*x[0]**o+(0.0949155578616)*x[0]+(-0.298428138752)*x[1]**o+(0.819510069666)*x[1]
-        arg[5,0,0]=(0.827670169513)*x[0]**o+(-0.584607978668)*x[0]+(0.669056948658)*x[1]**o+(-0.393158541985)*x[1]
-        arg[5,0,1]=(-0.471551968206)*x[0]**o+(-0.339964831396)*x[0]+(0.354554393554)*x[1]**o+(-0.334773591957)*x[1]
-        arg[5,1,0]=(0.113562904864)*x[0]**o+(-0.775045505123)*x[0]+(0.783044874931)*x[1]**o+(0.52265843873)*x[1]
-        arg[5,1,1]=(-0.115476036205)*x[0]**o+(-0.290822012728)*x[0]+(-0.398510477854)*x[1]**o+(0.398737205542)*x[1]
-        ref[0,0,0]=(0.440499089362)*(1+2.*(dim-1.)/(o+1.))+(1.00012639577)*dim
-        ref[0,0,1]=(-0.262966578826)*(1+2.*(dim-1.)/(o+1.))+(-0.888350056938)*dim
-        ref[0,1,0]=(-0.741479077167)*(1+2.*(dim-1.)/(o+1.))+(0.931223221336)*dim
-        ref[0,1,1]=(-1.04305002243)*(1+2.*(dim-1.)/(o+1.))+(1.87452791805)*dim
-        ref[1,0,0]=(0.143941913005)*(1+2.*(dim-1.)/(o+1.))+(-0.873358354816)*dim
-        ref[1,0,1]=(-1.6673983903)*(1+2.*(dim-1.)/(o+1.))+(0.253523568676)*dim
-        ref[1,1,0]=(0.665232137068)*(1+2.*(dim-1.)/(o+1.))+(1.04406099182)*dim
-        ref[1,1,1]=(-0.855338073283)*(1+2.*(dim-1.)/(o+1.))+(-1.19508920116)*dim
-        ref[2,0,0]=(1.19306356076)*(1+2.*(dim-1.)/(o+1.))+(-0.680006770164)*dim
-        ref[2,0,1]=(0.0570227817187)*(1+2.*(dim-1.)/(o+1.))+(-0.870537211764)*dim
-        ref[2,1,0]=(-0.0402582285028)*(1+2.*(dim-1.)/(o+1.))+(-0.682108493287)*dim
-        ref[2,1,1]=(0.228444553263)*(1+2.*(dim-1.)/(o+1.))+(0.0620305162089)*dim
-        ref[3,0,0]=(-0.758644800093)*(1+2.*(dim-1.)/(o+1.))+(-0.867938181611)*dim
-        ref[3,0,1]=(-1.15449397534)*(1+2.*(dim-1.)/(o+1.))+(0.742000116921)*dim
-        ref[3,1,0]=(0.317824936505)*(1+2.*(dim-1.)/(o+1.))+(0.457110978744)*dim
-        ref[3,1,1]=(0.822330994578)*(1+2.*(dim-1.)/(o+1.))+(0.798054040789)*dim
-        ref[4,0,0]=(0.173798775954)*(1+2.*(dim-1.)/(o+1.))+(0.0292780667983)*dim
-        ref[4,0,1]=(-0.403565049303)*(1+2.*(dim-1.)/(o+1.))+(-0.0965639721601)*dim
-        ref[4,1,0]=(0.157682670995)*(1+2.*(dim-1.)/(o+1.))+(0.466087282085)*dim
-        ref[4,1,1]=(-0.68816006255)*(1+2.*(dim-1.)/(o+1.))+(0.914425627528)*dim
-        ref[5,0,0]=(1.49672711817)*(1+2.*(dim-1.)/(o+1.))+(-0.977766520654)*dim
-        ref[5,0,1]=(-0.116997574651)*(1+2.*(dim-1.)/(o+1.))+(-0.674738423353)*dim
-        ref[5,1,0]=(0.896607779795)*(1+2.*(dim-1.)/(o+1.))+(-0.252387066394)*dim
-        ref[5,1,1]=(-0.513986514058)*(1+2.*(dim-1.)/(o+1.))+(0.107915192814)*dim
-      else:
-        arg[0,0,0]=(-0.418671467289)*x[0]**o+(0.498387164484)*x[0]+(0.208896299314)*x[1]**o+(-0.643038678771)*x[1]+(-0.85475466439)*x[2]**o+(0.59586368009)*x[2]
-        arg[0,0,1]=(0.149229891253)*x[0]**o+(0.229836799955)*x[0]+(0.557946253001)*x[1]**o+(-0.434223003739)*x[1]+(-0.250979831671)*x[2]**o+(0.762582320269)*x[2]
-        arg[0,1,0]=(-0.950902166094)*x[0]**o+(-0.312913424444)*x[0]+(-0.573887973428)*x[1]**o+(-0.372485255069)*x[1]+(-0.18228472562)*x[2]**o+(-0.566679093436)*x[2]
-        arg[0,1,1]=(-0.191769651257)*x[0]**o+(-0.344504306057)*x[0]+(0.355926399715)*x[1]**o+(-0.721341598375)*x[1]+(0.362401271289)*x[2]**o+(0.601351093654)*x[2]
-        arg[1,0,0]=(-0.375572370375)*x[0]**o+(-0.532723139333)*x[0]+(-0.738166755424)*x[1]**o+(0.785506757134)*x[1]+(0.192667976423)*x[2]**o+(-0.06534893872)*x[2]
-        arg[1,0,1]=(-0.353750712453)*x[0]**o+(0.401872866285)*x[0]+(-0.747783222746)*x[1]**o+(0.663116752574)*x[1]+(-0.162954382466)*x[2]**o+(0.318112656687)*x[2]
-        arg[1,1,0]=(-0.711345828912)*x[0]**o+(0.764701438614)*x[0]+(-0.232576947703)*x[1]**o+(-0.50541791533)*x[1]+(0.604603682696)*x[2]**o+(0.498828792648)*x[2]
-        arg[1,1,1]=(-0.72474879447)*x[0]**o+(0.888266999605)*x[0]+(0.639903282531)*x[1]**o+(-0.777435844156)*x[1]+(-0.0814738680964)*x[2]**o+(-0.0135286853237)*x[2]
-        arg[2,0,0]=(0.839793308998)*x[0]**o+(0.374051014226)*x[0]+(0.594653957466)*x[1]**o+(-0.962352782345)*x[1]+(0.888632514336)*x[2]**o+(0.491195067464)*x[2]
-        arg[2,0,1]=(-0.827615661598)*x[0]**o+(0.675227575488)*x[0]+(-0.93068580658)*x[1]**o+(0.694434337954)*x[1]+(0.3583179263)*x[2]**o+(0.775147111187)*x[2]
-        arg[2,1,0]=(-0.772656999491)*x[0]**o+(-0.464476706435)*x[0]+(0.569832694977)*x[1]**o+(0.500517676542)*x[1]+(-0.272153062279)*x[2]**o+(-0.398436498506)*x[2]
-        arg[2,1,1]=(-0.3065198839)*x[0]**o+(-0.454353346315)*x[0]+(-0.539448433869)*x[1]**o+(0.776950547078)*x[1]+(-0.987178147402)*x[2]**o+(0.368935549126)*x[2]
-        arg[3,0,0]=(-0.516131622594)*x[0]**o+(-0.680922252714)*x[0]+(0.304951059501)*x[1]**o+(-0.236361364379)*x[1]+(-0.37983306233)*x[2]**o+(0.693426329316)*x[2]
-        arg[3,0,1]=(0.85094983056)*x[0]**o+(-0.356782375867)*x[0]+(0.362116478047)*x[1]**o+(0.269126381543)*x[1]+(0.950254707197)*x[2]**o+(0.592028802301)*x[2]
-        arg[3,1,0]=(-0.17721437307)*x[0]**o+(-0.127432965766)*x[0]+(-0.754975923735)*x[1]**o+(0.755938625221)*x[1]+(0.776393089777)*x[2]**o+(0.913028629874)*x[2]
-        arg[3,1,1]=(-0.779840479711)*x[0]**o+(0.432392796542)*x[0]+(0.0457670482312)*x[1]**o+(0.493363120993)*x[1]+(-0.290308698356)*x[2]**o+(0.263565329052)*x[2]
-        arg[4,0,0]=(-0.594371032991)*x[0]**o+(0.673573089348)*x[0]+(0.0301238273919)*x[1]**o+(-0.900766544194)*x[1]+(0.937125579182)*x[2]**o+(-0.360512287398)*x[2]
-        arg[4,0,1]=(-0.187561420369)*x[0]**o+(-0.727058667406)*x[0]+(0.643904893485)*x[1]**o+(0.547358609515)*x[1]+(-0.810276689361)*x[2]**o+(0.347967967049)*x[2]
-        arg[4,1,0]=(0.0261452776327)*x[0]**o+(0.630125453041)*x[0]+(0.884509651558)*x[1]**o+(-0.580251885597)*x[1]+(0.141608918047)*x[2]**o+(0.417140237181)*x[2]
-        arg[4,1,1]=(0.943149763428)*x[0]**o+(0.0414421588123)*x[0]+(-0.453944232191)*x[1]**o+(0.817963360891)*x[1]+(-0.0132464046434)*x[2]**o+(-0.247024507218)*x[2]
-        arg[5,0,0]=(0.993356103007)*x[0]**o+(-0.604991443085)*x[0]+(-0.0141942193536)*x[1]**o+(-0.467982818195)*x[1]+(0.907608332852)*x[2]**o+(-0.918494340721)*x[2]
-        arg[5,0,1]=(0.782079295393)*x[0]**o+(0.0125642236587)*x[0]+(-0.512764292821)*x[1]**o+(-0.0699705327379)*x[1]+(0.141341885735)*x[2]**o+(0.420508183565)*x[2]
-        arg[5,1,0]=(-0.835665486427)*x[0]**o+(-0.536850925449)*x[0]+(-0.0958499285885)*x[1]**o+(-0.541119926637)*x[1]+(0.341886033336)*x[2]**o+(-0.772823771771)*x[2]
-        arg[5,1,1]=(-0.391737530391)*x[0]**o+(-0.160045087084)*x[0]+(-0.984350699381)*x[1]**o+(0.303782477449)*x[1]+(-0.279906615513)*x[2]**o+(-0.690872289955)*x[2]
-        ref[0,0,0]=(-1.06452983237)*(1+2.*(dim-1.)/(o+1.))+(0.451212165803)*dim
-        ref[0,0,1]=(0.456196312583)*(1+2.*(dim-1.)/(o+1.))+(0.558196116486)*dim
-        ref[0,1,0]=(-1.70707486514)*(1+2.*(dim-1.)/(o+1.))+(-1.25207777295)*dim
-        ref[0,1,1]=(0.526558019747)*(1+2.*(dim-1.)/(o+1.))+(-0.464494810779)*dim
-        ref[1,0,0]=(-0.921071149376)*(1+2.*(dim-1.)/(o+1.))+(0.187434679081)*dim
-        ref[1,0,1]=(-1.26448831766)*(1+2.*(dim-1.)/(o+1.))+(1.38310227555)*dim
-        ref[1,1,0]=(-0.339319093919)*(1+2.*(dim-1.)/(o+1.))+(0.758112315932)*dim
-        ref[1,1,1]=(-0.166319380035)*(1+2.*(dim-1.)/(o+1.))+(0.0973024701251)*dim
-        ref[2,0,0]=(2.3230797808)*(1+2.*(dim-1.)/(o+1.))+(-0.0971067006546)*dim
-        ref[2,0,1]=(-1.39998354188)*(1+2.*(dim-1.)/(o+1.))+(2.14480902463)*dim
-        ref[2,1,0]=(-0.474977366793)*(1+2.*(dim-1.)/(o+1.))+(-0.362395528399)*dim
-        ref[2,1,1]=(-1.83314646517)*(1+2.*(dim-1.)/(o+1.))+(0.69153274989)*dim
-        ref[3,0,0]=(-0.591013625423)*(1+2.*(dim-1.)/(o+1.))+(-0.223857287777)*dim
-        ref[3,0,1]=(2.1633210158)*(1+2.*(dim-1.)/(o+1.))+(0.504372807977)*dim
-        ref[3,1,0]=(-0.155797207029)*(1+2.*(dim-1.)/(o+1.))+(1.54153428933)*dim
-        ref[3,1,1]=(-1.02438212984)*(1+2.*(dim-1.)/(o+1.))+(1.18932124659)*dim
-        ref[4,0,0]=(0.372878373583)*(1+2.*(dim-1.)/(o+1.))+(-0.587705742243)*dim
-        ref[4,0,1]=(-0.353933216245)*(1+2.*(dim-1.)/(o+1.))+(0.168267909158)*dim
-        ref[4,1,0]=(1.05226384724)*(1+2.*(dim-1.)/(o+1.))+(0.467013804625)*dim
-        ref[4,1,1]=(0.475959126593)*(1+2.*(dim-1.)/(o+1.))+(0.612381012486)*dim
-        ref[5,0,0]=(1.88677021651)*(1+2.*(dim-1.)/(o+1.))+(-1.991468602)*dim
-        ref[5,0,1]=(0.410656888307)*(1+2.*(dim-1.)/(o+1.))+(0.363101874486)*dim
-        ref[5,1,0]=(-0.58962938168)*(1+2.*(dim-1.)/(o+1.))+(-1.85079462386)*dim
-        ref[5,1,1]=(-1.65599484529)*(1+2.*(dim-1.)/(o+1.))+(-0.54713489959)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.606358724075)*x[0]**o+(-0.6326664687)*x[0]+(-0.521101256804)*x[1]**o+(0.702113497865)*x[1]
-        arg[0,0,0,1]=(0.528315511137)*x[0]**o+(-0.116566989978)*x[0]+(-0.350847384045)*x[1]**o+(-0.581988878345)*x[1]
-        arg[0,0,1,0]=(0.565076347032)*x[0]**o+(0.752532782601)*x[0]+(0.00706163321089)*x[1]**o+(-0.89265244135)*x[1]
-        arg[0,0,1,1]=(-0.342136497951)*x[0]**o+(0.753153993866)*x[0]+(-0.199643944066)*x[1]**o+(0.995411752312)*x[1]
-        arg[0,0,2,0]=(0.621283193015)*x[0]**o+(0.591186318333)*x[0]+(0.880169584588)*x[1]**o+(-0.11839698224)*x[1]
-        arg[0,0,2,1]=(-0.831745199475)*x[0]**o+(0.293656166596)*x[0]+(0.0717745661823)*x[1]**o+(0.827680695965)*x[1]
-        arg[0,1,0,0]=(0.686864676707)*x[0]**o+(-0.6552976723)*x[0]+(-0.65589888943)*x[1]**o+(-0.878054891784)*x[1]
-        arg[0,1,0,1]=(-0.43359086203)*x[0]**o+(0.723819586663)*x[0]+(0.0741799035834)*x[1]**o+(0.13005305188)*x[1]
-        arg[0,1,1,0]=(-0.0605346127445)*x[0]**o+(-0.717729061173)*x[0]+(0.825539660518)*x[1]**o+(0.873033938391)*x[1]
-        arg[0,1,1,1]=(-0.286483607332)*x[0]**o+(-0.577255191498)*x[0]+(-0.328362280683)*x[1]**o+(0.499078653745)*x[1]
-        arg[0,1,2,0]=(-0.334132932545)*x[0]**o+(0.462461110225)*x[0]+(-0.932311565873)*x[1]**o+(0.934683608666)*x[1]
-        arg[0,1,2,1]=(-0.383203086272)*x[0]**o+(0.261035781624)*x[0]+(-0.203936125231)*x[1]**o+(0.657584310755)*x[1]
-        arg[0,2,0,0]=(-0.637642146695)*x[0]**o+(0.80524493224)*x[0]+(-0.139137135459)*x[1]**o+(0.947434162736)*x[1]
-        arg[0,2,0,1]=(-0.0738996477961)*x[0]**o+(0.0663360260869)*x[0]+(-0.599113718918)*x[1]**o+(-0.349514990363)*x[1]
-        arg[0,2,1,0]=(-0.0539211250603)*x[0]**o+(0.262567947534)*x[0]+(0.115386681137)*x[1]**o+(-0.68179682822)*x[1]
-        arg[0,2,1,1]=(-0.770114869627)*x[0]**o+(-0.388068404619)*x[0]+(-0.712914716647)*x[1]**o+(-0.810536809871)*x[1]
-        arg[0,2,2,0]=(0.274425895455)*x[0]**o+(0.338467327995)*x[0]+(-0.78223636363)*x[1]**o+(0.406149090351)*x[1]
-        arg[0,2,2,1]=(-0.748672361572)*x[0]**o+(0.508311939723)*x[0]+(0.875797107098)*x[1]**o+(0.0992795348726)*x[1]
-        arg[0,3,0,0]=(-0.547350688209)*x[0]**o+(0.671683747412)*x[0]+(-0.0954212965969)*x[1]**o+(0.983487887304)*x[1]
-        arg[0,3,0,1]=(0.626104338883)*x[0]**o+(-0.825311449834)*x[0]+(-0.422521614246)*x[1]**o+(0.304208397592)*x[1]
-        arg[0,3,1,0]=(0.698777992012)*x[0]**o+(0.00291670095874)*x[0]+(0.327527809646)*x[1]**o+(0.283289333886)*x[1]
-        arg[0,3,1,1]=(-0.0197648150597)*x[0]**o+(-0.902860814776)*x[0]+(0.663961228673)*x[1]**o+(0.675952386365)*x[1]
-        arg[0,3,2,0]=(0.286747814345)*x[0]**o+(-0.0641946364041)*x[0]+(0.812019228115)*x[1]**o+(-0.225698609001)*x[1]
-        arg[0,3,2,1]=(0.879776322226)*x[0]**o+(-0.251856143047)*x[0]+(-0.252403834757)*x[1]**o+(0.650790406323)*x[1]
-        arg[0,4,0,0]=(-0.58782572388)*x[0]**o+(-0.144122228965)*x[0]+(0.521707348991)*x[1]**o+(-0.0460840614459)*x[1]
-        arg[0,4,0,1]=(-0.777497837497)*x[0]**o+(-0.229011563089)*x[0]+(0.754657080443)*x[1]**o+(-0.690675521089)*x[1]
-        arg[0,4,1,0]=(0.351528557097)*x[0]**o+(0.00192986530026)*x[0]+(-0.414849484269)*x[1]**o+(-0.250205659505)*x[1]
-        arg[0,4,1,1]=(-0.814037796843)*x[0]**o+(0.00188512986627)*x[0]+(-0.810799710998)*x[1]**o+(-0.114406174711)*x[1]
-        arg[0,4,2,0]=(-0.755511212878)*x[0]**o+(-0.502206951212)*x[0]+(0.555738333365)*x[1]**o+(-0.220359547926)*x[1]
-        arg[0,4,2,1]=(0.247108894345)*x[0]**o+(0.479239235148)*x[0]+(0.663958827816)*x[1]**o+(0.220938477625)*x[1]
-        arg[1,0,0,0]=(0.818774052595)*x[0]**o+(-0.651584728881)*x[0]+(-0.780674092348)*x[1]**o+(-0.397277502644)*x[1]
-        arg[1,0,0,1]=(0.482101508249)*x[0]**o+(-0.523618202277)*x[0]+(0.806406836488)*x[1]**o+(-0.883738297664)*x[1]
-        arg[1,0,1,0]=(0.272517667346)*x[0]**o+(-0.700461889638)*x[0]+(0.280736354342)*x[1]**o+(0.182983247089)*x[1]
-        arg[1,0,1,1]=(0.566589111451)*x[0]**o+(-0.876744547538)*x[0]+(-0.934741703566)*x[1]**o+(-0.562770667492)*x[1]
-        arg[1,0,2,0]=(-0.954128714623)*x[0]**o+(0.115699770127)*x[0]+(-0.580663262426)*x[1]**o+(-0.451619694161)*x[1]
-        arg[1,0,2,1]=(0.268605150185)*x[0]**o+(-0.233415174179)*x[0]+(0.477143801066)*x[1]**o+(0.443696994244)*x[1]
-        arg[1,1,0,0]=(-0.00240846686485)*x[0]**o+(0.776336851643)*x[0]+(0.488314964094)*x[1]**o+(-0.840196476788)*x[1]
-        arg[1,1,0,1]=(-0.511732155638)*x[0]**o+(0.528782039485)*x[0]+(0.51274502262)*x[1]**o+(-0.700213610705)*x[1]
-        arg[1,1,1,0]=(0.300359000499)*x[0]**o+(0.405101876401)*x[0]+(-0.47022583299)*x[1]**o+(-0.977634916267)*x[1]
-        arg[1,1,1,1]=(-0.494482318948)*x[0]**o+(0.254112728167)*x[0]+(-0.541672595343)*x[1]**o+(-0.270970064522)*x[1]
-        arg[1,1,2,0]=(-0.586624294233)*x[0]**o+(0.629601920904)*x[0]+(-0.525092252936)*x[1]**o+(-0.44611635978)*x[1]
-        arg[1,1,2,1]=(0.716927085139)*x[0]**o+(0.700193925267)*x[0]+(0.0624921446647)*x[1]**o+(0.109485129877)*x[1]
-        arg[1,2,0,0]=(0.325729307898)*x[0]**o+(0.773432634097)*x[0]+(-0.675612597356)*x[1]**o+(-0.0554913733692)*x[1]
-        arg[1,2,0,1]=(-0.381606382262)*x[0]**o+(-0.689040382854)*x[0]+(-0.580191973398)*x[1]**o+(0.951689147387)*x[1]
-        arg[1,2,1,0]=(-0.527642403744)*x[0]**o+(-0.936915203927)*x[0]+(0.631733997289)*x[1]**o+(-0.715975680015)*x[1]
-        arg[1,2,1,1]=(0.0886898373323)*x[0]**o+(-0.0943320873915)*x[0]+(0.470668750443)*x[1]**o+(0.773832960093)*x[1]
-        arg[1,2,2,0]=(-0.727720290197)*x[0]**o+(0.422119803173)*x[0]+(0.705882951779)*x[1]**o+(-0.350801865244)*x[1]
-        arg[1,2,2,1]=(0.879335475407)*x[0]**o+(-0.0307168471577)*x[0]+(0.458578151544)*x[1]**o+(0.788796576339)*x[1]
-        arg[1,3,0,0]=(0.182143508146)*x[0]**o+(-0.680787176288)*x[0]+(0.626099489145)*x[1]**o+(-0.771540378408)*x[1]
-        arg[1,3,0,1]=(-0.578341681282)*x[0]**o+(0.856407179963)*x[0]+(0.525319425356)*x[1]**o+(0.345651851179)*x[1]
-        arg[1,3,1,0]=(-0.316652838058)*x[0]**o+(0.652409898929)*x[0]+(-0.82123442746)*x[1]**o+(-0.136868558081)*x[1]
-        arg[1,3,1,1]=(-0.755530700082)*x[0]**o+(0.354429731374)*x[0]+(-0.14330437792)*x[1]**o+(-0.221454495186)*x[1]
-        arg[1,3,2,0]=(-0.520261483769)*x[0]**o+(0.0873707179205)*x[0]+(-0.882995356682)*x[1]**o+(-0.773921687804)*x[1]
-        arg[1,3,2,1]=(0.404278952718)*x[0]**o+(0.651166017764)*x[0]+(-0.496695253747)*x[1]**o+(0.625671754182)*x[1]
-        arg[1,4,0,0]=(-0.730831539043)*x[0]**o+(0.219467989041)*x[0]+(-0.853784008431)*x[1]**o+(0.274799624897)*x[1]
-        arg[1,4,0,1]=(0.893313801855)*x[0]**o+(-0.539687651773)*x[0]+(-0.411582029239)*x[1]**o+(-0.293521483805)*x[1]
-        arg[1,4,1,0]=(0.484878049594)*x[0]**o+(0.218930293134)*x[0]+(-0.138362733141)*x[1]**o+(-0.663241354177)*x[1]
-        arg[1,4,1,1]=(-0.608410207857)*x[0]**o+(-0.0921006917331)*x[0]+(-0.885705130565)*x[1]**o+(0.103724764404)*x[1]
-        arg[1,4,2,0]=(0.150946260009)*x[0]**o+(-0.601834829203)*x[0]+(0.0141091402169)*x[1]**o+(-0.98316187826)*x[1]
-        arg[1,4,2,1]=(0.98764918249)*x[0]**o+(-0.841155365687)*x[0]+(0.185525084432)*x[1]**o+(-0.613421841538)*x[1]
-        arg[2,0,0,0]=(0.485337970037)*x[0]**o+(-0.898602108837)*x[0]+(0.847812629133)*x[1]**o+(-0.23522051021)*x[1]
-        arg[2,0,0,1]=(0.835641029366)*x[0]**o+(-0.0524661277338)*x[0]+(0.41697147238)*x[1]**o+(-0.622813671618)*x[1]
-        arg[2,0,1,0]=(0.505181088966)*x[0]**o+(-0.870141755006)*x[0]+(0.451139050304)*x[1]**o+(0.957790881903)*x[1]
-        arg[2,0,1,1]=(0.822955028051)*x[0]**o+(-0.103028201548)*x[0]+(-0.604614127349)*x[1]**o+(-0.655334670762)*x[1]
-        arg[2,0,2,0]=(-0.166647802545)*x[0]**o+(-0.466885186725)*x[0]+(0.0782333081578)*x[1]**o+(0.814414769115)*x[1]
-        arg[2,0,2,1]=(-0.980310280968)*x[0]**o+(-0.884306329761)*x[0]+(-0.895550319566)*x[1]**o+(0.160657671233)*x[1]
-        arg[2,1,0,0]=(-0.846405435483)*x[0]**o+(-0.625465093616)*x[0]+(-0.0789995975268)*x[1]**o+(-0.440180761086)*x[1]
-        arg[2,1,0,1]=(-0.949855662419)*x[0]**o+(-0.013707742372)*x[0]+(0.0397729185783)*x[1]**o+(-0.836054083952)*x[1]
-        arg[2,1,1,0]=(0.427246928002)*x[0]**o+(0.835369889909)*x[0]+(0.925300799558)*x[1]**o+(-0.328266770631)*x[1]
-        arg[2,1,1,1]=(-0.36143365614)*x[0]**o+(-0.744107540819)*x[0]+(-0.358554131639)*x[1]**o+(-0.562674543946)*x[1]
-        arg[2,1,2,0]=(0.60580594275)*x[0]**o+(0.644796993923)*x[0]+(-0.682407021927)*x[1]**o+(0.938016908061)*x[1]
-        arg[2,1,2,1]=(-0.934393274317)*x[0]**o+(-0.718420272664)*x[0]+(0.0357039032065)*x[1]**o+(0.446387943344)*x[1]
-        arg[2,2,0,0]=(-0.329105411737)*x[0]**o+(0.588935500072)*x[0]+(-0.833362483432)*x[1]**o+(0.629996961074)*x[1]
-        arg[2,2,0,1]=(0.723977530226)*x[0]**o+(0.0698430385616)*x[0]+(-0.503761809156)*x[1]**o+(0.907472279839)*x[1]
-        arg[2,2,1,0]=(-0.767545510793)*x[0]**o+(0.615094783682)*x[0]+(0.894594933703)*x[1]**o+(0.922357219049)*x[1]
-        arg[2,2,1,1]=(-0.155739055576)*x[0]**o+(0.646142299486)*x[0]+(0.865932681534)*x[1]**o+(-0.126887380871)*x[1]
-        arg[2,2,2,0]=(-0.629534320112)*x[0]**o+(-0.0904366301836)*x[0]+(0.193019806731)*x[1]**o+(-0.866080160466)*x[1]
-        arg[2,2,2,1]=(-0.714527761053)*x[0]**o+(-0.813712879405)*x[0]+(-0.291734238438)*x[1]**o+(0.232675536415)*x[1]
-        arg[2,3,0,0]=(-0.447474292879)*x[0]**o+(-0.639046887788)*x[0]+(0.159616683647)*x[1]**o+(0.564127141623)*x[1]
-        arg[2,3,0,1]=(-0.608953936619)*x[0]**o+(0.273179484103)*x[0]+(0.42693156927)*x[1]**o+(-0.983331075647)*x[1]
-        arg[2,3,1,0]=(0.855859483301)*x[0]**o+(-0.432495503925)*x[0]+(-0.67928203769)*x[1]**o+(-0.856541006702)*x[1]
-        arg[2,3,1,1]=(-0.581185594204)*x[0]**o+(0.947720323693)*x[0]+(-0.520212852628)*x[1]**o+(-0.37563221594)*x[1]
-        arg[2,3,2,0]=(0.351358492535)*x[0]**o+(0.367210525846)*x[0]+(0.97870179383)*x[1]**o+(-0.199559052968)*x[1]
-        arg[2,3,2,1]=(0.797294518541)*x[0]**o+(0.546397721552)*x[0]+(0.374121851646)*x[1]**o+(0.704436689798)*x[1]
-        arg[2,4,0,0]=(-0.756047775149)*x[0]**o+(-0.705403684825)*x[0]+(-0.662421213376)*x[1]**o+(0.390069314234)*x[1]
-        arg[2,4,0,1]=(-0.658842889869)*x[0]**o+(0.766273769822)*x[0]+(-0.779201775962)*x[1]**o+(-0.968670270742)*x[1]
-        arg[2,4,1,0]=(-0.336220564628)*x[0]**o+(-0.134745604319)*x[0]+(0.391939888428)*x[1]**o+(-0.113113999792)*x[1]
-        arg[2,4,1,1]=(-0.8345363851)*x[0]**o+(0.339223929857)*x[0]+(0.628403353717)*x[1]**o+(0.799364167182)*x[1]
-        arg[2,4,2,0]=(-0.898050446701)*x[0]**o+(-0.666373288962)*x[0]+(-0.620778021659)*x[1]**o+(-0.990359850049)*x[1]
-        arg[2,4,2,1]=(-0.933931027675)*x[0]**o+(-0.119077281033)*x[0]+(0.557313533556)*x[1]**o+(0.160336158304)*x[1]
-        arg[3,0,0,0]=(0.972462636314)*x[0]**o+(0.607913740671)*x[0]+(0.490168539257)*x[1]**o+(-0.12515921391)*x[1]
-        arg[3,0,0,1]=(0.856370886333)*x[0]**o+(-0.143225009869)*x[0]+(-0.330381845603)*x[1]**o+(-0.271958059018)*x[1]
-        arg[3,0,1,0]=(0.86742129112)*x[0]**o+(-0.0259756341823)*x[0]+(-0.0137047849942)*x[1]**o+(-0.0165444161044)*x[1]
-        arg[3,0,1,1]=(-0.445996036941)*x[0]**o+(0.247936136111)*x[0]+(-0.381484740124)*x[1]**o+(0.836678417006)*x[1]
-        arg[3,0,2,0]=(0.161387456771)*x[0]**o+(0.687533753311)*x[0]+(-0.463845417603)*x[1]**o+(0.665023823118)*x[1]
-        arg[3,0,2,1]=(0.243410612742)*x[0]**o+(-0.52431675734)*x[0]+(0.75630192488)*x[1]**o+(-0.703601557317)*x[1]
-        arg[3,1,0,0]=(0.793530689056)*x[0]**o+(0.814806726176)*x[0]+(0.582051068232)*x[1]**o+(0.692432923027)*x[1]
-        arg[3,1,0,1]=(-0.283506909465)*x[0]**o+(0.21438128538)*x[0]+(-0.327476122861)*x[1]**o+(0.990178870269)*x[1]
-        arg[3,1,1,0]=(-0.117386491827)*x[0]**o+(0.747771272481)*x[0]+(-0.439767754004)*x[1]**o+(-0.905218338639)*x[1]
-        arg[3,1,1,1]=(-0.544805647706)*x[0]**o+(-0.0484033735345)*x[0]+(0.861443439156)*x[1]**o+(-0.992086899129)*x[1]
-        arg[3,1,2,0]=(0.596208599112)*x[0]**o+(-0.276136075021)*x[0]+(0.079604120535)*x[1]**o+(0.124232758054)*x[1]
-        arg[3,1,2,1]=(0.809847641841)*x[0]**o+(0.956041370087)*x[0]+(0.65224420189)*x[1]**o+(0.565327743771)*x[1]
-        arg[3,2,0,0]=(-0.264599479107)*x[0]**o+(-0.276726556903)*x[0]+(0.577911819561)*x[1]**o+(-0.656157381756)*x[1]
-        arg[3,2,0,1]=(-0.0636193103458)*x[0]**o+(0.941482878452)*x[0]+(0.877581030494)*x[1]**o+(-0.254911385455)*x[1]
-        arg[3,2,1,0]=(-0.28083673633)*x[0]**o+(0.849095032935)*x[0]+(0.6825284068)*x[1]**o+(0.445605171749)*x[1]
-        arg[3,2,1,1]=(-0.729331034619)*x[0]**o+(0.036400895394)*x[0]+(0.365733359214)*x[1]**o+(0.0305324156609)*x[1]
-        arg[3,2,2,0]=(-0.70932226428)*x[0]**o+(0.310455571562)*x[0]+(-0.101305643894)*x[1]**o+(0.346873071627)*x[1]
-        arg[3,2,2,1]=(0.712053329488)*x[0]**o+(-0.845042122758)*x[0]+(0.909517101069)*x[1]**o+(-0.163109058477)*x[1]
-        arg[3,3,0,0]=(0.451744730688)*x[0]**o+(0.308756227526)*x[0]+(0.13963307493)*x[1]**o+(-0.945789640023)*x[1]
-        arg[3,3,0,1]=(-0.852609785834)*x[0]**o+(-0.821513824231)*x[0]+(-0.544690113726)*x[1]**o+(0.335547843106)*x[1]
-        arg[3,3,1,0]=(0.337600834432)*x[0]**o+(-0.170181468776)*x[0]+(-0.302415145845)*x[1]**o+(0.985425450212)*x[1]
-        arg[3,3,1,1]=(-0.638242591048)*x[0]**o+(-0.0221442303187)*x[0]+(0.421311946694)*x[1]**o+(-0.43495081316)*x[1]
-        arg[3,3,2,0]=(-0.734168622382)*x[0]**o+(-0.889300572069)*x[0]+(0.808161580285)*x[1]**o+(-0.526348332439)*x[1]
-        arg[3,3,2,1]=(0.998918324168)*x[0]**o+(-0.953729666152)*x[0]+(0.665101882861)*x[1]**o+(-0.581118145725)*x[1]
-        arg[3,4,0,0]=(-0.251226888098)*x[0]**o+(-0.711615999514)*x[0]+(0.291022154479)*x[1]**o+(0.0772744442604)*x[1]
-        arg[3,4,0,1]=(0.162379537091)*x[0]**o+(0.363750962136)*x[0]+(0.635943839083)*x[1]**o+(0.513856953389)*x[1]
-        arg[3,4,1,0]=(-0.99052354199)*x[0]**o+(0.289202668813)*x[0]+(-0.759078503012)*x[1]**o+(-0.588801682903)*x[1]
-        arg[3,4,1,1]=(-0.942278699306)*x[0]**o+(0.476003512559)*x[0]+(0.873920293292)*x[1]**o+(0.867413991424)*x[1]
-        arg[3,4,2,0]=(-0.602386702281)*x[0]**o+(0.694432164577)*x[0]+(0.367008950869)*x[1]**o+(-0.803331549449)*x[1]
-        arg[3,4,2,1]=(-0.00204465287104)*x[0]**o+(-0.697572466685)*x[0]+(-0.84755978799)*x[1]**o+(-0.758946055726)*x[1]
-        ref[0,0,0,0]=(0.0852574672711)*(1+2.*(dim-1.)/(o+1.))+(0.069447029165)*dim
-        ref[0,0,0,1]=(0.177468127092)*(1+2.*(dim-1.)/(o+1.))+(-0.698555868323)*dim
-        ref[0,0,1,0]=(0.572137980243)*(1+2.*(dim-1.)/(o+1.))+(-0.140119658749)*dim
-        ref[0,0,1,1]=(-0.541780442017)*(1+2.*(dim-1.)/(o+1.))+(1.74856574618)*dim
-        ref[0,0,2,0]=(1.5014527776)*(1+2.*(dim-1.)/(o+1.))+(0.472789336092)*dim
-        ref[0,0,2,1]=(-0.759970633293)*(1+2.*(dim-1.)/(o+1.))+(1.12133686256)*dim
-        ref[0,1,0,0]=(0.030965787278)*(1+2.*(dim-1.)/(o+1.))+(-1.53335256408)*dim
-        ref[0,1,0,1]=(-0.359410958446)*(1+2.*(dim-1.)/(o+1.))+(0.853872638544)*dim
-        ref[0,1,1,0]=(0.765005047774)*(1+2.*(dim-1.)/(o+1.))+(0.155304877218)*dim
-        ref[0,1,1,1]=(-0.614845888015)*(1+2.*(dim-1.)/(o+1.))+(-0.0781765377528)*dim
-        ref[0,1,2,0]=(-1.26644449842)*(1+2.*(dim-1.)/(o+1.))+(1.39714471889)*dim
-        ref[0,1,2,1]=(-0.587139211502)*(1+2.*(dim-1.)/(o+1.))+(0.918620092379)*dim
-        ref[0,2,0,0]=(-0.776779282155)*(1+2.*(dim-1.)/(o+1.))+(1.75267909498)*dim
-        ref[0,2,0,1]=(-0.673013366714)*(1+2.*(dim-1.)/(o+1.))+(-0.283178964276)*dim
-        ref[0,2,1,0]=(0.0614655560763)*(1+2.*(dim-1.)/(o+1.))+(-0.419228880686)*dim
-        ref[0,2,1,1]=(-1.48302958627)*(1+2.*(dim-1.)/(o+1.))+(-1.19860521449)*dim
-        ref[0,2,2,0]=(-0.507810468175)*(1+2.*(dim-1.)/(o+1.))+(0.744616418346)*dim
-        ref[0,2,2,1]=(0.127124745526)*(1+2.*(dim-1.)/(o+1.))+(0.607591474596)*dim
-        ref[0,3,0,0]=(-0.642771984806)*(1+2.*(dim-1.)/(o+1.))+(1.65517163472)*dim
-        ref[0,3,0,1]=(0.203582724637)*(1+2.*(dim-1.)/(o+1.))+(-0.521103052242)*dim
-        ref[0,3,1,0]=(1.02630580166)*(1+2.*(dim-1.)/(o+1.))+(0.286206034845)*dim
-        ref[0,3,1,1]=(0.644196413613)*(1+2.*(dim-1.)/(o+1.))+(-0.226908428411)*dim
-        ref[0,3,2,0]=(1.09876704246)*(1+2.*(dim-1.)/(o+1.))+(-0.289893245405)*dim
-        ref[0,3,2,1]=(0.627372487469)*(1+2.*(dim-1.)/(o+1.))+(0.398934263276)*dim
-        ref[0,4,0,0]=(-0.0661183748894)*(1+2.*(dim-1.)/(o+1.))+(-0.190206290411)*dim
-        ref[0,4,0,1]=(-0.022840757054)*(1+2.*(dim-1.)/(o+1.))+(-0.919687084178)*dim
-        ref[0,4,1,0]=(-0.063320927172)*(1+2.*(dim-1.)/(o+1.))+(-0.248275794205)*dim
-        ref[0,4,1,1]=(-1.62483750784)*(1+2.*(dim-1.)/(o+1.))+(-0.112521044845)*dim
-        ref[0,4,2,0]=(-0.199772879513)*(1+2.*(dim-1.)/(o+1.))+(-0.722566499138)*dim
-        ref[0,4,2,1]=(0.911067722161)*(1+2.*(dim-1.)/(o+1.))+(0.700177712774)*dim
-        ref[1,0,0,0]=(0.0380999602468)*(1+2.*(dim-1.)/(o+1.))+(-1.04886223152)*dim
-        ref[1,0,0,1]=(1.28850834474)*(1+2.*(dim-1.)/(o+1.))+(-1.40735649994)*dim
-        ref[1,0,1,0]=(0.553254021688)*(1+2.*(dim-1.)/(o+1.))+(-0.517478642549)*dim
-        ref[1,0,1,1]=(-0.368152592115)*(1+2.*(dim-1.)/(o+1.))+(-1.43951521503)*dim
-        ref[1,0,2,0]=(-1.53479197705)*(1+2.*(dim-1.)/(o+1.))+(-0.335919924034)*dim
-        ref[1,0,2,1]=(0.745748951251)*(1+2.*(dim-1.)/(o+1.))+(0.210281820065)*dim
-        ref[1,1,0,0]=(0.485906497229)*(1+2.*(dim-1.)/(o+1.))+(-0.0638596251453)*dim
-        ref[1,1,0,1]=(0.00101286698233)*(1+2.*(dim-1.)/(o+1.))+(-0.17143157122)*dim
-        ref[1,1,1,0]=(-0.169866832491)*(1+2.*(dim-1.)/(o+1.))+(-0.572533039866)*dim
-        ref[1,1,1,1]=(-1.03615491429)*(1+2.*(dim-1.)/(o+1.))+(-0.016857336355)*dim
-        ref[1,1,2,0]=(-1.11171654717)*(1+2.*(dim-1.)/(o+1.))+(0.183485561125)*dim
-        ref[1,1,2,1]=(0.779419229804)*(1+2.*(dim-1.)/(o+1.))+(0.809679055143)*dim
-        ref[1,2,0,0]=(-0.349883289458)*(1+2.*(dim-1.)/(o+1.))+(0.717941260728)*dim
-        ref[1,2,0,1]=(-0.96179835566)*(1+2.*(dim-1.)/(o+1.))+(0.262648764533)*dim
-        ref[1,2,1,0]=(0.104091593546)*(1+2.*(dim-1.)/(o+1.))+(-1.65289088394)*dim
-        ref[1,2,1,1]=(0.559358587775)*(1+2.*(dim-1.)/(o+1.))+(0.679500872701)*dim
-        ref[1,2,2,0]=(-0.0218373384179)*(1+2.*(dim-1.)/(o+1.))+(0.0713179379289)*dim
-        ref[1,2,2,1]=(1.33791362695)*(1+2.*(dim-1.)/(o+1.))+(0.758079729181)*dim
-        ref[1,3,0,0]=(0.808242997292)*(1+2.*(dim-1.)/(o+1.))+(-1.4523275547)*dim
-        ref[1,3,0,1]=(-0.0530222559262)*(1+2.*(dim-1.)/(o+1.))+(1.20205903114)*dim
-        ref[1,3,1,0]=(-1.13788726552)*(1+2.*(dim-1.)/(o+1.))+(0.515541340848)*dim
-        ref[1,3,1,1]=(-0.898835078002)*(1+2.*(dim-1.)/(o+1.))+(0.132975236188)*dim
-        ref[1,3,2,0]=(-1.40325684045)*(1+2.*(dim-1.)/(o+1.))+(-0.686550969884)*dim
-        ref[1,3,2,1]=(-0.0924163010291)*(1+2.*(dim-1.)/(o+1.))+(1.27683777195)*dim
-        ref[1,4,0,0]=(-1.58461554747)*(1+2.*(dim-1.)/(o+1.))+(0.494267613937)*dim
-        ref[1,4,0,1]=(0.481731772616)*(1+2.*(dim-1.)/(o+1.))+(-0.833209135578)*dim
-        ref[1,4,1,0]=(0.346515316453)*(1+2.*(dim-1.)/(o+1.))+(-0.444311061043)*dim
-        ref[1,4,1,1]=(-1.49411533842)*(1+2.*(dim-1.)/(o+1.))+(0.0116240726713)*dim
-        ref[1,4,2,0]=(0.165055400226)*(1+2.*(dim-1.)/(o+1.))+(-1.58499670746)*dim
-        ref[1,4,2,1]=(1.17317426692)*(1+2.*(dim-1.)/(o+1.))+(-1.45457720722)*dim
-        ref[2,0,0,0]=(1.33315059917)*(1+2.*(dim-1.)/(o+1.))+(-1.13382261905)*dim
-        ref[2,0,0,1]=(1.25261250175)*(1+2.*(dim-1.)/(o+1.))+(-0.675279799352)*dim
-        ref[2,0,1,0]=(0.95632013927)*(1+2.*(dim-1.)/(o+1.))+(0.0876491268976)*dim
-        ref[2,0,1,1]=(0.218340900702)*(1+2.*(dim-1.)/(o+1.))+(-0.75836287231)*dim
-        ref[2,0,2,0]=(-0.0884144943875)*(1+2.*(dim-1.)/(o+1.))+(0.34752958239)*dim
-        ref[2,0,2,1]=(-1.87586060053)*(1+2.*(dim-1.)/(o+1.))+(-0.723648658528)*dim
-        ref[2,1,0,0]=(-0.92540503301)*(1+2.*(dim-1.)/(o+1.))+(-1.0656458547)*dim
-        ref[2,1,0,1]=(-0.910082743841)*(1+2.*(dim-1.)/(o+1.))+(-0.849761826324)*dim
-        ref[2,1,1,0]=(1.35254772756)*(1+2.*(dim-1.)/(o+1.))+(0.507103119278)*dim
-        ref[2,1,1,1]=(-0.719987787779)*(1+2.*(dim-1.)/(o+1.))+(-1.30678208477)*dim
-        ref[2,1,2,0]=(-0.0766010791773)*(1+2.*(dim-1.)/(o+1.))+(1.58281390198)*dim
-        ref[2,1,2,1]=(-0.89868937111)*(1+2.*(dim-1.)/(o+1.))+(-0.27203232932)*dim
-        ref[2,2,0,0]=(-1.16246789517)*(1+2.*(dim-1.)/(o+1.))+(1.21893246115)*dim
-        ref[2,2,0,1]=(0.22021572107)*(1+2.*(dim-1.)/(o+1.))+(0.977315318401)*dim
-        ref[2,2,1,0]=(0.12704942291)*(1+2.*(dim-1.)/(o+1.))+(1.53745200273)*dim
-        ref[2,2,1,1]=(0.710193625958)*(1+2.*(dim-1.)/(o+1.))+(0.519254918615)*dim
-        ref[2,2,2,0]=(-0.43651451338)*(1+2.*(dim-1.)/(o+1.))+(-0.956516790649)*dim
-        ref[2,2,2,1]=(-1.00626199949)*(1+2.*(dim-1.)/(o+1.))+(-0.581037342991)*dim
-        ref[2,3,0,0]=(-0.287857609232)*(1+2.*(dim-1.)/(o+1.))+(-0.0749197461649)*dim
-        ref[2,3,0,1]=(-0.182022367349)*(1+2.*(dim-1.)/(o+1.))+(-0.710151591543)*dim
-        ref[2,3,1,0]=(0.176577445611)*(1+2.*(dim-1.)/(o+1.))+(-1.28903651063)*dim
-        ref[2,3,1,1]=(-1.10139844683)*(1+2.*(dim-1.)/(o+1.))+(0.572088107754)*dim
-        ref[2,3,2,0]=(1.33006028637)*(1+2.*(dim-1.)/(o+1.))+(0.167651472878)*dim
-        ref[2,3,2,1]=(1.17141637019)*(1+2.*(dim-1.)/(o+1.))+(1.25083441135)*dim
-        ref[2,4,0,0]=(-1.41846898852)*(1+2.*(dim-1.)/(o+1.))+(-0.315334370591)*dim
-        ref[2,4,0,1]=(-1.43804466583)*(1+2.*(dim-1.)/(o+1.))+(-0.20239650092)*dim
-        ref[2,4,1,0]=(0.0557193237997)*(1+2.*(dim-1.)/(o+1.))+(-0.247859604111)*dim
-        ref[2,4,1,1]=(-0.206133031383)*(1+2.*(dim-1.)/(o+1.))+(1.13858809704)*dim
-        ref[2,4,2,0]=(-1.51882846836)*(1+2.*(dim-1.)/(o+1.))+(-1.65673313901)*dim
-        ref[2,4,2,1]=(-0.376617494119)*(1+2.*(dim-1.)/(o+1.))+(0.041258877271)*dim
-        ref[3,0,0,0]=(1.46263117557)*(1+2.*(dim-1.)/(o+1.))+(0.482754526761)*dim
-        ref[3,0,0,1]=(0.52598904073)*(1+2.*(dim-1.)/(o+1.))+(-0.415183068887)*dim
-        ref[3,0,1,0]=(0.853716506126)*(1+2.*(dim-1.)/(o+1.))+(-0.0425200502867)*dim
-        ref[3,0,1,1]=(-0.827480777065)*(1+2.*(dim-1.)/(o+1.))+(1.08461455312)*dim
-        ref[3,0,2,0]=(-0.302457960832)*(1+2.*(dim-1.)/(o+1.))+(1.35255757643)*dim
-        ref[3,0,2,1]=(0.999712537623)*(1+2.*(dim-1.)/(o+1.))+(-1.22791831466)*dim
-        ref[3,1,0,0]=(1.37558175729)*(1+2.*(dim-1.)/(o+1.))+(1.5072396492)*dim
-        ref[3,1,0,1]=(-0.610983032326)*(1+2.*(dim-1.)/(o+1.))+(1.20456015565)*dim
-        ref[3,1,1,0]=(-0.557154245831)*(1+2.*(dim-1.)/(o+1.))+(-0.157447066158)*dim
-        ref[3,1,1,1]=(0.316637791451)*(1+2.*(dim-1.)/(o+1.))+(-1.04049027266)*dim
-        ref[3,1,2,0]=(0.675812719647)*(1+2.*(dim-1.)/(o+1.))+(-0.151903316967)*dim
-        ref[3,1,2,1]=(1.46209184373)*(1+2.*(dim-1.)/(o+1.))+(1.52136911386)*dim
-        ref[3,2,0,0]=(0.313312340454)*(1+2.*(dim-1.)/(o+1.))+(-0.93288393866)*dim
-        ref[3,2,0,1]=(0.813961720148)*(1+2.*(dim-1.)/(o+1.))+(0.686571492997)*dim
-        ref[3,2,1,0]=(0.40169167047)*(1+2.*(dim-1.)/(o+1.))+(1.29470020468)*dim
-        ref[3,2,1,1]=(-0.363597675405)*(1+2.*(dim-1.)/(o+1.))+(0.066933311055)*dim
-        ref[3,2,2,0]=(-0.810627908174)*(1+2.*(dim-1.)/(o+1.))+(0.657328643189)*dim
-        ref[3,2,2,1]=(1.62157043056)*(1+2.*(dim-1.)/(o+1.))+(-1.00815118124)*dim
-        ref[3,3,0,0]=(0.591377805617)*(1+2.*(dim-1.)/(o+1.))+(-0.637033412497)*dim
-        ref[3,3,0,1]=(-1.39729989956)*(1+2.*(dim-1.)/(o+1.))+(-0.485965981125)*dim
-        ref[3,3,1,0]=(0.0351856885862)*(1+2.*(dim-1.)/(o+1.))+(0.815243981437)*dim
-        ref[3,3,1,1]=(-0.216930644354)*(1+2.*(dim-1.)/(o+1.))+(-0.457095043478)*dim
-        ref[3,3,2,0]=(0.0739929579029)*(1+2.*(dim-1.)/(o+1.))+(-1.41564890451)*dim
-        ref[3,3,2,1]=(1.66402020703)*(1+2.*(dim-1.)/(o+1.))+(-1.53484781188)*dim
-        ref[3,4,0,0]=(0.0397952663815)*(1+2.*(dim-1.)/(o+1.))+(-0.634341555254)*dim
-        ref[3,4,0,1]=(0.798323376174)*(1+2.*(dim-1.)/(o+1.))+(0.877607915525)*dim
-        ref[3,4,1,0]=(-1.749602045)*(1+2.*(dim-1.)/(o+1.))+(-0.29959901409)*dim
-        ref[3,4,1,1]=(-0.0683584060144)*(1+2.*(dim-1.)/(o+1.))+(1.34341750398)*dim
-        ref[3,4,2,0]=(-0.235377751413)*(1+2.*(dim-1.)/(o+1.))+(-0.108899384872)*dim
-        ref[3,4,2,1]=(-0.849604440861)*(1+2.*(dim-1.)/(o+1.))+(-1.45651852241)*dim
-      else:
-        arg[0,0,0,0]=(-0.229219068739)*x[0]**o+(0.293241016924)*x[0]+(-0.2730739542)*x[1]**o+(0.980438707356)*x[1]+(-0.712463216466)*x[2]**o+(0.201036317883)*x[2]
-        arg[0,0,0,1]=(0.626271947422)*x[0]**o+(0.379293769575)*x[0]+(-0.476378592342)*x[1]**o+(-0.0089906260934)*x[1]+(-0.433154385811)*x[2]**o+(0.126766298748)*x[2]
-        arg[0,0,1,0]=(-0.517950283035)*x[0]**o+(-0.219780986066)*x[0]+(0.345048580545)*x[1]**o+(0.116833851128)*x[1]+(-0.790641523314)*x[2]**o+(0.40506306417)*x[2]
-        arg[0,0,1,1]=(0.910924420538)*x[0]**o+(0.281102231596)*x[0]+(0.115454208619)*x[1]**o+(0.164254056171)*x[1]+(0.44960060103)*x[2]**o+(-0.14238069165)*x[2]
-        arg[0,0,2,0]=(0.86195808217)*x[0]**o+(0.775425956811)*x[0]+(0.214559021523)*x[1]**o+(0.400663063038)*x[1]+(0.995663608954)*x[2]**o+(0.228658543268)*x[2]
-        arg[0,0,2,1]=(0.9025917492)*x[0]**o+(0.643205662573)*x[0]+(-0.304382459664)*x[1]**o+(-0.653256441532)*x[1]+(0.591142459807)*x[2]**o+(-0.888899030043)*x[2]
-        arg[0,1,0,0]=(-0.874720784838)*x[0]**o+(-0.961456282274)*x[0]+(-0.954972993457)*x[1]**o+(0.00963939708746)*x[1]+(-0.884848381277)*x[2]**o+(-0.859924591622)*x[2]
-        arg[0,1,0,1]=(0.133592941787)*x[0]**o+(0.12505415793)*x[0]+(-0.872197297559)*x[1]**o+(-0.666936976734)*x[1]+(-0.540166108036)*x[2]**o+(0.739145002101)*x[2]
-        arg[0,1,1,0]=(0.543825266564)*x[0]**o+(0.167854064952)*x[0]+(-0.876426395953)*x[1]**o+(0.317538118917)*x[1]+(0.0454531201303)*x[2]**o+(0.822731343286)*x[2]
-        arg[0,1,1,1]=(0.294557050513)*x[0]**o+(0.811698886899)*x[0]+(0.906213580147)*x[1]**o+(0.47895749797)*x[1]+(-0.937617554883)*x[2]**o+(0.171907458148)*x[2]
-        arg[0,1,2,0]=(-0.843310949654)*x[0]**o+(0.766452648675)*x[0]+(-0.801151193917)*x[1]**o+(-0.373068887299)*x[1]+(-0.908043738284)*x[2]**o+(0.742278324563)*x[2]
-        arg[0,1,2,1]=(-0.83259110525)*x[0]**o+(-0.303796015231)*x[0]+(0.153727560059)*x[1]**o+(-0.848393854019)*x[1]+(0.887795931916)*x[2]**o+(0.713486413074)*x[2]
-        arg[0,2,0,0]=(-0.928603918182)*x[0]**o+(0.631213545526)*x[0]+(0.0149216054247)*x[1]**o+(0.136454313226)*x[1]+(-0.182080277504)*x[2]**o+(-0.898437757742)*x[2]
-        arg[0,2,0,1]=(0.553844129645)*x[0]**o+(0.91439079798)*x[0]+(0.260424446678)*x[1]**o+(0.786629777779)*x[1]+(-0.412353876109)*x[2]**o+(0.496953000487)*x[2]
-        arg[0,2,1,0]=(-0.48365422571)*x[0]**o+(-0.772252454664)*x[0]+(0.692592845143)*x[1]**o+(0.861992232175)*x[1]+(0.65169271692)*x[2]**o+(0.889175716524)*x[2]
-        arg[0,2,1,1]=(-0.761086015475)*x[0]**o+(-0.616528617148)*x[0]+(-0.949399556926)*x[1]**o+(-0.783355074724)*x[1]+(-0.260470660608)*x[2]**o+(-0.854537542803)*x[2]
-        arg[0,2,2,0]=(-0.812649439778)*x[0]**o+(-0.844862957855)*x[0]+(0.719928253134)*x[1]**o+(-0.892803903061)*x[1]+(-0.434753054503)*x[2]**o+(0.814188548451)*x[2]
-        arg[0,2,2,1]=(-0.831106881173)*x[0]**o+(0.893305297647)*x[0]+(-0.351357795644)*x[1]**o+(0.0318574503478)*x[1]+(0.721896657873)*x[2]**o+(-0.75215838035)*x[2]
-        arg[0,3,0,0]=(-0.868084492214)*x[0]**o+(-0.108398365838)*x[0]+(0.994384983885)*x[1]**o+(0.199445529335)*x[1]+(-0.570120483013)*x[2]**o+(0.992752456282)*x[2]
-        arg[0,3,0,1]=(-0.304553428923)*x[0]**o+(-0.589461304318)*x[0]+(-0.570142565817)*x[1]**o+(-0.858530013475)*x[1]+(0.0690574539796)*x[2]**o+(-0.0321587525658)*x[2]
-        arg[0,3,1,0]=(-0.729413026954)*x[0]**o+(-0.728248951404)*x[0]+(-0.568598599095)*x[1]**o+(0.0823012989572)*x[1]+(0.248614424573)*x[2]**o+(-0.116584878805)*x[2]
-        arg[0,3,1,1]=(0.586846538084)*x[0]**o+(-0.406933529762)*x[0]+(0.839125682244)*x[1]**o+(0.237338453386)*x[1]+(-0.953101889056)*x[2]**o+(0.164147861616)*x[2]
-        arg[0,3,2,0]=(-0.603895026116)*x[0]**o+(-0.401045478885)*x[0]+(-0.524739550832)*x[1]**o+(-0.077907095917)*x[1]+(0.535404409567)*x[2]**o+(0.745721528391)*x[2]
-        arg[0,3,2,1]=(-0.189151084147)*x[0]**o+(-0.865927541126)*x[0]+(0.55265091657)*x[1]**o+(-0.592847311104)*x[1]+(-0.467509383222)*x[2]**o+(-0.779649276678)*x[2]
-        arg[0,4,0,0]=(-0.564283606569)*x[0]**o+(-0.588029571592)*x[0]+(0.544948665159)*x[1]**o+(0.140885576219)*x[1]+(-0.333531842397)*x[2]**o+(-0.579095398292)*x[2]
-        arg[0,4,0,1]=(-0.189127238455)*x[0]**o+(-0.693907127162)*x[0]+(0.40947793861)*x[1]**o+(-0.371098494308)*x[1]+(-0.189273002147)*x[2]**o+(-0.863169616331)*x[2]
-        arg[0,4,1,0]=(-0.929838141145)*x[0]**o+(-0.0237583231579)*x[0]+(0.721069982341)*x[1]**o+(0.0378559913864)*x[1]+(-0.354729434476)*x[2]**o+(0.486256042969)*x[2]
-        arg[0,4,1,1]=(0.349085173473)*x[0]**o+(0.398939355666)*x[0]+(-0.165772805366)*x[1]**o+(-0.532771334584)*x[1]+(-0.971868054413)*x[2]**o+(-0.38430185761)*x[2]
-        arg[0,4,2,0]=(0.0330282399287)*x[0]**o+(0.157336131691)*x[0]+(-0.232739262685)*x[1]**o+(-0.280149712596)*x[1]+(0.374058430291)*x[2]**o+(0.594113015973)*x[2]
-        arg[0,4,2,1]=(0.841740974112)*x[0]**o+(-0.454359680369)*x[0]+(-0.29970574726)*x[1]**o+(-0.234747232007)*x[1]+(0.590942390095)*x[2]**o+(-0.241807214234)*x[2]
-        arg[1,0,0,0]=(0.815585848775)*x[0]**o+(-0.915020392674)*x[0]+(-0.0246530790781)*x[1]**o+(-0.783552074981)*x[1]+(0.539847778607)*x[2]**o+(-0.239345161181)*x[2]
-        arg[1,0,0,1]=(-0.34212551354)*x[0]**o+(-0.231769108271)*x[0]+(-0.495709071836)*x[1]**o+(-0.301124823696)*x[1]+(-0.567450536966)*x[2]**o+(0.553640896859)*x[2]
-        arg[1,0,1,0]=(0.507091065517)*x[0]**o+(-0.844317985101)*x[0]+(0.488126307787)*x[1]**o+(-0.624165922596)*x[1]+(0.00960189690918)*x[2]**o+(-0.35617062688)*x[2]
-        arg[1,0,1,1]=(-0.219877421252)*x[0]**o+(-0.574843930095)*x[0]+(-0.846995760292)*x[1]**o+(-0.778496435041)*x[1]+(-0.817593097977)*x[2]**o+(0.387406829939)*x[2]
-        arg[1,0,2,0]=(-0.774922277048)*x[0]**o+(-0.238152671014)*x[0]+(-0.913770877808)*x[1]**o+(-0.737305937434)*x[1]+(-0.13977056904)*x[2]**o+(-0.0156668131016)*x[2]
-        arg[1,0,2,1]=(0.565993265911)*x[0]**o+(0.0690768496992)*x[0]+(-0.019845214223)*x[1]**o+(0.16253166701)*x[1]+(0.848117215885)*x[2]**o+(0.838075165243)*x[2]
-        arg[1,1,0,0]=(0.871499694148)*x[0]**o+(-0.640851595157)*x[0]+(-0.170827284611)*x[1]**o+(-0.855550549988)*x[1]+(0.796086141249)*x[2]**o+(-0.214410672377)*x[2]
-        arg[1,1,0,1]=(-0.903644604832)*x[0]**o+(0.0604780584681)*x[0]+(0.12800839523)*x[1]**o+(-0.594186752891)*x[1]+(0.415537334962)*x[2]**o+(0.122944611099)*x[2]
-        arg[1,1,1,0]=(-0.611432775957)*x[0]**o+(0.391078622669)*x[0]+(-0.943091949273)*x[1]**o+(0.952739057317)*x[1]+(0.205104161722)*x[2]**o+(-0.946040001739)*x[2]
-        arg[1,1,1,1]=(0.122941344579)*x[0]**o+(0.836981501711)*x[0]+(0.488970739079)*x[1]**o+(0.210062341907)*x[1]+(0.0264620393683)*x[2]**o+(-0.396386059797)*x[2]
-        arg[1,1,2,0]=(-0.782658774038)*x[0]**o+(0.00611865020069)*x[0]+(0.806802875462)*x[1]**o+(-0.504323859583)*x[1]+(0.796276800331)*x[2]**o+(-0.792865116401)*x[2]
-        arg[1,1,2,1]=(-0.249170081188)*x[0]**o+(-0.0234780571796)*x[0]+(-0.314017467872)*x[1]**o+(-0.0819148249592)*x[1]+(-0.71553368486)*x[2]**o+(0.763463207899)*x[2]
-        arg[1,2,0,0]=(-0.722263632571)*x[0]**o+(-0.922870211147)*x[0]+(0.380794419995)*x[1]**o+(-0.76088532378)*x[1]+(0.417253071012)*x[2]**o+(0.152980049966)*x[2]
-        arg[1,2,0,1]=(-0.667661997967)*x[0]**o+(-0.520570751147)*x[0]+(0.526368189149)*x[1]**o+(-0.0729376045288)*x[1]+(-0.434764684251)*x[2]**o+(0.124284939267)*x[2]
-        arg[1,2,1,0]=(0.610868035553)*x[0]**o+(0.958644088455)*x[0]+(0.876029854699)*x[1]**o+(-0.278348787699)*x[1]+(-0.576695356283)*x[2]**o+(-0.302696556744)*x[2]
-        arg[1,2,1,1]=(-0.224897853162)*x[0]**o+(0.89405397732)*x[0]+(-0.865281799513)*x[1]**o+(0.778866760053)*x[1]+(-0.939295291326)*x[2]**o+(0.256725768393)*x[2]
-        arg[1,2,2,0]=(0.763785330202)*x[0]**o+(-0.92861265304)*x[0]+(-0.73488309202)*x[1]**o+(0.912711310857)*x[1]+(-0.359622626692)*x[2]**o+(-0.901261216611)*x[2]
-        arg[1,2,2,1]=(-0.70687794303)*x[0]**o+(0.186497640523)*x[0]+(-0.587602932017)*x[1]**o+(0.439204174904)*x[1]+(0.0527573129765)*x[2]**o+(-0.121921819047)*x[2]
-        arg[1,3,0,0]=(-0.576513727689)*x[0]**o+(0.228971758182)*x[0]+(0.282735129059)*x[1]**o+(-0.375270097915)*x[1]+(0.360087142563)*x[2]**o+(-0.0629946372113)*x[2]
-        arg[1,3,0,1]=(-0.934375471561)*x[0]**o+(-0.710481522462)*x[0]+(-0.506438555546)*x[1]**o+(0.515278994703)*x[1]+(-0.789552111338)*x[2]**o+(0.556694887963)*x[2]
-        arg[1,3,1,0]=(0.418081142778)*x[0]**o+(-0.990334755424)*x[0]+(0.465998147831)*x[1]**o+(0.85211792131)*x[1]+(0.64293315455)*x[2]**o+(0.418636667223)*x[2]
-        arg[1,3,1,1]=(-0.192682640907)*x[0]**o+(-0.367176463246)*x[0]+(-0.512565915338)*x[1]**o+(0.431102518715)*x[1]+(-0.0213613616827)*x[2]**o+(-0.329868944656)*x[2]
-        arg[1,3,2,0]=(-0.63277285658)*x[0]**o+(0.679819079734)*x[0]+(0.986520110022)*x[1]**o+(0.988046257154)*x[1]+(0.973419900492)*x[2]**o+(-0.177540534942)*x[2]
-        arg[1,3,2,1]=(-0.660456888389)*x[0]**o+(0.546277948387)*x[0]+(-0.437065207396)*x[1]**o+(-0.310754727958)*x[1]+(-0.786950057282)*x[2]**o+(0.959526365177)*x[2]
-        arg[1,4,0,0]=(0.764190976082)*x[0]**o+(0.970535029727)*x[0]+(0.389051006993)*x[1]**o+(-0.289346925704)*x[1]+(-0.386263606576)*x[2]**o+(0.624234063589)*x[2]
-        arg[1,4,0,1]=(-0.982030683687)*x[0]**o+(-0.310500292581)*x[0]+(-0.559096285575)*x[1]**o+(-0.622541272039)*x[1]+(0.49924233081)*x[2]**o+(-0.219258681197)*x[2]
-        arg[1,4,1,0]=(-0.124268932891)*x[0]**o+(0.102696501388)*x[0]+(-0.135123912862)*x[1]**o+(-0.960215132796)*x[1]+(-0.63171550556)*x[2]**o+(-0.493725285999)*x[2]
-        arg[1,4,1,1]=(-0.397915436399)*x[0]**o+(-0.629822230732)*x[0]+(-0.65097233947)*x[1]**o+(0.915396047247)*x[1]+(0.835684562564)*x[2]**o+(-0.538096550078)*x[2]
-        arg[1,4,2,0]=(-0.946429448216)*x[0]**o+(-0.310412085571)*x[0]+(-0.0984587257278)*x[1]**o+(-0.662090989911)*x[1]+(-0.424711481307)*x[2]**o+(0.00916879493127)*x[2]
-        arg[1,4,2,1]=(0.919399549311)*x[0]**o+(-0.890110018315)*x[0]+(-0.685928475328)*x[1]**o+(-0.4731186395)*x[1]+(0.961887038718)*x[2]**o+(0.850957316131)*x[2]
-        arg[2,0,0,0]=(0.834851801283)*x[0]**o+(-0.401572429371)*x[0]+(0.313309302528)*x[1]**o+(0.0368590314435)*x[1]+(-0.299807168778)*x[2]**o+(0.250599904818)*x[2]
-        arg[2,0,0,1]=(-0.717562866174)*x[0]**o+(0.374797888506)*x[0]+(0.254329847579)*x[1]**o+(-0.987429692718)*x[1]+(-0.886758521324)*x[2]**o+(0.309486900444)*x[2]
-        arg[2,0,1,0]=(0.139962143021)*x[0]**o+(-0.134735774213)*x[0]+(-0.231254041503)*x[1]**o+(0.0694785371931)*x[1]+(0.769929630132)*x[2]**o+(0.486646094292)*x[2]
-        arg[2,0,1,1]=(0.349691701871)*x[0]**o+(-0.0308285150496)*x[0]+(0.00977143515921)*x[1]**o+(0.0970015800122)*x[1]+(-0.725991176667)*x[2]**o+(0.433663449433)*x[2]
-        arg[2,0,2,0]=(0.564474039592)*x[0]**o+(0.950620065312)*x[0]+(0.256658075134)*x[1]**o+(0.774458453189)*x[1]+(0.00181734756534)*x[2]**o+(-0.270638852561)*x[2]
-        arg[2,0,2,1]=(-0.175813811707)*x[0]**o+(0.821341326493)*x[0]+(-0.464966990893)*x[1]**o+(-0.310747066257)*x[1]+(-0.413557861251)*x[2]**o+(-0.799160067701)*x[2]
-        arg[2,1,0,0]=(-0.449817381621)*x[0]**o+(-0.0573780378383)*x[0]+(-0.22675349133)*x[1]**o+(-0.150314340624)*x[1]+(-0.116693721705)*x[2]**o+(-0.20577625675)*x[2]
-        arg[2,1,0,1]=(0.955318430674)*x[0]**o+(-0.148100168239)*x[0]+(0.741705440574)*x[1]**o+(-0.0768022054634)*x[1]+(-0.721807872287)*x[2]**o+(-0.898235041116)*x[2]
-        arg[2,1,1,0]=(-0.183120810472)*x[0]**o+(0.307305712226)*x[0]+(0.699835684443)*x[1]**o+(0.964082351856)*x[1]+(-0.0348051023458)*x[2]**o+(0.544435382916)*x[2]
-        arg[2,1,1,1]=(0.786862912642)*x[0]**o+(0.37388939814)*x[0]+(0.608937302857)*x[1]**o+(0.122305286217)*x[1]+(-0.892536849678)*x[2]**o+(0.119257478145)*x[2]
-        arg[2,1,2,0]=(0.758154908623)*x[0]**o+(0.695188856067)*x[0]+(0.458313343957)*x[1]**o+(0.979157471455)*x[1]+(0.194237063725)*x[2]**o+(0.773001101454)*x[2]
-        arg[2,1,2,1]=(0.0754678814151)*x[0]**o+(-0.639556181007)*x[0]+(0.934627102078)*x[1]**o+(0.0832082572611)*x[1]+(0.668822756858)*x[2]**o+(0.627532210297)*x[2]
-        arg[2,2,0,0]=(-0.192921889174)*x[0]**o+(0.989703287553)*x[0]+(0.00517568784693)*x[1]**o+(-0.360076937731)*x[1]+(0.947056110784)*x[2]**o+(0.469841550381)*x[2]
-        arg[2,2,0,1]=(0.201501669595)*x[0]**o+(-0.959957961834)*x[0]+(0.0229159090152)*x[1]**o+(0.396188263084)*x[1]+(0.186211667989)*x[2]**o+(0.304503474778)*x[2]
-        arg[2,2,1,0]=(0.333974995608)*x[0]**o+(0.210202867626)*x[0]+(-0.410565897643)*x[1]**o+(0.52659985644)*x[1]+(0.983960564934)*x[2]**o+(-0.439323691866)*x[2]
-        arg[2,2,1,1]=(0.706119074329)*x[0]**o+(-0.00220875175563)*x[0]+(0.143693169123)*x[1]**o+(0.217254593235)*x[1]+(-0.412057975252)*x[2]**o+(-0.967360361422)*x[2]
-        arg[2,2,2,0]=(0.217307356597)*x[0]**o+(0.861728452163)*x[0]+(-0.193239462241)*x[1]**o+(0.872273176526)*x[1]+(-0.436414721507)*x[2]**o+(-0.62398425635)*x[2]
-        arg[2,2,2,1]=(0.467099668794)*x[0]**o+(0.109742400918)*x[0]+(-0.987522191801)*x[1]**o+(-0.250251964275)*x[1]+(0.442152166523)*x[2]**o+(-0.709157679576)*x[2]
-        arg[2,3,0,0]=(0.769666242031)*x[0]**o+(0.2352745864)*x[0]+(-0.302893533611)*x[1]**o+(0.0806677655098)*x[1]+(0.886434893279)*x[2]**o+(0.366016417047)*x[2]
-        arg[2,3,0,1]=(-0.612204706187)*x[0]**o+(-0.242961993133)*x[0]+(0.946225816441)*x[1]**o+(0.528642650581)*x[1]+(-0.0166837450337)*x[2]**o+(-0.0889397945206)*x[2]
-        arg[2,3,1,0]=(0.218589745288)*x[0]**o+(-0.296125811204)*x[0]+(0.358743045538)*x[1]**o+(-0.945778818656)*x[1]+(-0.33155158646)*x[2]**o+(-0.293038455557)*x[2]
-        arg[2,3,1,1]=(0.753737723433)*x[0]**o+(-0.772926141856)*x[0]+(-0.0107183417902)*x[1]**o+(0.125538612735)*x[1]+(0.225277420156)*x[2]**o+(-0.54876651451)*x[2]
-        arg[2,3,2,0]=(0.947419453319)*x[0]**o+(-0.101935160067)*x[0]+(0.481841505589)*x[1]**o+(-0.873842146032)*x[1]+(-0.377764402402)*x[2]**o+(-0.361560947647)*x[2]
-        arg[2,3,2,1]=(0.745703609187)*x[0]**o+(-0.488401078192)*x[0]+(0.190261500318)*x[1]**o+(-0.22176180212)*x[1]+(0.80182740764)*x[2]**o+(-0.504953098351)*x[2]
-        arg[2,4,0,0]=(0.476355625206)*x[0]**o+(0.452225231178)*x[0]+(0.669315429911)*x[1]**o+(0.159511010158)*x[1]+(0.652056592943)*x[2]**o+(0.44515033609)*x[2]
-        arg[2,4,0,1]=(0.512194809916)*x[0]**o+(0.654452558318)*x[0]+(-0.526832882528)*x[1]**o+(0.590859897981)*x[1]+(-0.155989159043)*x[2]**o+(-0.689178072559)*x[2]
-        arg[2,4,1,0]=(0.0450244624553)*x[0]**o+(0.0790299000335)*x[0]+(-0.690643908994)*x[1]**o+(-0.262426911912)*x[1]+(-0.426935471303)*x[2]**o+(-0.434570506153)*x[2]
-        arg[2,4,1,1]=(-0.04445890079)*x[0]**o+(-0.541574770252)*x[0]+(-0.879290270122)*x[1]**o+(0.545302743626)*x[1]+(-0.836472565261)*x[2]**o+(0.66750272736)*x[2]
-        arg[2,4,2,0]=(-0.477788509677)*x[0]**o+(0.706195950613)*x[0]+(0.628430029293)*x[1]**o+(-0.297608932813)*x[1]+(0.38364501438)*x[2]**o+(0.855444938831)*x[2]
-        arg[2,4,2,1]=(0.123183000451)*x[0]**o+(0.41176132265)*x[0]+(-0.379498883356)*x[1]**o+(-0.53442961658)*x[1]+(-0.101215056317)*x[2]**o+(0.247971839461)*x[2]
-        arg[3,0,0,0]=(-0.239170701904)*x[0]**o+(0.369420936359)*x[0]+(0.972913513036)*x[1]**o+(0.775248415403)*x[1]+(-0.850310640223)*x[2]**o+(-0.815345534491)*x[2]
-        arg[3,0,0,1]=(0.591124498004)*x[0]**o+(0.529522171858)*x[0]+(-0.974005221641)*x[1]**o+(0.430102201571)*x[1]+(0.570519406976)*x[2]**o+(-0.0915083364671)*x[2]
-        arg[3,0,1,0]=(-0.27678065557)*x[0]**o+(-0.53225308602)*x[0]+(0.902356190541)*x[1]**o+(-0.564808732046)*x[1]+(0.0981283775668)*x[2]**o+(-0.64957631107)*x[2]
-        arg[3,0,1,1]=(0.230523873408)*x[0]**o+(-0.382745197262)*x[0]+(0.41507101812)*x[1]**o+(0.48492708335)*x[1]+(-0.11672353881)*x[2]**o+(-0.56902283397)*x[2]
-        arg[3,0,2,0]=(-0.400023140104)*x[0]**o+(-0.406234012546)*x[0]+(-0.17810623045)*x[1]**o+(-0.833748300281)*x[1]+(-0.463689953863)*x[2]**o+(-0.11095482465)*x[2]
-        arg[3,0,2,1]=(0.448885918108)*x[0]**o+(0.0447046792888)*x[0]+(-0.781652457281)*x[1]**o+(-0.893726375109)*x[1]+(0.918099233406)*x[2]**o+(0.560717614604)*x[2]
-        arg[3,1,0,0]=(0.046700262853)*x[0]**o+(0.729867044213)*x[0]+(-0.870868205823)*x[1]**o+(-0.711267787629)*x[1]+(0.760550112312)*x[2]**o+(-0.0188334901698)*x[2]
-        arg[3,1,0,1]=(0.304305551549)*x[0]**o+(-0.73527291962)*x[0]+(0.722134673974)*x[1]**o+(-0.40822784698)*x[1]+(0.912464122456)*x[2]**o+(-0.857656020349)*x[2]
-        arg[3,1,1,0]=(-0.857864508282)*x[0]**o+(-0.22160002809)*x[0]+(-0.0892530574233)*x[1]**o+(-0.547259900671)*x[1]+(0.641858628113)*x[2]**o+(-0.203700292205)*x[2]
-        arg[3,1,1,1]=(-0.47064403668)*x[0]**o+(-0.105885697358)*x[0]+(-0.899570240486)*x[1]**o+(0.660942689756)*x[1]+(-0.365836826289)*x[2]**o+(0.9593955249)*x[2]
-        arg[3,1,2,0]=(-0.51407433496)*x[0]**o+(0.369092182634)*x[0]+(-0.740281092517)*x[1]**o+(0.383443939366)*x[1]+(-0.140318759419)*x[2]**o+(-0.481274651104)*x[2]
-        arg[3,1,2,1]=(-0.938924125636)*x[0]**o+(0.41994781084)*x[0]+(-0.946320511542)*x[1]**o+(-0.86702606561)*x[1]+(0.63547569926)*x[2]**o+(0.923988068696)*x[2]
-        arg[3,2,0,0]=(0.212833889165)*x[0]**o+(-0.0823077975238)*x[0]+(0.038483237489)*x[1]**o+(0.393784376623)*x[1]+(0.573190557103)*x[2]**o+(0.403015743632)*x[2]
-        arg[3,2,0,1]=(-0.169294531943)*x[0]**o+(-0.769228919251)*x[0]+(-0.907462814057)*x[1]**o+(-0.188574782291)*x[1]+(-0.859793027531)*x[2]**o+(-0.673334626964)*x[2]
-        arg[3,2,1,0]=(0.646744388517)*x[0]**o+(0.346749855021)*x[0]+(-0.314382791156)*x[1]**o+(-0.0396545336605)*x[1]+(0.844678566939)*x[2]**o+(0.724721336727)*x[2]
-        arg[3,2,1,1]=(-0.471761417345)*x[0]**o+(-0.801631597222)*x[0]+(-0.376444012893)*x[1]**o+(0.920939382926)*x[1]+(-0.728019331398)*x[2]**o+(0.905808341144)*x[2]
-        arg[3,2,2,0]=(-0.713759272803)*x[0]**o+(-0.930638013429)*x[0]+(0.864451879958)*x[1]**o+(0.0566794358824)*x[1]+(-0.292092226905)*x[2]**o+(-0.195695530268)*x[2]
-        arg[3,2,2,1]=(0.843437618194)*x[0]**o+(0.214911962718)*x[0]+(0.475690162826)*x[1]**o+(0.0744570063618)*x[1]+(0.351711310616)*x[2]**o+(-0.187223450548)*x[2]
-        arg[3,3,0,0]=(0.108651500878)*x[0]**o+(-0.402624590847)*x[0]+(0.120700159277)*x[1]**o+(-0.363139807635)*x[1]+(-0.62413441951)*x[2]**o+(-0.474236131596)*x[2]
-        arg[3,3,0,1]=(-0.0836636547536)*x[0]**o+(-0.187959781777)*x[0]+(0.756983584308)*x[1]**o+(0.756573839599)*x[1]+(0.195640878564)*x[2]**o+(-0.566596474032)*x[2]
-        arg[3,3,1,0]=(-0.171427844449)*x[0]**o+(-0.266807792484)*x[0]+(0.380046037965)*x[1]**o+(-0.129297371793)*x[1]+(0.79139100315)*x[2]**o+(0.223804751067)*x[2]
-        arg[3,3,1,1]=(-0.054757303264)*x[0]**o+(-0.823878124196)*x[0]+(0.80695256107)*x[1]**o+(0.583250192211)*x[1]+(0.894937939133)*x[2]**o+(0.878757173892)*x[2]
-        arg[3,3,2,0]=(0.13923802434)*x[0]**o+(-0.600732296834)*x[0]+(0.111226716676)*x[1]**o+(-0.474524749496)*x[1]+(0.674290476359)*x[2]**o+(-0.06714767759)*x[2]
-        arg[3,3,2,1]=(0.246187769682)*x[0]**o+(-0.871969439162)*x[0]+(0.56748693564)*x[1]**o+(-0.0831774328079)*x[1]+(-0.27380467532)*x[2]**o+(-0.623711953244)*x[2]
-        arg[3,4,0,0]=(-0.345947366312)*x[0]**o+(-0.304842609526)*x[0]+(-0.720722450633)*x[1]**o+(0.889712922756)*x[1]+(-0.0451362945237)*x[2]**o+(-0.52344522887)*x[2]
-        arg[3,4,0,1]=(-0.830119647904)*x[0]**o+(0.577888363835)*x[0]+(0.180691945154)*x[1]**o+(-0.489554894073)*x[1]+(0.848489044545)*x[2]**o+(-0.243139985297)*x[2]
-        arg[3,4,1,0]=(0.846597693999)*x[0]**o+(0.757477455396)*x[0]+(-0.827604908657)*x[1]**o+(-0.108392312717)*x[1]+(0.597454707613)*x[2]**o+(0.35846243312)*x[2]
-        arg[3,4,1,1]=(0.107973753109)*x[0]**o+(0.578649460223)*x[0]+(0.609012033524)*x[1]**o+(-0.8428861922)*x[1]+(0.42144759968)*x[2]**o+(-0.938952208084)*x[2]
-        arg[3,4,2,0]=(0.286586330618)*x[0]**o+(0.7324646289)*x[0]+(-0.448461377611)*x[1]**o+(0.62562408085)*x[1]+(0.352429283116)*x[2]**o+(0.112047034296)*x[2]
-        arg[3,4,2,1]=(-0.431663387082)*x[0]**o+(-0.612934322552)*x[0]+(-0.426644797074)*x[1]**o+(0.768645027094)*x[1]+(-0.453242885757)*x[2]**o+(0.893748345809)*x[2]
-        ref[0,0,0,0]=(-1.2147562394)*(1+2.*(dim-1.)/(o+1.))+(1.47471604216)*dim
-        ref[0,0,0,1]=(-0.283261030731)*(1+2.*(dim-1.)/(o+1.))+(0.49706944223)*dim
-        ref[0,0,1,0]=(-0.963543225803)*(1+2.*(dim-1.)/(o+1.))+(0.302115929232)*dim
-        ref[0,0,1,1]=(1.47597923019)*(1+2.*(dim-1.)/(o+1.))+(0.302975596116)*dim
-        ref[0,0,2,0]=(2.07218071265)*(1+2.*(dim-1.)/(o+1.))+(1.40474756312)*dim
-        ref[0,0,2,1]=(1.18935174934)*(1+2.*(dim-1.)/(o+1.))+(-0.898949809002)*dim
-        ref[0,1,0,0]=(-2.71454215957)*(1+2.*(dim-1.)/(o+1.))+(-1.81174147681)*dim
-        ref[0,1,0,1]=(-1.27877046381)*(1+2.*(dim-1.)/(o+1.))+(0.197262183297)*dim
-        ref[0,1,1,0]=(-0.287148009258)*(1+2.*(dim-1.)/(o+1.))+(1.30812352716)*dim
-        ref[0,1,1,1]=(0.263153075777)*(1+2.*(dim-1.)/(o+1.))+(1.46256384302)*dim
-        ref[0,1,2,0]=(-2.55250588186)*(1+2.*(dim-1.)/(o+1.))+(1.13566208594)*dim
-        ref[0,1,2,1]=(0.208932386724)*(1+2.*(dim-1.)/(o+1.))+(-0.438703456176)*dim
-        ref[0,2,0,0]=(-1.09576259026)*(1+2.*(dim-1.)/(o+1.))+(-0.13076989899)*dim
-        ref[0,2,0,1]=(0.401914700214)*(1+2.*(dim-1.)/(o+1.))+(2.19797357625)*dim
-        ref[0,2,1,0]=(0.860631336354)*(1+2.*(dim-1.)/(o+1.))+(0.978915494035)*dim
-        ref[0,2,1,1]=(-1.97095623301)*(1+2.*(dim-1.)/(o+1.))+(-2.25442123467)*dim
-        ref[0,2,2,0]=(-0.527474241147)*(1+2.*(dim-1.)/(o+1.))+(-0.923478312465)*dim
-        ref[0,2,2,1]=(-0.460568018944)*(1+2.*(dim-1.)/(o+1.))+(0.173004367644)*dim
-        ref[0,3,0,0]=(-0.443819991343)*(1+2.*(dim-1.)/(o+1.))+(1.08379961978)*dim
-        ref[0,3,0,1]=(-0.80563854076)*(1+2.*(dim-1.)/(o+1.))+(-1.48015007036)*dim
-        ref[0,3,1,0]=(-1.04939720148)*(1+2.*(dim-1.)/(o+1.))+(-0.762532531252)*dim
-        ref[0,3,1,1]=(0.472870331273)*(1+2.*(dim-1.)/(o+1.))+(-0.00544721475928)*dim
-        ref[0,3,2,0]=(-0.593230167381)*(1+2.*(dim-1.)/(o+1.))+(0.26676895359)*dim
-        ref[0,3,2,1]=(-0.104009550799)*(1+2.*(dim-1.)/(o+1.))+(-2.23842412891)*dim
-        ref[0,4,0,0]=(-0.352866783806)*(1+2.*(dim-1.)/(o+1.))+(-1.02623939367)*dim
-        ref[0,4,0,1]=(0.0310776980081)*(1+2.*(dim-1.)/(o+1.))+(-1.9281752378)*dim
-        ref[0,4,1,0]=(-0.56349759328)*(1+2.*(dim-1.)/(o+1.))+(0.500353711197)*dim
-        ref[0,4,1,1]=(-0.788555686306)*(1+2.*(dim-1.)/(o+1.))+(-0.518133836527)*dim
-        ref[0,4,2,0]=(0.174347407535)*(1+2.*(dim-1.)/(o+1.))+(0.471299435068)*dim
-        ref[0,4,2,1]=(1.13297761695)*(1+2.*(dim-1.)/(o+1.))+(-0.93091412661)*dim
-        ref[1,0,0,0]=(1.3307805483)*(1+2.*(dim-1.)/(o+1.))+(-1.93791762884)*dim
-        ref[1,0,0,1]=(-1.40528512234)*(1+2.*(dim-1.)/(o+1.))+(0.0207469648915)*dim
-        ref[1,0,1,0]=(1.00481927021)*(1+2.*(dim-1.)/(o+1.))+(-1.82465453458)*dim
-        ref[1,0,1,1]=(-1.88446627952)*(1+2.*(dim-1.)/(o+1.))+(-0.965933535196)*dim
-        ref[1,0,2,0]=(-1.8284637239)*(1+2.*(dim-1.)/(o+1.))+(-0.991125421549)*dim
-        ref[1,0,2,1]=(1.39426526757)*(1+2.*(dim-1.)/(o+1.))+(1.06968368195)*dim
-        ref[1,1,0,0]=(1.49675855079)*(1+2.*(dim-1.)/(o+1.))+(-1.71081281752)*dim
-        ref[1,1,0,1]=(-0.36009887464)*(1+2.*(dim-1.)/(o+1.))+(-0.410764083324)*dim
-        ref[1,1,1,0]=(-1.34942056351)*(1+2.*(dim-1.)/(o+1.))+(0.397777678247)*dim
-        ref[1,1,1,1]=(0.638374123027)*(1+2.*(dim-1.)/(o+1.))+(0.650657783821)*dim
-        ref[1,1,2,0]=(0.820420901755)*(1+2.*(dim-1.)/(o+1.))+(-1.29107032578)*dim
-        ref[1,1,2,1]=(-1.27872123392)*(1+2.*(dim-1.)/(o+1.))+(0.65807032576)*dim
-        ref[1,2,0,0]=(0.075783858436)*(1+2.*(dim-1.)/(o+1.))+(-1.53077548496)*dim
-        ref[1,2,0,1]=(-0.576058493068)*(1+2.*(dim-1.)/(o+1.))+(-0.469223416409)*dim
-        ref[1,2,1,0]=(0.91020253397)*(1+2.*(dim-1.)/(o+1.))+(0.377598744012)*dim
-        ref[1,2,1,1]=(-2.029474944)*(1+2.*(dim-1.)/(o+1.))+(1.92964650577)*dim
-        ref[1,2,2,0]=(-0.330720388509)*(1+2.*(dim-1.)/(o+1.))+(-0.917162558794)*dim
-        ref[1,2,2,1]=(-1.24172356207)*(1+2.*(dim-1.)/(o+1.))+(0.503779996381)*dim
-        ref[1,3,0,0]=(0.0663085439332)*(1+2.*(dim-1.)/(o+1.))+(-0.209292976945)*dim
-        ref[1,3,0,1]=(-2.23036613844)*(1+2.*(dim-1.)/(o+1.))+(0.361492360204)*dim
-        ref[1,3,1,0]=(1.52701244516)*(1+2.*(dim-1.)/(o+1.))+(0.280419833109)*dim
-        ref[1,3,1,1]=(-0.726609917928)*(1+2.*(dim-1.)/(o+1.))+(-0.265942889187)*dim
-        ref[1,3,2,0]=(1.32716715393)*(1+2.*(dim-1.)/(o+1.))+(1.49032480195)*dim
-        ref[1,3,2,1]=(-1.88447215307)*(1+2.*(dim-1.)/(o+1.))+(1.19504958561)*dim
-        ref[1,4,0,0]=(0.766978376499)*(1+2.*(dim-1.)/(o+1.))+(1.30542216761)*dim
-        ref[1,4,0,1]=(-1.04188463845)*(1+2.*(dim-1.)/(o+1.))+(-1.15230024582)*dim
-        ref[1,4,1,0]=(-0.891108351313)*(1+2.*(dim-1.)/(o+1.))+(-1.35124391741)*dim
-        ref[1,4,1,1]=(-0.213203213304)*(1+2.*(dim-1.)/(o+1.))+(-0.252522733564)*dim
-        ref[1,4,2,0]=(-1.46959965525)*(1+2.*(dim-1.)/(o+1.))+(-0.963334280551)*dim
-        ref[1,4,2,1]=(1.1953581127)*(1+2.*(dim-1.)/(o+1.))+(-0.512271341684)*dim
-        ref[2,0,0,0]=(0.848353935033)*(1+2.*(dim-1.)/(o+1.))+(-0.11411349311)*dim
-        ref[2,0,0,1]=(-1.34999153992)*(1+2.*(dim-1.)/(o+1.))+(-0.303144903768)*dim
-        ref[2,0,1,0]=(0.67863773165)*(1+2.*(dim-1.)/(o+1.))+(0.421388857272)*dim
-        ref[2,0,1,1]=(-0.366528039637)*(1+2.*(dim-1.)/(o+1.))+(0.499836514396)*dim
-        ref[2,0,2,0]=(0.822949462292)*(1+2.*(dim-1.)/(o+1.))+(1.45443966594)*dim
-        ref[2,0,2,1]=(-1.05433866385)*(1+2.*(dim-1.)/(o+1.))+(-0.288565807465)*dim
-        ref[2,1,0,0]=(-0.793264594657)*(1+2.*(dim-1.)/(o+1.))+(-0.413468635212)*dim
-        ref[2,1,0,1]=(0.975215998961)*(1+2.*(dim-1.)/(o+1.))+(-1.12313741482)*dim
-        ref[2,1,1,0]=(0.481909771625)*(1+2.*(dim-1.)/(o+1.))+(1.815823447)*dim
-        ref[2,1,1,1]=(0.503263365821)*(1+2.*(dim-1.)/(o+1.))+(0.615452162503)*dim
-        ref[2,1,2,0]=(1.41070531631)*(1+2.*(dim-1.)/(o+1.))+(2.44734742898)*dim
-        ref[2,1,2,1]=(1.67891774035)*(1+2.*(dim-1.)/(o+1.))+(0.0711842865505)*dim
-        ref[2,2,0,0]=(0.759309909457)*(1+2.*(dim-1.)/(o+1.))+(1.0994679002)*dim
-        ref[2,2,0,1]=(0.410629246599)*(1+2.*(dim-1.)/(o+1.))+(-0.259266223972)*dim
-        ref[2,2,1,0]=(0.907369662899)*(1+2.*(dim-1.)/(o+1.))+(0.297479032201)*dim
-        ref[2,2,1,1]=(0.437754268199)*(1+2.*(dim-1.)/(o+1.))+(-0.752314519943)*dim
-        ref[2,2,2,0]=(-0.412346827151)*(1+2.*(dim-1.)/(o+1.))+(1.11001737234)*dim
-        ref[2,2,2,1]=(-0.0782703564833)*(1+2.*(dim-1.)/(o+1.))+(-0.849667242932)*dim
-        ref[2,3,0,0]=(1.3532076017)*(1+2.*(dim-1.)/(o+1.))+(0.681958768956)*dim
-        ref[2,3,0,1]=(0.317337365221)*(1+2.*(dim-1.)/(o+1.))+(0.196740862928)*dim
-        ref[2,3,1,0]=(0.245781204366)*(1+2.*(dim-1.)/(o+1.))+(-1.53494308542)*dim
-        ref[2,3,1,1]=(0.968296801799)*(1+2.*(dim-1.)/(o+1.))+(-1.19615404363)*dim
-        ref[2,3,2,0]=(1.05149655651)*(1+2.*(dim-1.)/(o+1.))+(-1.33733825375)*dim
-        ref[2,3,2,1]=(1.73779251715)*(1+2.*(dim-1.)/(o+1.))+(-1.21511597866)*dim
-        ref[2,4,0,0]=(1.79772764806)*(1+2.*(dim-1.)/(o+1.))+(1.05688657743)*dim
-        ref[2,4,0,1]=(-0.170627231654)*(1+2.*(dim-1.)/(o+1.))+(0.55613438374)*dim
-        ref[2,4,1,0]=(-1.07255491784)*(1+2.*(dim-1.)/(o+1.))+(-0.617967518031)*dim
-        ref[2,4,1,1]=(-1.76022173617)*(1+2.*(dim-1.)/(o+1.))+(0.671230700733)*dim
-        ref[2,4,2,0]=(0.534286533995)*(1+2.*(dim-1.)/(o+1.))+(1.26403195663)*dim
-        ref[2,4,2,1]=(-0.357530939222)*(1+2.*(dim-1.)/(o+1.))+(0.12530354553)*dim
-        ref[3,0,0,0]=(-0.11656782909)*(1+2.*(dim-1.)/(o+1.))+(0.32932381727)*dim
-        ref[3,0,0,1]=(0.187638683339)*(1+2.*(dim-1.)/(o+1.))+(0.868116036962)*dim
-        ref[3,0,1,0]=(0.723703912538)*(1+2.*(dim-1.)/(o+1.))+(-1.74663812914)*dim
-        ref[3,0,1,1]=(0.528871352717)*(1+2.*(dim-1.)/(o+1.))+(-0.466840947882)*dim
-        ref[3,0,2,0]=(-1.04181932442)*(1+2.*(dim-1.)/(o+1.))+(-1.35093713748)*dim
-        ref[3,0,2,1]=(0.585332694234)*(1+2.*(dim-1.)/(o+1.))+(-0.288304081216)*dim
-        ref[3,1,0,0]=(-0.0636178306576)*(1+2.*(dim-1.)/(o+1.))+(-0.000234233586678)*dim
-        ref[3,1,0,1]=(1.93890434798)*(1+2.*(dim-1.)/(o+1.))+(-2.00115678695)*dim
-        ref[3,1,1,0]=(-0.305258937592)*(1+2.*(dim-1.)/(o+1.))+(-0.972560220966)*dim
-        ref[3,1,1,1]=(-1.73605110346)*(1+2.*(dim-1.)/(o+1.))+(1.5144525173)*dim
-        ref[3,1,2,0]=(-1.3946741869)*(1+2.*(dim-1.)/(o+1.))+(0.271261470896)*dim
-        ref[3,1,2,1]=(-1.24976893792)*(1+2.*(dim-1.)/(o+1.))+(0.476909813927)*dim
-        ref[3,2,0,0]=(0.824507683756)*(1+2.*(dim-1.)/(o+1.))+(0.71449232273)*dim
-        ref[3,2,0,1]=(-1.93655037353)*(1+2.*(dim-1.)/(o+1.))+(-1.63113832851)*dim
-        ref[3,2,1,0]=(1.1770401643)*(1+2.*(dim-1.)/(o+1.))+(1.03181665809)*dim
-        ref[3,2,1,1]=(-1.57622476164)*(1+2.*(dim-1.)/(o+1.))+(1.02511612685)*dim
-        ref[3,2,2,0]=(-0.141399619749)*(1+2.*(dim-1.)/(o+1.))+(-1.06965410781)*dim
-        ref[3,2,2,1]=(1.67083909164)*(1+2.*(dim-1.)/(o+1.))+(0.102145518531)*dim
-        ref[3,3,0,0]=(-0.394782759355)*(1+2.*(dim-1.)/(o+1.))+(-1.24000053008)*dim
-        ref[3,3,0,1]=(0.868960808118)*(1+2.*(dim-1.)/(o+1.))+(0.00201758379073)*dim
-        ref[3,3,1,0]=(1.00000919667)*(1+2.*(dim-1.)/(o+1.))+(-0.17230041321)*dim
-        ref[3,3,1,1]=(1.64713319694)*(1+2.*(dim-1.)/(o+1.))+(0.638129241907)*dim
-        ref[3,3,2,0]=(0.924755217374)*(1+2.*(dim-1.)/(o+1.))+(-1.14240472392)*dim
-        ref[3,3,2,1]=(0.539870030002)*(1+2.*(dim-1.)/(o+1.))+(-1.57885882521)*dim
-        ref[3,4,0,0]=(-1.11180611147)*(1+2.*(dim-1.)/(o+1.))+(0.0614250843596)*dim
-        ref[3,4,0,1]=(0.199061341795)*(1+2.*(dim-1.)/(o+1.))+(-0.154806515534)*dim
-        ref[3,4,1,0]=(0.616447492955)*(1+2.*(dim-1.)/(o+1.))+(1.0075475758)*dim
-        ref[3,4,1,1]=(1.13843338631)*(1+2.*(dim-1.)/(o+1.))+(-1.20318894006)*dim
-        ref[3,4,2,0]=(0.190554236123)*(1+2.*(dim-1.)/(o+1.))+(1.47013574405)*dim
-        ref[3,4,2,1]=(-1.31155106991)*(1+2.*(dim-1.)/(o+1.))+(1.04945905035)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the 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.416878137535)*x[0]**o+(0.0809721296208)*x[0]+(-0.275084069478)*x[1]**o+(-0.704226656249)*x[1]
-        ref=(0.141794068057)*(1+2.*(dim-1.)/(o+1.))+(-0.623254526628)*dim
-      else:
-        arg=(0.587142789605)*x[0]**o+(0.894018391929)*x[0]+(-0.417709558814)*x[1]**o+(0.0970658484968)*x[1]+(-0.840982437679)*x[2]**o+(-0.400242562091)*x[2]
-        ref=(-0.671549206889)*(1+2.*(dim-1.)/(o+1.))+(0.590841678335)*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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(0.051335729494)*x[0]**o+(0.257057962305)*x[0]+(0.00794214446212)*x[1]**o+(0.52307365061)*x[1]
-        arg[1]=(0.419915493803)*x[0]**o+(-0.0105826268931)*x[0]+(0.369274332127)*x[1]**o+(0.340796701053)*x[1]
-        ref[0]=(0.0592778739561)*(1+2.*(dim-1.)/(o+1.))+(0.780131612915)*dim
-        ref[1]=(0.789189825931)*(1+2.*(dim-1.)/(o+1.))+(0.33021407416)*dim
-      else:
-        arg[0]=(-0.483302491019)*x[0]**o+(0.223892398776)*x[0]+(-0.555612541317)*x[1]**o+(0.75535374219)*x[1]+(-0.208573228788)*x[2]**o+(0.479879212564)*x[2]
-        arg[1]=(-0.012341185885)*x[0]**o+(-0.959474230066)*x[0]+(0.397671123434)*x[1]**o+(-0.120340696903)*x[1]+(-0.645757653205)*x[2]**o+(-0.216057959957)*x[2]
-        ref[0]=(-1.24748826112)*(1+2.*(dim-1.)/(o+1.))+(1.45912535353)*dim
-        ref[1]=(-0.260427715657)*(1+2.*(dim-1.)/(o+1.))+(-1.29587288693)*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_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.493237934301)*x[0]**o+(-0.977176505302)*x[0]+(-0.837740403623)*x[1]**o+(0.204709065496)*x[1]
-        arg[0,1]=(0.794064508577)*x[0]**o+(-0.917060945623)*x[0]+(0.0114185601474)*x[1]**o+(0.547108694374)*x[1]
-        arg[0,2]=(-0.989778984923)*x[0]**o+(-0.499651095311)*x[0]+(-0.126817505183)*x[1]**o+(0.889077385524)*x[1]
-        arg[0,3]=(-0.223453594493)*x[0]**o+(-0.17983229649)*x[0]+(0.352602269148)*x[1]**o+(0.00617724258273)*x[1]
-        arg[0,4]=(0.401784356952)*x[0]**o+(0.839308128877)*x[0]+(0.322943402455)*x[1]**o+(0.770206521944)*x[1]
-        arg[1,0]=(0.491015078355)*x[0]**o+(0.194909202321)*x[0]+(0.38986016491)*x[1]**o+(0.671106836372)*x[1]
-        arg[1,1]=(0.200697856784)*x[0]**o+(0.389746053244)*x[0]+(0.850237988574)*x[1]**o+(-0.677750684271)*x[1]
-        arg[1,2]=(0.300444129016)*x[0]**o+(-0.502811932395)*x[0]+(0.390751425646)*x[1]**o+(-0.0234058348564)*x[1]
-        arg[1,3]=(-0.451410318068)*x[0]**o+(0.0959092789621)*x[0]+(0.364602756931)*x[1]**o+(-0.637883149677)*x[1]
-        arg[1,4]=(0.84148898142)*x[0]**o+(0.447701396385)*x[0]+(-0.925960934959)*x[1]**o+(-0.216915201171)*x[1]
-        arg[2,0]=(0.497685540053)*x[0]**o+(0.706445401439)*x[0]+(0.278688226804)*x[1]**o+(0.263560807934)*x[1]
-        arg[2,1]=(0.846700886302)*x[0]**o+(0.794459987626)*x[0]+(0.206707548962)*x[1]**o+(0.536938178952)*x[1]
-        arg[2,2]=(-0.825060225713)*x[0]**o+(0.00650901742391)*x[0]+(0.500591036904)*x[1]**o+(0.86251606869)*x[1]
-        arg[2,3]=(-0.490203731083)*x[0]**o+(-0.758885551614)*x[0]+(0.44212368096)*x[1]**o+(0.422183463853)*x[1]
-        arg[2,4]=(0.326180837967)*x[0]**o+(0.0511693925274)*x[0]+(0.450713817213)*x[1]**o+(-0.788372992203)*x[1]
-        arg[3,0]=(0.427328335694)*x[0]**o+(-0.549570782632)*x[0]+(0.0484849428866)*x[1]**o+(-0.488921618371)*x[1]
-        arg[3,1]=(-0.000395237589224)*x[0]**o+(-0.902889768871)*x[0]+(-0.991821787559)*x[1]**o+(-0.907842202962)*x[1]
-        arg[3,2]=(0.737156280391)*x[0]**o+(0.104714673958)*x[0]+(0.102528971835)*x[1]**o+(-0.0982626427735)*x[1]
-        arg[3,3]=(0.971460723075)*x[0]**o+(-0.759821212391)*x[0]+(0.385963754923)*x[1]**o+(-0.533924725996)*x[1]
-        arg[3,4]=(0.25440424638)*x[0]**o+(-0.82432588605)*x[0]+(0.759285911224)*x[1]**o+(0.328467600746)*x[1]
-        ref[0,0]=(-1.33097833792)*(1+2.*(dim-1.)/(o+1.))+(-0.772467439806)*dim
-        ref[0,1]=(0.805483068724)*(1+2.*(dim-1.)/(o+1.))+(-0.36995225125)*dim
-        ref[0,2]=(-1.11659649011)*(1+2.*(dim-1.)/(o+1.))+(0.389426290213)*dim
-        ref[0,3]=(0.129148674655)*(1+2.*(dim-1.)/(o+1.))+(-0.173655053907)*dim
-        ref[0,4]=(0.724727759407)*(1+2.*(dim-1.)/(o+1.))+(1.60951465082)*dim
-        ref[1,0]=(0.880875243265)*(1+2.*(dim-1.)/(o+1.))+(0.866016038693)*dim
-        ref[1,1]=(1.05093584536)*(1+2.*(dim-1.)/(o+1.))+(-0.288004631027)*dim
-        ref[1,2]=(0.691195554662)*(1+2.*(dim-1.)/(o+1.))+(-0.526217767251)*dim
-        ref[1,3]=(-0.0868075611369)*(1+2.*(dim-1.)/(o+1.))+(-0.541973870715)*dim
-        ref[1,4]=(-0.0844719535392)*(1+2.*(dim-1.)/(o+1.))+(0.230786195214)*dim
-        ref[2,0]=(0.776373766857)*(1+2.*(dim-1.)/(o+1.))+(0.970006209374)*dim
-        ref[2,1]=(1.05340843526)*(1+2.*(dim-1.)/(o+1.))+(1.33139816658)*dim
-        ref[2,2]=(-0.324469188808)*(1+2.*(dim-1.)/(o+1.))+(0.869025086114)*dim
-        ref[2,3]=(-0.0480800501232)*(1+2.*(dim-1.)/(o+1.))+(-0.336702087761)*dim
-        ref[2,4]=(0.776894655179)*(1+2.*(dim-1.)/(o+1.))+(-0.737203599675)*dim
-        ref[3,0]=(0.47581327858)*(1+2.*(dim-1.)/(o+1.))+(-1.038492401)*dim
-        ref[3,1]=(-0.992217025148)*(1+2.*(dim-1.)/(o+1.))+(-1.81073197183)*dim
-        ref[3,2]=(0.839685252226)*(1+2.*(dim-1.)/(o+1.))+(0.00645203118434)*dim
-        ref[3,3]=(1.357424478)*(1+2.*(dim-1.)/(o+1.))+(-1.29374593839)*dim
-        ref[3,4]=(1.0136901576)*(1+2.*(dim-1.)/(o+1.))+(-0.495858285305)*dim
-      else:
-        arg[0,0]=(-0.543785449843)*x[0]**o+(-0.593471310422)*x[0]+(0.223732084513)*x[1]**o+(-0.126390494354)*x[1]+(0.602561108649)*x[2]**o+(-0.879650196727)*x[2]
-        arg[0,1]=(-0.373708985284)*x[0]**o+(0.274723212925)*x[0]+(0.0901068561926)*x[1]**o+(0.0705878267418)*x[1]+(-0.87124855534)*x[2]**o+(-0.342156987834)*x[2]
-        arg[0,2]=(0.197662792758)*x[0]**o+(0.993389348528)*x[0]+(0.300080063659)*x[1]**o+(-0.87329423474)*x[1]+(-0.708861668092)*x[2]**o+(-0.145567510817)*x[2]
-        arg[0,3]=(-0.641680604707)*x[0]**o+(0.502870155472)*x[0]+(0.726460257571)*x[1]**o+(-0.796246941548)*x[1]+(-0.034138694789)*x[2]**o+(-0.756773445728)*x[2]
-        arg[0,4]=(-0.910301138852)*x[0]**o+(0.370603440687)*x[0]+(0.30908632679)*x[1]**o+(0.399307258883)*x[1]+(0.734329887794)*x[2]**o+(-0.105355323212)*x[2]
-        arg[1,0]=(-0.998162269861)*x[0]**o+(0.744436497607)*x[0]+(0.474991680035)*x[1]**o+(-0.523297766774)*x[1]+(-0.147411103004)*x[2]**o+(-0.366260797475)*x[2]
-        arg[1,1]=(-0.895068058812)*x[0]**o+(-0.543026567202)*x[0]+(0.681910579939)*x[1]**o+(0.839238385122)*x[1]+(-0.943454697555)*x[2]**o+(-0.942882687085)*x[2]
-        arg[1,2]=(-0.0327934757673)*x[0]**o+(-0.551060110327)*x[0]+(0.0246419122114)*x[1]**o+(0.290492943846)*x[1]+(-0.81629260256)*x[2]**o+(-0.0703654573398)*x[2]
-        arg[1,3]=(0.0101368428324)*x[0]**o+(0.169228100407)*x[0]+(-0.0720675504637)*x[1]**o+(0.854569517064)*x[1]+(-0.185495614033)*x[2]**o+(0.159402892807)*x[2]
-        arg[1,4]=(-0.879056526056)*x[0]**o+(-0.499865495878)*x[0]+(0.389281340553)*x[1]**o+(0.208323326648)*x[1]+(0.201495185869)*x[2]**o+(0.287693342543)*x[2]
-        arg[2,0]=(-0.0980367959573)*x[0]**o+(-0.743908923973)*x[0]+(0.612332291133)*x[1]**o+(-0.833162883242)*x[1]+(-0.149234146487)*x[2]**o+(-0.265352382043)*x[2]
-        arg[2,1]=(-0.731053054407)*x[0]**o+(-0.328824749845)*x[0]+(-0.270771833154)*x[1]**o+(-0.924718425874)*x[1]+(-0.333737248999)*x[2]**o+(-0.437707530432)*x[2]
-        arg[2,2]=(0.0568240255423)*x[0]**o+(0.889929679474)*x[0]+(-0.550346007257)*x[1]**o+(-0.276114383355)*x[1]+(0.818856335741)*x[2]**o+(0.949830759195)*x[2]
-        arg[2,3]=(-0.487278099196)*x[0]**o+(0.621833922878)*x[0]+(-0.641187646288)*x[1]**o+(-0.62187991518)*x[1]+(0.193101177186)*x[2]**o+(0.574039256278)*x[2]
-        arg[2,4]=(0.411046922073)*x[0]**o+(-0.10196277248)*x[0]+(-0.880065306034)*x[1]**o+(0.629582927604)*x[1]+(-0.364618567951)*x[2]**o+(0.130293365676)*x[2]
-        arg[3,0]=(-0.625244224555)*x[0]**o+(0.50345243521)*x[0]+(0.701616120451)*x[1]**o+(0.44401843794)*x[1]+(-0.881068054195)*x[2]**o+(0.337405641389)*x[2]
-        arg[3,1]=(0.244113319139)*x[0]**o+(0.739760310044)*x[0]+(0.439528183979)*x[1]**o+(0.808496622595)*x[1]+(0.432069187682)*x[2]**o+(-0.106394550529)*x[2]
-        arg[3,2]=(-0.200973139796)*x[0]**o+(-0.373932231384)*x[0]+(-0.438946407503)*x[1]**o+(0.543079830762)*x[1]+(-0.499599010695)*x[2]**o+(0.501967674296)*x[2]
-        arg[3,3]=(-0.128263000609)*x[0]**o+(-0.408181851435)*x[0]+(0.403315054177)*x[1]**o+(0.75067593555)*x[1]+(0.361607987217)*x[2]**o+(0.269483801463)*x[2]
-        arg[3,4]=(0.821969994275)*x[0]**o+(0.350771424951)*x[0]+(-0.761235507511)*x[1]**o+(0.148329827876)*x[1]+(-0.918493845231)*x[2]**o+(0.592094636272)*x[2]
-        ref[0,0]=(0.282507743319)*(1+2.*(dim-1.)/(o+1.))+(-1.5995120015)*dim
-        ref[0,1]=(-1.15485068443)*(1+2.*(dim-1.)/(o+1.))+(0.00315405183214)*dim
-        ref[0,2]=(-0.211118811675)*(1+2.*(dim-1.)/(o+1.))+(-0.0254723970291)*dim
-        ref[0,3]=(0.0506409580755)*(1+2.*(dim-1.)/(o+1.))+(-1.0501502318)*dim
-        ref[0,4]=(0.133115075732)*(1+2.*(dim-1.)/(o+1.))+(0.664555376358)*dim
-        ref[1,0]=(-0.67058169283)*(1+2.*(dim-1.)/(o+1.))+(-0.145122066642)*dim
-        ref[1,1]=(-1.15661217643)*(1+2.*(dim-1.)/(o+1.))+(-0.646670869164)*dim
-        ref[1,2]=(-0.824444166116)*(1+2.*(dim-1.)/(o+1.))+(-0.330932623821)*dim
-        ref[1,3]=(-0.247426321664)*(1+2.*(dim-1.)/(o+1.))+(1.18320051028)*dim
-        ref[1,4]=(-0.288279999634)*(1+2.*(dim-1.)/(o+1.))+(-0.00384882668765)*dim
-        ref[2,0]=(0.365061348688)*(1+2.*(dim-1.)/(o+1.))+(-1.84242418926)*dim
-        ref[2,1]=(-1.33556213656)*(1+2.*(dim-1.)/(o+1.))+(-1.69125070615)*dim
-        ref[2,2]=(0.325334354026)*(1+2.*(dim-1.)/(o+1.))+(1.56364605531)*dim
-        ref[2,3]=(-0.935364568298)*(1+2.*(dim-1.)/(o+1.))+(0.573993263976)*dim
-        ref[2,4]=(-0.833636951913)*(1+2.*(dim-1.)/(o+1.))+(0.6579135208)*dim
-        ref[3,0]=(-0.804696158299)*(1+2.*(dim-1.)/(o+1.))+(1.28487651454)*dim
-        ref[3,1]=(1.1157106908)*(1+2.*(dim-1.)/(o+1.))+(1.44186238211)*dim
-        ref[3,2]=(-1.13951855799)*(1+2.*(dim-1.)/(o+1.))+(0.671115273674)*dim
-        ref[3,3]=(0.636660040784)*(1+2.*(dim-1.)/(o+1.))+(0.611977885578)*dim
-        ref[3,4]=(-0.857759358467)*(1+2.*(dim-1.)/(o+1.))+(1.0911958891)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.331954160625)*x[0]**o+(0.713423346586)*x[0]+(0.922333771405)*x[1]**o+(-0.306799323245)*x[1]
-        arg[0,0,1]=(-0.837278273696)*x[0]**o+(-0.322068356249)*x[0]+(-0.952056283446)*x[1]**o+(0.78147215355)*x[1]
-        arg[0,1,0]=(-0.71217197633)*x[0]**o+(-0.222121067189)*x[0]+(-0.740851323426)*x[1]**o+(-0.664415003166)*x[1]
-        arg[0,1,1]=(0.304797844524)*x[0]**o+(-0.644642249615)*x[0]+(-0.942312793933)*x[1]**o+(0.758857258357)*x[1]
-        arg[1,0,0]=(-0.978734634026)*x[0]**o+(0.697829375729)*x[0]+(-0.161023313194)*x[1]**o+(0.61960280308)*x[1]
-        arg[1,0,1]=(0.65091302745)*x[0]**o+(-0.411592147008)*x[0]+(0.748017319704)*x[1]**o+(0.751661257345)*x[1]
-        arg[1,1,0]=(-0.752749816617)*x[0]**o+(-0.889417028079)*x[0]+(0.187075769961)*x[1]**o+(0.96605423194)*x[1]
-        arg[1,1,1]=(-0.791276410919)*x[0]**o+(-0.66910236639)*x[0]+(-0.107283654349)*x[1]**o+(0.556315348977)*x[1]
-        arg[2,0,0]=(0.0717781211643)*x[0]**o+(-0.895974517834)*x[0]+(-0.388350799289)*x[1]**o+(0.55541171641)*x[1]
-        arg[2,0,1]=(0.886475701949)*x[0]**o+(0.0794480579219)*x[0]+(-0.77671944551)*x[1]**o+(-0.29611930088)*x[1]
-        arg[2,1,0]=(0.891530897911)*x[0]**o+(-0.767892439984)*x[0]+(-0.692871902002)*x[1]**o+(0.296346783431)*x[1]
-        arg[2,1,1]=(0.904417221616)*x[0]**o+(-0.379208335246)*x[0]+(0.491675297059)*x[1]**o+(0.994131453216)*x[1]
-        arg[3,0,0]=(-0.278750282129)*x[0]**o+(-0.889235749208)*x[0]+(-0.970025256676)*x[1]**o+(0.459265023633)*x[1]
-        arg[3,0,1]=(-0.718548177793)*x[0]**o+(-0.801618785436)*x[0]+(-0.0489351007933)*x[1]**o+(-0.0331281021404)*x[1]
-        arg[3,1,0]=(0.838645233036)*x[0]**o+(0.174830460073)*x[0]+(0.343887140274)*x[1]**o+(0.475643625956)*x[1]
-        arg[3,1,1]=(-0.376629360434)*x[0]**o+(0.965850026388)*x[0]+(-0.62284011199)*x[1]**o+(-0.548261522438)*x[1]
-        arg[4,0,0]=(-0.747109622101)*x[0]**o+(-0.793286186527)*x[0]+(0.700502366132)*x[1]**o+(0.708459489695)*x[1]
-        arg[4,0,1]=(-0.372920704339)*x[0]**o+(-0.856662712404)*x[0]+(0.735191558102)*x[1]**o+(0.451959287084)*x[1]
-        arg[4,1,0]=(-0.825227447648)*x[0]**o+(-0.978701927456)*x[0]+(0.856562109765)*x[1]**o+(0.226820057686)*x[1]
-        arg[4,1,1]=(-0.883951567752)*x[0]**o+(0.346114896878)*x[0]+(0.22103721575)*x[1]**o+(0.766907412924)*x[1]
-        arg[5,0,0]=(0.440140408264)*x[0]**o+(0.576442002932)*x[0]+(0.181136518153)*x[1]**o+(0.467290325887)*x[1]
-        arg[5,0,1]=(0.323653297993)*x[0]**o+(-0.0169080219964)*x[0]+(-0.790889359324)*x[1]**o+(-0.752609210154)*x[1]
-        arg[5,1,0]=(-0.771859095701)*x[0]**o+(0.392074466446)*x[0]+(0.672832544535)*x[1]**o+(-0.518196376899)*x[1]
-        arg[5,1,1]=(-0.714106835785)*x[0]**o+(-0.392974811152)*x[0]+(0.477349412757)*x[1]**o+(-0.978738343032)*x[1]
-        ref[0,0,0]=(0.59037961078)*(1+2.*(dim-1.)/(o+1.))+(0.406624023341)*dim
-        ref[0,0,1]=(-1.78933455714)*(1+2.*(dim-1.)/(o+1.))+(0.459403797301)*dim
-        ref[0,1,0]=(-1.45302329976)*(1+2.*(dim-1.)/(o+1.))+(-0.886536070355)*dim
-        ref[0,1,1]=(-0.637514949409)*(1+2.*(dim-1.)/(o+1.))+(0.114215008741)*dim
-        ref[1,0,0]=(-1.13975794722)*(1+2.*(dim-1.)/(o+1.))+(1.31743217881)*dim
-        ref[1,0,1]=(1.39893034715)*(1+2.*(dim-1.)/(o+1.))+(0.340069110337)*dim
-        ref[1,1,0]=(-0.565674046656)*(1+2.*(dim-1.)/(o+1.))+(0.076637203861)*dim
-        ref[1,1,1]=(-0.898560065268)*(1+2.*(dim-1.)/(o+1.))+(-0.112787017413)*dim
-        ref[2,0,0]=(-0.316572678125)*(1+2.*(dim-1.)/(o+1.))+(-0.340562801424)*dim
-        ref[2,0,1]=(0.10975625644)*(1+2.*(dim-1.)/(o+1.))+(-0.216671242958)*dim
-        ref[2,1,0]=(0.198658995909)*(1+2.*(dim-1.)/(o+1.))+(-0.471545656553)*dim
-        ref[2,1,1]=(1.39609251868)*(1+2.*(dim-1.)/(o+1.))+(0.614923117971)*dim
-        ref[3,0,0]=(-1.2487755388)*(1+2.*(dim-1.)/(o+1.))+(-0.429970725575)*dim
-        ref[3,0,1]=(-0.767483278586)*(1+2.*(dim-1.)/(o+1.))+(-0.834746887577)*dim
-        ref[3,1,0]=(1.18253237331)*(1+2.*(dim-1.)/(o+1.))+(0.650474086029)*dim
-        ref[3,1,1]=(-0.999469472424)*(1+2.*(dim-1.)/(o+1.))+(0.41758850395)*dim
-        ref[4,0,0]=(-0.0466072559697)*(1+2.*(dim-1.)/(o+1.))+(-0.0848266968319)*dim
-        ref[4,0,1]=(0.362270853763)*(1+2.*(dim-1.)/(o+1.))+(-0.404703425319)*dim
-        ref[4,1,0]=(0.0313346621166)*(1+2.*(dim-1.)/(o+1.))+(-0.75188186977)*dim
-        ref[4,1,1]=(-0.662914352001)*(1+2.*(dim-1.)/(o+1.))+(1.1130223098)*dim
-        ref[5,0,0]=(0.621276926417)*(1+2.*(dim-1.)/(o+1.))+(1.04373232882)*dim
-        ref[5,0,1]=(-0.467236061331)*(1+2.*(dim-1.)/(o+1.))+(-0.76951723215)*dim
-        ref[5,1,0]=(-0.0990265511653)*(1+2.*(dim-1.)/(o+1.))+(-0.126121910453)*dim
-        ref[5,1,1]=(-0.236757423028)*(1+2.*(dim-1.)/(o+1.))+(-1.37171315418)*dim
-      else:
-        arg[0,0,0]=(-0.676850371385)*x[0]**o+(0.343194249293)*x[0]+(-0.289569238124)*x[1]**o+(0.546143025789)*x[1]+(-0.292429216951)*x[2]**o+(0.100638805907)*x[2]
-        arg[0,0,1]=(-0.558403199885)*x[0]**o+(0.369265961569)*x[0]+(0.098539502761)*x[1]**o+(-0.555747072012)*x[1]+(0.0142505043744)*x[2]**o+(0.110677590143)*x[2]
-        arg[0,1,0]=(0.480265324249)*x[0]**o+(-0.0801799981418)*x[0]+(-0.659040110213)*x[1]**o+(0.315685251032)*x[1]+(0.146222780181)*x[2]**o+(-0.307845817615)*x[2]
-        arg[0,1,1]=(-0.469643195547)*x[0]**o+(0.631180947887)*x[0]+(0.0873749097691)*x[1]**o+(-0.907805635326)*x[1]+(-0.445238378297)*x[2]**o+(-0.583750385876)*x[2]
-        arg[1,0,0]=(-0.519648347947)*x[0]**o+(-0.580046561107)*x[0]+(-0.474702629402)*x[1]**o+(-0.76698196707)*x[1]+(0.631290211156)*x[2]**o+(0.283150656338)*x[2]
-        arg[1,0,1]=(0.828049802595)*x[0]**o+(-0.0996271417739)*x[0]+(0.13247948046)*x[1]**o+(0.64657332105)*x[1]+(0.901448888477)*x[2]**o+(0.895379597076)*x[2]
-        arg[1,1,0]=(-0.197367099356)*x[0]**o+(-0.933210661759)*x[0]+(-0.0134349749548)*x[1]**o+(-0.651111981269)*x[1]+(0.256945439519)*x[2]**o+(0.528412689094)*x[2]
-        arg[1,1,1]=(-0.922943172982)*x[0]**o+(-0.883102479542)*x[0]+(-0.0037345936911)*x[1]**o+(-0.598256159261)*x[1]+(-0.8562089409)*x[2]**o+(-0.298502617143)*x[2]
-        arg[2,0,0]=(0.499285053237)*x[0]**o+(-0.347877602065)*x[0]+(0.783117300662)*x[1]**o+(0.0413016895448)*x[1]+(0.22555777414)*x[2]**o+(0.089246166469)*x[2]
-        arg[2,0,1]=(-0.180602931202)*x[0]**o+(0.883958054663)*x[0]+(0.904974519387)*x[1]**o+(-0.169618307434)*x[1]+(0.361963890467)*x[2]**o+(-0.364236450353)*x[2]
-        arg[2,1,0]=(0.332239090882)*x[0]**o+(-0.392239851855)*x[0]+(0.905142609029)*x[1]**o+(-0.471493540964)*x[1]+(-0.305327788141)*x[2]**o+(0.581213078834)*x[2]
-        arg[2,1,1]=(0.481276189253)*x[0]**o+(0.645400809127)*x[0]+(-0.840844470697)*x[1]**o+(-0.47587396865)*x[1]+(0.134145050668)*x[2]**o+(-0.315081369951)*x[2]
-        arg[3,0,0]=(-0.480497217552)*x[0]**o+(0.595345393671)*x[0]+(0.776315451392)*x[1]**o+(-0.396110510671)*x[1]+(0.0437422791996)*x[2]**o+(0.348675326203)*x[2]
-        arg[3,0,1]=(0.867117243092)*x[0]**o+(-0.222483151231)*x[0]+(0.0856439550139)*x[1]**o+(0.355855801395)*x[1]+(-0.779380984653)*x[2]**o+(0.799440639884)*x[2]
-        arg[3,1,0]=(-0.869234399353)*x[0]**o+(-0.747500724089)*x[0]+(-0.83154206968)*x[1]**o+(-0.771906212766)*x[1]+(-0.188734869619)*x[2]**o+(0.7312382704)*x[2]
-        arg[3,1,1]=(-0.729677636148)*x[0]**o+(-0.358066533942)*x[0]+(-0.342651052704)*x[1]**o+(-0.531453801913)*x[1]+(-0.898300547827)*x[2]**o+(0.0387220517653)*x[2]
-        arg[4,0,0]=(-0.380489041999)*x[0]**o+(0.517823660835)*x[0]+(0.722149782685)*x[1]**o+(0.510169845258)*x[1]+(-0.979340093133)*x[2]**o+(0.846050053391)*x[2]
-        arg[4,0,1]=(0.390895580804)*x[0]**o+(0.122461788897)*x[0]+(-0.809243912452)*x[1]**o+(0.871689879803)*x[1]+(-0.991689466458)*x[2]**o+(-0.0373953689911)*x[2]
-        arg[4,1,0]=(0.00670611033858)*x[0]**o+(-0.700084486793)*x[0]+(0.365358002826)*x[1]**o+(-0.928347441251)*x[1]+(-0.675081280461)*x[2]**o+(-0.262871553902)*x[2]
-        arg[4,1,1]=(-0.566521655794)*x[0]**o+(-0.23325381374)*x[0]+(0.744538505444)*x[1]**o+(0.263970013855)*x[1]+(0.360984907343)*x[2]**o+(0.704696800059)*x[2]
-        arg[5,0,0]=(0.754229123633)*x[0]**o+(-0.523353302691)*x[0]+(0.404181763418)*x[1]**o+(0.175414644029)*x[1]+(0.627455124887)*x[2]**o+(-0.450163514418)*x[2]
-        arg[5,0,1]=(0.804547370453)*x[0]**o+(-0.748034210243)*x[0]+(-0.943261499953)*x[1]**o+(0.360715335834)*x[1]+(-0.952785406204)*x[2]**o+(0.188838771539)*x[2]
-        arg[5,1,0]=(0.653730390007)*x[0]**o+(0.663746229033)*x[0]+(0.454911944273)*x[1]**o+(-0.548110740107)*x[1]+(0.799171265206)*x[2]**o+(-0.646356900812)*x[2]
-        arg[5,1,1]=(0.533464266683)*x[0]**o+(-0.0650985333228)*x[0]+(-0.599880569232)*x[1]**o+(0.645120695827)*x[1]+(0.985316456657)*x[2]**o+(0.527848503917)*x[2]
-        ref[0,0,0]=(-1.25884882646)*(1+2.*(dim-1.)/(o+1.))+(0.989976080988)*dim
-        ref[0,0,1]=(-0.445613192749)*(1+2.*(dim-1.)/(o+1.))+(-0.0758035202994)*dim
-        ref[0,1,0]=(-0.0325520057832)*(1+2.*(dim-1.)/(o+1.))+(-0.0723405647253)*dim
-        ref[0,1,1]=(-0.827506664075)*(1+2.*(dim-1.)/(o+1.))+(-0.860375073315)*dim
-        ref[1,0,0]=(-0.363060766193)*(1+2.*(dim-1.)/(o+1.))+(-1.06387787184)*dim
-        ref[1,0,1]=(1.86197817153)*(1+2.*(dim-1.)/(o+1.))+(1.44232577635)*dim
-        ref[1,1,0]=(0.0461433652081)*(1+2.*(dim-1.)/(o+1.))+(-1.05590995393)*dim
-        ref[1,1,1]=(-1.78288670757)*(1+2.*(dim-1.)/(o+1.))+(-1.77986125595)*dim
-        ref[2,0,0]=(1.50796012804)*(1+2.*(dim-1.)/(o+1.))+(-0.217329746051)*dim
-        ref[2,0,1]=(1.08633547865)*(1+2.*(dim-1.)/(o+1.))+(0.350103296876)*dim
-        ref[2,1,0]=(0.932053911771)*(1+2.*(dim-1.)/(o+1.))+(-0.282520313985)*dim
-        ref[2,1,1]=(-0.225423230776)*(1+2.*(dim-1.)/(o+1.))+(-0.145554529474)*dim
-        ref[3,0,0]=(0.33956051304)*(1+2.*(dim-1.)/(o+1.))+(0.547910209204)*dim
-        ref[3,0,1]=(0.173380213454)*(1+2.*(dim-1.)/(o+1.))+(0.932813290049)*dim
-        ref[3,1,0]=(-1.88951133865)*(1+2.*(dim-1.)/(o+1.))+(-0.788168666455)*dim
-        ref[3,1,1]=(-1.97062923668)*(1+2.*(dim-1.)/(o+1.))+(-0.850798284089)*dim
-        ref[4,0,0]=(-0.637679352447)*(1+2.*(dim-1.)/(o+1.))+(1.87404355948)*dim
-        ref[4,0,1]=(-1.41003779811)*(1+2.*(dim-1.)/(o+1.))+(0.956756299709)*dim
-        ref[4,1,0]=(-0.303017167297)*(1+2.*(dim-1.)/(o+1.))+(-1.89130348195)*dim
-        ref[4,1,1]=(0.539001756993)*(1+2.*(dim-1.)/(o+1.))+(0.735413000173)*dim
-        ref[5,0,0]=(1.78586601194)*(1+2.*(dim-1.)/(o+1.))+(-0.79810217308)*dim
-        ref[5,0,1]=(-1.0914995357)*(1+2.*(dim-1.)/(o+1.))+(-0.198480102871)*dim
-        ref[5,1,0]=(1.90781359949)*(1+2.*(dim-1.)/(o+1.))+(-0.530721411887)*dim
-        ref[5,1,1]=(0.918900154108)*(1+2.*(dim-1.)/(o+1.))+(1.10787066642)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.181966612335)*x[0]**o+(-0.461883712153)*x[0]+(-0.420217253531)*x[1]**o+(0.52197109374)*x[1]
-        arg[0,0,0,1]=(-0.122704378373)*x[0]**o+(0.549708706786)*x[0]+(-0.728108908074)*x[1]**o+(-0.839262748545)*x[1]
-        arg[0,0,1,0]=(0.58557741427)*x[0]**o+(-0.970633305521)*x[0]+(0.215513381389)*x[1]**o+(-0.178877868196)*x[1]
-        arg[0,0,1,1]=(0.646118894595)*x[0]**o+(0.839917605008)*x[0]+(-0.608843960266)*x[1]**o+(-0.840842208189)*x[1]
-        arg[0,0,2,0]=(-0.126004594384)*x[0]**o+(0.663487355648)*x[0]+(0.801751176464)*x[1]**o+(-0.76620842256)*x[1]
-        arg[0,0,2,1]=(-0.244425023768)*x[0]**o+(0.736809513316)*x[0]+(0.736776514098)*x[1]**o+(0.382648973627)*x[1]
-        arg[0,1,0,0]=(-0.264460763052)*x[0]**o+(-0.325868872518)*x[0]+(-0.0636203008538)*x[1]**o+(-0.398059740187)*x[1]
-        arg[0,1,0,1]=(0.443639751435)*x[0]**o+(0.523903519493)*x[0]+(-0.222575248757)*x[1]**o+(-0.168203019401)*x[1]
-        arg[0,1,1,0]=(-0.329523829258)*x[0]**o+(-0.908408437436)*x[0]+(0.695441587034)*x[1]**o+(-0.236957609006)*x[1]
-        arg[0,1,1,1]=(-0.57363301023)*x[0]**o+(-0.168677045141)*x[0]+(0.455235475098)*x[1]**o+(-0.498803217861)*x[1]
-        arg[0,1,2,0]=(0.09906404243)*x[0]**o+(0.48682122702)*x[0]+(-0.250940180366)*x[1]**o+(-0.641013418008)*x[1]
-        arg[0,1,2,1]=(-0.963193555161)*x[0]**o+(0.129868691037)*x[0]+(0.821192174481)*x[1]**o+(-0.245576703223)*x[1]
-        arg[0,2,0,0]=(-0.867410251576)*x[0]**o+(0.170194043006)*x[0]+(0.837669366536)*x[1]**o+(0.285772890787)*x[1]
-        arg[0,2,0,1]=(0.767089114154)*x[0]**o+(-0.425174482112)*x[0]+(-0.460840645159)*x[1]**o+(-0.314295694392)*x[1]
-        arg[0,2,1,0]=(-0.932934920269)*x[0]**o+(0.399552332498)*x[0]+(-0.137764102275)*x[1]**o+(-0.0375128952657)*x[1]
-        arg[0,2,1,1]=(0.507999826854)*x[0]**o+(-0.60826518686)*x[0]+(0.766838061511)*x[1]**o+(0.800723296773)*x[1]
-        arg[0,2,2,0]=(0.372064864992)*x[0]**o+(0.29029476011)*x[0]+(0.203299629846)*x[1]**o+(-0.386357855884)*x[1]
-        arg[0,2,2,1]=(0.661268311956)*x[0]**o+(0.60257115577)*x[0]+(0.88881711536)*x[1]**o+(0.335431084294)*x[1]
-        arg[0,3,0,0]=(-0.756295024079)*x[0]**o+(-0.982472476783)*x[0]+(-0.264060825724)*x[1]**o+(0.082684535426)*x[1]
-        arg[0,3,0,1]=(0.514580120205)*x[0]**o+(0.524816925461)*x[0]+(-0.745096223094)*x[1]**o+(-0.0796881815577)*x[1]
-        arg[0,3,1,0]=(0.597556449974)*x[0]**o+(0.527680495979)*x[0]+(0.517638167762)*x[1]**o+(-0.357836534374)*x[1]
-        arg[0,3,1,1]=(0.354366560101)*x[0]**o+(-0.617697325436)*x[0]+(0.339071431286)*x[1]**o+(0.299934132319)*x[1]
-        arg[0,3,2,0]=(0.26563455123)*x[0]**o+(0.821495614519)*x[0]+(0.177496963332)*x[1]**o+(-0.154521746257)*x[1]
-        arg[0,3,2,1]=(0.983477388632)*x[0]**o+(0.524806318175)*x[0]+(-0.604096007297)*x[1]**o+(0.350360164328)*x[1]
-        arg[0,4,0,0]=(0.311369778768)*x[0]**o+(-0.648416457513)*x[0]+(0.463469290711)*x[1]**o+(0.0719628828709)*x[1]
-        arg[0,4,0,1]=(-0.743081056195)*x[0]**o+(-0.803573973461)*x[0]+(-0.766982068691)*x[1]**o+(0.387240020398)*x[1]
-        arg[0,4,1,0]=(-0.0715117411345)*x[0]**o+(-0.341871715212)*x[0]+(0.0593378446291)*x[1]**o+(-0.10183864979)*x[1]
-        arg[0,4,1,1]=(0.538850329978)*x[0]**o+(0.0280201497914)*x[0]+(0.350206859589)*x[1]**o+(0.316831165676)*x[1]
-        arg[0,4,2,0]=(-0.327852385434)*x[0]**o+(0.408866306659)*x[0]+(0.940378517318)*x[1]**o+(0.578309623908)*x[1]
-        arg[0,4,2,1]=(0.378380112483)*x[0]**o+(0.696828716067)*x[0]+(-0.908233000582)*x[1]**o+(-0.328611483675)*x[1]
-        arg[1,0,0,0]=(0.753991558436)*x[0]**o+(0.0542891140783)*x[0]+(-0.428934638249)*x[1]**o+(0.318155063446)*x[1]
-        arg[1,0,0,1]=(-0.387609085343)*x[0]**o+(0.711023478158)*x[0]+(-0.969026331169)*x[1]**o+(0.456175434422)*x[1]
-        arg[1,0,1,0]=(-0.468504469917)*x[0]**o+(-0.314756281356)*x[0]+(0.0145647044588)*x[1]**o+(0.074035761055)*x[1]
-        arg[1,0,1,1]=(0.240749620446)*x[0]**o+(0.906736060537)*x[0]+(0.391320123368)*x[1]**o+(-0.261639387239)*x[1]
-        arg[1,0,2,0]=(-0.461436333094)*x[0]**o+(-0.809258428817)*x[0]+(0.0670777162266)*x[1]**o+(-0.445304287721)*x[1]
-        arg[1,0,2,1]=(-0.569794448172)*x[0]**o+(-0.0624052432724)*x[0]+(-0.759840810858)*x[1]**o+(-0.609106375016)*x[1]
-        arg[1,1,0,0]=(0.751570143287)*x[0]**o+(0.78189919599)*x[0]+(-0.103246458909)*x[1]**o+(0.732156635312)*x[1]
-        arg[1,1,0,1]=(-0.0126214545951)*x[0]**o+(-0.612853966263)*x[0]+(-0.238555698245)*x[1]**o+(-0.668009933698)*x[1]
-        arg[1,1,1,0]=(0.816325838743)*x[0]**o+(0.545518357738)*x[0]+(0.893296287925)*x[1]**o+(0.694579919864)*x[1]
-        arg[1,1,1,1]=(0.927638834795)*x[0]**o+(0.750347688466)*x[0]+(-0.15924462002)*x[1]**o+(-0.952995938892)*x[1]
-        arg[1,1,2,0]=(0.970761253678)*x[0]**o+(0.205308852313)*x[0]+(0.909209906751)*x[1]**o+(-0.178635180174)*x[1]
-        arg[1,1,2,1]=(-0.632065128479)*x[0]**o+(-0.300905398347)*x[0]+(0.865317638002)*x[1]**o+(0.886398250669)*x[1]
-        arg[1,2,0,0]=(-0.0529293620539)*x[0]**o+(-0.909022003179)*x[0]+(0.235231916345)*x[1]**o+(-0.623380752415)*x[1]
-        arg[1,2,0,1]=(0.873344987616)*x[0]**o+(0.144231546529)*x[0]+(0.307375566381)*x[1]**o+(-0.201617507084)*x[1]
-        arg[1,2,1,0]=(-0.957945047658)*x[0]**o+(-0.432955474381)*x[0]+(0.0742288164869)*x[1]**o+(-0.106080430366)*x[1]
-        arg[1,2,1,1]=(-0.664227561512)*x[0]**o+(0.0821007781774)*x[0]+(-0.541506076231)*x[1]**o+(-0.88307957937)*x[1]
-        arg[1,2,2,0]=(0.754702675232)*x[0]**o+(0.175176916913)*x[0]+(0.519607893979)*x[1]**o+(-0.24129526204)*x[1]
-        arg[1,2,2,1]=(-0.415660998528)*x[0]**o+(-0.964071393069)*x[0]+(0.458656303526)*x[1]**o+(0.752153826846)*x[1]
-        arg[1,3,0,0]=(-0.15638393187)*x[0]**o+(0.0828824719)*x[0]+(-0.0846205011509)*x[1]**o+(-0.438939463736)*x[1]
-        arg[1,3,0,1]=(0.222994482074)*x[0]**o+(-0.488426101986)*x[0]+(-0.799262651825)*x[1]**o+(0.0638880385288)*x[1]
-        arg[1,3,1,0]=(0.690529298963)*x[0]**o+(-0.845248154386)*x[0]+(0.748635110096)*x[1]**o+(0.820882250869)*x[1]
-        arg[1,3,1,1]=(-0.0989162396328)*x[0]**o+(-0.171252734498)*x[0]+(-0.363447812361)*x[1]**o+(-0.06937701403)*x[1]
-        arg[1,3,2,0]=(-0.739647298124)*x[0]**o+(-0.83384135572)*x[0]+(0.546124768813)*x[1]**o+(0.415761104064)*x[1]
-        arg[1,3,2,1]=(0.859487140106)*x[0]**o+(0.481214854724)*x[0]+(0.788685241166)*x[1]**o+(-0.776410333263)*x[1]
-        arg[1,4,0,0]=(-0.312428038681)*x[0]**o+(-0.178596293803)*x[0]+(-0.229770546807)*x[1]**o+(-0.43765633326)*x[1]
-        arg[1,4,0,1]=(-0.974305286188)*x[0]**o+(-0.978154435248)*x[0]+(-0.671799350916)*x[1]**o+(0.645287291694)*x[1]
-        arg[1,4,1,0]=(-0.219711371151)*x[0]**o+(-0.432784911532)*x[0]+(0.552940388883)*x[1]**o+(-0.622742205614)*x[1]
-        arg[1,4,1,1]=(0.677289749287)*x[0]**o+(-0.92825132284)*x[0]+(0.818767358259)*x[1]**o+(-0.426000012305)*x[1]
-        arg[1,4,2,0]=(-0.507474696573)*x[0]**o+(0.0882151625837)*x[0]+(0.826611187078)*x[1]**o+(0.157884229299)*x[1]
-        arg[1,4,2,1]=(0.902398378671)*x[0]**o+(-0.372679984773)*x[0]+(-0.998272135687)*x[1]**o+(0.292294917465)*x[1]
-        arg[2,0,0,0]=(0.699035433674)*x[0]**o+(0.380640017665)*x[0]+(-0.650735771214)*x[1]**o+(-0.55187467604)*x[1]
-        arg[2,0,0,1]=(0.703438074924)*x[0]**o+(0.795508285134)*x[0]+(-0.0650847718675)*x[1]**o+(-0.0250766383001)*x[1]
-        arg[2,0,1,0]=(0.493174434488)*x[0]**o+(-0.775523541313)*x[0]+(0.23184619496)*x[1]**o+(0.343368328234)*x[1]
-        arg[2,0,1,1]=(0.404974280918)*x[0]**o+(0.0673627086244)*x[0]+(-0.843957699955)*x[1]**o+(0.645895713789)*x[1]
-        arg[2,0,2,0]=(0.985047143685)*x[0]**o+(0.969582300743)*x[0]+(0.929427858098)*x[1]**o+(-0.951787413112)*x[1]
-        arg[2,0,2,1]=(0.618505056215)*x[0]**o+(0.685760720523)*x[0]+(0.14594727158)*x[1]**o+(0.816579780815)*x[1]
-        arg[2,1,0,0]=(0.0824953418089)*x[0]**o+(-0.896753351387)*x[0]+(0.415841596602)*x[1]**o+(0.349436600222)*x[1]
-        arg[2,1,0,1]=(-0.904246301273)*x[0]**o+(0.51403543319)*x[0]+(0.0950147832662)*x[1]**o+(0.0482220256459)*x[1]
-        arg[2,1,1,0]=(0.653418547332)*x[0]**o+(0.703094950575)*x[0]+(-0.294924381355)*x[1]**o+(0.889408306649)*x[1]
-        arg[2,1,1,1]=(-0.329361050221)*x[0]**o+(-0.93072021487)*x[0]+(0.0845194032793)*x[1]**o+(-0.310617126183)*x[1]
-        arg[2,1,2,0]=(-0.282371473471)*x[0]**o+(0.387458491178)*x[0]+(0.643908016757)*x[1]**o+(0.303741991451)*x[1]
-        arg[2,1,2,1]=(-0.416872502153)*x[0]**o+(0.373465764073)*x[0]+(-0.90689140487)*x[1]**o+(-0.351052228378)*x[1]
-        arg[2,2,0,0]=(0.494198770026)*x[0]**o+(0.744917026846)*x[0]+(-0.806591346974)*x[1]**o+(-0.812396479226)*x[1]
-        arg[2,2,0,1]=(0.230573331783)*x[0]**o+(-0.449815323831)*x[0]+(-0.662178492084)*x[1]**o+(0.0281786827584)*x[1]
-        arg[2,2,1,0]=(-0.546296599764)*x[0]**o+(-0.457939754236)*x[0]+(-0.0432225723667)*x[1]**o+(0.0431706529852)*x[1]
-        arg[2,2,1,1]=(-0.808174460895)*x[0]**o+(-0.473584203382)*x[0]+(0.567514752294)*x[1]**o+(-0.115780229631)*x[1]
-        arg[2,2,2,0]=(-0.134425008633)*x[0]**o+(-0.103550646345)*x[0]+(-0.588484951305)*x[1]**o+(0.955148281194)*x[1]
-        arg[2,2,2,1]=(0.550095417437)*x[0]**o+(0.943564321046)*x[0]+(-0.990366145789)*x[1]**o+(0.872652302953)*x[1]
-        arg[2,3,0,0]=(0.209341033615)*x[0]**o+(-0.285197252362)*x[0]+(0.961111991429)*x[1]**o+(0.810022268034)*x[1]
-        arg[2,3,0,1]=(0.238319839582)*x[0]**o+(-0.714990515235)*x[0]+(0.0925371590198)*x[1]**o+(0.938145796375)*x[1]
-        arg[2,3,1,0]=(0.889068347007)*x[0]**o+(-0.301904392078)*x[0]+(0.41386941601)*x[1]**o+(-0.973115118701)*x[1]
-        arg[2,3,1,1]=(-0.522083695846)*x[0]**o+(-0.582455208417)*x[0]+(0.725431346859)*x[1]**o+(-0.950157996033)*x[1]
-        arg[2,3,2,0]=(-0.897838142917)*x[0]**o+(0.745488698358)*x[0]+(-0.38910727894)*x[1]**o+(0.614539961316)*x[1]
-        arg[2,3,2,1]=(0.924500645496)*x[0]**o+(-0.68988446876)*x[0]+(-0.466238481805)*x[1]**o+(-0.957703006413)*x[1]
-        arg[2,4,0,0]=(0.280692018949)*x[0]**o+(0.600320489083)*x[0]+(-0.402390231845)*x[1]**o+(0.906721159456)*x[1]
-        arg[2,4,0,1]=(0.50594574787)*x[0]**o+(0.130986910768)*x[0]+(0.272643351394)*x[1]**o+(0.53790545383)*x[1]
-        arg[2,4,1,0]=(-0.627308461808)*x[0]**o+(0.690560028115)*x[0]+(-0.455768647207)*x[1]**o+(0.134926199015)*x[1]
-        arg[2,4,1,1]=(-0.501163279392)*x[0]**o+(0.980144824993)*x[0]+(-0.0358930723173)*x[1]**o+(0.720157452357)*x[1]
-        arg[2,4,2,0]=(-0.609861117539)*x[0]**o+(0.965699461849)*x[0]+(0.305674136837)*x[1]**o+(-0.578333683729)*x[1]
-        arg[2,4,2,1]=(-0.921051416627)*x[0]**o+(-0.703479746028)*x[0]+(-0.0189027931731)*x[1]**o+(0.403415497212)*x[1]
-        arg[3,0,0,0]=(-0.846266714886)*x[0]**o+(-0.103621657972)*x[0]+(0.217340457606)*x[1]**o+(-0.537654290693)*x[1]
-        arg[3,0,0,1]=(0.186251745403)*x[0]**o+(0.694458841658)*x[0]+(0.126837362883)*x[1]**o+(0.0997502401792)*x[1]
-        arg[3,0,1,0]=(0.153737843143)*x[0]**o+(0.811590040899)*x[0]+(0.189363446699)*x[1]**o+(0.00688399857093)*x[1]
-        arg[3,0,1,1]=(-0.912444421339)*x[0]**o+(-0.68504171198)*x[0]+(-0.820717153919)*x[1]**o+(-0.00475951426309)*x[1]
-        arg[3,0,2,0]=(0.908522439455)*x[0]**o+(-0.911126936858)*x[0]+(0.0424198145962)*x[1]**o+(-0.352097158128)*x[1]
-        arg[3,0,2,1]=(0.935127271967)*x[0]**o+(0.154700792222)*x[0]+(-0.283148208173)*x[1]**o+(-0.607541482501)*x[1]
-        arg[3,1,0,0]=(-0.131329160543)*x[0]**o+(0.24170180662)*x[0]+(-0.00893591013587)*x[1]**o+(0.262635048958)*x[1]
-        arg[3,1,0,1]=(-0.559200924561)*x[0]**o+(0.509310116425)*x[0]+(0.484486720282)*x[1]**o+(-0.89314080386)*x[1]
-        arg[3,1,1,0]=(0.355094442114)*x[0]**o+(-0.748398915688)*x[0]+(-0.379187476624)*x[1]**o+(0.447409858108)*x[1]
-        arg[3,1,1,1]=(0.170855109103)*x[0]**o+(-0.48925054508)*x[0]+(0.840559727559)*x[1]**o+(0.0359562471889)*x[1]
-        arg[3,1,2,0]=(0.827586094521)*x[0]**o+(0.0231820503547)*x[0]+(0.457192172855)*x[1]**o+(0.826960230377)*x[1]
-        arg[3,1,2,1]=(-0.962890676345)*x[0]**o+(-0.112439391098)*x[0]+(-0.865510686025)*x[1]**o+(-0.539059426684)*x[1]
-        arg[3,2,0,0]=(-0.165030011664)*x[0]**o+(-0.285694090419)*x[0]+(-0.522579583443)*x[1]**o+(0.73946640768)*x[1]
-        arg[3,2,0,1]=(0.809351962503)*x[0]**o+(-0.872047628102)*x[0]+(0.61415433255)*x[1]**o+(0.132268088986)*x[1]
-        arg[3,2,1,0]=(-0.587823544835)*x[0]**o+(-0.416092975475)*x[0]+(0.829027070431)*x[1]**o+(0.805271620727)*x[1]
-        arg[3,2,1,1]=(-0.0107935093527)*x[0]**o+(0.988434287979)*x[0]+(0.941743055822)*x[1]**o+(0.137807879334)*x[1]
-        arg[3,2,2,0]=(-0.855931527408)*x[0]**o+(0.575075608849)*x[0]+(0.11916967111)*x[1]**o+(-0.472844336533)*x[1]
-        arg[3,2,2,1]=(-0.542112514875)*x[0]**o+(0.081308081083)*x[0]+(-0.934575648869)*x[1]**o+(-0.218208369535)*x[1]
-        arg[3,3,0,0]=(0.486635391195)*x[0]**o+(0.995728500002)*x[0]+(-0.686767180456)*x[1]**o+(0.246849483855)*x[1]
-        arg[3,3,0,1]=(-0.331571848212)*x[0]**o+(0.801870431206)*x[0]+(-0.91142654055)*x[1]**o+(0.089854528457)*x[1]
-        arg[3,3,1,0]=(-0.657455652936)*x[0]**o+(-0.721466128651)*x[0]+(0.0420989631458)*x[1]**o+(-0.982316453325)*x[1]
-        arg[3,3,1,1]=(-0.709257565086)*x[0]**o+(0.689028730506)*x[0]+(-0.196516960475)*x[1]**o+(-0.216704841188)*x[1]
-        arg[3,3,2,0]=(-0.910547650394)*x[0]**o+(-0.977471949987)*x[0]+(0.37319115353)*x[1]**o+(-0.248978955796)*x[1]
-        arg[3,3,2,1]=(-0.71025804576)*x[0]**o+(0.373559860529)*x[0]+(-0.9064074733)*x[1]**o+(-0.542012058073)*x[1]
-        arg[3,4,0,0]=(-0.649273580176)*x[0]**o+(0.525784948768)*x[0]+(-0.213929862516)*x[1]**o+(-0.162295172275)*x[1]
-        arg[3,4,0,1]=(0.209784328978)*x[0]**o+(-0.972601183002)*x[0]+(-0.730886568265)*x[1]**o+(0.966415518759)*x[1]
-        arg[3,4,1,0]=(-0.334060094293)*x[0]**o+(0.29371522739)*x[0]+(0.936156150108)*x[1]**o+(-0.257026769476)*x[1]
-        arg[3,4,1,1]=(-0.0465451767064)*x[0]**o+(0.115525862669)*x[0]+(0.891280073228)*x[1]**o+(-0.0436233989979)*x[1]
-        arg[3,4,2,0]=(-0.748697989123)*x[0]**o+(0.246672415445)*x[0]+(0.62642302161)*x[1]**o+(-0.411644161038)*x[1]
-        arg[3,4,2,1]=(0.850132316298)*x[0]**o+(0.939463534845)*x[0]+(0.0437756618735)*x[1]**o+(-0.955198146074)*x[1]
-        ref[0,0,0,0]=(-0.238250641196)*(1+2.*(dim-1.)/(o+1.))+(0.0600873815876)*dim
-        ref[0,0,0,1]=(-0.850813286447)*(1+2.*(dim-1.)/(o+1.))+(-0.28955404176)*dim
-        ref[0,0,1,0]=(0.801090795659)*(1+2.*(dim-1.)/(o+1.))+(-1.14951117372)*dim
-        ref[0,0,1,1]=(0.0372749343294)*(1+2.*(dim-1.)/(o+1.))+(-0.000924603180129)*dim
-        ref[0,0,2,0]=(0.675746582079)*(1+2.*(dim-1.)/(o+1.))+(-0.102721066912)*dim
-        ref[0,0,2,1]=(0.49235149033)*(1+2.*(dim-1.)/(o+1.))+(1.11945848694)*dim
-        ref[0,1,0,0]=(-0.328081063906)*(1+2.*(dim-1.)/(o+1.))+(-0.723928612706)*dim
-        ref[0,1,0,1]=(0.221064502678)*(1+2.*(dim-1.)/(o+1.))+(0.355700500092)*dim
-        ref[0,1,1,0]=(0.365917757777)*(1+2.*(dim-1.)/(o+1.))+(-1.14536604644)*dim
-        ref[0,1,1,1]=(-0.118397535132)*(1+2.*(dim-1.)/(o+1.))+(-0.667480263002)*dim
-        ref[0,1,2,0]=(-0.151876137936)*(1+2.*(dim-1.)/(o+1.))+(-0.154192190988)*dim
-        ref[0,1,2,1]=(-0.14200138068)*(1+2.*(dim-1.)/(o+1.))+(-0.115708012186)*dim
-        ref[0,2,0,0]=(-0.0297408850402)*(1+2.*(dim-1.)/(o+1.))+(0.455966933793)*dim
-        ref[0,2,0,1]=(0.306248468995)*(1+2.*(dim-1.)/(o+1.))+(-0.739470176504)*dim
-        ref[0,2,1,0]=(-1.07069902254)*(1+2.*(dim-1.)/(o+1.))+(0.362039437233)*dim
-        ref[0,2,1,1]=(1.27483788836)*(1+2.*(dim-1.)/(o+1.))+(0.192458109913)*dim
-        ref[0,2,2,0]=(0.575364494839)*(1+2.*(dim-1.)/(o+1.))+(-0.0960630957749)*dim
-        ref[0,2,2,1]=(1.55008542732)*(1+2.*(dim-1.)/(o+1.))+(0.938002240064)*dim
-        ref[0,3,0,0]=(-1.0203558498)*(1+2.*(dim-1.)/(o+1.))+(-0.899787941357)*dim
-        ref[0,3,0,1]=(-0.230516102889)*(1+2.*(dim-1.)/(o+1.))+(0.445128743903)*dim
-        ref[0,3,1,0]=(1.11519461774)*(1+2.*(dim-1.)/(o+1.))+(0.169843961604)*dim
-        ref[0,3,1,1]=(0.693437991388)*(1+2.*(dim-1.)/(o+1.))+(-0.317763193117)*dim
-        ref[0,3,2,0]=(0.443131514562)*(1+2.*(dim-1.)/(o+1.))+(0.666973868262)*dim
-        ref[0,3,2,1]=(0.379381381335)*(1+2.*(dim-1.)/(o+1.))+(0.875166482503)*dim
-        ref[0,4,0,0]=(0.774839069479)*(1+2.*(dim-1.)/(o+1.))+(-0.576453574642)*dim
-        ref[0,4,0,1]=(-1.51006312489)*(1+2.*(dim-1.)/(o+1.))+(-0.416333953063)*dim
-        ref[0,4,1,0]=(-0.0121738965054)*(1+2.*(dim-1.)/(o+1.))+(-0.443710365002)*dim
-        ref[0,4,1,1]=(0.889057189568)*(1+2.*(dim-1.)/(o+1.))+(0.344851315468)*dim
-        ref[0,4,2,0]=(0.612526131884)*(1+2.*(dim-1.)/(o+1.))+(0.987175930567)*dim
-        ref[0,4,2,1]=(-0.529852888099)*(1+2.*(dim-1.)/(o+1.))+(0.368217232392)*dim
-        ref[1,0,0,0]=(0.325056920187)*(1+2.*(dim-1.)/(o+1.))+(0.372444177524)*dim
-        ref[1,0,0,1]=(-1.35663541651)*(1+2.*(dim-1.)/(o+1.))+(1.16719891258)*dim
-        ref[1,0,1,0]=(-0.453939765458)*(1+2.*(dim-1.)/(o+1.))+(-0.240720520301)*dim
-        ref[1,0,1,1]=(0.632069743814)*(1+2.*(dim-1.)/(o+1.))+(0.645096673298)*dim
-        ref[1,0,2,0]=(-0.394358616867)*(1+2.*(dim-1.)/(o+1.))+(-1.25456271654)*dim
-        ref[1,0,2,1]=(-1.32963525903)*(1+2.*(dim-1.)/(o+1.))+(-0.671511618288)*dim
-        ref[1,1,0,0]=(0.648323684378)*(1+2.*(dim-1.)/(o+1.))+(1.5140558313)*dim
-        ref[1,1,0,1]=(-0.251177152841)*(1+2.*(dim-1.)/(o+1.))+(-1.28086389996)*dim
-        ref[1,1,1,0]=(1.70962212667)*(1+2.*(dim-1.)/(o+1.))+(1.2400982776)*dim
-        ref[1,1,1,1]=(0.768394214775)*(1+2.*(dim-1.)/(o+1.))+(-0.202648250425)*dim
-        ref[1,1,2,0]=(1.87997116043)*(1+2.*(dim-1.)/(o+1.))+(0.0266736721392)*dim
-        ref[1,1,2,1]=(0.233252509524)*(1+2.*(dim-1.)/(o+1.))+(0.585492852322)*dim
-        ref[1,2,0,0]=(0.182302554291)*(1+2.*(dim-1.)/(o+1.))+(-1.53240275559)*dim
-        ref[1,2,0,1]=(1.180720554)*(1+2.*(dim-1.)/(o+1.))+(-0.0573859605549)*dim
-        ref[1,2,1,0]=(-0.883716231171)*(1+2.*(dim-1.)/(o+1.))+(-0.539035904746)*dim
-        ref[1,2,1,1]=(-1.20573363774)*(1+2.*(dim-1.)/(o+1.))+(-0.800978801193)*dim
-        ref[1,2,2,0]=(1.27431056921)*(1+2.*(dim-1.)/(o+1.))+(-0.066118345127)*dim
-        ref[1,2,2,1]=(0.0429953049979)*(1+2.*(dim-1.)/(o+1.))+(-0.211917566223)*dim
-        ref[1,3,0,0]=(-0.241004433021)*(1+2.*(dim-1.)/(o+1.))+(-0.356056991836)*dim
-        ref[1,3,0,1]=(-0.576268169751)*(1+2.*(dim-1.)/(o+1.))+(-0.424538063457)*dim
-        ref[1,3,1,0]=(1.43916440906)*(1+2.*(dim-1.)/(o+1.))+(-0.0243659035174)*dim
-        ref[1,3,1,1]=(-0.462364051993)*(1+2.*(dim-1.)/(o+1.))+(-0.240629748528)*dim
-        ref[1,3,2,0]=(-0.193522529311)*(1+2.*(dim-1.)/(o+1.))+(-0.418080251656)*dim
-        ref[1,3,2,1]=(1.64817238127)*(1+2.*(dim-1.)/(o+1.))+(-0.295195478539)*dim
-        ref[1,4,0,0]=(-0.542198585489)*(1+2.*(dim-1.)/(o+1.))+(-0.616252627062)*dim
-        ref[1,4,0,1]=(-1.6461046371)*(1+2.*(dim-1.)/(o+1.))+(-0.332867143554)*dim
-        ref[1,4,1,0]=(0.333229017732)*(1+2.*(dim-1.)/(o+1.))+(-1.05552711715)*dim
-        ref[1,4,1,1]=(1.49605710755)*(1+2.*(dim-1.)/(o+1.))+(-1.35425133515)*dim
-        ref[1,4,2,0]=(0.319136490505)*(1+2.*(dim-1.)/(o+1.))+(0.246099391883)*dim
-        ref[1,4,2,1]=(-0.0958737570155)*(1+2.*(dim-1.)/(o+1.))+(-0.0803850673082)*dim
-        ref[2,0,0,0]=(0.0482996624604)*(1+2.*(dim-1.)/(o+1.))+(-0.171234658375)*dim
-        ref[2,0,0,1]=(0.638353303057)*(1+2.*(dim-1.)/(o+1.))+(0.770431646834)*dim
-        ref[2,0,1,0]=(0.725020629449)*(1+2.*(dim-1.)/(o+1.))+(-0.432155213079)*dim
-        ref[2,0,1,1]=(-0.438983419037)*(1+2.*(dim-1.)/(o+1.))+(0.713258422414)*dim
-        ref[2,0,2,0]=(1.91447500178)*(1+2.*(dim-1.)/(o+1.))+(0.0177948876308)*dim
-        ref[2,0,2,1]=(0.764452327795)*(1+2.*(dim-1.)/(o+1.))+(1.50234050134)*dim
-        ref[2,1,0,0]=(0.498336938411)*(1+2.*(dim-1.)/(o+1.))+(-0.547316751164)*dim
-        ref[2,1,0,1]=(-0.809231518007)*(1+2.*(dim-1.)/(o+1.))+(0.562257458836)*dim
-        ref[2,1,1,0]=(0.358494165977)*(1+2.*(dim-1.)/(o+1.))+(1.59250325722)*dim
-        ref[2,1,1,1]=(-0.244841646941)*(1+2.*(dim-1.)/(o+1.))+(-1.24133734105)*dim
-        ref[2,1,2,0]=(0.361536543287)*(1+2.*(dim-1.)/(o+1.))+(0.691200482629)*dim
-        ref[2,1,2,1]=(-1.32376390702)*(1+2.*(dim-1.)/(o+1.))+(0.0224135356952)*dim
-        ref[2,2,0,0]=(-0.312392576948)*(1+2.*(dim-1.)/(o+1.))+(-0.06747945238)*dim
-        ref[2,2,0,1]=(-0.431605160301)*(1+2.*(dim-1.)/(o+1.))+(-0.421636641073)*dim
-        ref[2,2,1,0]=(-0.589519172131)*(1+2.*(dim-1.)/(o+1.))+(-0.414769101251)*dim
-        ref[2,2,1,1]=(-0.240659708601)*(1+2.*(dim-1.)/(o+1.))+(-0.589364433013)*dim
-        ref[2,2,2,0]=(-0.722909959939)*(1+2.*(dim-1.)/(o+1.))+(0.851597634849)*dim
-        ref[2,2,2,1]=(-0.440270728352)*(1+2.*(dim-1.)/(o+1.))+(1.816216624)*dim
-        ref[2,3,0,0]=(1.17045302504)*(1+2.*(dim-1.)/(o+1.))+(0.524825015672)*dim
-        ref[2,3,0,1]=(0.330856998602)*(1+2.*(dim-1.)/(o+1.))+(0.22315528114)*dim
-        ref[2,3,1,0]=(1.30293776302)*(1+2.*(dim-1.)/(o+1.))+(-1.27501951078)*dim
-        ref[2,3,1,1]=(0.203347651013)*(1+2.*(dim-1.)/(o+1.))+(-1.53261320445)*dim
-        ref[2,3,2,0]=(-1.28694542186)*(1+2.*(dim-1.)/(o+1.))+(1.36002865967)*dim
-        ref[2,3,2,1]=(0.458262163691)*(1+2.*(dim-1.)/(o+1.))+(-1.64758747517)*dim
-        ref[2,4,0,0]=(-0.121698212896)*(1+2.*(dim-1.)/(o+1.))+(1.50704164854)*dim
-        ref[2,4,0,1]=(0.778589099264)*(1+2.*(dim-1.)/(o+1.))+(0.668892364598)*dim
-        ref[2,4,1,0]=(-1.08307710902)*(1+2.*(dim-1.)/(o+1.))+(0.82548622713)*dim
-        ref[2,4,1,1]=(-0.537056351709)*(1+2.*(dim-1.)/(o+1.))+(1.70030227735)*dim
-        ref[2,4,2,0]=(-0.304186980702)*(1+2.*(dim-1.)/(o+1.))+(0.38736577812)*dim
-        ref[2,4,2,1]=(-0.9399542098)*(1+2.*(dim-1.)/(o+1.))+(-0.300064248815)*dim
-        ref[3,0,0,0]=(-0.62892625728)*(1+2.*(dim-1.)/(o+1.))+(-0.641275948665)*dim
-        ref[3,0,0,1]=(0.313089108286)*(1+2.*(dim-1.)/(o+1.))+(0.794209081837)*dim
-        ref[3,0,1,0]=(0.343101289842)*(1+2.*(dim-1.)/(o+1.))+(0.81847403947)*dim
-        ref[3,0,1,1]=(-1.73316157526)*(1+2.*(dim-1.)/(o+1.))+(-0.689801226243)*dim
-        ref[3,0,2,0]=(0.950942254051)*(1+2.*(dim-1.)/(o+1.))+(-1.26322409499)*dim
-        ref[3,0,2,1]=(0.651979063795)*(1+2.*(dim-1.)/(o+1.))+(-0.452840690279)*dim
-        ref[3,1,0,0]=(-0.140265070679)*(1+2.*(dim-1.)/(o+1.))+(0.504336855579)*dim
-        ref[3,1,0,1]=(-0.074714204279)*(1+2.*(dim-1.)/(o+1.))+(-0.383830687435)*dim
-        ref[3,1,1,0]=(-0.0240930345095)*(1+2.*(dim-1.)/(o+1.))+(-0.30098905758)*dim
-        ref[3,1,1,1]=(1.01141483666)*(1+2.*(dim-1.)/(o+1.))+(-0.453294297891)*dim
-        ref[3,1,2,0]=(1.28477826738)*(1+2.*(dim-1.)/(o+1.))+(0.850142280731)*dim
-        ref[3,1,2,1]=(-1.82840136237)*(1+2.*(dim-1.)/(o+1.))+(-0.651498817783)*dim
-        ref[3,2,0,0]=(-0.687609595107)*(1+2.*(dim-1.)/(o+1.))+(0.453772317262)*dim
-        ref[3,2,0,1]=(1.42350629505)*(1+2.*(dim-1.)/(o+1.))+(-0.739779539116)*dim
-        ref[3,2,1,0]=(0.241203525596)*(1+2.*(dim-1.)/(o+1.))+(0.389178645253)*dim
-        ref[3,2,1,1]=(0.930949546469)*(1+2.*(dim-1.)/(o+1.))+(1.12624216731)*dim
-        ref[3,2,2,0]=(-0.736761856298)*(1+2.*(dim-1.)/(o+1.))+(0.102231272315)*dim
-        ref[3,2,2,1]=(-1.47668816374)*(1+2.*(dim-1.)/(o+1.))+(-0.136900288452)*dim
-        ref[3,3,0,0]=(-0.200131789262)*(1+2.*(dim-1.)/(o+1.))+(1.24257798386)*dim
-        ref[3,3,0,1]=(-1.24299838876)*(1+2.*(dim-1.)/(o+1.))+(0.891724959663)*dim
-        ref[3,3,1,0]=(-0.61535668979)*(1+2.*(dim-1.)/(o+1.))+(-1.70378258198)*dim
-        ref[3,3,1,1]=(-0.905774525561)*(1+2.*(dim-1.)/(o+1.))+(0.472323889318)*dim
-        ref[3,3,2,0]=(-0.537356496864)*(1+2.*(dim-1.)/(o+1.))+(-1.22645090578)*dim
-        ref[3,3,2,1]=(-1.61666551906)*(1+2.*(dim-1.)/(o+1.))+(-0.168452197544)*dim
-        ref[3,4,0,0]=(-0.863203442693)*(1+2.*(dim-1.)/(o+1.))+(0.363489776493)*dim
-        ref[3,4,0,1]=(-0.521102239287)*(1+2.*(dim-1.)/(o+1.))+(-0.00618566424301)*dim
-        ref[3,4,1,0]=(0.602096055815)*(1+2.*(dim-1.)/(o+1.))+(0.0366884579134)*dim
-        ref[3,4,1,1]=(0.844734896522)*(1+2.*(dim-1.)/(o+1.))+(0.0719024636709)*dim
-        ref[3,4,2,0]=(-0.122274967513)*(1+2.*(dim-1.)/(o+1.))+(-0.164971745593)*dim
-        ref[3,4,2,1]=(0.893907978172)*(1+2.*(dim-1.)/(o+1.))+(-0.0157346112292)*dim
-      else:
-        arg[0,0,0,0]=(-0.0445963085788)*x[0]**o+(0.649401127647)*x[0]+(-0.949035518207)*x[1]**o+(0.620675629012)*x[1]+(0.379727527503)*x[2]**o+(0.0321033403935)*x[2]
-        arg[0,0,0,1]=(-0.334483142061)*x[0]**o+(-0.408749824143)*x[0]+(-0.427042441291)*x[1]**o+(-0.263818177378)*x[1]+(-0.0490001897328)*x[2]**o+(0.925792628022)*x[2]
-        arg[0,0,1,0]=(0.632498844224)*x[0]**o+(-0.756487058254)*x[0]+(-0.0277391041902)*x[1]**o+(0.615017171892)*x[1]+(-0.0956053270216)*x[2]**o+(-0.0383148218356)*x[2]
-        arg[0,0,1,1]=(0.560189295143)*x[0]**o+(-0.565632451768)*x[0]+(0.131609132282)*x[1]**o+(0.689012872903)*x[1]+(-0.0542418297927)*x[2]**o+(-0.816694105058)*x[2]
-        arg[0,0,2,0]=(-0.606523401606)*x[0]**o+(-0.129782638438)*x[0]+(0.286554604329)*x[1]**o+(-0.264164004519)*x[1]+(-0.145168356054)*x[2]**o+(0.346147680755)*x[2]
-        arg[0,0,2,1]=(-0.847528471559)*x[0]**o+(-0.50641170288)*x[0]+(-0.773325001399)*x[1]**o+(0.517649361249)*x[1]+(-0.531000881434)*x[2]**o+(0.220222077563)*x[2]
-        arg[0,1,0,0]=(-0.0946495378384)*x[0]**o+(-0.312650449416)*x[0]+(0.183321918505)*x[1]**o+(-0.359448777446)*x[1]+(0.713219915733)*x[2]**o+(-0.436742264028)*x[2]
-        arg[0,1,0,1]=(0.856947337921)*x[0]**o+(0.497228192699)*x[0]+(0.351718755501)*x[1]**o+(-0.928210477058)*x[1]+(0.586853747677)*x[2]**o+(-0.915642724205)*x[2]
-        arg[0,1,1,0]=(-0.745330469339)*x[0]**o+(-0.724610807566)*x[0]+(0.821804346007)*x[1]**o+(0.241991559492)*x[1]+(0.508380905493)*x[2]**o+(0.756706999359)*x[2]
-        arg[0,1,1,1]=(-0.647952004012)*x[0]**o+(0.940964624139)*x[0]+(-0.620895246845)*x[1]**o+(0.577736885116)*x[1]+(0.228716730257)*x[2]**o+(0.336914427419)*x[2]
-        arg[0,1,2,0]=(-0.671541115529)*x[0]**o+(0.153595444626)*x[0]+(0.420649971716)*x[1]**o+(-0.459078302559)*x[1]+(-0.583263239511)*x[2]**o+(-0.927250932344)*x[2]
-        arg[0,1,2,1]=(-0.893954406097)*x[0]**o+(0.266297374506)*x[0]+(-0.777463374391)*x[1]**o+(0.0905062188555)*x[1]+(-0.668756964585)*x[2]**o+(-0.580980380472)*x[2]
-        arg[0,2,0,0]=(0.424449538697)*x[0]**o+(0.0787502268502)*x[0]+(-0.645996834851)*x[1]**o+(-0.0409730346273)*x[1]+(0.835463212243)*x[2]**o+(0.716052012249)*x[2]
-        arg[0,2,0,1]=(0.0241441154932)*x[0]**o+(-0.580242261617)*x[0]+(0.693484316968)*x[1]**o+(0.198598746328)*x[1]+(-0.586283866696)*x[2]**o+(-0.595008846645)*x[2]
-        arg[0,2,1,0]=(0.074643270363)*x[0]**o+(0.454053362138)*x[0]+(0.861855819289)*x[1]**o+(-0.0310194739742)*x[1]+(-0.35738290172)*x[2]**o+(-0.400226698584)*x[2]
-        arg[0,2,1,1]=(0.61780464269)*x[0]**o+(-0.702818770068)*x[0]+(0.0840653474306)*x[1]**o+(0.786842849442)*x[1]+(0.0704342755849)*x[2]**o+(0.386459053939)*x[2]
-        arg[0,2,2,0]=(-0.815363379053)*x[0]**o+(-0.621823615812)*x[0]+(-0.13535005543)*x[1]**o+(-0.127080917834)*x[1]+(-0.178866000441)*x[2]**o+(-0.0753933476244)*x[2]
-        arg[0,2,2,1]=(0.400194366678)*x[0]**o+(0.075003395019)*x[0]+(-0.35708995046)*x[1]**o+(-0.370028795924)*x[1]+(-0.674944523932)*x[2]**o+(-0.437373855225)*x[2]
-        arg[0,3,0,0]=(-0.736317751792)*x[0]**o+(0.671627391036)*x[0]+(0.0768737429532)*x[1]**o+(-0.90036869218)*x[1]+(0.796767364925)*x[2]**o+(-0.185034722102)*x[2]
-        arg[0,3,0,1]=(0.530921403378)*x[0]**o+(0.970385957718)*x[0]+(-0.75659968724)*x[1]**o+(-0.437200812366)*x[1]+(0.0519374612092)*x[2]**o+(0.657323406602)*x[2]
-        arg[0,3,1,0]=(-0.109751102222)*x[0]**o+(-0.154990305064)*x[0]+(-0.502004367351)*x[1]**o+(0.535266424739)*x[1]+(-0.968926773395)*x[2]**o+(-0.138032126456)*x[2]
-        arg[0,3,1,1]=(0.509506900641)*x[0]**o+(-0.872357145765)*x[0]+(-0.154129018225)*x[1]**o+(0.0190914956768)*x[1]+(0.119094726078)*x[2]**o+(0.29593674915)*x[2]
-        arg[0,3,2,0]=(-0.133398979819)*x[0]**o+(-0.780852347888)*x[0]+(-0.346576066687)*x[1]**o+(0.187923380934)*x[1]+(0.939817544138)*x[2]**o+(-0.497081081638)*x[2]
-        arg[0,3,2,1]=(-0.908783140711)*x[0]**o+(0.541754659297)*x[0]+(-0.297350066105)*x[1]**o+(0.118676031731)*x[1]+(0.985854358996)*x[2]**o+(-0.424715359194)*x[2]
-        arg[0,4,0,0]=(0.341191520307)*x[0]**o+(-0.252381555804)*x[0]+(-0.307289805415)*x[1]**o+(0.762228901652)*x[1]+(0.390901852611)*x[2]**o+(0.147349139229)*x[2]
-        arg[0,4,0,1]=(0.236625833503)*x[0]**o+(0.856322905978)*x[0]+(-0.160244298088)*x[1]**o+(-0.971940590481)*x[1]+(-0.0829366716357)*x[2]**o+(-0.687610358703)*x[2]
-        arg[0,4,1,0]=(0.619591455739)*x[0]**o+(-0.62589432832)*x[0]+(-0.0275687591477)*x[1]**o+(0.367590198294)*x[1]+(0.745367285277)*x[2]**o+(0.232571513762)*x[2]
-        arg[0,4,1,1]=(0.317669904199)*x[0]**o+(0.741734360559)*x[0]+(-0.923644886773)*x[1]**o+(-0.725994528938)*x[1]+(-0.949385908603)*x[2]**o+(-0.0515088731457)*x[2]
-        arg[0,4,2,0]=(0.82547889841)*x[0]**o+(-0.926970312436)*x[0]+(0.946941744691)*x[1]**o+(-0.171582097545)*x[1]+(-0.185628570945)*x[2]**o+(0.40495393086)*x[2]
-        arg[0,4,2,1]=(0.51879613184)*x[0]**o+(-0.517447781109)*x[0]+(-0.288826585096)*x[1]**o+(-0.736890998485)*x[1]+(-0.167119326999)*x[2]**o+(-0.653082372893)*x[2]
-        arg[1,0,0,0]=(-0.879008868811)*x[0]**o+(-0.0613987509179)*x[0]+(-0.671288168832)*x[1]**o+(-0.959517297906)*x[1]+(0.292554039162)*x[2]**o+(0.942246368678)*x[2]
-        arg[1,0,0,1]=(0.599956815218)*x[0]**o+(0.731601305574)*x[0]+(-0.61593947163)*x[1]**o+(-0.597924796707)*x[1]+(-0.791620695721)*x[2]**o+(-0.562978718552)*x[2]
-        arg[1,0,1,0]=(0.448381207242)*x[0]**o+(-0.178004176549)*x[0]+(0.631841924913)*x[1]**o+(0.311836637044)*x[1]+(0.0619475841251)*x[2]**o+(0.606564490624)*x[2]
-        arg[1,0,1,1]=(0.159907398582)*x[0]**o+(-0.278605461684)*x[0]+(0.822914081538)*x[1]**o+(0.75112795022)*x[1]+(0.91389895436)*x[2]**o+(0.929177149059)*x[2]
-        arg[1,0,2,0]=(-0.472286972241)*x[0]**o+(0.00950883684535)*x[0]+(0.41110884679)*x[1]**o+(0.109422159345)*x[1]+(-0.707436024011)*x[2]**o+(0.795057014561)*x[2]
-        arg[1,0,2,1]=(-0.0156784802605)*x[0]**o+(-0.657283760492)*x[0]+(-0.0422880440635)*x[1]**o+(-0.326436491982)*x[1]+(-0.543917764251)*x[2]**o+(-0.691698129266)*x[2]
-        arg[1,1,0,0]=(-0.814424723604)*x[0]**o+(0.746801606056)*x[0]+(0.22025107532)*x[1]**o+(-0.785254149057)*x[1]+(-0.845637273475)*x[2]**o+(-0.468272754144)*x[2]
-        arg[1,1,0,1]=(-0.0815177460988)*x[0]**o+(-0.47210691717)*x[0]+(-0.285964111717)*x[1]**o+(0.527387496664)*x[1]+(0.87059583429)*x[2]**o+(-0.543899395468)*x[2]
-        arg[1,1,1,0]=(0.424163426295)*x[0]**o+(0.649692204305)*x[0]+(0.0570010318344)*x[1]**o+(-0.426047169951)*x[1]+(0.334750596342)*x[2]**o+(-0.746549570927)*x[2]
-        arg[1,1,1,1]=(-0.120493849358)*x[0]**o+(0.567677110538)*x[0]+(-0.355891513526)*x[1]**o+(0.68069794787)*x[1]+(0.786560156246)*x[2]**o+(-0.422804642829)*x[2]
-        arg[1,1,2,0]=(-0.80298202932)*x[0]**o+(-0.674766348751)*x[0]+(-0.29945072468)*x[1]**o+(0.385941328636)*x[1]+(-0.756272624651)*x[2]**o+(-0.607541099269)*x[2]
-        arg[1,1,2,1]=(0.915020713521)*x[0]**o+(-0.875957199283)*x[0]+(0.0217597029367)*x[1]**o+(-0.0649461013997)*x[1]+(-0.302450259541)*x[2]**o+(0.738498325526)*x[2]
-        arg[1,2,0,0]=(0.239905462913)*x[0]**o+(0.197348893262)*x[0]+(-0.151173414577)*x[1]**o+(0.368405558905)*x[1]+(0.891448032058)*x[2]**o+(0.874975769684)*x[2]
-        arg[1,2,0,1]=(-0.304971614823)*x[0]**o+(-0.0166065674003)*x[0]+(0.883397157318)*x[1]**o+(-0.918803270424)*x[1]+(0.590875856583)*x[2]**o+(-0.360659400522)*x[2]
-        arg[1,2,1,0]=(0.185368540041)*x[0]**o+(0.498866146124)*x[0]+(0.591601152982)*x[1]**o+(-0.986932631453)*x[1]+(-0.525706872664)*x[2]**o+(-0.0462993899877)*x[2]
-        arg[1,2,1,1]=(0.260677894495)*x[0]**o+(-0.216847258131)*x[0]+(0.932876363707)*x[1]**o+(0.761630676808)*x[1]+(0.260889221066)*x[2]**o+(0.546259908582)*x[2]
-        arg[1,2,2,0]=(-0.316803600202)*x[0]**o+(-0.898044300642)*x[0]+(-0.0865001657852)*x[1]**o+(0.760424275199)*x[1]+(0.771564532427)*x[2]**o+(-0.0852237819025)*x[2]
-        arg[1,2,2,1]=(-0.54274371504)*x[0]**o+(0.0822524750896)*x[0]+(0.872655885939)*x[1]**o+(0.594054041006)*x[1]+(0.322150325252)*x[2]**o+(0.774020612668)*x[2]
-        arg[1,3,0,0]=(0.034593806358)*x[0]**o+(0.541638857337)*x[0]+(0.291359214696)*x[1]**o+(-0.203872730757)*x[1]+(0.0312260615928)*x[2]**o+(0.62568815669)*x[2]
-        arg[1,3,0,1]=(-0.31929050432)*x[0]**o+(-0.931756481553)*x[0]+(0.755537511071)*x[1]**o+(-0.182578278538)*x[1]+(0.00958902784528)*x[2]**o+(0.345520390047)*x[2]
-        arg[1,3,1,0]=(-0.435083251076)*x[0]**o+(0.248332963857)*x[0]+(-0.122701495966)*x[1]**o+(0.669350594899)*x[1]+(-0.0758596665333)*x[2]**o+(0.0784997907526)*x[2]
-        arg[1,3,1,1]=(-0.725479421981)*x[0]**o+(0.657242746138)*x[0]+(-0.199958263735)*x[1]**o+(-0.784165440236)*x[1]+(-0.550936676647)*x[2]**o+(-0.31907813038)*x[2]
-        arg[1,3,2,0]=(0.657177346512)*x[0]**o+(-0.168053866293)*x[0]+(0.782142168258)*x[1]**o+(0.660514922866)*x[1]+(0.788106295165)*x[2]**o+(-0.254290645125)*x[2]
-        arg[1,3,2,1]=(-0.215166688682)*x[0]**o+(0.743577328376)*x[0]+(-0.374827404054)*x[1]**o+(0.267885661143)*x[1]+(0.728818301014)*x[2]**o+(0.6828999278)*x[2]
-        arg[1,4,0,0]=(0.371646403413)*x[0]**o+(0.00998777673275)*x[0]+(-0.313378345871)*x[1]**o+(-0.952580545501)*x[1]+(-0.680596974717)*x[2]**o+(-0.181426263871)*x[2]
-        arg[1,4,0,1]=(-0.828437965469)*x[0]**o+(0.302443878606)*x[0]+(0.581310358652)*x[1]**o+(0.714092786618)*x[1]+(0.650179420347)*x[2]**o+(0.663482256421)*x[2]
-        arg[1,4,1,0]=(0.220318191456)*x[0]**o+(0.443108440795)*x[0]+(-0.538413779146)*x[1]**o+(0.660052783252)*x[1]+(-0.846698606343)*x[2]**o+(-0.0447806256913)*x[2]
-        arg[1,4,1,1]=(0.866921895372)*x[0]**o+(0.776291161128)*x[0]+(-0.385318933957)*x[1]**o+(0.841514060614)*x[1]+(-0.401465329431)*x[2]**o+(0.474475442638)*x[2]
-        arg[1,4,2,0]=(-0.222535436657)*x[0]**o+(0.921341450452)*x[0]+(-0.765043798058)*x[1]**o+(-0.492946667792)*x[1]+(0.758817008648)*x[2]**o+(0.0950595321909)*x[2]
-        arg[1,4,2,1]=(0.333884542089)*x[0]**o+(0.671265678974)*x[0]+(-0.719262407869)*x[1]**o+(0.498176251457)*x[1]+(-0.867726438404)*x[2]**o+(-0.872614195608)*x[2]
-        arg[2,0,0,0]=(-0.303331399994)*x[0]**o+(-0.563887060818)*x[0]+(0.64537626236)*x[1]**o+(-0.657611314342)*x[1]+(0.800882746828)*x[2]**o+(0.700671892157)*x[2]
-        arg[2,0,0,1]=(0.417691239931)*x[0]**o+(-0.822789801933)*x[0]+(0.712214951539)*x[1]**o+(0.160960575173)*x[1]+(0.0400205244239)*x[2]**o+(0.49892939112)*x[2]
-        arg[2,0,1,0]=(-0.828677767124)*x[0]**o+(-0.347411290435)*x[0]+(-0.700177402223)*x[1]**o+(-0.42498634463)*x[1]+(0.984172081328)*x[2]**o+(-0.677168643292)*x[2]
-        arg[2,0,1,1]=(-0.423091398412)*x[0]**o+(-0.786913239913)*x[0]+(-0.888102258019)*x[1]**o+(-0.119525894432)*x[1]+(-0.158513498081)*x[2]**o+(0.503403674219)*x[2]
-        arg[2,0,2,0]=(0.547217868614)*x[0]**o+(-0.737401808325)*x[0]+(-0.865530737659)*x[1]**o+(-0.750671412749)*x[1]+(-0.06731420082)*x[2]**o+(0.658572191108)*x[2]
-        arg[2,0,2,1]=(0.501785022047)*x[0]**o+(-0.0542441989122)*x[0]+(-0.379614025724)*x[1]**o+(-0.785618793316)*x[1]+(0.994476365391)*x[2]**o+(-0.436996817494)*x[2]
-        arg[2,1,0,0]=(0.0329439903445)*x[0]**o+(0.688097592632)*x[0]+(0.554030860489)*x[1]**o+(0.60949736297)*x[1]+(0.499716171437)*x[2]**o+(0.501464282299)*x[2]
-        arg[2,1,0,1]=(0.459629414019)*x[0]**o+(0.810658146454)*x[0]+(-0.902023596001)*x[1]**o+(-0.982998009297)*x[1]+(0.487736529196)*x[2]**o+(-0.509164692477)*x[2]
-        arg[2,1,1,0]=(0.0818151896334)*x[0]**o+(-0.931023788966)*x[0]+(-0.217349745187)*x[1]**o+(-0.785586110912)*x[1]+(0.16783052001)*x[2]**o+(-0.515867681053)*x[2]
-        arg[2,1,1,1]=(-0.758874975703)*x[0]**o+(0.219408816573)*x[0]+(0.508187203896)*x[1]**o+(0.306700464008)*x[1]+(-0.641891226105)*x[2]**o+(-0.137752888266)*x[2]
-        arg[2,1,2,0]=(-0.952430879482)*x[0]**o+(0.179895758684)*x[0]+(0.502285174801)*x[1]**o+(-0.82300826605)*x[1]+(-0.267848001419)*x[2]**o+(-0.882529775244)*x[2]
-        arg[2,1,2,1]=(0.371372868601)*x[0]**o+(-0.521801538326)*x[0]+(0.894906517432)*x[1]**o+(0.205799057307)*x[1]+(-0.315840560279)*x[2]**o+(0.65823096555)*x[2]
-        arg[2,2,0,0]=(0.585088762354)*x[0]**o+(0.527662713737)*x[0]+(0.83511043292)*x[1]**o+(-0.263597549489)*x[1]+(-0.342210974079)*x[2]**o+(0.532149528802)*x[2]
-        arg[2,2,0,1]=(0.985868978475)*x[0]**o+(0.162798954854)*x[0]+(-0.887525429296)*x[1]**o+(0.618905848201)*x[1]+(-0.213643353241)*x[2]**o+(0.0170513098359)*x[2]
-        arg[2,2,1,0]=(-0.216402064475)*x[0]**o+(0.350853951704)*x[0]+(0.592219675443)*x[1]**o+(-0.915293916561)*x[1]+(0.160588856435)*x[2]**o+(-0.574686420146)*x[2]
-        arg[2,2,1,1]=(0.233118497878)*x[0]**o+(0.482035958353)*x[0]+(-0.581971661478)*x[1]**o+(0.832450520208)*x[1]+(-0.430914444794)*x[2]**o+(-0.791658025494)*x[2]
-        arg[2,2,2,0]=(-0.710516844)*x[0]**o+(0.0266391730256)*x[0]+(-0.154541997151)*x[1]**o+(-0.232843778379)*x[1]+(0.453522207498)*x[2]**o+(-0.688939516711)*x[2]
-        arg[2,2,2,1]=(0.26860058468)*x[0]**o+(-0.969638661751)*x[0]+(0.623784614857)*x[1]**o+(0.686359051774)*x[1]+(0.677056704385)*x[2]**o+(0.156688176847)*x[2]
-        arg[2,3,0,0]=(-0.0620909841534)*x[0]**o+(-0.364946660535)*x[0]+(-0.388275430806)*x[1]**o+(-0.947908160286)*x[1]+(0.0774302410344)*x[2]**o+(0.374469033649)*x[2]
-        arg[2,3,0,1]=(0.164845147121)*x[0]**o+(0.480213031852)*x[0]+(0.58157030274)*x[1]**o+(0.882820521347)*x[1]+(0.584714825748)*x[2]**o+(0.0285154925376)*x[2]
-        arg[2,3,1,0]=(0.664711234489)*x[0]**o+(0.247415435607)*x[0]+(0.741592287061)*x[1]**o+(0.963505986041)*x[1]+(-0.987844687003)*x[2]**o+(0.998294459659)*x[2]
-        arg[2,3,1,1]=(-0.734529316764)*x[0]**o+(-0.177480004713)*x[0]+(0.923555424779)*x[1]**o+(0.727331498256)*x[1]+(0.452312367674)*x[2]**o+(0.00652243396085)*x[2]
-        arg[2,3,2,0]=(-0.367377897953)*x[0]**o+(-0.157529442804)*x[0]+(-0.121881528621)*x[1]**o+(0.865116726884)*x[1]+(-0.200087079925)*x[2]**o+(0.930889629788)*x[2]
-        arg[2,3,2,1]=(-0.900394562978)*x[0]**o+(-0.762334071565)*x[0]+(-0.723776245294)*x[1]**o+(0.332728994729)*x[1]+(0.390453779523)*x[2]**o+(0.0447350797932)*x[2]
-        arg[2,4,0,0]=(0.178230443819)*x[0]**o+(0.0898732089623)*x[0]+(0.808448952186)*x[1]**o+(0.164579824494)*x[1]+(-0.553032263217)*x[2]**o+(-0.782141879825)*x[2]
-        arg[2,4,0,1]=(-0.105582488753)*x[0]**o+(0.995415696949)*x[0]+(0.978971670365)*x[1]**o+(-0.977866735017)*x[1]+(0.156938966924)*x[2]**o+(-0.120871488936)*x[2]
-        arg[2,4,1,0]=(0.652354601889)*x[0]**o+(0.381186764672)*x[0]+(-0.783479778972)*x[1]**o+(-0.158898829615)*x[1]+(0.794693790129)*x[2]**o+(0.914720093741)*x[2]
-        arg[2,4,1,1]=(0.571506419376)*x[0]**o+(0.906086581152)*x[0]+(-0.798519792125)*x[1]**o+(-0.22840897962)*x[1]+(-0.750891721145)*x[2]**o+(-0.591014038221)*x[2]
-        arg[2,4,2,0]=(0.515982716306)*x[0]**o+(0.299569326845)*x[0]+(-0.407423180268)*x[1]**o+(-0.252103363573)*x[1]+(-0.0228238994531)*x[2]**o+(-0.282150542844)*x[2]
-        arg[2,4,2,1]=(0.5335415942)*x[0]**o+(-0.885728570489)*x[0]+(-0.750810131327)*x[1]**o+(0.604053940679)*x[1]+(-0.0946405866686)*x[2]**o+(-0.423845465234)*x[2]
-        arg[3,0,0,0]=(-0.498025341136)*x[0]**o+(-0.296354416633)*x[0]+(-0.600874889655)*x[1]**o+(0.544042300882)*x[1]+(0.318784851038)*x[2]**o+(-0.801109111437)*x[2]
-        arg[3,0,0,1]=(-0.492361949745)*x[0]**o+(-0.708188092599)*x[0]+(-0.863737808435)*x[1]**o+(0.674889485553)*x[1]+(-0.982254652233)*x[2]**o+(0.682172862189)*x[2]
-        arg[3,0,1,0]=(-0.872692397532)*x[0]**o+(0.563852836655)*x[0]+(-0.0219331486599)*x[1]**o+(-0.858175679559)*x[1]+(0.802432631538)*x[2]**o+(-0.655545287387)*x[2]
-        arg[3,0,1,1]=(-0.538117166854)*x[0]**o+(-0.62507518352)*x[0]+(0.101524298816)*x[1]**o+(0.590432448393)*x[1]+(0.668057302006)*x[2]**o+(0.405382330056)*x[2]
-        arg[3,0,2,0]=(-0.322916455064)*x[0]**o+(0.950624857669)*x[0]+(0.485623846818)*x[1]**o+(-0.12611522301)*x[1]+(0.503586393973)*x[2]**o+(0.109451719709)*x[2]
-        arg[3,0,2,1]=(0.0289965995645)*x[0]**o+(0.0101440661359)*x[0]+(-0.303827119958)*x[1]**o+(0.355269935141)*x[1]+(0.29889427526)*x[2]**o+(-0.707999988781)*x[2]
-        arg[3,1,0,0]=(-0.541382521848)*x[0]**o+(0.534108535206)*x[0]+(0.875610773119)*x[1]**o+(-0.575849439451)*x[1]+(-0.0836939606164)*x[2]**o+(0.433678856889)*x[2]
-        arg[3,1,0,1]=(0.0322576144027)*x[0]**o+(0.794219359514)*x[0]+(0.629442621265)*x[1]**o+(0.0517726053499)*x[1]+(-0.776050101686)*x[2]**o+(0.697910196708)*x[2]
-        arg[3,1,1,0]=(-0.198211682395)*x[0]**o+(-0.926268101941)*x[0]+(-0.904760383993)*x[1]**o+(-0.820075667018)*x[1]+(-0.101262044428)*x[2]**o+(-0.0621221772941)*x[2]
-        arg[3,1,1,1]=(-0.531324749521)*x[0]**o+(0.736017207718)*x[0]+(0.487299696259)*x[1]**o+(-0.00604423021253)*x[1]+(-0.635722590088)*x[2]**o+(-0.143501730927)*x[2]
-        arg[3,1,2,0]=(-0.731421637848)*x[0]**o+(-0.0371648783851)*x[0]+(-0.290362466891)*x[1]**o+(-0.375048584106)*x[1]+(-0.854622532092)*x[2]**o+(-0.794295905388)*x[2]
-        arg[3,1,2,1]=(-0.766383422105)*x[0]**o+(0.149248159984)*x[0]+(0.970103674649)*x[1]**o+(-0.117794368107)*x[1]+(0.0178775633047)*x[2]**o+(-0.221126829278)*x[2]
-        arg[3,2,0,0]=(0.706586887601)*x[0]**o+(0.162520023447)*x[0]+(-0.731539880336)*x[1]**o+(-0.992558519713)*x[1]+(0.426569303014)*x[2]**o+(0.0451783819487)*x[2]
-        arg[3,2,0,1]=(0.0392295508272)*x[0]**o+(-0.157929005382)*x[0]+(0.0636418899878)*x[1]**o+(0.892501759578)*x[1]+(-0.368161001401)*x[2]**o+(-0.715520794543)*x[2]
-        arg[3,2,1,0]=(0.889667707133)*x[0]**o+(0.308604168817)*x[0]+(-0.275558663983)*x[1]**o+(-0.408210095215)*x[1]+(-0.0918000869138)*x[2]**o+(0.142754064645)*x[2]
-        arg[3,2,1,1]=(0.585831954407)*x[0]**o+(-0.705004375516)*x[0]+(0.657277099061)*x[1]**o+(-0.972401794257)*x[1]+(-0.658049310396)*x[2]**o+(-0.553961555706)*x[2]
-        arg[3,2,2,0]=(0.88916769079)*x[0]**o+(-0.1401162684)*x[0]+(-0.396496633317)*x[1]**o+(0.215029522669)*x[1]+(-0.619023294208)*x[2]**o+(-0.187670706968)*x[2]
-        arg[3,2,2,1]=(-0.262983340384)*x[0]**o+(-0.763236528477)*x[0]+(-0.339720289405)*x[1]**o+(-0.283077066751)*x[1]+(0.625600522278)*x[2]**o+(-0.132697432298)*x[2]
-        arg[3,3,0,0]=(-0.346408105223)*x[0]**o+(0.299760534041)*x[0]+(0.567951405594)*x[1]**o+(-0.880683463459)*x[1]+(0.784127947661)*x[2]**o+(0.268895744072)*x[2]
-        arg[3,3,0,1]=(0.064159345936)*x[0]**o+(-0.685098798117)*x[0]+(-0.182310885124)*x[1]**o+(-0.700081075257)*x[1]+(0.543959312437)*x[2]**o+(0.125104170434)*x[2]
-        arg[3,3,1,0]=(0.460375837083)*x[0]**o+(0.82355800923)*x[0]+(-0.186000244328)*x[1]**o+(0.8418355439)*x[1]+(-0.375269292115)*x[2]**o+(0.712431840155)*x[2]
-        arg[3,3,1,1]=(0.57260867805)*x[0]**o+(-0.146405851776)*x[0]+(-0.50640779246)*x[1]**o+(0.741760309299)*x[1]+(0.069752390409)*x[2]**o+(-0.376724191471)*x[2]
-        arg[3,3,2,0]=(0.795493408403)*x[0]**o+(0.396861648344)*x[0]+(-0.728716068325)*x[1]**o+(0.739330072416)*x[1]+(0.202019645585)*x[2]**o+(0.841240509566)*x[2]
-        arg[3,3,2,1]=(-0.967372744621)*x[0]**o+(-0.334044549662)*x[0]+(-0.0686982670779)*x[1]**o+(0.180083293629)*x[1]+(-0.208697793793)*x[2]**o+(0.0305446253751)*x[2]
-        arg[3,4,0,0]=(0.94168350996)*x[0]**o+(0.0545532586137)*x[0]+(-0.300430532207)*x[1]**o+(-0.960362884765)*x[1]+(0.738261342527)*x[2]**o+(-0.351477574571)*x[2]
-        arg[3,4,0,1]=(-0.525893857873)*x[0]**o+(0.227252001588)*x[0]+(0.179831911446)*x[1]**o+(0.350952712138)*x[1]+(-0.671550635312)*x[2]**o+(-0.338834217909)*x[2]
-        arg[3,4,1,0]=(-0.60610056656)*x[0]**o+(0.219192673102)*x[0]+(-0.801595717702)*x[1]**o+(-0.696853420225)*x[1]+(-0.495201990047)*x[2]**o+(-0.500683649414)*x[2]
-        arg[3,4,1,1]=(-0.37343020332)*x[0]**o+(-0.585536591527)*x[0]+(0.81794997494)*x[1]**o+(-0.240232527585)*x[1]+(-0.538970681636)*x[2]**o+(-0.146105210473)*x[2]
-        arg[3,4,2,0]=(0.857322149358)*x[0]**o+(-0.552847286493)*x[0]+(0.530970378294)*x[1]**o+(0.0746811386922)*x[1]+(0.946170976628)*x[2]**o+(-0.329916962713)*x[2]
-        arg[3,4,2,1]=(-0.353323100685)*x[0]**o+(0.808796594618)*x[0]+(0.481450588496)*x[1]**o+(0.1202874944)*x[1]+(0.671293736572)*x[2]**o+(-0.905074286629)*x[2]
-        ref[0,0,0,0]=(-0.613904299283)*(1+2.*(dim-1.)/(o+1.))+(1.30218009705)*dim
-        ref[0,0,0,1]=(-0.810525773084)*(1+2.*(dim-1.)/(o+1.))+(0.253224626501)*dim
-        ref[0,0,1,0]=(0.509154413012)*(1+2.*(dim-1.)/(o+1.))+(-0.179784708198)*dim
-        ref[0,0,1,1]=(0.637556597632)*(1+2.*(dim-1.)/(o+1.))+(-0.693313683923)*dim
-        ref[0,0,2,0]=(-0.465137153331)*(1+2.*(dim-1.)/(o+1.))+(-0.0477989622018)*dim
-        ref[0,0,2,1]=(-2.15185435439)*(1+2.*(dim-1.)/(o+1.))+(0.231459735932)*dim
-        ref[0,1,0,0]=(0.8018922964)*(1+2.*(dim-1.)/(o+1.))+(-1.10884149089)*dim
-        ref[0,1,0,1]=(1.7955198411)*(1+2.*(dim-1.)/(o+1.))+(-1.34662500856)*dim
-        ref[0,1,1,0]=(0.584854782162)*(1+2.*(dim-1.)/(o+1.))+(0.274087751285)*dim
-        ref[0,1,1,1]=(-1.0401305206)*(1+2.*(dim-1.)/(o+1.))+(1.85561593667)*dim
-        ref[0,1,2,0]=(-0.834154383324)*(1+2.*(dim-1.)/(o+1.))+(-1.23273379028)*dim
-        ref[0,1,2,1]=(-2.34017474507)*(1+2.*(dim-1.)/(o+1.))+(-0.224176787111)*dim
-        ref[0,2,0,0]=(0.613915916089)*(1+2.*(dim-1.)/(o+1.))+(0.753829204471)*dim
-        ref[0,2,0,1]=(0.131344565765)*(1+2.*(dim-1.)/(o+1.))+(-0.976652361934)*dim
-        ref[0,2,1,0]=(0.579116187931)*(1+2.*(dim-1.)/(o+1.))+(0.0228071895801)*dim
-        ref[0,2,1,1]=(0.772304265705)*(1+2.*(dim-1.)/(o+1.))+(0.470483133313)*dim
-        ref[0,2,2,0]=(-1.12957943492)*(1+2.*(dim-1.)/(o+1.))+(-0.82429788127)*dim
-        ref[0,2,2,1]=(-0.631840107715)*(1+2.*(dim-1.)/(o+1.))+(-0.732399256131)*dim
-        ref[0,3,0,0]=(0.137323356087)*(1+2.*(dim-1.)/(o+1.))+(-0.413776023245)*dim
-        ref[0,3,0,1]=(-0.173740822652)*(1+2.*(dim-1.)/(o+1.))+(1.19050855195)*dim
-        ref[0,3,1,0]=(-1.58068224297)*(1+2.*(dim-1.)/(o+1.))+(0.24224399322)*dim
-        ref[0,3,1,1]=(0.474472608494)*(1+2.*(dim-1.)/(o+1.))+(-0.557328900938)*dim
-        ref[0,3,2,0]=(0.459842497633)*(1+2.*(dim-1.)/(o+1.))+(-1.09001004859)*dim
-        ref[0,3,2,1]=(-0.22027884782)*(1+2.*(dim-1.)/(o+1.))+(0.235715331835)*dim
-        ref[0,4,0,0]=(0.424803567504)*(1+2.*(dim-1.)/(o+1.))+(0.657196485077)*dim
-        ref[0,4,0,1]=(-0.00655513622033)*(1+2.*(dim-1.)/(o+1.))+(-0.803228043207)*dim
-        ref[0,4,1,0]=(1.33738998187)*(1+2.*(dim-1.)/(o+1.))+(-0.0257326162636)*dim
-        ref[0,4,1,1]=(-1.55536089118)*(1+2.*(dim-1.)/(o+1.))+(-0.0357690415245)*dim
-        ref[0,4,2,0]=(1.58679207216)*(1+2.*(dim-1.)/(o+1.))+(-0.693598479122)*dim
-        ref[0,4,2,1]=(0.0628502197447)*(1+2.*(dim-1.)/(o+1.))+(-1.90742115249)*dim
-        ref[1,0,0,0]=(-1.25774299848)*(1+2.*(dim-1.)/(o+1.))+(-0.0786696801461)*dim
-        ref[1,0,0,1]=(-0.807603352133)*(1+2.*(dim-1.)/(o+1.))+(-0.429302209684)*dim
-        ref[1,0,1,0]=(1.14217071628)*(1+2.*(dim-1.)/(o+1.))+(0.740396951119)*dim
-        ref[1,0,1,1]=(1.89672043448)*(1+2.*(dim-1.)/(o+1.))+(1.4016996376)*dim
-        ref[1,0,2,0]=(-0.768614149462)*(1+2.*(dim-1.)/(o+1.))+(0.913988010751)*dim
-        ref[1,0,2,1]=(-0.601884288575)*(1+2.*(dim-1.)/(o+1.))+(-1.67541838174)*dim
-        ref[1,1,0,0]=(-1.43981092176)*(1+2.*(dim-1.)/(o+1.))+(-0.506725297145)*dim
-        ref[1,1,0,1]=(0.503113976474)*(1+2.*(dim-1.)/(o+1.))+(-0.488618815974)*dim
-        ref[1,1,1,0]=(0.815915054472)*(1+2.*(dim-1.)/(o+1.))+(-0.522904536573)*dim
-        ref[1,1,1,1]=(0.310174793362)*(1+2.*(dim-1.)/(o+1.))+(0.825570415579)*dim
-        ref[1,1,2,0]=(-1.85870537865)*(1+2.*(dim-1.)/(o+1.))+(-0.896366119383)*dim
-        ref[1,1,2,1]=(0.634330156916)*(1+2.*(dim-1.)/(o+1.))+(-0.202404975156)*dim
-        ref[1,2,0,0]=(0.980180080393)*(1+2.*(dim-1.)/(o+1.))+(1.44073022185)*dim
-        ref[1,2,0,1]=(1.16930139908)*(1+2.*(dim-1.)/(o+1.))+(-1.29606923835)*dim
-        ref[1,2,1,0]=(0.251262820359)*(1+2.*(dim-1.)/(o+1.))+(-0.534365875316)*dim
-        ref[1,2,1,1]=(1.45444347927)*(1+2.*(dim-1.)/(o+1.))+(1.09104332726)*dim
-        ref[1,2,2,0]=(0.36826076644)*(1+2.*(dim-1.)/(o+1.))+(-0.222843807345)*dim
-        ref[1,2,2,1]=(0.652062496151)*(1+2.*(dim-1.)/(o+1.))+(1.45032712876)*dim
-        ref[1,3,0,0]=(0.357179082647)*(1+2.*(dim-1.)/(o+1.))+(0.96345428327)*dim
-        ref[1,3,0,1]=(0.445836034597)*(1+2.*(dim-1.)/(o+1.))+(-0.768814370045)*dim
-        ref[1,3,1,0]=(-0.633644413575)*(1+2.*(dim-1.)/(o+1.))+(0.996183349509)*dim
-        ref[1,3,1,1]=(-1.47637436236)*(1+2.*(dim-1.)/(o+1.))+(-0.446000824477)*dim
-        ref[1,3,2,0]=(2.22742580994)*(1+2.*(dim-1.)/(o+1.))+(0.238170411449)*dim
-        ref[1,3,2,1]=(0.138824208277)*(1+2.*(dim-1.)/(o+1.))+(1.69436291732)*dim
-        ref[1,4,0,0]=(-0.622328917175)*(1+2.*(dim-1.)/(o+1.))+(-1.12401903264)*dim
-        ref[1,4,0,1]=(0.40305181353)*(1+2.*(dim-1.)/(o+1.))+(1.68001892165)*dim
-        ref[1,4,1,0]=(-1.16479419403)*(1+2.*(dim-1.)/(o+1.))+(1.05838059836)*dim
-        ref[1,4,1,1]=(0.0801376319834)*(1+2.*(dim-1.)/(o+1.))+(2.09228066438)*dim
-        ref[1,4,2,0]=(-0.228762226067)*(1+2.*(dim-1.)/(o+1.))+(0.523454314851)*dim
-        ref[1,4,2,1]=(-1.25310430418)*(1+2.*(dim-1.)/(o+1.))+(0.296827734822)*dim
-        ref[2,0,0,0]=(1.14292760919)*(1+2.*(dim-1.)/(o+1.))+(-0.520826483003)*dim
-        ref[2,0,0,1]=(1.16992671589)*(1+2.*(dim-1.)/(o+1.))+(-0.162899835641)*dim
-        ref[2,0,1,0]=(-0.544683088018)*(1+2.*(dim-1.)/(o+1.))+(-1.44956627836)*dim
-        ref[2,0,1,1]=(-1.46970715451)*(1+2.*(dim-1.)/(o+1.))+(-0.403035460127)*dim
-        ref[2,0,2,0]=(-0.385627069865)*(1+2.*(dim-1.)/(o+1.))+(-0.829501029966)*dim
-        ref[2,0,2,1]=(1.11664736171)*(1+2.*(dim-1.)/(o+1.))+(-1.27685980972)*dim
-        ref[2,1,0,0]=(1.08669102227)*(1+2.*(dim-1.)/(o+1.))+(1.7990592379)*dim
-        ref[2,1,0,1]=(0.0453423472143)*(1+2.*(dim-1.)/(o+1.))+(-0.68150455532)*dim
-        ref[2,1,1,0]=(0.0322959644566)*(1+2.*(dim-1.)/(o+1.))+(-2.23247758093)*dim
-        ref[2,1,1,1]=(-0.892578997912)*(1+2.*(dim-1.)/(o+1.))+(0.388356392315)*dim
-        ref[2,1,2,0]=(-0.7179937061)*(1+2.*(dim-1.)/(o+1.))+(-1.52564228261)*dim
-        ref[2,1,2,1]=(0.950438825754)*(1+2.*(dim-1.)/(o+1.))+(0.342228484532)*dim
-        ref[2,2,0,0]=(1.0779882212)*(1+2.*(dim-1.)/(o+1.))+(0.796214693049)*dim
-        ref[2,2,0,1]=(-0.115299804062)*(1+2.*(dim-1.)/(o+1.))+(0.798756112891)*dim
-        ref[2,2,1,0]=(0.536406467403)*(1+2.*(dim-1.)/(o+1.))+(-1.139126385)*dim
-        ref[2,2,1,1]=(-0.779767608394)*(1+2.*(dim-1.)/(o+1.))+(0.522828453067)*dim
-        ref[2,2,2,0]=(-0.411536633652)*(1+2.*(dim-1.)/(o+1.))+(-0.895144122064)*dim
-        ref[2,2,2,1]=(1.56944190392)*(1+2.*(dim-1.)/(o+1.))+(-0.12659143313)*dim
-        ref[2,3,0,0]=(-0.372936173925)*(1+2.*(dim-1.)/(o+1.))+(-0.938385787171)*dim
-        ref[2,3,0,1]=(1.33113027561)*(1+2.*(dim-1.)/(o+1.))+(1.39154904574)*dim
-        ref[2,3,1,0]=(0.418458834548)*(1+2.*(dim-1.)/(o+1.))+(2.20921588131)*dim
-        ref[2,3,1,1]=(0.64133847569)*(1+2.*(dim-1.)/(o+1.))+(0.556373927504)*dim
-        ref[2,3,2,0]=(-0.689346506499)*(1+2.*(dim-1.)/(o+1.))+(1.63847691387)*dim
-        ref[2,3,2,1]=(-1.23371702875)*(1+2.*(dim-1.)/(o+1.))+(-0.384869997042)*dim
-        ref[2,4,0,0]=(0.433647132788)*(1+2.*(dim-1.)/(o+1.))+(-0.527688846368)*dim
-        ref[2,4,0,1]=(1.03032814854)*(1+2.*(dim-1.)/(o+1.))+(-0.103322527004)*dim
-        ref[2,4,1,0]=(0.663568613046)*(1+2.*(dim-1.)/(o+1.))+(1.1370080288)*dim
-        ref[2,4,1,1]=(-0.977905093893)*(1+2.*(dim-1.)/(o+1.))+(0.0866635633103)*dim
-        ref[2,4,2,0]=(0.085735636585)*(1+2.*(dim-1.)/(o+1.))+(-0.234684579572)*dim
-        ref[2,4,2,1]=(-0.311909123795)*(1+2.*(dim-1.)/(o+1.))+(-0.705520095044)*dim
-        ref[3,0,0,0]=(-0.780115379753)*(1+2.*(dim-1.)/(o+1.))+(-0.553421227188)*dim
-        ref[3,0,0,1]=(-2.33835441041)*(1+2.*(dim-1.)/(o+1.))+(0.648874255143)*dim
-        ref[3,0,1,0]=(-0.0921929146543)*(1+2.*(dim-1.)/(o+1.))+(-0.949868130291)*dim
-        ref[3,0,1,1]=(0.231464433969)*(1+2.*(dim-1.)/(o+1.))+(0.370739594929)*dim
-        ref[3,0,2,0]=(0.666293785727)*(1+2.*(dim-1.)/(o+1.))+(0.933961354368)*dim
-        ref[3,0,2,1]=(0.0240637548661)*(1+2.*(dim-1.)/(o+1.))+(-0.342585987504)*dim
-        ref[3,1,0,0]=(0.250534290654)*(1+2.*(dim-1.)/(o+1.))+(0.391937952644)*dim
-        ref[3,1,0,1]=(-0.114349866018)*(1+2.*(dim-1.)/(o+1.))+(1.54390216157)*dim
-        ref[3,1,1,0]=(-1.20423411082)*(1+2.*(dim-1.)/(o+1.))+(-1.80846594625)*dim
-        ref[3,1,1,1]=(-0.679747643349)*(1+2.*(dim-1.)/(o+1.))+(0.586471246578)*dim
-        ref[3,1,2,0]=(-1.87640663683)*(1+2.*(dim-1.)/(o+1.))+(-1.20650936788)*dim
-        ref[3,1,2,1]=(0.221597815849)*(1+2.*(dim-1.)/(o+1.))+(-0.189673037401)*dim
-        ref[3,2,0,0]=(0.40161631028)*(1+2.*(dim-1.)/(o+1.))+(-0.784860114318)*dim
-        ref[3,2,0,1]=(-0.265289560586)*(1+2.*(dim-1.)/(o+1.))+(0.0190519596518)*dim
-        ref[3,2,1,0]=(0.522308956237)*(1+2.*(dim-1.)/(o+1.))+(0.0431481382473)*dim
-        ref[3,2,1,1]=(0.585059743072)*(1+2.*(dim-1.)/(o+1.))+(-2.23136772548)*dim
-        ref[3,2,2,0]=(-0.126352236735)*(1+2.*(dim-1.)/(o+1.))+(-0.112757452698)*dim
-        ref[3,2,2,1]=(0.0228968924883)*(1+2.*(dim-1.)/(o+1.))+(-1.17901102753)*dim
-        ref[3,3,0,0]=(1.00567124803)*(1+2.*(dim-1.)/(o+1.))+(-0.312027185345)*dim
-        ref[3,3,0,1]=(0.425807773249)*(1+2.*(dim-1.)/(o+1.))+(-1.26007570294)*dim
-        ref[3,3,1,0]=(-0.10089369936)*(1+2.*(dim-1.)/(o+1.))+(2.37782539328)*dim
-        ref[3,3,1,1]=(0.135953275999)*(1+2.*(dim-1.)/(o+1.))+(0.218630266051)*dim
-        ref[3,3,2,0]=(0.268796985663)*(1+2.*(dim-1.)/(o+1.))+(1.97743223033)*dim
-        ref[3,3,2,1]=(-1.24476880549)*(1+2.*(dim-1.)/(o+1.))+(-0.123416630658)*dim
-        ref[3,4,0,0]=(1.37951432028)*(1+2.*(dim-1.)/(o+1.))+(-1.25728720072)*dim
-        ref[3,4,0,1]=(-1.01761258174)*(1+2.*(dim-1.)/(o+1.))+(0.239370495817)*dim
-        ref[3,4,1,0]=(-1.90289827431)*(1+2.*(dim-1.)/(o+1.))+(-0.978344396537)*dim
-        ref[3,4,1,1]=(-0.0944509100161)*(1+2.*(dim-1.)/(o+1.))+(-0.971874329585)*dim
-        ref[3,4,2,0]=(2.33446350428)*(1+2.*(dim-1.)/(o+1.))+(-0.808083110513)*dim
-        ref[3,4,2,1]=(0.799421224383)*(1+2.*(dim-1.)/(o+1.))+(0.0240098023897)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      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.0177156089276)*x[0]+(-1.07750293477)*x[1]
-        ref=(0.674554765151)*(1+2.*(dim-1.)/(o+1.))+(-1.76977330884)*dim
-      else:
-        arg=(0.304688056778)*x[0]+(0.548485298428)*x[1]+(0.672370309114)*x[2]
-        ref=(0.0121419382123)*(1+2.*(dim-1.)/(o+1.))+(1.51340172611)*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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(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]=(-1.81332918209)*x[0]+(0.825631690982)*x[1]
-        arg[1]=(0.568335098118)*x[0]+(-0.504485431124)*x[1]
-        ref[0]=(0.0338855214148)*(1+2.*(dim-1.)/(o+1.))+(-1.02158301252)*dim
-        ref[1]=(0.348045520014)*(1+2.*(dim-1.)/(o+1.))+(-0.284195853019)*dim
-      else:
-        arg[0]=(-0.34247651789)*x[0]+(0.952434108232)*x[1]+(0.956872478767)*x[2]
-        arg[1]=(-0.73212870207)*x[0]+(1.25659546958)*x[1]+(-0.690842998605)*x[2]
-        ref[0]=(1.22184577749)*(1+2.*(dim-1.)/(o+1.))+(0.344984291617)*dim
-        ref[1]=(-0.600249739257)*(1+2.*(dim-1.)/(o+1.))+(0.433873508162)*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_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
-      """
-      tests integral of rank 2 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-1.78262197231)*x[0]+(1.45174573417)*x[1]
-        arg[0,1]=(0.213586223199)*x[0]+(-0.917876059198)*x[1]
-        arg[0,2]=(-1.12034819339)*x[0]+(0.59993130233)*x[1]
-        arg[0,3]=(-0.156732957083)*x[0]+(0.744660873695)*x[1]
-        arg[0,4]=(0.217327014577)*x[0]+(1.40157420042)*x[1]
-        arg[1,0]=(0.0588042984116)*x[0]+(1.40376148561)*x[1]
-        arg[1,1]=(-0.264973303233)*x[0]+(1.77692483003)*x[1]
-        arg[1,2]=(-1.17910097102)*x[0]+(-1.20301960774)*x[1]
-        arg[1,3]=(-0.511409983468)*x[0]+(-1.02065230228)*x[1]
-        arg[1,4]=(1.1254497221)*x[0]+(-1.23163629376)*x[1]
-        arg[2,0]=(-0.780207200735)*x[0]+(-1.49983791458)*x[1]
-        arg[2,1]=(0.20679132359)*x[0]+(0.640203014983)*x[1]
-        arg[2,2]=(0.198135205267)*x[0]+(0.30781411018)*x[1]
-        arg[2,3]=(0.465906968942)*x[0]+(-0.812198212)*x[1]
-        arg[2,4]=(0.190357350559)*x[0]+(-1.5894498455)*x[1]
-        arg[3,0]=(-1.1362863086)*x[0]+(-0.0654142353086)*x[1]
-        arg[3,1]=(0.0545924852084)*x[0]+(0.00262152155818)*x[1]
-        arg[3,2]=(-0.0497600832907)*x[0]+(-0.609396009303)*x[1]
-        arg[3,3]=(0.347834191962)*x[0]+(-0.768159599963)*x[1]
-        arg[3,4]=(-0.178383166761)*x[0]+(-0.0690942212822)*x[1]
-        ref[0,0]=(0.0436748214249)*(1+2.*(dim-1.)/(o+1.))+(-0.374551059559)*dim
-        ref[0,1]=(-1.05854206043)*(1+2.*(dim-1.)/(o+1.))+(0.354252224435)*dim
-        ref[0,2]=(-0.71782952995)*(1+2.*(dim-1.)/(o+1.))+(0.197412638885)*dim
-        ref[0,3]=(-0.255252590976)*(1+2.*(dim-1.)/(o+1.))+(0.843180507587)*dim
-        ref[0,4]=(0.177908820578)*(1+2.*(dim-1.)/(o+1.))+(1.44099239442)*dim
-        ref[1,0]=(1.56040501086)*(1+2.*(dim-1.)/(o+1.))+(-0.0978392268304)*dim
-        ref[1,1]=(1.33164571828)*(1+2.*(dim-1.)/(o+1.))+(0.180305808513)*dim
-        ref[1,2]=(-0.885397553926)*(1+2.*(dim-1.)/(o+1.))+(-1.49672302484)*dim
-        ref[1,3]=(0.105451964854)*(1+2.*(dim-1.)/(o+1.))+(-1.63751425061)*dim
-        ref[1,4]=(-0.774237262923)*(1+2.*(dim-1.)/(o+1.))+(0.668050691269)*dim
-        ref[2,0]=(-0.626493344552)*(1+2.*(dim-1.)/(o+1.))+(-1.65355177076)*dim
-        ref[2,1]=(0.383826450148)*(1+2.*(dim-1.)/(o+1.))+(0.463167888425)*dim
-        ref[2,2]=(-0.530241676713)*(1+2.*(dim-1.)/(o+1.))+(1.03619099216)*dim
-        ref[2,3]=(-1.18245389658)*(1+2.*(dim-1.)/(o+1.))+(0.836162653525)*dim
-        ref[2,4]=(-1.32396763993)*(1+2.*(dim-1.)/(o+1.))+(-0.0751248550082)*dim
-        ref[3,0]=(0.15610314985)*(1+2.*(dim-1.)/(o+1.))+(-1.35780369376)*dim
-        ref[3,1]=(-0.376931239611)*(1+2.*(dim-1.)/(o+1.))+(0.434145246378)*dim
-        ref[3,2]=(0.0188741177717)*(1+2.*(dim-1.)/(o+1.))+(-0.678030210365)*dim
-        ref[3,3]=(-0.264501990209)*(1+2.*(dim-1.)/(o+1.))+(-0.155823417792)*dim
-        ref[3,4]=(-0.394609208758)*(1+2.*(dim-1.)/(o+1.))+(0.147131820715)*dim
-      else:
-        arg[0,0]=(-1.55600852596)*x[0]+(-0.624393737912)*x[1]+(-0.747032596279)*x[2]
-        arg[0,1]=(0.158636782846)*x[0]+(-0.751760245066)*x[1]+(-1.62081735864)*x[2]
-        arg[0,2]=(1.18083264152)*x[0]+(-1.16696814878)*x[1]+(-0.567354369023)*x[2]
-        arg[0,3]=(0.176344525636)*x[0]+(-0.825319538089)*x[1]+(0.32760822446)*x[2]
-        arg[0,4]=(0.570849136808)*x[0]+(-0.86277959325)*x[1]+(-0.253106033513)*x[2]
-        arg[1,0]=(0.325475826081)*x[0]+(0.338988467638)*x[1]+(-0.596090654044)*x[2]
-        arg[1,1]=(-1.29950586693)*x[0]+(-0.980591079821)*x[1]+(-0.7995507704)*x[2]
-        arg[1,2]=(0.108948096835)*x[0]+(0.323001832704)*x[1]+(1.09678982473)*x[2]
-        arg[1,3]=(-0.0307191696266)*x[0]+(0.134014984197)*x[1]+(-0.271363693134)*x[2]
-        arg[1,4]=(0.0166805959434)*x[0]+(-0.323260440667)*x[1]+(-0.0168023639197)*x[2]
-        arg[2,0]=(1.66243206086)*x[0]+(-0.478403313987)*x[1]+(1.45469230407)*x[2]
-        arg[2,1]=(0.635927142861)*x[0]+(0.00628277747568)*x[1]+(-0.335502970321)*x[2]
-        arg[2,2]=(-0.168440428449)*x[0]+(-0.302470381257)*x[1]+(1.26059253147)*x[2]
-        arg[2,3]=(-0.0183286590129)*x[0]+(-0.0950506276918)*x[1]+(-0.721364110928)*x[2]
-        arg[2,4]=(-1.04551179644)*x[0]+(0.20728433783)*x[1]+(-0.631521487025)*x[2]
-        arg[3,0]=(1.0112442447)*x[0]+(0.0279472213885)*x[1]+(-1.24445628735)*x[2]
-        arg[3,1]=(-1.36197290176)*x[0]+(0.145431495907)*x[1]+(0.518562214899)*x[2]
-        arg[3,2]=(-0.249567074212)*x[0]+(-1.02991047199)*x[1]+(1.34627546588)*x[2]
-        arg[3,3]=(1.72315708213)*x[0]+(0.00515532937983)*x[1]+(-0.479917704073)*x[2]
-        arg[3,4]=(1.16297504595)*x[0]+(-0.176518851423)*x[1]+(0.184727222764)*x[2]
-        ref[0,0]=(-2.09480681002)*(1+2.*(dim-1.)/(o+1.))+(-0.832628050126)*dim
-        ref[0,1]=(-0.759565702286)*(1+2.*(dim-1.)/(o+1.))+(-1.45437511857)*dim
-        ref[0,2]=(-1.08318812741)*(1+2.*(dim-1.)/(o+1.))+(0.529698251127)*dim
-        ref[0,3]=(1.48988138495)*(1+2.*(dim-1.)/(o+1.))+(-1.81124817294)*dim
-        ref[0,4]=(0.116706866039)*(1+2.*(dim-1.)/(o+1.))+(-0.661743355994)*dim
-        ref[1,0]=(0.584176790043)*(1+2.*(dim-1.)/(o+1.))+(-0.515803150369)*dim
-        ref[1,1]=(-1.25638916576)*(1+2.*(dim-1.)/(o+1.))+(-1.82325855139)*dim
-        ref[1,2]=(-0.276318333951)*(1+2.*(dim-1.)/(o+1.))+(1.80505808822)*dim
-        ref[1,3]=(-0.732277841606)*(1+2.*(dim-1.)/(o+1.))+(0.564209963043)*dim
-        ref[1,4]=(-0.540285295646)*(1+2.*(dim-1.)/(o+1.))+(0.216903087004)*dim
-        ref[2,0]=(2.23339929969)*(1+2.*(dim-1.)/(o+1.))+(0.405321751257)*dim
-        ref[2,1]=(0.706137929075)*(1+2.*(dim-1.)/(o+1.))+(-0.39943097906)*dim
-        ref[2,2]=(-0.474421381251)*(1+2.*(dim-1.)/(o+1.))+(1.26410310301)*dim
-        ref[2,3]=(1.43870260444)*(1+2.*(dim-1.)/(o+1.))+(-2.27344600207)*dim
-        ref[2,4]=(-1.00154864599)*(1+2.*(dim-1.)/(o+1.))+(-0.468200299646)*dim
-        ref[3,0]=(-1.42181650401)*(1+2.*(dim-1.)/(o+1.))+(1.21655168275)*dim
-        ref[3,1]=(-0.853191175508)*(1+2.*(dim-1.)/(o+1.))+(0.155211984554)*dim
-        ref[3,2]=(-0.823496284217)*(1+2.*(dim-1.)/(o+1.))+(0.890294203901)*dim
-        ref[3,3]=(1.54168027082)*(1+2.*(dim-1.)/(o+1.))+(-0.293285563378)*dim
-        ref[3,4]=(1.66366656195)*(1+2.*(dim-1.)/(o+1.))+(-0.492483144667)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.775903850503)*x[0]+(0.20657985447)*x[1]
-        arg[0,0,1]=(1.42793412139)*x[0]+(1.11703130088)*x[1]
-        arg[0,1,0]=(1.89750028353)*x[0]+(1.77903425203)*x[1]
-        arg[0,1,1]=(-0.67280619036)*x[0]+(-0.283600511942)*x[1]
-        arg[1,0,0]=(0.12590667282)*x[0]+(-0.109778270548)*x[1]
-        arg[1,0,1]=(-1.06454156291)*x[0]+(-0.952754071628)*x[1]
-        arg[1,1,0]=(1.27939438243)*x[0]+(1.41358757535)*x[1]
-        arg[1,1,1]=(-1.68847666929)*x[0]+(-0.13467497005)*x[1]
-        arg[2,0,0]=(0.116194220064)*x[0]+(0.457728827844)*x[1]
-        arg[2,0,1]=(0.205487821412)*x[0]+(-0.657189976052)*x[1]
-        arg[2,1,0]=(0.276192450801)*x[0]+(0.998191496643)*x[1]
-        arg[2,1,1]=(1.63929218914)*x[0]+(0.268648283241)*x[1]
-        arg[3,0,0]=(-0.419114071163)*x[0]+(-0.365697048391)*x[1]
-        arg[3,0,1]=(0.802747458947)*x[0]+(0.137023645119)*x[1]
-        arg[3,1,0]=(-0.0712635889142)*x[0]+(0.495489688269)*x[1]
-        arg[3,1,1]=(-0.559073395964)*x[0]+(0.248364992354)*x[1]
-        arg[4,0,0]=(0.372130696656)*x[0]+(1.22892579337)*x[1]
-        arg[4,0,1]=(-1.47944537272)*x[0]+(1.46750125425)*x[1]
-        arg[4,1,0]=(-0.0683410762004)*x[0]+(0.0982446782745)*x[1]
-        arg[4,1,1]=(0.0698227670903)*x[0]+(0.227875508249)*x[1]
-        arg[5,0,0]=(0.237110604157)*x[0]+(0.814767844631)*x[1]
-        arg[5,0,1]=(0.172109909542)*x[0]+(-1.56055537357)*x[1]
-        arg[5,1,0]=(0.92885449265)*x[0]+(0.820977987322)*x[1]
-        arg[5,1,1]=(-1.76483093472)*x[0]+(0.526316351009)*x[1]
-        ref[0,0,0]=(0.574633189339)*(1+2.*(dim-1.)/(o+1.))+(-1.14395718537)*dim
-        ref[0,0,1]=(1.25832290545)*(1+2.*(dim-1.)/(o+1.))+(1.28664251682)*dim
-        ref[0,1,0]=(1.75085914739)*(1+2.*(dim-1.)/(o+1.))+(1.92567538817)*dim
-        ref[0,1,1]=(-1.57747201281)*(1+2.*(dim-1.)/(o+1.))+(0.621065310511)*dim
-        ref[1,0,0]=(0.710883587246)*(1+2.*(dim-1.)/(o+1.))+(-0.694755184974)*dim
-        ref[1,0,1]=(-0.870861363869)*(1+2.*(dim-1.)/(o+1.))+(-1.14643427067)*dim
-        ref[1,1,0]=(1.21302125269)*(1+2.*(dim-1.)/(o+1.))+(1.4799607051)*dim
-        ref[1,1,1]=(-0.163344093083)*(1+2.*(dim-1.)/(o+1.))+(-1.65980754626)*dim
-        ref[2,0,0]=(1.18070929814)*(1+2.*(dim-1.)/(o+1.))+(-0.606786250235)*dim
-        ref[2,0,1]=(-1.26011538751)*(1+2.*(dim-1.)/(o+1.))+(0.808413232875)*dim
-        ref[2,1,0]=(-0.128253427149)*(1+2.*(dim-1.)/(o+1.))+(1.40263737459)*dim
-        ref[2,1,1]=(1.22388877116)*(1+2.*(dim-1.)/(o+1.))+(0.68405170122)*dim
-        ref[3,0,0]=(-1.51984063257)*(1+2.*(dim-1.)/(o+1.))+(0.735029513018)*dim
-        ref[3,0,1]=(1.63702893126)*(1+2.*(dim-1.)/(o+1.))+(-0.697257827196)*dim
-        ref[3,1,0]=(-0.274208683077)*(1+2.*(dim-1.)/(o+1.))+(0.698434782432)*dim
-        ref[3,1,1]=(0.649113059071)*(1+2.*(dim-1.)/(o+1.))+(-0.95982146268)*dim
-        ref[4,0,0]=(1.11723294318)*(1+2.*(dim-1.)/(o+1.))+(0.483823546848)*dim
-        ref[4,0,1]=(-0.0369311601619)*(1+2.*(dim-1.)/(o+1.))+(0.0249870416905)*dim
-        ref[4,1,0]=(-0.0969818481854)*(1+2.*(dim-1.)/(o+1.))+(0.126885450259)*dim
-        ref[4,1,1]=(0.607834304349)*(1+2.*(dim-1.)/(o+1.))+(-0.31013602901)*dim
-        ref[5,0,0]=(0.612356854718)*(1+2.*(dim-1.)/(o+1.))+(0.43952159407)*dim
-        ref[5,0,1]=(-0.245849747535)*(1+2.*(dim-1.)/(o+1.))+(-1.1425957165)*dim
-        ref[5,1,0]=(0.218025498167)*(1+2.*(dim-1.)/(o+1.))+(1.5318069818)*dim
-        ref[5,1,1]=(-0.39419356418)*(1+2.*(dim-1.)/(o+1.))+(-0.844321019532)*dim
-      else:
-        arg[0,0,0]=(1.52622777835)*x[0]+(-0.627217363559)*x[1]+(-0.221339024656)*x[2]
-        arg[0,0,1]=(-0.0735955925339)*x[0]+(-1.44492195287)*x[1]+(-0.0704081180966)*x[2]
-        arg[0,1,0]=(-0.330700790074)*x[0]+(-1.04769579979)*x[1]+(0.508799976666)*x[2]
-        arg[0,1,1]=(0.349349373439)*x[0]+(0.174054703574)*x[1]+(-0.129296220879)*x[2]
-        arg[1,0,0]=(0.0683757878129)*x[0]+(1.33394387082)*x[1]+(0.892302980732)*x[2]
-        arg[1,0,1]=(0.61014567223)*x[0]+(1.23846801628)*x[1]+(-0.990674941877)*x[2]
-        arg[1,1,0]=(0.964575308424)*x[0]+(0.354822939168)*x[1]+(-0.466180761866)*x[2]
-        arg[1,1,1]=(-1.79700594499)*x[0]+(-1.41821199521)*x[1]+(0.366764057361)*x[2]
-        arg[2,0,0]=(0.670092254407)*x[0]+(-0.188523225253)*x[1]+(0.363046866484)*x[2]
-        arg[2,0,1]=(0.420367065732)*x[0]+(0.798321474665)*x[1]+(-1.11347160928)*x[2]
-        arg[2,1,0]=(0.54732858526)*x[0]+(0.249248458735)*x[1]+(1.33905485076)*x[2]
-        arg[2,1,1]=(-1.45292600653)*x[0]+(-0.0838212918177)*x[1]+(-0.210961166185)*x[2]
-        arg[3,0,0]=(-0.406792355772)*x[0]+(-0.230709788944)*x[1]+(1.12300383125)*x[2]
-        arg[3,0,1]=(-1.02748413184)*x[0]+(-1.3840845484)*x[1]+(-0.181262479318)*x[2]
-        arg[3,1,0]=(-1.39003872882)*x[0]+(-0.302577309791)*x[1]+(-0.627070288119)*x[2]
-        arg[3,1,1]=(0.258496709277)*x[0]+(-1.32012543621)*x[1]+(0.921022534515)*x[2]
-        arg[4,0,0]=(-0.639952053735)*x[0]+(0.172303718581)*x[1]+(-1.55894055416)*x[2]
-        arg[4,0,1]=(-1.27660129414)*x[0]+(0.142177942574)*x[1]+(0.84156755899)*x[2]
-        arg[4,1,0]=(0.49812465572)*x[0]+(1.53755810837)*x[1]+(0.10504146131)*x[2]
-        arg[4,1,1]=(0.114534785643)*x[0]+(0.616103931999)*x[1]+(0.515764206037)*x[2]
-        arg[5,0,0]=(0.22562941228)*x[0]+(0.70743104453)*x[1]+(0.882965136406)*x[2]
-        arg[5,0,1]=(0.674003358504)*x[0]+(0.753008881236)*x[1]+(0.033083269963)*x[2]
-        arg[5,1,0]=(-0.495809169314)*x[0]+(-1.09613938465)*x[1]+(-1.03297996938)*x[2]
-        arg[5,1,1]=(-0.5222251005)*x[0]+(-0.56129023192)*x[1]+(0.529084741893)*x[2]
-        ref[0,0,0]=(0.164333186185)*(1+2.*(dim-1.)/(o+1.))+(0.513338203948)*dim
-        ref[0,0,1]=(-0.322072217228)*(1+2.*(dim-1.)/(o+1.))+(-1.26685344627)*dim
-        ref[0,1,0]=(1.37061498302)*(1+2.*(dim-1.)/(o+1.))+(-2.24021159622)*dim
-        ref[0,1,1]=(0.65996582358)*(1+2.*(dim-1.)/(o+1.))+(-0.265857967445)*dim
-        ref[1,0,0]=(1.83616555678)*(1+2.*(dim-1.)/(o+1.))+(0.458457082585)*dim
-        ref[1,0,1]=(1.01886896436)*(1+2.*(dim-1.)/(o+1.))+(-0.160930217723)*dim
-        ref[1,1,0]=(0.95375222959)*(1+2.*(dim-1.)/(o+1.))+(-0.100534743865)*dim
-        ref[1,1,1]=(-1.48059917075)*(1+2.*(dim-1.)/(o+1.))+(-1.3678547121)*dim
-        ref[2,0,0]=(-0.0805152837328)*(1+2.*(dim-1.)/(o+1.))+(0.925131179371)*dim
-        ref[2,0,1]=(0.155604473013)*(1+2.*(dim-1.)/(o+1.))+(-0.0503875419008)*dim
-        ref[2,1,0]=(0.117237902139)*(1+2.*(dim-1.)/(o+1.))+(2.01839399262)*dim
-        ref[2,1,1]=(0.196870433027)*(1+2.*(dim-1.)/(o+1.))+(-1.94457889755)*dim
-        ref[3,0,0]=(-1.16272511547)*(1+2.*(dim-1.)/(o+1.))+(1.648226802)*dim
-        ref[3,0,1]=(-1.54275766077)*(1+2.*(dim-1.)/(o+1.))+(-1.05007349878)*dim
-        ref[3,1,0]=(-2.21939430114)*(1+2.*(dim-1.)/(o+1.))+(-0.100292025596)*dim
-        ref[3,1,1]=(-0.974866109202)*(1+2.*(dim-1.)/(o+1.))+(0.834259916779)*dim
-        ref[4,0,0]=(-1.81015652027)*(1+2.*(dim-1.)/(o+1.))+(-0.216432369042)*dim
-        ref[4,0,1]=(-0.0692225921476)*(1+2.*(dim-1.)/(o+1.))+(-0.223633200428)*dim
-        ref[4,1,0]=(0.907628019251)*(1+2.*(dim-1.)/(o+1.))+(1.23309620615)*dim
-        ref[4,1,1]=(-0.77625708658)*(1+2.*(dim-1.)/(o+1.))+(2.02266001026)*dim
-        ref[5,0,0]=(0.040336826806)*(1+2.*(dim-1.)/(o+1.))+(1.77568876641)*dim
-        ref[5,0,1]=(-0.741065482842)*(1+2.*(dim-1.)/(o+1.))+(2.20116099255)*dim
-        ref[5,1,0]=(-1.93385845474)*(1+2.*(dim-1.)/(o+1.))+(-0.691070068594)*dim
-        ref[5,1,1]=(-0.539652361393)*(1+2.*(dim-1.)/(o+1.))+(-0.014778229134)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.139765044323)*x[0]+(0.763652540371)*x[1]
-        arg[0,0,0,1]=(1.22422998499)*x[0]+(-0.704059494925)*x[1]
-        arg[0,0,1,0]=(-0.0738568759745)*x[0]+(0.227297731345)*x[1]
-        arg[0,0,1,1]=(-0.438016525512)*x[0]+(-0.00290173552923)*x[1]
-        arg[0,0,2,0]=(-0.142466265385)*x[0]+(0.159086109387)*x[1]
-        arg[0,0,2,1]=(-1.29207470861)*x[0]+(0.171024552932)*x[1]
-        arg[0,1,0,0]=(0.228469040214)*x[0]+(-1.11207386711)*x[1]
-        arg[0,1,0,1]=(-0.0716121324998)*x[0]+(-0.293214318059)*x[1]
-        arg[0,1,1,0]=(-0.552331240231)*x[0]+(0.483311325934)*x[1]
-        arg[0,1,1,1]=(0.759050036013)*x[0]+(-0.192218075397)*x[1]
-        arg[0,1,2,0]=(0.736408127399)*x[0]+(0.61962966835)*x[1]
-        arg[0,1,2,1]=(-0.170110592043)*x[0]+(1.12024324836)*x[1]
-        arg[0,2,0,0]=(1.15358129137)*x[0]+(0.00288801991025)*x[1]
-        arg[0,2,0,1]=(0.34101930461)*x[0]+(1.44561406668)*x[1]
-        arg[0,2,1,0]=(1.20180064935)*x[0]+(1.53696717349)*x[1]
-        arg[0,2,1,1]=(-0.955282659666)*x[0]+(-0.232022391367)*x[1]
-        arg[0,2,2,0]=(0.0907361523468)*x[0]+(0.0735957910178)*x[1]
-        arg[0,2,2,1]=(0.377295180443)*x[0]+(-0.694318356175)*x[1]
-        arg[0,3,0,0]=(1.38936937129)*x[0]+(-1.11460156576)*x[1]
-        arg[0,3,0,1]=(-0.477623155591)*x[0]+(-1.38984205639)*x[1]
-        arg[0,3,1,0]=(0.0643534425446)*x[0]+(1.38744715898)*x[1]
-        arg[0,3,1,1]=(0.0144448337619)*x[0]+(-0.107478295727)*x[1]
-        arg[0,3,2,0]=(0.494522779873)*x[0]+(-0.623994602046)*x[1]
-        arg[0,3,2,1]=(0.865352526765)*x[0]+(-0.0330471549519)*x[1]
-        arg[0,4,0,0]=(0.876802965861)*x[0]+(-0.72991482831)*x[1]
-        arg[0,4,0,1]=(-1.59217671369)*x[0]+(-1.17443275047)*x[1]
-        arg[0,4,1,0]=(0.980556838858)*x[0]+(-0.134374268551)*x[1]
-        arg[0,4,1,1]=(-0.799387621998)*x[0]+(0.290707689722)*x[1]
-        arg[0,4,2,0]=(-0.152070506377)*x[0]+(-0.720051351365)*x[1]
-        arg[0,4,2,1]=(-0.726386342076)*x[0]+(-0.821126213298)*x[1]
-        arg[1,0,0,0]=(0.0108792321621)*x[0]+(1.08482229519)*x[1]
-        arg[1,0,0,1]=(0.395066734758)*x[0]+(-0.147576996716)*x[1]
-        arg[1,0,1,0]=(1.34674167646)*x[0]+(-1.7762597766)*x[1]
-        arg[1,0,1,1]=(0.145955749421)*x[0]+(0.0758020791017)*x[1]
-        arg[1,0,2,0]=(-1.3779896638)*x[0]+(0.879047617812)*x[1]
-        arg[1,0,2,1]=(-0.034533186491)*x[0]+(-0.961616456719)*x[1]
-        arg[1,1,0,0]=(1.93531133223)*x[0]+(0.085806770105)*x[1]
-        arg[1,1,0,1]=(-1.40810156335)*x[0]+(0.647954800386)*x[1]
-        arg[1,1,1,0]=(-0.898682130534)*x[0]+(0.0293908578939)*x[1]
-        arg[1,1,1,1]=(0.906365050374)*x[0]+(0.493604087615)*x[1]
-        arg[1,1,2,0]=(0.200697611638)*x[0]+(0.595460978794)*x[1]
-        arg[1,1,2,1]=(-0.137201357175)*x[0]+(-0.456327010456)*x[1]
-        arg[1,2,0,0]=(-0.435882659968)*x[0]+(-0.0312083604574)*x[1]
-        arg[1,2,0,1]=(-0.678923893852)*x[0]+(-0.559827568731)*x[1]
-        arg[1,2,1,0]=(-0.721204171338)*x[0]+(-0.054379212442)*x[1]
-        arg[1,2,1,1]=(-0.0624007046506)*x[0]+(0.168316149134)*x[1]
-        arg[1,2,2,0]=(-1.58839995565)*x[0]+(-0.212071943846)*x[1]
-        arg[1,2,2,1]=(-1.12936118963)*x[0]+(1.37132899453)*x[1]
-        arg[1,3,0,0]=(-0.382791970195)*x[0]+(-1.08331380956)*x[1]
-        arg[1,3,0,1]=(-0.83075188923)*x[0]+(-0.771795988467)*x[1]
-        arg[1,3,1,0]=(-0.491393878842)*x[0]+(0.256082770048)*x[1]
-        arg[1,3,1,1]=(1.16535762668)*x[0]+(1.15868916612)*x[1]
-        arg[1,3,2,0]=(0.930916100823)*x[0]+(0.447810335514)*x[1]
-        arg[1,3,2,1]=(0.542008480891)*x[0]+(0.428660301354)*x[1]
-        arg[1,4,0,0]=(0.820283847448)*x[0]+(-0.861049765761)*x[1]
-        arg[1,4,0,1]=(0.794597952616)*x[0]+(0.484963133102)*x[1]
-        arg[1,4,1,0]=(-0.0864183500936)*x[0]+(-0.48652009912)*x[1]
-        arg[1,4,1,1]=(-0.729261074705)*x[0]+(0.572520019661)*x[1]
-        arg[1,4,2,0]=(0.874563670592)*x[0]+(-1.03978413308)*x[1]
-        arg[1,4,2,1]=(-0.119980177921)*x[0]+(-0.416981275935)*x[1]
-        arg[2,0,0,0]=(0.00851163981688)*x[0]+(0.0537719250367)*x[1]
-        arg[2,0,0,1]=(0.325152071307)*x[0]+(0.852063357275)*x[1]
-        arg[2,0,1,0]=(0.3798978673)*x[0]+(0.103107604149)*x[1]
-        arg[2,0,1,1]=(0.241778324259)*x[0]+(0.840767359849)*x[1]
-        arg[2,0,2,0]=(0.504220642882)*x[0]+(-0.296421218478)*x[1]
-        arg[2,0,2,1]=(1.21850888213)*x[0]+(0.361422173343)*x[1]
-        arg[2,1,0,0]=(1.23948863042)*x[0]+(-0.454591957846)*x[1]
-        arg[2,1,0,1]=(-0.834341417745)*x[0]+(0.836809823188)*x[1]
-        arg[2,1,1,0]=(0.305283593888)*x[0]+(-0.443709359754)*x[1]
-        arg[2,1,1,1]=(-1.73751494542)*x[0]+(0.28249619071)*x[1]
-        arg[2,1,2,0]=(1.64628846378)*x[0]+(0.929422692022)*x[1]
-        arg[2,1,2,1]=(1.55964953056)*x[0]+(0.294507226966)*x[1]
-        arg[2,2,0,0]=(-0.122178600734)*x[0]+(-0.836106215351)*x[1]
-        arg[2,2,0,1]=(0.0560920262009)*x[0]+(-0.959524453552)*x[1]
-        arg[2,2,1,0]=(-0.0235093950509)*x[0]+(1.00069942275)*x[1]
-        arg[2,2,1,1]=(-1.6685983361)*x[0]+(-0.283415608089)*x[1]
-        arg[2,2,2,0]=(1.88757268407)*x[0]+(-0.0970308753337)*x[1]
-        arg[2,2,2,1]=(-0.620474974074)*x[0]+(0.24769276713)*x[1]
-        arg[2,3,0,0]=(1.01637595389)*x[0]+(0.705160942822)*x[1]
-        arg[2,3,0,1]=(1.14707395208)*x[0]+(0.705275592532)*x[1]
-        arg[2,3,1,0]=(-0.758160952494)*x[0]+(0.305309048122)*x[1]
-        arg[2,3,1,1]=(0.772402918026)*x[0]+(-0.052854508055)*x[1]
-        arg[2,3,2,0]=(-0.154978687298)*x[0]+(0.418368826949)*x[1]
-        arg[2,3,2,1]=(-0.845976442257)*x[0]+(0.20623978887)*x[1]
-        arg[2,4,0,0]=(-0.466185710519)*x[0]+(-0.233766119139)*x[1]
-        arg[2,4,0,1]=(-0.922877220469)*x[0]+(-0.688487528304)*x[1]
-        arg[2,4,1,0]=(0.95836287786)*x[0]+(0.939609093639)*x[1]
-        arg[2,4,1,1]=(-0.11982304155)*x[0]+(-0.257073186684)*x[1]
-        arg[2,4,2,0]=(0.345817495959)*x[0]+(0.151979044778)*x[1]
-        arg[2,4,2,1]=(-1.05379548205)*x[0]+(-0.436065928744)*x[1]
-        arg[3,0,0,0]=(0.744945706398)*x[0]+(-0.649458468468)*x[1]
-        arg[3,0,0,1]=(-1.04958965249)*x[0]+(0.639942303499)*x[1]
-        arg[3,0,1,0]=(0.337716118074)*x[0]+(1.93458666396)*x[1]
-        arg[3,0,1,1]=(0.303244531116)*x[0]+(0.436648998724)*x[1]
-        arg[3,0,2,0]=(-1.55484904142)*x[0]+(0.0691158242075)*x[1]
-        arg[3,0,2,1]=(-0.184571563941)*x[0]+(-0.617496186026)*x[1]
-        arg[3,1,0,0]=(0.54665472418)*x[0]+(-0.685197219861)*x[1]
-        arg[3,1,0,1]=(0.270341054659)*x[0]+(0.0123904138595)*x[1]
-        arg[3,1,1,0]=(-0.551927232745)*x[0]+(-0.0835992799883)*x[1]
-        arg[3,1,1,1]=(-0.731741032186)*x[0]+(0.351597478907)*x[1]
-        arg[3,1,2,0]=(-0.678408784965)*x[0]+(-0.0779391332051)*x[1]
-        arg[3,1,2,1]=(-0.873182924195)*x[0]+(-0.641772673128)*x[1]
-        arg[3,2,0,0]=(-0.826223714873)*x[0]+(0.631844849849)*x[1]
-        arg[3,2,0,1]=(-0.899714515249)*x[0]+(-0.010350665009)*x[1]
-        arg[3,2,1,0]=(0.290678744119)*x[0]+(-0.5871053663)*x[1]
-        arg[3,2,1,1]=(0.208288673139)*x[0]+(0.631917010925)*x[1]
-        arg[3,2,2,0]=(-0.262706136542)*x[0]+(0.0853212850096)*x[1]
-        arg[3,2,2,1]=(-1.28934754486)*x[0]+(0.686855142119)*x[1]
-        arg[3,3,0,0]=(-1.36704032596)*x[0]+(-1.55543480824)*x[1]
-        arg[3,3,0,1]=(-1.17014698336)*x[0]+(-0.652446157654)*x[1]
-        arg[3,3,1,0]=(-0.547499757476)*x[0]+(-0.156519515585)*x[1]
-        arg[3,3,1,1]=(0.228140026291)*x[0]+(-1.41014817371)*x[1]
-        arg[3,3,2,0]=(-0.055056583329)*x[0]+(-0.412525603966)*x[1]
-        arg[3,3,2,1]=(-0.524790489086)*x[0]+(-0.774411367008)*x[1]
-        arg[3,4,0,0]=(-1.33491047191)*x[0]+(1.47855022808)*x[1]
-        arg[3,4,0,1]=(-0.301405501225)*x[0]+(0.687178741851)*x[1]
-        arg[3,4,1,0]=(0.213050803289)*x[0]+(0.428086322291)*x[1]
-        arg[3,4,1,1]=(-1.67469009469)*x[0]+(0.857275314994)*x[1]
-        arg[3,4,2,0]=(0.748812148687)*x[0]+(-0.0339722859922)*x[1]
-        arg[3,4,2,1]=(-0.829454912563)*x[0]+(-0.637161668052)*x[1]
-        ref[0,0,0,0]=(0.538138880568)*(1+2.*(dim-1.)/(o+1.))+(0.365278704126)*dim
-        ref[0,0,0,1]=(0.532354921417)*(1+2.*(dim-1.)/(o+1.))+(-0.0121844313566)*dim
-        ref[0,0,1,0]=(1.27037934234)*(1+2.*(dim-1.)/(o+1.))+(-1.11693848697)*dim
-        ref[0,0,1,1]=(-0.317494874699)*(1+2.*(dim-1.)/(o+1.))+(-0.123423386343)*dim
-        ref[0,0,2,0]=(-0.274542501137)*(1+2.*(dim-1.)/(o+1.))+(0.291162345138)*dim
-        ref[0,0,2,1]=(-0.669231324784)*(1+2.*(dim-1.)/(o+1.))+(-0.451818830894)*dim
-        ref[0,1,0,0]=(-1.55791021679)*(1+2.*(dim-1.)/(o+1.))+(0.674305389899)*dim
-        ref[0,1,0,1]=(-1.04225461385)*(1+2.*(dim-1.)/(o+1.))+(0.67742816329)*dim
-        ref[0,1,1,0]=(-0.553787932867)*(1+2.*(dim-1.)/(o+1.))+(0.48476801857)*dim
-        ref[0,1,1,1]=(0.774284436582)*(1+2.*(dim-1.)/(o+1.))+(-0.207452475966)*dim
-        ref[0,1,2,0]=(0.754663298028)*(1+2.*(dim-1.)/(o+1.))+(0.601374497721)*dim
-        ref[0,1,2,1]=(0.378489135155)*(1+2.*(dim-1.)/(o+1.))+(0.571643521166)*dim
-        ref[0,2,0,0]=(0.84270626402)*(1+2.*(dim-1.)/(o+1.))+(0.313763047258)*dim
-        ref[0,2,0,1]=(0.741388749098)*(1+2.*(dim-1.)/(o+1.))+(1.0452446222)*dim
-        ref[0,2,1,0]=(1.31801677967)*(1+2.*(dim-1.)/(o+1.))+(1.42075104317)*dim
-        ref[0,2,1,1]=(0.342128499103)*(1+2.*(dim-1.)/(o+1.))+(-1.52943355014)*dim
-        ref[0,2,2,0]=(-0.2097885639)*(1+2.*(dim-1.)/(o+1.))+(0.374120507264)*dim
-        ref[0,2,2,1]=(0.517181369396)*(1+2.*(dim-1.)/(o+1.))+(-0.834204545127)*dim
-        ref[0,3,0,0]=(0.546538945104)*(1+2.*(dim-1.)/(o+1.))+(-0.271771139576)*dim
-        ref[0,3,0,1]=(-1.11041658618)*(1+2.*(dim-1.)/(o+1.))+(-0.757048625806)*dim
-        ref[0,3,1,0]=(1.71248931933)*(1+2.*(dim-1.)/(o+1.))+(-0.260688717804)*dim
-        ref[0,3,1,1]=(0.426783834682)*(1+2.*(dim-1.)/(o+1.))+(-0.519817296646)*dim
-        ref[0,3,2,0]=(-0.159038051631)*(1+2.*(dim-1.)/(o+1.))+(0.0295662294573)*dim
-        ref[0,3,2,1]=(-0.0935533877409)*(1+2.*(dim-1.)/(o+1.))+(0.925858759554)*dim
-        ref[0,4,0,0]=(0.254413611162)*(1+2.*(dim-1.)/(o+1.))+(-0.107525473611)*dim
-        ref[0,4,0,1]=(-1.80344635667)*(1+2.*(dim-1.)/(o+1.))+(-0.963163107492)*dim
-        ref[0,4,1,0]=(0.77936654687)*(1+2.*(dim-1.)/(o+1.))+(0.0668160234379)*dim
-        ref[0,4,1,1]=(-0.854656189741)*(1+2.*(dim-1.)/(o+1.))+(0.345976257465)*dim
-        ref[0,4,2,0]=(0.236075361826)*(1+2.*(dim-1.)/(o+1.))+(-1.10819721957)*dim
-        ref[0,4,2,1]=(-1.41443045549)*(1+2.*(dim-1.)/(o+1.))+(-0.133082099885)*dim
-        ref[1,0,0,0]=(0.254601110632)*(1+2.*(dim-1.)/(o+1.))+(0.841100416717)*dim
-        ref[1,0,0,1]=(-1.05142234949)*(1+2.*(dim-1.)/(o+1.))+(1.29891208753)*dim
-        ref[1,0,1,0]=(-0.476182365596)*(1+2.*(dim-1.)/(o+1.))+(0.0466642654563)*dim
-        ref[1,0,1,1]=(-1.2117362156)*(1+2.*(dim-1.)/(o+1.))+(1.43349404413)*dim
-        ref[1,0,2,0]=(-0.82694411065)*(1+2.*(dim-1.)/(o+1.))+(0.328002064662)*dim
-        ref[1,0,2,1]=(-0.784489634199)*(1+2.*(dim-1.)/(o+1.))+(-0.211660009011)*dim
-        ref[1,1,0,0]=(1.67906802629)*(1+2.*(dim-1.)/(o+1.))+(0.342050076043)*dim
-        ref[1,1,0,1]=(-0.798764638314)*(1+2.*(dim-1.)/(o+1.))+(0.03861787535)*dim
-        ref[1,1,1,0]=(0.348279136631)*(1+2.*(dim-1.)/(o+1.))+(-1.21757040927)*dim
-        ref[1,1,1,1]=(0.452104104709)*(1+2.*(dim-1.)/(o+1.))+(0.94786503328)*dim
-        ref[1,1,2,0]=(0.855057493837)*(1+2.*(dim-1.)/(o+1.))+(-0.0588989034046)*dim
-        ref[1,1,2,1]=(-0.666495642664)*(1+2.*(dim-1.)/(o+1.))+(0.0729672750328)*dim
-        ref[1,2,0,0]=(-0.566691483673)*(1+2.*(dim-1.)/(o+1.))+(0.0996004632473)*dim
-        ref[1,2,0,1]=(-0.127941886194)*(1+2.*(dim-1.)/(o+1.))+(-1.11080957639)*dim
-        ref[1,2,1,0]=(-0.249856548379)*(1+2.*(dim-1.)/(o+1.))+(-0.525726835401)*dim
-        ref[1,2,1,1]=(1.00195986166)*(1+2.*(dim-1.)/(o+1.))+(-0.896044417179)*dim
-        ref[1,2,2,0]=(-0.96849834562)*(1+2.*(dim-1.)/(o+1.))+(-0.831973553872)*dim
-        ref[1,2,2,1]=(0.204504064885)*(1+2.*(dim-1.)/(o+1.))+(0.0374637400154)*dim
-        ref[1,3,0,0]=(-0.587139938504)*(1+2.*(dim-1.)/(o+1.))+(-0.878965841253)*dim
-        ref[1,3,0,1]=(-0.013960550118)*(1+2.*(dim-1.)/(o+1.))+(-1.58858732758)*dim
-        ref[1,3,1,0]=(-0.626445648631)*(1+2.*(dim-1.)/(o+1.))+(0.391134539838)*dim
-        ref[1,3,1,1]=(0.793357894316)*(1+2.*(dim-1.)/(o+1.))+(1.53068889848)*dim
-        ref[1,3,2,0]=(-0.30795291971)*(1+2.*(dim-1.)/(o+1.))+(1.68667935605)*dim
-        ref[1,3,2,1]=(0.865506632636)*(1+2.*(dim-1.)/(o+1.))+(0.105162149608)*dim
-        ref[1,4,0,0]=(0.0142921032519)*(1+2.*(dim-1.)/(o+1.))+(-0.0550580215643)*dim
-        ref[1,4,0,1]=(1.74635688975)*(1+2.*(dim-1.)/(o+1.))+(-0.466795804028)*dim
-        ref[1,4,1,0]=(0.202247079284)*(1+2.*(dim-1.)/(o+1.))+(-0.775185528498)*dim
-        ref[1,4,1,1]=(0.518302547238)*(1+2.*(dim-1.)/(o+1.))+(-0.675043602282)*dim
-        ref[1,4,2,0]=(-0.0110996487494)*(1+2.*(dim-1.)/(o+1.))+(-0.154120813742)*dim
-        ref[1,4,2,1]=(0.445368223328)*(1+2.*(dim-1.)/(o+1.))+(-0.982329677184)*dim
-        ref[2,0,0,0]=(1.11858205689)*(1+2.*(dim-1.)/(o+1.))+(-1.05629849203)*dim
-        ref[2,0,0,1]=(0.326749663749)*(1+2.*(dim-1.)/(o+1.))+(0.850465764833)*dim
-        ref[2,0,1,0]=(1.17260350442)*(1+2.*(dim-1.)/(o+1.))+(-0.689598032967)*dim
-        ref[2,0,1,1]=(1.26453211291)*(1+2.*(dim-1.)/(o+1.))+(-0.181986428807)*dim
-        ref[2,0,2,0]=(0.28543047736)*(1+2.*(dim-1.)/(o+1.))+(-0.0776310529561)*dim
-        ref[2,0,2,1]=(1.67283723918)*(1+2.*(dim-1.)/(o+1.))+(-0.092906183711)*dim
-        ref[2,1,0,0]=(0.375606493975)*(1+2.*(dim-1.)/(o+1.))+(0.409290178597)*dim
-        ref[2,1,0,1]=(0.391717224425)*(1+2.*(dim-1.)/(o+1.))+(-0.389248818981)*dim
-        ref[2,1,1,0]=(0.540376031372)*(1+2.*(dim-1.)/(o+1.))+(-0.678801797238)*dim
-        ref[2,1,1,1]=(-0.781880488997)*(1+2.*(dim-1.)/(o+1.))+(-0.673138265714)*dim
-        ref[2,1,2,0]=(1.19474704445)*(1+2.*(dim-1.)/(o+1.))+(1.38096411135)*dim
-        ref[2,1,2,1]=(0.3333062674)*(1+2.*(dim-1.)/(o+1.))+(1.52085049012)*dim
-        ref[2,2,0,0]=(-0.570564746042)*(1+2.*(dim-1.)/(o+1.))+(-0.387720070044)*dim
-        ref[2,2,0,1]=(-0.906439974412)*(1+2.*(dim-1.)/(o+1.))+(0.00300754706095)*dim
-        ref[2,2,1,0]=(1.35643048678)*(1+2.*(dim-1.)/(o+1.))+(-0.379240459088)*dim
-        ref[2,2,1,1]=(-1.68522696847)*(1+2.*(dim-1.)/(o+1.))+(-0.266786975721)*dim
-        ref[2,2,2,0]=(1.64773077393)*(1+2.*(dim-1.)/(o+1.))+(0.14281103481)*dim
-        ref[2,2,2,1]=(0.161577377439)*(1+2.*(dim-1.)/(o+1.))+(-0.534359584383)*dim
-        ref[2,3,0,0]=(0.117577368411)*(1+2.*(dim-1.)/(o+1.))+(1.6039595283)*dim
-        ref[2,3,0,1]=(1.07270794583)*(1+2.*(dim-1.)/(o+1.))+(0.779641598778)*dim
-        ref[2,3,1,0]=(0.940083930247)*(1+2.*(dim-1.)/(o+1.))+(-1.39293583462)*dim
-        ref[2,3,1,1]=(-0.322170646263)*(1+2.*(dim-1.)/(o+1.))+(1.04171905623)*dim
-        ref[2,3,2,0]=(-1.00498391043)*(1+2.*(dim-1.)/(o+1.))+(1.26837405008)*dim
-        ref[2,3,2,1]=(0.148227404921)*(1+2.*(dim-1.)/(o+1.))+(-0.787964058307)*dim
-        ref[2,4,0,0]=(-0.567878073929)*(1+2.*(dim-1.)/(o+1.))+(-0.132073755729)*dim
-        ref[2,4,0,1]=(-0.265369521409)*(1+2.*(dim-1.)/(o+1.))+(-1.34599522736)*dim
-        ref[2,4,1,0]=(0.87362235129)*(1+2.*(dim-1.)/(o+1.))+(1.02434962021)*dim
-        ref[2,4,1,1]=(-1.05435356817)*(1+2.*(dim-1.)/(o+1.))+(0.67745733994)*dim
-        ref[2,4,2,0]=(-0.0889174414067)*(1+2.*(dim-1.)/(o+1.))+(0.586713982143)*dim
-        ref[2,4,2,1]=(-0.950446212097)*(1+2.*(dim-1.)/(o+1.))+(-0.539415198695)*dim
-        ref[3,0,0,0]=(0.585351095733)*(1+2.*(dim-1.)/(o+1.))+(-0.489863857802)*dim
-        ref[3,0,0,1]=(0.0818488289135)*(1+2.*(dim-1.)/(o+1.))+(-0.491496177908)*dim
-        ref[3,0,1,0]=(1.83790469827)*(1+2.*(dim-1.)/(o+1.))+(0.43439808376)*dim
-        ref[3,0,1,1]=(-0.812249042145)*(1+2.*(dim-1.)/(o+1.))+(1.55214257198)*dim
-        ref[3,0,2,0]=(-1.62498605972)*(1+2.*(dim-1.)/(o+1.))+(0.139252842511)*dim
-        ref[3,0,2,1]=(0.248660359392)*(1+2.*(dim-1.)/(o+1.))+(-1.05072810936)*dim
-        ref[3,1,0,0]=(0.701570774477)*(1+2.*(dim-1.)/(o+1.))+(-0.840113270158)*dim
-        ref[3,1,0,1]=(-1.01112314775)*(1+2.*(dim-1.)/(o+1.))+(1.29385461627)*dim
-        ref[3,1,1,0]=(-0.38604780773)*(1+2.*(dim-1.)/(o+1.))+(-0.249478705003)*dim
-        ref[3,1,1,1]=(-0.505728989541)*(1+2.*(dim-1.)/(o+1.))+(0.125585436262)*dim
-        ref[3,1,2,0]=(0.170090820399)*(1+2.*(dim-1.)/(o+1.))+(-0.926438738569)*dim
-        ref[3,1,2,1]=(-0.929125306455)*(1+2.*(dim-1.)/(o+1.))+(-0.585830290868)*dim
-        ref[3,2,0,0]=(-0.155713736332)*(1+2.*(dim-1.)/(o+1.))+(-0.038665128691)*dim
-        ref[3,2,0,1]=(-1.52172024486)*(1+2.*(dim-1.)/(o+1.))+(0.6116550646)*dim
-        ref[3,2,1,0]=(0.320960641588)*(1+2.*(dim-1.)/(o+1.))+(-0.617387263769)*dim
-        ref[3,2,1,1]=(1.35000898226)*(1+2.*(dim-1.)/(o+1.))+(-0.509803298192)*dim
-        ref[3,2,2,0]=(-1.08694938974)*(1+2.*(dim-1.)/(o+1.))+(0.909564538204)*dim
-        ref[3,2,2,1]=(-0.484173893901)*(1+2.*(dim-1.)/(o+1.))+(-0.11831850884)*dim
-        ref[3,3,0,0]=(-1.30137401361)*(1+2.*(dim-1.)/(o+1.))+(-1.62110112059)*dim
-        ref[3,3,0,1]=(-1.01955795295)*(1+2.*(dim-1.)/(o+1.))+(-0.803035188058)*dim
-        ref[3,3,1,0]=(-0.86522946065)*(1+2.*(dim-1.)/(o+1.))+(0.161210187589)*dim
-        ref[3,3,1,1]=(-1.45434545656)*(1+2.*(dim-1.)/(o+1.))+(0.272337309144)*dim
-        ref[3,3,2,0]=(-1.09044516001)*(1+2.*(dim-1.)/(o+1.))+(0.622862972717)*dim
-        ref[3,3,2,1]=(-1.56164744337)*(1+2.*(dim-1.)/(o+1.))+(0.262445587275)*dim
-        ref[3,4,0,0]=(-0.0717688395634)*(1+2.*(dim-1.)/(o+1.))+(0.215408595737)*dim
-        ref[3,4,0,1]=(-0.361057910751)*(1+2.*(dim-1.)/(o+1.))+(0.746831151378)*dim
-        ref[3,4,1,0]=(1.3065764036)*(1+2.*(dim-1.)/(o+1.))+(-0.665439278018)*dim
-        ref[3,4,1,1]=(0.00897444539195)*(1+2.*(dim-1.)/(o+1.))+(-0.826389225091)*dim
-        ref[3,4,2,0]=(0.0968985993748)*(1+2.*(dim-1.)/(o+1.))+(0.61794126332)*dim
-        ref[3,4,2,1]=(-0.247002319776)*(1+2.*(dim-1.)/(o+1.))+(-1.21961426084)*dim
-      else:
-        arg[0,0,0,0]=(0.249559417601)*x[0]+(-1.12919415836)*x[1]+(0.535083953587)*x[2]
-        arg[0,0,0,1]=(-1.61154525877)*x[0]+(-0.339535503099)*x[1]+(-0.3734414422)*x[2]
-        arg[0,0,1,0]=(-1.33426413331)*x[0]+(0.503654661149)*x[1]+(0.900718166029)*x[2]
-        arg[0,0,1,1]=(-1.47348135079)*x[0]+(0.294426872223)*x[1]+(-0.092932038156)*x[2]
-        arg[0,0,2,0]=(-0.659338105033)*x[0]+(0.276825152205)*x[1]+(-0.825904690993)*x[2]
-        arg[0,0,2,1]=(-0.871512897535)*x[0]+(0.16237107696)*x[1]+(-1.37935248231)*x[2]
-        arg[0,1,0,0]=(-0.83315792018)*x[0]+(-0.00675809409276)*x[1]+(0.464774846632)*x[2]
-        arg[0,1,0,1]=(0.527155362932)*x[0]+(0.856707619808)*x[1]+(-1.68267649456)*x[2]
-        arg[0,1,1,0]=(-0.524091384241)*x[0]+(-0.540620074365)*x[1]+(0.992745803077)*x[2]
-        arg[0,1,1,1]=(1.61356254869)*x[0]+(1.50422956091)*x[1]+(0.522074610423)*x[2]
-        arg[0,1,2,0]=(-0.786383950132)*x[0]+(0.240998133454)*x[1]+(-0.609039834527)*x[2]
-        arg[0,1,2,1]=(-0.549608404174)*x[0]+(-0.850827315095)*x[1]+(0.267519458624)*x[2]
-        arg[0,2,0,0]=(-0.171255468598)*x[0]+(-0.315808418391)*x[1]+(-1.31408126593)*x[2]
-        arg[0,2,0,1]=(-0.0537048497397)*x[0]+(-1.05283989597)*x[1]+(-0.230505226375)*x[2]
-        arg[0,2,1,0]=(0.175422426556)*x[0]+(-1.37203245283)*x[1]+(-1.31579047196)*x[2]
-        arg[0,2,1,1]=(-0.678719594441)*x[0]+(0.325375648943)*x[1]+(-1.3715383088)*x[2]
-        arg[0,2,2,0]=(1.34295310191)*x[0]+(-1.29856762722)*x[1]+(-0.604804069008)*x[2]
-        arg[0,2,2,1]=(-0.38925176646)*x[0]+(-0.391078913511)*x[1]+(-0.147119806342)*x[2]
-        arg[0,3,0,0]=(0.55897935716)*x[0]+(-0.938161813577)*x[1]+(-1.01170144437)*x[2]
-        arg[0,3,0,1]=(-0.214720994691)*x[0]+(-0.936636326408)*x[1]+(1.23434495942)*x[2]
-        arg[0,3,1,0]=(0.665136478224)*x[0]+(-0.223132283946)*x[1]+(0.513937660496)*x[2]
-        arg[0,3,1,1]=(0.99663942166)*x[0]+(-0.870793744717)*x[1]+(-0.44642261239)*x[2]
-        arg[0,3,2,0]=(0.426708530385)*x[0]+(-0.399913590631)*x[1]+(0.621569032554)*x[2]
-        arg[0,3,2,1]=(-0.385564378699)*x[0]+(-1.17310910463)*x[1]+(-0.386725711607)*x[2]
-        arg[0,4,0,0]=(-0.907605366918)*x[0]+(-1.15620807313)*x[1]+(0.690709991448)*x[2]
-        arg[0,4,0,1]=(0.68925487184)*x[0]+(-0.731402302062)*x[1]+(-0.278506722879)*x[2]
-        arg[0,4,1,0]=(0.607545316973)*x[0]+(-0.480514687124)*x[1]+(-0.261850296368)*x[2]
-        arg[0,4,1,1]=(1.39016358303)*x[0]+(0.571194445557)*x[1]+(1.02359000173)*x[2]
-        arg[0,4,2,0]=(1.19042892582)*x[0]+(-0.265599567429)*x[1]+(-0.412933583721)*x[2]
-        arg[0,4,2,1]=(0.105768402681)*x[0]+(0.529442827604)*x[1]+(1.70332495695)*x[2]
-        arg[1,0,0,0]=(-0.466512450689)*x[0]+(-0.821724116037)*x[1]+(0.315646947734)*x[2]
-        arg[1,0,0,1]=(-0.343965024161)*x[0]+(-0.718276908655)*x[1]+(-0.89648206258)*x[2]
-        arg[1,0,1,0]=(0.533001165605)*x[0]+(0.0431632707839)*x[1]+(-0.34028160642)*x[2]
-        arg[1,0,1,1]=(-0.0905898060243)*x[0]+(-0.634642149101)*x[1]+(-1.13501642684)*x[2]
-        arg[1,0,2,0]=(0.660943497868)*x[0]+(-0.354792953445)*x[1]+(1.28780893672)*x[2]
-        arg[1,0,2,1]=(-1.2338460337)*x[0]+(-1.07489268654)*x[1]+(-1.32063885434)*x[2]
-        arg[1,1,0,0]=(-0.564276365398)*x[0]+(1.03120151704)*x[1]+(-1.15799041025)*x[2]
-        arg[1,1,0,1]=(0.715308242213)*x[0]+(1.38372056508)*x[1]+(0.143855804663)*x[2]
-        arg[1,1,1,0]=(-0.359352464902)*x[0]+(1.12698364061)*x[1]+(0.592356171876)*x[2]
-        arg[1,1,1,1]=(-0.450554686066)*x[0]+(-0.546866217679)*x[1]+(1.0842968414)*x[2]
-        arg[1,1,2,0]=(-0.477267172046)*x[0]+(-0.863491255396)*x[1]+(-0.991333852913)*x[2]
-        arg[1,1,2,1]=(0.402599196931)*x[0]+(-0.635287203482)*x[1]+(-0.277210261227)*x[2]
-        arg[1,2,0,0]=(-1.56932441015)*x[0]+(-1.56442238007)*x[1]+(-0.375354109955)*x[2]
-        arg[1,2,0,1]=(0.193969262086)*x[0]+(-0.0913153952113)*x[1]+(-0.764434182025)*x[2]
-        arg[1,2,1,0]=(-0.836765580561)*x[0]+(0.84683301026)*x[1]+(-1.05033967172)*x[2]
-        arg[1,2,1,1]=(1.68348957076)*x[0]+(-1.14474223991)*x[1]+(-0.0028142026612)*x[2]
-        arg[1,2,2,0]=(-0.0921618478149)*x[0]+(-0.555660652821)*x[1]+(-0.398214997034)*x[2]
-        arg[1,2,2,1]=(1.03261791276)*x[0]+(-0.650225649301)*x[1]+(1.63375423051)*x[2]
-        arg[1,3,0,0]=(-0.348599695393)*x[0]+(-1.20215183267)*x[1]+(-0.1129459677)*x[2]
-        arg[1,3,0,1]=(0.877317784105)*x[0]+(-0.587978566735)*x[1]+(1.10042804546)*x[2]
-        arg[1,3,1,0]=(-0.547033849227)*x[0]+(-1.28198893788)*x[1]+(-0.424854587074)*x[2]
-        arg[1,3,1,1]=(0.739360669292)*x[0]+(-0.66359460621)*x[1]+(1.08588749669)*x[2]
-        arg[1,3,2,0]=(0.137130432185)*x[0]+(-0.123436803848)*x[1]+(-1.31161936702)*x[2]
-        arg[1,3,2,1]=(-0.0171220220237)*x[0]+(1.44556512776)*x[1]+(0.665008556384)*x[2]
-        arg[1,4,0,0]=(-0.304568160155)*x[0]+(-0.453489411096)*x[1]+(0.769736915169)*x[2]
-        arg[1,4,0,1]=(-0.389567079496)*x[0]+(1.01465816808)*x[1]+(1.05389792181)*x[2]
-        arg[1,4,1,0]=(-0.293019902659)*x[0]+(0.935020375302)*x[1]+(0.465003429909)*x[2]
-        arg[1,4,1,1]=(1.26426164192)*x[0]+(0.53660188438)*x[1]+(-1.26997852414)*x[2]
-        arg[1,4,2,0]=(0.447013260347)*x[0]+(-0.292646095073)*x[1]+(-0.141236248636)*x[2]
-        arg[1,4,2,1]=(0.627246227193)*x[0]+(-1.07310030602)*x[1]+(0.414244174014)*x[2]
-        arg[2,0,0,0]=(0.0450404092088)*x[0]+(-0.092484507099)*x[1]+(0.416562031216)*x[2]
-        arg[2,0,0,1]=(0.437290559939)*x[0]+(-1.00144259207)*x[1]+(1.26666155425)*x[2]
-        arg[2,0,1,0]=(0.0919297766737)*x[0]+(0.925519273623)*x[1]+(-0.582669368425)*x[2]
-        arg[2,0,1,1]=(1.40247347323)*x[0]+(-0.896360612277)*x[1]+(-0.235401929947)*x[2]
-        arg[2,0,2,0]=(-0.0760543780641)*x[0]+(-1.12543060216)*x[1]+(-1.73005861985)*x[2]
-        arg[2,0,2,1]=(-0.0540914682488)*x[0]+(0.686173107995)*x[1]+(-0.499264219762)*x[2]
-        arg[2,1,0,0]=(1.29412006754)*x[0]+(1.17564161143)*x[1]+(0.30140132879)*x[2]
-        arg[2,1,0,1]=(-0.987572082341)*x[0]+(-1.73401714184)*x[1]+(0.542753625023)*x[2]
-        arg[2,1,1,0]=(-0.162426291727)*x[0]+(0.508287986142)*x[1]+(0.42345261935)*x[2]
-        arg[2,1,1,1]=(-0.436007145923)*x[0]+(0.344485478615)*x[1]+(0.867081685885)*x[2]
-        arg[2,1,2,0]=(1.23340638096)*x[0]+(1.16627983483)*x[1]+(0.291792397233)*x[2]
-        arg[2,1,2,1]=(1.81405521045)*x[0]+(-0.358711641776)*x[1]+(1.67495221975)*x[2]
-        arg[2,2,0,0]=(-0.998776647505)*x[0]+(1.38487801142)*x[1]+(-0.199886556937)*x[2]
-        arg[2,2,0,1]=(-0.151564577745)*x[0]+(0.100245326484)*x[1]+(-0.98457000197)*x[2]
-        arg[2,2,1,0]=(-0.767959771993)*x[0]+(-0.641538616024)*x[1]+(0.0206020120898)*x[2]
-        arg[2,2,1,1]=(-0.116988718822)*x[0]+(-1.15499563681)*x[1]+(-0.187589599016)*x[2]
-        arg[2,2,2,0]=(0.682354528276)*x[0]+(0.606005834005)*x[1]+(0.11468472132)*x[2]
-        arg[2,2,2,1]=(-0.547781355521)*x[0]+(1.23047427005)*x[1]+(0.854018236174)*x[2]
-        arg[2,3,0,0]=(0.368349078554)*x[0]+(-1.12153473446)*x[1]+(0.114116055257)*x[2]
-        arg[2,3,0,1]=(0.838089123891)*x[0]+(0.283469213399)*x[1]+(0.249874271688)*x[2]
-        arg[2,3,1,0]=(-1.03882746612)*x[0]+(0.159711106612)*x[1]+(-1.57272656988)*x[2]
-        arg[2,3,1,1]=(-1.25439210606)*x[0]+(-0.801588333704)*x[1]+(-0.166928557775)*x[2]
-        arg[2,3,2,0]=(0.0650011438717)*x[0]+(0.879974749381)*x[1]+(-0.276534309239)*x[2]
-        arg[2,3,2,1]=(-0.774913691581)*x[0]+(-0.360358063631)*x[1]+(-0.368288145309)*x[2]
-        arg[2,4,0,0]=(-0.855093207242)*x[0]+(0.82049336972)*x[1]+(-0.496007273696)*x[2]
-        arg[2,4,0,1]=(-0.113408635338)*x[0]+(0.116297312211)*x[1]+(-1.05279504872)*x[2]
-        arg[2,4,1,0]=(1.59034968962)*x[0]+(-0.993664270946)*x[1]+(-1.44097244774)*x[2]
-        arg[2,4,1,1]=(-0.554191144546)*x[0]+(-1.30747375036)*x[1]+(-1.17946836248)*x[2]
-        arg[2,4,2,0]=(0.626012137217)*x[0]+(0.518243725142)*x[1]+(0.0933303150622)*x[2]
-        arg[2,4,2,1]=(-0.10169564723)*x[0]+(1.45820149276)*x[1]+(-0.0393269028179)*x[2]
-        arg[3,0,0,0]=(-0.0404687905735)*x[0]+(0.0715700915639)*x[1]+(1.45121483418)*x[2]
-        arg[3,0,0,1]=(1.25470808156)*x[0]+(-0.119317783496)*x[1]+(0.28341020961)*x[2]
-        arg[3,0,1,0]=(0.352807293701)*x[0]+(0.230591898707)*x[1]+(-0.580416381826)*x[2]
-        arg[3,0,1,1]=(1.6169875055)*x[0]+(0.515147269207)*x[1]+(-0.461088044559)*x[2]
-        arg[3,0,2,0]=(0.345374169211)*x[0]+(0.165179946106)*x[1]+(0.0761591935161)*x[2]
-        arg[3,0,2,1]=(-0.367306414632)*x[0]+(-0.236156646602)*x[1]+(-0.388955870267)*x[2]
-        arg[3,1,0,0]=(-0.27984693051)*x[0]+(-0.0431489812153)*x[1]+(-0.315624571395)*x[2]
-        arg[3,1,0,1]=(-0.923109329983)*x[0]+(0.71133451696)*x[1]+(-0.793551470792)*x[2]
-        arg[3,1,1,0]=(-0.434858211337)*x[0]+(0.943115368224)*x[1]+(0.195339633021)*x[2]
-        arg[3,1,1,1]=(0.517533657447)*x[0]+(-0.975487574798)*x[1]+(0.00389777788827)*x[2]
-        arg[3,1,2,0]=(-1.29728995298)*x[0]+(-0.519355341481)*x[1]+(-0.986985327874)*x[2]
-        arg[3,1,2,1]=(-0.104824066468)*x[0]+(0.155059832097)*x[1]+(-0.513194354212)*x[2]
-        arg[3,2,0,0]=(-0.053676798897)*x[0]+(-0.957854779002)*x[1]+(0.575673251241)*x[2]
-        arg[3,2,0,1]=(0.828930053602)*x[0]+(0.122518313839)*x[1]+(-0.711848816688)*x[2]
-        arg[3,2,1,0]=(0.468063581449)*x[0]+(0.233244036405)*x[1]+(-1.06333921952)*x[2]
-        arg[3,2,1,1]=(-0.178080946586)*x[0]+(0.481804828166)*x[1]+(-0.25332042181)*x[2]
-        arg[3,2,2,0]=(-0.2520881536)*x[0]+(-1.03459378989)*x[1]+(-0.284550808049)*x[2]
-        arg[3,2,2,1]=(-0.778922518429)*x[0]+(1.0037625091)*x[1]+(-0.252088333444)*x[2]
-        arg[3,3,0,0]=(0.467759844055)*x[0]+(0.598630111441)*x[1]+(-0.180631591223)*x[2]
-        arg[3,3,0,1]=(-0.704465112342)*x[0]+(0.577992884135)*x[1]+(0.614639798328)*x[2]
-        arg[3,3,1,0]=(0.58772281958)*x[0]+(0.267751378071)*x[1]+(0.11546949909)*x[2]
-        arg[3,3,1,1]=(-0.220490484007)*x[0]+(-0.346075755455)*x[1]+(0.709249188793)*x[2]
-        arg[3,3,2,0]=(-0.03823885045)*x[0]+(1.0070390689)*x[1]+(0.786191739951)*x[2]
-        arg[3,3,2,1]=(0.468772686804)*x[0]+(-0.416774817651)*x[1]+(1.65342478719)*x[2]
-        arg[3,4,0,0]=(0.69436779527)*x[0]+(-0.644342658009)*x[1]+(-0.6765845785)*x[2]
-        arg[3,4,0,1]=(0.210253965392)*x[0]+(0.208735045316)*x[1]+(-0.553442080096)*x[2]
-        arg[3,4,1,0]=(-0.0680478107141)*x[0]+(0.770215954791)*x[1]+(-0.876270039559)*x[2]
-        arg[3,4,1,1]=(-0.384812708168)*x[0]+(-0.482707860969)*x[1]+(1.00274437781)*x[2]
-        arg[3,4,2,0]=(-0.144567417774)*x[0]+(0.277773632892)*x[1]+(1.3123295509)*x[2]
-        arg[3,4,2,1]=(0.00870646304914)*x[0]+(-0.254229329332)*x[1]+(-1.66538680273)*x[2]
-        ref[0,0,0,0]=(0.841760617241)*(1+2.*(dim-1.)/(o+1.))+(-1.18631140441)*dim
-        ref[0,0,0,1]=(-0.610007337864)*(1+2.*(dim-1.)/(o+1.))+(-1.71451486621)*dim
-        ref[0,0,1,0]=(-0.765605897612)*(1+2.*(dim-1.)/(o+1.))+(0.83571459148)*dim
-        ref[0,0,1,1]=(-0.128014940891)*(1+2.*(dim-1.)/(o+1.))+(-1.14397157584)*dim
-        ref[0,0,2,0]=(-0.969876086955)*(1+2.*(dim-1.)/(o+1.))+(-0.238541556867)*dim
-        ref[0,0,2,1]=(-0.434074835341)*(1+2.*(dim-1.)/(o+1.))+(-1.65441946755)*dim
-        ref[0,1,0,0]=(0.346878720962)*(1+2.*(dim-1.)/(o+1.))+(-0.722019888602)*dim
-        ref[0,1,0,1]=(-0.163332213104)*(1+2.*(dim-1.)/(o+1.))+(-0.135481298717)*dim
-        ref[0,1,1,0]=(0.64836517897)*(1+2.*(dim-1.)/(o+1.))+(-0.720330834499)*dim
-        ref[0,1,1,1]=(1.50578185724)*(1+2.*(dim-1.)/(o+1.))+(2.13408486278)*dim
-        ref[0,1,2,0]=(-1.24719412419)*(1+2.*(dim-1.)/(o+1.))+(0.0927684729819)*dim
-        ref[0,1,2,1]=(0.798388744364)*(1+2.*(dim-1.)/(o+1.))+(-1.93130500501)*dim
-        ref[0,2,0,0]=(-1.9926882083)*(1+2.*(dim-1.)/(o+1.))+(0.191543055387)*dim
-        ref[0,2,0,1]=(-2.16203894433)*(1+2.*(dim-1.)/(o+1.))+(0.824988972246)*dim
-        ref[0,2,1,0]=(-2.24934415172)*(1+2.*(dim-1.)/(o+1.))+(-0.263056346511)*dim
-        ref[0,2,1,1]=(-0.719152132879)*(1+2.*(dim-1.)/(o+1.))+(-1.00573012142)*dim
-        ref[0,2,2,0]=(-0.83751635258)*(1+2.*(dim-1.)/(o+1.))+(0.277097758257)*dim
-        ref[0,2,2,1]=(-0.979077481565)*(1+2.*(dim-1.)/(o+1.))+(0.0516269952525)*dim
-        ref[0,3,0,0]=(-0.623873484234)*(1+2.*(dim-1.)/(o+1.))+(-0.767010416553)*dim
-        ref[0,3,0,1]=(-1.0425822452)*(1+2.*(dim-1.)/(o+1.))+(1.12556988353)*dim
-        ref[0,3,1,0]=(0.548600253744)*(1+2.*(dim-1.)/(o+1.))+(0.407341601031)*dim
-        ref[0,3,1,1]=(-0.531963828356)*(1+2.*(dim-1.)/(o+1.))+(0.211386892908)*dim
-        ref[0,3,2,0]=(1.33006849004)*(1+2.*(dim-1.)/(o+1.))+(-0.681704517735)*dim
-        ref[0,3,2,1]=(-1.98393315604)*(1+2.*(dim-1.)/(o+1.))+(0.0385339611081)*dim
-        ref[0,4,0,0]=(-0.381511396261)*(1+2.*(dim-1.)/(o+1.))+(-0.991592052336)*dim
-        ref[0,4,0,1]=(1.00472425157)*(1+2.*(dim-1.)/(o+1.))+(-1.32537840467)*dim
-        ref[0,4,1,0]=(1.04630307783)*(1+2.*(dim-1.)/(o+1.))+(-1.18112274434)*dim
-        ref[0,4,1,1]=(1.61731240292)*(1+2.*(dim-1.)/(o+1.))+(1.3676356274)*dim
-        ref[0,4,2,0]=(1.41653781097)*(1+2.*(dim-1.)/(o+1.))+(-0.904642036296)*dim
-        ref[0,4,2,1]=(1.61515833451)*(1+2.*(dim-1.)/(o+1.))+(0.723377852725)*dim
-        ref[1,0,0,0]=(-0.879218635)*(1+2.*(dim-1.)/(o+1.))+(-0.0933709839921)*dim
-        ref[1,0,0,1]=(-1.26687353853)*(1+2.*(dim-1.)/(o+1.))+(-0.691850456865)*dim
-        ref[1,0,1,0]=(1.79928802103)*(1+2.*(dim-1.)/(o+1.))+(-1.56340519106)*dim
-        ref[1,0,1,1]=(-1.05495675007)*(1+2.*(dim-1.)/(o+1.))+(-0.805291631901)*dim
-        ref[1,0,2,0]=(-0.339423840638)*(1+2.*(dim-1.)/(o+1.))+(1.93338332178)*dim
-        ref[1,0,2,1]=(-1.15347644771)*(1+2.*(dim-1.)/(o+1.))+(-2.47590112686)*dim
-        ref[1,1,0,0]=(-1.22232845026)*(1+2.*(dim-1.)/(o+1.))+(0.531263191656)*dim
-        ref[1,1,0,1]=(0.318005373727)*(1+2.*(dim-1.)/(o+1.))+(1.92487923823)*dim
-        ref[1,1,1,0]=(0.157193055461)*(1+2.*(dim-1.)/(o+1.))+(1.20279429213)*dim
-        ref[1,1,1,1]=(0.0525914033484)*(1+2.*(dim-1.)/(o+1.))+(0.0342845343071)*dim
-        ref[1,1,2,0]=(-0.319573431275)*(1+2.*(dim-1.)/(o+1.))+(-2.01251884908)*dim
-        ref[1,1,2,1]=(-1.67524932091)*(1+2.*(dim-1.)/(o+1.))+(1.16535105313)*dim
-        ref[1,2,0,0]=(-2.25088459423)*(1+2.*(dim-1.)/(o+1.))+(-1.25821630594)*dim
-        ref[1,2,0,1]=(-0.447759463011)*(1+2.*(dim-1.)/(o+1.))+(-0.214020852139)*dim
-        ref[1,2,1,0]=(-1.26590071291)*(1+2.*(dim-1.)/(o+1.))+(0.225628470886)*dim
-        ref[1,2,1,1]=(-0.372878924951)*(1+2.*(dim-1.)/(o+1.))+(0.90881205314)*dim
-        ref[1,2,2,0]=(1.36047043606)*(1+2.*(dim-1.)/(o+1.))+(-2.40650793373)*dim
-        ref[1,2,2,1]=(1.13871462186)*(1+2.*(dim-1.)/(o+1.))+(0.877431872103)*dim
-        ref[1,3,0,0]=(-1.17967356605)*(1+2.*(dim-1.)/(o+1.))+(-0.48402392971)*dim
-        ref[1,3,0,1]=(-0.177974933247)*(1+2.*(dim-1.)/(o+1.))+(1.56774219607)*dim
-        ref[1,3,1,0]=(-1.40936193115)*(1+2.*(dim-1.)/(o+1.))+(-0.844515443034)*dim
-        ref[1,3,1,1]=(0.790537554795)*(1+2.*(dim-1.)/(o+1.))+(0.371116004973)*dim
-        ref[1,3,2,0]=(0.242057644413)*(1+2.*(dim-1.)/(o+1.))+(-1.5399833831)*dim
-        ref[1,3,2,1]=(1.70371239948)*(1+2.*(dim-1.)/(o+1.))+(0.389739262639)*dim
-        ref[1,4,0,0]=(-0.375645743677)*(1+2.*(dim-1.)/(o+1.))+(0.387325087595)*dim
-        ref[1,4,0,1]=(0.0489286471987)*(1+2.*(dim-1.)/(o+1.))+(1.63006036319)*dim
-        ref[1,4,1,0]=(1.33203691786)*(1+2.*(dim-1.)/(o+1.))+(-0.225033015313)*dim
-        ref[1,4,1,1]=(0.332297845981)*(1+2.*(dim-1.)/(o+1.))+(0.198587156175)*dim
-        ref[1,4,2,0]=(-1.22288078692)*(1+2.*(dim-1.)/(o+1.))+(1.23601170355)*dim
-        ref[1,4,2,1]=(0.0299493142028)*(1+2.*(dim-1.)/(o+1.))+(-0.0615592190171)*dim
-        ref[2,0,0,0]=(0.0963155205346)*(1+2.*(dim-1.)/(o+1.))+(0.272802412791)*dim
-        ref[2,0,0,1]=(1.12280541023)*(1+2.*(dim-1.)/(o+1.))+(-0.420295888105)*dim
-        ref[2,0,1,0]=(-0.296878488858)*(1+2.*(dim-1.)/(o+1.))+(0.73165817073)*dim
-        ref[2,0,1,1]=(-0.407704337172)*(1+2.*(dim-1.)/(o+1.))+(0.678415268175)*dim
-        ref[2,0,2,0]=(-2.37402978977)*(1+2.*(dim-1.)/(o+1.))+(-0.557513810308)*dim
-        ref[2,0,2,1]=(1.2564150767)*(1+2.*(dim-1.)/(o+1.))+(-1.12359765672)*dim
-        ref[2,1,0,0]=(0.824412811392)*(1+2.*(dim-1.)/(o+1.))+(1.94675019637)*dim
-        ref[2,1,0,1]=(-1.06505178789)*(1+2.*(dim-1.)/(o+1.))+(-1.11378381126)*dim
-        ref[2,1,1,0]=(0.200096305752)*(1+2.*(dim-1.)/(o+1.))+(0.569218008012)*dim
-        ref[2,1,1,1]=(1.08680720067)*(1+2.*(dim-1.)/(o+1.))+(-0.311247182096)*dim
-        ref[2,1,2,0]=(1.3764914842)*(1+2.*(dim-1.)/(o+1.))+(1.31498712883)*dim
-        ref[2,1,2,1]=(2.26537199157)*(1+2.*(dim-1.)/(o+1.))+(0.864923796858)*dim
-        ref[2,2,0,0]=(0.750025182887)*(1+2.*(dim-1.)/(o+1.))+(-0.563810375913)*dim
-        ref[2,2,0,1]=(-0.806933575047)*(1+2.*(dim-1.)/(o+1.))+(-0.228955678184)*dim
-        ref[2,2,1,0]=(-1.53132620021)*(1+2.*(dim-1.)/(o+1.))+(0.14242982428)*dim
-        ref[2,2,1,1]=(-0.889411443106)*(1+2.*(dim-1.)/(o+1.))+(-0.570162511538)*dim
-        ref[2,2,2,0]=(-0.0309717316948)*(1+2.*(dim-1.)/(o+1.))+(1.4340168153)*dim
-        ref[2,2,2,1]=(1.48963237375)*(1+2.*(dim-1.)/(o+1.))+(0.0470787769518)*dim
-        ref[2,3,0,0]=(-0.0184174113004)*(1+2.*(dim-1.)/(o+1.))+(-0.620652189349)*dim
-        ref[2,3,0,1]=(0.597433991421)*(1+2.*(dim-1.)/(o+1.))+(0.773998617557)*dim
-        ref[2,3,1,0]=(-1.10704622688)*(1+2.*(dim-1.)/(o+1.))+(-1.34479670251)*dim
-        ref[2,3,1,1]=(-0.369209798891)*(1+2.*(dim-1.)/(o+1.))+(-1.85369919864)*dim
-        ref[2,3,2,0]=(-0.286165609161)*(1+2.*(dim-1.)/(o+1.))+(0.954607193175)*dim
-        ref[2,3,2,1]=(-0.0948450773617)*(1+2.*(dim-1.)/(o+1.))+(-1.40871482316)*dim
-        ref[2,4,0,0]=(-0.350521344827)*(1+2.*(dim-1.)/(o+1.))+(-0.180085766391)*dim
-        ref[2,4,0,1]=(-1.10948105015)*(1+2.*(dim-1.)/(o+1.))+(0.0595746783013)*dim
-        ref[2,4,1,0]=(-0.251521967553)*(1+2.*(dim-1.)/(o+1.))+(-0.592765061514)*dim
-        ref[2,4,1,1]=(-2.22732408506)*(1+2.*(dim-1.)/(o+1.))+(-0.813809172329)*dim
-        ref[2,4,2,0]=(-1.4091057051)*(1+2.*(dim-1.)/(o+1.))+(2.64669188252)*dim
-        ref[2,4,2,1]=(-0.0262518153279)*(1+2.*(dim-1.)/(o+1.))+(1.34343075804)*dim
-        ref[3,0,0,0]=(2.08524442815)*(1+2.*(dim-1.)/(o+1.))+(-0.602928292982)*dim
-        ref[3,0,0,1]=(0.227442743255)*(1+2.*(dim-1.)/(o+1.))+(1.19135776442)*dim
-        ref[3,0,1,0]=(1.03371796145)*(1+2.*(dim-1.)/(o+1.))+(-1.03073515087)*dim
-        ref[3,0,1,1]=(0.205903763449)*(1+2.*(dim-1.)/(o+1.))+(1.4651429667)*dim
-        ref[3,0,2,0]=(1.54387435524)*(1+2.*(dim-1.)/(o+1.))+(-0.957161046404)*dim
-        ref[3,0,2,1]=(-0.487693556268)*(1+2.*(dim-1.)/(o+1.))+(-0.504725375232)*dim
-        ref[3,1,0,0]=(0.319450917291)*(1+2.*(dim-1.)/(o+1.))+(-0.958071400411)*dim
-        ref[3,1,0,1]=(-0.0756676477654)*(1+2.*(dim-1.)/(o+1.))+(-0.929658636049)*dim
-        ref[3,1,1,0]=(0.0109030665653)*(1+2.*(dim-1.)/(o+1.))+(0.692693723343)*dim
-        ref[3,1,1,1]=(0.540904091106)*(1+2.*(dim-1.)/(o+1.))+(-0.994960230569)*dim
-        ref[3,1,2,0]=(-1.39229945953)*(1+2.*(dim-1.)/(o+1.))+(-1.4113311628)*dim
-        ref[3,1,2,1]=(-0.120906779216)*(1+2.*(dim-1.)/(o+1.))+(-0.342051809366)*dim
-        ref[3,2,0,0]=(-0.61477618653)*(1+2.*(dim-1.)/(o+1.))+(0.178917859873)*dim
-        ref[3,2,0,1]=(0.286238606318)*(1+2.*(dim-1.)/(o+1.))+(-0.0466390555654)*dim
-        ref[3,2,1,0]=(-0.0560560726323)*(1+2.*(dim-1.)/(o+1.))+(-0.305975529033)*dim
-        ref[3,2,1,1]=(0.935166077059)*(1+2.*(dim-1.)/(o+1.))+(-0.884762617288)*dim
-        ref[3,2,2,0]=(0.57015079501)*(1+2.*(dim-1.)/(o+1.))+(-2.14138354655)*dim
-        ref[3,2,2,1]=(-0.699470490706)*(1+2.*(dim-1.)/(o+1.))+(0.672222147932)*dim
-        ref[3,3,0,0]=(1.33431543118)*(1+2.*(dim-1.)/(o+1.))+(-0.448557066912)*dim
-        ref[3,3,0,1]=(-1.03724498716)*(1+2.*(dim-1.)/(o+1.))+(1.52541255729)*dim
-        ref[3,3,1,0]=(-0.00371131395733)*(1+2.*(dim-1.)/(o+1.))+(0.974655010698)*dim
-        ref[3,3,1,1]=(0.0918410742793)*(1+2.*(dim-1.)/(o+1.))+(0.0508418750519)*dim
-        ref[3,3,2,0]=(1.63372857769)*(1+2.*(dim-1.)/(o+1.))+(0.121263380706)*dim
-        ref[3,3,2,1]=(0.761569446324)*(1+2.*(dim-1.)/(o+1.))+(0.943853210019)*dim
-        ref[3,4,0,0]=(-0.625751279162)*(1+2.*(dim-1.)/(o+1.))+(-0.000808162076656)*dim
-        ref[3,4,0,1]=(-0.113324890356)*(1+2.*(dim-1.)/(o+1.))+(-0.0211281790319)*dim
-        ref[3,4,1,0]=(0.296144237506)*(1+2.*(dim-1.)/(o+1.))+(-0.470246132989)*dim
-        ref[3,4,1,1]=(0.194264324372)*(1+2.*(dim-1.)/(o+1.))+(-0.0590405157015)*dim
-        ref[3,4,2,0]=(1.63851379122)*(1+2.*(dim-1.)/(o+1.))+(-0.192978025203)*dim
-        ref[3,4,2,1]=(-0.757374882295)*(1+2.*(dim-1.)/(o+1.))+(-1.15353478672)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      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.0177156089276)*x[0]+(-1.07750293477)*x[1]
-        ref=(0.674554765151)*(1+2.*(dim-1.)/(o+1.))+(-1.76977330884)*dim
-      else:
-        arg=(0.304688056778)*x[0]+(0.548485298428)*x[1]+(0.672370309114)*x[2]
-        ref=(0.0121419382123)*(1+2.*(dim-1.)/(o+1.))+(1.51340172611)*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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      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.float_)
-      if dim==2:
-        arg[0]=(-1.81332918209)*x[0]+(0.825631690982)*x[1]
-        arg[1]=(0.568335098118)*x[0]+(-0.504485431124)*x[1]
-        ref[0]=(0.0338855214148)*(1+2.*(dim-1.)/(o+1.))+(-1.02158301252)*dim
-        ref[1]=(0.348045520014)*(1+2.*(dim-1.)/(o+1.))+(-0.284195853019)*dim
-      else:
-        arg[0]=(-0.34247651789)*x[0]+(0.952434108232)*x[1]+(0.956872478767)*x[2]
-        arg[1]=(-0.73212870207)*x[0]+(1.25659546958)*x[1]+(-0.690842998605)*x[2]
-        ref[0]=(1.22184577749)*(1+2.*(dim-1.)/(o+1.))+(0.344984291617)*dim
-        ref[1]=(-0.600249739257)*(1+2.*(dim-1.)/(o+1.))+(0.433873508162)*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_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests integral of rank 2 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-1.78262197231)*x[0]+(1.45174573417)*x[1]
-        arg[0,1]=(0.213586223199)*x[0]+(-0.917876059198)*x[1]
-        arg[0,2]=(-1.12034819339)*x[0]+(0.59993130233)*x[1]
-        arg[0,3]=(-0.156732957083)*x[0]+(0.744660873695)*x[1]
-        arg[0,4]=(0.217327014577)*x[0]+(1.40157420042)*x[1]
-        arg[1,0]=(0.0588042984116)*x[0]+(1.40376148561)*x[1]
-        arg[1,1]=(-0.264973303233)*x[0]+(1.77692483003)*x[1]
-        arg[1,2]=(-1.17910097102)*x[0]+(-1.20301960774)*x[1]
-        arg[1,3]=(-0.511409983468)*x[0]+(-1.02065230228)*x[1]
-        arg[1,4]=(1.1254497221)*x[0]+(-1.23163629376)*x[1]
-        arg[2,0]=(-0.780207200735)*x[0]+(-1.49983791458)*x[1]
-        arg[2,1]=(0.20679132359)*x[0]+(0.640203014983)*x[1]
-        arg[2,2]=(0.198135205267)*x[0]+(0.30781411018)*x[1]
-        arg[2,3]=(0.465906968942)*x[0]+(-0.812198212)*x[1]
-        arg[2,4]=(0.190357350559)*x[0]+(-1.5894498455)*x[1]
-        arg[3,0]=(-1.1362863086)*x[0]+(-0.0654142353086)*x[1]
-        arg[3,1]=(0.0545924852084)*x[0]+(0.00262152155818)*x[1]
-        arg[3,2]=(-0.0497600832907)*x[0]+(-0.609396009303)*x[1]
-        arg[3,3]=(0.347834191962)*x[0]+(-0.768159599963)*x[1]
-        arg[3,4]=(-0.178383166761)*x[0]+(-0.0690942212822)*x[1]
-        ref[0,0]=(0.0436748214249)*(1+2.*(dim-1.)/(o+1.))+(-0.374551059559)*dim
-        ref[0,1]=(-1.05854206043)*(1+2.*(dim-1.)/(o+1.))+(0.354252224435)*dim
-        ref[0,2]=(-0.71782952995)*(1+2.*(dim-1.)/(o+1.))+(0.197412638885)*dim
-        ref[0,3]=(-0.255252590976)*(1+2.*(dim-1.)/(o+1.))+(0.843180507587)*dim
-        ref[0,4]=(0.177908820578)*(1+2.*(dim-1.)/(o+1.))+(1.44099239442)*dim
-        ref[1,0]=(1.56040501086)*(1+2.*(dim-1.)/(o+1.))+(-0.0978392268304)*dim
-        ref[1,1]=(1.33164571828)*(1+2.*(dim-1.)/(o+1.))+(0.180305808513)*dim
-        ref[1,2]=(-0.885397553926)*(1+2.*(dim-1.)/(o+1.))+(-1.49672302484)*dim
-        ref[1,3]=(0.105451964854)*(1+2.*(dim-1.)/(o+1.))+(-1.63751425061)*dim
-        ref[1,4]=(-0.774237262923)*(1+2.*(dim-1.)/(o+1.))+(0.668050691269)*dim
-        ref[2,0]=(-0.626493344552)*(1+2.*(dim-1.)/(o+1.))+(-1.65355177076)*dim
-        ref[2,1]=(0.383826450148)*(1+2.*(dim-1.)/(o+1.))+(0.463167888425)*dim
-        ref[2,2]=(-0.530241676713)*(1+2.*(dim-1.)/(o+1.))+(1.03619099216)*dim
-        ref[2,3]=(-1.18245389658)*(1+2.*(dim-1.)/(o+1.))+(0.836162653525)*dim
-        ref[2,4]=(-1.32396763993)*(1+2.*(dim-1.)/(o+1.))+(-0.0751248550082)*dim
-        ref[3,0]=(0.15610314985)*(1+2.*(dim-1.)/(o+1.))+(-1.35780369376)*dim
-        ref[3,1]=(-0.376931239611)*(1+2.*(dim-1.)/(o+1.))+(0.434145246378)*dim
-        ref[3,2]=(0.0188741177717)*(1+2.*(dim-1.)/(o+1.))+(-0.678030210365)*dim
-        ref[3,3]=(-0.264501990209)*(1+2.*(dim-1.)/(o+1.))+(-0.155823417792)*dim
-        ref[3,4]=(-0.394609208758)*(1+2.*(dim-1.)/(o+1.))+(0.147131820715)*dim
-      else:
-        arg[0,0]=(-1.55600852596)*x[0]+(-0.624393737912)*x[1]+(-0.747032596279)*x[2]
-        arg[0,1]=(0.158636782846)*x[0]+(-0.751760245066)*x[1]+(-1.62081735864)*x[2]
-        arg[0,2]=(1.18083264152)*x[0]+(-1.16696814878)*x[1]+(-0.567354369023)*x[2]
-        arg[0,3]=(0.176344525636)*x[0]+(-0.825319538089)*x[1]+(0.32760822446)*x[2]
-        arg[0,4]=(0.570849136808)*x[0]+(-0.86277959325)*x[1]+(-0.253106033513)*x[2]
-        arg[1,0]=(0.325475826081)*x[0]+(0.338988467638)*x[1]+(-0.596090654044)*x[2]
-        arg[1,1]=(-1.29950586693)*x[0]+(-0.980591079821)*x[1]+(-0.7995507704)*x[2]
-        arg[1,2]=(0.108948096835)*x[0]+(0.323001832704)*x[1]+(1.09678982473)*x[2]
-        arg[1,3]=(-0.0307191696266)*x[0]+(0.134014984197)*x[1]+(-0.271363693134)*x[2]
-        arg[1,4]=(0.0166805959434)*x[0]+(-0.323260440667)*x[1]+(-0.0168023639197)*x[2]
-        arg[2,0]=(1.66243206086)*x[0]+(-0.478403313987)*x[1]+(1.45469230407)*x[2]
-        arg[2,1]=(0.635927142861)*x[0]+(0.00628277747568)*x[1]+(-0.335502970321)*x[2]
-        arg[2,2]=(-0.168440428449)*x[0]+(-0.302470381257)*x[1]+(1.26059253147)*x[2]
-        arg[2,3]=(-0.0183286590129)*x[0]+(-0.0950506276918)*x[1]+(-0.721364110928)*x[2]
-        arg[2,4]=(-1.04551179644)*x[0]+(0.20728433783)*x[1]+(-0.631521487025)*x[2]
-        arg[3,0]=(1.0112442447)*x[0]+(0.0279472213885)*x[1]+(-1.24445628735)*x[2]
-        arg[3,1]=(-1.36197290176)*x[0]+(0.145431495907)*x[1]+(0.518562214899)*x[2]
-        arg[3,2]=(-0.249567074212)*x[0]+(-1.02991047199)*x[1]+(1.34627546588)*x[2]
-        arg[3,3]=(1.72315708213)*x[0]+(0.00515532937983)*x[1]+(-0.479917704073)*x[2]
-        arg[3,4]=(1.16297504595)*x[0]+(-0.176518851423)*x[1]+(0.184727222764)*x[2]
-        ref[0,0]=(-2.09480681002)*(1+2.*(dim-1.)/(o+1.))+(-0.832628050126)*dim
-        ref[0,1]=(-0.759565702286)*(1+2.*(dim-1.)/(o+1.))+(-1.45437511857)*dim
-        ref[0,2]=(-1.08318812741)*(1+2.*(dim-1.)/(o+1.))+(0.529698251127)*dim
-        ref[0,3]=(1.48988138495)*(1+2.*(dim-1.)/(o+1.))+(-1.81124817294)*dim
-        ref[0,4]=(0.116706866039)*(1+2.*(dim-1.)/(o+1.))+(-0.661743355994)*dim
-        ref[1,0]=(0.584176790043)*(1+2.*(dim-1.)/(o+1.))+(-0.515803150369)*dim
-        ref[1,1]=(-1.25638916576)*(1+2.*(dim-1.)/(o+1.))+(-1.82325855139)*dim
-        ref[1,2]=(-0.276318333951)*(1+2.*(dim-1.)/(o+1.))+(1.80505808822)*dim
-        ref[1,3]=(-0.732277841606)*(1+2.*(dim-1.)/(o+1.))+(0.564209963043)*dim
-        ref[1,4]=(-0.540285295646)*(1+2.*(dim-1.)/(o+1.))+(0.216903087004)*dim
-        ref[2,0]=(2.23339929969)*(1+2.*(dim-1.)/(o+1.))+(0.405321751257)*dim
-        ref[2,1]=(0.706137929075)*(1+2.*(dim-1.)/(o+1.))+(-0.39943097906)*dim
-        ref[2,2]=(-0.474421381251)*(1+2.*(dim-1.)/(o+1.))+(1.26410310301)*dim
-        ref[2,3]=(1.43870260444)*(1+2.*(dim-1.)/(o+1.))+(-2.27344600207)*dim
-        ref[2,4]=(-1.00154864599)*(1+2.*(dim-1.)/(o+1.))+(-0.468200299646)*dim
-        ref[3,0]=(-1.42181650401)*(1+2.*(dim-1.)/(o+1.))+(1.21655168275)*dim
-        ref[3,1]=(-0.853191175508)*(1+2.*(dim-1.)/(o+1.))+(0.155211984554)*dim
-        ref[3,2]=(-0.823496284217)*(1+2.*(dim-1.)/(o+1.))+(0.890294203901)*dim
-        ref[3,3]=(1.54168027082)*(1+2.*(dim-1.)/(o+1.))+(-0.293285563378)*dim
-        ref[3,4]=(1.66366656195)*(1+2.*(dim-1.)/(o+1.))+(-0.492483144667)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.775903850503)*x[0]+(0.20657985447)*x[1]
-        arg[0,0,1]=(1.42793412139)*x[0]+(1.11703130088)*x[1]
-        arg[0,1,0]=(1.89750028353)*x[0]+(1.77903425203)*x[1]
-        arg[0,1,1]=(-0.67280619036)*x[0]+(-0.283600511942)*x[1]
-        arg[1,0,0]=(0.12590667282)*x[0]+(-0.109778270548)*x[1]
-        arg[1,0,1]=(-1.06454156291)*x[0]+(-0.952754071628)*x[1]
-        arg[1,1,0]=(1.27939438243)*x[0]+(1.41358757535)*x[1]
-        arg[1,1,1]=(-1.68847666929)*x[0]+(-0.13467497005)*x[1]
-        arg[2,0,0]=(0.116194220064)*x[0]+(0.457728827844)*x[1]
-        arg[2,0,1]=(0.205487821412)*x[0]+(-0.657189976052)*x[1]
-        arg[2,1,0]=(0.276192450801)*x[0]+(0.998191496643)*x[1]
-        arg[2,1,1]=(1.63929218914)*x[0]+(0.268648283241)*x[1]
-        arg[3,0,0]=(-0.419114071163)*x[0]+(-0.365697048391)*x[1]
-        arg[3,0,1]=(0.802747458947)*x[0]+(0.137023645119)*x[1]
-        arg[3,1,0]=(-0.0712635889142)*x[0]+(0.495489688269)*x[1]
-        arg[3,1,1]=(-0.559073395964)*x[0]+(0.248364992354)*x[1]
-        arg[4,0,0]=(0.372130696656)*x[0]+(1.22892579337)*x[1]
-        arg[4,0,1]=(-1.47944537272)*x[0]+(1.46750125425)*x[1]
-        arg[4,1,0]=(-0.0683410762004)*x[0]+(0.0982446782745)*x[1]
-        arg[4,1,1]=(0.0698227670903)*x[0]+(0.227875508249)*x[1]
-        arg[5,0,0]=(0.237110604157)*x[0]+(0.814767844631)*x[1]
-        arg[5,0,1]=(0.172109909542)*x[0]+(-1.56055537357)*x[1]
-        arg[5,1,0]=(0.92885449265)*x[0]+(0.820977987322)*x[1]
-        arg[5,1,1]=(-1.76483093472)*x[0]+(0.526316351009)*x[1]
-        ref[0,0,0]=(0.574633189339)*(1+2.*(dim-1.)/(o+1.))+(-1.14395718537)*dim
-        ref[0,0,1]=(1.25832290545)*(1+2.*(dim-1.)/(o+1.))+(1.28664251682)*dim
-        ref[0,1,0]=(1.75085914739)*(1+2.*(dim-1.)/(o+1.))+(1.92567538817)*dim
-        ref[0,1,1]=(-1.57747201281)*(1+2.*(dim-1.)/(o+1.))+(0.621065310511)*dim
-        ref[1,0,0]=(0.710883587246)*(1+2.*(dim-1.)/(o+1.))+(-0.694755184974)*dim
-        ref[1,0,1]=(-0.870861363869)*(1+2.*(dim-1.)/(o+1.))+(-1.14643427067)*dim
-        ref[1,1,0]=(1.21302125269)*(1+2.*(dim-1.)/(o+1.))+(1.4799607051)*dim
-        ref[1,1,1]=(-0.163344093083)*(1+2.*(dim-1.)/(o+1.))+(-1.65980754626)*dim
-        ref[2,0,0]=(1.18070929814)*(1+2.*(dim-1.)/(o+1.))+(-0.606786250235)*dim
-        ref[2,0,1]=(-1.26011538751)*(1+2.*(dim-1.)/(o+1.))+(0.808413232875)*dim
-        ref[2,1,0]=(-0.128253427149)*(1+2.*(dim-1.)/(o+1.))+(1.40263737459)*dim
-        ref[2,1,1]=(1.22388877116)*(1+2.*(dim-1.)/(o+1.))+(0.68405170122)*dim
-        ref[3,0,0]=(-1.51984063257)*(1+2.*(dim-1.)/(o+1.))+(0.735029513018)*dim
-        ref[3,0,1]=(1.63702893126)*(1+2.*(dim-1.)/(o+1.))+(-0.697257827196)*dim
-        ref[3,1,0]=(-0.274208683077)*(1+2.*(dim-1.)/(o+1.))+(0.698434782432)*dim
-        ref[3,1,1]=(0.649113059071)*(1+2.*(dim-1.)/(o+1.))+(-0.95982146268)*dim
-        ref[4,0,0]=(1.11723294318)*(1+2.*(dim-1.)/(o+1.))+(0.483823546848)*dim
-        ref[4,0,1]=(-0.0369311601619)*(1+2.*(dim-1.)/(o+1.))+(0.0249870416905)*dim
-        ref[4,1,0]=(-0.0969818481854)*(1+2.*(dim-1.)/(o+1.))+(0.126885450259)*dim
-        ref[4,1,1]=(0.607834304349)*(1+2.*(dim-1.)/(o+1.))+(-0.31013602901)*dim
-        ref[5,0,0]=(0.612356854718)*(1+2.*(dim-1.)/(o+1.))+(0.43952159407)*dim
-        ref[5,0,1]=(-0.245849747535)*(1+2.*(dim-1.)/(o+1.))+(-1.1425957165)*dim
-        ref[5,1,0]=(0.218025498167)*(1+2.*(dim-1.)/(o+1.))+(1.5318069818)*dim
-        ref[5,1,1]=(-0.39419356418)*(1+2.*(dim-1.)/(o+1.))+(-0.844321019532)*dim
-      else:
-        arg[0,0,0]=(1.52622777835)*x[0]+(-0.627217363559)*x[1]+(-0.221339024656)*x[2]
-        arg[0,0,1]=(-0.0735955925339)*x[0]+(-1.44492195287)*x[1]+(-0.0704081180966)*x[2]
-        arg[0,1,0]=(-0.330700790074)*x[0]+(-1.04769579979)*x[1]+(0.508799976666)*x[2]
-        arg[0,1,1]=(0.349349373439)*x[0]+(0.174054703574)*x[1]+(-0.129296220879)*x[2]
-        arg[1,0,0]=(0.0683757878129)*x[0]+(1.33394387082)*x[1]+(0.892302980732)*x[2]
-        arg[1,0,1]=(0.61014567223)*x[0]+(1.23846801628)*x[1]+(-0.990674941877)*x[2]
-        arg[1,1,0]=(0.964575308424)*x[0]+(0.354822939168)*x[1]+(-0.466180761866)*x[2]
-        arg[1,1,1]=(-1.79700594499)*x[0]+(-1.41821199521)*x[1]+(0.366764057361)*x[2]
-        arg[2,0,0]=(0.670092254407)*x[0]+(-0.188523225253)*x[1]+(0.363046866484)*x[2]
-        arg[2,0,1]=(0.420367065732)*x[0]+(0.798321474665)*x[1]+(-1.11347160928)*x[2]
-        arg[2,1,0]=(0.54732858526)*x[0]+(0.249248458735)*x[1]+(1.33905485076)*x[2]
-        arg[2,1,1]=(-1.45292600653)*x[0]+(-0.0838212918177)*x[1]+(-0.210961166185)*x[2]
-        arg[3,0,0]=(-0.406792355772)*x[0]+(-0.230709788944)*x[1]+(1.12300383125)*x[2]
-        arg[3,0,1]=(-1.02748413184)*x[0]+(-1.3840845484)*x[1]+(-0.181262479318)*x[2]
-        arg[3,1,0]=(-1.39003872882)*x[0]+(-0.302577309791)*x[1]+(-0.627070288119)*x[2]
-        arg[3,1,1]=(0.258496709277)*x[0]+(-1.32012543621)*x[1]+(0.921022534515)*x[2]
-        arg[4,0,0]=(-0.639952053735)*x[0]+(0.172303718581)*x[1]+(-1.55894055416)*x[2]
-        arg[4,0,1]=(-1.27660129414)*x[0]+(0.142177942574)*x[1]+(0.84156755899)*x[2]
-        arg[4,1,0]=(0.49812465572)*x[0]+(1.53755810837)*x[1]+(0.10504146131)*x[2]
-        arg[4,1,1]=(0.114534785643)*x[0]+(0.616103931999)*x[1]+(0.515764206037)*x[2]
-        arg[5,0,0]=(0.22562941228)*x[0]+(0.70743104453)*x[1]+(0.882965136406)*x[2]
-        arg[5,0,1]=(0.674003358504)*x[0]+(0.753008881236)*x[1]+(0.033083269963)*x[2]
-        arg[5,1,0]=(-0.495809169314)*x[0]+(-1.09613938465)*x[1]+(-1.03297996938)*x[2]
-        arg[5,1,1]=(-0.5222251005)*x[0]+(-0.56129023192)*x[1]+(0.529084741893)*x[2]
-        ref[0,0,0]=(0.164333186185)*(1+2.*(dim-1.)/(o+1.))+(0.513338203948)*dim
-        ref[0,0,1]=(-0.322072217228)*(1+2.*(dim-1.)/(o+1.))+(-1.26685344627)*dim
-        ref[0,1,0]=(1.37061498302)*(1+2.*(dim-1.)/(o+1.))+(-2.24021159622)*dim
-        ref[0,1,1]=(0.65996582358)*(1+2.*(dim-1.)/(o+1.))+(-0.265857967445)*dim
-        ref[1,0,0]=(1.83616555678)*(1+2.*(dim-1.)/(o+1.))+(0.458457082585)*dim
-        ref[1,0,1]=(1.01886896436)*(1+2.*(dim-1.)/(o+1.))+(-0.160930217723)*dim
-        ref[1,1,0]=(0.95375222959)*(1+2.*(dim-1.)/(o+1.))+(-0.100534743865)*dim
-        ref[1,1,1]=(-1.48059917075)*(1+2.*(dim-1.)/(o+1.))+(-1.3678547121)*dim
-        ref[2,0,0]=(-0.0805152837328)*(1+2.*(dim-1.)/(o+1.))+(0.925131179371)*dim
-        ref[2,0,1]=(0.155604473013)*(1+2.*(dim-1.)/(o+1.))+(-0.0503875419008)*dim
-        ref[2,1,0]=(0.117237902139)*(1+2.*(dim-1.)/(o+1.))+(2.01839399262)*dim
-        ref[2,1,1]=(0.196870433027)*(1+2.*(dim-1.)/(o+1.))+(-1.94457889755)*dim
-        ref[3,0,0]=(-1.16272511547)*(1+2.*(dim-1.)/(o+1.))+(1.648226802)*dim
-        ref[3,0,1]=(-1.54275766077)*(1+2.*(dim-1.)/(o+1.))+(-1.05007349878)*dim
-        ref[3,1,0]=(-2.21939430114)*(1+2.*(dim-1.)/(o+1.))+(-0.100292025596)*dim
-        ref[3,1,1]=(-0.974866109202)*(1+2.*(dim-1.)/(o+1.))+(0.834259916779)*dim
-        ref[4,0,0]=(-1.81015652027)*(1+2.*(dim-1.)/(o+1.))+(-0.216432369042)*dim
-        ref[4,0,1]=(-0.0692225921476)*(1+2.*(dim-1.)/(o+1.))+(-0.223633200428)*dim
-        ref[4,1,0]=(0.907628019251)*(1+2.*(dim-1.)/(o+1.))+(1.23309620615)*dim
-        ref[4,1,1]=(-0.77625708658)*(1+2.*(dim-1.)/(o+1.))+(2.02266001026)*dim
-        ref[5,0,0]=(0.040336826806)*(1+2.*(dim-1.)/(o+1.))+(1.77568876641)*dim
-        ref[5,0,1]=(-0.741065482842)*(1+2.*(dim-1.)/(o+1.))+(2.20116099255)*dim
-        ref[5,1,0]=(-1.93385845474)*(1+2.*(dim-1.)/(o+1.))+(-0.691070068594)*dim
-        ref[5,1,1]=(-0.539652361393)*(1+2.*(dim-1.)/(o+1.))+(-0.014778229134)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"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 the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.139765044323)*x[0]+(0.763652540371)*x[1]
-        arg[0,0,0,1]=(1.22422998499)*x[0]+(-0.704059494925)*x[1]
-        arg[0,0,1,0]=(-0.0738568759745)*x[0]+(0.227297731345)*x[1]
-        arg[0,0,1,1]=(-0.438016525512)*x[0]+(-0.00290173552923)*x[1]
-        arg[0,0,2,0]=(-0.142466265385)*x[0]+(0.159086109387)*x[1]
-        arg[0,0,2,1]=(-1.29207470861)*x[0]+(0.171024552932)*x[1]
-        arg[0,1,0,0]=(0.228469040214)*x[0]+(-1.11207386711)*x[1]
-        arg[0,1,0,1]=(-0.0716121324998)*x[0]+(-0.293214318059)*x[1]
-        arg[0,1,1,0]=(-0.552331240231)*x[0]+(0.483311325934)*x[1]
-        arg[0,1,1,1]=(0.759050036013)*x[0]+(-0.192218075397)*x[1]
-        arg[0,1,2,0]=(0.736408127399)*x[0]+(0.61962966835)*x[1]
-        arg[0,1,2,1]=(-0.170110592043)*x[0]+(1.12024324836)*x[1]
-        arg[0,2,0,0]=(1.15358129137)*x[0]+(0.00288801991025)*x[1]
-        arg[0,2,0,1]=(0.34101930461)*x[0]+(1.44561406668)*x[1]
-        arg[0,2,1,0]=(1.20180064935)*x[0]+(1.53696717349)*x[1]
-        arg[0,2,1,1]=(-0.955282659666)*x[0]+(-0.232022391367)*x[1]
-        arg[0,2,2,0]=(0.0907361523468)*x[0]+(0.0735957910178)*x[1]
-        arg[0,2,2,1]=(0.377295180443)*x[0]+(-0.694318356175)*x[1]
-        arg[0,3,0,0]=(1.38936937129)*x[0]+(-1.11460156576)*x[1]
-        arg[0,3,0,1]=(-0.477623155591)*x[0]+(-1.38984205639)*x[1]
-        arg[0,3,1,0]=(0.0643534425446)*x[0]+(1.38744715898)*x[1]
-        arg[0,3,1,1]=(0.0144448337619)*x[0]+(-0.107478295727)*x[1]
-        arg[0,3,2,0]=(0.494522779873)*x[0]+(-0.623994602046)*x[1]
-        arg[0,3,2,1]=(0.865352526765)*x[0]+(-0.0330471549519)*x[1]
-        arg[0,4,0,0]=(0.876802965861)*x[0]+(-0.72991482831)*x[1]
-        arg[0,4,0,1]=(-1.59217671369)*x[0]+(-1.17443275047)*x[1]
-        arg[0,4,1,0]=(0.980556838858)*x[0]+(-0.134374268551)*x[1]
-        arg[0,4,1,1]=(-0.799387621998)*x[0]+(0.290707689722)*x[1]
-        arg[0,4,2,0]=(-0.152070506377)*x[0]+(-0.720051351365)*x[1]
-        arg[0,4,2,1]=(-0.726386342076)*x[0]+(-0.821126213298)*x[1]
-        arg[1,0,0,0]=(0.0108792321621)*x[0]+(1.08482229519)*x[1]
-        arg[1,0,0,1]=(0.395066734758)*x[0]+(-0.147576996716)*x[1]
-        arg[1,0,1,0]=(1.34674167646)*x[0]+(-1.7762597766)*x[1]
-        arg[1,0,1,1]=(0.145955749421)*x[0]+(0.0758020791017)*x[1]
-        arg[1,0,2,0]=(-1.3779896638)*x[0]+(0.879047617812)*x[1]
-        arg[1,0,2,1]=(-0.034533186491)*x[0]+(-0.961616456719)*x[1]
-        arg[1,1,0,0]=(1.93531133223)*x[0]+(0.085806770105)*x[1]
-        arg[1,1,0,1]=(-1.40810156335)*x[0]+(0.647954800386)*x[1]
-        arg[1,1,1,0]=(-0.898682130534)*x[0]+(0.0293908578939)*x[1]
-        arg[1,1,1,1]=(0.906365050374)*x[0]+(0.493604087615)*x[1]
-        arg[1,1,2,0]=(0.200697611638)*x[0]+(0.595460978794)*x[1]
-        arg[1,1,2,1]=(-0.137201357175)*x[0]+(-0.456327010456)*x[1]
-        arg[1,2,0,0]=(-0.435882659968)*x[0]+(-0.0312083604574)*x[1]
-        arg[1,2,0,1]=(-0.678923893852)*x[0]+(-0.559827568731)*x[1]
-        arg[1,2,1,0]=(-0.721204171338)*x[0]+(-0.054379212442)*x[1]
-        arg[1,2,1,1]=(-0.0624007046506)*x[0]+(0.168316149134)*x[1]
-        arg[1,2,2,0]=(-1.58839995565)*x[0]+(-0.212071943846)*x[1]
-        arg[1,2,2,1]=(-1.12936118963)*x[0]+(1.37132899453)*x[1]
-        arg[1,3,0,0]=(-0.382791970195)*x[0]+(-1.08331380956)*x[1]
-        arg[1,3,0,1]=(-0.83075188923)*x[0]+(-0.771795988467)*x[1]
-        arg[1,3,1,0]=(-0.491393878842)*x[0]+(0.256082770048)*x[1]
-        arg[1,3,1,1]=(1.16535762668)*x[0]+(1.15868916612)*x[1]
-        arg[1,3,2,0]=(0.930916100823)*x[0]+(0.447810335514)*x[1]
-        arg[1,3,2,1]=(0.542008480891)*x[0]+(0.428660301354)*x[1]
-        arg[1,4,0,0]=(0.820283847448)*x[0]+(-0.861049765761)*x[1]
-        arg[1,4,0,1]=(0.794597952616)*x[0]+(0.484963133102)*x[1]
-        arg[1,4,1,0]=(-0.0864183500936)*x[0]+(-0.48652009912)*x[1]
-        arg[1,4,1,1]=(-0.729261074705)*x[0]+(0.572520019661)*x[1]
-        arg[1,4,2,0]=(0.874563670592)*x[0]+(-1.03978413308)*x[1]
-        arg[1,4,2,1]=(-0.119980177921)*x[0]+(-0.416981275935)*x[1]
-        arg[2,0,0,0]=(0.00851163981688)*x[0]+(0.0537719250367)*x[1]
-        arg[2,0,0,1]=(0.325152071307)*x[0]+(0.852063357275)*x[1]
-        arg[2,0,1,0]=(0.3798978673)*x[0]+(0.103107604149)*x[1]
-        arg[2,0,1,1]=(0.241778324259)*x[0]+(0.840767359849)*x[1]
-        arg[2,0,2,0]=(0.504220642882)*x[0]+(-0.296421218478)*x[1]
-        arg[2,0,2,1]=(1.21850888213)*x[0]+(0.361422173343)*x[1]
-        arg[2,1,0,0]=(1.23948863042)*x[0]+(-0.454591957846)*x[1]
-        arg[2,1,0,1]=(-0.834341417745)*x[0]+(0.836809823188)*x[1]
-        arg[2,1,1,0]=(0.305283593888)*x[0]+(-0.443709359754)*x[1]
-        arg[2,1,1,1]=(-1.73751494542)*x[0]+(0.28249619071)*x[1]
-        arg[2,1,2,0]=(1.64628846378)*x[0]+(0.929422692022)*x[1]
-        arg[2,1,2,1]=(1.55964953056)*x[0]+(0.294507226966)*x[1]
-        arg[2,2,0,0]=(-0.122178600734)*x[0]+(-0.836106215351)*x[1]
-        arg[2,2,0,1]=(0.0560920262009)*x[0]+(-0.959524453552)*x[1]
-        arg[2,2,1,0]=(-0.0235093950509)*x[0]+(1.00069942275)*x[1]
-        arg[2,2,1,1]=(-1.6685983361)*x[0]+(-0.283415608089)*x[1]
-        arg[2,2,2,0]=(1.88757268407)*x[0]+(-0.0970308753337)*x[1]
-        arg[2,2,2,1]=(-0.620474974074)*x[0]+(0.24769276713)*x[1]
-        arg[2,3,0,0]=(1.01637595389)*x[0]+(0.705160942822)*x[1]
-        arg[2,3,0,1]=(1.14707395208)*x[0]+(0.705275592532)*x[1]
-        arg[2,3,1,0]=(-0.758160952494)*x[0]+(0.305309048122)*x[1]
-        arg[2,3,1,1]=(0.772402918026)*x[0]+(-0.052854508055)*x[1]
-        arg[2,3,2,0]=(-0.154978687298)*x[0]+(0.418368826949)*x[1]
-        arg[2,3,2,1]=(-0.845976442257)*x[0]+(0.20623978887)*x[1]
-        arg[2,4,0,0]=(-0.466185710519)*x[0]+(-0.233766119139)*x[1]
-        arg[2,4,0,1]=(-0.922877220469)*x[0]+(-0.688487528304)*x[1]
-        arg[2,4,1,0]=(0.95836287786)*x[0]+(0.939609093639)*x[1]
-        arg[2,4,1,1]=(-0.11982304155)*x[0]+(-0.257073186684)*x[1]
-        arg[2,4,2,0]=(0.345817495959)*x[0]+(0.151979044778)*x[1]
-        arg[2,4,2,1]=(-1.05379548205)*x[0]+(-0.436065928744)*x[1]
-        arg[3,0,0,0]=(0.744945706398)*x[0]+(-0.649458468468)*x[1]
-        arg[3,0,0,1]=(-1.04958965249)*x[0]+(0.639942303499)*x[1]
-        arg[3,0,1,0]=(0.337716118074)*x[0]+(1.93458666396)*x[1]
-        arg[3,0,1,1]=(0.303244531116)*x[0]+(0.436648998724)*x[1]
-        arg[3,0,2,0]=(-1.55484904142)*x[0]+(0.0691158242075)*x[1]
-        arg[3,0,2,1]=(-0.184571563941)*x[0]+(-0.617496186026)*x[1]
-        arg[3,1,0,0]=(0.54665472418)*x[0]+(-0.685197219861)*x[1]
-        arg[3,1,0,1]=(0.270341054659)*x[0]+(0.0123904138595)*x[1]
-        arg[3,1,1,0]=(-0.551927232745)*x[0]+(-0.0835992799883)*x[1]
-        arg[3,1,1,1]=(-0.731741032186)*x[0]+(0.351597478907)*x[1]
-        arg[3,1,2,0]=(-0.678408784965)*x[0]+(-0.0779391332051)*x[1]
-        arg[3,1,2,1]=(-0.873182924195)*x[0]+(-0.641772673128)*x[1]
-        arg[3,2,0,0]=(-0.826223714873)*x[0]+(0.631844849849)*x[1]
-        arg[3,2,0,1]=(-0.899714515249)*x[0]+(-0.010350665009)*x[1]
-        arg[3,2,1,0]=(0.290678744119)*x[0]+(-0.5871053663)*x[1]
-        arg[3,2,1,1]=(0.208288673139)*x[0]+(0.631917010925)*x[1]
-        arg[3,2,2,0]=(-0.262706136542)*x[0]+(0.0853212850096)*x[1]
-        arg[3,2,2,1]=(-1.28934754486)*x[0]+(0.686855142119)*x[1]
-        arg[3,3,0,0]=(-1.36704032596)*x[0]+(-1.55543480824)*x[1]
-        arg[3,3,0,1]=(-1.17014698336)*x[0]+(-0.652446157654)*x[1]
-        arg[3,3,1,0]=(-0.547499757476)*x[0]+(-0.156519515585)*x[1]
-        arg[3,3,1,1]=(0.228140026291)*x[0]+(-1.41014817371)*x[1]
-        arg[3,3,2,0]=(-0.055056583329)*x[0]+(-0.412525603966)*x[1]
-        arg[3,3,2,1]=(-0.524790489086)*x[0]+(-0.774411367008)*x[1]
-        arg[3,4,0,0]=(-1.33491047191)*x[0]+(1.47855022808)*x[1]
-        arg[3,4,0,1]=(-0.301405501225)*x[0]+(0.687178741851)*x[1]
-        arg[3,4,1,0]=(0.213050803289)*x[0]+(0.428086322291)*x[1]
-        arg[3,4,1,1]=(-1.67469009469)*x[0]+(0.857275314994)*x[1]
-        arg[3,4,2,0]=(0.748812148687)*x[0]+(-0.0339722859922)*x[1]
-        arg[3,4,2,1]=(-0.829454912563)*x[0]+(-0.637161668052)*x[1]
-        ref[0,0,0,0]=(0.538138880568)*(1+2.*(dim-1.)/(o+1.))+(0.365278704126)*dim
-        ref[0,0,0,1]=(0.532354921417)*(1+2.*(dim-1.)/(o+1.))+(-0.0121844313566)*dim
-        ref[0,0,1,0]=(1.27037934234)*(1+2.*(dim-1.)/(o+1.))+(-1.11693848697)*dim
-        ref[0,0,1,1]=(-0.317494874699)*(1+2.*(dim-1.)/(o+1.))+(-0.123423386343)*dim
-        ref[0,0,2,0]=(-0.274542501137)*(1+2.*(dim-1.)/(o+1.))+(0.291162345138)*dim
-        ref[0,0,2,1]=(-0.669231324784)*(1+2.*(dim-1.)/(o+1.))+(-0.451818830894)*dim
-        ref[0,1,0,0]=(-1.55791021679)*(1+2.*(dim-1.)/(o+1.))+(0.674305389899)*dim
-        ref[0,1,0,1]=(-1.04225461385)*(1+2.*(dim-1.)/(o+1.))+(0.67742816329)*dim
-        ref[0,1,1,0]=(-0.553787932867)*(1+2.*(dim-1.)/(o+1.))+(0.48476801857)*dim
-        ref[0,1,1,1]=(0.774284436582)*(1+2.*(dim-1.)/(o+1.))+(-0.207452475966)*dim
-        ref[0,1,2,0]=(0.754663298028)*(1+2.*(dim-1.)/(o+1.))+(0.601374497721)*dim
-        ref[0,1,2,1]=(0.378489135155)*(1+2.*(dim-1.)/(o+1.))+(0.571643521166)*dim
-        ref[0,2,0,0]=(0.84270626402)*(1+2.*(dim-1.)/(o+1.))+(0.313763047258)*dim
-        ref[0,2,0,1]=(0.741388749098)*(1+2.*(dim-1.)/(o+1.))+(1.0452446222)*dim
-        ref[0,2,1,0]=(1.31801677967)*(1+2.*(dim-1.)/(o+1.))+(1.42075104317)*dim
-        ref[0,2,1,1]=(0.342128499103)*(1+2.*(dim-1.)/(o+1.))+(-1.52943355014)*dim
-        ref[0,2,2,0]=(-0.2097885639)*(1+2.*(dim-1.)/(o+1.))+(0.374120507264)*dim
-        ref[0,2,2,1]=(0.517181369396)*(1+2.*(dim-1.)/(o+1.))+(-0.834204545127)*dim
-        ref[0,3,0,0]=(0.546538945104)*(1+2.*(dim-1.)/(o+1.))+(-0.271771139576)*dim
-        ref[0,3,0,1]=(-1.11041658618)*(1+2.*(dim-1.)/(o+1.))+(-0.757048625806)*dim
-        ref[0,3,1,0]=(1.71248931933)*(1+2.*(dim-1.)/(o+1.))+(-0.260688717804)*dim
-        ref[0,3,1,1]=(0.426783834682)*(1+2.*(dim-1.)/(o+1.))+(-0.519817296646)*dim
-        ref[0,3,2,0]=(-0.159038051631)*(1+2.*(dim-1.)/(o+1.))+(0.0295662294573)*dim
-        ref[0,3,2,1]=(-0.0935533877409)*(1+2.*(dim-1.)/(o+1.))+(0.925858759554)*dim
-        ref[0,4,0,0]=(0.254413611162)*(1+2.*(dim-1.)/(o+1.))+(-0.107525473611)*dim
-        ref[0,4,0,1]=(-1.80344635667)*(1+2.*(dim-1.)/(o+1.))+(-0.963163107492)*dim
-        ref[0,4,1,0]=(0.77936654687)*(1+2.*(dim-1.)/(o+1.))+(0.0668160234379)*dim
-        ref[0,4,1,1]=(-0.854656189741)*(1+2.*(dim-1.)/(o+1.))+(0.345976257465)*dim
-        ref[0,4,2,0]=(0.236075361826)*(1+2.*(dim-1.)/(o+1.))+(-1.10819721957)*dim
-        ref[0,4,2,1]=(-1.41443045549)*(1+2.*(dim-1.)/(o+1.))+(-0.133082099885)*dim
-        ref[1,0,0,0]=(0.254601110632)*(1+2.*(dim-1.)/(o+1.))+(0.841100416717)*dim
-        ref[1,0,0,1]=(-1.05142234949)*(1+2.*(dim-1.)/(o+1.))+(1.29891208753)*dim
-        ref[1,0,1,0]=(-0.476182365596)*(1+2.*(dim-1.)/(o+1.))+(0.0466642654563)*dim
-        ref[1,0,1,1]=(-1.2117362156)*(1+2.*(dim-1.)/(o+1.))+(1.43349404413)*dim
-        ref[1,0,2,0]=(-0.82694411065)*(1+2.*(dim-1.)/(o+1.))+(0.328002064662)*dim
-        ref[1,0,2,1]=(-0.784489634199)*(1+2.*(dim-1.)/(o+1.))+(-0.211660009011)*dim
-        ref[1,1,0,0]=(1.67906802629)*(1+2.*(dim-1.)/(o+1.))+(0.342050076043)*dim
-        ref[1,1,0,1]=(-0.798764638314)*(1+2.*(dim-1.)/(o+1.))+(0.03861787535)*dim
-        ref[1,1,1,0]=(0.348279136631)*(1+2.*(dim-1.)/(o+1.))+(-1.21757040927)*dim
-        ref[1,1,1,1]=(0.452104104709)*(1+2.*(dim-1.)/(o+1.))+(0.94786503328)*dim
-        ref[1,1,2,0]=(0.855057493837)*(1+2.*(dim-1.)/(o+1.))+(-0.0588989034046)*dim
-        ref[1,1,2,1]=(-0.666495642664)*(1+2.*(dim-1.)/(o+1.))+(0.0729672750328)*dim
-        ref[1,2,0,0]=(-0.566691483673)*(1+2.*(dim-1.)/(o+1.))+(0.0996004632473)*dim
-        ref[1,2,0,1]=(-0.127941886194)*(1+2.*(dim-1.)/(o+1.))+(-1.11080957639)*dim
-        ref[1,2,1,0]=(-0.249856548379)*(1+2.*(dim-1.)/(o+1.))+(-0.525726835401)*dim
-        ref[1,2,1,1]=(1.00195986166)*(1+2.*(dim-1.)/(o+1.))+(-0.896044417179)*dim
-        ref[1,2,2,0]=(-0.96849834562)*(1+2.*(dim-1.)/(o+1.))+(-0.831973553872)*dim
-        ref[1,2,2,1]=(0.204504064885)*(1+2.*(dim-1.)/(o+1.))+(0.0374637400154)*dim
-        ref[1,3,0,0]=(-0.587139938504)*(1+2.*(dim-1.)/(o+1.))+(-0.878965841253)*dim
-        ref[1,3,0,1]=(-0.013960550118)*(1+2.*(dim-1.)/(o+1.))+(-1.58858732758)*dim
-        ref[1,3,1,0]=(-0.626445648631)*(1+2.*(dim-1.)/(o+1.))+(0.391134539838)*dim
-        ref[1,3,1,1]=(0.793357894316)*(1+2.*(dim-1.)/(o+1.))+(1.53068889848)*dim
-        ref[1,3,2,0]=(-0.30795291971)*(1+2.*(dim-1.)/(o+1.))+(1.68667935605)*dim
-        ref[1,3,2,1]=(0.865506632636)*(1+2.*(dim-1.)/(o+1.))+(0.105162149608)*dim
-        ref[1,4,0,0]=(0.0142921032519)*(1+2.*(dim-1.)/(o+1.))+(-0.0550580215643)*dim
-        ref[1,4,0,1]=(1.74635688975)*(1+2.*(dim-1.)/(o+1.))+(-0.466795804028)*dim
-        ref[1,4,1,0]=(0.202247079284)*(1+2.*(dim-1.)/(o+1.))+(-0.775185528498)*dim
-        ref[1,4,1,1]=(0.518302547238)*(1+2.*(dim-1.)/(o+1.))+(-0.675043602282)*dim
-        ref[1,4,2,0]=(-0.0110996487494)*(1+2.*(dim-1.)/(o+1.))+(-0.154120813742)*dim
-        ref[1,4,2,1]=(0.445368223328)*(1+2.*(dim-1.)/(o+1.))+(-0.982329677184)*dim
-        ref[2,0,0,0]=(1.11858205689)*(1+2.*(dim-1.)/(o+1.))+(-1.05629849203)*dim
-        ref[2,0,0,1]=(0.326749663749)*(1+2.*(dim-1.)/(o+1.))+(0.850465764833)*dim
-        ref[2,0,1,0]=(1.17260350442)*(1+2.*(dim-1.)/(o+1.))+(-0.689598032967)*dim
-        ref[2,0,1,1]=(1.26453211291)*(1+2.*(dim-1.)/(o+1.))+(-0.181986428807)*dim
-        ref[2,0,2,0]=(0.28543047736)*(1+2.*(dim-1.)/(o+1.))+(-0.0776310529561)*dim
-        ref[2,0,2,1]=(1.67283723918)*(1+2.*(dim-1.)/(o+1.))+(-0.092906183711)*dim
-        ref[2,1,0,0]=(0.375606493975)*(1+2.*(dim-1.)/(o+1.))+(0.409290178597)*dim
-        ref[2,1,0,1]=(0.391717224425)*(1+2.*(dim-1.)/(o+1.))+(-0.389248818981)*dim
-        ref[2,1,1,0]=(0.540376031372)*(1+2.*(dim-1.)/(o+1.))+(-0.678801797238)*dim
-        ref[2,1,1,1]=(-0.781880488997)*(1+2.*(dim-1.)/(o+1.))+(-0.673138265714)*dim
-        ref[2,1,2,0]=(1.19474704445)*(1+2.*(dim-1.)/(o+1.))+(1.38096411135)*dim
-        ref[2,1,2,1]=(0.3333062674)*(1+2.*(dim-1.)/(o+1.))+(1.52085049012)*dim
-        ref[2,2,0,0]=(-0.570564746042)*(1+2.*(dim-1.)/(o+1.))+(-0.387720070044)*dim
-        ref[2,2,0,1]=(-0.906439974412)*(1+2.*(dim-1.)/(o+1.))+(0.00300754706095)*dim
-        ref[2,2,1,0]=(1.35643048678)*(1+2.*(dim-1.)/(o+1.))+(-0.379240459088)*dim
-        ref[2,2,1,1]=(-1.68522696847)*(1+2.*(dim-1.)/(o+1.))+(-0.266786975721)*dim
-        ref[2,2,2,0]=(1.64773077393)*(1+2.*(dim-1.)/(o+1.))+(0.14281103481)*dim
-        ref[2,2,2,1]=(0.161577377439)*(1+2.*(dim-1.)/(o+1.))+(-0.534359584383)*dim
-        ref[2,3,0,0]=(0.117577368411)*(1+2.*(dim-1.)/(o+1.))+(1.6039595283)*dim
-        ref[2,3,0,1]=(1.07270794583)*(1+2.*(dim-1.)/(o+1.))+(0.779641598778)*dim
-        ref[2,3,1,0]=(0.940083930247)*(1+2.*(dim-1.)/(o+1.))+(-1.39293583462)*dim
-        ref[2,3,1,1]=(-0.322170646263)*(1+2.*(dim-1.)/(o+1.))+(1.04171905623)*dim
-        ref[2,3,2,0]=(-1.00498391043)*(1+2.*(dim-1.)/(o+1.))+(1.26837405008)*dim
-        ref[2,3,2,1]=(0.148227404921)*(1+2.*(dim-1.)/(o+1.))+(-0.787964058307)*dim
-        ref[2,4,0,0]=(-0.567878073929)*(1+2.*(dim-1.)/(o+1.))+(-0.132073755729)*dim
-        ref[2,4,0,1]=(-0.265369521409)*(1+2.*(dim-1.)/(o+1.))+(-1.34599522736)*dim
-        ref[2,4,1,0]=(0.87362235129)*(1+2.*(dim-1.)/(o+1.))+(1.02434962021)*dim
-        ref[2,4,1,1]=(-1.05435356817)*(1+2.*(dim-1.)/(o+1.))+(0.67745733994)*dim
-        ref[2,4,2,0]=(-0.0889174414067)*(1+2.*(dim-1.)/(o+1.))+(0.586713982143)*dim
-        ref[2,4,2,1]=(-0.950446212097)*(1+2.*(dim-1.)/(o+1.))+(-0.539415198695)*dim
-        ref[3,0,0,0]=(0.585351095733)*(1+2.*(dim-1.)/(o+1.))+(-0.489863857802)*dim
-        ref[3,0,0,1]=(0.0818488289135)*(1+2.*(dim-1.)/(o+1.))+(-0.491496177908)*dim
-        ref[3,0,1,0]=(1.83790469827)*(1+2.*(dim-1.)/(o+1.))+(0.43439808376)*dim
-        ref[3,0,1,1]=(-0.812249042145)*(1+2.*(dim-1.)/(o+1.))+(1.55214257198)*dim
-        ref[3,0,2,0]=(-1.62498605972)*(1+2.*(dim-1.)/(o+1.))+(0.139252842511)*dim
-        ref[3,0,2,1]=(0.248660359392)*(1+2.*(dim-1.)/(o+1.))+(-1.05072810936)*dim
-        ref[3,1,0,0]=(0.701570774477)*(1+2.*(dim-1.)/(o+1.))+(-0.840113270158)*dim
-        ref[3,1,0,1]=(-1.01112314775)*(1+2.*(dim-1.)/(o+1.))+(1.29385461627)*dim
-        ref[3,1,1,0]=(-0.38604780773)*(1+2.*(dim-1.)/(o+1.))+(-0.249478705003)*dim
-        ref[3,1,1,1]=(-0.505728989541)*(1+2.*(dim-1.)/(o+1.))+(0.125585436262)*dim
-        ref[3,1,2,0]=(0.170090820399)*(1+2.*(dim-1.)/(o+1.))+(-0.926438738569)*dim
-        ref[3,1,2,1]=(-0.929125306455)*(1+2.*(dim-1.)/(o+1.))+(-0.585830290868)*dim
-        ref[3,2,0,0]=(-0.155713736332)*(1+2.*(dim-1.)/(o+1.))+(-0.038665128691)*dim
-        ref[3,2,0,1]=(-1.52172024486)*(1+2.*(dim-1.)/(o+1.))+(0.6116550646)*dim
-        ref[3,2,1,0]=(0.320960641588)*(1+2.*(dim-1.)/(o+1.))+(-0.617387263769)*dim
-        ref[3,2,1,1]=(1.35000898226)*(1+2.*(dim-1.)/(o+1.))+(-0.509803298192)*dim
-        ref[3,2,2,0]=(-1.08694938974)*(1+2.*(dim-1.)/(o+1.))+(0.909564538204)*dim
-        ref[3,2,2,1]=(-0.484173893901)*(1+2.*(dim-1.)/(o+1.))+(-0.11831850884)*dim
-        ref[3,3,0,0]=(-1.30137401361)*(1+2.*(dim-1.)/(o+1.))+(-1.62110112059)*dim
-        ref[3,3,0,1]=(-1.01955795295)*(1+2.*(dim-1.)/(o+1.))+(-0.803035188058)*dim
-        ref[3,3,1,0]=(-0.86522946065)*(1+2.*(dim-1.)/(o+1.))+(0.161210187589)*dim
-        ref[3,3,1,1]=(-1.45434545656)*(1+2.*(dim-1.)/(o+1.))+(0.272337309144)*dim
-        ref[3,3,2,0]=(-1.09044516001)*(1+2.*(dim-1.)/(o+1.))+(0.622862972717)*dim
-        ref[3,3,2,1]=(-1.56164744337)*(1+2.*(dim-1.)/(o+1.))+(0.262445587275)*dim
-        ref[3,4,0,0]=(-0.0717688395634)*(1+2.*(dim-1.)/(o+1.))+(0.215408595737)*dim
-        ref[3,4,0,1]=(-0.361057910751)*(1+2.*(dim-1.)/(o+1.))+(0.746831151378)*dim
-        ref[3,4,1,0]=(1.3065764036)*(1+2.*(dim-1.)/(o+1.))+(-0.665439278018)*dim
-        ref[3,4,1,1]=(0.00897444539195)*(1+2.*(dim-1.)/(o+1.))+(-0.826389225091)*dim
-        ref[3,4,2,0]=(0.0968985993748)*(1+2.*(dim-1.)/(o+1.))+(0.61794126332)*dim
-        ref[3,4,2,1]=(-0.247002319776)*(1+2.*(dim-1.)/(o+1.))+(-1.21961426084)*dim
-      else:
-        arg[0,0,0,0]=(0.249559417601)*x[0]+(-1.12919415836)*x[1]+(0.535083953587)*x[2]
-        arg[0,0,0,1]=(-1.61154525877)*x[0]+(-0.339535503099)*x[1]+(-0.3734414422)*x[2]
-        arg[0,0,1,0]=(-1.33426413331)*x[0]+(0.503654661149)*x[1]+(0.900718166029)*x[2]
-        arg[0,0,1,1]=(-1.47348135079)*x[0]+(0.294426872223)*x[1]+(-0.092932038156)*x[2]
-        arg[0,0,2,0]=(-0.659338105033)*x[0]+(0.276825152205)*x[1]+(-0.825904690993)*x[2]
-        arg[0,0,2,1]=(-0.871512897535)*x[0]+(0.16237107696)*x[1]+(-1.37935248231)*x[2]
-        arg[0,1,0,0]=(-0.83315792018)*x[0]+(-0.00675809409276)*x[1]+(0.464774846632)*x[2]
-        arg[0,1,0,1]=(0.527155362932)*x[0]+(0.856707619808)*x[1]+(-1.68267649456)*x[2]
-        arg[0,1,1,0]=(-0.524091384241)*x[0]+(-0.540620074365)*x[1]+(0.992745803077)*x[2]
-        arg[0,1,1,1]=(1.61356254869)*x[0]+(1.50422956091)*x[1]+(0.522074610423)*x[2]
-        arg[0,1,2,0]=(-0.786383950132)*x[0]+(0.240998133454)*x[1]+(-0.609039834527)*x[2]
-        arg[0,1,2,1]=(-0.549608404174)*x[0]+(-0.850827315095)*x[1]+(0.267519458624)*x[2]
-        arg[0,2,0,0]=(-0.171255468598)*x[0]+(-0.315808418391)*x[1]+(-1.31408126593)*x[2]
-        arg[0,2,0,1]=(-0.0537048497397)*x[0]+(-1.05283989597)*x[1]+(-0.230505226375)*x[2]
-        arg[0,2,1,0]=(0.175422426556)*x[0]+(-1.37203245283)*x[1]+(-1.31579047196)*x[2]
-        arg[0,2,1,1]=(-0.678719594441)*x[0]+(0.325375648943)*x[1]+(-1.3715383088)*x[2]
-        arg[0,2,2,0]=(1.34295310191)*x[0]+(-1.29856762722)*x[1]+(-0.604804069008)*x[2]
-        arg[0,2,2,1]=(-0.38925176646)*x[0]+(-0.391078913511)*x[1]+(-0.147119806342)*x[2]
-        arg[0,3,0,0]=(0.55897935716)*x[0]+(-0.938161813577)*x[1]+(-1.01170144437)*x[2]
-        arg[0,3,0,1]=(-0.214720994691)*x[0]+(-0.936636326408)*x[1]+(1.23434495942)*x[2]
-        arg[0,3,1,0]=(0.665136478224)*x[0]+(-0.223132283946)*x[1]+(0.513937660496)*x[2]
-        arg[0,3,1,1]=(0.99663942166)*x[0]+(-0.870793744717)*x[1]+(-0.44642261239)*x[2]
-        arg[0,3,2,0]=(0.426708530385)*x[0]+(-0.399913590631)*x[1]+(0.621569032554)*x[2]
-        arg[0,3,2,1]=(-0.385564378699)*x[0]+(-1.17310910463)*x[1]+(-0.386725711607)*x[2]
-        arg[0,4,0,0]=(-0.907605366918)*x[0]+(-1.15620807313)*x[1]+(0.690709991448)*x[2]
-        arg[0,4,0,1]=(0.68925487184)*x[0]+(-0.731402302062)*x[1]+(-0.278506722879)*x[2]
-        arg[0,4,1,0]=(0.607545316973)*x[0]+(-0.480514687124)*x[1]+(-0.261850296368)*x[2]
-        arg[0,4,1,1]=(1.39016358303)*x[0]+(0.571194445557)*x[1]+(1.02359000173)*x[2]
-        arg[0,4,2,0]=(1.19042892582)*x[0]+(-0.265599567429)*x[1]+(-0.412933583721)*x[2]
-        arg[0,4,2,1]=(0.105768402681)*x[0]+(0.529442827604)*x[1]+(1.70332495695)*x[2]
-        arg[1,0,0,0]=(-0.466512450689)*x[0]+(-0.821724116037)*x[1]+(0.315646947734)*x[2]
-        arg[1,0,0,1]=(-0.343965024161)*x[0]+(-0.718276908655)*x[1]+(-0.89648206258)*x[2]
-        arg[1,0,1,0]=(0.533001165605)*x[0]+(0.0431632707839)*x[1]+(-0.34028160642)*x[2]
-        arg[1,0,1,1]=(-0.0905898060243)*x[0]+(-0.634642149101)*x[1]+(-1.13501642684)*x[2]
-        arg[1,0,2,0]=(0.660943497868)*x[0]+(-0.354792953445)*x[1]+(1.28780893672)*x[2]
-        arg[1,0,2,1]=(-1.2338460337)*x[0]+(-1.07489268654)*x[1]+(-1.32063885434)*x[2]
-        arg[1,1,0,0]=(-0.564276365398)*x[0]+(1.03120151704)*x[1]+(-1.15799041025)*x[2]
-        arg[1,1,0,1]=(0.715308242213)*x[0]+(1.38372056508)*x[1]+(0.143855804663)*x[2]
-        arg[1,1,1,0]=(-0.359352464902)*x[0]+(1.12698364061)*x[1]+(0.592356171876)*x[2]
-        arg[1,1,1,1]=(-0.450554686066)*x[0]+(-0.546866217679)*x[1]+(1.0842968414)*x[2]
-        arg[1,1,2,0]=(-0.477267172046)*x[0]+(-0.863491255396)*x[1]+(-0.991333852913)*x[2]
-        arg[1,1,2,1]=(0.402599196931)*x[0]+(-0.635287203482)*x[1]+(-0.277210261227)*x[2]
-        arg[1,2,0,0]=(-1.56932441015)*x[0]+(-1.56442238007)*x[1]+(-0.375354109955)*x[2]
-        arg[1,2,0,1]=(0.193969262086)*x[0]+(-0.0913153952113)*x[1]+(-0.764434182025)*x[2]
-        arg[1,2,1,0]=(-0.836765580561)*x[0]+(0.84683301026)*x[1]+(-1.05033967172)*x[2]
-        arg[1,2,1,1]=(1.68348957076)*x[0]+(-1.14474223991)*x[1]+(-0.0028142026612)*x[2]
-        arg[1,2,2,0]=(-0.0921618478149)*x[0]+(-0.555660652821)*x[1]+(-0.398214997034)*x[2]
-        arg[1,2,2,1]=(1.03261791276)*x[0]+(-0.650225649301)*x[1]+(1.63375423051)*x[2]
-        arg[1,3,0,0]=(-0.348599695393)*x[0]+(-1.20215183267)*x[1]+(-0.1129459677)*x[2]
-        arg[1,3,0,1]=(0.877317784105)*x[0]+(-0.587978566735)*x[1]+(1.10042804546)*x[2]
-        arg[1,3,1,0]=(-0.547033849227)*x[0]+(-1.28198893788)*x[1]+(-0.424854587074)*x[2]
-        arg[1,3,1,1]=(0.739360669292)*x[0]+(-0.66359460621)*x[1]+(1.08588749669)*x[2]
-        arg[1,3,2,0]=(0.137130432185)*x[0]+(-0.123436803848)*x[1]+(-1.31161936702)*x[2]
-        arg[1,3,2,1]=(-0.0171220220237)*x[0]+(1.44556512776)*x[1]+(0.665008556384)*x[2]
-        arg[1,4,0,0]=(-0.304568160155)*x[0]+(-0.453489411096)*x[1]+(0.769736915169)*x[2]
-        arg[1,4,0,1]=(-0.389567079496)*x[0]+(1.01465816808)*x[1]+(1.05389792181)*x[2]
-        arg[1,4,1,0]=(-0.293019902659)*x[0]+(0.935020375302)*x[1]+(0.465003429909)*x[2]
-        arg[1,4,1,1]=(1.26426164192)*x[0]+(0.53660188438)*x[1]+(-1.26997852414)*x[2]
-        arg[1,4,2,0]=(0.447013260347)*x[0]+(-0.292646095073)*x[1]+(-0.141236248636)*x[2]
-        arg[1,4,2,1]=(0.627246227193)*x[0]+(-1.07310030602)*x[1]+(0.414244174014)*x[2]
-        arg[2,0,0,0]=(0.0450404092088)*x[0]+(-0.092484507099)*x[1]+(0.416562031216)*x[2]
-        arg[2,0,0,1]=(0.437290559939)*x[0]+(-1.00144259207)*x[1]+(1.26666155425)*x[2]
-        arg[2,0,1,0]=(0.0919297766737)*x[0]+(0.925519273623)*x[1]+(-0.582669368425)*x[2]
-        arg[2,0,1,1]=(1.40247347323)*x[0]+(-0.896360612277)*x[1]+(-0.235401929947)*x[2]
-        arg[2,0,2,0]=(-0.0760543780641)*x[0]+(-1.12543060216)*x[1]+(-1.73005861985)*x[2]
-        arg[2,0,2,1]=(-0.0540914682488)*x[0]+(0.686173107995)*x[1]+(-0.499264219762)*x[2]
-        arg[2,1,0,0]=(1.29412006754)*x[0]+(1.17564161143)*x[1]+(0.30140132879)*x[2]
-        arg[2,1,0,1]=(-0.987572082341)*x[0]+(-1.73401714184)*x[1]+(0.542753625023)*x[2]
-        arg[2,1,1,0]=(-0.162426291727)*x[0]+(0.508287986142)*x[1]+(0.42345261935)*x[2]
-        arg[2,1,1,1]=(-0.436007145923)*x[0]+(0.344485478615)*x[1]+(0.867081685885)*x[2]
-        arg[2,1,2,0]=(1.23340638096)*x[0]+(1.16627983483)*x[1]+(0.291792397233)*x[2]
-        arg[2,1,2,1]=(1.81405521045)*x[0]+(-0.358711641776)*x[1]+(1.67495221975)*x[2]
-        arg[2,2,0,0]=(-0.998776647505)*x[0]+(1.38487801142)*x[1]+(-0.199886556937)*x[2]
-        arg[2,2,0,1]=(-0.151564577745)*x[0]+(0.100245326484)*x[1]+(-0.98457000197)*x[2]
-        arg[2,2,1,0]=(-0.767959771993)*x[0]+(-0.641538616024)*x[1]+(0.0206020120898)*x[2]
-        arg[2,2,1,1]=(-0.116988718822)*x[0]+(-1.15499563681)*x[1]+(-0.187589599016)*x[2]
-        arg[2,2,2,0]=(0.682354528276)*x[0]+(0.606005834005)*x[1]+(0.11468472132)*x[2]
-        arg[2,2,2,1]=(-0.547781355521)*x[0]+(1.23047427005)*x[1]+(0.854018236174)*x[2]
-        arg[2,3,0,0]=(0.368349078554)*x[0]+(-1.12153473446)*x[1]+(0.114116055257)*x[2]
-        arg[2,3,0,1]=(0.838089123891)*x[0]+(0.283469213399)*x[1]+(0.249874271688)*x[2]
-        arg[2,3,1,0]=(-1.03882746612)*x[0]+(0.159711106612)*x[1]+(-1.57272656988)*x[2]
-        arg[2,3,1,1]=(-1.25439210606)*x[0]+(-0.801588333704)*x[1]+(-0.166928557775)*x[2]
-        arg[2,3,2,0]=(0.0650011438717)*x[0]+(0.879974749381)*x[1]+(-0.276534309239)*x[2]
-        arg[2,3,2,1]=(-0.774913691581)*x[0]+(-0.360358063631)*x[1]+(-0.368288145309)*x[2]
-        arg[2,4,0,0]=(-0.855093207242)*x[0]+(0.82049336972)*x[1]+(-0.496007273696)*x[2]
-        arg[2,4,0,1]=(-0.113408635338)*x[0]+(0.116297312211)*x[1]+(-1.05279504872)*x[2]
-        arg[2,4,1,0]=(1.59034968962)*x[0]+(-0.993664270946)*x[1]+(-1.44097244774)*x[2]
-        arg[2,4,1,1]=(-0.554191144546)*x[0]+(-1.30747375036)*x[1]+(-1.17946836248)*x[2]
-        arg[2,4,2,0]=(0.626012137217)*x[0]+(0.518243725142)*x[1]+(0.0933303150622)*x[2]
-        arg[2,4,2,1]=(-0.10169564723)*x[0]+(1.45820149276)*x[1]+(-0.0393269028179)*x[2]
-        arg[3,0,0,0]=(-0.0404687905735)*x[0]+(0.0715700915639)*x[1]+(1.45121483418)*x[2]
-        arg[3,0,0,1]=(1.25470808156)*x[0]+(-0.119317783496)*x[1]+(0.28341020961)*x[2]
-        arg[3,0,1,0]=(0.352807293701)*x[0]+(0.230591898707)*x[1]+(-0.580416381826)*x[2]
-        arg[3,0,1,1]=(1.6169875055)*x[0]+(0.515147269207)*x[1]+(-0.461088044559)*x[2]
-        arg[3,0,2,0]=(0.345374169211)*x[0]+(0.165179946106)*x[1]+(0.0761591935161)*x[2]
-        arg[3,0,2,1]=(-0.367306414632)*x[0]+(-0.236156646602)*x[1]+(-0.388955870267)*x[2]
-        arg[3,1,0,0]=(-0.27984693051)*x[0]+(-0.0431489812153)*x[1]+(-0.315624571395)*x[2]
-        arg[3,1,0,1]=(-0.923109329983)*x[0]+(0.71133451696)*x[1]+(-0.793551470792)*x[2]
-        arg[3,1,1,0]=(-0.434858211337)*x[0]+(0.943115368224)*x[1]+(0.195339633021)*x[2]
-        arg[3,1,1,1]=(0.517533657447)*x[0]+(-0.975487574798)*x[1]+(0.00389777788827)*x[2]
-        arg[3,1,2,0]=(-1.29728995298)*x[0]+(-0.519355341481)*x[1]+(-0.986985327874)*x[2]
-        arg[3,1,2,1]=(-0.104824066468)*x[0]+(0.155059832097)*x[1]+(-0.513194354212)*x[2]
-        arg[3,2,0,0]=(-0.053676798897)*x[0]+(-0.957854779002)*x[1]+(0.575673251241)*x[2]
-        arg[3,2,0,1]=(0.828930053602)*x[0]+(0.122518313839)*x[1]+(-0.711848816688)*x[2]
-        arg[3,2,1,0]=(0.468063581449)*x[0]+(0.233244036405)*x[1]+(-1.06333921952)*x[2]
-        arg[3,2,1,1]=(-0.178080946586)*x[0]+(0.481804828166)*x[1]+(-0.25332042181)*x[2]
-        arg[3,2,2,0]=(-0.2520881536)*x[0]+(-1.03459378989)*x[1]+(-0.284550808049)*x[2]
-        arg[3,2,2,1]=(-0.778922518429)*x[0]+(1.0037625091)*x[1]+(-0.252088333444)*x[2]
-        arg[3,3,0,0]=(0.467759844055)*x[0]+(0.598630111441)*x[1]+(-0.180631591223)*x[2]
-        arg[3,3,0,1]=(-0.704465112342)*x[0]+(0.577992884135)*x[1]+(0.614639798328)*x[2]
-        arg[3,3,1,0]=(0.58772281958)*x[0]+(0.267751378071)*x[1]+(0.11546949909)*x[2]
-        arg[3,3,1,1]=(-0.220490484007)*x[0]+(-0.346075755455)*x[1]+(0.709249188793)*x[2]
-        arg[3,3,2,0]=(-0.03823885045)*x[0]+(1.0070390689)*x[1]+(0.786191739951)*x[2]
-        arg[3,3,2,1]=(0.468772686804)*x[0]+(-0.416774817651)*x[1]+(1.65342478719)*x[2]
-        arg[3,4,0,0]=(0.69436779527)*x[0]+(-0.644342658009)*x[1]+(-0.6765845785)*x[2]
-        arg[3,4,0,1]=(0.210253965392)*x[0]+(0.208735045316)*x[1]+(-0.553442080096)*x[2]
-        arg[3,4,1,0]=(-0.0680478107141)*x[0]+(0.770215954791)*x[1]+(-0.876270039559)*x[2]
-        arg[3,4,1,1]=(-0.384812708168)*x[0]+(-0.482707860969)*x[1]+(1.00274437781)*x[2]
-        arg[3,4,2,0]=(-0.144567417774)*x[0]+(0.277773632892)*x[1]+(1.3123295509)*x[2]
-        arg[3,4,2,1]=(0.00870646304914)*x[0]+(-0.254229329332)*x[1]+(-1.66538680273)*x[2]
-        ref[0,0,0,0]=(0.841760617241)*(1+2.*(dim-1.)/(o+1.))+(-1.18631140441)*dim
-        ref[0,0,0,1]=(-0.610007337864)*(1+2.*(dim-1.)/(o+1.))+(-1.71451486621)*dim
-        ref[0,0,1,0]=(-0.765605897612)*(1+2.*(dim-1.)/(o+1.))+(0.83571459148)*dim
-        ref[0,0,1,1]=(-0.128014940891)*(1+2.*(dim-1.)/(o+1.))+(-1.14397157584)*dim
-        ref[0,0,2,0]=(-0.969876086955)*(1+2.*(dim-1.)/(o+1.))+(-0.238541556867)*dim
-        ref[0,0,2,1]=(-0.434074835341)*(1+2.*(dim-1.)/(o+1.))+(-1.65441946755)*dim
-        ref[0,1,0,0]=(0.346878720962)*(1+2.*(dim-1.)/(o+1.))+(-0.722019888602)*dim
-        ref[0,1,0,1]=(-0.163332213104)*(1+2.*(dim-1.)/(o+1.))+(-0.135481298717)*dim
-        ref[0,1,1,0]=(0.64836517897)*(1+2.*(dim-1.)/(o+1.))+(-0.720330834499)*dim
-        ref[0,1,1,1]=(1.50578185724)*(1+2.*(dim-1.)/(o+1.))+(2.13408486278)*dim
-        ref[0,1,2,0]=(-1.24719412419)*(1+2.*(dim-1.)/(o+1.))+(0.0927684729819)*dim
-        ref[0,1,2,1]=(0.798388744364)*(1+2.*(dim-1.)/(o+1.))+(-1.93130500501)*dim
-        ref[0,2,0,0]=(-1.9926882083)*(1+2.*(dim-1.)/(o+1.))+(0.191543055387)*dim
-        ref[0,2,0,1]=(-2.16203894433)*(1+2.*(dim-1.)/(o+1.))+(0.824988972246)*dim
-        ref[0,2,1,0]=(-2.24934415172)*(1+2.*(dim-1.)/(o+1.))+(-0.263056346511)*dim
-        ref[0,2,1,1]=(-0.719152132879)*(1+2.*(dim-1.)/(o+1.))+(-1.00573012142)*dim
-        ref[0,2,2,0]=(-0.83751635258)*(1+2.*(dim-1.)/(o+1.))+(0.277097758257)*dim
-        ref[0,2,2,1]=(-0.979077481565)*(1+2.*(dim-1.)/(o+1.))+(0.0516269952525)*dim
-        ref[0,3,0,0]=(-0.623873484234)*(1+2.*(dim-1.)/(o+1.))+(-0.767010416553)*dim
-        ref[0,3,0,1]=(-1.0425822452)*(1+2.*(dim-1.)/(o+1.))+(1.12556988353)*dim
-        ref[0,3,1,0]=(0.548600253744)*(1+2.*(dim-1.)/(o+1.))+(0.407341601031)*dim
-        ref[0,3,1,1]=(-0.531963828356)*(1+2.*(dim-1.)/(o+1.))+(0.211386892908)*dim
-        ref[0,3,2,0]=(1.33006849004)*(1+2.*(dim-1.)/(o+1.))+(-0.681704517735)*dim
-        ref[0,3,2,1]=(-1.98393315604)*(1+2.*(dim-1.)/(o+1.))+(0.0385339611081)*dim
-        ref[0,4,0,0]=(-0.381511396261)*(1+2.*(dim-1.)/(o+1.))+(-0.991592052336)*dim
-        ref[0,4,0,1]=(1.00472425157)*(1+2.*(dim-1.)/(o+1.))+(-1.32537840467)*dim
-        ref[0,4,1,0]=(1.04630307783)*(1+2.*(dim-1.)/(o+1.))+(-1.18112274434)*dim
-        ref[0,4,1,1]=(1.61731240292)*(1+2.*(dim-1.)/(o+1.))+(1.3676356274)*dim
-        ref[0,4,2,0]=(1.41653781097)*(1+2.*(dim-1.)/(o+1.))+(-0.904642036296)*dim
-        ref[0,4,2,1]=(1.61515833451)*(1+2.*(dim-1.)/(o+1.))+(0.723377852725)*dim
-        ref[1,0,0,0]=(-0.879218635)*(1+2.*(dim-1.)/(o+1.))+(-0.0933709839921)*dim
-        ref[1,0,0,1]=(-1.26687353853)*(1+2.*(dim-1.)/(o+1.))+(-0.691850456865)*dim
-        ref[1,0,1,0]=(1.79928802103)*(1+2.*(dim-1.)/(o+1.))+(-1.56340519106)*dim
-        ref[1,0,1,1]=(-1.05495675007)*(1+2.*(dim-1.)/(o+1.))+(-0.805291631901)*dim
-        ref[1,0,2,0]=(-0.339423840638)*(1+2.*(dim-1.)/(o+1.))+(1.93338332178)*dim
-        ref[1,0,2,1]=(-1.15347644771)*(1+2.*(dim-1.)/(o+1.))+(-2.47590112686)*dim
-        ref[1,1,0,0]=(-1.22232845026)*(1+2.*(dim-1.)/(o+1.))+(0.531263191656)*dim
-        ref[1,1,0,1]=(0.318005373727)*(1+2.*(dim-1.)/(o+1.))+(1.92487923823)*dim
-        ref[1,1,1,0]=(0.157193055461)*(1+2.*(dim-1.)/(o+1.))+(1.20279429213)*dim
-        ref[1,1,1,1]=(0.0525914033484)*(1+2.*(dim-1.)/(o+1.))+(0.0342845343071)*dim
-        ref[1,1,2,0]=(-0.319573431275)*(1+2.*(dim-1.)/(o+1.))+(-2.01251884908)*dim
-        ref[1,1,2,1]=(-1.67524932091)*(1+2.*(dim-1.)/(o+1.))+(1.16535105313)*dim
-        ref[1,2,0,0]=(-2.25088459423)*(1+2.*(dim-1.)/(o+1.))+(-1.25821630594)*dim
-        ref[1,2,0,1]=(-0.447759463011)*(1+2.*(dim-1.)/(o+1.))+(-0.214020852139)*dim
-        ref[1,2,1,0]=(-1.26590071291)*(1+2.*(dim-1.)/(o+1.))+(0.225628470886)*dim
-        ref[1,2,1,1]=(-0.372878924951)*(1+2.*(dim-1.)/(o+1.))+(0.90881205314)*dim
-        ref[1,2,2,0]=(1.36047043606)*(1+2.*(dim-1.)/(o+1.))+(-2.40650793373)*dim
-        ref[1,2,2,1]=(1.13871462186)*(1+2.*(dim-1.)/(o+1.))+(0.877431872103)*dim
-        ref[1,3,0,0]=(-1.17967356605)*(1+2.*(dim-1.)/(o+1.))+(-0.48402392971)*dim
-        ref[1,3,0,1]=(-0.177974933247)*(1+2.*(dim-1.)/(o+1.))+(1.56774219607)*dim
-        ref[1,3,1,0]=(-1.40936193115)*(1+2.*(dim-1.)/(o+1.))+(-0.844515443034)*dim
-        ref[1,3,1,1]=(0.790537554795)*(1+2.*(dim-1.)/(o+1.))+(0.371116004973)*dim
-        ref[1,3,2,0]=(0.242057644413)*(1+2.*(dim-1.)/(o+1.))+(-1.5399833831)*dim
-        ref[1,3,2,1]=(1.70371239948)*(1+2.*(dim-1.)/(o+1.))+(0.389739262639)*dim
-        ref[1,4,0,0]=(-0.375645743677)*(1+2.*(dim-1.)/(o+1.))+(0.387325087595)*dim
-        ref[1,4,0,1]=(0.0489286471987)*(1+2.*(dim-1.)/(o+1.))+(1.63006036319)*dim
-        ref[1,4,1,0]=(1.33203691786)*(1+2.*(dim-1.)/(o+1.))+(-0.225033015313)*dim
-        ref[1,4,1,1]=(0.332297845981)*(1+2.*(dim-1.)/(o+1.))+(0.198587156175)*dim
-        ref[1,4,2,0]=(-1.22288078692)*(1+2.*(dim-1.)/(o+1.))+(1.23601170355)*dim
-        ref[1,4,2,1]=(0.0299493142028)*(1+2.*(dim-1.)/(o+1.))+(-0.0615592190171)*dim
-        ref[2,0,0,0]=(0.0963155205346)*(1+2.*(dim-1.)/(o+1.))+(0.272802412791)*dim
-        ref[2,0,0,1]=(1.12280541023)*(1+2.*(dim-1.)/(o+1.))+(-0.420295888105)*dim
-        ref[2,0,1,0]=(-0.296878488858)*(1+2.*(dim-1.)/(o+1.))+(0.73165817073)*dim
-        ref[2,0,1,1]=(-0.407704337172)*(1+2.*(dim-1.)/(o+1.))+(0.678415268175)*dim
-        ref[2,0,2,0]=(-2.37402978977)*(1+2.*(dim-1.)/(o+1.))+(-0.557513810308)*dim
-        ref[2,0,2,1]=(1.2564150767)*(1+2.*(dim-1.)/(o+1.))+(-1.12359765672)*dim
-        ref[2,1,0,0]=(0.824412811392)*(1+2.*(dim-1.)/(o+1.))+(1.94675019637)*dim
-        ref[2,1,0,1]=(-1.06505178789)*(1+2.*(dim-1.)/(o+1.))+(-1.11378381126)*dim
-        ref[2,1,1,0]=(0.200096305752)*(1+2.*(dim-1.)/(o+1.))+(0.569218008012)*dim
-        ref[2,1,1,1]=(1.08680720067)*(1+2.*(dim-1.)/(o+1.))+(-0.311247182096)*dim
-        ref[2,1,2,0]=(1.3764914842)*(1+2.*(dim-1.)/(o+1.))+(1.31498712883)*dim
-        ref[2,1,2,1]=(2.26537199157)*(1+2.*(dim-1.)/(o+1.))+(0.864923796858)*dim
-        ref[2,2,0,0]=(0.750025182887)*(1+2.*(dim-1.)/(o+1.))+(-0.563810375913)*dim
-        ref[2,2,0,1]=(-0.806933575047)*(1+2.*(dim-1.)/(o+1.))+(-0.228955678184)*dim
-        ref[2,2,1,0]=(-1.53132620021)*(1+2.*(dim-1.)/(o+1.))+(0.14242982428)*dim
-        ref[2,2,1,1]=(-0.889411443106)*(1+2.*(dim-1.)/(o+1.))+(-0.570162511538)*dim
-        ref[2,2,2,0]=(-0.0309717316948)*(1+2.*(dim-1.)/(o+1.))+(1.4340168153)*dim
-        ref[2,2,2,1]=(1.48963237375)*(1+2.*(dim-1.)/(o+1.))+(0.0470787769518)*dim
-        ref[2,3,0,0]=(-0.0184174113004)*(1+2.*(dim-1.)/(o+1.))+(-0.620652189349)*dim
-        ref[2,3,0,1]=(0.597433991421)*(1+2.*(dim-1.)/(o+1.))+(0.773998617557)*dim
-        ref[2,3,1,0]=(-1.10704622688)*(1+2.*(dim-1.)/(o+1.))+(-1.34479670251)*dim
-        ref[2,3,1,1]=(-0.369209798891)*(1+2.*(dim-1.)/(o+1.))+(-1.85369919864)*dim
-        ref[2,3,2,0]=(-0.286165609161)*(1+2.*(dim-1.)/(o+1.))+(0.954607193175)*dim
-        ref[2,3,2,1]=(-0.0948450773617)*(1+2.*(dim-1.)/(o+1.))+(-1.40871482316)*dim
-        ref[2,4,0,0]=(-0.350521344827)*(1+2.*(dim-1.)/(o+1.))+(-0.180085766391)*dim
-        ref[2,4,0,1]=(-1.10948105015)*(1+2.*(dim-1.)/(o+1.))+(0.0595746783013)*dim
-        ref[2,4,1,0]=(-0.251521967553)*(1+2.*(dim-1.)/(o+1.))+(-0.592765061514)*dim
-        ref[2,4,1,1]=(-2.22732408506)*(1+2.*(dim-1.)/(o+1.))+(-0.813809172329)*dim
-        ref[2,4,2,0]=(-1.4091057051)*(1+2.*(dim-1.)/(o+1.))+(2.64669188252)*dim
-        ref[2,4,2,1]=(-0.0262518153279)*(1+2.*(dim-1.)/(o+1.))+(1.34343075804)*dim
-        ref[3,0,0,0]=(2.08524442815)*(1+2.*(dim-1.)/(o+1.))+(-0.602928292982)*dim
-        ref[3,0,0,1]=(0.227442743255)*(1+2.*(dim-1.)/(o+1.))+(1.19135776442)*dim
-        ref[3,0,1,0]=(1.03371796145)*(1+2.*(dim-1.)/(o+1.))+(-1.03073515087)*dim
-        ref[3,0,1,1]=(0.205903763449)*(1+2.*(dim-1.)/(o+1.))+(1.4651429667)*dim
-        ref[3,0,2,0]=(1.54387435524)*(1+2.*(dim-1.)/(o+1.))+(-0.957161046404)*dim
-        ref[3,0,2,1]=(-0.487693556268)*(1+2.*(dim-1.)/(o+1.))+(-0.504725375232)*dim
-        ref[3,1,0,0]=(0.319450917291)*(1+2.*(dim-1.)/(o+1.))+(-0.958071400411)*dim
-        ref[3,1,0,1]=(-0.0756676477654)*(1+2.*(dim-1.)/(o+1.))+(-0.929658636049)*dim
-        ref[3,1,1,0]=(0.0109030665653)*(1+2.*(dim-1.)/(o+1.))+(0.692693723343)*dim
-        ref[3,1,1,1]=(0.540904091106)*(1+2.*(dim-1.)/(o+1.))+(-0.994960230569)*dim
-        ref[3,1,2,0]=(-1.39229945953)*(1+2.*(dim-1.)/(o+1.))+(-1.4113311628)*dim
-        ref[3,1,2,1]=(-0.120906779216)*(1+2.*(dim-1.)/(o+1.))+(-0.342051809366)*dim
-        ref[3,2,0,0]=(-0.61477618653)*(1+2.*(dim-1.)/(o+1.))+(0.178917859873)*dim
-        ref[3,2,0,1]=(0.286238606318)*(1+2.*(dim-1.)/(o+1.))+(-0.0466390555654)*dim
-        ref[3,2,1,0]=(-0.0560560726323)*(1+2.*(dim-1.)/(o+1.))+(-0.305975529033)*dim
-        ref[3,2,1,1]=(0.935166077059)*(1+2.*(dim-1.)/(o+1.))+(-0.884762617288)*dim
-        ref[3,2,2,0]=(0.57015079501)*(1+2.*(dim-1.)/(o+1.))+(-2.14138354655)*dim
-        ref[3,2,2,1]=(-0.699470490706)*(1+2.*(dim-1.)/(o+1.))+(0.672222147932)*dim
-        ref[3,3,0,0]=(1.33431543118)*(1+2.*(dim-1.)/(o+1.))+(-0.448557066912)*dim
-        ref[3,3,0,1]=(-1.03724498716)*(1+2.*(dim-1.)/(o+1.))+(1.52541255729)*dim
-        ref[3,3,1,0]=(-0.00371131395733)*(1+2.*(dim-1.)/(o+1.))+(0.974655010698)*dim
-        ref[3,3,1,1]=(0.0918410742793)*(1+2.*(dim-1.)/(o+1.))+(0.0508418750519)*dim
-        ref[3,3,2,0]=(1.63372857769)*(1+2.*(dim-1.)/(o+1.))+(0.121263380706)*dim
-        ref[3,3,2,1]=(0.761569446324)*(1+2.*(dim-1.)/(o+1.))+(0.943853210019)*dim
-        ref[3,4,0,0]=(-0.625751279162)*(1+2.*(dim-1.)/(o+1.))+(-0.000808162076656)*dim
-        ref[3,4,0,1]=(-0.113324890356)*(1+2.*(dim-1.)/(o+1.))+(-0.0211281790319)*dim
-        ref[3,4,1,0]=(0.296144237506)*(1+2.*(dim-1.)/(o+1.))+(-0.470246132989)*dim
-        ref[3,4,1,1]=(0.194264324372)*(1+2.*(dim-1.)/(o+1.))+(-0.0590405157015)*dim
-        ref[3,4,2,0]=(1.63851379122)*(1+2.*(dim-1.)/(o+1.))+(-0.192978025203)*dim
-        ref[3,4,2,1]=(-0.757374882295)*(1+2.*(dim-1.)/(o+1.))+(-1.15353478672)*dim
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"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 the 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.626062912046)*x[0]**o+(0.600712856149)*x[0]+(0.0478861882442)*x[1]**o+(0.77008552734)*x[1]
-        ref=(0.67394910029)*(1+2.*(dim-1.)/(o+1.))+(1.37079838349)*dim
-      else:
-        arg=(0.85588880126)*x[0]**o+(-0.898804533462)*x[0]+(-0.270816921088)*x[1]**o+(-0.842823912373)*x[1]+(-0.47559690762)*x[2]**o+(0.751770125129)*x[2]
-        ref=(0.109474972552)*(1+2.*(dim-1.)/(o+1.))+(-0.989858320706)*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 the 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,(2,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(0.298913063662)*x[0]**o+(-0.250822875451)*x[0]+(0.707311253225)*x[1]**o+(0.0408091445557)*x[1]
-        arg[1]=(-0.70143850042)*x[0]**o+(-0.80121227022)*x[0]+(0.0731514590408)*x[1]**o+(0.621969876113)*x[1]
-        ref[0]=(1.00622431689)*(1+2.*(dim-1.)/(o+1.))+(-0.210013730895)*dim
-        ref[1]=(-0.628287041379)*(1+2.*(dim-1.)/(o+1.))+(-0.179242394108)*dim
-      else:
-        arg[0]=(0.676976938336)*x[0]**o+(-0.928207054947)*x[0]+(0.864749399199)*x[1]**o+(0.864358390848)*x[1]+(-0.0255569869984)*x[2]**o+(0.0268536872793)*x[2]
-        arg[1]=(0.270542056965)*x[0]**o+(0.0696194435081)*x[0]+(0.401360001043)*x[1]**o+(0.917064528874)*x[1]+(-0.755510144559)*x[2]**o+(0.881244515908)*x[2]
-        ref[0]=(1.51616935054)*(1+2.*(dim-1.)/(o+1.))+(-0.0369949768193)*dim
-        ref[1]=(-0.083608086551)*(1+2.*(dim-1.)/(o+1.))+(1.86792848829)*dim
-      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_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
-      """
-      tests integral of rank 2 Data on the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.381843423534)*x[0]**o+(-0.563210012057)*x[0]+(0.730631055205)*x[1]**o+(0.13636238698)*x[1]
-        arg[0,1]=(0.306357653338)*x[0]**o+(-0.797201232101)*x[0]+(-0.66333793372)*x[1]**o+(-0.943650360464)*x[1]
-        arg[0,2]=(-0.34058649734)*x[0]**o+(-0.27047792232)*x[0]+(0.57156687267)*x[1]**o+(-0.659114355468)*x[1]
-        arg[0,3]=(0.73319004289)*x[0]**o+(0.229139540294)*x[0]+(-0.51558765225)*x[1]**o+(0.45052521066)*x[1]
-        arg[0,4]=(-0.264117198359)*x[0]**o+(0.807950109095)*x[0]+(-0.290558748289)*x[1]**o+(0.161864708045)*x[1]
-        arg[1,0]=(0.988732415297)*x[0]**o+(-0.725047414136)*x[0]+(-0.722337599885)*x[1]**o+(0.739130135256)*x[1]
-        arg[1,1]=(-0.315086233906)*x[0]**o+(-0.783177846939)*x[0]+(-0.271931454399)*x[1]**o+(-0.935744613016)*x[1]
-        arg[1,2]=(-0.787047622811)*x[0]**o+(0.00746242211892)*x[0]+(-0.539716273578)*x[1]**o+(-0.340449115622)*x[1]
-        arg[1,3]=(-0.782830405823)*x[0]**o+(0.842318742811)*x[0]+(-0.118894493096)*x[1]**o+(0.645943277412)*x[1]
-        arg[1,4]=(0.0594068367647)*x[0]**o+(-0.184711682975)*x[0]+(-0.0643050731295)*x[1]**o+(-0.981593287261)*x[1]
-        arg[2,0]=(0.17170754931)*x[0]**o+(0.582651363494)*x[0]+(0.334422749985)*x[1]**o+(0.852747429144)*x[1]
-        arg[2,1]=(0.683967516208)*x[0]**o+(-0.612989314204)*x[0]+(0.845175135723)*x[1]**o+(0.374223395314)*x[1]
-        arg[2,2]=(0.588917536035)*x[0]**o+(0.0130713873939)*x[0]+(0.881942872071)*x[1]**o+(0.683941046151)*x[1]
-        arg[2,3]=(-0.63861264887)*x[0]**o+(0.453919752415)*x[0]+(0.448731342326)*x[1]**o+(-0.259183783496)*x[1]
-        arg[2,4]=(-0.132175638549)*x[0]**o+(0.710071566415)*x[0]+(-0.870119332524)*x[1]**o+(0.523394538403)*x[1]
-        arg[3,0]=(0.768036036634)*x[0]**o+(-0.218321673662)*x[0]+(0.50224512768)*x[1]**o+(0.694191572559)*x[1]
-        arg[3,1]=(-0.298369075336)*x[0]**o+(-0.276776010079)*x[0]+(-0.659309162004)*x[1]**o+(0.436841182692)*x[1]
-        arg[3,2]=(-0.00370049871499)*x[0]**o+(-0.41700259949)*x[0]+(0.726806931339)*x[1]**o+(-0.113165181924)*x[1]
-        arg[3,3]=(0.288175924931)*x[0]**o+(-0.489667003521)*x[0]+(-0.531842953651)*x[1]**o+(-0.443517285929)*x[1]
-        arg[3,4]=(-0.645574931589)*x[0]**o+(0.464738749544)*x[0]+(-0.538213524368)*x[1]**o+(-0.94443292146)*x[1]
-        ref[0,0]=(0.348787631671)*(1+2.*(dim-1.)/(o+1.))+(-0.426847625077)*dim
-        ref[0,1]=(-0.356980280382)*(1+2.*(dim-1.)/(o+1.))+(-1.74085159257)*dim
-        ref[0,2]=(0.23098037533)*(1+2.*(dim-1.)/(o+1.))+(-0.929592277787)*dim
-        ref[0,3]=(0.21760239064)*(1+2.*(dim-1.)/(o+1.))+(0.679664750954)*dim
-        ref[0,4]=(-0.554675946648)*(1+2.*(dim-1.)/(o+1.))+(0.96981481714)*dim
-        ref[1,0]=(0.266394815412)*(1+2.*(dim-1.)/(o+1.))+(0.0140827211195)*dim
-        ref[1,1]=(-0.587017688304)*(1+2.*(dim-1.)/(o+1.))+(-1.71892245996)*dim
-        ref[1,2]=(-1.32676389639)*(1+2.*(dim-1.)/(o+1.))+(-0.332986693503)*dim
-        ref[1,3]=(-0.901724898919)*(1+2.*(dim-1.)/(o+1.))+(1.48826202022)*dim
-        ref[1,4]=(-0.00489823636486)*(1+2.*(dim-1.)/(o+1.))+(-1.16630497024)*dim
-        ref[2,0]=(0.506130299295)*(1+2.*(dim-1.)/(o+1.))+(1.43539879264)*dim
-        ref[2,1]=(1.52914265193)*(1+2.*(dim-1.)/(o+1.))+(-0.238765918889)*dim
-        ref[2,2]=(1.47086040811)*(1+2.*(dim-1.)/(o+1.))+(0.697012433545)*dim
-        ref[2,3]=(-0.189881306544)*(1+2.*(dim-1.)/(o+1.))+(0.194735968919)*dim
-        ref[2,4]=(-1.00229497107)*(1+2.*(dim-1.)/(o+1.))+(1.23346610482)*dim
-        ref[3,0]=(1.27028116431)*(1+2.*(dim-1.)/(o+1.))+(0.475869898897)*dim
-        ref[3,1]=(-0.957678237339)*(1+2.*(dim-1.)/(o+1.))+(0.160065172613)*dim
-        ref[3,2]=(0.723106432624)*(1+2.*(dim-1.)/(o+1.))+(-0.530167781414)*dim
-        ref[3,3]=(-0.243667028719)*(1+2.*(dim-1.)/(o+1.))+(-0.93318428945)*dim
-        ref[3,4]=(-1.18378845596)*(1+2.*(dim-1.)/(o+1.))+(-0.479694171917)*dim
-      else:
-        arg[0,0]=(0.751222317885)*x[0]**o+(0.953666267123)*x[0]+(-0.707417048158)*x[1]**o+(0.310686543483)*x[1]+(0.326267797641)*x[2]**o+(-0.722772500437)*x[2]
-        arg[0,1]=(-0.038709086264)*x[0]**o+(-0.483307819428)*x[0]+(0.611120835303)*x[1]**o+(0.885935954604)*x[1]+(0.630199910046)*x[2]**o+(-0.101764126615)*x[2]
-        arg[0,2]=(0.890606731439)*x[0]**o+(-0.0555491679283)*x[0]+(0.334835177686)*x[1]**o+(0.999030888839)*x[1]+(-0.891653525154)*x[2]**o+(-0.14056280616)*x[2]
-        arg[0,3]=(-0.458305223634)*x[0]**o+(0.679075077126)*x[0]+(0.1176620176)*x[1]**o+(0.685223087684)*x[1]+(-0.952262623464)*x[2]**o+(-0.905568306628)*x[2]
-        arg[0,4]=(0.623179050934)*x[0]**o+(-0.0150847487218)*x[0]+(0.0823495403769)*x[1]**o+(0.48303169009)*x[1]+(0.610276253905)*x[2]**o+(0.353104308072)*x[2]
-        arg[1,0]=(-0.709185342895)*x[0]**o+(0.789980598884)*x[0]+(0.655538102878)*x[1]**o+(0.713913568814)*x[1]+(0.222131732773)*x[2]**o+(0.712644729381)*x[2]
-        arg[1,1]=(-0.683646421822)*x[0]**o+(-0.943691516528)*x[0]+(-0.134261002557)*x[1]**o+(0.28225941018)*x[1]+(0.906235993779)*x[2]**o+(-0.819214603609)*x[2]
-        arg[1,2]=(0.713781993938)*x[0]**o+(-0.189551367619)*x[0]+(-0.021310841804)*x[1]**o+(-0.873466428012)*x[1]+(0.248337664546)*x[2]**o+(0.911824874935)*x[2]
-        arg[1,3]=(-0.393142772637)*x[0]**o+(0.773501237865)*x[0]+(0.759039429922)*x[1]**o+(0.67036876499)*x[1]+(-0.921411979023)*x[2]**o+(-0.649371534276)*x[2]
-        arg[1,4]=(0.526708082723)*x[0]**o+(-0.522449586718)*x[0]+(0.951176548558)*x[1]**o+(0.604602039898)*x[1]+(0.345888192325)*x[2]**o+(-0.973729954334)*x[2]
-        arg[2,0]=(-0.139931215293)*x[0]**o+(-0.996072915638)*x[0]+(-0.0451731431264)*x[1]**o+(0.433694224874)*x[1]+(-0.955189760302)*x[2]**o+(-0.68361667242)*x[2]
-        arg[2,1]=(0.139626552661)*x[0]**o+(-0.91217468751)*x[0]+(-0.854252204911)*x[1]**o+(0.417539913464)*x[1]+(0.557096050124)*x[2]**o+(-0.195272359868)*x[2]
-        arg[2,2]=(0.960352725049)*x[0]**o+(0.98274500341)*x[0]+(0.967782565025)*x[1]**o+(0.566011353381)*x[1]+(0.583885094583)*x[2]**o+(-0.943173847936)*x[2]
-        arg[2,3]=(0.959388333494)*x[0]**o+(0.531908797155)*x[0]+(-0.62531126203)*x[1]**o+(-0.288763293646)*x[1]+(-0.823398780526)*x[2]**o+(-0.164348871248)*x[2]
-        arg[2,4]=(0.73397702179)*x[0]**o+(0.407844592399)*x[0]+(-0.835769355727)*x[1]**o+(0.742360626394)*x[1]+(0.31130186529)*x[2]**o+(0.114221168872)*x[2]
-        arg[3,0]=(-0.42278940444)*x[0]**o+(-0.513158064442)*x[0]+(-0.133233894233)*x[1]**o+(0.701381913887)*x[1]+(0.283776333553)*x[2]**o+(-0.805096661642)*x[2]
-        arg[3,1]=(-0.417338508269)*x[0]**o+(0.535961900783)*x[0]+(0.0836386907734)*x[1]**o+(0.449680928704)*x[1]+(0.998998322868)*x[2]**o+(0.983057825698)*x[2]
-        arg[3,2]=(0.24102382276)*x[0]**o+(0.0291470157398)*x[0]+(-0.539542451698)*x[1]**o+(0.281017043631)*x[1]+(-0.464652133499)*x[2]**o+(0.652828720185)*x[2]
-        arg[3,3]=(-0.482577920013)*x[0]**o+(0.931756756394)*x[0]+(0.96648206338)*x[1]**o+(0.73941459549)*x[1]+(0.136743015429)*x[2]**o+(0.41477914722)*x[2]
-        arg[3,4]=(0.879881885972)*x[0]**o+(0.208970079585)*x[0]+(-0.200079958414)*x[1]**o+(-0.0291238772241)*x[1]+(-0.333569505857)*x[2]**o+(0.846835729875)*x[2]
-        ref[0,0]=(0.370073067368)*(1+2.*(dim-1.)/(o+1.))+(0.541580310169)*dim
-        ref[0,1]=(1.20261165909)*(1+2.*(dim-1.)/(o+1.))+(0.300864008561)*dim
-        ref[0,2]=(0.333788383971)*(1+2.*(dim-1.)/(o+1.))+(0.80291891475)*dim
-        ref[0,3]=(-1.2929058295)*(1+2.*(dim-1.)/(o+1.))+(0.458729858183)*dim
-        ref[0,4]=(1.31580484522)*(1+2.*(dim-1.)/(o+1.))+(0.82105124944)*dim
-        ref[1,0]=(0.168484492756)*(1+2.*(dim-1.)/(o+1.))+(2.21653889708)*dim
-        ref[1,1]=(0.0883285694004)*(1+2.*(dim-1.)/(o+1.))+(-1.48064670996)*dim
-        ref[1,2]=(0.940808816681)*(1+2.*(dim-1.)/(o+1.))+(-0.151192920696)*dim
-        ref[1,3]=(-0.555515321739)*(1+2.*(dim-1.)/(o+1.))+(0.79449846858)*dim
-        ref[1,4]=(1.82377282361)*(1+2.*(dim-1.)/(o+1.))+(-0.891577501154)*dim
-        ref[2,0]=(-1.14029411872)*(1+2.*(dim-1.)/(o+1.))+(-1.24599536318)*dim
-        ref[2,1]=(-0.157529602127)*(1+2.*(dim-1.)/(o+1.))+(-0.689907133913)*dim
-        ref[2,2]=(2.51202038466)*(1+2.*(dim-1.)/(o+1.))+(0.605582508855)*dim
-        ref[2,3]=(-0.489321709063)*(1+2.*(dim-1.)/(o+1.))+(0.0787966322607)*dim
-        ref[2,4]=(0.209509531353)*(1+2.*(dim-1.)/(o+1.))+(1.26442638766)*dim
-        ref[3,0]=(-0.27224696512)*(1+2.*(dim-1.)/(o+1.))+(-0.616872812198)*dim
-        ref[3,1]=(0.665298505372)*(1+2.*(dim-1.)/(o+1.))+(1.96870065519)*dim
-        ref[3,2]=(-0.763170762437)*(1+2.*(dim-1.)/(o+1.))+(0.962992779555)*dim
-        ref[3,3]=(0.620647158797)*(1+2.*(dim-1.)/(o+1.))+(2.0859504991)*dim
-        ref[3,4]=(0.346232421701)*(1+2.*(dim-1.)/(o+1.))+(1.02668193224)*dim
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.201115186772)*x[0]**o+(0.324758103748)*x[0]+(0.285065583242)*x[1]**o+(0.0264985832782)*x[1]
-        arg[0,0,1]=(-0.443023003973)*x[0]**o+(-0.194732927607)*x[0]+(0.64414908519)*x[1]**o+(-0.248261857779)*x[1]
-        arg[0,1,0]=(0.587534172195)*x[0]**o+(0.021088951369)*x[0]+(-0.986195557459)*x[1]**o+(0.595659005312)*x[1]
-        arg[0,1,1]=(-0.916961145134)*x[0]**o+(-0.766484469605)*x[0]+(-0.281345964683)*x[1]**o+(-0.399113856826)*x[1]
-        arg[1,0,0]=(0.175943424949)*x[0]**o+(0.344853386001)*x[0]+(0.175474681848)*x[1]**o+(-0.0775102874697)*x[1]
-        arg[1,0,1]=(-0.874074467007)*x[0]**o+(0.903506914387)*x[0]+(0.177699372538)*x[1]**o+(0.969818154968)*x[1]
-        arg[1,1,0]=(0.765751472387)*x[0]**o+(-0.0288724203687)*x[0]+(0.655676828008)*x[1]**o+(0.22281307247)*x[1]
-        arg[1,1,1]=(0.871009077152)*x[0]**o+(-0.20052353101)*x[0]+(-0.889496767621)*x[1]**o+(0.8458762887)*x[1]
-        arg[2,0,0]=(-0.15377513542)*x[0]**o+(0.963714892768)*x[0]+(0.942514815983)*x[1]**o+(0.846111018838)*x[1]
-        arg[2,0,1]=(0.000727086938663)*x[0]**o+(0.243136987492)*x[0]+(-0.308674899886)*x[1]**o+(-0.963435664436)*x[1]
-        arg[2,1,0]=(0.780912245051)*x[0]**o+(0.227139041778)*x[0]+(-0.336203258384)*x[1]**o+(0.092568284679)*x[1]
-        arg[2,1,1]=(0.0464862681168)*x[0]**o+(0.284493375176)*x[0]+(-0.811073509077)*x[1]**o+(0.54280235419)*x[1]
-        arg[3,0,0]=(0.605642304612)*x[0]**o+(-0.103442921567)*x[0]+(0.106253324829)*x[1]**o+(0.562480007904)*x[1]
-        arg[3,0,1]=(0.497668538008)*x[0]**o+(-0.859679982844)*x[0]+(-0.255499355194)*x[1]**o+(0.0725919239243)*x[1]
-        arg[3,1,0]=(0.641826893201)*x[0]**o+(0.889514581887)*x[0]+(-0.211781857836)*x[1]**o+(0.45900873193)*x[1]
-        arg[3,1,1]=(-0.29349600565)*x[0]**o+(-0.627542961817)*x[0]+(0.313009642686)*x[1]**o+(0.338028134809)*x[1]
-        arg[4,0,0]=(-0.641915241397)*x[0]**o+(-0.682547311604)*x[0]+(-0.106472077451)*x[1]**o+(0.103402239052)*x[1]
-        arg[4,0,1]=(-0.822562520978)*x[0]**o+(-0.430539530156)*x[0]+(-0.0225528898923)*x[1]**o+(-0.0908986665674)*x[1]
-        arg[4,1,0]=(-0.456160645978)*x[0]**o+(-0.264592336242)*x[0]+(-0.672702978868)*x[1]**o+(-0.893197955639)*x[1]
-        arg[4,1,1]=(-0.714689169676)*x[0]**o+(0.513612105215)*x[0]+(-0.3093340377)*x[1]**o+(-0.34467035156)*x[1]
-        arg[5,0,0]=(-0.993761664154)*x[0]**o+(0.375953817044)*x[0]+(0.0463240503072)*x[1]**o+(-0.595646829466)*x[1]
-        arg[5,0,1]=(0.453145186545)*x[0]**o+(0.331353840672)*x[0]+(-0.908533078632)*x[1]**o+(0.755175839674)*x[1]
-        arg[5,1,0]=(-0.736874540101)*x[0]**o+(-0.867437170846)*x[0]+(-0.472395301622)*x[1]**o+(0.78289019661)*x[1]
-        arg[5,1,1]=(-0.900966156016)*x[0]**o+(-0.160363876891)*x[0]+(-0.0969222200475)*x[1]**o+(0.0527983470624)*x[1]
-        ref[0,0,0]=(0.486180770014)*(1+2.*(dim-1.)/(o+1.))+(0.351256687026)*dim
-        ref[0,0,1]=(0.201126081217)*(1+2.*(dim-1.)/(o+1.))+(-0.442994785386)*dim
-        ref[0,1,0]=(-0.398661385264)*(1+2.*(dim-1.)/(o+1.))+(0.616747956681)*dim
-        ref[0,1,1]=(-1.19830710982)*(1+2.*(dim-1.)/(o+1.))+(-1.16559832643)*dim
-        ref[1,0,0]=(0.351418106797)*(1+2.*(dim-1.)/(o+1.))+(0.267343098531)*dim
-        ref[1,0,1]=(-0.696375094469)*(1+2.*(dim-1.)/(o+1.))+(1.87332506936)*dim
-        ref[1,1,0]=(1.42142830039)*(1+2.*(dim-1.)/(o+1.))+(0.193940652101)*dim
-        ref[1,1,1]=(-0.0184876904693)*(1+2.*(dim-1.)/(o+1.))+(0.64535275769)*dim
-        ref[2,0,0]=(0.788739680562)*(1+2.*(dim-1.)/(o+1.))+(1.80982591161)*dim
-        ref[2,0,1]=(-0.307947812947)*(1+2.*(dim-1.)/(o+1.))+(-0.720298676944)*dim
-        ref[2,1,0]=(0.444708986667)*(1+2.*(dim-1.)/(o+1.))+(0.319707326457)*dim
-        ref[2,1,1]=(-0.76458724096)*(1+2.*(dim-1.)/(o+1.))+(0.827295729366)*dim
-        ref[3,0,0]=(0.711895629441)*(1+2.*(dim-1.)/(o+1.))+(0.459037086337)*dim
-        ref[3,0,1]=(0.242169182814)*(1+2.*(dim-1.)/(o+1.))+(-0.78708805892)*dim
-        ref[3,1,0]=(0.430045035365)*(1+2.*(dim-1.)/(o+1.))+(1.34852331382)*dim
-        ref[3,1,1]=(0.019513637036)*(1+2.*(dim-1.)/(o+1.))+(-0.289514827008)*dim
-        ref[4,0,0]=(-0.748387318848)*(1+2.*(dim-1.)/(o+1.))+(-0.579145072551)*dim
-        ref[4,0,1]=(-0.845115410871)*(1+2.*(dim-1.)/(o+1.))+(-0.521438196723)*dim
-        ref[4,1,0]=(-1.12886362485)*(1+2.*(dim-1.)/(o+1.))+(-1.15779029188)*dim
-        ref[4,1,1]=(-1.02402320738)*(1+2.*(dim-1.)/(o+1.))+(0.168941753655)*dim
-        ref[5,0,0]=(-0.947437613847)*(1+2.*(dim-1.)/(o+1.))+(-0.219693012422)*dim
-        ref[5,0,1]=(-0.455387892087)*(1+2.*(dim-1.)/(o+1.))+(1.08652968035)*dim
-        ref[5,1,0]=(-1.20926984172)*(1+2.*(dim-1.)/(o+1.))+(-0.0845469742352)*dim
-        ref[5,1,1]=(-0.997888376064)*(1+2.*(dim-1.)/(o+1.))+(-0.107565529828)*dim
-      else:
-        arg[0,0,0]=(-0.760764230601)*x[0]**o+(-0.955215307904)*x[0]+(0.376251560231)*x[1]**o+(0.147849416477)*x[1]+(0.627037741745)*x[2]**o+(-0.93996244415)*x[2]
-        arg[0,0,1]=(0.904449671196)*x[0]**o+(-0.297804849063)*x[0]+(0.773059038176)*x[1]**o+(-0.836104534497)*x[1]+(-0.150040994258)*x[2]**o+(0.837988726131)*x[2]
-        arg[0,1,0]=(0.354255190058)*x[0]**o+(0.463977999833)*x[0]+(0.218855388406)*x[1]**o+(-0.163086423536)*x[1]+(0.653790071045)*x[2]**o+(-0.457721486689)*x[2]
-        arg[0,1,1]=(0.357317871424)*x[0]**o+(-0.752862019242)*x[0]+(0.674187130836)*x[1]**o+(-0.983503125785)*x[1]+(-0.776153051078)*x[2]**o+(0.390700377058)*x[2]
-        arg[1,0,0]=(-0.465423805042)*x[0]**o+(0.629855541232)*x[0]+(-0.405300083887)*x[1]**o+(-0.211254598072)*x[1]+(0.502581881406)*x[2]**o+(-0.853779249469)*x[2]
-        arg[1,0,1]=(0.716025450344)*x[0]**o+(0.876021396077)*x[0]+(-0.530324190586)*x[1]**o+(0.700207449985)*x[1]+(-0.788565669024)*x[2]**o+(0.963118484198)*x[2]
-        arg[1,1,0]=(0.813943574582)*x[0]**o+(-0.938778607938)*x[0]+(-0.451619613547)*x[1]**o+(-0.916990884105)*x[1]+(-0.671730738367)*x[2]**o+(0.109664560689)*x[2]
-        arg[1,1,1]=(-0.557598711518)*x[0]**o+(-0.541691706474)*x[0]+(0.500874328683)*x[1]**o+(-0.959653364589)*x[1]+(0.572057415183)*x[2]**o+(-0.842306660222)*x[2]
-        arg[2,0,0]=(0.0470537168687)*x[0]**o+(-0.151521222488)*x[0]+(0.168279496456)*x[1]**o+(0.869948894317)*x[1]+(-0.554196665086)*x[2]**o+(0.444189090676)*x[2]
-        arg[2,0,1]=(-0.662480394662)*x[0]**o+(0.506778773041)*x[0]+(0.664368833417)*x[1]**o+(-0.76728005759)*x[1]+(0.729668063743)*x[2]**o+(-0.476499535761)*x[2]
-        arg[2,1,0]=(0.40405640406)*x[0]**o+(0.537691275434)*x[0]+(0.675845932799)*x[1]**o+(-0.663037107454)*x[1]+(-0.947246204559)*x[2]**o+(-0.210977364198)*x[2]
-        arg[2,1,1]=(-0.460999541334)*x[0]**o+(-0.403551870206)*x[0]+(-0.59751233801)*x[1]**o+(0.389018763902)*x[1]+(-0.916883519483)*x[2]**o+(0.712714107738)*x[2]
-        arg[3,0,0]=(-0.547139864054)*x[0]**o+(0.91774354334)*x[0]+(-0.953248927323)*x[1]**o+(0.693673610785)*x[1]+(-0.474082903895)*x[2]**o+(0.187174904886)*x[2]
-        arg[3,0,1]=(0.538597533339)*x[0]**o+(0.903368885629)*x[0]+(-0.548058780044)*x[1]**o+(-0.380406303455)*x[1]+(-0.389244091021)*x[2]**o+(0.137402766164)*x[2]
-        arg[3,1,0]=(-0.11691167078)*x[0]**o+(-0.812294829383)*x[0]+(0.592192015269)*x[1]**o+(-0.3278056345)*x[1]+(-0.60462640896)*x[2]**o+(-0.701541632465)*x[2]
-        arg[3,1,1]=(-0.196382907034)*x[0]**o+(-0.496234735923)*x[0]+(-0.646502033751)*x[1]**o+(-0.18981379172)*x[1]+(0.627608199527)*x[2]**o+(-0.468659552408)*x[2]
-        arg[4,0,0]=(0.56789650708)*x[0]**o+(0.854984079971)*x[0]+(-0.641473205573)*x[1]**o+(-0.791240666887)*x[1]+(0.453562162212)*x[2]**o+(0.849111318036)*x[2]
-        arg[4,0,1]=(0.90836228457)*x[0]**o+(-0.666684673376)*x[0]+(0.245928632693)*x[1]**o+(0.313580017685)*x[1]+(0.353126203728)*x[2]**o+(0.467530918033)*x[2]
-        arg[4,1,0]=(0.670926585272)*x[0]**o+(0.768555336283)*x[0]+(-0.170656824353)*x[1]**o+(-0.346425800834)*x[1]+(-0.969641886683)*x[2]**o+(0.775335418066)*x[2]
-        arg[4,1,1]=(-0.152500967035)*x[0]**o+(0.575400101502)*x[0]+(0.901331752685)*x[1]**o+(-0.672576642993)*x[1]+(0.803176375377)*x[2]**o+(0.202785337179)*x[2]
-        arg[5,0,0]=(-0.798851736802)*x[0]**o+(-0.221276048656)*x[0]+(0.773295190339)*x[1]**o+(0.0903112854292)*x[1]+(0.884961364642)*x[2]**o+(0.326429585537)*x[2]
-        arg[5,0,1]=(0.482124059007)*x[0]**o+(-0.39227677557)*x[0]+(-0.23074922677)*x[1]**o+(0.986783507045)*x[1]+(0.591759402442)*x[2]**o+(-0.680278617308)*x[2]
-        arg[5,1,0]=(-0.857456972644)*x[0]**o+(-0.200661025977)*x[0]+(-0.850031395341)*x[1]**o+(0.830863037447)*x[1]+(-0.323765625026)*x[2]**o+(-0.969463605839)*x[2]
-        arg[5,1,1]=(-0.582538216697)*x[0]**o+(-0.495303456972)*x[0]+(0.0134139524699)*x[1]**o+(-0.750144603651)*x[1]+(-0.632380446311)*x[2]**o+(0.38782755017)*x[2]
-        ref[0,0,0]=(0.242525071375)*(1+2.*(dim-1.)/(o+1.))+(-1.74732833558)*dim
-        ref[0,0,1]=(1.52746771511)*(1+2.*(dim-1.)/(o+1.))+(-0.295920657428)*dim
-        ref[0,1,0]=(1.22690064951)*(1+2.*(dim-1.)/(o+1.))+(-0.156829910392)*dim
-        ref[0,1,1]=(0.255351951182)*(1+2.*(dim-1.)/(o+1.))+(-1.34566476797)*dim
-        ref[1,0,0]=(-0.368142007523)*(1+2.*(dim-1.)/(o+1.))+(-0.43517830631)*dim
-        ref[1,0,1]=(-0.602864409266)*(1+2.*(dim-1.)/(o+1.))+(2.53934733026)*dim
-        ref[1,1,0]=(-0.309406777332)*(1+2.*(dim-1.)/(o+1.))+(-1.74610493135)*dim
-        ref[1,1,1]=(0.515333032348)*(1+2.*(dim-1.)/(o+1.))+(-2.34365173129)*dim
-        ref[2,0,0]=(-0.338863451761)*(1+2.*(dim-1.)/(o+1.))+(1.16261676251)*dim
-        ref[2,0,1]=(0.731556502498)*(1+2.*(dim-1.)/(o+1.))+(-0.73700082031)*dim
-        ref[2,1,0]=(0.132656132299)*(1+2.*(dim-1.)/(o+1.))+(-0.336323196217)*dim
-        ref[2,1,1]=(-1.97539539883)*(1+2.*(dim-1.)/(o+1.))+(0.698181001434)*dim
-        ref[3,0,0]=(-1.97447169527)*(1+2.*(dim-1.)/(o+1.))+(1.79859205901)*dim
-        ref[3,0,1]=(-0.398705337727)*(1+2.*(dim-1.)/(o+1.))+(0.660365348338)*dim
-        ref[3,1,0]=(-0.129346064471)*(1+2.*(dim-1.)/(o+1.))+(-1.84164209635)*dim
-        ref[3,1,1]=(-0.215276741258)*(1+2.*(dim-1.)/(o+1.))+(-1.15470808005)*dim
-        ref[4,0,0]=(0.379985463719)*(1+2.*(dim-1.)/(o+1.))+(0.91285473112)*dim
-        ref[4,0,1]=(1.50741712099)*(1+2.*(dim-1.)/(o+1.))+(0.114426262342)*dim
-        ref[4,1,0]=(-0.469372125764)*(1+2.*(dim-1.)/(o+1.))+(1.19746495352)*dim
-        ref[4,1,1]=(1.55200716103)*(1+2.*(dim-1.)/(o+1.))+(0.105608795688)*dim
-        ref[5,0,0]=(0.859404818179)*(1+2.*(dim-1.)/(o+1.))+(0.19546482231)*dim
-        ref[5,0,1]=(0.843134234679)*(1+2.*(dim-1.)/(o+1.))+(-0.085771885833)*dim
-        ref[5,1,0]=(-2.03125399301)*(1+2.*(dim-1.)/(o+1.))+(-0.339261594369)*dim
-        ref[5,1,1]=(-1.20150471054)*(1+2.*(dim-1.)/(o+1.))+(-0.857620510454)*dim
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.161068279134)*x[0]**o+(-0.20016693624)*x[0]+(0.360967926263)*x[1]**o+(0.519774730324)*x[1]
-        arg[0,0,0,1]=(-0.470257945181)*x[0]**o+(0.0652334206708)*x[0]+(0.652139991357)*x[1]**o+(-0.592482756578)*x[1]
-        arg[0,0,1,0]=(0.143126570256)*x[0]**o+(0.683474249212)*x[0]+(0.839611756722)*x[1]**o+(-0.436612603526)*x[1]
-        arg[0,0,1,1]=(-0.82328367976)*x[0]**o+(-0.848145278113)*x[0]+(-0.649046694126)*x[1]**o+(0.7686615034)*x[1]
-        arg[0,0,2,0]=(-0.89676527056)*x[0]**o+(-0.466316806084)*x[0]+(-0.454908744166)*x[1]**o+(0.425524454897)*x[1]
-        arg[0,0,2,1]=(-0.720978656424)*x[0]**o+(-0.655449460498)*x[0]+(0.466383340682)*x[1]**o+(-0.609615749634)*x[1]
-        arg[0,1,0,0]=(-0.358670380794)*x[0]**o+(-0.764939003508)*x[0]+(-0.550898156906)*x[1]**o+(0.803150103728)*x[1]
-        arg[0,1,0,1]=(-0.652241076457)*x[0]**o+(-0.614033274928)*x[0]+(-0.308770011731)*x[1]**o+(0.925847136965)*x[1]
-        arg[0,1,1,0]=(0.710539026622)*x[0]**o+(-0.345587804078)*x[0]+(-0.170026226995)*x[1]**o+(0.340557574804)*x[1]
-        arg[0,1,1,1]=(0.348069554895)*x[0]**o+(-0.633629515001)*x[0]+(-0.199233786202)*x[1]**o+(0.500291488845)*x[1]
-        arg[0,1,2,0]=(0.262179751197)*x[0]**o+(-0.55460029497)*x[0]+(-0.354335283745)*x[1]**o+(0.301130103531)*x[1]
-        arg[0,1,2,1]=(0.212709964525)*x[0]**o+(0.205907518129)*x[0]+(0.167040570615)*x[1]**o+(-0.0684155270612)*x[1]
-        arg[0,2,0,0]=(-0.272141616042)*x[0]**o+(0.187045318075)*x[0]+(-0.364974531949)*x[1]**o+(-0.969702579161)*x[1]
-        arg[0,2,0,1]=(-0.997155483171)*x[0]**o+(0.864439328971)*x[0]+(0.887907754657)*x[1]**o+(-0.323021835147)*x[1]
-        arg[0,2,1,0]=(-0.544228085563)*x[0]**o+(-0.56752289714)*x[0]+(-0.389234395916)*x[1]**o+(-0.969287386144)*x[1]
-        arg[0,2,1,1]=(-0.786136450866)*x[0]**o+(0.589465339989)*x[0]+(-0.411595778776)*x[1]**o+(0.726975706536)*x[1]
-        arg[0,2,2,0]=(-0.788299350517)*x[0]**o+(0.697037609691)*x[0]+(-0.391342918209)*x[1]**o+(0.432368662365)*x[1]
-        arg[0,2,2,1]=(-0.390536554506)*x[0]**o+(0.547528359725)*x[0]+(0.58957966188)*x[1]**o+(0.146918361066)*x[1]
-        arg[0,3,0,0]=(0.176059579799)*x[0]**o+(-0.774041865433)*x[0]+(0.52369869825)*x[1]**o+(-0.812474996262)*x[1]
-        arg[0,3,0,1]=(-0.938727595513)*x[0]**o+(0.734277246158)*x[0]+(-0.500452658276)*x[1]**o+(0.591562924701)*x[1]
-        arg[0,3,1,0]=(-0.109970490351)*x[0]**o+(-0.463382333915)*x[0]+(0.430588389365)*x[1]**o+(-0.174978181104)*x[1]
-        arg[0,3,1,1]=(-0.564486046162)*x[0]**o+(0.325599920584)*x[0]+(-0.177334934858)*x[1]**o+(-0.789210879368)*x[1]
-        arg[0,3,2,0]=(-0.409769653157)*x[0]**o+(-0.674668709075)*x[0]+(0.977465383205)*x[1]**o+(-0.178249094926)*x[1]
-        arg[0,3,2,1]=(0.112394584736)*x[0]**o+(-0.229767891006)*x[0]+(0.952422132907)*x[1]**o+(-0.133952947363)*x[1]
-        arg[0,4,0,0]=(0.927747625444)*x[0]**o+(-0.147390883234)*x[0]+(-0.0523168758823)*x[1]**o+(0.698643952882)*x[1]
-        arg[0,4,0,1]=(0.986627759385)*x[0]**o+(-0.0486375625834)*x[0]+(0.27598075052)*x[1]**o+(0.970272004318)*x[1]
-        arg[0,4,1,0]=(-0.461643441984)*x[0]**o+(-0.815261492927)*x[0]+(-0.0806771439228)*x[1]**o+(0.877302861263)*x[1]
-        arg[0,4,1,1]=(-0.108403920958)*x[0]**o+(0.651566419087)*x[0]+(-0.629972296369)*x[1]**o+(-0.235413582155)*x[1]
-        arg[0,4,2,0]=(-0.177527213798)*x[0]**o+(0.987202381273)*x[0]+(-0.15522298966)*x[1]**o+(0.234268561378)*x[1]
-        arg[0,4,2,1]=(0.521954293269)*x[0]**o+(-0.776898814469)*x[0]+(0.783085515988)*x[1]**o+(-0.469921197982)*x[1]
-        arg[1,0,0,0]=(0.858157489751)*x[0]**o+(0.444181035326)*x[0]+(0.3426806552)*x[1]**o+(-0.219249318925)*x[1]
-        arg[1,0,0,1]=(0.405857394564)*x[0]**o+(0.178361294933)*x[0]+(0.0879917927852)*x[1]**o+(-0.0689581267347)*x[1]
-        arg[1,0,1,0]=(0.63175565694)*x[0]**o+(0.0810462363705)*x[0]+(0.0350399072162)*x[1]**o+(-0.269906961338)*x[1]
-        arg[1,0,1,1]=(-0.273973794035)*x[0]**o+(0.824519533391)*x[0]+(0.596785621044)*x[1]**o+(-0.243043370261)*x[1]
-        arg[1,0,2,0]=(-0.959246118913)*x[0]**o+(0.3570024829)*x[0]+(-0.260098162669)*x[1]**o+(0.341044029457)*x[1]
-        arg[1,0,2,1]=(0.966671029776)*x[0]**o+(0.598898116395)*x[0]+(0.392360541053)*x[1]**o+(-0.322723646751)*x[1]
-        arg[1,1,0,0]=(-0.658365963559)*x[0]**o+(-0.674107595463)*x[0]+(-0.0103911551403)*x[1]**o+(0.858879803218)*x[1]
-        arg[1,1,0,1]=(0.340459206102)*x[0]**o+(-0.681434505015)*x[0]+(0.917412924129)*x[1]**o+(0.703699154381)*x[1]
-        arg[1,1,1,0]=(0.0473840209756)*x[0]**o+(-0.787070458106)*x[0]+(0.11979244907)*x[1]**o+(0.541238063489)*x[1]
-        arg[1,1,1,1]=(0.184943768213)*x[0]**o+(-0.942961758488)*x[0]+(-0.844785429901)*x[1]**o+(-0.0109779269179)*x[1]
-        arg[1,1,2,0]=(0.921469748172)*x[0]**o+(-0.122684636542)*x[0]+(0.149552532716)*x[1]**o+(-0.0102623511735)*x[1]
-        arg[1,1,2,1]=(-0.720466710917)*x[0]**o+(-0.755841224189)*x[0]+(0.372635950892)*x[1]**o+(0.271604227274)*x[1]
-        arg[1,2,0,0]=(-0.548557725319)*x[0]**o+(0.745340396995)*x[0]+(0.461556064961)*x[1]**o+(0.696460891668)*x[1]
-        arg[1,2,0,1]=(-0.738939238644)*x[0]**o+(0.344829756443)*x[0]+(0.272341172248)*x[1]**o+(0.768063359753)*x[1]
-        arg[1,2,1,0]=(-0.213161389496)*x[0]**o+(0.458730188555)*x[0]+(-0.783049463147)*x[1]**o+(0.785273989074)*x[1]
-        arg[1,2,1,1]=(0.189092239774)*x[0]**o+(-0.0649917239139)*x[0]+(0.0171281685468)*x[1]**o+(0.397065812267)*x[1]
-        arg[1,2,2,0]=(-0.809663598067)*x[0]**o+(0.587214021528)*x[0]+(0.912814601228)*x[1]**o+(0.860792008172)*x[1]
-        arg[1,2,2,1]=(0.487927123118)*x[0]**o+(-0.760831928598)*x[0]+(-0.770486346056)*x[1]**o+(-0.715077841171)*x[1]
-        arg[1,3,0,0]=(0.0202747853647)*x[0]**o+(0.0666642857036)*x[0]+(-0.717756666598)*x[1]**o+(-0.481009806467)*x[1]
-        arg[1,3,0,1]=(-0.251164550146)*x[0]**o+(0.0519935051437)*x[0]+(-0.703400138413)*x[1]**o+(-0.990329903234)*x[1]
-        arg[1,3,1,0]=(0.970793375169)*x[0]**o+(-0.365675269998)*x[0]+(0.77706784549)*x[1]**o+(-0.237785293481)*x[1]
-        arg[1,3,1,1]=(-0.162786953006)*x[0]**o+(0.985402077919)*x[0]+(0.739483663725)*x[1]**o+(0.559554321882)*x[1]
-        arg[1,3,2,0]=(0.184701463663)*x[0]**o+(0.946173117295)*x[0]+(-0.451420616712)*x[1]**o+(0.244506578089)*x[1]
-        arg[1,3,2,1]=(0.894307549357)*x[0]**o+(0.474983970689)*x[0]+(0.626273940678)*x[1]**o+(0.107985157225)*x[1]
-        arg[1,4,0,0]=(-0.180994231135)*x[0]**o+(-0.899808624585)*x[0]+(0.395935138342)*x[1]**o+(-0.387788497342)*x[1]
-        arg[1,4,0,1]=(0.0713358452056)*x[0]**o+(0.505276043139)*x[0]+(-0.635565006093)*x[1]**o+(0.956951408169)*x[1]
-        arg[1,4,1,0]=(0.355608577722)*x[0]**o+(0.58482326687)*x[0]+(0.654137690443)*x[1]**o+(-0.849016362888)*x[1]
-        arg[1,4,1,1]=(-0.275966957458)*x[0]**o+(0.856095068377)*x[0]+(-0.760077050664)*x[1]**o+(-0.904159432699)*x[1]
-        arg[1,4,2,0]=(-0.0637454805096)*x[0]**o+(-0.833057387633)*x[0]+(0.279008913569)*x[1]**o+(-0.093356790193)*x[1]
-        arg[1,4,2,1]=(0.165869666472)*x[0]**o+(-0.4554345089)*x[0]+(0.697149094381)*x[1]**o+(0.244460087482)*x[1]
-        arg[2,0,0,0]=(0.388188511348)*x[0]**o+(-0.00552398040882)*x[0]+(0.0679336322536)*x[1]**o+(-0.281132460216)*x[1]
-        arg[2,0,0,1]=(0.968019690109)*x[0]**o+(0.525335591339)*x[0]+(0.660069087546)*x[1]**o+(-0.795388487336)*x[1]
-        arg[2,0,1,0]=(-0.444010450901)*x[0]**o+(-0.498771184141)*x[0]+(-0.394999176962)*x[1]**o+(-0.579230388911)*x[1]
-        arg[2,0,1,1]=(-0.96211072138)*x[0]**o+(-0.0977519108256)*x[0]+(0.206179333903)*x[1]**o+(-0.206155312014)*x[1]
-        arg[2,0,2,0]=(0.131307090845)*x[0]**o+(0.179396626286)*x[0]+(-0.436118623166)*x[1]**o+(0.829727875456)*x[1]
-        arg[2,0,2,1]=(-0.206336435516)*x[0]**o+(0.175744210813)*x[0]+(0.818204199205)*x[1]**o+(0.433292546177)*x[1]
-        arg[2,1,0,0]=(0.920189410059)*x[0]**o+(-0.629286762249)*x[0]+(-0.14444305096)*x[1]**o+(0.564022686795)*x[1]
-        arg[2,1,0,1]=(0.43550707444)*x[0]**o+(-0.0203691253164)*x[0]+(0.632472807002)*x[1]**o+(0.722390213081)*x[1]
-        arg[2,1,1,0]=(0.827084071535)*x[0]**o+(0.864139638834)*x[0]+(0.795893591186)*x[1]**o+(0.0492667773115)*x[1]
-        arg[2,1,1,1]=(0.863813787478)*x[0]**o+(0.268800194137)*x[0]+(-0.567637801205)*x[1]**o+(0.931221493563)*x[1]
-        arg[2,1,2,0]=(-0.613463525024)*x[0]**o+(-0.0688030533166)*x[0]+(-0.786395692457)*x[1]**o+(0.862189706883)*x[1]
-        arg[2,1,2,1]=(0.315306814851)*x[0]**o+(0.76879509223)*x[0]+(0.451451342779)*x[1]**o+(-0.478873421268)*x[1]
-        arg[2,2,0,0]=(-0.785116047841)*x[0]**o+(0.347614087057)*x[0]+(-0.0106716042015)*x[1]**o+(-0.350898768187)*x[1]
-        arg[2,2,0,1]=(-0.987778931187)*x[0]**o+(-0.380379654757)*x[0]+(-0.383604999655)*x[1]**o+(0.022203803886)*x[1]
-        arg[2,2,1,0]=(0.508327115069)*x[0]**o+(0.443678958632)*x[0]+(-0.320069211602)*x[1]**o+(-0.778140184171)*x[1]
-        arg[2,2,1,1]=(-0.532025577107)*x[0]**o+(-0.0475799386434)*x[0]+(0.650417175266)*x[1]**o+(0.33739661369)*x[1]
-        arg[2,2,2,0]=(-0.406412097333)*x[0]**o+(0.0510500610605)*x[0]+(-0.25755890225)*x[1]**o+(-0.350209779392)*x[1]
-        arg[2,2,2,1]=(0.401361048956)*x[0]**o+(-0.594793585281)*x[0]+(0.155257431052)*x[1]**o+(-0.674885216524)*x[1]
-        arg[2,3,0,0]=(0.352606222236)*x[0]**o+(0.64529574473)*x[0]+(-0.838258091233)*x[1]**o+(0.527911574536)*x[1]
-        arg[2,3,0,1]=(-0.62652610251)*x[0]**o+(0.879664434218)*x[0]+(0.730845316192)*x[1]**o+(0.0318659384791)*x[1]
-        arg[2,3,1,0]=(-0.311152313179)*x[0]**o+(-0.333154399786)*x[0]+(0.743640958069)*x[1]**o+(0.313394944493)*x[1]
-        arg[2,3,1,1]=(-0.728968478378)*x[0]**o+(0.500229380574)*x[0]+(0.756628133572)*x[1]**o+(0.270533146994)*x[1]
-        arg[2,3,2,0]=(-0.219775843272)*x[0]**o+(0.882943220401)*x[0]+(0.79341547188)*x[1]**o+(0.503486054551)*x[1]
-        arg[2,3,2,1]=(-0.850285149353)*x[0]**o+(0.78820884302)*x[0]+(0.348024963962)*x[1]**o+(0.83743616537)*x[1]
-        arg[2,4,0,0]=(0.868649421127)*x[0]**o+(-0.622361223999)*x[0]+(0.836321867516)*x[1]**o+(0.423582994131)*x[1]
-        arg[2,4,0,1]=(0.140963355402)*x[0]**o+(0.190496469385)*x[0]+(0.765311231744)*x[1]**o+(0.368696267095)*x[1]
-        arg[2,4,1,0]=(-0.680854080076)*x[0]**o+(-0.729641193897)*x[0]+(-0.843347646585)*x[1]**o+(-0.0993036180842)*x[1]
-        arg[2,4,1,1]=(-0.130039648356)*x[0]**o+(0.534197300899)*x[0]+(-0.142588861186)*x[1]**o+(-0.308376644249)*x[1]
-        arg[2,4,2,0]=(0.331212825202)*x[0]**o+(0.466247840288)*x[0]+(-0.201714210846)*x[1]**o+(0.80521345364)*x[1]
-        arg[2,4,2,1]=(0.454299813247)*x[0]**o+(0.646694941459)*x[0]+(-0.929854585458)*x[1]**o+(-0.365252296746)*x[1]
-        arg[3,0,0,0]=(-0.623915395721)*x[0]**o+(-0.789827882448)*x[0]+(-0.862568457189)*x[1]**o+(-0.141799958679)*x[1]
-        arg[3,0,0,1]=(0.197040281353)*x[0]**o+(0.155785418081)*x[0]+(-0.587898788817)*x[1]**o+(0.700612189317)*x[1]
-        arg[3,0,1,0]=(-0.899654954269)*x[0]**o+(-0.801426785588)*x[0]+(-0.528678401571)*x[1]**o+(-0.224185097206)*x[1]
-        arg[3,0,1,1]=(0.291298188198)*x[0]**o+(0.786698690825)*x[0]+(0.925634940697)*x[1]**o+(0.617661715197)*x[1]
-        arg[3,0,2,0]=(0.788272473274)*x[0]**o+(-0.0400044705274)*x[0]+(-0.669092974469)*x[1]**o+(-0.063697728491)*x[1]
-        arg[3,0,2,1]=(-0.0612398565521)*x[0]**o+(-0.884311783009)*x[0]+(0.444689078628)*x[1]**o+(0.302741981611)*x[1]
-        arg[3,1,0,0]=(0.483756249722)*x[0]**o+(-0.214185139167)*x[0]+(0.526387014144)*x[1]**o+(-0.172619975799)*x[1]
-        arg[3,1,0,1]=(0.0685836489777)*x[0]**o+(-0.425861440836)*x[0]+(0.94669899123)*x[1]**o+(-0.649068988929)*x[1]
-        arg[3,1,1,0]=(0.935225203148)*x[0]**o+(-0.649378812349)*x[0]+(-0.791553458732)*x[1]**o+(0.776307740809)*x[1]
-        arg[3,1,1,1]=(-0.45319945403)*x[0]**o+(-0.473310763902)*x[0]+(-0.268480872039)*x[1]**o+(0.847382076174)*x[1]
-        arg[3,1,2,0]=(-0.573022434421)*x[0]**o+(0.584143976397)*x[0]+(0.131688457808)*x[1]**o+(-0.628894863435)*x[1]
-        arg[3,1,2,1]=(0.628566928363)*x[0]**o+(-0.868564569338)*x[0]+(-0.482273553287)*x[1]**o+(0.679652796519)*x[1]
-        arg[3,2,0,0]=(-0.64046509323)*x[0]**o+(-0.108928537952)*x[0]+(-0.512288515479)*x[1]**o+(0.683072290041)*x[1]
-        arg[3,2,0,1]=(0.472589328326)*x[0]**o+(0.219741638671)*x[0]+(0.136368535311)*x[1]**o+(-0.525113003647)*x[1]
-        arg[3,2,1,0]=(-0.45731256203)*x[0]**o+(0.0854410475382)*x[0]+(0.257725845542)*x[1]**o+(0.430430185351)*x[1]
-        arg[3,2,1,1]=(0.948699678725)*x[0]**o+(-0.00538658505415)*x[0]+(0.921898600708)*x[1]**o+(-0.448522286404)*x[1]
-        arg[3,2,2,0]=(-0.0863353766204)*x[0]**o+(-0.652417730681)*x[0]+(0.755871413533)*x[1]**o+(0.206065623655)*x[1]
-        arg[3,2,2,1]=(0.263075920527)*x[0]**o+(0.94162407402)*x[0]+(0.750015836722)*x[1]**o+(-0.815154267718)*x[1]
-        arg[3,3,0,0]=(-0.606984299829)*x[0]**o+(0.120704522147)*x[0]+(-0.324211323778)*x[1]**o+(-0.123647081263)*x[1]
-        arg[3,3,0,1]=(0.838995936232)*x[0]**o+(0.854147779134)*x[0]+(-0.192271552952)*x[1]**o+(0.0281108740635)*x[1]
-        arg[3,3,1,0]=(-0.0343159887291)*x[0]**o+(0.242432659911)*x[0]+(-0.37299830191)*x[1]**o+(-0.456792158625)*x[1]
-        arg[3,3,1,1]=(-0.305277044867)*x[0]**o+(-0.930386582491)*x[0]+(-0.979921197617)*x[1]**o+(-0.507736755766)*x[1]
-        arg[3,3,2,0]=(0.548675744195)*x[0]**o+(0.755596482286)*x[0]+(0.0722267054576)*x[1]**o+(-0.393768047035)*x[1]
-        arg[3,3,2,1]=(0.74781993508)*x[0]**o+(-0.655033306209)*x[0]+(0.480653847364)*x[1]**o+(-0.169400714085)*x[1]
-        arg[3,4,0,0]=(0.269186769422)*x[0]**o+(-0.0786214595922)*x[0]+(-0.975508552024)*x[1]**o+(-0.798249509899)*x[1]
-        arg[3,4,0,1]=(-0.599201275441)*x[0]**o+(0.473490319504)*x[0]+(0.0277044125859)*x[1]**o+(0.818107843614)*x[1]
-        arg[3,4,1,0]=(-0.46272642862)*x[0]**o+(0.740282148493)*x[0]+(0.35998379499)*x[1]**o+(-0.938681489717)*x[1]
-        arg[3,4,1,1]=(0.187067286301)*x[0]**o+(-0.284171344521)*x[0]+(0.612229918327)*x[1]**o+(0.3917984881)*x[1]
-        arg[3,4,2,0]=(-0.535270910341)*x[0]**o+(-0.00723888213927)*x[0]+(-0.776984534618)*x[1]**o+(-0.0899536033273)*x[1]
-        arg[3,4,2,1]=(-0.382290376155)*x[0]**o+(-0.0593490177599)*x[0]+(-0.19716515678)*x[1]**o+(-0.268991693613)*x[1]
-        ref[0,0,0,0]=(0.19989964713)*(1+2.*(dim-1.)/(o+1.))+(0.319607794084)*dim
-        ref[0,0,0,1]=(0.181882046176)*(1+2.*(dim-1.)/(o+1.))+(-0.527249335907)*dim
-        ref[0,0,1,0]=(0.982738326978)*(1+2.*(dim-1.)/(o+1.))+(0.246861645686)*dim
-        ref[0,0,1,1]=(-1.47233037389)*(1+2.*(dim-1.)/(o+1.))+(-0.0794837747136)*dim
-        ref[0,0,2,0]=(-1.35167401473)*(1+2.*(dim-1.)/(o+1.))+(-0.0407923511861)*dim
-        ref[0,0,2,1]=(-0.254595315742)*(1+2.*(dim-1.)/(o+1.))+(-1.26506521013)*dim
-        ref[0,1,0,0]=(-0.909568537701)*(1+2.*(dim-1.)/(o+1.))+(0.0382111002203)*dim
-        ref[0,1,0,1]=(-0.961011088187)*(1+2.*(dim-1.)/(o+1.))+(0.311813862038)*dim
-        ref[0,1,1,0]=(0.540512799627)*(1+2.*(dim-1.)/(o+1.))+(-0.00503022927381)*dim
-        ref[0,1,1,1]=(0.148835768693)*(1+2.*(dim-1.)/(o+1.))+(-0.133338026157)*dim
-        ref[0,1,2,0]=(-0.0921555325482)*(1+2.*(dim-1.)/(o+1.))+(-0.253470191439)*dim
-        ref[0,1,2,1]=(0.37975053514)*(1+2.*(dim-1.)/(o+1.))+(0.137491991068)*dim
-        ref[0,2,0,0]=(-0.637116147991)*(1+2.*(dim-1.)/(o+1.))+(-0.782657261086)*dim
-        ref[0,2,0,1]=(-0.109247728514)*(1+2.*(dim-1.)/(o+1.))+(0.541417493824)*dim
-        ref[0,2,1,0]=(-0.933462481479)*(1+2.*(dim-1.)/(o+1.))+(-1.53681028328)*dim
-        ref[0,2,1,1]=(-1.19773222964)*(1+2.*(dim-1.)/(o+1.))+(1.31644104653)*dim
-        ref[0,2,2,0]=(-1.17964226873)*(1+2.*(dim-1.)/(o+1.))+(1.12940627206)*dim
-        ref[0,2,2,1]=(0.199043107375)*(1+2.*(dim-1.)/(o+1.))+(0.694446720792)*dim
-        ref[0,3,0,0]=(0.699758278049)*(1+2.*(dim-1.)/(o+1.))+(-1.5865168617)*dim
-        ref[0,3,0,1]=(-1.43918025379)*(1+2.*(dim-1.)/(o+1.))+(1.32584017086)*dim
-        ref[0,3,1,0]=(0.320617899014)*(1+2.*(dim-1.)/(o+1.))+(-0.63836051502)*dim
-        ref[0,3,1,1]=(-0.741820981021)*(1+2.*(dim-1.)/(o+1.))+(-0.463610958784)*dim
-        ref[0,3,2,0]=(0.567695730048)*(1+2.*(dim-1.)/(o+1.))+(-0.852917804)*dim
-        ref[0,3,2,1]=(1.06481671764)*(1+2.*(dim-1.)/(o+1.))+(-0.363720838369)*dim
-        ref[0,4,0,0]=(0.875430749562)*(1+2.*(dim-1.)/(o+1.))+(0.551253069648)*dim
-        ref[0,4,0,1]=(1.26260850991)*(1+2.*(dim-1.)/(o+1.))+(0.921634441735)*dim
-        ref[0,4,1,0]=(-0.542320585907)*(1+2.*(dim-1.)/(o+1.))+(0.0620413683361)*dim
-        ref[0,4,1,1]=(-0.738376217327)*(1+2.*(dim-1.)/(o+1.))+(0.416152836932)*dim
-        ref[0,4,2,0]=(-0.332750203458)*(1+2.*(dim-1.)/(o+1.))+(1.22147094265)*dim
-        ref[0,4,2,1]=(1.30503980926)*(1+2.*(dim-1.)/(o+1.))+(-1.24682001245)*dim
-        ref[1,0,0,0]=(1.20083814495)*(1+2.*(dim-1.)/(o+1.))+(0.224931716401)*dim
-        ref[1,0,0,1]=(0.493849187349)*(1+2.*(dim-1.)/(o+1.))+(0.109403168198)*dim
-        ref[1,0,1,0]=(0.666795564157)*(1+2.*(dim-1.)/(o+1.))+(-0.188860724968)*dim
-        ref[1,0,1,1]=(0.322811827009)*(1+2.*(dim-1.)/(o+1.))+(0.58147616313)*dim
-        ref[1,0,2,0]=(-1.21934428158)*(1+2.*(dim-1.)/(o+1.))+(0.698046512357)*dim
-        ref[1,0,2,1]=(1.35903157083)*(1+2.*(dim-1.)/(o+1.))+(0.276174469644)*dim
-        ref[1,1,0,0]=(-0.668757118699)*(1+2.*(dim-1.)/(o+1.))+(0.184772207756)*dim
-        ref[1,1,0,1]=(1.25787213023)*(1+2.*(dim-1.)/(o+1.))+(0.0222646493659)*dim
-        ref[1,1,1,0]=(0.167176470046)*(1+2.*(dim-1.)/(o+1.))+(-0.245832394617)*dim
-        ref[1,1,1,1]=(-0.659841661688)*(1+2.*(dim-1.)/(o+1.))+(-0.953939685406)*dim
-        ref[1,1,2,0]=(1.07102228089)*(1+2.*(dim-1.)/(o+1.))+(-0.132946987715)*dim
-        ref[1,1,2,1]=(-0.347830760025)*(1+2.*(dim-1.)/(o+1.))+(-0.484236996915)*dim
-        ref[1,2,0,0]=(-0.087001660358)*(1+2.*(dim-1.)/(o+1.))+(1.44180128866)*dim
-        ref[1,2,0,1]=(-0.466598066397)*(1+2.*(dim-1.)/(o+1.))+(1.1128931162)*dim
-        ref[1,2,1,0]=(-0.996210852643)*(1+2.*(dim-1.)/(o+1.))+(1.24400417763)*dim
-        ref[1,2,1,1]=(0.206220408321)*(1+2.*(dim-1.)/(o+1.))+(0.332074088353)*dim
-        ref[1,2,2,0]=(0.103151003161)*(1+2.*(dim-1.)/(o+1.))+(1.4480060297)*dim
-        ref[1,2,2,1]=(-0.282559222939)*(1+2.*(dim-1.)/(o+1.))+(-1.47590976977)*dim
-        ref[1,3,0,0]=(-0.697481881234)*(1+2.*(dim-1.)/(o+1.))+(-0.414345520764)*dim
-        ref[1,3,0,1]=(-0.954564688559)*(1+2.*(dim-1.)/(o+1.))+(-0.93833639809)*dim
-        ref[1,3,1,0]=(1.74786122066)*(1+2.*(dim-1.)/(o+1.))+(-0.603460563479)*dim
-        ref[1,3,1,1]=(0.576696710719)*(1+2.*(dim-1.)/(o+1.))+(1.5449563998)*dim
-        ref[1,3,2,0]=(-0.26671915305)*(1+2.*(dim-1.)/(o+1.))+(1.19067969538)*dim
-        ref[1,3,2,1]=(1.52058149003)*(1+2.*(dim-1.)/(o+1.))+(0.582969127914)*dim
-        ref[1,4,0,0]=(0.214940907208)*(1+2.*(dim-1.)/(o+1.))+(-1.28759712193)*dim
-        ref[1,4,0,1]=(-0.564229160887)*(1+2.*(dim-1.)/(o+1.))+(1.46222745131)*dim
-        ref[1,4,1,0]=(1.00974626816)*(1+2.*(dim-1.)/(o+1.))+(-0.264193096019)*dim
-        ref[1,4,1,1]=(-1.03604400812)*(1+2.*(dim-1.)/(o+1.))+(-0.048064364322)*dim
-        ref[1,4,2,0]=(0.215263433059)*(1+2.*(dim-1.)/(o+1.))+(-0.926414177826)*dim
-        ref[1,4,2,1]=(0.863018760853)*(1+2.*(dim-1.)/(o+1.))+(-0.210974421418)*dim
-        ref[2,0,0,0]=(0.456122143601)*(1+2.*(dim-1.)/(o+1.))+(-0.286656440625)*dim
-        ref[2,0,0,1]=(1.62808877765)*(1+2.*(dim-1.)/(o+1.))+(-0.270052895997)*dim
-        ref[2,0,1,0]=(-0.839009627862)*(1+2.*(dim-1.)/(o+1.))+(-1.07800157305)*dim
-        ref[2,0,1,1]=(-0.755931387477)*(1+2.*(dim-1.)/(o+1.))+(-0.30390722284)*dim
-        ref[2,0,2,0]=(-0.304811532322)*(1+2.*(dim-1.)/(o+1.))+(1.00912450174)*dim
-        ref[2,0,2,1]=(0.61186776369)*(1+2.*(dim-1.)/(o+1.))+(0.60903675699)*dim
-        ref[2,1,0,0]=(0.775746359099)*(1+2.*(dim-1.)/(o+1.))+(-0.0652640754538)*dim
-        ref[2,1,0,1]=(1.06797988144)*(1+2.*(dim-1.)/(o+1.))+(0.702021087765)*dim
-        ref[2,1,1,0]=(1.62297766272)*(1+2.*(dim-1.)/(o+1.))+(0.913406416145)*dim
-        ref[2,1,1,1]=(0.296175986273)*(1+2.*(dim-1.)/(o+1.))+(1.2000216877)*dim
-        ref[2,1,2,0]=(-1.39985921748)*(1+2.*(dim-1.)/(o+1.))+(0.793386653567)*dim
-        ref[2,1,2,1]=(0.76675815763)*(1+2.*(dim-1.)/(o+1.))+(0.289921670962)*dim
-        ref[2,2,0,0]=(-0.795787652043)*(1+2.*(dim-1.)/(o+1.))+(-0.0032846811301)*dim
-        ref[2,2,0,1]=(-1.37138393084)*(1+2.*(dim-1.)/(o+1.))+(-0.358175850871)*dim
-        ref[2,2,1,0]=(0.188257903467)*(1+2.*(dim-1.)/(o+1.))+(-0.334461225539)*dim
-        ref[2,2,1,1]=(0.118391598158)*(1+2.*(dim-1.)/(o+1.))+(0.289816675047)*dim
-        ref[2,2,2,0]=(-0.663970999582)*(1+2.*(dim-1.)/(o+1.))+(-0.299159718332)*dim
-        ref[2,2,2,1]=(0.556618480008)*(1+2.*(dim-1.)/(o+1.))+(-1.2696788018)*dim
-        ref[2,3,0,0]=(-0.485651868997)*(1+2.*(dim-1.)/(o+1.))+(1.17320731927)*dim
-        ref[2,3,0,1]=(0.104319213682)*(1+2.*(dim-1.)/(o+1.))+(0.911530372697)*dim
-        ref[2,3,1,0]=(0.43248864489)*(1+2.*(dim-1.)/(o+1.))+(-0.0197594552935)*dim
-        ref[2,3,1,1]=(0.0276596551936)*(1+2.*(dim-1.)/(o+1.))+(0.770762527568)*dim
-        ref[2,3,2,0]=(0.573639628608)*(1+2.*(dim-1.)/(o+1.))+(1.38642927495)*dim
-        ref[2,3,2,1]=(-0.502260185391)*(1+2.*(dim-1.)/(o+1.))+(1.62564500839)*dim
-        ref[2,4,0,0]=(1.70497128864)*(1+2.*(dim-1.)/(o+1.))+(-0.198778229868)*dim
-        ref[2,4,0,1]=(0.906274587146)*(1+2.*(dim-1.)/(o+1.))+(0.55919273648)*dim
-        ref[2,4,1,0]=(-1.52420172666)*(1+2.*(dim-1.)/(o+1.))+(-0.828944811982)*dim
-        ref[2,4,1,1]=(-0.272628509541)*(1+2.*(dim-1.)/(o+1.))+(0.225820656649)*dim
-        ref[2,4,2,0]=(0.129498614356)*(1+2.*(dim-1.)/(o+1.))+(1.27146129393)*dim
-        ref[2,4,2,1]=(-0.475554772211)*(1+2.*(dim-1.)/(o+1.))+(0.281442644713)*dim
-        ref[3,0,0,0]=(-1.48648385291)*(1+2.*(dim-1.)/(o+1.))+(-0.931627841127)*dim
-        ref[3,0,0,1]=(-0.390858507465)*(1+2.*(dim-1.)/(o+1.))+(0.856397607398)*dim
-        ref[3,0,1,0]=(-1.42833335584)*(1+2.*(dim-1.)/(o+1.))+(-1.02561188279)*dim
-        ref[3,0,1,1]=(1.2169331289)*(1+2.*(dim-1.)/(o+1.))+(1.40436040602)*dim
-        ref[3,0,2,0]=(0.119179498805)*(1+2.*(dim-1.)/(o+1.))+(-0.103702199018)*dim
-        ref[3,0,2,1]=(0.383449222076)*(1+2.*(dim-1.)/(o+1.))+(-0.581569801398)*dim
-        ref[3,1,0,0]=(1.01014326387)*(1+2.*(dim-1.)/(o+1.))+(-0.386805114966)*dim
-        ref[3,1,0,1]=(1.01528264021)*(1+2.*(dim-1.)/(o+1.))+(-1.07493042977)*dim
-        ref[3,1,1,0]=(0.143671744416)*(1+2.*(dim-1.)/(o+1.))+(0.12692892846)*dim
-        ref[3,1,1,1]=(-0.721680326068)*(1+2.*(dim-1.)/(o+1.))+(0.374071312272)*dim
-        ref[3,1,2,0]=(-0.441333976613)*(1+2.*(dim-1.)/(o+1.))+(-0.0447508870373)*dim
-        ref[3,1,2,1]=(0.146293375075)*(1+2.*(dim-1.)/(o+1.))+(-0.188911772819)*dim
-        ref[3,2,0,0]=(-1.15275360871)*(1+2.*(dim-1.)/(o+1.))+(0.57414375209)*dim
-        ref[3,2,0,1]=(0.608957863637)*(1+2.*(dim-1.)/(o+1.))+(-0.305371364976)*dim
-        ref[3,2,1,0]=(-0.199586716488)*(1+2.*(dim-1.)/(o+1.))+(0.515871232889)*dim
-        ref[3,2,1,1]=(1.87059827943)*(1+2.*(dim-1.)/(o+1.))+(-0.453908871458)*dim
-        ref[3,2,2,0]=(0.669536036913)*(1+2.*(dim-1.)/(o+1.))+(-0.446352107026)*dim
-        ref[3,2,2,1]=(1.01309175725)*(1+2.*(dim-1.)/(o+1.))+(0.126469806303)*dim
-        ref[3,3,0,0]=(-0.931195623607)*(1+2.*(dim-1.)/(o+1.))+(-0.00294255911617)*dim
-        ref[3,3,0,1]=(0.64672438328)*(1+2.*(dim-1.)/(o+1.))+(0.882258653197)*dim
-        ref[3,3,1,0]=(-0.407314290639)*(1+2.*(dim-1.)/(o+1.))+(-0.214359498715)*dim
-        ref[3,3,1,1]=(-1.28519824248)*(1+2.*(dim-1.)/(o+1.))+(-1.43812333826)*dim
-        ref[3,3,2,0]=(0.620902449652)*(1+2.*(dim-1.)/(o+1.))+(0.361828435252)*dim
-        ref[3,3,2,1]=(1.22847378244)*(1+2.*(dim-1.)/(o+1.))+(-0.824434020294)*dim
-        ref[3,4,0,0]=(-0.706321782603)*(1+2.*(dim-1.)/(o+1.))+(-0.876870969492)*dim
-        ref[3,4,0,1]=(-0.571496862855)*(1+2.*(dim-1.)/(o+1.))+(1.29159816312)*dim
-        ref[3,4,1,0]=(-0.102742633631)*(1+2.*(dim-1.)/(o+1.))+(-0.198399341224)*dim
-        ref[3,4,1,1]=(0.799297204627)*(1+2.*(dim-1.)/(o+1.))+(0.107627143578)*dim
-        ref[3,4,2,0]=(-1.31225544496)*(1+2.*(dim-1.)/(o+1.))+(-0.0971924854666)*dim
-        ref[3,4,2,1]=(-0.579455532935)*(1+2.*(dim-1.)/(o+1.))+(-0.328340711373)*dim
-      else:
-        arg[0,0,0,0]=(-0.727570048979)*x[0]**o+(-0.769770353069)*x[0]+(-0.532381054852)*x[1]**o+(0.590589994369)*x[1]+(0.775348726284)*x[2]**o+(-0.840239939796)*x[2]
-        arg[0,0,0,1]=(-0.441856577751)*x[0]**o+(-0.39234308235)*x[0]+(-0.834378647798)*x[1]**o+(0.84269918161)*x[1]+(0.441102591728)*x[2]**o+(0.166331058665)*x[2]
-        arg[0,0,1,0]=(0.391773069521)*x[0]**o+(0.496759920942)*x[0]+(0.555386226902)*x[1]**o+(0.980197783628)*x[1]+(0.549622021652)*x[2]**o+(-0.596179893504)*x[2]
-        arg[0,0,1,1]=(-0.104197387892)*x[0]**o+(-0.64636505375)*x[0]+(0.377612339028)*x[1]**o+(-0.215111619231)*x[1]+(0.637249692625)*x[2]**o+(-0.0998227822351)*x[2]
-        arg[0,0,2,0]=(0.780693043561)*x[0]**o+(0.571405344342)*x[0]+(-0.793680154472)*x[1]**o+(-0.0481469136436)*x[1]+(0.959561051293)*x[2]**o+(0.0756152497582)*x[2]
-        arg[0,0,2,1]=(0.88678762282)*x[0]**o+(0.254753272214)*x[0]+(0.344376798516)*x[1]**o+(-0.908135902735)*x[1]+(-0.3584387726)*x[2]**o+(-0.890225037617)*x[2]
-        arg[0,1,0,0]=(0.680262917473)*x[0]**o+(0.65860357305)*x[0]+(0.859832322473)*x[1]**o+(0.326105580592)*x[1]+(0.132170297876)*x[2]**o+(-0.928606849775)*x[2]
-        arg[0,1,0,1]=(-0.500503822293)*x[0]**o+(-0.456331012174)*x[0]+(0.900478846187)*x[1]**o+(0.350542503874)*x[1]+(0.755849038617)*x[2]**o+(-0.514240007142)*x[2]
-        arg[0,1,1,0]=(0.124404217291)*x[0]**o+(-0.499651000805)*x[0]+(-0.968178694708)*x[1]**o+(0.306780500818)*x[1]+(-0.946470794819)*x[2]**o+(0.919424575523)*x[2]
-        arg[0,1,1,1]=(0.722520017474)*x[0]**o+(-0.718216593718)*x[0]+(0.801196051455)*x[1]**o+(-0.791951278546)*x[1]+(-0.675975417529)*x[2]**o+(0.355069676047)*x[2]
-        arg[0,1,2,0]=(-0.137017428857)*x[0]**o+(-0.760267879487)*x[0]+(0.625869259413)*x[1]**o+(-0.697626713352)*x[1]+(-0.467876751423)*x[2]**o+(0.456475454123)*x[2]
-        arg[0,1,2,1]=(0.646536442797)*x[0]**o+(0.0981671744166)*x[0]+(0.477147756414)*x[1]**o+(-0.23211823966)*x[1]+(-0.553808167147)*x[2]**o+(0.405402676302)*x[2]
-        arg[0,2,0,0]=(-0.0604502966371)*x[0]**o+(0.297995946813)*x[0]+(0.837045433858)*x[1]**o+(-0.270340963575)*x[1]+(-0.58462190484)*x[2]**o+(0.292953993287)*x[2]
-        arg[0,2,0,1]=(-0.463109088268)*x[0]**o+(0.346260157368)*x[0]+(0.0228615151352)*x[1]**o+(0.905507471559)*x[1]+(-0.423777553665)*x[2]**o+(-0.45964535654)*x[2]
-        arg[0,2,1,0]=(-0.50761294542)*x[0]**o+(-0.465260578419)*x[0]+(-0.729953382373)*x[1]**o+(0.903666219263)*x[1]+(-0.756794344711)*x[2]**o+(0.817263008431)*x[2]
-        arg[0,2,1,1]=(-0.551253781393)*x[0]**o+(-0.911481117802)*x[0]+(0.180349330394)*x[1]**o+(0.419118491074)*x[1]+(-0.691917875703)*x[2]**o+(-0.835365504347)*x[2]
-        arg[0,2,2,0]=(0.32567932803)*x[0]**o+(0.413167839883)*x[0]+(0.781320691089)*x[1]**o+(-0.777223093057)*x[1]+(0.297556831029)*x[2]**o+(-0.952676550814)*x[2]
-        arg[0,2,2,1]=(0.226250474873)*x[0]**o+(0.279287242249)*x[0]+(0.421824124143)*x[1]**o+(-0.97664927412)*x[1]+(0.703245736838)*x[2]**o+(-0.629660622476)*x[2]
-        arg[0,3,0,0]=(-0.138403445102)*x[0]**o+(0.0979152923187)*x[0]+(-0.177116218507)*x[1]**o+(0.0100523961708)*x[1]+(-0.634159492232)*x[2]**o+(-0.847618220907)*x[2]
-        arg[0,3,0,1]=(0.612268738957)*x[0]**o+(-0.462682392204)*x[0]+(-0.146623835506)*x[1]**o+(0.699258469487)*x[1]+(0.0139983038691)*x[2]**o+(0.236461011719)*x[2]
-        arg[0,3,1,0]=(-0.0518123102809)*x[0]**o+(0.386822059696)*x[0]+(-0.208858744655)*x[1]**o+(0.971393362011)*x[1]+(-0.171649562077)*x[2]**o+(-0.507479926411)*x[2]
-        arg[0,3,1,1]=(0.0140396270391)*x[0]**o+(-0.837711757872)*x[0]+(-0.00108924459289)*x[1]**o+(-0.724087080496)*x[1]+(-0.793071741694)*x[2]**o+(0.38654936043)*x[2]
-        arg[0,3,2,0]=(-0.897711437057)*x[0]**o+(0.562533782571)*x[0]+(-0.354013039442)*x[1]**o+(-0.473034213198)*x[1]+(0.4598333464)*x[2]**o+(0.467503992754)*x[2]
-        arg[0,3,2,1]=(-0.198441232877)*x[0]**o+(-0.411568849672)*x[0]+(0.0850211273328)*x[1]**o+(-0.333702582633)*x[1]+(0.727888461746)*x[2]**o+(-0.174835541819)*x[2]
-        arg[0,4,0,0]=(-0.114679585752)*x[0]**o+(0.0446596462171)*x[0]+(-0.950604674991)*x[1]**o+(-0.307622186566)*x[1]+(0.956712754366)*x[2]**o+(0.334630480874)*x[2]
-        arg[0,4,0,1]=(0.345475911118)*x[0]**o+(0.834620576123)*x[0]+(0.903176273684)*x[1]**o+(-0.364211856466)*x[1]+(0.910903954488)*x[2]**o+(0.392248545744)*x[2]
-        arg[0,4,1,0]=(-0.593360797686)*x[0]**o+(-0.0199892857836)*x[0]+(0.293839091284)*x[1]**o+(0.580208854742)*x[1]+(0.060499817751)*x[2]**o+(0.907498841261)*x[2]
-        arg[0,4,1,1]=(-0.446192713548)*x[0]**o+(0.29870251614)*x[0]+(0.754231657585)*x[1]**o+(0.321710920549)*x[1]+(0.287978396665)*x[2]**o+(-0.963473165492)*x[2]
-        arg[0,4,2,0]=(0.780174386478)*x[0]**o+(0.603377914483)*x[0]+(-0.841703120145)*x[1]**o+(0.316522795462)*x[1]+(-0.192916583378)*x[2]**o+(-0.734091913995)*x[2]
-        arg[0,4,2,1]=(-0.130567656486)*x[0]**o+(-0.342928842892)*x[0]+(-0.0827376128775)*x[1]**o+(-0.771104057041)*x[1]+(0.733571283734)*x[2]**o+(-0.880531838119)*x[2]
-        arg[1,0,0,0]=(-0.634428121043)*x[0]**o+(0.294135783753)*x[0]+(-0.566305561339)*x[1]**o+(0.0332700472211)*x[1]+(0.128130119463)*x[2]**o+(0.0468678470468)*x[2]
-        arg[1,0,0,1]=(0.82168858107)*x[0]**o+(-0.75544177649)*x[0]+(0.260115562827)*x[1]**o+(-0.149575433725)*x[1]+(-0.780945910032)*x[2]**o+(-0.0539291857071)*x[2]
-        arg[1,0,1,0]=(-0.97885291605)*x[0]**o+(0.777955971883)*x[0]+(0.115355866293)*x[1]**o+(-0.456449594589)*x[1]+(-0.832816352387)*x[2]**o+(-0.418070257158)*x[2]
-        arg[1,0,1,1]=(-0.908396506245)*x[0]**o+(-0.982147653872)*x[0]+(0.138657052347)*x[1]**o+(0.633837624386)*x[1]+(-0.529748303776)*x[2]**o+(-0.950225664343)*x[2]
-        arg[1,0,2,0]=(0.733974435377)*x[0]**o+(-0.758228777635)*x[0]+(0.841368499977)*x[1]**o+(0.871715889444)*x[1]+(0.541055759071)*x[2]**o+(0.669798500731)*x[2]
-        arg[1,0,2,1]=(-0.572994548563)*x[0]**o+(0.806241853906)*x[0]+(0.141217952929)*x[1]**o+(0.832291361477)*x[1]+(0.207737014762)*x[2]**o+(-0.279769695917)*x[2]
-        arg[1,1,0,0]=(-0.394247339923)*x[0]**o+(0.548338039327)*x[0]+(-0.845822483858)*x[1]**o+(-0.941161341738)*x[1]+(-0.244513027249)*x[2]**o+(-0.524790843131)*x[2]
-        arg[1,1,0,1]=(0.509994957918)*x[0]**o+(0.691470630092)*x[0]+(0.249241759795)*x[1]**o+(-0.995293157716)*x[1]+(0.162652088127)*x[2]**o+(0.873578806104)*x[2]
-        arg[1,1,1,0]=(-0.22367137056)*x[0]**o+(-0.896306406631)*x[0]+(0.613214186844)*x[1]**o+(-0.460055562163)*x[1]+(-0.704736634406)*x[2]**o+(-0.517741014186)*x[2]
-        arg[1,1,1,1]=(-0.426072795689)*x[0]**o+(-0.13452184053)*x[0]+(0.908778671123)*x[1]**o+(0.194472828672)*x[1]+(-0.658909495204)*x[2]**o+(-0.234260758459)*x[2]
-        arg[1,1,2,0]=(0.236086562474)*x[0]**o+(0.33312461561)*x[0]+(0.867089643801)*x[1]**o+(-0.720157305369)*x[1]+(0.812845198077)*x[2]**o+(-0.375694713863)*x[2]
-        arg[1,1,2,1]=(-0.561145817489)*x[0]**o+(0.746630137163)*x[0]+(-0.809280840008)*x[1]**o+(-0.690912076356)*x[1]+(0.88933641231)*x[2]**o+(0.246647817564)*x[2]
-        arg[1,2,0,0]=(0.701319152729)*x[0]**o+(-0.309074024603)*x[0]+(0.567988628717)*x[1]**o+(-0.0596939135728)*x[1]+(0.242135294918)*x[2]**o+(-0.101136005445)*x[2]
-        arg[1,2,0,1]=(0.880665674235)*x[0]**o+(-0.833066777852)*x[0]+(-0.0556340786728)*x[1]**o+(0.620095583249)*x[1]+(-0.390556829051)*x[2]**o+(0.793481461864)*x[2]
-        arg[1,2,1,0]=(0.832046852431)*x[0]**o+(0.4276990324)*x[0]+(-0.486292331356)*x[1]**o+(0.990296730852)*x[1]+(-0.381732943927)*x[2]**o+(0.225838720655)*x[2]
-        arg[1,2,1,1]=(-0.971477034333)*x[0]**o+(0.819409035213)*x[0]+(-0.610341797903)*x[1]**o+(0.842186877805)*x[1]+(0.571187503044)*x[2]**o+(-0.150565006374)*x[2]
-        arg[1,2,2,0]=(0.266080624706)*x[0]**o+(0.893377400845)*x[0]+(0.718525426441)*x[1]**o+(-0.847615622286)*x[1]+(0.614914866)*x[2]**o+(0.826503774974)*x[2]
-        arg[1,2,2,1]=(0.998060871997)*x[0]**o+(-0.572523112154)*x[0]+(-0.786785614822)*x[1]**o+(0.556952019953)*x[1]+(0.804849394796)*x[2]**o+(-0.201157281118)*x[2]
-        arg[1,3,0,0]=(-0.322048105751)*x[0]**o+(0.215441634353)*x[0]+(0.203298400258)*x[1]**o+(0.452071048161)*x[1]+(0.0134315902731)*x[2]**o+(0.240098266028)*x[2]
-        arg[1,3,0,1]=(-0.109845136841)*x[0]**o+(0.0479663457074)*x[0]+(0.899394604931)*x[1]**o+(0.853608214151)*x[1]+(-0.27487885579)*x[2]**o+(-0.0236702866567)*x[2]
-        arg[1,3,1,0]=(0.948550474293)*x[0]**o+(0.359077475995)*x[0]+(0.655387467125)*x[1]**o+(-0.0501114084308)*x[1]+(-0.244470769181)*x[2]**o+(0.670276065978)*x[2]
-        arg[1,3,1,1]=(-0.860769147822)*x[0]**o+(-0.738449680804)*x[0]+(0.840959189643)*x[1]**o+(0.229930283198)*x[1]+(-0.521034843253)*x[2]**o+(-0.50213233896)*x[2]
-        arg[1,3,2,0]=(0.29910216992)*x[0]**o+(0.411953562132)*x[0]+(0.777584507308)*x[1]**o+(0.41482951697)*x[1]+(-0.948751119313)*x[2]**o+(-0.526573791564)*x[2]
-        arg[1,3,2,1]=(-0.768167653244)*x[0]**o+(-0.318762199437)*x[0]+(0.7566706966)*x[1]**o+(-0.151347269999)*x[1]+(-0.626690637485)*x[2]**o+(-0.731518248609)*x[2]
-        arg[1,4,0,0]=(0.0147733854143)*x[0]**o+(-0.812988077571)*x[0]+(0.815385483312)*x[1]**o+(0.285326283687)*x[1]+(0.872502797762)*x[2]**o+(-0.748392032843)*x[2]
-        arg[1,4,0,1]=(0.172931930795)*x[0]**o+(0.425088340505)*x[0]+(0.0122969950852)*x[1]**o+(0.556865378995)*x[1]+(0.614686173604)*x[2]**o+(0.966581266651)*x[2]
-        arg[1,4,1,0]=(0.725270959871)*x[0]**o+(-0.672683754253)*x[0]+(0.486696038678)*x[1]**o+(-0.53856418144)*x[1]+(-0.295197744155)*x[2]**o+(0.0610876962829)*x[2]
-        arg[1,4,1,1]=(0.942300770794)*x[0]**o+(0.876440453364)*x[0]+(0.432652207093)*x[1]**o+(-0.562629961162)*x[1]+(0.497526473424)*x[2]**o+(-0.165824324383)*x[2]
-        arg[1,4,2,0]=(-0.668927175078)*x[0]**o+(0.587283304457)*x[0]+(0.588305038304)*x[1]**o+(0.087906366831)*x[1]+(-0.907721198172)*x[2]**o+(-0.506067369924)*x[2]
-        arg[1,4,2,1]=(0.899071894553)*x[0]**o+(0.920678485704)*x[0]+(-0.244107214117)*x[1]**o+(0.196327093214)*x[1]+(-0.538075261013)*x[2]**o+(-0.925646646321)*x[2]
-        arg[2,0,0,0]=(-0.113452114076)*x[0]**o+(0.541178389983)*x[0]+(0.501083424074)*x[1]**o+(-0.234654083639)*x[1]+(-0.435569149263)*x[2]**o+(0.671517947867)*x[2]
-        arg[2,0,0,1]=(-0.00139653535956)*x[0]**o+(-0.93731587459)*x[0]+(-0.387786776826)*x[1]**o+(0.361445822788)*x[1]+(-0.0958490804452)*x[2]**o+(0.22475163005)*x[2]
-        arg[2,0,1,0]=(0.100832420019)*x[0]**o+(-0.957577198313)*x[0]+(0.244479124631)*x[1]**o+(-0.589295650233)*x[1]+(-0.11020792463)*x[2]**o+(0.969023424875)*x[2]
-        arg[2,0,1,1]=(-0.82757398282)*x[0]**o+(0.665274113482)*x[0]+(0.219624146627)*x[1]**o+(0.604687589384)*x[1]+(0.539774513376)*x[2]**o+(0.676136495778)*x[2]
-        arg[2,0,2,0]=(-0.869539421193)*x[0]**o+(0.449645390105)*x[0]+(-0.216356671763)*x[1]**o+(-0.191616800811)*x[1]+(-0.324126591392)*x[2]**o+(0.726527544226)*x[2]
-        arg[2,0,2,1]=(-0.522340761977)*x[0]**o+(-0.253136332372)*x[0]+(-0.993693358789)*x[1]**o+(0.689338979208)*x[1]+(-0.73030598892)*x[2]**o+(0.604868622965)*x[2]
-        arg[2,1,0,0]=(-0.87285436276)*x[0]**o+(-0.665917385941)*x[0]+(0.105570880359)*x[1]**o+(0.773780432278)*x[1]+(-0.0932677950401)*x[2]**o+(0.55563257373)*x[2]
-        arg[2,1,0,1]=(-0.717823895492)*x[0]**o+(-0.843992380543)*x[0]+(0.348730031558)*x[1]**o+(-0.0641727895105)*x[1]+(-0.575332519937)*x[2]**o+(0.566731137573)*x[2]
-        arg[2,1,1,0]=(-0.749216309273)*x[0]**o+(0.945232679736)*x[0]+(-0.984694983452)*x[1]**o+(-0.697422850579)*x[1]+(0.573407778839)*x[2]**o+(0.654548962131)*x[2]
-        arg[2,1,1,1]=(-0.951637762959)*x[0]**o+(-0.0299724748286)*x[0]+(-0.784527116834)*x[1]**o+(0.490138786409)*x[1]+(0.945743565011)*x[2]**o+(0.158024494836)*x[2]
-        arg[2,1,2,0]=(0.80439224967)*x[0]**o+(0.889509225531)*x[0]+(-0.178335319647)*x[1]**o+(-0.365669987413)*x[1]+(-0.170055755127)*x[2]**o+(0.258843711555)*x[2]
-        arg[2,1,2,1]=(0.520706901588)*x[0]**o+(0.897178241272)*x[0]+(-0.128495163664)*x[1]**o+(-0.404742110163)*x[1]+(0.140333496135)*x[2]**o+(0.31429703244)*x[2]
-        arg[2,2,0,0]=(-0.933201442136)*x[0]**o+(0.0083650170184)*x[0]+(-0.281807642508)*x[1]**o+(-0.09193002721)*x[1]+(-0.422582781227)*x[2]**o+(0.358915935551)*x[2]
-        arg[2,2,0,1]=(-0.09712053324)*x[0]**o+(-0.0752448353447)*x[0]+(0.41291697894)*x[1]**o+(0.593823615119)*x[1]+(0.954183095989)*x[2]**o+(0.479576723309)*x[2]
-        arg[2,2,1,0]=(-0.48592273499)*x[0]**o+(-0.555807193072)*x[0]+(0.842926147107)*x[1]**o+(-0.0760474608316)*x[1]+(0.864590424311)*x[2]**o+(-0.854721691042)*x[2]
-        arg[2,2,1,1]=(0.238261310086)*x[0]**o+(-0.506114025767)*x[0]+(-0.534154656267)*x[1]**o+(-0.282262066272)*x[1]+(-0.241950678835)*x[2]**o+(-0.596913007205)*x[2]
-        arg[2,2,2,0]=(0.35002425052)*x[0]**o+(-0.724235915518)*x[0]+(-0.443311896206)*x[1]**o+(0.0183169190559)*x[1]+(-0.180995873436)*x[2]**o+(0.949105760518)*x[2]
-        arg[2,2,2,1]=(-0.524596480672)*x[0]**o+(-0.72511087285)*x[0]+(-0.793159588655)*x[1]**o+(0.197579071177)*x[1]+(0.214510478855)*x[2]**o+(0.592011219443)*x[2]
-        arg[2,3,0,0]=(-0.777144207151)*x[0]**o+(0.821815068413)*x[0]+(0.828183715461)*x[1]**o+(-0.77742744879)*x[1]+(0.520088528639)*x[2]**o+(0.564796500907)*x[2]
-        arg[2,3,0,1]=(-0.444252706506)*x[0]**o+(-0.999658246414)*x[0]+(0.458490846376)*x[1]**o+(0.206371738627)*x[1]+(-0.5943830165)*x[2]**o+(0.125954475804)*x[2]
-        arg[2,3,1,0]=(-0.499555379078)*x[0]**o+(0.667767779032)*x[0]+(-0.169053599596)*x[1]**o+(0.587608309525)*x[1]+(-0.99317016838)*x[2]**o+(-0.580232194372)*x[2]
-        arg[2,3,1,1]=(0.881736170108)*x[0]**o+(-0.0221128885544)*x[0]+(-0.239202356219)*x[1]**o+(-0.825250840397)*x[1]+(-0.34138233902)*x[2]**o+(-0.900437209752)*x[2]
-        arg[2,3,2,0]=(-0.810415345283)*x[0]**o+(0.671639285402)*x[0]+(0.0577696593549)*x[1]**o+(0.12466039802)*x[1]+(-0.164952472389)*x[2]**o+(-0.881356759483)*x[2]
-        arg[2,3,2,1]=(0.641411687742)*x[0]**o+(0.939465110042)*x[0]+(0.182541049996)*x[1]**o+(-0.502132165421)*x[1]+(-0.914212670088)*x[2]**o+(0.361356243622)*x[2]
-        arg[2,4,0,0]=(0.696033328872)*x[0]**o+(0.854329989895)*x[0]+(0.66092830442)*x[1]**o+(-0.165623528752)*x[1]+(0.587322879532)*x[2]**o+(-0.441145527759)*x[2]
-        arg[2,4,0,1]=(0.885589185979)*x[0]**o+(0.170856006811)*x[0]+(-0.500114387063)*x[1]**o+(-0.772574748562)*x[1]+(0.599300325869)*x[2]**o+(0.0950082175327)*x[2]
-        arg[2,4,1,0]=(0.877739402691)*x[0]**o+(0.494715865857)*x[0]+(-0.4548916845)*x[1]**o+(-0.108381552398)*x[1]+(-0.620522177203)*x[2]**o+(-0.375546939131)*x[2]
-        arg[2,4,1,1]=(-0.108044365878)*x[0]**o+(-0.592058059304)*x[0]+(-0.64481990676)*x[1]**o+(-0.903674017194)*x[1]+(0.0964052945913)*x[2]**o+(0.357819426568)*x[2]
-        arg[2,4,2,0]=(-0.686157836559)*x[0]**o+(0.585514351597)*x[0]+(-0.5623443108)*x[1]**o+(-0.636059380122)*x[1]+(0.469863235081)*x[2]**o+(0.374567303622)*x[2]
-        arg[2,4,2,1]=(0.214800008136)*x[0]**o+(0.0680448664819)*x[0]+(0.722930302776)*x[1]**o+(0.107573165145)*x[1]+(0.0027804595356)*x[2]**o+(0.725566605544)*x[2]
-        arg[3,0,0,0]=(-0.273256791086)*x[0]**o+(0.801129507153)*x[0]+(-0.840227644476)*x[1]**o+(-0.31594258736)*x[1]+(-0.140806177065)*x[2]**o+(-0.0958103115672)*x[2]
-        arg[3,0,0,1]=(0.588534583503)*x[0]**o+(0.242235627811)*x[0]+(-0.541539488722)*x[1]**o+(0.624385574868)*x[1]+(-0.0641371754789)*x[2]**o+(-0.635676751281)*x[2]
-        arg[3,0,1,0]=(0.81967100218)*x[0]**o+(0.671597165436)*x[0]+(0.160179001916)*x[1]**o+(-0.226714136475)*x[1]+(-0.523709112534)*x[2]**o+(0.932797007296)*x[2]
-        arg[3,0,1,1]=(0.707793115256)*x[0]**o+(-0.0995173271712)*x[0]+(-0.594597614398)*x[1]**o+(-0.72096550461)*x[1]+(-0.373631371949)*x[2]**o+(-0.282151921803)*x[2]
-        arg[3,0,2,0]=(0.873307297971)*x[0]**o+(0.0950091191819)*x[0]+(-0.534108539131)*x[1]**o+(0.567381193719)*x[1]+(-0.276691140405)*x[2]**o+(0.84882104254)*x[2]
-        arg[3,0,2,1]=(-0.895148878411)*x[0]**o+(-0.880973451462)*x[0]+(0.105602819158)*x[1]**o+(-0.836475687487)*x[1]+(-0.18380164164)*x[2]**o+(-0.391643939001)*x[2]
-        arg[3,1,0,0]=(-0.144070349397)*x[0]**o+(-0.247578520564)*x[0]+(0.512469248899)*x[1]**o+(0.0369808259097)*x[1]+(0.67517925106)*x[2]**o+(-0.306122403522)*x[2]
-        arg[3,1,0,1]=(0.389023591419)*x[0]**o+(0.0335324297663)*x[0]+(0.166380432563)*x[1]**o+(0.415133512101)*x[1]+(-0.956055398028)*x[2]**o+(-0.069254560597)*x[2]
-        arg[3,1,1,0]=(-0.253194755795)*x[0]**o+(-0.432240637655)*x[0]+(0.886730830871)*x[1]**o+(0.94685399231)*x[1]+(-0.0193581886643)*x[2]**o+(-0.828124732153)*x[2]
-        arg[3,1,1,1]=(0.948739050057)*x[0]**o+(-0.200402018913)*x[0]+(0.062573402994)*x[1]**o+(-0.408727698463)*x[1]+(-0.0334411087309)*x[2]**o+(-0.676147119957)*x[2]
-        arg[3,1,2,0]=(0.249237167322)*x[0]**o+(-0.621387879739)*x[0]+(-0.745335388751)*x[1]**o+(-0.183173004074)*x[1]+(0.56632553768)*x[2]**o+(-0.519909176525)*x[2]
-        arg[3,1,2,1]=(-0.660822495815)*x[0]**o+(0.0459275869317)*x[0]+(-0.0853936912232)*x[1]**o+(-0.895502076207)*x[1]+(0.150013238845)*x[2]**o+(0.201527905115)*x[2]
-        arg[3,2,0,0]=(0.0846880899978)*x[0]**o+(-0.450721252185)*x[0]+(0.0100224498309)*x[1]**o+(-0.729399043167)*x[1]+(0.249073157161)*x[2]**o+(-0.313056982897)*x[2]
-        arg[3,2,0,1]=(0.349123663394)*x[0]**o+(-0.0439266646004)*x[0]+(0.201749457716)*x[1]**o+(-0.29961557135)*x[1]+(0.247657591065)*x[2]**o+(0.702448030656)*x[2]
-        arg[3,2,1,0]=(-0.67551758529)*x[0]**o+(-0.856271486186)*x[0]+(-0.337698270178)*x[1]**o+(-0.855526501932)*x[1]+(0.204628923051)*x[2]**o+(0.0425229547861)*x[2]
-        arg[3,2,1,1]=(0.913895958603)*x[0]**o+(0.33488814727)*x[0]+(0.725768429772)*x[1]**o+(0.31487179035)*x[1]+(-0.926895768372)*x[2]**o+(-0.303623128744)*x[2]
-        arg[3,2,2,0]=(0.695497510732)*x[0]**o+(-0.71819800795)*x[0]+(0.0949892877746)*x[1]**o+(-0.371952684199)*x[1]+(-0.712679288901)*x[2]**o+(-0.839032166941)*x[2]
-        arg[3,2,2,1]=(0.847915632309)*x[0]**o+(0.489320767225)*x[0]+(0.884694888545)*x[1]**o+(-0.836734066966)*x[1]+(-0.782643394677)*x[2]**o+(0.998012000062)*x[2]
-        arg[3,3,0,0]=(0.400343531732)*x[0]**o+(-0.977399566427)*x[0]+(-0.0491815761683)*x[1]**o+(0.820343030844)*x[1]+(0.145276965371)*x[2]**o+(0.106181410329)*x[2]
-        arg[3,3,0,1]=(0.39509119571)*x[0]**o+(-0.532152199068)*x[0]+(0.0961163031465)*x[1]**o+(-0.845734786516)*x[1]+(0.0685207262665)*x[2]**o+(0.10725771579)*x[2]
-        arg[3,3,1,0]=(-0.326475146957)*x[0]**o+(0.0491193078417)*x[0]+(-0.193405294452)*x[1]**o+(0.283579426128)*x[1]+(0.885442239373)*x[2]**o+(-0.838544460442)*x[2]
-        arg[3,3,1,1]=(-0.502234549601)*x[0]**o+(-0.764617462736)*x[0]+(0.52701849705)*x[1]**o+(-0.423245302614)*x[1]+(0.728096320995)*x[2]**o+(0.143356081954)*x[2]
-        arg[3,3,2,0]=(0.924562662058)*x[0]**o+(-0.0120799887424)*x[0]+(-0.342886608544)*x[1]**o+(0.609435784717)*x[1]+(0.392296911228)*x[2]**o+(0.572866548262)*x[2]
-        arg[3,3,2,1]=(0.661267105524)*x[0]**o+(-0.71847134372)*x[0]+(-0.913866381825)*x[1]**o+(-0.502556458508)*x[1]+(0.201214639904)*x[2]**o+(-0.431939125167)*x[2]
-        arg[3,4,0,0]=(0.391785002874)*x[0]**o+(0.424885787931)*x[0]+(-0.377558346944)*x[1]**o+(-0.556924666311)*x[1]+(0.511852194353)*x[2]**o+(0.514261734074)*x[2]
-        arg[3,4,0,1]=(-0.269148156354)*x[0]**o+(0.692033978804)*x[0]+(-0.390604590454)*x[1]**o+(-0.551681907742)*x[1]+(0.0613720420346)*x[2]**o+(-0.508841982991)*x[2]
-        arg[3,4,1,0]=(0.593170387694)*x[0]**o+(-0.00676980821753)*x[0]+(0.788564472913)*x[1]**o+(0.823094059865)*x[1]+(0.52895485971)*x[2]**o+(0.88849618397)*x[2]
-        arg[3,4,1,1]=(0.772185283881)*x[0]**o+(0.759014894154)*x[0]+(-0.142739578724)*x[1]**o+(-0.141899255898)*x[1]+(0.479086662114)*x[2]**o+(0.68993908918)*x[2]
-        arg[3,4,2,0]=(0.998097253401)*x[0]**o+(0.621254339576)*x[0]+(-0.692540865624)*x[1]**o+(0.716545091382)*x[1]+(0.478209703594)*x[2]**o+(0.259063088226)*x[2]
-        arg[3,4,2,1]=(-0.321962318028)*x[0]**o+(0.0377531939042)*x[0]+(-0.362041758315)*x[1]**o+(0.632474956936)*x[1]+(0.133972776903)*x[2]**o+(-0.341803258375)*x[2]
-        ref[0,0,0,0]=(-0.484602377547)*(1+2.*(dim-1.)/(o+1.))+(-1.0194202985)*dim
-        ref[0,0,0,1]=(-0.835132633821)*(1+2.*(dim-1.)/(o+1.))+(0.616687157924)*dim
-        ref[0,0,1,0]=(1.49678131808)*(1+2.*(dim-1.)/(o+1.))+(0.880777811066)*dim
-        ref[0,0,1,1]=(0.910664643761)*(1+2.*(dim-1.)/(o+1.))+(-0.961299455217)*dim
-        ref[0,0,2,0]=(0.946573940383)*(1+2.*(dim-1.)/(o+1.))+(0.598873680457)*dim
-        ref[0,0,2,1]=(0.872725648736)*(1+2.*(dim-1.)/(o+1.))+(-1.54360766814)*dim
-        ref[0,1,0,0]=(1.67226553782)*(1+2.*(dim-1.)/(o+1.))+(0.0561023038674)*dim
-        ref[0,1,0,1]=(1.15582406251)*(1+2.*(dim-1.)/(o+1.))+(-0.620028515442)*dim
-        ref[0,1,1,0]=(-1.79024527224)*(1+2.*(dim-1.)/(o+1.))+(0.726554075535)*dim
-        ref[0,1,1,1]=(0.8477406514)*(1+2.*(dim-1.)/(o+1.))+(-1.15509819622)*dim
-        ref[0,1,2,0]=(0.0209750791326)*(1+2.*(dim-1.)/(o+1.))+(-1.00141913872)*dim
-        ref[0,1,2,1]=(0.569876032064)*(1+2.*(dim-1.)/(o+1.))+(0.271451611059)*dim
-        ref[0,2,0,0]=(0.19197323238)*(1+2.*(dim-1.)/(o+1.))+(0.320608976525)*dim
-        ref[0,2,0,1]=(-0.864025126798)*(1+2.*(dim-1.)/(o+1.))+(0.792122272387)*dim
-        ref[0,2,1,0]=(-1.9943606725)*(1+2.*(dim-1.)/(o+1.))+(1.25566864927)*dim
-        ref[0,2,1,1]=(-1.0628223267)*(1+2.*(dim-1.)/(o+1.))+(-1.32772813107)*dim
-        ref[0,2,2,0]=(1.40455685015)*(1+2.*(dim-1.)/(o+1.))+(-1.31673180399)*dim
-        ref[0,2,2,1]=(1.35132033585)*(1+2.*(dim-1.)/(o+1.))+(-1.32702265435)*dim
-        ref[0,3,0,0]=(-0.949679155841)*(1+2.*(dim-1.)/(o+1.))+(-0.739650532418)*dim
-        ref[0,3,0,1]=(0.47964320732)*(1+2.*(dim-1.)/(o+1.))+(0.473037089003)*dim
-        ref[0,3,1,0]=(-0.432320617013)*(1+2.*(dim-1.)/(o+1.))+(0.850735495297)*dim
-        ref[0,3,1,1]=(-0.780121359247)*(1+2.*(dim-1.)/(o+1.))+(-1.17524947794)*dim
-        ref[0,3,2,0]=(-0.791891130098)*(1+2.*(dim-1.)/(o+1.))+(0.557003562128)*dim
-        ref[0,3,2,1]=(0.614468356202)*(1+2.*(dim-1.)/(o+1.))+(-0.920106974125)*dim
-        ref[0,4,0,0]=(-0.108571506377)*(1+2.*(dim-1.)/(o+1.))+(0.0716679405256)*dim
-        ref[0,4,0,1]=(2.15955613929)*(1+2.*(dim-1.)/(o+1.))+(0.862657265402)*dim
-        ref[0,4,1,0]=(-0.239021888652)*(1+2.*(dim-1.)/(o+1.))+(1.46771841022)*dim
-        ref[0,4,1,1]=(0.596017340702)*(1+2.*(dim-1.)/(o+1.))+(-0.343059728803)*dim
-        ref[0,4,2,0]=(-0.254445317045)*(1+2.*(dim-1.)/(o+1.))+(0.185808795951)*dim
-        ref[0,4,2,1]=(0.520266014371)*(1+2.*(dim-1.)/(o+1.))+(-1.99456473805)*dim
-        ref[1,0,0,0]=(-1.07260356292)*(1+2.*(dim-1.)/(o+1.))+(0.374273678021)*dim
-        ref[1,0,0,1]=(0.300858233864)*(1+2.*(dim-1.)/(o+1.))+(-0.958946395922)*dim
-        ref[1,0,1,0]=(-1.69631340214)*(1+2.*(dim-1.)/(o+1.))+(-0.096563879864)*dim
-        ref[1,0,1,1]=(-1.29948775767)*(1+2.*(dim-1.)/(o+1.))+(-1.29853569383)*dim
-        ref[1,0,2,0]=(2.11639869443)*(1+2.*(dim-1.)/(o+1.))+(0.783285612541)*dim
-        ref[1,0,2,1]=(-0.224039580872)*(1+2.*(dim-1.)/(o+1.))+(1.35876351947)*dim
-        ref[1,1,0,0]=(-1.48458285103)*(1+2.*(dim-1.)/(o+1.))+(-0.917614145542)*dim
-        ref[1,1,0,1]=(0.92188880584)*(1+2.*(dim-1.)/(o+1.))+(0.569756278479)*dim
-        ref[1,1,1,0]=(-0.315193818122)*(1+2.*(dim-1.)/(o+1.))+(-1.87410298298)*dim
-        ref[1,1,1,1]=(-0.17620361977)*(1+2.*(dim-1.)/(o+1.))+(-0.174309770317)*dim
-        ref[1,1,2,0]=(1.91602140435)*(1+2.*(dim-1.)/(o+1.))+(-0.762727403622)*dim
-        ref[1,1,2,1]=(-0.481090245186)*(1+2.*(dim-1.)/(o+1.))+(0.302365878371)*dim
-        ref[1,2,0,0]=(1.51144307636)*(1+2.*(dim-1.)/(o+1.))+(-0.469903943621)*dim
-        ref[1,2,0,1]=(0.434474766511)*(1+2.*(dim-1.)/(o+1.))+(0.580510267262)*dim
-        ref[1,2,1,0]=(-0.0359784228521)*(1+2.*(dim-1.)/(o+1.))+(1.64383448391)*dim
-        ref[1,2,1,1]=(-1.01063132919)*(1+2.*(dim-1.)/(o+1.))+(1.51103090664)*dim
-        ref[1,2,2,0]=(1.59952091715)*(1+2.*(dim-1.)/(o+1.))+(0.872265553532)*dim
-        ref[1,2,2,1]=(1.01612465197)*(1+2.*(dim-1.)/(o+1.))+(-0.216728373319)*dim
-        ref[1,3,0,0]=(-0.10531811522)*(1+2.*(dim-1.)/(o+1.))+(0.907610948542)*dim
-        ref[1,3,0,1]=(0.5146706123)*(1+2.*(dim-1.)/(o+1.))+(0.877904273202)*dim
-        ref[1,3,1,0]=(1.35946717224)*(1+2.*(dim-1.)/(o+1.))+(0.979242133542)*dim
-        ref[1,3,1,1]=(-0.540844801432)*(1+2.*(dim-1.)/(o+1.))+(-1.01065173657)*dim
-        ref[1,3,2,0]=(0.127935557915)*(1+2.*(dim-1.)/(o+1.))+(0.300209287538)*dim
-        ref[1,3,2,1]=(-0.63818759413)*(1+2.*(dim-1.)/(o+1.))+(-1.20162771805)*dim
-        ref[1,4,0,0]=(1.70266166649)*(1+2.*(dim-1.)/(o+1.))+(-1.27605382673)*dim
-        ref[1,4,0,1]=(0.799915099484)*(1+2.*(dim-1.)/(o+1.))+(1.94853498615)*dim
-        ref[1,4,1,0]=(0.916769254394)*(1+2.*(dim-1.)/(o+1.))+(-1.15016023941)*dim
-        ref[1,4,1,1]=(1.87247945131)*(1+2.*(dim-1.)/(o+1.))+(0.147986167818)*dim
-        ref[1,4,2,0]=(-0.988343334946)*(1+2.*(dim-1.)/(o+1.))+(0.169122301365)*dim
-        ref[1,4,2,1]=(0.116889419423)*(1+2.*(dim-1.)/(o+1.))+(0.191358932597)*dim
-        ref[2,0,0,0]=(-0.0479378392653)*(1+2.*(dim-1.)/(o+1.))+(0.978042254211)*dim
-        ref[2,0,0,1]=(-0.485032392631)*(1+2.*(dim-1.)/(o+1.))+(-0.351118421752)*dim
-        ref[2,0,1,0]=(0.23510362002)*(1+2.*(dim-1.)/(o+1.))+(-0.577849423671)*dim
-        ref[2,0,1,1]=(-0.068175322817)*(1+2.*(dim-1.)/(o+1.))+(1.94609819864)*dim
-        ref[2,0,2,0]=(-1.41002268435)*(1+2.*(dim-1.)/(o+1.))+(0.98455613352)*dim
-        ref[2,0,2,1]=(-2.24634010969)*(1+2.*(dim-1.)/(o+1.))+(1.0410712698)*dim
-        ref[2,1,0,0]=(-0.860551277441)*(1+2.*(dim-1.)/(o+1.))+(0.663495620068)*dim
-        ref[2,1,0,1]=(-0.944426383871)*(1+2.*(dim-1.)/(o+1.))+(-0.341434032481)*dim
-        ref[2,1,1,0]=(-1.16050351389)*(1+2.*(dim-1.)/(o+1.))+(0.902358791288)*dim
-        ref[2,1,1,1]=(-0.790421314781)*(1+2.*(dim-1.)/(o+1.))+(0.618190806416)*dim
-        ref[2,1,2,0]=(0.456001174897)*(1+2.*(dim-1.)/(o+1.))+(0.782682949672)*dim
-        ref[2,1,2,1]=(0.532545234059)*(1+2.*(dim-1.)/(o+1.))+(0.806733163549)*dim
-        ref[2,2,0,0]=(-1.63759186587)*(1+2.*(dim-1.)/(o+1.))+(0.275350925359)*dim
-        ref[2,2,0,1]=(1.26997954169)*(1+2.*(dim-1.)/(o+1.))+(0.998155503083)*dim
-        ref[2,2,1,0]=(1.22159383643)*(1+2.*(dim-1.)/(o+1.))+(-1.48657634495)*dim
-        ref[2,2,1,1]=(-0.537844025016)*(1+2.*(dim-1.)/(o+1.))+(-1.38528909924)*dim
-        ref[2,2,2,0]=(-0.274283519122)*(1+2.*(dim-1.)/(o+1.))+(0.243186764056)*dim
-        ref[2,2,2,1]=(-1.10324559047)*(1+2.*(dim-1.)/(o+1.))+(0.0644794177698)*dim
-        ref[2,3,0,0]=(0.571128036949)*(1+2.*(dim-1.)/(o+1.))+(0.60918412053)*dim
-        ref[2,3,0,1]=(-0.580144876629)*(1+2.*(dim-1.)/(o+1.))+(-0.667332031982)*dim
-        ref[2,3,1,0]=(-1.66177914705)*(1+2.*(dim-1.)/(o+1.))+(0.675143894185)*dim
-        ref[2,3,1,1]=(0.301151474869)*(1+2.*(dim-1.)/(o+1.))+(-1.7478009387)*dim
-        ref[2,3,2,0]=(-0.917598158317)*(1+2.*(dim-1.)/(o+1.))+(-0.0850570760611)*dim
-        ref[2,3,2,1]=(-0.09025993235)*(1+2.*(dim-1.)/(o+1.))+(0.798689188243)*dim
-        ref[2,4,0,0]=(1.94428451282)*(1+2.*(dim-1.)/(o+1.))+(0.247560933384)*dim
-        ref[2,4,0,1]=(0.984775124785)*(1+2.*(dim-1.)/(o+1.))+(-0.506710524219)*dim
-        ref[2,4,1,0]=(-0.197674459012)*(1+2.*(dim-1.)/(o+1.))+(0.0107873743289)*dim
-        ref[2,4,1,1]=(-0.656458978046)*(1+2.*(dim-1.)/(o+1.))+(-1.13791264993)*dim
-        ref[2,4,2,0]=(-0.778638912279)*(1+2.*(dim-1.)/(o+1.))+(0.324022275097)*dim
-        ref[2,4,2,1]=(0.940510770447)*(1+2.*(dim-1.)/(o+1.))+(0.901184637171)*dim
-        ref[3,0,0,0]=(-1.25429061263)*(1+2.*(dim-1.)/(o+1.))+(0.389376608226)*dim
-        ref[3,0,0,1]=(-0.0171420806973)*(1+2.*(dim-1.)/(o+1.))+(0.230944451397)*dim
-        ref[3,0,1,0]=(0.456140891562)*(1+2.*(dim-1.)/(o+1.))+(1.37768003626)*dim
-        ref[3,0,1,1]=(-0.260435871091)*(1+2.*(dim-1.)/(o+1.))+(-1.10263475358)*dim
-        ref[3,0,2,0]=(0.0625076184349)*(1+2.*(dim-1.)/(o+1.))+(1.51121135544)*dim
-        ref[3,0,2,1]=(-0.973347700893)*(1+2.*(dim-1.)/(o+1.))+(-2.10909307795)*dim
-        ref[3,1,0,0]=(1.04357815056)*(1+2.*(dim-1.)/(o+1.))+(-0.516720098176)*dim
-        ref[3,1,0,1]=(-0.400651374046)*(1+2.*(dim-1.)/(o+1.))+(0.37941138127)*dim
-        ref[3,1,1,0]=(0.614177886412)*(1+2.*(dim-1.)/(o+1.))+(-0.313511377498)*dim
-        ref[3,1,1,1]=(0.97787134432)*(1+2.*(dim-1.)/(o+1.))+(-1.28527683733)*dim
-        ref[3,1,2,0]=(0.0702273162506)*(1+2.*(dim-1.)/(o+1.))+(-1.32447006034)*dim
-        ref[3,1,2,1]=(-0.596202948193)*(1+2.*(dim-1.)/(o+1.))+(-0.648046584161)*dim
-        ref[3,2,0,0]=(0.34378369699)*(1+2.*(dim-1.)/(o+1.))+(-1.49317727825)*dim
-        ref[3,2,0,1]=(0.798530712175)*(1+2.*(dim-1.)/(o+1.))+(0.358905794706)*dim
-        ref[3,2,1,0]=(-0.808586932417)*(1+2.*(dim-1.)/(o+1.))+(-1.66927503333)*dim
-        ref[3,2,1,1]=(0.712768620002)*(1+2.*(dim-1.)/(o+1.))+(0.346136808876)*dim
-        ref[3,2,2,0]=(0.0778075096053)*(1+2.*(dim-1.)/(o+1.))+(-1.92918285909)*dim
-        ref[3,2,2,1]=(0.949967126178)*(1+2.*(dim-1.)/(o+1.))+(0.650598700321)*dim
-        ref[3,3,0,0]=(0.496438920934)*(1+2.*(dim-1.)/(o+1.))+(-0.0508751252546)*dim
-        ref[3,3,0,1]=(0.559728225123)*(1+2.*(dim-1.)/(o+1.))+(-1.27062926979)*dim
-        ref[3,3,1,0]=(0.365561797964)*(1+2.*(dim-1.)/(o+1.))+(-0.505845726473)*dim
-        ref[3,3,1,1]=(0.752880268444)*(1+2.*(dim-1.)/(o+1.))+(-1.0445066834)*dim
-        ref[3,3,2,0]=(0.973972964742)*(1+2.*(dim-1.)/(o+1.))+(1.17022234424)*dim
-        ref[3,3,2,1]=(-0.0513846363967)*(1+2.*(dim-1.)/(o+1.))+(-1.65296692739)*dim
-        ref[3,4,0,0]=(0.526078850284)*(1+2.*(dim-1.)/(o+1.))+(0.382222855695)*dim
-        ref[3,4,0,1]=(-0.598380704773)*(1+2.*(dim-1.)/(o+1.))+(-0.368489911929)*dim
-        ref[3,4,1,0]=(1.91068972032)*(1+2.*(dim-1.)/(o+1.))+(1.70482043562)*dim
-        ref[3,4,1,1]=(1.10853236727)*(1+2.*(dim-1.)/(o+1.))+(1.30705472744)*dim
-        ref[3,4,2,0]=(0.78376609137)*(1+2.*(dim-1.)/(o+1.))+(1.59686251918)*dim
-        ref[3,4,2,1]=(-0.550031299439)*(1+2.*(dim-1.)/(o+1.))+(0.328424892465)*dim
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the Function
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.260967575068)*x[0]**o+(-0.456559015376)*x[0]+(0.663023090785)*x[1]**o+(-0.000383723402374)*x[1]
-        ref[0]=o*(0.260967575068)*x_ref[0]**(o-1)+(-0.456559015376)
-        ref[1]=o*(0.663023090785)*x_ref[1]**(o-1)+(-0.000383723402374)
-      else:
-        arg=(-0.679453642968)*x[0]**o+(-0.836558889087)*x[0]+(0.938200435255)*x[1]**o+(-0.368159735907)*x[1]+(-0.0546850112561)*x[2]**o+(0.931986983035)*x[2]
-        ref[0]=o*(-0.679453642968)*x_ref[0]**(o-1)+(-0.836558889087)
-        ref[1]=o*(0.938200435255)*x_ref[1]**(o-1)+(-0.368159735907)
-        ref[2]=o*(-0.0546850112561)*x_ref[2]**(o-1)+(0.931986983035)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the Function
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.221278607378)*x[0]**o+(-0.25051444588)*x[0]+(0.752161895582)*x[1]**o+(0.662434618125)*x[1]
-        arg[1]=(0.984829669888)*x[0]**o+(0.00500258390598)*x[0]+(-0.292523259369)*x[1]**o+(-0.238277884466)*x[1]
-        ref[0,0]=o*(0.221278607378)*x_ref[0]**(o-1)+(-0.25051444588)
-        ref[0,1]=o*(0.752161895582)*x_ref[1]**(o-1)+(0.662434618125)
-        ref[1,0]=o*(0.984829669888)*x_ref[0]**(o-1)+(0.00500258390598)
-        ref[1,1]=o*(-0.292523259369)*x_ref[1]**(o-1)+(-0.238277884466)
-      else:
-        arg[0]=(0.815886350601)*x[0]**o+(-0.41721938077)*x[0]+(0.478358181839)*x[1]**o+(-0.458860964588)*x[1]+(0.575706872631)*x[2]**o+(-0.965426161177)*x[2]
-        arg[1]=(-0.159203003073)*x[0]**o+(-0.985356409774)*x[0]+(0.504125935966)*x[1]**o+(0.703505637664)*x[1]+(-0.480016288837)*x[2]**o+(0.544400209204)*x[2]
-        ref[0,0]=o*(0.815886350601)*x_ref[0]**(o-1)+(-0.41721938077)
-        ref[0,1]=o*(0.478358181839)*x_ref[1]**(o-1)+(-0.458860964588)
-        ref[0,2]=o*(0.575706872631)*x_ref[2]**(o-1)+(-0.965426161177)
-        ref[1,0]=o*(-0.159203003073)*x_ref[0]**(o-1)+(-0.985356409774)
-        ref[1,1]=o*(0.504125935966)*x_ref[1]**(o-1)+(0.703505637664)
-        ref[1,2]=o*(-0.480016288837)*x_ref[2]**(o-1)+(0.544400209204)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the Function
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.722004066753)*x[0]**o+(-0.911439550186)*x[0]+(0.0793361579222)*x[1]**o+(0.958526722957)*x[1]
-        arg[0,1]=(-0.0237328054252)*x[0]**o+(0.832621528642)*x[0]+(0.168484408262)*x[1]**o+(-0.181293214021)*x[1]
-        arg[0,2]=(0.0284992392733)*x[0]**o+(0.884411090784)*x[0]+(-0.615596355135)*x[1]**o+(-0.564819619851)*x[1]
-        arg[0,3]=(0.37408647134)*x[0]**o+(-0.177901551674)*x[0]+(-0.466165048356)*x[1]**o+(-0.278511961588)*x[1]
-        arg[0,4]=(-0.24695435531)*x[0]**o+(-0.624082916034)*x[0]+(-0.343849543401)*x[1]**o+(0.661610450445)*x[1]
-        arg[1,0]=(-0.176271330569)*x[0]**o+(-0.661612282712)*x[0]+(-0.937163166613)*x[1]**o+(0.376473179587)*x[1]
-        arg[1,1]=(0.964111839461)*x[0]**o+(0.576837069403)*x[0]+(-0.718562476684)*x[1]**o+(0.154883495525)*x[1]
-        arg[1,2]=(-0.771556809734)*x[0]**o+(0.720054023732)*x[0]+(-0.390732462938)*x[1]**o+(-0.484359019049)*x[1]
-        arg[1,3]=(0.565910084656)*x[0]**o+(0.69105192657)*x[0]+(-0.449408955892)*x[1]**o+(-0.789780518242)*x[1]
-        arg[1,4]=(0.602485034177)*x[0]**o+(-0.345139282323)*x[0]+(-0.951334152921)*x[1]**o+(-0.478700081579)*x[1]
-        arg[2,0]=(0.00114729937901)*x[0]**o+(0.295356090995)*x[0]+(0.982261544035)*x[1]**o+(0.357076141518)*x[1]
-        arg[2,1]=(0.653029330145)*x[0]**o+(-0.0178804068723)*x[0]+(-0.0238303862422)*x[1]**o+(0.983033975535)*x[1]
-        arg[2,2]=(0.680878878444)*x[0]**o+(-0.404330541218)*x[0]+(0.856544883866)*x[1]**o+(0.71899071821)*x[1]
-        arg[2,3]=(0.0674687202072)*x[0]**o+(-0.748990717637)*x[0]+(0.185597242309)*x[1]**o+(0.623849127358)*x[1]
-        arg[2,4]=(0.302869699915)*x[0]**o+(-0.852621552847)*x[0]+(0.115557112172)*x[1]**o+(-0.0827214208715)*x[1]
-        arg[3,0]=(0.0929072570643)*x[0]**o+(0.533152382923)*x[0]+(-0.0913754984708)*x[1]**o+(-0.25865969337)*x[1]
-        arg[3,1]=(-0.794799886368)*x[0]**o+(-0.865263962776)*x[0]+(0.441343356932)*x[1]**o+(-0.541975483415)*x[1]
-        arg[3,2]=(0.261341948686)*x[0]**o+(0.378142729621)*x[0]+(0.0556054089673)*x[1]**o+(-0.854195169318)*x[1]
-        arg[3,3]=(0.177222467454)*x[0]**o+(-0.400820197499)*x[0]+(0.88513075927)*x[1]**o+(0.0420082325044)*x[1]
-        arg[3,4]=(0.307178422145)*x[0]**o+(-0.203765349758)*x[0]+(-0.546052990937)*x[1]**o+(-0.960312136292)*x[1]
-        ref[0,0,0]=o*(-0.722004066753)*x_ref[0]**(o-1)+(-0.911439550186)
-        ref[0,0,1]=o*(0.0793361579222)*x_ref[1]**(o-1)+(0.958526722957)
-        ref[0,1,0]=o*(-0.0237328054252)*x_ref[0]**(o-1)+(0.832621528642)
-        ref[0,1,1]=o*(0.168484408262)*x_ref[1]**(o-1)+(-0.181293214021)
-        ref[0,2,0]=o*(0.0284992392733)*x_ref[0]**(o-1)+(0.884411090784)
-        ref[0,2,1]=o*(-0.615596355135)*x_ref[1]**(o-1)+(-0.564819619851)
-        ref[0,3,0]=o*(0.37408647134)*x_ref[0]**(o-1)+(-0.177901551674)
-        ref[0,3,1]=o*(-0.466165048356)*x_ref[1]**(o-1)+(-0.278511961588)
-        ref[0,4,0]=o*(-0.24695435531)*x_ref[0]**(o-1)+(-0.624082916034)
-        ref[0,4,1]=o*(-0.343849543401)*x_ref[1]**(o-1)+(0.661610450445)
-        ref[1,0,0]=o*(-0.176271330569)*x_ref[0]**(o-1)+(-0.661612282712)
-        ref[1,0,1]=o*(-0.937163166613)*x_ref[1]**(o-1)+(0.376473179587)
-        ref[1,1,0]=o*(0.964111839461)*x_ref[0]**(o-1)+(0.576837069403)
-        ref[1,1,1]=o*(-0.718562476684)*x_ref[1]**(o-1)+(0.154883495525)
-        ref[1,2,0]=o*(-0.771556809734)*x_ref[0]**(o-1)+(0.720054023732)
-        ref[1,2,1]=o*(-0.390732462938)*x_ref[1]**(o-1)+(-0.484359019049)
-        ref[1,3,0]=o*(0.565910084656)*x_ref[0]**(o-1)+(0.69105192657)
-        ref[1,3,1]=o*(-0.449408955892)*x_ref[1]**(o-1)+(-0.789780518242)
-        ref[1,4,0]=o*(0.602485034177)*x_ref[0]**(o-1)+(-0.345139282323)
-        ref[1,4,1]=o*(-0.951334152921)*x_ref[1]**(o-1)+(-0.478700081579)
-        ref[2,0,0]=o*(0.00114729937901)*x_ref[0]**(o-1)+(0.295356090995)
-        ref[2,0,1]=o*(0.982261544035)*x_ref[1]**(o-1)+(0.357076141518)
-        ref[2,1,0]=o*(0.653029330145)*x_ref[0]**(o-1)+(-0.0178804068723)
-        ref[2,1,1]=o*(-0.0238303862422)*x_ref[1]**(o-1)+(0.983033975535)
-        ref[2,2,0]=o*(0.680878878444)*x_ref[0]**(o-1)+(-0.404330541218)
-        ref[2,2,1]=o*(0.856544883866)*x_ref[1]**(o-1)+(0.71899071821)
-        ref[2,3,0]=o*(0.0674687202072)*x_ref[0]**(o-1)+(-0.748990717637)
-        ref[2,3,1]=o*(0.185597242309)*x_ref[1]**(o-1)+(0.623849127358)
-        ref[2,4,0]=o*(0.302869699915)*x_ref[0]**(o-1)+(-0.852621552847)
-        ref[2,4,1]=o*(0.115557112172)*x_ref[1]**(o-1)+(-0.0827214208715)
-        ref[3,0,0]=o*(0.0929072570643)*x_ref[0]**(o-1)+(0.533152382923)
-        ref[3,0,1]=o*(-0.0913754984708)*x_ref[1]**(o-1)+(-0.25865969337)
-        ref[3,1,0]=o*(-0.794799886368)*x_ref[0]**(o-1)+(-0.865263962776)
-        ref[3,1,1]=o*(0.441343356932)*x_ref[1]**(o-1)+(-0.541975483415)
-        ref[3,2,0]=o*(0.261341948686)*x_ref[0]**(o-1)+(0.378142729621)
-        ref[3,2,1]=o*(0.0556054089673)*x_ref[1]**(o-1)+(-0.854195169318)
-        ref[3,3,0]=o*(0.177222467454)*x_ref[0]**(o-1)+(-0.400820197499)
-        ref[3,3,1]=o*(0.88513075927)*x_ref[1]**(o-1)+(0.0420082325044)
-        ref[3,4,0]=o*(0.307178422145)*x_ref[0]**(o-1)+(-0.203765349758)
-        ref[3,4,1]=o*(-0.546052990937)*x_ref[1]**(o-1)+(-0.960312136292)
-      else:
-        arg[0,0]=(0.767891828291)*x[0]**o+(-0.0840162180616)*x[0]+(-0.942354055114)*x[1]**o+(-0.458324281794)*x[1]+(-0.837589052489)*x[2]**o+(-0.49741065871)*x[2]
-        arg[0,1]=(-0.770574732815)*x[0]**o+(0.949362675967)*x[0]+(0.334062389906)*x[1]**o+(0.589134582043)*x[1]+(0.611876443107)*x[2]**o+(-0.476746595186)*x[2]
-        arg[0,2]=(-0.113076234857)*x[0]**o+(0.207116555982)*x[0]+(-0.434423505296)*x[1]**o+(0.582451788291)*x[1]+(-0.858451242875)*x[2]**o+(-0.229934112115)*x[2]
-        arg[0,3]=(0.55494281628)*x[0]**o+(0.53116989281)*x[0]+(0.150549353151)*x[1]**o+(0.70886785918)*x[1]+(-0.148436740612)*x[2]**o+(0.755584812901)*x[2]
-        arg[0,4]=(0.0855991607862)*x[0]**o+(0.509120320151)*x[0]+(-0.303374431746)*x[1]**o+(0.1813545791)*x[1]+(-0.0434667822132)*x[2]**o+(0.395447849194)*x[2]
-        arg[1,0]=(-0.779720617706)*x[0]**o+(0.730668258583)*x[0]+(-0.0315884698035)*x[1]**o+(-0.0929845369431)*x[1]+(0.0853332239352)*x[2]**o+(0.303372304789)*x[2]
-        arg[1,1]=(-0.687021672626)*x[0]**o+(-0.380139153436)*x[0]+(-0.624774641851)*x[1]**o+(0.331833510141)*x[1]+(-0.747115143343)*x[2]**o+(-0.901384102505)*x[2]
-        arg[1,2]=(-0.0528543338921)*x[0]**o+(-0.683764012224)*x[0]+(0.498886779776)*x[1]**o+(-0.396777215862)*x[1]+(0.777051418657)*x[2]**o+(-0.786345142641)*x[2]
-        arg[1,3]=(-0.823112017253)*x[0]**o+(0.278818264102)*x[0]+(-0.79372160065)*x[1]**o+(0.254044599609)*x[1]+(-0.372925254827)*x[2]**o+(-0.85054008508)*x[2]
-        arg[1,4]=(-0.247156845703)*x[0]**o+(-0.944335229412)*x[0]+(-0.572532409179)*x[1]**o+(0.289091364421)*x[1]+(0.848874739954)*x[2]**o+(0.705098999827)*x[2]
-        arg[2,0]=(0.0958493700534)*x[0]**o+(-0.334070579338)*x[0]+(-0.74117408785)*x[1]**o+(0.0609646344894)*x[1]+(-0.328888690751)*x[2]**o+(-0.0430772626841)*x[2]
-        arg[2,1]=(0.846871401827)*x[0]**o+(0.379912211333)*x[0]+(-0.197881866966)*x[1]**o+(-0.551498190852)*x[1]+(0.416977164384)*x[2]**o+(0.09398324743)*x[2]
-        arg[2,2]=(0.737261473925)*x[0]**o+(0.696028328637)*x[0]+(-0.735110324145)*x[1]**o+(0.949453963809)*x[1]+(-0.894722167055)*x[2]**o+(-0.16124057159)*x[2]
-        arg[2,3]=(0.267556059297)*x[0]**o+(-0.633581895464)*x[0]+(-0.176232065927)*x[1]**o+(0.98533106984)*x[1]+(0.404671434387)*x[2]**o+(0.343560595562)*x[2]
-        arg[2,4]=(0.502981833324)*x[0]**o+(0.716659442696)*x[0]+(-0.349106283426)*x[1]**o+(0.0726954534053)*x[1]+(0.468516366697)*x[2]**o+(0.328926164383)*x[2]
-        arg[3,0]=(0.846509624251)*x[0]**o+(-0.34161660121)*x[0]+(0.25149102353)*x[1]**o+(-0.0130496471853)*x[1]+(-0.556826239055)*x[2]**o+(0.774658667066)*x[2]
-        arg[3,1]=(-0.0777319662414)*x[0]**o+(0.992622365536)*x[0]+(0.720504365851)*x[1]**o+(0.0701085839568)*x[1]+(0.475573965193)*x[2]**o+(0.402599619829)*x[2]
-        arg[3,2]=(-0.311228599853)*x[0]**o+(-0.732684576916)*x[0]+(0.308213192232)*x[1]**o+(-0.131325871896)*x[1]+(0.964631653839)*x[2]**o+(-0.600646614776)*x[2]
-        arg[3,3]=(0.656589254036)*x[0]**o+(-0.275449493207)*x[0]+(-0.611075965309)*x[1]**o+(-0.460879628412)*x[1]+(-0.820861932527)*x[2]**o+(0.424066222721)*x[2]
-        arg[3,4]=(0.303269333663)*x[0]**o+(-0.745774722275)*x[0]+(0.82933539351)*x[1]**o+(-0.295464064484)*x[1]+(0.818135297647)*x[2]**o+(-0.989600307642)*x[2]
-        ref[0,0,0]=o*(0.767891828291)*x_ref[0]**(o-1)+(-0.0840162180616)
-        ref[0,0,1]=o*(-0.942354055114)*x_ref[1]**(o-1)+(-0.458324281794)
-        ref[0,0,2]=o*(-0.837589052489)*x_ref[2]**(o-1)+(-0.49741065871)
-        ref[0,1,0]=o*(-0.770574732815)*x_ref[0]**(o-1)+(0.949362675967)
-        ref[0,1,1]=o*(0.334062389906)*x_ref[1]**(o-1)+(0.589134582043)
-        ref[0,1,2]=o*(0.611876443107)*x_ref[2]**(o-1)+(-0.476746595186)
-        ref[0,2,0]=o*(-0.113076234857)*x_ref[0]**(o-1)+(0.207116555982)
-        ref[0,2,1]=o*(-0.434423505296)*x_ref[1]**(o-1)+(0.582451788291)
-        ref[0,2,2]=o*(-0.858451242875)*x_ref[2]**(o-1)+(-0.229934112115)
-        ref[0,3,0]=o*(0.55494281628)*x_ref[0]**(o-1)+(0.53116989281)
-        ref[0,3,1]=o*(0.150549353151)*x_ref[1]**(o-1)+(0.70886785918)
-        ref[0,3,2]=o*(-0.148436740612)*x_ref[2]**(o-1)+(0.755584812901)
-        ref[0,4,0]=o*(0.0855991607862)*x_ref[0]**(o-1)+(0.509120320151)
-        ref[0,4,1]=o*(-0.303374431746)*x_ref[1]**(o-1)+(0.1813545791)
-        ref[0,4,2]=o*(-0.0434667822132)*x_ref[2]**(o-1)+(0.395447849194)
-        ref[1,0,0]=o*(-0.779720617706)*x_ref[0]**(o-1)+(0.730668258583)
-        ref[1,0,1]=o*(-0.0315884698035)*x_ref[1]**(o-1)+(-0.0929845369431)
-        ref[1,0,2]=o*(0.0853332239352)*x_ref[2]**(o-1)+(0.303372304789)
-        ref[1,1,0]=o*(-0.687021672626)*x_ref[0]**(o-1)+(-0.380139153436)
-        ref[1,1,1]=o*(-0.624774641851)*x_ref[1]**(o-1)+(0.331833510141)
-        ref[1,1,2]=o*(-0.747115143343)*x_ref[2]**(o-1)+(-0.901384102505)
-        ref[1,2,0]=o*(-0.0528543338921)*x_ref[0]**(o-1)+(-0.683764012224)
-        ref[1,2,1]=o*(0.498886779776)*x_ref[1]**(o-1)+(-0.396777215862)
-        ref[1,2,2]=o*(0.777051418657)*x_ref[2]**(o-1)+(-0.786345142641)
-        ref[1,3,0]=o*(-0.823112017253)*x_ref[0]**(o-1)+(0.278818264102)
-        ref[1,3,1]=o*(-0.79372160065)*x_ref[1]**(o-1)+(0.254044599609)
-        ref[1,3,2]=o*(-0.372925254827)*x_ref[2]**(o-1)+(-0.85054008508)
-        ref[1,4,0]=o*(-0.247156845703)*x_ref[0]**(o-1)+(-0.944335229412)
-        ref[1,4,1]=o*(-0.572532409179)*x_ref[1]**(o-1)+(0.289091364421)
-        ref[1,4,2]=o*(0.848874739954)*x_ref[2]**(o-1)+(0.705098999827)
-        ref[2,0,0]=o*(0.0958493700534)*x_ref[0]**(o-1)+(-0.334070579338)
-        ref[2,0,1]=o*(-0.74117408785)*x_ref[1]**(o-1)+(0.0609646344894)
-        ref[2,0,2]=o*(-0.328888690751)*x_ref[2]**(o-1)+(-0.0430772626841)
-        ref[2,1,0]=o*(0.846871401827)*x_ref[0]**(o-1)+(0.379912211333)
-        ref[2,1,1]=o*(-0.197881866966)*x_ref[1]**(o-1)+(-0.551498190852)
-        ref[2,1,2]=o*(0.416977164384)*x_ref[2]**(o-1)+(0.09398324743)
-        ref[2,2,0]=o*(0.737261473925)*x_ref[0]**(o-1)+(0.696028328637)
-        ref[2,2,1]=o*(-0.735110324145)*x_ref[1]**(o-1)+(0.949453963809)
-        ref[2,2,2]=o*(-0.894722167055)*x_ref[2]**(o-1)+(-0.16124057159)
-        ref[2,3,0]=o*(0.267556059297)*x_ref[0]**(o-1)+(-0.633581895464)
-        ref[2,3,1]=o*(-0.176232065927)*x_ref[1]**(o-1)+(0.98533106984)
-        ref[2,3,2]=o*(0.404671434387)*x_ref[2]**(o-1)+(0.343560595562)
-        ref[2,4,0]=o*(0.502981833324)*x_ref[0]**(o-1)+(0.716659442696)
-        ref[2,4,1]=o*(-0.349106283426)*x_ref[1]**(o-1)+(0.0726954534053)
-        ref[2,4,2]=o*(0.468516366697)*x_ref[2]**(o-1)+(0.328926164383)
-        ref[3,0,0]=o*(0.846509624251)*x_ref[0]**(o-1)+(-0.34161660121)
-        ref[3,0,1]=o*(0.25149102353)*x_ref[1]**(o-1)+(-0.0130496471853)
-        ref[3,0,2]=o*(-0.556826239055)*x_ref[2]**(o-1)+(0.774658667066)
-        ref[3,1,0]=o*(-0.0777319662414)*x_ref[0]**(o-1)+(0.992622365536)
-        ref[3,1,1]=o*(0.720504365851)*x_ref[1]**(o-1)+(0.0701085839568)
-        ref[3,1,2]=o*(0.475573965193)*x_ref[2]**(o-1)+(0.402599619829)
-        ref[3,2,0]=o*(-0.311228599853)*x_ref[0]**(o-1)+(-0.732684576916)
-        ref[3,2,1]=o*(0.308213192232)*x_ref[1]**(o-1)+(-0.131325871896)
-        ref[3,2,2]=o*(0.964631653839)*x_ref[2]**(o-1)+(-0.600646614776)
-        ref[3,3,0]=o*(0.656589254036)*x_ref[0]**(o-1)+(-0.275449493207)
-        ref[3,3,1]=o*(-0.611075965309)*x_ref[1]**(o-1)+(-0.460879628412)
-        ref[3,3,2]=o*(-0.820861932527)*x_ref[2]**(o-1)+(0.424066222721)
-        ref[3,4,0]=o*(0.303269333663)*x_ref[0]**(o-1)+(-0.745774722275)
-        ref[3,4,1]=o*(0.82933539351)*x_ref[1]**(o-1)+(-0.295464064484)
-        ref[3,4,2]=o*(0.818135297647)*x_ref[2]**(o-1)+(-0.989600307642)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the Function
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.572693829631)*x[0]**o+(0.583556749477)*x[0]+(0.22594627003)*x[1]**o+(0.0199162626119)*x[1]
-        arg[0,0,1]=(0.196266833125)*x[0]**o+(0.544824498113)*x[0]+(0.150736772157)*x[1]**o+(0.362174902716)*x[1]
-        arg[0,1,0]=(0.169481539273)*x[0]**o+(0.0355504217105)*x[0]+(-0.156746013218)*x[1]**o+(0.879476257954)*x[1]
-        arg[0,1,1]=(0.824826637612)*x[0]**o+(-0.732645177858)*x[0]+(0.732873648361)*x[1]**o+(-0.40090515696)*x[1]
-        arg[1,0,0]=(0.77348720999)*x[0]**o+(0.229475702878)*x[0]+(0.686324947328)*x[1]**o+(0.313197971717)*x[1]
-        arg[1,0,1]=(-0.966626441904)*x[0]**o+(0.989778282376)*x[0]+(0.0447214020611)*x[1]**o+(0.439337525343)*x[1]
-        arg[1,1,0]=(-0.774806567769)*x[0]**o+(0.634591112025)*x[0]+(0.797720133135)*x[1]**o+(0.579137230562)*x[1]
-        arg[1,1,1]=(-0.118703583742)*x[0]**o+(0.482822282284)*x[0]+(0.141839968056)*x[1]**o+(0.916615496002)*x[1]
-        arg[2,0,0]=(0.7419378407)*x[0]**o+(0.754978933397)*x[0]+(-0.839586800033)*x[1]**o+(-0.525830008753)*x[1]
-        arg[2,0,1]=(-0.855040380309)*x[0]**o+(0.423661210447)*x[0]+(0.538277902172)*x[1]**o+(0.127617006384)*x[1]
-        arg[2,1,0]=(0.107349578938)*x[0]**o+(0.697738123598)*x[0]+(0.862106802027)*x[1]**o+(-0.829827651082)*x[1]
-        arg[2,1,1]=(-0.970208311818)*x[0]**o+(0.806698181512)*x[0]+(-0.374007524144)*x[1]**o+(-0.0600501198736)*x[1]
-        arg[3,0,0]=(0.223312188411)*x[0]**o+(-0.130776319489)*x[0]+(0.616021313401)*x[1]**o+(-0.552848902138)*x[1]
-        arg[3,0,1]=(-0.461837450406)*x[0]**o+(-0.895912538242)*x[0]+(0.477606324718)*x[1]**o+(0.220148409572)*x[1]
-        arg[3,1,0]=(0.0783005249695)*x[0]**o+(-0.762350707337)*x[0]+(0.616470467018)*x[1]**o+(-0.154358859634)*x[1]
-        arg[3,1,1]=(-0.604945998091)*x[0]**o+(0.23801834237)*x[0]+(0.500666300529)*x[1]**o+(0.709482270038)*x[1]
-        arg[4,0,0]=(0.746627054515)*x[0]**o+(0.550282853502)*x[0]+(-0.223527434147)*x[1]**o+(-0.291559486198)*x[1]
-        arg[4,0,1]=(0.512462457431)*x[0]**o+(0.0908594735188)*x[0]+(-0.888862229845)*x[1]**o+(-0.969985508695)*x[1]
-        arg[4,1,0]=(0.606213701819)*x[0]**o+(0.147049558356)*x[0]+(-0.0365908849884)*x[1]**o+(-0.584510320466)*x[1]
-        arg[4,1,1]=(-0.110180223906)*x[0]**o+(-0.83442554862)*x[0]+(-0.0516097061459)*x[1]**o+(-0.155615857347)*x[1]
-        arg[5,0,0]=(0.603753207781)*x[0]**o+(0.302032475639)*x[0]+(-0.68719165993)*x[1]**o+(-0.375829665239)*x[1]
-        arg[5,0,1]=(-0.599357977805)*x[0]**o+(0.562486062075)*x[0]+(0.102714751356)*x[1]**o+(-0.114179799185)*x[1]
-        arg[5,1,0]=(0.874756501256)*x[0]**o+(0.550416007969)*x[0]+(0.669721605367)*x[1]**o+(0.24372600222)*x[1]
-        arg[5,1,1]=(0.651356889701)*x[0]**o+(0.178366196323)*x[0]+(0.762268544189)*x[1]**o+(0.515014711815)*x[1]
-        ref[0,0,0,0]=o*(-0.572693829631)*x_ref[0]**(o-1)+(0.583556749477)
-        ref[0,0,0,1]=o*(0.22594627003)*x_ref[1]**(o-1)+(0.0199162626119)
-        ref[0,0,1,0]=o*(0.196266833125)*x_ref[0]**(o-1)+(0.544824498113)
-        ref[0,0,1,1]=o*(0.150736772157)*x_ref[1]**(o-1)+(0.362174902716)
-        ref[0,1,0,0]=o*(0.169481539273)*x_ref[0]**(o-1)+(0.0355504217105)
-        ref[0,1,0,1]=o*(-0.156746013218)*x_ref[1]**(o-1)+(0.879476257954)
-        ref[0,1,1,0]=o*(0.824826637612)*x_ref[0]**(o-1)+(-0.732645177858)
-        ref[0,1,1,1]=o*(0.732873648361)*x_ref[1]**(o-1)+(-0.40090515696)
-        ref[1,0,0,0]=o*(0.77348720999)*x_ref[0]**(o-1)+(0.229475702878)
-        ref[1,0,0,1]=o*(0.686324947328)*x_ref[1]**(o-1)+(0.313197971717)
-        ref[1,0,1,0]=o*(-0.966626441904)*x_ref[0]**(o-1)+(0.989778282376)
-        ref[1,0,1,1]=o*(0.0447214020611)*x_ref[1]**(o-1)+(0.439337525343)
-        ref[1,1,0,0]=o*(-0.774806567769)*x_ref[0]**(o-1)+(0.634591112025)
-        ref[1,1,0,1]=o*(0.797720133135)*x_ref[1]**(o-1)+(0.579137230562)
-        ref[1,1,1,0]=o*(-0.118703583742)*x_ref[0]**(o-1)+(0.482822282284)
-        ref[1,1,1,1]=o*(0.141839968056)*x_ref[1]**(o-1)+(0.916615496002)
-        ref[2,0,0,0]=o*(0.7419378407)*x_ref[0]**(o-1)+(0.754978933397)
-        ref[2,0,0,1]=o*(-0.839586800033)*x_ref[1]**(o-1)+(-0.525830008753)
-        ref[2,0,1,0]=o*(-0.855040380309)*x_ref[0]**(o-1)+(0.423661210447)
-        ref[2,0,1,1]=o*(0.538277902172)*x_ref[1]**(o-1)+(0.127617006384)
-        ref[2,1,0,0]=o*(0.107349578938)*x_ref[0]**(o-1)+(0.697738123598)
-        ref[2,1,0,1]=o*(0.862106802027)*x_ref[1]**(o-1)+(-0.829827651082)
-        ref[2,1,1,0]=o*(-0.970208311818)*x_ref[0]**(o-1)+(0.806698181512)
-        ref[2,1,1,1]=o*(-0.374007524144)*x_ref[1]**(o-1)+(-0.0600501198736)
-        ref[3,0,0,0]=o*(0.223312188411)*x_ref[0]**(o-1)+(-0.130776319489)
-        ref[3,0,0,1]=o*(0.616021313401)*x_ref[1]**(o-1)+(-0.552848902138)
-        ref[3,0,1,0]=o*(-0.461837450406)*x_ref[0]**(o-1)+(-0.895912538242)
-        ref[3,0,1,1]=o*(0.477606324718)*x_ref[1]**(o-1)+(0.220148409572)
-        ref[3,1,0,0]=o*(0.0783005249695)*x_ref[0]**(o-1)+(-0.762350707337)
-        ref[3,1,0,1]=o*(0.616470467018)*x_ref[1]**(o-1)+(-0.154358859634)
-        ref[3,1,1,0]=o*(-0.604945998091)*x_ref[0]**(o-1)+(0.23801834237)
-        ref[3,1,1,1]=o*(0.500666300529)*x_ref[1]**(o-1)+(0.709482270038)
-        ref[4,0,0,0]=o*(0.746627054515)*x_ref[0]**(o-1)+(0.550282853502)
-        ref[4,0,0,1]=o*(-0.223527434147)*x_ref[1]**(o-1)+(-0.291559486198)
-        ref[4,0,1,0]=o*(0.512462457431)*x_ref[0]**(o-1)+(0.0908594735188)
-        ref[4,0,1,1]=o*(-0.888862229845)*x_ref[1]**(o-1)+(-0.969985508695)
-        ref[4,1,0,0]=o*(0.606213701819)*x_ref[0]**(o-1)+(0.147049558356)
-        ref[4,1,0,1]=o*(-0.0365908849884)*x_ref[1]**(o-1)+(-0.584510320466)
-        ref[4,1,1,0]=o*(-0.110180223906)*x_ref[0]**(o-1)+(-0.83442554862)
-        ref[4,1,1,1]=o*(-0.0516097061459)*x_ref[1]**(o-1)+(-0.155615857347)
-        ref[5,0,0,0]=o*(0.603753207781)*x_ref[0]**(o-1)+(0.302032475639)
-        ref[5,0,0,1]=o*(-0.68719165993)*x_ref[1]**(o-1)+(-0.375829665239)
-        ref[5,0,1,0]=o*(-0.599357977805)*x_ref[0]**(o-1)+(0.562486062075)
-        ref[5,0,1,1]=o*(0.102714751356)*x_ref[1]**(o-1)+(-0.114179799185)
-        ref[5,1,0,0]=o*(0.874756501256)*x_ref[0]**(o-1)+(0.550416007969)
-        ref[5,1,0,1]=o*(0.669721605367)*x_ref[1]**(o-1)+(0.24372600222)
-        ref[5,1,1,0]=o*(0.651356889701)*x_ref[0]**(o-1)+(0.178366196323)
-        ref[5,1,1,1]=o*(0.762268544189)*x_ref[1]**(o-1)+(0.515014711815)
-      else:
-        arg[0,0,0]=(-0.634739027866)*x[0]**o+(-0.696370463772)*x[0]+(0.503815931458)*x[1]**o+(-0.457824888032)*x[1]+(0.655074800235)*x[2]**o+(-0.456111009206)*x[2]
-        arg[0,0,1]=(-0.533710147141)*x[0]**o+(-0.0814085290298)*x[0]+(-0.0894565935545)*x[1]**o+(-0.3775655102)*x[1]+(-0.134051544262)*x[2]**o+(0.000713749886013)*x[2]
-        arg[0,1,0]=(-0.64394535332)*x[0]**o+(0.430741797171)*x[0]+(0.985157009863)*x[1]**o+(-0.655331266432)*x[1]+(-0.436629135988)*x[2]**o+(-0.404480211702)*x[2]
-        arg[0,1,1]=(-0.0858143551662)*x[0]**o+(0.0452769288327)*x[0]+(0.930452744895)*x[1]**o+(-0.877149214078)*x[1]+(0.675472222413)*x[2]**o+(0.917497654616)*x[2]
-        arg[1,0,0]=(0.88346309442)*x[0]**o+(0.892116796676)*x[0]+(0.22765643526)*x[1]**o+(-0.934442833938)*x[1]+(0.0781755340006)*x[2]**o+(0.106009847768)*x[2]
-        arg[1,0,1]=(0.20824563298)*x[0]**o+(0.613584602599)*x[0]+(-0.482386438919)*x[1]**o+(-0.155840561301)*x[1]+(0.817890842096)*x[2]**o+(0.798519843541)*x[2]
-        arg[1,1,0]=(-0.915853569389)*x[0]**o+(0.573041720657)*x[0]+(0.236967108991)*x[1]**o+(0.421805849528)*x[1]+(-0.576407564364)*x[2]**o+(0.0709741076428)*x[2]
-        arg[1,1,1]=(0.530417188741)*x[0]**o+(0.872073272277)*x[0]+(-0.21047376763)*x[1]**o+(0.88490064655)*x[1]+(0.523085602451)*x[2]**o+(-0.926133382905)*x[2]
-        arg[2,0,0]=(-0.974186019136)*x[0]**o+(-0.332433414417)*x[0]+(-0.500938330608)*x[1]**o+(-0.113188574497)*x[1]+(0.228656301416)*x[2]**o+(-0.375756425313)*x[2]
-        arg[2,0,1]=(0.246057421673)*x[0]**o+(0.231587929687)*x[0]+(0.398413883486)*x[1]**o+(-0.390998026525)*x[1]+(0.273401149062)*x[2]**o+(-0.296142647578)*x[2]
-        arg[2,1,0]=(0.283717204372)*x[0]**o+(-0.545852417255)*x[0]+(-0.616345461169)*x[1]**o+(-0.705051061202)*x[1]+(0.664377876346)*x[2]**o+(0.338382503272)*x[2]
-        arg[2,1,1]=(-0.433297970157)*x[0]**o+(-0.716600154712)*x[0]+(0.836194932687)*x[1]**o+(0.0903372116119)*x[1]+(0.113374499353)*x[2]**o+(-0.588810627425)*x[2]
-        arg[3,0,0]=(0.404388255474)*x[0]**o+(0.521816615546)*x[0]+(-0.0976581170689)*x[1]**o+(-0.678563989037)*x[1]+(0.550953471125)*x[2]**o+(-0.668793844235)*x[2]
-        arg[3,0,1]=(-0.66023047868)*x[0]**o+(0.822794930168)*x[0]+(-0.284215677966)*x[1]**o+(-0.779237447318)*x[1]+(-0.191727752719)*x[2]**o+(-0.748596484262)*x[2]
-        arg[3,1,0]=(-0.0610807571905)*x[0]**o+(0.044623781518)*x[0]+(0.851226664753)*x[1]**o+(0.921090244094)*x[1]+(0.494414571241)*x[2]**o+(-0.473831333684)*x[2]
-        arg[3,1,1]=(0.54651807228)*x[0]**o+(-0.580525990778)*x[0]+(-0.822936606301)*x[1]**o+(-0.0169562878937)*x[1]+(-0.732219249555)*x[2]**o+(-0.435156155008)*x[2]
-        arg[4,0,0]=(0.830021032139)*x[0]**o+(0.976836986062)*x[0]+(0.534162405111)*x[1]**o+(-0.286292103539)*x[1]+(0.820276894761)*x[2]**o+(0.245897387706)*x[2]
-        arg[4,0,1]=(0.362201493311)*x[0]**o+(-0.186328147108)*x[0]+(-0.91611458572)*x[1]**o+(-0.965258904175)*x[1]+(0.61850292372)*x[2]**o+(0.410229835478)*x[2]
-        arg[4,1,0]=(0.0726313013515)*x[0]**o+(-0.974714544914)*x[0]+(0.46313543268)*x[1]**o+(0.100486704072)*x[1]+(-0.149124857233)*x[2]**o+(0.455733236337)*x[2]
-        arg[4,1,1]=(-0.875220220201)*x[0]**o+(-0.416152301789)*x[0]+(-0.0145627466423)*x[1]**o+(0.267856009119)*x[1]+(-0.604260174049)*x[2]**o+(0.689107997051)*x[2]
-        arg[5,0,0]=(0.196182127971)*x[0]**o+(0.337209503833)*x[0]+(0.595342239158)*x[1]**o+(0.507423300857)*x[1]+(0.934760469389)*x[2]**o+(-0.198686443328)*x[2]
-        arg[5,0,1]=(0.77210909967)*x[0]**o+(-0.310778136545)*x[0]+(0.512326103142)*x[1]**o+(-0.501056206243)*x[1]+(0.98755961257)*x[2]**o+(-0.658414340038)*x[2]
-        arg[5,1,0]=(0.375277702198)*x[0]**o+(-0.603850047717)*x[0]+(0.677227868069)*x[1]**o+(-0.784640615159)*x[1]+(0.177350721639)*x[2]**o+(0.241053657333)*x[2]
-        arg[5,1,1]=(-0.368625522736)*x[0]**o+(0.196977476909)*x[0]+(-0.582451887206)*x[1]**o+(0.598240904158)*x[1]+(0.102240230796)*x[2]**o+(0.487322529158)*x[2]
-        ref[0,0,0,0]=o*(-0.634739027866)*x_ref[0]**(o-1)+(-0.696370463772)
-        ref[0,0,0,1]=o*(0.503815931458)*x_ref[1]**(o-1)+(-0.457824888032)
-        ref[0,0,0,2]=o*(0.655074800235)*x_ref[2]**(o-1)+(-0.456111009206)
-        ref[0,0,1,0]=o*(-0.533710147141)*x_ref[0]**(o-1)+(-0.0814085290298)
-        ref[0,0,1,1]=o*(-0.0894565935545)*x_ref[1]**(o-1)+(-0.3775655102)
-        ref[0,0,1,2]=o*(-0.134051544262)*x_ref[2]**(o-1)+(0.000713749886013)
-        ref[0,1,0,0]=o*(-0.64394535332)*x_ref[0]**(o-1)+(0.430741797171)
-        ref[0,1,0,1]=o*(0.985157009863)*x_ref[1]**(o-1)+(-0.655331266432)
-        ref[0,1,0,2]=o*(-0.436629135988)*x_ref[2]**(o-1)+(-0.404480211702)
-        ref[0,1,1,0]=o*(-0.0858143551662)*x_ref[0]**(o-1)+(0.0452769288327)
-        ref[0,1,1,1]=o*(0.930452744895)*x_ref[1]**(o-1)+(-0.877149214078)
-        ref[0,1,1,2]=o*(0.675472222413)*x_ref[2]**(o-1)+(0.917497654616)
-        ref[1,0,0,0]=o*(0.88346309442)*x_ref[0]**(o-1)+(0.892116796676)
-        ref[1,0,0,1]=o*(0.22765643526)*x_ref[1]**(o-1)+(-0.934442833938)
-        ref[1,0,0,2]=o*(0.0781755340006)*x_ref[2]**(o-1)+(0.106009847768)
-        ref[1,0,1,0]=o*(0.20824563298)*x_ref[0]**(o-1)+(0.613584602599)
-        ref[1,0,1,1]=o*(-0.482386438919)*x_ref[1]**(o-1)+(-0.155840561301)
-        ref[1,0,1,2]=o*(0.817890842096)*x_ref[2]**(o-1)+(0.798519843541)
-        ref[1,1,0,0]=o*(-0.915853569389)*x_ref[0]**(o-1)+(0.573041720657)
-        ref[1,1,0,1]=o*(0.236967108991)*x_ref[1]**(o-1)+(0.421805849528)
-        ref[1,1,0,2]=o*(-0.576407564364)*x_ref[2]**(o-1)+(0.0709741076428)
-        ref[1,1,1,0]=o*(0.530417188741)*x_ref[0]**(o-1)+(0.872073272277)
-        ref[1,1,1,1]=o*(-0.21047376763)*x_ref[1]**(o-1)+(0.88490064655)
-        ref[1,1,1,2]=o*(0.523085602451)*x_ref[2]**(o-1)+(-0.926133382905)
-        ref[2,0,0,0]=o*(-0.974186019136)*x_ref[0]**(o-1)+(-0.332433414417)
-        ref[2,0,0,1]=o*(-0.500938330608)*x_ref[1]**(o-1)+(-0.113188574497)
-        ref[2,0,0,2]=o*(0.228656301416)*x_ref[2]**(o-1)+(-0.375756425313)
-        ref[2,0,1,0]=o*(0.246057421673)*x_ref[0]**(o-1)+(0.231587929687)
-        ref[2,0,1,1]=o*(0.398413883486)*x_ref[1]**(o-1)+(-0.390998026525)
-        ref[2,0,1,2]=o*(0.273401149062)*x_ref[2]**(o-1)+(-0.296142647578)
-        ref[2,1,0,0]=o*(0.283717204372)*x_ref[0]**(o-1)+(-0.545852417255)
-        ref[2,1,0,1]=o*(-0.616345461169)*x_ref[1]**(o-1)+(-0.705051061202)
-        ref[2,1,0,2]=o*(0.664377876346)*x_ref[2]**(o-1)+(0.338382503272)
-        ref[2,1,1,0]=o*(-0.433297970157)*x_ref[0]**(o-1)+(-0.716600154712)
-        ref[2,1,1,1]=o*(0.836194932687)*x_ref[1]**(o-1)+(0.0903372116119)
-        ref[2,1,1,2]=o*(0.113374499353)*x_ref[2]**(o-1)+(-0.588810627425)
-        ref[3,0,0,0]=o*(0.404388255474)*x_ref[0]**(o-1)+(0.521816615546)
-        ref[3,0,0,1]=o*(-0.0976581170689)*x_ref[1]**(o-1)+(-0.678563989037)
-        ref[3,0,0,2]=o*(0.550953471125)*x_ref[2]**(o-1)+(-0.668793844235)
-        ref[3,0,1,0]=o*(-0.66023047868)*x_ref[0]**(o-1)+(0.822794930168)
-        ref[3,0,1,1]=o*(-0.284215677966)*x_ref[1]**(o-1)+(-0.779237447318)
-        ref[3,0,1,2]=o*(-0.191727752719)*x_ref[2]**(o-1)+(-0.748596484262)
-        ref[3,1,0,0]=o*(-0.0610807571905)*x_ref[0]**(o-1)+(0.044623781518)
-        ref[3,1,0,1]=o*(0.851226664753)*x_ref[1]**(o-1)+(0.921090244094)
-        ref[3,1,0,2]=o*(0.494414571241)*x_ref[2]**(o-1)+(-0.473831333684)
-        ref[3,1,1,0]=o*(0.54651807228)*x_ref[0]**(o-1)+(-0.580525990778)
-        ref[3,1,1,1]=o*(-0.822936606301)*x_ref[1]**(o-1)+(-0.0169562878937)
-        ref[3,1,1,2]=o*(-0.732219249555)*x_ref[2]**(o-1)+(-0.435156155008)
-        ref[4,0,0,0]=o*(0.830021032139)*x_ref[0]**(o-1)+(0.976836986062)
-        ref[4,0,0,1]=o*(0.534162405111)*x_ref[1]**(o-1)+(-0.286292103539)
-        ref[4,0,0,2]=o*(0.820276894761)*x_ref[2]**(o-1)+(0.245897387706)
-        ref[4,0,1,0]=o*(0.362201493311)*x_ref[0]**(o-1)+(-0.186328147108)
-        ref[4,0,1,1]=o*(-0.91611458572)*x_ref[1]**(o-1)+(-0.965258904175)
-        ref[4,0,1,2]=o*(0.61850292372)*x_ref[2]**(o-1)+(0.410229835478)
-        ref[4,1,0,0]=o*(0.0726313013515)*x_ref[0]**(o-1)+(-0.974714544914)
-        ref[4,1,0,1]=o*(0.46313543268)*x_ref[1]**(o-1)+(0.100486704072)
-        ref[4,1,0,2]=o*(-0.149124857233)*x_ref[2]**(o-1)+(0.455733236337)
-        ref[4,1,1,0]=o*(-0.875220220201)*x_ref[0]**(o-1)+(-0.416152301789)
-        ref[4,1,1,1]=o*(-0.0145627466423)*x_ref[1]**(o-1)+(0.267856009119)
-        ref[4,1,1,2]=o*(-0.604260174049)*x_ref[2]**(o-1)+(0.689107997051)
-        ref[5,0,0,0]=o*(0.196182127971)*x_ref[0]**(o-1)+(0.337209503833)
-        ref[5,0,0,1]=o*(0.595342239158)*x_ref[1]**(o-1)+(0.507423300857)
-        ref[5,0,0,2]=o*(0.934760469389)*x_ref[2]**(o-1)+(-0.198686443328)
-        ref[5,0,1,0]=o*(0.77210909967)*x_ref[0]**(o-1)+(-0.310778136545)
-        ref[5,0,1,1]=o*(0.512326103142)*x_ref[1]**(o-1)+(-0.501056206243)
-        ref[5,0,1,2]=o*(0.98755961257)*x_ref[2]**(o-1)+(-0.658414340038)
-        ref[5,1,0,0]=o*(0.375277702198)*x_ref[0]**(o-1)+(-0.603850047717)
-        ref[5,1,0,1]=o*(0.677227868069)*x_ref[1]**(o-1)+(-0.784640615159)
-        ref[5,1,0,2]=o*(0.177350721639)*x_ref[2]**(o-1)+(0.241053657333)
-        ref[5,1,1,0]=o*(-0.368625522736)*x_ref[0]**(o-1)+(0.196977476909)
-        ref[5,1,1,1]=o*(-0.582451887206)*x_ref[1]**(o-1)+(0.598240904158)
-        ref[5,1,1,2]=o*(0.102240230796)*x_ref[2]**(o-1)+(0.487322529158)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the Function
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.851643614423)*x[0]**o+(-0.77638754265)*x[0]+(-0.216746360457)*x[1]**o+(-0.117807364973)*x[1]
-        ref[0]=o*(0.851643614423)*x_ref[0]**(o-1)+(-0.77638754265)
-        ref[1]=o*(-0.216746360457)*x_ref[1]**(o-1)+(-0.117807364973)
-      else:
-        arg=(0.846271449213)*x[0]**o+(0.895578416904)*x[0]+(-0.518297490388)*x[1]**o+(0.272255265951)*x[1]+(0.537822992528)*x[2]**o+(0.74226977002)*x[2]
-        ref[0]=o*(0.846271449213)*x_ref[0]**(o-1)+(0.895578416904)
-        ref[1]=o*(-0.518297490388)*x_ref[1]**(o-1)+(0.272255265951)
-        ref[2]=o*(0.537822992528)*x_ref[2]**(o-1)+(0.74226977002)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the Function
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.365601318395)*x[0]**o+(0.295624555802)*x[0]+(0.540618182217)*x[1]**o+(0.0458416078386)*x[1]
-        arg[1]=(0.332276039998)*x[0]**o+(0.422606936253)*x[0]+(-0.221603594854)*x[1]**o+(0.879863420258)*x[1]
-        ref[0,0]=o*(0.365601318395)*x_ref[0]**(o-1)+(0.295624555802)
-        ref[0,1]=o*(0.540618182217)*x_ref[1]**(o-1)+(0.0458416078386)
-        ref[1,0]=o*(0.332276039998)*x_ref[0]**(o-1)+(0.422606936253)
-        ref[1,1]=o*(-0.221603594854)*x_ref[1]**(o-1)+(0.879863420258)
-      else:
-        arg[0]=(-0.258072277129)*x[0]**o+(-0.833085462518)*x[0]+(-0.124240965858)*x[1]**o+(-0.121853073047)*x[1]+(-0.877974471569)*x[2]**o+(0.929660451331)*x[2]
-        arg[1]=(0.306520203535)*x[0]**o+(0.635444320723)*x[0]+(-0.766579509915)*x[1]**o+(-0.381189007175)*x[1]+(-0.76608952351)*x[2]**o+(0.00718583364881)*x[2]
-        ref[0,0]=o*(-0.258072277129)*x_ref[0]**(o-1)+(-0.833085462518)
-        ref[0,1]=o*(-0.124240965858)*x_ref[1]**(o-1)+(-0.121853073047)
-        ref[0,2]=o*(-0.877974471569)*x_ref[2]**(o-1)+(0.929660451331)
-        ref[1,0]=o*(0.306520203535)*x_ref[0]**(o-1)+(0.635444320723)
-        ref[1,1]=o*(-0.766579509915)*x_ref[1]**(o-1)+(-0.381189007175)
-        ref[1,2]=o*(-0.76608952351)*x_ref[2]**(o-1)+(0.00718583364881)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the Function
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.403088506806)*x[0]**o+(-0.436942773988)*x[0]+(-0.0594011537346)*x[1]**o+(0.855063195595)*x[1]
-        arg[0,1]=(-0.516992303892)*x[0]**o+(-0.132586737299)*x[0]+(-0.854639239618)*x[1]**o+(0.241200454455)*x[1]
-        arg[0,2]=(-0.373941155498)*x[0]**o+(0.933328225549)*x[0]+(-0.986870460316)*x[1]**o+(-0.051265908773)*x[1]
-        arg[0,3]=(-0.175701653328)*x[0]**o+(-0.726542005356)*x[0]+(-0.553505635409)*x[1]**o+(-0.199806969718)*x[1]
-        arg[0,4]=(-0.750832127973)*x[0]**o+(0.404511387161)*x[0]+(0.874423404897)*x[1]**o+(0.35360129734)*x[1]
-        arg[1,0]=(-0.000191271001285)*x[0]**o+(-0.319365399066)*x[0]+(0.398444976089)*x[1]**o+(-0.966391658006)*x[1]
-        arg[1,1]=(-0.58562890965)*x[0]**o+(-0.623992315262)*x[0]+(-0.913704774126)*x[1]**o+(0.910305409081)*x[1]
-        arg[1,2]=(-0.480491011401)*x[0]**o+(-0.387015926056)*x[0]+(0.845826744282)*x[1]**o+(0.380626980034)*x[1]
-        arg[1,3]=(-0.284167706438)*x[0]**o+(0.730574128045)*x[0]+(0.823389953051)*x[1]**o+(0.59483032515)*x[1]
-        arg[1,4]=(-0.545147810354)*x[0]**o+(-0.632923743497)*x[0]+(0.619596244096)*x[1]**o+(-0.816596365827)*x[1]
-        arg[2,0]=(0.161289895106)*x[0]**o+(0.435472177094)*x[0]+(0.125591455076)*x[1]**o+(0.0207320895937)*x[1]
-        arg[2,1]=(0.639457164801)*x[0]**o+(0.2631408826)*x[0]+(0.00255095677899)*x[1]**o+(0.732164720004)*x[1]
-        arg[2,2]=(-0.152014092979)*x[0]**o+(0.347024615036)*x[0]+(0.94212294017)*x[1]**o+(0.173939724203)*x[1]
-        arg[2,3]=(-0.0324872553975)*x[0]**o+(-0.969492827039)*x[0]+(-0.830876162378)*x[1]**o+(0.601308513636)*x[1]
-        arg[2,4]=(0.932999309515)*x[0]**o+(0.0320937041249)*x[0]+(-0.354492894455)*x[1]**o+(-0.752837146132)*x[1]
-        arg[3,0]=(0.995147840382)*x[0]**o+(-0.276974278934)*x[0]+(0.905272259272)*x[1]**o+(-0.433178159448)*x[1]
-        arg[3,1]=(-0.291708633096)*x[0]**o+(-0.542000555721)*x[0]+(0.372404748364)*x[1]**o+(0.23140215774)*x[1]
-        arg[3,2]=(0.88604771071)*x[0]**o+(-0.753078356803)*x[0]+(-0.265302521749)*x[1]**o+(-0.948898850214)*x[1]
-        arg[3,3]=(-0.429496844082)*x[0]**o+(0.0731695917195)*x[0]+(0.291387878783)*x[1]**o+(-0.078863825039)*x[1]
-        arg[3,4]=(-0.0067999635984)*x[0]**o+(0.488018496019)*x[0]+(-0.875646054486)*x[1]**o+(0.629803284064)*x[1]
-        ref[0,0,0]=o*(0.403088506806)*x_ref[0]**(o-1)+(-0.436942773988)
-        ref[0,0,1]=o*(-0.0594011537346)*x_ref[1]**(o-1)+(0.855063195595)
-        ref[0,1,0]=o*(-0.516992303892)*x_ref[0]**(o-1)+(-0.132586737299)
-        ref[0,1,1]=o*(-0.854639239618)*x_ref[1]**(o-1)+(0.241200454455)
-        ref[0,2,0]=o*(-0.373941155498)*x_ref[0]**(o-1)+(0.933328225549)
-        ref[0,2,1]=o*(-0.986870460316)*x_ref[1]**(o-1)+(-0.051265908773)
-        ref[0,3,0]=o*(-0.175701653328)*x_ref[0]**(o-1)+(-0.726542005356)
-        ref[0,3,1]=o*(-0.553505635409)*x_ref[1]**(o-1)+(-0.199806969718)
-        ref[0,4,0]=o*(-0.750832127973)*x_ref[0]**(o-1)+(0.404511387161)
-        ref[0,4,1]=o*(0.874423404897)*x_ref[1]**(o-1)+(0.35360129734)
-        ref[1,0,0]=o*(-0.000191271001285)*x_ref[0]**(o-1)+(-0.319365399066)
-        ref[1,0,1]=o*(0.398444976089)*x_ref[1]**(o-1)+(-0.966391658006)
-        ref[1,1,0]=o*(-0.58562890965)*x_ref[0]**(o-1)+(-0.623992315262)
-        ref[1,1,1]=o*(-0.913704774126)*x_ref[1]**(o-1)+(0.910305409081)
-        ref[1,2,0]=o*(-0.480491011401)*x_ref[0]**(o-1)+(-0.387015926056)
-        ref[1,2,1]=o*(0.845826744282)*x_ref[1]**(o-1)+(0.380626980034)
-        ref[1,3,0]=o*(-0.284167706438)*x_ref[0]**(o-1)+(0.730574128045)
-        ref[1,3,1]=o*(0.823389953051)*x_ref[1]**(o-1)+(0.59483032515)
-        ref[1,4,0]=o*(-0.545147810354)*x_ref[0]**(o-1)+(-0.632923743497)
-        ref[1,4,1]=o*(0.619596244096)*x_ref[1]**(o-1)+(-0.816596365827)
-        ref[2,0,0]=o*(0.161289895106)*x_ref[0]**(o-1)+(0.435472177094)
-        ref[2,0,1]=o*(0.125591455076)*x_ref[1]**(o-1)+(0.0207320895937)
-        ref[2,1,0]=o*(0.639457164801)*x_ref[0]**(o-1)+(0.2631408826)
-        ref[2,1,1]=o*(0.00255095677899)*x_ref[1]**(o-1)+(0.732164720004)
-        ref[2,2,0]=o*(-0.152014092979)*x_ref[0]**(o-1)+(0.347024615036)
-        ref[2,2,1]=o*(0.94212294017)*x_ref[1]**(o-1)+(0.173939724203)
-        ref[2,3,0]=o*(-0.0324872553975)*x_ref[0]**(o-1)+(-0.969492827039)
-        ref[2,3,1]=o*(-0.830876162378)*x_ref[1]**(o-1)+(0.601308513636)
-        ref[2,4,0]=o*(0.932999309515)*x_ref[0]**(o-1)+(0.0320937041249)
-        ref[2,4,1]=o*(-0.354492894455)*x_ref[1]**(o-1)+(-0.752837146132)
-        ref[3,0,0]=o*(0.995147840382)*x_ref[0]**(o-1)+(-0.276974278934)
-        ref[3,0,1]=o*(0.905272259272)*x_ref[1]**(o-1)+(-0.433178159448)
-        ref[3,1,0]=o*(-0.291708633096)*x_ref[0]**(o-1)+(-0.542000555721)
-        ref[3,1,1]=o*(0.372404748364)*x_ref[1]**(o-1)+(0.23140215774)
-        ref[3,2,0]=o*(0.88604771071)*x_ref[0]**(o-1)+(-0.753078356803)
-        ref[3,2,1]=o*(-0.265302521749)*x_ref[1]**(o-1)+(-0.948898850214)
-        ref[3,3,0]=o*(-0.429496844082)*x_ref[0]**(o-1)+(0.0731695917195)
-        ref[3,3,1]=o*(0.291387878783)*x_ref[1]**(o-1)+(-0.078863825039)
-        ref[3,4,0]=o*(-0.0067999635984)*x_ref[0]**(o-1)+(0.488018496019)
-        ref[3,4,1]=o*(-0.875646054486)*x_ref[1]**(o-1)+(0.629803284064)
-      else:
-        arg[0,0]=(-0.512668741406)*x[0]**o+(-0.73142104842)*x[0]+(0.489050993226)*x[1]**o+(0.771941571419)*x[1]+(-0.538092512577)*x[2]**o+(-0.457812389328)*x[2]
-        arg[0,1]=(0.258566436386)*x[0]**o+(-0.572006860118)*x[0]+(-0.0370305840623)*x[1]**o+(0.328810934717)*x[1]+(-0.652873123265)*x[2]**o+(0.734929914374)*x[2]
-        arg[0,2]=(-0.228462027625)*x[0]**o+(-0.873359484139)*x[0]+(0.902575701641)*x[1]**o+(0.428758160478)*x[1]+(-0.377042847702)*x[2]**o+(-0.161364604019)*x[2]
-        arg[0,3]=(0.31338185054)*x[0]**o+(0.973849539932)*x[0]+(-0.403569231167)*x[1]**o+(-0.110026269257)*x[1]+(0.603101392345)*x[2]**o+(0.499232034173)*x[2]
-        arg[0,4]=(0.468416317974)*x[0]**o+(-0.0154203909264)*x[0]+(0.409228888268)*x[1]**o+(0.358886480877)*x[1]+(-0.00677343401301)*x[2]**o+(-0.0567153195302)*x[2]
-        arg[1,0]=(0.614929795628)*x[0]**o+(0.54911679279)*x[0]+(0.527138394555)*x[1]**o+(-0.84070465171)*x[1]+(0.421928294706)*x[2]**o+(-0.871734463848)*x[2]
-        arg[1,1]=(-0.498770327357)*x[0]**o+(0.294610855431)*x[0]+(-0.815129074288)*x[1]**o+(0.395332176796)*x[1]+(-0.555947305527)*x[2]**o+(-0.623550814988)*x[2]
-        arg[1,2]=(-0.369404109593)*x[0]**o+(-0.662927702362)*x[0]+(0.886789099892)*x[1]**o+(-0.815728539359)*x[1]+(-0.843861162574)*x[2]**o+(-0.510039607856)*x[2]
-        arg[1,3]=(-0.747305678574)*x[0]**o+(0.350337618157)*x[0]+(0.313491051893)*x[1]**o+(-0.554840960712)*x[1]+(-0.259760094369)*x[2]**o+(0.904246223768)*x[2]
-        arg[1,4]=(0.485859115418)*x[0]**o+(-0.751900240375)*x[0]+(-0.233384727142)*x[1]**o+(-0.466677891749)*x[1]+(-0.771311310708)*x[2]**o+(0.380515497846)*x[2]
-        arg[2,0]=(0.628529887016)*x[0]**o+(0.778810609149)*x[0]+(-0.95647127374)*x[1]**o+(-0.887895309984)*x[1]+(-0.926017554164)*x[2]**o+(0.0922106889932)*x[2]
-        arg[2,1]=(-0.981382750453)*x[0]**o+(0.858805367823)*x[0]+(-0.202352133378)*x[1]**o+(0.527229765084)*x[1]+(-0.0862956097426)*x[2]**o+(-0.76269735579)*x[2]
-        arg[2,2]=(0.591276459941)*x[0]**o+(0.554086306469)*x[0]+(-0.175045397917)*x[1]**o+(0.319542375346)*x[1]+(0.328810955576)*x[2]**o+(-0.245381809232)*x[2]
-        arg[2,3]=(-0.826436985287)*x[0]**o+(-0.931352535769)*x[0]+(-0.480801956568)*x[1]**o+(0.830773509938)*x[1]+(0.157556801982)*x[2]**o+(0.982505166946)*x[2]
-        arg[2,4]=(-0.0992736644463)*x[0]**o+(-0.147525710611)*x[0]+(-0.723322157973)*x[1]**o+(0.0527438662093)*x[1]+(-0.338847227522)*x[2]**o+(-0.704585609897)*x[2]
-        arg[3,0]=(-0.45250460769)*x[0]**o+(-0.323299292565)*x[0]+(-0.435540041421)*x[1]**o+(0.418330181239)*x[1]+(0.526739853977)*x[2]**o+(-0.00513414974056)*x[2]
-        arg[3,1]=(0.289534600598)*x[0]**o+(0.467498987256)*x[0]+(0.27851903721)*x[1]**o+(0.908249187588)*x[1]+(-0.84695489717)*x[2]**o+(-0.799372710877)*x[2]
-        arg[3,2]=(0.00338011092566)*x[0]**o+(0.819216072868)*x[0]+(0.115437140937)*x[1]**o+(0.0968835984948)*x[1]+(-0.633253222581)*x[2]**o+(-0.0224890801282)*x[2]
-        arg[3,3]=(0.578331574145)*x[0]**o+(0.328247456626)*x[0]+(-0.725914955131)*x[1]**o+(-0.863562766028)*x[1]+(-0.283057959979)*x[2]**o+(-0.521563360583)*x[2]
-        arg[3,4]=(0.345725352698)*x[0]**o+(0.614912618718)*x[0]+(-0.218084952915)*x[1]**o+(-0.629514485943)*x[1]+(-0.207605980168)*x[2]**o+(-0.0950042458608)*x[2]
-        ref[0,0,0]=o*(-0.512668741406)*x_ref[0]**(o-1)+(-0.73142104842)
-        ref[0,0,1]=o*(0.489050993226)*x_ref[1]**(o-1)+(0.771941571419)
-        ref[0,0,2]=o*(-0.538092512577)*x_ref[2]**(o-1)+(-0.457812389328)
-        ref[0,1,0]=o*(0.258566436386)*x_ref[0]**(o-1)+(-0.572006860118)
-        ref[0,1,1]=o*(-0.0370305840623)*x_ref[1]**(o-1)+(0.328810934717)
-        ref[0,1,2]=o*(-0.652873123265)*x_ref[2]**(o-1)+(0.734929914374)
-        ref[0,2,0]=o*(-0.228462027625)*x_ref[0]**(o-1)+(-0.873359484139)
-        ref[0,2,1]=o*(0.902575701641)*x_ref[1]**(o-1)+(0.428758160478)
-        ref[0,2,2]=o*(-0.377042847702)*x_ref[2]**(o-1)+(-0.161364604019)
-        ref[0,3,0]=o*(0.31338185054)*x_ref[0]**(o-1)+(0.973849539932)
-        ref[0,3,1]=o*(-0.403569231167)*x_ref[1]**(o-1)+(-0.110026269257)
-        ref[0,3,2]=o*(0.603101392345)*x_ref[2]**(o-1)+(0.499232034173)
-        ref[0,4,0]=o*(0.468416317974)*x_ref[0]**(o-1)+(-0.0154203909264)
-        ref[0,4,1]=o*(0.409228888268)*x_ref[1]**(o-1)+(0.358886480877)
-        ref[0,4,2]=o*(-0.00677343401301)*x_ref[2]**(o-1)+(-0.0567153195302)
-        ref[1,0,0]=o*(0.614929795628)*x_ref[0]**(o-1)+(0.54911679279)
-        ref[1,0,1]=o*(0.527138394555)*x_ref[1]**(o-1)+(-0.84070465171)
-        ref[1,0,2]=o*(0.421928294706)*x_ref[2]**(o-1)+(-0.871734463848)
-        ref[1,1,0]=o*(-0.498770327357)*x_ref[0]**(o-1)+(0.294610855431)
-        ref[1,1,1]=o*(-0.815129074288)*x_ref[1]**(o-1)+(0.395332176796)
-        ref[1,1,2]=o*(-0.555947305527)*x_ref[2]**(o-1)+(-0.623550814988)
-        ref[1,2,0]=o*(-0.369404109593)*x_ref[0]**(o-1)+(-0.662927702362)
-        ref[1,2,1]=o*(0.886789099892)*x_ref[1]**(o-1)+(-0.815728539359)
-        ref[1,2,2]=o*(-0.843861162574)*x_ref[2]**(o-1)+(-0.510039607856)
-        ref[1,3,0]=o*(-0.747305678574)*x_ref[0]**(o-1)+(0.350337618157)
-        ref[1,3,1]=o*(0.313491051893)*x_ref[1]**(o-1)+(-0.554840960712)
-        ref[1,3,2]=o*(-0.259760094369)*x_ref[2]**(o-1)+(0.904246223768)
-        ref[1,4,0]=o*(0.485859115418)*x_ref[0]**(o-1)+(-0.751900240375)
-        ref[1,4,1]=o*(-0.233384727142)*x_ref[1]**(o-1)+(-0.466677891749)
-        ref[1,4,2]=o*(-0.771311310708)*x_ref[2]**(o-1)+(0.380515497846)
-        ref[2,0,0]=o*(0.628529887016)*x_ref[0]**(o-1)+(0.778810609149)
-        ref[2,0,1]=o*(-0.95647127374)*x_ref[1]**(o-1)+(-0.887895309984)
-        ref[2,0,2]=o*(-0.926017554164)*x_ref[2]**(o-1)+(0.0922106889932)
-        ref[2,1,0]=o*(-0.981382750453)*x_ref[0]**(o-1)+(0.858805367823)
-        ref[2,1,1]=o*(-0.202352133378)*x_ref[1]**(o-1)+(0.527229765084)
-        ref[2,1,2]=o*(-0.0862956097426)*x_ref[2]**(o-1)+(-0.76269735579)
-        ref[2,2,0]=o*(0.591276459941)*x_ref[0]**(o-1)+(0.554086306469)
-        ref[2,2,1]=o*(-0.175045397917)*x_ref[1]**(o-1)+(0.319542375346)
-        ref[2,2,2]=o*(0.328810955576)*x_ref[2]**(o-1)+(-0.245381809232)
-        ref[2,3,0]=o*(-0.826436985287)*x_ref[0]**(o-1)+(-0.931352535769)
-        ref[2,3,1]=o*(-0.480801956568)*x_ref[1]**(o-1)+(0.830773509938)
-        ref[2,3,2]=o*(0.157556801982)*x_ref[2]**(o-1)+(0.982505166946)
-        ref[2,4,0]=o*(-0.0992736644463)*x_ref[0]**(o-1)+(-0.147525710611)
-        ref[2,4,1]=o*(-0.723322157973)*x_ref[1]**(o-1)+(0.0527438662093)
-        ref[2,4,2]=o*(-0.338847227522)*x_ref[2]**(o-1)+(-0.704585609897)
-        ref[3,0,0]=o*(-0.45250460769)*x_ref[0]**(o-1)+(-0.323299292565)
-        ref[3,0,1]=o*(-0.435540041421)*x_ref[1]**(o-1)+(0.418330181239)
-        ref[3,0,2]=o*(0.526739853977)*x_ref[2]**(o-1)+(-0.00513414974056)
-        ref[3,1,0]=o*(0.289534600598)*x_ref[0]**(o-1)+(0.467498987256)
-        ref[3,1,1]=o*(0.27851903721)*x_ref[1]**(o-1)+(0.908249187588)
-        ref[3,1,2]=o*(-0.84695489717)*x_ref[2]**(o-1)+(-0.799372710877)
-        ref[3,2,0]=o*(0.00338011092566)*x_ref[0]**(o-1)+(0.819216072868)
-        ref[3,2,1]=o*(0.115437140937)*x_ref[1]**(o-1)+(0.0968835984948)
-        ref[3,2,2]=o*(-0.633253222581)*x_ref[2]**(o-1)+(-0.0224890801282)
-        ref[3,3,0]=o*(0.578331574145)*x_ref[0]**(o-1)+(0.328247456626)
-        ref[3,3,1]=o*(-0.725914955131)*x_ref[1]**(o-1)+(-0.863562766028)
-        ref[3,3,2]=o*(-0.283057959979)*x_ref[2]**(o-1)+(-0.521563360583)
-        ref[3,4,0]=o*(0.345725352698)*x_ref[0]**(o-1)+(0.614912618718)
-        ref[3,4,1]=o*(-0.218084952915)*x_ref[1]**(o-1)+(-0.629514485943)
-        ref[3,4,2]=o*(-0.207605980168)*x_ref[2]**(o-1)+(-0.0950042458608)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the Function
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.353390112117)*x[0]**o+(0.121267964347)*x[0]+(0.095925646757)*x[1]**o+(-0.00141503525661)*x[1]
-        arg[0,0,1]=(0.610556742471)*x[0]**o+(0.542948343923)*x[0]+(0.124762431991)*x[1]**o+(0.00216142978003)*x[1]
-        arg[0,1,0]=(0.261559018753)*x[0]**o+(-0.881689419767)*x[0]+(-0.009352418091)*x[1]**o+(0.333357441723)*x[1]
-        arg[0,1,1]=(-0.25379927884)*x[0]**o+(-0.124076833523)*x[0]+(-0.167690772835)*x[1]**o+(0.89804632709)*x[1]
-        arg[1,0,0]=(-0.39353207502)*x[0]**o+(0.838815579522)*x[0]+(0.829467918805)*x[1]**o+(0.614403367394)*x[1]
-        arg[1,0,1]=(-0.698946975112)*x[0]**o+(-0.551313390457)*x[0]+(0.965127390549)*x[1]**o+(-0.819660095397)*x[1]
-        arg[1,1,0]=(-0.656237793952)*x[0]**o+(0.727261124295)*x[0]+(0.602446266985)*x[1]**o+(-0.320796826351)*x[1]
-        arg[1,1,1]=(0.111875111713)*x[0]**o+(0.000360626785094)*x[0]+(-0.802516890555)*x[1]**o+(0.420759758492)*x[1]
-        arg[2,0,0]=(-0.421920068352)*x[0]**o+(-0.022970702876)*x[0]+(-0.0257219638216)*x[1]**o+(-0.36544576073)*x[1]
-        arg[2,0,1]=(-0.459431228769)*x[0]**o+(0.150702477357)*x[0]+(-0.869898945031)*x[1]**o+(0.261651620176)*x[1]
-        arg[2,1,0]=(-0.866165026127)*x[0]**o+(0.149307656472)*x[0]+(-0.270058622191)*x[1]**o+(0.0873163553474)*x[1]
-        arg[2,1,1]=(-0.871128617394)*x[0]**o+(-0.774356000237)*x[0]+(0.337383167457)*x[1]**o+(-0.453335744484)*x[1]
-        arg[3,0,0]=(0.404195477481)*x[0]**o+(-0.350041445198)*x[0]+(-0.583794909281)*x[1]**o+(-0.895439618872)*x[1]
-        arg[3,0,1]=(0.693567867164)*x[0]**o+(0.989642722856)*x[0]+(0.814104467522)*x[1]**o+(-0.126302588221)*x[1]
-        arg[3,1,0]=(0.935509747673)*x[0]**o+(0.0104612091188)*x[0]+(0.304974305936)*x[1]**o+(0.658660310426)*x[1]
-        arg[3,1,1]=(0.677420202064)*x[0]**o+(-0.160834685914)*x[0]+(0.241578146196)*x[1]**o+(-0.182223867353)*x[1]
-        arg[4,0,0]=(-0.908542015864)*x[0]**o+(0.125595344482)*x[0]+(-0.396864254557)*x[1]**o+(0.408182849245)*x[1]
-        arg[4,0,1]=(0.436101221257)*x[0]**o+(0.946667075656)*x[0]+(-0.293523459017)*x[1]**o+(0.363130416513)*x[1]
-        arg[4,1,0]=(0.583416010605)*x[0]**o+(0.531883961319)*x[0]+(-0.418905217485)*x[1]**o+(0.271442034667)*x[1]
-        arg[4,1,1]=(-0.708766397827)*x[0]**o+(0.0266251980073)*x[0]+(-0.0929293524384)*x[1]**o+(-0.661095295605)*x[1]
-        arg[5,0,0]=(0.693424423443)*x[0]**o+(-0.201539674621)*x[0]+(-0.221922493999)*x[1]**o+(-0.218359043699)*x[1]
-        arg[5,0,1]=(-0.478707796293)*x[0]**o+(0.791533578559)*x[0]+(0.280213321002)*x[1]**o+(-0.60809908629)*x[1]
-        arg[5,1,0]=(-0.517992572451)*x[0]**o+(0.591995363281)*x[0]+(0.480220427965)*x[1]**o+(0.134542063762)*x[1]
-        arg[5,1,1]=(0.415861674391)*x[0]**o+(0.773614372731)*x[0]+(-0.984515861984)*x[1]**o+(0.971916685266)*x[1]
-        ref[0,0,0,0]=o*(-0.353390112117)*x_ref[0]**(o-1)+(0.121267964347)
-        ref[0,0,0,1]=o*(0.095925646757)*x_ref[1]**(o-1)+(-0.00141503525661)
-        ref[0,0,1,0]=o*(0.610556742471)*x_ref[0]**(o-1)+(0.542948343923)
-        ref[0,0,1,1]=o*(0.124762431991)*x_ref[1]**(o-1)+(0.00216142978003)
-        ref[0,1,0,0]=o*(0.261559018753)*x_ref[0]**(o-1)+(-0.881689419767)
-        ref[0,1,0,1]=o*(-0.009352418091)*x_ref[1]**(o-1)+(0.333357441723)
-        ref[0,1,1,0]=o*(-0.25379927884)*x_ref[0]**(o-1)+(-0.124076833523)
-        ref[0,1,1,1]=o*(-0.167690772835)*x_ref[1]**(o-1)+(0.89804632709)
-        ref[1,0,0,0]=o*(-0.39353207502)*x_ref[0]**(o-1)+(0.838815579522)
-        ref[1,0,0,1]=o*(0.829467918805)*x_ref[1]**(o-1)+(0.614403367394)
-        ref[1,0,1,0]=o*(-0.698946975112)*x_ref[0]**(o-1)+(-0.551313390457)
-        ref[1,0,1,1]=o*(0.965127390549)*x_ref[1]**(o-1)+(-0.819660095397)
-        ref[1,1,0,0]=o*(-0.656237793952)*x_ref[0]**(o-1)+(0.727261124295)
-        ref[1,1,0,1]=o*(0.602446266985)*x_ref[1]**(o-1)+(-0.320796826351)
-        ref[1,1,1,0]=o*(0.111875111713)*x_ref[0]**(o-1)+(0.000360626785094)
-        ref[1,1,1,1]=o*(-0.802516890555)*x_ref[1]**(o-1)+(0.420759758492)
-        ref[2,0,0,0]=o*(-0.421920068352)*x_ref[0]**(o-1)+(-0.022970702876)
-        ref[2,0,0,1]=o*(-0.0257219638216)*x_ref[1]**(o-1)+(-0.36544576073)
-        ref[2,0,1,0]=o*(-0.459431228769)*x_ref[0]**(o-1)+(0.150702477357)
-        ref[2,0,1,1]=o*(-0.869898945031)*x_ref[1]**(o-1)+(0.261651620176)
-        ref[2,1,0,0]=o*(-0.866165026127)*x_ref[0]**(o-1)+(0.149307656472)
-        ref[2,1,0,1]=o*(-0.270058622191)*x_ref[1]**(o-1)+(0.0873163553474)
-        ref[2,1,1,0]=o*(-0.871128617394)*x_ref[0]**(o-1)+(-0.774356000237)
-        ref[2,1,1,1]=o*(0.337383167457)*x_ref[1]**(o-1)+(-0.453335744484)
-        ref[3,0,0,0]=o*(0.404195477481)*x_ref[0]**(o-1)+(-0.350041445198)
-        ref[3,0,0,1]=o*(-0.583794909281)*x_ref[1]**(o-1)+(-0.895439618872)
-        ref[3,0,1,0]=o*(0.693567867164)*x_ref[0]**(o-1)+(0.989642722856)
-        ref[3,0,1,1]=o*(0.814104467522)*x_ref[1]**(o-1)+(-0.126302588221)
-        ref[3,1,0,0]=o*(0.935509747673)*x_ref[0]**(o-1)+(0.0104612091188)
-        ref[3,1,0,1]=o*(0.304974305936)*x_ref[1]**(o-1)+(0.658660310426)
-        ref[3,1,1,0]=o*(0.677420202064)*x_ref[0]**(o-1)+(-0.160834685914)
-        ref[3,1,1,1]=o*(0.241578146196)*x_ref[1]**(o-1)+(-0.182223867353)
-        ref[4,0,0,0]=o*(-0.908542015864)*x_ref[0]**(o-1)+(0.125595344482)
-        ref[4,0,0,1]=o*(-0.396864254557)*x_ref[1]**(o-1)+(0.408182849245)
-        ref[4,0,1,0]=o*(0.436101221257)*x_ref[0]**(o-1)+(0.946667075656)
-        ref[4,0,1,1]=o*(-0.293523459017)*x_ref[1]**(o-1)+(0.363130416513)
-        ref[4,1,0,0]=o*(0.583416010605)*x_ref[0]**(o-1)+(0.531883961319)
-        ref[4,1,0,1]=o*(-0.418905217485)*x_ref[1]**(o-1)+(0.271442034667)
-        ref[4,1,1,0]=o*(-0.708766397827)*x_ref[0]**(o-1)+(0.0266251980073)
-        ref[4,1,1,1]=o*(-0.0929293524384)*x_ref[1]**(o-1)+(-0.661095295605)
-        ref[5,0,0,0]=o*(0.693424423443)*x_ref[0]**(o-1)+(-0.201539674621)
-        ref[5,0,0,1]=o*(-0.221922493999)*x_ref[1]**(o-1)+(-0.218359043699)
-        ref[5,0,1,0]=o*(-0.478707796293)*x_ref[0]**(o-1)+(0.791533578559)
-        ref[5,0,1,1]=o*(0.280213321002)*x_ref[1]**(o-1)+(-0.60809908629)
-        ref[5,1,0,0]=o*(-0.517992572451)*x_ref[0]**(o-1)+(0.591995363281)
-        ref[5,1,0,1]=o*(0.480220427965)*x_ref[1]**(o-1)+(0.134542063762)
-        ref[5,1,1,0]=o*(0.415861674391)*x_ref[0]**(o-1)+(0.773614372731)
-        ref[5,1,1,1]=o*(-0.984515861984)*x_ref[1]**(o-1)+(0.971916685266)
-      else:
-        arg[0,0,0]=(0.157678109652)*x[0]**o+(-0.939095069874)*x[0]+(0.340072659801)*x[1]**o+(0.806723712633)*x[1]+(0.0175654201162)*x[2]**o+(-0.695887679405)*x[2]
-        arg[0,0,1]=(0.148444957808)*x[0]**o+(0.769780554196)*x[0]+(-0.999778710821)*x[1]**o+(0.765998508134)*x[1]+(0.489498280892)*x[2]**o+(0.272011172233)*x[2]
-        arg[0,1,0]=(-0.78853623669)*x[0]**o+(-0.889333747099)*x[0]+(0.897684283327)*x[1]**o+(0.878046029595)*x[1]+(-0.355566201991)*x[2]**o+(-0.656187599294)*x[2]
-        arg[0,1,1]=(-0.903496685895)*x[0]**o+(0.335762730702)*x[0]+(0.264330545204)*x[1]**o+(-0.369300150725)*x[1]+(0.00819339769162)*x[2]**o+(0.0466274018566)*x[2]
-        arg[1,0,0]=(0.490893502666)*x[0]**o+(0.853253169019)*x[0]+(-0.706120536551)*x[1]**o+(-0.810665092749)*x[1]+(0.877124690496)*x[2]**o+(-0.663316848595)*x[2]
-        arg[1,0,1]=(-0.897301110118)*x[0]**o+(-0.571577796347)*x[0]+(-0.00912216314091)*x[1]**o+(0.479091266837)*x[1]+(-0.951994896347)*x[2]**o+(0.293801256264)*x[2]
-        arg[1,1,0]=(-0.0843442242335)*x[0]**o+(0.436592099426)*x[0]+(-0.961835284742)*x[1]**o+(0.453758903497)*x[1]+(0.759916173417)*x[2]**o+(-0.356674191439)*x[2]
-        arg[1,1,1]=(0.368337095889)*x[0]**o+(-0.180552461333)*x[0]+(-0.814727889141)*x[1]**o+(-0.226678543654)*x[1]+(0.629233877979)*x[2]**o+(0.934452743806)*x[2]
-        arg[2,0,0]=(0.335801632975)*x[0]**o+(0.4853793666)*x[0]+(-0.603075878381)*x[1]**o+(-0.464873655094)*x[1]+(-0.304107114487)*x[2]**o+(0.768564020927)*x[2]
-        arg[2,0,1]=(-0.843867260693)*x[0]**o+(-0.758493294188)*x[0]+(0.801820428023)*x[1]**o+(0.0909753752871)*x[1]+(-0.208134327922)*x[2]**o+(0.343325582627)*x[2]
-        arg[2,1,0]=(-0.143364423799)*x[0]**o+(-0.191201452642)*x[0]+(0.356480498629)*x[1]**o+(0.0853546566948)*x[1]+(0.234781870759)*x[2]**o+(-0.702906217789)*x[2]
-        arg[2,1,1]=(0.81324792898)*x[0]**o+(0.565754643122)*x[0]+(-0.0246314241495)*x[1]**o+(-0.83548496516)*x[1]+(0.730246143504)*x[2]**o+(-0.835539994852)*x[2]
-        arg[3,0,0]=(0.877992836393)*x[0]**o+(-0.137135423487)*x[0]+(0.534511286076)*x[1]**o+(-0.0584370047297)*x[1]+(-0.0497236607574)*x[2]**o+(0.408414670632)*x[2]
-        arg[3,0,1]=(-0.959771372305)*x[0]**o+(0.587216149992)*x[0]+(-0.873216249139)*x[1]**o+(0.0703350087653)*x[1]+(0.452900901257)*x[2]**o+(-0.180788315472)*x[2]
-        arg[3,1,0]=(0.477701526969)*x[0]**o+(0.16165566827)*x[0]+(0.219901428845)*x[1]**o+(-0.0816687269195)*x[1]+(-0.379553348394)*x[2]**o+(-0.764672519612)*x[2]
-        arg[3,1,1]=(0.274518799686)*x[0]**o+(0.945009722336)*x[0]+(-0.979787014238)*x[1]**o+(0.587704213162)*x[1]+(0.7959640984)*x[2]**o+(-0.0811112488533)*x[2]
-        arg[4,0,0]=(-0.579121056378)*x[0]**o+(0.971799195206)*x[0]+(-0.646271217985)*x[1]**o+(0.369751123548)*x[1]+(0.792425864156)*x[2]**o+(-0.170799235786)*x[2]
-        arg[4,0,1]=(0.0939380562355)*x[0]**o+(0.857041359029)*x[0]+(-0.379025882204)*x[1]**o+(-0.571968622949)*x[1]+(-0.156853183697)*x[2]**o+(0.643214485063)*x[2]
-        arg[4,1,0]=(-0.715210364871)*x[0]**o+(0.150341666571)*x[0]+(0.325165277323)*x[1]**o+(-0.322744240034)*x[1]+(-0.622094139461)*x[2]**o+(-0.830479146327)*x[2]
-        arg[4,1,1]=(-0.697109424406)*x[0]**o+(-0.730318259042)*x[0]+(-0.135119012822)*x[1]**o+(0.410502029229)*x[1]+(0.547987909743)*x[2]**o+(0.144877544254)*x[2]
-        arg[5,0,0]=(0.787147597087)*x[0]**o+(-0.528180541295)*x[0]+(-0.251578089108)*x[1]**o+(-0.170766337864)*x[1]+(-0.123341129221)*x[2]**o+(-0.815622069347)*x[2]
-        arg[5,0,1]=(0.193873484005)*x[0]**o+(0.270190252915)*x[0]+(0.807946985621)*x[1]**o+(0.184522999461)*x[1]+(0.97429597406)*x[2]**o+(0.532931028021)*x[2]
-        arg[5,1,0]=(0.555644676015)*x[0]**o+(-0.225593442089)*x[0]+(0.877869009767)*x[1]**o+(-0.750894245506)*x[1]+(0.888501611997)*x[2]**o+(-0.84027021889)*x[2]
-        arg[5,1,1]=(0.76909422867)*x[0]**o+(0.406697645173)*x[0]+(-0.233710263631)*x[1]**o+(-0.432942345121)*x[1]+(0.270484113666)*x[2]**o+(0.707302418115)*x[2]
-        ref[0,0,0,0]=o*(0.157678109652)*x_ref[0]**(o-1)+(-0.939095069874)
-        ref[0,0,0,1]=o*(0.340072659801)*x_ref[1]**(o-1)+(0.806723712633)
-        ref[0,0,0,2]=o*(0.0175654201162)*x_ref[2]**(o-1)+(-0.695887679405)
-        ref[0,0,1,0]=o*(0.148444957808)*x_ref[0]**(o-1)+(0.769780554196)
-        ref[0,0,1,1]=o*(-0.999778710821)*x_ref[1]**(o-1)+(0.765998508134)
-        ref[0,0,1,2]=o*(0.489498280892)*x_ref[2]**(o-1)+(0.272011172233)
-        ref[0,1,0,0]=o*(-0.78853623669)*x_ref[0]**(o-1)+(-0.889333747099)
-        ref[0,1,0,1]=o*(0.897684283327)*x_ref[1]**(o-1)+(0.878046029595)
-        ref[0,1,0,2]=o*(-0.355566201991)*x_ref[2]**(o-1)+(-0.656187599294)
-        ref[0,1,1,0]=o*(-0.903496685895)*x_ref[0]**(o-1)+(0.335762730702)
-        ref[0,1,1,1]=o*(0.264330545204)*x_ref[1]**(o-1)+(-0.369300150725)
-        ref[0,1,1,2]=o*(0.00819339769162)*x_ref[2]**(o-1)+(0.0466274018566)
-        ref[1,0,0,0]=o*(0.490893502666)*x_ref[0]**(o-1)+(0.853253169019)
-        ref[1,0,0,1]=o*(-0.706120536551)*x_ref[1]**(o-1)+(-0.810665092749)
-        ref[1,0,0,2]=o*(0.877124690496)*x_ref[2]**(o-1)+(-0.663316848595)
-        ref[1,0,1,0]=o*(-0.897301110118)*x_ref[0]**(o-1)+(-0.571577796347)
-        ref[1,0,1,1]=o*(-0.00912216314091)*x_ref[1]**(o-1)+(0.479091266837)
-        ref[1,0,1,2]=o*(-0.951994896347)*x_ref[2]**(o-1)+(0.293801256264)
-        ref[1,1,0,0]=o*(-0.0843442242335)*x_ref[0]**(o-1)+(0.436592099426)
-        ref[1,1,0,1]=o*(-0.961835284742)*x_ref[1]**(o-1)+(0.453758903497)
-        ref[1,1,0,2]=o*(0.759916173417)*x_ref[2]**(o-1)+(-0.356674191439)
-        ref[1,1,1,0]=o*(0.368337095889)*x_ref[0]**(o-1)+(-0.180552461333)
-        ref[1,1,1,1]=o*(-0.814727889141)*x_ref[1]**(o-1)+(-0.226678543654)
-        ref[1,1,1,2]=o*(0.629233877979)*x_ref[2]**(o-1)+(0.934452743806)
-        ref[2,0,0,0]=o*(0.335801632975)*x_ref[0]**(o-1)+(0.4853793666)
-        ref[2,0,0,1]=o*(-0.603075878381)*x_ref[1]**(o-1)+(-0.464873655094)
-        ref[2,0,0,2]=o*(-0.304107114487)*x_ref[2]**(o-1)+(0.768564020927)
-        ref[2,0,1,0]=o*(-0.843867260693)*x_ref[0]**(o-1)+(-0.758493294188)
-        ref[2,0,1,1]=o*(0.801820428023)*x_ref[1]**(o-1)+(0.0909753752871)
-        ref[2,0,1,2]=o*(-0.208134327922)*x_ref[2]**(o-1)+(0.343325582627)
-        ref[2,1,0,0]=o*(-0.143364423799)*x_ref[0]**(o-1)+(-0.191201452642)
-        ref[2,1,0,1]=o*(0.356480498629)*x_ref[1]**(o-1)+(0.0853546566948)
-        ref[2,1,0,2]=o*(0.234781870759)*x_ref[2]**(o-1)+(-0.702906217789)
-        ref[2,1,1,0]=o*(0.81324792898)*x_ref[0]**(o-1)+(0.565754643122)
-        ref[2,1,1,1]=o*(-0.0246314241495)*x_ref[1]**(o-1)+(-0.83548496516)
-        ref[2,1,1,2]=o*(0.730246143504)*x_ref[2]**(o-1)+(-0.835539994852)
-        ref[3,0,0,0]=o*(0.877992836393)*x_ref[0]**(o-1)+(-0.137135423487)
-        ref[3,0,0,1]=o*(0.534511286076)*x_ref[1]**(o-1)+(-0.0584370047297)
-        ref[3,0,0,2]=o*(-0.0497236607574)*x_ref[2]**(o-1)+(0.408414670632)
-        ref[3,0,1,0]=o*(-0.959771372305)*x_ref[0]**(o-1)+(0.587216149992)
-        ref[3,0,1,1]=o*(-0.873216249139)*x_ref[1]**(o-1)+(0.0703350087653)
-        ref[3,0,1,2]=o*(0.452900901257)*x_ref[2]**(o-1)+(-0.180788315472)
-        ref[3,1,0,0]=o*(0.477701526969)*x_ref[0]**(o-1)+(0.16165566827)
-        ref[3,1,0,1]=o*(0.219901428845)*x_ref[1]**(o-1)+(-0.0816687269195)
-        ref[3,1,0,2]=o*(-0.379553348394)*x_ref[2]**(o-1)+(-0.764672519612)
-        ref[3,1,1,0]=o*(0.274518799686)*x_ref[0]**(o-1)+(0.945009722336)
-        ref[3,1,1,1]=o*(-0.979787014238)*x_ref[1]**(o-1)+(0.587704213162)
-        ref[3,1,1,2]=o*(0.7959640984)*x_ref[2]**(o-1)+(-0.0811112488533)
-        ref[4,0,0,0]=o*(-0.579121056378)*x_ref[0]**(o-1)+(0.971799195206)
-        ref[4,0,0,1]=o*(-0.646271217985)*x_ref[1]**(o-1)+(0.369751123548)
-        ref[4,0,0,2]=o*(0.792425864156)*x_ref[2]**(o-1)+(-0.170799235786)
-        ref[4,0,1,0]=o*(0.0939380562355)*x_ref[0]**(o-1)+(0.857041359029)
-        ref[4,0,1,1]=o*(-0.379025882204)*x_ref[1]**(o-1)+(-0.571968622949)
-        ref[4,0,1,2]=o*(-0.156853183697)*x_ref[2]**(o-1)+(0.643214485063)
-        ref[4,1,0,0]=o*(-0.715210364871)*x_ref[0]**(o-1)+(0.150341666571)
-        ref[4,1,0,1]=o*(0.325165277323)*x_ref[1]**(o-1)+(-0.322744240034)
-        ref[4,1,0,2]=o*(-0.622094139461)*x_ref[2]**(o-1)+(-0.830479146327)
-        ref[4,1,1,0]=o*(-0.697109424406)*x_ref[0]**(o-1)+(-0.730318259042)
-        ref[4,1,1,1]=o*(-0.135119012822)*x_ref[1]**(o-1)+(0.410502029229)
-        ref[4,1,1,2]=o*(0.547987909743)*x_ref[2]**(o-1)+(0.144877544254)
-        ref[5,0,0,0]=o*(0.787147597087)*x_ref[0]**(o-1)+(-0.528180541295)
-        ref[5,0,0,1]=o*(-0.251578089108)*x_ref[1]**(o-1)+(-0.170766337864)
-        ref[5,0,0,2]=o*(-0.123341129221)*x_ref[2]**(o-1)+(-0.815622069347)
-        ref[5,0,1,0]=o*(0.193873484005)*x_ref[0]**(o-1)+(0.270190252915)
-        ref[5,0,1,1]=o*(0.807946985621)*x_ref[1]**(o-1)+(0.184522999461)
-        ref[5,0,1,2]=o*(0.97429597406)*x_ref[2]**(o-1)+(0.532931028021)
-        ref[5,1,0,0]=o*(0.555644676015)*x_ref[0]**(o-1)+(-0.225593442089)
-        ref[5,1,0,1]=o*(0.877869009767)*x_ref[1]**(o-1)+(-0.750894245506)
-        ref[5,1,0,2]=o*(0.888501611997)*x_ref[2]**(o-1)+(-0.84027021889)
-        ref[5,1,1,0]=o*(0.76909422867)*x_ref[0]**(o-1)+(0.406697645173)
-        ref[5,1,1,1]=o*(-0.233710263631)*x_ref[1]**(o-1)+(-0.432942345121)
-        ref[5,1,1,2]=o*(0.270484113666)*x_ref[2]**(o-1)+(0.707302418115)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.390595923727)*x[0]+(0.870359886354)*x[1]
-        ref[0]=(0.390595923727)
-        ref[1]=(0.870359886354)
-      else:
-        arg=(1.4237066625)*x[0]+(0.191112329766)*x[1]+(0.342817637558)*x[2]
-        ref[0]=(1.4237066625)
-        ref[1]=(0.191112329766)
-        ref[2]=(0.342817637558)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.24969786007)*x[0]+(-0.503239623541)*x[1]
-        arg[1]=(0.00152786815487)*x[0]+(0.486128960541)*x[1]
-        ref[0,0]=(1.24969786007)
-        ref[0,1]=(-0.503239623541)
-        ref[1,0]=(0.00152786815487)
-        ref[1,1]=(0.486128960541)
-      else:
-        arg[0]=(1.16486019581)*x[0]+(-0.244560585954)*x[1]+(1.11539615819)*x[2]
-        arg[1]=(-0.831039160237)*x[0]+(0.822276239005)*x[1]+(0.421468778379)*x[2]
-        ref[0,0]=(1.16486019581)
-        ref[0,1]=(-0.244560585954)
-        ref[0,2]=(1.11539615819)
-        ref[1,0]=(-0.831039160237)
-        ref[1,1]=(0.822276239005)
-        ref[1,2]=(0.421468778379)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.189442592013)*x[0]+(-1.60645028651)*x[1]
-        arg[0,1]=(0.0100077079631)*x[0]+(-1.17387880858)*x[1]
-        arg[0,2]=(0.0275548120659)*x[0]+(0.653617350295)*x[1]
-        arg[0,3]=(0.05829133816)*x[0]+(-0.373563514457)*x[1]
-        arg[0,4]=(0.779779569696)*x[0]+(-1.26967503826)*x[1]
-        arg[1,0]=(-1.76287668803)*x[0]+(1.09016960913)*x[1]
-        arg[1,1]=(-0.37217349459)*x[0]+(-0.241280622851)*x[1]
-        arg[1,2]=(-0.590745342582)*x[0]+(0.258098534691)*x[1]
-        arg[1,3]=(0.481754329217)*x[0]+(1.9686931184)*x[1]
-        arg[1,4]=(1.62318899699)*x[0]+(-0.634644801985)*x[1]
-        arg[2,0]=(-0.0113400901549)*x[0]+(0.448967376428)*x[1]
-        arg[2,1]=(0.0239277722956)*x[0]+(0.248367174694)*x[1]
-        arg[2,2]=(1.23484142782)*x[0]+(-0.408724357055)*x[1]
-        arg[2,3]=(0.115412214024)*x[0]+(0.721349239053)*x[1]
-        arg[2,4]=(-1.58878458768)*x[0]+(-0.297328738789)*x[1]
-        arg[3,0]=(-0.536715000453)*x[0]+(-0.0610624173989)*x[1]
-        arg[3,1]=(-0.365981795847)*x[0]+(0.710935216782)*x[1]
-        arg[3,2]=(1.1343806743)*x[0]+(-1.12662285264)*x[1]
-        arg[3,3]=(-1.56463302165)*x[0]+(0.701651939794)*x[1]
-        arg[3,4]=(1.38464443939)*x[0]+(-0.389328824078)*x[1]
-        ref[0,0,0]=(0.189442592013)
-        ref[0,0,1]=(-1.60645028651)
-        ref[0,1,0]=(0.0100077079631)
-        ref[0,1,1]=(-1.17387880858)
-        ref[0,2,0]=(0.0275548120659)
-        ref[0,2,1]=(0.653617350295)
-        ref[0,3,0]=(0.05829133816)
-        ref[0,3,1]=(-0.373563514457)
-        ref[0,4,0]=(0.779779569696)
-        ref[0,4,1]=(-1.26967503826)
-        ref[1,0,0]=(-1.76287668803)
-        ref[1,0,1]=(1.09016960913)
-        ref[1,1,0]=(-0.37217349459)
-        ref[1,1,1]=(-0.241280622851)
-        ref[1,2,0]=(-0.590745342582)
-        ref[1,2,1]=(0.258098534691)
-        ref[1,3,0]=(0.481754329217)
-        ref[1,3,1]=(1.9686931184)
-        ref[1,4,0]=(1.62318899699)
-        ref[1,4,1]=(-0.634644801985)
-        ref[2,0,0]=(-0.0113400901549)
-        ref[2,0,1]=(0.448967376428)
-        ref[2,1,0]=(0.0239277722956)
-        ref[2,1,1]=(0.248367174694)
-        ref[2,2,0]=(1.23484142782)
-        ref[2,2,1]=(-0.408724357055)
-        ref[2,3,0]=(0.115412214024)
-        ref[2,3,1]=(0.721349239053)
-        ref[2,4,0]=(-1.58878458768)
-        ref[2,4,1]=(-0.297328738789)
-        ref[3,0,0]=(-0.536715000453)
-        ref[3,0,1]=(-0.0610624173989)
-        ref[3,1,0]=(-0.365981795847)
-        ref[3,1,1]=(0.710935216782)
-        ref[3,2,0]=(1.1343806743)
-        ref[3,2,1]=(-1.12662285264)
-        ref[3,3,0]=(-1.56463302165)
-        ref[3,3,1]=(0.701651939794)
-        ref[3,4,0]=(1.38464443939)
-        ref[3,4,1]=(-0.389328824078)
-      else:
-        arg[0,0]=(-0.0712739739657)*x[0]+(-0.876441668189)*x[1]+(0.0470586478107)*x[2]
-        arg[0,1]=(0.162070750778)*x[0]+(-0.672482005621)*x[1]+(-1.03342931552)*x[2]
-        arg[0,2]=(1.06895949733)*x[0]+(-1.10495954108)*x[1]+(-0.689435346922)*x[2]
-        arg[0,3]=(-1.64208651194)*x[0]+(0.957715915835)*x[1]+(-0.693562002749)*x[2]
-        arg[0,4]=(0.438930190966)*x[0]+(-0.696372759112)*x[1]+(-0.158769579398)*x[2]
-        arg[1,0]=(-0.953682332409)*x[0]+(-1.06837831005)*x[1]+(1.19564302893)*x[2]
-        arg[1,1]=(0.277654186276)*x[0]+(-0.4746702788)*x[1]+(0.173080688542)*x[2]
-        arg[1,2]=(-0.0080483840277)*x[0]+(-0.606889636532)*x[1]+(-0.124482488485)*x[2]
-        arg[1,3]=(1.6007700604)*x[0]+(-0.375573101659)*x[1]+(-0.0476989341458)*x[2]
-        arg[1,4]=(-0.797213964765)*x[0]+(-1.71649956799)*x[1]+(-0.661820920574)*x[2]
-        arg[2,0]=(-0.32770535636)*x[0]+(0.705676452368)*x[1]+(0.0527214815247)*x[2]
-        arg[2,1]=(-0.279796835093)*x[0]+(-0.277264709729)*x[1]+(0.278447243546)*x[2]
-        arg[2,2]=(-0.633674196984)*x[0]+(-0.0772663082858)*x[1]+(0.973414222834)*x[2]
-        arg[2,3]=(0.0946037203409)*x[0]+(-0.556948102801)*x[1]+(0.521264798082)*x[2]
-        arg[2,4]=(0.566962914588)*x[0]+(-0.942523827817)*x[1]+(-0.216364192998)*x[2]
-        arg[3,0]=(-0.839702033371)*x[0]+(-1.54418367928)*x[1]+(-0.184693363932)*x[2]
-        arg[3,1]=(-0.509575652351)*x[0]+(0.0710239576211)*x[1]+(0.758695521775)*x[2]
-        arg[3,2]=(0.465980018625)*x[0]+(-0.907796828587)*x[1]+(1.00785361438)*x[2]
-        arg[3,3]=(0.778181969842)*x[0]+(-1.45634928421)*x[1]+(1.20377448321)*x[2]
-        arg[3,4]=(1.53649652976)*x[0]+(-0.769556905214)*x[1]+(0.736590460805)*x[2]
-        ref[0,0,0]=(-0.0712739739657)
-        ref[0,0,1]=(-0.876441668189)
-        ref[0,0,2]=(0.0470586478107)
-        ref[0,1,0]=(0.162070750778)
-        ref[0,1,1]=(-0.672482005621)
-        ref[0,1,2]=(-1.03342931552)
-        ref[0,2,0]=(1.06895949733)
-        ref[0,2,1]=(-1.10495954108)
-        ref[0,2,2]=(-0.689435346922)
-        ref[0,3,0]=(-1.64208651194)
-        ref[0,3,1]=(0.957715915835)
-        ref[0,3,2]=(-0.693562002749)
-        ref[0,4,0]=(0.438930190966)
-        ref[0,4,1]=(-0.696372759112)
-        ref[0,4,2]=(-0.158769579398)
-        ref[1,0,0]=(-0.953682332409)
-        ref[1,0,1]=(-1.06837831005)
-        ref[1,0,2]=(1.19564302893)
-        ref[1,1,0]=(0.277654186276)
-        ref[1,1,1]=(-0.4746702788)
-        ref[1,1,2]=(0.173080688542)
-        ref[1,2,0]=(-0.0080483840277)
-        ref[1,2,1]=(-0.606889636532)
-        ref[1,2,2]=(-0.124482488485)
-        ref[1,3,0]=(1.6007700604)
-        ref[1,3,1]=(-0.375573101659)
-        ref[1,3,2]=(-0.0476989341458)
-        ref[1,4,0]=(-0.797213964765)
-        ref[1,4,1]=(-1.71649956799)
-        ref[1,4,2]=(-0.661820920574)
-        ref[2,0,0]=(-0.32770535636)
-        ref[2,0,1]=(0.705676452368)
-        ref[2,0,2]=(0.0527214815247)
-        ref[2,1,0]=(-0.279796835093)
-        ref[2,1,1]=(-0.277264709729)
-        ref[2,1,2]=(0.278447243546)
-        ref[2,2,0]=(-0.633674196984)
-        ref[2,2,1]=(-0.0772663082858)
-        ref[2,2,2]=(0.973414222834)
-        ref[2,3,0]=(0.0946037203409)
-        ref[2,3,1]=(-0.556948102801)
-        ref[2,3,2]=(0.521264798082)
-        ref[2,4,0]=(0.566962914588)
-        ref[2,4,1]=(-0.942523827817)
-        ref[2,4,2]=(-0.216364192998)
-        ref[3,0,0]=(-0.839702033371)
-        ref[3,0,1]=(-1.54418367928)
-        ref[3,0,2]=(-0.184693363932)
-        ref[3,1,0]=(-0.509575652351)
-        ref[3,1,1]=(0.0710239576211)
-        ref[3,1,2]=(0.758695521775)
-        ref[3,2,0]=(0.465980018625)
-        ref[3,2,1]=(-0.907796828587)
-        ref[3,2,2]=(1.00785361438)
-        ref[3,3,0]=(0.778181969842)
-        ref[3,3,1]=(-1.45634928421)
-        ref[3,3,2]=(1.20377448321)
-        ref[3,4,0]=(1.53649652976)
-        ref[3,4,1]=(-0.769556905214)
-        ref[3,4,2]=(0.736590460805)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.39942183968)*x[0]+(0.930250163424)*x[1]
-        arg[0,0,1]=(0.784529427298)*x[0]+(0.701356076527)*x[1]
-        arg[0,1,0]=(0.555731012919)*x[0]+(0.344587262019)*x[1]
-        arg[0,1,1]=(-0.276715609625)*x[0]+(-1.11338983237)*x[1]
-        arg[1,0,0]=(-0.769761090097)*x[0]+(0.992057132466)*x[1]
-        arg[1,0,1]=(-0.551932009885)*x[0]+(0.838811831137)*x[1]
-        arg[1,1,0]=(-0.0342537649661)*x[0]+(-0.121298284661)*x[1]
-        arg[1,1,1]=(-0.520900867)*x[0]+(0.332690359269)*x[1]
-        arg[2,0,0]=(-0.11096511324)*x[0]+(1.5033138393)*x[1]
-        arg[2,0,1]=(0.42710234817)*x[0]+(1.69083527833)*x[1]
-        arg[2,1,0]=(-0.721628841933)*x[0]+(-0.142173751601)*x[1]
-        arg[2,1,1]=(1.60406199163)*x[0]+(0.641129401426)*x[1]
-        arg[3,0,0]=(-0.731738224766)*x[0]+(-0.900425804879)*x[1]
-        arg[3,0,1]=(0.691108140204)*x[0]+(1.34043965547)*x[1]
-        arg[3,1,0]=(0.0588648299821)*x[0]+(1.39496787747)*x[1]
-        arg[3,1,1]=(0.308498671612)*x[0]+(-0.382011042003)*x[1]
-        arg[4,0,0]=(0.267730803561)*x[0]+(1.76842225328)*x[1]
-        arg[4,0,1]=(0.817593687794)*x[0]+(0.563964345071)*x[1]
-        arg[4,1,0]=(-0.081090160095)*x[0]+(0.52343934951)*x[1]
-        arg[4,1,1]=(-1.02492946795)*x[0]+(-0.725641086216)*x[1]
-        arg[5,0,0]=(-0.294202699958)*x[0]+(0.288095939599)*x[1]
-        arg[5,0,1]=(0.110479098614)*x[0]+(-0.113972943318)*x[1]
-        arg[5,1,0]=(0.772912536924)*x[0]+(-0.883345081065)*x[1]
-        arg[5,1,1]=(-0.17097935184)*x[0]+(0.645719745504)*x[1]
-        ref[0,0,0,0]=(1.39942183968)
-        ref[0,0,0,1]=(0.930250163424)
-        ref[0,0,1,0]=(0.784529427298)
-        ref[0,0,1,1]=(0.701356076527)
-        ref[0,1,0,0]=(0.555731012919)
-        ref[0,1,0,1]=(0.344587262019)
-        ref[0,1,1,0]=(-0.276715609625)
-        ref[0,1,1,1]=(-1.11338983237)
-        ref[1,0,0,0]=(-0.769761090097)
-        ref[1,0,0,1]=(0.992057132466)
-        ref[1,0,1,0]=(-0.551932009885)
-        ref[1,0,1,1]=(0.838811831137)
-        ref[1,1,0,0]=(-0.0342537649661)
-        ref[1,1,0,1]=(-0.121298284661)
-        ref[1,1,1,0]=(-0.520900867)
-        ref[1,1,1,1]=(0.332690359269)
-        ref[2,0,0,0]=(-0.11096511324)
-        ref[2,0,0,1]=(1.5033138393)
-        ref[2,0,1,0]=(0.42710234817)
-        ref[2,0,1,1]=(1.69083527833)
-        ref[2,1,0,0]=(-0.721628841933)
-        ref[2,1,0,1]=(-0.142173751601)
-        ref[2,1,1,0]=(1.60406199163)
-        ref[2,1,1,1]=(0.641129401426)
-        ref[3,0,0,0]=(-0.731738224766)
-        ref[3,0,0,1]=(-0.900425804879)
-        ref[3,0,1,0]=(0.691108140204)
-        ref[3,0,1,1]=(1.34043965547)
-        ref[3,1,0,0]=(0.0588648299821)
-        ref[3,1,0,1]=(1.39496787747)
-        ref[3,1,1,0]=(0.308498671612)
-        ref[3,1,1,1]=(-0.382011042003)
-        ref[4,0,0,0]=(0.267730803561)
-        ref[4,0,0,1]=(1.76842225328)
-        ref[4,0,1,0]=(0.817593687794)
-        ref[4,0,1,1]=(0.563964345071)
-        ref[4,1,0,0]=(-0.081090160095)
-        ref[4,1,0,1]=(0.52343934951)
-        ref[4,1,1,0]=(-1.02492946795)
-        ref[4,1,1,1]=(-0.725641086216)
-        ref[5,0,0,0]=(-0.294202699958)
-        ref[5,0,0,1]=(0.288095939599)
-        ref[5,0,1,0]=(0.110479098614)
-        ref[5,0,1,1]=(-0.113972943318)
-        ref[5,1,0,0]=(0.772912536924)
-        ref[5,1,0,1]=(-0.883345081065)
-        ref[5,1,1,0]=(-0.17097935184)
-        ref[5,1,1,1]=(0.645719745504)
-      else:
-        arg[0,0,0]=(1.30850237165)*x[0]+(-0.0995793053275)*x[1]+(0.787886140134)*x[2]
-        arg[0,0,1]=(-1.50381324493)*x[0]+(1.26609518824)*x[1]+(-0.520747554357)*x[2]
-        arg[0,1,0]=(1.29770238108)*x[0]+(-1.46648704595)*x[1]+(-0.917683003599)*x[2]
-        arg[0,1,1]=(-1.13525521581)*x[0]+(1.13359501358)*x[1]+(-0.222600272477)*x[2]
-        arg[1,0,0]=(0.0106829054463)*x[0]+(-0.00676483709573)*x[1]+(0.109412126311)*x[2]
-        arg[1,0,1]=(0.0246128795814)*x[0]+(-0.356585346511)*x[1]+(0.479157114293)*x[2]
-        arg[1,1,0]=(0.541787350557)*x[0]+(-0.594934006419)*x[1]+(0.464164867381)*x[2]
-        arg[1,1,1]=(-1.12100758712)*x[0]+(1.22017329117)*x[1]+(0.417565754303)*x[2]
-        arg[2,0,0]=(-0.902343328228)*x[0]+(-0.118486423959)*x[1]+(0.983457082831)*x[2]
-        arg[2,0,1]=(-1.32314473272)*x[0]+(1.09473600277)*x[1]+(0.526840449987)*x[2]
-        arg[2,1,0]=(1.02149157674)*x[0]+(0.6830798576)*x[1]+(-0.694642330424)*x[2]
-        arg[2,1,1]=(0.471980048259)*x[0]+(1.43051661856)*x[1]+(-0.591151392642)*x[2]
-        arg[3,0,0]=(-0.207925182408)*x[0]+(0.644497833444)*x[1]+(0.0356376370926)*x[2]
-        arg[3,0,1]=(1.91147142951)*x[0]+(-0.872318227607)*x[1]+(0.714610341379)*x[2]
-        arg[3,1,0]=(-0.197729735501)*x[0]+(0.812673023114)*x[1]+(0.637138094981)*x[2]
-        arg[3,1,1]=(0.103430412074)*x[0]+(0.69310435757)*x[1]+(1.54404820552)*x[2]
-        arg[4,0,0]=(1.04427320711)*x[0]+(-0.655287212961)*x[1]+(0.674873379725)*x[2]
-        arg[4,0,1]=(0.0300148606336)*x[0]+(-0.336581334229)*x[1]+(-0.26036930034)*x[2]
-        arg[4,1,0]=(0.338077518919)*x[0]+(-0.965310125748)*x[1]+(1.66372736241)*x[2]
-        arg[4,1,1]=(-0.417143696516)*x[0]+(-0.764906477186)*x[1]+(-0.406563170367)*x[2]
-        arg[5,0,0]=(-0.894638979617)*x[0]+(-1.03496915396)*x[1]+(0.102679227173)*x[2]
-        arg[5,0,1]=(0.777823649077)*x[0]+(0.138595909746)*x[1]+(0.570318195247)*x[2]
-        arg[5,1,0]=(0.387449776869)*x[0]+(0.782752492387)*x[1]+(0.175162039427)*x[2]
-        arg[5,1,1]=(-0.467369934942)*x[0]+(0.343929304184)*x[1]+(0.42227012208)*x[2]
-        ref[0,0,0,0]=(1.30850237165)
-        ref[0,0,0,1]=(-0.0995793053275)
-        ref[0,0,0,2]=(0.787886140134)
-        ref[0,0,1,0]=(-1.50381324493)
-        ref[0,0,1,1]=(1.26609518824)
-        ref[0,0,1,2]=(-0.520747554357)
-        ref[0,1,0,0]=(1.29770238108)
-        ref[0,1,0,1]=(-1.46648704595)
-        ref[0,1,0,2]=(-0.917683003599)
-        ref[0,1,1,0]=(-1.13525521581)
-        ref[0,1,1,1]=(1.13359501358)
-        ref[0,1,1,2]=(-0.222600272477)
-        ref[1,0,0,0]=(0.0106829054463)
-        ref[1,0,0,1]=(-0.00676483709573)
-        ref[1,0,0,2]=(0.109412126311)
-        ref[1,0,1,0]=(0.0246128795814)
-        ref[1,0,1,1]=(-0.356585346511)
-        ref[1,0,1,2]=(0.479157114293)
-        ref[1,1,0,0]=(0.541787350557)
-        ref[1,1,0,1]=(-0.594934006419)
-        ref[1,1,0,2]=(0.464164867381)
-        ref[1,1,1,0]=(-1.12100758712)
-        ref[1,1,1,1]=(1.22017329117)
-        ref[1,1,1,2]=(0.417565754303)
-        ref[2,0,0,0]=(-0.902343328228)
-        ref[2,0,0,1]=(-0.118486423959)
-        ref[2,0,0,2]=(0.983457082831)
-        ref[2,0,1,0]=(-1.32314473272)
-        ref[2,0,1,1]=(1.09473600277)
-        ref[2,0,1,2]=(0.526840449987)
-        ref[2,1,0,0]=(1.02149157674)
-        ref[2,1,0,1]=(0.6830798576)
-        ref[2,1,0,2]=(-0.694642330424)
-        ref[2,1,1,0]=(0.471980048259)
-        ref[2,1,1,1]=(1.43051661856)
-        ref[2,1,1,2]=(-0.591151392642)
-        ref[3,0,0,0]=(-0.207925182408)
-        ref[3,0,0,1]=(0.644497833444)
-        ref[3,0,0,2]=(0.0356376370926)
-        ref[3,0,1,0]=(1.91147142951)
-        ref[3,0,1,1]=(-0.872318227607)
-        ref[3,0,1,2]=(0.714610341379)
-        ref[3,1,0,0]=(-0.197729735501)
-        ref[3,1,0,1]=(0.812673023114)
-        ref[3,1,0,2]=(0.637138094981)
-        ref[3,1,1,0]=(0.103430412074)
-        ref[3,1,1,1]=(0.69310435757)
-        ref[3,1,1,2]=(1.54404820552)
-        ref[4,0,0,0]=(1.04427320711)
-        ref[4,0,0,1]=(-0.655287212961)
-        ref[4,0,0,2]=(0.674873379725)
-        ref[4,0,1,0]=(0.0300148606336)
-        ref[4,0,1,1]=(-0.336581334229)
-        ref[4,0,1,2]=(-0.26036930034)
-        ref[4,1,0,0]=(0.338077518919)
-        ref[4,1,0,1]=(-0.965310125748)
-        ref[4,1,0,2]=(1.66372736241)
-        ref[4,1,1,0]=(-0.417143696516)
-        ref[4,1,1,1]=(-0.764906477186)
-        ref[4,1,1,2]=(-0.406563170367)
-        ref[5,0,0,0]=(-0.894638979617)
-        ref[5,0,0,1]=(-1.03496915396)
-        ref[5,0,0,2]=(0.102679227173)
-        ref[5,0,1,0]=(0.777823649077)
-        ref[5,0,1,1]=(0.138595909746)
-        ref[5,0,1,2]=(0.570318195247)
-        ref[5,1,0,0]=(0.387449776869)
-        ref[5,1,0,1]=(0.782752492387)
-        ref[5,1,0,2]=(0.175162039427)
-        ref[5,1,1,0]=(-0.467369934942)
-        ref[5,1,1,1]=(0.343929304184)
-        ref[5,1,1,2]=(0.42227012208)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.390595923727)*x[0]+(0.870359886354)*x[1]
-        ref[0]=(0.390595923727)
-        ref[1]=(0.870359886354)
-      else:
-        arg=(1.4237066625)*x[0]+(0.191112329766)*x[1]+(0.342817637558)*x[2]
-        ref[0]=(1.4237066625)
-        ref[1]=(0.191112329766)
-        ref[2]=(0.342817637558)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.24969786007)*x[0]+(-0.503239623541)*x[1]
-        arg[1]=(0.00152786815487)*x[0]+(0.486128960541)*x[1]
-        ref[0,0]=(1.24969786007)
-        ref[0,1]=(-0.503239623541)
-        ref[1,0]=(0.00152786815487)
-        ref[1,1]=(0.486128960541)
-      else:
-        arg[0]=(1.16486019581)*x[0]+(-0.244560585954)*x[1]+(1.11539615819)*x[2]
-        arg[1]=(-0.831039160237)*x[0]+(0.822276239005)*x[1]+(0.421468778379)*x[2]
-        ref[0,0]=(1.16486019581)
-        ref[0,1]=(-0.244560585954)
-        ref[0,2]=(1.11539615819)
-        ref[1,0]=(-0.831039160237)
-        ref[1,1]=(0.822276239005)
-        ref[1,2]=(0.421468778379)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.189442592013)*x[0]+(-1.60645028651)*x[1]
-        arg[0,1]=(0.0100077079631)*x[0]+(-1.17387880858)*x[1]
-        arg[0,2]=(0.0275548120659)*x[0]+(0.653617350295)*x[1]
-        arg[0,3]=(0.05829133816)*x[0]+(-0.373563514457)*x[1]
-        arg[0,4]=(0.779779569696)*x[0]+(-1.26967503826)*x[1]
-        arg[1,0]=(-1.76287668803)*x[0]+(1.09016960913)*x[1]
-        arg[1,1]=(-0.37217349459)*x[0]+(-0.241280622851)*x[1]
-        arg[1,2]=(-0.590745342582)*x[0]+(0.258098534691)*x[1]
-        arg[1,3]=(0.481754329217)*x[0]+(1.9686931184)*x[1]
-        arg[1,4]=(1.62318899699)*x[0]+(-0.634644801985)*x[1]
-        arg[2,0]=(-0.0113400901549)*x[0]+(0.448967376428)*x[1]
-        arg[2,1]=(0.0239277722956)*x[0]+(0.248367174694)*x[1]
-        arg[2,2]=(1.23484142782)*x[0]+(-0.408724357055)*x[1]
-        arg[2,3]=(0.115412214024)*x[0]+(0.721349239053)*x[1]
-        arg[2,4]=(-1.58878458768)*x[0]+(-0.297328738789)*x[1]
-        arg[3,0]=(-0.536715000453)*x[0]+(-0.0610624173989)*x[1]
-        arg[3,1]=(-0.365981795847)*x[0]+(0.710935216782)*x[1]
-        arg[3,2]=(1.1343806743)*x[0]+(-1.12662285264)*x[1]
-        arg[3,3]=(-1.56463302165)*x[0]+(0.701651939794)*x[1]
-        arg[3,4]=(1.38464443939)*x[0]+(-0.389328824078)*x[1]
-        ref[0,0,0]=(0.189442592013)
-        ref[0,0,1]=(-1.60645028651)
-        ref[0,1,0]=(0.0100077079631)
-        ref[0,1,1]=(-1.17387880858)
-        ref[0,2,0]=(0.0275548120659)
-        ref[0,2,1]=(0.653617350295)
-        ref[0,3,0]=(0.05829133816)
-        ref[0,3,1]=(-0.373563514457)
-        ref[0,4,0]=(0.779779569696)
-        ref[0,4,1]=(-1.26967503826)
-        ref[1,0,0]=(-1.76287668803)
-        ref[1,0,1]=(1.09016960913)
-        ref[1,1,0]=(-0.37217349459)
-        ref[1,1,1]=(-0.241280622851)
-        ref[1,2,0]=(-0.590745342582)
-        ref[1,2,1]=(0.258098534691)
-        ref[1,3,0]=(0.481754329217)
-        ref[1,3,1]=(1.9686931184)
-        ref[1,4,0]=(1.62318899699)
-        ref[1,4,1]=(-0.634644801985)
-        ref[2,0,0]=(-0.0113400901549)
-        ref[2,0,1]=(0.448967376428)
-        ref[2,1,0]=(0.0239277722956)
-        ref[2,1,1]=(0.248367174694)
-        ref[2,2,0]=(1.23484142782)
-        ref[2,2,1]=(-0.408724357055)
-        ref[2,3,0]=(0.115412214024)
-        ref[2,3,1]=(0.721349239053)
-        ref[2,4,0]=(-1.58878458768)
-        ref[2,4,1]=(-0.297328738789)
-        ref[3,0,0]=(-0.536715000453)
-        ref[3,0,1]=(-0.0610624173989)
-        ref[3,1,0]=(-0.365981795847)
-        ref[3,1,1]=(0.710935216782)
-        ref[3,2,0]=(1.1343806743)
-        ref[3,2,1]=(-1.12662285264)
-        ref[3,3,0]=(-1.56463302165)
-        ref[3,3,1]=(0.701651939794)
-        ref[3,4,0]=(1.38464443939)
-        ref[3,4,1]=(-0.389328824078)
-      else:
-        arg[0,0]=(-0.0712739739657)*x[0]+(-0.876441668189)*x[1]+(0.0470586478107)*x[2]
-        arg[0,1]=(0.162070750778)*x[0]+(-0.672482005621)*x[1]+(-1.03342931552)*x[2]
-        arg[0,2]=(1.06895949733)*x[0]+(-1.10495954108)*x[1]+(-0.689435346922)*x[2]
-        arg[0,3]=(-1.64208651194)*x[0]+(0.957715915835)*x[1]+(-0.693562002749)*x[2]
-        arg[0,4]=(0.438930190966)*x[0]+(-0.696372759112)*x[1]+(-0.158769579398)*x[2]
-        arg[1,0]=(-0.953682332409)*x[0]+(-1.06837831005)*x[1]+(1.19564302893)*x[2]
-        arg[1,1]=(0.277654186276)*x[0]+(-0.4746702788)*x[1]+(0.173080688542)*x[2]
-        arg[1,2]=(-0.0080483840277)*x[0]+(-0.606889636532)*x[1]+(-0.124482488485)*x[2]
-        arg[1,3]=(1.6007700604)*x[0]+(-0.375573101659)*x[1]+(-0.0476989341458)*x[2]
-        arg[1,4]=(-0.797213964765)*x[0]+(-1.71649956799)*x[1]+(-0.661820920574)*x[2]
-        arg[2,0]=(-0.32770535636)*x[0]+(0.705676452368)*x[1]+(0.0527214815247)*x[2]
-        arg[2,1]=(-0.279796835093)*x[0]+(-0.277264709729)*x[1]+(0.278447243546)*x[2]
-        arg[2,2]=(-0.633674196984)*x[0]+(-0.0772663082858)*x[1]+(0.973414222834)*x[2]
-        arg[2,3]=(0.0946037203409)*x[0]+(-0.556948102801)*x[1]+(0.521264798082)*x[2]
-        arg[2,4]=(0.566962914588)*x[0]+(-0.942523827817)*x[1]+(-0.216364192998)*x[2]
-        arg[3,0]=(-0.839702033371)*x[0]+(-1.54418367928)*x[1]+(-0.184693363932)*x[2]
-        arg[3,1]=(-0.509575652351)*x[0]+(0.0710239576211)*x[1]+(0.758695521775)*x[2]
-        arg[3,2]=(0.465980018625)*x[0]+(-0.907796828587)*x[1]+(1.00785361438)*x[2]
-        arg[3,3]=(0.778181969842)*x[0]+(-1.45634928421)*x[1]+(1.20377448321)*x[2]
-        arg[3,4]=(1.53649652976)*x[0]+(-0.769556905214)*x[1]+(0.736590460805)*x[2]
-        ref[0,0,0]=(-0.0712739739657)
-        ref[0,0,1]=(-0.876441668189)
-        ref[0,0,2]=(0.0470586478107)
-        ref[0,1,0]=(0.162070750778)
-        ref[0,1,1]=(-0.672482005621)
-        ref[0,1,2]=(-1.03342931552)
-        ref[0,2,0]=(1.06895949733)
-        ref[0,2,1]=(-1.10495954108)
-        ref[0,2,2]=(-0.689435346922)
-        ref[0,3,0]=(-1.64208651194)
-        ref[0,3,1]=(0.957715915835)
-        ref[0,3,2]=(-0.693562002749)
-        ref[0,4,0]=(0.438930190966)
-        ref[0,4,1]=(-0.696372759112)
-        ref[0,4,2]=(-0.158769579398)
-        ref[1,0,0]=(-0.953682332409)
-        ref[1,0,1]=(-1.06837831005)
-        ref[1,0,2]=(1.19564302893)
-        ref[1,1,0]=(0.277654186276)
-        ref[1,1,1]=(-0.4746702788)
-        ref[1,1,2]=(0.173080688542)
-        ref[1,2,0]=(-0.0080483840277)
-        ref[1,2,1]=(-0.606889636532)
-        ref[1,2,2]=(-0.124482488485)
-        ref[1,3,0]=(1.6007700604)
-        ref[1,3,1]=(-0.375573101659)
-        ref[1,3,2]=(-0.0476989341458)
-        ref[1,4,0]=(-0.797213964765)
-        ref[1,4,1]=(-1.71649956799)
-        ref[1,4,2]=(-0.661820920574)
-        ref[2,0,0]=(-0.32770535636)
-        ref[2,0,1]=(0.705676452368)
-        ref[2,0,2]=(0.0527214815247)
-        ref[2,1,0]=(-0.279796835093)
-        ref[2,1,1]=(-0.277264709729)
-        ref[2,1,2]=(0.278447243546)
-        ref[2,2,0]=(-0.633674196984)
-        ref[2,2,1]=(-0.0772663082858)
-        ref[2,2,2]=(0.973414222834)
-        ref[2,3,0]=(0.0946037203409)
-        ref[2,3,1]=(-0.556948102801)
-        ref[2,3,2]=(0.521264798082)
-        ref[2,4,0]=(0.566962914588)
-        ref[2,4,1]=(-0.942523827817)
-        ref[2,4,2]=(-0.216364192998)
-        ref[3,0,0]=(-0.839702033371)
-        ref[3,0,1]=(-1.54418367928)
-        ref[3,0,2]=(-0.184693363932)
-        ref[3,1,0]=(-0.509575652351)
-        ref[3,1,1]=(0.0710239576211)
-        ref[3,1,2]=(0.758695521775)
-        ref[3,2,0]=(0.465980018625)
-        ref[3,2,1]=(-0.907796828587)
-        ref[3,2,2]=(1.00785361438)
-        ref[3,3,0]=(0.778181969842)
-        ref[3,3,1]=(-1.45634928421)
-        ref[3,3,2]=(1.20377448321)
-        ref[3,4,0]=(1.53649652976)
-        ref[3,4,1]=(-0.769556905214)
-        ref[3,4,2]=(0.736590460805)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunction_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.39942183968)*x[0]+(0.930250163424)*x[1]
-        arg[0,0,1]=(0.784529427298)*x[0]+(0.701356076527)*x[1]
-        arg[0,1,0]=(0.555731012919)*x[0]+(0.344587262019)*x[1]
-        arg[0,1,1]=(-0.276715609625)*x[0]+(-1.11338983237)*x[1]
-        arg[1,0,0]=(-0.769761090097)*x[0]+(0.992057132466)*x[1]
-        arg[1,0,1]=(-0.551932009885)*x[0]+(0.838811831137)*x[1]
-        arg[1,1,0]=(-0.0342537649661)*x[0]+(-0.121298284661)*x[1]
-        arg[1,1,1]=(-0.520900867)*x[0]+(0.332690359269)*x[1]
-        arg[2,0,0]=(-0.11096511324)*x[0]+(1.5033138393)*x[1]
-        arg[2,0,1]=(0.42710234817)*x[0]+(1.69083527833)*x[1]
-        arg[2,1,0]=(-0.721628841933)*x[0]+(-0.142173751601)*x[1]
-        arg[2,1,1]=(1.60406199163)*x[0]+(0.641129401426)*x[1]
-        arg[3,0,0]=(-0.731738224766)*x[0]+(-0.900425804879)*x[1]
-        arg[3,0,1]=(0.691108140204)*x[0]+(1.34043965547)*x[1]
-        arg[3,1,0]=(0.0588648299821)*x[0]+(1.39496787747)*x[1]
-        arg[3,1,1]=(0.308498671612)*x[0]+(-0.382011042003)*x[1]
-        arg[4,0,0]=(0.267730803561)*x[0]+(1.76842225328)*x[1]
-        arg[4,0,1]=(0.817593687794)*x[0]+(0.563964345071)*x[1]
-        arg[4,1,0]=(-0.081090160095)*x[0]+(0.52343934951)*x[1]
-        arg[4,1,1]=(-1.02492946795)*x[0]+(-0.725641086216)*x[1]
-        arg[5,0,0]=(-0.294202699958)*x[0]+(0.288095939599)*x[1]
-        arg[5,0,1]=(0.110479098614)*x[0]+(-0.113972943318)*x[1]
-        arg[5,1,0]=(0.772912536924)*x[0]+(-0.883345081065)*x[1]
-        arg[5,1,1]=(-0.17097935184)*x[0]+(0.645719745504)*x[1]
-        ref[0,0,0,0]=(1.39942183968)
-        ref[0,0,0,1]=(0.930250163424)
-        ref[0,0,1,0]=(0.784529427298)
-        ref[0,0,1,1]=(0.701356076527)
-        ref[0,1,0,0]=(0.555731012919)
-        ref[0,1,0,1]=(0.344587262019)
-        ref[0,1,1,0]=(-0.276715609625)
-        ref[0,1,1,1]=(-1.11338983237)
-        ref[1,0,0,0]=(-0.769761090097)
-        ref[1,0,0,1]=(0.992057132466)
-        ref[1,0,1,0]=(-0.551932009885)
-        ref[1,0,1,1]=(0.838811831137)
-        ref[1,1,0,0]=(-0.0342537649661)
-        ref[1,1,0,1]=(-0.121298284661)
-        ref[1,1,1,0]=(-0.520900867)
-        ref[1,1,1,1]=(0.332690359269)
-        ref[2,0,0,0]=(-0.11096511324)
-        ref[2,0,0,1]=(1.5033138393)
-        ref[2,0,1,0]=(0.42710234817)
-        ref[2,0,1,1]=(1.69083527833)
-        ref[2,1,0,0]=(-0.721628841933)
-        ref[2,1,0,1]=(-0.142173751601)
-        ref[2,1,1,0]=(1.60406199163)
-        ref[2,1,1,1]=(0.641129401426)
-        ref[3,0,0,0]=(-0.731738224766)
-        ref[3,0,0,1]=(-0.900425804879)
-        ref[3,0,1,0]=(0.691108140204)
-        ref[3,0,1,1]=(1.34043965547)
-        ref[3,1,0,0]=(0.0588648299821)
-        ref[3,1,0,1]=(1.39496787747)
-        ref[3,1,1,0]=(0.308498671612)
-        ref[3,1,1,1]=(-0.382011042003)
-        ref[4,0,0,0]=(0.267730803561)
-        ref[4,0,0,1]=(1.76842225328)
-        ref[4,0,1,0]=(0.817593687794)
-        ref[4,0,1,1]=(0.563964345071)
-        ref[4,1,0,0]=(-0.081090160095)
-        ref[4,1,0,1]=(0.52343934951)
-        ref[4,1,1,0]=(-1.02492946795)
-        ref[4,1,1,1]=(-0.725641086216)
-        ref[5,0,0,0]=(-0.294202699958)
-        ref[5,0,0,1]=(0.288095939599)
-        ref[5,0,1,0]=(0.110479098614)
-        ref[5,0,1,1]=(-0.113972943318)
-        ref[5,1,0,0]=(0.772912536924)
-        ref[5,1,0,1]=(-0.883345081065)
-        ref[5,1,1,0]=(-0.17097935184)
-        ref[5,1,1,1]=(0.645719745504)
-      else:
-        arg[0,0,0]=(1.30850237165)*x[0]+(-0.0995793053275)*x[1]+(0.787886140134)*x[2]
-        arg[0,0,1]=(-1.50381324493)*x[0]+(1.26609518824)*x[1]+(-0.520747554357)*x[2]
-        arg[0,1,0]=(1.29770238108)*x[0]+(-1.46648704595)*x[1]+(-0.917683003599)*x[2]
-        arg[0,1,1]=(-1.13525521581)*x[0]+(1.13359501358)*x[1]+(-0.222600272477)*x[2]
-        arg[1,0,0]=(0.0106829054463)*x[0]+(-0.00676483709573)*x[1]+(0.109412126311)*x[2]
-        arg[1,0,1]=(0.0246128795814)*x[0]+(-0.356585346511)*x[1]+(0.479157114293)*x[2]
-        arg[1,1,0]=(0.541787350557)*x[0]+(-0.594934006419)*x[1]+(0.464164867381)*x[2]
-        arg[1,1,1]=(-1.12100758712)*x[0]+(1.22017329117)*x[1]+(0.417565754303)*x[2]
-        arg[2,0,0]=(-0.902343328228)*x[0]+(-0.118486423959)*x[1]+(0.983457082831)*x[2]
-        arg[2,0,1]=(-1.32314473272)*x[0]+(1.09473600277)*x[1]+(0.526840449987)*x[2]
-        arg[2,1,0]=(1.02149157674)*x[0]+(0.6830798576)*x[1]+(-0.694642330424)*x[2]
-        arg[2,1,1]=(0.471980048259)*x[0]+(1.43051661856)*x[1]+(-0.591151392642)*x[2]
-        arg[3,0,0]=(-0.207925182408)*x[0]+(0.644497833444)*x[1]+(0.0356376370926)*x[2]
-        arg[3,0,1]=(1.91147142951)*x[0]+(-0.872318227607)*x[1]+(0.714610341379)*x[2]
-        arg[3,1,0]=(-0.197729735501)*x[0]+(0.812673023114)*x[1]+(0.637138094981)*x[2]
-        arg[3,1,1]=(0.103430412074)*x[0]+(0.69310435757)*x[1]+(1.54404820552)*x[2]
-        arg[4,0,0]=(1.04427320711)*x[0]+(-0.655287212961)*x[1]+(0.674873379725)*x[2]
-        arg[4,0,1]=(0.0300148606336)*x[0]+(-0.336581334229)*x[1]+(-0.26036930034)*x[2]
-        arg[4,1,0]=(0.338077518919)*x[0]+(-0.965310125748)*x[1]+(1.66372736241)*x[2]
-        arg[4,1,1]=(-0.417143696516)*x[0]+(-0.764906477186)*x[1]+(-0.406563170367)*x[2]
-        arg[5,0,0]=(-0.894638979617)*x[0]+(-1.03496915396)*x[1]+(0.102679227173)*x[2]
-        arg[5,0,1]=(0.777823649077)*x[0]+(0.138595909746)*x[1]+(0.570318195247)*x[2]
-        arg[5,1,0]=(0.387449776869)*x[0]+(0.782752492387)*x[1]+(0.175162039427)*x[2]
-        arg[5,1,1]=(-0.467369934942)*x[0]+(0.343929304184)*x[1]+(0.42227012208)*x[2]
-        ref[0,0,0,0]=(1.30850237165)
-        ref[0,0,0,1]=(-0.0995793053275)
-        ref[0,0,0,2]=(0.787886140134)
-        ref[0,0,1,0]=(-1.50381324493)
-        ref[0,0,1,1]=(1.26609518824)
-        ref[0,0,1,2]=(-0.520747554357)
-        ref[0,1,0,0]=(1.29770238108)
-        ref[0,1,0,1]=(-1.46648704595)
-        ref[0,1,0,2]=(-0.917683003599)
-        ref[0,1,1,0]=(-1.13525521581)
-        ref[0,1,1,1]=(1.13359501358)
-        ref[0,1,1,2]=(-0.222600272477)
-        ref[1,0,0,0]=(0.0106829054463)
-        ref[1,0,0,1]=(-0.00676483709573)
-        ref[1,0,0,2]=(0.109412126311)
-        ref[1,0,1,0]=(0.0246128795814)
-        ref[1,0,1,1]=(-0.356585346511)
-        ref[1,0,1,2]=(0.479157114293)
-        ref[1,1,0,0]=(0.541787350557)
-        ref[1,1,0,1]=(-0.594934006419)
-        ref[1,1,0,2]=(0.464164867381)
-        ref[1,1,1,0]=(-1.12100758712)
-        ref[1,1,1,1]=(1.22017329117)
-        ref[1,1,1,2]=(0.417565754303)
-        ref[2,0,0,0]=(-0.902343328228)
-        ref[2,0,0,1]=(-0.118486423959)
-        ref[2,0,0,2]=(0.983457082831)
-        ref[2,0,1,0]=(-1.32314473272)
-        ref[2,0,1,1]=(1.09473600277)
-        ref[2,0,1,2]=(0.526840449987)
-        ref[2,1,0,0]=(1.02149157674)
-        ref[2,1,0,1]=(0.6830798576)
-        ref[2,1,0,2]=(-0.694642330424)
-        ref[2,1,1,0]=(0.471980048259)
-        ref[2,1,1,1]=(1.43051661856)
-        ref[2,1,1,2]=(-0.591151392642)
-        ref[3,0,0,0]=(-0.207925182408)
-        ref[3,0,0,1]=(0.644497833444)
-        ref[3,0,0,2]=(0.0356376370926)
-        ref[3,0,1,0]=(1.91147142951)
-        ref[3,0,1,1]=(-0.872318227607)
-        ref[3,0,1,2]=(0.714610341379)
-        ref[3,1,0,0]=(-0.197729735501)
-        ref[3,1,0,1]=(0.812673023114)
-        ref[3,1,0,2]=(0.637138094981)
-        ref[3,1,1,0]=(0.103430412074)
-        ref[3,1,1,1]=(0.69310435757)
-        ref[3,1,1,2]=(1.54404820552)
-        ref[4,0,0,0]=(1.04427320711)
-        ref[4,0,0,1]=(-0.655287212961)
-        ref[4,0,0,2]=(0.674873379725)
-        ref[4,0,1,0]=(0.0300148606336)
-        ref[4,0,1,1]=(-0.336581334229)
-        ref[4,0,1,2]=(-0.26036930034)
-        ref[4,1,0,0]=(0.338077518919)
-        ref[4,1,0,1]=(-0.965310125748)
-        ref[4,1,0,2]=(1.66372736241)
-        ref[4,1,1,0]=(-0.417143696516)
-        ref[4,1,1,1]=(-0.764906477186)
-        ref[4,1,1,2]=(-0.406563170367)
-        ref[5,0,0,0]=(-0.894638979617)
-        ref[5,0,0,1]=(-1.03496915396)
-        ref[5,0,0,2]=(0.102679227173)
-        ref[5,0,1,0]=(0.777823649077)
-        ref[5,0,1,1]=(0.138595909746)
-        ref[5,0,1,2]=(0.570318195247)
-        ref[5,1,0,0]=(0.387449776869)
-        ref[5,1,0,1]=(0.782752492387)
-        ref[5,1,0,2]=(0.175162039427)
-        ref[5,1,1,0]=(-0.467369934942)
-        ref[5,1,1,1]=(0.343929304184)
-        ref[5,1,1,2]=(0.42227012208)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunction
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.260967575068)*x[0]**o+(-0.456559015376)*x[0]+(0.663023090785)*x[1]**o+(-0.000383723402374)*x[1]
-        ref[0]=o*(0.260967575068)*x_ref[0]**(o-1)+(-0.456559015376)
-        ref[1]=o*(0.663023090785)*x_ref[1]**(o-1)+(-0.000383723402374)
-      else:
-        arg=(-0.679453642968)*x[0]**o+(-0.836558889087)*x[0]+(0.938200435255)*x[1]**o+(-0.368159735907)*x[1]+(-0.0546850112561)*x[2]**o+(0.931986983035)*x[2]
-        ref[0]=o*(-0.679453642968)*x_ref[0]**(o-1)+(-0.836558889087)
-        ref[1]=o*(0.938200435255)*x_ref[1]**(o-1)+(-0.368159735907)
-        ref[2]=o*(-0.0546850112561)*x_ref[2]**(o-1)+(0.931986983035)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunction
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.221278607378)*x[0]**o+(-0.25051444588)*x[0]+(0.752161895582)*x[1]**o+(0.662434618125)*x[1]
-        arg[1]=(0.984829669888)*x[0]**o+(0.00500258390598)*x[0]+(-0.292523259369)*x[1]**o+(-0.238277884466)*x[1]
-        ref[0,0]=o*(0.221278607378)*x_ref[0]**(o-1)+(-0.25051444588)
-        ref[0,1]=o*(0.752161895582)*x_ref[1]**(o-1)+(0.662434618125)
-        ref[1,0]=o*(0.984829669888)*x_ref[0]**(o-1)+(0.00500258390598)
-        ref[1,1]=o*(-0.292523259369)*x_ref[1]**(o-1)+(-0.238277884466)
-      else:
-        arg[0]=(0.815886350601)*x[0]**o+(-0.41721938077)*x[0]+(0.478358181839)*x[1]**o+(-0.458860964588)*x[1]+(0.575706872631)*x[2]**o+(-0.965426161177)*x[2]
-        arg[1]=(-0.159203003073)*x[0]**o+(-0.985356409774)*x[0]+(0.504125935966)*x[1]**o+(0.703505637664)*x[1]+(-0.480016288837)*x[2]**o+(0.544400209204)*x[2]
-        ref[0,0]=o*(0.815886350601)*x_ref[0]**(o-1)+(-0.41721938077)
-        ref[0,1]=o*(0.478358181839)*x_ref[1]**(o-1)+(-0.458860964588)
-        ref[0,2]=o*(0.575706872631)*x_ref[2]**(o-1)+(-0.965426161177)
-        ref[1,0]=o*(-0.159203003073)*x_ref[0]**(o-1)+(-0.985356409774)
-        ref[1,1]=o*(0.504125935966)*x_ref[1]**(o-1)+(0.703505637664)
-        ref[1,2]=o*(-0.480016288837)*x_ref[2]**(o-1)+(0.544400209204)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunction
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.722004066753)*x[0]**o+(-0.911439550186)*x[0]+(0.0793361579222)*x[1]**o+(0.958526722957)*x[1]
-        arg[0,1]=(-0.0237328054252)*x[0]**o+(0.832621528642)*x[0]+(0.168484408262)*x[1]**o+(-0.181293214021)*x[1]
-        arg[0,2]=(0.0284992392733)*x[0]**o+(0.884411090784)*x[0]+(-0.615596355135)*x[1]**o+(-0.564819619851)*x[1]
-        arg[0,3]=(0.37408647134)*x[0]**o+(-0.177901551674)*x[0]+(-0.466165048356)*x[1]**o+(-0.278511961588)*x[1]
-        arg[0,4]=(-0.24695435531)*x[0]**o+(-0.624082916034)*x[0]+(-0.343849543401)*x[1]**o+(0.661610450445)*x[1]
-        arg[1,0]=(-0.176271330569)*x[0]**o+(-0.661612282712)*x[0]+(-0.937163166613)*x[1]**o+(0.376473179587)*x[1]
-        arg[1,1]=(0.964111839461)*x[0]**o+(0.576837069403)*x[0]+(-0.718562476684)*x[1]**o+(0.154883495525)*x[1]
-        arg[1,2]=(-0.771556809734)*x[0]**o+(0.720054023732)*x[0]+(-0.390732462938)*x[1]**o+(-0.484359019049)*x[1]
-        arg[1,3]=(0.565910084656)*x[0]**o+(0.69105192657)*x[0]+(-0.449408955892)*x[1]**o+(-0.789780518242)*x[1]
-        arg[1,4]=(0.602485034177)*x[0]**o+(-0.345139282323)*x[0]+(-0.951334152921)*x[1]**o+(-0.478700081579)*x[1]
-        arg[2,0]=(0.00114729937901)*x[0]**o+(0.295356090995)*x[0]+(0.982261544035)*x[1]**o+(0.357076141518)*x[1]
-        arg[2,1]=(0.653029330145)*x[0]**o+(-0.0178804068723)*x[0]+(-0.0238303862422)*x[1]**o+(0.983033975535)*x[1]
-        arg[2,2]=(0.680878878444)*x[0]**o+(-0.404330541218)*x[0]+(0.856544883866)*x[1]**o+(0.71899071821)*x[1]
-        arg[2,3]=(0.0674687202072)*x[0]**o+(-0.748990717637)*x[0]+(0.185597242309)*x[1]**o+(0.623849127358)*x[1]
-        arg[2,4]=(0.302869699915)*x[0]**o+(-0.852621552847)*x[0]+(0.115557112172)*x[1]**o+(-0.0827214208715)*x[1]
-        arg[3,0]=(0.0929072570643)*x[0]**o+(0.533152382923)*x[0]+(-0.0913754984708)*x[1]**o+(-0.25865969337)*x[1]
-        arg[3,1]=(-0.794799886368)*x[0]**o+(-0.865263962776)*x[0]+(0.441343356932)*x[1]**o+(-0.541975483415)*x[1]
-        arg[3,2]=(0.261341948686)*x[0]**o+(0.378142729621)*x[0]+(0.0556054089673)*x[1]**o+(-0.854195169318)*x[1]
-        arg[3,3]=(0.177222467454)*x[0]**o+(-0.400820197499)*x[0]+(0.88513075927)*x[1]**o+(0.0420082325044)*x[1]
-        arg[3,4]=(0.307178422145)*x[0]**o+(-0.203765349758)*x[0]+(-0.546052990937)*x[1]**o+(-0.960312136292)*x[1]
-        ref[0,0,0]=o*(-0.722004066753)*x_ref[0]**(o-1)+(-0.911439550186)
-        ref[0,0,1]=o*(0.0793361579222)*x_ref[1]**(o-1)+(0.958526722957)
-        ref[0,1,0]=o*(-0.0237328054252)*x_ref[0]**(o-1)+(0.832621528642)
-        ref[0,1,1]=o*(0.168484408262)*x_ref[1]**(o-1)+(-0.181293214021)
-        ref[0,2,0]=o*(0.0284992392733)*x_ref[0]**(o-1)+(0.884411090784)
-        ref[0,2,1]=o*(-0.615596355135)*x_ref[1]**(o-1)+(-0.564819619851)
-        ref[0,3,0]=o*(0.37408647134)*x_ref[0]**(o-1)+(-0.177901551674)
-        ref[0,3,1]=o*(-0.466165048356)*x_ref[1]**(o-1)+(-0.278511961588)
-        ref[0,4,0]=o*(-0.24695435531)*x_ref[0]**(o-1)+(-0.624082916034)
-        ref[0,4,1]=o*(-0.343849543401)*x_ref[1]**(o-1)+(0.661610450445)
-        ref[1,0,0]=o*(-0.176271330569)*x_ref[0]**(o-1)+(-0.661612282712)
-        ref[1,0,1]=o*(-0.937163166613)*x_ref[1]**(o-1)+(0.376473179587)
-        ref[1,1,0]=o*(0.964111839461)*x_ref[0]**(o-1)+(0.576837069403)
-        ref[1,1,1]=o*(-0.718562476684)*x_ref[1]**(o-1)+(0.154883495525)
-        ref[1,2,0]=o*(-0.771556809734)*x_ref[0]**(o-1)+(0.720054023732)
-        ref[1,2,1]=o*(-0.390732462938)*x_ref[1]**(o-1)+(-0.484359019049)
-        ref[1,3,0]=o*(0.565910084656)*x_ref[0]**(o-1)+(0.69105192657)
-        ref[1,3,1]=o*(-0.449408955892)*x_ref[1]**(o-1)+(-0.789780518242)
-        ref[1,4,0]=o*(0.602485034177)*x_ref[0]**(o-1)+(-0.345139282323)
-        ref[1,4,1]=o*(-0.951334152921)*x_ref[1]**(o-1)+(-0.478700081579)
-        ref[2,0,0]=o*(0.00114729937901)*x_ref[0]**(o-1)+(0.295356090995)
-        ref[2,0,1]=o*(0.982261544035)*x_ref[1]**(o-1)+(0.357076141518)
-        ref[2,1,0]=o*(0.653029330145)*x_ref[0]**(o-1)+(-0.0178804068723)
-        ref[2,1,1]=o*(-0.0238303862422)*x_ref[1]**(o-1)+(0.983033975535)
-        ref[2,2,0]=o*(0.680878878444)*x_ref[0]**(o-1)+(-0.404330541218)
-        ref[2,2,1]=o*(0.856544883866)*x_ref[1]**(o-1)+(0.71899071821)
-        ref[2,3,0]=o*(0.0674687202072)*x_ref[0]**(o-1)+(-0.748990717637)
-        ref[2,3,1]=o*(0.185597242309)*x_ref[1]**(o-1)+(0.623849127358)
-        ref[2,4,0]=o*(0.302869699915)*x_ref[0]**(o-1)+(-0.852621552847)
-        ref[2,4,1]=o*(0.115557112172)*x_ref[1]**(o-1)+(-0.0827214208715)
-        ref[3,0,0]=o*(0.0929072570643)*x_ref[0]**(o-1)+(0.533152382923)
-        ref[3,0,1]=o*(-0.0913754984708)*x_ref[1]**(o-1)+(-0.25865969337)
-        ref[3,1,0]=o*(-0.794799886368)*x_ref[0]**(o-1)+(-0.865263962776)
-        ref[3,1,1]=o*(0.441343356932)*x_ref[1]**(o-1)+(-0.541975483415)
-        ref[3,2,0]=o*(0.261341948686)*x_ref[0]**(o-1)+(0.378142729621)
-        ref[3,2,1]=o*(0.0556054089673)*x_ref[1]**(o-1)+(-0.854195169318)
-        ref[3,3,0]=o*(0.177222467454)*x_ref[0]**(o-1)+(-0.400820197499)
-        ref[3,3,1]=o*(0.88513075927)*x_ref[1]**(o-1)+(0.0420082325044)
-        ref[3,4,0]=o*(0.307178422145)*x_ref[0]**(o-1)+(-0.203765349758)
-        ref[3,4,1]=o*(-0.546052990937)*x_ref[1]**(o-1)+(-0.960312136292)
-      else:
-        arg[0,0]=(0.767891828291)*x[0]**o+(-0.0840162180616)*x[0]+(-0.942354055114)*x[1]**o+(-0.458324281794)*x[1]+(-0.837589052489)*x[2]**o+(-0.49741065871)*x[2]
-        arg[0,1]=(-0.770574732815)*x[0]**o+(0.949362675967)*x[0]+(0.334062389906)*x[1]**o+(0.589134582043)*x[1]+(0.611876443107)*x[2]**o+(-0.476746595186)*x[2]
-        arg[0,2]=(-0.113076234857)*x[0]**o+(0.207116555982)*x[0]+(-0.434423505296)*x[1]**o+(0.582451788291)*x[1]+(-0.858451242875)*x[2]**o+(-0.229934112115)*x[2]
-        arg[0,3]=(0.55494281628)*x[0]**o+(0.53116989281)*x[0]+(0.150549353151)*x[1]**o+(0.70886785918)*x[1]+(-0.148436740612)*x[2]**o+(0.755584812901)*x[2]
-        arg[0,4]=(0.0855991607862)*x[0]**o+(0.509120320151)*x[0]+(-0.303374431746)*x[1]**o+(0.1813545791)*x[1]+(-0.0434667822132)*x[2]**o+(0.395447849194)*x[2]
-        arg[1,0]=(-0.779720617706)*x[0]**o+(0.730668258583)*x[0]+(-0.0315884698035)*x[1]**o+(-0.0929845369431)*x[1]+(0.0853332239352)*x[2]**o+(0.303372304789)*x[2]
-        arg[1,1]=(-0.687021672626)*x[0]**o+(-0.380139153436)*x[0]+(-0.624774641851)*x[1]**o+(0.331833510141)*x[1]+(-0.747115143343)*x[2]**o+(-0.901384102505)*x[2]
-        arg[1,2]=(-0.0528543338921)*x[0]**o+(-0.683764012224)*x[0]+(0.498886779776)*x[1]**o+(-0.396777215862)*x[1]+(0.777051418657)*x[2]**o+(-0.786345142641)*x[2]
-        arg[1,3]=(-0.823112017253)*x[0]**o+(0.278818264102)*x[0]+(-0.79372160065)*x[1]**o+(0.254044599609)*x[1]+(-0.372925254827)*x[2]**o+(-0.85054008508)*x[2]
-        arg[1,4]=(-0.247156845703)*x[0]**o+(-0.944335229412)*x[0]+(-0.572532409179)*x[1]**o+(0.289091364421)*x[1]+(0.848874739954)*x[2]**o+(0.705098999827)*x[2]
-        arg[2,0]=(0.0958493700534)*x[0]**o+(-0.334070579338)*x[0]+(-0.74117408785)*x[1]**o+(0.0609646344894)*x[1]+(-0.328888690751)*x[2]**o+(-0.0430772626841)*x[2]
-        arg[2,1]=(0.846871401827)*x[0]**o+(0.379912211333)*x[0]+(-0.197881866966)*x[1]**o+(-0.551498190852)*x[1]+(0.416977164384)*x[2]**o+(0.09398324743)*x[2]
-        arg[2,2]=(0.737261473925)*x[0]**o+(0.696028328637)*x[0]+(-0.735110324145)*x[1]**o+(0.949453963809)*x[1]+(-0.894722167055)*x[2]**o+(-0.16124057159)*x[2]
-        arg[2,3]=(0.267556059297)*x[0]**o+(-0.633581895464)*x[0]+(-0.176232065927)*x[1]**o+(0.98533106984)*x[1]+(0.404671434387)*x[2]**o+(0.343560595562)*x[2]
-        arg[2,4]=(0.502981833324)*x[0]**o+(0.716659442696)*x[0]+(-0.349106283426)*x[1]**o+(0.0726954534053)*x[1]+(0.468516366697)*x[2]**o+(0.328926164383)*x[2]
-        arg[3,0]=(0.846509624251)*x[0]**o+(-0.34161660121)*x[0]+(0.25149102353)*x[1]**o+(-0.0130496471853)*x[1]+(-0.556826239055)*x[2]**o+(0.774658667066)*x[2]
-        arg[3,1]=(-0.0777319662414)*x[0]**o+(0.992622365536)*x[0]+(0.720504365851)*x[1]**o+(0.0701085839568)*x[1]+(0.475573965193)*x[2]**o+(0.402599619829)*x[2]
-        arg[3,2]=(-0.311228599853)*x[0]**o+(-0.732684576916)*x[0]+(0.308213192232)*x[1]**o+(-0.131325871896)*x[1]+(0.964631653839)*x[2]**o+(-0.600646614776)*x[2]
-        arg[3,3]=(0.656589254036)*x[0]**o+(-0.275449493207)*x[0]+(-0.611075965309)*x[1]**o+(-0.460879628412)*x[1]+(-0.820861932527)*x[2]**o+(0.424066222721)*x[2]
-        arg[3,4]=(0.303269333663)*x[0]**o+(-0.745774722275)*x[0]+(0.82933539351)*x[1]**o+(-0.295464064484)*x[1]+(0.818135297647)*x[2]**o+(-0.989600307642)*x[2]
-        ref[0,0,0]=o*(0.767891828291)*x_ref[0]**(o-1)+(-0.0840162180616)
-        ref[0,0,1]=o*(-0.942354055114)*x_ref[1]**(o-1)+(-0.458324281794)
-        ref[0,0,2]=o*(-0.837589052489)*x_ref[2]**(o-1)+(-0.49741065871)
-        ref[0,1,0]=o*(-0.770574732815)*x_ref[0]**(o-1)+(0.949362675967)
-        ref[0,1,1]=o*(0.334062389906)*x_ref[1]**(o-1)+(0.589134582043)
-        ref[0,1,2]=o*(0.611876443107)*x_ref[2]**(o-1)+(-0.476746595186)
-        ref[0,2,0]=o*(-0.113076234857)*x_ref[0]**(o-1)+(0.207116555982)
-        ref[0,2,1]=o*(-0.434423505296)*x_ref[1]**(o-1)+(0.582451788291)
-        ref[0,2,2]=o*(-0.858451242875)*x_ref[2]**(o-1)+(-0.229934112115)
-        ref[0,3,0]=o*(0.55494281628)*x_ref[0]**(o-1)+(0.53116989281)
-        ref[0,3,1]=o*(0.150549353151)*x_ref[1]**(o-1)+(0.70886785918)
-        ref[0,3,2]=o*(-0.148436740612)*x_ref[2]**(o-1)+(0.755584812901)
-        ref[0,4,0]=o*(0.0855991607862)*x_ref[0]**(o-1)+(0.509120320151)
-        ref[0,4,1]=o*(-0.303374431746)*x_ref[1]**(o-1)+(0.1813545791)
-        ref[0,4,2]=o*(-0.0434667822132)*x_ref[2]**(o-1)+(0.395447849194)
-        ref[1,0,0]=o*(-0.779720617706)*x_ref[0]**(o-1)+(0.730668258583)
-        ref[1,0,1]=o*(-0.0315884698035)*x_ref[1]**(o-1)+(-0.0929845369431)
-        ref[1,0,2]=o*(0.0853332239352)*x_ref[2]**(o-1)+(0.303372304789)
-        ref[1,1,0]=o*(-0.687021672626)*x_ref[0]**(o-1)+(-0.380139153436)
-        ref[1,1,1]=o*(-0.624774641851)*x_ref[1]**(o-1)+(0.331833510141)
-        ref[1,1,2]=o*(-0.747115143343)*x_ref[2]**(o-1)+(-0.901384102505)
-        ref[1,2,0]=o*(-0.0528543338921)*x_ref[0]**(o-1)+(-0.683764012224)
-        ref[1,2,1]=o*(0.498886779776)*x_ref[1]**(o-1)+(-0.396777215862)
-        ref[1,2,2]=o*(0.777051418657)*x_ref[2]**(o-1)+(-0.786345142641)
-        ref[1,3,0]=o*(-0.823112017253)*x_ref[0]**(o-1)+(0.278818264102)
-        ref[1,3,1]=o*(-0.79372160065)*x_ref[1]**(o-1)+(0.254044599609)
-        ref[1,3,2]=o*(-0.372925254827)*x_ref[2]**(o-1)+(-0.85054008508)
-        ref[1,4,0]=o*(-0.247156845703)*x_ref[0]**(o-1)+(-0.944335229412)
-        ref[1,4,1]=o*(-0.572532409179)*x_ref[1]**(o-1)+(0.289091364421)
-        ref[1,4,2]=o*(0.848874739954)*x_ref[2]**(o-1)+(0.705098999827)
-        ref[2,0,0]=o*(0.0958493700534)*x_ref[0]**(o-1)+(-0.334070579338)
-        ref[2,0,1]=o*(-0.74117408785)*x_ref[1]**(o-1)+(0.0609646344894)
-        ref[2,0,2]=o*(-0.328888690751)*x_ref[2]**(o-1)+(-0.0430772626841)
-        ref[2,1,0]=o*(0.846871401827)*x_ref[0]**(o-1)+(0.379912211333)
-        ref[2,1,1]=o*(-0.197881866966)*x_ref[1]**(o-1)+(-0.551498190852)
-        ref[2,1,2]=o*(0.416977164384)*x_ref[2]**(o-1)+(0.09398324743)
-        ref[2,2,0]=o*(0.737261473925)*x_ref[0]**(o-1)+(0.696028328637)
-        ref[2,2,1]=o*(-0.735110324145)*x_ref[1]**(o-1)+(0.949453963809)
-        ref[2,2,2]=o*(-0.894722167055)*x_ref[2]**(o-1)+(-0.16124057159)
-        ref[2,3,0]=o*(0.267556059297)*x_ref[0]**(o-1)+(-0.633581895464)
-        ref[2,3,1]=o*(-0.176232065927)*x_ref[1]**(o-1)+(0.98533106984)
-        ref[2,3,2]=o*(0.404671434387)*x_ref[2]**(o-1)+(0.343560595562)
-        ref[2,4,0]=o*(0.502981833324)*x_ref[0]**(o-1)+(0.716659442696)
-        ref[2,4,1]=o*(-0.349106283426)*x_ref[1]**(o-1)+(0.0726954534053)
-        ref[2,4,2]=o*(0.468516366697)*x_ref[2]**(o-1)+(0.328926164383)
-        ref[3,0,0]=o*(0.846509624251)*x_ref[0]**(o-1)+(-0.34161660121)
-        ref[3,0,1]=o*(0.25149102353)*x_ref[1]**(o-1)+(-0.0130496471853)
-        ref[3,0,2]=o*(-0.556826239055)*x_ref[2]**(o-1)+(0.774658667066)
-        ref[3,1,0]=o*(-0.0777319662414)*x_ref[0]**(o-1)+(0.992622365536)
-        ref[3,1,1]=o*(0.720504365851)*x_ref[1]**(o-1)+(0.0701085839568)
-        ref[3,1,2]=o*(0.475573965193)*x_ref[2]**(o-1)+(0.402599619829)
-        ref[3,2,0]=o*(-0.311228599853)*x_ref[0]**(o-1)+(-0.732684576916)
-        ref[3,2,1]=o*(0.308213192232)*x_ref[1]**(o-1)+(-0.131325871896)
-        ref[3,2,2]=o*(0.964631653839)*x_ref[2]**(o-1)+(-0.600646614776)
-        ref[3,3,0]=o*(0.656589254036)*x_ref[0]**(o-1)+(-0.275449493207)
-        ref[3,3,1]=o*(-0.611075965309)*x_ref[1]**(o-1)+(-0.460879628412)
-        ref[3,3,2]=o*(-0.820861932527)*x_ref[2]**(o-1)+(0.424066222721)
-        ref[3,4,0]=o*(0.303269333663)*x_ref[0]**(o-1)+(-0.745774722275)
-        ref[3,4,1]=o*(0.82933539351)*x_ref[1]**(o-1)+(-0.295464064484)
-        ref[3,4,2]=o*(0.818135297647)*x_ref[2]**(o-1)+(-0.989600307642)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunction
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.572693829631)*x[0]**o+(0.583556749477)*x[0]+(0.22594627003)*x[1]**o+(0.0199162626119)*x[1]
-        arg[0,0,1]=(0.196266833125)*x[0]**o+(0.544824498113)*x[0]+(0.150736772157)*x[1]**o+(0.362174902716)*x[1]
-        arg[0,1,0]=(0.169481539273)*x[0]**o+(0.0355504217105)*x[0]+(-0.156746013218)*x[1]**o+(0.879476257954)*x[1]
-        arg[0,1,1]=(0.824826637612)*x[0]**o+(-0.732645177858)*x[0]+(0.732873648361)*x[1]**o+(-0.40090515696)*x[1]
-        arg[1,0,0]=(0.77348720999)*x[0]**o+(0.229475702878)*x[0]+(0.686324947328)*x[1]**o+(0.313197971717)*x[1]
-        arg[1,0,1]=(-0.966626441904)*x[0]**o+(0.989778282376)*x[0]+(0.0447214020611)*x[1]**o+(0.439337525343)*x[1]
-        arg[1,1,0]=(-0.774806567769)*x[0]**o+(0.634591112025)*x[0]+(0.797720133135)*x[1]**o+(0.579137230562)*x[1]
-        arg[1,1,1]=(-0.118703583742)*x[0]**o+(0.482822282284)*x[0]+(0.141839968056)*x[1]**o+(0.916615496002)*x[1]
-        arg[2,0,0]=(0.7419378407)*x[0]**o+(0.754978933397)*x[0]+(-0.839586800033)*x[1]**o+(-0.525830008753)*x[1]
-        arg[2,0,1]=(-0.855040380309)*x[0]**o+(0.423661210447)*x[0]+(0.538277902172)*x[1]**o+(0.127617006384)*x[1]
-        arg[2,1,0]=(0.107349578938)*x[0]**o+(0.697738123598)*x[0]+(0.862106802027)*x[1]**o+(-0.829827651082)*x[1]
-        arg[2,1,1]=(-0.970208311818)*x[0]**o+(0.806698181512)*x[0]+(-0.374007524144)*x[1]**o+(-0.0600501198736)*x[1]
-        arg[3,0,0]=(0.223312188411)*x[0]**o+(-0.130776319489)*x[0]+(0.616021313401)*x[1]**o+(-0.552848902138)*x[1]
-        arg[3,0,1]=(-0.461837450406)*x[0]**o+(-0.895912538242)*x[0]+(0.477606324718)*x[1]**o+(0.220148409572)*x[1]
-        arg[3,1,0]=(0.0783005249695)*x[0]**o+(-0.762350707337)*x[0]+(0.616470467018)*x[1]**o+(-0.154358859634)*x[1]
-        arg[3,1,1]=(-0.604945998091)*x[0]**o+(0.23801834237)*x[0]+(0.500666300529)*x[1]**o+(0.709482270038)*x[1]
-        arg[4,0,0]=(0.746627054515)*x[0]**o+(0.550282853502)*x[0]+(-0.223527434147)*x[1]**o+(-0.291559486198)*x[1]
-        arg[4,0,1]=(0.512462457431)*x[0]**o+(0.0908594735188)*x[0]+(-0.888862229845)*x[1]**o+(-0.969985508695)*x[1]
-        arg[4,1,0]=(0.606213701819)*x[0]**o+(0.147049558356)*x[0]+(-0.0365908849884)*x[1]**o+(-0.584510320466)*x[1]
-        arg[4,1,1]=(-0.110180223906)*x[0]**o+(-0.83442554862)*x[0]+(-0.0516097061459)*x[1]**o+(-0.155615857347)*x[1]
-        arg[5,0,0]=(0.603753207781)*x[0]**o+(0.302032475639)*x[0]+(-0.68719165993)*x[1]**o+(-0.375829665239)*x[1]
-        arg[5,0,1]=(-0.599357977805)*x[0]**o+(0.562486062075)*x[0]+(0.102714751356)*x[1]**o+(-0.114179799185)*x[1]
-        arg[5,1,0]=(0.874756501256)*x[0]**o+(0.550416007969)*x[0]+(0.669721605367)*x[1]**o+(0.24372600222)*x[1]
-        arg[5,1,1]=(0.651356889701)*x[0]**o+(0.178366196323)*x[0]+(0.762268544189)*x[1]**o+(0.515014711815)*x[1]
-        ref[0,0,0,0]=o*(-0.572693829631)*x_ref[0]**(o-1)+(0.583556749477)
-        ref[0,0,0,1]=o*(0.22594627003)*x_ref[1]**(o-1)+(0.0199162626119)
-        ref[0,0,1,0]=o*(0.196266833125)*x_ref[0]**(o-1)+(0.544824498113)
-        ref[0,0,1,1]=o*(0.150736772157)*x_ref[1]**(o-1)+(0.362174902716)
-        ref[0,1,0,0]=o*(0.169481539273)*x_ref[0]**(o-1)+(0.0355504217105)
-        ref[0,1,0,1]=o*(-0.156746013218)*x_ref[1]**(o-1)+(0.879476257954)
-        ref[0,1,1,0]=o*(0.824826637612)*x_ref[0]**(o-1)+(-0.732645177858)
-        ref[0,1,1,1]=o*(0.732873648361)*x_ref[1]**(o-1)+(-0.40090515696)
-        ref[1,0,0,0]=o*(0.77348720999)*x_ref[0]**(o-1)+(0.229475702878)
-        ref[1,0,0,1]=o*(0.686324947328)*x_ref[1]**(o-1)+(0.313197971717)
-        ref[1,0,1,0]=o*(-0.966626441904)*x_ref[0]**(o-1)+(0.989778282376)
-        ref[1,0,1,1]=o*(0.0447214020611)*x_ref[1]**(o-1)+(0.439337525343)
-        ref[1,1,0,0]=o*(-0.774806567769)*x_ref[0]**(o-1)+(0.634591112025)
-        ref[1,1,0,1]=o*(0.797720133135)*x_ref[1]**(o-1)+(0.579137230562)
-        ref[1,1,1,0]=o*(-0.118703583742)*x_ref[0]**(o-1)+(0.482822282284)
-        ref[1,1,1,1]=o*(0.141839968056)*x_ref[1]**(o-1)+(0.916615496002)
-        ref[2,0,0,0]=o*(0.7419378407)*x_ref[0]**(o-1)+(0.754978933397)
-        ref[2,0,0,1]=o*(-0.839586800033)*x_ref[1]**(o-1)+(-0.525830008753)
-        ref[2,0,1,0]=o*(-0.855040380309)*x_ref[0]**(o-1)+(0.423661210447)
-        ref[2,0,1,1]=o*(0.538277902172)*x_ref[1]**(o-1)+(0.127617006384)
-        ref[2,1,0,0]=o*(0.107349578938)*x_ref[0]**(o-1)+(0.697738123598)
-        ref[2,1,0,1]=o*(0.862106802027)*x_ref[1]**(o-1)+(-0.829827651082)
-        ref[2,1,1,0]=o*(-0.970208311818)*x_ref[0]**(o-1)+(0.806698181512)
-        ref[2,1,1,1]=o*(-0.374007524144)*x_ref[1]**(o-1)+(-0.0600501198736)
-        ref[3,0,0,0]=o*(0.223312188411)*x_ref[0]**(o-1)+(-0.130776319489)
-        ref[3,0,0,1]=o*(0.616021313401)*x_ref[1]**(o-1)+(-0.552848902138)
-        ref[3,0,1,0]=o*(-0.461837450406)*x_ref[0]**(o-1)+(-0.895912538242)
-        ref[3,0,1,1]=o*(0.477606324718)*x_ref[1]**(o-1)+(0.220148409572)
-        ref[3,1,0,0]=o*(0.0783005249695)*x_ref[0]**(o-1)+(-0.762350707337)
-        ref[3,1,0,1]=o*(0.616470467018)*x_ref[1]**(o-1)+(-0.154358859634)
-        ref[3,1,1,0]=o*(-0.604945998091)*x_ref[0]**(o-1)+(0.23801834237)
-        ref[3,1,1,1]=o*(0.500666300529)*x_ref[1]**(o-1)+(0.709482270038)
-        ref[4,0,0,0]=o*(0.746627054515)*x_ref[0]**(o-1)+(0.550282853502)
-        ref[4,0,0,1]=o*(-0.223527434147)*x_ref[1]**(o-1)+(-0.291559486198)
-        ref[4,0,1,0]=o*(0.512462457431)*x_ref[0]**(o-1)+(0.0908594735188)
-        ref[4,0,1,1]=o*(-0.888862229845)*x_ref[1]**(o-1)+(-0.969985508695)
-        ref[4,1,0,0]=o*(0.606213701819)*x_ref[0]**(o-1)+(0.147049558356)
-        ref[4,1,0,1]=o*(-0.0365908849884)*x_ref[1]**(o-1)+(-0.584510320466)
-        ref[4,1,1,0]=o*(-0.110180223906)*x_ref[0]**(o-1)+(-0.83442554862)
-        ref[4,1,1,1]=o*(-0.0516097061459)*x_ref[1]**(o-1)+(-0.155615857347)
-        ref[5,0,0,0]=o*(0.603753207781)*x_ref[0]**(o-1)+(0.302032475639)
-        ref[5,0,0,1]=o*(-0.68719165993)*x_ref[1]**(o-1)+(-0.375829665239)
-        ref[5,0,1,0]=o*(-0.599357977805)*x_ref[0]**(o-1)+(0.562486062075)
-        ref[5,0,1,1]=o*(0.102714751356)*x_ref[1]**(o-1)+(-0.114179799185)
-        ref[5,1,0,0]=o*(0.874756501256)*x_ref[0]**(o-1)+(0.550416007969)
-        ref[5,1,0,1]=o*(0.669721605367)*x_ref[1]**(o-1)+(0.24372600222)
-        ref[5,1,1,0]=o*(0.651356889701)*x_ref[0]**(o-1)+(0.178366196323)
-        ref[5,1,1,1]=o*(0.762268544189)*x_ref[1]**(o-1)+(0.515014711815)
-      else:
-        arg[0,0,0]=(-0.634739027866)*x[0]**o+(-0.696370463772)*x[0]+(0.503815931458)*x[1]**o+(-0.457824888032)*x[1]+(0.655074800235)*x[2]**o+(-0.456111009206)*x[2]
-        arg[0,0,1]=(-0.533710147141)*x[0]**o+(-0.0814085290298)*x[0]+(-0.0894565935545)*x[1]**o+(-0.3775655102)*x[1]+(-0.134051544262)*x[2]**o+(0.000713749886013)*x[2]
-        arg[0,1,0]=(-0.64394535332)*x[0]**o+(0.430741797171)*x[0]+(0.985157009863)*x[1]**o+(-0.655331266432)*x[1]+(-0.436629135988)*x[2]**o+(-0.404480211702)*x[2]
-        arg[0,1,1]=(-0.0858143551662)*x[0]**o+(0.0452769288327)*x[0]+(0.930452744895)*x[1]**o+(-0.877149214078)*x[1]+(0.675472222413)*x[2]**o+(0.917497654616)*x[2]
-        arg[1,0,0]=(0.88346309442)*x[0]**o+(0.892116796676)*x[0]+(0.22765643526)*x[1]**o+(-0.934442833938)*x[1]+(0.0781755340006)*x[2]**o+(0.106009847768)*x[2]
-        arg[1,0,1]=(0.20824563298)*x[0]**o+(0.613584602599)*x[0]+(-0.482386438919)*x[1]**o+(-0.155840561301)*x[1]+(0.817890842096)*x[2]**o+(0.798519843541)*x[2]
-        arg[1,1,0]=(-0.915853569389)*x[0]**o+(0.573041720657)*x[0]+(0.236967108991)*x[1]**o+(0.421805849528)*x[1]+(-0.576407564364)*x[2]**o+(0.0709741076428)*x[2]
-        arg[1,1,1]=(0.530417188741)*x[0]**o+(0.872073272277)*x[0]+(-0.21047376763)*x[1]**o+(0.88490064655)*x[1]+(0.523085602451)*x[2]**o+(-0.926133382905)*x[2]
-        arg[2,0,0]=(-0.974186019136)*x[0]**o+(-0.332433414417)*x[0]+(-0.500938330608)*x[1]**o+(-0.113188574497)*x[1]+(0.228656301416)*x[2]**o+(-0.375756425313)*x[2]
-        arg[2,0,1]=(0.246057421673)*x[0]**o+(0.231587929687)*x[0]+(0.398413883486)*x[1]**o+(-0.390998026525)*x[1]+(0.273401149062)*x[2]**o+(-0.296142647578)*x[2]
-        arg[2,1,0]=(0.283717204372)*x[0]**o+(-0.545852417255)*x[0]+(-0.616345461169)*x[1]**o+(-0.705051061202)*x[1]+(0.664377876346)*x[2]**o+(0.338382503272)*x[2]
-        arg[2,1,1]=(-0.433297970157)*x[0]**o+(-0.716600154712)*x[0]+(0.836194932687)*x[1]**o+(0.0903372116119)*x[1]+(0.113374499353)*x[2]**o+(-0.588810627425)*x[2]
-        arg[3,0,0]=(0.404388255474)*x[0]**o+(0.521816615546)*x[0]+(-0.0976581170689)*x[1]**o+(-0.678563989037)*x[1]+(0.550953471125)*x[2]**o+(-0.668793844235)*x[2]
-        arg[3,0,1]=(-0.66023047868)*x[0]**o+(0.822794930168)*x[0]+(-0.284215677966)*x[1]**o+(-0.779237447318)*x[1]+(-0.191727752719)*x[2]**o+(-0.748596484262)*x[2]
-        arg[3,1,0]=(-0.0610807571905)*x[0]**o+(0.044623781518)*x[0]+(0.851226664753)*x[1]**o+(0.921090244094)*x[1]+(0.494414571241)*x[2]**o+(-0.473831333684)*x[2]
-        arg[3,1,1]=(0.54651807228)*x[0]**o+(-0.580525990778)*x[0]+(-0.822936606301)*x[1]**o+(-0.0169562878937)*x[1]+(-0.732219249555)*x[2]**o+(-0.435156155008)*x[2]
-        arg[4,0,0]=(0.830021032139)*x[0]**o+(0.976836986062)*x[0]+(0.534162405111)*x[1]**o+(-0.286292103539)*x[1]+(0.820276894761)*x[2]**o+(0.245897387706)*x[2]
-        arg[4,0,1]=(0.362201493311)*x[0]**o+(-0.186328147108)*x[0]+(-0.91611458572)*x[1]**o+(-0.965258904175)*x[1]+(0.61850292372)*x[2]**o+(0.410229835478)*x[2]
-        arg[4,1,0]=(0.0726313013515)*x[0]**o+(-0.974714544914)*x[0]+(0.46313543268)*x[1]**o+(0.100486704072)*x[1]+(-0.149124857233)*x[2]**o+(0.455733236337)*x[2]
-        arg[4,1,1]=(-0.875220220201)*x[0]**o+(-0.416152301789)*x[0]+(-0.0145627466423)*x[1]**o+(0.267856009119)*x[1]+(-0.604260174049)*x[2]**o+(0.689107997051)*x[2]
-        arg[5,0,0]=(0.196182127971)*x[0]**o+(0.337209503833)*x[0]+(0.595342239158)*x[1]**o+(0.507423300857)*x[1]+(0.934760469389)*x[2]**o+(-0.198686443328)*x[2]
-        arg[5,0,1]=(0.77210909967)*x[0]**o+(-0.310778136545)*x[0]+(0.512326103142)*x[1]**o+(-0.501056206243)*x[1]+(0.98755961257)*x[2]**o+(-0.658414340038)*x[2]
-        arg[5,1,0]=(0.375277702198)*x[0]**o+(-0.603850047717)*x[0]+(0.677227868069)*x[1]**o+(-0.784640615159)*x[1]+(0.177350721639)*x[2]**o+(0.241053657333)*x[2]
-        arg[5,1,1]=(-0.368625522736)*x[0]**o+(0.196977476909)*x[0]+(-0.582451887206)*x[1]**o+(0.598240904158)*x[1]+(0.102240230796)*x[2]**o+(0.487322529158)*x[2]
-        ref[0,0,0,0]=o*(-0.634739027866)*x_ref[0]**(o-1)+(-0.696370463772)
-        ref[0,0,0,1]=o*(0.503815931458)*x_ref[1]**(o-1)+(-0.457824888032)
-        ref[0,0,0,2]=o*(0.655074800235)*x_ref[2]**(o-1)+(-0.456111009206)
-        ref[0,0,1,0]=o*(-0.533710147141)*x_ref[0]**(o-1)+(-0.0814085290298)
-        ref[0,0,1,1]=o*(-0.0894565935545)*x_ref[1]**(o-1)+(-0.3775655102)
-        ref[0,0,1,2]=o*(-0.134051544262)*x_ref[2]**(o-1)+(0.000713749886013)
-        ref[0,1,0,0]=o*(-0.64394535332)*x_ref[0]**(o-1)+(0.430741797171)
-        ref[0,1,0,1]=o*(0.985157009863)*x_ref[1]**(o-1)+(-0.655331266432)
-        ref[0,1,0,2]=o*(-0.436629135988)*x_ref[2]**(o-1)+(-0.404480211702)
-        ref[0,1,1,0]=o*(-0.0858143551662)*x_ref[0]**(o-1)+(0.0452769288327)
-        ref[0,1,1,1]=o*(0.930452744895)*x_ref[1]**(o-1)+(-0.877149214078)
-        ref[0,1,1,2]=o*(0.675472222413)*x_ref[2]**(o-1)+(0.917497654616)
-        ref[1,0,0,0]=o*(0.88346309442)*x_ref[0]**(o-1)+(0.892116796676)
-        ref[1,0,0,1]=o*(0.22765643526)*x_ref[1]**(o-1)+(-0.934442833938)
-        ref[1,0,0,2]=o*(0.0781755340006)*x_ref[2]**(o-1)+(0.106009847768)
-        ref[1,0,1,0]=o*(0.20824563298)*x_ref[0]**(o-1)+(0.613584602599)
-        ref[1,0,1,1]=o*(-0.482386438919)*x_ref[1]**(o-1)+(-0.155840561301)
-        ref[1,0,1,2]=o*(0.817890842096)*x_ref[2]**(o-1)+(0.798519843541)
-        ref[1,1,0,0]=o*(-0.915853569389)*x_ref[0]**(o-1)+(0.573041720657)
-        ref[1,1,0,1]=o*(0.236967108991)*x_ref[1]**(o-1)+(0.421805849528)
-        ref[1,1,0,2]=o*(-0.576407564364)*x_ref[2]**(o-1)+(0.0709741076428)
-        ref[1,1,1,0]=o*(0.530417188741)*x_ref[0]**(o-1)+(0.872073272277)
-        ref[1,1,1,1]=o*(-0.21047376763)*x_ref[1]**(o-1)+(0.88490064655)
-        ref[1,1,1,2]=o*(0.523085602451)*x_ref[2]**(o-1)+(-0.926133382905)
-        ref[2,0,0,0]=o*(-0.974186019136)*x_ref[0]**(o-1)+(-0.332433414417)
-        ref[2,0,0,1]=o*(-0.500938330608)*x_ref[1]**(o-1)+(-0.113188574497)
-        ref[2,0,0,2]=o*(0.228656301416)*x_ref[2]**(o-1)+(-0.375756425313)
-        ref[2,0,1,0]=o*(0.246057421673)*x_ref[0]**(o-1)+(0.231587929687)
-        ref[2,0,1,1]=o*(0.398413883486)*x_ref[1]**(o-1)+(-0.390998026525)
-        ref[2,0,1,2]=o*(0.273401149062)*x_ref[2]**(o-1)+(-0.296142647578)
-        ref[2,1,0,0]=o*(0.283717204372)*x_ref[0]**(o-1)+(-0.545852417255)
-        ref[2,1,0,1]=o*(-0.616345461169)*x_ref[1]**(o-1)+(-0.705051061202)
-        ref[2,1,0,2]=o*(0.664377876346)*x_ref[2]**(o-1)+(0.338382503272)
-        ref[2,1,1,0]=o*(-0.433297970157)*x_ref[0]**(o-1)+(-0.716600154712)
-        ref[2,1,1,1]=o*(0.836194932687)*x_ref[1]**(o-1)+(0.0903372116119)
-        ref[2,1,1,2]=o*(0.113374499353)*x_ref[2]**(o-1)+(-0.588810627425)
-        ref[3,0,0,0]=o*(0.404388255474)*x_ref[0]**(o-1)+(0.521816615546)
-        ref[3,0,0,1]=o*(-0.0976581170689)*x_ref[1]**(o-1)+(-0.678563989037)
-        ref[3,0,0,2]=o*(0.550953471125)*x_ref[2]**(o-1)+(-0.668793844235)
-        ref[3,0,1,0]=o*(-0.66023047868)*x_ref[0]**(o-1)+(0.822794930168)
-        ref[3,0,1,1]=o*(-0.284215677966)*x_ref[1]**(o-1)+(-0.779237447318)
-        ref[3,0,1,2]=o*(-0.191727752719)*x_ref[2]**(o-1)+(-0.748596484262)
-        ref[3,1,0,0]=o*(-0.0610807571905)*x_ref[0]**(o-1)+(0.044623781518)
-        ref[3,1,0,1]=o*(0.851226664753)*x_ref[1]**(o-1)+(0.921090244094)
-        ref[3,1,0,2]=o*(0.494414571241)*x_ref[2]**(o-1)+(-0.473831333684)
-        ref[3,1,1,0]=o*(0.54651807228)*x_ref[0]**(o-1)+(-0.580525990778)
-        ref[3,1,1,1]=o*(-0.822936606301)*x_ref[1]**(o-1)+(-0.0169562878937)
-        ref[3,1,1,2]=o*(-0.732219249555)*x_ref[2]**(o-1)+(-0.435156155008)
-        ref[4,0,0,0]=o*(0.830021032139)*x_ref[0]**(o-1)+(0.976836986062)
-        ref[4,0,0,1]=o*(0.534162405111)*x_ref[1]**(o-1)+(-0.286292103539)
-        ref[4,0,0,2]=o*(0.820276894761)*x_ref[2]**(o-1)+(0.245897387706)
-        ref[4,0,1,0]=o*(0.362201493311)*x_ref[0]**(o-1)+(-0.186328147108)
-        ref[4,0,1,1]=o*(-0.91611458572)*x_ref[1]**(o-1)+(-0.965258904175)
-        ref[4,0,1,2]=o*(0.61850292372)*x_ref[2]**(o-1)+(0.410229835478)
-        ref[4,1,0,0]=o*(0.0726313013515)*x_ref[0]**(o-1)+(-0.974714544914)
-        ref[4,1,0,1]=o*(0.46313543268)*x_ref[1]**(o-1)+(0.100486704072)
-        ref[4,1,0,2]=o*(-0.149124857233)*x_ref[2]**(o-1)+(0.455733236337)
-        ref[4,1,1,0]=o*(-0.875220220201)*x_ref[0]**(o-1)+(-0.416152301789)
-        ref[4,1,1,1]=o*(-0.0145627466423)*x_ref[1]**(o-1)+(0.267856009119)
-        ref[4,1,1,2]=o*(-0.604260174049)*x_ref[2]**(o-1)+(0.689107997051)
-        ref[5,0,0,0]=o*(0.196182127971)*x_ref[0]**(o-1)+(0.337209503833)
-        ref[5,0,0,1]=o*(0.595342239158)*x_ref[1]**(o-1)+(0.507423300857)
-        ref[5,0,0,2]=o*(0.934760469389)*x_ref[2]**(o-1)+(-0.198686443328)
-        ref[5,0,1,0]=o*(0.77210909967)*x_ref[0]**(o-1)+(-0.310778136545)
-        ref[5,0,1,1]=o*(0.512326103142)*x_ref[1]**(o-1)+(-0.501056206243)
-        ref[5,0,1,2]=o*(0.98755961257)*x_ref[2]**(o-1)+(-0.658414340038)
-        ref[5,1,0,0]=o*(0.375277702198)*x_ref[0]**(o-1)+(-0.603850047717)
-        ref[5,1,0,1]=o*(0.677227868069)*x_ref[1]**(o-1)+(-0.784640615159)
-        ref[5,1,0,2]=o*(0.177350721639)*x_ref[2]**(o-1)+(0.241053657333)
-        ref[5,1,1,0]=o*(-0.368625522736)*x_ref[0]**(o-1)+(0.196977476909)
-        ref[5,1,1,1]=o*(-0.582451887206)*x_ref[1]**(o-1)+(0.598240904158)
-        ref[5,1,1,2]=o*(0.102240230796)*x_ref[2]**(o-1)+(0.487322529158)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunction
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.851643614423)*x[0]**o+(-0.77638754265)*x[0]+(-0.216746360457)*x[1]**o+(-0.117807364973)*x[1]
-        ref[0]=o*(0.851643614423)*x_ref[0]**(o-1)+(-0.77638754265)
-        ref[1]=o*(-0.216746360457)*x_ref[1]**(o-1)+(-0.117807364973)
-      else:
-        arg=(0.846271449213)*x[0]**o+(0.895578416904)*x[0]+(-0.518297490388)*x[1]**o+(0.272255265951)*x[1]+(0.537822992528)*x[2]**o+(0.74226977002)*x[2]
-        ref[0]=o*(0.846271449213)*x_ref[0]**(o-1)+(0.895578416904)
-        ref[1]=o*(-0.518297490388)*x_ref[1]**(o-1)+(0.272255265951)
-        ref[2]=o*(0.537822992528)*x_ref[2]**(o-1)+(0.74226977002)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunction
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.365601318395)*x[0]**o+(0.295624555802)*x[0]+(0.540618182217)*x[1]**o+(0.0458416078386)*x[1]
-        arg[1]=(0.332276039998)*x[0]**o+(0.422606936253)*x[0]+(-0.221603594854)*x[1]**o+(0.879863420258)*x[1]
-        ref[0,0]=o*(0.365601318395)*x_ref[0]**(o-1)+(0.295624555802)
-        ref[0,1]=o*(0.540618182217)*x_ref[1]**(o-1)+(0.0458416078386)
-        ref[1,0]=o*(0.332276039998)*x_ref[0]**(o-1)+(0.422606936253)
-        ref[1,1]=o*(-0.221603594854)*x_ref[1]**(o-1)+(0.879863420258)
-      else:
-        arg[0]=(-0.258072277129)*x[0]**o+(-0.833085462518)*x[0]+(-0.124240965858)*x[1]**o+(-0.121853073047)*x[1]+(-0.877974471569)*x[2]**o+(0.929660451331)*x[2]
-        arg[1]=(0.306520203535)*x[0]**o+(0.635444320723)*x[0]+(-0.766579509915)*x[1]**o+(-0.381189007175)*x[1]+(-0.76608952351)*x[2]**o+(0.00718583364881)*x[2]
-        ref[0,0]=o*(-0.258072277129)*x_ref[0]**(o-1)+(-0.833085462518)
-        ref[0,1]=o*(-0.124240965858)*x_ref[1]**(o-1)+(-0.121853073047)
-        ref[0,2]=o*(-0.877974471569)*x_ref[2]**(o-1)+(0.929660451331)
-        ref[1,0]=o*(0.306520203535)*x_ref[0]**(o-1)+(0.635444320723)
-        ref[1,1]=o*(-0.766579509915)*x_ref[1]**(o-1)+(-0.381189007175)
-        ref[1,2]=o*(-0.76608952351)*x_ref[2]**(o-1)+(0.00718583364881)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunction
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.403088506806)*x[0]**o+(-0.436942773988)*x[0]+(-0.0594011537346)*x[1]**o+(0.855063195595)*x[1]
-        arg[0,1]=(-0.516992303892)*x[0]**o+(-0.132586737299)*x[0]+(-0.854639239618)*x[1]**o+(0.241200454455)*x[1]
-        arg[0,2]=(-0.373941155498)*x[0]**o+(0.933328225549)*x[0]+(-0.986870460316)*x[1]**o+(-0.051265908773)*x[1]
-        arg[0,3]=(-0.175701653328)*x[0]**o+(-0.726542005356)*x[0]+(-0.553505635409)*x[1]**o+(-0.199806969718)*x[1]
-        arg[0,4]=(-0.750832127973)*x[0]**o+(0.404511387161)*x[0]+(0.874423404897)*x[1]**o+(0.35360129734)*x[1]
-        arg[1,0]=(-0.000191271001285)*x[0]**o+(-0.319365399066)*x[0]+(0.398444976089)*x[1]**o+(-0.966391658006)*x[1]
-        arg[1,1]=(-0.58562890965)*x[0]**o+(-0.623992315262)*x[0]+(-0.913704774126)*x[1]**o+(0.910305409081)*x[1]
-        arg[1,2]=(-0.480491011401)*x[0]**o+(-0.387015926056)*x[0]+(0.845826744282)*x[1]**o+(0.380626980034)*x[1]
-        arg[1,3]=(-0.284167706438)*x[0]**o+(0.730574128045)*x[0]+(0.823389953051)*x[1]**o+(0.59483032515)*x[1]
-        arg[1,4]=(-0.545147810354)*x[0]**o+(-0.632923743497)*x[0]+(0.619596244096)*x[1]**o+(-0.816596365827)*x[1]
-        arg[2,0]=(0.161289895106)*x[0]**o+(0.435472177094)*x[0]+(0.125591455076)*x[1]**o+(0.0207320895937)*x[1]
-        arg[2,1]=(0.639457164801)*x[0]**o+(0.2631408826)*x[0]+(0.00255095677899)*x[1]**o+(0.732164720004)*x[1]
-        arg[2,2]=(-0.152014092979)*x[0]**o+(0.347024615036)*x[0]+(0.94212294017)*x[1]**o+(0.173939724203)*x[1]
-        arg[2,3]=(-0.0324872553975)*x[0]**o+(-0.969492827039)*x[0]+(-0.830876162378)*x[1]**o+(0.601308513636)*x[1]
-        arg[2,4]=(0.932999309515)*x[0]**o+(0.0320937041249)*x[0]+(-0.354492894455)*x[1]**o+(-0.752837146132)*x[1]
-        arg[3,0]=(0.995147840382)*x[0]**o+(-0.276974278934)*x[0]+(0.905272259272)*x[1]**o+(-0.433178159448)*x[1]
-        arg[3,1]=(-0.291708633096)*x[0]**o+(-0.542000555721)*x[0]+(0.372404748364)*x[1]**o+(0.23140215774)*x[1]
-        arg[3,2]=(0.88604771071)*x[0]**o+(-0.753078356803)*x[0]+(-0.265302521749)*x[1]**o+(-0.948898850214)*x[1]
-        arg[3,3]=(-0.429496844082)*x[0]**o+(0.0731695917195)*x[0]+(0.291387878783)*x[1]**o+(-0.078863825039)*x[1]
-        arg[3,4]=(-0.0067999635984)*x[0]**o+(0.488018496019)*x[0]+(-0.875646054486)*x[1]**o+(0.629803284064)*x[1]
-        ref[0,0,0]=o*(0.403088506806)*x_ref[0]**(o-1)+(-0.436942773988)
-        ref[0,0,1]=o*(-0.0594011537346)*x_ref[1]**(o-1)+(0.855063195595)
-        ref[0,1,0]=o*(-0.516992303892)*x_ref[0]**(o-1)+(-0.132586737299)
-        ref[0,1,1]=o*(-0.854639239618)*x_ref[1]**(o-1)+(0.241200454455)
-        ref[0,2,0]=o*(-0.373941155498)*x_ref[0]**(o-1)+(0.933328225549)
-        ref[0,2,1]=o*(-0.986870460316)*x_ref[1]**(o-1)+(-0.051265908773)
-        ref[0,3,0]=o*(-0.175701653328)*x_ref[0]**(o-1)+(-0.726542005356)
-        ref[0,3,1]=o*(-0.553505635409)*x_ref[1]**(o-1)+(-0.199806969718)
-        ref[0,4,0]=o*(-0.750832127973)*x_ref[0]**(o-1)+(0.404511387161)
-        ref[0,4,1]=o*(0.874423404897)*x_ref[1]**(o-1)+(0.35360129734)
-        ref[1,0,0]=o*(-0.000191271001285)*x_ref[0]**(o-1)+(-0.319365399066)
-        ref[1,0,1]=o*(0.398444976089)*x_ref[1]**(o-1)+(-0.966391658006)
-        ref[1,1,0]=o*(-0.58562890965)*x_ref[0]**(o-1)+(-0.623992315262)
-        ref[1,1,1]=o*(-0.913704774126)*x_ref[1]**(o-1)+(0.910305409081)
-        ref[1,2,0]=o*(-0.480491011401)*x_ref[0]**(o-1)+(-0.387015926056)
-        ref[1,2,1]=o*(0.845826744282)*x_ref[1]**(o-1)+(0.380626980034)
-        ref[1,3,0]=o*(-0.284167706438)*x_ref[0]**(o-1)+(0.730574128045)
-        ref[1,3,1]=o*(0.823389953051)*x_ref[1]**(o-1)+(0.59483032515)
-        ref[1,4,0]=o*(-0.545147810354)*x_ref[0]**(o-1)+(-0.632923743497)
-        ref[1,4,1]=o*(0.619596244096)*x_ref[1]**(o-1)+(-0.816596365827)
-        ref[2,0,0]=o*(0.161289895106)*x_ref[0]**(o-1)+(0.435472177094)
-        ref[2,0,1]=o*(0.125591455076)*x_ref[1]**(o-1)+(0.0207320895937)
-        ref[2,1,0]=o*(0.639457164801)*x_ref[0]**(o-1)+(0.2631408826)
-        ref[2,1,1]=o*(0.00255095677899)*x_ref[1]**(o-1)+(0.732164720004)
-        ref[2,2,0]=o*(-0.152014092979)*x_ref[0]**(o-1)+(0.347024615036)
-        ref[2,2,1]=o*(0.94212294017)*x_ref[1]**(o-1)+(0.173939724203)
-        ref[2,3,0]=o*(-0.0324872553975)*x_ref[0]**(o-1)+(-0.969492827039)
-        ref[2,3,1]=o*(-0.830876162378)*x_ref[1]**(o-1)+(0.601308513636)
-        ref[2,4,0]=o*(0.932999309515)*x_ref[0]**(o-1)+(0.0320937041249)
-        ref[2,4,1]=o*(-0.354492894455)*x_ref[1]**(o-1)+(-0.752837146132)
-        ref[3,0,0]=o*(0.995147840382)*x_ref[0]**(o-1)+(-0.276974278934)
-        ref[3,0,1]=o*(0.905272259272)*x_ref[1]**(o-1)+(-0.433178159448)
-        ref[3,1,0]=o*(-0.291708633096)*x_ref[0]**(o-1)+(-0.542000555721)
-        ref[3,1,1]=o*(0.372404748364)*x_ref[1]**(o-1)+(0.23140215774)
-        ref[3,2,0]=o*(0.88604771071)*x_ref[0]**(o-1)+(-0.753078356803)
-        ref[3,2,1]=o*(-0.265302521749)*x_ref[1]**(o-1)+(-0.948898850214)
-        ref[3,3,0]=o*(-0.429496844082)*x_ref[0]**(o-1)+(0.0731695917195)
-        ref[3,3,1]=o*(0.291387878783)*x_ref[1]**(o-1)+(-0.078863825039)
-        ref[3,4,0]=o*(-0.0067999635984)*x_ref[0]**(o-1)+(0.488018496019)
-        ref[3,4,1]=o*(-0.875646054486)*x_ref[1]**(o-1)+(0.629803284064)
-      else:
-        arg[0,0]=(-0.512668741406)*x[0]**o+(-0.73142104842)*x[0]+(0.489050993226)*x[1]**o+(0.771941571419)*x[1]+(-0.538092512577)*x[2]**o+(-0.457812389328)*x[2]
-        arg[0,1]=(0.258566436386)*x[0]**o+(-0.572006860118)*x[0]+(-0.0370305840623)*x[1]**o+(0.328810934717)*x[1]+(-0.652873123265)*x[2]**o+(0.734929914374)*x[2]
-        arg[0,2]=(-0.228462027625)*x[0]**o+(-0.873359484139)*x[0]+(0.902575701641)*x[1]**o+(0.428758160478)*x[1]+(-0.377042847702)*x[2]**o+(-0.161364604019)*x[2]
-        arg[0,3]=(0.31338185054)*x[0]**o+(0.973849539932)*x[0]+(-0.403569231167)*x[1]**o+(-0.110026269257)*x[1]+(0.603101392345)*x[2]**o+(0.499232034173)*x[2]
-        arg[0,4]=(0.468416317974)*x[0]**o+(-0.0154203909264)*x[0]+(0.409228888268)*x[1]**o+(0.358886480877)*x[1]+(-0.00677343401301)*x[2]**o+(-0.0567153195302)*x[2]
-        arg[1,0]=(0.614929795628)*x[0]**o+(0.54911679279)*x[0]+(0.527138394555)*x[1]**o+(-0.84070465171)*x[1]+(0.421928294706)*x[2]**o+(-0.871734463848)*x[2]
-        arg[1,1]=(-0.498770327357)*x[0]**o+(0.294610855431)*x[0]+(-0.815129074288)*x[1]**o+(0.395332176796)*x[1]+(-0.555947305527)*x[2]**o+(-0.623550814988)*x[2]
-        arg[1,2]=(-0.369404109593)*x[0]**o+(-0.662927702362)*x[0]+(0.886789099892)*x[1]**o+(-0.815728539359)*x[1]+(-0.843861162574)*x[2]**o+(-0.510039607856)*x[2]
-        arg[1,3]=(-0.747305678574)*x[0]**o+(0.350337618157)*x[0]+(0.313491051893)*x[1]**o+(-0.554840960712)*x[1]+(-0.259760094369)*x[2]**o+(0.904246223768)*x[2]
-        arg[1,4]=(0.485859115418)*x[0]**o+(-0.751900240375)*x[0]+(-0.233384727142)*x[1]**o+(-0.466677891749)*x[1]+(-0.771311310708)*x[2]**o+(0.380515497846)*x[2]
-        arg[2,0]=(0.628529887016)*x[0]**o+(0.778810609149)*x[0]+(-0.95647127374)*x[1]**o+(-0.887895309984)*x[1]+(-0.926017554164)*x[2]**o+(0.0922106889932)*x[2]
-        arg[2,1]=(-0.981382750453)*x[0]**o+(0.858805367823)*x[0]+(-0.202352133378)*x[1]**o+(0.527229765084)*x[1]+(-0.0862956097426)*x[2]**o+(-0.76269735579)*x[2]
-        arg[2,2]=(0.591276459941)*x[0]**o+(0.554086306469)*x[0]+(-0.175045397917)*x[1]**o+(0.319542375346)*x[1]+(0.328810955576)*x[2]**o+(-0.245381809232)*x[2]
-        arg[2,3]=(-0.826436985287)*x[0]**o+(-0.931352535769)*x[0]+(-0.480801956568)*x[1]**o+(0.830773509938)*x[1]+(0.157556801982)*x[2]**o+(0.982505166946)*x[2]
-        arg[2,4]=(-0.0992736644463)*x[0]**o+(-0.147525710611)*x[0]+(-0.723322157973)*x[1]**o+(0.0527438662093)*x[1]+(-0.338847227522)*x[2]**o+(-0.704585609897)*x[2]
-        arg[3,0]=(-0.45250460769)*x[0]**o+(-0.323299292565)*x[0]+(-0.435540041421)*x[1]**o+(0.418330181239)*x[1]+(0.526739853977)*x[2]**o+(-0.00513414974056)*x[2]
-        arg[3,1]=(0.289534600598)*x[0]**o+(0.467498987256)*x[0]+(0.27851903721)*x[1]**o+(0.908249187588)*x[1]+(-0.84695489717)*x[2]**o+(-0.799372710877)*x[2]
-        arg[3,2]=(0.00338011092566)*x[0]**o+(0.819216072868)*x[0]+(0.115437140937)*x[1]**o+(0.0968835984948)*x[1]+(-0.633253222581)*x[2]**o+(-0.0224890801282)*x[2]
-        arg[3,3]=(0.578331574145)*x[0]**o+(0.328247456626)*x[0]+(-0.725914955131)*x[1]**o+(-0.863562766028)*x[1]+(-0.283057959979)*x[2]**o+(-0.521563360583)*x[2]
-        arg[3,4]=(0.345725352698)*x[0]**o+(0.614912618718)*x[0]+(-0.218084952915)*x[1]**o+(-0.629514485943)*x[1]+(-0.207605980168)*x[2]**o+(-0.0950042458608)*x[2]
-        ref[0,0,0]=o*(-0.512668741406)*x_ref[0]**(o-1)+(-0.73142104842)
-        ref[0,0,1]=o*(0.489050993226)*x_ref[1]**(o-1)+(0.771941571419)
-        ref[0,0,2]=o*(-0.538092512577)*x_ref[2]**(o-1)+(-0.457812389328)
-        ref[0,1,0]=o*(0.258566436386)*x_ref[0]**(o-1)+(-0.572006860118)
-        ref[0,1,1]=o*(-0.0370305840623)*x_ref[1]**(o-1)+(0.328810934717)
-        ref[0,1,2]=o*(-0.652873123265)*x_ref[2]**(o-1)+(0.734929914374)
-        ref[0,2,0]=o*(-0.228462027625)*x_ref[0]**(o-1)+(-0.873359484139)
-        ref[0,2,1]=o*(0.902575701641)*x_ref[1]**(o-1)+(0.428758160478)
-        ref[0,2,2]=o*(-0.377042847702)*x_ref[2]**(o-1)+(-0.161364604019)
-        ref[0,3,0]=o*(0.31338185054)*x_ref[0]**(o-1)+(0.973849539932)
-        ref[0,3,1]=o*(-0.403569231167)*x_ref[1]**(o-1)+(-0.110026269257)
-        ref[0,3,2]=o*(0.603101392345)*x_ref[2]**(o-1)+(0.499232034173)
-        ref[0,4,0]=o*(0.468416317974)*x_ref[0]**(o-1)+(-0.0154203909264)
-        ref[0,4,1]=o*(0.409228888268)*x_ref[1]**(o-1)+(0.358886480877)
-        ref[0,4,2]=o*(-0.00677343401301)*x_ref[2]**(o-1)+(-0.0567153195302)
-        ref[1,0,0]=o*(0.614929795628)*x_ref[0]**(o-1)+(0.54911679279)
-        ref[1,0,1]=o*(0.527138394555)*x_ref[1]**(o-1)+(-0.84070465171)
-        ref[1,0,2]=o*(0.421928294706)*x_ref[2]**(o-1)+(-0.871734463848)
-        ref[1,1,0]=o*(-0.498770327357)*x_ref[0]**(o-1)+(0.294610855431)
-        ref[1,1,1]=o*(-0.815129074288)*x_ref[1]**(o-1)+(0.395332176796)
-        ref[1,1,2]=o*(-0.555947305527)*x_ref[2]**(o-1)+(-0.623550814988)
-        ref[1,2,0]=o*(-0.369404109593)*x_ref[0]**(o-1)+(-0.662927702362)
-        ref[1,2,1]=o*(0.886789099892)*x_ref[1]**(o-1)+(-0.815728539359)
-        ref[1,2,2]=o*(-0.843861162574)*x_ref[2]**(o-1)+(-0.510039607856)
-        ref[1,3,0]=o*(-0.747305678574)*x_ref[0]**(o-1)+(0.350337618157)
-        ref[1,3,1]=o*(0.313491051893)*x_ref[1]**(o-1)+(-0.554840960712)
-        ref[1,3,2]=o*(-0.259760094369)*x_ref[2]**(o-1)+(0.904246223768)
-        ref[1,4,0]=o*(0.485859115418)*x_ref[0]**(o-1)+(-0.751900240375)
-        ref[1,4,1]=o*(-0.233384727142)*x_ref[1]**(o-1)+(-0.466677891749)
-        ref[1,4,2]=o*(-0.771311310708)*x_ref[2]**(o-1)+(0.380515497846)
-        ref[2,0,0]=o*(0.628529887016)*x_ref[0]**(o-1)+(0.778810609149)
-        ref[2,0,1]=o*(-0.95647127374)*x_ref[1]**(o-1)+(-0.887895309984)
-        ref[2,0,2]=o*(-0.926017554164)*x_ref[2]**(o-1)+(0.0922106889932)
-        ref[2,1,0]=o*(-0.981382750453)*x_ref[0]**(o-1)+(0.858805367823)
-        ref[2,1,1]=o*(-0.202352133378)*x_ref[1]**(o-1)+(0.527229765084)
-        ref[2,1,2]=o*(-0.0862956097426)*x_ref[2]**(o-1)+(-0.76269735579)
-        ref[2,2,0]=o*(0.591276459941)*x_ref[0]**(o-1)+(0.554086306469)
-        ref[2,2,1]=o*(-0.175045397917)*x_ref[1]**(o-1)+(0.319542375346)
-        ref[2,2,2]=o*(0.328810955576)*x_ref[2]**(o-1)+(-0.245381809232)
-        ref[2,3,0]=o*(-0.826436985287)*x_ref[0]**(o-1)+(-0.931352535769)
-        ref[2,3,1]=o*(-0.480801956568)*x_ref[1]**(o-1)+(0.830773509938)
-        ref[2,3,2]=o*(0.157556801982)*x_ref[2]**(o-1)+(0.982505166946)
-        ref[2,4,0]=o*(-0.0992736644463)*x_ref[0]**(o-1)+(-0.147525710611)
-        ref[2,4,1]=o*(-0.723322157973)*x_ref[1]**(o-1)+(0.0527438662093)
-        ref[2,4,2]=o*(-0.338847227522)*x_ref[2]**(o-1)+(-0.704585609897)
-        ref[3,0,0]=o*(-0.45250460769)*x_ref[0]**(o-1)+(-0.323299292565)
-        ref[3,0,1]=o*(-0.435540041421)*x_ref[1]**(o-1)+(0.418330181239)
-        ref[3,0,2]=o*(0.526739853977)*x_ref[2]**(o-1)+(-0.00513414974056)
-        ref[3,1,0]=o*(0.289534600598)*x_ref[0]**(o-1)+(0.467498987256)
-        ref[3,1,1]=o*(0.27851903721)*x_ref[1]**(o-1)+(0.908249187588)
-        ref[3,1,2]=o*(-0.84695489717)*x_ref[2]**(o-1)+(-0.799372710877)
-        ref[3,2,0]=o*(0.00338011092566)*x_ref[0]**(o-1)+(0.819216072868)
-        ref[3,2,1]=o*(0.115437140937)*x_ref[1]**(o-1)+(0.0968835984948)
-        ref[3,2,2]=o*(-0.633253222581)*x_ref[2]**(o-1)+(-0.0224890801282)
-        ref[3,3,0]=o*(0.578331574145)*x_ref[0]**(o-1)+(0.328247456626)
-        ref[3,3,1]=o*(-0.725914955131)*x_ref[1]**(o-1)+(-0.863562766028)
-        ref[3,3,2]=o*(-0.283057959979)*x_ref[2]**(o-1)+(-0.521563360583)
-        ref[3,4,0]=o*(0.345725352698)*x_ref[0]**(o-1)+(0.614912618718)
-        ref[3,4,1]=o*(-0.218084952915)*x_ref[1]**(o-1)+(-0.629514485943)
-        ref[3,4,2]=o*(-0.207605980168)*x_ref[2]**(o-1)+(-0.0950042458608)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunction
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.353390112117)*x[0]**o+(0.121267964347)*x[0]+(0.095925646757)*x[1]**o+(-0.00141503525661)*x[1]
-        arg[0,0,1]=(0.610556742471)*x[0]**o+(0.542948343923)*x[0]+(0.124762431991)*x[1]**o+(0.00216142978003)*x[1]
-        arg[0,1,0]=(0.261559018753)*x[0]**o+(-0.881689419767)*x[0]+(-0.009352418091)*x[1]**o+(0.333357441723)*x[1]
-        arg[0,1,1]=(-0.25379927884)*x[0]**o+(-0.124076833523)*x[0]+(-0.167690772835)*x[1]**o+(0.89804632709)*x[1]
-        arg[1,0,0]=(-0.39353207502)*x[0]**o+(0.838815579522)*x[0]+(0.829467918805)*x[1]**o+(0.614403367394)*x[1]
-        arg[1,0,1]=(-0.698946975112)*x[0]**o+(-0.551313390457)*x[0]+(0.965127390549)*x[1]**o+(-0.819660095397)*x[1]
-        arg[1,1,0]=(-0.656237793952)*x[0]**o+(0.727261124295)*x[0]+(0.602446266985)*x[1]**o+(-0.320796826351)*x[1]
-        arg[1,1,1]=(0.111875111713)*x[0]**o+(0.000360626785094)*x[0]+(-0.802516890555)*x[1]**o+(0.420759758492)*x[1]
-        arg[2,0,0]=(-0.421920068352)*x[0]**o+(-0.022970702876)*x[0]+(-0.0257219638216)*x[1]**o+(-0.36544576073)*x[1]
-        arg[2,0,1]=(-0.459431228769)*x[0]**o+(0.150702477357)*x[0]+(-0.869898945031)*x[1]**o+(0.261651620176)*x[1]
-        arg[2,1,0]=(-0.866165026127)*x[0]**o+(0.149307656472)*x[0]+(-0.270058622191)*x[1]**o+(0.0873163553474)*x[1]
-        arg[2,1,1]=(-0.871128617394)*x[0]**o+(-0.774356000237)*x[0]+(0.337383167457)*x[1]**o+(-0.453335744484)*x[1]
-        arg[3,0,0]=(0.404195477481)*x[0]**o+(-0.350041445198)*x[0]+(-0.583794909281)*x[1]**o+(-0.895439618872)*x[1]
-        arg[3,0,1]=(0.693567867164)*x[0]**o+(0.989642722856)*x[0]+(0.814104467522)*x[1]**o+(-0.126302588221)*x[1]
-        arg[3,1,0]=(0.935509747673)*x[0]**o+(0.0104612091188)*x[0]+(0.304974305936)*x[1]**o+(0.658660310426)*x[1]
-        arg[3,1,1]=(0.677420202064)*x[0]**o+(-0.160834685914)*x[0]+(0.241578146196)*x[1]**o+(-0.182223867353)*x[1]
-        arg[4,0,0]=(-0.908542015864)*x[0]**o+(0.125595344482)*x[0]+(-0.396864254557)*x[1]**o+(0.408182849245)*x[1]
-        arg[4,0,1]=(0.436101221257)*x[0]**o+(0.946667075656)*x[0]+(-0.293523459017)*x[1]**o+(0.363130416513)*x[1]
-        arg[4,1,0]=(0.583416010605)*x[0]**o+(0.531883961319)*x[0]+(-0.418905217485)*x[1]**o+(0.271442034667)*x[1]
-        arg[4,1,1]=(-0.708766397827)*x[0]**o+(0.0266251980073)*x[0]+(-0.0929293524384)*x[1]**o+(-0.661095295605)*x[1]
-        arg[5,0,0]=(0.693424423443)*x[0]**o+(-0.201539674621)*x[0]+(-0.221922493999)*x[1]**o+(-0.218359043699)*x[1]
-        arg[5,0,1]=(-0.478707796293)*x[0]**o+(0.791533578559)*x[0]+(0.280213321002)*x[1]**o+(-0.60809908629)*x[1]
-        arg[5,1,0]=(-0.517992572451)*x[0]**o+(0.591995363281)*x[0]+(0.480220427965)*x[1]**o+(0.134542063762)*x[1]
-        arg[5,1,1]=(0.415861674391)*x[0]**o+(0.773614372731)*x[0]+(-0.984515861984)*x[1]**o+(0.971916685266)*x[1]
-        ref[0,0,0,0]=o*(-0.353390112117)*x_ref[0]**(o-1)+(0.121267964347)
-        ref[0,0,0,1]=o*(0.095925646757)*x_ref[1]**(o-1)+(-0.00141503525661)
-        ref[0,0,1,0]=o*(0.610556742471)*x_ref[0]**(o-1)+(0.542948343923)
-        ref[0,0,1,1]=o*(0.124762431991)*x_ref[1]**(o-1)+(0.00216142978003)
-        ref[0,1,0,0]=o*(0.261559018753)*x_ref[0]**(o-1)+(-0.881689419767)
-        ref[0,1,0,1]=o*(-0.009352418091)*x_ref[1]**(o-1)+(0.333357441723)
-        ref[0,1,1,0]=o*(-0.25379927884)*x_ref[0]**(o-1)+(-0.124076833523)
-        ref[0,1,1,1]=o*(-0.167690772835)*x_ref[1]**(o-1)+(0.89804632709)
-        ref[1,0,0,0]=o*(-0.39353207502)*x_ref[0]**(o-1)+(0.838815579522)
-        ref[1,0,0,1]=o*(0.829467918805)*x_ref[1]**(o-1)+(0.614403367394)
-        ref[1,0,1,0]=o*(-0.698946975112)*x_ref[0]**(o-1)+(-0.551313390457)
-        ref[1,0,1,1]=o*(0.965127390549)*x_ref[1]**(o-1)+(-0.819660095397)
-        ref[1,1,0,0]=o*(-0.656237793952)*x_ref[0]**(o-1)+(0.727261124295)
-        ref[1,1,0,1]=o*(0.602446266985)*x_ref[1]**(o-1)+(-0.320796826351)
-        ref[1,1,1,0]=o*(0.111875111713)*x_ref[0]**(o-1)+(0.000360626785094)
-        ref[1,1,1,1]=o*(-0.802516890555)*x_ref[1]**(o-1)+(0.420759758492)
-        ref[2,0,0,0]=o*(-0.421920068352)*x_ref[0]**(o-1)+(-0.022970702876)
-        ref[2,0,0,1]=o*(-0.0257219638216)*x_ref[1]**(o-1)+(-0.36544576073)
-        ref[2,0,1,0]=o*(-0.459431228769)*x_ref[0]**(o-1)+(0.150702477357)
-        ref[2,0,1,1]=o*(-0.869898945031)*x_ref[1]**(o-1)+(0.261651620176)
-        ref[2,1,0,0]=o*(-0.866165026127)*x_ref[0]**(o-1)+(0.149307656472)
-        ref[2,1,0,1]=o*(-0.270058622191)*x_ref[1]**(o-1)+(0.0873163553474)
-        ref[2,1,1,0]=o*(-0.871128617394)*x_ref[0]**(o-1)+(-0.774356000237)
-        ref[2,1,1,1]=o*(0.337383167457)*x_ref[1]**(o-1)+(-0.453335744484)
-        ref[3,0,0,0]=o*(0.404195477481)*x_ref[0]**(o-1)+(-0.350041445198)
-        ref[3,0,0,1]=o*(-0.583794909281)*x_ref[1]**(o-1)+(-0.895439618872)
-        ref[3,0,1,0]=o*(0.693567867164)*x_ref[0]**(o-1)+(0.989642722856)
-        ref[3,0,1,1]=o*(0.814104467522)*x_ref[1]**(o-1)+(-0.126302588221)
-        ref[3,1,0,0]=o*(0.935509747673)*x_ref[0]**(o-1)+(0.0104612091188)
-        ref[3,1,0,1]=o*(0.304974305936)*x_ref[1]**(o-1)+(0.658660310426)
-        ref[3,1,1,0]=o*(0.677420202064)*x_ref[0]**(o-1)+(-0.160834685914)
-        ref[3,1,1,1]=o*(0.241578146196)*x_ref[1]**(o-1)+(-0.182223867353)
-        ref[4,0,0,0]=o*(-0.908542015864)*x_ref[0]**(o-1)+(0.125595344482)
-        ref[4,0,0,1]=o*(-0.396864254557)*x_ref[1]**(o-1)+(0.408182849245)
-        ref[4,0,1,0]=o*(0.436101221257)*x_ref[0]**(o-1)+(0.946667075656)
-        ref[4,0,1,1]=o*(-0.293523459017)*x_ref[1]**(o-1)+(0.363130416513)
-        ref[4,1,0,0]=o*(0.583416010605)*x_ref[0]**(o-1)+(0.531883961319)
-        ref[4,1,0,1]=o*(-0.418905217485)*x_ref[1]**(o-1)+(0.271442034667)
-        ref[4,1,1,0]=o*(-0.708766397827)*x_ref[0]**(o-1)+(0.0266251980073)
-        ref[4,1,1,1]=o*(-0.0929293524384)*x_ref[1]**(o-1)+(-0.661095295605)
-        ref[5,0,0,0]=o*(0.693424423443)*x_ref[0]**(o-1)+(-0.201539674621)
-        ref[5,0,0,1]=o*(-0.221922493999)*x_ref[1]**(o-1)+(-0.218359043699)
-        ref[5,0,1,0]=o*(-0.478707796293)*x_ref[0]**(o-1)+(0.791533578559)
-        ref[5,0,1,1]=o*(0.280213321002)*x_ref[1]**(o-1)+(-0.60809908629)
-        ref[5,1,0,0]=o*(-0.517992572451)*x_ref[0]**(o-1)+(0.591995363281)
-        ref[5,1,0,1]=o*(0.480220427965)*x_ref[1]**(o-1)+(0.134542063762)
-        ref[5,1,1,0]=o*(0.415861674391)*x_ref[0]**(o-1)+(0.773614372731)
-        ref[5,1,1,1]=o*(-0.984515861984)*x_ref[1]**(o-1)+(0.971916685266)
-      else:
-        arg[0,0,0]=(0.157678109652)*x[0]**o+(-0.939095069874)*x[0]+(0.340072659801)*x[1]**o+(0.806723712633)*x[1]+(0.0175654201162)*x[2]**o+(-0.695887679405)*x[2]
-        arg[0,0,1]=(0.148444957808)*x[0]**o+(0.769780554196)*x[0]+(-0.999778710821)*x[1]**o+(0.765998508134)*x[1]+(0.489498280892)*x[2]**o+(0.272011172233)*x[2]
-        arg[0,1,0]=(-0.78853623669)*x[0]**o+(-0.889333747099)*x[0]+(0.897684283327)*x[1]**o+(0.878046029595)*x[1]+(-0.355566201991)*x[2]**o+(-0.656187599294)*x[2]
-        arg[0,1,1]=(-0.903496685895)*x[0]**o+(0.335762730702)*x[0]+(0.264330545204)*x[1]**o+(-0.369300150725)*x[1]+(0.00819339769162)*x[2]**o+(0.0466274018566)*x[2]
-        arg[1,0,0]=(0.490893502666)*x[0]**o+(0.853253169019)*x[0]+(-0.706120536551)*x[1]**o+(-0.810665092749)*x[1]+(0.877124690496)*x[2]**o+(-0.663316848595)*x[2]
-        arg[1,0,1]=(-0.897301110118)*x[0]**o+(-0.571577796347)*x[0]+(-0.00912216314091)*x[1]**o+(0.479091266837)*x[1]+(-0.951994896347)*x[2]**o+(0.293801256264)*x[2]
-        arg[1,1,0]=(-0.0843442242335)*x[0]**o+(0.436592099426)*x[0]+(-0.961835284742)*x[1]**o+(0.453758903497)*x[1]+(0.759916173417)*x[2]**o+(-0.356674191439)*x[2]
-        arg[1,1,1]=(0.368337095889)*x[0]**o+(-0.180552461333)*x[0]+(-0.814727889141)*x[1]**o+(-0.226678543654)*x[1]+(0.629233877979)*x[2]**o+(0.934452743806)*x[2]
-        arg[2,0,0]=(0.335801632975)*x[0]**o+(0.4853793666)*x[0]+(-0.603075878381)*x[1]**o+(-0.464873655094)*x[1]+(-0.304107114487)*x[2]**o+(0.768564020927)*x[2]
-        arg[2,0,1]=(-0.843867260693)*x[0]**o+(-0.758493294188)*x[0]+(0.801820428023)*x[1]**o+(0.0909753752871)*x[1]+(-0.208134327922)*x[2]**o+(0.343325582627)*x[2]
-        arg[2,1,0]=(-0.143364423799)*x[0]**o+(-0.191201452642)*x[0]+(0.356480498629)*x[1]**o+(0.0853546566948)*x[1]+(0.234781870759)*x[2]**o+(-0.702906217789)*x[2]
-        arg[2,1,1]=(0.81324792898)*x[0]**o+(0.565754643122)*x[0]+(-0.0246314241495)*x[1]**o+(-0.83548496516)*x[1]+(0.730246143504)*x[2]**o+(-0.835539994852)*x[2]
-        arg[3,0,0]=(0.877992836393)*x[0]**o+(-0.137135423487)*x[0]+(0.534511286076)*x[1]**o+(-0.0584370047297)*x[1]+(-0.0497236607574)*x[2]**o+(0.408414670632)*x[2]
-        arg[3,0,1]=(-0.959771372305)*x[0]**o+(0.587216149992)*x[0]+(-0.873216249139)*x[1]**o+(0.0703350087653)*x[1]+(0.452900901257)*x[2]**o+(-0.180788315472)*x[2]
-        arg[3,1,0]=(0.477701526969)*x[0]**o+(0.16165566827)*x[0]+(0.219901428845)*x[1]**o+(-0.0816687269195)*x[1]+(-0.379553348394)*x[2]**o+(-0.764672519612)*x[2]
-        arg[3,1,1]=(0.274518799686)*x[0]**o+(0.945009722336)*x[0]+(-0.979787014238)*x[1]**o+(0.587704213162)*x[1]+(0.7959640984)*x[2]**o+(-0.0811112488533)*x[2]
-        arg[4,0,0]=(-0.579121056378)*x[0]**o+(0.971799195206)*x[0]+(-0.646271217985)*x[1]**o+(0.369751123548)*x[1]+(0.792425864156)*x[2]**o+(-0.170799235786)*x[2]
-        arg[4,0,1]=(0.0939380562355)*x[0]**o+(0.857041359029)*x[0]+(-0.379025882204)*x[1]**o+(-0.571968622949)*x[1]+(-0.156853183697)*x[2]**o+(0.643214485063)*x[2]
-        arg[4,1,0]=(-0.715210364871)*x[0]**o+(0.150341666571)*x[0]+(0.325165277323)*x[1]**o+(-0.322744240034)*x[1]+(-0.622094139461)*x[2]**o+(-0.830479146327)*x[2]
-        arg[4,1,1]=(-0.697109424406)*x[0]**o+(-0.730318259042)*x[0]+(-0.135119012822)*x[1]**o+(0.410502029229)*x[1]+(0.547987909743)*x[2]**o+(0.144877544254)*x[2]
-        arg[5,0,0]=(0.787147597087)*x[0]**o+(-0.528180541295)*x[0]+(-0.251578089108)*x[1]**o+(-0.170766337864)*x[1]+(-0.123341129221)*x[2]**o+(-0.815622069347)*x[2]
-        arg[5,0,1]=(0.193873484005)*x[0]**o+(0.270190252915)*x[0]+(0.807946985621)*x[1]**o+(0.184522999461)*x[1]+(0.97429597406)*x[2]**o+(0.532931028021)*x[2]
-        arg[5,1,0]=(0.555644676015)*x[0]**o+(-0.225593442089)*x[0]+(0.877869009767)*x[1]**o+(-0.750894245506)*x[1]+(0.888501611997)*x[2]**o+(-0.84027021889)*x[2]
-        arg[5,1,1]=(0.76909422867)*x[0]**o+(0.406697645173)*x[0]+(-0.233710263631)*x[1]**o+(-0.432942345121)*x[1]+(0.270484113666)*x[2]**o+(0.707302418115)*x[2]
-        ref[0,0,0,0]=o*(0.157678109652)*x_ref[0]**(o-1)+(-0.939095069874)
-        ref[0,0,0,1]=o*(0.340072659801)*x_ref[1]**(o-1)+(0.806723712633)
-        ref[0,0,0,2]=o*(0.0175654201162)*x_ref[2]**(o-1)+(-0.695887679405)
-        ref[0,0,1,0]=o*(0.148444957808)*x_ref[0]**(o-1)+(0.769780554196)
-        ref[0,0,1,1]=o*(-0.999778710821)*x_ref[1]**(o-1)+(0.765998508134)
-        ref[0,0,1,2]=o*(0.489498280892)*x_ref[2]**(o-1)+(0.272011172233)
-        ref[0,1,0,0]=o*(-0.78853623669)*x_ref[0]**(o-1)+(-0.889333747099)
-        ref[0,1,0,1]=o*(0.897684283327)*x_ref[1]**(o-1)+(0.878046029595)
-        ref[0,1,0,2]=o*(-0.355566201991)*x_ref[2]**(o-1)+(-0.656187599294)
-        ref[0,1,1,0]=o*(-0.903496685895)*x_ref[0]**(o-1)+(0.335762730702)
-        ref[0,1,1,1]=o*(0.264330545204)*x_ref[1]**(o-1)+(-0.369300150725)
-        ref[0,1,1,2]=o*(0.00819339769162)*x_ref[2]**(o-1)+(0.0466274018566)
-        ref[1,0,0,0]=o*(0.490893502666)*x_ref[0]**(o-1)+(0.853253169019)
-        ref[1,0,0,1]=o*(-0.706120536551)*x_ref[1]**(o-1)+(-0.810665092749)
-        ref[1,0,0,2]=o*(0.877124690496)*x_ref[2]**(o-1)+(-0.663316848595)
-        ref[1,0,1,0]=o*(-0.897301110118)*x_ref[0]**(o-1)+(-0.571577796347)
-        ref[1,0,1,1]=o*(-0.00912216314091)*x_ref[1]**(o-1)+(0.479091266837)
-        ref[1,0,1,2]=o*(-0.951994896347)*x_ref[2]**(o-1)+(0.293801256264)
-        ref[1,1,0,0]=o*(-0.0843442242335)*x_ref[0]**(o-1)+(0.436592099426)
-        ref[1,1,0,1]=o*(-0.961835284742)*x_ref[1]**(o-1)+(0.453758903497)
-        ref[1,1,0,2]=o*(0.759916173417)*x_ref[2]**(o-1)+(-0.356674191439)
-        ref[1,1,1,0]=o*(0.368337095889)*x_ref[0]**(o-1)+(-0.180552461333)
-        ref[1,1,1,1]=o*(-0.814727889141)*x_ref[1]**(o-1)+(-0.226678543654)
-        ref[1,1,1,2]=o*(0.629233877979)*x_ref[2]**(o-1)+(0.934452743806)
-        ref[2,0,0,0]=o*(0.335801632975)*x_ref[0]**(o-1)+(0.4853793666)
-        ref[2,0,0,1]=o*(-0.603075878381)*x_ref[1]**(o-1)+(-0.464873655094)
-        ref[2,0,0,2]=o*(-0.304107114487)*x_ref[2]**(o-1)+(0.768564020927)
-        ref[2,0,1,0]=o*(-0.843867260693)*x_ref[0]**(o-1)+(-0.758493294188)
-        ref[2,0,1,1]=o*(0.801820428023)*x_ref[1]**(o-1)+(0.0909753752871)
-        ref[2,0,1,2]=o*(-0.208134327922)*x_ref[2]**(o-1)+(0.343325582627)
-        ref[2,1,0,0]=o*(-0.143364423799)*x_ref[0]**(o-1)+(-0.191201452642)
-        ref[2,1,0,1]=o*(0.356480498629)*x_ref[1]**(o-1)+(0.0853546566948)
-        ref[2,1,0,2]=o*(0.234781870759)*x_ref[2]**(o-1)+(-0.702906217789)
-        ref[2,1,1,0]=o*(0.81324792898)*x_ref[0]**(o-1)+(0.565754643122)
-        ref[2,1,1,1]=o*(-0.0246314241495)*x_ref[1]**(o-1)+(-0.83548496516)
-        ref[2,1,1,2]=o*(0.730246143504)*x_ref[2]**(o-1)+(-0.835539994852)
-        ref[3,0,0,0]=o*(0.877992836393)*x_ref[0]**(o-1)+(-0.137135423487)
-        ref[3,0,0,1]=o*(0.534511286076)*x_ref[1]**(o-1)+(-0.0584370047297)
-        ref[3,0,0,2]=o*(-0.0497236607574)*x_ref[2]**(o-1)+(0.408414670632)
-        ref[3,0,1,0]=o*(-0.959771372305)*x_ref[0]**(o-1)+(0.587216149992)
-        ref[3,0,1,1]=o*(-0.873216249139)*x_ref[1]**(o-1)+(0.0703350087653)
-        ref[3,0,1,2]=o*(0.452900901257)*x_ref[2]**(o-1)+(-0.180788315472)
-        ref[3,1,0,0]=o*(0.477701526969)*x_ref[0]**(o-1)+(0.16165566827)
-        ref[3,1,0,1]=o*(0.219901428845)*x_ref[1]**(o-1)+(-0.0816687269195)
-        ref[3,1,0,2]=o*(-0.379553348394)*x_ref[2]**(o-1)+(-0.764672519612)
-        ref[3,1,1,0]=o*(0.274518799686)*x_ref[0]**(o-1)+(0.945009722336)
-        ref[3,1,1,1]=o*(-0.979787014238)*x_ref[1]**(o-1)+(0.587704213162)
-        ref[3,1,1,2]=o*(0.7959640984)*x_ref[2]**(o-1)+(-0.0811112488533)
-        ref[4,0,0,0]=o*(-0.579121056378)*x_ref[0]**(o-1)+(0.971799195206)
-        ref[4,0,0,1]=o*(-0.646271217985)*x_ref[1]**(o-1)+(0.369751123548)
-        ref[4,0,0,2]=o*(0.792425864156)*x_ref[2]**(o-1)+(-0.170799235786)
-        ref[4,0,1,0]=o*(0.0939380562355)*x_ref[0]**(o-1)+(0.857041359029)
-        ref[4,0,1,1]=o*(-0.379025882204)*x_ref[1]**(o-1)+(-0.571968622949)
-        ref[4,0,1,2]=o*(-0.156853183697)*x_ref[2]**(o-1)+(0.643214485063)
-        ref[4,1,0,0]=o*(-0.715210364871)*x_ref[0]**(o-1)+(0.150341666571)
-        ref[4,1,0,1]=o*(0.325165277323)*x_ref[1]**(o-1)+(-0.322744240034)
-        ref[4,1,0,2]=o*(-0.622094139461)*x_ref[2]**(o-1)+(-0.830479146327)
-        ref[4,1,1,0]=o*(-0.697109424406)*x_ref[0]**(o-1)+(-0.730318259042)
-        ref[4,1,1,1]=o*(-0.135119012822)*x_ref[1]**(o-1)+(0.410502029229)
-        ref[4,1,1,2]=o*(0.547987909743)*x_ref[2]**(o-1)+(0.144877544254)
-        ref[5,0,0,0]=o*(0.787147597087)*x_ref[0]**(o-1)+(-0.528180541295)
-        ref[5,0,0,1]=o*(-0.251578089108)*x_ref[1]**(o-1)+(-0.170766337864)
-        ref[5,0,0,2]=o*(-0.123341129221)*x_ref[2]**(o-1)+(-0.815622069347)
-        ref[5,0,1,0]=o*(0.193873484005)*x_ref[0]**(o-1)+(0.270190252915)
-        ref[5,0,1,1]=o*(0.807946985621)*x_ref[1]**(o-1)+(0.184522999461)
-        ref[5,0,1,2]=o*(0.97429597406)*x_ref[2]**(o-1)+(0.532931028021)
-        ref[5,1,0,0]=o*(0.555644676015)*x_ref[0]**(o-1)+(-0.225593442089)
-        ref[5,1,0,1]=o*(0.877869009767)*x_ref[1]**(o-1)+(-0.750894245506)
-        ref[5,1,0,2]=o*(0.888501611997)*x_ref[2]**(o-1)+(-0.84027021889)
-        ref[5,1,1,0]=o*(0.76909422867)*x_ref[0]**(o-1)+(0.406697645173)
-        ref[5,1,1,1]=o*(-0.233710263631)*x_ref[1]**(o-1)+(-0.432942345121)
-        ref[5,1,1,2]=o*(0.270484113666)*x_ref[2]**(o-1)+(0.707302418115)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.390595923727)*x[0]+(0.870359886354)*x[1]
-        ref[0]=(0.390595923727)
-        ref[1]=(0.870359886354)
-      else:
-        arg=(1.4237066625)*x[0]+(0.191112329766)*x[1]+(0.342817637558)*x[2]
-        ref[0]=(1.4237066625)
-        ref[1]=(0.191112329766)
-        ref[2]=(0.342817637558)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.24969786007)*x[0]+(-0.503239623541)*x[1]
-        arg[1]=(0.00152786815487)*x[0]+(0.486128960541)*x[1]
-        ref[0,0]=(1.24969786007)
-        ref[0,1]=(-0.503239623541)
-        ref[1,0]=(0.00152786815487)
-        ref[1,1]=(0.486128960541)
-      else:
-        arg[0]=(1.16486019581)*x[0]+(-0.244560585954)*x[1]+(1.11539615819)*x[2]
-        arg[1]=(-0.831039160237)*x[0]+(0.822276239005)*x[1]+(0.421468778379)*x[2]
-        ref[0,0]=(1.16486019581)
-        ref[0,1]=(-0.244560585954)
-        ref[0,2]=(1.11539615819)
-        ref[1,0]=(-0.831039160237)
-        ref[1,1]=(0.822276239005)
-        ref[1,2]=(0.421468778379)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.189442592013)*x[0]+(-1.60645028651)*x[1]
-        arg[0,1]=(0.0100077079631)*x[0]+(-1.17387880858)*x[1]
-        arg[0,2]=(0.0275548120659)*x[0]+(0.653617350295)*x[1]
-        arg[0,3]=(0.05829133816)*x[0]+(-0.373563514457)*x[1]
-        arg[0,4]=(0.779779569696)*x[0]+(-1.26967503826)*x[1]
-        arg[1,0]=(-1.76287668803)*x[0]+(1.09016960913)*x[1]
-        arg[1,1]=(-0.37217349459)*x[0]+(-0.241280622851)*x[1]
-        arg[1,2]=(-0.590745342582)*x[0]+(0.258098534691)*x[1]
-        arg[1,3]=(0.481754329217)*x[0]+(1.9686931184)*x[1]
-        arg[1,4]=(1.62318899699)*x[0]+(-0.634644801985)*x[1]
-        arg[2,0]=(-0.0113400901549)*x[0]+(0.448967376428)*x[1]
-        arg[2,1]=(0.0239277722956)*x[0]+(0.248367174694)*x[1]
-        arg[2,2]=(1.23484142782)*x[0]+(-0.408724357055)*x[1]
-        arg[2,3]=(0.115412214024)*x[0]+(0.721349239053)*x[1]
-        arg[2,4]=(-1.58878458768)*x[0]+(-0.297328738789)*x[1]
-        arg[3,0]=(-0.536715000453)*x[0]+(-0.0610624173989)*x[1]
-        arg[3,1]=(-0.365981795847)*x[0]+(0.710935216782)*x[1]
-        arg[3,2]=(1.1343806743)*x[0]+(-1.12662285264)*x[1]
-        arg[3,3]=(-1.56463302165)*x[0]+(0.701651939794)*x[1]
-        arg[3,4]=(1.38464443939)*x[0]+(-0.389328824078)*x[1]
-        ref[0,0,0]=(0.189442592013)
-        ref[0,0,1]=(-1.60645028651)
-        ref[0,1,0]=(0.0100077079631)
-        ref[0,1,1]=(-1.17387880858)
-        ref[0,2,0]=(0.0275548120659)
-        ref[0,2,1]=(0.653617350295)
-        ref[0,3,0]=(0.05829133816)
-        ref[0,3,1]=(-0.373563514457)
-        ref[0,4,0]=(0.779779569696)
-        ref[0,4,1]=(-1.26967503826)
-        ref[1,0,0]=(-1.76287668803)
-        ref[1,0,1]=(1.09016960913)
-        ref[1,1,0]=(-0.37217349459)
-        ref[1,1,1]=(-0.241280622851)
-        ref[1,2,0]=(-0.590745342582)
-        ref[1,2,1]=(0.258098534691)
-        ref[1,3,0]=(0.481754329217)
-        ref[1,3,1]=(1.9686931184)
-        ref[1,4,0]=(1.62318899699)
-        ref[1,4,1]=(-0.634644801985)
-        ref[2,0,0]=(-0.0113400901549)
-        ref[2,0,1]=(0.448967376428)
-        ref[2,1,0]=(0.0239277722956)
-        ref[2,1,1]=(0.248367174694)
-        ref[2,2,0]=(1.23484142782)
-        ref[2,2,1]=(-0.408724357055)
-        ref[2,3,0]=(0.115412214024)
-        ref[2,3,1]=(0.721349239053)
-        ref[2,4,0]=(-1.58878458768)
-        ref[2,4,1]=(-0.297328738789)
-        ref[3,0,0]=(-0.536715000453)
-        ref[3,0,1]=(-0.0610624173989)
-        ref[3,1,0]=(-0.365981795847)
-        ref[3,1,1]=(0.710935216782)
-        ref[3,2,0]=(1.1343806743)
-        ref[3,2,1]=(-1.12662285264)
-        ref[3,3,0]=(-1.56463302165)
-        ref[3,3,1]=(0.701651939794)
-        ref[3,4,0]=(1.38464443939)
-        ref[3,4,1]=(-0.389328824078)
-      else:
-        arg[0,0]=(-0.0712739739657)*x[0]+(-0.876441668189)*x[1]+(0.0470586478107)*x[2]
-        arg[0,1]=(0.162070750778)*x[0]+(-0.672482005621)*x[1]+(-1.03342931552)*x[2]
-        arg[0,2]=(1.06895949733)*x[0]+(-1.10495954108)*x[1]+(-0.689435346922)*x[2]
-        arg[0,3]=(-1.64208651194)*x[0]+(0.957715915835)*x[1]+(-0.693562002749)*x[2]
-        arg[0,4]=(0.438930190966)*x[0]+(-0.696372759112)*x[1]+(-0.158769579398)*x[2]
-        arg[1,0]=(-0.953682332409)*x[0]+(-1.06837831005)*x[1]+(1.19564302893)*x[2]
-        arg[1,1]=(0.277654186276)*x[0]+(-0.4746702788)*x[1]+(0.173080688542)*x[2]
-        arg[1,2]=(-0.0080483840277)*x[0]+(-0.606889636532)*x[1]+(-0.124482488485)*x[2]
-        arg[1,3]=(1.6007700604)*x[0]+(-0.375573101659)*x[1]+(-0.0476989341458)*x[2]
-        arg[1,4]=(-0.797213964765)*x[0]+(-1.71649956799)*x[1]+(-0.661820920574)*x[2]
-        arg[2,0]=(-0.32770535636)*x[0]+(0.705676452368)*x[1]+(0.0527214815247)*x[2]
-        arg[2,1]=(-0.279796835093)*x[0]+(-0.277264709729)*x[1]+(0.278447243546)*x[2]
-        arg[2,2]=(-0.633674196984)*x[0]+(-0.0772663082858)*x[1]+(0.973414222834)*x[2]
-        arg[2,3]=(0.0946037203409)*x[0]+(-0.556948102801)*x[1]+(0.521264798082)*x[2]
-        arg[2,4]=(0.566962914588)*x[0]+(-0.942523827817)*x[1]+(-0.216364192998)*x[2]
-        arg[3,0]=(-0.839702033371)*x[0]+(-1.54418367928)*x[1]+(-0.184693363932)*x[2]
-        arg[3,1]=(-0.509575652351)*x[0]+(0.0710239576211)*x[1]+(0.758695521775)*x[2]
-        arg[3,2]=(0.465980018625)*x[0]+(-0.907796828587)*x[1]+(1.00785361438)*x[2]
-        arg[3,3]=(0.778181969842)*x[0]+(-1.45634928421)*x[1]+(1.20377448321)*x[2]
-        arg[3,4]=(1.53649652976)*x[0]+(-0.769556905214)*x[1]+(0.736590460805)*x[2]
-        ref[0,0,0]=(-0.0712739739657)
-        ref[0,0,1]=(-0.876441668189)
-        ref[0,0,2]=(0.0470586478107)
-        ref[0,1,0]=(0.162070750778)
-        ref[0,1,1]=(-0.672482005621)
-        ref[0,1,2]=(-1.03342931552)
-        ref[0,2,0]=(1.06895949733)
-        ref[0,2,1]=(-1.10495954108)
-        ref[0,2,2]=(-0.689435346922)
-        ref[0,3,0]=(-1.64208651194)
-        ref[0,3,1]=(0.957715915835)
-        ref[0,3,2]=(-0.693562002749)
-        ref[0,4,0]=(0.438930190966)
-        ref[0,4,1]=(-0.696372759112)
-        ref[0,4,2]=(-0.158769579398)
-        ref[1,0,0]=(-0.953682332409)
-        ref[1,0,1]=(-1.06837831005)
-        ref[1,0,2]=(1.19564302893)
-        ref[1,1,0]=(0.277654186276)
-        ref[1,1,1]=(-0.4746702788)
-        ref[1,1,2]=(0.173080688542)
-        ref[1,2,0]=(-0.0080483840277)
-        ref[1,2,1]=(-0.606889636532)
-        ref[1,2,2]=(-0.124482488485)
-        ref[1,3,0]=(1.6007700604)
-        ref[1,3,1]=(-0.375573101659)
-        ref[1,3,2]=(-0.0476989341458)
-        ref[1,4,0]=(-0.797213964765)
-        ref[1,4,1]=(-1.71649956799)
-        ref[1,4,2]=(-0.661820920574)
-        ref[2,0,0]=(-0.32770535636)
-        ref[2,0,1]=(0.705676452368)
-        ref[2,0,2]=(0.0527214815247)
-        ref[2,1,0]=(-0.279796835093)
-        ref[2,1,1]=(-0.277264709729)
-        ref[2,1,2]=(0.278447243546)
-        ref[2,2,0]=(-0.633674196984)
-        ref[2,2,1]=(-0.0772663082858)
-        ref[2,2,2]=(0.973414222834)
-        ref[2,3,0]=(0.0946037203409)
-        ref[2,3,1]=(-0.556948102801)
-        ref[2,3,2]=(0.521264798082)
-        ref[2,4,0]=(0.566962914588)
-        ref[2,4,1]=(-0.942523827817)
-        ref[2,4,2]=(-0.216364192998)
-        ref[3,0,0]=(-0.839702033371)
-        ref[3,0,1]=(-1.54418367928)
-        ref[3,0,2]=(-0.184693363932)
-        ref[3,1,0]=(-0.509575652351)
-        ref[3,1,1]=(0.0710239576211)
-        ref[3,1,2]=(0.758695521775)
-        ref[3,2,0]=(0.465980018625)
-        ref[3,2,1]=(-0.907796828587)
-        ref[3,2,2]=(1.00785361438)
-        ref[3,3,0]=(0.778181969842)
-        ref[3,3,1]=(-1.45634928421)
-        ref[3,3,2]=(1.20377448321)
-        ref[3,4,0]=(1.53649652976)
-        ref[3,4,1]=(-0.769556905214)
-        ref[3,4,2]=(0.736590460805)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.39942183968)*x[0]+(0.930250163424)*x[1]
-        arg[0,0,1]=(0.784529427298)*x[0]+(0.701356076527)*x[1]
-        arg[0,1,0]=(0.555731012919)*x[0]+(0.344587262019)*x[1]
-        arg[0,1,1]=(-0.276715609625)*x[0]+(-1.11338983237)*x[1]
-        arg[1,0,0]=(-0.769761090097)*x[0]+(0.992057132466)*x[1]
-        arg[1,0,1]=(-0.551932009885)*x[0]+(0.838811831137)*x[1]
-        arg[1,1,0]=(-0.0342537649661)*x[0]+(-0.121298284661)*x[1]
-        arg[1,1,1]=(-0.520900867)*x[0]+(0.332690359269)*x[1]
-        arg[2,0,0]=(-0.11096511324)*x[0]+(1.5033138393)*x[1]
-        arg[2,0,1]=(0.42710234817)*x[0]+(1.69083527833)*x[1]
-        arg[2,1,0]=(-0.721628841933)*x[0]+(-0.142173751601)*x[1]
-        arg[2,1,1]=(1.60406199163)*x[0]+(0.641129401426)*x[1]
-        arg[3,0,0]=(-0.731738224766)*x[0]+(-0.900425804879)*x[1]
-        arg[3,0,1]=(0.691108140204)*x[0]+(1.34043965547)*x[1]
-        arg[3,1,0]=(0.0588648299821)*x[0]+(1.39496787747)*x[1]
-        arg[3,1,1]=(0.308498671612)*x[0]+(-0.382011042003)*x[1]
-        arg[4,0,0]=(0.267730803561)*x[0]+(1.76842225328)*x[1]
-        arg[4,0,1]=(0.817593687794)*x[0]+(0.563964345071)*x[1]
-        arg[4,1,0]=(-0.081090160095)*x[0]+(0.52343934951)*x[1]
-        arg[4,1,1]=(-1.02492946795)*x[0]+(-0.725641086216)*x[1]
-        arg[5,0,0]=(-0.294202699958)*x[0]+(0.288095939599)*x[1]
-        arg[5,0,1]=(0.110479098614)*x[0]+(-0.113972943318)*x[1]
-        arg[5,1,0]=(0.772912536924)*x[0]+(-0.883345081065)*x[1]
-        arg[5,1,1]=(-0.17097935184)*x[0]+(0.645719745504)*x[1]
-        ref[0,0,0,0]=(1.39942183968)
-        ref[0,0,0,1]=(0.930250163424)
-        ref[0,0,1,0]=(0.784529427298)
-        ref[0,0,1,1]=(0.701356076527)
-        ref[0,1,0,0]=(0.555731012919)
-        ref[0,1,0,1]=(0.344587262019)
-        ref[0,1,1,0]=(-0.276715609625)
-        ref[0,1,1,1]=(-1.11338983237)
-        ref[1,0,0,0]=(-0.769761090097)
-        ref[1,0,0,1]=(0.992057132466)
-        ref[1,0,1,0]=(-0.551932009885)
-        ref[1,0,1,1]=(0.838811831137)
-        ref[1,1,0,0]=(-0.0342537649661)
-        ref[1,1,0,1]=(-0.121298284661)
-        ref[1,1,1,0]=(-0.520900867)
-        ref[1,1,1,1]=(0.332690359269)
-        ref[2,0,0,0]=(-0.11096511324)
-        ref[2,0,0,1]=(1.5033138393)
-        ref[2,0,1,0]=(0.42710234817)
-        ref[2,0,1,1]=(1.69083527833)
-        ref[2,1,0,0]=(-0.721628841933)
-        ref[2,1,0,1]=(-0.142173751601)
-        ref[2,1,1,0]=(1.60406199163)
-        ref[2,1,1,1]=(0.641129401426)
-        ref[3,0,0,0]=(-0.731738224766)
-        ref[3,0,0,1]=(-0.900425804879)
-        ref[3,0,1,0]=(0.691108140204)
-        ref[3,0,1,1]=(1.34043965547)
-        ref[3,1,0,0]=(0.0588648299821)
-        ref[3,1,0,1]=(1.39496787747)
-        ref[3,1,1,0]=(0.308498671612)
-        ref[3,1,1,1]=(-0.382011042003)
-        ref[4,0,0,0]=(0.267730803561)
-        ref[4,0,0,1]=(1.76842225328)
-        ref[4,0,1,0]=(0.817593687794)
-        ref[4,0,1,1]=(0.563964345071)
-        ref[4,1,0,0]=(-0.081090160095)
-        ref[4,1,0,1]=(0.52343934951)
-        ref[4,1,1,0]=(-1.02492946795)
-        ref[4,1,1,1]=(-0.725641086216)
-        ref[5,0,0,0]=(-0.294202699958)
-        ref[5,0,0,1]=(0.288095939599)
-        ref[5,0,1,0]=(0.110479098614)
-        ref[5,0,1,1]=(-0.113972943318)
-        ref[5,1,0,0]=(0.772912536924)
-        ref[5,1,0,1]=(-0.883345081065)
-        ref[5,1,1,0]=(-0.17097935184)
-        ref[5,1,1,1]=(0.645719745504)
-      else:
-        arg[0,0,0]=(1.30850237165)*x[0]+(-0.0995793053275)*x[1]+(0.787886140134)*x[2]
-        arg[0,0,1]=(-1.50381324493)*x[0]+(1.26609518824)*x[1]+(-0.520747554357)*x[2]
-        arg[0,1,0]=(1.29770238108)*x[0]+(-1.46648704595)*x[1]+(-0.917683003599)*x[2]
-        arg[0,1,1]=(-1.13525521581)*x[0]+(1.13359501358)*x[1]+(-0.222600272477)*x[2]
-        arg[1,0,0]=(0.0106829054463)*x[0]+(-0.00676483709573)*x[1]+(0.109412126311)*x[2]
-        arg[1,0,1]=(0.0246128795814)*x[0]+(-0.356585346511)*x[1]+(0.479157114293)*x[2]
-        arg[1,1,0]=(0.541787350557)*x[0]+(-0.594934006419)*x[1]+(0.464164867381)*x[2]
-        arg[1,1,1]=(-1.12100758712)*x[0]+(1.22017329117)*x[1]+(0.417565754303)*x[2]
-        arg[2,0,0]=(-0.902343328228)*x[0]+(-0.118486423959)*x[1]+(0.983457082831)*x[2]
-        arg[2,0,1]=(-1.32314473272)*x[0]+(1.09473600277)*x[1]+(0.526840449987)*x[2]
-        arg[2,1,0]=(1.02149157674)*x[0]+(0.6830798576)*x[1]+(-0.694642330424)*x[2]
-        arg[2,1,1]=(0.471980048259)*x[0]+(1.43051661856)*x[1]+(-0.591151392642)*x[2]
-        arg[3,0,0]=(-0.207925182408)*x[0]+(0.644497833444)*x[1]+(0.0356376370926)*x[2]
-        arg[3,0,1]=(1.91147142951)*x[0]+(-0.872318227607)*x[1]+(0.714610341379)*x[2]
-        arg[3,1,0]=(-0.197729735501)*x[0]+(0.812673023114)*x[1]+(0.637138094981)*x[2]
-        arg[3,1,1]=(0.103430412074)*x[0]+(0.69310435757)*x[1]+(1.54404820552)*x[2]
-        arg[4,0,0]=(1.04427320711)*x[0]+(-0.655287212961)*x[1]+(0.674873379725)*x[2]
-        arg[4,0,1]=(0.0300148606336)*x[0]+(-0.336581334229)*x[1]+(-0.26036930034)*x[2]
-        arg[4,1,0]=(0.338077518919)*x[0]+(-0.965310125748)*x[1]+(1.66372736241)*x[2]
-        arg[4,1,1]=(-0.417143696516)*x[0]+(-0.764906477186)*x[1]+(-0.406563170367)*x[2]
-        arg[5,0,0]=(-0.894638979617)*x[0]+(-1.03496915396)*x[1]+(0.102679227173)*x[2]
-        arg[5,0,1]=(0.777823649077)*x[0]+(0.138595909746)*x[1]+(0.570318195247)*x[2]
-        arg[5,1,0]=(0.387449776869)*x[0]+(0.782752492387)*x[1]+(0.175162039427)*x[2]
-        arg[5,1,1]=(-0.467369934942)*x[0]+(0.343929304184)*x[1]+(0.42227012208)*x[2]
-        ref[0,0,0,0]=(1.30850237165)
-        ref[0,0,0,1]=(-0.0995793053275)
-        ref[0,0,0,2]=(0.787886140134)
-        ref[0,0,1,0]=(-1.50381324493)
-        ref[0,0,1,1]=(1.26609518824)
-        ref[0,0,1,2]=(-0.520747554357)
-        ref[0,1,0,0]=(1.29770238108)
-        ref[0,1,0,1]=(-1.46648704595)
-        ref[0,1,0,2]=(-0.917683003599)
-        ref[0,1,1,0]=(-1.13525521581)
-        ref[0,1,1,1]=(1.13359501358)
-        ref[0,1,1,2]=(-0.222600272477)
-        ref[1,0,0,0]=(0.0106829054463)
-        ref[1,0,0,1]=(-0.00676483709573)
-        ref[1,0,0,2]=(0.109412126311)
-        ref[1,0,1,0]=(0.0246128795814)
-        ref[1,0,1,1]=(-0.356585346511)
-        ref[1,0,1,2]=(0.479157114293)
-        ref[1,1,0,0]=(0.541787350557)
-        ref[1,1,0,1]=(-0.594934006419)
-        ref[1,1,0,2]=(0.464164867381)
-        ref[1,1,1,0]=(-1.12100758712)
-        ref[1,1,1,1]=(1.22017329117)
-        ref[1,1,1,2]=(0.417565754303)
-        ref[2,0,0,0]=(-0.902343328228)
-        ref[2,0,0,1]=(-0.118486423959)
-        ref[2,0,0,2]=(0.983457082831)
-        ref[2,0,1,0]=(-1.32314473272)
-        ref[2,0,1,1]=(1.09473600277)
-        ref[2,0,1,2]=(0.526840449987)
-        ref[2,1,0,0]=(1.02149157674)
-        ref[2,1,0,1]=(0.6830798576)
-        ref[2,1,0,2]=(-0.694642330424)
-        ref[2,1,1,0]=(0.471980048259)
-        ref[2,1,1,1]=(1.43051661856)
-        ref[2,1,1,2]=(-0.591151392642)
-        ref[3,0,0,0]=(-0.207925182408)
-        ref[3,0,0,1]=(0.644497833444)
-        ref[3,0,0,2]=(0.0356376370926)
-        ref[3,0,1,0]=(1.91147142951)
-        ref[3,0,1,1]=(-0.872318227607)
-        ref[3,0,1,2]=(0.714610341379)
-        ref[3,1,0,0]=(-0.197729735501)
-        ref[3,1,0,1]=(0.812673023114)
-        ref[3,1,0,2]=(0.637138094981)
-        ref[3,1,1,0]=(0.103430412074)
-        ref[3,1,1,1]=(0.69310435757)
-        ref[3,1,1,2]=(1.54404820552)
-        ref[4,0,0,0]=(1.04427320711)
-        ref[4,0,0,1]=(-0.655287212961)
-        ref[4,0,0,2]=(0.674873379725)
-        ref[4,0,1,0]=(0.0300148606336)
-        ref[4,0,1,1]=(-0.336581334229)
-        ref[4,0,1,2]=(-0.26036930034)
-        ref[4,1,0,0]=(0.338077518919)
-        ref[4,1,0,1]=(-0.965310125748)
-        ref[4,1,0,2]=(1.66372736241)
-        ref[4,1,1,0]=(-0.417143696516)
-        ref[4,1,1,1]=(-0.764906477186)
-        ref[4,1,1,2]=(-0.406563170367)
-        ref[5,0,0,0]=(-0.894638979617)
-        ref[5,0,0,1]=(-1.03496915396)
-        ref[5,0,0,2]=(0.102679227173)
-        ref[5,0,1,0]=(0.777823649077)
-        ref[5,0,1,1]=(0.138595909746)
-        ref[5,0,1,2]=(0.570318195247)
-        ref[5,1,0,0]=(0.387449776869)
-        ref[5,1,0,1]=(0.782752492387)
-        ref[5,1,0,2]=(0.175162039427)
-        ref[5,1,1,0]=(-0.467369934942)
-        ref[5,1,1,1]=(0.343929304184)
-        ref[5,1,1,2]=(0.42227012208)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedContinuousFunction__rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.390595923727)*x[0]+(0.870359886354)*x[1]
-        ref[0]=(0.390595923727)
-        ref[1]=(0.870359886354)
-      else:
-        arg=(1.4237066625)*x[0]+(0.191112329766)*x[1]+(0.342817637558)*x[2]
-        ref[0]=(1.4237066625)
-        ref[1]=(0.191112329766)
-        ref[2]=(0.342817637558)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedContinuousFunction__rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.24969786007)*x[0]+(-0.503239623541)*x[1]
-        arg[1]=(0.00152786815487)*x[0]+(0.486128960541)*x[1]
-        ref[0,0]=(1.24969786007)
-        ref[0,1]=(-0.503239623541)
-        ref[1,0]=(0.00152786815487)
-        ref[1,1]=(0.486128960541)
-      else:
-        arg[0]=(1.16486019581)*x[0]+(-0.244560585954)*x[1]+(1.11539615819)*x[2]
-        arg[1]=(-0.831039160237)*x[0]+(0.822276239005)*x[1]+(0.421468778379)*x[2]
-        ref[0,0]=(1.16486019581)
-        ref[0,1]=(-0.244560585954)
-        ref[0,2]=(1.11539615819)
-        ref[1,0]=(-0.831039160237)
-        ref[1,1]=(0.822276239005)
-        ref[1,2]=(0.421468778379)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedContinuousFunction__rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.189442592013)*x[0]+(-1.60645028651)*x[1]
-        arg[0,1]=(0.0100077079631)*x[0]+(-1.17387880858)*x[1]
-        arg[0,2]=(0.0275548120659)*x[0]+(0.653617350295)*x[1]
-        arg[0,3]=(0.05829133816)*x[0]+(-0.373563514457)*x[1]
-        arg[0,4]=(0.779779569696)*x[0]+(-1.26967503826)*x[1]
-        arg[1,0]=(-1.76287668803)*x[0]+(1.09016960913)*x[1]
-        arg[1,1]=(-0.37217349459)*x[0]+(-0.241280622851)*x[1]
-        arg[1,2]=(-0.590745342582)*x[0]+(0.258098534691)*x[1]
-        arg[1,3]=(0.481754329217)*x[0]+(1.9686931184)*x[1]
-        arg[1,4]=(1.62318899699)*x[0]+(-0.634644801985)*x[1]
-        arg[2,0]=(-0.0113400901549)*x[0]+(0.448967376428)*x[1]
-        arg[2,1]=(0.0239277722956)*x[0]+(0.248367174694)*x[1]
-        arg[2,2]=(1.23484142782)*x[0]+(-0.408724357055)*x[1]
-        arg[2,3]=(0.115412214024)*x[0]+(0.721349239053)*x[1]
-        arg[2,4]=(-1.58878458768)*x[0]+(-0.297328738789)*x[1]
-        arg[3,0]=(-0.536715000453)*x[0]+(-0.0610624173989)*x[1]
-        arg[3,1]=(-0.365981795847)*x[0]+(0.710935216782)*x[1]
-        arg[3,2]=(1.1343806743)*x[0]+(-1.12662285264)*x[1]
-        arg[3,3]=(-1.56463302165)*x[0]+(0.701651939794)*x[1]
-        arg[3,4]=(1.38464443939)*x[0]+(-0.389328824078)*x[1]
-        ref[0,0,0]=(0.189442592013)
-        ref[0,0,1]=(-1.60645028651)
-        ref[0,1,0]=(0.0100077079631)
-        ref[0,1,1]=(-1.17387880858)
-        ref[0,2,0]=(0.0275548120659)
-        ref[0,2,1]=(0.653617350295)
-        ref[0,3,0]=(0.05829133816)
-        ref[0,3,1]=(-0.373563514457)
-        ref[0,4,0]=(0.779779569696)
-        ref[0,4,1]=(-1.26967503826)
-        ref[1,0,0]=(-1.76287668803)
-        ref[1,0,1]=(1.09016960913)
-        ref[1,1,0]=(-0.37217349459)
-        ref[1,1,1]=(-0.241280622851)
-        ref[1,2,0]=(-0.590745342582)
-        ref[1,2,1]=(0.258098534691)
-        ref[1,3,0]=(0.481754329217)
-        ref[1,3,1]=(1.9686931184)
-        ref[1,4,0]=(1.62318899699)
-        ref[1,4,1]=(-0.634644801985)
-        ref[2,0,0]=(-0.0113400901549)
-        ref[2,0,1]=(0.448967376428)
-        ref[2,1,0]=(0.0239277722956)
-        ref[2,1,1]=(0.248367174694)
-        ref[2,2,0]=(1.23484142782)
-        ref[2,2,1]=(-0.408724357055)
-        ref[2,3,0]=(0.115412214024)
-        ref[2,3,1]=(0.721349239053)
-        ref[2,4,0]=(-1.58878458768)
-        ref[2,4,1]=(-0.297328738789)
-        ref[3,0,0]=(-0.536715000453)
-        ref[3,0,1]=(-0.0610624173989)
-        ref[3,1,0]=(-0.365981795847)
-        ref[3,1,1]=(0.710935216782)
-        ref[3,2,0]=(1.1343806743)
-        ref[3,2,1]=(-1.12662285264)
-        ref[3,3,0]=(-1.56463302165)
-        ref[3,3,1]=(0.701651939794)
-        ref[3,4,0]=(1.38464443939)
-        ref[3,4,1]=(-0.389328824078)
-      else:
-        arg[0,0]=(-0.0712739739657)*x[0]+(-0.876441668189)*x[1]+(0.0470586478107)*x[2]
-        arg[0,1]=(0.162070750778)*x[0]+(-0.672482005621)*x[1]+(-1.03342931552)*x[2]
-        arg[0,2]=(1.06895949733)*x[0]+(-1.10495954108)*x[1]+(-0.689435346922)*x[2]
-        arg[0,3]=(-1.64208651194)*x[0]+(0.957715915835)*x[1]+(-0.693562002749)*x[2]
-        arg[0,4]=(0.438930190966)*x[0]+(-0.696372759112)*x[1]+(-0.158769579398)*x[2]
-        arg[1,0]=(-0.953682332409)*x[0]+(-1.06837831005)*x[1]+(1.19564302893)*x[2]
-        arg[1,1]=(0.277654186276)*x[0]+(-0.4746702788)*x[1]+(0.173080688542)*x[2]
-        arg[1,2]=(-0.0080483840277)*x[0]+(-0.606889636532)*x[1]+(-0.124482488485)*x[2]
-        arg[1,3]=(1.6007700604)*x[0]+(-0.375573101659)*x[1]+(-0.0476989341458)*x[2]
-        arg[1,4]=(-0.797213964765)*x[0]+(-1.71649956799)*x[1]+(-0.661820920574)*x[2]
-        arg[2,0]=(-0.32770535636)*x[0]+(0.705676452368)*x[1]+(0.0527214815247)*x[2]
-        arg[2,1]=(-0.279796835093)*x[0]+(-0.277264709729)*x[1]+(0.278447243546)*x[2]
-        arg[2,2]=(-0.633674196984)*x[0]+(-0.0772663082858)*x[1]+(0.973414222834)*x[2]
-        arg[2,3]=(0.0946037203409)*x[0]+(-0.556948102801)*x[1]+(0.521264798082)*x[2]
-        arg[2,4]=(0.566962914588)*x[0]+(-0.942523827817)*x[1]+(-0.216364192998)*x[2]
-        arg[3,0]=(-0.839702033371)*x[0]+(-1.54418367928)*x[1]+(-0.184693363932)*x[2]
-        arg[3,1]=(-0.509575652351)*x[0]+(0.0710239576211)*x[1]+(0.758695521775)*x[2]
-        arg[3,2]=(0.465980018625)*x[0]+(-0.907796828587)*x[1]+(1.00785361438)*x[2]
-        arg[3,3]=(0.778181969842)*x[0]+(-1.45634928421)*x[1]+(1.20377448321)*x[2]
-        arg[3,4]=(1.53649652976)*x[0]+(-0.769556905214)*x[1]+(0.736590460805)*x[2]
-        ref[0,0,0]=(-0.0712739739657)
-        ref[0,0,1]=(-0.876441668189)
-        ref[0,0,2]=(0.0470586478107)
-        ref[0,1,0]=(0.162070750778)
-        ref[0,1,1]=(-0.672482005621)
-        ref[0,1,2]=(-1.03342931552)
-        ref[0,2,0]=(1.06895949733)
-        ref[0,2,1]=(-1.10495954108)
-        ref[0,2,2]=(-0.689435346922)
-        ref[0,3,0]=(-1.64208651194)
-        ref[0,3,1]=(0.957715915835)
-        ref[0,3,2]=(-0.693562002749)
-        ref[0,4,0]=(0.438930190966)
-        ref[0,4,1]=(-0.696372759112)
-        ref[0,4,2]=(-0.158769579398)
-        ref[1,0,0]=(-0.953682332409)
-        ref[1,0,1]=(-1.06837831005)
-        ref[1,0,2]=(1.19564302893)
-        ref[1,1,0]=(0.277654186276)
-        ref[1,1,1]=(-0.4746702788)
-        ref[1,1,2]=(0.173080688542)
-        ref[1,2,0]=(-0.0080483840277)
-        ref[1,2,1]=(-0.606889636532)
-        ref[1,2,2]=(-0.124482488485)
-        ref[1,3,0]=(1.6007700604)
-        ref[1,3,1]=(-0.375573101659)
-        ref[1,3,2]=(-0.0476989341458)
-        ref[1,4,0]=(-0.797213964765)
-        ref[1,4,1]=(-1.71649956799)
-        ref[1,4,2]=(-0.661820920574)
-        ref[2,0,0]=(-0.32770535636)
-        ref[2,0,1]=(0.705676452368)
-        ref[2,0,2]=(0.0527214815247)
-        ref[2,1,0]=(-0.279796835093)
-        ref[2,1,1]=(-0.277264709729)
-        ref[2,1,2]=(0.278447243546)
-        ref[2,2,0]=(-0.633674196984)
-        ref[2,2,1]=(-0.0772663082858)
-        ref[2,2,2]=(0.973414222834)
-        ref[2,3,0]=(0.0946037203409)
-        ref[2,3,1]=(-0.556948102801)
-        ref[2,3,2]=(0.521264798082)
-        ref[2,4,0]=(0.566962914588)
-        ref[2,4,1]=(-0.942523827817)
-        ref[2,4,2]=(-0.216364192998)
-        ref[3,0,0]=(-0.839702033371)
-        ref[3,0,1]=(-1.54418367928)
-        ref[3,0,2]=(-0.184693363932)
-        ref[3,1,0]=(-0.509575652351)
-        ref[3,1,1]=(0.0710239576211)
-        ref[3,1,2]=(0.758695521775)
-        ref[3,2,0]=(0.465980018625)
-        ref[3,2,1]=(-0.907796828587)
-        ref[3,2,2]=(1.00785361438)
-        ref[3,3,0]=(0.778181969842)
-        ref[3,3,1]=(-1.45634928421)
-        ref[3,3,2]=(1.20377448321)
-        ref[3,4,0]=(1.53649652976)
-        ref[3,4,1]=(-0.769556905214)
-        ref[3,4,2]=(0.736590460805)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunction_fromData_ReducedContinuousFunction__rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.39942183968)*x[0]+(0.930250163424)*x[1]
-        arg[0,0,1]=(0.784529427298)*x[0]+(0.701356076527)*x[1]
-        arg[0,1,0]=(0.555731012919)*x[0]+(0.344587262019)*x[1]
-        arg[0,1,1]=(-0.276715609625)*x[0]+(-1.11338983237)*x[1]
-        arg[1,0,0]=(-0.769761090097)*x[0]+(0.992057132466)*x[1]
-        arg[1,0,1]=(-0.551932009885)*x[0]+(0.838811831137)*x[1]
-        arg[1,1,0]=(-0.0342537649661)*x[0]+(-0.121298284661)*x[1]
-        arg[1,1,1]=(-0.520900867)*x[0]+(0.332690359269)*x[1]
-        arg[2,0,0]=(-0.11096511324)*x[0]+(1.5033138393)*x[1]
-        arg[2,0,1]=(0.42710234817)*x[0]+(1.69083527833)*x[1]
-        arg[2,1,0]=(-0.721628841933)*x[0]+(-0.142173751601)*x[1]
-        arg[2,1,1]=(1.60406199163)*x[0]+(0.641129401426)*x[1]
-        arg[3,0,0]=(-0.731738224766)*x[0]+(-0.900425804879)*x[1]
-        arg[3,0,1]=(0.691108140204)*x[0]+(1.34043965547)*x[1]
-        arg[3,1,0]=(0.0588648299821)*x[0]+(1.39496787747)*x[1]
-        arg[3,1,1]=(0.308498671612)*x[0]+(-0.382011042003)*x[1]
-        arg[4,0,0]=(0.267730803561)*x[0]+(1.76842225328)*x[1]
-        arg[4,0,1]=(0.817593687794)*x[0]+(0.563964345071)*x[1]
-        arg[4,1,0]=(-0.081090160095)*x[0]+(0.52343934951)*x[1]
-        arg[4,1,1]=(-1.02492946795)*x[0]+(-0.725641086216)*x[1]
-        arg[5,0,0]=(-0.294202699958)*x[0]+(0.288095939599)*x[1]
-        arg[5,0,1]=(0.110479098614)*x[0]+(-0.113972943318)*x[1]
-        arg[5,1,0]=(0.772912536924)*x[0]+(-0.883345081065)*x[1]
-        arg[5,1,1]=(-0.17097935184)*x[0]+(0.645719745504)*x[1]
-        ref[0,0,0,0]=(1.39942183968)
-        ref[0,0,0,1]=(0.930250163424)
-        ref[0,0,1,0]=(0.784529427298)
-        ref[0,0,1,1]=(0.701356076527)
-        ref[0,1,0,0]=(0.555731012919)
-        ref[0,1,0,1]=(0.344587262019)
-        ref[0,1,1,0]=(-0.276715609625)
-        ref[0,1,1,1]=(-1.11338983237)
-        ref[1,0,0,0]=(-0.769761090097)
-        ref[1,0,0,1]=(0.992057132466)
-        ref[1,0,1,0]=(-0.551932009885)
-        ref[1,0,1,1]=(0.838811831137)
-        ref[1,1,0,0]=(-0.0342537649661)
-        ref[1,1,0,1]=(-0.121298284661)
-        ref[1,1,1,0]=(-0.520900867)
-        ref[1,1,1,1]=(0.332690359269)
-        ref[2,0,0,0]=(-0.11096511324)
-        ref[2,0,0,1]=(1.5033138393)
-        ref[2,0,1,0]=(0.42710234817)
-        ref[2,0,1,1]=(1.69083527833)
-        ref[2,1,0,0]=(-0.721628841933)
-        ref[2,1,0,1]=(-0.142173751601)
-        ref[2,1,1,0]=(1.60406199163)
-        ref[2,1,1,1]=(0.641129401426)
-        ref[3,0,0,0]=(-0.731738224766)
-        ref[3,0,0,1]=(-0.900425804879)
-        ref[3,0,1,0]=(0.691108140204)
-        ref[3,0,1,1]=(1.34043965547)
-        ref[3,1,0,0]=(0.0588648299821)
-        ref[3,1,0,1]=(1.39496787747)
-        ref[3,1,1,0]=(0.308498671612)
-        ref[3,1,1,1]=(-0.382011042003)
-        ref[4,0,0,0]=(0.267730803561)
-        ref[4,0,0,1]=(1.76842225328)
-        ref[4,0,1,0]=(0.817593687794)
-        ref[4,0,1,1]=(0.563964345071)
-        ref[4,1,0,0]=(-0.081090160095)
-        ref[4,1,0,1]=(0.52343934951)
-        ref[4,1,1,0]=(-1.02492946795)
-        ref[4,1,1,1]=(-0.725641086216)
-        ref[5,0,0,0]=(-0.294202699958)
-        ref[5,0,0,1]=(0.288095939599)
-        ref[5,0,1,0]=(0.110479098614)
-        ref[5,0,1,1]=(-0.113972943318)
-        ref[5,1,0,0]=(0.772912536924)
-        ref[5,1,0,1]=(-0.883345081065)
-        ref[5,1,1,0]=(-0.17097935184)
-        ref[5,1,1,1]=(0.645719745504)
-      else:
-        arg[0,0,0]=(1.30850237165)*x[0]+(-0.0995793053275)*x[1]+(0.787886140134)*x[2]
-        arg[0,0,1]=(-1.50381324493)*x[0]+(1.26609518824)*x[1]+(-0.520747554357)*x[2]
-        arg[0,1,0]=(1.29770238108)*x[0]+(-1.46648704595)*x[1]+(-0.917683003599)*x[2]
-        arg[0,1,1]=(-1.13525521581)*x[0]+(1.13359501358)*x[1]+(-0.222600272477)*x[2]
-        arg[1,0,0]=(0.0106829054463)*x[0]+(-0.00676483709573)*x[1]+(0.109412126311)*x[2]
-        arg[1,0,1]=(0.0246128795814)*x[0]+(-0.356585346511)*x[1]+(0.479157114293)*x[2]
-        arg[1,1,0]=(0.541787350557)*x[0]+(-0.594934006419)*x[1]+(0.464164867381)*x[2]
-        arg[1,1,1]=(-1.12100758712)*x[0]+(1.22017329117)*x[1]+(0.417565754303)*x[2]
-        arg[2,0,0]=(-0.902343328228)*x[0]+(-0.118486423959)*x[1]+(0.983457082831)*x[2]
-        arg[2,0,1]=(-1.32314473272)*x[0]+(1.09473600277)*x[1]+(0.526840449987)*x[2]
-        arg[2,1,0]=(1.02149157674)*x[0]+(0.6830798576)*x[1]+(-0.694642330424)*x[2]
-        arg[2,1,1]=(0.471980048259)*x[0]+(1.43051661856)*x[1]+(-0.591151392642)*x[2]
-        arg[3,0,0]=(-0.207925182408)*x[0]+(0.644497833444)*x[1]+(0.0356376370926)*x[2]
-        arg[3,0,1]=(1.91147142951)*x[0]+(-0.872318227607)*x[1]+(0.714610341379)*x[2]
-        arg[3,1,0]=(-0.197729735501)*x[0]+(0.812673023114)*x[1]+(0.637138094981)*x[2]
-        arg[3,1,1]=(0.103430412074)*x[0]+(0.69310435757)*x[1]+(1.54404820552)*x[2]
-        arg[4,0,0]=(1.04427320711)*x[0]+(-0.655287212961)*x[1]+(0.674873379725)*x[2]
-        arg[4,0,1]=(0.0300148606336)*x[0]+(-0.336581334229)*x[1]+(-0.26036930034)*x[2]
-        arg[4,1,0]=(0.338077518919)*x[0]+(-0.965310125748)*x[1]+(1.66372736241)*x[2]
-        arg[4,1,1]=(-0.417143696516)*x[0]+(-0.764906477186)*x[1]+(-0.406563170367)*x[2]
-        arg[5,0,0]=(-0.894638979617)*x[0]+(-1.03496915396)*x[1]+(0.102679227173)*x[2]
-        arg[5,0,1]=(0.777823649077)*x[0]+(0.138595909746)*x[1]+(0.570318195247)*x[2]
-        arg[5,1,0]=(0.387449776869)*x[0]+(0.782752492387)*x[1]+(0.175162039427)*x[2]
-        arg[5,1,1]=(-0.467369934942)*x[0]+(0.343929304184)*x[1]+(0.42227012208)*x[2]
-        ref[0,0,0,0]=(1.30850237165)
-        ref[0,0,0,1]=(-0.0995793053275)
-        ref[0,0,0,2]=(0.787886140134)
-        ref[0,0,1,0]=(-1.50381324493)
-        ref[0,0,1,1]=(1.26609518824)
-        ref[0,0,1,2]=(-0.520747554357)
-        ref[0,1,0,0]=(1.29770238108)
-        ref[0,1,0,1]=(-1.46648704595)
-        ref[0,1,0,2]=(-0.917683003599)
-        ref[0,1,1,0]=(-1.13525521581)
-        ref[0,1,1,1]=(1.13359501358)
-        ref[0,1,1,2]=(-0.222600272477)
-        ref[1,0,0,0]=(0.0106829054463)
-        ref[1,0,0,1]=(-0.00676483709573)
-        ref[1,0,0,2]=(0.109412126311)
-        ref[1,0,1,0]=(0.0246128795814)
-        ref[1,0,1,1]=(-0.356585346511)
-        ref[1,0,1,2]=(0.479157114293)
-        ref[1,1,0,0]=(0.541787350557)
-        ref[1,1,0,1]=(-0.594934006419)
-        ref[1,1,0,2]=(0.464164867381)
-        ref[1,1,1,0]=(-1.12100758712)
-        ref[1,1,1,1]=(1.22017329117)
-        ref[1,1,1,2]=(0.417565754303)
-        ref[2,0,0,0]=(-0.902343328228)
-        ref[2,0,0,1]=(-0.118486423959)
-        ref[2,0,0,2]=(0.983457082831)
-        ref[2,0,1,0]=(-1.32314473272)
-        ref[2,0,1,1]=(1.09473600277)
-        ref[2,0,1,2]=(0.526840449987)
-        ref[2,1,0,0]=(1.02149157674)
-        ref[2,1,0,1]=(0.6830798576)
-        ref[2,1,0,2]=(-0.694642330424)
-        ref[2,1,1,0]=(0.471980048259)
-        ref[2,1,1,1]=(1.43051661856)
-        ref[2,1,1,2]=(-0.591151392642)
-        ref[3,0,0,0]=(-0.207925182408)
-        ref[3,0,0,1]=(0.644497833444)
-        ref[3,0,0,2]=(0.0356376370926)
-        ref[3,0,1,0]=(1.91147142951)
-        ref[3,0,1,1]=(-0.872318227607)
-        ref[3,0,1,2]=(0.714610341379)
-        ref[3,1,0,0]=(-0.197729735501)
-        ref[3,1,0,1]=(0.812673023114)
-        ref[3,1,0,2]=(0.637138094981)
-        ref[3,1,1,0]=(0.103430412074)
-        ref[3,1,1,1]=(0.69310435757)
-        ref[3,1,1,2]=(1.54404820552)
-        ref[4,0,0,0]=(1.04427320711)
-        ref[4,0,0,1]=(-0.655287212961)
-        ref[4,0,0,2]=(0.674873379725)
-        ref[4,0,1,0]=(0.0300148606336)
-        ref[4,0,1,1]=(-0.336581334229)
-        ref[4,0,1,2]=(-0.26036930034)
-        ref[4,1,0,0]=(0.338077518919)
-        ref[4,1,0,1]=(-0.965310125748)
-        ref[4,1,0,2]=(1.66372736241)
-        ref[4,1,1,0]=(-0.417143696516)
-        ref[4,1,1,1]=(-0.764906477186)
-        ref[4,1,1,2]=(-0.406563170367)
-        ref[5,0,0,0]=(-0.894638979617)
-        ref[5,0,0,1]=(-1.03496915396)
-        ref[5,0,0,2]=(0.102679227173)
-        ref[5,0,1,0]=(0.777823649077)
-        ref[5,0,1,1]=(0.138595909746)
-        ref[5,0,1,2]=(0.570318195247)
-        ref[5,1,0,0]=(0.387449776869)
-        ref[5,1,0,1]=(0.782752492387)
-        ref[5,1,0,2]=(0.175162039427)
-        ref[5,1,1,0]=(-0.467369934942)
-        ref[5,1,1,1]=(0.343929304184)
-        ref[5,1,1,2]=(0.42227012208)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.350515208335)*x[0]**o+(-0.604596801095)*x[0]+(0.145267491062)*x[1]**o+(-0.422271555369)*x[1]
-        ref=(-0.350515208335)*x_ref[0]**o+(-0.604596801095)*x_ref[0]+(0.145267491062)*x_ref[1]**o+(-0.422271555369)*x_ref[1]
-      else:
-        arg=(-0.162304501731)*x[0]**o+(0.342262454165)*x[0]+(0.693988751897)*x[1]**o+(-0.315225717754)*x[1]+(-0.938405302425)*x[2]**o+(-0.0929881908885)*x[2]
-        ref=(-0.162304501731)*x_ref[0]**o+(0.342262454165)*x_ref[0]+(0.693988751897)*x_ref[1]**o+(-0.315225717754)*x_ref[1]+(-0.938405302425)*x_ref[2]**o+(-0.0929881908885)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.104854565192)*x[0]**o+(-0.596688162793)*x[0]+(-0.0286471957779)*x[1]**o+(-0.157282508059)*x[1]
-        arg[1]=(0.619817759027)*x[0]**o+(-0.832815965127)*x[0]+(-0.638126497014)*x[1]**o+(0.771271149341)*x[1]
-        ref[0]=(0.104854565192)*x_ref[0]**o+(-0.596688162793)*x_ref[0]+(-0.0286471957779)*x_ref[1]**o+(-0.157282508059)*x_ref[1]
-        ref[1]=(0.619817759027)*x_ref[0]**o+(-0.832815965127)*x_ref[0]+(-0.638126497014)*x_ref[1]**o+(0.771271149341)*x_ref[1]
-      else:
-        arg[0]=(-0.358142932888)*x[0]**o+(0.758685606027)*x[0]+(-0.0716050574096)*x[1]**o+(-0.723587074286)*x[1]+(0.387240173671)*x[2]**o+(0.544679811421)*x[2]
-        arg[1]=(0.864154242034)*x[0]**o+(-0.0740598679188)*x[0]+(-0.0865611132887)*x[1]**o+(0.0414815431481)*x[1]+(-0.897395775334)*x[2]**o+(-0.580401889318)*x[2]
-        ref[0]=(-0.358142932888)*x_ref[0]**o+(0.758685606027)*x_ref[0]+(-0.0716050574096)*x_ref[1]**o+(-0.723587074286)*x_ref[1]+(0.387240173671)*x_ref[2]**o+(0.544679811421)*x_ref[2]
-        ref[1]=(0.864154242034)*x_ref[0]**o+(-0.0740598679188)*x_ref[0]+(-0.0865611132887)*x_ref[1]**o+(0.0414815431481)*x_ref[1]+(-0.897395775334)*x_ref[2]**o+(-0.580401889318)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.0571385613076)*x[0]**o+(-0.296048600622)*x[0]+(0.300914212927)*x[1]**o+(0.81578919689)*x[1]
-        arg[0,1]=(0.136796732287)*x[0]**o+(0.169384864236)*x[0]+(-0.874585047899)*x[1]**o+(-0.67613629157)*x[1]
-        arg[0,2]=(-0.947048556597)*x[0]**o+(-0.807647782941)*x[0]+(-0.53233790031)*x[1]**o+(0.618861393596)*x[1]
-        arg[0,3]=(-0.533009370674)*x[0]**o+(-0.732258917532)*x[0]+(0.735058784793)*x[1]**o+(0.313284184128)*x[1]
-        arg[0,4]=(0.678291805831)*x[0]**o+(0.892272189132)*x[0]+(-0.902740106267)*x[1]**o+(0.902593764933)*x[1]
-        arg[1,0]=(0.101446968367)*x[0]**o+(0.758270058166)*x[0]+(-0.511416064913)*x[1]**o+(-0.464147847068)*x[1]
-        arg[1,1]=(-0.0131419066862)*x[0]**o+(-0.942460391354)*x[0]+(0.479955107486)*x[1]**o+(-0.311304181244)*x[1]
-        arg[1,2]=(0.623958732361)*x[0]**o+(-0.313196338837)*x[0]+(0.413428996617)*x[1]**o+(0.348327566672)*x[1]
-        arg[1,3]=(-0.8413636876)*x[0]**o+(-0.572573098032)*x[0]+(-0.678663954356)*x[1]**o+(-0.419716403314)*x[1]
-        arg[1,4]=(-0.580466216486)*x[0]**o+(0.384226238557)*x[0]+(-0.732722613215)*x[1]**o+(-0.0238970013828)*x[1]
-        arg[2,0]=(-0.248986933717)*x[0]**o+(0.264019654506)*x[0]+(0.0314811616292)*x[1]**o+(0.631481081422)*x[1]
-        arg[2,1]=(0.643576426484)*x[0]**o+(-0.313599735242)*x[0]+(0.908780876791)*x[1]**o+(-0.698972268201)*x[1]
-        arg[2,2]=(-0.623208321993)*x[0]**o+(0.649637800083)*x[0]+(-0.878484988208)*x[1]**o+(0.368793479691)*x[1]
-        arg[2,3]=(0.239333407828)*x[0]**o+(-0.293558915555)*x[0]+(0.271630238733)*x[1]**o+(0.741304510722)*x[1]
-        arg[2,4]=(0.175914942104)*x[0]**o+(0.336116863935)*x[0]+(-0.799168065807)*x[1]**o+(0.0264962830729)*x[1]
-        arg[3,0]=(0.777665875019)*x[0]**o+(-0.13232137001)*x[0]+(0.682046389381)*x[1]**o+(0.589069623109)*x[1]
-        arg[3,1]=(0.7607621575)*x[0]**o+(-0.81285460551)*x[0]+(0.0523010659976)*x[1]**o+(-0.913765717778)*x[1]
-        arg[3,2]=(0.822107753118)*x[0]**o+(0.508869893322)*x[0]+(0.679583348422)*x[1]**o+(-0.597814039932)*x[1]
-        arg[3,3]=(-0.77699176705)*x[0]**o+(-0.267758166676)*x[0]+(0.661073127871)*x[1]**o+(-0.41434545147)*x[1]
-        arg[3,4]=(0.223013380161)*x[0]**o+(-0.558077040245)*x[0]+(-0.450831764747)*x[1]**o+(-0.0897765635191)*x[1]
-        ref[0,0]=(-0.0571385613076)*x_ref[0]**o+(-0.296048600622)*x_ref[0]+(0.300914212927)*x_ref[1]**o+(0.81578919689)*x_ref[1]
-        ref[0,1]=(0.136796732287)*x_ref[0]**o+(0.169384864236)*x_ref[0]+(-0.874585047899)*x_ref[1]**o+(-0.67613629157)*x_ref[1]
-        ref[0,2]=(-0.947048556597)*x_ref[0]**o+(-0.807647782941)*x_ref[0]+(-0.53233790031)*x_ref[1]**o+(0.618861393596)*x_ref[1]
-        ref[0,3]=(-0.533009370674)*x_ref[0]**o+(-0.732258917532)*x_ref[0]+(0.735058784793)*x_ref[1]**o+(0.313284184128)*x_ref[1]
-        ref[0,4]=(0.678291805831)*x_ref[0]**o+(0.892272189132)*x_ref[0]+(-0.902740106267)*x_ref[1]**o+(0.902593764933)*x_ref[1]
-        ref[1,0]=(0.101446968367)*x_ref[0]**o+(0.758270058166)*x_ref[0]+(-0.511416064913)*x_ref[1]**o+(-0.464147847068)*x_ref[1]
-        ref[1,1]=(-0.0131419066862)*x_ref[0]**o+(-0.942460391354)*x_ref[0]+(0.479955107486)*x_ref[1]**o+(-0.311304181244)*x_ref[1]
-        ref[1,2]=(0.623958732361)*x_ref[0]**o+(-0.313196338837)*x_ref[0]+(0.413428996617)*x_ref[1]**o+(0.348327566672)*x_ref[1]
-        ref[1,3]=(-0.8413636876)*x_ref[0]**o+(-0.572573098032)*x_ref[0]+(-0.678663954356)*x_ref[1]**o+(-0.419716403314)*x_ref[1]
-        ref[1,4]=(-0.580466216486)*x_ref[0]**o+(0.384226238557)*x_ref[0]+(-0.732722613215)*x_ref[1]**o+(-0.0238970013828)*x_ref[1]
-        ref[2,0]=(-0.248986933717)*x_ref[0]**o+(0.264019654506)*x_ref[0]+(0.0314811616292)*x_ref[1]**o+(0.631481081422)*x_ref[1]
-        ref[2,1]=(0.643576426484)*x_ref[0]**o+(-0.313599735242)*x_ref[0]+(0.908780876791)*x_ref[1]**o+(-0.698972268201)*x_ref[1]
-        ref[2,2]=(-0.623208321993)*x_ref[0]**o+(0.649637800083)*x_ref[0]+(-0.878484988208)*x_ref[1]**o+(0.368793479691)*x_ref[1]
-        ref[2,3]=(0.239333407828)*x_ref[0]**o+(-0.293558915555)*x_ref[0]+(0.271630238733)*x_ref[1]**o+(0.741304510722)*x_ref[1]
-        ref[2,4]=(0.175914942104)*x_ref[0]**o+(0.336116863935)*x_ref[0]+(-0.799168065807)*x_ref[1]**o+(0.0264962830729)*x_ref[1]
-        ref[3,0]=(0.777665875019)*x_ref[0]**o+(-0.13232137001)*x_ref[0]+(0.682046389381)*x_ref[1]**o+(0.589069623109)*x_ref[1]
-        ref[3,1]=(0.7607621575)*x_ref[0]**o+(-0.81285460551)*x_ref[0]+(0.0523010659976)*x_ref[1]**o+(-0.913765717778)*x_ref[1]
-        ref[3,2]=(0.822107753118)*x_ref[0]**o+(0.508869893322)*x_ref[0]+(0.679583348422)*x_ref[1]**o+(-0.597814039932)*x_ref[1]
-        ref[3,3]=(-0.77699176705)*x_ref[0]**o+(-0.267758166676)*x_ref[0]+(0.661073127871)*x_ref[1]**o+(-0.41434545147)*x_ref[1]
-        ref[3,4]=(0.223013380161)*x_ref[0]**o+(-0.558077040245)*x_ref[0]+(-0.450831764747)*x_ref[1]**o+(-0.0897765635191)*x_ref[1]
-      else:
-        arg[0,0]=(0.487697656095)*x[0]**o+(0.362509734966)*x[0]+(-0.40438484582)*x[1]**o+(-0.358984481681)*x[1]+(0.157670938098)*x[2]**o+(-0.631406375093)*x[2]
-        arg[0,1]=(-0.00251154956677)*x[0]**o+(0.671447769464)*x[0]+(0.535541351526)*x[1]**o+(0.433508112485)*x[1]+(-0.897668718638)*x[2]**o+(0.141331586102)*x[2]
-        arg[0,2]=(-0.964778505658)*x[0]**o+(0.522815935313)*x[0]+(-0.750318077186)*x[1]**o+(0.0595240411196)*x[1]+(-0.384021192511)*x[2]**o+(-0.802529657745)*x[2]
-        arg[0,3]=(0.264781810221)*x[0]**o+(-0.654277693956)*x[0]+(0.890264421741)*x[1]**o+(-0.657743774786)*x[1]+(0.320234835664)*x[2]**o+(0.0637070094165)*x[2]
-        arg[0,4]=(0.712229359775)*x[0]**o+(-0.646586719826)*x[0]+(0.876519277606)*x[1]**o+(0.473649630238)*x[1]+(0.332259187685)*x[2]**o+(-0.331489699179)*x[2]
-        arg[1,0]=(0.808534274392)*x[0]**o+(-0.296462057802)*x[0]+(0.152536716655)*x[1]**o+(-0.990267302005)*x[1]+(-0.823462709316)*x[2]**o+(-0.51608634537)*x[2]
-        arg[1,1]=(-0.745238552081)*x[0]**o+(-0.892086591023)*x[0]+(0.691429994644)*x[1]**o+(-0.52538570831)*x[1]+(-0.668959934842)*x[2]**o+(-0.5178179109)*x[2]
-        arg[1,2]=(0.10173204456)*x[0]**o+(-0.853001564748)*x[0]+(0.617252846191)*x[1]**o+(-0.518228673297)*x[1]+(-0.995447484095)*x[2]**o+(0.56679145486)*x[2]
-        arg[1,3]=(0.285145125389)*x[0]**o+(0.773362877732)*x[0]+(-0.457364007088)*x[1]**o+(0.226257217659)*x[1]+(0.439832733067)*x[2]**o+(0.872812128578)*x[2]
-        arg[1,4]=(-0.581535304023)*x[0]**o+(-0.944599120493)*x[0]+(-0.720009453699)*x[1]**o+(-0.29624047891)*x[1]+(0.966528522407)*x[2]**o+(0.818945905214)*x[2]
-        arg[2,0]=(-0.650732348774)*x[0]**o+(0.368909306978)*x[0]+(-0.608327978493)*x[1]**o+(0.301600904054)*x[1]+(-0.747648472883)*x[2]**o+(0.846568601061)*x[2]
-        arg[2,1]=(-0.0221803961531)*x[0]**o+(-0.858842969825)*x[0]+(-0.40141447334)*x[1]**o+(0.408164536045)*x[1]+(-0.0131899768237)*x[2]**o+(-0.0983376041104)*x[2]
-        arg[2,2]=(0.0855129797683)*x[0]**o+(0.0645200342375)*x[0]+(0.295916169508)*x[1]**o+(0.343169626483)*x[1]+(0.973477621396)*x[2]**o+(0.179505855846)*x[2]
-        arg[2,3]=(-0.115714157482)*x[0]**o+(-0.00785628190789)*x[0]+(0.406498238895)*x[1]**o+(-0.954353977843)*x[1]+(0.751544148524)*x[2]**o+(-0.092307218389)*x[2]
-        arg[2,4]=(0.807583813259)*x[0]**o+(-0.0150562208564)*x[0]+(0.967290753425)*x[1]**o+(0.960049095802)*x[1]+(0.41935259669)*x[2]**o+(0.878823415691)*x[2]
-        arg[3,0]=(-0.162221321908)*x[0]**o+(0.0142404015457)*x[0]+(0.769189546147)*x[1]**o+(-0.251240080116)*x[1]+(0.980441953151)*x[2]**o+(-0.183639594778)*x[2]
-        arg[3,1]=(0.270231471303)*x[0]**o+(-0.527471406108)*x[0]+(-0.255144134035)*x[1]**o+(0.268061599615)*x[1]+(-0.396373327005)*x[2]**o+(0.105905036411)*x[2]
-        arg[3,2]=(0.5159632953)*x[0]**o+(-0.87397274133)*x[0]+(0.493876004047)*x[1]**o+(0.320996363656)*x[1]+(0.884345148533)*x[2]**o+(0.116262647026)*x[2]
-        arg[3,3]=(-0.354053396048)*x[0]**o+(-0.130121845174)*x[0]+(-0.33114435645)*x[1]**o+(-0.73998189126)*x[1]+(0.362417530484)*x[2]**o+(0.676820875084)*x[2]
-        arg[3,4]=(-0.53273881792)*x[0]**o+(-0.0624208514424)*x[0]+(0.680486778939)*x[1]**o+(-0.370666453954)*x[1]+(0.294345859395)*x[2]**o+(-0.679169213305)*x[2]
-        ref[0,0]=(0.487697656095)*x_ref[0]**o+(0.362509734966)*x_ref[0]+(-0.40438484582)*x_ref[1]**o+(-0.358984481681)*x_ref[1]+(0.157670938098)*x_ref[2]**o+(-0.631406375093)*x_ref[2]
-        ref[0,1]=(-0.00251154956677)*x_ref[0]**o+(0.671447769464)*x_ref[0]+(0.535541351526)*x_ref[1]**o+(0.433508112485)*x_ref[1]+(-0.897668718638)*x_ref[2]**o+(0.141331586102)*x_ref[2]
-        ref[0,2]=(-0.964778505658)*x_ref[0]**o+(0.522815935313)*x_ref[0]+(-0.750318077186)*x_ref[1]**o+(0.0595240411196)*x_ref[1]+(-0.384021192511)*x_ref[2]**o+(-0.802529657745)*x_ref[2]
-        ref[0,3]=(0.264781810221)*x_ref[0]**o+(-0.654277693956)*x_ref[0]+(0.890264421741)*x_ref[1]**o+(-0.657743774786)*x_ref[1]+(0.320234835664)*x_ref[2]**o+(0.0637070094165)*x_ref[2]
-        ref[0,4]=(0.712229359775)*x_ref[0]**o+(-0.646586719826)*x_ref[0]+(0.876519277606)*x_ref[1]**o+(0.473649630238)*x_ref[1]+(0.332259187685)*x_ref[2]**o+(-0.331489699179)*x_ref[2]
-        ref[1,0]=(0.808534274392)*x_ref[0]**o+(-0.296462057802)*x_ref[0]+(0.152536716655)*x_ref[1]**o+(-0.990267302005)*x_ref[1]+(-0.823462709316)*x_ref[2]**o+(-0.51608634537)*x_ref[2]
-        ref[1,1]=(-0.745238552081)*x_ref[0]**o+(-0.892086591023)*x_ref[0]+(0.691429994644)*x_ref[1]**o+(-0.52538570831)*x_ref[1]+(-0.668959934842)*x_ref[2]**o+(-0.5178179109)*x_ref[2]
-        ref[1,2]=(0.10173204456)*x_ref[0]**o+(-0.853001564748)*x_ref[0]+(0.617252846191)*x_ref[1]**o+(-0.518228673297)*x_ref[1]+(-0.995447484095)*x_ref[2]**o+(0.56679145486)*x_ref[2]
-        ref[1,3]=(0.285145125389)*x_ref[0]**o+(0.773362877732)*x_ref[0]+(-0.457364007088)*x_ref[1]**o+(0.226257217659)*x_ref[1]+(0.439832733067)*x_ref[2]**o+(0.872812128578)*x_ref[2]
-        ref[1,4]=(-0.581535304023)*x_ref[0]**o+(-0.944599120493)*x_ref[0]+(-0.720009453699)*x_ref[1]**o+(-0.29624047891)*x_ref[1]+(0.966528522407)*x_ref[2]**o+(0.818945905214)*x_ref[2]
-        ref[2,0]=(-0.650732348774)*x_ref[0]**o+(0.368909306978)*x_ref[0]+(-0.608327978493)*x_ref[1]**o+(0.301600904054)*x_ref[1]+(-0.747648472883)*x_ref[2]**o+(0.846568601061)*x_ref[2]
-        ref[2,1]=(-0.0221803961531)*x_ref[0]**o+(-0.858842969825)*x_ref[0]+(-0.40141447334)*x_ref[1]**o+(0.408164536045)*x_ref[1]+(-0.0131899768237)*x_ref[2]**o+(-0.0983376041104)*x_ref[2]
-        ref[2,2]=(0.0855129797683)*x_ref[0]**o+(0.0645200342375)*x_ref[0]+(0.295916169508)*x_ref[1]**o+(0.343169626483)*x_ref[1]+(0.973477621396)*x_ref[2]**o+(0.179505855846)*x_ref[2]
-        ref[2,3]=(-0.115714157482)*x_ref[0]**o+(-0.00785628190789)*x_ref[0]+(0.406498238895)*x_ref[1]**o+(-0.954353977843)*x_ref[1]+(0.751544148524)*x_ref[2]**o+(-0.092307218389)*x_ref[2]
-        ref[2,4]=(0.807583813259)*x_ref[0]**o+(-0.0150562208564)*x_ref[0]+(0.967290753425)*x_ref[1]**o+(0.960049095802)*x_ref[1]+(0.41935259669)*x_ref[2]**o+(0.878823415691)*x_ref[2]
-        ref[3,0]=(-0.162221321908)*x_ref[0]**o+(0.0142404015457)*x_ref[0]+(0.769189546147)*x_ref[1]**o+(-0.251240080116)*x_ref[1]+(0.980441953151)*x_ref[2]**o+(-0.183639594778)*x_ref[2]
-        ref[3,1]=(0.270231471303)*x_ref[0]**o+(-0.527471406108)*x_ref[0]+(-0.255144134035)*x_ref[1]**o+(0.268061599615)*x_ref[1]+(-0.396373327005)*x_ref[2]**o+(0.105905036411)*x_ref[2]
-        ref[3,2]=(0.5159632953)*x_ref[0]**o+(-0.87397274133)*x_ref[0]+(0.493876004047)*x_ref[1]**o+(0.320996363656)*x_ref[1]+(0.884345148533)*x_ref[2]**o+(0.116262647026)*x_ref[2]
-        ref[3,3]=(-0.354053396048)*x_ref[0]**o+(-0.130121845174)*x_ref[0]+(-0.33114435645)*x_ref[1]**o+(-0.73998189126)*x_ref[1]+(0.362417530484)*x_ref[2]**o+(0.676820875084)*x_ref[2]
-        ref[3,4]=(-0.53273881792)*x_ref[0]**o+(-0.0624208514424)*x_ref[0]+(0.680486778939)*x_ref[1]**o+(-0.370666453954)*x_ref[1]+(0.294345859395)*x_ref[2]**o+(-0.679169213305)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0906971676514)*x[0]**o+(-0.0640252128559)*x[0]+(-0.0108470120234)*x[1]**o+(-0.62531206416)*x[1]
-        arg[0,0,1]=(-0.0186703191671)*x[0]**o+(0.256044044276)*x[0]+(-0.420130556042)*x[1]**o+(-0.241203381189)*x[1]
-        arg[0,1,0]=(-0.287587258734)*x[0]**o+(-0.152487596827)*x[0]+(-0.554975489568)*x[1]**o+(0.713650618367)*x[1]
-        arg[0,1,1]=(0.467597882001)*x[0]**o+(0.617291271522)*x[0]+(0.839893220642)*x[1]**o+(0.477553624935)*x[1]
-        arg[1,0,0]=(0.292433268891)*x[0]**o+(0.0420372671524)*x[0]+(-0.342734694042)*x[1]**o+(0.892580432212)*x[1]
-        arg[1,0,1]=(0.191399101606)*x[0]**o+(0.413781516804)*x[0]+(-0.346483382584)*x[1]**o+(0.805718474386)*x[1]
-        arg[1,1,0]=(0.917644938285)*x[0]**o+(0.60457272962)*x[0]+(-0.0949129141155)*x[1]**o+(0.705971564397)*x[1]
-        arg[1,1,1]=(0.327738300229)*x[0]**o+(-0.738951673731)*x[0]+(0.335869509312)*x[1]**o+(0.392167761004)*x[1]
-        arg[2,0,0]=(0.460678533261)*x[0]**o+(-0.10665029868)*x[0]+(0.658148262201)*x[1]**o+(-0.75975084995)*x[1]
-        arg[2,0,1]=(0.307057582515)*x[0]**o+(0.0755776536138)*x[0]+(0.866743758656)*x[1]**o+(-0.463537240812)*x[1]
-        arg[2,1,0]=(-0.470241867396)*x[0]**o+(-0.0316070952691)*x[0]+(0.877786692055)*x[1]**o+(-0.750713976717)*x[1]
-        arg[2,1,1]=(0.755903505788)*x[0]**o+(0.398472877018)*x[0]+(-0.372159129627)*x[1]**o+(0.170870288116)*x[1]
-        arg[3,0,0]=(0.0310115714805)*x[0]**o+(0.822261427932)*x[0]+(-0.0979068243755)*x[1]**o+(0.61848414895)*x[1]
-        arg[3,0,1]=(-0.442666645023)*x[0]**o+(0.759423291727)*x[0]+(0.771826722418)*x[1]**o+(-0.342283533203)*x[1]
-        arg[3,1,0]=(0.292608821995)*x[0]**o+(0.301553824784)*x[0]+(0.445054135435)*x[1]**o+(0.990249711651)*x[1]
-        arg[3,1,1]=(0.835714722542)*x[0]**o+(0.888569910076)*x[0]+(0.76442321847)*x[1]**o+(-0.272880995105)*x[1]
-        arg[4,0,0]=(0.434738367563)*x[0]**o+(-0.801063604881)*x[0]+(-0.0152782263323)*x[1]**o+(-0.309467614762)*x[1]
-        arg[4,0,1]=(-0.647140151015)*x[0]**o+(-0.0810020795911)*x[0]+(0.356402263616)*x[1]**o+(0.861692124435)*x[1]
-        arg[4,1,0]=(-0.958501155541)*x[0]**o+(0.611720259342)*x[0]+(-0.631450146062)*x[1]**o+(-0.512668667768)*x[1]
-        arg[4,1,1]=(0.771988547023)*x[0]**o+(0.466474334634)*x[0]+(-0.380283529607)*x[1]**o+(-0.619497160805)*x[1]
-        arg[5,0,0]=(0.427386565443)*x[0]**o+(-0.178637075872)*x[0]+(0.81988184595)*x[1]**o+(-0.407798714033)*x[1]
-        arg[5,0,1]=(-0.850161084571)*x[0]**o+(0.183440360862)*x[0]+(-0.83848298192)*x[1]**o+(-0.222248160259)*x[1]
-        arg[5,1,0]=(-0.930623680879)*x[0]**o+(0.694991147173)*x[0]+(-0.299904374239)*x[1]**o+(0.552324198856)*x[1]
-        arg[5,1,1]=(0.740715083219)*x[0]**o+(0.438768785937)*x[0]+(0.977523774483)*x[1]**o+(-0.668723413125)*x[1]
-        ref[0,0,0]=(-0.0906971676514)*x_ref[0]**o+(-0.0640252128559)*x_ref[0]+(-0.0108470120234)*x_ref[1]**o+(-0.62531206416)*x_ref[1]
-        ref[0,0,1]=(-0.0186703191671)*x_ref[0]**o+(0.256044044276)*x_ref[0]+(-0.420130556042)*x_ref[1]**o+(-0.241203381189)*x_ref[1]
-        ref[0,1,0]=(-0.287587258734)*x_ref[0]**o+(-0.152487596827)*x_ref[0]+(-0.554975489568)*x_ref[1]**o+(0.713650618367)*x_ref[1]
-        ref[0,1,1]=(0.467597882001)*x_ref[0]**o+(0.617291271522)*x_ref[0]+(0.839893220642)*x_ref[1]**o+(0.477553624935)*x_ref[1]
-        ref[1,0,0]=(0.292433268891)*x_ref[0]**o+(0.0420372671524)*x_ref[0]+(-0.342734694042)*x_ref[1]**o+(0.892580432212)*x_ref[1]
-        ref[1,0,1]=(0.191399101606)*x_ref[0]**o+(0.413781516804)*x_ref[0]+(-0.346483382584)*x_ref[1]**o+(0.805718474386)*x_ref[1]
-        ref[1,1,0]=(0.917644938285)*x_ref[0]**o+(0.60457272962)*x_ref[0]+(-0.0949129141155)*x_ref[1]**o+(0.705971564397)*x_ref[1]
-        ref[1,1,1]=(0.327738300229)*x_ref[0]**o+(-0.738951673731)*x_ref[0]+(0.335869509312)*x_ref[1]**o+(0.392167761004)*x_ref[1]
-        ref[2,0,0]=(0.460678533261)*x_ref[0]**o+(-0.10665029868)*x_ref[0]+(0.658148262201)*x_ref[1]**o+(-0.75975084995)*x_ref[1]
-        ref[2,0,1]=(0.307057582515)*x_ref[0]**o+(0.0755776536138)*x_ref[0]+(0.866743758656)*x_ref[1]**o+(-0.463537240812)*x_ref[1]
-        ref[2,1,0]=(-0.470241867396)*x_ref[0]**o+(-0.0316070952691)*x_ref[0]+(0.877786692055)*x_ref[1]**o+(-0.750713976717)*x_ref[1]
-        ref[2,1,1]=(0.755903505788)*x_ref[0]**o+(0.398472877018)*x_ref[0]+(-0.372159129627)*x_ref[1]**o+(0.170870288116)*x_ref[1]
-        ref[3,0,0]=(0.0310115714805)*x_ref[0]**o+(0.822261427932)*x_ref[0]+(-0.0979068243755)*x_ref[1]**o+(0.61848414895)*x_ref[1]
-        ref[3,0,1]=(-0.442666645023)*x_ref[0]**o+(0.759423291727)*x_ref[0]+(0.771826722418)*x_ref[1]**o+(-0.342283533203)*x_ref[1]
-        ref[3,1,0]=(0.292608821995)*x_ref[0]**o+(0.301553824784)*x_ref[0]+(0.445054135435)*x_ref[1]**o+(0.990249711651)*x_ref[1]
-        ref[3,1,1]=(0.835714722542)*x_ref[0]**o+(0.888569910076)*x_ref[0]+(0.76442321847)*x_ref[1]**o+(-0.272880995105)*x_ref[1]
-        ref[4,0,0]=(0.434738367563)*x_ref[0]**o+(-0.801063604881)*x_ref[0]+(-0.0152782263323)*x_ref[1]**o+(-0.309467614762)*x_ref[1]
-        ref[4,0,1]=(-0.647140151015)*x_ref[0]**o+(-0.0810020795911)*x_ref[0]+(0.356402263616)*x_ref[1]**o+(0.861692124435)*x_ref[1]
-        ref[4,1,0]=(-0.958501155541)*x_ref[0]**o+(0.611720259342)*x_ref[0]+(-0.631450146062)*x_ref[1]**o+(-0.512668667768)*x_ref[1]
-        ref[4,1,1]=(0.771988547023)*x_ref[0]**o+(0.466474334634)*x_ref[0]+(-0.380283529607)*x_ref[1]**o+(-0.619497160805)*x_ref[1]
-        ref[5,0,0]=(0.427386565443)*x_ref[0]**o+(-0.178637075872)*x_ref[0]+(0.81988184595)*x_ref[1]**o+(-0.407798714033)*x_ref[1]
-        ref[5,0,1]=(-0.850161084571)*x_ref[0]**o+(0.183440360862)*x_ref[0]+(-0.83848298192)*x_ref[1]**o+(-0.222248160259)*x_ref[1]
-        ref[5,1,0]=(-0.930623680879)*x_ref[0]**o+(0.694991147173)*x_ref[0]+(-0.299904374239)*x_ref[1]**o+(0.552324198856)*x_ref[1]
-        ref[5,1,1]=(0.740715083219)*x_ref[0]**o+(0.438768785937)*x_ref[0]+(0.977523774483)*x_ref[1]**o+(-0.668723413125)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.0408197213005)*x[0]**o+(-0.992920054273)*x[0]+(0.122468233435)*x[1]**o+(-0.435942398199)*x[1]+(0.822235014621)*x[2]**o+(0.425925287623)*x[2]
-        arg[0,0,1]=(0.474354220259)*x[0]**o+(0.287892840646)*x[0]+(-0.519818501933)*x[1]**o+(0.412301993774)*x[1]+(-0.242320576454)*x[2]**o+(0.758556860596)*x[2]
-        arg[0,1,0]=(0.588735088154)*x[0]**o+(-0.948279493327)*x[0]+(0.194404465814)*x[1]**o+(-0.00761227943336)*x[1]+(-0.117173968067)*x[2]**o+(-0.228746139749)*x[2]
-        arg[0,1,1]=(0.166448081217)*x[0]**o+(-0.228754542424)*x[0]+(-0.87739172573)*x[1]**o+(-0.592282861607)*x[1]+(-0.836732991313)*x[2]**o+(-0.20226535214)*x[2]
-        arg[1,0,0]=(0.2683388552)*x[0]**o+(-0.733516131653)*x[0]+(-0.900887340495)*x[1]**o+(-0.614908158304)*x[1]+(0.422189467695)*x[2]**o+(0.642276887435)*x[2]
-        arg[1,0,1]=(0.965294152134)*x[0]**o+(-0.326731862045)*x[0]+(-0.797754723728)*x[1]**o+(-0.678993698958)*x[1]+(0.256815891879)*x[2]**o+(0.48610716642)*x[2]
-        arg[1,1,0]=(0.71383480118)*x[0]**o+(-0.949206151211)*x[0]+(0.40802633055)*x[1]**o+(-0.512457451544)*x[1]+(0.83647020826)*x[2]**o+(0.330550196742)*x[2]
-        arg[1,1,1]=(-0.108602934331)*x[0]**o+(-0.585532075482)*x[0]+(0.302790940309)*x[1]**o+(-0.201628116557)*x[1]+(0.523440894937)*x[2]**o+(-0.421867218852)*x[2]
-        arg[2,0,0]=(-0.911096130025)*x[0]**o+(-0.944970520542)*x[0]+(0.597179186191)*x[1]**o+(0.530539729209)*x[1]+(-0.538576718159)*x[2]**o+(-0.908863106348)*x[2]
-        arg[2,0,1]=(0.828174522282)*x[0]**o+(-0.132534369339)*x[0]+(0.851849613713)*x[1]**o+(0.191494183049)*x[1]+(-0.953488097214)*x[2]**o+(0.423553741843)*x[2]
-        arg[2,1,0]=(0.458631350156)*x[0]**o+(0.21755431391)*x[0]+(-0.128541259216)*x[1]**o+(-0.172831640065)*x[1]+(-0.62567145453)*x[2]**o+(-0.345626622399)*x[2]
-        arg[2,1,1]=(0.49890508395)*x[0]**o+(-0.395084188812)*x[0]+(-0.653164498387)*x[1]**o+(-0.656416446654)*x[1]+(-0.844855683273)*x[2]**o+(-0.813755115861)*x[2]
-        arg[3,0,0]=(-0.252710828698)*x[0]**o+(-0.0100429888666)*x[0]+(0.952930817098)*x[1]**o+(-0.950777038172)*x[1]+(0.244588721191)*x[2]**o+(-0.400442332557)*x[2]
-        arg[3,0,1]=(-0.505331423555)*x[0]**o+(-0.535163478725)*x[0]+(0.924129836434)*x[1]**o+(-0.285813201016)*x[1]+(0.225037301542)*x[2]**o+(-0.331424134564)*x[2]
-        arg[3,1,0]=(-0.556397106971)*x[0]**o+(0.26005371138)*x[0]+(0.902941320217)*x[1]**o+(0.70375648044)*x[1]+(-0.559371940837)*x[2]**o+(-0.628051748121)*x[2]
-        arg[3,1,1]=(-0.644440017615)*x[0]**o+(-0.13415915731)*x[0]+(-0.752973804206)*x[1]**o+(-0.430304389409)*x[1]+(0.892979644749)*x[2]**o+(0.0618885081881)*x[2]
-        arg[4,0,0]=(0.388902949971)*x[0]**o+(-0.413207160819)*x[0]+(-0.597892565551)*x[1]**o+(-0.433017605538)*x[1]+(0.369120396114)*x[2]**o+(-0.714185662873)*x[2]
-        arg[4,0,1]=(0.140621693105)*x[0]**o+(0.910612147355)*x[0]+(0.404844175588)*x[1]**o+(0.963351416048)*x[1]+(0.545142156468)*x[2]**o+(-0.513154196146)*x[2]
-        arg[4,1,0]=(-0.6045448854)*x[0]**o+(0.364599037279)*x[0]+(-0.165333666972)*x[1]**o+(-0.454715984949)*x[1]+(-0.123749300084)*x[2]**o+(0.23666517892)*x[2]
-        arg[4,1,1]=(-0.701819332028)*x[0]**o+(-0.945269094128)*x[0]+(0.313745376139)*x[1]**o+(-0.0508160648325)*x[1]+(0.273150632944)*x[2]**o+(0.363230489878)*x[2]
-        arg[5,0,0]=(-0.899477778287)*x[0]**o+(0.408300340496)*x[0]+(-0.501090863132)*x[1]**o+(-0.142172524799)*x[1]+(0.840930927028)*x[2]**o+(0.0786174984564)*x[2]
-        arg[5,0,1]=(0.816863720765)*x[0]**o+(0.421613919321)*x[0]+(0.619636513942)*x[1]**o+(-0.867504595488)*x[1]+(-0.377345269009)*x[2]**o+(-0.884630348781)*x[2]
-        arg[5,1,0]=(0.972307172208)*x[0]**o+(0.704673083035)*x[0]+(0.546566839332)*x[1]**o+(-0.303145527888)*x[1]+(-0.203985539635)*x[2]**o+(0.984097584463)*x[2]
-        arg[5,1,1]=(0.67971485539)*x[0]**o+(0.492284313707)*x[0]+(0.139113989973)*x[1]**o+(-0.981414708174)*x[1]+(0.585926444541)*x[2]**o+(-0.790952419012)*x[2]
-        ref[0,0,0]=(0.0408197213005)*x_ref[0]**o+(-0.992920054273)*x_ref[0]+(0.122468233435)*x_ref[1]**o+(-0.435942398199)*x_ref[1]+(0.822235014621)*x_ref[2]**o+(0.425925287623)*x_ref[2]
-        ref[0,0,1]=(0.474354220259)*x_ref[0]**o+(0.287892840646)*x_ref[0]+(-0.519818501933)*x_ref[1]**o+(0.412301993774)*x_ref[1]+(-0.242320576454)*x_ref[2]**o+(0.758556860596)*x_ref[2]
-        ref[0,1,0]=(0.588735088154)*x_ref[0]**o+(-0.948279493327)*x_ref[0]+(0.194404465814)*x_ref[1]**o+(-0.00761227943336)*x_ref[1]+(-0.117173968067)*x_ref[2]**o+(-0.228746139749)*x_ref[2]
-        ref[0,1,1]=(0.166448081217)*x_ref[0]**o+(-0.228754542424)*x_ref[0]+(-0.87739172573)*x_ref[1]**o+(-0.592282861607)*x_ref[1]+(-0.836732991313)*x_ref[2]**o+(-0.20226535214)*x_ref[2]
-        ref[1,0,0]=(0.2683388552)*x_ref[0]**o+(-0.733516131653)*x_ref[0]+(-0.900887340495)*x_ref[1]**o+(-0.614908158304)*x_ref[1]+(0.422189467695)*x_ref[2]**o+(0.642276887435)*x_ref[2]
-        ref[1,0,1]=(0.965294152134)*x_ref[0]**o+(-0.326731862045)*x_ref[0]+(-0.797754723728)*x_ref[1]**o+(-0.678993698958)*x_ref[1]+(0.256815891879)*x_ref[2]**o+(0.48610716642)*x_ref[2]
-        ref[1,1,0]=(0.71383480118)*x_ref[0]**o+(-0.949206151211)*x_ref[0]+(0.40802633055)*x_ref[1]**o+(-0.512457451544)*x_ref[1]+(0.83647020826)*x_ref[2]**o+(0.330550196742)*x_ref[2]
-        ref[1,1,1]=(-0.108602934331)*x_ref[0]**o+(-0.585532075482)*x_ref[0]+(0.302790940309)*x_ref[1]**o+(-0.201628116557)*x_ref[1]+(0.523440894937)*x_ref[2]**o+(-0.421867218852)*x_ref[2]
-        ref[2,0,0]=(-0.911096130025)*x_ref[0]**o+(-0.944970520542)*x_ref[0]+(0.597179186191)*x_ref[1]**o+(0.530539729209)*x_ref[1]+(-0.538576718159)*x_ref[2]**o+(-0.908863106348)*x_ref[2]
-        ref[2,0,1]=(0.828174522282)*x_ref[0]**o+(-0.132534369339)*x_ref[0]+(0.851849613713)*x_ref[1]**o+(0.191494183049)*x_ref[1]+(-0.953488097214)*x_ref[2]**o+(0.423553741843)*x_ref[2]
-        ref[2,1,0]=(0.458631350156)*x_ref[0]**o+(0.21755431391)*x_ref[0]+(-0.128541259216)*x_ref[1]**o+(-0.172831640065)*x_ref[1]+(-0.62567145453)*x_ref[2]**o+(-0.345626622399)*x_ref[2]
-        ref[2,1,1]=(0.49890508395)*x_ref[0]**o+(-0.395084188812)*x_ref[0]+(-0.653164498387)*x_ref[1]**o+(-0.656416446654)*x_ref[1]+(-0.844855683273)*x_ref[2]**o+(-0.813755115861)*x_ref[2]
-        ref[3,0,0]=(-0.252710828698)*x_ref[0]**o+(-0.0100429888666)*x_ref[0]+(0.952930817098)*x_ref[1]**o+(-0.950777038172)*x_ref[1]+(0.244588721191)*x_ref[2]**o+(-0.400442332557)*x_ref[2]
-        ref[3,0,1]=(-0.505331423555)*x_ref[0]**o+(-0.535163478725)*x_ref[0]+(0.924129836434)*x_ref[1]**o+(-0.285813201016)*x_ref[1]+(0.225037301542)*x_ref[2]**o+(-0.331424134564)*x_ref[2]
-        ref[3,1,0]=(-0.556397106971)*x_ref[0]**o+(0.26005371138)*x_ref[0]+(0.902941320217)*x_ref[1]**o+(0.70375648044)*x_ref[1]+(-0.559371940837)*x_ref[2]**o+(-0.628051748121)*x_ref[2]
-        ref[3,1,1]=(-0.644440017615)*x_ref[0]**o+(-0.13415915731)*x_ref[0]+(-0.752973804206)*x_ref[1]**o+(-0.430304389409)*x_ref[1]+(0.892979644749)*x_ref[2]**o+(0.0618885081881)*x_ref[2]
-        ref[4,0,0]=(0.388902949971)*x_ref[0]**o+(-0.413207160819)*x_ref[0]+(-0.597892565551)*x_ref[1]**o+(-0.433017605538)*x_ref[1]+(0.369120396114)*x_ref[2]**o+(-0.714185662873)*x_ref[2]
-        ref[4,0,1]=(0.140621693105)*x_ref[0]**o+(0.910612147355)*x_ref[0]+(0.404844175588)*x_ref[1]**o+(0.963351416048)*x_ref[1]+(0.545142156468)*x_ref[2]**o+(-0.513154196146)*x_ref[2]
-        ref[4,1,0]=(-0.6045448854)*x_ref[0]**o+(0.364599037279)*x_ref[0]+(-0.165333666972)*x_ref[1]**o+(-0.454715984949)*x_ref[1]+(-0.123749300084)*x_ref[2]**o+(0.23666517892)*x_ref[2]
-        ref[4,1,1]=(-0.701819332028)*x_ref[0]**o+(-0.945269094128)*x_ref[0]+(0.313745376139)*x_ref[1]**o+(-0.0508160648325)*x_ref[1]+(0.273150632944)*x_ref[2]**o+(0.363230489878)*x_ref[2]
-        ref[5,0,0]=(-0.899477778287)*x_ref[0]**o+(0.408300340496)*x_ref[0]+(-0.501090863132)*x_ref[1]**o+(-0.142172524799)*x_ref[1]+(0.840930927028)*x_ref[2]**o+(0.0786174984564)*x_ref[2]
-        ref[5,0,1]=(0.816863720765)*x_ref[0]**o+(0.421613919321)*x_ref[0]+(0.619636513942)*x_ref[1]**o+(-0.867504595488)*x_ref[1]+(-0.377345269009)*x_ref[2]**o+(-0.884630348781)*x_ref[2]
-        ref[5,1,0]=(0.972307172208)*x_ref[0]**o+(0.704673083035)*x_ref[0]+(0.546566839332)*x_ref[1]**o+(-0.303145527888)*x_ref[1]+(-0.203985539635)*x_ref[2]**o+(0.984097584463)*x_ref[2]
-        ref[5,1,1]=(0.67971485539)*x_ref[0]**o+(0.492284313707)*x_ref[0]+(0.139113989973)*x_ref[1]**o+(-0.981414708174)*x_ref[1]+(0.585926444541)*x_ref[2]**o+(-0.790952419012)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.717741572212)*x[0]**o+(-0.771801794802)*x[0]+(-0.782201793954)*x[1]**o+(0.125253178673)*x[1]
-        arg[0,0,0,1]=(-0.483339499341)*x[0]**o+(0.0177945970437)*x[0]+(0.233532060933)*x[1]**o+(-0.465948890703)*x[1]
-        arg[0,0,1,0]=(0.140544455071)*x[0]**o+(-0.120145399579)*x[0]+(-0.0732045826929)*x[1]**o+(-0.738165902415)*x[1]
-        arg[0,0,1,1]=(0.98057407477)*x[0]**o+(0.346125329427)*x[0]+(0.697386820108)*x[1]**o+(0.402406370862)*x[1]
-        arg[0,0,2,0]=(0.347641628204)*x[0]**o+(-0.217938924727)*x[0]+(-0.0572727430966)*x[1]**o+(0.170631149745)*x[1]
-        arg[0,0,2,1]=(0.621840702108)*x[0]**o+(-0.109219941839)*x[0]+(0.894052962811)*x[1]**o+(0.423894680808)*x[1]
-        arg[0,1,0,0]=(0.0339315069567)*x[0]**o+(-0.655546201957)*x[0]+(-0.271776247317)*x[1]**o+(0.4760527815)*x[1]
-        arg[0,1,0,1]=(0.904216237912)*x[0]**o+(0.974869309983)*x[0]+(0.678379481202)*x[1]**o+(0.602534020957)*x[1]
-        arg[0,1,1,0]=(-0.98805028173)*x[0]**o+(0.255251214419)*x[0]+(0.659010647624)*x[1]**o+(-0.45360685971)*x[1]
-        arg[0,1,1,1]=(0.0884339867328)*x[0]**o+(-0.325188714625)*x[0]+(0.158562643552)*x[1]**o+(-0.788600388567)*x[1]
-        arg[0,1,2,0]=(0.976404407593)*x[0]**o+(0.353231650963)*x[0]+(0.546951413477)*x[1]**o+(0.0738098551899)*x[1]
-        arg[0,1,2,1]=(-0.812156797654)*x[0]**o+(-0.0180014270879)*x[0]+(0.686011517957)*x[1]**o+(0.148522434365)*x[1]
-        arg[0,2,0,0]=(-0.40018516407)*x[0]**o+(-0.0512695503575)*x[0]+(-0.715512784143)*x[1]**o+(0.111064716031)*x[1]
-        arg[0,2,0,1]=(-0.963397739298)*x[0]**o+(0.406951519848)*x[0]+(-0.293539028967)*x[1]**o+(-0.549328925146)*x[1]
-        arg[0,2,1,0]=(-0.00827402449089)*x[0]**o+(-0.657982352244)*x[0]+(-0.515966831052)*x[1]**o+(0.531853371259)*x[1]
-        arg[0,2,1,1]=(0.0379862601491)*x[0]**o+(0.988691147833)*x[0]+(0.820623911484)*x[1]**o+(0.689064076022)*x[1]
-        arg[0,2,2,0]=(-0.857638654259)*x[0]**o+(0.664968676908)*x[0]+(-0.228424264597)*x[1]**o+(0.740003679791)*x[1]
-        arg[0,2,2,1]=(0.456486069586)*x[0]**o+(-0.510130176146)*x[0]+(-0.189525160745)*x[1]**o+(0.497975981413)*x[1]
-        arg[0,3,0,0]=(-0.981633737105)*x[0]**o+(0.25636883881)*x[0]+(-0.0477676975467)*x[1]**o+(0.654475880014)*x[1]
-        arg[0,3,0,1]=(-0.0710284929969)*x[0]**o+(0.338590765191)*x[0]+(0.639048913997)*x[1]**o+(-0.24999606762)*x[1]
-        arg[0,3,1,0]=(-0.731484482659)*x[0]**o+(-0.808253846389)*x[0]+(-0.911723431862)*x[1]**o+(-0.266029942425)*x[1]
-        arg[0,3,1,1]=(0.909037857376)*x[0]**o+(-0.164525039433)*x[0]+(-0.924332370345)*x[1]**o+(0.476479399362)*x[1]
-        arg[0,3,2,0]=(0.00534173833653)*x[0]**o+(-0.435160515142)*x[0]+(0.402701511687)*x[1]**o+(0.161631276653)*x[1]
-        arg[0,3,2,1]=(-0.595791669027)*x[0]**o+(0.170580206948)*x[0]+(0.468802250813)*x[1]**o+(-0.881472636722)*x[1]
-        arg[0,4,0,0]=(-0.0739506349513)*x[0]**o+(0.513385505957)*x[0]+(0.046977740371)*x[1]**o+(0.95763159987)*x[1]
-        arg[0,4,0,1]=(-0.286789006223)*x[0]**o+(0.017476293519)*x[0]+(0.637378781092)*x[1]**o+(-0.670201122126)*x[1]
-        arg[0,4,1,0]=(0.159607100455)*x[0]**o+(0.715341910227)*x[0]+(0.949546645819)*x[1]**o+(0.362982182775)*x[1]
-        arg[0,4,1,1]=(-0.237702024358)*x[0]**o+(-0.520488841454)*x[0]+(0.606333933569)*x[1]**o+(-0.00662757701049)*x[1]
-        arg[0,4,2,0]=(-0.415753817901)*x[0]**o+(0.731285464784)*x[0]+(0.15987336144)*x[1]**o+(0.0697706236338)*x[1]
-        arg[0,4,2,1]=(0.0467482158427)*x[0]**o+(0.306004722736)*x[0]+(-0.905184725692)*x[1]**o+(-0.158017889366)*x[1]
-        arg[1,0,0,0]=(-0.785535082426)*x[0]**o+(-0.189285100452)*x[0]+(-0.766349940057)*x[1]**o+(0.531469308995)*x[1]
-        arg[1,0,0,1]=(0.522213196477)*x[0]**o+(-0.661381741437)*x[0]+(0.816089886956)*x[1]**o+(0.139829382305)*x[1]
-        arg[1,0,1,0]=(0.0957295570417)*x[0]**o+(-0.105252674536)*x[0]+(-0.569429953382)*x[1]**o+(-0.801934666657)*x[1]
-        arg[1,0,1,1]=(-0.557307051058)*x[0]**o+(0.218852576416)*x[0]+(0.430167216464)*x[1]**o+(-0.112285681761)*x[1]
-        arg[1,0,2,0]=(0.288472422477)*x[0]**o+(0.294377994763)*x[0]+(-0.809503961511)*x[1]**o+(0.357020226991)*x[1]
-        arg[1,0,2,1]=(-0.148113477705)*x[0]**o+(0.164468646294)*x[0]+(0.7977142476)*x[1]**o+(-0.407274933384)*x[1]
-        arg[1,1,0,0]=(-0.926374434822)*x[0]**o+(-0.107713463193)*x[0]+(-0.511635723869)*x[1]**o+(0.259319717689)*x[1]
-        arg[1,1,0,1]=(-0.18636582243)*x[0]**o+(0.698258973628)*x[0]+(0.234379281397)*x[1]**o+(0.596195875495)*x[1]
-        arg[1,1,1,0]=(-0.180395892006)*x[0]**o+(0.631248500084)*x[0]+(0.104751616377)*x[1]**o+(0.204500206653)*x[1]
-        arg[1,1,1,1]=(-0.517119564238)*x[0]**o+(-0.16634015634)*x[0]+(0.556785586675)*x[1]**o+(0.42659306392)*x[1]
-        arg[1,1,2,0]=(0.163807238958)*x[0]**o+(-0.534619478446)*x[0]+(-0.700353460753)*x[1]**o+(0.121393131648)*x[1]
-        arg[1,1,2,1]=(0.964276278961)*x[0]**o+(0.846030751304)*x[0]+(-0.745301894392)*x[1]**o+(0.33821485558)*x[1]
-        arg[1,2,0,0]=(0.333173101086)*x[0]**o+(0.774848048743)*x[0]+(-0.659091916357)*x[1]**o+(-0.797247144497)*x[1]
-        arg[1,2,0,1]=(0.0581394534285)*x[0]**o+(-0.524771663031)*x[0]+(-0.519465753317)*x[1]**o+(0.71748795226)*x[1]
-        arg[1,2,1,0]=(0.224935262833)*x[0]**o+(-0.393399819306)*x[0]+(0.199349075224)*x[1]**o+(-0.808847009412)*x[1]
-        arg[1,2,1,1]=(0.0385750795521)*x[0]**o+(-8.09949553151e-05)*x[0]+(0.496860964506)*x[1]**o+(0.0119507407829)*x[1]
-        arg[1,2,2,0]=(0.876341556167)*x[0]**o+(0.18082766372)*x[0]+(0.401349871827)*x[1]**o+(-0.543439037303)*x[1]
-        arg[1,2,2,1]=(-0.894525004507)*x[0]**o+(-0.516771143695)*x[0]+(0.0410916490263)*x[1]**o+(0.753841618439)*x[1]
-        arg[1,3,0,0]=(0.251979970924)*x[0]**o+(0.790276550438)*x[0]+(-0.155708793888)*x[1]**o+(0.28971278336)*x[1]
-        arg[1,3,0,1]=(0.258336265436)*x[0]**o+(0.696642875149)*x[0]+(0.0561355915649)*x[1]**o+(0.601839744417)*x[1]
-        arg[1,3,1,0]=(-0.978729102785)*x[0]**o+(0.335280613262)*x[0]+(0.89228798232)*x[1]**o+(-0.693050679348)*x[1]
-        arg[1,3,1,1]=(-0.885817753431)*x[0]**o+(-0.0641571535708)*x[0]+(-0.649578576181)*x[1]**o+(-0.95773137602)*x[1]
-        arg[1,3,2,0]=(-0.333891001461)*x[0]**o+(-0.496064308564)*x[0]+(0.438549603377)*x[1]**o+(0.0772468142672)*x[1]
-        arg[1,3,2,1]=(-0.16171788255)*x[0]**o+(-0.939293453222)*x[0]+(-0.284522648546)*x[1]**o+(0.744642328375)*x[1]
-        arg[1,4,0,0]=(0.806133262332)*x[0]**o+(-0.0225320206432)*x[0]+(0.125958642606)*x[1]**o+(0.610630249467)*x[1]
-        arg[1,4,0,1]=(0.657971870946)*x[0]**o+(0.698894701525)*x[0]+(-0.595952612496)*x[1]**o+(-0.38268841292)*x[1]
-        arg[1,4,1,0]=(-0.277274411331)*x[0]**o+(-0.483183004514)*x[0]+(0.77656657009)*x[1]**o+(-0.959290466645)*x[1]
-        arg[1,4,1,1]=(-0.96384356305)*x[0]**o+(-0.00383301781476)*x[0]+(0.788010409608)*x[1]**o+(0.135378744316)*x[1]
-        arg[1,4,2,0]=(0.986761958017)*x[0]**o+(-0.570276378038)*x[0]+(-0.515784028315)*x[1]**o+(0.487125123439)*x[1]
-        arg[1,4,2,1]=(-0.954735054702)*x[0]**o+(-0.0610323074217)*x[0]+(-0.255284859281)*x[1]**o+(0.277795725698)*x[1]
-        arg[2,0,0,0]=(-0.708301219324)*x[0]**o+(-0.970166781553)*x[0]+(-0.0836451425855)*x[1]**o+(0.525854202995)*x[1]
-        arg[2,0,0,1]=(-0.0995393865183)*x[0]**o+(-0.0156624820324)*x[0]+(0.225529316197)*x[1]**o+(0.142617834056)*x[1]
-        arg[2,0,1,0]=(-0.585329524103)*x[0]**o+(0.590285924441)*x[0]+(0.201483726322)*x[1]**o+(-0.735262197689)*x[1]
-        arg[2,0,1,1]=(-0.682877182963)*x[0]**o+(-0.162682262799)*x[0]+(-0.890051459843)*x[1]**o+(-0.0188015866765)*x[1]
-        arg[2,0,2,0]=(0.868935476294)*x[0]**o+(-0.629891068854)*x[0]+(0.335632865663)*x[1]**o+(-0.955849055716)*x[1]
-        arg[2,0,2,1]=(-0.907933228238)*x[0]**o+(-0.105861987974)*x[0]+(-0.131372383042)*x[1]**o+(-0.970114136854)*x[1]
-        arg[2,1,0,0]=(-0.275788501814)*x[0]**o+(-0.992861867033)*x[0]+(-0.80676324962)*x[1]**o+(0.269244680224)*x[1]
-        arg[2,1,0,1]=(-0.704704138774)*x[0]**o+(-0.371803193009)*x[0]+(-0.0190586405922)*x[1]**o+(-0.0828837624698)*x[1]
-        arg[2,1,1,0]=(-0.532645566013)*x[0]**o+(0.571754809868)*x[0]+(0.656737493773)*x[1]**o+(-0.548229591842)*x[1]
-        arg[2,1,1,1]=(0.23836921087)*x[0]**o+(0.707475737785)*x[0]+(-0.59660155968)*x[1]**o+(-0.450204951071)*x[1]
-        arg[2,1,2,0]=(-0.534027348014)*x[0]**o+(0.332100193727)*x[0]+(-0.864157138567)*x[1]**o+(-0.41833267066)*x[1]
-        arg[2,1,2,1]=(0.459878593269)*x[0]**o+(0.446259140228)*x[0]+(0.571242887502)*x[1]**o+(-0.0390525669486)*x[1]
-        arg[2,2,0,0]=(0.322052799527)*x[0]**o+(-0.915265209304)*x[0]+(-0.99942007618)*x[1]**o+(0.482294513743)*x[1]
-        arg[2,2,0,1]=(0.558489194456)*x[0]**o+(0.00400576554086)*x[0]+(-0.87484330165)*x[1]**o+(-0.664504218977)*x[1]
-        arg[2,2,1,0]=(0.669621607461)*x[0]**o+(-0.0450960554319)*x[0]+(-0.221151480246)*x[1]**o+(0.0123621737211)*x[1]
-        arg[2,2,1,1]=(0.476743013029)*x[0]**o+(0.11118371822)*x[0]+(-0.202074315677)*x[1]**o+(0.377649433458)*x[1]
-        arg[2,2,2,0]=(0.667910543701)*x[0]**o+(0.035703922547)*x[0]+(-0.274733967095)*x[1]**o+(-0.998934720182)*x[1]
-        arg[2,2,2,1]=(0.578909660087)*x[0]**o+(0.149900086514)*x[0]+(-0.226597651858)*x[1]**o+(0.169175812287)*x[1]
-        arg[2,3,0,0]=(0.158370246586)*x[0]**o+(0.595643112285)*x[0]+(-0.476875564052)*x[1]**o+(0.869752657517)*x[1]
-        arg[2,3,0,1]=(0.99718847714)*x[0]**o+(0.581531822297)*x[0]+(-0.607102775564)*x[1]**o+(-0.8317970284)*x[1]
-        arg[2,3,1,0]=(-0.27390195745)*x[0]**o+(0.0512853330414)*x[0]+(0.465190666302)*x[1]**o+(0.042533388788)*x[1]
-        arg[2,3,1,1]=(-0.183679504962)*x[0]**o+(-0.0522782076121)*x[0]+(0.921423118529)*x[1]**o+(-0.0315080275225)*x[1]
-        arg[2,3,2,0]=(0.0421842348778)*x[0]**o+(0.462023049702)*x[0]+(-0.888342606803)*x[1]**o+(-0.956503447884)*x[1]
-        arg[2,3,2,1]=(-0.950820288444)*x[0]**o+(0.104271990168)*x[0]+(-0.607212909582)*x[1]**o+(-0.16283931259)*x[1]
-        arg[2,4,0,0]=(0.113505933533)*x[0]**o+(0.27873514806)*x[0]+(0.736699443523)*x[1]**o+(-0.951737555693)*x[1]
-        arg[2,4,0,1]=(0.264170584849)*x[0]**o+(-0.226649236617)*x[0]+(0.489902180874)*x[1]**o+(-0.191536591762)*x[1]
-        arg[2,4,1,0]=(0.712322285985)*x[0]**o+(-0.323395455815)*x[0]+(-0.298356681586)*x[1]**o+(0.699891974541)*x[1]
-        arg[2,4,1,1]=(-0.631057763255)*x[0]**o+(-0.489374933445)*x[0]+(-0.021591806874)*x[1]**o+(-0.692800124585)*x[1]
-        arg[2,4,2,0]=(0.916068935184)*x[0]**o+(0.33779688858)*x[0]+(0.06300443559)*x[1]**o+(-0.231385203399)*x[1]
-        arg[2,4,2,1]=(-0.283485044625)*x[0]**o+(0.548366574442)*x[0]+(-0.543953132872)*x[1]**o+(-0.956662823037)*x[1]
-        arg[3,0,0,0]=(0.709349274221)*x[0]**o+(-0.342981009263)*x[0]+(-0.682331761929)*x[1]**o+(0.673169884813)*x[1]
-        arg[3,0,0,1]=(0.236249836593)*x[0]**o+(-0.682845054434)*x[0]+(-0.349169988218)*x[1]**o+(0.502684425824)*x[1]
-        arg[3,0,1,0]=(-0.561655748793)*x[0]**o+(0.120183772326)*x[0]+(-0.966535325583)*x[1]**o+(-0.0585117264949)*x[1]
-        arg[3,0,1,1]=(-0.661030287189)*x[0]**o+(-0.322924086505)*x[0]+(-0.986892059552)*x[1]**o+(-0.778969361365)*x[1]
-        arg[3,0,2,0]=(-0.166307107307)*x[0]**o+(0.612931303617)*x[0]+(-0.283925165456)*x[1]**o+(0.5998038814)*x[1]
-        arg[3,0,2,1]=(0.205099355916)*x[0]**o+(-0.520970536278)*x[0]+(0.900416833183)*x[1]**o+(0.981826306069)*x[1]
-        arg[3,1,0,0]=(-0.875306666443)*x[0]**o+(0.0189358479861)*x[0]+(0.101187857445)*x[1]**o+(-0.873584307534)*x[1]
-        arg[3,1,0,1]=(-0.0203656235757)*x[0]**o+(-0.579229777042)*x[0]+(-0.0799345631826)*x[1]**o+(0.896315444069)*x[1]
-        arg[3,1,1,0]=(0.576791459982)*x[0]**o+(-0.86541815506)*x[0]+(-0.582764176207)*x[1]**o+(-0.249437395011)*x[1]
-        arg[3,1,1,1]=(0.525953680497)*x[0]**o+(-0.222445717402)*x[0]+(-0.87710202063)*x[1]**o+(-0.762921821973)*x[1]
-        arg[3,1,2,0]=(-0.883737185908)*x[0]**o+(0.254053241277)*x[0]+(0.559803298059)*x[1]**o+(-0.577376956856)*x[1]
-        arg[3,1,2,1]=(-0.125792083387)*x[0]**o+(-0.771549307509)*x[0]+(0.142493480552)*x[1]**o+(0.459996962548)*x[1]
-        arg[3,2,0,0]=(0.0531598927049)*x[0]**o+(-0.950343229037)*x[0]+(-0.748240453154)*x[1]**o+(0.850555892342)*x[1]
-        arg[3,2,0,1]=(-0.660852152041)*x[0]**o+(-0.763119278604)*x[0]+(-0.811925409663)*x[1]**o+(-0.178765071495)*x[1]
-        arg[3,2,1,0]=(-0.189124223305)*x[0]**o+(-0.410392909042)*x[0]+(0.993247167522)*x[1]**o+(0.291451796298)*x[1]
-        arg[3,2,1,1]=(0.83496133421)*x[0]**o+(0.695147480265)*x[0]+(0.444420524946)*x[1]**o+(0.107454620114)*x[1]
-        arg[3,2,2,0]=(0.94687479313)*x[0]**o+(-0.140702324395)*x[0]+(0.149203502428)*x[1]**o+(-0.338246126345)*x[1]
-        arg[3,2,2,1]=(0.147609394709)*x[0]**o+(-0.549219765239)*x[0]+(0.397308993347)*x[1]**o+(0.0402189312685)*x[1]
-        arg[3,3,0,0]=(0.27400981409)*x[0]**o+(-0.516367266257)*x[0]+(-0.784095952814)*x[1]**o+(0.32858899009)*x[1]
-        arg[3,3,0,1]=(-0.393457382163)*x[0]**o+(0.590406794051)*x[0]+(0.328523918357)*x[1]**o+(0.899537513355)*x[1]
-        arg[3,3,1,0]=(-0.851038623366)*x[0]**o+(0.596974864726)*x[0]+(-0.338630687551)*x[1]**o+(0.634961435042)*x[1]
-        arg[3,3,1,1]=(0.569166143918)*x[0]**o+(-0.388162282491)*x[0]+(0.764830536733)*x[1]**o+(-0.426737342542)*x[1]
-        arg[3,3,2,0]=(0.502221903448)*x[0]**o+(0.940382225897)*x[0]+(0.563444730579)*x[1]**o+(0.023210869151)*x[1]
-        arg[3,3,2,1]=(0.061695403852)*x[0]**o+(0.868302188758)*x[0]+(0.0855803325758)*x[1]**o+(-0.24366173638)*x[1]
-        arg[3,4,0,0]=(-0.533038182387)*x[0]**o+(0.0222388915737)*x[0]+(0.529037752769)*x[1]**o+(-0.0665320895494)*x[1]
-        arg[3,4,0,1]=(0.714374055253)*x[0]**o+(-0.623670743333)*x[0]+(-0.866024792929)*x[1]**o+(-0.0673124896111)*x[1]
-        arg[3,4,1,0]=(-0.0523466615045)*x[0]**o+(-0.472563426622)*x[0]+(0.139892673626)*x[1]**o+(0.539655417178)*x[1]
-        arg[3,4,1,1]=(-0.473032580514)*x[0]**o+(0.692812093618)*x[0]+(0.664400517742)*x[1]**o+(0.184125423364)*x[1]
-        arg[3,4,2,0]=(-0.0340798058725)*x[0]**o+(-0.58900562863)*x[0]+(0.396856384717)*x[1]**o+(-0.559175428019)*x[1]
-        arg[3,4,2,1]=(-0.217679376634)*x[0]**o+(-0.90389036667)*x[0]+(0.967372942873)*x[1]**o+(-0.482913619277)*x[1]
-        ref[0,0,0,0]=(-0.717741572212)*x_ref[0]**o+(-0.771801794802)*x_ref[0]+(-0.782201793954)*x_ref[1]**o+(0.125253178673)*x_ref[1]
-        ref[0,0,0,1]=(-0.483339499341)*x_ref[0]**o+(0.0177945970437)*x_ref[0]+(0.233532060933)*x_ref[1]**o+(-0.465948890703)*x_ref[1]
-        ref[0,0,1,0]=(0.140544455071)*x_ref[0]**o+(-0.120145399579)*x_ref[0]+(-0.0732045826929)*x_ref[1]**o+(-0.738165902415)*x_ref[1]
-        ref[0,0,1,1]=(0.98057407477)*x_ref[0]**o+(0.346125329427)*x_ref[0]+(0.697386820108)*x_ref[1]**o+(0.402406370862)*x_ref[1]
-        ref[0,0,2,0]=(0.347641628204)*x_ref[0]**o+(-0.217938924727)*x_ref[0]+(-0.0572727430966)*x_ref[1]**o+(0.170631149745)*x_ref[1]
-        ref[0,0,2,1]=(0.621840702108)*x_ref[0]**o+(-0.109219941839)*x_ref[0]+(0.894052962811)*x_ref[1]**o+(0.423894680808)*x_ref[1]
-        ref[0,1,0,0]=(0.0339315069567)*x_ref[0]**o+(-0.655546201957)*x_ref[0]+(-0.271776247317)*x_ref[1]**o+(0.4760527815)*x_ref[1]
-        ref[0,1,0,1]=(0.904216237912)*x_ref[0]**o+(0.974869309983)*x_ref[0]+(0.678379481202)*x_ref[1]**o+(0.602534020957)*x_ref[1]
-        ref[0,1,1,0]=(-0.98805028173)*x_ref[0]**o+(0.255251214419)*x_ref[0]+(0.659010647624)*x_ref[1]**o+(-0.45360685971)*x_ref[1]
-        ref[0,1,1,1]=(0.0884339867328)*x_ref[0]**o+(-0.325188714625)*x_ref[0]+(0.158562643552)*x_ref[1]**o+(-0.788600388567)*x_ref[1]
-        ref[0,1,2,0]=(0.976404407593)*x_ref[0]**o+(0.353231650963)*x_ref[0]+(0.546951413477)*x_ref[1]**o+(0.0738098551899)*x_ref[1]
-        ref[0,1,2,1]=(-0.812156797654)*x_ref[0]**o+(-0.0180014270879)*x_ref[0]+(0.686011517957)*x_ref[1]**o+(0.148522434365)*x_ref[1]
-        ref[0,2,0,0]=(-0.40018516407)*x_ref[0]**o+(-0.0512695503575)*x_ref[0]+(-0.715512784143)*x_ref[1]**o+(0.111064716031)*x_ref[1]
-        ref[0,2,0,1]=(-0.963397739298)*x_ref[0]**o+(0.406951519848)*x_ref[0]+(-0.293539028967)*x_ref[1]**o+(-0.549328925146)*x_ref[1]
-        ref[0,2,1,0]=(-0.00827402449089)*x_ref[0]**o+(-0.657982352244)*x_ref[0]+(-0.515966831052)*x_ref[1]**o+(0.531853371259)*x_ref[1]
-        ref[0,2,1,1]=(0.0379862601491)*x_ref[0]**o+(0.988691147833)*x_ref[0]+(0.820623911484)*x_ref[1]**o+(0.689064076022)*x_ref[1]
-        ref[0,2,2,0]=(-0.857638654259)*x_ref[0]**o+(0.664968676908)*x_ref[0]+(-0.228424264597)*x_ref[1]**o+(0.740003679791)*x_ref[1]
-        ref[0,2,2,1]=(0.456486069586)*x_ref[0]**o+(-0.510130176146)*x_ref[0]+(-0.189525160745)*x_ref[1]**o+(0.497975981413)*x_ref[1]
-        ref[0,3,0,0]=(-0.981633737105)*x_ref[0]**o+(0.25636883881)*x_ref[0]+(-0.0477676975467)*x_ref[1]**o+(0.654475880014)*x_ref[1]
-        ref[0,3,0,1]=(-0.0710284929969)*x_ref[0]**o+(0.338590765191)*x_ref[0]+(0.639048913997)*x_ref[1]**o+(-0.24999606762)*x_ref[1]
-        ref[0,3,1,0]=(-0.731484482659)*x_ref[0]**o+(-0.808253846389)*x_ref[0]+(-0.911723431862)*x_ref[1]**o+(-0.266029942425)*x_ref[1]
-        ref[0,3,1,1]=(0.909037857376)*x_ref[0]**o+(-0.164525039433)*x_ref[0]+(-0.924332370345)*x_ref[1]**o+(0.476479399362)*x_ref[1]
-        ref[0,3,2,0]=(0.00534173833653)*x_ref[0]**o+(-0.435160515142)*x_ref[0]+(0.402701511687)*x_ref[1]**o+(0.161631276653)*x_ref[1]
-        ref[0,3,2,1]=(-0.595791669027)*x_ref[0]**o+(0.170580206948)*x_ref[0]+(0.468802250813)*x_ref[1]**o+(-0.881472636722)*x_ref[1]
-        ref[0,4,0,0]=(-0.0739506349513)*x_ref[0]**o+(0.513385505957)*x_ref[0]+(0.046977740371)*x_ref[1]**o+(0.95763159987)*x_ref[1]
-        ref[0,4,0,1]=(-0.286789006223)*x_ref[0]**o+(0.017476293519)*x_ref[0]+(0.637378781092)*x_ref[1]**o+(-0.670201122126)*x_ref[1]
-        ref[0,4,1,0]=(0.159607100455)*x_ref[0]**o+(0.715341910227)*x_ref[0]+(0.949546645819)*x_ref[1]**o+(0.362982182775)*x_ref[1]
-        ref[0,4,1,1]=(-0.237702024358)*x_ref[0]**o+(-0.520488841454)*x_ref[0]+(0.606333933569)*x_ref[1]**o+(-0.00662757701049)*x_ref[1]
-        ref[0,4,2,0]=(-0.415753817901)*x_ref[0]**o+(0.731285464784)*x_ref[0]+(0.15987336144)*x_ref[1]**o+(0.0697706236338)*x_ref[1]
-        ref[0,4,2,1]=(0.0467482158427)*x_ref[0]**o+(0.306004722736)*x_ref[0]+(-0.905184725692)*x_ref[1]**o+(-0.158017889366)*x_ref[1]
-        ref[1,0,0,0]=(-0.785535082426)*x_ref[0]**o+(-0.189285100452)*x_ref[0]+(-0.766349940057)*x_ref[1]**o+(0.531469308995)*x_ref[1]
-        ref[1,0,0,1]=(0.522213196477)*x_ref[0]**o+(-0.661381741437)*x_ref[0]+(0.816089886956)*x_ref[1]**o+(0.139829382305)*x_ref[1]
-        ref[1,0,1,0]=(0.0957295570417)*x_ref[0]**o+(-0.105252674536)*x_ref[0]+(-0.569429953382)*x_ref[1]**o+(-0.801934666657)*x_ref[1]
-        ref[1,0,1,1]=(-0.557307051058)*x_ref[0]**o+(0.218852576416)*x_ref[0]+(0.430167216464)*x_ref[1]**o+(-0.112285681761)*x_ref[1]
-        ref[1,0,2,0]=(0.288472422477)*x_ref[0]**o+(0.294377994763)*x_ref[0]+(-0.809503961511)*x_ref[1]**o+(0.357020226991)*x_ref[1]
-        ref[1,0,2,1]=(-0.148113477705)*x_ref[0]**o+(0.164468646294)*x_ref[0]+(0.7977142476)*x_ref[1]**o+(-0.407274933384)*x_ref[1]
-        ref[1,1,0,0]=(-0.926374434822)*x_ref[0]**o+(-0.107713463193)*x_ref[0]+(-0.511635723869)*x_ref[1]**o+(0.259319717689)*x_ref[1]
-        ref[1,1,0,1]=(-0.18636582243)*x_ref[0]**o+(0.698258973628)*x_ref[0]+(0.234379281397)*x_ref[1]**o+(0.596195875495)*x_ref[1]
-        ref[1,1,1,0]=(-0.180395892006)*x_ref[0]**o+(0.631248500084)*x_ref[0]+(0.104751616377)*x_ref[1]**o+(0.204500206653)*x_ref[1]
-        ref[1,1,1,1]=(-0.517119564238)*x_ref[0]**o+(-0.16634015634)*x_ref[0]+(0.556785586675)*x_ref[1]**o+(0.42659306392)*x_ref[1]
-        ref[1,1,2,0]=(0.163807238958)*x_ref[0]**o+(-0.534619478446)*x_ref[0]+(-0.700353460753)*x_ref[1]**o+(0.121393131648)*x_ref[1]
-        ref[1,1,2,1]=(0.964276278961)*x_ref[0]**o+(0.846030751304)*x_ref[0]+(-0.745301894392)*x_ref[1]**o+(0.33821485558)*x_ref[1]
-        ref[1,2,0,0]=(0.333173101086)*x_ref[0]**o+(0.774848048743)*x_ref[0]+(-0.659091916357)*x_ref[1]**o+(-0.797247144497)*x_ref[1]
-        ref[1,2,0,1]=(0.0581394534285)*x_ref[0]**o+(-0.524771663031)*x_ref[0]+(-0.519465753317)*x_ref[1]**o+(0.71748795226)*x_ref[1]
-        ref[1,2,1,0]=(0.224935262833)*x_ref[0]**o+(-0.393399819306)*x_ref[0]+(0.199349075224)*x_ref[1]**o+(-0.808847009412)*x_ref[1]
-        ref[1,2,1,1]=(0.0385750795521)*x_ref[0]**o+(-8.09949553151e-05)*x_ref[0]+(0.496860964506)*x_ref[1]**o+(0.0119507407829)*x_ref[1]
-        ref[1,2,2,0]=(0.876341556167)*x_ref[0]**o+(0.18082766372)*x_ref[0]+(0.401349871827)*x_ref[1]**o+(-0.543439037303)*x_ref[1]
-        ref[1,2,2,1]=(-0.894525004507)*x_ref[0]**o+(-0.516771143695)*x_ref[0]+(0.0410916490263)*x_ref[1]**o+(0.753841618439)*x_ref[1]
-        ref[1,3,0,0]=(0.251979970924)*x_ref[0]**o+(0.790276550438)*x_ref[0]+(-0.155708793888)*x_ref[1]**o+(0.28971278336)*x_ref[1]
-        ref[1,3,0,1]=(0.258336265436)*x_ref[0]**o+(0.696642875149)*x_ref[0]+(0.0561355915649)*x_ref[1]**o+(0.601839744417)*x_ref[1]
-        ref[1,3,1,0]=(-0.978729102785)*x_ref[0]**o+(0.335280613262)*x_ref[0]+(0.89228798232)*x_ref[1]**o+(-0.693050679348)*x_ref[1]
-        ref[1,3,1,1]=(-0.885817753431)*x_ref[0]**o+(-0.0641571535708)*x_ref[0]+(-0.649578576181)*x_ref[1]**o+(-0.95773137602)*x_ref[1]
-        ref[1,3,2,0]=(-0.333891001461)*x_ref[0]**o+(-0.496064308564)*x_ref[0]+(0.438549603377)*x_ref[1]**o+(0.0772468142672)*x_ref[1]
-        ref[1,3,2,1]=(-0.16171788255)*x_ref[0]**o+(-0.939293453222)*x_ref[0]+(-0.284522648546)*x_ref[1]**o+(0.744642328375)*x_ref[1]
-        ref[1,4,0,0]=(0.806133262332)*x_ref[0]**o+(-0.0225320206432)*x_ref[0]+(0.125958642606)*x_ref[1]**o+(0.610630249467)*x_ref[1]
-        ref[1,4,0,1]=(0.657971870946)*x_ref[0]**o+(0.698894701525)*x_ref[0]+(-0.595952612496)*x_ref[1]**o+(-0.38268841292)*x_ref[1]
-        ref[1,4,1,0]=(-0.277274411331)*x_ref[0]**o+(-0.483183004514)*x_ref[0]+(0.77656657009)*x_ref[1]**o+(-0.959290466645)*x_ref[1]
-        ref[1,4,1,1]=(-0.96384356305)*x_ref[0]**o+(-0.00383301781476)*x_ref[0]+(0.788010409608)*x_ref[1]**o+(0.135378744316)*x_ref[1]
-        ref[1,4,2,0]=(0.986761958017)*x_ref[0]**o+(-0.570276378038)*x_ref[0]+(-0.515784028315)*x_ref[1]**o+(0.487125123439)*x_ref[1]
-        ref[1,4,2,1]=(-0.954735054702)*x_ref[0]**o+(-0.0610323074217)*x_ref[0]+(-0.255284859281)*x_ref[1]**o+(0.277795725698)*x_ref[1]
-        ref[2,0,0,0]=(-0.708301219324)*x_ref[0]**o+(-0.970166781553)*x_ref[0]+(-0.0836451425855)*x_ref[1]**o+(0.525854202995)*x_ref[1]
-        ref[2,0,0,1]=(-0.0995393865183)*x_ref[0]**o+(-0.0156624820324)*x_ref[0]+(0.225529316197)*x_ref[1]**o+(0.142617834056)*x_ref[1]
-        ref[2,0,1,0]=(-0.585329524103)*x_ref[0]**o+(0.590285924441)*x_ref[0]+(0.201483726322)*x_ref[1]**o+(-0.735262197689)*x_ref[1]
-        ref[2,0,1,1]=(-0.682877182963)*x_ref[0]**o+(-0.162682262799)*x_ref[0]+(-0.890051459843)*x_ref[1]**o+(-0.0188015866765)*x_ref[1]
-        ref[2,0,2,0]=(0.868935476294)*x_ref[0]**o+(-0.629891068854)*x_ref[0]+(0.335632865663)*x_ref[1]**o+(-0.955849055716)*x_ref[1]
-        ref[2,0,2,1]=(-0.907933228238)*x_ref[0]**o+(-0.105861987974)*x_ref[0]+(-0.131372383042)*x_ref[1]**o+(-0.970114136854)*x_ref[1]
-        ref[2,1,0,0]=(-0.275788501814)*x_ref[0]**o+(-0.992861867033)*x_ref[0]+(-0.80676324962)*x_ref[1]**o+(0.269244680224)*x_ref[1]
-        ref[2,1,0,1]=(-0.704704138774)*x_ref[0]**o+(-0.371803193009)*x_ref[0]+(-0.0190586405922)*x_ref[1]**o+(-0.0828837624698)*x_ref[1]
-        ref[2,1,1,0]=(-0.532645566013)*x_ref[0]**o+(0.571754809868)*x_ref[0]+(0.656737493773)*x_ref[1]**o+(-0.548229591842)*x_ref[1]
-        ref[2,1,1,1]=(0.23836921087)*x_ref[0]**o+(0.707475737785)*x_ref[0]+(-0.59660155968)*x_ref[1]**o+(-0.450204951071)*x_ref[1]
-        ref[2,1,2,0]=(-0.534027348014)*x_ref[0]**o+(0.332100193727)*x_ref[0]+(-0.864157138567)*x_ref[1]**o+(-0.41833267066)*x_ref[1]
-        ref[2,1,2,1]=(0.459878593269)*x_ref[0]**o+(0.446259140228)*x_ref[0]+(0.571242887502)*x_ref[1]**o+(-0.0390525669486)*x_ref[1]
-        ref[2,2,0,0]=(0.322052799527)*x_ref[0]**o+(-0.915265209304)*x_ref[0]+(-0.99942007618)*x_ref[1]**o+(0.482294513743)*x_ref[1]
-        ref[2,2,0,1]=(0.558489194456)*x_ref[0]**o+(0.00400576554086)*x_ref[0]+(-0.87484330165)*x_ref[1]**o+(-0.664504218977)*x_ref[1]
-        ref[2,2,1,0]=(0.669621607461)*x_ref[0]**o+(-0.0450960554319)*x_ref[0]+(-0.221151480246)*x_ref[1]**o+(0.0123621737211)*x_ref[1]
-        ref[2,2,1,1]=(0.476743013029)*x_ref[0]**o+(0.11118371822)*x_ref[0]+(-0.202074315677)*x_ref[1]**o+(0.377649433458)*x_ref[1]
-        ref[2,2,2,0]=(0.667910543701)*x_ref[0]**o+(0.035703922547)*x_ref[0]+(-0.274733967095)*x_ref[1]**o+(-0.998934720182)*x_ref[1]
-        ref[2,2,2,1]=(0.578909660087)*x_ref[0]**o+(0.149900086514)*x_ref[0]+(-0.226597651858)*x_ref[1]**o+(0.169175812287)*x_ref[1]
-        ref[2,3,0,0]=(0.158370246586)*x_ref[0]**o+(0.595643112285)*x_ref[0]+(-0.476875564052)*x_ref[1]**o+(0.869752657517)*x_ref[1]
-        ref[2,3,0,1]=(0.99718847714)*x_ref[0]**o+(0.581531822297)*x_ref[0]+(-0.607102775564)*x_ref[1]**o+(-0.8317970284)*x_ref[1]
-        ref[2,3,1,0]=(-0.27390195745)*x_ref[0]**o+(0.0512853330414)*x_ref[0]+(0.465190666302)*x_ref[1]**o+(0.042533388788)*x_ref[1]
-        ref[2,3,1,1]=(-0.183679504962)*x_ref[0]**o+(-0.0522782076121)*x_ref[0]+(0.921423118529)*x_ref[1]**o+(-0.0315080275225)*x_ref[1]
-        ref[2,3,2,0]=(0.0421842348778)*x_ref[0]**o+(0.462023049702)*x_ref[0]+(-0.888342606803)*x_ref[1]**o+(-0.956503447884)*x_ref[1]
-        ref[2,3,2,1]=(-0.950820288444)*x_ref[0]**o+(0.104271990168)*x_ref[0]+(-0.607212909582)*x_ref[1]**o+(-0.16283931259)*x_ref[1]
-        ref[2,4,0,0]=(0.113505933533)*x_ref[0]**o+(0.27873514806)*x_ref[0]+(0.736699443523)*x_ref[1]**o+(-0.951737555693)*x_ref[1]
-        ref[2,4,0,1]=(0.264170584849)*x_ref[0]**o+(-0.226649236617)*x_ref[0]+(0.489902180874)*x_ref[1]**o+(-0.191536591762)*x_ref[1]
-        ref[2,4,1,0]=(0.712322285985)*x_ref[0]**o+(-0.323395455815)*x_ref[0]+(-0.298356681586)*x_ref[1]**o+(0.699891974541)*x_ref[1]
-        ref[2,4,1,1]=(-0.631057763255)*x_ref[0]**o+(-0.489374933445)*x_ref[0]+(-0.021591806874)*x_ref[1]**o+(-0.692800124585)*x_ref[1]
-        ref[2,4,2,0]=(0.916068935184)*x_ref[0]**o+(0.33779688858)*x_ref[0]+(0.06300443559)*x_ref[1]**o+(-0.231385203399)*x_ref[1]
-        ref[2,4,2,1]=(-0.283485044625)*x_ref[0]**o+(0.548366574442)*x_ref[0]+(-0.543953132872)*x_ref[1]**o+(-0.956662823037)*x_ref[1]
-        ref[3,0,0,0]=(0.709349274221)*x_ref[0]**o+(-0.342981009263)*x_ref[0]+(-0.682331761929)*x_ref[1]**o+(0.673169884813)*x_ref[1]
-        ref[3,0,0,1]=(0.236249836593)*x_ref[0]**o+(-0.682845054434)*x_ref[0]+(-0.349169988218)*x_ref[1]**o+(0.502684425824)*x_ref[1]
-        ref[3,0,1,0]=(-0.561655748793)*x_ref[0]**o+(0.120183772326)*x_ref[0]+(-0.966535325583)*x_ref[1]**o+(-0.0585117264949)*x_ref[1]
-        ref[3,0,1,1]=(-0.661030287189)*x_ref[0]**o+(-0.322924086505)*x_ref[0]+(-0.986892059552)*x_ref[1]**o+(-0.778969361365)*x_ref[1]
-        ref[3,0,2,0]=(-0.166307107307)*x_ref[0]**o+(0.612931303617)*x_ref[0]+(-0.283925165456)*x_ref[1]**o+(0.5998038814)*x_ref[1]
-        ref[3,0,2,1]=(0.205099355916)*x_ref[0]**o+(-0.520970536278)*x_ref[0]+(0.900416833183)*x_ref[1]**o+(0.981826306069)*x_ref[1]
-        ref[3,1,0,0]=(-0.875306666443)*x_ref[0]**o+(0.0189358479861)*x_ref[0]+(0.101187857445)*x_ref[1]**o+(-0.873584307534)*x_ref[1]
-        ref[3,1,0,1]=(-0.0203656235757)*x_ref[0]**o+(-0.579229777042)*x_ref[0]+(-0.0799345631826)*x_ref[1]**o+(0.896315444069)*x_ref[1]
-        ref[3,1,1,0]=(0.576791459982)*x_ref[0]**o+(-0.86541815506)*x_ref[0]+(-0.582764176207)*x_ref[1]**o+(-0.249437395011)*x_ref[1]
-        ref[3,1,1,1]=(0.525953680497)*x_ref[0]**o+(-0.222445717402)*x_ref[0]+(-0.87710202063)*x_ref[1]**o+(-0.762921821973)*x_ref[1]
-        ref[3,1,2,0]=(-0.883737185908)*x_ref[0]**o+(0.254053241277)*x_ref[0]+(0.559803298059)*x_ref[1]**o+(-0.577376956856)*x_ref[1]
-        ref[3,1,2,1]=(-0.125792083387)*x_ref[0]**o+(-0.771549307509)*x_ref[0]+(0.142493480552)*x_ref[1]**o+(0.459996962548)*x_ref[1]
-        ref[3,2,0,0]=(0.0531598927049)*x_ref[0]**o+(-0.950343229037)*x_ref[0]+(-0.748240453154)*x_ref[1]**o+(0.850555892342)*x_ref[1]
-        ref[3,2,0,1]=(-0.660852152041)*x_ref[0]**o+(-0.763119278604)*x_ref[0]+(-0.811925409663)*x_ref[1]**o+(-0.178765071495)*x_ref[1]
-        ref[3,2,1,0]=(-0.189124223305)*x_ref[0]**o+(-0.410392909042)*x_ref[0]+(0.993247167522)*x_ref[1]**o+(0.291451796298)*x_ref[1]
-        ref[3,2,1,1]=(0.83496133421)*x_ref[0]**o+(0.695147480265)*x_ref[0]+(0.444420524946)*x_ref[1]**o+(0.107454620114)*x_ref[1]
-        ref[3,2,2,0]=(0.94687479313)*x_ref[0]**o+(-0.140702324395)*x_ref[0]+(0.149203502428)*x_ref[1]**o+(-0.338246126345)*x_ref[1]
-        ref[3,2,2,1]=(0.147609394709)*x_ref[0]**o+(-0.549219765239)*x_ref[0]+(0.397308993347)*x_ref[1]**o+(0.0402189312685)*x_ref[1]
-        ref[3,3,0,0]=(0.27400981409)*x_ref[0]**o+(-0.516367266257)*x_ref[0]+(-0.784095952814)*x_ref[1]**o+(0.32858899009)*x_ref[1]
-        ref[3,3,0,1]=(-0.393457382163)*x_ref[0]**o+(0.590406794051)*x_ref[0]+(0.328523918357)*x_ref[1]**o+(0.899537513355)*x_ref[1]
-        ref[3,3,1,0]=(-0.851038623366)*x_ref[0]**o+(0.596974864726)*x_ref[0]+(-0.338630687551)*x_ref[1]**o+(0.634961435042)*x_ref[1]
-        ref[3,3,1,1]=(0.569166143918)*x_ref[0]**o+(-0.388162282491)*x_ref[0]+(0.764830536733)*x_ref[1]**o+(-0.426737342542)*x_ref[1]
-        ref[3,3,2,0]=(0.502221903448)*x_ref[0]**o+(0.940382225897)*x_ref[0]+(0.563444730579)*x_ref[1]**o+(0.023210869151)*x_ref[1]
-        ref[3,3,2,1]=(0.061695403852)*x_ref[0]**o+(0.868302188758)*x_ref[0]+(0.0855803325758)*x_ref[1]**o+(-0.24366173638)*x_ref[1]
-        ref[3,4,0,0]=(-0.533038182387)*x_ref[0]**o+(0.0222388915737)*x_ref[0]+(0.529037752769)*x_ref[1]**o+(-0.0665320895494)*x_ref[1]
-        ref[3,4,0,1]=(0.714374055253)*x_ref[0]**o+(-0.623670743333)*x_ref[0]+(-0.866024792929)*x_ref[1]**o+(-0.0673124896111)*x_ref[1]
-        ref[3,4,1,0]=(-0.0523466615045)*x_ref[0]**o+(-0.472563426622)*x_ref[0]+(0.139892673626)*x_ref[1]**o+(0.539655417178)*x_ref[1]
-        ref[3,4,1,1]=(-0.473032580514)*x_ref[0]**o+(0.692812093618)*x_ref[0]+(0.664400517742)*x_ref[1]**o+(0.184125423364)*x_ref[1]
-        ref[3,4,2,0]=(-0.0340798058725)*x_ref[0]**o+(-0.58900562863)*x_ref[0]+(0.396856384717)*x_ref[1]**o+(-0.559175428019)*x_ref[1]
-        ref[3,4,2,1]=(-0.217679376634)*x_ref[0]**o+(-0.90389036667)*x_ref[0]+(0.967372942873)*x_ref[1]**o+(-0.482913619277)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.93229223906)*x[0]**o+(0.176839936782)*x[0]+(0.986271000359)*x[1]**o+(-0.449322385723)*x[1]+(-0.856450437823)*x[2]**o+(0.31473579221)*x[2]
-        arg[0,0,0,1]=(0.714047232765)*x[0]**o+(-0.323471323003)*x[0]+(0.628080480343)*x[1]**o+(-0.992007912045)*x[1]+(-0.11019723051)*x[2]**o+(-0.104735408233)*x[2]
-        arg[0,0,1,0]=(-0.437250443294)*x[0]**o+(-0.741469652781)*x[0]+(0.650921038465)*x[1]**o+(0.679622741243)*x[1]+(0.604005894895)*x[2]**o+(0.598155624876)*x[2]
-        arg[0,0,1,1]=(-0.574872168761)*x[0]**o+(0.796207672391)*x[0]+(-0.478046646159)*x[1]**o+(0.604661326741)*x[1]+(-0.898457020186)*x[2]**o+(0.43234750827)*x[2]
-        arg[0,0,2,0]=(-0.674008357742)*x[0]**o+(0.699614371016)*x[0]+(0.441321981559)*x[1]**o+(-0.619688689942)*x[1]+(-0.0874579208832)*x[2]**o+(-0.925753840555)*x[2]
-        arg[0,0,2,1]=(-0.114329474892)*x[0]**o+(0.699501071503)*x[0]+(-0.618807420683)*x[1]**o+(0.411584695002)*x[1]+(-0.234620261556)*x[2]**o+(0.585720100967)*x[2]
-        arg[0,1,0,0]=(0.617432097253)*x[0]**o+(-0.00304868863676)*x[0]+(0.571021785645)*x[1]**o+(0.457197205728)*x[1]+(0.462895867813)*x[2]**o+(0.278022956316)*x[2]
-        arg[0,1,0,1]=(-0.659136231188)*x[0]**o+(-0.388212920906)*x[0]+(-0.982152608232)*x[1]**o+(-0.665797156013)*x[1]+(-0.76141890649)*x[2]**o+(-0.591458323836)*x[2]
-        arg[0,1,1,0]=(-0.488016386893)*x[0]**o+(0.965660401944)*x[0]+(0.178400189819)*x[1]**o+(0.578417314499)*x[1]+(-0.398083955217)*x[2]**o+(0.460338187535)*x[2]
-        arg[0,1,1,1]=(-0.182086458235)*x[0]**o+(0.0842368498629)*x[0]+(-0.642008026184)*x[1]**o+(-0.0449408131957)*x[1]+(-0.927397573018)*x[2]**o+(0.854313729816)*x[2]
-        arg[0,1,2,0]=(-0.201475872769)*x[0]**o+(0.098190765292)*x[0]+(0.808624244922)*x[1]**o+(0.0726268899898)*x[1]+(-0.605334327027)*x[2]**o+(-0.999151255934)*x[2]
-        arg[0,1,2,1]=(0.672344024218)*x[0]**o+(-0.638554833481)*x[0]+(-0.212231801634)*x[1]**o+(-0.492765366968)*x[1]+(0.311273771921)*x[2]**o+(-0.504370655006)*x[2]
-        arg[0,2,0,0]=(0.9944935907)*x[0]**o+(-0.365261996611)*x[0]+(-0.105667939789)*x[1]**o+(0.886935751977)*x[1]+(0.263336157757)*x[2]**o+(-0.880316523113)*x[2]
-        arg[0,2,0,1]=(-0.659779300787)*x[0]**o+(-0.728590180152)*x[0]+(0.732078508037)*x[1]**o+(0.684963412098)*x[1]+(0.822970700012)*x[2]**o+(-0.680001879674)*x[2]
-        arg[0,2,1,0]=(-0.207855412893)*x[0]**o+(0.438275426529)*x[0]+(0.87046682066)*x[1]**o+(-0.960322013848)*x[1]+(-0.273728198625)*x[2]**o+(-0.960137228004)*x[2]
-        arg[0,2,1,1]=(-0.189232680002)*x[0]**o+(0.866417302002)*x[0]+(-0.93403311248)*x[1]**o+(-0.55773104878)*x[1]+(0.94062895773)*x[2]**o+(-0.758052194805)*x[2]
-        arg[0,2,2,0]=(0.100859944394)*x[0]**o+(-0.20292135909)*x[0]+(-0.713339941261)*x[1]**o+(-0.615106454411)*x[1]+(0.791245995152)*x[2]**o+(-0.81051791594)*x[2]
-        arg[0,2,2,1]=(0.595743424517)*x[0]**o+(-0.179075876404)*x[0]+(-0.799005601715)*x[1]**o+(-0.0554635073569)*x[1]+(-0.850510701985)*x[2]**o+(0.234516538169)*x[2]
-        arg[0,3,0,0]=(-0.361667738861)*x[0]**o+(-0.551837498696)*x[0]+(-0.834377202094)*x[1]**o+(0.814168224265)*x[1]+(-0.00479533268377)*x[2]**o+(0.843007652951)*x[2]
-        arg[0,3,0,1]=(-0.448417439465)*x[0]**o+(0.431496158388)*x[0]+(-0.547416443433)*x[1]**o+(-0.0746785704695)*x[1]+(-0.646238182944)*x[2]**o+(-0.318608714595)*x[2]
-        arg[0,3,1,0]=(-0.275647366007)*x[0]**o+(-0.410594785047)*x[0]+(-0.858282378196)*x[1]**o+(-0.755586690837)*x[1]+(-0.420481091654)*x[2]**o+(-0.0996487371831)*x[2]
-        arg[0,3,1,1]=(-0.395961249009)*x[0]**o+(0.0860896467863)*x[0]+(0.482719525748)*x[1]**o+(0.319368178133)*x[1]+(0.516449153414)*x[2]**o+(-0.246749862576)*x[2]
-        arg[0,3,2,0]=(-0.367322027122)*x[0]**o+(0.687206412524)*x[0]+(0.616265233972)*x[1]**o+(-0.32660589112)*x[1]+(-0.944607343096)*x[2]**o+(0.123982537951)*x[2]
-        arg[0,3,2,1]=(0.700497166804)*x[0]**o+(0.553961329865)*x[0]+(-0.34020003754)*x[1]**o+(0.295870992783)*x[1]+(-0.220275880046)*x[2]**o+(0.766121035825)*x[2]
-        arg[0,4,0,0]=(0.405469789242)*x[0]**o+(-0.338347662873)*x[0]+(0.0761796434233)*x[1]**o+(-0.120599175033)*x[1]+(0.107865585379)*x[2]**o+(0.0711941007838)*x[2]
-        arg[0,4,0,1]=(0.614166154899)*x[0]**o+(0.195780702963)*x[0]+(0.718935985215)*x[1]**o+(0.214577296792)*x[1]+(-0.366985242107)*x[2]**o+(-0.509584787633)*x[2]
-        arg[0,4,1,0]=(-0.638646370981)*x[0]**o+(-0.769955899284)*x[0]+(-0.887407540503)*x[1]**o+(0.0901245429998)*x[1]+(0.786085641321)*x[2]**o+(0.6248068552)*x[2]
-        arg[0,4,1,1]=(-0.145426222043)*x[0]**o+(-0.494114545016)*x[0]+(0.422153721335)*x[1]**o+(0.617022143901)*x[1]+(-0.665972324723)*x[2]**o+(-0.476724432799)*x[2]
-        arg[0,4,2,0]=(0.556105252092)*x[0]**o+(-0.893268696809)*x[0]+(0.146441889489)*x[1]**o+(-0.170512113283)*x[1]+(-0.869313262875)*x[2]**o+(-0.976874109392)*x[2]
-        arg[0,4,2,1]=(0.858927206499)*x[0]**o+(0.198998355146)*x[0]+(0.278125296049)*x[1]**o+(-0.0442518828093)*x[1]+(0.274852724203)*x[2]**o+(-0.167649193314)*x[2]
-        arg[1,0,0,0]=(-0.0429420289353)*x[0]**o+(-0.15764693929)*x[0]+(-0.859599917512)*x[1]**o+(-0.904178643575)*x[1]+(0.519560711493)*x[2]**o+(0.258644717907)*x[2]
-        arg[1,0,0,1]=(-0.185321114264)*x[0]**o+(-0.794493830004)*x[0]+(0.136084421162)*x[1]**o+(0.926912021419)*x[1]+(0.346392120388)*x[2]**o+(-0.183908371454)*x[2]
-        arg[1,0,1,0]=(-0.730675509877)*x[0]**o+(0.865034802778)*x[0]+(-0.506315431878)*x[1]**o+(-0.94607761051)*x[1]+(0.195194792801)*x[2]**o+(-0.865129258879)*x[2]
-        arg[1,0,1,1]=(-0.0597026648107)*x[0]**o+(-0.884790497)*x[0]+(-0.0631278742098)*x[1]**o+(-0.808364940737)*x[1]+(-0.968952604837)*x[2]**o+(0.142246702632)*x[2]
-        arg[1,0,2,0]=(0.648472894563)*x[0]**o+(0.145861644073)*x[0]+(0.501227520574)*x[1]**o+(0.265886482306)*x[1]+(-0.0472772173573)*x[2]**o+(-0.364169655969)*x[2]
-        arg[1,0,2,1]=(0.847863600695)*x[0]**o+(-0.288841685199)*x[0]+(-0.500273502795)*x[1]**o+(0.627379277592)*x[1]+(0.326814024625)*x[2]**o+(-0.514712825895)*x[2]
-        arg[1,1,0,0]=(-0.947845713712)*x[0]**o+(-0.372115616305)*x[0]+(-0.572858279998)*x[1]**o+(0.226237627692)*x[1]+(0.210201947182)*x[2]**o+(0.0147616538594)*x[2]
-        arg[1,1,0,1]=(-0.39813630466)*x[0]**o+(-0.658496395731)*x[0]+(-0.363906465005)*x[1]**o+(-0.816719661238)*x[1]+(-0.478106835032)*x[2]**o+(0.0819042309589)*x[2]
-        arg[1,1,1,0]=(-0.287160278593)*x[0]**o+(-0.0281402640978)*x[0]+(0.41559795378)*x[1]**o+(0.158274458097)*x[1]+(-0.798429481502)*x[2]**o+(-0.278585334624)*x[2]
-        arg[1,1,1,1]=(0.809550480973)*x[0]**o+(0.192026915854)*x[0]+(-0.891168838599)*x[1]**o+(0.0482621192882)*x[1]+(-0.35339708159)*x[2]**o+(-0.133161551553)*x[2]
-        arg[1,1,2,0]=(0.939582328872)*x[0]**o+(0.561963790516)*x[0]+(0.885264722949)*x[1]**o+(-0.468042305266)*x[1]+(0.232880002429)*x[2]**o+(-0.772896005701)*x[2]
-        arg[1,1,2,1]=(-0.297333303209)*x[0]**o+(-0.414050924207)*x[0]+(-0.278903698873)*x[1]**o+(0.345370620869)*x[1]+(-0.0570151259027)*x[2]**o+(0.786449641378)*x[2]
-        arg[1,2,0,0]=(0.644047138589)*x[0]**o+(-0.480660438838)*x[0]+(0.32526499462)*x[1]**o+(-0.775988282127)*x[1]+(0.108374143932)*x[2]**o+(0.955463667181)*x[2]
-        arg[1,2,0,1]=(-0.468236790339)*x[0]**o+(0.844197711724)*x[0]+(0.808973429831)*x[1]**o+(-0.647699550005)*x[1]+(0.552555959813)*x[2]**o+(-0.3403079515)*x[2]
-        arg[1,2,1,0]=(0.864686362308)*x[0]**o+(0.248923646116)*x[0]+(0.0287042863842)*x[1]**o+(0.404974282153)*x[1]+(0.113501438234)*x[2]**o+(-0.619364894397)*x[2]
-        arg[1,2,1,1]=(-0.625146992499)*x[0]**o+(-0.0480602452983)*x[0]+(0.168910550914)*x[1]**o+(-0.891584218123)*x[1]+(0.0609357618263)*x[2]**o+(0.0451921002161)*x[2]
-        arg[1,2,2,0]=(-0.478728628752)*x[0]**o+(0.428376547798)*x[0]+(0.817203376818)*x[1]**o+(-0.856056266953)*x[1]+(0.354960313382)*x[2]**o+(-0.611468960461)*x[2]
-        arg[1,2,2,1]=(0.49500742113)*x[0]**o+(0.902948130263)*x[0]+(-0.810748543744)*x[1]**o+(-0.696150924858)*x[1]+(-0.748278516161)*x[2]**o+(0.694815527058)*x[2]
-        arg[1,3,0,0]=(-0.361960150296)*x[0]**o+(-0.845139780461)*x[0]+(-0.0624499309665)*x[1]**o+(-0.0515558058489)*x[1]+(0.400690983017)*x[2]**o+(-0.744608407974)*x[2]
-        arg[1,3,0,1]=(-0.452453617467)*x[0]**o+(0.845396139593)*x[0]+(0.292319469936)*x[1]**o+(-0.833547518634)*x[1]+(-0.511797700353)*x[2]**o+(0.857891454773)*x[2]
-        arg[1,3,1,0]=(0.779504092912)*x[0]**o+(0.500524773615)*x[0]+(0.590542659382)*x[1]**o+(0.479310630519)*x[1]+(0.509960641956)*x[2]**o+(-0.564980432959)*x[2]
-        arg[1,3,1,1]=(-0.145745189298)*x[0]**o+(-0.256064576359)*x[0]+(0.640890837126)*x[1]**o+(-0.718802035152)*x[1]+(-0.322216873583)*x[2]**o+(-0.0246526526334)*x[2]
-        arg[1,3,2,0]=(-0.463434285098)*x[0]**o+(0.116722448643)*x[0]+(-0.690378381342)*x[1]**o+(0.429197465885)*x[1]+(-0.353019731384)*x[2]**o+(0.57397712918)*x[2]
-        arg[1,3,2,1]=(0.169676853383)*x[0]**o+(0.815225472623)*x[0]+(-0.11125527552)*x[1]**o+(0.391513831525)*x[1]+(-0.587041361585)*x[2]**o+(0.255194151616)*x[2]
-        arg[1,4,0,0]=(0.325351608628)*x[0]**o+(-0.57751715453)*x[0]+(0.145167511303)*x[1]**o+(-0.969286030742)*x[1]+(0.917370398478)*x[2]**o+(0.691483691598)*x[2]
-        arg[1,4,0,1]=(0.0997998298271)*x[0]**o+(-0.101248202247)*x[0]+(-0.650649653848)*x[1]**o+(-0.157887947288)*x[1]+(0.517501747765)*x[2]**o+(-0.0852921926298)*x[2]
-        arg[1,4,1,0]=(0.984595420407)*x[0]**o+(0.499293499076)*x[0]+(0.352193115874)*x[1]**o+(-0.684522909647)*x[1]+(-0.391538373605)*x[2]**o+(0.404635595162)*x[2]
-        arg[1,4,1,1]=(-0.231310482173)*x[0]**o+(-0.0385089836559)*x[0]+(0.247671691888)*x[1]**o+(0.883971955027)*x[1]+(-0.0856624709734)*x[2]**o+(0.942940875904)*x[2]
-        arg[1,4,2,0]=(-0.471467257434)*x[0]**o+(0.835634240897)*x[0]+(-0.594421294562)*x[1]**o+(-0.187584387111)*x[1]+(0.859867472765)*x[2]**o+(0.930951154576)*x[2]
-        arg[1,4,2,1]=(0.504416975601)*x[0]**o+(0.435692923635)*x[0]+(-0.296945944313)*x[1]**o+(0.815156218765)*x[1]+(0.464464247442)*x[2]**o+(-0.378809453041)*x[2]
-        arg[2,0,0,0]=(0.213087423107)*x[0]**o+(-0.504681665801)*x[0]+(0.796352190405)*x[1]**o+(0.546752751136)*x[1]+(0.57347644664)*x[2]**o+(0.715856963195)*x[2]
-        arg[2,0,0,1]=(-0.28455266769)*x[0]**o+(0.853162220766)*x[0]+(0.164930982863)*x[1]**o+(-0.0136996498765)*x[1]+(0.293717915079)*x[2]**o+(-0.216124158473)*x[2]
-        arg[2,0,1,0]=(-0.328115989441)*x[0]**o+(-0.529441496488)*x[0]+(-0.43579479677)*x[1]**o+(-0.851333801194)*x[1]+(-0.278406102972)*x[2]**o+(0.947777471824)*x[2]
-        arg[2,0,1,1]=(-0.756438938789)*x[0]**o+(-0.624332272735)*x[0]+(-0.591638429565)*x[1]**o+(-0.0608281771566)*x[1]+(-0.852078784085)*x[2]**o+(-0.526558964866)*x[2]
-        arg[2,0,2,0]=(-0.923892426969)*x[0]**o+(0.788121899878)*x[0]+(-0.446006331202)*x[1]**o+(0.997210871574)*x[1]+(0.356998606103)*x[2]**o+(0.972643822823)*x[2]
-        arg[2,0,2,1]=(0.225183308571)*x[0]**o+(-0.757505414777)*x[0]+(-0.59573192074)*x[1]**o+(0.57166154987)*x[1]+(0.622343198809)*x[2]**o+(0.60343970503)*x[2]
-        arg[2,1,0,0]=(0.51027702934)*x[0]**o+(-0.711737679522)*x[0]+(-0.211712579627)*x[1]**o+(-0.495817605314)*x[1]+(0.924425804272)*x[2]**o+(0.753424835275)*x[2]
-        arg[2,1,0,1]=(0.476218252577)*x[0]**o+(0.187579891557)*x[0]+(0.727359583623)*x[1]**o+(-0.389875559955)*x[1]+(-0.352889326477)*x[2]**o+(0.365143943637)*x[2]
-        arg[2,1,1,0]=(-0.815704312943)*x[0]**o+(0.315217470245)*x[0]+(-0.535234555065)*x[1]**o+(-0.433408988501)*x[1]+(-0.676694087389)*x[2]**o+(0.384097177718)*x[2]
-        arg[2,1,1,1]=(-0.0368452411345)*x[0]**o+(0.514540686444)*x[0]+(-0.527100066965)*x[1]**o+(0.0291015562912)*x[1]+(-0.605646905004)*x[2]**o+(0.931528599981)*x[2]
-        arg[2,1,2,0]=(-0.0994015945266)*x[0]**o+(-0.762310347434)*x[0]+(-0.845934950466)*x[1]**o+(-0.235758967923)*x[1]+(0.755531422698)*x[2]**o+(0.108353867777)*x[2]
-        arg[2,1,2,1]=(-0.868779052889)*x[0]**o+(0.783878941075)*x[0]+(0.900089560473)*x[1]**o+(-0.836779405877)*x[1]+(-0.799571882449)*x[2]**o+(0.999710029157)*x[2]
-        arg[2,2,0,0]=(0.541465277143)*x[0]**o+(-0.840477797945)*x[0]+(-0.362577721098)*x[1]**o+(0.00680131806718)*x[1]+(-0.338485239867)*x[2]**o+(0.828213756751)*x[2]
-        arg[2,2,0,1]=(-0.927347423175)*x[0]**o+(-0.936191125785)*x[0]+(-0.411819804833)*x[1]**o+(-0.0222067637269)*x[1]+(-0.104411832586)*x[2]**o+(-0.79937203081)*x[2]
-        arg[2,2,1,0]=(0.273051712848)*x[0]**o+(-0.802468557957)*x[0]+(-0.019392898867)*x[1]**o+(-0.612803074784)*x[1]+(-0.269705464223)*x[2]**o+(-0.244405147706)*x[2]
-        arg[2,2,1,1]=(-0.08869649035)*x[0]**o+(0.809761782447)*x[0]+(0.761420080249)*x[1]**o+(0.16590038557)*x[1]+(-0.405657593445)*x[2]**o+(0.123593603037)*x[2]
-        arg[2,2,2,0]=(-0.799691160987)*x[0]**o+(0.834835690475)*x[0]+(-0.0863569221737)*x[1]**o+(0.988343215152)*x[1]+(0.294423283474)*x[2]**o+(0.325725138203)*x[2]
-        arg[2,2,2,1]=(0.648897496592)*x[0]**o+(-0.474329387314)*x[0]+(-0.904613697104)*x[1]**o+(0.382201388286)*x[1]+(-0.596889148339)*x[2]**o+(0.705132157684)*x[2]
-        arg[2,3,0,0]=(0.906738144045)*x[0]**o+(-0.365392026426)*x[0]+(0.730557428733)*x[1]**o+(-0.857864471189)*x[1]+(-0.160930657186)*x[2]**o+(0.885067383334)*x[2]
-        arg[2,3,0,1]=(0.992764702472)*x[0]**o+(0.720688532948)*x[0]+(0.318869772818)*x[1]**o+(0.995508347248)*x[1]+(0.108569456996)*x[2]**o+(-0.990939292995)*x[2]
-        arg[2,3,1,0]=(0.690584992096)*x[0]**o+(0.605885242246)*x[0]+(0.72371794265)*x[1]**o+(-0.632609325879)*x[1]+(0.520273588734)*x[2]**o+(0.885804143155)*x[2]
-        arg[2,3,1,1]=(0.485231542482)*x[0]**o+(0.866920225418)*x[0]+(-0.814964945972)*x[1]**o+(0.544132513209)*x[1]+(-0.155071376494)*x[2]**o+(-0.941300746237)*x[2]
-        arg[2,3,2,0]=(0.748232238388)*x[0]**o+(0.179397724419)*x[0]+(-0.43881886248)*x[1]**o+(-0.124941799624)*x[1]+(0.14679335819)*x[2]**o+(-0.758738846688)*x[2]
-        arg[2,3,2,1]=(-0.0951333655337)*x[0]**o+(0.37270972476)*x[0]+(-0.651977554115)*x[1]**o+(-0.88918597476)*x[1]+(-0.730858685576)*x[2]**o+(0.685881924459)*x[2]
-        arg[2,4,0,0]=(-0.823487466802)*x[0]**o+(-0.583630855643)*x[0]+(-0.664814562747)*x[1]**o+(0.860952605956)*x[1]+(-0.249114322668)*x[2]**o+(-0.968356584237)*x[2]
-        arg[2,4,0,1]=(0.44040146252)*x[0]**o+(-0.246827565902)*x[0]+(0.596300980733)*x[1]**o+(-0.825818200414)*x[1]+(0.0715512875967)*x[2]**o+(0.996064679803)*x[2]
-        arg[2,4,1,0]=(-0.287806453021)*x[0]**o+(0.704331542927)*x[0]+(-0.346139754521)*x[1]**o+(-0.766667037125)*x[1]+(0.283874132105)*x[2]**o+(-0.613145979204)*x[2]
-        arg[2,4,1,1]=(-0.116649875156)*x[0]**o+(0.291380048239)*x[0]+(0.689809221905)*x[1]**o+(0.758935910592)*x[1]+(0.505142787603)*x[2]**o+(-0.113611480503)*x[2]
-        arg[2,4,2,0]=(-0.836908572692)*x[0]**o+(-0.21892828725)*x[0]+(-0.935780103868)*x[1]**o+(0.106204643268)*x[1]+(-0.894474423807)*x[2]**o+(0.296554773217)*x[2]
-        arg[2,4,2,1]=(-0.89413495023)*x[0]**o+(0.6080813058)*x[0]+(0.087863889878)*x[1]**o+(0.213373665612)*x[1]+(0.17085345025)*x[2]**o+(-0.967625138712)*x[2]
-        arg[3,0,0,0]=(0.327537677409)*x[0]**o+(-0.299373059373)*x[0]+(-0.43223648542)*x[1]**o+(-0.499115781051)*x[1]+(0.145464567449)*x[2]**o+(0.580930584563)*x[2]
-        arg[3,0,0,1]=(-0.122622543351)*x[0]**o+(-0.220547821081)*x[0]+(0.892679827803)*x[1]**o+(0.436584604381)*x[1]+(-0.156093580288)*x[2]**o+(0.464069069075)*x[2]
-        arg[3,0,1,0]=(0.590288663203)*x[0]**o+(-0.212929445251)*x[0]+(0.0899671639061)*x[1]**o+(-0.87729854872)*x[1]+(0.789506558716)*x[2]**o+(-0.68867690907)*x[2]
-        arg[3,0,1,1]=(-0.913651849012)*x[0]**o+(-0.430938918892)*x[0]+(-0.351186012371)*x[1]**o+(0.500306994748)*x[1]+(0.145381845281)*x[2]**o+(0.624993552333)*x[2]
-        arg[3,0,2,0]=(0.281393881265)*x[0]**o+(-0.704727129826)*x[0]+(-0.0102091836449)*x[1]**o+(0.311857501353)*x[1]+(0.300732947904)*x[2]**o+(0.923973499548)*x[2]
-        arg[3,0,2,1]=(-0.584907526993)*x[0]**o+(0.625732316822)*x[0]+(-0.609691930408)*x[1]**o+(0.056160226956)*x[1]+(-0.766583561947)*x[2]**o+(0.307692190194)*x[2]
-        arg[3,1,0,0]=(0.731231379445)*x[0]**o+(-0.0485980527115)*x[0]+(0.908932758852)*x[1]**o+(0.188918035886)*x[1]+(0.685837743688)*x[2]**o+(-0.299987553989)*x[2]
-        arg[3,1,0,1]=(-0.784006561231)*x[0]**o+(-0.809789430022)*x[0]+(-0.846391792735)*x[1]**o+(-0.211583304405)*x[1]+(-0.00198590063687)*x[2]**o+(-0.853253255224)*x[2]
-        arg[3,1,1,0]=(0.595567299132)*x[0]**o+(-0.581734416878)*x[0]+(0.88144481486)*x[1]**o+(0.776876564509)*x[1]+(-0.367477971386)*x[2]**o+(0.0806320164453)*x[2]
-        arg[3,1,1,1]=(0.440836187611)*x[0]**o+(-0.578925091757)*x[0]+(0.923367189832)*x[1]**o+(-0.993888173929)*x[1]+(-0.645514380411)*x[2]**o+(0.0267439044199)*x[2]
-        arg[3,1,2,0]=(-0.305182288788)*x[0]**o+(-0.503372502553)*x[0]+(0.740948657389)*x[1]**o+(0.285661052275)*x[1]+(-0.634510984218)*x[2]**o+(-0.123979746456)*x[2]
-        arg[3,1,2,1]=(-0.897274928495)*x[0]**o+(0.971356796164)*x[0]+(0.940768290313)*x[1]**o+(-0.552941985667)*x[1]+(0.172857451423)*x[2]**o+(0.844758237523)*x[2]
-        arg[3,2,0,0]=(-0.903542725333)*x[0]**o+(0.936704774551)*x[0]+(-0.398085875228)*x[1]**o+(-0.304061573512)*x[1]+(-0.13362037229)*x[2]**o+(-0.405043350728)*x[2]
-        arg[3,2,0,1]=(-0.0208590751801)*x[0]**o+(-0.354086381885)*x[0]+(0.510884698744)*x[1]**o+(-0.275504880518)*x[1]+(0.459476496356)*x[2]**o+(0.25358097976)*x[2]
-        arg[3,2,1,0]=(-0.0171081877107)*x[0]**o+(-0.856081626112)*x[0]+(-0.0698686571004)*x[1]**o+(0.0954918361122)*x[1]+(0.938494954069)*x[2]**o+(-0.824928688248)*x[2]
-        arg[3,2,1,1]=(-0.277307915098)*x[0]**o+(0.737855779658)*x[0]+(-0.466761948855)*x[1]**o+(-0.821498435809)*x[1]+(-0.391009601442)*x[2]**o+(0.643834542048)*x[2]
-        arg[3,2,2,0]=(0.379015007885)*x[0]**o+(0.348646179575)*x[0]+(0.733765133901)*x[1]**o+(-0.722363571789)*x[1]+(0.488531791931)*x[2]**o+(0.279813923679)*x[2]
-        arg[3,2,2,1]=(0.516708382119)*x[0]**o+(0.0426665103314)*x[0]+(-0.168751315718)*x[1]**o+(-0.124069236608)*x[1]+(-0.778866001674)*x[2]**o+(-0.362031001279)*x[2]
-        arg[3,3,0,0]=(0.995284803465)*x[0]**o+(-0.442327755879)*x[0]+(-0.13110270925)*x[1]**o+(-0.172857543102)*x[1]+(-0.910522664379)*x[2]**o+(0.516931833163)*x[2]
-        arg[3,3,0,1]=(-0.889320295626)*x[0]**o+(-0.728330379534)*x[0]+(-0.584091700627)*x[1]**o+(0.469914082337)*x[1]+(0.18874127891)*x[2]**o+(0.0846532039249)*x[2]
-        arg[3,3,1,0]=(0.911523535462)*x[0]**o+(0.0924361220354)*x[0]+(-0.0822504494228)*x[1]**o+(0.00630249023591)*x[1]+(-0.180497330322)*x[2]**o+(0.817405577154)*x[2]
-        arg[3,3,1,1]=(0.681872747813)*x[0]**o+(0.840680190206)*x[0]+(-0.477660295206)*x[1]**o+(0.0399086968056)*x[1]+(0.440403204247)*x[2]**o+(-0.220656197016)*x[2]
-        arg[3,3,2,0]=(-0.967524407336)*x[0]**o+(0.896652274462)*x[0]+(0.735269328519)*x[1]**o+(-0.249017384614)*x[1]+(-0.573222311563)*x[2]**o+(-0.653800334954)*x[2]
-        arg[3,3,2,1]=(0.10041632804)*x[0]**o+(0.167657178348)*x[0]+(0.990621134594)*x[1]**o+(-0.309063473348)*x[1]+(-0.688206827575)*x[2]**o+(0.0926806818663)*x[2]
-        arg[3,4,0,0]=(-0.128678339518)*x[0]**o+(-0.974238160059)*x[0]+(-0.762599464772)*x[1]**o+(0.0233286358698)*x[1]+(-0.622481697973)*x[2]**o+(-0.080495303798)*x[2]
-        arg[3,4,0,1]=(-0.380318230058)*x[0]**o+(0.568425682425)*x[0]+(0.787369916262)*x[1]**o+(0.296745245123)*x[1]+(-0.917621002414)*x[2]**o+(-0.696209404954)*x[2]
-        arg[3,4,1,0]=(-0.382961468898)*x[0]**o+(0.672614453621)*x[0]+(0.565371503874)*x[1]**o+(-0.597331999912)*x[1]+(-0.153637846704)*x[2]**o+(-0.438159587906)*x[2]
-        arg[3,4,1,1]=(-0.541043007799)*x[0]**o+(0.415600628159)*x[0]+(-0.793716270785)*x[1]**o+(0.780110667203)*x[1]+(-0.101309486185)*x[2]**o+(-0.138868352939)*x[2]
-        arg[3,4,2,0]=(0.679815917569)*x[0]**o+(-0.800657537776)*x[0]+(-0.711956069893)*x[1]**o+(-0.575626146908)*x[1]+(0.184247083249)*x[2]**o+(-0.728118084396)*x[2]
-        arg[3,4,2,1]=(-0.608089432748)*x[0]**o+(0.356378798828)*x[0]+(-0.575957599599)*x[1]**o+(0.599586825137)*x[1]+(-0.160475743299)*x[2]**o+(-0.070762356177)*x[2]
-        ref[0,0,0,0]=(-0.93229223906)*x_ref[0]**o+(0.176839936782)*x_ref[0]+(0.986271000359)*x_ref[1]**o+(-0.449322385723)*x_ref[1]+(-0.856450437823)*x_ref[2]**o+(0.31473579221)*x_ref[2]
-        ref[0,0,0,1]=(0.714047232765)*x_ref[0]**o+(-0.323471323003)*x_ref[0]+(0.628080480343)*x_ref[1]**o+(-0.992007912045)*x_ref[1]+(-0.11019723051)*x_ref[2]**o+(-0.104735408233)*x_ref[2]
-        ref[0,0,1,0]=(-0.437250443294)*x_ref[0]**o+(-0.741469652781)*x_ref[0]+(0.650921038465)*x_ref[1]**o+(0.679622741243)*x_ref[1]+(0.604005894895)*x_ref[2]**o+(0.598155624876)*x_ref[2]
-        ref[0,0,1,1]=(-0.574872168761)*x_ref[0]**o+(0.796207672391)*x_ref[0]+(-0.478046646159)*x_ref[1]**o+(0.604661326741)*x_ref[1]+(-0.898457020186)*x_ref[2]**o+(0.43234750827)*x_ref[2]
-        ref[0,0,2,0]=(-0.674008357742)*x_ref[0]**o+(0.699614371016)*x_ref[0]+(0.441321981559)*x_ref[1]**o+(-0.619688689942)*x_ref[1]+(-0.0874579208832)*x_ref[2]**o+(-0.925753840555)*x_ref[2]
-        ref[0,0,2,1]=(-0.114329474892)*x_ref[0]**o+(0.699501071503)*x_ref[0]+(-0.618807420683)*x_ref[1]**o+(0.411584695002)*x_ref[1]+(-0.234620261556)*x_ref[2]**o+(0.585720100967)*x_ref[2]
-        ref[0,1,0,0]=(0.617432097253)*x_ref[0]**o+(-0.00304868863676)*x_ref[0]+(0.571021785645)*x_ref[1]**o+(0.457197205728)*x_ref[1]+(0.462895867813)*x_ref[2]**o+(0.278022956316)*x_ref[2]
-        ref[0,1,0,1]=(-0.659136231188)*x_ref[0]**o+(-0.388212920906)*x_ref[0]+(-0.982152608232)*x_ref[1]**o+(-0.665797156013)*x_ref[1]+(-0.76141890649)*x_ref[2]**o+(-0.591458323836)*x_ref[2]
-        ref[0,1,1,0]=(-0.488016386893)*x_ref[0]**o+(0.965660401944)*x_ref[0]+(0.178400189819)*x_ref[1]**o+(0.578417314499)*x_ref[1]+(-0.398083955217)*x_ref[2]**o+(0.460338187535)*x_ref[2]
-        ref[0,1,1,1]=(-0.182086458235)*x_ref[0]**o+(0.0842368498629)*x_ref[0]+(-0.642008026184)*x_ref[1]**o+(-0.0449408131957)*x_ref[1]+(-0.927397573018)*x_ref[2]**o+(0.854313729816)*x_ref[2]
-        ref[0,1,2,0]=(-0.201475872769)*x_ref[0]**o+(0.098190765292)*x_ref[0]+(0.808624244922)*x_ref[1]**o+(0.0726268899898)*x_ref[1]+(-0.605334327027)*x_ref[2]**o+(-0.999151255934)*x_ref[2]
-        ref[0,1,2,1]=(0.672344024218)*x_ref[0]**o+(-0.638554833481)*x_ref[0]+(-0.212231801634)*x_ref[1]**o+(-0.492765366968)*x_ref[1]+(0.311273771921)*x_ref[2]**o+(-0.504370655006)*x_ref[2]
-        ref[0,2,0,0]=(0.9944935907)*x_ref[0]**o+(-0.365261996611)*x_ref[0]+(-0.105667939789)*x_ref[1]**o+(0.886935751977)*x_ref[1]+(0.263336157757)*x_ref[2]**o+(-0.880316523113)*x_ref[2]
-        ref[0,2,0,1]=(-0.659779300787)*x_ref[0]**o+(-0.728590180152)*x_ref[0]+(0.732078508037)*x_ref[1]**o+(0.684963412098)*x_ref[1]+(0.822970700012)*x_ref[2]**o+(-0.680001879674)*x_ref[2]
-        ref[0,2,1,0]=(-0.207855412893)*x_ref[0]**o+(0.438275426529)*x_ref[0]+(0.87046682066)*x_ref[1]**o+(-0.960322013848)*x_ref[1]+(-0.273728198625)*x_ref[2]**o+(-0.960137228004)*x_ref[2]
-        ref[0,2,1,1]=(-0.189232680002)*x_ref[0]**o+(0.866417302002)*x_ref[0]+(-0.93403311248)*x_ref[1]**o+(-0.55773104878)*x_ref[1]+(0.94062895773)*x_ref[2]**o+(-0.758052194805)*x_ref[2]
-        ref[0,2,2,0]=(0.100859944394)*x_ref[0]**o+(-0.20292135909)*x_ref[0]+(-0.713339941261)*x_ref[1]**o+(-0.615106454411)*x_ref[1]+(0.791245995152)*x_ref[2]**o+(-0.81051791594)*x_ref[2]
-        ref[0,2,2,1]=(0.595743424517)*x_ref[0]**o+(-0.179075876404)*x_ref[0]+(-0.799005601715)*x_ref[1]**o+(-0.0554635073569)*x_ref[1]+(-0.850510701985)*x_ref[2]**o+(0.234516538169)*x_ref[2]
-        ref[0,3,0,0]=(-0.361667738861)*x_ref[0]**o+(-0.551837498696)*x_ref[0]+(-0.834377202094)*x_ref[1]**o+(0.814168224265)*x_ref[1]+(-0.00479533268377)*x_ref[2]**o+(0.843007652951)*x_ref[2]
-        ref[0,3,0,1]=(-0.448417439465)*x_ref[0]**o+(0.431496158388)*x_ref[0]+(-0.547416443433)*x_ref[1]**o+(-0.0746785704695)*x_ref[1]+(-0.646238182944)*x_ref[2]**o+(-0.318608714595)*x_ref[2]
-        ref[0,3,1,0]=(-0.275647366007)*x_ref[0]**o+(-0.410594785047)*x_ref[0]+(-0.858282378196)*x_ref[1]**o+(-0.755586690837)*x_ref[1]+(-0.420481091654)*x_ref[2]**o+(-0.0996487371831)*x_ref[2]
-        ref[0,3,1,1]=(-0.395961249009)*x_ref[0]**o+(0.0860896467863)*x_ref[0]+(0.482719525748)*x_ref[1]**o+(0.319368178133)*x_ref[1]+(0.516449153414)*x_ref[2]**o+(-0.246749862576)*x_ref[2]
-        ref[0,3,2,0]=(-0.367322027122)*x_ref[0]**o+(0.687206412524)*x_ref[0]+(0.616265233972)*x_ref[1]**o+(-0.32660589112)*x_ref[1]+(-0.944607343096)*x_ref[2]**o+(0.123982537951)*x_ref[2]
-        ref[0,3,2,1]=(0.700497166804)*x_ref[0]**o+(0.553961329865)*x_ref[0]+(-0.34020003754)*x_ref[1]**o+(0.295870992783)*x_ref[1]+(-0.220275880046)*x_ref[2]**o+(0.766121035825)*x_ref[2]
-        ref[0,4,0,0]=(0.405469789242)*x_ref[0]**o+(-0.338347662873)*x_ref[0]+(0.0761796434233)*x_ref[1]**o+(-0.120599175033)*x_ref[1]+(0.107865585379)*x_ref[2]**o+(0.0711941007838)*x_ref[2]
-        ref[0,4,0,1]=(0.614166154899)*x_ref[0]**o+(0.195780702963)*x_ref[0]+(0.718935985215)*x_ref[1]**o+(0.214577296792)*x_ref[1]+(-0.366985242107)*x_ref[2]**o+(-0.509584787633)*x_ref[2]
-        ref[0,4,1,0]=(-0.638646370981)*x_ref[0]**o+(-0.769955899284)*x_ref[0]+(-0.887407540503)*x_ref[1]**o+(0.0901245429998)*x_ref[1]+(0.786085641321)*x_ref[2]**o+(0.6248068552)*x_ref[2]
-        ref[0,4,1,1]=(-0.145426222043)*x_ref[0]**o+(-0.494114545016)*x_ref[0]+(0.422153721335)*x_ref[1]**o+(0.617022143901)*x_ref[1]+(-0.665972324723)*x_ref[2]**o+(-0.476724432799)*x_ref[2]
-        ref[0,4,2,0]=(0.556105252092)*x_ref[0]**o+(-0.893268696809)*x_ref[0]+(0.146441889489)*x_ref[1]**o+(-0.170512113283)*x_ref[1]+(-0.869313262875)*x_ref[2]**o+(-0.976874109392)*x_ref[2]
-        ref[0,4,2,1]=(0.858927206499)*x_ref[0]**o+(0.198998355146)*x_ref[0]+(0.278125296049)*x_ref[1]**o+(-0.0442518828093)*x_ref[1]+(0.274852724203)*x_ref[2]**o+(-0.167649193314)*x_ref[2]
-        ref[1,0,0,0]=(-0.0429420289353)*x_ref[0]**o+(-0.15764693929)*x_ref[0]+(-0.859599917512)*x_ref[1]**o+(-0.904178643575)*x_ref[1]+(0.519560711493)*x_ref[2]**o+(0.258644717907)*x_ref[2]
-        ref[1,0,0,1]=(-0.185321114264)*x_ref[0]**o+(-0.794493830004)*x_ref[0]+(0.136084421162)*x_ref[1]**o+(0.926912021419)*x_ref[1]+(0.346392120388)*x_ref[2]**o+(-0.183908371454)*x_ref[2]
-        ref[1,0,1,0]=(-0.730675509877)*x_ref[0]**o+(0.865034802778)*x_ref[0]+(-0.506315431878)*x_ref[1]**o+(-0.94607761051)*x_ref[1]+(0.195194792801)*x_ref[2]**o+(-0.865129258879)*x_ref[2]
-        ref[1,0,1,1]=(-0.0597026648107)*x_ref[0]**o+(-0.884790497)*x_ref[0]+(-0.0631278742098)*x_ref[1]**o+(-0.808364940737)*x_ref[1]+(-0.968952604837)*x_ref[2]**o+(0.142246702632)*x_ref[2]
-        ref[1,0,2,0]=(0.648472894563)*x_ref[0]**o+(0.145861644073)*x_ref[0]+(0.501227520574)*x_ref[1]**o+(0.265886482306)*x_ref[1]+(-0.0472772173573)*x_ref[2]**o+(-0.364169655969)*x_ref[2]
-        ref[1,0,2,1]=(0.847863600695)*x_ref[0]**o+(-0.288841685199)*x_ref[0]+(-0.500273502795)*x_ref[1]**o+(0.627379277592)*x_ref[1]+(0.326814024625)*x_ref[2]**o+(-0.514712825895)*x_ref[2]
-        ref[1,1,0,0]=(-0.947845713712)*x_ref[0]**o+(-0.372115616305)*x_ref[0]+(-0.572858279998)*x_ref[1]**o+(0.226237627692)*x_ref[1]+(0.210201947182)*x_ref[2]**o+(0.0147616538594)*x_ref[2]
-        ref[1,1,0,1]=(-0.39813630466)*x_ref[0]**o+(-0.658496395731)*x_ref[0]+(-0.363906465005)*x_ref[1]**o+(-0.816719661238)*x_ref[1]+(-0.478106835032)*x_ref[2]**o+(0.0819042309589)*x_ref[2]
-        ref[1,1,1,0]=(-0.287160278593)*x_ref[0]**o+(-0.0281402640978)*x_ref[0]+(0.41559795378)*x_ref[1]**o+(0.158274458097)*x_ref[1]+(-0.798429481502)*x_ref[2]**o+(-0.278585334624)*x_ref[2]
-        ref[1,1,1,1]=(0.809550480973)*x_ref[0]**o+(0.192026915854)*x_ref[0]+(-0.891168838599)*x_ref[1]**o+(0.0482621192882)*x_ref[1]+(-0.35339708159)*x_ref[2]**o+(-0.133161551553)*x_ref[2]
-        ref[1,1,2,0]=(0.939582328872)*x_ref[0]**o+(0.561963790516)*x_ref[0]+(0.885264722949)*x_ref[1]**o+(-0.468042305266)*x_ref[1]+(0.232880002429)*x_ref[2]**o+(-0.772896005701)*x_ref[2]
-        ref[1,1,2,1]=(-0.297333303209)*x_ref[0]**o+(-0.414050924207)*x_ref[0]+(-0.278903698873)*x_ref[1]**o+(0.345370620869)*x_ref[1]+(-0.0570151259027)*x_ref[2]**o+(0.786449641378)*x_ref[2]
-        ref[1,2,0,0]=(0.644047138589)*x_ref[0]**o+(-0.480660438838)*x_ref[0]+(0.32526499462)*x_ref[1]**o+(-0.775988282127)*x_ref[1]+(0.108374143932)*x_ref[2]**o+(0.955463667181)*x_ref[2]
-        ref[1,2,0,1]=(-0.468236790339)*x_ref[0]**o+(0.844197711724)*x_ref[0]+(0.808973429831)*x_ref[1]**o+(-0.647699550005)*x_ref[1]+(0.552555959813)*x_ref[2]**o+(-0.3403079515)*x_ref[2]
-        ref[1,2,1,0]=(0.864686362308)*x_ref[0]**o+(0.248923646116)*x_ref[0]+(0.0287042863842)*x_ref[1]**o+(0.404974282153)*x_ref[1]+(0.113501438234)*x_ref[2]**o+(-0.619364894397)*x_ref[2]
-        ref[1,2,1,1]=(-0.625146992499)*x_ref[0]**o+(-0.0480602452983)*x_ref[0]+(0.168910550914)*x_ref[1]**o+(-0.891584218123)*x_ref[1]+(0.0609357618263)*x_ref[2]**o+(0.0451921002161)*x_ref[2]
-        ref[1,2,2,0]=(-0.478728628752)*x_ref[0]**o+(0.428376547798)*x_ref[0]+(0.817203376818)*x_ref[1]**o+(-0.856056266953)*x_ref[1]+(0.354960313382)*x_ref[2]**o+(-0.611468960461)*x_ref[2]
-        ref[1,2,2,1]=(0.49500742113)*x_ref[0]**o+(0.902948130263)*x_ref[0]+(-0.810748543744)*x_ref[1]**o+(-0.696150924858)*x_ref[1]+(-0.748278516161)*x_ref[2]**o+(0.694815527058)*x_ref[2]
-        ref[1,3,0,0]=(-0.361960150296)*x_ref[0]**o+(-0.845139780461)*x_ref[0]+(-0.0624499309665)*x_ref[1]**o+(-0.0515558058489)*x_ref[1]+(0.400690983017)*x_ref[2]**o+(-0.744608407974)*x_ref[2]
-        ref[1,3,0,1]=(-0.452453617467)*x_ref[0]**o+(0.845396139593)*x_ref[0]+(0.292319469936)*x_ref[1]**o+(-0.833547518634)*x_ref[1]+(-0.511797700353)*x_ref[2]**o+(0.857891454773)*x_ref[2]
-        ref[1,3,1,0]=(0.779504092912)*x_ref[0]**o+(0.500524773615)*x_ref[0]+(0.590542659382)*x_ref[1]**o+(0.479310630519)*x_ref[1]+(0.509960641956)*x_ref[2]**o+(-0.564980432959)*x_ref[2]
-        ref[1,3,1,1]=(-0.145745189298)*x_ref[0]**o+(-0.256064576359)*x_ref[0]+(0.640890837126)*x_ref[1]**o+(-0.718802035152)*x_ref[1]+(-0.322216873583)*x_ref[2]**o+(-0.0246526526334)*x_ref[2]
-        ref[1,3,2,0]=(-0.463434285098)*x_ref[0]**o+(0.116722448643)*x_ref[0]+(-0.690378381342)*x_ref[1]**o+(0.429197465885)*x_ref[1]+(-0.353019731384)*x_ref[2]**o+(0.57397712918)*x_ref[2]
-        ref[1,3,2,1]=(0.169676853383)*x_ref[0]**o+(0.815225472623)*x_ref[0]+(-0.11125527552)*x_ref[1]**o+(0.391513831525)*x_ref[1]+(-0.587041361585)*x_ref[2]**o+(0.255194151616)*x_ref[2]
-        ref[1,4,0,0]=(0.325351608628)*x_ref[0]**o+(-0.57751715453)*x_ref[0]+(0.145167511303)*x_ref[1]**o+(-0.969286030742)*x_ref[1]+(0.917370398478)*x_ref[2]**o+(0.691483691598)*x_ref[2]
-        ref[1,4,0,1]=(0.0997998298271)*x_ref[0]**o+(-0.101248202247)*x_ref[0]+(-0.650649653848)*x_ref[1]**o+(-0.157887947288)*x_ref[1]+(0.517501747765)*x_ref[2]**o+(-0.0852921926298)*x_ref[2]
-        ref[1,4,1,0]=(0.984595420407)*x_ref[0]**o+(0.499293499076)*x_ref[0]+(0.352193115874)*x_ref[1]**o+(-0.684522909647)*x_ref[1]+(-0.391538373605)*x_ref[2]**o+(0.404635595162)*x_ref[2]
-        ref[1,4,1,1]=(-0.231310482173)*x_ref[0]**o+(-0.0385089836559)*x_ref[0]+(0.247671691888)*x_ref[1]**o+(0.883971955027)*x_ref[1]+(-0.0856624709734)*x_ref[2]**o+(0.942940875904)*x_ref[2]
-        ref[1,4,2,0]=(-0.471467257434)*x_ref[0]**o+(0.835634240897)*x_ref[0]+(-0.594421294562)*x_ref[1]**o+(-0.187584387111)*x_ref[1]+(0.859867472765)*x_ref[2]**o+(0.930951154576)*x_ref[2]
-        ref[1,4,2,1]=(0.504416975601)*x_ref[0]**o+(0.435692923635)*x_ref[0]+(-0.296945944313)*x_ref[1]**o+(0.815156218765)*x_ref[1]+(0.464464247442)*x_ref[2]**o+(-0.378809453041)*x_ref[2]
-        ref[2,0,0,0]=(0.213087423107)*x_ref[0]**o+(-0.504681665801)*x_ref[0]+(0.796352190405)*x_ref[1]**o+(0.546752751136)*x_ref[1]+(0.57347644664)*x_ref[2]**o+(0.715856963195)*x_ref[2]
-        ref[2,0,0,1]=(-0.28455266769)*x_ref[0]**o+(0.853162220766)*x_ref[0]+(0.164930982863)*x_ref[1]**o+(-0.0136996498765)*x_ref[1]+(0.293717915079)*x_ref[2]**o+(-0.216124158473)*x_ref[2]
-        ref[2,0,1,0]=(-0.328115989441)*x_ref[0]**o+(-0.529441496488)*x_ref[0]+(-0.43579479677)*x_ref[1]**o+(-0.851333801194)*x_ref[1]+(-0.278406102972)*x_ref[2]**o+(0.947777471824)*x_ref[2]
-        ref[2,0,1,1]=(-0.756438938789)*x_ref[0]**o+(-0.624332272735)*x_ref[0]+(-0.591638429565)*x_ref[1]**o+(-0.0608281771566)*x_ref[1]+(-0.852078784085)*x_ref[2]**o+(-0.526558964866)*x_ref[2]
-        ref[2,0,2,0]=(-0.923892426969)*x_ref[0]**o+(0.788121899878)*x_ref[0]+(-0.446006331202)*x_ref[1]**o+(0.997210871574)*x_ref[1]+(0.356998606103)*x_ref[2]**o+(0.972643822823)*x_ref[2]
-        ref[2,0,2,1]=(0.225183308571)*x_ref[0]**o+(-0.757505414777)*x_ref[0]+(-0.59573192074)*x_ref[1]**o+(0.57166154987)*x_ref[1]+(0.622343198809)*x_ref[2]**o+(0.60343970503)*x_ref[2]
-        ref[2,1,0,0]=(0.51027702934)*x_ref[0]**o+(-0.711737679522)*x_ref[0]+(-0.211712579627)*x_ref[1]**o+(-0.495817605314)*x_ref[1]+(0.924425804272)*x_ref[2]**o+(0.753424835275)*x_ref[2]
-        ref[2,1,0,1]=(0.476218252577)*x_ref[0]**o+(0.187579891557)*x_ref[0]+(0.727359583623)*x_ref[1]**o+(-0.389875559955)*x_ref[1]+(-0.352889326477)*x_ref[2]**o+(0.365143943637)*x_ref[2]
-        ref[2,1,1,0]=(-0.815704312943)*x_ref[0]**o+(0.315217470245)*x_ref[0]+(-0.535234555065)*x_ref[1]**o+(-0.433408988501)*x_ref[1]+(-0.676694087389)*x_ref[2]**o+(0.384097177718)*x_ref[2]
-        ref[2,1,1,1]=(-0.0368452411345)*x_ref[0]**o+(0.514540686444)*x_ref[0]+(-0.527100066965)*x_ref[1]**o+(0.0291015562912)*x_ref[1]+(-0.605646905004)*x_ref[2]**o+(0.931528599981)*x_ref[2]
-        ref[2,1,2,0]=(-0.0994015945266)*x_ref[0]**o+(-0.762310347434)*x_ref[0]+(-0.845934950466)*x_ref[1]**o+(-0.235758967923)*x_ref[1]+(0.755531422698)*x_ref[2]**o+(0.108353867777)*x_ref[2]
-        ref[2,1,2,1]=(-0.868779052889)*x_ref[0]**o+(0.783878941075)*x_ref[0]+(0.900089560473)*x_ref[1]**o+(-0.836779405877)*x_ref[1]+(-0.799571882449)*x_ref[2]**o+(0.999710029157)*x_ref[2]
-        ref[2,2,0,0]=(0.541465277143)*x_ref[0]**o+(-0.840477797945)*x_ref[0]+(-0.362577721098)*x_ref[1]**o+(0.00680131806718)*x_ref[1]+(-0.338485239867)*x_ref[2]**o+(0.828213756751)*x_ref[2]
-        ref[2,2,0,1]=(-0.927347423175)*x_ref[0]**o+(-0.936191125785)*x_ref[0]+(-0.411819804833)*x_ref[1]**o+(-0.0222067637269)*x_ref[1]+(-0.104411832586)*x_ref[2]**o+(-0.79937203081)*x_ref[2]
-        ref[2,2,1,0]=(0.273051712848)*x_ref[0]**o+(-0.802468557957)*x_ref[0]+(-0.019392898867)*x_ref[1]**o+(-0.612803074784)*x_ref[1]+(-0.269705464223)*x_ref[2]**o+(-0.244405147706)*x_ref[2]
-        ref[2,2,1,1]=(-0.08869649035)*x_ref[0]**o+(0.809761782447)*x_ref[0]+(0.761420080249)*x_ref[1]**o+(0.16590038557)*x_ref[1]+(-0.405657593445)*x_ref[2]**o+(0.123593603037)*x_ref[2]
-        ref[2,2,2,0]=(-0.799691160987)*x_ref[0]**o+(0.834835690475)*x_ref[0]+(-0.0863569221737)*x_ref[1]**o+(0.988343215152)*x_ref[1]+(0.294423283474)*x_ref[2]**o+(0.325725138203)*x_ref[2]
-        ref[2,2,2,1]=(0.648897496592)*x_ref[0]**o+(-0.474329387314)*x_ref[0]+(-0.904613697104)*x_ref[1]**o+(0.382201388286)*x_ref[1]+(-0.596889148339)*x_ref[2]**o+(0.705132157684)*x_ref[2]
-        ref[2,3,0,0]=(0.906738144045)*x_ref[0]**o+(-0.365392026426)*x_ref[0]+(0.730557428733)*x_ref[1]**o+(-0.857864471189)*x_ref[1]+(-0.160930657186)*x_ref[2]**o+(0.885067383334)*x_ref[2]
-        ref[2,3,0,1]=(0.992764702472)*x_ref[0]**o+(0.720688532948)*x_ref[0]+(0.318869772818)*x_ref[1]**o+(0.995508347248)*x_ref[1]+(0.108569456996)*x_ref[2]**o+(-0.990939292995)*x_ref[2]
-        ref[2,3,1,0]=(0.690584992096)*x_ref[0]**o+(0.605885242246)*x_ref[0]+(0.72371794265)*x_ref[1]**o+(-0.632609325879)*x_ref[1]+(0.520273588734)*x_ref[2]**o+(0.885804143155)*x_ref[2]
-        ref[2,3,1,1]=(0.485231542482)*x_ref[0]**o+(0.866920225418)*x_ref[0]+(-0.814964945972)*x_ref[1]**o+(0.544132513209)*x_ref[1]+(-0.155071376494)*x_ref[2]**o+(-0.941300746237)*x_ref[2]
-        ref[2,3,2,0]=(0.748232238388)*x_ref[0]**o+(0.179397724419)*x_ref[0]+(-0.43881886248)*x_ref[1]**o+(-0.124941799624)*x_ref[1]+(0.14679335819)*x_ref[2]**o+(-0.758738846688)*x_ref[2]
-        ref[2,3,2,1]=(-0.0951333655337)*x_ref[0]**o+(0.37270972476)*x_ref[0]+(-0.651977554115)*x_ref[1]**o+(-0.88918597476)*x_ref[1]+(-0.730858685576)*x_ref[2]**o+(0.685881924459)*x_ref[2]
-        ref[2,4,0,0]=(-0.823487466802)*x_ref[0]**o+(-0.583630855643)*x_ref[0]+(-0.664814562747)*x_ref[1]**o+(0.860952605956)*x_ref[1]+(-0.249114322668)*x_ref[2]**o+(-0.968356584237)*x_ref[2]
-        ref[2,4,0,1]=(0.44040146252)*x_ref[0]**o+(-0.246827565902)*x_ref[0]+(0.596300980733)*x_ref[1]**o+(-0.825818200414)*x_ref[1]+(0.0715512875967)*x_ref[2]**o+(0.996064679803)*x_ref[2]
-        ref[2,4,1,0]=(-0.287806453021)*x_ref[0]**o+(0.704331542927)*x_ref[0]+(-0.346139754521)*x_ref[1]**o+(-0.766667037125)*x_ref[1]+(0.283874132105)*x_ref[2]**o+(-0.613145979204)*x_ref[2]
-        ref[2,4,1,1]=(-0.116649875156)*x_ref[0]**o+(0.291380048239)*x_ref[0]+(0.689809221905)*x_ref[1]**o+(0.758935910592)*x_ref[1]+(0.505142787603)*x_ref[2]**o+(-0.113611480503)*x_ref[2]
-        ref[2,4,2,0]=(-0.836908572692)*x_ref[0]**o+(-0.21892828725)*x_ref[0]+(-0.935780103868)*x_ref[1]**o+(0.106204643268)*x_ref[1]+(-0.894474423807)*x_ref[2]**o+(0.296554773217)*x_ref[2]
-        ref[2,4,2,1]=(-0.89413495023)*x_ref[0]**o+(0.6080813058)*x_ref[0]+(0.087863889878)*x_ref[1]**o+(0.213373665612)*x_ref[1]+(0.17085345025)*x_ref[2]**o+(-0.967625138712)*x_ref[2]
-        ref[3,0,0,0]=(0.327537677409)*x_ref[0]**o+(-0.299373059373)*x_ref[0]+(-0.43223648542)*x_ref[1]**o+(-0.499115781051)*x_ref[1]+(0.145464567449)*x_ref[2]**o+(0.580930584563)*x_ref[2]
-        ref[3,0,0,1]=(-0.122622543351)*x_ref[0]**o+(-0.220547821081)*x_ref[0]+(0.892679827803)*x_ref[1]**o+(0.436584604381)*x_ref[1]+(-0.156093580288)*x_ref[2]**o+(0.464069069075)*x_ref[2]
-        ref[3,0,1,0]=(0.590288663203)*x_ref[0]**o+(-0.212929445251)*x_ref[0]+(0.0899671639061)*x_ref[1]**o+(-0.87729854872)*x_ref[1]+(0.789506558716)*x_ref[2]**o+(-0.68867690907)*x_ref[2]
-        ref[3,0,1,1]=(-0.913651849012)*x_ref[0]**o+(-0.430938918892)*x_ref[0]+(-0.351186012371)*x_ref[1]**o+(0.500306994748)*x_ref[1]+(0.145381845281)*x_ref[2]**o+(0.624993552333)*x_ref[2]
-        ref[3,0,2,0]=(0.281393881265)*x_ref[0]**o+(-0.704727129826)*x_ref[0]+(-0.0102091836449)*x_ref[1]**o+(0.311857501353)*x_ref[1]+(0.300732947904)*x_ref[2]**o+(0.923973499548)*x_ref[2]
-        ref[3,0,2,1]=(-0.584907526993)*x_ref[0]**o+(0.625732316822)*x_ref[0]+(-0.609691930408)*x_ref[1]**o+(0.056160226956)*x_ref[1]+(-0.766583561947)*x_ref[2]**o+(0.307692190194)*x_ref[2]
-        ref[3,1,0,0]=(0.731231379445)*x_ref[0]**o+(-0.0485980527115)*x_ref[0]+(0.908932758852)*x_ref[1]**o+(0.188918035886)*x_ref[1]+(0.685837743688)*x_ref[2]**o+(-0.299987553989)*x_ref[2]
-        ref[3,1,0,1]=(-0.784006561231)*x_ref[0]**o+(-0.809789430022)*x_ref[0]+(-0.846391792735)*x_ref[1]**o+(-0.211583304405)*x_ref[1]+(-0.00198590063687)*x_ref[2]**o+(-0.853253255224)*x_ref[2]
-        ref[3,1,1,0]=(0.595567299132)*x_ref[0]**o+(-0.581734416878)*x_ref[0]+(0.88144481486)*x_ref[1]**o+(0.776876564509)*x_ref[1]+(-0.367477971386)*x_ref[2]**o+(0.0806320164453)*x_ref[2]
-        ref[3,1,1,1]=(0.440836187611)*x_ref[0]**o+(-0.578925091757)*x_ref[0]+(0.923367189832)*x_ref[1]**o+(-0.993888173929)*x_ref[1]+(-0.645514380411)*x_ref[2]**o+(0.0267439044199)*x_ref[2]
-        ref[3,1,2,0]=(-0.305182288788)*x_ref[0]**o+(-0.503372502553)*x_ref[0]+(0.740948657389)*x_ref[1]**o+(0.285661052275)*x_ref[1]+(-0.634510984218)*x_ref[2]**o+(-0.123979746456)*x_ref[2]
-        ref[3,1,2,1]=(-0.897274928495)*x_ref[0]**o+(0.971356796164)*x_ref[0]+(0.940768290313)*x_ref[1]**o+(-0.552941985667)*x_ref[1]+(0.172857451423)*x_ref[2]**o+(0.844758237523)*x_ref[2]
-        ref[3,2,0,0]=(-0.903542725333)*x_ref[0]**o+(0.936704774551)*x_ref[0]+(-0.398085875228)*x_ref[1]**o+(-0.304061573512)*x_ref[1]+(-0.13362037229)*x_ref[2]**o+(-0.405043350728)*x_ref[2]
-        ref[3,2,0,1]=(-0.0208590751801)*x_ref[0]**o+(-0.354086381885)*x_ref[0]+(0.510884698744)*x_ref[1]**o+(-0.275504880518)*x_ref[1]+(0.459476496356)*x_ref[2]**o+(0.25358097976)*x_ref[2]
-        ref[3,2,1,0]=(-0.0171081877107)*x_ref[0]**o+(-0.856081626112)*x_ref[0]+(-0.0698686571004)*x_ref[1]**o+(0.0954918361122)*x_ref[1]+(0.938494954069)*x_ref[2]**o+(-0.824928688248)*x_ref[2]
-        ref[3,2,1,1]=(-0.277307915098)*x_ref[0]**o+(0.737855779658)*x_ref[0]+(-0.466761948855)*x_ref[1]**o+(-0.821498435809)*x_ref[1]+(-0.391009601442)*x_ref[2]**o+(0.643834542048)*x_ref[2]
-        ref[3,2,2,0]=(0.379015007885)*x_ref[0]**o+(0.348646179575)*x_ref[0]+(0.733765133901)*x_ref[1]**o+(-0.722363571789)*x_ref[1]+(0.488531791931)*x_ref[2]**o+(0.279813923679)*x_ref[2]
-        ref[3,2,2,1]=(0.516708382119)*x_ref[0]**o+(0.0426665103314)*x_ref[0]+(-0.168751315718)*x_ref[1]**o+(-0.124069236608)*x_ref[1]+(-0.778866001674)*x_ref[2]**o+(-0.362031001279)*x_ref[2]
-        ref[3,3,0,0]=(0.995284803465)*x_ref[0]**o+(-0.442327755879)*x_ref[0]+(-0.13110270925)*x_ref[1]**o+(-0.172857543102)*x_ref[1]+(-0.910522664379)*x_ref[2]**o+(0.516931833163)*x_ref[2]
-        ref[3,3,0,1]=(-0.889320295626)*x_ref[0]**o+(-0.728330379534)*x_ref[0]+(-0.584091700627)*x_ref[1]**o+(0.469914082337)*x_ref[1]+(0.18874127891)*x_ref[2]**o+(0.0846532039249)*x_ref[2]
-        ref[3,3,1,0]=(0.911523535462)*x_ref[0]**o+(0.0924361220354)*x_ref[0]+(-0.0822504494228)*x_ref[1]**o+(0.00630249023591)*x_ref[1]+(-0.180497330322)*x_ref[2]**o+(0.817405577154)*x_ref[2]
-        ref[3,3,1,1]=(0.681872747813)*x_ref[0]**o+(0.840680190206)*x_ref[0]+(-0.477660295206)*x_ref[1]**o+(0.0399086968056)*x_ref[1]+(0.440403204247)*x_ref[2]**o+(-0.220656197016)*x_ref[2]
-        ref[3,3,2,0]=(-0.967524407336)*x_ref[0]**o+(0.896652274462)*x_ref[0]+(0.735269328519)*x_ref[1]**o+(-0.249017384614)*x_ref[1]+(-0.573222311563)*x_ref[2]**o+(-0.653800334954)*x_ref[2]
-        ref[3,3,2,1]=(0.10041632804)*x_ref[0]**o+(0.167657178348)*x_ref[0]+(0.990621134594)*x_ref[1]**o+(-0.309063473348)*x_ref[1]+(-0.688206827575)*x_ref[2]**o+(0.0926806818663)*x_ref[2]
-        ref[3,4,0,0]=(-0.128678339518)*x_ref[0]**o+(-0.974238160059)*x_ref[0]+(-0.762599464772)*x_ref[1]**o+(0.0233286358698)*x_ref[1]+(-0.622481697973)*x_ref[2]**o+(-0.080495303798)*x_ref[2]
-        ref[3,4,0,1]=(-0.380318230058)*x_ref[0]**o+(0.568425682425)*x_ref[0]+(0.787369916262)*x_ref[1]**o+(0.296745245123)*x_ref[1]+(-0.917621002414)*x_ref[2]**o+(-0.696209404954)*x_ref[2]
-        ref[3,4,1,0]=(-0.382961468898)*x_ref[0]**o+(0.672614453621)*x_ref[0]+(0.565371503874)*x_ref[1]**o+(-0.597331999912)*x_ref[1]+(-0.153637846704)*x_ref[2]**o+(-0.438159587906)*x_ref[2]
-        ref[3,4,1,1]=(-0.541043007799)*x_ref[0]**o+(0.415600628159)*x_ref[0]+(-0.793716270785)*x_ref[1]**o+(0.780110667203)*x_ref[1]+(-0.101309486185)*x_ref[2]**o+(-0.138868352939)*x_ref[2]
-        ref[3,4,2,0]=(0.679815917569)*x_ref[0]**o+(-0.800657537776)*x_ref[0]+(-0.711956069893)*x_ref[1]**o+(-0.575626146908)*x_ref[1]+(0.184247083249)*x_ref[2]**o+(-0.728118084396)*x_ref[2]
-        ref[3,4,2,1]=(-0.608089432748)*x_ref[0]**o+(0.356378798828)*x_ref[0]+(-0.575957599599)*x_ref[1]**o+(0.599586825137)*x_ref[1]+(-0.160475743299)*x_ref[2]**o+(-0.070762356177)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Solution onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.52738736047)*x[0]**o+(-0.513351179641)*x[0]+(0.466974564277)*x[1]**o+(0.247665236281)*x[1]
-        ref=(0.52738736047)*x_ref[0]**o+(-0.513351179641)*x_ref[0]+(0.466974564277)*x_ref[1]**o+(0.247665236281)*x_ref[1]
-      else:
-        arg=(0.345612544612)*x[0]**o+(0.480207854215)*x[0]+(0.196672493786)*x[1]**o+(-0.891043131902)*x[1]+(0.106095952827)*x[2]**o+(0.436049931061)*x[2]
-        ref=(0.345612544612)*x_ref[0]**o+(0.480207854215)*x_ref[0]+(0.196672493786)*x_ref[1]**o+(-0.891043131902)*x_ref[1]+(0.106095952827)*x_ref[2]**o+(0.436049931061)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Solution onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.738262816349)*x[0]**o+(-0.650523560236)*x[0]+(-0.344136056546)*x[1]**o+(-0.0693168099812)*x[1]
-        arg[1]=(-0.565224044511)*x[0]**o+(0.94461728731)*x[0]+(0.234800891741)*x[1]**o+(0.836341748852)*x[1]
-        ref[0]=(-0.738262816349)*x_ref[0]**o+(-0.650523560236)*x_ref[0]+(-0.344136056546)*x_ref[1]**o+(-0.0693168099812)*x_ref[1]
-        ref[1]=(-0.565224044511)*x_ref[0]**o+(0.94461728731)*x_ref[0]+(0.234800891741)*x_ref[1]**o+(0.836341748852)*x_ref[1]
-      else:
-        arg[0]=(-0.76925788678)*x[0]**o+(-0.391133765534)*x[0]+(0.89961543807)*x[1]**o+(-0.355090830059)*x[1]+(-0.663969382551)*x[2]**o+(0.0324773110608)*x[2]
-        arg[1]=(-0.640271335706)*x[0]**o+(-0.0771899290795)*x[0]+(0.923847889924)*x[1]**o+(-0.732484895713)*x[1]+(-0.782800597476)*x[2]**o+(-0.402230990251)*x[2]
-        ref[0]=(-0.76925788678)*x_ref[0]**o+(-0.391133765534)*x_ref[0]+(0.89961543807)*x_ref[1]**o+(-0.355090830059)*x_ref[1]+(-0.663969382551)*x_ref[2]**o+(0.0324773110608)*x_ref[2]
-        ref[1]=(-0.640271335706)*x_ref[0]**o+(-0.0771899290795)*x_ref[0]+(0.923847889924)*x_ref[1]**o+(-0.732484895713)*x_ref[1]+(-0.782800597476)*x_ref[2]**o+(-0.402230990251)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Solution onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.631349529615)*x[0]**o+(0.79216890406)*x[0]+(0.835421397222)*x[1]**o+(-0.209368192458)*x[1]
-        arg[0,1]=(-0.166321945093)*x[0]**o+(0.701821475941)*x[0]+(-0.141804772049)*x[1]**o+(-0.860056917696)*x[1]
-        arg[0,2]=(0.761659971379)*x[0]**o+(-0.39989119778)*x[0]+(-0.761140588562)*x[1]**o+(-0.595816184788)*x[1]
-        arg[0,3]=(0.378518095375)*x[0]**o+(-0.880144120304)*x[0]+(0.814409656431)*x[1]**o+(0.0464425920173)*x[1]
-        arg[0,4]=(-0.24431693596)*x[0]**o+(-0.840538735294)*x[0]+(0.0157782225732)*x[1]**o+(0.951311376091)*x[1]
-        arg[1,0]=(0.0710042795971)*x[0]**o+(0.936106708209)*x[0]+(-0.580035969982)*x[1]**o+(0.740790378647)*x[1]
-        arg[1,1]=(-0.807938035414)*x[0]**o+(0.8723236137)*x[0]+(-0.600615307712)*x[1]**o+(0.71483191921)*x[1]
-        arg[1,2]=(0.454239081542)*x[0]**o+(0.966475397079)*x[0]+(-0.184649384525)*x[1]**o+(0.417686859721)*x[1]
-        arg[1,3]=(-0.394999073966)*x[0]**o+(-0.0445825855756)*x[0]+(0.0389091203001)*x[1]**o+(-0.265569544304)*x[1]
-        arg[1,4]=(0.625419856529)*x[0]**o+(-0.297955079048)*x[0]+(0.0092181343855)*x[1]**o+(-0.423768484981)*x[1]
-        arg[2,0]=(0.836466109456)*x[0]**o+(-0.12515777587)*x[0]+(-0.0908815675065)*x[1]**o+(0.825332480799)*x[1]
-        arg[2,1]=(-0.454612353892)*x[0]**o+(0.952942366642)*x[0]+(0.538638303761)*x[1]**o+(0.377957206795)*x[1]
-        arg[2,2]=(-0.229405757447)*x[0]**o+(-0.125249012236)*x[0]+(0.194040765277)*x[1]**o+(-0.77353897054)*x[1]
-        arg[2,3]=(-0.220514078279)*x[0]**o+(-0.937043129926)*x[0]+(0.661270617907)*x[1]**o+(0.342981486241)*x[1]
-        arg[2,4]=(0.58858161977)*x[0]**o+(0.324813259161)*x[0]+(0.00439371077545)*x[1]**o+(0.517353738278)*x[1]
-        arg[3,0]=(0.130001725331)*x[0]**o+(0.512570729718)*x[0]+(0.971292679928)*x[1]**o+(0.302530140373)*x[1]
-        arg[3,1]=(0.999138842976)*x[0]**o+(0.325794749172)*x[0]+(0.94900982582)*x[1]**o+(0.56933825455)*x[1]
-        arg[3,2]=(0.965201839092)*x[0]**o+(0.434187660328)*x[0]+(0.842238794411)*x[1]**o+(-0.754540335284)*x[1]
-        arg[3,3]=(-0.539162954093)*x[0]**o+(-0.373779084363)*x[0]+(-0.426189858865)*x[1]**o+(-0.812351658629)*x[1]
-        arg[3,4]=(0.871516777541)*x[0]**o+(-0.357393696308)*x[0]+(0.267358318776)*x[1]**o+(0.796701523616)*x[1]
-        ref[0,0]=(-0.631349529615)*x_ref[0]**o+(0.79216890406)*x_ref[0]+(0.835421397222)*x_ref[1]**o+(-0.209368192458)*x_ref[1]
-        ref[0,1]=(-0.166321945093)*x_ref[0]**o+(0.701821475941)*x_ref[0]+(-0.141804772049)*x_ref[1]**o+(-0.860056917696)*x_ref[1]
-        ref[0,2]=(0.761659971379)*x_ref[0]**o+(-0.39989119778)*x_ref[0]+(-0.761140588562)*x_ref[1]**o+(-0.595816184788)*x_ref[1]
-        ref[0,3]=(0.378518095375)*x_ref[0]**o+(-0.880144120304)*x_ref[0]+(0.814409656431)*x_ref[1]**o+(0.0464425920173)*x_ref[1]
-        ref[0,4]=(-0.24431693596)*x_ref[0]**o+(-0.840538735294)*x_ref[0]+(0.0157782225732)*x_ref[1]**o+(0.951311376091)*x_ref[1]
-        ref[1,0]=(0.0710042795971)*x_ref[0]**o+(0.936106708209)*x_ref[0]+(-0.580035969982)*x_ref[1]**o+(0.740790378647)*x_ref[1]
-        ref[1,1]=(-0.807938035414)*x_ref[0]**o+(0.8723236137)*x_ref[0]+(-0.600615307712)*x_ref[1]**o+(0.71483191921)*x_ref[1]
-        ref[1,2]=(0.454239081542)*x_ref[0]**o+(0.966475397079)*x_ref[0]+(-0.184649384525)*x_ref[1]**o+(0.417686859721)*x_ref[1]
-        ref[1,3]=(-0.394999073966)*x_ref[0]**o+(-0.0445825855756)*x_ref[0]+(0.0389091203001)*x_ref[1]**o+(-0.265569544304)*x_ref[1]
-        ref[1,4]=(0.625419856529)*x_ref[0]**o+(-0.297955079048)*x_ref[0]+(0.0092181343855)*x_ref[1]**o+(-0.423768484981)*x_ref[1]
-        ref[2,0]=(0.836466109456)*x_ref[0]**o+(-0.12515777587)*x_ref[0]+(-0.0908815675065)*x_ref[1]**o+(0.825332480799)*x_ref[1]
-        ref[2,1]=(-0.454612353892)*x_ref[0]**o+(0.952942366642)*x_ref[0]+(0.538638303761)*x_ref[1]**o+(0.377957206795)*x_ref[1]
-        ref[2,2]=(-0.229405757447)*x_ref[0]**o+(-0.125249012236)*x_ref[0]+(0.194040765277)*x_ref[1]**o+(-0.77353897054)*x_ref[1]
-        ref[2,3]=(-0.220514078279)*x_ref[0]**o+(-0.937043129926)*x_ref[0]+(0.661270617907)*x_ref[1]**o+(0.342981486241)*x_ref[1]
-        ref[2,4]=(0.58858161977)*x_ref[0]**o+(0.324813259161)*x_ref[0]+(0.00439371077545)*x_ref[1]**o+(0.517353738278)*x_ref[1]
-        ref[3,0]=(0.130001725331)*x_ref[0]**o+(0.512570729718)*x_ref[0]+(0.971292679928)*x_ref[1]**o+(0.302530140373)*x_ref[1]
-        ref[3,1]=(0.999138842976)*x_ref[0]**o+(0.325794749172)*x_ref[0]+(0.94900982582)*x_ref[1]**o+(0.56933825455)*x_ref[1]
-        ref[3,2]=(0.965201839092)*x_ref[0]**o+(0.434187660328)*x_ref[0]+(0.842238794411)*x_ref[1]**o+(-0.754540335284)*x_ref[1]
-        ref[3,3]=(-0.539162954093)*x_ref[0]**o+(-0.373779084363)*x_ref[0]+(-0.426189858865)*x_ref[1]**o+(-0.812351658629)*x_ref[1]
-        ref[3,4]=(0.871516777541)*x_ref[0]**o+(-0.357393696308)*x_ref[0]+(0.267358318776)*x_ref[1]**o+(0.796701523616)*x_ref[1]
-      else:
-        arg[0,0]=(-0.811142944724)*x[0]**o+(-0.65659407492)*x[0]+(-0.534808740191)*x[1]**o+(0.602252100451)*x[1]+(-0.158845636056)*x[2]**o+(-0.781826300399)*x[2]
-        arg[0,1]=(-0.396870942248)*x[0]**o+(0.285698519063)*x[0]+(-0.962418369859)*x[1]**o+(-0.729381989807)*x[1]+(-0.0500038851534)*x[2]**o+(-0.567828852526)*x[2]
-        arg[0,2]=(0.346399694372)*x[0]**o+(-0.170517233373)*x[0]+(-0.443275920724)*x[1]**o+(0.581464075295)*x[1]+(0.197230389253)*x[2]**o+(-0.613092248913)*x[2]
-        arg[0,3]=(0.920174147113)*x[0]**o+(0.429847401539)*x[0]+(0.112888577662)*x[1]**o+(-0.0540034503714)*x[1]+(-0.0323244631044)*x[2]**o+(-0.293609544741)*x[2]
-        arg[0,4]=(-0.0177585560206)*x[0]**o+(-0.806033755558)*x[0]+(-0.363921399918)*x[1]**o+(-0.415721267967)*x[1]+(0.832302676307)*x[2]**o+(-0.102510351741)*x[2]
-        arg[1,0]=(-0.769760277763)*x[0]**o+(0.818187369213)*x[0]+(0.454400795864)*x[1]**o+(-0.220119708184)*x[1]+(-0.637117949075)*x[2]**o+(-0.661398404641)*x[2]
-        arg[1,1]=(0.828424952723)*x[0]**o+(0.677022266764)*x[0]+(-0.958176510992)*x[1]**o+(-0.732014776269)*x[1]+(-0.495308153354)*x[2]**o+(-0.30698327016)*x[2]
-        arg[1,2]=(-0.454106379068)*x[0]**o+(0.686920350455)*x[0]+(0.560344054206)*x[1]**o+(0.355495451775)*x[1]+(0.256969568039)*x[2]**o+(-0.737279585211)*x[2]
-        arg[1,3]=(-0.976488579746)*x[0]**o+(-0.652812816758)*x[0]+(-0.996243459964)*x[1]**o+(0.631565668939)*x[1]+(0.996259991179)*x[2]**o+(-0.796610599165)*x[2]
-        arg[1,4]=(0.676024716135)*x[0]**o+(-0.179835226483)*x[0]+(0.497541872254)*x[1]**o+(-0.678345104068)*x[1]+(0.945491022682)*x[2]**o+(-0.358403760669)*x[2]
-        arg[2,0]=(0.166901676041)*x[0]**o+(0.833434173485)*x[0]+(0.622153751777)*x[1]**o+(0.767679765059)*x[1]+(-0.82271335395)*x[2]**o+(0.667651471482)*x[2]
-        arg[2,1]=(-0.405015366041)*x[0]**o+(0.0548291583154)*x[0]+(0.894878845805)*x[1]**o+(-0.0955982667798)*x[1]+(0.468927799304)*x[2]**o+(0.547421481564)*x[2]
-        arg[2,2]=(0.893319250823)*x[0]**o+(0.771073524295)*x[0]+(0.993876715991)*x[1]**o+(0.0832975372419)*x[1]+(-0.717061635157)*x[2]**o+(0.303760934227)*x[2]
-        arg[2,3]=(0.247006018272)*x[0]**o+(0.329618310414)*x[0]+(-0.824176211089)*x[1]**o+(-0.678238702323)*x[1]+(0.218736302876)*x[2]**o+(0.8652063227)*x[2]
-        arg[2,4]=(0.502380810223)*x[0]**o+(-0.94917091185)*x[0]+(-0.0392659831743)*x[1]**o+(-0.308291910503)*x[1]+(-0.498112428439)*x[2]**o+(0.217915791465)*x[2]
-        arg[3,0]=(-0.018497051159)*x[0]**o+(-0.543005709743)*x[0]+(-0.433773552307)*x[1]**o+(-0.604850191015)*x[1]+(0.285970270117)*x[2]**o+(0.150938308283)*x[2]
-        arg[3,1]=(0.185537796564)*x[0]**o+(0.663947686119)*x[0]+(-0.846597672873)*x[1]**o+(-0.798399069258)*x[1]+(0.0215106260597)*x[2]**o+(-0.388760513164)*x[2]
-        arg[3,2]=(-0.378320218313)*x[0]**o+(-0.385079307834)*x[0]+(-0.392389046498)*x[1]**o+(0.323305501943)*x[1]+(0.496285813211)*x[2]**o+(-0.0269835921214)*x[2]
-        arg[3,3]=(0.779877220393)*x[0]**o+(0.968536241033)*x[0]+(0.786166009582)*x[1]**o+(-0.974838905578)*x[1]+(0.4579382269)*x[2]**o+(0.178464213473)*x[2]
-        arg[3,4]=(-0.149895758057)*x[0]**o+(0.3529889311)*x[0]+(0.223924981441)*x[1]**o+(0.10143440581)*x[1]+(0.162222746832)*x[2]**o+(0.421433640986)*x[2]
-        ref[0,0]=(-0.811142944724)*x_ref[0]**o+(-0.65659407492)*x_ref[0]+(-0.534808740191)*x_ref[1]**o+(0.602252100451)*x_ref[1]+(-0.158845636056)*x_ref[2]**o+(-0.781826300399)*x_ref[2]
-        ref[0,1]=(-0.396870942248)*x_ref[0]**o+(0.285698519063)*x_ref[0]+(-0.962418369859)*x_ref[1]**o+(-0.729381989807)*x_ref[1]+(-0.0500038851534)*x_ref[2]**o+(-0.567828852526)*x_ref[2]
-        ref[0,2]=(0.346399694372)*x_ref[0]**o+(-0.170517233373)*x_ref[0]+(-0.443275920724)*x_ref[1]**o+(0.581464075295)*x_ref[1]+(0.197230389253)*x_ref[2]**o+(-0.613092248913)*x_ref[2]
-        ref[0,3]=(0.920174147113)*x_ref[0]**o+(0.429847401539)*x_ref[0]+(0.112888577662)*x_ref[1]**o+(-0.0540034503714)*x_ref[1]+(-0.0323244631044)*x_ref[2]**o+(-0.293609544741)*x_ref[2]
-        ref[0,4]=(-0.0177585560206)*x_ref[0]**o+(-0.806033755558)*x_ref[0]+(-0.363921399918)*x_ref[1]**o+(-0.415721267967)*x_ref[1]+(0.832302676307)*x_ref[2]**o+(-0.102510351741)*x_ref[2]
-        ref[1,0]=(-0.769760277763)*x_ref[0]**o+(0.818187369213)*x_ref[0]+(0.454400795864)*x_ref[1]**o+(-0.220119708184)*x_ref[1]+(-0.637117949075)*x_ref[2]**o+(-0.661398404641)*x_ref[2]
-        ref[1,1]=(0.828424952723)*x_ref[0]**o+(0.677022266764)*x_ref[0]+(-0.958176510992)*x_ref[1]**o+(-0.732014776269)*x_ref[1]+(-0.495308153354)*x_ref[2]**o+(-0.30698327016)*x_ref[2]
-        ref[1,2]=(-0.454106379068)*x_ref[0]**o+(0.686920350455)*x_ref[0]+(0.560344054206)*x_ref[1]**o+(0.355495451775)*x_ref[1]+(0.256969568039)*x_ref[2]**o+(-0.737279585211)*x_ref[2]
-        ref[1,3]=(-0.976488579746)*x_ref[0]**o+(-0.652812816758)*x_ref[0]+(-0.996243459964)*x_ref[1]**o+(0.631565668939)*x_ref[1]+(0.996259991179)*x_ref[2]**o+(-0.796610599165)*x_ref[2]
-        ref[1,4]=(0.676024716135)*x_ref[0]**o+(-0.179835226483)*x_ref[0]+(0.497541872254)*x_ref[1]**o+(-0.678345104068)*x_ref[1]+(0.945491022682)*x_ref[2]**o+(-0.358403760669)*x_ref[2]
-        ref[2,0]=(0.166901676041)*x_ref[0]**o+(0.833434173485)*x_ref[0]+(0.622153751777)*x_ref[1]**o+(0.767679765059)*x_ref[1]+(-0.82271335395)*x_ref[2]**o+(0.667651471482)*x_ref[2]
-        ref[2,1]=(-0.405015366041)*x_ref[0]**o+(0.0548291583154)*x_ref[0]+(0.894878845805)*x_ref[1]**o+(-0.0955982667798)*x_ref[1]+(0.468927799304)*x_ref[2]**o+(0.547421481564)*x_ref[2]
-        ref[2,2]=(0.893319250823)*x_ref[0]**o+(0.771073524295)*x_ref[0]+(0.993876715991)*x_ref[1]**o+(0.0832975372419)*x_ref[1]+(-0.717061635157)*x_ref[2]**o+(0.303760934227)*x_ref[2]
-        ref[2,3]=(0.247006018272)*x_ref[0]**o+(0.329618310414)*x_ref[0]+(-0.824176211089)*x_ref[1]**o+(-0.678238702323)*x_ref[1]+(0.218736302876)*x_ref[2]**o+(0.8652063227)*x_ref[2]
-        ref[2,4]=(0.502380810223)*x_ref[0]**o+(-0.94917091185)*x_ref[0]+(-0.0392659831743)*x_ref[1]**o+(-0.308291910503)*x_ref[1]+(-0.498112428439)*x_ref[2]**o+(0.217915791465)*x_ref[2]
-        ref[3,0]=(-0.018497051159)*x_ref[0]**o+(-0.543005709743)*x_ref[0]+(-0.433773552307)*x_ref[1]**o+(-0.604850191015)*x_ref[1]+(0.285970270117)*x_ref[2]**o+(0.150938308283)*x_ref[2]
-        ref[3,1]=(0.185537796564)*x_ref[0]**o+(0.663947686119)*x_ref[0]+(-0.846597672873)*x_ref[1]**o+(-0.798399069258)*x_ref[1]+(0.0215106260597)*x_ref[2]**o+(-0.388760513164)*x_ref[2]
-        ref[3,2]=(-0.378320218313)*x_ref[0]**o+(-0.385079307834)*x_ref[0]+(-0.392389046498)*x_ref[1]**o+(0.323305501943)*x_ref[1]+(0.496285813211)*x_ref[2]**o+(-0.0269835921214)*x_ref[2]
-        ref[3,3]=(0.779877220393)*x_ref[0]**o+(0.968536241033)*x_ref[0]+(0.786166009582)*x_ref[1]**o+(-0.974838905578)*x_ref[1]+(0.4579382269)*x_ref[2]**o+(0.178464213473)*x_ref[2]
-        ref[3,4]=(-0.149895758057)*x_ref[0]**o+(0.3529889311)*x_ref[0]+(0.223924981441)*x_ref[1]**o+(0.10143440581)*x_ref[1]+(0.162222746832)*x_ref[2]**o+(0.421433640986)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Solution onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.232971584272)*x[0]**o+(0.391351964909)*x[0]+(-0.832254448983)*x[1]**o+(0.880762034713)*x[1]
-        arg[0,0,1]=(0.473097471101)*x[0]**o+(-0.660862772376)*x[0]+(0.72974853865)*x[1]**o+(-0.328183435687)*x[1]
-        arg[0,1,0]=(-0.749483736482)*x[0]**o+(0.0872454020187)*x[0]+(0.6916024322)*x[1]**o+(0.82757019273)*x[1]
-        arg[0,1,1]=(-0.325601366346)*x[0]**o+(0.918246327277)*x[0]+(0.855963838252)*x[1]**o+(0.448567464706)*x[1]
-        arg[1,0,0]=(-0.6642143628)*x[0]**o+(-0.82649833447)*x[0]+(0.822778465465)*x[1]**o+(-0.926669226842)*x[1]
-        arg[1,0,1]=(-0.644490899373)*x[0]**o+(0.0644054772987)*x[0]+(-0.914922609343)*x[1]**o+(0.898880463842)*x[1]
-        arg[1,1,0]=(0.40963096867)*x[0]**o+(-0.347418076162)*x[0]+(0.857966073118)*x[1]**o+(-0.284521442085)*x[1]
-        arg[1,1,1]=(-0.00998062171478)*x[0]**o+(-0.234122404174)*x[0]+(-0.149500951208)*x[1]**o+(0.680038328937)*x[1]
-        arg[2,0,0]=(-0.963777985833)*x[0]**o+(0.710727608341)*x[0]+(-0.646898391724)*x[1]**o+(-0.464095155503)*x[1]
-        arg[2,0,1]=(-0.617670394851)*x[0]**o+(0.592337321587)*x[0]+(-0.0881426217074)*x[1]**o+(-0.00431912882662)*x[1]
-        arg[2,1,0]=(0.871279828121)*x[0]**o+(-0.858267190204)*x[0]+(0.440863109038)*x[1]**o+(-0.912521398099)*x[1]
-        arg[2,1,1]=(0.17802472174)*x[0]**o+(0.948587960042)*x[0]+(-0.837945850976)*x[1]**o+(0.13308730872)*x[1]
-        arg[3,0,0]=(0.0482409149433)*x[0]**o+(-0.198100088194)*x[0]+(0.504789334224)*x[1]**o+(0.296276808608)*x[1]
-        arg[3,0,1]=(-0.30515363985)*x[0]**o+(-0.355293167256)*x[0]+(-0.577592997685)*x[1]**o+(-0.882408725943)*x[1]
-        arg[3,1,0]=(0.76102937294)*x[0]**o+(-0.210169673144)*x[0]+(-0.181755140891)*x[1]**o+(0.865448484187)*x[1]
-        arg[3,1,1]=(-0.894294091863)*x[0]**o+(-0.712245666103)*x[0]+(0.151657455329)*x[1]**o+(-0.54019436763)*x[1]
-        arg[4,0,0]=(0.860662861318)*x[0]**o+(-0.36787473166)*x[0]+(0.240406823985)*x[1]**o+(-0.381822992473)*x[1]
-        arg[4,0,1]=(-0.109197125112)*x[0]**o+(0.962595232385)*x[0]+(-0.323876506847)*x[1]**o+(0.178613363564)*x[1]
-        arg[4,1,0]=(0.486980313424)*x[0]**o+(-0.611294566285)*x[0]+(-0.774813150316)*x[1]**o+(0.335411840405)*x[1]
-        arg[4,1,1]=(-0.622163740867)*x[0]**o+(0.426305234663)*x[0]+(0.243557551101)*x[1]**o+(0.930601340004)*x[1]
-        arg[5,0,0]=(-0.232795962027)*x[0]**o+(0.49010767268)*x[0]+(-0.503693305594)*x[1]**o+(-0.915931668186)*x[1]
-        arg[5,0,1]=(-0.304614759138)*x[0]**o+(0.797445765321)*x[0]+(-0.00820825778888)*x[1]**o+(-0.196762463972)*x[1]
-        arg[5,1,0]=(-0.516700339456)*x[0]**o+(-0.440953905414)*x[0]+(0.875266018165)*x[1]**o+(0.780895354543)*x[1]
-        arg[5,1,1]=(0.219827931399)*x[0]**o+(-0.950514094131)*x[0]+(-0.120763970425)*x[1]**o+(0.0941571726596)*x[1]
-        ref[0,0,0]=(-0.232971584272)*x_ref[0]**o+(0.391351964909)*x_ref[0]+(-0.832254448983)*x_ref[1]**o+(0.880762034713)*x_ref[1]
-        ref[0,0,1]=(0.473097471101)*x_ref[0]**o+(-0.660862772376)*x_ref[0]+(0.72974853865)*x_ref[1]**o+(-0.328183435687)*x_ref[1]
-        ref[0,1,0]=(-0.749483736482)*x_ref[0]**o+(0.0872454020187)*x_ref[0]+(0.6916024322)*x_ref[1]**o+(0.82757019273)*x_ref[1]
-        ref[0,1,1]=(-0.325601366346)*x_ref[0]**o+(0.918246327277)*x_ref[0]+(0.855963838252)*x_ref[1]**o+(0.448567464706)*x_ref[1]
-        ref[1,0,0]=(-0.6642143628)*x_ref[0]**o+(-0.82649833447)*x_ref[0]+(0.822778465465)*x_ref[1]**o+(-0.926669226842)*x_ref[1]
-        ref[1,0,1]=(-0.644490899373)*x_ref[0]**o+(0.0644054772987)*x_ref[0]+(-0.914922609343)*x_ref[1]**o+(0.898880463842)*x_ref[1]
-        ref[1,1,0]=(0.40963096867)*x_ref[0]**o+(-0.347418076162)*x_ref[0]+(0.857966073118)*x_ref[1]**o+(-0.284521442085)*x_ref[1]
-        ref[1,1,1]=(-0.00998062171478)*x_ref[0]**o+(-0.234122404174)*x_ref[0]+(-0.149500951208)*x_ref[1]**o+(0.680038328937)*x_ref[1]
-        ref[2,0,0]=(-0.963777985833)*x_ref[0]**o+(0.710727608341)*x_ref[0]+(-0.646898391724)*x_ref[1]**o+(-0.464095155503)*x_ref[1]
-        ref[2,0,1]=(-0.617670394851)*x_ref[0]**o+(0.592337321587)*x_ref[0]+(-0.0881426217074)*x_ref[1]**o+(-0.00431912882662)*x_ref[1]
-        ref[2,1,0]=(0.871279828121)*x_ref[0]**o+(-0.858267190204)*x_ref[0]+(0.440863109038)*x_ref[1]**o+(-0.912521398099)*x_ref[1]
-        ref[2,1,1]=(0.17802472174)*x_ref[0]**o+(0.948587960042)*x_ref[0]+(-0.837945850976)*x_ref[1]**o+(0.13308730872)*x_ref[1]
-        ref[3,0,0]=(0.0482409149433)*x_ref[0]**o+(-0.198100088194)*x_ref[0]+(0.504789334224)*x_ref[1]**o+(0.296276808608)*x_ref[1]
-        ref[3,0,1]=(-0.30515363985)*x_ref[0]**o+(-0.355293167256)*x_ref[0]+(-0.577592997685)*x_ref[1]**o+(-0.882408725943)*x_ref[1]
-        ref[3,1,0]=(0.76102937294)*x_ref[0]**o+(-0.210169673144)*x_ref[0]+(-0.181755140891)*x_ref[1]**o+(0.865448484187)*x_ref[1]
-        ref[3,1,1]=(-0.894294091863)*x_ref[0]**o+(-0.712245666103)*x_ref[0]+(0.151657455329)*x_ref[1]**o+(-0.54019436763)*x_ref[1]
-        ref[4,0,0]=(0.860662861318)*x_ref[0]**o+(-0.36787473166)*x_ref[0]+(0.240406823985)*x_ref[1]**o+(-0.381822992473)*x_ref[1]
-        ref[4,0,1]=(-0.109197125112)*x_ref[0]**o+(0.962595232385)*x_ref[0]+(-0.323876506847)*x_ref[1]**o+(0.178613363564)*x_ref[1]
-        ref[4,1,0]=(0.486980313424)*x_ref[0]**o+(-0.611294566285)*x_ref[0]+(-0.774813150316)*x_ref[1]**o+(0.335411840405)*x_ref[1]
-        ref[4,1,1]=(-0.622163740867)*x_ref[0]**o+(0.426305234663)*x_ref[0]+(0.243557551101)*x_ref[1]**o+(0.930601340004)*x_ref[1]
-        ref[5,0,0]=(-0.232795962027)*x_ref[0]**o+(0.49010767268)*x_ref[0]+(-0.503693305594)*x_ref[1]**o+(-0.915931668186)*x_ref[1]
-        ref[5,0,1]=(-0.304614759138)*x_ref[0]**o+(0.797445765321)*x_ref[0]+(-0.00820825778888)*x_ref[1]**o+(-0.196762463972)*x_ref[1]
-        ref[5,1,0]=(-0.516700339456)*x_ref[0]**o+(-0.440953905414)*x_ref[0]+(0.875266018165)*x_ref[1]**o+(0.780895354543)*x_ref[1]
-        ref[5,1,1]=(0.219827931399)*x_ref[0]**o+(-0.950514094131)*x_ref[0]+(-0.120763970425)*x_ref[1]**o+(0.0941571726596)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.772105181243)*x[0]**o+(-0.548341656718)*x[0]+(0.358327458717)*x[1]**o+(0.07838537297)*x[1]+(-0.221432264133)*x[2]**o+(-0.0831433214109)*x[2]
-        arg[0,0,1]=(-0.920280406855)*x[0]**o+(0.288008584982)*x[0]+(0.273175197348)*x[1]**o+(0.71005891586)*x[1]+(-0.372322860924)*x[2]**o+(0.801820758328)*x[2]
-        arg[0,1,0]=(0.610498050037)*x[0]**o+(-0.539393441621)*x[0]+(0.587033652815)*x[1]**o+(0.237738229824)*x[1]+(-0.79411765083)*x[2]**o+(-0.519989054973)*x[2]
-        arg[0,1,1]=(0.5412774887)*x[0]**o+(-0.851503637634)*x[0]+(-0.71956793056)*x[1]**o+(0.166039550456)*x[1]+(-0.274290267921)*x[2]**o+(-0.909146653718)*x[2]
-        arg[1,0,0]=(-0.00458109759775)*x[0]**o+(0.487263914082)*x[0]+(0.0171216930245)*x[1]**o+(0.691063106679)*x[1]+(-0.96202326744)*x[2]**o+(0.361419732405)*x[2]
-        arg[1,0,1]=(-0.784311451677)*x[0]**o+(-0.862560770078)*x[0]+(-0.0702620499924)*x[1]**o+(0.183400389223)*x[1]+(0.364905596839)*x[2]**o+(0.874230430841)*x[2]
-        arg[1,1,0]=(0.315952660065)*x[0]**o+(-0.0168150653709)*x[0]+(0.372807793658)*x[1]**o+(0.350959428104)*x[1]+(0.292074907124)*x[2]**o+(0.38176271099)*x[2]
-        arg[1,1,1]=(-0.941288490366)*x[0]**o+(0.159864446187)*x[0]+(0.616516779388)*x[1]**o+(0.0940731931915)*x[1]+(-0.966416702566)*x[2]**o+(-0.716669694143)*x[2]
-        arg[2,0,0]=(0.308619329706)*x[0]**o+(0.68203622136)*x[0]+(-0.732163723834)*x[1]**o+(-0.222214324226)*x[1]+(0.89540478356)*x[2]**o+(-0.0648727721753)*x[2]
-        arg[2,0,1]=(-0.829002921476)*x[0]**o+(0.274738860807)*x[0]+(0.944302912883)*x[1]**o+(0.67434413206)*x[1]+(-0.861085567199)*x[2]**o+(0.994494977369)*x[2]
-        arg[2,1,0]=(-0.871499634896)*x[0]**o+(-0.716060125296)*x[0]+(-0.655428500508)*x[1]**o+(-0.478135345667)*x[1]+(-0.858927907345)*x[2]**o+(0.718884168928)*x[2]
-        arg[2,1,1]=(0.843612813106)*x[0]**o+(-0.221966655825)*x[0]+(-0.0770757351)*x[1]**o+(-0.678171902341)*x[1]+(0.814209490483)*x[2]**o+(0.409183122676)*x[2]
-        arg[3,0,0]=(-0.226810706884)*x[0]**o+(-0.167181963701)*x[0]+(0.810478050432)*x[1]**o+(-0.335099187817)*x[1]+(0.210621363393)*x[2]**o+(0.429297116788)*x[2]
-        arg[3,0,1]=(0.597117204298)*x[0]**o+(-0.000147371125322)*x[0]+(-0.557842700291)*x[1]**o+(0.329529225331)*x[1]+(-0.208265244071)*x[2]**o+(-0.977698555357)*x[2]
-        arg[3,1,0]=(-0.163068070947)*x[0]**o+(0.640075503516)*x[0]+(0.425653990651)*x[1]**o+(0.650655294789)*x[1]+(-0.342488862403)*x[2]**o+(0.227438788286)*x[2]
-        arg[3,1,1]=(-0.511981920097)*x[0]**o+(-0.18099315756)*x[0]+(-0.969881140182)*x[1]**o+(-0.418742703662)*x[1]+(-0.271422367765)*x[2]**o+(0.0812058381877)*x[2]
-        arg[4,0,0]=(0.569514749505)*x[0]**o+(-0.711561480184)*x[0]+(-0.587159226794)*x[1]**o+(-0.240459786489)*x[1]+(-0.380983629494)*x[2]**o+(-0.550385464258)*x[2]
-        arg[4,0,1]=(0.257375332759)*x[0]**o+(-0.477083226492)*x[0]+(0.0180233249756)*x[1]**o+(0.612470082967)*x[1]+(0.99566078545)*x[2]**o+(-0.551544637583)*x[2]
-        arg[4,1,0]=(0.702787194057)*x[0]**o+(0.922262573534)*x[0]+(-0.465910368685)*x[1]**o+(0.748743004032)*x[1]+(0.642852066952)*x[2]**o+(0.24283802317)*x[2]
-        arg[4,1,1]=(0.745762578199)*x[0]**o+(0.240631495429)*x[0]+(0.413077167171)*x[1]**o+(0.692304442104)*x[1]+(0.150058687546)*x[2]**o+(-0.133413399526)*x[2]
-        arg[5,0,0]=(0.0244935245274)*x[0]**o+(-0.866653903557)*x[0]+(-0.682252235104)*x[1]**o+(-0.525092961647)*x[1]+(-0.87552740837)*x[2]**o+(-0.780785295196)*x[2]
-        arg[5,0,1]=(0.403317147145)*x[0]**o+(-0.846638525869)*x[0]+(-0.798622632135)*x[1]**o+(-0.199698251819)*x[1]+(-0.852399643056)*x[2]**o+(-0.0618243339514)*x[2]
-        arg[5,1,0]=(-0.94578445284)*x[0]**o+(-0.715570943968)*x[0]+(-0.193533970382)*x[1]**o+(0.0325400011289)*x[1]+(0.137922635356)*x[2]**o+(0.0192967461384)*x[2]
-        arg[5,1,1]=(-0.706542583366)*x[0]**o+(0.412536423598)*x[0]+(-0.27322227526)*x[1]**o+(0.339116123776)*x[1]+(-0.856871339939)*x[2]**o+(0.140603890427)*x[2]
-        ref[0,0,0]=(0.772105181243)*x_ref[0]**o+(-0.548341656718)*x_ref[0]+(0.358327458717)*x_ref[1]**o+(0.07838537297)*x_ref[1]+(-0.221432264133)*x_ref[2]**o+(-0.0831433214109)*x_ref[2]
-        ref[0,0,1]=(-0.920280406855)*x_ref[0]**o+(0.288008584982)*x_ref[0]+(0.273175197348)*x_ref[1]**o+(0.71005891586)*x_ref[1]+(-0.372322860924)*x_ref[2]**o+(0.801820758328)*x_ref[2]
-        ref[0,1,0]=(0.610498050037)*x_ref[0]**o+(-0.539393441621)*x_ref[0]+(0.587033652815)*x_ref[1]**o+(0.237738229824)*x_ref[1]+(-0.79411765083)*x_ref[2]**o+(-0.519989054973)*x_ref[2]
-        ref[0,1,1]=(0.5412774887)*x_ref[0]**o+(-0.851503637634)*x_ref[0]+(-0.71956793056)*x_ref[1]**o+(0.166039550456)*x_ref[1]+(-0.274290267921)*x_ref[2]**o+(-0.909146653718)*x_ref[2]
-        ref[1,0,0]=(-0.00458109759775)*x_ref[0]**o+(0.487263914082)*x_ref[0]+(0.0171216930245)*x_ref[1]**o+(0.691063106679)*x_ref[1]+(-0.96202326744)*x_ref[2]**o+(0.361419732405)*x_ref[2]
-        ref[1,0,1]=(-0.784311451677)*x_ref[0]**o+(-0.862560770078)*x_ref[0]+(-0.0702620499924)*x_ref[1]**o+(0.183400389223)*x_ref[1]+(0.364905596839)*x_ref[2]**o+(0.874230430841)*x_ref[2]
-        ref[1,1,0]=(0.315952660065)*x_ref[0]**o+(-0.0168150653709)*x_ref[0]+(0.372807793658)*x_ref[1]**o+(0.350959428104)*x_ref[1]+(0.292074907124)*x_ref[2]**o+(0.38176271099)*x_ref[2]
-        ref[1,1,1]=(-0.941288490366)*x_ref[0]**o+(0.159864446187)*x_ref[0]+(0.616516779388)*x_ref[1]**o+(0.0940731931915)*x_ref[1]+(-0.966416702566)*x_ref[2]**o+(-0.716669694143)*x_ref[2]
-        ref[2,0,0]=(0.308619329706)*x_ref[0]**o+(0.68203622136)*x_ref[0]+(-0.732163723834)*x_ref[1]**o+(-0.222214324226)*x_ref[1]+(0.89540478356)*x_ref[2]**o+(-0.0648727721753)*x_ref[2]
-        ref[2,0,1]=(-0.829002921476)*x_ref[0]**o+(0.274738860807)*x_ref[0]+(0.944302912883)*x_ref[1]**o+(0.67434413206)*x_ref[1]+(-0.861085567199)*x_ref[2]**o+(0.994494977369)*x_ref[2]
-        ref[2,1,0]=(-0.871499634896)*x_ref[0]**o+(-0.716060125296)*x_ref[0]+(-0.655428500508)*x_ref[1]**o+(-0.478135345667)*x_ref[1]+(-0.858927907345)*x_ref[2]**o+(0.718884168928)*x_ref[2]
-        ref[2,1,1]=(0.843612813106)*x_ref[0]**o+(-0.221966655825)*x_ref[0]+(-0.0770757351)*x_ref[1]**o+(-0.678171902341)*x_ref[1]+(0.814209490483)*x_ref[2]**o+(0.409183122676)*x_ref[2]
-        ref[3,0,0]=(-0.226810706884)*x_ref[0]**o+(-0.167181963701)*x_ref[0]+(0.810478050432)*x_ref[1]**o+(-0.335099187817)*x_ref[1]+(0.210621363393)*x_ref[2]**o+(0.429297116788)*x_ref[2]
-        ref[3,0,1]=(0.597117204298)*x_ref[0]**o+(-0.000147371125322)*x_ref[0]+(-0.557842700291)*x_ref[1]**o+(0.329529225331)*x_ref[1]+(-0.208265244071)*x_ref[2]**o+(-0.977698555357)*x_ref[2]
-        ref[3,1,0]=(-0.163068070947)*x_ref[0]**o+(0.640075503516)*x_ref[0]+(0.425653990651)*x_ref[1]**o+(0.650655294789)*x_ref[1]+(-0.342488862403)*x_ref[2]**o+(0.227438788286)*x_ref[2]
-        ref[3,1,1]=(-0.511981920097)*x_ref[0]**o+(-0.18099315756)*x_ref[0]+(-0.969881140182)*x_ref[1]**o+(-0.418742703662)*x_ref[1]+(-0.271422367765)*x_ref[2]**o+(0.0812058381877)*x_ref[2]
-        ref[4,0,0]=(0.569514749505)*x_ref[0]**o+(-0.711561480184)*x_ref[0]+(-0.587159226794)*x_ref[1]**o+(-0.240459786489)*x_ref[1]+(-0.380983629494)*x_ref[2]**o+(-0.550385464258)*x_ref[2]
-        ref[4,0,1]=(0.257375332759)*x_ref[0]**o+(-0.477083226492)*x_ref[0]+(0.0180233249756)*x_ref[1]**o+(0.612470082967)*x_ref[1]+(0.99566078545)*x_ref[2]**o+(-0.551544637583)*x_ref[2]
-        ref[4,1,0]=(0.702787194057)*x_ref[0]**o+(0.922262573534)*x_ref[0]+(-0.465910368685)*x_ref[1]**o+(0.748743004032)*x_ref[1]+(0.642852066952)*x_ref[2]**o+(0.24283802317)*x_ref[2]
-        ref[4,1,1]=(0.745762578199)*x_ref[0]**o+(0.240631495429)*x_ref[0]+(0.413077167171)*x_ref[1]**o+(0.692304442104)*x_ref[1]+(0.150058687546)*x_ref[2]**o+(-0.133413399526)*x_ref[2]
-        ref[5,0,0]=(0.0244935245274)*x_ref[0]**o+(-0.866653903557)*x_ref[0]+(-0.682252235104)*x_ref[1]**o+(-0.525092961647)*x_ref[1]+(-0.87552740837)*x_ref[2]**o+(-0.780785295196)*x_ref[2]
-        ref[5,0,1]=(0.403317147145)*x_ref[0]**o+(-0.846638525869)*x_ref[0]+(-0.798622632135)*x_ref[1]**o+(-0.199698251819)*x_ref[1]+(-0.852399643056)*x_ref[2]**o+(-0.0618243339514)*x_ref[2]
-        ref[5,1,0]=(-0.94578445284)*x_ref[0]**o+(-0.715570943968)*x_ref[0]+(-0.193533970382)*x_ref[1]**o+(0.0325400011289)*x_ref[1]+(0.137922635356)*x_ref[2]**o+(0.0192967461384)*x_ref[2]
-        ref[5,1,1]=(-0.706542583366)*x_ref[0]**o+(0.412536423598)*x_ref[0]+(-0.27322227526)*x_ref[1]**o+(0.339116123776)*x_ref[1]+(-0.856871339939)*x_ref[2]**o+(0.140603890427)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Solution onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.0577426785287)*x[0]**o+(0.469845292021)*x[0]+(-0.641706722819)*x[1]**o+(0.129652001842)*x[1]
-        arg[0,0,0,1]=(-0.87686951076)*x[0]**o+(-0.981093040999)*x[0]+(0.654637319552)*x[1]**o+(-0.953104888811)*x[1]
-        arg[0,0,1,0]=(-0.486386436415)*x[0]**o+(0.91083470956)*x[0]+(-0.392432937401)*x[1]**o+(0.494919250884)*x[1]
-        arg[0,0,1,1]=(0.299928502076)*x[0]**o+(-0.0787848191157)*x[0]+(-0.541863592475)*x[1]**o+(0.435934816687)*x[1]
-        arg[0,0,2,0]=(-0.0500083438365)*x[0]**o+(-0.882581886623)*x[0]+(-0.965347357063)*x[1]**o+(-0.270254041774)*x[1]
-        arg[0,0,2,1]=(-0.18974861517)*x[0]**o+(0.341406736671)*x[0]+(0.847020774229)*x[1]**o+(0.650201215849)*x[1]
-        arg[0,1,0,0]=(0.0823017084719)*x[0]**o+(0.964585359235)*x[0]+(0.357658660436)*x[1]**o+(0.182585271812)*x[1]
-        arg[0,1,0,1]=(0.863411821905)*x[0]**o+(0.313374566426)*x[0]+(-0.273547644827)*x[1]**o+(0.429051854479)*x[1]
-        arg[0,1,1,0]=(0.167608645068)*x[0]**o+(0.926908094967)*x[0]+(-0.853415240465)*x[1]**o+(-0.376634525241)*x[1]
-        arg[0,1,1,1]=(-0.555491961591)*x[0]**o+(-0.64621137308)*x[0]+(-0.315877124991)*x[1]**o+(-0.962839286133)*x[1]
-        arg[0,1,2,0]=(0.909012065667)*x[0]**o+(-0.656739022976)*x[0]+(-0.458377773547)*x[1]**o+(0.394223574009)*x[1]
-        arg[0,1,2,1]=(-0.550560496714)*x[0]**o+(0.216941875936)*x[0]+(-0.634745794924)*x[1]**o+(0.887912543217)*x[1]
-        arg[0,2,0,0]=(-0.961535901493)*x[0]**o+(0.980336384835)*x[0]+(-0.151755000128)*x[1]**o+(0.0402841925797)*x[1]
-        arg[0,2,0,1]=(0.571527088727)*x[0]**o+(-0.475013184811)*x[0]+(0.80051818192)*x[1]**o+(-0.589499747694)*x[1]
-        arg[0,2,1,0]=(0.545840648612)*x[0]**o+(0.888313209612)*x[0]+(-0.568938733446)*x[1]**o+(-0.289030374342)*x[1]
-        arg[0,2,1,1]=(-0.0631638607979)*x[0]**o+(-0.173754439841)*x[0]+(0.143503554071)*x[1]**o+(-0.0850087835084)*x[1]
-        arg[0,2,2,0]=(0.316299661412)*x[0]**o+(0.260890197379)*x[0]+(-0.803519867776)*x[1]**o+(0.36434810185)*x[1]
-        arg[0,2,2,1]=(-0.656013716479)*x[0]**o+(0.810499942514)*x[0]+(0.783455480815)*x[1]**o+(-0.943085466999)*x[1]
-        arg[0,3,0,0]=(0.128153439722)*x[0]**o+(-0.404740042302)*x[0]+(0.785717360548)*x[1]**o+(-0.710818900841)*x[1]
-        arg[0,3,0,1]=(-0.097059274787)*x[0]**o+(0.578757823228)*x[0]+(0.186146155178)*x[1]**o+(0.274602030707)*x[1]
-        arg[0,3,1,0]=(0.00522392753954)*x[0]**o+(0.015773606982)*x[0]+(-0.327110065344)*x[1]**o+(0.15571120542)*x[1]
-        arg[0,3,1,1]=(-0.14009116305)*x[0]**o+(-0.659975337811)*x[0]+(-0.297582833489)*x[1]**o+(-0.600935015071)*x[1]
-        arg[0,3,2,0]=(0.749388604357)*x[0]**o+(0.762968650778)*x[0]+(-0.623477518339)*x[1]**o+(-0.931762943135)*x[1]
-        arg[0,3,2,1]=(0.748396100632)*x[0]**o+(-0.841314360401)*x[0]+(0.432649446216)*x[1]**o+(-0.971300843628)*x[1]
-        arg[0,4,0,0]=(-0.217249090357)*x[0]**o+(-0.833633675601)*x[0]+(0.169984305627)*x[1]**o+(-0.831738272666)*x[1]
-        arg[0,4,0,1]=(0.501571101669)*x[0]**o+(-0.223897334788)*x[0]+(0.24178181976)*x[1]**o+(0.307921789017)*x[1]
-        arg[0,4,1,0]=(-0.162064610564)*x[0]**o+(0.217669674603)*x[0]+(0.995517866562)*x[1]**o+(0.903061734589)*x[1]
-        arg[0,4,1,1]=(-0.837150436928)*x[0]**o+(0.465269468525)*x[0]+(0.522034182082)*x[1]**o+(-0.725469921625)*x[1]
-        arg[0,4,2,0]=(-0.295739906169)*x[0]**o+(0.961959220618)*x[0]+(0.577799918942)*x[1]**o+(-0.313255108148)*x[1]
-        arg[0,4,2,1]=(-0.455635927062)*x[0]**o+(0.667038701641)*x[0]+(-0.151183772961)*x[1]**o+(-0.550197828316)*x[1]
-        arg[1,0,0,0]=(0.585510684472)*x[0]**o+(-0.64754219493)*x[0]+(0.781495111863)*x[1]**o+(-0.792246214695)*x[1]
-        arg[1,0,0,1]=(0.586346471397)*x[0]**o+(0.291794158138)*x[0]+(-0.614723564286)*x[1]**o+(-0.151451723805)*x[1]
-        arg[1,0,1,0]=(-0.472877220222)*x[0]**o+(-0.0118252391089)*x[0]+(-0.596943135354)*x[1]**o+(-0.413992986066)*x[1]
-        arg[1,0,1,1]=(-0.715007718152)*x[0]**o+(0.032964784403)*x[0]+(-0.350680745946)*x[1]**o+(0.678841285054)*x[1]
-        arg[1,0,2,0]=(0.673910318085)*x[0]**o+(-0.15303471314)*x[0]+(-0.0889279944344)*x[1]**o+(-0.0356474498002)*x[1]
-        arg[1,0,2,1]=(-0.875691348779)*x[0]**o+(0.547300853671)*x[0]+(-0.362646169132)*x[1]**o+(-0.588521964671)*x[1]
-        arg[1,1,0,0]=(-0.0988912551145)*x[0]**o+(-0.710944394432)*x[0]+(0.153875249337)*x[1]**o+(0.274427434926)*x[1]
-        arg[1,1,0,1]=(-0.0854272185591)*x[0]**o+(-0.21840195791)*x[0]+(0.906982245924)*x[1]**o+(0.570990116211)*x[1]
-        arg[1,1,1,0]=(-0.851259116331)*x[0]**o+(0.309829955487)*x[0]+(0.115725082696)*x[1]**o+(-0.91590292189)*x[1]
-        arg[1,1,1,1]=(-0.637464462703)*x[0]**o+(-0.280971672162)*x[0]+(0.270985403603)*x[1]**o+(-0.534115311397)*x[1]
-        arg[1,1,2,0]=(0.670179973397)*x[0]**o+(0.847483793904)*x[0]+(0.0681088634526)*x[1]**o+(0.412176359729)*x[1]
-        arg[1,1,2,1]=(0.0378205172485)*x[0]**o+(0.974150495292)*x[0]+(-0.720821275299)*x[1]**o+(-0.552588296494)*x[1]
-        arg[1,2,0,0]=(0.151367609975)*x[0]**o+(0.832981586349)*x[0]+(0.419488381843)*x[1]**o+(0.561052438283)*x[1]
-        arg[1,2,0,1]=(0.267839010425)*x[0]**o+(0.47455974064)*x[0]+(0.498826652567)*x[1]**o+(-0.51906391205)*x[1]
-        arg[1,2,1,0]=(-0.350105107527)*x[0]**o+(-0.489326689724)*x[0]+(-0.156970199109)*x[1]**o+(-0.175565230472)*x[1]
-        arg[1,2,1,1]=(0.754379973459)*x[0]**o+(-0.70691373234)*x[0]+(-0.964497356137)*x[1]**o+(-0.694989442192)*x[1]
-        arg[1,2,2,0]=(-0.491090361655)*x[0]**o+(0.154379441501)*x[0]+(0.403809695039)*x[1]**o+(-0.084183660554)*x[1]
-        arg[1,2,2,1]=(-0.164538235223)*x[0]**o+(0.628058472821)*x[0]+(0.331956969519)*x[1]**o+(0.828755643202)*x[1]
-        arg[1,3,0,0]=(0.103479416566)*x[0]**o+(0.380691196177)*x[0]+(-0.350375360146)*x[1]**o+(0.18528492785)*x[1]
-        arg[1,3,0,1]=(-0.0744423760559)*x[0]**o+(0.912275380092)*x[0]+(0.867254399179)*x[1]**o+(0.410307184344)*x[1]
-        arg[1,3,1,0]=(-0.480324052626)*x[0]**o+(-0.438544962062)*x[0]+(0.749575808465)*x[1]**o+(-0.0689669475685)*x[1]
-        arg[1,3,1,1]=(0.723325499611)*x[0]**o+(-0.368668363075)*x[0]+(0.404302895836)*x[1]**o+(0.66913878408)*x[1]
-        arg[1,3,2,0]=(-0.122189168877)*x[0]**o+(0.603362404944)*x[0]+(0.184163482697)*x[1]**o+(0.728136755361)*x[1]
-        arg[1,3,2,1]=(-0.149430048386)*x[0]**o+(-0.478108072433)*x[0]+(0.342479834611)*x[1]**o+(0.596757508109)*x[1]
-        arg[1,4,0,0]=(0.334694167334)*x[0]**o+(-0.815793032292)*x[0]+(0.394250112116)*x[1]**o+(0.269197166808)*x[1]
-        arg[1,4,0,1]=(-0.19210954081)*x[0]**o+(0.416736181257)*x[0]+(0.146217029416)*x[1]**o+(0.906316717458)*x[1]
-        arg[1,4,1,0]=(-0.708061018673)*x[0]**o+(0.299200707691)*x[0]+(0.665111947965)*x[1]**o+(-0.0340170473314)*x[1]
-        arg[1,4,1,1]=(0.0353929744202)*x[0]**o+(0.0493194235067)*x[0]+(-0.12215424813)*x[1]**o+(-0.758677440837)*x[1]
-        arg[1,4,2,0]=(0.769702957701)*x[0]**o+(0.901805654682)*x[0]+(0.260222241019)*x[1]**o+(-0.471997705392)*x[1]
-        arg[1,4,2,1]=(0.204258068316)*x[0]**o+(-0.173085114573)*x[0]+(-0.0253164178046)*x[1]**o+(0.84254484259)*x[1]
-        arg[2,0,0,0]=(-0.688170206644)*x[0]**o+(-0.718673702314)*x[0]+(0.834265379201)*x[1]**o+(-0.879925159193)*x[1]
-        arg[2,0,0,1]=(-0.515401334666)*x[0]**o+(-0.810523180967)*x[0]+(0.725182741017)*x[1]**o+(-0.74319471007)*x[1]
-        arg[2,0,1,0]=(-0.799698108602)*x[0]**o+(0.289222327549)*x[0]+(0.0589402409999)*x[1]**o+(-0.437669765839)*x[1]
-        arg[2,0,1,1]=(-0.734933454418)*x[0]**o+(0.371391146956)*x[0]+(-0.17797293763)*x[1]**o+(-0.499412028554)*x[1]
-        arg[2,0,2,0]=(0.217283159505)*x[0]**o+(-0.184871188378)*x[0]+(-0.764095670777)*x[1]**o+(0.103705507755)*x[1]
-        arg[2,0,2,1]=(0.578071527416)*x[0]**o+(0.845365737459)*x[0]+(-0.173187973137)*x[1]**o+(-0.827819925403)*x[1]
-        arg[2,1,0,0]=(-0.258505119864)*x[0]**o+(0.640873475074)*x[0]+(-0.993841847675)*x[1]**o+(0.347490565123)*x[1]
-        arg[2,1,0,1]=(0.224893445547)*x[0]**o+(0.827208591218)*x[0]+(0.0391563892525)*x[1]**o+(-0.320939200596)*x[1]
-        arg[2,1,1,0]=(-0.993044884903)*x[0]**o+(-0.395235414086)*x[0]+(-0.447460653655)*x[1]**o+(-0.114585622808)*x[1]
-        arg[2,1,1,1]=(0.908711735866)*x[0]**o+(-0.911405008413)*x[0]+(-0.798601192961)*x[1]**o+(-0.432937813587)*x[1]
-        arg[2,1,2,0]=(-0.270424920067)*x[0]**o+(-0.533648944143)*x[0]+(0.184307763968)*x[1]**o+(-0.802221601505)*x[1]
-        arg[2,1,2,1]=(0.154432841861)*x[0]**o+(0.306458633794)*x[0]+(0.0343421658454)*x[1]**o+(-0.768559457414)*x[1]
-        arg[2,2,0,0]=(-0.497828132445)*x[0]**o+(0.484920248315)*x[0]+(-0.188239341875)*x[1]**o+(0.100360622012)*x[1]
-        arg[2,2,0,1]=(-0.0433518780446)*x[0]**o+(0.119470819101)*x[0]+(0.344025017428)*x[1]**o+(0.667394126898)*x[1]
-        arg[2,2,1,0]=(0.512271795846)*x[0]**o+(0.567024910623)*x[0]+(-0.316191920076)*x[1]**o+(-0.202135136851)*x[1]
-        arg[2,2,1,1]=(0.781678855797)*x[0]**o+(0.159208533718)*x[0]+(-0.930150837465)*x[1]**o+(-0.666903895504)*x[1]
-        arg[2,2,2,0]=(0.292270965732)*x[0]**o+(-0.112877441048)*x[0]+(-0.643355582049)*x[1]**o+(-0.0482560996171)*x[1]
-        arg[2,2,2,1]=(0.638688065872)*x[0]**o+(0.787719224138)*x[0]+(0.815312681592)*x[1]**o+(0.334735776221)*x[1]
-        arg[2,3,0,0]=(0.409920519672)*x[0]**o+(-0.191886243537)*x[0]+(-0.348205383522)*x[1]**o+(-0.651065510647)*x[1]
-        arg[2,3,0,1]=(0.824428500178)*x[0]**o+(-0.909533490456)*x[0]+(-0.455079541262)*x[1]**o+(-0.613994310127)*x[1]
-        arg[2,3,1,0]=(0.225908995914)*x[0]**o+(0.258098741048)*x[0]+(-0.858905205327)*x[1]**o+(0.535845140874)*x[1]
-        arg[2,3,1,1]=(-0.183600641837)*x[0]**o+(-0.0436432564818)*x[0]+(0.306524301109)*x[1]**o+(0.662513699164)*x[1]
-        arg[2,3,2,0]=(-0.678973103555)*x[0]**o+(0.674110571991)*x[0]+(-0.129743880618)*x[1]**o+(-0.210759231178)*x[1]
-        arg[2,3,2,1]=(-0.594989617102)*x[0]**o+(0.0557145839856)*x[0]+(-0.379516802094)*x[1]**o+(-0.496127170036)*x[1]
-        arg[2,4,0,0]=(0.401088886175)*x[0]**o+(-0.208580896076)*x[0]+(-0.655582275521)*x[1]**o+(-0.522892532154)*x[1]
-        arg[2,4,0,1]=(0.609111916382)*x[0]**o+(-0.864603847696)*x[0]+(-0.373482060442)*x[1]**o+(0.048777005392)*x[1]
-        arg[2,4,1,0]=(-0.503935244799)*x[0]**o+(0.320517360825)*x[0]+(-0.658994963813)*x[1]**o+(0.00465823412972)*x[1]
-        arg[2,4,1,1]=(-0.202767966863)*x[0]**o+(0.737239608437)*x[0]+(-0.633206522406)*x[1]**o+(-0.408531988781)*x[1]
-        arg[2,4,2,0]=(0.660048575091)*x[0]**o+(-0.399137043056)*x[0]+(-0.0977181117895)*x[1]**o+(0.148903352776)*x[1]
-        arg[2,4,2,1]=(-0.396768795712)*x[0]**o+(-0.550388681028)*x[0]+(0.0946256561554)*x[1]**o+(-0.0566941754267)*x[1]
-        arg[3,0,0,0]=(0.0647180650687)*x[0]**o+(0.920788893299)*x[0]+(0.131306350033)*x[1]**o+(-0.840527983774)*x[1]
-        arg[3,0,0,1]=(0.451700262969)*x[0]**o+(-0.16104676139)*x[0]+(0.114145999713)*x[1]**o+(-0.949265482931)*x[1]
-        arg[3,0,1,0]=(-0.219444617083)*x[0]**o+(0.846470673388)*x[0]+(-0.341392225388)*x[1]**o+(-0.721912717627)*x[1]
-        arg[3,0,1,1]=(-0.199502120929)*x[0]**o+(-0.00662410675554)*x[0]+(0.0529013037694)*x[1]**o+(-0.022278580228)*x[1]
-        arg[3,0,2,0]=(0.803500732535)*x[0]**o+(0.754138333448)*x[0]+(0.822404687478)*x[1]**o+(0.900099584934)*x[1]
-        arg[3,0,2,1]=(0.84674757393)*x[0]**o+(0.326823539079)*x[0]+(-0.824446392056)*x[1]**o+(-0.506583766552)*x[1]
-        arg[3,1,0,0]=(0.816775849327)*x[0]**o+(0.957523430402)*x[0]+(-0.822535686534)*x[1]**o+(-0.583389123083)*x[1]
-        arg[3,1,0,1]=(0.518120693337)*x[0]**o+(0.0946135115511)*x[0]+(0.577364260402)*x[1]**o+(-0.677435109716)*x[1]
-        arg[3,1,1,0]=(-0.559041961891)*x[0]**o+(0.436791134026)*x[0]+(0.287609046653)*x[1]**o+(-0.484573207793)*x[1]
-        arg[3,1,1,1]=(-0.0786041693053)*x[0]**o+(0.793526931222)*x[0]+(0.055780633982)*x[1]**o+(0.0447074319839)*x[1]
-        arg[3,1,2,0]=(-0.190231018951)*x[0]**o+(-0.61318830169)*x[0]+(-0.157202158534)*x[1]**o+(-0.823043159126)*x[1]
-        arg[3,1,2,1]=(-0.502637901786)*x[0]**o+(0.781083145697)*x[0]+(-0.663013942651)*x[1]**o+(-0.305726874525)*x[1]
-        arg[3,2,0,0]=(0.566955929517)*x[0]**o+(-0.506981068575)*x[0]+(-0.831439289654)*x[1]**o+(-0.337491442765)*x[1]
-        arg[3,2,0,1]=(-0.713648844422)*x[0]**o+(-0.00815764297609)*x[0]+(0.829706206618)*x[1]**o+(0.96471376965)*x[1]
-        arg[3,2,1,0]=(-0.944705561715)*x[0]**o+(-0.87962603172)*x[0]+(-0.0525190846342)*x[1]**o+(-0.0457463400515)*x[1]
-        arg[3,2,1,1]=(0.54922446571)*x[0]**o+(0.651923573438)*x[0]+(-0.00229398468376)*x[1]**o+(-0.00170863787749)*x[1]
-        arg[3,2,2,0]=(0.622372079685)*x[0]**o+(-0.553578221845)*x[0]+(-0.737877450857)*x[1]**o+(0.459729854002)*x[1]
-        arg[3,2,2,1]=(0.826155732508)*x[0]**o+(-0.000468898258991)*x[0]+(-0.255179342686)*x[1]**o+(-0.80957312045)*x[1]
-        arg[3,3,0,0]=(-0.195212469839)*x[0]**o+(-0.0235216449547)*x[0]+(-0.175192639485)*x[1]**o+(-0.58937661213)*x[1]
-        arg[3,3,0,1]=(-0.931538910404)*x[0]**o+(0.649282880007)*x[0]+(-0.237841482637)*x[1]**o+(-0.0220516220802)*x[1]
-        arg[3,3,1,0]=(0.420911057166)*x[0]**o+(0.200126728184)*x[0]+(-0.829130861656)*x[1]**o+(-0.563462916661)*x[1]
-        arg[3,3,1,1]=(-0.148199974575)*x[0]**o+(-0.248825389533)*x[0]+(-0.346424894584)*x[1]**o+(0.339758232978)*x[1]
-        arg[3,3,2,0]=(0.249372496215)*x[0]**o+(-0.343626915746)*x[0]+(0.0961351845087)*x[1]**o+(0.612679249068)*x[1]
-        arg[3,3,2,1]=(0.985380582259)*x[0]**o+(-0.603514318626)*x[0]+(-0.131105546364)*x[1]**o+(-0.0798158697238)*x[1]
-        arg[3,4,0,0]=(0.478635365792)*x[0]**o+(-0.964424450881)*x[0]+(-0.469995535544)*x[1]**o+(-0.72871149515)*x[1]
-        arg[3,4,0,1]=(-0.264802297415)*x[0]**o+(-0.926518282507)*x[0]+(0.803390182149)*x[1]**o+(0.387910762706)*x[1]
-        arg[3,4,1,0]=(0.0452448579909)*x[0]**o+(-0.0482221515826)*x[0]+(-0.728020494982)*x[1]**o+(-0.288823633249)*x[1]
-        arg[3,4,1,1]=(-0.640459595265)*x[0]**o+(0.759525453728)*x[0]+(-0.0280300707884)*x[1]**o+(0.079438187123)*x[1]
-        arg[3,4,2,0]=(-0.14185171171)*x[0]**o+(-0.810989314052)*x[0]+(0.921902325773)*x[1]**o+(0.885920658784)*x[1]
-        arg[3,4,2,1]=(-0.0101259901393)*x[0]**o+(-0.696541046542)*x[0]+(0.127932822496)*x[1]**o+(-0.822265796323)*x[1]
-        ref[0,0,0,0]=(0.0577426785287)*x_ref[0]**o+(0.469845292021)*x_ref[0]+(-0.641706722819)*x_ref[1]**o+(0.129652001842)*x_ref[1]
-        ref[0,0,0,1]=(-0.87686951076)*x_ref[0]**o+(-0.981093040999)*x_ref[0]+(0.654637319552)*x_ref[1]**o+(-0.953104888811)*x_ref[1]
-        ref[0,0,1,0]=(-0.486386436415)*x_ref[0]**o+(0.91083470956)*x_ref[0]+(-0.392432937401)*x_ref[1]**o+(0.494919250884)*x_ref[1]
-        ref[0,0,1,1]=(0.299928502076)*x_ref[0]**o+(-0.0787848191157)*x_ref[0]+(-0.541863592475)*x_ref[1]**o+(0.435934816687)*x_ref[1]
-        ref[0,0,2,0]=(-0.0500083438365)*x_ref[0]**o+(-0.882581886623)*x_ref[0]+(-0.965347357063)*x_ref[1]**o+(-0.270254041774)*x_ref[1]
-        ref[0,0,2,1]=(-0.18974861517)*x_ref[0]**o+(0.341406736671)*x_ref[0]+(0.847020774229)*x_ref[1]**o+(0.650201215849)*x_ref[1]
-        ref[0,1,0,0]=(0.0823017084719)*x_ref[0]**o+(0.964585359235)*x_ref[0]+(0.357658660436)*x_ref[1]**o+(0.182585271812)*x_ref[1]
-        ref[0,1,0,1]=(0.863411821905)*x_ref[0]**o+(0.313374566426)*x_ref[0]+(-0.273547644827)*x_ref[1]**o+(0.429051854479)*x_ref[1]
-        ref[0,1,1,0]=(0.167608645068)*x_ref[0]**o+(0.926908094967)*x_ref[0]+(-0.853415240465)*x_ref[1]**o+(-0.376634525241)*x_ref[1]
-        ref[0,1,1,1]=(-0.555491961591)*x_ref[0]**o+(-0.64621137308)*x_ref[0]+(-0.315877124991)*x_ref[1]**o+(-0.962839286133)*x_ref[1]
-        ref[0,1,2,0]=(0.909012065667)*x_ref[0]**o+(-0.656739022976)*x_ref[0]+(-0.458377773547)*x_ref[1]**o+(0.394223574009)*x_ref[1]
-        ref[0,1,2,1]=(-0.550560496714)*x_ref[0]**o+(0.216941875936)*x_ref[0]+(-0.634745794924)*x_ref[1]**o+(0.887912543217)*x_ref[1]
-        ref[0,2,0,0]=(-0.961535901493)*x_ref[0]**o+(0.980336384835)*x_ref[0]+(-0.151755000128)*x_ref[1]**o+(0.0402841925797)*x_ref[1]
-        ref[0,2,0,1]=(0.571527088727)*x_ref[0]**o+(-0.475013184811)*x_ref[0]+(0.80051818192)*x_ref[1]**o+(-0.589499747694)*x_ref[1]
-        ref[0,2,1,0]=(0.545840648612)*x_ref[0]**o+(0.888313209612)*x_ref[0]+(-0.568938733446)*x_ref[1]**o+(-0.289030374342)*x_ref[1]
-        ref[0,2,1,1]=(-0.0631638607979)*x_ref[0]**o+(-0.173754439841)*x_ref[0]+(0.143503554071)*x_ref[1]**o+(-0.0850087835084)*x_ref[1]
-        ref[0,2,2,0]=(0.316299661412)*x_ref[0]**o+(0.260890197379)*x_ref[0]+(-0.803519867776)*x_ref[1]**o+(0.36434810185)*x_ref[1]
-        ref[0,2,2,1]=(-0.656013716479)*x_ref[0]**o+(0.810499942514)*x_ref[0]+(0.783455480815)*x_ref[1]**o+(-0.943085466999)*x_ref[1]
-        ref[0,3,0,0]=(0.128153439722)*x_ref[0]**o+(-0.404740042302)*x_ref[0]+(0.785717360548)*x_ref[1]**o+(-0.710818900841)*x_ref[1]
-        ref[0,3,0,1]=(-0.097059274787)*x_ref[0]**o+(0.578757823228)*x_ref[0]+(0.186146155178)*x_ref[1]**o+(0.274602030707)*x_ref[1]
-        ref[0,3,1,0]=(0.00522392753954)*x_ref[0]**o+(0.015773606982)*x_ref[0]+(-0.327110065344)*x_ref[1]**o+(0.15571120542)*x_ref[1]
-        ref[0,3,1,1]=(-0.14009116305)*x_ref[0]**o+(-0.659975337811)*x_ref[0]+(-0.297582833489)*x_ref[1]**o+(-0.600935015071)*x_ref[1]
-        ref[0,3,2,0]=(0.749388604357)*x_ref[0]**o+(0.762968650778)*x_ref[0]+(-0.623477518339)*x_ref[1]**o+(-0.931762943135)*x_ref[1]
-        ref[0,3,2,1]=(0.748396100632)*x_ref[0]**o+(-0.841314360401)*x_ref[0]+(0.432649446216)*x_ref[1]**o+(-0.971300843628)*x_ref[1]
-        ref[0,4,0,0]=(-0.217249090357)*x_ref[0]**o+(-0.833633675601)*x_ref[0]+(0.169984305627)*x_ref[1]**o+(-0.831738272666)*x_ref[1]
-        ref[0,4,0,1]=(0.501571101669)*x_ref[0]**o+(-0.223897334788)*x_ref[0]+(0.24178181976)*x_ref[1]**o+(0.307921789017)*x_ref[1]
-        ref[0,4,1,0]=(-0.162064610564)*x_ref[0]**o+(0.217669674603)*x_ref[0]+(0.995517866562)*x_ref[1]**o+(0.903061734589)*x_ref[1]
-        ref[0,4,1,1]=(-0.837150436928)*x_ref[0]**o+(0.465269468525)*x_ref[0]+(0.522034182082)*x_ref[1]**o+(-0.725469921625)*x_ref[1]
-        ref[0,4,2,0]=(-0.295739906169)*x_ref[0]**o+(0.961959220618)*x_ref[0]+(0.577799918942)*x_ref[1]**o+(-0.313255108148)*x_ref[1]
-        ref[0,4,2,1]=(-0.455635927062)*x_ref[0]**o+(0.667038701641)*x_ref[0]+(-0.151183772961)*x_ref[1]**o+(-0.550197828316)*x_ref[1]
-        ref[1,0,0,0]=(0.585510684472)*x_ref[0]**o+(-0.64754219493)*x_ref[0]+(0.781495111863)*x_ref[1]**o+(-0.792246214695)*x_ref[1]
-        ref[1,0,0,1]=(0.586346471397)*x_ref[0]**o+(0.291794158138)*x_ref[0]+(-0.614723564286)*x_ref[1]**o+(-0.151451723805)*x_ref[1]
-        ref[1,0,1,0]=(-0.472877220222)*x_ref[0]**o+(-0.0118252391089)*x_ref[0]+(-0.596943135354)*x_ref[1]**o+(-0.413992986066)*x_ref[1]
-        ref[1,0,1,1]=(-0.715007718152)*x_ref[0]**o+(0.032964784403)*x_ref[0]+(-0.350680745946)*x_ref[1]**o+(0.678841285054)*x_ref[1]
-        ref[1,0,2,0]=(0.673910318085)*x_ref[0]**o+(-0.15303471314)*x_ref[0]+(-0.0889279944344)*x_ref[1]**o+(-0.0356474498002)*x_ref[1]
-        ref[1,0,2,1]=(-0.875691348779)*x_ref[0]**o+(0.547300853671)*x_ref[0]+(-0.362646169132)*x_ref[1]**o+(-0.588521964671)*x_ref[1]
-        ref[1,1,0,0]=(-0.0988912551145)*x_ref[0]**o+(-0.710944394432)*x_ref[0]+(0.153875249337)*x_ref[1]**o+(0.274427434926)*x_ref[1]
-        ref[1,1,0,1]=(-0.0854272185591)*x_ref[0]**o+(-0.21840195791)*x_ref[0]+(0.906982245924)*x_ref[1]**o+(0.570990116211)*x_ref[1]
-        ref[1,1,1,0]=(-0.851259116331)*x_ref[0]**o+(0.309829955487)*x_ref[0]+(0.115725082696)*x_ref[1]**o+(-0.91590292189)*x_ref[1]
-        ref[1,1,1,1]=(-0.637464462703)*x_ref[0]**o+(-0.280971672162)*x_ref[0]+(0.270985403603)*x_ref[1]**o+(-0.534115311397)*x_ref[1]
-        ref[1,1,2,0]=(0.670179973397)*x_ref[0]**o+(0.847483793904)*x_ref[0]+(0.0681088634526)*x_ref[1]**o+(0.412176359729)*x_ref[1]
-        ref[1,1,2,1]=(0.0378205172485)*x_ref[0]**o+(0.974150495292)*x_ref[0]+(-0.720821275299)*x_ref[1]**o+(-0.552588296494)*x_ref[1]
-        ref[1,2,0,0]=(0.151367609975)*x_ref[0]**o+(0.832981586349)*x_ref[0]+(0.419488381843)*x_ref[1]**o+(0.561052438283)*x_ref[1]
-        ref[1,2,0,1]=(0.267839010425)*x_ref[0]**o+(0.47455974064)*x_ref[0]+(0.498826652567)*x_ref[1]**o+(-0.51906391205)*x_ref[1]
-        ref[1,2,1,0]=(-0.350105107527)*x_ref[0]**o+(-0.489326689724)*x_ref[0]+(-0.156970199109)*x_ref[1]**o+(-0.175565230472)*x_ref[1]
-        ref[1,2,1,1]=(0.754379973459)*x_ref[0]**o+(-0.70691373234)*x_ref[0]+(-0.964497356137)*x_ref[1]**o+(-0.694989442192)*x_ref[1]
-        ref[1,2,2,0]=(-0.491090361655)*x_ref[0]**o+(0.154379441501)*x_ref[0]+(0.403809695039)*x_ref[1]**o+(-0.084183660554)*x_ref[1]
-        ref[1,2,2,1]=(-0.164538235223)*x_ref[0]**o+(0.628058472821)*x_ref[0]+(0.331956969519)*x_ref[1]**o+(0.828755643202)*x_ref[1]
-        ref[1,3,0,0]=(0.103479416566)*x_ref[0]**o+(0.380691196177)*x_ref[0]+(-0.350375360146)*x_ref[1]**o+(0.18528492785)*x_ref[1]
-        ref[1,3,0,1]=(-0.0744423760559)*x_ref[0]**o+(0.912275380092)*x_ref[0]+(0.867254399179)*x_ref[1]**o+(0.410307184344)*x_ref[1]
-        ref[1,3,1,0]=(-0.480324052626)*x_ref[0]**o+(-0.438544962062)*x_ref[0]+(0.749575808465)*x_ref[1]**o+(-0.0689669475685)*x_ref[1]
-        ref[1,3,1,1]=(0.723325499611)*x_ref[0]**o+(-0.368668363075)*x_ref[0]+(0.404302895836)*x_ref[1]**o+(0.66913878408)*x_ref[1]
-        ref[1,3,2,0]=(-0.122189168877)*x_ref[0]**o+(0.603362404944)*x_ref[0]+(0.184163482697)*x_ref[1]**o+(0.728136755361)*x_ref[1]
-        ref[1,3,2,1]=(-0.149430048386)*x_ref[0]**o+(-0.478108072433)*x_ref[0]+(0.342479834611)*x_ref[1]**o+(0.596757508109)*x_ref[1]
-        ref[1,4,0,0]=(0.334694167334)*x_ref[0]**o+(-0.815793032292)*x_ref[0]+(0.394250112116)*x_ref[1]**o+(0.269197166808)*x_ref[1]
-        ref[1,4,0,1]=(-0.19210954081)*x_ref[0]**o+(0.416736181257)*x_ref[0]+(0.146217029416)*x_ref[1]**o+(0.906316717458)*x_ref[1]
-        ref[1,4,1,0]=(-0.708061018673)*x_ref[0]**o+(0.299200707691)*x_ref[0]+(0.665111947965)*x_ref[1]**o+(-0.0340170473314)*x_ref[1]
-        ref[1,4,1,1]=(0.0353929744202)*x_ref[0]**o+(0.0493194235067)*x_ref[0]+(-0.12215424813)*x_ref[1]**o+(-0.758677440837)*x_ref[1]
-        ref[1,4,2,0]=(0.769702957701)*x_ref[0]**o+(0.901805654682)*x_ref[0]+(0.260222241019)*x_ref[1]**o+(-0.471997705392)*x_ref[1]
-        ref[1,4,2,1]=(0.204258068316)*x_ref[0]**o+(-0.173085114573)*x_ref[0]+(-0.0253164178046)*x_ref[1]**o+(0.84254484259)*x_ref[1]
-        ref[2,0,0,0]=(-0.688170206644)*x_ref[0]**o+(-0.718673702314)*x_ref[0]+(0.834265379201)*x_ref[1]**o+(-0.879925159193)*x_ref[1]
-        ref[2,0,0,1]=(-0.515401334666)*x_ref[0]**o+(-0.810523180967)*x_ref[0]+(0.725182741017)*x_ref[1]**o+(-0.74319471007)*x_ref[1]
-        ref[2,0,1,0]=(-0.799698108602)*x_ref[0]**o+(0.289222327549)*x_ref[0]+(0.0589402409999)*x_ref[1]**o+(-0.437669765839)*x_ref[1]
-        ref[2,0,1,1]=(-0.734933454418)*x_ref[0]**o+(0.371391146956)*x_ref[0]+(-0.17797293763)*x_ref[1]**o+(-0.499412028554)*x_ref[1]
-        ref[2,0,2,0]=(0.217283159505)*x_ref[0]**o+(-0.184871188378)*x_ref[0]+(-0.764095670777)*x_ref[1]**o+(0.103705507755)*x_ref[1]
-        ref[2,0,2,1]=(0.578071527416)*x_ref[0]**o+(0.845365737459)*x_ref[0]+(-0.173187973137)*x_ref[1]**o+(-0.827819925403)*x_ref[1]
-        ref[2,1,0,0]=(-0.258505119864)*x_ref[0]**o+(0.640873475074)*x_ref[0]+(-0.993841847675)*x_ref[1]**o+(0.347490565123)*x_ref[1]
-        ref[2,1,0,1]=(0.224893445547)*x_ref[0]**o+(0.827208591218)*x_ref[0]+(0.0391563892525)*x_ref[1]**o+(-0.320939200596)*x_ref[1]
-        ref[2,1,1,0]=(-0.993044884903)*x_ref[0]**o+(-0.395235414086)*x_ref[0]+(-0.447460653655)*x_ref[1]**o+(-0.114585622808)*x_ref[1]
-        ref[2,1,1,1]=(0.908711735866)*x_ref[0]**o+(-0.911405008413)*x_ref[0]+(-0.798601192961)*x_ref[1]**o+(-0.432937813587)*x_ref[1]
-        ref[2,1,2,0]=(-0.270424920067)*x_ref[0]**o+(-0.533648944143)*x_ref[0]+(0.184307763968)*x_ref[1]**o+(-0.802221601505)*x_ref[1]
-        ref[2,1,2,1]=(0.154432841861)*x_ref[0]**o+(0.306458633794)*x_ref[0]+(0.0343421658454)*x_ref[1]**o+(-0.768559457414)*x_ref[1]
-        ref[2,2,0,0]=(-0.497828132445)*x_ref[0]**o+(0.484920248315)*x_ref[0]+(-0.188239341875)*x_ref[1]**o+(0.100360622012)*x_ref[1]
-        ref[2,2,0,1]=(-0.0433518780446)*x_ref[0]**o+(0.119470819101)*x_ref[0]+(0.344025017428)*x_ref[1]**o+(0.667394126898)*x_ref[1]
-        ref[2,2,1,0]=(0.512271795846)*x_ref[0]**o+(0.567024910623)*x_ref[0]+(-0.316191920076)*x_ref[1]**o+(-0.202135136851)*x_ref[1]
-        ref[2,2,1,1]=(0.781678855797)*x_ref[0]**o+(0.159208533718)*x_ref[0]+(-0.930150837465)*x_ref[1]**o+(-0.666903895504)*x_ref[1]
-        ref[2,2,2,0]=(0.292270965732)*x_ref[0]**o+(-0.112877441048)*x_ref[0]+(-0.643355582049)*x_ref[1]**o+(-0.0482560996171)*x_ref[1]
-        ref[2,2,2,1]=(0.638688065872)*x_ref[0]**o+(0.787719224138)*x_ref[0]+(0.815312681592)*x_ref[1]**o+(0.334735776221)*x_ref[1]
-        ref[2,3,0,0]=(0.409920519672)*x_ref[0]**o+(-0.191886243537)*x_ref[0]+(-0.348205383522)*x_ref[1]**o+(-0.651065510647)*x_ref[1]
-        ref[2,3,0,1]=(0.824428500178)*x_ref[0]**o+(-0.909533490456)*x_ref[0]+(-0.455079541262)*x_ref[1]**o+(-0.613994310127)*x_ref[1]
-        ref[2,3,1,0]=(0.225908995914)*x_ref[0]**o+(0.258098741048)*x_ref[0]+(-0.858905205327)*x_ref[1]**o+(0.535845140874)*x_ref[1]
-        ref[2,3,1,1]=(-0.183600641837)*x_ref[0]**o+(-0.0436432564818)*x_ref[0]+(0.306524301109)*x_ref[1]**o+(0.662513699164)*x_ref[1]
-        ref[2,3,2,0]=(-0.678973103555)*x_ref[0]**o+(0.674110571991)*x_ref[0]+(-0.129743880618)*x_ref[1]**o+(-0.210759231178)*x_ref[1]
-        ref[2,3,2,1]=(-0.594989617102)*x_ref[0]**o+(0.0557145839856)*x_ref[0]+(-0.379516802094)*x_ref[1]**o+(-0.496127170036)*x_ref[1]
-        ref[2,4,0,0]=(0.401088886175)*x_ref[0]**o+(-0.208580896076)*x_ref[0]+(-0.655582275521)*x_ref[1]**o+(-0.522892532154)*x_ref[1]
-        ref[2,4,0,1]=(0.609111916382)*x_ref[0]**o+(-0.864603847696)*x_ref[0]+(-0.373482060442)*x_ref[1]**o+(0.048777005392)*x_ref[1]
-        ref[2,4,1,0]=(-0.503935244799)*x_ref[0]**o+(0.320517360825)*x_ref[0]+(-0.658994963813)*x_ref[1]**o+(0.00465823412972)*x_ref[1]
-        ref[2,4,1,1]=(-0.202767966863)*x_ref[0]**o+(0.737239608437)*x_ref[0]+(-0.633206522406)*x_ref[1]**o+(-0.408531988781)*x_ref[1]
-        ref[2,4,2,0]=(0.660048575091)*x_ref[0]**o+(-0.399137043056)*x_ref[0]+(-0.0977181117895)*x_ref[1]**o+(0.148903352776)*x_ref[1]
-        ref[2,4,2,1]=(-0.396768795712)*x_ref[0]**o+(-0.550388681028)*x_ref[0]+(0.0946256561554)*x_ref[1]**o+(-0.0566941754267)*x_ref[1]
-        ref[3,0,0,0]=(0.0647180650687)*x_ref[0]**o+(0.920788893299)*x_ref[0]+(0.131306350033)*x_ref[1]**o+(-0.840527983774)*x_ref[1]
-        ref[3,0,0,1]=(0.451700262969)*x_ref[0]**o+(-0.16104676139)*x_ref[0]+(0.114145999713)*x_ref[1]**o+(-0.949265482931)*x_ref[1]
-        ref[3,0,1,0]=(-0.219444617083)*x_ref[0]**o+(0.846470673388)*x_ref[0]+(-0.341392225388)*x_ref[1]**o+(-0.721912717627)*x_ref[1]
-        ref[3,0,1,1]=(-0.199502120929)*x_ref[0]**o+(-0.00662410675554)*x_ref[0]+(0.0529013037694)*x_ref[1]**o+(-0.022278580228)*x_ref[1]
-        ref[3,0,2,0]=(0.803500732535)*x_ref[0]**o+(0.754138333448)*x_ref[0]+(0.822404687478)*x_ref[1]**o+(0.900099584934)*x_ref[1]
-        ref[3,0,2,1]=(0.84674757393)*x_ref[0]**o+(0.326823539079)*x_ref[0]+(-0.824446392056)*x_ref[1]**o+(-0.506583766552)*x_ref[1]
-        ref[3,1,0,0]=(0.816775849327)*x_ref[0]**o+(0.957523430402)*x_ref[0]+(-0.822535686534)*x_ref[1]**o+(-0.583389123083)*x_ref[1]
-        ref[3,1,0,1]=(0.518120693337)*x_ref[0]**o+(0.0946135115511)*x_ref[0]+(0.577364260402)*x_ref[1]**o+(-0.677435109716)*x_ref[1]
-        ref[3,1,1,0]=(-0.559041961891)*x_ref[0]**o+(0.436791134026)*x_ref[0]+(0.287609046653)*x_ref[1]**o+(-0.484573207793)*x_ref[1]
-        ref[3,1,1,1]=(-0.0786041693053)*x_ref[0]**o+(0.793526931222)*x_ref[0]+(0.055780633982)*x_ref[1]**o+(0.0447074319839)*x_ref[1]
-        ref[3,1,2,0]=(-0.190231018951)*x_ref[0]**o+(-0.61318830169)*x_ref[0]+(-0.157202158534)*x_ref[1]**o+(-0.823043159126)*x_ref[1]
-        ref[3,1,2,1]=(-0.502637901786)*x_ref[0]**o+(0.781083145697)*x_ref[0]+(-0.663013942651)*x_ref[1]**o+(-0.305726874525)*x_ref[1]
-        ref[3,2,0,0]=(0.566955929517)*x_ref[0]**o+(-0.506981068575)*x_ref[0]+(-0.831439289654)*x_ref[1]**o+(-0.337491442765)*x_ref[1]
-        ref[3,2,0,1]=(-0.713648844422)*x_ref[0]**o+(-0.00815764297609)*x_ref[0]+(0.829706206618)*x_ref[1]**o+(0.96471376965)*x_ref[1]
-        ref[3,2,1,0]=(-0.944705561715)*x_ref[0]**o+(-0.87962603172)*x_ref[0]+(-0.0525190846342)*x_ref[1]**o+(-0.0457463400515)*x_ref[1]
-        ref[3,2,1,1]=(0.54922446571)*x_ref[0]**o+(0.651923573438)*x_ref[0]+(-0.00229398468376)*x_ref[1]**o+(-0.00170863787749)*x_ref[1]
-        ref[3,2,2,0]=(0.622372079685)*x_ref[0]**o+(-0.553578221845)*x_ref[0]+(-0.737877450857)*x_ref[1]**o+(0.459729854002)*x_ref[1]
-        ref[3,2,2,1]=(0.826155732508)*x_ref[0]**o+(-0.000468898258991)*x_ref[0]+(-0.255179342686)*x_ref[1]**o+(-0.80957312045)*x_ref[1]
-        ref[3,3,0,0]=(-0.195212469839)*x_ref[0]**o+(-0.0235216449547)*x_ref[0]+(-0.175192639485)*x_ref[1]**o+(-0.58937661213)*x_ref[1]
-        ref[3,3,0,1]=(-0.931538910404)*x_ref[0]**o+(0.649282880007)*x_ref[0]+(-0.237841482637)*x_ref[1]**o+(-0.0220516220802)*x_ref[1]
-        ref[3,3,1,0]=(0.420911057166)*x_ref[0]**o+(0.200126728184)*x_ref[0]+(-0.829130861656)*x_ref[1]**o+(-0.563462916661)*x_ref[1]
-        ref[3,3,1,1]=(-0.148199974575)*x_ref[0]**o+(-0.248825389533)*x_ref[0]+(-0.346424894584)*x_ref[1]**o+(0.339758232978)*x_ref[1]
-        ref[3,3,2,0]=(0.249372496215)*x_ref[0]**o+(-0.343626915746)*x_ref[0]+(0.0961351845087)*x_ref[1]**o+(0.612679249068)*x_ref[1]
-        ref[3,3,2,1]=(0.985380582259)*x_ref[0]**o+(-0.603514318626)*x_ref[0]+(-0.131105546364)*x_ref[1]**o+(-0.0798158697238)*x_ref[1]
-        ref[3,4,0,0]=(0.478635365792)*x_ref[0]**o+(-0.964424450881)*x_ref[0]+(-0.469995535544)*x_ref[1]**o+(-0.72871149515)*x_ref[1]
-        ref[3,4,0,1]=(-0.264802297415)*x_ref[0]**o+(-0.926518282507)*x_ref[0]+(0.803390182149)*x_ref[1]**o+(0.387910762706)*x_ref[1]
-        ref[3,4,1,0]=(0.0452448579909)*x_ref[0]**o+(-0.0482221515826)*x_ref[0]+(-0.728020494982)*x_ref[1]**o+(-0.288823633249)*x_ref[1]
-        ref[3,4,1,1]=(-0.640459595265)*x_ref[0]**o+(0.759525453728)*x_ref[0]+(-0.0280300707884)*x_ref[1]**o+(0.079438187123)*x_ref[1]
-        ref[3,4,2,0]=(-0.14185171171)*x_ref[0]**o+(-0.810989314052)*x_ref[0]+(0.921902325773)*x_ref[1]**o+(0.885920658784)*x_ref[1]
-        ref[3,4,2,1]=(-0.0101259901393)*x_ref[0]**o+(-0.696541046542)*x_ref[0]+(0.127932822496)*x_ref[1]**o+(-0.822265796323)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.657703355307)*x[0]**o+(0.397813831843)*x[0]+(0.364460538717)*x[1]**o+(-0.845626669617)*x[1]+(-0.987144254126)*x[2]**o+(-0.732384980726)*x[2]
-        arg[0,0,0,1]=(-0.13280304886)*x[0]**o+(-0.953796807758)*x[0]+(0.875723746654)*x[1]**o+(0.0764745117242)*x[1]+(-0.536085676221)*x[2]**o+(-0.520611959678)*x[2]
-        arg[0,0,1,0]=(0.716429446578)*x[0]**o+(-0.729164693441)*x[0]+(-0.832505557428)*x[1]**o+(-0.329200605611)*x[1]+(0.0310162060964)*x[2]**o+(-0.869978941999)*x[2]
-        arg[0,0,1,1]=(0.110253530584)*x[0]**o+(0.995528486822)*x[0]+(0.838577797395)*x[1]**o+(0.443987752225)*x[1]+(0.387337959057)*x[2]**o+(0.548448752612)*x[2]
-        arg[0,0,2,0]=(-0.995737515431)*x[0]**o+(-0.899807241717)*x[0]+(-0.0803287764138)*x[1]**o+(0.242680051556)*x[1]+(0.58974836823)*x[2]**o+(-0.498450188944)*x[2]
-        arg[0,0,2,1]=(0.341561541555)*x[0]**o+(-0.00541988184597)*x[0]+(-0.204832898701)*x[1]**o+(-0.957247935865)*x[1]+(-0.441002902064)*x[2]**o+(0.756843480304)*x[2]
-        arg[0,1,0,0]=(0.136201526244)*x[0]**o+(0.517677304193)*x[0]+(0.523031610748)*x[1]**o+(-0.908998053383)*x[1]+(-0.629649678416)*x[2]**o+(0.762977917512)*x[2]
-        arg[0,1,0,1]=(-0.103521080864)*x[0]**o+(-0.434410222595)*x[0]+(0.418239530241)*x[1]**o+(0.65638475119)*x[1]+(0.413036393129)*x[2]**o+(-0.220365518353)*x[2]
-        arg[0,1,1,0]=(-0.415690201483)*x[0]**o+(-0.969323394689)*x[0]+(-0.295639420195)*x[1]**o+(-0.24915002749)*x[1]+(-0.00927627101467)*x[2]**o+(0.520335261634)*x[2]
-        arg[0,1,1,1]=(-0.262653741797)*x[0]**o+(-0.463590591666)*x[0]+(0.568893042923)*x[1]**o+(-0.869851332898)*x[1]+(-0.463261399415)*x[2]**o+(0.0281915686202)*x[2]
-        arg[0,1,2,0]=(0.377159503058)*x[0]**o+(0.484512261943)*x[0]+(0.0303594628925)*x[1]**o+(0.482051243004)*x[1]+(0.240643013949)*x[2]**o+(-0.943908617705)*x[2]
-        arg[0,1,2,1]=(0.843854614097)*x[0]**o+(0.018041534553)*x[0]+(0.264198703361)*x[1]**o+(0.732889517628)*x[1]+(-0.154807384394)*x[2]**o+(0.60513622187)*x[2]
-        arg[0,2,0,0]=(-0.234758118286)*x[0]**o+(-0.77807396119)*x[0]+(-0.97783091103)*x[1]**o+(-0.716185223828)*x[1]+(-0.573126474259)*x[2]**o+(0.403110701555)*x[2]
-        arg[0,2,0,1]=(-0.853878344804)*x[0]**o+(-0.482644826561)*x[0]+(-0.826041149012)*x[1]**o+(0.596376234798)*x[1]+(-0.216400517274)*x[2]**o+(-0.323127194259)*x[2]
-        arg[0,2,1,0]=(0.931551121492)*x[0]**o+(-0.527132174379)*x[0]+(0.373496704463)*x[1]**o+(-0.375215826463)*x[1]+(-0.639167297984)*x[2]**o+(0.143608733189)*x[2]
-        arg[0,2,1,1]=(-0.982206000879)*x[0]**o+(0.836589596534)*x[0]+(0.606275000138)*x[1]**o+(-0.821469453892)*x[1]+(-0.633828380948)*x[2]**o+(-0.637688777216)*x[2]
-        arg[0,2,2,0]=(0.441649557529)*x[0]**o+(-0.34978365051)*x[0]+(0.514175365405)*x[1]**o+(-0.903212271234)*x[1]+(0.70236887156)*x[2]**o+(0.72953045189)*x[2]
-        arg[0,2,2,1]=(0.302787896978)*x[0]**o+(0.157598071021)*x[0]+(-0.357101947632)*x[1]**o+(0.381098383156)*x[1]+(-0.552546036689)*x[2]**o+(0.448181721984)*x[2]
-        arg[0,3,0,0]=(0.662181077399)*x[0]**o+(-0.283755239518)*x[0]+(0.33694741278)*x[1]**o+(0.275801685868)*x[1]+(0.526155259101)*x[2]**o+(-0.378241855559)*x[2]
-        arg[0,3,0,1]=(0.157822133581)*x[0]**o+(0.25402072747)*x[0]+(0.522842123099)*x[1]**o+(0.510595773584)*x[1]+(-0.829239126666)*x[2]**o+(0.990879342044)*x[2]
-        arg[0,3,1,0]=(-0.775925280059)*x[0]**o+(-0.726971388023)*x[0]+(-0.630088730753)*x[1]**o+(-0.731024178237)*x[1]+(-0.288643541196)*x[2]**o+(-0.283708428793)*x[2]
-        arg[0,3,1,1]=(-0.883176640445)*x[0]**o+(-0.0810211976762)*x[0]+(-0.102919217784)*x[1]**o+(0.271384866385)*x[1]+(0.980796900477)*x[2]**o+(0.439294038672)*x[2]
-        arg[0,3,2,0]=(-0.826688221502)*x[0]**o+(-0.909388347347)*x[0]+(0.164406927722)*x[1]**o+(0.60157189364)*x[1]+(-0.885578176748)*x[2]**o+(0.610008674247)*x[2]
-        arg[0,3,2,1]=(0.130154197193)*x[0]**o+(-0.754703602975)*x[0]+(0.00463710497017)*x[1]**o+(0.502162916123)*x[1]+(-0.749124548541)*x[2]**o+(0.946592962092)*x[2]
-        arg[0,4,0,0]=(-0.0478347448906)*x[0]**o+(-0.812937871882)*x[0]+(-0.460982012551)*x[1]**o+(0.317485998991)*x[1]+(-0.593671683477)*x[2]**o+(0.551385718668)*x[2]
-        arg[0,4,0,1]=(0.281998767502)*x[0]**o+(-0.0613830311997)*x[0]+(0.981429151019)*x[1]**o+(-0.580567714008)*x[1]+(0.0369483005331)*x[2]**o+(-0.74132358588)*x[2]
-        arg[0,4,1,0]=(0.525845217483)*x[0]**o+(0.907803915216)*x[0]+(0.111429079263)*x[1]**o+(-0.653030401377)*x[1]+(0.0814793913696)*x[2]**o+(-0.419201413875)*x[2]
-        arg[0,4,1,1]=(0.862892518463)*x[0]**o+(0.34033875398)*x[0]+(0.0371376953103)*x[1]**o+(0.568160310726)*x[1]+(-0.237231036717)*x[2]**o+(-0.130046899302)*x[2]
-        arg[0,4,2,0]=(0.223651181698)*x[0]**o+(0.730991398203)*x[0]+(0.133551525027)*x[1]**o+(0.685783540126)*x[1]+(0.339586395814)*x[2]**o+(-0.524371194863)*x[2]
-        arg[0,4,2,1]=(0.220110871383)*x[0]**o+(-0.37385773877)*x[0]+(0.773372000545)*x[1]**o+(-0.4261356565)*x[1]+(-0.619438438945)*x[2]**o+(0.126288949127)*x[2]
-        arg[1,0,0,0]=(0.727680196631)*x[0]**o+(-0.876280912599)*x[0]+(0.576553782915)*x[1]**o+(-0.0497780322367)*x[1]+(-0.690257457282)*x[2]**o+(-0.11130953054)*x[2]
-        arg[1,0,0,1]=(0.331863815938)*x[0]**o+(0.169379824389)*x[0]+(0.665507756012)*x[1]**o+(0.94933357273)*x[1]+(-0.610506070093)*x[2]**o+(0.752476708027)*x[2]
-        arg[1,0,1,0]=(0.851320583415)*x[0]**o+(-0.697235996161)*x[0]+(0.235192165807)*x[1]**o+(0.325473517022)*x[1]+(-0.424683549673)*x[2]**o+(0.228953796486)*x[2]
-        arg[1,0,1,1]=(0.804192098517)*x[0]**o+(-0.684337197059)*x[0]+(-0.349251615715)*x[1]**o+(0.596165705743)*x[1]+(-0.636033221182)*x[2]**o+(-0.304367076307)*x[2]
-        arg[1,0,2,0]=(-0.237305477187)*x[0]**o+(-0.997679652719)*x[0]+(0.485994068389)*x[1]**o+(0.44508530534)*x[1]+(0.940139935628)*x[2]**o+(0.0789221540062)*x[2]
-        arg[1,0,2,1]=(0.814928463364)*x[0]**o+(-0.257693939789)*x[0]+(0.179643785703)*x[1]**o+(-0.696436530567)*x[1]+(-0.592226945554)*x[2]**o+(-0.454620411499)*x[2]
-        arg[1,1,0,0]=(-0.933925672439)*x[0]**o+(0.212298180817)*x[0]+(-0.447836316801)*x[1]**o+(0.180796376138)*x[1]+(-0.749910125701)*x[2]**o+(0.134540433851)*x[2]
-        arg[1,1,0,1]=(-0.649009346978)*x[0]**o+(0.0316819485953)*x[0]+(-0.718001767835)*x[1]**o+(0.289608435124)*x[1]+(-0.906045493384)*x[2]**o+(0.851021484125)*x[2]
-        arg[1,1,1,0]=(-0.216265404566)*x[0]**o+(0.657073282172)*x[0]+(-0.796155541438)*x[1]**o+(0.338980498824)*x[1]+(0.477444448193)*x[2]**o+(0.674278909522)*x[2]
-        arg[1,1,1,1]=(-0.67605942954)*x[0]**o+(0.457997253216)*x[0]+(-0.973576381948)*x[1]**o+(0.430432753773)*x[1]+(0.0329169564451)*x[2]**o+(-0.422512702485)*x[2]
-        arg[1,1,2,0]=(-0.32458256139)*x[0]**o+(0.289568625922)*x[0]+(-0.529564027476)*x[1]**o+(0.596449833118)*x[1]+(0.960461031989)*x[2]**o+(0.00801425321069)*x[2]
-        arg[1,1,2,1]=(-0.0425883615923)*x[0]**o+(-0.313926807333)*x[0]+(0.766062773671)*x[1]**o+(-0.857784560309)*x[1]+(0.914867381682)*x[2]**o+(-0.312493334639)*x[2]
-        arg[1,2,0,0]=(-0.637151767355)*x[0]**o+(-0.679947136952)*x[0]+(-0.0838349105494)*x[1]**o+(0.00800835879666)*x[1]+(0.385024194519)*x[2]**o+(-0.627828236571)*x[2]
-        arg[1,2,0,1]=(-0.62580153007)*x[0]**o+(-0.183834415542)*x[0]+(0.322406823575)*x[1]**o+(0.302908755868)*x[1]+(0.727234001542)*x[2]**o+(-0.933944878425)*x[2]
-        arg[1,2,1,0]=(-0.897198312615)*x[0]**o+(0.825086526945)*x[0]+(-0.031001758991)*x[1]**o+(0.987845551304)*x[1]+(-0.551212418179)*x[2]**o+(0.657813241764)*x[2]
-        arg[1,2,1,1]=(-0.544595822278)*x[0]**o+(0.595858429591)*x[0]+(-0.557503238514)*x[1]**o+(0.507560179011)*x[1]+(-0.519438270771)*x[2]**o+(-0.471678264995)*x[2]
-        arg[1,2,2,0]=(0.135616278099)*x[0]**o+(0.40676743342)*x[0]+(0.458810719213)*x[1]**o+(-0.881620410228)*x[1]+(-0.897267732846)*x[2]**o+(0.665458992487)*x[2]
-        arg[1,2,2,1]=(0.83854610457)*x[0]**o+(0.670263196782)*x[0]+(0.551767734306)*x[1]**o+(0.883934821215)*x[1]+(0.455375261768)*x[2]**o+(0.95604480045)*x[2]
-        arg[1,3,0,0]=(0.705853698882)*x[0]**o+(0.84681314245)*x[0]+(-0.0984020252408)*x[1]**o+(0.943165990555)*x[1]+(-0.428955841327)*x[2]**o+(0.0961618993003)*x[2]
-        arg[1,3,0,1]=(0.583731800337)*x[0]**o+(-0.738079255003)*x[0]+(0.315556768944)*x[1]**o+(-0.489631118687)*x[1]+(0.371775779104)*x[2]**o+(0.82029490872)*x[2]
-        arg[1,3,1,0]=(-0.885657545142)*x[0]**o+(0.542706113286)*x[0]+(0.800319452136)*x[1]**o+(0.314194184897)*x[1]+(-0.320905532427)*x[2]**o+(-0.314307365683)*x[2]
-        arg[1,3,1,1]=(-0.217030771566)*x[0]**o+(0.260108519031)*x[0]+(-0.686624725975)*x[1]**o+(-0.869322439609)*x[1]+(0.558806239315)*x[2]**o+(-0.440661121246)*x[2]
-        arg[1,3,2,0]=(-0.839335541382)*x[0]**o+(0.228726621639)*x[0]+(0.354403444002)*x[1]**o+(0.215616048959)*x[1]+(0.49622647562)*x[2]**o+(-0.725639112729)*x[2]
-        arg[1,3,2,1]=(-0.439687404632)*x[0]**o+(-0.820583921269)*x[0]+(-0.863730409631)*x[1]**o+(0.119773401911)*x[1]+(0.460158483187)*x[2]**o+(0.757153436592)*x[2]
-        arg[1,4,0,0]=(-0.77288839701)*x[0]**o+(-0.570203714622)*x[0]+(0.93832772305)*x[1]**o+(-0.759089944596)*x[1]+(0.000174937961704)*x[2]**o+(0.812917484286)*x[2]
-        arg[1,4,0,1]=(-0.25535378432)*x[0]**o+(-0.0938207170929)*x[0]+(0.0545321717685)*x[1]**o+(-0.414414792674)*x[1]+(-0.297698896712)*x[2]**o+(-0.367166660571)*x[2]
-        arg[1,4,1,0]=(0.743408112248)*x[0]**o+(0.852863814785)*x[0]+(0.259483951249)*x[1]**o+(-0.519288864163)*x[1]+(-0.305772267727)*x[2]**o+(-0.401384318883)*x[2]
-        arg[1,4,1,1]=(0.194889815352)*x[0]**o+(0.522093986804)*x[0]+(-0.343320977396)*x[1]**o+(0.21840236597)*x[1]+(-0.672107409136)*x[2]**o+(-0.600203805002)*x[2]
-        arg[1,4,2,0]=(0.420860556361)*x[0]**o+(0.789879869049)*x[0]+(0.100987805744)*x[1]**o+(0.802794815123)*x[1]+(-0.69466030201)*x[2]**o+(-0.746043845966)*x[2]
-        arg[1,4,2,1]=(-0.306621579211)*x[0]**o+(-0.0676982346933)*x[0]+(0.568861573715)*x[1]**o+(0.0823366334578)*x[1]+(0.501187255641)*x[2]**o+(-0.538615164478)*x[2]
-        arg[2,0,0,0]=(-0.231052916706)*x[0]**o+(0.127790831537)*x[0]+(-0.475600435038)*x[1]**o+(0.431586151473)*x[1]+(-0.882365547235)*x[2]**o+(0.778027701879)*x[2]
-        arg[2,0,0,1]=(0.0709490835498)*x[0]**o+(0.442614693755)*x[0]+(0.870405247692)*x[1]**o+(-0.648538779515)*x[1]+(0.751107652054)*x[2]**o+(0.0122956931127)*x[2]
-        arg[2,0,1,0]=(0.703128329145)*x[0]**o+(0.259775843631)*x[0]+(0.311958888594)*x[1]**o+(-0.0445092402277)*x[1]+(0.338222457799)*x[2]**o+(0.845995300456)*x[2]
-        arg[2,0,1,1]=(-0.653977898919)*x[0]**o+(0.0495539350857)*x[0]+(0.4013623408)*x[1]**o+(0.490747039887)*x[1]+(-0.480487636729)*x[2]**o+(0.361660115775)*x[2]
-        arg[2,0,2,0]=(0.215778506945)*x[0]**o+(0.316853875053)*x[0]+(0.556770639829)*x[1]**o+(-0.499729882355)*x[1]+(0.692012327582)*x[2]**o+(0.00681314946195)*x[2]
-        arg[2,0,2,1]=(0.432077857223)*x[0]**o+(-0.0497579036988)*x[0]+(-0.465403408565)*x[1]**o+(0.125421502956)*x[1]+(-0.313541879877)*x[2]**o+(0.113957941731)*x[2]
-        arg[2,1,0,0]=(-0.528126103192)*x[0]**o+(-0.141306512096)*x[0]+(-0.505835313198)*x[1]**o+(-0.0433171534408)*x[1]+(-0.522465687628)*x[2]**o+(-0.16728285732)*x[2]
-        arg[2,1,0,1]=(0.892019660948)*x[0]**o+(0.646944130193)*x[0]+(0.865495756748)*x[1]**o+(0.949095276008)*x[1]+(0.786394755068)*x[2]**o+(0.482441081687)*x[2]
-        arg[2,1,1,0]=(-0.0485295711204)*x[0]**o+(0.250163927911)*x[0]+(0.0387861125998)*x[1]**o+(-0.0789121929817)*x[1]+(-0.982330126583)*x[2]**o+(0.66328870814)*x[2]
-        arg[2,1,1,1]=(-0.494726556678)*x[0]**o+(-0.961342091528)*x[0]+(0.211410563083)*x[1]**o+(-0.884287887286)*x[1]+(-0.583401908135)*x[2]**o+(-0.361423905219)*x[2]
-        arg[2,1,2,0]=(-0.326785246692)*x[0]**o+(0.596272945325)*x[0]+(0.625039539234)*x[1]**o+(0.88699688986)*x[1]+(-0.649803810419)*x[2]**o+(0.890718271469)*x[2]
-        arg[2,1,2,1]=(0.702110072391)*x[0]**o+(0.72009439563)*x[0]+(-0.930941572511)*x[1]**o+(0.955877158334)*x[1]+(0.1211281332)*x[2]**o+(0.658738626852)*x[2]
-        arg[2,2,0,0]=(-0.177402589697)*x[0]**o+(0.701090894256)*x[0]+(-0.00205333079339)*x[1]**o+(-0.427862310859)*x[1]+(0.529186374803)*x[2]**o+(-0.110462035551)*x[2]
-        arg[2,2,0,1]=(-0.104112165367)*x[0]**o+(0.043539351452)*x[0]+(0.757384935306)*x[1]**o+(-0.451086492844)*x[1]+(0.0549627297033)*x[2]**o+(-0.311718955315)*x[2]
-        arg[2,2,1,0]=(-0.579986090808)*x[0]**o+(-0.922872917924)*x[0]+(0.66422700207)*x[1]**o+(0.947304780214)*x[1]+(-0.0492553517704)*x[2]**o+(0.817225619153)*x[2]
-        arg[2,2,1,1]=(0.306298476233)*x[0]**o+(-0.620190960783)*x[0]+(-0.684876074013)*x[1]**o+(-0.371829616982)*x[1]+(0.904709743321)*x[2]**o+(0.170802273852)*x[2]
-        arg[2,2,2,0]=(0.317943399758)*x[0]**o+(0.518026054212)*x[0]+(-0.801462311167)*x[1]**o+(0.767424157898)*x[1]+(-0.547271995492)*x[2]**o+(-0.912619177188)*x[2]
-        arg[2,2,2,1]=(-0.848711258358)*x[0]**o+(0.456489097468)*x[0]+(-0.310979078367)*x[1]**o+(-0.946717007726)*x[1]+(0.454363833646)*x[2]**o+(-0.715701991077)*x[2]
-        arg[2,3,0,0]=(0.605493533014)*x[0]**o+(0.478437880368)*x[0]+(-0.672727491605)*x[1]**o+(0.831259256009)*x[1]+(-0.434153354239)*x[2]**o+(-0.505363218578)*x[2]
-        arg[2,3,0,1]=(-0.0703539676643)*x[0]**o+(-0.452352344215)*x[0]+(0.0403568720903)*x[1]**o+(0.959415939826)*x[1]+(-0.784519698477)*x[2]**o+(-0.691664442958)*x[2]
-        arg[2,3,1,0]=(0.696353768719)*x[0]**o+(0.295477297618)*x[0]+(0.580540484825)*x[1]**o+(0.098954967023)*x[1]+(-0.547594444517)*x[2]**o+(-0.574783665389)*x[2]
-        arg[2,3,1,1]=(0.997841887408)*x[0]**o+(0.857864040549)*x[0]+(-0.413188343971)*x[1]**o+(0.344770631687)*x[1]+(-0.127257058552)*x[2]**o+(0.132618819456)*x[2]
-        arg[2,3,2,0]=(0.174045751083)*x[0]**o+(0.866724759298)*x[0]+(0.0818516103455)*x[1]**o+(-0.891670609599)*x[1]+(0.982721717044)*x[2]**o+(0.378710155856)*x[2]
-        arg[2,3,2,1]=(0.7760778906)*x[0]**o+(-0.710104290654)*x[0]+(-0.471259845977)*x[1]**o+(-0.791979211724)*x[1]+(-0.845652753706)*x[2]**o+(-0.301795837852)*x[2]
-        arg[2,4,0,0]=(-0.698193658421)*x[0]**o+(-0.831956135385)*x[0]+(-0.442637915133)*x[1]**o+(0.108715813637)*x[1]+(-0.888348149694)*x[2]**o+(-0.90115888496)*x[2]
-        arg[2,4,0,1]=(0.770237705577)*x[0]**o+(0.889304763618)*x[0]+(-0.139196183564)*x[1]**o+(0.332516232239)*x[1]+(-0.0218103253052)*x[2]**o+(-0.368033928854)*x[2]
-        arg[2,4,1,0]=(0.675479351844)*x[0]**o+(0.880998418303)*x[0]+(0.408381837105)*x[1]**o+(0.717402364084)*x[1]+(-0.303902947422)*x[2]**o+(-0.322350049962)*x[2]
-        arg[2,4,1,1]=(-0.480881673289)*x[0]**o+(0.30290141529)*x[0]+(-0.538411390886)*x[1]**o+(0.260090848702)*x[1]+(0.638130764808)*x[2]**o+(0.756338975575)*x[2]
-        arg[2,4,2,0]=(-0.299233221889)*x[0]**o+(-0.26471083761)*x[0]+(0.717191172884)*x[1]**o+(0.488553216118)*x[1]+(0.718956726644)*x[2]**o+(0.370889025703)*x[2]
-        arg[2,4,2,1]=(-0.989020272269)*x[0]**o+(-0.891423884362)*x[0]+(0.486153100693)*x[1]**o+(-0.971171395246)*x[1]+(-0.766942968184)*x[2]**o+(0.728728968862)*x[2]
-        arg[3,0,0,0]=(0.756186246227)*x[0]**o+(0.76507856268)*x[0]+(0.771165000414)*x[1]**o+(0.673968873856)*x[1]+(0.827045846253)*x[2]**o+(-0.788265752412)*x[2]
-        arg[3,0,0,1]=(-0.66925731439)*x[0]**o+(-0.0110127596435)*x[0]+(0.944388255414)*x[1]**o+(-0.613832072486)*x[1]+(0.0977542120724)*x[2]**o+(0.100776856689)*x[2]
-        arg[3,0,1,0]=(0.905138713064)*x[0]**o+(0.673051338153)*x[0]+(0.240614253653)*x[1]**o+(-0.964132330033)*x[1]+(-0.114961018838)*x[2]**o+(-0.438756962988)*x[2]
-        arg[3,0,1,1]=(-0.192259182094)*x[0]**o+(0.12315590119)*x[0]+(-0.907744420226)*x[1]**o+(-0.483981269809)*x[1]+(-0.169699431472)*x[2]**o+(-0.45231635406)*x[2]
-        arg[3,0,2,0]=(0.895387255885)*x[0]**o+(0.23892997411)*x[0]+(-0.396010446618)*x[1]**o+(0.94853984413)*x[1]+(-0.0165259637241)*x[2]**o+(-0.312558539149)*x[2]
-        arg[3,0,2,1]=(0.710478713361)*x[0]**o+(-0.109316102216)*x[0]+(-0.042711568986)*x[1]**o+(-0.448508085742)*x[1]+(-0.0979193346011)*x[2]**o+(0.93156672211)*x[2]
-        arg[3,1,0,0]=(-0.21605108221)*x[0]**o+(0.410466481712)*x[0]+(0.799288386783)*x[1]**o+(0.622866017113)*x[1]+(-0.236698938159)*x[2]**o+(0.246625241928)*x[2]
-        arg[3,1,0,1]=(0.989568527762)*x[0]**o+(0.0212906378151)*x[0]+(0.311279947324)*x[1]**o+(-0.231412902902)*x[1]+(-0.444760786142)*x[2]**o+(0.908171985421)*x[2]
-        arg[3,1,1,0]=(0.42605234231)*x[0]**o+(-0.58629332944)*x[0]+(0.322063640761)*x[1]**o+(0.837771339825)*x[1]+(-0.911083211394)*x[2]**o+(-0.0699607581992)*x[2]
-        arg[3,1,1,1]=(0.75449445591)*x[0]**o+(0.722970800307)*x[0]+(-0.582970919465)*x[1]**o+(-0.868818538212)*x[1]+(0.940067636181)*x[2]**o+(-0.659469743617)*x[2]
-        arg[3,1,2,0]=(-0.391224924663)*x[0]**o+(-0.768173177737)*x[0]+(-0.856876347997)*x[1]**o+(-0.0451180499647)*x[1]+(0.198590679246)*x[2]**o+(0.187329095476)*x[2]
-        arg[3,1,2,1]=(0.483309063092)*x[0]**o+(-0.0777241026893)*x[0]+(0.0438427457286)*x[1]**o+(-0.73195704867)*x[1]+(-0.439660745725)*x[2]**o+(0.279501672861)*x[2]
-        arg[3,2,0,0]=(0.799935089139)*x[0]**o+(-0.306860809857)*x[0]+(0.169104975039)*x[1]**o+(-0.3480717525)*x[1]+(0.215231688)*x[2]**o+(-0.528775376945)*x[2]
-        arg[3,2,0,1]=(0.917815789587)*x[0]**o+(0.0672910338102)*x[0]+(-0.186550440011)*x[1]**o+(0.922579714252)*x[1]+(0.924162379857)*x[2]**o+(-0.769320483618)*x[2]
-        arg[3,2,1,0]=(0.604324468058)*x[0]**o+(-0.0109731419053)*x[0]+(0.229447318325)*x[1]**o+(-0.480693435232)*x[1]+(-0.881779256999)*x[2]**o+(0.288656394771)*x[2]
-        arg[3,2,1,1]=(0.934680723352)*x[0]**o+(0.993838528376)*x[0]+(0.957781588502)*x[1]**o+(-0.859837057866)*x[1]+(-0.702139964493)*x[2]**o+(0.0538177124609)*x[2]
-        arg[3,2,2,0]=(-0.142809047814)*x[0]**o+(-0.472594415134)*x[0]+(0.0381782768377)*x[1]**o+(0.727331491769)*x[1]+(0.0910992897581)*x[2]**o+(-0.845316063851)*x[2]
-        arg[3,2,2,1]=(-0.217483358272)*x[0]**o+(0.991535092285)*x[0]+(-0.399175896468)*x[1]**o+(-0.665836512895)*x[1]+(0.0983700911493)*x[2]**o+(0.321811300155)*x[2]
-        arg[3,3,0,0]=(0.797049585464)*x[0]**o+(-0.724467959299)*x[0]+(0.19971589973)*x[1]**o+(0.845928461864)*x[1]+(-0.365158866359)*x[2]**o+(-0.698274270132)*x[2]
-        arg[3,3,0,1]=(-0.638474704878)*x[0]**o+(0.551866433352)*x[0]+(0.192309452979)*x[1]**o+(-0.703649325501)*x[1]+(0.823910578138)*x[2]**o+(-0.917446989634)*x[2]
-        arg[3,3,1,0]=(0.217577282169)*x[0]**o+(0.521716803668)*x[0]+(-0.116587783856)*x[1]**o+(0.529672391417)*x[1]+(-0.798918158284)*x[2]**o+(-0.0996139511955)*x[2]
-        arg[3,3,1,1]=(0.498965049079)*x[0]**o+(0.316489921186)*x[0]+(-0.0988355471817)*x[1]**o+(-0.0477508287681)*x[1]+(-0.778914523993)*x[2]**o+(0.189397812723)*x[2]
-        arg[3,3,2,0]=(0.203823698152)*x[0]**o+(-0.340499414266)*x[0]+(0.353374693517)*x[1]**o+(-0.91035264494)*x[1]+(-0.779204084198)*x[2]**o+(-0.00276454165248)*x[2]
-        arg[3,3,2,1]=(0.295232007123)*x[0]**o+(0.271766544502)*x[0]+(0.431956430336)*x[1]**o+(0.896481311536)*x[1]+(-0.325014902487)*x[2]**o+(0.70836170284)*x[2]
-        arg[3,4,0,0]=(-0.407535202468)*x[0]**o+(-0.33055681091)*x[0]+(0.129762143151)*x[1]**o+(0.352087436228)*x[1]+(-0.538770401565)*x[2]**o+(-0.519071077045)*x[2]
-        arg[3,4,0,1]=(0.846011435499)*x[0]**o+(0.172822133672)*x[0]+(-0.740732553847)*x[1]**o+(0.230062837231)*x[1]+(-0.231810007237)*x[2]**o+(-0.568366338923)*x[2]
-        arg[3,4,1,0]=(-0.198091119057)*x[0]**o+(0.957989508794)*x[0]+(0.861739071175)*x[1]**o+(0.923450697883)*x[1]+(-0.755262504937)*x[2]**o+(0.102897579936)*x[2]
-        arg[3,4,1,1]=(0.198829545353)*x[0]**o+(-0.757182006818)*x[0]+(0.254092337808)*x[1]**o+(-0.00815072620097)*x[1]+(0.347421988308)*x[2]**o+(-0.0215277616923)*x[2]
-        arg[3,4,2,0]=(0.775062112529)*x[0]**o+(-0.77746792774)*x[0]+(-0.666490294869)*x[1]**o+(-0.679971069878)*x[1]+(-0.972450779894)*x[2]**o+(-0.705322282477)*x[2]
-        arg[3,4,2,1]=(-0.0994927587382)*x[0]**o+(0.293071774786)*x[0]+(0.370784399397)*x[1]**o+(0.931411225946)*x[1]+(-0.55789163294)*x[2]**o+(0.0831890658592)*x[2]
-        ref[0,0,0,0]=(-0.657703355307)*x_ref[0]**o+(0.397813831843)*x_ref[0]+(0.364460538717)*x_ref[1]**o+(-0.845626669617)*x_ref[1]+(-0.987144254126)*x_ref[2]**o+(-0.732384980726)*x_ref[2]
-        ref[0,0,0,1]=(-0.13280304886)*x_ref[0]**o+(-0.953796807758)*x_ref[0]+(0.875723746654)*x_ref[1]**o+(0.0764745117242)*x_ref[1]+(-0.536085676221)*x_ref[2]**o+(-0.520611959678)*x_ref[2]
-        ref[0,0,1,0]=(0.716429446578)*x_ref[0]**o+(-0.729164693441)*x_ref[0]+(-0.832505557428)*x_ref[1]**o+(-0.329200605611)*x_ref[1]+(0.0310162060964)*x_ref[2]**o+(-0.869978941999)*x_ref[2]
-        ref[0,0,1,1]=(0.110253530584)*x_ref[0]**o+(0.995528486822)*x_ref[0]+(0.838577797395)*x_ref[1]**o+(0.443987752225)*x_ref[1]+(0.387337959057)*x_ref[2]**o+(0.548448752612)*x_ref[2]
-        ref[0,0,2,0]=(-0.995737515431)*x_ref[0]**o+(-0.899807241717)*x_ref[0]+(-0.0803287764138)*x_ref[1]**o+(0.242680051556)*x_ref[1]+(0.58974836823)*x_ref[2]**o+(-0.498450188944)*x_ref[2]
-        ref[0,0,2,1]=(0.341561541555)*x_ref[0]**o+(-0.00541988184597)*x_ref[0]+(-0.204832898701)*x_ref[1]**o+(-0.957247935865)*x_ref[1]+(-0.441002902064)*x_ref[2]**o+(0.756843480304)*x_ref[2]
-        ref[0,1,0,0]=(0.136201526244)*x_ref[0]**o+(0.517677304193)*x_ref[0]+(0.523031610748)*x_ref[1]**o+(-0.908998053383)*x_ref[1]+(-0.629649678416)*x_ref[2]**o+(0.762977917512)*x_ref[2]
-        ref[0,1,0,1]=(-0.103521080864)*x_ref[0]**o+(-0.434410222595)*x_ref[0]+(0.418239530241)*x_ref[1]**o+(0.65638475119)*x_ref[1]+(0.413036393129)*x_ref[2]**o+(-0.220365518353)*x_ref[2]
-        ref[0,1,1,0]=(-0.415690201483)*x_ref[0]**o+(-0.969323394689)*x_ref[0]+(-0.295639420195)*x_ref[1]**o+(-0.24915002749)*x_ref[1]+(-0.00927627101467)*x_ref[2]**o+(0.520335261634)*x_ref[2]
-        ref[0,1,1,1]=(-0.262653741797)*x_ref[0]**o+(-0.463590591666)*x_ref[0]+(0.568893042923)*x_ref[1]**o+(-0.869851332898)*x_ref[1]+(-0.463261399415)*x_ref[2]**o+(0.0281915686202)*x_ref[2]
-        ref[0,1,2,0]=(0.377159503058)*x_ref[0]**o+(0.484512261943)*x_ref[0]+(0.0303594628925)*x_ref[1]**o+(0.482051243004)*x_ref[1]+(0.240643013949)*x_ref[2]**o+(-0.943908617705)*x_ref[2]
-        ref[0,1,2,1]=(0.843854614097)*x_ref[0]**o+(0.018041534553)*x_ref[0]+(0.264198703361)*x_ref[1]**o+(0.732889517628)*x_ref[1]+(-0.154807384394)*x_ref[2]**o+(0.60513622187)*x_ref[2]
-        ref[0,2,0,0]=(-0.234758118286)*x_ref[0]**o+(-0.77807396119)*x_ref[0]+(-0.97783091103)*x_ref[1]**o+(-0.716185223828)*x_ref[1]+(-0.573126474259)*x_ref[2]**o+(0.403110701555)*x_ref[2]
-        ref[0,2,0,1]=(-0.853878344804)*x_ref[0]**o+(-0.482644826561)*x_ref[0]+(-0.826041149012)*x_ref[1]**o+(0.596376234798)*x_ref[1]+(-0.216400517274)*x_ref[2]**o+(-0.323127194259)*x_ref[2]
-        ref[0,2,1,0]=(0.931551121492)*x_ref[0]**o+(-0.527132174379)*x_ref[0]+(0.373496704463)*x_ref[1]**o+(-0.375215826463)*x_ref[1]+(-0.639167297984)*x_ref[2]**o+(0.143608733189)*x_ref[2]
-        ref[0,2,1,1]=(-0.982206000879)*x_ref[0]**o+(0.836589596534)*x_ref[0]+(0.606275000138)*x_ref[1]**o+(-0.821469453892)*x_ref[1]+(-0.633828380948)*x_ref[2]**o+(-0.637688777216)*x_ref[2]
-        ref[0,2,2,0]=(0.441649557529)*x_ref[0]**o+(-0.34978365051)*x_ref[0]+(0.514175365405)*x_ref[1]**o+(-0.903212271234)*x_ref[1]+(0.70236887156)*x_ref[2]**o+(0.72953045189)*x_ref[2]
-        ref[0,2,2,1]=(0.302787896978)*x_ref[0]**o+(0.157598071021)*x_ref[0]+(-0.357101947632)*x_ref[1]**o+(0.381098383156)*x_ref[1]+(-0.552546036689)*x_ref[2]**o+(0.448181721984)*x_ref[2]
-        ref[0,3,0,0]=(0.662181077399)*x_ref[0]**o+(-0.283755239518)*x_ref[0]+(0.33694741278)*x_ref[1]**o+(0.275801685868)*x_ref[1]+(0.526155259101)*x_ref[2]**o+(-0.378241855559)*x_ref[2]
-        ref[0,3,0,1]=(0.157822133581)*x_ref[0]**o+(0.25402072747)*x_ref[0]+(0.522842123099)*x_ref[1]**o+(0.510595773584)*x_ref[1]+(-0.829239126666)*x_ref[2]**o+(0.990879342044)*x_ref[2]
-        ref[0,3,1,0]=(-0.775925280059)*x_ref[0]**o+(-0.726971388023)*x_ref[0]+(-0.630088730753)*x_ref[1]**o+(-0.731024178237)*x_ref[1]+(-0.288643541196)*x_ref[2]**o+(-0.283708428793)*x_ref[2]
-        ref[0,3,1,1]=(-0.883176640445)*x_ref[0]**o+(-0.0810211976762)*x_ref[0]+(-0.102919217784)*x_ref[1]**o+(0.271384866385)*x_ref[1]+(0.980796900477)*x_ref[2]**o+(0.439294038672)*x_ref[2]
-        ref[0,3,2,0]=(-0.826688221502)*x_ref[0]**o+(-0.909388347347)*x_ref[0]+(0.164406927722)*x_ref[1]**o+(0.60157189364)*x_ref[1]+(-0.885578176748)*x_ref[2]**o+(0.610008674247)*x_ref[2]
-        ref[0,3,2,1]=(0.130154197193)*x_ref[0]**o+(-0.754703602975)*x_ref[0]+(0.00463710497017)*x_ref[1]**o+(0.502162916123)*x_ref[1]+(-0.749124548541)*x_ref[2]**o+(0.946592962092)*x_ref[2]
-        ref[0,4,0,0]=(-0.0478347448906)*x_ref[0]**o+(-0.812937871882)*x_ref[0]+(-0.460982012551)*x_ref[1]**o+(0.317485998991)*x_ref[1]+(-0.593671683477)*x_ref[2]**o+(0.551385718668)*x_ref[2]
-        ref[0,4,0,1]=(0.281998767502)*x_ref[0]**o+(-0.0613830311997)*x_ref[0]+(0.981429151019)*x_ref[1]**o+(-0.580567714008)*x_ref[1]+(0.0369483005331)*x_ref[2]**o+(-0.74132358588)*x_ref[2]
-        ref[0,4,1,0]=(0.525845217483)*x_ref[0]**o+(0.907803915216)*x_ref[0]+(0.111429079263)*x_ref[1]**o+(-0.653030401377)*x_ref[1]+(0.0814793913696)*x_ref[2]**o+(-0.419201413875)*x_ref[2]
-        ref[0,4,1,1]=(0.862892518463)*x_ref[0]**o+(0.34033875398)*x_ref[0]+(0.0371376953103)*x_ref[1]**o+(0.568160310726)*x_ref[1]+(-0.237231036717)*x_ref[2]**o+(-0.130046899302)*x_ref[2]
-        ref[0,4,2,0]=(0.223651181698)*x_ref[0]**o+(0.730991398203)*x_ref[0]+(0.133551525027)*x_ref[1]**o+(0.685783540126)*x_ref[1]+(0.339586395814)*x_ref[2]**o+(-0.524371194863)*x_ref[2]
-        ref[0,4,2,1]=(0.220110871383)*x_ref[0]**o+(-0.37385773877)*x_ref[0]+(0.773372000545)*x_ref[1]**o+(-0.4261356565)*x_ref[1]+(-0.619438438945)*x_ref[2]**o+(0.126288949127)*x_ref[2]
-        ref[1,0,0,0]=(0.727680196631)*x_ref[0]**o+(-0.876280912599)*x_ref[0]+(0.576553782915)*x_ref[1]**o+(-0.0497780322367)*x_ref[1]+(-0.690257457282)*x_ref[2]**o+(-0.11130953054)*x_ref[2]
-        ref[1,0,0,1]=(0.331863815938)*x_ref[0]**o+(0.169379824389)*x_ref[0]+(0.665507756012)*x_ref[1]**o+(0.94933357273)*x_ref[1]+(-0.610506070093)*x_ref[2]**o+(0.752476708027)*x_ref[2]
-        ref[1,0,1,0]=(0.851320583415)*x_ref[0]**o+(-0.697235996161)*x_ref[0]+(0.235192165807)*x_ref[1]**o+(0.325473517022)*x_ref[1]+(-0.424683549673)*x_ref[2]**o+(0.228953796486)*x_ref[2]
-        ref[1,0,1,1]=(0.804192098517)*x_ref[0]**o+(-0.684337197059)*x_ref[0]+(-0.349251615715)*x_ref[1]**o+(0.596165705743)*x_ref[1]+(-0.636033221182)*x_ref[2]**o+(-0.304367076307)*x_ref[2]
-        ref[1,0,2,0]=(-0.237305477187)*x_ref[0]**o+(-0.997679652719)*x_ref[0]+(0.485994068389)*x_ref[1]**o+(0.44508530534)*x_ref[1]+(0.940139935628)*x_ref[2]**o+(0.0789221540062)*x_ref[2]
-        ref[1,0,2,1]=(0.814928463364)*x_ref[0]**o+(-0.257693939789)*x_ref[0]+(0.179643785703)*x_ref[1]**o+(-0.696436530567)*x_ref[1]+(-0.592226945554)*x_ref[2]**o+(-0.454620411499)*x_ref[2]
-        ref[1,1,0,0]=(-0.933925672439)*x_ref[0]**o+(0.212298180817)*x_ref[0]+(-0.447836316801)*x_ref[1]**o+(0.180796376138)*x_ref[1]+(-0.749910125701)*x_ref[2]**o+(0.134540433851)*x_ref[2]
-        ref[1,1,0,1]=(-0.649009346978)*x_ref[0]**o+(0.0316819485953)*x_ref[0]+(-0.718001767835)*x_ref[1]**o+(0.289608435124)*x_ref[1]+(-0.906045493384)*x_ref[2]**o+(0.851021484125)*x_ref[2]
-        ref[1,1,1,0]=(-0.216265404566)*x_ref[0]**o+(0.657073282172)*x_ref[0]+(-0.796155541438)*x_ref[1]**o+(0.338980498824)*x_ref[1]+(0.477444448193)*x_ref[2]**o+(0.674278909522)*x_ref[2]
-        ref[1,1,1,1]=(-0.67605942954)*x_ref[0]**o+(0.457997253216)*x_ref[0]+(-0.973576381948)*x_ref[1]**o+(0.430432753773)*x_ref[1]+(0.0329169564451)*x_ref[2]**o+(-0.422512702485)*x_ref[2]
-        ref[1,1,2,0]=(-0.32458256139)*x_ref[0]**o+(0.289568625922)*x_ref[0]+(-0.529564027476)*x_ref[1]**o+(0.596449833118)*x_ref[1]+(0.960461031989)*x_ref[2]**o+(0.00801425321069)*x_ref[2]
-        ref[1,1,2,1]=(-0.0425883615923)*x_ref[0]**o+(-0.313926807333)*x_ref[0]+(0.766062773671)*x_ref[1]**o+(-0.857784560309)*x_ref[1]+(0.914867381682)*x_ref[2]**o+(-0.312493334639)*x_ref[2]
-        ref[1,2,0,0]=(-0.637151767355)*x_ref[0]**o+(-0.679947136952)*x_ref[0]+(-0.0838349105494)*x_ref[1]**o+(0.00800835879666)*x_ref[1]+(0.385024194519)*x_ref[2]**o+(-0.627828236571)*x_ref[2]
-        ref[1,2,0,1]=(-0.62580153007)*x_ref[0]**o+(-0.183834415542)*x_ref[0]+(0.322406823575)*x_ref[1]**o+(0.302908755868)*x_ref[1]+(0.727234001542)*x_ref[2]**o+(-0.933944878425)*x_ref[2]
-        ref[1,2,1,0]=(-0.897198312615)*x_ref[0]**o+(0.825086526945)*x_ref[0]+(-0.031001758991)*x_ref[1]**o+(0.987845551304)*x_ref[1]+(-0.551212418179)*x_ref[2]**o+(0.657813241764)*x_ref[2]
-        ref[1,2,1,1]=(-0.544595822278)*x_ref[0]**o+(0.595858429591)*x_ref[0]+(-0.557503238514)*x_ref[1]**o+(0.507560179011)*x_ref[1]+(-0.519438270771)*x_ref[2]**o+(-0.471678264995)*x_ref[2]
-        ref[1,2,2,0]=(0.135616278099)*x_ref[0]**o+(0.40676743342)*x_ref[0]+(0.458810719213)*x_ref[1]**o+(-0.881620410228)*x_ref[1]+(-0.897267732846)*x_ref[2]**o+(0.665458992487)*x_ref[2]
-        ref[1,2,2,1]=(0.83854610457)*x_ref[0]**o+(0.670263196782)*x_ref[0]+(0.551767734306)*x_ref[1]**o+(0.883934821215)*x_ref[1]+(0.455375261768)*x_ref[2]**o+(0.95604480045)*x_ref[2]
-        ref[1,3,0,0]=(0.705853698882)*x_ref[0]**o+(0.84681314245)*x_ref[0]+(-0.0984020252408)*x_ref[1]**o+(0.943165990555)*x_ref[1]+(-0.428955841327)*x_ref[2]**o+(0.0961618993003)*x_ref[2]
-        ref[1,3,0,1]=(0.583731800337)*x_ref[0]**o+(-0.738079255003)*x_ref[0]+(0.315556768944)*x_ref[1]**o+(-0.489631118687)*x_ref[1]+(0.371775779104)*x_ref[2]**o+(0.82029490872)*x_ref[2]
-        ref[1,3,1,0]=(-0.885657545142)*x_ref[0]**o+(0.542706113286)*x_ref[0]+(0.800319452136)*x_ref[1]**o+(0.314194184897)*x_ref[1]+(-0.320905532427)*x_ref[2]**o+(-0.314307365683)*x_ref[2]
-        ref[1,3,1,1]=(-0.217030771566)*x_ref[0]**o+(0.260108519031)*x_ref[0]+(-0.686624725975)*x_ref[1]**o+(-0.869322439609)*x_ref[1]+(0.558806239315)*x_ref[2]**o+(-0.440661121246)*x_ref[2]
-        ref[1,3,2,0]=(-0.839335541382)*x_ref[0]**o+(0.228726621639)*x_ref[0]+(0.354403444002)*x_ref[1]**o+(0.215616048959)*x_ref[1]+(0.49622647562)*x_ref[2]**o+(-0.725639112729)*x_ref[2]
-        ref[1,3,2,1]=(-0.439687404632)*x_ref[0]**o+(-0.820583921269)*x_ref[0]+(-0.863730409631)*x_ref[1]**o+(0.119773401911)*x_ref[1]+(0.460158483187)*x_ref[2]**o+(0.757153436592)*x_ref[2]
-        ref[1,4,0,0]=(-0.77288839701)*x_ref[0]**o+(-0.570203714622)*x_ref[0]+(0.93832772305)*x_ref[1]**o+(-0.759089944596)*x_ref[1]+(0.000174937961704)*x_ref[2]**o+(0.812917484286)*x_ref[2]
-        ref[1,4,0,1]=(-0.25535378432)*x_ref[0]**o+(-0.0938207170929)*x_ref[0]+(0.0545321717685)*x_ref[1]**o+(-0.414414792674)*x_ref[1]+(-0.297698896712)*x_ref[2]**o+(-0.367166660571)*x_ref[2]
-        ref[1,4,1,0]=(0.743408112248)*x_ref[0]**o+(0.852863814785)*x_ref[0]+(0.259483951249)*x_ref[1]**o+(-0.519288864163)*x_ref[1]+(-0.305772267727)*x_ref[2]**o+(-0.401384318883)*x_ref[2]
-        ref[1,4,1,1]=(0.194889815352)*x_ref[0]**o+(0.522093986804)*x_ref[0]+(-0.343320977396)*x_ref[1]**o+(0.21840236597)*x_ref[1]+(-0.672107409136)*x_ref[2]**o+(-0.600203805002)*x_ref[2]
-        ref[1,4,2,0]=(0.420860556361)*x_ref[0]**o+(0.789879869049)*x_ref[0]+(0.100987805744)*x_ref[1]**o+(0.802794815123)*x_ref[1]+(-0.69466030201)*x_ref[2]**o+(-0.746043845966)*x_ref[2]
-        ref[1,4,2,1]=(-0.306621579211)*x_ref[0]**o+(-0.0676982346933)*x_ref[0]+(0.568861573715)*x_ref[1]**o+(0.0823366334578)*x_ref[1]+(0.501187255641)*x_ref[2]**o+(-0.538615164478)*x_ref[2]
-        ref[2,0,0,0]=(-0.231052916706)*x_ref[0]**o+(0.127790831537)*x_ref[0]+(-0.475600435038)*x_ref[1]**o+(0.431586151473)*x_ref[1]+(-0.882365547235)*x_ref[2]**o+(0.778027701879)*x_ref[2]
-        ref[2,0,0,1]=(0.0709490835498)*x_ref[0]**o+(0.442614693755)*x_ref[0]+(0.870405247692)*x_ref[1]**o+(-0.648538779515)*x_ref[1]+(0.751107652054)*x_ref[2]**o+(0.0122956931127)*x_ref[2]
-        ref[2,0,1,0]=(0.703128329145)*x_ref[0]**o+(0.259775843631)*x_ref[0]+(0.311958888594)*x_ref[1]**o+(-0.0445092402277)*x_ref[1]+(0.338222457799)*x_ref[2]**o+(0.845995300456)*x_ref[2]
-        ref[2,0,1,1]=(-0.653977898919)*x_ref[0]**o+(0.0495539350857)*x_ref[0]+(0.4013623408)*x_ref[1]**o+(0.490747039887)*x_ref[1]+(-0.480487636729)*x_ref[2]**o+(0.361660115775)*x_ref[2]
-        ref[2,0,2,0]=(0.215778506945)*x_ref[0]**o+(0.316853875053)*x_ref[0]+(0.556770639829)*x_ref[1]**o+(-0.499729882355)*x_ref[1]+(0.692012327582)*x_ref[2]**o+(0.00681314946195)*x_ref[2]
-        ref[2,0,2,1]=(0.432077857223)*x_ref[0]**o+(-0.0497579036988)*x_ref[0]+(-0.465403408565)*x_ref[1]**o+(0.125421502956)*x_ref[1]+(-0.313541879877)*x_ref[2]**o+(0.113957941731)*x_ref[2]
-        ref[2,1,0,0]=(-0.528126103192)*x_ref[0]**o+(-0.141306512096)*x_ref[0]+(-0.505835313198)*x_ref[1]**o+(-0.0433171534408)*x_ref[1]+(-0.522465687628)*x_ref[2]**o+(-0.16728285732)*x_ref[2]
-        ref[2,1,0,1]=(0.892019660948)*x_ref[0]**o+(0.646944130193)*x_ref[0]+(0.865495756748)*x_ref[1]**o+(0.949095276008)*x_ref[1]+(0.786394755068)*x_ref[2]**o+(0.482441081687)*x_ref[2]
-        ref[2,1,1,0]=(-0.0485295711204)*x_ref[0]**o+(0.250163927911)*x_ref[0]+(0.0387861125998)*x_ref[1]**o+(-0.0789121929817)*x_ref[1]+(-0.982330126583)*x_ref[2]**o+(0.66328870814)*x_ref[2]
-        ref[2,1,1,1]=(-0.494726556678)*x_ref[0]**o+(-0.961342091528)*x_ref[0]+(0.211410563083)*x_ref[1]**o+(-0.884287887286)*x_ref[1]+(-0.583401908135)*x_ref[2]**o+(-0.361423905219)*x_ref[2]
-        ref[2,1,2,0]=(-0.326785246692)*x_ref[0]**o+(0.596272945325)*x_ref[0]+(0.625039539234)*x_ref[1]**o+(0.88699688986)*x_ref[1]+(-0.649803810419)*x_ref[2]**o+(0.890718271469)*x_ref[2]
-        ref[2,1,2,1]=(0.702110072391)*x_ref[0]**o+(0.72009439563)*x_ref[0]+(-0.930941572511)*x_ref[1]**o+(0.955877158334)*x_ref[1]+(0.1211281332)*x_ref[2]**o+(0.658738626852)*x_ref[2]
-        ref[2,2,0,0]=(-0.177402589697)*x_ref[0]**o+(0.701090894256)*x_ref[0]+(-0.00205333079339)*x_ref[1]**o+(-0.427862310859)*x_ref[1]+(0.529186374803)*x_ref[2]**o+(-0.110462035551)*x_ref[2]
-        ref[2,2,0,1]=(-0.104112165367)*x_ref[0]**o+(0.043539351452)*x_ref[0]+(0.757384935306)*x_ref[1]**o+(-0.451086492844)*x_ref[1]+(0.0549627297033)*x_ref[2]**o+(-0.311718955315)*x_ref[2]
-        ref[2,2,1,0]=(-0.579986090808)*x_ref[0]**o+(-0.922872917924)*x_ref[0]+(0.66422700207)*x_ref[1]**o+(0.947304780214)*x_ref[1]+(-0.0492553517704)*x_ref[2]**o+(0.817225619153)*x_ref[2]
-        ref[2,2,1,1]=(0.306298476233)*x_ref[0]**o+(-0.620190960783)*x_ref[0]+(-0.684876074013)*x_ref[1]**o+(-0.371829616982)*x_ref[1]+(0.904709743321)*x_ref[2]**o+(0.170802273852)*x_ref[2]
-        ref[2,2,2,0]=(0.317943399758)*x_ref[0]**o+(0.518026054212)*x_ref[0]+(-0.801462311167)*x_ref[1]**o+(0.767424157898)*x_ref[1]+(-0.547271995492)*x_ref[2]**o+(-0.912619177188)*x_ref[2]
-        ref[2,2,2,1]=(-0.848711258358)*x_ref[0]**o+(0.456489097468)*x_ref[0]+(-0.310979078367)*x_ref[1]**o+(-0.946717007726)*x_ref[1]+(0.454363833646)*x_ref[2]**o+(-0.715701991077)*x_ref[2]
-        ref[2,3,0,0]=(0.605493533014)*x_ref[0]**o+(0.478437880368)*x_ref[0]+(-0.672727491605)*x_ref[1]**o+(0.831259256009)*x_ref[1]+(-0.434153354239)*x_ref[2]**o+(-0.505363218578)*x_ref[2]
-        ref[2,3,0,1]=(-0.0703539676643)*x_ref[0]**o+(-0.452352344215)*x_ref[0]+(0.0403568720903)*x_ref[1]**o+(0.959415939826)*x_ref[1]+(-0.784519698477)*x_ref[2]**o+(-0.691664442958)*x_ref[2]
-        ref[2,3,1,0]=(0.696353768719)*x_ref[0]**o+(0.295477297618)*x_ref[0]+(0.580540484825)*x_ref[1]**o+(0.098954967023)*x_ref[1]+(-0.547594444517)*x_ref[2]**o+(-0.574783665389)*x_ref[2]
-        ref[2,3,1,1]=(0.997841887408)*x_ref[0]**o+(0.857864040549)*x_ref[0]+(-0.413188343971)*x_ref[1]**o+(0.344770631687)*x_ref[1]+(-0.127257058552)*x_ref[2]**o+(0.132618819456)*x_ref[2]
-        ref[2,3,2,0]=(0.174045751083)*x_ref[0]**o+(0.866724759298)*x_ref[0]+(0.0818516103455)*x_ref[1]**o+(-0.891670609599)*x_ref[1]+(0.982721717044)*x_ref[2]**o+(0.378710155856)*x_ref[2]
-        ref[2,3,2,1]=(0.7760778906)*x_ref[0]**o+(-0.710104290654)*x_ref[0]+(-0.471259845977)*x_ref[1]**o+(-0.791979211724)*x_ref[1]+(-0.845652753706)*x_ref[2]**o+(-0.301795837852)*x_ref[2]
-        ref[2,4,0,0]=(-0.698193658421)*x_ref[0]**o+(-0.831956135385)*x_ref[0]+(-0.442637915133)*x_ref[1]**o+(0.108715813637)*x_ref[1]+(-0.888348149694)*x_ref[2]**o+(-0.90115888496)*x_ref[2]
-        ref[2,4,0,1]=(0.770237705577)*x_ref[0]**o+(0.889304763618)*x_ref[0]+(-0.139196183564)*x_ref[1]**o+(0.332516232239)*x_ref[1]+(-0.0218103253052)*x_ref[2]**o+(-0.368033928854)*x_ref[2]
-        ref[2,4,1,0]=(0.675479351844)*x_ref[0]**o+(0.880998418303)*x_ref[0]+(0.408381837105)*x_ref[1]**o+(0.717402364084)*x_ref[1]+(-0.303902947422)*x_ref[2]**o+(-0.322350049962)*x_ref[2]
-        ref[2,4,1,1]=(-0.480881673289)*x_ref[0]**o+(0.30290141529)*x_ref[0]+(-0.538411390886)*x_ref[1]**o+(0.260090848702)*x_ref[1]+(0.638130764808)*x_ref[2]**o+(0.756338975575)*x_ref[2]
-        ref[2,4,2,0]=(-0.299233221889)*x_ref[0]**o+(-0.26471083761)*x_ref[0]+(0.717191172884)*x_ref[1]**o+(0.488553216118)*x_ref[1]+(0.718956726644)*x_ref[2]**o+(0.370889025703)*x_ref[2]
-        ref[2,4,2,1]=(-0.989020272269)*x_ref[0]**o+(-0.891423884362)*x_ref[0]+(0.486153100693)*x_ref[1]**o+(-0.971171395246)*x_ref[1]+(-0.766942968184)*x_ref[2]**o+(0.728728968862)*x_ref[2]
-        ref[3,0,0,0]=(0.756186246227)*x_ref[0]**o+(0.76507856268)*x_ref[0]+(0.771165000414)*x_ref[1]**o+(0.673968873856)*x_ref[1]+(0.827045846253)*x_ref[2]**o+(-0.788265752412)*x_ref[2]
-        ref[3,0,0,1]=(-0.66925731439)*x_ref[0]**o+(-0.0110127596435)*x_ref[0]+(0.944388255414)*x_ref[1]**o+(-0.613832072486)*x_ref[1]+(0.0977542120724)*x_ref[2]**o+(0.100776856689)*x_ref[2]
-        ref[3,0,1,0]=(0.905138713064)*x_ref[0]**o+(0.673051338153)*x_ref[0]+(0.240614253653)*x_ref[1]**o+(-0.964132330033)*x_ref[1]+(-0.114961018838)*x_ref[2]**o+(-0.438756962988)*x_ref[2]
-        ref[3,0,1,1]=(-0.192259182094)*x_ref[0]**o+(0.12315590119)*x_ref[0]+(-0.907744420226)*x_ref[1]**o+(-0.483981269809)*x_ref[1]+(-0.169699431472)*x_ref[2]**o+(-0.45231635406)*x_ref[2]
-        ref[3,0,2,0]=(0.895387255885)*x_ref[0]**o+(0.23892997411)*x_ref[0]+(-0.396010446618)*x_ref[1]**o+(0.94853984413)*x_ref[1]+(-0.0165259637241)*x_ref[2]**o+(-0.312558539149)*x_ref[2]
-        ref[3,0,2,1]=(0.710478713361)*x_ref[0]**o+(-0.109316102216)*x_ref[0]+(-0.042711568986)*x_ref[1]**o+(-0.448508085742)*x_ref[1]+(-0.0979193346011)*x_ref[2]**o+(0.93156672211)*x_ref[2]
-        ref[3,1,0,0]=(-0.21605108221)*x_ref[0]**o+(0.410466481712)*x_ref[0]+(0.799288386783)*x_ref[1]**o+(0.622866017113)*x_ref[1]+(-0.236698938159)*x_ref[2]**o+(0.246625241928)*x_ref[2]
-        ref[3,1,0,1]=(0.989568527762)*x_ref[0]**o+(0.0212906378151)*x_ref[0]+(0.311279947324)*x_ref[1]**o+(-0.231412902902)*x_ref[1]+(-0.444760786142)*x_ref[2]**o+(0.908171985421)*x_ref[2]
-        ref[3,1,1,0]=(0.42605234231)*x_ref[0]**o+(-0.58629332944)*x_ref[0]+(0.322063640761)*x_ref[1]**o+(0.837771339825)*x_ref[1]+(-0.911083211394)*x_ref[2]**o+(-0.0699607581992)*x_ref[2]
-        ref[3,1,1,1]=(0.75449445591)*x_ref[0]**o+(0.722970800307)*x_ref[0]+(-0.582970919465)*x_ref[1]**o+(-0.868818538212)*x_ref[1]+(0.940067636181)*x_ref[2]**o+(-0.659469743617)*x_ref[2]
-        ref[3,1,2,0]=(-0.391224924663)*x_ref[0]**o+(-0.768173177737)*x_ref[0]+(-0.856876347997)*x_ref[1]**o+(-0.0451180499647)*x_ref[1]+(0.198590679246)*x_ref[2]**o+(0.187329095476)*x_ref[2]
-        ref[3,1,2,1]=(0.483309063092)*x_ref[0]**o+(-0.0777241026893)*x_ref[0]+(0.0438427457286)*x_ref[1]**o+(-0.73195704867)*x_ref[1]+(-0.439660745725)*x_ref[2]**o+(0.279501672861)*x_ref[2]
-        ref[3,2,0,0]=(0.799935089139)*x_ref[0]**o+(-0.306860809857)*x_ref[0]+(0.169104975039)*x_ref[1]**o+(-0.3480717525)*x_ref[1]+(0.215231688)*x_ref[2]**o+(-0.528775376945)*x_ref[2]
-        ref[3,2,0,1]=(0.917815789587)*x_ref[0]**o+(0.0672910338102)*x_ref[0]+(-0.186550440011)*x_ref[1]**o+(0.922579714252)*x_ref[1]+(0.924162379857)*x_ref[2]**o+(-0.769320483618)*x_ref[2]
-        ref[3,2,1,0]=(0.604324468058)*x_ref[0]**o+(-0.0109731419053)*x_ref[0]+(0.229447318325)*x_ref[1]**o+(-0.480693435232)*x_ref[1]+(-0.881779256999)*x_ref[2]**o+(0.288656394771)*x_ref[2]
-        ref[3,2,1,1]=(0.934680723352)*x_ref[0]**o+(0.993838528376)*x_ref[0]+(0.957781588502)*x_ref[1]**o+(-0.859837057866)*x_ref[1]+(-0.702139964493)*x_ref[2]**o+(0.0538177124609)*x_ref[2]
-        ref[3,2,2,0]=(-0.142809047814)*x_ref[0]**o+(-0.472594415134)*x_ref[0]+(0.0381782768377)*x_ref[1]**o+(0.727331491769)*x_ref[1]+(0.0910992897581)*x_ref[2]**o+(-0.845316063851)*x_ref[2]
-        ref[3,2,2,1]=(-0.217483358272)*x_ref[0]**o+(0.991535092285)*x_ref[0]+(-0.399175896468)*x_ref[1]**o+(-0.665836512895)*x_ref[1]+(0.0983700911493)*x_ref[2]**o+(0.321811300155)*x_ref[2]
-        ref[3,3,0,0]=(0.797049585464)*x_ref[0]**o+(-0.724467959299)*x_ref[0]+(0.19971589973)*x_ref[1]**o+(0.845928461864)*x_ref[1]+(-0.365158866359)*x_ref[2]**o+(-0.698274270132)*x_ref[2]
-        ref[3,3,0,1]=(-0.638474704878)*x_ref[0]**o+(0.551866433352)*x_ref[0]+(0.192309452979)*x_ref[1]**o+(-0.703649325501)*x_ref[1]+(0.823910578138)*x_ref[2]**o+(-0.917446989634)*x_ref[2]
-        ref[3,3,1,0]=(0.217577282169)*x_ref[0]**o+(0.521716803668)*x_ref[0]+(-0.116587783856)*x_ref[1]**o+(0.529672391417)*x_ref[1]+(-0.798918158284)*x_ref[2]**o+(-0.0996139511955)*x_ref[2]
-        ref[3,3,1,1]=(0.498965049079)*x_ref[0]**o+(0.316489921186)*x_ref[0]+(-0.0988355471817)*x_ref[1]**o+(-0.0477508287681)*x_ref[1]+(-0.778914523993)*x_ref[2]**o+(0.189397812723)*x_ref[2]
-        ref[3,3,2,0]=(0.203823698152)*x_ref[0]**o+(-0.340499414266)*x_ref[0]+(0.353374693517)*x_ref[1]**o+(-0.91035264494)*x_ref[1]+(-0.779204084198)*x_ref[2]**o+(-0.00276454165248)*x_ref[2]
-        ref[3,3,2,1]=(0.295232007123)*x_ref[0]**o+(0.271766544502)*x_ref[0]+(0.431956430336)*x_ref[1]**o+(0.896481311536)*x_ref[1]+(-0.325014902487)*x_ref[2]**o+(0.70836170284)*x_ref[2]
-        ref[3,4,0,0]=(-0.407535202468)*x_ref[0]**o+(-0.33055681091)*x_ref[0]+(0.129762143151)*x_ref[1]**o+(0.352087436228)*x_ref[1]+(-0.538770401565)*x_ref[2]**o+(-0.519071077045)*x_ref[2]
-        ref[3,4,0,1]=(0.846011435499)*x_ref[0]**o+(0.172822133672)*x_ref[0]+(-0.740732553847)*x_ref[1]**o+(0.230062837231)*x_ref[1]+(-0.231810007237)*x_ref[2]**o+(-0.568366338923)*x_ref[2]
-        ref[3,4,1,0]=(-0.198091119057)*x_ref[0]**o+(0.957989508794)*x_ref[0]+(0.861739071175)*x_ref[1]**o+(0.923450697883)*x_ref[1]+(-0.755262504937)*x_ref[2]**o+(0.102897579936)*x_ref[2]
-        ref[3,4,1,1]=(0.198829545353)*x_ref[0]**o+(-0.757182006818)*x_ref[0]+(0.254092337808)*x_ref[1]**o+(-0.00815072620097)*x_ref[1]+(0.347421988308)*x_ref[2]**o+(-0.0215277616923)*x_ref[2]
-        ref[3,4,2,0]=(0.775062112529)*x_ref[0]**o+(-0.77746792774)*x_ref[0]+(-0.666490294869)*x_ref[1]**o+(-0.679971069878)*x_ref[1]+(-0.972450779894)*x_ref[2]**o+(-0.705322282477)*x_ref[2]
-        ref[3,4,2,1]=(-0.0994927587382)*x_ref[0]**o+(0.293071774786)*x_ref[0]+(0.370784399397)*x_ref[1]**o+(0.931411225946)*x_ref[1]+(-0.55789163294)*x_ref[2]**o+(0.0831890658592)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(1.66854814732)*x[0]+(1.38199165128)*x[1]
-        ref=(1.66854814732)*x_ref[0]+(1.38199165128)*x_ref[1]
-      else:
-        arg=(-0.426142624852)*x[0]+(0.0492229050252)*x[1]+(-0.821661899519)*x[2]
-        ref=(-0.426142624852)*x_ref[0]+(0.0492229050252)*x_ref[1]+(-0.821661899519)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        arg[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-        ref[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        ref[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-      else:
-        arg[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        arg[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-        ref[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        ref[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.178459116054)*x[0]+(-0.908190366917)*x[1]
-        arg[0,1]=(-0.365861276878)*x[0]+(-1.57557211363)*x[1]
-        arg[0,2]=(-1.22266296874)*x[0]+(0.476090041507)*x[1]
-        arg[0,3]=(0.0677955238995)*x[0]+(-0.899620825938)*x[1]
-        arg[0,4]=(-0.29315929952)*x[0]+(-0.0589414650397)*x[1]
-        arg[1,0]=(-0.510486453858)*x[0]+(0.960724573137)*x[1]
-        arg[1,1]=(-0.316955543)*x[0]+(-0.160275601404)*x[1]
-        arg[1,2]=(-0.960162300557)*x[0]+(0.426685726779)*x[1]
-        arg[1,3]=(-0.458645373633)*x[0]+(0.623646469232)*x[1]
-        arg[1,4]=(-0.831993675808)*x[0]+(-0.380162434858)*x[1]
-        arg[2,0]=(-0.0614446129662)*x[0]+(0.442134320884)*x[1]
-        arg[2,1]=(-0.0466135888936)*x[0]+(0.465021672347)*x[1]
-        arg[2,2]=(-1.69520946599)*x[0]+(-1.69200166455)*x[1]
-        arg[2,3]=(0.928809309584)*x[0]+(-0.344012063367)*x[1]
-        arg[2,4]=(0.557754072268)*x[0]+(-0.0104949991147)*x[1]
-        arg[3,0]=(0.0683969753885)*x[0]+(1.59892831147)*x[1]
-        arg[3,1]=(0.90059768275)*x[0]+(1.4136644906)*x[1]
-        arg[3,2]=(-0.397873855228)*x[0]+(-0.876192378488)*x[1]
-        arg[3,3]=(-1.71837532502)*x[0]+(-0.911585940448)*x[1]
-        arg[3,4]=(-1.619565287)*x[0]+(-0.911830282675)*x[1]
-        ref[0,0]=(-0.178459116054)*x_ref[0]+(-0.908190366917)*x_ref[1]
-        ref[0,1]=(-0.365861276878)*x_ref[0]+(-1.57557211363)*x_ref[1]
-        ref[0,2]=(-1.22266296874)*x_ref[0]+(0.476090041507)*x_ref[1]
-        ref[0,3]=(0.0677955238995)*x_ref[0]+(-0.899620825938)*x_ref[1]
-        ref[0,4]=(-0.29315929952)*x_ref[0]+(-0.0589414650397)*x_ref[1]
-        ref[1,0]=(-0.510486453858)*x_ref[0]+(0.960724573137)*x_ref[1]
-        ref[1,1]=(-0.316955543)*x_ref[0]+(-0.160275601404)*x_ref[1]
-        ref[1,2]=(-0.960162300557)*x_ref[0]+(0.426685726779)*x_ref[1]
-        ref[1,3]=(-0.458645373633)*x_ref[0]+(0.623646469232)*x_ref[1]
-        ref[1,4]=(-0.831993675808)*x_ref[0]+(-0.380162434858)*x_ref[1]
-        ref[2,0]=(-0.0614446129662)*x_ref[0]+(0.442134320884)*x_ref[1]
-        ref[2,1]=(-0.0466135888936)*x_ref[0]+(0.465021672347)*x_ref[1]
-        ref[2,2]=(-1.69520946599)*x_ref[0]+(-1.69200166455)*x_ref[1]
-        ref[2,3]=(0.928809309584)*x_ref[0]+(-0.344012063367)*x_ref[1]
-        ref[2,4]=(0.557754072268)*x_ref[0]+(-0.0104949991147)*x_ref[1]
-        ref[3,0]=(0.0683969753885)*x_ref[0]+(1.59892831147)*x_ref[1]
-        ref[3,1]=(0.90059768275)*x_ref[0]+(1.4136644906)*x_ref[1]
-        ref[3,2]=(-0.397873855228)*x_ref[0]+(-0.876192378488)*x_ref[1]
-        ref[3,3]=(-1.71837532502)*x_ref[0]+(-0.911585940448)*x_ref[1]
-        ref[3,4]=(-1.619565287)*x_ref[0]+(-0.911830282675)*x_ref[1]
-      else:
-        arg[0,0]=(-0.822599790066)*x[0]+(-1.22492139307)*x[1]+(-0.696878025616)*x[2]
-        arg[0,1]=(0.600762284033)*x[0]+(-0.157734608915)*x[1]+(-0.729304703393)*x[2]
-        arg[0,2]=(-1.42910707426)*x[0]+(1.46395956796)*x[1]+(1.38800770798)*x[2]
-        arg[0,3]=(1.2198448221)*x[0]+(0.0898753488356)*x[1]+(0.976038279019)*x[2]
-        arg[0,4]=(-0.616927403743)*x[0]+(1.41159934363)*x[1]+(-1.74783039584)*x[2]
-        arg[1,0]=(-0.101387750238)*x[0]+(-0.294997280251)*x[1]+(0.247605331103)*x[2]
-        arg[1,1]=(-0.320864335195)*x[0]+(-0.202828013922)*x[1]+(-0.366246434001)*x[2]
-        arg[1,2]=(-0.827685495006)*x[0]+(-0.236835428287)*x[1]+(-1.48668813903)*x[2]
-        arg[1,3]=(0.56131602615)*x[0]+(-0.572858337349)*x[1]+(0.701775515666)*x[2]
-        arg[1,4]=(-1.09228098916)*x[0]+(-0.0251387524711)*x[1]+(1.91587136325)*x[2]
-        arg[2,0]=(-0.0758503728265)*x[0]+(0.236248603718)*x[1]+(0.0446858988194)*x[2]
-        arg[2,1]=(-1.1745073907)*x[0]+(-0.519328441654)*x[1]+(-1.19738117811)*x[2]
-        arg[2,2]=(-0.018812738143)*x[0]+(1.00051415805)*x[1]+(-0.620776442731)*x[2]
-        arg[2,3]=(-0.430333705208)*x[0]+(0.136368267739)*x[1]+(0.59767563861)*x[2]
-        arg[2,4]=(1.54336203988)*x[0]+(0.106189845211)*x[1]+(1.53097571242)*x[2]
-        arg[3,0]=(-0.00451956527502)*x[0]+(0.710318142757)*x[1]+(0.386947317474)*x[2]
-        arg[3,1]=(1.22013531098)*x[0]+(-0.735641779691)*x[1]+(-0.0137925239152)*x[2]
-        arg[3,2]=(0.0949363128405)*x[0]+(-0.0778790744582)*x[1]+(-0.466004036944)*x[2]
-        arg[3,3]=(0.656445527911)*x[0]+(1.67275242688)*x[1]+(-0.0946012389031)*x[2]
-        arg[3,4]=(0.927582093503)*x[0]+(-0.812773507566)*x[1]+(1.14365402059)*x[2]
-        ref[0,0]=(-0.822599790066)*x_ref[0]+(-1.22492139307)*x_ref[1]+(-0.696878025616)*x_ref[2]
-        ref[0,1]=(0.600762284033)*x_ref[0]+(-0.157734608915)*x_ref[1]+(-0.729304703393)*x_ref[2]
-        ref[0,2]=(-1.42910707426)*x_ref[0]+(1.46395956796)*x_ref[1]+(1.38800770798)*x_ref[2]
-        ref[0,3]=(1.2198448221)*x_ref[0]+(0.0898753488356)*x_ref[1]+(0.976038279019)*x_ref[2]
-        ref[0,4]=(-0.616927403743)*x_ref[0]+(1.41159934363)*x_ref[1]+(-1.74783039584)*x_ref[2]
-        ref[1,0]=(-0.101387750238)*x_ref[0]+(-0.294997280251)*x_ref[1]+(0.247605331103)*x_ref[2]
-        ref[1,1]=(-0.320864335195)*x_ref[0]+(-0.202828013922)*x_ref[1]+(-0.366246434001)*x_ref[2]
-        ref[1,2]=(-0.827685495006)*x_ref[0]+(-0.236835428287)*x_ref[1]+(-1.48668813903)*x_ref[2]
-        ref[1,3]=(0.56131602615)*x_ref[0]+(-0.572858337349)*x_ref[1]+(0.701775515666)*x_ref[2]
-        ref[1,4]=(-1.09228098916)*x_ref[0]+(-0.0251387524711)*x_ref[1]+(1.91587136325)*x_ref[2]
-        ref[2,0]=(-0.0758503728265)*x_ref[0]+(0.236248603718)*x_ref[1]+(0.0446858988194)*x_ref[2]
-        ref[2,1]=(-1.1745073907)*x_ref[0]+(-0.519328441654)*x_ref[1]+(-1.19738117811)*x_ref[2]
-        ref[2,2]=(-0.018812738143)*x_ref[0]+(1.00051415805)*x_ref[1]+(-0.620776442731)*x_ref[2]
-        ref[2,3]=(-0.430333705208)*x_ref[0]+(0.136368267739)*x_ref[1]+(0.59767563861)*x_ref[2]
-        ref[2,4]=(1.54336203988)*x_ref[0]+(0.106189845211)*x_ref[1]+(1.53097571242)*x_ref[2]
-        ref[3,0]=(-0.00451956527502)*x_ref[0]+(0.710318142757)*x_ref[1]+(0.386947317474)*x_ref[2]
-        ref[3,1]=(1.22013531098)*x_ref[0]+(-0.735641779691)*x_ref[1]+(-0.0137925239152)*x_ref[2]
-        ref[3,2]=(0.0949363128405)*x_ref[0]+(-0.0778790744582)*x_ref[1]+(-0.466004036944)*x_ref[2]
-        ref[3,3]=(0.656445527911)*x_ref[0]+(1.67275242688)*x_ref[1]+(-0.0946012389031)*x_ref[2]
-        ref[3,4]=(0.927582093503)*x_ref[0]+(-0.812773507566)*x_ref[1]+(1.14365402059)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.53783653017)*x[0]+(-0.262380397029)*x[1]
-        arg[0,0,1]=(0.0150173886328)*x[0]+(1.16643858096)*x[1]
-        arg[0,1,0]=(0.886211915116)*x[0]+(0.0707779287946)*x[1]
-        arg[0,1,1]=(-1.38689895895)*x[0]+(0.970706440444)*x[1]
-        arg[1,0,0]=(-0.923778075186)*x[0]+(1.93261160466)*x[1]
-        arg[1,0,1]=(1.03640566039)*x[0]+(-0.511763660443)*x[1]
-        arg[1,1,0]=(0.127401766462)*x[0]+(-0.472120435035)*x[1]
-        arg[1,1,1]=(-0.366402024047)*x[0]+(-0.396644605167)*x[1]
-        arg[2,0,0]=(-0.715041877609)*x[0]+(-1.00214766039)*x[1]
-        arg[2,0,1]=(-1.52452556675)*x[0]+(-0.570352600973)*x[1]
-        arg[2,1,0]=(0.730426967288)*x[0]+(0.158290182237)*x[1]
-        arg[2,1,1]=(-0.152190333299)*x[0]+(-0.254128104593)*x[1]
-        arg[3,0,0]=(0.835319813606)*x[0]+(-0.142845950855)*x[1]
-        arg[3,0,1]=(0.80118569153)*x[0]+(0.260295390539)*x[1]
-        arg[3,1,0]=(0.283151732104)*x[0]+(0.0284945097388)*x[1]
-        arg[3,1,1]=(-0.715345696074)*x[0]+(0.563181102176)*x[1]
-        arg[4,0,0]=(-0.481733499899)*x[0]+(1.30638761744)*x[1]
-        arg[4,0,1]=(-0.515540152341)*x[0]+(1.47724553596)*x[1]
-        arg[4,1,0]=(0.631902493814)*x[0]+(0.279373852162)*x[1]
-        arg[4,1,1]=(0.666932982001)*x[0]+(1.02356936117)*x[1]
-        arg[5,0,0]=(-1.15844673154)*x[0]+(-0.472595660401)*x[1]
-        arg[5,0,1]=(-0.469626313646)*x[0]+(0.464876870861)*x[1]
-        arg[5,1,0]=(-0.0934345630024)*x[0]+(0.92605991751)*x[1]
-        arg[5,1,1]=(-0.0528050605159)*x[0]+(0.984329702885)*x[1]
-        ref[0,0,0]=(1.53783653017)*x_ref[0]+(-0.262380397029)*x_ref[1]
-        ref[0,0,1]=(0.0150173886328)*x_ref[0]+(1.16643858096)*x_ref[1]
-        ref[0,1,0]=(0.886211915116)*x_ref[0]+(0.0707779287946)*x_ref[1]
-        ref[0,1,1]=(-1.38689895895)*x_ref[0]+(0.970706440444)*x_ref[1]
-        ref[1,0,0]=(-0.923778075186)*x_ref[0]+(1.93261160466)*x_ref[1]
-        ref[1,0,1]=(1.03640566039)*x_ref[0]+(-0.511763660443)*x_ref[1]
-        ref[1,1,0]=(0.127401766462)*x_ref[0]+(-0.472120435035)*x_ref[1]
-        ref[1,1,1]=(-0.366402024047)*x_ref[0]+(-0.396644605167)*x_ref[1]
-        ref[2,0,0]=(-0.715041877609)*x_ref[0]+(-1.00214766039)*x_ref[1]
-        ref[2,0,1]=(-1.52452556675)*x_ref[0]+(-0.570352600973)*x_ref[1]
-        ref[2,1,0]=(0.730426967288)*x_ref[0]+(0.158290182237)*x_ref[1]
-        ref[2,1,1]=(-0.152190333299)*x_ref[0]+(-0.254128104593)*x_ref[1]
-        ref[3,0,0]=(0.835319813606)*x_ref[0]+(-0.142845950855)*x_ref[1]
-        ref[3,0,1]=(0.80118569153)*x_ref[0]+(0.260295390539)*x_ref[1]
-        ref[3,1,0]=(0.283151732104)*x_ref[0]+(0.0284945097388)*x_ref[1]
-        ref[3,1,1]=(-0.715345696074)*x_ref[0]+(0.563181102176)*x_ref[1]
-        ref[4,0,0]=(-0.481733499899)*x_ref[0]+(1.30638761744)*x_ref[1]
-        ref[4,0,1]=(-0.515540152341)*x_ref[0]+(1.47724553596)*x_ref[1]
-        ref[4,1,0]=(0.631902493814)*x_ref[0]+(0.279373852162)*x_ref[1]
-        ref[4,1,1]=(0.666932982001)*x_ref[0]+(1.02356936117)*x_ref[1]
-        ref[5,0,0]=(-1.15844673154)*x_ref[0]+(-0.472595660401)*x_ref[1]
-        ref[5,0,1]=(-0.469626313646)*x_ref[0]+(0.464876870861)*x_ref[1]
-        ref[5,1,0]=(-0.0934345630024)*x_ref[0]+(0.92605991751)*x_ref[1]
-        ref[5,1,1]=(-0.0528050605159)*x_ref[0]+(0.984329702885)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.713551995443)*x[0]+(0.694017368402)*x[1]+(-0.0738591792901)*x[2]
-        arg[0,0,1]=(1.56876736864)*x[0]+(-0.345130721117)*x[1]+(1.1690777905)*x[2]
-        arg[0,1,0]=(-0.62505379409)*x[0]+(-0.143697617605)*x[1]+(0.132102288091)*x[2]
-        arg[0,1,1]=(0.873577158168)*x[0]+(-0.967200786585)*x[1]+(1.2903546666)*x[2]
-        arg[1,0,0]=(-0.192658558584)*x[0]+(0.506709431455)*x[1]+(-0.0952065550445)*x[2]
-        arg[1,0,1]=(1.30984695498)*x[0]+(-0.469661654194)*x[1]+(1.39212979011)*x[2]
-        arg[1,1,0]=(-0.49094299988)*x[0]+(1.02571925005)*x[1]+(0.125396191195)*x[2]
-        arg[1,1,1]=(-0.062798346747)*x[0]+(-0.789359897908)*x[1]+(1.77093308656)*x[2]
-        arg[2,0,0]=(1.61875859199)*x[0]+(0.594855189809)*x[1]+(0.42445154554)*x[2]
-        arg[2,0,1]=(-0.856240554561)*x[0]+(0.100699001565)*x[1]+(-0.27854306919)*x[2]
-        arg[2,1,0]=(0.0478958246378)*x[0]+(0.695175069462)*x[1]+(-0.847667978286)*x[2]
-        arg[2,1,1]=(1.60820982887)*x[0]+(-0.251793277319)*x[1]+(0.143173366678)*x[2]
-        arg[3,0,0]=(-0.292866056474)*x[0]+(1.01748459143)*x[1]+(-0.484686028756)*x[2]
-        arg[3,0,1]=(-0.408126207016)*x[0]+(-1.31011612654)*x[1]+(-0.955847365219)*x[2]
-        arg[3,1,0]=(0.0396674474263)*x[0]+(0.354470432765)*x[1]+(-0.291731786972)*x[2]
-        arg[3,1,1]=(0.752098712767)*x[0]+(-1.83970538813)*x[1]+(0.0227500647892)*x[2]
-        arg[4,0,0]=(0.398849520011)*x[0]+(-1.38237112549)*x[1]+(-0.800550650133)*x[2]
-        arg[4,0,1]=(0.102399478593)*x[0]+(0.812513136316)*x[1]+(1.25442670221)*x[2]
-        arg[4,1,0]=(0.224914729031)*x[0]+(0.0706934334606)*x[1]+(0.640265153974)*x[2]
-        arg[4,1,1]=(0.278731023964)*x[0]+(-0.766892970502)*x[1]+(1.62378242532)*x[2]
-        arg[5,0,0]=(-0.874002481668)*x[0]+(0.168391989524)*x[1]+(-0.0150981524408)*x[2]
-        arg[5,0,1]=(1.03369744159)*x[0]+(-0.363152709617)*x[1]+(-0.429141439899)*x[2]
-        arg[5,1,0]=(1.74293672288)*x[0]+(1.91064523276)*x[1]+(0.159389690962)*x[2]
-        arg[5,1,1]=(0.769432577623)*x[0]+(0.929942365281)*x[1]+(0.170908152574)*x[2]
-        ref[0,0,0]=(-0.713551995443)*x_ref[0]+(0.694017368402)*x_ref[1]+(-0.0738591792901)*x_ref[2]
-        ref[0,0,1]=(1.56876736864)*x_ref[0]+(-0.345130721117)*x_ref[1]+(1.1690777905)*x_ref[2]
-        ref[0,1,0]=(-0.62505379409)*x_ref[0]+(-0.143697617605)*x_ref[1]+(0.132102288091)*x_ref[2]
-        ref[0,1,1]=(0.873577158168)*x_ref[0]+(-0.967200786585)*x_ref[1]+(1.2903546666)*x_ref[2]
-        ref[1,0,0]=(-0.192658558584)*x_ref[0]+(0.506709431455)*x_ref[1]+(-0.0952065550445)*x_ref[2]
-        ref[1,0,1]=(1.30984695498)*x_ref[0]+(-0.469661654194)*x_ref[1]+(1.39212979011)*x_ref[2]
-        ref[1,1,0]=(-0.49094299988)*x_ref[0]+(1.02571925005)*x_ref[1]+(0.125396191195)*x_ref[2]
-        ref[1,1,1]=(-0.062798346747)*x_ref[0]+(-0.789359897908)*x_ref[1]+(1.77093308656)*x_ref[2]
-        ref[2,0,0]=(1.61875859199)*x_ref[0]+(0.594855189809)*x_ref[1]+(0.42445154554)*x_ref[2]
-        ref[2,0,1]=(-0.856240554561)*x_ref[0]+(0.100699001565)*x_ref[1]+(-0.27854306919)*x_ref[2]
-        ref[2,1,0]=(0.0478958246378)*x_ref[0]+(0.695175069462)*x_ref[1]+(-0.847667978286)*x_ref[2]
-        ref[2,1,1]=(1.60820982887)*x_ref[0]+(-0.251793277319)*x_ref[1]+(0.143173366678)*x_ref[2]
-        ref[3,0,0]=(-0.292866056474)*x_ref[0]+(1.01748459143)*x_ref[1]+(-0.484686028756)*x_ref[2]
-        ref[3,0,1]=(-0.408126207016)*x_ref[0]+(-1.31011612654)*x_ref[1]+(-0.955847365219)*x_ref[2]
-        ref[3,1,0]=(0.0396674474263)*x_ref[0]+(0.354470432765)*x_ref[1]+(-0.291731786972)*x_ref[2]
-        ref[3,1,1]=(0.752098712767)*x_ref[0]+(-1.83970538813)*x_ref[1]+(0.0227500647892)*x_ref[2]
-        ref[4,0,0]=(0.398849520011)*x_ref[0]+(-1.38237112549)*x_ref[1]+(-0.800550650133)*x_ref[2]
-        ref[4,0,1]=(0.102399478593)*x_ref[0]+(0.812513136316)*x_ref[1]+(1.25442670221)*x_ref[2]
-        ref[4,1,0]=(0.224914729031)*x_ref[0]+(0.0706934334606)*x_ref[1]+(0.640265153974)*x_ref[2]
-        ref[4,1,1]=(0.278731023964)*x_ref[0]+(-0.766892970502)*x_ref[1]+(1.62378242532)*x_ref[2]
-        ref[5,0,0]=(-0.874002481668)*x_ref[0]+(0.168391989524)*x_ref[1]+(-0.0150981524408)*x_ref[2]
-        ref[5,0,1]=(1.03369744159)*x_ref[0]+(-0.363152709617)*x_ref[1]+(-0.429141439899)*x_ref[2]
-        ref[5,1,0]=(1.74293672288)*x_ref[0]+(1.91064523276)*x_ref[1]+(0.159389690962)*x_ref[2]
-        ref[5,1,1]=(0.769432577623)*x_ref[0]+(0.929942365281)*x_ref[1]+(0.170908152574)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-1.15521896363)*x[0]+(0.8731619129)*x[1]
-        arg[0,0,0,1]=(0.597656443464)*x[0]+(0.341688152811)*x[1]
-        arg[0,0,1,0]=(-0.422350580427)*x[0]+(0.728011338687)*x[1]
-        arg[0,0,1,1]=(-1.72046294064)*x[0]+(1.13345636724)*x[1]
-        arg[0,0,2,0]=(0.150530941523)*x[0]+(0.437417461641)*x[1]
-        arg[0,0,2,1]=(-0.413133183531)*x[0]+(-0.268630939964)*x[1]
-        arg[0,1,0,0]=(-0.220368905416)*x[0]+(1.10085894684)*x[1]
-        arg[0,1,0,1]=(-0.943367491188)*x[0]+(0.80942793885)*x[1]
-        arg[0,1,1,0]=(0.906220152303)*x[0]+(0.801214136703)*x[1]
-        arg[0,1,1,1]=(-1.3650200124)*x[0]+(-0.373454973523)*x[1]
-        arg[0,1,2,0]=(-0.277067377427)*x[0]+(-1.62229711799)*x[1]
-        arg[0,1,2,1]=(0.787076886379)*x[0]+(0.496906919368)*x[1]
-        arg[0,2,0,0]=(-0.0770154256748)*x[0]+(1.5002648939)*x[1]
-        arg[0,2,0,1]=(0.225572553862)*x[0]+(1.39471337012)*x[1]
-        arg[0,2,1,0]=(-0.54799237637)*x[0]+(-0.607785237418)*x[1]
-        arg[0,2,1,1]=(0.384591801229)*x[0]+(1.30760620469)*x[1]
-        arg[0,2,2,0]=(0.228248139163)*x[0]+(0.151268778109)*x[1]
-        arg[0,2,2,1]=(-1.43978230199)*x[0]+(0.958903347524)*x[1]
-        arg[0,3,0,0]=(-0.568133098072)*x[0]+(0.128510595507)*x[1]
-        arg[0,3,0,1]=(-0.304029315535)*x[0]+(1.19478464847)*x[1]
-        arg[0,3,1,0]=(0.0996876882275)*x[0]+(-0.255346045102)*x[1]
-        arg[0,3,1,1]=(0.414708254109)*x[0]+(-0.148700489536)*x[1]
-        arg[0,3,2,0]=(-0.740719850161)*x[0]+(0.375907815982)*x[1]
-        arg[0,3,2,1]=(-0.184189058365)*x[0]+(-0.274477516444)*x[1]
-        arg[0,4,0,0]=(-0.565848858136)*x[0]+(-0.206818417121)*x[1]
-        arg[0,4,0,1]=(-0.983652399085)*x[0]+(1.21445827986)*x[1]
-        arg[0,4,1,0]=(1.6425686123)*x[0]+(-0.621952337654)*x[1]
-        arg[0,4,1,1]=(-1.07526530849)*x[0]+(-0.0915810578715)*x[1]
-        arg[0,4,2,0]=(1.4812278738)*x[0]+(1.61991326423)*x[1]
-        arg[0,4,2,1]=(-1.4147420413)*x[0]+(1.34428787131)*x[1]
-        arg[1,0,0,0]=(-0.910373659777)*x[0]+(1.46920176435)*x[1]
-        arg[1,0,0,1]=(0.074473571609)*x[0]+(-0.336642181231)*x[1]
-        arg[1,0,1,0]=(-0.141813739296)*x[0]+(-0.534432398621)*x[1]
-        arg[1,0,1,1]=(0.728030938984)*x[0]+(0.532542738961)*x[1]
-        arg[1,0,2,0]=(0.20676316374)*x[0]+(-0.065235999066)*x[1]
-        arg[1,0,2,1]=(-1.09054680794)*x[0]+(0.537754476805)*x[1]
-        arg[1,1,0,0]=(0.523878896271)*x[0]+(-0.0561828109964)*x[1]
-        arg[1,1,0,1]=(1.27754653741)*x[0]+(0.119734333004)*x[1]
-        arg[1,1,1,0]=(0.0933160885942)*x[0]+(0.390183021193)*x[1]
-        arg[1,1,1,1]=(0.548273953924)*x[0]+(-0.552588185124)*x[1]
-        arg[1,1,2,0]=(0.576803722241)*x[0]+(0.60898781381)*x[1]
-        arg[1,1,2,1]=(-0.307231650547)*x[0]+(0.439111970656)*x[1]
-        arg[1,2,0,0]=(0.172113300736)*x[0]+(-0.0153971432613)*x[1]
-        arg[1,2,0,1]=(-0.883753634465)*x[0]+(1.35320294175)*x[1]
-        arg[1,2,1,0]=(0.153937139638)*x[0]+(-0.865654430739)*x[1]
-        arg[1,2,1,1]=(0.970377377543)*x[0]+(-1.11418225395)*x[1]
-        arg[1,2,2,0]=(-1.11106779953)*x[0]+(-0.357700480625)*x[1]
-        arg[1,2,2,1]=(0.475529404147)*x[0]+(-0.121369909464)*x[1]
-        arg[1,3,0,0]=(-0.867370155191)*x[0]+(0.625161512036)*x[1]
-        arg[1,3,0,1]=(0.252873452474)*x[0]+(1.11368263907)*x[1]
-        arg[1,3,1,0]=(-1.25698605702)*x[0]+(-0.381254857218)*x[1]
-        arg[1,3,1,1]=(1.12038052674)*x[0]+(-0.113429410248)*x[1]
-        arg[1,3,2,0]=(0.0821799570201)*x[0]+(-0.167383600252)*x[1]
-        arg[1,3,2,1]=(-0.534217900599)*x[0]+(-1.26144431009)*x[1]
-        arg[1,4,0,0]=(0.639186045888)*x[0]+(0.258686782482)*x[1]
-        arg[1,4,0,1]=(-0.256515011769)*x[0]+(0.797453395844)*x[1]
-        arg[1,4,1,0]=(-0.427518421999)*x[0]+(-0.101439725502)*x[1]
-        arg[1,4,1,1]=(-0.251303248239)*x[0]+(0.361194806374)*x[1]
-        arg[1,4,2,0]=(0.415313798163)*x[0]+(-0.909602300262)*x[1]
-        arg[1,4,2,1]=(0.118542894027)*x[0]+(-0.28224555744)*x[1]
-        arg[2,0,0,0]=(0.700687096184)*x[0]+(-1.69964436969)*x[1]
-        arg[2,0,0,1]=(0.880393551605)*x[0]+(-0.571112060462)*x[1]
-        arg[2,0,1,0]=(1.35990706973)*x[0]+(0.260154297077)*x[1]
-        arg[2,0,1,1]=(0.294201987212)*x[0]+(-0.379007248662)*x[1]
-        arg[2,0,2,0]=(-1.42914701121)*x[0]+(0.88289145627)*x[1]
-        arg[2,0,2,1]=(-0.343976881604)*x[0]+(0.0642493086788)*x[1]
-        arg[2,1,0,0]=(0.479103547757)*x[0]+(-1.60276044525)*x[1]
-        arg[2,1,0,1]=(0.944321957371)*x[0]+(0.313721173145)*x[1]
-        arg[2,1,1,0]=(0.233589885494)*x[0]+(-0.427865810692)*x[1]
-        arg[2,1,1,1]=(-0.954518596356)*x[0]+(-0.153033245523)*x[1]
-        arg[2,1,2,0]=(1.14079619235)*x[0]+(0.136503305207)*x[1]
-        arg[2,1,2,1]=(-0.715601080868)*x[0]+(-1.74677798058)*x[1]
-        arg[2,2,0,0]=(0.211908166714)*x[0]+(0.379390512119)*x[1]
-        arg[2,2,0,1]=(0.97243389801)*x[0]+(-0.988193298566)*x[1]
-        arg[2,2,1,0]=(0.8990152555)*x[0]+(0.22398476583)*x[1]
-        arg[2,2,1,1]=(-0.748858338529)*x[0]+(-1.00255098852)*x[1]
-        arg[2,2,2,0]=(0.863334969354)*x[0]+(1.14334958607)*x[1]
-        arg[2,2,2,1]=(-0.807672728362)*x[0]+(0.837576150239)*x[1]
-        arg[2,3,0,0]=(-0.310471066952)*x[0]+(0.261468387883)*x[1]
-        arg[2,3,0,1]=(-1.61325161386)*x[0]+(0.016614907729)*x[1]
-        arg[2,3,1,0]=(-0.742577714565)*x[0]+(-1.54936077725)*x[1]
-        arg[2,3,1,1]=(-0.393825799694)*x[0]+(0.66004298074)*x[1]
-        arg[2,3,2,0]=(-1.03965632182)*x[0]+(-0.863160703719)*x[1]
-        arg[2,3,2,1]=(0.673788653196)*x[0]+(0.740311339524)*x[1]
-        arg[2,4,0,0]=(1.59272250531)*x[0]+(1.27845229216)*x[1]
-        arg[2,4,0,1]=(0.112947869874)*x[0]+(1.06626388923)*x[1]
-        arg[2,4,1,0]=(-0.935174560087)*x[0]+(0.729112002619)*x[1]
-        arg[2,4,1,1]=(1.28167575095)*x[0]+(-1.6626881011)*x[1]
-        arg[2,4,2,0]=(-1.01382997014)*x[0]+(0.40870705964)*x[1]
-        arg[2,4,2,1]=(-0.903293274454)*x[0]+(0.451662927854)*x[1]
-        arg[3,0,0,0]=(0.414933474895)*x[0]+(0.274208992931)*x[1]
-        arg[3,0,0,1]=(-0.140384007335)*x[0]+(-0.201270983912)*x[1]
-        arg[3,0,1,0]=(-1.34339529394)*x[0]+(-1.26275414913)*x[1]
-        arg[3,0,1,1]=(0.34482759487)*x[0]+(0.992140984097)*x[1]
-        arg[3,0,2,0]=(-1.56575003976)*x[0]+(-0.514557317682)*x[1]
-        arg[3,0,2,1]=(-0.203196026518)*x[0]+(-0.50777550196)*x[1]
-        arg[3,1,0,0]=(-0.465027052452)*x[0]+(0.165299984247)*x[1]
-        arg[3,1,0,1]=(-0.876537945705)*x[0]+(0.569062140702)*x[1]
-        arg[3,1,1,0]=(0.212854890028)*x[0]+(0.772436691343)*x[1]
-        arg[3,1,1,1]=(0.376912060989)*x[0]+(-1.59078116917)*x[1]
-        arg[3,1,2,0]=(-1.19949528387)*x[0]+(0.508138309995)*x[1]
-        arg[3,1,2,1]=(0.535067293288)*x[0]+(0.483486234966)*x[1]
-        arg[3,2,0,0]=(-0.366454519079)*x[0]+(0.880937088999)*x[1]
-        arg[3,2,0,1]=(-0.164158778522)*x[0]+(-0.0933716527947)*x[1]
-        arg[3,2,1,0]=(-0.338148774302)*x[0]+(0.389103301223)*x[1]
-        arg[3,2,1,1]=(-1.17323344849)*x[0]+(-0.286752347393)*x[1]
-        arg[3,2,2,0]=(0.43651426746)*x[0]+(0.0751512323008)*x[1]
-        arg[3,2,2,1]=(1.44242451962)*x[0]+(-0.853169055909)*x[1]
-        arg[3,3,0,0]=(0.268862750262)*x[0]+(0.668643005784)*x[1]
-        arg[3,3,0,1]=(-1.47078437928)*x[0]+(1.25865018681)*x[1]
-        arg[3,3,1,0]=(-0.218849811361)*x[0]+(0.147601849599)*x[1]
-        arg[3,3,1,1]=(1.66493534918)*x[0]+(0.368711512357)*x[1]
-        arg[3,3,2,0]=(0.259910144631)*x[0]+(-0.977975383491)*x[1]
-        arg[3,3,2,1]=(1.87696180213)*x[0]+(-0.583679438031)*x[1]
-        arg[3,4,0,0]=(0.226114159843)*x[0]+(0.121547181819)*x[1]
-        arg[3,4,0,1]=(1.21215141305)*x[0]+(-0.175673309633)*x[1]
-        arg[3,4,1,0]=(0.644340639306)*x[0]+(0.35372514848)*x[1]
-        arg[3,4,1,1]=(0.452987488144)*x[0]+(0.838110546855)*x[1]
-        arg[3,4,2,0]=(-0.434414511976)*x[0]+(-0.879038818613)*x[1]
-        arg[3,4,2,1]=(-0.387240543602)*x[0]+(0.187795787877)*x[1]
-        ref[0,0,0,0]=(-1.15521896363)*x_ref[0]+(0.8731619129)*x_ref[1]
-        ref[0,0,0,1]=(0.597656443464)*x_ref[0]+(0.341688152811)*x_ref[1]
-        ref[0,0,1,0]=(-0.422350580427)*x_ref[0]+(0.728011338687)*x_ref[1]
-        ref[0,0,1,1]=(-1.72046294064)*x_ref[0]+(1.13345636724)*x_ref[1]
-        ref[0,0,2,0]=(0.150530941523)*x_ref[0]+(0.437417461641)*x_ref[1]
-        ref[0,0,2,1]=(-0.413133183531)*x_ref[0]+(-0.268630939964)*x_ref[1]
-        ref[0,1,0,0]=(-0.220368905416)*x_ref[0]+(1.10085894684)*x_ref[1]
-        ref[0,1,0,1]=(-0.943367491188)*x_ref[0]+(0.80942793885)*x_ref[1]
-        ref[0,1,1,0]=(0.906220152303)*x_ref[0]+(0.801214136703)*x_ref[1]
-        ref[0,1,1,1]=(-1.3650200124)*x_ref[0]+(-0.373454973523)*x_ref[1]
-        ref[0,1,2,0]=(-0.277067377427)*x_ref[0]+(-1.62229711799)*x_ref[1]
-        ref[0,1,2,1]=(0.787076886379)*x_ref[0]+(0.496906919368)*x_ref[1]
-        ref[0,2,0,0]=(-0.0770154256748)*x_ref[0]+(1.5002648939)*x_ref[1]
-        ref[0,2,0,1]=(0.225572553862)*x_ref[0]+(1.39471337012)*x_ref[1]
-        ref[0,2,1,0]=(-0.54799237637)*x_ref[0]+(-0.607785237418)*x_ref[1]
-        ref[0,2,1,1]=(0.384591801229)*x_ref[0]+(1.30760620469)*x_ref[1]
-        ref[0,2,2,0]=(0.228248139163)*x_ref[0]+(0.151268778109)*x_ref[1]
-        ref[0,2,2,1]=(-1.43978230199)*x_ref[0]+(0.958903347524)*x_ref[1]
-        ref[0,3,0,0]=(-0.568133098072)*x_ref[0]+(0.128510595507)*x_ref[1]
-        ref[0,3,0,1]=(-0.304029315535)*x_ref[0]+(1.19478464847)*x_ref[1]
-        ref[0,3,1,0]=(0.0996876882275)*x_ref[0]+(-0.255346045102)*x_ref[1]
-        ref[0,3,1,1]=(0.414708254109)*x_ref[0]+(-0.148700489536)*x_ref[1]
-        ref[0,3,2,0]=(-0.740719850161)*x_ref[0]+(0.375907815982)*x_ref[1]
-        ref[0,3,2,1]=(-0.184189058365)*x_ref[0]+(-0.274477516444)*x_ref[1]
-        ref[0,4,0,0]=(-0.565848858136)*x_ref[0]+(-0.206818417121)*x_ref[1]
-        ref[0,4,0,1]=(-0.983652399085)*x_ref[0]+(1.21445827986)*x_ref[1]
-        ref[0,4,1,0]=(1.6425686123)*x_ref[0]+(-0.621952337654)*x_ref[1]
-        ref[0,4,1,1]=(-1.07526530849)*x_ref[0]+(-0.0915810578715)*x_ref[1]
-        ref[0,4,2,0]=(1.4812278738)*x_ref[0]+(1.61991326423)*x_ref[1]
-        ref[0,4,2,1]=(-1.4147420413)*x_ref[0]+(1.34428787131)*x_ref[1]
-        ref[1,0,0,0]=(-0.910373659777)*x_ref[0]+(1.46920176435)*x_ref[1]
-        ref[1,0,0,1]=(0.074473571609)*x_ref[0]+(-0.336642181231)*x_ref[1]
-        ref[1,0,1,0]=(-0.141813739296)*x_ref[0]+(-0.534432398621)*x_ref[1]
-        ref[1,0,1,1]=(0.728030938984)*x_ref[0]+(0.532542738961)*x_ref[1]
-        ref[1,0,2,0]=(0.20676316374)*x_ref[0]+(-0.065235999066)*x_ref[1]
-        ref[1,0,2,1]=(-1.09054680794)*x_ref[0]+(0.537754476805)*x_ref[1]
-        ref[1,1,0,0]=(0.523878896271)*x_ref[0]+(-0.0561828109964)*x_ref[1]
-        ref[1,1,0,1]=(1.27754653741)*x_ref[0]+(0.119734333004)*x_ref[1]
-        ref[1,1,1,0]=(0.0933160885942)*x_ref[0]+(0.390183021193)*x_ref[1]
-        ref[1,1,1,1]=(0.548273953924)*x_ref[0]+(-0.552588185124)*x_ref[1]
-        ref[1,1,2,0]=(0.576803722241)*x_ref[0]+(0.60898781381)*x_ref[1]
-        ref[1,1,2,1]=(-0.307231650547)*x_ref[0]+(0.439111970656)*x_ref[1]
-        ref[1,2,0,0]=(0.172113300736)*x_ref[0]+(-0.0153971432613)*x_ref[1]
-        ref[1,2,0,1]=(-0.883753634465)*x_ref[0]+(1.35320294175)*x_ref[1]
-        ref[1,2,1,0]=(0.153937139638)*x_ref[0]+(-0.865654430739)*x_ref[1]
-        ref[1,2,1,1]=(0.970377377543)*x_ref[0]+(-1.11418225395)*x_ref[1]
-        ref[1,2,2,0]=(-1.11106779953)*x_ref[0]+(-0.357700480625)*x_ref[1]
-        ref[1,2,2,1]=(0.475529404147)*x_ref[0]+(-0.121369909464)*x_ref[1]
-        ref[1,3,0,0]=(-0.867370155191)*x_ref[0]+(0.625161512036)*x_ref[1]
-        ref[1,3,0,1]=(0.252873452474)*x_ref[0]+(1.11368263907)*x_ref[1]
-        ref[1,3,1,0]=(-1.25698605702)*x_ref[0]+(-0.381254857218)*x_ref[1]
-        ref[1,3,1,1]=(1.12038052674)*x_ref[0]+(-0.113429410248)*x_ref[1]
-        ref[1,3,2,0]=(0.0821799570201)*x_ref[0]+(-0.167383600252)*x_ref[1]
-        ref[1,3,2,1]=(-0.534217900599)*x_ref[0]+(-1.26144431009)*x_ref[1]
-        ref[1,4,0,0]=(0.639186045888)*x_ref[0]+(0.258686782482)*x_ref[1]
-        ref[1,4,0,1]=(-0.256515011769)*x_ref[0]+(0.797453395844)*x_ref[1]
-        ref[1,4,1,0]=(-0.427518421999)*x_ref[0]+(-0.101439725502)*x_ref[1]
-        ref[1,4,1,1]=(-0.251303248239)*x_ref[0]+(0.361194806374)*x_ref[1]
-        ref[1,4,2,0]=(0.415313798163)*x_ref[0]+(-0.909602300262)*x_ref[1]
-        ref[1,4,2,1]=(0.118542894027)*x_ref[0]+(-0.28224555744)*x_ref[1]
-        ref[2,0,0,0]=(0.700687096184)*x_ref[0]+(-1.69964436969)*x_ref[1]
-        ref[2,0,0,1]=(0.880393551605)*x_ref[0]+(-0.571112060462)*x_ref[1]
-        ref[2,0,1,0]=(1.35990706973)*x_ref[0]+(0.260154297077)*x_ref[1]
-        ref[2,0,1,1]=(0.294201987212)*x_ref[0]+(-0.379007248662)*x_ref[1]
-        ref[2,0,2,0]=(-1.42914701121)*x_ref[0]+(0.88289145627)*x_ref[1]
-        ref[2,0,2,1]=(-0.343976881604)*x_ref[0]+(0.0642493086788)*x_ref[1]
-        ref[2,1,0,0]=(0.479103547757)*x_ref[0]+(-1.60276044525)*x_ref[1]
-        ref[2,1,0,1]=(0.944321957371)*x_ref[0]+(0.313721173145)*x_ref[1]
-        ref[2,1,1,0]=(0.233589885494)*x_ref[0]+(-0.427865810692)*x_ref[1]
-        ref[2,1,1,1]=(-0.954518596356)*x_ref[0]+(-0.153033245523)*x_ref[1]
-        ref[2,1,2,0]=(1.14079619235)*x_ref[0]+(0.136503305207)*x_ref[1]
-        ref[2,1,2,1]=(-0.715601080868)*x_ref[0]+(-1.74677798058)*x_ref[1]
-        ref[2,2,0,0]=(0.211908166714)*x_ref[0]+(0.379390512119)*x_ref[1]
-        ref[2,2,0,1]=(0.97243389801)*x_ref[0]+(-0.988193298566)*x_ref[1]
-        ref[2,2,1,0]=(0.8990152555)*x_ref[0]+(0.22398476583)*x_ref[1]
-        ref[2,2,1,1]=(-0.748858338529)*x_ref[0]+(-1.00255098852)*x_ref[1]
-        ref[2,2,2,0]=(0.863334969354)*x_ref[0]+(1.14334958607)*x_ref[1]
-        ref[2,2,2,1]=(-0.807672728362)*x_ref[0]+(0.837576150239)*x_ref[1]
-        ref[2,3,0,0]=(-0.310471066952)*x_ref[0]+(0.261468387883)*x_ref[1]
-        ref[2,3,0,1]=(-1.61325161386)*x_ref[0]+(0.016614907729)*x_ref[1]
-        ref[2,3,1,0]=(-0.742577714565)*x_ref[0]+(-1.54936077725)*x_ref[1]
-        ref[2,3,1,1]=(-0.393825799694)*x_ref[0]+(0.66004298074)*x_ref[1]
-        ref[2,3,2,0]=(-1.03965632182)*x_ref[0]+(-0.863160703719)*x_ref[1]
-        ref[2,3,2,1]=(0.673788653196)*x_ref[0]+(0.740311339524)*x_ref[1]
-        ref[2,4,0,0]=(1.59272250531)*x_ref[0]+(1.27845229216)*x_ref[1]
-        ref[2,4,0,1]=(0.112947869874)*x_ref[0]+(1.06626388923)*x_ref[1]
-        ref[2,4,1,0]=(-0.935174560087)*x_ref[0]+(0.729112002619)*x_ref[1]
-        ref[2,4,1,1]=(1.28167575095)*x_ref[0]+(-1.6626881011)*x_ref[1]
-        ref[2,4,2,0]=(-1.01382997014)*x_ref[0]+(0.40870705964)*x_ref[1]
-        ref[2,4,2,1]=(-0.903293274454)*x_ref[0]+(0.451662927854)*x_ref[1]
-        ref[3,0,0,0]=(0.414933474895)*x_ref[0]+(0.274208992931)*x_ref[1]
-        ref[3,0,0,1]=(-0.140384007335)*x_ref[0]+(-0.201270983912)*x_ref[1]
-        ref[3,0,1,0]=(-1.34339529394)*x_ref[0]+(-1.26275414913)*x_ref[1]
-        ref[3,0,1,1]=(0.34482759487)*x_ref[0]+(0.992140984097)*x_ref[1]
-        ref[3,0,2,0]=(-1.56575003976)*x_ref[0]+(-0.514557317682)*x_ref[1]
-        ref[3,0,2,1]=(-0.203196026518)*x_ref[0]+(-0.50777550196)*x_ref[1]
-        ref[3,1,0,0]=(-0.465027052452)*x_ref[0]+(0.165299984247)*x_ref[1]
-        ref[3,1,0,1]=(-0.876537945705)*x_ref[0]+(0.569062140702)*x_ref[1]
-        ref[3,1,1,0]=(0.212854890028)*x_ref[0]+(0.772436691343)*x_ref[1]
-        ref[3,1,1,1]=(0.376912060989)*x_ref[0]+(-1.59078116917)*x_ref[1]
-        ref[3,1,2,0]=(-1.19949528387)*x_ref[0]+(0.508138309995)*x_ref[1]
-        ref[3,1,2,1]=(0.535067293288)*x_ref[0]+(0.483486234966)*x_ref[1]
-        ref[3,2,0,0]=(-0.366454519079)*x_ref[0]+(0.880937088999)*x_ref[1]
-        ref[3,2,0,1]=(-0.164158778522)*x_ref[0]+(-0.0933716527947)*x_ref[1]
-        ref[3,2,1,0]=(-0.338148774302)*x_ref[0]+(0.389103301223)*x_ref[1]
-        ref[3,2,1,1]=(-1.17323344849)*x_ref[0]+(-0.286752347393)*x_ref[1]
-        ref[3,2,2,0]=(0.43651426746)*x_ref[0]+(0.0751512323008)*x_ref[1]
-        ref[3,2,2,1]=(1.44242451962)*x_ref[0]+(-0.853169055909)*x_ref[1]
-        ref[3,3,0,0]=(0.268862750262)*x_ref[0]+(0.668643005784)*x_ref[1]
-        ref[3,3,0,1]=(-1.47078437928)*x_ref[0]+(1.25865018681)*x_ref[1]
-        ref[3,3,1,0]=(-0.218849811361)*x_ref[0]+(0.147601849599)*x_ref[1]
-        ref[3,3,1,1]=(1.66493534918)*x_ref[0]+(0.368711512357)*x_ref[1]
-        ref[3,3,2,0]=(0.259910144631)*x_ref[0]+(-0.977975383491)*x_ref[1]
-        ref[3,3,2,1]=(1.87696180213)*x_ref[0]+(-0.583679438031)*x_ref[1]
-        ref[3,4,0,0]=(0.226114159843)*x_ref[0]+(0.121547181819)*x_ref[1]
-        ref[3,4,0,1]=(1.21215141305)*x_ref[0]+(-0.175673309633)*x_ref[1]
-        ref[3,4,1,0]=(0.644340639306)*x_ref[0]+(0.35372514848)*x_ref[1]
-        ref[3,4,1,1]=(0.452987488144)*x_ref[0]+(0.838110546855)*x_ref[1]
-        ref[3,4,2,0]=(-0.434414511976)*x_ref[0]+(-0.879038818613)*x_ref[1]
-        ref[3,4,2,1]=(-0.387240543602)*x_ref[0]+(0.187795787877)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.523374388946)*x[0]+(-0.462029311047)*x[1]+(-0.47732568751)*x[2]
-        arg[0,0,0,1]=(0.641437288282)*x[0]+(-0.245967769804)*x[1]+(-0.882711488334)*x[2]
-        arg[0,0,1,0]=(-0.039075405101)*x[0]+(0.233479040723)*x[1]+(-0.450244284473)*x[2]
-        arg[0,0,1,1]=(-1.00711630706)*x[0]+(-0.247720707527)*x[1]+(-0.597073422746)*x[2]
-        arg[0,0,2,0]=(0.141738833983)*x[0]+(-1.34846391496)*x[1]+(0.214891803475)*x[2]
-        arg[0,0,2,1]=(0.276967719755)*x[0]+(-0.64300940909)*x[1]+(-1.10068852616)*x[2]
-        arg[0,1,0,0]=(0.438911917989)*x[0]+(0.588137625057)*x[1]+(0.744848057181)*x[2]
-        arg[0,1,0,1]=(0.266343859518)*x[0]+(1.24092635599)*x[1]+(0.477206170905)*x[2]
-        arg[0,1,1,0]=(0.328857688358)*x[0]+(-1.17720038645)*x[1]+(0.285045368661)*x[2]
-        arg[0,1,1,1]=(-0.0985505878353)*x[0]+(1.11228710542)*x[1]+(0.159347839514)*x[2]
-        arg[0,1,2,0]=(0.125378210814)*x[0]+(1.51252392793)*x[1]+(-0.0402281595871)*x[2]
-        arg[0,1,2,1]=(-1.41964435548)*x[0]+(0.825108246489)*x[1]+(0.31679169508)*x[2]
-        arg[0,2,0,0]=(1.47728541117)*x[0]+(0.957708443424)*x[1]+(-0.187892562217)*x[2]
-        arg[0,2,0,1]=(0.0614505001405)*x[0]+(0.144444072992)*x[1]+(0.287839563179)*x[2]
-        arg[0,2,1,0]=(0.512698173313)*x[0]+(0.316852993542)*x[1]+(0.538020705489)*x[2]
-        arg[0,2,1,1]=(-0.349895838053)*x[0]+(1.50602760725)*x[1]+(-0.959979406715)*x[2]
-        arg[0,2,2,0]=(-0.618802027626)*x[0]+(0.71544179402)*x[1]+(1.09297898989)*x[2]
-        arg[0,2,2,1]=(-0.264932530879)*x[0]+(-1.4100323815)*x[1]+(-1.28423925034)*x[2]
-        arg[0,3,0,0]=(0.481724893561)*x[0]+(-0.546248388253)*x[1]+(-0.214332802735)*x[2]
-        arg[0,3,0,1]=(-1.33293479098)*x[0]+(0.989294320484)*x[1]+(-0.561974021785)*x[2]
-        arg[0,3,1,0]=(-0.394718780001)*x[0]+(1.0043343416)*x[1]+(1.51370839793)*x[2]
-        arg[0,3,1,1]=(1.08238957373)*x[0]+(0.591631122094)*x[1]+(0.075283954318)*x[2]
-        arg[0,3,2,0]=(-1.0250149161)*x[0]+(-0.739848118412)*x[1]+(0.736595112789)*x[2]
-        arg[0,3,2,1]=(-1.08033009366)*x[0]+(-0.574926147021)*x[1]+(0.421251948724)*x[2]
-        arg[0,4,0,0]=(-0.0894466241931)*x[0]+(1.14935896473)*x[1]+(-0.490410015077)*x[2]
-        arg[0,4,0,1]=(1.07777309372)*x[0]+(1.0672971936)*x[1]+(0.340143160972)*x[2]
-        arg[0,4,1,0]=(0.905553949676)*x[0]+(0.171320798438)*x[1]+(1.83634812891)*x[2]
-        arg[0,4,1,1]=(-0.663516264963)*x[0]+(0.14871937304)*x[1]+(-0.697949666962)*x[2]
-        arg[0,4,2,0]=(1.41806579095)*x[0]+(0.0357313086623)*x[1]+(0.110846683649)*x[2]
-        arg[0,4,2,1]=(-0.31919270211)*x[0]+(-1.651049084)*x[1]+(-1.47528307262)*x[2]
-        arg[1,0,0,0]=(0.167209321535)*x[0]+(-1.13066332212)*x[1]+(0.209489173491)*x[2]
-        arg[1,0,0,1]=(1.45770122794)*x[0]+(1.12024118263)*x[1]+(0.0203526002602)*x[2]
-        arg[1,0,1,0]=(0.180403238696)*x[0]+(0.580625819717)*x[1]+(-1.00882441351)*x[2]
-        arg[1,0,1,1]=(-0.20671421669)*x[0]+(-0.199445466326)*x[1]+(0.887365974398)*x[2]
-        arg[1,0,2,0]=(-0.0109233374932)*x[0]+(0.835241335188)*x[1]+(-0.810658050514)*x[2]
-        arg[1,0,2,1]=(-1.45991974539)*x[0]+(0.955399748215)*x[1]+(0.398673469474)*x[2]
-        arg[1,1,0,0]=(0.726687414113)*x[0]+(-1.35343793545)*x[1]+(0.750079540417)*x[2]
-        arg[1,1,0,1]=(-0.677871860083)*x[0]+(-1.56756818572)*x[1]+(-0.240923946416)*x[2]
-        arg[1,1,1,0]=(-1.05791511835)*x[0]+(-0.425827952234)*x[1]+(-1.82875340474)*x[2]
-        arg[1,1,1,1]=(-0.430783664297)*x[0]+(0.552238591434)*x[1]+(0.502702385375)*x[2]
-        arg[1,1,2,0]=(0.240203734777)*x[0]+(-0.0650121194654)*x[1]+(1.04662204076)*x[2]
-        arg[1,1,2,1]=(-0.25305133215)*x[0]+(-0.31486026571)*x[1]+(-1.83073697314)*x[2]
-        arg[1,2,0,0]=(-1.09643062195)*x[0]+(-0.437887555247)*x[1]+(-1.33970467276)*x[2]
-        arg[1,2,0,1]=(1.24489646204)*x[0]+(1.0714412157)*x[1]+(-0.192090595585)*x[2]
-        arg[1,2,1,0]=(0.029290840641)*x[0]+(-0.940655160496)*x[1]+(-0.820414570983)*x[2]
-        arg[1,2,1,1]=(-0.677190307386)*x[0]+(-0.00164385522847)*x[1]+(-0.46460277293)*x[2]
-        arg[1,2,2,0]=(-0.320006508895)*x[0]+(1.13412133331)*x[1]+(-0.619705535377)*x[2]
-        arg[1,2,2,1]=(-0.0220330715863)*x[0]+(-0.64687567378)*x[1]+(0.0957350181768)*x[2]
-        arg[1,3,0,0]=(-0.25073330162)*x[0]+(0.85795600432)*x[1]+(1.53293778947)*x[2]
-        arg[1,3,0,1]=(-0.183346360622)*x[0]+(0.266035391885)*x[1]+(-0.422228348627)*x[2]
-        arg[1,3,1,0]=(-0.41587781442)*x[0]+(-0.0103068212789)*x[1]+(0.440665738388)*x[2]
-        arg[1,3,1,1]=(1.41825912495)*x[0]+(-0.0611650685825)*x[1]+(0.972511387093)*x[2]
-        arg[1,3,2,0]=(-0.336532230508)*x[0]+(-0.0123275905127)*x[1]+(-0.254643420879)*x[2]
-        arg[1,3,2,1]=(-0.365437122858)*x[0]+(0.71384297093)*x[1]+(0.447802028475)*x[2]
-        arg[1,4,0,0]=(1.33371172009)*x[0]+(1.16948649723)*x[1]+(-0.624453779138)*x[2]
-        arg[1,4,0,1]=(0.0919647304743)*x[0]+(1.20509307321)*x[1]+(0.454668856107)*x[2]
-        arg[1,4,1,0]=(0.179837036326)*x[0]+(1.27470487309)*x[1]+(0.248127557917)*x[2]
-        arg[1,4,1,1]=(-0.0163592123585)*x[0]+(-1.09373628426)*x[1]+(-1.07284707536)*x[2]
-        arg[1,4,2,0]=(-0.0617954247638)*x[0]+(0.180336071139)*x[1]+(0.0715760255435)*x[2]
-        arg[1,4,2,1]=(0.449148667011)*x[0]+(0.476092516356)*x[1]+(-0.235672424702)*x[2]
-        arg[2,0,0,0]=(1.06662096238)*x[0]+(1.52079387843)*x[1]+(-0.465087313097)*x[2]
-        arg[2,0,0,1]=(-0.0113962755891)*x[0]+(0.459517781034)*x[1]+(0.423861505703)*x[2]
-        arg[2,0,1,0]=(1.19571956088)*x[0]+(1.02444853474)*x[1]+(-1.31054246173)*x[2]
-        arg[2,0,1,1]=(-1.39536067914)*x[0]+(0.884184554143)*x[1]+(-0.650926411157)*x[2]
-        arg[2,0,2,0]=(-0.328672728946)*x[0]+(1.07247782219)*x[1]+(-0.61103916867)*x[2]
-        arg[2,0,2,1]=(0.155304775433)*x[0]+(-1.34794080729)*x[1]+(-0.931891854948)*x[2]
-        arg[2,1,0,0]=(-0.953726622792)*x[0]+(0.483614421199)*x[1]+(1.07026616662)*x[2]
-        arg[2,1,0,1]=(0.720797127905)*x[0]+(1.31309704242)*x[1]+(0.534213389945)*x[2]
-        arg[2,1,1,0]=(1.12642665973)*x[0]+(-0.375134467285)*x[1]+(0.223566393552)*x[2]
-        arg[2,1,1,1]=(-0.380892997026)*x[0]+(-0.661627351046)*x[1]+(0.596842673155)*x[2]
-        arg[2,1,2,0]=(0.233212348554)*x[0]+(0.106673294307)*x[1]+(-0.22268427628)*x[2]
-        arg[2,1,2,1]=(0.67982223365)*x[0]+(-1.53842407155)*x[1]+(0.995328875213)*x[2]
-        arg[2,2,0,0]=(1.5835734841)*x[0]+(0.178824495609)*x[1]+(-0.31332770355)*x[2]
-        arg[2,2,0,1]=(0.101063103927)*x[0]+(-0.0437670737377)*x[1]+(-0.109514170393)*x[2]
-        arg[2,2,1,0]=(-0.892614006193)*x[0]+(0.952803608394)*x[1]+(-0.643308315526)*x[2]
-        arg[2,2,1,1]=(-0.0606310193159)*x[0]+(-0.768822197122)*x[1]+(-1.43018654257)*x[2]
-        arg[2,2,2,0]=(0.107463856971)*x[0]+(1.27309352669)*x[1]+(1.65234673057)*x[2]
-        arg[2,2,2,1]=(0.699315319729)*x[0]+(-0.345960580793)*x[1]+(-1.61621444026)*x[2]
-        arg[2,3,0,0]=(0.9761936338)*x[0]+(0.665547749873)*x[1]+(-1.07512721449)*x[2]
-        arg[2,3,0,1]=(1.26182572924)*x[0]+(-0.416232568884)*x[1]+(-0.356737405174)*x[2]
-        arg[2,3,1,0]=(-0.477958253427)*x[0]+(0.198049156904)*x[1]+(-0.295022782364)*x[2]
-        arg[2,3,1,1]=(0.412187471103)*x[0]+(0.335655056628)*x[1]+(-0.0873658679329)*x[2]
-        arg[2,3,2,0]=(0.168439409327)*x[0]+(-0.131948711409)*x[1]+(1.66777364846)*x[2]
-        arg[2,3,2,1]=(0.508795552378)*x[0]+(-0.390505460243)*x[1]+(0.13190717559)*x[2]
-        arg[2,4,0,0]=(0.446543094067)*x[0]+(-1.49620720862)*x[1]+(-1.23581717894)*x[2]
-        arg[2,4,0,1]=(-0.964404449625)*x[0]+(0.229523164331)*x[1]+(-0.0829574431644)*x[2]
-        arg[2,4,1,0]=(-0.0222885761611)*x[0]+(-0.151419169433)*x[1]+(0.0521007301341)*x[2]
-        arg[2,4,1,1]=(-0.299232945099)*x[0]+(0.831745448311)*x[1]+(0.0354480204711)*x[2]
-        arg[2,4,2,0]=(0.350303784953)*x[0]+(0.0608299778701)*x[1]+(1.10333111365)*x[2]
-        arg[2,4,2,1]=(0.719573610926)*x[0]+(-0.0868905011544)*x[1]+(0.852804030732)*x[2]
-        arg[3,0,0,0]=(0.643070908885)*x[0]+(0.846705112025)*x[1]+(-0.340473447494)*x[2]
-        arg[3,0,0,1]=(-0.180433440729)*x[0]+(1.20490149625)*x[1]+(1.65034499912)*x[2]
-        arg[3,0,1,0]=(-0.454239570444)*x[0]+(0.425446741192)*x[1]+(0.469566134089)*x[2]
-        arg[3,0,1,1]=(-0.080272513364)*x[0]+(-0.437416002114)*x[1]+(0.741423922011)*x[2]
-        arg[3,0,2,0]=(0.0202920395247)*x[0]+(0.724451134981)*x[1]+(-0.628631137287)*x[2]
-        arg[3,0,2,1]=(1.27329890828)*x[0]+(1.32598594097)*x[1]+(-1.03893516914)*x[2]
-        arg[3,1,0,0]=(-0.316679599208)*x[0]+(1.37172239358)*x[1]+(-0.333448830595)*x[2]
-        arg[3,1,0,1]=(-0.97422120848)*x[0]+(-0.800596641862)*x[1]+(1.21296910893)*x[2]
-        arg[3,1,1,0]=(-0.791725431754)*x[0]+(0.173363698424)*x[1]+(-0.137920990647)*x[2]
-        arg[3,1,1,1]=(-0.104259554446)*x[0]+(1.14966042893)*x[1]+(0.694287361582)*x[2]
-        arg[3,1,2,0]=(0.130345878498)*x[0]+(0.186936528352)*x[1]+(-1.74442226692)*x[2]
-        arg[3,1,2,1]=(-0.952031053033)*x[0]+(0.718038193789)*x[1]+(-0.912958209036)*x[2]
-        arg[3,2,0,0]=(-1.16180973047)*x[0]+(0.0107173530275)*x[1]+(1.30278786691)*x[2]
-        arg[3,2,0,1]=(-0.224509227379)*x[0]+(0.0996327632409)*x[1]+(-0.590950424929)*x[2]
-        arg[3,2,1,0]=(1.37202300472)*x[0]+(-1.46745698646)*x[1]+(-0.811483806572)*x[2]
-        arg[3,2,1,1]=(1.4828065241)*x[0]+(-0.177365694124)*x[1]+(0.723931620237)*x[2]
-        arg[3,2,2,0]=(0.230529059637)*x[0]+(0.728445639896)*x[1]+(-0.566988770509)*x[2]
-        arg[3,2,2,1]=(0.797697737992)*x[0]+(-1.13322423945)*x[1]+(-1.1409387296)*x[2]
-        arg[3,3,0,0]=(0.217205133789)*x[0]+(-0.510677603419)*x[1]+(-0.580535665335)*x[2]
-        arg[3,3,0,1]=(-0.388656568244)*x[0]+(-0.906189671302)*x[1]+(0.44802765855)*x[2]
-        arg[3,3,1,0]=(0.13492738758)*x[0]+(-0.0523341874741)*x[1]+(1.42846176777)*x[2]
-        arg[3,3,1,1]=(0.243377010926)*x[0]+(-0.701174291473)*x[1]+(-0.756059212704)*x[2]
-        arg[3,3,2,0]=(1.48359083301)*x[0]+(1.17692500152)*x[1]+(-0.184437593764)*x[2]
-        arg[3,3,2,1]=(-0.105457636222)*x[0]+(-0.0190796656068)*x[1]+(-0.938560206034)*x[2]
-        arg[3,4,0,0]=(-0.101684388703)*x[0]+(-1.19809056647)*x[1]+(1.1989510907)*x[2]
-        arg[3,4,0,1]=(-1.0745487924)*x[0]+(-0.37560532919)*x[1]+(-0.967022985879)*x[2]
-        arg[3,4,1,0]=(0.315585027641)*x[0]+(-0.238716421886)*x[1]+(-0.275850551625)*x[2]
-        arg[3,4,1,1]=(-0.824271180248)*x[0]+(-0.0649845724269)*x[1]+(0.530472696035)*x[2]
-        arg[3,4,2,0]=(-0.518165130932)*x[0]+(1.44722596827)*x[1]+(0.072367534289)*x[2]
-        arg[3,4,2,1]=(-0.247477354356)*x[0]+(0.988584526142)*x[1]+(0.0491978506036)*x[2]
-        ref[0,0,0,0]=(0.523374388946)*x_ref[0]+(-0.462029311047)*x_ref[1]+(-0.47732568751)*x_ref[2]
-        ref[0,0,0,1]=(0.641437288282)*x_ref[0]+(-0.245967769804)*x_ref[1]+(-0.882711488334)*x_ref[2]
-        ref[0,0,1,0]=(-0.039075405101)*x_ref[0]+(0.233479040723)*x_ref[1]+(-0.450244284473)*x_ref[2]
-        ref[0,0,1,1]=(-1.00711630706)*x_ref[0]+(-0.247720707527)*x_ref[1]+(-0.597073422746)*x_ref[2]
-        ref[0,0,2,0]=(0.141738833983)*x_ref[0]+(-1.34846391496)*x_ref[1]+(0.214891803475)*x_ref[2]
-        ref[0,0,2,1]=(0.276967719755)*x_ref[0]+(-0.64300940909)*x_ref[1]+(-1.10068852616)*x_ref[2]
-        ref[0,1,0,0]=(0.438911917989)*x_ref[0]+(0.588137625057)*x_ref[1]+(0.744848057181)*x_ref[2]
-        ref[0,1,0,1]=(0.266343859518)*x_ref[0]+(1.24092635599)*x_ref[1]+(0.477206170905)*x_ref[2]
-        ref[0,1,1,0]=(0.328857688358)*x_ref[0]+(-1.17720038645)*x_ref[1]+(0.285045368661)*x_ref[2]
-        ref[0,1,1,1]=(-0.0985505878353)*x_ref[0]+(1.11228710542)*x_ref[1]+(0.159347839514)*x_ref[2]
-        ref[0,1,2,0]=(0.125378210814)*x_ref[0]+(1.51252392793)*x_ref[1]+(-0.0402281595871)*x_ref[2]
-        ref[0,1,2,1]=(-1.41964435548)*x_ref[0]+(0.825108246489)*x_ref[1]+(0.31679169508)*x_ref[2]
-        ref[0,2,0,0]=(1.47728541117)*x_ref[0]+(0.957708443424)*x_ref[1]+(-0.187892562217)*x_ref[2]
-        ref[0,2,0,1]=(0.0614505001405)*x_ref[0]+(0.144444072992)*x_ref[1]+(0.287839563179)*x_ref[2]
-        ref[0,2,1,0]=(0.512698173313)*x_ref[0]+(0.316852993542)*x_ref[1]+(0.538020705489)*x_ref[2]
-        ref[0,2,1,1]=(-0.349895838053)*x_ref[0]+(1.50602760725)*x_ref[1]+(-0.959979406715)*x_ref[2]
-        ref[0,2,2,0]=(-0.618802027626)*x_ref[0]+(0.71544179402)*x_ref[1]+(1.09297898989)*x_ref[2]
-        ref[0,2,2,1]=(-0.264932530879)*x_ref[0]+(-1.4100323815)*x_ref[1]+(-1.28423925034)*x_ref[2]
-        ref[0,3,0,0]=(0.481724893561)*x_ref[0]+(-0.546248388253)*x_ref[1]+(-0.214332802735)*x_ref[2]
-        ref[0,3,0,1]=(-1.33293479098)*x_ref[0]+(0.989294320484)*x_ref[1]+(-0.561974021785)*x_ref[2]
-        ref[0,3,1,0]=(-0.394718780001)*x_ref[0]+(1.0043343416)*x_ref[1]+(1.51370839793)*x_ref[2]
-        ref[0,3,1,1]=(1.08238957373)*x_ref[0]+(0.591631122094)*x_ref[1]+(0.075283954318)*x_ref[2]
-        ref[0,3,2,0]=(-1.0250149161)*x_ref[0]+(-0.739848118412)*x_ref[1]+(0.736595112789)*x_ref[2]
-        ref[0,3,2,1]=(-1.08033009366)*x_ref[0]+(-0.574926147021)*x_ref[1]+(0.421251948724)*x_ref[2]
-        ref[0,4,0,0]=(-0.0894466241931)*x_ref[0]+(1.14935896473)*x_ref[1]+(-0.490410015077)*x_ref[2]
-        ref[0,4,0,1]=(1.07777309372)*x_ref[0]+(1.0672971936)*x_ref[1]+(0.340143160972)*x_ref[2]
-        ref[0,4,1,0]=(0.905553949676)*x_ref[0]+(0.171320798438)*x_ref[1]+(1.83634812891)*x_ref[2]
-        ref[0,4,1,1]=(-0.663516264963)*x_ref[0]+(0.14871937304)*x_ref[1]+(-0.697949666962)*x_ref[2]
-        ref[0,4,2,0]=(1.41806579095)*x_ref[0]+(0.0357313086623)*x_ref[1]+(0.110846683649)*x_ref[2]
-        ref[0,4,2,1]=(-0.31919270211)*x_ref[0]+(-1.651049084)*x_ref[1]+(-1.47528307262)*x_ref[2]
-        ref[1,0,0,0]=(0.167209321535)*x_ref[0]+(-1.13066332212)*x_ref[1]+(0.209489173491)*x_ref[2]
-        ref[1,0,0,1]=(1.45770122794)*x_ref[0]+(1.12024118263)*x_ref[1]+(0.0203526002602)*x_ref[2]
-        ref[1,0,1,0]=(0.180403238696)*x_ref[0]+(0.580625819717)*x_ref[1]+(-1.00882441351)*x_ref[2]
-        ref[1,0,1,1]=(-0.20671421669)*x_ref[0]+(-0.199445466326)*x_ref[1]+(0.887365974398)*x_ref[2]
-        ref[1,0,2,0]=(-0.0109233374932)*x_ref[0]+(0.835241335188)*x_ref[1]+(-0.810658050514)*x_ref[2]
-        ref[1,0,2,1]=(-1.45991974539)*x_ref[0]+(0.955399748215)*x_ref[1]+(0.398673469474)*x_ref[2]
-        ref[1,1,0,0]=(0.726687414113)*x_ref[0]+(-1.35343793545)*x_ref[1]+(0.750079540417)*x_ref[2]
-        ref[1,1,0,1]=(-0.677871860083)*x_ref[0]+(-1.56756818572)*x_ref[1]+(-0.240923946416)*x_ref[2]
-        ref[1,1,1,0]=(-1.05791511835)*x_ref[0]+(-0.425827952234)*x_ref[1]+(-1.82875340474)*x_ref[2]
-        ref[1,1,1,1]=(-0.430783664297)*x_ref[0]+(0.552238591434)*x_ref[1]+(0.502702385375)*x_ref[2]
-        ref[1,1,2,0]=(0.240203734777)*x_ref[0]+(-0.0650121194654)*x_ref[1]+(1.04662204076)*x_ref[2]
-        ref[1,1,2,1]=(-0.25305133215)*x_ref[0]+(-0.31486026571)*x_ref[1]+(-1.83073697314)*x_ref[2]
-        ref[1,2,0,0]=(-1.09643062195)*x_ref[0]+(-0.437887555247)*x_ref[1]+(-1.33970467276)*x_ref[2]
-        ref[1,2,0,1]=(1.24489646204)*x_ref[0]+(1.0714412157)*x_ref[1]+(-0.192090595585)*x_ref[2]
-        ref[1,2,1,0]=(0.029290840641)*x_ref[0]+(-0.940655160496)*x_ref[1]+(-0.820414570983)*x_ref[2]
-        ref[1,2,1,1]=(-0.677190307386)*x_ref[0]+(-0.00164385522847)*x_ref[1]+(-0.46460277293)*x_ref[2]
-        ref[1,2,2,0]=(-0.320006508895)*x_ref[0]+(1.13412133331)*x_ref[1]+(-0.619705535377)*x_ref[2]
-        ref[1,2,2,1]=(-0.0220330715863)*x_ref[0]+(-0.64687567378)*x_ref[1]+(0.0957350181768)*x_ref[2]
-        ref[1,3,0,0]=(-0.25073330162)*x_ref[0]+(0.85795600432)*x_ref[1]+(1.53293778947)*x_ref[2]
-        ref[1,3,0,1]=(-0.183346360622)*x_ref[0]+(0.266035391885)*x_ref[1]+(-0.422228348627)*x_ref[2]
-        ref[1,3,1,0]=(-0.41587781442)*x_ref[0]+(-0.0103068212789)*x_ref[1]+(0.440665738388)*x_ref[2]
-        ref[1,3,1,1]=(1.41825912495)*x_ref[0]+(-0.0611650685825)*x_ref[1]+(0.972511387093)*x_ref[2]
-        ref[1,3,2,0]=(-0.336532230508)*x_ref[0]+(-0.0123275905127)*x_ref[1]+(-0.254643420879)*x_ref[2]
-        ref[1,3,2,1]=(-0.365437122858)*x_ref[0]+(0.71384297093)*x_ref[1]+(0.447802028475)*x_ref[2]
-        ref[1,4,0,0]=(1.33371172009)*x_ref[0]+(1.16948649723)*x_ref[1]+(-0.624453779138)*x_ref[2]
-        ref[1,4,0,1]=(0.0919647304743)*x_ref[0]+(1.20509307321)*x_ref[1]+(0.454668856107)*x_ref[2]
-        ref[1,4,1,0]=(0.179837036326)*x_ref[0]+(1.27470487309)*x_ref[1]+(0.248127557917)*x_ref[2]
-        ref[1,4,1,1]=(-0.0163592123585)*x_ref[0]+(-1.09373628426)*x_ref[1]+(-1.07284707536)*x_ref[2]
-        ref[1,4,2,0]=(-0.0617954247638)*x_ref[0]+(0.180336071139)*x_ref[1]+(0.0715760255435)*x_ref[2]
-        ref[1,4,2,1]=(0.449148667011)*x_ref[0]+(0.476092516356)*x_ref[1]+(-0.235672424702)*x_ref[2]
-        ref[2,0,0,0]=(1.06662096238)*x_ref[0]+(1.52079387843)*x_ref[1]+(-0.465087313097)*x_ref[2]
-        ref[2,0,0,1]=(-0.0113962755891)*x_ref[0]+(0.459517781034)*x_ref[1]+(0.423861505703)*x_ref[2]
-        ref[2,0,1,0]=(1.19571956088)*x_ref[0]+(1.02444853474)*x_ref[1]+(-1.31054246173)*x_ref[2]
-        ref[2,0,1,1]=(-1.39536067914)*x_ref[0]+(0.884184554143)*x_ref[1]+(-0.650926411157)*x_ref[2]
-        ref[2,0,2,0]=(-0.328672728946)*x_ref[0]+(1.07247782219)*x_ref[1]+(-0.61103916867)*x_ref[2]
-        ref[2,0,2,1]=(0.155304775433)*x_ref[0]+(-1.34794080729)*x_ref[1]+(-0.931891854948)*x_ref[2]
-        ref[2,1,0,0]=(-0.953726622792)*x_ref[0]+(0.483614421199)*x_ref[1]+(1.07026616662)*x_ref[2]
-        ref[2,1,0,1]=(0.720797127905)*x_ref[0]+(1.31309704242)*x_ref[1]+(0.534213389945)*x_ref[2]
-        ref[2,1,1,0]=(1.12642665973)*x_ref[0]+(-0.375134467285)*x_ref[1]+(0.223566393552)*x_ref[2]
-        ref[2,1,1,1]=(-0.380892997026)*x_ref[0]+(-0.661627351046)*x_ref[1]+(0.596842673155)*x_ref[2]
-        ref[2,1,2,0]=(0.233212348554)*x_ref[0]+(0.106673294307)*x_ref[1]+(-0.22268427628)*x_ref[2]
-        ref[2,1,2,1]=(0.67982223365)*x_ref[0]+(-1.53842407155)*x_ref[1]+(0.995328875213)*x_ref[2]
-        ref[2,2,0,0]=(1.5835734841)*x_ref[0]+(0.178824495609)*x_ref[1]+(-0.31332770355)*x_ref[2]
-        ref[2,2,0,1]=(0.101063103927)*x_ref[0]+(-0.0437670737377)*x_ref[1]+(-0.109514170393)*x_ref[2]
-        ref[2,2,1,0]=(-0.892614006193)*x_ref[0]+(0.952803608394)*x_ref[1]+(-0.643308315526)*x_ref[2]
-        ref[2,2,1,1]=(-0.0606310193159)*x_ref[0]+(-0.768822197122)*x_ref[1]+(-1.43018654257)*x_ref[2]
-        ref[2,2,2,0]=(0.107463856971)*x_ref[0]+(1.27309352669)*x_ref[1]+(1.65234673057)*x_ref[2]
-        ref[2,2,2,1]=(0.699315319729)*x_ref[0]+(-0.345960580793)*x_ref[1]+(-1.61621444026)*x_ref[2]
-        ref[2,3,0,0]=(0.9761936338)*x_ref[0]+(0.665547749873)*x_ref[1]+(-1.07512721449)*x_ref[2]
-        ref[2,3,0,1]=(1.26182572924)*x_ref[0]+(-0.416232568884)*x_ref[1]+(-0.356737405174)*x_ref[2]
-        ref[2,3,1,0]=(-0.477958253427)*x_ref[0]+(0.198049156904)*x_ref[1]+(-0.295022782364)*x_ref[2]
-        ref[2,3,1,1]=(0.412187471103)*x_ref[0]+(0.335655056628)*x_ref[1]+(-0.0873658679329)*x_ref[2]
-        ref[2,3,2,0]=(0.168439409327)*x_ref[0]+(-0.131948711409)*x_ref[1]+(1.66777364846)*x_ref[2]
-        ref[2,3,2,1]=(0.508795552378)*x_ref[0]+(-0.390505460243)*x_ref[1]+(0.13190717559)*x_ref[2]
-        ref[2,4,0,0]=(0.446543094067)*x_ref[0]+(-1.49620720862)*x_ref[1]+(-1.23581717894)*x_ref[2]
-        ref[2,4,0,1]=(-0.964404449625)*x_ref[0]+(0.229523164331)*x_ref[1]+(-0.0829574431644)*x_ref[2]
-        ref[2,4,1,0]=(-0.0222885761611)*x_ref[0]+(-0.151419169433)*x_ref[1]+(0.0521007301341)*x_ref[2]
-        ref[2,4,1,1]=(-0.299232945099)*x_ref[0]+(0.831745448311)*x_ref[1]+(0.0354480204711)*x_ref[2]
-        ref[2,4,2,0]=(0.350303784953)*x_ref[0]+(0.0608299778701)*x_ref[1]+(1.10333111365)*x_ref[2]
-        ref[2,4,2,1]=(0.719573610926)*x_ref[0]+(-0.0868905011544)*x_ref[1]+(0.852804030732)*x_ref[2]
-        ref[3,0,0,0]=(0.643070908885)*x_ref[0]+(0.846705112025)*x_ref[1]+(-0.340473447494)*x_ref[2]
-        ref[3,0,0,1]=(-0.180433440729)*x_ref[0]+(1.20490149625)*x_ref[1]+(1.65034499912)*x_ref[2]
-        ref[3,0,1,0]=(-0.454239570444)*x_ref[0]+(0.425446741192)*x_ref[1]+(0.469566134089)*x_ref[2]
-        ref[3,0,1,1]=(-0.080272513364)*x_ref[0]+(-0.437416002114)*x_ref[1]+(0.741423922011)*x_ref[2]
-        ref[3,0,2,0]=(0.0202920395247)*x_ref[0]+(0.724451134981)*x_ref[1]+(-0.628631137287)*x_ref[2]
-        ref[3,0,2,1]=(1.27329890828)*x_ref[0]+(1.32598594097)*x_ref[1]+(-1.03893516914)*x_ref[2]
-        ref[3,1,0,0]=(-0.316679599208)*x_ref[0]+(1.37172239358)*x_ref[1]+(-0.333448830595)*x_ref[2]
-        ref[3,1,0,1]=(-0.97422120848)*x_ref[0]+(-0.800596641862)*x_ref[1]+(1.21296910893)*x_ref[2]
-        ref[3,1,1,0]=(-0.791725431754)*x_ref[0]+(0.173363698424)*x_ref[1]+(-0.137920990647)*x_ref[2]
-        ref[3,1,1,1]=(-0.104259554446)*x_ref[0]+(1.14966042893)*x_ref[1]+(0.694287361582)*x_ref[2]
-        ref[3,1,2,0]=(0.130345878498)*x_ref[0]+(0.186936528352)*x_ref[1]+(-1.74442226692)*x_ref[2]
-        ref[3,1,2,1]=(-0.952031053033)*x_ref[0]+(0.718038193789)*x_ref[1]+(-0.912958209036)*x_ref[2]
-        ref[3,2,0,0]=(-1.16180973047)*x_ref[0]+(0.0107173530275)*x_ref[1]+(1.30278786691)*x_ref[2]
-        ref[3,2,0,1]=(-0.224509227379)*x_ref[0]+(0.0996327632409)*x_ref[1]+(-0.590950424929)*x_ref[2]
-        ref[3,2,1,0]=(1.37202300472)*x_ref[0]+(-1.46745698646)*x_ref[1]+(-0.811483806572)*x_ref[2]
-        ref[3,2,1,1]=(1.4828065241)*x_ref[0]+(-0.177365694124)*x_ref[1]+(0.723931620237)*x_ref[2]
-        ref[3,2,2,0]=(0.230529059637)*x_ref[0]+(0.728445639896)*x_ref[1]+(-0.566988770509)*x_ref[2]
-        ref[3,2,2,1]=(0.797697737992)*x_ref[0]+(-1.13322423945)*x_ref[1]+(-1.1409387296)*x_ref[2]
-        ref[3,3,0,0]=(0.217205133789)*x_ref[0]+(-0.510677603419)*x_ref[1]+(-0.580535665335)*x_ref[2]
-        ref[3,3,0,1]=(-0.388656568244)*x_ref[0]+(-0.906189671302)*x_ref[1]+(0.44802765855)*x_ref[2]
-        ref[3,3,1,0]=(0.13492738758)*x_ref[0]+(-0.0523341874741)*x_ref[1]+(1.42846176777)*x_ref[2]
-        ref[3,3,1,1]=(0.243377010926)*x_ref[0]+(-0.701174291473)*x_ref[1]+(-0.756059212704)*x_ref[2]
-        ref[3,3,2,0]=(1.48359083301)*x_ref[0]+(1.17692500152)*x_ref[1]+(-0.184437593764)*x_ref[2]
-        ref[3,3,2,1]=(-0.105457636222)*x_ref[0]+(-0.0190796656068)*x_ref[1]+(-0.938560206034)*x_ref[2]
-        ref[3,4,0,0]=(-0.101684388703)*x_ref[0]+(-1.19809056647)*x_ref[1]+(1.1989510907)*x_ref[2]
-        ref[3,4,0,1]=(-1.0745487924)*x_ref[0]+(-0.37560532919)*x_ref[1]+(-0.967022985879)*x_ref[2]
-        ref[3,4,1,0]=(0.315585027641)*x_ref[0]+(-0.238716421886)*x_ref[1]+(-0.275850551625)*x_ref[2]
-        ref[3,4,1,1]=(-0.824271180248)*x_ref[0]+(-0.0649845724269)*x_ref[1]+(0.530472696035)*x_ref[2]
-        ref[3,4,2,0]=(-0.518165130932)*x_ref[0]+(1.44722596827)*x_ref[1]+(0.072367534289)*x_ref[2]
-        ref[3,4,2,1]=(-0.247477354356)*x_ref[0]+(0.988584526142)*x_ref[1]+(0.0491978506036)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref),self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(1.66854814732)*x[0]+(1.38199165128)*x[1]
-        ref=(1.66854814732)*x_ref[0]+(1.38199165128)*x_ref[1]
-      else:
-        arg=(-0.426142624852)*x[0]+(0.0492229050252)*x[1]+(-0.821661899519)*x[2]
-        ref=(-0.426142624852)*x_ref[0]+(0.0492229050252)*x_ref[1]+(-0.821661899519)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        arg[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-        ref[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        ref[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-      else:
-        arg[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        arg[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-        ref[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        ref[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.178459116054)*x[0]+(-0.908190366917)*x[1]
-        arg[0,1]=(-0.365861276878)*x[0]+(-1.57557211363)*x[1]
-        arg[0,2]=(-1.22266296874)*x[0]+(0.476090041507)*x[1]
-        arg[0,3]=(0.0677955238995)*x[0]+(-0.899620825938)*x[1]
-        arg[0,4]=(-0.29315929952)*x[0]+(-0.0589414650397)*x[1]
-        arg[1,0]=(-0.510486453858)*x[0]+(0.960724573137)*x[1]
-        arg[1,1]=(-0.316955543)*x[0]+(-0.160275601404)*x[1]
-        arg[1,2]=(-0.960162300557)*x[0]+(0.426685726779)*x[1]
-        arg[1,3]=(-0.458645373633)*x[0]+(0.623646469232)*x[1]
-        arg[1,4]=(-0.831993675808)*x[0]+(-0.380162434858)*x[1]
-        arg[2,0]=(-0.0614446129662)*x[0]+(0.442134320884)*x[1]
-        arg[2,1]=(-0.0466135888936)*x[0]+(0.465021672347)*x[1]
-        arg[2,2]=(-1.69520946599)*x[0]+(-1.69200166455)*x[1]
-        arg[2,3]=(0.928809309584)*x[0]+(-0.344012063367)*x[1]
-        arg[2,4]=(0.557754072268)*x[0]+(-0.0104949991147)*x[1]
-        arg[3,0]=(0.0683969753885)*x[0]+(1.59892831147)*x[1]
-        arg[3,1]=(0.90059768275)*x[0]+(1.4136644906)*x[1]
-        arg[3,2]=(-0.397873855228)*x[0]+(-0.876192378488)*x[1]
-        arg[3,3]=(-1.71837532502)*x[0]+(-0.911585940448)*x[1]
-        arg[3,4]=(-1.619565287)*x[0]+(-0.911830282675)*x[1]
-        ref[0,0]=(-0.178459116054)*x_ref[0]+(-0.908190366917)*x_ref[1]
-        ref[0,1]=(-0.365861276878)*x_ref[0]+(-1.57557211363)*x_ref[1]
-        ref[0,2]=(-1.22266296874)*x_ref[0]+(0.476090041507)*x_ref[1]
-        ref[0,3]=(0.0677955238995)*x_ref[0]+(-0.899620825938)*x_ref[1]
-        ref[0,4]=(-0.29315929952)*x_ref[0]+(-0.0589414650397)*x_ref[1]
-        ref[1,0]=(-0.510486453858)*x_ref[0]+(0.960724573137)*x_ref[1]
-        ref[1,1]=(-0.316955543)*x_ref[0]+(-0.160275601404)*x_ref[1]
-        ref[1,2]=(-0.960162300557)*x_ref[0]+(0.426685726779)*x_ref[1]
-        ref[1,3]=(-0.458645373633)*x_ref[0]+(0.623646469232)*x_ref[1]
-        ref[1,4]=(-0.831993675808)*x_ref[0]+(-0.380162434858)*x_ref[1]
-        ref[2,0]=(-0.0614446129662)*x_ref[0]+(0.442134320884)*x_ref[1]
-        ref[2,1]=(-0.0466135888936)*x_ref[0]+(0.465021672347)*x_ref[1]
-        ref[2,2]=(-1.69520946599)*x_ref[0]+(-1.69200166455)*x_ref[1]
-        ref[2,3]=(0.928809309584)*x_ref[0]+(-0.344012063367)*x_ref[1]
-        ref[2,4]=(0.557754072268)*x_ref[0]+(-0.0104949991147)*x_ref[1]
-        ref[3,0]=(0.0683969753885)*x_ref[0]+(1.59892831147)*x_ref[1]
-        ref[3,1]=(0.90059768275)*x_ref[0]+(1.4136644906)*x_ref[1]
-        ref[3,2]=(-0.397873855228)*x_ref[0]+(-0.876192378488)*x_ref[1]
-        ref[3,3]=(-1.71837532502)*x_ref[0]+(-0.911585940448)*x_ref[1]
-        ref[3,4]=(-1.619565287)*x_ref[0]+(-0.911830282675)*x_ref[1]
-      else:
-        arg[0,0]=(-0.822599790066)*x[0]+(-1.22492139307)*x[1]+(-0.696878025616)*x[2]
-        arg[0,1]=(0.600762284033)*x[0]+(-0.157734608915)*x[1]+(-0.729304703393)*x[2]
-        arg[0,2]=(-1.42910707426)*x[0]+(1.46395956796)*x[1]+(1.38800770798)*x[2]
-        arg[0,3]=(1.2198448221)*x[0]+(0.0898753488356)*x[1]+(0.976038279019)*x[2]
-        arg[0,4]=(-0.616927403743)*x[0]+(1.41159934363)*x[1]+(-1.74783039584)*x[2]
-        arg[1,0]=(-0.101387750238)*x[0]+(-0.294997280251)*x[1]+(0.247605331103)*x[2]
-        arg[1,1]=(-0.320864335195)*x[0]+(-0.202828013922)*x[1]+(-0.366246434001)*x[2]
-        arg[1,2]=(-0.827685495006)*x[0]+(-0.236835428287)*x[1]+(-1.48668813903)*x[2]
-        arg[1,3]=(0.56131602615)*x[0]+(-0.572858337349)*x[1]+(0.701775515666)*x[2]
-        arg[1,4]=(-1.09228098916)*x[0]+(-0.0251387524711)*x[1]+(1.91587136325)*x[2]
-        arg[2,0]=(-0.0758503728265)*x[0]+(0.236248603718)*x[1]+(0.0446858988194)*x[2]
-        arg[2,1]=(-1.1745073907)*x[0]+(-0.519328441654)*x[1]+(-1.19738117811)*x[2]
-        arg[2,2]=(-0.018812738143)*x[0]+(1.00051415805)*x[1]+(-0.620776442731)*x[2]
-        arg[2,3]=(-0.430333705208)*x[0]+(0.136368267739)*x[1]+(0.59767563861)*x[2]
-        arg[2,4]=(1.54336203988)*x[0]+(0.106189845211)*x[1]+(1.53097571242)*x[2]
-        arg[3,0]=(-0.00451956527502)*x[0]+(0.710318142757)*x[1]+(0.386947317474)*x[2]
-        arg[3,1]=(1.22013531098)*x[0]+(-0.735641779691)*x[1]+(-0.0137925239152)*x[2]
-        arg[3,2]=(0.0949363128405)*x[0]+(-0.0778790744582)*x[1]+(-0.466004036944)*x[2]
-        arg[3,3]=(0.656445527911)*x[0]+(1.67275242688)*x[1]+(-0.0946012389031)*x[2]
-        arg[3,4]=(0.927582093503)*x[0]+(-0.812773507566)*x[1]+(1.14365402059)*x[2]
-        ref[0,0]=(-0.822599790066)*x_ref[0]+(-1.22492139307)*x_ref[1]+(-0.696878025616)*x_ref[2]
-        ref[0,1]=(0.600762284033)*x_ref[0]+(-0.157734608915)*x_ref[1]+(-0.729304703393)*x_ref[2]
-        ref[0,2]=(-1.42910707426)*x_ref[0]+(1.46395956796)*x_ref[1]+(1.38800770798)*x_ref[2]
-        ref[0,3]=(1.2198448221)*x_ref[0]+(0.0898753488356)*x_ref[1]+(0.976038279019)*x_ref[2]
-        ref[0,4]=(-0.616927403743)*x_ref[0]+(1.41159934363)*x_ref[1]+(-1.74783039584)*x_ref[2]
-        ref[1,0]=(-0.101387750238)*x_ref[0]+(-0.294997280251)*x_ref[1]+(0.247605331103)*x_ref[2]
-        ref[1,1]=(-0.320864335195)*x_ref[0]+(-0.202828013922)*x_ref[1]+(-0.366246434001)*x_ref[2]
-        ref[1,2]=(-0.827685495006)*x_ref[0]+(-0.236835428287)*x_ref[1]+(-1.48668813903)*x_ref[2]
-        ref[1,3]=(0.56131602615)*x_ref[0]+(-0.572858337349)*x_ref[1]+(0.701775515666)*x_ref[2]
-        ref[1,4]=(-1.09228098916)*x_ref[0]+(-0.0251387524711)*x_ref[1]+(1.91587136325)*x_ref[2]
-        ref[2,0]=(-0.0758503728265)*x_ref[0]+(0.236248603718)*x_ref[1]+(0.0446858988194)*x_ref[2]
-        ref[2,1]=(-1.1745073907)*x_ref[0]+(-0.519328441654)*x_ref[1]+(-1.19738117811)*x_ref[2]
-        ref[2,2]=(-0.018812738143)*x_ref[0]+(1.00051415805)*x_ref[1]+(-0.620776442731)*x_ref[2]
-        ref[2,3]=(-0.430333705208)*x_ref[0]+(0.136368267739)*x_ref[1]+(0.59767563861)*x_ref[2]
-        ref[2,4]=(1.54336203988)*x_ref[0]+(0.106189845211)*x_ref[1]+(1.53097571242)*x_ref[2]
-        ref[3,0]=(-0.00451956527502)*x_ref[0]+(0.710318142757)*x_ref[1]+(0.386947317474)*x_ref[2]
-        ref[3,1]=(1.22013531098)*x_ref[0]+(-0.735641779691)*x_ref[1]+(-0.0137925239152)*x_ref[2]
-        ref[3,2]=(0.0949363128405)*x_ref[0]+(-0.0778790744582)*x_ref[1]+(-0.466004036944)*x_ref[2]
-        ref[3,3]=(0.656445527911)*x_ref[0]+(1.67275242688)*x_ref[1]+(-0.0946012389031)*x_ref[2]
-        ref[3,4]=(0.927582093503)*x_ref[0]+(-0.812773507566)*x_ref[1]+(1.14365402059)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.53783653017)*x[0]+(-0.262380397029)*x[1]
-        arg[0,0,1]=(0.0150173886328)*x[0]+(1.16643858096)*x[1]
-        arg[0,1,0]=(0.886211915116)*x[0]+(0.0707779287946)*x[1]
-        arg[0,1,1]=(-1.38689895895)*x[0]+(0.970706440444)*x[1]
-        arg[1,0,0]=(-0.923778075186)*x[0]+(1.93261160466)*x[1]
-        arg[1,0,1]=(1.03640566039)*x[0]+(-0.511763660443)*x[1]
-        arg[1,1,0]=(0.127401766462)*x[0]+(-0.472120435035)*x[1]
-        arg[1,1,1]=(-0.366402024047)*x[0]+(-0.396644605167)*x[1]
-        arg[2,0,0]=(-0.715041877609)*x[0]+(-1.00214766039)*x[1]
-        arg[2,0,1]=(-1.52452556675)*x[0]+(-0.570352600973)*x[1]
-        arg[2,1,0]=(0.730426967288)*x[0]+(0.158290182237)*x[1]
-        arg[2,1,1]=(-0.152190333299)*x[0]+(-0.254128104593)*x[1]
-        arg[3,0,0]=(0.835319813606)*x[0]+(-0.142845950855)*x[1]
-        arg[3,0,1]=(0.80118569153)*x[0]+(0.260295390539)*x[1]
-        arg[3,1,0]=(0.283151732104)*x[0]+(0.0284945097388)*x[1]
-        arg[3,1,1]=(-0.715345696074)*x[0]+(0.563181102176)*x[1]
-        arg[4,0,0]=(-0.481733499899)*x[0]+(1.30638761744)*x[1]
-        arg[4,0,1]=(-0.515540152341)*x[0]+(1.47724553596)*x[1]
-        arg[4,1,0]=(0.631902493814)*x[0]+(0.279373852162)*x[1]
-        arg[4,1,1]=(0.666932982001)*x[0]+(1.02356936117)*x[1]
-        arg[5,0,0]=(-1.15844673154)*x[0]+(-0.472595660401)*x[1]
-        arg[5,0,1]=(-0.469626313646)*x[0]+(0.464876870861)*x[1]
-        arg[5,1,0]=(-0.0934345630024)*x[0]+(0.92605991751)*x[1]
-        arg[5,1,1]=(-0.0528050605159)*x[0]+(0.984329702885)*x[1]
-        ref[0,0,0]=(1.53783653017)*x_ref[0]+(-0.262380397029)*x_ref[1]
-        ref[0,0,1]=(0.0150173886328)*x_ref[0]+(1.16643858096)*x_ref[1]
-        ref[0,1,0]=(0.886211915116)*x_ref[0]+(0.0707779287946)*x_ref[1]
-        ref[0,1,1]=(-1.38689895895)*x_ref[0]+(0.970706440444)*x_ref[1]
-        ref[1,0,0]=(-0.923778075186)*x_ref[0]+(1.93261160466)*x_ref[1]
-        ref[1,0,1]=(1.03640566039)*x_ref[0]+(-0.511763660443)*x_ref[1]
-        ref[1,1,0]=(0.127401766462)*x_ref[0]+(-0.472120435035)*x_ref[1]
-        ref[1,1,1]=(-0.366402024047)*x_ref[0]+(-0.396644605167)*x_ref[1]
-        ref[2,0,0]=(-0.715041877609)*x_ref[0]+(-1.00214766039)*x_ref[1]
-        ref[2,0,1]=(-1.52452556675)*x_ref[0]+(-0.570352600973)*x_ref[1]
-        ref[2,1,0]=(0.730426967288)*x_ref[0]+(0.158290182237)*x_ref[1]
-        ref[2,1,1]=(-0.152190333299)*x_ref[0]+(-0.254128104593)*x_ref[1]
-        ref[3,0,0]=(0.835319813606)*x_ref[0]+(-0.142845950855)*x_ref[1]
-        ref[3,0,1]=(0.80118569153)*x_ref[0]+(0.260295390539)*x_ref[1]
-        ref[3,1,0]=(0.283151732104)*x_ref[0]+(0.0284945097388)*x_ref[1]
-        ref[3,1,1]=(-0.715345696074)*x_ref[0]+(0.563181102176)*x_ref[1]
-        ref[4,0,0]=(-0.481733499899)*x_ref[0]+(1.30638761744)*x_ref[1]
-        ref[4,0,1]=(-0.515540152341)*x_ref[0]+(1.47724553596)*x_ref[1]
-        ref[4,1,0]=(0.631902493814)*x_ref[0]+(0.279373852162)*x_ref[1]
-        ref[4,1,1]=(0.666932982001)*x_ref[0]+(1.02356936117)*x_ref[1]
-        ref[5,0,0]=(-1.15844673154)*x_ref[0]+(-0.472595660401)*x_ref[1]
-        ref[5,0,1]=(-0.469626313646)*x_ref[0]+(0.464876870861)*x_ref[1]
-        ref[5,1,0]=(-0.0934345630024)*x_ref[0]+(0.92605991751)*x_ref[1]
-        ref[5,1,1]=(-0.0528050605159)*x_ref[0]+(0.984329702885)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.713551995443)*x[0]+(0.694017368402)*x[1]+(-0.0738591792901)*x[2]
-        arg[0,0,1]=(1.56876736864)*x[0]+(-0.345130721117)*x[1]+(1.1690777905)*x[2]
-        arg[0,1,0]=(-0.62505379409)*x[0]+(-0.143697617605)*x[1]+(0.132102288091)*x[2]
-        arg[0,1,1]=(0.873577158168)*x[0]+(-0.967200786585)*x[1]+(1.2903546666)*x[2]
-        arg[1,0,0]=(-0.192658558584)*x[0]+(0.506709431455)*x[1]+(-0.0952065550445)*x[2]
-        arg[1,0,1]=(1.30984695498)*x[0]+(-0.469661654194)*x[1]+(1.39212979011)*x[2]
-        arg[1,1,0]=(-0.49094299988)*x[0]+(1.02571925005)*x[1]+(0.125396191195)*x[2]
-        arg[1,1,1]=(-0.062798346747)*x[0]+(-0.789359897908)*x[1]+(1.77093308656)*x[2]
-        arg[2,0,0]=(1.61875859199)*x[0]+(0.594855189809)*x[1]+(0.42445154554)*x[2]
-        arg[2,0,1]=(-0.856240554561)*x[0]+(0.100699001565)*x[1]+(-0.27854306919)*x[2]
-        arg[2,1,0]=(0.0478958246378)*x[0]+(0.695175069462)*x[1]+(-0.847667978286)*x[2]
-        arg[2,1,1]=(1.60820982887)*x[0]+(-0.251793277319)*x[1]+(0.143173366678)*x[2]
-        arg[3,0,0]=(-0.292866056474)*x[0]+(1.01748459143)*x[1]+(-0.484686028756)*x[2]
-        arg[3,0,1]=(-0.408126207016)*x[0]+(-1.31011612654)*x[1]+(-0.955847365219)*x[2]
-        arg[3,1,0]=(0.0396674474263)*x[0]+(0.354470432765)*x[1]+(-0.291731786972)*x[2]
-        arg[3,1,1]=(0.752098712767)*x[0]+(-1.83970538813)*x[1]+(0.0227500647892)*x[2]
-        arg[4,0,0]=(0.398849520011)*x[0]+(-1.38237112549)*x[1]+(-0.800550650133)*x[2]
-        arg[4,0,1]=(0.102399478593)*x[0]+(0.812513136316)*x[1]+(1.25442670221)*x[2]
-        arg[4,1,0]=(0.224914729031)*x[0]+(0.0706934334606)*x[1]+(0.640265153974)*x[2]
-        arg[4,1,1]=(0.278731023964)*x[0]+(-0.766892970502)*x[1]+(1.62378242532)*x[2]
-        arg[5,0,0]=(-0.874002481668)*x[0]+(0.168391989524)*x[1]+(-0.0150981524408)*x[2]
-        arg[5,0,1]=(1.03369744159)*x[0]+(-0.363152709617)*x[1]+(-0.429141439899)*x[2]
-        arg[5,1,0]=(1.74293672288)*x[0]+(1.91064523276)*x[1]+(0.159389690962)*x[2]
-        arg[5,1,1]=(0.769432577623)*x[0]+(0.929942365281)*x[1]+(0.170908152574)*x[2]
-        ref[0,0,0]=(-0.713551995443)*x_ref[0]+(0.694017368402)*x_ref[1]+(-0.0738591792901)*x_ref[2]
-        ref[0,0,1]=(1.56876736864)*x_ref[0]+(-0.345130721117)*x_ref[1]+(1.1690777905)*x_ref[2]
-        ref[0,1,0]=(-0.62505379409)*x_ref[0]+(-0.143697617605)*x_ref[1]+(0.132102288091)*x_ref[2]
-        ref[0,1,1]=(0.873577158168)*x_ref[0]+(-0.967200786585)*x_ref[1]+(1.2903546666)*x_ref[2]
-        ref[1,0,0]=(-0.192658558584)*x_ref[0]+(0.506709431455)*x_ref[1]+(-0.0952065550445)*x_ref[2]
-        ref[1,0,1]=(1.30984695498)*x_ref[0]+(-0.469661654194)*x_ref[1]+(1.39212979011)*x_ref[2]
-        ref[1,1,0]=(-0.49094299988)*x_ref[0]+(1.02571925005)*x_ref[1]+(0.125396191195)*x_ref[2]
-        ref[1,1,1]=(-0.062798346747)*x_ref[0]+(-0.789359897908)*x_ref[1]+(1.77093308656)*x_ref[2]
-        ref[2,0,0]=(1.61875859199)*x_ref[0]+(0.594855189809)*x_ref[1]+(0.42445154554)*x_ref[2]
-        ref[2,0,1]=(-0.856240554561)*x_ref[0]+(0.100699001565)*x_ref[1]+(-0.27854306919)*x_ref[2]
-        ref[2,1,0]=(0.0478958246378)*x_ref[0]+(0.695175069462)*x_ref[1]+(-0.847667978286)*x_ref[2]
-        ref[2,1,1]=(1.60820982887)*x_ref[0]+(-0.251793277319)*x_ref[1]+(0.143173366678)*x_ref[2]
-        ref[3,0,0]=(-0.292866056474)*x_ref[0]+(1.01748459143)*x_ref[1]+(-0.484686028756)*x_ref[2]
-        ref[3,0,1]=(-0.408126207016)*x_ref[0]+(-1.31011612654)*x_ref[1]+(-0.955847365219)*x_ref[2]
-        ref[3,1,0]=(0.0396674474263)*x_ref[0]+(0.354470432765)*x_ref[1]+(-0.291731786972)*x_ref[2]
-        ref[3,1,1]=(0.752098712767)*x_ref[0]+(-1.83970538813)*x_ref[1]+(0.0227500647892)*x_ref[2]
-        ref[4,0,0]=(0.398849520011)*x_ref[0]+(-1.38237112549)*x_ref[1]+(-0.800550650133)*x_ref[2]
-        ref[4,0,1]=(0.102399478593)*x_ref[0]+(0.812513136316)*x_ref[1]+(1.25442670221)*x_ref[2]
-        ref[4,1,0]=(0.224914729031)*x_ref[0]+(0.0706934334606)*x_ref[1]+(0.640265153974)*x_ref[2]
-        ref[4,1,1]=(0.278731023964)*x_ref[0]+(-0.766892970502)*x_ref[1]+(1.62378242532)*x_ref[2]
-        ref[5,0,0]=(-0.874002481668)*x_ref[0]+(0.168391989524)*x_ref[1]+(-0.0150981524408)*x_ref[2]
-        ref[5,0,1]=(1.03369744159)*x_ref[0]+(-0.363152709617)*x_ref[1]+(-0.429141439899)*x_ref[2]
-        ref[5,1,0]=(1.74293672288)*x_ref[0]+(1.91064523276)*x_ref[1]+(0.159389690962)*x_ref[2]
-        ref[5,1,1]=(0.769432577623)*x_ref[0]+(0.929942365281)*x_ref[1]+(0.170908152574)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-1.15521896363)*x[0]+(0.8731619129)*x[1]
-        arg[0,0,0,1]=(0.597656443464)*x[0]+(0.341688152811)*x[1]
-        arg[0,0,1,0]=(-0.422350580427)*x[0]+(0.728011338687)*x[1]
-        arg[0,0,1,1]=(-1.72046294064)*x[0]+(1.13345636724)*x[1]
-        arg[0,0,2,0]=(0.150530941523)*x[0]+(0.437417461641)*x[1]
-        arg[0,0,2,1]=(-0.413133183531)*x[0]+(-0.268630939964)*x[1]
-        arg[0,1,0,0]=(-0.220368905416)*x[0]+(1.10085894684)*x[1]
-        arg[0,1,0,1]=(-0.943367491188)*x[0]+(0.80942793885)*x[1]
-        arg[0,1,1,0]=(0.906220152303)*x[0]+(0.801214136703)*x[1]
-        arg[0,1,1,1]=(-1.3650200124)*x[0]+(-0.373454973523)*x[1]
-        arg[0,1,2,0]=(-0.277067377427)*x[0]+(-1.62229711799)*x[1]
-        arg[0,1,2,1]=(0.787076886379)*x[0]+(0.496906919368)*x[1]
-        arg[0,2,0,0]=(-0.0770154256748)*x[0]+(1.5002648939)*x[1]
-        arg[0,2,0,1]=(0.225572553862)*x[0]+(1.39471337012)*x[1]
-        arg[0,2,1,0]=(-0.54799237637)*x[0]+(-0.607785237418)*x[1]
-        arg[0,2,1,1]=(0.384591801229)*x[0]+(1.30760620469)*x[1]
-        arg[0,2,2,0]=(0.228248139163)*x[0]+(0.151268778109)*x[1]
-        arg[0,2,2,1]=(-1.43978230199)*x[0]+(0.958903347524)*x[1]
-        arg[0,3,0,0]=(-0.568133098072)*x[0]+(0.128510595507)*x[1]
-        arg[0,3,0,1]=(-0.304029315535)*x[0]+(1.19478464847)*x[1]
-        arg[0,3,1,0]=(0.0996876882275)*x[0]+(-0.255346045102)*x[1]
-        arg[0,3,1,1]=(0.414708254109)*x[0]+(-0.148700489536)*x[1]
-        arg[0,3,2,0]=(-0.740719850161)*x[0]+(0.375907815982)*x[1]
-        arg[0,3,2,1]=(-0.184189058365)*x[0]+(-0.274477516444)*x[1]
-        arg[0,4,0,0]=(-0.565848858136)*x[0]+(-0.206818417121)*x[1]
-        arg[0,4,0,1]=(-0.983652399085)*x[0]+(1.21445827986)*x[1]
-        arg[0,4,1,0]=(1.6425686123)*x[0]+(-0.621952337654)*x[1]
-        arg[0,4,1,1]=(-1.07526530849)*x[0]+(-0.0915810578715)*x[1]
-        arg[0,4,2,0]=(1.4812278738)*x[0]+(1.61991326423)*x[1]
-        arg[0,4,2,1]=(-1.4147420413)*x[0]+(1.34428787131)*x[1]
-        arg[1,0,0,0]=(-0.910373659777)*x[0]+(1.46920176435)*x[1]
-        arg[1,0,0,1]=(0.074473571609)*x[0]+(-0.336642181231)*x[1]
-        arg[1,0,1,0]=(-0.141813739296)*x[0]+(-0.534432398621)*x[1]
-        arg[1,0,1,1]=(0.728030938984)*x[0]+(0.532542738961)*x[1]
-        arg[1,0,2,0]=(0.20676316374)*x[0]+(-0.065235999066)*x[1]
-        arg[1,0,2,1]=(-1.09054680794)*x[0]+(0.537754476805)*x[1]
-        arg[1,1,0,0]=(0.523878896271)*x[0]+(-0.0561828109964)*x[1]
-        arg[1,1,0,1]=(1.27754653741)*x[0]+(0.119734333004)*x[1]
-        arg[1,1,1,0]=(0.0933160885942)*x[0]+(0.390183021193)*x[1]
-        arg[1,1,1,1]=(0.548273953924)*x[0]+(-0.552588185124)*x[1]
-        arg[1,1,2,0]=(0.576803722241)*x[0]+(0.60898781381)*x[1]
-        arg[1,1,2,1]=(-0.307231650547)*x[0]+(0.439111970656)*x[1]
-        arg[1,2,0,0]=(0.172113300736)*x[0]+(-0.0153971432613)*x[1]
-        arg[1,2,0,1]=(-0.883753634465)*x[0]+(1.35320294175)*x[1]
-        arg[1,2,1,0]=(0.153937139638)*x[0]+(-0.865654430739)*x[1]
-        arg[1,2,1,1]=(0.970377377543)*x[0]+(-1.11418225395)*x[1]
-        arg[1,2,2,0]=(-1.11106779953)*x[0]+(-0.357700480625)*x[1]
-        arg[1,2,2,1]=(0.475529404147)*x[0]+(-0.121369909464)*x[1]
-        arg[1,3,0,0]=(-0.867370155191)*x[0]+(0.625161512036)*x[1]
-        arg[1,3,0,1]=(0.252873452474)*x[0]+(1.11368263907)*x[1]
-        arg[1,3,1,0]=(-1.25698605702)*x[0]+(-0.381254857218)*x[1]
-        arg[1,3,1,1]=(1.12038052674)*x[0]+(-0.113429410248)*x[1]
-        arg[1,3,2,0]=(0.0821799570201)*x[0]+(-0.167383600252)*x[1]
-        arg[1,3,2,1]=(-0.534217900599)*x[0]+(-1.26144431009)*x[1]
-        arg[1,4,0,0]=(0.639186045888)*x[0]+(0.258686782482)*x[1]
-        arg[1,4,0,1]=(-0.256515011769)*x[0]+(0.797453395844)*x[1]
-        arg[1,4,1,0]=(-0.427518421999)*x[0]+(-0.101439725502)*x[1]
-        arg[1,4,1,1]=(-0.251303248239)*x[0]+(0.361194806374)*x[1]
-        arg[1,4,2,0]=(0.415313798163)*x[0]+(-0.909602300262)*x[1]
-        arg[1,4,2,1]=(0.118542894027)*x[0]+(-0.28224555744)*x[1]
-        arg[2,0,0,0]=(0.700687096184)*x[0]+(-1.69964436969)*x[1]
-        arg[2,0,0,1]=(0.880393551605)*x[0]+(-0.571112060462)*x[1]
-        arg[2,0,1,0]=(1.35990706973)*x[0]+(0.260154297077)*x[1]
-        arg[2,0,1,1]=(0.294201987212)*x[0]+(-0.379007248662)*x[1]
-        arg[2,0,2,0]=(-1.42914701121)*x[0]+(0.88289145627)*x[1]
-        arg[2,0,2,1]=(-0.343976881604)*x[0]+(0.0642493086788)*x[1]
-        arg[2,1,0,0]=(0.479103547757)*x[0]+(-1.60276044525)*x[1]
-        arg[2,1,0,1]=(0.944321957371)*x[0]+(0.313721173145)*x[1]
-        arg[2,1,1,0]=(0.233589885494)*x[0]+(-0.427865810692)*x[1]
-        arg[2,1,1,1]=(-0.954518596356)*x[0]+(-0.153033245523)*x[1]
-        arg[2,1,2,0]=(1.14079619235)*x[0]+(0.136503305207)*x[1]
-        arg[2,1,2,1]=(-0.715601080868)*x[0]+(-1.74677798058)*x[1]
-        arg[2,2,0,0]=(0.211908166714)*x[0]+(0.379390512119)*x[1]
-        arg[2,2,0,1]=(0.97243389801)*x[0]+(-0.988193298566)*x[1]
-        arg[2,2,1,0]=(0.8990152555)*x[0]+(0.22398476583)*x[1]
-        arg[2,2,1,1]=(-0.748858338529)*x[0]+(-1.00255098852)*x[1]
-        arg[2,2,2,0]=(0.863334969354)*x[0]+(1.14334958607)*x[1]
-        arg[2,2,2,1]=(-0.807672728362)*x[0]+(0.837576150239)*x[1]
-        arg[2,3,0,0]=(-0.310471066952)*x[0]+(0.261468387883)*x[1]
-        arg[2,3,0,1]=(-1.61325161386)*x[0]+(0.016614907729)*x[1]
-        arg[2,3,1,0]=(-0.742577714565)*x[0]+(-1.54936077725)*x[1]
-        arg[2,3,1,1]=(-0.393825799694)*x[0]+(0.66004298074)*x[1]
-        arg[2,3,2,0]=(-1.03965632182)*x[0]+(-0.863160703719)*x[1]
-        arg[2,3,2,1]=(0.673788653196)*x[0]+(0.740311339524)*x[1]
-        arg[2,4,0,0]=(1.59272250531)*x[0]+(1.27845229216)*x[1]
-        arg[2,4,0,1]=(0.112947869874)*x[0]+(1.06626388923)*x[1]
-        arg[2,4,1,0]=(-0.935174560087)*x[0]+(0.729112002619)*x[1]
-        arg[2,4,1,1]=(1.28167575095)*x[0]+(-1.6626881011)*x[1]
-        arg[2,4,2,0]=(-1.01382997014)*x[0]+(0.40870705964)*x[1]
-        arg[2,4,2,1]=(-0.903293274454)*x[0]+(0.451662927854)*x[1]
-        arg[3,0,0,0]=(0.414933474895)*x[0]+(0.274208992931)*x[1]
-        arg[3,0,0,1]=(-0.140384007335)*x[0]+(-0.201270983912)*x[1]
-        arg[3,0,1,0]=(-1.34339529394)*x[0]+(-1.26275414913)*x[1]
-        arg[3,0,1,1]=(0.34482759487)*x[0]+(0.992140984097)*x[1]
-        arg[3,0,2,0]=(-1.56575003976)*x[0]+(-0.514557317682)*x[1]
-        arg[3,0,2,1]=(-0.203196026518)*x[0]+(-0.50777550196)*x[1]
-        arg[3,1,0,0]=(-0.465027052452)*x[0]+(0.165299984247)*x[1]
-        arg[3,1,0,1]=(-0.876537945705)*x[0]+(0.569062140702)*x[1]
-        arg[3,1,1,0]=(0.212854890028)*x[0]+(0.772436691343)*x[1]
-        arg[3,1,1,1]=(0.376912060989)*x[0]+(-1.59078116917)*x[1]
-        arg[3,1,2,0]=(-1.19949528387)*x[0]+(0.508138309995)*x[1]
-        arg[3,1,2,1]=(0.535067293288)*x[0]+(0.483486234966)*x[1]
-        arg[3,2,0,0]=(-0.366454519079)*x[0]+(0.880937088999)*x[1]
-        arg[3,2,0,1]=(-0.164158778522)*x[0]+(-0.0933716527947)*x[1]
-        arg[3,2,1,0]=(-0.338148774302)*x[0]+(0.389103301223)*x[1]
-        arg[3,2,1,1]=(-1.17323344849)*x[0]+(-0.286752347393)*x[1]
-        arg[3,2,2,0]=(0.43651426746)*x[0]+(0.0751512323008)*x[1]
-        arg[3,2,2,1]=(1.44242451962)*x[0]+(-0.853169055909)*x[1]
-        arg[3,3,0,0]=(0.268862750262)*x[0]+(0.668643005784)*x[1]
-        arg[3,3,0,1]=(-1.47078437928)*x[0]+(1.25865018681)*x[1]
-        arg[3,3,1,0]=(-0.218849811361)*x[0]+(0.147601849599)*x[1]
-        arg[3,3,1,1]=(1.66493534918)*x[0]+(0.368711512357)*x[1]
-        arg[3,3,2,0]=(0.259910144631)*x[0]+(-0.977975383491)*x[1]
-        arg[3,3,2,1]=(1.87696180213)*x[0]+(-0.583679438031)*x[1]
-        arg[3,4,0,0]=(0.226114159843)*x[0]+(0.121547181819)*x[1]
-        arg[3,4,0,1]=(1.21215141305)*x[0]+(-0.175673309633)*x[1]
-        arg[3,4,1,0]=(0.644340639306)*x[0]+(0.35372514848)*x[1]
-        arg[3,4,1,1]=(0.452987488144)*x[0]+(0.838110546855)*x[1]
-        arg[3,4,2,0]=(-0.434414511976)*x[0]+(-0.879038818613)*x[1]
-        arg[3,4,2,1]=(-0.387240543602)*x[0]+(0.187795787877)*x[1]
-        ref[0,0,0,0]=(-1.15521896363)*x_ref[0]+(0.8731619129)*x_ref[1]
-        ref[0,0,0,1]=(0.597656443464)*x_ref[0]+(0.341688152811)*x_ref[1]
-        ref[0,0,1,0]=(-0.422350580427)*x_ref[0]+(0.728011338687)*x_ref[1]
-        ref[0,0,1,1]=(-1.72046294064)*x_ref[0]+(1.13345636724)*x_ref[1]
-        ref[0,0,2,0]=(0.150530941523)*x_ref[0]+(0.437417461641)*x_ref[1]
-        ref[0,0,2,1]=(-0.413133183531)*x_ref[0]+(-0.268630939964)*x_ref[1]
-        ref[0,1,0,0]=(-0.220368905416)*x_ref[0]+(1.10085894684)*x_ref[1]
-        ref[0,1,0,1]=(-0.943367491188)*x_ref[0]+(0.80942793885)*x_ref[1]
-        ref[0,1,1,0]=(0.906220152303)*x_ref[0]+(0.801214136703)*x_ref[1]
-        ref[0,1,1,1]=(-1.3650200124)*x_ref[0]+(-0.373454973523)*x_ref[1]
-        ref[0,1,2,0]=(-0.277067377427)*x_ref[0]+(-1.62229711799)*x_ref[1]
-        ref[0,1,2,1]=(0.787076886379)*x_ref[0]+(0.496906919368)*x_ref[1]
-        ref[0,2,0,0]=(-0.0770154256748)*x_ref[0]+(1.5002648939)*x_ref[1]
-        ref[0,2,0,1]=(0.225572553862)*x_ref[0]+(1.39471337012)*x_ref[1]
-        ref[0,2,1,0]=(-0.54799237637)*x_ref[0]+(-0.607785237418)*x_ref[1]
-        ref[0,2,1,1]=(0.384591801229)*x_ref[0]+(1.30760620469)*x_ref[1]
-        ref[0,2,2,0]=(0.228248139163)*x_ref[0]+(0.151268778109)*x_ref[1]
-        ref[0,2,2,1]=(-1.43978230199)*x_ref[0]+(0.958903347524)*x_ref[1]
-        ref[0,3,0,0]=(-0.568133098072)*x_ref[0]+(0.128510595507)*x_ref[1]
-        ref[0,3,0,1]=(-0.304029315535)*x_ref[0]+(1.19478464847)*x_ref[1]
-        ref[0,3,1,0]=(0.0996876882275)*x_ref[0]+(-0.255346045102)*x_ref[1]
-        ref[0,3,1,1]=(0.414708254109)*x_ref[0]+(-0.148700489536)*x_ref[1]
-        ref[0,3,2,0]=(-0.740719850161)*x_ref[0]+(0.375907815982)*x_ref[1]
-        ref[0,3,2,1]=(-0.184189058365)*x_ref[0]+(-0.274477516444)*x_ref[1]
-        ref[0,4,0,0]=(-0.565848858136)*x_ref[0]+(-0.206818417121)*x_ref[1]
-        ref[0,4,0,1]=(-0.983652399085)*x_ref[0]+(1.21445827986)*x_ref[1]
-        ref[0,4,1,0]=(1.6425686123)*x_ref[0]+(-0.621952337654)*x_ref[1]
-        ref[0,4,1,1]=(-1.07526530849)*x_ref[0]+(-0.0915810578715)*x_ref[1]
-        ref[0,4,2,0]=(1.4812278738)*x_ref[0]+(1.61991326423)*x_ref[1]
-        ref[0,4,2,1]=(-1.4147420413)*x_ref[0]+(1.34428787131)*x_ref[1]
-        ref[1,0,0,0]=(-0.910373659777)*x_ref[0]+(1.46920176435)*x_ref[1]
-        ref[1,0,0,1]=(0.074473571609)*x_ref[0]+(-0.336642181231)*x_ref[1]
-        ref[1,0,1,0]=(-0.141813739296)*x_ref[0]+(-0.534432398621)*x_ref[1]
-        ref[1,0,1,1]=(0.728030938984)*x_ref[0]+(0.532542738961)*x_ref[1]
-        ref[1,0,2,0]=(0.20676316374)*x_ref[0]+(-0.065235999066)*x_ref[1]
-        ref[1,0,2,1]=(-1.09054680794)*x_ref[0]+(0.537754476805)*x_ref[1]
-        ref[1,1,0,0]=(0.523878896271)*x_ref[0]+(-0.0561828109964)*x_ref[1]
-        ref[1,1,0,1]=(1.27754653741)*x_ref[0]+(0.119734333004)*x_ref[1]
-        ref[1,1,1,0]=(0.0933160885942)*x_ref[0]+(0.390183021193)*x_ref[1]
-        ref[1,1,1,1]=(0.548273953924)*x_ref[0]+(-0.552588185124)*x_ref[1]
-        ref[1,1,2,0]=(0.576803722241)*x_ref[0]+(0.60898781381)*x_ref[1]
-        ref[1,1,2,1]=(-0.307231650547)*x_ref[0]+(0.439111970656)*x_ref[1]
-        ref[1,2,0,0]=(0.172113300736)*x_ref[0]+(-0.0153971432613)*x_ref[1]
-        ref[1,2,0,1]=(-0.883753634465)*x_ref[0]+(1.35320294175)*x_ref[1]
-        ref[1,2,1,0]=(0.153937139638)*x_ref[0]+(-0.865654430739)*x_ref[1]
-        ref[1,2,1,1]=(0.970377377543)*x_ref[0]+(-1.11418225395)*x_ref[1]
-        ref[1,2,2,0]=(-1.11106779953)*x_ref[0]+(-0.357700480625)*x_ref[1]
-        ref[1,2,2,1]=(0.475529404147)*x_ref[0]+(-0.121369909464)*x_ref[1]
-        ref[1,3,0,0]=(-0.867370155191)*x_ref[0]+(0.625161512036)*x_ref[1]
-        ref[1,3,0,1]=(0.252873452474)*x_ref[0]+(1.11368263907)*x_ref[1]
-        ref[1,3,1,0]=(-1.25698605702)*x_ref[0]+(-0.381254857218)*x_ref[1]
-        ref[1,3,1,1]=(1.12038052674)*x_ref[0]+(-0.113429410248)*x_ref[1]
-        ref[1,3,2,0]=(0.0821799570201)*x_ref[0]+(-0.167383600252)*x_ref[1]
-        ref[1,3,2,1]=(-0.534217900599)*x_ref[0]+(-1.26144431009)*x_ref[1]
-        ref[1,4,0,0]=(0.639186045888)*x_ref[0]+(0.258686782482)*x_ref[1]
-        ref[1,4,0,1]=(-0.256515011769)*x_ref[0]+(0.797453395844)*x_ref[1]
-        ref[1,4,1,0]=(-0.427518421999)*x_ref[0]+(-0.101439725502)*x_ref[1]
-        ref[1,4,1,1]=(-0.251303248239)*x_ref[0]+(0.361194806374)*x_ref[1]
-        ref[1,4,2,0]=(0.415313798163)*x_ref[0]+(-0.909602300262)*x_ref[1]
-        ref[1,4,2,1]=(0.118542894027)*x_ref[0]+(-0.28224555744)*x_ref[1]
-        ref[2,0,0,0]=(0.700687096184)*x_ref[0]+(-1.69964436969)*x_ref[1]
-        ref[2,0,0,1]=(0.880393551605)*x_ref[0]+(-0.571112060462)*x_ref[1]
-        ref[2,0,1,0]=(1.35990706973)*x_ref[0]+(0.260154297077)*x_ref[1]
-        ref[2,0,1,1]=(0.294201987212)*x_ref[0]+(-0.379007248662)*x_ref[1]
-        ref[2,0,2,0]=(-1.42914701121)*x_ref[0]+(0.88289145627)*x_ref[1]
-        ref[2,0,2,1]=(-0.343976881604)*x_ref[0]+(0.0642493086788)*x_ref[1]
-        ref[2,1,0,0]=(0.479103547757)*x_ref[0]+(-1.60276044525)*x_ref[1]
-        ref[2,1,0,1]=(0.944321957371)*x_ref[0]+(0.313721173145)*x_ref[1]
-        ref[2,1,1,0]=(0.233589885494)*x_ref[0]+(-0.427865810692)*x_ref[1]
-        ref[2,1,1,1]=(-0.954518596356)*x_ref[0]+(-0.153033245523)*x_ref[1]
-        ref[2,1,2,0]=(1.14079619235)*x_ref[0]+(0.136503305207)*x_ref[1]
-        ref[2,1,2,1]=(-0.715601080868)*x_ref[0]+(-1.74677798058)*x_ref[1]
-        ref[2,2,0,0]=(0.211908166714)*x_ref[0]+(0.379390512119)*x_ref[1]
-        ref[2,2,0,1]=(0.97243389801)*x_ref[0]+(-0.988193298566)*x_ref[1]
-        ref[2,2,1,0]=(0.8990152555)*x_ref[0]+(0.22398476583)*x_ref[1]
-        ref[2,2,1,1]=(-0.748858338529)*x_ref[0]+(-1.00255098852)*x_ref[1]
-        ref[2,2,2,0]=(0.863334969354)*x_ref[0]+(1.14334958607)*x_ref[1]
-        ref[2,2,2,1]=(-0.807672728362)*x_ref[0]+(0.837576150239)*x_ref[1]
-        ref[2,3,0,0]=(-0.310471066952)*x_ref[0]+(0.261468387883)*x_ref[1]
-        ref[2,3,0,1]=(-1.61325161386)*x_ref[0]+(0.016614907729)*x_ref[1]
-        ref[2,3,1,0]=(-0.742577714565)*x_ref[0]+(-1.54936077725)*x_ref[1]
-        ref[2,3,1,1]=(-0.393825799694)*x_ref[0]+(0.66004298074)*x_ref[1]
-        ref[2,3,2,0]=(-1.03965632182)*x_ref[0]+(-0.863160703719)*x_ref[1]
-        ref[2,3,2,1]=(0.673788653196)*x_ref[0]+(0.740311339524)*x_ref[1]
-        ref[2,4,0,0]=(1.59272250531)*x_ref[0]+(1.27845229216)*x_ref[1]
-        ref[2,4,0,1]=(0.112947869874)*x_ref[0]+(1.06626388923)*x_ref[1]
-        ref[2,4,1,0]=(-0.935174560087)*x_ref[0]+(0.729112002619)*x_ref[1]
-        ref[2,4,1,1]=(1.28167575095)*x_ref[0]+(-1.6626881011)*x_ref[1]
-        ref[2,4,2,0]=(-1.01382997014)*x_ref[0]+(0.40870705964)*x_ref[1]
-        ref[2,4,2,1]=(-0.903293274454)*x_ref[0]+(0.451662927854)*x_ref[1]
-        ref[3,0,0,0]=(0.414933474895)*x_ref[0]+(0.274208992931)*x_ref[1]
-        ref[3,0,0,1]=(-0.140384007335)*x_ref[0]+(-0.201270983912)*x_ref[1]
-        ref[3,0,1,0]=(-1.34339529394)*x_ref[0]+(-1.26275414913)*x_ref[1]
-        ref[3,0,1,1]=(0.34482759487)*x_ref[0]+(0.992140984097)*x_ref[1]
-        ref[3,0,2,0]=(-1.56575003976)*x_ref[0]+(-0.514557317682)*x_ref[1]
-        ref[3,0,2,1]=(-0.203196026518)*x_ref[0]+(-0.50777550196)*x_ref[1]
-        ref[3,1,0,0]=(-0.465027052452)*x_ref[0]+(0.165299984247)*x_ref[1]
-        ref[3,1,0,1]=(-0.876537945705)*x_ref[0]+(0.569062140702)*x_ref[1]
-        ref[3,1,1,0]=(0.212854890028)*x_ref[0]+(0.772436691343)*x_ref[1]
-        ref[3,1,1,1]=(0.376912060989)*x_ref[0]+(-1.59078116917)*x_ref[1]
-        ref[3,1,2,0]=(-1.19949528387)*x_ref[0]+(0.508138309995)*x_ref[1]
-        ref[3,1,2,1]=(0.535067293288)*x_ref[0]+(0.483486234966)*x_ref[1]
-        ref[3,2,0,0]=(-0.366454519079)*x_ref[0]+(0.880937088999)*x_ref[1]
-        ref[3,2,0,1]=(-0.164158778522)*x_ref[0]+(-0.0933716527947)*x_ref[1]
-        ref[3,2,1,0]=(-0.338148774302)*x_ref[0]+(0.389103301223)*x_ref[1]
-        ref[3,2,1,1]=(-1.17323344849)*x_ref[0]+(-0.286752347393)*x_ref[1]
-        ref[3,2,2,0]=(0.43651426746)*x_ref[0]+(0.0751512323008)*x_ref[1]
-        ref[3,2,2,1]=(1.44242451962)*x_ref[0]+(-0.853169055909)*x_ref[1]
-        ref[3,3,0,0]=(0.268862750262)*x_ref[0]+(0.668643005784)*x_ref[1]
-        ref[3,3,0,1]=(-1.47078437928)*x_ref[0]+(1.25865018681)*x_ref[1]
-        ref[3,3,1,0]=(-0.218849811361)*x_ref[0]+(0.147601849599)*x_ref[1]
-        ref[3,3,1,1]=(1.66493534918)*x_ref[0]+(0.368711512357)*x_ref[1]
-        ref[3,3,2,0]=(0.259910144631)*x_ref[0]+(-0.977975383491)*x_ref[1]
-        ref[3,3,2,1]=(1.87696180213)*x_ref[0]+(-0.583679438031)*x_ref[1]
-        ref[3,4,0,0]=(0.226114159843)*x_ref[0]+(0.121547181819)*x_ref[1]
-        ref[3,4,0,1]=(1.21215141305)*x_ref[0]+(-0.175673309633)*x_ref[1]
-        ref[3,4,1,0]=(0.644340639306)*x_ref[0]+(0.35372514848)*x_ref[1]
-        ref[3,4,1,1]=(0.452987488144)*x_ref[0]+(0.838110546855)*x_ref[1]
-        ref[3,4,2,0]=(-0.434414511976)*x_ref[0]+(-0.879038818613)*x_ref[1]
-        ref[3,4,2,1]=(-0.387240543602)*x_ref[0]+(0.187795787877)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.523374388946)*x[0]+(-0.462029311047)*x[1]+(-0.47732568751)*x[2]
-        arg[0,0,0,1]=(0.641437288282)*x[0]+(-0.245967769804)*x[1]+(-0.882711488334)*x[2]
-        arg[0,0,1,0]=(-0.039075405101)*x[0]+(0.233479040723)*x[1]+(-0.450244284473)*x[2]
-        arg[0,0,1,1]=(-1.00711630706)*x[0]+(-0.247720707527)*x[1]+(-0.597073422746)*x[2]
-        arg[0,0,2,0]=(0.141738833983)*x[0]+(-1.34846391496)*x[1]+(0.214891803475)*x[2]
-        arg[0,0,2,1]=(0.276967719755)*x[0]+(-0.64300940909)*x[1]+(-1.10068852616)*x[2]
-        arg[0,1,0,0]=(0.438911917989)*x[0]+(0.588137625057)*x[1]+(0.744848057181)*x[2]
-        arg[0,1,0,1]=(0.266343859518)*x[0]+(1.24092635599)*x[1]+(0.477206170905)*x[2]
-        arg[0,1,1,0]=(0.328857688358)*x[0]+(-1.17720038645)*x[1]+(0.285045368661)*x[2]
-        arg[0,1,1,1]=(-0.0985505878353)*x[0]+(1.11228710542)*x[1]+(0.159347839514)*x[2]
-        arg[0,1,2,0]=(0.125378210814)*x[0]+(1.51252392793)*x[1]+(-0.0402281595871)*x[2]
-        arg[0,1,2,1]=(-1.41964435548)*x[0]+(0.825108246489)*x[1]+(0.31679169508)*x[2]
-        arg[0,2,0,0]=(1.47728541117)*x[0]+(0.957708443424)*x[1]+(-0.187892562217)*x[2]
-        arg[0,2,0,1]=(0.0614505001405)*x[0]+(0.144444072992)*x[1]+(0.287839563179)*x[2]
-        arg[0,2,1,0]=(0.512698173313)*x[0]+(0.316852993542)*x[1]+(0.538020705489)*x[2]
-        arg[0,2,1,1]=(-0.349895838053)*x[0]+(1.50602760725)*x[1]+(-0.959979406715)*x[2]
-        arg[0,2,2,0]=(-0.618802027626)*x[0]+(0.71544179402)*x[1]+(1.09297898989)*x[2]
-        arg[0,2,2,1]=(-0.264932530879)*x[0]+(-1.4100323815)*x[1]+(-1.28423925034)*x[2]
-        arg[0,3,0,0]=(0.481724893561)*x[0]+(-0.546248388253)*x[1]+(-0.214332802735)*x[2]
-        arg[0,3,0,1]=(-1.33293479098)*x[0]+(0.989294320484)*x[1]+(-0.561974021785)*x[2]
-        arg[0,3,1,0]=(-0.394718780001)*x[0]+(1.0043343416)*x[1]+(1.51370839793)*x[2]
-        arg[0,3,1,1]=(1.08238957373)*x[0]+(0.591631122094)*x[1]+(0.075283954318)*x[2]
-        arg[0,3,2,0]=(-1.0250149161)*x[0]+(-0.739848118412)*x[1]+(0.736595112789)*x[2]
-        arg[0,3,2,1]=(-1.08033009366)*x[0]+(-0.574926147021)*x[1]+(0.421251948724)*x[2]
-        arg[0,4,0,0]=(-0.0894466241931)*x[0]+(1.14935896473)*x[1]+(-0.490410015077)*x[2]
-        arg[0,4,0,1]=(1.07777309372)*x[0]+(1.0672971936)*x[1]+(0.340143160972)*x[2]
-        arg[0,4,1,0]=(0.905553949676)*x[0]+(0.171320798438)*x[1]+(1.83634812891)*x[2]
-        arg[0,4,1,1]=(-0.663516264963)*x[0]+(0.14871937304)*x[1]+(-0.697949666962)*x[2]
-        arg[0,4,2,0]=(1.41806579095)*x[0]+(0.0357313086623)*x[1]+(0.110846683649)*x[2]
-        arg[0,4,2,1]=(-0.31919270211)*x[0]+(-1.651049084)*x[1]+(-1.47528307262)*x[2]
-        arg[1,0,0,0]=(0.167209321535)*x[0]+(-1.13066332212)*x[1]+(0.209489173491)*x[2]
-        arg[1,0,0,1]=(1.45770122794)*x[0]+(1.12024118263)*x[1]+(0.0203526002602)*x[2]
-        arg[1,0,1,0]=(0.180403238696)*x[0]+(0.580625819717)*x[1]+(-1.00882441351)*x[2]
-        arg[1,0,1,1]=(-0.20671421669)*x[0]+(-0.199445466326)*x[1]+(0.887365974398)*x[2]
-        arg[1,0,2,0]=(-0.0109233374932)*x[0]+(0.835241335188)*x[1]+(-0.810658050514)*x[2]
-        arg[1,0,2,1]=(-1.45991974539)*x[0]+(0.955399748215)*x[1]+(0.398673469474)*x[2]
-        arg[1,1,0,0]=(0.726687414113)*x[0]+(-1.35343793545)*x[1]+(0.750079540417)*x[2]
-        arg[1,1,0,1]=(-0.677871860083)*x[0]+(-1.56756818572)*x[1]+(-0.240923946416)*x[2]
-        arg[1,1,1,0]=(-1.05791511835)*x[0]+(-0.425827952234)*x[1]+(-1.82875340474)*x[2]
-        arg[1,1,1,1]=(-0.430783664297)*x[0]+(0.552238591434)*x[1]+(0.502702385375)*x[2]
-        arg[1,1,2,0]=(0.240203734777)*x[0]+(-0.0650121194654)*x[1]+(1.04662204076)*x[2]
-        arg[1,1,2,1]=(-0.25305133215)*x[0]+(-0.31486026571)*x[1]+(-1.83073697314)*x[2]
-        arg[1,2,0,0]=(-1.09643062195)*x[0]+(-0.437887555247)*x[1]+(-1.33970467276)*x[2]
-        arg[1,2,0,1]=(1.24489646204)*x[0]+(1.0714412157)*x[1]+(-0.192090595585)*x[2]
-        arg[1,2,1,0]=(0.029290840641)*x[0]+(-0.940655160496)*x[1]+(-0.820414570983)*x[2]
-        arg[1,2,1,1]=(-0.677190307386)*x[0]+(-0.00164385522847)*x[1]+(-0.46460277293)*x[2]
-        arg[1,2,2,0]=(-0.320006508895)*x[0]+(1.13412133331)*x[1]+(-0.619705535377)*x[2]
-        arg[1,2,2,1]=(-0.0220330715863)*x[0]+(-0.64687567378)*x[1]+(0.0957350181768)*x[2]
-        arg[1,3,0,0]=(-0.25073330162)*x[0]+(0.85795600432)*x[1]+(1.53293778947)*x[2]
-        arg[1,3,0,1]=(-0.183346360622)*x[0]+(0.266035391885)*x[1]+(-0.422228348627)*x[2]
-        arg[1,3,1,0]=(-0.41587781442)*x[0]+(-0.0103068212789)*x[1]+(0.440665738388)*x[2]
-        arg[1,3,1,1]=(1.41825912495)*x[0]+(-0.0611650685825)*x[1]+(0.972511387093)*x[2]
-        arg[1,3,2,0]=(-0.336532230508)*x[0]+(-0.0123275905127)*x[1]+(-0.254643420879)*x[2]
-        arg[1,3,2,1]=(-0.365437122858)*x[0]+(0.71384297093)*x[1]+(0.447802028475)*x[2]
-        arg[1,4,0,0]=(1.33371172009)*x[0]+(1.16948649723)*x[1]+(-0.624453779138)*x[2]
-        arg[1,4,0,1]=(0.0919647304743)*x[0]+(1.20509307321)*x[1]+(0.454668856107)*x[2]
-        arg[1,4,1,0]=(0.179837036326)*x[0]+(1.27470487309)*x[1]+(0.248127557917)*x[2]
-        arg[1,4,1,1]=(-0.0163592123585)*x[0]+(-1.09373628426)*x[1]+(-1.07284707536)*x[2]
-        arg[1,4,2,0]=(-0.0617954247638)*x[0]+(0.180336071139)*x[1]+(0.0715760255435)*x[2]
-        arg[1,4,2,1]=(0.449148667011)*x[0]+(0.476092516356)*x[1]+(-0.235672424702)*x[2]
-        arg[2,0,0,0]=(1.06662096238)*x[0]+(1.52079387843)*x[1]+(-0.465087313097)*x[2]
-        arg[2,0,0,1]=(-0.0113962755891)*x[0]+(0.459517781034)*x[1]+(0.423861505703)*x[2]
-        arg[2,0,1,0]=(1.19571956088)*x[0]+(1.02444853474)*x[1]+(-1.31054246173)*x[2]
-        arg[2,0,1,1]=(-1.39536067914)*x[0]+(0.884184554143)*x[1]+(-0.650926411157)*x[2]
-        arg[2,0,2,0]=(-0.328672728946)*x[0]+(1.07247782219)*x[1]+(-0.61103916867)*x[2]
-        arg[2,0,2,1]=(0.155304775433)*x[0]+(-1.34794080729)*x[1]+(-0.931891854948)*x[2]
-        arg[2,1,0,0]=(-0.953726622792)*x[0]+(0.483614421199)*x[1]+(1.07026616662)*x[2]
-        arg[2,1,0,1]=(0.720797127905)*x[0]+(1.31309704242)*x[1]+(0.534213389945)*x[2]
-        arg[2,1,1,0]=(1.12642665973)*x[0]+(-0.375134467285)*x[1]+(0.223566393552)*x[2]
-        arg[2,1,1,1]=(-0.380892997026)*x[0]+(-0.661627351046)*x[1]+(0.596842673155)*x[2]
-        arg[2,1,2,0]=(0.233212348554)*x[0]+(0.106673294307)*x[1]+(-0.22268427628)*x[2]
-        arg[2,1,2,1]=(0.67982223365)*x[0]+(-1.53842407155)*x[1]+(0.995328875213)*x[2]
-        arg[2,2,0,0]=(1.5835734841)*x[0]+(0.178824495609)*x[1]+(-0.31332770355)*x[2]
-        arg[2,2,0,1]=(0.101063103927)*x[0]+(-0.0437670737377)*x[1]+(-0.109514170393)*x[2]
-        arg[2,2,1,0]=(-0.892614006193)*x[0]+(0.952803608394)*x[1]+(-0.643308315526)*x[2]
-        arg[2,2,1,1]=(-0.0606310193159)*x[0]+(-0.768822197122)*x[1]+(-1.43018654257)*x[2]
-        arg[2,2,2,0]=(0.107463856971)*x[0]+(1.27309352669)*x[1]+(1.65234673057)*x[2]
-        arg[2,2,2,1]=(0.699315319729)*x[0]+(-0.345960580793)*x[1]+(-1.61621444026)*x[2]
-        arg[2,3,0,0]=(0.9761936338)*x[0]+(0.665547749873)*x[1]+(-1.07512721449)*x[2]
-        arg[2,3,0,1]=(1.26182572924)*x[0]+(-0.416232568884)*x[1]+(-0.356737405174)*x[2]
-        arg[2,3,1,0]=(-0.477958253427)*x[0]+(0.198049156904)*x[1]+(-0.295022782364)*x[2]
-        arg[2,3,1,1]=(0.412187471103)*x[0]+(0.335655056628)*x[1]+(-0.0873658679329)*x[2]
-        arg[2,3,2,0]=(0.168439409327)*x[0]+(-0.131948711409)*x[1]+(1.66777364846)*x[2]
-        arg[2,3,2,1]=(0.508795552378)*x[0]+(-0.390505460243)*x[1]+(0.13190717559)*x[2]
-        arg[2,4,0,0]=(0.446543094067)*x[0]+(-1.49620720862)*x[1]+(-1.23581717894)*x[2]
-        arg[2,4,0,1]=(-0.964404449625)*x[0]+(0.229523164331)*x[1]+(-0.0829574431644)*x[2]
-        arg[2,4,1,0]=(-0.0222885761611)*x[0]+(-0.151419169433)*x[1]+(0.0521007301341)*x[2]
-        arg[2,4,1,1]=(-0.299232945099)*x[0]+(0.831745448311)*x[1]+(0.0354480204711)*x[2]
-        arg[2,4,2,0]=(0.350303784953)*x[0]+(0.0608299778701)*x[1]+(1.10333111365)*x[2]
-        arg[2,4,2,1]=(0.719573610926)*x[0]+(-0.0868905011544)*x[1]+(0.852804030732)*x[2]
-        arg[3,0,0,0]=(0.643070908885)*x[0]+(0.846705112025)*x[1]+(-0.340473447494)*x[2]
-        arg[3,0,0,1]=(-0.180433440729)*x[0]+(1.20490149625)*x[1]+(1.65034499912)*x[2]
-        arg[3,0,1,0]=(-0.454239570444)*x[0]+(0.425446741192)*x[1]+(0.469566134089)*x[2]
-        arg[3,0,1,1]=(-0.080272513364)*x[0]+(-0.437416002114)*x[1]+(0.741423922011)*x[2]
-        arg[3,0,2,0]=(0.0202920395247)*x[0]+(0.724451134981)*x[1]+(-0.628631137287)*x[2]
-        arg[3,0,2,1]=(1.27329890828)*x[0]+(1.32598594097)*x[1]+(-1.03893516914)*x[2]
-        arg[3,1,0,0]=(-0.316679599208)*x[0]+(1.37172239358)*x[1]+(-0.333448830595)*x[2]
-        arg[3,1,0,1]=(-0.97422120848)*x[0]+(-0.800596641862)*x[1]+(1.21296910893)*x[2]
-        arg[3,1,1,0]=(-0.791725431754)*x[0]+(0.173363698424)*x[1]+(-0.137920990647)*x[2]
-        arg[3,1,1,1]=(-0.104259554446)*x[0]+(1.14966042893)*x[1]+(0.694287361582)*x[2]
-        arg[3,1,2,0]=(0.130345878498)*x[0]+(0.186936528352)*x[1]+(-1.74442226692)*x[2]
-        arg[3,1,2,1]=(-0.952031053033)*x[0]+(0.718038193789)*x[1]+(-0.912958209036)*x[2]
-        arg[3,2,0,0]=(-1.16180973047)*x[0]+(0.0107173530275)*x[1]+(1.30278786691)*x[2]
-        arg[3,2,0,1]=(-0.224509227379)*x[0]+(0.0996327632409)*x[1]+(-0.590950424929)*x[2]
-        arg[3,2,1,0]=(1.37202300472)*x[0]+(-1.46745698646)*x[1]+(-0.811483806572)*x[2]
-        arg[3,2,1,1]=(1.4828065241)*x[0]+(-0.177365694124)*x[1]+(0.723931620237)*x[2]
-        arg[3,2,2,0]=(0.230529059637)*x[0]+(0.728445639896)*x[1]+(-0.566988770509)*x[2]
-        arg[3,2,2,1]=(0.797697737992)*x[0]+(-1.13322423945)*x[1]+(-1.1409387296)*x[2]
-        arg[3,3,0,0]=(0.217205133789)*x[0]+(-0.510677603419)*x[1]+(-0.580535665335)*x[2]
-        arg[3,3,0,1]=(-0.388656568244)*x[0]+(-0.906189671302)*x[1]+(0.44802765855)*x[2]
-        arg[3,3,1,0]=(0.13492738758)*x[0]+(-0.0523341874741)*x[1]+(1.42846176777)*x[2]
-        arg[3,3,1,1]=(0.243377010926)*x[0]+(-0.701174291473)*x[1]+(-0.756059212704)*x[2]
-        arg[3,3,2,0]=(1.48359083301)*x[0]+(1.17692500152)*x[1]+(-0.184437593764)*x[2]
-        arg[3,3,2,1]=(-0.105457636222)*x[0]+(-0.0190796656068)*x[1]+(-0.938560206034)*x[2]
-        arg[3,4,0,0]=(-0.101684388703)*x[0]+(-1.19809056647)*x[1]+(1.1989510907)*x[2]
-        arg[3,4,0,1]=(-1.0745487924)*x[0]+(-0.37560532919)*x[1]+(-0.967022985879)*x[2]
-        arg[3,4,1,0]=(0.315585027641)*x[0]+(-0.238716421886)*x[1]+(-0.275850551625)*x[2]
-        arg[3,4,1,1]=(-0.824271180248)*x[0]+(-0.0649845724269)*x[1]+(0.530472696035)*x[2]
-        arg[3,4,2,0]=(-0.518165130932)*x[0]+(1.44722596827)*x[1]+(0.072367534289)*x[2]
-        arg[3,4,2,1]=(-0.247477354356)*x[0]+(0.988584526142)*x[1]+(0.0491978506036)*x[2]
-        ref[0,0,0,0]=(0.523374388946)*x_ref[0]+(-0.462029311047)*x_ref[1]+(-0.47732568751)*x_ref[2]
-        ref[0,0,0,1]=(0.641437288282)*x_ref[0]+(-0.245967769804)*x_ref[1]+(-0.882711488334)*x_ref[2]
-        ref[0,0,1,0]=(-0.039075405101)*x_ref[0]+(0.233479040723)*x_ref[1]+(-0.450244284473)*x_ref[2]
-        ref[0,0,1,1]=(-1.00711630706)*x_ref[0]+(-0.247720707527)*x_ref[1]+(-0.597073422746)*x_ref[2]
-        ref[0,0,2,0]=(0.141738833983)*x_ref[0]+(-1.34846391496)*x_ref[1]+(0.214891803475)*x_ref[2]
-        ref[0,0,2,1]=(0.276967719755)*x_ref[0]+(-0.64300940909)*x_ref[1]+(-1.10068852616)*x_ref[2]
-        ref[0,1,0,0]=(0.438911917989)*x_ref[0]+(0.588137625057)*x_ref[1]+(0.744848057181)*x_ref[2]
-        ref[0,1,0,1]=(0.266343859518)*x_ref[0]+(1.24092635599)*x_ref[1]+(0.477206170905)*x_ref[2]
-        ref[0,1,1,0]=(0.328857688358)*x_ref[0]+(-1.17720038645)*x_ref[1]+(0.285045368661)*x_ref[2]
-        ref[0,1,1,1]=(-0.0985505878353)*x_ref[0]+(1.11228710542)*x_ref[1]+(0.159347839514)*x_ref[2]
-        ref[0,1,2,0]=(0.125378210814)*x_ref[0]+(1.51252392793)*x_ref[1]+(-0.0402281595871)*x_ref[2]
-        ref[0,1,2,1]=(-1.41964435548)*x_ref[0]+(0.825108246489)*x_ref[1]+(0.31679169508)*x_ref[2]
-        ref[0,2,0,0]=(1.47728541117)*x_ref[0]+(0.957708443424)*x_ref[1]+(-0.187892562217)*x_ref[2]
-        ref[0,2,0,1]=(0.0614505001405)*x_ref[0]+(0.144444072992)*x_ref[1]+(0.287839563179)*x_ref[2]
-        ref[0,2,1,0]=(0.512698173313)*x_ref[0]+(0.316852993542)*x_ref[1]+(0.538020705489)*x_ref[2]
-        ref[0,2,1,1]=(-0.349895838053)*x_ref[0]+(1.50602760725)*x_ref[1]+(-0.959979406715)*x_ref[2]
-        ref[0,2,2,0]=(-0.618802027626)*x_ref[0]+(0.71544179402)*x_ref[1]+(1.09297898989)*x_ref[2]
-        ref[0,2,2,1]=(-0.264932530879)*x_ref[0]+(-1.4100323815)*x_ref[1]+(-1.28423925034)*x_ref[2]
-        ref[0,3,0,0]=(0.481724893561)*x_ref[0]+(-0.546248388253)*x_ref[1]+(-0.214332802735)*x_ref[2]
-        ref[0,3,0,1]=(-1.33293479098)*x_ref[0]+(0.989294320484)*x_ref[1]+(-0.561974021785)*x_ref[2]
-        ref[0,3,1,0]=(-0.394718780001)*x_ref[0]+(1.0043343416)*x_ref[1]+(1.51370839793)*x_ref[2]
-        ref[0,3,1,1]=(1.08238957373)*x_ref[0]+(0.591631122094)*x_ref[1]+(0.075283954318)*x_ref[2]
-        ref[0,3,2,0]=(-1.0250149161)*x_ref[0]+(-0.739848118412)*x_ref[1]+(0.736595112789)*x_ref[2]
-        ref[0,3,2,1]=(-1.08033009366)*x_ref[0]+(-0.574926147021)*x_ref[1]+(0.421251948724)*x_ref[2]
-        ref[0,4,0,0]=(-0.0894466241931)*x_ref[0]+(1.14935896473)*x_ref[1]+(-0.490410015077)*x_ref[2]
-        ref[0,4,0,1]=(1.07777309372)*x_ref[0]+(1.0672971936)*x_ref[1]+(0.340143160972)*x_ref[2]
-        ref[0,4,1,0]=(0.905553949676)*x_ref[0]+(0.171320798438)*x_ref[1]+(1.83634812891)*x_ref[2]
-        ref[0,4,1,1]=(-0.663516264963)*x_ref[0]+(0.14871937304)*x_ref[1]+(-0.697949666962)*x_ref[2]
-        ref[0,4,2,0]=(1.41806579095)*x_ref[0]+(0.0357313086623)*x_ref[1]+(0.110846683649)*x_ref[2]
-        ref[0,4,2,1]=(-0.31919270211)*x_ref[0]+(-1.651049084)*x_ref[1]+(-1.47528307262)*x_ref[2]
-        ref[1,0,0,0]=(0.167209321535)*x_ref[0]+(-1.13066332212)*x_ref[1]+(0.209489173491)*x_ref[2]
-        ref[1,0,0,1]=(1.45770122794)*x_ref[0]+(1.12024118263)*x_ref[1]+(0.0203526002602)*x_ref[2]
-        ref[1,0,1,0]=(0.180403238696)*x_ref[0]+(0.580625819717)*x_ref[1]+(-1.00882441351)*x_ref[2]
-        ref[1,0,1,1]=(-0.20671421669)*x_ref[0]+(-0.199445466326)*x_ref[1]+(0.887365974398)*x_ref[2]
-        ref[1,0,2,0]=(-0.0109233374932)*x_ref[0]+(0.835241335188)*x_ref[1]+(-0.810658050514)*x_ref[2]
-        ref[1,0,2,1]=(-1.45991974539)*x_ref[0]+(0.955399748215)*x_ref[1]+(0.398673469474)*x_ref[2]
-        ref[1,1,0,0]=(0.726687414113)*x_ref[0]+(-1.35343793545)*x_ref[1]+(0.750079540417)*x_ref[2]
-        ref[1,1,0,1]=(-0.677871860083)*x_ref[0]+(-1.56756818572)*x_ref[1]+(-0.240923946416)*x_ref[2]
-        ref[1,1,1,0]=(-1.05791511835)*x_ref[0]+(-0.425827952234)*x_ref[1]+(-1.82875340474)*x_ref[2]
-        ref[1,1,1,1]=(-0.430783664297)*x_ref[0]+(0.552238591434)*x_ref[1]+(0.502702385375)*x_ref[2]
-        ref[1,1,2,0]=(0.240203734777)*x_ref[0]+(-0.0650121194654)*x_ref[1]+(1.04662204076)*x_ref[2]
-        ref[1,1,2,1]=(-0.25305133215)*x_ref[0]+(-0.31486026571)*x_ref[1]+(-1.83073697314)*x_ref[2]
-        ref[1,2,0,0]=(-1.09643062195)*x_ref[0]+(-0.437887555247)*x_ref[1]+(-1.33970467276)*x_ref[2]
-        ref[1,2,0,1]=(1.24489646204)*x_ref[0]+(1.0714412157)*x_ref[1]+(-0.192090595585)*x_ref[2]
-        ref[1,2,1,0]=(0.029290840641)*x_ref[0]+(-0.940655160496)*x_ref[1]+(-0.820414570983)*x_ref[2]
-        ref[1,2,1,1]=(-0.677190307386)*x_ref[0]+(-0.00164385522847)*x_ref[1]+(-0.46460277293)*x_ref[2]
-        ref[1,2,2,0]=(-0.320006508895)*x_ref[0]+(1.13412133331)*x_ref[1]+(-0.619705535377)*x_ref[2]
-        ref[1,2,2,1]=(-0.0220330715863)*x_ref[0]+(-0.64687567378)*x_ref[1]+(0.0957350181768)*x_ref[2]
-        ref[1,3,0,0]=(-0.25073330162)*x_ref[0]+(0.85795600432)*x_ref[1]+(1.53293778947)*x_ref[2]
-        ref[1,3,0,1]=(-0.183346360622)*x_ref[0]+(0.266035391885)*x_ref[1]+(-0.422228348627)*x_ref[2]
-        ref[1,3,1,0]=(-0.41587781442)*x_ref[0]+(-0.0103068212789)*x_ref[1]+(0.440665738388)*x_ref[2]
-        ref[1,3,1,1]=(1.41825912495)*x_ref[0]+(-0.0611650685825)*x_ref[1]+(0.972511387093)*x_ref[2]
-        ref[1,3,2,0]=(-0.336532230508)*x_ref[0]+(-0.0123275905127)*x_ref[1]+(-0.254643420879)*x_ref[2]
-        ref[1,3,2,1]=(-0.365437122858)*x_ref[0]+(0.71384297093)*x_ref[1]+(0.447802028475)*x_ref[2]
-        ref[1,4,0,0]=(1.33371172009)*x_ref[0]+(1.16948649723)*x_ref[1]+(-0.624453779138)*x_ref[2]
-        ref[1,4,0,1]=(0.0919647304743)*x_ref[0]+(1.20509307321)*x_ref[1]+(0.454668856107)*x_ref[2]
-        ref[1,4,1,0]=(0.179837036326)*x_ref[0]+(1.27470487309)*x_ref[1]+(0.248127557917)*x_ref[2]
-        ref[1,4,1,1]=(-0.0163592123585)*x_ref[0]+(-1.09373628426)*x_ref[1]+(-1.07284707536)*x_ref[2]
-        ref[1,4,2,0]=(-0.0617954247638)*x_ref[0]+(0.180336071139)*x_ref[1]+(0.0715760255435)*x_ref[2]
-        ref[1,4,2,1]=(0.449148667011)*x_ref[0]+(0.476092516356)*x_ref[1]+(-0.235672424702)*x_ref[2]
-        ref[2,0,0,0]=(1.06662096238)*x_ref[0]+(1.52079387843)*x_ref[1]+(-0.465087313097)*x_ref[2]
-        ref[2,0,0,1]=(-0.0113962755891)*x_ref[0]+(0.459517781034)*x_ref[1]+(0.423861505703)*x_ref[2]
-        ref[2,0,1,0]=(1.19571956088)*x_ref[0]+(1.02444853474)*x_ref[1]+(-1.31054246173)*x_ref[2]
-        ref[2,0,1,1]=(-1.39536067914)*x_ref[0]+(0.884184554143)*x_ref[1]+(-0.650926411157)*x_ref[2]
-        ref[2,0,2,0]=(-0.328672728946)*x_ref[0]+(1.07247782219)*x_ref[1]+(-0.61103916867)*x_ref[2]
-        ref[2,0,2,1]=(0.155304775433)*x_ref[0]+(-1.34794080729)*x_ref[1]+(-0.931891854948)*x_ref[2]
-        ref[2,1,0,0]=(-0.953726622792)*x_ref[0]+(0.483614421199)*x_ref[1]+(1.07026616662)*x_ref[2]
-        ref[2,1,0,1]=(0.720797127905)*x_ref[0]+(1.31309704242)*x_ref[1]+(0.534213389945)*x_ref[2]
-        ref[2,1,1,0]=(1.12642665973)*x_ref[0]+(-0.375134467285)*x_ref[1]+(0.223566393552)*x_ref[2]
-        ref[2,1,1,1]=(-0.380892997026)*x_ref[0]+(-0.661627351046)*x_ref[1]+(0.596842673155)*x_ref[2]
-        ref[2,1,2,0]=(0.233212348554)*x_ref[0]+(0.106673294307)*x_ref[1]+(-0.22268427628)*x_ref[2]
-        ref[2,1,2,1]=(0.67982223365)*x_ref[0]+(-1.53842407155)*x_ref[1]+(0.995328875213)*x_ref[2]
-        ref[2,2,0,0]=(1.5835734841)*x_ref[0]+(0.178824495609)*x_ref[1]+(-0.31332770355)*x_ref[2]
-        ref[2,2,0,1]=(0.101063103927)*x_ref[0]+(-0.0437670737377)*x_ref[1]+(-0.109514170393)*x_ref[2]
-        ref[2,2,1,0]=(-0.892614006193)*x_ref[0]+(0.952803608394)*x_ref[1]+(-0.643308315526)*x_ref[2]
-        ref[2,2,1,1]=(-0.0606310193159)*x_ref[0]+(-0.768822197122)*x_ref[1]+(-1.43018654257)*x_ref[2]
-        ref[2,2,2,0]=(0.107463856971)*x_ref[0]+(1.27309352669)*x_ref[1]+(1.65234673057)*x_ref[2]
-        ref[2,2,2,1]=(0.699315319729)*x_ref[0]+(-0.345960580793)*x_ref[1]+(-1.61621444026)*x_ref[2]
-        ref[2,3,0,0]=(0.9761936338)*x_ref[0]+(0.665547749873)*x_ref[1]+(-1.07512721449)*x_ref[2]
-        ref[2,3,0,1]=(1.26182572924)*x_ref[0]+(-0.416232568884)*x_ref[1]+(-0.356737405174)*x_ref[2]
-        ref[2,3,1,0]=(-0.477958253427)*x_ref[0]+(0.198049156904)*x_ref[1]+(-0.295022782364)*x_ref[2]
-        ref[2,3,1,1]=(0.412187471103)*x_ref[0]+(0.335655056628)*x_ref[1]+(-0.0873658679329)*x_ref[2]
-        ref[2,3,2,0]=(0.168439409327)*x_ref[0]+(-0.131948711409)*x_ref[1]+(1.66777364846)*x_ref[2]
-        ref[2,3,2,1]=(0.508795552378)*x_ref[0]+(-0.390505460243)*x_ref[1]+(0.13190717559)*x_ref[2]
-        ref[2,4,0,0]=(0.446543094067)*x_ref[0]+(-1.49620720862)*x_ref[1]+(-1.23581717894)*x_ref[2]
-        ref[2,4,0,1]=(-0.964404449625)*x_ref[0]+(0.229523164331)*x_ref[1]+(-0.0829574431644)*x_ref[2]
-        ref[2,4,1,0]=(-0.0222885761611)*x_ref[0]+(-0.151419169433)*x_ref[1]+(0.0521007301341)*x_ref[2]
-        ref[2,4,1,1]=(-0.299232945099)*x_ref[0]+(0.831745448311)*x_ref[1]+(0.0354480204711)*x_ref[2]
-        ref[2,4,2,0]=(0.350303784953)*x_ref[0]+(0.0608299778701)*x_ref[1]+(1.10333111365)*x_ref[2]
-        ref[2,4,2,1]=(0.719573610926)*x_ref[0]+(-0.0868905011544)*x_ref[1]+(0.852804030732)*x_ref[2]
-        ref[3,0,0,0]=(0.643070908885)*x_ref[0]+(0.846705112025)*x_ref[1]+(-0.340473447494)*x_ref[2]
-        ref[3,0,0,1]=(-0.180433440729)*x_ref[0]+(1.20490149625)*x_ref[1]+(1.65034499912)*x_ref[2]
-        ref[3,0,1,0]=(-0.454239570444)*x_ref[0]+(0.425446741192)*x_ref[1]+(0.469566134089)*x_ref[2]
-        ref[3,0,1,1]=(-0.080272513364)*x_ref[0]+(-0.437416002114)*x_ref[1]+(0.741423922011)*x_ref[2]
-        ref[3,0,2,0]=(0.0202920395247)*x_ref[0]+(0.724451134981)*x_ref[1]+(-0.628631137287)*x_ref[2]
-        ref[3,0,2,1]=(1.27329890828)*x_ref[0]+(1.32598594097)*x_ref[1]+(-1.03893516914)*x_ref[2]
-        ref[3,1,0,0]=(-0.316679599208)*x_ref[0]+(1.37172239358)*x_ref[1]+(-0.333448830595)*x_ref[2]
-        ref[3,1,0,1]=(-0.97422120848)*x_ref[0]+(-0.800596641862)*x_ref[1]+(1.21296910893)*x_ref[2]
-        ref[3,1,1,0]=(-0.791725431754)*x_ref[0]+(0.173363698424)*x_ref[1]+(-0.137920990647)*x_ref[2]
-        ref[3,1,1,1]=(-0.104259554446)*x_ref[0]+(1.14966042893)*x_ref[1]+(0.694287361582)*x_ref[2]
-        ref[3,1,2,0]=(0.130345878498)*x_ref[0]+(0.186936528352)*x_ref[1]+(-1.74442226692)*x_ref[2]
-        ref[3,1,2,1]=(-0.952031053033)*x_ref[0]+(0.718038193789)*x_ref[1]+(-0.912958209036)*x_ref[2]
-        ref[3,2,0,0]=(-1.16180973047)*x_ref[0]+(0.0107173530275)*x_ref[1]+(1.30278786691)*x_ref[2]
-        ref[3,2,0,1]=(-0.224509227379)*x_ref[0]+(0.0996327632409)*x_ref[1]+(-0.590950424929)*x_ref[2]
-        ref[3,2,1,0]=(1.37202300472)*x_ref[0]+(-1.46745698646)*x_ref[1]+(-0.811483806572)*x_ref[2]
-        ref[3,2,1,1]=(1.4828065241)*x_ref[0]+(-0.177365694124)*x_ref[1]+(0.723931620237)*x_ref[2]
-        ref[3,2,2,0]=(0.230529059637)*x_ref[0]+(0.728445639896)*x_ref[1]+(-0.566988770509)*x_ref[2]
-        ref[3,2,2,1]=(0.797697737992)*x_ref[0]+(-1.13322423945)*x_ref[1]+(-1.1409387296)*x_ref[2]
-        ref[3,3,0,0]=(0.217205133789)*x_ref[0]+(-0.510677603419)*x_ref[1]+(-0.580535665335)*x_ref[2]
-        ref[3,3,0,1]=(-0.388656568244)*x_ref[0]+(-0.906189671302)*x_ref[1]+(0.44802765855)*x_ref[2]
-        ref[3,3,1,0]=(0.13492738758)*x_ref[0]+(-0.0523341874741)*x_ref[1]+(1.42846176777)*x_ref[2]
-        ref[3,3,1,1]=(0.243377010926)*x_ref[0]+(-0.701174291473)*x_ref[1]+(-0.756059212704)*x_ref[2]
-        ref[3,3,2,0]=(1.48359083301)*x_ref[0]+(1.17692500152)*x_ref[1]+(-0.184437593764)*x_ref[2]
-        ref[3,3,2,1]=(-0.105457636222)*x_ref[0]+(-0.0190796656068)*x_ref[1]+(-0.938560206034)*x_ref[2]
-        ref[3,4,0,0]=(-0.101684388703)*x_ref[0]+(-1.19809056647)*x_ref[1]+(1.1989510907)*x_ref[2]
-        ref[3,4,0,1]=(-1.0745487924)*x_ref[0]+(-0.37560532919)*x_ref[1]+(-0.967022985879)*x_ref[2]
-        ref[3,4,1,0]=(0.315585027641)*x_ref[0]+(-0.238716421886)*x_ref[1]+(-0.275850551625)*x_ref[2]
-        ref[3,4,1,1]=(-0.824271180248)*x_ref[0]+(-0.0649845724269)*x_ref[1]+(0.530472696035)*x_ref[2]
-        ref[3,4,2,0]=(-0.518165130932)*x_ref[0]+(1.44722596827)*x_ref[1]+(0.072367534289)*x_ref[2]
-        ref[3,4,2,1]=(-0.247477354356)*x_ref[0]+(0.988584526142)*x_ref[1]+(0.0491978506036)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Function_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Function onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Function(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0969659653911)*x[0]**o+(-0.0778467995236)*x[0]+(-0.896520347956)*x[1]**o+(0.452579859858)*x[1]
-        ref=(0.0969659653911)*x_ref[0]**o+(-0.0778467995236)*x_ref[0]+(-0.896520347956)*x_ref[1]**o+(0.452579859858)*x_ref[1]
-      else:
-        arg=(-0.62506591451)*x[0]**o+(0.970735975624)*x[0]+(-0.563055321362)*x[1]**o+(-0.281482915069)*x[1]+(-0.6461258967)*x[2]**o+(0.786610350609)*x[2]
-        ref=(-0.62506591451)*x_ref[0]**o+(0.970735975624)*x_ref[0]+(-0.563055321362)*x_ref[1]**o+(-0.281482915069)*x_ref[1]+(-0.6461258967)*x_ref[2]**o+(0.786610350609)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Function_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Function onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Function(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.725240039321)*x[0]**o+(0.326302203613)*x[0]+(0.356072156898)*x[1]**o+(0.980066388307)*x[1]
-        arg[1]=(0.171551389095)*x[0]**o+(0.379133470853)*x[0]+(0.120608077039)*x[1]**o+(-0.413701037132)*x[1]
-        ref[0]=(0.725240039321)*x_ref[0]**o+(0.326302203613)*x_ref[0]+(0.356072156898)*x_ref[1]**o+(0.980066388307)*x_ref[1]
-        ref[1]=(0.171551389095)*x_ref[0]**o+(0.379133470853)*x_ref[0]+(0.120608077039)*x_ref[1]**o+(-0.413701037132)*x_ref[1]
-      else:
-        arg[0]=(-0.656095745624)*x[0]**o+(-0.540430373724)*x[0]+(-0.109962817674)*x[1]**o+(-0.969692783268)*x[1]+(-0.377994841279)*x[2]**o+(-0.664035030664)*x[2]
-        arg[1]=(0.768498465456)*x[0]**o+(0.647294499552)*x[0]+(0.824672861058)*x[1]**o+(-0.848088780836)*x[1]+(0.045558138597)*x[2]**o+(-0.209365900036)*x[2]
-        ref[0]=(-0.656095745624)*x_ref[0]**o+(-0.540430373724)*x_ref[0]+(-0.109962817674)*x_ref[1]**o+(-0.969692783268)*x_ref[1]+(-0.377994841279)*x_ref[2]**o+(-0.664035030664)*x_ref[2]
-        ref[1]=(0.768498465456)*x_ref[0]**o+(0.647294499552)*x_ref[0]+(0.824672861058)*x_ref[1]**o+(-0.848088780836)*x_ref[1]+(0.045558138597)*x_ref[2]**o+(-0.209365900036)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Function_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Function onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Function(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.694866182164)*x[0]**o+(0.759641527396)*x[0]+(-0.696641139757)*x[1]**o+(0.617978953453)*x[1]
-        arg[0,1]=(0.75058922213)*x[0]**o+(0.580832851854)*x[0]+(-0.237039031011)*x[1]**o+(0.53518450519)*x[1]
-        arg[0,2]=(-0.191933019173)*x[0]**o+(-0.0638088686782)*x[0]+(0.871645336149)*x[1]**o+(0.256502442034)*x[1]
-        arg[0,3]=(0.829189580591)*x[0]**o+(0.186064016504)*x[0]+(-0.204496850484)*x[1]**o+(-0.314535598074)*x[1]
-        arg[0,4]=(0.170968249419)*x[0]**o+(-0.719959835105)*x[0]+(0.367000223059)*x[1]**o+(-0.210239222752)*x[1]
-        arg[1,0]=(-0.424311493894)*x[0]**o+(-0.381097143579)*x[0]+(-0.54925292526)*x[1]**o+(-0.393349131169)*x[1]
-        arg[1,1]=(0.148181508143)*x[0]**o+(-0.224530937841)*x[0]+(0.778748719265)*x[1]**o+(-0.522104185968)*x[1]
-        arg[1,2]=(0.134819103337)*x[0]**o+(0.0388165865124)*x[0]+(-0.772318490115)*x[1]**o+(-0.928611227188)*x[1]
-        arg[1,3]=(0.790807030518)*x[0]**o+(-0.849964960983)*x[0]+(-0.79407080953)*x[1]**o+(-0.626315155005)*x[1]
-        arg[1,4]=(-0.998842104726)*x[0]**o+(-0.325938405818)*x[0]+(-0.81445420822)*x[1]**o+(0.868281547664)*x[1]
-        arg[2,0]=(-0.975572739854)*x[0]**o+(-0.0630975707316)*x[0]+(0.0688031679656)*x[1]**o+(0.557152464527)*x[1]
-        arg[2,1]=(0.389814261767)*x[0]**o+(0.523891881188)*x[0]+(-0.558388242102)*x[1]**o+(-0.45720905598)*x[1]
-        arg[2,2]=(0.763327517145)*x[0]**o+(0.637954909904)*x[0]+(0.407602154355)*x[1]**o+(0.707118271445)*x[1]
-        arg[2,3]=(-0.823371482965)*x[0]**o+(0.918685041464)*x[0]+(0.991991462022)*x[1]**o+(0.489892661208)*x[1]
-        arg[2,4]=(-0.661567455889)*x[0]**o+(-0.00566795402284)*x[0]+(0.86705493299)*x[1]**o+(0.00158321121677)*x[1]
-        arg[3,0]=(0.365456232671)*x[0]**o+(-0.587373381962)*x[0]+(0.751291631507)*x[1]**o+(-0.0605248375222)*x[1]
-        arg[3,1]=(0.546630294768)*x[0]**o+(-0.903068297271)*x[0]+(0.486313468693)*x[1]**o+(0.355322343068)*x[1]
-        arg[3,2]=(0.233755056849)*x[0]**o+(-0.350375425427)*x[0]+(0.0115435986629)*x[1]**o+(-0.713895312694)*x[1]
-        arg[3,3]=(0.385411302842)*x[0]**o+(0.0733743700003)*x[0]+(0.439219708301)*x[1]**o+(0.129391539278)*x[1]
-        arg[3,4]=(-0.194268604537)*x[0]**o+(0.175829932738)*x[0]+(0.866342013931)*x[1]**o+(-0.213891435501)*x[1]
-        ref[0,0]=(0.694866182164)*x_ref[0]**o+(0.759641527396)*x_ref[0]+(-0.696641139757)*x_ref[1]**o+(0.617978953453)*x_ref[1]
-        ref[0,1]=(0.75058922213)*x_ref[0]**o+(0.580832851854)*x_ref[0]+(-0.237039031011)*x_ref[1]**o+(0.53518450519)*x_ref[1]
-        ref[0,2]=(-0.191933019173)*x_ref[0]**o+(-0.0638088686782)*x_ref[0]+(0.871645336149)*x_ref[1]**o+(0.256502442034)*x_ref[1]
-        ref[0,3]=(0.829189580591)*x_ref[0]**o+(0.186064016504)*x_ref[0]+(-0.204496850484)*x_ref[1]**o+(-0.314535598074)*x_ref[1]
-        ref[0,4]=(0.170968249419)*x_ref[0]**o+(-0.719959835105)*x_ref[0]+(0.367000223059)*x_ref[1]**o+(-0.210239222752)*x_ref[1]
-        ref[1,0]=(-0.424311493894)*x_ref[0]**o+(-0.381097143579)*x_ref[0]+(-0.54925292526)*x_ref[1]**o+(-0.393349131169)*x_ref[1]
-        ref[1,1]=(0.148181508143)*x_ref[0]**o+(-0.224530937841)*x_ref[0]+(0.778748719265)*x_ref[1]**o+(-0.522104185968)*x_ref[1]
-        ref[1,2]=(0.134819103337)*x_ref[0]**o+(0.0388165865124)*x_ref[0]+(-0.772318490115)*x_ref[1]**o+(-0.928611227188)*x_ref[1]
-        ref[1,3]=(0.790807030518)*x_ref[0]**o+(-0.849964960983)*x_ref[0]+(-0.79407080953)*x_ref[1]**o+(-0.626315155005)*x_ref[1]
-        ref[1,4]=(-0.998842104726)*x_ref[0]**o+(-0.325938405818)*x_ref[0]+(-0.81445420822)*x_ref[1]**o+(0.868281547664)*x_ref[1]
-        ref[2,0]=(-0.975572739854)*x_ref[0]**o+(-0.0630975707316)*x_ref[0]+(0.0688031679656)*x_ref[1]**o+(0.557152464527)*x_ref[1]
-        ref[2,1]=(0.389814261767)*x_ref[0]**o+(0.523891881188)*x_ref[0]+(-0.558388242102)*x_ref[1]**o+(-0.45720905598)*x_ref[1]
-        ref[2,2]=(0.763327517145)*x_ref[0]**o+(0.637954909904)*x_ref[0]+(0.407602154355)*x_ref[1]**o+(0.707118271445)*x_ref[1]
-        ref[2,3]=(-0.823371482965)*x_ref[0]**o+(0.918685041464)*x_ref[0]+(0.991991462022)*x_ref[1]**o+(0.489892661208)*x_ref[1]
-        ref[2,4]=(-0.661567455889)*x_ref[0]**o+(-0.00566795402284)*x_ref[0]+(0.86705493299)*x_ref[1]**o+(0.00158321121677)*x_ref[1]
-        ref[3,0]=(0.365456232671)*x_ref[0]**o+(-0.587373381962)*x_ref[0]+(0.751291631507)*x_ref[1]**o+(-0.0605248375222)*x_ref[1]
-        ref[3,1]=(0.546630294768)*x_ref[0]**o+(-0.903068297271)*x_ref[0]+(0.486313468693)*x_ref[1]**o+(0.355322343068)*x_ref[1]
-        ref[3,2]=(0.233755056849)*x_ref[0]**o+(-0.350375425427)*x_ref[0]+(0.0115435986629)*x_ref[1]**o+(-0.713895312694)*x_ref[1]
-        ref[3,3]=(0.385411302842)*x_ref[0]**o+(0.0733743700003)*x_ref[0]+(0.439219708301)*x_ref[1]**o+(0.129391539278)*x_ref[1]
-        ref[3,4]=(-0.194268604537)*x_ref[0]**o+(0.175829932738)*x_ref[0]+(0.866342013931)*x_ref[1]**o+(-0.213891435501)*x_ref[1]
-      else:
-        arg[0,0]=(-0.479138946804)*x[0]**o+(0.240408443007)*x[0]+(0.309155796205)*x[1]**o+(-0.124360991957)*x[1]+(0.00301047542037)*x[2]**o+(-0.039439802799)*x[2]
-        arg[0,1]=(0.41979402771)*x[0]**o+(0.798738902847)*x[0]+(0.619960746922)*x[1]**o+(-0.551662130664)*x[1]+(0.914293623695)*x[2]**o+(0.6859768812)*x[2]
-        arg[0,2]=(0.744593492696)*x[0]**o+(-0.31743031745)*x[0]+(0.389545123971)*x[1]**o+(0.592024987288)*x[1]+(0.63456095022)*x[2]**o+(-0.746571796061)*x[2]
-        arg[0,3]=(-0.632549503649)*x[0]**o+(-0.687745599598)*x[0]+(0.794176042123)*x[1]**o+(-0.971466375953)*x[1]+(-0.086939632062)*x[2]**o+(0.373736042024)*x[2]
-        arg[0,4]=(-0.966879538217)*x[0]**o+(-0.609291970974)*x[0]+(0.000409196978095)*x[1]**o+(0.623934484362)*x[1]+(-0.1694749999)*x[2]**o+(0.131778917979)*x[2]
-        arg[1,0]=(0.763452444611)*x[0]**o+(0.805147582411)*x[0]+(0.999704124146)*x[1]**o+(0.0635253753138)*x[1]+(-0.717889410548)*x[2]**o+(-0.840765968423)*x[2]
-        arg[1,1]=(-0.26910479702)*x[0]**o+(0.594093239771)*x[0]+(-0.536150372834)*x[1]**o+(-0.768506263316)*x[1]+(-0.924510063594)*x[2]**o+(-0.950568839784)*x[2]
-        arg[1,2]=(-0.452317334239)*x[0]**o+(0.186343827048)*x[0]+(0.921015823436)*x[1]**o+(-0.656809197675)*x[1]+(-0.841898648461)*x[2]**o+(0.267827136605)*x[2]
-        arg[1,3]=(-0.880873336233)*x[0]**o+(-0.915350352959)*x[0]+(0.92197459758)*x[1]**o+(0.20861139921)*x[1]+(0.776743964515)*x[2]**o+(0.858569288507)*x[2]
-        arg[1,4]=(0.422773256864)*x[0]**o+(0.397743860671)*x[0]+(0.726470981309)*x[1]**o+(-0.233534612019)*x[1]+(-0.350345927201)*x[2]**o+(-0.192294374344)*x[2]
-        arg[2,0]=(0.0706785590906)*x[0]**o+(-0.102098736751)*x[0]+(-0.858298802695)*x[1]**o+(-0.1390708698)*x[1]+(0.221129390442)*x[2]**o+(0.770148745174)*x[2]
-        arg[2,1]=(0.619559141603)*x[0]**o+(-0.969165124767)*x[0]+(0.36662839455)*x[1]**o+(0.505630485999)*x[1]+(0.170716012487)*x[2]**o+(0.355457960368)*x[2]
-        arg[2,2]=(0.254098998564)*x[0]**o+(0.725662782597)*x[0]+(0.274108937869)*x[1]**o+(0.682336753679)*x[1]+(-0.858192561327)*x[2]**o+(-0.538785359078)*x[2]
-        arg[2,3]=(0.25513729674)*x[0]**o+(-0.594968324608)*x[0]+(-0.306612686559)*x[1]**o+(-0.953891015684)*x[1]+(-0.00631658753287)*x[2]**o+(-0.889694464702)*x[2]
-        arg[2,4]=(0.654463492789)*x[0]**o+(-0.42220702047)*x[0]+(-0.690125229151)*x[1]**o+(0.318923837754)*x[1]+(-0.691341299676)*x[2]**o+(0.824631778823)*x[2]
-        arg[3,0]=(-0.576563725107)*x[0]**o+(-0.0354219245402)*x[0]+(0.650854296808)*x[1]**o+(0.930072736771)*x[1]+(0.8383657117)*x[2]**o+(0.191293272146)*x[2]
-        arg[3,1]=(0.104382485594)*x[0]**o+(-0.718025390561)*x[0]+(-0.822188446684)*x[1]**o+(-0.0772502664782)*x[1]+(-0.513331680922)*x[2]**o+(0.164340503698)*x[2]
-        arg[3,2]=(0.685178273481)*x[0]**o+(-0.241726920352)*x[0]+(-0.891512838953)*x[1]**o+(-0.428833037662)*x[1]+(-0.910220899771)*x[2]**o+(-0.0109246344661)*x[2]
-        arg[3,3]=(-0.294769406995)*x[0]**o+(0.643502505933)*x[0]+(0.309444282121)*x[1]**o+(-0.935318923262)*x[1]+(0.242426961867)*x[2]**o+(-0.417268637067)*x[2]
-        arg[3,4]=(0.0382306334841)*x[0]**o+(-0.564858278904)*x[0]+(-0.594566652327)*x[1]**o+(0.911894434818)*x[1]+(-0.314178793024)*x[2]**o+(0.302730333267)*x[2]
-        ref[0,0]=(-0.479138946804)*x_ref[0]**o+(0.240408443007)*x_ref[0]+(0.309155796205)*x_ref[1]**o+(-0.124360991957)*x_ref[1]+(0.00301047542037)*x_ref[2]**o+(-0.039439802799)*x_ref[2]
-        ref[0,1]=(0.41979402771)*x_ref[0]**o+(0.798738902847)*x_ref[0]+(0.619960746922)*x_ref[1]**o+(-0.551662130664)*x_ref[1]+(0.914293623695)*x_ref[2]**o+(0.6859768812)*x_ref[2]
-        ref[0,2]=(0.744593492696)*x_ref[0]**o+(-0.31743031745)*x_ref[0]+(0.389545123971)*x_ref[1]**o+(0.592024987288)*x_ref[1]+(0.63456095022)*x_ref[2]**o+(-0.746571796061)*x_ref[2]
-        ref[0,3]=(-0.632549503649)*x_ref[0]**o+(-0.687745599598)*x_ref[0]+(0.794176042123)*x_ref[1]**o+(-0.971466375953)*x_ref[1]+(-0.086939632062)*x_ref[2]**o+(0.373736042024)*x_ref[2]
-        ref[0,4]=(-0.966879538217)*x_ref[0]**o+(-0.609291970974)*x_ref[0]+(0.000409196978095)*x_ref[1]**o+(0.623934484362)*x_ref[1]+(-0.1694749999)*x_ref[2]**o+(0.131778917979)*x_ref[2]
-        ref[1,0]=(0.763452444611)*x_ref[0]**o+(0.805147582411)*x_ref[0]+(0.999704124146)*x_ref[1]**o+(0.0635253753138)*x_ref[1]+(-0.717889410548)*x_ref[2]**o+(-0.840765968423)*x_ref[2]
-        ref[1,1]=(-0.26910479702)*x_ref[0]**o+(0.594093239771)*x_ref[0]+(-0.536150372834)*x_ref[1]**o+(-0.768506263316)*x_ref[1]+(-0.924510063594)*x_ref[2]**o+(-0.950568839784)*x_ref[2]
-        ref[1,2]=(-0.452317334239)*x_ref[0]**o+(0.186343827048)*x_ref[0]+(0.921015823436)*x_ref[1]**o+(-0.656809197675)*x_ref[1]+(-0.841898648461)*x_ref[2]**o+(0.267827136605)*x_ref[2]
-        ref[1,3]=(-0.880873336233)*x_ref[0]**o+(-0.915350352959)*x_ref[0]+(0.92197459758)*x_ref[1]**o+(0.20861139921)*x_ref[1]+(0.776743964515)*x_ref[2]**o+(0.858569288507)*x_ref[2]
-        ref[1,4]=(0.422773256864)*x_ref[0]**o+(0.397743860671)*x_ref[0]+(0.726470981309)*x_ref[1]**o+(-0.233534612019)*x_ref[1]+(-0.350345927201)*x_ref[2]**o+(-0.192294374344)*x_ref[2]
-        ref[2,0]=(0.0706785590906)*x_ref[0]**o+(-0.102098736751)*x_ref[0]+(-0.858298802695)*x_ref[1]**o+(-0.1390708698)*x_ref[1]+(0.221129390442)*x_ref[2]**o+(0.770148745174)*x_ref[2]
-        ref[2,1]=(0.619559141603)*x_ref[0]**o+(-0.969165124767)*x_ref[0]+(0.36662839455)*x_ref[1]**o+(0.505630485999)*x_ref[1]+(0.170716012487)*x_ref[2]**o+(0.355457960368)*x_ref[2]
-        ref[2,2]=(0.254098998564)*x_ref[0]**o+(0.725662782597)*x_ref[0]+(0.274108937869)*x_ref[1]**o+(0.682336753679)*x_ref[1]+(-0.858192561327)*x_ref[2]**o+(-0.538785359078)*x_ref[2]
-        ref[2,3]=(0.25513729674)*x_ref[0]**o+(-0.594968324608)*x_ref[0]+(-0.306612686559)*x_ref[1]**o+(-0.953891015684)*x_ref[1]+(-0.00631658753287)*x_ref[2]**o+(-0.889694464702)*x_ref[2]
-        ref[2,4]=(0.654463492789)*x_ref[0]**o+(-0.42220702047)*x_ref[0]+(-0.690125229151)*x_ref[1]**o+(0.318923837754)*x_ref[1]+(-0.691341299676)*x_ref[2]**o+(0.824631778823)*x_ref[2]
-        ref[3,0]=(-0.576563725107)*x_ref[0]**o+(-0.0354219245402)*x_ref[0]+(0.650854296808)*x_ref[1]**o+(0.930072736771)*x_ref[1]+(0.8383657117)*x_ref[2]**o+(0.191293272146)*x_ref[2]
-        ref[3,1]=(0.104382485594)*x_ref[0]**o+(-0.718025390561)*x_ref[0]+(-0.822188446684)*x_ref[1]**o+(-0.0772502664782)*x_ref[1]+(-0.513331680922)*x_ref[2]**o+(0.164340503698)*x_ref[2]
-        ref[3,2]=(0.685178273481)*x_ref[0]**o+(-0.241726920352)*x_ref[0]+(-0.891512838953)*x_ref[1]**o+(-0.428833037662)*x_ref[1]+(-0.910220899771)*x_ref[2]**o+(-0.0109246344661)*x_ref[2]
-        ref[3,3]=(-0.294769406995)*x_ref[0]**o+(0.643502505933)*x_ref[0]+(0.309444282121)*x_ref[1]**o+(-0.935318923262)*x_ref[1]+(0.242426961867)*x_ref[2]**o+(-0.417268637067)*x_ref[2]
-        ref[3,4]=(0.0382306334841)*x_ref[0]**o+(-0.564858278904)*x_ref[0]+(-0.594566652327)*x_ref[1]**o+(0.911894434818)*x_ref[1]+(-0.314178793024)*x_ref[2]**o+(0.302730333267)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Function_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Function onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Function(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.298635657968)*x[0]**o+(0.917751825722)*x[0]+(-0.000157823722007)*x[1]**o+(-0.202721972906)*x[1]
-        arg[0,0,1]=(0.164880328673)*x[0]**o+(-0.310233508297)*x[0]+(-0.976270095138)*x[1]**o+(-0.86689594754)*x[1]
-        arg[0,1,0]=(-0.130835262631)*x[0]**o+(-0.485555484157)*x[0]+(0.055655815912)*x[1]**o+(-0.488201458657)*x[1]
-        arg[0,1,1]=(-0.339982923518)*x[0]**o+(0.435464515598)*x[0]+(-0.986955506076)*x[1]**o+(0.590966000031)*x[1]
-        arg[1,0,0]=(0.150280127463)*x[0]**o+(0.827183876844)*x[0]+(0.468401701763)*x[1]**o+(-0.879871376091)*x[1]
-        arg[1,0,1]=(0.48434831025)*x[0]**o+(-0.623958069024)*x[0]+(-0.781911271849)*x[1]**o+(0.34398679645)*x[1]
-        arg[1,1,0]=(0.124273770782)*x[0]**o+(-0.683096046651)*x[0]+(0.769636378285)*x[1]**o+(-0.471970832437)*x[1]
-        arg[1,1,1]=(0.769777912195)*x[0]**o+(-0.740802020319)*x[0]+(0.659109761568)*x[1]**o+(-0.495444655614)*x[1]
-        arg[2,0,0]=(0.270063777356)*x[0]**o+(0.558849439723)*x[0]+(0.128946408169)*x[1]**o+(-0.962495994445)*x[1]
-        arg[2,0,1]=(-0.0403460883009)*x[0]**o+(0.084983334662)*x[0]+(0.297573700577)*x[1]**o+(0.911774703678)*x[1]
-        arg[2,1,0]=(0.821680378088)*x[0]**o+(0.10823172035)*x[0]+(-0.150213295203)*x[1]**o+(0.310471151961)*x[1]
-        arg[2,1,1]=(-0.407033195691)*x[0]**o+(0.716262964777)*x[0]+(-0.262475432397)*x[1]**o+(-0.234158898682)*x[1]
-        arg[3,0,0]=(-0.109193787139)*x[0]**o+(0.403892847875)*x[0]+(0.794082322801)*x[1]**o+(0.669070572253)*x[1]
-        arg[3,0,1]=(0.969770217228)*x[0]**o+(0.735280190411)*x[0]+(-0.339891263613)*x[1]**o+(0.859989056027)*x[1]
-        arg[3,1,0]=(-0.906193851712)*x[0]**o+(-0.330178132059)*x[0]+(-0.48035114847)*x[1]**o+(-0.48050067188)*x[1]
-        arg[3,1,1]=(0.922778761752)*x[0]**o+(0.899145572602)*x[0]+(-0.991922151176)*x[1]**o+(0.615744852656)*x[1]
-        arg[4,0,0]=(0.457092295352)*x[0]**o+(-0.120904430848)*x[0]+(0.575186782188)*x[1]**o+(-0.685522788659)*x[1]
-        arg[4,0,1]=(0.254934861907)*x[0]**o+(-0.208850206761)*x[0]+(-0.0933987467304)*x[1]**o+(0.687715419212)*x[1]
-        arg[4,1,0]=(0.483890412252)*x[0]**o+(-0.192055355216)*x[0]+(0.0891595367214)*x[1]**o+(-0.835900121805)*x[1]
-        arg[4,1,1]=(-0.281109655935)*x[0]**o+(0.279867178407)*x[0]+(0.843094337157)*x[1]**o+(-0.457583293166)*x[1]
-        arg[5,0,0]=(0.595078633674)*x[0]**o+(-0.994652086537)*x[0]+(0.111354924733)*x[1]**o+(0.715580298167)*x[1]
-        arg[5,0,1]=(0.823409068766)*x[0]**o+(0.41047089933)*x[0]+(-0.610763277348)*x[1]**o+(0.0991108428868)*x[1]
-        arg[5,1,0]=(-0.0291539407811)*x[0]**o+(0.371799932333)*x[0]+(0.631702366805)*x[1]**o+(-0.858415923309)*x[1]
-        arg[5,1,1]=(-0.636146064991)*x[0]**o+(0.407248062196)*x[0]+(-0.507069143933)*x[1]**o+(-0.0509951705166)*x[1]
-        ref[0,0,0]=(0.298635657968)*x_ref[0]**o+(0.917751825722)*x_ref[0]+(-0.000157823722007)*x_ref[1]**o+(-0.202721972906)*x_ref[1]
-        ref[0,0,1]=(0.164880328673)*x_ref[0]**o+(-0.310233508297)*x_ref[0]+(-0.976270095138)*x_ref[1]**o+(-0.86689594754)*x_ref[1]
-        ref[0,1,0]=(-0.130835262631)*x_ref[0]**o+(-0.485555484157)*x_ref[0]+(0.055655815912)*x_ref[1]**o+(-0.488201458657)*x_ref[1]
-        ref[0,1,1]=(-0.339982923518)*x_ref[0]**o+(0.435464515598)*x_ref[0]+(-0.986955506076)*x_ref[1]**o+(0.590966000031)*x_ref[1]
-        ref[1,0,0]=(0.150280127463)*x_ref[0]**o+(0.827183876844)*x_ref[0]+(0.468401701763)*x_ref[1]**o+(-0.879871376091)*x_ref[1]
-        ref[1,0,1]=(0.48434831025)*x_ref[0]**o+(-0.623958069024)*x_ref[0]+(-0.781911271849)*x_ref[1]**o+(0.34398679645)*x_ref[1]
-        ref[1,1,0]=(0.124273770782)*x_ref[0]**o+(-0.683096046651)*x_ref[0]+(0.769636378285)*x_ref[1]**o+(-0.471970832437)*x_ref[1]
-        ref[1,1,1]=(0.769777912195)*x_ref[0]**o+(-0.740802020319)*x_ref[0]+(0.659109761568)*x_ref[1]**o+(-0.495444655614)*x_ref[1]
-        ref[2,0,0]=(0.270063777356)*x_ref[0]**o+(0.558849439723)*x_ref[0]+(0.128946408169)*x_ref[1]**o+(-0.962495994445)*x_ref[1]
-        ref[2,0,1]=(-0.0403460883009)*x_ref[0]**o+(0.084983334662)*x_ref[0]+(0.297573700577)*x_ref[1]**o+(0.911774703678)*x_ref[1]
-        ref[2,1,0]=(0.821680378088)*x_ref[0]**o+(0.10823172035)*x_ref[0]+(-0.150213295203)*x_ref[1]**o+(0.310471151961)*x_ref[1]
-        ref[2,1,1]=(-0.407033195691)*x_ref[0]**o+(0.716262964777)*x_ref[0]+(-0.262475432397)*x_ref[1]**o+(-0.234158898682)*x_ref[1]
-        ref[3,0,0]=(-0.109193787139)*x_ref[0]**o+(0.403892847875)*x_ref[0]+(0.794082322801)*x_ref[1]**o+(0.669070572253)*x_ref[1]
-        ref[3,0,1]=(0.969770217228)*x_ref[0]**o+(0.735280190411)*x_ref[0]+(-0.339891263613)*x_ref[1]**o+(0.859989056027)*x_ref[1]
-        ref[3,1,0]=(-0.906193851712)*x_ref[0]**o+(-0.330178132059)*x_ref[0]+(-0.48035114847)*x_ref[1]**o+(-0.48050067188)*x_ref[1]
-        ref[3,1,1]=(0.922778761752)*x_ref[0]**o+(0.899145572602)*x_ref[0]+(-0.991922151176)*x_ref[1]**o+(0.615744852656)*x_ref[1]
-        ref[4,0,0]=(0.457092295352)*x_ref[0]**o+(-0.120904430848)*x_ref[0]+(0.575186782188)*x_ref[1]**o+(-0.685522788659)*x_ref[1]
-        ref[4,0,1]=(0.254934861907)*x_ref[0]**o+(-0.208850206761)*x_ref[0]+(-0.0933987467304)*x_ref[1]**o+(0.687715419212)*x_ref[1]
-        ref[4,1,0]=(0.483890412252)*x_ref[0]**o+(-0.192055355216)*x_ref[0]+(0.0891595367214)*x_ref[1]**o+(-0.835900121805)*x_ref[1]
-        ref[4,1,1]=(-0.281109655935)*x_ref[0]**o+(0.279867178407)*x_ref[0]+(0.843094337157)*x_ref[1]**o+(-0.457583293166)*x_ref[1]
-        ref[5,0,0]=(0.595078633674)*x_ref[0]**o+(-0.994652086537)*x_ref[0]+(0.111354924733)*x_ref[1]**o+(0.715580298167)*x_ref[1]
-        ref[5,0,1]=(0.823409068766)*x_ref[0]**o+(0.41047089933)*x_ref[0]+(-0.610763277348)*x_ref[1]**o+(0.0991108428868)*x_ref[1]
-        ref[5,1,0]=(-0.0291539407811)*x_ref[0]**o+(0.371799932333)*x_ref[0]+(0.631702366805)*x_ref[1]**o+(-0.858415923309)*x_ref[1]
-        ref[5,1,1]=(-0.636146064991)*x_ref[0]**o+(0.407248062196)*x_ref[0]+(-0.507069143933)*x_ref[1]**o+(-0.0509951705166)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.662043178282)*x[0]**o+(0.600130780119)*x[0]+(-0.52233323628)*x[1]**o+(-0.463302513654)*x[1]+(0.714996279403)*x[2]**o+(0.113219137203)*x[2]
-        arg[0,0,1]=(0.94317347224)*x[0]**o+(0.987584533548)*x[0]+(0.116577593127)*x[1]**o+(-0.515267022711)*x[1]+(0.856578953903)*x[2]**o+(0.70372338917)*x[2]
-        arg[0,1,0]=(-0.405265998966)*x[0]**o+(-0.656404120416)*x[0]+(0.270655604701)*x[1]**o+(0.0638534875176)*x[1]+(0.816834973788)*x[2]**o+(0.918436000225)*x[2]
-        arg[0,1,1]=(-0.37299950332)*x[0]**o+(-0.0367737761004)*x[0]+(0.176531372245)*x[1]**o+(0.849773143988)*x[1]+(-0.572911529869)*x[2]**o+(-0.140163625628)*x[2]
-        arg[1,0,0]=(0.263616091516)*x[0]**o+(-0.65550051998)*x[0]+(-0.118310211881)*x[1]**o+(-0.695263983587)*x[1]+(-0.49011649182)*x[2]**o+(-0.553284002669)*x[2]
-        arg[1,0,1]=(0.859640205193)*x[0]**o+(-0.569681205214)*x[0]+(0.459979003108)*x[1]**o+(0.672561515814)*x[1]+(-0.854289983441)*x[2]**o+(-0.445344129294)*x[2]
-        arg[1,1,0]=(-0.904355809101)*x[0]**o+(0.540513356972)*x[0]+(-0.377422260181)*x[1]**o+(0.937285151058)*x[1]+(0.148943597435)*x[2]**o+(0.992256197076)*x[2]
-        arg[1,1,1]=(-0.868336238952)*x[0]**o+(-0.713337888363)*x[0]+(0.800427728006)*x[1]**o+(-0.83502690568)*x[1]+(0.365707922084)*x[2]**o+(0.218740577318)*x[2]
-        arg[2,0,0]=(-0.0382672594668)*x[0]**o+(0.463831755073)*x[0]+(-0.104957678792)*x[1]**o+(-0.561738607653)*x[1]+(-0.660128314406)*x[2]**o+(0.594649133189)*x[2]
-        arg[2,0,1]=(-0.399297921751)*x[0]**o+(0.550876554224)*x[0]+(0.150599666563)*x[1]**o+(-0.748400310268)*x[1]+(0.658318134651)*x[2]**o+(0.49075091442)*x[2]
-        arg[2,1,0]=(-0.393769876286)*x[0]**o+(0.328125610064)*x[0]+(-0.703385111404)*x[1]**o+(0.0418077854723)*x[1]+(0.918774663106)*x[2]**o+(-0.119085951508)*x[2]
-        arg[2,1,1]=(-0.549250924758)*x[0]**o+(0.169148558793)*x[0]+(0.664162931811)*x[1]**o+(0.207136816188)*x[1]+(-0.17207817969)*x[2]**o+(0.34258020774)*x[2]
-        arg[3,0,0]=(0.446467472517)*x[0]**o+(-0.358128380843)*x[0]+(0.146916048359)*x[1]**o+(-0.606692124285)*x[1]+(0.828655704727)*x[2]**o+(0.067139299396)*x[2]
-        arg[3,0,1]=(-0.357052242351)*x[0]**o+(-0.528255164843)*x[0]+(0.140204673142)*x[1]**o+(0.674282235672)*x[1]+(-0.469118454039)*x[2]**o+(0.388103121466)*x[2]
-        arg[3,1,0]=(-0.359629791333)*x[0]**o+(-0.625108929158)*x[0]+(0.855034791748)*x[1]**o+(-0.343451063341)*x[1]+(-0.681557972105)*x[2]**o+(0.576310870238)*x[2]
-        arg[3,1,1]=(0.00546530278132)*x[0]**o+(0.359221089344)*x[0]+(-0.57416247885)*x[1]**o+(-0.521306138323)*x[1]+(-0.618281954095)*x[2]**o+(-0.862162207352)*x[2]
-        arg[4,0,0]=(-0.196356423488)*x[0]**o+(-0.871482508533)*x[0]+(-0.367390886081)*x[1]**o+(0.580310108591)*x[1]+(0.857970671482)*x[2]**o+(0.123685673359)*x[2]
-        arg[4,0,1]=(0.715104674022)*x[0]**o+(-0.00444438628932)*x[0]+(0.538883210054)*x[1]**o+(0.179340705463)*x[1]+(-0.605249436909)*x[2]**o+(-0.744253826562)*x[2]
-        arg[4,1,0]=(-0.315453893647)*x[0]**o+(-0.560946546082)*x[0]+(-0.674448928458)*x[1]**o+(-0.510243444449)*x[1]+(0.592615876779)*x[2]**o+(0.218024801263)*x[2]
-        arg[4,1,1]=(-0.46902473326)*x[0]**o+(-0.573926691452)*x[0]+(0.827898114814)*x[1]**o+(-0.644208082857)*x[1]+(-0.956169254426)*x[2]**o+(-0.297101737561)*x[2]
-        arg[5,0,0]=(0.45818164662)*x[0]**o+(0.219667021464)*x[0]+(-0.453125753418)*x[1]**o+(-0.201214929832)*x[1]+(0.135363067088)*x[2]**o+(0.850636247323)*x[2]
-        arg[5,0,1]=(0.296120304926)*x[0]**o+(-0.139971296351)*x[0]+(0.448115780401)*x[1]**o+(-0.300602343399)*x[1]+(-0.165568753274)*x[2]**o+(0.984788641639)*x[2]
-        arg[5,1,0]=(0.321875942152)*x[0]**o+(-0.403122417353)*x[0]+(-0.148664639927)*x[1]**o+(0.644143662303)*x[1]+(-0.718311175542)*x[2]**o+(-0.850248996913)*x[2]
-        arg[5,1,1]=(0.44869757406)*x[0]**o+(0.0292094503086)*x[0]+(-0.159644215279)*x[1]**o+(0.695976060359)*x[1]+(-0.221444458713)*x[2]**o+(-0.42974111206)*x[2]
-        ref[0,0,0]=(-0.662043178282)*x_ref[0]**o+(0.600130780119)*x_ref[0]+(-0.52233323628)*x_ref[1]**o+(-0.463302513654)*x_ref[1]+(0.714996279403)*x_ref[2]**o+(0.113219137203)*x_ref[2]
-        ref[0,0,1]=(0.94317347224)*x_ref[0]**o+(0.987584533548)*x_ref[0]+(0.116577593127)*x_ref[1]**o+(-0.515267022711)*x_ref[1]+(0.856578953903)*x_ref[2]**o+(0.70372338917)*x_ref[2]
-        ref[0,1,0]=(-0.405265998966)*x_ref[0]**o+(-0.656404120416)*x_ref[0]+(0.270655604701)*x_ref[1]**o+(0.0638534875176)*x_ref[1]+(0.816834973788)*x_ref[2]**o+(0.918436000225)*x_ref[2]
-        ref[0,1,1]=(-0.37299950332)*x_ref[0]**o+(-0.0367737761004)*x_ref[0]+(0.176531372245)*x_ref[1]**o+(0.849773143988)*x_ref[1]+(-0.572911529869)*x_ref[2]**o+(-0.140163625628)*x_ref[2]
-        ref[1,0,0]=(0.263616091516)*x_ref[0]**o+(-0.65550051998)*x_ref[0]+(-0.118310211881)*x_ref[1]**o+(-0.695263983587)*x_ref[1]+(-0.49011649182)*x_ref[2]**o+(-0.553284002669)*x_ref[2]
-        ref[1,0,1]=(0.859640205193)*x_ref[0]**o+(-0.569681205214)*x_ref[0]+(0.459979003108)*x_ref[1]**o+(0.672561515814)*x_ref[1]+(-0.854289983441)*x_ref[2]**o+(-0.445344129294)*x_ref[2]
-        ref[1,1,0]=(-0.904355809101)*x_ref[0]**o+(0.540513356972)*x_ref[0]+(-0.377422260181)*x_ref[1]**o+(0.937285151058)*x_ref[1]+(0.148943597435)*x_ref[2]**o+(0.992256197076)*x_ref[2]
-        ref[1,1,1]=(-0.868336238952)*x_ref[0]**o+(-0.713337888363)*x_ref[0]+(0.800427728006)*x_ref[1]**o+(-0.83502690568)*x_ref[1]+(0.365707922084)*x_ref[2]**o+(0.218740577318)*x_ref[2]
-        ref[2,0,0]=(-0.0382672594668)*x_ref[0]**o+(0.463831755073)*x_ref[0]+(-0.104957678792)*x_ref[1]**o+(-0.561738607653)*x_ref[1]+(-0.660128314406)*x_ref[2]**o+(0.594649133189)*x_ref[2]
-        ref[2,0,1]=(-0.399297921751)*x_ref[0]**o+(0.550876554224)*x_ref[0]+(0.150599666563)*x_ref[1]**o+(-0.748400310268)*x_ref[1]+(0.658318134651)*x_ref[2]**o+(0.49075091442)*x_ref[2]
-        ref[2,1,0]=(-0.393769876286)*x_ref[0]**o+(0.328125610064)*x_ref[0]+(-0.703385111404)*x_ref[1]**o+(0.0418077854723)*x_ref[1]+(0.918774663106)*x_ref[2]**o+(-0.119085951508)*x_ref[2]
-        ref[2,1,1]=(-0.549250924758)*x_ref[0]**o+(0.169148558793)*x_ref[0]+(0.664162931811)*x_ref[1]**o+(0.207136816188)*x_ref[1]+(-0.17207817969)*x_ref[2]**o+(0.34258020774)*x_ref[2]
-        ref[3,0,0]=(0.446467472517)*x_ref[0]**o+(-0.358128380843)*x_ref[0]+(0.146916048359)*x_ref[1]**o+(-0.606692124285)*x_ref[1]+(0.828655704727)*x_ref[2]**o+(0.067139299396)*x_ref[2]
-        ref[3,0,1]=(-0.357052242351)*x_ref[0]**o+(-0.528255164843)*x_ref[0]+(0.140204673142)*x_ref[1]**o+(0.674282235672)*x_ref[1]+(-0.469118454039)*x_ref[2]**o+(0.388103121466)*x_ref[2]
-        ref[3,1,0]=(-0.359629791333)*x_ref[0]**o+(-0.625108929158)*x_ref[0]+(0.855034791748)*x_ref[1]**o+(-0.343451063341)*x_ref[1]+(-0.681557972105)*x_ref[2]**o+(0.576310870238)*x_ref[2]
-        ref[3,1,1]=(0.00546530278132)*x_ref[0]**o+(0.359221089344)*x_ref[0]+(-0.57416247885)*x_ref[1]**o+(-0.521306138323)*x_ref[1]+(-0.618281954095)*x_ref[2]**o+(-0.862162207352)*x_ref[2]
-        ref[4,0,0]=(-0.196356423488)*x_ref[0]**o+(-0.871482508533)*x_ref[0]+(-0.367390886081)*x_ref[1]**o+(0.580310108591)*x_ref[1]+(0.857970671482)*x_ref[2]**o+(0.123685673359)*x_ref[2]
-        ref[4,0,1]=(0.715104674022)*x_ref[0]**o+(-0.00444438628932)*x_ref[0]+(0.538883210054)*x_ref[1]**o+(0.179340705463)*x_ref[1]+(-0.605249436909)*x_ref[2]**o+(-0.744253826562)*x_ref[2]
-        ref[4,1,0]=(-0.315453893647)*x_ref[0]**o+(-0.560946546082)*x_ref[0]+(-0.674448928458)*x_ref[1]**o+(-0.510243444449)*x_ref[1]+(0.592615876779)*x_ref[2]**o+(0.218024801263)*x_ref[2]
-        ref[4,1,1]=(-0.46902473326)*x_ref[0]**o+(-0.573926691452)*x_ref[0]+(0.827898114814)*x_ref[1]**o+(-0.644208082857)*x_ref[1]+(-0.956169254426)*x_ref[2]**o+(-0.297101737561)*x_ref[2]
-        ref[5,0,0]=(0.45818164662)*x_ref[0]**o+(0.219667021464)*x_ref[0]+(-0.453125753418)*x_ref[1]**o+(-0.201214929832)*x_ref[1]+(0.135363067088)*x_ref[2]**o+(0.850636247323)*x_ref[2]
-        ref[5,0,1]=(0.296120304926)*x_ref[0]**o+(-0.139971296351)*x_ref[0]+(0.448115780401)*x_ref[1]**o+(-0.300602343399)*x_ref[1]+(-0.165568753274)*x_ref[2]**o+(0.984788641639)*x_ref[2]
-        ref[5,1,0]=(0.321875942152)*x_ref[0]**o+(-0.403122417353)*x_ref[0]+(-0.148664639927)*x_ref[1]**o+(0.644143662303)*x_ref[1]+(-0.718311175542)*x_ref[2]**o+(-0.850248996913)*x_ref[2]
-        ref[5,1,1]=(0.44869757406)*x_ref[0]**o+(0.0292094503086)*x_ref[0]+(-0.159644215279)*x_ref[1]**o+(0.695976060359)*x_ref[1]+(-0.221444458713)*x_ref[2]**o+(-0.42974111206)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunction_fromData_Function_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Function
-
-      assumptions: self.domain supports inpterpolation from Function onto Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Function(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.0737428272134)*x[0]**o+(0.841780036645)*x[0]+(-0.110824257531)*x[1]**o+(-0.957726444468)*x[1]
-        arg[0,0,0,1]=(-0.934840410671)*x[0]**o+(-0.83301064321)*x[0]+(-0.352287650266)*x[1]**o+(-0.961111564077)*x[1]
-        arg[0,0,1,0]=(-0.829500940226)*x[0]**o+(0.644171710931)*x[0]+(0.232545739722)*x[1]**o+(0.584336012862)*x[1]
-        arg[0,0,1,1]=(0.426298830976)*x[0]**o+(-0.615281197268)*x[0]+(0.206334026192)*x[1]**o+(-0.443698947044)*x[1]
-        arg[0,0,2,0]=(-0.236495891617)*x[0]**o+(0.0883376851179)*x[0]+(-0.176541434356)*x[1]**o+(0.297175301617)*x[1]
-        arg[0,0,2,1]=(-0.879955324373)*x[0]**o+(-0.244778913771)*x[0]+(0.244131188594)*x[1]**o+(-0.334739112198)*x[1]
-        arg[0,1,0,0]=(-0.64887128006)*x[0]**o+(-0.489951454377)*x[0]+(-0.328402433668)*x[1]**o+(0.229814237117)*x[1]
-        arg[0,1,0,1]=(-0.339451656097)*x[0]**o+(-0.409320682304)*x[0]+(0.216482338677)*x[1]**o+(-0.10594373055)*x[1]
-        arg[0,1,1,0]=(-0.350538479425)*x[0]**o+(0.466450046985)*x[0]+(-0.779124795292)*x[1]**o+(-0.654562596704)*x[1]
-        arg[0,1,1,1]=(0.00350092879868)*x[0]**o+(-0.214643088647)*x[0]+(0.786934081411)*x[1]**o+(-0.296853380043)*x[1]
-        arg[0,1,2,0]=(-0.640183955648)*x[0]**o+(0.568647968237)*x[0]+(0.575533476901)*x[1]**o+(0.854540594085)*x[1]
-        arg[0,1,2,1]=(0.633674899518)*x[0]**o+(0.829255679443)*x[0]+(0.537888424303)*x[1]**o+(-0.495082587617)*x[1]
-        arg[0,2,0,0]=(-0.700436798342)*x[0]**o+(-0.732581859026)*x[0]+(-0.508905353053)*x[1]**o+(0.664601151676)*x[1]
-        arg[0,2,0,1]=(0.720335764302)*x[0]**o+(0.941159917988)*x[0]+(0.2817440547)*x[1]**o+(0.553712160058)*x[1]
-        arg[0,2,1,0]=(-0.937114312262)*x[0]**o+(-0.115517396201)*x[0]+(-0.672697125905)*x[1]**o+(-0.221320095369)*x[1]
-        arg[0,2,1,1]=(-0.52059341062)*x[0]**o+(-0.653834647475)*x[0]+(-0.0851100861135)*x[1]**o+(-0.668300210067)*x[1]
-        arg[0,2,2,0]=(-0.943613035509)*x[0]**o+(-0.294843145822)*x[0]+(0.496278748831)*x[1]**o+(0.901154419425)*x[1]
-        arg[0,2,2,1]=(-0.421698818203)*x[0]**o+(-0.721918177544)*x[0]+(-0.197855702215)*x[1]**o+(0.50882827715)*x[1]
-        arg[0,3,0,0]=(0.931990780298)*x[0]**o+(-0.550332606951)*x[0]+(0.401584654642)*x[1]**o+(0.0965259747601)*x[1]
-        arg[0,3,0,1]=(0.881357708445)*x[0]**o+(0.564624034197)*x[0]+(-0.458191897924)*x[1]**o+(-0.427701112807)*x[1]
-        arg[0,3,1,0]=(0.624777088081)*x[0]**o+(0.862654721208)*x[0]+(-0.707618093268)*x[1]**o+(0.743304953313)*x[1]
-        arg[0,3,1,1]=(0.4510836974)*x[0]**o+(-0.357023031453)*x[0]+(-0.00503924010273)*x[1]**o+(0.545024336011)*x[1]
-        arg[0,3,2,0]=(0.109003851094)*x[0]**o+(0.168659376881)*x[0]+(-0.0578953780655)*x[1]**o+(-0.481212462712)*x[1]
-        arg[0,3,2,1]=(-0.191183501636)*x[0]**o+(-0.316145516377)*x[0]+(0.402460103016)*x[1]**o+(-0.163612464438)*x[1]
-        arg[0,4,0,0]=(0.489815345033)*x[0]**o+(0.999138280765)*x[0]+(-0.626627766812)*x[1]**o+(-0.339653992568)*x[1]
-        arg[0,4,0,1]=(0.616350228791)*x[0]**o+(0.933446438765)*x[0]+(0.944244035512)*x[1]**o+(0.829407789353)*x[1]
-        arg[0,4,1,0]=(0.619918547863)*x[0]**o+(0.995488719729)*x[0]+(-0.78847429581)*x[1]**o+(0.542645674462)*x[1]
-        arg[0,4,1,1]=(-0.149244819992)*x[0]**o+(0.921766299925)*x[0]+(0.435255339567)*x[1]**o+(-0.0596561300741)*x[1]
-        arg[0,4,2,0]=(-0.816364336598)*x[0]**o+(0.701160246658)*x[0]+(-0.616385505652)*x[1]**o+(-0.558625482105)*x[1]
-        arg[0,4,2,1]=(-0.36944364693)*x[0]**o+(0.243426977623)*x[0]+(-0.61578435391)*x[1]**o+(0.932570326139)*x[1]
-        arg[1,0,0,0]=(-0.36839962807)*x[0]**o+(0.590534439534)*x[0]+(-0.615158899289)*x[1]**o+(0.973649158296)*x[1]
-        arg[1,0,0,1]=(0.761515772771)*x[0]**o+(0.706406307012)*x[0]+(0.328712319043)*x[1]**o+(0.438600140517)*x[1]
-        arg[1,0,1,0]=(0.895080579207)*x[0]**o+(-0.166789328225)*x[0]+(0.807540897371)*x[1]**o+(0.0345522692723)*x[1]
-        arg[1,0,1,1]=(-0.460062661172)*x[0]**o+(0.505167337562)*x[0]+(0.25155527144)*x[1]**o+(0.601093887451)*x[1]
-        arg[1,0,2,0]=(0.382129818527)*x[0]**o+(0.694676536542)*x[0]+(0.702794119083)*x[1]**o+(0.704094013056)*x[1]
-        arg[1,0,2,1]=(0.265476982913)*x[0]**o+(-0.134338744881)*x[0]+(-0.0938910335356)*x[1]**o+(-0.560073316097)*x[1]
-        arg[1,1,0,0]=(0.977368328792)*x[0]**o+(0.084482890741)*x[0]+(0.57068389287)*x[1]**o+(-0.242087071526)*x[1]
-        arg[1,1,0,1]=(-0.36067775897)*x[0]**o+(0.768187470286)*x[0]+(-0.881150642619)*x[1]**o+(-0.15839498619)*x[1]
-        arg[1,1,1,0]=(-0.808263913645)*x[0]**o+(0.788403321664)*x[0]+(0.976206012343)*x[1]**o+(-0.636933353579)*x[1]
-        arg[1,1,1,1]=(0.699185445546)*x[0]**o+(0.251811206876)*x[0]+(-0.146320762812)*x[1]**o+(-0.248033048423)*x[1]
-        arg[1,1,2,0]=(-0.782940880812)*x[0]**o+(0.789401686528)*x[0]+(-0.806883904562)*x[1]**o+(0.83689696772)*x[1]
-        arg[1,1,2,1]=(0.652404993342)*x[0]**o+(-0.135318598212)*x[0]+(0.138928760301)*x[1]**o+(0.675593554805)*x[1]
-        arg[1,2,0,0]=(0.471746379585)*x[0]**o+(-0.989783415847)*x[0]+(-0.0935052296418)*x[1]**o+(-0.532245102898)*x[1]
-        arg[1,2,0,1]=(-0.44541059979)*x[0]**o+(0.593734266824)*x[0]+(-0.616647011751)*x[1]**o+(0.461140297024)*x[1]
-        arg[1,2,1,0]=(-0.9144210459)*x[0]**o+(0.116806032197)*x[0]+(0.935610395306)*x[1]**o+(0.550884822213)*x[1]
-        arg[1,2,1,1]=(-0.962444455944)*x[0]**o+(-0.654328013652)*x[0]+(-0.545330994236)*x[1]**o+(-0.919705456162)*x[1]
-        arg[1,2,2,0]=(-0.724491374462)*x[0]**o+(-0.820402375498)*x[0]+(-0.953956431336)*x[1]**o+(-0.201450523182)*x[1]
-        arg[1,2,2,1]=(0.723637497881)*x[0]**o+(-0.144483238523)*x[0]+(0.00379745988102)*x[1]**o+(-0.838616087543)*x[1]
-        arg[1,3,0,0]=(-0.962256046042)*x[0]**o+(-0.453580322779)*x[0]+(0.887446007424)*x[1]**o+(-0.404454768131)*x[1]
-        arg[1,3,0,1]=(0.829189872775)*x[0]**o+(0.327985850399)*x[0]+(0.113600094307)*x[1]**o+(-0.338775377551)*x[1]
-        arg[1,3,1,0]=(0.912320027833)*x[0]**o+(0.0658152563951)*x[0]+(-0.843491517568)*x[1]**o+(0.858344434434)*x[1]
-        arg[1,3,1,1]=(-0.133918678317)*x[0]**o+(0.644272729149)*x[0]+(0.140663927965)*x[1]**o+(0.853385355163)*x[1]
-        arg[1,3,2,0]=(0.37733357322)*x[0]**o+(0.255105934063)*x[0]+(0.88881892183)*x[1]**o+(-0.722661948279)*x[1]
-        arg[1,3,2,1]=(-0.2827466345)*x[0]**o+(-0.518815029512)*x[0]+(-0.995043824929)*x[1]**o+(0.973473354481)*x[1]
-        arg[1,4,0,0]=(0.044904732821)*x[0]**o+(-0.0373604593083)*x[0]+(0.184254626748)*x[1]**o+(0.031832590233)*x[1]
-        arg[1,4,0,1]=(0.388699053911)*x[0]**o+(-0.0619606394414)*x[0]+(0.477947819745)*x[1]**o+(0.982909216221)*x[1]
-        arg[1,4,1,0]=(0.854348679973)*x[0]**o+(-0.822052612379)*x[0]+(-0.950305089968)*x[1]**o+(0.0100277256384)*x[1]
-        arg[1,4,1,1]=(0.265075277179)*x[0]**o+(0.489846993407)*x[0]+(-0.961111499722)*x[1]**o+(-0.0457909055602)*x[1]
-        arg[1,4,2,0]=(0.701951191951)*x[0]**o+(0.675232620259)*x[0]+(-0.141848599227)*x[1]**o+(0.737150257564)*x[1]
-        arg[1,4,2,1]=(-0.450684564415)*x[0]**o+(0.854849922021)*x[0]+(0.729670746723)*x[1]**o+(0.530372628879)*x[1]
-        arg[2,0,0,0]=(-0.131153262675)*x[0]**o+(-0.477683407979)*x[0]+(0.231416752516)*x[1]**o+(0.790897064402)*x[1]
-        arg[2,0,0,1]=(0.0956557004382)*x[0]**o+(0.209084913471)*x[0]+(-0.328544695733)*x[1]**o+(0.701245770328)*x[1]
-        arg[2,0,1,0]=(-0.476403718361)*x[0]**o+(0.689023533158)*x[0]+(0.108732189071)*x[1]**o+(0.243379977453)*x[1]
-        arg[2,0,1,1]=(0.414917801157)*x[0]**o+(-0.843544596785)*x[0]+(0.772236792935)*x[1]**o+(0.836028831232)*x[1]
-        arg[2,0,2,0]=(0.754970600617)*x[0]**o+(-0.422318891122)*x[0]+(0.770767911534)*x[1]**o+(-0.446737894095)*x[1]
-        arg[2,0,2,1]=(0.0139989331471)*x[0]**o+(0.262286042291)*x[0]+(-0.440109329114)*x[1]**o+(-0.844965114722)*x[1]
-        arg[2,1,0,0]=(-0.758977153009)*x[0]**o+(-0.991192011039)*x[0]+(0.642267239475)*x[1]**o+(-0.701360491163)*x[1]
-        arg[2,1,0,1]=(-0.123019007509)*x[0]**o+(-0.622323252979)*x[0]+(0.441364031664)*x[1]**o+(0.311433222821)*x[1]
-        arg[2,1,1,0]=(-0.0446644182928)*x[0]**o+(0.614952704493)*x[0]+(-0.228284494629)*x[1]**o+(0.077603612991)*x[1]
-        arg[2,1,1,1]=(0.712924108225)*x[0]**o+(-0.153966300537)*x[0]+(-0.584450014127)*x[1]**o+(0.476329149833)*x[1]
-        arg[2,1,2,0]=(0.554026516037)*x[0]**o+(0.730575821847)*x[0]+(-0.247529915107)*x[1]**o+(0.210060454223)*x[1]
-        arg[2,1,2,1]=(0.877017208752)*x[0]**o+(-0.800916200997)*x[0]+(0.0996710064295)*x[1]**o+(-0.0890375735808)*x[1]
-        arg[2,2,0,0]=(-0.198026186062)*x[0]**o+(-0.416160224681)*x[0]+(-0.626491103997)*x[1]**o+(-0.950177752043)*x[1]
-        arg[2,2,0,1]=(-0.401319234479)*x[0]**o+(0.948120359627)*x[0]+(0.420351950404)*x[1]**o+(-0.242850312594)*x[1]
-        arg[2,2,1,0]=(-0.239652069063)*x[0]**o+(-0.894811076801)*x[0]+(0.979721413509)*x[1]**o+(-0.712493893566)*x[1]
-        arg[2,2,1,1]=(0.239416494209)*x[0]**o+(0.449047649538)*x[0]+(0.0503751073583)*x[1]**o+(0.739949331521)*x[1]
-        arg[2,2,2,0]=(-0.318067701034)*x[0]**o+(-0.00208209268356)*x[0]+(-0.513821624843)*x[1]**o+(-0.202688815501)*x[1]
-        arg[2,2,2,1]=(-0.194111524544)*x[0]**o+(-0.843213241929)*x[0]+(0.124223747087)*x[1]**o+(-0.988305059412)*x[1]
-        arg[2,3,0,0]=(0.450894655873)*x[0]**o+(-0.809351657482)*x[0]+(-0.80555128185)*x[1]**o+(-0.922123806508)*x[1]
-        arg[2,3,0,1]=(-0.462822602909)*x[0]**o+(0.504388766027)*x[0]+(-0.152725064915)*x[1]**o+(0.988745142638)*x[1]
-        arg[2,3,1,0]=(-0.717873944493)*x[0]**o+(0.987011714613)*x[0]+(0.908500737929)*x[1]**o+(0.612497707425)*x[1]
-        arg[2,3,1,1]=(0.221645363399)*x[0]**o+(0.219147687681)*x[0]+(-0.195831118343)*x[1]**o+(-0.59541920919)*x[1]
-        arg[2,3,2,0]=(-0.289487342206)*x[0]**o+(-0.96904981397)*x[0]+(-0.844880792969)*x[1]**o+(0.803145388038)*x[1]
-        arg[2,3,2,1]=(-0.0234295826132)*x[0]**o+(-0.839069887016)*x[0]+(0.591231341444)*x[1]**o+(-0.678605318787)*x[1]
-        arg[2,4,0,0]=(0.717943320641)*x[0]**o+(0.625728011485)*x[0]+(0.456836257053)*x[1]**o+(-0.00523685585287)*x[1]
-        arg[2,4,0,1]=(-0.549526374185)*x[0]**o+(0.57441917876)*x[0]+(-0.913459106781)*x[1]**o+(-0.610369375195)*x[1]
-        arg[2,4,1,0]=(-0.27166563459)*x[0]**o+(0.146710581194)*x[0]+(0.297934124718)*x[1]**o+(0.989561209048)*x[1]
-        arg[2,4,1,1]=(-0.0973858709778)*x[0]**o+(-0.909133394381)*x[0]+(0.634182571287)*x[1]**o+(0.477163052831)*x[1]
-        arg[2,4,2,0]=(0.0878998038301)*x[0]**o+(-0.90568487021)*x[0]+(0.798978355456)*x[1]**o+(0.977402478037)*x[1]
-        arg[2,4,2,1]=(-0.456868538667)*x[0]**o+(0.0723272702119)*x[0]+(0.143461337462)*x[1]**o+(-0.923713568343)*x[1]
-        arg[3,0,0,0]=(-0.154410689788)*x[0]**o+(0.634925838303)*x[0]+(-0.0508765762892)*x[1]**o+(-0.889731180834)*x[1]
-        arg[3,0,0,1]=(-0.611336323518)*x[0]**o+(0.748058372943)*x[0]+(-0.395060568704)*x[1]**o+(-0.413772262434)*x[1]
-        arg[3,0,1,0]=(-0.76924573047)*x[0]**o+(0.61286303551)*x[0]+(0.810883211884)*x[1]**o+(-0.908861022244)*x[1]
-        arg[3,0,1,1]=(0.269999661235)*x[0]**o+(0.0330954575695)*x[0]+(0.560272546054)*x[1]**o+(0.877730763728)*x[1]
-        arg[3,0,2,0]=(-0.617658215856)*x[0]**o+(0.758414649277)*x[0]+(-0.223497113863)*x[1]**o+(-0.0706589108357)*x[1]
-        arg[3,0,2,1]=(0.47956571804)*x[0]**o+(0.938375191345)*x[0]+(-0.193997511219)*x[1]**o+(0.500063249143)*x[1]
-        arg[3,1,0,0]=(0.994033773649)*x[0]**o+(0.203022945646)*x[0]+(0.439296640709)*x[1]**o+(0.283679657893)*x[1]
-        arg[3,1,0,1]=(0.32495149734)*x[0]**o+(-0.871627347694)*x[0]+(-0.438159387872)*x[1]**o+(0.169112665588)*x[1]
-        arg[3,1,1,0]=(-0.0979322945554)*x[0]**o+(-0.936928842822)*x[0]+(0.0402738011011)*x[1]**o+(-0.445031618539)*x[1]
-        arg[3,1,1,1]=(-0.511218949907)*x[0]**o+(0.255146779315)*x[0]+(-0.802012163396)*x[1]**o+(0.361819705056)*x[1]
-        arg[3,1,2,0]=(-0.902499203011)*x[0]**o+(0.76589952141)*x[0]+(0.52498929732)*x[1]**o+(0.493894292321)*x[1]
-        arg[3,1,2,1]=(-0.475117609018)*x[0]**o+(0.682205309303)*x[0]+(-0.661824086649)*x[1]**o+(0.985521553774)*x[1]
-        arg[3,2,0,0]=(0.937321686473)*x[0]**o+(-0.518305775925)*x[0]+(0.171689574942)*x[1]**o+(-0.751579960819)*x[1]
-        arg[3,2,0,1]=(-0.607004597985)*x[0]**o+(0.342330208344)*x[0]+(0.692094243326)*x[1]**o+(-0.457756057357)*x[1]
-        arg[3,2,1,0]=(0.126171621354)*x[0]**o+(0.0499938423847)*x[0]+(0.572006209576)*x[1]**o+(0.121601182464)*x[1]
-        arg[3,2,1,1]=(0.337936456181)*x[0]**o+(-0.940186907514)*x[0]+(-0.965354931124)*x[1]**o+(-0.0503295532873)*x[1]
-        arg[3,2,2,0]=(0.439590816231)*x[0]**o+(-0.145314466072)*x[0]+(-0.847175364201)*x[1]**o+(-0.570000251495)*x[1]
-        arg[3,2,2,1]=(0.401069335123)*x[0]**o+(-0.117139167508)*x[0]+(0.192907527853)*x[1]**o+(0.573283391581)*x[1]
-        arg[3,3,0,0]=(-0.434029411666)*x[0]**o+(-0.689115317009)*x[0]+(0.63450218888)*x[1]**o+(0.492858023519)*x[1]
-        arg[3,3,0,1]=(-0.678722283369)*x[0]**o+(-0.62031826393)*x[0]+(-0.458646022327)*x[1]**o+(-0.650857410927)*x[1]
-        arg[3,3,1,0]=(0.413477874719)*x[0]**o+(-0.903116096879)*x[0]+(-0.505961511722)*x[1]**o+(0.649554735459)*x[1]
-        arg[3,3,1,1]=(-0.58459645458)*x[0]**o+(0.861318565628)*x[0]+(0.378511063123)*x[1]**o+(-0.694820011654)*x[1]
-        arg[3,3,2,0]=(0.82844733258)*x[0]**o+(-0.151929131446)*x[0]+(0.322848411081)*x[1]**o+(0.436062233263)*x[1]
-        arg[3,3,2,1]=(0.269627291792)*x[0]**o+(0.618140998132)*x[0]+(0.851057431407)*x[1]**o+(0.716088832502)*x[1]
-        arg[3,4,0,0]=(0.0557605432613)*x[0]**o+(0.0689569775656)*x[0]+(0.489781121774)*x[1]**o+(0.214459998733)*x[1]
-        arg[3,4,0,1]=(0.429111134289)*x[0]**o+(0.648324951051)*x[0]+(0.00596799425797)*x[1]**o+(-0.752637714965)*x[1]
-        arg[3,4,1,0]=(-0.0394648097179)*x[0]**o+(0.842965554058)*x[0]+(-0.124493160479)*x[1]**o+(0.81914053244)*x[1]
-        arg[3,4,1,1]=(0.309465325874)*x[0]**o+(0.631381272937)*x[0]+(-0.164415508845)*x[1]**o+(0.316908911599)*x[1]
-        arg[3,4,2,0]=(-0.615108314792)*x[0]**o+(0.300936829452)*x[0]+(-0.289514252333)*x[1]**o+(0.844949030767)*x[1]
-        arg[3,4,2,1]=(0.80117516909)*x[0]**o+(-0.602632221639)*x[0]+(-0.68193581457)*x[1]**o+(0.203319693067)*x[1]
-        ref[0,0,0,0]=(0.0737428272134)*x_ref[0]**o+(0.841780036645)*x_ref[0]+(-0.110824257531)*x_ref[1]**o+(-0.957726444468)*x_ref[1]
-        ref[0,0,0,1]=(-0.934840410671)*x_ref[0]**o+(-0.83301064321)*x_ref[0]+(-0.352287650266)*x_ref[1]**o+(-0.961111564077)*x_ref[1]
-        ref[0,0,1,0]=(-0.829500940226)*x_ref[0]**o+(0.644171710931)*x_ref[0]+(0.232545739722)*x_ref[1]**o+(0.584336012862)*x_ref[1]
-        ref[0,0,1,1]=(0.426298830976)*x_ref[0]**o+(-0.615281197268)*x_ref[0]+(0.206334026192)*x_ref[1]**o+(-0.443698947044)*x_ref[1]
-        ref[0,0,2,0]=(-0.236495891617)*x_ref[0]**o+(0.0883376851179)*x_ref[0]+(-0.176541434356)*x_ref[1]**o+(0.297175301617)*x_ref[1]
-        ref[0,0,2,1]=(-0.879955324373)*x_ref[0]**o+(-0.244778913771)*x_ref[0]+(0.244131188594)*x_ref[1]**o+(-0.334739112198)*x_ref[1]
-        ref[0,1,0,0]=(-0.64887128006)*x_ref[0]**o+(-0.489951454377)*x_ref[0]+(-0.328402433668)*x_ref[1]**o+(0.229814237117)*x_ref[1]
-        ref[0,1,0,1]=(-0.339451656097)*x_ref[0]**o+(-0.409320682304)*x_ref[0]+(0.216482338677)*x_ref[1]**o+(-0.10594373055)*x_ref[1]
-        ref[0,1,1,0]=(-0.350538479425)*x_ref[0]**o+(0.466450046985)*x_ref[0]+(-0.779124795292)*x_ref[1]**o+(-0.654562596704)*x_ref[1]
-        ref[0,1,1,1]=(0.00350092879868)*x_ref[0]**o+(-0.214643088647)*x_ref[0]+(0.786934081411)*x_ref[1]**o+(-0.296853380043)*x_ref[1]
-        ref[0,1,2,0]=(-0.640183955648)*x_ref[0]**o+(0.568647968237)*x_ref[0]+(0.575533476901)*x_ref[1]**o+(0.854540594085)*x_ref[1]
-        ref[0,1,2,1]=(0.633674899518)*x_ref[0]**o+(0.829255679443)*x_ref[0]+(0.537888424303)*x_ref[1]**o+(-0.495082587617)*x_ref[1]
-        ref[0,2,0,0]=(-0.700436798342)*x_ref[0]**o+(-0.732581859026)*x_ref[0]+(-0.508905353053)*x_ref[1]**o+(0.664601151676)*x_ref[1]
-        ref[0,2,0,1]=(0.720335764302)*x_ref[0]**o+(0.941159917988)*x_ref[0]+(0.2817440547)*x_ref[1]**o+(0.553712160058)*x_ref[1]
-        ref[0,2,1,0]=(-0.937114312262)*x_ref[0]**o+(-0.115517396201)*x_ref[0]+(-0.672697125905)*x_ref[1]**o+(-0.221320095369)*x_ref[1]
-        ref[0,2,1,1]=(-0.52059341062)*x_ref[0]**o+(-0.653834647475)*x_ref[0]+(-0.0851100861135)*x_ref[1]**o+(-0.668300210067)*x_ref[1]
-        ref[0,2,2,0]=(-0.943613035509)*x_ref[0]**o+(-0.294843145822)*x_ref[0]+(0.496278748831)*x_ref[1]**o+(0.901154419425)*x_ref[1]
-        ref[0,2,2,1]=(-0.421698818203)*x_ref[0]**o+(-0.721918177544)*x_ref[0]+(-0.197855702215)*x_ref[1]**o+(0.50882827715)*x_ref[1]
-        ref[0,3,0,0]=(0.931990780298)*x_ref[0]**o+(-0.550332606951)*x_ref[0]+(0.401584654642)*x_ref[1]**o+(0.0965259747601)*x_ref[1]
-        ref[0,3,0,1]=(0.881357708445)*x_ref[0]**o+(0.564624034197)*x_ref[0]+(-0.458191897924)*x_ref[1]**o+(-0.427701112807)*x_ref[1]
-        ref[0,3,1,0]=(0.624777088081)*x_ref[0]**o+(0.862654721208)*x_ref[0]+(-0.707618093268)*x_ref[1]**o+(0.743304953313)*x_ref[1]
-        ref[0,3,1,1]=(0.4510836974)*x_ref[0]**o+(-0.357023031453)*x_ref[0]+(-0.00503924010273)*x_ref[1]**o+(0.545024336011)*x_ref[1]
-        ref[0,3,2,0]=(0.109003851094)*x_ref[0]**o+(0.168659376881)*x_ref[0]+(-0.0578953780655)*x_ref[1]**o+(-0.481212462712)*x_ref[1]
-        ref[0,3,2,1]=(-0.191183501636)*x_ref[0]**o+(-0.316145516377)*x_ref[0]+(0.402460103016)*x_ref[1]**o+(-0.163612464438)*x_ref[1]
-        ref[0,4,0,0]=(0.489815345033)*x_ref[0]**o+(0.999138280765)*x_ref[0]+(-0.626627766812)*x_ref[1]**o+(-0.339653992568)*x_ref[1]
-        ref[0,4,0,1]=(0.616350228791)*x_ref[0]**o+(0.933446438765)*x_ref[0]+(0.944244035512)*x_ref[1]**o+(0.829407789353)*x_ref[1]
-        ref[0,4,1,0]=(0.619918547863)*x_ref[0]**o+(0.995488719729)*x_ref[0]+(-0.78847429581)*x_ref[1]**o+(0.542645674462)*x_ref[1]
-        ref[0,4,1,1]=(-0.149244819992)*x_ref[0]**o+(0.921766299925)*x_ref[0]+(0.435255339567)*x_ref[1]**o+(-0.0596561300741)*x_ref[1]
-        ref[0,4,2,0]=(-0.816364336598)*x_ref[0]**o+(0.701160246658)*x_ref[0]+(-0.616385505652)*x_ref[1]**o+(-0.558625482105)*x_ref[1]
-        ref[0,4,2,1]=(-0.36944364693)*x_ref[0]**o+(0.243426977623)*x_ref[0]+(-0.61578435391)*x_ref[1]**o+(0.932570326139)*x_ref[1]
-        ref[1,0,0,0]=(-0.36839962807)*x_ref[0]**o+(0.590534439534)*x_ref[0]+(-0.615158899289)*x_ref[1]**o+(0.973649158296)*x_ref[1]
-        ref[1,0,0,1]=(0.761515772771)*x_ref[0]**o+(0.706406307012)*x_ref[0]+(0.328712319043)*x_ref[1]**o+(0.438600140517)*x_ref[1]
-        ref[1,0,1,0]=(0.895080579207)*x_ref[0]**o+(-0.166789328225)*x_ref[0]+(0.807540897371)*x_ref[1]**o+(0.0345522692723)*x_ref[1]
-        ref[1,0,1,1]=(-0.460062661172)*x_ref[0]**o+(0.505167337562)*x_ref[0]+(0.25155527144)*x_ref[1]**o+(0.601093887451)*x_ref[1]
-        ref[1,0,2,0]=(0.382129818527)*x_ref[0]**o+(0.694676536542)*x_ref[0]+(0.702794119083)*x_ref[1]**o+(0.704094013056)*x_ref[1]
-        ref[1,0,2,1]=(0.265476982913)*x_ref[0]**o+(-0.134338744881)*x_ref[0]+(-0.0938910335356)*x_ref[1]**o+(-0.560073316097)*x_ref[1]
-        ref[1,1,0,0]=(0.977368328792)*x_ref[0]**o+(0.084482890741)*x_ref[0]+(0.57068389287)*x_ref[1]**o+(-0.242087071526)*x_ref[1]
-        ref[1,1,0,1]=(-0.36067775897)*x_ref[0]**o+(0.768187470286)*x_ref[0]+(-0.881150642619)*x_ref[1]**o+(-0.15839498619)*x_ref[1]
-        ref[1,1,1,0]=(-0.808263913645)*x_ref[0]**o+(0.788403321664)*x_ref[0]+(0.976206012343)*x_ref[1]**o+(-0.636933353579)*x_ref[1]
-        ref[1,1,1,1]=(0.699185445546)*x_ref[0]**o+(0.251811206876)*x_ref[0]+(-0.146320762812)*x_ref[1]**o+(-0.248033048423)*x_ref[1]
-        ref[1,1,2,0]=(-0.782940880812)*x_ref[0]**o+(0.789401686528)*x_ref[0]+(-0.806883904562)*x_ref[1]**o+(0.83689696772)*x_ref[1]
-        ref[1,1,2,1]=(0.652404993342)*x_ref[0]**o+(-0.135318598212)*x_ref[0]+(0.138928760301)*x_ref[1]**o+(0.675593554805)*x_ref[1]
-        ref[1,2,0,0]=(0.471746379585)*x_ref[0]**o+(-0.989783415847)*x_ref[0]+(-0.0935052296418)*x_ref[1]**o+(-0.532245102898)*x_ref[1]
-        ref[1,2,0,1]=(-0.44541059979)*x_ref[0]**o+(0.593734266824)*x_ref[0]+(-0.616647011751)*x_ref[1]**o+(0.461140297024)*x_ref[1]
-        ref[1,2,1,0]=(-0.9144210459)*x_ref[0]**o+(0.116806032197)*x_ref[0]+(0.935610395306)*x_ref[1]**o+(0.550884822213)*x_ref[1]
-        ref[1,2,1,1]=(-0.962444455944)*x_ref[0]**o+(-0.654328013652)*x_ref[0]+(-0.545330994236)*x_ref[1]**o+(-0.919705456162)*x_ref[1]
-        ref[1,2,2,0]=(-0.724491374462)*x_ref[0]**o+(-0.820402375498)*x_ref[0]+(-0.953956431336)*x_ref[1]**o+(-0.201450523182)*x_ref[1]
-        ref[1,2,2,1]=(0.723637497881)*x_ref[0]**o+(-0.144483238523)*x_ref[0]+(0.00379745988102)*x_ref[1]**o+(-0.838616087543)*x_ref[1]
-        ref[1,3,0,0]=(-0.962256046042)*x_ref[0]**o+(-0.453580322779)*x_ref[0]+(0.887446007424)*x_ref[1]**o+(-0.404454768131)*x_ref[1]
-        ref[1,3,0,1]=(0.829189872775)*x_ref[0]**o+(0.327985850399)*x_ref[0]+(0.113600094307)*x_ref[1]**o+(-0.338775377551)*x_ref[1]
-        ref[1,3,1,0]=(0.912320027833)*x_ref[0]**o+(0.0658152563951)*x_ref[0]+(-0.843491517568)*x_ref[1]**o+(0.858344434434)*x_ref[1]
-        ref[1,3,1,1]=(-0.133918678317)*x_ref[0]**o+(0.644272729149)*x_ref[0]+(0.140663927965)*x_ref[1]**o+(0.853385355163)*x_ref[1]
-        ref[1,3,2,0]=(0.37733357322)*x_ref[0]**o+(0.255105934063)*x_ref[0]+(0.88881892183)*x_ref[1]**o+(-0.722661948279)*x_ref[1]
-        ref[1,3,2,1]=(-0.2827466345)*x_ref[0]**o+(-0.518815029512)*x_ref[0]+(-0.995043824929)*x_ref[1]**o+(0.973473354481)*x_ref[1]
-        ref[1,4,0,0]=(0.044904732821)*x_ref[0]**o+(-0.0373604593083)*x_ref[0]+(0.184254626748)*x_ref[1]**o+(0.031832590233)*x_ref[1]
-        ref[1,4,0,1]=(0.388699053911)*x_ref[0]**o+(-0.0619606394414)*x_ref[0]+(0.477947819745)*x_ref[1]**o+(0.982909216221)*x_ref[1]
-        ref[1,4,1,0]=(0.854348679973)*x_ref[0]**o+(-0.822052612379)*x_ref[0]+(-0.950305089968)*x_ref[1]**o+(0.0100277256384)*x_ref[1]
-        ref[1,4,1,1]=(0.265075277179)*x_ref[0]**o+(0.489846993407)*x_ref[0]+(-0.961111499722)*x_ref[1]**o+(-0.0457909055602)*x_ref[1]
-        ref[1,4,2,0]=(0.701951191951)*x_ref[0]**o+(0.675232620259)*x_ref[0]+(-0.141848599227)*x_ref[1]**o+(0.737150257564)*x_ref[1]
-        ref[1,4,2,1]=(-0.450684564415)*x_ref[0]**o+(0.854849922021)*x_ref[0]+(0.729670746723)*x_ref[1]**o+(0.530372628879)*x_ref[1]
-        ref[2,0,0,0]=(-0.131153262675)*x_ref[0]**o+(-0.477683407979)*x_ref[0]+(0.231416752516)*x_ref[1]**o+(0.790897064402)*x_ref[1]
-        ref[2,0,0,1]=(0.0956557004382)*x_ref[0]**o+(0.209084913471)*x_ref[0]+(-0.328544695733)*x_ref[1]**o+(0.701245770328)*x_ref[1]
-        ref[2,0,1,0]=(-0.476403718361)*x_ref[0]**o+(0.689023533158)*x_ref[0]+(0.108732189071)*x_ref[1]**o+(0.243379977453)*x_ref[1]
-        ref[2,0,1,1]=(0.414917801157)*x_ref[0]**o+(-0.843544596785)*x_ref[0]+(0.772236792935)*x_ref[1]**o+(0.836028831232)*x_ref[1]
-        ref[2,0,2,0]=(0.754970600617)*x_ref[0]**o+(-0.422318891122)*x_ref[0]+(0.770767911534)*x_ref[1]**o+(-0.446737894095)*x_ref[1]
-        ref[2,0,2,1]=(0.0139989331471)*x_ref[0]**o+(0.262286042291)*x_ref[0]+(-0.440109329114)*x_ref[1]**o+(-0.844965114722)*x_ref[1]
-        ref[2,1,0,0]=(-0.758977153009)*x_ref[0]**o+(-0.991192011039)*x_ref[0]+(0.642267239475)*x_ref[1]**o+(-0.701360491163)*x_ref[1]
-        ref[2,1,0,1]=(-0.123019007509)*x_ref[0]**o+(-0.622323252979)*x_ref[0]+(0.441364031664)*x_ref[1]**o+(0.311433222821)*x_ref[1]
-        ref[2,1,1,0]=(-0.0446644182928)*x_ref[0]**o+(0.614952704493)*x_ref[0]+(-0.228284494629)*x_ref[1]**o+(0.077603612991)*x_ref[1]
-        ref[2,1,1,1]=(0.712924108225)*x_ref[0]**o+(-0.153966300537)*x_ref[0]+(-0.584450014127)*x_ref[1]**o+(0.476329149833)*x_ref[1]
-        ref[2,1,2,0]=(0.554026516037)*x_ref[0]**o+(0.730575821847)*x_ref[0]+(-0.247529915107)*x_ref[1]**o+(0.210060454223)*x_ref[1]
-        ref[2,1,2,1]=(0.877017208752)*x_ref[0]**o+(-0.800916200997)*x_ref[0]+(0.0996710064295)*x_ref[1]**o+(-0.0890375735808)*x_ref[1]
-        ref[2,2,0,0]=(-0.198026186062)*x_ref[0]**o+(-0.416160224681)*x_ref[0]+(-0.626491103997)*x_ref[1]**o+(-0.950177752043)*x_ref[1]
-        ref[2,2,0,1]=(-0.401319234479)*x_ref[0]**o+(0.948120359627)*x_ref[0]+(0.420351950404)*x_ref[1]**o+(-0.242850312594)*x_ref[1]
-        ref[2,2,1,0]=(-0.239652069063)*x_ref[0]**o+(-0.894811076801)*x_ref[0]+(0.979721413509)*x_ref[1]**o+(-0.712493893566)*x_ref[1]
-        ref[2,2,1,1]=(0.239416494209)*x_ref[0]**o+(0.449047649538)*x_ref[0]+(0.0503751073583)*x_ref[1]**o+(0.739949331521)*x_ref[1]
-        ref[2,2,2,0]=(-0.318067701034)*x_ref[0]**o+(-0.00208209268356)*x_ref[0]+(-0.513821624843)*x_ref[1]**o+(-0.202688815501)*x_ref[1]
-        ref[2,2,2,1]=(-0.194111524544)*x_ref[0]**o+(-0.843213241929)*x_ref[0]+(0.124223747087)*x_ref[1]**o+(-0.988305059412)*x_ref[1]
-        ref[2,3,0,0]=(0.450894655873)*x_ref[0]**o+(-0.809351657482)*x_ref[0]+(-0.80555128185)*x_ref[1]**o+(-0.922123806508)*x_ref[1]
-        ref[2,3,0,1]=(-0.462822602909)*x_ref[0]**o+(0.504388766027)*x_ref[0]+(-0.152725064915)*x_ref[1]**o+(0.988745142638)*x_ref[1]
-        ref[2,3,1,0]=(-0.717873944493)*x_ref[0]**o+(0.987011714613)*x_ref[0]+(0.908500737929)*x_ref[1]**o+(0.612497707425)*x_ref[1]
-        ref[2,3,1,1]=(0.221645363399)*x_ref[0]**o+(0.219147687681)*x_ref[0]+(-0.195831118343)*x_ref[1]**o+(-0.59541920919)*x_ref[1]
-        ref[2,3,2,0]=(-0.289487342206)*x_ref[0]**o+(-0.96904981397)*x_ref[0]+(-0.844880792969)*x_ref[1]**o+(0.803145388038)*x_ref[1]
-        ref[2,3,2,1]=(-0.0234295826132)*x_ref[0]**o+(-0.839069887016)*x_ref[0]+(0.591231341444)*x_ref[1]**o+(-0.678605318787)*x_ref[1]
-        ref[2,4,0,0]=(0.717943320641)*x_ref[0]**o+(0.625728011485)*x_ref[0]+(0.456836257053)*x_ref[1]**o+(-0.00523685585287)*x_ref[1]
-        ref[2,4,0,1]=(-0.549526374185)*x_ref[0]**o+(0.57441917876)*x_ref[0]+(-0.913459106781)*x_ref[1]**o+(-0.610369375195)*x_ref[1]
-        ref[2,4,1,0]=(-0.27166563459)*x_ref[0]**o+(0.146710581194)*x_ref[0]+(0.297934124718)*x_ref[1]**o+(0.989561209048)*x_ref[1]
-        ref[2,4,1,1]=(-0.0973858709778)*x_ref[0]**o+(-0.909133394381)*x_ref[0]+(0.634182571287)*x_ref[1]**o+(0.477163052831)*x_ref[1]
-        ref[2,4,2,0]=(0.0878998038301)*x_ref[0]**o+(-0.90568487021)*x_ref[0]+(0.798978355456)*x_ref[1]**o+(0.977402478037)*x_ref[1]
-        ref[2,4,2,1]=(-0.456868538667)*x_ref[0]**o+(0.0723272702119)*x_ref[0]+(0.143461337462)*x_ref[1]**o+(-0.923713568343)*x_ref[1]
-        ref[3,0,0,0]=(-0.154410689788)*x_ref[0]**o+(0.634925838303)*x_ref[0]+(-0.0508765762892)*x_ref[1]**o+(-0.889731180834)*x_ref[1]
-        ref[3,0,0,1]=(-0.611336323518)*x_ref[0]**o+(0.748058372943)*x_ref[0]+(-0.395060568704)*x_ref[1]**o+(-0.413772262434)*x_ref[1]
-        ref[3,0,1,0]=(-0.76924573047)*x_ref[0]**o+(0.61286303551)*x_ref[0]+(0.810883211884)*x_ref[1]**o+(-0.908861022244)*x_ref[1]
-        ref[3,0,1,1]=(0.269999661235)*x_ref[0]**o+(0.0330954575695)*x_ref[0]+(0.560272546054)*x_ref[1]**o+(0.877730763728)*x_ref[1]
-        ref[3,0,2,0]=(-0.617658215856)*x_ref[0]**o+(0.758414649277)*x_ref[0]+(-0.223497113863)*x_ref[1]**o+(-0.0706589108357)*x_ref[1]
-        ref[3,0,2,1]=(0.47956571804)*x_ref[0]**o+(0.938375191345)*x_ref[0]+(-0.193997511219)*x_ref[1]**o+(0.500063249143)*x_ref[1]
-        ref[3,1,0,0]=(0.994033773649)*x_ref[0]**o+(0.203022945646)*x_ref[0]+(0.439296640709)*x_ref[1]**o+(0.283679657893)*x_ref[1]
-        ref[3,1,0,1]=(0.32495149734)*x_ref[0]**o+(-0.871627347694)*x_ref[0]+(-0.438159387872)*x_ref[1]**o+(0.169112665588)*x_ref[1]
-        ref[3,1,1,0]=(-0.0979322945554)*x_ref[0]**o+(-0.936928842822)*x_ref[0]+(0.0402738011011)*x_ref[1]**o+(-0.445031618539)*x_ref[1]
-        ref[3,1,1,1]=(-0.511218949907)*x_ref[0]**o+(0.255146779315)*x_ref[0]+(-0.802012163396)*x_ref[1]**o+(0.361819705056)*x_ref[1]
-        ref[3,1,2,0]=(-0.902499203011)*x_ref[0]**o+(0.76589952141)*x_ref[0]+(0.52498929732)*x_ref[1]**o+(0.493894292321)*x_ref[1]
-        ref[3,1,2,1]=(-0.475117609018)*x_ref[0]**o+(0.682205309303)*x_ref[0]+(-0.661824086649)*x_ref[1]**o+(0.985521553774)*x_ref[1]
-        ref[3,2,0,0]=(0.937321686473)*x_ref[0]**o+(-0.518305775925)*x_ref[0]+(0.171689574942)*x_ref[1]**o+(-0.751579960819)*x_ref[1]
-        ref[3,2,0,1]=(-0.607004597985)*x_ref[0]**o+(0.342330208344)*x_ref[0]+(0.692094243326)*x_ref[1]**o+(-0.457756057357)*x_ref[1]
-        ref[3,2,1,0]=(0.126171621354)*x_ref[0]**o+(0.0499938423847)*x_ref[0]+(0.572006209576)*x_ref[1]**o+(0.121601182464)*x_ref[1]
-        ref[3,2,1,1]=(0.337936456181)*x_ref[0]**o+(-0.940186907514)*x_ref[0]+(-0.965354931124)*x_ref[1]**o+(-0.0503295532873)*x_ref[1]
-        ref[3,2,2,0]=(0.439590816231)*x_ref[0]**o+(-0.145314466072)*x_ref[0]+(-0.847175364201)*x_ref[1]**o+(-0.570000251495)*x_ref[1]
-        ref[3,2,2,1]=(0.401069335123)*x_ref[0]**o+(-0.117139167508)*x_ref[0]+(0.192907527853)*x_ref[1]**o+(0.573283391581)*x_ref[1]
-        ref[3,3,0,0]=(-0.434029411666)*x_ref[0]**o+(-0.689115317009)*x_ref[0]+(0.63450218888)*x_ref[1]**o+(0.492858023519)*x_ref[1]
-        ref[3,3,0,1]=(-0.678722283369)*x_ref[0]**o+(-0.62031826393)*x_ref[0]+(-0.458646022327)*x_ref[1]**o+(-0.650857410927)*x_ref[1]
-        ref[3,3,1,0]=(0.413477874719)*x_ref[0]**o+(-0.903116096879)*x_ref[0]+(-0.505961511722)*x_ref[1]**o+(0.649554735459)*x_ref[1]
-        ref[3,3,1,1]=(-0.58459645458)*x_ref[0]**o+(0.861318565628)*x_ref[0]+(0.378511063123)*x_ref[1]**o+(-0.694820011654)*x_ref[1]
-        ref[3,3,2,0]=(0.82844733258)*x_ref[0]**o+(-0.151929131446)*x_ref[0]+(0.322848411081)*x_ref[1]**o+(0.436062233263)*x_ref[1]
-        ref[3,3,2,1]=(0.269627291792)*x_ref[0]**o+(0.618140998132)*x_ref[0]+(0.851057431407)*x_ref[1]**o+(0.716088832502)*x_ref[1]
-        ref[3,4,0,0]=(0.0557605432613)*x_ref[0]**o+(0.0689569775656)*x_ref[0]+(0.489781121774)*x_ref[1]**o+(0.214459998733)*x_ref[1]
-        ref[3,4,0,1]=(0.429111134289)*x_ref[0]**o+(0.648324951051)*x_ref[0]+(0.00596799425797)*x_ref[1]**o+(-0.752637714965)*x_ref[1]
-        ref[3,4,1,0]=(-0.0394648097179)*x_ref[0]**o+(0.842965554058)*x_ref[0]+(-0.124493160479)*x_ref[1]**o+(0.81914053244)*x_ref[1]
-        ref[3,4,1,1]=(0.309465325874)*x_ref[0]**o+(0.631381272937)*x_ref[0]+(-0.164415508845)*x_ref[1]**o+(0.316908911599)*x_ref[1]
-        ref[3,4,2,0]=(-0.615108314792)*x_ref[0]**o+(0.300936829452)*x_ref[0]+(-0.289514252333)*x_ref[1]**o+(0.844949030767)*x_ref[1]
-        ref[3,4,2,1]=(0.80117516909)*x_ref[0]**o+(-0.602632221639)*x_ref[0]+(-0.68193581457)*x_ref[1]**o+(0.203319693067)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.349437323395)*x[0]**o+(0.817821891642)*x[0]+(-0.357998520848)*x[1]**o+(0.349311985429)*x[1]+(0.470351907942)*x[2]**o+(0.264007843212)*x[2]
-        arg[0,0,0,1]=(-0.747824148035)*x[0]**o+(0.551817215468)*x[0]+(0.980476067966)*x[1]**o+(0.521120126285)*x[1]+(-0.472357720779)*x[2]**o+(-0.379502066444)*x[2]
-        arg[0,0,1,0]=(0.302984899868)*x[0]**o+(0.556601505796)*x[0]+(-0.698948476338)*x[1]**o+(-0.587379572024)*x[1]+(-0.625760359909)*x[2]**o+(0.231956543432)*x[2]
-        arg[0,0,1,1]=(-0.335943560463)*x[0]**o+(-0.497643152155)*x[0]+(-0.849829024888)*x[1]**o+(-0.388751135318)*x[1]+(-0.517696637743)*x[2]**o+(-0.966210901)*x[2]
-        arg[0,0,2,0]=(-0.0953058405321)*x[0]**o+(-0.864580918175)*x[0]+(-0.732086619685)*x[1]**o+(0.872044654816)*x[1]+(-0.225850391375)*x[2]**o+(-0.502203654371)*x[2]
-        arg[0,0,2,1]=(0.228408069101)*x[0]**o+(0.267590362458)*x[0]+(0.127397041031)*x[1]**o+(0.0142393720782)*x[1]+(-0.257563412478)*x[2]**o+(0.0211877877507)*x[2]
-        arg[0,1,0,0]=(0.921125039994)*x[0]**o+(0.372548304521)*x[0]+(-0.66574364308)*x[1]**o+(0.0895600219155)*x[1]+(-0.656870562037)*x[2]**o+(-0.608819638268)*x[2]
-        arg[0,1,0,1]=(-0.396625252579)*x[0]**o+(0.655542320616)*x[0]+(-0.542629502059)*x[1]**o+(0.587317299384)*x[1]+(0.96380848967)*x[2]**o+(0.121341827766)*x[2]
-        arg[0,1,1,0]=(0.0908208346003)*x[0]**o+(-0.0398227321951)*x[0]+(0.907607555288)*x[1]**o+(0.527230589013)*x[1]+(0.519287416653)*x[2]**o+(0.103180358249)*x[2]
-        arg[0,1,1,1]=(0.0615195625837)*x[0]**o+(0.695720276474)*x[0]+(0.0862101684049)*x[1]**o+(0.517150419955)*x[1]+(0.511207669575)*x[2]**o+(-0.9556472362)*x[2]
-        arg[0,1,2,0]=(0.70040395652)*x[0]**o+(-0.576266027865)*x[0]+(-0.133947982034)*x[1]**o+(-0.764976368456)*x[1]+(-0.860780506782)*x[2]**o+(-0.137946340663)*x[2]
-        arg[0,1,2,1]=(0.356017596832)*x[0]**o+(0.94912783604)*x[0]+(0.325951760294)*x[1]**o+(0.0623695610721)*x[1]+(-0.106031051895)*x[2]**o+(-0.339314970581)*x[2]
-        arg[0,2,0,0]=(-0.124954395016)*x[0]**o+(0.558233271782)*x[0]+(-0.956846820394)*x[1]**o+(-0.599332648704)*x[1]+(-0.322444201477)*x[2]**o+(0.0833108732532)*x[2]
-        arg[0,2,0,1]=(-0.713065259589)*x[0]**o+(-0.597746726477)*x[0]+(-0.976654446591)*x[1]**o+(0.977779698697)*x[1]+(0.694427679422)*x[2]**o+(-0.364463986712)*x[2]
-        arg[0,2,1,0]=(-0.415861468352)*x[0]**o+(-0.159802964908)*x[0]+(-0.132331280778)*x[1]**o+(0.120829594848)*x[1]+(-0.114181951611)*x[2]**o+(-0.810187313564)*x[2]
-        arg[0,2,1,1]=(-0.869925695451)*x[0]**o+(-0.535444611026)*x[0]+(0.62908837594)*x[1]**o+(-0.488583607314)*x[1]+(0.8461615049)*x[2]**o+(-0.558010294727)*x[2]
-        arg[0,2,2,0]=(-0.0822232217466)*x[0]**o+(-0.673631382141)*x[0]+(0.803717792107)*x[1]**o+(0.339934715615)*x[1]+(-0.886365924996)*x[2]**o+(0.0206517750753)*x[2]
-        arg[0,2,2,1]=(0.367656249869)*x[0]**o+(0.000987963028539)*x[0]+(0.399182215451)*x[1]**o+(0.923259635138)*x[1]+(0.8573338122)*x[2]**o+(0.679082213415)*x[2]
-        arg[0,3,0,0]=(-0.722680496644)*x[0]**o+(0.199427912651)*x[0]+(-0.351799245099)*x[1]**o+(0.240285416231)*x[1]+(-0.701704868242)*x[2]**o+(0.265610436018)*x[2]
-        arg[0,3,0,1]=(-0.14479043328)*x[0]**o+(-0.192670959504)*x[0]+(0.327412080296)*x[1]**o+(-0.390894637576)*x[1]+(-0.401862813677)*x[2]**o+(-0.87150071561)*x[2]
-        arg[0,3,1,0]=(0.430039400239)*x[0]**o+(-0.0691443536291)*x[0]+(0.205492039071)*x[1]**o+(-0.391580258314)*x[1]+(0.791748125642)*x[2]**o+(-0.0896722225431)*x[2]
-        arg[0,3,1,1]=(-0.177554766913)*x[0]**o+(-0.399389195454)*x[0]+(-0.304228953477)*x[1]**o+(0.00462595697167)*x[1]+(0.271814579884)*x[2]**o+(-0.17305639368)*x[2]
-        arg[0,3,2,0]=(-0.105869589157)*x[0]**o+(0.803488342924)*x[0]+(-0.65117861655)*x[1]**o+(-0.27529059731)*x[1]+(-0.777107387582)*x[2]**o+(-0.690980328369)*x[2]
-        arg[0,3,2,1]=(-0.13792230295)*x[0]**o+(0.649721420509)*x[0]+(0.401441756822)*x[1]**o+(0.468949007973)*x[1]+(-0.762015699412)*x[2]**o+(0.389781367434)*x[2]
-        arg[0,4,0,0]=(0.873653819021)*x[0]**o+(0.539406798913)*x[0]+(0.802177801924)*x[1]**o+(-0.861314989922)*x[1]+(0.847509960118)*x[2]**o+(-0.41381965291)*x[2]
-        arg[0,4,0,1]=(0.0416858647633)*x[0]**o+(0.866825467268)*x[0]+(0.89776163679)*x[1]**o+(-0.978326218858)*x[1]+(-0.409795413277)*x[2]**o+(0.982449327977)*x[2]
-        arg[0,4,1,0]=(-0.114530966075)*x[0]**o+(-0.182414280034)*x[0]+(0.154385814218)*x[1]**o+(0.869624332271)*x[1]+(0.477213291128)*x[2]**o+(-0.137123375612)*x[2]
-        arg[0,4,1,1]=(-0.52963019184)*x[0]**o+(0.0217955878025)*x[0]+(-0.174531798693)*x[1]**o+(-0.738947178141)*x[1]+(0.198130667502)*x[2]**o+(-0.449952166994)*x[2]
-        arg[0,4,2,0]=(0.998209708224)*x[0]**o+(0.734906841374)*x[0]+(0.225596363429)*x[1]**o+(0.862772101878)*x[1]+(-0.133563132638)*x[2]**o+(-0.78059821331)*x[2]
-        arg[0,4,2,1]=(0.384580893901)*x[0]**o+(-0.881918368669)*x[0]+(-0.950768236608)*x[1]**o+(-0.452275072093)*x[1]+(0.592779023744)*x[2]**o+(0.798735695084)*x[2]
-        arg[1,0,0,0]=(0.786827894179)*x[0]**o+(-0.233241290567)*x[0]+(0.946717698992)*x[1]**o+(0.179368479607)*x[1]+(-0.10409968587)*x[2]**o+(-0.770115022756)*x[2]
-        arg[1,0,0,1]=(-0.355389699793)*x[0]**o+(0.356407960494)*x[0]+(-0.371831767713)*x[1]**o+(0.139120259823)*x[1]+(0.910761795881)*x[2]**o+(0.725966050775)*x[2]
-        arg[1,0,1,0]=(0.316372320948)*x[0]**o+(0.432472869369)*x[0]+(0.733187356771)*x[1]**o+(0.133915829584)*x[1]+(0.380713482112)*x[2]**o+(-0.874827460114)*x[2]
-        arg[1,0,1,1]=(-0.0625786527083)*x[0]**o+(-0.469518973019)*x[0]+(-0.318610570327)*x[1]**o+(-0.304412247656)*x[1]+(0.844057224107)*x[2]**o+(0.508926494536)*x[2]
-        arg[1,0,2,0]=(-0.759697281694)*x[0]**o+(0.701456398418)*x[0]+(-0.671612899124)*x[1]**o+(0.292474197717)*x[1]+(-0.445886723952)*x[2]**o+(-0.319953406782)*x[2]
-        arg[1,0,2,1]=(-0.865703619781)*x[0]**o+(0.115639820869)*x[0]+(0.493634056223)*x[1]**o+(0.0343245670418)*x[1]+(0.748200872819)*x[2]**o+(-0.208438395054)*x[2]
-        arg[1,1,0,0]=(0.767661930656)*x[0]**o+(-0.578385615919)*x[0]+(0.241313268557)*x[1]**o+(0.74276605359)*x[1]+(0.373638986644)*x[2]**o+(0.475479466784)*x[2]
-        arg[1,1,0,1]=(0.723228882826)*x[0]**o+(-0.988524686322)*x[0]+(0.333664096597)*x[1]**o+(-0.756435323592)*x[1]+(0.771173510221)*x[2]**o+(-0.879337556561)*x[2]
-        arg[1,1,1,0]=(0.939682105701)*x[0]**o+(-0.172311578817)*x[0]+(-0.407241492831)*x[1]**o+(0.446660064834)*x[1]+(0.0371203367053)*x[2]**o+(-0.302853430561)*x[2]
-        arg[1,1,1,1]=(0.1093213068)*x[0]**o+(0.31232933407)*x[0]+(0.47474581408)*x[1]**o+(-0.602763201317)*x[1]+(0.803198523872)*x[2]**o+(-0.178088233667)*x[2]
-        arg[1,1,2,0]=(-0.217141686114)*x[0]**o+(0.287363815362)*x[0]+(-0.352552947551)*x[1]**o+(0.106445580983)*x[1]+(0.340814562712)*x[2]**o+(-0.963691249733)*x[2]
-        arg[1,1,2,1]=(0.612302241126)*x[0]**o+(-0.771765095612)*x[0]+(-0.18662763339)*x[1]**o+(0.10259882275)*x[1]+(-0.29535785913)*x[2]**o+(-0.577876877465)*x[2]
-        arg[1,2,0,0]=(0.497131459554)*x[0]**o+(0.912133134267)*x[0]+(0.944369633113)*x[1]**o+(0.163408823815)*x[1]+(0.85636766551)*x[2]**o+(-0.00282458078743)*x[2]
-        arg[1,2,0,1]=(0.362490806338)*x[0]**o+(0.22490192994)*x[0]+(-0.913665309243)*x[1]**o+(-0.88010395132)*x[1]+(-0.926205930269)*x[2]**o+(-0.231830082111)*x[2]
-        arg[1,2,1,0]=(-0.974792784505)*x[0]**o+(-0.765605618923)*x[0]+(0.241470054253)*x[1]**o+(0.445863114014)*x[1]+(0.561062749944)*x[2]**o+(-0.215674406206)*x[2]
-        arg[1,2,1,1]=(0.827013456823)*x[0]**o+(-0.191864800977)*x[0]+(-0.158099224794)*x[1]**o+(-0.921959562711)*x[1]+(0.930693535629)*x[2]**o+(-0.352967183792)*x[2]
-        arg[1,2,2,0]=(0.258970603305)*x[0]**o+(0.586779837275)*x[0]+(0.82707087137)*x[1]**o+(-0.215210535461)*x[1]+(0.36890299705)*x[2]**o+(-0.724385890088)*x[2]
-        arg[1,2,2,1]=(-0.125969269863)*x[0]**o+(-0.505216539273)*x[0]+(0.43242008053)*x[1]**o+(0.212079268112)*x[1]+(0.345759190477)*x[2]**o+(-0.98505468199)*x[2]
-        arg[1,3,0,0]=(-0.647118215098)*x[0]**o+(0.318566502446)*x[0]+(-0.151406735047)*x[1]**o+(0.253202745125)*x[1]+(-0.404823111329)*x[2]**o+(-0.520797366557)*x[2]
-        arg[1,3,0,1]=(-0.946886311645)*x[0]**o+(0.733699524424)*x[0]+(-0.615470980807)*x[1]**o+(-0.103976314414)*x[1]+(-0.932104431883)*x[2]**o+(0.157563806559)*x[2]
-        arg[1,3,1,0]=(-0.289471503181)*x[0]**o+(0.749124853135)*x[0]+(-0.578861403092)*x[1]**o+(-0.136231378985)*x[1]+(0.532719246315)*x[2]**o+(0.542455831657)*x[2]
-        arg[1,3,1,1]=(-0.343842490684)*x[0]**o+(0.110039182926)*x[0]+(0.901234650534)*x[1]**o+(-0.513362876241)*x[1]+(0.371952189126)*x[2]**o+(-0.169400349862)*x[2]
-        arg[1,3,2,0]=(-0.766791944503)*x[0]**o+(0.0267491122166)*x[0]+(-0.699293509597)*x[1]**o+(-0.697363669971)*x[1]+(0.567854170308)*x[2]**o+(-0.516301389629)*x[2]
-        arg[1,3,2,1]=(-0.288508579358)*x[0]**o+(0.239321880772)*x[0]+(0.677249635795)*x[1]**o+(0.48369084768)*x[1]+(0.681460633595)*x[2]**o+(-0.80218734437)*x[2]
-        arg[1,4,0,0]=(0.510273388936)*x[0]**o+(0.35600020965)*x[0]+(0.271077500616)*x[1]**o+(-0.00479335810576)*x[1]+(-0.348457583464)*x[2]**o+(-0.965895122152)*x[2]
-        arg[1,4,0,1]=(0.0134532748813)*x[0]**o+(-0.396954380686)*x[0]+(-0.176682002946)*x[1]**o+(0.971224261138)*x[1]+(-0.359602180261)*x[2]**o+(0.373748703363)*x[2]
-        arg[1,4,1,0]=(-0.519413160925)*x[0]**o+(0.856346255965)*x[0]+(0.159167243935)*x[1]**o+(0.92068779838)*x[1]+(0.415122182947)*x[2]**o+(-0.595702311496)*x[2]
-        arg[1,4,1,1]=(-0.608969598184)*x[0]**o+(-0.434750765676)*x[0]+(0.74471475701)*x[1]**o+(-0.229333246615)*x[1]+(-0.678138032736)*x[2]**o+(-0.514112926798)*x[2]
-        arg[1,4,2,0]=(0.0633453561735)*x[0]**o+(-0.278569473082)*x[0]+(-0.842227144473)*x[1]**o+(-0.00289799815652)*x[1]+(0.153392291113)*x[2]**o+(-0.61448940993)*x[2]
-        arg[1,4,2,1]=(0.0897863401674)*x[0]**o+(-0.487876787706)*x[0]+(-0.464008634014)*x[1]**o+(0.576466896344)*x[1]+(0.962345361537)*x[2]**o+(0.580878819156)*x[2]
-        arg[2,0,0,0]=(0.316582275434)*x[0]**o+(0.0607872538221)*x[0]+(0.642492366848)*x[1]**o+(0.200300167843)*x[1]+(-0.402802396184)*x[2]**o+(-0.834254866233)*x[2]
-        arg[2,0,0,1]=(0.644614184272)*x[0]**o+(-0.086367798694)*x[0]+(-0.428671462705)*x[1]**o+(-0.517827373575)*x[1]+(0.528197945165)*x[2]**o+(-0.523092888005)*x[2]
-        arg[2,0,1,0]=(0.41376145869)*x[0]**o+(-0.27425322418)*x[0]+(0.816942168928)*x[1]**o+(-0.882784454814)*x[1]+(-0.270205535673)*x[2]**o+(0.642372102899)*x[2]
-        arg[2,0,1,1]=(0.584931736844)*x[0]**o+(0.622511792702)*x[0]+(0.76174625736)*x[1]**o+(0.0561486448557)*x[1]+(-0.588861269552)*x[2]**o+(-0.341896323569)*x[2]
-        arg[2,0,2,0]=(0.635215108566)*x[0]**o+(0.299769133671)*x[0]+(0.141053572388)*x[1]**o+(0.102844255879)*x[1]+(-0.995154777534)*x[2]**o+(0.501319388994)*x[2]
-        arg[2,0,2,1]=(0.750089643836)*x[0]**o+(0.57570708561)*x[0]+(-0.449935823319)*x[1]**o+(-0.902982109411)*x[1]+(0.561185740222)*x[2]**o+(0.422654056847)*x[2]
-        arg[2,1,0,0]=(0.953986415316)*x[0]**o+(-0.7883326473)*x[0]+(-0.723690234059)*x[1]**o+(-0.537242781471)*x[1]+(-0.503466717519)*x[2]**o+(-0.777865169241)*x[2]
-        arg[2,1,0,1]=(0.317357554441)*x[0]**o+(-0.326828957855)*x[0]+(-0.609992651237)*x[1]**o+(0.811066934743)*x[1]+(-0.90668441447)*x[2]**o+(0.92581926687)*x[2]
-        arg[2,1,1,0]=(-0.0801236189368)*x[0]**o+(0.49151264813)*x[0]+(-0.0770654446151)*x[1]**o+(-0.314981217276)*x[1]+(-0.743180837478)*x[2]**o+(-0.554491413146)*x[2]
-        arg[2,1,1,1]=(0.831017344937)*x[0]**o+(-0.61064793935)*x[0]+(0.652976737027)*x[1]**o+(0.242104127969)*x[1]+(0.593330958678)*x[2]**o+(-0.35899584298)*x[2]
-        arg[2,1,2,0]=(-0.580618798556)*x[0]**o+(-0.936176474082)*x[0]+(-0.768716477288)*x[1]**o+(-0.353687473159)*x[1]+(-0.261509314019)*x[2]**o+(-0.442139199257)*x[2]
-        arg[2,1,2,1]=(0.945760793889)*x[0]**o+(-0.646958670891)*x[0]+(-0.440341726063)*x[1]**o+(0.223283751014)*x[1]+(0.799798944743)*x[2]**o+(0.591902067633)*x[2]
-        arg[2,2,0,0]=(-0.267699746405)*x[0]**o+(0.271554172399)*x[0]+(0.747278903642)*x[1]**o+(-0.832877459834)*x[1]+(-0.640373164716)*x[2]**o+(-0.666487164763)*x[2]
-        arg[2,2,0,1]=(0.795630715924)*x[0]**o+(0.682973866186)*x[0]+(-0.750818874926)*x[1]**o+(-0.904782408217)*x[1]+(-0.578138718379)*x[2]**o+(-0.369846516992)*x[2]
-        arg[2,2,1,0]=(0.165654497062)*x[0]**o+(-0.329827871165)*x[0]+(-0.808981530672)*x[1]**o+(0.350106763785)*x[1]+(0.106638087689)*x[2]**o+(0.425516820398)*x[2]
-        arg[2,2,1,1]=(0.017419119421)*x[0]**o+(0.500359047996)*x[0]+(-0.888509940049)*x[1]**o+(-0.375469124891)*x[1]+(0.863718970618)*x[2]**o+(-0.807667604763)*x[2]
-        arg[2,2,2,0]=(0.860662652165)*x[0]**o+(0.162530730499)*x[0]+(-0.657510966961)*x[1]**o+(0.215905840286)*x[1]+(0.97380371264)*x[2]**o+(-0.431027671897)*x[2]
-        arg[2,2,2,1]=(-0.649151503991)*x[0]**o+(0.484589779517)*x[0]+(0.905080495553)*x[1]**o+(0.997504119204)*x[1]+(-0.4268802512)*x[2]**o+(-0.687236308612)*x[2]
-        arg[2,3,0,0]=(-0.60485902589)*x[0]**o+(0.49500777286)*x[0]+(0.33977532104)*x[1]**o+(-0.219209845338)*x[1]+(-0.197311627683)*x[2]**o+(0.285859591044)*x[2]
-        arg[2,3,0,1]=(0.117438340483)*x[0]**o+(-0.562954894877)*x[0]+(-0.302982842797)*x[1]**o+(0.977923453436)*x[1]+(0.300127749784)*x[2]**o+(0.45784201373)*x[2]
-        arg[2,3,1,0]=(-0.910061442266)*x[0]**o+(0.723114553174)*x[0]+(-0.435693478652)*x[1]**o+(-0.584326584996)*x[1]+(-0.51000911177)*x[2]**o+(0.506615483889)*x[2]
-        arg[2,3,1,1]=(-0.50179741763)*x[0]**o+(-0.954551290001)*x[0]+(0.375839266192)*x[1]**o+(0.122120198059)*x[1]+(-0.593050674641)*x[2]**o+(0.549989594312)*x[2]
-        arg[2,3,2,0]=(-0.889519666705)*x[0]**o+(-0.815572507674)*x[0]+(0.453677651057)*x[1]**o+(0.450910828217)*x[1]+(-0.00465373008682)*x[2]**o+(0.731899900165)*x[2]
-        arg[2,3,2,1]=(-0.969971151589)*x[0]**o+(-0.156948104522)*x[0]+(0.492885029353)*x[1]**o+(-0.0310677847833)*x[1]+(0.327614233837)*x[2]**o+(-0.274974040707)*x[2]
-        arg[2,4,0,0]=(0.844667900826)*x[0]**o+(0.863374870522)*x[0]+(0.251456923241)*x[1]**o+(0.434916005183)*x[1]+(-0.139023370677)*x[2]**o+(0.0655176616053)*x[2]
-        arg[2,4,0,1]=(0.831755059318)*x[0]**o+(0.0897642674136)*x[0]+(0.190414878812)*x[1]**o+(0.976565327031)*x[1]+(0.413321767371)*x[2]**o+(0.755395415341)*x[2]
-        arg[2,4,1,0]=(-0.790364876377)*x[0]**o+(0.829442094248)*x[0]+(0.556251403891)*x[1]**o+(-0.953487711658)*x[1]+(-0.610781905401)*x[2]**o+(-0.320764072326)*x[2]
-        arg[2,4,1,1]=(-0.757101565136)*x[0]**o+(0.789340839395)*x[0]+(-0.615189514438)*x[1]**o+(-0.910992676978)*x[1]+(0.693736813401)*x[2]**o+(0.0538707588266)*x[2]
-        arg[2,4,2,0]=(0.000335625616611)*x[0]**o+(-0.195171446476)*x[0]+(0.0281149133705)*x[1]**o+(-0.362294159243)*x[1]+(0.830520288743)*x[2]**o+(-0.431967694247)*x[2]
-        arg[2,4,2,1]=(-0.232668364843)*x[0]**o+(0.655302452302)*x[0]+(-0.0125806408337)*x[1]**o+(-0.103979202109)*x[1]+(-0.277450383033)*x[2]**o+(0.708914971885)*x[2]
-        arg[3,0,0,0]=(-0.813447875186)*x[0]**o+(0.133491078101)*x[0]+(-0.675510725453)*x[1]**o+(-0.161489202717)*x[1]+(0.0474778506607)*x[2]**o+(0.513729029652)*x[2]
-        arg[3,0,0,1]=(0.45388386743)*x[0]**o+(-0.909074944715)*x[0]+(-0.540576382376)*x[1]**o+(-0.849753706068)*x[1]+(-0.496320191697)*x[2]**o+(-0.930725196363)*x[2]
-        arg[3,0,1,0]=(-0.145526830518)*x[0]**o+(-0.34717641097)*x[0]+(-0.818886792022)*x[1]**o+(0.574315644784)*x[1]+(-0.780431329222)*x[2]**o+(0.892840747651)*x[2]
-        arg[3,0,1,1]=(-0.415342962745)*x[0]**o+(-0.899768945518)*x[0]+(0.798573910731)*x[1]**o+(-0.0652893933479)*x[1]+(-0.444459519602)*x[2]**o+(-0.0100131702565)*x[2]
-        arg[3,0,2,0]=(-0.997936676013)*x[0]**o+(0.822000858069)*x[0]+(-0.553794408949)*x[1]**o+(0.829037287423)*x[1]+(-0.700288437806)*x[2]**o+(-0.449584600891)*x[2]
-        arg[3,0,2,1]=(-0.70979868598)*x[0]**o+(0.689868687655)*x[0]+(0.151257146397)*x[1]**o+(0.32895215144)*x[1]+(0.286043871383)*x[2]**o+(-0.604421567781)*x[2]
-        arg[3,1,0,0]=(0.60431849542)*x[0]**o+(0.518618291627)*x[0]+(-0.471868097013)*x[1]**o+(-0.639110899151)*x[1]+(-0.0904184061601)*x[2]**o+(0.113762528304)*x[2]
-        arg[3,1,0,1]=(0.307624103157)*x[0]**o+(-0.388281302162)*x[0]+(0.772429578102)*x[1]**o+(-0.197799629585)*x[1]+(-0.149120667036)*x[2]**o+(0.830154780264)*x[2]
-        arg[3,1,1,0]=(0.957127413133)*x[0]**o+(0.730080945389)*x[0]+(0.497191948774)*x[1]**o+(-0.586439221663)*x[1]+(-0.56223071093)*x[2]**o+(0.162899395804)*x[2]
-        arg[3,1,1,1]=(-0.285740818451)*x[0]**o+(-0.573919970411)*x[0]+(-0.400833211669)*x[1]**o+(0.84414534634)*x[1]+(-0.124352096731)*x[2]**o+(0.907013800834)*x[2]
-        arg[3,1,2,0]=(0.186947347989)*x[0]**o+(0.499582449213)*x[0]+(0.525473636695)*x[1]**o+(-0.926500953998)*x[1]+(-0.0392615366415)*x[2]**o+(0.909002911192)*x[2]
-        arg[3,1,2,1]=(0.634350440683)*x[0]**o+(0.901699291665)*x[0]+(-0.683899667575)*x[1]**o+(0.411642037744)*x[1]+(-0.72791611585)*x[2]**o+(-0.013293689839)*x[2]
-        arg[3,2,0,0]=(0.185164429507)*x[0]**o+(-0.671011652257)*x[0]+(0.973361040829)*x[1]**o+(0.989738565899)*x[1]+(-0.501245887091)*x[2]**o+(-0.405445444386)*x[2]
-        arg[3,2,0,1]=(-0.311554020884)*x[0]**o+(-0.929020990333)*x[0]+(0.366016375797)*x[1]**o+(0.838234804773)*x[1]+(0.939602632409)*x[2]**o+(-0.885524260372)*x[2]
-        arg[3,2,1,0]=(-0.0101604655589)*x[0]**o+(0.670274078493)*x[0]+(0.198135855354)*x[1]**o+(-0.000275422963644)*x[1]+(0.136674233404)*x[2]**o+(-0.442510118497)*x[2]
-        arg[3,2,1,1]=(-0.677948769785)*x[0]**o+(-0.165403610813)*x[0]+(-0.219353502981)*x[1]**o+(0.664297154009)*x[1]+(0.158536302892)*x[2]**o+(0.293940884925)*x[2]
-        arg[3,2,2,0]=(0.666669534708)*x[0]**o+(0.609459298502)*x[0]+(0.297058070582)*x[1]**o+(-0.0809555825821)*x[1]+(0.139430791042)*x[2]**o+(-0.253514861624)*x[2]
-        arg[3,2,2,1]=(-0.577932413274)*x[0]**o+(-0.583353108895)*x[0]+(-0.839262034394)*x[1]**o+(0.795642236106)*x[1]+(0.0882627381543)*x[2]**o+(-0.382970623122)*x[2]
-        arg[3,3,0,0]=(0.187941627429)*x[0]**o+(0.552040688531)*x[0]+(0.837458832716)*x[1]**o+(0.296793121897)*x[1]+(-0.665699511216)*x[2]**o+(-0.318565991052)*x[2]
-        arg[3,3,0,1]=(-0.78770176804)*x[0]**o+(0.807509260396)*x[0]+(0.46241086085)*x[1]**o+(0.668506908751)*x[1]+(-0.988954457343)*x[2]**o+(0.0896365679915)*x[2]
-        arg[3,3,1,0]=(0.727665746433)*x[0]**o+(-0.819391676739)*x[0]+(-0.118648934607)*x[1]**o+(-0.433862939031)*x[1]+(0.827788711313)*x[2]**o+(-0.615751446784)*x[2]
-        arg[3,3,1,1]=(-0.00427901841482)*x[0]**o+(-0.38545713036)*x[0]+(0.570160083404)*x[1]**o+(-0.235505162795)*x[1]+(0.514578304371)*x[2]**o+(-0.152692113279)*x[2]
-        arg[3,3,2,0]=(-0.396900613831)*x[0]**o+(0.161875314543)*x[0]+(0.28471295984)*x[1]**o+(-0.623276596728)*x[1]+(-0.748772373219)*x[2]**o+(0.584246898704)*x[2]
-        arg[3,3,2,1]=(0.210026027009)*x[0]**o+(-0.530437530387)*x[0]+(0.437155825716)*x[1]**o+(0.984102407204)*x[1]+(0.125030773605)*x[2]**o+(-0.821764907318)*x[2]
-        arg[3,4,0,0]=(-0.819129946783)*x[0]**o+(-0.729517565451)*x[0]+(-0.126013244602)*x[1]**o+(0.592832125254)*x[1]+(-0.850426487488)*x[2]**o+(0.271550912174)*x[2]
-        arg[3,4,0,1]=(-0.573554440921)*x[0]**o+(0.232106829584)*x[0]+(0.810201614042)*x[1]**o+(-0.85518164211)*x[1]+(0.249535563949)*x[2]**o+(-0.69728963017)*x[2]
-        arg[3,4,1,0]=(0.785661643628)*x[0]**o+(0.936424600424)*x[0]+(0.321363811055)*x[1]**o+(0.362341458592)*x[1]+(-0.593576579363)*x[2]**o+(0.0601278435924)*x[2]
-        arg[3,4,1,1]=(-0.854420686885)*x[0]**o+(0.993352097501)*x[0]+(-0.572116112224)*x[1]**o+(0.308008845182)*x[1]+(0.0443339578639)*x[2]**o+(-0.1469857285)*x[2]
-        arg[3,4,2,0]=(0.696373642151)*x[0]**o+(0.82425126832)*x[0]+(-0.0891735358455)*x[1]**o+(-0.22218993613)*x[1]+(-0.238393149017)*x[2]**o+(-0.631352718194)*x[2]
-        arg[3,4,2,1]=(-0.0932690431928)*x[0]**o+(-0.391900483919)*x[0]+(0.236843565361)*x[1]**o+(-0.164197648532)*x[1]+(0.235502596353)*x[2]**o+(0.0110131867917)*x[2]
-        ref[0,0,0,0]=(0.349437323395)*x_ref[0]**o+(0.817821891642)*x_ref[0]+(-0.357998520848)*x_ref[1]**o+(0.349311985429)*x_ref[1]+(0.470351907942)*x_ref[2]**o+(0.264007843212)*x_ref[2]
-        ref[0,0,0,1]=(-0.747824148035)*x_ref[0]**o+(0.551817215468)*x_ref[0]+(0.980476067966)*x_ref[1]**o+(0.521120126285)*x_ref[1]+(-0.472357720779)*x_ref[2]**o+(-0.379502066444)*x_ref[2]
-        ref[0,0,1,0]=(0.302984899868)*x_ref[0]**o+(0.556601505796)*x_ref[0]+(-0.698948476338)*x_ref[1]**o+(-0.587379572024)*x_ref[1]+(-0.625760359909)*x_ref[2]**o+(0.231956543432)*x_ref[2]
-        ref[0,0,1,1]=(-0.335943560463)*x_ref[0]**o+(-0.497643152155)*x_ref[0]+(-0.849829024888)*x_ref[1]**o+(-0.388751135318)*x_ref[1]+(-0.517696637743)*x_ref[2]**o+(-0.966210901)*x_ref[2]
-        ref[0,0,2,0]=(-0.0953058405321)*x_ref[0]**o+(-0.864580918175)*x_ref[0]+(-0.732086619685)*x_ref[1]**o+(0.872044654816)*x_ref[1]+(-0.225850391375)*x_ref[2]**o+(-0.502203654371)*x_ref[2]
-        ref[0,0,2,1]=(0.228408069101)*x_ref[0]**o+(0.267590362458)*x_ref[0]+(0.127397041031)*x_ref[1]**o+(0.0142393720782)*x_ref[1]+(-0.257563412478)*x_ref[2]**o+(0.0211877877507)*x_ref[2]
-        ref[0,1,0,0]=(0.921125039994)*x_ref[0]**o+(0.372548304521)*x_ref[0]+(-0.66574364308)*x_ref[1]**o+(0.0895600219155)*x_ref[1]+(-0.656870562037)*x_ref[2]**o+(-0.608819638268)*x_ref[2]
-        ref[0,1,0,1]=(-0.396625252579)*x_ref[0]**o+(0.655542320616)*x_ref[0]+(-0.542629502059)*x_ref[1]**o+(0.587317299384)*x_ref[1]+(0.96380848967)*x_ref[2]**o+(0.121341827766)*x_ref[2]
-        ref[0,1,1,0]=(0.0908208346003)*x_ref[0]**o+(-0.0398227321951)*x_ref[0]+(0.907607555288)*x_ref[1]**o+(0.527230589013)*x_ref[1]+(0.519287416653)*x_ref[2]**o+(0.103180358249)*x_ref[2]
-        ref[0,1,1,1]=(0.0615195625837)*x_ref[0]**o+(0.695720276474)*x_ref[0]+(0.0862101684049)*x_ref[1]**o+(0.517150419955)*x_ref[1]+(0.511207669575)*x_ref[2]**o+(-0.9556472362)*x_ref[2]
-        ref[0,1,2,0]=(0.70040395652)*x_ref[0]**o+(-0.576266027865)*x_ref[0]+(-0.133947982034)*x_ref[1]**o+(-0.764976368456)*x_ref[1]+(-0.860780506782)*x_ref[2]**o+(-0.137946340663)*x_ref[2]
-        ref[0,1,2,1]=(0.356017596832)*x_ref[0]**o+(0.94912783604)*x_ref[0]+(0.325951760294)*x_ref[1]**o+(0.0623695610721)*x_ref[1]+(-0.106031051895)*x_ref[2]**o+(-0.339314970581)*x_ref[2]
-        ref[0,2,0,0]=(-0.124954395016)*x_ref[0]**o+(0.558233271782)*x_ref[0]+(-0.956846820394)*x_ref[1]**o+(-0.599332648704)*x_ref[1]+(-0.322444201477)*x_ref[2]**o+(0.0833108732532)*x_ref[2]
-        ref[0,2,0,1]=(-0.713065259589)*x_ref[0]**o+(-0.597746726477)*x_ref[0]+(-0.976654446591)*x_ref[1]**o+(0.977779698697)*x_ref[1]+(0.694427679422)*x_ref[2]**o+(-0.364463986712)*x_ref[2]
-        ref[0,2,1,0]=(-0.415861468352)*x_ref[0]**o+(-0.159802964908)*x_ref[0]+(-0.132331280778)*x_ref[1]**o+(0.120829594848)*x_ref[1]+(-0.114181951611)*x_ref[2]**o+(-0.810187313564)*x_ref[2]
-        ref[0,2,1,1]=(-0.869925695451)*x_ref[0]**o+(-0.535444611026)*x_ref[0]+(0.62908837594)*x_ref[1]**o+(-0.488583607314)*x_ref[1]+(0.8461615049)*x_ref[2]**o+(-0.558010294727)*x_ref[2]
-        ref[0,2,2,0]=(-0.0822232217466)*x_ref[0]**o+(-0.673631382141)*x_ref[0]+(0.803717792107)*x_ref[1]**o+(0.339934715615)*x_ref[1]+(-0.886365924996)*x_ref[2]**o+(0.0206517750753)*x_ref[2]
-        ref[0,2,2,1]=(0.367656249869)*x_ref[0]**o+(0.000987963028539)*x_ref[0]+(0.399182215451)*x_ref[1]**o+(0.923259635138)*x_ref[1]+(0.8573338122)*x_ref[2]**o+(0.679082213415)*x_ref[2]
-        ref[0,3,0,0]=(-0.722680496644)*x_ref[0]**o+(0.199427912651)*x_ref[0]+(-0.351799245099)*x_ref[1]**o+(0.240285416231)*x_ref[1]+(-0.701704868242)*x_ref[2]**o+(0.265610436018)*x_ref[2]
-        ref[0,3,0,1]=(-0.14479043328)*x_ref[0]**o+(-0.192670959504)*x_ref[0]+(0.327412080296)*x_ref[1]**o+(-0.390894637576)*x_ref[1]+(-0.401862813677)*x_ref[2]**o+(-0.87150071561)*x_ref[2]
-        ref[0,3,1,0]=(0.430039400239)*x_ref[0]**o+(-0.0691443536291)*x_ref[0]+(0.205492039071)*x_ref[1]**o+(-0.391580258314)*x_ref[1]+(0.791748125642)*x_ref[2]**o+(-0.0896722225431)*x_ref[2]
-        ref[0,3,1,1]=(-0.177554766913)*x_ref[0]**o+(-0.399389195454)*x_ref[0]+(-0.304228953477)*x_ref[1]**o+(0.00462595697167)*x_ref[1]+(0.271814579884)*x_ref[2]**o+(-0.17305639368)*x_ref[2]
-        ref[0,3,2,0]=(-0.105869589157)*x_ref[0]**o+(0.803488342924)*x_ref[0]+(-0.65117861655)*x_ref[1]**o+(-0.27529059731)*x_ref[1]+(-0.777107387582)*x_ref[2]**o+(-0.690980328369)*x_ref[2]
-        ref[0,3,2,1]=(-0.13792230295)*x_ref[0]**o+(0.649721420509)*x_ref[0]+(0.401441756822)*x_ref[1]**o+(0.468949007973)*x_ref[1]+(-0.762015699412)*x_ref[2]**o+(0.389781367434)*x_ref[2]
-        ref[0,4,0,0]=(0.873653819021)*x_ref[0]**o+(0.539406798913)*x_ref[0]+(0.802177801924)*x_ref[1]**o+(-0.861314989922)*x_ref[1]+(0.847509960118)*x_ref[2]**o+(-0.41381965291)*x_ref[2]
-        ref[0,4,0,1]=(0.0416858647633)*x_ref[0]**o+(0.866825467268)*x_ref[0]+(0.89776163679)*x_ref[1]**o+(-0.978326218858)*x_ref[1]+(-0.409795413277)*x_ref[2]**o+(0.982449327977)*x_ref[2]
-        ref[0,4,1,0]=(-0.114530966075)*x_ref[0]**o+(-0.182414280034)*x_ref[0]+(0.154385814218)*x_ref[1]**o+(0.869624332271)*x_ref[1]+(0.477213291128)*x_ref[2]**o+(-0.137123375612)*x_ref[2]
-        ref[0,4,1,1]=(-0.52963019184)*x_ref[0]**o+(0.0217955878025)*x_ref[0]+(-0.174531798693)*x_ref[1]**o+(-0.738947178141)*x_ref[1]+(0.198130667502)*x_ref[2]**o+(-0.449952166994)*x_ref[2]
-        ref[0,4,2,0]=(0.998209708224)*x_ref[0]**o+(0.734906841374)*x_ref[0]+(0.225596363429)*x_ref[1]**o+(0.862772101878)*x_ref[1]+(-0.133563132638)*x_ref[2]**o+(-0.78059821331)*x_ref[2]
-        ref[0,4,2,1]=(0.384580893901)*x_ref[0]**o+(-0.881918368669)*x_ref[0]+(-0.950768236608)*x_ref[1]**o+(-0.452275072093)*x_ref[1]+(0.592779023744)*x_ref[2]**o+(0.798735695084)*x_ref[2]
-        ref[1,0,0,0]=(0.786827894179)*x_ref[0]**o+(-0.233241290567)*x_ref[0]+(0.946717698992)*x_ref[1]**o+(0.179368479607)*x_ref[1]+(-0.10409968587)*x_ref[2]**o+(-0.770115022756)*x_ref[2]
-        ref[1,0,0,1]=(-0.355389699793)*x_ref[0]**o+(0.356407960494)*x_ref[0]+(-0.371831767713)*x_ref[1]**o+(0.139120259823)*x_ref[1]+(0.910761795881)*x_ref[2]**o+(0.725966050775)*x_ref[2]
-        ref[1,0,1,0]=(0.316372320948)*x_ref[0]**o+(0.432472869369)*x_ref[0]+(0.733187356771)*x_ref[1]**o+(0.133915829584)*x_ref[1]+(0.380713482112)*x_ref[2]**o+(-0.874827460114)*x_ref[2]
-        ref[1,0,1,1]=(-0.0625786527083)*x_ref[0]**o+(-0.469518973019)*x_ref[0]+(-0.318610570327)*x_ref[1]**o+(-0.304412247656)*x_ref[1]+(0.844057224107)*x_ref[2]**o+(0.508926494536)*x_ref[2]
-        ref[1,0,2,0]=(-0.759697281694)*x_ref[0]**o+(0.701456398418)*x_ref[0]+(-0.671612899124)*x_ref[1]**o+(0.292474197717)*x_ref[1]+(-0.445886723952)*x_ref[2]**o+(-0.319953406782)*x_ref[2]
-        ref[1,0,2,1]=(-0.865703619781)*x_ref[0]**o+(0.115639820869)*x_ref[0]+(0.493634056223)*x_ref[1]**o+(0.0343245670418)*x_ref[1]+(0.748200872819)*x_ref[2]**o+(-0.208438395054)*x_ref[2]
-        ref[1,1,0,0]=(0.767661930656)*x_ref[0]**o+(-0.578385615919)*x_ref[0]+(0.241313268557)*x_ref[1]**o+(0.74276605359)*x_ref[1]+(0.373638986644)*x_ref[2]**o+(0.475479466784)*x_ref[2]
-        ref[1,1,0,1]=(0.723228882826)*x_ref[0]**o+(-0.988524686322)*x_ref[0]+(0.333664096597)*x_ref[1]**o+(-0.756435323592)*x_ref[1]+(0.771173510221)*x_ref[2]**o+(-0.879337556561)*x_ref[2]
-        ref[1,1,1,0]=(0.939682105701)*x_ref[0]**o+(-0.172311578817)*x_ref[0]+(-0.407241492831)*x_ref[1]**o+(0.446660064834)*x_ref[1]+(0.0371203367053)*x_ref[2]**o+(-0.302853430561)*x_ref[2]
-        ref[1,1,1,1]=(0.1093213068)*x_ref[0]**o+(0.31232933407)*x_ref[0]+(0.47474581408)*x_ref[1]**o+(-0.602763201317)*x_ref[1]+(0.803198523872)*x_ref[2]**o+(-0.178088233667)*x_ref[2]
-        ref[1,1,2,0]=(-0.217141686114)*x_ref[0]**o+(0.287363815362)*x_ref[0]+(-0.352552947551)*x_ref[1]**o+(0.106445580983)*x_ref[1]+(0.340814562712)*x_ref[2]**o+(-0.963691249733)*x_ref[2]
-        ref[1,1,2,1]=(0.612302241126)*x_ref[0]**o+(-0.771765095612)*x_ref[0]+(-0.18662763339)*x_ref[1]**o+(0.10259882275)*x_ref[1]+(-0.29535785913)*x_ref[2]**o+(-0.577876877465)*x_ref[2]
-        ref[1,2,0,0]=(0.497131459554)*x_ref[0]**o+(0.912133134267)*x_ref[0]+(0.944369633113)*x_ref[1]**o+(0.163408823815)*x_ref[1]+(0.85636766551)*x_ref[2]**o+(-0.00282458078743)*x_ref[2]
-        ref[1,2,0,1]=(0.362490806338)*x_ref[0]**o+(0.22490192994)*x_ref[0]+(-0.913665309243)*x_ref[1]**o+(-0.88010395132)*x_ref[1]+(-0.926205930269)*x_ref[2]**o+(-0.231830082111)*x_ref[2]
-        ref[1,2,1,0]=(-0.974792784505)*x_ref[0]**o+(-0.765605618923)*x_ref[0]+(0.241470054253)*x_ref[1]**o+(0.445863114014)*x_ref[1]+(0.561062749944)*x_ref[2]**o+(-0.215674406206)*x_ref[2]
-        ref[1,2,1,1]=(0.827013456823)*x_ref[0]**o+(-0.191864800977)*x_ref[0]+(-0.158099224794)*x_ref[1]**o+(-0.921959562711)*x_ref[1]+(0.930693535629)*x_ref[2]**o+(-0.352967183792)*x_ref[2]
-        ref[1,2,2,0]=(0.258970603305)*x_ref[0]**o+(0.586779837275)*x_ref[0]+(0.82707087137)*x_ref[1]**o+(-0.215210535461)*x_ref[1]+(0.36890299705)*x_ref[2]**o+(-0.724385890088)*x_ref[2]
-        ref[1,2,2,1]=(-0.125969269863)*x_ref[0]**o+(-0.505216539273)*x_ref[0]+(0.43242008053)*x_ref[1]**o+(0.212079268112)*x_ref[1]+(0.345759190477)*x_ref[2]**o+(-0.98505468199)*x_ref[2]
-        ref[1,3,0,0]=(-0.647118215098)*x_ref[0]**o+(0.318566502446)*x_ref[0]+(-0.151406735047)*x_ref[1]**o+(0.253202745125)*x_ref[1]+(-0.404823111329)*x_ref[2]**o+(-0.520797366557)*x_ref[2]
-        ref[1,3,0,1]=(-0.946886311645)*x_ref[0]**o+(0.733699524424)*x_ref[0]+(-0.615470980807)*x_ref[1]**o+(-0.103976314414)*x_ref[1]+(-0.932104431883)*x_ref[2]**o+(0.157563806559)*x_ref[2]
-        ref[1,3,1,0]=(-0.289471503181)*x_ref[0]**o+(0.749124853135)*x_ref[0]+(-0.578861403092)*x_ref[1]**o+(-0.136231378985)*x_ref[1]+(0.532719246315)*x_ref[2]**o+(0.542455831657)*x_ref[2]
-        ref[1,3,1,1]=(-0.343842490684)*x_ref[0]**o+(0.110039182926)*x_ref[0]+(0.901234650534)*x_ref[1]**o+(-0.513362876241)*x_ref[1]+(0.371952189126)*x_ref[2]**o+(-0.169400349862)*x_ref[2]
-        ref[1,3,2,0]=(-0.766791944503)*x_ref[0]**o+(0.0267491122166)*x_ref[0]+(-0.699293509597)*x_ref[1]**o+(-0.697363669971)*x_ref[1]+(0.567854170308)*x_ref[2]**o+(-0.516301389629)*x_ref[2]
-        ref[1,3,2,1]=(-0.288508579358)*x_ref[0]**o+(0.239321880772)*x_ref[0]+(0.677249635795)*x_ref[1]**o+(0.48369084768)*x_ref[1]+(0.681460633595)*x_ref[2]**o+(-0.80218734437)*x_ref[2]
-        ref[1,4,0,0]=(0.510273388936)*x_ref[0]**o+(0.35600020965)*x_ref[0]+(0.271077500616)*x_ref[1]**o+(-0.00479335810576)*x_ref[1]+(-0.348457583464)*x_ref[2]**o+(-0.965895122152)*x_ref[2]
-        ref[1,4,0,1]=(0.0134532748813)*x_ref[0]**o+(-0.396954380686)*x_ref[0]+(-0.176682002946)*x_ref[1]**o+(0.971224261138)*x_ref[1]+(-0.359602180261)*x_ref[2]**o+(0.373748703363)*x_ref[2]
-        ref[1,4,1,0]=(-0.519413160925)*x_ref[0]**o+(0.856346255965)*x_ref[0]+(0.159167243935)*x_ref[1]**o+(0.92068779838)*x_ref[1]+(0.415122182947)*x_ref[2]**o+(-0.595702311496)*x_ref[2]
-        ref[1,4,1,1]=(-0.608969598184)*x_ref[0]**o+(-0.434750765676)*x_ref[0]+(0.74471475701)*x_ref[1]**o+(-0.229333246615)*x_ref[1]+(-0.678138032736)*x_ref[2]**o+(-0.514112926798)*x_ref[2]
-        ref[1,4,2,0]=(0.0633453561735)*x_ref[0]**o+(-0.278569473082)*x_ref[0]+(-0.842227144473)*x_ref[1]**o+(-0.00289799815652)*x_ref[1]+(0.153392291113)*x_ref[2]**o+(-0.61448940993)*x_ref[2]
-        ref[1,4,2,1]=(0.0897863401674)*x_ref[0]**o+(-0.487876787706)*x_ref[0]+(-0.464008634014)*x_ref[1]**o+(0.576466896344)*x_ref[1]+(0.962345361537)*x_ref[2]**o+(0.580878819156)*x_ref[2]
-        ref[2,0,0,0]=(0.316582275434)*x_ref[0]**o+(0.0607872538221)*x_ref[0]+(0.642492366848)*x_ref[1]**o+(0.200300167843)*x_ref[1]+(-0.402802396184)*x_ref[2]**o+(-0.834254866233)*x_ref[2]
-        ref[2,0,0,1]=(0.644614184272)*x_ref[0]**o+(-0.086367798694)*x_ref[0]+(-0.428671462705)*x_ref[1]**o+(-0.517827373575)*x_ref[1]+(0.528197945165)*x_ref[2]**o+(-0.523092888005)*x_ref[2]
-        ref[2,0,1,0]=(0.41376145869)*x_ref[0]**o+(-0.27425322418)*x_ref[0]+(0.816942168928)*x_ref[1]**o+(-0.882784454814)*x_ref[1]+(-0.270205535673)*x_ref[2]**o+(0.642372102899)*x_ref[2]
-        ref[2,0,1,1]=(0.584931736844)*x_ref[0]**o+(0.622511792702)*x_ref[0]+(0.76174625736)*x_ref[1]**o+(0.0561486448557)*x_ref[1]+(-0.588861269552)*x_ref[2]**o+(-0.341896323569)*x_ref[2]
-        ref[2,0,2,0]=(0.635215108566)*x_ref[0]**o+(0.299769133671)*x_ref[0]+(0.141053572388)*x_ref[1]**o+(0.102844255879)*x_ref[1]+(-0.995154777534)*x_ref[2]**o+(0.501319388994)*x_ref[2]
-        ref[2,0,2,1]=(0.750089643836)*x_ref[0]**o+(0.57570708561)*x_ref[0]+(-0.449935823319)*x_ref[1]**o+(-0.902982109411)*x_ref[1]+(0.561185740222)*x_ref[2]**o+(0.422654056847)*x_ref[2]
-        ref[2,1,0,0]=(0.953986415316)*x_ref[0]**o+(-0.7883326473)*x_ref[0]+(-0.723690234059)*x_ref[1]**o+(-0.537242781471)*x_ref[1]+(-0.503466717519)*x_ref[2]**o+(-0.777865169241)*x_ref[2]
-        ref[2,1,0,1]=(0.317357554441)*x_ref[0]**o+(-0.326828957855)*x_ref[0]+(-0.609992651237)*x_ref[1]**o+(0.811066934743)*x_ref[1]+(-0.90668441447)*x_ref[2]**o+(0.92581926687)*x_ref[2]
-        ref[2,1,1,0]=(-0.0801236189368)*x_ref[0]**o+(0.49151264813)*x_ref[0]+(-0.0770654446151)*x_ref[1]**o+(-0.314981217276)*x_ref[1]+(-0.743180837478)*x_ref[2]**o+(-0.554491413146)*x_ref[2]
-        ref[2,1,1,1]=(0.831017344937)*x_ref[0]**o+(-0.61064793935)*x_ref[0]+(0.652976737027)*x_ref[1]**o+(0.242104127969)*x_ref[1]+(0.593330958678)*x_ref[2]**o+(-0.35899584298)*x_ref[2]
-        ref[2,1,2,0]=(-0.580618798556)*x_ref[0]**o+(-0.936176474082)*x_ref[0]+(-0.768716477288)*x_ref[1]**o+(-0.353687473159)*x_ref[1]+(-0.261509314019)*x_ref[2]**o+(-0.442139199257)*x_ref[2]
-        ref[2,1,2,1]=(0.945760793889)*x_ref[0]**o+(-0.646958670891)*x_ref[0]+(-0.440341726063)*x_ref[1]**o+(0.223283751014)*x_ref[1]+(0.799798944743)*x_ref[2]**o+(0.591902067633)*x_ref[2]
-        ref[2,2,0,0]=(-0.267699746405)*x_ref[0]**o+(0.271554172399)*x_ref[0]+(0.747278903642)*x_ref[1]**o+(-0.832877459834)*x_ref[1]+(-0.640373164716)*x_ref[2]**o+(-0.666487164763)*x_ref[2]
-        ref[2,2,0,1]=(0.795630715924)*x_ref[0]**o+(0.682973866186)*x_ref[0]+(-0.750818874926)*x_ref[1]**o+(-0.904782408217)*x_ref[1]+(-0.578138718379)*x_ref[2]**o+(-0.369846516992)*x_ref[2]
-        ref[2,2,1,0]=(0.165654497062)*x_ref[0]**o+(-0.329827871165)*x_ref[0]+(-0.808981530672)*x_ref[1]**o+(0.350106763785)*x_ref[1]+(0.106638087689)*x_ref[2]**o+(0.425516820398)*x_ref[2]
-        ref[2,2,1,1]=(0.017419119421)*x_ref[0]**o+(0.500359047996)*x_ref[0]+(-0.888509940049)*x_ref[1]**o+(-0.375469124891)*x_ref[1]+(0.863718970618)*x_ref[2]**o+(-0.807667604763)*x_ref[2]
-        ref[2,2,2,0]=(0.860662652165)*x_ref[0]**o+(0.162530730499)*x_ref[0]+(-0.657510966961)*x_ref[1]**o+(0.215905840286)*x_ref[1]+(0.97380371264)*x_ref[2]**o+(-0.431027671897)*x_ref[2]
-        ref[2,2,2,1]=(-0.649151503991)*x_ref[0]**o+(0.484589779517)*x_ref[0]+(0.905080495553)*x_ref[1]**o+(0.997504119204)*x_ref[1]+(-0.4268802512)*x_ref[2]**o+(-0.687236308612)*x_ref[2]
-        ref[2,3,0,0]=(-0.60485902589)*x_ref[0]**o+(0.49500777286)*x_ref[0]+(0.33977532104)*x_ref[1]**o+(-0.219209845338)*x_ref[1]+(-0.197311627683)*x_ref[2]**o+(0.285859591044)*x_ref[2]
-        ref[2,3,0,1]=(0.117438340483)*x_ref[0]**o+(-0.562954894877)*x_ref[0]+(-0.302982842797)*x_ref[1]**o+(0.977923453436)*x_ref[1]+(0.300127749784)*x_ref[2]**o+(0.45784201373)*x_ref[2]
-        ref[2,3,1,0]=(-0.910061442266)*x_ref[0]**o+(0.723114553174)*x_ref[0]+(-0.435693478652)*x_ref[1]**o+(-0.584326584996)*x_ref[1]+(-0.51000911177)*x_ref[2]**o+(0.506615483889)*x_ref[2]
-        ref[2,3,1,1]=(-0.50179741763)*x_ref[0]**o+(-0.954551290001)*x_ref[0]+(0.375839266192)*x_ref[1]**o+(0.122120198059)*x_ref[1]+(-0.593050674641)*x_ref[2]**o+(0.549989594312)*x_ref[2]
-        ref[2,3,2,0]=(-0.889519666705)*x_ref[0]**o+(-0.815572507674)*x_ref[0]+(0.453677651057)*x_ref[1]**o+(0.450910828217)*x_ref[1]+(-0.00465373008682)*x_ref[2]**o+(0.731899900165)*x_ref[2]
-        ref[2,3,2,1]=(-0.969971151589)*x_ref[0]**o+(-0.156948104522)*x_ref[0]+(0.492885029353)*x_ref[1]**o+(-0.0310677847833)*x_ref[1]+(0.327614233837)*x_ref[2]**o+(-0.274974040707)*x_ref[2]
-        ref[2,4,0,0]=(0.844667900826)*x_ref[0]**o+(0.863374870522)*x_ref[0]+(0.251456923241)*x_ref[1]**o+(0.434916005183)*x_ref[1]+(-0.139023370677)*x_ref[2]**o+(0.0655176616053)*x_ref[2]
-        ref[2,4,0,1]=(0.831755059318)*x_ref[0]**o+(0.0897642674136)*x_ref[0]+(0.190414878812)*x_ref[1]**o+(0.976565327031)*x_ref[1]+(0.413321767371)*x_ref[2]**o+(0.755395415341)*x_ref[2]
-        ref[2,4,1,0]=(-0.790364876377)*x_ref[0]**o+(0.829442094248)*x_ref[0]+(0.556251403891)*x_ref[1]**o+(-0.953487711658)*x_ref[1]+(-0.610781905401)*x_ref[2]**o+(-0.320764072326)*x_ref[2]
-        ref[2,4,1,1]=(-0.757101565136)*x_ref[0]**o+(0.789340839395)*x_ref[0]+(-0.615189514438)*x_ref[1]**o+(-0.910992676978)*x_ref[1]+(0.693736813401)*x_ref[2]**o+(0.0538707588266)*x_ref[2]
-        ref[2,4,2,0]=(0.000335625616611)*x_ref[0]**o+(-0.195171446476)*x_ref[0]+(0.0281149133705)*x_ref[1]**o+(-0.362294159243)*x_ref[1]+(0.830520288743)*x_ref[2]**o+(-0.431967694247)*x_ref[2]
-        ref[2,4,2,1]=(-0.232668364843)*x_ref[0]**o+(0.655302452302)*x_ref[0]+(-0.0125806408337)*x_ref[1]**o+(-0.103979202109)*x_ref[1]+(-0.277450383033)*x_ref[2]**o+(0.708914971885)*x_ref[2]
-        ref[3,0,0,0]=(-0.813447875186)*x_ref[0]**o+(0.133491078101)*x_ref[0]+(-0.675510725453)*x_ref[1]**o+(-0.161489202717)*x_ref[1]+(0.0474778506607)*x_ref[2]**o+(0.513729029652)*x_ref[2]
-        ref[3,0,0,1]=(0.45388386743)*x_ref[0]**o+(-0.909074944715)*x_ref[0]+(-0.540576382376)*x_ref[1]**o+(-0.849753706068)*x_ref[1]+(-0.496320191697)*x_ref[2]**o+(-0.930725196363)*x_ref[2]
-        ref[3,0,1,0]=(-0.145526830518)*x_ref[0]**o+(-0.34717641097)*x_ref[0]+(-0.818886792022)*x_ref[1]**o+(0.574315644784)*x_ref[1]+(-0.780431329222)*x_ref[2]**o+(0.892840747651)*x_ref[2]
-        ref[3,0,1,1]=(-0.415342962745)*x_ref[0]**o+(-0.899768945518)*x_ref[0]+(0.798573910731)*x_ref[1]**o+(-0.0652893933479)*x_ref[1]+(-0.444459519602)*x_ref[2]**o+(-0.0100131702565)*x_ref[2]
-        ref[3,0,2,0]=(-0.997936676013)*x_ref[0]**o+(0.822000858069)*x_ref[0]+(-0.553794408949)*x_ref[1]**o+(0.829037287423)*x_ref[1]+(-0.700288437806)*x_ref[2]**o+(-0.449584600891)*x_ref[2]
-        ref[3,0,2,1]=(-0.70979868598)*x_ref[0]**o+(0.689868687655)*x_ref[0]+(0.151257146397)*x_ref[1]**o+(0.32895215144)*x_ref[1]+(0.286043871383)*x_ref[2]**o+(-0.604421567781)*x_ref[2]
-        ref[3,1,0,0]=(0.60431849542)*x_ref[0]**o+(0.518618291627)*x_ref[0]+(-0.471868097013)*x_ref[1]**o+(-0.639110899151)*x_ref[1]+(-0.0904184061601)*x_ref[2]**o+(0.113762528304)*x_ref[2]
-        ref[3,1,0,1]=(0.307624103157)*x_ref[0]**o+(-0.388281302162)*x_ref[0]+(0.772429578102)*x_ref[1]**o+(-0.197799629585)*x_ref[1]+(-0.149120667036)*x_ref[2]**o+(0.830154780264)*x_ref[2]
-        ref[3,1,1,0]=(0.957127413133)*x_ref[0]**o+(0.730080945389)*x_ref[0]+(0.497191948774)*x_ref[1]**o+(-0.586439221663)*x_ref[1]+(-0.56223071093)*x_ref[2]**o+(0.162899395804)*x_ref[2]
-        ref[3,1,1,1]=(-0.285740818451)*x_ref[0]**o+(-0.573919970411)*x_ref[0]+(-0.400833211669)*x_ref[1]**o+(0.84414534634)*x_ref[1]+(-0.124352096731)*x_ref[2]**o+(0.907013800834)*x_ref[2]
-        ref[3,1,2,0]=(0.186947347989)*x_ref[0]**o+(0.499582449213)*x_ref[0]+(0.525473636695)*x_ref[1]**o+(-0.926500953998)*x_ref[1]+(-0.0392615366415)*x_ref[2]**o+(0.909002911192)*x_ref[2]
-        ref[3,1,2,1]=(0.634350440683)*x_ref[0]**o+(0.901699291665)*x_ref[0]+(-0.683899667575)*x_ref[1]**o+(0.411642037744)*x_ref[1]+(-0.72791611585)*x_ref[2]**o+(-0.013293689839)*x_ref[2]
-        ref[3,2,0,0]=(0.185164429507)*x_ref[0]**o+(-0.671011652257)*x_ref[0]+(0.973361040829)*x_ref[1]**o+(0.989738565899)*x_ref[1]+(-0.501245887091)*x_ref[2]**o+(-0.405445444386)*x_ref[2]
-        ref[3,2,0,1]=(-0.311554020884)*x_ref[0]**o+(-0.929020990333)*x_ref[0]+(0.366016375797)*x_ref[1]**o+(0.838234804773)*x_ref[1]+(0.939602632409)*x_ref[2]**o+(-0.885524260372)*x_ref[2]
-        ref[3,2,1,0]=(-0.0101604655589)*x_ref[0]**o+(0.670274078493)*x_ref[0]+(0.198135855354)*x_ref[1]**o+(-0.000275422963644)*x_ref[1]+(0.136674233404)*x_ref[2]**o+(-0.442510118497)*x_ref[2]
-        ref[3,2,1,1]=(-0.677948769785)*x_ref[0]**o+(-0.165403610813)*x_ref[0]+(-0.219353502981)*x_ref[1]**o+(0.664297154009)*x_ref[1]+(0.158536302892)*x_ref[2]**o+(0.293940884925)*x_ref[2]
-        ref[3,2,2,0]=(0.666669534708)*x_ref[0]**o+(0.609459298502)*x_ref[0]+(0.297058070582)*x_ref[1]**o+(-0.0809555825821)*x_ref[1]+(0.139430791042)*x_ref[2]**o+(-0.253514861624)*x_ref[2]
-        ref[3,2,2,1]=(-0.577932413274)*x_ref[0]**o+(-0.583353108895)*x_ref[0]+(-0.839262034394)*x_ref[1]**o+(0.795642236106)*x_ref[1]+(0.0882627381543)*x_ref[2]**o+(-0.382970623122)*x_ref[2]
-        ref[3,3,0,0]=(0.187941627429)*x_ref[0]**o+(0.552040688531)*x_ref[0]+(0.837458832716)*x_ref[1]**o+(0.296793121897)*x_ref[1]+(-0.665699511216)*x_ref[2]**o+(-0.318565991052)*x_ref[2]
-        ref[3,3,0,1]=(-0.78770176804)*x_ref[0]**o+(0.807509260396)*x_ref[0]+(0.46241086085)*x_ref[1]**o+(0.668506908751)*x_ref[1]+(-0.988954457343)*x_ref[2]**o+(0.0896365679915)*x_ref[2]
-        ref[3,3,1,0]=(0.727665746433)*x_ref[0]**o+(-0.819391676739)*x_ref[0]+(-0.118648934607)*x_ref[1]**o+(-0.433862939031)*x_ref[1]+(0.827788711313)*x_ref[2]**o+(-0.615751446784)*x_ref[2]
-        ref[3,3,1,1]=(-0.00427901841482)*x_ref[0]**o+(-0.38545713036)*x_ref[0]+(0.570160083404)*x_ref[1]**o+(-0.235505162795)*x_ref[1]+(0.514578304371)*x_ref[2]**o+(-0.152692113279)*x_ref[2]
-        ref[3,3,2,0]=(-0.396900613831)*x_ref[0]**o+(0.161875314543)*x_ref[0]+(0.28471295984)*x_ref[1]**o+(-0.623276596728)*x_ref[1]+(-0.748772373219)*x_ref[2]**o+(0.584246898704)*x_ref[2]
-        ref[3,3,2,1]=(0.210026027009)*x_ref[0]**o+(-0.530437530387)*x_ref[0]+(0.437155825716)*x_ref[1]**o+(0.984102407204)*x_ref[1]+(0.125030773605)*x_ref[2]**o+(-0.821764907318)*x_ref[2]
-        ref[3,4,0,0]=(-0.819129946783)*x_ref[0]**o+(-0.729517565451)*x_ref[0]+(-0.126013244602)*x_ref[1]**o+(0.592832125254)*x_ref[1]+(-0.850426487488)*x_ref[2]**o+(0.271550912174)*x_ref[2]
-        ref[3,4,0,1]=(-0.573554440921)*x_ref[0]**o+(0.232106829584)*x_ref[0]+(0.810201614042)*x_ref[1]**o+(-0.85518164211)*x_ref[1]+(0.249535563949)*x_ref[2]**o+(-0.69728963017)*x_ref[2]
-        ref[3,4,1,0]=(0.785661643628)*x_ref[0]**o+(0.936424600424)*x_ref[0]+(0.321363811055)*x_ref[1]**o+(0.362341458592)*x_ref[1]+(-0.593576579363)*x_ref[2]**o+(0.0601278435924)*x_ref[2]
-        ref[3,4,1,1]=(-0.854420686885)*x_ref[0]**o+(0.993352097501)*x_ref[0]+(-0.572116112224)*x_ref[1]**o+(0.308008845182)*x_ref[1]+(0.0443339578639)*x_ref[2]**o+(-0.1469857285)*x_ref[2]
-        ref[3,4,2,0]=(0.696373642151)*x_ref[0]**o+(0.82425126832)*x_ref[0]+(-0.0891735358455)*x_ref[1]**o+(-0.22218993613)*x_ref[1]+(-0.238393149017)*x_ref[2]**o+(-0.631352718194)*x_ref[2]
-        ref[3,4,2,1]=(-0.0932690431928)*x_ref[0]**o+(-0.391900483919)*x_ref[0]+(0.236843565361)*x_ref[1]**o+(-0.164197648532)*x_ref[1]+(0.235502596353)*x_ref[2]**o+(0.0110131867917)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.521673635599)*x[0]**o+(-0.288664980886)*x[0]+(0.57565949318)*x[1]**o+(-0.555613874185)*x[1]
-        ref=(-0.521673635599)*x_ref[0]**o+(-0.288664980886)*x_ref[0]+(0.57565949318)*x_ref[1]**o+(-0.555613874185)*x_ref[1]
-      else:
-        arg=(0.520429804914)*x[0]**o+(-0.000683147004841)*x[0]+(0.676879975826)*x[1]**o+(0.760707578765)*x[1]+(0.479225734268)*x[2]**o+(0.132006876687)*x[2]
-        ref=(0.520429804914)*x_ref[0]**o+(-0.000683147004841)*x_ref[0]+(0.676879975826)*x_ref[1]**o+(0.760707578765)*x_ref[1]+(0.479225734268)*x_ref[2]**o+(0.132006876687)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.350515208335)*x[0]**o+(-0.604596801095)*x[0]+(0.145267491062)*x[1]**o+(-0.422271555369)*x[1]
-        ref=(-0.350515208335)*x_ref[0]**o+(-0.604596801095)*x_ref[0]+(0.145267491062)*x_ref[1]**o+(-0.422271555369)*x_ref[1]
-      else:
-        arg=(-0.162304501731)*x[0]**o+(0.342262454165)*x[0]+(0.693988751897)*x[1]**o+(-0.315225717754)*x[1]+(-0.938405302425)*x[2]**o+(-0.0929881908885)*x[2]
-        ref=(-0.162304501731)*x_ref[0]**o+(0.342262454165)*x_ref[0]+(0.693988751897)*x_ref[1]**o+(-0.315225717754)*x_ref[1]+(-0.938405302425)*x_ref[2]**o+(-0.0929881908885)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.104854565192)*x[0]**o+(-0.596688162793)*x[0]+(-0.0286471957779)*x[1]**o+(-0.157282508059)*x[1]
-        arg[1]=(0.619817759027)*x[0]**o+(-0.832815965127)*x[0]+(-0.638126497014)*x[1]**o+(0.771271149341)*x[1]
-        ref[0]=(0.104854565192)*x_ref[0]**o+(-0.596688162793)*x_ref[0]+(-0.0286471957779)*x_ref[1]**o+(-0.157282508059)*x_ref[1]
-        ref[1]=(0.619817759027)*x_ref[0]**o+(-0.832815965127)*x_ref[0]+(-0.638126497014)*x_ref[1]**o+(0.771271149341)*x_ref[1]
-      else:
-        arg[0]=(-0.358142932888)*x[0]**o+(0.758685606027)*x[0]+(-0.0716050574096)*x[1]**o+(-0.723587074286)*x[1]+(0.387240173671)*x[2]**o+(0.544679811421)*x[2]
-        arg[1]=(0.864154242034)*x[0]**o+(-0.0740598679188)*x[0]+(-0.0865611132887)*x[1]**o+(0.0414815431481)*x[1]+(-0.897395775334)*x[2]**o+(-0.580401889318)*x[2]
-        ref[0]=(-0.358142932888)*x_ref[0]**o+(0.758685606027)*x_ref[0]+(-0.0716050574096)*x_ref[1]**o+(-0.723587074286)*x_ref[1]+(0.387240173671)*x_ref[2]**o+(0.544679811421)*x_ref[2]
-        ref[1]=(0.864154242034)*x_ref[0]**o+(-0.0740598679188)*x_ref[0]+(-0.0865611132887)*x_ref[1]**o+(0.0414815431481)*x_ref[1]+(-0.897395775334)*x_ref[2]**o+(-0.580401889318)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.0571385613076)*x[0]**o+(-0.296048600622)*x[0]+(0.300914212927)*x[1]**o+(0.81578919689)*x[1]
-        arg[0,1]=(0.136796732287)*x[0]**o+(0.169384864236)*x[0]+(-0.874585047899)*x[1]**o+(-0.67613629157)*x[1]
-        arg[0,2]=(-0.947048556597)*x[0]**o+(-0.807647782941)*x[0]+(-0.53233790031)*x[1]**o+(0.618861393596)*x[1]
-        arg[0,3]=(-0.533009370674)*x[0]**o+(-0.732258917532)*x[0]+(0.735058784793)*x[1]**o+(0.313284184128)*x[1]
-        arg[0,4]=(0.678291805831)*x[0]**o+(0.892272189132)*x[0]+(-0.902740106267)*x[1]**o+(0.902593764933)*x[1]
-        arg[1,0]=(0.101446968367)*x[0]**o+(0.758270058166)*x[0]+(-0.511416064913)*x[1]**o+(-0.464147847068)*x[1]
-        arg[1,1]=(-0.0131419066862)*x[0]**o+(-0.942460391354)*x[0]+(0.479955107486)*x[1]**o+(-0.311304181244)*x[1]
-        arg[1,2]=(0.623958732361)*x[0]**o+(-0.313196338837)*x[0]+(0.413428996617)*x[1]**o+(0.348327566672)*x[1]
-        arg[1,3]=(-0.8413636876)*x[0]**o+(-0.572573098032)*x[0]+(-0.678663954356)*x[1]**o+(-0.419716403314)*x[1]
-        arg[1,4]=(-0.580466216486)*x[0]**o+(0.384226238557)*x[0]+(-0.732722613215)*x[1]**o+(-0.0238970013828)*x[1]
-        arg[2,0]=(-0.248986933717)*x[0]**o+(0.264019654506)*x[0]+(0.0314811616292)*x[1]**o+(0.631481081422)*x[1]
-        arg[2,1]=(0.643576426484)*x[0]**o+(-0.313599735242)*x[0]+(0.908780876791)*x[1]**o+(-0.698972268201)*x[1]
-        arg[2,2]=(-0.623208321993)*x[0]**o+(0.649637800083)*x[0]+(-0.878484988208)*x[1]**o+(0.368793479691)*x[1]
-        arg[2,3]=(0.239333407828)*x[0]**o+(-0.293558915555)*x[0]+(0.271630238733)*x[1]**o+(0.741304510722)*x[1]
-        arg[2,4]=(0.175914942104)*x[0]**o+(0.336116863935)*x[0]+(-0.799168065807)*x[1]**o+(0.0264962830729)*x[1]
-        arg[3,0]=(0.777665875019)*x[0]**o+(-0.13232137001)*x[0]+(0.682046389381)*x[1]**o+(0.589069623109)*x[1]
-        arg[3,1]=(0.7607621575)*x[0]**o+(-0.81285460551)*x[0]+(0.0523010659976)*x[1]**o+(-0.913765717778)*x[1]
-        arg[3,2]=(0.822107753118)*x[0]**o+(0.508869893322)*x[0]+(0.679583348422)*x[1]**o+(-0.597814039932)*x[1]
-        arg[3,3]=(-0.77699176705)*x[0]**o+(-0.267758166676)*x[0]+(0.661073127871)*x[1]**o+(-0.41434545147)*x[1]
-        arg[3,4]=(0.223013380161)*x[0]**o+(-0.558077040245)*x[0]+(-0.450831764747)*x[1]**o+(-0.0897765635191)*x[1]
-        ref[0,0]=(-0.0571385613076)*x_ref[0]**o+(-0.296048600622)*x_ref[0]+(0.300914212927)*x_ref[1]**o+(0.81578919689)*x_ref[1]
-        ref[0,1]=(0.136796732287)*x_ref[0]**o+(0.169384864236)*x_ref[0]+(-0.874585047899)*x_ref[1]**o+(-0.67613629157)*x_ref[1]
-        ref[0,2]=(-0.947048556597)*x_ref[0]**o+(-0.807647782941)*x_ref[0]+(-0.53233790031)*x_ref[1]**o+(0.618861393596)*x_ref[1]
-        ref[0,3]=(-0.533009370674)*x_ref[0]**o+(-0.732258917532)*x_ref[0]+(0.735058784793)*x_ref[1]**o+(0.313284184128)*x_ref[1]
-        ref[0,4]=(0.678291805831)*x_ref[0]**o+(0.892272189132)*x_ref[0]+(-0.902740106267)*x_ref[1]**o+(0.902593764933)*x_ref[1]
-        ref[1,0]=(0.101446968367)*x_ref[0]**o+(0.758270058166)*x_ref[0]+(-0.511416064913)*x_ref[1]**o+(-0.464147847068)*x_ref[1]
-        ref[1,1]=(-0.0131419066862)*x_ref[0]**o+(-0.942460391354)*x_ref[0]+(0.479955107486)*x_ref[1]**o+(-0.311304181244)*x_ref[1]
-        ref[1,2]=(0.623958732361)*x_ref[0]**o+(-0.313196338837)*x_ref[0]+(0.413428996617)*x_ref[1]**o+(0.348327566672)*x_ref[1]
-        ref[1,3]=(-0.8413636876)*x_ref[0]**o+(-0.572573098032)*x_ref[0]+(-0.678663954356)*x_ref[1]**o+(-0.419716403314)*x_ref[1]
-        ref[1,4]=(-0.580466216486)*x_ref[0]**o+(0.384226238557)*x_ref[0]+(-0.732722613215)*x_ref[1]**o+(-0.0238970013828)*x_ref[1]
-        ref[2,0]=(-0.248986933717)*x_ref[0]**o+(0.264019654506)*x_ref[0]+(0.0314811616292)*x_ref[1]**o+(0.631481081422)*x_ref[1]
-        ref[2,1]=(0.643576426484)*x_ref[0]**o+(-0.313599735242)*x_ref[0]+(0.908780876791)*x_ref[1]**o+(-0.698972268201)*x_ref[1]
-        ref[2,2]=(-0.623208321993)*x_ref[0]**o+(0.649637800083)*x_ref[0]+(-0.878484988208)*x_ref[1]**o+(0.368793479691)*x_ref[1]
-        ref[2,3]=(0.239333407828)*x_ref[0]**o+(-0.293558915555)*x_ref[0]+(0.271630238733)*x_ref[1]**o+(0.741304510722)*x_ref[1]
-        ref[2,4]=(0.175914942104)*x_ref[0]**o+(0.336116863935)*x_ref[0]+(-0.799168065807)*x_ref[1]**o+(0.0264962830729)*x_ref[1]
-        ref[3,0]=(0.777665875019)*x_ref[0]**o+(-0.13232137001)*x_ref[0]+(0.682046389381)*x_ref[1]**o+(0.589069623109)*x_ref[1]
-        ref[3,1]=(0.7607621575)*x_ref[0]**o+(-0.81285460551)*x_ref[0]+(0.0523010659976)*x_ref[1]**o+(-0.913765717778)*x_ref[1]
-        ref[3,2]=(0.822107753118)*x_ref[0]**o+(0.508869893322)*x_ref[0]+(0.679583348422)*x_ref[1]**o+(-0.597814039932)*x_ref[1]
-        ref[3,3]=(-0.77699176705)*x_ref[0]**o+(-0.267758166676)*x_ref[0]+(0.661073127871)*x_ref[1]**o+(-0.41434545147)*x_ref[1]
-        ref[3,4]=(0.223013380161)*x_ref[0]**o+(-0.558077040245)*x_ref[0]+(-0.450831764747)*x_ref[1]**o+(-0.0897765635191)*x_ref[1]
-      else:
-        arg[0,0]=(0.487697656095)*x[0]**o+(0.362509734966)*x[0]+(-0.40438484582)*x[1]**o+(-0.358984481681)*x[1]+(0.157670938098)*x[2]**o+(-0.631406375093)*x[2]
-        arg[0,1]=(-0.00251154956677)*x[0]**o+(0.671447769464)*x[0]+(0.535541351526)*x[1]**o+(0.433508112485)*x[1]+(-0.897668718638)*x[2]**o+(0.141331586102)*x[2]
-        arg[0,2]=(-0.964778505658)*x[0]**o+(0.522815935313)*x[0]+(-0.750318077186)*x[1]**o+(0.0595240411196)*x[1]+(-0.384021192511)*x[2]**o+(-0.802529657745)*x[2]
-        arg[0,3]=(0.264781810221)*x[0]**o+(-0.654277693956)*x[0]+(0.890264421741)*x[1]**o+(-0.657743774786)*x[1]+(0.320234835664)*x[2]**o+(0.0637070094165)*x[2]
-        arg[0,4]=(0.712229359775)*x[0]**o+(-0.646586719826)*x[0]+(0.876519277606)*x[1]**o+(0.473649630238)*x[1]+(0.332259187685)*x[2]**o+(-0.331489699179)*x[2]
-        arg[1,0]=(0.808534274392)*x[0]**o+(-0.296462057802)*x[0]+(0.152536716655)*x[1]**o+(-0.990267302005)*x[1]+(-0.823462709316)*x[2]**o+(-0.51608634537)*x[2]
-        arg[1,1]=(-0.745238552081)*x[0]**o+(-0.892086591023)*x[0]+(0.691429994644)*x[1]**o+(-0.52538570831)*x[1]+(-0.668959934842)*x[2]**o+(-0.5178179109)*x[2]
-        arg[1,2]=(0.10173204456)*x[0]**o+(-0.853001564748)*x[0]+(0.617252846191)*x[1]**o+(-0.518228673297)*x[1]+(-0.995447484095)*x[2]**o+(0.56679145486)*x[2]
-        arg[1,3]=(0.285145125389)*x[0]**o+(0.773362877732)*x[0]+(-0.457364007088)*x[1]**o+(0.226257217659)*x[1]+(0.439832733067)*x[2]**o+(0.872812128578)*x[2]
-        arg[1,4]=(-0.581535304023)*x[0]**o+(-0.944599120493)*x[0]+(-0.720009453699)*x[1]**o+(-0.29624047891)*x[1]+(0.966528522407)*x[2]**o+(0.818945905214)*x[2]
-        arg[2,0]=(-0.650732348774)*x[0]**o+(0.368909306978)*x[0]+(-0.608327978493)*x[1]**o+(0.301600904054)*x[1]+(-0.747648472883)*x[2]**o+(0.846568601061)*x[2]
-        arg[2,1]=(-0.0221803961531)*x[0]**o+(-0.858842969825)*x[0]+(-0.40141447334)*x[1]**o+(0.408164536045)*x[1]+(-0.0131899768237)*x[2]**o+(-0.0983376041104)*x[2]
-        arg[2,2]=(0.0855129797683)*x[0]**o+(0.0645200342375)*x[0]+(0.295916169508)*x[1]**o+(0.343169626483)*x[1]+(0.973477621396)*x[2]**o+(0.179505855846)*x[2]
-        arg[2,3]=(-0.115714157482)*x[0]**o+(-0.00785628190789)*x[0]+(0.406498238895)*x[1]**o+(-0.954353977843)*x[1]+(0.751544148524)*x[2]**o+(-0.092307218389)*x[2]
-        arg[2,4]=(0.807583813259)*x[0]**o+(-0.0150562208564)*x[0]+(0.967290753425)*x[1]**o+(0.960049095802)*x[1]+(0.41935259669)*x[2]**o+(0.878823415691)*x[2]
-        arg[3,0]=(-0.162221321908)*x[0]**o+(0.0142404015457)*x[0]+(0.769189546147)*x[1]**o+(-0.251240080116)*x[1]+(0.980441953151)*x[2]**o+(-0.183639594778)*x[2]
-        arg[3,1]=(0.270231471303)*x[0]**o+(-0.527471406108)*x[0]+(-0.255144134035)*x[1]**o+(0.268061599615)*x[1]+(-0.396373327005)*x[2]**o+(0.105905036411)*x[2]
-        arg[3,2]=(0.5159632953)*x[0]**o+(-0.87397274133)*x[0]+(0.493876004047)*x[1]**o+(0.320996363656)*x[1]+(0.884345148533)*x[2]**o+(0.116262647026)*x[2]
-        arg[3,3]=(-0.354053396048)*x[0]**o+(-0.130121845174)*x[0]+(-0.33114435645)*x[1]**o+(-0.73998189126)*x[1]+(0.362417530484)*x[2]**o+(0.676820875084)*x[2]
-        arg[3,4]=(-0.53273881792)*x[0]**o+(-0.0624208514424)*x[0]+(0.680486778939)*x[1]**o+(-0.370666453954)*x[1]+(0.294345859395)*x[2]**o+(-0.679169213305)*x[2]
-        ref[0,0]=(0.487697656095)*x_ref[0]**o+(0.362509734966)*x_ref[0]+(-0.40438484582)*x_ref[1]**o+(-0.358984481681)*x_ref[1]+(0.157670938098)*x_ref[2]**o+(-0.631406375093)*x_ref[2]
-        ref[0,1]=(-0.00251154956677)*x_ref[0]**o+(0.671447769464)*x_ref[0]+(0.535541351526)*x_ref[1]**o+(0.433508112485)*x_ref[1]+(-0.897668718638)*x_ref[2]**o+(0.141331586102)*x_ref[2]
-        ref[0,2]=(-0.964778505658)*x_ref[0]**o+(0.522815935313)*x_ref[0]+(-0.750318077186)*x_ref[1]**o+(0.0595240411196)*x_ref[1]+(-0.384021192511)*x_ref[2]**o+(-0.802529657745)*x_ref[2]
-        ref[0,3]=(0.264781810221)*x_ref[0]**o+(-0.654277693956)*x_ref[0]+(0.890264421741)*x_ref[1]**o+(-0.657743774786)*x_ref[1]+(0.320234835664)*x_ref[2]**o+(0.0637070094165)*x_ref[2]
-        ref[0,4]=(0.712229359775)*x_ref[0]**o+(-0.646586719826)*x_ref[0]+(0.876519277606)*x_ref[1]**o+(0.473649630238)*x_ref[1]+(0.332259187685)*x_ref[2]**o+(-0.331489699179)*x_ref[2]
-        ref[1,0]=(0.808534274392)*x_ref[0]**o+(-0.296462057802)*x_ref[0]+(0.152536716655)*x_ref[1]**o+(-0.990267302005)*x_ref[1]+(-0.823462709316)*x_ref[2]**o+(-0.51608634537)*x_ref[2]
-        ref[1,1]=(-0.745238552081)*x_ref[0]**o+(-0.892086591023)*x_ref[0]+(0.691429994644)*x_ref[1]**o+(-0.52538570831)*x_ref[1]+(-0.668959934842)*x_ref[2]**o+(-0.5178179109)*x_ref[2]
-        ref[1,2]=(0.10173204456)*x_ref[0]**o+(-0.853001564748)*x_ref[0]+(0.617252846191)*x_ref[1]**o+(-0.518228673297)*x_ref[1]+(-0.995447484095)*x_ref[2]**o+(0.56679145486)*x_ref[2]
-        ref[1,3]=(0.285145125389)*x_ref[0]**o+(0.773362877732)*x_ref[0]+(-0.457364007088)*x_ref[1]**o+(0.226257217659)*x_ref[1]+(0.439832733067)*x_ref[2]**o+(0.872812128578)*x_ref[2]
-        ref[1,4]=(-0.581535304023)*x_ref[0]**o+(-0.944599120493)*x_ref[0]+(-0.720009453699)*x_ref[1]**o+(-0.29624047891)*x_ref[1]+(0.966528522407)*x_ref[2]**o+(0.818945905214)*x_ref[2]
-        ref[2,0]=(-0.650732348774)*x_ref[0]**o+(0.368909306978)*x_ref[0]+(-0.608327978493)*x_ref[1]**o+(0.301600904054)*x_ref[1]+(-0.747648472883)*x_ref[2]**o+(0.846568601061)*x_ref[2]
-        ref[2,1]=(-0.0221803961531)*x_ref[0]**o+(-0.858842969825)*x_ref[0]+(-0.40141447334)*x_ref[1]**o+(0.408164536045)*x_ref[1]+(-0.0131899768237)*x_ref[2]**o+(-0.0983376041104)*x_ref[2]
-        ref[2,2]=(0.0855129797683)*x_ref[0]**o+(0.0645200342375)*x_ref[0]+(0.295916169508)*x_ref[1]**o+(0.343169626483)*x_ref[1]+(0.973477621396)*x_ref[2]**o+(0.179505855846)*x_ref[2]
-        ref[2,3]=(-0.115714157482)*x_ref[0]**o+(-0.00785628190789)*x_ref[0]+(0.406498238895)*x_ref[1]**o+(-0.954353977843)*x_ref[1]+(0.751544148524)*x_ref[2]**o+(-0.092307218389)*x_ref[2]
-        ref[2,4]=(0.807583813259)*x_ref[0]**o+(-0.0150562208564)*x_ref[0]+(0.967290753425)*x_ref[1]**o+(0.960049095802)*x_ref[1]+(0.41935259669)*x_ref[2]**o+(0.878823415691)*x_ref[2]
-        ref[3,0]=(-0.162221321908)*x_ref[0]**o+(0.0142404015457)*x_ref[0]+(0.769189546147)*x_ref[1]**o+(-0.251240080116)*x_ref[1]+(0.980441953151)*x_ref[2]**o+(-0.183639594778)*x_ref[2]
-        ref[3,1]=(0.270231471303)*x_ref[0]**o+(-0.527471406108)*x_ref[0]+(-0.255144134035)*x_ref[1]**o+(0.268061599615)*x_ref[1]+(-0.396373327005)*x_ref[2]**o+(0.105905036411)*x_ref[2]
-        ref[3,2]=(0.5159632953)*x_ref[0]**o+(-0.87397274133)*x_ref[0]+(0.493876004047)*x_ref[1]**o+(0.320996363656)*x_ref[1]+(0.884345148533)*x_ref[2]**o+(0.116262647026)*x_ref[2]
-        ref[3,3]=(-0.354053396048)*x_ref[0]**o+(-0.130121845174)*x_ref[0]+(-0.33114435645)*x_ref[1]**o+(-0.73998189126)*x_ref[1]+(0.362417530484)*x_ref[2]**o+(0.676820875084)*x_ref[2]
-        ref[3,4]=(-0.53273881792)*x_ref[0]**o+(-0.0624208514424)*x_ref[0]+(0.680486778939)*x_ref[1]**o+(-0.370666453954)*x_ref[1]+(0.294345859395)*x_ref[2]**o+(-0.679169213305)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0906971676514)*x[0]**o+(-0.0640252128559)*x[0]+(-0.0108470120234)*x[1]**o+(-0.62531206416)*x[1]
-        arg[0,0,1]=(-0.0186703191671)*x[0]**o+(0.256044044276)*x[0]+(-0.420130556042)*x[1]**o+(-0.241203381189)*x[1]
-        arg[0,1,0]=(-0.287587258734)*x[0]**o+(-0.152487596827)*x[0]+(-0.554975489568)*x[1]**o+(0.713650618367)*x[1]
-        arg[0,1,1]=(0.467597882001)*x[0]**o+(0.617291271522)*x[0]+(0.839893220642)*x[1]**o+(0.477553624935)*x[1]
-        arg[1,0,0]=(0.292433268891)*x[0]**o+(0.0420372671524)*x[0]+(-0.342734694042)*x[1]**o+(0.892580432212)*x[1]
-        arg[1,0,1]=(0.191399101606)*x[0]**o+(0.413781516804)*x[0]+(-0.346483382584)*x[1]**o+(0.805718474386)*x[1]
-        arg[1,1,0]=(0.917644938285)*x[0]**o+(0.60457272962)*x[0]+(-0.0949129141155)*x[1]**o+(0.705971564397)*x[1]
-        arg[1,1,1]=(0.327738300229)*x[0]**o+(-0.738951673731)*x[0]+(0.335869509312)*x[1]**o+(0.392167761004)*x[1]
-        arg[2,0,0]=(0.460678533261)*x[0]**o+(-0.10665029868)*x[0]+(0.658148262201)*x[1]**o+(-0.75975084995)*x[1]
-        arg[2,0,1]=(0.307057582515)*x[0]**o+(0.0755776536138)*x[0]+(0.866743758656)*x[1]**o+(-0.463537240812)*x[1]
-        arg[2,1,0]=(-0.470241867396)*x[0]**o+(-0.0316070952691)*x[0]+(0.877786692055)*x[1]**o+(-0.750713976717)*x[1]
-        arg[2,1,1]=(0.755903505788)*x[0]**o+(0.398472877018)*x[0]+(-0.372159129627)*x[1]**o+(0.170870288116)*x[1]
-        arg[3,0,0]=(0.0310115714805)*x[0]**o+(0.822261427932)*x[0]+(-0.0979068243755)*x[1]**o+(0.61848414895)*x[1]
-        arg[3,0,1]=(-0.442666645023)*x[0]**o+(0.759423291727)*x[0]+(0.771826722418)*x[1]**o+(-0.342283533203)*x[1]
-        arg[3,1,0]=(0.292608821995)*x[0]**o+(0.301553824784)*x[0]+(0.445054135435)*x[1]**o+(0.990249711651)*x[1]
-        arg[3,1,1]=(0.835714722542)*x[0]**o+(0.888569910076)*x[0]+(0.76442321847)*x[1]**o+(-0.272880995105)*x[1]
-        arg[4,0,0]=(0.434738367563)*x[0]**o+(-0.801063604881)*x[0]+(-0.0152782263323)*x[1]**o+(-0.309467614762)*x[1]
-        arg[4,0,1]=(-0.647140151015)*x[0]**o+(-0.0810020795911)*x[0]+(0.356402263616)*x[1]**o+(0.861692124435)*x[1]
-        arg[4,1,0]=(-0.958501155541)*x[0]**o+(0.611720259342)*x[0]+(-0.631450146062)*x[1]**o+(-0.512668667768)*x[1]
-        arg[4,1,1]=(0.771988547023)*x[0]**o+(0.466474334634)*x[0]+(-0.380283529607)*x[1]**o+(-0.619497160805)*x[1]
-        arg[5,0,0]=(0.427386565443)*x[0]**o+(-0.178637075872)*x[0]+(0.81988184595)*x[1]**o+(-0.407798714033)*x[1]
-        arg[5,0,1]=(-0.850161084571)*x[0]**o+(0.183440360862)*x[0]+(-0.83848298192)*x[1]**o+(-0.222248160259)*x[1]
-        arg[5,1,0]=(-0.930623680879)*x[0]**o+(0.694991147173)*x[0]+(-0.299904374239)*x[1]**o+(0.552324198856)*x[1]
-        arg[5,1,1]=(0.740715083219)*x[0]**o+(0.438768785937)*x[0]+(0.977523774483)*x[1]**o+(-0.668723413125)*x[1]
-        ref[0,0,0]=(-0.0906971676514)*x_ref[0]**o+(-0.0640252128559)*x_ref[0]+(-0.0108470120234)*x_ref[1]**o+(-0.62531206416)*x_ref[1]
-        ref[0,0,1]=(-0.0186703191671)*x_ref[0]**o+(0.256044044276)*x_ref[0]+(-0.420130556042)*x_ref[1]**o+(-0.241203381189)*x_ref[1]
-        ref[0,1,0]=(-0.287587258734)*x_ref[0]**o+(-0.152487596827)*x_ref[0]+(-0.554975489568)*x_ref[1]**o+(0.713650618367)*x_ref[1]
-        ref[0,1,1]=(0.467597882001)*x_ref[0]**o+(0.617291271522)*x_ref[0]+(0.839893220642)*x_ref[1]**o+(0.477553624935)*x_ref[1]
-        ref[1,0,0]=(0.292433268891)*x_ref[0]**o+(0.0420372671524)*x_ref[0]+(-0.342734694042)*x_ref[1]**o+(0.892580432212)*x_ref[1]
-        ref[1,0,1]=(0.191399101606)*x_ref[0]**o+(0.413781516804)*x_ref[0]+(-0.346483382584)*x_ref[1]**o+(0.805718474386)*x_ref[1]
-        ref[1,1,0]=(0.917644938285)*x_ref[0]**o+(0.60457272962)*x_ref[0]+(-0.0949129141155)*x_ref[1]**o+(0.705971564397)*x_ref[1]
-        ref[1,1,1]=(0.327738300229)*x_ref[0]**o+(-0.738951673731)*x_ref[0]+(0.335869509312)*x_ref[1]**o+(0.392167761004)*x_ref[1]
-        ref[2,0,0]=(0.460678533261)*x_ref[0]**o+(-0.10665029868)*x_ref[0]+(0.658148262201)*x_ref[1]**o+(-0.75975084995)*x_ref[1]
-        ref[2,0,1]=(0.307057582515)*x_ref[0]**o+(0.0755776536138)*x_ref[0]+(0.866743758656)*x_ref[1]**o+(-0.463537240812)*x_ref[1]
-        ref[2,1,0]=(-0.470241867396)*x_ref[0]**o+(-0.0316070952691)*x_ref[0]+(0.877786692055)*x_ref[1]**o+(-0.750713976717)*x_ref[1]
-        ref[2,1,1]=(0.755903505788)*x_ref[0]**o+(0.398472877018)*x_ref[0]+(-0.372159129627)*x_ref[1]**o+(0.170870288116)*x_ref[1]
-        ref[3,0,0]=(0.0310115714805)*x_ref[0]**o+(0.822261427932)*x_ref[0]+(-0.0979068243755)*x_ref[1]**o+(0.61848414895)*x_ref[1]
-        ref[3,0,1]=(-0.442666645023)*x_ref[0]**o+(0.759423291727)*x_ref[0]+(0.771826722418)*x_ref[1]**o+(-0.342283533203)*x_ref[1]
-        ref[3,1,0]=(0.292608821995)*x_ref[0]**o+(0.301553824784)*x_ref[0]+(0.445054135435)*x_ref[1]**o+(0.990249711651)*x_ref[1]
-        ref[3,1,1]=(0.835714722542)*x_ref[0]**o+(0.888569910076)*x_ref[0]+(0.76442321847)*x_ref[1]**o+(-0.272880995105)*x_ref[1]
-        ref[4,0,0]=(0.434738367563)*x_ref[0]**o+(-0.801063604881)*x_ref[0]+(-0.0152782263323)*x_ref[1]**o+(-0.309467614762)*x_ref[1]
-        ref[4,0,1]=(-0.647140151015)*x_ref[0]**o+(-0.0810020795911)*x_ref[0]+(0.356402263616)*x_ref[1]**o+(0.861692124435)*x_ref[1]
-        ref[4,1,0]=(-0.958501155541)*x_ref[0]**o+(0.611720259342)*x_ref[0]+(-0.631450146062)*x_ref[1]**o+(-0.512668667768)*x_ref[1]
-        ref[4,1,1]=(0.771988547023)*x_ref[0]**o+(0.466474334634)*x_ref[0]+(-0.380283529607)*x_ref[1]**o+(-0.619497160805)*x_ref[1]
-        ref[5,0,0]=(0.427386565443)*x_ref[0]**o+(-0.178637075872)*x_ref[0]+(0.81988184595)*x_ref[1]**o+(-0.407798714033)*x_ref[1]
-        ref[5,0,1]=(-0.850161084571)*x_ref[0]**o+(0.183440360862)*x_ref[0]+(-0.83848298192)*x_ref[1]**o+(-0.222248160259)*x_ref[1]
-        ref[5,1,0]=(-0.930623680879)*x_ref[0]**o+(0.694991147173)*x_ref[0]+(-0.299904374239)*x_ref[1]**o+(0.552324198856)*x_ref[1]
-        ref[5,1,1]=(0.740715083219)*x_ref[0]**o+(0.438768785937)*x_ref[0]+(0.977523774483)*x_ref[1]**o+(-0.668723413125)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.0408197213005)*x[0]**o+(-0.992920054273)*x[0]+(0.122468233435)*x[1]**o+(-0.435942398199)*x[1]+(0.822235014621)*x[2]**o+(0.425925287623)*x[2]
-        arg[0,0,1]=(0.474354220259)*x[0]**o+(0.287892840646)*x[0]+(-0.519818501933)*x[1]**o+(0.412301993774)*x[1]+(-0.242320576454)*x[2]**o+(0.758556860596)*x[2]
-        arg[0,1,0]=(0.588735088154)*x[0]**o+(-0.948279493327)*x[0]+(0.194404465814)*x[1]**o+(-0.00761227943336)*x[1]+(-0.117173968067)*x[2]**o+(-0.228746139749)*x[2]
-        arg[0,1,1]=(0.166448081217)*x[0]**o+(-0.228754542424)*x[0]+(-0.87739172573)*x[1]**o+(-0.592282861607)*x[1]+(-0.836732991313)*x[2]**o+(-0.20226535214)*x[2]
-        arg[1,0,0]=(0.2683388552)*x[0]**o+(-0.733516131653)*x[0]+(-0.900887340495)*x[1]**o+(-0.614908158304)*x[1]+(0.422189467695)*x[2]**o+(0.642276887435)*x[2]
-        arg[1,0,1]=(0.965294152134)*x[0]**o+(-0.326731862045)*x[0]+(-0.797754723728)*x[1]**o+(-0.678993698958)*x[1]+(0.256815891879)*x[2]**o+(0.48610716642)*x[2]
-        arg[1,1,0]=(0.71383480118)*x[0]**o+(-0.949206151211)*x[0]+(0.40802633055)*x[1]**o+(-0.512457451544)*x[1]+(0.83647020826)*x[2]**o+(0.330550196742)*x[2]
-        arg[1,1,1]=(-0.108602934331)*x[0]**o+(-0.585532075482)*x[0]+(0.302790940309)*x[1]**o+(-0.201628116557)*x[1]+(0.523440894937)*x[2]**o+(-0.421867218852)*x[2]
-        arg[2,0,0]=(-0.911096130025)*x[0]**o+(-0.944970520542)*x[0]+(0.597179186191)*x[1]**o+(0.530539729209)*x[1]+(-0.538576718159)*x[2]**o+(-0.908863106348)*x[2]
-        arg[2,0,1]=(0.828174522282)*x[0]**o+(-0.132534369339)*x[0]+(0.851849613713)*x[1]**o+(0.191494183049)*x[1]+(-0.953488097214)*x[2]**o+(0.423553741843)*x[2]
-        arg[2,1,0]=(0.458631350156)*x[0]**o+(0.21755431391)*x[0]+(-0.128541259216)*x[1]**o+(-0.172831640065)*x[1]+(-0.62567145453)*x[2]**o+(-0.345626622399)*x[2]
-        arg[2,1,1]=(0.49890508395)*x[0]**o+(-0.395084188812)*x[0]+(-0.653164498387)*x[1]**o+(-0.656416446654)*x[1]+(-0.844855683273)*x[2]**o+(-0.813755115861)*x[2]
-        arg[3,0,0]=(-0.252710828698)*x[0]**o+(-0.0100429888666)*x[0]+(0.952930817098)*x[1]**o+(-0.950777038172)*x[1]+(0.244588721191)*x[2]**o+(-0.400442332557)*x[2]
-        arg[3,0,1]=(-0.505331423555)*x[0]**o+(-0.535163478725)*x[0]+(0.924129836434)*x[1]**o+(-0.285813201016)*x[1]+(0.225037301542)*x[2]**o+(-0.331424134564)*x[2]
-        arg[3,1,0]=(-0.556397106971)*x[0]**o+(0.26005371138)*x[0]+(0.902941320217)*x[1]**o+(0.70375648044)*x[1]+(-0.559371940837)*x[2]**o+(-0.628051748121)*x[2]
-        arg[3,1,1]=(-0.644440017615)*x[0]**o+(-0.13415915731)*x[0]+(-0.752973804206)*x[1]**o+(-0.430304389409)*x[1]+(0.892979644749)*x[2]**o+(0.0618885081881)*x[2]
-        arg[4,0,0]=(0.388902949971)*x[0]**o+(-0.413207160819)*x[0]+(-0.597892565551)*x[1]**o+(-0.433017605538)*x[1]+(0.369120396114)*x[2]**o+(-0.714185662873)*x[2]
-        arg[4,0,1]=(0.140621693105)*x[0]**o+(0.910612147355)*x[0]+(0.404844175588)*x[1]**o+(0.963351416048)*x[1]+(0.545142156468)*x[2]**o+(-0.513154196146)*x[2]
-        arg[4,1,0]=(-0.6045448854)*x[0]**o+(0.364599037279)*x[0]+(-0.165333666972)*x[1]**o+(-0.454715984949)*x[1]+(-0.123749300084)*x[2]**o+(0.23666517892)*x[2]
-        arg[4,1,1]=(-0.701819332028)*x[0]**o+(-0.945269094128)*x[0]+(0.313745376139)*x[1]**o+(-0.0508160648325)*x[1]+(0.273150632944)*x[2]**o+(0.363230489878)*x[2]
-        arg[5,0,0]=(-0.899477778287)*x[0]**o+(0.408300340496)*x[0]+(-0.501090863132)*x[1]**o+(-0.142172524799)*x[1]+(0.840930927028)*x[2]**o+(0.0786174984564)*x[2]
-        arg[5,0,1]=(0.816863720765)*x[0]**o+(0.421613919321)*x[0]+(0.619636513942)*x[1]**o+(-0.867504595488)*x[1]+(-0.377345269009)*x[2]**o+(-0.884630348781)*x[2]
-        arg[5,1,0]=(0.972307172208)*x[0]**o+(0.704673083035)*x[0]+(0.546566839332)*x[1]**o+(-0.303145527888)*x[1]+(-0.203985539635)*x[2]**o+(0.984097584463)*x[2]
-        arg[5,1,1]=(0.67971485539)*x[0]**o+(0.492284313707)*x[0]+(0.139113989973)*x[1]**o+(-0.981414708174)*x[1]+(0.585926444541)*x[2]**o+(-0.790952419012)*x[2]
-        ref[0,0,0]=(0.0408197213005)*x_ref[0]**o+(-0.992920054273)*x_ref[0]+(0.122468233435)*x_ref[1]**o+(-0.435942398199)*x_ref[1]+(0.822235014621)*x_ref[2]**o+(0.425925287623)*x_ref[2]
-        ref[0,0,1]=(0.474354220259)*x_ref[0]**o+(0.287892840646)*x_ref[0]+(-0.519818501933)*x_ref[1]**o+(0.412301993774)*x_ref[1]+(-0.242320576454)*x_ref[2]**o+(0.758556860596)*x_ref[2]
-        ref[0,1,0]=(0.588735088154)*x_ref[0]**o+(-0.948279493327)*x_ref[0]+(0.194404465814)*x_ref[1]**o+(-0.00761227943336)*x_ref[1]+(-0.117173968067)*x_ref[2]**o+(-0.228746139749)*x_ref[2]
-        ref[0,1,1]=(0.166448081217)*x_ref[0]**o+(-0.228754542424)*x_ref[0]+(-0.87739172573)*x_ref[1]**o+(-0.592282861607)*x_ref[1]+(-0.836732991313)*x_ref[2]**o+(-0.20226535214)*x_ref[2]
-        ref[1,0,0]=(0.2683388552)*x_ref[0]**o+(-0.733516131653)*x_ref[0]+(-0.900887340495)*x_ref[1]**o+(-0.614908158304)*x_ref[1]+(0.422189467695)*x_ref[2]**o+(0.642276887435)*x_ref[2]
-        ref[1,0,1]=(0.965294152134)*x_ref[0]**o+(-0.326731862045)*x_ref[0]+(-0.797754723728)*x_ref[1]**o+(-0.678993698958)*x_ref[1]+(0.256815891879)*x_ref[2]**o+(0.48610716642)*x_ref[2]
-        ref[1,1,0]=(0.71383480118)*x_ref[0]**o+(-0.949206151211)*x_ref[0]+(0.40802633055)*x_ref[1]**o+(-0.512457451544)*x_ref[1]+(0.83647020826)*x_ref[2]**o+(0.330550196742)*x_ref[2]
-        ref[1,1,1]=(-0.108602934331)*x_ref[0]**o+(-0.585532075482)*x_ref[0]+(0.302790940309)*x_ref[1]**o+(-0.201628116557)*x_ref[1]+(0.523440894937)*x_ref[2]**o+(-0.421867218852)*x_ref[2]
-        ref[2,0,0]=(-0.911096130025)*x_ref[0]**o+(-0.944970520542)*x_ref[0]+(0.597179186191)*x_ref[1]**o+(0.530539729209)*x_ref[1]+(-0.538576718159)*x_ref[2]**o+(-0.908863106348)*x_ref[2]
-        ref[2,0,1]=(0.828174522282)*x_ref[0]**o+(-0.132534369339)*x_ref[0]+(0.851849613713)*x_ref[1]**o+(0.191494183049)*x_ref[1]+(-0.953488097214)*x_ref[2]**o+(0.423553741843)*x_ref[2]
-        ref[2,1,0]=(0.458631350156)*x_ref[0]**o+(0.21755431391)*x_ref[0]+(-0.128541259216)*x_ref[1]**o+(-0.172831640065)*x_ref[1]+(-0.62567145453)*x_ref[2]**o+(-0.345626622399)*x_ref[2]
-        ref[2,1,1]=(0.49890508395)*x_ref[0]**o+(-0.395084188812)*x_ref[0]+(-0.653164498387)*x_ref[1]**o+(-0.656416446654)*x_ref[1]+(-0.844855683273)*x_ref[2]**o+(-0.813755115861)*x_ref[2]
-        ref[3,0,0]=(-0.252710828698)*x_ref[0]**o+(-0.0100429888666)*x_ref[0]+(0.952930817098)*x_ref[1]**o+(-0.950777038172)*x_ref[1]+(0.244588721191)*x_ref[2]**o+(-0.400442332557)*x_ref[2]
-        ref[3,0,1]=(-0.505331423555)*x_ref[0]**o+(-0.535163478725)*x_ref[0]+(0.924129836434)*x_ref[1]**o+(-0.285813201016)*x_ref[1]+(0.225037301542)*x_ref[2]**o+(-0.331424134564)*x_ref[2]
-        ref[3,1,0]=(-0.556397106971)*x_ref[0]**o+(0.26005371138)*x_ref[0]+(0.902941320217)*x_ref[1]**o+(0.70375648044)*x_ref[1]+(-0.559371940837)*x_ref[2]**o+(-0.628051748121)*x_ref[2]
-        ref[3,1,1]=(-0.644440017615)*x_ref[0]**o+(-0.13415915731)*x_ref[0]+(-0.752973804206)*x_ref[1]**o+(-0.430304389409)*x_ref[1]+(0.892979644749)*x_ref[2]**o+(0.0618885081881)*x_ref[2]
-        ref[4,0,0]=(0.388902949971)*x_ref[0]**o+(-0.413207160819)*x_ref[0]+(-0.597892565551)*x_ref[1]**o+(-0.433017605538)*x_ref[1]+(0.369120396114)*x_ref[2]**o+(-0.714185662873)*x_ref[2]
-        ref[4,0,1]=(0.140621693105)*x_ref[0]**o+(0.910612147355)*x_ref[0]+(0.404844175588)*x_ref[1]**o+(0.963351416048)*x_ref[1]+(0.545142156468)*x_ref[2]**o+(-0.513154196146)*x_ref[2]
-        ref[4,1,0]=(-0.6045448854)*x_ref[0]**o+(0.364599037279)*x_ref[0]+(-0.165333666972)*x_ref[1]**o+(-0.454715984949)*x_ref[1]+(-0.123749300084)*x_ref[2]**o+(0.23666517892)*x_ref[2]
-        ref[4,1,1]=(-0.701819332028)*x_ref[0]**o+(-0.945269094128)*x_ref[0]+(0.313745376139)*x_ref[1]**o+(-0.0508160648325)*x_ref[1]+(0.273150632944)*x_ref[2]**o+(0.363230489878)*x_ref[2]
-        ref[5,0,0]=(-0.899477778287)*x_ref[0]**o+(0.408300340496)*x_ref[0]+(-0.501090863132)*x_ref[1]**o+(-0.142172524799)*x_ref[1]+(0.840930927028)*x_ref[2]**o+(0.0786174984564)*x_ref[2]
-        ref[5,0,1]=(0.816863720765)*x_ref[0]**o+(0.421613919321)*x_ref[0]+(0.619636513942)*x_ref[1]**o+(-0.867504595488)*x_ref[1]+(-0.377345269009)*x_ref[2]**o+(-0.884630348781)*x_ref[2]
-        ref[5,1,0]=(0.972307172208)*x_ref[0]**o+(0.704673083035)*x_ref[0]+(0.546566839332)*x_ref[1]**o+(-0.303145527888)*x_ref[1]+(-0.203985539635)*x_ref[2]**o+(0.984097584463)*x_ref[2]
-        ref[5,1,1]=(0.67971485539)*x_ref[0]**o+(0.492284313707)*x_ref[0]+(0.139113989973)*x_ref[1]**o+(-0.981414708174)*x_ref[1]+(0.585926444541)*x_ref[2]**o+(-0.790952419012)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.717741572212)*x[0]**o+(-0.771801794802)*x[0]+(-0.782201793954)*x[1]**o+(0.125253178673)*x[1]
-        arg[0,0,0,1]=(-0.483339499341)*x[0]**o+(0.0177945970437)*x[0]+(0.233532060933)*x[1]**o+(-0.465948890703)*x[1]
-        arg[0,0,1,0]=(0.140544455071)*x[0]**o+(-0.120145399579)*x[0]+(-0.0732045826929)*x[1]**o+(-0.738165902415)*x[1]
-        arg[0,0,1,1]=(0.98057407477)*x[0]**o+(0.346125329427)*x[0]+(0.697386820108)*x[1]**o+(0.402406370862)*x[1]
-        arg[0,0,2,0]=(0.347641628204)*x[0]**o+(-0.217938924727)*x[0]+(-0.0572727430966)*x[1]**o+(0.170631149745)*x[1]
-        arg[0,0,2,1]=(0.621840702108)*x[0]**o+(-0.109219941839)*x[0]+(0.894052962811)*x[1]**o+(0.423894680808)*x[1]
-        arg[0,1,0,0]=(0.0339315069567)*x[0]**o+(-0.655546201957)*x[0]+(-0.271776247317)*x[1]**o+(0.4760527815)*x[1]
-        arg[0,1,0,1]=(0.904216237912)*x[0]**o+(0.974869309983)*x[0]+(0.678379481202)*x[1]**o+(0.602534020957)*x[1]
-        arg[0,1,1,0]=(-0.98805028173)*x[0]**o+(0.255251214419)*x[0]+(0.659010647624)*x[1]**o+(-0.45360685971)*x[1]
-        arg[0,1,1,1]=(0.0884339867328)*x[0]**o+(-0.325188714625)*x[0]+(0.158562643552)*x[1]**o+(-0.788600388567)*x[1]
-        arg[0,1,2,0]=(0.976404407593)*x[0]**o+(0.353231650963)*x[0]+(0.546951413477)*x[1]**o+(0.0738098551899)*x[1]
-        arg[0,1,2,1]=(-0.812156797654)*x[0]**o+(-0.0180014270879)*x[0]+(0.686011517957)*x[1]**o+(0.148522434365)*x[1]
-        arg[0,2,0,0]=(-0.40018516407)*x[0]**o+(-0.0512695503575)*x[0]+(-0.715512784143)*x[1]**o+(0.111064716031)*x[1]
-        arg[0,2,0,1]=(-0.963397739298)*x[0]**o+(0.406951519848)*x[0]+(-0.293539028967)*x[1]**o+(-0.549328925146)*x[1]
-        arg[0,2,1,0]=(-0.00827402449089)*x[0]**o+(-0.657982352244)*x[0]+(-0.515966831052)*x[1]**o+(0.531853371259)*x[1]
-        arg[0,2,1,1]=(0.0379862601491)*x[0]**o+(0.988691147833)*x[0]+(0.820623911484)*x[1]**o+(0.689064076022)*x[1]
-        arg[0,2,2,0]=(-0.857638654259)*x[0]**o+(0.664968676908)*x[0]+(-0.228424264597)*x[1]**o+(0.740003679791)*x[1]
-        arg[0,2,2,1]=(0.456486069586)*x[0]**o+(-0.510130176146)*x[0]+(-0.189525160745)*x[1]**o+(0.497975981413)*x[1]
-        arg[0,3,0,0]=(-0.981633737105)*x[0]**o+(0.25636883881)*x[0]+(-0.0477676975467)*x[1]**o+(0.654475880014)*x[1]
-        arg[0,3,0,1]=(-0.0710284929969)*x[0]**o+(0.338590765191)*x[0]+(0.639048913997)*x[1]**o+(-0.24999606762)*x[1]
-        arg[0,3,1,0]=(-0.731484482659)*x[0]**o+(-0.808253846389)*x[0]+(-0.911723431862)*x[1]**o+(-0.266029942425)*x[1]
-        arg[0,3,1,1]=(0.909037857376)*x[0]**o+(-0.164525039433)*x[0]+(-0.924332370345)*x[1]**o+(0.476479399362)*x[1]
-        arg[0,3,2,0]=(0.00534173833653)*x[0]**o+(-0.435160515142)*x[0]+(0.402701511687)*x[1]**o+(0.161631276653)*x[1]
-        arg[0,3,2,1]=(-0.595791669027)*x[0]**o+(0.170580206948)*x[0]+(0.468802250813)*x[1]**o+(-0.881472636722)*x[1]
-        arg[0,4,0,0]=(-0.0739506349513)*x[0]**o+(0.513385505957)*x[0]+(0.046977740371)*x[1]**o+(0.95763159987)*x[1]
-        arg[0,4,0,1]=(-0.286789006223)*x[0]**o+(0.017476293519)*x[0]+(0.637378781092)*x[1]**o+(-0.670201122126)*x[1]
-        arg[0,4,1,0]=(0.159607100455)*x[0]**o+(0.715341910227)*x[0]+(0.949546645819)*x[1]**o+(0.362982182775)*x[1]
-        arg[0,4,1,1]=(-0.237702024358)*x[0]**o+(-0.520488841454)*x[0]+(0.606333933569)*x[1]**o+(-0.00662757701049)*x[1]
-        arg[0,4,2,0]=(-0.415753817901)*x[0]**o+(0.731285464784)*x[0]+(0.15987336144)*x[1]**o+(0.0697706236338)*x[1]
-        arg[0,4,2,1]=(0.0467482158427)*x[0]**o+(0.306004722736)*x[0]+(-0.905184725692)*x[1]**o+(-0.158017889366)*x[1]
-        arg[1,0,0,0]=(-0.785535082426)*x[0]**o+(-0.189285100452)*x[0]+(-0.766349940057)*x[1]**o+(0.531469308995)*x[1]
-        arg[1,0,0,1]=(0.522213196477)*x[0]**o+(-0.661381741437)*x[0]+(0.816089886956)*x[1]**o+(0.139829382305)*x[1]
-        arg[1,0,1,0]=(0.0957295570417)*x[0]**o+(-0.105252674536)*x[0]+(-0.569429953382)*x[1]**o+(-0.801934666657)*x[1]
-        arg[1,0,1,1]=(-0.557307051058)*x[0]**o+(0.218852576416)*x[0]+(0.430167216464)*x[1]**o+(-0.112285681761)*x[1]
-        arg[1,0,2,0]=(0.288472422477)*x[0]**o+(0.294377994763)*x[0]+(-0.809503961511)*x[1]**o+(0.357020226991)*x[1]
-        arg[1,0,2,1]=(-0.148113477705)*x[0]**o+(0.164468646294)*x[0]+(0.7977142476)*x[1]**o+(-0.407274933384)*x[1]
-        arg[1,1,0,0]=(-0.926374434822)*x[0]**o+(-0.107713463193)*x[0]+(-0.511635723869)*x[1]**o+(0.259319717689)*x[1]
-        arg[1,1,0,1]=(-0.18636582243)*x[0]**o+(0.698258973628)*x[0]+(0.234379281397)*x[1]**o+(0.596195875495)*x[1]
-        arg[1,1,1,0]=(-0.180395892006)*x[0]**o+(0.631248500084)*x[0]+(0.104751616377)*x[1]**o+(0.204500206653)*x[1]
-        arg[1,1,1,1]=(-0.517119564238)*x[0]**o+(-0.16634015634)*x[0]+(0.556785586675)*x[1]**o+(0.42659306392)*x[1]
-        arg[1,1,2,0]=(0.163807238958)*x[0]**o+(-0.534619478446)*x[0]+(-0.700353460753)*x[1]**o+(0.121393131648)*x[1]
-        arg[1,1,2,1]=(0.964276278961)*x[0]**o+(0.846030751304)*x[0]+(-0.745301894392)*x[1]**o+(0.33821485558)*x[1]
-        arg[1,2,0,0]=(0.333173101086)*x[0]**o+(0.774848048743)*x[0]+(-0.659091916357)*x[1]**o+(-0.797247144497)*x[1]
-        arg[1,2,0,1]=(0.0581394534285)*x[0]**o+(-0.524771663031)*x[0]+(-0.519465753317)*x[1]**o+(0.71748795226)*x[1]
-        arg[1,2,1,0]=(0.224935262833)*x[0]**o+(-0.393399819306)*x[0]+(0.199349075224)*x[1]**o+(-0.808847009412)*x[1]
-        arg[1,2,1,1]=(0.0385750795521)*x[0]**o+(-8.09949553151e-05)*x[0]+(0.496860964506)*x[1]**o+(0.0119507407829)*x[1]
-        arg[1,2,2,0]=(0.876341556167)*x[0]**o+(0.18082766372)*x[0]+(0.401349871827)*x[1]**o+(-0.543439037303)*x[1]
-        arg[1,2,2,1]=(-0.894525004507)*x[0]**o+(-0.516771143695)*x[0]+(0.0410916490263)*x[1]**o+(0.753841618439)*x[1]
-        arg[1,3,0,0]=(0.251979970924)*x[0]**o+(0.790276550438)*x[0]+(-0.155708793888)*x[1]**o+(0.28971278336)*x[1]
-        arg[1,3,0,1]=(0.258336265436)*x[0]**o+(0.696642875149)*x[0]+(0.0561355915649)*x[1]**o+(0.601839744417)*x[1]
-        arg[1,3,1,0]=(-0.978729102785)*x[0]**o+(0.335280613262)*x[0]+(0.89228798232)*x[1]**o+(-0.693050679348)*x[1]
-        arg[1,3,1,1]=(-0.885817753431)*x[0]**o+(-0.0641571535708)*x[0]+(-0.649578576181)*x[1]**o+(-0.95773137602)*x[1]
-        arg[1,3,2,0]=(-0.333891001461)*x[0]**o+(-0.496064308564)*x[0]+(0.438549603377)*x[1]**o+(0.0772468142672)*x[1]
-        arg[1,3,2,1]=(-0.16171788255)*x[0]**o+(-0.939293453222)*x[0]+(-0.284522648546)*x[1]**o+(0.744642328375)*x[1]
-        arg[1,4,0,0]=(0.806133262332)*x[0]**o+(-0.0225320206432)*x[0]+(0.125958642606)*x[1]**o+(0.610630249467)*x[1]
-        arg[1,4,0,1]=(0.657971870946)*x[0]**o+(0.698894701525)*x[0]+(-0.595952612496)*x[1]**o+(-0.38268841292)*x[1]
-        arg[1,4,1,0]=(-0.277274411331)*x[0]**o+(-0.483183004514)*x[0]+(0.77656657009)*x[1]**o+(-0.959290466645)*x[1]
-        arg[1,4,1,1]=(-0.96384356305)*x[0]**o+(-0.00383301781476)*x[0]+(0.788010409608)*x[1]**o+(0.135378744316)*x[1]
-        arg[1,4,2,0]=(0.986761958017)*x[0]**o+(-0.570276378038)*x[0]+(-0.515784028315)*x[1]**o+(0.487125123439)*x[1]
-        arg[1,4,2,1]=(-0.954735054702)*x[0]**o+(-0.0610323074217)*x[0]+(-0.255284859281)*x[1]**o+(0.277795725698)*x[1]
-        arg[2,0,0,0]=(-0.708301219324)*x[0]**o+(-0.970166781553)*x[0]+(-0.0836451425855)*x[1]**o+(0.525854202995)*x[1]
-        arg[2,0,0,1]=(-0.0995393865183)*x[0]**o+(-0.0156624820324)*x[0]+(0.225529316197)*x[1]**o+(0.142617834056)*x[1]
-        arg[2,0,1,0]=(-0.585329524103)*x[0]**o+(0.590285924441)*x[0]+(0.201483726322)*x[1]**o+(-0.735262197689)*x[1]
-        arg[2,0,1,1]=(-0.682877182963)*x[0]**o+(-0.162682262799)*x[0]+(-0.890051459843)*x[1]**o+(-0.0188015866765)*x[1]
-        arg[2,0,2,0]=(0.868935476294)*x[0]**o+(-0.629891068854)*x[0]+(0.335632865663)*x[1]**o+(-0.955849055716)*x[1]
-        arg[2,0,2,1]=(-0.907933228238)*x[0]**o+(-0.105861987974)*x[0]+(-0.131372383042)*x[1]**o+(-0.970114136854)*x[1]
-        arg[2,1,0,0]=(-0.275788501814)*x[0]**o+(-0.992861867033)*x[0]+(-0.80676324962)*x[1]**o+(0.269244680224)*x[1]
-        arg[2,1,0,1]=(-0.704704138774)*x[0]**o+(-0.371803193009)*x[0]+(-0.0190586405922)*x[1]**o+(-0.0828837624698)*x[1]
-        arg[2,1,1,0]=(-0.532645566013)*x[0]**o+(0.571754809868)*x[0]+(0.656737493773)*x[1]**o+(-0.548229591842)*x[1]
-        arg[2,1,1,1]=(0.23836921087)*x[0]**o+(0.707475737785)*x[0]+(-0.59660155968)*x[1]**o+(-0.450204951071)*x[1]
-        arg[2,1,2,0]=(-0.534027348014)*x[0]**o+(0.332100193727)*x[0]+(-0.864157138567)*x[1]**o+(-0.41833267066)*x[1]
-        arg[2,1,2,1]=(0.459878593269)*x[0]**o+(0.446259140228)*x[0]+(0.571242887502)*x[1]**o+(-0.0390525669486)*x[1]
-        arg[2,2,0,0]=(0.322052799527)*x[0]**o+(-0.915265209304)*x[0]+(-0.99942007618)*x[1]**o+(0.482294513743)*x[1]
-        arg[2,2,0,1]=(0.558489194456)*x[0]**o+(0.00400576554086)*x[0]+(-0.87484330165)*x[1]**o+(-0.664504218977)*x[1]
-        arg[2,2,1,0]=(0.669621607461)*x[0]**o+(-0.0450960554319)*x[0]+(-0.221151480246)*x[1]**o+(0.0123621737211)*x[1]
-        arg[2,2,1,1]=(0.476743013029)*x[0]**o+(0.11118371822)*x[0]+(-0.202074315677)*x[1]**o+(0.377649433458)*x[1]
-        arg[2,2,2,0]=(0.667910543701)*x[0]**o+(0.035703922547)*x[0]+(-0.274733967095)*x[1]**o+(-0.998934720182)*x[1]
-        arg[2,2,2,1]=(0.578909660087)*x[0]**o+(0.149900086514)*x[0]+(-0.226597651858)*x[1]**o+(0.169175812287)*x[1]
-        arg[2,3,0,0]=(0.158370246586)*x[0]**o+(0.595643112285)*x[0]+(-0.476875564052)*x[1]**o+(0.869752657517)*x[1]
-        arg[2,3,0,1]=(0.99718847714)*x[0]**o+(0.581531822297)*x[0]+(-0.607102775564)*x[1]**o+(-0.8317970284)*x[1]
-        arg[2,3,1,0]=(-0.27390195745)*x[0]**o+(0.0512853330414)*x[0]+(0.465190666302)*x[1]**o+(0.042533388788)*x[1]
-        arg[2,3,1,1]=(-0.183679504962)*x[0]**o+(-0.0522782076121)*x[0]+(0.921423118529)*x[1]**o+(-0.0315080275225)*x[1]
-        arg[2,3,2,0]=(0.0421842348778)*x[0]**o+(0.462023049702)*x[0]+(-0.888342606803)*x[1]**o+(-0.956503447884)*x[1]
-        arg[2,3,2,1]=(-0.950820288444)*x[0]**o+(0.104271990168)*x[0]+(-0.607212909582)*x[1]**o+(-0.16283931259)*x[1]
-        arg[2,4,0,0]=(0.113505933533)*x[0]**o+(0.27873514806)*x[0]+(0.736699443523)*x[1]**o+(-0.951737555693)*x[1]
-        arg[2,4,0,1]=(0.264170584849)*x[0]**o+(-0.226649236617)*x[0]+(0.489902180874)*x[1]**o+(-0.191536591762)*x[1]
-        arg[2,4,1,0]=(0.712322285985)*x[0]**o+(-0.323395455815)*x[0]+(-0.298356681586)*x[1]**o+(0.699891974541)*x[1]
-        arg[2,4,1,1]=(-0.631057763255)*x[0]**o+(-0.489374933445)*x[0]+(-0.021591806874)*x[1]**o+(-0.692800124585)*x[1]
-        arg[2,4,2,0]=(0.916068935184)*x[0]**o+(0.33779688858)*x[0]+(0.06300443559)*x[1]**o+(-0.231385203399)*x[1]
-        arg[2,4,2,1]=(-0.283485044625)*x[0]**o+(0.548366574442)*x[0]+(-0.543953132872)*x[1]**o+(-0.956662823037)*x[1]
-        arg[3,0,0,0]=(0.709349274221)*x[0]**o+(-0.342981009263)*x[0]+(-0.682331761929)*x[1]**o+(0.673169884813)*x[1]
-        arg[3,0,0,1]=(0.236249836593)*x[0]**o+(-0.682845054434)*x[0]+(-0.349169988218)*x[1]**o+(0.502684425824)*x[1]
-        arg[3,0,1,0]=(-0.561655748793)*x[0]**o+(0.120183772326)*x[0]+(-0.966535325583)*x[1]**o+(-0.0585117264949)*x[1]
-        arg[3,0,1,1]=(-0.661030287189)*x[0]**o+(-0.322924086505)*x[0]+(-0.986892059552)*x[1]**o+(-0.778969361365)*x[1]
-        arg[3,0,2,0]=(-0.166307107307)*x[0]**o+(0.612931303617)*x[0]+(-0.283925165456)*x[1]**o+(0.5998038814)*x[1]
-        arg[3,0,2,1]=(0.205099355916)*x[0]**o+(-0.520970536278)*x[0]+(0.900416833183)*x[1]**o+(0.981826306069)*x[1]
-        arg[3,1,0,0]=(-0.875306666443)*x[0]**o+(0.0189358479861)*x[0]+(0.101187857445)*x[1]**o+(-0.873584307534)*x[1]
-        arg[3,1,0,1]=(-0.0203656235757)*x[0]**o+(-0.579229777042)*x[0]+(-0.0799345631826)*x[1]**o+(0.896315444069)*x[1]
-        arg[3,1,1,0]=(0.576791459982)*x[0]**o+(-0.86541815506)*x[0]+(-0.582764176207)*x[1]**o+(-0.249437395011)*x[1]
-        arg[3,1,1,1]=(0.525953680497)*x[0]**o+(-0.222445717402)*x[0]+(-0.87710202063)*x[1]**o+(-0.762921821973)*x[1]
-        arg[3,1,2,0]=(-0.883737185908)*x[0]**o+(0.254053241277)*x[0]+(0.559803298059)*x[1]**o+(-0.577376956856)*x[1]
-        arg[3,1,2,1]=(-0.125792083387)*x[0]**o+(-0.771549307509)*x[0]+(0.142493480552)*x[1]**o+(0.459996962548)*x[1]
-        arg[3,2,0,0]=(0.0531598927049)*x[0]**o+(-0.950343229037)*x[0]+(-0.748240453154)*x[1]**o+(0.850555892342)*x[1]
-        arg[3,2,0,1]=(-0.660852152041)*x[0]**o+(-0.763119278604)*x[0]+(-0.811925409663)*x[1]**o+(-0.178765071495)*x[1]
-        arg[3,2,1,0]=(-0.189124223305)*x[0]**o+(-0.410392909042)*x[0]+(0.993247167522)*x[1]**o+(0.291451796298)*x[1]
-        arg[3,2,1,1]=(0.83496133421)*x[0]**o+(0.695147480265)*x[0]+(0.444420524946)*x[1]**o+(0.107454620114)*x[1]
-        arg[3,2,2,0]=(0.94687479313)*x[0]**o+(-0.140702324395)*x[0]+(0.149203502428)*x[1]**o+(-0.338246126345)*x[1]
-        arg[3,2,2,1]=(0.147609394709)*x[0]**o+(-0.549219765239)*x[0]+(0.397308993347)*x[1]**o+(0.0402189312685)*x[1]
-        arg[3,3,0,0]=(0.27400981409)*x[0]**o+(-0.516367266257)*x[0]+(-0.784095952814)*x[1]**o+(0.32858899009)*x[1]
-        arg[3,3,0,1]=(-0.393457382163)*x[0]**o+(0.590406794051)*x[0]+(0.328523918357)*x[1]**o+(0.899537513355)*x[1]
-        arg[3,3,1,0]=(-0.851038623366)*x[0]**o+(0.596974864726)*x[0]+(-0.338630687551)*x[1]**o+(0.634961435042)*x[1]
-        arg[3,3,1,1]=(0.569166143918)*x[0]**o+(-0.388162282491)*x[0]+(0.764830536733)*x[1]**o+(-0.426737342542)*x[1]
-        arg[3,3,2,0]=(0.502221903448)*x[0]**o+(0.940382225897)*x[0]+(0.563444730579)*x[1]**o+(0.023210869151)*x[1]
-        arg[3,3,2,1]=(0.061695403852)*x[0]**o+(0.868302188758)*x[0]+(0.0855803325758)*x[1]**o+(-0.24366173638)*x[1]
-        arg[3,4,0,0]=(-0.533038182387)*x[0]**o+(0.0222388915737)*x[0]+(0.529037752769)*x[1]**o+(-0.0665320895494)*x[1]
-        arg[3,4,0,1]=(0.714374055253)*x[0]**o+(-0.623670743333)*x[0]+(-0.866024792929)*x[1]**o+(-0.0673124896111)*x[1]
-        arg[3,4,1,0]=(-0.0523466615045)*x[0]**o+(-0.472563426622)*x[0]+(0.139892673626)*x[1]**o+(0.539655417178)*x[1]
-        arg[3,4,1,1]=(-0.473032580514)*x[0]**o+(0.692812093618)*x[0]+(0.664400517742)*x[1]**o+(0.184125423364)*x[1]
-        arg[3,4,2,0]=(-0.0340798058725)*x[0]**o+(-0.58900562863)*x[0]+(0.396856384717)*x[1]**o+(-0.559175428019)*x[1]
-        arg[3,4,2,1]=(-0.217679376634)*x[0]**o+(-0.90389036667)*x[0]+(0.967372942873)*x[1]**o+(-0.482913619277)*x[1]
-        ref[0,0,0,0]=(-0.717741572212)*x_ref[0]**o+(-0.771801794802)*x_ref[0]+(-0.782201793954)*x_ref[1]**o+(0.125253178673)*x_ref[1]
-        ref[0,0,0,1]=(-0.483339499341)*x_ref[0]**o+(0.0177945970437)*x_ref[0]+(0.233532060933)*x_ref[1]**o+(-0.465948890703)*x_ref[1]
-        ref[0,0,1,0]=(0.140544455071)*x_ref[0]**o+(-0.120145399579)*x_ref[0]+(-0.0732045826929)*x_ref[1]**o+(-0.738165902415)*x_ref[1]
-        ref[0,0,1,1]=(0.98057407477)*x_ref[0]**o+(0.346125329427)*x_ref[0]+(0.697386820108)*x_ref[1]**o+(0.402406370862)*x_ref[1]
-        ref[0,0,2,0]=(0.347641628204)*x_ref[0]**o+(-0.217938924727)*x_ref[0]+(-0.0572727430966)*x_ref[1]**o+(0.170631149745)*x_ref[1]
-        ref[0,0,2,1]=(0.621840702108)*x_ref[0]**o+(-0.109219941839)*x_ref[0]+(0.894052962811)*x_ref[1]**o+(0.423894680808)*x_ref[1]
-        ref[0,1,0,0]=(0.0339315069567)*x_ref[0]**o+(-0.655546201957)*x_ref[0]+(-0.271776247317)*x_ref[1]**o+(0.4760527815)*x_ref[1]
-        ref[0,1,0,1]=(0.904216237912)*x_ref[0]**o+(0.974869309983)*x_ref[0]+(0.678379481202)*x_ref[1]**o+(0.602534020957)*x_ref[1]
-        ref[0,1,1,0]=(-0.98805028173)*x_ref[0]**o+(0.255251214419)*x_ref[0]+(0.659010647624)*x_ref[1]**o+(-0.45360685971)*x_ref[1]
-        ref[0,1,1,1]=(0.0884339867328)*x_ref[0]**o+(-0.325188714625)*x_ref[0]+(0.158562643552)*x_ref[1]**o+(-0.788600388567)*x_ref[1]
-        ref[0,1,2,0]=(0.976404407593)*x_ref[0]**o+(0.353231650963)*x_ref[0]+(0.546951413477)*x_ref[1]**o+(0.0738098551899)*x_ref[1]
-        ref[0,1,2,1]=(-0.812156797654)*x_ref[0]**o+(-0.0180014270879)*x_ref[0]+(0.686011517957)*x_ref[1]**o+(0.148522434365)*x_ref[1]
-        ref[0,2,0,0]=(-0.40018516407)*x_ref[0]**o+(-0.0512695503575)*x_ref[0]+(-0.715512784143)*x_ref[1]**o+(0.111064716031)*x_ref[1]
-        ref[0,2,0,1]=(-0.963397739298)*x_ref[0]**o+(0.406951519848)*x_ref[0]+(-0.293539028967)*x_ref[1]**o+(-0.549328925146)*x_ref[1]
-        ref[0,2,1,0]=(-0.00827402449089)*x_ref[0]**o+(-0.657982352244)*x_ref[0]+(-0.515966831052)*x_ref[1]**o+(0.531853371259)*x_ref[1]
-        ref[0,2,1,1]=(0.0379862601491)*x_ref[0]**o+(0.988691147833)*x_ref[0]+(0.820623911484)*x_ref[1]**o+(0.689064076022)*x_ref[1]
-        ref[0,2,2,0]=(-0.857638654259)*x_ref[0]**o+(0.664968676908)*x_ref[0]+(-0.228424264597)*x_ref[1]**o+(0.740003679791)*x_ref[1]
-        ref[0,2,2,1]=(0.456486069586)*x_ref[0]**o+(-0.510130176146)*x_ref[0]+(-0.189525160745)*x_ref[1]**o+(0.497975981413)*x_ref[1]
-        ref[0,3,0,0]=(-0.981633737105)*x_ref[0]**o+(0.25636883881)*x_ref[0]+(-0.0477676975467)*x_ref[1]**o+(0.654475880014)*x_ref[1]
-        ref[0,3,0,1]=(-0.0710284929969)*x_ref[0]**o+(0.338590765191)*x_ref[0]+(0.639048913997)*x_ref[1]**o+(-0.24999606762)*x_ref[1]
-        ref[0,3,1,0]=(-0.731484482659)*x_ref[0]**o+(-0.808253846389)*x_ref[0]+(-0.911723431862)*x_ref[1]**o+(-0.266029942425)*x_ref[1]
-        ref[0,3,1,1]=(0.909037857376)*x_ref[0]**o+(-0.164525039433)*x_ref[0]+(-0.924332370345)*x_ref[1]**o+(0.476479399362)*x_ref[1]
-        ref[0,3,2,0]=(0.00534173833653)*x_ref[0]**o+(-0.435160515142)*x_ref[0]+(0.402701511687)*x_ref[1]**o+(0.161631276653)*x_ref[1]
-        ref[0,3,2,1]=(-0.595791669027)*x_ref[0]**o+(0.170580206948)*x_ref[0]+(0.468802250813)*x_ref[1]**o+(-0.881472636722)*x_ref[1]
-        ref[0,4,0,0]=(-0.0739506349513)*x_ref[0]**o+(0.513385505957)*x_ref[0]+(0.046977740371)*x_ref[1]**o+(0.95763159987)*x_ref[1]
-        ref[0,4,0,1]=(-0.286789006223)*x_ref[0]**o+(0.017476293519)*x_ref[0]+(0.637378781092)*x_ref[1]**o+(-0.670201122126)*x_ref[1]
-        ref[0,4,1,0]=(0.159607100455)*x_ref[0]**o+(0.715341910227)*x_ref[0]+(0.949546645819)*x_ref[1]**o+(0.362982182775)*x_ref[1]
-        ref[0,4,1,1]=(-0.237702024358)*x_ref[0]**o+(-0.520488841454)*x_ref[0]+(0.606333933569)*x_ref[1]**o+(-0.00662757701049)*x_ref[1]
-        ref[0,4,2,0]=(-0.415753817901)*x_ref[0]**o+(0.731285464784)*x_ref[0]+(0.15987336144)*x_ref[1]**o+(0.0697706236338)*x_ref[1]
-        ref[0,4,2,1]=(0.0467482158427)*x_ref[0]**o+(0.306004722736)*x_ref[0]+(-0.905184725692)*x_ref[1]**o+(-0.158017889366)*x_ref[1]
-        ref[1,0,0,0]=(-0.785535082426)*x_ref[0]**o+(-0.189285100452)*x_ref[0]+(-0.766349940057)*x_ref[1]**o+(0.531469308995)*x_ref[1]
-        ref[1,0,0,1]=(0.522213196477)*x_ref[0]**o+(-0.661381741437)*x_ref[0]+(0.816089886956)*x_ref[1]**o+(0.139829382305)*x_ref[1]
-        ref[1,0,1,0]=(0.0957295570417)*x_ref[0]**o+(-0.105252674536)*x_ref[0]+(-0.569429953382)*x_ref[1]**o+(-0.801934666657)*x_ref[1]
-        ref[1,0,1,1]=(-0.557307051058)*x_ref[0]**o+(0.218852576416)*x_ref[0]+(0.430167216464)*x_ref[1]**o+(-0.112285681761)*x_ref[1]
-        ref[1,0,2,0]=(0.288472422477)*x_ref[0]**o+(0.294377994763)*x_ref[0]+(-0.809503961511)*x_ref[1]**o+(0.357020226991)*x_ref[1]
-        ref[1,0,2,1]=(-0.148113477705)*x_ref[0]**o+(0.164468646294)*x_ref[0]+(0.7977142476)*x_ref[1]**o+(-0.407274933384)*x_ref[1]
-        ref[1,1,0,0]=(-0.926374434822)*x_ref[0]**o+(-0.107713463193)*x_ref[0]+(-0.511635723869)*x_ref[1]**o+(0.259319717689)*x_ref[1]
-        ref[1,1,0,1]=(-0.18636582243)*x_ref[0]**o+(0.698258973628)*x_ref[0]+(0.234379281397)*x_ref[1]**o+(0.596195875495)*x_ref[1]
-        ref[1,1,1,0]=(-0.180395892006)*x_ref[0]**o+(0.631248500084)*x_ref[0]+(0.104751616377)*x_ref[1]**o+(0.204500206653)*x_ref[1]
-        ref[1,1,1,1]=(-0.517119564238)*x_ref[0]**o+(-0.16634015634)*x_ref[0]+(0.556785586675)*x_ref[1]**o+(0.42659306392)*x_ref[1]
-        ref[1,1,2,0]=(0.163807238958)*x_ref[0]**o+(-0.534619478446)*x_ref[0]+(-0.700353460753)*x_ref[1]**o+(0.121393131648)*x_ref[1]
-        ref[1,1,2,1]=(0.964276278961)*x_ref[0]**o+(0.846030751304)*x_ref[0]+(-0.745301894392)*x_ref[1]**o+(0.33821485558)*x_ref[1]
-        ref[1,2,0,0]=(0.333173101086)*x_ref[0]**o+(0.774848048743)*x_ref[0]+(-0.659091916357)*x_ref[1]**o+(-0.797247144497)*x_ref[1]
-        ref[1,2,0,1]=(0.0581394534285)*x_ref[0]**o+(-0.524771663031)*x_ref[0]+(-0.519465753317)*x_ref[1]**o+(0.71748795226)*x_ref[1]
-        ref[1,2,1,0]=(0.224935262833)*x_ref[0]**o+(-0.393399819306)*x_ref[0]+(0.199349075224)*x_ref[1]**o+(-0.808847009412)*x_ref[1]
-        ref[1,2,1,1]=(0.0385750795521)*x_ref[0]**o+(-8.09949553151e-05)*x_ref[0]+(0.496860964506)*x_ref[1]**o+(0.0119507407829)*x_ref[1]
-        ref[1,2,2,0]=(0.876341556167)*x_ref[0]**o+(0.18082766372)*x_ref[0]+(0.401349871827)*x_ref[1]**o+(-0.543439037303)*x_ref[1]
-        ref[1,2,2,1]=(-0.894525004507)*x_ref[0]**o+(-0.516771143695)*x_ref[0]+(0.0410916490263)*x_ref[1]**o+(0.753841618439)*x_ref[1]
-        ref[1,3,0,0]=(0.251979970924)*x_ref[0]**o+(0.790276550438)*x_ref[0]+(-0.155708793888)*x_ref[1]**o+(0.28971278336)*x_ref[1]
-        ref[1,3,0,1]=(0.258336265436)*x_ref[0]**o+(0.696642875149)*x_ref[0]+(0.0561355915649)*x_ref[1]**o+(0.601839744417)*x_ref[1]
-        ref[1,3,1,0]=(-0.978729102785)*x_ref[0]**o+(0.335280613262)*x_ref[0]+(0.89228798232)*x_ref[1]**o+(-0.693050679348)*x_ref[1]
-        ref[1,3,1,1]=(-0.885817753431)*x_ref[0]**o+(-0.0641571535708)*x_ref[0]+(-0.649578576181)*x_ref[1]**o+(-0.95773137602)*x_ref[1]
-        ref[1,3,2,0]=(-0.333891001461)*x_ref[0]**o+(-0.496064308564)*x_ref[0]+(0.438549603377)*x_ref[1]**o+(0.0772468142672)*x_ref[1]
-        ref[1,3,2,1]=(-0.16171788255)*x_ref[0]**o+(-0.939293453222)*x_ref[0]+(-0.284522648546)*x_ref[1]**o+(0.744642328375)*x_ref[1]
-        ref[1,4,0,0]=(0.806133262332)*x_ref[0]**o+(-0.0225320206432)*x_ref[0]+(0.125958642606)*x_ref[1]**o+(0.610630249467)*x_ref[1]
-        ref[1,4,0,1]=(0.657971870946)*x_ref[0]**o+(0.698894701525)*x_ref[0]+(-0.595952612496)*x_ref[1]**o+(-0.38268841292)*x_ref[1]
-        ref[1,4,1,0]=(-0.277274411331)*x_ref[0]**o+(-0.483183004514)*x_ref[0]+(0.77656657009)*x_ref[1]**o+(-0.959290466645)*x_ref[1]
-        ref[1,4,1,1]=(-0.96384356305)*x_ref[0]**o+(-0.00383301781476)*x_ref[0]+(0.788010409608)*x_ref[1]**o+(0.135378744316)*x_ref[1]
-        ref[1,4,2,0]=(0.986761958017)*x_ref[0]**o+(-0.570276378038)*x_ref[0]+(-0.515784028315)*x_ref[1]**o+(0.487125123439)*x_ref[1]
-        ref[1,4,2,1]=(-0.954735054702)*x_ref[0]**o+(-0.0610323074217)*x_ref[0]+(-0.255284859281)*x_ref[1]**o+(0.277795725698)*x_ref[1]
-        ref[2,0,0,0]=(-0.708301219324)*x_ref[0]**o+(-0.970166781553)*x_ref[0]+(-0.0836451425855)*x_ref[1]**o+(0.525854202995)*x_ref[1]
-        ref[2,0,0,1]=(-0.0995393865183)*x_ref[0]**o+(-0.0156624820324)*x_ref[0]+(0.225529316197)*x_ref[1]**o+(0.142617834056)*x_ref[1]
-        ref[2,0,1,0]=(-0.585329524103)*x_ref[0]**o+(0.590285924441)*x_ref[0]+(0.201483726322)*x_ref[1]**o+(-0.735262197689)*x_ref[1]
-        ref[2,0,1,1]=(-0.682877182963)*x_ref[0]**o+(-0.162682262799)*x_ref[0]+(-0.890051459843)*x_ref[1]**o+(-0.0188015866765)*x_ref[1]
-        ref[2,0,2,0]=(0.868935476294)*x_ref[0]**o+(-0.629891068854)*x_ref[0]+(0.335632865663)*x_ref[1]**o+(-0.955849055716)*x_ref[1]
-        ref[2,0,2,1]=(-0.907933228238)*x_ref[0]**o+(-0.105861987974)*x_ref[0]+(-0.131372383042)*x_ref[1]**o+(-0.970114136854)*x_ref[1]
-        ref[2,1,0,0]=(-0.275788501814)*x_ref[0]**o+(-0.992861867033)*x_ref[0]+(-0.80676324962)*x_ref[1]**o+(0.269244680224)*x_ref[1]
-        ref[2,1,0,1]=(-0.704704138774)*x_ref[0]**o+(-0.371803193009)*x_ref[0]+(-0.0190586405922)*x_ref[1]**o+(-0.0828837624698)*x_ref[1]
-        ref[2,1,1,0]=(-0.532645566013)*x_ref[0]**o+(0.571754809868)*x_ref[0]+(0.656737493773)*x_ref[1]**o+(-0.548229591842)*x_ref[1]
-        ref[2,1,1,1]=(0.23836921087)*x_ref[0]**o+(0.707475737785)*x_ref[0]+(-0.59660155968)*x_ref[1]**o+(-0.450204951071)*x_ref[1]
-        ref[2,1,2,0]=(-0.534027348014)*x_ref[0]**o+(0.332100193727)*x_ref[0]+(-0.864157138567)*x_ref[1]**o+(-0.41833267066)*x_ref[1]
-        ref[2,1,2,1]=(0.459878593269)*x_ref[0]**o+(0.446259140228)*x_ref[0]+(0.571242887502)*x_ref[1]**o+(-0.0390525669486)*x_ref[1]
-        ref[2,2,0,0]=(0.322052799527)*x_ref[0]**o+(-0.915265209304)*x_ref[0]+(-0.99942007618)*x_ref[1]**o+(0.482294513743)*x_ref[1]
-        ref[2,2,0,1]=(0.558489194456)*x_ref[0]**o+(0.00400576554086)*x_ref[0]+(-0.87484330165)*x_ref[1]**o+(-0.664504218977)*x_ref[1]
-        ref[2,2,1,0]=(0.669621607461)*x_ref[0]**o+(-0.0450960554319)*x_ref[0]+(-0.221151480246)*x_ref[1]**o+(0.0123621737211)*x_ref[1]
-        ref[2,2,1,1]=(0.476743013029)*x_ref[0]**o+(0.11118371822)*x_ref[0]+(-0.202074315677)*x_ref[1]**o+(0.377649433458)*x_ref[1]
-        ref[2,2,2,0]=(0.667910543701)*x_ref[0]**o+(0.035703922547)*x_ref[0]+(-0.274733967095)*x_ref[1]**o+(-0.998934720182)*x_ref[1]
-        ref[2,2,2,1]=(0.578909660087)*x_ref[0]**o+(0.149900086514)*x_ref[0]+(-0.226597651858)*x_ref[1]**o+(0.169175812287)*x_ref[1]
-        ref[2,3,0,0]=(0.158370246586)*x_ref[0]**o+(0.595643112285)*x_ref[0]+(-0.476875564052)*x_ref[1]**o+(0.869752657517)*x_ref[1]
-        ref[2,3,0,1]=(0.99718847714)*x_ref[0]**o+(0.581531822297)*x_ref[0]+(-0.607102775564)*x_ref[1]**o+(-0.8317970284)*x_ref[1]
-        ref[2,3,1,0]=(-0.27390195745)*x_ref[0]**o+(0.0512853330414)*x_ref[0]+(0.465190666302)*x_ref[1]**o+(0.042533388788)*x_ref[1]
-        ref[2,3,1,1]=(-0.183679504962)*x_ref[0]**o+(-0.0522782076121)*x_ref[0]+(0.921423118529)*x_ref[1]**o+(-0.0315080275225)*x_ref[1]
-        ref[2,3,2,0]=(0.0421842348778)*x_ref[0]**o+(0.462023049702)*x_ref[0]+(-0.888342606803)*x_ref[1]**o+(-0.956503447884)*x_ref[1]
-        ref[2,3,2,1]=(-0.950820288444)*x_ref[0]**o+(0.104271990168)*x_ref[0]+(-0.607212909582)*x_ref[1]**o+(-0.16283931259)*x_ref[1]
-        ref[2,4,0,0]=(0.113505933533)*x_ref[0]**o+(0.27873514806)*x_ref[0]+(0.736699443523)*x_ref[1]**o+(-0.951737555693)*x_ref[1]
-        ref[2,4,0,1]=(0.264170584849)*x_ref[0]**o+(-0.226649236617)*x_ref[0]+(0.489902180874)*x_ref[1]**o+(-0.191536591762)*x_ref[1]
-        ref[2,4,1,0]=(0.712322285985)*x_ref[0]**o+(-0.323395455815)*x_ref[0]+(-0.298356681586)*x_ref[1]**o+(0.699891974541)*x_ref[1]
-        ref[2,4,1,1]=(-0.631057763255)*x_ref[0]**o+(-0.489374933445)*x_ref[0]+(-0.021591806874)*x_ref[1]**o+(-0.692800124585)*x_ref[1]
-        ref[2,4,2,0]=(0.916068935184)*x_ref[0]**o+(0.33779688858)*x_ref[0]+(0.06300443559)*x_ref[1]**o+(-0.231385203399)*x_ref[1]
-        ref[2,4,2,1]=(-0.283485044625)*x_ref[0]**o+(0.548366574442)*x_ref[0]+(-0.543953132872)*x_ref[1]**o+(-0.956662823037)*x_ref[1]
-        ref[3,0,0,0]=(0.709349274221)*x_ref[0]**o+(-0.342981009263)*x_ref[0]+(-0.682331761929)*x_ref[1]**o+(0.673169884813)*x_ref[1]
-        ref[3,0,0,1]=(0.236249836593)*x_ref[0]**o+(-0.682845054434)*x_ref[0]+(-0.349169988218)*x_ref[1]**o+(0.502684425824)*x_ref[1]
-        ref[3,0,1,0]=(-0.561655748793)*x_ref[0]**o+(0.120183772326)*x_ref[0]+(-0.966535325583)*x_ref[1]**o+(-0.0585117264949)*x_ref[1]
-        ref[3,0,1,1]=(-0.661030287189)*x_ref[0]**o+(-0.322924086505)*x_ref[0]+(-0.986892059552)*x_ref[1]**o+(-0.778969361365)*x_ref[1]
-        ref[3,0,2,0]=(-0.166307107307)*x_ref[0]**o+(0.612931303617)*x_ref[0]+(-0.283925165456)*x_ref[1]**o+(0.5998038814)*x_ref[1]
-        ref[3,0,2,1]=(0.205099355916)*x_ref[0]**o+(-0.520970536278)*x_ref[0]+(0.900416833183)*x_ref[1]**o+(0.981826306069)*x_ref[1]
-        ref[3,1,0,0]=(-0.875306666443)*x_ref[0]**o+(0.0189358479861)*x_ref[0]+(0.101187857445)*x_ref[1]**o+(-0.873584307534)*x_ref[1]
-        ref[3,1,0,1]=(-0.0203656235757)*x_ref[0]**o+(-0.579229777042)*x_ref[0]+(-0.0799345631826)*x_ref[1]**o+(0.896315444069)*x_ref[1]
-        ref[3,1,1,0]=(0.576791459982)*x_ref[0]**o+(-0.86541815506)*x_ref[0]+(-0.582764176207)*x_ref[1]**o+(-0.249437395011)*x_ref[1]
-        ref[3,1,1,1]=(0.525953680497)*x_ref[0]**o+(-0.222445717402)*x_ref[0]+(-0.87710202063)*x_ref[1]**o+(-0.762921821973)*x_ref[1]
-        ref[3,1,2,0]=(-0.883737185908)*x_ref[0]**o+(0.254053241277)*x_ref[0]+(0.559803298059)*x_ref[1]**o+(-0.577376956856)*x_ref[1]
-        ref[3,1,2,1]=(-0.125792083387)*x_ref[0]**o+(-0.771549307509)*x_ref[0]+(0.142493480552)*x_ref[1]**o+(0.459996962548)*x_ref[1]
-        ref[3,2,0,0]=(0.0531598927049)*x_ref[0]**o+(-0.950343229037)*x_ref[0]+(-0.748240453154)*x_ref[1]**o+(0.850555892342)*x_ref[1]
-        ref[3,2,0,1]=(-0.660852152041)*x_ref[0]**o+(-0.763119278604)*x_ref[0]+(-0.811925409663)*x_ref[1]**o+(-0.178765071495)*x_ref[1]
-        ref[3,2,1,0]=(-0.189124223305)*x_ref[0]**o+(-0.410392909042)*x_ref[0]+(0.993247167522)*x_ref[1]**o+(0.291451796298)*x_ref[1]
-        ref[3,2,1,1]=(0.83496133421)*x_ref[0]**o+(0.695147480265)*x_ref[0]+(0.444420524946)*x_ref[1]**o+(0.107454620114)*x_ref[1]
-        ref[3,2,2,0]=(0.94687479313)*x_ref[0]**o+(-0.140702324395)*x_ref[0]+(0.149203502428)*x_ref[1]**o+(-0.338246126345)*x_ref[1]
-        ref[3,2,2,1]=(0.147609394709)*x_ref[0]**o+(-0.549219765239)*x_ref[0]+(0.397308993347)*x_ref[1]**o+(0.0402189312685)*x_ref[1]
-        ref[3,3,0,0]=(0.27400981409)*x_ref[0]**o+(-0.516367266257)*x_ref[0]+(-0.784095952814)*x_ref[1]**o+(0.32858899009)*x_ref[1]
-        ref[3,3,0,1]=(-0.393457382163)*x_ref[0]**o+(0.590406794051)*x_ref[0]+(0.328523918357)*x_ref[1]**o+(0.899537513355)*x_ref[1]
-        ref[3,3,1,0]=(-0.851038623366)*x_ref[0]**o+(0.596974864726)*x_ref[0]+(-0.338630687551)*x_ref[1]**o+(0.634961435042)*x_ref[1]
-        ref[3,3,1,1]=(0.569166143918)*x_ref[0]**o+(-0.388162282491)*x_ref[0]+(0.764830536733)*x_ref[1]**o+(-0.426737342542)*x_ref[1]
-        ref[3,3,2,0]=(0.502221903448)*x_ref[0]**o+(0.940382225897)*x_ref[0]+(0.563444730579)*x_ref[1]**o+(0.023210869151)*x_ref[1]
-        ref[3,3,2,1]=(0.061695403852)*x_ref[0]**o+(0.868302188758)*x_ref[0]+(0.0855803325758)*x_ref[1]**o+(-0.24366173638)*x_ref[1]
-        ref[3,4,0,0]=(-0.533038182387)*x_ref[0]**o+(0.0222388915737)*x_ref[0]+(0.529037752769)*x_ref[1]**o+(-0.0665320895494)*x_ref[1]
-        ref[3,4,0,1]=(0.714374055253)*x_ref[0]**o+(-0.623670743333)*x_ref[0]+(-0.866024792929)*x_ref[1]**o+(-0.0673124896111)*x_ref[1]
-        ref[3,4,1,0]=(-0.0523466615045)*x_ref[0]**o+(-0.472563426622)*x_ref[0]+(0.139892673626)*x_ref[1]**o+(0.539655417178)*x_ref[1]
-        ref[3,4,1,1]=(-0.473032580514)*x_ref[0]**o+(0.692812093618)*x_ref[0]+(0.664400517742)*x_ref[1]**o+(0.184125423364)*x_ref[1]
-        ref[3,4,2,0]=(-0.0340798058725)*x_ref[0]**o+(-0.58900562863)*x_ref[0]+(0.396856384717)*x_ref[1]**o+(-0.559175428019)*x_ref[1]
-        ref[3,4,2,1]=(-0.217679376634)*x_ref[0]**o+(-0.90389036667)*x_ref[0]+(0.967372942873)*x_ref[1]**o+(-0.482913619277)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.93229223906)*x[0]**o+(0.176839936782)*x[0]+(0.986271000359)*x[1]**o+(-0.449322385723)*x[1]+(-0.856450437823)*x[2]**o+(0.31473579221)*x[2]
-        arg[0,0,0,1]=(0.714047232765)*x[0]**o+(-0.323471323003)*x[0]+(0.628080480343)*x[1]**o+(-0.992007912045)*x[1]+(-0.11019723051)*x[2]**o+(-0.104735408233)*x[2]
-        arg[0,0,1,0]=(-0.437250443294)*x[0]**o+(-0.741469652781)*x[0]+(0.650921038465)*x[1]**o+(0.679622741243)*x[1]+(0.604005894895)*x[2]**o+(0.598155624876)*x[2]
-        arg[0,0,1,1]=(-0.574872168761)*x[0]**o+(0.796207672391)*x[0]+(-0.478046646159)*x[1]**o+(0.604661326741)*x[1]+(-0.898457020186)*x[2]**o+(0.43234750827)*x[2]
-        arg[0,0,2,0]=(-0.674008357742)*x[0]**o+(0.699614371016)*x[0]+(0.441321981559)*x[1]**o+(-0.619688689942)*x[1]+(-0.0874579208832)*x[2]**o+(-0.925753840555)*x[2]
-        arg[0,0,2,1]=(-0.114329474892)*x[0]**o+(0.699501071503)*x[0]+(-0.618807420683)*x[1]**o+(0.411584695002)*x[1]+(-0.234620261556)*x[2]**o+(0.585720100967)*x[2]
-        arg[0,1,0,0]=(0.617432097253)*x[0]**o+(-0.00304868863676)*x[0]+(0.571021785645)*x[1]**o+(0.457197205728)*x[1]+(0.462895867813)*x[2]**o+(0.278022956316)*x[2]
-        arg[0,1,0,1]=(-0.659136231188)*x[0]**o+(-0.388212920906)*x[0]+(-0.982152608232)*x[1]**o+(-0.665797156013)*x[1]+(-0.76141890649)*x[2]**o+(-0.591458323836)*x[2]
-        arg[0,1,1,0]=(-0.488016386893)*x[0]**o+(0.965660401944)*x[0]+(0.178400189819)*x[1]**o+(0.578417314499)*x[1]+(-0.398083955217)*x[2]**o+(0.460338187535)*x[2]
-        arg[0,1,1,1]=(-0.182086458235)*x[0]**o+(0.0842368498629)*x[0]+(-0.642008026184)*x[1]**o+(-0.0449408131957)*x[1]+(-0.927397573018)*x[2]**o+(0.854313729816)*x[2]
-        arg[0,1,2,0]=(-0.201475872769)*x[0]**o+(0.098190765292)*x[0]+(0.808624244922)*x[1]**o+(0.0726268899898)*x[1]+(-0.605334327027)*x[2]**o+(-0.999151255934)*x[2]
-        arg[0,1,2,1]=(0.672344024218)*x[0]**o+(-0.638554833481)*x[0]+(-0.212231801634)*x[1]**o+(-0.492765366968)*x[1]+(0.311273771921)*x[2]**o+(-0.504370655006)*x[2]
-        arg[0,2,0,0]=(0.9944935907)*x[0]**o+(-0.365261996611)*x[0]+(-0.105667939789)*x[1]**o+(0.886935751977)*x[1]+(0.263336157757)*x[2]**o+(-0.880316523113)*x[2]
-        arg[0,2,0,1]=(-0.659779300787)*x[0]**o+(-0.728590180152)*x[0]+(0.732078508037)*x[1]**o+(0.684963412098)*x[1]+(0.822970700012)*x[2]**o+(-0.680001879674)*x[2]
-        arg[0,2,1,0]=(-0.207855412893)*x[0]**o+(0.438275426529)*x[0]+(0.87046682066)*x[1]**o+(-0.960322013848)*x[1]+(-0.273728198625)*x[2]**o+(-0.960137228004)*x[2]
-        arg[0,2,1,1]=(-0.189232680002)*x[0]**o+(0.866417302002)*x[0]+(-0.93403311248)*x[1]**o+(-0.55773104878)*x[1]+(0.94062895773)*x[2]**o+(-0.758052194805)*x[2]
-        arg[0,2,2,0]=(0.100859944394)*x[0]**o+(-0.20292135909)*x[0]+(-0.713339941261)*x[1]**o+(-0.615106454411)*x[1]+(0.791245995152)*x[2]**o+(-0.81051791594)*x[2]
-        arg[0,2,2,1]=(0.595743424517)*x[0]**o+(-0.179075876404)*x[0]+(-0.799005601715)*x[1]**o+(-0.0554635073569)*x[1]+(-0.850510701985)*x[2]**o+(0.234516538169)*x[2]
-        arg[0,3,0,0]=(-0.361667738861)*x[0]**o+(-0.551837498696)*x[0]+(-0.834377202094)*x[1]**o+(0.814168224265)*x[1]+(-0.00479533268377)*x[2]**o+(0.843007652951)*x[2]
-        arg[0,3,0,1]=(-0.448417439465)*x[0]**o+(0.431496158388)*x[0]+(-0.547416443433)*x[1]**o+(-0.0746785704695)*x[1]+(-0.646238182944)*x[2]**o+(-0.318608714595)*x[2]
-        arg[0,3,1,0]=(-0.275647366007)*x[0]**o+(-0.410594785047)*x[0]+(-0.858282378196)*x[1]**o+(-0.755586690837)*x[1]+(-0.420481091654)*x[2]**o+(-0.0996487371831)*x[2]
-        arg[0,3,1,1]=(-0.395961249009)*x[0]**o+(0.0860896467863)*x[0]+(0.482719525748)*x[1]**o+(0.319368178133)*x[1]+(0.516449153414)*x[2]**o+(-0.246749862576)*x[2]
-        arg[0,3,2,0]=(-0.367322027122)*x[0]**o+(0.687206412524)*x[0]+(0.616265233972)*x[1]**o+(-0.32660589112)*x[1]+(-0.944607343096)*x[2]**o+(0.123982537951)*x[2]
-        arg[0,3,2,1]=(0.700497166804)*x[0]**o+(0.553961329865)*x[0]+(-0.34020003754)*x[1]**o+(0.295870992783)*x[1]+(-0.220275880046)*x[2]**o+(0.766121035825)*x[2]
-        arg[0,4,0,0]=(0.405469789242)*x[0]**o+(-0.338347662873)*x[0]+(0.0761796434233)*x[1]**o+(-0.120599175033)*x[1]+(0.107865585379)*x[2]**o+(0.0711941007838)*x[2]
-        arg[0,4,0,1]=(0.614166154899)*x[0]**o+(0.195780702963)*x[0]+(0.718935985215)*x[1]**o+(0.214577296792)*x[1]+(-0.366985242107)*x[2]**o+(-0.509584787633)*x[2]
-        arg[0,4,1,0]=(-0.638646370981)*x[0]**o+(-0.769955899284)*x[0]+(-0.887407540503)*x[1]**o+(0.0901245429998)*x[1]+(0.786085641321)*x[2]**o+(0.6248068552)*x[2]
-        arg[0,4,1,1]=(-0.145426222043)*x[0]**o+(-0.494114545016)*x[0]+(0.422153721335)*x[1]**o+(0.617022143901)*x[1]+(-0.665972324723)*x[2]**o+(-0.476724432799)*x[2]
-        arg[0,4,2,0]=(0.556105252092)*x[0]**o+(-0.893268696809)*x[0]+(0.146441889489)*x[1]**o+(-0.170512113283)*x[1]+(-0.869313262875)*x[2]**o+(-0.976874109392)*x[2]
-        arg[0,4,2,1]=(0.858927206499)*x[0]**o+(0.198998355146)*x[0]+(0.278125296049)*x[1]**o+(-0.0442518828093)*x[1]+(0.274852724203)*x[2]**o+(-0.167649193314)*x[2]
-        arg[1,0,0,0]=(-0.0429420289353)*x[0]**o+(-0.15764693929)*x[0]+(-0.859599917512)*x[1]**o+(-0.904178643575)*x[1]+(0.519560711493)*x[2]**o+(0.258644717907)*x[2]
-        arg[1,0,0,1]=(-0.185321114264)*x[0]**o+(-0.794493830004)*x[0]+(0.136084421162)*x[1]**o+(0.926912021419)*x[1]+(0.346392120388)*x[2]**o+(-0.183908371454)*x[2]
-        arg[1,0,1,0]=(-0.730675509877)*x[0]**o+(0.865034802778)*x[0]+(-0.506315431878)*x[1]**o+(-0.94607761051)*x[1]+(0.195194792801)*x[2]**o+(-0.865129258879)*x[2]
-        arg[1,0,1,1]=(-0.0597026648107)*x[0]**o+(-0.884790497)*x[0]+(-0.0631278742098)*x[1]**o+(-0.808364940737)*x[1]+(-0.968952604837)*x[2]**o+(0.142246702632)*x[2]
-        arg[1,0,2,0]=(0.648472894563)*x[0]**o+(0.145861644073)*x[0]+(0.501227520574)*x[1]**o+(0.265886482306)*x[1]+(-0.0472772173573)*x[2]**o+(-0.364169655969)*x[2]
-        arg[1,0,2,1]=(0.847863600695)*x[0]**o+(-0.288841685199)*x[0]+(-0.500273502795)*x[1]**o+(0.627379277592)*x[1]+(0.326814024625)*x[2]**o+(-0.514712825895)*x[2]
-        arg[1,1,0,0]=(-0.947845713712)*x[0]**o+(-0.372115616305)*x[0]+(-0.572858279998)*x[1]**o+(0.226237627692)*x[1]+(0.210201947182)*x[2]**o+(0.0147616538594)*x[2]
-        arg[1,1,0,1]=(-0.39813630466)*x[0]**o+(-0.658496395731)*x[0]+(-0.363906465005)*x[1]**o+(-0.816719661238)*x[1]+(-0.478106835032)*x[2]**o+(0.0819042309589)*x[2]
-        arg[1,1,1,0]=(-0.287160278593)*x[0]**o+(-0.0281402640978)*x[0]+(0.41559795378)*x[1]**o+(0.158274458097)*x[1]+(-0.798429481502)*x[2]**o+(-0.278585334624)*x[2]
-        arg[1,1,1,1]=(0.809550480973)*x[0]**o+(0.192026915854)*x[0]+(-0.891168838599)*x[1]**o+(0.0482621192882)*x[1]+(-0.35339708159)*x[2]**o+(-0.133161551553)*x[2]
-        arg[1,1,2,0]=(0.939582328872)*x[0]**o+(0.561963790516)*x[0]+(0.885264722949)*x[1]**o+(-0.468042305266)*x[1]+(0.232880002429)*x[2]**o+(-0.772896005701)*x[2]
-        arg[1,1,2,1]=(-0.297333303209)*x[0]**o+(-0.414050924207)*x[0]+(-0.278903698873)*x[1]**o+(0.345370620869)*x[1]+(-0.0570151259027)*x[2]**o+(0.786449641378)*x[2]
-        arg[1,2,0,0]=(0.644047138589)*x[0]**o+(-0.480660438838)*x[0]+(0.32526499462)*x[1]**o+(-0.775988282127)*x[1]+(0.108374143932)*x[2]**o+(0.955463667181)*x[2]
-        arg[1,2,0,1]=(-0.468236790339)*x[0]**o+(0.844197711724)*x[0]+(0.808973429831)*x[1]**o+(-0.647699550005)*x[1]+(0.552555959813)*x[2]**o+(-0.3403079515)*x[2]
-        arg[1,2,1,0]=(0.864686362308)*x[0]**o+(0.248923646116)*x[0]+(0.0287042863842)*x[1]**o+(0.404974282153)*x[1]+(0.113501438234)*x[2]**o+(-0.619364894397)*x[2]
-        arg[1,2,1,1]=(-0.625146992499)*x[0]**o+(-0.0480602452983)*x[0]+(0.168910550914)*x[1]**o+(-0.891584218123)*x[1]+(0.0609357618263)*x[2]**o+(0.0451921002161)*x[2]
-        arg[1,2,2,0]=(-0.478728628752)*x[0]**o+(0.428376547798)*x[0]+(0.817203376818)*x[1]**o+(-0.856056266953)*x[1]+(0.354960313382)*x[2]**o+(-0.611468960461)*x[2]
-        arg[1,2,2,1]=(0.49500742113)*x[0]**o+(0.902948130263)*x[0]+(-0.810748543744)*x[1]**o+(-0.696150924858)*x[1]+(-0.748278516161)*x[2]**o+(0.694815527058)*x[2]
-        arg[1,3,0,0]=(-0.361960150296)*x[0]**o+(-0.845139780461)*x[0]+(-0.0624499309665)*x[1]**o+(-0.0515558058489)*x[1]+(0.400690983017)*x[2]**o+(-0.744608407974)*x[2]
-        arg[1,3,0,1]=(-0.452453617467)*x[0]**o+(0.845396139593)*x[0]+(0.292319469936)*x[1]**o+(-0.833547518634)*x[1]+(-0.511797700353)*x[2]**o+(0.857891454773)*x[2]
-        arg[1,3,1,0]=(0.779504092912)*x[0]**o+(0.500524773615)*x[0]+(0.590542659382)*x[1]**o+(0.479310630519)*x[1]+(0.509960641956)*x[2]**o+(-0.564980432959)*x[2]
-        arg[1,3,1,1]=(-0.145745189298)*x[0]**o+(-0.256064576359)*x[0]+(0.640890837126)*x[1]**o+(-0.718802035152)*x[1]+(-0.322216873583)*x[2]**o+(-0.0246526526334)*x[2]
-        arg[1,3,2,0]=(-0.463434285098)*x[0]**o+(0.116722448643)*x[0]+(-0.690378381342)*x[1]**o+(0.429197465885)*x[1]+(-0.353019731384)*x[2]**o+(0.57397712918)*x[2]
-        arg[1,3,2,1]=(0.169676853383)*x[0]**o+(0.815225472623)*x[0]+(-0.11125527552)*x[1]**o+(0.391513831525)*x[1]+(-0.587041361585)*x[2]**o+(0.255194151616)*x[2]
-        arg[1,4,0,0]=(0.325351608628)*x[0]**o+(-0.57751715453)*x[0]+(0.145167511303)*x[1]**o+(-0.969286030742)*x[1]+(0.917370398478)*x[2]**o+(0.691483691598)*x[2]
-        arg[1,4,0,1]=(0.0997998298271)*x[0]**o+(-0.101248202247)*x[0]+(-0.650649653848)*x[1]**o+(-0.157887947288)*x[1]+(0.517501747765)*x[2]**o+(-0.0852921926298)*x[2]
-        arg[1,4,1,0]=(0.984595420407)*x[0]**o+(0.499293499076)*x[0]+(0.352193115874)*x[1]**o+(-0.684522909647)*x[1]+(-0.391538373605)*x[2]**o+(0.404635595162)*x[2]
-        arg[1,4,1,1]=(-0.231310482173)*x[0]**o+(-0.0385089836559)*x[0]+(0.247671691888)*x[1]**o+(0.883971955027)*x[1]+(-0.0856624709734)*x[2]**o+(0.942940875904)*x[2]
-        arg[1,4,2,0]=(-0.471467257434)*x[0]**o+(0.835634240897)*x[0]+(-0.594421294562)*x[1]**o+(-0.187584387111)*x[1]+(0.859867472765)*x[2]**o+(0.930951154576)*x[2]
-        arg[1,4,2,1]=(0.504416975601)*x[0]**o+(0.435692923635)*x[0]+(-0.296945944313)*x[1]**o+(0.815156218765)*x[1]+(0.464464247442)*x[2]**o+(-0.378809453041)*x[2]
-        arg[2,0,0,0]=(0.213087423107)*x[0]**o+(-0.504681665801)*x[0]+(0.796352190405)*x[1]**o+(0.546752751136)*x[1]+(0.57347644664)*x[2]**o+(0.715856963195)*x[2]
-        arg[2,0,0,1]=(-0.28455266769)*x[0]**o+(0.853162220766)*x[0]+(0.164930982863)*x[1]**o+(-0.0136996498765)*x[1]+(0.293717915079)*x[2]**o+(-0.216124158473)*x[2]
-        arg[2,0,1,0]=(-0.328115989441)*x[0]**o+(-0.529441496488)*x[0]+(-0.43579479677)*x[1]**o+(-0.851333801194)*x[1]+(-0.278406102972)*x[2]**o+(0.947777471824)*x[2]
-        arg[2,0,1,1]=(-0.756438938789)*x[0]**o+(-0.624332272735)*x[0]+(-0.591638429565)*x[1]**o+(-0.0608281771566)*x[1]+(-0.852078784085)*x[2]**o+(-0.526558964866)*x[2]
-        arg[2,0,2,0]=(-0.923892426969)*x[0]**o+(0.788121899878)*x[0]+(-0.446006331202)*x[1]**o+(0.997210871574)*x[1]+(0.356998606103)*x[2]**o+(0.972643822823)*x[2]
-        arg[2,0,2,1]=(0.225183308571)*x[0]**o+(-0.757505414777)*x[0]+(-0.59573192074)*x[1]**o+(0.57166154987)*x[1]+(0.622343198809)*x[2]**o+(0.60343970503)*x[2]
-        arg[2,1,0,0]=(0.51027702934)*x[0]**o+(-0.711737679522)*x[0]+(-0.211712579627)*x[1]**o+(-0.495817605314)*x[1]+(0.924425804272)*x[2]**o+(0.753424835275)*x[2]
-        arg[2,1,0,1]=(0.476218252577)*x[0]**o+(0.187579891557)*x[0]+(0.727359583623)*x[1]**o+(-0.389875559955)*x[1]+(-0.352889326477)*x[2]**o+(0.365143943637)*x[2]
-        arg[2,1,1,0]=(-0.815704312943)*x[0]**o+(0.315217470245)*x[0]+(-0.535234555065)*x[1]**o+(-0.433408988501)*x[1]+(-0.676694087389)*x[2]**o+(0.384097177718)*x[2]
-        arg[2,1,1,1]=(-0.0368452411345)*x[0]**o+(0.514540686444)*x[0]+(-0.527100066965)*x[1]**o+(0.0291015562912)*x[1]+(-0.605646905004)*x[2]**o+(0.931528599981)*x[2]
-        arg[2,1,2,0]=(-0.0994015945266)*x[0]**o+(-0.762310347434)*x[0]+(-0.845934950466)*x[1]**o+(-0.235758967923)*x[1]+(0.755531422698)*x[2]**o+(0.108353867777)*x[2]
-        arg[2,1,2,1]=(-0.868779052889)*x[0]**o+(0.783878941075)*x[0]+(0.900089560473)*x[1]**o+(-0.836779405877)*x[1]+(-0.799571882449)*x[2]**o+(0.999710029157)*x[2]
-        arg[2,2,0,0]=(0.541465277143)*x[0]**o+(-0.840477797945)*x[0]+(-0.362577721098)*x[1]**o+(0.00680131806718)*x[1]+(-0.338485239867)*x[2]**o+(0.828213756751)*x[2]
-        arg[2,2,0,1]=(-0.927347423175)*x[0]**o+(-0.936191125785)*x[0]+(-0.411819804833)*x[1]**o+(-0.0222067637269)*x[1]+(-0.104411832586)*x[2]**o+(-0.79937203081)*x[2]
-        arg[2,2,1,0]=(0.273051712848)*x[0]**o+(-0.802468557957)*x[0]+(-0.019392898867)*x[1]**o+(-0.612803074784)*x[1]+(-0.269705464223)*x[2]**o+(-0.244405147706)*x[2]
-        arg[2,2,1,1]=(-0.08869649035)*x[0]**o+(0.809761782447)*x[0]+(0.761420080249)*x[1]**o+(0.16590038557)*x[1]+(-0.405657593445)*x[2]**o+(0.123593603037)*x[2]
-        arg[2,2,2,0]=(-0.799691160987)*x[0]**o+(0.834835690475)*x[0]+(-0.0863569221737)*x[1]**o+(0.988343215152)*x[1]+(0.294423283474)*x[2]**o+(0.325725138203)*x[2]
-        arg[2,2,2,1]=(0.648897496592)*x[0]**o+(-0.474329387314)*x[0]+(-0.904613697104)*x[1]**o+(0.382201388286)*x[1]+(-0.596889148339)*x[2]**o+(0.705132157684)*x[2]
-        arg[2,3,0,0]=(0.906738144045)*x[0]**o+(-0.365392026426)*x[0]+(0.730557428733)*x[1]**o+(-0.857864471189)*x[1]+(-0.160930657186)*x[2]**o+(0.885067383334)*x[2]
-        arg[2,3,0,1]=(0.992764702472)*x[0]**o+(0.720688532948)*x[0]+(0.318869772818)*x[1]**o+(0.995508347248)*x[1]+(0.108569456996)*x[2]**o+(-0.990939292995)*x[2]
-        arg[2,3,1,0]=(0.690584992096)*x[0]**o+(0.605885242246)*x[0]+(0.72371794265)*x[1]**o+(-0.632609325879)*x[1]+(0.520273588734)*x[2]**o+(0.885804143155)*x[2]
-        arg[2,3,1,1]=(0.485231542482)*x[0]**o+(0.866920225418)*x[0]+(-0.814964945972)*x[1]**o+(0.544132513209)*x[1]+(-0.155071376494)*x[2]**o+(-0.941300746237)*x[2]
-        arg[2,3,2,0]=(0.748232238388)*x[0]**o+(0.179397724419)*x[0]+(-0.43881886248)*x[1]**o+(-0.124941799624)*x[1]+(0.14679335819)*x[2]**o+(-0.758738846688)*x[2]
-        arg[2,3,2,1]=(-0.0951333655337)*x[0]**o+(0.37270972476)*x[0]+(-0.651977554115)*x[1]**o+(-0.88918597476)*x[1]+(-0.730858685576)*x[2]**o+(0.685881924459)*x[2]
-        arg[2,4,0,0]=(-0.823487466802)*x[0]**o+(-0.583630855643)*x[0]+(-0.664814562747)*x[1]**o+(0.860952605956)*x[1]+(-0.249114322668)*x[2]**o+(-0.968356584237)*x[2]
-        arg[2,4,0,1]=(0.44040146252)*x[0]**o+(-0.246827565902)*x[0]+(0.596300980733)*x[1]**o+(-0.825818200414)*x[1]+(0.0715512875967)*x[2]**o+(0.996064679803)*x[2]
-        arg[2,4,1,0]=(-0.287806453021)*x[0]**o+(0.704331542927)*x[0]+(-0.346139754521)*x[1]**o+(-0.766667037125)*x[1]+(0.283874132105)*x[2]**o+(-0.613145979204)*x[2]
-        arg[2,4,1,1]=(-0.116649875156)*x[0]**o+(0.291380048239)*x[0]+(0.689809221905)*x[1]**o+(0.758935910592)*x[1]+(0.505142787603)*x[2]**o+(-0.113611480503)*x[2]
-        arg[2,4,2,0]=(-0.836908572692)*x[0]**o+(-0.21892828725)*x[0]+(-0.935780103868)*x[1]**o+(0.106204643268)*x[1]+(-0.894474423807)*x[2]**o+(0.296554773217)*x[2]
-        arg[2,4,2,1]=(-0.89413495023)*x[0]**o+(0.6080813058)*x[0]+(0.087863889878)*x[1]**o+(0.213373665612)*x[1]+(0.17085345025)*x[2]**o+(-0.967625138712)*x[2]
-        arg[3,0,0,0]=(0.327537677409)*x[0]**o+(-0.299373059373)*x[0]+(-0.43223648542)*x[1]**o+(-0.499115781051)*x[1]+(0.145464567449)*x[2]**o+(0.580930584563)*x[2]
-        arg[3,0,0,1]=(-0.122622543351)*x[0]**o+(-0.220547821081)*x[0]+(0.892679827803)*x[1]**o+(0.436584604381)*x[1]+(-0.156093580288)*x[2]**o+(0.464069069075)*x[2]
-        arg[3,0,1,0]=(0.590288663203)*x[0]**o+(-0.212929445251)*x[0]+(0.0899671639061)*x[1]**o+(-0.87729854872)*x[1]+(0.789506558716)*x[2]**o+(-0.68867690907)*x[2]
-        arg[3,0,1,1]=(-0.913651849012)*x[0]**o+(-0.430938918892)*x[0]+(-0.351186012371)*x[1]**o+(0.500306994748)*x[1]+(0.145381845281)*x[2]**o+(0.624993552333)*x[2]
-        arg[3,0,2,0]=(0.281393881265)*x[0]**o+(-0.704727129826)*x[0]+(-0.0102091836449)*x[1]**o+(0.311857501353)*x[1]+(0.300732947904)*x[2]**o+(0.923973499548)*x[2]
-        arg[3,0,2,1]=(-0.584907526993)*x[0]**o+(0.625732316822)*x[0]+(-0.609691930408)*x[1]**o+(0.056160226956)*x[1]+(-0.766583561947)*x[2]**o+(0.307692190194)*x[2]
-        arg[3,1,0,0]=(0.731231379445)*x[0]**o+(-0.0485980527115)*x[0]+(0.908932758852)*x[1]**o+(0.188918035886)*x[1]+(0.685837743688)*x[2]**o+(-0.299987553989)*x[2]
-        arg[3,1,0,1]=(-0.784006561231)*x[0]**o+(-0.809789430022)*x[0]+(-0.846391792735)*x[1]**o+(-0.211583304405)*x[1]+(-0.00198590063687)*x[2]**o+(-0.853253255224)*x[2]
-        arg[3,1,1,0]=(0.595567299132)*x[0]**o+(-0.581734416878)*x[0]+(0.88144481486)*x[1]**o+(0.776876564509)*x[1]+(-0.367477971386)*x[2]**o+(0.0806320164453)*x[2]
-        arg[3,1,1,1]=(0.440836187611)*x[0]**o+(-0.578925091757)*x[0]+(0.923367189832)*x[1]**o+(-0.993888173929)*x[1]+(-0.645514380411)*x[2]**o+(0.0267439044199)*x[2]
-        arg[3,1,2,0]=(-0.305182288788)*x[0]**o+(-0.503372502553)*x[0]+(0.740948657389)*x[1]**o+(0.285661052275)*x[1]+(-0.634510984218)*x[2]**o+(-0.123979746456)*x[2]
-        arg[3,1,2,1]=(-0.897274928495)*x[0]**o+(0.971356796164)*x[0]+(0.940768290313)*x[1]**o+(-0.552941985667)*x[1]+(0.172857451423)*x[2]**o+(0.844758237523)*x[2]
-        arg[3,2,0,0]=(-0.903542725333)*x[0]**o+(0.936704774551)*x[0]+(-0.398085875228)*x[1]**o+(-0.304061573512)*x[1]+(-0.13362037229)*x[2]**o+(-0.405043350728)*x[2]
-        arg[3,2,0,1]=(-0.0208590751801)*x[0]**o+(-0.354086381885)*x[0]+(0.510884698744)*x[1]**o+(-0.275504880518)*x[1]+(0.459476496356)*x[2]**o+(0.25358097976)*x[2]
-        arg[3,2,1,0]=(-0.0171081877107)*x[0]**o+(-0.856081626112)*x[0]+(-0.0698686571004)*x[1]**o+(0.0954918361122)*x[1]+(0.938494954069)*x[2]**o+(-0.824928688248)*x[2]
-        arg[3,2,1,1]=(-0.277307915098)*x[0]**o+(0.737855779658)*x[0]+(-0.466761948855)*x[1]**o+(-0.821498435809)*x[1]+(-0.391009601442)*x[2]**o+(0.643834542048)*x[2]
-        arg[3,2,2,0]=(0.379015007885)*x[0]**o+(0.348646179575)*x[0]+(0.733765133901)*x[1]**o+(-0.722363571789)*x[1]+(0.488531791931)*x[2]**o+(0.279813923679)*x[2]
-        arg[3,2,2,1]=(0.516708382119)*x[0]**o+(0.0426665103314)*x[0]+(-0.168751315718)*x[1]**o+(-0.124069236608)*x[1]+(-0.778866001674)*x[2]**o+(-0.362031001279)*x[2]
-        arg[3,3,0,0]=(0.995284803465)*x[0]**o+(-0.442327755879)*x[0]+(-0.13110270925)*x[1]**o+(-0.172857543102)*x[1]+(-0.910522664379)*x[2]**o+(0.516931833163)*x[2]
-        arg[3,3,0,1]=(-0.889320295626)*x[0]**o+(-0.728330379534)*x[0]+(-0.584091700627)*x[1]**o+(0.469914082337)*x[1]+(0.18874127891)*x[2]**o+(0.0846532039249)*x[2]
-        arg[3,3,1,0]=(0.911523535462)*x[0]**o+(0.0924361220354)*x[0]+(-0.0822504494228)*x[1]**o+(0.00630249023591)*x[1]+(-0.180497330322)*x[2]**o+(0.817405577154)*x[2]
-        arg[3,3,1,1]=(0.681872747813)*x[0]**o+(0.840680190206)*x[0]+(-0.477660295206)*x[1]**o+(0.0399086968056)*x[1]+(0.440403204247)*x[2]**o+(-0.220656197016)*x[2]
-        arg[3,3,2,0]=(-0.967524407336)*x[0]**o+(0.896652274462)*x[0]+(0.735269328519)*x[1]**o+(-0.249017384614)*x[1]+(-0.573222311563)*x[2]**o+(-0.653800334954)*x[2]
-        arg[3,3,2,1]=(0.10041632804)*x[0]**o+(0.167657178348)*x[0]+(0.990621134594)*x[1]**o+(-0.309063473348)*x[1]+(-0.688206827575)*x[2]**o+(0.0926806818663)*x[2]
-        arg[3,4,0,0]=(-0.128678339518)*x[0]**o+(-0.974238160059)*x[0]+(-0.762599464772)*x[1]**o+(0.0233286358698)*x[1]+(-0.622481697973)*x[2]**o+(-0.080495303798)*x[2]
-        arg[3,4,0,1]=(-0.380318230058)*x[0]**o+(0.568425682425)*x[0]+(0.787369916262)*x[1]**o+(0.296745245123)*x[1]+(-0.917621002414)*x[2]**o+(-0.696209404954)*x[2]
-        arg[3,4,1,0]=(-0.382961468898)*x[0]**o+(0.672614453621)*x[0]+(0.565371503874)*x[1]**o+(-0.597331999912)*x[1]+(-0.153637846704)*x[2]**o+(-0.438159587906)*x[2]
-        arg[3,4,1,1]=(-0.541043007799)*x[0]**o+(0.415600628159)*x[0]+(-0.793716270785)*x[1]**o+(0.780110667203)*x[1]+(-0.101309486185)*x[2]**o+(-0.138868352939)*x[2]
-        arg[3,4,2,0]=(0.679815917569)*x[0]**o+(-0.800657537776)*x[0]+(-0.711956069893)*x[1]**o+(-0.575626146908)*x[1]+(0.184247083249)*x[2]**o+(-0.728118084396)*x[2]
-        arg[3,4,2,1]=(-0.608089432748)*x[0]**o+(0.356378798828)*x[0]+(-0.575957599599)*x[1]**o+(0.599586825137)*x[1]+(-0.160475743299)*x[2]**o+(-0.070762356177)*x[2]
-        ref[0,0,0,0]=(-0.93229223906)*x_ref[0]**o+(0.176839936782)*x_ref[0]+(0.986271000359)*x_ref[1]**o+(-0.449322385723)*x_ref[1]+(-0.856450437823)*x_ref[2]**o+(0.31473579221)*x_ref[2]
-        ref[0,0,0,1]=(0.714047232765)*x_ref[0]**o+(-0.323471323003)*x_ref[0]+(0.628080480343)*x_ref[1]**o+(-0.992007912045)*x_ref[1]+(-0.11019723051)*x_ref[2]**o+(-0.104735408233)*x_ref[2]
-        ref[0,0,1,0]=(-0.437250443294)*x_ref[0]**o+(-0.741469652781)*x_ref[0]+(0.650921038465)*x_ref[1]**o+(0.679622741243)*x_ref[1]+(0.604005894895)*x_ref[2]**o+(0.598155624876)*x_ref[2]
-        ref[0,0,1,1]=(-0.574872168761)*x_ref[0]**o+(0.796207672391)*x_ref[0]+(-0.478046646159)*x_ref[1]**o+(0.604661326741)*x_ref[1]+(-0.898457020186)*x_ref[2]**o+(0.43234750827)*x_ref[2]
-        ref[0,0,2,0]=(-0.674008357742)*x_ref[0]**o+(0.699614371016)*x_ref[0]+(0.441321981559)*x_ref[1]**o+(-0.619688689942)*x_ref[1]+(-0.0874579208832)*x_ref[2]**o+(-0.925753840555)*x_ref[2]
-        ref[0,0,2,1]=(-0.114329474892)*x_ref[0]**o+(0.699501071503)*x_ref[0]+(-0.618807420683)*x_ref[1]**o+(0.411584695002)*x_ref[1]+(-0.234620261556)*x_ref[2]**o+(0.585720100967)*x_ref[2]
-        ref[0,1,0,0]=(0.617432097253)*x_ref[0]**o+(-0.00304868863676)*x_ref[0]+(0.571021785645)*x_ref[1]**o+(0.457197205728)*x_ref[1]+(0.462895867813)*x_ref[2]**o+(0.278022956316)*x_ref[2]
-        ref[0,1,0,1]=(-0.659136231188)*x_ref[0]**o+(-0.388212920906)*x_ref[0]+(-0.982152608232)*x_ref[1]**o+(-0.665797156013)*x_ref[1]+(-0.76141890649)*x_ref[2]**o+(-0.591458323836)*x_ref[2]
-        ref[0,1,1,0]=(-0.488016386893)*x_ref[0]**o+(0.965660401944)*x_ref[0]+(0.178400189819)*x_ref[1]**o+(0.578417314499)*x_ref[1]+(-0.398083955217)*x_ref[2]**o+(0.460338187535)*x_ref[2]
-        ref[0,1,1,1]=(-0.182086458235)*x_ref[0]**o+(0.0842368498629)*x_ref[0]+(-0.642008026184)*x_ref[1]**o+(-0.0449408131957)*x_ref[1]+(-0.927397573018)*x_ref[2]**o+(0.854313729816)*x_ref[2]
-        ref[0,1,2,0]=(-0.201475872769)*x_ref[0]**o+(0.098190765292)*x_ref[0]+(0.808624244922)*x_ref[1]**o+(0.0726268899898)*x_ref[1]+(-0.605334327027)*x_ref[2]**o+(-0.999151255934)*x_ref[2]
-        ref[0,1,2,1]=(0.672344024218)*x_ref[0]**o+(-0.638554833481)*x_ref[0]+(-0.212231801634)*x_ref[1]**o+(-0.492765366968)*x_ref[1]+(0.311273771921)*x_ref[2]**o+(-0.504370655006)*x_ref[2]
-        ref[0,2,0,0]=(0.9944935907)*x_ref[0]**o+(-0.365261996611)*x_ref[0]+(-0.105667939789)*x_ref[1]**o+(0.886935751977)*x_ref[1]+(0.263336157757)*x_ref[2]**o+(-0.880316523113)*x_ref[2]
-        ref[0,2,0,1]=(-0.659779300787)*x_ref[0]**o+(-0.728590180152)*x_ref[0]+(0.732078508037)*x_ref[1]**o+(0.684963412098)*x_ref[1]+(0.822970700012)*x_ref[2]**o+(-0.680001879674)*x_ref[2]
-        ref[0,2,1,0]=(-0.207855412893)*x_ref[0]**o+(0.438275426529)*x_ref[0]+(0.87046682066)*x_ref[1]**o+(-0.960322013848)*x_ref[1]+(-0.273728198625)*x_ref[2]**o+(-0.960137228004)*x_ref[2]
-        ref[0,2,1,1]=(-0.189232680002)*x_ref[0]**o+(0.866417302002)*x_ref[0]+(-0.93403311248)*x_ref[1]**o+(-0.55773104878)*x_ref[1]+(0.94062895773)*x_ref[2]**o+(-0.758052194805)*x_ref[2]
-        ref[0,2,2,0]=(0.100859944394)*x_ref[0]**o+(-0.20292135909)*x_ref[0]+(-0.713339941261)*x_ref[1]**o+(-0.615106454411)*x_ref[1]+(0.791245995152)*x_ref[2]**o+(-0.81051791594)*x_ref[2]
-        ref[0,2,2,1]=(0.595743424517)*x_ref[0]**o+(-0.179075876404)*x_ref[0]+(-0.799005601715)*x_ref[1]**o+(-0.0554635073569)*x_ref[1]+(-0.850510701985)*x_ref[2]**o+(0.234516538169)*x_ref[2]
-        ref[0,3,0,0]=(-0.361667738861)*x_ref[0]**o+(-0.551837498696)*x_ref[0]+(-0.834377202094)*x_ref[1]**o+(0.814168224265)*x_ref[1]+(-0.00479533268377)*x_ref[2]**o+(0.843007652951)*x_ref[2]
-        ref[0,3,0,1]=(-0.448417439465)*x_ref[0]**o+(0.431496158388)*x_ref[0]+(-0.547416443433)*x_ref[1]**o+(-0.0746785704695)*x_ref[1]+(-0.646238182944)*x_ref[2]**o+(-0.318608714595)*x_ref[2]
-        ref[0,3,1,0]=(-0.275647366007)*x_ref[0]**o+(-0.410594785047)*x_ref[0]+(-0.858282378196)*x_ref[1]**o+(-0.755586690837)*x_ref[1]+(-0.420481091654)*x_ref[2]**o+(-0.0996487371831)*x_ref[2]
-        ref[0,3,1,1]=(-0.395961249009)*x_ref[0]**o+(0.0860896467863)*x_ref[0]+(0.482719525748)*x_ref[1]**o+(0.319368178133)*x_ref[1]+(0.516449153414)*x_ref[2]**o+(-0.246749862576)*x_ref[2]
-        ref[0,3,2,0]=(-0.367322027122)*x_ref[0]**o+(0.687206412524)*x_ref[0]+(0.616265233972)*x_ref[1]**o+(-0.32660589112)*x_ref[1]+(-0.944607343096)*x_ref[2]**o+(0.123982537951)*x_ref[2]
-        ref[0,3,2,1]=(0.700497166804)*x_ref[0]**o+(0.553961329865)*x_ref[0]+(-0.34020003754)*x_ref[1]**o+(0.295870992783)*x_ref[1]+(-0.220275880046)*x_ref[2]**o+(0.766121035825)*x_ref[2]
-        ref[0,4,0,0]=(0.405469789242)*x_ref[0]**o+(-0.338347662873)*x_ref[0]+(0.0761796434233)*x_ref[1]**o+(-0.120599175033)*x_ref[1]+(0.107865585379)*x_ref[2]**o+(0.0711941007838)*x_ref[2]
-        ref[0,4,0,1]=(0.614166154899)*x_ref[0]**o+(0.195780702963)*x_ref[0]+(0.718935985215)*x_ref[1]**o+(0.214577296792)*x_ref[1]+(-0.366985242107)*x_ref[2]**o+(-0.509584787633)*x_ref[2]
-        ref[0,4,1,0]=(-0.638646370981)*x_ref[0]**o+(-0.769955899284)*x_ref[0]+(-0.887407540503)*x_ref[1]**o+(0.0901245429998)*x_ref[1]+(0.786085641321)*x_ref[2]**o+(0.6248068552)*x_ref[2]
-        ref[0,4,1,1]=(-0.145426222043)*x_ref[0]**o+(-0.494114545016)*x_ref[0]+(0.422153721335)*x_ref[1]**o+(0.617022143901)*x_ref[1]+(-0.665972324723)*x_ref[2]**o+(-0.476724432799)*x_ref[2]
-        ref[0,4,2,0]=(0.556105252092)*x_ref[0]**o+(-0.893268696809)*x_ref[0]+(0.146441889489)*x_ref[1]**o+(-0.170512113283)*x_ref[1]+(-0.869313262875)*x_ref[2]**o+(-0.976874109392)*x_ref[2]
-        ref[0,4,2,1]=(0.858927206499)*x_ref[0]**o+(0.198998355146)*x_ref[0]+(0.278125296049)*x_ref[1]**o+(-0.0442518828093)*x_ref[1]+(0.274852724203)*x_ref[2]**o+(-0.167649193314)*x_ref[2]
-        ref[1,0,0,0]=(-0.0429420289353)*x_ref[0]**o+(-0.15764693929)*x_ref[0]+(-0.859599917512)*x_ref[1]**o+(-0.904178643575)*x_ref[1]+(0.519560711493)*x_ref[2]**o+(0.258644717907)*x_ref[2]
-        ref[1,0,0,1]=(-0.185321114264)*x_ref[0]**o+(-0.794493830004)*x_ref[0]+(0.136084421162)*x_ref[1]**o+(0.926912021419)*x_ref[1]+(0.346392120388)*x_ref[2]**o+(-0.183908371454)*x_ref[2]
-        ref[1,0,1,0]=(-0.730675509877)*x_ref[0]**o+(0.865034802778)*x_ref[0]+(-0.506315431878)*x_ref[1]**o+(-0.94607761051)*x_ref[1]+(0.195194792801)*x_ref[2]**o+(-0.865129258879)*x_ref[2]
-        ref[1,0,1,1]=(-0.0597026648107)*x_ref[0]**o+(-0.884790497)*x_ref[0]+(-0.0631278742098)*x_ref[1]**o+(-0.808364940737)*x_ref[1]+(-0.968952604837)*x_ref[2]**o+(0.142246702632)*x_ref[2]
-        ref[1,0,2,0]=(0.648472894563)*x_ref[0]**o+(0.145861644073)*x_ref[0]+(0.501227520574)*x_ref[1]**o+(0.265886482306)*x_ref[1]+(-0.0472772173573)*x_ref[2]**o+(-0.364169655969)*x_ref[2]
-        ref[1,0,2,1]=(0.847863600695)*x_ref[0]**o+(-0.288841685199)*x_ref[0]+(-0.500273502795)*x_ref[1]**o+(0.627379277592)*x_ref[1]+(0.326814024625)*x_ref[2]**o+(-0.514712825895)*x_ref[2]
-        ref[1,1,0,0]=(-0.947845713712)*x_ref[0]**o+(-0.372115616305)*x_ref[0]+(-0.572858279998)*x_ref[1]**o+(0.226237627692)*x_ref[1]+(0.210201947182)*x_ref[2]**o+(0.0147616538594)*x_ref[2]
-        ref[1,1,0,1]=(-0.39813630466)*x_ref[0]**o+(-0.658496395731)*x_ref[0]+(-0.363906465005)*x_ref[1]**o+(-0.816719661238)*x_ref[1]+(-0.478106835032)*x_ref[2]**o+(0.0819042309589)*x_ref[2]
-        ref[1,1,1,0]=(-0.287160278593)*x_ref[0]**o+(-0.0281402640978)*x_ref[0]+(0.41559795378)*x_ref[1]**o+(0.158274458097)*x_ref[1]+(-0.798429481502)*x_ref[2]**o+(-0.278585334624)*x_ref[2]
-        ref[1,1,1,1]=(0.809550480973)*x_ref[0]**o+(0.192026915854)*x_ref[0]+(-0.891168838599)*x_ref[1]**o+(0.0482621192882)*x_ref[1]+(-0.35339708159)*x_ref[2]**o+(-0.133161551553)*x_ref[2]
-        ref[1,1,2,0]=(0.939582328872)*x_ref[0]**o+(0.561963790516)*x_ref[0]+(0.885264722949)*x_ref[1]**o+(-0.468042305266)*x_ref[1]+(0.232880002429)*x_ref[2]**o+(-0.772896005701)*x_ref[2]
-        ref[1,1,2,1]=(-0.297333303209)*x_ref[0]**o+(-0.414050924207)*x_ref[0]+(-0.278903698873)*x_ref[1]**o+(0.345370620869)*x_ref[1]+(-0.0570151259027)*x_ref[2]**o+(0.786449641378)*x_ref[2]
-        ref[1,2,0,0]=(0.644047138589)*x_ref[0]**o+(-0.480660438838)*x_ref[0]+(0.32526499462)*x_ref[1]**o+(-0.775988282127)*x_ref[1]+(0.108374143932)*x_ref[2]**o+(0.955463667181)*x_ref[2]
-        ref[1,2,0,1]=(-0.468236790339)*x_ref[0]**o+(0.844197711724)*x_ref[0]+(0.808973429831)*x_ref[1]**o+(-0.647699550005)*x_ref[1]+(0.552555959813)*x_ref[2]**o+(-0.3403079515)*x_ref[2]
-        ref[1,2,1,0]=(0.864686362308)*x_ref[0]**o+(0.248923646116)*x_ref[0]+(0.0287042863842)*x_ref[1]**o+(0.404974282153)*x_ref[1]+(0.113501438234)*x_ref[2]**o+(-0.619364894397)*x_ref[2]
-        ref[1,2,1,1]=(-0.625146992499)*x_ref[0]**o+(-0.0480602452983)*x_ref[0]+(0.168910550914)*x_ref[1]**o+(-0.891584218123)*x_ref[1]+(0.0609357618263)*x_ref[2]**o+(0.0451921002161)*x_ref[2]
-        ref[1,2,2,0]=(-0.478728628752)*x_ref[0]**o+(0.428376547798)*x_ref[0]+(0.817203376818)*x_ref[1]**o+(-0.856056266953)*x_ref[1]+(0.354960313382)*x_ref[2]**o+(-0.611468960461)*x_ref[2]
-        ref[1,2,2,1]=(0.49500742113)*x_ref[0]**o+(0.902948130263)*x_ref[0]+(-0.810748543744)*x_ref[1]**o+(-0.696150924858)*x_ref[1]+(-0.748278516161)*x_ref[2]**o+(0.694815527058)*x_ref[2]
-        ref[1,3,0,0]=(-0.361960150296)*x_ref[0]**o+(-0.845139780461)*x_ref[0]+(-0.0624499309665)*x_ref[1]**o+(-0.0515558058489)*x_ref[1]+(0.400690983017)*x_ref[2]**o+(-0.744608407974)*x_ref[2]
-        ref[1,3,0,1]=(-0.452453617467)*x_ref[0]**o+(0.845396139593)*x_ref[0]+(0.292319469936)*x_ref[1]**o+(-0.833547518634)*x_ref[1]+(-0.511797700353)*x_ref[2]**o+(0.857891454773)*x_ref[2]
-        ref[1,3,1,0]=(0.779504092912)*x_ref[0]**o+(0.500524773615)*x_ref[0]+(0.590542659382)*x_ref[1]**o+(0.479310630519)*x_ref[1]+(0.509960641956)*x_ref[2]**o+(-0.564980432959)*x_ref[2]
-        ref[1,3,1,1]=(-0.145745189298)*x_ref[0]**o+(-0.256064576359)*x_ref[0]+(0.640890837126)*x_ref[1]**o+(-0.718802035152)*x_ref[1]+(-0.322216873583)*x_ref[2]**o+(-0.0246526526334)*x_ref[2]
-        ref[1,3,2,0]=(-0.463434285098)*x_ref[0]**o+(0.116722448643)*x_ref[0]+(-0.690378381342)*x_ref[1]**o+(0.429197465885)*x_ref[1]+(-0.353019731384)*x_ref[2]**o+(0.57397712918)*x_ref[2]
-        ref[1,3,2,1]=(0.169676853383)*x_ref[0]**o+(0.815225472623)*x_ref[0]+(-0.11125527552)*x_ref[1]**o+(0.391513831525)*x_ref[1]+(-0.587041361585)*x_ref[2]**o+(0.255194151616)*x_ref[2]
-        ref[1,4,0,0]=(0.325351608628)*x_ref[0]**o+(-0.57751715453)*x_ref[0]+(0.145167511303)*x_ref[1]**o+(-0.969286030742)*x_ref[1]+(0.917370398478)*x_ref[2]**o+(0.691483691598)*x_ref[2]
-        ref[1,4,0,1]=(0.0997998298271)*x_ref[0]**o+(-0.101248202247)*x_ref[0]+(-0.650649653848)*x_ref[1]**o+(-0.157887947288)*x_ref[1]+(0.517501747765)*x_ref[2]**o+(-0.0852921926298)*x_ref[2]
-        ref[1,4,1,0]=(0.984595420407)*x_ref[0]**o+(0.499293499076)*x_ref[0]+(0.352193115874)*x_ref[1]**o+(-0.684522909647)*x_ref[1]+(-0.391538373605)*x_ref[2]**o+(0.404635595162)*x_ref[2]
-        ref[1,4,1,1]=(-0.231310482173)*x_ref[0]**o+(-0.0385089836559)*x_ref[0]+(0.247671691888)*x_ref[1]**o+(0.883971955027)*x_ref[1]+(-0.0856624709734)*x_ref[2]**o+(0.942940875904)*x_ref[2]
-        ref[1,4,2,0]=(-0.471467257434)*x_ref[0]**o+(0.835634240897)*x_ref[0]+(-0.594421294562)*x_ref[1]**o+(-0.187584387111)*x_ref[1]+(0.859867472765)*x_ref[2]**o+(0.930951154576)*x_ref[2]
-        ref[1,4,2,1]=(0.504416975601)*x_ref[0]**o+(0.435692923635)*x_ref[0]+(-0.296945944313)*x_ref[1]**o+(0.815156218765)*x_ref[1]+(0.464464247442)*x_ref[2]**o+(-0.378809453041)*x_ref[2]
-        ref[2,0,0,0]=(0.213087423107)*x_ref[0]**o+(-0.504681665801)*x_ref[0]+(0.796352190405)*x_ref[1]**o+(0.546752751136)*x_ref[1]+(0.57347644664)*x_ref[2]**o+(0.715856963195)*x_ref[2]
-        ref[2,0,0,1]=(-0.28455266769)*x_ref[0]**o+(0.853162220766)*x_ref[0]+(0.164930982863)*x_ref[1]**o+(-0.0136996498765)*x_ref[1]+(0.293717915079)*x_ref[2]**o+(-0.216124158473)*x_ref[2]
-        ref[2,0,1,0]=(-0.328115989441)*x_ref[0]**o+(-0.529441496488)*x_ref[0]+(-0.43579479677)*x_ref[1]**o+(-0.851333801194)*x_ref[1]+(-0.278406102972)*x_ref[2]**o+(0.947777471824)*x_ref[2]
-        ref[2,0,1,1]=(-0.756438938789)*x_ref[0]**o+(-0.624332272735)*x_ref[0]+(-0.591638429565)*x_ref[1]**o+(-0.0608281771566)*x_ref[1]+(-0.852078784085)*x_ref[2]**o+(-0.526558964866)*x_ref[2]
-        ref[2,0,2,0]=(-0.923892426969)*x_ref[0]**o+(0.788121899878)*x_ref[0]+(-0.446006331202)*x_ref[1]**o+(0.997210871574)*x_ref[1]+(0.356998606103)*x_ref[2]**o+(0.972643822823)*x_ref[2]
-        ref[2,0,2,1]=(0.225183308571)*x_ref[0]**o+(-0.757505414777)*x_ref[0]+(-0.59573192074)*x_ref[1]**o+(0.57166154987)*x_ref[1]+(0.622343198809)*x_ref[2]**o+(0.60343970503)*x_ref[2]
-        ref[2,1,0,0]=(0.51027702934)*x_ref[0]**o+(-0.711737679522)*x_ref[0]+(-0.211712579627)*x_ref[1]**o+(-0.495817605314)*x_ref[1]+(0.924425804272)*x_ref[2]**o+(0.753424835275)*x_ref[2]
-        ref[2,1,0,1]=(0.476218252577)*x_ref[0]**o+(0.187579891557)*x_ref[0]+(0.727359583623)*x_ref[1]**o+(-0.389875559955)*x_ref[1]+(-0.352889326477)*x_ref[2]**o+(0.365143943637)*x_ref[2]
-        ref[2,1,1,0]=(-0.815704312943)*x_ref[0]**o+(0.315217470245)*x_ref[0]+(-0.535234555065)*x_ref[1]**o+(-0.433408988501)*x_ref[1]+(-0.676694087389)*x_ref[2]**o+(0.384097177718)*x_ref[2]
-        ref[2,1,1,1]=(-0.0368452411345)*x_ref[0]**o+(0.514540686444)*x_ref[0]+(-0.527100066965)*x_ref[1]**o+(0.0291015562912)*x_ref[1]+(-0.605646905004)*x_ref[2]**o+(0.931528599981)*x_ref[2]
-        ref[2,1,2,0]=(-0.0994015945266)*x_ref[0]**o+(-0.762310347434)*x_ref[0]+(-0.845934950466)*x_ref[1]**o+(-0.235758967923)*x_ref[1]+(0.755531422698)*x_ref[2]**o+(0.108353867777)*x_ref[2]
-        ref[2,1,2,1]=(-0.868779052889)*x_ref[0]**o+(0.783878941075)*x_ref[0]+(0.900089560473)*x_ref[1]**o+(-0.836779405877)*x_ref[1]+(-0.799571882449)*x_ref[2]**o+(0.999710029157)*x_ref[2]
-        ref[2,2,0,0]=(0.541465277143)*x_ref[0]**o+(-0.840477797945)*x_ref[0]+(-0.362577721098)*x_ref[1]**o+(0.00680131806718)*x_ref[1]+(-0.338485239867)*x_ref[2]**o+(0.828213756751)*x_ref[2]
-        ref[2,2,0,1]=(-0.927347423175)*x_ref[0]**o+(-0.936191125785)*x_ref[0]+(-0.411819804833)*x_ref[1]**o+(-0.0222067637269)*x_ref[1]+(-0.104411832586)*x_ref[2]**o+(-0.79937203081)*x_ref[2]
-        ref[2,2,1,0]=(0.273051712848)*x_ref[0]**o+(-0.802468557957)*x_ref[0]+(-0.019392898867)*x_ref[1]**o+(-0.612803074784)*x_ref[1]+(-0.269705464223)*x_ref[2]**o+(-0.244405147706)*x_ref[2]
-        ref[2,2,1,1]=(-0.08869649035)*x_ref[0]**o+(0.809761782447)*x_ref[0]+(0.761420080249)*x_ref[1]**o+(0.16590038557)*x_ref[1]+(-0.405657593445)*x_ref[2]**o+(0.123593603037)*x_ref[2]
-        ref[2,2,2,0]=(-0.799691160987)*x_ref[0]**o+(0.834835690475)*x_ref[0]+(-0.0863569221737)*x_ref[1]**o+(0.988343215152)*x_ref[1]+(0.294423283474)*x_ref[2]**o+(0.325725138203)*x_ref[2]
-        ref[2,2,2,1]=(0.648897496592)*x_ref[0]**o+(-0.474329387314)*x_ref[0]+(-0.904613697104)*x_ref[1]**o+(0.382201388286)*x_ref[1]+(-0.596889148339)*x_ref[2]**o+(0.705132157684)*x_ref[2]
-        ref[2,3,0,0]=(0.906738144045)*x_ref[0]**o+(-0.365392026426)*x_ref[0]+(0.730557428733)*x_ref[1]**o+(-0.857864471189)*x_ref[1]+(-0.160930657186)*x_ref[2]**o+(0.885067383334)*x_ref[2]
-        ref[2,3,0,1]=(0.992764702472)*x_ref[0]**o+(0.720688532948)*x_ref[0]+(0.318869772818)*x_ref[1]**o+(0.995508347248)*x_ref[1]+(0.108569456996)*x_ref[2]**o+(-0.990939292995)*x_ref[2]
-        ref[2,3,1,0]=(0.690584992096)*x_ref[0]**o+(0.605885242246)*x_ref[0]+(0.72371794265)*x_ref[1]**o+(-0.632609325879)*x_ref[1]+(0.520273588734)*x_ref[2]**o+(0.885804143155)*x_ref[2]
-        ref[2,3,1,1]=(0.485231542482)*x_ref[0]**o+(0.866920225418)*x_ref[0]+(-0.814964945972)*x_ref[1]**o+(0.544132513209)*x_ref[1]+(-0.155071376494)*x_ref[2]**o+(-0.941300746237)*x_ref[2]
-        ref[2,3,2,0]=(0.748232238388)*x_ref[0]**o+(0.179397724419)*x_ref[0]+(-0.43881886248)*x_ref[1]**o+(-0.124941799624)*x_ref[1]+(0.14679335819)*x_ref[2]**o+(-0.758738846688)*x_ref[2]
-        ref[2,3,2,1]=(-0.0951333655337)*x_ref[0]**o+(0.37270972476)*x_ref[0]+(-0.651977554115)*x_ref[1]**o+(-0.88918597476)*x_ref[1]+(-0.730858685576)*x_ref[2]**o+(0.685881924459)*x_ref[2]
-        ref[2,4,0,0]=(-0.823487466802)*x_ref[0]**o+(-0.583630855643)*x_ref[0]+(-0.664814562747)*x_ref[1]**o+(0.860952605956)*x_ref[1]+(-0.249114322668)*x_ref[2]**o+(-0.968356584237)*x_ref[2]
-        ref[2,4,0,1]=(0.44040146252)*x_ref[0]**o+(-0.246827565902)*x_ref[0]+(0.596300980733)*x_ref[1]**o+(-0.825818200414)*x_ref[1]+(0.0715512875967)*x_ref[2]**o+(0.996064679803)*x_ref[2]
-        ref[2,4,1,0]=(-0.287806453021)*x_ref[0]**o+(0.704331542927)*x_ref[0]+(-0.346139754521)*x_ref[1]**o+(-0.766667037125)*x_ref[1]+(0.283874132105)*x_ref[2]**o+(-0.613145979204)*x_ref[2]
-        ref[2,4,1,1]=(-0.116649875156)*x_ref[0]**o+(0.291380048239)*x_ref[0]+(0.689809221905)*x_ref[1]**o+(0.758935910592)*x_ref[1]+(0.505142787603)*x_ref[2]**o+(-0.113611480503)*x_ref[2]
-        ref[2,4,2,0]=(-0.836908572692)*x_ref[0]**o+(-0.21892828725)*x_ref[0]+(-0.935780103868)*x_ref[1]**o+(0.106204643268)*x_ref[1]+(-0.894474423807)*x_ref[2]**o+(0.296554773217)*x_ref[2]
-        ref[2,4,2,1]=(-0.89413495023)*x_ref[0]**o+(0.6080813058)*x_ref[0]+(0.087863889878)*x_ref[1]**o+(0.213373665612)*x_ref[1]+(0.17085345025)*x_ref[2]**o+(-0.967625138712)*x_ref[2]
-        ref[3,0,0,0]=(0.327537677409)*x_ref[0]**o+(-0.299373059373)*x_ref[0]+(-0.43223648542)*x_ref[1]**o+(-0.499115781051)*x_ref[1]+(0.145464567449)*x_ref[2]**o+(0.580930584563)*x_ref[2]
-        ref[3,0,0,1]=(-0.122622543351)*x_ref[0]**o+(-0.220547821081)*x_ref[0]+(0.892679827803)*x_ref[1]**o+(0.436584604381)*x_ref[1]+(-0.156093580288)*x_ref[2]**o+(0.464069069075)*x_ref[2]
-        ref[3,0,1,0]=(0.590288663203)*x_ref[0]**o+(-0.212929445251)*x_ref[0]+(0.0899671639061)*x_ref[1]**o+(-0.87729854872)*x_ref[1]+(0.789506558716)*x_ref[2]**o+(-0.68867690907)*x_ref[2]
-        ref[3,0,1,1]=(-0.913651849012)*x_ref[0]**o+(-0.430938918892)*x_ref[0]+(-0.351186012371)*x_ref[1]**o+(0.500306994748)*x_ref[1]+(0.145381845281)*x_ref[2]**o+(0.624993552333)*x_ref[2]
-        ref[3,0,2,0]=(0.281393881265)*x_ref[0]**o+(-0.704727129826)*x_ref[0]+(-0.0102091836449)*x_ref[1]**o+(0.311857501353)*x_ref[1]+(0.300732947904)*x_ref[2]**o+(0.923973499548)*x_ref[2]
-        ref[3,0,2,1]=(-0.584907526993)*x_ref[0]**o+(0.625732316822)*x_ref[0]+(-0.609691930408)*x_ref[1]**o+(0.056160226956)*x_ref[1]+(-0.766583561947)*x_ref[2]**o+(0.307692190194)*x_ref[2]
-        ref[3,1,0,0]=(0.731231379445)*x_ref[0]**o+(-0.0485980527115)*x_ref[0]+(0.908932758852)*x_ref[1]**o+(0.188918035886)*x_ref[1]+(0.685837743688)*x_ref[2]**o+(-0.299987553989)*x_ref[2]
-        ref[3,1,0,1]=(-0.784006561231)*x_ref[0]**o+(-0.809789430022)*x_ref[0]+(-0.846391792735)*x_ref[1]**o+(-0.211583304405)*x_ref[1]+(-0.00198590063687)*x_ref[2]**o+(-0.853253255224)*x_ref[2]
-        ref[3,1,1,0]=(0.595567299132)*x_ref[0]**o+(-0.581734416878)*x_ref[0]+(0.88144481486)*x_ref[1]**o+(0.776876564509)*x_ref[1]+(-0.367477971386)*x_ref[2]**o+(0.0806320164453)*x_ref[2]
-        ref[3,1,1,1]=(0.440836187611)*x_ref[0]**o+(-0.578925091757)*x_ref[0]+(0.923367189832)*x_ref[1]**o+(-0.993888173929)*x_ref[1]+(-0.645514380411)*x_ref[2]**o+(0.0267439044199)*x_ref[2]
-        ref[3,1,2,0]=(-0.305182288788)*x_ref[0]**o+(-0.503372502553)*x_ref[0]+(0.740948657389)*x_ref[1]**o+(0.285661052275)*x_ref[1]+(-0.634510984218)*x_ref[2]**o+(-0.123979746456)*x_ref[2]
-        ref[3,1,2,1]=(-0.897274928495)*x_ref[0]**o+(0.971356796164)*x_ref[0]+(0.940768290313)*x_ref[1]**o+(-0.552941985667)*x_ref[1]+(0.172857451423)*x_ref[2]**o+(0.844758237523)*x_ref[2]
-        ref[3,2,0,0]=(-0.903542725333)*x_ref[0]**o+(0.936704774551)*x_ref[0]+(-0.398085875228)*x_ref[1]**o+(-0.304061573512)*x_ref[1]+(-0.13362037229)*x_ref[2]**o+(-0.405043350728)*x_ref[2]
-        ref[3,2,0,1]=(-0.0208590751801)*x_ref[0]**o+(-0.354086381885)*x_ref[0]+(0.510884698744)*x_ref[1]**o+(-0.275504880518)*x_ref[1]+(0.459476496356)*x_ref[2]**o+(0.25358097976)*x_ref[2]
-        ref[3,2,1,0]=(-0.0171081877107)*x_ref[0]**o+(-0.856081626112)*x_ref[0]+(-0.0698686571004)*x_ref[1]**o+(0.0954918361122)*x_ref[1]+(0.938494954069)*x_ref[2]**o+(-0.824928688248)*x_ref[2]
-        ref[3,2,1,1]=(-0.277307915098)*x_ref[0]**o+(0.737855779658)*x_ref[0]+(-0.466761948855)*x_ref[1]**o+(-0.821498435809)*x_ref[1]+(-0.391009601442)*x_ref[2]**o+(0.643834542048)*x_ref[2]
-        ref[3,2,2,0]=(0.379015007885)*x_ref[0]**o+(0.348646179575)*x_ref[0]+(0.733765133901)*x_ref[1]**o+(-0.722363571789)*x_ref[1]+(0.488531791931)*x_ref[2]**o+(0.279813923679)*x_ref[2]
-        ref[3,2,2,1]=(0.516708382119)*x_ref[0]**o+(0.0426665103314)*x_ref[0]+(-0.168751315718)*x_ref[1]**o+(-0.124069236608)*x_ref[1]+(-0.778866001674)*x_ref[2]**o+(-0.362031001279)*x_ref[2]
-        ref[3,3,0,0]=(0.995284803465)*x_ref[0]**o+(-0.442327755879)*x_ref[0]+(-0.13110270925)*x_ref[1]**o+(-0.172857543102)*x_ref[1]+(-0.910522664379)*x_ref[2]**o+(0.516931833163)*x_ref[2]
-        ref[3,3,0,1]=(-0.889320295626)*x_ref[0]**o+(-0.728330379534)*x_ref[0]+(-0.584091700627)*x_ref[1]**o+(0.469914082337)*x_ref[1]+(0.18874127891)*x_ref[2]**o+(0.0846532039249)*x_ref[2]
-        ref[3,3,1,0]=(0.911523535462)*x_ref[0]**o+(0.0924361220354)*x_ref[0]+(-0.0822504494228)*x_ref[1]**o+(0.00630249023591)*x_ref[1]+(-0.180497330322)*x_ref[2]**o+(0.817405577154)*x_ref[2]
-        ref[3,3,1,1]=(0.681872747813)*x_ref[0]**o+(0.840680190206)*x_ref[0]+(-0.477660295206)*x_ref[1]**o+(0.0399086968056)*x_ref[1]+(0.440403204247)*x_ref[2]**o+(-0.220656197016)*x_ref[2]
-        ref[3,3,2,0]=(-0.967524407336)*x_ref[0]**o+(0.896652274462)*x_ref[0]+(0.735269328519)*x_ref[1]**o+(-0.249017384614)*x_ref[1]+(-0.573222311563)*x_ref[2]**o+(-0.653800334954)*x_ref[2]
-        ref[3,3,2,1]=(0.10041632804)*x_ref[0]**o+(0.167657178348)*x_ref[0]+(0.990621134594)*x_ref[1]**o+(-0.309063473348)*x_ref[1]+(-0.688206827575)*x_ref[2]**o+(0.0926806818663)*x_ref[2]
-        ref[3,4,0,0]=(-0.128678339518)*x_ref[0]**o+(-0.974238160059)*x_ref[0]+(-0.762599464772)*x_ref[1]**o+(0.0233286358698)*x_ref[1]+(-0.622481697973)*x_ref[2]**o+(-0.080495303798)*x_ref[2]
-        ref[3,4,0,1]=(-0.380318230058)*x_ref[0]**o+(0.568425682425)*x_ref[0]+(0.787369916262)*x_ref[1]**o+(0.296745245123)*x_ref[1]+(-0.917621002414)*x_ref[2]**o+(-0.696209404954)*x_ref[2]
-        ref[3,4,1,0]=(-0.382961468898)*x_ref[0]**o+(0.672614453621)*x_ref[0]+(0.565371503874)*x_ref[1]**o+(-0.597331999912)*x_ref[1]+(-0.153637846704)*x_ref[2]**o+(-0.438159587906)*x_ref[2]
-        ref[3,4,1,1]=(-0.541043007799)*x_ref[0]**o+(0.415600628159)*x_ref[0]+(-0.793716270785)*x_ref[1]**o+(0.780110667203)*x_ref[1]+(-0.101309486185)*x_ref[2]**o+(-0.138868352939)*x_ref[2]
-        ref[3,4,2,0]=(0.679815917569)*x_ref[0]**o+(-0.800657537776)*x_ref[0]+(-0.711956069893)*x_ref[1]**o+(-0.575626146908)*x_ref[1]+(0.184247083249)*x_ref[2]**o+(-0.728118084396)*x_ref[2]
-        ref[3,4,2,1]=(-0.608089432748)*x_ref[0]**o+(0.356378798828)*x_ref[0]+(-0.575957599599)*x_ref[1]**o+(0.599586825137)*x_ref[1]+(-0.160475743299)*x_ref[2]**o+(-0.070762356177)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.52738736047)*x[0]**o+(-0.513351179641)*x[0]+(0.466974564277)*x[1]**o+(0.247665236281)*x[1]
-        ref=(0.52738736047)*x_ref[0]**o+(-0.513351179641)*x_ref[0]+(0.466974564277)*x_ref[1]**o+(0.247665236281)*x_ref[1]
-      else:
-        arg=(0.345612544612)*x[0]**o+(0.480207854215)*x[0]+(0.196672493786)*x[1]**o+(-0.891043131902)*x[1]+(0.106095952827)*x[2]**o+(0.436049931061)*x[2]
-        ref=(0.345612544612)*x_ref[0]**o+(0.480207854215)*x_ref[0]+(0.196672493786)*x_ref[1]**o+(-0.891043131902)*x_ref[1]+(0.106095952827)*x_ref[2]**o+(0.436049931061)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.738262816349)*x[0]**o+(-0.650523560236)*x[0]+(-0.344136056546)*x[1]**o+(-0.0693168099812)*x[1]
-        arg[1]=(-0.565224044511)*x[0]**o+(0.94461728731)*x[0]+(0.234800891741)*x[1]**o+(0.836341748852)*x[1]
-        ref[0]=(-0.738262816349)*x_ref[0]**o+(-0.650523560236)*x_ref[0]+(-0.344136056546)*x_ref[1]**o+(-0.0693168099812)*x_ref[1]
-        ref[1]=(-0.565224044511)*x_ref[0]**o+(0.94461728731)*x_ref[0]+(0.234800891741)*x_ref[1]**o+(0.836341748852)*x_ref[1]
-      else:
-        arg[0]=(-0.76925788678)*x[0]**o+(-0.391133765534)*x[0]+(0.89961543807)*x[1]**o+(-0.355090830059)*x[1]+(-0.663969382551)*x[2]**o+(0.0324773110608)*x[2]
-        arg[1]=(-0.640271335706)*x[0]**o+(-0.0771899290795)*x[0]+(0.923847889924)*x[1]**o+(-0.732484895713)*x[1]+(-0.782800597476)*x[2]**o+(-0.402230990251)*x[2]
-        ref[0]=(-0.76925788678)*x_ref[0]**o+(-0.391133765534)*x_ref[0]+(0.89961543807)*x_ref[1]**o+(-0.355090830059)*x_ref[1]+(-0.663969382551)*x_ref[2]**o+(0.0324773110608)*x_ref[2]
-        ref[1]=(-0.640271335706)*x_ref[0]**o+(-0.0771899290795)*x_ref[0]+(0.923847889924)*x_ref[1]**o+(-0.732484895713)*x_ref[1]+(-0.782800597476)*x_ref[2]**o+(-0.402230990251)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.631349529615)*x[0]**o+(0.79216890406)*x[0]+(0.835421397222)*x[1]**o+(-0.209368192458)*x[1]
-        arg[0,1]=(-0.166321945093)*x[0]**o+(0.701821475941)*x[0]+(-0.141804772049)*x[1]**o+(-0.860056917696)*x[1]
-        arg[0,2]=(0.761659971379)*x[0]**o+(-0.39989119778)*x[0]+(-0.761140588562)*x[1]**o+(-0.595816184788)*x[1]
-        arg[0,3]=(0.378518095375)*x[0]**o+(-0.880144120304)*x[0]+(0.814409656431)*x[1]**o+(0.0464425920173)*x[1]
-        arg[0,4]=(-0.24431693596)*x[0]**o+(-0.840538735294)*x[0]+(0.0157782225732)*x[1]**o+(0.951311376091)*x[1]
-        arg[1,0]=(0.0710042795971)*x[0]**o+(0.936106708209)*x[0]+(-0.580035969982)*x[1]**o+(0.740790378647)*x[1]
-        arg[1,1]=(-0.807938035414)*x[0]**o+(0.8723236137)*x[0]+(-0.600615307712)*x[1]**o+(0.71483191921)*x[1]
-        arg[1,2]=(0.454239081542)*x[0]**o+(0.966475397079)*x[0]+(-0.184649384525)*x[1]**o+(0.417686859721)*x[1]
-        arg[1,3]=(-0.394999073966)*x[0]**o+(-0.0445825855756)*x[0]+(0.0389091203001)*x[1]**o+(-0.265569544304)*x[1]
-        arg[1,4]=(0.625419856529)*x[0]**o+(-0.297955079048)*x[0]+(0.0092181343855)*x[1]**o+(-0.423768484981)*x[1]
-        arg[2,0]=(0.836466109456)*x[0]**o+(-0.12515777587)*x[0]+(-0.0908815675065)*x[1]**o+(0.825332480799)*x[1]
-        arg[2,1]=(-0.454612353892)*x[0]**o+(0.952942366642)*x[0]+(0.538638303761)*x[1]**o+(0.377957206795)*x[1]
-        arg[2,2]=(-0.229405757447)*x[0]**o+(-0.125249012236)*x[0]+(0.194040765277)*x[1]**o+(-0.77353897054)*x[1]
-        arg[2,3]=(-0.220514078279)*x[0]**o+(-0.937043129926)*x[0]+(0.661270617907)*x[1]**o+(0.342981486241)*x[1]
-        arg[2,4]=(0.58858161977)*x[0]**o+(0.324813259161)*x[0]+(0.00439371077545)*x[1]**o+(0.517353738278)*x[1]
-        arg[3,0]=(0.130001725331)*x[0]**o+(0.512570729718)*x[0]+(0.971292679928)*x[1]**o+(0.302530140373)*x[1]
-        arg[3,1]=(0.999138842976)*x[0]**o+(0.325794749172)*x[0]+(0.94900982582)*x[1]**o+(0.56933825455)*x[1]
-        arg[3,2]=(0.965201839092)*x[0]**o+(0.434187660328)*x[0]+(0.842238794411)*x[1]**o+(-0.754540335284)*x[1]
-        arg[3,3]=(-0.539162954093)*x[0]**o+(-0.373779084363)*x[0]+(-0.426189858865)*x[1]**o+(-0.812351658629)*x[1]
-        arg[3,4]=(0.871516777541)*x[0]**o+(-0.357393696308)*x[0]+(0.267358318776)*x[1]**o+(0.796701523616)*x[1]
-        ref[0,0]=(-0.631349529615)*x_ref[0]**o+(0.79216890406)*x_ref[0]+(0.835421397222)*x_ref[1]**o+(-0.209368192458)*x_ref[1]
-        ref[0,1]=(-0.166321945093)*x_ref[0]**o+(0.701821475941)*x_ref[0]+(-0.141804772049)*x_ref[1]**o+(-0.860056917696)*x_ref[1]
-        ref[0,2]=(0.761659971379)*x_ref[0]**o+(-0.39989119778)*x_ref[0]+(-0.761140588562)*x_ref[1]**o+(-0.595816184788)*x_ref[1]
-        ref[0,3]=(0.378518095375)*x_ref[0]**o+(-0.880144120304)*x_ref[0]+(0.814409656431)*x_ref[1]**o+(0.0464425920173)*x_ref[1]
-        ref[0,4]=(-0.24431693596)*x_ref[0]**o+(-0.840538735294)*x_ref[0]+(0.0157782225732)*x_ref[1]**o+(0.951311376091)*x_ref[1]
-        ref[1,0]=(0.0710042795971)*x_ref[0]**o+(0.936106708209)*x_ref[0]+(-0.580035969982)*x_ref[1]**o+(0.740790378647)*x_ref[1]
-        ref[1,1]=(-0.807938035414)*x_ref[0]**o+(0.8723236137)*x_ref[0]+(-0.600615307712)*x_ref[1]**o+(0.71483191921)*x_ref[1]
-        ref[1,2]=(0.454239081542)*x_ref[0]**o+(0.966475397079)*x_ref[0]+(-0.184649384525)*x_ref[1]**o+(0.417686859721)*x_ref[1]
-        ref[1,3]=(-0.394999073966)*x_ref[0]**o+(-0.0445825855756)*x_ref[0]+(0.0389091203001)*x_ref[1]**o+(-0.265569544304)*x_ref[1]
-        ref[1,4]=(0.625419856529)*x_ref[0]**o+(-0.297955079048)*x_ref[0]+(0.0092181343855)*x_ref[1]**o+(-0.423768484981)*x_ref[1]
-        ref[2,0]=(0.836466109456)*x_ref[0]**o+(-0.12515777587)*x_ref[0]+(-0.0908815675065)*x_ref[1]**o+(0.825332480799)*x_ref[1]
-        ref[2,1]=(-0.454612353892)*x_ref[0]**o+(0.952942366642)*x_ref[0]+(0.538638303761)*x_ref[1]**o+(0.377957206795)*x_ref[1]
-        ref[2,2]=(-0.229405757447)*x_ref[0]**o+(-0.125249012236)*x_ref[0]+(0.194040765277)*x_ref[1]**o+(-0.77353897054)*x_ref[1]
-        ref[2,3]=(-0.220514078279)*x_ref[0]**o+(-0.937043129926)*x_ref[0]+(0.661270617907)*x_ref[1]**o+(0.342981486241)*x_ref[1]
-        ref[2,4]=(0.58858161977)*x_ref[0]**o+(0.324813259161)*x_ref[0]+(0.00439371077545)*x_ref[1]**o+(0.517353738278)*x_ref[1]
-        ref[3,0]=(0.130001725331)*x_ref[0]**o+(0.512570729718)*x_ref[0]+(0.971292679928)*x_ref[1]**o+(0.302530140373)*x_ref[1]
-        ref[3,1]=(0.999138842976)*x_ref[0]**o+(0.325794749172)*x_ref[0]+(0.94900982582)*x_ref[1]**o+(0.56933825455)*x_ref[1]
-        ref[3,2]=(0.965201839092)*x_ref[0]**o+(0.434187660328)*x_ref[0]+(0.842238794411)*x_ref[1]**o+(-0.754540335284)*x_ref[1]
-        ref[3,3]=(-0.539162954093)*x_ref[0]**o+(-0.373779084363)*x_ref[0]+(-0.426189858865)*x_ref[1]**o+(-0.812351658629)*x_ref[1]
-        ref[3,4]=(0.871516777541)*x_ref[0]**o+(-0.357393696308)*x_ref[0]+(0.267358318776)*x_ref[1]**o+(0.796701523616)*x_ref[1]
-      else:
-        arg[0,0]=(-0.811142944724)*x[0]**o+(-0.65659407492)*x[0]+(-0.534808740191)*x[1]**o+(0.602252100451)*x[1]+(-0.158845636056)*x[2]**o+(-0.781826300399)*x[2]
-        arg[0,1]=(-0.396870942248)*x[0]**o+(0.285698519063)*x[0]+(-0.962418369859)*x[1]**o+(-0.729381989807)*x[1]+(-0.0500038851534)*x[2]**o+(-0.567828852526)*x[2]
-        arg[0,2]=(0.346399694372)*x[0]**o+(-0.170517233373)*x[0]+(-0.443275920724)*x[1]**o+(0.581464075295)*x[1]+(0.197230389253)*x[2]**o+(-0.613092248913)*x[2]
-        arg[0,3]=(0.920174147113)*x[0]**o+(0.429847401539)*x[0]+(0.112888577662)*x[1]**o+(-0.0540034503714)*x[1]+(-0.0323244631044)*x[2]**o+(-0.293609544741)*x[2]
-        arg[0,4]=(-0.0177585560206)*x[0]**o+(-0.806033755558)*x[0]+(-0.363921399918)*x[1]**o+(-0.415721267967)*x[1]+(0.832302676307)*x[2]**o+(-0.102510351741)*x[2]
-        arg[1,0]=(-0.769760277763)*x[0]**o+(0.818187369213)*x[0]+(0.454400795864)*x[1]**o+(-0.220119708184)*x[1]+(-0.637117949075)*x[2]**o+(-0.661398404641)*x[2]
-        arg[1,1]=(0.828424952723)*x[0]**o+(0.677022266764)*x[0]+(-0.958176510992)*x[1]**o+(-0.732014776269)*x[1]+(-0.495308153354)*x[2]**o+(-0.30698327016)*x[2]
-        arg[1,2]=(-0.454106379068)*x[0]**o+(0.686920350455)*x[0]+(0.560344054206)*x[1]**o+(0.355495451775)*x[1]+(0.256969568039)*x[2]**o+(-0.737279585211)*x[2]
-        arg[1,3]=(-0.976488579746)*x[0]**o+(-0.652812816758)*x[0]+(-0.996243459964)*x[1]**o+(0.631565668939)*x[1]+(0.996259991179)*x[2]**o+(-0.796610599165)*x[2]
-        arg[1,4]=(0.676024716135)*x[0]**o+(-0.179835226483)*x[0]+(0.497541872254)*x[1]**o+(-0.678345104068)*x[1]+(0.945491022682)*x[2]**o+(-0.358403760669)*x[2]
-        arg[2,0]=(0.166901676041)*x[0]**o+(0.833434173485)*x[0]+(0.622153751777)*x[1]**o+(0.767679765059)*x[1]+(-0.82271335395)*x[2]**o+(0.667651471482)*x[2]
-        arg[2,1]=(-0.405015366041)*x[0]**o+(0.0548291583154)*x[0]+(0.894878845805)*x[1]**o+(-0.0955982667798)*x[1]+(0.468927799304)*x[2]**o+(0.547421481564)*x[2]
-        arg[2,2]=(0.893319250823)*x[0]**o+(0.771073524295)*x[0]+(0.993876715991)*x[1]**o+(0.0832975372419)*x[1]+(-0.717061635157)*x[2]**o+(0.303760934227)*x[2]
-        arg[2,3]=(0.247006018272)*x[0]**o+(0.329618310414)*x[0]+(-0.824176211089)*x[1]**o+(-0.678238702323)*x[1]+(0.218736302876)*x[2]**o+(0.8652063227)*x[2]
-        arg[2,4]=(0.502380810223)*x[0]**o+(-0.94917091185)*x[0]+(-0.0392659831743)*x[1]**o+(-0.308291910503)*x[1]+(-0.498112428439)*x[2]**o+(0.217915791465)*x[2]
-        arg[3,0]=(-0.018497051159)*x[0]**o+(-0.543005709743)*x[0]+(-0.433773552307)*x[1]**o+(-0.604850191015)*x[1]+(0.285970270117)*x[2]**o+(0.150938308283)*x[2]
-        arg[3,1]=(0.185537796564)*x[0]**o+(0.663947686119)*x[0]+(-0.846597672873)*x[1]**o+(-0.798399069258)*x[1]+(0.0215106260597)*x[2]**o+(-0.388760513164)*x[2]
-        arg[3,2]=(-0.378320218313)*x[0]**o+(-0.385079307834)*x[0]+(-0.392389046498)*x[1]**o+(0.323305501943)*x[1]+(0.496285813211)*x[2]**o+(-0.0269835921214)*x[2]
-        arg[3,3]=(0.779877220393)*x[0]**o+(0.968536241033)*x[0]+(0.786166009582)*x[1]**o+(-0.974838905578)*x[1]+(0.4579382269)*x[2]**o+(0.178464213473)*x[2]
-        arg[3,4]=(-0.149895758057)*x[0]**o+(0.3529889311)*x[0]+(0.223924981441)*x[1]**o+(0.10143440581)*x[1]+(0.162222746832)*x[2]**o+(0.421433640986)*x[2]
-        ref[0,0]=(-0.811142944724)*x_ref[0]**o+(-0.65659407492)*x_ref[0]+(-0.534808740191)*x_ref[1]**o+(0.602252100451)*x_ref[1]+(-0.158845636056)*x_ref[2]**o+(-0.781826300399)*x_ref[2]
-        ref[0,1]=(-0.396870942248)*x_ref[0]**o+(0.285698519063)*x_ref[0]+(-0.962418369859)*x_ref[1]**o+(-0.729381989807)*x_ref[1]+(-0.0500038851534)*x_ref[2]**o+(-0.567828852526)*x_ref[2]
-        ref[0,2]=(0.346399694372)*x_ref[0]**o+(-0.170517233373)*x_ref[0]+(-0.443275920724)*x_ref[1]**o+(0.581464075295)*x_ref[1]+(0.197230389253)*x_ref[2]**o+(-0.613092248913)*x_ref[2]
-        ref[0,3]=(0.920174147113)*x_ref[0]**o+(0.429847401539)*x_ref[0]+(0.112888577662)*x_ref[1]**o+(-0.0540034503714)*x_ref[1]+(-0.0323244631044)*x_ref[2]**o+(-0.293609544741)*x_ref[2]
-        ref[0,4]=(-0.0177585560206)*x_ref[0]**o+(-0.806033755558)*x_ref[0]+(-0.363921399918)*x_ref[1]**o+(-0.415721267967)*x_ref[1]+(0.832302676307)*x_ref[2]**o+(-0.102510351741)*x_ref[2]
-        ref[1,0]=(-0.769760277763)*x_ref[0]**o+(0.818187369213)*x_ref[0]+(0.454400795864)*x_ref[1]**o+(-0.220119708184)*x_ref[1]+(-0.637117949075)*x_ref[2]**o+(-0.661398404641)*x_ref[2]
-        ref[1,1]=(0.828424952723)*x_ref[0]**o+(0.677022266764)*x_ref[0]+(-0.958176510992)*x_ref[1]**o+(-0.732014776269)*x_ref[1]+(-0.495308153354)*x_ref[2]**o+(-0.30698327016)*x_ref[2]
-        ref[1,2]=(-0.454106379068)*x_ref[0]**o+(0.686920350455)*x_ref[0]+(0.560344054206)*x_ref[1]**o+(0.355495451775)*x_ref[1]+(0.256969568039)*x_ref[2]**o+(-0.737279585211)*x_ref[2]
-        ref[1,3]=(-0.976488579746)*x_ref[0]**o+(-0.652812816758)*x_ref[0]+(-0.996243459964)*x_ref[1]**o+(0.631565668939)*x_ref[1]+(0.996259991179)*x_ref[2]**o+(-0.796610599165)*x_ref[2]
-        ref[1,4]=(0.676024716135)*x_ref[0]**o+(-0.179835226483)*x_ref[0]+(0.497541872254)*x_ref[1]**o+(-0.678345104068)*x_ref[1]+(0.945491022682)*x_ref[2]**o+(-0.358403760669)*x_ref[2]
-        ref[2,0]=(0.166901676041)*x_ref[0]**o+(0.833434173485)*x_ref[0]+(0.622153751777)*x_ref[1]**o+(0.767679765059)*x_ref[1]+(-0.82271335395)*x_ref[2]**o+(0.667651471482)*x_ref[2]
-        ref[2,1]=(-0.405015366041)*x_ref[0]**o+(0.0548291583154)*x_ref[0]+(0.894878845805)*x_ref[1]**o+(-0.0955982667798)*x_ref[1]+(0.468927799304)*x_ref[2]**o+(0.547421481564)*x_ref[2]
-        ref[2,2]=(0.893319250823)*x_ref[0]**o+(0.771073524295)*x_ref[0]+(0.993876715991)*x_ref[1]**o+(0.0832975372419)*x_ref[1]+(-0.717061635157)*x_ref[2]**o+(0.303760934227)*x_ref[2]
-        ref[2,3]=(0.247006018272)*x_ref[0]**o+(0.329618310414)*x_ref[0]+(-0.824176211089)*x_ref[1]**o+(-0.678238702323)*x_ref[1]+(0.218736302876)*x_ref[2]**o+(0.8652063227)*x_ref[2]
-        ref[2,4]=(0.502380810223)*x_ref[0]**o+(-0.94917091185)*x_ref[0]+(-0.0392659831743)*x_ref[1]**o+(-0.308291910503)*x_ref[1]+(-0.498112428439)*x_ref[2]**o+(0.217915791465)*x_ref[2]
-        ref[3,0]=(-0.018497051159)*x_ref[0]**o+(-0.543005709743)*x_ref[0]+(-0.433773552307)*x_ref[1]**o+(-0.604850191015)*x_ref[1]+(0.285970270117)*x_ref[2]**o+(0.150938308283)*x_ref[2]
-        ref[3,1]=(0.185537796564)*x_ref[0]**o+(0.663947686119)*x_ref[0]+(-0.846597672873)*x_ref[1]**o+(-0.798399069258)*x_ref[1]+(0.0215106260597)*x_ref[2]**o+(-0.388760513164)*x_ref[2]
-        ref[3,2]=(-0.378320218313)*x_ref[0]**o+(-0.385079307834)*x_ref[0]+(-0.392389046498)*x_ref[1]**o+(0.323305501943)*x_ref[1]+(0.496285813211)*x_ref[2]**o+(-0.0269835921214)*x_ref[2]
-        ref[3,3]=(0.779877220393)*x_ref[0]**o+(0.968536241033)*x_ref[0]+(0.786166009582)*x_ref[1]**o+(-0.974838905578)*x_ref[1]+(0.4579382269)*x_ref[2]**o+(0.178464213473)*x_ref[2]
-        ref[3,4]=(-0.149895758057)*x_ref[0]**o+(0.3529889311)*x_ref[0]+(0.223924981441)*x_ref[1]**o+(0.10143440581)*x_ref[1]+(0.162222746832)*x_ref[2]**o+(0.421433640986)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.232971584272)*x[0]**o+(0.391351964909)*x[0]+(-0.832254448983)*x[1]**o+(0.880762034713)*x[1]
-        arg[0,0,1]=(0.473097471101)*x[0]**o+(-0.660862772376)*x[0]+(0.72974853865)*x[1]**o+(-0.328183435687)*x[1]
-        arg[0,1,0]=(-0.749483736482)*x[0]**o+(0.0872454020187)*x[0]+(0.6916024322)*x[1]**o+(0.82757019273)*x[1]
-        arg[0,1,1]=(-0.325601366346)*x[0]**o+(0.918246327277)*x[0]+(0.855963838252)*x[1]**o+(0.448567464706)*x[1]
-        arg[1,0,0]=(-0.6642143628)*x[0]**o+(-0.82649833447)*x[0]+(0.822778465465)*x[1]**o+(-0.926669226842)*x[1]
-        arg[1,0,1]=(-0.644490899373)*x[0]**o+(0.0644054772987)*x[0]+(-0.914922609343)*x[1]**o+(0.898880463842)*x[1]
-        arg[1,1,0]=(0.40963096867)*x[0]**o+(-0.347418076162)*x[0]+(0.857966073118)*x[1]**o+(-0.284521442085)*x[1]
-        arg[1,1,1]=(-0.00998062171478)*x[0]**o+(-0.234122404174)*x[0]+(-0.149500951208)*x[1]**o+(0.680038328937)*x[1]
-        arg[2,0,0]=(-0.963777985833)*x[0]**o+(0.710727608341)*x[0]+(-0.646898391724)*x[1]**o+(-0.464095155503)*x[1]
-        arg[2,0,1]=(-0.617670394851)*x[0]**o+(0.592337321587)*x[0]+(-0.0881426217074)*x[1]**o+(-0.00431912882662)*x[1]
-        arg[2,1,0]=(0.871279828121)*x[0]**o+(-0.858267190204)*x[0]+(0.440863109038)*x[1]**o+(-0.912521398099)*x[1]
-        arg[2,1,1]=(0.17802472174)*x[0]**o+(0.948587960042)*x[0]+(-0.837945850976)*x[1]**o+(0.13308730872)*x[1]
-        arg[3,0,0]=(0.0482409149433)*x[0]**o+(-0.198100088194)*x[0]+(0.504789334224)*x[1]**o+(0.296276808608)*x[1]
-        arg[3,0,1]=(-0.30515363985)*x[0]**o+(-0.355293167256)*x[0]+(-0.577592997685)*x[1]**o+(-0.882408725943)*x[1]
-        arg[3,1,0]=(0.76102937294)*x[0]**o+(-0.210169673144)*x[0]+(-0.181755140891)*x[1]**o+(0.865448484187)*x[1]
-        arg[3,1,1]=(-0.894294091863)*x[0]**o+(-0.712245666103)*x[0]+(0.151657455329)*x[1]**o+(-0.54019436763)*x[1]
-        arg[4,0,0]=(0.860662861318)*x[0]**o+(-0.36787473166)*x[0]+(0.240406823985)*x[1]**o+(-0.381822992473)*x[1]
-        arg[4,0,1]=(-0.109197125112)*x[0]**o+(0.962595232385)*x[0]+(-0.323876506847)*x[1]**o+(0.178613363564)*x[1]
-        arg[4,1,0]=(0.486980313424)*x[0]**o+(-0.611294566285)*x[0]+(-0.774813150316)*x[1]**o+(0.335411840405)*x[1]
-        arg[4,1,1]=(-0.622163740867)*x[0]**o+(0.426305234663)*x[0]+(0.243557551101)*x[1]**o+(0.930601340004)*x[1]
-        arg[5,0,0]=(-0.232795962027)*x[0]**o+(0.49010767268)*x[0]+(-0.503693305594)*x[1]**o+(-0.915931668186)*x[1]
-        arg[5,0,1]=(-0.304614759138)*x[0]**o+(0.797445765321)*x[0]+(-0.00820825778888)*x[1]**o+(-0.196762463972)*x[1]
-        arg[5,1,0]=(-0.516700339456)*x[0]**o+(-0.440953905414)*x[0]+(0.875266018165)*x[1]**o+(0.780895354543)*x[1]
-        arg[5,1,1]=(0.219827931399)*x[0]**o+(-0.950514094131)*x[0]+(-0.120763970425)*x[1]**o+(0.0941571726596)*x[1]
-        ref[0,0,0]=(-0.232971584272)*x_ref[0]**o+(0.391351964909)*x_ref[0]+(-0.832254448983)*x_ref[1]**o+(0.880762034713)*x_ref[1]
-        ref[0,0,1]=(0.473097471101)*x_ref[0]**o+(-0.660862772376)*x_ref[0]+(0.72974853865)*x_ref[1]**o+(-0.328183435687)*x_ref[1]
-        ref[0,1,0]=(-0.749483736482)*x_ref[0]**o+(0.0872454020187)*x_ref[0]+(0.6916024322)*x_ref[1]**o+(0.82757019273)*x_ref[1]
-        ref[0,1,1]=(-0.325601366346)*x_ref[0]**o+(0.918246327277)*x_ref[0]+(0.855963838252)*x_ref[1]**o+(0.448567464706)*x_ref[1]
-        ref[1,0,0]=(-0.6642143628)*x_ref[0]**o+(-0.82649833447)*x_ref[0]+(0.822778465465)*x_ref[1]**o+(-0.926669226842)*x_ref[1]
-        ref[1,0,1]=(-0.644490899373)*x_ref[0]**o+(0.0644054772987)*x_ref[0]+(-0.914922609343)*x_ref[1]**o+(0.898880463842)*x_ref[1]
-        ref[1,1,0]=(0.40963096867)*x_ref[0]**o+(-0.347418076162)*x_ref[0]+(0.857966073118)*x_ref[1]**o+(-0.284521442085)*x_ref[1]
-        ref[1,1,1]=(-0.00998062171478)*x_ref[0]**o+(-0.234122404174)*x_ref[0]+(-0.149500951208)*x_ref[1]**o+(0.680038328937)*x_ref[1]
-        ref[2,0,0]=(-0.963777985833)*x_ref[0]**o+(0.710727608341)*x_ref[0]+(-0.646898391724)*x_ref[1]**o+(-0.464095155503)*x_ref[1]
-        ref[2,0,1]=(-0.617670394851)*x_ref[0]**o+(0.592337321587)*x_ref[0]+(-0.0881426217074)*x_ref[1]**o+(-0.00431912882662)*x_ref[1]
-        ref[2,1,0]=(0.871279828121)*x_ref[0]**o+(-0.858267190204)*x_ref[0]+(0.440863109038)*x_ref[1]**o+(-0.912521398099)*x_ref[1]
-        ref[2,1,1]=(0.17802472174)*x_ref[0]**o+(0.948587960042)*x_ref[0]+(-0.837945850976)*x_ref[1]**o+(0.13308730872)*x_ref[1]
-        ref[3,0,0]=(0.0482409149433)*x_ref[0]**o+(-0.198100088194)*x_ref[0]+(0.504789334224)*x_ref[1]**o+(0.296276808608)*x_ref[1]
-        ref[3,0,1]=(-0.30515363985)*x_ref[0]**o+(-0.355293167256)*x_ref[0]+(-0.577592997685)*x_ref[1]**o+(-0.882408725943)*x_ref[1]
-        ref[3,1,0]=(0.76102937294)*x_ref[0]**o+(-0.210169673144)*x_ref[0]+(-0.181755140891)*x_ref[1]**o+(0.865448484187)*x_ref[1]
-        ref[3,1,1]=(-0.894294091863)*x_ref[0]**o+(-0.712245666103)*x_ref[0]+(0.151657455329)*x_ref[1]**o+(-0.54019436763)*x_ref[1]
-        ref[4,0,0]=(0.860662861318)*x_ref[0]**o+(-0.36787473166)*x_ref[0]+(0.240406823985)*x_ref[1]**o+(-0.381822992473)*x_ref[1]
-        ref[4,0,1]=(-0.109197125112)*x_ref[0]**o+(0.962595232385)*x_ref[0]+(-0.323876506847)*x_ref[1]**o+(0.178613363564)*x_ref[1]
-        ref[4,1,0]=(0.486980313424)*x_ref[0]**o+(-0.611294566285)*x_ref[0]+(-0.774813150316)*x_ref[1]**o+(0.335411840405)*x_ref[1]
-        ref[4,1,1]=(-0.622163740867)*x_ref[0]**o+(0.426305234663)*x_ref[0]+(0.243557551101)*x_ref[1]**o+(0.930601340004)*x_ref[1]
-        ref[5,0,0]=(-0.232795962027)*x_ref[0]**o+(0.49010767268)*x_ref[0]+(-0.503693305594)*x_ref[1]**o+(-0.915931668186)*x_ref[1]
-        ref[5,0,1]=(-0.304614759138)*x_ref[0]**o+(0.797445765321)*x_ref[0]+(-0.00820825778888)*x_ref[1]**o+(-0.196762463972)*x_ref[1]
-        ref[5,1,0]=(-0.516700339456)*x_ref[0]**o+(-0.440953905414)*x_ref[0]+(0.875266018165)*x_ref[1]**o+(0.780895354543)*x_ref[1]
-        ref[5,1,1]=(0.219827931399)*x_ref[0]**o+(-0.950514094131)*x_ref[0]+(-0.120763970425)*x_ref[1]**o+(0.0941571726596)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.772105181243)*x[0]**o+(-0.548341656718)*x[0]+(0.358327458717)*x[1]**o+(0.07838537297)*x[1]+(-0.221432264133)*x[2]**o+(-0.0831433214109)*x[2]
-        arg[0,0,1]=(-0.920280406855)*x[0]**o+(0.288008584982)*x[0]+(0.273175197348)*x[1]**o+(0.71005891586)*x[1]+(-0.372322860924)*x[2]**o+(0.801820758328)*x[2]
-        arg[0,1,0]=(0.610498050037)*x[0]**o+(-0.539393441621)*x[0]+(0.587033652815)*x[1]**o+(0.237738229824)*x[1]+(-0.79411765083)*x[2]**o+(-0.519989054973)*x[2]
-        arg[0,1,1]=(0.5412774887)*x[0]**o+(-0.851503637634)*x[0]+(-0.71956793056)*x[1]**o+(0.166039550456)*x[1]+(-0.274290267921)*x[2]**o+(-0.909146653718)*x[2]
-        arg[1,0,0]=(-0.00458109759775)*x[0]**o+(0.487263914082)*x[0]+(0.0171216930245)*x[1]**o+(0.691063106679)*x[1]+(-0.96202326744)*x[2]**o+(0.361419732405)*x[2]
-        arg[1,0,1]=(-0.784311451677)*x[0]**o+(-0.862560770078)*x[0]+(-0.0702620499924)*x[1]**o+(0.183400389223)*x[1]+(0.364905596839)*x[2]**o+(0.874230430841)*x[2]
-        arg[1,1,0]=(0.315952660065)*x[0]**o+(-0.0168150653709)*x[0]+(0.372807793658)*x[1]**o+(0.350959428104)*x[1]+(0.292074907124)*x[2]**o+(0.38176271099)*x[2]
-        arg[1,1,1]=(-0.941288490366)*x[0]**o+(0.159864446187)*x[0]+(0.616516779388)*x[1]**o+(0.0940731931915)*x[1]+(-0.966416702566)*x[2]**o+(-0.716669694143)*x[2]
-        arg[2,0,0]=(0.308619329706)*x[0]**o+(0.68203622136)*x[0]+(-0.732163723834)*x[1]**o+(-0.222214324226)*x[1]+(0.89540478356)*x[2]**o+(-0.0648727721753)*x[2]
-        arg[2,0,1]=(-0.829002921476)*x[0]**o+(0.274738860807)*x[0]+(0.944302912883)*x[1]**o+(0.67434413206)*x[1]+(-0.861085567199)*x[2]**o+(0.994494977369)*x[2]
-        arg[2,1,0]=(-0.871499634896)*x[0]**o+(-0.716060125296)*x[0]+(-0.655428500508)*x[1]**o+(-0.478135345667)*x[1]+(-0.858927907345)*x[2]**o+(0.718884168928)*x[2]
-        arg[2,1,1]=(0.843612813106)*x[0]**o+(-0.221966655825)*x[0]+(-0.0770757351)*x[1]**o+(-0.678171902341)*x[1]+(0.814209490483)*x[2]**o+(0.409183122676)*x[2]
-        arg[3,0,0]=(-0.226810706884)*x[0]**o+(-0.167181963701)*x[0]+(0.810478050432)*x[1]**o+(-0.335099187817)*x[1]+(0.210621363393)*x[2]**o+(0.429297116788)*x[2]
-        arg[3,0,1]=(0.597117204298)*x[0]**o+(-0.000147371125322)*x[0]+(-0.557842700291)*x[1]**o+(0.329529225331)*x[1]+(-0.208265244071)*x[2]**o+(-0.977698555357)*x[2]
-        arg[3,1,0]=(-0.163068070947)*x[0]**o+(0.640075503516)*x[0]+(0.425653990651)*x[1]**o+(0.650655294789)*x[1]+(-0.342488862403)*x[2]**o+(0.227438788286)*x[2]
-        arg[3,1,1]=(-0.511981920097)*x[0]**o+(-0.18099315756)*x[0]+(-0.969881140182)*x[1]**o+(-0.418742703662)*x[1]+(-0.271422367765)*x[2]**o+(0.0812058381877)*x[2]
-        arg[4,0,0]=(0.569514749505)*x[0]**o+(-0.711561480184)*x[0]+(-0.587159226794)*x[1]**o+(-0.240459786489)*x[1]+(-0.380983629494)*x[2]**o+(-0.550385464258)*x[2]
-        arg[4,0,1]=(0.257375332759)*x[0]**o+(-0.477083226492)*x[0]+(0.0180233249756)*x[1]**o+(0.612470082967)*x[1]+(0.99566078545)*x[2]**o+(-0.551544637583)*x[2]
-        arg[4,1,0]=(0.702787194057)*x[0]**o+(0.922262573534)*x[0]+(-0.465910368685)*x[1]**o+(0.748743004032)*x[1]+(0.642852066952)*x[2]**o+(0.24283802317)*x[2]
-        arg[4,1,1]=(0.745762578199)*x[0]**o+(0.240631495429)*x[0]+(0.413077167171)*x[1]**o+(0.692304442104)*x[1]+(0.150058687546)*x[2]**o+(-0.133413399526)*x[2]
-        arg[5,0,0]=(0.0244935245274)*x[0]**o+(-0.866653903557)*x[0]+(-0.682252235104)*x[1]**o+(-0.525092961647)*x[1]+(-0.87552740837)*x[2]**o+(-0.780785295196)*x[2]
-        arg[5,0,1]=(0.403317147145)*x[0]**o+(-0.846638525869)*x[0]+(-0.798622632135)*x[1]**o+(-0.199698251819)*x[1]+(-0.852399643056)*x[2]**o+(-0.0618243339514)*x[2]
-        arg[5,1,0]=(-0.94578445284)*x[0]**o+(-0.715570943968)*x[0]+(-0.193533970382)*x[1]**o+(0.0325400011289)*x[1]+(0.137922635356)*x[2]**o+(0.0192967461384)*x[2]
-        arg[5,1,1]=(-0.706542583366)*x[0]**o+(0.412536423598)*x[0]+(-0.27322227526)*x[1]**o+(0.339116123776)*x[1]+(-0.856871339939)*x[2]**o+(0.140603890427)*x[2]
-        ref[0,0,0]=(0.772105181243)*x_ref[0]**o+(-0.548341656718)*x_ref[0]+(0.358327458717)*x_ref[1]**o+(0.07838537297)*x_ref[1]+(-0.221432264133)*x_ref[2]**o+(-0.0831433214109)*x_ref[2]
-        ref[0,0,1]=(-0.920280406855)*x_ref[0]**o+(0.288008584982)*x_ref[0]+(0.273175197348)*x_ref[1]**o+(0.71005891586)*x_ref[1]+(-0.372322860924)*x_ref[2]**o+(0.801820758328)*x_ref[2]
-        ref[0,1,0]=(0.610498050037)*x_ref[0]**o+(-0.539393441621)*x_ref[0]+(0.587033652815)*x_ref[1]**o+(0.237738229824)*x_ref[1]+(-0.79411765083)*x_ref[2]**o+(-0.519989054973)*x_ref[2]
-        ref[0,1,1]=(0.5412774887)*x_ref[0]**o+(-0.851503637634)*x_ref[0]+(-0.71956793056)*x_ref[1]**o+(0.166039550456)*x_ref[1]+(-0.274290267921)*x_ref[2]**o+(-0.909146653718)*x_ref[2]
-        ref[1,0,0]=(-0.00458109759775)*x_ref[0]**o+(0.487263914082)*x_ref[0]+(0.0171216930245)*x_ref[1]**o+(0.691063106679)*x_ref[1]+(-0.96202326744)*x_ref[2]**o+(0.361419732405)*x_ref[2]
-        ref[1,0,1]=(-0.784311451677)*x_ref[0]**o+(-0.862560770078)*x_ref[0]+(-0.0702620499924)*x_ref[1]**o+(0.183400389223)*x_ref[1]+(0.364905596839)*x_ref[2]**o+(0.874230430841)*x_ref[2]
-        ref[1,1,0]=(0.315952660065)*x_ref[0]**o+(-0.0168150653709)*x_ref[0]+(0.372807793658)*x_ref[1]**o+(0.350959428104)*x_ref[1]+(0.292074907124)*x_ref[2]**o+(0.38176271099)*x_ref[2]
-        ref[1,1,1]=(-0.941288490366)*x_ref[0]**o+(0.159864446187)*x_ref[0]+(0.616516779388)*x_ref[1]**o+(0.0940731931915)*x_ref[1]+(-0.966416702566)*x_ref[2]**o+(-0.716669694143)*x_ref[2]
-        ref[2,0,0]=(0.308619329706)*x_ref[0]**o+(0.68203622136)*x_ref[0]+(-0.732163723834)*x_ref[1]**o+(-0.222214324226)*x_ref[1]+(0.89540478356)*x_ref[2]**o+(-0.0648727721753)*x_ref[2]
-        ref[2,0,1]=(-0.829002921476)*x_ref[0]**o+(0.274738860807)*x_ref[0]+(0.944302912883)*x_ref[1]**o+(0.67434413206)*x_ref[1]+(-0.861085567199)*x_ref[2]**o+(0.994494977369)*x_ref[2]
-        ref[2,1,0]=(-0.871499634896)*x_ref[0]**o+(-0.716060125296)*x_ref[0]+(-0.655428500508)*x_ref[1]**o+(-0.478135345667)*x_ref[1]+(-0.858927907345)*x_ref[2]**o+(0.718884168928)*x_ref[2]
-        ref[2,1,1]=(0.843612813106)*x_ref[0]**o+(-0.221966655825)*x_ref[0]+(-0.0770757351)*x_ref[1]**o+(-0.678171902341)*x_ref[1]+(0.814209490483)*x_ref[2]**o+(0.409183122676)*x_ref[2]
-        ref[3,0,0]=(-0.226810706884)*x_ref[0]**o+(-0.167181963701)*x_ref[0]+(0.810478050432)*x_ref[1]**o+(-0.335099187817)*x_ref[1]+(0.210621363393)*x_ref[2]**o+(0.429297116788)*x_ref[2]
-        ref[3,0,1]=(0.597117204298)*x_ref[0]**o+(-0.000147371125322)*x_ref[0]+(-0.557842700291)*x_ref[1]**o+(0.329529225331)*x_ref[1]+(-0.208265244071)*x_ref[2]**o+(-0.977698555357)*x_ref[2]
-        ref[3,1,0]=(-0.163068070947)*x_ref[0]**o+(0.640075503516)*x_ref[0]+(0.425653990651)*x_ref[1]**o+(0.650655294789)*x_ref[1]+(-0.342488862403)*x_ref[2]**o+(0.227438788286)*x_ref[2]
-        ref[3,1,1]=(-0.511981920097)*x_ref[0]**o+(-0.18099315756)*x_ref[0]+(-0.969881140182)*x_ref[1]**o+(-0.418742703662)*x_ref[1]+(-0.271422367765)*x_ref[2]**o+(0.0812058381877)*x_ref[2]
-        ref[4,0,0]=(0.569514749505)*x_ref[0]**o+(-0.711561480184)*x_ref[0]+(-0.587159226794)*x_ref[1]**o+(-0.240459786489)*x_ref[1]+(-0.380983629494)*x_ref[2]**o+(-0.550385464258)*x_ref[2]
-        ref[4,0,1]=(0.257375332759)*x_ref[0]**o+(-0.477083226492)*x_ref[0]+(0.0180233249756)*x_ref[1]**o+(0.612470082967)*x_ref[1]+(0.99566078545)*x_ref[2]**o+(-0.551544637583)*x_ref[2]
-        ref[4,1,0]=(0.702787194057)*x_ref[0]**o+(0.922262573534)*x_ref[0]+(-0.465910368685)*x_ref[1]**o+(0.748743004032)*x_ref[1]+(0.642852066952)*x_ref[2]**o+(0.24283802317)*x_ref[2]
-        ref[4,1,1]=(0.745762578199)*x_ref[0]**o+(0.240631495429)*x_ref[0]+(0.413077167171)*x_ref[1]**o+(0.692304442104)*x_ref[1]+(0.150058687546)*x_ref[2]**o+(-0.133413399526)*x_ref[2]
-        ref[5,0,0]=(0.0244935245274)*x_ref[0]**o+(-0.866653903557)*x_ref[0]+(-0.682252235104)*x_ref[1]**o+(-0.525092961647)*x_ref[1]+(-0.87552740837)*x_ref[2]**o+(-0.780785295196)*x_ref[2]
-        ref[5,0,1]=(0.403317147145)*x_ref[0]**o+(-0.846638525869)*x_ref[0]+(-0.798622632135)*x_ref[1]**o+(-0.199698251819)*x_ref[1]+(-0.852399643056)*x_ref[2]**o+(-0.0618243339514)*x_ref[2]
-        ref[5,1,0]=(-0.94578445284)*x_ref[0]**o+(-0.715570943968)*x_ref[0]+(-0.193533970382)*x_ref[1]**o+(0.0325400011289)*x_ref[1]+(0.137922635356)*x_ref[2]**o+(0.0192967461384)*x_ref[2]
-        ref[5,1,1]=(-0.706542583366)*x_ref[0]**o+(0.412536423598)*x_ref[0]+(-0.27322227526)*x_ref[1]**o+(0.339116123776)*x_ref[1]+(-0.856871339939)*x_ref[2]**o+(0.140603890427)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.0577426785287)*x[0]**o+(0.469845292021)*x[0]+(-0.641706722819)*x[1]**o+(0.129652001842)*x[1]
-        arg[0,0,0,1]=(-0.87686951076)*x[0]**o+(-0.981093040999)*x[0]+(0.654637319552)*x[1]**o+(-0.953104888811)*x[1]
-        arg[0,0,1,0]=(-0.486386436415)*x[0]**o+(0.91083470956)*x[0]+(-0.392432937401)*x[1]**o+(0.494919250884)*x[1]
-        arg[0,0,1,1]=(0.299928502076)*x[0]**o+(-0.0787848191157)*x[0]+(-0.541863592475)*x[1]**o+(0.435934816687)*x[1]
-        arg[0,0,2,0]=(-0.0500083438365)*x[0]**o+(-0.882581886623)*x[0]+(-0.965347357063)*x[1]**o+(-0.270254041774)*x[1]
-        arg[0,0,2,1]=(-0.18974861517)*x[0]**o+(0.341406736671)*x[0]+(0.847020774229)*x[1]**o+(0.650201215849)*x[1]
-        arg[0,1,0,0]=(0.0823017084719)*x[0]**o+(0.964585359235)*x[0]+(0.357658660436)*x[1]**o+(0.182585271812)*x[1]
-        arg[0,1,0,1]=(0.863411821905)*x[0]**o+(0.313374566426)*x[0]+(-0.273547644827)*x[1]**o+(0.429051854479)*x[1]
-        arg[0,1,1,0]=(0.167608645068)*x[0]**o+(0.926908094967)*x[0]+(-0.853415240465)*x[1]**o+(-0.376634525241)*x[1]
-        arg[0,1,1,1]=(-0.555491961591)*x[0]**o+(-0.64621137308)*x[0]+(-0.315877124991)*x[1]**o+(-0.962839286133)*x[1]
-        arg[0,1,2,0]=(0.909012065667)*x[0]**o+(-0.656739022976)*x[0]+(-0.458377773547)*x[1]**o+(0.394223574009)*x[1]
-        arg[0,1,2,1]=(-0.550560496714)*x[0]**o+(0.216941875936)*x[0]+(-0.634745794924)*x[1]**o+(0.887912543217)*x[1]
-        arg[0,2,0,0]=(-0.961535901493)*x[0]**o+(0.980336384835)*x[0]+(-0.151755000128)*x[1]**o+(0.0402841925797)*x[1]
-        arg[0,2,0,1]=(0.571527088727)*x[0]**o+(-0.475013184811)*x[0]+(0.80051818192)*x[1]**o+(-0.589499747694)*x[1]
-        arg[0,2,1,0]=(0.545840648612)*x[0]**o+(0.888313209612)*x[0]+(-0.568938733446)*x[1]**o+(-0.289030374342)*x[1]
-        arg[0,2,1,1]=(-0.0631638607979)*x[0]**o+(-0.173754439841)*x[0]+(0.143503554071)*x[1]**o+(-0.0850087835084)*x[1]
-        arg[0,2,2,0]=(0.316299661412)*x[0]**o+(0.260890197379)*x[0]+(-0.803519867776)*x[1]**o+(0.36434810185)*x[1]
-        arg[0,2,2,1]=(-0.656013716479)*x[0]**o+(0.810499942514)*x[0]+(0.783455480815)*x[1]**o+(-0.943085466999)*x[1]
-        arg[0,3,0,0]=(0.128153439722)*x[0]**o+(-0.404740042302)*x[0]+(0.785717360548)*x[1]**o+(-0.710818900841)*x[1]
-        arg[0,3,0,1]=(-0.097059274787)*x[0]**o+(0.578757823228)*x[0]+(0.186146155178)*x[1]**o+(0.274602030707)*x[1]
-        arg[0,3,1,0]=(0.00522392753954)*x[0]**o+(0.015773606982)*x[0]+(-0.327110065344)*x[1]**o+(0.15571120542)*x[1]
-        arg[0,3,1,1]=(-0.14009116305)*x[0]**o+(-0.659975337811)*x[0]+(-0.297582833489)*x[1]**o+(-0.600935015071)*x[1]
-        arg[0,3,2,0]=(0.749388604357)*x[0]**o+(0.762968650778)*x[0]+(-0.623477518339)*x[1]**o+(-0.931762943135)*x[1]
-        arg[0,3,2,1]=(0.748396100632)*x[0]**o+(-0.841314360401)*x[0]+(0.432649446216)*x[1]**o+(-0.971300843628)*x[1]
-        arg[0,4,0,0]=(-0.217249090357)*x[0]**o+(-0.833633675601)*x[0]+(0.169984305627)*x[1]**o+(-0.831738272666)*x[1]
-        arg[0,4,0,1]=(0.501571101669)*x[0]**o+(-0.223897334788)*x[0]+(0.24178181976)*x[1]**o+(0.307921789017)*x[1]
-        arg[0,4,1,0]=(-0.162064610564)*x[0]**o+(0.217669674603)*x[0]+(0.995517866562)*x[1]**o+(0.903061734589)*x[1]
-        arg[0,4,1,1]=(-0.837150436928)*x[0]**o+(0.465269468525)*x[0]+(0.522034182082)*x[1]**o+(-0.725469921625)*x[1]
-        arg[0,4,2,0]=(-0.295739906169)*x[0]**o+(0.961959220618)*x[0]+(0.577799918942)*x[1]**o+(-0.313255108148)*x[1]
-        arg[0,4,2,1]=(-0.455635927062)*x[0]**o+(0.667038701641)*x[0]+(-0.151183772961)*x[1]**o+(-0.550197828316)*x[1]
-        arg[1,0,0,0]=(0.585510684472)*x[0]**o+(-0.64754219493)*x[0]+(0.781495111863)*x[1]**o+(-0.792246214695)*x[1]
-        arg[1,0,0,1]=(0.586346471397)*x[0]**o+(0.291794158138)*x[0]+(-0.614723564286)*x[1]**o+(-0.151451723805)*x[1]
-        arg[1,0,1,0]=(-0.472877220222)*x[0]**o+(-0.0118252391089)*x[0]+(-0.596943135354)*x[1]**o+(-0.413992986066)*x[1]
-        arg[1,0,1,1]=(-0.715007718152)*x[0]**o+(0.032964784403)*x[0]+(-0.350680745946)*x[1]**o+(0.678841285054)*x[1]
-        arg[1,0,2,0]=(0.673910318085)*x[0]**o+(-0.15303471314)*x[0]+(-0.0889279944344)*x[1]**o+(-0.0356474498002)*x[1]
-        arg[1,0,2,1]=(-0.875691348779)*x[0]**o+(0.547300853671)*x[0]+(-0.362646169132)*x[1]**o+(-0.588521964671)*x[1]
-        arg[1,1,0,0]=(-0.0988912551145)*x[0]**o+(-0.710944394432)*x[0]+(0.153875249337)*x[1]**o+(0.274427434926)*x[1]
-        arg[1,1,0,1]=(-0.0854272185591)*x[0]**o+(-0.21840195791)*x[0]+(0.906982245924)*x[1]**o+(0.570990116211)*x[1]
-        arg[1,1,1,0]=(-0.851259116331)*x[0]**o+(0.309829955487)*x[0]+(0.115725082696)*x[1]**o+(-0.91590292189)*x[1]
-        arg[1,1,1,1]=(-0.637464462703)*x[0]**o+(-0.280971672162)*x[0]+(0.270985403603)*x[1]**o+(-0.534115311397)*x[1]
-        arg[1,1,2,0]=(0.670179973397)*x[0]**o+(0.847483793904)*x[0]+(0.0681088634526)*x[1]**o+(0.412176359729)*x[1]
-        arg[1,1,2,1]=(0.0378205172485)*x[0]**o+(0.974150495292)*x[0]+(-0.720821275299)*x[1]**o+(-0.552588296494)*x[1]
-        arg[1,2,0,0]=(0.151367609975)*x[0]**o+(0.832981586349)*x[0]+(0.419488381843)*x[1]**o+(0.561052438283)*x[1]
-        arg[1,2,0,1]=(0.267839010425)*x[0]**o+(0.47455974064)*x[0]+(0.498826652567)*x[1]**o+(-0.51906391205)*x[1]
-        arg[1,2,1,0]=(-0.350105107527)*x[0]**o+(-0.489326689724)*x[0]+(-0.156970199109)*x[1]**o+(-0.175565230472)*x[1]
-        arg[1,2,1,1]=(0.754379973459)*x[0]**o+(-0.70691373234)*x[0]+(-0.964497356137)*x[1]**o+(-0.694989442192)*x[1]
-        arg[1,2,2,0]=(-0.491090361655)*x[0]**o+(0.154379441501)*x[0]+(0.403809695039)*x[1]**o+(-0.084183660554)*x[1]
-        arg[1,2,2,1]=(-0.164538235223)*x[0]**o+(0.628058472821)*x[0]+(0.331956969519)*x[1]**o+(0.828755643202)*x[1]
-        arg[1,3,0,0]=(0.103479416566)*x[0]**o+(0.380691196177)*x[0]+(-0.350375360146)*x[1]**o+(0.18528492785)*x[1]
-        arg[1,3,0,1]=(-0.0744423760559)*x[0]**o+(0.912275380092)*x[0]+(0.867254399179)*x[1]**o+(0.410307184344)*x[1]
-        arg[1,3,1,0]=(-0.480324052626)*x[0]**o+(-0.438544962062)*x[0]+(0.749575808465)*x[1]**o+(-0.0689669475685)*x[1]
-        arg[1,3,1,1]=(0.723325499611)*x[0]**o+(-0.368668363075)*x[0]+(0.404302895836)*x[1]**o+(0.66913878408)*x[1]
-        arg[1,3,2,0]=(-0.122189168877)*x[0]**o+(0.603362404944)*x[0]+(0.184163482697)*x[1]**o+(0.728136755361)*x[1]
-        arg[1,3,2,1]=(-0.149430048386)*x[0]**o+(-0.478108072433)*x[0]+(0.342479834611)*x[1]**o+(0.596757508109)*x[1]
-        arg[1,4,0,0]=(0.334694167334)*x[0]**o+(-0.815793032292)*x[0]+(0.394250112116)*x[1]**o+(0.269197166808)*x[1]
-        arg[1,4,0,1]=(-0.19210954081)*x[0]**o+(0.416736181257)*x[0]+(0.146217029416)*x[1]**o+(0.906316717458)*x[1]
-        arg[1,4,1,0]=(-0.708061018673)*x[0]**o+(0.299200707691)*x[0]+(0.665111947965)*x[1]**o+(-0.0340170473314)*x[1]
-        arg[1,4,1,1]=(0.0353929744202)*x[0]**o+(0.0493194235067)*x[0]+(-0.12215424813)*x[1]**o+(-0.758677440837)*x[1]
-        arg[1,4,2,0]=(0.769702957701)*x[0]**o+(0.901805654682)*x[0]+(0.260222241019)*x[1]**o+(-0.471997705392)*x[1]
-        arg[1,4,2,1]=(0.204258068316)*x[0]**o+(-0.173085114573)*x[0]+(-0.0253164178046)*x[1]**o+(0.84254484259)*x[1]
-        arg[2,0,0,0]=(-0.688170206644)*x[0]**o+(-0.718673702314)*x[0]+(0.834265379201)*x[1]**o+(-0.879925159193)*x[1]
-        arg[2,0,0,1]=(-0.515401334666)*x[0]**o+(-0.810523180967)*x[0]+(0.725182741017)*x[1]**o+(-0.74319471007)*x[1]
-        arg[2,0,1,0]=(-0.799698108602)*x[0]**o+(0.289222327549)*x[0]+(0.0589402409999)*x[1]**o+(-0.437669765839)*x[1]
-        arg[2,0,1,1]=(-0.734933454418)*x[0]**o+(0.371391146956)*x[0]+(-0.17797293763)*x[1]**o+(-0.499412028554)*x[1]
-        arg[2,0,2,0]=(0.217283159505)*x[0]**o+(-0.184871188378)*x[0]+(-0.764095670777)*x[1]**o+(0.103705507755)*x[1]
-        arg[2,0,2,1]=(0.578071527416)*x[0]**o+(0.845365737459)*x[0]+(-0.173187973137)*x[1]**o+(-0.827819925403)*x[1]
-        arg[2,1,0,0]=(-0.258505119864)*x[0]**o+(0.640873475074)*x[0]+(-0.993841847675)*x[1]**o+(0.347490565123)*x[1]
-        arg[2,1,0,1]=(0.224893445547)*x[0]**o+(0.827208591218)*x[0]+(0.0391563892525)*x[1]**o+(-0.320939200596)*x[1]
-        arg[2,1,1,0]=(-0.993044884903)*x[0]**o+(-0.395235414086)*x[0]+(-0.447460653655)*x[1]**o+(-0.114585622808)*x[1]
-        arg[2,1,1,1]=(0.908711735866)*x[0]**o+(-0.911405008413)*x[0]+(-0.798601192961)*x[1]**o+(-0.432937813587)*x[1]
-        arg[2,1,2,0]=(-0.270424920067)*x[0]**o+(-0.533648944143)*x[0]+(0.184307763968)*x[1]**o+(-0.802221601505)*x[1]
-        arg[2,1,2,1]=(0.154432841861)*x[0]**o+(0.306458633794)*x[0]+(0.0343421658454)*x[1]**o+(-0.768559457414)*x[1]
-        arg[2,2,0,0]=(-0.497828132445)*x[0]**o+(0.484920248315)*x[0]+(-0.188239341875)*x[1]**o+(0.100360622012)*x[1]
-        arg[2,2,0,1]=(-0.0433518780446)*x[0]**o+(0.119470819101)*x[0]+(0.344025017428)*x[1]**o+(0.667394126898)*x[1]
-        arg[2,2,1,0]=(0.512271795846)*x[0]**o+(0.567024910623)*x[0]+(-0.316191920076)*x[1]**o+(-0.202135136851)*x[1]
-        arg[2,2,1,1]=(0.781678855797)*x[0]**o+(0.159208533718)*x[0]+(-0.930150837465)*x[1]**o+(-0.666903895504)*x[1]
-        arg[2,2,2,0]=(0.292270965732)*x[0]**o+(-0.112877441048)*x[0]+(-0.643355582049)*x[1]**o+(-0.0482560996171)*x[1]
-        arg[2,2,2,1]=(0.638688065872)*x[0]**o+(0.787719224138)*x[0]+(0.815312681592)*x[1]**o+(0.334735776221)*x[1]
-        arg[2,3,0,0]=(0.409920519672)*x[0]**o+(-0.191886243537)*x[0]+(-0.348205383522)*x[1]**o+(-0.651065510647)*x[1]
-        arg[2,3,0,1]=(0.824428500178)*x[0]**o+(-0.909533490456)*x[0]+(-0.455079541262)*x[1]**o+(-0.613994310127)*x[1]
-        arg[2,3,1,0]=(0.225908995914)*x[0]**o+(0.258098741048)*x[0]+(-0.858905205327)*x[1]**o+(0.535845140874)*x[1]
-        arg[2,3,1,1]=(-0.183600641837)*x[0]**o+(-0.0436432564818)*x[0]+(0.306524301109)*x[1]**o+(0.662513699164)*x[1]
-        arg[2,3,2,0]=(-0.678973103555)*x[0]**o+(0.674110571991)*x[0]+(-0.129743880618)*x[1]**o+(-0.210759231178)*x[1]
-        arg[2,3,2,1]=(-0.594989617102)*x[0]**o+(0.0557145839856)*x[0]+(-0.379516802094)*x[1]**o+(-0.496127170036)*x[1]
-        arg[2,4,0,0]=(0.401088886175)*x[0]**o+(-0.208580896076)*x[0]+(-0.655582275521)*x[1]**o+(-0.522892532154)*x[1]
-        arg[2,4,0,1]=(0.609111916382)*x[0]**o+(-0.864603847696)*x[0]+(-0.373482060442)*x[1]**o+(0.048777005392)*x[1]
-        arg[2,4,1,0]=(-0.503935244799)*x[0]**o+(0.320517360825)*x[0]+(-0.658994963813)*x[1]**o+(0.00465823412972)*x[1]
-        arg[2,4,1,1]=(-0.202767966863)*x[0]**o+(0.737239608437)*x[0]+(-0.633206522406)*x[1]**o+(-0.408531988781)*x[1]
-        arg[2,4,2,0]=(0.660048575091)*x[0]**o+(-0.399137043056)*x[0]+(-0.0977181117895)*x[1]**o+(0.148903352776)*x[1]
-        arg[2,4,2,1]=(-0.396768795712)*x[0]**o+(-0.550388681028)*x[0]+(0.0946256561554)*x[1]**o+(-0.0566941754267)*x[1]
-        arg[3,0,0,0]=(0.0647180650687)*x[0]**o+(0.920788893299)*x[0]+(0.131306350033)*x[1]**o+(-0.840527983774)*x[1]
-        arg[3,0,0,1]=(0.451700262969)*x[0]**o+(-0.16104676139)*x[0]+(0.114145999713)*x[1]**o+(-0.949265482931)*x[1]
-        arg[3,0,1,0]=(-0.219444617083)*x[0]**o+(0.846470673388)*x[0]+(-0.341392225388)*x[1]**o+(-0.721912717627)*x[1]
-        arg[3,0,1,1]=(-0.199502120929)*x[0]**o+(-0.00662410675554)*x[0]+(0.0529013037694)*x[1]**o+(-0.022278580228)*x[1]
-        arg[3,0,2,0]=(0.803500732535)*x[0]**o+(0.754138333448)*x[0]+(0.822404687478)*x[1]**o+(0.900099584934)*x[1]
-        arg[3,0,2,1]=(0.84674757393)*x[0]**o+(0.326823539079)*x[0]+(-0.824446392056)*x[1]**o+(-0.506583766552)*x[1]
-        arg[3,1,0,0]=(0.816775849327)*x[0]**o+(0.957523430402)*x[0]+(-0.822535686534)*x[1]**o+(-0.583389123083)*x[1]
-        arg[3,1,0,1]=(0.518120693337)*x[0]**o+(0.0946135115511)*x[0]+(0.577364260402)*x[1]**o+(-0.677435109716)*x[1]
-        arg[3,1,1,0]=(-0.559041961891)*x[0]**o+(0.436791134026)*x[0]+(0.287609046653)*x[1]**o+(-0.484573207793)*x[1]
-        arg[3,1,1,1]=(-0.0786041693053)*x[0]**o+(0.793526931222)*x[0]+(0.055780633982)*x[1]**o+(0.0447074319839)*x[1]
-        arg[3,1,2,0]=(-0.190231018951)*x[0]**o+(-0.61318830169)*x[0]+(-0.157202158534)*x[1]**o+(-0.823043159126)*x[1]
-        arg[3,1,2,1]=(-0.502637901786)*x[0]**o+(0.781083145697)*x[0]+(-0.663013942651)*x[1]**o+(-0.305726874525)*x[1]
-        arg[3,2,0,0]=(0.566955929517)*x[0]**o+(-0.506981068575)*x[0]+(-0.831439289654)*x[1]**o+(-0.337491442765)*x[1]
-        arg[3,2,0,1]=(-0.713648844422)*x[0]**o+(-0.00815764297609)*x[0]+(0.829706206618)*x[1]**o+(0.96471376965)*x[1]
-        arg[3,2,1,0]=(-0.944705561715)*x[0]**o+(-0.87962603172)*x[0]+(-0.0525190846342)*x[1]**o+(-0.0457463400515)*x[1]
-        arg[3,2,1,1]=(0.54922446571)*x[0]**o+(0.651923573438)*x[0]+(-0.00229398468376)*x[1]**o+(-0.00170863787749)*x[1]
-        arg[3,2,2,0]=(0.622372079685)*x[0]**o+(-0.553578221845)*x[0]+(-0.737877450857)*x[1]**o+(0.459729854002)*x[1]
-        arg[3,2,2,1]=(0.826155732508)*x[0]**o+(-0.000468898258991)*x[0]+(-0.255179342686)*x[1]**o+(-0.80957312045)*x[1]
-        arg[3,3,0,0]=(-0.195212469839)*x[0]**o+(-0.0235216449547)*x[0]+(-0.175192639485)*x[1]**o+(-0.58937661213)*x[1]
-        arg[3,3,0,1]=(-0.931538910404)*x[0]**o+(0.649282880007)*x[0]+(-0.237841482637)*x[1]**o+(-0.0220516220802)*x[1]
-        arg[3,3,1,0]=(0.420911057166)*x[0]**o+(0.200126728184)*x[0]+(-0.829130861656)*x[1]**o+(-0.563462916661)*x[1]
-        arg[3,3,1,1]=(-0.148199974575)*x[0]**o+(-0.248825389533)*x[0]+(-0.346424894584)*x[1]**o+(0.339758232978)*x[1]
-        arg[3,3,2,0]=(0.249372496215)*x[0]**o+(-0.343626915746)*x[0]+(0.0961351845087)*x[1]**o+(0.612679249068)*x[1]
-        arg[3,3,2,1]=(0.985380582259)*x[0]**o+(-0.603514318626)*x[0]+(-0.131105546364)*x[1]**o+(-0.0798158697238)*x[1]
-        arg[3,4,0,0]=(0.478635365792)*x[0]**o+(-0.964424450881)*x[0]+(-0.469995535544)*x[1]**o+(-0.72871149515)*x[1]
-        arg[3,4,0,1]=(-0.264802297415)*x[0]**o+(-0.926518282507)*x[0]+(0.803390182149)*x[1]**o+(0.387910762706)*x[1]
-        arg[3,4,1,0]=(0.0452448579909)*x[0]**o+(-0.0482221515826)*x[0]+(-0.728020494982)*x[1]**o+(-0.288823633249)*x[1]
-        arg[3,4,1,1]=(-0.640459595265)*x[0]**o+(0.759525453728)*x[0]+(-0.0280300707884)*x[1]**o+(0.079438187123)*x[1]
-        arg[3,4,2,0]=(-0.14185171171)*x[0]**o+(-0.810989314052)*x[0]+(0.921902325773)*x[1]**o+(0.885920658784)*x[1]
-        arg[3,4,2,1]=(-0.0101259901393)*x[0]**o+(-0.696541046542)*x[0]+(0.127932822496)*x[1]**o+(-0.822265796323)*x[1]
-        ref[0,0,0,0]=(0.0577426785287)*x_ref[0]**o+(0.469845292021)*x_ref[0]+(-0.641706722819)*x_ref[1]**o+(0.129652001842)*x_ref[1]
-        ref[0,0,0,1]=(-0.87686951076)*x_ref[0]**o+(-0.981093040999)*x_ref[0]+(0.654637319552)*x_ref[1]**o+(-0.953104888811)*x_ref[1]
-        ref[0,0,1,0]=(-0.486386436415)*x_ref[0]**o+(0.91083470956)*x_ref[0]+(-0.392432937401)*x_ref[1]**o+(0.494919250884)*x_ref[1]
-        ref[0,0,1,1]=(0.299928502076)*x_ref[0]**o+(-0.0787848191157)*x_ref[0]+(-0.541863592475)*x_ref[1]**o+(0.435934816687)*x_ref[1]
-        ref[0,0,2,0]=(-0.0500083438365)*x_ref[0]**o+(-0.882581886623)*x_ref[0]+(-0.965347357063)*x_ref[1]**o+(-0.270254041774)*x_ref[1]
-        ref[0,0,2,1]=(-0.18974861517)*x_ref[0]**o+(0.341406736671)*x_ref[0]+(0.847020774229)*x_ref[1]**o+(0.650201215849)*x_ref[1]
-        ref[0,1,0,0]=(0.0823017084719)*x_ref[0]**o+(0.964585359235)*x_ref[0]+(0.357658660436)*x_ref[1]**o+(0.182585271812)*x_ref[1]
-        ref[0,1,0,1]=(0.863411821905)*x_ref[0]**o+(0.313374566426)*x_ref[0]+(-0.273547644827)*x_ref[1]**o+(0.429051854479)*x_ref[1]
-        ref[0,1,1,0]=(0.167608645068)*x_ref[0]**o+(0.926908094967)*x_ref[0]+(-0.853415240465)*x_ref[1]**o+(-0.376634525241)*x_ref[1]
-        ref[0,1,1,1]=(-0.555491961591)*x_ref[0]**o+(-0.64621137308)*x_ref[0]+(-0.315877124991)*x_ref[1]**o+(-0.962839286133)*x_ref[1]
-        ref[0,1,2,0]=(0.909012065667)*x_ref[0]**o+(-0.656739022976)*x_ref[0]+(-0.458377773547)*x_ref[1]**o+(0.394223574009)*x_ref[1]
-        ref[0,1,2,1]=(-0.550560496714)*x_ref[0]**o+(0.216941875936)*x_ref[0]+(-0.634745794924)*x_ref[1]**o+(0.887912543217)*x_ref[1]
-        ref[0,2,0,0]=(-0.961535901493)*x_ref[0]**o+(0.980336384835)*x_ref[0]+(-0.151755000128)*x_ref[1]**o+(0.0402841925797)*x_ref[1]
-        ref[0,2,0,1]=(0.571527088727)*x_ref[0]**o+(-0.475013184811)*x_ref[0]+(0.80051818192)*x_ref[1]**o+(-0.589499747694)*x_ref[1]
-        ref[0,2,1,0]=(0.545840648612)*x_ref[0]**o+(0.888313209612)*x_ref[0]+(-0.568938733446)*x_ref[1]**o+(-0.289030374342)*x_ref[1]
-        ref[0,2,1,1]=(-0.0631638607979)*x_ref[0]**o+(-0.173754439841)*x_ref[0]+(0.143503554071)*x_ref[1]**o+(-0.0850087835084)*x_ref[1]
-        ref[0,2,2,0]=(0.316299661412)*x_ref[0]**o+(0.260890197379)*x_ref[0]+(-0.803519867776)*x_ref[1]**o+(0.36434810185)*x_ref[1]
-        ref[0,2,2,1]=(-0.656013716479)*x_ref[0]**o+(0.810499942514)*x_ref[0]+(0.783455480815)*x_ref[1]**o+(-0.943085466999)*x_ref[1]
-        ref[0,3,0,0]=(0.128153439722)*x_ref[0]**o+(-0.404740042302)*x_ref[0]+(0.785717360548)*x_ref[1]**o+(-0.710818900841)*x_ref[1]
-        ref[0,3,0,1]=(-0.097059274787)*x_ref[0]**o+(0.578757823228)*x_ref[0]+(0.186146155178)*x_ref[1]**o+(0.274602030707)*x_ref[1]
-        ref[0,3,1,0]=(0.00522392753954)*x_ref[0]**o+(0.015773606982)*x_ref[0]+(-0.327110065344)*x_ref[1]**o+(0.15571120542)*x_ref[1]
-        ref[0,3,1,1]=(-0.14009116305)*x_ref[0]**o+(-0.659975337811)*x_ref[0]+(-0.297582833489)*x_ref[1]**o+(-0.600935015071)*x_ref[1]
-        ref[0,3,2,0]=(0.749388604357)*x_ref[0]**o+(0.762968650778)*x_ref[0]+(-0.623477518339)*x_ref[1]**o+(-0.931762943135)*x_ref[1]
-        ref[0,3,2,1]=(0.748396100632)*x_ref[0]**o+(-0.841314360401)*x_ref[0]+(0.432649446216)*x_ref[1]**o+(-0.971300843628)*x_ref[1]
-        ref[0,4,0,0]=(-0.217249090357)*x_ref[0]**o+(-0.833633675601)*x_ref[0]+(0.169984305627)*x_ref[1]**o+(-0.831738272666)*x_ref[1]
-        ref[0,4,0,1]=(0.501571101669)*x_ref[0]**o+(-0.223897334788)*x_ref[0]+(0.24178181976)*x_ref[1]**o+(0.307921789017)*x_ref[1]
-        ref[0,4,1,0]=(-0.162064610564)*x_ref[0]**o+(0.217669674603)*x_ref[0]+(0.995517866562)*x_ref[1]**o+(0.903061734589)*x_ref[1]
-        ref[0,4,1,1]=(-0.837150436928)*x_ref[0]**o+(0.465269468525)*x_ref[0]+(0.522034182082)*x_ref[1]**o+(-0.725469921625)*x_ref[1]
-        ref[0,4,2,0]=(-0.295739906169)*x_ref[0]**o+(0.961959220618)*x_ref[0]+(0.577799918942)*x_ref[1]**o+(-0.313255108148)*x_ref[1]
-        ref[0,4,2,1]=(-0.455635927062)*x_ref[0]**o+(0.667038701641)*x_ref[0]+(-0.151183772961)*x_ref[1]**o+(-0.550197828316)*x_ref[1]
-        ref[1,0,0,0]=(0.585510684472)*x_ref[0]**o+(-0.64754219493)*x_ref[0]+(0.781495111863)*x_ref[1]**o+(-0.792246214695)*x_ref[1]
-        ref[1,0,0,1]=(0.586346471397)*x_ref[0]**o+(0.291794158138)*x_ref[0]+(-0.614723564286)*x_ref[1]**o+(-0.151451723805)*x_ref[1]
-        ref[1,0,1,0]=(-0.472877220222)*x_ref[0]**o+(-0.0118252391089)*x_ref[0]+(-0.596943135354)*x_ref[1]**o+(-0.413992986066)*x_ref[1]
-        ref[1,0,1,1]=(-0.715007718152)*x_ref[0]**o+(0.032964784403)*x_ref[0]+(-0.350680745946)*x_ref[1]**o+(0.678841285054)*x_ref[1]
-        ref[1,0,2,0]=(0.673910318085)*x_ref[0]**o+(-0.15303471314)*x_ref[0]+(-0.0889279944344)*x_ref[1]**o+(-0.0356474498002)*x_ref[1]
-        ref[1,0,2,1]=(-0.875691348779)*x_ref[0]**o+(0.547300853671)*x_ref[0]+(-0.362646169132)*x_ref[1]**o+(-0.588521964671)*x_ref[1]
-        ref[1,1,0,0]=(-0.0988912551145)*x_ref[0]**o+(-0.710944394432)*x_ref[0]+(0.153875249337)*x_ref[1]**o+(0.274427434926)*x_ref[1]
-        ref[1,1,0,1]=(-0.0854272185591)*x_ref[0]**o+(-0.21840195791)*x_ref[0]+(0.906982245924)*x_ref[1]**o+(0.570990116211)*x_ref[1]
-        ref[1,1,1,0]=(-0.851259116331)*x_ref[0]**o+(0.309829955487)*x_ref[0]+(0.115725082696)*x_ref[1]**o+(-0.91590292189)*x_ref[1]
-        ref[1,1,1,1]=(-0.637464462703)*x_ref[0]**o+(-0.280971672162)*x_ref[0]+(0.270985403603)*x_ref[1]**o+(-0.534115311397)*x_ref[1]
-        ref[1,1,2,0]=(0.670179973397)*x_ref[0]**o+(0.847483793904)*x_ref[0]+(0.0681088634526)*x_ref[1]**o+(0.412176359729)*x_ref[1]
-        ref[1,1,2,1]=(0.0378205172485)*x_ref[0]**o+(0.974150495292)*x_ref[0]+(-0.720821275299)*x_ref[1]**o+(-0.552588296494)*x_ref[1]
-        ref[1,2,0,0]=(0.151367609975)*x_ref[0]**o+(0.832981586349)*x_ref[0]+(0.419488381843)*x_ref[1]**o+(0.561052438283)*x_ref[1]
-        ref[1,2,0,1]=(0.267839010425)*x_ref[0]**o+(0.47455974064)*x_ref[0]+(0.498826652567)*x_ref[1]**o+(-0.51906391205)*x_ref[1]
-        ref[1,2,1,0]=(-0.350105107527)*x_ref[0]**o+(-0.489326689724)*x_ref[0]+(-0.156970199109)*x_ref[1]**o+(-0.175565230472)*x_ref[1]
-        ref[1,2,1,1]=(0.754379973459)*x_ref[0]**o+(-0.70691373234)*x_ref[0]+(-0.964497356137)*x_ref[1]**o+(-0.694989442192)*x_ref[1]
-        ref[1,2,2,0]=(-0.491090361655)*x_ref[0]**o+(0.154379441501)*x_ref[0]+(0.403809695039)*x_ref[1]**o+(-0.084183660554)*x_ref[1]
-        ref[1,2,2,1]=(-0.164538235223)*x_ref[0]**o+(0.628058472821)*x_ref[0]+(0.331956969519)*x_ref[1]**o+(0.828755643202)*x_ref[1]
-        ref[1,3,0,0]=(0.103479416566)*x_ref[0]**o+(0.380691196177)*x_ref[0]+(-0.350375360146)*x_ref[1]**o+(0.18528492785)*x_ref[1]
-        ref[1,3,0,1]=(-0.0744423760559)*x_ref[0]**o+(0.912275380092)*x_ref[0]+(0.867254399179)*x_ref[1]**o+(0.410307184344)*x_ref[1]
-        ref[1,3,1,0]=(-0.480324052626)*x_ref[0]**o+(-0.438544962062)*x_ref[0]+(0.749575808465)*x_ref[1]**o+(-0.0689669475685)*x_ref[1]
-        ref[1,3,1,1]=(0.723325499611)*x_ref[0]**o+(-0.368668363075)*x_ref[0]+(0.404302895836)*x_ref[1]**o+(0.66913878408)*x_ref[1]
-        ref[1,3,2,0]=(-0.122189168877)*x_ref[0]**o+(0.603362404944)*x_ref[0]+(0.184163482697)*x_ref[1]**o+(0.728136755361)*x_ref[1]
-        ref[1,3,2,1]=(-0.149430048386)*x_ref[0]**o+(-0.478108072433)*x_ref[0]+(0.342479834611)*x_ref[1]**o+(0.596757508109)*x_ref[1]
-        ref[1,4,0,0]=(0.334694167334)*x_ref[0]**o+(-0.815793032292)*x_ref[0]+(0.394250112116)*x_ref[1]**o+(0.269197166808)*x_ref[1]
-        ref[1,4,0,1]=(-0.19210954081)*x_ref[0]**o+(0.416736181257)*x_ref[0]+(0.146217029416)*x_ref[1]**o+(0.906316717458)*x_ref[1]
-        ref[1,4,1,0]=(-0.708061018673)*x_ref[0]**o+(0.299200707691)*x_ref[0]+(0.665111947965)*x_ref[1]**o+(-0.0340170473314)*x_ref[1]
-        ref[1,4,1,1]=(0.0353929744202)*x_ref[0]**o+(0.0493194235067)*x_ref[0]+(-0.12215424813)*x_ref[1]**o+(-0.758677440837)*x_ref[1]
-        ref[1,4,2,0]=(0.769702957701)*x_ref[0]**o+(0.901805654682)*x_ref[0]+(0.260222241019)*x_ref[1]**o+(-0.471997705392)*x_ref[1]
-        ref[1,4,2,1]=(0.204258068316)*x_ref[0]**o+(-0.173085114573)*x_ref[0]+(-0.0253164178046)*x_ref[1]**o+(0.84254484259)*x_ref[1]
-        ref[2,0,0,0]=(-0.688170206644)*x_ref[0]**o+(-0.718673702314)*x_ref[0]+(0.834265379201)*x_ref[1]**o+(-0.879925159193)*x_ref[1]
-        ref[2,0,0,1]=(-0.515401334666)*x_ref[0]**o+(-0.810523180967)*x_ref[0]+(0.725182741017)*x_ref[1]**o+(-0.74319471007)*x_ref[1]
-        ref[2,0,1,0]=(-0.799698108602)*x_ref[0]**o+(0.289222327549)*x_ref[0]+(0.0589402409999)*x_ref[1]**o+(-0.437669765839)*x_ref[1]
-        ref[2,0,1,1]=(-0.734933454418)*x_ref[0]**o+(0.371391146956)*x_ref[0]+(-0.17797293763)*x_ref[1]**o+(-0.499412028554)*x_ref[1]
-        ref[2,0,2,0]=(0.217283159505)*x_ref[0]**o+(-0.184871188378)*x_ref[0]+(-0.764095670777)*x_ref[1]**o+(0.103705507755)*x_ref[1]
-        ref[2,0,2,1]=(0.578071527416)*x_ref[0]**o+(0.845365737459)*x_ref[0]+(-0.173187973137)*x_ref[1]**o+(-0.827819925403)*x_ref[1]
-        ref[2,1,0,0]=(-0.258505119864)*x_ref[0]**o+(0.640873475074)*x_ref[0]+(-0.993841847675)*x_ref[1]**o+(0.347490565123)*x_ref[1]
-        ref[2,1,0,1]=(0.224893445547)*x_ref[0]**o+(0.827208591218)*x_ref[0]+(0.0391563892525)*x_ref[1]**o+(-0.320939200596)*x_ref[1]
-        ref[2,1,1,0]=(-0.993044884903)*x_ref[0]**o+(-0.395235414086)*x_ref[0]+(-0.447460653655)*x_ref[1]**o+(-0.114585622808)*x_ref[1]
-        ref[2,1,1,1]=(0.908711735866)*x_ref[0]**o+(-0.911405008413)*x_ref[0]+(-0.798601192961)*x_ref[1]**o+(-0.432937813587)*x_ref[1]
-        ref[2,1,2,0]=(-0.270424920067)*x_ref[0]**o+(-0.533648944143)*x_ref[0]+(0.184307763968)*x_ref[1]**o+(-0.802221601505)*x_ref[1]
-        ref[2,1,2,1]=(0.154432841861)*x_ref[0]**o+(0.306458633794)*x_ref[0]+(0.0343421658454)*x_ref[1]**o+(-0.768559457414)*x_ref[1]
-        ref[2,2,0,0]=(-0.497828132445)*x_ref[0]**o+(0.484920248315)*x_ref[0]+(-0.188239341875)*x_ref[1]**o+(0.100360622012)*x_ref[1]
-        ref[2,2,0,1]=(-0.0433518780446)*x_ref[0]**o+(0.119470819101)*x_ref[0]+(0.344025017428)*x_ref[1]**o+(0.667394126898)*x_ref[1]
-        ref[2,2,1,0]=(0.512271795846)*x_ref[0]**o+(0.567024910623)*x_ref[0]+(-0.316191920076)*x_ref[1]**o+(-0.202135136851)*x_ref[1]
-        ref[2,2,1,1]=(0.781678855797)*x_ref[0]**o+(0.159208533718)*x_ref[0]+(-0.930150837465)*x_ref[1]**o+(-0.666903895504)*x_ref[1]
-        ref[2,2,2,0]=(0.292270965732)*x_ref[0]**o+(-0.112877441048)*x_ref[0]+(-0.643355582049)*x_ref[1]**o+(-0.0482560996171)*x_ref[1]
-        ref[2,2,2,1]=(0.638688065872)*x_ref[0]**o+(0.787719224138)*x_ref[0]+(0.815312681592)*x_ref[1]**o+(0.334735776221)*x_ref[1]
-        ref[2,3,0,0]=(0.409920519672)*x_ref[0]**o+(-0.191886243537)*x_ref[0]+(-0.348205383522)*x_ref[1]**o+(-0.651065510647)*x_ref[1]
-        ref[2,3,0,1]=(0.824428500178)*x_ref[0]**o+(-0.909533490456)*x_ref[0]+(-0.455079541262)*x_ref[1]**o+(-0.613994310127)*x_ref[1]
-        ref[2,3,1,0]=(0.225908995914)*x_ref[0]**o+(0.258098741048)*x_ref[0]+(-0.858905205327)*x_ref[1]**o+(0.535845140874)*x_ref[1]
-        ref[2,3,1,1]=(-0.183600641837)*x_ref[0]**o+(-0.0436432564818)*x_ref[0]+(0.306524301109)*x_ref[1]**o+(0.662513699164)*x_ref[1]
-        ref[2,3,2,0]=(-0.678973103555)*x_ref[0]**o+(0.674110571991)*x_ref[0]+(-0.129743880618)*x_ref[1]**o+(-0.210759231178)*x_ref[1]
-        ref[2,3,2,1]=(-0.594989617102)*x_ref[0]**o+(0.0557145839856)*x_ref[0]+(-0.379516802094)*x_ref[1]**o+(-0.496127170036)*x_ref[1]
-        ref[2,4,0,0]=(0.401088886175)*x_ref[0]**o+(-0.208580896076)*x_ref[0]+(-0.655582275521)*x_ref[1]**o+(-0.522892532154)*x_ref[1]
-        ref[2,4,0,1]=(0.609111916382)*x_ref[0]**o+(-0.864603847696)*x_ref[0]+(-0.373482060442)*x_ref[1]**o+(0.048777005392)*x_ref[1]
-        ref[2,4,1,0]=(-0.503935244799)*x_ref[0]**o+(0.320517360825)*x_ref[0]+(-0.658994963813)*x_ref[1]**o+(0.00465823412972)*x_ref[1]
-        ref[2,4,1,1]=(-0.202767966863)*x_ref[0]**o+(0.737239608437)*x_ref[0]+(-0.633206522406)*x_ref[1]**o+(-0.408531988781)*x_ref[1]
-        ref[2,4,2,0]=(0.660048575091)*x_ref[0]**o+(-0.399137043056)*x_ref[0]+(-0.0977181117895)*x_ref[1]**o+(0.148903352776)*x_ref[1]
-        ref[2,4,2,1]=(-0.396768795712)*x_ref[0]**o+(-0.550388681028)*x_ref[0]+(0.0946256561554)*x_ref[1]**o+(-0.0566941754267)*x_ref[1]
-        ref[3,0,0,0]=(0.0647180650687)*x_ref[0]**o+(0.920788893299)*x_ref[0]+(0.131306350033)*x_ref[1]**o+(-0.840527983774)*x_ref[1]
-        ref[3,0,0,1]=(0.451700262969)*x_ref[0]**o+(-0.16104676139)*x_ref[0]+(0.114145999713)*x_ref[1]**o+(-0.949265482931)*x_ref[1]
-        ref[3,0,1,0]=(-0.219444617083)*x_ref[0]**o+(0.846470673388)*x_ref[0]+(-0.341392225388)*x_ref[1]**o+(-0.721912717627)*x_ref[1]
-        ref[3,0,1,1]=(-0.199502120929)*x_ref[0]**o+(-0.00662410675554)*x_ref[0]+(0.0529013037694)*x_ref[1]**o+(-0.022278580228)*x_ref[1]
-        ref[3,0,2,0]=(0.803500732535)*x_ref[0]**o+(0.754138333448)*x_ref[0]+(0.822404687478)*x_ref[1]**o+(0.900099584934)*x_ref[1]
-        ref[3,0,2,1]=(0.84674757393)*x_ref[0]**o+(0.326823539079)*x_ref[0]+(-0.824446392056)*x_ref[1]**o+(-0.506583766552)*x_ref[1]
-        ref[3,1,0,0]=(0.816775849327)*x_ref[0]**o+(0.957523430402)*x_ref[0]+(-0.822535686534)*x_ref[1]**o+(-0.583389123083)*x_ref[1]
-        ref[3,1,0,1]=(0.518120693337)*x_ref[0]**o+(0.0946135115511)*x_ref[0]+(0.577364260402)*x_ref[1]**o+(-0.677435109716)*x_ref[1]
-        ref[3,1,1,0]=(-0.559041961891)*x_ref[0]**o+(0.436791134026)*x_ref[0]+(0.287609046653)*x_ref[1]**o+(-0.484573207793)*x_ref[1]
-        ref[3,1,1,1]=(-0.0786041693053)*x_ref[0]**o+(0.793526931222)*x_ref[0]+(0.055780633982)*x_ref[1]**o+(0.0447074319839)*x_ref[1]
-        ref[3,1,2,0]=(-0.190231018951)*x_ref[0]**o+(-0.61318830169)*x_ref[0]+(-0.157202158534)*x_ref[1]**o+(-0.823043159126)*x_ref[1]
-        ref[3,1,2,1]=(-0.502637901786)*x_ref[0]**o+(0.781083145697)*x_ref[0]+(-0.663013942651)*x_ref[1]**o+(-0.305726874525)*x_ref[1]
-        ref[3,2,0,0]=(0.566955929517)*x_ref[0]**o+(-0.506981068575)*x_ref[0]+(-0.831439289654)*x_ref[1]**o+(-0.337491442765)*x_ref[1]
-        ref[3,2,0,1]=(-0.713648844422)*x_ref[0]**o+(-0.00815764297609)*x_ref[0]+(0.829706206618)*x_ref[1]**o+(0.96471376965)*x_ref[1]
-        ref[3,2,1,0]=(-0.944705561715)*x_ref[0]**o+(-0.87962603172)*x_ref[0]+(-0.0525190846342)*x_ref[1]**o+(-0.0457463400515)*x_ref[1]
-        ref[3,2,1,1]=(0.54922446571)*x_ref[0]**o+(0.651923573438)*x_ref[0]+(-0.00229398468376)*x_ref[1]**o+(-0.00170863787749)*x_ref[1]
-        ref[3,2,2,0]=(0.622372079685)*x_ref[0]**o+(-0.553578221845)*x_ref[0]+(-0.737877450857)*x_ref[1]**o+(0.459729854002)*x_ref[1]
-        ref[3,2,2,1]=(0.826155732508)*x_ref[0]**o+(-0.000468898258991)*x_ref[0]+(-0.255179342686)*x_ref[1]**o+(-0.80957312045)*x_ref[1]
-        ref[3,3,0,0]=(-0.195212469839)*x_ref[0]**o+(-0.0235216449547)*x_ref[0]+(-0.175192639485)*x_ref[1]**o+(-0.58937661213)*x_ref[1]
-        ref[3,3,0,1]=(-0.931538910404)*x_ref[0]**o+(0.649282880007)*x_ref[0]+(-0.237841482637)*x_ref[1]**o+(-0.0220516220802)*x_ref[1]
-        ref[3,3,1,0]=(0.420911057166)*x_ref[0]**o+(0.200126728184)*x_ref[0]+(-0.829130861656)*x_ref[1]**o+(-0.563462916661)*x_ref[1]
-        ref[3,3,1,1]=(-0.148199974575)*x_ref[0]**o+(-0.248825389533)*x_ref[0]+(-0.346424894584)*x_ref[1]**o+(0.339758232978)*x_ref[1]
-        ref[3,3,2,0]=(0.249372496215)*x_ref[0]**o+(-0.343626915746)*x_ref[0]+(0.0961351845087)*x_ref[1]**o+(0.612679249068)*x_ref[1]
-        ref[3,3,2,1]=(0.985380582259)*x_ref[0]**o+(-0.603514318626)*x_ref[0]+(-0.131105546364)*x_ref[1]**o+(-0.0798158697238)*x_ref[1]
-        ref[3,4,0,0]=(0.478635365792)*x_ref[0]**o+(-0.964424450881)*x_ref[0]+(-0.469995535544)*x_ref[1]**o+(-0.72871149515)*x_ref[1]
-        ref[3,4,0,1]=(-0.264802297415)*x_ref[0]**o+(-0.926518282507)*x_ref[0]+(0.803390182149)*x_ref[1]**o+(0.387910762706)*x_ref[1]
-        ref[3,4,1,0]=(0.0452448579909)*x_ref[0]**o+(-0.0482221515826)*x_ref[0]+(-0.728020494982)*x_ref[1]**o+(-0.288823633249)*x_ref[1]
-        ref[3,4,1,1]=(-0.640459595265)*x_ref[0]**o+(0.759525453728)*x_ref[0]+(-0.0280300707884)*x_ref[1]**o+(0.079438187123)*x_ref[1]
-        ref[3,4,2,0]=(-0.14185171171)*x_ref[0]**o+(-0.810989314052)*x_ref[0]+(0.921902325773)*x_ref[1]**o+(0.885920658784)*x_ref[1]
-        ref[3,4,2,1]=(-0.0101259901393)*x_ref[0]**o+(-0.696541046542)*x_ref[0]+(0.127932822496)*x_ref[1]**o+(-0.822265796323)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.657703355307)*x[0]**o+(0.397813831843)*x[0]+(0.364460538717)*x[1]**o+(-0.845626669617)*x[1]+(-0.987144254126)*x[2]**o+(-0.732384980726)*x[2]
-        arg[0,0,0,1]=(-0.13280304886)*x[0]**o+(-0.953796807758)*x[0]+(0.875723746654)*x[1]**o+(0.0764745117242)*x[1]+(-0.536085676221)*x[2]**o+(-0.520611959678)*x[2]
-        arg[0,0,1,0]=(0.716429446578)*x[0]**o+(-0.729164693441)*x[0]+(-0.832505557428)*x[1]**o+(-0.329200605611)*x[1]+(0.0310162060964)*x[2]**o+(-0.869978941999)*x[2]
-        arg[0,0,1,1]=(0.110253530584)*x[0]**o+(0.995528486822)*x[0]+(0.838577797395)*x[1]**o+(0.443987752225)*x[1]+(0.387337959057)*x[2]**o+(0.548448752612)*x[2]
-        arg[0,0,2,0]=(-0.995737515431)*x[0]**o+(-0.899807241717)*x[0]+(-0.0803287764138)*x[1]**o+(0.242680051556)*x[1]+(0.58974836823)*x[2]**o+(-0.498450188944)*x[2]
-        arg[0,0,2,1]=(0.341561541555)*x[0]**o+(-0.00541988184597)*x[0]+(-0.204832898701)*x[1]**o+(-0.957247935865)*x[1]+(-0.441002902064)*x[2]**o+(0.756843480304)*x[2]
-        arg[0,1,0,0]=(0.136201526244)*x[0]**o+(0.517677304193)*x[0]+(0.523031610748)*x[1]**o+(-0.908998053383)*x[1]+(-0.629649678416)*x[2]**o+(0.762977917512)*x[2]
-        arg[0,1,0,1]=(-0.103521080864)*x[0]**o+(-0.434410222595)*x[0]+(0.418239530241)*x[1]**o+(0.65638475119)*x[1]+(0.413036393129)*x[2]**o+(-0.220365518353)*x[2]
-        arg[0,1,1,0]=(-0.415690201483)*x[0]**o+(-0.969323394689)*x[0]+(-0.295639420195)*x[1]**o+(-0.24915002749)*x[1]+(-0.00927627101467)*x[2]**o+(0.520335261634)*x[2]
-        arg[0,1,1,1]=(-0.262653741797)*x[0]**o+(-0.463590591666)*x[0]+(0.568893042923)*x[1]**o+(-0.869851332898)*x[1]+(-0.463261399415)*x[2]**o+(0.0281915686202)*x[2]
-        arg[0,1,2,0]=(0.377159503058)*x[0]**o+(0.484512261943)*x[0]+(0.0303594628925)*x[1]**o+(0.482051243004)*x[1]+(0.240643013949)*x[2]**o+(-0.943908617705)*x[2]
-        arg[0,1,2,1]=(0.843854614097)*x[0]**o+(0.018041534553)*x[0]+(0.264198703361)*x[1]**o+(0.732889517628)*x[1]+(-0.154807384394)*x[2]**o+(0.60513622187)*x[2]
-        arg[0,2,0,0]=(-0.234758118286)*x[0]**o+(-0.77807396119)*x[0]+(-0.97783091103)*x[1]**o+(-0.716185223828)*x[1]+(-0.573126474259)*x[2]**o+(0.403110701555)*x[2]
-        arg[0,2,0,1]=(-0.853878344804)*x[0]**o+(-0.482644826561)*x[0]+(-0.826041149012)*x[1]**o+(0.596376234798)*x[1]+(-0.216400517274)*x[2]**o+(-0.323127194259)*x[2]
-        arg[0,2,1,0]=(0.931551121492)*x[0]**o+(-0.527132174379)*x[0]+(0.373496704463)*x[1]**o+(-0.375215826463)*x[1]+(-0.639167297984)*x[2]**o+(0.143608733189)*x[2]
-        arg[0,2,1,1]=(-0.982206000879)*x[0]**o+(0.836589596534)*x[0]+(0.606275000138)*x[1]**o+(-0.821469453892)*x[1]+(-0.633828380948)*x[2]**o+(-0.637688777216)*x[2]
-        arg[0,2,2,0]=(0.441649557529)*x[0]**o+(-0.34978365051)*x[0]+(0.514175365405)*x[1]**o+(-0.903212271234)*x[1]+(0.70236887156)*x[2]**o+(0.72953045189)*x[2]
-        arg[0,2,2,1]=(0.302787896978)*x[0]**o+(0.157598071021)*x[0]+(-0.357101947632)*x[1]**o+(0.381098383156)*x[1]+(-0.552546036689)*x[2]**o+(0.448181721984)*x[2]
-        arg[0,3,0,0]=(0.662181077399)*x[0]**o+(-0.283755239518)*x[0]+(0.33694741278)*x[1]**o+(0.275801685868)*x[1]+(0.526155259101)*x[2]**o+(-0.378241855559)*x[2]
-        arg[0,3,0,1]=(0.157822133581)*x[0]**o+(0.25402072747)*x[0]+(0.522842123099)*x[1]**o+(0.510595773584)*x[1]+(-0.829239126666)*x[2]**o+(0.990879342044)*x[2]
-        arg[0,3,1,0]=(-0.775925280059)*x[0]**o+(-0.726971388023)*x[0]+(-0.630088730753)*x[1]**o+(-0.731024178237)*x[1]+(-0.288643541196)*x[2]**o+(-0.283708428793)*x[2]
-        arg[0,3,1,1]=(-0.883176640445)*x[0]**o+(-0.0810211976762)*x[0]+(-0.102919217784)*x[1]**o+(0.271384866385)*x[1]+(0.980796900477)*x[2]**o+(0.439294038672)*x[2]
-        arg[0,3,2,0]=(-0.826688221502)*x[0]**o+(-0.909388347347)*x[0]+(0.164406927722)*x[1]**o+(0.60157189364)*x[1]+(-0.885578176748)*x[2]**o+(0.610008674247)*x[2]
-        arg[0,3,2,1]=(0.130154197193)*x[0]**o+(-0.754703602975)*x[0]+(0.00463710497017)*x[1]**o+(0.502162916123)*x[1]+(-0.749124548541)*x[2]**o+(0.946592962092)*x[2]
-        arg[0,4,0,0]=(-0.0478347448906)*x[0]**o+(-0.812937871882)*x[0]+(-0.460982012551)*x[1]**o+(0.317485998991)*x[1]+(-0.593671683477)*x[2]**o+(0.551385718668)*x[2]
-        arg[0,4,0,1]=(0.281998767502)*x[0]**o+(-0.0613830311997)*x[0]+(0.981429151019)*x[1]**o+(-0.580567714008)*x[1]+(0.0369483005331)*x[2]**o+(-0.74132358588)*x[2]
-        arg[0,4,1,0]=(0.525845217483)*x[0]**o+(0.907803915216)*x[0]+(0.111429079263)*x[1]**o+(-0.653030401377)*x[1]+(0.0814793913696)*x[2]**o+(-0.419201413875)*x[2]
-        arg[0,4,1,1]=(0.862892518463)*x[0]**o+(0.34033875398)*x[0]+(0.0371376953103)*x[1]**o+(0.568160310726)*x[1]+(-0.237231036717)*x[2]**o+(-0.130046899302)*x[2]
-        arg[0,4,2,0]=(0.223651181698)*x[0]**o+(0.730991398203)*x[0]+(0.133551525027)*x[1]**o+(0.685783540126)*x[1]+(0.339586395814)*x[2]**o+(-0.524371194863)*x[2]
-        arg[0,4,2,1]=(0.220110871383)*x[0]**o+(-0.37385773877)*x[0]+(0.773372000545)*x[1]**o+(-0.4261356565)*x[1]+(-0.619438438945)*x[2]**o+(0.126288949127)*x[2]
-        arg[1,0,0,0]=(0.727680196631)*x[0]**o+(-0.876280912599)*x[0]+(0.576553782915)*x[1]**o+(-0.0497780322367)*x[1]+(-0.690257457282)*x[2]**o+(-0.11130953054)*x[2]
-        arg[1,0,0,1]=(0.331863815938)*x[0]**o+(0.169379824389)*x[0]+(0.665507756012)*x[1]**o+(0.94933357273)*x[1]+(-0.610506070093)*x[2]**o+(0.752476708027)*x[2]
-        arg[1,0,1,0]=(0.851320583415)*x[0]**o+(-0.697235996161)*x[0]+(0.235192165807)*x[1]**o+(0.325473517022)*x[1]+(-0.424683549673)*x[2]**o+(0.228953796486)*x[2]
-        arg[1,0,1,1]=(0.804192098517)*x[0]**o+(-0.684337197059)*x[0]+(-0.349251615715)*x[1]**o+(0.596165705743)*x[1]+(-0.636033221182)*x[2]**o+(-0.304367076307)*x[2]
-        arg[1,0,2,0]=(-0.237305477187)*x[0]**o+(-0.997679652719)*x[0]+(0.485994068389)*x[1]**o+(0.44508530534)*x[1]+(0.940139935628)*x[2]**o+(0.0789221540062)*x[2]
-        arg[1,0,2,1]=(0.814928463364)*x[0]**o+(-0.257693939789)*x[0]+(0.179643785703)*x[1]**o+(-0.696436530567)*x[1]+(-0.592226945554)*x[2]**o+(-0.454620411499)*x[2]
-        arg[1,1,0,0]=(-0.933925672439)*x[0]**o+(0.212298180817)*x[0]+(-0.447836316801)*x[1]**o+(0.180796376138)*x[1]+(-0.749910125701)*x[2]**o+(0.134540433851)*x[2]
-        arg[1,1,0,1]=(-0.649009346978)*x[0]**o+(0.0316819485953)*x[0]+(-0.718001767835)*x[1]**o+(0.289608435124)*x[1]+(-0.906045493384)*x[2]**o+(0.851021484125)*x[2]
-        arg[1,1,1,0]=(-0.216265404566)*x[0]**o+(0.657073282172)*x[0]+(-0.796155541438)*x[1]**o+(0.338980498824)*x[1]+(0.477444448193)*x[2]**o+(0.674278909522)*x[2]
-        arg[1,1,1,1]=(-0.67605942954)*x[0]**o+(0.457997253216)*x[0]+(-0.973576381948)*x[1]**o+(0.430432753773)*x[1]+(0.0329169564451)*x[2]**o+(-0.422512702485)*x[2]
-        arg[1,1,2,0]=(-0.32458256139)*x[0]**o+(0.289568625922)*x[0]+(-0.529564027476)*x[1]**o+(0.596449833118)*x[1]+(0.960461031989)*x[2]**o+(0.00801425321069)*x[2]
-        arg[1,1,2,1]=(-0.0425883615923)*x[0]**o+(-0.313926807333)*x[0]+(0.766062773671)*x[1]**o+(-0.857784560309)*x[1]+(0.914867381682)*x[2]**o+(-0.312493334639)*x[2]
-        arg[1,2,0,0]=(-0.637151767355)*x[0]**o+(-0.679947136952)*x[0]+(-0.0838349105494)*x[1]**o+(0.00800835879666)*x[1]+(0.385024194519)*x[2]**o+(-0.627828236571)*x[2]
-        arg[1,2,0,1]=(-0.62580153007)*x[0]**o+(-0.183834415542)*x[0]+(0.322406823575)*x[1]**o+(0.302908755868)*x[1]+(0.727234001542)*x[2]**o+(-0.933944878425)*x[2]
-        arg[1,2,1,0]=(-0.897198312615)*x[0]**o+(0.825086526945)*x[0]+(-0.031001758991)*x[1]**o+(0.987845551304)*x[1]+(-0.551212418179)*x[2]**o+(0.657813241764)*x[2]
-        arg[1,2,1,1]=(-0.544595822278)*x[0]**o+(0.595858429591)*x[0]+(-0.557503238514)*x[1]**o+(0.507560179011)*x[1]+(-0.519438270771)*x[2]**o+(-0.471678264995)*x[2]
-        arg[1,2,2,0]=(0.135616278099)*x[0]**o+(0.40676743342)*x[0]+(0.458810719213)*x[1]**o+(-0.881620410228)*x[1]+(-0.897267732846)*x[2]**o+(0.665458992487)*x[2]
-        arg[1,2,2,1]=(0.83854610457)*x[0]**o+(0.670263196782)*x[0]+(0.551767734306)*x[1]**o+(0.883934821215)*x[1]+(0.455375261768)*x[2]**o+(0.95604480045)*x[2]
-        arg[1,3,0,0]=(0.705853698882)*x[0]**o+(0.84681314245)*x[0]+(-0.0984020252408)*x[1]**o+(0.943165990555)*x[1]+(-0.428955841327)*x[2]**o+(0.0961618993003)*x[2]
-        arg[1,3,0,1]=(0.583731800337)*x[0]**o+(-0.738079255003)*x[0]+(0.315556768944)*x[1]**o+(-0.489631118687)*x[1]+(0.371775779104)*x[2]**o+(0.82029490872)*x[2]
-        arg[1,3,1,0]=(-0.885657545142)*x[0]**o+(0.542706113286)*x[0]+(0.800319452136)*x[1]**o+(0.314194184897)*x[1]+(-0.320905532427)*x[2]**o+(-0.314307365683)*x[2]
-        arg[1,3,1,1]=(-0.217030771566)*x[0]**o+(0.260108519031)*x[0]+(-0.686624725975)*x[1]**o+(-0.869322439609)*x[1]+(0.558806239315)*x[2]**o+(-0.440661121246)*x[2]
-        arg[1,3,2,0]=(-0.839335541382)*x[0]**o+(0.228726621639)*x[0]+(0.354403444002)*x[1]**o+(0.215616048959)*x[1]+(0.49622647562)*x[2]**o+(-0.725639112729)*x[2]
-        arg[1,3,2,1]=(-0.439687404632)*x[0]**o+(-0.820583921269)*x[0]+(-0.863730409631)*x[1]**o+(0.119773401911)*x[1]+(0.460158483187)*x[2]**o+(0.757153436592)*x[2]
-        arg[1,4,0,0]=(-0.77288839701)*x[0]**o+(-0.570203714622)*x[0]+(0.93832772305)*x[1]**o+(-0.759089944596)*x[1]+(0.000174937961704)*x[2]**o+(0.812917484286)*x[2]
-        arg[1,4,0,1]=(-0.25535378432)*x[0]**o+(-0.0938207170929)*x[0]+(0.0545321717685)*x[1]**o+(-0.414414792674)*x[1]+(-0.297698896712)*x[2]**o+(-0.367166660571)*x[2]
-        arg[1,4,1,0]=(0.743408112248)*x[0]**o+(0.852863814785)*x[0]+(0.259483951249)*x[1]**o+(-0.519288864163)*x[1]+(-0.305772267727)*x[2]**o+(-0.401384318883)*x[2]
-        arg[1,4,1,1]=(0.194889815352)*x[0]**o+(0.522093986804)*x[0]+(-0.343320977396)*x[1]**o+(0.21840236597)*x[1]+(-0.672107409136)*x[2]**o+(-0.600203805002)*x[2]
-        arg[1,4,2,0]=(0.420860556361)*x[0]**o+(0.789879869049)*x[0]+(0.100987805744)*x[1]**o+(0.802794815123)*x[1]+(-0.69466030201)*x[2]**o+(-0.746043845966)*x[2]
-        arg[1,4,2,1]=(-0.306621579211)*x[0]**o+(-0.0676982346933)*x[0]+(0.568861573715)*x[1]**o+(0.0823366334578)*x[1]+(0.501187255641)*x[2]**o+(-0.538615164478)*x[2]
-        arg[2,0,0,0]=(-0.231052916706)*x[0]**o+(0.127790831537)*x[0]+(-0.475600435038)*x[1]**o+(0.431586151473)*x[1]+(-0.882365547235)*x[2]**o+(0.778027701879)*x[2]
-        arg[2,0,0,1]=(0.0709490835498)*x[0]**o+(0.442614693755)*x[0]+(0.870405247692)*x[1]**o+(-0.648538779515)*x[1]+(0.751107652054)*x[2]**o+(0.0122956931127)*x[2]
-        arg[2,0,1,0]=(0.703128329145)*x[0]**o+(0.259775843631)*x[0]+(0.311958888594)*x[1]**o+(-0.0445092402277)*x[1]+(0.338222457799)*x[2]**o+(0.845995300456)*x[2]
-        arg[2,0,1,1]=(-0.653977898919)*x[0]**o+(0.0495539350857)*x[0]+(0.4013623408)*x[1]**o+(0.490747039887)*x[1]+(-0.480487636729)*x[2]**o+(0.361660115775)*x[2]
-        arg[2,0,2,0]=(0.215778506945)*x[0]**o+(0.316853875053)*x[0]+(0.556770639829)*x[1]**o+(-0.499729882355)*x[1]+(0.692012327582)*x[2]**o+(0.00681314946195)*x[2]
-        arg[2,0,2,1]=(0.432077857223)*x[0]**o+(-0.0497579036988)*x[0]+(-0.465403408565)*x[1]**o+(0.125421502956)*x[1]+(-0.313541879877)*x[2]**o+(0.113957941731)*x[2]
-        arg[2,1,0,0]=(-0.528126103192)*x[0]**o+(-0.141306512096)*x[0]+(-0.505835313198)*x[1]**o+(-0.0433171534408)*x[1]+(-0.522465687628)*x[2]**o+(-0.16728285732)*x[2]
-        arg[2,1,0,1]=(0.892019660948)*x[0]**o+(0.646944130193)*x[0]+(0.865495756748)*x[1]**o+(0.949095276008)*x[1]+(0.786394755068)*x[2]**o+(0.482441081687)*x[2]
-        arg[2,1,1,0]=(-0.0485295711204)*x[0]**o+(0.250163927911)*x[0]+(0.0387861125998)*x[1]**o+(-0.0789121929817)*x[1]+(-0.982330126583)*x[2]**o+(0.66328870814)*x[2]
-        arg[2,1,1,1]=(-0.494726556678)*x[0]**o+(-0.961342091528)*x[0]+(0.211410563083)*x[1]**o+(-0.884287887286)*x[1]+(-0.583401908135)*x[2]**o+(-0.361423905219)*x[2]
-        arg[2,1,2,0]=(-0.326785246692)*x[0]**o+(0.596272945325)*x[0]+(0.625039539234)*x[1]**o+(0.88699688986)*x[1]+(-0.649803810419)*x[2]**o+(0.890718271469)*x[2]
-        arg[2,1,2,1]=(0.702110072391)*x[0]**o+(0.72009439563)*x[0]+(-0.930941572511)*x[1]**o+(0.955877158334)*x[1]+(0.1211281332)*x[2]**o+(0.658738626852)*x[2]
-        arg[2,2,0,0]=(-0.177402589697)*x[0]**o+(0.701090894256)*x[0]+(-0.00205333079339)*x[1]**o+(-0.427862310859)*x[1]+(0.529186374803)*x[2]**o+(-0.110462035551)*x[2]
-        arg[2,2,0,1]=(-0.104112165367)*x[0]**o+(0.043539351452)*x[0]+(0.757384935306)*x[1]**o+(-0.451086492844)*x[1]+(0.0549627297033)*x[2]**o+(-0.311718955315)*x[2]
-        arg[2,2,1,0]=(-0.579986090808)*x[0]**o+(-0.922872917924)*x[0]+(0.66422700207)*x[1]**o+(0.947304780214)*x[1]+(-0.0492553517704)*x[2]**o+(0.817225619153)*x[2]
-        arg[2,2,1,1]=(0.306298476233)*x[0]**o+(-0.620190960783)*x[0]+(-0.684876074013)*x[1]**o+(-0.371829616982)*x[1]+(0.904709743321)*x[2]**o+(0.170802273852)*x[2]
-        arg[2,2,2,0]=(0.317943399758)*x[0]**o+(0.518026054212)*x[0]+(-0.801462311167)*x[1]**o+(0.767424157898)*x[1]+(-0.547271995492)*x[2]**o+(-0.912619177188)*x[2]
-        arg[2,2,2,1]=(-0.848711258358)*x[0]**o+(0.456489097468)*x[0]+(-0.310979078367)*x[1]**o+(-0.946717007726)*x[1]+(0.454363833646)*x[2]**o+(-0.715701991077)*x[2]
-        arg[2,3,0,0]=(0.605493533014)*x[0]**o+(0.478437880368)*x[0]+(-0.672727491605)*x[1]**o+(0.831259256009)*x[1]+(-0.434153354239)*x[2]**o+(-0.505363218578)*x[2]
-        arg[2,3,0,1]=(-0.0703539676643)*x[0]**o+(-0.452352344215)*x[0]+(0.0403568720903)*x[1]**o+(0.959415939826)*x[1]+(-0.784519698477)*x[2]**o+(-0.691664442958)*x[2]
-        arg[2,3,1,0]=(0.696353768719)*x[0]**o+(0.295477297618)*x[0]+(0.580540484825)*x[1]**o+(0.098954967023)*x[1]+(-0.547594444517)*x[2]**o+(-0.574783665389)*x[2]
-        arg[2,3,1,1]=(0.997841887408)*x[0]**o+(0.857864040549)*x[0]+(-0.413188343971)*x[1]**o+(0.344770631687)*x[1]+(-0.127257058552)*x[2]**o+(0.132618819456)*x[2]
-        arg[2,3,2,0]=(0.174045751083)*x[0]**o+(0.866724759298)*x[0]+(0.0818516103455)*x[1]**o+(-0.891670609599)*x[1]+(0.982721717044)*x[2]**o+(0.378710155856)*x[2]
-        arg[2,3,2,1]=(0.7760778906)*x[0]**o+(-0.710104290654)*x[0]+(-0.471259845977)*x[1]**o+(-0.791979211724)*x[1]+(-0.845652753706)*x[2]**o+(-0.301795837852)*x[2]
-        arg[2,4,0,0]=(-0.698193658421)*x[0]**o+(-0.831956135385)*x[0]+(-0.442637915133)*x[1]**o+(0.108715813637)*x[1]+(-0.888348149694)*x[2]**o+(-0.90115888496)*x[2]
-        arg[2,4,0,1]=(0.770237705577)*x[0]**o+(0.889304763618)*x[0]+(-0.139196183564)*x[1]**o+(0.332516232239)*x[1]+(-0.0218103253052)*x[2]**o+(-0.368033928854)*x[2]
-        arg[2,4,1,0]=(0.675479351844)*x[0]**o+(0.880998418303)*x[0]+(0.408381837105)*x[1]**o+(0.717402364084)*x[1]+(-0.303902947422)*x[2]**o+(-0.322350049962)*x[2]
-        arg[2,4,1,1]=(-0.480881673289)*x[0]**o+(0.30290141529)*x[0]+(-0.538411390886)*x[1]**o+(0.260090848702)*x[1]+(0.638130764808)*x[2]**o+(0.756338975575)*x[2]
-        arg[2,4,2,0]=(-0.299233221889)*x[0]**o+(-0.26471083761)*x[0]+(0.717191172884)*x[1]**o+(0.488553216118)*x[1]+(0.718956726644)*x[2]**o+(0.370889025703)*x[2]
-        arg[2,4,2,1]=(-0.989020272269)*x[0]**o+(-0.891423884362)*x[0]+(0.486153100693)*x[1]**o+(-0.971171395246)*x[1]+(-0.766942968184)*x[2]**o+(0.728728968862)*x[2]
-        arg[3,0,0,0]=(0.756186246227)*x[0]**o+(0.76507856268)*x[0]+(0.771165000414)*x[1]**o+(0.673968873856)*x[1]+(0.827045846253)*x[2]**o+(-0.788265752412)*x[2]
-        arg[3,0,0,1]=(-0.66925731439)*x[0]**o+(-0.0110127596435)*x[0]+(0.944388255414)*x[1]**o+(-0.613832072486)*x[1]+(0.0977542120724)*x[2]**o+(0.100776856689)*x[2]
-        arg[3,0,1,0]=(0.905138713064)*x[0]**o+(0.673051338153)*x[0]+(0.240614253653)*x[1]**o+(-0.964132330033)*x[1]+(-0.114961018838)*x[2]**o+(-0.438756962988)*x[2]
-        arg[3,0,1,1]=(-0.192259182094)*x[0]**o+(0.12315590119)*x[0]+(-0.907744420226)*x[1]**o+(-0.483981269809)*x[1]+(-0.169699431472)*x[2]**o+(-0.45231635406)*x[2]
-        arg[3,0,2,0]=(0.895387255885)*x[0]**o+(0.23892997411)*x[0]+(-0.396010446618)*x[1]**o+(0.94853984413)*x[1]+(-0.0165259637241)*x[2]**o+(-0.312558539149)*x[2]
-        arg[3,0,2,1]=(0.710478713361)*x[0]**o+(-0.109316102216)*x[0]+(-0.042711568986)*x[1]**o+(-0.448508085742)*x[1]+(-0.0979193346011)*x[2]**o+(0.93156672211)*x[2]
-        arg[3,1,0,0]=(-0.21605108221)*x[0]**o+(0.410466481712)*x[0]+(0.799288386783)*x[1]**o+(0.622866017113)*x[1]+(-0.236698938159)*x[2]**o+(0.246625241928)*x[2]
-        arg[3,1,0,1]=(0.989568527762)*x[0]**o+(0.0212906378151)*x[0]+(0.311279947324)*x[1]**o+(-0.231412902902)*x[1]+(-0.444760786142)*x[2]**o+(0.908171985421)*x[2]
-        arg[3,1,1,0]=(0.42605234231)*x[0]**o+(-0.58629332944)*x[0]+(0.322063640761)*x[1]**o+(0.837771339825)*x[1]+(-0.911083211394)*x[2]**o+(-0.0699607581992)*x[2]
-        arg[3,1,1,1]=(0.75449445591)*x[0]**o+(0.722970800307)*x[0]+(-0.582970919465)*x[1]**o+(-0.868818538212)*x[1]+(0.940067636181)*x[2]**o+(-0.659469743617)*x[2]
-        arg[3,1,2,0]=(-0.391224924663)*x[0]**o+(-0.768173177737)*x[0]+(-0.856876347997)*x[1]**o+(-0.0451180499647)*x[1]+(0.198590679246)*x[2]**o+(0.187329095476)*x[2]
-        arg[3,1,2,1]=(0.483309063092)*x[0]**o+(-0.0777241026893)*x[0]+(0.0438427457286)*x[1]**o+(-0.73195704867)*x[1]+(-0.439660745725)*x[2]**o+(0.279501672861)*x[2]
-        arg[3,2,0,0]=(0.799935089139)*x[0]**o+(-0.306860809857)*x[0]+(0.169104975039)*x[1]**o+(-0.3480717525)*x[1]+(0.215231688)*x[2]**o+(-0.528775376945)*x[2]
-        arg[3,2,0,1]=(0.917815789587)*x[0]**o+(0.0672910338102)*x[0]+(-0.186550440011)*x[1]**o+(0.922579714252)*x[1]+(0.924162379857)*x[2]**o+(-0.769320483618)*x[2]
-        arg[3,2,1,0]=(0.604324468058)*x[0]**o+(-0.0109731419053)*x[0]+(0.229447318325)*x[1]**o+(-0.480693435232)*x[1]+(-0.881779256999)*x[2]**o+(0.288656394771)*x[2]
-        arg[3,2,1,1]=(0.934680723352)*x[0]**o+(0.993838528376)*x[0]+(0.957781588502)*x[1]**o+(-0.859837057866)*x[1]+(-0.702139964493)*x[2]**o+(0.0538177124609)*x[2]
-        arg[3,2,2,0]=(-0.142809047814)*x[0]**o+(-0.472594415134)*x[0]+(0.0381782768377)*x[1]**o+(0.727331491769)*x[1]+(0.0910992897581)*x[2]**o+(-0.845316063851)*x[2]
-        arg[3,2,2,1]=(-0.217483358272)*x[0]**o+(0.991535092285)*x[0]+(-0.399175896468)*x[1]**o+(-0.665836512895)*x[1]+(0.0983700911493)*x[2]**o+(0.321811300155)*x[2]
-        arg[3,3,0,0]=(0.797049585464)*x[0]**o+(-0.724467959299)*x[0]+(0.19971589973)*x[1]**o+(0.845928461864)*x[1]+(-0.365158866359)*x[2]**o+(-0.698274270132)*x[2]
-        arg[3,3,0,1]=(-0.638474704878)*x[0]**o+(0.551866433352)*x[0]+(0.192309452979)*x[1]**o+(-0.703649325501)*x[1]+(0.823910578138)*x[2]**o+(-0.917446989634)*x[2]
-        arg[3,3,1,0]=(0.217577282169)*x[0]**o+(0.521716803668)*x[0]+(-0.116587783856)*x[1]**o+(0.529672391417)*x[1]+(-0.798918158284)*x[2]**o+(-0.0996139511955)*x[2]
-        arg[3,3,1,1]=(0.498965049079)*x[0]**o+(0.316489921186)*x[0]+(-0.0988355471817)*x[1]**o+(-0.0477508287681)*x[1]+(-0.778914523993)*x[2]**o+(0.189397812723)*x[2]
-        arg[3,3,2,0]=(0.203823698152)*x[0]**o+(-0.340499414266)*x[0]+(0.353374693517)*x[1]**o+(-0.91035264494)*x[1]+(-0.779204084198)*x[2]**o+(-0.00276454165248)*x[2]
-        arg[3,3,2,1]=(0.295232007123)*x[0]**o+(0.271766544502)*x[0]+(0.431956430336)*x[1]**o+(0.896481311536)*x[1]+(-0.325014902487)*x[2]**o+(0.70836170284)*x[2]
-        arg[3,4,0,0]=(-0.407535202468)*x[0]**o+(-0.33055681091)*x[0]+(0.129762143151)*x[1]**o+(0.352087436228)*x[1]+(-0.538770401565)*x[2]**o+(-0.519071077045)*x[2]
-        arg[3,4,0,1]=(0.846011435499)*x[0]**o+(0.172822133672)*x[0]+(-0.740732553847)*x[1]**o+(0.230062837231)*x[1]+(-0.231810007237)*x[2]**o+(-0.568366338923)*x[2]
-        arg[3,4,1,0]=(-0.198091119057)*x[0]**o+(0.957989508794)*x[0]+(0.861739071175)*x[1]**o+(0.923450697883)*x[1]+(-0.755262504937)*x[2]**o+(0.102897579936)*x[2]
-        arg[3,4,1,1]=(0.198829545353)*x[0]**o+(-0.757182006818)*x[0]+(0.254092337808)*x[1]**o+(-0.00815072620097)*x[1]+(0.347421988308)*x[2]**o+(-0.0215277616923)*x[2]
-        arg[3,4,2,0]=(0.775062112529)*x[0]**o+(-0.77746792774)*x[0]+(-0.666490294869)*x[1]**o+(-0.679971069878)*x[1]+(-0.972450779894)*x[2]**o+(-0.705322282477)*x[2]
-        arg[3,4,2,1]=(-0.0994927587382)*x[0]**o+(0.293071774786)*x[0]+(0.370784399397)*x[1]**o+(0.931411225946)*x[1]+(-0.55789163294)*x[2]**o+(0.0831890658592)*x[2]
-        ref[0,0,0,0]=(-0.657703355307)*x_ref[0]**o+(0.397813831843)*x_ref[0]+(0.364460538717)*x_ref[1]**o+(-0.845626669617)*x_ref[1]+(-0.987144254126)*x_ref[2]**o+(-0.732384980726)*x_ref[2]
-        ref[0,0,0,1]=(-0.13280304886)*x_ref[0]**o+(-0.953796807758)*x_ref[0]+(0.875723746654)*x_ref[1]**o+(0.0764745117242)*x_ref[1]+(-0.536085676221)*x_ref[2]**o+(-0.520611959678)*x_ref[2]
-        ref[0,0,1,0]=(0.716429446578)*x_ref[0]**o+(-0.729164693441)*x_ref[0]+(-0.832505557428)*x_ref[1]**o+(-0.329200605611)*x_ref[1]+(0.0310162060964)*x_ref[2]**o+(-0.869978941999)*x_ref[2]
-        ref[0,0,1,1]=(0.110253530584)*x_ref[0]**o+(0.995528486822)*x_ref[0]+(0.838577797395)*x_ref[1]**o+(0.443987752225)*x_ref[1]+(0.387337959057)*x_ref[2]**o+(0.548448752612)*x_ref[2]
-        ref[0,0,2,0]=(-0.995737515431)*x_ref[0]**o+(-0.899807241717)*x_ref[0]+(-0.0803287764138)*x_ref[1]**o+(0.242680051556)*x_ref[1]+(0.58974836823)*x_ref[2]**o+(-0.498450188944)*x_ref[2]
-        ref[0,0,2,1]=(0.341561541555)*x_ref[0]**o+(-0.00541988184597)*x_ref[0]+(-0.204832898701)*x_ref[1]**o+(-0.957247935865)*x_ref[1]+(-0.441002902064)*x_ref[2]**o+(0.756843480304)*x_ref[2]
-        ref[0,1,0,0]=(0.136201526244)*x_ref[0]**o+(0.517677304193)*x_ref[0]+(0.523031610748)*x_ref[1]**o+(-0.908998053383)*x_ref[1]+(-0.629649678416)*x_ref[2]**o+(0.762977917512)*x_ref[2]
-        ref[0,1,0,1]=(-0.103521080864)*x_ref[0]**o+(-0.434410222595)*x_ref[0]+(0.418239530241)*x_ref[1]**o+(0.65638475119)*x_ref[1]+(0.413036393129)*x_ref[2]**o+(-0.220365518353)*x_ref[2]
-        ref[0,1,1,0]=(-0.415690201483)*x_ref[0]**o+(-0.969323394689)*x_ref[0]+(-0.295639420195)*x_ref[1]**o+(-0.24915002749)*x_ref[1]+(-0.00927627101467)*x_ref[2]**o+(0.520335261634)*x_ref[2]
-        ref[0,1,1,1]=(-0.262653741797)*x_ref[0]**o+(-0.463590591666)*x_ref[0]+(0.568893042923)*x_ref[1]**o+(-0.869851332898)*x_ref[1]+(-0.463261399415)*x_ref[2]**o+(0.0281915686202)*x_ref[2]
-        ref[0,1,2,0]=(0.377159503058)*x_ref[0]**o+(0.484512261943)*x_ref[0]+(0.0303594628925)*x_ref[1]**o+(0.482051243004)*x_ref[1]+(0.240643013949)*x_ref[2]**o+(-0.943908617705)*x_ref[2]
-        ref[0,1,2,1]=(0.843854614097)*x_ref[0]**o+(0.018041534553)*x_ref[0]+(0.264198703361)*x_ref[1]**o+(0.732889517628)*x_ref[1]+(-0.154807384394)*x_ref[2]**o+(0.60513622187)*x_ref[2]
-        ref[0,2,0,0]=(-0.234758118286)*x_ref[0]**o+(-0.77807396119)*x_ref[0]+(-0.97783091103)*x_ref[1]**o+(-0.716185223828)*x_ref[1]+(-0.573126474259)*x_ref[2]**o+(0.403110701555)*x_ref[2]
-        ref[0,2,0,1]=(-0.853878344804)*x_ref[0]**o+(-0.482644826561)*x_ref[0]+(-0.826041149012)*x_ref[1]**o+(0.596376234798)*x_ref[1]+(-0.216400517274)*x_ref[2]**o+(-0.323127194259)*x_ref[2]
-        ref[0,2,1,0]=(0.931551121492)*x_ref[0]**o+(-0.527132174379)*x_ref[0]+(0.373496704463)*x_ref[1]**o+(-0.375215826463)*x_ref[1]+(-0.639167297984)*x_ref[2]**o+(0.143608733189)*x_ref[2]
-        ref[0,2,1,1]=(-0.982206000879)*x_ref[0]**o+(0.836589596534)*x_ref[0]+(0.606275000138)*x_ref[1]**o+(-0.821469453892)*x_ref[1]+(-0.633828380948)*x_ref[2]**o+(-0.637688777216)*x_ref[2]
-        ref[0,2,2,0]=(0.441649557529)*x_ref[0]**o+(-0.34978365051)*x_ref[0]+(0.514175365405)*x_ref[1]**o+(-0.903212271234)*x_ref[1]+(0.70236887156)*x_ref[2]**o+(0.72953045189)*x_ref[2]
-        ref[0,2,2,1]=(0.302787896978)*x_ref[0]**o+(0.157598071021)*x_ref[0]+(-0.357101947632)*x_ref[1]**o+(0.381098383156)*x_ref[1]+(-0.552546036689)*x_ref[2]**o+(0.448181721984)*x_ref[2]
-        ref[0,3,0,0]=(0.662181077399)*x_ref[0]**o+(-0.283755239518)*x_ref[0]+(0.33694741278)*x_ref[1]**o+(0.275801685868)*x_ref[1]+(0.526155259101)*x_ref[2]**o+(-0.378241855559)*x_ref[2]
-        ref[0,3,0,1]=(0.157822133581)*x_ref[0]**o+(0.25402072747)*x_ref[0]+(0.522842123099)*x_ref[1]**o+(0.510595773584)*x_ref[1]+(-0.829239126666)*x_ref[2]**o+(0.990879342044)*x_ref[2]
-        ref[0,3,1,0]=(-0.775925280059)*x_ref[0]**o+(-0.726971388023)*x_ref[0]+(-0.630088730753)*x_ref[1]**o+(-0.731024178237)*x_ref[1]+(-0.288643541196)*x_ref[2]**o+(-0.283708428793)*x_ref[2]
-        ref[0,3,1,1]=(-0.883176640445)*x_ref[0]**o+(-0.0810211976762)*x_ref[0]+(-0.102919217784)*x_ref[1]**o+(0.271384866385)*x_ref[1]+(0.980796900477)*x_ref[2]**o+(0.439294038672)*x_ref[2]
-        ref[0,3,2,0]=(-0.826688221502)*x_ref[0]**o+(-0.909388347347)*x_ref[0]+(0.164406927722)*x_ref[1]**o+(0.60157189364)*x_ref[1]+(-0.885578176748)*x_ref[2]**o+(0.610008674247)*x_ref[2]
-        ref[0,3,2,1]=(0.130154197193)*x_ref[0]**o+(-0.754703602975)*x_ref[0]+(0.00463710497017)*x_ref[1]**o+(0.502162916123)*x_ref[1]+(-0.749124548541)*x_ref[2]**o+(0.946592962092)*x_ref[2]
-        ref[0,4,0,0]=(-0.0478347448906)*x_ref[0]**o+(-0.812937871882)*x_ref[0]+(-0.460982012551)*x_ref[1]**o+(0.317485998991)*x_ref[1]+(-0.593671683477)*x_ref[2]**o+(0.551385718668)*x_ref[2]
-        ref[0,4,0,1]=(0.281998767502)*x_ref[0]**o+(-0.0613830311997)*x_ref[0]+(0.981429151019)*x_ref[1]**o+(-0.580567714008)*x_ref[1]+(0.0369483005331)*x_ref[2]**o+(-0.74132358588)*x_ref[2]
-        ref[0,4,1,0]=(0.525845217483)*x_ref[0]**o+(0.907803915216)*x_ref[0]+(0.111429079263)*x_ref[1]**o+(-0.653030401377)*x_ref[1]+(0.0814793913696)*x_ref[2]**o+(-0.419201413875)*x_ref[2]
-        ref[0,4,1,1]=(0.862892518463)*x_ref[0]**o+(0.34033875398)*x_ref[0]+(0.0371376953103)*x_ref[1]**o+(0.568160310726)*x_ref[1]+(-0.237231036717)*x_ref[2]**o+(-0.130046899302)*x_ref[2]
-        ref[0,4,2,0]=(0.223651181698)*x_ref[0]**o+(0.730991398203)*x_ref[0]+(0.133551525027)*x_ref[1]**o+(0.685783540126)*x_ref[1]+(0.339586395814)*x_ref[2]**o+(-0.524371194863)*x_ref[2]
-        ref[0,4,2,1]=(0.220110871383)*x_ref[0]**o+(-0.37385773877)*x_ref[0]+(0.773372000545)*x_ref[1]**o+(-0.4261356565)*x_ref[1]+(-0.619438438945)*x_ref[2]**o+(0.126288949127)*x_ref[2]
-        ref[1,0,0,0]=(0.727680196631)*x_ref[0]**o+(-0.876280912599)*x_ref[0]+(0.576553782915)*x_ref[1]**o+(-0.0497780322367)*x_ref[1]+(-0.690257457282)*x_ref[2]**o+(-0.11130953054)*x_ref[2]
-        ref[1,0,0,1]=(0.331863815938)*x_ref[0]**o+(0.169379824389)*x_ref[0]+(0.665507756012)*x_ref[1]**o+(0.94933357273)*x_ref[1]+(-0.610506070093)*x_ref[2]**o+(0.752476708027)*x_ref[2]
-        ref[1,0,1,0]=(0.851320583415)*x_ref[0]**o+(-0.697235996161)*x_ref[0]+(0.235192165807)*x_ref[1]**o+(0.325473517022)*x_ref[1]+(-0.424683549673)*x_ref[2]**o+(0.228953796486)*x_ref[2]
-        ref[1,0,1,1]=(0.804192098517)*x_ref[0]**o+(-0.684337197059)*x_ref[0]+(-0.349251615715)*x_ref[1]**o+(0.596165705743)*x_ref[1]+(-0.636033221182)*x_ref[2]**o+(-0.304367076307)*x_ref[2]
-        ref[1,0,2,0]=(-0.237305477187)*x_ref[0]**o+(-0.997679652719)*x_ref[0]+(0.485994068389)*x_ref[1]**o+(0.44508530534)*x_ref[1]+(0.940139935628)*x_ref[2]**o+(0.0789221540062)*x_ref[2]
-        ref[1,0,2,1]=(0.814928463364)*x_ref[0]**o+(-0.257693939789)*x_ref[0]+(0.179643785703)*x_ref[1]**o+(-0.696436530567)*x_ref[1]+(-0.592226945554)*x_ref[2]**o+(-0.454620411499)*x_ref[2]
-        ref[1,1,0,0]=(-0.933925672439)*x_ref[0]**o+(0.212298180817)*x_ref[0]+(-0.447836316801)*x_ref[1]**o+(0.180796376138)*x_ref[1]+(-0.749910125701)*x_ref[2]**o+(0.134540433851)*x_ref[2]
-        ref[1,1,0,1]=(-0.649009346978)*x_ref[0]**o+(0.0316819485953)*x_ref[0]+(-0.718001767835)*x_ref[1]**o+(0.289608435124)*x_ref[1]+(-0.906045493384)*x_ref[2]**o+(0.851021484125)*x_ref[2]
-        ref[1,1,1,0]=(-0.216265404566)*x_ref[0]**o+(0.657073282172)*x_ref[0]+(-0.796155541438)*x_ref[1]**o+(0.338980498824)*x_ref[1]+(0.477444448193)*x_ref[2]**o+(0.674278909522)*x_ref[2]
-        ref[1,1,1,1]=(-0.67605942954)*x_ref[0]**o+(0.457997253216)*x_ref[0]+(-0.973576381948)*x_ref[1]**o+(0.430432753773)*x_ref[1]+(0.0329169564451)*x_ref[2]**o+(-0.422512702485)*x_ref[2]
-        ref[1,1,2,0]=(-0.32458256139)*x_ref[0]**o+(0.289568625922)*x_ref[0]+(-0.529564027476)*x_ref[1]**o+(0.596449833118)*x_ref[1]+(0.960461031989)*x_ref[2]**o+(0.00801425321069)*x_ref[2]
-        ref[1,1,2,1]=(-0.0425883615923)*x_ref[0]**o+(-0.313926807333)*x_ref[0]+(0.766062773671)*x_ref[1]**o+(-0.857784560309)*x_ref[1]+(0.914867381682)*x_ref[2]**o+(-0.312493334639)*x_ref[2]
-        ref[1,2,0,0]=(-0.637151767355)*x_ref[0]**o+(-0.679947136952)*x_ref[0]+(-0.0838349105494)*x_ref[1]**o+(0.00800835879666)*x_ref[1]+(0.385024194519)*x_ref[2]**o+(-0.627828236571)*x_ref[2]
-        ref[1,2,0,1]=(-0.62580153007)*x_ref[0]**o+(-0.183834415542)*x_ref[0]+(0.322406823575)*x_ref[1]**o+(0.302908755868)*x_ref[1]+(0.727234001542)*x_ref[2]**o+(-0.933944878425)*x_ref[2]
-        ref[1,2,1,0]=(-0.897198312615)*x_ref[0]**o+(0.825086526945)*x_ref[0]+(-0.031001758991)*x_ref[1]**o+(0.987845551304)*x_ref[1]+(-0.551212418179)*x_ref[2]**o+(0.657813241764)*x_ref[2]
-        ref[1,2,1,1]=(-0.544595822278)*x_ref[0]**o+(0.595858429591)*x_ref[0]+(-0.557503238514)*x_ref[1]**o+(0.507560179011)*x_ref[1]+(-0.519438270771)*x_ref[2]**o+(-0.471678264995)*x_ref[2]
-        ref[1,2,2,0]=(0.135616278099)*x_ref[0]**o+(0.40676743342)*x_ref[0]+(0.458810719213)*x_ref[1]**o+(-0.881620410228)*x_ref[1]+(-0.897267732846)*x_ref[2]**o+(0.665458992487)*x_ref[2]
-        ref[1,2,2,1]=(0.83854610457)*x_ref[0]**o+(0.670263196782)*x_ref[0]+(0.551767734306)*x_ref[1]**o+(0.883934821215)*x_ref[1]+(0.455375261768)*x_ref[2]**o+(0.95604480045)*x_ref[2]
-        ref[1,3,0,0]=(0.705853698882)*x_ref[0]**o+(0.84681314245)*x_ref[0]+(-0.0984020252408)*x_ref[1]**o+(0.943165990555)*x_ref[1]+(-0.428955841327)*x_ref[2]**o+(0.0961618993003)*x_ref[2]
-        ref[1,3,0,1]=(0.583731800337)*x_ref[0]**o+(-0.738079255003)*x_ref[0]+(0.315556768944)*x_ref[1]**o+(-0.489631118687)*x_ref[1]+(0.371775779104)*x_ref[2]**o+(0.82029490872)*x_ref[2]
-        ref[1,3,1,0]=(-0.885657545142)*x_ref[0]**o+(0.542706113286)*x_ref[0]+(0.800319452136)*x_ref[1]**o+(0.314194184897)*x_ref[1]+(-0.320905532427)*x_ref[2]**o+(-0.314307365683)*x_ref[2]
-        ref[1,3,1,1]=(-0.217030771566)*x_ref[0]**o+(0.260108519031)*x_ref[0]+(-0.686624725975)*x_ref[1]**o+(-0.869322439609)*x_ref[1]+(0.558806239315)*x_ref[2]**o+(-0.440661121246)*x_ref[2]
-        ref[1,3,2,0]=(-0.839335541382)*x_ref[0]**o+(0.228726621639)*x_ref[0]+(0.354403444002)*x_ref[1]**o+(0.215616048959)*x_ref[1]+(0.49622647562)*x_ref[2]**o+(-0.725639112729)*x_ref[2]
-        ref[1,3,2,1]=(-0.439687404632)*x_ref[0]**o+(-0.820583921269)*x_ref[0]+(-0.863730409631)*x_ref[1]**o+(0.119773401911)*x_ref[1]+(0.460158483187)*x_ref[2]**o+(0.757153436592)*x_ref[2]
-        ref[1,4,0,0]=(-0.77288839701)*x_ref[0]**o+(-0.570203714622)*x_ref[0]+(0.93832772305)*x_ref[1]**o+(-0.759089944596)*x_ref[1]+(0.000174937961704)*x_ref[2]**o+(0.812917484286)*x_ref[2]
-        ref[1,4,0,1]=(-0.25535378432)*x_ref[0]**o+(-0.0938207170929)*x_ref[0]+(0.0545321717685)*x_ref[1]**o+(-0.414414792674)*x_ref[1]+(-0.297698896712)*x_ref[2]**o+(-0.367166660571)*x_ref[2]
-        ref[1,4,1,0]=(0.743408112248)*x_ref[0]**o+(0.852863814785)*x_ref[0]+(0.259483951249)*x_ref[1]**o+(-0.519288864163)*x_ref[1]+(-0.305772267727)*x_ref[2]**o+(-0.401384318883)*x_ref[2]
-        ref[1,4,1,1]=(0.194889815352)*x_ref[0]**o+(0.522093986804)*x_ref[0]+(-0.343320977396)*x_ref[1]**o+(0.21840236597)*x_ref[1]+(-0.672107409136)*x_ref[2]**o+(-0.600203805002)*x_ref[2]
-        ref[1,4,2,0]=(0.420860556361)*x_ref[0]**o+(0.789879869049)*x_ref[0]+(0.100987805744)*x_ref[1]**o+(0.802794815123)*x_ref[1]+(-0.69466030201)*x_ref[2]**o+(-0.746043845966)*x_ref[2]
-        ref[1,4,2,1]=(-0.306621579211)*x_ref[0]**o+(-0.0676982346933)*x_ref[0]+(0.568861573715)*x_ref[1]**o+(0.0823366334578)*x_ref[1]+(0.501187255641)*x_ref[2]**o+(-0.538615164478)*x_ref[2]
-        ref[2,0,0,0]=(-0.231052916706)*x_ref[0]**o+(0.127790831537)*x_ref[0]+(-0.475600435038)*x_ref[1]**o+(0.431586151473)*x_ref[1]+(-0.882365547235)*x_ref[2]**o+(0.778027701879)*x_ref[2]
-        ref[2,0,0,1]=(0.0709490835498)*x_ref[0]**o+(0.442614693755)*x_ref[0]+(0.870405247692)*x_ref[1]**o+(-0.648538779515)*x_ref[1]+(0.751107652054)*x_ref[2]**o+(0.0122956931127)*x_ref[2]
-        ref[2,0,1,0]=(0.703128329145)*x_ref[0]**o+(0.259775843631)*x_ref[0]+(0.311958888594)*x_ref[1]**o+(-0.0445092402277)*x_ref[1]+(0.338222457799)*x_ref[2]**o+(0.845995300456)*x_ref[2]
-        ref[2,0,1,1]=(-0.653977898919)*x_ref[0]**o+(0.0495539350857)*x_ref[0]+(0.4013623408)*x_ref[1]**o+(0.490747039887)*x_ref[1]+(-0.480487636729)*x_ref[2]**o+(0.361660115775)*x_ref[2]
-        ref[2,0,2,0]=(0.215778506945)*x_ref[0]**o+(0.316853875053)*x_ref[0]+(0.556770639829)*x_ref[1]**o+(-0.499729882355)*x_ref[1]+(0.692012327582)*x_ref[2]**o+(0.00681314946195)*x_ref[2]
-        ref[2,0,2,1]=(0.432077857223)*x_ref[0]**o+(-0.0497579036988)*x_ref[0]+(-0.465403408565)*x_ref[1]**o+(0.125421502956)*x_ref[1]+(-0.313541879877)*x_ref[2]**o+(0.113957941731)*x_ref[2]
-        ref[2,1,0,0]=(-0.528126103192)*x_ref[0]**o+(-0.141306512096)*x_ref[0]+(-0.505835313198)*x_ref[1]**o+(-0.0433171534408)*x_ref[1]+(-0.522465687628)*x_ref[2]**o+(-0.16728285732)*x_ref[2]
-        ref[2,1,0,1]=(0.892019660948)*x_ref[0]**o+(0.646944130193)*x_ref[0]+(0.865495756748)*x_ref[1]**o+(0.949095276008)*x_ref[1]+(0.786394755068)*x_ref[2]**o+(0.482441081687)*x_ref[2]
-        ref[2,1,1,0]=(-0.0485295711204)*x_ref[0]**o+(0.250163927911)*x_ref[0]+(0.0387861125998)*x_ref[1]**o+(-0.0789121929817)*x_ref[1]+(-0.982330126583)*x_ref[2]**o+(0.66328870814)*x_ref[2]
-        ref[2,1,1,1]=(-0.494726556678)*x_ref[0]**o+(-0.961342091528)*x_ref[0]+(0.211410563083)*x_ref[1]**o+(-0.884287887286)*x_ref[1]+(-0.583401908135)*x_ref[2]**o+(-0.361423905219)*x_ref[2]
-        ref[2,1,2,0]=(-0.326785246692)*x_ref[0]**o+(0.596272945325)*x_ref[0]+(0.625039539234)*x_ref[1]**o+(0.88699688986)*x_ref[1]+(-0.649803810419)*x_ref[2]**o+(0.890718271469)*x_ref[2]
-        ref[2,1,2,1]=(0.702110072391)*x_ref[0]**o+(0.72009439563)*x_ref[0]+(-0.930941572511)*x_ref[1]**o+(0.955877158334)*x_ref[1]+(0.1211281332)*x_ref[2]**o+(0.658738626852)*x_ref[2]
-        ref[2,2,0,0]=(-0.177402589697)*x_ref[0]**o+(0.701090894256)*x_ref[0]+(-0.00205333079339)*x_ref[1]**o+(-0.427862310859)*x_ref[1]+(0.529186374803)*x_ref[2]**o+(-0.110462035551)*x_ref[2]
-        ref[2,2,0,1]=(-0.104112165367)*x_ref[0]**o+(0.043539351452)*x_ref[0]+(0.757384935306)*x_ref[1]**o+(-0.451086492844)*x_ref[1]+(0.0549627297033)*x_ref[2]**o+(-0.311718955315)*x_ref[2]
-        ref[2,2,1,0]=(-0.579986090808)*x_ref[0]**o+(-0.922872917924)*x_ref[0]+(0.66422700207)*x_ref[1]**o+(0.947304780214)*x_ref[1]+(-0.0492553517704)*x_ref[2]**o+(0.817225619153)*x_ref[2]
-        ref[2,2,1,1]=(0.306298476233)*x_ref[0]**o+(-0.620190960783)*x_ref[0]+(-0.684876074013)*x_ref[1]**o+(-0.371829616982)*x_ref[1]+(0.904709743321)*x_ref[2]**o+(0.170802273852)*x_ref[2]
-        ref[2,2,2,0]=(0.317943399758)*x_ref[0]**o+(0.518026054212)*x_ref[0]+(-0.801462311167)*x_ref[1]**o+(0.767424157898)*x_ref[1]+(-0.547271995492)*x_ref[2]**o+(-0.912619177188)*x_ref[2]
-        ref[2,2,2,1]=(-0.848711258358)*x_ref[0]**o+(0.456489097468)*x_ref[0]+(-0.310979078367)*x_ref[1]**o+(-0.946717007726)*x_ref[1]+(0.454363833646)*x_ref[2]**o+(-0.715701991077)*x_ref[2]
-        ref[2,3,0,0]=(0.605493533014)*x_ref[0]**o+(0.478437880368)*x_ref[0]+(-0.672727491605)*x_ref[1]**o+(0.831259256009)*x_ref[1]+(-0.434153354239)*x_ref[2]**o+(-0.505363218578)*x_ref[2]
-        ref[2,3,0,1]=(-0.0703539676643)*x_ref[0]**o+(-0.452352344215)*x_ref[0]+(0.0403568720903)*x_ref[1]**o+(0.959415939826)*x_ref[1]+(-0.784519698477)*x_ref[2]**o+(-0.691664442958)*x_ref[2]
-        ref[2,3,1,0]=(0.696353768719)*x_ref[0]**o+(0.295477297618)*x_ref[0]+(0.580540484825)*x_ref[1]**o+(0.098954967023)*x_ref[1]+(-0.547594444517)*x_ref[2]**o+(-0.574783665389)*x_ref[2]
-        ref[2,3,1,1]=(0.997841887408)*x_ref[0]**o+(0.857864040549)*x_ref[0]+(-0.413188343971)*x_ref[1]**o+(0.344770631687)*x_ref[1]+(-0.127257058552)*x_ref[2]**o+(0.132618819456)*x_ref[2]
-        ref[2,3,2,0]=(0.174045751083)*x_ref[0]**o+(0.866724759298)*x_ref[0]+(0.0818516103455)*x_ref[1]**o+(-0.891670609599)*x_ref[1]+(0.982721717044)*x_ref[2]**o+(0.378710155856)*x_ref[2]
-        ref[2,3,2,1]=(0.7760778906)*x_ref[0]**o+(-0.710104290654)*x_ref[0]+(-0.471259845977)*x_ref[1]**o+(-0.791979211724)*x_ref[1]+(-0.845652753706)*x_ref[2]**o+(-0.301795837852)*x_ref[2]
-        ref[2,4,0,0]=(-0.698193658421)*x_ref[0]**o+(-0.831956135385)*x_ref[0]+(-0.442637915133)*x_ref[1]**o+(0.108715813637)*x_ref[1]+(-0.888348149694)*x_ref[2]**o+(-0.90115888496)*x_ref[2]
-        ref[2,4,0,1]=(0.770237705577)*x_ref[0]**o+(0.889304763618)*x_ref[0]+(-0.139196183564)*x_ref[1]**o+(0.332516232239)*x_ref[1]+(-0.0218103253052)*x_ref[2]**o+(-0.368033928854)*x_ref[2]
-        ref[2,4,1,0]=(0.675479351844)*x_ref[0]**o+(0.880998418303)*x_ref[0]+(0.408381837105)*x_ref[1]**o+(0.717402364084)*x_ref[1]+(-0.303902947422)*x_ref[2]**o+(-0.322350049962)*x_ref[2]
-        ref[2,4,1,1]=(-0.480881673289)*x_ref[0]**o+(0.30290141529)*x_ref[0]+(-0.538411390886)*x_ref[1]**o+(0.260090848702)*x_ref[1]+(0.638130764808)*x_ref[2]**o+(0.756338975575)*x_ref[2]
-        ref[2,4,2,0]=(-0.299233221889)*x_ref[0]**o+(-0.26471083761)*x_ref[0]+(0.717191172884)*x_ref[1]**o+(0.488553216118)*x_ref[1]+(0.718956726644)*x_ref[2]**o+(0.370889025703)*x_ref[2]
-        ref[2,4,2,1]=(-0.989020272269)*x_ref[0]**o+(-0.891423884362)*x_ref[0]+(0.486153100693)*x_ref[1]**o+(-0.971171395246)*x_ref[1]+(-0.766942968184)*x_ref[2]**o+(0.728728968862)*x_ref[2]
-        ref[3,0,0,0]=(0.756186246227)*x_ref[0]**o+(0.76507856268)*x_ref[0]+(0.771165000414)*x_ref[1]**o+(0.673968873856)*x_ref[1]+(0.827045846253)*x_ref[2]**o+(-0.788265752412)*x_ref[2]
-        ref[3,0,0,1]=(-0.66925731439)*x_ref[0]**o+(-0.0110127596435)*x_ref[0]+(0.944388255414)*x_ref[1]**o+(-0.613832072486)*x_ref[1]+(0.0977542120724)*x_ref[2]**o+(0.100776856689)*x_ref[2]
-        ref[3,0,1,0]=(0.905138713064)*x_ref[0]**o+(0.673051338153)*x_ref[0]+(0.240614253653)*x_ref[1]**o+(-0.964132330033)*x_ref[1]+(-0.114961018838)*x_ref[2]**o+(-0.438756962988)*x_ref[2]
-        ref[3,0,1,1]=(-0.192259182094)*x_ref[0]**o+(0.12315590119)*x_ref[0]+(-0.907744420226)*x_ref[1]**o+(-0.483981269809)*x_ref[1]+(-0.169699431472)*x_ref[2]**o+(-0.45231635406)*x_ref[2]
-        ref[3,0,2,0]=(0.895387255885)*x_ref[0]**o+(0.23892997411)*x_ref[0]+(-0.396010446618)*x_ref[1]**o+(0.94853984413)*x_ref[1]+(-0.0165259637241)*x_ref[2]**o+(-0.312558539149)*x_ref[2]
-        ref[3,0,2,1]=(0.710478713361)*x_ref[0]**o+(-0.109316102216)*x_ref[0]+(-0.042711568986)*x_ref[1]**o+(-0.448508085742)*x_ref[1]+(-0.0979193346011)*x_ref[2]**o+(0.93156672211)*x_ref[2]
-        ref[3,1,0,0]=(-0.21605108221)*x_ref[0]**o+(0.410466481712)*x_ref[0]+(0.799288386783)*x_ref[1]**o+(0.622866017113)*x_ref[1]+(-0.236698938159)*x_ref[2]**o+(0.246625241928)*x_ref[2]
-        ref[3,1,0,1]=(0.989568527762)*x_ref[0]**o+(0.0212906378151)*x_ref[0]+(0.311279947324)*x_ref[1]**o+(-0.231412902902)*x_ref[1]+(-0.444760786142)*x_ref[2]**o+(0.908171985421)*x_ref[2]
-        ref[3,1,1,0]=(0.42605234231)*x_ref[0]**o+(-0.58629332944)*x_ref[0]+(0.322063640761)*x_ref[1]**o+(0.837771339825)*x_ref[1]+(-0.911083211394)*x_ref[2]**o+(-0.0699607581992)*x_ref[2]
-        ref[3,1,1,1]=(0.75449445591)*x_ref[0]**o+(0.722970800307)*x_ref[0]+(-0.582970919465)*x_ref[1]**o+(-0.868818538212)*x_ref[1]+(0.940067636181)*x_ref[2]**o+(-0.659469743617)*x_ref[2]
-        ref[3,1,2,0]=(-0.391224924663)*x_ref[0]**o+(-0.768173177737)*x_ref[0]+(-0.856876347997)*x_ref[1]**o+(-0.0451180499647)*x_ref[1]+(0.198590679246)*x_ref[2]**o+(0.187329095476)*x_ref[2]
-        ref[3,1,2,1]=(0.483309063092)*x_ref[0]**o+(-0.0777241026893)*x_ref[0]+(0.0438427457286)*x_ref[1]**o+(-0.73195704867)*x_ref[1]+(-0.439660745725)*x_ref[2]**o+(0.279501672861)*x_ref[2]
-        ref[3,2,0,0]=(0.799935089139)*x_ref[0]**o+(-0.306860809857)*x_ref[0]+(0.169104975039)*x_ref[1]**o+(-0.3480717525)*x_ref[1]+(0.215231688)*x_ref[2]**o+(-0.528775376945)*x_ref[2]
-        ref[3,2,0,1]=(0.917815789587)*x_ref[0]**o+(0.0672910338102)*x_ref[0]+(-0.186550440011)*x_ref[1]**o+(0.922579714252)*x_ref[1]+(0.924162379857)*x_ref[2]**o+(-0.769320483618)*x_ref[2]
-        ref[3,2,1,0]=(0.604324468058)*x_ref[0]**o+(-0.0109731419053)*x_ref[0]+(0.229447318325)*x_ref[1]**o+(-0.480693435232)*x_ref[1]+(-0.881779256999)*x_ref[2]**o+(0.288656394771)*x_ref[2]
-        ref[3,2,1,1]=(0.934680723352)*x_ref[0]**o+(0.993838528376)*x_ref[0]+(0.957781588502)*x_ref[1]**o+(-0.859837057866)*x_ref[1]+(-0.702139964493)*x_ref[2]**o+(0.0538177124609)*x_ref[2]
-        ref[3,2,2,0]=(-0.142809047814)*x_ref[0]**o+(-0.472594415134)*x_ref[0]+(0.0381782768377)*x_ref[1]**o+(0.727331491769)*x_ref[1]+(0.0910992897581)*x_ref[2]**o+(-0.845316063851)*x_ref[2]
-        ref[3,2,2,1]=(-0.217483358272)*x_ref[0]**o+(0.991535092285)*x_ref[0]+(-0.399175896468)*x_ref[1]**o+(-0.665836512895)*x_ref[1]+(0.0983700911493)*x_ref[2]**o+(0.321811300155)*x_ref[2]
-        ref[3,3,0,0]=(0.797049585464)*x_ref[0]**o+(-0.724467959299)*x_ref[0]+(0.19971589973)*x_ref[1]**o+(0.845928461864)*x_ref[1]+(-0.365158866359)*x_ref[2]**o+(-0.698274270132)*x_ref[2]
-        ref[3,3,0,1]=(-0.638474704878)*x_ref[0]**o+(0.551866433352)*x_ref[0]+(0.192309452979)*x_ref[1]**o+(-0.703649325501)*x_ref[1]+(0.823910578138)*x_ref[2]**o+(-0.917446989634)*x_ref[2]
-        ref[3,3,1,0]=(0.217577282169)*x_ref[0]**o+(0.521716803668)*x_ref[0]+(-0.116587783856)*x_ref[1]**o+(0.529672391417)*x_ref[1]+(-0.798918158284)*x_ref[2]**o+(-0.0996139511955)*x_ref[2]
-        ref[3,3,1,1]=(0.498965049079)*x_ref[0]**o+(0.316489921186)*x_ref[0]+(-0.0988355471817)*x_ref[1]**o+(-0.0477508287681)*x_ref[1]+(-0.778914523993)*x_ref[2]**o+(0.189397812723)*x_ref[2]
-        ref[3,3,2,0]=(0.203823698152)*x_ref[0]**o+(-0.340499414266)*x_ref[0]+(0.353374693517)*x_ref[1]**o+(-0.91035264494)*x_ref[1]+(-0.779204084198)*x_ref[2]**o+(-0.00276454165248)*x_ref[2]
-        ref[3,3,2,1]=(0.295232007123)*x_ref[0]**o+(0.271766544502)*x_ref[0]+(0.431956430336)*x_ref[1]**o+(0.896481311536)*x_ref[1]+(-0.325014902487)*x_ref[2]**o+(0.70836170284)*x_ref[2]
-        ref[3,4,0,0]=(-0.407535202468)*x_ref[0]**o+(-0.33055681091)*x_ref[0]+(0.129762143151)*x_ref[1]**o+(0.352087436228)*x_ref[1]+(-0.538770401565)*x_ref[2]**o+(-0.519071077045)*x_ref[2]
-        ref[3,4,0,1]=(0.846011435499)*x_ref[0]**o+(0.172822133672)*x_ref[0]+(-0.740732553847)*x_ref[1]**o+(0.230062837231)*x_ref[1]+(-0.231810007237)*x_ref[2]**o+(-0.568366338923)*x_ref[2]
-        ref[3,4,1,0]=(-0.198091119057)*x_ref[0]**o+(0.957989508794)*x_ref[0]+(0.861739071175)*x_ref[1]**o+(0.923450697883)*x_ref[1]+(-0.755262504937)*x_ref[2]**o+(0.102897579936)*x_ref[2]
-        ref[3,4,1,1]=(0.198829545353)*x_ref[0]**o+(-0.757182006818)*x_ref[0]+(0.254092337808)*x_ref[1]**o+(-0.00815072620097)*x_ref[1]+(0.347421988308)*x_ref[2]**o+(-0.0215277616923)*x_ref[2]
-        ref[3,4,2,0]=(0.775062112529)*x_ref[0]**o+(-0.77746792774)*x_ref[0]+(-0.666490294869)*x_ref[1]**o+(-0.679971069878)*x_ref[1]+(-0.972450779894)*x_ref[2]**o+(-0.705322282477)*x_ref[2]
-        ref[3,4,2,1]=(-0.0994927587382)*x_ref[0]**o+(0.293071774786)*x_ref[0]+(0.370784399397)*x_ref[1]**o+(0.931411225946)*x_ref[1]+(-0.55789163294)*x_ref[2]**o+(0.0831890658592)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(1.66854814732)*x[0]+(1.38199165128)*x[1]
-        ref=(1.66854814732)*x_ref[0]+(1.38199165128)*x_ref[1]
-      else:
-        arg=(-0.426142624852)*x[0]+(0.0492229050252)*x[1]+(-0.821661899519)*x[2]
-        ref=(-0.426142624852)*x_ref[0]+(0.0492229050252)*x_ref[1]+(-0.821661899519)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        arg[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-        ref[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        ref[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-      else:
-        arg[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        arg[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-        ref[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        ref[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.178459116054)*x[0]+(-0.908190366917)*x[1]
-        arg[0,1]=(-0.365861276878)*x[0]+(-1.57557211363)*x[1]
-        arg[0,2]=(-1.22266296874)*x[0]+(0.476090041507)*x[1]
-        arg[0,3]=(0.0677955238995)*x[0]+(-0.899620825938)*x[1]
-        arg[0,4]=(-0.29315929952)*x[0]+(-0.0589414650397)*x[1]
-        arg[1,0]=(-0.510486453858)*x[0]+(0.960724573137)*x[1]
-        arg[1,1]=(-0.316955543)*x[0]+(-0.160275601404)*x[1]
-        arg[1,2]=(-0.960162300557)*x[0]+(0.426685726779)*x[1]
-        arg[1,3]=(-0.458645373633)*x[0]+(0.623646469232)*x[1]
-        arg[1,4]=(-0.831993675808)*x[0]+(-0.380162434858)*x[1]
-        arg[2,0]=(-0.0614446129662)*x[0]+(0.442134320884)*x[1]
-        arg[2,1]=(-0.0466135888936)*x[0]+(0.465021672347)*x[1]
-        arg[2,2]=(-1.69520946599)*x[0]+(-1.69200166455)*x[1]
-        arg[2,3]=(0.928809309584)*x[0]+(-0.344012063367)*x[1]
-        arg[2,4]=(0.557754072268)*x[0]+(-0.0104949991147)*x[1]
-        arg[3,0]=(0.0683969753885)*x[0]+(1.59892831147)*x[1]
-        arg[3,1]=(0.90059768275)*x[0]+(1.4136644906)*x[1]
-        arg[3,2]=(-0.397873855228)*x[0]+(-0.876192378488)*x[1]
-        arg[3,3]=(-1.71837532502)*x[0]+(-0.911585940448)*x[1]
-        arg[3,4]=(-1.619565287)*x[0]+(-0.911830282675)*x[1]
-        ref[0,0]=(-0.178459116054)*x_ref[0]+(-0.908190366917)*x_ref[1]
-        ref[0,1]=(-0.365861276878)*x_ref[0]+(-1.57557211363)*x_ref[1]
-        ref[0,2]=(-1.22266296874)*x_ref[0]+(0.476090041507)*x_ref[1]
-        ref[0,3]=(0.0677955238995)*x_ref[0]+(-0.899620825938)*x_ref[1]
-        ref[0,4]=(-0.29315929952)*x_ref[0]+(-0.0589414650397)*x_ref[1]
-        ref[1,0]=(-0.510486453858)*x_ref[0]+(0.960724573137)*x_ref[1]
-        ref[1,1]=(-0.316955543)*x_ref[0]+(-0.160275601404)*x_ref[1]
-        ref[1,2]=(-0.960162300557)*x_ref[0]+(0.426685726779)*x_ref[1]
-        ref[1,3]=(-0.458645373633)*x_ref[0]+(0.623646469232)*x_ref[1]
-        ref[1,4]=(-0.831993675808)*x_ref[0]+(-0.380162434858)*x_ref[1]
-        ref[2,0]=(-0.0614446129662)*x_ref[0]+(0.442134320884)*x_ref[1]
-        ref[2,1]=(-0.0466135888936)*x_ref[0]+(0.465021672347)*x_ref[1]
-        ref[2,2]=(-1.69520946599)*x_ref[0]+(-1.69200166455)*x_ref[1]
-        ref[2,3]=(0.928809309584)*x_ref[0]+(-0.344012063367)*x_ref[1]
-        ref[2,4]=(0.557754072268)*x_ref[0]+(-0.0104949991147)*x_ref[1]
-        ref[3,0]=(0.0683969753885)*x_ref[0]+(1.59892831147)*x_ref[1]
-        ref[3,1]=(0.90059768275)*x_ref[0]+(1.4136644906)*x_ref[1]
-        ref[3,2]=(-0.397873855228)*x_ref[0]+(-0.876192378488)*x_ref[1]
-        ref[3,3]=(-1.71837532502)*x_ref[0]+(-0.911585940448)*x_ref[1]
-        ref[3,4]=(-1.619565287)*x_ref[0]+(-0.911830282675)*x_ref[1]
-      else:
-        arg[0,0]=(-0.822599790066)*x[0]+(-1.22492139307)*x[1]+(-0.696878025616)*x[2]
-        arg[0,1]=(0.600762284033)*x[0]+(-0.157734608915)*x[1]+(-0.729304703393)*x[2]
-        arg[0,2]=(-1.42910707426)*x[0]+(1.46395956796)*x[1]+(1.38800770798)*x[2]
-        arg[0,3]=(1.2198448221)*x[0]+(0.0898753488356)*x[1]+(0.976038279019)*x[2]
-        arg[0,4]=(-0.616927403743)*x[0]+(1.41159934363)*x[1]+(-1.74783039584)*x[2]
-        arg[1,0]=(-0.101387750238)*x[0]+(-0.294997280251)*x[1]+(0.247605331103)*x[2]
-        arg[1,1]=(-0.320864335195)*x[0]+(-0.202828013922)*x[1]+(-0.366246434001)*x[2]
-        arg[1,2]=(-0.827685495006)*x[0]+(-0.236835428287)*x[1]+(-1.48668813903)*x[2]
-        arg[1,3]=(0.56131602615)*x[0]+(-0.572858337349)*x[1]+(0.701775515666)*x[2]
-        arg[1,4]=(-1.09228098916)*x[0]+(-0.0251387524711)*x[1]+(1.91587136325)*x[2]
-        arg[2,0]=(-0.0758503728265)*x[0]+(0.236248603718)*x[1]+(0.0446858988194)*x[2]
-        arg[2,1]=(-1.1745073907)*x[0]+(-0.519328441654)*x[1]+(-1.19738117811)*x[2]
-        arg[2,2]=(-0.018812738143)*x[0]+(1.00051415805)*x[1]+(-0.620776442731)*x[2]
-        arg[2,3]=(-0.430333705208)*x[0]+(0.136368267739)*x[1]+(0.59767563861)*x[2]
-        arg[2,4]=(1.54336203988)*x[0]+(0.106189845211)*x[1]+(1.53097571242)*x[2]
-        arg[3,0]=(-0.00451956527502)*x[0]+(0.710318142757)*x[1]+(0.386947317474)*x[2]
-        arg[3,1]=(1.22013531098)*x[0]+(-0.735641779691)*x[1]+(-0.0137925239152)*x[2]
-        arg[3,2]=(0.0949363128405)*x[0]+(-0.0778790744582)*x[1]+(-0.466004036944)*x[2]
-        arg[3,3]=(0.656445527911)*x[0]+(1.67275242688)*x[1]+(-0.0946012389031)*x[2]
-        arg[3,4]=(0.927582093503)*x[0]+(-0.812773507566)*x[1]+(1.14365402059)*x[2]
-        ref[0,0]=(-0.822599790066)*x_ref[0]+(-1.22492139307)*x_ref[1]+(-0.696878025616)*x_ref[2]
-        ref[0,1]=(0.600762284033)*x_ref[0]+(-0.157734608915)*x_ref[1]+(-0.729304703393)*x_ref[2]
-        ref[0,2]=(-1.42910707426)*x_ref[0]+(1.46395956796)*x_ref[1]+(1.38800770798)*x_ref[2]
-        ref[0,3]=(1.2198448221)*x_ref[0]+(0.0898753488356)*x_ref[1]+(0.976038279019)*x_ref[2]
-        ref[0,4]=(-0.616927403743)*x_ref[0]+(1.41159934363)*x_ref[1]+(-1.74783039584)*x_ref[2]
-        ref[1,0]=(-0.101387750238)*x_ref[0]+(-0.294997280251)*x_ref[1]+(0.247605331103)*x_ref[2]
-        ref[1,1]=(-0.320864335195)*x_ref[0]+(-0.202828013922)*x_ref[1]+(-0.366246434001)*x_ref[2]
-        ref[1,2]=(-0.827685495006)*x_ref[0]+(-0.236835428287)*x_ref[1]+(-1.48668813903)*x_ref[2]
-        ref[1,3]=(0.56131602615)*x_ref[0]+(-0.572858337349)*x_ref[1]+(0.701775515666)*x_ref[2]
-        ref[1,4]=(-1.09228098916)*x_ref[0]+(-0.0251387524711)*x_ref[1]+(1.91587136325)*x_ref[2]
-        ref[2,0]=(-0.0758503728265)*x_ref[0]+(0.236248603718)*x_ref[1]+(0.0446858988194)*x_ref[2]
-        ref[2,1]=(-1.1745073907)*x_ref[0]+(-0.519328441654)*x_ref[1]+(-1.19738117811)*x_ref[2]
-        ref[2,2]=(-0.018812738143)*x_ref[0]+(1.00051415805)*x_ref[1]+(-0.620776442731)*x_ref[2]
-        ref[2,3]=(-0.430333705208)*x_ref[0]+(0.136368267739)*x_ref[1]+(0.59767563861)*x_ref[2]
-        ref[2,4]=(1.54336203988)*x_ref[0]+(0.106189845211)*x_ref[1]+(1.53097571242)*x_ref[2]
-        ref[3,0]=(-0.00451956527502)*x_ref[0]+(0.710318142757)*x_ref[1]+(0.386947317474)*x_ref[2]
-        ref[3,1]=(1.22013531098)*x_ref[0]+(-0.735641779691)*x_ref[1]+(-0.0137925239152)*x_ref[2]
-        ref[3,2]=(0.0949363128405)*x_ref[0]+(-0.0778790744582)*x_ref[1]+(-0.466004036944)*x_ref[2]
-        ref[3,3]=(0.656445527911)*x_ref[0]+(1.67275242688)*x_ref[1]+(-0.0946012389031)*x_ref[2]
-        ref[3,4]=(0.927582093503)*x_ref[0]+(-0.812773507566)*x_ref[1]+(1.14365402059)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.53783653017)*x[0]+(-0.262380397029)*x[1]
-        arg[0,0,1]=(0.0150173886328)*x[0]+(1.16643858096)*x[1]
-        arg[0,1,0]=(0.886211915116)*x[0]+(0.0707779287946)*x[1]
-        arg[0,1,1]=(-1.38689895895)*x[0]+(0.970706440444)*x[1]
-        arg[1,0,0]=(-0.923778075186)*x[0]+(1.93261160466)*x[1]
-        arg[1,0,1]=(1.03640566039)*x[0]+(-0.511763660443)*x[1]
-        arg[1,1,0]=(0.127401766462)*x[0]+(-0.472120435035)*x[1]
-        arg[1,1,1]=(-0.366402024047)*x[0]+(-0.396644605167)*x[1]
-        arg[2,0,0]=(-0.715041877609)*x[0]+(-1.00214766039)*x[1]
-        arg[2,0,1]=(-1.52452556675)*x[0]+(-0.570352600973)*x[1]
-        arg[2,1,0]=(0.730426967288)*x[0]+(0.158290182237)*x[1]
-        arg[2,1,1]=(-0.152190333299)*x[0]+(-0.254128104593)*x[1]
-        arg[3,0,0]=(0.835319813606)*x[0]+(-0.142845950855)*x[1]
-        arg[3,0,1]=(0.80118569153)*x[0]+(0.260295390539)*x[1]
-        arg[3,1,0]=(0.283151732104)*x[0]+(0.0284945097388)*x[1]
-        arg[3,1,1]=(-0.715345696074)*x[0]+(0.563181102176)*x[1]
-        arg[4,0,0]=(-0.481733499899)*x[0]+(1.30638761744)*x[1]
-        arg[4,0,1]=(-0.515540152341)*x[0]+(1.47724553596)*x[1]
-        arg[4,1,0]=(0.631902493814)*x[0]+(0.279373852162)*x[1]
-        arg[4,1,1]=(0.666932982001)*x[0]+(1.02356936117)*x[1]
-        arg[5,0,0]=(-1.15844673154)*x[0]+(-0.472595660401)*x[1]
-        arg[5,0,1]=(-0.469626313646)*x[0]+(0.464876870861)*x[1]
-        arg[5,1,0]=(-0.0934345630024)*x[0]+(0.92605991751)*x[1]
-        arg[5,1,1]=(-0.0528050605159)*x[0]+(0.984329702885)*x[1]
-        ref[0,0,0]=(1.53783653017)*x_ref[0]+(-0.262380397029)*x_ref[1]
-        ref[0,0,1]=(0.0150173886328)*x_ref[0]+(1.16643858096)*x_ref[1]
-        ref[0,1,0]=(0.886211915116)*x_ref[0]+(0.0707779287946)*x_ref[1]
-        ref[0,1,1]=(-1.38689895895)*x_ref[0]+(0.970706440444)*x_ref[1]
-        ref[1,0,0]=(-0.923778075186)*x_ref[0]+(1.93261160466)*x_ref[1]
-        ref[1,0,1]=(1.03640566039)*x_ref[0]+(-0.511763660443)*x_ref[1]
-        ref[1,1,0]=(0.127401766462)*x_ref[0]+(-0.472120435035)*x_ref[1]
-        ref[1,1,1]=(-0.366402024047)*x_ref[0]+(-0.396644605167)*x_ref[1]
-        ref[2,0,0]=(-0.715041877609)*x_ref[0]+(-1.00214766039)*x_ref[1]
-        ref[2,0,1]=(-1.52452556675)*x_ref[0]+(-0.570352600973)*x_ref[1]
-        ref[2,1,0]=(0.730426967288)*x_ref[0]+(0.158290182237)*x_ref[1]
-        ref[2,1,1]=(-0.152190333299)*x_ref[0]+(-0.254128104593)*x_ref[1]
-        ref[3,0,0]=(0.835319813606)*x_ref[0]+(-0.142845950855)*x_ref[1]
-        ref[3,0,1]=(0.80118569153)*x_ref[0]+(0.260295390539)*x_ref[1]
-        ref[3,1,0]=(0.283151732104)*x_ref[0]+(0.0284945097388)*x_ref[1]
-        ref[3,1,1]=(-0.715345696074)*x_ref[0]+(0.563181102176)*x_ref[1]
-        ref[4,0,0]=(-0.481733499899)*x_ref[0]+(1.30638761744)*x_ref[1]
-        ref[4,0,1]=(-0.515540152341)*x_ref[0]+(1.47724553596)*x_ref[1]
-        ref[4,1,0]=(0.631902493814)*x_ref[0]+(0.279373852162)*x_ref[1]
-        ref[4,1,1]=(0.666932982001)*x_ref[0]+(1.02356936117)*x_ref[1]
-        ref[5,0,0]=(-1.15844673154)*x_ref[0]+(-0.472595660401)*x_ref[1]
-        ref[5,0,1]=(-0.469626313646)*x_ref[0]+(0.464876870861)*x_ref[1]
-        ref[5,1,0]=(-0.0934345630024)*x_ref[0]+(0.92605991751)*x_ref[1]
-        ref[5,1,1]=(-0.0528050605159)*x_ref[0]+(0.984329702885)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.713551995443)*x[0]+(0.694017368402)*x[1]+(-0.0738591792901)*x[2]
-        arg[0,0,1]=(1.56876736864)*x[0]+(-0.345130721117)*x[1]+(1.1690777905)*x[2]
-        arg[0,1,0]=(-0.62505379409)*x[0]+(-0.143697617605)*x[1]+(0.132102288091)*x[2]
-        arg[0,1,1]=(0.873577158168)*x[0]+(-0.967200786585)*x[1]+(1.2903546666)*x[2]
-        arg[1,0,0]=(-0.192658558584)*x[0]+(0.506709431455)*x[1]+(-0.0952065550445)*x[2]
-        arg[1,0,1]=(1.30984695498)*x[0]+(-0.469661654194)*x[1]+(1.39212979011)*x[2]
-        arg[1,1,0]=(-0.49094299988)*x[0]+(1.02571925005)*x[1]+(0.125396191195)*x[2]
-        arg[1,1,1]=(-0.062798346747)*x[0]+(-0.789359897908)*x[1]+(1.77093308656)*x[2]
-        arg[2,0,0]=(1.61875859199)*x[0]+(0.594855189809)*x[1]+(0.42445154554)*x[2]
-        arg[2,0,1]=(-0.856240554561)*x[0]+(0.100699001565)*x[1]+(-0.27854306919)*x[2]
-        arg[2,1,0]=(0.0478958246378)*x[0]+(0.695175069462)*x[1]+(-0.847667978286)*x[2]
-        arg[2,1,1]=(1.60820982887)*x[0]+(-0.251793277319)*x[1]+(0.143173366678)*x[2]
-        arg[3,0,0]=(-0.292866056474)*x[0]+(1.01748459143)*x[1]+(-0.484686028756)*x[2]
-        arg[3,0,1]=(-0.408126207016)*x[0]+(-1.31011612654)*x[1]+(-0.955847365219)*x[2]
-        arg[3,1,0]=(0.0396674474263)*x[0]+(0.354470432765)*x[1]+(-0.291731786972)*x[2]
-        arg[3,1,1]=(0.752098712767)*x[0]+(-1.83970538813)*x[1]+(0.0227500647892)*x[2]
-        arg[4,0,0]=(0.398849520011)*x[0]+(-1.38237112549)*x[1]+(-0.800550650133)*x[2]
-        arg[4,0,1]=(0.102399478593)*x[0]+(0.812513136316)*x[1]+(1.25442670221)*x[2]
-        arg[4,1,0]=(0.224914729031)*x[0]+(0.0706934334606)*x[1]+(0.640265153974)*x[2]
-        arg[4,1,1]=(0.278731023964)*x[0]+(-0.766892970502)*x[1]+(1.62378242532)*x[2]
-        arg[5,0,0]=(-0.874002481668)*x[0]+(0.168391989524)*x[1]+(-0.0150981524408)*x[2]
-        arg[5,0,1]=(1.03369744159)*x[0]+(-0.363152709617)*x[1]+(-0.429141439899)*x[2]
-        arg[5,1,0]=(1.74293672288)*x[0]+(1.91064523276)*x[1]+(0.159389690962)*x[2]
-        arg[5,1,1]=(0.769432577623)*x[0]+(0.929942365281)*x[1]+(0.170908152574)*x[2]
-        ref[0,0,0]=(-0.713551995443)*x_ref[0]+(0.694017368402)*x_ref[1]+(-0.0738591792901)*x_ref[2]
-        ref[0,0,1]=(1.56876736864)*x_ref[0]+(-0.345130721117)*x_ref[1]+(1.1690777905)*x_ref[2]
-        ref[0,1,0]=(-0.62505379409)*x_ref[0]+(-0.143697617605)*x_ref[1]+(0.132102288091)*x_ref[2]
-        ref[0,1,1]=(0.873577158168)*x_ref[0]+(-0.967200786585)*x_ref[1]+(1.2903546666)*x_ref[2]
-        ref[1,0,0]=(-0.192658558584)*x_ref[0]+(0.506709431455)*x_ref[1]+(-0.0952065550445)*x_ref[2]
-        ref[1,0,1]=(1.30984695498)*x_ref[0]+(-0.469661654194)*x_ref[1]+(1.39212979011)*x_ref[2]
-        ref[1,1,0]=(-0.49094299988)*x_ref[0]+(1.02571925005)*x_ref[1]+(0.125396191195)*x_ref[2]
-        ref[1,1,1]=(-0.062798346747)*x_ref[0]+(-0.789359897908)*x_ref[1]+(1.77093308656)*x_ref[2]
-        ref[2,0,0]=(1.61875859199)*x_ref[0]+(0.594855189809)*x_ref[1]+(0.42445154554)*x_ref[2]
-        ref[2,0,1]=(-0.856240554561)*x_ref[0]+(0.100699001565)*x_ref[1]+(-0.27854306919)*x_ref[2]
-        ref[2,1,0]=(0.0478958246378)*x_ref[0]+(0.695175069462)*x_ref[1]+(-0.847667978286)*x_ref[2]
-        ref[2,1,1]=(1.60820982887)*x_ref[0]+(-0.251793277319)*x_ref[1]+(0.143173366678)*x_ref[2]
-        ref[3,0,0]=(-0.292866056474)*x_ref[0]+(1.01748459143)*x_ref[1]+(-0.484686028756)*x_ref[2]
-        ref[3,0,1]=(-0.408126207016)*x_ref[0]+(-1.31011612654)*x_ref[1]+(-0.955847365219)*x_ref[2]
-        ref[3,1,0]=(0.0396674474263)*x_ref[0]+(0.354470432765)*x_ref[1]+(-0.291731786972)*x_ref[2]
-        ref[3,1,1]=(0.752098712767)*x_ref[0]+(-1.83970538813)*x_ref[1]+(0.0227500647892)*x_ref[2]
-        ref[4,0,0]=(0.398849520011)*x_ref[0]+(-1.38237112549)*x_ref[1]+(-0.800550650133)*x_ref[2]
-        ref[4,0,1]=(0.102399478593)*x_ref[0]+(0.812513136316)*x_ref[1]+(1.25442670221)*x_ref[2]
-        ref[4,1,0]=(0.224914729031)*x_ref[0]+(0.0706934334606)*x_ref[1]+(0.640265153974)*x_ref[2]
-        ref[4,1,1]=(0.278731023964)*x_ref[0]+(-0.766892970502)*x_ref[1]+(1.62378242532)*x_ref[2]
-        ref[5,0,0]=(-0.874002481668)*x_ref[0]+(0.168391989524)*x_ref[1]+(-0.0150981524408)*x_ref[2]
-        ref[5,0,1]=(1.03369744159)*x_ref[0]+(-0.363152709617)*x_ref[1]+(-0.429141439899)*x_ref[2]
-        ref[5,1,0]=(1.74293672288)*x_ref[0]+(1.91064523276)*x_ref[1]+(0.159389690962)*x_ref[2]
-        ref[5,1,1]=(0.769432577623)*x_ref[0]+(0.929942365281)*x_ref[1]+(0.170908152574)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-1.15521896363)*x[0]+(0.8731619129)*x[1]
-        arg[0,0,0,1]=(0.597656443464)*x[0]+(0.341688152811)*x[1]
-        arg[0,0,1,0]=(-0.422350580427)*x[0]+(0.728011338687)*x[1]
-        arg[0,0,1,1]=(-1.72046294064)*x[0]+(1.13345636724)*x[1]
-        arg[0,0,2,0]=(0.150530941523)*x[0]+(0.437417461641)*x[1]
-        arg[0,0,2,1]=(-0.413133183531)*x[0]+(-0.268630939964)*x[1]
-        arg[0,1,0,0]=(-0.220368905416)*x[0]+(1.10085894684)*x[1]
-        arg[0,1,0,1]=(-0.943367491188)*x[0]+(0.80942793885)*x[1]
-        arg[0,1,1,0]=(0.906220152303)*x[0]+(0.801214136703)*x[1]
-        arg[0,1,1,1]=(-1.3650200124)*x[0]+(-0.373454973523)*x[1]
-        arg[0,1,2,0]=(-0.277067377427)*x[0]+(-1.62229711799)*x[1]
-        arg[0,1,2,1]=(0.787076886379)*x[0]+(0.496906919368)*x[1]
-        arg[0,2,0,0]=(-0.0770154256748)*x[0]+(1.5002648939)*x[1]
-        arg[0,2,0,1]=(0.225572553862)*x[0]+(1.39471337012)*x[1]
-        arg[0,2,1,0]=(-0.54799237637)*x[0]+(-0.607785237418)*x[1]
-        arg[0,2,1,1]=(0.384591801229)*x[0]+(1.30760620469)*x[1]
-        arg[0,2,2,0]=(0.228248139163)*x[0]+(0.151268778109)*x[1]
-        arg[0,2,2,1]=(-1.43978230199)*x[0]+(0.958903347524)*x[1]
-        arg[0,3,0,0]=(-0.568133098072)*x[0]+(0.128510595507)*x[1]
-        arg[0,3,0,1]=(-0.304029315535)*x[0]+(1.19478464847)*x[1]
-        arg[0,3,1,0]=(0.0996876882275)*x[0]+(-0.255346045102)*x[1]
-        arg[0,3,1,1]=(0.414708254109)*x[0]+(-0.148700489536)*x[1]
-        arg[0,3,2,0]=(-0.740719850161)*x[0]+(0.375907815982)*x[1]
-        arg[0,3,2,1]=(-0.184189058365)*x[0]+(-0.274477516444)*x[1]
-        arg[0,4,0,0]=(-0.565848858136)*x[0]+(-0.206818417121)*x[1]
-        arg[0,4,0,1]=(-0.983652399085)*x[0]+(1.21445827986)*x[1]
-        arg[0,4,1,0]=(1.6425686123)*x[0]+(-0.621952337654)*x[1]
-        arg[0,4,1,1]=(-1.07526530849)*x[0]+(-0.0915810578715)*x[1]
-        arg[0,4,2,0]=(1.4812278738)*x[0]+(1.61991326423)*x[1]
-        arg[0,4,2,1]=(-1.4147420413)*x[0]+(1.34428787131)*x[1]
-        arg[1,0,0,0]=(-0.910373659777)*x[0]+(1.46920176435)*x[1]
-        arg[1,0,0,1]=(0.074473571609)*x[0]+(-0.336642181231)*x[1]
-        arg[1,0,1,0]=(-0.141813739296)*x[0]+(-0.534432398621)*x[1]
-        arg[1,0,1,1]=(0.728030938984)*x[0]+(0.532542738961)*x[1]
-        arg[1,0,2,0]=(0.20676316374)*x[0]+(-0.065235999066)*x[1]
-        arg[1,0,2,1]=(-1.09054680794)*x[0]+(0.537754476805)*x[1]
-        arg[1,1,0,0]=(0.523878896271)*x[0]+(-0.0561828109964)*x[1]
-        arg[1,1,0,1]=(1.27754653741)*x[0]+(0.119734333004)*x[1]
-        arg[1,1,1,0]=(0.0933160885942)*x[0]+(0.390183021193)*x[1]
-        arg[1,1,1,1]=(0.548273953924)*x[0]+(-0.552588185124)*x[1]
-        arg[1,1,2,0]=(0.576803722241)*x[0]+(0.60898781381)*x[1]
-        arg[1,1,2,1]=(-0.307231650547)*x[0]+(0.439111970656)*x[1]
-        arg[1,2,0,0]=(0.172113300736)*x[0]+(-0.0153971432613)*x[1]
-        arg[1,2,0,1]=(-0.883753634465)*x[0]+(1.35320294175)*x[1]
-        arg[1,2,1,0]=(0.153937139638)*x[0]+(-0.865654430739)*x[1]
-        arg[1,2,1,1]=(0.970377377543)*x[0]+(-1.11418225395)*x[1]
-        arg[1,2,2,0]=(-1.11106779953)*x[0]+(-0.357700480625)*x[1]
-        arg[1,2,2,1]=(0.475529404147)*x[0]+(-0.121369909464)*x[1]
-        arg[1,3,0,0]=(-0.867370155191)*x[0]+(0.625161512036)*x[1]
-        arg[1,3,0,1]=(0.252873452474)*x[0]+(1.11368263907)*x[1]
-        arg[1,3,1,0]=(-1.25698605702)*x[0]+(-0.381254857218)*x[1]
-        arg[1,3,1,1]=(1.12038052674)*x[0]+(-0.113429410248)*x[1]
-        arg[1,3,2,0]=(0.0821799570201)*x[0]+(-0.167383600252)*x[1]
-        arg[1,3,2,1]=(-0.534217900599)*x[0]+(-1.26144431009)*x[1]
-        arg[1,4,0,0]=(0.639186045888)*x[0]+(0.258686782482)*x[1]
-        arg[1,4,0,1]=(-0.256515011769)*x[0]+(0.797453395844)*x[1]
-        arg[1,4,1,0]=(-0.427518421999)*x[0]+(-0.101439725502)*x[1]
-        arg[1,4,1,1]=(-0.251303248239)*x[0]+(0.361194806374)*x[1]
-        arg[1,4,2,0]=(0.415313798163)*x[0]+(-0.909602300262)*x[1]
-        arg[1,4,2,1]=(0.118542894027)*x[0]+(-0.28224555744)*x[1]
-        arg[2,0,0,0]=(0.700687096184)*x[0]+(-1.69964436969)*x[1]
-        arg[2,0,0,1]=(0.880393551605)*x[0]+(-0.571112060462)*x[1]
-        arg[2,0,1,0]=(1.35990706973)*x[0]+(0.260154297077)*x[1]
-        arg[2,0,1,1]=(0.294201987212)*x[0]+(-0.379007248662)*x[1]
-        arg[2,0,2,0]=(-1.42914701121)*x[0]+(0.88289145627)*x[1]
-        arg[2,0,2,1]=(-0.343976881604)*x[0]+(0.0642493086788)*x[1]
-        arg[2,1,0,0]=(0.479103547757)*x[0]+(-1.60276044525)*x[1]
-        arg[2,1,0,1]=(0.944321957371)*x[0]+(0.313721173145)*x[1]
-        arg[2,1,1,0]=(0.233589885494)*x[0]+(-0.427865810692)*x[1]
-        arg[2,1,1,1]=(-0.954518596356)*x[0]+(-0.153033245523)*x[1]
-        arg[2,1,2,0]=(1.14079619235)*x[0]+(0.136503305207)*x[1]
-        arg[2,1,2,1]=(-0.715601080868)*x[0]+(-1.74677798058)*x[1]
-        arg[2,2,0,0]=(0.211908166714)*x[0]+(0.379390512119)*x[1]
-        arg[2,2,0,1]=(0.97243389801)*x[0]+(-0.988193298566)*x[1]
-        arg[2,2,1,0]=(0.8990152555)*x[0]+(0.22398476583)*x[1]
-        arg[2,2,1,1]=(-0.748858338529)*x[0]+(-1.00255098852)*x[1]
-        arg[2,2,2,0]=(0.863334969354)*x[0]+(1.14334958607)*x[1]
-        arg[2,2,2,1]=(-0.807672728362)*x[0]+(0.837576150239)*x[1]
-        arg[2,3,0,0]=(-0.310471066952)*x[0]+(0.261468387883)*x[1]
-        arg[2,3,0,1]=(-1.61325161386)*x[0]+(0.016614907729)*x[1]
-        arg[2,3,1,0]=(-0.742577714565)*x[0]+(-1.54936077725)*x[1]
-        arg[2,3,1,1]=(-0.393825799694)*x[0]+(0.66004298074)*x[1]
-        arg[2,3,2,0]=(-1.03965632182)*x[0]+(-0.863160703719)*x[1]
-        arg[2,3,2,1]=(0.673788653196)*x[0]+(0.740311339524)*x[1]
-        arg[2,4,0,0]=(1.59272250531)*x[0]+(1.27845229216)*x[1]
-        arg[2,4,0,1]=(0.112947869874)*x[0]+(1.06626388923)*x[1]
-        arg[2,4,1,0]=(-0.935174560087)*x[0]+(0.729112002619)*x[1]
-        arg[2,4,1,1]=(1.28167575095)*x[0]+(-1.6626881011)*x[1]
-        arg[2,4,2,0]=(-1.01382997014)*x[0]+(0.40870705964)*x[1]
-        arg[2,4,2,1]=(-0.903293274454)*x[0]+(0.451662927854)*x[1]
-        arg[3,0,0,0]=(0.414933474895)*x[0]+(0.274208992931)*x[1]
-        arg[3,0,0,1]=(-0.140384007335)*x[0]+(-0.201270983912)*x[1]
-        arg[3,0,1,0]=(-1.34339529394)*x[0]+(-1.26275414913)*x[1]
-        arg[3,0,1,1]=(0.34482759487)*x[0]+(0.992140984097)*x[1]
-        arg[3,0,2,0]=(-1.56575003976)*x[0]+(-0.514557317682)*x[1]
-        arg[3,0,2,1]=(-0.203196026518)*x[0]+(-0.50777550196)*x[1]
-        arg[3,1,0,0]=(-0.465027052452)*x[0]+(0.165299984247)*x[1]
-        arg[3,1,0,1]=(-0.876537945705)*x[0]+(0.569062140702)*x[1]
-        arg[3,1,1,0]=(0.212854890028)*x[0]+(0.772436691343)*x[1]
-        arg[3,1,1,1]=(0.376912060989)*x[0]+(-1.59078116917)*x[1]
-        arg[3,1,2,0]=(-1.19949528387)*x[0]+(0.508138309995)*x[1]
-        arg[3,1,2,1]=(0.535067293288)*x[0]+(0.483486234966)*x[1]
-        arg[3,2,0,0]=(-0.366454519079)*x[0]+(0.880937088999)*x[1]
-        arg[3,2,0,1]=(-0.164158778522)*x[0]+(-0.0933716527947)*x[1]
-        arg[3,2,1,0]=(-0.338148774302)*x[0]+(0.389103301223)*x[1]
-        arg[3,2,1,1]=(-1.17323344849)*x[0]+(-0.286752347393)*x[1]
-        arg[3,2,2,0]=(0.43651426746)*x[0]+(0.0751512323008)*x[1]
-        arg[3,2,2,1]=(1.44242451962)*x[0]+(-0.853169055909)*x[1]
-        arg[3,3,0,0]=(0.268862750262)*x[0]+(0.668643005784)*x[1]
-        arg[3,3,0,1]=(-1.47078437928)*x[0]+(1.25865018681)*x[1]
-        arg[3,3,1,0]=(-0.218849811361)*x[0]+(0.147601849599)*x[1]
-        arg[3,3,1,1]=(1.66493534918)*x[0]+(0.368711512357)*x[1]
-        arg[3,3,2,0]=(0.259910144631)*x[0]+(-0.977975383491)*x[1]
-        arg[3,3,2,1]=(1.87696180213)*x[0]+(-0.583679438031)*x[1]
-        arg[3,4,0,0]=(0.226114159843)*x[0]+(0.121547181819)*x[1]
-        arg[3,4,0,1]=(1.21215141305)*x[0]+(-0.175673309633)*x[1]
-        arg[3,4,1,0]=(0.644340639306)*x[0]+(0.35372514848)*x[1]
-        arg[3,4,1,1]=(0.452987488144)*x[0]+(0.838110546855)*x[1]
-        arg[3,4,2,0]=(-0.434414511976)*x[0]+(-0.879038818613)*x[1]
-        arg[3,4,2,1]=(-0.387240543602)*x[0]+(0.187795787877)*x[1]
-        ref[0,0,0,0]=(-1.15521896363)*x_ref[0]+(0.8731619129)*x_ref[1]
-        ref[0,0,0,1]=(0.597656443464)*x_ref[0]+(0.341688152811)*x_ref[1]
-        ref[0,0,1,0]=(-0.422350580427)*x_ref[0]+(0.728011338687)*x_ref[1]
-        ref[0,0,1,1]=(-1.72046294064)*x_ref[0]+(1.13345636724)*x_ref[1]
-        ref[0,0,2,0]=(0.150530941523)*x_ref[0]+(0.437417461641)*x_ref[1]
-        ref[0,0,2,1]=(-0.413133183531)*x_ref[0]+(-0.268630939964)*x_ref[1]
-        ref[0,1,0,0]=(-0.220368905416)*x_ref[0]+(1.10085894684)*x_ref[1]
-        ref[0,1,0,1]=(-0.943367491188)*x_ref[0]+(0.80942793885)*x_ref[1]
-        ref[0,1,1,0]=(0.906220152303)*x_ref[0]+(0.801214136703)*x_ref[1]
-        ref[0,1,1,1]=(-1.3650200124)*x_ref[0]+(-0.373454973523)*x_ref[1]
-        ref[0,1,2,0]=(-0.277067377427)*x_ref[0]+(-1.62229711799)*x_ref[1]
-        ref[0,1,2,1]=(0.787076886379)*x_ref[0]+(0.496906919368)*x_ref[1]
-        ref[0,2,0,0]=(-0.0770154256748)*x_ref[0]+(1.5002648939)*x_ref[1]
-        ref[0,2,0,1]=(0.225572553862)*x_ref[0]+(1.39471337012)*x_ref[1]
-        ref[0,2,1,0]=(-0.54799237637)*x_ref[0]+(-0.607785237418)*x_ref[1]
-        ref[0,2,1,1]=(0.384591801229)*x_ref[0]+(1.30760620469)*x_ref[1]
-        ref[0,2,2,0]=(0.228248139163)*x_ref[0]+(0.151268778109)*x_ref[1]
-        ref[0,2,2,1]=(-1.43978230199)*x_ref[0]+(0.958903347524)*x_ref[1]
-        ref[0,3,0,0]=(-0.568133098072)*x_ref[0]+(0.128510595507)*x_ref[1]
-        ref[0,3,0,1]=(-0.304029315535)*x_ref[0]+(1.19478464847)*x_ref[1]
-        ref[0,3,1,0]=(0.0996876882275)*x_ref[0]+(-0.255346045102)*x_ref[1]
-        ref[0,3,1,1]=(0.414708254109)*x_ref[0]+(-0.148700489536)*x_ref[1]
-        ref[0,3,2,0]=(-0.740719850161)*x_ref[0]+(0.375907815982)*x_ref[1]
-        ref[0,3,2,1]=(-0.184189058365)*x_ref[0]+(-0.274477516444)*x_ref[1]
-        ref[0,4,0,0]=(-0.565848858136)*x_ref[0]+(-0.206818417121)*x_ref[1]
-        ref[0,4,0,1]=(-0.983652399085)*x_ref[0]+(1.21445827986)*x_ref[1]
-        ref[0,4,1,0]=(1.6425686123)*x_ref[0]+(-0.621952337654)*x_ref[1]
-        ref[0,4,1,1]=(-1.07526530849)*x_ref[0]+(-0.0915810578715)*x_ref[1]
-        ref[0,4,2,0]=(1.4812278738)*x_ref[0]+(1.61991326423)*x_ref[1]
-        ref[0,4,2,1]=(-1.4147420413)*x_ref[0]+(1.34428787131)*x_ref[1]
-        ref[1,0,0,0]=(-0.910373659777)*x_ref[0]+(1.46920176435)*x_ref[1]
-        ref[1,0,0,1]=(0.074473571609)*x_ref[0]+(-0.336642181231)*x_ref[1]
-        ref[1,0,1,0]=(-0.141813739296)*x_ref[0]+(-0.534432398621)*x_ref[1]
-        ref[1,0,1,1]=(0.728030938984)*x_ref[0]+(0.532542738961)*x_ref[1]
-        ref[1,0,2,0]=(0.20676316374)*x_ref[0]+(-0.065235999066)*x_ref[1]
-        ref[1,0,2,1]=(-1.09054680794)*x_ref[0]+(0.537754476805)*x_ref[1]
-        ref[1,1,0,0]=(0.523878896271)*x_ref[0]+(-0.0561828109964)*x_ref[1]
-        ref[1,1,0,1]=(1.27754653741)*x_ref[0]+(0.119734333004)*x_ref[1]
-        ref[1,1,1,0]=(0.0933160885942)*x_ref[0]+(0.390183021193)*x_ref[1]
-        ref[1,1,1,1]=(0.548273953924)*x_ref[0]+(-0.552588185124)*x_ref[1]
-        ref[1,1,2,0]=(0.576803722241)*x_ref[0]+(0.60898781381)*x_ref[1]
-        ref[1,1,2,1]=(-0.307231650547)*x_ref[0]+(0.439111970656)*x_ref[1]
-        ref[1,2,0,0]=(0.172113300736)*x_ref[0]+(-0.0153971432613)*x_ref[1]
-        ref[1,2,0,1]=(-0.883753634465)*x_ref[0]+(1.35320294175)*x_ref[1]
-        ref[1,2,1,0]=(0.153937139638)*x_ref[0]+(-0.865654430739)*x_ref[1]
-        ref[1,2,1,1]=(0.970377377543)*x_ref[0]+(-1.11418225395)*x_ref[1]
-        ref[1,2,2,0]=(-1.11106779953)*x_ref[0]+(-0.357700480625)*x_ref[1]
-        ref[1,2,2,1]=(0.475529404147)*x_ref[0]+(-0.121369909464)*x_ref[1]
-        ref[1,3,0,0]=(-0.867370155191)*x_ref[0]+(0.625161512036)*x_ref[1]
-        ref[1,3,0,1]=(0.252873452474)*x_ref[0]+(1.11368263907)*x_ref[1]
-        ref[1,3,1,0]=(-1.25698605702)*x_ref[0]+(-0.381254857218)*x_ref[1]
-        ref[1,3,1,1]=(1.12038052674)*x_ref[0]+(-0.113429410248)*x_ref[1]
-        ref[1,3,2,0]=(0.0821799570201)*x_ref[0]+(-0.167383600252)*x_ref[1]
-        ref[1,3,2,1]=(-0.534217900599)*x_ref[0]+(-1.26144431009)*x_ref[1]
-        ref[1,4,0,0]=(0.639186045888)*x_ref[0]+(0.258686782482)*x_ref[1]
-        ref[1,4,0,1]=(-0.256515011769)*x_ref[0]+(0.797453395844)*x_ref[1]
-        ref[1,4,1,0]=(-0.427518421999)*x_ref[0]+(-0.101439725502)*x_ref[1]
-        ref[1,4,1,1]=(-0.251303248239)*x_ref[0]+(0.361194806374)*x_ref[1]
-        ref[1,4,2,0]=(0.415313798163)*x_ref[0]+(-0.909602300262)*x_ref[1]
-        ref[1,4,2,1]=(0.118542894027)*x_ref[0]+(-0.28224555744)*x_ref[1]
-        ref[2,0,0,0]=(0.700687096184)*x_ref[0]+(-1.69964436969)*x_ref[1]
-        ref[2,0,0,1]=(0.880393551605)*x_ref[0]+(-0.571112060462)*x_ref[1]
-        ref[2,0,1,0]=(1.35990706973)*x_ref[0]+(0.260154297077)*x_ref[1]
-        ref[2,0,1,1]=(0.294201987212)*x_ref[0]+(-0.379007248662)*x_ref[1]
-        ref[2,0,2,0]=(-1.42914701121)*x_ref[0]+(0.88289145627)*x_ref[1]
-        ref[2,0,2,1]=(-0.343976881604)*x_ref[0]+(0.0642493086788)*x_ref[1]
-        ref[2,1,0,0]=(0.479103547757)*x_ref[0]+(-1.60276044525)*x_ref[1]
-        ref[2,1,0,1]=(0.944321957371)*x_ref[0]+(0.313721173145)*x_ref[1]
-        ref[2,1,1,0]=(0.233589885494)*x_ref[0]+(-0.427865810692)*x_ref[1]
-        ref[2,1,1,1]=(-0.954518596356)*x_ref[0]+(-0.153033245523)*x_ref[1]
-        ref[2,1,2,0]=(1.14079619235)*x_ref[0]+(0.136503305207)*x_ref[1]
-        ref[2,1,2,1]=(-0.715601080868)*x_ref[0]+(-1.74677798058)*x_ref[1]
-        ref[2,2,0,0]=(0.211908166714)*x_ref[0]+(0.379390512119)*x_ref[1]
-        ref[2,2,0,1]=(0.97243389801)*x_ref[0]+(-0.988193298566)*x_ref[1]
-        ref[2,2,1,0]=(0.8990152555)*x_ref[0]+(0.22398476583)*x_ref[1]
-        ref[2,2,1,1]=(-0.748858338529)*x_ref[0]+(-1.00255098852)*x_ref[1]
-        ref[2,2,2,0]=(0.863334969354)*x_ref[0]+(1.14334958607)*x_ref[1]
-        ref[2,2,2,1]=(-0.807672728362)*x_ref[0]+(0.837576150239)*x_ref[1]
-        ref[2,3,0,0]=(-0.310471066952)*x_ref[0]+(0.261468387883)*x_ref[1]
-        ref[2,3,0,1]=(-1.61325161386)*x_ref[0]+(0.016614907729)*x_ref[1]
-        ref[2,3,1,0]=(-0.742577714565)*x_ref[0]+(-1.54936077725)*x_ref[1]
-        ref[2,3,1,1]=(-0.393825799694)*x_ref[0]+(0.66004298074)*x_ref[1]
-        ref[2,3,2,0]=(-1.03965632182)*x_ref[0]+(-0.863160703719)*x_ref[1]
-        ref[2,3,2,1]=(0.673788653196)*x_ref[0]+(0.740311339524)*x_ref[1]
-        ref[2,4,0,0]=(1.59272250531)*x_ref[0]+(1.27845229216)*x_ref[1]
-        ref[2,4,0,1]=(0.112947869874)*x_ref[0]+(1.06626388923)*x_ref[1]
-        ref[2,4,1,0]=(-0.935174560087)*x_ref[0]+(0.729112002619)*x_ref[1]
-        ref[2,4,1,1]=(1.28167575095)*x_ref[0]+(-1.6626881011)*x_ref[1]
-        ref[2,4,2,0]=(-1.01382997014)*x_ref[0]+(0.40870705964)*x_ref[1]
-        ref[2,4,2,1]=(-0.903293274454)*x_ref[0]+(0.451662927854)*x_ref[1]
-        ref[3,0,0,0]=(0.414933474895)*x_ref[0]+(0.274208992931)*x_ref[1]
-        ref[3,0,0,1]=(-0.140384007335)*x_ref[0]+(-0.201270983912)*x_ref[1]
-        ref[3,0,1,0]=(-1.34339529394)*x_ref[0]+(-1.26275414913)*x_ref[1]
-        ref[3,0,1,1]=(0.34482759487)*x_ref[0]+(0.992140984097)*x_ref[1]
-        ref[3,0,2,0]=(-1.56575003976)*x_ref[0]+(-0.514557317682)*x_ref[1]
-        ref[3,0,2,1]=(-0.203196026518)*x_ref[0]+(-0.50777550196)*x_ref[1]
-        ref[3,1,0,0]=(-0.465027052452)*x_ref[0]+(0.165299984247)*x_ref[1]
-        ref[3,1,0,1]=(-0.876537945705)*x_ref[0]+(0.569062140702)*x_ref[1]
-        ref[3,1,1,0]=(0.212854890028)*x_ref[0]+(0.772436691343)*x_ref[1]
-        ref[3,1,1,1]=(0.376912060989)*x_ref[0]+(-1.59078116917)*x_ref[1]
-        ref[3,1,2,0]=(-1.19949528387)*x_ref[0]+(0.508138309995)*x_ref[1]
-        ref[3,1,2,1]=(0.535067293288)*x_ref[0]+(0.483486234966)*x_ref[1]
-        ref[3,2,0,0]=(-0.366454519079)*x_ref[0]+(0.880937088999)*x_ref[1]
-        ref[3,2,0,1]=(-0.164158778522)*x_ref[0]+(-0.0933716527947)*x_ref[1]
-        ref[3,2,1,0]=(-0.338148774302)*x_ref[0]+(0.389103301223)*x_ref[1]
-        ref[3,2,1,1]=(-1.17323344849)*x_ref[0]+(-0.286752347393)*x_ref[1]
-        ref[3,2,2,0]=(0.43651426746)*x_ref[0]+(0.0751512323008)*x_ref[1]
-        ref[3,2,2,1]=(1.44242451962)*x_ref[0]+(-0.853169055909)*x_ref[1]
-        ref[3,3,0,0]=(0.268862750262)*x_ref[0]+(0.668643005784)*x_ref[1]
-        ref[3,3,0,1]=(-1.47078437928)*x_ref[0]+(1.25865018681)*x_ref[1]
-        ref[3,3,1,0]=(-0.218849811361)*x_ref[0]+(0.147601849599)*x_ref[1]
-        ref[3,3,1,1]=(1.66493534918)*x_ref[0]+(0.368711512357)*x_ref[1]
-        ref[3,3,2,0]=(0.259910144631)*x_ref[0]+(-0.977975383491)*x_ref[1]
-        ref[3,3,2,1]=(1.87696180213)*x_ref[0]+(-0.583679438031)*x_ref[1]
-        ref[3,4,0,0]=(0.226114159843)*x_ref[0]+(0.121547181819)*x_ref[1]
-        ref[3,4,0,1]=(1.21215141305)*x_ref[0]+(-0.175673309633)*x_ref[1]
-        ref[3,4,1,0]=(0.644340639306)*x_ref[0]+(0.35372514848)*x_ref[1]
-        ref[3,4,1,1]=(0.452987488144)*x_ref[0]+(0.838110546855)*x_ref[1]
-        ref[3,4,2,0]=(-0.434414511976)*x_ref[0]+(-0.879038818613)*x_ref[1]
-        ref[3,4,2,1]=(-0.387240543602)*x_ref[0]+(0.187795787877)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.523374388946)*x[0]+(-0.462029311047)*x[1]+(-0.47732568751)*x[2]
-        arg[0,0,0,1]=(0.641437288282)*x[0]+(-0.245967769804)*x[1]+(-0.882711488334)*x[2]
-        arg[0,0,1,0]=(-0.039075405101)*x[0]+(0.233479040723)*x[1]+(-0.450244284473)*x[2]
-        arg[0,0,1,1]=(-1.00711630706)*x[0]+(-0.247720707527)*x[1]+(-0.597073422746)*x[2]
-        arg[0,0,2,0]=(0.141738833983)*x[0]+(-1.34846391496)*x[1]+(0.214891803475)*x[2]
-        arg[0,0,2,1]=(0.276967719755)*x[0]+(-0.64300940909)*x[1]+(-1.10068852616)*x[2]
-        arg[0,1,0,0]=(0.438911917989)*x[0]+(0.588137625057)*x[1]+(0.744848057181)*x[2]
-        arg[0,1,0,1]=(0.266343859518)*x[0]+(1.24092635599)*x[1]+(0.477206170905)*x[2]
-        arg[0,1,1,0]=(0.328857688358)*x[0]+(-1.17720038645)*x[1]+(0.285045368661)*x[2]
-        arg[0,1,1,1]=(-0.0985505878353)*x[0]+(1.11228710542)*x[1]+(0.159347839514)*x[2]
-        arg[0,1,2,0]=(0.125378210814)*x[0]+(1.51252392793)*x[1]+(-0.0402281595871)*x[2]
-        arg[0,1,2,1]=(-1.41964435548)*x[0]+(0.825108246489)*x[1]+(0.31679169508)*x[2]
-        arg[0,2,0,0]=(1.47728541117)*x[0]+(0.957708443424)*x[1]+(-0.187892562217)*x[2]
-        arg[0,2,0,1]=(0.0614505001405)*x[0]+(0.144444072992)*x[1]+(0.287839563179)*x[2]
-        arg[0,2,1,0]=(0.512698173313)*x[0]+(0.316852993542)*x[1]+(0.538020705489)*x[2]
-        arg[0,2,1,1]=(-0.349895838053)*x[0]+(1.50602760725)*x[1]+(-0.959979406715)*x[2]
-        arg[0,2,2,0]=(-0.618802027626)*x[0]+(0.71544179402)*x[1]+(1.09297898989)*x[2]
-        arg[0,2,2,1]=(-0.264932530879)*x[0]+(-1.4100323815)*x[1]+(-1.28423925034)*x[2]
-        arg[0,3,0,0]=(0.481724893561)*x[0]+(-0.546248388253)*x[1]+(-0.214332802735)*x[2]
-        arg[0,3,0,1]=(-1.33293479098)*x[0]+(0.989294320484)*x[1]+(-0.561974021785)*x[2]
-        arg[0,3,1,0]=(-0.394718780001)*x[0]+(1.0043343416)*x[1]+(1.51370839793)*x[2]
-        arg[0,3,1,1]=(1.08238957373)*x[0]+(0.591631122094)*x[1]+(0.075283954318)*x[2]
-        arg[0,3,2,0]=(-1.0250149161)*x[0]+(-0.739848118412)*x[1]+(0.736595112789)*x[2]
-        arg[0,3,2,1]=(-1.08033009366)*x[0]+(-0.574926147021)*x[1]+(0.421251948724)*x[2]
-        arg[0,4,0,0]=(-0.0894466241931)*x[0]+(1.14935896473)*x[1]+(-0.490410015077)*x[2]
-        arg[0,4,0,1]=(1.07777309372)*x[0]+(1.0672971936)*x[1]+(0.340143160972)*x[2]
-        arg[0,4,1,0]=(0.905553949676)*x[0]+(0.171320798438)*x[1]+(1.83634812891)*x[2]
-        arg[0,4,1,1]=(-0.663516264963)*x[0]+(0.14871937304)*x[1]+(-0.697949666962)*x[2]
-        arg[0,4,2,0]=(1.41806579095)*x[0]+(0.0357313086623)*x[1]+(0.110846683649)*x[2]
-        arg[0,4,2,1]=(-0.31919270211)*x[0]+(-1.651049084)*x[1]+(-1.47528307262)*x[2]
-        arg[1,0,0,0]=(0.167209321535)*x[0]+(-1.13066332212)*x[1]+(0.209489173491)*x[2]
-        arg[1,0,0,1]=(1.45770122794)*x[0]+(1.12024118263)*x[1]+(0.0203526002602)*x[2]
-        arg[1,0,1,0]=(0.180403238696)*x[0]+(0.580625819717)*x[1]+(-1.00882441351)*x[2]
-        arg[1,0,1,1]=(-0.20671421669)*x[0]+(-0.199445466326)*x[1]+(0.887365974398)*x[2]
-        arg[1,0,2,0]=(-0.0109233374932)*x[0]+(0.835241335188)*x[1]+(-0.810658050514)*x[2]
-        arg[1,0,2,1]=(-1.45991974539)*x[0]+(0.955399748215)*x[1]+(0.398673469474)*x[2]
-        arg[1,1,0,0]=(0.726687414113)*x[0]+(-1.35343793545)*x[1]+(0.750079540417)*x[2]
-        arg[1,1,0,1]=(-0.677871860083)*x[0]+(-1.56756818572)*x[1]+(-0.240923946416)*x[2]
-        arg[1,1,1,0]=(-1.05791511835)*x[0]+(-0.425827952234)*x[1]+(-1.82875340474)*x[2]
-        arg[1,1,1,1]=(-0.430783664297)*x[0]+(0.552238591434)*x[1]+(0.502702385375)*x[2]
-        arg[1,1,2,0]=(0.240203734777)*x[0]+(-0.0650121194654)*x[1]+(1.04662204076)*x[2]
-        arg[1,1,2,1]=(-0.25305133215)*x[0]+(-0.31486026571)*x[1]+(-1.83073697314)*x[2]
-        arg[1,2,0,0]=(-1.09643062195)*x[0]+(-0.437887555247)*x[1]+(-1.33970467276)*x[2]
-        arg[1,2,0,1]=(1.24489646204)*x[0]+(1.0714412157)*x[1]+(-0.192090595585)*x[2]
-        arg[1,2,1,0]=(0.029290840641)*x[0]+(-0.940655160496)*x[1]+(-0.820414570983)*x[2]
-        arg[1,2,1,1]=(-0.677190307386)*x[0]+(-0.00164385522847)*x[1]+(-0.46460277293)*x[2]
-        arg[1,2,2,0]=(-0.320006508895)*x[0]+(1.13412133331)*x[1]+(-0.619705535377)*x[2]
-        arg[1,2,2,1]=(-0.0220330715863)*x[0]+(-0.64687567378)*x[1]+(0.0957350181768)*x[2]
-        arg[1,3,0,0]=(-0.25073330162)*x[0]+(0.85795600432)*x[1]+(1.53293778947)*x[2]
-        arg[1,3,0,1]=(-0.183346360622)*x[0]+(0.266035391885)*x[1]+(-0.422228348627)*x[2]
-        arg[1,3,1,0]=(-0.41587781442)*x[0]+(-0.0103068212789)*x[1]+(0.440665738388)*x[2]
-        arg[1,3,1,1]=(1.41825912495)*x[0]+(-0.0611650685825)*x[1]+(0.972511387093)*x[2]
-        arg[1,3,2,0]=(-0.336532230508)*x[0]+(-0.0123275905127)*x[1]+(-0.254643420879)*x[2]
-        arg[1,3,2,1]=(-0.365437122858)*x[0]+(0.71384297093)*x[1]+(0.447802028475)*x[2]
-        arg[1,4,0,0]=(1.33371172009)*x[0]+(1.16948649723)*x[1]+(-0.624453779138)*x[2]
-        arg[1,4,0,1]=(0.0919647304743)*x[0]+(1.20509307321)*x[1]+(0.454668856107)*x[2]
-        arg[1,4,1,0]=(0.179837036326)*x[0]+(1.27470487309)*x[1]+(0.248127557917)*x[2]
-        arg[1,4,1,1]=(-0.0163592123585)*x[0]+(-1.09373628426)*x[1]+(-1.07284707536)*x[2]
-        arg[1,4,2,0]=(-0.0617954247638)*x[0]+(0.180336071139)*x[1]+(0.0715760255435)*x[2]
-        arg[1,4,2,1]=(0.449148667011)*x[0]+(0.476092516356)*x[1]+(-0.235672424702)*x[2]
-        arg[2,0,0,0]=(1.06662096238)*x[0]+(1.52079387843)*x[1]+(-0.465087313097)*x[2]
-        arg[2,0,0,1]=(-0.0113962755891)*x[0]+(0.459517781034)*x[1]+(0.423861505703)*x[2]
-        arg[2,0,1,0]=(1.19571956088)*x[0]+(1.02444853474)*x[1]+(-1.31054246173)*x[2]
-        arg[2,0,1,1]=(-1.39536067914)*x[0]+(0.884184554143)*x[1]+(-0.650926411157)*x[2]
-        arg[2,0,2,0]=(-0.328672728946)*x[0]+(1.07247782219)*x[1]+(-0.61103916867)*x[2]
-        arg[2,0,2,1]=(0.155304775433)*x[0]+(-1.34794080729)*x[1]+(-0.931891854948)*x[2]
-        arg[2,1,0,0]=(-0.953726622792)*x[0]+(0.483614421199)*x[1]+(1.07026616662)*x[2]
-        arg[2,1,0,1]=(0.720797127905)*x[0]+(1.31309704242)*x[1]+(0.534213389945)*x[2]
-        arg[2,1,1,0]=(1.12642665973)*x[0]+(-0.375134467285)*x[1]+(0.223566393552)*x[2]
-        arg[2,1,1,1]=(-0.380892997026)*x[0]+(-0.661627351046)*x[1]+(0.596842673155)*x[2]
-        arg[2,1,2,0]=(0.233212348554)*x[0]+(0.106673294307)*x[1]+(-0.22268427628)*x[2]
-        arg[2,1,2,1]=(0.67982223365)*x[0]+(-1.53842407155)*x[1]+(0.995328875213)*x[2]
-        arg[2,2,0,0]=(1.5835734841)*x[0]+(0.178824495609)*x[1]+(-0.31332770355)*x[2]
-        arg[2,2,0,1]=(0.101063103927)*x[0]+(-0.0437670737377)*x[1]+(-0.109514170393)*x[2]
-        arg[2,2,1,0]=(-0.892614006193)*x[0]+(0.952803608394)*x[1]+(-0.643308315526)*x[2]
-        arg[2,2,1,1]=(-0.0606310193159)*x[0]+(-0.768822197122)*x[1]+(-1.43018654257)*x[2]
-        arg[2,2,2,0]=(0.107463856971)*x[0]+(1.27309352669)*x[1]+(1.65234673057)*x[2]
-        arg[2,2,2,1]=(0.699315319729)*x[0]+(-0.345960580793)*x[1]+(-1.61621444026)*x[2]
-        arg[2,3,0,0]=(0.9761936338)*x[0]+(0.665547749873)*x[1]+(-1.07512721449)*x[2]
-        arg[2,3,0,1]=(1.26182572924)*x[0]+(-0.416232568884)*x[1]+(-0.356737405174)*x[2]
-        arg[2,3,1,0]=(-0.477958253427)*x[0]+(0.198049156904)*x[1]+(-0.295022782364)*x[2]
-        arg[2,3,1,1]=(0.412187471103)*x[0]+(0.335655056628)*x[1]+(-0.0873658679329)*x[2]
-        arg[2,3,2,0]=(0.168439409327)*x[0]+(-0.131948711409)*x[1]+(1.66777364846)*x[2]
-        arg[2,3,2,1]=(0.508795552378)*x[0]+(-0.390505460243)*x[1]+(0.13190717559)*x[2]
-        arg[2,4,0,0]=(0.446543094067)*x[0]+(-1.49620720862)*x[1]+(-1.23581717894)*x[2]
-        arg[2,4,0,1]=(-0.964404449625)*x[0]+(0.229523164331)*x[1]+(-0.0829574431644)*x[2]
-        arg[2,4,1,0]=(-0.0222885761611)*x[0]+(-0.151419169433)*x[1]+(0.0521007301341)*x[2]
-        arg[2,4,1,1]=(-0.299232945099)*x[0]+(0.831745448311)*x[1]+(0.0354480204711)*x[2]
-        arg[2,4,2,0]=(0.350303784953)*x[0]+(0.0608299778701)*x[1]+(1.10333111365)*x[2]
-        arg[2,4,2,1]=(0.719573610926)*x[0]+(-0.0868905011544)*x[1]+(0.852804030732)*x[2]
-        arg[3,0,0,0]=(0.643070908885)*x[0]+(0.846705112025)*x[1]+(-0.340473447494)*x[2]
-        arg[3,0,0,1]=(-0.180433440729)*x[0]+(1.20490149625)*x[1]+(1.65034499912)*x[2]
-        arg[3,0,1,0]=(-0.454239570444)*x[0]+(0.425446741192)*x[1]+(0.469566134089)*x[2]
-        arg[3,0,1,1]=(-0.080272513364)*x[0]+(-0.437416002114)*x[1]+(0.741423922011)*x[2]
-        arg[3,0,2,0]=(0.0202920395247)*x[0]+(0.724451134981)*x[1]+(-0.628631137287)*x[2]
-        arg[3,0,2,1]=(1.27329890828)*x[0]+(1.32598594097)*x[1]+(-1.03893516914)*x[2]
-        arg[3,1,0,0]=(-0.316679599208)*x[0]+(1.37172239358)*x[1]+(-0.333448830595)*x[2]
-        arg[3,1,0,1]=(-0.97422120848)*x[0]+(-0.800596641862)*x[1]+(1.21296910893)*x[2]
-        arg[3,1,1,0]=(-0.791725431754)*x[0]+(0.173363698424)*x[1]+(-0.137920990647)*x[2]
-        arg[3,1,1,1]=(-0.104259554446)*x[0]+(1.14966042893)*x[1]+(0.694287361582)*x[2]
-        arg[3,1,2,0]=(0.130345878498)*x[0]+(0.186936528352)*x[1]+(-1.74442226692)*x[2]
-        arg[3,1,2,1]=(-0.952031053033)*x[0]+(0.718038193789)*x[1]+(-0.912958209036)*x[2]
-        arg[3,2,0,0]=(-1.16180973047)*x[0]+(0.0107173530275)*x[1]+(1.30278786691)*x[2]
-        arg[3,2,0,1]=(-0.224509227379)*x[0]+(0.0996327632409)*x[1]+(-0.590950424929)*x[2]
-        arg[3,2,1,0]=(1.37202300472)*x[0]+(-1.46745698646)*x[1]+(-0.811483806572)*x[2]
-        arg[3,2,1,1]=(1.4828065241)*x[0]+(-0.177365694124)*x[1]+(0.723931620237)*x[2]
-        arg[3,2,2,0]=(0.230529059637)*x[0]+(0.728445639896)*x[1]+(-0.566988770509)*x[2]
-        arg[3,2,2,1]=(0.797697737992)*x[0]+(-1.13322423945)*x[1]+(-1.1409387296)*x[2]
-        arg[3,3,0,0]=(0.217205133789)*x[0]+(-0.510677603419)*x[1]+(-0.580535665335)*x[2]
-        arg[3,3,0,1]=(-0.388656568244)*x[0]+(-0.906189671302)*x[1]+(0.44802765855)*x[2]
-        arg[3,3,1,0]=(0.13492738758)*x[0]+(-0.0523341874741)*x[1]+(1.42846176777)*x[2]
-        arg[3,3,1,1]=(0.243377010926)*x[0]+(-0.701174291473)*x[1]+(-0.756059212704)*x[2]
-        arg[3,3,2,0]=(1.48359083301)*x[0]+(1.17692500152)*x[1]+(-0.184437593764)*x[2]
-        arg[3,3,2,1]=(-0.105457636222)*x[0]+(-0.0190796656068)*x[1]+(-0.938560206034)*x[2]
-        arg[3,4,0,0]=(-0.101684388703)*x[0]+(-1.19809056647)*x[1]+(1.1989510907)*x[2]
-        arg[3,4,0,1]=(-1.0745487924)*x[0]+(-0.37560532919)*x[1]+(-0.967022985879)*x[2]
-        arg[3,4,1,0]=(0.315585027641)*x[0]+(-0.238716421886)*x[1]+(-0.275850551625)*x[2]
-        arg[3,4,1,1]=(-0.824271180248)*x[0]+(-0.0649845724269)*x[1]+(0.530472696035)*x[2]
-        arg[3,4,2,0]=(-0.518165130932)*x[0]+(1.44722596827)*x[1]+(0.072367534289)*x[2]
-        arg[3,4,2,1]=(-0.247477354356)*x[0]+(0.988584526142)*x[1]+(0.0491978506036)*x[2]
-        ref[0,0,0,0]=(0.523374388946)*x_ref[0]+(-0.462029311047)*x_ref[1]+(-0.47732568751)*x_ref[2]
-        ref[0,0,0,1]=(0.641437288282)*x_ref[0]+(-0.245967769804)*x_ref[1]+(-0.882711488334)*x_ref[2]
-        ref[0,0,1,0]=(-0.039075405101)*x_ref[0]+(0.233479040723)*x_ref[1]+(-0.450244284473)*x_ref[2]
-        ref[0,0,1,1]=(-1.00711630706)*x_ref[0]+(-0.247720707527)*x_ref[1]+(-0.597073422746)*x_ref[2]
-        ref[0,0,2,0]=(0.141738833983)*x_ref[0]+(-1.34846391496)*x_ref[1]+(0.214891803475)*x_ref[2]
-        ref[0,0,2,1]=(0.276967719755)*x_ref[0]+(-0.64300940909)*x_ref[1]+(-1.10068852616)*x_ref[2]
-        ref[0,1,0,0]=(0.438911917989)*x_ref[0]+(0.588137625057)*x_ref[1]+(0.744848057181)*x_ref[2]
-        ref[0,1,0,1]=(0.266343859518)*x_ref[0]+(1.24092635599)*x_ref[1]+(0.477206170905)*x_ref[2]
-        ref[0,1,1,0]=(0.328857688358)*x_ref[0]+(-1.17720038645)*x_ref[1]+(0.285045368661)*x_ref[2]
-        ref[0,1,1,1]=(-0.0985505878353)*x_ref[0]+(1.11228710542)*x_ref[1]+(0.159347839514)*x_ref[2]
-        ref[0,1,2,0]=(0.125378210814)*x_ref[0]+(1.51252392793)*x_ref[1]+(-0.0402281595871)*x_ref[2]
-        ref[0,1,2,1]=(-1.41964435548)*x_ref[0]+(0.825108246489)*x_ref[1]+(0.31679169508)*x_ref[2]
-        ref[0,2,0,0]=(1.47728541117)*x_ref[0]+(0.957708443424)*x_ref[1]+(-0.187892562217)*x_ref[2]
-        ref[0,2,0,1]=(0.0614505001405)*x_ref[0]+(0.144444072992)*x_ref[1]+(0.287839563179)*x_ref[2]
-        ref[0,2,1,0]=(0.512698173313)*x_ref[0]+(0.316852993542)*x_ref[1]+(0.538020705489)*x_ref[2]
-        ref[0,2,1,1]=(-0.349895838053)*x_ref[0]+(1.50602760725)*x_ref[1]+(-0.959979406715)*x_ref[2]
-        ref[0,2,2,0]=(-0.618802027626)*x_ref[0]+(0.71544179402)*x_ref[1]+(1.09297898989)*x_ref[2]
-        ref[0,2,2,1]=(-0.264932530879)*x_ref[0]+(-1.4100323815)*x_ref[1]+(-1.28423925034)*x_ref[2]
-        ref[0,3,0,0]=(0.481724893561)*x_ref[0]+(-0.546248388253)*x_ref[1]+(-0.214332802735)*x_ref[2]
-        ref[0,3,0,1]=(-1.33293479098)*x_ref[0]+(0.989294320484)*x_ref[1]+(-0.561974021785)*x_ref[2]
-        ref[0,3,1,0]=(-0.394718780001)*x_ref[0]+(1.0043343416)*x_ref[1]+(1.51370839793)*x_ref[2]
-        ref[0,3,1,1]=(1.08238957373)*x_ref[0]+(0.591631122094)*x_ref[1]+(0.075283954318)*x_ref[2]
-        ref[0,3,2,0]=(-1.0250149161)*x_ref[0]+(-0.739848118412)*x_ref[1]+(0.736595112789)*x_ref[2]
-        ref[0,3,2,1]=(-1.08033009366)*x_ref[0]+(-0.574926147021)*x_ref[1]+(0.421251948724)*x_ref[2]
-        ref[0,4,0,0]=(-0.0894466241931)*x_ref[0]+(1.14935896473)*x_ref[1]+(-0.490410015077)*x_ref[2]
-        ref[0,4,0,1]=(1.07777309372)*x_ref[0]+(1.0672971936)*x_ref[1]+(0.340143160972)*x_ref[2]
-        ref[0,4,1,0]=(0.905553949676)*x_ref[0]+(0.171320798438)*x_ref[1]+(1.83634812891)*x_ref[2]
-        ref[0,4,1,1]=(-0.663516264963)*x_ref[0]+(0.14871937304)*x_ref[1]+(-0.697949666962)*x_ref[2]
-        ref[0,4,2,0]=(1.41806579095)*x_ref[0]+(0.0357313086623)*x_ref[1]+(0.110846683649)*x_ref[2]
-        ref[0,4,2,1]=(-0.31919270211)*x_ref[0]+(-1.651049084)*x_ref[1]+(-1.47528307262)*x_ref[2]
-        ref[1,0,0,0]=(0.167209321535)*x_ref[0]+(-1.13066332212)*x_ref[1]+(0.209489173491)*x_ref[2]
-        ref[1,0,0,1]=(1.45770122794)*x_ref[0]+(1.12024118263)*x_ref[1]+(0.0203526002602)*x_ref[2]
-        ref[1,0,1,0]=(0.180403238696)*x_ref[0]+(0.580625819717)*x_ref[1]+(-1.00882441351)*x_ref[2]
-        ref[1,0,1,1]=(-0.20671421669)*x_ref[0]+(-0.199445466326)*x_ref[1]+(0.887365974398)*x_ref[2]
-        ref[1,0,2,0]=(-0.0109233374932)*x_ref[0]+(0.835241335188)*x_ref[1]+(-0.810658050514)*x_ref[2]
-        ref[1,0,2,1]=(-1.45991974539)*x_ref[0]+(0.955399748215)*x_ref[1]+(0.398673469474)*x_ref[2]
-        ref[1,1,0,0]=(0.726687414113)*x_ref[0]+(-1.35343793545)*x_ref[1]+(0.750079540417)*x_ref[2]
-        ref[1,1,0,1]=(-0.677871860083)*x_ref[0]+(-1.56756818572)*x_ref[1]+(-0.240923946416)*x_ref[2]
-        ref[1,1,1,0]=(-1.05791511835)*x_ref[0]+(-0.425827952234)*x_ref[1]+(-1.82875340474)*x_ref[2]
-        ref[1,1,1,1]=(-0.430783664297)*x_ref[0]+(0.552238591434)*x_ref[1]+(0.502702385375)*x_ref[2]
-        ref[1,1,2,0]=(0.240203734777)*x_ref[0]+(-0.0650121194654)*x_ref[1]+(1.04662204076)*x_ref[2]
-        ref[1,1,2,1]=(-0.25305133215)*x_ref[0]+(-0.31486026571)*x_ref[1]+(-1.83073697314)*x_ref[2]
-        ref[1,2,0,0]=(-1.09643062195)*x_ref[0]+(-0.437887555247)*x_ref[1]+(-1.33970467276)*x_ref[2]
-        ref[1,2,0,1]=(1.24489646204)*x_ref[0]+(1.0714412157)*x_ref[1]+(-0.192090595585)*x_ref[2]
-        ref[1,2,1,0]=(0.029290840641)*x_ref[0]+(-0.940655160496)*x_ref[1]+(-0.820414570983)*x_ref[2]
-        ref[1,2,1,1]=(-0.677190307386)*x_ref[0]+(-0.00164385522847)*x_ref[1]+(-0.46460277293)*x_ref[2]
-        ref[1,2,2,0]=(-0.320006508895)*x_ref[0]+(1.13412133331)*x_ref[1]+(-0.619705535377)*x_ref[2]
-        ref[1,2,2,1]=(-0.0220330715863)*x_ref[0]+(-0.64687567378)*x_ref[1]+(0.0957350181768)*x_ref[2]
-        ref[1,3,0,0]=(-0.25073330162)*x_ref[0]+(0.85795600432)*x_ref[1]+(1.53293778947)*x_ref[2]
-        ref[1,3,0,1]=(-0.183346360622)*x_ref[0]+(0.266035391885)*x_ref[1]+(-0.422228348627)*x_ref[2]
-        ref[1,3,1,0]=(-0.41587781442)*x_ref[0]+(-0.0103068212789)*x_ref[1]+(0.440665738388)*x_ref[2]
-        ref[1,3,1,1]=(1.41825912495)*x_ref[0]+(-0.0611650685825)*x_ref[1]+(0.972511387093)*x_ref[2]
-        ref[1,3,2,0]=(-0.336532230508)*x_ref[0]+(-0.0123275905127)*x_ref[1]+(-0.254643420879)*x_ref[2]
-        ref[1,3,2,1]=(-0.365437122858)*x_ref[0]+(0.71384297093)*x_ref[1]+(0.447802028475)*x_ref[2]
-        ref[1,4,0,0]=(1.33371172009)*x_ref[0]+(1.16948649723)*x_ref[1]+(-0.624453779138)*x_ref[2]
-        ref[1,4,0,1]=(0.0919647304743)*x_ref[0]+(1.20509307321)*x_ref[1]+(0.454668856107)*x_ref[2]
-        ref[1,4,1,0]=(0.179837036326)*x_ref[0]+(1.27470487309)*x_ref[1]+(0.248127557917)*x_ref[2]
-        ref[1,4,1,1]=(-0.0163592123585)*x_ref[0]+(-1.09373628426)*x_ref[1]+(-1.07284707536)*x_ref[2]
-        ref[1,4,2,0]=(-0.0617954247638)*x_ref[0]+(0.180336071139)*x_ref[1]+(0.0715760255435)*x_ref[2]
-        ref[1,4,2,1]=(0.449148667011)*x_ref[0]+(0.476092516356)*x_ref[1]+(-0.235672424702)*x_ref[2]
-        ref[2,0,0,0]=(1.06662096238)*x_ref[0]+(1.52079387843)*x_ref[1]+(-0.465087313097)*x_ref[2]
-        ref[2,0,0,1]=(-0.0113962755891)*x_ref[0]+(0.459517781034)*x_ref[1]+(0.423861505703)*x_ref[2]
-        ref[2,0,1,0]=(1.19571956088)*x_ref[0]+(1.02444853474)*x_ref[1]+(-1.31054246173)*x_ref[2]
-        ref[2,0,1,1]=(-1.39536067914)*x_ref[0]+(0.884184554143)*x_ref[1]+(-0.650926411157)*x_ref[2]
-        ref[2,0,2,0]=(-0.328672728946)*x_ref[0]+(1.07247782219)*x_ref[1]+(-0.61103916867)*x_ref[2]
-        ref[2,0,2,1]=(0.155304775433)*x_ref[0]+(-1.34794080729)*x_ref[1]+(-0.931891854948)*x_ref[2]
-        ref[2,1,0,0]=(-0.953726622792)*x_ref[0]+(0.483614421199)*x_ref[1]+(1.07026616662)*x_ref[2]
-        ref[2,1,0,1]=(0.720797127905)*x_ref[0]+(1.31309704242)*x_ref[1]+(0.534213389945)*x_ref[2]
-        ref[2,1,1,0]=(1.12642665973)*x_ref[0]+(-0.375134467285)*x_ref[1]+(0.223566393552)*x_ref[2]
-        ref[2,1,1,1]=(-0.380892997026)*x_ref[0]+(-0.661627351046)*x_ref[1]+(0.596842673155)*x_ref[2]
-        ref[2,1,2,0]=(0.233212348554)*x_ref[0]+(0.106673294307)*x_ref[1]+(-0.22268427628)*x_ref[2]
-        ref[2,1,2,1]=(0.67982223365)*x_ref[0]+(-1.53842407155)*x_ref[1]+(0.995328875213)*x_ref[2]
-        ref[2,2,0,0]=(1.5835734841)*x_ref[0]+(0.178824495609)*x_ref[1]+(-0.31332770355)*x_ref[2]
-        ref[2,2,0,1]=(0.101063103927)*x_ref[0]+(-0.0437670737377)*x_ref[1]+(-0.109514170393)*x_ref[2]
-        ref[2,2,1,0]=(-0.892614006193)*x_ref[0]+(0.952803608394)*x_ref[1]+(-0.643308315526)*x_ref[2]
-        ref[2,2,1,1]=(-0.0606310193159)*x_ref[0]+(-0.768822197122)*x_ref[1]+(-1.43018654257)*x_ref[2]
-        ref[2,2,2,0]=(0.107463856971)*x_ref[0]+(1.27309352669)*x_ref[1]+(1.65234673057)*x_ref[2]
-        ref[2,2,2,1]=(0.699315319729)*x_ref[0]+(-0.345960580793)*x_ref[1]+(-1.61621444026)*x_ref[2]
-        ref[2,3,0,0]=(0.9761936338)*x_ref[0]+(0.665547749873)*x_ref[1]+(-1.07512721449)*x_ref[2]
-        ref[2,3,0,1]=(1.26182572924)*x_ref[0]+(-0.416232568884)*x_ref[1]+(-0.356737405174)*x_ref[2]
-        ref[2,3,1,0]=(-0.477958253427)*x_ref[0]+(0.198049156904)*x_ref[1]+(-0.295022782364)*x_ref[2]
-        ref[2,3,1,1]=(0.412187471103)*x_ref[0]+(0.335655056628)*x_ref[1]+(-0.0873658679329)*x_ref[2]
-        ref[2,3,2,0]=(0.168439409327)*x_ref[0]+(-0.131948711409)*x_ref[1]+(1.66777364846)*x_ref[2]
-        ref[2,3,2,1]=(0.508795552378)*x_ref[0]+(-0.390505460243)*x_ref[1]+(0.13190717559)*x_ref[2]
-        ref[2,4,0,0]=(0.446543094067)*x_ref[0]+(-1.49620720862)*x_ref[1]+(-1.23581717894)*x_ref[2]
-        ref[2,4,0,1]=(-0.964404449625)*x_ref[0]+(0.229523164331)*x_ref[1]+(-0.0829574431644)*x_ref[2]
-        ref[2,4,1,0]=(-0.0222885761611)*x_ref[0]+(-0.151419169433)*x_ref[1]+(0.0521007301341)*x_ref[2]
-        ref[2,4,1,1]=(-0.299232945099)*x_ref[0]+(0.831745448311)*x_ref[1]+(0.0354480204711)*x_ref[2]
-        ref[2,4,2,0]=(0.350303784953)*x_ref[0]+(0.0608299778701)*x_ref[1]+(1.10333111365)*x_ref[2]
-        ref[2,4,2,1]=(0.719573610926)*x_ref[0]+(-0.0868905011544)*x_ref[1]+(0.852804030732)*x_ref[2]
-        ref[3,0,0,0]=(0.643070908885)*x_ref[0]+(0.846705112025)*x_ref[1]+(-0.340473447494)*x_ref[2]
-        ref[3,0,0,1]=(-0.180433440729)*x_ref[0]+(1.20490149625)*x_ref[1]+(1.65034499912)*x_ref[2]
-        ref[3,0,1,0]=(-0.454239570444)*x_ref[0]+(0.425446741192)*x_ref[1]+(0.469566134089)*x_ref[2]
-        ref[3,0,1,1]=(-0.080272513364)*x_ref[0]+(-0.437416002114)*x_ref[1]+(0.741423922011)*x_ref[2]
-        ref[3,0,2,0]=(0.0202920395247)*x_ref[0]+(0.724451134981)*x_ref[1]+(-0.628631137287)*x_ref[2]
-        ref[3,0,2,1]=(1.27329890828)*x_ref[0]+(1.32598594097)*x_ref[1]+(-1.03893516914)*x_ref[2]
-        ref[3,1,0,0]=(-0.316679599208)*x_ref[0]+(1.37172239358)*x_ref[1]+(-0.333448830595)*x_ref[2]
-        ref[3,1,0,1]=(-0.97422120848)*x_ref[0]+(-0.800596641862)*x_ref[1]+(1.21296910893)*x_ref[2]
-        ref[3,1,1,0]=(-0.791725431754)*x_ref[0]+(0.173363698424)*x_ref[1]+(-0.137920990647)*x_ref[2]
-        ref[3,1,1,1]=(-0.104259554446)*x_ref[0]+(1.14966042893)*x_ref[1]+(0.694287361582)*x_ref[2]
-        ref[3,1,2,0]=(0.130345878498)*x_ref[0]+(0.186936528352)*x_ref[1]+(-1.74442226692)*x_ref[2]
-        ref[3,1,2,1]=(-0.952031053033)*x_ref[0]+(0.718038193789)*x_ref[1]+(-0.912958209036)*x_ref[2]
-        ref[3,2,0,0]=(-1.16180973047)*x_ref[0]+(0.0107173530275)*x_ref[1]+(1.30278786691)*x_ref[2]
-        ref[3,2,0,1]=(-0.224509227379)*x_ref[0]+(0.0996327632409)*x_ref[1]+(-0.590950424929)*x_ref[2]
-        ref[3,2,1,0]=(1.37202300472)*x_ref[0]+(-1.46745698646)*x_ref[1]+(-0.811483806572)*x_ref[2]
-        ref[3,2,1,1]=(1.4828065241)*x_ref[0]+(-0.177365694124)*x_ref[1]+(0.723931620237)*x_ref[2]
-        ref[3,2,2,0]=(0.230529059637)*x_ref[0]+(0.728445639896)*x_ref[1]+(-0.566988770509)*x_ref[2]
-        ref[3,2,2,1]=(0.797697737992)*x_ref[0]+(-1.13322423945)*x_ref[1]+(-1.1409387296)*x_ref[2]
-        ref[3,3,0,0]=(0.217205133789)*x_ref[0]+(-0.510677603419)*x_ref[1]+(-0.580535665335)*x_ref[2]
-        ref[3,3,0,1]=(-0.388656568244)*x_ref[0]+(-0.906189671302)*x_ref[1]+(0.44802765855)*x_ref[2]
-        ref[3,3,1,0]=(0.13492738758)*x_ref[0]+(-0.0523341874741)*x_ref[1]+(1.42846176777)*x_ref[2]
-        ref[3,3,1,1]=(0.243377010926)*x_ref[0]+(-0.701174291473)*x_ref[1]+(-0.756059212704)*x_ref[2]
-        ref[3,3,2,0]=(1.48359083301)*x_ref[0]+(1.17692500152)*x_ref[1]+(-0.184437593764)*x_ref[2]
-        ref[3,3,2,1]=(-0.105457636222)*x_ref[0]+(-0.0190796656068)*x_ref[1]+(-0.938560206034)*x_ref[2]
-        ref[3,4,0,0]=(-0.101684388703)*x_ref[0]+(-1.19809056647)*x_ref[1]+(1.1989510907)*x_ref[2]
-        ref[3,4,0,1]=(-1.0745487924)*x_ref[0]+(-0.37560532919)*x_ref[1]+(-0.967022985879)*x_ref[2]
-        ref[3,4,1,0]=(0.315585027641)*x_ref[0]+(-0.238716421886)*x_ref[1]+(-0.275850551625)*x_ref[2]
-        ref[3,4,1,1]=(-0.824271180248)*x_ref[0]+(-0.0649845724269)*x_ref[1]+(0.530472696035)*x_ref[2]
-        ref[3,4,2,0]=(-0.518165130932)*x_ref[0]+(1.44722596827)*x_ref[1]+(0.072367534289)*x_ref[2]
-        ref[3,4,2,1]=(-0.247477354356)*x_ref[0]+(0.988584526142)*x_ref[1]+(0.0491978506036)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(1.66854814732)*x[0]+(1.38199165128)*x[1]
-        ref=(1.66854814732)*x_ref[0]+(1.38199165128)*x_ref[1]
-      else:
-        arg=(-0.426142624852)*x[0]+(0.0492229050252)*x[1]+(-0.821661899519)*x[2]
-        ref=(-0.426142624852)*x_ref[0]+(0.0492229050252)*x_ref[1]+(-0.821661899519)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        arg[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-        ref[0]=(0.287050581427)*x[0]+(0.0745644988438)*x[1]
-        ref[1]=(-0.279090829341)*x[0]+(-0.100758565381)*x[1]
-      else:
-        arg[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        arg[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-        ref[0]=(-0.367806366245)*x[0]+(0.0185557433717)*x[1]+(1.14806419827)*x[2]
-        ref[1]=(-0.588016618937)*x[0]+(-1.03057423712)*x[1]+(-0.0359765566708)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.178459116054)*x[0]+(-0.908190366917)*x[1]
-        arg[0,1]=(-0.365861276878)*x[0]+(-1.57557211363)*x[1]
-        arg[0,2]=(-1.22266296874)*x[0]+(0.476090041507)*x[1]
-        arg[0,3]=(0.0677955238995)*x[0]+(-0.899620825938)*x[1]
-        arg[0,4]=(-0.29315929952)*x[0]+(-0.0589414650397)*x[1]
-        arg[1,0]=(-0.510486453858)*x[0]+(0.960724573137)*x[1]
-        arg[1,1]=(-0.316955543)*x[0]+(-0.160275601404)*x[1]
-        arg[1,2]=(-0.960162300557)*x[0]+(0.426685726779)*x[1]
-        arg[1,3]=(-0.458645373633)*x[0]+(0.623646469232)*x[1]
-        arg[1,4]=(-0.831993675808)*x[0]+(-0.380162434858)*x[1]
-        arg[2,0]=(-0.0614446129662)*x[0]+(0.442134320884)*x[1]
-        arg[2,1]=(-0.0466135888936)*x[0]+(0.465021672347)*x[1]
-        arg[2,2]=(-1.69520946599)*x[0]+(-1.69200166455)*x[1]
-        arg[2,3]=(0.928809309584)*x[0]+(-0.344012063367)*x[1]
-        arg[2,4]=(0.557754072268)*x[0]+(-0.0104949991147)*x[1]
-        arg[3,0]=(0.0683969753885)*x[0]+(1.59892831147)*x[1]
-        arg[3,1]=(0.90059768275)*x[0]+(1.4136644906)*x[1]
-        arg[3,2]=(-0.397873855228)*x[0]+(-0.876192378488)*x[1]
-        arg[3,3]=(-1.71837532502)*x[0]+(-0.911585940448)*x[1]
-        arg[3,4]=(-1.619565287)*x[0]+(-0.911830282675)*x[1]
-        ref[0,0]=(-0.178459116054)*x_ref[0]+(-0.908190366917)*x_ref[1]
-        ref[0,1]=(-0.365861276878)*x_ref[0]+(-1.57557211363)*x_ref[1]
-        ref[0,2]=(-1.22266296874)*x_ref[0]+(0.476090041507)*x_ref[1]
-        ref[0,3]=(0.0677955238995)*x_ref[0]+(-0.899620825938)*x_ref[1]
-        ref[0,4]=(-0.29315929952)*x_ref[0]+(-0.0589414650397)*x_ref[1]
-        ref[1,0]=(-0.510486453858)*x_ref[0]+(0.960724573137)*x_ref[1]
-        ref[1,1]=(-0.316955543)*x_ref[0]+(-0.160275601404)*x_ref[1]
-        ref[1,2]=(-0.960162300557)*x_ref[0]+(0.426685726779)*x_ref[1]
-        ref[1,3]=(-0.458645373633)*x_ref[0]+(0.623646469232)*x_ref[1]
-        ref[1,4]=(-0.831993675808)*x_ref[0]+(-0.380162434858)*x_ref[1]
-        ref[2,0]=(-0.0614446129662)*x_ref[0]+(0.442134320884)*x_ref[1]
-        ref[2,1]=(-0.0466135888936)*x_ref[0]+(0.465021672347)*x_ref[1]
-        ref[2,2]=(-1.69520946599)*x_ref[0]+(-1.69200166455)*x_ref[1]
-        ref[2,3]=(0.928809309584)*x_ref[0]+(-0.344012063367)*x_ref[1]
-        ref[2,4]=(0.557754072268)*x_ref[0]+(-0.0104949991147)*x_ref[1]
-        ref[3,0]=(0.0683969753885)*x_ref[0]+(1.59892831147)*x_ref[1]
-        ref[3,1]=(0.90059768275)*x_ref[0]+(1.4136644906)*x_ref[1]
-        ref[3,2]=(-0.397873855228)*x_ref[0]+(-0.876192378488)*x_ref[1]
-        ref[3,3]=(-1.71837532502)*x_ref[0]+(-0.911585940448)*x_ref[1]
-        ref[3,4]=(-1.619565287)*x_ref[0]+(-0.911830282675)*x_ref[1]
-      else:
-        arg[0,0]=(-0.822599790066)*x[0]+(-1.22492139307)*x[1]+(-0.696878025616)*x[2]
-        arg[0,1]=(0.600762284033)*x[0]+(-0.157734608915)*x[1]+(-0.729304703393)*x[2]
-        arg[0,2]=(-1.42910707426)*x[0]+(1.46395956796)*x[1]+(1.38800770798)*x[2]
-        arg[0,3]=(1.2198448221)*x[0]+(0.0898753488356)*x[1]+(0.976038279019)*x[2]
-        arg[0,4]=(-0.616927403743)*x[0]+(1.41159934363)*x[1]+(-1.74783039584)*x[2]
-        arg[1,0]=(-0.101387750238)*x[0]+(-0.294997280251)*x[1]+(0.247605331103)*x[2]
-        arg[1,1]=(-0.320864335195)*x[0]+(-0.202828013922)*x[1]+(-0.366246434001)*x[2]
-        arg[1,2]=(-0.827685495006)*x[0]+(-0.236835428287)*x[1]+(-1.48668813903)*x[2]
-        arg[1,3]=(0.56131602615)*x[0]+(-0.572858337349)*x[1]+(0.701775515666)*x[2]
-        arg[1,4]=(-1.09228098916)*x[0]+(-0.0251387524711)*x[1]+(1.91587136325)*x[2]
-        arg[2,0]=(-0.0758503728265)*x[0]+(0.236248603718)*x[1]+(0.0446858988194)*x[2]
-        arg[2,1]=(-1.1745073907)*x[0]+(-0.519328441654)*x[1]+(-1.19738117811)*x[2]
-        arg[2,2]=(-0.018812738143)*x[0]+(1.00051415805)*x[1]+(-0.620776442731)*x[2]
-        arg[2,3]=(-0.430333705208)*x[0]+(0.136368267739)*x[1]+(0.59767563861)*x[2]
-        arg[2,4]=(1.54336203988)*x[0]+(0.106189845211)*x[1]+(1.53097571242)*x[2]
-        arg[3,0]=(-0.00451956527502)*x[0]+(0.710318142757)*x[1]+(0.386947317474)*x[2]
-        arg[3,1]=(1.22013531098)*x[0]+(-0.735641779691)*x[1]+(-0.0137925239152)*x[2]
-        arg[3,2]=(0.0949363128405)*x[0]+(-0.0778790744582)*x[1]+(-0.466004036944)*x[2]
-        arg[3,3]=(0.656445527911)*x[0]+(1.67275242688)*x[1]+(-0.0946012389031)*x[2]
-        arg[3,4]=(0.927582093503)*x[0]+(-0.812773507566)*x[1]+(1.14365402059)*x[2]
-        ref[0,0]=(-0.822599790066)*x_ref[0]+(-1.22492139307)*x_ref[1]+(-0.696878025616)*x_ref[2]
-        ref[0,1]=(0.600762284033)*x_ref[0]+(-0.157734608915)*x_ref[1]+(-0.729304703393)*x_ref[2]
-        ref[0,2]=(-1.42910707426)*x_ref[0]+(1.46395956796)*x_ref[1]+(1.38800770798)*x_ref[2]
-        ref[0,3]=(1.2198448221)*x_ref[0]+(0.0898753488356)*x_ref[1]+(0.976038279019)*x_ref[2]
-        ref[0,4]=(-0.616927403743)*x_ref[0]+(1.41159934363)*x_ref[1]+(-1.74783039584)*x_ref[2]
-        ref[1,0]=(-0.101387750238)*x_ref[0]+(-0.294997280251)*x_ref[1]+(0.247605331103)*x_ref[2]
-        ref[1,1]=(-0.320864335195)*x_ref[0]+(-0.202828013922)*x_ref[1]+(-0.366246434001)*x_ref[2]
-        ref[1,2]=(-0.827685495006)*x_ref[0]+(-0.236835428287)*x_ref[1]+(-1.48668813903)*x_ref[2]
-        ref[1,3]=(0.56131602615)*x_ref[0]+(-0.572858337349)*x_ref[1]+(0.701775515666)*x_ref[2]
-        ref[1,4]=(-1.09228098916)*x_ref[0]+(-0.0251387524711)*x_ref[1]+(1.91587136325)*x_ref[2]
-        ref[2,0]=(-0.0758503728265)*x_ref[0]+(0.236248603718)*x_ref[1]+(0.0446858988194)*x_ref[2]
-        ref[2,1]=(-1.1745073907)*x_ref[0]+(-0.519328441654)*x_ref[1]+(-1.19738117811)*x_ref[2]
-        ref[2,2]=(-0.018812738143)*x_ref[0]+(1.00051415805)*x_ref[1]+(-0.620776442731)*x_ref[2]
-        ref[2,3]=(-0.430333705208)*x_ref[0]+(0.136368267739)*x_ref[1]+(0.59767563861)*x_ref[2]
-        ref[2,4]=(1.54336203988)*x_ref[0]+(0.106189845211)*x_ref[1]+(1.53097571242)*x_ref[2]
-        ref[3,0]=(-0.00451956527502)*x_ref[0]+(0.710318142757)*x_ref[1]+(0.386947317474)*x_ref[2]
-        ref[3,1]=(1.22013531098)*x_ref[0]+(-0.735641779691)*x_ref[1]+(-0.0137925239152)*x_ref[2]
-        ref[3,2]=(0.0949363128405)*x_ref[0]+(-0.0778790744582)*x_ref[1]+(-0.466004036944)*x_ref[2]
-        ref[3,3]=(0.656445527911)*x_ref[0]+(1.67275242688)*x_ref[1]+(-0.0946012389031)*x_ref[2]
-        ref[3,4]=(0.927582093503)*x_ref[0]+(-0.812773507566)*x_ref[1]+(1.14365402059)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(1.53783653017)*x[0]+(-0.262380397029)*x[1]
-        arg[0,0,1]=(0.0150173886328)*x[0]+(1.16643858096)*x[1]
-        arg[0,1,0]=(0.886211915116)*x[0]+(0.0707779287946)*x[1]
-        arg[0,1,1]=(-1.38689895895)*x[0]+(0.970706440444)*x[1]
-        arg[1,0,0]=(-0.923778075186)*x[0]+(1.93261160466)*x[1]
-        arg[1,0,1]=(1.03640566039)*x[0]+(-0.511763660443)*x[1]
-        arg[1,1,0]=(0.127401766462)*x[0]+(-0.472120435035)*x[1]
-        arg[1,1,1]=(-0.366402024047)*x[0]+(-0.396644605167)*x[1]
-        arg[2,0,0]=(-0.715041877609)*x[0]+(-1.00214766039)*x[1]
-        arg[2,0,1]=(-1.52452556675)*x[0]+(-0.570352600973)*x[1]
-        arg[2,1,0]=(0.730426967288)*x[0]+(0.158290182237)*x[1]
-        arg[2,1,1]=(-0.152190333299)*x[0]+(-0.254128104593)*x[1]
-        arg[3,0,0]=(0.835319813606)*x[0]+(-0.142845950855)*x[1]
-        arg[3,0,1]=(0.80118569153)*x[0]+(0.260295390539)*x[1]
-        arg[3,1,0]=(0.283151732104)*x[0]+(0.0284945097388)*x[1]
-        arg[3,1,1]=(-0.715345696074)*x[0]+(0.563181102176)*x[1]
-        arg[4,0,0]=(-0.481733499899)*x[0]+(1.30638761744)*x[1]
-        arg[4,0,1]=(-0.515540152341)*x[0]+(1.47724553596)*x[1]
-        arg[4,1,0]=(0.631902493814)*x[0]+(0.279373852162)*x[1]
-        arg[4,1,1]=(0.666932982001)*x[0]+(1.02356936117)*x[1]
-        arg[5,0,0]=(-1.15844673154)*x[0]+(-0.472595660401)*x[1]
-        arg[5,0,1]=(-0.469626313646)*x[0]+(0.464876870861)*x[1]
-        arg[5,1,0]=(-0.0934345630024)*x[0]+(0.92605991751)*x[1]
-        arg[5,1,1]=(-0.0528050605159)*x[0]+(0.984329702885)*x[1]
-        ref[0,0,0]=(1.53783653017)*x_ref[0]+(-0.262380397029)*x_ref[1]
-        ref[0,0,1]=(0.0150173886328)*x_ref[0]+(1.16643858096)*x_ref[1]
-        ref[0,1,0]=(0.886211915116)*x_ref[0]+(0.0707779287946)*x_ref[1]
-        ref[0,1,1]=(-1.38689895895)*x_ref[0]+(0.970706440444)*x_ref[1]
-        ref[1,0,0]=(-0.923778075186)*x_ref[0]+(1.93261160466)*x_ref[1]
-        ref[1,0,1]=(1.03640566039)*x_ref[0]+(-0.511763660443)*x_ref[1]
-        ref[1,1,0]=(0.127401766462)*x_ref[0]+(-0.472120435035)*x_ref[1]
-        ref[1,1,1]=(-0.366402024047)*x_ref[0]+(-0.396644605167)*x_ref[1]
-        ref[2,0,0]=(-0.715041877609)*x_ref[0]+(-1.00214766039)*x_ref[1]
-        ref[2,0,1]=(-1.52452556675)*x_ref[0]+(-0.570352600973)*x_ref[1]
-        ref[2,1,0]=(0.730426967288)*x_ref[0]+(0.158290182237)*x_ref[1]
-        ref[2,1,1]=(-0.152190333299)*x_ref[0]+(-0.254128104593)*x_ref[1]
-        ref[3,0,0]=(0.835319813606)*x_ref[0]+(-0.142845950855)*x_ref[1]
-        ref[3,0,1]=(0.80118569153)*x_ref[0]+(0.260295390539)*x_ref[1]
-        ref[3,1,0]=(0.283151732104)*x_ref[0]+(0.0284945097388)*x_ref[1]
-        ref[3,1,1]=(-0.715345696074)*x_ref[0]+(0.563181102176)*x_ref[1]
-        ref[4,0,0]=(-0.481733499899)*x_ref[0]+(1.30638761744)*x_ref[1]
-        ref[4,0,1]=(-0.515540152341)*x_ref[0]+(1.47724553596)*x_ref[1]
-        ref[4,1,0]=(0.631902493814)*x_ref[0]+(0.279373852162)*x_ref[1]
-        ref[4,1,1]=(0.666932982001)*x_ref[0]+(1.02356936117)*x_ref[1]
-        ref[5,0,0]=(-1.15844673154)*x_ref[0]+(-0.472595660401)*x_ref[1]
-        ref[5,0,1]=(-0.469626313646)*x_ref[0]+(0.464876870861)*x_ref[1]
-        ref[5,1,0]=(-0.0934345630024)*x_ref[0]+(0.92605991751)*x_ref[1]
-        ref[5,1,1]=(-0.0528050605159)*x_ref[0]+(0.984329702885)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.713551995443)*x[0]+(0.694017368402)*x[1]+(-0.0738591792901)*x[2]
-        arg[0,0,1]=(1.56876736864)*x[0]+(-0.345130721117)*x[1]+(1.1690777905)*x[2]
-        arg[0,1,0]=(-0.62505379409)*x[0]+(-0.143697617605)*x[1]+(0.132102288091)*x[2]
-        arg[0,1,1]=(0.873577158168)*x[0]+(-0.967200786585)*x[1]+(1.2903546666)*x[2]
-        arg[1,0,0]=(-0.192658558584)*x[0]+(0.506709431455)*x[1]+(-0.0952065550445)*x[2]
-        arg[1,0,1]=(1.30984695498)*x[0]+(-0.469661654194)*x[1]+(1.39212979011)*x[2]
-        arg[1,1,0]=(-0.49094299988)*x[0]+(1.02571925005)*x[1]+(0.125396191195)*x[2]
-        arg[1,1,1]=(-0.062798346747)*x[0]+(-0.789359897908)*x[1]+(1.77093308656)*x[2]
-        arg[2,0,0]=(1.61875859199)*x[0]+(0.594855189809)*x[1]+(0.42445154554)*x[2]
-        arg[2,0,1]=(-0.856240554561)*x[0]+(0.100699001565)*x[1]+(-0.27854306919)*x[2]
-        arg[2,1,0]=(0.0478958246378)*x[0]+(0.695175069462)*x[1]+(-0.847667978286)*x[2]
-        arg[2,1,1]=(1.60820982887)*x[0]+(-0.251793277319)*x[1]+(0.143173366678)*x[2]
-        arg[3,0,0]=(-0.292866056474)*x[0]+(1.01748459143)*x[1]+(-0.484686028756)*x[2]
-        arg[3,0,1]=(-0.408126207016)*x[0]+(-1.31011612654)*x[1]+(-0.955847365219)*x[2]
-        arg[3,1,0]=(0.0396674474263)*x[0]+(0.354470432765)*x[1]+(-0.291731786972)*x[2]
-        arg[3,1,1]=(0.752098712767)*x[0]+(-1.83970538813)*x[1]+(0.0227500647892)*x[2]
-        arg[4,0,0]=(0.398849520011)*x[0]+(-1.38237112549)*x[1]+(-0.800550650133)*x[2]
-        arg[4,0,1]=(0.102399478593)*x[0]+(0.812513136316)*x[1]+(1.25442670221)*x[2]
-        arg[4,1,0]=(0.224914729031)*x[0]+(0.0706934334606)*x[1]+(0.640265153974)*x[2]
-        arg[4,1,1]=(0.278731023964)*x[0]+(-0.766892970502)*x[1]+(1.62378242532)*x[2]
-        arg[5,0,0]=(-0.874002481668)*x[0]+(0.168391989524)*x[1]+(-0.0150981524408)*x[2]
-        arg[5,0,1]=(1.03369744159)*x[0]+(-0.363152709617)*x[1]+(-0.429141439899)*x[2]
-        arg[5,1,0]=(1.74293672288)*x[0]+(1.91064523276)*x[1]+(0.159389690962)*x[2]
-        arg[5,1,1]=(0.769432577623)*x[0]+(0.929942365281)*x[1]+(0.170908152574)*x[2]
-        ref[0,0,0]=(-0.713551995443)*x_ref[0]+(0.694017368402)*x_ref[1]+(-0.0738591792901)*x_ref[2]
-        ref[0,0,1]=(1.56876736864)*x_ref[0]+(-0.345130721117)*x_ref[1]+(1.1690777905)*x_ref[2]
-        ref[0,1,0]=(-0.62505379409)*x_ref[0]+(-0.143697617605)*x_ref[1]+(0.132102288091)*x_ref[2]
-        ref[0,1,1]=(0.873577158168)*x_ref[0]+(-0.967200786585)*x_ref[1]+(1.2903546666)*x_ref[2]
-        ref[1,0,0]=(-0.192658558584)*x_ref[0]+(0.506709431455)*x_ref[1]+(-0.0952065550445)*x_ref[2]
-        ref[1,0,1]=(1.30984695498)*x_ref[0]+(-0.469661654194)*x_ref[1]+(1.39212979011)*x_ref[2]
-        ref[1,1,0]=(-0.49094299988)*x_ref[0]+(1.02571925005)*x_ref[1]+(0.125396191195)*x_ref[2]
-        ref[1,1,1]=(-0.062798346747)*x_ref[0]+(-0.789359897908)*x_ref[1]+(1.77093308656)*x_ref[2]
-        ref[2,0,0]=(1.61875859199)*x_ref[0]+(0.594855189809)*x_ref[1]+(0.42445154554)*x_ref[2]
-        ref[2,0,1]=(-0.856240554561)*x_ref[0]+(0.100699001565)*x_ref[1]+(-0.27854306919)*x_ref[2]
-        ref[2,1,0]=(0.0478958246378)*x_ref[0]+(0.695175069462)*x_ref[1]+(-0.847667978286)*x_ref[2]
-        ref[2,1,1]=(1.60820982887)*x_ref[0]+(-0.251793277319)*x_ref[1]+(0.143173366678)*x_ref[2]
-        ref[3,0,0]=(-0.292866056474)*x_ref[0]+(1.01748459143)*x_ref[1]+(-0.484686028756)*x_ref[2]
-        ref[3,0,1]=(-0.408126207016)*x_ref[0]+(-1.31011612654)*x_ref[1]+(-0.955847365219)*x_ref[2]
-        ref[3,1,0]=(0.0396674474263)*x_ref[0]+(0.354470432765)*x_ref[1]+(-0.291731786972)*x_ref[2]
-        ref[3,1,1]=(0.752098712767)*x_ref[0]+(-1.83970538813)*x_ref[1]+(0.0227500647892)*x_ref[2]
-        ref[4,0,0]=(0.398849520011)*x_ref[0]+(-1.38237112549)*x_ref[1]+(-0.800550650133)*x_ref[2]
-        ref[4,0,1]=(0.102399478593)*x_ref[0]+(0.812513136316)*x_ref[1]+(1.25442670221)*x_ref[2]
-        ref[4,1,0]=(0.224914729031)*x_ref[0]+(0.0706934334606)*x_ref[1]+(0.640265153974)*x_ref[2]
-        ref[4,1,1]=(0.278731023964)*x_ref[0]+(-0.766892970502)*x_ref[1]+(1.62378242532)*x_ref[2]
-        ref[5,0,0]=(-0.874002481668)*x_ref[0]+(0.168391989524)*x_ref[1]+(-0.0150981524408)*x_ref[2]
-        ref[5,0,1]=(1.03369744159)*x_ref[0]+(-0.363152709617)*x_ref[1]+(-0.429141439899)*x_ref[2]
-        ref[5,1,0]=(1.74293672288)*x_ref[0]+(1.91064523276)*x_ref[1]+(0.159389690962)*x_ref[2]
-        ref[5,1,1]=(0.769432577623)*x_ref[0]+(0.929942365281)*x_ref[1]+(0.170908152574)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-1.15521896363)*x[0]+(0.8731619129)*x[1]
-        arg[0,0,0,1]=(0.597656443464)*x[0]+(0.341688152811)*x[1]
-        arg[0,0,1,0]=(-0.422350580427)*x[0]+(0.728011338687)*x[1]
-        arg[0,0,1,1]=(-1.72046294064)*x[0]+(1.13345636724)*x[1]
-        arg[0,0,2,0]=(0.150530941523)*x[0]+(0.437417461641)*x[1]
-        arg[0,0,2,1]=(-0.413133183531)*x[0]+(-0.268630939964)*x[1]
-        arg[0,1,0,0]=(-0.220368905416)*x[0]+(1.10085894684)*x[1]
-        arg[0,1,0,1]=(-0.943367491188)*x[0]+(0.80942793885)*x[1]
-        arg[0,1,1,0]=(0.906220152303)*x[0]+(0.801214136703)*x[1]
-        arg[0,1,1,1]=(-1.3650200124)*x[0]+(-0.373454973523)*x[1]
-        arg[0,1,2,0]=(-0.277067377427)*x[0]+(-1.62229711799)*x[1]
-        arg[0,1,2,1]=(0.787076886379)*x[0]+(0.496906919368)*x[1]
-        arg[0,2,0,0]=(-0.0770154256748)*x[0]+(1.5002648939)*x[1]
-        arg[0,2,0,1]=(0.225572553862)*x[0]+(1.39471337012)*x[1]
-        arg[0,2,1,0]=(-0.54799237637)*x[0]+(-0.607785237418)*x[1]
-        arg[0,2,1,1]=(0.384591801229)*x[0]+(1.30760620469)*x[1]
-        arg[0,2,2,0]=(0.228248139163)*x[0]+(0.151268778109)*x[1]
-        arg[0,2,2,1]=(-1.43978230199)*x[0]+(0.958903347524)*x[1]
-        arg[0,3,0,0]=(-0.568133098072)*x[0]+(0.128510595507)*x[1]
-        arg[0,3,0,1]=(-0.304029315535)*x[0]+(1.19478464847)*x[1]
-        arg[0,3,1,0]=(0.0996876882275)*x[0]+(-0.255346045102)*x[1]
-        arg[0,3,1,1]=(0.414708254109)*x[0]+(-0.148700489536)*x[1]
-        arg[0,3,2,0]=(-0.740719850161)*x[0]+(0.375907815982)*x[1]
-        arg[0,3,2,1]=(-0.184189058365)*x[0]+(-0.274477516444)*x[1]
-        arg[0,4,0,0]=(-0.565848858136)*x[0]+(-0.206818417121)*x[1]
-        arg[0,4,0,1]=(-0.983652399085)*x[0]+(1.21445827986)*x[1]
-        arg[0,4,1,0]=(1.6425686123)*x[0]+(-0.621952337654)*x[1]
-        arg[0,4,1,1]=(-1.07526530849)*x[0]+(-0.0915810578715)*x[1]
-        arg[0,4,2,0]=(1.4812278738)*x[0]+(1.61991326423)*x[1]
-        arg[0,4,2,1]=(-1.4147420413)*x[0]+(1.34428787131)*x[1]
-        arg[1,0,0,0]=(-0.910373659777)*x[0]+(1.46920176435)*x[1]
-        arg[1,0,0,1]=(0.074473571609)*x[0]+(-0.336642181231)*x[1]
-        arg[1,0,1,0]=(-0.141813739296)*x[0]+(-0.534432398621)*x[1]
-        arg[1,0,1,1]=(0.728030938984)*x[0]+(0.532542738961)*x[1]
-        arg[1,0,2,0]=(0.20676316374)*x[0]+(-0.065235999066)*x[1]
-        arg[1,0,2,1]=(-1.09054680794)*x[0]+(0.537754476805)*x[1]
-        arg[1,1,0,0]=(0.523878896271)*x[0]+(-0.0561828109964)*x[1]
-        arg[1,1,0,1]=(1.27754653741)*x[0]+(0.119734333004)*x[1]
-        arg[1,1,1,0]=(0.0933160885942)*x[0]+(0.390183021193)*x[1]
-        arg[1,1,1,1]=(0.548273953924)*x[0]+(-0.552588185124)*x[1]
-        arg[1,1,2,0]=(0.576803722241)*x[0]+(0.60898781381)*x[1]
-        arg[1,1,2,1]=(-0.307231650547)*x[0]+(0.439111970656)*x[1]
-        arg[1,2,0,0]=(0.172113300736)*x[0]+(-0.0153971432613)*x[1]
-        arg[1,2,0,1]=(-0.883753634465)*x[0]+(1.35320294175)*x[1]
-        arg[1,2,1,0]=(0.153937139638)*x[0]+(-0.865654430739)*x[1]
-        arg[1,2,1,1]=(0.970377377543)*x[0]+(-1.11418225395)*x[1]
-        arg[1,2,2,0]=(-1.11106779953)*x[0]+(-0.357700480625)*x[1]
-        arg[1,2,2,1]=(0.475529404147)*x[0]+(-0.121369909464)*x[1]
-        arg[1,3,0,0]=(-0.867370155191)*x[0]+(0.625161512036)*x[1]
-        arg[1,3,0,1]=(0.252873452474)*x[0]+(1.11368263907)*x[1]
-        arg[1,3,1,0]=(-1.25698605702)*x[0]+(-0.381254857218)*x[1]
-        arg[1,3,1,1]=(1.12038052674)*x[0]+(-0.113429410248)*x[1]
-        arg[1,3,2,0]=(0.0821799570201)*x[0]+(-0.167383600252)*x[1]
-        arg[1,3,2,1]=(-0.534217900599)*x[0]+(-1.26144431009)*x[1]
-        arg[1,4,0,0]=(0.639186045888)*x[0]+(0.258686782482)*x[1]
-        arg[1,4,0,1]=(-0.256515011769)*x[0]+(0.797453395844)*x[1]
-        arg[1,4,1,0]=(-0.427518421999)*x[0]+(-0.101439725502)*x[1]
-        arg[1,4,1,1]=(-0.251303248239)*x[0]+(0.361194806374)*x[1]
-        arg[1,4,2,0]=(0.415313798163)*x[0]+(-0.909602300262)*x[1]
-        arg[1,4,2,1]=(0.118542894027)*x[0]+(-0.28224555744)*x[1]
-        arg[2,0,0,0]=(0.700687096184)*x[0]+(-1.69964436969)*x[1]
-        arg[2,0,0,1]=(0.880393551605)*x[0]+(-0.571112060462)*x[1]
-        arg[2,0,1,0]=(1.35990706973)*x[0]+(0.260154297077)*x[1]
-        arg[2,0,1,1]=(0.294201987212)*x[0]+(-0.379007248662)*x[1]
-        arg[2,0,2,0]=(-1.42914701121)*x[0]+(0.88289145627)*x[1]
-        arg[2,0,2,1]=(-0.343976881604)*x[0]+(0.0642493086788)*x[1]
-        arg[2,1,0,0]=(0.479103547757)*x[0]+(-1.60276044525)*x[1]
-        arg[2,1,0,1]=(0.944321957371)*x[0]+(0.313721173145)*x[1]
-        arg[2,1,1,0]=(0.233589885494)*x[0]+(-0.427865810692)*x[1]
-        arg[2,1,1,1]=(-0.954518596356)*x[0]+(-0.153033245523)*x[1]
-        arg[2,1,2,0]=(1.14079619235)*x[0]+(0.136503305207)*x[1]
-        arg[2,1,2,1]=(-0.715601080868)*x[0]+(-1.74677798058)*x[1]
-        arg[2,2,0,0]=(0.211908166714)*x[0]+(0.379390512119)*x[1]
-        arg[2,2,0,1]=(0.97243389801)*x[0]+(-0.988193298566)*x[1]
-        arg[2,2,1,0]=(0.8990152555)*x[0]+(0.22398476583)*x[1]
-        arg[2,2,1,1]=(-0.748858338529)*x[0]+(-1.00255098852)*x[1]
-        arg[2,2,2,0]=(0.863334969354)*x[0]+(1.14334958607)*x[1]
-        arg[2,2,2,1]=(-0.807672728362)*x[0]+(0.837576150239)*x[1]
-        arg[2,3,0,0]=(-0.310471066952)*x[0]+(0.261468387883)*x[1]
-        arg[2,3,0,1]=(-1.61325161386)*x[0]+(0.016614907729)*x[1]
-        arg[2,3,1,0]=(-0.742577714565)*x[0]+(-1.54936077725)*x[1]
-        arg[2,3,1,1]=(-0.393825799694)*x[0]+(0.66004298074)*x[1]
-        arg[2,3,2,0]=(-1.03965632182)*x[0]+(-0.863160703719)*x[1]
-        arg[2,3,2,1]=(0.673788653196)*x[0]+(0.740311339524)*x[1]
-        arg[2,4,0,0]=(1.59272250531)*x[0]+(1.27845229216)*x[1]
-        arg[2,4,0,1]=(0.112947869874)*x[0]+(1.06626388923)*x[1]
-        arg[2,4,1,0]=(-0.935174560087)*x[0]+(0.729112002619)*x[1]
-        arg[2,4,1,1]=(1.28167575095)*x[0]+(-1.6626881011)*x[1]
-        arg[2,4,2,0]=(-1.01382997014)*x[0]+(0.40870705964)*x[1]
-        arg[2,4,2,1]=(-0.903293274454)*x[0]+(0.451662927854)*x[1]
-        arg[3,0,0,0]=(0.414933474895)*x[0]+(0.274208992931)*x[1]
-        arg[3,0,0,1]=(-0.140384007335)*x[0]+(-0.201270983912)*x[1]
-        arg[3,0,1,0]=(-1.34339529394)*x[0]+(-1.26275414913)*x[1]
-        arg[3,0,1,1]=(0.34482759487)*x[0]+(0.992140984097)*x[1]
-        arg[3,0,2,0]=(-1.56575003976)*x[0]+(-0.514557317682)*x[1]
-        arg[3,0,2,1]=(-0.203196026518)*x[0]+(-0.50777550196)*x[1]
-        arg[3,1,0,0]=(-0.465027052452)*x[0]+(0.165299984247)*x[1]
-        arg[3,1,0,1]=(-0.876537945705)*x[0]+(0.569062140702)*x[1]
-        arg[3,1,1,0]=(0.212854890028)*x[0]+(0.772436691343)*x[1]
-        arg[3,1,1,1]=(0.376912060989)*x[0]+(-1.59078116917)*x[1]
-        arg[3,1,2,0]=(-1.19949528387)*x[0]+(0.508138309995)*x[1]
-        arg[3,1,2,1]=(0.535067293288)*x[0]+(0.483486234966)*x[1]
-        arg[3,2,0,0]=(-0.366454519079)*x[0]+(0.880937088999)*x[1]
-        arg[3,2,0,1]=(-0.164158778522)*x[0]+(-0.0933716527947)*x[1]
-        arg[3,2,1,0]=(-0.338148774302)*x[0]+(0.389103301223)*x[1]
-        arg[3,2,1,1]=(-1.17323344849)*x[0]+(-0.286752347393)*x[1]
-        arg[3,2,2,0]=(0.43651426746)*x[0]+(0.0751512323008)*x[1]
-        arg[3,2,2,1]=(1.44242451962)*x[0]+(-0.853169055909)*x[1]
-        arg[3,3,0,0]=(0.268862750262)*x[0]+(0.668643005784)*x[1]
-        arg[3,3,0,1]=(-1.47078437928)*x[0]+(1.25865018681)*x[1]
-        arg[3,3,1,0]=(-0.218849811361)*x[0]+(0.147601849599)*x[1]
-        arg[3,3,1,1]=(1.66493534918)*x[0]+(0.368711512357)*x[1]
-        arg[3,3,2,0]=(0.259910144631)*x[0]+(-0.977975383491)*x[1]
-        arg[3,3,2,1]=(1.87696180213)*x[0]+(-0.583679438031)*x[1]
-        arg[3,4,0,0]=(0.226114159843)*x[0]+(0.121547181819)*x[1]
-        arg[3,4,0,1]=(1.21215141305)*x[0]+(-0.175673309633)*x[1]
-        arg[3,4,1,0]=(0.644340639306)*x[0]+(0.35372514848)*x[1]
-        arg[3,4,1,1]=(0.452987488144)*x[0]+(0.838110546855)*x[1]
-        arg[3,4,2,0]=(-0.434414511976)*x[0]+(-0.879038818613)*x[1]
-        arg[3,4,2,1]=(-0.387240543602)*x[0]+(0.187795787877)*x[1]
-        ref[0,0,0,0]=(-1.15521896363)*x_ref[0]+(0.8731619129)*x_ref[1]
-        ref[0,0,0,1]=(0.597656443464)*x_ref[0]+(0.341688152811)*x_ref[1]
-        ref[0,0,1,0]=(-0.422350580427)*x_ref[0]+(0.728011338687)*x_ref[1]
-        ref[0,0,1,1]=(-1.72046294064)*x_ref[0]+(1.13345636724)*x_ref[1]
-        ref[0,0,2,0]=(0.150530941523)*x_ref[0]+(0.437417461641)*x_ref[1]
-        ref[0,0,2,1]=(-0.413133183531)*x_ref[0]+(-0.268630939964)*x_ref[1]
-        ref[0,1,0,0]=(-0.220368905416)*x_ref[0]+(1.10085894684)*x_ref[1]
-        ref[0,1,0,1]=(-0.943367491188)*x_ref[0]+(0.80942793885)*x_ref[1]
-        ref[0,1,1,0]=(0.906220152303)*x_ref[0]+(0.801214136703)*x_ref[1]
-        ref[0,1,1,1]=(-1.3650200124)*x_ref[0]+(-0.373454973523)*x_ref[1]
-        ref[0,1,2,0]=(-0.277067377427)*x_ref[0]+(-1.62229711799)*x_ref[1]
-        ref[0,1,2,1]=(0.787076886379)*x_ref[0]+(0.496906919368)*x_ref[1]
-        ref[0,2,0,0]=(-0.0770154256748)*x_ref[0]+(1.5002648939)*x_ref[1]
-        ref[0,2,0,1]=(0.225572553862)*x_ref[0]+(1.39471337012)*x_ref[1]
-        ref[0,2,1,0]=(-0.54799237637)*x_ref[0]+(-0.607785237418)*x_ref[1]
-        ref[0,2,1,1]=(0.384591801229)*x_ref[0]+(1.30760620469)*x_ref[1]
-        ref[0,2,2,0]=(0.228248139163)*x_ref[0]+(0.151268778109)*x_ref[1]
-        ref[0,2,2,1]=(-1.43978230199)*x_ref[0]+(0.958903347524)*x_ref[1]
-        ref[0,3,0,0]=(-0.568133098072)*x_ref[0]+(0.128510595507)*x_ref[1]
-        ref[0,3,0,1]=(-0.304029315535)*x_ref[0]+(1.19478464847)*x_ref[1]
-        ref[0,3,1,0]=(0.0996876882275)*x_ref[0]+(-0.255346045102)*x_ref[1]
-        ref[0,3,1,1]=(0.414708254109)*x_ref[0]+(-0.148700489536)*x_ref[1]
-        ref[0,3,2,0]=(-0.740719850161)*x_ref[0]+(0.375907815982)*x_ref[1]
-        ref[0,3,2,1]=(-0.184189058365)*x_ref[0]+(-0.274477516444)*x_ref[1]
-        ref[0,4,0,0]=(-0.565848858136)*x_ref[0]+(-0.206818417121)*x_ref[1]
-        ref[0,4,0,1]=(-0.983652399085)*x_ref[0]+(1.21445827986)*x_ref[1]
-        ref[0,4,1,0]=(1.6425686123)*x_ref[0]+(-0.621952337654)*x_ref[1]
-        ref[0,4,1,1]=(-1.07526530849)*x_ref[0]+(-0.0915810578715)*x_ref[1]
-        ref[0,4,2,0]=(1.4812278738)*x_ref[0]+(1.61991326423)*x_ref[1]
-        ref[0,4,2,1]=(-1.4147420413)*x_ref[0]+(1.34428787131)*x_ref[1]
-        ref[1,0,0,0]=(-0.910373659777)*x_ref[0]+(1.46920176435)*x_ref[1]
-        ref[1,0,0,1]=(0.074473571609)*x_ref[0]+(-0.336642181231)*x_ref[1]
-        ref[1,0,1,0]=(-0.141813739296)*x_ref[0]+(-0.534432398621)*x_ref[1]
-        ref[1,0,1,1]=(0.728030938984)*x_ref[0]+(0.532542738961)*x_ref[1]
-        ref[1,0,2,0]=(0.20676316374)*x_ref[0]+(-0.065235999066)*x_ref[1]
-        ref[1,0,2,1]=(-1.09054680794)*x_ref[0]+(0.537754476805)*x_ref[1]
-        ref[1,1,0,0]=(0.523878896271)*x_ref[0]+(-0.0561828109964)*x_ref[1]
-        ref[1,1,0,1]=(1.27754653741)*x_ref[0]+(0.119734333004)*x_ref[1]
-        ref[1,1,1,0]=(0.0933160885942)*x_ref[0]+(0.390183021193)*x_ref[1]
-        ref[1,1,1,1]=(0.548273953924)*x_ref[0]+(-0.552588185124)*x_ref[1]
-        ref[1,1,2,0]=(0.576803722241)*x_ref[0]+(0.60898781381)*x_ref[1]
-        ref[1,1,2,1]=(-0.307231650547)*x_ref[0]+(0.439111970656)*x_ref[1]
-        ref[1,2,0,0]=(0.172113300736)*x_ref[0]+(-0.0153971432613)*x_ref[1]
-        ref[1,2,0,1]=(-0.883753634465)*x_ref[0]+(1.35320294175)*x_ref[1]
-        ref[1,2,1,0]=(0.153937139638)*x_ref[0]+(-0.865654430739)*x_ref[1]
-        ref[1,2,1,1]=(0.970377377543)*x_ref[0]+(-1.11418225395)*x_ref[1]
-        ref[1,2,2,0]=(-1.11106779953)*x_ref[0]+(-0.357700480625)*x_ref[1]
-        ref[1,2,2,1]=(0.475529404147)*x_ref[0]+(-0.121369909464)*x_ref[1]
-        ref[1,3,0,0]=(-0.867370155191)*x_ref[0]+(0.625161512036)*x_ref[1]
-        ref[1,3,0,1]=(0.252873452474)*x_ref[0]+(1.11368263907)*x_ref[1]
-        ref[1,3,1,0]=(-1.25698605702)*x_ref[0]+(-0.381254857218)*x_ref[1]
-        ref[1,3,1,1]=(1.12038052674)*x_ref[0]+(-0.113429410248)*x_ref[1]
-        ref[1,3,2,0]=(0.0821799570201)*x_ref[0]+(-0.167383600252)*x_ref[1]
-        ref[1,3,2,1]=(-0.534217900599)*x_ref[0]+(-1.26144431009)*x_ref[1]
-        ref[1,4,0,0]=(0.639186045888)*x_ref[0]+(0.258686782482)*x_ref[1]
-        ref[1,4,0,1]=(-0.256515011769)*x_ref[0]+(0.797453395844)*x_ref[1]
-        ref[1,4,1,0]=(-0.427518421999)*x_ref[0]+(-0.101439725502)*x_ref[1]
-        ref[1,4,1,1]=(-0.251303248239)*x_ref[0]+(0.361194806374)*x_ref[1]
-        ref[1,4,2,0]=(0.415313798163)*x_ref[0]+(-0.909602300262)*x_ref[1]
-        ref[1,4,2,1]=(0.118542894027)*x_ref[0]+(-0.28224555744)*x_ref[1]
-        ref[2,0,0,0]=(0.700687096184)*x_ref[0]+(-1.69964436969)*x_ref[1]
-        ref[2,0,0,1]=(0.880393551605)*x_ref[0]+(-0.571112060462)*x_ref[1]
-        ref[2,0,1,0]=(1.35990706973)*x_ref[0]+(0.260154297077)*x_ref[1]
-        ref[2,0,1,1]=(0.294201987212)*x_ref[0]+(-0.379007248662)*x_ref[1]
-        ref[2,0,2,0]=(-1.42914701121)*x_ref[0]+(0.88289145627)*x_ref[1]
-        ref[2,0,2,1]=(-0.343976881604)*x_ref[0]+(0.0642493086788)*x_ref[1]
-        ref[2,1,0,0]=(0.479103547757)*x_ref[0]+(-1.60276044525)*x_ref[1]
-        ref[2,1,0,1]=(0.944321957371)*x_ref[0]+(0.313721173145)*x_ref[1]
-        ref[2,1,1,0]=(0.233589885494)*x_ref[0]+(-0.427865810692)*x_ref[1]
-        ref[2,1,1,1]=(-0.954518596356)*x_ref[0]+(-0.153033245523)*x_ref[1]
-        ref[2,1,2,0]=(1.14079619235)*x_ref[0]+(0.136503305207)*x_ref[1]
-        ref[2,1,2,1]=(-0.715601080868)*x_ref[0]+(-1.74677798058)*x_ref[1]
-        ref[2,2,0,0]=(0.211908166714)*x_ref[0]+(0.379390512119)*x_ref[1]
-        ref[2,2,0,1]=(0.97243389801)*x_ref[0]+(-0.988193298566)*x_ref[1]
-        ref[2,2,1,0]=(0.8990152555)*x_ref[0]+(0.22398476583)*x_ref[1]
-        ref[2,2,1,1]=(-0.748858338529)*x_ref[0]+(-1.00255098852)*x_ref[1]
-        ref[2,2,2,0]=(0.863334969354)*x_ref[0]+(1.14334958607)*x_ref[1]
-        ref[2,2,2,1]=(-0.807672728362)*x_ref[0]+(0.837576150239)*x_ref[1]
-        ref[2,3,0,0]=(-0.310471066952)*x_ref[0]+(0.261468387883)*x_ref[1]
-        ref[2,3,0,1]=(-1.61325161386)*x_ref[0]+(0.016614907729)*x_ref[1]
-        ref[2,3,1,0]=(-0.742577714565)*x_ref[0]+(-1.54936077725)*x_ref[1]
-        ref[2,3,1,1]=(-0.393825799694)*x_ref[0]+(0.66004298074)*x_ref[1]
-        ref[2,3,2,0]=(-1.03965632182)*x_ref[0]+(-0.863160703719)*x_ref[1]
-        ref[2,3,2,1]=(0.673788653196)*x_ref[0]+(0.740311339524)*x_ref[1]
-        ref[2,4,0,0]=(1.59272250531)*x_ref[0]+(1.27845229216)*x_ref[1]
-        ref[2,4,0,1]=(0.112947869874)*x_ref[0]+(1.06626388923)*x_ref[1]
-        ref[2,4,1,0]=(-0.935174560087)*x_ref[0]+(0.729112002619)*x_ref[1]
-        ref[2,4,1,1]=(1.28167575095)*x_ref[0]+(-1.6626881011)*x_ref[1]
-        ref[2,4,2,0]=(-1.01382997014)*x_ref[0]+(0.40870705964)*x_ref[1]
-        ref[2,4,2,1]=(-0.903293274454)*x_ref[0]+(0.451662927854)*x_ref[1]
-        ref[3,0,0,0]=(0.414933474895)*x_ref[0]+(0.274208992931)*x_ref[1]
-        ref[3,0,0,1]=(-0.140384007335)*x_ref[0]+(-0.201270983912)*x_ref[1]
-        ref[3,0,1,0]=(-1.34339529394)*x_ref[0]+(-1.26275414913)*x_ref[1]
-        ref[3,0,1,1]=(0.34482759487)*x_ref[0]+(0.992140984097)*x_ref[1]
-        ref[3,0,2,0]=(-1.56575003976)*x_ref[0]+(-0.514557317682)*x_ref[1]
-        ref[3,0,2,1]=(-0.203196026518)*x_ref[0]+(-0.50777550196)*x_ref[1]
-        ref[3,1,0,0]=(-0.465027052452)*x_ref[0]+(0.165299984247)*x_ref[1]
-        ref[3,1,0,1]=(-0.876537945705)*x_ref[0]+(0.569062140702)*x_ref[1]
-        ref[3,1,1,0]=(0.212854890028)*x_ref[0]+(0.772436691343)*x_ref[1]
-        ref[3,1,1,1]=(0.376912060989)*x_ref[0]+(-1.59078116917)*x_ref[1]
-        ref[3,1,2,0]=(-1.19949528387)*x_ref[0]+(0.508138309995)*x_ref[1]
-        ref[3,1,2,1]=(0.535067293288)*x_ref[0]+(0.483486234966)*x_ref[1]
-        ref[3,2,0,0]=(-0.366454519079)*x_ref[0]+(0.880937088999)*x_ref[1]
-        ref[3,2,0,1]=(-0.164158778522)*x_ref[0]+(-0.0933716527947)*x_ref[1]
-        ref[3,2,1,0]=(-0.338148774302)*x_ref[0]+(0.389103301223)*x_ref[1]
-        ref[3,2,1,1]=(-1.17323344849)*x_ref[0]+(-0.286752347393)*x_ref[1]
-        ref[3,2,2,0]=(0.43651426746)*x_ref[0]+(0.0751512323008)*x_ref[1]
-        ref[3,2,2,1]=(1.44242451962)*x_ref[0]+(-0.853169055909)*x_ref[1]
-        ref[3,3,0,0]=(0.268862750262)*x_ref[0]+(0.668643005784)*x_ref[1]
-        ref[3,3,0,1]=(-1.47078437928)*x_ref[0]+(1.25865018681)*x_ref[1]
-        ref[3,3,1,0]=(-0.218849811361)*x_ref[0]+(0.147601849599)*x_ref[1]
-        ref[3,3,1,1]=(1.66493534918)*x_ref[0]+(0.368711512357)*x_ref[1]
-        ref[3,3,2,0]=(0.259910144631)*x_ref[0]+(-0.977975383491)*x_ref[1]
-        ref[3,3,2,1]=(1.87696180213)*x_ref[0]+(-0.583679438031)*x_ref[1]
-        ref[3,4,0,0]=(0.226114159843)*x_ref[0]+(0.121547181819)*x_ref[1]
-        ref[3,4,0,1]=(1.21215141305)*x_ref[0]+(-0.175673309633)*x_ref[1]
-        ref[3,4,1,0]=(0.644340639306)*x_ref[0]+(0.35372514848)*x_ref[1]
-        ref[3,4,1,1]=(0.452987488144)*x_ref[0]+(0.838110546855)*x_ref[1]
-        ref[3,4,2,0]=(-0.434414511976)*x_ref[0]+(-0.879038818613)*x_ref[1]
-        ref[3,4,2,1]=(-0.387240543602)*x_ref[0]+(0.187795787877)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.523374388946)*x[0]+(-0.462029311047)*x[1]+(-0.47732568751)*x[2]
-        arg[0,0,0,1]=(0.641437288282)*x[0]+(-0.245967769804)*x[1]+(-0.882711488334)*x[2]
-        arg[0,0,1,0]=(-0.039075405101)*x[0]+(0.233479040723)*x[1]+(-0.450244284473)*x[2]
-        arg[0,0,1,1]=(-1.00711630706)*x[0]+(-0.247720707527)*x[1]+(-0.597073422746)*x[2]
-        arg[0,0,2,0]=(0.141738833983)*x[0]+(-1.34846391496)*x[1]+(0.214891803475)*x[2]
-        arg[0,0,2,1]=(0.276967719755)*x[0]+(-0.64300940909)*x[1]+(-1.10068852616)*x[2]
-        arg[0,1,0,0]=(0.438911917989)*x[0]+(0.588137625057)*x[1]+(0.744848057181)*x[2]
-        arg[0,1,0,1]=(0.266343859518)*x[0]+(1.24092635599)*x[1]+(0.477206170905)*x[2]
-        arg[0,1,1,0]=(0.328857688358)*x[0]+(-1.17720038645)*x[1]+(0.285045368661)*x[2]
-        arg[0,1,1,1]=(-0.0985505878353)*x[0]+(1.11228710542)*x[1]+(0.159347839514)*x[2]
-        arg[0,1,2,0]=(0.125378210814)*x[0]+(1.51252392793)*x[1]+(-0.0402281595871)*x[2]
-        arg[0,1,2,1]=(-1.41964435548)*x[0]+(0.825108246489)*x[1]+(0.31679169508)*x[2]
-        arg[0,2,0,0]=(1.47728541117)*x[0]+(0.957708443424)*x[1]+(-0.187892562217)*x[2]
-        arg[0,2,0,1]=(0.0614505001405)*x[0]+(0.144444072992)*x[1]+(0.287839563179)*x[2]
-        arg[0,2,1,0]=(0.512698173313)*x[0]+(0.316852993542)*x[1]+(0.538020705489)*x[2]
-        arg[0,2,1,1]=(-0.349895838053)*x[0]+(1.50602760725)*x[1]+(-0.959979406715)*x[2]
-        arg[0,2,2,0]=(-0.618802027626)*x[0]+(0.71544179402)*x[1]+(1.09297898989)*x[2]
-        arg[0,2,2,1]=(-0.264932530879)*x[0]+(-1.4100323815)*x[1]+(-1.28423925034)*x[2]
-        arg[0,3,0,0]=(0.481724893561)*x[0]+(-0.546248388253)*x[1]+(-0.214332802735)*x[2]
-        arg[0,3,0,1]=(-1.33293479098)*x[0]+(0.989294320484)*x[1]+(-0.561974021785)*x[2]
-        arg[0,3,1,0]=(-0.394718780001)*x[0]+(1.0043343416)*x[1]+(1.51370839793)*x[2]
-        arg[0,3,1,1]=(1.08238957373)*x[0]+(0.591631122094)*x[1]+(0.075283954318)*x[2]
-        arg[0,3,2,0]=(-1.0250149161)*x[0]+(-0.739848118412)*x[1]+(0.736595112789)*x[2]
-        arg[0,3,2,1]=(-1.08033009366)*x[0]+(-0.574926147021)*x[1]+(0.421251948724)*x[2]
-        arg[0,4,0,0]=(-0.0894466241931)*x[0]+(1.14935896473)*x[1]+(-0.490410015077)*x[2]
-        arg[0,4,0,1]=(1.07777309372)*x[0]+(1.0672971936)*x[1]+(0.340143160972)*x[2]
-        arg[0,4,1,0]=(0.905553949676)*x[0]+(0.171320798438)*x[1]+(1.83634812891)*x[2]
-        arg[0,4,1,1]=(-0.663516264963)*x[0]+(0.14871937304)*x[1]+(-0.697949666962)*x[2]
-        arg[0,4,2,0]=(1.41806579095)*x[0]+(0.0357313086623)*x[1]+(0.110846683649)*x[2]
-        arg[0,4,2,1]=(-0.31919270211)*x[0]+(-1.651049084)*x[1]+(-1.47528307262)*x[2]
-        arg[1,0,0,0]=(0.167209321535)*x[0]+(-1.13066332212)*x[1]+(0.209489173491)*x[2]
-        arg[1,0,0,1]=(1.45770122794)*x[0]+(1.12024118263)*x[1]+(0.0203526002602)*x[2]
-        arg[1,0,1,0]=(0.180403238696)*x[0]+(0.580625819717)*x[1]+(-1.00882441351)*x[2]
-        arg[1,0,1,1]=(-0.20671421669)*x[0]+(-0.199445466326)*x[1]+(0.887365974398)*x[2]
-        arg[1,0,2,0]=(-0.0109233374932)*x[0]+(0.835241335188)*x[1]+(-0.810658050514)*x[2]
-        arg[1,0,2,1]=(-1.45991974539)*x[0]+(0.955399748215)*x[1]+(0.398673469474)*x[2]
-        arg[1,1,0,0]=(0.726687414113)*x[0]+(-1.35343793545)*x[1]+(0.750079540417)*x[2]
-        arg[1,1,0,1]=(-0.677871860083)*x[0]+(-1.56756818572)*x[1]+(-0.240923946416)*x[2]
-        arg[1,1,1,0]=(-1.05791511835)*x[0]+(-0.425827952234)*x[1]+(-1.82875340474)*x[2]
-        arg[1,1,1,1]=(-0.430783664297)*x[0]+(0.552238591434)*x[1]+(0.502702385375)*x[2]
-        arg[1,1,2,0]=(0.240203734777)*x[0]+(-0.0650121194654)*x[1]+(1.04662204076)*x[2]
-        arg[1,1,2,1]=(-0.25305133215)*x[0]+(-0.31486026571)*x[1]+(-1.83073697314)*x[2]
-        arg[1,2,0,0]=(-1.09643062195)*x[0]+(-0.437887555247)*x[1]+(-1.33970467276)*x[2]
-        arg[1,2,0,1]=(1.24489646204)*x[0]+(1.0714412157)*x[1]+(-0.192090595585)*x[2]
-        arg[1,2,1,0]=(0.029290840641)*x[0]+(-0.940655160496)*x[1]+(-0.820414570983)*x[2]
-        arg[1,2,1,1]=(-0.677190307386)*x[0]+(-0.00164385522847)*x[1]+(-0.46460277293)*x[2]
-        arg[1,2,2,0]=(-0.320006508895)*x[0]+(1.13412133331)*x[1]+(-0.619705535377)*x[2]
-        arg[1,2,2,1]=(-0.0220330715863)*x[0]+(-0.64687567378)*x[1]+(0.0957350181768)*x[2]
-        arg[1,3,0,0]=(-0.25073330162)*x[0]+(0.85795600432)*x[1]+(1.53293778947)*x[2]
-        arg[1,3,0,1]=(-0.183346360622)*x[0]+(0.266035391885)*x[1]+(-0.422228348627)*x[2]
-        arg[1,3,1,0]=(-0.41587781442)*x[0]+(-0.0103068212789)*x[1]+(0.440665738388)*x[2]
-        arg[1,3,1,1]=(1.41825912495)*x[0]+(-0.0611650685825)*x[1]+(0.972511387093)*x[2]
-        arg[1,3,2,0]=(-0.336532230508)*x[0]+(-0.0123275905127)*x[1]+(-0.254643420879)*x[2]
-        arg[1,3,2,1]=(-0.365437122858)*x[0]+(0.71384297093)*x[1]+(0.447802028475)*x[2]
-        arg[1,4,0,0]=(1.33371172009)*x[0]+(1.16948649723)*x[1]+(-0.624453779138)*x[2]
-        arg[1,4,0,1]=(0.0919647304743)*x[0]+(1.20509307321)*x[1]+(0.454668856107)*x[2]
-        arg[1,4,1,0]=(0.179837036326)*x[0]+(1.27470487309)*x[1]+(0.248127557917)*x[2]
-        arg[1,4,1,1]=(-0.0163592123585)*x[0]+(-1.09373628426)*x[1]+(-1.07284707536)*x[2]
-        arg[1,4,2,0]=(-0.0617954247638)*x[0]+(0.180336071139)*x[1]+(0.0715760255435)*x[2]
-        arg[1,4,2,1]=(0.449148667011)*x[0]+(0.476092516356)*x[1]+(-0.235672424702)*x[2]
-        arg[2,0,0,0]=(1.06662096238)*x[0]+(1.52079387843)*x[1]+(-0.465087313097)*x[2]
-        arg[2,0,0,1]=(-0.0113962755891)*x[0]+(0.459517781034)*x[1]+(0.423861505703)*x[2]
-        arg[2,0,1,0]=(1.19571956088)*x[0]+(1.02444853474)*x[1]+(-1.31054246173)*x[2]
-        arg[2,0,1,1]=(-1.39536067914)*x[0]+(0.884184554143)*x[1]+(-0.650926411157)*x[2]
-        arg[2,0,2,0]=(-0.328672728946)*x[0]+(1.07247782219)*x[1]+(-0.61103916867)*x[2]
-        arg[2,0,2,1]=(0.155304775433)*x[0]+(-1.34794080729)*x[1]+(-0.931891854948)*x[2]
-        arg[2,1,0,0]=(-0.953726622792)*x[0]+(0.483614421199)*x[1]+(1.07026616662)*x[2]
-        arg[2,1,0,1]=(0.720797127905)*x[0]+(1.31309704242)*x[1]+(0.534213389945)*x[2]
-        arg[2,1,1,0]=(1.12642665973)*x[0]+(-0.375134467285)*x[1]+(0.223566393552)*x[2]
-        arg[2,1,1,1]=(-0.380892997026)*x[0]+(-0.661627351046)*x[1]+(0.596842673155)*x[2]
-        arg[2,1,2,0]=(0.233212348554)*x[0]+(0.106673294307)*x[1]+(-0.22268427628)*x[2]
-        arg[2,1,2,1]=(0.67982223365)*x[0]+(-1.53842407155)*x[1]+(0.995328875213)*x[2]
-        arg[2,2,0,0]=(1.5835734841)*x[0]+(0.178824495609)*x[1]+(-0.31332770355)*x[2]
-        arg[2,2,0,1]=(0.101063103927)*x[0]+(-0.0437670737377)*x[1]+(-0.109514170393)*x[2]
-        arg[2,2,1,0]=(-0.892614006193)*x[0]+(0.952803608394)*x[1]+(-0.643308315526)*x[2]
-        arg[2,2,1,1]=(-0.0606310193159)*x[0]+(-0.768822197122)*x[1]+(-1.43018654257)*x[2]
-        arg[2,2,2,0]=(0.107463856971)*x[0]+(1.27309352669)*x[1]+(1.65234673057)*x[2]
-        arg[2,2,2,1]=(0.699315319729)*x[0]+(-0.345960580793)*x[1]+(-1.61621444026)*x[2]
-        arg[2,3,0,0]=(0.9761936338)*x[0]+(0.665547749873)*x[1]+(-1.07512721449)*x[2]
-        arg[2,3,0,1]=(1.26182572924)*x[0]+(-0.416232568884)*x[1]+(-0.356737405174)*x[2]
-        arg[2,3,1,0]=(-0.477958253427)*x[0]+(0.198049156904)*x[1]+(-0.295022782364)*x[2]
-        arg[2,3,1,1]=(0.412187471103)*x[0]+(0.335655056628)*x[1]+(-0.0873658679329)*x[2]
-        arg[2,3,2,0]=(0.168439409327)*x[0]+(-0.131948711409)*x[1]+(1.66777364846)*x[2]
-        arg[2,3,2,1]=(0.508795552378)*x[0]+(-0.390505460243)*x[1]+(0.13190717559)*x[2]
-        arg[2,4,0,0]=(0.446543094067)*x[0]+(-1.49620720862)*x[1]+(-1.23581717894)*x[2]
-        arg[2,4,0,1]=(-0.964404449625)*x[0]+(0.229523164331)*x[1]+(-0.0829574431644)*x[2]
-        arg[2,4,1,0]=(-0.0222885761611)*x[0]+(-0.151419169433)*x[1]+(0.0521007301341)*x[2]
-        arg[2,4,1,1]=(-0.299232945099)*x[0]+(0.831745448311)*x[1]+(0.0354480204711)*x[2]
-        arg[2,4,2,0]=(0.350303784953)*x[0]+(0.0608299778701)*x[1]+(1.10333111365)*x[2]
-        arg[2,4,2,1]=(0.719573610926)*x[0]+(-0.0868905011544)*x[1]+(0.852804030732)*x[2]
-        arg[3,0,0,0]=(0.643070908885)*x[0]+(0.846705112025)*x[1]+(-0.340473447494)*x[2]
-        arg[3,0,0,1]=(-0.180433440729)*x[0]+(1.20490149625)*x[1]+(1.65034499912)*x[2]
-        arg[3,0,1,0]=(-0.454239570444)*x[0]+(0.425446741192)*x[1]+(0.469566134089)*x[2]
-        arg[3,0,1,1]=(-0.080272513364)*x[0]+(-0.437416002114)*x[1]+(0.741423922011)*x[2]
-        arg[3,0,2,0]=(0.0202920395247)*x[0]+(0.724451134981)*x[1]+(-0.628631137287)*x[2]
-        arg[3,0,2,1]=(1.27329890828)*x[0]+(1.32598594097)*x[1]+(-1.03893516914)*x[2]
-        arg[3,1,0,0]=(-0.316679599208)*x[0]+(1.37172239358)*x[1]+(-0.333448830595)*x[2]
-        arg[3,1,0,1]=(-0.97422120848)*x[0]+(-0.800596641862)*x[1]+(1.21296910893)*x[2]
-        arg[3,1,1,0]=(-0.791725431754)*x[0]+(0.173363698424)*x[1]+(-0.137920990647)*x[2]
-        arg[3,1,1,1]=(-0.104259554446)*x[0]+(1.14966042893)*x[1]+(0.694287361582)*x[2]
-        arg[3,1,2,0]=(0.130345878498)*x[0]+(0.186936528352)*x[1]+(-1.74442226692)*x[2]
-        arg[3,1,2,1]=(-0.952031053033)*x[0]+(0.718038193789)*x[1]+(-0.912958209036)*x[2]
-        arg[3,2,0,0]=(-1.16180973047)*x[0]+(0.0107173530275)*x[1]+(1.30278786691)*x[2]
-        arg[3,2,0,1]=(-0.224509227379)*x[0]+(0.0996327632409)*x[1]+(-0.590950424929)*x[2]
-        arg[3,2,1,0]=(1.37202300472)*x[0]+(-1.46745698646)*x[1]+(-0.811483806572)*x[2]
-        arg[3,2,1,1]=(1.4828065241)*x[0]+(-0.177365694124)*x[1]+(0.723931620237)*x[2]
-        arg[3,2,2,0]=(0.230529059637)*x[0]+(0.728445639896)*x[1]+(-0.566988770509)*x[2]
-        arg[3,2,2,1]=(0.797697737992)*x[0]+(-1.13322423945)*x[1]+(-1.1409387296)*x[2]
-        arg[3,3,0,0]=(0.217205133789)*x[0]+(-0.510677603419)*x[1]+(-0.580535665335)*x[2]
-        arg[3,3,0,1]=(-0.388656568244)*x[0]+(-0.906189671302)*x[1]+(0.44802765855)*x[2]
-        arg[3,3,1,0]=(0.13492738758)*x[0]+(-0.0523341874741)*x[1]+(1.42846176777)*x[2]
-        arg[3,3,1,1]=(0.243377010926)*x[0]+(-0.701174291473)*x[1]+(-0.756059212704)*x[2]
-        arg[3,3,2,0]=(1.48359083301)*x[0]+(1.17692500152)*x[1]+(-0.184437593764)*x[2]
-        arg[3,3,2,1]=(-0.105457636222)*x[0]+(-0.0190796656068)*x[1]+(-0.938560206034)*x[2]
-        arg[3,4,0,0]=(-0.101684388703)*x[0]+(-1.19809056647)*x[1]+(1.1989510907)*x[2]
-        arg[3,4,0,1]=(-1.0745487924)*x[0]+(-0.37560532919)*x[1]+(-0.967022985879)*x[2]
-        arg[3,4,1,0]=(0.315585027641)*x[0]+(-0.238716421886)*x[1]+(-0.275850551625)*x[2]
-        arg[3,4,1,1]=(-0.824271180248)*x[0]+(-0.0649845724269)*x[1]+(0.530472696035)*x[2]
-        arg[3,4,2,0]=(-0.518165130932)*x[0]+(1.44722596827)*x[1]+(0.072367534289)*x[2]
-        arg[3,4,2,1]=(-0.247477354356)*x[0]+(0.988584526142)*x[1]+(0.0491978506036)*x[2]
-        ref[0,0,0,0]=(0.523374388946)*x_ref[0]+(-0.462029311047)*x_ref[1]+(-0.47732568751)*x_ref[2]
-        ref[0,0,0,1]=(0.641437288282)*x_ref[0]+(-0.245967769804)*x_ref[1]+(-0.882711488334)*x_ref[2]
-        ref[0,0,1,0]=(-0.039075405101)*x_ref[0]+(0.233479040723)*x_ref[1]+(-0.450244284473)*x_ref[2]
-        ref[0,0,1,1]=(-1.00711630706)*x_ref[0]+(-0.247720707527)*x_ref[1]+(-0.597073422746)*x_ref[2]
-        ref[0,0,2,0]=(0.141738833983)*x_ref[0]+(-1.34846391496)*x_ref[1]+(0.214891803475)*x_ref[2]
-        ref[0,0,2,1]=(0.276967719755)*x_ref[0]+(-0.64300940909)*x_ref[1]+(-1.10068852616)*x_ref[2]
-        ref[0,1,0,0]=(0.438911917989)*x_ref[0]+(0.588137625057)*x_ref[1]+(0.744848057181)*x_ref[2]
-        ref[0,1,0,1]=(0.266343859518)*x_ref[0]+(1.24092635599)*x_ref[1]+(0.477206170905)*x_ref[2]
-        ref[0,1,1,0]=(0.328857688358)*x_ref[0]+(-1.17720038645)*x_ref[1]+(0.285045368661)*x_ref[2]
-        ref[0,1,1,1]=(-0.0985505878353)*x_ref[0]+(1.11228710542)*x_ref[1]+(0.159347839514)*x_ref[2]
-        ref[0,1,2,0]=(0.125378210814)*x_ref[0]+(1.51252392793)*x_ref[1]+(-0.0402281595871)*x_ref[2]
-        ref[0,1,2,1]=(-1.41964435548)*x_ref[0]+(0.825108246489)*x_ref[1]+(0.31679169508)*x_ref[2]
-        ref[0,2,0,0]=(1.47728541117)*x_ref[0]+(0.957708443424)*x_ref[1]+(-0.187892562217)*x_ref[2]
-        ref[0,2,0,1]=(0.0614505001405)*x_ref[0]+(0.144444072992)*x_ref[1]+(0.287839563179)*x_ref[2]
-        ref[0,2,1,0]=(0.512698173313)*x_ref[0]+(0.316852993542)*x_ref[1]+(0.538020705489)*x_ref[2]
-        ref[0,2,1,1]=(-0.349895838053)*x_ref[0]+(1.50602760725)*x_ref[1]+(-0.959979406715)*x_ref[2]
-        ref[0,2,2,0]=(-0.618802027626)*x_ref[0]+(0.71544179402)*x_ref[1]+(1.09297898989)*x_ref[2]
-        ref[0,2,2,1]=(-0.264932530879)*x_ref[0]+(-1.4100323815)*x_ref[1]+(-1.28423925034)*x_ref[2]
-        ref[0,3,0,0]=(0.481724893561)*x_ref[0]+(-0.546248388253)*x_ref[1]+(-0.214332802735)*x_ref[2]
-        ref[0,3,0,1]=(-1.33293479098)*x_ref[0]+(0.989294320484)*x_ref[1]+(-0.561974021785)*x_ref[2]
-        ref[0,3,1,0]=(-0.394718780001)*x_ref[0]+(1.0043343416)*x_ref[1]+(1.51370839793)*x_ref[2]
-        ref[0,3,1,1]=(1.08238957373)*x_ref[0]+(0.591631122094)*x_ref[1]+(0.075283954318)*x_ref[2]
-        ref[0,3,2,0]=(-1.0250149161)*x_ref[0]+(-0.739848118412)*x_ref[1]+(0.736595112789)*x_ref[2]
-        ref[0,3,2,1]=(-1.08033009366)*x_ref[0]+(-0.574926147021)*x_ref[1]+(0.421251948724)*x_ref[2]
-        ref[0,4,0,0]=(-0.0894466241931)*x_ref[0]+(1.14935896473)*x_ref[1]+(-0.490410015077)*x_ref[2]
-        ref[0,4,0,1]=(1.07777309372)*x_ref[0]+(1.0672971936)*x_ref[1]+(0.340143160972)*x_ref[2]
-        ref[0,4,1,0]=(0.905553949676)*x_ref[0]+(0.171320798438)*x_ref[1]+(1.83634812891)*x_ref[2]
-        ref[0,4,1,1]=(-0.663516264963)*x_ref[0]+(0.14871937304)*x_ref[1]+(-0.697949666962)*x_ref[2]
-        ref[0,4,2,0]=(1.41806579095)*x_ref[0]+(0.0357313086623)*x_ref[1]+(0.110846683649)*x_ref[2]
-        ref[0,4,2,1]=(-0.31919270211)*x_ref[0]+(-1.651049084)*x_ref[1]+(-1.47528307262)*x_ref[2]
-        ref[1,0,0,0]=(0.167209321535)*x_ref[0]+(-1.13066332212)*x_ref[1]+(0.209489173491)*x_ref[2]
-        ref[1,0,0,1]=(1.45770122794)*x_ref[0]+(1.12024118263)*x_ref[1]+(0.0203526002602)*x_ref[2]
-        ref[1,0,1,0]=(0.180403238696)*x_ref[0]+(0.580625819717)*x_ref[1]+(-1.00882441351)*x_ref[2]
-        ref[1,0,1,1]=(-0.20671421669)*x_ref[0]+(-0.199445466326)*x_ref[1]+(0.887365974398)*x_ref[2]
-        ref[1,0,2,0]=(-0.0109233374932)*x_ref[0]+(0.835241335188)*x_ref[1]+(-0.810658050514)*x_ref[2]
-        ref[1,0,2,1]=(-1.45991974539)*x_ref[0]+(0.955399748215)*x_ref[1]+(0.398673469474)*x_ref[2]
-        ref[1,1,0,0]=(0.726687414113)*x_ref[0]+(-1.35343793545)*x_ref[1]+(0.750079540417)*x_ref[2]
-        ref[1,1,0,1]=(-0.677871860083)*x_ref[0]+(-1.56756818572)*x_ref[1]+(-0.240923946416)*x_ref[2]
-        ref[1,1,1,0]=(-1.05791511835)*x_ref[0]+(-0.425827952234)*x_ref[1]+(-1.82875340474)*x_ref[2]
-        ref[1,1,1,1]=(-0.430783664297)*x_ref[0]+(0.552238591434)*x_ref[1]+(0.502702385375)*x_ref[2]
-        ref[1,1,2,0]=(0.240203734777)*x_ref[0]+(-0.0650121194654)*x_ref[1]+(1.04662204076)*x_ref[2]
-        ref[1,1,2,1]=(-0.25305133215)*x_ref[0]+(-0.31486026571)*x_ref[1]+(-1.83073697314)*x_ref[2]
-        ref[1,2,0,0]=(-1.09643062195)*x_ref[0]+(-0.437887555247)*x_ref[1]+(-1.33970467276)*x_ref[2]
-        ref[1,2,0,1]=(1.24489646204)*x_ref[0]+(1.0714412157)*x_ref[1]+(-0.192090595585)*x_ref[2]
-        ref[1,2,1,0]=(0.029290840641)*x_ref[0]+(-0.940655160496)*x_ref[1]+(-0.820414570983)*x_ref[2]
-        ref[1,2,1,1]=(-0.677190307386)*x_ref[0]+(-0.00164385522847)*x_ref[1]+(-0.46460277293)*x_ref[2]
-        ref[1,2,2,0]=(-0.320006508895)*x_ref[0]+(1.13412133331)*x_ref[1]+(-0.619705535377)*x_ref[2]
-        ref[1,2,2,1]=(-0.0220330715863)*x_ref[0]+(-0.64687567378)*x_ref[1]+(0.0957350181768)*x_ref[2]
-        ref[1,3,0,0]=(-0.25073330162)*x_ref[0]+(0.85795600432)*x_ref[1]+(1.53293778947)*x_ref[2]
-        ref[1,3,0,1]=(-0.183346360622)*x_ref[0]+(0.266035391885)*x_ref[1]+(-0.422228348627)*x_ref[2]
-        ref[1,3,1,0]=(-0.41587781442)*x_ref[0]+(-0.0103068212789)*x_ref[1]+(0.440665738388)*x_ref[2]
-        ref[1,3,1,1]=(1.41825912495)*x_ref[0]+(-0.0611650685825)*x_ref[1]+(0.972511387093)*x_ref[2]
-        ref[1,3,2,0]=(-0.336532230508)*x_ref[0]+(-0.0123275905127)*x_ref[1]+(-0.254643420879)*x_ref[2]
-        ref[1,3,2,1]=(-0.365437122858)*x_ref[0]+(0.71384297093)*x_ref[1]+(0.447802028475)*x_ref[2]
-        ref[1,4,0,0]=(1.33371172009)*x_ref[0]+(1.16948649723)*x_ref[1]+(-0.624453779138)*x_ref[2]
-        ref[1,4,0,1]=(0.0919647304743)*x_ref[0]+(1.20509307321)*x_ref[1]+(0.454668856107)*x_ref[2]
-        ref[1,4,1,0]=(0.179837036326)*x_ref[0]+(1.27470487309)*x_ref[1]+(0.248127557917)*x_ref[2]
-        ref[1,4,1,1]=(-0.0163592123585)*x_ref[0]+(-1.09373628426)*x_ref[1]+(-1.07284707536)*x_ref[2]
-        ref[1,4,2,0]=(-0.0617954247638)*x_ref[0]+(0.180336071139)*x_ref[1]+(0.0715760255435)*x_ref[2]
-        ref[1,4,2,1]=(0.449148667011)*x_ref[0]+(0.476092516356)*x_ref[1]+(-0.235672424702)*x_ref[2]
-        ref[2,0,0,0]=(1.06662096238)*x_ref[0]+(1.52079387843)*x_ref[1]+(-0.465087313097)*x_ref[2]
-        ref[2,0,0,1]=(-0.0113962755891)*x_ref[0]+(0.459517781034)*x_ref[1]+(0.423861505703)*x_ref[2]
-        ref[2,0,1,0]=(1.19571956088)*x_ref[0]+(1.02444853474)*x_ref[1]+(-1.31054246173)*x_ref[2]
-        ref[2,0,1,1]=(-1.39536067914)*x_ref[0]+(0.884184554143)*x_ref[1]+(-0.650926411157)*x_ref[2]
-        ref[2,0,2,0]=(-0.328672728946)*x_ref[0]+(1.07247782219)*x_ref[1]+(-0.61103916867)*x_ref[2]
-        ref[2,0,2,1]=(0.155304775433)*x_ref[0]+(-1.34794080729)*x_ref[1]+(-0.931891854948)*x_ref[2]
-        ref[2,1,0,0]=(-0.953726622792)*x_ref[0]+(0.483614421199)*x_ref[1]+(1.07026616662)*x_ref[2]
-        ref[2,1,0,1]=(0.720797127905)*x_ref[0]+(1.31309704242)*x_ref[1]+(0.534213389945)*x_ref[2]
-        ref[2,1,1,0]=(1.12642665973)*x_ref[0]+(-0.375134467285)*x_ref[1]+(0.223566393552)*x_ref[2]
-        ref[2,1,1,1]=(-0.380892997026)*x_ref[0]+(-0.661627351046)*x_ref[1]+(0.596842673155)*x_ref[2]
-        ref[2,1,2,0]=(0.233212348554)*x_ref[0]+(0.106673294307)*x_ref[1]+(-0.22268427628)*x_ref[2]
-        ref[2,1,2,1]=(0.67982223365)*x_ref[0]+(-1.53842407155)*x_ref[1]+(0.995328875213)*x_ref[2]
-        ref[2,2,0,0]=(1.5835734841)*x_ref[0]+(0.178824495609)*x_ref[1]+(-0.31332770355)*x_ref[2]
-        ref[2,2,0,1]=(0.101063103927)*x_ref[0]+(-0.0437670737377)*x_ref[1]+(-0.109514170393)*x_ref[2]
-        ref[2,2,1,0]=(-0.892614006193)*x_ref[0]+(0.952803608394)*x_ref[1]+(-0.643308315526)*x_ref[2]
-        ref[2,2,1,1]=(-0.0606310193159)*x_ref[0]+(-0.768822197122)*x_ref[1]+(-1.43018654257)*x_ref[2]
-        ref[2,2,2,0]=(0.107463856971)*x_ref[0]+(1.27309352669)*x_ref[1]+(1.65234673057)*x_ref[2]
-        ref[2,2,2,1]=(0.699315319729)*x_ref[0]+(-0.345960580793)*x_ref[1]+(-1.61621444026)*x_ref[2]
-        ref[2,3,0,0]=(0.9761936338)*x_ref[0]+(0.665547749873)*x_ref[1]+(-1.07512721449)*x_ref[2]
-        ref[2,3,0,1]=(1.26182572924)*x_ref[0]+(-0.416232568884)*x_ref[1]+(-0.356737405174)*x_ref[2]
-        ref[2,3,1,0]=(-0.477958253427)*x_ref[0]+(0.198049156904)*x_ref[1]+(-0.295022782364)*x_ref[2]
-        ref[2,3,1,1]=(0.412187471103)*x_ref[0]+(0.335655056628)*x_ref[1]+(-0.0873658679329)*x_ref[2]
-        ref[2,3,2,0]=(0.168439409327)*x_ref[0]+(-0.131948711409)*x_ref[1]+(1.66777364846)*x_ref[2]
-        ref[2,3,2,1]=(0.508795552378)*x_ref[0]+(-0.390505460243)*x_ref[1]+(0.13190717559)*x_ref[2]
-        ref[2,4,0,0]=(0.446543094067)*x_ref[0]+(-1.49620720862)*x_ref[1]+(-1.23581717894)*x_ref[2]
-        ref[2,4,0,1]=(-0.964404449625)*x_ref[0]+(0.229523164331)*x_ref[1]+(-0.0829574431644)*x_ref[2]
-        ref[2,4,1,0]=(-0.0222885761611)*x_ref[0]+(-0.151419169433)*x_ref[1]+(0.0521007301341)*x_ref[2]
-        ref[2,4,1,1]=(-0.299232945099)*x_ref[0]+(0.831745448311)*x_ref[1]+(0.0354480204711)*x_ref[2]
-        ref[2,4,2,0]=(0.350303784953)*x_ref[0]+(0.0608299778701)*x_ref[1]+(1.10333111365)*x_ref[2]
-        ref[2,4,2,1]=(0.719573610926)*x_ref[0]+(-0.0868905011544)*x_ref[1]+(0.852804030732)*x_ref[2]
-        ref[3,0,0,0]=(0.643070908885)*x_ref[0]+(0.846705112025)*x_ref[1]+(-0.340473447494)*x_ref[2]
-        ref[3,0,0,1]=(-0.180433440729)*x_ref[0]+(1.20490149625)*x_ref[1]+(1.65034499912)*x_ref[2]
-        ref[3,0,1,0]=(-0.454239570444)*x_ref[0]+(0.425446741192)*x_ref[1]+(0.469566134089)*x_ref[2]
-        ref[3,0,1,1]=(-0.080272513364)*x_ref[0]+(-0.437416002114)*x_ref[1]+(0.741423922011)*x_ref[2]
-        ref[3,0,2,0]=(0.0202920395247)*x_ref[0]+(0.724451134981)*x_ref[1]+(-0.628631137287)*x_ref[2]
-        ref[3,0,2,1]=(1.27329890828)*x_ref[0]+(1.32598594097)*x_ref[1]+(-1.03893516914)*x_ref[2]
-        ref[3,1,0,0]=(-0.316679599208)*x_ref[0]+(1.37172239358)*x_ref[1]+(-0.333448830595)*x_ref[2]
-        ref[3,1,0,1]=(-0.97422120848)*x_ref[0]+(-0.800596641862)*x_ref[1]+(1.21296910893)*x_ref[2]
-        ref[3,1,1,0]=(-0.791725431754)*x_ref[0]+(0.173363698424)*x_ref[1]+(-0.137920990647)*x_ref[2]
-        ref[3,1,1,1]=(-0.104259554446)*x_ref[0]+(1.14966042893)*x_ref[1]+(0.694287361582)*x_ref[2]
-        ref[3,1,2,0]=(0.130345878498)*x_ref[0]+(0.186936528352)*x_ref[1]+(-1.74442226692)*x_ref[2]
-        ref[3,1,2,1]=(-0.952031053033)*x_ref[0]+(0.718038193789)*x_ref[1]+(-0.912958209036)*x_ref[2]
-        ref[3,2,0,0]=(-1.16180973047)*x_ref[0]+(0.0107173530275)*x_ref[1]+(1.30278786691)*x_ref[2]
-        ref[3,2,0,1]=(-0.224509227379)*x_ref[0]+(0.0996327632409)*x_ref[1]+(-0.590950424929)*x_ref[2]
-        ref[3,2,1,0]=(1.37202300472)*x_ref[0]+(-1.46745698646)*x_ref[1]+(-0.811483806572)*x_ref[2]
-        ref[3,2,1,1]=(1.4828065241)*x_ref[0]+(-0.177365694124)*x_ref[1]+(0.723931620237)*x_ref[2]
-        ref[3,2,2,0]=(0.230529059637)*x_ref[0]+(0.728445639896)*x_ref[1]+(-0.566988770509)*x_ref[2]
-        ref[3,2,2,1]=(0.797697737992)*x_ref[0]+(-1.13322423945)*x_ref[1]+(-1.1409387296)*x_ref[2]
-        ref[3,3,0,0]=(0.217205133789)*x_ref[0]+(-0.510677603419)*x_ref[1]+(-0.580535665335)*x_ref[2]
-        ref[3,3,0,1]=(-0.388656568244)*x_ref[0]+(-0.906189671302)*x_ref[1]+(0.44802765855)*x_ref[2]
-        ref[3,3,1,0]=(0.13492738758)*x_ref[0]+(-0.0523341874741)*x_ref[1]+(1.42846176777)*x_ref[2]
-        ref[3,3,1,1]=(0.243377010926)*x_ref[0]+(-0.701174291473)*x_ref[1]+(-0.756059212704)*x_ref[2]
-        ref[3,3,2,0]=(1.48359083301)*x_ref[0]+(1.17692500152)*x_ref[1]+(-0.184437593764)*x_ref[2]
-        ref[3,3,2,1]=(-0.105457636222)*x_ref[0]+(-0.0190796656068)*x_ref[1]+(-0.938560206034)*x_ref[2]
-        ref[3,4,0,0]=(-0.101684388703)*x_ref[0]+(-1.19809056647)*x_ref[1]+(1.1989510907)*x_ref[2]
-        ref[3,4,0,1]=(-1.0745487924)*x_ref[0]+(-0.37560532919)*x_ref[1]+(-0.967022985879)*x_ref[2]
-        ref[3,4,1,0]=(0.315585027641)*x_ref[0]+(-0.238716421886)*x_ref[1]+(-0.275850551625)*x_ref[2]
-        ref[3,4,1,1]=(-0.824271180248)*x_ref[0]+(-0.0649845724269)*x_ref[1]+(0.530472696035)*x_ref[2]
-        ref[3,4,2,0]=(-0.518165130932)*x_ref[0]+(1.44722596827)*x_ref[1]+(0.072367534289)*x_ref[2]
-        ref[3,4,2,1]=(-0.247477354356)*x_ref[0]+(0.988584526142)*x_ref[1]+(0.0491978506036)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0969659653911)*x[0]**o+(-0.0778467995236)*x[0]+(-0.896520347956)*x[1]**o+(0.452579859858)*x[1]
-        ref=(0.0969659653911)*x_ref[0]**o+(-0.0778467995236)*x_ref[0]+(-0.896520347956)*x_ref[1]**o+(0.452579859858)*x_ref[1]
-      else:
-        arg=(-0.62506591451)*x[0]**o+(0.970735975624)*x[0]+(-0.563055321362)*x[1]**o+(-0.281482915069)*x[1]+(-0.6461258967)*x[2]**o+(0.786610350609)*x[2]
-        ref=(-0.62506591451)*x_ref[0]**o+(0.970735975624)*x_ref[0]+(-0.563055321362)*x_ref[1]**o+(-0.281482915069)*x_ref[1]+(-0.6461258967)*x_ref[2]**o+(0.786610350609)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.725240039321)*x[0]**o+(0.326302203613)*x[0]+(0.356072156898)*x[1]**o+(0.980066388307)*x[1]
-        arg[1]=(0.171551389095)*x[0]**o+(0.379133470853)*x[0]+(0.120608077039)*x[1]**o+(-0.413701037132)*x[1]
-        ref[0]=(0.725240039321)*x_ref[0]**o+(0.326302203613)*x_ref[0]+(0.356072156898)*x_ref[1]**o+(0.980066388307)*x_ref[1]
-        ref[1]=(0.171551389095)*x_ref[0]**o+(0.379133470853)*x_ref[0]+(0.120608077039)*x_ref[1]**o+(-0.413701037132)*x_ref[1]
-      else:
-        arg[0]=(-0.656095745624)*x[0]**o+(-0.540430373724)*x[0]+(-0.109962817674)*x[1]**o+(-0.969692783268)*x[1]+(-0.377994841279)*x[2]**o+(-0.664035030664)*x[2]
-        arg[1]=(0.768498465456)*x[0]**o+(0.647294499552)*x[0]+(0.824672861058)*x[1]**o+(-0.848088780836)*x[1]+(0.045558138597)*x[2]**o+(-0.209365900036)*x[2]
-        ref[0]=(-0.656095745624)*x_ref[0]**o+(-0.540430373724)*x_ref[0]+(-0.109962817674)*x_ref[1]**o+(-0.969692783268)*x_ref[1]+(-0.377994841279)*x_ref[2]**o+(-0.664035030664)*x_ref[2]
-        ref[1]=(0.768498465456)*x_ref[0]**o+(0.647294499552)*x_ref[0]+(0.824672861058)*x_ref[1]**o+(-0.848088780836)*x_ref[1]+(0.045558138597)*x_ref[2]**o+(-0.209365900036)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.694866182164)*x[0]**o+(0.759641527396)*x[0]+(-0.696641139757)*x[1]**o+(0.617978953453)*x[1]
-        arg[0,1]=(0.75058922213)*x[0]**o+(0.580832851854)*x[0]+(-0.237039031011)*x[1]**o+(0.53518450519)*x[1]
-        arg[0,2]=(-0.191933019173)*x[0]**o+(-0.0638088686782)*x[0]+(0.871645336149)*x[1]**o+(0.256502442034)*x[1]
-        arg[0,3]=(0.829189580591)*x[0]**o+(0.186064016504)*x[0]+(-0.204496850484)*x[1]**o+(-0.314535598074)*x[1]
-        arg[0,4]=(0.170968249419)*x[0]**o+(-0.719959835105)*x[0]+(0.367000223059)*x[1]**o+(-0.210239222752)*x[1]
-        arg[1,0]=(-0.424311493894)*x[0]**o+(-0.381097143579)*x[0]+(-0.54925292526)*x[1]**o+(-0.393349131169)*x[1]
-        arg[1,1]=(0.148181508143)*x[0]**o+(-0.224530937841)*x[0]+(0.778748719265)*x[1]**o+(-0.522104185968)*x[1]
-        arg[1,2]=(0.134819103337)*x[0]**o+(0.0388165865124)*x[0]+(-0.772318490115)*x[1]**o+(-0.928611227188)*x[1]
-        arg[1,3]=(0.790807030518)*x[0]**o+(-0.849964960983)*x[0]+(-0.79407080953)*x[1]**o+(-0.626315155005)*x[1]
-        arg[1,4]=(-0.998842104726)*x[0]**o+(-0.325938405818)*x[0]+(-0.81445420822)*x[1]**o+(0.868281547664)*x[1]
-        arg[2,0]=(-0.975572739854)*x[0]**o+(-0.0630975707316)*x[0]+(0.0688031679656)*x[1]**o+(0.557152464527)*x[1]
-        arg[2,1]=(0.389814261767)*x[0]**o+(0.523891881188)*x[0]+(-0.558388242102)*x[1]**o+(-0.45720905598)*x[1]
-        arg[2,2]=(0.763327517145)*x[0]**o+(0.637954909904)*x[0]+(0.407602154355)*x[1]**o+(0.707118271445)*x[1]
-        arg[2,3]=(-0.823371482965)*x[0]**o+(0.918685041464)*x[0]+(0.991991462022)*x[1]**o+(0.489892661208)*x[1]
-        arg[2,4]=(-0.661567455889)*x[0]**o+(-0.00566795402284)*x[0]+(0.86705493299)*x[1]**o+(0.00158321121677)*x[1]
-        arg[3,0]=(0.365456232671)*x[0]**o+(-0.587373381962)*x[0]+(0.751291631507)*x[1]**o+(-0.0605248375222)*x[1]
-        arg[3,1]=(0.546630294768)*x[0]**o+(-0.903068297271)*x[0]+(0.486313468693)*x[1]**o+(0.355322343068)*x[1]
-        arg[3,2]=(0.233755056849)*x[0]**o+(-0.350375425427)*x[0]+(0.0115435986629)*x[1]**o+(-0.713895312694)*x[1]
-        arg[3,3]=(0.385411302842)*x[0]**o+(0.0733743700003)*x[0]+(0.439219708301)*x[1]**o+(0.129391539278)*x[1]
-        arg[3,4]=(-0.194268604537)*x[0]**o+(0.175829932738)*x[0]+(0.866342013931)*x[1]**o+(-0.213891435501)*x[1]
-        ref[0,0]=(0.694866182164)*x_ref[0]**o+(0.759641527396)*x_ref[0]+(-0.696641139757)*x_ref[1]**o+(0.617978953453)*x_ref[1]
-        ref[0,1]=(0.75058922213)*x_ref[0]**o+(0.580832851854)*x_ref[0]+(-0.237039031011)*x_ref[1]**o+(0.53518450519)*x_ref[1]
-        ref[0,2]=(-0.191933019173)*x_ref[0]**o+(-0.0638088686782)*x_ref[0]+(0.871645336149)*x_ref[1]**o+(0.256502442034)*x_ref[1]
-        ref[0,3]=(0.829189580591)*x_ref[0]**o+(0.186064016504)*x_ref[0]+(-0.204496850484)*x_ref[1]**o+(-0.314535598074)*x_ref[1]
-        ref[0,4]=(0.170968249419)*x_ref[0]**o+(-0.719959835105)*x_ref[0]+(0.367000223059)*x_ref[1]**o+(-0.210239222752)*x_ref[1]
-        ref[1,0]=(-0.424311493894)*x_ref[0]**o+(-0.381097143579)*x_ref[0]+(-0.54925292526)*x_ref[1]**o+(-0.393349131169)*x_ref[1]
-        ref[1,1]=(0.148181508143)*x_ref[0]**o+(-0.224530937841)*x_ref[0]+(0.778748719265)*x_ref[1]**o+(-0.522104185968)*x_ref[1]
-        ref[1,2]=(0.134819103337)*x_ref[0]**o+(0.0388165865124)*x_ref[0]+(-0.772318490115)*x_ref[1]**o+(-0.928611227188)*x_ref[1]
-        ref[1,3]=(0.790807030518)*x_ref[0]**o+(-0.849964960983)*x_ref[0]+(-0.79407080953)*x_ref[1]**o+(-0.626315155005)*x_ref[1]
-        ref[1,4]=(-0.998842104726)*x_ref[0]**o+(-0.325938405818)*x_ref[0]+(-0.81445420822)*x_ref[1]**o+(0.868281547664)*x_ref[1]
-        ref[2,0]=(-0.975572739854)*x_ref[0]**o+(-0.0630975707316)*x_ref[0]+(0.0688031679656)*x_ref[1]**o+(0.557152464527)*x_ref[1]
-        ref[2,1]=(0.389814261767)*x_ref[0]**o+(0.523891881188)*x_ref[0]+(-0.558388242102)*x_ref[1]**o+(-0.45720905598)*x_ref[1]
-        ref[2,2]=(0.763327517145)*x_ref[0]**o+(0.637954909904)*x_ref[0]+(0.407602154355)*x_ref[1]**o+(0.707118271445)*x_ref[1]
-        ref[2,3]=(-0.823371482965)*x_ref[0]**o+(0.918685041464)*x_ref[0]+(0.991991462022)*x_ref[1]**o+(0.489892661208)*x_ref[1]
-        ref[2,4]=(-0.661567455889)*x_ref[0]**o+(-0.00566795402284)*x_ref[0]+(0.86705493299)*x_ref[1]**o+(0.00158321121677)*x_ref[1]
-        ref[3,0]=(0.365456232671)*x_ref[0]**o+(-0.587373381962)*x_ref[0]+(0.751291631507)*x_ref[1]**o+(-0.0605248375222)*x_ref[1]
-        ref[3,1]=(0.546630294768)*x_ref[0]**o+(-0.903068297271)*x_ref[0]+(0.486313468693)*x_ref[1]**o+(0.355322343068)*x_ref[1]
-        ref[3,2]=(0.233755056849)*x_ref[0]**o+(-0.350375425427)*x_ref[0]+(0.0115435986629)*x_ref[1]**o+(-0.713895312694)*x_ref[1]
-        ref[3,3]=(0.385411302842)*x_ref[0]**o+(0.0733743700003)*x_ref[0]+(0.439219708301)*x_ref[1]**o+(0.129391539278)*x_ref[1]
-        ref[3,4]=(-0.194268604537)*x_ref[0]**o+(0.175829932738)*x_ref[0]+(0.866342013931)*x_ref[1]**o+(-0.213891435501)*x_ref[1]
-      else:
-        arg[0,0]=(-0.479138946804)*x[0]**o+(0.240408443007)*x[0]+(0.309155796205)*x[1]**o+(-0.124360991957)*x[1]+(0.00301047542037)*x[2]**o+(-0.039439802799)*x[2]
-        arg[0,1]=(0.41979402771)*x[0]**o+(0.798738902847)*x[0]+(0.619960746922)*x[1]**o+(-0.551662130664)*x[1]+(0.914293623695)*x[2]**o+(0.6859768812)*x[2]
-        arg[0,2]=(0.744593492696)*x[0]**o+(-0.31743031745)*x[0]+(0.389545123971)*x[1]**o+(0.592024987288)*x[1]+(0.63456095022)*x[2]**o+(-0.746571796061)*x[2]
-        arg[0,3]=(-0.632549503649)*x[0]**o+(-0.687745599598)*x[0]+(0.794176042123)*x[1]**o+(-0.971466375953)*x[1]+(-0.086939632062)*x[2]**o+(0.373736042024)*x[2]
-        arg[0,4]=(-0.966879538217)*x[0]**o+(-0.609291970974)*x[0]+(0.000409196978095)*x[1]**o+(0.623934484362)*x[1]+(-0.1694749999)*x[2]**o+(0.131778917979)*x[2]
-        arg[1,0]=(0.763452444611)*x[0]**o+(0.805147582411)*x[0]+(0.999704124146)*x[1]**o+(0.0635253753138)*x[1]+(-0.717889410548)*x[2]**o+(-0.840765968423)*x[2]
-        arg[1,1]=(-0.26910479702)*x[0]**o+(0.594093239771)*x[0]+(-0.536150372834)*x[1]**o+(-0.768506263316)*x[1]+(-0.924510063594)*x[2]**o+(-0.950568839784)*x[2]
-        arg[1,2]=(-0.452317334239)*x[0]**o+(0.186343827048)*x[0]+(0.921015823436)*x[1]**o+(-0.656809197675)*x[1]+(-0.841898648461)*x[2]**o+(0.267827136605)*x[2]
-        arg[1,3]=(-0.880873336233)*x[0]**o+(-0.915350352959)*x[0]+(0.92197459758)*x[1]**o+(0.20861139921)*x[1]+(0.776743964515)*x[2]**o+(0.858569288507)*x[2]
-        arg[1,4]=(0.422773256864)*x[0]**o+(0.397743860671)*x[0]+(0.726470981309)*x[1]**o+(-0.233534612019)*x[1]+(-0.350345927201)*x[2]**o+(-0.192294374344)*x[2]
-        arg[2,0]=(0.0706785590906)*x[0]**o+(-0.102098736751)*x[0]+(-0.858298802695)*x[1]**o+(-0.1390708698)*x[1]+(0.221129390442)*x[2]**o+(0.770148745174)*x[2]
-        arg[2,1]=(0.619559141603)*x[0]**o+(-0.969165124767)*x[0]+(0.36662839455)*x[1]**o+(0.505630485999)*x[1]+(0.170716012487)*x[2]**o+(0.355457960368)*x[2]
-        arg[2,2]=(0.254098998564)*x[0]**o+(0.725662782597)*x[0]+(0.274108937869)*x[1]**o+(0.682336753679)*x[1]+(-0.858192561327)*x[2]**o+(-0.538785359078)*x[2]
-        arg[2,3]=(0.25513729674)*x[0]**o+(-0.594968324608)*x[0]+(-0.306612686559)*x[1]**o+(-0.953891015684)*x[1]+(-0.00631658753287)*x[2]**o+(-0.889694464702)*x[2]
-        arg[2,4]=(0.654463492789)*x[0]**o+(-0.42220702047)*x[0]+(-0.690125229151)*x[1]**o+(0.318923837754)*x[1]+(-0.691341299676)*x[2]**o+(0.824631778823)*x[2]
-        arg[3,0]=(-0.576563725107)*x[0]**o+(-0.0354219245402)*x[0]+(0.650854296808)*x[1]**o+(0.930072736771)*x[1]+(0.8383657117)*x[2]**o+(0.191293272146)*x[2]
-        arg[3,1]=(0.104382485594)*x[0]**o+(-0.718025390561)*x[0]+(-0.822188446684)*x[1]**o+(-0.0772502664782)*x[1]+(-0.513331680922)*x[2]**o+(0.164340503698)*x[2]
-        arg[3,2]=(0.685178273481)*x[0]**o+(-0.241726920352)*x[0]+(-0.891512838953)*x[1]**o+(-0.428833037662)*x[1]+(-0.910220899771)*x[2]**o+(-0.0109246344661)*x[2]
-        arg[3,3]=(-0.294769406995)*x[0]**o+(0.643502505933)*x[0]+(0.309444282121)*x[1]**o+(-0.935318923262)*x[1]+(0.242426961867)*x[2]**o+(-0.417268637067)*x[2]
-        arg[3,4]=(0.0382306334841)*x[0]**o+(-0.564858278904)*x[0]+(-0.594566652327)*x[1]**o+(0.911894434818)*x[1]+(-0.314178793024)*x[2]**o+(0.302730333267)*x[2]
-        ref[0,0]=(-0.479138946804)*x_ref[0]**o+(0.240408443007)*x_ref[0]+(0.309155796205)*x_ref[1]**o+(-0.124360991957)*x_ref[1]+(0.00301047542037)*x_ref[2]**o+(-0.039439802799)*x_ref[2]
-        ref[0,1]=(0.41979402771)*x_ref[0]**o+(0.798738902847)*x_ref[0]+(0.619960746922)*x_ref[1]**o+(-0.551662130664)*x_ref[1]+(0.914293623695)*x_ref[2]**o+(0.6859768812)*x_ref[2]
-        ref[0,2]=(0.744593492696)*x_ref[0]**o+(-0.31743031745)*x_ref[0]+(0.389545123971)*x_ref[1]**o+(0.592024987288)*x_ref[1]+(0.63456095022)*x_ref[2]**o+(-0.746571796061)*x_ref[2]
-        ref[0,3]=(-0.632549503649)*x_ref[0]**o+(-0.687745599598)*x_ref[0]+(0.794176042123)*x_ref[1]**o+(-0.971466375953)*x_ref[1]+(-0.086939632062)*x_ref[2]**o+(0.373736042024)*x_ref[2]
-        ref[0,4]=(-0.966879538217)*x_ref[0]**o+(-0.609291970974)*x_ref[0]+(0.000409196978095)*x_ref[1]**o+(0.623934484362)*x_ref[1]+(-0.1694749999)*x_ref[2]**o+(0.131778917979)*x_ref[2]
-        ref[1,0]=(0.763452444611)*x_ref[0]**o+(0.805147582411)*x_ref[0]+(0.999704124146)*x_ref[1]**o+(0.0635253753138)*x_ref[1]+(-0.717889410548)*x_ref[2]**o+(-0.840765968423)*x_ref[2]
-        ref[1,1]=(-0.26910479702)*x_ref[0]**o+(0.594093239771)*x_ref[0]+(-0.536150372834)*x_ref[1]**o+(-0.768506263316)*x_ref[1]+(-0.924510063594)*x_ref[2]**o+(-0.950568839784)*x_ref[2]
-        ref[1,2]=(-0.452317334239)*x_ref[0]**o+(0.186343827048)*x_ref[0]+(0.921015823436)*x_ref[1]**o+(-0.656809197675)*x_ref[1]+(-0.841898648461)*x_ref[2]**o+(0.267827136605)*x_ref[2]
-        ref[1,3]=(-0.880873336233)*x_ref[0]**o+(-0.915350352959)*x_ref[0]+(0.92197459758)*x_ref[1]**o+(0.20861139921)*x_ref[1]+(0.776743964515)*x_ref[2]**o+(0.858569288507)*x_ref[2]
-        ref[1,4]=(0.422773256864)*x_ref[0]**o+(0.397743860671)*x_ref[0]+(0.726470981309)*x_ref[1]**o+(-0.233534612019)*x_ref[1]+(-0.350345927201)*x_ref[2]**o+(-0.192294374344)*x_ref[2]
-        ref[2,0]=(0.0706785590906)*x_ref[0]**o+(-0.102098736751)*x_ref[0]+(-0.858298802695)*x_ref[1]**o+(-0.1390708698)*x_ref[1]+(0.221129390442)*x_ref[2]**o+(0.770148745174)*x_ref[2]
-        ref[2,1]=(0.619559141603)*x_ref[0]**o+(-0.969165124767)*x_ref[0]+(0.36662839455)*x_ref[1]**o+(0.505630485999)*x_ref[1]+(0.170716012487)*x_ref[2]**o+(0.355457960368)*x_ref[2]
-        ref[2,2]=(0.254098998564)*x_ref[0]**o+(0.725662782597)*x_ref[0]+(0.274108937869)*x_ref[1]**o+(0.682336753679)*x_ref[1]+(-0.858192561327)*x_ref[2]**o+(-0.538785359078)*x_ref[2]
-        ref[2,3]=(0.25513729674)*x_ref[0]**o+(-0.594968324608)*x_ref[0]+(-0.306612686559)*x_ref[1]**o+(-0.953891015684)*x_ref[1]+(-0.00631658753287)*x_ref[2]**o+(-0.889694464702)*x_ref[2]
-        ref[2,4]=(0.654463492789)*x_ref[0]**o+(-0.42220702047)*x_ref[0]+(-0.690125229151)*x_ref[1]**o+(0.318923837754)*x_ref[1]+(-0.691341299676)*x_ref[2]**o+(0.824631778823)*x_ref[2]
-        ref[3,0]=(-0.576563725107)*x_ref[0]**o+(-0.0354219245402)*x_ref[0]+(0.650854296808)*x_ref[1]**o+(0.930072736771)*x_ref[1]+(0.8383657117)*x_ref[2]**o+(0.191293272146)*x_ref[2]
-        ref[3,1]=(0.104382485594)*x_ref[0]**o+(-0.718025390561)*x_ref[0]+(-0.822188446684)*x_ref[1]**o+(-0.0772502664782)*x_ref[1]+(-0.513331680922)*x_ref[2]**o+(0.164340503698)*x_ref[2]
-        ref[3,2]=(0.685178273481)*x_ref[0]**o+(-0.241726920352)*x_ref[0]+(-0.891512838953)*x_ref[1]**o+(-0.428833037662)*x_ref[1]+(-0.910220899771)*x_ref[2]**o+(-0.0109246344661)*x_ref[2]
-        ref[3,3]=(-0.294769406995)*x_ref[0]**o+(0.643502505933)*x_ref[0]+(0.309444282121)*x_ref[1]**o+(-0.935318923262)*x_ref[1]+(0.242426961867)*x_ref[2]**o+(-0.417268637067)*x_ref[2]
-        ref[3,4]=(0.0382306334841)*x_ref[0]**o+(-0.564858278904)*x_ref[0]+(-0.594566652327)*x_ref[1]**o+(0.911894434818)*x_ref[1]+(-0.314178793024)*x_ref[2]**o+(0.302730333267)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.298635657968)*x[0]**o+(0.917751825722)*x[0]+(-0.000157823722007)*x[1]**o+(-0.202721972906)*x[1]
-        arg[0,0,1]=(0.164880328673)*x[0]**o+(-0.310233508297)*x[0]+(-0.976270095138)*x[1]**o+(-0.86689594754)*x[1]
-        arg[0,1,0]=(-0.130835262631)*x[0]**o+(-0.485555484157)*x[0]+(0.055655815912)*x[1]**o+(-0.488201458657)*x[1]
-        arg[0,1,1]=(-0.339982923518)*x[0]**o+(0.435464515598)*x[0]+(-0.986955506076)*x[1]**o+(0.590966000031)*x[1]
-        arg[1,0,0]=(0.150280127463)*x[0]**o+(0.827183876844)*x[0]+(0.468401701763)*x[1]**o+(-0.879871376091)*x[1]
-        arg[1,0,1]=(0.48434831025)*x[0]**o+(-0.623958069024)*x[0]+(-0.781911271849)*x[1]**o+(0.34398679645)*x[1]
-        arg[1,1,0]=(0.124273770782)*x[0]**o+(-0.683096046651)*x[0]+(0.769636378285)*x[1]**o+(-0.471970832437)*x[1]
-        arg[1,1,1]=(0.769777912195)*x[0]**o+(-0.740802020319)*x[0]+(0.659109761568)*x[1]**o+(-0.495444655614)*x[1]
-        arg[2,0,0]=(0.270063777356)*x[0]**o+(0.558849439723)*x[0]+(0.128946408169)*x[1]**o+(-0.962495994445)*x[1]
-        arg[2,0,1]=(-0.0403460883009)*x[0]**o+(0.084983334662)*x[0]+(0.297573700577)*x[1]**o+(0.911774703678)*x[1]
-        arg[2,1,0]=(0.821680378088)*x[0]**o+(0.10823172035)*x[0]+(-0.150213295203)*x[1]**o+(0.310471151961)*x[1]
-        arg[2,1,1]=(-0.407033195691)*x[0]**o+(0.716262964777)*x[0]+(-0.262475432397)*x[1]**o+(-0.234158898682)*x[1]
-        arg[3,0,0]=(-0.109193787139)*x[0]**o+(0.403892847875)*x[0]+(0.794082322801)*x[1]**o+(0.669070572253)*x[1]
-        arg[3,0,1]=(0.969770217228)*x[0]**o+(0.735280190411)*x[0]+(-0.339891263613)*x[1]**o+(0.859989056027)*x[1]
-        arg[3,1,0]=(-0.906193851712)*x[0]**o+(-0.330178132059)*x[0]+(-0.48035114847)*x[1]**o+(-0.48050067188)*x[1]
-        arg[3,1,1]=(0.922778761752)*x[0]**o+(0.899145572602)*x[0]+(-0.991922151176)*x[1]**o+(0.615744852656)*x[1]
-        arg[4,0,0]=(0.457092295352)*x[0]**o+(-0.120904430848)*x[0]+(0.575186782188)*x[1]**o+(-0.685522788659)*x[1]
-        arg[4,0,1]=(0.254934861907)*x[0]**o+(-0.208850206761)*x[0]+(-0.0933987467304)*x[1]**o+(0.687715419212)*x[1]
-        arg[4,1,0]=(0.483890412252)*x[0]**o+(-0.192055355216)*x[0]+(0.0891595367214)*x[1]**o+(-0.835900121805)*x[1]
-        arg[4,1,1]=(-0.281109655935)*x[0]**o+(0.279867178407)*x[0]+(0.843094337157)*x[1]**o+(-0.457583293166)*x[1]
-        arg[5,0,0]=(0.595078633674)*x[0]**o+(-0.994652086537)*x[0]+(0.111354924733)*x[1]**o+(0.715580298167)*x[1]
-        arg[5,0,1]=(0.823409068766)*x[0]**o+(0.41047089933)*x[0]+(-0.610763277348)*x[1]**o+(0.0991108428868)*x[1]
-        arg[5,1,0]=(-0.0291539407811)*x[0]**o+(0.371799932333)*x[0]+(0.631702366805)*x[1]**o+(-0.858415923309)*x[1]
-        arg[5,1,1]=(-0.636146064991)*x[0]**o+(0.407248062196)*x[0]+(-0.507069143933)*x[1]**o+(-0.0509951705166)*x[1]
-        ref[0,0,0]=(0.298635657968)*x_ref[0]**o+(0.917751825722)*x_ref[0]+(-0.000157823722007)*x_ref[1]**o+(-0.202721972906)*x_ref[1]
-        ref[0,0,1]=(0.164880328673)*x_ref[0]**o+(-0.310233508297)*x_ref[0]+(-0.976270095138)*x_ref[1]**o+(-0.86689594754)*x_ref[1]
-        ref[0,1,0]=(-0.130835262631)*x_ref[0]**o+(-0.485555484157)*x_ref[0]+(0.055655815912)*x_ref[1]**o+(-0.488201458657)*x_ref[1]
-        ref[0,1,1]=(-0.339982923518)*x_ref[0]**o+(0.435464515598)*x_ref[0]+(-0.986955506076)*x_ref[1]**o+(0.590966000031)*x_ref[1]
-        ref[1,0,0]=(0.150280127463)*x_ref[0]**o+(0.827183876844)*x_ref[0]+(0.468401701763)*x_ref[1]**o+(-0.879871376091)*x_ref[1]
-        ref[1,0,1]=(0.48434831025)*x_ref[0]**o+(-0.623958069024)*x_ref[0]+(-0.781911271849)*x_ref[1]**o+(0.34398679645)*x_ref[1]
-        ref[1,1,0]=(0.124273770782)*x_ref[0]**o+(-0.683096046651)*x_ref[0]+(0.769636378285)*x_ref[1]**o+(-0.471970832437)*x_ref[1]
-        ref[1,1,1]=(0.769777912195)*x_ref[0]**o+(-0.740802020319)*x_ref[0]+(0.659109761568)*x_ref[1]**o+(-0.495444655614)*x_ref[1]
-        ref[2,0,0]=(0.270063777356)*x_ref[0]**o+(0.558849439723)*x_ref[0]+(0.128946408169)*x_ref[1]**o+(-0.962495994445)*x_ref[1]
-        ref[2,0,1]=(-0.0403460883009)*x_ref[0]**o+(0.084983334662)*x_ref[0]+(0.297573700577)*x_ref[1]**o+(0.911774703678)*x_ref[1]
-        ref[2,1,0]=(0.821680378088)*x_ref[0]**o+(0.10823172035)*x_ref[0]+(-0.150213295203)*x_ref[1]**o+(0.310471151961)*x_ref[1]
-        ref[2,1,1]=(-0.407033195691)*x_ref[0]**o+(0.716262964777)*x_ref[0]+(-0.262475432397)*x_ref[1]**o+(-0.234158898682)*x_ref[1]
-        ref[3,0,0]=(-0.109193787139)*x_ref[0]**o+(0.403892847875)*x_ref[0]+(0.794082322801)*x_ref[1]**o+(0.669070572253)*x_ref[1]
-        ref[3,0,1]=(0.969770217228)*x_ref[0]**o+(0.735280190411)*x_ref[0]+(-0.339891263613)*x_ref[1]**o+(0.859989056027)*x_ref[1]
-        ref[3,1,0]=(-0.906193851712)*x_ref[0]**o+(-0.330178132059)*x_ref[0]+(-0.48035114847)*x_ref[1]**o+(-0.48050067188)*x_ref[1]
-        ref[3,1,1]=(0.922778761752)*x_ref[0]**o+(0.899145572602)*x_ref[0]+(-0.991922151176)*x_ref[1]**o+(0.615744852656)*x_ref[1]
-        ref[4,0,0]=(0.457092295352)*x_ref[0]**o+(-0.120904430848)*x_ref[0]+(0.575186782188)*x_ref[1]**o+(-0.685522788659)*x_ref[1]
-        ref[4,0,1]=(0.254934861907)*x_ref[0]**o+(-0.208850206761)*x_ref[0]+(-0.0933987467304)*x_ref[1]**o+(0.687715419212)*x_ref[1]
-        ref[4,1,0]=(0.483890412252)*x_ref[0]**o+(-0.192055355216)*x_ref[0]+(0.0891595367214)*x_ref[1]**o+(-0.835900121805)*x_ref[1]
-        ref[4,1,1]=(-0.281109655935)*x_ref[0]**o+(0.279867178407)*x_ref[0]+(0.843094337157)*x_ref[1]**o+(-0.457583293166)*x_ref[1]
-        ref[5,0,0]=(0.595078633674)*x_ref[0]**o+(-0.994652086537)*x_ref[0]+(0.111354924733)*x_ref[1]**o+(0.715580298167)*x_ref[1]
-        ref[5,0,1]=(0.823409068766)*x_ref[0]**o+(0.41047089933)*x_ref[0]+(-0.610763277348)*x_ref[1]**o+(0.0991108428868)*x_ref[1]
-        ref[5,1,0]=(-0.0291539407811)*x_ref[0]**o+(0.371799932333)*x_ref[0]+(0.631702366805)*x_ref[1]**o+(-0.858415923309)*x_ref[1]
-        ref[5,1,1]=(-0.636146064991)*x_ref[0]**o+(0.407248062196)*x_ref[0]+(-0.507069143933)*x_ref[1]**o+(-0.0509951705166)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.662043178282)*x[0]**o+(0.600130780119)*x[0]+(-0.52233323628)*x[1]**o+(-0.463302513654)*x[1]+(0.714996279403)*x[2]**o+(0.113219137203)*x[2]
-        arg[0,0,1]=(0.94317347224)*x[0]**o+(0.987584533548)*x[0]+(0.116577593127)*x[1]**o+(-0.515267022711)*x[1]+(0.856578953903)*x[2]**o+(0.70372338917)*x[2]
-        arg[0,1,0]=(-0.405265998966)*x[0]**o+(-0.656404120416)*x[0]+(0.270655604701)*x[1]**o+(0.0638534875176)*x[1]+(0.816834973788)*x[2]**o+(0.918436000225)*x[2]
-        arg[0,1,1]=(-0.37299950332)*x[0]**o+(-0.0367737761004)*x[0]+(0.176531372245)*x[1]**o+(0.849773143988)*x[1]+(-0.572911529869)*x[2]**o+(-0.140163625628)*x[2]
-        arg[1,0,0]=(0.263616091516)*x[0]**o+(-0.65550051998)*x[0]+(-0.118310211881)*x[1]**o+(-0.695263983587)*x[1]+(-0.49011649182)*x[2]**o+(-0.553284002669)*x[2]
-        arg[1,0,1]=(0.859640205193)*x[0]**o+(-0.569681205214)*x[0]+(0.459979003108)*x[1]**o+(0.672561515814)*x[1]+(-0.854289983441)*x[2]**o+(-0.445344129294)*x[2]
-        arg[1,1,0]=(-0.904355809101)*x[0]**o+(0.540513356972)*x[0]+(-0.377422260181)*x[1]**o+(0.937285151058)*x[1]+(0.148943597435)*x[2]**o+(0.992256197076)*x[2]
-        arg[1,1,1]=(-0.868336238952)*x[0]**o+(-0.713337888363)*x[0]+(0.800427728006)*x[1]**o+(-0.83502690568)*x[1]+(0.365707922084)*x[2]**o+(0.218740577318)*x[2]
-        arg[2,0,0]=(-0.0382672594668)*x[0]**o+(0.463831755073)*x[0]+(-0.104957678792)*x[1]**o+(-0.561738607653)*x[1]+(-0.660128314406)*x[2]**o+(0.594649133189)*x[2]
-        arg[2,0,1]=(-0.399297921751)*x[0]**o+(0.550876554224)*x[0]+(0.150599666563)*x[1]**o+(-0.748400310268)*x[1]+(0.658318134651)*x[2]**o+(0.49075091442)*x[2]
-        arg[2,1,0]=(-0.393769876286)*x[0]**o+(0.328125610064)*x[0]+(-0.703385111404)*x[1]**o+(0.0418077854723)*x[1]+(0.918774663106)*x[2]**o+(-0.119085951508)*x[2]
-        arg[2,1,1]=(-0.549250924758)*x[0]**o+(0.169148558793)*x[0]+(0.664162931811)*x[1]**o+(0.207136816188)*x[1]+(-0.17207817969)*x[2]**o+(0.34258020774)*x[2]
-        arg[3,0,0]=(0.446467472517)*x[0]**o+(-0.358128380843)*x[0]+(0.146916048359)*x[1]**o+(-0.606692124285)*x[1]+(0.828655704727)*x[2]**o+(0.067139299396)*x[2]
-        arg[3,0,1]=(-0.357052242351)*x[0]**o+(-0.528255164843)*x[0]+(0.140204673142)*x[1]**o+(0.674282235672)*x[1]+(-0.469118454039)*x[2]**o+(0.388103121466)*x[2]
-        arg[3,1,0]=(-0.359629791333)*x[0]**o+(-0.625108929158)*x[0]+(0.855034791748)*x[1]**o+(-0.343451063341)*x[1]+(-0.681557972105)*x[2]**o+(0.576310870238)*x[2]
-        arg[3,1,1]=(0.00546530278132)*x[0]**o+(0.359221089344)*x[0]+(-0.57416247885)*x[1]**o+(-0.521306138323)*x[1]+(-0.618281954095)*x[2]**o+(-0.862162207352)*x[2]
-        arg[4,0,0]=(-0.196356423488)*x[0]**o+(-0.871482508533)*x[0]+(-0.367390886081)*x[1]**o+(0.580310108591)*x[1]+(0.857970671482)*x[2]**o+(0.123685673359)*x[2]
-        arg[4,0,1]=(0.715104674022)*x[0]**o+(-0.00444438628932)*x[0]+(0.538883210054)*x[1]**o+(0.179340705463)*x[1]+(-0.605249436909)*x[2]**o+(-0.744253826562)*x[2]
-        arg[4,1,0]=(-0.315453893647)*x[0]**o+(-0.560946546082)*x[0]+(-0.674448928458)*x[1]**o+(-0.510243444449)*x[1]+(0.592615876779)*x[2]**o+(0.218024801263)*x[2]
-        arg[4,1,1]=(-0.46902473326)*x[0]**o+(-0.573926691452)*x[0]+(0.827898114814)*x[1]**o+(-0.644208082857)*x[1]+(-0.956169254426)*x[2]**o+(-0.297101737561)*x[2]
-        arg[5,0,0]=(0.45818164662)*x[0]**o+(0.219667021464)*x[0]+(-0.453125753418)*x[1]**o+(-0.201214929832)*x[1]+(0.135363067088)*x[2]**o+(0.850636247323)*x[2]
-        arg[5,0,1]=(0.296120304926)*x[0]**o+(-0.139971296351)*x[0]+(0.448115780401)*x[1]**o+(-0.300602343399)*x[1]+(-0.165568753274)*x[2]**o+(0.984788641639)*x[2]
-        arg[5,1,0]=(0.321875942152)*x[0]**o+(-0.403122417353)*x[0]+(-0.148664639927)*x[1]**o+(0.644143662303)*x[1]+(-0.718311175542)*x[2]**o+(-0.850248996913)*x[2]
-        arg[5,1,1]=(0.44869757406)*x[0]**o+(0.0292094503086)*x[0]+(-0.159644215279)*x[1]**o+(0.695976060359)*x[1]+(-0.221444458713)*x[2]**o+(-0.42974111206)*x[2]
-        ref[0,0,0]=(-0.662043178282)*x_ref[0]**o+(0.600130780119)*x_ref[0]+(-0.52233323628)*x_ref[1]**o+(-0.463302513654)*x_ref[1]+(0.714996279403)*x_ref[2]**o+(0.113219137203)*x_ref[2]
-        ref[0,0,1]=(0.94317347224)*x_ref[0]**o+(0.987584533548)*x_ref[0]+(0.116577593127)*x_ref[1]**o+(-0.515267022711)*x_ref[1]+(0.856578953903)*x_ref[2]**o+(0.70372338917)*x_ref[2]
-        ref[0,1,0]=(-0.405265998966)*x_ref[0]**o+(-0.656404120416)*x_ref[0]+(0.270655604701)*x_ref[1]**o+(0.0638534875176)*x_ref[1]+(0.816834973788)*x_ref[2]**o+(0.918436000225)*x_ref[2]
-        ref[0,1,1]=(-0.37299950332)*x_ref[0]**o+(-0.0367737761004)*x_ref[0]+(0.176531372245)*x_ref[1]**o+(0.849773143988)*x_ref[1]+(-0.572911529869)*x_ref[2]**o+(-0.140163625628)*x_ref[2]
-        ref[1,0,0]=(0.263616091516)*x_ref[0]**o+(-0.65550051998)*x_ref[0]+(-0.118310211881)*x_ref[1]**o+(-0.695263983587)*x_ref[1]+(-0.49011649182)*x_ref[2]**o+(-0.553284002669)*x_ref[2]
-        ref[1,0,1]=(0.859640205193)*x_ref[0]**o+(-0.569681205214)*x_ref[0]+(0.459979003108)*x_ref[1]**o+(0.672561515814)*x_ref[1]+(-0.854289983441)*x_ref[2]**o+(-0.445344129294)*x_ref[2]
-        ref[1,1,0]=(-0.904355809101)*x_ref[0]**o+(0.540513356972)*x_ref[0]+(-0.377422260181)*x_ref[1]**o+(0.937285151058)*x_ref[1]+(0.148943597435)*x_ref[2]**o+(0.992256197076)*x_ref[2]
-        ref[1,1,1]=(-0.868336238952)*x_ref[0]**o+(-0.713337888363)*x_ref[0]+(0.800427728006)*x_ref[1]**o+(-0.83502690568)*x_ref[1]+(0.365707922084)*x_ref[2]**o+(0.218740577318)*x_ref[2]
-        ref[2,0,0]=(-0.0382672594668)*x_ref[0]**o+(0.463831755073)*x_ref[0]+(-0.104957678792)*x_ref[1]**o+(-0.561738607653)*x_ref[1]+(-0.660128314406)*x_ref[2]**o+(0.594649133189)*x_ref[2]
-        ref[2,0,1]=(-0.399297921751)*x_ref[0]**o+(0.550876554224)*x_ref[0]+(0.150599666563)*x_ref[1]**o+(-0.748400310268)*x_ref[1]+(0.658318134651)*x_ref[2]**o+(0.49075091442)*x_ref[2]
-        ref[2,1,0]=(-0.393769876286)*x_ref[0]**o+(0.328125610064)*x_ref[0]+(-0.703385111404)*x_ref[1]**o+(0.0418077854723)*x_ref[1]+(0.918774663106)*x_ref[2]**o+(-0.119085951508)*x_ref[2]
-        ref[2,1,1]=(-0.549250924758)*x_ref[0]**o+(0.169148558793)*x_ref[0]+(0.664162931811)*x_ref[1]**o+(0.207136816188)*x_ref[1]+(-0.17207817969)*x_ref[2]**o+(0.34258020774)*x_ref[2]
-        ref[3,0,0]=(0.446467472517)*x_ref[0]**o+(-0.358128380843)*x_ref[0]+(0.146916048359)*x_ref[1]**o+(-0.606692124285)*x_ref[1]+(0.828655704727)*x_ref[2]**o+(0.067139299396)*x_ref[2]
-        ref[3,0,1]=(-0.357052242351)*x_ref[0]**o+(-0.528255164843)*x_ref[0]+(0.140204673142)*x_ref[1]**o+(0.674282235672)*x_ref[1]+(-0.469118454039)*x_ref[2]**o+(0.388103121466)*x_ref[2]
-        ref[3,1,0]=(-0.359629791333)*x_ref[0]**o+(-0.625108929158)*x_ref[0]+(0.855034791748)*x_ref[1]**o+(-0.343451063341)*x_ref[1]+(-0.681557972105)*x_ref[2]**o+(0.576310870238)*x_ref[2]
-        ref[3,1,1]=(0.00546530278132)*x_ref[0]**o+(0.359221089344)*x_ref[0]+(-0.57416247885)*x_ref[1]**o+(-0.521306138323)*x_ref[1]+(-0.618281954095)*x_ref[2]**o+(-0.862162207352)*x_ref[2]
-        ref[4,0,0]=(-0.196356423488)*x_ref[0]**o+(-0.871482508533)*x_ref[0]+(-0.367390886081)*x_ref[1]**o+(0.580310108591)*x_ref[1]+(0.857970671482)*x_ref[2]**o+(0.123685673359)*x_ref[2]
-        ref[4,0,1]=(0.715104674022)*x_ref[0]**o+(-0.00444438628932)*x_ref[0]+(0.538883210054)*x_ref[1]**o+(0.179340705463)*x_ref[1]+(-0.605249436909)*x_ref[2]**o+(-0.744253826562)*x_ref[2]
-        ref[4,1,0]=(-0.315453893647)*x_ref[0]**o+(-0.560946546082)*x_ref[0]+(-0.674448928458)*x_ref[1]**o+(-0.510243444449)*x_ref[1]+(0.592615876779)*x_ref[2]**o+(0.218024801263)*x_ref[2]
-        ref[4,1,1]=(-0.46902473326)*x_ref[0]**o+(-0.573926691452)*x_ref[0]+(0.827898114814)*x_ref[1]**o+(-0.644208082857)*x_ref[1]+(-0.956169254426)*x_ref[2]**o+(-0.297101737561)*x_ref[2]
-        ref[5,0,0]=(0.45818164662)*x_ref[0]**o+(0.219667021464)*x_ref[0]+(-0.453125753418)*x_ref[1]**o+(-0.201214929832)*x_ref[1]+(0.135363067088)*x_ref[2]**o+(0.850636247323)*x_ref[2]
-        ref[5,0,1]=(0.296120304926)*x_ref[0]**o+(-0.139971296351)*x_ref[0]+(0.448115780401)*x_ref[1]**o+(-0.300602343399)*x_ref[1]+(-0.165568753274)*x_ref[2]**o+(0.984788641639)*x_ref[2]
-        ref[5,1,0]=(0.321875942152)*x_ref[0]**o+(-0.403122417353)*x_ref[0]+(-0.148664639927)*x_ref[1]**o+(0.644143662303)*x_ref[1]+(-0.718311175542)*x_ref[2]**o+(-0.850248996913)*x_ref[2]
-        ref[5,1,1]=(0.44869757406)*x_ref[0]**o+(0.0292094503086)*x_ref[0]+(-0.159644215279)*x_ref[1]**o+(0.695976060359)*x_ref[1]+(-0.221444458713)*x_ref[2]**o+(-0.42974111206)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunction
-
-      assumptions: self.domain supports inpterpolation from ReducedFunction onto ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.0737428272134)*x[0]**o+(0.841780036645)*x[0]+(-0.110824257531)*x[1]**o+(-0.957726444468)*x[1]
-        arg[0,0,0,1]=(-0.934840410671)*x[0]**o+(-0.83301064321)*x[0]+(-0.352287650266)*x[1]**o+(-0.961111564077)*x[1]
-        arg[0,0,1,0]=(-0.829500940226)*x[0]**o+(0.644171710931)*x[0]+(0.232545739722)*x[1]**o+(0.584336012862)*x[1]
-        arg[0,0,1,1]=(0.426298830976)*x[0]**o+(-0.615281197268)*x[0]+(0.206334026192)*x[1]**o+(-0.443698947044)*x[1]
-        arg[0,0,2,0]=(-0.236495891617)*x[0]**o+(0.0883376851179)*x[0]+(-0.176541434356)*x[1]**o+(0.297175301617)*x[1]
-        arg[0,0,2,1]=(-0.879955324373)*x[0]**o+(-0.244778913771)*x[0]+(0.244131188594)*x[1]**o+(-0.334739112198)*x[1]
-        arg[0,1,0,0]=(-0.64887128006)*x[0]**o+(-0.489951454377)*x[0]+(-0.328402433668)*x[1]**o+(0.229814237117)*x[1]
-        arg[0,1,0,1]=(-0.339451656097)*x[0]**o+(-0.409320682304)*x[0]+(0.216482338677)*x[1]**o+(-0.10594373055)*x[1]
-        arg[0,1,1,0]=(-0.350538479425)*x[0]**o+(0.466450046985)*x[0]+(-0.779124795292)*x[1]**o+(-0.654562596704)*x[1]
-        arg[0,1,1,1]=(0.00350092879868)*x[0]**o+(-0.214643088647)*x[0]+(0.786934081411)*x[1]**o+(-0.296853380043)*x[1]
-        arg[0,1,2,0]=(-0.640183955648)*x[0]**o+(0.568647968237)*x[0]+(0.575533476901)*x[1]**o+(0.854540594085)*x[1]
-        arg[0,1,2,1]=(0.633674899518)*x[0]**o+(0.829255679443)*x[0]+(0.537888424303)*x[1]**o+(-0.495082587617)*x[1]
-        arg[0,2,0,0]=(-0.700436798342)*x[0]**o+(-0.732581859026)*x[0]+(-0.508905353053)*x[1]**o+(0.664601151676)*x[1]
-        arg[0,2,0,1]=(0.720335764302)*x[0]**o+(0.941159917988)*x[0]+(0.2817440547)*x[1]**o+(0.553712160058)*x[1]
-        arg[0,2,1,0]=(-0.937114312262)*x[0]**o+(-0.115517396201)*x[0]+(-0.672697125905)*x[1]**o+(-0.221320095369)*x[1]
-        arg[0,2,1,1]=(-0.52059341062)*x[0]**o+(-0.653834647475)*x[0]+(-0.0851100861135)*x[1]**o+(-0.668300210067)*x[1]
-        arg[0,2,2,0]=(-0.943613035509)*x[0]**o+(-0.294843145822)*x[0]+(0.496278748831)*x[1]**o+(0.901154419425)*x[1]
-        arg[0,2,2,1]=(-0.421698818203)*x[0]**o+(-0.721918177544)*x[0]+(-0.197855702215)*x[1]**o+(0.50882827715)*x[1]
-        arg[0,3,0,0]=(0.931990780298)*x[0]**o+(-0.550332606951)*x[0]+(0.401584654642)*x[1]**o+(0.0965259747601)*x[1]
-        arg[0,3,0,1]=(0.881357708445)*x[0]**o+(0.564624034197)*x[0]+(-0.458191897924)*x[1]**o+(-0.427701112807)*x[1]
-        arg[0,3,1,0]=(0.624777088081)*x[0]**o+(0.862654721208)*x[0]+(-0.707618093268)*x[1]**o+(0.743304953313)*x[1]
-        arg[0,3,1,1]=(0.4510836974)*x[0]**o+(-0.357023031453)*x[0]+(-0.00503924010273)*x[1]**o+(0.545024336011)*x[1]
-        arg[0,3,2,0]=(0.109003851094)*x[0]**o+(0.168659376881)*x[0]+(-0.0578953780655)*x[1]**o+(-0.481212462712)*x[1]
-        arg[0,3,2,1]=(-0.191183501636)*x[0]**o+(-0.316145516377)*x[0]+(0.402460103016)*x[1]**o+(-0.163612464438)*x[1]
-        arg[0,4,0,0]=(0.489815345033)*x[0]**o+(0.999138280765)*x[0]+(-0.626627766812)*x[1]**o+(-0.339653992568)*x[1]
-        arg[0,4,0,1]=(0.616350228791)*x[0]**o+(0.933446438765)*x[0]+(0.944244035512)*x[1]**o+(0.829407789353)*x[1]
-        arg[0,4,1,0]=(0.619918547863)*x[0]**o+(0.995488719729)*x[0]+(-0.78847429581)*x[1]**o+(0.542645674462)*x[1]
-        arg[0,4,1,1]=(-0.149244819992)*x[0]**o+(0.921766299925)*x[0]+(0.435255339567)*x[1]**o+(-0.0596561300741)*x[1]
-        arg[0,4,2,0]=(-0.816364336598)*x[0]**o+(0.701160246658)*x[0]+(-0.616385505652)*x[1]**o+(-0.558625482105)*x[1]
-        arg[0,4,2,1]=(-0.36944364693)*x[0]**o+(0.243426977623)*x[0]+(-0.61578435391)*x[1]**o+(0.932570326139)*x[1]
-        arg[1,0,0,0]=(-0.36839962807)*x[0]**o+(0.590534439534)*x[0]+(-0.615158899289)*x[1]**o+(0.973649158296)*x[1]
-        arg[1,0,0,1]=(0.761515772771)*x[0]**o+(0.706406307012)*x[0]+(0.328712319043)*x[1]**o+(0.438600140517)*x[1]
-        arg[1,0,1,0]=(0.895080579207)*x[0]**o+(-0.166789328225)*x[0]+(0.807540897371)*x[1]**o+(0.0345522692723)*x[1]
-        arg[1,0,1,1]=(-0.460062661172)*x[0]**o+(0.505167337562)*x[0]+(0.25155527144)*x[1]**o+(0.601093887451)*x[1]
-        arg[1,0,2,0]=(0.382129818527)*x[0]**o+(0.694676536542)*x[0]+(0.702794119083)*x[1]**o+(0.704094013056)*x[1]
-        arg[1,0,2,1]=(0.265476982913)*x[0]**o+(-0.134338744881)*x[0]+(-0.0938910335356)*x[1]**o+(-0.560073316097)*x[1]
-        arg[1,1,0,0]=(0.977368328792)*x[0]**o+(0.084482890741)*x[0]+(0.57068389287)*x[1]**o+(-0.242087071526)*x[1]
-        arg[1,1,0,1]=(-0.36067775897)*x[0]**o+(0.768187470286)*x[0]+(-0.881150642619)*x[1]**o+(-0.15839498619)*x[1]
-        arg[1,1,1,0]=(-0.808263913645)*x[0]**o+(0.788403321664)*x[0]+(0.976206012343)*x[1]**o+(-0.636933353579)*x[1]
-        arg[1,1,1,1]=(0.699185445546)*x[0]**o+(0.251811206876)*x[0]+(-0.146320762812)*x[1]**o+(-0.248033048423)*x[1]
-        arg[1,1,2,0]=(-0.782940880812)*x[0]**o+(0.789401686528)*x[0]+(-0.806883904562)*x[1]**o+(0.83689696772)*x[1]
-        arg[1,1,2,1]=(0.652404993342)*x[0]**o+(-0.135318598212)*x[0]+(0.138928760301)*x[1]**o+(0.675593554805)*x[1]
-        arg[1,2,0,0]=(0.471746379585)*x[0]**o+(-0.989783415847)*x[0]+(-0.0935052296418)*x[1]**o+(-0.532245102898)*x[1]
-        arg[1,2,0,1]=(-0.44541059979)*x[0]**o+(0.593734266824)*x[0]+(-0.616647011751)*x[1]**o+(0.461140297024)*x[1]
-        arg[1,2,1,0]=(-0.9144210459)*x[0]**o+(0.116806032197)*x[0]+(0.935610395306)*x[1]**o+(0.550884822213)*x[1]
-        arg[1,2,1,1]=(-0.962444455944)*x[0]**o+(-0.654328013652)*x[0]+(-0.545330994236)*x[1]**o+(-0.919705456162)*x[1]
-        arg[1,2,2,0]=(-0.724491374462)*x[0]**o+(-0.820402375498)*x[0]+(-0.953956431336)*x[1]**o+(-0.201450523182)*x[1]
-        arg[1,2,2,1]=(0.723637497881)*x[0]**o+(-0.144483238523)*x[0]+(0.00379745988102)*x[1]**o+(-0.838616087543)*x[1]
-        arg[1,3,0,0]=(-0.962256046042)*x[0]**o+(-0.453580322779)*x[0]+(0.887446007424)*x[1]**o+(-0.404454768131)*x[1]
-        arg[1,3,0,1]=(0.829189872775)*x[0]**o+(0.327985850399)*x[0]+(0.113600094307)*x[1]**o+(-0.338775377551)*x[1]
-        arg[1,3,1,0]=(0.912320027833)*x[0]**o+(0.0658152563951)*x[0]+(-0.843491517568)*x[1]**o+(0.858344434434)*x[1]
-        arg[1,3,1,1]=(-0.133918678317)*x[0]**o+(0.644272729149)*x[0]+(0.140663927965)*x[1]**o+(0.853385355163)*x[1]
-        arg[1,3,2,0]=(0.37733357322)*x[0]**o+(0.255105934063)*x[0]+(0.88881892183)*x[1]**o+(-0.722661948279)*x[1]
-        arg[1,3,2,1]=(-0.2827466345)*x[0]**o+(-0.518815029512)*x[0]+(-0.995043824929)*x[1]**o+(0.973473354481)*x[1]
-        arg[1,4,0,0]=(0.044904732821)*x[0]**o+(-0.0373604593083)*x[0]+(0.184254626748)*x[1]**o+(0.031832590233)*x[1]
-        arg[1,4,0,1]=(0.388699053911)*x[0]**o+(-0.0619606394414)*x[0]+(0.477947819745)*x[1]**o+(0.982909216221)*x[1]
-        arg[1,4,1,0]=(0.854348679973)*x[0]**o+(-0.822052612379)*x[0]+(-0.950305089968)*x[1]**o+(0.0100277256384)*x[1]
-        arg[1,4,1,1]=(0.265075277179)*x[0]**o+(0.489846993407)*x[0]+(-0.961111499722)*x[1]**o+(-0.0457909055602)*x[1]
-        arg[1,4,2,0]=(0.701951191951)*x[0]**o+(0.675232620259)*x[0]+(-0.141848599227)*x[1]**o+(0.737150257564)*x[1]
-        arg[1,4,2,1]=(-0.450684564415)*x[0]**o+(0.854849922021)*x[0]+(0.729670746723)*x[1]**o+(0.530372628879)*x[1]
-        arg[2,0,0,0]=(-0.131153262675)*x[0]**o+(-0.477683407979)*x[0]+(0.231416752516)*x[1]**o+(0.790897064402)*x[1]
-        arg[2,0,0,1]=(0.0956557004382)*x[0]**o+(0.209084913471)*x[0]+(-0.328544695733)*x[1]**o+(0.701245770328)*x[1]
-        arg[2,0,1,0]=(-0.476403718361)*x[0]**o+(0.689023533158)*x[0]+(0.108732189071)*x[1]**o+(0.243379977453)*x[1]
-        arg[2,0,1,1]=(0.414917801157)*x[0]**o+(-0.843544596785)*x[0]+(0.772236792935)*x[1]**o+(0.836028831232)*x[1]
-        arg[2,0,2,0]=(0.754970600617)*x[0]**o+(-0.422318891122)*x[0]+(0.770767911534)*x[1]**o+(-0.446737894095)*x[1]
-        arg[2,0,2,1]=(0.0139989331471)*x[0]**o+(0.262286042291)*x[0]+(-0.440109329114)*x[1]**o+(-0.844965114722)*x[1]
-        arg[2,1,0,0]=(-0.758977153009)*x[0]**o+(-0.991192011039)*x[0]+(0.642267239475)*x[1]**o+(-0.701360491163)*x[1]
-        arg[2,1,0,1]=(-0.123019007509)*x[0]**o+(-0.622323252979)*x[0]+(0.441364031664)*x[1]**o+(0.311433222821)*x[1]
-        arg[2,1,1,0]=(-0.0446644182928)*x[0]**o+(0.614952704493)*x[0]+(-0.228284494629)*x[1]**o+(0.077603612991)*x[1]
-        arg[2,1,1,1]=(0.712924108225)*x[0]**o+(-0.153966300537)*x[0]+(-0.584450014127)*x[1]**o+(0.476329149833)*x[1]
-        arg[2,1,2,0]=(0.554026516037)*x[0]**o+(0.730575821847)*x[0]+(-0.247529915107)*x[1]**o+(0.210060454223)*x[1]
-        arg[2,1,2,1]=(0.877017208752)*x[0]**o+(-0.800916200997)*x[0]+(0.0996710064295)*x[1]**o+(-0.0890375735808)*x[1]
-        arg[2,2,0,0]=(-0.198026186062)*x[0]**o+(-0.416160224681)*x[0]+(-0.626491103997)*x[1]**o+(-0.950177752043)*x[1]
-        arg[2,2,0,1]=(-0.401319234479)*x[0]**o+(0.948120359627)*x[0]+(0.420351950404)*x[1]**o+(-0.242850312594)*x[1]
-        arg[2,2,1,0]=(-0.239652069063)*x[0]**o+(-0.894811076801)*x[0]+(0.979721413509)*x[1]**o+(-0.712493893566)*x[1]
-        arg[2,2,1,1]=(0.239416494209)*x[0]**o+(0.449047649538)*x[0]+(0.0503751073583)*x[1]**o+(0.739949331521)*x[1]
-        arg[2,2,2,0]=(-0.318067701034)*x[0]**o+(-0.00208209268356)*x[0]+(-0.513821624843)*x[1]**o+(-0.202688815501)*x[1]
-        arg[2,2,2,1]=(-0.194111524544)*x[0]**o+(-0.843213241929)*x[0]+(0.124223747087)*x[1]**o+(-0.988305059412)*x[1]
-        arg[2,3,0,0]=(0.450894655873)*x[0]**o+(-0.809351657482)*x[0]+(-0.80555128185)*x[1]**o+(-0.922123806508)*x[1]
-        arg[2,3,0,1]=(-0.462822602909)*x[0]**o+(0.504388766027)*x[0]+(-0.152725064915)*x[1]**o+(0.988745142638)*x[1]
-        arg[2,3,1,0]=(-0.717873944493)*x[0]**o+(0.987011714613)*x[0]+(0.908500737929)*x[1]**o+(0.612497707425)*x[1]
-        arg[2,3,1,1]=(0.221645363399)*x[0]**o+(0.219147687681)*x[0]+(-0.195831118343)*x[1]**o+(-0.59541920919)*x[1]
-        arg[2,3,2,0]=(-0.289487342206)*x[0]**o+(-0.96904981397)*x[0]+(-0.844880792969)*x[1]**o+(0.803145388038)*x[1]
-        arg[2,3,2,1]=(-0.0234295826132)*x[0]**o+(-0.839069887016)*x[0]+(0.591231341444)*x[1]**o+(-0.678605318787)*x[1]
-        arg[2,4,0,0]=(0.717943320641)*x[0]**o+(0.625728011485)*x[0]+(0.456836257053)*x[1]**o+(-0.00523685585287)*x[1]
-        arg[2,4,0,1]=(-0.549526374185)*x[0]**o+(0.57441917876)*x[0]+(-0.913459106781)*x[1]**o+(-0.610369375195)*x[1]
-        arg[2,4,1,0]=(-0.27166563459)*x[0]**o+(0.146710581194)*x[0]+(0.297934124718)*x[1]**o+(0.989561209048)*x[1]
-        arg[2,4,1,1]=(-0.0973858709778)*x[0]**o+(-0.909133394381)*x[0]+(0.634182571287)*x[1]**o+(0.477163052831)*x[1]
-        arg[2,4,2,0]=(0.0878998038301)*x[0]**o+(-0.90568487021)*x[0]+(0.798978355456)*x[1]**o+(0.977402478037)*x[1]
-        arg[2,4,2,1]=(-0.456868538667)*x[0]**o+(0.0723272702119)*x[0]+(0.143461337462)*x[1]**o+(-0.923713568343)*x[1]
-        arg[3,0,0,0]=(-0.154410689788)*x[0]**o+(0.634925838303)*x[0]+(-0.0508765762892)*x[1]**o+(-0.889731180834)*x[1]
-        arg[3,0,0,1]=(-0.611336323518)*x[0]**o+(0.748058372943)*x[0]+(-0.395060568704)*x[1]**o+(-0.413772262434)*x[1]
-        arg[3,0,1,0]=(-0.76924573047)*x[0]**o+(0.61286303551)*x[0]+(0.810883211884)*x[1]**o+(-0.908861022244)*x[1]
-        arg[3,0,1,1]=(0.269999661235)*x[0]**o+(0.0330954575695)*x[0]+(0.560272546054)*x[1]**o+(0.877730763728)*x[1]
-        arg[3,0,2,0]=(-0.617658215856)*x[0]**o+(0.758414649277)*x[0]+(-0.223497113863)*x[1]**o+(-0.0706589108357)*x[1]
-        arg[3,0,2,1]=(0.47956571804)*x[0]**o+(0.938375191345)*x[0]+(-0.193997511219)*x[1]**o+(0.500063249143)*x[1]
-        arg[3,1,0,0]=(0.994033773649)*x[0]**o+(0.203022945646)*x[0]+(0.439296640709)*x[1]**o+(0.283679657893)*x[1]
-        arg[3,1,0,1]=(0.32495149734)*x[0]**o+(-0.871627347694)*x[0]+(-0.438159387872)*x[1]**o+(0.169112665588)*x[1]
-        arg[3,1,1,0]=(-0.0979322945554)*x[0]**o+(-0.936928842822)*x[0]+(0.0402738011011)*x[1]**o+(-0.445031618539)*x[1]
-        arg[3,1,1,1]=(-0.511218949907)*x[0]**o+(0.255146779315)*x[0]+(-0.802012163396)*x[1]**o+(0.361819705056)*x[1]
-        arg[3,1,2,0]=(-0.902499203011)*x[0]**o+(0.76589952141)*x[0]+(0.52498929732)*x[1]**o+(0.493894292321)*x[1]
-        arg[3,1,2,1]=(-0.475117609018)*x[0]**o+(0.682205309303)*x[0]+(-0.661824086649)*x[1]**o+(0.985521553774)*x[1]
-        arg[3,2,0,0]=(0.937321686473)*x[0]**o+(-0.518305775925)*x[0]+(0.171689574942)*x[1]**o+(-0.751579960819)*x[1]
-        arg[3,2,0,1]=(-0.607004597985)*x[0]**o+(0.342330208344)*x[0]+(0.692094243326)*x[1]**o+(-0.457756057357)*x[1]
-        arg[3,2,1,0]=(0.126171621354)*x[0]**o+(0.0499938423847)*x[0]+(0.572006209576)*x[1]**o+(0.121601182464)*x[1]
-        arg[3,2,1,1]=(0.337936456181)*x[0]**o+(-0.940186907514)*x[0]+(-0.965354931124)*x[1]**o+(-0.0503295532873)*x[1]
-        arg[3,2,2,0]=(0.439590816231)*x[0]**o+(-0.145314466072)*x[0]+(-0.847175364201)*x[1]**o+(-0.570000251495)*x[1]
-        arg[3,2,2,1]=(0.401069335123)*x[0]**o+(-0.117139167508)*x[0]+(0.192907527853)*x[1]**o+(0.573283391581)*x[1]
-        arg[3,3,0,0]=(-0.434029411666)*x[0]**o+(-0.689115317009)*x[0]+(0.63450218888)*x[1]**o+(0.492858023519)*x[1]
-        arg[3,3,0,1]=(-0.678722283369)*x[0]**o+(-0.62031826393)*x[0]+(-0.458646022327)*x[1]**o+(-0.650857410927)*x[1]
-        arg[3,3,1,0]=(0.413477874719)*x[0]**o+(-0.903116096879)*x[0]+(-0.505961511722)*x[1]**o+(0.649554735459)*x[1]
-        arg[3,3,1,1]=(-0.58459645458)*x[0]**o+(0.861318565628)*x[0]+(0.378511063123)*x[1]**o+(-0.694820011654)*x[1]
-        arg[3,3,2,0]=(0.82844733258)*x[0]**o+(-0.151929131446)*x[0]+(0.322848411081)*x[1]**o+(0.436062233263)*x[1]
-        arg[3,3,2,1]=(0.269627291792)*x[0]**o+(0.618140998132)*x[0]+(0.851057431407)*x[1]**o+(0.716088832502)*x[1]
-        arg[3,4,0,0]=(0.0557605432613)*x[0]**o+(0.0689569775656)*x[0]+(0.489781121774)*x[1]**o+(0.214459998733)*x[1]
-        arg[3,4,0,1]=(0.429111134289)*x[0]**o+(0.648324951051)*x[0]+(0.00596799425797)*x[1]**o+(-0.752637714965)*x[1]
-        arg[3,4,1,0]=(-0.0394648097179)*x[0]**o+(0.842965554058)*x[0]+(-0.124493160479)*x[1]**o+(0.81914053244)*x[1]
-        arg[3,4,1,1]=(0.309465325874)*x[0]**o+(0.631381272937)*x[0]+(-0.164415508845)*x[1]**o+(0.316908911599)*x[1]
-        arg[3,4,2,0]=(-0.615108314792)*x[0]**o+(0.300936829452)*x[0]+(-0.289514252333)*x[1]**o+(0.844949030767)*x[1]
-        arg[3,4,2,1]=(0.80117516909)*x[0]**o+(-0.602632221639)*x[0]+(-0.68193581457)*x[1]**o+(0.203319693067)*x[1]
-        ref[0,0,0,0]=(0.0737428272134)*x_ref[0]**o+(0.841780036645)*x_ref[0]+(-0.110824257531)*x_ref[1]**o+(-0.957726444468)*x_ref[1]
-        ref[0,0,0,1]=(-0.934840410671)*x_ref[0]**o+(-0.83301064321)*x_ref[0]+(-0.352287650266)*x_ref[1]**o+(-0.961111564077)*x_ref[1]
-        ref[0,0,1,0]=(-0.829500940226)*x_ref[0]**o+(0.644171710931)*x_ref[0]+(0.232545739722)*x_ref[1]**o+(0.584336012862)*x_ref[1]
-        ref[0,0,1,1]=(0.426298830976)*x_ref[0]**o+(-0.615281197268)*x_ref[0]+(0.206334026192)*x_ref[1]**o+(-0.443698947044)*x_ref[1]
-        ref[0,0,2,0]=(-0.236495891617)*x_ref[0]**o+(0.0883376851179)*x_ref[0]+(-0.176541434356)*x_ref[1]**o+(0.297175301617)*x_ref[1]
-        ref[0,0,2,1]=(-0.879955324373)*x_ref[0]**o+(-0.244778913771)*x_ref[0]+(0.244131188594)*x_ref[1]**o+(-0.334739112198)*x_ref[1]
-        ref[0,1,0,0]=(-0.64887128006)*x_ref[0]**o+(-0.489951454377)*x_ref[0]+(-0.328402433668)*x_ref[1]**o+(0.229814237117)*x_ref[1]
-        ref[0,1,0,1]=(-0.339451656097)*x_ref[0]**o+(-0.409320682304)*x_ref[0]+(0.216482338677)*x_ref[1]**o+(-0.10594373055)*x_ref[1]
-        ref[0,1,1,0]=(-0.350538479425)*x_ref[0]**o+(0.466450046985)*x_ref[0]+(-0.779124795292)*x_ref[1]**o+(-0.654562596704)*x_ref[1]
-        ref[0,1,1,1]=(0.00350092879868)*x_ref[0]**o+(-0.214643088647)*x_ref[0]+(0.786934081411)*x_ref[1]**o+(-0.296853380043)*x_ref[1]
-        ref[0,1,2,0]=(-0.640183955648)*x_ref[0]**o+(0.568647968237)*x_ref[0]+(0.575533476901)*x_ref[1]**o+(0.854540594085)*x_ref[1]
-        ref[0,1,2,1]=(0.633674899518)*x_ref[0]**o+(0.829255679443)*x_ref[0]+(0.537888424303)*x_ref[1]**o+(-0.495082587617)*x_ref[1]
-        ref[0,2,0,0]=(-0.700436798342)*x_ref[0]**o+(-0.732581859026)*x_ref[0]+(-0.508905353053)*x_ref[1]**o+(0.664601151676)*x_ref[1]
-        ref[0,2,0,1]=(0.720335764302)*x_ref[0]**o+(0.941159917988)*x_ref[0]+(0.2817440547)*x_ref[1]**o+(0.553712160058)*x_ref[1]
-        ref[0,2,1,0]=(-0.937114312262)*x_ref[0]**o+(-0.115517396201)*x_ref[0]+(-0.672697125905)*x_ref[1]**o+(-0.221320095369)*x_ref[1]
-        ref[0,2,1,1]=(-0.52059341062)*x_ref[0]**o+(-0.653834647475)*x_ref[0]+(-0.0851100861135)*x_ref[1]**o+(-0.668300210067)*x_ref[1]
-        ref[0,2,2,0]=(-0.943613035509)*x_ref[0]**o+(-0.294843145822)*x_ref[0]+(0.496278748831)*x_ref[1]**o+(0.901154419425)*x_ref[1]
-        ref[0,2,2,1]=(-0.421698818203)*x_ref[0]**o+(-0.721918177544)*x_ref[0]+(-0.197855702215)*x_ref[1]**o+(0.50882827715)*x_ref[1]
-        ref[0,3,0,0]=(0.931990780298)*x_ref[0]**o+(-0.550332606951)*x_ref[0]+(0.401584654642)*x_ref[1]**o+(0.0965259747601)*x_ref[1]
-        ref[0,3,0,1]=(0.881357708445)*x_ref[0]**o+(0.564624034197)*x_ref[0]+(-0.458191897924)*x_ref[1]**o+(-0.427701112807)*x_ref[1]
-        ref[0,3,1,0]=(0.624777088081)*x_ref[0]**o+(0.862654721208)*x_ref[0]+(-0.707618093268)*x_ref[1]**o+(0.743304953313)*x_ref[1]
-        ref[0,3,1,1]=(0.4510836974)*x_ref[0]**o+(-0.357023031453)*x_ref[0]+(-0.00503924010273)*x_ref[1]**o+(0.545024336011)*x_ref[1]
-        ref[0,3,2,0]=(0.109003851094)*x_ref[0]**o+(0.168659376881)*x_ref[0]+(-0.0578953780655)*x_ref[1]**o+(-0.481212462712)*x_ref[1]
-        ref[0,3,2,1]=(-0.191183501636)*x_ref[0]**o+(-0.316145516377)*x_ref[0]+(0.402460103016)*x_ref[1]**o+(-0.163612464438)*x_ref[1]
-        ref[0,4,0,0]=(0.489815345033)*x_ref[0]**o+(0.999138280765)*x_ref[0]+(-0.626627766812)*x_ref[1]**o+(-0.339653992568)*x_ref[1]
-        ref[0,4,0,1]=(0.616350228791)*x_ref[0]**o+(0.933446438765)*x_ref[0]+(0.944244035512)*x_ref[1]**o+(0.829407789353)*x_ref[1]
-        ref[0,4,1,0]=(0.619918547863)*x_ref[0]**o+(0.995488719729)*x_ref[0]+(-0.78847429581)*x_ref[1]**o+(0.542645674462)*x_ref[1]
-        ref[0,4,1,1]=(-0.149244819992)*x_ref[0]**o+(0.921766299925)*x_ref[0]+(0.435255339567)*x_ref[1]**o+(-0.0596561300741)*x_ref[1]
-        ref[0,4,2,0]=(-0.816364336598)*x_ref[0]**o+(0.701160246658)*x_ref[0]+(-0.616385505652)*x_ref[1]**o+(-0.558625482105)*x_ref[1]
-        ref[0,4,2,1]=(-0.36944364693)*x_ref[0]**o+(0.243426977623)*x_ref[0]+(-0.61578435391)*x_ref[1]**o+(0.932570326139)*x_ref[1]
-        ref[1,0,0,0]=(-0.36839962807)*x_ref[0]**o+(0.590534439534)*x_ref[0]+(-0.615158899289)*x_ref[1]**o+(0.973649158296)*x_ref[1]
-        ref[1,0,0,1]=(0.761515772771)*x_ref[0]**o+(0.706406307012)*x_ref[0]+(0.328712319043)*x_ref[1]**o+(0.438600140517)*x_ref[1]
-        ref[1,0,1,0]=(0.895080579207)*x_ref[0]**o+(-0.166789328225)*x_ref[0]+(0.807540897371)*x_ref[1]**o+(0.0345522692723)*x_ref[1]
-        ref[1,0,1,1]=(-0.460062661172)*x_ref[0]**o+(0.505167337562)*x_ref[0]+(0.25155527144)*x_ref[1]**o+(0.601093887451)*x_ref[1]
-        ref[1,0,2,0]=(0.382129818527)*x_ref[0]**o+(0.694676536542)*x_ref[0]+(0.702794119083)*x_ref[1]**o+(0.704094013056)*x_ref[1]
-        ref[1,0,2,1]=(0.265476982913)*x_ref[0]**o+(-0.134338744881)*x_ref[0]+(-0.0938910335356)*x_ref[1]**o+(-0.560073316097)*x_ref[1]
-        ref[1,1,0,0]=(0.977368328792)*x_ref[0]**o+(0.084482890741)*x_ref[0]+(0.57068389287)*x_ref[1]**o+(-0.242087071526)*x_ref[1]
-        ref[1,1,0,1]=(-0.36067775897)*x_ref[0]**o+(0.768187470286)*x_ref[0]+(-0.881150642619)*x_ref[1]**o+(-0.15839498619)*x_ref[1]
-        ref[1,1,1,0]=(-0.808263913645)*x_ref[0]**o+(0.788403321664)*x_ref[0]+(0.976206012343)*x_ref[1]**o+(-0.636933353579)*x_ref[1]
-        ref[1,1,1,1]=(0.699185445546)*x_ref[0]**o+(0.251811206876)*x_ref[0]+(-0.146320762812)*x_ref[1]**o+(-0.248033048423)*x_ref[1]
-        ref[1,1,2,0]=(-0.782940880812)*x_ref[0]**o+(0.789401686528)*x_ref[0]+(-0.806883904562)*x_ref[1]**o+(0.83689696772)*x_ref[1]
-        ref[1,1,2,1]=(0.652404993342)*x_ref[0]**o+(-0.135318598212)*x_ref[0]+(0.138928760301)*x_ref[1]**o+(0.675593554805)*x_ref[1]
-        ref[1,2,0,0]=(0.471746379585)*x_ref[0]**o+(-0.989783415847)*x_ref[0]+(-0.0935052296418)*x_ref[1]**o+(-0.532245102898)*x_ref[1]
-        ref[1,2,0,1]=(-0.44541059979)*x_ref[0]**o+(0.593734266824)*x_ref[0]+(-0.616647011751)*x_ref[1]**o+(0.461140297024)*x_ref[1]
-        ref[1,2,1,0]=(-0.9144210459)*x_ref[0]**o+(0.116806032197)*x_ref[0]+(0.935610395306)*x_ref[1]**o+(0.550884822213)*x_ref[1]
-        ref[1,2,1,1]=(-0.962444455944)*x_ref[0]**o+(-0.654328013652)*x_ref[0]+(-0.545330994236)*x_ref[1]**o+(-0.919705456162)*x_ref[1]
-        ref[1,2,2,0]=(-0.724491374462)*x_ref[0]**o+(-0.820402375498)*x_ref[0]+(-0.953956431336)*x_ref[1]**o+(-0.201450523182)*x_ref[1]
-        ref[1,2,2,1]=(0.723637497881)*x_ref[0]**o+(-0.144483238523)*x_ref[0]+(0.00379745988102)*x_ref[1]**o+(-0.838616087543)*x_ref[1]
-        ref[1,3,0,0]=(-0.962256046042)*x_ref[0]**o+(-0.453580322779)*x_ref[0]+(0.887446007424)*x_ref[1]**o+(-0.404454768131)*x_ref[1]
-        ref[1,3,0,1]=(0.829189872775)*x_ref[0]**o+(0.327985850399)*x_ref[0]+(0.113600094307)*x_ref[1]**o+(-0.338775377551)*x_ref[1]
-        ref[1,3,1,0]=(0.912320027833)*x_ref[0]**o+(0.0658152563951)*x_ref[0]+(-0.843491517568)*x_ref[1]**o+(0.858344434434)*x_ref[1]
-        ref[1,3,1,1]=(-0.133918678317)*x_ref[0]**o+(0.644272729149)*x_ref[0]+(0.140663927965)*x_ref[1]**o+(0.853385355163)*x_ref[1]
-        ref[1,3,2,0]=(0.37733357322)*x_ref[0]**o+(0.255105934063)*x_ref[0]+(0.88881892183)*x_ref[1]**o+(-0.722661948279)*x_ref[1]
-        ref[1,3,2,1]=(-0.2827466345)*x_ref[0]**o+(-0.518815029512)*x_ref[0]+(-0.995043824929)*x_ref[1]**o+(0.973473354481)*x_ref[1]
-        ref[1,4,0,0]=(0.044904732821)*x_ref[0]**o+(-0.0373604593083)*x_ref[0]+(0.184254626748)*x_ref[1]**o+(0.031832590233)*x_ref[1]
-        ref[1,4,0,1]=(0.388699053911)*x_ref[0]**o+(-0.0619606394414)*x_ref[0]+(0.477947819745)*x_ref[1]**o+(0.982909216221)*x_ref[1]
-        ref[1,4,1,0]=(0.854348679973)*x_ref[0]**o+(-0.822052612379)*x_ref[0]+(-0.950305089968)*x_ref[1]**o+(0.0100277256384)*x_ref[1]
-        ref[1,4,1,1]=(0.265075277179)*x_ref[0]**o+(0.489846993407)*x_ref[0]+(-0.961111499722)*x_ref[1]**o+(-0.0457909055602)*x_ref[1]
-        ref[1,4,2,0]=(0.701951191951)*x_ref[0]**o+(0.675232620259)*x_ref[0]+(-0.141848599227)*x_ref[1]**o+(0.737150257564)*x_ref[1]
-        ref[1,4,2,1]=(-0.450684564415)*x_ref[0]**o+(0.854849922021)*x_ref[0]+(0.729670746723)*x_ref[1]**o+(0.530372628879)*x_ref[1]
-        ref[2,0,0,0]=(-0.131153262675)*x_ref[0]**o+(-0.477683407979)*x_ref[0]+(0.231416752516)*x_ref[1]**o+(0.790897064402)*x_ref[1]
-        ref[2,0,0,1]=(0.0956557004382)*x_ref[0]**o+(0.209084913471)*x_ref[0]+(-0.328544695733)*x_ref[1]**o+(0.701245770328)*x_ref[1]
-        ref[2,0,1,0]=(-0.476403718361)*x_ref[0]**o+(0.689023533158)*x_ref[0]+(0.108732189071)*x_ref[1]**o+(0.243379977453)*x_ref[1]
-        ref[2,0,1,1]=(0.414917801157)*x_ref[0]**o+(-0.843544596785)*x_ref[0]+(0.772236792935)*x_ref[1]**o+(0.836028831232)*x_ref[1]
-        ref[2,0,2,0]=(0.754970600617)*x_ref[0]**o+(-0.422318891122)*x_ref[0]+(0.770767911534)*x_ref[1]**o+(-0.446737894095)*x_ref[1]
-        ref[2,0,2,1]=(0.0139989331471)*x_ref[0]**o+(0.262286042291)*x_ref[0]+(-0.440109329114)*x_ref[1]**o+(-0.844965114722)*x_ref[1]
-        ref[2,1,0,0]=(-0.758977153009)*x_ref[0]**o+(-0.991192011039)*x_ref[0]+(0.642267239475)*x_ref[1]**o+(-0.701360491163)*x_ref[1]
-        ref[2,1,0,1]=(-0.123019007509)*x_ref[0]**o+(-0.622323252979)*x_ref[0]+(0.441364031664)*x_ref[1]**o+(0.311433222821)*x_ref[1]
-        ref[2,1,1,0]=(-0.0446644182928)*x_ref[0]**o+(0.614952704493)*x_ref[0]+(-0.228284494629)*x_ref[1]**o+(0.077603612991)*x_ref[1]
-        ref[2,1,1,1]=(0.712924108225)*x_ref[0]**o+(-0.153966300537)*x_ref[0]+(-0.584450014127)*x_ref[1]**o+(0.476329149833)*x_ref[1]
-        ref[2,1,2,0]=(0.554026516037)*x_ref[0]**o+(0.730575821847)*x_ref[0]+(-0.247529915107)*x_ref[1]**o+(0.210060454223)*x_ref[1]
-        ref[2,1,2,1]=(0.877017208752)*x_ref[0]**o+(-0.800916200997)*x_ref[0]+(0.0996710064295)*x_ref[1]**o+(-0.0890375735808)*x_ref[1]
-        ref[2,2,0,0]=(-0.198026186062)*x_ref[0]**o+(-0.416160224681)*x_ref[0]+(-0.626491103997)*x_ref[1]**o+(-0.950177752043)*x_ref[1]
-        ref[2,2,0,1]=(-0.401319234479)*x_ref[0]**o+(0.948120359627)*x_ref[0]+(0.420351950404)*x_ref[1]**o+(-0.242850312594)*x_ref[1]
-        ref[2,2,1,0]=(-0.239652069063)*x_ref[0]**o+(-0.894811076801)*x_ref[0]+(0.979721413509)*x_ref[1]**o+(-0.712493893566)*x_ref[1]
-        ref[2,2,1,1]=(0.239416494209)*x_ref[0]**o+(0.449047649538)*x_ref[0]+(0.0503751073583)*x_ref[1]**o+(0.739949331521)*x_ref[1]
-        ref[2,2,2,0]=(-0.318067701034)*x_ref[0]**o+(-0.00208209268356)*x_ref[0]+(-0.513821624843)*x_ref[1]**o+(-0.202688815501)*x_ref[1]
-        ref[2,2,2,1]=(-0.194111524544)*x_ref[0]**o+(-0.843213241929)*x_ref[0]+(0.124223747087)*x_ref[1]**o+(-0.988305059412)*x_ref[1]
-        ref[2,3,0,0]=(0.450894655873)*x_ref[0]**o+(-0.809351657482)*x_ref[0]+(-0.80555128185)*x_ref[1]**o+(-0.922123806508)*x_ref[1]
-        ref[2,3,0,1]=(-0.462822602909)*x_ref[0]**o+(0.504388766027)*x_ref[0]+(-0.152725064915)*x_ref[1]**o+(0.988745142638)*x_ref[1]
-        ref[2,3,1,0]=(-0.717873944493)*x_ref[0]**o+(0.987011714613)*x_ref[0]+(0.908500737929)*x_ref[1]**o+(0.612497707425)*x_ref[1]
-        ref[2,3,1,1]=(0.221645363399)*x_ref[0]**o+(0.219147687681)*x_ref[0]+(-0.195831118343)*x_ref[1]**o+(-0.59541920919)*x_ref[1]
-        ref[2,3,2,0]=(-0.289487342206)*x_ref[0]**o+(-0.96904981397)*x_ref[0]+(-0.844880792969)*x_ref[1]**o+(0.803145388038)*x_ref[1]
-        ref[2,3,2,1]=(-0.0234295826132)*x_ref[0]**o+(-0.839069887016)*x_ref[0]+(0.591231341444)*x_ref[1]**o+(-0.678605318787)*x_ref[1]
-        ref[2,4,0,0]=(0.717943320641)*x_ref[0]**o+(0.625728011485)*x_ref[0]+(0.456836257053)*x_ref[1]**o+(-0.00523685585287)*x_ref[1]
-        ref[2,4,0,1]=(-0.549526374185)*x_ref[0]**o+(0.57441917876)*x_ref[0]+(-0.913459106781)*x_ref[1]**o+(-0.610369375195)*x_ref[1]
-        ref[2,4,1,0]=(-0.27166563459)*x_ref[0]**o+(0.146710581194)*x_ref[0]+(0.297934124718)*x_ref[1]**o+(0.989561209048)*x_ref[1]
-        ref[2,4,1,1]=(-0.0973858709778)*x_ref[0]**o+(-0.909133394381)*x_ref[0]+(0.634182571287)*x_ref[1]**o+(0.477163052831)*x_ref[1]
-        ref[2,4,2,0]=(0.0878998038301)*x_ref[0]**o+(-0.90568487021)*x_ref[0]+(0.798978355456)*x_ref[1]**o+(0.977402478037)*x_ref[1]
-        ref[2,4,2,1]=(-0.456868538667)*x_ref[0]**o+(0.0723272702119)*x_ref[0]+(0.143461337462)*x_ref[1]**o+(-0.923713568343)*x_ref[1]
-        ref[3,0,0,0]=(-0.154410689788)*x_ref[0]**o+(0.634925838303)*x_ref[0]+(-0.0508765762892)*x_ref[1]**o+(-0.889731180834)*x_ref[1]
-        ref[3,0,0,1]=(-0.611336323518)*x_ref[0]**o+(0.748058372943)*x_ref[0]+(-0.395060568704)*x_ref[1]**o+(-0.413772262434)*x_ref[1]
-        ref[3,0,1,0]=(-0.76924573047)*x_ref[0]**o+(0.61286303551)*x_ref[0]+(0.810883211884)*x_ref[1]**o+(-0.908861022244)*x_ref[1]
-        ref[3,0,1,1]=(0.269999661235)*x_ref[0]**o+(0.0330954575695)*x_ref[0]+(0.560272546054)*x_ref[1]**o+(0.877730763728)*x_ref[1]
-        ref[3,0,2,0]=(-0.617658215856)*x_ref[0]**o+(0.758414649277)*x_ref[0]+(-0.223497113863)*x_ref[1]**o+(-0.0706589108357)*x_ref[1]
-        ref[3,0,2,1]=(0.47956571804)*x_ref[0]**o+(0.938375191345)*x_ref[0]+(-0.193997511219)*x_ref[1]**o+(0.500063249143)*x_ref[1]
-        ref[3,1,0,0]=(0.994033773649)*x_ref[0]**o+(0.203022945646)*x_ref[0]+(0.439296640709)*x_ref[1]**o+(0.283679657893)*x_ref[1]
-        ref[3,1,0,1]=(0.32495149734)*x_ref[0]**o+(-0.871627347694)*x_ref[0]+(-0.438159387872)*x_ref[1]**o+(0.169112665588)*x_ref[1]
-        ref[3,1,1,0]=(-0.0979322945554)*x_ref[0]**o+(-0.936928842822)*x_ref[0]+(0.0402738011011)*x_ref[1]**o+(-0.445031618539)*x_ref[1]
-        ref[3,1,1,1]=(-0.511218949907)*x_ref[0]**o+(0.255146779315)*x_ref[0]+(-0.802012163396)*x_ref[1]**o+(0.361819705056)*x_ref[1]
-        ref[3,1,2,0]=(-0.902499203011)*x_ref[0]**o+(0.76589952141)*x_ref[0]+(0.52498929732)*x_ref[1]**o+(0.493894292321)*x_ref[1]
-        ref[3,1,2,1]=(-0.475117609018)*x_ref[0]**o+(0.682205309303)*x_ref[0]+(-0.661824086649)*x_ref[1]**o+(0.985521553774)*x_ref[1]
-        ref[3,2,0,0]=(0.937321686473)*x_ref[0]**o+(-0.518305775925)*x_ref[0]+(0.171689574942)*x_ref[1]**o+(-0.751579960819)*x_ref[1]
-        ref[3,2,0,1]=(-0.607004597985)*x_ref[0]**o+(0.342330208344)*x_ref[0]+(0.692094243326)*x_ref[1]**o+(-0.457756057357)*x_ref[1]
-        ref[3,2,1,0]=(0.126171621354)*x_ref[0]**o+(0.0499938423847)*x_ref[0]+(0.572006209576)*x_ref[1]**o+(0.121601182464)*x_ref[1]
-        ref[3,2,1,1]=(0.337936456181)*x_ref[0]**o+(-0.940186907514)*x_ref[0]+(-0.965354931124)*x_ref[1]**o+(-0.0503295532873)*x_ref[1]
-        ref[3,2,2,0]=(0.439590816231)*x_ref[0]**o+(-0.145314466072)*x_ref[0]+(-0.847175364201)*x_ref[1]**o+(-0.570000251495)*x_ref[1]
-        ref[3,2,2,1]=(0.401069335123)*x_ref[0]**o+(-0.117139167508)*x_ref[0]+(0.192907527853)*x_ref[1]**o+(0.573283391581)*x_ref[1]
-        ref[3,3,0,0]=(-0.434029411666)*x_ref[0]**o+(-0.689115317009)*x_ref[0]+(0.63450218888)*x_ref[1]**o+(0.492858023519)*x_ref[1]
-        ref[3,3,0,1]=(-0.678722283369)*x_ref[0]**o+(-0.62031826393)*x_ref[0]+(-0.458646022327)*x_ref[1]**o+(-0.650857410927)*x_ref[1]
-        ref[3,3,1,0]=(0.413477874719)*x_ref[0]**o+(-0.903116096879)*x_ref[0]+(-0.505961511722)*x_ref[1]**o+(0.649554735459)*x_ref[1]
-        ref[3,3,1,1]=(-0.58459645458)*x_ref[0]**o+(0.861318565628)*x_ref[0]+(0.378511063123)*x_ref[1]**o+(-0.694820011654)*x_ref[1]
-        ref[3,3,2,0]=(0.82844733258)*x_ref[0]**o+(-0.151929131446)*x_ref[0]+(0.322848411081)*x_ref[1]**o+(0.436062233263)*x_ref[1]
-        ref[3,3,2,1]=(0.269627291792)*x_ref[0]**o+(0.618140998132)*x_ref[0]+(0.851057431407)*x_ref[1]**o+(0.716088832502)*x_ref[1]
-        ref[3,4,0,0]=(0.0557605432613)*x_ref[0]**o+(0.0689569775656)*x_ref[0]+(0.489781121774)*x_ref[1]**o+(0.214459998733)*x_ref[1]
-        ref[3,4,0,1]=(0.429111134289)*x_ref[0]**o+(0.648324951051)*x_ref[0]+(0.00596799425797)*x_ref[1]**o+(-0.752637714965)*x_ref[1]
-        ref[3,4,1,0]=(-0.0394648097179)*x_ref[0]**o+(0.842965554058)*x_ref[0]+(-0.124493160479)*x_ref[1]**o+(0.81914053244)*x_ref[1]
-        ref[3,4,1,1]=(0.309465325874)*x_ref[0]**o+(0.631381272937)*x_ref[0]+(-0.164415508845)*x_ref[1]**o+(0.316908911599)*x_ref[1]
-        ref[3,4,2,0]=(-0.615108314792)*x_ref[0]**o+(0.300936829452)*x_ref[0]+(-0.289514252333)*x_ref[1]**o+(0.844949030767)*x_ref[1]
-        ref[3,4,2,1]=(0.80117516909)*x_ref[0]**o+(-0.602632221639)*x_ref[0]+(-0.68193581457)*x_ref[1]**o+(0.203319693067)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.349437323395)*x[0]**o+(0.817821891642)*x[0]+(-0.357998520848)*x[1]**o+(0.349311985429)*x[1]+(0.470351907942)*x[2]**o+(0.264007843212)*x[2]
-        arg[0,0,0,1]=(-0.747824148035)*x[0]**o+(0.551817215468)*x[0]+(0.980476067966)*x[1]**o+(0.521120126285)*x[1]+(-0.472357720779)*x[2]**o+(-0.379502066444)*x[2]
-        arg[0,0,1,0]=(0.302984899868)*x[0]**o+(0.556601505796)*x[0]+(-0.698948476338)*x[1]**o+(-0.587379572024)*x[1]+(-0.625760359909)*x[2]**o+(0.231956543432)*x[2]
-        arg[0,0,1,1]=(-0.335943560463)*x[0]**o+(-0.497643152155)*x[0]+(-0.849829024888)*x[1]**o+(-0.388751135318)*x[1]+(-0.517696637743)*x[2]**o+(-0.966210901)*x[2]
-        arg[0,0,2,0]=(-0.0953058405321)*x[0]**o+(-0.864580918175)*x[0]+(-0.732086619685)*x[1]**o+(0.872044654816)*x[1]+(-0.225850391375)*x[2]**o+(-0.502203654371)*x[2]
-        arg[0,0,2,1]=(0.228408069101)*x[0]**o+(0.267590362458)*x[0]+(0.127397041031)*x[1]**o+(0.0142393720782)*x[1]+(-0.257563412478)*x[2]**o+(0.0211877877507)*x[2]
-        arg[0,1,0,0]=(0.921125039994)*x[0]**o+(0.372548304521)*x[0]+(-0.66574364308)*x[1]**o+(0.0895600219155)*x[1]+(-0.656870562037)*x[2]**o+(-0.608819638268)*x[2]
-        arg[0,1,0,1]=(-0.396625252579)*x[0]**o+(0.655542320616)*x[0]+(-0.542629502059)*x[1]**o+(0.587317299384)*x[1]+(0.96380848967)*x[2]**o+(0.121341827766)*x[2]
-        arg[0,1,1,0]=(0.0908208346003)*x[0]**o+(-0.0398227321951)*x[0]+(0.907607555288)*x[1]**o+(0.527230589013)*x[1]+(0.519287416653)*x[2]**o+(0.103180358249)*x[2]
-        arg[0,1,1,1]=(0.0615195625837)*x[0]**o+(0.695720276474)*x[0]+(0.0862101684049)*x[1]**o+(0.517150419955)*x[1]+(0.511207669575)*x[2]**o+(-0.9556472362)*x[2]
-        arg[0,1,2,0]=(0.70040395652)*x[0]**o+(-0.576266027865)*x[0]+(-0.133947982034)*x[1]**o+(-0.764976368456)*x[1]+(-0.860780506782)*x[2]**o+(-0.137946340663)*x[2]
-        arg[0,1,2,1]=(0.356017596832)*x[0]**o+(0.94912783604)*x[0]+(0.325951760294)*x[1]**o+(0.0623695610721)*x[1]+(-0.106031051895)*x[2]**o+(-0.339314970581)*x[2]
-        arg[0,2,0,0]=(-0.124954395016)*x[0]**o+(0.558233271782)*x[0]+(-0.956846820394)*x[1]**o+(-0.599332648704)*x[1]+(-0.322444201477)*x[2]**o+(0.0833108732532)*x[2]
-        arg[0,2,0,1]=(-0.713065259589)*x[0]**o+(-0.597746726477)*x[0]+(-0.976654446591)*x[1]**o+(0.977779698697)*x[1]+(0.694427679422)*x[2]**o+(-0.364463986712)*x[2]
-        arg[0,2,1,0]=(-0.415861468352)*x[0]**o+(-0.159802964908)*x[0]+(-0.132331280778)*x[1]**o+(0.120829594848)*x[1]+(-0.114181951611)*x[2]**o+(-0.810187313564)*x[2]
-        arg[0,2,1,1]=(-0.869925695451)*x[0]**o+(-0.535444611026)*x[0]+(0.62908837594)*x[1]**o+(-0.488583607314)*x[1]+(0.8461615049)*x[2]**o+(-0.558010294727)*x[2]
-        arg[0,2,2,0]=(-0.0822232217466)*x[0]**o+(-0.673631382141)*x[0]+(0.803717792107)*x[1]**o+(0.339934715615)*x[1]+(-0.886365924996)*x[2]**o+(0.0206517750753)*x[2]
-        arg[0,2,2,1]=(0.367656249869)*x[0]**o+(0.000987963028539)*x[0]+(0.399182215451)*x[1]**o+(0.923259635138)*x[1]+(0.8573338122)*x[2]**o+(0.679082213415)*x[2]
-        arg[0,3,0,0]=(-0.722680496644)*x[0]**o+(0.199427912651)*x[0]+(-0.351799245099)*x[1]**o+(0.240285416231)*x[1]+(-0.701704868242)*x[2]**o+(0.265610436018)*x[2]
-        arg[0,3,0,1]=(-0.14479043328)*x[0]**o+(-0.192670959504)*x[0]+(0.327412080296)*x[1]**o+(-0.390894637576)*x[1]+(-0.401862813677)*x[2]**o+(-0.87150071561)*x[2]
-        arg[0,3,1,0]=(0.430039400239)*x[0]**o+(-0.0691443536291)*x[0]+(0.205492039071)*x[1]**o+(-0.391580258314)*x[1]+(0.791748125642)*x[2]**o+(-0.0896722225431)*x[2]
-        arg[0,3,1,1]=(-0.177554766913)*x[0]**o+(-0.399389195454)*x[0]+(-0.304228953477)*x[1]**o+(0.00462595697167)*x[1]+(0.271814579884)*x[2]**o+(-0.17305639368)*x[2]
-        arg[0,3,2,0]=(-0.105869589157)*x[0]**o+(0.803488342924)*x[0]+(-0.65117861655)*x[1]**o+(-0.27529059731)*x[1]+(-0.777107387582)*x[2]**o+(-0.690980328369)*x[2]
-        arg[0,3,2,1]=(-0.13792230295)*x[0]**o+(0.649721420509)*x[0]+(0.401441756822)*x[1]**o+(0.468949007973)*x[1]+(-0.762015699412)*x[2]**o+(0.389781367434)*x[2]
-        arg[0,4,0,0]=(0.873653819021)*x[0]**o+(0.539406798913)*x[0]+(0.802177801924)*x[1]**o+(-0.861314989922)*x[1]+(0.847509960118)*x[2]**o+(-0.41381965291)*x[2]
-        arg[0,4,0,1]=(0.0416858647633)*x[0]**o+(0.866825467268)*x[0]+(0.89776163679)*x[1]**o+(-0.978326218858)*x[1]+(-0.409795413277)*x[2]**o+(0.982449327977)*x[2]
-        arg[0,4,1,0]=(-0.114530966075)*x[0]**o+(-0.182414280034)*x[0]+(0.154385814218)*x[1]**o+(0.869624332271)*x[1]+(0.477213291128)*x[2]**o+(-0.137123375612)*x[2]
-        arg[0,4,1,1]=(-0.52963019184)*x[0]**o+(0.0217955878025)*x[0]+(-0.174531798693)*x[1]**o+(-0.738947178141)*x[1]+(0.198130667502)*x[2]**o+(-0.449952166994)*x[2]
-        arg[0,4,2,0]=(0.998209708224)*x[0]**o+(0.734906841374)*x[0]+(0.225596363429)*x[1]**o+(0.862772101878)*x[1]+(-0.133563132638)*x[2]**o+(-0.78059821331)*x[2]
-        arg[0,4,2,1]=(0.384580893901)*x[0]**o+(-0.881918368669)*x[0]+(-0.950768236608)*x[1]**o+(-0.452275072093)*x[1]+(0.592779023744)*x[2]**o+(0.798735695084)*x[2]
-        arg[1,0,0,0]=(0.786827894179)*x[0]**o+(-0.233241290567)*x[0]+(0.946717698992)*x[1]**o+(0.179368479607)*x[1]+(-0.10409968587)*x[2]**o+(-0.770115022756)*x[2]
-        arg[1,0,0,1]=(-0.355389699793)*x[0]**o+(0.356407960494)*x[0]+(-0.371831767713)*x[1]**o+(0.139120259823)*x[1]+(0.910761795881)*x[2]**o+(0.725966050775)*x[2]
-        arg[1,0,1,0]=(0.316372320948)*x[0]**o+(0.432472869369)*x[0]+(0.733187356771)*x[1]**o+(0.133915829584)*x[1]+(0.380713482112)*x[2]**o+(-0.874827460114)*x[2]
-        arg[1,0,1,1]=(-0.0625786527083)*x[0]**o+(-0.469518973019)*x[0]+(-0.318610570327)*x[1]**o+(-0.304412247656)*x[1]+(0.844057224107)*x[2]**o+(0.508926494536)*x[2]
-        arg[1,0,2,0]=(-0.759697281694)*x[0]**o+(0.701456398418)*x[0]+(-0.671612899124)*x[1]**o+(0.292474197717)*x[1]+(-0.445886723952)*x[2]**o+(-0.319953406782)*x[2]
-        arg[1,0,2,1]=(-0.865703619781)*x[0]**o+(0.115639820869)*x[0]+(0.493634056223)*x[1]**o+(0.0343245670418)*x[1]+(0.748200872819)*x[2]**o+(-0.208438395054)*x[2]
-        arg[1,1,0,0]=(0.767661930656)*x[0]**o+(-0.578385615919)*x[0]+(0.241313268557)*x[1]**o+(0.74276605359)*x[1]+(0.373638986644)*x[2]**o+(0.475479466784)*x[2]
-        arg[1,1,0,1]=(0.723228882826)*x[0]**o+(-0.988524686322)*x[0]+(0.333664096597)*x[1]**o+(-0.756435323592)*x[1]+(0.771173510221)*x[2]**o+(-0.879337556561)*x[2]
-        arg[1,1,1,0]=(0.939682105701)*x[0]**o+(-0.172311578817)*x[0]+(-0.407241492831)*x[1]**o+(0.446660064834)*x[1]+(0.0371203367053)*x[2]**o+(-0.302853430561)*x[2]
-        arg[1,1,1,1]=(0.1093213068)*x[0]**o+(0.31232933407)*x[0]+(0.47474581408)*x[1]**o+(-0.602763201317)*x[1]+(0.803198523872)*x[2]**o+(-0.178088233667)*x[2]
-        arg[1,1,2,0]=(-0.217141686114)*x[0]**o+(0.287363815362)*x[0]+(-0.352552947551)*x[1]**o+(0.106445580983)*x[1]+(0.340814562712)*x[2]**o+(-0.963691249733)*x[2]
-        arg[1,1,2,1]=(0.612302241126)*x[0]**o+(-0.771765095612)*x[0]+(-0.18662763339)*x[1]**o+(0.10259882275)*x[1]+(-0.29535785913)*x[2]**o+(-0.577876877465)*x[2]
-        arg[1,2,0,0]=(0.497131459554)*x[0]**o+(0.912133134267)*x[0]+(0.944369633113)*x[1]**o+(0.163408823815)*x[1]+(0.85636766551)*x[2]**o+(-0.00282458078743)*x[2]
-        arg[1,2,0,1]=(0.362490806338)*x[0]**o+(0.22490192994)*x[0]+(-0.913665309243)*x[1]**o+(-0.88010395132)*x[1]+(-0.926205930269)*x[2]**o+(-0.231830082111)*x[2]
-        arg[1,2,1,0]=(-0.974792784505)*x[0]**o+(-0.765605618923)*x[0]+(0.241470054253)*x[1]**o+(0.445863114014)*x[1]+(0.561062749944)*x[2]**o+(-0.215674406206)*x[2]
-        arg[1,2,1,1]=(0.827013456823)*x[0]**o+(-0.191864800977)*x[0]+(-0.158099224794)*x[1]**o+(-0.921959562711)*x[1]+(0.930693535629)*x[2]**o+(-0.352967183792)*x[2]
-        arg[1,2,2,0]=(0.258970603305)*x[0]**o+(0.586779837275)*x[0]+(0.82707087137)*x[1]**o+(-0.215210535461)*x[1]+(0.36890299705)*x[2]**o+(-0.724385890088)*x[2]
-        arg[1,2,2,1]=(-0.125969269863)*x[0]**o+(-0.505216539273)*x[0]+(0.43242008053)*x[1]**o+(0.212079268112)*x[1]+(0.345759190477)*x[2]**o+(-0.98505468199)*x[2]
-        arg[1,3,0,0]=(-0.647118215098)*x[0]**o+(0.318566502446)*x[0]+(-0.151406735047)*x[1]**o+(0.253202745125)*x[1]+(-0.404823111329)*x[2]**o+(-0.520797366557)*x[2]
-        arg[1,3,0,1]=(-0.946886311645)*x[0]**o+(0.733699524424)*x[0]+(-0.615470980807)*x[1]**o+(-0.103976314414)*x[1]+(-0.932104431883)*x[2]**o+(0.157563806559)*x[2]
-        arg[1,3,1,0]=(-0.289471503181)*x[0]**o+(0.749124853135)*x[0]+(-0.578861403092)*x[1]**o+(-0.136231378985)*x[1]+(0.532719246315)*x[2]**o+(0.542455831657)*x[2]
-        arg[1,3,1,1]=(-0.343842490684)*x[0]**o+(0.110039182926)*x[0]+(0.901234650534)*x[1]**o+(-0.513362876241)*x[1]+(0.371952189126)*x[2]**o+(-0.169400349862)*x[2]
-        arg[1,3,2,0]=(-0.766791944503)*x[0]**o+(0.0267491122166)*x[0]+(-0.699293509597)*x[1]**o+(-0.697363669971)*x[1]+(0.567854170308)*x[2]**o+(-0.516301389629)*x[2]
-        arg[1,3,2,1]=(-0.288508579358)*x[0]**o+(0.239321880772)*x[0]+(0.677249635795)*x[1]**o+(0.48369084768)*x[1]+(0.681460633595)*x[2]**o+(-0.80218734437)*x[2]
-        arg[1,4,0,0]=(0.510273388936)*x[0]**o+(0.35600020965)*x[0]+(0.271077500616)*x[1]**o+(-0.00479335810576)*x[1]+(-0.348457583464)*x[2]**o+(-0.965895122152)*x[2]
-        arg[1,4,0,1]=(0.0134532748813)*x[0]**o+(-0.396954380686)*x[0]+(-0.176682002946)*x[1]**o+(0.971224261138)*x[1]+(-0.359602180261)*x[2]**o+(0.373748703363)*x[2]
-        arg[1,4,1,0]=(-0.519413160925)*x[0]**o+(0.856346255965)*x[0]+(0.159167243935)*x[1]**o+(0.92068779838)*x[1]+(0.415122182947)*x[2]**o+(-0.595702311496)*x[2]
-        arg[1,4,1,1]=(-0.608969598184)*x[0]**o+(-0.434750765676)*x[0]+(0.74471475701)*x[1]**o+(-0.229333246615)*x[1]+(-0.678138032736)*x[2]**o+(-0.514112926798)*x[2]
-        arg[1,4,2,0]=(0.0633453561735)*x[0]**o+(-0.278569473082)*x[0]+(-0.842227144473)*x[1]**o+(-0.00289799815652)*x[1]+(0.153392291113)*x[2]**o+(-0.61448940993)*x[2]
-        arg[1,4,2,1]=(0.0897863401674)*x[0]**o+(-0.487876787706)*x[0]+(-0.464008634014)*x[1]**o+(0.576466896344)*x[1]+(0.962345361537)*x[2]**o+(0.580878819156)*x[2]
-        arg[2,0,0,0]=(0.316582275434)*x[0]**o+(0.0607872538221)*x[0]+(0.642492366848)*x[1]**o+(0.200300167843)*x[1]+(-0.402802396184)*x[2]**o+(-0.834254866233)*x[2]
-        arg[2,0,0,1]=(0.644614184272)*x[0]**o+(-0.086367798694)*x[0]+(-0.428671462705)*x[1]**o+(-0.517827373575)*x[1]+(0.528197945165)*x[2]**o+(-0.523092888005)*x[2]
-        arg[2,0,1,0]=(0.41376145869)*x[0]**o+(-0.27425322418)*x[0]+(0.816942168928)*x[1]**o+(-0.882784454814)*x[1]+(-0.270205535673)*x[2]**o+(0.642372102899)*x[2]
-        arg[2,0,1,1]=(0.584931736844)*x[0]**o+(0.622511792702)*x[0]+(0.76174625736)*x[1]**o+(0.0561486448557)*x[1]+(-0.588861269552)*x[2]**o+(-0.341896323569)*x[2]
-        arg[2,0,2,0]=(0.635215108566)*x[0]**o+(0.299769133671)*x[0]+(0.141053572388)*x[1]**o+(0.102844255879)*x[1]+(-0.995154777534)*x[2]**o+(0.501319388994)*x[2]
-        arg[2,0,2,1]=(0.750089643836)*x[0]**o+(0.57570708561)*x[0]+(-0.449935823319)*x[1]**o+(-0.902982109411)*x[1]+(0.561185740222)*x[2]**o+(0.422654056847)*x[2]
-        arg[2,1,0,0]=(0.953986415316)*x[0]**o+(-0.7883326473)*x[0]+(-0.723690234059)*x[1]**o+(-0.537242781471)*x[1]+(-0.503466717519)*x[2]**o+(-0.777865169241)*x[2]
-        arg[2,1,0,1]=(0.317357554441)*x[0]**o+(-0.326828957855)*x[0]+(-0.609992651237)*x[1]**o+(0.811066934743)*x[1]+(-0.90668441447)*x[2]**o+(0.92581926687)*x[2]
-        arg[2,1,1,0]=(-0.0801236189368)*x[0]**o+(0.49151264813)*x[0]+(-0.0770654446151)*x[1]**o+(-0.314981217276)*x[1]+(-0.743180837478)*x[2]**o+(-0.554491413146)*x[2]
-        arg[2,1,1,1]=(0.831017344937)*x[0]**o+(-0.61064793935)*x[0]+(0.652976737027)*x[1]**o+(0.242104127969)*x[1]+(0.593330958678)*x[2]**o+(-0.35899584298)*x[2]
-        arg[2,1,2,0]=(-0.580618798556)*x[0]**o+(-0.936176474082)*x[0]+(-0.768716477288)*x[1]**o+(-0.353687473159)*x[1]+(-0.261509314019)*x[2]**o+(-0.442139199257)*x[2]
-        arg[2,1,2,1]=(0.945760793889)*x[0]**o+(-0.646958670891)*x[0]+(-0.440341726063)*x[1]**o+(0.223283751014)*x[1]+(0.799798944743)*x[2]**o+(0.591902067633)*x[2]
-        arg[2,2,0,0]=(-0.267699746405)*x[0]**o+(0.271554172399)*x[0]+(0.747278903642)*x[1]**o+(-0.832877459834)*x[1]+(-0.640373164716)*x[2]**o+(-0.666487164763)*x[2]
-        arg[2,2,0,1]=(0.795630715924)*x[0]**o+(0.682973866186)*x[0]+(-0.750818874926)*x[1]**o+(-0.904782408217)*x[1]+(-0.578138718379)*x[2]**o+(-0.369846516992)*x[2]
-        arg[2,2,1,0]=(0.165654497062)*x[0]**o+(-0.329827871165)*x[0]+(-0.808981530672)*x[1]**o+(0.350106763785)*x[1]+(0.106638087689)*x[2]**o+(0.425516820398)*x[2]
-        arg[2,2,1,1]=(0.017419119421)*x[0]**o+(0.500359047996)*x[0]+(-0.888509940049)*x[1]**o+(-0.375469124891)*x[1]+(0.863718970618)*x[2]**o+(-0.807667604763)*x[2]
-        arg[2,2,2,0]=(0.860662652165)*x[0]**o+(0.162530730499)*x[0]+(-0.657510966961)*x[1]**o+(0.215905840286)*x[1]+(0.97380371264)*x[2]**o+(-0.431027671897)*x[2]
-        arg[2,2,2,1]=(-0.649151503991)*x[0]**o+(0.484589779517)*x[0]+(0.905080495553)*x[1]**o+(0.997504119204)*x[1]+(-0.4268802512)*x[2]**o+(-0.687236308612)*x[2]
-        arg[2,3,0,0]=(-0.60485902589)*x[0]**o+(0.49500777286)*x[0]+(0.33977532104)*x[1]**o+(-0.219209845338)*x[1]+(-0.197311627683)*x[2]**o+(0.285859591044)*x[2]
-        arg[2,3,0,1]=(0.117438340483)*x[0]**o+(-0.562954894877)*x[0]+(-0.302982842797)*x[1]**o+(0.977923453436)*x[1]+(0.300127749784)*x[2]**o+(0.45784201373)*x[2]
-        arg[2,3,1,0]=(-0.910061442266)*x[0]**o+(0.723114553174)*x[0]+(-0.435693478652)*x[1]**o+(-0.584326584996)*x[1]+(-0.51000911177)*x[2]**o+(0.506615483889)*x[2]
-        arg[2,3,1,1]=(-0.50179741763)*x[0]**o+(-0.954551290001)*x[0]+(0.375839266192)*x[1]**o+(0.122120198059)*x[1]+(-0.593050674641)*x[2]**o+(0.549989594312)*x[2]
-        arg[2,3,2,0]=(-0.889519666705)*x[0]**o+(-0.815572507674)*x[0]+(0.453677651057)*x[1]**o+(0.450910828217)*x[1]+(-0.00465373008682)*x[2]**o+(0.731899900165)*x[2]
-        arg[2,3,2,1]=(-0.969971151589)*x[0]**o+(-0.156948104522)*x[0]+(0.492885029353)*x[1]**o+(-0.0310677847833)*x[1]+(0.327614233837)*x[2]**o+(-0.274974040707)*x[2]
-        arg[2,4,0,0]=(0.844667900826)*x[0]**o+(0.863374870522)*x[0]+(0.251456923241)*x[1]**o+(0.434916005183)*x[1]+(-0.139023370677)*x[2]**o+(0.0655176616053)*x[2]
-        arg[2,4,0,1]=(0.831755059318)*x[0]**o+(0.0897642674136)*x[0]+(0.190414878812)*x[1]**o+(0.976565327031)*x[1]+(0.413321767371)*x[2]**o+(0.755395415341)*x[2]
-        arg[2,4,1,0]=(-0.790364876377)*x[0]**o+(0.829442094248)*x[0]+(0.556251403891)*x[1]**o+(-0.953487711658)*x[1]+(-0.610781905401)*x[2]**o+(-0.320764072326)*x[2]
-        arg[2,4,1,1]=(-0.757101565136)*x[0]**o+(0.789340839395)*x[0]+(-0.615189514438)*x[1]**o+(-0.910992676978)*x[1]+(0.693736813401)*x[2]**o+(0.0538707588266)*x[2]
-        arg[2,4,2,0]=(0.000335625616611)*x[0]**o+(-0.195171446476)*x[0]+(0.0281149133705)*x[1]**o+(-0.362294159243)*x[1]+(0.830520288743)*x[2]**o+(-0.431967694247)*x[2]
-        arg[2,4,2,1]=(-0.232668364843)*x[0]**o+(0.655302452302)*x[0]+(-0.0125806408337)*x[1]**o+(-0.103979202109)*x[1]+(-0.277450383033)*x[2]**o+(0.708914971885)*x[2]
-        arg[3,0,0,0]=(-0.813447875186)*x[0]**o+(0.133491078101)*x[0]+(-0.675510725453)*x[1]**o+(-0.161489202717)*x[1]+(0.0474778506607)*x[2]**o+(0.513729029652)*x[2]
-        arg[3,0,0,1]=(0.45388386743)*x[0]**o+(-0.909074944715)*x[0]+(-0.540576382376)*x[1]**o+(-0.849753706068)*x[1]+(-0.496320191697)*x[2]**o+(-0.930725196363)*x[2]
-        arg[3,0,1,0]=(-0.145526830518)*x[0]**o+(-0.34717641097)*x[0]+(-0.818886792022)*x[1]**o+(0.574315644784)*x[1]+(-0.780431329222)*x[2]**o+(0.892840747651)*x[2]
-        arg[3,0,1,1]=(-0.415342962745)*x[0]**o+(-0.899768945518)*x[0]+(0.798573910731)*x[1]**o+(-0.0652893933479)*x[1]+(-0.444459519602)*x[2]**o+(-0.0100131702565)*x[2]
-        arg[3,0,2,0]=(-0.997936676013)*x[0]**o+(0.822000858069)*x[0]+(-0.553794408949)*x[1]**o+(0.829037287423)*x[1]+(-0.700288437806)*x[2]**o+(-0.449584600891)*x[2]
-        arg[3,0,2,1]=(-0.70979868598)*x[0]**o+(0.689868687655)*x[0]+(0.151257146397)*x[1]**o+(0.32895215144)*x[1]+(0.286043871383)*x[2]**o+(-0.604421567781)*x[2]
-        arg[3,1,0,0]=(0.60431849542)*x[0]**o+(0.518618291627)*x[0]+(-0.471868097013)*x[1]**o+(-0.639110899151)*x[1]+(-0.0904184061601)*x[2]**o+(0.113762528304)*x[2]
-        arg[3,1,0,1]=(0.307624103157)*x[0]**o+(-0.388281302162)*x[0]+(0.772429578102)*x[1]**o+(-0.197799629585)*x[1]+(-0.149120667036)*x[2]**o+(0.830154780264)*x[2]
-        arg[3,1,1,0]=(0.957127413133)*x[0]**o+(0.730080945389)*x[0]+(0.497191948774)*x[1]**o+(-0.586439221663)*x[1]+(-0.56223071093)*x[2]**o+(0.162899395804)*x[2]
-        arg[3,1,1,1]=(-0.285740818451)*x[0]**o+(-0.573919970411)*x[0]+(-0.400833211669)*x[1]**o+(0.84414534634)*x[1]+(-0.124352096731)*x[2]**o+(0.907013800834)*x[2]
-        arg[3,1,2,0]=(0.186947347989)*x[0]**o+(0.499582449213)*x[0]+(0.525473636695)*x[1]**o+(-0.926500953998)*x[1]+(-0.0392615366415)*x[2]**o+(0.909002911192)*x[2]
-        arg[3,1,2,1]=(0.634350440683)*x[0]**o+(0.901699291665)*x[0]+(-0.683899667575)*x[1]**o+(0.411642037744)*x[1]+(-0.72791611585)*x[2]**o+(-0.013293689839)*x[2]
-        arg[3,2,0,0]=(0.185164429507)*x[0]**o+(-0.671011652257)*x[0]+(0.973361040829)*x[1]**o+(0.989738565899)*x[1]+(-0.501245887091)*x[2]**o+(-0.405445444386)*x[2]
-        arg[3,2,0,1]=(-0.311554020884)*x[0]**o+(-0.929020990333)*x[0]+(0.366016375797)*x[1]**o+(0.838234804773)*x[1]+(0.939602632409)*x[2]**o+(-0.885524260372)*x[2]
-        arg[3,2,1,0]=(-0.0101604655589)*x[0]**o+(0.670274078493)*x[0]+(0.198135855354)*x[1]**o+(-0.000275422963644)*x[1]+(0.136674233404)*x[2]**o+(-0.442510118497)*x[2]
-        arg[3,2,1,1]=(-0.677948769785)*x[0]**o+(-0.165403610813)*x[0]+(-0.219353502981)*x[1]**o+(0.664297154009)*x[1]+(0.158536302892)*x[2]**o+(0.293940884925)*x[2]
-        arg[3,2,2,0]=(0.666669534708)*x[0]**o+(0.609459298502)*x[0]+(0.297058070582)*x[1]**o+(-0.0809555825821)*x[1]+(0.139430791042)*x[2]**o+(-0.253514861624)*x[2]
-        arg[3,2,2,1]=(-0.577932413274)*x[0]**o+(-0.583353108895)*x[0]+(-0.839262034394)*x[1]**o+(0.795642236106)*x[1]+(0.0882627381543)*x[2]**o+(-0.382970623122)*x[2]
-        arg[3,3,0,0]=(0.187941627429)*x[0]**o+(0.552040688531)*x[0]+(0.837458832716)*x[1]**o+(0.296793121897)*x[1]+(-0.665699511216)*x[2]**o+(-0.318565991052)*x[2]
-        arg[3,3,0,1]=(-0.78770176804)*x[0]**o+(0.807509260396)*x[0]+(0.46241086085)*x[1]**o+(0.668506908751)*x[1]+(-0.988954457343)*x[2]**o+(0.0896365679915)*x[2]
-        arg[3,3,1,0]=(0.727665746433)*x[0]**o+(-0.819391676739)*x[0]+(-0.118648934607)*x[1]**o+(-0.433862939031)*x[1]+(0.827788711313)*x[2]**o+(-0.615751446784)*x[2]
-        arg[3,3,1,1]=(-0.00427901841482)*x[0]**o+(-0.38545713036)*x[0]+(0.570160083404)*x[1]**o+(-0.235505162795)*x[1]+(0.514578304371)*x[2]**o+(-0.152692113279)*x[2]
-        arg[3,3,2,0]=(-0.396900613831)*x[0]**o+(0.161875314543)*x[0]+(0.28471295984)*x[1]**o+(-0.623276596728)*x[1]+(-0.748772373219)*x[2]**o+(0.584246898704)*x[2]
-        arg[3,3,2,1]=(0.210026027009)*x[0]**o+(-0.530437530387)*x[0]+(0.437155825716)*x[1]**o+(0.984102407204)*x[1]+(0.125030773605)*x[2]**o+(-0.821764907318)*x[2]
-        arg[3,4,0,0]=(-0.819129946783)*x[0]**o+(-0.729517565451)*x[0]+(-0.126013244602)*x[1]**o+(0.592832125254)*x[1]+(-0.850426487488)*x[2]**o+(0.271550912174)*x[2]
-        arg[3,4,0,1]=(-0.573554440921)*x[0]**o+(0.232106829584)*x[0]+(0.810201614042)*x[1]**o+(-0.85518164211)*x[1]+(0.249535563949)*x[2]**o+(-0.69728963017)*x[2]
-        arg[3,4,1,0]=(0.785661643628)*x[0]**o+(0.936424600424)*x[0]+(0.321363811055)*x[1]**o+(0.362341458592)*x[1]+(-0.593576579363)*x[2]**o+(0.0601278435924)*x[2]
-        arg[3,4,1,1]=(-0.854420686885)*x[0]**o+(0.993352097501)*x[0]+(-0.572116112224)*x[1]**o+(0.308008845182)*x[1]+(0.0443339578639)*x[2]**o+(-0.1469857285)*x[2]
-        arg[3,4,2,0]=(0.696373642151)*x[0]**o+(0.82425126832)*x[0]+(-0.0891735358455)*x[1]**o+(-0.22218993613)*x[1]+(-0.238393149017)*x[2]**o+(-0.631352718194)*x[2]
-        arg[3,4,2,1]=(-0.0932690431928)*x[0]**o+(-0.391900483919)*x[0]+(0.236843565361)*x[1]**o+(-0.164197648532)*x[1]+(0.235502596353)*x[2]**o+(0.0110131867917)*x[2]
-        ref[0,0,0,0]=(0.349437323395)*x_ref[0]**o+(0.817821891642)*x_ref[0]+(-0.357998520848)*x_ref[1]**o+(0.349311985429)*x_ref[1]+(0.470351907942)*x_ref[2]**o+(0.264007843212)*x_ref[2]
-        ref[0,0,0,1]=(-0.747824148035)*x_ref[0]**o+(0.551817215468)*x_ref[0]+(0.980476067966)*x_ref[1]**o+(0.521120126285)*x_ref[1]+(-0.472357720779)*x_ref[2]**o+(-0.379502066444)*x_ref[2]
-        ref[0,0,1,0]=(0.302984899868)*x_ref[0]**o+(0.556601505796)*x_ref[0]+(-0.698948476338)*x_ref[1]**o+(-0.587379572024)*x_ref[1]+(-0.625760359909)*x_ref[2]**o+(0.231956543432)*x_ref[2]
-        ref[0,0,1,1]=(-0.335943560463)*x_ref[0]**o+(-0.497643152155)*x_ref[0]+(-0.849829024888)*x_ref[1]**o+(-0.388751135318)*x_ref[1]+(-0.517696637743)*x_ref[2]**o+(-0.966210901)*x_ref[2]
-        ref[0,0,2,0]=(-0.0953058405321)*x_ref[0]**o+(-0.864580918175)*x_ref[0]+(-0.732086619685)*x_ref[1]**o+(0.872044654816)*x_ref[1]+(-0.225850391375)*x_ref[2]**o+(-0.502203654371)*x_ref[2]
-        ref[0,0,2,1]=(0.228408069101)*x_ref[0]**o+(0.267590362458)*x_ref[0]+(0.127397041031)*x_ref[1]**o+(0.0142393720782)*x_ref[1]+(-0.257563412478)*x_ref[2]**o+(0.0211877877507)*x_ref[2]
-        ref[0,1,0,0]=(0.921125039994)*x_ref[0]**o+(0.372548304521)*x_ref[0]+(-0.66574364308)*x_ref[1]**o+(0.0895600219155)*x_ref[1]+(-0.656870562037)*x_ref[2]**o+(-0.608819638268)*x_ref[2]
-        ref[0,1,0,1]=(-0.396625252579)*x_ref[0]**o+(0.655542320616)*x_ref[0]+(-0.542629502059)*x_ref[1]**o+(0.587317299384)*x_ref[1]+(0.96380848967)*x_ref[2]**o+(0.121341827766)*x_ref[2]
-        ref[0,1,1,0]=(0.0908208346003)*x_ref[0]**o+(-0.0398227321951)*x_ref[0]+(0.907607555288)*x_ref[1]**o+(0.527230589013)*x_ref[1]+(0.519287416653)*x_ref[2]**o+(0.103180358249)*x_ref[2]
-        ref[0,1,1,1]=(0.0615195625837)*x_ref[0]**o+(0.695720276474)*x_ref[0]+(0.0862101684049)*x_ref[1]**o+(0.517150419955)*x_ref[1]+(0.511207669575)*x_ref[2]**o+(-0.9556472362)*x_ref[2]
-        ref[0,1,2,0]=(0.70040395652)*x_ref[0]**o+(-0.576266027865)*x_ref[0]+(-0.133947982034)*x_ref[1]**o+(-0.764976368456)*x_ref[1]+(-0.860780506782)*x_ref[2]**o+(-0.137946340663)*x_ref[2]
-        ref[0,1,2,1]=(0.356017596832)*x_ref[0]**o+(0.94912783604)*x_ref[0]+(0.325951760294)*x_ref[1]**o+(0.0623695610721)*x_ref[1]+(-0.106031051895)*x_ref[2]**o+(-0.339314970581)*x_ref[2]
-        ref[0,2,0,0]=(-0.124954395016)*x_ref[0]**o+(0.558233271782)*x_ref[0]+(-0.956846820394)*x_ref[1]**o+(-0.599332648704)*x_ref[1]+(-0.322444201477)*x_ref[2]**o+(0.0833108732532)*x_ref[2]
-        ref[0,2,0,1]=(-0.713065259589)*x_ref[0]**o+(-0.597746726477)*x_ref[0]+(-0.976654446591)*x_ref[1]**o+(0.977779698697)*x_ref[1]+(0.694427679422)*x_ref[2]**o+(-0.364463986712)*x_ref[2]
-        ref[0,2,1,0]=(-0.415861468352)*x_ref[0]**o+(-0.159802964908)*x_ref[0]+(-0.132331280778)*x_ref[1]**o+(0.120829594848)*x_ref[1]+(-0.114181951611)*x_ref[2]**o+(-0.810187313564)*x_ref[2]
-        ref[0,2,1,1]=(-0.869925695451)*x_ref[0]**o+(-0.535444611026)*x_ref[0]+(0.62908837594)*x_ref[1]**o+(-0.488583607314)*x_ref[1]+(0.8461615049)*x_ref[2]**o+(-0.558010294727)*x_ref[2]
-        ref[0,2,2,0]=(-0.0822232217466)*x_ref[0]**o+(-0.673631382141)*x_ref[0]+(0.803717792107)*x_ref[1]**o+(0.339934715615)*x_ref[1]+(-0.886365924996)*x_ref[2]**o+(0.0206517750753)*x_ref[2]
-        ref[0,2,2,1]=(0.367656249869)*x_ref[0]**o+(0.000987963028539)*x_ref[0]+(0.399182215451)*x_ref[1]**o+(0.923259635138)*x_ref[1]+(0.8573338122)*x_ref[2]**o+(0.679082213415)*x_ref[2]
-        ref[0,3,0,0]=(-0.722680496644)*x_ref[0]**o+(0.199427912651)*x_ref[0]+(-0.351799245099)*x_ref[1]**o+(0.240285416231)*x_ref[1]+(-0.701704868242)*x_ref[2]**o+(0.265610436018)*x_ref[2]
-        ref[0,3,0,1]=(-0.14479043328)*x_ref[0]**o+(-0.192670959504)*x_ref[0]+(0.327412080296)*x_ref[1]**o+(-0.390894637576)*x_ref[1]+(-0.401862813677)*x_ref[2]**o+(-0.87150071561)*x_ref[2]
-        ref[0,3,1,0]=(0.430039400239)*x_ref[0]**o+(-0.0691443536291)*x_ref[0]+(0.205492039071)*x_ref[1]**o+(-0.391580258314)*x_ref[1]+(0.791748125642)*x_ref[2]**o+(-0.0896722225431)*x_ref[2]
-        ref[0,3,1,1]=(-0.177554766913)*x_ref[0]**o+(-0.399389195454)*x_ref[0]+(-0.304228953477)*x_ref[1]**o+(0.00462595697167)*x_ref[1]+(0.271814579884)*x_ref[2]**o+(-0.17305639368)*x_ref[2]
-        ref[0,3,2,0]=(-0.105869589157)*x_ref[0]**o+(0.803488342924)*x_ref[0]+(-0.65117861655)*x_ref[1]**o+(-0.27529059731)*x_ref[1]+(-0.777107387582)*x_ref[2]**o+(-0.690980328369)*x_ref[2]
-        ref[0,3,2,1]=(-0.13792230295)*x_ref[0]**o+(0.649721420509)*x_ref[0]+(0.401441756822)*x_ref[1]**o+(0.468949007973)*x_ref[1]+(-0.762015699412)*x_ref[2]**o+(0.389781367434)*x_ref[2]
-        ref[0,4,0,0]=(0.873653819021)*x_ref[0]**o+(0.539406798913)*x_ref[0]+(0.802177801924)*x_ref[1]**o+(-0.861314989922)*x_ref[1]+(0.847509960118)*x_ref[2]**o+(-0.41381965291)*x_ref[2]
-        ref[0,4,0,1]=(0.0416858647633)*x_ref[0]**o+(0.866825467268)*x_ref[0]+(0.89776163679)*x_ref[1]**o+(-0.978326218858)*x_ref[1]+(-0.409795413277)*x_ref[2]**o+(0.982449327977)*x_ref[2]
-        ref[0,4,1,0]=(-0.114530966075)*x_ref[0]**o+(-0.182414280034)*x_ref[0]+(0.154385814218)*x_ref[1]**o+(0.869624332271)*x_ref[1]+(0.477213291128)*x_ref[2]**o+(-0.137123375612)*x_ref[2]
-        ref[0,4,1,1]=(-0.52963019184)*x_ref[0]**o+(0.0217955878025)*x_ref[0]+(-0.174531798693)*x_ref[1]**o+(-0.738947178141)*x_ref[1]+(0.198130667502)*x_ref[2]**o+(-0.449952166994)*x_ref[2]
-        ref[0,4,2,0]=(0.998209708224)*x_ref[0]**o+(0.734906841374)*x_ref[0]+(0.225596363429)*x_ref[1]**o+(0.862772101878)*x_ref[1]+(-0.133563132638)*x_ref[2]**o+(-0.78059821331)*x_ref[2]
-        ref[0,4,2,1]=(0.384580893901)*x_ref[0]**o+(-0.881918368669)*x_ref[0]+(-0.950768236608)*x_ref[1]**o+(-0.452275072093)*x_ref[1]+(0.592779023744)*x_ref[2]**o+(0.798735695084)*x_ref[2]
-        ref[1,0,0,0]=(0.786827894179)*x_ref[0]**o+(-0.233241290567)*x_ref[0]+(0.946717698992)*x_ref[1]**o+(0.179368479607)*x_ref[1]+(-0.10409968587)*x_ref[2]**o+(-0.770115022756)*x_ref[2]
-        ref[1,0,0,1]=(-0.355389699793)*x_ref[0]**o+(0.356407960494)*x_ref[0]+(-0.371831767713)*x_ref[1]**o+(0.139120259823)*x_ref[1]+(0.910761795881)*x_ref[2]**o+(0.725966050775)*x_ref[2]
-        ref[1,0,1,0]=(0.316372320948)*x_ref[0]**o+(0.432472869369)*x_ref[0]+(0.733187356771)*x_ref[1]**o+(0.133915829584)*x_ref[1]+(0.380713482112)*x_ref[2]**o+(-0.874827460114)*x_ref[2]
-        ref[1,0,1,1]=(-0.0625786527083)*x_ref[0]**o+(-0.469518973019)*x_ref[0]+(-0.318610570327)*x_ref[1]**o+(-0.304412247656)*x_ref[1]+(0.844057224107)*x_ref[2]**o+(0.508926494536)*x_ref[2]
-        ref[1,0,2,0]=(-0.759697281694)*x_ref[0]**o+(0.701456398418)*x_ref[0]+(-0.671612899124)*x_ref[1]**o+(0.292474197717)*x_ref[1]+(-0.445886723952)*x_ref[2]**o+(-0.319953406782)*x_ref[2]
-        ref[1,0,2,1]=(-0.865703619781)*x_ref[0]**o+(0.115639820869)*x_ref[0]+(0.493634056223)*x_ref[1]**o+(0.0343245670418)*x_ref[1]+(0.748200872819)*x_ref[2]**o+(-0.208438395054)*x_ref[2]
-        ref[1,1,0,0]=(0.767661930656)*x_ref[0]**o+(-0.578385615919)*x_ref[0]+(0.241313268557)*x_ref[1]**o+(0.74276605359)*x_ref[1]+(0.373638986644)*x_ref[2]**o+(0.475479466784)*x_ref[2]
-        ref[1,1,0,1]=(0.723228882826)*x_ref[0]**o+(-0.988524686322)*x_ref[0]+(0.333664096597)*x_ref[1]**o+(-0.756435323592)*x_ref[1]+(0.771173510221)*x_ref[2]**o+(-0.879337556561)*x_ref[2]
-        ref[1,1,1,0]=(0.939682105701)*x_ref[0]**o+(-0.172311578817)*x_ref[0]+(-0.407241492831)*x_ref[1]**o+(0.446660064834)*x_ref[1]+(0.0371203367053)*x_ref[2]**o+(-0.302853430561)*x_ref[2]
-        ref[1,1,1,1]=(0.1093213068)*x_ref[0]**o+(0.31232933407)*x_ref[0]+(0.47474581408)*x_ref[1]**o+(-0.602763201317)*x_ref[1]+(0.803198523872)*x_ref[2]**o+(-0.178088233667)*x_ref[2]
-        ref[1,1,2,0]=(-0.217141686114)*x_ref[0]**o+(0.287363815362)*x_ref[0]+(-0.352552947551)*x_ref[1]**o+(0.106445580983)*x_ref[1]+(0.340814562712)*x_ref[2]**o+(-0.963691249733)*x_ref[2]
-        ref[1,1,2,1]=(0.612302241126)*x_ref[0]**o+(-0.771765095612)*x_ref[0]+(-0.18662763339)*x_ref[1]**o+(0.10259882275)*x_ref[1]+(-0.29535785913)*x_ref[2]**o+(-0.577876877465)*x_ref[2]
-        ref[1,2,0,0]=(0.497131459554)*x_ref[0]**o+(0.912133134267)*x_ref[0]+(0.944369633113)*x_ref[1]**o+(0.163408823815)*x_ref[1]+(0.85636766551)*x_ref[2]**o+(-0.00282458078743)*x_ref[2]
-        ref[1,2,0,1]=(0.362490806338)*x_ref[0]**o+(0.22490192994)*x_ref[0]+(-0.913665309243)*x_ref[1]**o+(-0.88010395132)*x_ref[1]+(-0.926205930269)*x_ref[2]**o+(-0.231830082111)*x_ref[2]
-        ref[1,2,1,0]=(-0.974792784505)*x_ref[0]**o+(-0.765605618923)*x_ref[0]+(0.241470054253)*x_ref[1]**o+(0.445863114014)*x_ref[1]+(0.561062749944)*x_ref[2]**o+(-0.215674406206)*x_ref[2]
-        ref[1,2,1,1]=(0.827013456823)*x_ref[0]**o+(-0.191864800977)*x_ref[0]+(-0.158099224794)*x_ref[1]**o+(-0.921959562711)*x_ref[1]+(0.930693535629)*x_ref[2]**o+(-0.352967183792)*x_ref[2]
-        ref[1,2,2,0]=(0.258970603305)*x_ref[0]**o+(0.586779837275)*x_ref[0]+(0.82707087137)*x_ref[1]**o+(-0.215210535461)*x_ref[1]+(0.36890299705)*x_ref[2]**o+(-0.724385890088)*x_ref[2]
-        ref[1,2,2,1]=(-0.125969269863)*x_ref[0]**o+(-0.505216539273)*x_ref[0]+(0.43242008053)*x_ref[1]**o+(0.212079268112)*x_ref[1]+(0.345759190477)*x_ref[2]**o+(-0.98505468199)*x_ref[2]
-        ref[1,3,0,0]=(-0.647118215098)*x_ref[0]**o+(0.318566502446)*x_ref[0]+(-0.151406735047)*x_ref[1]**o+(0.253202745125)*x_ref[1]+(-0.404823111329)*x_ref[2]**o+(-0.520797366557)*x_ref[2]
-        ref[1,3,0,1]=(-0.946886311645)*x_ref[0]**o+(0.733699524424)*x_ref[0]+(-0.615470980807)*x_ref[1]**o+(-0.103976314414)*x_ref[1]+(-0.932104431883)*x_ref[2]**o+(0.157563806559)*x_ref[2]
-        ref[1,3,1,0]=(-0.289471503181)*x_ref[0]**o+(0.749124853135)*x_ref[0]+(-0.578861403092)*x_ref[1]**o+(-0.136231378985)*x_ref[1]+(0.532719246315)*x_ref[2]**o+(0.542455831657)*x_ref[2]
-        ref[1,3,1,1]=(-0.343842490684)*x_ref[0]**o+(0.110039182926)*x_ref[0]+(0.901234650534)*x_ref[1]**o+(-0.513362876241)*x_ref[1]+(0.371952189126)*x_ref[2]**o+(-0.169400349862)*x_ref[2]
-        ref[1,3,2,0]=(-0.766791944503)*x_ref[0]**o+(0.0267491122166)*x_ref[0]+(-0.699293509597)*x_ref[1]**o+(-0.697363669971)*x_ref[1]+(0.567854170308)*x_ref[2]**o+(-0.516301389629)*x_ref[2]
-        ref[1,3,2,1]=(-0.288508579358)*x_ref[0]**o+(0.239321880772)*x_ref[0]+(0.677249635795)*x_ref[1]**o+(0.48369084768)*x_ref[1]+(0.681460633595)*x_ref[2]**o+(-0.80218734437)*x_ref[2]
-        ref[1,4,0,0]=(0.510273388936)*x_ref[0]**o+(0.35600020965)*x_ref[0]+(0.271077500616)*x_ref[1]**o+(-0.00479335810576)*x_ref[1]+(-0.348457583464)*x_ref[2]**o+(-0.965895122152)*x_ref[2]
-        ref[1,4,0,1]=(0.0134532748813)*x_ref[0]**o+(-0.396954380686)*x_ref[0]+(-0.176682002946)*x_ref[1]**o+(0.971224261138)*x_ref[1]+(-0.359602180261)*x_ref[2]**o+(0.373748703363)*x_ref[2]
-        ref[1,4,1,0]=(-0.519413160925)*x_ref[0]**o+(0.856346255965)*x_ref[0]+(0.159167243935)*x_ref[1]**o+(0.92068779838)*x_ref[1]+(0.415122182947)*x_ref[2]**o+(-0.595702311496)*x_ref[2]
-        ref[1,4,1,1]=(-0.608969598184)*x_ref[0]**o+(-0.434750765676)*x_ref[0]+(0.74471475701)*x_ref[1]**o+(-0.229333246615)*x_ref[1]+(-0.678138032736)*x_ref[2]**o+(-0.514112926798)*x_ref[2]
-        ref[1,4,2,0]=(0.0633453561735)*x_ref[0]**o+(-0.278569473082)*x_ref[0]+(-0.842227144473)*x_ref[1]**o+(-0.00289799815652)*x_ref[1]+(0.153392291113)*x_ref[2]**o+(-0.61448940993)*x_ref[2]
-        ref[1,4,2,1]=(0.0897863401674)*x_ref[0]**o+(-0.487876787706)*x_ref[0]+(-0.464008634014)*x_ref[1]**o+(0.576466896344)*x_ref[1]+(0.962345361537)*x_ref[2]**o+(0.580878819156)*x_ref[2]
-        ref[2,0,0,0]=(0.316582275434)*x_ref[0]**o+(0.0607872538221)*x_ref[0]+(0.642492366848)*x_ref[1]**o+(0.200300167843)*x_ref[1]+(-0.402802396184)*x_ref[2]**o+(-0.834254866233)*x_ref[2]
-        ref[2,0,0,1]=(0.644614184272)*x_ref[0]**o+(-0.086367798694)*x_ref[0]+(-0.428671462705)*x_ref[1]**o+(-0.517827373575)*x_ref[1]+(0.528197945165)*x_ref[2]**o+(-0.523092888005)*x_ref[2]
-        ref[2,0,1,0]=(0.41376145869)*x_ref[0]**o+(-0.27425322418)*x_ref[0]+(0.816942168928)*x_ref[1]**o+(-0.882784454814)*x_ref[1]+(-0.270205535673)*x_ref[2]**o+(0.642372102899)*x_ref[2]
-        ref[2,0,1,1]=(0.584931736844)*x_ref[0]**o+(0.622511792702)*x_ref[0]+(0.76174625736)*x_ref[1]**o+(0.0561486448557)*x_ref[1]+(-0.588861269552)*x_ref[2]**o+(-0.341896323569)*x_ref[2]
-        ref[2,0,2,0]=(0.635215108566)*x_ref[0]**o+(0.299769133671)*x_ref[0]+(0.141053572388)*x_ref[1]**o+(0.102844255879)*x_ref[1]+(-0.995154777534)*x_ref[2]**o+(0.501319388994)*x_ref[2]
-        ref[2,0,2,1]=(0.750089643836)*x_ref[0]**o+(0.57570708561)*x_ref[0]+(-0.449935823319)*x_ref[1]**o+(-0.902982109411)*x_ref[1]+(0.561185740222)*x_ref[2]**o+(0.422654056847)*x_ref[2]
-        ref[2,1,0,0]=(0.953986415316)*x_ref[0]**o+(-0.7883326473)*x_ref[0]+(-0.723690234059)*x_ref[1]**o+(-0.537242781471)*x_ref[1]+(-0.503466717519)*x_ref[2]**o+(-0.777865169241)*x_ref[2]
-        ref[2,1,0,1]=(0.317357554441)*x_ref[0]**o+(-0.326828957855)*x_ref[0]+(-0.609992651237)*x_ref[1]**o+(0.811066934743)*x_ref[1]+(-0.90668441447)*x_ref[2]**o+(0.92581926687)*x_ref[2]
-        ref[2,1,1,0]=(-0.0801236189368)*x_ref[0]**o+(0.49151264813)*x_ref[0]+(-0.0770654446151)*x_ref[1]**o+(-0.314981217276)*x_ref[1]+(-0.743180837478)*x_ref[2]**o+(-0.554491413146)*x_ref[2]
-        ref[2,1,1,1]=(0.831017344937)*x_ref[0]**o+(-0.61064793935)*x_ref[0]+(0.652976737027)*x_ref[1]**o+(0.242104127969)*x_ref[1]+(0.593330958678)*x_ref[2]**o+(-0.35899584298)*x_ref[2]
-        ref[2,1,2,0]=(-0.580618798556)*x_ref[0]**o+(-0.936176474082)*x_ref[0]+(-0.768716477288)*x_ref[1]**o+(-0.353687473159)*x_ref[1]+(-0.261509314019)*x_ref[2]**o+(-0.442139199257)*x_ref[2]
-        ref[2,1,2,1]=(0.945760793889)*x_ref[0]**o+(-0.646958670891)*x_ref[0]+(-0.440341726063)*x_ref[1]**o+(0.223283751014)*x_ref[1]+(0.799798944743)*x_ref[2]**o+(0.591902067633)*x_ref[2]
-        ref[2,2,0,0]=(-0.267699746405)*x_ref[0]**o+(0.271554172399)*x_ref[0]+(0.747278903642)*x_ref[1]**o+(-0.832877459834)*x_ref[1]+(-0.640373164716)*x_ref[2]**o+(-0.666487164763)*x_ref[2]
-        ref[2,2,0,1]=(0.795630715924)*x_ref[0]**o+(0.682973866186)*x_ref[0]+(-0.750818874926)*x_ref[1]**o+(-0.904782408217)*x_ref[1]+(-0.578138718379)*x_ref[2]**o+(-0.369846516992)*x_ref[2]
-        ref[2,2,1,0]=(0.165654497062)*x_ref[0]**o+(-0.329827871165)*x_ref[0]+(-0.808981530672)*x_ref[1]**o+(0.350106763785)*x_ref[1]+(0.106638087689)*x_ref[2]**o+(0.425516820398)*x_ref[2]
-        ref[2,2,1,1]=(0.017419119421)*x_ref[0]**o+(0.500359047996)*x_ref[0]+(-0.888509940049)*x_ref[1]**o+(-0.375469124891)*x_ref[1]+(0.863718970618)*x_ref[2]**o+(-0.807667604763)*x_ref[2]
-        ref[2,2,2,0]=(0.860662652165)*x_ref[0]**o+(0.162530730499)*x_ref[0]+(-0.657510966961)*x_ref[1]**o+(0.215905840286)*x_ref[1]+(0.97380371264)*x_ref[2]**o+(-0.431027671897)*x_ref[2]
-        ref[2,2,2,1]=(-0.649151503991)*x_ref[0]**o+(0.484589779517)*x_ref[0]+(0.905080495553)*x_ref[1]**o+(0.997504119204)*x_ref[1]+(-0.4268802512)*x_ref[2]**o+(-0.687236308612)*x_ref[2]
-        ref[2,3,0,0]=(-0.60485902589)*x_ref[0]**o+(0.49500777286)*x_ref[0]+(0.33977532104)*x_ref[1]**o+(-0.219209845338)*x_ref[1]+(-0.197311627683)*x_ref[2]**o+(0.285859591044)*x_ref[2]
-        ref[2,3,0,1]=(0.117438340483)*x_ref[0]**o+(-0.562954894877)*x_ref[0]+(-0.302982842797)*x_ref[1]**o+(0.977923453436)*x_ref[1]+(0.300127749784)*x_ref[2]**o+(0.45784201373)*x_ref[2]
-        ref[2,3,1,0]=(-0.910061442266)*x_ref[0]**o+(0.723114553174)*x_ref[0]+(-0.435693478652)*x_ref[1]**o+(-0.584326584996)*x_ref[1]+(-0.51000911177)*x_ref[2]**o+(0.506615483889)*x_ref[2]
-        ref[2,3,1,1]=(-0.50179741763)*x_ref[0]**o+(-0.954551290001)*x_ref[0]+(0.375839266192)*x_ref[1]**o+(0.122120198059)*x_ref[1]+(-0.593050674641)*x_ref[2]**o+(0.549989594312)*x_ref[2]
-        ref[2,3,2,0]=(-0.889519666705)*x_ref[0]**o+(-0.815572507674)*x_ref[0]+(0.453677651057)*x_ref[1]**o+(0.450910828217)*x_ref[1]+(-0.00465373008682)*x_ref[2]**o+(0.731899900165)*x_ref[2]
-        ref[2,3,2,1]=(-0.969971151589)*x_ref[0]**o+(-0.156948104522)*x_ref[0]+(0.492885029353)*x_ref[1]**o+(-0.0310677847833)*x_ref[1]+(0.327614233837)*x_ref[2]**o+(-0.274974040707)*x_ref[2]
-        ref[2,4,0,0]=(0.844667900826)*x_ref[0]**o+(0.863374870522)*x_ref[0]+(0.251456923241)*x_ref[1]**o+(0.434916005183)*x_ref[1]+(-0.139023370677)*x_ref[2]**o+(0.0655176616053)*x_ref[2]
-        ref[2,4,0,1]=(0.831755059318)*x_ref[0]**o+(0.0897642674136)*x_ref[0]+(0.190414878812)*x_ref[1]**o+(0.976565327031)*x_ref[1]+(0.413321767371)*x_ref[2]**o+(0.755395415341)*x_ref[2]
-        ref[2,4,1,0]=(-0.790364876377)*x_ref[0]**o+(0.829442094248)*x_ref[0]+(0.556251403891)*x_ref[1]**o+(-0.953487711658)*x_ref[1]+(-0.610781905401)*x_ref[2]**o+(-0.320764072326)*x_ref[2]
-        ref[2,4,1,1]=(-0.757101565136)*x_ref[0]**o+(0.789340839395)*x_ref[0]+(-0.615189514438)*x_ref[1]**o+(-0.910992676978)*x_ref[1]+(0.693736813401)*x_ref[2]**o+(0.0538707588266)*x_ref[2]
-        ref[2,4,2,0]=(0.000335625616611)*x_ref[0]**o+(-0.195171446476)*x_ref[0]+(0.0281149133705)*x_ref[1]**o+(-0.362294159243)*x_ref[1]+(0.830520288743)*x_ref[2]**o+(-0.431967694247)*x_ref[2]
-        ref[2,4,2,1]=(-0.232668364843)*x_ref[0]**o+(0.655302452302)*x_ref[0]+(-0.0125806408337)*x_ref[1]**o+(-0.103979202109)*x_ref[1]+(-0.277450383033)*x_ref[2]**o+(0.708914971885)*x_ref[2]
-        ref[3,0,0,0]=(-0.813447875186)*x_ref[0]**o+(0.133491078101)*x_ref[0]+(-0.675510725453)*x_ref[1]**o+(-0.161489202717)*x_ref[1]+(0.0474778506607)*x_ref[2]**o+(0.513729029652)*x_ref[2]
-        ref[3,0,0,1]=(0.45388386743)*x_ref[0]**o+(-0.909074944715)*x_ref[0]+(-0.540576382376)*x_ref[1]**o+(-0.849753706068)*x_ref[1]+(-0.496320191697)*x_ref[2]**o+(-0.930725196363)*x_ref[2]
-        ref[3,0,1,0]=(-0.145526830518)*x_ref[0]**o+(-0.34717641097)*x_ref[0]+(-0.818886792022)*x_ref[1]**o+(0.574315644784)*x_ref[1]+(-0.780431329222)*x_ref[2]**o+(0.892840747651)*x_ref[2]
-        ref[3,0,1,1]=(-0.415342962745)*x_ref[0]**o+(-0.899768945518)*x_ref[0]+(0.798573910731)*x_ref[1]**o+(-0.0652893933479)*x_ref[1]+(-0.444459519602)*x_ref[2]**o+(-0.0100131702565)*x_ref[2]
-        ref[3,0,2,0]=(-0.997936676013)*x_ref[0]**o+(0.822000858069)*x_ref[0]+(-0.553794408949)*x_ref[1]**o+(0.829037287423)*x_ref[1]+(-0.700288437806)*x_ref[2]**o+(-0.449584600891)*x_ref[2]
-        ref[3,0,2,1]=(-0.70979868598)*x_ref[0]**o+(0.689868687655)*x_ref[0]+(0.151257146397)*x_ref[1]**o+(0.32895215144)*x_ref[1]+(0.286043871383)*x_ref[2]**o+(-0.604421567781)*x_ref[2]
-        ref[3,1,0,0]=(0.60431849542)*x_ref[0]**o+(0.518618291627)*x_ref[0]+(-0.471868097013)*x_ref[1]**o+(-0.639110899151)*x_ref[1]+(-0.0904184061601)*x_ref[2]**o+(0.113762528304)*x_ref[2]
-        ref[3,1,0,1]=(0.307624103157)*x_ref[0]**o+(-0.388281302162)*x_ref[0]+(0.772429578102)*x_ref[1]**o+(-0.197799629585)*x_ref[1]+(-0.149120667036)*x_ref[2]**o+(0.830154780264)*x_ref[2]
-        ref[3,1,1,0]=(0.957127413133)*x_ref[0]**o+(0.730080945389)*x_ref[0]+(0.497191948774)*x_ref[1]**o+(-0.586439221663)*x_ref[1]+(-0.56223071093)*x_ref[2]**o+(0.162899395804)*x_ref[2]
-        ref[3,1,1,1]=(-0.285740818451)*x_ref[0]**o+(-0.573919970411)*x_ref[0]+(-0.400833211669)*x_ref[1]**o+(0.84414534634)*x_ref[1]+(-0.124352096731)*x_ref[2]**o+(0.907013800834)*x_ref[2]
-        ref[3,1,2,0]=(0.186947347989)*x_ref[0]**o+(0.499582449213)*x_ref[0]+(0.525473636695)*x_ref[1]**o+(-0.926500953998)*x_ref[1]+(-0.0392615366415)*x_ref[2]**o+(0.909002911192)*x_ref[2]
-        ref[3,1,2,1]=(0.634350440683)*x_ref[0]**o+(0.901699291665)*x_ref[0]+(-0.683899667575)*x_ref[1]**o+(0.411642037744)*x_ref[1]+(-0.72791611585)*x_ref[2]**o+(-0.013293689839)*x_ref[2]
-        ref[3,2,0,0]=(0.185164429507)*x_ref[0]**o+(-0.671011652257)*x_ref[0]+(0.973361040829)*x_ref[1]**o+(0.989738565899)*x_ref[1]+(-0.501245887091)*x_ref[2]**o+(-0.405445444386)*x_ref[2]
-        ref[3,2,0,1]=(-0.311554020884)*x_ref[0]**o+(-0.929020990333)*x_ref[0]+(0.366016375797)*x_ref[1]**o+(0.838234804773)*x_ref[1]+(0.939602632409)*x_ref[2]**o+(-0.885524260372)*x_ref[2]
-        ref[3,2,1,0]=(-0.0101604655589)*x_ref[0]**o+(0.670274078493)*x_ref[0]+(0.198135855354)*x_ref[1]**o+(-0.000275422963644)*x_ref[1]+(0.136674233404)*x_ref[2]**o+(-0.442510118497)*x_ref[2]
-        ref[3,2,1,1]=(-0.677948769785)*x_ref[0]**o+(-0.165403610813)*x_ref[0]+(-0.219353502981)*x_ref[1]**o+(0.664297154009)*x_ref[1]+(0.158536302892)*x_ref[2]**o+(0.293940884925)*x_ref[2]
-        ref[3,2,2,0]=(0.666669534708)*x_ref[0]**o+(0.609459298502)*x_ref[0]+(0.297058070582)*x_ref[1]**o+(-0.0809555825821)*x_ref[1]+(0.139430791042)*x_ref[2]**o+(-0.253514861624)*x_ref[2]
-        ref[3,2,2,1]=(-0.577932413274)*x_ref[0]**o+(-0.583353108895)*x_ref[0]+(-0.839262034394)*x_ref[1]**o+(0.795642236106)*x_ref[1]+(0.0882627381543)*x_ref[2]**o+(-0.382970623122)*x_ref[2]
-        ref[3,3,0,0]=(0.187941627429)*x_ref[0]**o+(0.552040688531)*x_ref[0]+(0.837458832716)*x_ref[1]**o+(0.296793121897)*x_ref[1]+(-0.665699511216)*x_ref[2]**o+(-0.318565991052)*x_ref[2]
-        ref[3,3,0,1]=(-0.78770176804)*x_ref[0]**o+(0.807509260396)*x_ref[0]+(0.46241086085)*x_ref[1]**o+(0.668506908751)*x_ref[1]+(-0.988954457343)*x_ref[2]**o+(0.0896365679915)*x_ref[2]
-        ref[3,3,1,0]=(0.727665746433)*x_ref[0]**o+(-0.819391676739)*x_ref[0]+(-0.118648934607)*x_ref[1]**o+(-0.433862939031)*x_ref[1]+(0.827788711313)*x_ref[2]**o+(-0.615751446784)*x_ref[2]
-        ref[3,3,1,1]=(-0.00427901841482)*x_ref[0]**o+(-0.38545713036)*x_ref[0]+(0.570160083404)*x_ref[1]**o+(-0.235505162795)*x_ref[1]+(0.514578304371)*x_ref[2]**o+(-0.152692113279)*x_ref[2]
-        ref[3,3,2,0]=(-0.396900613831)*x_ref[0]**o+(0.161875314543)*x_ref[0]+(0.28471295984)*x_ref[1]**o+(-0.623276596728)*x_ref[1]+(-0.748772373219)*x_ref[2]**o+(0.584246898704)*x_ref[2]
-        ref[3,3,2,1]=(0.210026027009)*x_ref[0]**o+(-0.530437530387)*x_ref[0]+(0.437155825716)*x_ref[1]**o+(0.984102407204)*x_ref[1]+(0.125030773605)*x_ref[2]**o+(-0.821764907318)*x_ref[2]
-        ref[3,4,0,0]=(-0.819129946783)*x_ref[0]**o+(-0.729517565451)*x_ref[0]+(-0.126013244602)*x_ref[1]**o+(0.592832125254)*x_ref[1]+(-0.850426487488)*x_ref[2]**o+(0.271550912174)*x_ref[2]
-        ref[3,4,0,1]=(-0.573554440921)*x_ref[0]**o+(0.232106829584)*x_ref[0]+(0.810201614042)*x_ref[1]**o+(-0.85518164211)*x_ref[1]+(0.249535563949)*x_ref[2]**o+(-0.69728963017)*x_ref[2]
-        ref[3,4,1,0]=(0.785661643628)*x_ref[0]**o+(0.936424600424)*x_ref[0]+(0.321363811055)*x_ref[1]**o+(0.362341458592)*x_ref[1]+(-0.593576579363)*x_ref[2]**o+(0.0601278435924)*x_ref[2]
-        ref[3,4,1,1]=(-0.854420686885)*x_ref[0]**o+(0.993352097501)*x_ref[0]+(-0.572116112224)*x_ref[1]**o+(0.308008845182)*x_ref[1]+(0.0443339578639)*x_ref[2]**o+(-0.1469857285)*x_ref[2]
-        ref[3,4,2,0]=(0.696373642151)*x_ref[0]**o+(0.82425126832)*x_ref[0]+(-0.0891735358455)*x_ref[1]**o+(-0.22218993613)*x_ref[1]+(-0.238393149017)*x_ref[2]**o+(-0.631352718194)*x_ref[2]
-        ref[3,4,2,1]=(-0.0932690431928)*x_ref[0]**o+(-0.391900483919)*x_ref[0]+(0.236843565361)*x_ref[1]**o+(-0.164197648532)*x_ref[1]+(0.235502596353)*x_ref[2]**o+(0.0110131867917)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.521673635599)*x[0]**o+(-0.288664980886)*x[0]+(0.57565949318)*x[1]**o+(-0.555613874185)*x[1]
-        ref=(-0.521673635599)*x_ref[0]**o+(-0.288664980886)*x_ref[0]+(0.57565949318)*x_ref[1]**o+(-0.555613874185)*x_ref[1]
-      else:
-        arg=(0.520429804914)*x[0]**o+(-0.000683147004841)*x[0]+(0.676879975826)*x[1]**o+(0.760707578765)*x[1]+(0.479225734268)*x[2]**o+(0.132006876687)*x[2]
-        ref=(0.520429804914)*x_ref[0]**o+(-0.000683147004841)*x_ref[0]+(0.676879975826)*x_ref[1]**o+(0.760707578765)*x_ref[1]+(0.479225734268)*x_ref[2]**o+(0.132006876687)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.264333591663)*x[0]**o+(-0.884594789709)*x[0]+(0.809768917911)*x[1]**o+(-0.999064121889)*x[1]
-        arg[1]=(-0.476663257532)*x[0]**o+(0.703121978294)*x[0]+(0.768222344055)*x[1]**o+(0.0126615637065)*x[1]
-        ref[0]=(0.264333591663)*x_ref[0]**o+(-0.884594789709)*x_ref[0]+(0.809768917911)*x_ref[1]**o+(-0.999064121889)*x_ref[1]
-        ref[1]=(-0.476663257532)*x_ref[0]**o+(0.703121978294)*x_ref[0]+(0.768222344055)*x_ref[1]**o+(0.0126615637065)*x_ref[1]
-      else:
-        arg[0]=(-0.814801897766)*x[0]**o+(0.417782597744)*x[0]+(0.354691012333)*x[1]**o+(-0.0529647248706)*x[1]+(-0.455085903639)*x[2]**o+(-0.501751102496)*x[2]
-        arg[1]=(0.165354246971)*x[0]**o+(-0.238754573504)*x[0]+(-0.293225479626)*x[1]**o+(-0.42192384305)*x[1]+(-0.109509840118)*x[2]**o+(0.511666964461)*x[2]
-        ref[0]=(-0.814801897766)*x_ref[0]**o+(0.417782597744)*x_ref[0]+(0.354691012333)*x_ref[1]**o+(-0.0529647248706)*x_ref[1]+(-0.455085903639)*x_ref[2]**o+(-0.501751102496)*x_ref[2]
-        ref[1]=(0.165354246971)*x_ref[0]**o+(-0.238754573504)*x_ref[0]+(-0.293225479626)*x_ref[1]**o+(-0.42192384305)*x_ref[1]+(-0.109509840118)*x_ref[2]**o+(0.511666964461)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.469225177227)*x[0]**o+(-0.312308556752)*x[0]+(0.0207638302484)*x[1]**o+(-0.42312789395)*x[1]
-        arg[0,1]=(0.435465800442)*x[0]**o+(0.66981866069)*x[0]+(-0.563664236008)*x[1]**o+(-0.979640187021)*x[1]
-        arg[0,2]=(0.761422556363)*x[0]**o+(-0.374824039734)*x[0]+(-0.258990622087)*x[1]**o+(-0.553555723801)*x[1]
-        arg[0,3]=(-0.346737956865)*x[0]**o+(-0.509820084012)*x[0]+(-0.270279814718)*x[1]**o+(-0.77787682055)*x[1]
-        arg[0,4]=(-0.607151504575)*x[0]**o+(0.0370061792286)*x[0]+(-0.597194755504)*x[1]**o+(0.463748874183)*x[1]
-        arg[1,0]=(-0.614871053235)*x[0]**o+(0.984151090349)*x[0]+(0.176558255935)*x[1]**o+(-0.00143697546002)*x[1]
-        arg[1,1]=(-0.678550535699)*x[0]**o+(-0.40068020768)*x[0]+(-0.73609233692)*x[1]**o+(0.204641737633)*x[1]
-        arg[1,2]=(0.644566611818)*x[0]**o+(0.676838663571)*x[0]+(0.592803079261)*x[1]**o+(-0.257851556005)*x[1]
-        arg[1,3]=(-0.811008507599)*x[0]**o+(-0.810627035248)*x[0]+(0.470993697001)*x[1]**o+(0.524157551045)*x[1]
-        arg[1,4]=(0.507989473752)*x[0]**o+(0.474629400564)*x[0]+(0.972372960952)*x[1]**o+(-0.713136826767)*x[1]
-        arg[2,0]=(-0.18215096122)*x[0]**o+(0.0926167766546)*x[0]+(-0.526818906453)*x[1]**o+(-0.169071065789)*x[1]
-        arg[2,1]=(-0.402265903759)*x[0]**o+(-0.460219787922)*x[0]+(0.160493468523)*x[1]**o+(-0.816631415356)*x[1]
-        arg[2,2]=(-0.826968582935)*x[0]**o+(-0.477060281375)*x[0]+(-0.753204398647)*x[1]**o+(0.340944419869)*x[1]
-        arg[2,3]=(-0.289758403392)*x[0]**o+(-0.216496476621)*x[0]+(-0.0729120551729)*x[1]**o+(0.0206397202194)*x[1]
-        arg[2,4]=(0.900190015504)*x[0]**o+(0.554334407718)*x[0]+(-0.188091500011)*x[1]**o+(-0.239344021421)*x[1]
-        arg[3,0]=(-0.846253042969)*x[0]**o+(0.212019924467)*x[0]+(-0.209309311993)*x[1]**o+(0.47889463943)*x[1]
-        arg[3,1]=(-0.796067196362)*x[0]**o+(0.570882191233)*x[0]+(0.789930258)*x[1]**o+(-0.687939656508)*x[1]
-        arg[3,2]=(0.0603011963958)*x[0]**o+(-0.291794860225)*x[0]+(-0.572598612637)*x[1]**o+(0.308585554728)*x[1]
-        arg[3,3]=(0.883976313141)*x[0]**o+(0.857027876956)*x[0]+(-0.991113135222)*x[1]**o+(-0.0649848727938)*x[1]
-        arg[3,4]=(-0.420604320052)*x[0]**o+(-0.147041915772)*x[0]+(0.696294525095)*x[1]**o+(-0.45791291995)*x[1]
-        ref[0,0]=(-0.469225177227)*x_ref[0]**o+(-0.312308556752)*x_ref[0]+(0.0207638302484)*x_ref[1]**o+(-0.42312789395)*x_ref[1]
-        ref[0,1]=(0.435465800442)*x_ref[0]**o+(0.66981866069)*x_ref[0]+(-0.563664236008)*x_ref[1]**o+(-0.979640187021)*x_ref[1]
-        ref[0,2]=(0.761422556363)*x_ref[0]**o+(-0.374824039734)*x_ref[0]+(-0.258990622087)*x_ref[1]**o+(-0.553555723801)*x_ref[1]
-        ref[0,3]=(-0.346737956865)*x_ref[0]**o+(-0.509820084012)*x_ref[0]+(-0.270279814718)*x_ref[1]**o+(-0.77787682055)*x_ref[1]
-        ref[0,4]=(-0.607151504575)*x_ref[0]**o+(0.0370061792286)*x_ref[0]+(-0.597194755504)*x_ref[1]**o+(0.463748874183)*x_ref[1]
-        ref[1,0]=(-0.614871053235)*x_ref[0]**o+(0.984151090349)*x_ref[0]+(0.176558255935)*x_ref[1]**o+(-0.00143697546002)*x_ref[1]
-        ref[1,1]=(-0.678550535699)*x_ref[0]**o+(-0.40068020768)*x_ref[0]+(-0.73609233692)*x_ref[1]**o+(0.204641737633)*x_ref[1]
-        ref[1,2]=(0.644566611818)*x_ref[0]**o+(0.676838663571)*x_ref[0]+(0.592803079261)*x_ref[1]**o+(-0.257851556005)*x_ref[1]
-        ref[1,3]=(-0.811008507599)*x_ref[0]**o+(-0.810627035248)*x_ref[0]+(0.470993697001)*x_ref[1]**o+(0.524157551045)*x_ref[1]
-        ref[1,4]=(0.507989473752)*x_ref[0]**o+(0.474629400564)*x_ref[0]+(0.972372960952)*x_ref[1]**o+(-0.713136826767)*x_ref[1]
-        ref[2,0]=(-0.18215096122)*x_ref[0]**o+(0.0926167766546)*x_ref[0]+(-0.526818906453)*x_ref[1]**o+(-0.169071065789)*x_ref[1]
-        ref[2,1]=(-0.402265903759)*x_ref[0]**o+(-0.460219787922)*x_ref[0]+(0.160493468523)*x_ref[1]**o+(-0.816631415356)*x_ref[1]
-        ref[2,2]=(-0.826968582935)*x_ref[0]**o+(-0.477060281375)*x_ref[0]+(-0.753204398647)*x_ref[1]**o+(0.340944419869)*x_ref[1]
-        ref[2,3]=(-0.289758403392)*x_ref[0]**o+(-0.216496476621)*x_ref[0]+(-0.0729120551729)*x_ref[1]**o+(0.0206397202194)*x_ref[1]
-        ref[2,4]=(0.900190015504)*x_ref[0]**o+(0.554334407718)*x_ref[0]+(-0.188091500011)*x_ref[1]**o+(-0.239344021421)*x_ref[1]
-        ref[3,0]=(-0.846253042969)*x_ref[0]**o+(0.212019924467)*x_ref[0]+(-0.209309311993)*x_ref[1]**o+(0.47889463943)*x_ref[1]
-        ref[3,1]=(-0.796067196362)*x_ref[0]**o+(0.570882191233)*x_ref[0]+(0.789930258)*x_ref[1]**o+(-0.687939656508)*x_ref[1]
-        ref[3,2]=(0.0603011963958)*x_ref[0]**o+(-0.291794860225)*x_ref[0]+(-0.572598612637)*x_ref[1]**o+(0.308585554728)*x_ref[1]
-        ref[3,3]=(0.883976313141)*x_ref[0]**o+(0.857027876956)*x_ref[0]+(-0.991113135222)*x_ref[1]**o+(-0.0649848727938)*x_ref[1]
-        ref[3,4]=(-0.420604320052)*x_ref[0]**o+(-0.147041915772)*x_ref[0]+(0.696294525095)*x_ref[1]**o+(-0.45791291995)*x_ref[1]
-      else:
-        arg[0,0]=(0.650989082369)*x[0]**o+(-0.291482513935)*x[0]+(-0.791203000903)*x[1]**o+(0.297385821221)*x[1]+(-0.169814832171)*x[2]**o+(-0.125360282254)*x[2]
-        arg[0,1]=(0.166614460758)*x[0]**o+(0.0840046062434)*x[0]+(-0.114646748006)*x[1]**o+(-0.872705089326)*x[1]+(-0.687707782796)*x[2]**o+(-0.230067474846)*x[2]
-        arg[0,2]=(-0.219927466535)*x[0]**o+(-0.466007112543)*x[0]+(-0.255341401047)*x[1]**o+(0.615864283673)*x[1]+(-0.983984041665)*x[2]**o+(0.305409617185)*x[2]
-        arg[0,3]=(-0.0879672823913)*x[0]**o+(-0.956382814278)*x[0]+(-0.3091322614)*x[1]**o+(0.147177613425)*x[1]+(-0.98911137256)*x[2]**o+(-0.750791857003)*x[2]
-        arg[0,4]=(0.715277956634)*x[0]**o+(-0.73358535985)*x[0]+(0.14587372226)*x[1]**o+(0.411467948058)*x[1]+(0.925673970492)*x[2]**o+(-0.0678728528684)*x[2]
-        arg[1,0]=(0.150067062674)*x[0]**o+(-0.522799232667)*x[0]+(-0.256261929148)*x[1]**o+(-0.316346866901)*x[1]+(-0.849523865324)*x[2]**o+(-0.585421363115)*x[2]
-        arg[1,1]=(-0.49684130662)*x[0]**o+(0.868986326423)*x[0]+(0.650641361203)*x[1]**o+(0.558696373611)*x[1]+(0.945790183046)*x[2]**o+(0.379250336542)*x[2]
-        arg[1,2]=(-0.67349806443)*x[0]**o+(-0.337586770393)*x[0]+(0.719579305241)*x[1]**o+(-0.300711356473)*x[1]+(-0.350130081791)*x[2]**o+(0.604354519926)*x[2]
-        arg[1,3]=(-0.242995155153)*x[0]**o+(0.668842006698)*x[0]+(-0.981902121891)*x[1]**o+(-0.358779020262)*x[1]+(0.298801927955)*x[2]**o+(-0.859807798836)*x[2]
-        arg[1,4]=(-0.248474519407)*x[0]**o+(-0.309793754496)*x[0]+(-0.967889559474)*x[1]**o+(0.541761608865)*x[1]+(0.573726565934)*x[2]**o+(-0.876387334383)*x[2]
-        arg[2,0]=(0.879662395476)*x[0]**o+(0.172656747739)*x[0]+(0.74129137412)*x[1]**o+(0.236748254611)*x[1]+(0.764805785803)*x[2]**o+(-0.257470519211)*x[2]
-        arg[2,1]=(0.44326363254)*x[0]**o+(0.121548286191)*x[0]+(0.605969252858)*x[1]**o+(0.261621973968)*x[1]+(-0.694403080782)*x[2]**o+(0.15039482013)*x[2]
-        arg[2,2]=(-0.372758098923)*x[0]**o+(0.577481130716)*x[0]+(-0.120284392247)*x[1]**o+(-0.630815000386)*x[1]+(-0.601595664522)*x[2]**o+(0.806894830983)*x[2]
-        arg[2,3]=(0.548413470095)*x[0]**o+(0.804535150265)*x[0]+(0.469766192947)*x[1]**o+(-0.796431483578)*x[1]+(0.434732585165)*x[2]**o+(-0.20040808975)*x[2]
-        arg[2,4]=(-0.119065000638)*x[0]**o+(-0.651948510575)*x[0]+(0.868418571224)*x[1]**o+(-0.987758488584)*x[1]+(0.495264099949)*x[2]**o+(-0.928684424484)*x[2]
-        arg[3,0]=(-0.712239839816)*x[0]**o+(0.90734601523)*x[0]+(0.901855037856)*x[1]**o+(0.773630983477)*x[1]+(0.599873877074)*x[2]**o+(-0.511864534352)*x[2]
-        arg[3,1]=(0.0499812109271)*x[0]**o+(0.959791265887)*x[0]+(0.861696669737)*x[1]**o+(-0.887520952646)*x[1]+(-0.609317719697)*x[2]**o+(-0.314327480839)*x[2]
-        arg[3,2]=(0.717930038261)*x[0]**o+(-0.480998377737)*x[0]+(0.890930499387)*x[1]**o+(-0.880493180277)*x[1]+(0.540792831261)*x[2]**o+(0.343985055993)*x[2]
-        arg[3,3]=(0.20531032325)*x[0]**o+(0.0400856366105)*x[0]+(0.829583965232)*x[1]**o+(0.701555952938)*x[1]+(0.676177356543)*x[2]**o+(0.934250384088)*x[2]
-        arg[3,4]=(-0.426083844591)*x[0]**o+(0.0732912754379)*x[0]+(0.555586413705)*x[1]**o+(0.379137165516)*x[1]+(-0.481638055369)*x[2]**o+(-0.156787271652)*x[2]
-        ref[0,0]=(0.650989082369)*x_ref[0]**o+(-0.291482513935)*x_ref[0]+(-0.791203000903)*x_ref[1]**o+(0.297385821221)*x_ref[1]+(-0.169814832171)*x_ref[2]**o+(-0.125360282254)*x_ref[2]
-        ref[0,1]=(0.166614460758)*x_ref[0]**o+(0.0840046062434)*x_ref[0]+(-0.114646748006)*x_ref[1]**o+(-0.872705089326)*x_ref[1]+(-0.687707782796)*x_ref[2]**o+(-0.230067474846)*x_ref[2]
-        ref[0,2]=(-0.219927466535)*x_ref[0]**o+(-0.466007112543)*x_ref[0]+(-0.255341401047)*x_ref[1]**o+(0.615864283673)*x_ref[1]+(-0.983984041665)*x_ref[2]**o+(0.305409617185)*x_ref[2]
-        ref[0,3]=(-0.0879672823913)*x_ref[0]**o+(-0.956382814278)*x_ref[0]+(-0.3091322614)*x_ref[1]**o+(0.147177613425)*x_ref[1]+(-0.98911137256)*x_ref[2]**o+(-0.750791857003)*x_ref[2]
-        ref[0,4]=(0.715277956634)*x_ref[0]**o+(-0.73358535985)*x_ref[0]+(0.14587372226)*x_ref[1]**o+(0.411467948058)*x_ref[1]+(0.925673970492)*x_ref[2]**o+(-0.0678728528684)*x_ref[2]
-        ref[1,0]=(0.150067062674)*x_ref[0]**o+(-0.522799232667)*x_ref[0]+(-0.256261929148)*x_ref[1]**o+(-0.316346866901)*x_ref[1]+(-0.849523865324)*x_ref[2]**o+(-0.585421363115)*x_ref[2]
-        ref[1,1]=(-0.49684130662)*x_ref[0]**o+(0.868986326423)*x_ref[0]+(0.650641361203)*x_ref[1]**o+(0.558696373611)*x_ref[1]+(0.945790183046)*x_ref[2]**o+(0.379250336542)*x_ref[2]
-        ref[1,2]=(-0.67349806443)*x_ref[0]**o+(-0.337586770393)*x_ref[0]+(0.719579305241)*x_ref[1]**o+(-0.300711356473)*x_ref[1]+(-0.350130081791)*x_ref[2]**o+(0.604354519926)*x_ref[2]
-        ref[1,3]=(-0.242995155153)*x_ref[0]**o+(0.668842006698)*x_ref[0]+(-0.981902121891)*x_ref[1]**o+(-0.358779020262)*x_ref[1]+(0.298801927955)*x_ref[2]**o+(-0.859807798836)*x_ref[2]
-        ref[1,4]=(-0.248474519407)*x_ref[0]**o+(-0.309793754496)*x_ref[0]+(-0.967889559474)*x_ref[1]**o+(0.541761608865)*x_ref[1]+(0.573726565934)*x_ref[2]**o+(-0.876387334383)*x_ref[2]
-        ref[2,0]=(0.879662395476)*x_ref[0]**o+(0.172656747739)*x_ref[0]+(0.74129137412)*x_ref[1]**o+(0.236748254611)*x_ref[1]+(0.764805785803)*x_ref[2]**o+(-0.257470519211)*x_ref[2]
-        ref[2,1]=(0.44326363254)*x_ref[0]**o+(0.121548286191)*x_ref[0]+(0.605969252858)*x_ref[1]**o+(0.261621973968)*x_ref[1]+(-0.694403080782)*x_ref[2]**o+(0.15039482013)*x_ref[2]
-        ref[2,2]=(-0.372758098923)*x_ref[0]**o+(0.577481130716)*x_ref[0]+(-0.120284392247)*x_ref[1]**o+(-0.630815000386)*x_ref[1]+(-0.601595664522)*x_ref[2]**o+(0.806894830983)*x_ref[2]
-        ref[2,3]=(0.548413470095)*x_ref[0]**o+(0.804535150265)*x_ref[0]+(0.469766192947)*x_ref[1]**o+(-0.796431483578)*x_ref[1]+(0.434732585165)*x_ref[2]**o+(-0.20040808975)*x_ref[2]
-        ref[2,4]=(-0.119065000638)*x_ref[0]**o+(-0.651948510575)*x_ref[0]+(0.868418571224)*x_ref[1]**o+(-0.987758488584)*x_ref[1]+(0.495264099949)*x_ref[2]**o+(-0.928684424484)*x_ref[2]
-        ref[3,0]=(-0.712239839816)*x_ref[0]**o+(0.90734601523)*x_ref[0]+(0.901855037856)*x_ref[1]**o+(0.773630983477)*x_ref[1]+(0.599873877074)*x_ref[2]**o+(-0.511864534352)*x_ref[2]
-        ref[3,1]=(0.0499812109271)*x_ref[0]**o+(0.959791265887)*x_ref[0]+(0.861696669737)*x_ref[1]**o+(-0.887520952646)*x_ref[1]+(-0.609317719697)*x_ref[2]**o+(-0.314327480839)*x_ref[2]
-        ref[3,2]=(0.717930038261)*x_ref[0]**o+(-0.480998377737)*x_ref[0]+(0.890930499387)*x_ref[1]**o+(-0.880493180277)*x_ref[1]+(0.540792831261)*x_ref[2]**o+(0.343985055993)*x_ref[2]
-        ref[3,3]=(0.20531032325)*x_ref[0]**o+(0.0400856366105)*x_ref[0]+(0.829583965232)*x_ref[1]**o+(0.701555952938)*x_ref[1]+(0.676177356543)*x_ref[2]**o+(0.934250384088)*x_ref[2]
-        ref[3,4]=(-0.426083844591)*x_ref[0]**o+(0.0732912754379)*x_ref[0]+(0.555586413705)*x_ref[1]**o+(0.379137165516)*x_ref[1]+(-0.481638055369)*x_ref[2]**o+(-0.156787271652)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.0451039988637)*x[0]**o+(0.159426346984)*x[0]+(0.693271264689)*x[1]**o+(-0.129057826038)*x[1]
-        arg[0,0,1]=(0.165096887432)*x[0]**o+(0.421267288474)*x[0]+(0.259248346979)*x[1]**o+(-0.216110688389)*x[1]
-        arg[0,1,0]=(-0.419500329289)*x[0]**o+(-0.516326782996)*x[0]+(-0.726209291778)*x[1]**o+(0.80434579811)*x[1]
-        arg[0,1,1]=(-0.680429758627)*x[0]**o+(-0.539365634112)*x[0]+(-0.20379891956)*x[1]**o+(-0.760436888151)*x[1]
-        arg[1,0,0]=(-0.472638888322)*x[0]**o+(0.982469790589)*x[0]+(-0.383590346736)*x[1]**o+(-0.69130786846)*x[1]
-        arg[1,0,1]=(0.334498522873)*x[0]**o+(0.190404359107)*x[0]+(0.210624993429)*x[1]**o+(-0.744921567562)*x[1]
-        arg[1,1,0]=(0.632591775382)*x[0]**o+(-0.405215541727)*x[0]+(-0.880471123936)*x[1]**o+(0.0942729925938)*x[1]
-        arg[1,1,1]=(-0.837885933046)*x[0]**o+(-0.798882152889)*x[0]+(0.648322104814)*x[1]**o+(-0.357620132856)*x[1]
-        arg[2,0,0]=(-0.490592533882)*x[0]**o+(0.540431305386)*x[0]+(-0.777299904284)*x[1]**o+(-0.308682146808)*x[1]
-        arg[2,0,1]=(0.971265898941)*x[0]**o+(0.546875456819)*x[0]+(0.627171799906)*x[1]**o+(0.0732789392684)*x[1]
-        arg[2,1,0]=(0.178076638358)*x[0]**o+(0.587800697151)*x[0]+(0.748336208169)*x[1]**o+(-0.0341258196613)*x[1]
-        arg[2,1,1]=(0.36345594982)*x[0]**o+(-0.899402201831)*x[0]+(0.0206286665096)*x[1]**o+(0.303557722727)*x[1]
-        arg[3,0,0]=(-0.544119125777)*x[0]**o+(-0.805891689123)*x[0]+(-0.687902925271)*x[1]**o+(0.346236636736)*x[1]
-        arg[3,0,1]=(0.725902084271)*x[0]**o+(0.605461404125)*x[0]+(0.452767036006)*x[1]**o+(0.266584718883)*x[1]
-        arg[3,1,0]=(0.322052654392)*x[0]**o+(-0.91949636775)*x[0]+(0.948097272559)*x[1]**o+(-0.463715765101)*x[1]
-        arg[3,1,1]=(-0.369192142232)*x[0]**o+(0.616001201865)*x[0]+(-0.257989673651)*x[1]**o+(0.507550625249)*x[1]
-        arg[4,0,0]=(0.270343836597)*x[0]**o+(0.851686984957)*x[0]+(0.838756000051)*x[1]**o+(-0.329625536762)*x[1]
-        arg[4,0,1]=(0.00026238459417)*x[0]**o+(0.0274581707442)*x[0]+(0.770120998708)*x[1]**o+(0.574619799143)*x[1]
-        arg[4,1,0]=(-0.709788768284)*x[0]**o+(0.0856634157603)*x[0]+(-0.294662391976)*x[1]**o+(-0.90639308515)*x[1]
-        arg[4,1,1]=(0.223381811001)*x[0]**o+(0.941451590223)*x[0]+(0.917865807171)*x[1]**o+(0.912972271206)*x[1]
-        arg[5,0,0]=(-0.731163054411)*x[0]**o+(0.185548632151)*x[0]+(0.907527980776)*x[1]**o+(0.816017248525)*x[1]
-        arg[5,0,1]=(0.719177781335)*x[0]**o+(-0.788006096642)*x[0]+(-0.434802402615)*x[1]**o+(0.0249465251663)*x[1]
-        arg[5,1,0]=(0.982421863977)*x[0]**o+(0.127223012805)*x[0]+(-0.858491508817)*x[1]**o+(-0.152253965468)*x[1]
-        arg[5,1,1]=(-0.779596616421)*x[0]**o+(0.049815217296)*x[0]+(0.892121656728)*x[1]**o+(0.258587664554)*x[1]
-        ref[0,0,0]=(0.0451039988637)*x_ref[0]**o+(0.159426346984)*x_ref[0]+(0.693271264689)*x_ref[1]**o+(-0.129057826038)*x_ref[1]
-        ref[0,0,1]=(0.165096887432)*x_ref[0]**o+(0.421267288474)*x_ref[0]+(0.259248346979)*x_ref[1]**o+(-0.216110688389)*x_ref[1]
-        ref[0,1,0]=(-0.419500329289)*x_ref[0]**o+(-0.516326782996)*x_ref[0]+(-0.726209291778)*x_ref[1]**o+(0.80434579811)*x_ref[1]
-        ref[0,1,1]=(-0.680429758627)*x_ref[0]**o+(-0.539365634112)*x_ref[0]+(-0.20379891956)*x_ref[1]**o+(-0.760436888151)*x_ref[1]
-        ref[1,0,0]=(-0.472638888322)*x_ref[0]**o+(0.982469790589)*x_ref[0]+(-0.383590346736)*x_ref[1]**o+(-0.69130786846)*x_ref[1]
-        ref[1,0,1]=(0.334498522873)*x_ref[0]**o+(0.190404359107)*x_ref[0]+(0.210624993429)*x_ref[1]**o+(-0.744921567562)*x_ref[1]
-        ref[1,1,0]=(0.632591775382)*x_ref[0]**o+(-0.405215541727)*x_ref[0]+(-0.880471123936)*x_ref[1]**o+(0.0942729925938)*x_ref[1]
-        ref[1,1,1]=(-0.837885933046)*x_ref[0]**o+(-0.798882152889)*x_ref[0]+(0.648322104814)*x_ref[1]**o+(-0.357620132856)*x_ref[1]
-        ref[2,0,0]=(-0.490592533882)*x_ref[0]**o+(0.540431305386)*x_ref[0]+(-0.777299904284)*x_ref[1]**o+(-0.308682146808)*x_ref[1]
-        ref[2,0,1]=(0.971265898941)*x_ref[0]**o+(0.546875456819)*x_ref[0]+(0.627171799906)*x_ref[1]**o+(0.0732789392684)*x_ref[1]
-        ref[2,1,0]=(0.178076638358)*x_ref[0]**o+(0.587800697151)*x_ref[0]+(0.748336208169)*x_ref[1]**o+(-0.0341258196613)*x_ref[1]
-        ref[2,1,1]=(0.36345594982)*x_ref[0]**o+(-0.899402201831)*x_ref[0]+(0.0206286665096)*x_ref[1]**o+(0.303557722727)*x_ref[1]
-        ref[3,0,0]=(-0.544119125777)*x_ref[0]**o+(-0.805891689123)*x_ref[0]+(-0.687902925271)*x_ref[1]**o+(0.346236636736)*x_ref[1]
-        ref[3,0,1]=(0.725902084271)*x_ref[0]**o+(0.605461404125)*x_ref[0]+(0.452767036006)*x_ref[1]**o+(0.266584718883)*x_ref[1]
-        ref[3,1,0]=(0.322052654392)*x_ref[0]**o+(-0.91949636775)*x_ref[0]+(0.948097272559)*x_ref[1]**o+(-0.463715765101)*x_ref[1]
-        ref[3,1,1]=(-0.369192142232)*x_ref[0]**o+(0.616001201865)*x_ref[0]+(-0.257989673651)*x_ref[1]**o+(0.507550625249)*x_ref[1]
-        ref[4,0,0]=(0.270343836597)*x_ref[0]**o+(0.851686984957)*x_ref[0]+(0.838756000051)*x_ref[1]**o+(-0.329625536762)*x_ref[1]
-        ref[4,0,1]=(0.00026238459417)*x_ref[0]**o+(0.0274581707442)*x_ref[0]+(0.770120998708)*x_ref[1]**o+(0.574619799143)*x_ref[1]
-        ref[4,1,0]=(-0.709788768284)*x_ref[0]**o+(0.0856634157603)*x_ref[0]+(-0.294662391976)*x_ref[1]**o+(-0.90639308515)*x_ref[1]
-        ref[4,1,1]=(0.223381811001)*x_ref[0]**o+(0.941451590223)*x_ref[0]+(0.917865807171)*x_ref[1]**o+(0.912972271206)*x_ref[1]
-        ref[5,0,0]=(-0.731163054411)*x_ref[0]**o+(0.185548632151)*x_ref[0]+(0.907527980776)*x_ref[1]**o+(0.816017248525)*x_ref[1]
-        ref[5,0,1]=(0.719177781335)*x_ref[0]**o+(-0.788006096642)*x_ref[0]+(-0.434802402615)*x_ref[1]**o+(0.0249465251663)*x_ref[1]
-        ref[5,1,0]=(0.982421863977)*x_ref[0]**o+(0.127223012805)*x_ref[0]+(-0.858491508817)*x_ref[1]**o+(-0.152253965468)*x_ref[1]
-        ref[5,1,1]=(-0.779596616421)*x_ref[0]**o+(0.049815217296)*x_ref[0]+(0.892121656728)*x_ref[1]**o+(0.258587664554)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.804406156662)*x[0]**o+(0.304298949556)*x[0]+(-9.23949223481e-05)*x[1]**o+(0.521245437597)*x[1]+(0.822885620595)*x[2]**o+(0.44472437921)*x[2]
-        arg[0,0,1]=(0.208119461011)*x[0]**o+(-0.967847500694)*x[0]+(-0.182961335156)*x[1]**o+(-0.0510538508635)*x[1]+(0.932285255322)*x[2]**o+(-0.463525963095)*x[2]
-        arg[0,1,0]=(-0.0514207812926)*x[0]**o+(-0.730723672364)*x[0]+(-0.471144684451)*x[1]**o+(0.0359308791998)*x[1]+(-0.935079157697)*x[2]**o+(0.841965819816)*x[2]
-        arg[0,1,1]=(0.607427052267)*x[0]**o+(-0.344216102016)*x[0]+(0.967271353509)*x[1]**o+(-0.412288382331)*x[1]+(-0.0716617724983)*x[2]**o+(0.56895080823)*x[2]
-        arg[1,0,0]=(-0.574314769591)*x[0]**o+(-0.819434106932)*x[0]+(0.143229095273)*x[1]**o+(0.505343958082)*x[1]+(0.497764227469)*x[2]**o+(0.592609757968)*x[2]
-        arg[1,0,1]=(0.414984900558)*x[0]**o+(0.624574053857)*x[0]+(-0.367330776954)*x[1]**o+(-0.30093924896)*x[1]+(-0.99416380749)*x[2]**o+(0.492443599924)*x[2]
-        arg[1,1,0]=(0.171673119954)*x[0]**o+(0.612986140068)*x[0]+(-0.671355907363)*x[1]**o+(-0.292080539973)*x[1]+(-0.450890819125)*x[2]**o+(-0.64742047997)*x[2]
-        arg[1,1,1]=(0.452494887295)*x[0]**o+(0.187308285528)*x[0]+(-0.995316825981)*x[1]**o+(-0.825194018202)*x[1]+(-0.00651224511881)*x[2]**o+(-0.715747547803)*x[2]
-        arg[2,0,0]=(0.546297169466)*x[0]**o+(-0.424626884041)*x[0]+(0.327647062351)*x[1]**o+(-0.050651105527)*x[1]+(-0.667117310429)*x[2]**o+(-0.37659304263)*x[2]
-        arg[2,0,1]=(-0.323595958622)*x[0]**o+(0.541718593289)*x[0]+(0.6285998056)*x[1]**o+(0.488539567593)*x[1]+(0.983086232412)*x[2]**o+(0.692821558469)*x[2]
-        arg[2,1,0]=(0.16009856161)*x[0]**o+(-0.776069988482)*x[0]+(0.750717144319)*x[1]**o+(-0.244287895989)*x[1]+(0.345242766297)*x[2]**o+(0.572063651895)*x[2]
-        arg[2,1,1]=(-0.34626843638)*x[0]**o+(0.197125033681)*x[0]+(-0.570015603866)*x[1]**o+(-0.633161422872)*x[1]+(-0.602998606808)*x[2]**o+(-0.674829268895)*x[2]
-        arg[3,0,0]=(-0.659696747189)*x[0]**o+(-0.571128578512)*x[0]+(-0.704414117225)*x[1]**o+(-0.334924171135)*x[1]+(-0.0200665796175)*x[2]**o+(-0.660688341854)*x[2]
-        arg[3,0,1]=(-0.497019087713)*x[0]**o+(0.25850813993)*x[0]+(-0.713426904693)*x[1]**o+(-0.994061006282)*x[1]+(-0.669422282701)*x[2]**o+(-0.553981025574)*x[2]
-        arg[3,1,0]=(-0.151249618276)*x[0]**o+(0.29432574729)*x[0]+(0.173047919293)*x[1]**o+(0.844456199843)*x[1]+(0.845402272715)*x[2]**o+(-0.115698924822)*x[2]
-        arg[3,1,1]=(0.840440627264)*x[0]**o+(0.593400475213)*x[0]+(0.974677794562)*x[1]**o+(0.938845603167)*x[1]+(-0.944730436891)*x[2]**o+(-0.657543633218)*x[2]
-        arg[4,0,0]=(0.968290161629)*x[0]**o+(0.578471458995)*x[0]+(0.946558149029)*x[1]**o+(-0.232692317459)*x[1]+(-0.97762469848)*x[2]**o+(0.660519364613)*x[2]
-        arg[4,0,1]=(-0.187317070761)*x[0]**o+(-0.0363170179961)*x[0]+(0.278499613269)*x[1]**o+(-0.0685831047696)*x[1]+(-0.540282212359)*x[2]**o+(0.564656560066)*x[2]
-        arg[4,1,0]=(-0.211825530749)*x[0]**o+(0.225546568724)*x[0]+(-0.83241974026)*x[1]**o+(-0.503828393954)*x[1]+(-0.635937384108)*x[2]**o+(-0.513183062177)*x[2]
-        arg[4,1,1]=(-0.257123983215)*x[0]**o+(-0.0700924567638)*x[0]+(0.550859393713)*x[1]**o+(0.132070212001)*x[1]+(-0.478549332853)*x[2]**o+(-0.560087260102)*x[2]
-        arg[5,0,0]=(0.677259763344)*x[0]**o+(-0.213422444013)*x[0]+(-0.294112138735)*x[1]**o+(0.083135232348)*x[1]+(-0.899953896237)*x[2]**o+(-0.117143433064)*x[2]
-        arg[5,0,1]=(-0.489822592306)*x[0]**o+(0.368217759904)*x[0]+(-0.927837261915)*x[1]**o+(-0.708243327427)*x[1]+(-0.132256551163)*x[2]**o+(0.316204052014)*x[2]
-        arg[5,1,0]=(0.314897334392)*x[0]**o+(-0.848168680639)*x[0]+(0.92421318346)*x[1]**o+(0.995505186786)*x[1]+(0.372381949158)*x[2]**o+(-0.563415970977)*x[2]
-        arg[5,1,1]=(0.745011483885)*x[0]**o+(-0.6423283108)*x[0]+(-0.119592965986)*x[1]**o+(0.241068250891)*x[1]+(0.477172198315)*x[2]**o+(-0.468580220406)*x[2]
-        ref[0,0,0]=(0.804406156662)*x_ref[0]**o+(0.304298949556)*x_ref[0]+(-9.23949223481e-05)*x_ref[1]**o+(0.521245437597)*x_ref[1]+(0.822885620595)*x_ref[2]**o+(0.44472437921)*x_ref[2]
-        ref[0,0,1]=(0.208119461011)*x_ref[0]**o+(-0.967847500694)*x_ref[0]+(-0.182961335156)*x_ref[1]**o+(-0.0510538508635)*x_ref[1]+(0.932285255322)*x_ref[2]**o+(-0.463525963095)*x_ref[2]
-        ref[0,1,0]=(-0.0514207812926)*x_ref[0]**o+(-0.730723672364)*x_ref[0]+(-0.471144684451)*x_ref[1]**o+(0.0359308791998)*x_ref[1]+(-0.935079157697)*x_ref[2]**o+(0.841965819816)*x_ref[2]
-        ref[0,1,1]=(0.607427052267)*x_ref[0]**o+(-0.344216102016)*x_ref[0]+(0.967271353509)*x_ref[1]**o+(-0.412288382331)*x_ref[1]+(-0.0716617724983)*x_ref[2]**o+(0.56895080823)*x_ref[2]
-        ref[1,0,0]=(-0.574314769591)*x_ref[0]**o+(-0.819434106932)*x_ref[0]+(0.143229095273)*x_ref[1]**o+(0.505343958082)*x_ref[1]+(0.497764227469)*x_ref[2]**o+(0.592609757968)*x_ref[2]
-        ref[1,0,1]=(0.414984900558)*x_ref[0]**o+(0.624574053857)*x_ref[0]+(-0.367330776954)*x_ref[1]**o+(-0.30093924896)*x_ref[1]+(-0.99416380749)*x_ref[2]**o+(0.492443599924)*x_ref[2]
-        ref[1,1,0]=(0.171673119954)*x_ref[0]**o+(0.612986140068)*x_ref[0]+(-0.671355907363)*x_ref[1]**o+(-0.292080539973)*x_ref[1]+(-0.450890819125)*x_ref[2]**o+(-0.64742047997)*x_ref[2]
-        ref[1,1,1]=(0.452494887295)*x_ref[0]**o+(0.187308285528)*x_ref[0]+(-0.995316825981)*x_ref[1]**o+(-0.825194018202)*x_ref[1]+(-0.00651224511881)*x_ref[2]**o+(-0.715747547803)*x_ref[2]
-        ref[2,0,0]=(0.546297169466)*x_ref[0]**o+(-0.424626884041)*x_ref[0]+(0.327647062351)*x_ref[1]**o+(-0.050651105527)*x_ref[1]+(-0.667117310429)*x_ref[2]**o+(-0.37659304263)*x_ref[2]
-        ref[2,0,1]=(-0.323595958622)*x_ref[0]**o+(0.541718593289)*x_ref[0]+(0.6285998056)*x_ref[1]**o+(0.488539567593)*x_ref[1]+(0.983086232412)*x_ref[2]**o+(0.692821558469)*x_ref[2]
-        ref[2,1,0]=(0.16009856161)*x_ref[0]**o+(-0.776069988482)*x_ref[0]+(0.750717144319)*x_ref[1]**o+(-0.244287895989)*x_ref[1]+(0.345242766297)*x_ref[2]**o+(0.572063651895)*x_ref[2]
-        ref[2,1,1]=(-0.34626843638)*x_ref[0]**o+(0.197125033681)*x_ref[0]+(-0.570015603866)*x_ref[1]**o+(-0.633161422872)*x_ref[1]+(-0.602998606808)*x_ref[2]**o+(-0.674829268895)*x_ref[2]
-        ref[3,0,0]=(-0.659696747189)*x_ref[0]**o+(-0.571128578512)*x_ref[0]+(-0.704414117225)*x_ref[1]**o+(-0.334924171135)*x_ref[1]+(-0.0200665796175)*x_ref[2]**o+(-0.660688341854)*x_ref[2]
-        ref[3,0,1]=(-0.497019087713)*x_ref[0]**o+(0.25850813993)*x_ref[0]+(-0.713426904693)*x_ref[1]**o+(-0.994061006282)*x_ref[1]+(-0.669422282701)*x_ref[2]**o+(-0.553981025574)*x_ref[2]
-        ref[3,1,0]=(-0.151249618276)*x_ref[0]**o+(0.29432574729)*x_ref[0]+(0.173047919293)*x_ref[1]**o+(0.844456199843)*x_ref[1]+(0.845402272715)*x_ref[2]**o+(-0.115698924822)*x_ref[2]
-        ref[3,1,1]=(0.840440627264)*x_ref[0]**o+(0.593400475213)*x_ref[0]+(0.974677794562)*x_ref[1]**o+(0.938845603167)*x_ref[1]+(-0.944730436891)*x_ref[2]**o+(-0.657543633218)*x_ref[2]
-        ref[4,0,0]=(0.968290161629)*x_ref[0]**o+(0.578471458995)*x_ref[0]+(0.946558149029)*x_ref[1]**o+(-0.232692317459)*x_ref[1]+(-0.97762469848)*x_ref[2]**o+(0.660519364613)*x_ref[2]
-        ref[4,0,1]=(-0.187317070761)*x_ref[0]**o+(-0.0363170179961)*x_ref[0]+(0.278499613269)*x_ref[1]**o+(-0.0685831047696)*x_ref[1]+(-0.540282212359)*x_ref[2]**o+(0.564656560066)*x_ref[2]
-        ref[4,1,0]=(-0.211825530749)*x_ref[0]**o+(0.225546568724)*x_ref[0]+(-0.83241974026)*x_ref[1]**o+(-0.503828393954)*x_ref[1]+(-0.635937384108)*x_ref[2]**o+(-0.513183062177)*x_ref[2]
-        ref[4,1,1]=(-0.257123983215)*x_ref[0]**o+(-0.0700924567638)*x_ref[0]+(0.550859393713)*x_ref[1]**o+(0.132070212001)*x_ref[1]+(-0.478549332853)*x_ref[2]**o+(-0.560087260102)*x_ref[2]
-        ref[5,0,0]=(0.677259763344)*x_ref[0]**o+(-0.213422444013)*x_ref[0]+(-0.294112138735)*x_ref[1]**o+(0.083135232348)*x_ref[1]+(-0.899953896237)*x_ref[2]**o+(-0.117143433064)*x_ref[2]
-        ref[5,0,1]=(-0.489822592306)*x_ref[0]**o+(0.368217759904)*x_ref[0]+(-0.927837261915)*x_ref[1]**o+(-0.708243327427)*x_ref[1]+(-0.132256551163)*x_ref[2]**o+(0.316204052014)*x_ref[2]
-        ref[5,1,0]=(0.314897334392)*x_ref[0]**o+(-0.848168680639)*x_ref[0]+(0.92421318346)*x_ref[1]**o+(0.995505186786)*x_ref[1]+(0.372381949158)*x_ref[2]**o+(-0.563415970977)*x_ref[2]
-        ref[5,1,1]=(0.745011483885)*x_ref[0]**o+(-0.6423283108)*x_ref[0]+(-0.119592965986)*x_ref[1]**o+(0.241068250891)*x_ref[1]+(0.477172198315)*x_ref[2]**o+(-0.468580220406)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.633576516648)*x[0]**o+(0.77399256211)*x[0]+(-0.396696417195)*x[1]**o+(-0.604572540725)*x[1]
-        arg[0,0,0,1]=(0.612672991978)*x[0]**o+(-0.331012302611)*x[0]+(0.885533578235)*x[1]**o+(0.334686818058)*x[1]
-        arg[0,0,1,0]=(-0.982701069025)*x[0]**o+(0.467849033642)*x[0]+(0.525392773375)*x[1]**o+(0.355622324425)*x[1]
-        arg[0,0,1,1]=(-0.0243671469666)*x[0]**o+(0.790044842383)*x[0]+(0.413384172033)*x[1]**o+(0.740805135968)*x[1]
-        arg[0,0,2,0]=(0.0384789957691)*x[0]**o+(-0.317009899417)*x[0]+(0.0389710369615)*x[1]**o+(0.784549852598)*x[1]
-        arg[0,0,2,1]=(0.361832259252)*x[0]**o+(0.410815792944)*x[0]+(0.39496145831)*x[1]**o+(-0.820784143964)*x[1]
-        arg[0,1,0,0]=(0.224261088976)*x[0]**o+(-0.824694527256)*x[0]+(0.318674472135)*x[1]**o+(0.827696354338)*x[1]
-        arg[0,1,0,1]=(-0.442154901359)*x[0]**o+(0.141775320862)*x[0]+(0.688711841268)*x[1]**o+(-0.27047542755)*x[1]
-        arg[0,1,1,0]=(-0.570125802019)*x[0]**o+(0.050303762895)*x[0]+(-0.972329837417)*x[1]**o+(0.143700303765)*x[1]
-        arg[0,1,1,1]=(0.852888550499)*x[0]**o+(-0.51216090329)*x[0]+(-0.895663922335)*x[1]**o+(-0.183466225547)*x[1]
-        arg[0,1,2,0]=(0.863840920739)*x[0]**o+(-0.247789353524)*x[0]+(0.63056436157)*x[1]**o+(0.932522589942)*x[1]
-        arg[0,1,2,1]=(-0.403832121794)*x[0]**o+(-0.769625259789)*x[0]+(0.507724303191)*x[1]**o+(0.314178775526)*x[1]
-        arg[0,2,0,0]=(0.543867153515)*x[0]**o+(-0.414107817028)*x[0]+(0.423922720842)*x[1]**o+(0.166632407916)*x[1]
-        arg[0,2,0,1]=(0.731968209929)*x[0]**o+(-0.114742736683)*x[0]+(0.112562415021)*x[1]**o+(0.166924480325)*x[1]
-        arg[0,2,1,0]=(0.919472066242)*x[0]**o+(0.560565315205)*x[0]+(0.4967650028)*x[1]**o+(0.708376671625)*x[1]
-        arg[0,2,1,1]=(0.147500239739)*x[0]**o+(-0.632670389919)*x[0]+(-0.992479063437)*x[1]**o+(0.258941122962)*x[1]
-        arg[0,2,2,0]=(0.474481785329)*x[0]**o+(0.592902604094)*x[0]+(0.64058685211)*x[1]**o+(-0.477843307901)*x[1]
-        arg[0,2,2,1]=(0.769898355146)*x[0]**o+(0.563458279487)*x[0]+(0.876276425449)*x[1]**o+(-0.0625727749869)*x[1]
-        arg[0,3,0,0]=(-0.330055037059)*x[0]**o+(-0.727656105163)*x[0]+(-0.559901684392)*x[1]**o+(-0.433646878263)*x[1]
-        arg[0,3,0,1]=(-0.725314328666)*x[0]**o+(0.638326609105)*x[0]+(-0.126619368417)*x[1]**o+(-0.232194758676)*x[1]
-        arg[0,3,1,0]=(0.318096005545)*x[0]**o+(0.325247494289)*x[0]+(-0.514305253643)*x[1]**o+(0.108523350086)*x[1]
-        arg[0,3,1,1]=(0.298034894956)*x[0]**o+(0.825714393651)*x[0]+(-0.67162850079)*x[1]**o+(0.681809083004)*x[1]
-        arg[0,3,2,0]=(-0.00715890582648)*x[0]**o+(0.893900731227)*x[0]+(-0.773710274545)*x[1]**o+(0.415913728569)*x[1]
-        arg[0,3,2,1]=(0.0853551940958)*x[0]**o+(-0.228876011127)*x[0]+(0.87699456762)*x[1]**o+(-0.744605229253)*x[1]
-        arg[0,4,0,0]=(0.942646937302)*x[0]**o+(0.92717236759)*x[0]+(0.794806821569)*x[1]**o+(0.848766303526)*x[1]
-        arg[0,4,0,1]=(0.20140672561)*x[0]**o+(0.974490372414)*x[0]+(-0.450332419587)*x[1]**o+(-0.859102184782)*x[1]
-        arg[0,4,1,0]=(0.632153053193)*x[0]**o+(0.702336756277)*x[0]+(-0.571496076236)*x[1]**o+(-0.882472852219)*x[1]
-        arg[0,4,1,1]=(0.366452829499)*x[0]**o+(-0.514660164741)*x[0]+(-0.152794832253)*x[1]**o+(-0.658688117796)*x[1]
-        arg[0,4,2,0]=(0.406218394702)*x[0]**o+(0.782359698198)*x[0]+(-0.0582499587562)*x[1]**o+(0.664506852595)*x[1]
-        arg[0,4,2,1]=(0.768240870343)*x[0]**o+(0.188470592904)*x[0]+(0.855933509171)*x[1]**o+(0.639174087541)*x[1]
-        arg[1,0,0,0]=(-0.946841398046)*x[0]**o+(0.892729256183)*x[0]+(-0.15644094115)*x[1]**o+(-0.859371368233)*x[1]
-        arg[1,0,0,1]=(0.238113647666)*x[0]**o+(0.173695470467)*x[0]+(-0.753529252313)*x[1]**o+(-0.243203902463)*x[1]
-        arg[1,0,1,0]=(0.267937523443)*x[0]**o+(0.600200492374)*x[0]+(0.442653529257)*x[1]**o+(-0.394984210541)*x[1]
-        arg[1,0,1,1]=(-0.495022907622)*x[0]**o+(-0.593273808093)*x[0]+(0.888764746608)*x[1]**o+(-0.745127825763)*x[1]
-        arg[1,0,2,0]=(0.352827238496)*x[0]**o+(0.293200928839)*x[0]+(-0.00369812109034)*x[1]**o+(0.478875774193)*x[1]
-        arg[1,0,2,1]=(-0.403358878981)*x[0]**o+(0.756947364667)*x[0]+(0.649335795039)*x[1]**o+(-0.339962796859)*x[1]
-        arg[1,1,0,0]=(-0.607505349015)*x[0]**o+(-0.392535399582)*x[0]+(0.799782389634)*x[1]**o+(0.186339165863)*x[1]
-        arg[1,1,0,1]=(0.997492304627)*x[0]**o+(-0.281456622581)*x[0]+(-0.959294693613)*x[1]**o+(-0.454812606674)*x[1]
-        arg[1,1,1,0]=(0.454682037549)*x[0]**o+(0.797129935647)*x[0]+(-0.949539573053)*x[1]**o+(-0.918499382199)*x[1]
-        arg[1,1,1,1]=(0.903016449758)*x[0]**o+(-0.575039046836)*x[0]+(0.957158277074)*x[1]**o+(-0.715797460906)*x[1]
-        arg[1,1,2,0]=(0.92005547899)*x[0]**o+(-0.716975919302)*x[0]+(-0.900904311708)*x[1]**o+(0.989458809643)*x[1]
-        arg[1,1,2,1]=(-0.633214991087)*x[0]**o+(0.680658578627)*x[0]+(0.552194054556)*x[1]**o+(0.343557072769)*x[1]
-        arg[1,2,0,0]=(-0.0182903530463)*x[0]**o+(-0.0445569497267)*x[0]+(-0.259920069365)*x[1]**o+(0.118765787279)*x[1]
-        arg[1,2,0,1]=(-0.667382174733)*x[0]**o+(-0.79898800024)*x[0]+(-0.217638556567)*x[1]**o+(-0.0288504127936)*x[1]
-        arg[1,2,1,0]=(-0.437982445862)*x[0]**o+(-0.104054454808)*x[0]+(0.711429718088)*x[1]**o+(-0.607226296329)*x[1]
-        arg[1,2,1,1]=(0.252861218037)*x[0]**o+(-0.635701456504)*x[0]+(-0.555222304592)*x[1]**o+(0.723744010092)*x[1]
-        arg[1,2,2,0]=(-0.73532710885)*x[0]**o+(0.600599078741)*x[0]+(0.0465795173194)*x[1]**o+(0.524165544645)*x[1]
-        arg[1,2,2,1]=(-0.025246019744)*x[0]**o+(-0.376526675619)*x[0]+(0.213011788698)*x[1]**o+(-0.477018225777)*x[1]
-        arg[1,3,0,0]=(-0.52682690957)*x[0]**o+(0.0567472858499)*x[0]+(0.574116256102)*x[1]**o+(-0.130012791898)*x[1]
-        arg[1,3,0,1]=(0.113502182936)*x[0]**o+(0.7643861313)*x[0]+(0.48414948847)*x[1]**o+(0.863168250318)*x[1]
-        arg[1,3,1,0]=(-0.208102162378)*x[0]**o+(0.327770728981)*x[0]+(0.843778895278)*x[1]**o+(0.474843504177)*x[1]
-        arg[1,3,1,1]=(-0.549818192184)*x[0]**o+(-0.863333816685)*x[0]+(-0.365631583957)*x[1]**o+(-0.491320441182)*x[1]
-        arg[1,3,2,0]=(-0.265833845759)*x[0]**o+(-0.94416746081)*x[0]+(0.48465442593)*x[1]**o+(0.258284621408)*x[1]
-        arg[1,3,2,1]=(-0.625716082268)*x[0]**o+(-0.234697130359)*x[0]+(-0.973704406131)*x[1]**o+(0.00141746117847)*x[1]
-        arg[1,4,0,0]=(0.565044361964)*x[0]**o+(-0.0672474991748)*x[0]+(-0.125901930524)*x[1]**o+(-0.753103899732)*x[1]
-        arg[1,4,0,1]=(-0.979743467289)*x[0]**o+(-0.25225085214)*x[0]+(-0.141635164635)*x[1]**o+(0.378153168667)*x[1]
-        arg[1,4,1,0]=(0.97728399206)*x[0]**o+(-0.202043160532)*x[0]+(0.997445424954)*x[1]**o+(-0.100049830154)*x[1]
-        arg[1,4,1,1]=(0.364840105486)*x[0]**o+(-0.682234327437)*x[0]+(0.252584592259)*x[1]**o+(-0.0785430242425)*x[1]
-        arg[1,4,2,0]=(-0.0168764722616)*x[0]**o+(-0.997460139026)*x[0]+(0.560548548912)*x[1]**o+(0.220532224022)*x[1]
-        arg[1,4,2,1]=(0.307927943715)*x[0]**o+(0.496390872708)*x[0]+(0.982750813274)*x[1]**o+(0.392968327778)*x[1]
-        arg[2,0,0,0]=(0.645991188948)*x[0]**o+(0.104035822886)*x[0]+(0.18285829097)*x[1]**o+(0.51186286294)*x[1]
-        arg[2,0,0,1]=(-0.996971717318)*x[0]**o+(0.126488047141)*x[0]+(0.123585312562)*x[1]**o+(-0.775854123529)*x[1]
-        arg[2,0,1,0]=(-0.0258590124655)*x[0]**o+(0.0079454735671)*x[0]+(-0.42819024422)*x[1]**o+(0.12377360967)*x[1]
-        arg[2,0,1,1]=(0.990441351225)*x[0]**o+(-0.453806376472)*x[0]+(0.134316618645)*x[1]**o+(-0.902666953282)*x[1]
-        arg[2,0,2,0]=(0.149304385108)*x[0]**o+(-0.226132046999)*x[0]+(0.647186106203)*x[1]**o+(-0.269247029225)*x[1]
-        arg[2,0,2,1]=(-0.159068164422)*x[0]**o+(-0.392275577366)*x[0]+(0.131423093404)*x[1]**o+(-0.353311282658)*x[1]
-        arg[2,1,0,0]=(-0.2862918681)*x[0]**o+(-0.392264098939)*x[0]+(-0.344033237285)*x[1]**o+(0.644261713963)*x[1]
-        arg[2,1,0,1]=(0.398022911658)*x[0]**o+(-0.84552546032)*x[0]+(-0.823861260943)*x[1]**o+(0.739994988755)*x[1]
-        arg[2,1,1,0]=(-0.696854341234)*x[0]**o+(-0.810851183298)*x[0]+(-0.712182042896)*x[1]**o+(0.594887691783)*x[1]
-        arg[2,1,1,1]=(-0.182583840117)*x[0]**o+(0.962594377088)*x[0]+(-0.0157575661453)*x[1]**o+(-0.432167995007)*x[1]
-        arg[2,1,2,0]=(0.293029196216)*x[0]**o+(0.46839918212)*x[0]+(0.262375931577)*x[1]**o+(0.0348536956306)*x[1]
-        arg[2,1,2,1]=(0.775632135095)*x[0]**o+(-0.874598534107)*x[0]+(0.711602976736)*x[1]**o+(0.37065543293)*x[1]
-        arg[2,2,0,0]=(-0.103625214158)*x[0]**o+(0.553558117877)*x[0]+(-0.0522465477589)*x[1]**o+(-0.747139195529)*x[1]
-        arg[2,2,0,1]=(0.507427663615)*x[0]**o+(-0.536361186134)*x[0]+(0.809054726193)*x[1]**o+(-0.979546347794)*x[1]
-        arg[2,2,1,0]=(0.786210623833)*x[0]**o+(0.244510127091)*x[0]+(0.159799334111)*x[1]**o+(0.0499263839273)*x[1]
-        arg[2,2,1,1]=(0.454205244371)*x[0]**o+(-0.650927822092)*x[0]+(-0.939252656087)*x[1]**o+(-0.894014755314)*x[1]
-        arg[2,2,2,0]=(-0.829617920904)*x[0]**o+(0.764070900994)*x[0]+(0.972419443556)*x[1]**o+(-0.824913543157)*x[1]
-        arg[2,2,2,1]=(0.694310748478)*x[0]**o+(-0.191413364091)*x[0]+(0.588258464472)*x[1]**o+(0.743973223755)*x[1]
-        arg[2,3,0,0]=(-0.588397365184)*x[0]**o+(-0.634207034861)*x[0]+(0.0853498555546)*x[1]**o+(0.559933556865)*x[1]
-        arg[2,3,0,1]=(0.626829165689)*x[0]**o+(0.942185296616)*x[0]+(0.0360770405565)*x[1]**o+(0.635966218547)*x[1]
-        arg[2,3,1,0]=(-0.0103526873852)*x[0]**o+(0.546330663496)*x[0]+(0.799224103454)*x[1]**o+(0.791922324897)*x[1]
-        arg[2,3,1,1]=(0.921564474495)*x[0]**o+(-0.420410835144)*x[0]+(-0.20482503843)*x[1]**o+(-0.483331643037)*x[1]
-        arg[2,3,2,0]=(-0.903600870314)*x[0]**o+(0.901956716274)*x[0]+(-0.113926342023)*x[1]**o+(-0.061596184768)*x[1]
-        arg[2,3,2,1]=(0.653250267262)*x[0]**o+(-0.13770933726)*x[0]+(-0.0791563636079)*x[1]**o+(-0.578313150893)*x[1]
-        arg[2,4,0,0]=(0.993903405725)*x[0]**o+(0.694324226249)*x[0]+(0.203872883541)*x[1]**o+(-0.526880767264)*x[1]
-        arg[2,4,0,1]=(0.0120058513647)*x[0]**o+(0.00907603337269)*x[0]+(0.0247958601677)*x[1]**o+(-0.996916120875)*x[1]
-        arg[2,4,1,0]=(0.281518049478)*x[0]**o+(0.0773799323777)*x[0]+(-0.968565098773)*x[1]**o+(-0.275558076229)*x[1]
-        arg[2,4,1,1]=(0.565275744757)*x[0]**o+(0.978636675869)*x[0]+(-0.352951657751)*x[1]**o+(-0.54170487914)*x[1]
-        arg[2,4,2,0]=(-0.571207550678)*x[0]**o+(0.196754283318)*x[0]+(0.665558917127)*x[1]**o+(0.361915269355)*x[1]
-        arg[2,4,2,1]=(0.54579191885)*x[0]**o+(0.798319371798)*x[0]+(0.961669996133)*x[1]**o+(-0.549305529342)*x[1]
-        arg[3,0,0,0]=(0.264064946121)*x[0]**o+(-0.314396185593)*x[0]+(-0.017492206135)*x[1]**o+(0.190513393091)*x[1]
-        arg[3,0,0,1]=(0.812213666919)*x[0]**o+(-0.757919357489)*x[0]+(0.294829087285)*x[1]**o+(0.916181101963)*x[1]
-        arg[3,0,1,0]=(-0.529906091574)*x[0]**o+(0.553682716765)*x[0]+(-0.693177625995)*x[1]**o+(0.377145561683)*x[1]
-        arg[3,0,1,1]=(-0.298942248169)*x[0]**o+(0.876878593705)*x[0]+(-0.609807982832)*x[1]**o+(-0.574954919539)*x[1]
-        arg[3,0,2,0]=(-0.729324018245)*x[0]**o+(-0.495194565254)*x[0]+(-0.616162751356)*x[1]**o+(0.878549207376)*x[1]
-        arg[3,0,2,1]=(0.625373988248)*x[0]**o+(0.106736108396)*x[0]+(-0.871225833944)*x[1]**o+(0.840614493429)*x[1]
-        arg[3,1,0,0]=(-0.90880839589)*x[0]**o+(0.390298288126)*x[0]+(0.446872042362)*x[1]**o+(-0.0703294219415)*x[1]
-        arg[3,1,0,1]=(-0.0706115592617)*x[0]**o+(-0.158386152093)*x[0]+(-0.687459181052)*x[1]**o+(-0.251170026598)*x[1]
-        arg[3,1,1,0]=(-0.286907297081)*x[0]**o+(0.185480985579)*x[0]+(-0.49763263834)*x[1]**o+(-0.773056048642)*x[1]
-        arg[3,1,1,1]=(-0.849572703562)*x[0]**o+(0.481739532516)*x[0]+(-0.227573063955)*x[1]**o+(-0.282367611381)*x[1]
-        arg[3,1,2,0]=(-0.524975224603)*x[0]**o+(-0.795450756917)*x[0]+(-0.656865716441)*x[1]**o+(-0.0166902340102)*x[1]
-        arg[3,1,2,1]=(-0.297441818145)*x[0]**o+(-0.726759852457)*x[0]+(0.146859888138)*x[1]**o+(-0.73690394554)*x[1]
-        arg[3,2,0,0]=(-0.278794538596)*x[0]**o+(-0.463428732496)*x[0]+(-0.478500378607)*x[1]**o+(0.806643392698)*x[1]
-        arg[3,2,0,1]=(0.573853299578)*x[0]**o+(-0.324830388013)*x[0]+(-0.185528736416)*x[1]**o+(0.444228024864)*x[1]
-        arg[3,2,1,0]=(0.686054084195)*x[0]**o+(-0.914380567743)*x[0]+(0.751959744445)*x[1]**o+(0.531759675659)*x[1]
-        arg[3,2,1,1]=(-0.876330263589)*x[0]**o+(0.566155144894)*x[0]+(-0.0233988901429)*x[1]**o+(0.42480184987)*x[1]
-        arg[3,2,2,0]=(0.957053098936)*x[0]**o+(0.152292007141)*x[0]+(0.332521504492)*x[1]**o+(-0.289068173241)*x[1]
-        arg[3,2,2,1]=(0.923170924493)*x[0]**o+(0.191154526504)*x[0]+(0.647848811717)*x[1]**o+(0.72509033544)*x[1]
-        arg[3,3,0,0]=(0.388829993841)*x[0]**o+(0.243404004988)*x[0]+(-0.0313000323506)*x[1]**o+(0.558135056894)*x[1]
-        arg[3,3,0,1]=(-0.784568790167)*x[0]**o+(0.742074534256)*x[0]+(-0.624869261724)*x[1]**o+(-0.412100194843)*x[1]
-        arg[3,3,1,0]=(0.924173486785)*x[0]**o+(-0.966635363007)*x[0]+(0.395550623492)*x[1]**o+(0.469204722173)*x[1]
-        arg[3,3,1,1]=(-0.842963105645)*x[0]**o+(0.685039360106)*x[0]+(0.279605123662)*x[1]**o+(-0.953092961091)*x[1]
-        arg[3,3,2,0]=(0.598860382403)*x[0]**o+(-0.226413712435)*x[0]+(0.722250410625)*x[1]**o+(-0.944980469407)*x[1]
-        arg[3,3,2,1]=(0.787289357927)*x[0]**o+(-0.270737247579)*x[0]+(-0.134351386793)*x[1]**o+(-0.0437387143766)*x[1]
-        arg[3,4,0,0]=(-0.0601939617429)*x[0]**o+(-0.212346121247)*x[0]+(0.0137510326612)*x[1]**o+(0.749376479477)*x[1]
-        arg[3,4,0,1]=(-0.515391847891)*x[0]**o+(-0.191867157458)*x[0]+(0.0883438399597)*x[1]**o+(-0.155095894625)*x[1]
-        arg[3,4,1,0]=(0.172678225476)*x[0]**o+(-0.917390756059)*x[0]+(-0.498696112089)*x[1]**o+(-0.267655707135)*x[1]
-        arg[3,4,1,1]=(-0.498294994476)*x[0]**o+(-0.301078252047)*x[0]+(0.100215523329)*x[1]**o+(-0.424039854141)*x[1]
-        arg[3,4,2,0]=(0.904127003142)*x[0]**o+(-0.70704194874)*x[0]+(0.309638449466)*x[1]**o+(-0.290894515899)*x[1]
-        arg[3,4,2,1]=(-0.924994398191)*x[0]**o+(0.624996423224)*x[0]+(0.461586866277)*x[1]**o+(-0.499709859121)*x[1]
-        ref[0,0,0,0]=(-0.633576516648)*x_ref[0]**o+(0.77399256211)*x_ref[0]+(-0.396696417195)*x_ref[1]**o+(-0.604572540725)*x_ref[1]
-        ref[0,0,0,1]=(0.612672991978)*x_ref[0]**o+(-0.331012302611)*x_ref[0]+(0.885533578235)*x_ref[1]**o+(0.334686818058)*x_ref[1]
-        ref[0,0,1,0]=(-0.982701069025)*x_ref[0]**o+(0.467849033642)*x_ref[0]+(0.525392773375)*x_ref[1]**o+(0.355622324425)*x_ref[1]
-        ref[0,0,1,1]=(-0.0243671469666)*x_ref[0]**o+(0.790044842383)*x_ref[0]+(0.413384172033)*x_ref[1]**o+(0.740805135968)*x_ref[1]
-        ref[0,0,2,0]=(0.0384789957691)*x_ref[0]**o+(-0.317009899417)*x_ref[0]+(0.0389710369615)*x_ref[1]**o+(0.784549852598)*x_ref[1]
-        ref[0,0,2,1]=(0.361832259252)*x_ref[0]**o+(0.410815792944)*x_ref[0]+(0.39496145831)*x_ref[1]**o+(-0.820784143964)*x_ref[1]
-        ref[0,1,0,0]=(0.224261088976)*x_ref[0]**o+(-0.824694527256)*x_ref[0]+(0.318674472135)*x_ref[1]**o+(0.827696354338)*x_ref[1]
-        ref[0,1,0,1]=(-0.442154901359)*x_ref[0]**o+(0.141775320862)*x_ref[0]+(0.688711841268)*x_ref[1]**o+(-0.27047542755)*x_ref[1]
-        ref[0,1,1,0]=(-0.570125802019)*x_ref[0]**o+(0.050303762895)*x_ref[0]+(-0.972329837417)*x_ref[1]**o+(0.143700303765)*x_ref[1]
-        ref[0,1,1,1]=(0.852888550499)*x_ref[0]**o+(-0.51216090329)*x_ref[0]+(-0.895663922335)*x_ref[1]**o+(-0.183466225547)*x_ref[1]
-        ref[0,1,2,0]=(0.863840920739)*x_ref[0]**o+(-0.247789353524)*x_ref[0]+(0.63056436157)*x_ref[1]**o+(0.932522589942)*x_ref[1]
-        ref[0,1,2,1]=(-0.403832121794)*x_ref[0]**o+(-0.769625259789)*x_ref[0]+(0.507724303191)*x_ref[1]**o+(0.314178775526)*x_ref[1]
-        ref[0,2,0,0]=(0.543867153515)*x_ref[0]**o+(-0.414107817028)*x_ref[0]+(0.423922720842)*x_ref[1]**o+(0.166632407916)*x_ref[1]
-        ref[0,2,0,1]=(0.731968209929)*x_ref[0]**o+(-0.114742736683)*x_ref[0]+(0.112562415021)*x_ref[1]**o+(0.166924480325)*x_ref[1]
-        ref[0,2,1,0]=(0.919472066242)*x_ref[0]**o+(0.560565315205)*x_ref[0]+(0.4967650028)*x_ref[1]**o+(0.708376671625)*x_ref[1]
-        ref[0,2,1,1]=(0.147500239739)*x_ref[0]**o+(-0.632670389919)*x_ref[0]+(-0.992479063437)*x_ref[1]**o+(0.258941122962)*x_ref[1]
-        ref[0,2,2,0]=(0.474481785329)*x_ref[0]**o+(0.592902604094)*x_ref[0]+(0.64058685211)*x_ref[1]**o+(-0.477843307901)*x_ref[1]
-        ref[0,2,2,1]=(0.769898355146)*x_ref[0]**o+(0.563458279487)*x_ref[0]+(0.876276425449)*x_ref[1]**o+(-0.0625727749869)*x_ref[1]
-        ref[0,3,0,0]=(-0.330055037059)*x_ref[0]**o+(-0.727656105163)*x_ref[0]+(-0.559901684392)*x_ref[1]**o+(-0.433646878263)*x_ref[1]
-        ref[0,3,0,1]=(-0.725314328666)*x_ref[0]**o+(0.638326609105)*x_ref[0]+(-0.126619368417)*x_ref[1]**o+(-0.232194758676)*x_ref[1]
-        ref[0,3,1,0]=(0.318096005545)*x_ref[0]**o+(0.325247494289)*x_ref[0]+(-0.514305253643)*x_ref[1]**o+(0.108523350086)*x_ref[1]
-        ref[0,3,1,1]=(0.298034894956)*x_ref[0]**o+(0.825714393651)*x_ref[0]+(-0.67162850079)*x_ref[1]**o+(0.681809083004)*x_ref[1]
-        ref[0,3,2,0]=(-0.00715890582648)*x_ref[0]**o+(0.893900731227)*x_ref[0]+(-0.773710274545)*x_ref[1]**o+(0.415913728569)*x_ref[1]
-        ref[0,3,2,1]=(0.0853551940958)*x_ref[0]**o+(-0.228876011127)*x_ref[0]+(0.87699456762)*x_ref[1]**o+(-0.744605229253)*x_ref[1]
-        ref[0,4,0,0]=(0.942646937302)*x_ref[0]**o+(0.92717236759)*x_ref[0]+(0.794806821569)*x_ref[1]**o+(0.848766303526)*x_ref[1]
-        ref[0,4,0,1]=(0.20140672561)*x_ref[0]**o+(0.974490372414)*x_ref[0]+(-0.450332419587)*x_ref[1]**o+(-0.859102184782)*x_ref[1]
-        ref[0,4,1,0]=(0.632153053193)*x_ref[0]**o+(0.702336756277)*x_ref[0]+(-0.571496076236)*x_ref[1]**o+(-0.882472852219)*x_ref[1]
-        ref[0,4,1,1]=(0.366452829499)*x_ref[0]**o+(-0.514660164741)*x_ref[0]+(-0.152794832253)*x_ref[1]**o+(-0.658688117796)*x_ref[1]
-        ref[0,4,2,0]=(0.406218394702)*x_ref[0]**o+(0.782359698198)*x_ref[0]+(-0.0582499587562)*x_ref[1]**o+(0.664506852595)*x_ref[1]
-        ref[0,4,2,1]=(0.768240870343)*x_ref[0]**o+(0.188470592904)*x_ref[0]+(0.855933509171)*x_ref[1]**o+(0.639174087541)*x_ref[1]
-        ref[1,0,0,0]=(-0.946841398046)*x_ref[0]**o+(0.892729256183)*x_ref[0]+(-0.15644094115)*x_ref[1]**o+(-0.859371368233)*x_ref[1]
-        ref[1,0,0,1]=(0.238113647666)*x_ref[0]**o+(0.173695470467)*x_ref[0]+(-0.753529252313)*x_ref[1]**o+(-0.243203902463)*x_ref[1]
-        ref[1,0,1,0]=(0.267937523443)*x_ref[0]**o+(0.600200492374)*x_ref[0]+(0.442653529257)*x_ref[1]**o+(-0.394984210541)*x_ref[1]
-        ref[1,0,1,1]=(-0.495022907622)*x_ref[0]**o+(-0.593273808093)*x_ref[0]+(0.888764746608)*x_ref[1]**o+(-0.745127825763)*x_ref[1]
-        ref[1,0,2,0]=(0.352827238496)*x_ref[0]**o+(0.293200928839)*x_ref[0]+(-0.00369812109034)*x_ref[1]**o+(0.478875774193)*x_ref[1]
-        ref[1,0,2,1]=(-0.403358878981)*x_ref[0]**o+(0.756947364667)*x_ref[0]+(0.649335795039)*x_ref[1]**o+(-0.339962796859)*x_ref[1]
-        ref[1,1,0,0]=(-0.607505349015)*x_ref[0]**o+(-0.392535399582)*x_ref[0]+(0.799782389634)*x_ref[1]**o+(0.186339165863)*x_ref[1]
-        ref[1,1,0,1]=(0.997492304627)*x_ref[0]**o+(-0.281456622581)*x_ref[0]+(-0.959294693613)*x_ref[1]**o+(-0.454812606674)*x_ref[1]
-        ref[1,1,1,0]=(0.454682037549)*x_ref[0]**o+(0.797129935647)*x_ref[0]+(-0.949539573053)*x_ref[1]**o+(-0.918499382199)*x_ref[1]
-        ref[1,1,1,1]=(0.903016449758)*x_ref[0]**o+(-0.575039046836)*x_ref[0]+(0.957158277074)*x_ref[1]**o+(-0.715797460906)*x_ref[1]
-        ref[1,1,2,0]=(0.92005547899)*x_ref[0]**o+(-0.716975919302)*x_ref[0]+(-0.900904311708)*x_ref[1]**o+(0.989458809643)*x_ref[1]
-        ref[1,1,2,1]=(-0.633214991087)*x_ref[0]**o+(0.680658578627)*x_ref[0]+(0.552194054556)*x_ref[1]**o+(0.343557072769)*x_ref[1]
-        ref[1,2,0,0]=(-0.0182903530463)*x_ref[0]**o+(-0.0445569497267)*x_ref[0]+(-0.259920069365)*x_ref[1]**o+(0.118765787279)*x_ref[1]
-        ref[1,2,0,1]=(-0.667382174733)*x_ref[0]**o+(-0.79898800024)*x_ref[0]+(-0.217638556567)*x_ref[1]**o+(-0.0288504127936)*x_ref[1]
-        ref[1,2,1,0]=(-0.437982445862)*x_ref[0]**o+(-0.104054454808)*x_ref[0]+(0.711429718088)*x_ref[1]**o+(-0.607226296329)*x_ref[1]
-        ref[1,2,1,1]=(0.252861218037)*x_ref[0]**o+(-0.635701456504)*x_ref[0]+(-0.555222304592)*x_ref[1]**o+(0.723744010092)*x_ref[1]
-        ref[1,2,2,0]=(-0.73532710885)*x_ref[0]**o+(0.600599078741)*x_ref[0]+(0.0465795173194)*x_ref[1]**o+(0.524165544645)*x_ref[1]
-        ref[1,2,2,1]=(-0.025246019744)*x_ref[0]**o+(-0.376526675619)*x_ref[0]+(0.213011788698)*x_ref[1]**o+(-0.477018225777)*x_ref[1]
-        ref[1,3,0,0]=(-0.52682690957)*x_ref[0]**o+(0.0567472858499)*x_ref[0]+(0.574116256102)*x_ref[1]**o+(-0.130012791898)*x_ref[1]
-        ref[1,3,0,1]=(0.113502182936)*x_ref[0]**o+(0.7643861313)*x_ref[0]+(0.48414948847)*x_ref[1]**o+(0.863168250318)*x_ref[1]
-        ref[1,3,1,0]=(-0.208102162378)*x_ref[0]**o+(0.327770728981)*x_ref[0]+(0.843778895278)*x_ref[1]**o+(0.474843504177)*x_ref[1]
-        ref[1,3,1,1]=(-0.549818192184)*x_ref[0]**o+(-0.863333816685)*x_ref[0]+(-0.365631583957)*x_ref[1]**o+(-0.491320441182)*x_ref[1]
-        ref[1,3,2,0]=(-0.265833845759)*x_ref[0]**o+(-0.94416746081)*x_ref[0]+(0.48465442593)*x_ref[1]**o+(0.258284621408)*x_ref[1]
-        ref[1,3,2,1]=(-0.625716082268)*x_ref[0]**o+(-0.234697130359)*x_ref[0]+(-0.973704406131)*x_ref[1]**o+(0.00141746117847)*x_ref[1]
-        ref[1,4,0,0]=(0.565044361964)*x_ref[0]**o+(-0.0672474991748)*x_ref[0]+(-0.125901930524)*x_ref[1]**o+(-0.753103899732)*x_ref[1]
-        ref[1,4,0,1]=(-0.979743467289)*x_ref[0]**o+(-0.25225085214)*x_ref[0]+(-0.141635164635)*x_ref[1]**o+(0.378153168667)*x_ref[1]
-        ref[1,4,1,0]=(0.97728399206)*x_ref[0]**o+(-0.202043160532)*x_ref[0]+(0.997445424954)*x_ref[1]**o+(-0.100049830154)*x_ref[1]
-        ref[1,4,1,1]=(0.364840105486)*x_ref[0]**o+(-0.682234327437)*x_ref[0]+(0.252584592259)*x_ref[1]**o+(-0.0785430242425)*x_ref[1]
-        ref[1,4,2,0]=(-0.0168764722616)*x_ref[0]**o+(-0.997460139026)*x_ref[0]+(0.560548548912)*x_ref[1]**o+(0.220532224022)*x_ref[1]
-        ref[1,4,2,1]=(0.307927943715)*x_ref[0]**o+(0.496390872708)*x_ref[0]+(0.982750813274)*x_ref[1]**o+(0.392968327778)*x_ref[1]
-        ref[2,0,0,0]=(0.645991188948)*x_ref[0]**o+(0.104035822886)*x_ref[0]+(0.18285829097)*x_ref[1]**o+(0.51186286294)*x_ref[1]
-        ref[2,0,0,1]=(-0.996971717318)*x_ref[0]**o+(0.126488047141)*x_ref[0]+(0.123585312562)*x_ref[1]**o+(-0.775854123529)*x_ref[1]
-        ref[2,0,1,0]=(-0.0258590124655)*x_ref[0]**o+(0.0079454735671)*x_ref[0]+(-0.42819024422)*x_ref[1]**o+(0.12377360967)*x_ref[1]
-        ref[2,0,1,1]=(0.990441351225)*x_ref[0]**o+(-0.453806376472)*x_ref[0]+(0.134316618645)*x_ref[1]**o+(-0.902666953282)*x_ref[1]
-        ref[2,0,2,0]=(0.149304385108)*x_ref[0]**o+(-0.226132046999)*x_ref[0]+(0.647186106203)*x_ref[1]**o+(-0.269247029225)*x_ref[1]
-        ref[2,0,2,1]=(-0.159068164422)*x_ref[0]**o+(-0.392275577366)*x_ref[0]+(0.131423093404)*x_ref[1]**o+(-0.353311282658)*x_ref[1]
-        ref[2,1,0,0]=(-0.2862918681)*x_ref[0]**o+(-0.392264098939)*x_ref[0]+(-0.344033237285)*x_ref[1]**o+(0.644261713963)*x_ref[1]
-        ref[2,1,0,1]=(0.398022911658)*x_ref[0]**o+(-0.84552546032)*x_ref[0]+(-0.823861260943)*x_ref[1]**o+(0.739994988755)*x_ref[1]
-        ref[2,1,1,0]=(-0.696854341234)*x_ref[0]**o+(-0.810851183298)*x_ref[0]+(-0.712182042896)*x_ref[1]**o+(0.594887691783)*x_ref[1]
-        ref[2,1,1,1]=(-0.182583840117)*x_ref[0]**o+(0.962594377088)*x_ref[0]+(-0.0157575661453)*x_ref[1]**o+(-0.432167995007)*x_ref[1]
-        ref[2,1,2,0]=(0.293029196216)*x_ref[0]**o+(0.46839918212)*x_ref[0]+(0.262375931577)*x_ref[1]**o+(0.0348536956306)*x_ref[1]
-        ref[2,1,2,1]=(0.775632135095)*x_ref[0]**o+(-0.874598534107)*x_ref[0]+(0.711602976736)*x_ref[1]**o+(0.37065543293)*x_ref[1]
-        ref[2,2,0,0]=(-0.103625214158)*x_ref[0]**o+(0.553558117877)*x_ref[0]+(-0.0522465477589)*x_ref[1]**o+(-0.747139195529)*x_ref[1]
-        ref[2,2,0,1]=(0.507427663615)*x_ref[0]**o+(-0.536361186134)*x_ref[0]+(0.809054726193)*x_ref[1]**o+(-0.979546347794)*x_ref[1]
-        ref[2,2,1,0]=(0.786210623833)*x_ref[0]**o+(0.244510127091)*x_ref[0]+(0.159799334111)*x_ref[1]**o+(0.0499263839273)*x_ref[1]
-        ref[2,2,1,1]=(0.454205244371)*x_ref[0]**o+(-0.650927822092)*x_ref[0]+(-0.939252656087)*x_ref[1]**o+(-0.894014755314)*x_ref[1]
-        ref[2,2,2,0]=(-0.829617920904)*x_ref[0]**o+(0.764070900994)*x_ref[0]+(0.972419443556)*x_ref[1]**o+(-0.824913543157)*x_ref[1]
-        ref[2,2,2,1]=(0.694310748478)*x_ref[0]**o+(-0.191413364091)*x_ref[0]+(0.588258464472)*x_ref[1]**o+(0.743973223755)*x_ref[1]
-        ref[2,3,0,0]=(-0.588397365184)*x_ref[0]**o+(-0.634207034861)*x_ref[0]+(0.0853498555546)*x_ref[1]**o+(0.559933556865)*x_ref[1]
-        ref[2,3,0,1]=(0.626829165689)*x_ref[0]**o+(0.942185296616)*x_ref[0]+(0.0360770405565)*x_ref[1]**o+(0.635966218547)*x_ref[1]
-        ref[2,3,1,0]=(-0.0103526873852)*x_ref[0]**o+(0.546330663496)*x_ref[0]+(0.799224103454)*x_ref[1]**o+(0.791922324897)*x_ref[1]
-        ref[2,3,1,1]=(0.921564474495)*x_ref[0]**o+(-0.420410835144)*x_ref[0]+(-0.20482503843)*x_ref[1]**o+(-0.483331643037)*x_ref[1]
-        ref[2,3,2,0]=(-0.903600870314)*x_ref[0]**o+(0.901956716274)*x_ref[0]+(-0.113926342023)*x_ref[1]**o+(-0.061596184768)*x_ref[1]
-        ref[2,3,2,1]=(0.653250267262)*x_ref[0]**o+(-0.13770933726)*x_ref[0]+(-0.0791563636079)*x_ref[1]**o+(-0.578313150893)*x_ref[1]
-        ref[2,4,0,0]=(0.993903405725)*x_ref[0]**o+(0.694324226249)*x_ref[0]+(0.203872883541)*x_ref[1]**o+(-0.526880767264)*x_ref[1]
-        ref[2,4,0,1]=(0.0120058513647)*x_ref[0]**o+(0.00907603337269)*x_ref[0]+(0.0247958601677)*x_ref[1]**o+(-0.996916120875)*x_ref[1]
-        ref[2,4,1,0]=(0.281518049478)*x_ref[0]**o+(0.0773799323777)*x_ref[0]+(-0.968565098773)*x_ref[1]**o+(-0.275558076229)*x_ref[1]
-        ref[2,4,1,1]=(0.565275744757)*x_ref[0]**o+(0.978636675869)*x_ref[0]+(-0.352951657751)*x_ref[1]**o+(-0.54170487914)*x_ref[1]
-        ref[2,4,2,0]=(-0.571207550678)*x_ref[0]**o+(0.196754283318)*x_ref[0]+(0.665558917127)*x_ref[1]**o+(0.361915269355)*x_ref[1]
-        ref[2,4,2,1]=(0.54579191885)*x_ref[0]**o+(0.798319371798)*x_ref[0]+(0.961669996133)*x_ref[1]**o+(-0.549305529342)*x_ref[1]
-        ref[3,0,0,0]=(0.264064946121)*x_ref[0]**o+(-0.314396185593)*x_ref[0]+(-0.017492206135)*x_ref[1]**o+(0.190513393091)*x_ref[1]
-        ref[3,0,0,1]=(0.812213666919)*x_ref[0]**o+(-0.757919357489)*x_ref[0]+(0.294829087285)*x_ref[1]**o+(0.916181101963)*x_ref[1]
-        ref[3,0,1,0]=(-0.529906091574)*x_ref[0]**o+(0.553682716765)*x_ref[0]+(-0.693177625995)*x_ref[1]**o+(0.377145561683)*x_ref[1]
-        ref[3,0,1,1]=(-0.298942248169)*x_ref[0]**o+(0.876878593705)*x_ref[0]+(-0.609807982832)*x_ref[1]**o+(-0.574954919539)*x_ref[1]
-        ref[3,0,2,0]=(-0.729324018245)*x_ref[0]**o+(-0.495194565254)*x_ref[0]+(-0.616162751356)*x_ref[1]**o+(0.878549207376)*x_ref[1]
-        ref[3,0,2,1]=(0.625373988248)*x_ref[0]**o+(0.106736108396)*x_ref[0]+(-0.871225833944)*x_ref[1]**o+(0.840614493429)*x_ref[1]
-        ref[3,1,0,0]=(-0.90880839589)*x_ref[0]**o+(0.390298288126)*x_ref[0]+(0.446872042362)*x_ref[1]**o+(-0.0703294219415)*x_ref[1]
-        ref[3,1,0,1]=(-0.0706115592617)*x_ref[0]**o+(-0.158386152093)*x_ref[0]+(-0.687459181052)*x_ref[1]**o+(-0.251170026598)*x_ref[1]
-        ref[3,1,1,0]=(-0.286907297081)*x_ref[0]**o+(0.185480985579)*x_ref[0]+(-0.49763263834)*x_ref[1]**o+(-0.773056048642)*x_ref[1]
-        ref[3,1,1,1]=(-0.849572703562)*x_ref[0]**o+(0.481739532516)*x_ref[0]+(-0.227573063955)*x_ref[1]**o+(-0.282367611381)*x_ref[1]
-        ref[3,1,2,0]=(-0.524975224603)*x_ref[0]**o+(-0.795450756917)*x_ref[0]+(-0.656865716441)*x_ref[1]**o+(-0.0166902340102)*x_ref[1]
-        ref[3,1,2,1]=(-0.297441818145)*x_ref[0]**o+(-0.726759852457)*x_ref[0]+(0.146859888138)*x_ref[1]**o+(-0.73690394554)*x_ref[1]
-        ref[3,2,0,0]=(-0.278794538596)*x_ref[0]**o+(-0.463428732496)*x_ref[0]+(-0.478500378607)*x_ref[1]**o+(0.806643392698)*x_ref[1]
-        ref[3,2,0,1]=(0.573853299578)*x_ref[0]**o+(-0.324830388013)*x_ref[0]+(-0.185528736416)*x_ref[1]**o+(0.444228024864)*x_ref[1]
-        ref[3,2,1,0]=(0.686054084195)*x_ref[0]**o+(-0.914380567743)*x_ref[0]+(0.751959744445)*x_ref[1]**o+(0.531759675659)*x_ref[1]
-        ref[3,2,1,1]=(-0.876330263589)*x_ref[0]**o+(0.566155144894)*x_ref[0]+(-0.0233988901429)*x_ref[1]**o+(0.42480184987)*x_ref[1]
-        ref[3,2,2,0]=(0.957053098936)*x_ref[0]**o+(0.152292007141)*x_ref[0]+(0.332521504492)*x_ref[1]**o+(-0.289068173241)*x_ref[1]
-        ref[3,2,2,1]=(0.923170924493)*x_ref[0]**o+(0.191154526504)*x_ref[0]+(0.647848811717)*x_ref[1]**o+(0.72509033544)*x_ref[1]
-        ref[3,3,0,0]=(0.388829993841)*x_ref[0]**o+(0.243404004988)*x_ref[0]+(-0.0313000323506)*x_ref[1]**o+(0.558135056894)*x_ref[1]
-        ref[3,3,0,1]=(-0.784568790167)*x_ref[0]**o+(0.742074534256)*x_ref[0]+(-0.624869261724)*x_ref[1]**o+(-0.412100194843)*x_ref[1]
-        ref[3,3,1,0]=(0.924173486785)*x_ref[0]**o+(-0.966635363007)*x_ref[0]+(0.395550623492)*x_ref[1]**o+(0.469204722173)*x_ref[1]
-        ref[3,3,1,1]=(-0.842963105645)*x_ref[0]**o+(0.685039360106)*x_ref[0]+(0.279605123662)*x_ref[1]**o+(-0.953092961091)*x_ref[1]
-        ref[3,3,2,0]=(0.598860382403)*x_ref[0]**o+(-0.226413712435)*x_ref[0]+(0.722250410625)*x_ref[1]**o+(-0.944980469407)*x_ref[1]
-        ref[3,3,2,1]=(0.787289357927)*x_ref[0]**o+(-0.270737247579)*x_ref[0]+(-0.134351386793)*x_ref[1]**o+(-0.0437387143766)*x_ref[1]
-        ref[3,4,0,0]=(-0.0601939617429)*x_ref[0]**o+(-0.212346121247)*x_ref[0]+(0.0137510326612)*x_ref[1]**o+(0.749376479477)*x_ref[1]
-        ref[3,4,0,1]=(-0.515391847891)*x_ref[0]**o+(-0.191867157458)*x_ref[0]+(0.0883438399597)*x_ref[1]**o+(-0.155095894625)*x_ref[1]
-        ref[3,4,1,0]=(0.172678225476)*x_ref[0]**o+(-0.917390756059)*x_ref[0]+(-0.498696112089)*x_ref[1]**o+(-0.267655707135)*x_ref[1]
-        ref[3,4,1,1]=(-0.498294994476)*x_ref[0]**o+(-0.301078252047)*x_ref[0]+(0.100215523329)*x_ref[1]**o+(-0.424039854141)*x_ref[1]
-        ref[3,4,2,0]=(0.904127003142)*x_ref[0]**o+(-0.70704194874)*x_ref[0]+(0.309638449466)*x_ref[1]**o+(-0.290894515899)*x_ref[1]
-        ref[3,4,2,1]=(-0.924994398191)*x_ref[0]**o+(0.624996423224)*x_ref[0]+(0.461586866277)*x_ref[1]**o+(-0.499709859121)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.0998996137438)*x[0]**o+(-0.648495171588)*x[0]+(-0.836177837758)*x[1]**o+(-0.9597381047)*x[1]+(-0.958069967907)*x[2]**o+(0.399097251753)*x[2]
-        arg[0,0,0,1]=(0.625409406207)*x[0]**o+(-0.522476054218)*x[0]+(0.794724584797)*x[1]**o+(-0.450875661781)*x[1]+(-0.189505729613)*x[2]**o+(0.0910808218379)*x[2]
-        arg[0,0,1,0]=(-0.36073198549)*x[0]**o+(-0.0286144078107)*x[0]+(-0.53827851785)*x[1]**o+(-0.563600303848)*x[1]+(0.970211345168)*x[2]**o+(-0.405253675856)*x[2]
-        arg[0,0,1,1]=(-0.0204302558323)*x[0]**o+(0.927570053009)*x[0]+(-0.358571532503)*x[1]**o+(0.282513525404)*x[1]+(0.105530612734)*x[2]**o+(-0.156753729378)*x[2]
-        arg[0,0,2,0]=(0.25049329858)*x[0]**o+(0.412299654624)*x[0]+(0.827683104949)*x[1]**o+(0.0195885473957)*x[1]+(0.849521623993)*x[2]**o+(-0.107922097347)*x[2]
-        arg[0,0,2,1]=(0.824054630326)*x[0]**o+(0.315612619612)*x[0]+(-0.33528975625)*x[1]**o+(-0.848543364468)*x[1]+(0.67462279419)*x[2]**o+(-0.0387606720463)*x[2]
-        arg[0,1,0,0]=(0.251613993994)*x[0]**o+(-0.871217704935)*x[0]+(-0.648182240752)*x[1]**o+(0.324536900202)*x[1]+(-0.884871901147)*x[2]**o+(0.353160185772)*x[2]
-        arg[0,1,0,1]=(-0.629894976165)*x[0]**o+(0.99092287348)*x[0]+(0.87471936536)*x[1]**o+(0.732884844801)*x[1]+(0.423531105096)*x[2]**o+(0.648959408663)*x[2]
-        arg[0,1,1,0]=(0.123366820062)*x[0]**o+(-0.856900246151)*x[0]+(-0.887819649211)*x[1]**o+(-0.901367472665)*x[1]+(0.222535500196)*x[2]**o+(0.42830671462)*x[2]
-        arg[0,1,1,1]=(0.343789367141)*x[0]**o+(0.614284333526)*x[0]+(0.976225499577)*x[1]**o+(0.955115562801)*x[1]+(0.0700409126681)*x[2]**o+(-0.709602275548)*x[2]
-        arg[0,1,2,0]=(-0.863502900367)*x[0]**o+(-0.452731447667)*x[0]+(0.495519161334)*x[1]**o+(0.0254261045314)*x[1]+(-0.484479110985)*x[2]**o+(0.615421138564)*x[2]
-        arg[0,1,2,1]=(-0.861966549825)*x[0]**o+(0.957385177208)*x[0]+(0.710449966969)*x[1]**o+(-0.367149885665)*x[1]+(-0.100800220614)*x[2]**o+(-0.266781849874)*x[2]
-        arg[0,2,0,0]=(-0.781309947495)*x[0]**o+(-0.709036446117)*x[0]+(0.86136976691)*x[1]**o+(-0.745743057084)*x[1]+(0.519795761984)*x[2]**o+(0.298838092751)*x[2]
-        arg[0,2,0,1]=(-0.514037154361)*x[0]**o+(-0.155867632386)*x[0]+(-0.125008826668)*x[1]**o+(-0.138197902584)*x[1]+(0.360698647284)*x[2]**o+(0.432385729464)*x[2]
-        arg[0,2,1,0]=(-0.19580514344)*x[0]**o+(-0.430510395896)*x[0]+(0.676498502854)*x[1]**o+(-0.472411864377)*x[1]+(-0.323468590594)*x[2]**o+(0.837971311859)*x[2]
-        arg[0,2,1,1]=(-0.358714577548)*x[0]**o+(-0.583080123482)*x[0]+(-0.225887451598)*x[1]**o+(0.744101609163)*x[1]+(-0.0300539574094)*x[2]**o+(-0.985181847505)*x[2]
-        arg[0,2,2,0]=(0.820610118447)*x[0]**o+(-0.560334915671)*x[0]+(0.478672329569)*x[1]**o+(-0.956892480643)*x[1]+(0.302100338619)*x[2]**o+(0.597584594886)*x[2]
-        arg[0,2,2,1]=(-0.0658925658941)*x[0]**o+(-0.136738027019)*x[0]+(0.617259524472)*x[1]**o+(-0.486181324584)*x[1]+(0.225924222893)*x[2]**o+(-0.304893108343)*x[2]
-        arg[0,3,0,0]=(0.0824288958004)*x[0]**o+(-0.67546530428)*x[0]+(-0.726843419073)*x[1]**o+(0.150753236521)*x[1]+(0.200621841908)*x[2]**o+(0.869623957921)*x[2]
-        arg[0,3,0,1]=(0.66227806631)*x[0]**o+(-0.389229756136)*x[0]+(0.739548522805)*x[1]**o+(0.131026218939)*x[1]+(0.743271925877)*x[2]**o+(-0.910220233981)*x[2]
-        arg[0,3,1,0]=(-0.259647259175)*x[0]**o+(-0.208585364012)*x[0]+(-0.323867955964)*x[1]**o+(0.778380345151)*x[1]+(-0.555780852614)*x[2]**o+(-0.16366483426)*x[2]
-        arg[0,3,1,1]=(0.248968056109)*x[0]**o+(0.84999990087)*x[0]+(0.180937025847)*x[1]**o+(0.332075828156)*x[1]+(-0.00577042146131)*x[2]**o+(0.708188905312)*x[2]
-        arg[0,3,2,0]=(-0.80327596428)*x[0]**o+(-0.131004563471)*x[0]+(0.443094741792)*x[1]**o+(0.515867966266)*x[1]+(-0.964003373109)*x[2]**o+(-0.580721642935)*x[2]
-        arg[0,3,2,1]=(-0.107361389717)*x[0]**o+(-0.543617395264)*x[0]+(0.840867379108)*x[1]**o+(-0.459941493027)*x[1]+(-0.300033656162)*x[2]**o+(0.440763554498)*x[2]
-        arg[0,4,0,0]=(0.272916362055)*x[0]**o+(-0.554210888243)*x[0]+(-0.458102512273)*x[1]**o+(-0.54594406835)*x[1]+(0.570670715852)*x[2]**o+(0.792731049718)*x[2]
-        arg[0,4,0,1]=(0.896330380602)*x[0]**o+(-0.929757950797)*x[0]+(0.229049814758)*x[1]**o+(0.1245974562)*x[1]+(0.853250033203)*x[2]**o+(-0.877052530974)*x[2]
-        arg[0,4,1,0]=(0.76027467594)*x[0]**o+(-0.510095378376)*x[0]+(0.697258966361)*x[1]**o+(-0.44013714543)*x[1]+(0.617675705023)*x[2]**o+(-0.00118327085347)*x[2]
-        arg[0,4,1,1]=(0.92472377319)*x[0]**o+(0.27783405618)*x[0]+(-0.24317632451)*x[1]**o+(-0.0264727232824)*x[1]+(0.428751701408)*x[2]**o+(0.184142273303)*x[2]
-        arg[0,4,2,0]=(0.619110983031)*x[0]**o+(-0.375037512361)*x[0]+(0.298576843317)*x[1]**o+(-0.218802335776)*x[1]+(-0.394889850336)*x[2]**o+(-0.842359750924)*x[2]
-        arg[0,4,2,1]=(0.899714346356)*x[0]**o+(0.0630133184109)*x[0]+(0.0796796488932)*x[1]**o+(-0.693371400327)*x[1]+(-0.412090402419)*x[2]**o+(0.681871832039)*x[2]
-        arg[1,0,0,0]=(-0.0367677770358)*x[0]**o+(-0.75352301678)*x[0]+(0.0705016755404)*x[1]**o+(0.870115630516)*x[1]+(0.136757694474)*x[2]**o+(-0.557722157484)*x[2]
-        arg[1,0,0,1]=(0.550371937413)*x[0]**o+(-0.590052751632)*x[0]+(0.38665744963)*x[1]**o+(-0.896537565188)*x[1]+(0.550869514185)*x[2]**o+(0.693828237691)*x[2]
-        arg[1,0,1,0]=(-0.150321579562)*x[0]**o+(0.111135028893)*x[0]+(0.582595079816)*x[1]**o+(-0.250920804447)*x[1]+(0.392998664266)*x[2]**o+(-0.226735735878)*x[2]
-        arg[1,0,1,1]=(0.435196573865)*x[0]**o+(-0.31161203165)*x[0]+(-0.117580582163)*x[1]**o+(0.99583282896)*x[1]+(-0.164872214322)*x[2]**o+(0.243837126961)*x[2]
-        arg[1,0,2,0]=(-0.320135099791)*x[0]**o+(0.339871290643)*x[0]+(0.593784119675)*x[1]**o+(0.695166367768)*x[1]+(0.407551427099)*x[2]**o+(-0.768445418933)*x[2]
-        arg[1,0,2,1]=(-0.390718323619)*x[0]**o+(-0.0515766643887)*x[0]+(0.394112545837)*x[1]**o+(-0.379592335881)*x[1]+(-0.29680237927)*x[2]**o+(0.500583589142)*x[2]
-        arg[1,1,0,0]=(-0.958930666062)*x[0]**o+(0.516874100468)*x[0]+(0.0859034666349)*x[1]**o+(-0.370561856015)*x[1]+(-0.175293417132)*x[2]**o+(0.672554615126)*x[2]
-        arg[1,1,0,1]=(-0.38129381629)*x[0]**o+(-0.615636530444)*x[0]+(0.447284140424)*x[1]**o+(0.507583882952)*x[1]+(-0.942413761354)*x[2]**o+(-0.607928807162)*x[2]
-        arg[1,1,1,0]=(-0.456462200294)*x[0]**o+(0.778557108965)*x[0]+(-0.939624730616)*x[1]**o+(0.965857713341)*x[1]+(-0.913772635427)*x[2]**o+(-0.459963514384)*x[2]
-        arg[1,1,1,1]=(0.138896120228)*x[0]**o+(0.941491395046)*x[0]+(0.546538931051)*x[1]**o+(-0.526098363992)*x[1]+(0.32139556996)*x[2]**o+(0.899346403792)*x[2]
-        arg[1,1,2,0]=(0.591597103411)*x[0]**o+(0.926278363416)*x[0]+(0.565926211046)*x[1]**o+(0.930516925784)*x[1]+(-0.498131779353)*x[2]**o+(0.358157310681)*x[2]
-        arg[1,1,2,1]=(0.758395199797)*x[0]**o+(0.769578766255)*x[0]+(0.86819976051)*x[1]**o+(-0.380436310842)*x[1]+(-0.513012037048)*x[2]**o+(-0.984361866072)*x[2]
-        arg[1,2,0,0]=(0.0845846076213)*x[0]**o+(0.987145343601)*x[0]+(-0.447680898266)*x[1]**o+(-0.30278197108)*x[1]+(0.271667503636)*x[2]**o+(0.698967822656)*x[2]
-        arg[1,2,0,1]=(-0.314076111079)*x[0]**o+(0.507407943673)*x[0]+(-0.38467148586)*x[1]**o+(0.802764957621)*x[1]+(0.692949890402)*x[2]**o+(-0.965766183849)*x[2]
-        arg[1,2,1,0]=(-0.855806343042)*x[0]**o+(0.753362713203)*x[0]+(-0.9877924012)*x[1]**o+(-0.54047626663)*x[1]+(-0.488859780266)*x[2]**o+(0.444279382381)*x[2]
-        arg[1,2,1,1]=(-0.313257382113)*x[0]**o+(-0.926058887186)*x[0]+(0.509510780366)*x[1]**o+(0.738049597453)*x[1]+(0.191676625722)*x[2]**o+(-0.354148482258)*x[2]
-        arg[1,2,2,0]=(-0.955204517346)*x[0]**o+(0.234220317948)*x[0]+(0.44435792198)*x[1]**o+(0.96099571541)*x[1]+(-0.422462745872)*x[2]**o+(0.808817733192)*x[2]
-        arg[1,2,2,1]=(0.932454071169)*x[0]**o+(-0.449841123911)*x[0]+(-0.371587228288)*x[1]**o+(-0.552185751938)*x[1]+(-0.222070148528)*x[2]**o+(-0.911768306425)*x[2]
-        arg[1,3,0,0]=(-0.355162862133)*x[0]**o+(-0.00562439573347)*x[0]+(0.982216168139)*x[1]**o+(0.0493986220989)*x[1]+(0.0242698649494)*x[2]**o+(0.593411693569)*x[2]
-        arg[1,3,0,1]=(-0.982164819772)*x[0]**o+(-0.417475530445)*x[0]+(-0.421752719264)*x[1]**o+(-0.102522772133)*x[1]+(-0.384947583437)*x[2]**o+(-0.675090951882)*x[2]
-        arg[1,3,1,0]=(0.862354670281)*x[0]**o+(0.0332806244503)*x[0]+(0.248152892705)*x[1]**o+(-0.380941068103)*x[1]+(0.499668747376)*x[2]**o+(-0.732344330916)*x[2]
-        arg[1,3,1,1]=(-0.367669055003)*x[0]**o+(-0.28761578782)*x[0]+(0.10838982068)*x[1]**o+(-0.495999837684)*x[1]+(0.599492939122)*x[2]**o+(0.886609670648)*x[2]
-        arg[1,3,2,0]=(0.707026122148)*x[0]**o+(-0.625314188271)*x[0]+(-0.734283031657)*x[1]**o+(0.779848908302)*x[1]+(-0.965798269237)*x[2]**o+(0.35160103487)*x[2]
-        arg[1,3,2,1]=(0.198008431503)*x[0]**o+(0.145470568903)*x[0]+(-0.342584113223)*x[1]**o+(-0.976390968602)*x[1]+(-0.371678081685)*x[2]**o+(0.569699640624)*x[2]
-        arg[1,4,0,0]=(-0.816642540092)*x[0]**o+(0.466127552066)*x[0]+(-0.491109738021)*x[1]**o+(-0.177222784312)*x[1]+(0.723624314914)*x[2]**o+(-0.103929106752)*x[2]
-        arg[1,4,0,1]=(-0.461770336596)*x[0]**o+(-0.416473447722)*x[0]+(-0.844639456093)*x[1]**o+(-0.021509624606)*x[1]+(-0.507857805076)*x[2]**o+(-0.0132005113079)*x[2]
-        arg[1,4,1,0]=(0.279614653607)*x[0]**o+(-0.547332204747)*x[0]+(0.329751635637)*x[1]**o+(0.813149533168)*x[1]+(0.0361758823053)*x[2]**o+(0.0635753923527)*x[2]
-        arg[1,4,1,1]=(0.124940246141)*x[0]**o+(-0.470715329674)*x[0]+(0.401922174627)*x[1]**o+(-0.292371975658)*x[1]+(0.302438467505)*x[2]**o+(0.131045792461)*x[2]
-        arg[1,4,2,0]=(0.817170444398)*x[0]**o+(0.153182033447)*x[0]+(-0.98908973731)*x[1]**o+(0.359609127275)*x[1]+(-0.891501663456)*x[2]**o+(0.34700998982)*x[2]
-        arg[1,4,2,1]=(0.619050545861)*x[0]**o+(-0.784466574079)*x[0]+(-0.15316511355)*x[1]**o+(0.587255937366)*x[1]+(0.740644692907)*x[2]**o+(0.0651236072508)*x[2]
-        arg[2,0,0,0]=(0.67904774175)*x[0]**o+(-0.24998331377)*x[0]+(-0.263635906274)*x[1]**o+(0.157008949549)*x[1]+(-0.905158896842)*x[2]**o+(-0.975062080366)*x[2]
-        arg[2,0,0,1]=(0.724305963876)*x[0]**o+(0.666891161317)*x[0]+(0.769784501206)*x[1]**o+(-0.84353242369)*x[1]+(0.631055556571)*x[2]**o+(-0.433528873211)*x[2]
-        arg[2,0,1,0]=(-0.545702871321)*x[0]**o+(-0.153233364062)*x[0]+(-0.892642075879)*x[1]**o+(-0.303965445232)*x[1]+(0.675938211305)*x[2]**o+(0.134016007164)*x[2]
-        arg[2,0,1,1]=(0.612528479764)*x[0]**o+(0.444039154606)*x[0]+(-0.185281638413)*x[1]**o+(0.643315773689)*x[1]+(-0.5562387833)*x[2]**o+(-0.960249468718)*x[2]
-        arg[2,0,2,0]=(-0.330135152971)*x[0]**o+(0.359951176686)*x[0]+(-0.797088515842)*x[1]**o+(-0.257909258598)*x[1]+(-0.927156080256)*x[2]**o+(-0.843405252125)*x[2]
-        arg[2,0,2,1]=(0.447041226497)*x[0]**o+(0.691225329527)*x[0]+(0.462798475523)*x[1]**o+(0.157497098383)*x[1]+(-0.77785224695)*x[2]**o+(0.886430058902)*x[2]
-        arg[2,1,0,0]=(0.397605326971)*x[0]**o+(0.66227843262)*x[0]+(-0.634922556623)*x[1]**o+(-0.263342020187)*x[1]+(-0.81486179124)*x[2]**o+(-0.216716259698)*x[2]
-        arg[2,1,0,1]=(-0.868246547394)*x[0]**o+(-0.194983059368)*x[0]+(-0.667277750808)*x[1]**o+(0.284011270958)*x[1]+(-0.276295620425)*x[2]**o+(0.215159516398)*x[2]
-        arg[2,1,1,0]=(0.990906320323)*x[0]**o+(0.526754062323)*x[0]+(-0.963398315893)*x[1]**o+(-0.72561275544)*x[1]+(0.539779065056)*x[2]**o+(0.37738462043)*x[2]
-        arg[2,1,1,1]=(-0.668520028258)*x[0]**o+(-0.292883094355)*x[0]+(0.260949538172)*x[1]**o+(-0.952706524522)*x[1]+(-0.715386804875)*x[2]**o+(-0.683320136224)*x[2]
-        arg[2,1,2,0]=(-0.646186301281)*x[0]**o+(-0.62747987465)*x[0]+(-0.858714171368)*x[1]**o+(0.46910094021)*x[1]+(0.468975652807)*x[2]**o+(0.242115907129)*x[2]
-        arg[2,1,2,1]=(0.262205767991)*x[0]**o+(-0.460376423099)*x[0]+(0.88572453638)*x[1]**o+(0.611761462581)*x[1]+(0.763860971141)*x[2]**o+(0.108470198525)*x[2]
-        arg[2,2,0,0]=(-0.0218691308052)*x[0]**o+(0.942271392012)*x[0]+(-0.778469966054)*x[1]**o+(0.0873305333765)*x[1]+(-0.300479183111)*x[2]**o+(-0.862547713455)*x[2]
-        arg[2,2,0,1]=(-0.736808990311)*x[0]**o+(-0.200478457878)*x[0]+(0.272608362607)*x[1]**o+(-0.0651056524306)*x[1]+(0.616628495568)*x[2]**o+(-0.8623490351)*x[2]
-        arg[2,2,1,0]=(0.931530668297)*x[0]**o+(0.39701649536)*x[0]+(0.552135074711)*x[1]**o+(-0.489731326344)*x[1]+(-0.864724191354)*x[2]**o+(0.369557062583)*x[2]
-        arg[2,2,1,1]=(0.418780453395)*x[0]**o+(-0.4935990418)*x[0]+(0.34625989303)*x[1]**o+(0.979829617988)*x[1]+(0.853169987441)*x[2]**o+(-0.945958722805)*x[2]
-        arg[2,2,2,0]=(0.973689940887)*x[0]**o+(-0.0585784323994)*x[0]+(-0.472419744635)*x[1]**o+(0.851814193674)*x[1]+(-0.393393340405)*x[2]**o+(-0.755376551633)*x[2]
-        arg[2,2,2,1]=(-0.217049913648)*x[0]**o+(-0.262150796255)*x[0]+(-0.407805273745)*x[1]**o+(0.819646964669)*x[1]+(-0.0130316627236)*x[2]**o+(0.179034130621)*x[2]
-        arg[2,3,0,0]=(-0.377708814803)*x[0]**o+(-0.943893058411)*x[0]+(-0.354341838264)*x[1]**o+(0.0696491295689)*x[1]+(-0.192838410156)*x[2]**o+(-0.22208932914)*x[2]
-        arg[2,3,0,1]=(0.252429489766)*x[0]**o+(0.808052283089)*x[0]+(0.282941493712)*x[1]**o+(0.89816007357)*x[1]+(0.000979423783521)*x[2]**o+(0.645599553602)*x[2]
-        arg[2,3,1,0]=(0.788089987784)*x[0]**o+(0.414254044423)*x[0]+(0.105204158639)*x[1]**o+(0.97527041289)*x[1]+(0.447463569594)*x[2]**o+(0.91465488394)*x[2]
-        arg[2,3,1,1]=(0.882323493958)*x[0]**o+(-0.98135461385)*x[0]+(0.641881834427)*x[1]**o+(-0.888068999894)*x[1]+(0.705728558352)*x[2]**o+(0.295815435834)*x[2]
-        arg[2,3,2,0]=(-0.570666876652)*x[0]**o+(0.52308582534)*x[0]+(-0.604213776925)*x[1]**o+(-0.568684610916)*x[1]+(-0.0378463784885)*x[2]**o+(0.557994858276)*x[2]
-        arg[2,3,2,1]=(-0.497489149519)*x[0]**o+(0.739341493998)*x[0]+(-0.375869065986)*x[1]**o+(-0.895553158302)*x[1]+(0.916829505813)*x[2]**o+(-0.650522069672)*x[2]
-        arg[2,4,0,0]=(0.627540843427)*x[0]**o+(-0.572125230014)*x[0]+(-0.404781893475)*x[1]**o+(-0.114896790942)*x[1]+(-0.108914764977)*x[2]**o+(0.739758413931)*x[2]
-        arg[2,4,0,1]=(0.243205825969)*x[0]**o+(-0.989602234642)*x[0]+(-0.925730664677)*x[1]**o+(0.454801040316)*x[1]+(0.51758036389)*x[2]**o+(0.325160660047)*x[2]
-        arg[2,4,1,0]=(0.559764013478)*x[0]**o+(2.69034311577e-05)*x[0]+(-0.691119937581)*x[1]**o+(-0.347457112767)*x[1]+(0.714683489268)*x[2]**o+(-0.589270137254)*x[2]
-        arg[2,4,1,1]=(-0.657837524953)*x[0]**o+(0.071158671662)*x[0]+(-0.998677178035)*x[1]**o+(-0.544136374784)*x[1]+(0.6200901771)*x[2]**o+(-0.280453395396)*x[2]
-        arg[2,4,2,0]=(0.692403743003)*x[0]**o+(-0.570086669428)*x[0]+(0.455036498939)*x[1]**o+(0.291433179453)*x[1]+(-0.203004457401)*x[2]**o+(0.0192489593981)*x[2]
-        arg[2,4,2,1]=(-0.656783033826)*x[0]**o+(0.865748949755)*x[0]+(-0.297731124456)*x[1]**o+(-0.826786841513)*x[1]+(0.891374127144)*x[2]**o+(-0.736789456498)*x[2]
-        arg[3,0,0,0]=(-0.963120586854)*x[0]**o+(0.466089565408)*x[0]+(-0.785137906849)*x[1]**o+(0.194880437113)*x[1]+(0.652057839639)*x[2]**o+(-0.63674893761)*x[2]
-        arg[3,0,0,1]=(-0.923234625819)*x[0]**o+(-0.303847080864)*x[0]+(-0.374245465515)*x[1]**o+(0.131093877726)*x[1]+(-0.13469395748)*x[2]**o+(0.42721676585)*x[2]
-        arg[3,0,1,0]=(-0.613510153481)*x[0]**o+(0.986696685318)*x[0]+(0.188583200151)*x[1]**o+(-0.895175969251)*x[1]+(-0.699510846377)*x[2]**o+(0.953157679279)*x[2]
-        arg[3,0,1,1]=(-0.805809890231)*x[0]**o+(-0.786467529592)*x[0]+(-0.287240865489)*x[1]**o+(-0.78714682888)*x[1]+(-0.301034554724)*x[2]**o+(0.698100092246)*x[2]
-        arg[3,0,2,0]=(-0.29320618172)*x[0]**o+(0.482436772935)*x[0]+(-0.126052929261)*x[1]**o+(-0.0638862140753)*x[1]+(0.42769411972)*x[2]**o+(0.741118745829)*x[2]
-        arg[3,0,2,1]=(-0.380041427783)*x[0]**o+(-0.0347904596008)*x[0]+(-0.321599184546)*x[1]**o+(-0.061333518544)*x[1]+(-0.885193271364)*x[2]**o+(0.216506075886)*x[2]
-        arg[3,1,0,0]=(-0.872457576682)*x[0]**o+(0.1368749584)*x[0]+(0.883209741333)*x[1]**o+(0.946644762296)*x[1]+(-0.941665219846)*x[2]**o+(0.683787986795)*x[2]
-        arg[3,1,0,1]=(0.564843030077)*x[0]**o+(0.987198898299)*x[0]+(0.808116156661)*x[1]**o+(-0.712172259479)*x[1]+(0.942066890171)*x[2]**o+(-0.265957158917)*x[2]
-        arg[3,1,1,0]=(-0.171018264631)*x[0]**o+(0.277202848962)*x[0]+(0.0726306773528)*x[1]**o+(-0.0265640725409)*x[1]+(-0.871118922929)*x[2]**o+(0.0562314512261)*x[2]
-        arg[3,1,1,1]=(0.0861984079085)*x[0]**o+(-0.954818837051)*x[0]+(0.817362109646)*x[1]**o+(-0.513086270222)*x[1]+(-0.487472170741)*x[2]**o+(0.702514192773)*x[2]
-        arg[3,1,2,0]=(0.272419057202)*x[0]**o+(-0.0454292509397)*x[0]+(-0.117471126603)*x[1]**o+(0.638237510553)*x[1]+(0.156858948691)*x[2]**o+(0.499459702141)*x[2]
-        arg[3,1,2,1]=(-0.384525883334)*x[0]**o+(-0.795638828759)*x[0]+(-0.105795059118)*x[1]**o+(0.539873566967)*x[1]+(-0.402558868714)*x[2]**o+(-0.690578475243)*x[2]
-        arg[3,2,0,0]=(0.776889517136)*x[0]**o+(0.710931840891)*x[0]+(0.335992677388)*x[1]**o+(-0.689182863932)*x[1]+(0.294149805572)*x[2]**o+(-0.144223257292)*x[2]
-        arg[3,2,0,1]=(0.738703695733)*x[0]**o+(-0.523207061995)*x[0]+(0.707078352596)*x[1]**o+(-0.594373978096)*x[1]+(-0.833468457639)*x[2]**o+(-0.60181674446)*x[2]
-        arg[3,2,1,0]=(-0.70243682985)*x[0]**o+(-0.557914174271)*x[0]+(-0.97153723053)*x[1]**o+(0.791692594024)*x[1]+(-0.442273808305)*x[2]**o+(-0.74069605321)*x[2]
-        arg[3,2,1,1]=(0.136307039789)*x[0]**o+(0.820661597623)*x[0]+(0.379752060994)*x[1]**o+(-0.739083116742)*x[1]+(-0.964857055764)*x[2]**o+(0.523159928671)*x[2]
-        arg[3,2,2,0]=(0.530883295074)*x[0]**o+(-0.859538509888)*x[0]+(-0.33917158254)*x[1]**o+(0.476510741055)*x[1]+(0.851975683024)*x[2]**o+(0.146277015139)*x[2]
-        arg[3,2,2,1]=(-0.532984574212)*x[0]**o+(-0.413169979754)*x[0]+(0.0113284200501)*x[1]**o+(0.406768750567)*x[1]+(0.730968378807)*x[2]**o+(-0.74004422909)*x[2]
-        arg[3,3,0,0]=(0.784793271465)*x[0]**o+(0.879569037436)*x[0]+(0.687804194006)*x[1]**o+(0.153617608524)*x[1]+(-0.410247334526)*x[2]**o+(0.147941373268)*x[2]
-        arg[3,3,0,1]=(-0.896748874838)*x[0]**o+(-0.408404228864)*x[0]+(0.831967697989)*x[1]**o+(-0.290875629476)*x[1]+(-0.244101719785)*x[2]**o+(0.240453425519)*x[2]
-        arg[3,3,1,0]=(-0.352293918285)*x[0]**o+(0.0341233590345)*x[0]+(-0.0165872699681)*x[1]**o+(-0.0668507705942)*x[1]+(-0.133733710061)*x[2]**o+(-0.00620237772745)*x[2]
-        arg[3,3,1,1]=(0.173638606531)*x[0]**o+(0.619705705811)*x[0]+(0.279972531576)*x[1]**o+(-0.0811181576037)*x[1]+(-0.645673968637)*x[2]**o+(0.913753411758)*x[2]
-        arg[3,3,2,0]=(0.0623921286142)*x[0]**o+(0.393414889204)*x[0]+(-0.300034851075)*x[1]**o+(-0.519515206457)*x[1]+(-0.0074981731879)*x[2]**o+(0.202996242895)*x[2]
-        arg[3,3,2,1]=(0.583279597505)*x[0]**o+(-0.940603487209)*x[0]+(0.027966157338)*x[1]**o+(0.251466344692)*x[1]+(-0.97011033154)*x[2]**o+(0.46527056203)*x[2]
-        arg[3,4,0,0]=(0.865170740218)*x[0]**o+(-0.466853211289)*x[0]+(0.0935492537278)*x[1]**o+(-0.632374632657)*x[1]+(0.673466346463)*x[2]**o+(-0.47934739873)*x[2]
-        arg[3,4,0,1]=(0.0417451136027)*x[0]**o+(-0.781570733286)*x[0]+(0.547452389454)*x[1]**o+(-0.0286368211528)*x[1]+(-0.98907358808)*x[2]**o+(0.62749495057)*x[2]
-        arg[3,4,1,0]=(-0.632067479664)*x[0]**o+(-0.872835386336)*x[0]+(-0.228785631078)*x[1]**o+(-0.224206127306)*x[1]+(0.769729051217)*x[2]**o+(-0.406750034352)*x[2]
-        arg[3,4,1,1]=(0.216883071299)*x[0]**o+(-0.225632200121)*x[0]+(0.827186402743)*x[1]**o+(0.161488636886)*x[1]+(0.773801288836)*x[2]**o+(0.977006832166)*x[2]
-        arg[3,4,2,0]=(-0.867098845884)*x[0]**o+(0.14989544838)*x[0]+(0.756720043262)*x[1]**o+(-0.496074302626)*x[1]+(-0.662787072451)*x[2]**o+(-0.142473973368)*x[2]
-        arg[3,4,2,1]=(-0.294128396829)*x[0]**o+(-0.931379392091)*x[0]+(0.906552131161)*x[1]**o+(-0.422008485494)*x[1]+(0.806742455679)*x[2]**o+(0.940488803006)*x[2]
-        ref[0,0,0,0]=(-0.0998996137438)*x_ref[0]**o+(-0.648495171588)*x_ref[0]+(-0.836177837758)*x_ref[1]**o+(-0.9597381047)*x_ref[1]+(-0.958069967907)*x_ref[2]**o+(0.399097251753)*x_ref[2]
-        ref[0,0,0,1]=(0.625409406207)*x_ref[0]**o+(-0.522476054218)*x_ref[0]+(0.794724584797)*x_ref[1]**o+(-0.450875661781)*x_ref[1]+(-0.189505729613)*x_ref[2]**o+(0.0910808218379)*x_ref[2]
-        ref[0,0,1,0]=(-0.36073198549)*x_ref[0]**o+(-0.0286144078107)*x_ref[0]+(-0.53827851785)*x_ref[1]**o+(-0.563600303848)*x_ref[1]+(0.970211345168)*x_ref[2]**o+(-0.405253675856)*x_ref[2]
-        ref[0,0,1,1]=(-0.0204302558323)*x_ref[0]**o+(0.927570053009)*x_ref[0]+(-0.358571532503)*x_ref[1]**o+(0.282513525404)*x_ref[1]+(0.105530612734)*x_ref[2]**o+(-0.156753729378)*x_ref[2]
-        ref[0,0,2,0]=(0.25049329858)*x_ref[0]**o+(0.412299654624)*x_ref[0]+(0.827683104949)*x_ref[1]**o+(0.0195885473957)*x_ref[1]+(0.849521623993)*x_ref[2]**o+(-0.107922097347)*x_ref[2]
-        ref[0,0,2,1]=(0.824054630326)*x_ref[0]**o+(0.315612619612)*x_ref[0]+(-0.33528975625)*x_ref[1]**o+(-0.848543364468)*x_ref[1]+(0.67462279419)*x_ref[2]**o+(-0.0387606720463)*x_ref[2]
-        ref[0,1,0,0]=(0.251613993994)*x_ref[0]**o+(-0.871217704935)*x_ref[0]+(-0.648182240752)*x_ref[1]**o+(0.324536900202)*x_ref[1]+(-0.884871901147)*x_ref[2]**o+(0.353160185772)*x_ref[2]
-        ref[0,1,0,1]=(-0.629894976165)*x_ref[0]**o+(0.99092287348)*x_ref[0]+(0.87471936536)*x_ref[1]**o+(0.732884844801)*x_ref[1]+(0.423531105096)*x_ref[2]**o+(0.648959408663)*x_ref[2]
-        ref[0,1,1,0]=(0.123366820062)*x_ref[0]**o+(-0.856900246151)*x_ref[0]+(-0.887819649211)*x_ref[1]**o+(-0.901367472665)*x_ref[1]+(0.222535500196)*x_ref[2]**o+(0.42830671462)*x_ref[2]
-        ref[0,1,1,1]=(0.343789367141)*x_ref[0]**o+(0.614284333526)*x_ref[0]+(0.976225499577)*x_ref[1]**o+(0.955115562801)*x_ref[1]+(0.0700409126681)*x_ref[2]**o+(-0.709602275548)*x_ref[2]
-        ref[0,1,2,0]=(-0.863502900367)*x_ref[0]**o+(-0.452731447667)*x_ref[0]+(0.495519161334)*x_ref[1]**o+(0.0254261045314)*x_ref[1]+(-0.484479110985)*x_ref[2]**o+(0.615421138564)*x_ref[2]
-        ref[0,1,2,1]=(-0.861966549825)*x_ref[0]**o+(0.957385177208)*x_ref[0]+(0.710449966969)*x_ref[1]**o+(-0.367149885665)*x_ref[1]+(-0.100800220614)*x_ref[2]**o+(-0.266781849874)*x_ref[2]
-        ref[0,2,0,0]=(-0.781309947495)*x_ref[0]**o+(-0.709036446117)*x_ref[0]+(0.86136976691)*x_ref[1]**o+(-0.745743057084)*x_ref[1]+(0.519795761984)*x_ref[2]**o+(0.298838092751)*x_ref[2]
-        ref[0,2,0,1]=(-0.514037154361)*x_ref[0]**o+(-0.155867632386)*x_ref[0]+(-0.125008826668)*x_ref[1]**o+(-0.138197902584)*x_ref[1]+(0.360698647284)*x_ref[2]**o+(0.432385729464)*x_ref[2]
-        ref[0,2,1,0]=(-0.19580514344)*x_ref[0]**o+(-0.430510395896)*x_ref[0]+(0.676498502854)*x_ref[1]**o+(-0.472411864377)*x_ref[1]+(-0.323468590594)*x_ref[2]**o+(0.837971311859)*x_ref[2]
-        ref[0,2,1,1]=(-0.358714577548)*x_ref[0]**o+(-0.583080123482)*x_ref[0]+(-0.225887451598)*x_ref[1]**o+(0.744101609163)*x_ref[1]+(-0.0300539574094)*x_ref[2]**o+(-0.985181847505)*x_ref[2]
-        ref[0,2,2,0]=(0.820610118447)*x_ref[0]**o+(-0.560334915671)*x_ref[0]+(0.478672329569)*x_ref[1]**o+(-0.956892480643)*x_ref[1]+(0.302100338619)*x_ref[2]**o+(0.597584594886)*x_ref[2]
-        ref[0,2,2,1]=(-0.0658925658941)*x_ref[0]**o+(-0.136738027019)*x_ref[0]+(0.617259524472)*x_ref[1]**o+(-0.486181324584)*x_ref[1]+(0.225924222893)*x_ref[2]**o+(-0.304893108343)*x_ref[2]
-        ref[0,3,0,0]=(0.0824288958004)*x_ref[0]**o+(-0.67546530428)*x_ref[0]+(-0.726843419073)*x_ref[1]**o+(0.150753236521)*x_ref[1]+(0.200621841908)*x_ref[2]**o+(0.869623957921)*x_ref[2]
-        ref[0,3,0,1]=(0.66227806631)*x_ref[0]**o+(-0.389229756136)*x_ref[0]+(0.739548522805)*x_ref[1]**o+(0.131026218939)*x_ref[1]+(0.743271925877)*x_ref[2]**o+(-0.910220233981)*x_ref[2]
-        ref[0,3,1,0]=(-0.259647259175)*x_ref[0]**o+(-0.208585364012)*x_ref[0]+(-0.323867955964)*x_ref[1]**o+(0.778380345151)*x_ref[1]+(-0.555780852614)*x_ref[2]**o+(-0.16366483426)*x_ref[2]
-        ref[0,3,1,1]=(0.248968056109)*x_ref[0]**o+(0.84999990087)*x_ref[0]+(0.180937025847)*x_ref[1]**o+(0.332075828156)*x_ref[1]+(-0.00577042146131)*x_ref[2]**o+(0.708188905312)*x_ref[2]
-        ref[0,3,2,0]=(-0.80327596428)*x_ref[0]**o+(-0.131004563471)*x_ref[0]+(0.443094741792)*x_ref[1]**o+(0.515867966266)*x_ref[1]+(-0.964003373109)*x_ref[2]**o+(-0.580721642935)*x_ref[2]
-        ref[0,3,2,1]=(-0.107361389717)*x_ref[0]**o+(-0.543617395264)*x_ref[0]+(0.840867379108)*x_ref[1]**o+(-0.459941493027)*x_ref[1]+(-0.300033656162)*x_ref[2]**o+(0.440763554498)*x_ref[2]
-        ref[0,4,0,0]=(0.272916362055)*x_ref[0]**o+(-0.554210888243)*x_ref[0]+(-0.458102512273)*x_ref[1]**o+(-0.54594406835)*x_ref[1]+(0.570670715852)*x_ref[2]**o+(0.792731049718)*x_ref[2]
-        ref[0,4,0,1]=(0.896330380602)*x_ref[0]**o+(-0.929757950797)*x_ref[0]+(0.229049814758)*x_ref[1]**o+(0.1245974562)*x_ref[1]+(0.853250033203)*x_ref[2]**o+(-0.877052530974)*x_ref[2]
-        ref[0,4,1,0]=(0.76027467594)*x_ref[0]**o+(-0.510095378376)*x_ref[0]+(0.697258966361)*x_ref[1]**o+(-0.44013714543)*x_ref[1]+(0.617675705023)*x_ref[2]**o+(-0.00118327085347)*x_ref[2]
-        ref[0,4,1,1]=(0.92472377319)*x_ref[0]**o+(0.27783405618)*x_ref[0]+(-0.24317632451)*x_ref[1]**o+(-0.0264727232824)*x_ref[1]+(0.428751701408)*x_ref[2]**o+(0.184142273303)*x_ref[2]
-        ref[0,4,2,0]=(0.619110983031)*x_ref[0]**o+(-0.375037512361)*x_ref[0]+(0.298576843317)*x_ref[1]**o+(-0.218802335776)*x_ref[1]+(-0.394889850336)*x_ref[2]**o+(-0.842359750924)*x_ref[2]
-        ref[0,4,2,1]=(0.899714346356)*x_ref[0]**o+(0.0630133184109)*x_ref[0]+(0.0796796488932)*x_ref[1]**o+(-0.693371400327)*x_ref[1]+(-0.412090402419)*x_ref[2]**o+(0.681871832039)*x_ref[2]
-        ref[1,0,0,0]=(-0.0367677770358)*x_ref[0]**o+(-0.75352301678)*x_ref[0]+(0.0705016755404)*x_ref[1]**o+(0.870115630516)*x_ref[1]+(0.136757694474)*x_ref[2]**o+(-0.557722157484)*x_ref[2]
-        ref[1,0,0,1]=(0.550371937413)*x_ref[0]**o+(-0.590052751632)*x_ref[0]+(0.38665744963)*x_ref[1]**o+(-0.896537565188)*x_ref[1]+(0.550869514185)*x_ref[2]**o+(0.693828237691)*x_ref[2]
-        ref[1,0,1,0]=(-0.150321579562)*x_ref[0]**o+(0.111135028893)*x_ref[0]+(0.582595079816)*x_ref[1]**o+(-0.250920804447)*x_ref[1]+(0.392998664266)*x_ref[2]**o+(-0.226735735878)*x_ref[2]
-        ref[1,0,1,1]=(0.435196573865)*x_ref[0]**o+(-0.31161203165)*x_ref[0]+(-0.117580582163)*x_ref[1]**o+(0.99583282896)*x_ref[1]+(-0.164872214322)*x_ref[2]**o+(0.243837126961)*x_ref[2]
-        ref[1,0,2,0]=(-0.320135099791)*x_ref[0]**o+(0.339871290643)*x_ref[0]+(0.593784119675)*x_ref[1]**o+(0.695166367768)*x_ref[1]+(0.407551427099)*x_ref[2]**o+(-0.768445418933)*x_ref[2]
-        ref[1,0,2,1]=(-0.390718323619)*x_ref[0]**o+(-0.0515766643887)*x_ref[0]+(0.394112545837)*x_ref[1]**o+(-0.379592335881)*x_ref[1]+(-0.29680237927)*x_ref[2]**o+(0.500583589142)*x_ref[2]
-        ref[1,1,0,0]=(-0.958930666062)*x_ref[0]**o+(0.516874100468)*x_ref[0]+(0.0859034666349)*x_ref[1]**o+(-0.370561856015)*x_ref[1]+(-0.175293417132)*x_ref[2]**o+(0.672554615126)*x_ref[2]
-        ref[1,1,0,1]=(-0.38129381629)*x_ref[0]**o+(-0.615636530444)*x_ref[0]+(0.447284140424)*x_ref[1]**o+(0.507583882952)*x_ref[1]+(-0.942413761354)*x_ref[2]**o+(-0.607928807162)*x_ref[2]
-        ref[1,1,1,0]=(-0.456462200294)*x_ref[0]**o+(0.778557108965)*x_ref[0]+(-0.939624730616)*x_ref[1]**o+(0.965857713341)*x_ref[1]+(-0.913772635427)*x_ref[2]**o+(-0.459963514384)*x_ref[2]
-        ref[1,1,1,1]=(0.138896120228)*x_ref[0]**o+(0.941491395046)*x_ref[0]+(0.546538931051)*x_ref[1]**o+(-0.526098363992)*x_ref[1]+(0.32139556996)*x_ref[2]**o+(0.899346403792)*x_ref[2]
-        ref[1,1,2,0]=(0.591597103411)*x_ref[0]**o+(0.926278363416)*x_ref[0]+(0.565926211046)*x_ref[1]**o+(0.930516925784)*x_ref[1]+(-0.498131779353)*x_ref[2]**o+(0.358157310681)*x_ref[2]
-        ref[1,1,2,1]=(0.758395199797)*x_ref[0]**o+(0.769578766255)*x_ref[0]+(0.86819976051)*x_ref[1]**o+(-0.380436310842)*x_ref[1]+(-0.513012037048)*x_ref[2]**o+(-0.984361866072)*x_ref[2]
-        ref[1,2,0,0]=(0.0845846076213)*x_ref[0]**o+(0.987145343601)*x_ref[0]+(-0.447680898266)*x_ref[1]**o+(-0.30278197108)*x_ref[1]+(0.271667503636)*x_ref[2]**o+(0.698967822656)*x_ref[2]
-        ref[1,2,0,1]=(-0.314076111079)*x_ref[0]**o+(0.507407943673)*x_ref[0]+(-0.38467148586)*x_ref[1]**o+(0.802764957621)*x_ref[1]+(0.692949890402)*x_ref[2]**o+(-0.965766183849)*x_ref[2]
-        ref[1,2,1,0]=(-0.855806343042)*x_ref[0]**o+(0.753362713203)*x_ref[0]+(-0.9877924012)*x_ref[1]**o+(-0.54047626663)*x_ref[1]+(-0.488859780266)*x_ref[2]**o+(0.444279382381)*x_ref[2]
-        ref[1,2,1,1]=(-0.313257382113)*x_ref[0]**o+(-0.926058887186)*x_ref[0]+(0.509510780366)*x_ref[1]**o+(0.738049597453)*x_ref[1]+(0.191676625722)*x_ref[2]**o+(-0.354148482258)*x_ref[2]
-        ref[1,2,2,0]=(-0.955204517346)*x_ref[0]**o+(0.234220317948)*x_ref[0]+(0.44435792198)*x_ref[1]**o+(0.96099571541)*x_ref[1]+(-0.422462745872)*x_ref[2]**o+(0.808817733192)*x_ref[2]
-        ref[1,2,2,1]=(0.932454071169)*x_ref[0]**o+(-0.449841123911)*x_ref[0]+(-0.371587228288)*x_ref[1]**o+(-0.552185751938)*x_ref[1]+(-0.222070148528)*x_ref[2]**o+(-0.911768306425)*x_ref[2]
-        ref[1,3,0,0]=(-0.355162862133)*x_ref[0]**o+(-0.00562439573347)*x_ref[0]+(0.982216168139)*x_ref[1]**o+(0.0493986220989)*x_ref[1]+(0.0242698649494)*x_ref[2]**o+(0.593411693569)*x_ref[2]
-        ref[1,3,0,1]=(-0.982164819772)*x_ref[0]**o+(-0.417475530445)*x_ref[0]+(-0.421752719264)*x_ref[1]**o+(-0.102522772133)*x_ref[1]+(-0.384947583437)*x_ref[2]**o+(-0.675090951882)*x_ref[2]
-        ref[1,3,1,0]=(0.862354670281)*x_ref[0]**o+(0.0332806244503)*x_ref[0]+(0.248152892705)*x_ref[1]**o+(-0.380941068103)*x_ref[1]+(0.499668747376)*x_ref[2]**o+(-0.732344330916)*x_ref[2]
-        ref[1,3,1,1]=(-0.367669055003)*x_ref[0]**o+(-0.28761578782)*x_ref[0]+(0.10838982068)*x_ref[1]**o+(-0.495999837684)*x_ref[1]+(0.599492939122)*x_ref[2]**o+(0.886609670648)*x_ref[2]
-        ref[1,3,2,0]=(0.707026122148)*x_ref[0]**o+(-0.625314188271)*x_ref[0]+(-0.734283031657)*x_ref[1]**o+(0.779848908302)*x_ref[1]+(-0.965798269237)*x_ref[2]**o+(0.35160103487)*x_ref[2]
-        ref[1,3,2,1]=(0.198008431503)*x_ref[0]**o+(0.145470568903)*x_ref[0]+(-0.342584113223)*x_ref[1]**o+(-0.976390968602)*x_ref[1]+(-0.371678081685)*x_ref[2]**o+(0.569699640624)*x_ref[2]
-        ref[1,4,0,0]=(-0.816642540092)*x_ref[0]**o+(0.466127552066)*x_ref[0]+(-0.491109738021)*x_ref[1]**o+(-0.177222784312)*x_ref[1]+(0.723624314914)*x_ref[2]**o+(-0.103929106752)*x_ref[2]
-        ref[1,4,0,1]=(-0.461770336596)*x_ref[0]**o+(-0.416473447722)*x_ref[0]+(-0.844639456093)*x_ref[1]**o+(-0.021509624606)*x_ref[1]+(-0.507857805076)*x_ref[2]**o+(-0.0132005113079)*x_ref[2]
-        ref[1,4,1,0]=(0.279614653607)*x_ref[0]**o+(-0.547332204747)*x_ref[0]+(0.329751635637)*x_ref[1]**o+(0.813149533168)*x_ref[1]+(0.0361758823053)*x_ref[2]**o+(0.0635753923527)*x_ref[2]
-        ref[1,4,1,1]=(0.124940246141)*x_ref[0]**o+(-0.470715329674)*x_ref[0]+(0.401922174627)*x_ref[1]**o+(-0.292371975658)*x_ref[1]+(0.302438467505)*x_ref[2]**o+(0.131045792461)*x_ref[2]
-        ref[1,4,2,0]=(0.817170444398)*x_ref[0]**o+(0.153182033447)*x_ref[0]+(-0.98908973731)*x_ref[1]**o+(0.359609127275)*x_ref[1]+(-0.891501663456)*x_ref[2]**o+(0.34700998982)*x_ref[2]
-        ref[1,4,2,1]=(0.619050545861)*x_ref[0]**o+(-0.784466574079)*x_ref[0]+(-0.15316511355)*x_ref[1]**o+(0.587255937366)*x_ref[1]+(0.740644692907)*x_ref[2]**o+(0.0651236072508)*x_ref[2]
-        ref[2,0,0,0]=(0.67904774175)*x_ref[0]**o+(-0.24998331377)*x_ref[0]+(-0.263635906274)*x_ref[1]**o+(0.157008949549)*x_ref[1]+(-0.905158896842)*x_ref[2]**o+(-0.975062080366)*x_ref[2]
-        ref[2,0,0,1]=(0.724305963876)*x_ref[0]**o+(0.666891161317)*x_ref[0]+(0.769784501206)*x_ref[1]**o+(-0.84353242369)*x_ref[1]+(0.631055556571)*x_ref[2]**o+(-0.433528873211)*x_ref[2]
-        ref[2,0,1,0]=(-0.545702871321)*x_ref[0]**o+(-0.153233364062)*x_ref[0]+(-0.892642075879)*x_ref[1]**o+(-0.303965445232)*x_ref[1]+(0.675938211305)*x_ref[2]**o+(0.134016007164)*x_ref[2]
-        ref[2,0,1,1]=(0.612528479764)*x_ref[0]**o+(0.444039154606)*x_ref[0]+(-0.185281638413)*x_ref[1]**o+(0.643315773689)*x_ref[1]+(-0.5562387833)*x_ref[2]**o+(-0.960249468718)*x_ref[2]
-        ref[2,0,2,0]=(-0.330135152971)*x_ref[0]**o+(0.359951176686)*x_ref[0]+(-0.797088515842)*x_ref[1]**o+(-0.257909258598)*x_ref[1]+(-0.927156080256)*x_ref[2]**o+(-0.843405252125)*x_ref[2]
-        ref[2,0,2,1]=(0.447041226497)*x_ref[0]**o+(0.691225329527)*x_ref[0]+(0.462798475523)*x_ref[1]**o+(0.157497098383)*x_ref[1]+(-0.77785224695)*x_ref[2]**o+(0.886430058902)*x_ref[2]
-        ref[2,1,0,0]=(0.397605326971)*x_ref[0]**o+(0.66227843262)*x_ref[0]+(-0.634922556623)*x_ref[1]**o+(-0.263342020187)*x_ref[1]+(-0.81486179124)*x_ref[2]**o+(-0.216716259698)*x_ref[2]
-        ref[2,1,0,1]=(-0.868246547394)*x_ref[0]**o+(-0.194983059368)*x_ref[0]+(-0.667277750808)*x_ref[1]**o+(0.284011270958)*x_ref[1]+(-0.276295620425)*x_ref[2]**o+(0.215159516398)*x_ref[2]
-        ref[2,1,1,0]=(0.990906320323)*x_ref[0]**o+(0.526754062323)*x_ref[0]+(-0.963398315893)*x_ref[1]**o+(-0.72561275544)*x_ref[1]+(0.539779065056)*x_ref[2]**o+(0.37738462043)*x_ref[2]
-        ref[2,1,1,1]=(-0.668520028258)*x_ref[0]**o+(-0.292883094355)*x_ref[0]+(0.260949538172)*x_ref[1]**o+(-0.952706524522)*x_ref[1]+(-0.715386804875)*x_ref[2]**o+(-0.683320136224)*x_ref[2]
-        ref[2,1,2,0]=(-0.646186301281)*x_ref[0]**o+(-0.62747987465)*x_ref[0]+(-0.858714171368)*x_ref[1]**o+(0.46910094021)*x_ref[1]+(0.468975652807)*x_ref[2]**o+(0.242115907129)*x_ref[2]
-        ref[2,1,2,1]=(0.262205767991)*x_ref[0]**o+(-0.460376423099)*x_ref[0]+(0.88572453638)*x_ref[1]**o+(0.611761462581)*x_ref[1]+(0.763860971141)*x_ref[2]**o+(0.108470198525)*x_ref[2]
-        ref[2,2,0,0]=(-0.0218691308052)*x_ref[0]**o+(0.942271392012)*x_ref[0]+(-0.778469966054)*x_ref[1]**o+(0.0873305333765)*x_ref[1]+(-0.300479183111)*x_ref[2]**o+(-0.862547713455)*x_ref[2]
-        ref[2,2,0,1]=(-0.736808990311)*x_ref[0]**o+(-0.200478457878)*x_ref[0]+(0.272608362607)*x_ref[1]**o+(-0.0651056524306)*x_ref[1]+(0.616628495568)*x_ref[2]**o+(-0.8623490351)*x_ref[2]
-        ref[2,2,1,0]=(0.931530668297)*x_ref[0]**o+(0.39701649536)*x_ref[0]+(0.552135074711)*x_ref[1]**o+(-0.489731326344)*x_ref[1]+(-0.864724191354)*x_ref[2]**o+(0.369557062583)*x_ref[2]
-        ref[2,2,1,1]=(0.418780453395)*x_ref[0]**o+(-0.4935990418)*x_ref[0]+(0.34625989303)*x_ref[1]**o+(0.979829617988)*x_ref[1]+(0.853169987441)*x_ref[2]**o+(-0.945958722805)*x_ref[2]
-        ref[2,2,2,0]=(0.973689940887)*x_ref[0]**o+(-0.0585784323994)*x_ref[0]+(-0.472419744635)*x_ref[1]**o+(0.851814193674)*x_ref[1]+(-0.393393340405)*x_ref[2]**o+(-0.755376551633)*x_ref[2]
-        ref[2,2,2,1]=(-0.217049913648)*x_ref[0]**o+(-0.262150796255)*x_ref[0]+(-0.407805273745)*x_ref[1]**o+(0.819646964669)*x_ref[1]+(-0.0130316627236)*x_ref[2]**o+(0.179034130621)*x_ref[2]
-        ref[2,3,0,0]=(-0.377708814803)*x_ref[0]**o+(-0.943893058411)*x_ref[0]+(-0.354341838264)*x_ref[1]**o+(0.0696491295689)*x_ref[1]+(-0.192838410156)*x_ref[2]**o+(-0.22208932914)*x_ref[2]
-        ref[2,3,0,1]=(0.252429489766)*x_ref[0]**o+(0.808052283089)*x_ref[0]+(0.282941493712)*x_ref[1]**o+(0.89816007357)*x_ref[1]+(0.000979423783521)*x_ref[2]**o+(0.645599553602)*x_ref[2]
-        ref[2,3,1,0]=(0.788089987784)*x_ref[0]**o+(0.414254044423)*x_ref[0]+(0.105204158639)*x_ref[1]**o+(0.97527041289)*x_ref[1]+(0.447463569594)*x_ref[2]**o+(0.91465488394)*x_ref[2]
-        ref[2,3,1,1]=(0.882323493958)*x_ref[0]**o+(-0.98135461385)*x_ref[0]+(0.641881834427)*x_ref[1]**o+(-0.888068999894)*x_ref[1]+(0.705728558352)*x_ref[2]**o+(0.295815435834)*x_ref[2]
-        ref[2,3,2,0]=(-0.570666876652)*x_ref[0]**o+(0.52308582534)*x_ref[0]+(-0.604213776925)*x_ref[1]**o+(-0.568684610916)*x_ref[1]+(-0.0378463784885)*x_ref[2]**o+(0.557994858276)*x_ref[2]
-        ref[2,3,2,1]=(-0.497489149519)*x_ref[0]**o+(0.739341493998)*x_ref[0]+(-0.375869065986)*x_ref[1]**o+(-0.895553158302)*x_ref[1]+(0.916829505813)*x_ref[2]**o+(-0.650522069672)*x_ref[2]
-        ref[2,4,0,0]=(0.627540843427)*x_ref[0]**o+(-0.572125230014)*x_ref[0]+(-0.404781893475)*x_ref[1]**o+(-0.114896790942)*x_ref[1]+(-0.108914764977)*x_ref[2]**o+(0.739758413931)*x_ref[2]
-        ref[2,4,0,1]=(0.243205825969)*x_ref[0]**o+(-0.989602234642)*x_ref[0]+(-0.925730664677)*x_ref[1]**o+(0.454801040316)*x_ref[1]+(0.51758036389)*x_ref[2]**o+(0.325160660047)*x_ref[2]
-        ref[2,4,1,0]=(0.559764013478)*x_ref[0]**o+(2.69034311577e-05)*x_ref[0]+(-0.691119937581)*x_ref[1]**o+(-0.347457112767)*x_ref[1]+(0.714683489268)*x_ref[2]**o+(-0.589270137254)*x_ref[2]
-        ref[2,4,1,1]=(-0.657837524953)*x_ref[0]**o+(0.071158671662)*x_ref[0]+(-0.998677178035)*x_ref[1]**o+(-0.544136374784)*x_ref[1]+(0.6200901771)*x_ref[2]**o+(-0.280453395396)*x_ref[2]
-        ref[2,4,2,0]=(0.692403743003)*x_ref[0]**o+(-0.570086669428)*x_ref[0]+(0.455036498939)*x_ref[1]**o+(0.291433179453)*x_ref[1]+(-0.203004457401)*x_ref[2]**o+(0.0192489593981)*x_ref[2]
-        ref[2,4,2,1]=(-0.656783033826)*x_ref[0]**o+(0.865748949755)*x_ref[0]+(-0.297731124456)*x_ref[1]**o+(-0.826786841513)*x_ref[1]+(0.891374127144)*x_ref[2]**o+(-0.736789456498)*x_ref[2]
-        ref[3,0,0,0]=(-0.963120586854)*x_ref[0]**o+(0.466089565408)*x_ref[0]+(-0.785137906849)*x_ref[1]**o+(0.194880437113)*x_ref[1]+(0.652057839639)*x_ref[2]**o+(-0.63674893761)*x_ref[2]
-        ref[3,0,0,1]=(-0.923234625819)*x_ref[0]**o+(-0.303847080864)*x_ref[0]+(-0.374245465515)*x_ref[1]**o+(0.131093877726)*x_ref[1]+(-0.13469395748)*x_ref[2]**o+(0.42721676585)*x_ref[2]
-        ref[3,0,1,0]=(-0.613510153481)*x_ref[0]**o+(0.986696685318)*x_ref[0]+(0.188583200151)*x_ref[1]**o+(-0.895175969251)*x_ref[1]+(-0.699510846377)*x_ref[2]**o+(0.953157679279)*x_ref[2]
-        ref[3,0,1,1]=(-0.805809890231)*x_ref[0]**o+(-0.786467529592)*x_ref[0]+(-0.287240865489)*x_ref[1]**o+(-0.78714682888)*x_ref[1]+(-0.301034554724)*x_ref[2]**o+(0.698100092246)*x_ref[2]
-        ref[3,0,2,0]=(-0.29320618172)*x_ref[0]**o+(0.482436772935)*x_ref[0]+(-0.126052929261)*x_ref[1]**o+(-0.0638862140753)*x_ref[1]+(0.42769411972)*x_ref[2]**o+(0.741118745829)*x_ref[2]
-        ref[3,0,2,1]=(-0.380041427783)*x_ref[0]**o+(-0.0347904596008)*x_ref[0]+(-0.321599184546)*x_ref[1]**o+(-0.061333518544)*x_ref[1]+(-0.885193271364)*x_ref[2]**o+(0.216506075886)*x_ref[2]
-        ref[3,1,0,0]=(-0.872457576682)*x_ref[0]**o+(0.1368749584)*x_ref[0]+(0.883209741333)*x_ref[1]**o+(0.946644762296)*x_ref[1]+(-0.941665219846)*x_ref[2]**o+(0.683787986795)*x_ref[2]
-        ref[3,1,0,1]=(0.564843030077)*x_ref[0]**o+(0.987198898299)*x_ref[0]+(0.808116156661)*x_ref[1]**o+(-0.712172259479)*x_ref[1]+(0.942066890171)*x_ref[2]**o+(-0.265957158917)*x_ref[2]
-        ref[3,1,1,0]=(-0.171018264631)*x_ref[0]**o+(0.277202848962)*x_ref[0]+(0.0726306773528)*x_ref[1]**o+(-0.0265640725409)*x_ref[1]+(-0.871118922929)*x_ref[2]**o+(0.0562314512261)*x_ref[2]
-        ref[3,1,1,1]=(0.0861984079085)*x_ref[0]**o+(-0.954818837051)*x_ref[0]+(0.817362109646)*x_ref[1]**o+(-0.513086270222)*x_ref[1]+(-0.487472170741)*x_ref[2]**o+(0.702514192773)*x_ref[2]
-        ref[3,1,2,0]=(0.272419057202)*x_ref[0]**o+(-0.0454292509397)*x_ref[0]+(-0.117471126603)*x_ref[1]**o+(0.638237510553)*x_ref[1]+(0.156858948691)*x_ref[2]**o+(0.499459702141)*x_ref[2]
-        ref[3,1,2,1]=(-0.384525883334)*x_ref[0]**o+(-0.795638828759)*x_ref[0]+(-0.105795059118)*x_ref[1]**o+(0.539873566967)*x_ref[1]+(-0.402558868714)*x_ref[2]**o+(-0.690578475243)*x_ref[2]
-        ref[3,2,0,0]=(0.776889517136)*x_ref[0]**o+(0.710931840891)*x_ref[0]+(0.335992677388)*x_ref[1]**o+(-0.689182863932)*x_ref[1]+(0.294149805572)*x_ref[2]**o+(-0.144223257292)*x_ref[2]
-        ref[3,2,0,1]=(0.738703695733)*x_ref[0]**o+(-0.523207061995)*x_ref[0]+(0.707078352596)*x_ref[1]**o+(-0.594373978096)*x_ref[1]+(-0.833468457639)*x_ref[2]**o+(-0.60181674446)*x_ref[2]
-        ref[3,2,1,0]=(-0.70243682985)*x_ref[0]**o+(-0.557914174271)*x_ref[0]+(-0.97153723053)*x_ref[1]**o+(0.791692594024)*x_ref[1]+(-0.442273808305)*x_ref[2]**o+(-0.74069605321)*x_ref[2]
-        ref[3,2,1,1]=(0.136307039789)*x_ref[0]**o+(0.820661597623)*x_ref[0]+(0.379752060994)*x_ref[1]**o+(-0.739083116742)*x_ref[1]+(-0.964857055764)*x_ref[2]**o+(0.523159928671)*x_ref[2]
-        ref[3,2,2,0]=(0.530883295074)*x_ref[0]**o+(-0.859538509888)*x_ref[0]+(-0.33917158254)*x_ref[1]**o+(0.476510741055)*x_ref[1]+(0.851975683024)*x_ref[2]**o+(0.146277015139)*x_ref[2]
-        ref[3,2,2,1]=(-0.532984574212)*x_ref[0]**o+(-0.413169979754)*x_ref[0]+(0.0113284200501)*x_ref[1]**o+(0.406768750567)*x_ref[1]+(0.730968378807)*x_ref[2]**o+(-0.74004422909)*x_ref[2]
-        ref[3,3,0,0]=(0.784793271465)*x_ref[0]**o+(0.879569037436)*x_ref[0]+(0.687804194006)*x_ref[1]**o+(0.153617608524)*x_ref[1]+(-0.410247334526)*x_ref[2]**o+(0.147941373268)*x_ref[2]
-        ref[3,3,0,1]=(-0.896748874838)*x_ref[0]**o+(-0.408404228864)*x_ref[0]+(0.831967697989)*x_ref[1]**o+(-0.290875629476)*x_ref[1]+(-0.244101719785)*x_ref[2]**o+(0.240453425519)*x_ref[2]
-        ref[3,3,1,0]=(-0.352293918285)*x_ref[0]**o+(0.0341233590345)*x_ref[0]+(-0.0165872699681)*x_ref[1]**o+(-0.0668507705942)*x_ref[1]+(-0.133733710061)*x_ref[2]**o+(-0.00620237772745)*x_ref[2]
-        ref[3,3,1,1]=(0.173638606531)*x_ref[0]**o+(0.619705705811)*x_ref[0]+(0.279972531576)*x_ref[1]**o+(-0.0811181576037)*x_ref[1]+(-0.645673968637)*x_ref[2]**o+(0.913753411758)*x_ref[2]
-        ref[3,3,2,0]=(0.0623921286142)*x_ref[0]**o+(0.393414889204)*x_ref[0]+(-0.300034851075)*x_ref[1]**o+(-0.519515206457)*x_ref[1]+(-0.0074981731879)*x_ref[2]**o+(0.202996242895)*x_ref[2]
-        ref[3,3,2,1]=(0.583279597505)*x_ref[0]**o+(-0.940603487209)*x_ref[0]+(0.027966157338)*x_ref[1]**o+(0.251466344692)*x_ref[1]+(-0.97011033154)*x_ref[2]**o+(0.46527056203)*x_ref[2]
-        ref[3,4,0,0]=(0.865170740218)*x_ref[0]**o+(-0.466853211289)*x_ref[0]+(0.0935492537278)*x_ref[1]**o+(-0.632374632657)*x_ref[1]+(0.673466346463)*x_ref[2]**o+(-0.47934739873)*x_ref[2]
-        ref[3,4,0,1]=(0.0417451136027)*x_ref[0]**o+(-0.781570733286)*x_ref[0]+(0.547452389454)*x_ref[1]**o+(-0.0286368211528)*x_ref[1]+(-0.98907358808)*x_ref[2]**o+(0.62749495057)*x_ref[2]
-        ref[3,4,1,0]=(-0.632067479664)*x_ref[0]**o+(-0.872835386336)*x_ref[0]+(-0.228785631078)*x_ref[1]**o+(-0.224206127306)*x_ref[1]+(0.769729051217)*x_ref[2]**o+(-0.406750034352)*x_ref[2]
-        ref[3,4,1,1]=(0.216883071299)*x_ref[0]**o+(-0.225632200121)*x_ref[0]+(0.827186402743)*x_ref[1]**o+(0.161488636886)*x_ref[1]+(0.773801288836)*x_ref[2]**o+(0.977006832166)*x_ref[2]
-        ref[3,4,2,0]=(-0.867098845884)*x_ref[0]**o+(0.14989544838)*x_ref[0]+(0.756720043262)*x_ref[1]**o+(-0.496074302626)*x_ref[1]+(-0.662787072451)*x_ref[2]**o+(-0.142473973368)*x_ref[2]
-        ref[3,4,2,1]=(-0.294128396829)*x_ref[0]**o+(-0.931379392091)*x_ref[0]+(0.906552131161)*x_ref[1]**o+(-0.422008485494)*x_ref[1]+(0.806742455679)*x_ref[2]**o+(0.940488803006)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.387919945961)*x[0]**o+(-0.65988832446)*x[0]+(-0.271357984194)*x[1]**o+(0.911983947389)*x[1]
-        ref=(-0.387919945961)*x_ref[0]**o+(-0.65988832446)*x_ref[0]+(-0.271357984194)*x_ref[1]**o+(0.911983947389)*x_ref[1]
-      else:
-        arg=(-0.0447075351093)*x[0]**o+(0.253461091432)*x[0]+(-0.218567784216)*x[1]**o+(-0.79030708754)*x[1]+(0.977690873872)*x[2]**o+(0.832406975763)*x[2]
-        ref=(-0.0447075351093)*x_ref[0]**o+(0.253461091432)*x_ref[0]+(-0.218567784216)*x_ref[1]**o+(-0.79030708754)*x_ref[1]+(0.977690873872)*x_ref[2]**o+(0.832406975763)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.0351141106851)*x[0]**o+(-0.330587401)*x[0]+(0.244307738971)*x[1]**o+(0.623126601064)*x[1]
-        arg[1]=(-0.828515624351)*x[0]**o+(-0.128313696693)*x[0]+(-0.419830633587)*x[1]**o+(0.207694344977)*x[1]
-        ref[0]=(-0.0351141106851)*x_ref[0]**o+(-0.330587401)*x_ref[0]+(0.244307738971)*x_ref[1]**o+(0.623126601064)*x_ref[1]
-        ref[1]=(-0.828515624351)*x_ref[0]**o+(-0.128313696693)*x_ref[0]+(-0.419830633587)*x_ref[1]**o+(0.207694344977)*x_ref[1]
-      else:
-        arg[0]=(-0.704794455532)*x[0]**o+(0.913653448977)*x[0]+(-0.159574360706)*x[1]**o+(-0.766199806615)*x[1]+(-0.571643737767)*x[2]**o+(-0.818256320426)*x[2]
-        arg[1]=(-0.951104850067)*x[0]**o+(-0.661009825365)*x[0]+(0.415252265672)*x[1]**o+(-0.373834229809)*x[1]+(-0.727526942776)*x[2]**o+(-0.832051613933)*x[2]
-        ref[0]=(-0.704794455532)*x_ref[0]**o+(0.913653448977)*x_ref[0]+(-0.159574360706)*x_ref[1]**o+(-0.766199806615)*x_ref[1]+(-0.571643737767)*x_ref[2]**o+(-0.818256320426)*x_ref[2]
-        ref[1]=(-0.951104850067)*x_ref[0]**o+(-0.661009825365)*x_ref[0]+(0.415252265672)*x_ref[1]**o+(-0.373834229809)*x_ref[1]+(-0.727526942776)*x_ref[2]**o+(-0.832051613933)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.597205522265)*x[0]**o+(-0.990224489001)*x[0]+(0.409554155812)*x[1]**o+(0.0483989008223)*x[1]
-        arg[0,1]=(0.397936023817)*x[0]**o+(-0.930167709289)*x[0]+(0.92611965278)*x[1]**o+(-0.964519543905)*x[1]
-        arg[0,2]=(-0.311484417828)*x[0]**o+(-0.602916971577)*x[0]+(-0.420016358622)*x[1]**o+(0.837176635137)*x[1]
-        arg[0,3]=(0.819115285277)*x[0]**o+(0.34838887804)*x[0]+(-0.690550904634)*x[1]**o+(0.373665882427)*x[1]
-        arg[0,4]=(-0.7631912026)*x[0]**o+(-0.945320401033)*x[0]+(0.694292397122)*x[1]**o+(-0.420347487671)*x[1]
-        arg[1,0]=(-0.572828652444)*x[0]**o+(0.354646387926)*x[0]+(-0.0507519017004)*x[1]**o+(-0.613889773716)*x[1]
-        arg[1,1]=(-0.816957267715)*x[0]**o+(0.733537081373)*x[0]+(-0.660041553847)*x[1]**o+(0.441096986506)*x[1]
-        arg[1,2]=(-0.803370878245)*x[0]**o+(-0.876568267674)*x[0]+(0.530143828975)*x[1]**o+(0.208130191749)*x[1]
-        arg[1,3]=(-0.471900498331)*x[0]**o+(0.537812384385)*x[0]+(-0.882977296775)*x[1]**o+(-0.0668303027948)*x[1]
-        arg[1,4]=(0.145525825808)*x[0]**o+(-0.743588928172)*x[0]+(-0.571360483951)*x[1]**o+(-0.779639689697)*x[1]
-        arg[2,0]=(0.664624516473)*x[0]**o+(-0.903029393285)*x[0]+(-0.602274374813)*x[1]**o+(-0.0349025848298)*x[1]
-        arg[2,1]=(-0.826235832601)*x[0]**o+(-0.56956830806)*x[0]+(-0.720529973236)*x[1]**o+(0.844549160654)*x[1]
-        arg[2,2]=(0.865808902895)*x[0]**o+(0.806173922192)*x[0]+(-0.430500586315)*x[1]**o+(-0.903014287464)*x[1]
-        arg[2,3]=(0.567909856768)*x[0]**o+(0.702374819746)*x[0]+(-0.931635013223)*x[1]**o+(0.35484582218)*x[1]
-        arg[2,4]=(0.98750760384)*x[0]**o+(0.759340896388)*x[0]+(0.54913653446)*x[1]**o+(-0.620836882788)*x[1]
-        arg[3,0]=(-0.886288358587)*x[0]**o+(0.393932009441)*x[0]+(0.370738890674)*x[1]**o+(0.540588748949)*x[1]
-        arg[3,1]=(0.281435147449)*x[0]**o+(0.455838903759)*x[0]+(0.115176811183)*x[1]**o+(0.214335969407)*x[1]
-        arg[3,2]=(-0.939824922583)*x[0]**o+(-0.725457358605)*x[0]+(0.0326844083908)*x[1]**o+(-0.743922869733)*x[1]
-        arg[3,3]=(-0.189824771744)*x[0]**o+(-0.26508334021)*x[0]+(-0.323185410564)*x[1]**o+(0.242480018197)*x[1]
-        arg[3,4]=(-0.675784178633)*x[0]**o+(0.0995857467734)*x[0]+(0.564599922701)*x[1]**o+(-0.716819470891)*x[1]
-        ref[0,0]=(0.597205522265)*x_ref[0]**o+(-0.990224489001)*x_ref[0]+(0.409554155812)*x_ref[1]**o+(0.0483989008223)*x_ref[1]
-        ref[0,1]=(0.397936023817)*x_ref[0]**o+(-0.930167709289)*x_ref[0]+(0.92611965278)*x_ref[1]**o+(-0.964519543905)*x_ref[1]
-        ref[0,2]=(-0.311484417828)*x_ref[0]**o+(-0.602916971577)*x_ref[0]+(-0.420016358622)*x_ref[1]**o+(0.837176635137)*x_ref[1]
-        ref[0,3]=(0.819115285277)*x_ref[0]**o+(0.34838887804)*x_ref[0]+(-0.690550904634)*x_ref[1]**o+(0.373665882427)*x_ref[1]
-        ref[0,4]=(-0.7631912026)*x_ref[0]**o+(-0.945320401033)*x_ref[0]+(0.694292397122)*x_ref[1]**o+(-0.420347487671)*x_ref[1]
-        ref[1,0]=(-0.572828652444)*x_ref[0]**o+(0.354646387926)*x_ref[0]+(-0.0507519017004)*x_ref[1]**o+(-0.613889773716)*x_ref[1]
-        ref[1,1]=(-0.816957267715)*x_ref[0]**o+(0.733537081373)*x_ref[0]+(-0.660041553847)*x_ref[1]**o+(0.441096986506)*x_ref[1]
-        ref[1,2]=(-0.803370878245)*x_ref[0]**o+(-0.876568267674)*x_ref[0]+(0.530143828975)*x_ref[1]**o+(0.208130191749)*x_ref[1]
-        ref[1,3]=(-0.471900498331)*x_ref[0]**o+(0.537812384385)*x_ref[0]+(-0.882977296775)*x_ref[1]**o+(-0.0668303027948)*x_ref[1]
-        ref[1,4]=(0.145525825808)*x_ref[0]**o+(-0.743588928172)*x_ref[0]+(-0.571360483951)*x_ref[1]**o+(-0.779639689697)*x_ref[1]
-        ref[2,0]=(0.664624516473)*x_ref[0]**o+(-0.903029393285)*x_ref[0]+(-0.602274374813)*x_ref[1]**o+(-0.0349025848298)*x_ref[1]
-        ref[2,1]=(-0.826235832601)*x_ref[0]**o+(-0.56956830806)*x_ref[0]+(-0.720529973236)*x_ref[1]**o+(0.844549160654)*x_ref[1]
-        ref[2,2]=(0.865808902895)*x_ref[0]**o+(0.806173922192)*x_ref[0]+(-0.430500586315)*x_ref[1]**o+(-0.903014287464)*x_ref[1]
-        ref[2,3]=(0.567909856768)*x_ref[0]**o+(0.702374819746)*x_ref[0]+(-0.931635013223)*x_ref[1]**o+(0.35484582218)*x_ref[1]
-        ref[2,4]=(0.98750760384)*x_ref[0]**o+(0.759340896388)*x_ref[0]+(0.54913653446)*x_ref[1]**o+(-0.620836882788)*x_ref[1]
-        ref[3,0]=(-0.886288358587)*x_ref[0]**o+(0.393932009441)*x_ref[0]+(0.370738890674)*x_ref[1]**o+(0.540588748949)*x_ref[1]
-        ref[3,1]=(0.281435147449)*x_ref[0]**o+(0.455838903759)*x_ref[0]+(0.115176811183)*x_ref[1]**o+(0.214335969407)*x_ref[1]
-        ref[3,2]=(-0.939824922583)*x_ref[0]**o+(-0.725457358605)*x_ref[0]+(0.0326844083908)*x_ref[1]**o+(-0.743922869733)*x_ref[1]
-        ref[3,3]=(-0.189824771744)*x_ref[0]**o+(-0.26508334021)*x_ref[0]+(-0.323185410564)*x_ref[1]**o+(0.242480018197)*x_ref[1]
-        ref[3,4]=(-0.675784178633)*x_ref[0]**o+(0.0995857467734)*x_ref[0]+(0.564599922701)*x_ref[1]**o+(-0.716819470891)*x_ref[1]
-      else:
-        arg[0,0]=(0.0429272016915)*x[0]**o+(-0.277438145968)*x[0]+(-0.663736923945)*x[1]**o+(0.754568662274)*x[1]+(-0.702929906882)*x[2]**o+(-0.744050838266)*x[2]
-        arg[0,1]=(-0.245995343753)*x[0]**o+(-0.838699721329)*x[0]+(-0.266398695342)*x[1]**o+(0.116104359849)*x[1]+(-0.62406648751)*x[2]**o+(-0.85767565383)*x[2]
-        arg[0,2]=(-0.969332932419)*x[0]**o+(-0.815839911463)*x[0]+(0.0532903209734)*x[1]**o+(-0.00108699727615)*x[1]+(0.142541999046)*x[2]**o+(0.971482543817)*x[2]
-        arg[0,3]=(-0.73941517118)*x[0]**o+(0.728994326071)*x[0]+(0.962711932241)*x[1]**o+(-0.418607572448)*x[1]+(-0.374703265781)*x[2]**o+(-0.278661032739)*x[2]
-        arg[0,4]=(-0.258020436163)*x[0]**o+(-0.0252121036831)*x[0]+(-0.756480314139)*x[1]**o+(-0.705045476776)*x[1]+(0.222309499093)*x[2]**o+(0.999237507123)*x[2]
-        arg[1,0]=(-0.00753673411562)*x[0]**o+(-0.712947643092)*x[0]+(-0.946860154348)*x[1]**o+(-0.887293091702)*x[1]+(-0.57071975934)*x[2]**o+(-0.000995212472675)*x[2]
-        arg[1,1]=(-0.547724214274)*x[0]**o+(-0.338492998124)*x[0]+(-0.191652366102)*x[1]**o+(-0.260315919511)*x[1]+(-0.103992070026)*x[2]**o+(-0.836638261621)*x[2]
-        arg[1,2]=(-0.354711259362)*x[0]**o+(-0.916549411392)*x[0]+(0.744081321252)*x[1]**o+(-0.375805257126)*x[1]+(-0.78900115815)*x[2]**o+(-0.431116699853)*x[2]
-        arg[1,3]=(0.543469030875)*x[0]**o+(-0.154316090927)*x[0]+(0.794234357287)*x[1]**o+(-0.894714087173)*x[1]+(-0.523490310245)*x[2]**o+(-0.734864830975)*x[2]
-        arg[1,4]=(0.856478460898)*x[0]**o+(0.550846305146)*x[0]+(0.883099588119)*x[1]**o+(-0.928432890741)*x[1]+(0.953422014409)*x[2]**o+(-0.0295234113856)*x[2]
-        arg[2,0]=(0.391420547389)*x[0]**o+(-0.0618665973255)*x[0]+(-0.536627285311)*x[1]**o+(-0.701891441965)*x[1]+(0.433098401229)*x[2]**o+(-0.821674981019)*x[2]
-        arg[2,1]=(0.102455732687)*x[0]**o+(0.168078832413)*x[0]+(0.911099070324)*x[1]**o+(-0.776659572448)*x[1]+(0.942192938907)*x[2]**o+(-0.96284944292)*x[2]
-        arg[2,2]=(0.677666801373)*x[0]**o+(0.579429978893)*x[0]+(-0.642666485576)*x[1]**o+(-0.0709929161913)*x[1]+(-0.686526389023)*x[2]**o+(0.0941806754766)*x[2]
-        arg[2,3]=(-0.942137271102)*x[0]**o+(-0.448762007046)*x[0]+(0.403668316046)*x[1]**o+(-0.885790833279)*x[1]+(0.0448846125948)*x[2]**o+(0.123128346219)*x[2]
-        arg[2,4]=(0.64615774988)*x[0]**o+(0.641971975809)*x[0]+(-0.0486200548159)*x[1]**o+(0.106284669825)*x[1]+(0.968867785284)*x[2]**o+(-0.693546581787)*x[2]
-        arg[3,0]=(-0.0926306498682)*x[0]**o+(0.759541313455)*x[0]+(-0.569638025121)*x[1]**o+(0.236957551756)*x[1]+(-0.137429816873)*x[2]**o+(0.285836556676)*x[2]
-        arg[3,1]=(0.0382484871512)*x[0]**o+(-0.481489628305)*x[0]+(0.809404670659)*x[1]**o+(0.124155422674)*x[1]+(-0.239216545446)*x[2]**o+(0.436110807769)*x[2]
-        arg[3,2]=(-0.154044250435)*x[0]**o+(0.730285603192)*x[0]+(-0.986531989452)*x[1]**o+(0.0424454222102)*x[1]+(0.9651845632)*x[2]**o+(-0.173872544124)*x[2]
-        arg[3,3]=(-0.528075843446)*x[0]**o+(0.226347788534)*x[0]+(-0.314941509835)*x[1]**o+(0.508180139398)*x[1]+(0.681251000904)*x[2]**o+(-0.442663397606)*x[2]
-        arg[3,4]=(-0.335444251365)*x[0]**o+(-0.7788088839)*x[0]+(0.602538296871)*x[1]**o+(-0.440564659745)*x[1]+(-0.204809090144)*x[2]**o+(-0.449409088071)*x[2]
-        ref[0,0]=(0.0429272016915)*x_ref[0]**o+(-0.277438145968)*x_ref[0]+(-0.663736923945)*x_ref[1]**o+(0.754568662274)*x_ref[1]+(-0.702929906882)*x_ref[2]**o+(-0.744050838266)*x_ref[2]
-        ref[0,1]=(-0.245995343753)*x_ref[0]**o+(-0.838699721329)*x_ref[0]+(-0.266398695342)*x_ref[1]**o+(0.116104359849)*x_ref[1]+(-0.62406648751)*x_ref[2]**o+(-0.85767565383)*x_ref[2]
-        ref[0,2]=(-0.969332932419)*x_ref[0]**o+(-0.815839911463)*x_ref[0]+(0.0532903209734)*x_ref[1]**o+(-0.00108699727615)*x_ref[1]+(0.142541999046)*x_ref[2]**o+(0.971482543817)*x_ref[2]
-        ref[0,3]=(-0.73941517118)*x_ref[0]**o+(0.728994326071)*x_ref[0]+(0.962711932241)*x_ref[1]**o+(-0.418607572448)*x_ref[1]+(-0.374703265781)*x_ref[2]**o+(-0.278661032739)*x_ref[2]
-        ref[0,4]=(-0.258020436163)*x_ref[0]**o+(-0.0252121036831)*x_ref[0]+(-0.756480314139)*x_ref[1]**o+(-0.705045476776)*x_ref[1]+(0.222309499093)*x_ref[2]**o+(0.999237507123)*x_ref[2]
-        ref[1,0]=(-0.00753673411562)*x_ref[0]**o+(-0.712947643092)*x_ref[0]+(-0.946860154348)*x_ref[1]**o+(-0.887293091702)*x_ref[1]+(-0.57071975934)*x_ref[2]**o+(-0.000995212472675)*x_ref[2]
-        ref[1,1]=(-0.547724214274)*x_ref[0]**o+(-0.338492998124)*x_ref[0]+(-0.191652366102)*x_ref[1]**o+(-0.260315919511)*x_ref[1]+(-0.103992070026)*x_ref[2]**o+(-0.836638261621)*x_ref[2]
-        ref[1,2]=(-0.354711259362)*x_ref[0]**o+(-0.916549411392)*x_ref[0]+(0.744081321252)*x_ref[1]**o+(-0.375805257126)*x_ref[1]+(-0.78900115815)*x_ref[2]**o+(-0.431116699853)*x_ref[2]
-        ref[1,3]=(0.543469030875)*x_ref[0]**o+(-0.154316090927)*x_ref[0]+(0.794234357287)*x_ref[1]**o+(-0.894714087173)*x_ref[1]+(-0.523490310245)*x_ref[2]**o+(-0.734864830975)*x_ref[2]
-        ref[1,4]=(0.856478460898)*x_ref[0]**o+(0.550846305146)*x_ref[0]+(0.883099588119)*x_ref[1]**o+(-0.928432890741)*x_ref[1]+(0.953422014409)*x_ref[2]**o+(-0.0295234113856)*x_ref[2]
-        ref[2,0]=(0.391420547389)*x_ref[0]**o+(-0.0618665973255)*x_ref[0]+(-0.536627285311)*x_ref[1]**o+(-0.701891441965)*x_ref[1]+(0.433098401229)*x_ref[2]**o+(-0.821674981019)*x_ref[2]
-        ref[2,1]=(0.102455732687)*x_ref[0]**o+(0.168078832413)*x_ref[0]+(0.911099070324)*x_ref[1]**o+(-0.776659572448)*x_ref[1]+(0.942192938907)*x_ref[2]**o+(-0.96284944292)*x_ref[2]
-        ref[2,2]=(0.677666801373)*x_ref[0]**o+(0.579429978893)*x_ref[0]+(-0.642666485576)*x_ref[1]**o+(-0.0709929161913)*x_ref[1]+(-0.686526389023)*x_ref[2]**o+(0.0941806754766)*x_ref[2]
-        ref[2,3]=(-0.942137271102)*x_ref[0]**o+(-0.448762007046)*x_ref[0]+(0.403668316046)*x_ref[1]**o+(-0.885790833279)*x_ref[1]+(0.0448846125948)*x_ref[2]**o+(0.123128346219)*x_ref[2]
-        ref[2,4]=(0.64615774988)*x_ref[0]**o+(0.641971975809)*x_ref[0]+(-0.0486200548159)*x_ref[1]**o+(0.106284669825)*x_ref[1]+(0.968867785284)*x_ref[2]**o+(-0.693546581787)*x_ref[2]
-        ref[3,0]=(-0.0926306498682)*x_ref[0]**o+(0.759541313455)*x_ref[0]+(-0.569638025121)*x_ref[1]**o+(0.236957551756)*x_ref[1]+(-0.137429816873)*x_ref[2]**o+(0.285836556676)*x_ref[2]
-        ref[3,1]=(0.0382484871512)*x_ref[0]**o+(-0.481489628305)*x_ref[0]+(0.809404670659)*x_ref[1]**o+(0.124155422674)*x_ref[1]+(-0.239216545446)*x_ref[2]**o+(0.436110807769)*x_ref[2]
-        ref[3,2]=(-0.154044250435)*x_ref[0]**o+(0.730285603192)*x_ref[0]+(-0.986531989452)*x_ref[1]**o+(0.0424454222102)*x_ref[1]+(0.9651845632)*x_ref[2]**o+(-0.173872544124)*x_ref[2]
-        ref[3,3]=(-0.528075843446)*x_ref[0]**o+(0.226347788534)*x_ref[0]+(-0.314941509835)*x_ref[1]**o+(0.508180139398)*x_ref[1]+(0.681251000904)*x_ref[2]**o+(-0.442663397606)*x_ref[2]
-        ref[3,4]=(-0.335444251365)*x_ref[0]**o+(-0.7788088839)*x_ref[0]+(0.602538296871)*x_ref[1]**o+(-0.440564659745)*x_ref[1]+(-0.204809090144)*x_ref[2]**o+(-0.449409088071)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.88752640419)*x[0]**o+(-0.432514405615)*x[0]+(0.714823891809)*x[1]**o+(0.697307667986)*x[1]
-        arg[0,0,1]=(0.738741506554)*x[0]**o+(0.188618518993)*x[0]+(-0.482898810269)*x[1]**o+(-0.914123176195)*x[1]
-        arg[0,1,0]=(0.863872888691)*x[0]**o+(0.74507667202)*x[0]+(0.363690250942)*x[1]**o+(0.578470064401)*x[1]
-        arg[0,1,1]=(-0.764594250812)*x[0]**o+(0.692105995894)*x[0]+(-0.950074761486)*x[1]**o+(-0.229643756622)*x[1]
-        arg[1,0,0]=(-0.514123807377)*x[0]**o+(-0.770729480038)*x[0]+(-0.0503641588682)*x[1]**o+(-0.334340604627)*x[1]
-        arg[1,0,1]=(-0.753427043851)*x[0]**o+(0.482153344254)*x[0]+(0.00162169870171)*x[1]**o+(-0.877830413948)*x[1]
-        arg[1,1,0]=(0.603963041861)*x[0]**o+(-0.545048115282)*x[0]+(0.464500827027)*x[1]**o+(-0.527556750287)*x[1]
-        arg[1,1,1]=(0.753201247064)*x[0]**o+(-0.99039225613)*x[0]+(-0.787959315932)*x[1]**o+(-0.918878072132)*x[1]
-        arg[2,0,0]=(0.254002467345)*x[0]**o+(-0.918196533244)*x[0]+(-0.178408279918)*x[1]**o+(0.14954396814)*x[1]
-        arg[2,0,1]=(0.449025666157)*x[0]**o+(-0.854430018688)*x[0]+(0.0393762923755)*x[1]**o+(0.576680446192)*x[1]
-        arg[2,1,0]=(-0.252429553053)*x[0]**o+(-0.300398117312)*x[0]+(-0.0197102583755)*x[1]**o+(-0.189780116752)*x[1]
-        arg[2,1,1]=(0.406291235871)*x[0]**o+(-0.763190166909)*x[0]+(-0.219957648446)*x[1]**o+(-0.928990138166)*x[1]
-        arg[3,0,0]=(0.947321725555)*x[0]**o+(0.35310915009)*x[0]+(0.436067723051)*x[1]**o+(-0.86339979781)*x[1]
-        arg[3,0,1]=(0.349458398624)*x[0]**o+(-0.139435138128)*x[0]+(-0.239809689531)*x[1]**o+(-0.0600998666403)*x[1]
-        arg[3,1,0]=(-0.630539588121)*x[0]**o+(-0.700765237169)*x[0]+(-0.333988786061)*x[1]**o+(-0.125401172016)*x[1]
-        arg[3,1,1]=(0.726389530806)*x[0]**o+(-0.691681620304)*x[0]+(0.241060086313)*x[1]**o+(-0.0970053499082)*x[1]
-        arg[4,0,0]=(-0.798548958727)*x[0]**o+(0.429037250139)*x[0]+(0.598115431903)*x[1]**o+(-0.688464532796)*x[1]
-        arg[4,0,1]=(0.698302852699)*x[0]**o+(0.36852807703)*x[0]+(-0.570086427187)*x[1]**o+(0.110387807246)*x[1]
-        arg[4,1,0]=(0.295729624355)*x[0]**o+(0.247060092718)*x[0]+(-0.874774487091)*x[1]**o+(-0.40111840264)*x[1]
-        arg[4,1,1]=(-0.773206505432)*x[0]**o+(-0.238827976714)*x[0]+(0.994288595399)*x[1]**o+(-0.6429945796)*x[1]
-        arg[5,0,0]=(-0.398445578383)*x[0]**o+(-0.893518494161)*x[0]+(-0.855543638814)*x[1]**o+(0.93304149836)*x[1]
-        arg[5,0,1]=(-0.811797150327)*x[0]**o+(0.0702614194127)*x[0]+(-0.0906132870911)*x[1]**o+(-0.944409144857)*x[1]
-        arg[5,1,0]=(0.710407361984)*x[0]**o+(-0.854493576437)*x[0]+(-0.354683789897)*x[1]**o+(-0.896605671415)*x[1]
-        arg[5,1,1]=(0.0668604398168)*x[0]**o+(0.464597275769)*x[0]+(-0.683756009627)*x[1]**o+(-0.368806656344)*x[1]
-        ref[0,0,0]=(0.88752640419)*x_ref[0]**o+(-0.432514405615)*x_ref[0]+(0.714823891809)*x_ref[1]**o+(0.697307667986)*x_ref[1]
-        ref[0,0,1]=(0.738741506554)*x_ref[0]**o+(0.188618518993)*x_ref[0]+(-0.482898810269)*x_ref[1]**o+(-0.914123176195)*x_ref[1]
-        ref[0,1,0]=(0.863872888691)*x_ref[0]**o+(0.74507667202)*x_ref[0]+(0.363690250942)*x_ref[1]**o+(0.578470064401)*x_ref[1]
-        ref[0,1,1]=(-0.764594250812)*x_ref[0]**o+(0.692105995894)*x_ref[0]+(-0.950074761486)*x_ref[1]**o+(-0.229643756622)*x_ref[1]
-        ref[1,0,0]=(-0.514123807377)*x_ref[0]**o+(-0.770729480038)*x_ref[0]+(-0.0503641588682)*x_ref[1]**o+(-0.334340604627)*x_ref[1]
-        ref[1,0,1]=(-0.753427043851)*x_ref[0]**o+(0.482153344254)*x_ref[0]+(0.00162169870171)*x_ref[1]**o+(-0.877830413948)*x_ref[1]
-        ref[1,1,0]=(0.603963041861)*x_ref[0]**o+(-0.545048115282)*x_ref[0]+(0.464500827027)*x_ref[1]**o+(-0.527556750287)*x_ref[1]
-        ref[1,1,1]=(0.753201247064)*x_ref[0]**o+(-0.99039225613)*x_ref[0]+(-0.787959315932)*x_ref[1]**o+(-0.918878072132)*x_ref[1]
-        ref[2,0,0]=(0.254002467345)*x_ref[0]**o+(-0.918196533244)*x_ref[0]+(-0.178408279918)*x_ref[1]**o+(0.14954396814)*x_ref[1]
-        ref[2,0,1]=(0.449025666157)*x_ref[0]**o+(-0.854430018688)*x_ref[0]+(0.0393762923755)*x_ref[1]**o+(0.576680446192)*x_ref[1]
-        ref[2,1,0]=(-0.252429553053)*x_ref[0]**o+(-0.300398117312)*x_ref[0]+(-0.0197102583755)*x_ref[1]**o+(-0.189780116752)*x_ref[1]
-        ref[2,1,1]=(0.406291235871)*x_ref[0]**o+(-0.763190166909)*x_ref[0]+(-0.219957648446)*x_ref[1]**o+(-0.928990138166)*x_ref[1]
-        ref[3,0,0]=(0.947321725555)*x_ref[0]**o+(0.35310915009)*x_ref[0]+(0.436067723051)*x_ref[1]**o+(-0.86339979781)*x_ref[1]
-        ref[3,0,1]=(0.349458398624)*x_ref[0]**o+(-0.139435138128)*x_ref[0]+(-0.239809689531)*x_ref[1]**o+(-0.0600998666403)*x_ref[1]
-        ref[3,1,0]=(-0.630539588121)*x_ref[0]**o+(-0.700765237169)*x_ref[0]+(-0.333988786061)*x_ref[1]**o+(-0.125401172016)*x_ref[1]
-        ref[3,1,1]=(0.726389530806)*x_ref[0]**o+(-0.691681620304)*x_ref[0]+(0.241060086313)*x_ref[1]**o+(-0.0970053499082)*x_ref[1]
-        ref[4,0,0]=(-0.798548958727)*x_ref[0]**o+(0.429037250139)*x_ref[0]+(0.598115431903)*x_ref[1]**o+(-0.688464532796)*x_ref[1]
-        ref[4,0,1]=(0.698302852699)*x_ref[0]**o+(0.36852807703)*x_ref[0]+(-0.570086427187)*x_ref[1]**o+(0.110387807246)*x_ref[1]
-        ref[4,1,0]=(0.295729624355)*x_ref[0]**o+(0.247060092718)*x_ref[0]+(-0.874774487091)*x_ref[1]**o+(-0.40111840264)*x_ref[1]
-        ref[4,1,1]=(-0.773206505432)*x_ref[0]**o+(-0.238827976714)*x_ref[0]+(0.994288595399)*x_ref[1]**o+(-0.6429945796)*x_ref[1]
-        ref[5,0,0]=(-0.398445578383)*x_ref[0]**o+(-0.893518494161)*x_ref[0]+(-0.855543638814)*x_ref[1]**o+(0.93304149836)*x_ref[1]
-        ref[5,0,1]=(-0.811797150327)*x_ref[0]**o+(0.0702614194127)*x_ref[0]+(-0.0906132870911)*x_ref[1]**o+(-0.944409144857)*x_ref[1]
-        ref[5,1,0]=(0.710407361984)*x_ref[0]**o+(-0.854493576437)*x_ref[0]+(-0.354683789897)*x_ref[1]**o+(-0.896605671415)*x_ref[1]
-        ref[5,1,1]=(0.0668604398168)*x_ref[0]**o+(0.464597275769)*x_ref[0]+(-0.683756009627)*x_ref[1]**o+(-0.368806656344)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.0873708254613)*x[0]**o+(-0.843989447866)*x[0]+(0.44751871924)*x[1]**o+(0.56511771844)*x[1]+(0.367414341304)*x[2]**o+(-0.147729223167)*x[2]
-        arg[0,0,1]=(0.00752707306425)*x[0]**o+(0.819213438452)*x[0]+(0.14826826627)*x[1]**o+(-0.169362794728)*x[1]+(0.51736237082)*x[2]**o+(0.832746819884)*x[2]
-        arg[0,1,0]=(0.607746431545)*x[0]**o+(0.253170100132)*x[0]+(-0.992132084299)*x[1]**o+(0.353865695431)*x[1]+(-0.787229685473)*x[2]**o+(0.86154695401)*x[2]
-        arg[0,1,1]=(0.563636829468)*x[0]**o+(0.459627185677)*x[0]+(-0.511957702356)*x[1]**o+(0.309573033639)*x[1]+(0.806861185555)*x[2]**o+(0.182177897377)*x[2]
-        arg[1,0,0]=(0.600850271814)*x[0]**o+(0.440922206975)*x[0]+(0.0307377466119)*x[1]**o+(-0.419096719454)*x[1]+(0.979284456332)*x[2]**o+(-0.00240732351601)*x[2]
-        arg[1,0,1]=(0.51273517393)*x[0]**o+(-0.947643736857)*x[0]+(0.272403256871)*x[1]**o+(0.0119584891405)*x[1]+(-0.290604573286)*x[2]**o+(0.822291254588)*x[2]
-        arg[1,1,0]=(-0.201909330605)*x[0]**o+(-0.560221198146)*x[0]+(0.564306911695)*x[1]**o+(-0.936933580593)*x[1]+(-0.41391834592)*x[2]**o+(0.133244793725)*x[2]
-        arg[1,1,1]=(0.13318221571)*x[0]**o+(-0.565278280388)*x[0]+(0.677613822728)*x[1]**o+(-0.386612668638)*x[1]+(0.207570026134)*x[2]**o+(0.798362457061)*x[2]
-        arg[2,0,0]=(-0.3777906845)*x[0]**o+(-0.285455928514)*x[0]+(-0.0901885959293)*x[1]**o+(-0.385922214051)*x[1]+(0.322566508003)*x[2]**o+(0.171191301702)*x[2]
-        arg[2,0,1]=(-0.113954650916)*x[0]**o+(-0.373563461907)*x[0]+(0.73321196284)*x[1]**o+(0.535150793249)*x[1]+(-0.736944901672)*x[2]**o+(0.86133553525)*x[2]
-        arg[2,1,0]=(-0.724228484035)*x[0]**o+(0.310971627294)*x[0]+(-0.497468717028)*x[1]**o+(0.467315341957)*x[1]+(-0.598941984951)*x[2]**o+(0.990367400534)*x[2]
-        arg[2,1,1]=(0.594502107684)*x[0]**o+(0.261477996581)*x[0]+(0.738413631986)*x[1]**o+(0.363468523272)*x[1]+(-0.945845846052)*x[2]**o+(0.281144164925)*x[2]
-        arg[3,0,0]=(0.804174935673)*x[0]**o+(-0.633954348085)*x[0]+(-0.953193492156)*x[1]**o+(0.632681376482)*x[1]+(-0.409900341362)*x[2]**o+(0.951988363964)*x[2]
-        arg[3,0,1]=(-0.469895421121)*x[0]**o+(0.666115304582)*x[0]+(0.676351738247)*x[1]**o+(-0.0738256360284)*x[1]+(0.34976675523)*x[2]**o+(-0.561058490613)*x[2]
-        arg[3,1,0]=(-0.999916478236)*x[0]**o+(-0.362871459365)*x[0]+(0.645604661917)*x[1]**o+(0.215878330855)*x[1]+(-0.0561173996823)*x[2]**o+(0.272143302204)*x[2]
-        arg[3,1,1]=(0.233461828376)*x[0]**o+(-0.110673705352)*x[0]+(0.699710673197)*x[1]**o+(-0.628805264645)*x[1]+(0.677467640352)*x[2]**o+(-0.156224522726)*x[2]
-        arg[4,0,0]=(0.180468931719)*x[0]**o+(0.299451524372)*x[0]+(-0.677131137371)*x[1]**o+(-0.422802649252)*x[1]+(0.237349200367)*x[2]**o+(0.739758623757)*x[2]
-        arg[4,0,1]=(0.22209981155)*x[0]**o+(-0.226751058136)*x[0]+(-0.0345697170216)*x[1]**o+(0.265795819906)*x[1]+(0.542547943322)*x[2]**o+(0.785610668157)*x[2]
-        arg[4,1,0]=(-0.520898604151)*x[0]**o+(-0.84307105084)*x[0]+(0.818061645146)*x[1]**o+(-0.173710357379)*x[1]+(0.344023171063)*x[2]**o+(0.194662166094)*x[2]
-        arg[4,1,1]=(-0.288466404824)*x[0]**o+(-0.891856587908)*x[0]+(0.378329571068)*x[1]**o+(0.437919935526)*x[1]+(-0.630733422962)*x[2]**o+(0.518444630882)*x[2]
-        arg[5,0,0]=(0.00978685202942)*x[0]**o+(-0.474443494209)*x[0]+(-0.509964215112)*x[1]**o+(0.341199671453)*x[1]+(-0.459333887251)*x[2]**o+(0.491961590667)*x[2]
-        arg[5,0,1]=(-0.899850325159)*x[0]**o+(-0.191369137667)*x[0]+(0.18882430985)*x[1]**o+(-0.185214597442)*x[1]+(-0.967187797553)*x[2]**o+(0.366127839986)*x[2]
-        arg[5,1,0]=(0.428007441668)*x[0]**o+(0.920828656579)*x[0]+(-0.298863178441)*x[1]**o+(-0.226020983335)*x[1]+(-0.01907141259)*x[2]**o+(-0.359698040557)*x[2]
-        arg[5,1,1]=(0.980673633441)*x[0]**o+(0.362357489872)*x[0]+(0.825233899658)*x[1]**o+(0.846433827949)*x[1]+(-0.870197174533)*x[2]**o+(0.621884204716)*x[2]
-        ref[0,0,0]=(-0.0873708254613)*x_ref[0]**o+(-0.843989447866)*x_ref[0]+(0.44751871924)*x_ref[1]**o+(0.56511771844)*x_ref[1]+(0.367414341304)*x_ref[2]**o+(-0.147729223167)*x_ref[2]
-        ref[0,0,1]=(0.00752707306425)*x_ref[0]**o+(0.819213438452)*x_ref[0]+(0.14826826627)*x_ref[1]**o+(-0.169362794728)*x_ref[1]+(0.51736237082)*x_ref[2]**o+(0.832746819884)*x_ref[2]
-        ref[0,1,0]=(0.607746431545)*x_ref[0]**o+(0.253170100132)*x_ref[0]+(-0.992132084299)*x_ref[1]**o+(0.353865695431)*x_ref[1]+(-0.787229685473)*x_ref[2]**o+(0.86154695401)*x_ref[2]
-        ref[0,1,1]=(0.563636829468)*x_ref[0]**o+(0.459627185677)*x_ref[0]+(-0.511957702356)*x_ref[1]**o+(0.309573033639)*x_ref[1]+(0.806861185555)*x_ref[2]**o+(0.182177897377)*x_ref[2]
-        ref[1,0,0]=(0.600850271814)*x_ref[0]**o+(0.440922206975)*x_ref[0]+(0.0307377466119)*x_ref[1]**o+(-0.419096719454)*x_ref[1]+(0.979284456332)*x_ref[2]**o+(-0.00240732351601)*x_ref[2]
-        ref[1,0,1]=(0.51273517393)*x_ref[0]**o+(-0.947643736857)*x_ref[0]+(0.272403256871)*x_ref[1]**o+(0.0119584891405)*x_ref[1]+(-0.290604573286)*x_ref[2]**o+(0.822291254588)*x_ref[2]
-        ref[1,1,0]=(-0.201909330605)*x_ref[0]**o+(-0.560221198146)*x_ref[0]+(0.564306911695)*x_ref[1]**o+(-0.936933580593)*x_ref[1]+(-0.41391834592)*x_ref[2]**o+(0.133244793725)*x_ref[2]
-        ref[1,1,1]=(0.13318221571)*x_ref[0]**o+(-0.565278280388)*x_ref[0]+(0.677613822728)*x_ref[1]**o+(-0.386612668638)*x_ref[1]+(0.207570026134)*x_ref[2]**o+(0.798362457061)*x_ref[2]
-        ref[2,0,0]=(-0.3777906845)*x_ref[0]**o+(-0.285455928514)*x_ref[0]+(-0.0901885959293)*x_ref[1]**o+(-0.385922214051)*x_ref[1]+(0.322566508003)*x_ref[2]**o+(0.171191301702)*x_ref[2]
-        ref[2,0,1]=(-0.113954650916)*x_ref[0]**o+(-0.373563461907)*x_ref[0]+(0.73321196284)*x_ref[1]**o+(0.535150793249)*x_ref[1]+(-0.736944901672)*x_ref[2]**o+(0.86133553525)*x_ref[2]
-        ref[2,1,0]=(-0.724228484035)*x_ref[0]**o+(0.310971627294)*x_ref[0]+(-0.497468717028)*x_ref[1]**o+(0.467315341957)*x_ref[1]+(-0.598941984951)*x_ref[2]**o+(0.990367400534)*x_ref[2]
-        ref[2,1,1]=(0.594502107684)*x_ref[0]**o+(0.261477996581)*x_ref[0]+(0.738413631986)*x_ref[1]**o+(0.363468523272)*x_ref[1]+(-0.945845846052)*x_ref[2]**o+(0.281144164925)*x_ref[2]
-        ref[3,0,0]=(0.804174935673)*x_ref[0]**o+(-0.633954348085)*x_ref[0]+(-0.953193492156)*x_ref[1]**o+(0.632681376482)*x_ref[1]+(-0.409900341362)*x_ref[2]**o+(0.951988363964)*x_ref[2]
-        ref[3,0,1]=(-0.469895421121)*x_ref[0]**o+(0.666115304582)*x_ref[0]+(0.676351738247)*x_ref[1]**o+(-0.0738256360284)*x_ref[1]+(0.34976675523)*x_ref[2]**o+(-0.561058490613)*x_ref[2]
-        ref[3,1,0]=(-0.999916478236)*x_ref[0]**o+(-0.362871459365)*x_ref[0]+(0.645604661917)*x_ref[1]**o+(0.215878330855)*x_ref[1]+(-0.0561173996823)*x_ref[2]**o+(0.272143302204)*x_ref[2]
-        ref[3,1,1]=(0.233461828376)*x_ref[0]**o+(-0.110673705352)*x_ref[0]+(0.699710673197)*x_ref[1]**o+(-0.628805264645)*x_ref[1]+(0.677467640352)*x_ref[2]**o+(-0.156224522726)*x_ref[2]
-        ref[4,0,0]=(0.180468931719)*x_ref[0]**o+(0.299451524372)*x_ref[0]+(-0.677131137371)*x_ref[1]**o+(-0.422802649252)*x_ref[1]+(0.237349200367)*x_ref[2]**o+(0.739758623757)*x_ref[2]
-        ref[4,0,1]=(0.22209981155)*x_ref[0]**o+(-0.226751058136)*x_ref[0]+(-0.0345697170216)*x_ref[1]**o+(0.265795819906)*x_ref[1]+(0.542547943322)*x_ref[2]**o+(0.785610668157)*x_ref[2]
-        ref[4,1,0]=(-0.520898604151)*x_ref[0]**o+(-0.84307105084)*x_ref[0]+(0.818061645146)*x_ref[1]**o+(-0.173710357379)*x_ref[1]+(0.344023171063)*x_ref[2]**o+(0.194662166094)*x_ref[2]
-        ref[4,1,1]=(-0.288466404824)*x_ref[0]**o+(-0.891856587908)*x_ref[0]+(0.378329571068)*x_ref[1]**o+(0.437919935526)*x_ref[1]+(-0.630733422962)*x_ref[2]**o+(0.518444630882)*x_ref[2]
-        ref[5,0,0]=(0.00978685202942)*x_ref[0]**o+(-0.474443494209)*x_ref[0]+(-0.509964215112)*x_ref[1]**o+(0.341199671453)*x_ref[1]+(-0.459333887251)*x_ref[2]**o+(0.491961590667)*x_ref[2]
-        ref[5,0,1]=(-0.899850325159)*x_ref[0]**o+(-0.191369137667)*x_ref[0]+(0.18882430985)*x_ref[1]**o+(-0.185214597442)*x_ref[1]+(-0.967187797553)*x_ref[2]**o+(0.366127839986)*x_ref[2]
-        ref[5,1,0]=(0.428007441668)*x_ref[0]**o+(0.920828656579)*x_ref[0]+(-0.298863178441)*x_ref[1]**o+(-0.226020983335)*x_ref[1]+(-0.01907141259)*x_ref[2]**o+(-0.359698040557)*x_ref[2]
-        ref[5,1,1]=(0.980673633441)*x_ref[0]**o+(0.362357489872)*x_ref[0]+(0.825233899658)*x_ref[1]**o+(0.846433827949)*x_ref[1]+(-0.870197174533)*x_ref[2]**o+(0.621884204716)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.93572957134)*x[0]**o+(-0.878081515023)*x[0]+(0.821839395118)*x[1]**o+(-0.088026044081)*x[1]
-        arg[0,0,0,1]=(-0.00393438000839)*x[0]**o+(-0.180693225971)*x[0]+(0.192781914487)*x[1]**o+(-0.561366977374)*x[1]
-        arg[0,0,1,0]=(0.116028558326)*x[0]**o+(-0.47739282219)*x[0]+(0.97806148353)*x[1]**o+(0.660972051388)*x[1]
-        arg[0,0,1,1]=(0.092683552469)*x[0]**o+(0.22083599745)*x[0]+(-0.423073290439)*x[1]**o+(-0.0789522599045)*x[1]
-        arg[0,0,2,0]=(0.140023403084)*x[0]**o+(-0.927034796519)*x[0]+(0.0987957525564)*x[1]**o+(0.0703695028562)*x[1]
-        arg[0,0,2,1]=(-0.00485147064392)*x[0]**o+(-0.649679595932)*x[0]+(0.503435626816)*x[1]**o+(0.393293792881)*x[1]
-        arg[0,1,0,0]=(-0.753383897772)*x[0]**o+(-0.988499439357)*x[0]+(-0.651037417175)*x[1]**o+(0.45184892046)*x[1]
-        arg[0,1,0,1]=(0.0120892569605)*x[0]**o+(0.52287896209)*x[0]+(0.103256695817)*x[1]**o+(-0.0244835681092)*x[1]
-        arg[0,1,1,0]=(-0.0949239075135)*x[0]**o+(0.835062318231)*x[0]+(-0.0522981103769)*x[1]**o+(0.60020994838)*x[1]
-        arg[0,1,1,1]=(0.139896941482)*x[0]**o+(0.409042945999)*x[0]+(0.10019215394)*x[1]**o+(-0.312224123017)*x[1]
-        arg[0,1,2,0]=(-0.892437964342)*x[0]**o+(0.0828807279746)*x[0]+(0.777811646235)*x[1]**o+(-0.96509471481)*x[1]
-        arg[0,1,2,1]=(-0.397341226148)*x[0]**o+(0.102987581336)*x[0]+(-0.69165111598)*x[1]**o+(0.743298211061)*x[1]
-        arg[0,2,0,0]=(-0.300129864031)*x[0]**o+(-0.418981381232)*x[0]+(0.624854922555)*x[1]**o+(0.892651746561)*x[1]
-        arg[0,2,0,1]=(-0.511463603881)*x[0]**o+(-0.808468332238)*x[0]+(-0.342755248919)*x[1]**o+(0.357985875808)*x[1]
-        arg[0,2,1,0]=(-0.269520452932)*x[0]**o+(0.869553937081)*x[0]+(-0.183222122614)*x[1]**o+(-0.135280721586)*x[1]
-        arg[0,2,1,1]=(0.0396712123969)*x[0]**o+(0.344314072793)*x[0]+(0.644676507168)*x[1]**o+(-0.0799551435053)*x[1]
-        arg[0,2,2,0]=(0.302628743334)*x[0]**o+(-0.59557047376)*x[0]+(-0.277654790212)*x[1]**o+(0.0299035042863)*x[1]
-        arg[0,2,2,1]=(0.805296568248)*x[0]**o+(0.726404711154)*x[0]+(0.0728356962577)*x[1]**o+(0.199997237962)*x[1]
-        arg[0,3,0,0]=(-0.292658800952)*x[0]**o+(-0.40080106651)*x[0]+(0.844109590553)*x[1]**o+(-0.339364790362)*x[1]
-        arg[0,3,0,1]=(-0.621465058894)*x[0]**o+(-0.376804350545)*x[0]+(0.745038406103)*x[1]**o+(-0.281482724757)*x[1]
-        arg[0,3,1,0]=(0.00625816347702)*x[0]**o+(0.392750189511)*x[0]+(-0.232258708605)*x[1]**o+(-0.634552067635)*x[1]
-        arg[0,3,1,1]=(-0.0893109545391)*x[0]**o+(-0.735678058768)*x[0]+(-0.603248350212)*x[1]**o+(-0.664366286468)*x[1]
-        arg[0,3,2,0]=(-0.0539114688775)*x[0]**o+(-0.110100592496)*x[0]+(-0.700496078261)*x[1]**o+(0.203311460549)*x[1]
-        arg[0,3,2,1]=(-0.554691350426)*x[0]**o+(-0.255001039659)*x[0]+(0.567977217289)*x[1]**o+(0.61993007447)*x[1]
-        arg[0,4,0,0]=(-0.12193490862)*x[0]**o+(0.731139340661)*x[0]+(-0.321971724057)*x[1]**o+(0.741215588897)*x[1]
-        arg[0,4,0,1]=(-0.394743164913)*x[0]**o+(-0.602249917929)*x[0]+(0.27675734517)*x[1]**o+(-0.968806169573)*x[1]
-        arg[0,4,1,0]=(-0.629331232169)*x[0]**o+(0.687483125805)*x[0]+(0.633698693186)*x[1]**o+(0.837564332901)*x[1]
-        arg[0,4,1,1]=(0.0470601891829)*x[0]**o+(-0.365490813497)*x[0]+(-0.162532786979)*x[1]**o+(0.504146804122)*x[1]
-        arg[0,4,2,0]=(0.193790444091)*x[0]**o+(0.742132840869)*x[0]+(-0.871677496589)*x[1]**o+(0.492817750307)*x[1]
-        arg[0,4,2,1]=(0.741218732478)*x[0]**o+(-0.746973604492)*x[0]+(-0.548073707926)*x[1]**o+(-0.42258185128)*x[1]
-        arg[1,0,0,0]=(0.580989627459)*x[0]**o+(-0.498423525574)*x[0]+(-0.349651580594)*x[1]**o+(0.0193060779482)*x[1]
-        arg[1,0,0,1]=(0.398917011903)*x[0]**o+(-0.122064497238)*x[0]+(0.924654557299)*x[1]**o+(0.485284066068)*x[1]
-        arg[1,0,1,0]=(-0.985949382826)*x[0]**o+(-0.0188384874977)*x[0]+(0.177995429697)*x[1]**o+(0.967727833143)*x[1]
-        arg[1,0,1,1]=(0.920799980503)*x[0]**o+(-0.749281119074)*x[0]+(-0.628411322607)*x[1]**o+(-0.446396361734)*x[1]
-        arg[1,0,2,0]=(0.752863123667)*x[0]**o+(0.112427175329)*x[0]+(0.975568251269)*x[1]**o+(0.316938392669)*x[1]
-        arg[1,0,2,1]=(0.798409861933)*x[0]**o+(-0.145715624761)*x[0]+(-0.847813831553)*x[1]**o+(0.302999756348)*x[1]
-        arg[1,1,0,0]=(0.897029838502)*x[0]**o+(-0.540852276529)*x[0]+(-0.541450963121)*x[1]**o+(-0.118819043917)*x[1]
-        arg[1,1,0,1]=(-0.616797542123)*x[0]**o+(-0.139394144428)*x[0]+(-0.480348413917)*x[1]**o+(0.500244829288)*x[1]
-        arg[1,1,1,0]=(-0.960388730531)*x[0]**o+(0.87391147728)*x[0]+(0.0128673975991)*x[1]**o+(0.444341296582)*x[1]
-        arg[1,1,1,1]=(0.136810869097)*x[0]**o+(-0.544756866447)*x[0]+(-0.198052789907)*x[1]**o+(-0.536732583929)*x[1]
-        arg[1,1,2,0]=(-0.808981135979)*x[0]**o+(-0.122088197438)*x[0]+(-0.363958821187)*x[1]**o+(-0.521614066151)*x[1]
-        arg[1,1,2,1]=(0.299382605072)*x[0]**o+(0.143397060894)*x[0]+(-0.223044874711)*x[1]**o+(-0.04723866032)*x[1]
-        arg[1,2,0,0]=(-0.568967551455)*x[0]**o+(0.750777908696)*x[0]+(0.203117458853)*x[1]**o+(-0.0797168995572)*x[1]
-        arg[1,2,0,1]=(0.0439147552635)*x[0]**o+(-0.0746749889653)*x[0]+(0.192885940929)*x[1]**o+(0.794090802345)*x[1]
-        arg[1,2,1,0]=(0.137177876023)*x[0]**o+(0.625847668003)*x[0]+(0.252761858157)*x[1]**o+(0.496512978117)*x[1]
-        arg[1,2,1,1]=(0.475218888846)*x[0]**o+(-0.286926184073)*x[0]+(0.551427803487)*x[1]**o+(0.782373661286)*x[1]
-        arg[1,2,2,0]=(0.903004502545)*x[0]**o+(-0.262952251654)*x[0]+(0.110351860812)*x[1]**o+(-0.685355934696)*x[1]
-        arg[1,2,2,1]=(-0.157457317404)*x[0]**o+(-0.243850623177)*x[0]+(0.28853283432)*x[1]**o+(0.612508908614)*x[1]
-        arg[1,3,0,0]=(-0.741890002973)*x[0]**o+(-0.118262424825)*x[0]+(0.567100734646)*x[1]**o+(0.301557125811)*x[1]
-        arg[1,3,0,1]=(-0.00745396583928)*x[0]**o+(-0.00558491344276)*x[0]+(-0.967132370197)*x[1]**o+(-0.61737594402)*x[1]
-        arg[1,3,1,0]=(0.0767961523966)*x[0]**o+(0.341952000996)*x[0]+(0.762617832019)*x[1]**o+(-0.38337284713)*x[1]
-        arg[1,3,1,1]=(0.32265018902)*x[0]**o+(-0.352521736206)*x[0]+(-0.0119143186529)*x[1]**o+(-0.64727561829)*x[1]
-        arg[1,3,2,0]=(0.627690584587)*x[0]**o+(0.0993819822193)*x[0]+(-0.189363448841)*x[1]**o+(0.49004001194)*x[1]
-        arg[1,3,2,1]=(-0.657836476156)*x[0]**o+(0.708970470136)*x[0]+(0.252190020576)*x[1]**o+(-0.481214196298)*x[1]
-        arg[1,4,0,0]=(0.0837563164179)*x[0]**o+(0.741536525079)*x[0]+(0.645543094286)*x[1]**o+(0.62358090815)*x[1]
-        arg[1,4,0,1]=(0.262043398371)*x[0]**o+(-0.47794750936)*x[0]+(0.93086244965)*x[1]**o+(-0.670399062677)*x[1]
-        arg[1,4,1,0]=(-0.76634902923)*x[0]**o+(-0.809846143928)*x[0]+(0.639099549305)*x[1]**o+(0.793524639236)*x[1]
-        arg[1,4,1,1]=(0.814737503957)*x[0]**o+(0.775593374042)*x[0]+(0.240976904111)*x[1]**o+(0.2352421356)*x[1]
-        arg[1,4,2,0]=(0.519210584047)*x[0]**o+(-0.702579589691)*x[0]+(-0.450156317853)*x[1]**o+(0.588864692581)*x[1]
-        arg[1,4,2,1]=(-0.927751546037)*x[0]**o+(-0.239737576019)*x[0]+(-0.527658440447)*x[1]**o+(0.79623440559)*x[1]
-        arg[2,0,0,0]=(0.719144336419)*x[0]**o+(0.916780231277)*x[0]+(0.279073450277)*x[1]**o+(-0.0130671321167)*x[1]
-        arg[2,0,0,1]=(-0.556604998962)*x[0]**o+(-0.661580370137)*x[0]+(0.980704664791)*x[1]**o+(0.935843251131)*x[1]
-        arg[2,0,1,0]=(0.85501679753)*x[0]**o+(-0.908342467889)*x[0]+(0.969030151294)*x[1]**o+(0.534192961922)*x[1]
-        arg[2,0,1,1]=(0.527672385529)*x[0]**o+(0.997699955667)*x[0]+(-0.388249629327)*x[1]**o+(-0.714956937512)*x[1]
-        arg[2,0,2,0]=(-0.629149810667)*x[0]**o+(-0.0515018376692)*x[0]+(-0.80355991702)*x[1]**o+(0.235999988886)*x[1]
-        arg[2,0,2,1]=(0.960715934156)*x[0]**o+(-0.782787305497)*x[0]+(-0.309348231959)*x[1]**o+(0.854911294717)*x[1]
-        arg[2,1,0,0]=(-0.560749125074)*x[0]**o+(-0.120515615757)*x[0]+(0.055090634431)*x[1]**o+(-0.539205949358)*x[1]
-        arg[2,1,0,1]=(-0.762113417295)*x[0]**o+(-0.207196980376)*x[0]+(0.904541245494)*x[1]**o+(0.320359459939)*x[1]
-        arg[2,1,1,0]=(-0.272627586486)*x[0]**o+(-0.885987982522)*x[0]+(0.641737808216)*x[1]**o+(0.358390367373)*x[1]
-        arg[2,1,1,1]=(-0.847502563761)*x[0]**o+(-0.430298277492)*x[0]+(-0.869043300185)*x[1]**o+(0.584700145915)*x[1]
-        arg[2,1,2,0]=(0.497688368946)*x[0]**o+(-0.14413770704)*x[0]+(-0.82002941888)*x[1]**o+(0.573569419279)*x[1]
-        arg[2,1,2,1]=(0.959549623603)*x[0]**o+(0.881196513588)*x[0]+(-0.202951096266)*x[1]**o+(-9.87983182765e-05)*x[1]
-        arg[2,2,0,0]=(0.0811393810501)*x[0]**o+(-0.853555165896)*x[0]+(0.0259257246335)*x[1]**o+(0.638575306959)*x[1]
-        arg[2,2,0,1]=(-0.525990031379)*x[0]**o+(0.11235160765)*x[0]+(-0.502853879455)*x[1]**o+(0.414066683507)*x[1]
-        arg[2,2,1,0]=(-0.533919716834)*x[0]**o+(-0.773411100656)*x[0]+(0.311424028491)*x[1]**o+(0.332733301377)*x[1]
-        arg[2,2,1,1]=(0.280548593462)*x[0]**o+(-0.0747640762104)*x[0]+(-0.7110232877)*x[1]**o+(-0.178672817441)*x[1]
-        arg[2,2,2,0]=(0.445025926846)*x[0]**o+(-0.669782903005)*x[0]+(0.236610411793)*x[1]**o+(0.437836936476)*x[1]
-        arg[2,2,2,1]=(-0.503761305098)*x[0]**o+(-0.889922659865)*x[0]+(-0.0767256016402)*x[1]**o+(-0.614874217835)*x[1]
-        arg[2,3,0,0]=(-0.041960855672)*x[0]**o+(-0.593486242764)*x[0]+(0.344751892525)*x[1]**o+(-0.131268873786)*x[1]
-        arg[2,3,0,1]=(-0.192704843083)*x[0]**o+(0.325356381696)*x[0]+(-0.235690651937)*x[1]**o+(0.59113535617)*x[1]
-        arg[2,3,1,0]=(-0.0794745628024)*x[0]**o+(0.7996737586)*x[0]+(-0.324970505375)*x[1]**o+(-0.14920403468)*x[1]
-        arg[2,3,1,1]=(0.31997432673)*x[0]**o+(-0.571739807799)*x[0]+(0.517683480263)*x[1]**o+(-0.250680741704)*x[1]
-        arg[2,3,2,0]=(-0.379114277883)*x[0]**o+(0.953285017352)*x[0]+(-0.701111847548)*x[1]**o+(-0.354199942528)*x[1]
-        arg[2,3,2,1]=(0.492245629486)*x[0]**o+(-0.299380102293)*x[0]+(-0.126371826833)*x[1]**o+(0.933664060647)*x[1]
-        arg[2,4,0,0]=(0.714822159533)*x[0]**o+(0.359430380478)*x[0]+(-0.691610768506)*x[1]**o+(0.414061853203)*x[1]
-        arg[2,4,0,1]=(0.412799253275)*x[0]**o+(0.862905533148)*x[0]+(-0.0507440946561)*x[1]**o+(0.779012369976)*x[1]
-        arg[2,4,1,0]=(-0.981179053034)*x[0]**o+(0.984777005573)*x[0]+(0.715584788452)*x[1]**o+(0.920666888724)*x[1]
-        arg[2,4,1,1]=(-0.0287775685032)*x[0]**o+(0.617592345344)*x[0]+(-0.767451297794)*x[1]**o+(0.95828976091)*x[1]
-        arg[2,4,2,0]=(0.905037473705)*x[0]**o+(-0.706987158021)*x[0]+(0.535436652493)*x[1]**o+(-0.891712664249)*x[1]
-        arg[2,4,2,1]=(-0.818709474925)*x[0]**o+(-0.0223479273553)*x[0]+(-0.370644568884)*x[1]**o+(0.286468739105)*x[1]
-        arg[3,0,0,0]=(0.310461949876)*x[0]**o+(0.770193446516)*x[0]+(-0.0858335164699)*x[1]**o+(0.12572608122)*x[1]
-        arg[3,0,0,1]=(-0.781332422249)*x[0]**o+(-0.238368527872)*x[0]+(-0.449272256582)*x[1]**o+(-0.645638738212)*x[1]
-        arg[3,0,1,0]=(-0.91143447678)*x[0]**o+(-0.885131081008)*x[0]+(-0.253833463581)*x[1]**o+(0.051439649459)*x[1]
-        arg[3,0,1,1]=(0.447730169203)*x[0]**o+(0.980354452325)*x[0]+(-0.0484566141047)*x[1]**o+(0.443407604362)*x[1]
-        arg[3,0,2,0]=(-0.223975544426)*x[0]**o+(0.0141796274312)*x[0]+(0.664080206442)*x[1]**o+(0.193318634886)*x[1]
-        arg[3,0,2,1]=(-0.388901068755)*x[0]**o+(-0.632210208163)*x[0]+(0.567264328931)*x[1]**o+(-0.308710733281)*x[1]
-        arg[3,1,0,0]=(0.259562910069)*x[0]**o+(-0.315409720689)*x[0]+(0.999281841483)*x[1]**o+(0.695981779357)*x[1]
-        arg[3,1,0,1]=(0.627508253716)*x[0]**o+(-0.540950954632)*x[0]+(0.626209667445)*x[1]**o+(-0.920403595109)*x[1]
-        arg[3,1,1,0]=(0.750166528891)*x[0]**o+(-0.145494783124)*x[0]+(0.71048043416)*x[1]**o+(-0.0920505950401)*x[1]
-        arg[3,1,1,1]=(-0.755570630755)*x[0]**o+(-0.323456877629)*x[0]+(-0.0318418288689)*x[1]**o+(0.551823313307)*x[1]
-        arg[3,1,2,0]=(-0.301380276426)*x[0]**o+(-0.102899117196)*x[0]+(0.816857028902)*x[1]**o+(-0.571555621895)*x[1]
-        arg[3,1,2,1]=(-0.791148729922)*x[0]**o+(0.400286696027)*x[0]+(-0.17362002139)*x[1]**o+(0.431696064424)*x[1]
-        arg[3,2,0,0]=(0.241944451237)*x[0]**o+(-0.629401496412)*x[0]+(-0.00333636607647)*x[1]**o+(0.167334133677)*x[1]
-        arg[3,2,0,1]=(-0.300944831932)*x[0]**o+(0.358282773504)*x[0]+(0.759495661081)*x[1]**o+(-0.225250488484)*x[1]
-        arg[3,2,1,0]=(0.755950588768)*x[0]**o+(0.718423180013)*x[0]+(0.705150216505)*x[1]**o+(0.269283969196)*x[1]
-        arg[3,2,1,1]=(0.811064150458)*x[0]**o+(-0.67847842696)*x[0]+(-0.478091805711)*x[1]**o+(0.292774429011)*x[1]
-        arg[3,2,2,0]=(-0.307877253758)*x[0]**o+(-0.563961673764)*x[0]+(0.428322493356)*x[1]**o+(0.564230126489)*x[1]
-        arg[3,2,2,1]=(-0.623877056979)*x[0]**o+(-0.148337578412)*x[0]+(-0.910662605581)*x[1]**o+(-0.38603493572)*x[1]
-        arg[3,3,0,0]=(-0.826474270729)*x[0]**o+(0.977614689932)*x[0]+(-0.369824837717)*x[1]**o+(-0.985478011812)*x[1]
-        arg[3,3,0,1]=(-0.251252769561)*x[0]**o+(-0.296732765057)*x[0]+(-0.888899418995)*x[1]**o+(0.640313055734)*x[1]
-        arg[3,3,1,0]=(-0.189106218841)*x[0]**o+(-0.0441656339777)*x[0]+(0.368716219801)*x[1]**o+(-0.924144919367)*x[1]
-        arg[3,3,1,1]=(-0.525205981948)*x[0]**o+(-0.148352446593)*x[0]+(0.869212821652)*x[1]**o+(-0.575463559793)*x[1]
-        arg[3,3,2,0]=(0.668772663439)*x[0]**o+(0.4330630456)*x[0]+(-0.321158907274)*x[1]**o+(0.570853139693)*x[1]
-        arg[3,3,2,1]=(0.0236674031998)*x[0]**o+(-0.390106024651)*x[0]+(0.541717893494)*x[1]**o+(-0.144655705849)*x[1]
-        arg[3,4,0,0]=(0.971861188602)*x[0]**o+(-0.834463063474)*x[0]+(-0.419545662218)*x[1]**o+(-0.0387341522049)*x[1]
-        arg[3,4,0,1]=(0.226357589896)*x[0]**o+(0.305148895256)*x[0]+(0.00306527642431)*x[1]**o+(0.4715619746)*x[1]
-        arg[3,4,1,0]=(0.529602340964)*x[0]**o+(-0.482050910795)*x[0]+(0.964983911769)*x[1]**o+(0.524018220532)*x[1]
-        arg[3,4,1,1]=(0.940676158872)*x[0]**o+(0.547078925647)*x[0]+(-0.636907424453)*x[1]**o+(0.938262396281)*x[1]
-        arg[3,4,2,0]=(0.282512784255)*x[0]**o+(-0.556345478931)*x[0]+(0.651866614458)*x[1]**o+(0.8895132214)*x[1]
-        arg[3,4,2,1]=(0.905077434472)*x[0]**o+(0.595878819874)*x[0]+(0.416350660905)*x[1]**o+(0.100262997545)*x[1]
-        ref[0,0,0,0]=(-0.93572957134)*x_ref[0]**o+(-0.878081515023)*x_ref[0]+(0.821839395118)*x_ref[1]**o+(-0.088026044081)*x_ref[1]
-        ref[0,0,0,1]=(-0.00393438000839)*x_ref[0]**o+(-0.180693225971)*x_ref[0]+(0.192781914487)*x_ref[1]**o+(-0.561366977374)*x_ref[1]
-        ref[0,0,1,0]=(0.116028558326)*x_ref[0]**o+(-0.47739282219)*x_ref[0]+(0.97806148353)*x_ref[1]**o+(0.660972051388)*x_ref[1]
-        ref[0,0,1,1]=(0.092683552469)*x_ref[0]**o+(0.22083599745)*x_ref[0]+(-0.423073290439)*x_ref[1]**o+(-0.0789522599045)*x_ref[1]
-        ref[0,0,2,0]=(0.140023403084)*x_ref[0]**o+(-0.927034796519)*x_ref[0]+(0.0987957525564)*x_ref[1]**o+(0.0703695028562)*x_ref[1]
-        ref[0,0,2,1]=(-0.00485147064392)*x_ref[0]**o+(-0.649679595932)*x_ref[0]+(0.503435626816)*x_ref[1]**o+(0.393293792881)*x_ref[1]
-        ref[0,1,0,0]=(-0.753383897772)*x_ref[0]**o+(-0.988499439357)*x_ref[0]+(-0.651037417175)*x_ref[1]**o+(0.45184892046)*x_ref[1]
-        ref[0,1,0,1]=(0.0120892569605)*x_ref[0]**o+(0.52287896209)*x_ref[0]+(0.103256695817)*x_ref[1]**o+(-0.0244835681092)*x_ref[1]
-        ref[0,1,1,0]=(-0.0949239075135)*x_ref[0]**o+(0.835062318231)*x_ref[0]+(-0.0522981103769)*x_ref[1]**o+(0.60020994838)*x_ref[1]
-        ref[0,1,1,1]=(0.139896941482)*x_ref[0]**o+(0.409042945999)*x_ref[0]+(0.10019215394)*x_ref[1]**o+(-0.312224123017)*x_ref[1]
-        ref[0,1,2,0]=(-0.892437964342)*x_ref[0]**o+(0.0828807279746)*x_ref[0]+(0.777811646235)*x_ref[1]**o+(-0.96509471481)*x_ref[1]
-        ref[0,1,2,1]=(-0.397341226148)*x_ref[0]**o+(0.102987581336)*x_ref[0]+(-0.69165111598)*x_ref[1]**o+(0.743298211061)*x_ref[1]
-        ref[0,2,0,0]=(-0.300129864031)*x_ref[0]**o+(-0.418981381232)*x_ref[0]+(0.624854922555)*x_ref[1]**o+(0.892651746561)*x_ref[1]
-        ref[0,2,0,1]=(-0.511463603881)*x_ref[0]**o+(-0.808468332238)*x_ref[0]+(-0.342755248919)*x_ref[1]**o+(0.357985875808)*x_ref[1]
-        ref[0,2,1,0]=(-0.269520452932)*x_ref[0]**o+(0.869553937081)*x_ref[0]+(-0.183222122614)*x_ref[1]**o+(-0.135280721586)*x_ref[1]
-        ref[0,2,1,1]=(0.0396712123969)*x_ref[0]**o+(0.344314072793)*x_ref[0]+(0.644676507168)*x_ref[1]**o+(-0.0799551435053)*x_ref[1]
-        ref[0,2,2,0]=(0.302628743334)*x_ref[0]**o+(-0.59557047376)*x_ref[0]+(-0.277654790212)*x_ref[1]**o+(0.0299035042863)*x_ref[1]
-        ref[0,2,2,1]=(0.805296568248)*x_ref[0]**o+(0.726404711154)*x_ref[0]+(0.0728356962577)*x_ref[1]**o+(0.199997237962)*x_ref[1]
-        ref[0,3,0,0]=(-0.292658800952)*x_ref[0]**o+(-0.40080106651)*x_ref[0]+(0.844109590553)*x_ref[1]**o+(-0.339364790362)*x_ref[1]
-        ref[0,3,0,1]=(-0.621465058894)*x_ref[0]**o+(-0.376804350545)*x_ref[0]+(0.745038406103)*x_ref[1]**o+(-0.281482724757)*x_ref[1]
-        ref[0,3,1,0]=(0.00625816347702)*x_ref[0]**o+(0.392750189511)*x_ref[0]+(-0.232258708605)*x_ref[1]**o+(-0.634552067635)*x_ref[1]
-        ref[0,3,1,1]=(-0.0893109545391)*x_ref[0]**o+(-0.735678058768)*x_ref[0]+(-0.603248350212)*x_ref[1]**o+(-0.664366286468)*x_ref[1]
-        ref[0,3,2,0]=(-0.0539114688775)*x_ref[0]**o+(-0.110100592496)*x_ref[0]+(-0.700496078261)*x_ref[1]**o+(0.203311460549)*x_ref[1]
-        ref[0,3,2,1]=(-0.554691350426)*x_ref[0]**o+(-0.255001039659)*x_ref[0]+(0.567977217289)*x_ref[1]**o+(0.61993007447)*x_ref[1]
-        ref[0,4,0,0]=(-0.12193490862)*x_ref[0]**o+(0.731139340661)*x_ref[0]+(-0.321971724057)*x_ref[1]**o+(0.741215588897)*x_ref[1]
-        ref[0,4,0,1]=(-0.394743164913)*x_ref[0]**o+(-0.602249917929)*x_ref[0]+(0.27675734517)*x_ref[1]**o+(-0.968806169573)*x_ref[1]
-        ref[0,4,1,0]=(-0.629331232169)*x_ref[0]**o+(0.687483125805)*x_ref[0]+(0.633698693186)*x_ref[1]**o+(0.837564332901)*x_ref[1]
-        ref[0,4,1,1]=(0.0470601891829)*x_ref[0]**o+(-0.365490813497)*x_ref[0]+(-0.162532786979)*x_ref[1]**o+(0.504146804122)*x_ref[1]
-        ref[0,4,2,0]=(0.193790444091)*x_ref[0]**o+(0.742132840869)*x_ref[0]+(-0.871677496589)*x_ref[1]**o+(0.492817750307)*x_ref[1]
-        ref[0,4,2,1]=(0.741218732478)*x_ref[0]**o+(-0.746973604492)*x_ref[0]+(-0.548073707926)*x_ref[1]**o+(-0.42258185128)*x_ref[1]
-        ref[1,0,0,0]=(0.580989627459)*x_ref[0]**o+(-0.498423525574)*x_ref[0]+(-0.349651580594)*x_ref[1]**o+(0.0193060779482)*x_ref[1]
-        ref[1,0,0,1]=(0.398917011903)*x_ref[0]**o+(-0.122064497238)*x_ref[0]+(0.924654557299)*x_ref[1]**o+(0.485284066068)*x_ref[1]
-        ref[1,0,1,0]=(-0.985949382826)*x_ref[0]**o+(-0.0188384874977)*x_ref[0]+(0.177995429697)*x_ref[1]**o+(0.967727833143)*x_ref[1]
-        ref[1,0,1,1]=(0.920799980503)*x_ref[0]**o+(-0.749281119074)*x_ref[0]+(-0.628411322607)*x_ref[1]**o+(-0.446396361734)*x_ref[1]
-        ref[1,0,2,0]=(0.752863123667)*x_ref[0]**o+(0.112427175329)*x_ref[0]+(0.975568251269)*x_ref[1]**o+(0.316938392669)*x_ref[1]
-        ref[1,0,2,1]=(0.798409861933)*x_ref[0]**o+(-0.145715624761)*x_ref[0]+(-0.847813831553)*x_ref[1]**o+(0.302999756348)*x_ref[1]
-        ref[1,1,0,0]=(0.897029838502)*x_ref[0]**o+(-0.540852276529)*x_ref[0]+(-0.541450963121)*x_ref[1]**o+(-0.118819043917)*x_ref[1]
-        ref[1,1,0,1]=(-0.616797542123)*x_ref[0]**o+(-0.139394144428)*x_ref[0]+(-0.480348413917)*x_ref[1]**o+(0.500244829288)*x_ref[1]
-        ref[1,1,1,0]=(-0.960388730531)*x_ref[0]**o+(0.87391147728)*x_ref[0]+(0.0128673975991)*x_ref[1]**o+(0.444341296582)*x_ref[1]
-        ref[1,1,1,1]=(0.136810869097)*x_ref[0]**o+(-0.544756866447)*x_ref[0]+(-0.198052789907)*x_ref[1]**o+(-0.536732583929)*x_ref[1]
-        ref[1,1,2,0]=(-0.808981135979)*x_ref[0]**o+(-0.122088197438)*x_ref[0]+(-0.363958821187)*x_ref[1]**o+(-0.521614066151)*x_ref[1]
-        ref[1,1,2,1]=(0.299382605072)*x_ref[0]**o+(0.143397060894)*x_ref[0]+(-0.223044874711)*x_ref[1]**o+(-0.04723866032)*x_ref[1]
-        ref[1,2,0,0]=(-0.568967551455)*x_ref[0]**o+(0.750777908696)*x_ref[0]+(0.203117458853)*x_ref[1]**o+(-0.0797168995572)*x_ref[1]
-        ref[1,2,0,1]=(0.0439147552635)*x_ref[0]**o+(-0.0746749889653)*x_ref[0]+(0.192885940929)*x_ref[1]**o+(0.794090802345)*x_ref[1]
-        ref[1,2,1,0]=(0.137177876023)*x_ref[0]**o+(0.625847668003)*x_ref[0]+(0.252761858157)*x_ref[1]**o+(0.496512978117)*x_ref[1]
-        ref[1,2,1,1]=(0.475218888846)*x_ref[0]**o+(-0.286926184073)*x_ref[0]+(0.551427803487)*x_ref[1]**o+(0.782373661286)*x_ref[1]
-        ref[1,2,2,0]=(0.903004502545)*x_ref[0]**o+(-0.262952251654)*x_ref[0]+(0.110351860812)*x_ref[1]**o+(-0.685355934696)*x_ref[1]
-        ref[1,2,2,1]=(-0.157457317404)*x_ref[0]**o+(-0.243850623177)*x_ref[0]+(0.28853283432)*x_ref[1]**o+(0.612508908614)*x_ref[1]
-        ref[1,3,0,0]=(-0.741890002973)*x_ref[0]**o+(-0.118262424825)*x_ref[0]+(0.567100734646)*x_ref[1]**o+(0.301557125811)*x_ref[1]
-        ref[1,3,0,1]=(-0.00745396583928)*x_ref[0]**o+(-0.00558491344276)*x_ref[0]+(-0.967132370197)*x_ref[1]**o+(-0.61737594402)*x_ref[1]
-        ref[1,3,1,0]=(0.0767961523966)*x_ref[0]**o+(0.341952000996)*x_ref[0]+(0.762617832019)*x_ref[1]**o+(-0.38337284713)*x_ref[1]
-        ref[1,3,1,1]=(0.32265018902)*x_ref[0]**o+(-0.352521736206)*x_ref[0]+(-0.0119143186529)*x_ref[1]**o+(-0.64727561829)*x_ref[1]
-        ref[1,3,2,0]=(0.627690584587)*x_ref[0]**o+(0.0993819822193)*x_ref[0]+(-0.189363448841)*x_ref[1]**o+(0.49004001194)*x_ref[1]
-        ref[1,3,2,1]=(-0.657836476156)*x_ref[0]**o+(0.708970470136)*x_ref[0]+(0.252190020576)*x_ref[1]**o+(-0.481214196298)*x_ref[1]
-        ref[1,4,0,0]=(0.0837563164179)*x_ref[0]**o+(0.741536525079)*x_ref[0]+(0.645543094286)*x_ref[1]**o+(0.62358090815)*x_ref[1]
-        ref[1,4,0,1]=(0.262043398371)*x_ref[0]**o+(-0.47794750936)*x_ref[0]+(0.93086244965)*x_ref[1]**o+(-0.670399062677)*x_ref[1]
-        ref[1,4,1,0]=(-0.76634902923)*x_ref[0]**o+(-0.809846143928)*x_ref[0]+(0.639099549305)*x_ref[1]**o+(0.793524639236)*x_ref[1]
-        ref[1,4,1,1]=(0.814737503957)*x_ref[0]**o+(0.775593374042)*x_ref[0]+(0.240976904111)*x_ref[1]**o+(0.2352421356)*x_ref[1]
-        ref[1,4,2,0]=(0.519210584047)*x_ref[0]**o+(-0.702579589691)*x_ref[0]+(-0.450156317853)*x_ref[1]**o+(0.588864692581)*x_ref[1]
-        ref[1,4,2,1]=(-0.927751546037)*x_ref[0]**o+(-0.239737576019)*x_ref[0]+(-0.527658440447)*x_ref[1]**o+(0.79623440559)*x_ref[1]
-        ref[2,0,0,0]=(0.719144336419)*x_ref[0]**o+(0.916780231277)*x_ref[0]+(0.279073450277)*x_ref[1]**o+(-0.0130671321167)*x_ref[1]
-        ref[2,0,0,1]=(-0.556604998962)*x_ref[0]**o+(-0.661580370137)*x_ref[0]+(0.980704664791)*x_ref[1]**o+(0.935843251131)*x_ref[1]
-        ref[2,0,1,0]=(0.85501679753)*x_ref[0]**o+(-0.908342467889)*x_ref[0]+(0.969030151294)*x_ref[1]**o+(0.534192961922)*x_ref[1]
-        ref[2,0,1,1]=(0.527672385529)*x_ref[0]**o+(0.997699955667)*x_ref[0]+(-0.388249629327)*x_ref[1]**o+(-0.714956937512)*x_ref[1]
-        ref[2,0,2,0]=(-0.629149810667)*x_ref[0]**o+(-0.0515018376692)*x_ref[0]+(-0.80355991702)*x_ref[1]**o+(0.235999988886)*x_ref[1]
-        ref[2,0,2,1]=(0.960715934156)*x_ref[0]**o+(-0.782787305497)*x_ref[0]+(-0.309348231959)*x_ref[1]**o+(0.854911294717)*x_ref[1]
-        ref[2,1,0,0]=(-0.560749125074)*x_ref[0]**o+(-0.120515615757)*x_ref[0]+(0.055090634431)*x_ref[1]**o+(-0.539205949358)*x_ref[1]
-        ref[2,1,0,1]=(-0.762113417295)*x_ref[0]**o+(-0.207196980376)*x_ref[0]+(0.904541245494)*x_ref[1]**o+(0.320359459939)*x_ref[1]
-        ref[2,1,1,0]=(-0.272627586486)*x_ref[0]**o+(-0.885987982522)*x_ref[0]+(0.641737808216)*x_ref[1]**o+(0.358390367373)*x_ref[1]
-        ref[2,1,1,1]=(-0.847502563761)*x_ref[0]**o+(-0.430298277492)*x_ref[0]+(-0.869043300185)*x_ref[1]**o+(0.584700145915)*x_ref[1]
-        ref[2,1,2,0]=(0.497688368946)*x_ref[0]**o+(-0.14413770704)*x_ref[0]+(-0.82002941888)*x_ref[1]**o+(0.573569419279)*x_ref[1]
-        ref[2,1,2,1]=(0.959549623603)*x_ref[0]**o+(0.881196513588)*x_ref[0]+(-0.202951096266)*x_ref[1]**o+(-9.87983182765e-05)*x_ref[1]
-        ref[2,2,0,0]=(0.0811393810501)*x_ref[0]**o+(-0.853555165896)*x_ref[0]+(0.0259257246335)*x_ref[1]**o+(0.638575306959)*x_ref[1]
-        ref[2,2,0,1]=(-0.525990031379)*x_ref[0]**o+(0.11235160765)*x_ref[0]+(-0.502853879455)*x_ref[1]**o+(0.414066683507)*x_ref[1]
-        ref[2,2,1,0]=(-0.533919716834)*x_ref[0]**o+(-0.773411100656)*x_ref[0]+(0.311424028491)*x_ref[1]**o+(0.332733301377)*x_ref[1]
-        ref[2,2,1,1]=(0.280548593462)*x_ref[0]**o+(-0.0747640762104)*x_ref[0]+(-0.7110232877)*x_ref[1]**o+(-0.178672817441)*x_ref[1]
-        ref[2,2,2,0]=(0.445025926846)*x_ref[0]**o+(-0.669782903005)*x_ref[0]+(0.236610411793)*x_ref[1]**o+(0.437836936476)*x_ref[1]
-        ref[2,2,2,1]=(-0.503761305098)*x_ref[0]**o+(-0.889922659865)*x_ref[0]+(-0.0767256016402)*x_ref[1]**o+(-0.614874217835)*x_ref[1]
-        ref[2,3,0,0]=(-0.041960855672)*x_ref[0]**o+(-0.593486242764)*x_ref[0]+(0.344751892525)*x_ref[1]**o+(-0.131268873786)*x_ref[1]
-        ref[2,3,0,1]=(-0.192704843083)*x_ref[0]**o+(0.325356381696)*x_ref[0]+(-0.235690651937)*x_ref[1]**o+(0.59113535617)*x_ref[1]
-        ref[2,3,1,0]=(-0.0794745628024)*x_ref[0]**o+(0.7996737586)*x_ref[0]+(-0.324970505375)*x_ref[1]**o+(-0.14920403468)*x_ref[1]
-        ref[2,3,1,1]=(0.31997432673)*x_ref[0]**o+(-0.571739807799)*x_ref[0]+(0.517683480263)*x_ref[1]**o+(-0.250680741704)*x_ref[1]
-        ref[2,3,2,0]=(-0.379114277883)*x_ref[0]**o+(0.953285017352)*x_ref[0]+(-0.701111847548)*x_ref[1]**o+(-0.354199942528)*x_ref[1]
-        ref[2,3,2,1]=(0.492245629486)*x_ref[0]**o+(-0.299380102293)*x_ref[0]+(-0.126371826833)*x_ref[1]**o+(0.933664060647)*x_ref[1]
-        ref[2,4,0,0]=(0.714822159533)*x_ref[0]**o+(0.359430380478)*x_ref[0]+(-0.691610768506)*x_ref[1]**o+(0.414061853203)*x_ref[1]
-        ref[2,4,0,1]=(0.412799253275)*x_ref[0]**o+(0.862905533148)*x_ref[0]+(-0.0507440946561)*x_ref[1]**o+(0.779012369976)*x_ref[1]
-        ref[2,4,1,0]=(-0.981179053034)*x_ref[0]**o+(0.984777005573)*x_ref[0]+(0.715584788452)*x_ref[1]**o+(0.920666888724)*x_ref[1]
-        ref[2,4,1,1]=(-0.0287775685032)*x_ref[0]**o+(0.617592345344)*x_ref[0]+(-0.767451297794)*x_ref[1]**o+(0.95828976091)*x_ref[1]
-        ref[2,4,2,0]=(0.905037473705)*x_ref[0]**o+(-0.706987158021)*x_ref[0]+(0.535436652493)*x_ref[1]**o+(-0.891712664249)*x_ref[1]
-        ref[2,4,2,1]=(-0.818709474925)*x_ref[0]**o+(-0.0223479273553)*x_ref[0]+(-0.370644568884)*x_ref[1]**o+(0.286468739105)*x_ref[1]
-        ref[3,0,0,0]=(0.310461949876)*x_ref[0]**o+(0.770193446516)*x_ref[0]+(-0.0858335164699)*x_ref[1]**o+(0.12572608122)*x_ref[1]
-        ref[3,0,0,1]=(-0.781332422249)*x_ref[0]**o+(-0.238368527872)*x_ref[0]+(-0.449272256582)*x_ref[1]**o+(-0.645638738212)*x_ref[1]
-        ref[3,0,1,0]=(-0.91143447678)*x_ref[0]**o+(-0.885131081008)*x_ref[0]+(-0.253833463581)*x_ref[1]**o+(0.051439649459)*x_ref[1]
-        ref[3,0,1,1]=(0.447730169203)*x_ref[0]**o+(0.980354452325)*x_ref[0]+(-0.0484566141047)*x_ref[1]**o+(0.443407604362)*x_ref[1]
-        ref[3,0,2,0]=(-0.223975544426)*x_ref[0]**o+(0.0141796274312)*x_ref[0]+(0.664080206442)*x_ref[1]**o+(0.193318634886)*x_ref[1]
-        ref[3,0,2,1]=(-0.388901068755)*x_ref[0]**o+(-0.632210208163)*x_ref[0]+(0.567264328931)*x_ref[1]**o+(-0.308710733281)*x_ref[1]
-        ref[3,1,0,0]=(0.259562910069)*x_ref[0]**o+(-0.315409720689)*x_ref[0]+(0.999281841483)*x_ref[1]**o+(0.695981779357)*x_ref[1]
-        ref[3,1,0,1]=(0.627508253716)*x_ref[0]**o+(-0.540950954632)*x_ref[0]+(0.626209667445)*x_ref[1]**o+(-0.920403595109)*x_ref[1]
-        ref[3,1,1,0]=(0.750166528891)*x_ref[0]**o+(-0.145494783124)*x_ref[0]+(0.71048043416)*x_ref[1]**o+(-0.0920505950401)*x_ref[1]
-        ref[3,1,1,1]=(-0.755570630755)*x_ref[0]**o+(-0.323456877629)*x_ref[0]+(-0.0318418288689)*x_ref[1]**o+(0.551823313307)*x_ref[1]
-        ref[3,1,2,0]=(-0.301380276426)*x_ref[0]**o+(-0.102899117196)*x_ref[0]+(0.816857028902)*x_ref[1]**o+(-0.571555621895)*x_ref[1]
-        ref[3,1,2,1]=(-0.791148729922)*x_ref[0]**o+(0.400286696027)*x_ref[0]+(-0.17362002139)*x_ref[1]**o+(0.431696064424)*x_ref[1]
-        ref[3,2,0,0]=(0.241944451237)*x_ref[0]**o+(-0.629401496412)*x_ref[0]+(-0.00333636607647)*x_ref[1]**o+(0.167334133677)*x_ref[1]
-        ref[3,2,0,1]=(-0.300944831932)*x_ref[0]**o+(0.358282773504)*x_ref[0]+(0.759495661081)*x_ref[1]**o+(-0.225250488484)*x_ref[1]
-        ref[3,2,1,0]=(0.755950588768)*x_ref[0]**o+(0.718423180013)*x_ref[0]+(0.705150216505)*x_ref[1]**o+(0.269283969196)*x_ref[1]
-        ref[3,2,1,1]=(0.811064150458)*x_ref[0]**o+(-0.67847842696)*x_ref[0]+(-0.478091805711)*x_ref[1]**o+(0.292774429011)*x_ref[1]
-        ref[3,2,2,0]=(-0.307877253758)*x_ref[0]**o+(-0.563961673764)*x_ref[0]+(0.428322493356)*x_ref[1]**o+(0.564230126489)*x_ref[1]
-        ref[3,2,2,1]=(-0.623877056979)*x_ref[0]**o+(-0.148337578412)*x_ref[0]+(-0.910662605581)*x_ref[1]**o+(-0.38603493572)*x_ref[1]
-        ref[3,3,0,0]=(-0.826474270729)*x_ref[0]**o+(0.977614689932)*x_ref[0]+(-0.369824837717)*x_ref[1]**o+(-0.985478011812)*x_ref[1]
-        ref[3,3,0,1]=(-0.251252769561)*x_ref[0]**o+(-0.296732765057)*x_ref[0]+(-0.888899418995)*x_ref[1]**o+(0.640313055734)*x_ref[1]
-        ref[3,3,1,0]=(-0.189106218841)*x_ref[0]**o+(-0.0441656339777)*x_ref[0]+(0.368716219801)*x_ref[1]**o+(-0.924144919367)*x_ref[1]
-        ref[3,3,1,1]=(-0.525205981948)*x_ref[0]**o+(-0.148352446593)*x_ref[0]+(0.869212821652)*x_ref[1]**o+(-0.575463559793)*x_ref[1]
-        ref[3,3,2,0]=(0.668772663439)*x_ref[0]**o+(0.4330630456)*x_ref[0]+(-0.321158907274)*x_ref[1]**o+(0.570853139693)*x_ref[1]
-        ref[3,3,2,1]=(0.0236674031998)*x_ref[0]**o+(-0.390106024651)*x_ref[0]+(0.541717893494)*x_ref[1]**o+(-0.144655705849)*x_ref[1]
-        ref[3,4,0,0]=(0.971861188602)*x_ref[0]**o+(-0.834463063474)*x_ref[0]+(-0.419545662218)*x_ref[1]**o+(-0.0387341522049)*x_ref[1]
-        ref[3,4,0,1]=(0.226357589896)*x_ref[0]**o+(0.305148895256)*x_ref[0]+(0.00306527642431)*x_ref[1]**o+(0.4715619746)*x_ref[1]
-        ref[3,4,1,0]=(0.529602340964)*x_ref[0]**o+(-0.482050910795)*x_ref[0]+(0.964983911769)*x_ref[1]**o+(0.524018220532)*x_ref[1]
-        ref[3,4,1,1]=(0.940676158872)*x_ref[0]**o+(0.547078925647)*x_ref[0]+(-0.636907424453)*x_ref[1]**o+(0.938262396281)*x_ref[1]
-        ref[3,4,2,0]=(0.282512784255)*x_ref[0]**o+(-0.556345478931)*x_ref[0]+(0.651866614458)*x_ref[1]**o+(0.8895132214)*x_ref[1]
-        ref[3,4,2,1]=(0.905077434472)*x_ref[0]**o+(0.595878819874)*x_ref[0]+(0.416350660905)*x_ref[1]**o+(0.100262997545)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.836302395465)*x[0]**o+(-0.842568675604)*x[0]+(-0.780133441207)*x[1]**o+(0.54483947113)*x[1]+(-0.130253019696)*x[2]**o+(0.358303389828)*x[2]
-        arg[0,0,0,1]=(-0.722847500652)*x[0]**o+(0.42887368878)*x[0]+(0.979187056933)*x[1]**o+(0.624875714982)*x[1]+(-0.672529765247)*x[2]**o+(0.822363583702)*x[2]
-        arg[0,0,1,0]=(-0.28989650691)*x[0]**o+(-0.847647954773)*x[0]+(-0.11119862113)*x[1]**o+(0.0809009676818)*x[1]+(-0.672626533587)*x[2]**o+(0.580561232267)*x[2]
-        arg[0,0,1,1]=(-0.64783363248)*x[0]**o+(0.212828552873)*x[0]+(-0.845297180936)*x[1]**o+(-0.714760411186)*x[1]+(-0.385173605122)*x[2]**o+(-0.760750317556)*x[2]
-        arg[0,0,2,0]=(-0.328757006046)*x[0]**o+(-0.0935907722247)*x[0]+(-0.895866135795)*x[1]**o+(-0.701241976745)*x[1]+(0.893684139941)*x[2]**o+(-0.265339318222)*x[2]
-        arg[0,0,2,1]=(0.134066662346)*x[0]**o+(0.0383231508856)*x[0]+(-0.347744261995)*x[1]**o+(-0.86897907336)*x[1]+(-0.287792154521)*x[2]**o+(0.859351846891)*x[2]
-        arg[0,1,0,0]=(-0.635128124936)*x[0]**o+(-0.659462189733)*x[0]+(-0.0964365747936)*x[1]**o+(-0.385702168747)*x[1]+(0.179539914057)*x[2]**o+(-0.0176420847859)*x[2]
-        arg[0,1,0,1]=(-0.580750807831)*x[0]**o+(0.756493147583)*x[0]+(-0.436842251289)*x[1]**o+(-0.705624646095)*x[1]+(0.983064096262)*x[2]**o+(-0.0197153825423)*x[2]
-        arg[0,1,1,0]=(-0.567748582365)*x[0]**o+(0.579324420356)*x[0]+(0.0434168493419)*x[1]**o+(-0.839692920334)*x[1]+(-0.119239847745)*x[2]**o+(0.527047942834)*x[2]
-        arg[0,1,1,1]=(0.52870403655)*x[0]**o+(0.700090892471)*x[0]+(0.730224313921)*x[1]**o+(-0.815451751207)*x[1]+(-0.943945382413)*x[2]**o+(-0.571714141916)*x[2]
-        arg[0,1,2,0]=(-0.803841094887)*x[0]**o+(0.0595126006237)*x[0]+(-0.612341797645)*x[1]**o+(0.944552805211)*x[1]+(-0.00253009731786)*x[2]**o+(0.0174867439912)*x[2]
-        arg[0,1,2,1]=(-0.145623212549)*x[0]**o+(0.546039957008)*x[0]+(-0.221425237579)*x[1]**o+(0.229367671159)*x[1]+(-0.784903869759)*x[2]**o+(0.898045208871)*x[2]
-        arg[0,2,0,0]=(0.417924494005)*x[0]**o+(-0.192820051987)*x[0]+(0.878916271492)*x[1]**o+(-0.35056320984)*x[1]+(0.982897575604)*x[2]**o+(-0.225793730616)*x[2]
-        arg[0,2,0,1]=(-0.493279498849)*x[0]**o+(-0.154177411087)*x[0]+(-0.923592860492)*x[1]**o+(0.872010949252)*x[1]+(-0.936252147064)*x[2]**o+(0.947136819308)*x[2]
-        arg[0,2,1,0]=(0.109357630607)*x[0]**o+(-0.518825477709)*x[0]+(-0.375510667498)*x[1]**o+(0.476537999644)*x[1]+(0.676017421029)*x[2]**o+(-0.633301158984)*x[2]
-        arg[0,2,1,1]=(-0.0662265225539)*x[0]**o+(-0.276634748263)*x[0]+(-0.0655431981102)*x[1]**o+(0.0578482920991)*x[1]+(-0.264370611185)*x[2]**o+(-0.674612985594)*x[2]
-        arg[0,2,2,0]=(-0.924186592743)*x[0]**o+(0.197603043149)*x[0]+(-0.676882805046)*x[1]**o+(0.564142845865)*x[1]+(0.590369345306)*x[2]**o+(-0.872019490978)*x[2]
-        arg[0,2,2,1]=(0.480683776968)*x[0]**o+(-0.412055284173)*x[0]+(0.829996313473)*x[1]**o+(-0.235665473048)*x[1]+(-0.429191305284)*x[2]**o+(-0.0867804318457)*x[2]
-        arg[0,3,0,0]=(-0.0903660006043)*x[0]**o+(-0.507571901766)*x[0]+(-0.0305305861809)*x[1]**o+(-0.915027969989)*x[1]+(0.955644774347)*x[2]**o+(0.739244618775)*x[2]
-        arg[0,3,0,1]=(0.600619122998)*x[0]**o+(0.0128699484527)*x[0]+(-0.360431921281)*x[1]**o+(0.304773619811)*x[1]+(-0.302423314054)*x[2]**o+(0.680149401572)*x[2]
-        arg[0,3,1,0]=(-0.638540513323)*x[0]**o+(0.766655754067)*x[0]+(0.276879854223)*x[1]**o+(-0.628688275247)*x[1]+(0.724584107114)*x[2]**o+(0.682193551967)*x[2]
-        arg[0,3,1,1]=(-0.516656801349)*x[0]**o+(-0.513901319383)*x[0]+(-0.227957010777)*x[1]**o+(-0.164363207703)*x[1]+(-0.919936042047)*x[2]**o+(0.682400184997)*x[2]
-        arg[0,3,2,0]=(-0.819629653095)*x[0]**o+(0.183937049274)*x[0]+(0.0411075800579)*x[1]**o+(0.0813088270699)*x[1]+(0.762416334575)*x[2]**o+(0.236553726705)*x[2]
-        arg[0,3,2,1]=(0.513141183759)*x[0]**o+(-0.452475512734)*x[0]+(0.0461424221984)*x[1]**o+(-0.673452844636)*x[1]+(-0.194493328878)*x[2]**o+(0.812459956422)*x[2]
-        arg[0,4,0,0]=(0.672167415195)*x[0]**o+(-0.641004730405)*x[0]+(-0.383031420851)*x[1]**o+(0.392366431186)*x[1]+(0.66479124224)*x[2]**o+(0.845503225104)*x[2]
-        arg[0,4,0,1]=(0.908241966695)*x[0]**o+(-0.816989438726)*x[0]+(-0.144902267583)*x[1]**o+(-0.654901540598)*x[1]+(-0.9840470269)*x[2]**o+(0.510970695154)*x[2]
-        arg[0,4,1,0]=(0.788858704366)*x[0]**o+(-0.50266306504)*x[0]+(-0.681248796723)*x[1]**o+(0.0317663112509)*x[1]+(0.662428035619)*x[2]**o+(0.377116420912)*x[2]
-        arg[0,4,1,1]=(-0.0734522829037)*x[0]**o+(0.0822741484655)*x[0]+(-0.509279578815)*x[1]**o+(-0.95372420098)*x[1]+(0.682868362508)*x[2]**o+(-0.947156883638)*x[2]
-        arg[0,4,2,0]=(-0.843236607337)*x[0]**o+(-0.925326238513)*x[0]+(-0.153688519983)*x[1]**o+(-0.68456413487)*x[1]+(0.920442617368)*x[2]**o+(0.852945557893)*x[2]
-        arg[0,4,2,1]=(-0.283772512528)*x[0]**o+(0.202730738521)*x[0]+(-0.287375172356)*x[1]**o+(-0.176699132816)*x[1]+(0.446391113264)*x[2]**o+(-0.783266847348)*x[2]
-        arg[1,0,0,0]=(0.81284364562)*x[0]**o+(-0.454432332505)*x[0]+(-0.684692596262)*x[1]**o+(-0.345923888237)*x[1]+(0.1201728631)*x[2]**o+(0.808246135028)*x[2]
-        arg[1,0,0,1]=(0.941104328706)*x[0]**o+(-0.802008654964)*x[0]+(0.902047483677)*x[1]**o+(0.777049224612)*x[1]+(0.120184332854)*x[2]**o+(0.983216899102)*x[2]
-        arg[1,0,1,0]=(-0.420996925767)*x[0]**o+(0.0941750615502)*x[0]+(-0.935342933578)*x[1]**o+(0.925891822058)*x[1]+(-0.153652985582)*x[2]**o+(-0.336548986153)*x[2]
-        arg[1,0,1,1]=(-0.692886221795)*x[0]**o+(-0.920419410139)*x[0]+(-0.586575583263)*x[1]**o+(-0.269347362009)*x[1]+(-0.872169736045)*x[2]**o+(-0.724727186336)*x[2]
-        arg[1,0,2,0]=(-0.0171222282058)*x[0]**o+(0.338180602976)*x[0]+(-0.0345958505395)*x[1]**o+(0.631728421505)*x[1]+(0.90596443453)*x[2]**o+(-0.144785193015)*x[2]
-        arg[1,0,2,1]=(-0.91636583885)*x[0]**o+(-0.807496789574)*x[0]+(0.63472495957)*x[1]**o+(0.966464343993)*x[1]+(-0.471311384621)*x[2]**o+(-0.449420138238)*x[2]
-        arg[1,1,0,0]=(-0.239930503474)*x[0]**o+(-0.476439715994)*x[0]+(0.421600511888)*x[1]**o+(0.477823144792)*x[1]+(0.251409914807)*x[2]**o+(0.636818001419)*x[2]
-        arg[1,1,0,1]=(-0.427510410263)*x[0]**o+(0.494810857516)*x[0]+(-0.129415181352)*x[1]**o+(0.754147770071)*x[1]+(0.0218776365985)*x[2]**o+(0.706183216616)*x[2]
-        arg[1,1,1,0]=(-0.469150375165)*x[0]**o+(-0.0651101638073)*x[0]+(-0.697853003861)*x[1]**o+(0.0389330102026)*x[1]+(-0.256557942045)*x[2]**o+(0.409565340425)*x[2]
-        arg[1,1,1,1]=(0.14957005608)*x[0]**o+(-0.209482968126)*x[0]+(0.368899650309)*x[1]**o+(-0.0899321000137)*x[1]+(0.282389903357)*x[2]**o+(-0.166633883916)*x[2]
-        arg[1,1,2,0]=(0.0374938231714)*x[0]**o+(-0.687972899893)*x[0]+(-0.0686478107779)*x[1]**o+(0.318977937888)*x[1]+(-0.601269126788)*x[2]**o+(0.453188855786)*x[2]
-        arg[1,1,2,1]=(-0.853894223222)*x[0]**o+(0.441830151478)*x[0]+(0.973114898368)*x[1]**o+(-0.264454889071)*x[1]+(-0.828332687531)*x[2]**o+(0.302493748565)*x[2]
-        arg[1,2,0,0]=(0.210365824111)*x[0]**o+(0.4674117857)*x[0]+(-0.129546969044)*x[1]**o+(0.566357125352)*x[1]+(-0.721733448514)*x[2]**o+(0.154253207106)*x[2]
-        arg[1,2,0,1]=(0.805325508181)*x[0]**o+(-0.929113563452)*x[0]+(-0.487301761321)*x[1]**o+(-0.822405526519)*x[1]+(0.254754490326)*x[2]**o+(-0.196480710709)*x[2]
-        arg[1,2,1,0]=(-0.520777275475)*x[0]**o+(-0.912569745644)*x[0]+(-0.784504791087)*x[1]**o+(-0.903473217653)*x[1]+(0.583297107374)*x[2]**o+(0.664811898195)*x[2]
-        arg[1,2,1,1]=(0.129152152958)*x[0]**o+(0.497832200867)*x[0]+(0.121217248234)*x[1]**o+(-0.183368066714)*x[1]+(-0.776145485536)*x[2]**o+(-0.223165724715)*x[2]
-        arg[1,2,2,0]=(-0.698981324488)*x[0]**o+(0.00951277777924)*x[0]+(0.997410976507)*x[1]**o+(0.534670303453)*x[1]+(0.251309223218)*x[2]**o+(-0.921148646979)*x[2]
-        arg[1,2,2,1]=(-0.731509934487)*x[0]**o+(0.87731926834)*x[0]+(0.0865507713913)*x[1]**o+(0.708835987019)*x[1]+(0.294182269171)*x[2]**o+(-0.316660750729)*x[2]
-        arg[1,3,0,0]=(-0.282903962918)*x[0]**o+(-0.793457978844)*x[0]+(0.287425807914)*x[1]**o+(-0.0252722364835)*x[1]+(-0.956202022515)*x[2]**o+(0.650271579135)*x[2]
-        arg[1,3,0,1]=(-0.946723111202)*x[0]**o+(0.669431653693)*x[0]+(-0.791125976188)*x[1]**o+(-0.466484914794)*x[1]+(-0.217225801872)*x[2]**o+(0.224719473996)*x[2]
-        arg[1,3,1,0]=(0.516479301043)*x[0]**o+(-0.42420332366)*x[0]+(-0.0649227247176)*x[1]**o+(0.208849752675)*x[1]+(-0.939001099693)*x[2]**o+(-0.0537827140932)*x[2]
-        arg[1,3,1,1]=(-0.292077069459)*x[0]**o+(-0.444848119744)*x[0]+(0.268592719199)*x[1]**o+(-0.349401060323)*x[1]+(-0.540803784489)*x[2]**o+(-0.487170123526)*x[2]
-        arg[1,3,2,0]=(-0.626222042661)*x[0]**o+(0.245937409624)*x[0]+(-0.24692162006)*x[1]**o+(0.108230029208)*x[1]+(-0.760463241928)*x[2]**o+(-0.587078263201)*x[2]
-        arg[1,3,2,1]=(-0.923891147756)*x[0]**o+(0.0961285842162)*x[0]+(0.0146853466585)*x[1]**o+(0.00951339122359)*x[1]+(-0.261383704723)*x[2]**o+(-0.0262515691324)*x[2]
-        arg[1,4,0,0]=(-0.0370003524292)*x[0]**o+(-0.0463848489957)*x[0]+(0.940061458694)*x[1]**o+(0.592787058925)*x[1]+(-0.217284379638)*x[2]**o+(-0.11746834109)*x[2]
-        arg[1,4,0,1]=(0.830404283093)*x[0]**o+(0.268135490403)*x[0]+(-0.894500398195)*x[1]**o+(0.751042648917)*x[1]+(0.687583292754)*x[2]**o+(-0.884596509742)*x[2]
-        arg[1,4,1,0]=(0.414764592469)*x[0]**o+(-0.529613347919)*x[0]+(-0.727435115594)*x[1]**o+(-0.546579777725)*x[1]+(0.378011893971)*x[2]**o+(-0.578081183238)*x[2]
-        arg[1,4,1,1]=(0.406513376747)*x[0]**o+(-0.350132869579)*x[0]+(-0.557954631299)*x[1]**o+(0.868176175754)*x[1]+(0.793021832632)*x[2]**o+(0.280529771851)*x[2]
-        arg[1,4,2,0]=(0.56741953575)*x[0]**o+(0.0115947684302)*x[0]+(0.872812725363)*x[1]**o+(-0.215183541745)*x[1]+(0.64853692203)*x[2]**o+(-0.139561471922)*x[2]
-        arg[1,4,2,1]=(0.650916904666)*x[0]**o+(0.878765271839)*x[0]+(0.0141264348052)*x[1]**o+(-0.56314426774)*x[1]+(-0.267854377704)*x[2]**o+(0.852271380667)*x[2]
-        arg[2,0,0,0]=(0.948359141577)*x[0]**o+(-0.0881747280974)*x[0]+(0.804871563368)*x[1]**o+(-0.0298585763446)*x[1]+(0.506923333569)*x[2]**o+(-0.920947093648)*x[2]
-        arg[2,0,0,1]=(-0.0144221258584)*x[0]**o+(-0.679723072824)*x[0]+(0.00829336956687)*x[1]**o+(0.675680809303)*x[1]+(-0.803195231536)*x[2]**o+(0.70240358571)*x[2]
-        arg[2,0,1,0]=(-0.159174987706)*x[0]**o+(0.922309271483)*x[0]+(0.344354343035)*x[1]**o+(-0.00954038311323)*x[1]+(-0.50225452804)*x[2]**o+(0.355899734308)*x[2]
-        arg[2,0,1,1]=(0.0857611780404)*x[0]**o+(0.876479431983)*x[0]+(0.105049158502)*x[1]**o+(-0.530308461426)*x[1]+(-0.553136649343)*x[2]**o+(0.385458516481)*x[2]
-        arg[2,0,2,0]=(-0.260086070842)*x[0]**o+(0.417766241499)*x[0]+(-0.292370383673)*x[1]**o+(-0.321315349553)*x[1]+(-0.437301444082)*x[2]**o+(0.730845669715)*x[2]
-        arg[2,0,2,1]=(0.132547674276)*x[0]**o+(0.783602886333)*x[0]+(0.822361450413)*x[1]**o+(-0.810402783)*x[1]+(0.759701191023)*x[2]**o+(0.644375788608)*x[2]
-        arg[2,1,0,0]=(-0.841458111227)*x[0]**o+(0.779917641736)*x[0]+(-0.0745587217256)*x[1]**o+(0.938545280143)*x[1]+(0.454600163373)*x[2]**o+(-0.490348377697)*x[2]
-        arg[2,1,0,1]=(-0.876477136174)*x[0]**o+(-0.248200369939)*x[0]+(-0.973654243816)*x[1]**o+(0.482402123794)*x[1]+(-0.776970490827)*x[2]**o+(-0.571349467703)*x[2]
-        arg[2,1,1,0]=(-0.433528193102)*x[0]**o+(-0.57712915767)*x[0]+(-0.328671198058)*x[1]**o+(-0.926873019075)*x[1]+(0.314232739356)*x[2]**o+(-0.199625466412)*x[2]
-        arg[2,1,1,1]=(0.892707770392)*x[0]**o+(-0.680081898234)*x[0]+(-0.754181058483)*x[1]**o+(-0.253728945575)*x[1]+(-0.906373406684)*x[2]**o+(-0.0266435080833)*x[2]
-        arg[2,1,2,0]=(-0.121605378472)*x[0]**o+(-0.503955015634)*x[0]+(-0.0960767196114)*x[1]**o+(-0.937914890361)*x[1]+(0.212042931853)*x[2]**o+(0.930703155408)*x[2]
-        arg[2,1,2,1]=(0.0564159441047)*x[0]**o+(0.842332721105)*x[0]+(0.954741657608)*x[1]**o+(0.73503176)*x[1]+(-0.390679938582)*x[2]**o+(-0.440014747741)*x[2]
-        arg[2,2,0,0]=(0.0100637970821)*x[0]**o+(-0.0283353154145)*x[0]+(0.865360758262)*x[1]**o+(0.780975027988)*x[1]+(0.16115842919)*x[2]**o+(0.247580155656)*x[2]
-        arg[2,2,0,1]=(0.61102059426)*x[0]**o+(-0.198005744101)*x[0]+(0.503568797262)*x[1]**o+(0.0288809726497)*x[1]+(-0.765127098183)*x[2]**o+(0.409803857723)*x[2]
-        arg[2,2,1,0]=(-0.712272018295)*x[0]**o+(-0.62562142063)*x[0]+(-0.579501949719)*x[1]**o+(0.628539275236)*x[1]+(0.0200945124964)*x[2]**o+(0.175966024769)*x[2]
-        arg[2,2,1,1]=(-0.798244445519)*x[0]**o+(-0.376440962535)*x[0]+(-0.134467401497)*x[1]**o+(0.877538294477)*x[1]+(-0.484870741192)*x[2]**o+(-0.224064469935)*x[2]
-        arg[2,2,2,0]=(0.200196926368)*x[0]**o+(-0.528000867086)*x[0]+(-0.708942342624)*x[1]**o+(-0.591994969141)*x[1]+(-0.990641592656)*x[2]**o+(-0.875897347303)*x[2]
-        arg[2,2,2,1]=(0.949113190797)*x[0]**o+(0.867855496786)*x[0]+(-0.0314953438065)*x[1]**o+(-0.371928428005)*x[1]+(-0.526403191063)*x[2]**o+(0.653049122326)*x[2]
-        arg[2,3,0,0]=(-0.353418327127)*x[0]**o+(-0.418588306429)*x[0]+(0.400872043269)*x[1]**o+(0.141907924042)*x[1]+(-0.999869579462)*x[2]**o+(-0.410423954563)*x[2]
-        arg[2,3,0,1]=(-0.240390877307)*x[0]**o+(0.0901879916115)*x[0]+(-0.0734683209657)*x[1]**o+(0.274836005886)*x[1]+(-0.336375498181)*x[2]**o+(-0.754776455221)*x[2]
-        arg[2,3,1,0]=(0.259928460822)*x[0]**o+(-0.227630454708)*x[0]+(0.725968066278)*x[1]**o+(-0.545440695763)*x[1]+(-0.0354926607815)*x[2]**o+(0.365010532181)*x[2]
-        arg[2,3,1,1]=(-0.969799373398)*x[0]**o+(0.514498233214)*x[0]+(0.907450925318)*x[1]**o+(-0.234993706406)*x[1]+(0.206323910806)*x[2]**o+(0.209364250369)*x[2]
-        arg[2,3,2,0]=(0.712905565941)*x[0]**o+(-0.353322758263)*x[0]+(0.816861181494)*x[1]**o+(-0.362388243619)*x[1]+(0.302543517607)*x[2]**o+(-0.831280418852)*x[2]
-        arg[2,3,2,1]=(-0.386373711182)*x[0]**o+(0.946914567792)*x[0]+(-0.52795085887)*x[1]**o+(0.86635245964)*x[1]+(0.654261054178)*x[2]**o+(0.452334882498)*x[2]
-        arg[2,4,0,0]=(0.374747033547)*x[0]**o+(-0.3471578669)*x[0]+(0.322217002639)*x[1]**o+(0.92988068982)*x[1]+(-0.642423472369)*x[2]**o+(-0.759623225653)*x[2]
-        arg[2,4,0,1]=(-0.322255157841)*x[0]**o+(-0.253806844569)*x[0]+(-0.0688746199637)*x[1]**o+(0.232840317719)*x[1]+(-0.815623721026)*x[2]**o+(0.43055485562)*x[2]
-        arg[2,4,1,0]=(-0.452320341493)*x[0]**o+(0.755240168228)*x[0]+(-0.892552611066)*x[1]**o+(0.438275161458)*x[1]+(0.441378369388)*x[2]**o+(-0.870501114753)*x[2]
-        arg[2,4,1,1]=(0.496731258286)*x[0]**o+(-0.499918335322)*x[0]+(0.000476061942027)*x[1]**o+(-0.857762621856)*x[1]+(0.957433798133)*x[2]**o+(-0.766450629361)*x[2]
-        arg[2,4,2,0]=(0.860379598562)*x[0]**o+(-0.0816478389485)*x[0]+(-0.438181864676)*x[1]**o+(0.78937427676)*x[1]+(-0.97940010041)*x[2]**o+(0.583914605259)*x[2]
-        arg[2,4,2,1]=(0.23729037277)*x[0]**o+(-0.365380141474)*x[0]+(-0.471505632575)*x[1]**o+(-0.168838288)*x[1]+(-0.519847065791)*x[2]**o+(-0.816100518668)*x[2]
-        arg[3,0,0,0]=(0.729921808661)*x[0]**o+(0.732868255388)*x[0]+(0.305434623795)*x[1]**o+(-0.45402804883)*x[1]+(0.604368334171)*x[2]**o+(-0.179233711008)*x[2]
-        arg[3,0,0,1]=(-0.208916687176)*x[0]**o+(-0.297916049539)*x[0]+(0.854941564423)*x[1]**o+(0.775355543915)*x[1]+(-0.373382357688)*x[2]**o+(0.792557314074)*x[2]
-        arg[3,0,1,0]=(0.606041025674)*x[0]**o+(0.115814644681)*x[0]+(-0.414470914985)*x[1]**o+(-0.136577390174)*x[1]+(0.672303216396)*x[2]**o+(-0.479680752765)*x[2]
-        arg[3,0,1,1]=(-0.535633649471)*x[0]**o+(0.133761944775)*x[0]+(-0.980107507665)*x[1]**o+(0.211561747114)*x[1]+(-0.530648770004)*x[2]**o+(0.417977629512)*x[2]
-        arg[3,0,2,0]=(-0.242797826282)*x[0]**o+(-0.828691638823)*x[0]+(-0.187401612749)*x[1]**o+(-0.453821620107)*x[1]+(-0.475718408605)*x[2]**o+(0.683502702497)*x[2]
-        arg[3,0,2,1]=(-0.66640812951)*x[0]**o+(-0.259184719546)*x[0]+(0.463743732654)*x[1]**o+(0.6746349156)*x[1]+(-0.0532918236783)*x[2]**o+(-0.714197225876)*x[2]
-        arg[3,1,0,0]=(-0.97693616823)*x[0]**o+(-0.825560555757)*x[0]+(0.118452690664)*x[1]**o+(-0.125279874388)*x[1]+(0.733803136335)*x[2]**o+(-0.884902209956)*x[2]
-        arg[3,1,0,1]=(-0.652466190334)*x[0]**o+(0.370106640243)*x[0]+(0.0850861818306)*x[1]**o+(-0.49744492012)*x[1]+(-0.843498619618)*x[2]**o+(-0.0480070808698)*x[2]
-        arg[3,1,1,0]=(-0.450526704276)*x[0]**o+(0.430774951776)*x[0]+(-0.956799540696)*x[1]**o+(0.820090546747)*x[1]+(0.831582198997)*x[2]**o+(0.491042906394)*x[2]
-        arg[3,1,1,1]=(0.419717807665)*x[0]**o+(0.320904534666)*x[0]+(-0.483247938999)*x[1]**o+(0.82174341564)*x[1]+(-0.441719998974)*x[2]**o+(0.691713322239)*x[2]
-        arg[3,1,2,0]=(0.255464093123)*x[0]**o+(-0.256334953799)*x[0]+(0.677105284128)*x[1]**o+(-0.584438025212)*x[1]+(0.505820591597)*x[2]**o+(0.247943562937)*x[2]
-        arg[3,1,2,1]=(-0.495204107745)*x[0]**o+(0.234426349601)*x[0]+(0.736969108189)*x[1]**o+(-0.369684409765)*x[1]+(0.164303379282)*x[2]**o+(-0.595757590519)*x[2]
-        arg[3,2,0,0]=(0.238639684591)*x[0]**o+(0.568638143194)*x[0]+(0.972646679042)*x[1]**o+(-0.652648194795)*x[1]+(-0.0530713046414)*x[2]**o+(0.356043665396)*x[2]
-        arg[3,2,0,1]=(0.458539145106)*x[0]**o+(0.111417037398)*x[0]+(-0.135374868193)*x[1]**o+(-0.535451685997)*x[1]+(-0.820797762877)*x[2]**o+(0.122239787933)*x[2]
-        arg[3,2,1,0]=(-0.323251425039)*x[0]**o+(0.106998797206)*x[0]+(-0.0671655760766)*x[1]**o+(0.836342794315)*x[1]+(0.34628715493)*x[2]**o+(-0.11058327806)*x[2]
-        arg[3,2,1,1]=(0.181994203911)*x[0]**o+(-0.710678453639)*x[0]+(0.625606409786)*x[1]**o+(-0.363170328543)*x[1]+(-0.932998745422)*x[2]**o+(-0.0411581284314)*x[2]
-        arg[3,2,2,0]=(0.710847104903)*x[0]**o+(0.483971915285)*x[0]+(0.42996482533)*x[1]**o+(0.456817348253)*x[1]+(0.844562058604)*x[2]**o+(-0.469586014721)*x[2]
-        arg[3,2,2,1]=(-0.845771280837)*x[0]**o+(-0.081384696494)*x[0]+(0.71823377714)*x[1]**o+(-0.846672143168)*x[1]+(-0.139540918461)*x[2]**o+(0.837646131987)*x[2]
-        arg[3,3,0,0]=(-0.958726792109)*x[0]**o+(0.53196455268)*x[0]+(-0.621810423658)*x[1]**o+(-0.0352106197658)*x[1]+(-0.636059207474)*x[2]**o+(-0.0491118207063)*x[2]
-        arg[3,3,0,1]=(0.987836799279)*x[0]**o+(0.41633576224)*x[0]+(0.312021799176)*x[1]**o+(-0.168836582938)*x[1]+(-0.391725003735)*x[2]**o+(-0.158000182269)*x[2]
-        arg[3,3,1,0]=(-0.280868116529)*x[0]**o+(-0.687924000092)*x[0]+(0.865840229722)*x[1]**o+(-0.0823203022874)*x[1]+(-0.857309899784)*x[2]**o+(-0.0657473493059)*x[2]
-        arg[3,3,1,1]=(0.680496030567)*x[0]**o+(0.159575720724)*x[0]+(0.0531895122046)*x[1]**o+(0.359273896084)*x[1]+(0.35084774502)*x[2]**o+(0.0982220259531)*x[2]
-        arg[3,3,2,0]=(0.140872311111)*x[0]**o+(-0.00845309046907)*x[0]+(-0.845527142503)*x[1]**o+(-0.67713103521)*x[1]+(0.972054187828)*x[2]**o+(-0.800664963509)*x[2]
-        arg[3,3,2,1]=(-0.490866666782)*x[0]**o+(-0.0988939523952)*x[0]+(0.236210969508)*x[1]**o+(-0.672617589992)*x[1]+(-0.640558724403)*x[2]**o+(-0.203125267713)*x[2]
-        arg[3,4,0,0]=(0.318438839683)*x[0]**o+(0.0864322377812)*x[0]+(-0.371419701638)*x[1]**o+(-0.311583139142)*x[1]+(-0.0533111244011)*x[2]**o+(0.841240973423)*x[2]
-        arg[3,4,0,1]=(-0.573110771334)*x[0]**o+(0.703852077914)*x[0]+(0.613309217217)*x[1]**o+(0.247223193846)*x[1]+(0.618952485205)*x[2]**o+(-0.395998308184)*x[2]
-        arg[3,4,1,0]=(0.512896938934)*x[0]**o+(0.848653171505)*x[0]+(-0.944903687062)*x[1]**o+(0.179782177607)*x[1]+(-0.0287288996538)*x[2]**o+(-0.385519118293)*x[2]
-        arg[3,4,1,1]=(0.234190647718)*x[0]**o+(0.445478221419)*x[0]+(0.588931676434)*x[1]**o+(0.140788139998)*x[1]+(-0.761952359657)*x[2]**o+(0.92377426359)*x[2]
-        arg[3,4,2,0]=(-0.836038966171)*x[0]**o+(-0.772990045933)*x[0]+(0.0622128209877)*x[1]**o+(-0.73733496141)*x[1]+(0.0234446925161)*x[2]**o+(-0.682234213315)*x[2]
-        arg[3,4,2,1]=(0.250498084214)*x[0]**o+(0.539088356159)*x[0]+(-0.691842680176)*x[1]**o+(0.710040802953)*x[1]+(-0.43691551501)*x[2]**o+(0.710668600989)*x[2]
-        ref[0,0,0,0]=(-0.836302395465)*x_ref[0]**o+(-0.842568675604)*x_ref[0]+(-0.780133441207)*x_ref[1]**o+(0.54483947113)*x_ref[1]+(-0.130253019696)*x_ref[2]**o+(0.358303389828)*x_ref[2]
-        ref[0,0,0,1]=(-0.722847500652)*x_ref[0]**o+(0.42887368878)*x_ref[0]+(0.979187056933)*x_ref[1]**o+(0.624875714982)*x_ref[1]+(-0.672529765247)*x_ref[2]**o+(0.822363583702)*x_ref[2]
-        ref[0,0,1,0]=(-0.28989650691)*x_ref[0]**o+(-0.847647954773)*x_ref[0]+(-0.11119862113)*x_ref[1]**o+(0.0809009676818)*x_ref[1]+(-0.672626533587)*x_ref[2]**o+(0.580561232267)*x_ref[2]
-        ref[0,0,1,1]=(-0.64783363248)*x_ref[0]**o+(0.212828552873)*x_ref[0]+(-0.845297180936)*x_ref[1]**o+(-0.714760411186)*x_ref[1]+(-0.385173605122)*x_ref[2]**o+(-0.760750317556)*x_ref[2]
-        ref[0,0,2,0]=(-0.328757006046)*x_ref[0]**o+(-0.0935907722247)*x_ref[0]+(-0.895866135795)*x_ref[1]**o+(-0.701241976745)*x_ref[1]+(0.893684139941)*x_ref[2]**o+(-0.265339318222)*x_ref[2]
-        ref[0,0,2,1]=(0.134066662346)*x_ref[0]**o+(0.0383231508856)*x_ref[0]+(-0.347744261995)*x_ref[1]**o+(-0.86897907336)*x_ref[1]+(-0.287792154521)*x_ref[2]**o+(0.859351846891)*x_ref[2]
-        ref[0,1,0,0]=(-0.635128124936)*x_ref[0]**o+(-0.659462189733)*x_ref[0]+(-0.0964365747936)*x_ref[1]**o+(-0.385702168747)*x_ref[1]+(0.179539914057)*x_ref[2]**o+(-0.0176420847859)*x_ref[2]
-        ref[0,1,0,1]=(-0.580750807831)*x_ref[0]**o+(0.756493147583)*x_ref[0]+(-0.436842251289)*x_ref[1]**o+(-0.705624646095)*x_ref[1]+(0.983064096262)*x_ref[2]**o+(-0.0197153825423)*x_ref[2]
-        ref[0,1,1,0]=(-0.567748582365)*x_ref[0]**o+(0.579324420356)*x_ref[0]+(0.0434168493419)*x_ref[1]**o+(-0.839692920334)*x_ref[1]+(-0.119239847745)*x_ref[2]**o+(0.527047942834)*x_ref[2]
-        ref[0,1,1,1]=(0.52870403655)*x_ref[0]**o+(0.700090892471)*x_ref[0]+(0.730224313921)*x_ref[1]**o+(-0.815451751207)*x_ref[1]+(-0.943945382413)*x_ref[2]**o+(-0.571714141916)*x_ref[2]
-        ref[0,1,2,0]=(-0.803841094887)*x_ref[0]**o+(0.0595126006237)*x_ref[0]+(-0.612341797645)*x_ref[1]**o+(0.944552805211)*x_ref[1]+(-0.00253009731786)*x_ref[2]**o+(0.0174867439912)*x_ref[2]
-        ref[0,1,2,1]=(-0.145623212549)*x_ref[0]**o+(0.546039957008)*x_ref[0]+(-0.221425237579)*x_ref[1]**o+(0.229367671159)*x_ref[1]+(-0.784903869759)*x_ref[2]**o+(0.898045208871)*x_ref[2]
-        ref[0,2,0,0]=(0.417924494005)*x_ref[0]**o+(-0.192820051987)*x_ref[0]+(0.878916271492)*x_ref[1]**o+(-0.35056320984)*x_ref[1]+(0.982897575604)*x_ref[2]**o+(-0.225793730616)*x_ref[2]
-        ref[0,2,0,1]=(-0.493279498849)*x_ref[0]**o+(-0.154177411087)*x_ref[0]+(-0.923592860492)*x_ref[1]**o+(0.872010949252)*x_ref[1]+(-0.936252147064)*x_ref[2]**o+(0.947136819308)*x_ref[2]
-        ref[0,2,1,0]=(0.109357630607)*x_ref[0]**o+(-0.518825477709)*x_ref[0]+(-0.375510667498)*x_ref[1]**o+(0.476537999644)*x_ref[1]+(0.676017421029)*x_ref[2]**o+(-0.633301158984)*x_ref[2]
-        ref[0,2,1,1]=(-0.0662265225539)*x_ref[0]**o+(-0.276634748263)*x_ref[0]+(-0.0655431981102)*x_ref[1]**o+(0.0578482920991)*x_ref[1]+(-0.264370611185)*x_ref[2]**o+(-0.674612985594)*x_ref[2]
-        ref[0,2,2,0]=(-0.924186592743)*x_ref[0]**o+(0.197603043149)*x_ref[0]+(-0.676882805046)*x_ref[1]**o+(0.564142845865)*x_ref[1]+(0.590369345306)*x_ref[2]**o+(-0.872019490978)*x_ref[2]
-        ref[0,2,2,1]=(0.480683776968)*x_ref[0]**o+(-0.412055284173)*x_ref[0]+(0.829996313473)*x_ref[1]**o+(-0.235665473048)*x_ref[1]+(-0.429191305284)*x_ref[2]**o+(-0.0867804318457)*x_ref[2]
-        ref[0,3,0,0]=(-0.0903660006043)*x_ref[0]**o+(-0.507571901766)*x_ref[0]+(-0.0305305861809)*x_ref[1]**o+(-0.915027969989)*x_ref[1]+(0.955644774347)*x_ref[2]**o+(0.739244618775)*x_ref[2]
-        ref[0,3,0,1]=(0.600619122998)*x_ref[0]**o+(0.0128699484527)*x_ref[0]+(-0.360431921281)*x_ref[1]**o+(0.304773619811)*x_ref[1]+(-0.302423314054)*x_ref[2]**o+(0.680149401572)*x_ref[2]
-        ref[0,3,1,0]=(-0.638540513323)*x_ref[0]**o+(0.766655754067)*x_ref[0]+(0.276879854223)*x_ref[1]**o+(-0.628688275247)*x_ref[1]+(0.724584107114)*x_ref[2]**o+(0.682193551967)*x_ref[2]
-        ref[0,3,1,1]=(-0.516656801349)*x_ref[0]**o+(-0.513901319383)*x_ref[0]+(-0.227957010777)*x_ref[1]**o+(-0.164363207703)*x_ref[1]+(-0.919936042047)*x_ref[2]**o+(0.682400184997)*x_ref[2]
-        ref[0,3,2,0]=(-0.819629653095)*x_ref[0]**o+(0.183937049274)*x_ref[0]+(0.0411075800579)*x_ref[1]**o+(0.0813088270699)*x_ref[1]+(0.762416334575)*x_ref[2]**o+(0.236553726705)*x_ref[2]
-        ref[0,3,2,1]=(0.513141183759)*x_ref[0]**o+(-0.452475512734)*x_ref[0]+(0.0461424221984)*x_ref[1]**o+(-0.673452844636)*x_ref[1]+(-0.194493328878)*x_ref[2]**o+(0.812459956422)*x_ref[2]
-        ref[0,4,0,0]=(0.672167415195)*x_ref[0]**o+(-0.641004730405)*x_ref[0]+(-0.383031420851)*x_ref[1]**o+(0.392366431186)*x_ref[1]+(0.66479124224)*x_ref[2]**o+(0.845503225104)*x_ref[2]
-        ref[0,4,0,1]=(0.908241966695)*x_ref[0]**o+(-0.816989438726)*x_ref[0]+(-0.144902267583)*x_ref[1]**o+(-0.654901540598)*x_ref[1]+(-0.9840470269)*x_ref[2]**o+(0.510970695154)*x_ref[2]
-        ref[0,4,1,0]=(0.788858704366)*x_ref[0]**o+(-0.50266306504)*x_ref[0]+(-0.681248796723)*x_ref[1]**o+(0.0317663112509)*x_ref[1]+(0.662428035619)*x_ref[2]**o+(0.377116420912)*x_ref[2]
-        ref[0,4,1,1]=(-0.0734522829037)*x_ref[0]**o+(0.0822741484655)*x_ref[0]+(-0.509279578815)*x_ref[1]**o+(-0.95372420098)*x_ref[1]+(0.682868362508)*x_ref[2]**o+(-0.947156883638)*x_ref[2]
-        ref[0,4,2,0]=(-0.843236607337)*x_ref[0]**o+(-0.925326238513)*x_ref[0]+(-0.153688519983)*x_ref[1]**o+(-0.68456413487)*x_ref[1]+(0.920442617368)*x_ref[2]**o+(0.852945557893)*x_ref[2]
-        ref[0,4,2,1]=(-0.283772512528)*x_ref[0]**o+(0.202730738521)*x_ref[0]+(-0.287375172356)*x_ref[1]**o+(-0.176699132816)*x_ref[1]+(0.446391113264)*x_ref[2]**o+(-0.783266847348)*x_ref[2]
-        ref[1,0,0,0]=(0.81284364562)*x_ref[0]**o+(-0.454432332505)*x_ref[0]+(-0.684692596262)*x_ref[1]**o+(-0.345923888237)*x_ref[1]+(0.1201728631)*x_ref[2]**o+(0.808246135028)*x_ref[2]
-        ref[1,0,0,1]=(0.941104328706)*x_ref[0]**o+(-0.802008654964)*x_ref[0]+(0.902047483677)*x_ref[1]**o+(0.777049224612)*x_ref[1]+(0.120184332854)*x_ref[2]**o+(0.983216899102)*x_ref[2]
-        ref[1,0,1,0]=(-0.420996925767)*x_ref[0]**o+(0.0941750615502)*x_ref[0]+(-0.935342933578)*x_ref[1]**o+(0.925891822058)*x_ref[1]+(-0.153652985582)*x_ref[2]**o+(-0.336548986153)*x_ref[2]
-        ref[1,0,1,1]=(-0.692886221795)*x_ref[0]**o+(-0.920419410139)*x_ref[0]+(-0.586575583263)*x_ref[1]**o+(-0.269347362009)*x_ref[1]+(-0.872169736045)*x_ref[2]**o+(-0.724727186336)*x_ref[2]
-        ref[1,0,2,0]=(-0.0171222282058)*x_ref[0]**o+(0.338180602976)*x_ref[0]+(-0.0345958505395)*x_ref[1]**o+(0.631728421505)*x_ref[1]+(0.90596443453)*x_ref[2]**o+(-0.144785193015)*x_ref[2]
-        ref[1,0,2,1]=(-0.91636583885)*x_ref[0]**o+(-0.807496789574)*x_ref[0]+(0.63472495957)*x_ref[1]**o+(0.966464343993)*x_ref[1]+(-0.471311384621)*x_ref[2]**o+(-0.449420138238)*x_ref[2]
-        ref[1,1,0,0]=(-0.239930503474)*x_ref[0]**o+(-0.476439715994)*x_ref[0]+(0.421600511888)*x_ref[1]**o+(0.477823144792)*x_ref[1]+(0.251409914807)*x_ref[2]**o+(0.636818001419)*x_ref[2]
-        ref[1,1,0,1]=(-0.427510410263)*x_ref[0]**o+(0.494810857516)*x_ref[0]+(-0.129415181352)*x_ref[1]**o+(0.754147770071)*x_ref[1]+(0.0218776365985)*x_ref[2]**o+(0.706183216616)*x_ref[2]
-        ref[1,1,1,0]=(-0.469150375165)*x_ref[0]**o+(-0.0651101638073)*x_ref[0]+(-0.697853003861)*x_ref[1]**o+(0.0389330102026)*x_ref[1]+(-0.256557942045)*x_ref[2]**o+(0.409565340425)*x_ref[2]
-        ref[1,1,1,1]=(0.14957005608)*x_ref[0]**o+(-0.209482968126)*x_ref[0]+(0.368899650309)*x_ref[1]**o+(-0.0899321000137)*x_ref[1]+(0.282389903357)*x_ref[2]**o+(-0.166633883916)*x_ref[2]
-        ref[1,1,2,0]=(0.0374938231714)*x_ref[0]**o+(-0.687972899893)*x_ref[0]+(-0.0686478107779)*x_ref[1]**o+(0.318977937888)*x_ref[1]+(-0.601269126788)*x_ref[2]**o+(0.453188855786)*x_ref[2]
-        ref[1,1,2,1]=(-0.853894223222)*x_ref[0]**o+(0.441830151478)*x_ref[0]+(0.973114898368)*x_ref[1]**o+(-0.264454889071)*x_ref[1]+(-0.828332687531)*x_ref[2]**o+(0.302493748565)*x_ref[2]
-        ref[1,2,0,0]=(0.210365824111)*x_ref[0]**o+(0.4674117857)*x_ref[0]+(-0.129546969044)*x_ref[1]**o+(0.566357125352)*x_ref[1]+(-0.721733448514)*x_ref[2]**o+(0.154253207106)*x_ref[2]
-        ref[1,2,0,1]=(0.805325508181)*x_ref[0]**o+(-0.929113563452)*x_ref[0]+(-0.487301761321)*x_ref[1]**o+(-0.822405526519)*x_ref[1]+(0.254754490326)*x_ref[2]**o+(-0.196480710709)*x_ref[2]
-        ref[1,2,1,0]=(-0.520777275475)*x_ref[0]**o+(-0.912569745644)*x_ref[0]+(-0.784504791087)*x_ref[1]**o+(-0.903473217653)*x_ref[1]+(0.583297107374)*x_ref[2]**o+(0.664811898195)*x_ref[2]
-        ref[1,2,1,1]=(0.129152152958)*x_ref[0]**o+(0.497832200867)*x_ref[0]+(0.121217248234)*x_ref[1]**o+(-0.183368066714)*x_ref[1]+(-0.776145485536)*x_ref[2]**o+(-0.223165724715)*x_ref[2]
-        ref[1,2,2,0]=(-0.698981324488)*x_ref[0]**o+(0.00951277777924)*x_ref[0]+(0.997410976507)*x_ref[1]**o+(0.534670303453)*x_ref[1]+(0.251309223218)*x_ref[2]**o+(-0.921148646979)*x_ref[2]
-        ref[1,2,2,1]=(-0.731509934487)*x_ref[0]**o+(0.87731926834)*x_ref[0]+(0.0865507713913)*x_ref[1]**o+(0.708835987019)*x_ref[1]+(0.294182269171)*x_ref[2]**o+(-0.316660750729)*x_ref[2]
-        ref[1,3,0,0]=(-0.282903962918)*x_ref[0]**o+(-0.793457978844)*x_ref[0]+(0.287425807914)*x_ref[1]**o+(-0.0252722364835)*x_ref[1]+(-0.956202022515)*x_ref[2]**o+(0.650271579135)*x_ref[2]
-        ref[1,3,0,1]=(-0.946723111202)*x_ref[0]**o+(0.669431653693)*x_ref[0]+(-0.791125976188)*x_ref[1]**o+(-0.466484914794)*x_ref[1]+(-0.217225801872)*x_ref[2]**o+(0.224719473996)*x_ref[2]
-        ref[1,3,1,0]=(0.516479301043)*x_ref[0]**o+(-0.42420332366)*x_ref[0]+(-0.0649227247176)*x_ref[1]**o+(0.208849752675)*x_ref[1]+(-0.939001099693)*x_ref[2]**o+(-0.0537827140932)*x_ref[2]
-        ref[1,3,1,1]=(-0.292077069459)*x_ref[0]**o+(-0.444848119744)*x_ref[0]+(0.268592719199)*x_ref[1]**o+(-0.349401060323)*x_ref[1]+(-0.540803784489)*x_ref[2]**o+(-0.487170123526)*x_ref[2]
-        ref[1,3,2,0]=(-0.626222042661)*x_ref[0]**o+(0.245937409624)*x_ref[0]+(-0.24692162006)*x_ref[1]**o+(0.108230029208)*x_ref[1]+(-0.760463241928)*x_ref[2]**o+(-0.587078263201)*x_ref[2]
-        ref[1,3,2,1]=(-0.923891147756)*x_ref[0]**o+(0.0961285842162)*x_ref[0]+(0.0146853466585)*x_ref[1]**o+(0.00951339122359)*x_ref[1]+(-0.261383704723)*x_ref[2]**o+(-0.0262515691324)*x_ref[2]
-        ref[1,4,0,0]=(-0.0370003524292)*x_ref[0]**o+(-0.0463848489957)*x_ref[0]+(0.940061458694)*x_ref[1]**o+(0.592787058925)*x_ref[1]+(-0.217284379638)*x_ref[2]**o+(-0.11746834109)*x_ref[2]
-        ref[1,4,0,1]=(0.830404283093)*x_ref[0]**o+(0.268135490403)*x_ref[0]+(-0.894500398195)*x_ref[1]**o+(0.751042648917)*x_ref[1]+(0.687583292754)*x_ref[2]**o+(-0.884596509742)*x_ref[2]
-        ref[1,4,1,0]=(0.414764592469)*x_ref[0]**o+(-0.529613347919)*x_ref[0]+(-0.727435115594)*x_ref[1]**o+(-0.546579777725)*x_ref[1]+(0.378011893971)*x_ref[2]**o+(-0.578081183238)*x_ref[2]
-        ref[1,4,1,1]=(0.406513376747)*x_ref[0]**o+(-0.350132869579)*x_ref[0]+(-0.557954631299)*x_ref[1]**o+(0.868176175754)*x_ref[1]+(0.793021832632)*x_ref[2]**o+(0.280529771851)*x_ref[2]
-        ref[1,4,2,0]=(0.56741953575)*x_ref[0]**o+(0.0115947684302)*x_ref[0]+(0.872812725363)*x_ref[1]**o+(-0.215183541745)*x_ref[1]+(0.64853692203)*x_ref[2]**o+(-0.139561471922)*x_ref[2]
-        ref[1,4,2,1]=(0.650916904666)*x_ref[0]**o+(0.878765271839)*x_ref[0]+(0.0141264348052)*x_ref[1]**o+(-0.56314426774)*x_ref[1]+(-0.267854377704)*x_ref[2]**o+(0.852271380667)*x_ref[2]
-        ref[2,0,0,0]=(0.948359141577)*x_ref[0]**o+(-0.0881747280974)*x_ref[0]+(0.804871563368)*x_ref[1]**o+(-0.0298585763446)*x_ref[1]+(0.506923333569)*x_ref[2]**o+(-0.920947093648)*x_ref[2]
-        ref[2,0,0,1]=(-0.0144221258584)*x_ref[0]**o+(-0.679723072824)*x_ref[0]+(0.00829336956687)*x_ref[1]**o+(0.675680809303)*x_ref[1]+(-0.803195231536)*x_ref[2]**o+(0.70240358571)*x_ref[2]
-        ref[2,0,1,0]=(-0.159174987706)*x_ref[0]**o+(0.922309271483)*x_ref[0]+(0.344354343035)*x_ref[1]**o+(-0.00954038311323)*x_ref[1]+(-0.50225452804)*x_ref[2]**o+(0.355899734308)*x_ref[2]
-        ref[2,0,1,1]=(0.0857611780404)*x_ref[0]**o+(0.876479431983)*x_ref[0]+(0.105049158502)*x_ref[1]**o+(-0.530308461426)*x_ref[1]+(-0.553136649343)*x_ref[2]**o+(0.385458516481)*x_ref[2]
-        ref[2,0,2,0]=(-0.260086070842)*x_ref[0]**o+(0.417766241499)*x_ref[0]+(-0.292370383673)*x_ref[1]**o+(-0.321315349553)*x_ref[1]+(-0.437301444082)*x_ref[2]**o+(0.730845669715)*x_ref[2]
-        ref[2,0,2,1]=(0.132547674276)*x_ref[0]**o+(0.783602886333)*x_ref[0]+(0.822361450413)*x_ref[1]**o+(-0.810402783)*x_ref[1]+(0.759701191023)*x_ref[2]**o+(0.644375788608)*x_ref[2]
-        ref[2,1,0,0]=(-0.841458111227)*x_ref[0]**o+(0.779917641736)*x_ref[0]+(-0.0745587217256)*x_ref[1]**o+(0.938545280143)*x_ref[1]+(0.454600163373)*x_ref[2]**o+(-0.490348377697)*x_ref[2]
-        ref[2,1,0,1]=(-0.876477136174)*x_ref[0]**o+(-0.248200369939)*x_ref[0]+(-0.973654243816)*x_ref[1]**o+(0.482402123794)*x_ref[1]+(-0.776970490827)*x_ref[2]**o+(-0.571349467703)*x_ref[2]
-        ref[2,1,1,0]=(-0.433528193102)*x_ref[0]**o+(-0.57712915767)*x_ref[0]+(-0.328671198058)*x_ref[1]**o+(-0.926873019075)*x_ref[1]+(0.314232739356)*x_ref[2]**o+(-0.199625466412)*x_ref[2]
-        ref[2,1,1,1]=(0.892707770392)*x_ref[0]**o+(-0.680081898234)*x_ref[0]+(-0.754181058483)*x_ref[1]**o+(-0.253728945575)*x_ref[1]+(-0.906373406684)*x_ref[2]**o+(-0.0266435080833)*x_ref[2]
-        ref[2,1,2,0]=(-0.121605378472)*x_ref[0]**o+(-0.503955015634)*x_ref[0]+(-0.0960767196114)*x_ref[1]**o+(-0.937914890361)*x_ref[1]+(0.212042931853)*x_ref[2]**o+(0.930703155408)*x_ref[2]
-        ref[2,1,2,1]=(0.0564159441047)*x_ref[0]**o+(0.842332721105)*x_ref[0]+(0.954741657608)*x_ref[1]**o+(0.73503176)*x_ref[1]+(-0.390679938582)*x_ref[2]**o+(-0.440014747741)*x_ref[2]
-        ref[2,2,0,0]=(0.0100637970821)*x_ref[0]**o+(-0.0283353154145)*x_ref[0]+(0.865360758262)*x_ref[1]**o+(0.780975027988)*x_ref[1]+(0.16115842919)*x_ref[2]**o+(0.247580155656)*x_ref[2]
-        ref[2,2,0,1]=(0.61102059426)*x_ref[0]**o+(-0.198005744101)*x_ref[0]+(0.503568797262)*x_ref[1]**o+(0.0288809726497)*x_ref[1]+(-0.765127098183)*x_ref[2]**o+(0.409803857723)*x_ref[2]
-        ref[2,2,1,0]=(-0.712272018295)*x_ref[0]**o+(-0.62562142063)*x_ref[0]+(-0.579501949719)*x_ref[1]**o+(0.628539275236)*x_ref[1]+(0.0200945124964)*x_ref[2]**o+(0.175966024769)*x_ref[2]
-        ref[2,2,1,1]=(-0.798244445519)*x_ref[0]**o+(-0.376440962535)*x_ref[0]+(-0.134467401497)*x_ref[1]**o+(0.877538294477)*x_ref[1]+(-0.484870741192)*x_ref[2]**o+(-0.224064469935)*x_ref[2]
-        ref[2,2,2,0]=(0.200196926368)*x_ref[0]**o+(-0.528000867086)*x_ref[0]+(-0.708942342624)*x_ref[1]**o+(-0.591994969141)*x_ref[1]+(-0.990641592656)*x_ref[2]**o+(-0.875897347303)*x_ref[2]
-        ref[2,2,2,1]=(0.949113190797)*x_ref[0]**o+(0.867855496786)*x_ref[0]+(-0.0314953438065)*x_ref[1]**o+(-0.371928428005)*x_ref[1]+(-0.526403191063)*x_ref[2]**o+(0.653049122326)*x_ref[2]
-        ref[2,3,0,0]=(-0.353418327127)*x_ref[0]**o+(-0.418588306429)*x_ref[0]+(0.400872043269)*x_ref[1]**o+(0.141907924042)*x_ref[1]+(-0.999869579462)*x_ref[2]**o+(-0.410423954563)*x_ref[2]
-        ref[2,3,0,1]=(-0.240390877307)*x_ref[0]**o+(0.0901879916115)*x_ref[0]+(-0.0734683209657)*x_ref[1]**o+(0.274836005886)*x_ref[1]+(-0.336375498181)*x_ref[2]**o+(-0.754776455221)*x_ref[2]
-        ref[2,3,1,0]=(0.259928460822)*x_ref[0]**o+(-0.227630454708)*x_ref[0]+(0.725968066278)*x_ref[1]**o+(-0.545440695763)*x_ref[1]+(-0.0354926607815)*x_ref[2]**o+(0.365010532181)*x_ref[2]
-        ref[2,3,1,1]=(-0.969799373398)*x_ref[0]**o+(0.514498233214)*x_ref[0]+(0.907450925318)*x_ref[1]**o+(-0.234993706406)*x_ref[1]+(0.206323910806)*x_ref[2]**o+(0.209364250369)*x_ref[2]
-        ref[2,3,2,0]=(0.712905565941)*x_ref[0]**o+(-0.353322758263)*x_ref[0]+(0.816861181494)*x_ref[1]**o+(-0.362388243619)*x_ref[1]+(0.302543517607)*x_ref[2]**o+(-0.831280418852)*x_ref[2]
-        ref[2,3,2,1]=(-0.386373711182)*x_ref[0]**o+(0.946914567792)*x_ref[0]+(-0.52795085887)*x_ref[1]**o+(0.86635245964)*x_ref[1]+(0.654261054178)*x_ref[2]**o+(0.452334882498)*x_ref[2]
-        ref[2,4,0,0]=(0.374747033547)*x_ref[0]**o+(-0.3471578669)*x_ref[0]+(0.322217002639)*x_ref[1]**o+(0.92988068982)*x_ref[1]+(-0.642423472369)*x_ref[2]**o+(-0.759623225653)*x_ref[2]
-        ref[2,4,0,1]=(-0.322255157841)*x_ref[0]**o+(-0.253806844569)*x_ref[0]+(-0.0688746199637)*x_ref[1]**o+(0.232840317719)*x_ref[1]+(-0.815623721026)*x_ref[2]**o+(0.43055485562)*x_ref[2]
-        ref[2,4,1,0]=(-0.452320341493)*x_ref[0]**o+(0.755240168228)*x_ref[0]+(-0.892552611066)*x_ref[1]**o+(0.438275161458)*x_ref[1]+(0.441378369388)*x_ref[2]**o+(-0.870501114753)*x_ref[2]
-        ref[2,4,1,1]=(0.496731258286)*x_ref[0]**o+(-0.499918335322)*x_ref[0]+(0.000476061942027)*x_ref[1]**o+(-0.857762621856)*x_ref[1]+(0.957433798133)*x_ref[2]**o+(-0.766450629361)*x_ref[2]
-        ref[2,4,2,0]=(0.860379598562)*x_ref[0]**o+(-0.0816478389485)*x_ref[0]+(-0.438181864676)*x_ref[1]**o+(0.78937427676)*x_ref[1]+(-0.97940010041)*x_ref[2]**o+(0.583914605259)*x_ref[2]
-        ref[2,4,2,1]=(0.23729037277)*x_ref[0]**o+(-0.365380141474)*x_ref[0]+(-0.471505632575)*x_ref[1]**o+(-0.168838288)*x_ref[1]+(-0.519847065791)*x_ref[2]**o+(-0.816100518668)*x_ref[2]
-        ref[3,0,0,0]=(0.729921808661)*x_ref[0]**o+(0.732868255388)*x_ref[0]+(0.305434623795)*x_ref[1]**o+(-0.45402804883)*x_ref[1]+(0.604368334171)*x_ref[2]**o+(-0.179233711008)*x_ref[2]
-        ref[3,0,0,1]=(-0.208916687176)*x_ref[0]**o+(-0.297916049539)*x_ref[0]+(0.854941564423)*x_ref[1]**o+(0.775355543915)*x_ref[1]+(-0.373382357688)*x_ref[2]**o+(0.792557314074)*x_ref[2]
-        ref[3,0,1,0]=(0.606041025674)*x_ref[0]**o+(0.115814644681)*x_ref[0]+(-0.414470914985)*x_ref[1]**o+(-0.136577390174)*x_ref[1]+(0.672303216396)*x_ref[2]**o+(-0.479680752765)*x_ref[2]
-        ref[3,0,1,1]=(-0.535633649471)*x_ref[0]**o+(0.133761944775)*x_ref[0]+(-0.980107507665)*x_ref[1]**o+(0.211561747114)*x_ref[1]+(-0.530648770004)*x_ref[2]**o+(0.417977629512)*x_ref[2]
-        ref[3,0,2,0]=(-0.242797826282)*x_ref[0]**o+(-0.828691638823)*x_ref[0]+(-0.187401612749)*x_ref[1]**o+(-0.453821620107)*x_ref[1]+(-0.475718408605)*x_ref[2]**o+(0.683502702497)*x_ref[2]
-        ref[3,0,2,1]=(-0.66640812951)*x_ref[0]**o+(-0.259184719546)*x_ref[0]+(0.463743732654)*x_ref[1]**o+(0.6746349156)*x_ref[1]+(-0.0532918236783)*x_ref[2]**o+(-0.714197225876)*x_ref[2]
-        ref[3,1,0,0]=(-0.97693616823)*x_ref[0]**o+(-0.825560555757)*x_ref[0]+(0.118452690664)*x_ref[1]**o+(-0.125279874388)*x_ref[1]+(0.733803136335)*x_ref[2]**o+(-0.884902209956)*x_ref[2]
-        ref[3,1,0,1]=(-0.652466190334)*x_ref[0]**o+(0.370106640243)*x_ref[0]+(0.0850861818306)*x_ref[1]**o+(-0.49744492012)*x_ref[1]+(-0.843498619618)*x_ref[2]**o+(-0.0480070808698)*x_ref[2]
-        ref[3,1,1,0]=(-0.450526704276)*x_ref[0]**o+(0.430774951776)*x_ref[0]+(-0.956799540696)*x_ref[1]**o+(0.820090546747)*x_ref[1]+(0.831582198997)*x_ref[2]**o+(0.491042906394)*x_ref[2]
-        ref[3,1,1,1]=(0.419717807665)*x_ref[0]**o+(0.320904534666)*x_ref[0]+(-0.483247938999)*x_ref[1]**o+(0.82174341564)*x_ref[1]+(-0.441719998974)*x_ref[2]**o+(0.691713322239)*x_ref[2]
-        ref[3,1,2,0]=(0.255464093123)*x_ref[0]**o+(-0.256334953799)*x_ref[0]+(0.677105284128)*x_ref[1]**o+(-0.584438025212)*x_ref[1]+(0.505820591597)*x_ref[2]**o+(0.247943562937)*x_ref[2]
-        ref[3,1,2,1]=(-0.495204107745)*x_ref[0]**o+(0.234426349601)*x_ref[0]+(0.736969108189)*x_ref[1]**o+(-0.369684409765)*x_ref[1]+(0.164303379282)*x_ref[2]**o+(-0.595757590519)*x_ref[2]
-        ref[3,2,0,0]=(0.238639684591)*x_ref[0]**o+(0.568638143194)*x_ref[0]+(0.972646679042)*x_ref[1]**o+(-0.652648194795)*x_ref[1]+(-0.0530713046414)*x_ref[2]**o+(0.356043665396)*x_ref[2]
-        ref[3,2,0,1]=(0.458539145106)*x_ref[0]**o+(0.111417037398)*x_ref[0]+(-0.135374868193)*x_ref[1]**o+(-0.535451685997)*x_ref[1]+(-0.820797762877)*x_ref[2]**o+(0.122239787933)*x_ref[2]
-        ref[3,2,1,0]=(-0.323251425039)*x_ref[0]**o+(0.106998797206)*x_ref[0]+(-0.0671655760766)*x_ref[1]**o+(0.836342794315)*x_ref[1]+(0.34628715493)*x_ref[2]**o+(-0.11058327806)*x_ref[2]
-        ref[3,2,1,1]=(0.181994203911)*x_ref[0]**o+(-0.710678453639)*x_ref[0]+(0.625606409786)*x_ref[1]**o+(-0.363170328543)*x_ref[1]+(-0.932998745422)*x_ref[2]**o+(-0.0411581284314)*x_ref[2]
-        ref[3,2,2,0]=(0.710847104903)*x_ref[0]**o+(0.483971915285)*x_ref[0]+(0.42996482533)*x_ref[1]**o+(0.456817348253)*x_ref[1]+(0.844562058604)*x_ref[2]**o+(-0.469586014721)*x_ref[2]
-        ref[3,2,2,1]=(-0.845771280837)*x_ref[0]**o+(-0.081384696494)*x_ref[0]+(0.71823377714)*x_ref[1]**o+(-0.846672143168)*x_ref[1]+(-0.139540918461)*x_ref[2]**o+(0.837646131987)*x_ref[2]
-        ref[3,3,0,0]=(-0.958726792109)*x_ref[0]**o+(0.53196455268)*x_ref[0]+(-0.621810423658)*x_ref[1]**o+(-0.0352106197658)*x_ref[1]+(-0.636059207474)*x_ref[2]**o+(-0.0491118207063)*x_ref[2]
-        ref[3,3,0,1]=(0.987836799279)*x_ref[0]**o+(0.41633576224)*x_ref[0]+(0.312021799176)*x_ref[1]**o+(-0.168836582938)*x_ref[1]+(-0.391725003735)*x_ref[2]**o+(-0.158000182269)*x_ref[2]
-        ref[3,3,1,0]=(-0.280868116529)*x_ref[0]**o+(-0.687924000092)*x_ref[0]+(0.865840229722)*x_ref[1]**o+(-0.0823203022874)*x_ref[1]+(-0.857309899784)*x_ref[2]**o+(-0.0657473493059)*x_ref[2]
-        ref[3,3,1,1]=(0.680496030567)*x_ref[0]**o+(0.159575720724)*x_ref[0]+(0.0531895122046)*x_ref[1]**o+(0.359273896084)*x_ref[1]+(0.35084774502)*x_ref[2]**o+(0.0982220259531)*x_ref[2]
-        ref[3,3,2,0]=(0.140872311111)*x_ref[0]**o+(-0.00845309046907)*x_ref[0]+(-0.845527142503)*x_ref[1]**o+(-0.67713103521)*x_ref[1]+(0.972054187828)*x_ref[2]**o+(-0.800664963509)*x_ref[2]
-        ref[3,3,2,1]=(-0.490866666782)*x_ref[0]**o+(-0.0988939523952)*x_ref[0]+(0.236210969508)*x_ref[1]**o+(-0.672617589992)*x_ref[1]+(-0.640558724403)*x_ref[2]**o+(-0.203125267713)*x_ref[2]
-        ref[3,4,0,0]=(0.318438839683)*x_ref[0]**o+(0.0864322377812)*x_ref[0]+(-0.371419701638)*x_ref[1]**o+(-0.311583139142)*x_ref[1]+(-0.0533111244011)*x_ref[2]**o+(0.841240973423)*x_ref[2]
-        ref[3,4,0,1]=(-0.573110771334)*x_ref[0]**o+(0.703852077914)*x_ref[0]+(0.613309217217)*x_ref[1]**o+(0.247223193846)*x_ref[1]+(0.618952485205)*x_ref[2]**o+(-0.395998308184)*x_ref[2]
-        ref[3,4,1,0]=(0.512896938934)*x_ref[0]**o+(0.848653171505)*x_ref[0]+(-0.944903687062)*x_ref[1]**o+(0.179782177607)*x_ref[1]+(-0.0287288996538)*x_ref[2]**o+(-0.385519118293)*x_ref[2]
-        ref[3,4,1,1]=(0.234190647718)*x_ref[0]**o+(0.445478221419)*x_ref[0]+(0.588931676434)*x_ref[1]**o+(0.140788139998)*x_ref[1]+(-0.761952359657)*x_ref[2]**o+(0.92377426359)*x_ref[2]
-        ref[3,4,2,0]=(-0.836038966171)*x_ref[0]**o+(-0.772990045933)*x_ref[0]+(0.0622128209877)*x_ref[1]**o+(-0.73733496141)*x_ref[1]+(0.0234446925161)*x_ref[2]**o+(-0.682234213315)*x_ref[2]
-        ref[3,4,2,1]=(0.250498084214)*x_ref[0]**o+(0.539088356159)*x_ref[0]+(-0.691842680176)*x_ref[1]**o+(0.710040802953)*x_ref[1]+(-0.43691551501)*x_ref[2]**o+(0.710668600989)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.742484780403)*x[0]+(0.680847966059)*x[1]
-        ref=(0.742484780403)*x_ref[0]+(0.680847966059)*x_ref[1]
-      else:
-        arg=(-0.928733928018)*x[0]+(-0.0797736636663)*x[1]+(0.517280695569)*x[2]
-        ref=(-0.928733928018)*x_ref[0]+(-0.0797736636663)*x_ref[1]+(0.517280695569)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        arg[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-        ref[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        ref[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-      else:
-        arg[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        arg[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-        ref[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        ref[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0998962983997)*x[0]+(0.52180906409)*x[1]
-        arg[0,1]=(-0.0315655223925)*x[0]+(-0.0162720186305)*x[1]
-        arg[0,2]=(0.361840834336)*x[0]+(-1.08346005817)*x[1]
-        arg[0,3]=(0.673393991338)*x[0]+(0.571192080367)*x[1]
-        arg[0,4]=(-0.725648335559)*x[0]+(0.866678056281)*x[1]
-        arg[1,0]=(0.7094760871)*x[0]+(0.666899441355)*x[1]
-        arg[1,1]=(-0.0152490017553)*x[0]+(-1.1169188656)*x[1]
-        arg[1,2]=(-1.01408330279)*x[0]+(-1.10348930367)*x[1]
-        arg[1,3]=(0.690904468829)*x[0]+(1.12602486331)*x[1]
-        arg[1,4]=(-0.0391507405365)*x[0]+(-0.338120635003)*x[1]
-        arg[2,0]=(0.175234757619)*x[0]+(1.74258329734)*x[1]
-        arg[2,1]=(0.281950269687)*x[0]+(0.0489231995634)*x[1]
-        arg[2,2]=(1.24244714043)*x[0]+(0.0149577033777)*x[1]
-        arg[2,3]=(-0.706844294482)*x[0]+(-1.85050242116)*x[1]
-        arg[2,4]=(-0.494011860105)*x[0]+(0.0809275159202)*x[1]
-        arg[3,0]=(-0.380877016583)*x[0]+(0.0345520619524)*x[1]
-        arg[3,1]=(1.10464018251)*x[0]+(0.0246274384536)*x[1]
-        arg[3,2]=(-0.00138129982685)*x[0]+(0.776306480938)*x[1]
-        arg[3,3]=(-0.0830044393648)*x[0]+(-0.173691604089)*x[1]
-        arg[3,4]=(0.0909675137463)*x[0]+(0.208083539568)*x[1]
-        ref[0,0]=(0.0998962983997)*x_ref[0]+(0.52180906409)*x_ref[1]
-        ref[0,1]=(-0.0315655223925)*x_ref[0]+(-0.0162720186305)*x_ref[1]
-        ref[0,2]=(0.361840834336)*x_ref[0]+(-1.08346005817)*x_ref[1]
-        ref[0,3]=(0.673393991338)*x_ref[0]+(0.571192080367)*x_ref[1]
-        ref[0,4]=(-0.725648335559)*x_ref[0]+(0.866678056281)*x_ref[1]
-        ref[1,0]=(0.7094760871)*x_ref[0]+(0.666899441355)*x_ref[1]
-        ref[1,1]=(-0.0152490017553)*x_ref[0]+(-1.1169188656)*x_ref[1]
-        ref[1,2]=(-1.01408330279)*x_ref[0]+(-1.10348930367)*x_ref[1]
-        ref[1,3]=(0.690904468829)*x_ref[0]+(1.12602486331)*x_ref[1]
-        ref[1,4]=(-0.0391507405365)*x_ref[0]+(-0.338120635003)*x_ref[1]
-        ref[2,0]=(0.175234757619)*x_ref[0]+(1.74258329734)*x_ref[1]
-        ref[2,1]=(0.281950269687)*x_ref[0]+(0.0489231995634)*x_ref[1]
-        ref[2,2]=(1.24244714043)*x_ref[0]+(0.0149577033777)*x_ref[1]
-        ref[2,3]=(-0.706844294482)*x_ref[0]+(-1.85050242116)*x_ref[1]
-        ref[2,4]=(-0.494011860105)*x_ref[0]+(0.0809275159202)*x_ref[1]
-        ref[3,0]=(-0.380877016583)*x_ref[0]+(0.0345520619524)*x_ref[1]
-        ref[3,1]=(1.10464018251)*x_ref[0]+(0.0246274384536)*x_ref[1]
-        ref[3,2]=(-0.00138129982685)*x_ref[0]+(0.776306480938)*x_ref[1]
-        ref[3,3]=(-0.0830044393648)*x_ref[0]+(-0.173691604089)*x_ref[1]
-        ref[3,4]=(0.0909675137463)*x_ref[0]+(0.208083539568)*x_ref[1]
-      else:
-        arg[0,0]=(0.0539484604772)*x[0]+(-0.220817236218)*x[1]+(-0.853759265774)*x[2]
-        arg[0,1]=(0.336027623724)*x[0]+(-0.111775563754)*x[1]+(0.646672879096)*x[2]
-        arg[0,2]=(0.650722528854)*x[0]+(0.0924672090652)*x[1]+(-0.881798566157)*x[2]
-        arg[0,3]=(0.276745374112)*x[0]+(-1.34491685419)*x[1]+(-0.833420124328)*x[2]
-        arg[0,4]=(1.50686931219)*x[0]+(0.489530477585)*x[1]+(1.74836249628)*x[2]
-        arg[1,0]=(-0.240001512118)*x[0]+(0.350823736593)*x[1]+(-0.227106949276)*x[2]
-        arg[1,1]=(0.354636302436)*x[0]+(-0.0893490250257)*x[1]+(-0.0650366762176)*x[2]
-        arg[1,2]=(-0.319714829694)*x[0]+(0.43056121683)*x[1]+(0.109856817034)*x[2]
-        arg[1,3]=(-1.17581255544)*x[0]+(-0.491431894533)*x[1]+(0.220857799733)*x[2]
-        arg[1,4]=(1.5680027633)*x[0]+(-0.249723385268)*x[1]+(-1.72056978299)*x[2]
-        arg[2,0]=(0.197753675106)*x[0]+(0.314723848519)*x[1]+(0.718038926838)*x[2]
-        arg[2,1]=(0.13916867566)*x[0]+(-0.0345156812431)*x[1]+(0.34208613933)*x[2]
-        arg[2,2]=(-0.275775747114)*x[0]+(0.299200648073)*x[1]+(0.37950303615)*x[2]
-        arg[2,3]=(0.685209641306)*x[0]+(-0.347743700679)*x[1]+(0.356023331014)*x[2]
-        arg[2,4]=(-0.232082602587)*x[0]+(-0.942200667607)*x[1]+(0.961251099323)*x[2]
-        arg[3,0]=(0.59399111477)*x[0]+(1.06884076218)*x[1]+(-0.194044225109)*x[2]
-        arg[3,1]=(0.522006012644)*x[0]+(0.0804272287843)*x[1]+(0.263440832249)*x[2]
-        arg[3,2]=(1.25330346872)*x[0]+(-0.757485536992)*x[1]+(0.398906137626)*x[2]
-        arg[3,3]=(0.395712858673)*x[0]+(0.423226476819)*x[1]+(0.186209217392)*x[2]
-        arg[3,4]=(0.153657073245)*x[0]+(0.536681875397)*x[1]+(0.773972080743)*x[2]
-        ref[0,0]=(0.0539484604772)*x_ref[0]+(-0.220817236218)*x_ref[1]+(-0.853759265774)*x_ref[2]
-        ref[0,1]=(0.336027623724)*x_ref[0]+(-0.111775563754)*x_ref[1]+(0.646672879096)*x_ref[2]
-        ref[0,2]=(0.650722528854)*x_ref[0]+(0.0924672090652)*x_ref[1]+(-0.881798566157)*x_ref[2]
-        ref[0,3]=(0.276745374112)*x_ref[0]+(-1.34491685419)*x_ref[1]+(-0.833420124328)*x_ref[2]
-        ref[0,4]=(1.50686931219)*x_ref[0]+(0.489530477585)*x_ref[1]+(1.74836249628)*x_ref[2]
-        ref[1,0]=(-0.240001512118)*x_ref[0]+(0.350823736593)*x_ref[1]+(-0.227106949276)*x_ref[2]
-        ref[1,1]=(0.354636302436)*x_ref[0]+(-0.0893490250257)*x_ref[1]+(-0.0650366762176)*x_ref[2]
-        ref[1,2]=(-0.319714829694)*x_ref[0]+(0.43056121683)*x_ref[1]+(0.109856817034)*x_ref[2]
-        ref[1,3]=(-1.17581255544)*x_ref[0]+(-0.491431894533)*x_ref[1]+(0.220857799733)*x_ref[2]
-        ref[1,4]=(1.5680027633)*x_ref[0]+(-0.249723385268)*x_ref[1]+(-1.72056978299)*x_ref[2]
-        ref[2,0]=(0.197753675106)*x_ref[0]+(0.314723848519)*x_ref[1]+(0.718038926838)*x_ref[2]
-        ref[2,1]=(0.13916867566)*x_ref[0]+(-0.0345156812431)*x_ref[1]+(0.34208613933)*x_ref[2]
-        ref[2,2]=(-0.275775747114)*x_ref[0]+(0.299200648073)*x_ref[1]+(0.37950303615)*x_ref[2]
-        ref[2,3]=(0.685209641306)*x_ref[0]+(-0.347743700679)*x_ref[1]+(0.356023331014)*x_ref[2]
-        ref[2,4]=(-0.232082602587)*x_ref[0]+(-0.942200667607)*x_ref[1]+(0.961251099323)*x_ref[2]
-        ref[3,0]=(0.59399111477)*x_ref[0]+(1.06884076218)*x_ref[1]+(-0.194044225109)*x_ref[2]
-        ref[3,1]=(0.522006012644)*x_ref[0]+(0.0804272287843)*x_ref[1]+(0.263440832249)*x_ref[2]
-        ref[3,2]=(1.25330346872)*x_ref[0]+(-0.757485536992)*x_ref[1]+(0.398906137626)*x_ref[2]
-        ref[3,3]=(0.395712858673)*x_ref[0]+(0.423226476819)*x_ref[1]+(0.186209217392)*x_ref[2]
-        ref[3,4]=(0.153657073245)*x_ref[0]+(0.536681875397)*x_ref[1]+(0.773972080743)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.223040346102)*x[0]+(-0.40941514813)*x[1]
-        arg[0,0,1]=(-0.580051757755)*x[0]+(0.0793034026033)*x[1]
-        arg[0,1,0]=(-0.0576028239384)*x[0]+(1.058218319)*x[1]
-        arg[0,1,1]=(0.0914458475861)*x[0]+(1.48556548656)*x[1]
-        arg[1,0,0]=(0.211508891263)*x[0]+(-1.44088884228)*x[1]
-        arg[1,0,1]=(-0.753661543994)*x[0]+(0.675867607628)*x[1]
-        arg[1,1,0]=(-0.289500075744)*x[0]+(0.573476965486)*x[1]
-        arg[1,1,1]=(0.182150073163)*x[0]+(0.937376164291)*x[1]
-        arg[2,0,0]=(1.18815471968)*x[0]+(-0.860110330094)*x[1]
-        arg[2,0,1]=(-0.238305806178)*x[0]+(-1.27916609495)*x[1]
-        arg[2,1,0]=(-0.955511742125)*x[0]+(-0.605135532767)*x[1]
-        arg[2,1,1]=(0.342919038059)*x[0]+(-0.0980330687702)*x[1]
-        arg[3,0,0]=(0.700429242018)*x[0]+(0.742017035289)*x[1]
-        arg[3,0,1]=(0.344011429773)*x[0]+(-1.64251335376)*x[1]
-        arg[3,1,0]=(-0.177856966174)*x[0]+(0.180846653076)*x[1]
-        arg[3,1,1]=(-1.59212766197)*x[0]+(0.523595606775)*x[1]
-        arg[4,0,0]=(-0.264023123775)*x[0]+(0.545951813489)*x[1]
-        arg[4,0,1]=(-1.31580310435)*x[0]+(-0.105998549363)*x[1]
-        arg[4,1,0]=(0.878775616997)*x[0]+(0.0436540350692)*x[1]
-        arg[4,1,1]=(-1.50886945727)*x[0]+(-0.156133758872)*x[1]
-        arg[5,0,0]=(-0.196603805975)*x[0]+(1.3924198011)*x[1]
-        arg[5,0,1]=(0.688423025668)*x[0]+(-1.1304740704)*x[1]
-        arg[5,1,0]=(1.05132745721)*x[0]+(-0.0190306576753)*x[1]
-        arg[5,1,1]=(-0.336157880135)*x[0]+(0.948775404759)*x[1]
-        ref[0,0,0]=(0.223040346102)*x_ref[0]+(-0.40941514813)*x_ref[1]
-        ref[0,0,1]=(-0.580051757755)*x_ref[0]+(0.0793034026033)*x_ref[1]
-        ref[0,1,0]=(-0.0576028239384)*x_ref[0]+(1.058218319)*x_ref[1]
-        ref[0,1,1]=(0.0914458475861)*x_ref[0]+(1.48556548656)*x_ref[1]
-        ref[1,0,0]=(0.211508891263)*x_ref[0]+(-1.44088884228)*x_ref[1]
-        ref[1,0,1]=(-0.753661543994)*x_ref[0]+(0.675867607628)*x_ref[1]
-        ref[1,1,0]=(-0.289500075744)*x_ref[0]+(0.573476965486)*x_ref[1]
-        ref[1,1,1]=(0.182150073163)*x_ref[0]+(0.937376164291)*x_ref[1]
-        ref[2,0,0]=(1.18815471968)*x_ref[0]+(-0.860110330094)*x_ref[1]
-        ref[2,0,1]=(-0.238305806178)*x_ref[0]+(-1.27916609495)*x_ref[1]
-        ref[2,1,0]=(-0.955511742125)*x_ref[0]+(-0.605135532767)*x_ref[1]
-        ref[2,1,1]=(0.342919038059)*x_ref[0]+(-0.0980330687702)*x_ref[1]
-        ref[3,0,0]=(0.700429242018)*x_ref[0]+(0.742017035289)*x_ref[1]
-        ref[3,0,1]=(0.344011429773)*x_ref[0]+(-1.64251335376)*x_ref[1]
-        ref[3,1,0]=(-0.177856966174)*x_ref[0]+(0.180846653076)*x_ref[1]
-        ref[3,1,1]=(-1.59212766197)*x_ref[0]+(0.523595606775)*x_ref[1]
-        ref[4,0,0]=(-0.264023123775)*x_ref[0]+(0.545951813489)*x_ref[1]
-        ref[4,0,1]=(-1.31580310435)*x_ref[0]+(-0.105998549363)*x_ref[1]
-        ref[4,1,0]=(0.878775616997)*x_ref[0]+(0.0436540350692)*x_ref[1]
-        ref[4,1,1]=(-1.50886945727)*x_ref[0]+(-0.156133758872)*x_ref[1]
-        ref[5,0,0]=(-0.196603805975)*x_ref[0]+(1.3924198011)*x_ref[1]
-        ref[5,0,1]=(0.688423025668)*x_ref[0]+(-1.1304740704)*x_ref[1]
-        ref[5,1,0]=(1.05132745721)*x_ref[0]+(-0.0190306576753)*x_ref[1]
-        ref[5,1,1]=(-0.336157880135)*x_ref[0]+(0.948775404759)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.884050876189)*x[0]+(-0.394515582819)*x[1]+(1.3097094442)*x[2]
-        arg[0,0,1]=(-0.816123587792)*x[0]+(0.355197775988)*x[1]+(0.276746708309)*x[2]
-        arg[0,1,0]=(-0.124049709168)*x[0]+(1.18541954468)*x[1]+(0.209504045468)*x[2]
-        arg[0,1,1]=(0.0683100149522)*x[0]+(0.362926075694)*x[1]+(-0.0669691928299)*x[2]
-        arg[1,0,0]=(-1.1421316954)*x[0]+(0.390740725692)*x[1]+(-0.726193980086)*x[2]
-        arg[1,0,1]=(-0.843848580922)*x[0]+(-0.525850215762)*x[1]+(-0.00216507276212)*x[2]
-        arg[1,1,0]=(1.48370169071)*x[0]+(1.0755925183)*x[1]+(0.581274760413)*x[2]
-        arg[1,1,1]=(-1.32186510041)*x[0]+(0.415895688227)*x[1]+(0.0211839725586)*x[2]
-        arg[2,0,0]=(0.064488762235)*x[0]+(1.49328658794)*x[1]+(1.58091496737)*x[2]
-        arg[2,0,1]=(0.0366527940907)*x[0]+(0.777734357144)*x[1]+(-1.42974160614)*x[2]
-        arg[2,1,0]=(1.55170579579)*x[0]+(-1.93288667897)*x[1]+(-0.293286140809)*x[2]
-        arg[2,1,1]=(1.20599946796)*x[0]+(0.0227207800543)*x[1]+(0.754694156356)*x[2]
-        arg[3,0,0]=(-0.096426023819)*x[0]+(0.254350817295)*x[1]+(-0.845563802639)*x[2]
-        arg[3,0,1]=(0.259201676184)*x[0]+(-0.10777841018)*x[1]+(0.198814801338)*x[2]
-        arg[3,1,0]=(-0.375693547297)*x[0]+(-0.566070306507)*x[1]+(0.842662788128)*x[2]
-        arg[3,1,1]=(-0.254690046974)*x[0]+(1.68423179439)*x[1]+(-0.514749238215)*x[2]
-        arg[4,0,0]=(-0.283580142327)*x[0]+(-0.906119047897)*x[1]+(1.16264752395)*x[2]
-        arg[4,0,1]=(0.559319137591)*x[0]+(-0.135216628913)*x[1]+(0.0241520443893)*x[2]
-        arg[4,1,0]=(1.51344686911)*x[0]+(0.595733533885)*x[1]+(-0.49014841511)*x[2]
-        arg[4,1,1]=(0.261868556117)*x[0]+(-0.51266470705)*x[1]+(0.617731786544)*x[2]
-        arg[5,0,0]=(-0.947197547436)*x[0]+(1.18970238499)*x[1]+(-0.0491748623501)*x[2]
-        arg[5,0,1]=(0.0541604147191)*x[0]+(-0.844601205099)*x[1]+(1.67419390002)*x[2]
-        arg[5,1,0]=(0.370982789151)*x[0]+(-0.344762868862)*x[1]+(-0.48077628478)*x[2]
-        arg[5,1,1]=(-0.0845487748754)*x[0]+(1.43148171186)*x[1]+(-0.519880423555)*x[2]
-        ref[0,0,0]=(-0.884050876189)*x_ref[0]+(-0.394515582819)*x_ref[1]+(1.3097094442)*x_ref[2]
-        ref[0,0,1]=(-0.816123587792)*x_ref[0]+(0.355197775988)*x_ref[1]+(0.276746708309)*x_ref[2]
-        ref[0,1,0]=(-0.124049709168)*x_ref[0]+(1.18541954468)*x_ref[1]+(0.209504045468)*x_ref[2]
-        ref[0,1,1]=(0.0683100149522)*x_ref[0]+(0.362926075694)*x_ref[1]+(-0.0669691928299)*x_ref[2]
-        ref[1,0,0]=(-1.1421316954)*x_ref[0]+(0.390740725692)*x_ref[1]+(-0.726193980086)*x_ref[2]
-        ref[1,0,1]=(-0.843848580922)*x_ref[0]+(-0.525850215762)*x_ref[1]+(-0.00216507276212)*x_ref[2]
-        ref[1,1,0]=(1.48370169071)*x_ref[0]+(1.0755925183)*x_ref[1]+(0.581274760413)*x_ref[2]
-        ref[1,1,1]=(-1.32186510041)*x_ref[0]+(0.415895688227)*x_ref[1]+(0.0211839725586)*x_ref[2]
-        ref[2,0,0]=(0.064488762235)*x_ref[0]+(1.49328658794)*x_ref[1]+(1.58091496737)*x_ref[2]
-        ref[2,0,1]=(0.0366527940907)*x_ref[0]+(0.777734357144)*x_ref[1]+(-1.42974160614)*x_ref[2]
-        ref[2,1,0]=(1.55170579579)*x_ref[0]+(-1.93288667897)*x_ref[1]+(-0.293286140809)*x_ref[2]
-        ref[2,1,1]=(1.20599946796)*x_ref[0]+(0.0227207800543)*x_ref[1]+(0.754694156356)*x_ref[2]
-        ref[3,0,0]=(-0.096426023819)*x_ref[0]+(0.254350817295)*x_ref[1]+(-0.845563802639)*x_ref[2]
-        ref[3,0,1]=(0.259201676184)*x_ref[0]+(-0.10777841018)*x_ref[1]+(0.198814801338)*x_ref[2]
-        ref[3,1,0]=(-0.375693547297)*x_ref[0]+(-0.566070306507)*x_ref[1]+(0.842662788128)*x_ref[2]
-        ref[3,1,1]=(-0.254690046974)*x_ref[0]+(1.68423179439)*x_ref[1]+(-0.514749238215)*x_ref[2]
-        ref[4,0,0]=(-0.283580142327)*x_ref[0]+(-0.906119047897)*x_ref[1]+(1.16264752395)*x_ref[2]
-        ref[4,0,1]=(0.559319137591)*x_ref[0]+(-0.135216628913)*x_ref[1]+(0.0241520443893)*x_ref[2]
-        ref[4,1,0]=(1.51344686911)*x_ref[0]+(0.595733533885)*x_ref[1]+(-0.49014841511)*x_ref[2]
-        ref[4,1,1]=(0.261868556117)*x_ref[0]+(-0.51266470705)*x_ref[1]+(0.617731786544)*x_ref[2]
-        ref[5,0,0]=(-0.947197547436)*x_ref[0]+(1.18970238499)*x_ref[1]+(-0.0491748623501)*x_ref[2]
-        ref[5,0,1]=(0.0541604147191)*x_ref[0]+(-0.844601205099)*x_ref[1]+(1.67419390002)*x_ref[2]
-        ref[5,1,0]=(0.370982789151)*x_ref[0]+(-0.344762868862)*x_ref[1]+(-0.48077628478)*x_ref[2]
-        ref[5,1,1]=(-0.0845487748754)*x_ref[0]+(1.43148171186)*x_ref[1]+(-0.519880423555)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.748732264044)*x[0]+(0.326649183672)*x[1]
-        arg[0,0,0,1]=(-0.118874184707)*x[0]+(0.512027378857)*x[1]
-        arg[0,0,1,0]=(0.0907534655112)*x[0]+(0.145249508199)*x[1]
-        arg[0,0,1,1]=(0.879689742122)*x[0]+(-0.238488796672)*x[1]
-        arg[0,0,2,0]=(-0.285226080478)*x[0]+(-0.560477167124)*x[1]
-        arg[0,0,2,1]=(1.3620160918)*x[0]+(-0.97877396699)*x[1]
-        arg[0,1,0,0]=(-1.52439734042)*x[0]+(0.981913225695)*x[1]
-        arg[0,1,0,1]=(-1.19963597544)*x[0]+(1.1571861154)*x[1]
-        arg[0,1,1,0]=(0.822934040682)*x[0]+(-1.75039812758)*x[1]
-        arg[0,1,1,1]=(-0.690374545295)*x[0]+(1.10465673793)*x[1]
-        arg[0,1,2,0]=(-0.222743457309)*x[0]+(-0.499809039611)*x[1]
-        arg[0,1,2,1]=(0.774614333867)*x[0]+(-0.140097281276)*x[1]
-        arg[0,2,0,0]=(0.92399157301)*x[0]+(-1.53184881088)*x[1]
-        arg[0,2,0,1]=(0.14612723475)*x[0]+(0.892066346169)*x[1]
-        arg[0,2,1,0]=(-0.136826339137)*x[0]+(0.0588253058296)*x[1]
-        arg[0,2,1,1]=(-0.73687808603)*x[0]+(0.763659413232)*x[1]
-        arg[0,2,2,0]=(0.669031805455)*x[0]+(0.452748434512)*x[1]
-        arg[0,2,2,1]=(0.969822865927)*x[0]+(0.84449053089)*x[1]
-        arg[0,3,0,0]=(1.05482233425)*x[0]+(0.592437824455)*x[1]
-        arg[0,3,0,1]=(0.632482870556)*x[0]+(0.272691402585)*x[1]
-        arg[0,3,1,0]=(-0.530755710624)*x[0]+(0.798233454742)*x[1]
-        arg[0,3,1,1]=(-0.326644901487)*x[0]+(0.912945575753)*x[1]
-        arg[0,3,2,0]=(0.313672017285)*x[0]+(0.948624232644)*x[1]
-        arg[0,3,2,1]=(-0.985713086674)*x[0]+(0.557682757171)*x[1]
-        arg[0,4,0,0]=(-1.05604811856)*x[0]+(0.953109137724)*x[1]
-        arg[0,4,0,1]=(0.443301072651)*x[0]+(0.063796068208)*x[1]
-        arg[0,4,1,0]=(-0.0166520333953)*x[0]+(0.808947969176)*x[1]
-        arg[0,4,1,1]=(0.447406784488)*x[0]+(0.511727243983)*x[1]
-        arg[0,4,2,0]=(0.966474340588)*x[0]+(0.789208895767)*x[1]
-        arg[0,4,2,1]=(0.5007322363)*x[0]+(0.1211006989)*x[1]
-        arg[1,0,0,0]=(0.328606613916)*x[0]+(-0.874029860851)*x[1]
-        arg[1,0,0,1]=(-0.906174034813)*x[0]+(-0.705820652424)*x[1]
-        arg[1,0,1,0]=(-0.543917624184)*x[0]+(-0.963384956871)*x[1]
-        arg[1,0,1,1]=(-0.516192972362)*x[0]+(0.644782734001)*x[1]
-        arg[1,0,2,0]=(-1.39622140542)*x[0]+(0.292606264905)*x[1]
-        arg[1,0,2,1]=(1.39306984816)*x[0]+(-0.544853887253)*x[1]
-        arg[1,1,0,0]=(-0.0499160669149)*x[0]+(-0.783142164006)*x[1]
-        arg[1,1,0,1]=(0.968157339631)*x[0]+(-1.68767943891)*x[1]
-        arg[1,1,1,0]=(-1.56616531333)*x[0]+(1.057002431)*x[1]
-        arg[1,1,1,1]=(0.759774810848)*x[0]+(-0.217500595483)*x[1]
-        arg[1,1,2,0]=(-0.558666811623)*x[0]+(-0.56110405702)*x[1]
-        arg[1,1,2,1]=(-1.51823291284)*x[0]+(0.968598028275)*x[1]
-        arg[1,2,0,0]=(0.459934430553)*x[0]+(-0.425611928234)*x[1]
-        arg[1,2,0,1]=(0.497077152958)*x[0]+(-0.217468584657)*x[1]
-        arg[1,2,1,0]=(-0.84050521972)*x[0]+(-0.639967173826)*x[1]
-        arg[1,2,1,1]=(1.23982979981)*x[0]+(-0.340962636339)*x[1]
-        arg[1,2,2,0]=(-0.0796290414672)*x[0]+(-0.418766465742)*x[1]
-        arg[1,2,2,1]=(-0.00357466869904)*x[0]+(0.38318423828)*x[1]
-        arg[1,3,0,0]=(-1.06978632139)*x[0]+(-0.293480140024)*x[1]
-        arg[1,3,0,1]=(0.315898405933)*x[0]+(-0.63338147672)*x[1]
-        arg[1,3,1,0]=(-0.570294815011)*x[0]+(0.0492498556666)*x[1]
-        arg[1,3,1,1]=(0.0535633163606)*x[0]+(1.03597167921)*x[1]
-        arg[1,3,2,0]=(0.740363487843)*x[0]+(-0.945398692608)*x[1]
-        arg[1,3,2,1]=(0.0118916598378)*x[0]+(1.13783979963)*x[1]
-        arg[1,4,0,0]=(-0.90818285841)*x[0]+(0.0630620135139)*x[1]
-        arg[1,4,0,1]=(1.28854967547)*x[0]+(0.564058166595)*x[1]
-        arg[1,4,1,0]=(0.0536837223463)*x[0]+(-0.754361313431)*x[1]
-        arg[1,4,1,1]=(-1.4274155179)*x[0]+(-0.0330452395142)*x[1]
-        arg[1,4,2,0]=(-0.0853100557203)*x[0]+(-0.0698244726734)*x[1]
-        arg[1,4,2,1]=(-0.969990013612)*x[0]+(-0.0928692035314)*x[1]
-        arg[2,0,0,0]=(1.402108752)*x[0]+(-0.0601730744903)*x[1]
-        arg[2,0,0,1]=(-0.544125618042)*x[0]+(1.02669845397)*x[1]
-        arg[2,0,1,0]=(-0.259299705101)*x[0]+(-0.449507095724)*x[1]
-        arg[2,0,1,1]=(0.572470083182)*x[0]+(-0.140083185208)*x[1]
-        arg[2,0,2,0]=(1.7708938802)*x[0]+(-0.0924975206473)*x[1]
-        arg[2,0,2,1]=(-0.262417029616)*x[0]+(-0.169562773872)*x[1]
-        arg[2,1,0,0]=(-1.30668657807)*x[0]+(-1.01393009909)*x[1]
-        arg[2,1,0,1]=(0.799588711881)*x[0]+(-1.17126698679)*x[1]
-        arg[2,1,1,0]=(-1.17423919188)*x[0]+(0.321090068168)*x[1]
-        arg[2,1,1,1]=(-0.778912666585)*x[0]+(0.00447436139975)*x[1]
-        arg[2,1,2,0]=(0.40622401744)*x[0]+(0.61089755242)*x[1]
-        arg[2,1,2,1]=(0.550326994175)*x[0]+(1.61303737224)*x[1]
-        arg[2,2,0,0]=(0.931647812671)*x[0]+(-0.93554163705)*x[1]
-        arg[2,2,0,1]=(0.281543117633)*x[0]+(-0.520873020458)*x[1]
-        arg[2,2,1,0]=(1.46731959732)*x[0]+(0.518798296946)*x[1]
-        arg[2,2,1,1]=(-1.18123650343)*x[0]+(-0.145310254643)*x[1]
-        arg[2,2,2,0]=(-0.560745819237)*x[0]+(-1.47844975303)*x[1]
-        arg[2,2,2,1]=(-1.11775616574)*x[0]+(-1.21514252434)*x[1]
-        arg[2,3,0,0]=(0.315369902788)*x[0]+(0.964595236889)*x[1]
-        arg[2,3,0,1]=(-0.907229008161)*x[0]+(1.20677953168)*x[1]
-        arg[2,3,1,0]=(0.0552545457484)*x[0]+(-0.202468129673)*x[1]
-        arg[2,3,1,1]=(-0.832968133648)*x[0]+(0.798887606761)*x[1]
-        arg[2,3,2,0]=(1.0330803155)*x[0]+(0.546834262777)*x[1]
-        arg[2,3,2,1]=(-1.78895672921)*x[0]+(-1.43034307109)*x[1]
-        arg[2,4,0,0]=(0.333456542345)*x[0]+(0.620879982969)*x[1]
-        arg[2,4,0,1]=(-0.141328336229)*x[0]+(-0.568586127044)*x[1]
-        arg[2,4,1,0]=(0.936638826549)*x[0]+(0.262046172423)*x[1]
-        arg[2,4,1,1]=(0.594781145732)*x[0]+(-0.795944581484)*x[1]
-        arg[2,4,2,0]=(-0.0594467711107)*x[0]+(1.65280673317)*x[1]
-        arg[2,4,2,1]=(-0.295492856013)*x[0]+(0.244222123606)*x[1]
-        arg[3,0,0,0]=(0.907207795877)*x[0]+(0.0238682693857)*x[1]
-        arg[3,0,0,1]=(0.767877824626)*x[0]+(0.781729746211)*x[1]
-        arg[3,0,1,0]=(-0.266760960719)*x[0]+(0.109690121766)*x[1]
-        arg[3,0,1,1]=(0.885111787835)*x[0]+(1.83341408518)*x[1]
-        arg[3,0,2,0]=(0.482836215622)*x[0]+(0.202385773036)*x[1]
-        arg[3,0,2,1]=(-0.722931824523)*x[0]+(0.469906208805)*x[1]
-        arg[3,1,0,0]=(0.34246223362)*x[0]+(0.652551099051)*x[1]
-        arg[3,1,0,1]=(-1.24987233614)*x[0]+(-0.208386614512)*x[1]
-        arg[3,1,1,0]=(-0.426021351048)*x[0]+(-0.481440089744)*x[1]
-        arg[3,1,1,1]=(0.402917477117)*x[0]+(0.280066256773)*x[1]
-        arg[3,1,2,0]=(0.846917449307)*x[0]+(-0.890613362071)*x[1]
-        arg[3,1,2,1]=(0.848971364583)*x[0]+(1.28188639634)*x[1]
-        arg[3,2,0,0]=(0.244851870449)*x[0]+(-1.29335472533)*x[1]
-        arg[3,2,0,1]=(-0.679420773687)*x[0]+(0.0533049166584)*x[1]
-        arg[3,2,1,0]=(0.209683196995)*x[0]+(-1.18725405512)*x[1]
-        arg[3,2,1,1]=(1.14374677567)*x[0]+(-0.0360927695675)*x[1]
-        arg[3,2,2,0]=(-0.675139110144)*x[0]+(0.203993983732)*x[1]
-        arg[3,2,2,1]=(-0.237314875828)*x[0]+(-0.581326039718)*x[1]
-        arg[3,3,0,0]=(-0.429825943466)*x[0]+(-0.256971982048)*x[1]
-        arg[3,3,0,1]=(0.520863156649)*x[0]+(-0.149770317657)*x[1]
-        arg[3,3,1,0]=(0.534493615852)*x[0]+(-0.486279758704)*x[1]
-        arg[3,3,1,1]=(1.40465616102)*x[0]+(-0.131521707731)*x[1]
-        arg[3,3,2,0]=(0.171604624229)*x[0]+(0.810160978932)*x[1]
-        arg[3,3,2,1]=(1.28980934106)*x[0]+(-1.0563749584)*x[1]
-        arg[3,4,0,0]=(-0.631680784482)*x[0]+(-1.10885428097)*x[1]
-        arg[3,4,0,1]=(-1.02297901709)*x[0]+(1.30007360034)*x[1]
-        arg[3,4,1,0]=(0.728467970192)*x[0]+(-0.872220126316)*x[1]
-        arg[3,4,1,1]=(1.18596842635)*x[0]+(-0.246158517864)*x[1]
-        arg[3,4,2,0]=(0.158818463065)*x[0]+(-0.687328798914)*x[1]
-        arg[3,4,2,1]=(-0.267029459109)*x[0]+(0.161790218602)*x[1]
-        ref[0,0,0,0]=(0.748732264044)*x_ref[0]+(0.326649183672)*x_ref[1]
-        ref[0,0,0,1]=(-0.118874184707)*x_ref[0]+(0.512027378857)*x_ref[1]
-        ref[0,0,1,0]=(0.0907534655112)*x_ref[0]+(0.145249508199)*x_ref[1]
-        ref[0,0,1,1]=(0.879689742122)*x_ref[0]+(-0.238488796672)*x_ref[1]
-        ref[0,0,2,0]=(-0.285226080478)*x_ref[0]+(-0.560477167124)*x_ref[1]
-        ref[0,0,2,1]=(1.3620160918)*x_ref[0]+(-0.97877396699)*x_ref[1]
-        ref[0,1,0,0]=(-1.52439734042)*x_ref[0]+(0.981913225695)*x_ref[1]
-        ref[0,1,0,1]=(-1.19963597544)*x_ref[0]+(1.1571861154)*x_ref[1]
-        ref[0,1,1,0]=(0.822934040682)*x_ref[0]+(-1.75039812758)*x_ref[1]
-        ref[0,1,1,1]=(-0.690374545295)*x_ref[0]+(1.10465673793)*x_ref[1]
-        ref[0,1,2,0]=(-0.222743457309)*x_ref[0]+(-0.499809039611)*x_ref[1]
-        ref[0,1,2,1]=(0.774614333867)*x_ref[0]+(-0.140097281276)*x_ref[1]
-        ref[0,2,0,0]=(0.92399157301)*x_ref[0]+(-1.53184881088)*x_ref[1]
-        ref[0,2,0,1]=(0.14612723475)*x_ref[0]+(0.892066346169)*x_ref[1]
-        ref[0,2,1,0]=(-0.136826339137)*x_ref[0]+(0.0588253058296)*x_ref[1]
-        ref[0,2,1,1]=(-0.73687808603)*x_ref[0]+(0.763659413232)*x_ref[1]
-        ref[0,2,2,0]=(0.669031805455)*x_ref[0]+(0.452748434512)*x_ref[1]
-        ref[0,2,2,1]=(0.969822865927)*x_ref[0]+(0.84449053089)*x_ref[1]
-        ref[0,3,0,0]=(1.05482233425)*x_ref[0]+(0.592437824455)*x_ref[1]
-        ref[0,3,0,1]=(0.632482870556)*x_ref[0]+(0.272691402585)*x_ref[1]
-        ref[0,3,1,0]=(-0.530755710624)*x_ref[0]+(0.798233454742)*x_ref[1]
-        ref[0,3,1,1]=(-0.326644901487)*x_ref[0]+(0.912945575753)*x_ref[1]
-        ref[0,3,2,0]=(0.313672017285)*x_ref[0]+(0.948624232644)*x_ref[1]
-        ref[0,3,2,1]=(-0.985713086674)*x_ref[0]+(0.557682757171)*x_ref[1]
-        ref[0,4,0,0]=(-1.05604811856)*x_ref[0]+(0.953109137724)*x_ref[1]
-        ref[0,4,0,1]=(0.443301072651)*x_ref[0]+(0.063796068208)*x_ref[1]
-        ref[0,4,1,0]=(-0.0166520333953)*x_ref[0]+(0.808947969176)*x_ref[1]
-        ref[0,4,1,1]=(0.447406784488)*x_ref[0]+(0.511727243983)*x_ref[1]
-        ref[0,4,2,0]=(0.966474340588)*x_ref[0]+(0.789208895767)*x_ref[1]
-        ref[0,4,2,1]=(0.5007322363)*x_ref[0]+(0.1211006989)*x_ref[1]
-        ref[1,0,0,0]=(0.328606613916)*x_ref[0]+(-0.874029860851)*x_ref[1]
-        ref[1,0,0,1]=(-0.906174034813)*x_ref[0]+(-0.705820652424)*x_ref[1]
-        ref[1,0,1,0]=(-0.543917624184)*x_ref[0]+(-0.963384956871)*x_ref[1]
-        ref[1,0,1,1]=(-0.516192972362)*x_ref[0]+(0.644782734001)*x_ref[1]
-        ref[1,0,2,0]=(-1.39622140542)*x_ref[0]+(0.292606264905)*x_ref[1]
-        ref[1,0,2,1]=(1.39306984816)*x_ref[0]+(-0.544853887253)*x_ref[1]
-        ref[1,1,0,0]=(-0.0499160669149)*x_ref[0]+(-0.783142164006)*x_ref[1]
-        ref[1,1,0,1]=(0.968157339631)*x_ref[0]+(-1.68767943891)*x_ref[1]
-        ref[1,1,1,0]=(-1.56616531333)*x_ref[0]+(1.057002431)*x_ref[1]
-        ref[1,1,1,1]=(0.759774810848)*x_ref[0]+(-0.217500595483)*x_ref[1]
-        ref[1,1,2,0]=(-0.558666811623)*x_ref[0]+(-0.56110405702)*x_ref[1]
-        ref[1,1,2,1]=(-1.51823291284)*x_ref[0]+(0.968598028275)*x_ref[1]
-        ref[1,2,0,0]=(0.459934430553)*x_ref[0]+(-0.425611928234)*x_ref[1]
-        ref[1,2,0,1]=(0.497077152958)*x_ref[0]+(-0.217468584657)*x_ref[1]
-        ref[1,2,1,0]=(-0.84050521972)*x_ref[0]+(-0.639967173826)*x_ref[1]
-        ref[1,2,1,1]=(1.23982979981)*x_ref[0]+(-0.340962636339)*x_ref[1]
-        ref[1,2,2,0]=(-0.0796290414672)*x_ref[0]+(-0.418766465742)*x_ref[1]
-        ref[1,2,2,1]=(-0.00357466869904)*x_ref[0]+(0.38318423828)*x_ref[1]
-        ref[1,3,0,0]=(-1.06978632139)*x_ref[0]+(-0.293480140024)*x_ref[1]
-        ref[1,3,0,1]=(0.315898405933)*x_ref[0]+(-0.63338147672)*x_ref[1]
-        ref[1,3,1,0]=(-0.570294815011)*x_ref[0]+(0.0492498556666)*x_ref[1]
-        ref[1,3,1,1]=(0.0535633163606)*x_ref[0]+(1.03597167921)*x_ref[1]
-        ref[1,3,2,0]=(0.740363487843)*x_ref[0]+(-0.945398692608)*x_ref[1]
-        ref[1,3,2,1]=(0.0118916598378)*x_ref[0]+(1.13783979963)*x_ref[1]
-        ref[1,4,0,0]=(-0.90818285841)*x_ref[0]+(0.0630620135139)*x_ref[1]
-        ref[1,4,0,1]=(1.28854967547)*x_ref[0]+(0.564058166595)*x_ref[1]
-        ref[1,4,1,0]=(0.0536837223463)*x_ref[0]+(-0.754361313431)*x_ref[1]
-        ref[1,4,1,1]=(-1.4274155179)*x_ref[0]+(-0.0330452395142)*x_ref[1]
-        ref[1,4,2,0]=(-0.0853100557203)*x_ref[0]+(-0.0698244726734)*x_ref[1]
-        ref[1,4,2,1]=(-0.969990013612)*x_ref[0]+(-0.0928692035314)*x_ref[1]
-        ref[2,0,0,0]=(1.402108752)*x_ref[0]+(-0.0601730744903)*x_ref[1]
-        ref[2,0,0,1]=(-0.544125618042)*x_ref[0]+(1.02669845397)*x_ref[1]
-        ref[2,0,1,0]=(-0.259299705101)*x_ref[0]+(-0.449507095724)*x_ref[1]
-        ref[2,0,1,1]=(0.572470083182)*x_ref[0]+(-0.140083185208)*x_ref[1]
-        ref[2,0,2,0]=(1.7708938802)*x_ref[0]+(-0.0924975206473)*x_ref[1]
-        ref[2,0,2,1]=(-0.262417029616)*x_ref[0]+(-0.169562773872)*x_ref[1]
-        ref[2,1,0,0]=(-1.30668657807)*x_ref[0]+(-1.01393009909)*x_ref[1]
-        ref[2,1,0,1]=(0.799588711881)*x_ref[0]+(-1.17126698679)*x_ref[1]
-        ref[2,1,1,0]=(-1.17423919188)*x_ref[0]+(0.321090068168)*x_ref[1]
-        ref[2,1,1,1]=(-0.778912666585)*x_ref[0]+(0.00447436139975)*x_ref[1]
-        ref[2,1,2,0]=(0.40622401744)*x_ref[0]+(0.61089755242)*x_ref[1]
-        ref[2,1,2,1]=(0.550326994175)*x_ref[0]+(1.61303737224)*x_ref[1]
-        ref[2,2,0,0]=(0.931647812671)*x_ref[0]+(-0.93554163705)*x_ref[1]
-        ref[2,2,0,1]=(0.281543117633)*x_ref[0]+(-0.520873020458)*x_ref[1]
-        ref[2,2,1,0]=(1.46731959732)*x_ref[0]+(0.518798296946)*x_ref[1]
-        ref[2,2,1,1]=(-1.18123650343)*x_ref[0]+(-0.145310254643)*x_ref[1]
-        ref[2,2,2,0]=(-0.560745819237)*x_ref[0]+(-1.47844975303)*x_ref[1]
-        ref[2,2,2,1]=(-1.11775616574)*x_ref[0]+(-1.21514252434)*x_ref[1]
-        ref[2,3,0,0]=(0.315369902788)*x_ref[0]+(0.964595236889)*x_ref[1]
-        ref[2,3,0,1]=(-0.907229008161)*x_ref[0]+(1.20677953168)*x_ref[1]
-        ref[2,3,1,0]=(0.0552545457484)*x_ref[0]+(-0.202468129673)*x_ref[1]
-        ref[2,3,1,1]=(-0.832968133648)*x_ref[0]+(0.798887606761)*x_ref[1]
-        ref[2,3,2,0]=(1.0330803155)*x_ref[0]+(0.546834262777)*x_ref[1]
-        ref[2,3,2,1]=(-1.78895672921)*x_ref[0]+(-1.43034307109)*x_ref[1]
-        ref[2,4,0,0]=(0.333456542345)*x_ref[0]+(0.620879982969)*x_ref[1]
-        ref[2,4,0,1]=(-0.141328336229)*x_ref[0]+(-0.568586127044)*x_ref[1]
-        ref[2,4,1,0]=(0.936638826549)*x_ref[0]+(0.262046172423)*x_ref[1]
-        ref[2,4,1,1]=(0.594781145732)*x_ref[0]+(-0.795944581484)*x_ref[1]
-        ref[2,4,2,0]=(-0.0594467711107)*x_ref[0]+(1.65280673317)*x_ref[1]
-        ref[2,4,2,1]=(-0.295492856013)*x_ref[0]+(0.244222123606)*x_ref[1]
-        ref[3,0,0,0]=(0.907207795877)*x_ref[0]+(0.0238682693857)*x_ref[1]
-        ref[3,0,0,1]=(0.767877824626)*x_ref[0]+(0.781729746211)*x_ref[1]
-        ref[3,0,1,0]=(-0.266760960719)*x_ref[0]+(0.109690121766)*x_ref[1]
-        ref[3,0,1,1]=(0.885111787835)*x_ref[0]+(1.83341408518)*x_ref[1]
-        ref[3,0,2,0]=(0.482836215622)*x_ref[0]+(0.202385773036)*x_ref[1]
-        ref[3,0,2,1]=(-0.722931824523)*x_ref[0]+(0.469906208805)*x_ref[1]
-        ref[3,1,0,0]=(0.34246223362)*x_ref[0]+(0.652551099051)*x_ref[1]
-        ref[3,1,0,1]=(-1.24987233614)*x_ref[0]+(-0.208386614512)*x_ref[1]
-        ref[3,1,1,0]=(-0.426021351048)*x_ref[0]+(-0.481440089744)*x_ref[1]
-        ref[3,1,1,1]=(0.402917477117)*x_ref[0]+(0.280066256773)*x_ref[1]
-        ref[3,1,2,0]=(0.846917449307)*x_ref[0]+(-0.890613362071)*x_ref[1]
-        ref[3,1,2,1]=(0.848971364583)*x_ref[0]+(1.28188639634)*x_ref[1]
-        ref[3,2,0,0]=(0.244851870449)*x_ref[0]+(-1.29335472533)*x_ref[1]
-        ref[3,2,0,1]=(-0.679420773687)*x_ref[0]+(0.0533049166584)*x_ref[1]
-        ref[3,2,1,0]=(0.209683196995)*x_ref[0]+(-1.18725405512)*x_ref[1]
-        ref[3,2,1,1]=(1.14374677567)*x_ref[0]+(-0.0360927695675)*x_ref[1]
-        ref[3,2,2,0]=(-0.675139110144)*x_ref[0]+(0.203993983732)*x_ref[1]
-        ref[3,2,2,1]=(-0.237314875828)*x_ref[0]+(-0.581326039718)*x_ref[1]
-        ref[3,3,0,0]=(-0.429825943466)*x_ref[0]+(-0.256971982048)*x_ref[1]
-        ref[3,3,0,1]=(0.520863156649)*x_ref[0]+(-0.149770317657)*x_ref[1]
-        ref[3,3,1,0]=(0.534493615852)*x_ref[0]+(-0.486279758704)*x_ref[1]
-        ref[3,3,1,1]=(1.40465616102)*x_ref[0]+(-0.131521707731)*x_ref[1]
-        ref[3,3,2,0]=(0.171604624229)*x_ref[0]+(0.810160978932)*x_ref[1]
-        ref[3,3,2,1]=(1.28980934106)*x_ref[0]+(-1.0563749584)*x_ref[1]
-        ref[3,4,0,0]=(-0.631680784482)*x_ref[0]+(-1.10885428097)*x_ref[1]
-        ref[3,4,0,1]=(-1.02297901709)*x_ref[0]+(1.30007360034)*x_ref[1]
-        ref[3,4,1,0]=(0.728467970192)*x_ref[0]+(-0.872220126316)*x_ref[1]
-        ref[3,4,1,1]=(1.18596842635)*x_ref[0]+(-0.246158517864)*x_ref[1]
-        ref[3,4,2,0]=(0.158818463065)*x_ref[0]+(-0.687328798914)*x_ref[1]
-        ref[3,4,2,1]=(-0.267029459109)*x_ref[0]+(0.161790218602)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.41028779384)*x[0]+(-1.69085638593)*x[1]+(-0.626478106748)*x[2]
-        arg[0,0,0,1]=(-0.322729407761)*x[0]+(-0.311218478587)*x[1]+(-0.329375635778)*x[2]
-        arg[0,0,1,0]=(-0.16111144722)*x[0]+(0.864377600354)*x[1]+(-1.01349863575)*x[2]
-        arg[0,0,1,1]=(0.0720111273067)*x[0]+(1.40365232221)*x[1]+(0.292610528868)*x[2]
-        arg[0,0,2,0]=(-1.21827641959)*x[0]+(0.168559044212)*x[1]+(0.841389848275)*x[2]
-        arg[0,0,2,1]=(0.631258821218)*x[0]+(-1.22185752256)*x[1]+(0.0213133635991)*x[2]
-        arg[0,1,0,0]=(-0.55959466492)*x[0]+(0.567105256147)*x[1]+(0.185414627961)*x[2]
-        arg[0,1,0,1]=(1.42576865692)*x[0]+(-1.38354595053)*x[1]+(1.08902163491)*x[2]
-        arg[0,1,1,0]=(-0.441288277712)*x[0]+(-0.412579680073)*x[1]+(0.85969923606)*x[2]
-        arg[0,1,1,1]=(1.20924692667)*x[0]+(-0.263790869016)*x[1]+(-0.117388627799)*x[2]
-        arg[0,1,2,0]=(-0.849546239235)*x[0]+(-0.41970601628)*x[1]+(0.712637692553)*x[2]
-        arg[0,1,2,1]=(0.665825646772)*x[0]+(-0.49641548077)*x[1]+(0.0243383084422)*x[2]
-        arg[0,2,0,0]=(0.158298703766)*x[0]+(-1.38559416875)*x[1]+(-0.549526684962)*x[2]
-        arg[0,2,0,1]=(0.290664973202)*x[0]+(-0.725089032773)*x[1]+(-0.420805410829)*x[2]
-        arg[0,2,1,0]=(-0.371388631358)*x[0]+(0.712788591622)*x[1]+(0.708499722908)*x[2]
-        arg[0,2,1,1]=(-0.209234718871)*x[0]+(-0.559384946846)*x[1]+(-0.18126082565)*x[2]
-        arg[0,2,2,0]=(0.295605948328)*x[0]+(0.0787080259554)*x[1]+(-0.413453606631)*x[2]
-        arg[0,2,2,1]=(-0.951652076608)*x[0]+(0.412030442608)*x[1]+(-1.0098591628)*x[2]
-        arg[0,3,0,0]=(0.38805130758)*x[0]+(0.725062113278)*x[1]+(-0.0789722367715)*x[2]
-        arg[0,3,0,1]=(-0.856689544368)*x[0]+(-0.378806165724)*x[1]+(-1.56132477796)*x[2]
-        arg[0,3,1,0]=(0.948414643284)*x[0]+(-0.223099011255)*x[1]+(-0.164540510924)*x[2]
-        arg[0,3,1,1]=(-0.290272025223)*x[0]+(0.0110236571203)*x[1]+(0.0344804634468)*x[2]
-        arg[0,3,2,0]=(-1.06973937948)*x[0]+(-0.19210617162)*x[1]+(-0.0319179806513)*x[2]
-        arg[0,3,2,1]=(0.873398122756)*x[0]+(0.87424619659)*x[1]+(0.130681723853)*x[2]
-        arg[0,4,0,0]=(-0.231238303513)*x[0]+(1.13248606226)*x[1]+(1.08638890671)*x[2]
-        arg[0,4,0,1]=(0.0325659323288)*x[0]+(1.53278397594)*x[1]+(-0.0823455709949)*x[2]
-        arg[0,4,1,0]=(-0.415558245155)*x[0]+(-0.468794623975)*x[1]+(-0.4219946425)*x[2]
-        arg[0,4,1,1]=(0.687857094934)*x[0]+(-0.316748377318)*x[1]+(1.51841645514)*x[2]
-        arg[0,4,2,0]=(-0.842163178579)*x[0]+(-0.459357139258)*x[1]+(-0.774999285967)*x[2]
-        arg[0,4,2,1]=(0.361059525968)*x[0]+(0.302800510186)*x[1]+(0.164988681972)*x[2]
-        arg[1,0,0,0]=(-0.549884089801)*x[0]+(0.18615759395)*x[1]+(-0.150676638905)*x[2]
-        arg[1,0,0,1]=(-0.908800158159)*x[0]+(1.74574577127)*x[1]+(0.347894281217)*x[2]
-        arg[1,0,1,0]=(1.21798491919)*x[0]+(-1.04989223901)*x[1]+(-0.706457284537)*x[2]
-        arg[1,0,1,1]=(0.441083030576)*x[0]+(0.458319482203)*x[1]+(0.704887998977)*x[2]
-        arg[1,0,2,0]=(-0.386479556415)*x[0]+(-1.28347087396)*x[1]+(-0.876058219438)*x[2]
-        arg[1,0,2,1]=(0.743100114846)*x[0]+(1.02919050439)*x[1]+(-0.357203265224)*x[2]
-        arg[1,1,0,0]=(-0.309112244319)*x[0]+(0.469639650979)*x[1]+(0.371325594811)*x[2]
-        arg[1,1,0,1]=(1.53067095144)*x[0]+(1.18235592763)*x[1]+(-0.959436428335)*x[2]
-        arg[1,1,1,0]=(0.291735282406)*x[0]+(0.449515270669)*x[1]+(0.612383052683)*x[2]
-        arg[1,1,1,1]=(-0.102313390769)*x[0]+(1.25745082506)*x[1]+(-1.03742917135)*x[2]
-        arg[1,1,2,0]=(-0.951576197839)*x[0]+(1.03094297086)*x[1]+(-0.10195348802)*x[2]
-        arg[1,1,2,1]=(1.54751905175)*x[0]+(1.47958820289)*x[1]+(-0.357466311206)*x[2]
-        arg[1,2,0,0]=(-0.452360614767)*x[0]+(-0.865741367113)*x[1]+(1.12034992845)*x[2]
-        arg[1,2,0,1]=(0.00940323370511)*x[0]+(-1.03701972012)*x[1]+(0.0102243182131)*x[2]
-        arg[1,2,1,0]=(-1.50670950911)*x[0]+(-0.219993644831)*x[1]+(-0.1612757943)*x[2]
-        arg[1,2,1,1]=(-0.792871502871)*x[0]+(-0.0163752900095)*x[1]+(1.54206281352)*x[2]
-        arg[1,2,2,0]=(1.02928968974)*x[0]+(-0.171516999194)*x[1]+(-0.446145675054)*x[2]
-        arg[1,2,2,1]=(-1.51230609746)*x[0]+(0.2034193081)*x[1]+(-0.291776924482)*x[2]
-        arg[1,3,0,0]=(-0.0312379262641)*x[0]+(0.722239260943)*x[1]+(-0.279504141505)*x[2]
-        arg[1,3,0,1]=(-1.12038082645)*x[0]+(-0.328148046828)*x[1]+(0.825288681731)*x[2]
-        arg[1,3,1,0]=(0.547173116241)*x[0]+(0.136609628569)*x[1]+(-0.476006212278)*x[2]
-        arg[1,3,1,1]=(0.000854188874487)*x[0]+(0.473989971126)*x[1]+(1.58153857042)*x[2]
-        arg[1,3,2,0]=(-0.746628247481)*x[0]+(0.859384716891)*x[1]+(0.618348305951)*x[2]
-        arg[1,3,2,1]=(0.919601890657)*x[0]+(0.422457734769)*x[1]+(-1.11235109226)*x[2]
-        arg[1,4,0,0]=(0.962587287633)*x[0]+(-1.2526632022)*x[1]+(0.210254126936)*x[2]
-        arg[1,4,0,1]=(-0.330257182624)*x[0]+(-0.251562095795)*x[1]+(1.29427728094)*x[2]
-        arg[1,4,1,0]=(-0.577555922072)*x[0]+(0.844462157498)*x[1]+(-0.120809700805)*x[2]
-        arg[1,4,1,1]=(-0.91963436975)*x[0]+(-0.415146584044)*x[1]+(-0.105600826517)*x[2]
-        arg[1,4,2,0]=(-1.28940482584)*x[0]+(-1.55548284063)*x[1]+(-0.835108666511)*x[2]
-        arg[1,4,2,1]=(-0.0299379665752)*x[0]+(-0.992000458707)*x[1]+(-0.469600133762)*x[2]
-        arg[2,0,0,0]=(0.0107575962552)*x[0]+(-1.06407817799)*x[1]+(-1.84217380223)*x[2]
-        arg[2,0,0,1]=(-0.0596138757136)*x[0]+(1.75177421542)*x[1]+(0.131511355216)*x[2]
-        arg[2,0,1,0]=(-0.29485191211)*x[0]+(1.55396303732)*x[1]+(0.137822438484)*x[2]
-        arg[2,0,1,1]=(0.968093798582)*x[0]+(-0.348515863297)*x[1]+(-0.885253223355)*x[2]
-        arg[2,0,2,0]=(0.304703601471)*x[0]+(0.350016020435)*x[1]+(0.0348615188696)*x[2]
-        arg[2,0,2,1]=(0.242706426227)*x[0]+(0.00660859017533)*x[1]+(-0.122732284886)*x[2]
-        arg[2,1,0,0]=(0.540596184477)*x[0]+(-0.0272014403068)*x[1]+(0.559631760626)*x[2]
-        arg[2,1,0,1]=(0.537160103765)*x[0]+(-0.974891403717)*x[1]+(-1.2571032682)*x[2]
-        arg[2,1,1,0]=(-0.134244705433)*x[0]+(1.63419015928)*x[1]+(0.0879689992598)*x[2]
-        arg[2,1,1,1]=(0.885004305439)*x[0]+(1.63473219215)*x[1]+(-0.714475475618)*x[2]
-        arg[2,1,2,0]=(-0.220742006931)*x[0]+(0.298113077571)*x[1]+(0.129338822854)*x[2]
-        arg[2,1,2,1]=(0.0696132558998)*x[0]+(1.28044127087)*x[1]+(-0.182025504014)*x[2]
-        arg[2,2,0,0]=(-0.108760249345)*x[0]+(-0.727726654762)*x[1]+(1.1810583418)*x[2]
-        arg[2,2,0,1]=(1.69464976816)*x[0]+(0.771779692301)*x[1]+(-0.746303209271)*x[2]
-        arg[2,2,1,0]=(1.6897653643)*x[0]+(-1.21078732523)*x[1]+(-0.000978666646647)*x[2]
-        arg[2,2,1,1]=(1.60773073603)*x[0]+(-0.583968900051)*x[1]+(-0.0511730994465)*x[2]
-        arg[2,2,2,0]=(0.506948201854)*x[0]+(-0.00990858555453)*x[1]+(1.06433022033)*x[2]
-        arg[2,2,2,1]=(0.449523090508)*x[0]+(-1.61710851818)*x[1]+(0.440720932423)*x[2]
-        arg[2,3,0,0]=(0.0167109660325)*x[0]+(-1.08812386645)*x[1]+(-1.22089632364)*x[2]
-        arg[2,3,0,1]=(-0.841668282066)*x[0]+(0.636645352356)*x[1]+(-0.537753623856)*x[2]
-        arg[2,3,1,0]=(1.79552636749)*x[0]+(0.481662215698)*x[1]+(-0.371782307951)*x[2]
-        arg[2,3,1,1]=(-0.747945987059)*x[0]+(0.818378132535)*x[1]+(1.66032057212)*x[2]
-        arg[2,3,2,0]=(-0.126253738036)*x[0]+(-0.681619876818)*x[1]+(0.117269467345)*x[2]
-        arg[2,3,2,1]=(-0.338521414346)*x[0]+(0.381458529772)*x[1]+(1.00819568542)*x[2]
-        arg[2,4,0,0]=(0.0110334310038)*x[0]+(0.229750132795)*x[1]+(-0.900772274961)*x[2]
-        arg[2,4,0,1]=(-0.798344038508)*x[0]+(0.0410740025116)*x[1]+(1.46856652632)*x[2]
-        arg[2,4,1,0]=(0.193355735165)*x[0]+(-0.539307787984)*x[1]+(-0.375854987378)*x[2]
-        arg[2,4,1,1]=(0.568143022174)*x[0]+(-1.61770216281)*x[1]+(0.208204629987)*x[2]
-        arg[2,4,2,0]=(1.37290817619)*x[0]+(-0.174324684678)*x[1]+(-0.217538755825)*x[2]
-        arg[2,4,2,1]=(-0.483601819019)*x[0]+(1.45019519818)*x[1]+(-0.623519730492)*x[2]
-        arg[3,0,0,0]=(-0.793731389518)*x[0]+(-0.154763125819)*x[1]+(1.10863435441)*x[2]
-        arg[3,0,0,1]=(0.507036346178)*x[0]+(-0.309380836403)*x[1]+(-0.418720111636)*x[2]
-        arg[3,0,1,0]=(-0.777608365831)*x[0]+(0.982848447238)*x[1]+(-0.762479658423)*x[2]
-        arg[3,0,1,1]=(-0.73325130954)*x[0]+(-0.253614119609)*x[1]+(-0.366314075481)*x[2]
-        arg[3,0,2,0]=(0.0989317940836)*x[0]+(0.0772067160489)*x[1]+(-1.84682997853)*x[2]
-        arg[3,0,2,1]=(0.256206660712)*x[0]+(1.2868655538)*x[1]+(-0.522346638322)*x[2]
-        arg[3,1,0,0]=(-1.41604178327)*x[0]+(0.662242482319)*x[1]+(1.7526698965)*x[2]
-        arg[3,1,0,1]=(-0.442315980785)*x[0]+(0.423309436413)*x[1]+(0.175362864372)*x[2]
-        arg[3,1,1,0]=(0.353602081392)*x[0]+(1.55530884146)*x[1]+(-0.115267400964)*x[2]
-        arg[3,1,1,1]=(0.1445651493)*x[0]+(0.652413545545)*x[1]+(-1.47341714223)*x[2]
-        arg[3,1,2,0]=(0.288044123145)*x[0]+(1.45339107563)*x[1]+(0.0253961147274)*x[2]
-        arg[3,1,2,1]=(0.738725097174)*x[0]+(0.556287291563)*x[1]+(0.685592801206)*x[2]
-        arg[3,2,0,0]=(-1.6952458849)*x[0]+(-0.450982750203)*x[1]+(-0.176030737746)*x[2]
-        arg[3,2,0,1]=(-0.267377959403)*x[0]+(-0.329354216237)*x[1]+(0.368496833805)*x[2]
-        arg[3,2,1,0]=(1.00419353409)*x[0]+(1.50507467849)*x[1]+(-0.529113363067)*x[2]
-        arg[3,2,1,1]=(-1.69175338104)*x[0]+(-0.101436360248)*x[1]+(0.963918243087)*x[2]
-        arg[3,2,2,0]=(0.093465616883)*x[0]+(-0.390155190153)*x[1]+(-0.354824565592)*x[2]
-        arg[3,2,2,1]=(-0.414577385531)*x[0]+(-0.665726090904)*x[1]+(-1.39857731593)*x[2]
-        arg[3,3,0,0]=(-0.528594178602)*x[0]+(-0.435472295413)*x[1]+(0.397972761993)*x[2]
-        arg[3,3,0,1]=(1.24885378376)*x[0]+(1.63537745582)*x[1]+(-0.00703582234262)*x[2]
-        arg[3,3,1,0]=(0.63369530476)*x[0]+(0.296615915965)*x[1]+(0.593277434193)*x[2]
-        arg[3,3,1,1]=(-0.197615624091)*x[0]+(1.45678045242)*x[1]+(0.571039120854)*x[2]
-        arg[3,3,2,0]=(-1.01304527292)*x[0]+(0.00892977300805)*x[1]+(0.284285861002)*x[2]
-        arg[3,3,2,1]=(0.647872454128)*x[0]+(-0.373279273659)*x[1]+(1.27785668874)*x[2]
-        arg[3,4,0,0]=(0.708994891373)*x[0]+(-0.439675903635)*x[1]+(0.612884939946)*x[2]
-        arg[3,4,0,1]=(0.535549893212)*x[0]+(-0.940830832131)*x[1]+(-0.30796510692)*x[2]
-        arg[3,4,1,0]=(-1.24560696134)*x[0]+(0.125328014324)*x[1]+(0.168757304331)*x[2]
-        arg[3,4,1,1]=(0.604969099581)*x[0]+(0.212563821283)*x[1]+(0.146243255184)*x[2]
-        arg[3,4,2,0]=(-0.0402174498351)*x[0]+(0.967028407195)*x[1]+(-0.991740640214)*x[2]
-        arg[3,4,2,1]=(0.0572331664331)*x[0]+(-0.836713731055)*x[1]+(0.78195371901)*x[2]
-        ref[0,0,0,0]=(-1.41028779384)*x_ref[0]+(-1.69085638593)*x_ref[1]+(-0.626478106748)*x_ref[2]
-        ref[0,0,0,1]=(-0.322729407761)*x_ref[0]+(-0.311218478587)*x_ref[1]+(-0.329375635778)*x_ref[2]
-        ref[0,0,1,0]=(-0.16111144722)*x_ref[0]+(0.864377600354)*x_ref[1]+(-1.01349863575)*x_ref[2]
-        ref[0,0,1,1]=(0.0720111273067)*x_ref[0]+(1.40365232221)*x_ref[1]+(0.292610528868)*x_ref[2]
-        ref[0,0,2,0]=(-1.21827641959)*x_ref[0]+(0.168559044212)*x_ref[1]+(0.841389848275)*x_ref[2]
-        ref[0,0,2,1]=(0.631258821218)*x_ref[0]+(-1.22185752256)*x_ref[1]+(0.0213133635991)*x_ref[2]
-        ref[0,1,0,0]=(-0.55959466492)*x_ref[0]+(0.567105256147)*x_ref[1]+(0.185414627961)*x_ref[2]
-        ref[0,1,0,1]=(1.42576865692)*x_ref[0]+(-1.38354595053)*x_ref[1]+(1.08902163491)*x_ref[2]
-        ref[0,1,1,0]=(-0.441288277712)*x_ref[0]+(-0.412579680073)*x_ref[1]+(0.85969923606)*x_ref[2]
-        ref[0,1,1,1]=(1.20924692667)*x_ref[0]+(-0.263790869016)*x_ref[1]+(-0.117388627799)*x_ref[2]
-        ref[0,1,2,0]=(-0.849546239235)*x_ref[0]+(-0.41970601628)*x_ref[1]+(0.712637692553)*x_ref[2]
-        ref[0,1,2,1]=(0.665825646772)*x_ref[0]+(-0.49641548077)*x_ref[1]+(0.0243383084422)*x_ref[2]
-        ref[0,2,0,0]=(0.158298703766)*x_ref[0]+(-1.38559416875)*x_ref[1]+(-0.549526684962)*x_ref[2]
-        ref[0,2,0,1]=(0.290664973202)*x_ref[0]+(-0.725089032773)*x_ref[1]+(-0.420805410829)*x_ref[2]
-        ref[0,2,1,0]=(-0.371388631358)*x_ref[0]+(0.712788591622)*x_ref[1]+(0.708499722908)*x_ref[2]
-        ref[0,2,1,1]=(-0.209234718871)*x_ref[0]+(-0.559384946846)*x_ref[1]+(-0.18126082565)*x_ref[2]
-        ref[0,2,2,0]=(0.295605948328)*x_ref[0]+(0.0787080259554)*x_ref[1]+(-0.413453606631)*x_ref[2]
-        ref[0,2,2,1]=(-0.951652076608)*x_ref[0]+(0.412030442608)*x_ref[1]+(-1.0098591628)*x_ref[2]
-        ref[0,3,0,0]=(0.38805130758)*x_ref[0]+(0.725062113278)*x_ref[1]+(-0.0789722367715)*x_ref[2]
-        ref[0,3,0,1]=(-0.856689544368)*x_ref[0]+(-0.378806165724)*x_ref[1]+(-1.56132477796)*x_ref[2]
-        ref[0,3,1,0]=(0.948414643284)*x_ref[0]+(-0.223099011255)*x_ref[1]+(-0.164540510924)*x_ref[2]
-        ref[0,3,1,1]=(-0.290272025223)*x_ref[0]+(0.0110236571203)*x_ref[1]+(0.0344804634468)*x_ref[2]
-        ref[0,3,2,0]=(-1.06973937948)*x_ref[0]+(-0.19210617162)*x_ref[1]+(-0.0319179806513)*x_ref[2]
-        ref[0,3,2,1]=(0.873398122756)*x_ref[0]+(0.87424619659)*x_ref[1]+(0.130681723853)*x_ref[2]
-        ref[0,4,0,0]=(-0.231238303513)*x_ref[0]+(1.13248606226)*x_ref[1]+(1.08638890671)*x_ref[2]
-        ref[0,4,0,1]=(0.0325659323288)*x_ref[0]+(1.53278397594)*x_ref[1]+(-0.0823455709949)*x_ref[2]
-        ref[0,4,1,0]=(-0.415558245155)*x_ref[0]+(-0.468794623975)*x_ref[1]+(-0.4219946425)*x_ref[2]
-        ref[0,4,1,1]=(0.687857094934)*x_ref[0]+(-0.316748377318)*x_ref[1]+(1.51841645514)*x_ref[2]
-        ref[0,4,2,0]=(-0.842163178579)*x_ref[0]+(-0.459357139258)*x_ref[1]+(-0.774999285967)*x_ref[2]
-        ref[0,4,2,1]=(0.361059525968)*x_ref[0]+(0.302800510186)*x_ref[1]+(0.164988681972)*x_ref[2]
-        ref[1,0,0,0]=(-0.549884089801)*x_ref[0]+(0.18615759395)*x_ref[1]+(-0.150676638905)*x_ref[2]
-        ref[1,0,0,1]=(-0.908800158159)*x_ref[0]+(1.74574577127)*x_ref[1]+(0.347894281217)*x_ref[2]
-        ref[1,0,1,0]=(1.21798491919)*x_ref[0]+(-1.04989223901)*x_ref[1]+(-0.706457284537)*x_ref[2]
-        ref[1,0,1,1]=(0.441083030576)*x_ref[0]+(0.458319482203)*x_ref[1]+(0.704887998977)*x_ref[2]
-        ref[1,0,2,0]=(-0.386479556415)*x_ref[0]+(-1.28347087396)*x_ref[1]+(-0.876058219438)*x_ref[2]
-        ref[1,0,2,1]=(0.743100114846)*x_ref[0]+(1.02919050439)*x_ref[1]+(-0.357203265224)*x_ref[2]
-        ref[1,1,0,0]=(-0.309112244319)*x_ref[0]+(0.469639650979)*x_ref[1]+(0.371325594811)*x_ref[2]
-        ref[1,1,0,1]=(1.53067095144)*x_ref[0]+(1.18235592763)*x_ref[1]+(-0.959436428335)*x_ref[2]
-        ref[1,1,1,0]=(0.291735282406)*x_ref[0]+(0.449515270669)*x_ref[1]+(0.612383052683)*x_ref[2]
-        ref[1,1,1,1]=(-0.102313390769)*x_ref[0]+(1.25745082506)*x_ref[1]+(-1.03742917135)*x_ref[2]
-        ref[1,1,2,0]=(-0.951576197839)*x_ref[0]+(1.03094297086)*x_ref[1]+(-0.10195348802)*x_ref[2]
-        ref[1,1,2,1]=(1.54751905175)*x_ref[0]+(1.47958820289)*x_ref[1]+(-0.357466311206)*x_ref[2]
-        ref[1,2,0,0]=(-0.452360614767)*x_ref[0]+(-0.865741367113)*x_ref[1]+(1.12034992845)*x_ref[2]
-        ref[1,2,0,1]=(0.00940323370511)*x_ref[0]+(-1.03701972012)*x_ref[1]+(0.0102243182131)*x_ref[2]
-        ref[1,2,1,0]=(-1.50670950911)*x_ref[0]+(-0.219993644831)*x_ref[1]+(-0.1612757943)*x_ref[2]
-        ref[1,2,1,1]=(-0.792871502871)*x_ref[0]+(-0.0163752900095)*x_ref[1]+(1.54206281352)*x_ref[2]
-        ref[1,2,2,0]=(1.02928968974)*x_ref[0]+(-0.171516999194)*x_ref[1]+(-0.446145675054)*x_ref[2]
-        ref[1,2,2,1]=(-1.51230609746)*x_ref[0]+(0.2034193081)*x_ref[1]+(-0.291776924482)*x_ref[2]
-        ref[1,3,0,0]=(-0.0312379262641)*x_ref[0]+(0.722239260943)*x_ref[1]+(-0.279504141505)*x_ref[2]
-        ref[1,3,0,1]=(-1.12038082645)*x_ref[0]+(-0.328148046828)*x_ref[1]+(0.825288681731)*x_ref[2]
-        ref[1,3,1,0]=(0.547173116241)*x_ref[0]+(0.136609628569)*x_ref[1]+(-0.476006212278)*x_ref[2]
-        ref[1,3,1,1]=(0.000854188874487)*x_ref[0]+(0.473989971126)*x_ref[1]+(1.58153857042)*x_ref[2]
-        ref[1,3,2,0]=(-0.746628247481)*x_ref[0]+(0.859384716891)*x_ref[1]+(0.618348305951)*x_ref[2]
-        ref[1,3,2,1]=(0.919601890657)*x_ref[0]+(0.422457734769)*x_ref[1]+(-1.11235109226)*x_ref[2]
-        ref[1,4,0,0]=(0.962587287633)*x_ref[0]+(-1.2526632022)*x_ref[1]+(0.210254126936)*x_ref[2]
-        ref[1,4,0,1]=(-0.330257182624)*x_ref[0]+(-0.251562095795)*x_ref[1]+(1.29427728094)*x_ref[2]
-        ref[1,4,1,0]=(-0.577555922072)*x_ref[0]+(0.844462157498)*x_ref[1]+(-0.120809700805)*x_ref[2]
-        ref[1,4,1,1]=(-0.91963436975)*x_ref[0]+(-0.415146584044)*x_ref[1]+(-0.105600826517)*x_ref[2]
-        ref[1,4,2,0]=(-1.28940482584)*x_ref[0]+(-1.55548284063)*x_ref[1]+(-0.835108666511)*x_ref[2]
-        ref[1,4,2,1]=(-0.0299379665752)*x_ref[0]+(-0.992000458707)*x_ref[1]+(-0.469600133762)*x_ref[2]
-        ref[2,0,0,0]=(0.0107575962552)*x_ref[0]+(-1.06407817799)*x_ref[1]+(-1.84217380223)*x_ref[2]
-        ref[2,0,0,1]=(-0.0596138757136)*x_ref[0]+(1.75177421542)*x_ref[1]+(0.131511355216)*x_ref[2]
-        ref[2,0,1,0]=(-0.29485191211)*x_ref[0]+(1.55396303732)*x_ref[1]+(0.137822438484)*x_ref[2]
-        ref[2,0,1,1]=(0.968093798582)*x_ref[0]+(-0.348515863297)*x_ref[1]+(-0.885253223355)*x_ref[2]
-        ref[2,0,2,0]=(0.304703601471)*x_ref[0]+(0.350016020435)*x_ref[1]+(0.0348615188696)*x_ref[2]
-        ref[2,0,2,1]=(0.242706426227)*x_ref[0]+(0.00660859017533)*x_ref[1]+(-0.122732284886)*x_ref[2]
-        ref[2,1,0,0]=(0.540596184477)*x_ref[0]+(-0.0272014403068)*x_ref[1]+(0.559631760626)*x_ref[2]
-        ref[2,1,0,1]=(0.537160103765)*x_ref[0]+(-0.974891403717)*x_ref[1]+(-1.2571032682)*x_ref[2]
-        ref[2,1,1,0]=(-0.134244705433)*x_ref[0]+(1.63419015928)*x_ref[1]+(0.0879689992598)*x_ref[2]
-        ref[2,1,1,1]=(0.885004305439)*x_ref[0]+(1.63473219215)*x_ref[1]+(-0.714475475618)*x_ref[2]
-        ref[2,1,2,0]=(-0.220742006931)*x_ref[0]+(0.298113077571)*x_ref[1]+(0.129338822854)*x_ref[2]
-        ref[2,1,2,1]=(0.0696132558998)*x_ref[0]+(1.28044127087)*x_ref[1]+(-0.182025504014)*x_ref[2]
-        ref[2,2,0,0]=(-0.108760249345)*x_ref[0]+(-0.727726654762)*x_ref[1]+(1.1810583418)*x_ref[2]
-        ref[2,2,0,1]=(1.69464976816)*x_ref[0]+(0.771779692301)*x_ref[1]+(-0.746303209271)*x_ref[2]
-        ref[2,2,1,0]=(1.6897653643)*x_ref[0]+(-1.21078732523)*x_ref[1]+(-0.000978666646647)*x_ref[2]
-        ref[2,2,1,1]=(1.60773073603)*x_ref[0]+(-0.583968900051)*x_ref[1]+(-0.0511730994465)*x_ref[2]
-        ref[2,2,2,0]=(0.506948201854)*x_ref[0]+(-0.00990858555453)*x_ref[1]+(1.06433022033)*x_ref[2]
-        ref[2,2,2,1]=(0.449523090508)*x_ref[0]+(-1.61710851818)*x_ref[1]+(0.440720932423)*x_ref[2]
-        ref[2,3,0,0]=(0.0167109660325)*x_ref[0]+(-1.08812386645)*x_ref[1]+(-1.22089632364)*x_ref[2]
-        ref[2,3,0,1]=(-0.841668282066)*x_ref[0]+(0.636645352356)*x_ref[1]+(-0.537753623856)*x_ref[2]
-        ref[2,3,1,0]=(1.79552636749)*x_ref[0]+(0.481662215698)*x_ref[1]+(-0.371782307951)*x_ref[2]
-        ref[2,3,1,1]=(-0.747945987059)*x_ref[0]+(0.818378132535)*x_ref[1]+(1.66032057212)*x_ref[2]
-        ref[2,3,2,0]=(-0.126253738036)*x_ref[0]+(-0.681619876818)*x_ref[1]+(0.117269467345)*x_ref[2]
-        ref[2,3,2,1]=(-0.338521414346)*x_ref[0]+(0.381458529772)*x_ref[1]+(1.00819568542)*x_ref[2]
-        ref[2,4,0,0]=(0.0110334310038)*x_ref[0]+(0.229750132795)*x_ref[1]+(-0.900772274961)*x_ref[2]
-        ref[2,4,0,1]=(-0.798344038508)*x_ref[0]+(0.0410740025116)*x_ref[1]+(1.46856652632)*x_ref[2]
-        ref[2,4,1,0]=(0.193355735165)*x_ref[0]+(-0.539307787984)*x_ref[1]+(-0.375854987378)*x_ref[2]
-        ref[2,4,1,1]=(0.568143022174)*x_ref[0]+(-1.61770216281)*x_ref[1]+(0.208204629987)*x_ref[2]
-        ref[2,4,2,0]=(1.37290817619)*x_ref[0]+(-0.174324684678)*x_ref[1]+(-0.217538755825)*x_ref[2]
-        ref[2,4,2,1]=(-0.483601819019)*x_ref[0]+(1.45019519818)*x_ref[1]+(-0.623519730492)*x_ref[2]
-        ref[3,0,0,0]=(-0.793731389518)*x_ref[0]+(-0.154763125819)*x_ref[1]+(1.10863435441)*x_ref[2]
-        ref[3,0,0,1]=(0.507036346178)*x_ref[0]+(-0.309380836403)*x_ref[1]+(-0.418720111636)*x_ref[2]
-        ref[3,0,1,0]=(-0.777608365831)*x_ref[0]+(0.982848447238)*x_ref[1]+(-0.762479658423)*x_ref[2]
-        ref[3,0,1,1]=(-0.73325130954)*x_ref[0]+(-0.253614119609)*x_ref[1]+(-0.366314075481)*x_ref[2]
-        ref[3,0,2,0]=(0.0989317940836)*x_ref[0]+(0.0772067160489)*x_ref[1]+(-1.84682997853)*x_ref[2]
-        ref[3,0,2,1]=(0.256206660712)*x_ref[0]+(1.2868655538)*x_ref[1]+(-0.522346638322)*x_ref[2]
-        ref[3,1,0,0]=(-1.41604178327)*x_ref[0]+(0.662242482319)*x_ref[1]+(1.7526698965)*x_ref[2]
-        ref[3,1,0,1]=(-0.442315980785)*x_ref[0]+(0.423309436413)*x_ref[1]+(0.175362864372)*x_ref[2]
-        ref[3,1,1,0]=(0.353602081392)*x_ref[0]+(1.55530884146)*x_ref[1]+(-0.115267400964)*x_ref[2]
-        ref[3,1,1,1]=(0.1445651493)*x_ref[0]+(0.652413545545)*x_ref[1]+(-1.47341714223)*x_ref[2]
-        ref[3,1,2,0]=(0.288044123145)*x_ref[0]+(1.45339107563)*x_ref[1]+(0.0253961147274)*x_ref[2]
-        ref[3,1,2,1]=(0.738725097174)*x_ref[0]+(0.556287291563)*x_ref[1]+(0.685592801206)*x_ref[2]
-        ref[3,2,0,0]=(-1.6952458849)*x_ref[0]+(-0.450982750203)*x_ref[1]+(-0.176030737746)*x_ref[2]
-        ref[3,2,0,1]=(-0.267377959403)*x_ref[0]+(-0.329354216237)*x_ref[1]+(0.368496833805)*x_ref[2]
-        ref[3,2,1,0]=(1.00419353409)*x_ref[0]+(1.50507467849)*x_ref[1]+(-0.529113363067)*x_ref[2]
-        ref[3,2,1,1]=(-1.69175338104)*x_ref[0]+(-0.101436360248)*x_ref[1]+(0.963918243087)*x_ref[2]
-        ref[3,2,2,0]=(0.093465616883)*x_ref[0]+(-0.390155190153)*x_ref[1]+(-0.354824565592)*x_ref[2]
-        ref[3,2,2,1]=(-0.414577385531)*x_ref[0]+(-0.665726090904)*x_ref[1]+(-1.39857731593)*x_ref[2]
-        ref[3,3,0,0]=(-0.528594178602)*x_ref[0]+(-0.435472295413)*x_ref[1]+(0.397972761993)*x_ref[2]
-        ref[3,3,0,1]=(1.24885378376)*x_ref[0]+(1.63537745582)*x_ref[1]+(-0.00703582234262)*x_ref[2]
-        ref[3,3,1,0]=(0.63369530476)*x_ref[0]+(0.296615915965)*x_ref[1]+(0.593277434193)*x_ref[2]
-        ref[3,3,1,1]=(-0.197615624091)*x_ref[0]+(1.45678045242)*x_ref[1]+(0.571039120854)*x_ref[2]
-        ref[3,3,2,0]=(-1.01304527292)*x_ref[0]+(0.00892977300805)*x_ref[1]+(0.284285861002)*x_ref[2]
-        ref[3,3,2,1]=(0.647872454128)*x_ref[0]+(-0.373279273659)*x_ref[1]+(1.27785668874)*x_ref[2]
-        ref[3,4,0,0]=(0.708994891373)*x_ref[0]+(-0.439675903635)*x_ref[1]+(0.612884939946)*x_ref[2]
-        ref[3,4,0,1]=(0.535549893212)*x_ref[0]+(-0.940830832131)*x_ref[1]+(-0.30796510692)*x_ref[2]
-        ref[3,4,1,0]=(-1.24560696134)*x_ref[0]+(0.125328014324)*x_ref[1]+(0.168757304331)*x_ref[2]
-        ref[3,4,1,1]=(0.604969099581)*x_ref[0]+(0.212563821283)*x_ref[1]+(0.146243255184)*x_ref[2]
-        ref[3,4,2,0]=(-0.0402174498351)*x_ref[0]+(0.967028407195)*x_ref[1]+(-0.991740640214)*x_ref[2]
-        ref[3,4,2,1]=(0.0572331664331)*x_ref[0]+(-0.836713731055)*x_ref[1]+(0.78195371901)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.742484780403)*x[0]+(0.680847966059)*x[1]
-        ref=(0.742484780403)*x_ref[0]+(0.680847966059)*x_ref[1]
-      else:
-        arg=(-0.928733928018)*x[0]+(-0.0797736636663)*x[1]+(0.517280695569)*x[2]
-        ref=(-0.928733928018)*x_ref[0]+(-0.0797736636663)*x_ref[1]+(0.517280695569)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        arg[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-        ref[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        ref[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-      else:
-        arg[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        arg[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-        ref[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        ref[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0998962983997)*x[0]+(0.52180906409)*x[1]
-        arg[0,1]=(-0.0315655223925)*x[0]+(-0.0162720186305)*x[1]
-        arg[0,2]=(0.361840834336)*x[0]+(-1.08346005817)*x[1]
-        arg[0,3]=(0.673393991338)*x[0]+(0.571192080367)*x[1]
-        arg[0,4]=(-0.725648335559)*x[0]+(0.866678056281)*x[1]
-        arg[1,0]=(0.7094760871)*x[0]+(0.666899441355)*x[1]
-        arg[1,1]=(-0.0152490017553)*x[0]+(-1.1169188656)*x[1]
-        arg[1,2]=(-1.01408330279)*x[0]+(-1.10348930367)*x[1]
-        arg[1,3]=(0.690904468829)*x[0]+(1.12602486331)*x[1]
-        arg[1,4]=(-0.0391507405365)*x[0]+(-0.338120635003)*x[1]
-        arg[2,0]=(0.175234757619)*x[0]+(1.74258329734)*x[1]
-        arg[2,1]=(0.281950269687)*x[0]+(0.0489231995634)*x[1]
-        arg[2,2]=(1.24244714043)*x[0]+(0.0149577033777)*x[1]
-        arg[2,3]=(-0.706844294482)*x[0]+(-1.85050242116)*x[1]
-        arg[2,4]=(-0.494011860105)*x[0]+(0.0809275159202)*x[1]
-        arg[3,0]=(-0.380877016583)*x[0]+(0.0345520619524)*x[1]
-        arg[3,1]=(1.10464018251)*x[0]+(0.0246274384536)*x[1]
-        arg[3,2]=(-0.00138129982685)*x[0]+(0.776306480938)*x[1]
-        arg[3,3]=(-0.0830044393648)*x[0]+(-0.173691604089)*x[1]
-        arg[3,4]=(0.0909675137463)*x[0]+(0.208083539568)*x[1]
-        ref[0,0]=(0.0998962983997)*x_ref[0]+(0.52180906409)*x_ref[1]
-        ref[0,1]=(-0.0315655223925)*x_ref[0]+(-0.0162720186305)*x_ref[1]
-        ref[0,2]=(0.361840834336)*x_ref[0]+(-1.08346005817)*x_ref[1]
-        ref[0,3]=(0.673393991338)*x_ref[0]+(0.571192080367)*x_ref[1]
-        ref[0,4]=(-0.725648335559)*x_ref[0]+(0.866678056281)*x_ref[1]
-        ref[1,0]=(0.7094760871)*x_ref[0]+(0.666899441355)*x_ref[1]
-        ref[1,1]=(-0.0152490017553)*x_ref[0]+(-1.1169188656)*x_ref[1]
-        ref[1,2]=(-1.01408330279)*x_ref[0]+(-1.10348930367)*x_ref[1]
-        ref[1,3]=(0.690904468829)*x_ref[0]+(1.12602486331)*x_ref[1]
-        ref[1,4]=(-0.0391507405365)*x_ref[0]+(-0.338120635003)*x_ref[1]
-        ref[2,0]=(0.175234757619)*x_ref[0]+(1.74258329734)*x_ref[1]
-        ref[2,1]=(0.281950269687)*x_ref[0]+(0.0489231995634)*x_ref[1]
-        ref[2,2]=(1.24244714043)*x_ref[0]+(0.0149577033777)*x_ref[1]
-        ref[2,3]=(-0.706844294482)*x_ref[0]+(-1.85050242116)*x_ref[1]
-        ref[2,4]=(-0.494011860105)*x_ref[0]+(0.0809275159202)*x_ref[1]
-        ref[3,0]=(-0.380877016583)*x_ref[0]+(0.0345520619524)*x_ref[1]
-        ref[3,1]=(1.10464018251)*x_ref[0]+(0.0246274384536)*x_ref[1]
-        ref[3,2]=(-0.00138129982685)*x_ref[0]+(0.776306480938)*x_ref[1]
-        ref[3,3]=(-0.0830044393648)*x_ref[0]+(-0.173691604089)*x_ref[1]
-        ref[3,4]=(0.0909675137463)*x_ref[0]+(0.208083539568)*x_ref[1]
-      else:
-        arg[0,0]=(0.0539484604772)*x[0]+(-0.220817236218)*x[1]+(-0.853759265774)*x[2]
-        arg[0,1]=(0.336027623724)*x[0]+(-0.111775563754)*x[1]+(0.646672879096)*x[2]
-        arg[0,2]=(0.650722528854)*x[0]+(0.0924672090652)*x[1]+(-0.881798566157)*x[2]
-        arg[0,3]=(0.276745374112)*x[0]+(-1.34491685419)*x[1]+(-0.833420124328)*x[2]
-        arg[0,4]=(1.50686931219)*x[0]+(0.489530477585)*x[1]+(1.74836249628)*x[2]
-        arg[1,0]=(-0.240001512118)*x[0]+(0.350823736593)*x[1]+(-0.227106949276)*x[2]
-        arg[1,1]=(0.354636302436)*x[0]+(-0.0893490250257)*x[1]+(-0.0650366762176)*x[2]
-        arg[1,2]=(-0.319714829694)*x[0]+(0.43056121683)*x[1]+(0.109856817034)*x[2]
-        arg[1,3]=(-1.17581255544)*x[0]+(-0.491431894533)*x[1]+(0.220857799733)*x[2]
-        arg[1,4]=(1.5680027633)*x[0]+(-0.249723385268)*x[1]+(-1.72056978299)*x[2]
-        arg[2,0]=(0.197753675106)*x[0]+(0.314723848519)*x[1]+(0.718038926838)*x[2]
-        arg[2,1]=(0.13916867566)*x[0]+(-0.0345156812431)*x[1]+(0.34208613933)*x[2]
-        arg[2,2]=(-0.275775747114)*x[0]+(0.299200648073)*x[1]+(0.37950303615)*x[2]
-        arg[2,3]=(0.685209641306)*x[0]+(-0.347743700679)*x[1]+(0.356023331014)*x[2]
-        arg[2,4]=(-0.232082602587)*x[0]+(-0.942200667607)*x[1]+(0.961251099323)*x[2]
-        arg[3,0]=(0.59399111477)*x[0]+(1.06884076218)*x[1]+(-0.194044225109)*x[2]
-        arg[3,1]=(0.522006012644)*x[0]+(0.0804272287843)*x[1]+(0.263440832249)*x[2]
-        arg[3,2]=(1.25330346872)*x[0]+(-0.757485536992)*x[1]+(0.398906137626)*x[2]
-        arg[3,3]=(0.395712858673)*x[0]+(0.423226476819)*x[1]+(0.186209217392)*x[2]
-        arg[3,4]=(0.153657073245)*x[0]+(0.536681875397)*x[1]+(0.773972080743)*x[2]
-        ref[0,0]=(0.0539484604772)*x_ref[0]+(-0.220817236218)*x_ref[1]+(-0.853759265774)*x_ref[2]
-        ref[0,1]=(0.336027623724)*x_ref[0]+(-0.111775563754)*x_ref[1]+(0.646672879096)*x_ref[2]
-        ref[0,2]=(0.650722528854)*x_ref[0]+(0.0924672090652)*x_ref[1]+(-0.881798566157)*x_ref[2]
-        ref[0,3]=(0.276745374112)*x_ref[0]+(-1.34491685419)*x_ref[1]+(-0.833420124328)*x_ref[2]
-        ref[0,4]=(1.50686931219)*x_ref[0]+(0.489530477585)*x_ref[1]+(1.74836249628)*x_ref[2]
-        ref[1,0]=(-0.240001512118)*x_ref[0]+(0.350823736593)*x_ref[1]+(-0.227106949276)*x_ref[2]
-        ref[1,1]=(0.354636302436)*x_ref[0]+(-0.0893490250257)*x_ref[1]+(-0.0650366762176)*x_ref[2]
-        ref[1,2]=(-0.319714829694)*x_ref[0]+(0.43056121683)*x_ref[1]+(0.109856817034)*x_ref[2]
-        ref[1,3]=(-1.17581255544)*x_ref[0]+(-0.491431894533)*x_ref[1]+(0.220857799733)*x_ref[2]
-        ref[1,4]=(1.5680027633)*x_ref[0]+(-0.249723385268)*x_ref[1]+(-1.72056978299)*x_ref[2]
-        ref[2,0]=(0.197753675106)*x_ref[0]+(0.314723848519)*x_ref[1]+(0.718038926838)*x_ref[2]
-        ref[2,1]=(0.13916867566)*x_ref[0]+(-0.0345156812431)*x_ref[1]+(0.34208613933)*x_ref[2]
-        ref[2,2]=(-0.275775747114)*x_ref[0]+(0.299200648073)*x_ref[1]+(0.37950303615)*x_ref[2]
-        ref[2,3]=(0.685209641306)*x_ref[0]+(-0.347743700679)*x_ref[1]+(0.356023331014)*x_ref[2]
-        ref[2,4]=(-0.232082602587)*x_ref[0]+(-0.942200667607)*x_ref[1]+(0.961251099323)*x_ref[2]
-        ref[3,0]=(0.59399111477)*x_ref[0]+(1.06884076218)*x_ref[1]+(-0.194044225109)*x_ref[2]
-        ref[3,1]=(0.522006012644)*x_ref[0]+(0.0804272287843)*x_ref[1]+(0.263440832249)*x_ref[2]
-        ref[3,2]=(1.25330346872)*x_ref[0]+(-0.757485536992)*x_ref[1]+(0.398906137626)*x_ref[2]
-        ref[3,3]=(0.395712858673)*x_ref[0]+(0.423226476819)*x_ref[1]+(0.186209217392)*x_ref[2]
-        ref[3,4]=(0.153657073245)*x_ref[0]+(0.536681875397)*x_ref[1]+(0.773972080743)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.223040346102)*x[0]+(-0.40941514813)*x[1]
-        arg[0,0,1]=(-0.580051757755)*x[0]+(0.0793034026033)*x[1]
-        arg[0,1,0]=(-0.0576028239384)*x[0]+(1.058218319)*x[1]
-        arg[0,1,1]=(0.0914458475861)*x[0]+(1.48556548656)*x[1]
-        arg[1,0,0]=(0.211508891263)*x[0]+(-1.44088884228)*x[1]
-        arg[1,0,1]=(-0.753661543994)*x[0]+(0.675867607628)*x[1]
-        arg[1,1,0]=(-0.289500075744)*x[0]+(0.573476965486)*x[1]
-        arg[1,1,1]=(0.182150073163)*x[0]+(0.937376164291)*x[1]
-        arg[2,0,0]=(1.18815471968)*x[0]+(-0.860110330094)*x[1]
-        arg[2,0,1]=(-0.238305806178)*x[0]+(-1.27916609495)*x[1]
-        arg[2,1,0]=(-0.955511742125)*x[0]+(-0.605135532767)*x[1]
-        arg[2,1,1]=(0.342919038059)*x[0]+(-0.0980330687702)*x[1]
-        arg[3,0,0]=(0.700429242018)*x[0]+(0.742017035289)*x[1]
-        arg[3,0,1]=(0.344011429773)*x[0]+(-1.64251335376)*x[1]
-        arg[3,1,0]=(-0.177856966174)*x[0]+(0.180846653076)*x[1]
-        arg[3,1,1]=(-1.59212766197)*x[0]+(0.523595606775)*x[1]
-        arg[4,0,0]=(-0.264023123775)*x[0]+(0.545951813489)*x[1]
-        arg[4,0,1]=(-1.31580310435)*x[0]+(-0.105998549363)*x[1]
-        arg[4,1,0]=(0.878775616997)*x[0]+(0.0436540350692)*x[1]
-        arg[4,1,1]=(-1.50886945727)*x[0]+(-0.156133758872)*x[1]
-        arg[5,0,0]=(-0.196603805975)*x[0]+(1.3924198011)*x[1]
-        arg[5,0,1]=(0.688423025668)*x[0]+(-1.1304740704)*x[1]
-        arg[5,1,0]=(1.05132745721)*x[0]+(-0.0190306576753)*x[1]
-        arg[5,1,1]=(-0.336157880135)*x[0]+(0.948775404759)*x[1]
-        ref[0,0,0]=(0.223040346102)*x_ref[0]+(-0.40941514813)*x_ref[1]
-        ref[0,0,1]=(-0.580051757755)*x_ref[0]+(0.0793034026033)*x_ref[1]
-        ref[0,1,0]=(-0.0576028239384)*x_ref[0]+(1.058218319)*x_ref[1]
-        ref[0,1,1]=(0.0914458475861)*x_ref[0]+(1.48556548656)*x_ref[1]
-        ref[1,0,0]=(0.211508891263)*x_ref[0]+(-1.44088884228)*x_ref[1]
-        ref[1,0,1]=(-0.753661543994)*x_ref[0]+(0.675867607628)*x_ref[1]
-        ref[1,1,0]=(-0.289500075744)*x_ref[0]+(0.573476965486)*x_ref[1]
-        ref[1,1,1]=(0.182150073163)*x_ref[0]+(0.937376164291)*x_ref[1]
-        ref[2,0,0]=(1.18815471968)*x_ref[0]+(-0.860110330094)*x_ref[1]
-        ref[2,0,1]=(-0.238305806178)*x_ref[0]+(-1.27916609495)*x_ref[1]
-        ref[2,1,0]=(-0.955511742125)*x_ref[0]+(-0.605135532767)*x_ref[1]
-        ref[2,1,1]=(0.342919038059)*x_ref[0]+(-0.0980330687702)*x_ref[1]
-        ref[3,0,0]=(0.700429242018)*x_ref[0]+(0.742017035289)*x_ref[1]
-        ref[3,0,1]=(0.344011429773)*x_ref[0]+(-1.64251335376)*x_ref[1]
-        ref[3,1,0]=(-0.177856966174)*x_ref[0]+(0.180846653076)*x_ref[1]
-        ref[3,1,1]=(-1.59212766197)*x_ref[0]+(0.523595606775)*x_ref[1]
-        ref[4,0,0]=(-0.264023123775)*x_ref[0]+(0.545951813489)*x_ref[1]
-        ref[4,0,1]=(-1.31580310435)*x_ref[0]+(-0.105998549363)*x_ref[1]
-        ref[4,1,0]=(0.878775616997)*x_ref[0]+(0.0436540350692)*x_ref[1]
-        ref[4,1,1]=(-1.50886945727)*x_ref[0]+(-0.156133758872)*x_ref[1]
-        ref[5,0,0]=(-0.196603805975)*x_ref[0]+(1.3924198011)*x_ref[1]
-        ref[5,0,1]=(0.688423025668)*x_ref[0]+(-1.1304740704)*x_ref[1]
-        ref[5,1,0]=(1.05132745721)*x_ref[0]+(-0.0190306576753)*x_ref[1]
-        ref[5,1,1]=(-0.336157880135)*x_ref[0]+(0.948775404759)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.884050876189)*x[0]+(-0.394515582819)*x[1]+(1.3097094442)*x[2]
-        arg[0,0,1]=(-0.816123587792)*x[0]+(0.355197775988)*x[1]+(0.276746708309)*x[2]
-        arg[0,1,0]=(-0.124049709168)*x[0]+(1.18541954468)*x[1]+(0.209504045468)*x[2]
-        arg[0,1,1]=(0.0683100149522)*x[0]+(0.362926075694)*x[1]+(-0.0669691928299)*x[2]
-        arg[1,0,0]=(-1.1421316954)*x[0]+(0.390740725692)*x[1]+(-0.726193980086)*x[2]
-        arg[1,0,1]=(-0.843848580922)*x[0]+(-0.525850215762)*x[1]+(-0.00216507276212)*x[2]
-        arg[1,1,0]=(1.48370169071)*x[0]+(1.0755925183)*x[1]+(0.581274760413)*x[2]
-        arg[1,1,1]=(-1.32186510041)*x[0]+(0.415895688227)*x[1]+(0.0211839725586)*x[2]
-        arg[2,0,0]=(0.064488762235)*x[0]+(1.49328658794)*x[1]+(1.58091496737)*x[2]
-        arg[2,0,1]=(0.0366527940907)*x[0]+(0.777734357144)*x[1]+(-1.42974160614)*x[2]
-        arg[2,1,0]=(1.55170579579)*x[0]+(-1.93288667897)*x[1]+(-0.293286140809)*x[2]
-        arg[2,1,1]=(1.20599946796)*x[0]+(0.0227207800543)*x[1]+(0.754694156356)*x[2]
-        arg[3,0,0]=(-0.096426023819)*x[0]+(0.254350817295)*x[1]+(-0.845563802639)*x[2]
-        arg[3,0,1]=(0.259201676184)*x[0]+(-0.10777841018)*x[1]+(0.198814801338)*x[2]
-        arg[3,1,0]=(-0.375693547297)*x[0]+(-0.566070306507)*x[1]+(0.842662788128)*x[2]
-        arg[3,1,1]=(-0.254690046974)*x[0]+(1.68423179439)*x[1]+(-0.514749238215)*x[2]
-        arg[4,0,0]=(-0.283580142327)*x[0]+(-0.906119047897)*x[1]+(1.16264752395)*x[2]
-        arg[4,0,1]=(0.559319137591)*x[0]+(-0.135216628913)*x[1]+(0.0241520443893)*x[2]
-        arg[4,1,0]=(1.51344686911)*x[0]+(0.595733533885)*x[1]+(-0.49014841511)*x[2]
-        arg[4,1,1]=(0.261868556117)*x[0]+(-0.51266470705)*x[1]+(0.617731786544)*x[2]
-        arg[5,0,0]=(-0.947197547436)*x[0]+(1.18970238499)*x[1]+(-0.0491748623501)*x[2]
-        arg[5,0,1]=(0.0541604147191)*x[0]+(-0.844601205099)*x[1]+(1.67419390002)*x[2]
-        arg[5,1,0]=(0.370982789151)*x[0]+(-0.344762868862)*x[1]+(-0.48077628478)*x[2]
-        arg[5,1,1]=(-0.0845487748754)*x[0]+(1.43148171186)*x[1]+(-0.519880423555)*x[2]
-        ref[0,0,0]=(-0.884050876189)*x_ref[0]+(-0.394515582819)*x_ref[1]+(1.3097094442)*x_ref[2]
-        ref[0,0,1]=(-0.816123587792)*x_ref[0]+(0.355197775988)*x_ref[1]+(0.276746708309)*x_ref[2]
-        ref[0,1,0]=(-0.124049709168)*x_ref[0]+(1.18541954468)*x_ref[1]+(0.209504045468)*x_ref[2]
-        ref[0,1,1]=(0.0683100149522)*x_ref[0]+(0.362926075694)*x_ref[1]+(-0.0669691928299)*x_ref[2]
-        ref[1,0,0]=(-1.1421316954)*x_ref[0]+(0.390740725692)*x_ref[1]+(-0.726193980086)*x_ref[2]
-        ref[1,0,1]=(-0.843848580922)*x_ref[0]+(-0.525850215762)*x_ref[1]+(-0.00216507276212)*x_ref[2]
-        ref[1,1,0]=(1.48370169071)*x_ref[0]+(1.0755925183)*x_ref[1]+(0.581274760413)*x_ref[2]
-        ref[1,1,1]=(-1.32186510041)*x_ref[0]+(0.415895688227)*x_ref[1]+(0.0211839725586)*x_ref[2]
-        ref[2,0,0]=(0.064488762235)*x_ref[0]+(1.49328658794)*x_ref[1]+(1.58091496737)*x_ref[2]
-        ref[2,0,1]=(0.0366527940907)*x_ref[0]+(0.777734357144)*x_ref[1]+(-1.42974160614)*x_ref[2]
-        ref[2,1,0]=(1.55170579579)*x_ref[0]+(-1.93288667897)*x_ref[1]+(-0.293286140809)*x_ref[2]
-        ref[2,1,1]=(1.20599946796)*x_ref[0]+(0.0227207800543)*x_ref[1]+(0.754694156356)*x_ref[2]
-        ref[3,0,0]=(-0.096426023819)*x_ref[0]+(0.254350817295)*x_ref[1]+(-0.845563802639)*x_ref[2]
-        ref[3,0,1]=(0.259201676184)*x_ref[0]+(-0.10777841018)*x_ref[1]+(0.198814801338)*x_ref[2]
-        ref[3,1,0]=(-0.375693547297)*x_ref[0]+(-0.566070306507)*x_ref[1]+(0.842662788128)*x_ref[2]
-        ref[3,1,1]=(-0.254690046974)*x_ref[0]+(1.68423179439)*x_ref[1]+(-0.514749238215)*x_ref[2]
-        ref[4,0,0]=(-0.283580142327)*x_ref[0]+(-0.906119047897)*x_ref[1]+(1.16264752395)*x_ref[2]
-        ref[4,0,1]=(0.559319137591)*x_ref[0]+(-0.135216628913)*x_ref[1]+(0.0241520443893)*x_ref[2]
-        ref[4,1,0]=(1.51344686911)*x_ref[0]+(0.595733533885)*x_ref[1]+(-0.49014841511)*x_ref[2]
-        ref[4,1,1]=(0.261868556117)*x_ref[0]+(-0.51266470705)*x_ref[1]+(0.617731786544)*x_ref[2]
-        ref[5,0,0]=(-0.947197547436)*x_ref[0]+(1.18970238499)*x_ref[1]+(-0.0491748623501)*x_ref[2]
-        ref[5,0,1]=(0.0541604147191)*x_ref[0]+(-0.844601205099)*x_ref[1]+(1.67419390002)*x_ref[2]
-        ref[5,1,0]=(0.370982789151)*x_ref[0]+(-0.344762868862)*x_ref[1]+(-0.48077628478)*x_ref[2]
-        ref[5,1,1]=(-0.0845487748754)*x_ref[0]+(1.43148171186)*x_ref[1]+(-0.519880423555)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.748732264044)*x[0]+(0.326649183672)*x[1]
-        arg[0,0,0,1]=(-0.118874184707)*x[0]+(0.512027378857)*x[1]
-        arg[0,0,1,0]=(0.0907534655112)*x[0]+(0.145249508199)*x[1]
-        arg[0,0,1,1]=(0.879689742122)*x[0]+(-0.238488796672)*x[1]
-        arg[0,0,2,0]=(-0.285226080478)*x[0]+(-0.560477167124)*x[1]
-        arg[0,0,2,1]=(1.3620160918)*x[0]+(-0.97877396699)*x[1]
-        arg[0,1,0,0]=(-1.52439734042)*x[0]+(0.981913225695)*x[1]
-        arg[0,1,0,1]=(-1.19963597544)*x[0]+(1.1571861154)*x[1]
-        arg[0,1,1,0]=(0.822934040682)*x[0]+(-1.75039812758)*x[1]
-        arg[0,1,1,1]=(-0.690374545295)*x[0]+(1.10465673793)*x[1]
-        arg[0,1,2,0]=(-0.222743457309)*x[0]+(-0.499809039611)*x[1]
-        arg[0,1,2,1]=(0.774614333867)*x[0]+(-0.140097281276)*x[1]
-        arg[0,2,0,0]=(0.92399157301)*x[0]+(-1.53184881088)*x[1]
-        arg[0,2,0,1]=(0.14612723475)*x[0]+(0.892066346169)*x[1]
-        arg[0,2,1,0]=(-0.136826339137)*x[0]+(0.0588253058296)*x[1]
-        arg[0,2,1,1]=(-0.73687808603)*x[0]+(0.763659413232)*x[1]
-        arg[0,2,2,0]=(0.669031805455)*x[0]+(0.452748434512)*x[1]
-        arg[0,2,2,1]=(0.969822865927)*x[0]+(0.84449053089)*x[1]
-        arg[0,3,0,0]=(1.05482233425)*x[0]+(0.592437824455)*x[1]
-        arg[0,3,0,1]=(0.632482870556)*x[0]+(0.272691402585)*x[1]
-        arg[0,3,1,0]=(-0.530755710624)*x[0]+(0.798233454742)*x[1]
-        arg[0,3,1,1]=(-0.326644901487)*x[0]+(0.912945575753)*x[1]
-        arg[0,3,2,0]=(0.313672017285)*x[0]+(0.948624232644)*x[1]
-        arg[0,3,2,1]=(-0.985713086674)*x[0]+(0.557682757171)*x[1]
-        arg[0,4,0,0]=(-1.05604811856)*x[0]+(0.953109137724)*x[1]
-        arg[0,4,0,1]=(0.443301072651)*x[0]+(0.063796068208)*x[1]
-        arg[0,4,1,0]=(-0.0166520333953)*x[0]+(0.808947969176)*x[1]
-        arg[0,4,1,1]=(0.447406784488)*x[0]+(0.511727243983)*x[1]
-        arg[0,4,2,0]=(0.966474340588)*x[0]+(0.789208895767)*x[1]
-        arg[0,4,2,1]=(0.5007322363)*x[0]+(0.1211006989)*x[1]
-        arg[1,0,0,0]=(0.328606613916)*x[0]+(-0.874029860851)*x[1]
-        arg[1,0,0,1]=(-0.906174034813)*x[0]+(-0.705820652424)*x[1]
-        arg[1,0,1,0]=(-0.543917624184)*x[0]+(-0.963384956871)*x[1]
-        arg[1,0,1,1]=(-0.516192972362)*x[0]+(0.644782734001)*x[1]
-        arg[1,0,2,0]=(-1.39622140542)*x[0]+(0.292606264905)*x[1]
-        arg[1,0,2,1]=(1.39306984816)*x[0]+(-0.544853887253)*x[1]
-        arg[1,1,0,0]=(-0.0499160669149)*x[0]+(-0.783142164006)*x[1]
-        arg[1,1,0,1]=(0.968157339631)*x[0]+(-1.68767943891)*x[1]
-        arg[1,1,1,0]=(-1.56616531333)*x[0]+(1.057002431)*x[1]
-        arg[1,1,1,1]=(0.759774810848)*x[0]+(-0.217500595483)*x[1]
-        arg[1,1,2,0]=(-0.558666811623)*x[0]+(-0.56110405702)*x[1]
-        arg[1,1,2,1]=(-1.51823291284)*x[0]+(0.968598028275)*x[1]
-        arg[1,2,0,0]=(0.459934430553)*x[0]+(-0.425611928234)*x[1]
-        arg[1,2,0,1]=(0.497077152958)*x[0]+(-0.217468584657)*x[1]
-        arg[1,2,1,0]=(-0.84050521972)*x[0]+(-0.639967173826)*x[1]
-        arg[1,2,1,1]=(1.23982979981)*x[0]+(-0.340962636339)*x[1]
-        arg[1,2,2,0]=(-0.0796290414672)*x[0]+(-0.418766465742)*x[1]
-        arg[1,2,2,1]=(-0.00357466869904)*x[0]+(0.38318423828)*x[1]
-        arg[1,3,0,0]=(-1.06978632139)*x[0]+(-0.293480140024)*x[1]
-        arg[1,3,0,1]=(0.315898405933)*x[0]+(-0.63338147672)*x[1]
-        arg[1,3,1,0]=(-0.570294815011)*x[0]+(0.0492498556666)*x[1]
-        arg[1,3,1,1]=(0.0535633163606)*x[0]+(1.03597167921)*x[1]
-        arg[1,3,2,0]=(0.740363487843)*x[0]+(-0.945398692608)*x[1]
-        arg[1,3,2,1]=(0.0118916598378)*x[0]+(1.13783979963)*x[1]
-        arg[1,4,0,0]=(-0.90818285841)*x[0]+(0.0630620135139)*x[1]
-        arg[1,4,0,1]=(1.28854967547)*x[0]+(0.564058166595)*x[1]
-        arg[1,4,1,0]=(0.0536837223463)*x[0]+(-0.754361313431)*x[1]
-        arg[1,4,1,1]=(-1.4274155179)*x[0]+(-0.0330452395142)*x[1]
-        arg[1,4,2,0]=(-0.0853100557203)*x[0]+(-0.0698244726734)*x[1]
-        arg[1,4,2,1]=(-0.969990013612)*x[0]+(-0.0928692035314)*x[1]
-        arg[2,0,0,0]=(1.402108752)*x[0]+(-0.0601730744903)*x[1]
-        arg[2,0,0,1]=(-0.544125618042)*x[0]+(1.02669845397)*x[1]
-        arg[2,0,1,0]=(-0.259299705101)*x[0]+(-0.449507095724)*x[1]
-        arg[2,0,1,1]=(0.572470083182)*x[0]+(-0.140083185208)*x[1]
-        arg[2,0,2,0]=(1.7708938802)*x[0]+(-0.0924975206473)*x[1]
-        arg[2,0,2,1]=(-0.262417029616)*x[0]+(-0.169562773872)*x[1]
-        arg[2,1,0,0]=(-1.30668657807)*x[0]+(-1.01393009909)*x[1]
-        arg[2,1,0,1]=(0.799588711881)*x[0]+(-1.17126698679)*x[1]
-        arg[2,1,1,0]=(-1.17423919188)*x[0]+(0.321090068168)*x[1]
-        arg[2,1,1,1]=(-0.778912666585)*x[0]+(0.00447436139975)*x[1]
-        arg[2,1,2,0]=(0.40622401744)*x[0]+(0.61089755242)*x[1]
-        arg[2,1,2,1]=(0.550326994175)*x[0]+(1.61303737224)*x[1]
-        arg[2,2,0,0]=(0.931647812671)*x[0]+(-0.93554163705)*x[1]
-        arg[2,2,0,1]=(0.281543117633)*x[0]+(-0.520873020458)*x[1]
-        arg[2,2,1,0]=(1.46731959732)*x[0]+(0.518798296946)*x[1]
-        arg[2,2,1,1]=(-1.18123650343)*x[0]+(-0.145310254643)*x[1]
-        arg[2,2,2,0]=(-0.560745819237)*x[0]+(-1.47844975303)*x[1]
-        arg[2,2,2,1]=(-1.11775616574)*x[0]+(-1.21514252434)*x[1]
-        arg[2,3,0,0]=(0.315369902788)*x[0]+(0.964595236889)*x[1]
-        arg[2,3,0,1]=(-0.907229008161)*x[0]+(1.20677953168)*x[1]
-        arg[2,3,1,0]=(0.0552545457484)*x[0]+(-0.202468129673)*x[1]
-        arg[2,3,1,1]=(-0.832968133648)*x[0]+(0.798887606761)*x[1]
-        arg[2,3,2,0]=(1.0330803155)*x[0]+(0.546834262777)*x[1]
-        arg[2,3,2,1]=(-1.78895672921)*x[0]+(-1.43034307109)*x[1]
-        arg[2,4,0,0]=(0.333456542345)*x[0]+(0.620879982969)*x[1]
-        arg[2,4,0,1]=(-0.141328336229)*x[0]+(-0.568586127044)*x[1]
-        arg[2,4,1,0]=(0.936638826549)*x[0]+(0.262046172423)*x[1]
-        arg[2,4,1,1]=(0.594781145732)*x[0]+(-0.795944581484)*x[1]
-        arg[2,4,2,0]=(-0.0594467711107)*x[0]+(1.65280673317)*x[1]
-        arg[2,4,2,1]=(-0.295492856013)*x[0]+(0.244222123606)*x[1]
-        arg[3,0,0,0]=(0.907207795877)*x[0]+(0.0238682693857)*x[1]
-        arg[3,0,0,1]=(0.767877824626)*x[0]+(0.781729746211)*x[1]
-        arg[3,0,1,0]=(-0.266760960719)*x[0]+(0.109690121766)*x[1]
-        arg[3,0,1,1]=(0.885111787835)*x[0]+(1.83341408518)*x[1]
-        arg[3,0,2,0]=(0.482836215622)*x[0]+(0.202385773036)*x[1]
-        arg[3,0,2,1]=(-0.722931824523)*x[0]+(0.469906208805)*x[1]
-        arg[3,1,0,0]=(0.34246223362)*x[0]+(0.652551099051)*x[1]
-        arg[3,1,0,1]=(-1.24987233614)*x[0]+(-0.208386614512)*x[1]
-        arg[3,1,1,0]=(-0.426021351048)*x[0]+(-0.481440089744)*x[1]
-        arg[3,1,1,1]=(0.402917477117)*x[0]+(0.280066256773)*x[1]
-        arg[3,1,2,0]=(0.846917449307)*x[0]+(-0.890613362071)*x[1]
-        arg[3,1,2,1]=(0.848971364583)*x[0]+(1.28188639634)*x[1]
-        arg[3,2,0,0]=(0.244851870449)*x[0]+(-1.29335472533)*x[1]
-        arg[3,2,0,1]=(-0.679420773687)*x[0]+(0.0533049166584)*x[1]
-        arg[3,2,1,0]=(0.209683196995)*x[0]+(-1.18725405512)*x[1]
-        arg[3,2,1,1]=(1.14374677567)*x[0]+(-0.0360927695675)*x[1]
-        arg[3,2,2,0]=(-0.675139110144)*x[0]+(0.203993983732)*x[1]
-        arg[3,2,2,1]=(-0.237314875828)*x[0]+(-0.581326039718)*x[1]
-        arg[3,3,0,0]=(-0.429825943466)*x[0]+(-0.256971982048)*x[1]
-        arg[3,3,0,1]=(0.520863156649)*x[0]+(-0.149770317657)*x[1]
-        arg[3,3,1,0]=(0.534493615852)*x[0]+(-0.486279758704)*x[1]
-        arg[3,3,1,1]=(1.40465616102)*x[0]+(-0.131521707731)*x[1]
-        arg[3,3,2,0]=(0.171604624229)*x[0]+(0.810160978932)*x[1]
-        arg[3,3,2,1]=(1.28980934106)*x[0]+(-1.0563749584)*x[1]
-        arg[3,4,0,0]=(-0.631680784482)*x[0]+(-1.10885428097)*x[1]
-        arg[3,4,0,1]=(-1.02297901709)*x[0]+(1.30007360034)*x[1]
-        arg[3,4,1,0]=(0.728467970192)*x[0]+(-0.872220126316)*x[1]
-        arg[3,4,1,1]=(1.18596842635)*x[0]+(-0.246158517864)*x[1]
-        arg[3,4,2,0]=(0.158818463065)*x[0]+(-0.687328798914)*x[1]
-        arg[3,4,2,1]=(-0.267029459109)*x[0]+(0.161790218602)*x[1]
-        ref[0,0,0,0]=(0.748732264044)*x_ref[0]+(0.326649183672)*x_ref[1]
-        ref[0,0,0,1]=(-0.118874184707)*x_ref[0]+(0.512027378857)*x_ref[1]
-        ref[0,0,1,0]=(0.0907534655112)*x_ref[0]+(0.145249508199)*x_ref[1]
-        ref[0,0,1,1]=(0.879689742122)*x_ref[0]+(-0.238488796672)*x_ref[1]
-        ref[0,0,2,0]=(-0.285226080478)*x_ref[0]+(-0.560477167124)*x_ref[1]
-        ref[0,0,2,1]=(1.3620160918)*x_ref[0]+(-0.97877396699)*x_ref[1]
-        ref[0,1,0,0]=(-1.52439734042)*x_ref[0]+(0.981913225695)*x_ref[1]
-        ref[0,1,0,1]=(-1.19963597544)*x_ref[0]+(1.1571861154)*x_ref[1]
-        ref[0,1,1,0]=(0.822934040682)*x_ref[0]+(-1.75039812758)*x_ref[1]
-        ref[0,1,1,1]=(-0.690374545295)*x_ref[0]+(1.10465673793)*x_ref[1]
-        ref[0,1,2,0]=(-0.222743457309)*x_ref[0]+(-0.499809039611)*x_ref[1]
-        ref[0,1,2,1]=(0.774614333867)*x_ref[0]+(-0.140097281276)*x_ref[1]
-        ref[0,2,0,0]=(0.92399157301)*x_ref[0]+(-1.53184881088)*x_ref[1]
-        ref[0,2,0,1]=(0.14612723475)*x_ref[0]+(0.892066346169)*x_ref[1]
-        ref[0,2,1,0]=(-0.136826339137)*x_ref[0]+(0.0588253058296)*x_ref[1]
-        ref[0,2,1,1]=(-0.73687808603)*x_ref[0]+(0.763659413232)*x_ref[1]
-        ref[0,2,2,0]=(0.669031805455)*x_ref[0]+(0.452748434512)*x_ref[1]
-        ref[0,2,2,1]=(0.969822865927)*x_ref[0]+(0.84449053089)*x_ref[1]
-        ref[0,3,0,0]=(1.05482233425)*x_ref[0]+(0.592437824455)*x_ref[1]
-        ref[0,3,0,1]=(0.632482870556)*x_ref[0]+(0.272691402585)*x_ref[1]
-        ref[0,3,1,0]=(-0.530755710624)*x_ref[0]+(0.798233454742)*x_ref[1]
-        ref[0,3,1,1]=(-0.326644901487)*x_ref[0]+(0.912945575753)*x_ref[1]
-        ref[0,3,2,0]=(0.313672017285)*x_ref[0]+(0.948624232644)*x_ref[1]
-        ref[0,3,2,1]=(-0.985713086674)*x_ref[0]+(0.557682757171)*x_ref[1]
-        ref[0,4,0,0]=(-1.05604811856)*x_ref[0]+(0.953109137724)*x_ref[1]
-        ref[0,4,0,1]=(0.443301072651)*x_ref[0]+(0.063796068208)*x_ref[1]
-        ref[0,4,1,0]=(-0.0166520333953)*x_ref[0]+(0.808947969176)*x_ref[1]
-        ref[0,4,1,1]=(0.447406784488)*x_ref[0]+(0.511727243983)*x_ref[1]
-        ref[0,4,2,0]=(0.966474340588)*x_ref[0]+(0.789208895767)*x_ref[1]
-        ref[0,4,2,1]=(0.5007322363)*x_ref[0]+(0.1211006989)*x_ref[1]
-        ref[1,0,0,0]=(0.328606613916)*x_ref[0]+(-0.874029860851)*x_ref[1]
-        ref[1,0,0,1]=(-0.906174034813)*x_ref[0]+(-0.705820652424)*x_ref[1]
-        ref[1,0,1,0]=(-0.543917624184)*x_ref[0]+(-0.963384956871)*x_ref[1]
-        ref[1,0,1,1]=(-0.516192972362)*x_ref[0]+(0.644782734001)*x_ref[1]
-        ref[1,0,2,0]=(-1.39622140542)*x_ref[0]+(0.292606264905)*x_ref[1]
-        ref[1,0,2,1]=(1.39306984816)*x_ref[0]+(-0.544853887253)*x_ref[1]
-        ref[1,1,0,0]=(-0.0499160669149)*x_ref[0]+(-0.783142164006)*x_ref[1]
-        ref[1,1,0,1]=(0.968157339631)*x_ref[0]+(-1.68767943891)*x_ref[1]
-        ref[1,1,1,0]=(-1.56616531333)*x_ref[0]+(1.057002431)*x_ref[1]
-        ref[1,1,1,1]=(0.759774810848)*x_ref[0]+(-0.217500595483)*x_ref[1]
-        ref[1,1,2,0]=(-0.558666811623)*x_ref[0]+(-0.56110405702)*x_ref[1]
-        ref[1,1,2,1]=(-1.51823291284)*x_ref[0]+(0.968598028275)*x_ref[1]
-        ref[1,2,0,0]=(0.459934430553)*x_ref[0]+(-0.425611928234)*x_ref[1]
-        ref[1,2,0,1]=(0.497077152958)*x_ref[0]+(-0.217468584657)*x_ref[1]
-        ref[1,2,1,0]=(-0.84050521972)*x_ref[0]+(-0.639967173826)*x_ref[1]
-        ref[1,2,1,1]=(1.23982979981)*x_ref[0]+(-0.340962636339)*x_ref[1]
-        ref[1,2,2,0]=(-0.0796290414672)*x_ref[0]+(-0.418766465742)*x_ref[1]
-        ref[1,2,2,1]=(-0.00357466869904)*x_ref[0]+(0.38318423828)*x_ref[1]
-        ref[1,3,0,0]=(-1.06978632139)*x_ref[0]+(-0.293480140024)*x_ref[1]
-        ref[1,3,0,1]=(0.315898405933)*x_ref[0]+(-0.63338147672)*x_ref[1]
-        ref[1,3,1,0]=(-0.570294815011)*x_ref[0]+(0.0492498556666)*x_ref[1]
-        ref[1,3,1,1]=(0.0535633163606)*x_ref[0]+(1.03597167921)*x_ref[1]
-        ref[1,3,2,0]=(0.740363487843)*x_ref[0]+(-0.945398692608)*x_ref[1]
-        ref[1,3,2,1]=(0.0118916598378)*x_ref[0]+(1.13783979963)*x_ref[1]
-        ref[1,4,0,0]=(-0.90818285841)*x_ref[0]+(0.0630620135139)*x_ref[1]
-        ref[1,4,0,1]=(1.28854967547)*x_ref[0]+(0.564058166595)*x_ref[1]
-        ref[1,4,1,0]=(0.0536837223463)*x_ref[0]+(-0.754361313431)*x_ref[1]
-        ref[1,4,1,1]=(-1.4274155179)*x_ref[0]+(-0.0330452395142)*x_ref[1]
-        ref[1,4,2,0]=(-0.0853100557203)*x_ref[0]+(-0.0698244726734)*x_ref[1]
-        ref[1,4,2,1]=(-0.969990013612)*x_ref[0]+(-0.0928692035314)*x_ref[1]
-        ref[2,0,0,0]=(1.402108752)*x_ref[0]+(-0.0601730744903)*x_ref[1]
-        ref[2,0,0,1]=(-0.544125618042)*x_ref[0]+(1.02669845397)*x_ref[1]
-        ref[2,0,1,0]=(-0.259299705101)*x_ref[0]+(-0.449507095724)*x_ref[1]
-        ref[2,0,1,1]=(0.572470083182)*x_ref[0]+(-0.140083185208)*x_ref[1]
-        ref[2,0,2,0]=(1.7708938802)*x_ref[0]+(-0.0924975206473)*x_ref[1]
-        ref[2,0,2,1]=(-0.262417029616)*x_ref[0]+(-0.169562773872)*x_ref[1]
-        ref[2,1,0,0]=(-1.30668657807)*x_ref[0]+(-1.01393009909)*x_ref[1]
-        ref[2,1,0,1]=(0.799588711881)*x_ref[0]+(-1.17126698679)*x_ref[1]
-        ref[2,1,1,0]=(-1.17423919188)*x_ref[0]+(0.321090068168)*x_ref[1]
-        ref[2,1,1,1]=(-0.778912666585)*x_ref[0]+(0.00447436139975)*x_ref[1]
-        ref[2,1,2,0]=(0.40622401744)*x_ref[0]+(0.61089755242)*x_ref[1]
-        ref[2,1,2,1]=(0.550326994175)*x_ref[0]+(1.61303737224)*x_ref[1]
-        ref[2,2,0,0]=(0.931647812671)*x_ref[0]+(-0.93554163705)*x_ref[1]
-        ref[2,2,0,1]=(0.281543117633)*x_ref[0]+(-0.520873020458)*x_ref[1]
-        ref[2,2,1,0]=(1.46731959732)*x_ref[0]+(0.518798296946)*x_ref[1]
-        ref[2,2,1,1]=(-1.18123650343)*x_ref[0]+(-0.145310254643)*x_ref[1]
-        ref[2,2,2,0]=(-0.560745819237)*x_ref[0]+(-1.47844975303)*x_ref[1]
-        ref[2,2,2,1]=(-1.11775616574)*x_ref[0]+(-1.21514252434)*x_ref[1]
-        ref[2,3,0,0]=(0.315369902788)*x_ref[0]+(0.964595236889)*x_ref[1]
-        ref[2,3,0,1]=(-0.907229008161)*x_ref[0]+(1.20677953168)*x_ref[1]
-        ref[2,3,1,0]=(0.0552545457484)*x_ref[0]+(-0.202468129673)*x_ref[1]
-        ref[2,3,1,1]=(-0.832968133648)*x_ref[0]+(0.798887606761)*x_ref[1]
-        ref[2,3,2,0]=(1.0330803155)*x_ref[0]+(0.546834262777)*x_ref[1]
-        ref[2,3,2,1]=(-1.78895672921)*x_ref[0]+(-1.43034307109)*x_ref[1]
-        ref[2,4,0,0]=(0.333456542345)*x_ref[0]+(0.620879982969)*x_ref[1]
-        ref[2,4,0,1]=(-0.141328336229)*x_ref[0]+(-0.568586127044)*x_ref[1]
-        ref[2,4,1,0]=(0.936638826549)*x_ref[0]+(0.262046172423)*x_ref[1]
-        ref[2,4,1,1]=(0.594781145732)*x_ref[0]+(-0.795944581484)*x_ref[1]
-        ref[2,4,2,0]=(-0.0594467711107)*x_ref[0]+(1.65280673317)*x_ref[1]
-        ref[2,4,2,1]=(-0.295492856013)*x_ref[0]+(0.244222123606)*x_ref[1]
-        ref[3,0,0,0]=(0.907207795877)*x_ref[0]+(0.0238682693857)*x_ref[1]
-        ref[3,0,0,1]=(0.767877824626)*x_ref[0]+(0.781729746211)*x_ref[1]
-        ref[3,0,1,0]=(-0.266760960719)*x_ref[0]+(0.109690121766)*x_ref[1]
-        ref[3,0,1,1]=(0.885111787835)*x_ref[0]+(1.83341408518)*x_ref[1]
-        ref[3,0,2,0]=(0.482836215622)*x_ref[0]+(0.202385773036)*x_ref[1]
-        ref[3,0,2,1]=(-0.722931824523)*x_ref[0]+(0.469906208805)*x_ref[1]
-        ref[3,1,0,0]=(0.34246223362)*x_ref[0]+(0.652551099051)*x_ref[1]
-        ref[3,1,0,1]=(-1.24987233614)*x_ref[0]+(-0.208386614512)*x_ref[1]
-        ref[3,1,1,0]=(-0.426021351048)*x_ref[0]+(-0.481440089744)*x_ref[1]
-        ref[3,1,1,1]=(0.402917477117)*x_ref[0]+(0.280066256773)*x_ref[1]
-        ref[3,1,2,0]=(0.846917449307)*x_ref[0]+(-0.890613362071)*x_ref[1]
-        ref[3,1,2,1]=(0.848971364583)*x_ref[0]+(1.28188639634)*x_ref[1]
-        ref[3,2,0,0]=(0.244851870449)*x_ref[0]+(-1.29335472533)*x_ref[1]
-        ref[3,2,0,1]=(-0.679420773687)*x_ref[0]+(0.0533049166584)*x_ref[1]
-        ref[3,2,1,0]=(0.209683196995)*x_ref[0]+(-1.18725405512)*x_ref[1]
-        ref[3,2,1,1]=(1.14374677567)*x_ref[0]+(-0.0360927695675)*x_ref[1]
-        ref[3,2,2,0]=(-0.675139110144)*x_ref[0]+(0.203993983732)*x_ref[1]
-        ref[3,2,2,1]=(-0.237314875828)*x_ref[0]+(-0.581326039718)*x_ref[1]
-        ref[3,3,0,0]=(-0.429825943466)*x_ref[0]+(-0.256971982048)*x_ref[1]
-        ref[3,3,0,1]=(0.520863156649)*x_ref[0]+(-0.149770317657)*x_ref[1]
-        ref[3,3,1,0]=(0.534493615852)*x_ref[0]+(-0.486279758704)*x_ref[1]
-        ref[3,3,1,1]=(1.40465616102)*x_ref[0]+(-0.131521707731)*x_ref[1]
-        ref[3,3,2,0]=(0.171604624229)*x_ref[0]+(0.810160978932)*x_ref[1]
-        ref[3,3,2,1]=(1.28980934106)*x_ref[0]+(-1.0563749584)*x_ref[1]
-        ref[3,4,0,0]=(-0.631680784482)*x_ref[0]+(-1.10885428097)*x_ref[1]
-        ref[3,4,0,1]=(-1.02297901709)*x_ref[0]+(1.30007360034)*x_ref[1]
-        ref[3,4,1,0]=(0.728467970192)*x_ref[0]+(-0.872220126316)*x_ref[1]
-        ref[3,4,1,1]=(1.18596842635)*x_ref[0]+(-0.246158517864)*x_ref[1]
-        ref[3,4,2,0]=(0.158818463065)*x_ref[0]+(-0.687328798914)*x_ref[1]
-        ref[3,4,2,1]=(-0.267029459109)*x_ref[0]+(0.161790218602)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.41028779384)*x[0]+(-1.69085638593)*x[1]+(-0.626478106748)*x[2]
-        arg[0,0,0,1]=(-0.322729407761)*x[0]+(-0.311218478587)*x[1]+(-0.329375635778)*x[2]
-        arg[0,0,1,0]=(-0.16111144722)*x[0]+(0.864377600354)*x[1]+(-1.01349863575)*x[2]
-        arg[0,0,1,1]=(0.0720111273067)*x[0]+(1.40365232221)*x[1]+(0.292610528868)*x[2]
-        arg[0,0,2,0]=(-1.21827641959)*x[0]+(0.168559044212)*x[1]+(0.841389848275)*x[2]
-        arg[0,0,2,1]=(0.631258821218)*x[0]+(-1.22185752256)*x[1]+(0.0213133635991)*x[2]
-        arg[0,1,0,0]=(-0.55959466492)*x[0]+(0.567105256147)*x[1]+(0.185414627961)*x[2]
-        arg[0,1,0,1]=(1.42576865692)*x[0]+(-1.38354595053)*x[1]+(1.08902163491)*x[2]
-        arg[0,1,1,0]=(-0.441288277712)*x[0]+(-0.412579680073)*x[1]+(0.85969923606)*x[2]
-        arg[0,1,1,1]=(1.20924692667)*x[0]+(-0.263790869016)*x[1]+(-0.117388627799)*x[2]
-        arg[0,1,2,0]=(-0.849546239235)*x[0]+(-0.41970601628)*x[1]+(0.712637692553)*x[2]
-        arg[0,1,2,1]=(0.665825646772)*x[0]+(-0.49641548077)*x[1]+(0.0243383084422)*x[2]
-        arg[0,2,0,0]=(0.158298703766)*x[0]+(-1.38559416875)*x[1]+(-0.549526684962)*x[2]
-        arg[0,2,0,1]=(0.290664973202)*x[0]+(-0.725089032773)*x[1]+(-0.420805410829)*x[2]
-        arg[0,2,1,0]=(-0.371388631358)*x[0]+(0.712788591622)*x[1]+(0.708499722908)*x[2]
-        arg[0,2,1,1]=(-0.209234718871)*x[0]+(-0.559384946846)*x[1]+(-0.18126082565)*x[2]
-        arg[0,2,2,0]=(0.295605948328)*x[0]+(0.0787080259554)*x[1]+(-0.413453606631)*x[2]
-        arg[0,2,2,1]=(-0.951652076608)*x[0]+(0.412030442608)*x[1]+(-1.0098591628)*x[2]
-        arg[0,3,0,0]=(0.38805130758)*x[0]+(0.725062113278)*x[1]+(-0.0789722367715)*x[2]
-        arg[0,3,0,1]=(-0.856689544368)*x[0]+(-0.378806165724)*x[1]+(-1.56132477796)*x[2]
-        arg[0,3,1,0]=(0.948414643284)*x[0]+(-0.223099011255)*x[1]+(-0.164540510924)*x[2]
-        arg[0,3,1,1]=(-0.290272025223)*x[0]+(0.0110236571203)*x[1]+(0.0344804634468)*x[2]
-        arg[0,3,2,0]=(-1.06973937948)*x[0]+(-0.19210617162)*x[1]+(-0.0319179806513)*x[2]
-        arg[0,3,2,1]=(0.873398122756)*x[0]+(0.87424619659)*x[1]+(0.130681723853)*x[2]
-        arg[0,4,0,0]=(-0.231238303513)*x[0]+(1.13248606226)*x[1]+(1.08638890671)*x[2]
-        arg[0,4,0,1]=(0.0325659323288)*x[0]+(1.53278397594)*x[1]+(-0.0823455709949)*x[2]
-        arg[0,4,1,0]=(-0.415558245155)*x[0]+(-0.468794623975)*x[1]+(-0.4219946425)*x[2]
-        arg[0,4,1,1]=(0.687857094934)*x[0]+(-0.316748377318)*x[1]+(1.51841645514)*x[2]
-        arg[0,4,2,0]=(-0.842163178579)*x[0]+(-0.459357139258)*x[1]+(-0.774999285967)*x[2]
-        arg[0,4,2,1]=(0.361059525968)*x[0]+(0.302800510186)*x[1]+(0.164988681972)*x[2]
-        arg[1,0,0,0]=(-0.549884089801)*x[0]+(0.18615759395)*x[1]+(-0.150676638905)*x[2]
-        arg[1,0,0,1]=(-0.908800158159)*x[0]+(1.74574577127)*x[1]+(0.347894281217)*x[2]
-        arg[1,0,1,0]=(1.21798491919)*x[0]+(-1.04989223901)*x[1]+(-0.706457284537)*x[2]
-        arg[1,0,1,1]=(0.441083030576)*x[0]+(0.458319482203)*x[1]+(0.704887998977)*x[2]
-        arg[1,0,2,0]=(-0.386479556415)*x[0]+(-1.28347087396)*x[1]+(-0.876058219438)*x[2]
-        arg[1,0,2,1]=(0.743100114846)*x[0]+(1.02919050439)*x[1]+(-0.357203265224)*x[2]
-        arg[1,1,0,0]=(-0.309112244319)*x[0]+(0.469639650979)*x[1]+(0.371325594811)*x[2]
-        arg[1,1,0,1]=(1.53067095144)*x[0]+(1.18235592763)*x[1]+(-0.959436428335)*x[2]
-        arg[1,1,1,0]=(0.291735282406)*x[0]+(0.449515270669)*x[1]+(0.612383052683)*x[2]
-        arg[1,1,1,1]=(-0.102313390769)*x[0]+(1.25745082506)*x[1]+(-1.03742917135)*x[2]
-        arg[1,1,2,0]=(-0.951576197839)*x[0]+(1.03094297086)*x[1]+(-0.10195348802)*x[2]
-        arg[1,1,2,1]=(1.54751905175)*x[0]+(1.47958820289)*x[1]+(-0.357466311206)*x[2]
-        arg[1,2,0,0]=(-0.452360614767)*x[0]+(-0.865741367113)*x[1]+(1.12034992845)*x[2]
-        arg[1,2,0,1]=(0.00940323370511)*x[0]+(-1.03701972012)*x[1]+(0.0102243182131)*x[2]
-        arg[1,2,1,0]=(-1.50670950911)*x[0]+(-0.219993644831)*x[1]+(-0.1612757943)*x[2]
-        arg[1,2,1,1]=(-0.792871502871)*x[0]+(-0.0163752900095)*x[1]+(1.54206281352)*x[2]
-        arg[1,2,2,0]=(1.02928968974)*x[0]+(-0.171516999194)*x[1]+(-0.446145675054)*x[2]
-        arg[1,2,2,1]=(-1.51230609746)*x[0]+(0.2034193081)*x[1]+(-0.291776924482)*x[2]
-        arg[1,3,0,0]=(-0.0312379262641)*x[0]+(0.722239260943)*x[1]+(-0.279504141505)*x[2]
-        arg[1,3,0,1]=(-1.12038082645)*x[0]+(-0.328148046828)*x[1]+(0.825288681731)*x[2]
-        arg[1,3,1,0]=(0.547173116241)*x[0]+(0.136609628569)*x[1]+(-0.476006212278)*x[2]
-        arg[1,3,1,1]=(0.000854188874487)*x[0]+(0.473989971126)*x[1]+(1.58153857042)*x[2]
-        arg[1,3,2,0]=(-0.746628247481)*x[0]+(0.859384716891)*x[1]+(0.618348305951)*x[2]
-        arg[1,3,2,1]=(0.919601890657)*x[0]+(0.422457734769)*x[1]+(-1.11235109226)*x[2]
-        arg[1,4,0,0]=(0.962587287633)*x[0]+(-1.2526632022)*x[1]+(0.210254126936)*x[2]
-        arg[1,4,0,1]=(-0.330257182624)*x[0]+(-0.251562095795)*x[1]+(1.29427728094)*x[2]
-        arg[1,4,1,0]=(-0.577555922072)*x[0]+(0.844462157498)*x[1]+(-0.120809700805)*x[2]
-        arg[1,4,1,1]=(-0.91963436975)*x[0]+(-0.415146584044)*x[1]+(-0.105600826517)*x[2]
-        arg[1,4,2,0]=(-1.28940482584)*x[0]+(-1.55548284063)*x[1]+(-0.835108666511)*x[2]
-        arg[1,4,2,1]=(-0.0299379665752)*x[0]+(-0.992000458707)*x[1]+(-0.469600133762)*x[2]
-        arg[2,0,0,0]=(0.0107575962552)*x[0]+(-1.06407817799)*x[1]+(-1.84217380223)*x[2]
-        arg[2,0,0,1]=(-0.0596138757136)*x[0]+(1.75177421542)*x[1]+(0.131511355216)*x[2]
-        arg[2,0,1,0]=(-0.29485191211)*x[0]+(1.55396303732)*x[1]+(0.137822438484)*x[2]
-        arg[2,0,1,1]=(0.968093798582)*x[0]+(-0.348515863297)*x[1]+(-0.885253223355)*x[2]
-        arg[2,0,2,0]=(0.304703601471)*x[0]+(0.350016020435)*x[1]+(0.0348615188696)*x[2]
-        arg[2,0,2,1]=(0.242706426227)*x[0]+(0.00660859017533)*x[1]+(-0.122732284886)*x[2]
-        arg[2,1,0,0]=(0.540596184477)*x[0]+(-0.0272014403068)*x[1]+(0.559631760626)*x[2]
-        arg[2,1,0,1]=(0.537160103765)*x[0]+(-0.974891403717)*x[1]+(-1.2571032682)*x[2]
-        arg[2,1,1,0]=(-0.134244705433)*x[0]+(1.63419015928)*x[1]+(0.0879689992598)*x[2]
-        arg[2,1,1,1]=(0.885004305439)*x[0]+(1.63473219215)*x[1]+(-0.714475475618)*x[2]
-        arg[2,1,2,0]=(-0.220742006931)*x[0]+(0.298113077571)*x[1]+(0.129338822854)*x[2]
-        arg[2,1,2,1]=(0.0696132558998)*x[0]+(1.28044127087)*x[1]+(-0.182025504014)*x[2]
-        arg[2,2,0,0]=(-0.108760249345)*x[0]+(-0.727726654762)*x[1]+(1.1810583418)*x[2]
-        arg[2,2,0,1]=(1.69464976816)*x[0]+(0.771779692301)*x[1]+(-0.746303209271)*x[2]
-        arg[2,2,1,0]=(1.6897653643)*x[0]+(-1.21078732523)*x[1]+(-0.000978666646647)*x[2]
-        arg[2,2,1,1]=(1.60773073603)*x[0]+(-0.583968900051)*x[1]+(-0.0511730994465)*x[2]
-        arg[2,2,2,0]=(0.506948201854)*x[0]+(-0.00990858555453)*x[1]+(1.06433022033)*x[2]
-        arg[2,2,2,1]=(0.449523090508)*x[0]+(-1.61710851818)*x[1]+(0.440720932423)*x[2]
-        arg[2,3,0,0]=(0.0167109660325)*x[0]+(-1.08812386645)*x[1]+(-1.22089632364)*x[2]
-        arg[2,3,0,1]=(-0.841668282066)*x[0]+(0.636645352356)*x[1]+(-0.537753623856)*x[2]
-        arg[2,3,1,0]=(1.79552636749)*x[0]+(0.481662215698)*x[1]+(-0.371782307951)*x[2]
-        arg[2,3,1,1]=(-0.747945987059)*x[0]+(0.818378132535)*x[1]+(1.66032057212)*x[2]
-        arg[2,3,2,0]=(-0.126253738036)*x[0]+(-0.681619876818)*x[1]+(0.117269467345)*x[2]
-        arg[2,3,2,1]=(-0.338521414346)*x[0]+(0.381458529772)*x[1]+(1.00819568542)*x[2]
-        arg[2,4,0,0]=(0.0110334310038)*x[0]+(0.229750132795)*x[1]+(-0.900772274961)*x[2]
-        arg[2,4,0,1]=(-0.798344038508)*x[0]+(0.0410740025116)*x[1]+(1.46856652632)*x[2]
-        arg[2,4,1,0]=(0.193355735165)*x[0]+(-0.539307787984)*x[1]+(-0.375854987378)*x[2]
-        arg[2,4,1,1]=(0.568143022174)*x[0]+(-1.61770216281)*x[1]+(0.208204629987)*x[2]
-        arg[2,4,2,0]=(1.37290817619)*x[0]+(-0.174324684678)*x[1]+(-0.217538755825)*x[2]
-        arg[2,4,2,1]=(-0.483601819019)*x[0]+(1.45019519818)*x[1]+(-0.623519730492)*x[2]
-        arg[3,0,0,0]=(-0.793731389518)*x[0]+(-0.154763125819)*x[1]+(1.10863435441)*x[2]
-        arg[3,0,0,1]=(0.507036346178)*x[0]+(-0.309380836403)*x[1]+(-0.418720111636)*x[2]
-        arg[3,0,1,0]=(-0.777608365831)*x[0]+(0.982848447238)*x[1]+(-0.762479658423)*x[2]
-        arg[3,0,1,1]=(-0.73325130954)*x[0]+(-0.253614119609)*x[1]+(-0.366314075481)*x[2]
-        arg[3,0,2,0]=(0.0989317940836)*x[0]+(0.0772067160489)*x[1]+(-1.84682997853)*x[2]
-        arg[3,0,2,1]=(0.256206660712)*x[0]+(1.2868655538)*x[1]+(-0.522346638322)*x[2]
-        arg[3,1,0,0]=(-1.41604178327)*x[0]+(0.662242482319)*x[1]+(1.7526698965)*x[2]
-        arg[3,1,0,1]=(-0.442315980785)*x[0]+(0.423309436413)*x[1]+(0.175362864372)*x[2]
-        arg[3,1,1,0]=(0.353602081392)*x[0]+(1.55530884146)*x[1]+(-0.115267400964)*x[2]
-        arg[3,1,1,1]=(0.1445651493)*x[0]+(0.652413545545)*x[1]+(-1.47341714223)*x[2]
-        arg[3,1,2,0]=(0.288044123145)*x[0]+(1.45339107563)*x[1]+(0.0253961147274)*x[2]
-        arg[3,1,2,1]=(0.738725097174)*x[0]+(0.556287291563)*x[1]+(0.685592801206)*x[2]
-        arg[3,2,0,0]=(-1.6952458849)*x[0]+(-0.450982750203)*x[1]+(-0.176030737746)*x[2]
-        arg[3,2,0,1]=(-0.267377959403)*x[0]+(-0.329354216237)*x[1]+(0.368496833805)*x[2]
-        arg[3,2,1,0]=(1.00419353409)*x[0]+(1.50507467849)*x[1]+(-0.529113363067)*x[2]
-        arg[3,2,1,1]=(-1.69175338104)*x[0]+(-0.101436360248)*x[1]+(0.963918243087)*x[2]
-        arg[3,2,2,0]=(0.093465616883)*x[0]+(-0.390155190153)*x[1]+(-0.354824565592)*x[2]
-        arg[3,2,2,1]=(-0.414577385531)*x[0]+(-0.665726090904)*x[1]+(-1.39857731593)*x[2]
-        arg[3,3,0,0]=(-0.528594178602)*x[0]+(-0.435472295413)*x[1]+(0.397972761993)*x[2]
-        arg[3,3,0,1]=(1.24885378376)*x[0]+(1.63537745582)*x[1]+(-0.00703582234262)*x[2]
-        arg[3,3,1,0]=(0.63369530476)*x[0]+(0.296615915965)*x[1]+(0.593277434193)*x[2]
-        arg[3,3,1,1]=(-0.197615624091)*x[0]+(1.45678045242)*x[1]+(0.571039120854)*x[2]
-        arg[3,3,2,0]=(-1.01304527292)*x[0]+(0.00892977300805)*x[1]+(0.284285861002)*x[2]
-        arg[3,3,2,1]=(0.647872454128)*x[0]+(-0.373279273659)*x[1]+(1.27785668874)*x[2]
-        arg[3,4,0,0]=(0.708994891373)*x[0]+(-0.439675903635)*x[1]+(0.612884939946)*x[2]
-        arg[3,4,0,1]=(0.535549893212)*x[0]+(-0.940830832131)*x[1]+(-0.30796510692)*x[2]
-        arg[3,4,1,0]=(-1.24560696134)*x[0]+(0.125328014324)*x[1]+(0.168757304331)*x[2]
-        arg[3,4,1,1]=(0.604969099581)*x[0]+(0.212563821283)*x[1]+(0.146243255184)*x[2]
-        arg[3,4,2,0]=(-0.0402174498351)*x[0]+(0.967028407195)*x[1]+(-0.991740640214)*x[2]
-        arg[3,4,2,1]=(0.0572331664331)*x[0]+(-0.836713731055)*x[1]+(0.78195371901)*x[2]
-        ref[0,0,0,0]=(-1.41028779384)*x_ref[0]+(-1.69085638593)*x_ref[1]+(-0.626478106748)*x_ref[2]
-        ref[0,0,0,1]=(-0.322729407761)*x_ref[0]+(-0.311218478587)*x_ref[1]+(-0.329375635778)*x_ref[2]
-        ref[0,0,1,0]=(-0.16111144722)*x_ref[0]+(0.864377600354)*x_ref[1]+(-1.01349863575)*x_ref[2]
-        ref[0,0,1,1]=(0.0720111273067)*x_ref[0]+(1.40365232221)*x_ref[1]+(0.292610528868)*x_ref[2]
-        ref[0,0,2,0]=(-1.21827641959)*x_ref[0]+(0.168559044212)*x_ref[1]+(0.841389848275)*x_ref[2]
-        ref[0,0,2,1]=(0.631258821218)*x_ref[0]+(-1.22185752256)*x_ref[1]+(0.0213133635991)*x_ref[2]
-        ref[0,1,0,0]=(-0.55959466492)*x_ref[0]+(0.567105256147)*x_ref[1]+(0.185414627961)*x_ref[2]
-        ref[0,1,0,1]=(1.42576865692)*x_ref[0]+(-1.38354595053)*x_ref[1]+(1.08902163491)*x_ref[2]
-        ref[0,1,1,0]=(-0.441288277712)*x_ref[0]+(-0.412579680073)*x_ref[1]+(0.85969923606)*x_ref[2]
-        ref[0,1,1,1]=(1.20924692667)*x_ref[0]+(-0.263790869016)*x_ref[1]+(-0.117388627799)*x_ref[2]
-        ref[0,1,2,0]=(-0.849546239235)*x_ref[0]+(-0.41970601628)*x_ref[1]+(0.712637692553)*x_ref[2]
-        ref[0,1,2,1]=(0.665825646772)*x_ref[0]+(-0.49641548077)*x_ref[1]+(0.0243383084422)*x_ref[2]
-        ref[0,2,0,0]=(0.158298703766)*x_ref[0]+(-1.38559416875)*x_ref[1]+(-0.549526684962)*x_ref[2]
-        ref[0,2,0,1]=(0.290664973202)*x_ref[0]+(-0.725089032773)*x_ref[1]+(-0.420805410829)*x_ref[2]
-        ref[0,2,1,0]=(-0.371388631358)*x_ref[0]+(0.712788591622)*x_ref[1]+(0.708499722908)*x_ref[2]
-        ref[0,2,1,1]=(-0.209234718871)*x_ref[0]+(-0.559384946846)*x_ref[1]+(-0.18126082565)*x_ref[2]
-        ref[0,2,2,0]=(0.295605948328)*x_ref[0]+(0.0787080259554)*x_ref[1]+(-0.413453606631)*x_ref[2]
-        ref[0,2,2,1]=(-0.951652076608)*x_ref[0]+(0.412030442608)*x_ref[1]+(-1.0098591628)*x_ref[2]
-        ref[0,3,0,0]=(0.38805130758)*x_ref[0]+(0.725062113278)*x_ref[1]+(-0.0789722367715)*x_ref[2]
-        ref[0,3,0,1]=(-0.856689544368)*x_ref[0]+(-0.378806165724)*x_ref[1]+(-1.56132477796)*x_ref[2]
-        ref[0,3,1,0]=(0.948414643284)*x_ref[0]+(-0.223099011255)*x_ref[1]+(-0.164540510924)*x_ref[2]
-        ref[0,3,1,1]=(-0.290272025223)*x_ref[0]+(0.0110236571203)*x_ref[1]+(0.0344804634468)*x_ref[2]
-        ref[0,3,2,0]=(-1.06973937948)*x_ref[0]+(-0.19210617162)*x_ref[1]+(-0.0319179806513)*x_ref[2]
-        ref[0,3,2,1]=(0.873398122756)*x_ref[0]+(0.87424619659)*x_ref[1]+(0.130681723853)*x_ref[2]
-        ref[0,4,0,0]=(-0.231238303513)*x_ref[0]+(1.13248606226)*x_ref[1]+(1.08638890671)*x_ref[2]
-        ref[0,4,0,1]=(0.0325659323288)*x_ref[0]+(1.53278397594)*x_ref[1]+(-0.0823455709949)*x_ref[2]
-        ref[0,4,1,0]=(-0.415558245155)*x_ref[0]+(-0.468794623975)*x_ref[1]+(-0.4219946425)*x_ref[2]
-        ref[0,4,1,1]=(0.687857094934)*x_ref[0]+(-0.316748377318)*x_ref[1]+(1.51841645514)*x_ref[2]
-        ref[0,4,2,0]=(-0.842163178579)*x_ref[0]+(-0.459357139258)*x_ref[1]+(-0.774999285967)*x_ref[2]
-        ref[0,4,2,1]=(0.361059525968)*x_ref[0]+(0.302800510186)*x_ref[1]+(0.164988681972)*x_ref[2]
-        ref[1,0,0,0]=(-0.549884089801)*x_ref[0]+(0.18615759395)*x_ref[1]+(-0.150676638905)*x_ref[2]
-        ref[1,0,0,1]=(-0.908800158159)*x_ref[0]+(1.74574577127)*x_ref[1]+(0.347894281217)*x_ref[2]
-        ref[1,0,1,0]=(1.21798491919)*x_ref[0]+(-1.04989223901)*x_ref[1]+(-0.706457284537)*x_ref[2]
-        ref[1,0,1,1]=(0.441083030576)*x_ref[0]+(0.458319482203)*x_ref[1]+(0.704887998977)*x_ref[2]
-        ref[1,0,2,0]=(-0.386479556415)*x_ref[0]+(-1.28347087396)*x_ref[1]+(-0.876058219438)*x_ref[2]
-        ref[1,0,2,1]=(0.743100114846)*x_ref[0]+(1.02919050439)*x_ref[1]+(-0.357203265224)*x_ref[2]
-        ref[1,1,0,0]=(-0.309112244319)*x_ref[0]+(0.469639650979)*x_ref[1]+(0.371325594811)*x_ref[2]
-        ref[1,1,0,1]=(1.53067095144)*x_ref[0]+(1.18235592763)*x_ref[1]+(-0.959436428335)*x_ref[2]
-        ref[1,1,1,0]=(0.291735282406)*x_ref[0]+(0.449515270669)*x_ref[1]+(0.612383052683)*x_ref[2]
-        ref[1,1,1,1]=(-0.102313390769)*x_ref[0]+(1.25745082506)*x_ref[1]+(-1.03742917135)*x_ref[2]
-        ref[1,1,2,0]=(-0.951576197839)*x_ref[0]+(1.03094297086)*x_ref[1]+(-0.10195348802)*x_ref[2]
-        ref[1,1,2,1]=(1.54751905175)*x_ref[0]+(1.47958820289)*x_ref[1]+(-0.357466311206)*x_ref[2]
-        ref[1,2,0,0]=(-0.452360614767)*x_ref[0]+(-0.865741367113)*x_ref[1]+(1.12034992845)*x_ref[2]
-        ref[1,2,0,1]=(0.00940323370511)*x_ref[0]+(-1.03701972012)*x_ref[1]+(0.0102243182131)*x_ref[2]
-        ref[1,2,1,0]=(-1.50670950911)*x_ref[0]+(-0.219993644831)*x_ref[1]+(-0.1612757943)*x_ref[2]
-        ref[1,2,1,1]=(-0.792871502871)*x_ref[0]+(-0.0163752900095)*x_ref[1]+(1.54206281352)*x_ref[2]
-        ref[1,2,2,0]=(1.02928968974)*x_ref[0]+(-0.171516999194)*x_ref[1]+(-0.446145675054)*x_ref[2]
-        ref[1,2,2,1]=(-1.51230609746)*x_ref[0]+(0.2034193081)*x_ref[1]+(-0.291776924482)*x_ref[2]
-        ref[1,3,0,0]=(-0.0312379262641)*x_ref[0]+(0.722239260943)*x_ref[1]+(-0.279504141505)*x_ref[2]
-        ref[1,3,0,1]=(-1.12038082645)*x_ref[0]+(-0.328148046828)*x_ref[1]+(0.825288681731)*x_ref[2]
-        ref[1,3,1,0]=(0.547173116241)*x_ref[0]+(0.136609628569)*x_ref[1]+(-0.476006212278)*x_ref[2]
-        ref[1,3,1,1]=(0.000854188874487)*x_ref[0]+(0.473989971126)*x_ref[1]+(1.58153857042)*x_ref[2]
-        ref[1,3,2,0]=(-0.746628247481)*x_ref[0]+(0.859384716891)*x_ref[1]+(0.618348305951)*x_ref[2]
-        ref[1,3,2,1]=(0.919601890657)*x_ref[0]+(0.422457734769)*x_ref[1]+(-1.11235109226)*x_ref[2]
-        ref[1,4,0,0]=(0.962587287633)*x_ref[0]+(-1.2526632022)*x_ref[1]+(0.210254126936)*x_ref[2]
-        ref[1,4,0,1]=(-0.330257182624)*x_ref[0]+(-0.251562095795)*x_ref[1]+(1.29427728094)*x_ref[2]
-        ref[1,4,1,0]=(-0.577555922072)*x_ref[0]+(0.844462157498)*x_ref[1]+(-0.120809700805)*x_ref[2]
-        ref[1,4,1,1]=(-0.91963436975)*x_ref[0]+(-0.415146584044)*x_ref[1]+(-0.105600826517)*x_ref[2]
-        ref[1,4,2,0]=(-1.28940482584)*x_ref[0]+(-1.55548284063)*x_ref[1]+(-0.835108666511)*x_ref[2]
-        ref[1,4,2,1]=(-0.0299379665752)*x_ref[0]+(-0.992000458707)*x_ref[1]+(-0.469600133762)*x_ref[2]
-        ref[2,0,0,0]=(0.0107575962552)*x_ref[0]+(-1.06407817799)*x_ref[1]+(-1.84217380223)*x_ref[2]
-        ref[2,0,0,1]=(-0.0596138757136)*x_ref[0]+(1.75177421542)*x_ref[1]+(0.131511355216)*x_ref[2]
-        ref[2,0,1,0]=(-0.29485191211)*x_ref[0]+(1.55396303732)*x_ref[1]+(0.137822438484)*x_ref[2]
-        ref[2,0,1,1]=(0.968093798582)*x_ref[0]+(-0.348515863297)*x_ref[1]+(-0.885253223355)*x_ref[2]
-        ref[2,0,2,0]=(0.304703601471)*x_ref[0]+(0.350016020435)*x_ref[1]+(0.0348615188696)*x_ref[2]
-        ref[2,0,2,1]=(0.242706426227)*x_ref[0]+(0.00660859017533)*x_ref[1]+(-0.122732284886)*x_ref[2]
-        ref[2,1,0,0]=(0.540596184477)*x_ref[0]+(-0.0272014403068)*x_ref[1]+(0.559631760626)*x_ref[2]
-        ref[2,1,0,1]=(0.537160103765)*x_ref[0]+(-0.974891403717)*x_ref[1]+(-1.2571032682)*x_ref[2]
-        ref[2,1,1,0]=(-0.134244705433)*x_ref[0]+(1.63419015928)*x_ref[1]+(0.0879689992598)*x_ref[2]
-        ref[2,1,1,1]=(0.885004305439)*x_ref[0]+(1.63473219215)*x_ref[1]+(-0.714475475618)*x_ref[2]
-        ref[2,1,2,0]=(-0.220742006931)*x_ref[0]+(0.298113077571)*x_ref[1]+(0.129338822854)*x_ref[2]
-        ref[2,1,2,1]=(0.0696132558998)*x_ref[0]+(1.28044127087)*x_ref[1]+(-0.182025504014)*x_ref[2]
-        ref[2,2,0,0]=(-0.108760249345)*x_ref[0]+(-0.727726654762)*x_ref[1]+(1.1810583418)*x_ref[2]
-        ref[2,2,0,1]=(1.69464976816)*x_ref[0]+(0.771779692301)*x_ref[1]+(-0.746303209271)*x_ref[2]
-        ref[2,2,1,0]=(1.6897653643)*x_ref[0]+(-1.21078732523)*x_ref[1]+(-0.000978666646647)*x_ref[2]
-        ref[2,2,1,1]=(1.60773073603)*x_ref[0]+(-0.583968900051)*x_ref[1]+(-0.0511730994465)*x_ref[2]
-        ref[2,2,2,0]=(0.506948201854)*x_ref[0]+(-0.00990858555453)*x_ref[1]+(1.06433022033)*x_ref[2]
-        ref[2,2,2,1]=(0.449523090508)*x_ref[0]+(-1.61710851818)*x_ref[1]+(0.440720932423)*x_ref[2]
-        ref[2,3,0,0]=(0.0167109660325)*x_ref[0]+(-1.08812386645)*x_ref[1]+(-1.22089632364)*x_ref[2]
-        ref[2,3,0,1]=(-0.841668282066)*x_ref[0]+(0.636645352356)*x_ref[1]+(-0.537753623856)*x_ref[2]
-        ref[2,3,1,0]=(1.79552636749)*x_ref[0]+(0.481662215698)*x_ref[1]+(-0.371782307951)*x_ref[2]
-        ref[2,3,1,1]=(-0.747945987059)*x_ref[0]+(0.818378132535)*x_ref[1]+(1.66032057212)*x_ref[2]
-        ref[2,3,2,0]=(-0.126253738036)*x_ref[0]+(-0.681619876818)*x_ref[1]+(0.117269467345)*x_ref[2]
-        ref[2,3,2,1]=(-0.338521414346)*x_ref[0]+(0.381458529772)*x_ref[1]+(1.00819568542)*x_ref[2]
-        ref[2,4,0,0]=(0.0110334310038)*x_ref[0]+(0.229750132795)*x_ref[1]+(-0.900772274961)*x_ref[2]
-        ref[2,4,0,1]=(-0.798344038508)*x_ref[0]+(0.0410740025116)*x_ref[1]+(1.46856652632)*x_ref[2]
-        ref[2,4,1,0]=(0.193355735165)*x_ref[0]+(-0.539307787984)*x_ref[1]+(-0.375854987378)*x_ref[2]
-        ref[2,4,1,1]=(0.568143022174)*x_ref[0]+(-1.61770216281)*x_ref[1]+(0.208204629987)*x_ref[2]
-        ref[2,4,2,0]=(1.37290817619)*x_ref[0]+(-0.174324684678)*x_ref[1]+(-0.217538755825)*x_ref[2]
-        ref[2,4,2,1]=(-0.483601819019)*x_ref[0]+(1.45019519818)*x_ref[1]+(-0.623519730492)*x_ref[2]
-        ref[3,0,0,0]=(-0.793731389518)*x_ref[0]+(-0.154763125819)*x_ref[1]+(1.10863435441)*x_ref[2]
-        ref[3,0,0,1]=(0.507036346178)*x_ref[0]+(-0.309380836403)*x_ref[1]+(-0.418720111636)*x_ref[2]
-        ref[3,0,1,0]=(-0.777608365831)*x_ref[0]+(0.982848447238)*x_ref[1]+(-0.762479658423)*x_ref[2]
-        ref[3,0,1,1]=(-0.73325130954)*x_ref[0]+(-0.253614119609)*x_ref[1]+(-0.366314075481)*x_ref[2]
-        ref[3,0,2,0]=(0.0989317940836)*x_ref[0]+(0.0772067160489)*x_ref[1]+(-1.84682997853)*x_ref[2]
-        ref[3,0,2,1]=(0.256206660712)*x_ref[0]+(1.2868655538)*x_ref[1]+(-0.522346638322)*x_ref[2]
-        ref[3,1,0,0]=(-1.41604178327)*x_ref[0]+(0.662242482319)*x_ref[1]+(1.7526698965)*x_ref[2]
-        ref[3,1,0,1]=(-0.442315980785)*x_ref[0]+(0.423309436413)*x_ref[1]+(0.175362864372)*x_ref[2]
-        ref[3,1,1,0]=(0.353602081392)*x_ref[0]+(1.55530884146)*x_ref[1]+(-0.115267400964)*x_ref[2]
-        ref[3,1,1,1]=(0.1445651493)*x_ref[0]+(0.652413545545)*x_ref[1]+(-1.47341714223)*x_ref[2]
-        ref[3,1,2,0]=(0.288044123145)*x_ref[0]+(1.45339107563)*x_ref[1]+(0.0253961147274)*x_ref[2]
-        ref[3,1,2,1]=(0.738725097174)*x_ref[0]+(0.556287291563)*x_ref[1]+(0.685592801206)*x_ref[2]
-        ref[3,2,0,0]=(-1.6952458849)*x_ref[0]+(-0.450982750203)*x_ref[1]+(-0.176030737746)*x_ref[2]
-        ref[3,2,0,1]=(-0.267377959403)*x_ref[0]+(-0.329354216237)*x_ref[1]+(0.368496833805)*x_ref[2]
-        ref[3,2,1,0]=(1.00419353409)*x_ref[0]+(1.50507467849)*x_ref[1]+(-0.529113363067)*x_ref[2]
-        ref[3,2,1,1]=(-1.69175338104)*x_ref[0]+(-0.101436360248)*x_ref[1]+(0.963918243087)*x_ref[2]
-        ref[3,2,2,0]=(0.093465616883)*x_ref[0]+(-0.390155190153)*x_ref[1]+(-0.354824565592)*x_ref[2]
-        ref[3,2,2,1]=(-0.414577385531)*x_ref[0]+(-0.665726090904)*x_ref[1]+(-1.39857731593)*x_ref[2]
-        ref[3,3,0,0]=(-0.528594178602)*x_ref[0]+(-0.435472295413)*x_ref[1]+(0.397972761993)*x_ref[2]
-        ref[3,3,0,1]=(1.24885378376)*x_ref[0]+(1.63537745582)*x_ref[1]+(-0.00703582234262)*x_ref[2]
-        ref[3,3,1,0]=(0.63369530476)*x_ref[0]+(0.296615915965)*x_ref[1]+(0.593277434193)*x_ref[2]
-        ref[3,3,1,1]=(-0.197615624091)*x_ref[0]+(1.45678045242)*x_ref[1]+(0.571039120854)*x_ref[2]
-        ref[3,3,2,0]=(-1.01304527292)*x_ref[0]+(0.00892977300805)*x_ref[1]+(0.284285861002)*x_ref[2]
-        ref[3,3,2,1]=(0.647872454128)*x_ref[0]+(-0.373279273659)*x_ref[1]+(1.27785668874)*x_ref[2]
-        ref[3,4,0,0]=(0.708994891373)*x_ref[0]+(-0.439675903635)*x_ref[1]+(0.612884939946)*x_ref[2]
-        ref[3,4,0,1]=(0.535549893212)*x_ref[0]+(-0.940830832131)*x_ref[1]+(-0.30796510692)*x_ref[2]
-        ref[3,4,1,0]=(-1.24560696134)*x_ref[0]+(0.125328014324)*x_ref[1]+(0.168757304331)*x_ref[2]
-        ref[3,4,1,1]=(0.604969099581)*x_ref[0]+(0.212563821283)*x_ref[1]+(0.146243255184)*x_ref[2]
-        ref[3,4,2,0]=(-0.0402174498351)*x_ref[0]+(0.967028407195)*x_ref[1]+(-0.991740640214)*x_ref[2]
-        ref[3,4,2,1]=(0.0572331664331)*x_ref[0]+(-0.836713731055)*x_ref[1]+(0.78195371901)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from FunctionOnBoundary onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=FunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.70941034293)*x[0]**o+(-0.988234004949)*x[0]+(0.440342659022)*x[1]**o+(0.221444369839)*x[1]
-        ref=(0.70941034293)*x_ref[0]**o+(-0.988234004949)*x_ref[0]+(0.440342659022)*x_ref[1]**o+(0.221444369839)*x_ref[1]
-      else:
-        arg=(0.720798141776)*x[0]**o+(0.841475017012)*x[0]+(-0.76285313232)*x[1]**o+(-0.214354625268)*x[1]+(-0.887218533751)*x[2]**o+(-0.066368425118)*x[2]
-        ref=(0.720798141776)*x_ref[0]**o+(0.841475017012)*x_ref[0]+(-0.76285313232)*x_ref[1]**o+(-0.214354625268)*x_ref[1]+(-0.887218533751)*x_ref[2]**o+(-0.066368425118)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from FunctionOnBoundary onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=FunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.940260123916)*x[0]**o+(-0.977192570293)*x[0]+(-0.0910686020625)*x[1]**o+(0.464205016172)*x[1]
-        arg[1]=(-0.634146043992)*x[0]**o+(0.00438663094072)*x[0]+(0.905996907036)*x[1]**o+(0.175291641923)*x[1]
-        ref[0]=(-0.940260123916)*x_ref[0]**o+(-0.977192570293)*x_ref[0]+(-0.0910686020625)*x_ref[1]**o+(0.464205016172)*x_ref[1]
-        ref[1]=(-0.634146043992)*x_ref[0]**o+(0.00438663094072)*x_ref[0]+(0.905996907036)*x_ref[1]**o+(0.175291641923)*x_ref[1]
-      else:
-        arg[0]=(0.0746302635373)*x[0]**o+(0.611568121627)*x[0]+(0.0392401043636)*x[1]**o+(0.846339953866)*x[1]+(0.775935477701)*x[2]**o+(0.309530355508)*x[2]
-        arg[1]=(0.790143430408)*x[0]**o+(0.987665779965)*x[0]+(0.569313447766)*x[1]**o+(0.170690891282)*x[1]+(0.224015411231)*x[2]**o+(-0.670946134012)*x[2]
-        ref[0]=(0.0746302635373)*x_ref[0]**o+(0.611568121627)*x_ref[0]+(0.0392401043636)*x_ref[1]**o+(0.846339953866)*x_ref[1]+(0.775935477701)*x_ref[2]**o+(0.309530355508)*x_ref[2]
-        ref[1]=(0.790143430408)*x_ref[0]**o+(0.987665779965)*x_ref[0]+(0.569313447766)*x_ref[1]**o+(0.170690891282)*x_ref[1]+(0.224015411231)*x_ref[2]**o+(-0.670946134012)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from FunctionOnBoundary onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=FunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.339464191741)*x[0]**o+(0.898634031554)*x[0]+(-0.67217412133)*x[1]**o+(-0.732882671617)*x[1]
-        arg[0,1]=(0.475031035618)*x[0]**o+(-0.712271710437)*x[0]+(-0.346485473024)*x[1]**o+(0.936873073538)*x[1]
-        arg[0,2]=(0.139217050193)*x[0]**o+(0.532762047045)*x[0]+(-0.411674842781)*x[1]**o+(-0.423096144938)*x[1]
-        arg[0,3]=(-0.146193322436)*x[0]**o+(-0.227693594412)*x[0]+(0.74715898621)*x[1]**o+(0.538402714773)*x[1]
-        arg[0,4]=(0.233316268084)*x[0]**o+(-0.0155557244918)*x[0]+(0.588017790807)*x[1]**o+(-0.58604454457)*x[1]
-        arg[1,0]=(0.30473687856)*x[0]**o+(0.933154007362)*x[0]+(-0.0797692178609)*x[1]**o+(0.270021035922)*x[1]
-        arg[1,1]=(-0.495613786111)*x[0]**o+(0.0857849462525)*x[0]+(0.330048664047)*x[1]**o+(0.0442768259753)*x[1]
-        arg[1,2]=(0.203830377049)*x[0]**o+(-0.891094217974)*x[0]+(-0.643947141174)*x[1]**o+(-0.564315919126)*x[1]
-        arg[1,3]=(-0.783514920199)*x[0]**o+(0.356882300706)*x[0]+(-0.307634481801)*x[1]**o+(0.521370775315)*x[1]
-        arg[1,4]=(0.418545793821)*x[0]**o+(0.574742804708)*x[0]+(-0.340992300811)*x[1]**o+(-0.892118088815)*x[1]
-        arg[2,0]=(-0.361915184269)*x[0]**o+(-0.834492406999)*x[0]+(0.750344593844)*x[1]**o+(-0.516981733186)*x[1]
-        arg[2,1]=(-0.0123811923638)*x[0]**o+(-0.9808055138)*x[0]+(-0.176978785352)*x[1]**o+(0.519804799089)*x[1]
-        arg[2,2]=(-0.901764228726)*x[0]**o+(-0.610547400097)*x[0]+(0.384870544403)*x[1]**o+(0.0308096944571)*x[1]
-        arg[2,3]=(-0.163626872732)*x[0]**o+(0.278523098981)*x[0]+(-0.0544994735633)*x[1]**o+(-0.319354318824)*x[1]
-        arg[2,4]=(0.558959525812)*x[0]**o+(0.435157723929)*x[0]+(0.758922109245)*x[1]**o+(-0.702427033542)*x[1]
-        arg[3,0]=(0.832800430277)*x[0]**o+(-0.709285644484)*x[0]+(-0.201572915312)*x[1]**o+(0.398294738552)*x[1]
-        arg[3,1]=(-0.836258924261)*x[0]**o+(-0.461452427039)*x[0]+(0.314485542425)*x[1]**o+(0.860807479051)*x[1]
-        arg[3,2]=(-0.569661610862)*x[0]**o+(-0.46125190469)*x[0]+(0.807311492846)*x[1]**o+(0.72312107176)*x[1]
-        arg[3,3]=(0.842126813179)*x[0]**o+(-0.714991954637)*x[0]+(-0.853100178283)*x[1]**o+(-0.644363753291)*x[1]
-        arg[3,4]=(-0.0480369646571)*x[0]**o+(-0.330580215997)*x[0]+(0.609757645513)*x[1]**o+(0.915764017541)*x[1]
-        ref[0,0]=(0.339464191741)*x_ref[0]**o+(0.898634031554)*x_ref[0]+(-0.67217412133)*x_ref[1]**o+(-0.732882671617)*x_ref[1]
-        ref[0,1]=(0.475031035618)*x_ref[0]**o+(-0.712271710437)*x_ref[0]+(-0.346485473024)*x_ref[1]**o+(0.936873073538)*x_ref[1]
-        ref[0,2]=(0.139217050193)*x_ref[0]**o+(0.532762047045)*x_ref[0]+(-0.411674842781)*x_ref[1]**o+(-0.423096144938)*x_ref[1]
-        ref[0,3]=(-0.146193322436)*x_ref[0]**o+(-0.227693594412)*x_ref[0]+(0.74715898621)*x_ref[1]**o+(0.538402714773)*x_ref[1]
-        ref[0,4]=(0.233316268084)*x_ref[0]**o+(-0.0155557244918)*x_ref[0]+(0.588017790807)*x_ref[1]**o+(-0.58604454457)*x_ref[1]
-        ref[1,0]=(0.30473687856)*x_ref[0]**o+(0.933154007362)*x_ref[0]+(-0.0797692178609)*x_ref[1]**o+(0.270021035922)*x_ref[1]
-        ref[1,1]=(-0.495613786111)*x_ref[0]**o+(0.0857849462525)*x_ref[0]+(0.330048664047)*x_ref[1]**o+(0.0442768259753)*x_ref[1]
-        ref[1,2]=(0.203830377049)*x_ref[0]**o+(-0.891094217974)*x_ref[0]+(-0.643947141174)*x_ref[1]**o+(-0.564315919126)*x_ref[1]
-        ref[1,3]=(-0.783514920199)*x_ref[0]**o+(0.356882300706)*x_ref[0]+(-0.307634481801)*x_ref[1]**o+(0.521370775315)*x_ref[1]
-        ref[1,4]=(0.418545793821)*x_ref[0]**o+(0.574742804708)*x_ref[0]+(-0.340992300811)*x_ref[1]**o+(-0.892118088815)*x_ref[1]
-        ref[2,0]=(-0.361915184269)*x_ref[0]**o+(-0.834492406999)*x_ref[0]+(0.750344593844)*x_ref[1]**o+(-0.516981733186)*x_ref[1]
-        ref[2,1]=(-0.0123811923638)*x_ref[0]**o+(-0.9808055138)*x_ref[0]+(-0.176978785352)*x_ref[1]**o+(0.519804799089)*x_ref[1]
-        ref[2,2]=(-0.901764228726)*x_ref[0]**o+(-0.610547400097)*x_ref[0]+(0.384870544403)*x_ref[1]**o+(0.0308096944571)*x_ref[1]
-        ref[2,3]=(-0.163626872732)*x_ref[0]**o+(0.278523098981)*x_ref[0]+(-0.0544994735633)*x_ref[1]**o+(-0.319354318824)*x_ref[1]
-        ref[2,4]=(0.558959525812)*x_ref[0]**o+(0.435157723929)*x_ref[0]+(0.758922109245)*x_ref[1]**o+(-0.702427033542)*x_ref[1]
-        ref[3,0]=(0.832800430277)*x_ref[0]**o+(-0.709285644484)*x_ref[0]+(-0.201572915312)*x_ref[1]**o+(0.398294738552)*x_ref[1]
-        ref[3,1]=(-0.836258924261)*x_ref[0]**o+(-0.461452427039)*x_ref[0]+(0.314485542425)*x_ref[1]**o+(0.860807479051)*x_ref[1]
-        ref[3,2]=(-0.569661610862)*x_ref[0]**o+(-0.46125190469)*x_ref[0]+(0.807311492846)*x_ref[1]**o+(0.72312107176)*x_ref[1]
-        ref[3,3]=(0.842126813179)*x_ref[0]**o+(-0.714991954637)*x_ref[0]+(-0.853100178283)*x_ref[1]**o+(-0.644363753291)*x_ref[1]
-        ref[3,4]=(-0.0480369646571)*x_ref[0]**o+(-0.330580215997)*x_ref[0]+(0.609757645513)*x_ref[1]**o+(0.915764017541)*x_ref[1]
-      else:
-        arg[0,0]=(-0.256088293513)*x[0]**o+(0.980138068946)*x[0]+(0.375373123738)*x[1]**o+(0.118268751779)*x[1]+(-0.848800006681)*x[2]**o+(0.861808952535)*x[2]
-        arg[0,1]=(-0.0658163161725)*x[0]**o+(-0.21582867866)*x[0]+(0.99787757796)*x[1]**o+(0.0175357022646)*x[1]+(-0.305438242469)*x[2]**o+(0.114385992332)*x[2]
-        arg[0,2]=(-0.296948302927)*x[0]**o+(0.146852900649)*x[0]+(0.386910961544)*x[1]**o+(0.353651457394)*x[1]+(0.420964895802)*x[2]**o+(0.71145244268)*x[2]
-        arg[0,3]=(0.61102494979)*x[0]**o+(-0.316055853885)*x[0]+(-0.117200390837)*x[1]**o+(-0.808630441349)*x[1]+(0.0914828526025)*x[2]**o+(0.305837943839)*x[2]
-        arg[0,4]=(-0.22863340097)*x[0]**o+(0.398083421617)*x[0]+(-0.39971917463)*x[1]**o+(-0.0307312416932)*x[1]+(0.510443863383)*x[2]**o+(-0.129495846726)*x[2]
-        arg[1,0]=(0.423968874298)*x[0]**o+(0.371480448801)*x[0]+(-0.934565508125)*x[1]**o+(0.890972208341)*x[1]+(-0.169067233411)*x[2]**o+(-0.757264272484)*x[2]
-        arg[1,1]=(0.999152573666)*x[0]**o+(-0.659676649566)*x[0]+(0.993153643567)*x[1]**o+(0.350141892848)*x[1]+(-0.493784056536)*x[2]**o+(-0.966494205893)*x[2]
-        arg[1,2]=(-0.141337889298)*x[0]**o+(0.689935513838)*x[0]+(0.335444607712)*x[1]**o+(-0.733351283662)*x[1]+(0.323775887172)*x[2]**o+(0.314099156544)*x[2]
-        arg[1,3]=(-0.157132412118)*x[0]**o+(0.602468153313)*x[0]+(-0.618134886591)*x[1]**o+(-0.404425578444)*x[1]+(-0.5069585924)*x[2]**o+(0.616829810596)*x[2]
-        arg[1,4]=(-0.107902610028)*x[0]**o+(0.664787826515)*x[0]+(-0.19940280262)*x[1]**o+(0.461794954077)*x[1]+(-0.0516671817578)*x[2]**o+(0.426165289622)*x[2]
-        arg[2,0]=(-0.568061237616)*x[0]**o+(-0.744340542576)*x[0]+(-0.0125924903194)*x[1]**o+(0.710153866172)*x[1]+(0.979871553596)*x[2]**o+(0.945862455036)*x[2]
-        arg[2,1]=(0.201599120538)*x[0]**o+(-0.11057289344)*x[0]+(0.522031147141)*x[1]**o+(0.194694594101)*x[1]+(-0.771997994079)*x[2]**o+(-0.513574957413)*x[2]
-        arg[2,2]=(0.401979025382)*x[0]**o+(-0.743641669014)*x[0]+(-0.796071557874)*x[1]**o+(-0.352651095657)*x[1]+(-0.564117536877)*x[2]**o+(0.952729715875)*x[2]
-        arg[2,3]=(-0.526162893019)*x[0]**o+(0.691019471759)*x[0]+(-0.68646084088)*x[1]**o+(0.839630438544)*x[1]+(-0.491997512287)*x[2]**o+(-0.405069600537)*x[2]
-        arg[2,4]=(0.117664099703)*x[0]**o+(-0.807496546596)*x[0]+(0.607810703702)*x[1]**o+(-0.696118154009)*x[1]+(-0.156011683803)*x[2]**o+(-0.26100420077)*x[2]
-        arg[3,0]=(0.280066174527)*x[0]**o+(-0.225940135983)*x[0]+(-0.338716163489)*x[1]**o+(0.628405669096)*x[1]+(-0.890543405425)*x[2]**o+(-0.142082524497)*x[2]
-        arg[3,1]=(-0.659241351226)*x[0]**o+(0.275483386126)*x[0]+(-0.318352239058)*x[1]**o+(0.168536648793)*x[1]+(0.539555610218)*x[2]**o+(-0.95280560435)*x[2]
-        arg[3,2]=(0.673861565841)*x[0]**o+(-0.0303873544723)*x[0]+(-0.638241094445)*x[1]**o+(0.664488908579)*x[1]+(-0.789484082135)*x[2]**o+(-0.982437408359)*x[2]
-        arg[3,3]=(-0.902346309293)*x[0]**o+(0.818106160371)*x[0]+(-0.410074078135)*x[1]**o+(0.977554592344)*x[1]+(-0.00195907247124)*x[2]**o+(0.94762151647)*x[2]
-        arg[3,4]=(0.27272813538)*x[0]**o+(0.0563423990113)*x[0]+(0.254612551508)*x[1]**o+(-0.901948547799)*x[1]+(0.263613075865)*x[2]**o+(0.879691314116)*x[2]
-        ref[0,0]=(-0.256088293513)*x_ref[0]**o+(0.980138068946)*x_ref[0]+(0.375373123738)*x_ref[1]**o+(0.118268751779)*x_ref[1]+(-0.848800006681)*x_ref[2]**o+(0.861808952535)*x_ref[2]
-        ref[0,1]=(-0.0658163161725)*x_ref[0]**o+(-0.21582867866)*x_ref[0]+(0.99787757796)*x_ref[1]**o+(0.0175357022646)*x_ref[1]+(-0.305438242469)*x_ref[2]**o+(0.114385992332)*x_ref[2]
-        ref[0,2]=(-0.296948302927)*x_ref[0]**o+(0.146852900649)*x_ref[0]+(0.386910961544)*x_ref[1]**o+(0.353651457394)*x_ref[1]+(0.420964895802)*x_ref[2]**o+(0.71145244268)*x_ref[2]
-        ref[0,3]=(0.61102494979)*x_ref[0]**o+(-0.316055853885)*x_ref[0]+(-0.117200390837)*x_ref[1]**o+(-0.808630441349)*x_ref[1]+(0.0914828526025)*x_ref[2]**o+(0.305837943839)*x_ref[2]
-        ref[0,4]=(-0.22863340097)*x_ref[0]**o+(0.398083421617)*x_ref[0]+(-0.39971917463)*x_ref[1]**o+(-0.0307312416932)*x_ref[1]+(0.510443863383)*x_ref[2]**o+(-0.129495846726)*x_ref[2]
-        ref[1,0]=(0.423968874298)*x_ref[0]**o+(0.371480448801)*x_ref[0]+(-0.934565508125)*x_ref[1]**o+(0.890972208341)*x_ref[1]+(-0.169067233411)*x_ref[2]**o+(-0.757264272484)*x_ref[2]
-        ref[1,1]=(0.999152573666)*x_ref[0]**o+(-0.659676649566)*x_ref[0]+(0.993153643567)*x_ref[1]**o+(0.350141892848)*x_ref[1]+(-0.493784056536)*x_ref[2]**o+(-0.966494205893)*x_ref[2]
-        ref[1,2]=(-0.141337889298)*x_ref[0]**o+(0.689935513838)*x_ref[0]+(0.335444607712)*x_ref[1]**o+(-0.733351283662)*x_ref[1]+(0.323775887172)*x_ref[2]**o+(0.314099156544)*x_ref[2]
-        ref[1,3]=(-0.157132412118)*x_ref[0]**o+(0.602468153313)*x_ref[0]+(-0.618134886591)*x_ref[1]**o+(-0.404425578444)*x_ref[1]+(-0.5069585924)*x_ref[2]**o+(0.616829810596)*x_ref[2]
-        ref[1,4]=(-0.107902610028)*x_ref[0]**o+(0.664787826515)*x_ref[0]+(-0.19940280262)*x_ref[1]**o+(0.461794954077)*x_ref[1]+(-0.0516671817578)*x_ref[2]**o+(0.426165289622)*x_ref[2]
-        ref[2,0]=(-0.568061237616)*x_ref[0]**o+(-0.744340542576)*x_ref[0]+(-0.0125924903194)*x_ref[1]**o+(0.710153866172)*x_ref[1]+(0.979871553596)*x_ref[2]**o+(0.945862455036)*x_ref[2]
-        ref[2,1]=(0.201599120538)*x_ref[0]**o+(-0.11057289344)*x_ref[0]+(0.522031147141)*x_ref[1]**o+(0.194694594101)*x_ref[1]+(-0.771997994079)*x_ref[2]**o+(-0.513574957413)*x_ref[2]
-        ref[2,2]=(0.401979025382)*x_ref[0]**o+(-0.743641669014)*x_ref[0]+(-0.796071557874)*x_ref[1]**o+(-0.352651095657)*x_ref[1]+(-0.564117536877)*x_ref[2]**o+(0.952729715875)*x_ref[2]
-        ref[2,3]=(-0.526162893019)*x_ref[0]**o+(0.691019471759)*x_ref[0]+(-0.68646084088)*x_ref[1]**o+(0.839630438544)*x_ref[1]+(-0.491997512287)*x_ref[2]**o+(-0.405069600537)*x_ref[2]
-        ref[2,4]=(0.117664099703)*x_ref[0]**o+(-0.807496546596)*x_ref[0]+(0.607810703702)*x_ref[1]**o+(-0.696118154009)*x_ref[1]+(-0.156011683803)*x_ref[2]**o+(-0.26100420077)*x_ref[2]
-        ref[3,0]=(0.280066174527)*x_ref[0]**o+(-0.225940135983)*x_ref[0]+(-0.338716163489)*x_ref[1]**o+(0.628405669096)*x_ref[1]+(-0.890543405425)*x_ref[2]**o+(-0.142082524497)*x_ref[2]
-        ref[3,1]=(-0.659241351226)*x_ref[0]**o+(0.275483386126)*x_ref[0]+(-0.318352239058)*x_ref[1]**o+(0.168536648793)*x_ref[1]+(0.539555610218)*x_ref[2]**o+(-0.95280560435)*x_ref[2]
-        ref[3,2]=(0.673861565841)*x_ref[0]**o+(-0.0303873544723)*x_ref[0]+(-0.638241094445)*x_ref[1]**o+(0.664488908579)*x_ref[1]+(-0.789484082135)*x_ref[2]**o+(-0.982437408359)*x_ref[2]
-        ref[3,3]=(-0.902346309293)*x_ref[0]**o+(0.818106160371)*x_ref[0]+(-0.410074078135)*x_ref[1]**o+(0.977554592344)*x_ref[1]+(-0.00195907247124)*x_ref[2]**o+(0.94762151647)*x_ref[2]
-        ref[3,4]=(0.27272813538)*x_ref[0]**o+(0.0563423990113)*x_ref[0]+(0.254612551508)*x_ref[1]**o+(-0.901948547799)*x_ref[1]+(0.263613075865)*x_ref[2]**o+(0.879691314116)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from FunctionOnBoundary onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=FunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.023497804886)*x[0]**o+(0.934780781287)*x[0]+(0.488935915319)*x[1]**o+(-0.843152487959)*x[1]
-        arg[0,0,1]=(0.074870516034)*x[0]**o+(-0.515115482624)*x[0]+(-0.582499912837)*x[1]**o+(-0.148911376041)*x[1]
-        arg[0,1,0]=(0.0364775990427)*x[0]**o+(-0.258379408121)*x[0]+(0.109704222415)*x[1]**o+(-0.0149203380717)*x[1]
-        arg[0,1,1]=(0.749804547117)*x[0]**o+(-0.65162531688)*x[0]+(-0.529952602569)*x[1]**o+(0.901735743956)*x[1]
-        arg[1,0,0]=(0.74941277085)*x[0]**o+(-0.878903916612)*x[0]+(0.866605680273)*x[1]**o+(0.182572622995)*x[1]
-        arg[1,0,1]=(-0.787476915117)*x[0]**o+(0.945314823283)*x[0]+(0.165599597226)*x[1]**o+(0.733712603726)*x[1]
-        arg[1,1,0]=(0.696240085313)*x[0]**o+(0.775501454572)*x[0]+(0.225131553571)*x[1]**o+(-0.75288780057)*x[1]
-        arg[1,1,1]=(-0.352416785284)*x[0]**o+(-0.681447081047)*x[0]+(0.164273429957)*x[1]**o+(-0.0977235074729)*x[1]
-        arg[2,0,0]=(-0.484651384894)*x[0]**o+(0.162048679786)*x[0]+(0.433731200543)*x[1]**o+(-0.2255104779)*x[1]
-        arg[2,0,1]=(0.230113349848)*x[0]**o+(0.674218493869)*x[0]+(0.124852942645)*x[1]**o+(0.361278270173)*x[1]
-        arg[2,1,0]=(-0.604246197352)*x[0]**o+(0.26763755318)*x[0]+(-0.821482774631)*x[1]**o+(-0.821813801109)*x[1]
-        arg[2,1,1]=(0.71669276429)*x[0]**o+(0.861782230871)*x[0]+(-0.837503788825)*x[1]**o+(0.0437253153979)*x[1]
-        arg[3,0,0]=(-0.0941343724431)*x[0]**o+(0.376175369776)*x[0]+(-0.455752787585)*x[1]**o+(0.777480094583)*x[1]
-        arg[3,0,1]=(-0.730897141543)*x[0]**o+(0.750046665085)*x[0]+(0.855742434657)*x[1]**o+(0.941826664412)*x[1]
-        arg[3,1,0]=(-0.788757907886)*x[0]**o+(-0.0255067018415)*x[0]+(-0.875292088318)*x[1]**o+(0.401677848256)*x[1]
-        arg[3,1,1]=(-0.980570910972)*x[0]**o+(0.936108649845)*x[0]+(-0.0463362409126)*x[1]**o+(0.630408734656)*x[1]
-        arg[4,0,0]=(-0.72642075391)*x[0]**o+(0.283788406364)*x[0]+(-0.119645741265)*x[1]**o+(0.66948892422)*x[1]
-        arg[4,0,1]=(0.178235706017)*x[0]**o+(0.693466107843)*x[0]+(-0.585602683437)*x[1]**o+(-0.493386713436)*x[1]
-        arg[4,1,0]=(0.348039277129)*x[0]**o+(-0.806776084421)*x[0]+(-0.73591780841)*x[1]**o+(-0.310246367505)*x[1]
-        arg[4,1,1]=(0.993294877418)*x[0]**o+(-0.683114302069)*x[0]+(0.0679022755308)*x[1]**o+(0.341981988936)*x[1]
-        arg[5,0,0]=(-0.807380701959)*x[0]**o+(-0.78936779476)*x[0]+(0.142089012614)*x[1]**o+(-0.129335524031)*x[1]
-        arg[5,0,1]=(-0.855714388031)*x[0]**o+(0.00825196217877)*x[0]+(0.310039590415)*x[1]**o+(-0.242861862397)*x[1]
-        arg[5,1,0]=(-0.0908183346277)*x[0]**o+(-0.941876543235)*x[0]+(0.981459557493)*x[1]**o+(0.559563798858)*x[1]
-        arg[5,1,1]=(-0.852223567371)*x[0]**o+(-0.272541886199)*x[0]+(-0.873908247032)*x[1]**o+(-0.387571769068)*x[1]
-        ref[0,0,0]=(-0.023497804886)*x_ref[0]**o+(0.934780781287)*x_ref[0]+(0.488935915319)*x_ref[1]**o+(-0.843152487959)*x_ref[1]
-        ref[0,0,1]=(0.074870516034)*x_ref[0]**o+(-0.515115482624)*x_ref[0]+(-0.582499912837)*x_ref[1]**o+(-0.148911376041)*x_ref[1]
-        ref[0,1,0]=(0.0364775990427)*x_ref[0]**o+(-0.258379408121)*x_ref[0]+(0.109704222415)*x_ref[1]**o+(-0.0149203380717)*x_ref[1]
-        ref[0,1,1]=(0.749804547117)*x_ref[0]**o+(-0.65162531688)*x_ref[0]+(-0.529952602569)*x_ref[1]**o+(0.901735743956)*x_ref[1]
-        ref[1,0,0]=(0.74941277085)*x_ref[0]**o+(-0.878903916612)*x_ref[0]+(0.866605680273)*x_ref[1]**o+(0.182572622995)*x_ref[1]
-        ref[1,0,1]=(-0.787476915117)*x_ref[0]**o+(0.945314823283)*x_ref[0]+(0.165599597226)*x_ref[1]**o+(0.733712603726)*x_ref[1]
-        ref[1,1,0]=(0.696240085313)*x_ref[0]**o+(0.775501454572)*x_ref[0]+(0.225131553571)*x_ref[1]**o+(-0.75288780057)*x_ref[1]
-        ref[1,1,1]=(-0.352416785284)*x_ref[0]**o+(-0.681447081047)*x_ref[0]+(0.164273429957)*x_ref[1]**o+(-0.0977235074729)*x_ref[1]
-        ref[2,0,0]=(-0.484651384894)*x_ref[0]**o+(0.162048679786)*x_ref[0]+(0.433731200543)*x_ref[1]**o+(-0.2255104779)*x_ref[1]
-        ref[2,0,1]=(0.230113349848)*x_ref[0]**o+(0.674218493869)*x_ref[0]+(0.124852942645)*x_ref[1]**o+(0.361278270173)*x_ref[1]
-        ref[2,1,0]=(-0.604246197352)*x_ref[0]**o+(0.26763755318)*x_ref[0]+(-0.821482774631)*x_ref[1]**o+(-0.821813801109)*x_ref[1]
-        ref[2,1,1]=(0.71669276429)*x_ref[0]**o+(0.861782230871)*x_ref[0]+(-0.837503788825)*x_ref[1]**o+(0.0437253153979)*x_ref[1]
-        ref[3,0,0]=(-0.0941343724431)*x_ref[0]**o+(0.376175369776)*x_ref[0]+(-0.455752787585)*x_ref[1]**o+(0.777480094583)*x_ref[1]
-        ref[3,0,1]=(-0.730897141543)*x_ref[0]**o+(0.750046665085)*x_ref[0]+(0.855742434657)*x_ref[1]**o+(0.941826664412)*x_ref[1]
-        ref[3,1,0]=(-0.788757907886)*x_ref[0]**o+(-0.0255067018415)*x_ref[0]+(-0.875292088318)*x_ref[1]**o+(0.401677848256)*x_ref[1]
-        ref[3,1,1]=(-0.980570910972)*x_ref[0]**o+(0.936108649845)*x_ref[0]+(-0.0463362409126)*x_ref[1]**o+(0.630408734656)*x_ref[1]
-        ref[4,0,0]=(-0.72642075391)*x_ref[0]**o+(0.283788406364)*x_ref[0]+(-0.119645741265)*x_ref[1]**o+(0.66948892422)*x_ref[1]
-        ref[4,0,1]=(0.178235706017)*x_ref[0]**o+(0.693466107843)*x_ref[0]+(-0.585602683437)*x_ref[1]**o+(-0.493386713436)*x_ref[1]
-        ref[4,1,0]=(0.348039277129)*x_ref[0]**o+(-0.806776084421)*x_ref[0]+(-0.73591780841)*x_ref[1]**o+(-0.310246367505)*x_ref[1]
-        ref[4,1,1]=(0.993294877418)*x_ref[0]**o+(-0.683114302069)*x_ref[0]+(0.0679022755308)*x_ref[1]**o+(0.341981988936)*x_ref[1]
-        ref[5,0,0]=(-0.807380701959)*x_ref[0]**o+(-0.78936779476)*x_ref[0]+(0.142089012614)*x_ref[1]**o+(-0.129335524031)*x_ref[1]
-        ref[5,0,1]=(-0.855714388031)*x_ref[0]**o+(0.00825196217877)*x_ref[0]+(0.310039590415)*x_ref[1]**o+(-0.242861862397)*x_ref[1]
-        ref[5,1,0]=(-0.0908183346277)*x_ref[0]**o+(-0.941876543235)*x_ref[0]+(0.981459557493)*x_ref[1]**o+(0.559563798858)*x_ref[1]
-        ref[5,1,1]=(-0.852223567371)*x_ref[0]**o+(-0.272541886199)*x_ref[0]+(-0.873908247032)*x_ref[1]**o+(-0.387571769068)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.418981395334)*x[0]**o+(-0.720305875042)*x[0]+(0.876880439526)*x[1]**o+(-0.17785803746)*x[1]+(0.779797986429)*x[2]**o+(0.363827072746)*x[2]
-        arg[0,0,1]=(0.159567966427)*x[0]**o+(-0.614151008569)*x[0]+(0.249982224851)*x[1]**o+(-0.119598774468)*x[1]+(-0.66603578755)*x[2]**o+(0.202190479552)*x[2]
-        arg[0,1,0]=(0.337868020939)*x[0]**o+(-0.0828148711399)*x[0]+(-0.0631659329293)*x[1]**o+(-0.725100695213)*x[1]+(0.852068398846)*x[2]**o+(-0.951116521211)*x[2]
-        arg[0,1,1]=(0.710866728186)*x[0]**o+(-0.517133891599)*x[0]+(0.320028321875)*x[1]**o+(0.0331233805016)*x[1]+(-0.0945382588101)*x[2]**o+(-0.795725457058)*x[2]
-        arg[1,0,0]=(0.261503329866)*x[0]**o+(0.697062723662)*x[0]+(0.926550326146)*x[1]**o+(-0.318704885103)*x[1]+(-0.76904956799)*x[2]**o+(0.0750521033639)*x[2]
-        arg[1,0,1]=(-0.594460213676)*x[0]**o+(0.356692399969)*x[0]+(-0.611558953982)*x[1]**o+(0.289469152887)*x[1]+(-0.73222413782)*x[2]**o+(-0.576883793051)*x[2]
-        arg[1,1,0]=(-0.399324648161)*x[0]**o+(0.975428000926)*x[0]+(-0.889762441468)*x[1]**o+(-0.137573068244)*x[1]+(0.252276361744)*x[2]**o+(-0.554435968553)*x[2]
-        arg[1,1,1]=(0.677933864695)*x[0]**o+(-0.19825134391)*x[0]+(0.556783296976)*x[1]**o+(0.0349255641106)*x[1]+(-0.387378575139)*x[2]**o+(0.889628545207)*x[2]
-        arg[2,0,0]=(-0.839356850436)*x[0]**o+(0.0186947034157)*x[0]+(-0.264793716814)*x[1]**o+(-0.767468006197)*x[1]+(0.91661695419)*x[2]**o+(-0.374036622497)*x[2]
-        arg[2,0,1]=(-0.030357536408)*x[0]**o+(0.57424762933)*x[0]+(-0.590115256932)*x[1]**o+(-0.176169776757)*x[1]+(-0.502845936823)*x[2]**o+(0.0399243413515)*x[2]
-        arg[2,1,0]=(0.257324735469)*x[0]**o+(-0.686083724325)*x[0]+(-0.166609564696)*x[1]**o+(-0.132181292726)*x[1]+(0.10419146703)*x[2]**o+(-0.827571838114)*x[2]
-        arg[2,1,1]=(0.339465982319)*x[0]**o+(0.766586466841)*x[0]+(0.277538823819)*x[1]**o+(0.222607512697)*x[1]+(-0.909105282607)*x[2]**o+(0.463729842225)*x[2]
-        arg[3,0,0]=(-0.00132043337846)*x[0]**o+(0.670451981959)*x[0]+(-0.0122245380346)*x[1]**o+(-0.922535904926)*x[1]+(0.49486742)*x[2]**o+(0.0785274524546)*x[2]
-        arg[3,0,1]=(0.0360876610851)*x[0]**o+(0.69319604661)*x[0]+(0.980826095079)*x[1]**o+(0.167689443923)*x[1]+(0.561634492527)*x[2]**o+(0.996948790413)*x[2]
-        arg[3,1,0]=(-0.238705628819)*x[0]**o+(-0.915859436874)*x[0]+(0.942122040692)*x[1]**o+(0.971025407162)*x[1]+(-0.965945363654)*x[2]**o+(0.136537412741)*x[2]
-        arg[3,1,1]=(-0.672314439537)*x[0]**o+(0.792647645097)*x[0]+(-0.432226224113)*x[1]**o+(0.424246857841)*x[1]+(-0.639842531517)*x[2]**o+(0.0570057507731)*x[2]
-        arg[4,0,0]=(0.450831267081)*x[0]**o+(0.75992870254)*x[0]+(0.768779936214)*x[1]**o+(-0.0135947286596)*x[1]+(0.126345191973)*x[2]**o+(-0.619763308655)*x[2]
-        arg[4,0,1]=(-0.325005948888)*x[0]**o+(-0.0655421631802)*x[0]+(0.607182269636)*x[1]**o+(-0.631044141835)*x[1]+(-0.356580309429)*x[2]**o+(-0.593198006905)*x[2]
-        arg[4,1,0]=(0.304932527518)*x[0]**o+(-0.763995484499)*x[0]+(0.884855995183)*x[1]**o+(-0.42180322102)*x[1]+(0.605742059302)*x[2]**o+(0.448553789891)*x[2]
-        arg[4,1,1]=(-0.787145437063)*x[0]**o+(-0.465220934558)*x[0]+(-0.370336760606)*x[1]**o+(-0.854850692759)*x[1]+(0.482896516171)*x[2]**o+(-0.551567519291)*x[2]
-        arg[5,0,0]=(-0.537738873639)*x[0]**o+(-0.213268842545)*x[0]+(0.492208051415)*x[1]**o+(-0.609304634017)*x[1]+(-0.487753207718)*x[2]**o+(-0.70650655894)*x[2]
-        arg[5,0,1]=(0.600359837292)*x[0]**o+(-0.604421599924)*x[0]+(-0.051356466466)*x[1]**o+(-0.168592544661)*x[1]+(0.789340570036)*x[2]**o+(0.910249026599)*x[2]
-        arg[5,1,0]=(0.264506197816)*x[0]**o+(-0.711775430363)*x[0]+(0.384666624979)*x[1]**o+(0.0926714847986)*x[1]+(-0.551232557648)*x[2]**o+(0.758927448717)*x[2]
-        arg[5,1,1]=(0.894998835449)*x[0]**o+(-0.466338210072)*x[0]+(-0.522475632898)*x[1]**o+(0.766949173671)*x[1]+(0.915063619607)*x[2]**o+(-0.270696846692)*x[2]
-        ref[0,0,0]=(0.418981395334)*x_ref[0]**o+(-0.720305875042)*x_ref[0]+(0.876880439526)*x_ref[1]**o+(-0.17785803746)*x_ref[1]+(0.779797986429)*x_ref[2]**o+(0.363827072746)*x_ref[2]
-        ref[0,0,1]=(0.159567966427)*x_ref[0]**o+(-0.614151008569)*x_ref[0]+(0.249982224851)*x_ref[1]**o+(-0.119598774468)*x_ref[1]+(-0.66603578755)*x_ref[2]**o+(0.202190479552)*x_ref[2]
-        ref[0,1,0]=(0.337868020939)*x_ref[0]**o+(-0.0828148711399)*x_ref[0]+(-0.0631659329293)*x_ref[1]**o+(-0.725100695213)*x_ref[1]+(0.852068398846)*x_ref[2]**o+(-0.951116521211)*x_ref[2]
-        ref[0,1,1]=(0.710866728186)*x_ref[0]**o+(-0.517133891599)*x_ref[0]+(0.320028321875)*x_ref[1]**o+(0.0331233805016)*x_ref[1]+(-0.0945382588101)*x_ref[2]**o+(-0.795725457058)*x_ref[2]
-        ref[1,0,0]=(0.261503329866)*x_ref[0]**o+(0.697062723662)*x_ref[0]+(0.926550326146)*x_ref[1]**o+(-0.318704885103)*x_ref[1]+(-0.76904956799)*x_ref[2]**o+(0.0750521033639)*x_ref[2]
-        ref[1,0,1]=(-0.594460213676)*x_ref[0]**o+(0.356692399969)*x_ref[0]+(-0.611558953982)*x_ref[1]**o+(0.289469152887)*x_ref[1]+(-0.73222413782)*x_ref[2]**o+(-0.576883793051)*x_ref[2]
-        ref[1,1,0]=(-0.399324648161)*x_ref[0]**o+(0.975428000926)*x_ref[0]+(-0.889762441468)*x_ref[1]**o+(-0.137573068244)*x_ref[1]+(0.252276361744)*x_ref[2]**o+(-0.554435968553)*x_ref[2]
-        ref[1,1,1]=(0.677933864695)*x_ref[0]**o+(-0.19825134391)*x_ref[0]+(0.556783296976)*x_ref[1]**o+(0.0349255641106)*x_ref[1]+(-0.387378575139)*x_ref[2]**o+(0.889628545207)*x_ref[2]
-        ref[2,0,0]=(-0.839356850436)*x_ref[0]**o+(0.0186947034157)*x_ref[0]+(-0.264793716814)*x_ref[1]**o+(-0.767468006197)*x_ref[1]+(0.91661695419)*x_ref[2]**o+(-0.374036622497)*x_ref[2]
-        ref[2,0,1]=(-0.030357536408)*x_ref[0]**o+(0.57424762933)*x_ref[0]+(-0.590115256932)*x_ref[1]**o+(-0.176169776757)*x_ref[1]+(-0.502845936823)*x_ref[2]**o+(0.0399243413515)*x_ref[2]
-        ref[2,1,0]=(0.257324735469)*x_ref[0]**o+(-0.686083724325)*x_ref[0]+(-0.166609564696)*x_ref[1]**o+(-0.132181292726)*x_ref[1]+(0.10419146703)*x_ref[2]**o+(-0.827571838114)*x_ref[2]
-        ref[2,1,1]=(0.339465982319)*x_ref[0]**o+(0.766586466841)*x_ref[0]+(0.277538823819)*x_ref[1]**o+(0.222607512697)*x_ref[1]+(-0.909105282607)*x_ref[2]**o+(0.463729842225)*x_ref[2]
-        ref[3,0,0]=(-0.00132043337846)*x_ref[0]**o+(0.670451981959)*x_ref[0]+(-0.0122245380346)*x_ref[1]**o+(-0.922535904926)*x_ref[1]+(0.49486742)*x_ref[2]**o+(0.0785274524546)*x_ref[2]
-        ref[3,0,1]=(0.0360876610851)*x_ref[0]**o+(0.69319604661)*x_ref[0]+(0.980826095079)*x_ref[1]**o+(0.167689443923)*x_ref[1]+(0.561634492527)*x_ref[2]**o+(0.996948790413)*x_ref[2]
-        ref[3,1,0]=(-0.238705628819)*x_ref[0]**o+(-0.915859436874)*x_ref[0]+(0.942122040692)*x_ref[1]**o+(0.971025407162)*x_ref[1]+(-0.965945363654)*x_ref[2]**o+(0.136537412741)*x_ref[2]
-        ref[3,1,1]=(-0.672314439537)*x_ref[0]**o+(0.792647645097)*x_ref[0]+(-0.432226224113)*x_ref[1]**o+(0.424246857841)*x_ref[1]+(-0.639842531517)*x_ref[2]**o+(0.0570057507731)*x_ref[2]
-        ref[4,0,0]=(0.450831267081)*x_ref[0]**o+(0.75992870254)*x_ref[0]+(0.768779936214)*x_ref[1]**o+(-0.0135947286596)*x_ref[1]+(0.126345191973)*x_ref[2]**o+(-0.619763308655)*x_ref[2]
-        ref[4,0,1]=(-0.325005948888)*x_ref[0]**o+(-0.0655421631802)*x_ref[0]+(0.607182269636)*x_ref[1]**o+(-0.631044141835)*x_ref[1]+(-0.356580309429)*x_ref[2]**o+(-0.593198006905)*x_ref[2]
-        ref[4,1,0]=(0.304932527518)*x_ref[0]**o+(-0.763995484499)*x_ref[0]+(0.884855995183)*x_ref[1]**o+(-0.42180322102)*x_ref[1]+(0.605742059302)*x_ref[2]**o+(0.448553789891)*x_ref[2]
-        ref[4,1,1]=(-0.787145437063)*x_ref[0]**o+(-0.465220934558)*x_ref[0]+(-0.370336760606)*x_ref[1]**o+(-0.854850692759)*x_ref[1]+(0.482896516171)*x_ref[2]**o+(-0.551567519291)*x_ref[2]
-        ref[5,0,0]=(-0.537738873639)*x_ref[0]**o+(-0.213268842545)*x_ref[0]+(0.492208051415)*x_ref[1]**o+(-0.609304634017)*x_ref[1]+(-0.487753207718)*x_ref[2]**o+(-0.70650655894)*x_ref[2]
-        ref[5,0,1]=(0.600359837292)*x_ref[0]**o+(-0.604421599924)*x_ref[0]+(-0.051356466466)*x_ref[1]**o+(-0.168592544661)*x_ref[1]+(0.789340570036)*x_ref[2]**o+(0.910249026599)*x_ref[2]
-        ref[5,1,0]=(0.264506197816)*x_ref[0]**o+(-0.711775430363)*x_ref[0]+(0.384666624979)*x_ref[1]**o+(0.0926714847986)*x_ref[1]+(-0.551232557648)*x_ref[2]**o+(0.758927448717)*x_ref[2]
-        ref[5,1,1]=(0.894998835449)*x_ref[0]**o+(-0.466338210072)*x_ref[0]+(-0.522475632898)*x_ref[1]**o+(0.766949173671)*x_ref[1]+(0.915063619607)*x_ref[2]**o+(-0.270696846692)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the FunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from FunctionOnBoundary onto FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=FunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.240887319278)*x[0]**o+(-0.192166587545)*x[0]+(0.0176974287409)*x[1]**o+(0.100761748824)*x[1]
-        arg[0,0,0,1]=(-0.549649845775)*x[0]**o+(-0.293969245646)*x[0]+(-0.605885325133)*x[1]**o+(0.799558451173)*x[1]
-        arg[0,0,1,0]=(-0.899658769582)*x[0]**o+(0.484524193987)*x[0]+(0.437485870351)*x[1]**o+(-0.220549034927)*x[1]
-        arg[0,0,1,1]=(-0.146539961793)*x[0]**o+(-0.278343486929)*x[0]+(0.0913912456082)*x[1]**o+(-0.751028975123)*x[1]
-        arg[0,0,2,0]=(0.806344701194)*x[0]**o+(0.0537872824561)*x[0]+(-0.70407828379)*x[1]**o+(-0.922963486601)*x[1]
-        arg[0,0,2,1]=(0.307202902495)*x[0]**o+(0.301603506731)*x[0]+(0.232983743616)*x[1]**o+(-0.744267542759)*x[1]
-        arg[0,1,0,0]=(-0.550616060824)*x[0]**o+(-0.661367750254)*x[0]+(-0.695905895864)*x[1]**o+(-0.788045922398)*x[1]
-        arg[0,1,0,1]=(-0.934169134035)*x[0]**o+(-0.843861105521)*x[0]+(-0.237877254439)*x[1]**o+(-0.364956821348)*x[1]
-        arg[0,1,1,0]=(0.0950675750026)*x[0]**o+(-0.815510640594)*x[0]+(0.72526035968)*x[1]**o+(0.898675190106)*x[1]
-        arg[0,1,1,1]=(0.715609066776)*x[0]**o+(0.371314845206)*x[0]+(0.326878867244)*x[1]**o+(-0.468798950199)*x[1]
-        arg[0,1,2,0]=(0.392175939547)*x[0]**o+(0.105332682674)*x[0]+(0.997967455477)*x[1]**o+(0.0322491822496)*x[1]
-        arg[0,1,2,1]=(-0.804498399187)*x[0]**o+(0.819653744739)*x[0]+(0.609610573703)*x[1]**o+(-0.623299047794)*x[1]
-        arg[0,2,0,0]=(0.993877917386)*x[0]**o+(0.815952897899)*x[0]+(-0.258432174486)*x[1]**o+(0.209324387308)*x[1]
-        arg[0,2,0,1]=(0.395946889364)*x[0]**o+(-0.859500539908)*x[0]+(-0.68495734785)*x[1]**o+(0.791813946302)*x[1]
-        arg[0,2,1,0]=(0.154347661108)*x[0]**o+(0.0873140744322)*x[0]+(-0.423935109956)*x[1]**o+(-0.754297239226)*x[1]
-        arg[0,2,1,1]=(-0.623998419484)*x[0]**o+(0.487300130941)*x[0]+(-0.323613219784)*x[1]**o+(0.744877983729)*x[1]
-        arg[0,2,2,0]=(0.515686374371)*x[0]**o+(0.512572153346)*x[0]+(-0.641245783272)*x[1]**o+(-0.390660158759)*x[1]
-        arg[0,2,2,1]=(0.24398238139)*x[0]**o+(-0.172020271678)*x[0]+(0.980197812701)*x[1]**o+(0.336941934503)*x[1]
-        arg[0,3,0,0]=(0.0154584447615)*x[0]**o+(-0.547048191238)*x[0]+(-0.555319223005)*x[1]**o+(0.0972794598106)*x[1]
-        arg[0,3,0,1]=(0.44744389335)*x[0]**o+(0.475046337874)*x[0]+(0.876228982066)*x[1]**o+(-0.0636405241175)*x[1]
-        arg[0,3,1,0]=(0.392948465298)*x[0]**o+(-0.341342654182)*x[0]+(0.747185683968)*x[1]**o+(-0.99981172166)*x[1]
-        arg[0,3,1,1]=(-0.172355321621)*x[0]**o+(-0.531391484795)*x[0]+(0.451654274019)*x[1]**o+(0.0795298667915)*x[1]
-        arg[0,3,2,0]=(0.0841642474674)*x[0]**o+(0.308494435164)*x[0]+(0.53181918181)*x[1]**o+(0.480258067959)*x[1]
-        arg[0,3,2,1]=(-0.222903054864)*x[0]**o+(-0.0330655869754)*x[0]+(0.227482525015)*x[1]**o+(0.536136212347)*x[1]
-        arg[0,4,0,0]=(0.574798381284)*x[0]**o+(0.181354466484)*x[0]+(0.103049514171)*x[1]**o+(0.156282818835)*x[1]
-        arg[0,4,0,1]=(0.478314255289)*x[0]**o+(0.224797222592)*x[0]+(0.307668606272)*x[1]**o+(-0.785262182937)*x[1]
-        arg[0,4,1,0]=(0.519356961182)*x[0]**o+(0.646200458344)*x[0]+(0.0522618783181)*x[1]**o+(0.702335307324)*x[1]
-        arg[0,4,1,1]=(-0.168756029541)*x[0]**o+(-0.00618364750666)*x[0]+(0.472704616213)*x[1]**o+(0.974257451871)*x[1]
-        arg[0,4,2,0]=(-0.279196869573)*x[0]**o+(-0.333083174091)*x[0]+(-0.980089574428)*x[1]**o+(0.405273709405)*x[1]
-        arg[0,4,2,1]=(-0.199431380673)*x[0]**o+(0.823294899866)*x[0]+(-0.174125117685)*x[1]**o+(-0.730500493887)*x[1]
-        arg[1,0,0,0]=(-0.577281489635)*x[0]**o+(0.231906139898)*x[0]+(0.537128708963)*x[1]**o+(0.363444540898)*x[1]
-        arg[1,0,0,1]=(0.204108541882)*x[0]**o+(-0.217661714888)*x[0]+(0.963384293759)*x[1]**o+(-0.0817519801351)*x[1]
-        arg[1,0,1,0]=(0.540681325439)*x[0]**o+(-0.496036960808)*x[0]+(0.421037689661)*x[1]**o+(0.19399086996)*x[1]
-        arg[1,0,1,1]=(0.482938542126)*x[0]**o+(-0.0725027675209)*x[0]+(-0.441517962054)*x[1]**o+(0.787445860714)*x[1]
-        arg[1,0,2,0]=(0.0378928111257)*x[0]**o+(0.451368848019)*x[0]+(-0.228668284485)*x[1]**o+(0.505927229432)*x[1]
-        arg[1,0,2,1]=(-0.59833518872)*x[0]**o+(0.956068253354)*x[0]+(0.667905995469)*x[1]**o+(0.963273292214)*x[1]
-        arg[1,1,0,0]=(0.901637865236)*x[0]**o+(-0.642678971748)*x[0]+(-0.603915019524)*x[1]**o+(-0.208004993919)*x[1]
-        arg[1,1,0,1]=(-0.227162661052)*x[0]**o+(-0.5816434303)*x[0]+(0.274961293801)*x[1]**o+(-0.614001328621)*x[1]
-        arg[1,1,1,0]=(0.078438078548)*x[0]**o+(0.570191242883)*x[0]+(0.0952878212484)*x[1]**o+(0.844460205497)*x[1]
-        arg[1,1,1,1]=(-0.901445811786)*x[0]**o+(-0.996376775344)*x[0]+(0.707470471613)*x[1]**o+(-0.187517936674)*x[1]
-        arg[1,1,2,0]=(-0.66891443067)*x[0]**o+(0.0462057239324)*x[0]+(-0.825820539128)*x[1]**o+(-0.766932836843)*x[1]
-        arg[1,1,2,1]=(-0.851428828811)*x[0]**o+(0.504484422346)*x[0]+(0.121378315545)*x[1]**o+(0.903947012757)*x[1]
-        arg[1,2,0,0]=(-0.393827449768)*x[0]**o+(-0.251827904608)*x[0]+(0.8320040882)*x[1]**o+(0.57595149855)*x[1]
-        arg[1,2,0,1]=(0.638738110712)*x[0]**o+(-0.439962152539)*x[0]+(-0.977211078995)*x[1]**o+(0.0528475212451)*x[1]
-        arg[1,2,1,0]=(0.824313588941)*x[0]**o+(-0.589968996823)*x[0]+(-0.512156794152)*x[1]**o+(0.142809794443)*x[1]
-        arg[1,2,1,1]=(-0.31789333147)*x[0]**o+(0.598839896949)*x[0]+(0.638319398651)*x[1]**o+(0.353625999317)*x[1]
-        arg[1,2,2,0]=(-0.720472365012)*x[0]**o+(0.896538030051)*x[0]+(-0.224639169972)*x[1]**o+(-0.898299360738)*x[1]
-        arg[1,2,2,1]=(0.123077707167)*x[0]**o+(0.15922851038)*x[0]+(0.678984783843)*x[1]**o+(-0.778188269852)*x[1]
-        arg[1,3,0,0]=(0.344256301209)*x[0]**o+(0.884367738289)*x[0]+(0.00556636219289)*x[1]**o+(0.684361331195)*x[1]
-        arg[1,3,0,1]=(-0.812245131065)*x[0]**o+(0.971365671228)*x[0]+(0.0696053239569)*x[1]**o+(-0.300266235138)*x[1]
-        arg[1,3,1,0]=(0.470254588058)*x[0]**o+(0.0946825509913)*x[0]+(-0.415619255025)*x[1]**o+(-0.27381652858)*x[1]
-        arg[1,3,1,1]=(-0.84555138241)*x[0]**o+(0.873510832091)*x[0]+(-0.138010338152)*x[1]**o+(-0.982274515316)*x[1]
-        arg[1,3,2,0]=(0.695614136148)*x[0]**o+(-0.192588082771)*x[0]+(-0.21579127791)*x[1]**o+(-0.0335939736388)*x[1]
-        arg[1,3,2,1]=(-0.633363463896)*x[0]**o+(-0.958320549993)*x[0]+(0.197331067481)*x[1]**o+(0.315089888409)*x[1]
-        arg[1,4,0,0]=(-0.211531219945)*x[0]**o+(-0.399700721799)*x[0]+(0.578927638839)*x[1]**o+(-0.389034976195)*x[1]
-        arg[1,4,0,1]=(-0.846399571893)*x[0]**o+(-0.952904755903)*x[0]+(-0.858399802693)*x[1]**o+(-0.23264354907)*x[1]
-        arg[1,4,1,0]=(0.255822441586)*x[0]**o+(0.896237710393)*x[0]+(-0.90248008271)*x[1]**o+(0.654804848244)*x[1]
-        arg[1,4,1,1]=(-0.112475508163)*x[0]**o+(-0.861697204453)*x[0]+(-0.782581931187)*x[1]**o+(-0.129345341581)*x[1]
-        arg[1,4,2,0]=(0.690095687033)*x[0]**o+(0.729317334019)*x[0]+(-0.00961483612288)*x[1]**o+(-0.288320551243)*x[1]
-        arg[1,4,2,1]=(-0.648146433517)*x[0]**o+(-0.301246601263)*x[0]+(-0.490119612994)*x[1]**o+(0.231186845615)*x[1]
-        arg[2,0,0,0]=(-0.645560891595)*x[0]**o+(-0.889067544988)*x[0]+(-0.193353414221)*x[1]**o+(-0.726988479344)*x[1]
-        arg[2,0,0,1]=(-0.083614738484)*x[0]**o+(-0.822530927241)*x[0]+(0.660338934241)*x[1]**o+(0.0383821036508)*x[1]
-        arg[2,0,1,0]=(-0.132250736664)*x[0]**o+(-0.571474370931)*x[0]+(-0.755931100342)*x[1]**o+(-0.145196865115)*x[1]
-        arg[2,0,1,1]=(0.545219196727)*x[0]**o+(-0.846368787913)*x[0]+(-0.845706160842)*x[1]**o+(0.550703610989)*x[1]
-        arg[2,0,2,0]=(-0.766303732195)*x[0]**o+(0.156822893641)*x[0]+(0.00954334254282)*x[1]**o+(0.201506144561)*x[1]
-        arg[2,0,2,1]=(-0.274476449632)*x[0]**o+(-0.361690468185)*x[0]+(-0.816535747268)*x[1]**o+(-0.473913811701)*x[1]
-        arg[2,1,0,0]=(-0.927592771482)*x[0]**o+(0.534615269814)*x[0]+(-0.571217133452)*x[1]**o+(0.57448299216)*x[1]
-        arg[2,1,0,1]=(-0.298153953211)*x[0]**o+(-0.143636909462)*x[0]+(0.990660288864)*x[1]**o+(-0.495864284763)*x[1]
-        arg[2,1,1,0]=(-0.110625727208)*x[0]**o+(-0.221057774317)*x[0]+(0.557195078358)*x[1]**o+(0.803162691808)*x[1]
-        arg[2,1,1,1]=(-0.115589176775)*x[0]**o+(0.08253351782)*x[0]+(-0.595996958977)*x[1]**o+(0.501435717501)*x[1]
-        arg[2,1,2,0]=(0.78764976658)*x[0]**o+(0.966729831711)*x[0]+(-0.585879575667)*x[1]**o+(0.341148176793)*x[1]
-        arg[2,1,2,1]=(-0.551697945691)*x[0]**o+(0.545857249323)*x[0]+(-0.919321724495)*x[1]**o+(-0.286043327415)*x[1]
-        arg[2,2,0,0]=(-0.669933890655)*x[0]**o+(-0.344862118495)*x[0]+(0.878331282597)*x[1]**o+(0.881893760718)*x[1]
-        arg[2,2,0,1]=(-0.217876618414)*x[0]**o+(-0.289118007199)*x[0]+(0.513464171525)*x[1]**o+(0.310055899102)*x[1]
-        arg[2,2,1,0]=(0.0472051379154)*x[0]**o+(0.42455388451)*x[0]+(-0.920571834891)*x[1]**o+(-0.779095076537)*x[1]
-        arg[2,2,1,1]=(-0.299619304537)*x[0]**o+(-0.289777287294)*x[0]+(0.920505062988)*x[1]**o+(-0.243924179095)*x[1]
-        arg[2,2,2,0]=(-0.819343530877)*x[0]**o+(0.975953690875)*x[0]+(-0.787239459241)*x[1]**o+(-0.199900734691)*x[1]
-        arg[2,2,2,1]=(0.0980085780878)*x[0]**o+(0.642946515451)*x[0]+(0.951790535152)*x[1]**o+(-0.253914817366)*x[1]
-        arg[2,3,0,0]=(-0.882075522824)*x[0]**o+(0.200934502682)*x[0]+(-0.83200464496)*x[1]**o+(0.941479345375)*x[1]
-        arg[2,3,0,1]=(-0.615941782209)*x[0]**o+(-0.693242388092)*x[0]+(-0.640417278871)*x[1]**o+(-0.346459094803)*x[1]
-        arg[2,3,1,0]=(-0.447919427952)*x[0]**o+(0.205055689141)*x[0]+(-0.453290032411)*x[1]**o+(0.879062836521)*x[1]
-        arg[2,3,1,1]=(0.721133924016)*x[0]**o+(0.71294558459)*x[0]+(-0.250087045805)*x[1]**o+(0.605146721129)*x[1]
-        arg[2,3,2,0]=(0.247782322921)*x[0]**o+(-0.956367425119)*x[0]+(-0.054045082005)*x[1]**o+(-0.128151832132)*x[1]
-        arg[2,3,2,1]=(-0.427039259088)*x[0]**o+(-0.359849242839)*x[0]+(-0.244990934481)*x[1]**o+(-0.038020035629)*x[1]
-        arg[2,4,0,0]=(-0.216409150834)*x[0]**o+(0.492547989921)*x[0]+(0.878317438469)*x[1]**o+(-0.112718719119)*x[1]
-        arg[2,4,0,1]=(0.487403443102)*x[0]**o+(0.228155519468)*x[0]+(0.923150527516)*x[1]**o+(0.642654867908)*x[1]
-        arg[2,4,1,0]=(0.916418483417)*x[0]**o+(-0.177198935173)*x[0]+(-0.790548940412)*x[1]**o+(0.87540167052)*x[1]
-        arg[2,4,1,1]=(0.718502075538)*x[0]**o+(0.691254010569)*x[0]+(-0.0134430122729)*x[1]**o+(-0.739888770749)*x[1]
-        arg[2,4,2,0]=(0.287825086861)*x[0]**o+(0.596621809347)*x[0]+(0.729784205391)*x[1]**o+(-0.25984257955)*x[1]
-        arg[2,4,2,1]=(-0.515102480025)*x[0]**o+(-0.609951840015)*x[0]+(0.229834340075)*x[1]**o+(-0.727157816241)*x[1]
-        arg[3,0,0,0]=(-0.349406091363)*x[0]**o+(0.802348451103)*x[0]+(-0.174421346276)*x[1]**o+(0.120711198036)*x[1]
-        arg[3,0,0,1]=(0.367085169423)*x[0]**o+(-0.319683236434)*x[0]+(-0.590820542566)*x[1]**o+(0.607625953303)*x[1]
-        arg[3,0,1,0]=(0.231259976433)*x[0]**o+(-0.493297408825)*x[0]+(0.919363640504)*x[1]**o+(-0.839841270429)*x[1]
-        arg[3,0,1,1]=(0.57672135684)*x[0]**o+(0.882062879704)*x[0]+(-0.600979706444)*x[1]**o+(-0.704008344509)*x[1]
-        arg[3,0,2,0]=(-0.208162114527)*x[0]**o+(0.593682243052)*x[0]+(-0.428436832487)*x[1]**o+(0.51007021604)*x[1]
-        arg[3,0,2,1]=(0.315264672653)*x[0]**o+(-0.0835897376534)*x[0]+(-0.135315173106)*x[1]**o+(-0.646372309498)*x[1]
-        arg[3,1,0,0]=(0.815505953752)*x[0]**o+(0.0625493643292)*x[0]+(0.383118433815)*x[1]**o+(0.17372720435)*x[1]
-        arg[3,1,0,1]=(0.557295786969)*x[0]**o+(-0.568823508165)*x[0]+(-0.00874733267675)*x[1]**o+(-0.27454140598)*x[1]
-        arg[3,1,1,0]=(0.649021026591)*x[0]**o+(0.232255030448)*x[0]+(0.845939296425)*x[1]**o+(0.116387378294)*x[1]
-        arg[3,1,1,1]=(0.431124940343)*x[0]**o+(-0.0865937271969)*x[0]+(0.937911741288)*x[1]**o+(0.362850039234)*x[1]
-        arg[3,1,2,0]=(0.155965414439)*x[0]**o+(0.110850421841)*x[0]+(0.244563080191)*x[1]**o+(0.266325498006)*x[1]
-        arg[3,1,2,1]=(0.766813300935)*x[0]**o+(0.77492422889)*x[0]+(-0.0141436554714)*x[1]**o+(0.780444449009)*x[1]
-        arg[3,2,0,0]=(0.619086019019)*x[0]**o+(-0.574130567601)*x[0]+(-0.417708159593)*x[1]**o+(0.707727284254)*x[1]
-        arg[3,2,0,1]=(-0.845657409353)*x[0]**o+(0.705282507748)*x[0]+(0.124557418112)*x[1]**o+(-0.337493494733)*x[1]
-        arg[3,2,1,0]=(0.114875146211)*x[0]**o+(-0.724480426892)*x[0]+(-0.0763476904405)*x[1]**o+(0.12064907114)*x[1]
-        arg[3,2,1,1]=(-0.74994413376)*x[0]**o+(-0.916476035217)*x[0]+(-0.360412756599)*x[1]**o+(-0.917457363098)*x[1]
-        arg[3,2,2,0]=(-0.446839470984)*x[0]**o+(-0.097704838316)*x[0]+(-0.653584364909)*x[1]**o+(0.561014757758)*x[1]
-        arg[3,2,2,1]=(-0.178975301038)*x[0]**o+(-0.843669982667)*x[0]+(-0.566610094242)*x[1]**o+(0.213047649003)*x[1]
-        arg[3,3,0,0]=(0.144115764355)*x[0]**o+(0.199435411954)*x[0]+(0.173334385199)*x[1]**o+(-0.942957035808)*x[1]
-        arg[3,3,0,1]=(-0.417589926342)*x[0]**o+(-0.819188022852)*x[0]+(-0.68299160003)*x[1]**o+(-0.314851447894)*x[1]
-        arg[3,3,1,0]=(0.737898219164)*x[0]**o+(0.612906277393)*x[0]+(-0.768349396729)*x[1]**o+(-0.192998755095)*x[1]
-        arg[3,3,1,1]=(0.35433362007)*x[0]**o+(0.894174225208)*x[0]+(-0.450333030837)*x[1]**o+(0.819450589483)*x[1]
-        arg[3,3,2,0]=(-0.455377131302)*x[0]**o+(-0.748183144687)*x[0]+(-0.482739450231)*x[1]**o+(0.300625929022)*x[1]
-        arg[3,3,2,1]=(-0.602766693698)*x[0]**o+(-0.416288436985)*x[0]+(0.837501983536)*x[1]**o+(-0.745935308188)*x[1]
-        arg[3,4,0,0]=(-0.706774010405)*x[0]**o+(0.407766818701)*x[0]+(-0.248964401443)*x[1]**o+(0.675466487229)*x[1]
-        arg[3,4,0,1]=(0.512302883876)*x[0]**o+(0.0809544867105)*x[0]+(-0.204555203536)*x[1]**o+(-0.628574073749)*x[1]
-        arg[3,4,1,0]=(0.126376796421)*x[0]**o+(0.174607814129)*x[0]+(0.68867194136)*x[1]**o+(0.940025934568)*x[1]
-        arg[3,4,1,1]=(0.583042444739)*x[0]**o+(-0.786981763836)*x[0]+(0.319397032405)*x[1]**o+(-0.324993351432)*x[1]
-        arg[3,4,2,0]=(-0.941997068836)*x[0]**o+(-0.892825520378)*x[0]+(0.275995419027)*x[1]**o+(0.841260061022)*x[1]
-        arg[3,4,2,1]=(0.520110030788)*x[0]**o+(0.519262786324)*x[0]+(0.861221788948)*x[1]**o+(-0.376714934937)*x[1]
-        ref[0,0,0,0]=(0.240887319278)*x_ref[0]**o+(-0.192166587545)*x_ref[0]+(0.0176974287409)*x_ref[1]**o+(0.100761748824)*x_ref[1]
-        ref[0,0,0,1]=(-0.549649845775)*x_ref[0]**o+(-0.293969245646)*x_ref[0]+(-0.605885325133)*x_ref[1]**o+(0.799558451173)*x_ref[1]
-        ref[0,0,1,0]=(-0.899658769582)*x_ref[0]**o+(0.484524193987)*x_ref[0]+(0.437485870351)*x_ref[1]**o+(-0.220549034927)*x_ref[1]
-        ref[0,0,1,1]=(-0.146539961793)*x_ref[0]**o+(-0.278343486929)*x_ref[0]+(0.0913912456082)*x_ref[1]**o+(-0.751028975123)*x_ref[1]
-        ref[0,0,2,0]=(0.806344701194)*x_ref[0]**o+(0.0537872824561)*x_ref[0]+(-0.70407828379)*x_ref[1]**o+(-0.922963486601)*x_ref[1]
-        ref[0,0,2,1]=(0.307202902495)*x_ref[0]**o+(0.301603506731)*x_ref[0]+(0.232983743616)*x_ref[1]**o+(-0.744267542759)*x_ref[1]
-        ref[0,1,0,0]=(-0.550616060824)*x_ref[0]**o+(-0.661367750254)*x_ref[0]+(-0.695905895864)*x_ref[1]**o+(-0.788045922398)*x_ref[1]
-        ref[0,1,0,1]=(-0.934169134035)*x_ref[0]**o+(-0.843861105521)*x_ref[0]+(-0.237877254439)*x_ref[1]**o+(-0.364956821348)*x_ref[1]
-        ref[0,1,1,0]=(0.0950675750026)*x_ref[0]**o+(-0.815510640594)*x_ref[0]+(0.72526035968)*x_ref[1]**o+(0.898675190106)*x_ref[1]
-        ref[0,1,1,1]=(0.715609066776)*x_ref[0]**o+(0.371314845206)*x_ref[0]+(0.326878867244)*x_ref[1]**o+(-0.468798950199)*x_ref[1]
-        ref[0,1,2,0]=(0.392175939547)*x_ref[0]**o+(0.105332682674)*x_ref[0]+(0.997967455477)*x_ref[1]**o+(0.0322491822496)*x_ref[1]
-        ref[0,1,2,1]=(-0.804498399187)*x_ref[0]**o+(0.819653744739)*x_ref[0]+(0.609610573703)*x_ref[1]**o+(-0.623299047794)*x_ref[1]
-        ref[0,2,0,0]=(0.993877917386)*x_ref[0]**o+(0.815952897899)*x_ref[0]+(-0.258432174486)*x_ref[1]**o+(0.209324387308)*x_ref[1]
-        ref[0,2,0,1]=(0.395946889364)*x_ref[0]**o+(-0.859500539908)*x_ref[0]+(-0.68495734785)*x_ref[1]**o+(0.791813946302)*x_ref[1]
-        ref[0,2,1,0]=(0.154347661108)*x_ref[0]**o+(0.0873140744322)*x_ref[0]+(-0.423935109956)*x_ref[1]**o+(-0.754297239226)*x_ref[1]
-        ref[0,2,1,1]=(-0.623998419484)*x_ref[0]**o+(0.487300130941)*x_ref[0]+(-0.323613219784)*x_ref[1]**o+(0.744877983729)*x_ref[1]
-        ref[0,2,2,0]=(0.515686374371)*x_ref[0]**o+(0.512572153346)*x_ref[0]+(-0.641245783272)*x_ref[1]**o+(-0.390660158759)*x_ref[1]
-        ref[0,2,2,1]=(0.24398238139)*x_ref[0]**o+(-0.172020271678)*x_ref[0]+(0.980197812701)*x_ref[1]**o+(0.336941934503)*x_ref[1]
-        ref[0,3,0,0]=(0.0154584447615)*x_ref[0]**o+(-0.547048191238)*x_ref[0]+(-0.555319223005)*x_ref[1]**o+(0.0972794598106)*x_ref[1]
-        ref[0,3,0,1]=(0.44744389335)*x_ref[0]**o+(0.475046337874)*x_ref[0]+(0.876228982066)*x_ref[1]**o+(-0.0636405241175)*x_ref[1]
-        ref[0,3,1,0]=(0.392948465298)*x_ref[0]**o+(-0.341342654182)*x_ref[0]+(0.747185683968)*x_ref[1]**o+(-0.99981172166)*x_ref[1]
-        ref[0,3,1,1]=(-0.172355321621)*x_ref[0]**o+(-0.531391484795)*x_ref[0]+(0.451654274019)*x_ref[1]**o+(0.0795298667915)*x_ref[1]
-        ref[0,3,2,0]=(0.0841642474674)*x_ref[0]**o+(0.308494435164)*x_ref[0]+(0.53181918181)*x_ref[1]**o+(0.480258067959)*x_ref[1]
-        ref[0,3,2,1]=(-0.222903054864)*x_ref[0]**o+(-0.0330655869754)*x_ref[0]+(0.227482525015)*x_ref[1]**o+(0.536136212347)*x_ref[1]
-        ref[0,4,0,0]=(0.574798381284)*x_ref[0]**o+(0.181354466484)*x_ref[0]+(0.103049514171)*x_ref[1]**o+(0.156282818835)*x_ref[1]
-        ref[0,4,0,1]=(0.478314255289)*x_ref[0]**o+(0.224797222592)*x_ref[0]+(0.307668606272)*x_ref[1]**o+(-0.785262182937)*x_ref[1]
-        ref[0,4,1,0]=(0.519356961182)*x_ref[0]**o+(0.646200458344)*x_ref[0]+(0.0522618783181)*x_ref[1]**o+(0.702335307324)*x_ref[1]
-        ref[0,4,1,1]=(-0.168756029541)*x_ref[0]**o+(-0.00618364750666)*x_ref[0]+(0.472704616213)*x_ref[1]**o+(0.974257451871)*x_ref[1]
-        ref[0,4,2,0]=(-0.279196869573)*x_ref[0]**o+(-0.333083174091)*x_ref[0]+(-0.980089574428)*x_ref[1]**o+(0.405273709405)*x_ref[1]
-        ref[0,4,2,1]=(-0.199431380673)*x_ref[0]**o+(0.823294899866)*x_ref[0]+(-0.174125117685)*x_ref[1]**o+(-0.730500493887)*x_ref[1]
-        ref[1,0,0,0]=(-0.577281489635)*x_ref[0]**o+(0.231906139898)*x_ref[0]+(0.537128708963)*x_ref[1]**o+(0.363444540898)*x_ref[1]
-        ref[1,0,0,1]=(0.204108541882)*x_ref[0]**o+(-0.217661714888)*x_ref[0]+(0.963384293759)*x_ref[1]**o+(-0.0817519801351)*x_ref[1]
-        ref[1,0,1,0]=(0.540681325439)*x_ref[0]**o+(-0.496036960808)*x_ref[0]+(0.421037689661)*x_ref[1]**o+(0.19399086996)*x_ref[1]
-        ref[1,0,1,1]=(0.482938542126)*x_ref[0]**o+(-0.0725027675209)*x_ref[0]+(-0.441517962054)*x_ref[1]**o+(0.787445860714)*x_ref[1]
-        ref[1,0,2,0]=(0.0378928111257)*x_ref[0]**o+(0.451368848019)*x_ref[0]+(-0.228668284485)*x_ref[1]**o+(0.505927229432)*x_ref[1]
-        ref[1,0,2,1]=(-0.59833518872)*x_ref[0]**o+(0.956068253354)*x_ref[0]+(0.667905995469)*x_ref[1]**o+(0.963273292214)*x_ref[1]
-        ref[1,1,0,0]=(0.901637865236)*x_ref[0]**o+(-0.642678971748)*x_ref[0]+(-0.603915019524)*x_ref[1]**o+(-0.208004993919)*x_ref[1]
-        ref[1,1,0,1]=(-0.227162661052)*x_ref[0]**o+(-0.5816434303)*x_ref[0]+(0.274961293801)*x_ref[1]**o+(-0.614001328621)*x_ref[1]
-        ref[1,1,1,0]=(0.078438078548)*x_ref[0]**o+(0.570191242883)*x_ref[0]+(0.0952878212484)*x_ref[1]**o+(0.844460205497)*x_ref[1]
-        ref[1,1,1,1]=(-0.901445811786)*x_ref[0]**o+(-0.996376775344)*x_ref[0]+(0.707470471613)*x_ref[1]**o+(-0.187517936674)*x_ref[1]
-        ref[1,1,2,0]=(-0.66891443067)*x_ref[0]**o+(0.0462057239324)*x_ref[0]+(-0.825820539128)*x_ref[1]**o+(-0.766932836843)*x_ref[1]
-        ref[1,1,2,1]=(-0.851428828811)*x_ref[0]**o+(0.504484422346)*x_ref[0]+(0.121378315545)*x_ref[1]**o+(0.903947012757)*x_ref[1]
-        ref[1,2,0,0]=(-0.393827449768)*x_ref[0]**o+(-0.251827904608)*x_ref[0]+(0.8320040882)*x_ref[1]**o+(0.57595149855)*x_ref[1]
-        ref[1,2,0,1]=(0.638738110712)*x_ref[0]**o+(-0.439962152539)*x_ref[0]+(-0.977211078995)*x_ref[1]**o+(0.0528475212451)*x_ref[1]
-        ref[1,2,1,0]=(0.824313588941)*x_ref[0]**o+(-0.589968996823)*x_ref[0]+(-0.512156794152)*x_ref[1]**o+(0.142809794443)*x_ref[1]
-        ref[1,2,1,1]=(-0.31789333147)*x_ref[0]**o+(0.598839896949)*x_ref[0]+(0.638319398651)*x_ref[1]**o+(0.353625999317)*x_ref[1]
-        ref[1,2,2,0]=(-0.720472365012)*x_ref[0]**o+(0.896538030051)*x_ref[0]+(-0.224639169972)*x_ref[1]**o+(-0.898299360738)*x_ref[1]
-        ref[1,2,2,1]=(0.123077707167)*x_ref[0]**o+(0.15922851038)*x_ref[0]+(0.678984783843)*x_ref[1]**o+(-0.778188269852)*x_ref[1]
-        ref[1,3,0,0]=(0.344256301209)*x_ref[0]**o+(0.884367738289)*x_ref[0]+(0.00556636219289)*x_ref[1]**o+(0.684361331195)*x_ref[1]
-        ref[1,3,0,1]=(-0.812245131065)*x_ref[0]**o+(0.971365671228)*x_ref[0]+(0.0696053239569)*x_ref[1]**o+(-0.300266235138)*x_ref[1]
-        ref[1,3,1,0]=(0.470254588058)*x_ref[0]**o+(0.0946825509913)*x_ref[0]+(-0.415619255025)*x_ref[1]**o+(-0.27381652858)*x_ref[1]
-        ref[1,3,1,1]=(-0.84555138241)*x_ref[0]**o+(0.873510832091)*x_ref[0]+(-0.138010338152)*x_ref[1]**o+(-0.982274515316)*x_ref[1]
-        ref[1,3,2,0]=(0.695614136148)*x_ref[0]**o+(-0.192588082771)*x_ref[0]+(-0.21579127791)*x_ref[1]**o+(-0.0335939736388)*x_ref[1]
-        ref[1,3,2,1]=(-0.633363463896)*x_ref[0]**o+(-0.958320549993)*x_ref[0]+(0.197331067481)*x_ref[1]**o+(0.315089888409)*x_ref[1]
-        ref[1,4,0,0]=(-0.211531219945)*x_ref[0]**o+(-0.399700721799)*x_ref[0]+(0.578927638839)*x_ref[1]**o+(-0.389034976195)*x_ref[1]
-        ref[1,4,0,1]=(-0.846399571893)*x_ref[0]**o+(-0.952904755903)*x_ref[0]+(-0.858399802693)*x_ref[1]**o+(-0.23264354907)*x_ref[1]
-        ref[1,4,1,0]=(0.255822441586)*x_ref[0]**o+(0.896237710393)*x_ref[0]+(-0.90248008271)*x_ref[1]**o+(0.654804848244)*x_ref[1]
-        ref[1,4,1,1]=(-0.112475508163)*x_ref[0]**o+(-0.861697204453)*x_ref[0]+(-0.782581931187)*x_ref[1]**o+(-0.129345341581)*x_ref[1]
-        ref[1,4,2,0]=(0.690095687033)*x_ref[0]**o+(0.729317334019)*x_ref[0]+(-0.00961483612288)*x_ref[1]**o+(-0.288320551243)*x_ref[1]
-        ref[1,4,2,1]=(-0.648146433517)*x_ref[0]**o+(-0.301246601263)*x_ref[0]+(-0.490119612994)*x_ref[1]**o+(0.231186845615)*x_ref[1]
-        ref[2,0,0,0]=(-0.645560891595)*x_ref[0]**o+(-0.889067544988)*x_ref[0]+(-0.193353414221)*x_ref[1]**o+(-0.726988479344)*x_ref[1]
-        ref[2,0,0,1]=(-0.083614738484)*x_ref[0]**o+(-0.822530927241)*x_ref[0]+(0.660338934241)*x_ref[1]**o+(0.0383821036508)*x_ref[1]
-        ref[2,0,1,0]=(-0.132250736664)*x_ref[0]**o+(-0.571474370931)*x_ref[0]+(-0.755931100342)*x_ref[1]**o+(-0.145196865115)*x_ref[1]
-        ref[2,0,1,1]=(0.545219196727)*x_ref[0]**o+(-0.846368787913)*x_ref[0]+(-0.845706160842)*x_ref[1]**o+(0.550703610989)*x_ref[1]
-        ref[2,0,2,0]=(-0.766303732195)*x_ref[0]**o+(0.156822893641)*x_ref[0]+(0.00954334254282)*x_ref[1]**o+(0.201506144561)*x_ref[1]
-        ref[2,0,2,1]=(-0.274476449632)*x_ref[0]**o+(-0.361690468185)*x_ref[0]+(-0.816535747268)*x_ref[1]**o+(-0.473913811701)*x_ref[1]
-        ref[2,1,0,0]=(-0.927592771482)*x_ref[0]**o+(0.534615269814)*x_ref[0]+(-0.571217133452)*x_ref[1]**o+(0.57448299216)*x_ref[1]
-        ref[2,1,0,1]=(-0.298153953211)*x_ref[0]**o+(-0.143636909462)*x_ref[0]+(0.990660288864)*x_ref[1]**o+(-0.495864284763)*x_ref[1]
-        ref[2,1,1,0]=(-0.110625727208)*x_ref[0]**o+(-0.221057774317)*x_ref[0]+(0.557195078358)*x_ref[1]**o+(0.803162691808)*x_ref[1]
-        ref[2,1,1,1]=(-0.115589176775)*x_ref[0]**o+(0.08253351782)*x_ref[0]+(-0.595996958977)*x_ref[1]**o+(0.501435717501)*x_ref[1]
-        ref[2,1,2,0]=(0.78764976658)*x_ref[0]**o+(0.966729831711)*x_ref[0]+(-0.585879575667)*x_ref[1]**o+(0.341148176793)*x_ref[1]
-        ref[2,1,2,1]=(-0.551697945691)*x_ref[0]**o+(0.545857249323)*x_ref[0]+(-0.919321724495)*x_ref[1]**o+(-0.286043327415)*x_ref[1]
-        ref[2,2,0,0]=(-0.669933890655)*x_ref[0]**o+(-0.344862118495)*x_ref[0]+(0.878331282597)*x_ref[1]**o+(0.881893760718)*x_ref[1]
-        ref[2,2,0,1]=(-0.217876618414)*x_ref[0]**o+(-0.289118007199)*x_ref[0]+(0.513464171525)*x_ref[1]**o+(0.310055899102)*x_ref[1]
-        ref[2,2,1,0]=(0.0472051379154)*x_ref[0]**o+(0.42455388451)*x_ref[0]+(-0.920571834891)*x_ref[1]**o+(-0.779095076537)*x_ref[1]
-        ref[2,2,1,1]=(-0.299619304537)*x_ref[0]**o+(-0.289777287294)*x_ref[0]+(0.920505062988)*x_ref[1]**o+(-0.243924179095)*x_ref[1]
-        ref[2,2,2,0]=(-0.819343530877)*x_ref[0]**o+(0.975953690875)*x_ref[0]+(-0.787239459241)*x_ref[1]**o+(-0.199900734691)*x_ref[1]
-        ref[2,2,2,1]=(0.0980085780878)*x_ref[0]**o+(0.642946515451)*x_ref[0]+(0.951790535152)*x_ref[1]**o+(-0.253914817366)*x_ref[1]
-        ref[2,3,0,0]=(-0.882075522824)*x_ref[0]**o+(0.200934502682)*x_ref[0]+(-0.83200464496)*x_ref[1]**o+(0.941479345375)*x_ref[1]
-        ref[2,3,0,1]=(-0.615941782209)*x_ref[0]**o+(-0.693242388092)*x_ref[0]+(-0.640417278871)*x_ref[1]**o+(-0.346459094803)*x_ref[1]
-        ref[2,3,1,0]=(-0.447919427952)*x_ref[0]**o+(0.205055689141)*x_ref[0]+(-0.453290032411)*x_ref[1]**o+(0.879062836521)*x_ref[1]
-        ref[2,3,1,1]=(0.721133924016)*x_ref[0]**o+(0.71294558459)*x_ref[0]+(-0.250087045805)*x_ref[1]**o+(0.605146721129)*x_ref[1]
-        ref[2,3,2,0]=(0.247782322921)*x_ref[0]**o+(-0.956367425119)*x_ref[0]+(-0.054045082005)*x_ref[1]**o+(-0.128151832132)*x_ref[1]
-        ref[2,3,2,1]=(-0.427039259088)*x_ref[0]**o+(-0.359849242839)*x_ref[0]+(-0.244990934481)*x_ref[1]**o+(-0.038020035629)*x_ref[1]
-        ref[2,4,0,0]=(-0.216409150834)*x_ref[0]**o+(0.492547989921)*x_ref[0]+(0.878317438469)*x_ref[1]**o+(-0.112718719119)*x_ref[1]
-        ref[2,4,0,1]=(0.487403443102)*x_ref[0]**o+(0.228155519468)*x_ref[0]+(0.923150527516)*x_ref[1]**o+(0.642654867908)*x_ref[1]
-        ref[2,4,1,0]=(0.916418483417)*x_ref[0]**o+(-0.177198935173)*x_ref[0]+(-0.790548940412)*x_ref[1]**o+(0.87540167052)*x_ref[1]
-        ref[2,4,1,1]=(0.718502075538)*x_ref[0]**o+(0.691254010569)*x_ref[0]+(-0.0134430122729)*x_ref[1]**o+(-0.739888770749)*x_ref[1]
-        ref[2,4,2,0]=(0.287825086861)*x_ref[0]**o+(0.596621809347)*x_ref[0]+(0.729784205391)*x_ref[1]**o+(-0.25984257955)*x_ref[1]
-        ref[2,4,2,1]=(-0.515102480025)*x_ref[0]**o+(-0.609951840015)*x_ref[0]+(0.229834340075)*x_ref[1]**o+(-0.727157816241)*x_ref[1]
-        ref[3,0,0,0]=(-0.349406091363)*x_ref[0]**o+(0.802348451103)*x_ref[0]+(-0.174421346276)*x_ref[1]**o+(0.120711198036)*x_ref[1]
-        ref[3,0,0,1]=(0.367085169423)*x_ref[0]**o+(-0.319683236434)*x_ref[0]+(-0.590820542566)*x_ref[1]**o+(0.607625953303)*x_ref[1]
-        ref[3,0,1,0]=(0.231259976433)*x_ref[0]**o+(-0.493297408825)*x_ref[0]+(0.919363640504)*x_ref[1]**o+(-0.839841270429)*x_ref[1]
-        ref[3,0,1,1]=(0.57672135684)*x_ref[0]**o+(0.882062879704)*x_ref[0]+(-0.600979706444)*x_ref[1]**o+(-0.704008344509)*x_ref[1]
-        ref[3,0,2,0]=(-0.208162114527)*x_ref[0]**o+(0.593682243052)*x_ref[0]+(-0.428436832487)*x_ref[1]**o+(0.51007021604)*x_ref[1]
-        ref[3,0,2,1]=(0.315264672653)*x_ref[0]**o+(-0.0835897376534)*x_ref[0]+(-0.135315173106)*x_ref[1]**o+(-0.646372309498)*x_ref[1]
-        ref[3,1,0,0]=(0.815505953752)*x_ref[0]**o+(0.0625493643292)*x_ref[0]+(0.383118433815)*x_ref[1]**o+(0.17372720435)*x_ref[1]
-        ref[3,1,0,1]=(0.557295786969)*x_ref[0]**o+(-0.568823508165)*x_ref[0]+(-0.00874733267675)*x_ref[1]**o+(-0.27454140598)*x_ref[1]
-        ref[3,1,1,0]=(0.649021026591)*x_ref[0]**o+(0.232255030448)*x_ref[0]+(0.845939296425)*x_ref[1]**o+(0.116387378294)*x_ref[1]
-        ref[3,1,1,1]=(0.431124940343)*x_ref[0]**o+(-0.0865937271969)*x_ref[0]+(0.937911741288)*x_ref[1]**o+(0.362850039234)*x_ref[1]
-        ref[3,1,2,0]=(0.155965414439)*x_ref[0]**o+(0.110850421841)*x_ref[0]+(0.244563080191)*x_ref[1]**o+(0.266325498006)*x_ref[1]
-        ref[3,1,2,1]=(0.766813300935)*x_ref[0]**o+(0.77492422889)*x_ref[0]+(-0.0141436554714)*x_ref[1]**o+(0.780444449009)*x_ref[1]
-        ref[3,2,0,0]=(0.619086019019)*x_ref[0]**o+(-0.574130567601)*x_ref[0]+(-0.417708159593)*x_ref[1]**o+(0.707727284254)*x_ref[1]
-        ref[3,2,0,1]=(-0.845657409353)*x_ref[0]**o+(0.705282507748)*x_ref[0]+(0.124557418112)*x_ref[1]**o+(-0.337493494733)*x_ref[1]
-        ref[3,2,1,0]=(0.114875146211)*x_ref[0]**o+(-0.724480426892)*x_ref[0]+(-0.0763476904405)*x_ref[1]**o+(0.12064907114)*x_ref[1]
-        ref[3,2,1,1]=(-0.74994413376)*x_ref[0]**o+(-0.916476035217)*x_ref[0]+(-0.360412756599)*x_ref[1]**o+(-0.917457363098)*x_ref[1]
-        ref[3,2,2,0]=(-0.446839470984)*x_ref[0]**o+(-0.097704838316)*x_ref[0]+(-0.653584364909)*x_ref[1]**o+(0.561014757758)*x_ref[1]
-        ref[3,2,2,1]=(-0.178975301038)*x_ref[0]**o+(-0.843669982667)*x_ref[0]+(-0.566610094242)*x_ref[1]**o+(0.213047649003)*x_ref[1]
-        ref[3,3,0,0]=(0.144115764355)*x_ref[0]**o+(0.199435411954)*x_ref[0]+(0.173334385199)*x_ref[1]**o+(-0.942957035808)*x_ref[1]
-        ref[3,3,0,1]=(-0.417589926342)*x_ref[0]**o+(-0.819188022852)*x_ref[0]+(-0.68299160003)*x_ref[1]**o+(-0.314851447894)*x_ref[1]
-        ref[3,3,1,0]=(0.737898219164)*x_ref[0]**o+(0.612906277393)*x_ref[0]+(-0.768349396729)*x_ref[1]**o+(-0.192998755095)*x_ref[1]
-        ref[3,3,1,1]=(0.35433362007)*x_ref[0]**o+(0.894174225208)*x_ref[0]+(-0.450333030837)*x_ref[1]**o+(0.819450589483)*x_ref[1]
-        ref[3,3,2,0]=(-0.455377131302)*x_ref[0]**o+(-0.748183144687)*x_ref[0]+(-0.482739450231)*x_ref[1]**o+(0.300625929022)*x_ref[1]
-        ref[3,3,2,1]=(-0.602766693698)*x_ref[0]**o+(-0.416288436985)*x_ref[0]+(0.837501983536)*x_ref[1]**o+(-0.745935308188)*x_ref[1]
-        ref[3,4,0,0]=(-0.706774010405)*x_ref[0]**o+(0.407766818701)*x_ref[0]+(-0.248964401443)*x_ref[1]**o+(0.675466487229)*x_ref[1]
-        ref[3,4,0,1]=(0.512302883876)*x_ref[0]**o+(0.0809544867105)*x_ref[0]+(-0.204555203536)*x_ref[1]**o+(-0.628574073749)*x_ref[1]
-        ref[3,4,1,0]=(0.126376796421)*x_ref[0]**o+(0.174607814129)*x_ref[0]+(0.68867194136)*x_ref[1]**o+(0.940025934568)*x_ref[1]
-        ref[3,4,1,1]=(0.583042444739)*x_ref[0]**o+(-0.786981763836)*x_ref[0]+(0.319397032405)*x_ref[1]**o+(-0.324993351432)*x_ref[1]
-        ref[3,4,2,0]=(-0.941997068836)*x_ref[0]**o+(-0.892825520378)*x_ref[0]+(0.275995419027)*x_ref[1]**o+(0.841260061022)*x_ref[1]
-        ref[3,4,2,1]=(0.520110030788)*x_ref[0]**o+(0.519262786324)*x_ref[0]+(0.861221788948)*x_ref[1]**o+(-0.376714934937)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.615899511086)*x[0]**o+(0.823637401824)*x[0]+(-0.986967740198)*x[1]**o+(-0.782088977641)*x[1]+(-0.576799974679)*x[2]**o+(-0.910942885711)*x[2]
-        arg[0,0,0,1]=(-0.790830593449)*x[0]**o+(-0.897724279499)*x[0]+(-0.881691805807)*x[1]**o+(-0.133793238901)*x[1]+(-0.0903391684489)*x[2]**o+(0.659893469877)*x[2]
-        arg[0,0,1,0]=(-0.0567117900114)*x[0]**o+(-0.858031985686)*x[0]+(-0.397443445702)*x[1]**o+(0.549982838823)*x[1]+(-0.636905143813)*x[2]**o+(0.8488142632)*x[2]
-        arg[0,0,1,1]=(-0.644557373082)*x[0]**o+(-0.323654898522)*x[0]+(0.210458705923)*x[1]**o+(0.990436827296)*x[1]+(-0.597872757151)*x[2]**o+(-0.83865548618)*x[2]
-        arg[0,0,2,0]=(-0.29830667084)*x[0]**o+(0.327035546909)*x[0]+(0.132690049791)*x[1]**o+(-0.55625443282)*x[1]+(0.0972781385283)*x[2]**o+(0.151885837608)*x[2]
-        arg[0,0,2,1]=(-0.435983465578)*x[0]**o+(-0.0852522953446)*x[0]+(0.257654807094)*x[1]**o+(-0.336603197583)*x[1]+(0.637913421592)*x[2]**o+(0.8151042055)*x[2]
-        arg[0,1,0,0]=(-0.0373980191125)*x[0]**o+(-0.45937285505)*x[0]+(-0.857933684889)*x[1]**o+(-0.843826686256)*x[1]+(-0.727077320504)*x[2]**o+(-0.65222863395)*x[2]
-        arg[0,1,0,1]=(0.63426017384)*x[0]**o+(0.845708641601)*x[0]+(0.246160302486)*x[1]**o+(-0.660855572094)*x[1]+(0.67420981328)*x[2]**o+(-0.280803968781)*x[2]
-        arg[0,1,1,0]=(0.881193264597)*x[0]**o+(-0.881936969515)*x[0]+(-0.883246837152)*x[1]**o+(0.182222471927)*x[1]+(0.405380496272)*x[2]**o+(0.175721746883)*x[2]
-        arg[0,1,1,1]=(-0.44447667237)*x[0]**o+(0.956169274606)*x[0]+(0.0370532940652)*x[1]**o+(-0.181239635583)*x[1]+(-0.678412161285)*x[2]**o+(-0.653172157401)*x[2]
-        arg[0,1,2,0]=(-0.50038634718)*x[0]**o+(0.00278321765167)*x[0]+(-0.831539460218)*x[1]**o+(-0.555243320385)*x[1]+(-0.626789452003)*x[2]**o+(-0.495085243933)*x[2]
-        arg[0,1,2,1]=(-0.32886359569)*x[0]**o+(0.406099965475)*x[0]+(0.764756177266)*x[1]**o+(-0.272070344181)*x[1]+(-0.41812596516)*x[2]**o+(0.349063696376)*x[2]
-        arg[0,2,0,0]=(-0.580544978365)*x[0]**o+(0.53441241334)*x[0]+(-0.808749795876)*x[1]**o+(0.172110801632)*x[1]+(-0.939262606098)*x[2]**o+(-0.724859325104)*x[2]
-        arg[0,2,0,1]=(0.256335221944)*x[0]**o+(0.463522371018)*x[0]+(0.990516478508)*x[1]**o+(0.423931177054)*x[1]+(0.184277693683)*x[2]**o+(-0.272967447689)*x[2]
-        arg[0,2,1,0]=(-0.126943811008)*x[0]**o+(0.645821387926)*x[0]+(0.150370174987)*x[1]**o+(-0.150954538301)*x[1]+(-0.378720078559)*x[2]**o+(0.0975963807109)*x[2]
-        arg[0,2,1,1]=(-0.451434544339)*x[0]**o+(0.557314109088)*x[0]+(-0.0402970749558)*x[1]**o+(0.306984557206)*x[1]+(-0.297018139186)*x[2]**o+(0.593800698785)*x[2]
-        arg[0,2,2,0]=(-0.376199144911)*x[0]**o+(-0.230454116373)*x[0]+(0.992738297651)*x[1]**o+(0.183510534927)*x[1]+(0.409381711992)*x[2]**o+(0.171945265727)*x[2]
-        arg[0,2,2,1]=(0.363233095971)*x[0]**o+(-0.130589148249)*x[0]+(0.809611042018)*x[1]**o+(-0.354546307961)*x[1]+(0.0631410169203)*x[2]**o+(0.630306161781)*x[2]
-        arg[0,3,0,0]=(0.49655016161)*x[0]**o+(0.878957258614)*x[0]+(-0.397408696784)*x[1]**o+(-0.199445321288)*x[1]+(0.929857086663)*x[2]**o+(-0.648770887161)*x[2]
-        arg[0,3,0,1]=(-0.85578334594)*x[0]**o+(-0.294617109229)*x[0]+(-0.0790295769768)*x[1]**o+(0.82151942311)*x[1]+(0.541628117444)*x[2]**o+(0.805418174827)*x[2]
-        arg[0,3,1,0]=(0.800775454804)*x[0]**o+(0.599550462983)*x[0]+(-0.384788634082)*x[1]**o+(-0.356933972363)*x[1]+(-0.423116265473)*x[2]**o+(-0.125492982003)*x[2]
-        arg[0,3,1,1]=(0.929652994661)*x[0]**o+(-0.57396682406)*x[0]+(0.313584116036)*x[1]**o+(-0.190575043496)*x[1]+(-0.29110884935)*x[2]**o+(0.967530639925)*x[2]
-        arg[0,3,2,0]=(0.761136478868)*x[0]**o+(0.565721170014)*x[0]+(0.239619122131)*x[1]**o+(-0.0821651979956)*x[1]+(-0.699218775545)*x[2]**o+(0.19973415585)*x[2]
-        arg[0,3,2,1]=(0.209543244648)*x[0]**o+(0.93957796874)*x[0]+(0.354405887426)*x[1]**o+(0.504177262864)*x[1]+(0.446866674894)*x[2]**o+(-0.522936485464)*x[2]
-        arg[0,4,0,0]=(0.427541399652)*x[0]**o+(-0.114806067206)*x[0]+(0.236780877643)*x[1]**o+(0.422226381272)*x[1]+(-0.506450961214)*x[2]**o+(0.616091720212)*x[2]
-        arg[0,4,0,1]=(0.698773571323)*x[0]**o+(-0.357878713085)*x[0]+(-0.453730359129)*x[1]**o+(-0.328701041355)*x[1]+(-0.28646346679)*x[2]**o+(-0.0449784265203)*x[2]
-        arg[0,4,1,0]=(-0.419416306509)*x[0]**o+(-0.1970394955)*x[0]+(-0.814008932379)*x[1]**o+(-0.805127589929)*x[1]+(0.244059789875)*x[2]**o+(-0.983027843847)*x[2]
-        arg[0,4,1,1]=(0.84837346004)*x[0]**o+(0.501808510624)*x[0]+(-0.105800351358)*x[1]**o+(0.903999231718)*x[1]+(-0.0473996978124)*x[2]**o+(0.683647253381)*x[2]
-        arg[0,4,2,0]=(0.658722899682)*x[0]**o+(-0.401846635016)*x[0]+(-0.967322202581)*x[1]**o+(-0.948306922217)*x[1]+(0.496409308219)*x[2]**o+(-0.184768777052)*x[2]
-        arg[0,4,2,1]=(-0.454468390888)*x[0]**o+(-0.220640468215)*x[0]+(0.995269925943)*x[1]**o+(0.778951329211)*x[1]+(0.0439534466302)*x[2]**o+(0.806197038383)*x[2]
-        arg[1,0,0,0]=(-0.547461802236)*x[0]**o+(0.370768827789)*x[0]+(-0.619991757552)*x[1]**o+(0.391727195645)*x[1]+(-0.649274922953)*x[2]**o+(-0.478788248429)*x[2]
-        arg[1,0,0,1]=(-0.899230505882)*x[0]**o+(0.603064321735)*x[0]+(-0.737475386349)*x[1]**o+(0.594197953001)*x[1]+(0.341324049064)*x[2]**o+(0.285202633917)*x[2]
-        arg[1,0,1,0]=(-0.107063589618)*x[0]**o+(-0.260491562358)*x[0]+(-0.667059815618)*x[1]**o+(0.473227354537)*x[1]+(-0.587170510558)*x[2]**o+(-0.740299218393)*x[2]
-        arg[1,0,1,1]=(0.87705715098)*x[0]**o+(0.312753471827)*x[0]+(-0.307530283315)*x[1]**o+(0.195564644822)*x[1]+(-0.64384485166)*x[2]**o+(-0.776362951729)*x[2]
-        arg[1,0,2,0]=(0.0949408564739)*x[0]**o+(0.765922179855)*x[0]+(0.441215568253)*x[1]**o+(0.339112969437)*x[1]+(-0.0774615292449)*x[2]**o+(0.673258055783)*x[2]
-        arg[1,0,2,1]=(0.114828212302)*x[0]**o+(0.0831258766277)*x[0]+(0.674540402248)*x[1]**o+(-0.304921039094)*x[1]+(-0.725514770578)*x[2]**o+(-0.627584773746)*x[2]
-        arg[1,1,0,0]=(0.291561714675)*x[0]**o+(0.898587624783)*x[0]+(0.476696264545)*x[1]**o+(-0.454648604978)*x[1]+(0.677949150743)*x[2]**o+(-0.59438289851)*x[2]
-        arg[1,1,0,1]=(0.356687258009)*x[0]**o+(0.806236251629)*x[0]+(0.843636690354)*x[1]**o+(-0.649776947181)*x[1]+(0.208542122388)*x[2]**o+(-0.0726045573458)*x[2]
-        arg[1,1,1,0]=(0.712800450558)*x[0]**o+(0.748271875755)*x[0]+(0.403880649356)*x[1]**o+(0.956549336754)*x[1]+(0.0420128495043)*x[2]**o+(-0.83177870499)*x[2]
-        arg[1,1,1,1]=(-0.886862904174)*x[0]**o+(-0.03822986594)*x[0]+(0.587151517496)*x[1]**o+(-0.120272060898)*x[1]+(-0.573366391933)*x[2]**o+(-0.59772763241)*x[2]
-        arg[1,1,2,0]=(0.311960197804)*x[0]**o+(0.486854949444)*x[0]+(-0.647995651954)*x[1]**o+(0.30104277964)*x[1]+(-0.174718703748)*x[2]**o+(-0.506993216295)*x[2]
-        arg[1,1,2,1]=(0.979056206991)*x[0]**o+(0.892104464812)*x[0]+(0.0507432703245)*x[1]**o+(0.103630858454)*x[1]+(-0.0254965952266)*x[2]**o+(0.13034027239)*x[2]
-        arg[1,2,0,0]=(0.259797966548)*x[0]**o+(0.53018999371)*x[0]+(0.533745722992)*x[1]**o+(0.53029084173)*x[1]+(-0.595126791061)*x[2]**o+(-0.51668295558)*x[2]
-        arg[1,2,0,1]=(0.926395590808)*x[0]**o+(-0.0700141207179)*x[0]+(-0.973392454012)*x[1]**o+(-0.46204067097)*x[1]+(0.814964497207)*x[2]**o+(-0.183546091376)*x[2]
-        arg[1,2,1,0]=(-0.0872635441658)*x[0]**o+(-0.0307630839035)*x[0]+(0.539798653095)*x[1]**o+(0.966367734848)*x[1]+(-0.817495053612)*x[2]**o+(-0.268397867848)*x[2]
-        arg[1,2,1,1]=(-0.933074613921)*x[0]**o+(0.48896533938)*x[0]+(0.453696133488)*x[1]**o+(-0.238730406749)*x[1]+(-0.696785951086)*x[2]**o+(-0.359858385642)*x[2]
-        arg[1,2,2,0]=(-0.844406286809)*x[0]**o+(-0.506332243946)*x[0]+(0.976436731658)*x[1]**o+(-0.201489161857)*x[1]+(0.851236173166)*x[2]**o+(-0.998803612947)*x[2]
-        arg[1,2,2,1]=(0.259707321449)*x[0]**o+(-0.888149478655)*x[0]+(-0.273502842869)*x[1]**o+(0.291193582158)*x[1]+(-0.897542178027)*x[2]**o+(-0.345994824429)*x[2]
-        arg[1,3,0,0]=(0.961298984697)*x[0]**o+(0.248141115092)*x[0]+(-0.623053025178)*x[1]**o+(-0.775095452078)*x[1]+(0.955362707049)*x[2]**o+(-0.517547333705)*x[2]
-        arg[1,3,0,1]=(0.858098596227)*x[0]**o+(0.309307483873)*x[0]+(-0.209217034755)*x[1]**o+(0.783803593379)*x[1]+(0.138164128092)*x[2]**o+(-0.922854003461)*x[2]
-        arg[1,3,1,0]=(-0.139017942141)*x[0]**o+(-0.338223039119)*x[0]+(0.737882941498)*x[1]**o+(0.948854903087)*x[1]+(-0.0792461633266)*x[2]**o+(0.848875660203)*x[2]
-        arg[1,3,1,1]=(0.693284332212)*x[0]**o+(-0.392272875348)*x[0]+(-0.475709045479)*x[1]**o+(0.182948077236)*x[1]+(0.0277569761538)*x[2]**o+(-0.550294947596)*x[2]
-        arg[1,3,2,0]=(-0.105381649505)*x[0]**o+(-0.403051690238)*x[0]+(-0.722219735818)*x[1]**o+(-0.380114388869)*x[1]+(0.321452572491)*x[2]**o+(0.858583245253)*x[2]
-        arg[1,3,2,1]=(-0.405370062024)*x[0]**o+(0.0743704840047)*x[0]+(0.998947017815)*x[1]**o+(0.983611079522)*x[1]+(0.854202982674)*x[2]**o+(0.288478746498)*x[2]
-        arg[1,4,0,0]=(0.0584782489998)*x[0]**o+(0.999286927604)*x[0]+(-0.458166020555)*x[1]**o+(0.529008844128)*x[1]+(0.424592641922)*x[2]**o+(-0.489692340187)*x[2]
-        arg[1,4,0,1]=(-0.150555966138)*x[0]**o+(0.362589320838)*x[0]+(0.515820915391)*x[1]**o+(0.742403661312)*x[1]+(0.230278843183)*x[2]**o+(-0.213977724366)*x[2]
-        arg[1,4,1,0]=(-0.361161802362)*x[0]**o+(-0.49718332222)*x[0]+(0.143956046197)*x[1]**o+(-0.044550912758)*x[1]+(-0.299892874708)*x[2]**o+(0.370248709792)*x[2]
-        arg[1,4,1,1]=(0.259365238173)*x[0]**o+(-0.474694548557)*x[0]+(0.732983396669)*x[1]**o+(-0.295151546774)*x[1]+(-0.337144628526)*x[2]**o+(0.664201775714)*x[2]
-        arg[1,4,2,0]=(-0.318016754284)*x[0]**o+(0.555291443852)*x[0]+(0.538150727998)*x[1]**o+(-0.800118353132)*x[1]+(0.652262386596)*x[2]**o+(0.303156645857)*x[2]
-        arg[1,4,2,1]=(0.0827142921796)*x[0]**o+(-0.88498648372)*x[0]+(-0.941249844349)*x[1]**o+(-0.162576659039)*x[1]+(0.867621252192)*x[2]**o+(0.0834583795227)*x[2]
-        arg[2,0,0,0]=(0.0670088199264)*x[0]**o+(-0.0425961894346)*x[0]+(0.329605789302)*x[1]**o+(0.860453156363)*x[1]+(-0.37410469727)*x[2]**o+(0.55476432384)*x[2]
-        arg[2,0,0,1]=(0.801738221879)*x[0]**o+(-0.836563530923)*x[0]+(-0.449651673142)*x[1]**o+(-0.19423133918)*x[1]+(0.947648200044)*x[2]**o+(0.0854067601423)*x[2]
-        arg[2,0,1,0]=(0.986595046855)*x[0]**o+(-0.358319352175)*x[0]+(0.493917713513)*x[1]**o+(-0.92052282445)*x[1]+(-0.692726467259)*x[2]**o+(-0.0636943737807)*x[2]
-        arg[2,0,1,1]=(0.38491150492)*x[0]**o+(0.766893245938)*x[0]+(0.420188917945)*x[1]**o+(0.43760538854)*x[1]+(-0.770749451981)*x[2]**o+(0.124882164378)*x[2]
-        arg[2,0,2,0]=(0.775715718797)*x[0]**o+(0.89516703208)*x[0]+(-0.829021524898)*x[1]**o+(-0.650262454311)*x[1]+(-0.812556336598)*x[2]**o+(-0.997075743997)*x[2]
-        arg[2,0,2,1]=(0.3503761008)*x[0]**o+(-0.822009897455)*x[0]+(-0.657657365354)*x[1]**o+(0.476295612156)*x[1]+(0.315554008711)*x[2]**o+(0.691631078049)*x[2]
-        arg[2,1,0,0]=(0.680177375433)*x[0]**o+(-0.922726813311)*x[0]+(-0.581116746321)*x[1]**o+(0.628138099343)*x[1]+(-0.568262800293)*x[2]**o+(-0.228201382395)*x[2]
-        arg[2,1,0,1]=(0.210094833324)*x[0]**o+(0.281549673876)*x[0]+(0.23785231073)*x[1]**o+(-0.103812455993)*x[1]+(0.530445971191)*x[2]**o+(-0.0830520449939)*x[2]
-        arg[2,1,1,0]=(0.367133297563)*x[0]**o+(0.168289954585)*x[0]+(0.614117392787)*x[1]**o+(0.790467766841)*x[1]+(-0.958002150805)*x[2]**o+(0.328916248824)*x[2]
-        arg[2,1,1,1]=(0.089535347231)*x[0]**o+(-0.93155993701)*x[0]+(-0.674670760794)*x[1]**o+(-0.274148261773)*x[1]+(-0.807020126056)*x[2]**o+(-0.323334769496)*x[2]
-        arg[2,1,2,0]=(-0.948679835219)*x[0]**o+(-0.577235742425)*x[0]+(-0.732584834146)*x[1]**o+(-0.475242504288)*x[1]+(0.213663223262)*x[2]**o+(-0.151401354381)*x[2]
-        arg[2,1,2,1]=(0.264513246206)*x[0]**o+(-0.605806437391)*x[0]+(-0.058730926693)*x[1]**o+(-0.661696304412)*x[1]+(-0.361277352457)*x[2]**o+(-0.804408258253)*x[2]
-        arg[2,2,0,0]=(-0.144562358054)*x[0]**o+(-0.0960550555725)*x[0]+(-0.905096867803)*x[1]**o+(0.188861784103)*x[1]+(-0.616751005568)*x[2]**o+(0.604711974248)*x[2]
-        arg[2,2,0,1]=(-0.0582524307858)*x[0]**o+(-0.503648879785)*x[0]+(-0.682755209956)*x[1]**o+(-0.808213164425)*x[1]+(0.539987276327)*x[2]**o+(0.650557703689)*x[2]
-        arg[2,2,1,0]=(0.0607729567733)*x[0]**o+(-0.498819638428)*x[0]+(0.434442595334)*x[1]**o+(-0.491063977603)*x[1]+(0.499436212229)*x[2]**o+(-0.932071991206)*x[2]
-        arg[2,2,1,1]=(-0.461295295294)*x[0]**o+(-0.153600767916)*x[0]+(-0.86452392231)*x[1]**o+(0.136760034153)*x[1]+(-0.471642416082)*x[2]**o+(0.453820403438)*x[2]
-        arg[2,2,2,0]=(-0.970051888584)*x[0]**o+(0.415728825057)*x[0]+(0.971643909569)*x[1]**o+(0.923719420524)*x[1]+(-0.837313513804)*x[2]**o+(-0.738057676093)*x[2]
-        arg[2,2,2,1]=(-0.941355918089)*x[0]**o+(-0.9629784524)*x[0]+(-0.931184348072)*x[1]**o+(0.720006097658)*x[1]+(-0.140750567978)*x[2]**o+(0.55381939119)*x[2]
-        arg[2,3,0,0]=(0.753455933669)*x[0]**o+(0.352384922037)*x[0]+(0.737644348002)*x[1]**o+(-0.565144188248)*x[1]+(0.257417624014)*x[2]**o+(-0.660006641683)*x[2]
-        arg[2,3,0,1]=(0.886996770925)*x[0]**o+(-0.876595418252)*x[0]+(-0.189778073871)*x[1]**o+(0.560867442336)*x[1]+(-0.262338156346)*x[2]**o+(0.614749098901)*x[2]
-        arg[2,3,1,0]=(-0.722912374016)*x[0]**o+(0.447451310273)*x[0]+(0.397510140568)*x[1]**o+(0.932405917932)*x[1]+(-0.206969252336)*x[2]**o+(-0.897366208888)*x[2]
-        arg[2,3,1,1]=(0.106324074547)*x[0]**o+(0.822109425884)*x[0]+(0.62699223277)*x[1]**o+(0.238371557839)*x[1]+(-0.422051841243)*x[2]**o+(0.868932130329)*x[2]
-        arg[2,3,2,0]=(0.0155790371581)*x[0]**o+(-0.696029577918)*x[0]+(0.259909585217)*x[1]**o+(0.260209121862)*x[1]+(0.780977081459)*x[2]**o+(-0.819957534538)*x[2]
-        arg[2,3,2,1]=(0.736223721904)*x[0]**o+(-0.433132598174)*x[0]+(-0.880913649812)*x[1]**o+(-0.375988777461)*x[1]+(-0.351763406307)*x[2]**o+(0.948468252467)*x[2]
-        arg[2,4,0,0]=(0.943349180556)*x[0]**o+(-0.720044514103)*x[0]+(0.671900161807)*x[1]**o+(0.358571142942)*x[1]+(-0.132755998648)*x[2]**o+(0.0749815044365)*x[2]
-        arg[2,4,0,1]=(0.639070752347)*x[0]**o+(0.551441363406)*x[0]+(0.507547844432)*x[1]**o+(-0.800043772307)*x[1]+(-0.506359503394)*x[2]**o+(0.952191432651)*x[2]
-        arg[2,4,1,0]=(-0.655864732254)*x[0]**o+(0.142198390642)*x[0]+(0.075292486702)*x[1]**o+(0.191013189029)*x[1]+(0.106768453247)*x[2]**o+(0.974526515449)*x[2]
-        arg[2,4,1,1]=(-0.354750205648)*x[0]**o+(0.141506849368)*x[0]+(-0.170074898141)*x[1]**o+(-0.0882776529335)*x[1]+(0.845254802876)*x[2]**o+(-0.435414692125)*x[2]
-        arg[2,4,2,0]=(-0.412836027163)*x[0]**o+(0.830777132582)*x[0]+(-0.87554952236)*x[1]**o+(0.970647516313)*x[1]+(0.989864827286)*x[2]**o+(-0.67790755421)*x[2]
-        arg[2,4,2,1]=(0.762907045031)*x[0]**o+(0.140771931118)*x[0]+(0.716859940142)*x[1]**o+(0.151769314189)*x[1]+(-0.812408853675)*x[2]**o+(0.755727078666)*x[2]
-        arg[3,0,0,0]=(-0.13358237438)*x[0]**o+(-0.594735856789)*x[0]+(-0.367418402298)*x[1]**o+(0.5349162872)*x[1]+(0.238285320118)*x[2]**o+(0.999627906459)*x[2]
-        arg[3,0,0,1]=(-0.537433369218)*x[0]**o+(0.133034652667)*x[0]+(-0.190302464596)*x[1]**o+(0.869919012762)*x[1]+(0.320294306008)*x[2]**o+(0.865908856629)*x[2]
-        arg[3,0,1,0]=(0.480851043043)*x[0]**o+(0.833358259022)*x[0]+(0.893051476621)*x[1]**o+(-0.505255581199)*x[1]+(-0.15316145317)*x[2]**o+(-0.937103563776)*x[2]
-        arg[3,0,1,1]=(0.765360137605)*x[0]**o+(0.502399552842)*x[0]+(-0.215707512276)*x[1]**o+(-0.402720816967)*x[1]+(0.231360098578)*x[2]**o+(0.732903327067)*x[2]
-        arg[3,0,2,0]=(0.120836669045)*x[0]**o+(0.198346794548)*x[0]+(-0.28708447536)*x[1]**o+(0.289672075353)*x[1]+(-0.0305777738322)*x[2]**o+(-0.0686651569373)*x[2]
-        arg[3,0,2,1]=(0.0574598844614)*x[0]**o+(0.031092492399)*x[0]+(-0.406805507341)*x[1]**o+(-0.623370509947)*x[1]+(-0.476094160966)*x[2]**o+(0.0840271758875)*x[2]
-        arg[3,1,0,0]=(-0.569415249126)*x[0]**o+(-0.339675540399)*x[0]+(0.182536980707)*x[1]**o+(0.727480200453)*x[1]+(0.851672551504)*x[2]**o+(0.817312313075)*x[2]
-        arg[3,1,0,1]=(0.921422642904)*x[0]**o+(0.697656143906)*x[0]+(0.969442847752)*x[1]**o+(-0.00957994710064)*x[1]+(-0.315230556399)*x[2]**o+(-0.870759158384)*x[2]
-        arg[3,1,1,0]=(-0.813310465463)*x[0]**o+(-0.809362802903)*x[0]+(-0.0685101056428)*x[1]**o+(0.708195651847)*x[1]+(-0.876449456312)*x[2]**o+(0.882503536479)*x[2]
-        arg[3,1,1,1]=(-0.277504922905)*x[0]**o+(-0.819428706347)*x[0]+(0.463203258731)*x[1]**o+(0.597493096401)*x[1]+(0.630522187524)*x[2]**o+(0.92480079466)*x[2]
-        arg[3,1,2,0]=(-0.703167803764)*x[0]**o+(0.730459205382)*x[0]+(-0.507036921123)*x[1]**o+(0.419358545765)*x[1]+(-0.542758923679)*x[2]**o+(0.831844312917)*x[2]
-        arg[3,1,2,1]=(0.135200299704)*x[0]**o+(-0.160734675188)*x[0]+(-0.893851689192)*x[1]**o+(0.748734906185)*x[1]+(0.970464447167)*x[2]**o+(0.277911376757)*x[2]
-        arg[3,2,0,0]=(0.750104328784)*x[0]**o+(-0.818350593893)*x[0]+(-0.749900854281)*x[1]**o+(0.289117653816)*x[1]+(-0.219904822162)*x[2]**o+(0.805208050452)*x[2]
-        arg[3,2,0,1]=(-0.129614389749)*x[0]**o+(-0.64067443816)*x[0]+(0.513013650233)*x[1]**o+(0.868869035341)*x[1]+(-0.040145121639)*x[2]**o+(-0.282350136119)*x[2]
-        arg[3,2,1,0]=(-0.172814929104)*x[0]**o+(-0.296930471915)*x[0]+(-0.796114111585)*x[1]**o+(-0.210181080249)*x[1]+(-0.606107841173)*x[2]**o+(-0.954329084175)*x[2]
-        arg[3,2,1,1]=(0.136149261959)*x[0]**o+(-0.613980696755)*x[0]+(0.968430714778)*x[1]**o+(0.683553952099)*x[1]+(-0.321383789121)*x[2]**o+(-0.139570984234)*x[2]
-        arg[3,2,2,0]=(-0.273321720654)*x[0]**o+(0.963651110162)*x[0]+(-0.847402611499)*x[1]**o+(0.237131262905)*x[1]+(-0.617296821558)*x[2]**o+(-0.681856394629)*x[2]
-        arg[3,2,2,1]=(-0.760071928624)*x[0]**o+(0.0345053779755)*x[0]+(-0.583680069732)*x[1]**o+(0.150497658077)*x[1]+(0.0257096621429)*x[2]**o+(-0.159406203385)*x[2]
-        arg[3,3,0,0]=(-0.0668501746947)*x[0]**o+(-0.183645899611)*x[0]+(0.123667845765)*x[1]**o+(0.0928142420352)*x[1]+(-0.933250766317)*x[2]**o+(-0.629986949639)*x[2]
-        arg[3,3,0,1]=(-0.0212790928206)*x[0]**o+(0.444036360325)*x[0]+(0.09182358127)*x[1]**o+(0.473088563672)*x[1]+(0.0852925382953)*x[2]**o+(-0.238517929786)*x[2]
-        arg[3,3,1,0]=(0.0647235093728)*x[0]**o+(-0.266285898716)*x[0]+(0.944999560866)*x[1]**o+(-0.757696716486)*x[1]+(-0.439165278732)*x[2]**o+(0.960091479774)*x[2]
-        arg[3,3,1,1]=(-0.792249238894)*x[0]**o+(-0.568585439587)*x[0]+(-0.0426655335607)*x[1]**o+(0.980004032206)*x[1]+(0.635227812889)*x[2]**o+(0.6687165384)*x[2]
-        arg[3,3,2,0]=(0.340468442769)*x[0]**o+(0.791071154735)*x[0]+(-0.817919975547)*x[1]**o+(0.0328383066982)*x[1]+(-0.323093904705)*x[2]**o+(-0.302641620002)*x[2]
-        arg[3,3,2,1]=(-0.476501733213)*x[0]**o+(-0.429845943537)*x[0]+(0.518551215268)*x[1]**o+(-0.551690143654)*x[1]+(0.591983049997)*x[2]**o+(0.586292683497)*x[2]
-        arg[3,4,0,0]=(0.119036526248)*x[0]**o+(-0.156404044048)*x[0]+(0.158504048681)*x[1]**o+(-0.3779600709)*x[1]+(-0.362107671534)*x[2]**o+(-0.314508628804)*x[2]
-        arg[3,4,0,1]=(0.382011103106)*x[0]**o+(-0.123711676964)*x[0]+(-0.939014457264)*x[1]**o+(-0.5986155807)*x[1]+(-0.852092491566)*x[2]**o+(-0.410438924788)*x[2]
-        arg[3,4,1,0]=(0.83612586535)*x[0]**o+(-0.606098645092)*x[0]+(0.643469717148)*x[1]**o+(0.845106525654)*x[1]+(0.347455649691)*x[2]**o+(-0.166796580458)*x[2]
-        arg[3,4,1,1]=(0.693431758156)*x[0]**o+(-0.313983401147)*x[0]+(-0.862690834893)*x[1]**o+(0.417233988055)*x[1]+(-0.361769997589)*x[2]**o+(-0.22749888397)*x[2]
-        arg[3,4,2,0]=(0.680358405387)*x[0]**o+(-0.786041842215)*x[0]+(0.288823579415)*x[1]**o+(-0.961099851196)*x[1]+(0.669431785695)*x[2]**o+(0.956564160268)*x[2]
-        arg[3,4,2,1]=(-0.21416500005)*x[0]**o+(0.48495191486)*x[0]+(-0.173465452645)*x[1]**o+(0.662530321557)*x[1]+(0.984573283824)*x[2]**o+(-0.568211383785)*x[2]
-        ref[0,0,0,0]=(-0.615899511086)*x_ref[0]**o+(0.823637401824)*x_ref[0]+(-0.986967740198)*x_ref[1]**o+(-0.782088977641)*x_ref[1]+(-0.576799974679)*x_ref[2]**o+(-0.910942885711)*x_ref[2]
-        ref[0,0,0,1]=(-0.790830593449)*x_ref[0]**o+(-0.897724279499)*x_ref[0]+(-0.881691805807)*x_ref[1]**o+(-0.133793238901)*x_ref[1]+(-0.0903391684489)*x_ref[2]**o+(0.659893469877)*x_ref[2]
-        ref[0,0,1,0]=(-0.0567117900114)*x_ref[0]**o+(-0.858031985686)*x_ref[0]+(-0.397443445702)*x_ref[1]**o+(0.549982838823)*x_ref[1]+(-0.636905143813)*x_ref[2]**o+(0.8488142632)*x_ref[2]
-        ref[0,0,1,1]=(-0.644557373082)*x_ref[0]**o+(-0.323654898522)*x_ref[0]+(0.210458705923)*x_ref[1]**o+(0.990436827296)*x_ref[1]+(-0.597872757151)*x_ref[2]**o+(-0.83865548618)*x_ref[2]
-        ref[0,0,2,0]=(-0.29830667084)*x_ref[0]**o+(0.327035546909)*x_ref[0]+(0.132690049791)*x_ref[1]**o+(-0.55625443282)*x_ref[1]+(0.0972781385283)*x_ref[2]**o+(0.151885837608)*x_ref[2]
-        ref[0,0,2,1]=(-0.435983465578)*x_ref[0]**o+(-0.0852522953446)*x_ref[0]+(0.257654807094)*x_ref[1]**o+(-0.336603197583)*x_ref[1]+(0.637913421592)*x_ref[2]**o+(0.8151042055)*x_ref[2]
-        ref[0,1,0,0]=(-0.0373980191125)*x_ref[0]**o+(-0.45937285505)*x_ref[0]+(-0.857933684889)*x_ref[1]**o+(-0.843826686256)*x_ref[1]+(-0.727077320504)*x_ref[2]**o+(-0.65222863395)*x_ref[2]
-        ref[0,1,0,1]=(0.63426017384)*x_ref[0]**o+(0.845708641601)*x_ref[0]+(0.246160302486)*x_ref[1]**o+(-0.660855572094)*x_ref[1]+(0.67420981328)*x_ref[2]**o+(-0.280803968781)*x_ref[2]
-        ref[0,1,1,0]=(0.881193264597)*x_ref[0]**o+(-0.881936969515)*x_ref[0]+(-0.883246837152)*x_ref[1]**o+(0.182222471927)*x_ref[1]+(0.405380496272)*x_ref[2]**o+(0.175721746883)*x_ref[2]
-        ref[0,1,1,1]=(-0.44447667237)*x_ref[0]**o+(0.956169274606)*x_ref[0]+(0.0370532940652)*x_ref[1]**o+(-0.181239635583)*x_ref[1]+(-0.678412161285)*x_ref[2]**o+(-0.653172157401)*x_ref[2]
-        ref[0,1,2,0]=(-0.50038634718)*x_ref[0]**o+(0.00278321765167)*x_ref[0]+(-0.831539460218)*x_ref[1]**o+(-0.555243320385)*x_ref[1]+(-0.626789452003)*x_ref[2]**o+(-0.495085243933)*x_ref[2]
-        ref[0,1,2,1]=(-0.32886359569)*x_ref[0]**o+(0.406099965475)*x_ref[0]+(0.764756177266)*x_ref[1]**o+(-0.272070344181)*x_ref[1]+(-0.41812596516)*x_ref[2]**o+(0.349063696376)*x_ref[2]
-        ref[0,2,0,0]=(-0.580544978365)*x_ref[0]**o+(0.53441241334)*x_ref[0]+(-0.808749795876)*x_ref[1]**o+(0.172110801632)*x_ref[1]+(-0.939262606098)*x_ref[2]**o+(-0.724859325104)*x_ref[2]
-        ref[0,2,0,1]=(0.256335221944)*x_ref[0]**o+(0.463522371018)*x_ref[0]+(0.990516478508)*x_ref[1]**o+(0.423931177054)*x_ref[1]+(0.184277693683)*x_ref[2]**o+(-0.272967447689)*x_ref[2]
-        ref[0,2,1,0]=(-0.126943811008)*x_ref[0]**o+(0.645821387926)*x_ref[0]+(0.150370174987)*x_ref[1]**o+(-0.150954538301)*x_ref[1]+(-0.378720078559)*x_ref[2]**o+(0.0975963807109)*x_ref[2]
-        ref[0,2,1,1]=(-0.451434544339)*x_ref[0]**o+(0.557314109088)*x_ref[0]+(-0.0402970749558)*x_ref[1]**o+(0.306984557206)*x_ref[1]+(-0.297018139186)*x_ref[2]**o+(0.593800698785)*x_ref[2]
-        ref[0,2,2,0]=(-0.376199144911)*x_ref[0]**o+(-0.230454116373)*x_ref[0]+(0.992738297651)*x_ref[1]**o+(0.183510534927)*x_ref[1]+(0.409381711992)*x_ref[2]**o+(0.171945265727)*x_ref[2]
-        ref[0,2,2,1]=(0.363233095971)*x_ref[0]**o+(-0.130589148249)*x_ref[0]+(0.809611042018)*x_ref[1]**o+(-0.354546307961)*x_ref[1]+(0.0631410169203)*x_ref[2]**o+(0.630306161781)*x_ref[2]
-        ref[0,3,0,0]=(0.49655016161)*x_ref[0]**o+(0.878957258614)*x_ref[0]+(-0.397408696784)*x_ref[1]**o+(-0.199445321288)*x_ref[1]+(0.929857086663)*x_ref[2]**o+(-0.648770887161)*x_ref[2]
-        ref[0,3,0,1]=(-0.85578334594)*x_ref[0]**o+(-0.294617109229)*x_ref[0]+(-0.0790295769768)*x_ref[1]**o+(0.82151942311)*x_ref[1]+(0.541628117444)*x_ref[2]**o+(0.805418174827)*x_ref[2]
-        ref[0,3,1,0]=(0.800775454804)*x_ref[0]**o+(0.599550462983)*x_ref[0]+(-0.384788634082)*x_ref[1]**o+(-0.356933972363)*x_ref[1]+(-0.423116265473)*x_ref[2]**o+(-0.125492982003)*x_ref[2]
-        ref[0,3,1,1]=(0.929652994661)*x_ref[0]**o+(-0.57396682406)*x_ref[0]+(0.313584116036)*x_ref[1]**o+(-0.190575043496)*x_ref[1]+(-0.29110884935)*x_ref[2]**o+(0.967530639925)*x_ref[2]
-        ref[0,3,2,0]=(0.761136478868)*x_ref[0]**o+(0.565721170014)*x_ref[0]+(0.239619122131)*x_ref[1]**o+(-0.0821651979956)*x_ref[1]+(-0.699218775545)*x_ref[2]**o+(0.19973415585)*x_ref[2]
-        ref[0,3,2,1]=(0.209543244648)*x_ref[0]**o+(0.93957796874)*x_ref[0]+(0.354405887426)*x_ref[1]**o+(0.504177262864)*x_ref[1]+(0.446866674894)*x_ref[2]**o+(-0.522936485464)*x_ref[2]
-        ref[0,4,0,0]=(0.427541399652)*x_ref[0]**o+(-0.114806067206)*x_ref[0]+(0.236780877643)*x_ref[1]**o+(0.422226381272)*x_ref[1]+(-0.506450961214)*x_ref[2]**o+(0.616091720212)*x_ref[2]
-        ref[0,4,0,1]=(0.698773571323)*x_ref[0]**o+(-0.357878713085)*x_ref[0]+(-0.453730359129)*x_ref[1]**o+(-0.328701041355)*x_ref[1]+(-0.28646346679)*x_ref[2]**o+(-0.0449784265203)*x_ref[2]
-        ref[0,4,1,0]=(-0.419416306509)*x_ref[0]**o+(-0.1970394955)*x_ref[0]+(-0.814008932379)*x_ref[1]**o+(-0.805127589929)*x_ref[1]+(0.244059789875)*x_ref[2]**o+(-0.983027843847)*x_ref[2]
-        ref[0,4,1,1]=(0.84837346004)*x_ref[0]**o+(0.501808510624)*x_ref[0]+(-0.105800351358)*x_ref[1]**o+(0.903999231718)*x_ref[1]+(-0.0473996978124)*x_ref[2]**o+(0.683647253381)*x_ref[2]
-        ref[0,4,2,0]=(0.658722899682)*x_ref[0]**o+(-0.401846635016)*x_ref[0]+(-0.967322202581)*x_ref[1]**o+(-0.948306922217)*x_ref[1]+(0.496409308219)*x_ref[2]**o+(-0.184768777052)*x_ref[2]
-        ref[0,4,2,1]=(-0.454468390888)*x_ref[0]**o+(-0.220640468215)*x_ref[0]+(0.995269925943)*x_ref[1]**o+(0.778951329211)*x_ref[1]+(0.0439534466302)*x_ref[2]**o+(0.806197038383)*x_ref[2]
-        ref[1,0,0,0]=(-0.547461802236)*x_ref[0]**o+(0.370768827789)*x_ref[0]+(-0.619991757552)*x_ref[1]**o+(0.391727195645)*x_ref[1]+(-0.649274922953)*x_ref[2]**o+(-0.478788248429)*x_ref[2]
-        ref[1,0,0,1]=(-0.899230505882)*x_ref[0]**o+(0.603064321735)*x_ref[0]+(-0.737475386349)*x_ref[1]**o+(0.594197953001)*x_ref[1]+(0.341324049064)*x_ref[2]**o+(0.285202633917)*x_ref[2]
-        ref[1,0,1,0]=(-0.107063589618)*x_ref[0]**o+(-0.260491562358)*x_ref[0]+(-0.667059815618)*x_ref[1]**o+(0.473227354537)*x_ref[1]+(-0.587170510558)*x_ref[2]**o+(-0.740299218393)*x_ref[2]
-        ref[1,0,1,1]=(0.87705715098)*x_ref[0]**o+(0.312753471827)*x_ref[0]+(-0.307530283315)*x_ref[1]**o+(0.195564644822)*x_ref[1]+(-0.64384485166)*x_ref[2]**o+(-0.776362951729)*x_ref[2]
-        ref[1,0,2,0]=(0.0949408564739)*x_ref[0]**o+(0.765922179855)*x_ref[0]+(0.441215568253)*x_ref[1]**o+(0.339112969437)*x_ref[1]+(-0.0774615292449)*x_ref[2]**o+(0.673258055783)*x_ref[2]
-        ref[1,0,2,1]=(0.114828212302)*x_ref[0]**o+(0.0831258766277)*x_ref[0]+(0.674540402248)*x_ref[1]**o+(-0.304921039094)*x_ref[1]+(-0.725514770578)*x_ref[2]**o+(-0.627584773746)*x_ref[2]
-        ref[1,1,0,0]=(0.291561714675)*x_ref[0]**o+(0.898587624783)*x_ref[0]+(0.476696264545)*x_ref[1]**o+(-0.454648604978)*x_ref[1]+(0.677949150743)*x_ref[2]**o+(-0.59438289851)*x_ref[2]
-        ref[1,1,0,1]=(0.356687258009)*x_ref[0]**o+(0.806236251629)*x_ref[0]+(0.843636690354)*x_ref[1]**o+(-0.649776947181)*x_ref[1]+(0.208542122388)*x_ref[2]**o+(-0.0726045573458)*x_ref[2]
-        ref[1,1,1,0]=(0.712800450558)*x_ref[0]**o+(0.748271875755)*x_ref[0]+(0.403880649356)*x_ref[1]**o+(0.956549336754)*x_ref[1]+(0.0420128495043)*x_ref[2]**o+(-0.83177870499)*x_ref[2]
-        ref[1,1,1,1]=(-0.886862904174)*x_ref[0]**o+(-0.03822986594)*x_ref[0]+(0.587151517496)*x_ref[1]**o+(-0.120272060898)*x_ref[1]+(-0.573366391933)*x_ref[2]**o+(-0.59772763241)*x_ref[2]
-        ref[1,1,2,0]=(0.311960197804)*x_ref[0]**o+(0.486854949444)*x_ref[0]+(-0.647995651954)*x_ref[1]**o+(0.30104277964)*x_ref[1]+(-0.174718703748)*x_ref[2]**o+(-0.506993216295)*x_ref[2]
-        ref[1,1,2,1]=(0.979056206991)*x_ref[0]**o+(0.892104464812)*x_ref[0]+(0.0507432703245)*x_ref[1]**o+(0.103630858454)*x_ref[1]+(-0.0254965952266)*x_ref[2]**o+(0.13034027239)*x_ref[2]
-        ref[1,2,0,0]=(0.259797966548)*x_ref[0]**o+(0.53018999371)*x_ref[0]+(0.533745722992)*x_ref[1]**o+(0.53029084173)*x_ref[1]+(-0.595126791061)*x_ref[2]**o+(-0.51668295558)*x_ref[2]
-        ref[1,2,0,1]=(0.926395590808)*x_ref[0]**o+(-0.0700141207179)*x_ref[0]+(-0.973392454012)*x_ref[1]**o+(-0.46204067097)*x_ref[1]+(0.814964497207)*x_ref[2]**o+(-0.183546091376)*x_ref[2]
-        ref[1,2,1,0]=(-0.0872635441658)*x_ref[0]**o+(-0.0307630839035)*x_ref[0]+(0.539798653095)*x_ref[1]**o+(0.966367734848)*x_ref[1]+(-0.817495053612)*x_ref[2]**o+(-0.268397867848)*x_ref[2]
-        ref[1,2,1,1]=(-0.933074613921)*x_ref[0]**o+(0.48896533938)*x_ref[0]+(0.453696133488)*x_ref[1]**o+(-0.238730406749)*x_ref[1]+(-0.696785951086)*x_ref[2]**o+(-0.359858385642)*x_ref[2]
-        ref[1,2,2,0]=(-0.844406286809)*x_ref[0]**o+(-0.506332243946)*x_ref[0]+(0.976436731658)*x_ref[1]**o+(-0.201489161857)*x_ref[1]+(0.851236173166)*x_ref[2]**o+(-0.998803612947)*x_ref[2]
-        ref[1,2,2,1]=(0.259707321449)*x_ref[0]**o+(-0.888149478655)*x_ref[0]+(-0.273502842869)*x_ref[1]**o+(0.291193582158)*x_ref[1]+(-0.897542178027)*x_ref[2]**o+(-0.345994824429)*x_ref[2]
-        ref[1,3,0,0]=(0.961298984697)*x_ref[0]**o+(0.248141115092)*x_ref[0]+(-0.623053025178)*x_ref[1]**o+(-0.775095452078)*x_ref[1]+(0.955362707049)*x_ref[2]**o+(-0.517547333705)*x_ref[2]
-        ref[1,3,0,1]=(0.858098596227)*x_ref[0]**o+(0.309307483873)*x_ref[0]+(-0.209217034755)*x_ref[1]**o+(0.783803593379)*x_ref[1]+(0.138164128092)*x_ref[2]**o+(-0.922854003461)*x_ref[2]
-        ref[1,3,1,0]=(-0.139017942141)*x_ref[0]**o+(-0.338223039119)*x_ref[0]+(0.737882941498)*x_ref[1]**o+(0.948854903087)*x_ref[1]+(-0.0792461633266)*x_ref[2]**o+(0.848875660203)*x_ref[2]
-        ref[1,3,1,1]=(0.693284332212)*x_ref[0]**o+(-0.392272875348)*x_ref[0]+(-0.475709045479)*x_ref[1]**o+(0.182948077236)*x_ref[1]+(0.0277569761538)*x_ref[2]**o+(-0.550294947596)*x_ref[2]
-        ref[1,3,2,0]=(-0.105381649505)*x_ref[0]**o+(-0.403051690238)*x_ref[0]+(-0.722219735818)*x_ref[1]**o+(-0.380114388869)*x_ref[1]+(0.321452572491)*x_ref[2]**o+(0.858583245253)*x_ref[2]
-        ref[1,3,2,1]=(-0.405370062024)*x_ref[0]**o+(0.0743704840047)*x_ref[0]+(0.998947017815)*x_ref[1]**o+(0.983611079522)*x_ref[1]+(0.854202982674)*x_ref[2]**o+(0.288478746498)*x_ref[2]
-        ref[1,4,0,0]=(0.0584782489998)*x_ref[0]**o+(0.999286927604)*x_ref[0]+(-0.458166020555)*x_ref[1]**o+(0.529008844128)*x_ref[1]+(0.424592641922)*x_ref[2]**o+(-0.489692340187)*x_ref[2]
-        ref[1,4,0,1]=(-0.150555966138)*x_ref[0]**o+(0.362589320838)*x_ref[0]+(0.515820915391)*x_ref[1]**o+(0.742403661312)*x_ref[1]+(0.230278843183)*x_ref[2]**o+(-0.213977724366)*x_ref[2]
-        ref[1,4,1,0]=(-0.361161802362)*x_ref[0]**o+(-0.49718332222)*x_ref[0]+(0.143956046197)*x_ref[1]**o+(-0.044550912758)*x_ref[1]+(-0.299892874708)*x_ref[2]**o+(0.370248709792)*x_ref[2]
-        ref[1,4,1,1]=(0.259365238173)*x_ref[0]**o+(-0.474694548557)*x_ref[0]+(0.732983396669)*x_ref[1]**o+(-0.295151546774)*x_ref[1]+(-0.337144628526)*x_ref[2]**o+(0.664201775714)*x_ref[2]
-        ref[1,4,2,0]=(-0.318016754284)*x_ref[0]**o+(0.555291443852)*x_ref[0]+(0.538150727998)*x_ref[1]**o+(-0.800118353132)*x_ref[1]+(0.652262386596)*x_ref[2]**o+(0.303156645857)*x_ref[2]
-        ref[1,4,2,1]=(0.0827142921796)*x_ref[0]**o+(-0.88498648372)*x_ref[0]+(-0.941249844349)*x_ref[1]**o+(-0.162576659039)*x_ref[1]+(0.867621252192)*x_ref[2]**o+(0.0834583795227)*x_ref[2]
-        ref[2,0,0,0]=(0.0670088199264)*x_ref[0]**o+(-0.0425961894346)*x_ref[0]+(0.329605789302)*x_ref[1]**o+(0.860453156363)*x_ref[1]+(-0.37410469727)*x_ref[2]**o+(0.55476432384)*x_ref[2]
-        ref[2,0,0,1]=(0.801738221879)*x_ref[0]**o+(-0.836563530923)*x_ref[0]+(-0.449651673142)*x_ref[1]**o+(-0.19423133918)*x_ref[1]+(0.947648200044)*x_ref[2]**o+(0.0854067601423)*x_ref[2]
-        ref[2,0,1,0]=(0.986595046855)*x_ref[0]**o+(-0.358319352175)*x_ref[0]+(0.493917713513)*x_ref[1]**o+(-0.92052282445)*x_ref[1]+(-0.692726467259)*x_ref[2]**o+(-0.0636943737807)*x_ref[2]
-        ref[2,0,1,1]=(0.38491150492)*x_ref[0]**o+(0.766893245938)*x_ref[0]+(0.420188917945)*x_ref[1]**o+(0.43760538854)*x_ref[1]+(-0.770749451981)*x_ref[2]**o+(0.124882164378)*x_ref[2]
-        ref[2,0,2,0]=(0.775715718797)*x_ref[0]**o+(0.89516703208)*x_ref[0]+(-0.829021524898)*x_ref[1]**o+(-0.650262454311)*x_ref[1]+(-0.812556336598)*x_ref[2]**o+(-0.997075743997)*x_ref[2]
-        ref[2,0,2,1]=(0.3503761008)*x_ref[0]**o+(-0.822009897455)*x_ref[0]+(-0.657657365354)*x_ref[1]**o+(0.476295612156)*x_ref[1]+(0.315554008711)*x_ref[2]**o+(0.691631078049)*x_ref[2]
-        ref[2,1,0,0]=(0.680177375433)*x_ref[0]**o+(-0.922726813311)*x_ref[0]+(-0.581116746321)*x_ref[1]**o+(0.628138099343)*x_ref[1]+(-0.568262800293)*x_ref[2]**o+(-0.228201382395)*x_ref[2]
-        ref[2,1,0,1]=(0.210094833324)*x_ref[0]**o+(0.281549673876)*x_ref[0]+(0.23785231073)*x_ref[1]**o+(-0.103812455993)*x_ref[1]+(0.530445971191)*x_ref[2]**o+(-0.0830520449939)*x_ref[2]
-        ref[2,1,1,0]=(0.367133297563)*x_ref[0]**o+(0.168289954585)*x_ref[0]+(0.614117392787)*x_ref[1]**o+(0.790467766841)*x_ref[1]+(-0.958002150805)*x_ref[2]**o+(0.328916248824)*x_ref[2]
-        ref[2,1,1,1]=(0.089535347231)*x_ref[0]**o+(-0.93155993701)*x_ref[0]+(-0.674670760794)*x_ref[1]**o+(-0.274148261773)*x_ref[1]+(-0.807020126056)*x_ref[2]**o+(-0.323334769496)*x_ref[2]
-        ref[2,1,2,0]=(-0.948679835219)*x_ref[0]**o+(-0.577235742425)*x_ref[0]+(-0.732584834146)*x_ref[1]**o+(-0.475242504288)*x_ref[1]+(0.213663223262)*x_ref[2]**o+(-0.151401354381)*x_ref[2]
-        ref[2,1,2,1]=(0.264513246206)*x_ref[0]**o+(-0.605806437391)*x_ref[0]+(-0.058730926693)*x_ref[1]**o+(-0.661696304412)*x_ref[1]+(-0.361277352457)*x_ref[2]**o+(-0.804408258253)*x_ref[2]
-        ref[2,2,0,0]=(-0.144562358054)*x_ref[0]**o+(-0.0960550555725)*x_ref[0]+(-0.905096867803)*x_ref[1]**o+(0.188861784103)*x_ref[1]+(-0.616751005568)*x_ref[2]**o+(0.604711974248)*x_ref[2]
-        ref[2,2,0,1]=(-0.0582524307858)*x_ref[0]**o+(-0.503648879785)*x_ref[0]+(-0.682755209956)*x_ref[1]**o+(-0.808213164425)*x_ref[1]+(0.539987276327)*x_ref[2]**o+(0.650557703689)*x_ref[2]
-        ref[2,2,1,0]=(0.0607729567733)*x_ref[0]**o+(-0.498819638428)*x_ref[0]+(0.434442595334)*x_ref[1]**o+(-0.491063977603)*x_ref[1]+(0.499436212229)*x_ref[2]**o+(-0.932071991206)*x_ref[2]
-        ref[2,2,1,1]=(-0.461295295294)*x_ref[0]**o+(-0.153600767916)*x_ref[0]+(-0.86452392231)*x_ref[1]**o+(0.136760034153)*x_ref[1]+(-0.471642416082)*x_ref[2]**o+(0.453820403438)*x_ref[2]
-        ref[2,2,2,0]=(-0.970051888584)*x_ref[0]**o+(0.415728825057)*x_ref[0]+(0.971643909569)*x_ref[1]**o+(0.923719420524)*x_ref[1]+(-0.837313513804)*x_ref[2]**o+(-0.738057676093)*x_ref[2]
-        ref[2,2,2,1]=(-0.941355918089)*x_ref[0]**o+(-0.9629784524)*x_ref[0]+(-0.931184348072)*x_ref[1]**o+(0.720006097658)*x_ref[1]+(-0.140750567978)*x_ref[2]**o+(0.55381939119)*x_ref[2]
-        ref[2,3,0,0]=(0.753455933669)*x_ref[0]**o+(0.352384922037)*x_ref[0]+(0.737644348002)*x_ref[1]**o+(-0.565144188248)*x_ref[1]+(0.257417624014)*x_ref[2]**o+(-0.660006641683)*x_ref[2]
-        ref[2,3,0,1]=(0.886996770925)*x_ref[0]**o+(-0.876595418252)*x_ref[0]+(-0.189778073871)*x_ref[1]**o+(0.560867442336)*x_ref[1]+(-0.262338156346)*x_ref[2]**o+(0.614749098901)*x_ref[2]
-        ref[2,3,1,0]=(-0.722912374016)*x_ref[0]**o+(0.447451310273)*x_ref[0]+(0.397510140568)*x_ref[1]**o+(0.932405917932)*x_ref[1]+(-0.206969252336)*x_ref[2]**o+(-0.897366208888)*x_ref[2]
-        ref[2,3,1,1]=(0.106324074547)*x_ref[0]**o+(0.822109425884)*x_ref[0]+(0.62699223277)*x_ref[1]**o+(0.238371557839)*x_ref[1]+(-0.422051841243)*x_ref[2]**o+(0.868932130329)*x_ref[2]
-        ref[2,3,2,0]=(0.0155790371581)*x_ref[0]**o+(-0.696029577918)*x_ref[0]+(0.259909585217)*x_ref[1]**o+(0.260209121862)*x_ref[1]+(0.780977081459)*x_ref[2]**o+(-0.819957534538)*x_ref[2]
-        ref[2,3,2,1]=(0.736223721904)*x_ref[0]**o+(-0.433132598174)*x_ref[0]+(-0.880913649812)*x_ref[1]**o+(-0.375988777461)*x_ref[1]+(-0.351763406307)*x_ref[2]**o+(0.948468252467)*x_ref[2]
-        ref[2,4,0,0]=(0.943349180556)*x_ref[0]**o+(-0.720044514103)*x_ref[0]+(0.671900161807)*x_ref[1]**o+(0.358571142942)*x_ref[1]+(-0.132755998648)*x_ref[2]**o+(0.0749815044365)*x_ref[2]
-        ref[2,4,0,1]=(0.639070752347)*x_ref[0]**o+(0.551441363406)*x_ref[0]+(0.507547844432)*x_ref[1]**o+(-0.800043772307)*x_ref[1]+(-0.506359503394)*x_ref[2]**o+(0.952191432651)*x_ref[2]
-        ref[2,4,1,0]=(-0.655864732254)*x_ref[0]**o+(0.142198390642)*x_ref[0]+(0.075292486702)*x_ref[1]**o+(0.191013189029)*x_ref[1]+(0.106768453247)*x_ref[2]**o+(0.974526515449)*x_ref[2]
-        ref[2,4,1,1]=(-0.354750205648)*x_ref[0]**o+(0.141506849368)*x_ref[0]+(-0.170074898141)*x_ref[1]**o+(-0.0882776529335)*x_ref[1]+(0.845254802876)*x_ref[2]**o+(-0.435414692125)*x_ref[2]
-        ref[2,4,2,0]=(-0.412836027163)*x_ref[0]**o+(0.830777132582)*x_ref[0]+(-0.87554952236)*x_ref[1]**o+(0.970647516313)*x_ref[1]+(0.989864827286)*x_ref[2]**o+(-0.67790755421)*x_ref[2]
-        ref[2,4,2,1]=(0.762907045031)*x_ref[0]**o+(0.140771931118)*x_ref[0]+(0.716859940142)*x_ref[1]**o+(0.151769314189)*x_ref[1]+(-0.812408853675)*x_ref[2]**o+(0.755727078666)*x_ref[2]
-        ref[3,0,0,0]=(-0.13358237438)*x_ref[0]**o+(-0.594735856789)*x_ref[0]+(-0.367418402298)*x_ref[1]**o+(0.5349162872)*x_ref[1]+(0.238285320118)*x_ref[2]**o+(0.999627906459)*x_ref[2]
-        ref[3,0,0,1]=(-0.537433369218)*x_ref[0]**o+(0.133034652667)*x_ref[0]+(-0.190302464596)*x_ref[1]**o+(0.869919012762)*x_ref[1]+(0.320294306008)*x_ref[2]**o+(0.865908856629)*x_ref[2]
-        ref[3,0,1,0]=(0.480851043043)*x_ref[0]**o+(0.833358259022)*x_ref[0]+(0.893051476621)*x_ref[1]**o+(-0.505255581199)*x_ref[1]+(-0.15316145317)*x_ref[2]**o+(-0.937103563776)*x_ref[2]
-        ref[3,0,1,1]=(0.765360137605)*x_ref[0]**o+(0.502399552842)*x_ref[0]+(-0.215707512276)*x_ref[1]**o+(-0.402720816967)*x_ref[1]+(0.231360098578)*x_ref[2]**o+(0.732903327067)*x_ref[2]
-        ref[3,0,2,0]=(0.120836669045)*x_ref[0]**o+(0.198346794548)*x_ref[0]+(-0.28708447536)*x_ref[1]**o+(0.289672075353)*x_ref[1]+(-0.0305777738322)*x_ref[2]**o+(-0.0686651569373)*x_ref[2]
-        ref[3,0,2,1]=(0.0574598844614)*x_ref[0]**o+(0.031092492399)*x_ref[0]+(-0.406805507341)*x_ref[1]**o+(-0.623370509947)*x_ref[1]+(-0.476094160966)*x_ref[2]**o+(0.0840271758875)*x_ref[2]
-        ref[3,1,0,0]=(-0.569415249126)*x_ref[0]**o+(-0.339675540399)*x_ref[0]+(0.182536980707)*x_ref[1]**o+(0.727480200453)*x_ref[1]+(0.851672551504)*x_ref[2]**o+(0.817312313075)*x_ref[2]
-        ref[3,1,0,1]=(0.921422642904)*x_ref[0]**o+(0.697656143906)*x_ref[0]+(0.969442847752)*x_ref[1]**o+(-0.00957994710064)*x_ref[1]+(-0.315230556399)*x_ref[2]**o+(-0.870759158384)*x_ref[2]
-        ref[3,1,1,0]=(-0.813310465463)*x_ref[0]**o+(-0.809362802903)*x_ref[0]+(-0.0685101056428)*x_ref[1]**o+(0.708195651847)*x_ref[1]+(-0.876449456312)*x_ref[2]**o+(0.882503536479)*x_ref[2]
-        ref[3,1,1,1]=(-0.277504922905)*x_ref[0]**o+(-0.819428706347)*x_ref[0]+(0.463203258731)*x_ref[1]**o+(0.597493096401)*x_ref[1]+(0.630522187524)*x_ref[2]**o+(0.92480079466)*x_ref[2]
-        ref[3,1,2,0]=(-0.703167803764)*x_ref[0]**o+(0.730459205382)*x_ref[0]+(-0.507036921123)*x_ref[1]**o+(0.419358545765)*x_ref[1]+(-0.542758923679)*x_ref[2]**o+(0.831844312917)*x_ref[2]
-        ref[3,1,2,1]=(0.135200299704)*x_ref[0]**o+(-0.160734675188)*x_ref[0]+(-0.893851689192)*x_ref[1]**o+(0.748734906185)*x_ref[1]+(0.970464447167)*x_ref[2]**o+(0.277911376757)*x_ref[2]
-        ref[3,2,0,0]=(0.750104328784)*x_ref[0]**o+(-0.818350593893)*x_ref[0]+(-0.749900854281)*x_ref[1]**o+(0.289117653816)*x_ref[1]+(-0.219904822162)*x_ref[2]**o+(0.805208050452)*x_ref[2]
-        ref[3,2,0,1]=(-0.129614389749)*x_ref[0]**o+(-0.64067443816)*x_ref[0]+(0.513013650233)*x_ref[1]**o+(0.868869035341)*x_ref[1]+(-0.040145121639)*x_ref[2]**o+(-0.282350136119)*x_ref[2]
-        ref[3,2,1,0]=(-0.172814929104)*x_ref[0]**o+(-0.296930471915)*x_ref[0]+(-0.796114111585)*x_ref[1]**o+(-0.210181080249)*x_ref[1]+(-0.606107841173)*x_ref[2]**o+(-0.954329084175)*x_ref[2]
-        ref[3,2,1,1]=(0.136149261959)*x_ref[0]**o+(-0.613980696755)*x_ref[0]+(0.968430714778)*x_ref[1]**o+(0.683553952099)*x_ref[1]+(-0.321383789121)*x_ref[2]**o+(-0.139570984234)*x_ref[2]
-        ref[3,2,2,0]=(-0.273321720654)*x_ref[0]**o+(0.963651110162)*x_ref[0]+(-0.847402611499)*x_ref[1]**o+(0.237131262905)*x_ref[1]+(-0.617296821558)*x_ref[2]**o+(-0.681856394629)*x_ref[2]
-        ref[3,2,2,1]=(-0.760071928624)*x_ref[0]**o+(0.0345053779755)*x_ref[0]+(-0.583680069732)*x_ref[1]**o+(0.150497658077)*x_ref[1]+(0.0257096621429)*x_ref[2]**o+(-0.159406203385)*x_ref[2]
-        ref[3,3,0,0]=(-0.0668501746947)*x_ref[0]**o+(-0.183645899611)*x_ref[0]+(0.123667845765)*x_ref[1]**o+(0.0928142420352)*x_ref[1]+(-0.933250766317)*x_ref[2]**o+(-0.629986949639)*x_ref[2]
-        ref[3,3,0,1]=(-0.0212790928206)*x_ref[0]**o+(0.444036360325)*x_ref[0]+(0.09182358127)*x_ref[1]**o+(0.473088563672)*x_ref[1]+(0.0852925382953)*x_ref[2]**o+(-0.238517929786)*x_ref[2]
-        ref[3,3,1,0]=(0.0647235093728)*x_ref[0]**o+(-0.266285898716)*x_ref[0]+(0.944999560866)*x_ref[1]**o+(-0.757696716486)*x_ref[1]+(-0.439165278732)*x_ref[2]**o+(0.960091479774)*x_ref[2]
-        ref[3,3,1,1]=(-0.792249238894)*x_ref[0]**o+(-0.568585439587)*x_ref[0]+(-0.0426655335607)*x_ref[1]**o+(0.980004032206)*x_ref[1]+(0.635227812889)*x_ref[2]**o+(0.6687165384)*x_ref[2]
-        ref[3,3,2,0]=(0.340468442769)*x_ref[0]**o+(0.791071154735)*x_ref[0]+(-0.817919975547)*x_ref[1]**o+(0.0328383066982)*x_ref[1]+(-0.323093904705)*x_ref[2]**o+(-0.302641620002)*x_ref[2]
-        ref[3,3,2,1]=(-0.476501733213)*x_ref[0]**o+(-0.429845943537)*x_ref[0]+(0.518551215268)*x_ref[1]**o+(-0.551690143654)*x_ref[1]+(0.591983049997)*x_ref[2]**o+(0.586292683497)*x_ref[2]
-        ref[3,4,0,0]=(0.119036526248)*x_ref[0]**o+(-0.156404044048)*x_ref[0]+(0.158504048681)*x_ref[1]**o+(-0.3779600709)*x_ref[1]+(-0.362107671534)*x_ref[2]**o+(-0.314508628804)*x_ref[2]
-        ref[3,4,0,1]=(0.382011103106)*x_ref[0]**o+(-0.123711676964)*x_ref[0]+(-0.939014457264)*x_ref[1]**o+(-0.5986155807)*x_ref[1]+(-0.852092491566)*x_ref[2]**o+(-0.410438924788)*x_ref[2]
-        ref[3,4,1,0]=(0.83612586535)*x_ref[0]**o+(-0.606098645092)*x_ref[0]+(0.643469717148)*x_ref[1]**o+(0.845106525654)*x_ref[1]+(0.347455649691)*x_ref[2]**o+(-0.166796580458)*x_ref[2]
-        ref[3,4,1,1]=(0.693431758156)*x_ref[0]**o+(-0.313983401147)*x_ref[0]+(-0.862690834893)*x_ref[1]**o+(0.417233988055)*x_ref[1]+(-0.361769997589)*x_ref[2]**o+(-0.22749888397)*x_ref[2]
-        ref[3,4,2,0]=(0.680358405387)*x_ref[0]**o+(-0.786041842215)*x_ref[0]+(0.288823579415)*x_ref[1]**o+(-0.961099851196)*x_ref[1]+(0.669431785695)*x_ref[2]**o+(0.956564160268)*x_ref[2]
-        ref[3,4,2,1]=(-0.21416500005)*x_ref[0]**o+(0.48495191486)*x_ref[0]+(-0.173465452645)*x_ref[1]**o+(0.662530321557)*x_ref[1]+(0.984573283824)*x_ref[2]**o+(-0.568211383785)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.264333591663)*x[0]**o+(-0.884594789709)*x[0]+(0.809768917911)*x[1]**o+(-0.999064121889)*x[1]
-        arg[1]=(-0.476663257532)*x[0]**o+(0.703121978294)*x[0]+(0.768222344055)*x[1]**o+(0.0126615637065)*x[1]
-        ref[0]=(0.264333591663)*x_ref[0]**o+(-0.884594789709)*x_ref[0]+(0.809768917911)*x_ref[1]**o+(-0.999064121889)*x_ref[1]
-        ref[1]=(-0.476663257532)*x_ref[0]**o+(0.703121978294)*x_ref[0]+(0.768222344055)*x_ref[1]**o+(0.0126615637065)*x_ref[1]
-      else:
-        arg[0]=(-0.814801897766)*x[0]**o+(0.417782597744)*x[0]+(0.354691012333)*x[1]**o+(-0.0529647248706)*x[1]+(-0.455085903639)*x[2]**o+(-0.501751102496)*x[2]
-        arg[1]=(0.165354246971)*x[0]**o+(-0.238754573504)*x[0]+(-0.293225479626)*x[1]**o+(-0.42192384305)*x[1]+(-0.109509840118)*x[2]**o+(0.511666964461)*x[2]
-        ref[0]=(-0.814801897766)*x_ref[0]**o+(0.417782597744)*x_ref[0]+(0.354691012333)*x_ref[1]**o+(-0.0529647248706)*x_ref[1]+(-0.455085903639)*x_ref[2]**o+(-0.501751102496)*x_ref[2]
-        ref[1]=(0.165354246971)*x_ref[0]**o+(-0.238754573504)*x_ref[0]+(-0.293225479626)*x_ref[1]**o+(-0.42192384305)*x_ref[1]+(-0.109509840118)*x_ref[2]**o+(0.511666964461)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.469225177227)*x[0]**o+(-0.312308556752)*x[0]+(0.0207638302484)*x[1]**o+(-0.42312789395)*x[1]
-        arg[0,1]=(0.435465800442)*x[0]**o+(0.66981866069)*x[0]+(-0.563664236008)*x[1]**o+(-0.979640187021)*x[1]
-        arg[0,2]=(0.761422556363)*x[0]**o+(-0.374824039734)*x[0]+(-0.258990622087)*x[1]**o+(-0.553555723801)*x[1]
-        arg[0,3]=(-0.346737956865)*x[0]**o+(-0.509820084012)*x[0]+(-0.270279814718)*x[1]**o+(-0.77787682055)*x[1]
-        arg[0,4]=(-0.607151504575)*x[0]**o+(0.0370061792286)*x[0]+(-0.597194755504)*x[1]**o+(0.463748874183)*x[1]
-        arg[1,0]=(-0.614871053235)*x[0]**o+(0.984151090349)*x[0]+(0.176558255935)*x[1]**o+(-0.00143697546002)*x[1]
-        arg[1,1]=(-0.678550535699)*x[0]**o+(-0.40068020768)*x[0]+(-0.73609233692)*x[1]**o+(0.204641737633)*x[1]
-        arg[1,2]=(0.644566611818)*x[0]**o+(0.676838663571)*x[0]+(0.592803079261)*x[1]**o+(-0.257851556005)*x[1]
-        arg[1,3]=(-0.811008507599)*x[0]**o+(-0.810627035248)*x[0]+(0.470993697001)*x[1]**o+(0.524157551045)*x[1]
-        arg[1,4]=(0.507989473752)*x[0]**o+(0.474629400564)*x[0]+(0.972372960952)*x[1]**o+(-0.713136826767)*x[1]
-        arg[2,0]=(-0.18215096122)*x[0]**o+(0.0926167766546)*x[0]+(-0.526818906453)*x[1]**o+(-0.169071065789)*x[1]
-        arg[2,1]=(-0.402265903759)*x[0]**o+(-0.460219787922)*x[0]+(0.160493468523)*x[1]**o+(-0.816631415356)*x[1]
-        arg[2,2]=(-0.826968582935)*x[0]**o+(-0.477060281375)*x[0]+(-0.753204398647)*x[1]**o+(0.340944419869)*x[1]
-        arg[2,3]=(-0.289758403392)*x[0]**o+(-0.216496476621)*x[0]+(-0.0729120551729)*x[1]**o+(0.0206397202194)*x[1]
-        arg[2,4]=(0.900190015504)*x[0]**o+(0.554334407718)*x[0]+(-0.188091500011)*x[1]**o+(-0.239344021421)*x[1]
-        arg[3,0]=(-0.846253042969)*x[0]**o+(0.212019924467)*x[0]+(-0.209309311993)*x[1]**o+(0.47889463943)*x[1]
-        arg[3,1]=(-0.796067196362)*x[0]**o+(0.570882191233)*x[0]+(0.789930258)*x[1]**o+(-0.687939656508)*x[1]
-        arg[3,2]=(0.0603011963958)*x[0]**o+(-0.291794860225)*x[0]+(-0.572598612637)*x[1]**o+(0.308585554728)*x[1]
-        arg[3,3]=(0.883976313141)*x[0]**o+(0.857027876956)*x[0]+(-0.991113135222)*x[1]**o+(-0.0649848727938)*x[1]
-        arg[3,4]=(-0.420604320052)*x[0]**o+(-0.147041915772)*x[0]+(0.696294525095)*x[1]**o+(-0.45791291995)*x[1]
-        ref[0,0]=(-0.469225177227)*x_ref[0]**o+(-0.312308556752)*x_ref[0]+(0.0207638302484)*x_ref[1]**o+(-0.42312789395)*x_ref[1]
-        ref[0,1]=(0.435465800442)*x_ref[0]**o+(0.66981866069)*x_ref[0]+(-0.563664236008)*x_ref[1]**o+(-0.979640187021)*x_ref[1]
-        ref[0,2]=(0.761422556363)*x_ref[0]**o+(-0.374824039734)*x_ref[0]+(-0.258990622087)*x_ref[1]**o+(-0.553555723801)*x_ref[1]
-        ref[0,3]=(-0.346737956865)*x_ref[0]**o+(-0.509820084012)*x_ref[0]+(-0.270279814718)*x_ref[1]**o+(-0.77787682055)*x_ref[1]
-        ref[0,4]=(-0.607151504575)*x_ref[0]**o+(0.0370061792286)*x_ref[0]+(-0.597194755504)*x_ref[1]**o+(0.463748874183)*x_ref[1]
-        ref[1,0]=(-0.614871053235)*x_ref[0]**o+(0.984151090349)*x_ref[0]+(0.176558255935)*x_ref[1]**o+(-0.00143697546002)*x_ref[1]
-        ref[1,1]=(-0.678550535699)*x_ref[0]**o+(-0.40068020768)*x_ref[0]+(-0.73609233692)*x_ref[1]**o+(0.204641737633)*x_ref[1]
-        ref[1,2]=(0.644566611818)*x_ref[0]**o+(0.676838663571)*x_ref[0]+(0.592803079261)*x_ref[1]**o+(-0.257851556005)*x_ref[1]
-        ref[1,3]=(-0.811008507599)*x_ref[0]**o+(-0.810627035248)*x_ref[0]+(0.470993697001)*x_ref[1]**o+(0.524157551045)*x_ref[1]
-        ref[1,4]=(0.507989473752)*x_ref[0]**o+(0.474629400564)*x_ref[0]+(0.972372960952)*x_ref[1]**o+(-0.713136826767)*x_ref[1]
-        ref[2,0]=(-0.18215096122)*x_ref[0]**o+(0.0926167766546)*x_ref[0]+(-0.526818906453)*x_ref[1]**o+(-0.169071065789)*x_ref[1]
-        ref[2,1]=(-0.402265903759)*x_ref[0]**o+(-0.460219787922)*x_ref[0]+(0.160493468523)*x_ref[1]**o+(-0.816631415356)*x_ref[1]
-        ref[2,2]=(-0.826968582935)*x_ref[0]**o+(-0.477060281375)*x_ref[0]+(-0.753204398647)*x_ref[1]**o+(0.340944419869)*x_ref[1]
-        ref[2,3]=(-0.289758403392)*x_ref[0]**o+(-0.216496476621)*x_ref[0]+(-0.0729120551729)*x_ref[1]**o+(0.0206397202194)*x_ref[1]
-        ref[2,4]=(0.900190015504)*x_ref[0]**o+(0.554334407718)*x_ref[0]+(-0.188091500011)*x_ref[1]**o+(-0.239344021421)*x_ref[1]
-        ref[3,0]=(-0.846253042969)*x_ref[0]**o+(0.212019924467)*x_ref[0]+(-0.209309311993)*x_ref[1]**o+(0.47889463943)*x_ref[1]
-        ref[3,1]=(-0.796067196362)*x_ref[0]**o+(0.570882191233)*x_ref[0]+(0.789930258)*x_ref[1]**o+(-0.687939656508)*x_ref[1]
-        ref[3,2]=(0.0603011963958)*x_ref[0]**o+(-0.291794860225)*x_ref[0]+(-0.572598612637)*x_ref[1]**o+(0.308585554728)*x_ref[1]
-        ref[3,3]=(0.883976313141)*x_ref[0]**o+(0.857027876956)*x_ref[0]+(-0.991113135222)*x_ref[1]**o+(-0.0649848727938)*x_ref[1]
-        ref[3,4]=(-0.420604320052)*x_ref[0]**o+(-0.147041915772)*x_ref[0]+(0.696294525095)*x_ref[1]**o+(-0.45791291995)*x_ref[1]
-      else:
-        arg[0,0]=(0.650989082369)*x[0]**o+(-0.291482513935)*x[0]+(-0.791203000903)*x[1]**o+(0.297385821221)*x[1]+(-0.169814832171)*x[2]**o+(-0.125360282254)*x[2]
-        arg[0,1]=(0.166614460758)*x[0]**o+(0.0840046062434)*x[0]+(-0.114646748006)*x[1]**o+(-0.872705089326)*x[1]+(-0.687707782796)*x[2]**o+(-0.230067474846)*x[2]
-        arg[0,2]=(-0.219927466535)*x[0]**o+(-0.466007112543)*x[0]+(-0.255341401047)*x[1]**o+(0.615864283673)*x[1]+(-0.983984041665)*x[2]**o+(0.305409617185)*x[2]
-        arg[0,3]=(-0.0879672823913)*x[0]**o+(-0.956382814278)*x[0]+(-0.3091322614)*x[1]**o+(0.147177613425)*x[1]+(-0.98911137256)*x[2]**o+(-0.750791857003)*x[2]
-        arg[0,4]=(0.715277956634)*x[0]**o+(-0.73358535985)*x[0]+(0.14587372226)*x[1]**o+(0.411467948058)*x[1]+(0.925673970492)*x[2]**o+(-0.0678728528684)*x[2]
-        arg[1,0]=(0.150067062674)*x[0]**o+(-0.522799232667)*x[0]+(-0.256261929148)*x[1]**o+(-0.316346866901)*x[1]+(-0.849523865324)*x[2]**o+(-0.585421363115)*x[2]
-        arg[1,1]=(-0.49684130662)*x[0]**o+(0.868986326423)*x[0]+(0.650641361203)*x[1]**o+(0.558696373611)*x[1]+(0.945790183046)*x[2]**o+(0.379250336542)*x[2]
-        arg[1,2]=(-0.67349806443)*x[0]**o+(-0.337586770393)*x[0]+(0.719579305241)*x[1]**o+(-0.300711356473)*x[1]+(-0.350130081791)*x[2]**o+(0.604354519926)*x[2]
-        arg[1,3]=(-0.242995155153)*x[0]**o+(0.668842006698)*x[0]+(-0.981902121891)*x[1]**o+(-0.358779020262)*x[1]+(0.298801927955)*x[2]**o+(-0.859807798836)*x[2]
-        arg[1,4]=(-0.248474519407)*x[0]**o+(-0.309793754496)*x[0]+(-0.967889559474)*x[1]**o+(0.541761608865)*x[1]+(0.573726565934)*x[2]**o+(-0.876387334383)*x[2]
-        arg[2,0]=(0.879662395476)*x[0]**o+(0.172656747739)*x[0]+(0.74129137412)*x[1]**o+(0.236748254611)*x[1]+(0.764805785803)*x[2]**o+(-0.257470519211)*x[2]
-        arg[2,1]=(0.44326363254)*x[0]**o+(0.121548286191)*x[0]+(0.605969252858)*x[1]**o+(0.261621973968)*x[1]+(-0.694403080782)*x[2]**o+(0.15039482013)*x[2]
-        arg[2,2]=(-0.372758098923)*x[0]**o+(0.577481130716)*x[0]+(-0.120284392247)*x[1]**o+(-0.630815000386)*x[1]+(-0.601595664522)*x[2]**o+(0.806894830983)*x[2]
-        arg[2,3]=(0.548413470095)*x[0]**o+(0.804535150265)*x[0]+(0.469766192947)*x[1]**o+(-0.796431483578)*x[1]+(0.434732585165)*x[2]**o+(-0.20040808975)*x[2]
-        arg[2,4]=(-0.119065000638)*x[0]**o+(-0.651948510575)*x[0]+(0.868418571224)*x[1]**o+(-0.987758488584)*x[1]+(0.495264099949)*x[2]**o+(-0.928684424484)*x[2]
-        arg[3,0]=(-0.712239839816)*x[0]**o+(0.90734601523)*x[0]+(0.901855037856)*x[1]**o+(0.773630983477)*x[1]+(0.599873877074)*x[2]**o+(-0.511864534352)*x[2]
-        arg[3,1]=(0.0499812109271)*x[0]**o+(0.959791265887)*x[0]+(0.861696669737)*x[1]**o+(-0.887520952646)*x[1]+(-0.609317719697)*x[2]**o+(-0.314327480839)*x[2]
-        arg[3,2]=(0.717930038261)*x[0]**o+(-0.480998377737)*x[0]+(0.890930499387)*x[1]**o+(-0.880493180277)*x[1]+(0.540792831261)*x[2]**o+(0.343985055993)*x[2]
-        arg[3,3]=(0.20531032325)*x[0]**o+(0.0400856366105)*x[0]+(0.829583965232)*x[1]**o+(0.701555952938)*x[1]+(0.676177356543)*x[2]**o+(0.934250384088)*x[2]
-        arg[3,4]=(-0.426083844591)*x[0]**o+(0.0732912754379)*x[0]+(0.555586413705)*x[1]**o+(0.379137165516)*x[1]+(-0.481638055369)*x[2]**o+(-0.156787271652)*x[2]
-        ref[0,0]=(0.650989082369)*x_ref[0]**o+(-0.291482513935)*x_ref[0]+(-0.791203000903)*x_ref[1]**o+(0.297385821221)*x_ref[1]+(-0.169814832171)*x_ref[2]**o+(-0.125360282254)*x_ref[2]
-        ref[0,1]=(0.166614460758)*x_ref[0]**o+(0.0840046062434)*x_ref[0]+(-0.114646748006)*x_ref[1]**o+(-0.872705089326)*x_ref[1]+(-0.687707782796)*x_ref[2]**o+(-0.230067474846)*x_ref[2]
-        ref[0,2]=(-0.219927466535)*x_ref[0]**o+(-0.466007112543)*x_ref[0]+(-0.255341401047)*x_ref[1]**o+(0.615864283673)*x_ref[1]+(-0.983984041665)*x_ref[2]**o+(0.305409617185)*x_ref[2]
-        ref[0,3]=(-0.0879672823913)*x_ref[0]**o+(-0.956382814278)*x_ref[0]+(-0.3091322614)*x_ref[1]**o+(0.147177613425)*x_ref[1]+(-0.98911137256)*x_ref[2]**o+(-0.750791857003)*x_ref[2]
-        ref[0,4]=(0.715277956634)*x_ref[0]**o+(-0.73358535985)*x_ref[0]+(0.14587372226)*x_ref[1]**o+(0.411467948058)*x_ref[1]+(0.925673970492)*x_ref[2]**o+(-0.0678728528684)*x_ref[2]
-        ref[1,0]=(0.150067062674)*x_ref[0]**o+(-0.522799232667)*x_ref[0]+(-0.256261929148)*x_ref[1]**o+(-0.316346866901)*x_ref[1]+(-0.849523865324)*x_ref[2]**o+(-0.585421363115)*x_ref[2]
-        ref[1,1]=(-0.49684130662)*x_ref[0]**o+(0.868986326423)*x_ref[0]+(0.650641361203)*x_ref[1]**o+(0.558696373611)*x_ref[1]+(0.945790183046)*x_ref[2]**o+(0.379250336542)*x_ref[2]
-        ref[1,2]=(-0.67349806443)*x_ref[0]**o+(-0.337586770393)*x_ref[0]+(0.719579305241)*x_ref[1]**o+(-0.300711356473)*x_ref[1]+(-0.350130081791)*x_ref[2]**o+(0.604354519926)*x_ref[2]
-        ref[1,3]=(-0.242995155153)*x_ref[0]**o+(0.668842006698)*x_ref[0]+(-0.981902121891)*x_ref[1]**o+(-0.358779020262)*x_ref[1]+(0.298801927955)*x_ref[2]**o+(-0.859807798836)*x_ref[2]
-        ref[1,4]=(-0.248474519407)*x_ref[0]**o+(-0.309793754496)*x_ref[0]+(-0.967889559474)*x_ref[1]**o+(0.541761608865)*x_ref[1]+(0.573726565934)*x_ref[2]**o+(-0.876387334383)*x_ref[2]
-        ref[2,0]=(0.879662395476)*x_ref[0]**o+(0.172656747739)*x_ref[0]+(0.74129137412)*x_ref[1]**o+(0.236748254611)*x_ref[1]+(0.764805785803)*x_ref[2]**o+(-0.257470519211)*x_ref[2]
-        ref[2,1]=(0.44326363254)*x_ref[0]**o+(0.121548286191)*x_ref[0]+(0.605969252858)*x_ref[1]**o+(0.261621973968)*x_ref[1]+(-0.694403080782)*x_ref[2]**o+(0.15039482013)*x_ref[2]
-        ref[2,2]=(-0.372758098923)*x_ref[0]**o+(0.577481130716)*x_ref[0]+(-0.120284392247)*x_ref[1]**o+(-0.630815000386)*x_ref[1]+(-0.601595664522)*x_ref[2]**o+(0.806894830983)*x_ref[2]
-        ref[2,3]=(0.548413470095)*x_ref[0]**o+(0.804535150265)*x_ref[0]+(0.469766192947)*x_ref[1]**o+(-0.796431483578)*x_ref[1]+(0.434732585165)*x_ref[2]**o+(-0.20040808975)*x_ref[2]
-        ref[2,4]=(-0.119065000638)*x_ref[0]**o+(-0.651948510575)*x_ref[0]+(0.868418571224)*x_ref[1]**o+(-0.987758488584)*x_ref[1]+(0.495264099949)*x_ref[2]**o+(-0.928684424484)*x_ref[2]
-        ref[3,0]=(-0.712239839816)*x_ref[0]**o+(0.90734601523)*x_ref[0]+(0.901855037856)*x_ref[1]**o+(0.773630983477)*x_ref[1]+(0.599873877074)*x_ref[2]**o+(-0.511864534352)*x_ref[2]
-        ref[3,1]=(0.0499812109271)*x_ref[0]**o+(0.959791265887)*x_ref[0]+(0.861696669737)*x_ref[1]**o+(-0.887520952646)*x_ref[1]+(-0.609317719697)*x_ref[2]**o+(-0.314327480839)*x_ref[2]
-        ref[3,2]=(0.717930038261)*x_ref[0]**o+(-0.480998377737)*x_ref[0]+(0.890930499387)*x_ref[1]**o+(-0.880493180277)*x_ref[1]+(0.540792831261)*x_ref[2]**o+(0.343985055993)*x_ref[2]
-        ref[3,3]=(0.20531032325)*x_ref[0]**o+(0.0400856366105)*x_ref[0]+(0.829583965232)*x_ref[1]**o+(0.701555952938)*x_ref[1]+(0.676177356543)*x_ref[2]**o+(0.934250384088)*x_ref[2]
-        ref[3,4]=(-0.426083844591)*x_ref[0]**o+(0.0732912754379)*x_ref[0]+(0.555586413705)*x_ref[1]**o+(0.379137165516)*x_ref[1]+(-0.481638055369)*x_ref[2]**o+(-0.156787271652)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.0451039988637)*x[0]**o+(0.159426346984)*x[0]+(0.693271264689)*x[1]**o+(-0.129057826038)*x[1]
-        arg[0,0,1]=(0.165096887432)*x[0]**o+(0.421267288474)*x[0]+(0.259248346979)*x[1]**o+(-0.216110688389)*x[1]
-        arg[0,1,0]=(-0.419500329289)*x[0]**o+(-0.516326782996)*x[0]+(-0.726209291778)*x[1]**o+(0.80434579811)*x[1]
-        arg[0,1,1]=(-0.680429758627)*x[0]**o+(-0.539365634112)*x[0]+(-0.20379891956)*x[1]**o+(-0.760436888151)*x[1]
-        arg[1,0,0]=(-0.472638888322)*x[0]**o+(0.982469790589)*x[0]+(-0.383590346736)*x[1]**o+(-0.69130786846)*x[1]
-        arg[1,0,1]=(0.334498522873)*x[0]**o+(0.190404359107)*x[0]+(0.210624993429)*x[1]**o+(-0.744921567562)*x[1]
-        arg[1,1,0]=(0.632591775382)*x[0]**o+(-0.405215541727)*x[0]+(-0.880471123936)*x[1]**o+(0.0942729925938)*x[1]
-        arg[1,1,1]=(-0.837885933046)*x[0]**o+(-0.798882152889)*x[0]+(0.648322104814)*x[1]**o+(-0.357620132856)*x[1]
-        arg[2,0,0]=(-0.490592533882)*x[0]**o+(0.540431305386)*x[0]+(-0.777299904284)*x[1]**o+(-0.308682146808)*x[1]
-        arg[2,0,1]=(0.971265898941)*x[0]**o+(0.546875456819)*x[0]+(0.627171799906)*x[1]**o+(0.0732789392684)*x[1]
-        arg[2,1,0]=(0.178076638358)*x[0]**o+(0.587800697151)*x[0]+(0.748336208169)*x[1]**o+(-0.0341258196613)*x[1]
-        arg[2,1,1]=(0.36345594982)*x[0]**o+(-0.899402201831)*x[0]+(0.0206286665096)*x[1]**o+(0.303557722727)*x[1]
-        arg[3,0,0]=(-0.544119125777)*x[0]**o+(-0.805891689123)*x[0]+(-0.687902925271)*x[1]**o+(0.346236636736)*x[1]
-        arg[3,0,1]=(0.725902084271)*x[0]**o+(0.605461404125)*x[0]+(0.452767036006)*x[1]**o+(0.266584718883)*x[1]
-        arg[3,1,0]=(0.322052654392)*x[0]**o+(-0.91949636775)*x[0]+(0.948097272559)*x[1]**o+(-0.463715765101)*x[1]
-        arg[3,1,1]=(-0.369192142232)*x[0]**o+(0.616001201865)*x[0]+(-0.257989673651)*x[1]**o+(0.507550625249)*x[1]
-        arg[4,0,0]=(0.270343836597)*x[0]**o+(0.851686984957)*x[0]+(0.838756000051)*x[1]**o+(-0.329625536762)*x[1]
-        arg[4,0,1]=(0.00026238459417)*x[0]**o+(0.0274581707442)*x[0]+(0.770120998708)*x[1]**o+(0.574619799143)*x[1]
-        arg[4,1,0]=(-0.709788768284)*x[0]**o+(0.0856634157603)*x[0]+(-0.294662391976)*x[1]**o+(-0.90639308515)*x[1]
-        arg[4,1,1]=(0.223381811001)*x[0]**o+(0.941451590223)*x[0]+(0.917865807171)*x[1]**o+(0.912972271206)*x[1]
-        arg[5,0,0]=(-0.731163054411)*x[0]**o+(0.185548632151)*x[0]+(0.907527980776)*x[1]**o+(0.816017248525)*x[1]
-        arg[5,0,1]=(0.719177781335)*x[0]**o+(-0.788006096642)*x[0]+(-0.434802402615)*x[1]**o+(0.0249465251663)*x[1]
-        arg[5,1,0]=(0.982421863977)*x[0]**o+(0.127223012805)*x[0]+(-0.858491508817)*x[1]**o+(-0.152253965468)*x[1]
-        arg[5,1,1]=(-0.779596616421)*x[0]**o+(0.049815217296)*x[0]+(0.892121656728)*x[1]**o+(0.258587664554)*x[1]
-        ref[0,0,0]=(0.0451039988637)*x_ref[0]**o+(0.159426346984)*x_ref[0]+(0.693271264689)*x_ref[1]**o+(-0.129057826038)*x_ref[1]
-        ref[0,0,1]=(0.165096887432)*x_ref[0]**o+(0.421267288474)*x_ref[0]+(0.259248346979)*x_ref[1]**o+(-0.216110688389)*x_ref[1]
-        ref[0,1,0]=(-0.419500329289)*x_ref[0]**o+(-0.516326782996)*x_ref[0]+(-0.726209291778)*x_ref[1]**o+(0.80434579811)*x_ref[1]
-        ref[0,1,1]=(-0.680429758627)*x_ref[0]**o+(-0.539365634112)*x_ref[0]+(-0.20379891956)*x_ref[1]**o+(-0.760436888151)*x_ref[1]
-        ref[1,0,0]=(-0.472638888322)*x_ref[0]**o+(0.982469790589)*x_ref[0]+(-0.383590346736)*x_ref[1]**o+(-0.69130786846)*x_ref[1]
-        ref[1,0,1]=(0.334498522873)*x_ref[0]**o+(0.190404359107)*x_ref[0]+(0.210624993429)*x_ref[1]**o+(-0.744921567562)*x_ref[1]
-        ref[1,1,0]=(0.632591775382)*x_ref[0]**o+(-0.405215541727)*x_ref[0]+(-0.880471123936)*x_ref[1]**o+(0.0942729925938)*x_ref[1]
-        ref[1,1,1]=(-0.837885933046)*x_ref[0]**o+(-0.798882152889)*x_ref[0]+(0.648322104814)*x_ref[1]**o+(-0.357620132856)*x_ref[1]
-        ref[2,0,0]=(-0.490592533882)*x_ref[0]**o+(0.540431305386)*x_ref[0]+(-0.777299904284)*x_ref[1]**o+(-0.308682146808)*x_ref[1]
-        ref[2,0,1]=(0.971265898941)*x_ref[0]**o+(0.546875456819)*x_ref[0]+(0.627171799906)*x_ref[1]**o+(0.0732789392684)*x_ref[1]
-        ref[2,1,0]=(0.178076638358)*x_ref[0]**o+(0.587800697151)*x_ref[0]+(0.748336208169)*x_ref[1]**o+(-0.0341258196613)*x_ref[1]
-        ref[2,1,1]=(0.36345594982)*x_ref[0]**o+(-0.899402201831)*x_ref[0]+(0.0206286665096)*x_ref[1]**o+(0.303557722727)*x_ref[1]
-        ref[3,0,0]=(-0.544119125777)*x_ref[0]**o+(-0.805891689123)*x_ref[0]+(-0.687902925271)*x_ref[1]**o+(0.346236636736)*x_ref[1]
-        ref[3,0,1]=(0.725902084271)*x_ref[0]**o+(0.605461404125)*x_ref[0]+(0.452767036006)*x_ref[1]**o+(0.266584718883)*x_ref[1]
-        ref[3,1,0]=(0.322052654392)*x_ref[0]**o+(-0.91949636775)*x_ref[0]+(0.948097272559)*x_ref[1]**o+(-0.463715765101)*x_ref[1]
-        ref[3,1,1]=(-0.369192142232)*x_ref[0]**o+(0.616001201865)*x_ref[0]+(-0.257989673651)*x_ref[1]**o+(0.507550625249)*x_ref[1]
-        ref[4,0,0]=(0.270343836597)*x_ref[0]**o+(0.851686984957)*x_ref[0]+(0.838756000051)*x_ref[1]**o+(-0.329625536762)*x_ref[1]
-        ref[4,0,1]=(0.00026238459417)*x_ref[0]**o+(0.0274581707442)*x_ref[0]+(0.770120998708)*x_ref[1]**o+(0.574619799143)*x_ref[1]
-        ref[4,1,0]=(-0.709788768284)*x_ref[0]**o+(0.0856634157603)*x_ref[0]+(-0.294662391976)*x_ref[1]**o+(-0.90639308515)*x_ref[1]
-        ref[4,1,1]=(0.223381811001)*x_ref[0]**o+(0.941451590223)*x_ref[0]+(0.917865807171)*x_ref[1]**o+(0.912972271206)*x_ref[1]
-        ref[5,0,0]=(-0.731163054411)*x_ref[0]**o+(0.185548632151)*x_ref[0]+(0.907527980776)*x_ref[1]**o+(0.816017248525)*x_ref[1]
-        ref[5,0,1]=(0.719177781335)*x_ref[0]**o+(-0.788006096642)*x_ref[0]+(-0.434802402615)*x_ref[1]**o+(0.0249465251663)*x_ref[1]
-        ref[5,1,0]=(0.982421863977)*x_ref[0]**o+(0.127223012805)*x_ref[0]+(-0.858491508817)*x_ref[1]**o+(-0.152253965468)*x_ref[1]
-        ref[5,1,1]=(-0.779596616421)*x_ref[0]**o+(0.049815217296)*x_ref[0]+(0.892121656728)*x_ref[1]**o+(0.258587664554)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.804406156662)*x[0]**o+(0.304298949556)*x[0]+(-9.23949223481e-05)*x[1]**o+(0.521245437597)*x[1]+(0.822885620595)*x[2]**o+(0.44472437921)*x[2]
-        arg[0,0,1]=(0.208119461011)*x[0]**o+(-0.967847500694)*x[0]+(-0.182961335156)*x[1]**o+(-0.0510538508635)*x[1]+(0.932285255322)*x[2]**o+(-0.463525963095)*x[2]
-        arg[0,1,0]=(-0.0514207812926)*x[0]**o+(-0.730723672364)*x[0]+(-0.471144684451)*x[1]**o+(0.0359308791998)*x[1]+(-0.935079157697)*x[2]**o+(0.841965819816)*x[2]
-        arg[0,1,1]=(0.607427052267)*x[0]**o+(-0.344216102016)*x[0]+(0.967271353509)*x[1]**o+(-0.412288382331)*x[1]+(-0.0716617724983)*x[2]**o+(0.56895080823)*x[2]
-        arg[1,0,0]=(-0.574314769591)*x[0]**o+(-0.819434106932)*x[0]+(0.143229095273)*x[1]**o+(0.505343958082)*x[1]+(0.497764227469)*x[2]**o+(0.592609757968)*x[2]
-        arg[1,0,1]=(0.414984900558)*x[0]**o+(0.624574053857)*x[0]+(-0.367330776954)*x[1]**o+(-0.30093924896)*x[1]+(-0.99416380749)*x[2]**o+(0.492443599924)*x[2]
-        arg[1,1,0]=(0.171673119954)*x[0]**o+(0.612986140068)*x[0]+(-0.671355907363)*x[1]**o+(-0.292080539973)*x[1]+(-0.450890819125)*x[2]**o+(-0.64742047997)*x[2]
-        arg[1,1,1]=(0.452494887295)*x[0]**o+(0.187308285528)*x[0]+(-0.995316825981)*x[1]**o+(-0.825194018202)*x[1]+(-0.00651224511881)*x[2]**o+(-0.715747547803)*x[2]
-        arg[2,0,0]=(0.546297169466)*x[0]**o+(-0.424626884041)*x[0]+(0.327647062351)*x[1]**o+(-0.050651105527)*x[1]+(-0.667117310429)*x[2]**o+(-0.37659304263)*x[2]
-        arg[2,0,1]=(-0.323595958622)*x[0]**o+(0.541718593289)*x[0]+(0.6285998056)*x[1]**o+(0.488539567593)*x[1]+(0.983086232412)*x[2]**o+(0.692821558469)*x[2]
-        arg[2,1,0]=(0.16009856161)*x[0]**o+(-0.776069988482)*x[0]+(0.750717144319)*x[1]**o+(-0.244287895989)*x[1]+(0.345242766297)*x[2]**o+(0.572063651895)*x[2]
-        arg[2,1,1]=(-0.34626843638)*x[0]**o+(0.197125033681)*x[0]+(-0.570015603866)*x[1]**o+(-0.633161422872)*x[1]+(-0.602998606808)*x[2]**o+(-0.674829268895)*x[2]
-        arg[3,0,0]=(-0.659696747189)*x[0]**o+(-0.571128578512)*x[0]+(-0.704414117225)*x[1]**o+(-0.334924171135)*x[1]+(-0.0200665796175)*x[2]**o+(-0.660688341854)*x[2]
-        arg[3,0,1]=(-0.497019087713)*x[0]**o+(0.25850813993)*x[0]+(-0.713426904693)*x[1]**o+(-0.994061006282)*x[1]+(-0.669422282701)*x[2]**o+(-0.553981025574)*x[2]
-        arg[3,1,0]=(-0.151249618276)*x[0]**o+(0.29432574729)*x[0]+(0.173047919293)*x[1]**o+(0.844456199843)*x[1]+(0.845402272715)*x[2]**o+(-0.115698924822)*x[2]
-        arg[3,1,1]=(0.840440627264)*x[0]**o+(0.593400475213)*x[0]+(0.974677794562)*x[1]**o+(0.938845603167)*x[1]+(-0.944730436891)*x[2]**o+(-0.657543633218)*x[2]
-        arg[4,0,0]=(0.968290161629)*x[0]**o+(0.578471458995)*x[0]+(0.946558149029)*x[1]**o+(-0.232692317459)*x[1]+(-0.97762469848)*x[2]**o+(0.660519364613)*x[2]
-        arg[4,0,1]=(-0.187317070761)*x[0]**o+(-0.0363170179961)*x[0]+(0.278499613269)*x[1]**o+(-0.0685831047696)*x[1]+(-0.540282212359)*x[2]**o+(0.564656560066)*x[2]
-        arg[4,1,0]=(-0.211825530749)*x[0]**o+(0.225546568724)*x[0]+(-0.83241974026)*x[1]**o+(-0.503828393954)*x[1]+(-0.635937384108)*x[2]**o+(-0.513183062177)*x[2]
-        arg[4,1,1]=(-0.257123983215)*x[0]**o+(-0.0700924567638)*x[0]+(0.550859393713)*x[1]**o+(0.132070212001)*x[1]+(-0.478549332853)*x[2]**o+(-0.560087260102)*x[2]
-        arg[5,0,0]=(0.677259763344)*x[0]**o+(-0.213422444013)*x[0]+(-0.294112138735)*x[1]**o+(0.083135232348)*x[1]+(-0.899953896237)*x[2]**o+(-0.117143433064)*x[2]
-        arg[5,0,1]=(-0.489822592306)*x[0]**o+(0.368217759904)*x[0]+(-0.927837261915)*x[1]**o+(-0.708243327427)*x[1]+(-0.132256551163)*x[2]**o+(0.316204052014)*x[2]
-        arg[5,1,0]=(0.314897334392)*x[0]**o+(-0.848168680639)*x[0]+(0.92421318346)*x[1]**o+(0.995505186786)*x[1]+(0.372381949158)*x[2]**o+(-0.563415970977)*x[2]
-        arg[5,1,1]=(0.745011483885)*x[0]**o+(-0.6423283108)*x[0]+(-0.119592965986)*x[1]**o+(0.241068250891)*x[1]+(0.477172198315)*x[2]**o+(-0.468580220406)*x[2]
-        ref[0,0,0]=(0.804406156662)*x_ref[0]**o+(0.304298949556)*x_ref[0]+(-9.23949223481e-05)*x_ref[1]**o+(0.521245437597)*x_ref[1]+(0.822885620595)*x_ref[2]**o+(0.44472437921)*x_ref[2]
-        ref[0,0,1]=(0.208119461011)*x_ref[0]**o+(-0.967847500694)*x_ref[0]+(-0.182961335156)*x_ref[1]**o+(-0.0510538508635)*x_ref[1]+(0.932285255322)*x_ref[2]**o+(-0.463525963095)*x_ref[2]
-        ref[0,1,0]=(-0.0514207812926)*x_ref[0]**o+(-0.730723672364)*x_ref[0]+(-0.471144684451)*x_ref[1]**o+(0.0359308791998)*x_ref[1]+(-0.935079157697)*x_ref[2]**o+(0.841965819816)*x_ref[2]
-        ref[0,1,1]=(0.607427052267)*x_ref[0]**o+(-0.344216102016)*x_ref[0]+(0.967271353509)*x_ref[1]**o+(-0.412288382331)*x_ref[1]+(-0.0716617724983)*x_ref[2]**o+(0.56895080823)*x_ref[2]
-        ref[1,0,0]=(-0.574314769591)*x_ref[0]**o+(-0.819434106932)*x_ref[0]+(0.143229095273)*x_ref[1]**o+(0.505343958082)*x_ref[1]+(0.497764227469)*x_ref[2]**o+(0.592609757968)*x_ref[2]
-        ref[1,0,1]=(0.414984900558)*x_ref[0]**o+(0.624574053857)*x_ref[0]+(-0.367330776954)*x_ref[1]**o+(-0.30093924896)*x_ref[1]+(-0.99416380749)*x_ref[2]**o+(0.492443599924)*x_ref[2]
-        ref[1,1,0]=(0.171673119954)*x_ref[0]**o+(0.612986140068)*x_ref[0]+(-0.671355907363)*x_ref[1]**o+(-0.292080539973)*x_ref[1]+(-0.450890819125)*x_ref[2]**o+(-0.64742047997)*x_ref[2]
-        ref[1,1,1]=(0.452494887295)*x_ref[0]**o+(0.187308285528)*x_ref[0]+(-0.995316825981)*x_ref[1]**o+(-0.825194018202)*x_ref[1]+(-0.00651224511881)*x_ref[2]**o+(-0.715747547803)*x_ref[2]
-        ref[2,0,0]=(0.546297169466)*x_ref[0]**o+(-0.424626884041)*x_ref[0]+(0.327647062351)*x_ref[1]**o+(-0.050651105527)*x_ref[1]+(-0.667117310429)*x_ref[2]**o+(-0.37659304263)*x_ref[2]
-        ref[2,0,1]=(-0.323595958622)*x_ref[0]**o+(0.541718593289)*x_ref[0]+(0.6285998056)*x_ref[1]**o+(0.488539567593)*x_ref[1]+(0.983086232412)*x_ref[2]**o+(0.692821558469)*x_ref[2]
-        ref[2,1,0]=(0.16009856161)*x_ref[0]**o+(-0.776069988482)*x_ref[0]+(0.750717144319)*x_ref[1]**o+(-0.244287895989)*x_ref[1]+(0.345242766297)*x_ref[2]**o+(0.572063651895)*x_ref[2]
-        ref[2,1,1]=(-0.34626843638)*x_ref[0]**o+(0.197125033681)*x_ref[0]+(-0.570015603866)*x_ref[1]**o+(-0.633161422872)*x_ref[1]+(-0.602998606808)*x_ref[2]**o+(-0.674829268895)*x_ref[2]
-        ref[3,0,0]=(-0.659696747189)*x_ref[0]**o+(-0.571128578512)*x_ref[0]+(-0.704414117225)*x_ref[1]**o+(-0.334924171135)*x_ref[1]+(-0.0200665796175)*x_ref[2]**o+(-0.660688341854)*x_ref[2]
-        ref[3,0,1]=(-0.497019087713)*x_ref[0]**o+(0.25850813993)*x_ref[0]+(-0.713426904693)*x_ref[1]**o+(-0.994061006282)*x_ref[1]+(-0.669422282701)*x_ref[2]**o+(-0.553981025574)*x_ref[2]
-        ref[3,1,0]=(-0.151249618276)*x_ref[0]**o+(0.29432574729)*x_ref[0]+(0.173047919293)*x_ref[1]**o+(0.844456199843)*x_ref[1]+(0.845402272715)*x_ref[2]**o+(-0.115698924822)*x_ref[2]
-        ref[3,1,1]=(0.840440627264)*x_ref[0]**o+(0.593400475213)*x_ref[0]+(0.974677794562)*x_ref[1]**o+(0.938845603167)*x_ref[1]+(-0.944730436891)*x_ref[2]**o+(-0.657543633218)*x_ref[2]
-        ref[4,0,0]=(0.968290161629)*x_ref[0]**o+(0.578471458995)*x_ref[0]+(0.946558149029)*x_ref[1]**o+(-0.232692317459)*x_ref[1]+(-0.97762469848)*x_ref[2]**o+(0.660519364613)*x_ref[2]
-        ref[4,0,1]=(-0.187317070761)*x_ref[0]**o+(-0.0363170179961)*x_ref[0]+(0.278499613269)*x_ref[1]**o+(-0.0685831047696)*x_ref[1]+(-0.540282212359)*x_ref[2]**o+(0.564656560066)*x_ref[2]
-        ref[4,1,0]=(-0.211825530749)*x_ref[0]**o+(0.225546568724)*x_ref[0]+(-0.83241974026)*x_ref[1]**o+(-0.503828393954)*x_ref[1]+(-0.635937384108)*x_ref[2]**o+(-0.513183062177)*x_ref[2]
-        ref[4,1,1]=(-0.257123983215)*x_ref[0]**o+(-0.0700924567638)*x_ref[0]+(0.550859393713)*x_ref[1]**o+(0.132070212001)*x_ref[1]+(-0.478549332853)*x_ref[2]**o+(-0.560087260102)*x_ref[2]
-        ref[5,0,0]=(0.677259763344)*x_ref[0]**o+(-0.213422444013)*x_ref[0]+(-0.294112138735)*x_ref[1]**o+(0.083135232348)*x_ref[1]+(-0.899953896237)*x_ref[2]**o+(-0.117143433064)*x_ref[2]
-        ref[5,0,1]=(-0.489822592306)*x_ref[0]**o+(0.368217759904)*x_ref[0]+(-0.927837261915)*x_ref[1]**o+(-0.708243327427)*x_ref[1]+(-0.132256551163)*x_ref[2]**o+(0.316204052014)*x_ref[2]
-        ref[5,1,0]=(0.314897334392)*x_ref[0]**o+(-0.848168680639)*x_ref[0]+(0.92421318346)*x_ref[1]**o+(0.995505186786)*x_ref[1]+(0.372381949158)*x_ref[2]**o+(-0.563415970977)*x_ref[2]
-        ref[5,1,1]=(0.745011483885)*x_ref[0]**o+(-0.6423283108)*x_ref[0]+(-0.119592965986)*x_ref[1]**o+(0.241068250891)*x_ref[1]+(0.477172198315)*x_ref[2]**o+(-0.468580220406)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.633576516648)*x[0]**o+(0.77399256211)*x[0]+(-0.396696417195)*x[1]**o+(-0.604572540725)*x[1]
-        arg[0,0,0,1]=(0.612672991978)*x[0]**o+(-0.331012302611)*x[0]+(0.885533578235)*x[1]**o+(0.334686818058)*x[1]
-        arg[0,0,1,0]=(-0.982701069025)*x[0]**o+(0.467849033642)*x[0]+(0.525392773375)*x[1]**o+(0.355622324425)*x[1]
-        arg[0,0,1,1]=(-0.0243671469666)*x[0]**o+(0.790044842383)*x[0]+(0.413384172033)*x[1]**o+(0.740805135968)*x[1]
-        arg[0,0,2,0]=(0.0384789957691)*x[0]**o+(-0.317009899417)*x[0]+(0.0389710369615)*x[1]**o+(0.784549852598)*x[1]
-        arg[0,0,2,1]=(0.361832259252)*x[0]**o+(0.410815792944)*x[0]+(0.39496145831)*x[1]**o+(-0.820784143964)*x[1]
-        arg[0,1,0,0]=(0.224261088976)*x[0]**o+(-0.824694527256)*x[0]+(0.318674472135)*x[1]**o+(0.827696354338)*x[1]
-        arg[0,1,0,1]=(-0.442154901359)*x[0]**o+(0.141775320862)*x[0]+(0.688711841268)*x[1]**o+(-0.27047542755)*x[1]
-        arg[0,1,1,0]=(-0.570125802019)*x[0]**o+(0.050303762895)*x[0]+(-0.972329837417)*x[1]**o+(0.143700303765)*x[1]
-        arg[0,1,1,1]=(0.852888550499)*x[0]**o+(-0.51216090329)*x[0]+(-0.895663922335)*x[1]**o+(-0.183466225547)*x[1]
-        arg[0,1,2,0]=(0.863840920739)*x[0]**o+(-0.247789353524)*x[0]+(0.63056436157)*x[1]**o+(0.932522589942)*x[1]
-        arg[0,1,2,1]=(-0.403832121794)*x[0]**o+(-0.769625259789)*x[0]+(0.507724303191)*x[1]**o+(0.314178775526)*x[1]
-        arg[0,2,0,0]=(0.543867153515)*x[0]**o+(-0.414107817028)*x[0]+(0.423922720842)*x[1]**o+(0.166632407916)*x[1]
-        arg[0,2,0,1]=(0.731968209929)*x[0]**o+(-0.114742736683)*x[0]+(0.112562415021)*x[1]**o+(0.166924480325)*x[1]
-        arg[0,2,1,0]=(0.919472066242)*x[0]**o+(0.560565315205)*x[0]+(0.4967650028)*x[1]**o+(0.708376671625)*x[1]
-        arg[0,2,1,1]=(0.147500239739)*x[0]**o+(-0.632670389919)*x[0]+(-0.992479063437)*x[1]**o+(0.258941122962)*x[1]
-        arg[0,2,2,0]=(0.474481785329)*x[0]**o+(0.592902604094)*x[0]+(0.64058685211)*x[1]**o+(-0.477843307901)*x[1]
-        arg[0,2,2,1]=(0.769898355146)*x[0]**o+(0.563458279487)*x[0]+(0.876276425449)*x[1]**o+(-0.0625727749869)*x[1]
-        arg[0,3,0,0]=(-0.330055037059)*x[0]**o+(-0.727656105163)*x[0]+(-0.559901684392)*x[1]**o+(-0.433646878263)*x[1]
-        arg[0,3,0,1]=(-0.725314328666)*x[0]**o+(0.638326609105)*x[0]+(-0.126619368417)*x[1]**o+(-0.232194758676)*x[1]
-        arg[0,3,1,0]=(0.318096005545)*x[0]**o+(0.325247494289)*x[0]+(-0.514305253643)*x[1]**o+(0.108523350086)*x[1]
-        arg[0,3,1,1]=(0.298034894956)*x[0]**o+(0.825714393651)*x[0]+(-0.67162850079)*x[1]**o+(0.681809083004)*x[1]
-        arg[0,3,2,0]=(-0.00715890582648)*x[0]**o+(0.893900731227)*x[0]+(-0.773710274545)*x[1]**o+(0.415913728569)*x[1]
-        arg[0,3,2,1]=(0.0853551940958)*x[0]**o+(-0.228876011127)*x[0]+(0.87699456762)*x[1]**o+(-0.744605229253)*x[1]
-        arg[0,4,0,0]=(0.942646937302)*x[0]**o+(0.92717236759)*x[0]+(0.794806821569)*x[1]**o+(0.848766303526)*x[1]
-        arg[0,4,0,1]=(0.20140672561)*x[0]**o+(0.974490372414)*x[0]+(-0.450332419587)*x[1]**o+(-0.859102184782)*x[1]
-        arg[0,4,1,0]=(0.632153053193)*x[0]**o+(0.702336756277)*x[0]+(-0.571496076236)*x[1]**o+(-0.882472852219)*x[1]
-        arg[0,4,1,1]=(0.366452829499)*x[0]**o+(-0.514660164741)*x[0]+(-0.152794832253)*x[1]**o+(-0.658688117796)*x[1]
-        arg[0,4,2,0]=(0.406218394702)*x[0]**o+(0.782359698198)*x[0]+(-0.0582499587562)*x[1]**o+(0.664506852595)*x[1]
-        arg[0,4,2,1]=(0.768240870343)*x[0]**o+(0.188470592904)*x[0]+(0.855933509171)*x[1]**o+(0.639174087541)*x[1]
-        arg[1,0,0,0]=(-0.946841398046)*x[0]**o+(0.892729256183)*x[0]+(-0.15644094115)*x[1]**o+(-0.859371368233)*x[1]
-        arg[1,0,0,1]=(0.238113647666)*x[0]**o+(0.173695470467)*x[0]+(-0.753529252313)*x[1]**o+(-0.243203902463)*x[1]
-        arg[1,0,1,0]=(0.267937523443)*x[0]**o+(0.600200492374)*x[0]+(0.442653529257)*x[1]**o+(-0.394984210541)*x[1]
-        arg[1,0,1,1]=(-0.495022907622)*x[0]**o+(-0.593273808093)*x[0]+(0.888764746608)*x[1]**o+(-0.745127825763)*x[1]
-        arg[1,0,2,0]=(0.352827238496)*x[0]**o+(0.293200928839)*x[0]+(-0.00369812109034)*x[1]**o+(0.478875774193)*x[1]
-        arg[1,0,2,1]=(-0.403358878981)*x[0]**o+(0.756947364667)*x[0]+(0.649335795039)*x[1]**o+(-0.339962796859)*x[1]
-        arg[1,1,0,0]=(-0.607505349015)*x[0]**o+(-0.392535399582)*x[0]+(0.799782389634)*x[1]**o+(0.186339165863)*x[1]
-        arg[1,1,0,1]=(0.997492304627)*x[0]**o+(-0.281456622581)*x[0]+(-0.959294693613)*x[1]**o+(-0.454812606674)*x[1]
-        arg[1,1,1,0]=(0.454682037549)*x[0]**o+(0.797129935647)*x[0]+(-0.949539573053)*x[1]**o+(-0.918499382199)*x[1]
-        arg[1,1,1,1]=(0.903016449758)*x[0]**o+(-0.575039046836)*x[0]+(0.957158277074)*x[1]**o+(-0.715797460906)*x[1]
-        arg[1,1,2,0]=(0.92005547899)*x[0]**o+(-0.716975919302)*x[0]+(-0.900904311708)*x[1]**o+(0.989458809643)*x[1]
-        arg[1,1,2,1]=(-0.633214991087)*x[0]**o+(0.680658578627)*x[0]+(0.552194054556)*x[1]**o+(0.343557072769)*x[1]
-        arg[1,2,0,0]=(-0.0182903530463)*x[0]**o+(-0.0445569497267)*x[0]+(-0.259920069365)*x[1]**o+(0.118765787279)*x[1]
-        arg[1,2,0,1]=(-0.667382174733)*x[0]**o+(-0.79898800024)*x[0]+(-0.217638556567)*x[1]**o+(-0.0288504127936)*x[1]
-        arg[1,2,1,0]=(-0.437982445862)*x[0]**o+(-0.104054454808)*x[0]+(0.711429718088)*x[1]**o+(-0.607226296329)*x[1]
-        arg[1,2,1,1]=(0.252861218037)*x[0]**o+(-0.635701456504)*x[0]+(-0.555222304592)*x[1]**o+(0.723744010092)*x[1]
-        arg[1,2,2,0]=(-0.73532710885)*x[0]**o+(0.600599078741)*x[0]+(0.0465795173194)*x[1]**o+(0.524165544645)*x[1]
-        arg[1,2,2,1]=(-0.025246019744)*x[0]**o+(-0.376526675619)*x[0]+(0.213011788698)*x[1]**o+(-0.477018225777)*x[1]
-        arg[1,3,0,0]=(-0.52682690957)*x[0]**o+(0.0567472858499)*x[0]+(0.574116256102)*x[1]**o+(-0.130012791898)*x[1]
-        arg[1,3,0,1]=(0.113502182936)*x[0]**o+(0.7643861313)*x[0]+(0.48414948847)*x[1]**o+(0.863168250318)*x[1]
-        arg[1,3,1,0]=(-0.208102162378)*x[0]**o+(0.327770728981)*x[0]+(0.843778895278)*x[1]**o+(0.474843504177)*x[1]
-        arg[1,3,1,1]=(-0.549818192184)*x[0]**o+(-0.863333816685)*x[0]+(-0.365631583957)*x[1]**o+(-0.491320441182)*x[1]
-        arg[1,3,2,0]=(-0.265833845759)*x[0]**o+(-0.94416746081)*x[0]+(0.48465442593)*x[1]**o+(0.258284621408)*x[1]
-        arg[1,3,2,1]=(-0.625716082268)*x[0]**o+(-0.234697130359)*x[0]+(-0.973704406131)*x[1]**o+(0.00141746117847)*x[1]
-        arg[1,4,0,0]=(0.565044361964)*x[0]**o+(-0.0672474991748)*x[0]+(-0.125901930524)*x[1]**o+(-0.753103899732)*x[1]
-        arg[1,4,0,1]=(-0.979743467289)*x[0]**o+(-0.25225085214)*x[0]+(-0.141635164635)*x[1]**o+(0.378153168667)*x[1]
-        arg[1,4,1,0]=(0.97728399206)*x[0]**o+(-0.202043160532)*x[0]+(0.997445424954)*x[1]**o+(-0.100049830154)*x[1]
-        arg[1,4,1,1]=(0.364840105486)*x[0]**o+(-0.682234327437)*x[0]+(0.252584592259)*x[1]**o+(-0.0785430242425)*x[1]
-        arg[1,4,2,0]=(-0.0168764722616)*x[0]**o+(-0.997460139026)*x[0]+(0.560548548912)*x[1]**o+(0.220532224022)*x[1]
-        arg[1,4,2,1]=(0.307927943715)*x[0]**o+(0.496390872708)*x[0]+(0.982750813274)*x[1]**o+(0.392968327778)*x[1]
-        arg[2,0,0,0]=(0.645991188948)*x[0]**o+(0.104035822886)*x[0]+(0.18285829097)*x[1]**o+(0.51186286294)*x[1]
-        arg[2,0,0,1]=(-0.996971717318)*x[0]**o+(0.126488047141)*x[0]+(0.123585312562)*x[1]**o+(-0.775854123529)*x[1]
-        arg[2,0,1,0]=(-0.0258590124655)*x[0]**o+(0.0079454735671)*x[0]+(-0.42819024422)*x[1]**o+(0.12377360967)*x[1]
-        arg[2,0,1,1]=(0.990441351225)*x[0]**o+(-0.453806376472)*x[0]+(0.134316618645)*x[1]**o+(-0.902666953282)*x[1]
-        arg[2,0,2,0]=(0.149304385108)*x[0]**o+(-0.226132046999)*x[0]+(0.647186106203)*x[1]**o+(-0.269247029225)*x[1]
-        arg[2,0,2,1]=(-0.159068164422)*x[0]**o+(-0.392275577366)*x[0]+(0.131423093404)*x[1]**o+(-0.353311282658)*x[1]
-        arg[2,1,0,0]=(-0.2862918681)*x[0]**o+(-0.392264098939)*x[0]+(-0.344033237285)*x[1]**o+(0.644261713963)*x[1]
-        arg[2,1,0,1]=(0.398022911658)*x[0]**o+(-0.84552546032)*x[0]+(-0.823861260943)*x[1]**o+(0.739994988755)*x[1]
-        arg[2,1,1,0]=(-0.696854341234)*x[0]**o+(-0.810851183298)*x[0]+(-0.712182042896)*x[1]**o+(0.594887691783)*x[1]
-        arg[2,1,1,1]=(-0.182583840117)*x[0]**o+(0.962594377088)*x[0]+(-0.0157575661453)*x[1]**o+(-0.432167995007)*x[1]
-        arg[2,1,2,0]=(0.293029196216)*x[0]**o+(0.46839918212)*x[0]+(0.262375931577)*x[1]**o+(0.0348536956306)*x[1]
-        arg[2,1,2,1]=(0.775632135095)*x[0]**o+(-0.874598534107)*x[0]+(0.711602976736)*x[1]**o+(0.37065543293)*x[1]
-        arg[2,2,0,0]=(-0.103625214158)*x[0]**o+(0.553558117877)*x[0]+(-0.0522465477589)*x[1]**o+(-0.747139195529)*x[1]
-        arg[2,2,0,1]=(0.507427663615)*x[0]**o+(-0.536361186134)*x[0]+(0.809054726193)*x[1]**o+(-0.979546347794)*x[1]
-        arg[2,2,1,0]=(0.786210623833)*x[0]**o+(0.244510127091)*x[0]+(0.159799334111)*x[1]**o+(0.0499263839273)*x[1]
-        arg[2,2,1,1]=(0.454205244371)*x[0]**o+(-0.650927822092)*x[0]+(-0.939252656087)*x[1]**o+(-0.894014755314)*x[1]
-        arg[2,2,2,0]=(-0.829617920904)*x[0]**o+(0.764070900994)*x[0]+(0.972419443556)*x[1]**o+(-0.824913543157)*x[1]
-        arg[2,2,2,1]=(0.694310748478)*x[0]**o+(-0.191413364091)*x[0]+(0.588258464472)*x[1]**o+(0.743973223755)*x[1]
-        arg[2,3,0,0]=(-0.588397365184)*x[0]**o+(-0.634207034861)*x[0]+(0.0853498555546)*x[1]**o+(0.559933556865)*x[1]
-        arg[2,3,0,1]=(0.626829165689)*x[0]**o+(0.942185296616)*x[0]+(0.0360770405565)*x[1]**o+(0.635966218547)*x[1]
-        arg[2,3,1,0]=(-0.0103526873852)*x[0]**o+(0.546330663496)*x[0]+(0.799224103454)*x[1]**o+(0.791922324897)*x[1]
-        arg[2,3,1,1]=(0.921564474495)*x[0]**o+(-0.420410835144)*x[0]+(-0.20482503843)*x[1]**o+(-0.483331643037)*x[1]
-        arg[2,3,2,0]=(-0.903600870314)*x[0]**o+(0.901956716274)*x[0]+(-0.113926342023)*x[1]**o+(-0.061596184768)*x[1]
-        arg[2,3,2,1]=(0.653250267262)*x[0]**o+(-0.13770933726)*x[0]+(-0.0791563636079)*x[1]**o+(-0.578313150893)*x[1]
-        arg[2,4,0,0]=(0.993903405725)*x[0]**o+(0.694324226249)*x[0]+(0.203872883541)*x[1]**o+(-0.526880767264)*x[1]
-        arg[2,4,0,1]=(0.0120058513647)*x[0]**o+(0.00907603337269)*x[0]+(0.0247958601677)*x[1]**o+(-0.996916120875)*x[1]
-        arg[2,4,1,0]=(0.281518049478)*x[0]**o+(0.0773799323777)*x[0]+(-0.968565098773)*x[1]**o+(-0.275558076229)*x[1]
-        arg[2,4,1,1]=(0.565275744757)*x[0]**o+(0.978636675869)*x[0]+(-0.352951657751)*x[1]**o+(-0.54170487914)*x[1]
-        arg[2,4,2,0]=(-0.571207550678)*x[0]**o+(0.196754283318)*x[0]+(0.665558917127)*x[1]**o+(0.361915269355)*x[1]
-        arg[2,4,2,1]=(0.54579191885)*x[0]**o+(0.798319371798)*x[0]+(0.961669996133)*x[1]**o+(-0.549305529342)*x[1]
-        arg[3,0,0,0]=(0.264064946121)*x[0]**o+(-0.314396185593)*x[0]+(-0.017492206135)*x[1]**o+(0.190513393091)*x[1]
-        arg[3,0,0,1]=(0.812213666919)*x[0]**o+(-0.757919357489)*x[0]+(0.294829087285)*x[1]**o+(0.916181101963)*x[1]
-        arg[3,0,1,0]=(-0.529906091574)*x[0]**o+(0.553682716765)*x[0]+(-0.693177625995)*x[1]**o+(0.377145561683)*x[1]
-        arg[3,0,1,1]=(-0.298942248169)*x[0]**o+(0.876878593705)*x[0]+(-0.609807982832)*x[1]**o+(-0.574954919539)*x[1]
-        arg[3,0,2,0]=(-0.729324018245)*x[0]**o+(-0.495194565254)*x[0]+(-0.616162751356)*x[1]**o+(0.878549207376)*x[1]
-        arg[3,0,2,1]=(0.625373988248)*x[0]**o+(0.106736108396)*x[0]+(-0.871225833944)*x[1]**o+(0.840614493429)*x[1]
-        arg[3,1,0,0]=(-0.90880839589)*x[0]**o+(0.390298288126)*x[0]+(0.446872042362)*x[1]**o+(-0.0703294219415)*x[1]
-        arg[3,1,0,1]=(-0.0706115592617)*x[0]**o+(-0.158386152093)*x[0]+(-0.687459181052)*x[1]**o+(-0.251170026598)*x[1]
-        arg[3,1,1,0]=(-0.286907297081)*x[0]**o+(0.185480985579)*x[0]+(-0.49763263834)*x[1]**o+(-0.773056048642)*x[1]
-        arg[3,1,1,1]=(-0.849572703562)*x[0]**o+(0.481739532516)*x[0]+(-0.227573063955)*x[1]**o+(-0.282367611381)*x[1]
-        arg[3,1,2,0]=(-0.524975224603)*x[0]**o+(-0.795450756917)*x[0]+(-0.656865716441)*x[1]**o+(-0.0166902340102)*x[1]
-        arg[3,1,2,1]=(-0.297441818145)*x[0]**o+(-0.726759852457)*x[0]+(0.146859888138)*x[1]**o+(-0.73690394554)*x[1]
-        arg[3,2,0,0]=(-0.278794538596)*x[0]**o+(-0.463428732496)*x[0]+(-0.478500378607)*x[1]**o+(0.806643392698)*x[1]
-        arg[3,2,0,1]=(0.573853299578)*x[0]**o+(-0.324830388013)*x[0]+(-0.185528736416)*x[1]**o+(0.444228024864)*x[1]
-        arg[3,2,1,0]=(0.686054084195)*x[0]**o+(-0.914380567743)*x[0]+(0.751959744445)*x[1]**o+(0.531759675659)*x[1]
-        arg[3,2,1,1]=(-0.876330263589)*x[0]**o+(0.566155144894)*x[0]+(-0.0233988901429)*x[1]**o+(0.42480184987)*x[1]
-        arg[3,2,2,0]=(0.957053098936)*x[0]**o+(0.152292007141)*x[0]+(0.332521504492)*x[1]**o+(-0.289068173241)*x[1]
-        arg[3,2,2,1]=(0.923170924493)*x[0]**o+(0.191154526504)*x[0]+(0.647848811717)*x[1]**o+(0.72509033544)*x[1]
-        arg[3,3,0,0]=(0.388829993841)*x[0]**o+(0.243404004988)*x[0]+(-0.0313000323506)*x[1]**o+(0.558135056894)*x[1]
-        arg[3,3,0,1]=(-0.784568790167)*x[0]**o+(0.742074534256)*x[0]+(-0.624869261724)*x[1]**o+(-0.412100194843)*x[1]
-        arg[3,3,1,0]=(0.924173486785)*x[0]**o+(-0.966635363007)*x[0]+(0.395550623492)*x[1]**o+(0.469204722173)*x[1]
-        arg[3,3,1,1]=(-0.842963105645)*x[0]**o+(0.685039360106)*x[0]+(0.279605123662)*x[1]**o+(-0.953092961091)*x[1]
-        arg[3,3,2,0]=(0.598860382403)*x[0]**o+(-0.226413712435)*x[0]+(0.722250410625)*x[1]**o+(-0.944980469407)*x[1]
-        arg[3,3,2,1]=(0.787289357927)*x[0]**o+(-0.270737247579)*x[0]+(-0.134351386793)*x[1]**o+(-0.0437387143766)*x[1]
-        arg[3,4,0,0]=(-0.0601939617429)*x[0]**o+(-0.212346121247)*x[0]+(0.0137510326612)*x[1]**o+(0.749376479477)*x[1]
-        arg[3,4,0,1]=(-0.515391847891)*x[0]**o+(-0.191867157458)*x[0]+(0.0883438399597)*x[1]**o+(-0.155095894625)*x[1]
-        arg[3,4,1,0]=(0.172678225476)*x[0]**o+(-0.917390756059)*x[0]+(-0.498696112089)*x[1]**o+(-0.267655707135)*x[1]
-        arg[3,4,1,1]=(-0.498294994476)*x[0]**o+(-0.301078252047)*x[0]+(0.100215523329)*x[1]**o+(-0.424039854141)*x[1]
-        arg[3,4,2,0]=(0.904127003142)*x[0]**o+(-0.70704194874)*x[0]+(0.309638449466)*x[1]**o+(-0.290894515899)*x[1]
-        arg[3,4,2,1]=(-0.924994398191)*x[0]**o+(0.624996423224)*x[0]+(0.461586866277)*x[1]**o+(-0.499709859121)*x[1]
-        ref[0,0,0,0]=(-0.633576516648)*x_ref[0]**o+(0.77399256211)*x_ref[0]+(-0.396696417195)*x_ref[1]**o+(-0.604572540725)*x_ref[1]
-        ref[0,0,0,1]=(0.612672991978)*x_ref[0]**o+(-0.331012302611)*x_ref[0]+(0.885533578235)*x_ref[1]**o+(0.334686818058)*x_ref[1]
-        ref[0,0,1,0]=(-0.982701069025)*x_ref[0]**o+(0.467849033642)*x_ref[0]+(0.525392773375)*x_ref[1]**o+(0.355622324425)*x_ref[1]
-        ref[0,0,1,1]=(-0.0243671469666)*x_ref[0]**o+(0.790044842383)*x_ref[0]+(0.413384172033)*x_ref[1]**o+(0.740805135968)*x_ref[1]
-        ref[0,0,2,0]=(0.0384789957691)*x_ref[0]**o+(-0.317009899417)*x_ref[0]+(0.0389710369615)*x_ref[1]**o+(0.784549852598)*x_ref[1]
-        ref[0,0,2,1]=(0.361832259252)*x_ref[0]**o+(0.410815792944)*x_ref[0]+(0.39496145831)*x_ref[1]**o+(-0.820784143964)*x_ref[1]
-        ref[0,1,0,0]=(0.224261088976)*x_ref[0]**o+(-0.824694527256)*x_ref[0]+(0.318674472135)*x_ref[1]**o+(0.827696354338)*x_ref[1]
-        ref[0,1,0,1]=(-0.442154901359)*x_ref[0]**o+(0.141775320862)*x_ref[0]+(0.688711841268)*x_ref[1]**o+(-0.27047542755)*x_ref[1]
-        ref[0,1,1,0]=(-0.570125802019)*x_ref[0]**o+(0.050303762895)*x_ref[0]+(-0.972329837417)*x_ref[1]**o+(0.143700303765)*x_ref[1]
-        ref[0,1,1,1]=(0.852888550499)*x_ref[0]**o+(-0.51216090329)*x_ref[0]+(-0.895663922335)*x_ref[1]**o+(-0.183466225547)*x_ref[1]
-        ref[0,1,2,0]=(0.863840920739)*x_ref[0]**o+(-0.247789353524)*x_ref[0]+(0.63056436157)*x_ref[1]**o+(0.932522589942)*x_ref[1]
-        ref[0,1,2,1]=(-0.403832121794)*x_ref[0]**o+(-0.769625259789)*x_ref[0]+(0.507724303191)*x_ref[1]**o+(0.314178775526)*x_ref[1]
-        ref[0,2,0,0]=(0.543867153515)*x_ref[0]**o+(-0.414107817028)*x_ref[0]+(0.423922720842)*x_ref[1]**o+(0.166632407916)*x_ref[1]
-        ref[0,2,0,1]=(0.731968209929)*x_ref[0]**o+(-0.114742736683)*x_ref[0]+(0.112562415021)*x_ref[1]**o+(0.166924480325)*x_ref[1]
-        ref[0,2,1,0]=(0.919472066242)*x_ref[0]**o+(0.560565315205)*x_ref[0]+(0.4967650028)*x_ref[1]**o+(0.708376671625)*x_ref[1]
-        ref[0,2,1,1]=(0.147500239739)*x_ref[0]**o+(-0.632670389919)*x_ref[0]+(-0.992479063437)*x_ref[1]**o+(0.258941122962)*x_ref[1]
-        ref[0,2,2,0]=(0.474481785329)*x_ref[0]**o+(0.592902604094)*x_ref[0]+(0.64058685211)*x_ref[1]**o+(-0.477843307901)*x_ref[1]
-        ref[0,2,2,1]=(0.769898355146)*x_ref[0]**o+(0.563458279487)*x_ref[0]+(0.876276425449)*x_ref[1]**o+(-0.0625727749869)*x_ref[1]
-        ref[0,3,0,0]=(-0.330055037059)*x_ref[0]**o+(-0.727656105163)*x_ref[0]+(-0.559901684392)*x_ref[1]**o+(-0.433646878263)*x_ref[1]
-        ref[0,3,0,1]=(-0.725314328666)*x_ref[0]**o+(0.638326609105)*x_ref[0]+(-0.126619368417)*x_ref[1]**o+(-0.232194758676)*x_ref[1]
-        ref[0,3,1,0]=(0.318096005545)*x_ref[0]**o+(0.325247494289)*x_ref[0]+(-0.514305253643)*x_ref[1]**o+(0.108523350086)*x_ref[1]
-        ref[0,3,1,1]=(0.298034894956)*x_ref[0]**o+(0.825714393651)*x_ref[0]+(-0.67162850079)*x_ref[1]**o+(0.681809083004)*x_ref[1]
-        ref[0,3,2,0]=(-0.00715890582648)*x_ref[0]**o+(0.893900731227)*x_ref[0]+(-0.773710274545)*x_ref[1]**o+(0.415913728569)*x_ref[1]
-        ref[0,3,2,1]=(0.0853551940958)*x_ref[0]**o+(-0.228876011127)*x_ref[0]+(0.87699456762)*x_ref[1]**o+(-0.744605229253)*x_ref[1]
-        ref[0,4,0,0]=(0.942646937302)*x_ref[0]**o+(0.92717236759)*x_ref[0]+(0.794806821569)*x_ref[1]**o+(0.848766303526)*x_ref[1]
-        ref[0,4,0,1]=(0.20140672561)*x_ref[0]**o+(0.974490372414)*x_ref[0]+(-0.450332419587)*x_ref[1]**o+(-0.859102184782)*x_ref[1]
-        ref[0,4,1,0]=(0.632153053193)*x_ref[0]**o+(0.702336756277)*x_ref[0]+(-0.571496076236)*x_ref[1]**o+(-0.882472852219)*x_ref[1]
-        ref[0,4,1,1]=(0.366452829499)*x_ref[0]**o+(-0.514660164741)*x_ref[0]+(-0.152794832253)*x_ref[1]**o+(-0.658688117796)*x_ref[1]
-        ref[0,4,2,0]=(0.406218394702)*x_ref[0]**o+(0.782359698198)*x_ref[0]+(-0.0582499587562)*x_ref[1]**o+(0.664506852595)*x_ref[1]
-        ref[0,4,2,1]=(0.768240870343)*x_ref[0]**o+(0.188470592904)*x_ref[0]+(0.855933509171)*x_ref[1]**o+(0.639174087541)*x_ref[1]
-        ref[1,0,0,0]=(-0.946841398046)*x_ref[0]**o+(0.892729256183)*x_ref[0]+(-0.15644094115)*x_ref[1]**o+(-0.859371368233)*x_ref[1]
-        ref[1,0,0,1]=(0.238113647666)*x_ref[0]**o+(0.173695470467)*x_ref[0]+(-0.753529252313)*x_ref[1]**o+(-0.243203902463)*x_ref[1]
-        ref[1,0,1,0]=(0.267937523443)*x_ref[0]**o+(0.600200492374)*x_ref[0]+(0.442653529257)*x_ref[1]**o+(-0.394984210541)*x_ref[1]
-        ref[1,0,1,1]=(-0.495022907622)*x_ref[0]**o+(-0.593273808093)*x_ref[0]+(0.888764746608)*x_ref[1]**o+(-0.745127825763)*x_ref[1]
-        ref[1,0,2,0]=(0.352827238496)*x_ref[0]**o+(0.293200928839)*x_ref[0]+(-0.00369812109034)*x_ref[1]**o+(0.478875774193)*x_ref[1]
-        ref[1,0,2,1]=(-0.403358878981)*x_ref[0]**o+(0.756947364667)*x_ref[0]+(0.649335795039)*x_ref[1]**o+(-0.339962796859)*x_ref[1]
-        ref[1,1,0,0]=(-0.607505349015)*x_ref[0]**o+(-0.392535399582)*x_ref[0]+(0.799782389634)*x_ref[1]**o+(0.186339165863)*x_ref[1]
-        ref[1,1,0,1]=(0.997492304627)*x_ref[0]**o+(-0.281456622581)*x_ref[0]+(-0.959294693613)*x_ref[1]**o+(-0.454812606674)*x_ref[1]
-        ref[1,1,1,0]=(0.454682037549)*x_ref[0]**o+(0.797129935647)*x_ref[0]+(-0.949539573053)*x_ref[1]**o+(-0.918499382199)*x_ref[1]
-        ref[1,1,1,1]=(0.903016449758)*x_ref[0]**o+(-0.575039046836)*x_ref[0]+(0.957158277074)*x_ref[1]**o+(-0.715797460906)*x_ref[1]
-        ref[1,1,2,0]=(0.92005547899)*x_ref[0]**o+(-0.716975919302)*x_ref[0]+(-0.900904311708)*x_ref[1]**o+(0.989458809643)*x_ref[1]
-        ref[1,1,2,1]=(-0.633214991087)*x_ref[0]**o+(0.680658578627)*x_ref[0]+(0.552194054556)*x_ref[1]**o+(0.343557072769)*x_ref[1]
-        ref[1,2,0,0]=(-0.0182903530463)*x_ref[0]**o+(-0.0445569497267)*x_ref[0]+(-0.259920069365)*x_ref[1]**o+(0.118765787279)*x_ref[1]
-        ref[1,2,0,1]=(-0.667382174733)*x_ref[0]**o+(-0.79898800024)*x_ref[0]+(-0.217638556567)*x_ref[1]**o+(-0.0288504127936)*x_ref[1]
-        ref[1,2,1,0]=(-0.437982445862)*x_ref[0]**o+(-0.104054454808)*x_ref[0]+(0.711429718088)*x_ref[1]**o+(-0.607226296329)*x_ref[1]
-        ref[1,2,1,1]=(0.252861218037)*x_ref[0]**o+(-0.635701456504)*x_ref[0]+(-0.555222304592)*x_ref[1]**o+(0.723744010092)*x_ref[1]
-        ref[1,2,2,0]=(-0.73532710885)*x_ref[0]**o+(0.600599078741)*x_ref[0]+(0.0465795173194)*x_ref[1]**o+(0.524165544645)*x_ref[1]
-        ref[1,2,2,1]=(-0.025246019744)*x_ref[0]**o+(-0.376526675619)*x_ref[0]+(0.213011788698)*x_ref[1]**o+(-0.477018225777)*x_ref[1]
-        ref[1,3,0,0]=(-0.52682690957)*x_ref[0]**o+(0.0567472858499)*x_ref[0]+(0.574116256102)*x_ref[1]**o+(-0.130012791898)*x_ref[1]
-        ref[1,3,0,1]=(0.113502182936)*x_ref[0]**o+(0.7643861313)*x_ref[0]+(0.48414948847)*x_ref[1]**o+(0.863168250318)*x_ref[1]
-        ref[1,3,1,0]=(-0.208102162378)*x_ref[0]**o+(0.327770728981)*x_ref[0]+(0.843778895278)*x_ref[1]**o+(0.474843504177)*x_ref[1]
-        ref[1,3,1,1]=(-0.549818192184)*x_ref[0]**o+(-0.863333816685)*x_ref[0]+(-0.365631583957)*x_ref[1]**o+(-0.491320441182)*x_ref[1]
-        ref[1,3,2,0]=(-0.265833845759)*x_ref[0]**o+(-0.94416746081)*x_ref[0]+(0.48465442593)*x_ref[1]**o+(0.258284621408)*x_ref[1]
-        ref[1,3,2,1]=(-0.625716082268)*x_ref[0]**o+(-0.234697130359)*x_ref[0]+(-0.973704406131)*x_ref[1]**o+(0.00141746117847)*x_ref[1]
-        ref[1,4,0,0]=(0.565044361964)*x_ref[0]**o+(-0.0672474991748)*x_ref[0]+(-0.125901930524)*x_ref[1]**o+(-0.753103899732)*x_ref[1]
-        ref[1,4,0,1]=(-0.979743467289)*x_ref[0]**o+(-0.25225085214)*x_ref[0]+(-0.141635164635)*x_ref[1]**o+(0.378153168667)*x_ref[1]
-        ref[1,4,1,0]=(0.97728399206)*x_ref[0]**o+(-0.202043160532)*x_ref[0]+(0.997445424954)*x_ref[1]**o+(-0.100049830154)*x_ref[1]
-        ref[1,4,1,1]=(0.364840105486)*x_ref[0]**o+(-0.682234327437)*x_ref[0]+(0.252584592259)*x_ref[1]**o+(-0.0785430242425)*x_ref[1]
-        ref[1,4,2,0]=(-0.0168764722616)*x_ref[0]**o+(-0.997460139026)*x_ref[0]+(0.560548548912)*x_ref[1]**o+(0.220532224022)*x_ref[1]
-        ref[1,4,2,1]=(0.307927943715)*x_ref[0]**o+(0.496390872708)*x_ref[0]+(0.982750813274)*x_ref[1]**o+(0.392968327778)*x_ref[1]
-        ref[2,0,0,0]=(0.645991188948)*x_ref[0]**o+(0.104035822886)*x_ref[0]+(0.18285829097)*x_ref[1]**o+(0.51186286294)*x_ref[1]
-        ref[2,0,0,1]=(-0.996971717318)*x_ref[0]**o+(0.126488047141)*x_ref[0]+(0.123585312562)*x_ref[1]**o+(-0.775854123529)*x_ref[1]
-        ref[2,0,1,0]=(-0.0258590124655)*x_ref[0]**o+(0.0079454735671)*x_ref[0]+(-0.42819024422)*x_ref[1]**o+(0.12377360967)*x_ref[1]
-        ref[2,0,1,1]=(0.990441351225)*x_ref[0]**o+(-0.453806376472)*x_ref[0]+(0.134316618645)*x_ref[1]**o+(-0.902666953282)*x_ref[1]
-        ref[2,0,2,0]=(0.149304385108)*x_ref[0]**o+(-0.226132046999)*x_ref[0]+(0.647186106203)*x_ref[1]**o+(-0.269247029225)*x_ref[1]
-        ref[2,0,2,1]=(-0.159068164422)*x_ref[0]**o+(-0.392275577366)*x_ref[0]+(0.131423093404)*x_ref[1]**o+(-0.353311282658)*x_ref[1]
-        ref[2,1,0,0]=(-0.2862918681)*x_ref[0]**o+(-0.392264098939)*x_ref[0]+(-0.344033237285)*x_ref[1]**o+(0.644261713963)*x_ref[1]
-        ref[2,1,0,1]=(0.398022911658)*x_ref[0]**o+(-0.84552546032)*x_ref[0]+(-0.823861260943)*x_ref[1]**o+(0.739994988755)*x_ref[1]
-        ref[2,1,1,0]=(-0.696854341234)*x_ref[0]**o+(-0.810851183298)*x_ref[0]+(-0.712182042896)*x_ref[1]**o+(0.594887691783)*x_ref[1]
-        ref[2,1,1,1]=(-0.182583840117)*x_ref[0]**o+(0.962594377088)*x_ref[0]+(-0.0157575661453)*x_ref[1]**o+(-0.432167995007)*x_ref[1]
-        ref[2,1,2,0]=(0.293029196216)*x_ref[0]**o+(0.46839918212)*x_ref[0]+(0.262375931577)*x_ref[1]**o+(0.0348536956306)*x_ref[1]
-        ref[2,1,2,1]=(0.775632135095)*x_ref[0]**o+(-0.874598534107)*x_ref[0]+(0.711602976736)*x_ref[1]**o+(0.37065543293)*x_ref[1]
-        ref[2,2,0,0]=(-0.103625214158)*x_ref[0]**o+(0.553558117877)*x_ref[0]+(-0.0522465477589)*x_ref[1]**o+(-0.747139195529)*x_ref[1]
-        ref[2,2,0,1]=(0.507427663615)*x_ref[0]**o+(-0.536361186134)*x_ref[0]+(0.809054726193)*x_ref[1]**o+(-0.979546347794)*x_ref[1]
-        ref[2,2,1,0]=(0.786210623833)*x_ref[0]**o+(0.244510127091)*x_ref[0]+(0.159799334111)*x_ref[1]**o+(0.0499263839273)*x_ref[1]
-        ref[2,2,1,1]=(0.454205244371)*x_ref[0]**o+(-0.650927822092)*x_ref[0]+(-0.939252656087)*x_ref[1]**o+(-0.894014755314)*x_ref[1]
-        ref[2,2,2,0]=(-0.829617920904)*x_ref[0]**o+(0.764070900994)*x_ref[0]+(0.972419443556)*x_ref[1]**o+(-0.824913543157)*x_ref[1]
-        ref[2,2,2,1]=(0.694310748478)*x_ref[0]**o+(-0.191413364091)*x_ref[0]+(0.588258464472)*x_ref[1]**o+(0.743973223755)*x_ref[1]
-        ref[2,3,0,0]=(-0.588397365184)*x_ref[0]**o+(-0.634207034861)*x_ref[0]+(0.0853498555546)*x_ref[1]**o+(0.559933556865)*x_ref[1]
-        ref[2,3,0,1]=(0.626829165689)*x_ref[0]**o+(0.942185296616)*x_ref[0]+(0.0360770405565)*x_ref[1]**o+(0.635966218547)*x_ref[1]
-        ref[2,3,1,0]=(-0.0103526873852)*x_ref[0]**o+(0.546330663496)*x_ref[0]+(0.799224103454)*x_ref[1]**o+(0.791922324897)*x_ref[1]
-        ref[2,3,1,1]=(0.921564474495)*x_ref[0]**o+(-0.420410835144)*x_ref[0]+(-0.20482503843)*x_ref[1]**o+(-0.483331643037)*x_ref[1]
-        ref[2,3,2,0]=(-0.903600870314)*x_ref[0]**o+(0.901956716274)*x_ref[0]+(-0.113926342023)*x_ref[1]**o+(-0.061596184768)*x_ref[1]
-        ref[2,3,2,1]=(0.653250267262)*x_ref[0]**o+(-0.13770933726)*x_ref[0]+(-0.0791563636079)*x_ref[1]**o+(-0.578313150893)*x_ref[1]
-        ref[2,4,0,0]=(0.993903405725)*x_ref[0]**o+(0.694324226249)*x_ref[0]+(0.203872883541)*x_ref[1]**o+(-0.526880767264)*x_ref[1]
-        ref[2,4,0,1]=(0.0120058513647)*x_ref[0]**o+(0.00907603337269)*x_ref[0]+(0.0247958601677)*x_ref[1]**o+(-0.996916120875)*x_ref[1]
-        ref[2,4,1,0]=(0.281518049478)*x_ref[0]**o+(0.0773799323777)*x_ref[0]+(-0.968565098773)*x_ref[1]**o+(-0.275558076229)*x_ref[1]
-        ref[2,4,1,1]=(0.565275744757)*x_ref[0]**o+(0.978636675869)*x_ref[0]+(-0.352951657751)*x_ref[1]**o+(-0.54170487914)*x_ref[1]
-        ref[2,4,2,0]=(-0.571207550678)*x_ref[0]**o+(0.196754283318)*x_ref[0]+(0.665558917127)*x_ref[1]**o+(0.361915269355)*x_ref[1]
-        ref[2,4,2,1]=(0.54579191885)*x_ref[0]**o+(0.798319371798)*x_ref[0]+(0.961669996133)*x_ref[1]**o+(-0.549305529342)*x_ref[1]
-        ref[3,0,0,0]=(0.264064946121)*x_ref[0]**o+(-0.314396185593)*x_ref[0]+(-0.017492206135)*x_ref[1]**o+(0.190513393091)*x_ref[1]
-        ref[3,0,0,1]=(0.812213666919)*x_ref[0]**o+(-0.757919357489)*x_ref[0]+(0.294829087285)*x_ref[1]**o+(0.916181101963)*x_ref[1]
-        ref[3,0,1,0]=(-0.529906091574)*x_ref[0]**o+(0.553682716765)*x_ref[0]+(-0.693177625995)*x_ref[1]**o+(0.377145561683)*x_ref[1]
-        ref[3,0,1,1]=(-0.298942248169)*x_ref[0]**o+(0.876878593705)*x_ref[0]+(-0.609807982832)*x_ref[1]**o+(-0.574954919539)*x_ref[1]
-        ref[3,0,2,0]=(-0.729324018245)*x_ref[0]**o+(-0.495194565254)*x_ref[0]+(-0.616162751356)*x_ref[1]**o+(0.878549207376)*x_ref[1]
-        ref[3,0,2,1]=(0.625373988248)*x_ref[0]**o+(0.106736108396)*x_ref[0]+(-0.871225833944)*x_ref[1]**o+(0.840614493429)*x_ref[1]
-        ref[3,1,0,0]=(-0.90880839589)*x_ref[0]**o+(0.390298288126)*x_ref[0]+(0.446872042362)*x_ref[1]**o+(-0.0703294219415)*x_ref[1]
-        ref[3,1,0,1]=(-0.0706115592617)*x_ref[0]**o+(-0.158386152093)*x_ref[0]+(-0.687459181052)*x_ref[1]**o+(-0.251170026598)*x_ref[1]
-        ref[3,1,1,0]=(-0.286907297081)*x_ref[0]**o+(0.185480985579)*x_ref[0]+(-0.49763263834)*x_ref[1]**o+(-0.773056048642)*x_ref[1]
-        ref[3,1,1,1]=(-0.849572703562)*x_ref[0]**o+(0.481739532516)*x_ref[0]+(-0.227573063955)*x_ref[1]**o+(-0.282367611381)*x_ref[1]
-        ref[3,1,2,0]=(-0.524975224603)*x_ref[0]**o+(-0.795450756917)*x_ref[0]+(-0.656865716441)*x_ref[1]**o+(-0.0166902340102)*x_ref[1]
-        ref[3,1,2,1]=(-0.297441818145)*x_ref[0]**o+(-0.726759852457)*x_ref[0]+(0.146859888138)*x_ref[1]**o+(-0.73690394554)*x_ref[1]
-        ref[3,2,0,0]=(-0.278794538596)*x_ref[0]**o+(-0.463428732496)*x_ref[0]+(-0.478500378607)*x_ref[1]**o+(0.806643392698)*x_ref[1]
-        ref[3,2,0,1]=(0.573853299578)*x_ref[0]**o+(-0.324830388013)*x_ref[0]+(-0.185528736416)*x_ref[1]**o+(0.444228024864)*x_ref[1]
-        ref[3,2,1,0]=(0.686054084195)*x_ref[0]**o+(-0.914380567743)*x_ref[0]+(0.751959744445)*x_ref[1]**o+(0.531759675659)*x_ref[1]
-        ref[3,2,1,1]=(-0.876330263589)*x_ref[0]**o+(0.566155144894)*x_ref[0]+(-0.0233988901429)*x_ref[1]**o+(0.42480184987)*x_ref[1]
-        ref[3,2,2,0]=(0.957053098936)*x_ref[0]**o+(0.152292007141)*x_ref[0]+(0.332521504492)*x_ref[1]**o+(-0.289068173241)*x_ref[1]
-        ref[3,2,2,1]=(0.923170924493)*x_ref[0]**o+(0.191154526504)*x_ref[0]+(0.647848811717)*x_ref[1]**o+(0.72509033544)*x_ref[1]
-        ref[3,3,0,0]=(0.388829993841)*x_ref[0]**o+(0.243404004988)*x_ref[0]+(-0.0313000323506)*x_ref[1]**o+(0.558135056894)*x_ref[1]
-        ref[3,3,0,1]=(-0.784568790167)*x_ref[0]**o+(0.742074534256)*x_ref[0]+(-0.624869261724)*x_ref[1]**o+(-0.412100194843)*x_ref[1]
-        ref[3,3,1,0]=(0.924173486785)*x_ref[0]**o+(-0.966635363007)*x_ref[0]+(0.395550623492)*x_ref[1]**o+(0.469204722173)*x_ref[1]
-        ref[3,3,1,1]=(-0.842963105645)*x_ref[0]**o+(0.685039360106)*x_ref[0]+(0.279605123662)*x_ref[1]**o+(-0.953092961091)*x_ref[1]
-        ref[3,3,2,0]=(0.598860382403)*x_ref[0]**o+(-0.226413712435)*x_ref[0]+(0.722250410625)*x_ref[1]**o+(-0.944980469407)*x_ref[1]
-        ref[3,3,2,1]=(0.787289357927)*x_ref[0]**o+(-0.270737247579)*x_ref[0]+(-0.134351386793)*x_ref[1]**o+(-0.0437387143766)*x_ref[1]
-        ref[3,4,0,0]=(-0.0601939617429)*x_ref[0]**o+(-0.212346121247)*x_ref[0]+(0.0137510326612)*x_ref[1]**o+(0.749376479477)*x_ref[1]
-        ref[3,4,0,1]=(-0.515391847891)*x_ref[0]**o+(-0.191867157458)*x_ref[0]+(0.0883438399597)*x_ref[1]**o+(-0.155095894625)*x_ref[1]
-        ref[3,4,1,0]=(0.172678225476)*x_ref[0]**o+(-0.917390756059)*x_ref[0]+(-0.498696112089)*x_ref[1]**o+(-0.267655707135)*x_ref[1]
-        ref[3,4,1,1]=(-0.498294994476)*x_ref[0]**o+(-0.301078252047)*x_ref[0]+(0.100215523329)*x_ref[1]**o+(-0.424039854141)*x_ref[1]
-        ref[3,4,2,0]=(0.904127003142)*x_ref[0]**o+(-0.70704194874)*x_ref[0]+(0.309638449466)*x_ref[1]**o+(-0.290894515899)*x_ref[1]
-        ref[3,4,2,1]=(-0.924994398191)*x_ref[0]**o+(0.624996423224)*x_ref[0]+(0.461586866277)*x_ref[1]**o+(-0.499709859121)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.0998996137438)*x[0]**o+(-0.648495171588)*x[0]+(-0.836177837758)*x[1]**o+(-0.9597381047)*x[1]+(-0.958069967907)*x[2]**o+(0.399097251753)*x[2]
-        arg[0,0,0,1]=(0.625409406207)*x[0]**o+(-0.522476054218)*x[0]+(0.794724584797)*x[1]**o+(-0.450875661781)*x[1]+(-0.189505729613)*x[2]**o+(0.0910808218379)*x[2]
-        arg[0,0,1,0]=(-0.36073198549)*x[0]**o+(-0.0286144078107)*x[0]+(-0.53827851785)*x[1]**o+(-0.563600303848)*x[1]+(0.970211345168)*x[2]**o+(-0.405253675856)*x[2]
-        arg[0,0,1,1]=(-0.0204302558323)*x[0]**o+(0.927570053009)*x[0]+(-0.358571532503)*x[1]**o+(0.282513525404)*x[1]+(0.105530612734)*x[2]**o+(-0.156753729378)*x[2]
-        arg[0,0,2,0]=(0.25049329858)*x[0]**o+(0.412299654624)*x[0]+(0.827683104949)*x[1]**o+(0.0195885473957)*x[1]+(0.849521623993)*x[2]**o+(-0.107922097347)*x[2]
-        arg[0,0,2,1]=(0.824054630326)*x[0]**o+(0.315612619612)*x[0]+(-0.33528975625)*x[1]**o+(-0.848543364468)*x[1]+(0.67462279419)*x[2]**o+(-0.0387606720463)*x[2]
-        arg[0,1,0,0]=(0.251613993994)*x[0]**o+(-0.871217704935)*x[0]+(-0.648182240752)*x[1]**o+(0.324536900202)*x[1]+(-0.884871901147)*x[2]**o+(0.353160185772)*x[2]
-        arg[0,1,0,1]=(-0.629894976165)*x[0]**o+(0.99092287348)*x[0]+(0.87471936536)*x[1]**o+(0.732884844801)*x[1]+(0.423531105096)*x[2]**o+(0.648959408663)*x[2]
-        arg[0,1,1,0]=(0.123366820062)*x[0]**o+(-0.856900246151)*x[0]+(-0.887819649211)*x[1]**o+(-0.901367472665)*x[1]+(0.222535500196)*x[2]**o+(0.42830671462)*x[2]
-        arg[0,1,1,1]=(0.343789367141)*x[0]**o+(0.614284333526)*x[0]+(0.976225499577)*x[1]**o+(0.955115562801)*x[1]+(0.0700409126681)*x[2]**o+(-0.709602275548)*x[2]
-        arg[0,1,2,0]=(-0.863502900367)*x[0]**o+(-0.452731447667)*x[0]+(0.495519161334)*x[1]**o+(0.0254261045314)*x[1]+(-0.484479110985)*x[2]**o+(0.615421138564)*x[2]
-        arg[0,1,2,1]=(-0.861966549825)*x[0]**o+(0.957385177208)*x[0]+(0.710449966969)*x[1]**o+(-0.367149885665)*x[1]+(-0.100800220614)*x[2]**o+(-0.266781849874)*x[2]
-        arg[0,2,0,0]=(-0.781309947495)*x[0]**o+(-0.709036446117)*x[0]+(0.86136976691)*x[1]**o+(-0.745743057084)*x[1]+(0.519795761984)*x[2]**o+(0.298838092751)*x[2]
-        arg[0,2,0,1]=(-0.514037154361)*x[0]**o+(-0.155867632386)*x[0]+(-0.125008826668)*x[1]**o+(-0.138197902584)*x[1]+(0.360698647284)*x[2]**o+(0.432385729464)*x[2]
-        arg[0,2,1,0]=(-0.19580514344)*x[0]**o+(-0.430510395896)*x[0]+(0.676498502854)*x[1]**o+(-0.472411864377)*x[1]+(-0.323468590594)*x[2]**o+(0.837971311859)*x[2]
-        arg[0,2,1,1]=(-0.358714577548)*x[0]**o+(-0.583080123482)*x[0]+(-0.225887451598)*x[1]**o+(0.744101609163)*x[1]+(-0.0300539574094)*x[2]**o+(-0.985181847505)*x[2]
-        arg[0,2,2,0]=(0.820610118447)*x[0]**o+(-0.560334915671)*x[0]+(0.478672329569)*x[1]**o+(-0.956892480643)*x[1]+(0.302100338619)*x[2]**o+(0.597584594886)*x[2]
-        arg[0,2,2,1]=(-0.0658925658941)*x[0]**o+(-0.136738027019)*x[0]+(0.617259524472)*x[1]**o+(-0.486181324584)*x[1]+(0.225924222893)*x[2]**o+(-0.304893108343)*x[2]
-        arg[0,3,0,0]=(0.0824288958004)*x[0]**o+(-0.67546530428)*x[0]+(-0.726843419073)*x[1]**o+(0.150753236521)*x[1]+(0.200621841908)*x[2]**o+(0.869623957921)*x[2]
-        arg[0,3,0,1]=(0.66227806631)*x[0]**o+(-0.389229756136)*x[0]+(0.739548522805)*x[1]**o+(0.131026218939)*x[1]+(0.743271925877)*x[2]**o+(-0.910220233981)*x[2]
-        arg[0,3,1,0]=(-0.259647259175)*x[0]**o+(-0.208585364012)*x[0]+(-0.323867955964)*x[1]**o+(0.778380345151)*x[1]+(-0.555780852614)*x[2]**o+(-0.16366483426)*x[2]
-        arg[0,3,1,1]=(0.248968056109)*x[0]**o+(0.84999990087)*x[0]+(0.180937025847)*x[1]**o+(0.332075828156)*x[1]+(-0.00577042146131)*x[2]**o+(0.708188905312)*x[2]
-        arg[0,3,2,0]=(-0.80327596428)*x[0]**o+(-0.131004563471)*x[0]+(0.443094741792)*x[1]**o+(0.515867966266)*x[1]+(-0.964003373109)*x[2]**o+(-0.580721642935)*x[2]
-        arg[0,3,2,1]=(-0.107361389717)*x[0]**o+(-0.543617395264)*x[0]+(0.840867379108)*x[1]**o+(-0.459941493027)*x[1]+(-0.300033656162)*x[2]**o+(0.440763554498)*x[2]
-        arg[0,4,0,0]=(0.272916362055)*x[0]**o+(-0.554210888243)*x[0]+(-0.458102512273)*x[1]**o+(-0.54594406835)*x[1]+(0.570670715852)*x[2]**o+(0.792731049718)*x[2]
-        arg[0,4,0,1]=(0.896330380602)*x[0]**o+(-0.929757950797)*x[0]+(0.229049814758)*x[1]**o+(0.1245974562)*x[1]+(0.853250033203)*x[2]**o+(-0.877052530974)*x[2]
-        arg[0,4,1,0]=(0.76027467594)*x[0]**o+(-0.510095378376)*x[0]+(0.697258966361)*x[1]**o+(-0.44013714543)*x[1]+(0.617675705023)*x[2]**o+(-0.00118327085347)*x[2]
-        arg[0,4,1,1]=(0.92472377319)*x[0]**o+(0.27783405618)*x[0]+(-0.24317632451)*x[1]**o+(-0.0264727232824)*x[1]+(0.428751701408)*x[2]**o+(0.184142273303)*x[2]
-        arg[0,4,2,0]=(0.619110983031)*x[0]**o+(-0.375037512361)*x[0]+(0.298576843317)*x[1]**o+(-0.218802335776)*x[1]+(-0.394889850336)*x[2]**o+(-0.842359750924)*x[2]
-        arg[0,4,2,1]=(0.899714346356)*x[0]**o+(0.0630133184109)*x[0]+(0.0796796488932)*x[1]**o+(-0.693371400327)*x[1]+(-0.412090402419)*x[2]**o+(0.681871832039)*x[2]
-        arg[1,0,0,0]=(-0.0367677770358)*x[0]**o+(-0.75352301678)*x[0]+(0.0705016755404)*x[1]**o+(0.870115630516)*x[1]+(0.136757694474)*x[2]**o+(-0.557722157484)*x[2]
-        arg[1,0,0,1]=(0.550371937413)*x[0]**o+(-0.590052751632)*x[0]+(0.38665744963)*x[1]**o+(-0.896537565188)*x[1]+(0.550869514185)*x[2]**o+(0.693828237691)*x[2]
-        arg[1,0,1,0]=(-0.150321579562)*x[0]**o+(0.111135028893)*x[0]+(0.582595079816)*x[1]**o+(-0.250920804447)*x[1]+(0.392998664266)*x[2]**o+(-0.226735735878)*x[2]
-        arg[1,0,1,1]=(0.435196573865)*x[0]**o+(-0.31161203165)*x[0]+(-0.117580582163)*x[1]**o+(0.99583282896)*x[1]+(-0.164872214322)*x[2]**o+(0.243837126961)*x[2]
-        arg[1,0,2,0]=(-0.320135099791)*x[0]**o+(0.339871290643)*x[0]+(0.593784119675)*x[1]**o+(0.695166367768)*x[1]+(0.407551427099)*x[2]**o+(-0.768445418933)*x[2]
-        arg[1,0,2,1]=(-0.390718323619)*x[0]**o+(-0.0515766643887)*x[0]+(0.394112545837)*x[1]**o+(-0.379592335881)*x[1]+(-0.29680237927)*x[2]**o+(0.500583589142)*x[2]
-        arg[1,1,0,0]=(-0.958930666062)*x[0]**o+(0.516874100468)*x[0]+(0.0859034666349)*x[1]**o+(-0.370561856015)*x[1]+(-0.175293417132)*x[2]**o+(0.672554615126)*x[2]
-        arg[1,1,0,1]=(-0.38129381629)*x[0]**o+(-0.615636530444)*x[0]+(0.447284140424)*x[1]**o+(0.507583882952)*x[1]+(-0.942413761354)*x[2]**o+(-0.607928807162)*x[2]
-        arg[1,1,1,0]=(-0.456462200294)*x[0]**o+(0.778557108965)*x[0]+(-0.939624730616)*x[1]**o+(0.965857713341)*x[1]+(-0.913772635427)*x[2]**o+(-0.459963514384)*x[2]
-        arg[1,1,1,1]=(0.138896120228)*x[0]**o+(0.941491395046)*x[0]+(0.546538931051)*x[1]**o+(-0.526098363992)*x[1]+(0.32139556996)*x[2]**o+(0.899346403792)*x[2]
-        arg[1,1,2,0]=(0.591597103411)*x[0]**o+(0.926278363416)*x[0]+(0.565926211046)*x[1]**o+(0.930516925784)*x[1]+(-0.498131779353)*x[2]**o+(0.358157310681)*x[2]
-        arg[1,1,2,1]=(0.758395199797)*x[0]**o+(0.769578766255)*x[0]+(0.86819976051)*x[1]**o+(-0.380436310842)*x[1]+(-0.513012037048)*x[2]**o+(-0.984361866072)*x[2]
-        arg[1,2,0,0]=(0.0845846076213)*x[0]**o+(0.987145343601)*x[0]+(-0.447680898266)*x[1]**o+(-0.30278197108)*x[1]+(0.271667503636)*x[2]**o+(0.698967822656)*x[2]
-        arg[1,2,0,1]=(-0.314076111079)*x[0]**o+(0.507407943673)*x[0]+(-0.38467148586)*x[1]**o+(0.802764957621)*x[1]+(0.692949890402)*x[2]**o+(-0.965766183849)*x[2]
-        arg[1,2,1,0]=(-0.855806343042)*x[0]**o+(0.753362713203)*x[0]+(-0.9877924012)*x[1]**o+(-0.54047626663)*x[1]+(-0.488859780266)*x[2]**o+(0.444279382381)*x[2]
-        arg[1,2,1,1]=(-0.313257382113)*x[0]**o+(-0.926058887186)*x[0]+(0.509510780366)*x[1]**o+(0.738049597453)*x[1]+(0.191676625722)*x[2]**o+(-0.354148482258)*x[2]
-        arg[1,2,2,0]=(-0.955204517346)*x[0]**o+(0.234220317948)*x[0]+(0.44435792198)*x[1]**o+(0.96099571541)*x[1]+(-0.422462745872)*x[2]**o+(0.808817733192)*x[2]
-        arg[1,2,2,1]=(0.932454071169)*x[0]**o+(-0.449841123911)*x[0]+(-0.371587228288)*x[1]**o+(-0.552185751938)*x[1]+(-0.222070148528)*x[2]**o+(-0.911768306425)*x[2]
-        arg[1,3,0,0]=(-0.355162862133)*x[0]**o+(-0.00562439573347)*x[0]+(0.982216168139)*x[1]**o+(0.0493986220989)*x[1]+(0.0242698649494)*x[2]**o+(0.593411693569)*x[2]
-        arg[1,3,0,1]=(-0.982164819772)*x[0]**o+(-0.417475530445)*x[0]+(-0.421752719264)*x[1]**o+(-0.102522772133)*x[1]+(-0.384947583437)*x[2]**o+(-0.675090951882)*x[2]
-        arg[1,3,1,0]=(0.862354670281)*x[0]**o+(0.0332806244503)*x[0]+(0.248152892705)*x[1]**o+(-0.380941068103)*x[1]+(0.499668747376)*x[2]**o+(-0.732344330916)*x[2]
-        arg[1,3,1,1]=(-0.367669055003)*x[0]**o+(-0.28761578782)*x[0]+(0.10838982068)*x[1]**o+(-0.495999837684)*x[1]+(0.599492939122)*x[2]**o+(0.886609670648)*x[2]
-        arg[1,3,2,0]=(0.707026122148)*x[0]**o+(-0.625314188271)*x[0]+(-0.734283031657)*x[1]**o+(0.779848908302)*x[1]+(-0.965798269237)*x[2]**o+(0.35160103487)*x[2]
-        arg[1,3,2,1]=(0.198008431503)*x[0]**o+(0.145470568903)*x[0]+(-0.342584113223)*x[1]**o+(-0.976390968602)*x[1]+(-0.371678081685)*x[2]**o+(0.569699640624)*x[2]
-        arg[1,4,0,0]=(-0.816642540092)*x[0]**o+(0.466127552066)*x[0]+(-0.491109738021)*x[1]**o+(-0.177222784312)*x[1]+(0.723624314914)*x[2]**o+(-0.103929106752)*x[2]
-        arg[1,4,0,1]=(-0.461770336596)*x[0]**o+(-0.416473447722)*x[0]+(-0.844639456093)*x[1]**o+(-0.021509624606)*x[1]+(-0.507857805076)*x[2]**o+(-0.0132005113079)*x[2]
-        arg[1,4,1,0]=(0.279614653607)*x[0]**o+(-0.547332204747)*x[0]+(0.329751635637)*x[1]**o+(0.813149533168)*x[1]+(0.0361758823053)*x[2]**o+(0.0635753923527)*x[2]
-        arg[1,4,1,1]=(0.124940246141)*x[0]**o+(-0.470715329674)*x[0]+(0.401922174627)*x[1]**o+(-0.292371975658)*x[1]+(0.302438467505)*x[2]**o+(0.131045792461)*x[2]
-        arg[1,4,2,0]=(0.817170444398)*x[0]**o+(0.153182033447)*x[0]+(-0.98908973731)*x[1]**o+(0.359609127275)*x[1]+(-0.891501663456)*x[2]**o+(0.34700998982)*x[2]
-        arg[1,4,2,1]=(0.619050545861)*x[0]**o+(-0.784466574079)*x[0]+(-0.15316511355)*x[1]**o+(0.587255937366)*x[1]+(0.740644692907)*x[2]**o+(0.0651236072508)*x[2]
-        arg[2,0,0,0]=(0.67904774175)*x[0]**o+(-0.24998331377)*x[0]+(-0.263635906274)*x[1]**o+(0.157008949549)*x[1]+(-0.905158896842)*x[2]**o+(-0.975062080366)*x[2]
-        arg[2,0,0,1]=(0.724305963876)*x[0]**o+(0.666891161317)*x[0]+(0.769784501206)*x[1]**o+(-0.84353242369)*x[1]+(0.631055556571)*x[2]**o+(-0.433528873211)*x[2]
-        arg[2,0,1,0]=(-0.545702871321)*x[0]**o+(-0.153233364062)*x[0]+(-0.892642075879)*x[1]**o+(-0.303965445232)*x[1]+(0.675938211305)*x[2]**o+(0.134016007164)*x[2]
-        arg[2,0,1,1]=(0.612528479764)*x[0]**o+(0.444039154606)*x[0]+(-0.185281638413)*x[1]**o+(0.643315773689)*x[1]+(-0.5562387833)*x[2]**o+(-0.960249468718)*x[2]
-        arg[2,0,2,0]=(-0.330135152971)*x[0]**o+(0.359951176686)*x[0]+(-0.797088515842)*x[1]**o+(-0.257909258598)*x[1]+(-0.927156080256)*x[2]**o+(-0.843405252125)*x[2]
-        arg[2,0,2,1]=(0.447041226497)*x[0]**o+(0.691225329527)*x[0]+(0.462798475523)*x[1]**o+(0.157497098383)*x[1]+(-0.77785224695)*x[2]**o+(0.886430058902)*x[2]
-        arg[2,1,0,0]=(0.397605326971)*x[0]**o+(0.66227843262)*x[0]+(-0.634922556623)*x[1]**o+(-0.263342020187)*x[1]+(-0.81486179124)*x[2]**o+(-0.216716259698)*x[2]
-        arg[2,1,0,1]=(-0.868246547394)*x[0]**o+(-0.194983059368)*x[0]+(-0.667277750808)*x[1]**o+(0.284011270958)*x[1]+(-0.276295620425)*x[2]**o+(0.215159516398)*x[2]
-        arg[2,1,1,0]=(0.990906320323)*x[0]**o+(0.526754062323)*x[0]+(-0.963398315893)*x[1]**o+(-0.72561275544)*x[1]+(0.539779065056)*x[2]**o+(0.37738462043)*x[2]
-        arg[2,1,1,1]=(-0.668520028258)*x[0]**o+(-0.292883094355)*x[0]+(0.260949538172)*x[1]**o+(-0.952706524522)*x[1]+(-0.715386804875)*x[2]**o+(-0.683320136224)*x[2]
-        arg[2,1,2,0]=(-0.646186301281)*x[0]**o+(-0.62747987465)*x[0]+(-0.858714171368)*x[1]**o+(0.46910094021)*x[1]+(0.468975652807)*x[2]**o+(0.242115907129)*x[2]
-        arg[2,1,2,1]=(0.262205767991)*x[0]**o+(-0.460376423099)*x[0]+(0.88572453638)*x[1]**o+(0.611761462581)*x[1]+(0.763860971141)*x[2]**o+(0.108470198525)*x[2]
-        arg[2,2,0,0]=(-0.0218691308052)*x[0]**o+(0.942271392012)*x[0]+(-0.778469966054)*x[1]**o+(0.0873305333765)*x[1]+(-0.300479183111)*x[2]**o+(-0.862547713455)*x[2]
-        arg[2,2,0,1]=(-0.736808990311)*x[0]**o+(-0.200478457878)*x[0]+(0.272608362607)*x[1]**o+(-0.0651056524306)*x[1]+(0.616628495568)*x[2]**o+(-0.8623490351)*x[2]
-        arg[2,2,1,0]=(0.931530668297)*x[0]**o+(0.39701649536)*x[0]+(0.552135074711)*x[1]**o+(-0.489731326344)*x[1]+(-0.864724191354)*x[2]**o+(0.369557062583)*x[2]
-        arg[2,2,1,1]=(0.418780453395)*x[0]**o+(-0.4935990418)*x[0]+(0.34625989303)*x[1]**o+(0.979829617988)*x[1]+(0.853169987441)*x[2]**o+(-0.945958722805)*x[2]
-        arg[2,2,2,0]=(0.973689940887)*x[0]**o+(-0.0585784323994)*x[0]+(-0.472419744635)*x[1]**o+(0.851814193674)*x[1]+(-0.393393340405)*x[2]**o+(-0.755376551633)*x[2]
-        arg[2,2,2,1]=(-0.217049913648)*x[0]**o+(-0.262150796255)*x[0]+(-0.407805273745)*x[1]**o+(0.819646964669)*x[1]+(-0.0130316627236)*x[2]**o+(0.179034130621)*x[2]
-        arg[2,3,0,0]=(-0.377708814803)*x[0]**o+(-0.943893058411)*x[0]+(-0.354341838264)*x[1]**o+(0.0696491295689)*x[1]+(-0.192838410156)*x[2]**o+(-0.22208932914)*x[2]
-        arg[2,3,0,1]=(0.252429489766)*x[0]**o+(0.808052283089)*x[0]+(0.282941493712)*x[1]**o+(0.89816007357)*x[1]+(0.000979423783521)*x[2]**o+(0.645599553602)*x[2]
-        arg[2,3,1,0]=(0.788089987784)*x[0]**o+(0.414254044423)*x[0]+(0.105204158639)*x[1]**o+(0.97527041289)*x[1]+(0.447463569594)*x[2]**o+(0.91465488394)*x[2]
-        arg[2,3,1,1]=(0.882323493958)*x[0]**o+(-0.98135461385)*x[0]+(0.641881834427)*x[1]**o+(-0.888068999894)*x[1]+(0.705728558352)*x[2]**o+(0.295815435834)*x[2]
-        arg[2,3,2,0]=(-0.570666876652)*x[0]**o+(0.52308582534)*x[0]+(-0.604213776925)*x[1]**o+(-0.568684610916)*x[1]+(-0.0378463784885)*x[2]**o+(0.557994858276)*x[2]
-        arg[2,3,2,1]=(-0.497489149519)*x[0]**o+(0.739341493998)*x[0]+(-0.375869065986)*x[1]**o+(-0.895553158302)*x[1]+(0.916829505813)*x[2]**o+(-0.650522069672)*x[2]
-        arg[2,4,0,0]=(0.627540843427)*x[0]**o+(-0.572125230014)*x[0]+(-0.404781893475)*x[1]**o+(-0.114896790942)*x[1]+(-0.108914764977)*x[2]**o+(0.739758413931)*x[2]
-        arg[2,4,0,1]=(0.243205825969)*x[0]**o+(-0.989602234642)*x[0]+(-0.925730664677)*x[1]**o+(0.454801040316)*x[1]+(0.51758036389)*x[2]**o+(0.325160660047)*x[2]
-        arg[2,4,1,0]=(0.559764013478)*x[0]**o+(2.69034311577e-05)*x[0]+(-0.691119937581)*x[1]**o+(-0.347457112767)*x[1]+(0.714683489268)*x[2]**o+(-0.589270137254)*x[2]
-        arg[2,4,1,1]=(-0.657837524953)*x[0]**o+(0.071158671662)*x[0]+(-0.998677178035)*x[1]**o+(-0.544136374784)*x[1]+(0.6200901771)*x[2]**o+(-0.280453395396)*x[2]
-        arg[2,4,2,0]=(0.692403743003)*x[0]**o+(-0.570086669428)*x[0]+(0.455036498939)*x[1]**o+(0.291433179453)*x[1]+(-0.203004457401)*x[2]**o+(0.0192489593981)*x[2]
-        arg[2,4,2,1]=(-0.656783033826)*x[0]**o+(0.865748949755)*x[0]+(-0.297731124456)*x[1]**o+(-0.826786841513)*x[1]+(0.891374127144)*x[2]**o+(-0.736789456498)*x[2]
-        arg[3,0,0,0]=(-0.963120586854)*x[0]**o+(0.466089565408)*x[0]+(-0.785137906849)*x[1]**o+(0.194880437113)*x[1]+(0.652057839639)*x[2]**o+(-0.63674893761)*x[2]
-        arg[3,0,0,1]=(-0.923234625819)*x[0]**o+(-0.303847080864)*x[0]+(-0.374245465515)*x[1]**o+(0.131093877726)*x[1]+(-0.13469395748)*x[2]**o+(0.42721676585)*x[2]
-        arg[3,0,1,0]=(-0.613510153481)*x[0]**o+(0.986696685318)*x[0]+(0.188583200151)*x[1]**o+(-0.895175969251)*x[1]+(-0.699510846377)*x[2]**o+(0.953157679279)*x[2]
-        arg[3,0,1,1]=(-0.805809890231)*x[0]**o+(-0.786467529592)*x[0]+(-0.287240865489)*x[1]**o+(-0.78714682888)*x[1]+(-0.301034554724)*x[2]**o+(0.698100092246)*x[2]
-        arg[3,0,2,0]=(-0.29320618172)*x[0]**o+(0.482436772935)*x[0]+(-0.126052929261)*x[1]**o+(-0.0638862140753)*x[1]+(0.42769411972)*x[2]**o+(0.741118745829)*x[2]
-        arg[3,0,2,1]=(-0.380041427783)*x[0]**o+(-0.0347904596008)*x[0]+(-0.321599184546)*x[1]**o+(-0.061333518544)*x[1]+(-0.885193271364)*x[2]**o+(0.216506075886)*x[2]
-        arg[3,1,0,0]=(-0.872457576682)*x[0]**o+(0.1368749584)*x[0]+(0.883209741333)*x[1]**o+(0.946644762296)*x[1]+(-0.941665219846)*x[2]**o+(0.683787986795)*x[2]
-        arg[3,1,0,1]=(0.564843030077)*x[0]**o+(0.987198898299)*x[0]+(0.808116156661)*x[1]**o+(-0.712172259479)*x[1]+(0.942066890171)*x[2]**o+(-0.265957158917)*x[2]
-        arg[3,1,1,0]=(-0.171018264631)*x[0]**o+(0.277202848962)*x[0]+(0.0726306773528)*x[1]**o+(-0.0265640725409)*x[1]+(-0.871118922929)*x[2]**o+(0.0562314512261)*x[2]
-        arg[3,1,1,1]=(0.0861984079085)*x[0]**o+(-0.954818837051)*x[0]+(0.817362109646)*x[1]**o+(-0.513086270222)*x[1]+(-0.487472170741)*x[2]**o+(0.702514192773)*x[2]
-        arg[3,1,2,0]=(0.272419057202)*x[0]**o+(-0.0454292509397)*x[0]+(-0.117471126603)*x[1]**o+(0.638237510553)*x[1]+(0.156858948691)*x[2]**o+(0.499459702141)*x[2]
-        arg[3,1,2,1]=(-0.384525883334)*x[0]**o+(-0.795638828759)*x[0]+(-0.105795059118)*x[1]**o+(0.539873566967)*x[1]+(-0.402558868714)*x[2]**o+(-0.690578475243)*x[2]
-        arg[3,2,0,0]=(0.776889517136)*x[0]**o+(0.710931840891)*x[0]+(0.335992677388)*x[1]**o+(-0.689182863932)*x[1]+(0.294149805572)*x[2]**o+(-0.144223257292)*x[2]
-        arg[3,2,0,1]=(0.738703695733)*x[0]**o+(-0.523207061995)*x[0]+(0.707078352596)*x[1]**o+(-0.594373978096)*x[1]+(-0.833468457639)*x[2]**o+(-0.60181674446)*x[2]
-        arg[3,2,1,0]=(-0.70243682985)*x[0]**o+(-0.557914174271)*x[0]+(-0.97153723053)*x[1]**o+(0.791692594024)*x[1]+(-0.442273808305)*x[2]**o+(-0.74069605321)*x[2]
-        arg[3,2,1,1]=(0.136307039789)*x[0]**o+(0.820661597623)*x[0]+(0.379752060994)*x[1]**o+(-0.739083116742)*x[1]+(-0.964857055764)*x[2]**o+(0.523159928671)*x[2]
-        arg[3,2,2,0]=(0.530883295074)*x[0]**o+(-0.859538509888)*x[0]+(-0.33917158254)*x[1]**o+(0.476510741055)*x[1]+(0.851975683024)*x[2]**o+(0.146277015139)*x[2]
-        arg[3,2,2,1]=(-0.532984574212)*x[0]**o+(-0.413169979754)*x[0]+(0.0113284200501)*x[1]**o+(0.406768750567)*x[1]+(0.730968378807)*x[2]**o+(-0.74004422909)*x[2]
-        arg[3,3,0,0]=(0.784793271465)*x[0]**o+(0.879569037436)*x[0]+(0.687804194006)*x[1]**o+(0.153617608524)*x[1]+(-0.410247334526)*x[2]**o+(0.147941373268)*x[2]
-        arg[3,3,0,1]=(-0.896748874838)*x[0]**o+(-0.408404228864)*x[0]+(0.831967697989)*x[1]**o+(-0.290875629476)*x[1]+(-0.244101719785)*x[2]**o+(0.240453425519)*x[2]
-        arg[3,3,1,0]=(-0.352293918285)*x[0]**o+(0.0341233590345)*x[0]+(-0.0165872699681)*x[1]**o+(-0.0668507705942)*x[1]+(-0.133733710061)*x[2]**o+(-0.00620237772745)*x[2]
-        arg[3,3,1,1]=(0.173638606531)*x[0]**o+(0.619705705811)*x[0]+(0.279972531576)*x[1]**o+(-0.0811181576037)*x[1]+(-0.645673968637)*x[2]**o+(0.913753411758)*x[2]
-        arg[3,3,2,0]=(0.0623921286142)*x[0]**o+(0.393414889204)*x[0]+(-0.300034851075)*x[1]**o+(-0.519515206457)*x[1]+(-0.0074981731879)*x[2]**o+(0.202996242895)*x[2]
-        arg[3,3,2,1]=(0.583279597505)*x[0]**o+(-0.940603487209)*x[0]+(0.027966157338)*x[1]**o+(0.251466344692)*x[1]+(-0.97011033154)*x[2]**o+(0.46527056203)*x[2]
-        arg[3,4,0,0]=(0.865170740218)*x[0]**o+(-0.466853211289)*x[0]+(0.0935492537278)*x[1]**o+(-0.632374632657)*x[1]+(0.673466346463)*x[2]**o+(-0.47934739873)*x[2]
-        arg[3,4,0,1]=(0.0417451136027)*x[0]**o+(-0.781570733286)*x[0]+(0.547452389454)*x[1]**o+(-0.0286368211528)*x[1]+(-0.98907358808)*x[2]**o+(0.62749495057)*x[2]
-        arg[3,4,1,0]=(-0.632067479664)*x[0]**o+(-0.872835386336)*x[0]+(-0.228785631078)*x[1]**o+(-0.224206127306)*x[1]+(0.769729051217)*x[2]**o+(-0.406750034352)*x[2]
-        arg[3,4,1,1]=(0.216883071299)*x[0]**o+(-0.225632200121)*x[0]+(0.827186402743)*x[1]**o+(0.161488636886)*x[1]+(0.773801288836)*x[2]**o+(0.977006832166)*x[2]
-        arg[3,4,2,0]=(-0.867098845884)*x[0]**o+(0.14989544838)*x[0]+(0.756720043262)*x[1]**o+(-0.496074302626)*x[1]+(-0.662787072451)*x[2]**o+(-0.142473973368)*x[2]
-        arg[3,4,2,1]=(-0.294128396829)*x[0]**o+(-0.931379392091)*x[0]+(0.906552131161)*x[1]**o+(-0.422008485494)*x[1]+(0.806742455679)*x[2]**o+(0.940488803006)*x[2]
-        ref[0,0,0,0]=(-0.0998996137438)*x_ref[0]**o+(-0.648495171588)*x_ref[0]+(-0.836177837758)*x_ref[1]**o+(-0.9597381047)*x_ref[1]+(-0.958069967907)*x_ref[2]**o+(0.399097251753)*x_ref[2]
-        ref[0,0,0,1]=(0.625409406207)*x_ref[0]**o+(-0.522476054218)*x_ref[0]+(0.794724584797)*x_ref[1]**o+(-0.450875661781)*x_ref[1]+(-0.189505729613)*x_ref[2]**o+(0.0910808218379)*x_ref[2]
-        ref[0,0,1,0]=(-0.36073198549)*x_ref[0]**o+(-0.0286144078107)*x_ref[0]+(-0.53827851785)*x_ref[1]**o+(-0.563600303848)*x_ref[1]+(0.970211345168)*x_ref[2]**o+(-0.405253675856)*x_ref[2]
-        ref[0,0,1,1]=(-0.0204302558323)*x_ref[0]**o+(0.927570053009)*x_ref[0]+(-0.358571532503)*x_ref[1]**o+(0.282513525404)*x_ref[1]+(0.105530612734)*x_ref[2]**o+(-0.156753729378)*x_ref[2]
-        ref[0,0,2,0]=(0.25049329858)*x_ref[0]**o+(0.412299654624)*x_ref[0]+(0.827683104949)*x_ref[1]**o+(0.0195885473957)*x_ref[1]+(0.849521623993)*x_ref[2]**o+(-0.107922097347)*x_ref[2]
-        ref[0,0,2,1]=(0.824054630326)*x_ref[0]**o+(0.315612619612)*x_ref[0]+(-0.33528975625)*x_ref[1]**o+(-0.848543364468)*x_ref[1]+(0.67462279419)*x_ref[2]**o+(-0.0387606720463)*x_ref[2]
-        ref[0,1,0,0]=(0.251613993994)*x_ref[0]**o+(-0.871217704935)*x_ref[0]+(-0.648182240752)*x_ref[1]**o+(0.324536900202)*x_ref[1]+(-0.884871901147)*x_ref[2]**o+(0.353160185772)*x_ref[2]
-        ref[0,1,0,1]=(-0.629894976165)*x_ref[0]**o+(0.99092287348)*x_ref[0]+(0.87471936536)*x_ref[1]**o+(0.732884844801)*x_ref[1]+(0.423531105096)*x_ref[2]**o+(0.648959408663)*x_ref[2]
-        ref[0,1,1,0]=(0.123366820062)*x_ref[0]**o+(-0.856900246151)*x_ref[0]+(-0.887819649211)*x_ref[1]**o+(-0.901367472665)*x_ref[1]+(0.222535500196)*x_ref[2]**o+(0.42830671462)*x_ref[2]
-        ref[0,1,1,1]=(0.343789367141)*x_ref[0]**o+(0.614284333526)*x_ref[0]+(0.976225499577)*x_ref[1]**o+(0.955115562801)*x_ref[1]+(0.0700409126681)*x_ref[2]**o+(-0.709602275548)*x_ref[2]
-        ref[0,1,2,0]=(-0.863502900367)*x_ref[0]**o+(-0.452731447667)*x_ref[0]+(0.495519161334)*x_ref[1]**o+(0.0254261045314)*x_ref[1]+(-0.484479110985)*x_ref[2]**o+(0.615421138564)*x_ref[2]
-        ref[0,1,2,1]=(-0.861966549825)*x_ref[0]**o+(0.957385177208)*x_ref[0]+(0.710449966969)*x_ref[1]**o+(-0.367149885665)*x_ref[1]+(-0.100800220614)*x_ref[2]**o+(-0.266781849874)*x_ref[2]
-        ref[0,2,0,0]=(-0.781309947495)*x_ref[0]**o+(-0.709036446117)*x_ref[0]+(0.86136976691)*x_ref[1]**o+(-0.745743057084)*x_ref[1]+(0.519795761984)*x_ref[2]**o+(0.298838092751)*x_ref[2]
-        ref[0,2,0,1]=(-0.514037154361)*x_ref[0]**o+(-0.155867632386)*x_ref[0]+(-0.125008826668)*x_ref[1]**o+(-0.138197902584)*x_ref[1]+(0.360698647284)*x_ref[2]**o+(0.432385729464)*x_ref[2]
-        ref[0,2,1,0]=(-0.19580514344)*x_ref[0]**o+(-0.430510395896)*x_ref[0]+(0.676498502854)*x_ref[1]**o+(-0.472411864377)*x_ref[1]+(-0.323468590594)*x_ref[2]**o+(0.837971311859)*x_ref[2]
-        ref[0,2,1,1]=(-0.358714577548)*x_ref[0]**o+(-0.583080123482)*x_ref[0]+(-0.225887451598)*x_ref[1]**o+(0.744101609163)*x_ref[1]+(-0.0300539574094)*x_ref[2]**o+(-0.985181847505)*x_ref[2]
-        ref[0,2,2,0]=(0.820610118447)*x_ref[0]**o+(-0.560334915671)*x_ref[0]+(0.478672329569)*x_ref[1]**o+(-0.956892480643)*x_ref[1]+(0.302100338619)*x_ref[2]**o+(0.597584594886)*x_ref[2]
-        ref[0,2,2,1]=(-0.0658925658941)*x_ref[0]**o+(-0.136738027019)*x_ref[0]+(0.617259524472)*x_ref[1]**o+(-0.486181324584)*x_ref[1]+(0.225924222893)*x_ref[2]**o+(-0.304893108343)*x_ref[2]
-        ref[0,3,0,0]=(0.0824288958004)*x_ref[0]**o+(-0.67546530428)*x_ref[0]+(-0.726843419073)*x_ref[1]**o+(0.150753236521)*x_ref[1]+(0.200621841908)*x_ref[2]**o+(0.869623957921)*x_ref[2]
-        ref[0,3,0,1]=(0.66227806631)*x_ref[0]**o+(-0.389229756136)*x_ref[0]+(0.739548522805)*x_ref[1]**o+(0.131026218939)*x_ref[1]+(0.743271925877)*x_ref[2]**o+(-0.910220233981)*x_ref[2]
-        ref[0,3,1,0]=(-0.259647259175)*x_ref[0]**o+(-0.208585364012)*x_ref[0]+(-0.323867955964)*x_ref[1]**o+(0.778380345151)*x_ref[1]+(-0.555780852614)*x_ref[2]**o+(-0.16366483426)*x_ref[2]
-        ref[0,3,1,1]=(0.248968056109)*x_ref[0]**o+(0.84999990087)*x_ref[0]+(0.180937025847)*x_ref[1]**o+(0.332075828156)*x_ref[1]+(-0.00577042146131)*x_ref[2]**o+(0.708188905312)*x_ref[2]
-        ref[0,3,2,0]=(-0.80327596428)*x_ref[0]**o+(-0.131004563471)*x_ref[0]+(0.443094741792)*x_ref[1]**o+(0.515867966266)*x_ref[1]+(-0.964003373109)*x_ref[2]**o+(-0.580721642935)*x_ref[2]
-        ref[0,3,2,1]=(-0.107361389717)*x_ref[0]**o+(-0.543617395264)*x_ref[0]+(0.840867379108)*x_ref[1]**o+(-0.459941493027)*x_ref[1]+(-0.300033656162)*x_ref[2]**o+(0.440763554498)*x_ref[2]
-        ref[0,4,0,0]=(0.272916362055)*x_ref[0]**o+(-0.554210888243)*x_ref[0]+(-0.458102512273)*x_ref[1]**o+(-0.54594406835)*x_ref[1]+(0.570670715852)*x_ref[2]**o+(0.792731049718)*x_ref[2]
-        ref[0,4,0,1]=(0.896330380602)*x_ref[0]**o+(-0.929757950797)*x_ref[0]+(0.229049814758)*x_ref[1]**o+(0.1245974562)*x_ref[1]+(0.853250033203)*x_ref[2]**o+(-0.877052530974)*x_ref[2]
-        ref[0,4,1,0]=(0.76027467594)*x_ref[0]**o+(-0.510095378376)*x_ref[0]+(0.697258966361)*x_ref[1]**o+(-0.44013714543)*x_ref[1]+(0.617675705023)*x_ref[2]**o+(-0.00118327085347)*x_ref[2]
-        ref[0,4,1,1]=(0.92472377319)*x_ref[0]**o+(0.27783405618)*x_ref[0]+(-0.24317632451)*x_ref[1]**o+(-0.0264727232824)*x_ref[1]+(0.428751701408)*x_ref[2]**o+(0.184142273303)*x_ref[2]
-        ref[0,4,2,0]=(0.619110983031)*x_ref[0]**o+(-0.375037512361)*x_ref[0]+(0.298576843317)*x_ref[1]**o+(-0.218802335776)*x_ref[1]+(-0.394889850336)*x_ref[2]**o+(-0.842359750924)*x_ref[2]
-        ref[0,4,2,1]=(0.899714346356)*x_ref[0]**o+(0.0630133184109)*x_ref[0]+(0.0796796488932)*x_ref[1]**o+(-0.693371400327)*x_ref[1]+(-0.412090402419)*x_ref[2]**o+(0.681871832039)*x_ref[2]
-        ref[1,0,0,0]=(-0.0367677770358)*x_ref[0]**o+(-0.75352301678)*x_ref[0]+(0.0705016755404)*x_ref[1]**o+(0.870115630516)*x_ref[1]+(0.136757694474)*x_ref[2]**o+(-0.557722157484)*x_ref[2]
-        ref[1,0,0,1]=(0.550371937413)*x_ref[0]**o+(-0.590052751632)*x_ref[0]+(0.38665744963)*x_ref[1]**o+(-0.896537565188)*x_ref[1]+(0.550869514185)*x_ref[2]**o+(0.693828237691)*x_ref[2]
-        ref[1,0,1,0]=(-0.150321579562)*x_ref[0]**o+(0.111135028893)*x_ref[0]+(0.582595079816)*x_ref[1]**o+(-0.250920804447)*x_ref[1]+(0.392998664266)*x_ref[2]**o+(-0.226735735878)*x_ref[2]
-        ref[1,0,1,1]=(0.435196573865)*x_ref[0]**o+(-0.31161203165)*x_ref[0]+(-0.117580582163)*x_ref[1]**o+(0.99583282896)*x_ref[1]+(-0.164872214322)*x_ref[2]**o+(0.243837126961)*x_ref[2]
-        ref[1,0,2,0]=(-0.320135099791)*x_ref[0]**o+(0.339871290643)*x_ref[0]+(0.593784119675)*x_ref[1]**o+(0.695166367768)*x_ref[1]+(0.407551427099)*x_ref[2]**o+(-0.768445418933)*x_ref[2]
-        ref[1,0,2,1]=(-0.390718323619)*x_ref[0]**o+(-0.0515766643887)*x_ref[0]+(0.394112545837)*x_ref[1]**o+(-0.379592335881)*x_ref[1]+(-0.29680237927)*x_ref[2]**o+(0.500583589142)*x_ref[2]
-        ref[1,1,0,0]=(-0.958930666062)*x_ref[0]**o+(0.516874100468)*x_ref[0]+(0.0859034666349)*x_ref[1]**o+(-0.370561856015)*x_ref[1]+(-0.175293417132)*x_ref[2]**o+(0.672554615126)*x_ref[2]
-        ref[1,1,0,1]=(-0.38129381629)*x_ref[0]**o+(-0.615636530444)*x_ref[0]+(0.447284140424)*x_ref[1]**o+(0.507583882952)*x_ref[1]+(-0.942413761354)*x_ref[2]**o+(-0.607928807162)*x_ref[2]
-        ref[1,1,1,0]=(-0.456462200294)*x_ref[0]**o+(0.778557108965)*x_ref[0]+(-0.939624730616)*x_ref[1]**o+(0.965857713341)*x_ref[1]+(-0.913772635427)*x_ref[2]**o+(-0.459963514384)*x_ref[2]
-        ref[1,1,1,1]=(0.138896120228)*x_ref[0]**o+(0.941491395046)*x_ref[0]+(0.546538931051)*x_ref[1]**o+(-0.526098363992)*x_ref[1]+(0.32139556996)*x_ref[2]**o+(0.899346403792)*x_ref[2]
-        ref[1,1,2,0]=(0.591597103411)*x_ref[0]**o+(0.926278363416)*x_ref[0]+(0.565926211046)*x_ref[1]**o+(0.930516925784)*x_ref[1]+(-0.498131779353)*x_ref[2]**o+(0.358157310681)*x_ref[2]
-        ref[1,1,2,1]=(0.758395199797)*x_ref[0]**o+(0.769578766255)*x_ref[0]+(0.86819976051)*x_ref[1]**o+(-0.380436310842)*x_ref[1]+(-0.513012037048)*x_ref[2]**o+(-0.984361866072)*x_ref[2]
-        ref[1,2,0,0]=(0.0845846076213)*x_ref[0]**o+(0.987145343601)*x_ref[0]+(-0.447680898266)*x_ref[1]**o+(-0.30278197108)*x_ref[1]+(0.271667503636)*x_ref[2]**o+(0.698967822656)*x_ref[2]
-        ref[1,2,0,1]=(-0.314076111079)*x_ref[0]**o+(0.507407943673)*x_ref[0]+(-0.38467148586)*x_ref[1]**o+(0.802764957621)*x_ref[1]+(0.692949890402)*x_ref[2]**o+(-0.965766183849)*x_ref[2]
-        ref[1,2,1,0]=(-0.855806343042)*x_ref[0]**o+(0.753362713203)*x_ref[0]+(-0.9877924012)*x_ref[1]**o+(-0.54047626663)*x_ref[1]+(-0.488859780266)*x_ref[2]**o+(0.444279382381)*x_ref[2]
-        ref[1,2,1,1]=(-0.313257382113)*x_ref[0]**o+(-0.926058887186)*x_ref[0]+(0.509510780366)*x_ref[1]**o+(0.738049597453)*x_ref[1]+(0.191676625722)*x_ref[2]**o+(-0.354148482258)*x_ref[2]
-        ref[1,2,2,0]=(-0.955204517346)*x_ref[0]**o+(0.234220317948)*x_ref[0]+(0.44435792198)*x_ref[1]**o+(0.96099571541)*x_ref[1]+(-0.422462745872)*x_ref[2]**o+(0.808817733192)*x_ref[2]
-        ref[1,2,2,1]=(0.932454071169)*x_ref[0]**o+(-0.449841123911)*x_ref[0]+(-0.371587228288)*x_ref[1]**o+(-0.552185751938)*x_ref[1]+(-0.222070148528)*x_ref[2]**o+(-0.911768306425)*x_ref[2]
-        ref[1,3,0,0]=(-0.355162862133)*x_ref[0]**o+(-0.00562439573347)*x_ref[0]+(0.982216168139)*x_ref[1]**o+(0.0493986220989)*x_ref[1]+(0.0242698649494)*x_ref[2]**o+(0.593411693569)*x_ref[2]
-        ref[1,3,0,1]=(-0.982164819772)*x_ref[0]**o+(-0.417475530445)*x_ref[0]+(-0.421752719264)*x_ref[1]**o+(-0.102522772133)*x_ref[1]+(-0.384947583437)*x_ref[2]**o+(-0.675090951882)*x_ref[2]
-        ref[1,3,1,0]=(0.862354670281)*x_ref[0]**o+(0.0332806244503)*x_ref[0]+(0.248152892705)*x_ref[1]**o+(-0.380941068103)*x_ref[1]+(0.499668747376)*x_ref[2]**o+(-0.732344330916)*x_ref[2]
-        ref[1,3,1,1]=(-0.367669055003)*x_ref[0]**o+(-0.28761578782)*x_ref[0]+(0.10838982068)*x_ref[1]**o+(-0.495999837684)*x_ref[1]+(0.599492939122)*x_ref[2]**o+(0.886609670648)*x_ref[2]
-        ref[1,3,2,0]=(0.707026122148)*x_ref[0]**o+(-0.625314188271)*x_ref[0]+(-0.734283031657)*x_ref[1]**o+(0.779848908302)*x_ref[1]+(-0.965798269237)*x_ref[2]**o+(0.35160103487)*x_ref[2]
-        ref[1,3,2,1]=(0.198008431503)*x_ref[0]**o+(0.145470568903)*x_ref[0]+(-0.342584113223)*x_ref[1]**o+(-0.976390968602)*x_ref[1]+(-0.371678081685)*x_ref[2]**o+(0.569699640624)*x_ref[2]
-        ref[1,4,0,0]=(-0.816642540092)*x_ref[0]**o+(0.466127552066)*x_ref[0]+(-0.491109738021)*x_ref[1]**o+(-0.177222784312)*x_ref[1]+(0.723624314914)*x_ref[2]**o+(-0.103929106752)*x_ref[2]
-        ref[1,4,0,1]=(-0.461770336596)*x_ref[0]**o+(-0.416473447722)*x_ref[0]+(-0.844639456093)*x_ref[1]**o+(-0.021509624606)*x_ref[1]+(-0.507857805076)*x_ref[2]**o+(-0.0132005113079)*x_ref[2]
-        ref[1,4,1,0]=(0.279614653607)*x_ref[0]**o+(-0.547332204747)*x_ref[0]+(0.329751635637)*x_ref[1]**o+(0.813149533168)*x_ref[1]+(0.0361758823053)*x_ref[2]**o+(0.0635753923527)*x_ref[2]
-        ref[1,4,1,1]=(0.124940246141)*x_ref[0]**o+(-0.470715329674)*x_ref[0]+(0.401922174627)*x_ref[1]**o+(-0.292371975658)*x_ref[1]+(0.302438467505)*x_ref[2]**o+(0.131045792461)*x_ref[2]
-        ref[1,4,2,0]=(0.817170444398)*x_ref[0]**o+(0.153182033447)*x_ref[0]+(-0.98908973731)*x_ref[1]**o+(0.359609127275)*x_ref[1]+(-0.891501663456)*x_ref[2]**o+(0.34700998982)*x_ref[2]
-        ref[1,4,2,1]=(0.619050545861)*x_ref[0]**o+(-0.784466574079)*x_ref[0]+(-0.15316511355)*x_ref[1]**o+(0.587255937366)*x_ref[1]+(0.740644692907)*x_ref[2]**o+(0.0651236072508)*x_ref[2]
-        ref[2,0,0,0]=(0.67904774175)*x_ref[0]**o+(-0.24998331377)*x_ref[0]+(-0.263635906274)*x_ref[1]**o+(0.157008949549)*x_ref[1]+(-0.905158896842)*x_ref[2]**o+(-0.975062080366)*x_ref[2]
-        ref[2,0,0,1]=(0.724305963876)*x_ref[0]**o+(0.666891161317)*x_ref[0]+(0.769784501206)*x_ref[1]**o+(-0.84353242369)*x_ref[1]+(0.631055556571)*x_ref[2]**o+(-0.433528873211)*x_ref[2]
-        ref[2,0,1,0]=(-0.545702871321)*x_ref[0]**o+(-0.153233364062)*x_ref[0]+(-0.892642075879)*x_ref[1]**o+(-0.303965445232)*x_ref[1]+(0.675938211305)*x_ref[2]**o+(0.134016007164)*x_ref[2]
-        ref[2,0,1,1]=(0.612528479764)*x_ref[0]**o+(0.444039154606)*x_ref[0]+(-0.185281638413)*x_ref[1]**o+(0.643315773689)*x_ref[1]+(-0.5562387833)*x_ref[2]**o+(-0.960249468718)*x_ref[2]
-        ref[2,0,2,0]=(-0.330135152971)*x_ref[0]**o+(0.359951176686)*x_ref[0]+(-0.797088515842)*x_ref[1]**o+(-0.257909258598)*x_ref[1]+(-0.927156080256)*x_ref[2]**o+(-0.843405252125)*x_ref[2]
-        ref[2,0,2,1]=(0.447041226497)*x_ref[0]**o+(0.691225329527)*x_ref[0]+(0.462798475523)*x_ref[1]**o+(0.157497098383)*x_ref[1]+(-0.77785224695)*x_ref[2]**o+(0.886430058902)*x_ref[2]
-        ref[2,1,0,0]=(0.397605326971)*x_ref[0]**o+(0.66227843262)*x_ref[0]+(-0.634922556623)*x_ref[1]**o+(-0.263342020187)*x_ref[1]+(-0.81486179124)*x_ref[2]**o+(-0.216716259698)*x_ref[2]
-        ref[2,1,0,1]=(-0.868246547394)*x_ref[0]**o+(-0.194983059368)*x_ref[0]+(-0.667277750808)*x_ref[1]**o+(0.284011270958)*x_ref[1]+(-0.276295620425)*x_ref[2]**o+(0.215159516398)*x_ref[2]
-        ref[2,1,1,0]=(0.990906320323)*x_ref[0]**o+(0.526754062323)*x_ref[0]+(-0.963398315893)*x_ref[1]**o+(-0.72561275544)*x_ref[1]+(0.539779065056)*x_ref[2]**o+(0.37738462043)*x_ref[2]
-        ref[2,1,1,1]=(-0.668520028258)*x_ref[0]**o+(-0.292883094355)*x_ref[0]+(0.260949538172)*x_ref[1]**o+(-0.952706524522)*x_ref[1]+(-0.715386804875)*x_ref[2]**o+(-0.683320136224)*x_ref[2]
-        ref[2,1,2,0]=(-0.646186301281)*x_ref[0]**o+(-0.62747987465)*x_ref[0]+(-0.858714171368)*x_ref[1]**o+(0.46910094021)*x_ref[1]+(0.468975652807)*x_ref[2]**o+(0.242115907129)*x_ref[2]
-        ref[2,1,2,1]=(0.262205767991)*x_ref[0]**o+(-0.460376423099)*x_ref[0]+(0.88572453638)*x_ref[1]**o+(0.611761462581)*x_ref[1]+(0.763860971141)*x_ref[2]**o+(0.108470198525)*x_ref[2]
-        ref[2,2,0,0]=(-0.0218691308052)*x_ref[0]**o+(0.942271392012)*x_ref[0]+(-0.778469966054)*x_ref[1]**o+(0.0873305333765)*x_ref[1]+(-0.300479183111)*x_ref[2]**o+(-0.862547713455)*x_ref[2]
-        ref[2,2,0,1]=(-0.736808990311)*x_ref[0]**o+(-0.200478457878)*x_ref[0]+(0.272608362607)*x_ref[1]**o+(-0.0651056524306)*x_ref[1]+(0.616628495568)*x_ref[2]**o+(-0.8623490351)*x_ref[2]
-        ref[2,2,1,0]=(0.931530668297)*x_ref[0]**o+(0.39701649536)*x_ref[0]+(0.552135074711)*x_ref[1]**o+(-0.489731326344)*x_ref[1]+(-0.864724191354)*x_ref[2]**o+(0.369557062583)*x_ref[2]
-        ref[2,2,1,1]=(0.418780453395)*x_ref[0]**o+(-0.4935990418)*x_ref[0]+(0.34625989303)*x_ref[1]**o+(0.979829617988)*x_ref[1]+(0.853169987441)*x_ref[2]**o+(-0.945958722805)*x_ref[2]
-        ref[2,2,2,0]=(0.973689940887)*x_ref[0]**o+(-0.0585784323994)*x_ref[0]+(-0.472419744635)*x_ref[1]**o+(0.851814193674)*x_ref[1]+(-0.393393340405)*x_ref[2]**o+(-0.755376551633)*x_ref[2]
-        ref[2,2,2,1]=(-0.217049913648)*x_ref[0]**o+(-0.262150796255)*x_ref[0]+(-0.407805273745)*x_ref[1]**o+(0.819646964669)*x_ref[1]+(-0.0130316627236)*x_ref[2]**o+(0.179034130621)*x_ref[2]
-        ref[2,3,0,0]=(-0.377708814803)*x_ref[0]**o+(-0.943893058411)*x_ref[0]+(-0.354341838264)*x_ref[1]**o+(0.0696491295689)*x_ref[1]+(-0.192838410156)*x_ref[2]**o+(-0.22208932914)*x_ref[2]
-        ref[2,3,0,1]=(0.252429489766)*x_ref[0]**o+(0.808052283089)*x_ref[0]+(0.282941493712)*x_ref[1]**o+(0.89816007357)*x_ref[1]+(0.000979423783521)*x_ref[2]**o+(0.645599553602)*x_ref[2]
-        ref[2,3,1,0]=(0.788089987784)*x_ref[0]**o+(0.414254044423)*x_ref[0]+(0.105204158639)*x_ref[1]**o+(0.97527041289)*x_ref[1]+(0.447463569594)*x_ref[2]**o+(0.91465488394)*x_ref[2]
-        ref[2,3,1,1]=(0.882323493958)*x_ref[0]**o+(-0.98135461385)*x_ref[0]+(0.641881834427)*x_ref[1]**o+(-0.888068999894)*x_ref[1]+(0.705728558352)*x_ref[2]**o+(0.295815435834)*x_ref[2]
-        ref[2,3,2,0]=(-0.570666876652)*x_ref[0]**o+(0.52308582534)*x_ref[0]+(-0.604213776925)*x_ref[1]**o+(-0.568684610916)*x_ref[1]+(-0.0378463784885)*x_ref[2]**o+(0.557994858276)*x_ref[2]
-        ref[2,3,2,1]=(-0.497489149519)*x_ref[0]**o+(0.739341493998)*x_ref[0]+(-0.375869065986)*x_ref[1]**o+(-0.895553158302)*x_ref[1]+(0.916829505813)*x_ref[2]**o+(-0.650522069672)*x_ref[2]
-        ref[2,4,0,0]=(0.627540843427)*x_ref[0]**o+(-0.572125230014)*x_ref[0]+(-0.404781893475)*x_ref[1]**o+(-0.114896790942)*x_ref[1]+(-0.108914764977)*x_ref[2]**o+(0.739758413931)*x_ref[2]
-        ref[2,4,0,1]=(0.243205825969)*x_ref[0]**o+(-0.989602234642)*x_ref[0]+(-0.925730664677)*x_ref[1]**o+(0.454801040316)*x_ref[1]+(0.51758036389)*x_ref[2]**o+(0.325160660047)*x_ref[2]
-        ref[2,4,1,0]=(0.559764013478)*x_ref[0]**o+(2.69034311577e-05)*x_ref[0]+(-0.691119937581)*x_ref[1]**o+(-0.347457112767)*x_ref[1]+(0.714683489268)*x_ref[2]**o+(-0.589270137254)*x_ref[2]
-        ref[2,4,1,1]=(-0.657837524953)*x_ref[0]**o+(0.071158671662)*x_ref[0]+(-0.998677178035)*x_ref[1]**o+(-0.544136374784)*x_ref[1]+(0.6200901771)*x_ref[2]**o+(-0.280453395396)*x_ref[2]
-        ref[2,4,2,0]=(0.692403743003)*x_ref[0]**o+(-0.570086669428)*x_ref[0]+(0.455036498939)*x_ref[1]**o+(0.291433179453)*x_ref[1]+(-0.203004457401)*x_ref[2]**o+(0.0192489593981)*x_ref[2]
-        ref[2,4,2,1]=(-0.656783033826)*x_ref[0]**o+(0.865748949755)*x_ref[0]+(-0.297731124456)*x_ref[1]**o+(-0.826786841513)*x_ref[1]+(0.891374127144)*x_ref[2]**o+(-0.736789456498)*x_ref[2]
-        ref[3,0,0,0]=(-0.963120586854)*x_ref[0]**o+(0.466089565408)*x_ref[0]+(-0.785137906849)*x_ref[1]**o+(0.194880437113)*x_ref[1]+(0.652057839639)*x_ref[2]**o+(-0.63674893761)*x_ref[2]
-        ref[3,0,0,1]=(-0.923234625819)*x_ref[0]**o+(-0.303847080864)*x_ref[0]+(-0.374245465515)*x_ref[1]**o+(0.131093877726)*x_ref[1]+(-0.13469395748)*x_ref[2]**o+(0.42721676585)*x_ref[2]
-        ref[3,0,1,0]=(-0.613510153481)*x_ref[0]**o+(0.986696685318)*x_ref[0]+(0.188583200151)*x_ref[1]**o+(-0.895175969251)*x_ref[1]+(-0.699510846377)*x_ref[2]**o+(0.953157679279)*x_ref[2]
-        ref[3,0,1,1]=(-0.805809890231)*x_ref[0]**o+(-0.786467529592)*x_ref[0]+(-0.287240865489)*x_ref[1]**o+(-0.78714682888)*x_ref[1]+(-0.301034554724)*x_ref[2]**o+(0.698100092246)*x_ref[2]
-        ref[3,0,2,0]=(-0.29320618172)*x_ref[0]**o+(0.482436772935)*x_ref[0]+(-0.126052929261)*x_ref[1]**o+(-0.0638862140753)*x_ref[1]+(0.42769411972)*x_ref[2]**o+(0.741118745829)*x_ref[2]
-        ref[3,0,2,1]=(-0.380041427783)*x_ref[0]**o+(-0.0347904596008)*x_ref[0]+(-0.321599184546)*x_ref[1]**o+(-0.061333518544)*x_ref[1]+(-0.885193271364)*x_ref[2]**o+(0.216506075886)*x_ref[2]
-        ref[3,1,0,0]=(-0.872457576682)*x_ref[0]**o+(0.1368749584)*x_ref[0]+(0.883209741333)*x_ref[1]**o+(0.946644762296)*x_ref[1]+(-0.941665219846)*x_ref[2]**o+(0.683787986795)*x_ref[2]
-        ref[3,1,0,1]=(0.564843030077)*x_ref[0]**o+(0.987198898299)*x_ref[0]+(0.808116156661)*x_ref[1]**o+(-0.712172259479)*x_ref[1]+(0.942066890171)*x_ref[2]**o+(-0.265957158917)*x_ref[2]
-        ref[3,1,1,0]=(-0.171018264631)*x_ref[0]**o+(0.277202848962)*x_ref[0]+(0.0726306773528)*x_ref[1]**o+(-0.0265640725409)*x_ref[1]+(-0.871118922929)*x_ref[2]**o+(0.0562314512261)*x_ref[2]
-        ref[3,1,1,1]=(0.0861984079085)*x_ref[0]**o+(-0.954818837051)*x_ref[0]+(0.817362109646)*x_ref[1]**o+(-0.513086270222)*x_ref[1]+(-0.487472170741)*x_ref[2]**o+(0.702514192773)*x_ref[2]
-        ref[3,1,2,0]=(0.272419057202)*x_ref[0]**o+(-0.0454292509397)*x_ref[0]+(-0.117471126603)*x_ref[1]**o+(0.638237510553)*x_ref[1]+(0.156858948691)*x_ref[2]**o+(0.499459702141)*x_ref[2]
-        ref[3,1,2,1]=(-0.384525883334)*x_ref[0]**o+(-0.795638828759)*x_ref[0]+(-0.105795059118)*x_ref[1]**o+(0.539873566967)*x_ref[1]+(-0.402558868714)*x_ref[2]**o+(-0.690578475243)*x_ref[2]
-        ref[3,2,0,0]=(0.776889517136)*x_ref[0]**o+(0.710931840891)*x_ref[0]+(0.335992677388)*x_ref[1]**o+(-0.689182863932)*x_ref[1]+(0.294149805572)*x_ref[2]**o+(-0.144223257292)*x_ref[2]
-        ref[3,2,0,1]=(0.738703695733)*x_ref[0]**o+(-0.523207061995)*x_ref[0]+(0.707078352596)*x_ref[1]**o+(-0.594373978096)*x_ref[1]+(-0.833468457639)*x_ref[2]**o+(-0.60181674446)*x_ref[2]
-        ref[3,2,1,0]=(-0.70243682985)*x_ref[0]**o+(-0.557914174271)*x_ref[0]+(-0.97153723053)*x_ref[1]**o+(0.791692594024)*x_ref[1]+(-0.442273808305)*x_ref[2]**o+(-0.74069605321)*x_ref[2]
-        ref[3,2,1,1]=(0.136307039789)*x_ref[0]**o+(0.820661597623)*x_ref[0]+(0.379752060994)*x_ref[1]**o+(-0.739083116742)*x_ref[1]+(-0.964857055764)*x_ref[2]**o+(0.523159928671)*x_ref[2]
-        ref[3,2,2,0]=(0.530883295074)*x_ref[0]**o+(-0.859538509888)*x_ref[0]+(-0.33917158254)*x_ref[1]**o+(0.476510741055)*x_ref[1]+(0.851975683024)*x_ref[2]**o+(0.146277015139)*x_ref[2]
-        ref[3,2,2,1]=(-0.532984574212)*x_ref[0]**o+(-0.413169979754)*x_ref[0]+(0.0113284200501)*x_ref[1]**o+(0.406768750567)*x_ref[1]+(0.730968378807)*x_ref[2]**o+(-0.74004422909)*x_ref[2]
-        ref[3,3,0,0]=(0.784793271465)*x_ref[0]**o+(0.879569037436)*x_ref[0]+(0.687804194006)*x_ref[1]**o+(0.153617608524)*x_ref[1]+(-0.410247334526)*x_ref[2]**o+(0.147941373268)*x_ref[2]
-        ref[3,3,0,1]=(-0.896748874838)*x_ref[0]**o+(-0.408404228864)*x_ref[0]+(0.831967697989)*x_ref[1]**o+(-0.290875629476)*x_ref[1]+(-0.244101719785)*x_ref[2]**o+(0.240453425519)*x_ref[2]
-        ref[3,3,1,0]=(-0.352293918285)*x_ref[0]**o+(0.0341233590345)*x_ref[0]+(-0.0165872699681)*x_ref[1]**o+(-0.0668507705942)*x_ref[1]+(-0.133733710061)*x_ref[2]**o+(-0.00620237772745)*x_ref[2]
-        ref[3,3,1,1]=(0.173638606531)*x_ref[0]**o+(0.619705705811)*x_ref[0]+(0.279972531576)*x_ref[1]**o+(-0.0811181576037)*x_ref[1]+(-0.645673968637)*x_ref[2]**o+(0.913753411758)*x_ref[2]
-        ref[3,3,2,0]=(0.0623921286142)*x_ref[0]**o+(0.393414889204)*x_ref[0]+(-0.300034851075)*x_ref[1]**o+(-0.519515206457)*x_ref[1]+(-0.0074981731879)*x_ref[2]**o+(0.202996242895)*x_ref[2]
-        ref[3,3,2,1]=(0.583279597505)*x_ref[0]**o+(-0.940603487209)*x_ref[0]+(0.027966157338)*x_ref[1]**o+(0.251466344692)*x_ref[1]+(-0.97011033154)*x_ref[2]**o+(0.46527056203)*x_ref[2]
-        ref[3,4,0,0]=(0.865170740218)*x_ref[0]**o+(-0.466853211289)*x_ref[0]+(0.0935492537278)*x_ref[1]**o+(-0.632374632657)*x_ref[1]+(0.673466346463)*x_ref[2]**o+(-0.47934739873)*x_ref[2]
-        ref[3,4,0,1]=(0.0417451136027)*x_ref[0]**o+(-0.781570733286)*x_ref[0]+(0.547452389454)*x_ref[1]**o+(-0.0286368211528)*x_ref[1]+(-0.98907358808)*x_ref[2]**o+(0.62749495057)*x_ref[2]
-        ref[3,4,1,0]=(-0.632067479664)*x_ref[0]**o+(-0.872835386336)*x_ref[0]+(-0.228785631078)*x_ref[1]**o+(-0.224206127306)*x_ref[1]+(0.769729051217)*x_ref[2]**o+(-0.406750034352)*x_ref[2]
-        ref[3,4,1,1]=(0.216883071299)*x_ref[0]**o+(-0.225632200121)*x_ref[0]+(0.827186402743)*x_ref[1]**o+(0.161488636886)*x_ref[1]+(0.773801288836)*x_ref[2]**o+(0.977006832166)*x_ref[2]
-        ref[3,4,2,0]=(-0.867098845884)*x_ref[0]**o+(0.14989544838)*x_ref[0]+(0.756720043262)*x_ref[1]**o+(-0.496074302626)*x_ref[1]+(-0.662787072451)*x_ref[2]**o+(-0.142473973368)*x_ref[2]
-        ref[3,4,2,1]=(-0.294128396829)*x_ref[0]**o+(-0.931379392091)*x_ref[0]+(0.906552131161)*x_ref[1]**o+(-0.422008485494)*x_ref[1]+(0.806742455679)*x_ref[2]**o+(0.940488803006)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.387919945961)*x[0]**o+(-0.65988832446)*x[0]+(-0.271357984194)*x[1]**o+(0.911983947389)*x[1]
-        ref=(-0.387919945961)*x_ref[0]**o+(-0.65988832446)*x_ref[0]+(-0.271357984194)*x_ref[1]**o+(0.911983947389)*x_ref[1]
-      else:
-        arg=(-0.0447075351093)*x[0]**o+(0.253461091432)*x[0]+(-0.218567784216)*x[1]**o+(-0.79030708754)*x[1]+(0.977690873872)*x[2]**o+(0.832406975763)*x[2]
-        ref=(-0.0447075351093)*x_ref[0]**o+(0.253461091432)*x_ref[0]+(-0.218567784216)*x_ref[1]**o+(-0.79030708754)*x_ref[1]+(0.977690873872)*x_ref[2]**o+(0.832406975763)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.0351141106851)*x[0]**o+(-0.330587401)*x[0]+(0.244307738971)*x[1]**o+(0.623126601064)*x[1]
-        arg[1]=(-0.828515624351)*x[0]**o+(-0.128313696693)*x[0]+(-0.419830633587)*x[1]**o+(0.207694344977)*x[1]
-        ref[0]=(-0.0351141106851)*x_ref[0]**o+(-0.330587401)*x_ref[0]+(0.244307738971)*x_ref[1]**o+(0.623126601064)*x_ref[1]
-        ref[1]=(-0.828515624351)*x_ref[0]**o+(-0.128313696693)*x_ref[0]+(-0.419830633587)*x_ref[1]**o+(0.207694344977)*x_ref[1]
-      else:
-        arg[0]=(-0.704794455532)*x[0]**o+(0.913653448977)*x[0]+(-0.159574360706)*x[1]**o+(-0.766199806615)*x[1]+(-0.571643737767)*x[2]**o+(-0.818256320426)*x[2]
-        arg[1]=(-0.951104850067)*x[0]**o+(-0.661009825365)*x[0]+(0.415252265672)*x[1]**o+(-0.373834229809)*x[1]+(-0.727526942776)*x[2]**o+(-0.832051613933)*x[2]
-        ref[0]=(-0.704794455532)*x_ref[0]**o+(0.913653448977)*x_ref[0]+(-0.159574360706)*x_ref[1]**o+(-0.766199806615)*x_ref[1]+(-0.571643737767)*x_ref[2]**o+(-0.818256320426)*x_ref[2]
-        ref[1]=(-0.951104850067)*x_ref[0]**o+(-0.661009825365)*x_ref[0]+(0.415252265672)*x_ref[1]**o+(-0.373834229809)*x_ref[1]+(-0.727526942776)*x_ref[2]**o+(-0.832051613933)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.597205522265)*x[0]**o+(-0.990224489001)*x[0]+(0.409554155812)*x[1]**o+(0.0483989008223)*x[1]
-        arg[0,1]=(0.397936023817)*x[0]**o+(-0.930167709289)*x[0]+(0.92611965278)*x[1]**o+(-0.964519543905)*x[1]
-        arg[0,2]=(-0.311484417828)*x[0]**o+(-0.602916971577)*x[0]+(-0.420016358622)*x[1]**o+(0.837176635137)*x[1]
-        arg[0,3]=(0.819115285277)*x[0]**o+(0.34838887804)*x[0]+(-0.690550904634)*x[1]**o+(0.373665882427)*x[1]
-        arg[0,4]=(-0.7631912026)*x[0]**o+(-0.945320401033)*x[0]+(0.694292397122)*x[1]**o+(-0.420347487671)*x[1]
-        arg[1,0]=(-0.572828652444)*x[0]**o+(0.354646387926)*x[0]+(-0.0507519017004)*x[1]**o+(-0.613889773716)*x[1]
-        arg[1,1]=(-0.816957267715)*x[0]**o+(0.733537081373)*x[0]+(-0.660041553847)*x[1]**o+(0.441096986506)*x[1]
-        arg[1,2]=(-0.803370878245)*x[0]**o+(-0.876568267674)*x[0]+(0.530143828975)*x[1]**o+(0.208130191749)*x[1]
-        arg[1,3]=(-0.471900498331)*x[0]**o+(0.537812384385)*x[0]+(-0.882977296775)*x[1]**o+(-0.0668303027948)*x[1]
-        arg[1,4]=(0.145525825808)*x[0]**o+(-0.743588928172)*x[0]+(-0.571360483951)*x[1]**o+(-0.779639689697)*x[1]
-        arg[2,0]=(0.664624516473)*x[0]**o+(-0.903029393285)*x[0]+(-0.602274374813)*x[1]**o+(-0.0349025848298)*x[1]
-        arg[2,1]=(-0.826235832601)*x[0]**o+(-0.56956830806)*x[0]+(-0.720529973236)*x[1]**o+(0.844549160654)*x[1]
-        arg[2,2]=(0.865808902895)*x[0]**o+(0.806173922192)*x[0]+(-0.430500586315)*x[1]**o+(-0.903014287464)*x[1]
-        arg[2,3]=(0.567909856768)*x[0]**o+(0.702374819746)*x[0]+(-0.931635013223)*x[1]**o+(0.35484582218)*x[1]
-        arg[2,4]=(0.98750760384)*x[0]**o+(0.759340896388)*x[0]+(0.54913653446)*x[1]**o+(-0.620836882788)*x[1]
-        arg[3,0]=(-0.886288358587)*x[0]**o+(0.393932009441)*x[0]+(0.370738890674)*x[1]**o+(0.540588748949)*x[1]
-        arg[3,1]=(0.281435147449)*x[0]**o+(0.455838903759)*x[0]+(0.115176811183)*x[1]**o+(0.214335969407)*x[1]
-        arg[3,2]=(-0.939824922583)*x[0]**o+(-0.725457358605)*x[0]+(0.0326844083908)*x[1]**o+(-0.743922869733)*x[1]
-        arg[3,3]=(-0.189824771744)*x[0]**o+(-0.26508334021)*x[0]+(-0.323185410564)*x[1]**o+(0.242480018197)*x[1]
-        arg[3,4]=(-0.675784178633)*x[0]**o+(0.0995857467734)*x[0]+(0.564599922701)*x[1]**o+(-0.716819470891)*x[1]
-        ref[0,0]=(0.597205522265)*x_ref[0]**o+(-0.990224489001)*x_ref[0]+(0.409554155812)*x_ref[1]**o+(0.0483989008223)*x_ref[1]
-        ref[0,1]=(0.397936023817)*x_ref[0]**o+(-0.930167709289)*x_ref[0]+(0.92611965278)*x_ref[1]**o+(-0.964519543905)*x_ref[1]
-        ref[0,2]=(-0.311484417828)*x_ref[0]**o+(-0.602916971577)*x_ref[0]+(-0.420016358622)*x_ref[1]**o+(0.837176635137)*x_ref[1]
-        ref[0,3]=(0.819115285277)*x_ref[0]**o+(0.34838887804)*x_ref[0]+(-0.690550904634)*x_ref[1]**o+(0.373665882427)*x_ref[1]
-        ref[0,4]=(-0.7631912026)*x_ref[0]**o+(-0.945320401033)*x_ref[0]+(0.694292397122)*x_ref[1]**o+(-0.420347487671)*x_ref[1]
-        ref[1,0]=(-0.572828652444)*x_ref[0]**o+(0.354646387926)*x_ref[0]+(-0.0507519017004)*x_ref[1]**o+(-0.613889773716)*x_ref[1]
-        ref[1,1]=(-0.816957267715)*x_ref[0]**o+(0.733537081373)*x_ref[0]+(-0.660041553847)*x_ref[1]**o+(0.441096986506)*x_ref[1]
-        ref[1,2]=(-0.803370878245)*x_ref[0]**o+(-0.876568267674)*x_ref[0]+(0.530143828975)*x_ref[1]**o+(0.208130191749)*x_ref[1]
-        ref[1,3]=(-0.471900498331)*x_ref[0]**o+(0.537812384385)*x_ref[0]+(-0.882977296775)*x_ref[1]**o+(-0.0668303027948)*x_ref[1]
-        ref[1,4]=(0.145525825808)*x_ref[0]**o+(-0.743588928172)*x_ref[0]+(-0.571360483951)*x_ref[1]**o+(-0.779639689697)*x_ref[1]
-        ref[2,0]=(0.664624516473)*x_ref[0]**o+(-0.903029393285)*x_ref[0]+(-0.602274374813)*x_ref[1]**o+(-0.0349025848298)*x_ref[1]
-        ref[2,1]=(-0.826235832601)*x_ref[0]**o+(-0.56956830806)*x_ref[0]+(-0.720529973236)*x_ref[1]**o+(0.844549160654)*x_ref[1]
-        ref[2,2]=(0.865808902895)*x_ref[0]**o+(0.806173922192)*x_ref[0]+(-0.430500586315)*x_ref[1]**o+(-0.903014287464)*x_ref[1]
-        ref[2,3]=(0.567909856768)*x_ref[0]**o+(0.702374819746)*x_ref[0]+(-0.931635013223)*x_ref[1]**o+(0.35484582218)*x_ref[1]
-        ref[2,4]=(0.98750760384)*x_ref[0]**o+(0.759340896388)*x_ref[0]+(0.54913653446)*x_ref[1]**o+(-0.620836882788)*x_ref[1]
-        ref[3,0]=(-0.886288358587)*x_ref[0]**o+(0.393932009441)*x_ref[0]+(0.370738890674)*x_ref[1]**o+(0.540588748949)*x_ref[1]
-        ref[3,1]=(0.281435147449)*x_ref[0]**o+(0.455838903759)*x_ref[0]+(0.115176811183)*x_ref[1]**o+(0.214335969407)*x_ref[1]
-        ref[3,2]=(-0.939824922583)*x_ref[0]**o+(-0.725457358605)*x_ref[0]+(0.0326844083908)*x_ref[1]**o+(-0.743922869733)*x_ref[1]
-        ref[3,3]=(-0.189824771744)*x_ref[0]**o+(-0.26508334021)*x_ref[0]+(-0.323185410564)*x_ref[1]**o+(0.242480018197)*x_ref[1]
-        ref[3,4]=(-0.675784178633)*x_ref[0]**o+(0.0995857467734)*x_ref[0]+(0.564599922701)*x_ref[1]**o+(-0.716819470891)*x_ref[1]
-      else:
-        arg[0,0]=(0.0429272016915)*x[0]**o+(-0.277438145968)*x[0]+(-0.663736923945)*x[1]**o+(0.754568662274)*x[1]+(-0.702929906882)*x[2]**o+(-0.744050838266)*x[2]
-        arg[0,1]=(-0.245995343753)*x[0]**o+(-0.838699721329)*x[0]+(-0.266398695342)*x[1]**o+(0.116104359849)*x[1]+(-0.62406648751)*x[2]**o+(-0.85767565383)*x[2]
-        arg[0,2]=(-0.969332932419)*x[0]**o+(-0.815839911463)*x[0]+(0.0532903209734)*x[1]**o+(-0.00108699727615)*x[1]+(0.142541999046)*x[2]**o+(0.971482543817)*x[2]
-        arg[0,3]=(-0.73941517118)*x[0]**o+(0.728994326071)*x[0]+(0.962711932241)*x[1]**o+(-0.418607572448)*x[1]+(-0.374703265781)*x[2]**o+(-0.278661032739)*x[2]
-        arg[0,4]=(-0.258020436163)*x[0]**o+(-0.0252121036831)*x[0]+(-0.756480314139)*x[1]**o+(-0.705045476776)*x[1]+(0.222309499093)*x[2]**o+(0.999237507123)*x[2]
-        arg[1,0]=(-0.00753673411562)*x[0]**o+(-0.712947643092)*x[0]+(-0.946860154348)*x[1]**o+(-0.887293091702)*x[1]+(-0.57071975934)*x[2]**o+(-0.000995212472675)*x[2]
-        arg[1,1]=(-0.547724214274)*x[0]**o+(-0.338492998124)*x[0]+(-0.191652366102)*x[1]**o+(-0.260315919511)*x[1]+(-0.103992070026)*x[2]**o+(-0.836638261621)*x[2]
-        arg[1,2]=(-0.354711259362)*x[0]**o+(-0.916549411392)*x[0]+(0.744081321252)*x[1]**o+(-0.375805257126)*x[1]+(-0.78900115815)*x[2]**o+(-0.431116699853)*x[2]
-        arg[1,3]=(0.543469030875)*x[0]**o+(-0.154316090927)*x[0]+(0.794234357287)*x[1]**o+(-0.894714087173)*x[1]+(-0.523490310245)*x[2]**o+(-0.734864830975)*x[2]
-        arg[1,4]=(0.856478460898)*x[0]**o+(0.550846305146)*x[0]+(0.883099588119)*x[1]**o+(-0.928432890741)*x[1]+(0.953422014409)*x[2]**o+(-0.0295234113856)*x[2]
-        arg[2,0]=(0.391420547389)*x[0]**o+(-0.0618665973255)*x[0]+(-0.536627285311)*x[1]**o+(-0.701891441965)*x[1]+(0.433098401229)*x[2]**o+(-0.821674981019)*x[2]
-        arg[2,1]=(0.102455732687)*x[0]**o+(0.168078832413)*x[0]+(0.911099070324)*x[1]**o+(-0.776659572448)*x[1]+(0.942192938907)*x[2]**o+(-0.96284944292)*x[2]
-        arg[2,2]=(0.677666801373)*x[0]**o+(0.579429978893)*x[0]+(-0.642666485576)*x[1]**o+(-0.0709929161913)*x[1]+(-0.686526389023)*x[2]**o+(0.0941806754766)*x[2]
-        arg[2,3]=(-0.942137271102)*x[0]**o+(-0.448762007046)*x[0]+(0.403668316046)*x[1]**o+(-0.885790833279)*x[1]+(0.0448846125948)*x[2]**o+(0.123128346219)*x[2]
-        arg[2,4]=(0.64615774988)*x[0]**o+(0.641971975809)*x[0]+(-0.0486200548159)*x[1]**o+(0.106284669825)*x[1]+(0.968867785284)*x[2]**o+(-0.693546581787)*x[2]
-        arg[3,0]=(-0.0926306498682)*x[0]**o+(0.759541313455)*x[0]+(-0.569638025121)*x[1]**o+(0.236957551756)*x[1]+(-0.137429816873)*x[2]**o+(0.285836556676)*x[2]
-        arg[3,1]=(0.0382484871512)*x[0]**o+(-0.481489628305)*x[0]+(0.809404670659)*x[1]**o+(0.124155422674)*x[1]+(-0.239216545446)*x[2]**o+(0.436110807769)*x[2]
-        arg[3,2]=(-0.154044250435)*x[0]**o+(0.730285603192)*x[0]+(-0.986531989452)*x[1]**o+(0.0424454222102)*x[1]+(0.9651845632)*x[2]**o+(-0.173872544124)*x[2]
-        arg[3,3]=(-0.528075843446)*x[0]**o+(0.226347788534)*x[0]+(-0.314941509835)*x[1]**o+(0.508180139398)*x[1]+(0.681251000904)*x[2]**o+(-0.442663397606)*x[2]
-        arg[3,4]=(-0.335444251365)*x[0]**o+(-0.7788088839)*x[0]+(0.602538296871)*x[1]**o+(-0.440564659745)*x[1]+(-0.204809090144)*x[2]**o+(-0.449409088071)*x[2]
-        ref[0,0]=(0.0429272016915)*x_ref[0]**o+(-0.277438145968)*x_ref[0]+(-0.663736923945)*x_ref[1]**o+(0.754568662274)*x_ref[1]+(-0.702929906882)*x_ref[2]**o+(-0.744050838266)*x_ref[2]
-        ref[0,1]=(-0.245995343753)*x_ref[0]**o+(-0.838699721329)*x_ref[0]+(-0.266398695342)*x_ref[1]**o+(0.116104359849)*x_ref[1]+(-0.62406648751)*x_ref[2]**o+(-0.85767565383)*x_ref[2]
-        ref[0,2]=(-0.969332932419)*x_ref[0]**o+(-0.815839911463)*x_ref[0]+(0.0532903209734)*x_ref[1]**o+(-0.00108699727615)*x_ref[1]+(0.142541999046)*x_ref[2]**o+(0.971482543817)*x_ref[2]
-        ref[0,3]=(-0.73941517118)*x_ref[0]**o+(0.728994326071)*x_ref[0]+(0.962711932241)*x_ref[1]**o+(-0.418607572448)*x_ref[1]+(-0.374703265781)*x_ref[2]**o+(-0.278661032739)*x_ref[2]
-        ref[0,4]=(-0.258020436163)*x_ref[0]**o+(-0.0252121036831)*x_ref[0]+(-0.756480314139)*x_ref[1]**o+(-0.705045476776)*x_ref[1]+(0.222309499093)*x_ref[2]**o+(0.999237507123)*x_ref[2]
-        ref[1,0]=(-0.00753673411562)*x_ref[0]**o+(-0.712947643092)*x_ref[0]+(-0.946860154348)*x_ref[1]**o+(-0.887293091702)*x_ref[1]+(-0.57071975934)*x_ref[2]**o+(-0.000995212472675)*x_ref[2]
-        ref[1,1]=(-0.547724214274)*x_ref[0]**o+(-0.338492998124)*x_ref[0]+(-0.191652366102)*x_ref[1]**o+(-0.260315919511)*x_ref[1]+(-0.103992070026)*x_ref[2]**o+(-0.836638261621)*x_ref[2]
-        ref[1,2]=(-0.354711259362)*x_ref[0]**o+(-0.916549411392)*x_ref[0]+(0.744081321252)*x_ref[1]**o+(-0.375805257126)*x_ref[1]+(-0.78900115815)*x_ref[2]**o+(-0.431116699853)*x_ref[2]
-        ref[1,3]=(0.543469030875)*x_ref[0]**o+(-0.154316090927)*x_ref[0]+(0.794234357287)*x_ref[1]**o+(-0.894714087173)*x_ref[1]+(-0.523490310245)*x_ref[2]**o+(-0.734864830975)*x_ref[2]
-        ref[1,4]=(0.856478460898)*x_ref[0]**o+(0.550846305146)*x_ref[0]+(0.883099588119)*x_ref[1]**o+(-0.928432890741)*x_ref[1]+(0.953422014409)*x_ref[2]**o+(-0.0295234113856)*x_ref[2]
-        ref[2,0]=(0.391420547389)*x_ref[0]**o+(-0.0618665973255)*x_ref[0]+(-0.536627285311)*x_ref[1]**o+(-0.701891441965)*x_ref[1]+(0.433098401229)*x_ref[2]**o+(-0.821674981019)*x_ref[2]
-        ref[2,1]=(0.102455732687)*x_ref[0]**o+(0.168078832413)*x_ref[0]+(0.911099070324)*x_ref[1]**o+(-0.776659572448)*x_ref[1]+(0.942192938907)*x_ref[2]**o+(-0.96284944292)*x_ref[2]
-        ref[2,2]=(0.677666801373)*x_ref[0]**o+(0.579429978893)*x_ref[0]+(-0.642666485576)*x_ref[1]**o+(-0.0709929161913)*x_ref[1]+(-0.686526389023)*x_ref[2]**o+(0.0941806754766)*x_ref[2]
-        ref[2,3]=(-0.942137271102)*x_ref[0]**o+(-0.448762007046)*x_ref[0]+(0.403668316046)*x_ref[1]**o+(-0.885790833279)*x_ref[1]+(0.0448846125948)*x_ref[2]**o+(0.123128346219)*x_ref[2]
-        ref[2,4]=(0.64615774988)*x_ref[0]**o+(0.641971975809)*x_ref[0]+(-0.0486200548159)*x_ref[1]**o+(0.106284669825)*x_ref[1]+(0.968867785284)*x_ref[2]**o+(-0.693546581787)*x_ref[2]
-        ref[3,0]=(-0.0926306498682)*x_ref[0]**o+(0.759541313455)*x_ref[0]+(-0.569638025121)*x_ref[1]**o+(0.236957551756)*x_ref[1]+(-0.137429816873)*x_ref[2]**o+(0.285836556676)*x_ref[2]
-        ref[3,1]=(0.0382484871512)*x_ref[0]**o+(-0.481489628305)*x_ref[0]+(0.809404670659)*x_ref[1]**o+(0.124155422674)*x_ref[1]+(-0.239216545446)*x_ref[2]**o+(0.436110807769)*x_ref[2]
-        ref[3,2]=(-0.154044250435)*x_ref[0]**o+(0.730285603192)*x_ref[0]+(-0.986531989452)*x_ref[1]**o+(0.0424454222102)*x_ref[1]+(0.9651845632)*x_ref[2]**o+(-0.173872544124)*x_ref[2]
-        ref[3,3]=(-0.528075843446)*x_ref[0]**o+(0.226347788534)*x_ref[0]+(-0.314941509835)*x_ref[1]**o+(0.508180139398)*x_ref[1]+(0.681251000904)*x_ref[2]**o+(-0.442663397606)*x_ref[2]
-        ref[3,4]=(-0.335444251365)*x_ref[0]**o+(-0.7788088839)*x_ref[0]+(0.602538296871)*x_ref[1]**o+(-0.440564659745)*x_ref[1]+(-0.204809090144)*x_ref[2]**o+(-0.449409088071)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.88752640419)*x[0]**o+(-0.432514405615)*x[0]+(0.714823891809)*x[1]**o+(0.697307667986)*x[1]
-        arg[0,0,1]=(0.738741506554)*x[0]**o+(0.188618518993)*x[0]+(-0.482898810269)*x[1]**o+(-0.914123176195)*x[1]
-        arg[0,1,0]=(0.863872888691)*x[0]**o+(0.74507667202)*x[0]+(0.363690250942)*x[1]**o+(0.578470064401)*x[1]
-        arg[0,1,1]=(-0.764594250812)*x[0]**o+(0.692105995894)*x[0]+(-0.950074761486)*x[1]**o+(-0.229643756622)*x[1]
-        arg[1,0,0]=(-0.514123807377)*x[0]**o+(-0.770729480038)*x[0]+(-0.0503641588682)*x[1]**o+(-0.334340604627)*x[1]
-        arg[1,0,1]=(-0.753427043851)*x[0]**o+(0.482153344254)*x[0]+(0.00162169870171)*x[1]**o+(-0.877830413948)*x[1]
-        arg[1,1,0]=(0.603963041861)*x[0]**o+(-0.545048115282)*x[0]+(0.464500827027)*x[1]**o+(-0.527556750287)*x[1]
-        arg[1,1,1]=(0.753201247064)*x[0]**o+(-0.99039225613)*x[0]+(-0.787959315932)*x[1]**o+(-0.918878072132)*x[1]
-        arg[2,0,0]=(0.254002467345)*x[0]**o+(-0.918196533244)*x[0]+(-0.178408279918)*x[1]**o+(0.14954396814)*x[1]
-        arg[2,0,1]=(0.449025666157)*x[0]**o+(-0.854430018688)*x[0]+(0.0393762923755)*x[1]**o+(0.576680446192)*x[1]
-        arg[2,1,0]=(-0.252429553053)*x[0]**o+(-0.300398117312)*x[0]+(-0.0197102583755)*x[1]**o+(-0.189780116752)*x[1]
-        arg[2,1,1]=(0.406291235871)*x[0]**o+(-0.763190166909)*x[0]+(-0.219957648446)*x[1]**o+(-0.928990138166)*x[1]
-        arg[3,0,0]=(0.947321725555)*x[0]**o+(0.35310915009)*x[0]+(0.436067723051)*x[1]**o+(-0.86339979781)*x[1]
-        arg[3,0,1]=(0.349458398624)*x[0]**o+(-0.139435138128)*x[0]+(-0.239809689531)*x[1]**o+(-0.0600998666403)*x[1]
-        arg[3,1,0]=(-0.630539588121)*x[0]**o+(-0.700765237169)*x[0]+(-0.333988786061)*x[1]**o+(-0.125401172016)*x[1]
-        arg[3,1,1]=(0.726389530806)*x[0]**o+(-0.691681620304)*x[0]+(0.241060086313)*x[1]**o+(-0.0970053499082)*x[1]
-        arg[4,0,0]=(-0.798548958727)*x[0]**o+(0.429037250139)*x[0]+(0.598115431903)*x[1]**o+(-0.688464532796)*x[1]
-        arg[4,0,1]=(0.698302852699)*x[0]**o+(0.36852807703)*x[0]+(-0.570086427187)*x[1]**o+(0.110387807246)*x[1]
-        arg[4,1,0]=(0.295729624355)*x[0]**o+(0.247060092718)*x[0]+(-0.874774487091)*x[1]**o+(-0.40111840264)*x[1]
-        arg[4,1,1]=(-0.773206505432)*x[0]**o+(-0.238827976714)*x[0]+(0.994288595399)*x[1]**o+(-0.6429945796)*x[1]
-        arg[5,0,0]=(-0.398445578383)*x[0]**o+(-0.893518494161)*x[0]+(-0.855543638814)*x[1]**o+(0.93304149836)*x[1]
-        arg[5,0,1]=(-0.811797150327)*x[0]**o+(0.0702614194127)*x[0]+(-0.0906132870911)*x[1]**o+(-0.944409144857)*x[1]
-        arg[5,1,0]=(0.710407361984)*x[0]**o+(-0.854493576437)*x[0]+(-0.354683789897)*x[1]**o+(-0.896605671415)*x[1]
-        arg[5,1,1]=(0.0668604398168)*x[0]**o+(0.464597275769)*x[0]+(-0.683756009627)*x[1]**o+(-0.368806656344)*x[1]
-        ref[0,0,0]=(0.88752640419)*x_ref[0]**o+(-0.432514405615)*x_ref[0]+(0.714823891809)*x_ref[1]**o+(0.697307667986)*x_ref[1]
-        ref[0,0,1]=(0.738741506554)*x_ref[0]**o+(0.188618518993)*x_ref[0]+(-0.482898810269)*x_ref[1]**o+(-0.914123176195)*x_ref[1]
-        ref[0,1,0]=(0.863872888691)*x_ref[0]**o+(0.74507667202)*x_ref[0]+(0.363690250942)*x_ref[1]**o+(0.578470064401)*x_ref[1]
-        ref[0,1,1]=(-0.764594250812)*x_ref[0]**o+(0.692105995894)*x_ref[0]+(-0.950074761486)*x_ref[1]**o+(-0.229643756622)*x_ref[1]
-        ref[1,0,0]=(-0.514123807377)*x_ref[0]**o+(-0.770729480038)*x_ref[0]+(-0.0503641588682)*x_ref[1]**o+(-0.334340604627)*x_ref[1]
-        ref[1,0,1]=(-0.753427043851)*x_ref[0]**o+(0.482153344254)*x_ref[0]+(0.00162169870171)*x_ref[1]**o+(-0.877830413948)*x_ref[1]
-        ref[1,1,0]=(0.603963041861)*x_ref[0]**o+(-0.545048115282)*x_ref[0]+(0.464500827027)*x_ref[1]**o+(-0.527556750287)*x_ref[1]
-        ref[1,1,1]=(0.753201247064)*x_ref[0]**o+(-0.99039225613)*x_ref[0]+(-0.787959315932)*x_ref[1]**o+(-0.918878072132)*x_ref[1]
-        ref[2,0,0]=(0.254002467345)*x_ref[0]**o+(-0.918196533244)*x_ref[0]+(-0.178408279918)*x_ref[1]**o+(0.14954396814)*x_ref[1]
-        ref[2,0,1]=(0.449025666157)*x_ref[0]**o+(-0.854430018688)*x_ref[0]+(0.0393762923755)*x_ref[1]**o+(0.576680446192)*x_ref[1]
-        ref[2,1,0]=(-0.252429553053)*x_ref[0]**o+(-0.300398117312)*x_ref[0]+(-0.0197102583755)*x_ref[1]**o+(-0.189780116752)*x_ref[1]
-        ref[2,1,1]=(0.406291235871)*x_ref[0]**o+(-0.763190166909)*x_ref[0]+(-0.219957648446)*x_ref[1]**o+(-0.928990138166)*x_ref[1]
-        ref[3,0,0]=(0.947321725555)*x_ref[0]**o+(0.35310915009)*x_ref[0]+(0.436067723051)*x_ref[1]**o+(-0.86339979781)*x_ref[1]
-        ref[3,0,1]=(0.349458398624)*x_ref[0]**o+(-0.139435138128)*x_ref[0]+(-0.239809689531)*x_ref[1]**o+(-0.0600998666403)*x_ref[1]
-        ref[3,1,0]=(-0.630539588121)*x_ref[0]**o+(-0.700765237169)*x_ref[0]+(-0.333988786061)*x_ref[1]**o+(-0.125401172016)*x_ref[1]
-        ref[3,1,1]=(0.726389530806)*x_ref[0]**o+(-0.691681620304)*x_ref[0]+(0.241060086313)*x_ref[1]**o+(-0.0970053499082)*x_ref[1]
-        ref[4,0,0]=(-0.798548958727)*x_ref[0]**o+(0.429037250139)*x_ref[0]+(0.598115431903)*x_ref[1]**o+(-0.688464532796)*x_ref[1]
-        ref[4,0,1]=(0.698302852699)*x_ref[0]**o+(0.36852807703)*x_ref[0]+(-0.570086427187)*x_ref[1]**o+(0.110387807246)*x_ref[1]
-        ref[4,1,0]=(0.295729624355)*x_ref[0]**o+(0.247060092718)*x_ref[0]+(-0.874774487091)*x_ref[1]**o+(-0.40111840264)*x_ref[1]
-        ref[4,1,1]=(-0.773206505432)*x_ref[0]**o+(-0.238827976714)*x_ref[0]+(0.994288595399)*x_ref[1]**o+(-0.6429945796)*x_ref[1]
-        ref[5,0,0]=(-0.398445578383)*x_ref[0]**o+(-0.893518494161)*x_ref[0]+(-0.855543638814)*x_ref[1]**o+(0.93304149836)*x_ref[1]
-        ref[5,0,1]=(-0.811797150327)*x_ref[0]**o+(0.0702614194127)*x_ref[0]+(-0.0906132870911)*x_ref[1]**o+(-0.944409144857)*x_ref[1]
-        ref[5,1,0]=(0.710407361984)*x_ref[0]**o+(-0.854493576437)*x_ref[0]+(-0.354683789897)*x_ref[1]**o+(-0.896605671415)*x_ref[1]
-        ref[5,1,1]=(0.0668604398168)*x_ref[0]**o+(0.464597275769)*x_ref[0]+(-0.683756009627)*x_ref[1]**o+(-0.368806656344)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.0873708254613)*x[0]**o+(-0.843989447866)*x[0]+(0.44751871924)*x[1]**o+(0.56511771844)*x[1]+(0.367414341304)*x[2]**o+(-0.147729223167)*x[2]
-        arg[0,0,1]=(0.00752707306425)*x[0]**o+(0.819213438452)*x[0]+(0.14826826627)*x[1]**o+(-0.169362794728)*x[1]+(0.51736237082)*x[2]**o+(0.832746819884)*x[2]
-        arg[0,1,0]=(0.607746431545)*x[0]**o+(0.253170100132)*x[0]+(-0.992132084299)*x[1]**o+(0.353865695431)*x[1]+(-0.787229685473)*x[2]**o+(0.86154695401)*x[2]
-        arg[0,1,1]=(0.563636829468)*x[0]**o+(0.459627185677)*x[0]+(-0.511957702356)*x[1]**o+(0.309573033639)*x[1]+(0.806861185555)*x[2]**o+(0.182177897377)*x[2]
-        arg[1,0,0]=(0.600850271814)*x[0]**o+(0.440922206975)*x[0]+(0.0307377466119)*x[1]**o+(-0.419096719454)*x[1]+(0.979284456332)*x[2]**o+(-0.00240732351601)*x[2]
-        arg[1,0,1]=(0.51273517393)*x[0]**o+(-0.947643736857)*x[0]+(0.272403256871)*x[1]**o+(0.0119584891405)*x[1]+(-0.290604573286)*x[2]**o+(0.822291254588)*x[2]
-        arg[1,1,0]=(-0.201909330605)*x[0]**o+(-0.560221198146)*x[0]+(0.564306911695)*x[1]**o+(-0.936933580593)*x[1]+(-0.41391834592)*x[2]**o+(0.133244793725)*x[2]
-        arg[1,1,1]=(0.13318221571)*x[0]**o+(-0.565278280388)*x[0]+(0.677613822728)*x[1]**o+(-0.386612668638)*x[1]+(0.207570026134)*x[2]**o+(0.798362457061)*x[2]
-        arg[2,0,0]=(-0.3777906845)*x[0]**o+(-0.285455928514)*x[0]+(-0.0901885959293)*x[1]**o+(-0.385922214051)*x[1]+(0.322566508003)*x[2]**o+(0.171191301702)*x[2]
-        arg[2,0,1]=(-0.113954650916)*x[0]**o+(-0.373563461907)*x[0]+(0.73321196284)*x[1]**o+(0.535150793249)*x[1]+(-0.736944901672)*x[2]**o+(0.86133553525)*x[2]
-        arg[2,1,0]=(-0.724228484035)*x[0]**o+(0.310971627294)*x[0]+(-0.497468717028)*x[1]**o+(0.467315341957)*x[1]+(-0.598941984951)*x[2]**o+(0.990367400534)*x[2]
-        arg[2,1,1]=(0.594502107684)*x[0]**o+(0.261477996581)*x[0]+(0.738413631986)*x[1]**o+(0.363468523272)*x[1]+(-0.945845846052)*x[2]**o+(0.281144164925)*x[2]
-        arg[3,0,0]=(0.804174935673)*x[0]**o+(-0.633954348085)*x[0]+(-0.953193492156)*x[1]**o+(0.632681376482)*x[1]+(-0.409900341362)*x[2]**o+(0.951988363964)*x[2]
-        arg[3,0,1]=(-0.469895421121)*x[0]**o+(0.666115304582)*x[0]+(0.676351738247)*x[1]**o+(-0.0738256360284)*x[1]+(0.34976675523)*x[2]**o+(-0.561058490613)*x[2]
-        arg[3,1,0]=(-0.999916478236)*x[0]**o+(-0.362871459365)*x[0]+(0.645604661917)*x[1]**o+(0.215878330855)*x[1]+(-0.0561173996823)*x[2]**o+(0.272143302204)*x[2]
-        arg[3,1,1]=(0.233461828376)*x[0]**o+(-0.110673705352)*x[0]+(0.699710673197)*x[1]**o+(-0.628805264645)*x[1]+(0.677467640352)*x[2]**o+(-0.156224522726)*x[2]
-        arg[4,0,0]=(0.180468931719)*x[0]**o+(0.299451524372)*x[0]+(-0.677131137371)*x[1]**o+(-0.422802649252)*x[1]+(0.237349200367)*x[2]**o+(0.739758623757)*x[2]
-        arg[4,0,1]=(0.22209981155)*x[0]**o+(-0.226751058136)*x[0]+(-0.0345697170216)*x[1]**o+(0.265795819906)*x[1]+(0.542547943322)*x[2]**o+(0.785610668157)*x[2]
-        arg[4,1,0]=(-0.520898604151)*x[0]**o+(-0.84307105084)*x[0]+(0.818061645146)*x[1]**o+(-0.173710357379)*x[1]+(0.344023171063)*x[2]**o+(0.194662166094)*x[2]
-        arg[4,1,1]=(-0.288466404824)*x[0]**o+(-0.891856587908)*x[0]+(0.378329571068)*x[1]**o+(0.437919935526)*x[1]+(-0.630733422962)*x[2]**o+(0.518444630882)*x[2]
-        arg[5,0,0]=(0.00978685202942)*x[0]**o+(-0.474443494209)*x[0]+(-0.509964215112)*x[1]**o+(0.341199671453)*x[1]+(-0.459333887251)*x[2]**o+(0.491961590667)*x[2]
-        arg[5,0,1]=(-0.899850325159)*x[0]**o+(-0.191369137667)*x[0]+(0.18882430985)*x[1]**o+(-0.185214597442)*x[1]+(-0.967187797553)*x[2]**o+(0.366127839986)*x[2]
-        arg[5,1,0]=(0.428007441668)*x[0]**o+(0.920828656579)*x[0]+(-0.298863178441)*x[1]**o+(-0.226020983335)*x[1]+(-0.01907141259)*x[2]**o+(-0.359698040557)*x[2]
-        arg[5,1,1]=(0.980673633441)*x[0]**o+(0.362357489872)*x[0]+(0.825233899658)*x[1]**o+(0.846433827949)*x[1]+(-0.870197174533)*x[2]**o+(0.621884204716)*x[2]
-        ref[0,0,0]=(-0.0873708254613)*x_ref[0]**o+(-0.843989447866)*x_ref[0]+(0.44751871924)*x_ref[1]**o+(0.56511771844)*x_ref[1]+(0.367414341304)*x_ref[2]**o+(-0.147729223167)*x_ref[2]
-        ref[0,0,1]=(0.00752707306425)*x_ref[0]**o+(0.819213438452)*x_ref[0]+(0.14826826627)*x_ref[1]**o+(-0.169362794728)*x_ref[1]+(0.51736237082)*x_ref[2]**o+(0.832746819884)*x_ref[2]
-        ref[0,1,0]=(0.607746431545)*x_ref[0]**o+(0.253170100132)*x_ref[0]+(-0.992132084299)*x_ref[1]**o+(0.353865695431)*x_ref[1]+(-0.787229685473)*x_ref[2]**o+(0.86154695401)*x_ref[2]
-        ref[0,1,1]=(0.563636829468)*x_ref[0]**o+(0.459627185677)*x_ref[0]+(-0.511957702356)*x_ref[1]**o+(0.309573033639)*x_ref[1]+(0.806861185555)*x_ref[2]**o+(0.182177897377)*x_ref[2]
-        ref[1,0,0]=(0.600850271814)*x_ref[0]**o+(0.440922206975)*x_ref[0]+(0.0307377466119)*x_ref[1]**o+(-0.419096719454)*x_ref[1]+(0.979284456332)*x_ref[2]**o+(-0.00240732351601)*x_ref[2]
-        ref[1,0,1]=(0.51273517393)*x_ref[0]**o+(-0.947643736857)*x_ref[0]+(0.272403256871)*x_ref[1]**o+(0.0119584891405)*x_ref[1]+(-0.290604573286)*x_ref[2]**o+(0.822291254588)*x_ref[2]
-        ref[1,1,0]=(-0.201909330605)*x_ref[0]**o+(-0.560221198146)*x_ref[0]+(0.564306911695)*x_ref[1]**o+(-0.936933580593)*x_ref[1]+(-0.41391834592)*x_ref[2]**o+(0.133244793725)*x_ref[2]
-        ref[1,1,1]=(0.13318221571)*x_ref[0]**o+(-0.565278280388)*x_ref[0]+(0.677613822728)*x_ref[1]**o+(-0.386612668638)*x_ref[1]+(0.207570026134)*x_ref[2]**o+(0.798362457061)*x_ref[2]
-        ref[2,0,0]=(-0.3777906845)*x_ref[0]**o+(-0.285455928514)*x_ref[0]+(-0.0901885959293)*x_ref[1]**o+(-0.385922214051)*x_ref[1]+(0.322566508003)*x_ref[2]**o+(0.171191301702)*x_ref[2]
-        ref[2,0,1]=(-0.113954650916)*x_ref[0]**o+(-0.373563461907)*x_ref[0]+(0.73321196284)*x_ref[1]**o+(0.535150793249)*x_ref[1]+(-0.736944901672)*x_ref[2]**o+(0.86133553525)*x_ref[2]
-        ref[2,1,0]=(-0.724228484035)*x_ref[0]**o+(0.310971627294)*x_ref[0]+(-0.497468717028)*x_ref[1]**o+(0.467315341957)*x_ref[1]+(-0.598941984951)*x_ref[2]**o+(0.990367400534)*x_ref[2]
-        ref[2,1,1]=(0.594502107684)*x_ref[0]**o+(0.261477996581)*x_ref[0]+(0.738413631986)*x_ref[1]**o+(0.363468523272)*x_ref[1]+(-0.945845846052)*x_ref[2]**o+(0.281144164925)*x_ref[2]
-        ref[3,0,0]=(0.804174935673)*x_ref[0]**o+(-0.633954348085)*x_ref[0]+(-0.953193492156)*x_ref[1]**o+(0.632681376482)*x_ref[1]+(-0.409900341362)*x_ref[2]**o+(0.951988363964)*x_ref[2]
-        ref[3,0,1]=(-0.469895421121)*x_ref[0]**o+(0.666115304582)*x_ref[0]+(0.676351738247)*x_ref[1]**o+(-0.0738256360284)*x_ref[1]+(0.34976675523)*x_ref[2]**o+(-0.561058490613)*x_ref[2]
-        ref[3,1,0]=(-0.999916478236)*x_ref[0]**o+(-0.362871459365)*x_ref[0]+(0.645604661917)*x_ref[1]**o+(0.215878330855)*x_ref[1]+(-0.0561173996823)*x_ref[2]**o+(0.272143302204)*x_ref[2]
-        ref[3,1,1]=(0.233461828376)*x_ref[0]**o+(-0.110673705352)*x_ref[0]+(0.699710673197)*x_ref[1]**o+(-0.628805264645)*x_ref[1]+(0.677467640352)*x_ref[2]**o+(-0.156224522726)*x_ref[2]
-        ref[4,0,0]=(0.180468931719)*x_ref[0]**o+(0.299451524372)*x_ref[0]+(-0.677131137371)*x_ref[1]**o+(-0.422802649252)*x_ref[1]+(0.237349200367)*x_ref[2]**o+(0.739758623757)*x_ref[2]
-        ref[4,0,1]=(0.22209981155)*x_ref[0]**o+(-0.226751058136)*x_ref[0]+(-0.0345697170216)*x_ref[1]**o+(0.265795819906)*x_ref[1]+(0.542547943322)*x_ref[2]**o+(0.785610668157)*x_ref[2]
-        ref[4,1,0]=(-0.520898604151)*x_ref[0]**o+(-0.84307105084)*x_ref[0]+(0.818061645146)*x_ref[1]**o+(-0.173710357379)*x_ref[1]+(0.344023171063)*x_ref[2]**o+(0.194662166094)*x_ref[2]
-        ref[4,1,1]=(-0.288466404824)*x_ref[0]**o+(-0.891856587908)*x_ref[0]+(0.378329571068)*x_ref[1]**o+(0.437919935526)*x_ref[1]+(-0.630733422962)*x_ref[2]**o+(0.518444630882)*x_ref[2]
-        ref[5,0,0]=(0.00978685202942)*x_ref[0]**o+(-0.474443494209)*x_ref[0]+(-0.509964215112)*x_ref[1]**o+(0.341199671453)*x_ref[1]+(-0.459333887251)*x_ref[2]**o+(0.491961590667)*x_ref[2]
-        ref[5,0,1]=(-0.899850325159)*x_ref[0]**o+(-0.191369137667)*x_ref[0]+(0.18882430985)*x_ref[1]**o+(-0.185214597442)*x_ref[1]+(-0.967187797553)*x_ref[2]**o+(0.366127839986)*x_ref[2]
-        ref[5,1,0]=(0.428007441668)*x_ref[0]**o+(0.920828656579)*x_ref[0]+(-0.298863178441)*x_ref[1]**o+(-0.226020983335)*x_ref[1]+(-0.01907141259)*x_ref[2]**o+(-0.359698040557)*x_ref[2]
-        ref[5,1,1]=(0.980673633441)*x_ref[0]**o+(0.362357489872)*x_ref[0]+(0.825233899658)*x_ref[1]**o+(0.846433827949)*x_ref[1]+(-0.870197174533)*x_ref[2]**o+(0.621884204716)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.93572957134)*x[0]**o+(-0.878081515023)*x[0]+(0.821839395118)*x[1]**o+(-0.088026044081)*x[1]
-        arg[0,0,0,1]=(-0.00393438000839)*x[0]**o+(-0.180693225971)*x[0]+(0.192781914487)*x[1]**o+(-0.561366977374)*x[1]
-        arg[0,0,1,0]=(0.116028558326)*x[0]**o+(-0.47739282219)*x[0]+(0.97806148353)*x[1]**o+(0.660972051388)*x[1]
-        arg[0,0,1,1]=(0.092683552469)*x[0]**o+(0.22083599745)*x[0]+(-0.423073290439)*x[1]**o+(-0.0789522599045)*x[1]
-        arg[0,0,2,0]=(0.140023403084)*x[0]**o+(-0.927034796519)*x[0]+(0.0987957525564)*x[1]**o+(0.0703695028562)*x[1]
-        arg[0,0,2,1]=(-0.00485147064392)*x[0]**o+(-0.649679595932)*x[0]+(0.503435626816)*x[1]**o+(0.393293792881)*x[1]
-        arg[0,1,0,0]=(-0.753383897772)*x[0]**o+(-0.988499439357)*x[0]+(-0.651037417175)*x[1]**o+(0.45184892046)*x[1]
-        arg[0,1,0,1]=(0.0120892569605)*x[0]**o+(0.52287896209)*x[0]+(0.103256695817)*x[1]**o+(-0.0244835681092)*x[1]
-        arg[0,1,1,0]=(-0.0949239075135)*x[0]**o+(0.835062318231)*x[0]+(-0.0522981103769)*x[1]**o+(0.60020994838)*x[1]
-        arg[0,1,1,1]=(0.139896941482)*x[0]**o+(0.409042945999)*x[0]+(0.10019215394)*x[1]**o+(-0.312224123017)*x[1]
-        arg[0,1,2,0]=(-0.892437964342)*x[0]**o+(0.0828807279746)*x[0]+(0.777811646235)*x[1]**o+(-0.96509471481)*x[1]
-        arg[0,1,2,1]=(-0.397341226148)*x[0]**o+(0.102987581336)*x[0]+(-0.69165111598)*x[1]**o+(0.743298211061)*x[1]
-        arg[0,2,0,0]=(-0.300129864031)*x[0]**o+(-0.418981381232)*x[0]+(0.624854922555)*x[1]**o+(0.892651746561)*x[1]
-        arg[0,2,0,1]=(-0.511463603881)*x[0]**o+(-0.808468332238)*x[0]+(-0.342755248919)*x[1]**o+(0.357985875808)*x[1]
-        arg[0,2,1,0]=(-0.269520452932)*x[0]**o+(0.869553937081)*x[0]+(-0.183222122614)*x[1]**o+(-0.135280721586)*x[1]
-        arg[0,2,1,1]=(0.0396712123969)*x[0]**o+(0.344314072793)*x[0]+(0.644676507168)*x[1]**o+(-0.0799551435053)*x[1]
-        arg[0,2,2,0]=(0.302628743334)*x[0]**o+(-0.59557047376)*x[0]+(-0.277654790212)*x[1]**o+(0.0299035042863)*x[1]
-        arg[0,2,2,1]=(0.805296568248)*x[0]**o+(0.726404711154)*x[0]+(0.0728356962577)*x[1]**o+(0.199997237962)*x[1]
-        arg[0,3,0,0]=(-0.292658800952)*x[0]**o+(-0.40080106651)*x[0]+(0.844109590553)*x[1]**o+(-0.339364790362)*x[1]
-        arg[0,3,0,1]=(-0.621465058894)*x[0]**o+(-0.376804350545)*x[0]+(0.745038406103)*x[1]**o+(-0.281482724757)*x[1]
-        arg[0,3,1,0]=(0.00625816347702)*x[0]**o+(0.392750189511)*x[0]+(-0.232258708605)*x[1]**o+(-0.634552067635)*x[1]
-        arg[0,3,1,1]=(-0.0893109545391)*x[0]**o+(-0.735678058768)*x[0]+(-0.603248350212)*x[1]**o+(-0.664366286468)*x[1]
-        arg[0,3,2,0]=(-0.0539114688775)*x[0]**o+(-0.110100592496)*x[0]+(-0.700496078261)*x[1]**o+(0.203311460549)*x[1]
-        arg[0,3,2,1]=(-0.554691350426)*x[0]**o+(-0.255001039659)*x[0]+(0.567977217289)*x[1]**o+(0.61993007447)*x[1]
-        arg[0,4,0,0]=(-0.12193490862)*x[0]**o+(0.731139340661)*x[0]+(-0.321971724057)*x[1]**o+(0.741215588897)*x[1]
-        arg[0,4,0,1]=(-0.394743164913)*x[0]**o+(-0.602249917929)*x[0]+(0.27675734517)*x[1]**o+(-0.968806169573)*x[1]
-        arg[0,4,1,0]=(-0.629331232169)*x[0]**o+(0.687483125805)*x[0]+(0.633698693186)*x[1]**o+(0.837564332901)*x[1]
-        arg[0,4,1,1]=(0.0470601891829)*x[0]**o+(-0.365490813497)*x[0]+(-0.162532786979)*x[1]**o+(0.504146804122)*x[1]
-        arg[0,4,2,0]=(0.193790444091)*x[0]**o+(0.742132840869)*x[0]+(-0.871677496589)*x[1]**o+(0.492817750307)*x[1]
-        arg[0,4,2,1]=(0.741218732478)*x[0]**o+(-0.746973604492)*x[0]+(-0.548073707926)*x[1]**o+(-0.42258185128)*x[1]
-        arg[1,0,0,0]=(0.580989627459)*x[0]**o+(-0.498423525574)*x[0]+(-0.349651580594)*x[1]**o+(0.0193060779482)*x[1]
-        arg[1,0,0,1]=(0.398917011903)*x[0]**o+(-0.122064497238)*x[0]+(0.924654557299)*x[1]**o+(0.485284066068)*x[1]
-        arg[1,0,1,0]=(-0.985949382826)*x[0]**o+(-0.0188384874977)*x[0]+(0.177995429697)*x[1]**o+(0.967727833143)*x[1]
-        arg[1,0,1,1]=(0.920799980503)*x[0]**o+(-0.749281119074)*x[0]+(-0.628411322607)*x[1]**o+(-0.446396361734)*x[1]
-        arg[1,0,2,0]=(0.752863123667)*x[0]**o+(0.112427175329)*x[0]+(0.975568251269)*x[1]**o+(0.316938392669)*x[1]
-        arg[1,0,2,1]=(0.798409861933)*x[0]**o+(-0.145715624761)*x[0]+(-0.847813831553)*x[1]**o+(0.302999756348)*x[1]
-        arg[1,1,0,0]=(0.897029838502)*x[0]**o+(-0.540852276529)*x[0]+(-0.541450963121)*x[1]**o+(-0.118819043917)*x[1]
-        arg[1,1,0,1]=(-0.616797542123)*x[0]**o+(-0.139394144428)*x[0]+(-0.480348413917)*x[1]**o+(0.500244829288)*x[1]
-        arg[1,1,1,0]=(-0.960388730531)*x[0]**o+(0.87391147728)*x[0]+(0.0128673975991)*x[1]**o+(0.444341296582)*x[1]
-        arg[1,1,1,1]=(0.136810869097)*x[0]**o+(-0.544756866447)*x[0]+(-0.198052789907)*x[1]**o+(-0.536732583929)*x[1]
-        arg[1,1,2,0]=(-0.808981135979)*x[0]**o+(-0.122088197438)*x[0]+(-0.363958821187)*x[1]**o+(-0.521614066151)*x[1]
-        arg[1,1,2,1]=(0.299382605072)*x[0]**o+(0.143397060894)*x[0]+(-0.223044874711)*x[1]**o+(-0.04723866032)*x[1]
-        arg[1,2,0,0]=(-0.568967551455)*x[0]**o+(0.750777908696)*x[0]+(0.203117458853)*x[1]**o+(-0.0797168995572)*x[1]
-        arg[1,2,0,1]=(0.0439147552635)*x[0]**o+(-0.0746749889653)*x[0]+(0.192885940929)*x[1]**o+(0.794090802345)*x[1]
-        arg[1,2,1,0]=(0.137177876023)*x[0]**o+(0.625847668003)*x[0]+(0.252761858157)*x[1]**o+(0.496512978117)*x[1]
-        arg[1,2,1,1]=(0.475218888846)*x[0]**o+(-0.286926184073)*x[0]+(0.551427803487)*x[1]**o+(0.782373661286)*x[1]
-        arg[1,2,2,0]=(0.903004502545)*x[0]**o+(-0.262952251654)*x[0]+(0.110351860812)*x[1]**o+(-0.685355934696)*x[1]
-        arg[1,2,2,1]=(-0.157457317404)*x[0]**o+(-0.243850623177)*x[0]+(0.28853283432)*x[1]**o+(0.612508908614)*x[1]
-        arg[1,3,0,0]=(-0.741890002973)*x[0]**o+(-0.118262424825)*x[0]+(0.567100734646)*x[1]**o+(0.301557125811)*x[1]
-        arg[1,3,0,1]=(-0.00745396583928)*x[0]**o+(-0.00558491344276)*x[0]+(-0.967132370197)*x[1]**o+(-0.61737594402)*x[1]
-        arg[1,3,1,0]=(0.0767961523966)*x[0]**o+(0.341952000996)*x[0]+(0.762617832019)*x[1]**o+(-0.38337284713)*x[1]
-        arg[1,3,1,1]=(0.32265018902)*x[0]**o+(-0.352521736206)*x[0]+(-0.0119143186529)*x[1]**o+(-0.64727561829)*x[1]
-        arg[1,3,2,0]=(0.627690584587)*x[0]**o+(0.0993819822193)*x[0]+(-0.189363448841)*x[1]**o+(0.49004001194)*x[1]
-        arg[1,3,2,1]=(-0.657836476156)*x[0]**o+(0.708970470136)*x[0]+(0.252190020576)*x[1]**o+(-0.481214196298)*x[1]
-        arg[1,4,0,0]=(0.0837563164179)*x[0]**o+(0.741536525079)*x[0]+(0.645543094286)*x[1]**o+(0.62358090815)*x[1]
-        arg[1,4,0,1]=(0.262043398371)*x[0]**o+(-0.47794750936)*x[0]+(0.93086244965)*x[1]**o+(-0.670399062677)*x[1]
-        arg[1,4,1,0]=(-0.76634902923)*x[0]**o+(-0.809846143928)*x[0]+(0.639099549305)*x[1]**o+(0.793524639236)*x[1]
-        arg[1,4,1,1]=(0.814737503957)*x[0]**o+(0.775593374042)*x[0]+(0.240976904111)*x[1]**o+(0.2352421356)*x[1]
-        arg[1,4,2,0]=(0.519210584047)*x[0]**o+(-0.702579589691)*x[0]+(-0.450156317853)*x[1]**o+(0.588864692581)*x[1]
-        arg[1,4,2,1]=(-0.927751546037)*x[0]**o+(-0.239737576019)*x[0]+(-0.527658440447)*x[1]**o+(0.79623440559)*x[1]
-        arg[2,0,0,0]=(0.719144336419)*x[0]**o+(0.916780231277)*x[0]+(0.279073450277)*x[1]**o+(-0.0130671321167)*x[1]
-        arg[2,0,0,1]=(-0.556604998962)*x[0]**o+(-0.661580370137)*x[0]+(0.980704664791)*x[1]**o+(0.935843251131)*x[1]
-        arg[2,0,1,0]=(0.85501679753)*x[0]**o+(-0.908342467889)*x[0]+(0.969030151294)*x[1]**o+(0.534192961922)*x[1]
-        arg[2,0,1,1]=(0.527672385529)*x[0]**o+(0.997699955667)*x[0]+(-0.388249629327)*x[1]**o+(-0.714956937512)*x[1]
-        arg[2,0,2,0]=(-0.629149810667)*x[0]**o+(-0.0515018376692)*x[0]+(-0.80355991702)*x[1]**o+(0.235999988886)*x[1]
-        arg[2,0,2,1]=(0.960715934156)*x[0]**o+(-0.782787305497)*x[0]+(-0.309348231959)*x[1]**o+(0.854911294717)*x[1]
-        arg[2,1,0,0]=(-0.560749125074)*x[0]**o+(-0.120515615757)*x[0]+(0.055090634431)*x[1]**o+(-0.539205949358)*x[1]
-        arg[2,1,0,1]=(-0.762113417295)*x[0]**o+(-0.207196980376)*x[0]+(0.904541245494)*x[1]**o+(0.320359459939)*x[1]
-        arg[2,1,1,0]=(-0.272627586486)*x[0]**o+(-0.885987982522)*x[0]+(0.641737808216)*x[1]**o+(0.358390367373)*x[1]
-        arg[2,1,1,1]=(-0.847502563761)*x[0]**o+(-0.430298277492)*x[0]+(-0.869043300185)*x[1]**o+(0.584700145915)*x[1]
-        arg[2,1,2,0]=(0.497688368946)*x[0]**o+(-0.14413770704)*x[0]+(-0.82002941888)*x[1]**o+(0.573569419279)*x[1]
-        arg[2,1,2,1]=(0.959549623603)*x[0]**o+(0.881196513588)*x[0]+(-0.202951096266)*x[1]**o+(-9.87983182765e-05)*x[1]
-        arg[2,2,0,0]=(0.0811393810501)*x[0]**o+(-0.853555165896)*x[0]+(0.0259257246335)*x[1]**o+(0.638575306959)*x[1]
-        arg[2,2,0,1]=(-0.525990031379)*x[0]**o+(0.11235160765)*x[0]+(-0.502853879455)*x[1]**o+(0.414066683507)*x[1]
-        arg[2,2,1,0]=(-0.533919716834)*x[0]**o+(-0.773411100656)*x[0]+(0.311424028491)*x[1]**o+(0.332733301377)*x[1]
-        arg[2,2,1,1]=(0.280548593462)*x[0]**o+(-0.0747640762104)*x[0]+(-0.7110232877)*x[1]**o+(-0.178672817441)*x[1]
-        arg[2,2,2,0]=(0.445025926846)*x[0]**o+(-0.669782903005)*x[0]+(0.236610411793)*x[1]**o+(0.437836936476)*x[1]
-        arg[2,2,2,1]=(-0.503761305098)*x[0]**o+(-0.889922659865)*x[0]+(-0.0767256016402)*x[1]**o+(-0.614874217835)*x[1]
-        arg[2,3,0,0]=(-0.041960855672)*x[0]**o+(-0.593486242764)*x[0]+(0.344751892525)*x[1]**o+(-0.131268873786)*x[1]
-        arg[2,3,0,1]=(-0.192704843083)*x[0]**o+(0.325356381696)*x[0]+(-0.235690651937)*x[1]**o+(0.59113535617)*x[1]
-        arg[2,3,1,0]=(-0.0794745628024)*x[0]**o+(0.7996737586)*x[0]+(-0.324970505375)*x[1]**o+(-0.14920403468)*x[1]
-        arg[2,3,1,1]=(0.31997432673)*x[0]**o+(-0.571739807799)*x[0]+(0.517683480263)*x[1]**o+(-0.250680741704)*x[1]
-        arg[2,3,2,0]=(-0.379114277883)*x[0]**o+(0.953285017352)*x[0]+(-0.701111847548)*x[1]**o+(-0.354199942528)*x[1]
-        arg[2,3,2,1]=(0.492245629486)*x[0]**o+(-0.299380102293)*x[0]+(-0.126371826833)*x[1]**o+(0.933664060647)*x[1]
-        arg[2,4,0,0]=(0.714822159533)*x[0]**o+(0.359430380478)*x[0]+(-0.691610768506)*x[1]**o+(0.414061853203)*x[1]
-        arg[2,4,0,1]=(0.412799253275)*x[0]**o+(0.862905533148)*x[0]+(-0.0507440946561)*x[1]**o+(0.779012369976)*x[1]
-        arg[2,4,1,0]=(-0.981179053034)*x[0]**o+(0.984777005573)*x[0]+(0.715584788452)*x[1]**o+(0.920666888724)*x[1]
-        arg[2,4,1,1]=(-0.0287775685032)*x[0]**o+(0.617592345344)*x[0]+(-0.767451297794)*x[1]**o+(0.95828976091)*x[1]
-        arg[2,4,2,0]=(0.905037473705)*x[0]**o+(-0.706987158021)*x[0]+(0.535436652493)*x[1]**o+(-0.891712664249)*x[1]
-        arg[2,4,2,1]=(-0.818709474925)*x[0]**o+(-0.0223479273553)*x[0]+(-0.370644568884)*x[1]**o+(0.286468739105)*x[1]
-        arg[3,0,0,0]=(0.310461949876)*x[0]**o+(0.770193446516)*x[0]+(-0.0858335164699)*x[1]**o+(0.12572608122)*x[1]
-        arg[3,0,0,1]=(-0.781332422249)*x[0]**o+(-0.238368527872)*x[0]+(-0.449272256582)*x[1]**o+(-0.645638738212)*x[1]
-        arg[3,0,1,0]=(-0.91143447678)*x[0]**o+(-0.885131081008)*x[0]+(-0.253833463581)*x[1]**o+(0.051439649459)*x[1]
-        arg[3,0,1,1]=(0.447730169203)*x[0]**o+(0.980354452325)*x[0]+(-0.0484566141047)*x[1]**o+(0.443407604362)*x[1]
-        arg[3,0,2,0]=(-0.223975544426)*x[0]**o+(0.0141796274312)*x[0]+(0.664080206442)*x[1]**o+(0.193318634886)*x[1]
-        arg[3,0,2,1]=(-0.388901068755)*x[0]**o+(-0.632210208163)*x[0]+(0.567264328931)*x[1]**o+(-0.308710733281)*x[1]
-        arg[3,1,0,0]=(0.259562910069)*x[0]**o+(-0.315409720689)*x[0]+(0.999281841483)*x[1]**o+(0.695981779357)*x[1]
-        arg[3,1,0,1]=(0.627508253716)*x[0]**o+(-0.540950954632)*x[0]+(0.626209667445)*x[1]**o+(-0.920403595109)*x[1]
-        arg[3,1,1,0]=(0.750166528891)*x[0]**o+(-0.145494783124)*x[0]+(0.71048043416)*x[1]**o+(-0.0920505950401)*x[1]
-        arg[3,1,1,1]=(-0.755570630755)*x[0]**o+(-0.323456877629)*x[0]+(-0.0318418288689)*x[1]**o+(0.551823313307)*x[1]
-        arg[3,1,2,0]=(-0.301380276426)*x[0]**o+(-0.102899117196)*x[0]+(0.816857028902)*x[1]**o+(-0.571555621895)*x[1]
-        arg[3,1,2,1]=(-0.791148729922)*x[0]**o+(0.400286696027)*x[0]+(-0.17362002139)*x[1]**o+(0.431696064424)*x[1]
-        arg[3,2,0,0]=(0.241944451237)*x[0]**o+(-0.629401496412)*x[0]+(-0.00333636607647)*x[1]**o+(0.167334133677)*x[1]
-        arg[3,2,0,1]=(-0.300944831932)*x[0]**o+(0.358282773504)*x[0]+(0.759495661081)*x[1]**o+(-0.225250488484)*x[1]
-        arg[3,2,1,0]=(0.755950588768)*x[0]**o+(0.718423180013)*x[0]+(0.705150216505)*x[1]**o+(0.269283969196)*x[1]
-        arg[3,2,1,1]=(0.811064150458)*x[0]**o+(-0.67847842696)*x[0]+(-0.478091805711)*x[1]**o+(0.292774429011)*x[1]
-        arg[3,2,2,0]=(-0.307877253758)*x[0]**o+(-0.563961673764)*x[0]+(0.428322493356)*x[1]**o+(0.564230126489)*x[1]
-        arg[3,2,2,1]=(-0.623877056979)*x[0]**o+(-0.148337578412)*x[0]+(-0.910662605581)*x[1]**o+(-0.38603493572)*x[1]
-        arg[3,3,0,0]=(-0.826474270729)*x[0]**o+(0.977614689932)*x[0]+(-0.369824837717)*x[1]**o+(-0.985478011812)*x[1]
-        arg[3,3,0,1]=(-0.251252769561)*x[0]**o+(-0.296732765057)*x[0]+(-0.888899418995)*x[1]**o+(0.640313055734)*x[1]
-        arg[3,3,1,0]=(-0.189106218841)*x[0]**o+(-0.0441656339777)*x[0]+(0.368716219801)*x[1]**o+(-0.924144919367)*x[1]
-        arg[3,3,1,1]=(-0.525205981948)*x[0]**o+(-0.148352446593)*x[0]+(0.869212821652)*x[1]**o+(-0.575463559793)*x[1]
-        arg[3,3,2,0]=(0.668772663439)*x[0]**o+(0.4330630456)*x[0]+(-0.321158907274)*x[1]**o+(0.570853139693)*x[1]
-        arg[3,3,2,1]=(0.0236674031998)*x[0]**o+(-0.390106024651)*x[0]+(0.541717893494)*x[1]**o+(-0.144655705849)*x[1]
-        arg[3,4,0,0]=(0.971861188602)*x[0]**o+(-0.834463063474)*x[0]+(-0.419545662218)*x[1]**o+(-0.0387341522049)*x[1]
-        arg[3,4,0,1]=(0.226357589896)*x[0]**o+(0.305148895256)*x[0]+(0.00306527642431)*x[1]**o+(0.4715619746)*x[1]
-        arg[3,4,1,0]=(0.529602340964)*x[0]**o+(-0.482050910795)*x[0]+(0.964983911769)*x[1]**o+(0.524018220532)*x[1]
-        arg[3,4,1,1]=(0.940676158872)*x[0]**o+(0.547078925647)*x[0]+(-0.636907424453)*x[1]**o+(0.938262396281)*x[1]
-        arg[3,4,2,0]=(0.282512784255)*x[0]**o+(-0.556345478931)*x[0]+(0.651866614458)*x[1]**o+(0.8895132214)*x[1]
-        arg[3,4,2,1]=(0.905077434472)*x[0]**o+(0.595878819874)*x[0]+(0.416350660905)*x[1]**o+(0.100262997545)*x[1]
-        ref[0,0,0,0]=(-0.93572957134)*x_ref[0]**o+(-0.878081515023)*x_ref[0]+(0.821839395118)*x_ref[1]**o+(-0.088026044081)*x_ref[1]
-        ref[0,0,0,1]=(-0.00393438000839)*x_ref[0]**o+(-0.180693225971)*x_ref[0]+(0.192781914487)*x_ref[1]**o+(-0.561366977374)*x_ref[1]
-        ref[0,0,1,0]=(0.116028558326)*x_ref[0]**o+(-0.47739282219)*x_ref[0]+(0.97806148353)*x_ref[1]**o+(0.660972051388)*x_ref[1]
-        ref[0,0,1,1]=(0.092683552469)*x_ref[0]**o+(0.22083599745)*x_ref[0]+(-0.423073290439)*x_ref[1]**o+(-0.0789522599045)*x_ref[1]
-        ref[0,0,2,0]=(0.140023403084)*x_ref[0]**o+(-0.927034796519)*x_ref[0]+(0.0987957525564)*x_ref[1]**o+(0.0703695028562)*x_ref[1]
-        ref[0,0,2,1]=(-0.00485147064392)*x_ref[0]**o+(-0.649679595932)*x_ref[0]+(0.503435626816)*x_ref[1]**o+(0.393293792881)*x_ref[1]
-        ref[0,1,0,0]=(-0.753383897772)*x_ref[0]**o+(-0.988499439357)*x_ref[0]+(-0.651037417175)*x_ref[1]**o+(0.45184892046)*x_ref[1]
-        ref[0,1,0,1]=(0.0120892569605)*x_ref[0]**o+(0.52287896209)*x_ref[0]+(0.103256695817)*x_ref[1]**o+(-0.0244835681092)*x_ref[1]
-        ref[0,1,1,0]=(-0.0949239075135)*x_ref[0]**o+(0.835062318231)*x_ref[0]+(-0.0522981103769)*x_ref[1]**o+(0.60020994838)*x_ref[1]
-        ref[0,1,1,1]=(0.139896941482)*x_ref[0]**o+(0.409042945999)*x_ref[0]+(0.10019215394)*x_ref[1]**o+(-0.312224123017)*x_ref[1]
-        ref[0,1,2,0]=(-0.892437964342)*x_ref[0]**o+(0.0828807279746)*x_ref[0]+(0.777811646235)*x_ref[1]**o+(-0.96509471481)*x_ref[1]
-        ref[0,1,2,1]=(-0.397341226148)*x_ref[0]**o+(0.102987581336)*x_ref[0]+(-0.69165111598)*x_ref[1]**o+(0.743298211061)*x_ref[1]
-        ref[0,2,0,0]=(-0.300129864031)*x_ref[0]**o+(-0.418981381232)*x_ref[0]+(0.624854922555)*x_ref[1]**o+(0.892651746561)*x_ref[1]
-        ref[0,2,0,1]=(-0.511463603881)*x_ref[0]**o+(-0.808468332238)*x_ref[0]+(-0.342755248919)*x_ref[1]**o+(0.357985875808)*x_ref[1]
-        ref[0,2,1,0]=(-0.269520452932)*x_ref[0]**o+(0.869553937081)*x_ref[0]+(-0.183222122614)*x_ref[1]**o+(-0.135280721586)*x_ref[1]
-        ref[0,2,1,1]=(0.0396712123969)*x_ref[0]**o+(0.344314072793)*x_ref[0]+(0.644676507168)*x_ref[1]**o+(-0.0799551435053)*x_ref[1]
-        ref[0,2,2,0]=(0.302628743334)*x_ref[0]**o+(-0.59557047376)*x_ref[0]+(-0.277654790212)*x_ref[1]**o+(0.0299035042863)*x_ref[1]
-        ref[0,2,2,1]=(0.805296568248)*x_ref[0]**o+(0.726404711154)*x_ref[0]+(0.0728356962577)*x_ref[1]**o+(0.199997237962)*x_ref[1]
-        ref[0,3,0,0]=(-0.292658800952)*x_ref[0]**o+(-0.40080106651)*x_ref[0]+(0.844109590553)*x_ref[1]**o+(-0.339364790362)*x_ref[1]
-        ref[0,3,0,1]=(-0.621465058894)*x_ref[0]**o+(-0.376804350545)*x_ref[0]+(0.745038406103)*x_ref[1]**o+(-0.281482724757)*x_ref[1]
-        ref[0,3,1,0]=(0.00625816347702)*x_ref[0]**o+(0.392750189511)*x_ref[0]+(-0.232258708605)*x_ref[1]**o+(-0.634552067635)*x_ref[1]
-        ref[0,3,1,1]=(-0.0893109545391)*x_ref[0]**o+(-0.735678058768)*x_ref[0]+(-0.603248350212)*x_ref[1]**o+(-0.664366286468)*x_ref[1]
-        ref[0,3,2,0]=(-0.0539114688775)*x_ref[0]**o+(-0.110100592496)*x_ref[0]+(-0.700496078261)*x_ref[1]**o+(0.203311460549)*x_ref[1]
-        ref[0,3,2,1]=(-0.554691350426)*x_ref[0]**o+(-0.255001039659)*x_ref[0]+(0.567977217289)*x_ref[1]**o+(0.61993007447)*x_ref[1]
-        ref[0,4,0,0]=(-0.12193490862)*x_ref[0]**o+(0.731139340661)*x_ref[0]+(-0.321971724057)*x_ref[1]**o+(0.741215588897)*x_ref[1]
-        ref[0,4,0,1]=(-0.394743164913)*x_ref[0]**o+(-0.602249917929)*x_ref[0]+(0.27675734517)*x_ref[1]**o+(-0.968806169573)*x_ref[1]
-        ref[0,4,1,0]=(-0.629331232169)*x_ref[0]**o+(0.687483125805)*x_ref[0]+(0.633698693186)*x_ref[1]**o+(0.837564332901)*x_ref[1]
-        ref[0,4,1,1]=(0.0470601891829)*x_ref[0]**o+(-0.365490813497)*x_ref[0]+(-0.162532786979)*x_ref[1]**o+(0.504146804122)*x_ref[1]
-        ref[0,4,2,0]=(0.193790444091)*x_ref[0]**o+(0.742132840869)*x_ref[0]+(-0.871677496589)*x_ref[1]**o+(0.492817750307)*x_ref[1]
-        ref[0,4,2,1]=(0.741218732478)*x_ref[0]**o+(-0.746973604492)*x_ref[0]+(-0.548073707926)*x_ref[1]**o+(-0.42258185128)*x_ref[1]
-        ref[1,0,0,0]=(0.580989627459)*x_ref[0]**o+(-0.498423525574)*x_ref[0]+(-0.349651580594)*x_ref[1]**o+(0.0193060779482)*x_ref[1]
-        ref[1,0,0,1]=(0.398917011903)*x_ref[0]**o+(-0.122064497238)*x_ref[0]+(0.924654557299)*x_ref[1]**o+(0.485284066068)*x_ref[1]
-        ref[1,0,1,0]=(-0.985949382826)*x_ref[0]**o+(-0.0188384874977)*x_ref[0]+(0.177995429697)*x_ref[1]**o+(0.967727833143)*x_ref[1]
-        ref[1,0,1,1]=(0.920799980503)*x_ref[0]**o+(-0.749281119074)*x_ref[0]+(-0.628411322607)*x_ref[1]**o+(-0.446396361734)*x_ref[1]
-        ref[1,0,2,0]=(0.752863123667)*x_ref[0]**o+(0.112427175329)*x_ref[0]+(0.975568251269)*x_ref[1]**o+(0.316938392669)*x_ref[1]
-        ref[1,0,2,1]=(0.798409861933)*x_ref[0]**o+(-0.145715624761)*x_ref[0]+(-0.847813831553)*x_ref[1]**o+(0.302999756348)*x_ref[1]
-        ref[1,1,0,0]=(0.897029838502)*x_ref[0]**o+(-0.540852276529)*x_ref[0]+(-0.541450963121)*x_ref[1]**o+(-0.118819043917)*x_ref[1]
-        ref[1,1,0,1]=(-0.616797542123)*x_ref[0]**o+(-0.139394144428)*x_ref[0]+(-0.480348413917)*x_ref[1]**o+(0.500244829288)*x_ref[1]
-        ref[1,1,1,0]=(-0.960388730531)*x_ref[0]**o+(0.87391147728)*x_ref[0]+(0.0128673975991)*x_ref[1]**o+(0.444341296582)*x_ref[1]
-        ref[1,1,1,1]=(0.136810869097)*x_ref[0]**o+(-0.544756866447)*x_ref[0]+(-0.198052789907)*x_ref[1]**o+(-0.536732583929)*x_ref[1]
-        ref[1,1,2,0]=(-0.808981135979)*x_ref[0]**o+(-0.122088197438)*x_ref[0]+(-0.363958821187)*x_ref[1]**o+(-0.521614066151)*x_ref[1]
-        ref[1,1,2,1]=(0.299382605072)*x_ref[0]**o+(0.143397060894)*x_ref[0]+(-0.223044874711)*x_ref[1]**o+(-0.04723866032)*x_ref[1]
-        ref[1,2,0,0]=(-0.568967551455)*x_ref[0]**o+(0.750777908696)*x_ref[0]+(0.203117458853)*x_ref[1]**o+(-0.0797168995572)*x_ref[1]
-        ref[1,2,0,1]=(0.0439147552635)*x_ref[0]**o+(-0.0746749889653)*x_ref[0]+(0.192885940929)*x_ref[1]**o+(0.794090802345)*x_ref[1]
-        ref[1,2,1,0]=(0.137177876023)*x_ref[0]**o+(0.625847668003)*x_ref[0]+(0.252761858157)*x_ref[1]**o+(0.496512978117)*x_ref[1]
-        ref[1,2,1,1]=(0.475218888846)*x_ref[0]**o+(-0.286926184073)*x_ref[0]+(0.551427803487)*x_ref[1]**o+(0.782373661286)*x_ref[1]
-        ref[1,2,2,0]=(0.903004502545)*x_ref[0]**o+(-0.262952251654)*x_ref[0]+(0.110351860812)*x_ref[1]**o+(-0.685355934696)*x_ref[1]
-        ref[1,2,2,1]=(-0.157457317404)*x_ref[0]**o+(-0.243850623177)*x_ref[0]+(0.28853283432)*x_ref[1]**o+(0.612508908614)*x_ref[1]
-        ref[1,3,0,0]=(-0.741890002973)*x_ref[0]**o+(-0.118262424825)*x_ref[0]+(0.567100734646)*x_ref[1]**o+(0.301557125811)*x_ref[1]
-        ref[1,3,0,1]=(-0.00745396583928)*x_ref[0]**o+(-0.00558491344276)*x_ref[0]+(-0.967132370197)*x_ref[1]**o+(-0.61737594402)*x_ref[1]
-        ref[1,3,1,0]=(0.0767961523966)*x_ref[0]**o+(0.341952000996)*x_ref[0]+(0.762617832019)*x_ref[1]**o+(-0.38337284713)*x_ref[1]
-        ref[1,3,1,1]=(0.32265018902)*x_ref[0]**o+(-0.352521736206)*x_ref[0]+(-0.0119143186529)*x_ref[1]**o+(-0.64727561829)*x_ref[1]
-        ref[1,3,2,0]=(0.627690584587)*x_ref[0]**o+(0.0993819822193)*x_ref[0]+(-0.189363448841)*x_ref[1]**o+(0.49004001194)*x_ref[1]
-        ref[1,3,2,1]=(-0.657836476156)*x_ref[0]**o+(0.708970470136)*x_ref[0]+(0.252190020576)*x_ref[1]**o+(-0.481214196298)*x_ref[1]
-        ref[1,4,0,0]=(0.0837563164179)*x_ref[0]**o+(0.741536525079)*x_ref[0]+(0.645543094286)*x_ref[1]**o+(0.62358090815)*x_ref[1]
-        ref[1,4,0,1]=(0.262043398371)*x_ref[0]**o+(-0.47794750936)*x_ref[0]+(0.93086244965)*x_ref[1]**o+(-0.670399062677)*x_ref[1]
-        ref[1,4,1,0]=(-0.76634902923)*x_ref[0]**o+(-0.809846143928)*x_ref[0]+(0.639099549305)*x_ref[1]**o+(0.793524639236)*x_ref[1]
-        ref[1,4,1,1]=(0.814737503957)*x_ref[0]**o+(0.775593374042)*x_ref[0]+(0.240976904111)*x_ref[1]**o+(0.2352421356)*x_ref[1]
-        ref[1,4,2,0]=(0.519210584047)*x_ref[0]**o+(-0.702579589691)*x_ref[0]+(-0.450156317853)*x_ref[1]**o+(0.588864692581)*x_ref[1]
-        ref[1,4,2,1]=(-0.927751546037)*x_ref[0]**o+(-0.239737576019)*x_ref[0]+(-0.527658440447)*x_ref[1]**o+(0.79623440559)*x_ref[1]
-        ref[2,0,0,0]=(0.719144336419)*x_ref[0]**o+(0.916780231277)*x_ref[0]+(0.279073450277)*x_ref[1]**o+(-0.0130671321167)*x_ref[1]
-        ref[2,0,0,1]=(-0.556604998962)*x_ref[0]**o+(-0.661580370137)*x_ref[0]+(0.980704664791)*x_ref[1]**o+(0.935843251131)*x_ref[1]
-        ref[2,0,1,0]=(0.85501679753)*x_ref[0]**o+(-0.908342467889)*x_ref[0]+(0.969030151294)*x_ref[1]**o+(0.534192961922)*x_ref[1]
-        ref[2,0,1,1]=(0.527672385529)*x_ref[0]**o+(0.997699955667)*x_ref[0]+(-0.388249629327)*x_ref[1]**o+(-0.714956937512)*x_ref[1]
-        ref[2,0,2,0]=(-0.629149810667)*x_ref[0]**o+(-0.0515018376692)*x_ref[0]+(-0.80355991702)*x_ref[1]**o+(0.235999988886)*x_ref[1]
-        ref[2,0,2,1]=(0.960715934156)*x_ref[0]**o+(-0.782787305497)*x_ref[0]+(-0.309348231959)*x_ref[1]**o+(0.854911294717)*x_ref[1]
-        ref[2,1,0,0]=(-0.560749125074)*x_ref[0]**o+(-0.120515615757)*x_ref[0]+(0.055090634431)*x_ref[1]**o+(-0.539205949358)*x_ref[1]
-        ref[2,1,0,1]=(-0.762113417295)*x_ref[0]**o+(-0.207196980376)*x_ref[0]+(0.904541245494)*x_ref[1]**o+(0.320359459939)*x_ref[1]
-        ref[2,1,1,0]=(-0.272627586486)*x_ref[0]**o+(-0.885987982522)*x_ref[0]+(0.641737808216)*x_ref[1]**o+(0.358390367373)*x_ref[1]
-        ref[2,1,1,1]=(-0.847502563761)*x_ref[0]**o+(-0.430298277492)*x_ref[0]+(-0.869043300185)*x_ref[1]**o+(0.584700145915)*x_ref[1]
-        ref[2,1,2,0]=(0.497688368946)*x_ref[0]**o+(-0.14413770704)*x_ref[0]+(-0.82002941888)*x_ref[1]**o+(0.573569419279)*x_ref[1]
-        ref[2,1,2,1]=(0.959549623603)*x_ref[0]**o+(0.881196513588)*x_ref[0]+(-0.202951096266)*x_ref[1]**o+(-9.87983182765e-05)*x_ref[1]
-        ref[2,2,0,0]=(0.0811393810501)*x_ref[0]**o+(-0.853555165896)*x_ref[0]+(0.0259257246335)*x_ref[1]**o+(0.638575306959)*x_ref[1]
-        ref[2,2,0,1]=(-0.525990031379)*x_ref[0]**o+(0.11235160765)*x_ref[0]+(-0.502853879455)*x_ref[1]**o+(0.414066683507)*x_ref[1]
-        ref[2,2,1,0]=(-0.533919716834)*x_ref[0]**o+(-0.773411100656)*x_ref[0]+(0.311424028491)*x_ref[1]**o+(0.332733301377)*x_ref[1]
-        ref[2,2,1,1]=(0.280548593462)*x_ref[0]**o+(-0.0747640762104)*x_ref[0]+(-0.7110232877)*x_ref[1]**o+(-0.178672817441)*x_ref[1]
-        ref[2,2,2,0]=(0.445025926846)*x_ref[0]**o+(-0.669782903005)*x_ref[0]+(0.236610411793)*x_ref[1]**o+(0.437836936476)*x_ref[1]
-        ref[2,2,2,1]=(-0.503761305098)*x_ref[0]**o+(-0.889922659865)*x_ref[0]+(-0.0767256016402)*x_ref[1]**o+(-0.614874217835)*x_ref[1]
-        ref[2,3,0,0]=(-0.041960855672)*x_ref[0]**o+(-0.593486242764)*x_ref[0]+(0.344751892525)*x_ref[1]**o+(-0.131268873786)*x_ref[1]
-        ref[2,3,0,1]=(-0.192704843083)*x_ref[0]**o+(0.325356381696)*x_ref[0]+(-0.235690651937)*x_ref[1]**o+(0.59113535617)*x_ref[1]
-        ref[2,3,1,0]=(-0.0794745628024)*x_ref[0]**o+(0.7996737586)*x_ref[0]+(-0.324970505375)*x_ref[1]**o+(-0.14920403468)*x_ref[1]
-        ref[2,3,1,1]=(0.31997432673)*x_ref[0]**o+(-0.571739807799)*x_ref[0]+(0.517683480263)*x_ref[1]**o+(-0.250680741704)*x_ref[1]
-        ref[2,3,2,0]=(-0.379114277883)*x_ref[0]**o+(0.953285017352)*x_ref[0]+(-0.701111847548)*x_ref[1]**o+(-0.354199942528)*x_ref[1]
-        ref[2,3,2,1]=(0.492245629486)*x_ref[0]**o+(-0.299380102293)*x_ref[0]+(-0.126371826833)*x_ref[1]**o+(0.933664060647)*x_ref[1]
-        ref[2,4,0,0]=(0.714822159533)*x_ref[0]**o+(0.359430380478)*x_ref[0]+(-0.691610768506)*x_ref[1]**o+(0.414061853203)*x_ref[1]
-        ref[2,4,0,1]=(0.412799253275)*x_ref[0]**o+(0.862905533148)*x_ref[0]+(-0.0507440946561)*x_ref[1]**o+(0.779012369976)*x_ref[1]
-        ref[2,4,1,0]=(-0.981179053034)*x_ref[0]**o+(0.984777005573)*x_ref[0]+(0.715584788452)*x_ref[1]**o+(0.920666888724)*x_ref[1]
-        ref[2,4,1,1]=(-0.0287775685032)*x_ref[0]**o+(0.617592345344)*x_ref[0]+(-0.767451297794)*x_ref[1]**o+(0.95828976091)*x_ref[1]
-        ref[2,4,2,0]=(0.905037473705)*x_ref[0]**o+(-0.706987158021)*x_ref[0]+(0.535436652493)*x_ref[1]**o+(-0.891712664249)*x_ref[1]
-        ref[2,4,2,1]=(-0.818709474925)*x_ref[0]**o+(-0.0223479273553)*x_ref[0]+(-0.370644568884)*x_ref[1]**o+(0.286468739105)*x_ref[1]
-        ref[3,0,0,0]=(0.310461949876)*x_ref[0]**o+(0.770193446516)*x_ref[0]+(-0.0858335164699)*x_ref[1]**o+(0.12572608122)*x_ref[1]
-        ref[3,0,0,1]=(-0.781332422249)*x_ref[0]**o+(-0.238368527872)*x_ref[0]+(-0.449272256582)*x_ref[1]**o+(-0.645638738212)*x_ref[1]
-        ref[3,0,1,0]=(-0.91143447678)*x_ref[0]**o+(-0.885131081008)*x_ref[0]+(-0.253833463581)*x_ref[1]**o+(0.051439649459)*x_ref[1]
-        ref[3,0,1,1]=(0.447730169203)*x_ref[0]**o+(0.980354452325)*x_ref[0]+(-0.0484566141047)*x_ref[1]**o+(0.443407604362)*x_ref[1]
-        ref[3,0,2,0]=(-0.223975544426)*x_ref[0]**o+(0.0141796274312)*x_ref[0]+(0.664080206442)*x_ref[1]**o+(0.193318634886)*x_ref[1]
-        ref[3,0,2,1]=(-0.388901068755)*x_ref[0]**o+(-0.632210208163)*x_ref[0]+(0.567264328931)*x_ref[1]**o+(-0.308710733281)*x_ref[1]
-        ref[3,1,0,0]=(0.259562910069)*x_ref[0]**o+(-0.315409720689)*x_ref[0]+(0.999281841483)*x_ref[1]**o+(0.695981779357)*x_ref[1]
-        ref[3,1,0,1]=(0.627508253716)*x_ref[0]**o+(-0.540950954632)*x_ref[0]+(0.626209667445)*x_ref[1]**o+(-0.920403595109)*x_ref[1]
-        ref[3,1,1,0]=(0.750166528891)*x_ref[0]**o+(-0.145494783124)*x_ref[0]+(0.71048043416)*x_ref[1]**o+(-0.0920505950401)*x_ref[1]
-        ref[3,1,1,1]=(-0.755570630755)*x_ref[0]**o+(-0.323456877629)*x_ref[0]+(-0.0318418288689)*x_ref[1]**o+(0.551823313307)*x_ref[1]
-        ref[3,1,2,0]=(-0.301380276426)*x_ref[0]**o+(-0.102899117196)*x_ref[0]+(0.816857028902)*x_ref[1]**o+(-0.571555621895)*x_ref[1]
-        ref[3,1,2,1]=(-0.791148729922)*x_ref[0]**o+(0.400286696027)*x_ref[0]+(-0.17362002139)*x_ref[1]**o+(0.431696064424)*x_ref[1]
-        ref[3,2,0,0]=(0.241944451237)*x_ref[0]**o+(-0.629401496412)*x_ref[0]+(-0.00333636607647)*x_ref[1]**o+(0.167334133677)*x_ref[1]
-        ref[3,2,0,1]=(-0.300944831932)*x_ref[0]**o+(0.358282773504)*x_ref[0]+(0.759495661081)*x_ref[1]**o+(-0.225250488484)*x_ref[1]
-        ref[3,2,1,0]=(0.755950588768)*x_ref[0]**o+(0.718423180013)*x_ref[0]+(0.705150216505)*x_ref[1]**o+(0.269283969196)*x_ref[1]
-        ref[3,2,1,1]=(0.811064150458)*x_ref[0]**o+(-0.67847842696)*x_ref[0]+(-0.478091805711)*x_ref[1]**o+(0.292774429011)*x_ref[1]
-        ref[3,2,2,0]=(-0.307877253758)*x_ref[0]**o+(-0.563961673764)*x_ref[0]+(0.428322493356)*x_ref[1]**o+(0.564230126489)*x_ref[1]
-        ref[3,2,2,1]=(-0.623877056979)*x_ref[0]**o+(-0.148337578412)*x_ref[0]+(-0.910662605581)*x_ref[1]**o+(-0.38603493572)*x_ref[1]
-        ref[3,3,0,0]=(-0.826474270729)*x_ref[0]**o+(0.977614689932)*x_ref[0]+(-0.369824837717)*x_ref[1]**o+(-0.985478011812)*x_ref[1]
-        ref[3,3,0,1]=(-0.251252769561)*x_ref[0]**o+(-0.296732765057)*x_ref[0]+(-0.888899418995)*x_ref[1]**o+(0.640313055734)*x_ref[1]
-        ref[3,3,1,0]=(-0.189106218841)*x_ref[0]**o+(-0.0441656339777)*x_ref[0]+(0.368716219801)*x_ref[1]**o+(-0.924144919367)*x_ref[1]
-        ref[3,3,1,1]=(-0.525205981948)*x_ref[0]**o+(-0.148352446593)*x_ref[0]+(0.869212821652)*x_ref[1]**o+(-0.575463559793)*x_ref[1]
-        ref[3,3,2,0]=(0.668772663439)*x_ref[0]**o+(0.4330630456)*x_ref[0]+(-0.321158907274)*x_ref[1]**o+(0.570853139693)*x_ref[1]
-        ref[3,3,2,1]=(0.0236674031998)*x_ref[0]**o+(-0.390106024651)*x_ref[0]+(0.541717893494)*x_ref[1]**o+(-0.144655705849)*x_ref[1]
-        ref[3,4,0,0]=(0.971861188602)*x_ref[0]**o+(-0.834463063474)*x_ref[0]+(-0.419545662218)*x_ref[1]**o+(-0.0387341522049)*x_ref[1]
-        ref[3,4,0,1]=(0.226357589896)*x_ref[0]**o+(0.305148895256)*x_ref[0]+(0.00306527642431)*x_ref[1]**o+(0.4715619746)*x_ref[1]
-        ref[3,4,1,0]=(0.529602340964)*x_ref[0]**o+(-0.482050910795)*x_ref[0]+(0.964983911769)*x_ref[1]**o+(0.524018220532)*x_ref[1]
-        ref[3,4,1,1]=(0.940676158872)*x_ref[0]**o+(0.547078925647)*x_ref[0]+(-0.636907424453)*x_ref[1]**o+(0.938262396281)*x_ref[1]
-        ref[3,4,2,0]=(0.282512784255)*x_ref[0]**o+(-0.556345478931)*x_ref[0]+(0.651866614458)*x_ref[1]**o+(0.8895132214)*x_ref[1]
-        ref[3,4,2,1]=(0.905077434472)*x_ref[0]**o+(0.595878819874)*x_ref[0]+(0.416350660905)*x_ref[1]**o+(0.100262997545)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.836302395465)*x[0]**o+(-0.842568675604)*x[0]+(-0.780133441207)*x[1]**o+(0.54483947113)*x[1]+(-0.130253019696)*x[2]**o+(0.358303389828)*x[2]
-        arg[0,0,0,1]=(-0.722847500652)*x[0]**o+(0.42887368878)*x[0]+(0.979187056933)*x[1]**o+(0.624875714982)*x[1]+(-0.672529765247)*x[2]**o+(0.822363583702)*x[2]
-        arg[0,0,1,0]=(-0.28989650691)*x[0]**o+(-0.847647954773)*x[0]+(-0.11119862113)*x[1]**o+(0.0809009676818)*x[1]+(-0.672626533587)*x[2]**o+(0.580561232267)*x[2]
-        arg[0,0,1,1]=(-0.64783363248)*x[0]**o+(0.212828552873)*x[0]+(-0.845297180936)*x[1]**o+(-0.714760411186)*x[1]+(-0.385173605122)*x[2]**o+(-0.760750317556)*x[2]
-        arg[0,0,2,0]=(-0.328757006046)*x[0]**o+(-0.0935907722247)*x[0]+(-0.895866135795)*x[1]**o+(-0.701241976745)*x[1]+(0.893684139941)*x[2]**o+(-0.265339318222)*x[2]
-        arg[0,0,2,1]=(0.134066662346)*x[0]**o+(0.0383231508856)*x[0]+(-0.347744261995)*x[1]**o+(-0.86897907336)*x[1]+(-0.287792154521)*x[2]**o+(0.859351846891)*x[2]
-        arg[0,1,0,0]=(-0.635128124936)*x[0]**o+(-0.659462189733)*x[0]+(-0.0964365747936)*x[1]**o+(-0.385702168747)*x[1]+(0.179539914057)*x[2]**o+(-0.0176420847859)*x[2]
-        arg[0,1,0,1]=(-0.580750807831)*x[0]**o+(0.756493147583)*x[0]+(-0.436842251289)*x[1]**o+(-0.705624646095)*x[1]+(0.983064096262)*x[2]**o+(-0.0197153825423)*x[2]
-        arg[0,1,1,0]=(-0.567748582365)*x[0]**o+(0.579324420356)*x[0]+(0.0434168493419)*x[1]**o+(-0.839692920334)*x[1]+(-0.119239847745)*x[2]**o+(0.527047942834)*x[2]
-        arg[0,1,1,1]=(0.52870403655)*x[0]**o+(0.700090892471)*x[0]+(0.730224313921)*x[1]**o+(-0.815451751207)*x[1]+(-0.943945382413)*x[2]**o+(-0.571714141916)*x[2]
-        arg[0,1,2,0]=(-0.803841094887)*x[0]**o+(0.0595126006237)*x[0]+(-0.612341797645)*x[1]**o+(0.944552805211)*x[1]+(-0.00253009731786)*x[2]**o+(0.0174867439912)*x[2]
-        arg[0,1,2,1]=(-0.145623212549)*x[0]**o+(0.546039957008)*x[0]+(-0.221425237579)*x[1]**o+(0.229367671159)*x[1]+(-0.784903869759)*x[2]**o+(0.898045208871)*x[2]
-        arg[0,2,0,0]=(0.417924494005)*x[0]**o+(-0.192820051987)*x[0]+(0.878916271492)*x[1]**o+(-0.35056320984)*x[1]+(0.982897575604)*x[2]**o+(-0.225793730616)*x[2]
-        arg[0,2,0,1]=(-0.493279498849)*x[0]**o+(-0.154177411087)*x[0]+(-0.923592860492)*x[1]**o+(0.872010949252)*x[1]+(-0.936252147064)*x[2]**o+(0.947136819308)*x[2]
-        arg[0,2,1,0]=(0.109357630607)*x[0]**o+(-0.518825477709)*x[0]+(-0.375510667498)*x[1]**o+(0.476537999644)*x[1]+(0.676017421029)*x[2]**o+(-0.633301158984)*x[2]
-        arg[0,2,1,1]=(-0.0662265225539)*x[0]**o+(-0.276634748263)*x[0]+(-0.0655431981102)*x[1]**o+(0.0578482920991)*x[1]+(-0.264370611185)*x[2]**o+(-0.674612985594)*x[2]
-        arg[0,2,2,0]=(-0.924186592743)*x[0]**o+(0.197603043149)*x[0]+(-0.676882805046)*x[1]**o+(0.564142845865)*x[1]+(0.590369345306)*x[2]**o+(-0.872019490978)*x[2]
-        arg[0,2,2,1]=(0.480683776968)*x[0]**o+(-0.412055284173)*x[0]+(0.829996313473)*x[1]**o+(-0.235665473048)*x[1]+(-0.429191305284)*x[2]**o+(-0.0867804318457)*x[2]
-        arg[0,3,0,0]=(-0.0903660006043)*x[0]**o+(-0.507571901766)*x[0]+(-0.0305305861809)*x[1]**o+(-0.915027969989)*x[1]+(0.955644774347)*x[2]**o+(0.739244618775)*x[2]
-        arg[0,3,0,1]=(0.600619122998)*x[0]**o+(0.0128699484527)*x[0]+(-0.360431921281)*x[1]**o+(0.304773619811)*x[1]+(-0.302423314054)*x[2]**o+(0.680149401572)*x[2]
-        arg[0,3,1,0]=(-0.638540513323)*x[0]**o+(0.766655754067)*x[0]+(0.276879854223)*x[1]**o+(-0.628688275247)*x[1]+(0.724584107114)*x[2]**o+(0.682193551967)*x[2]
-        arg[0,3,1,1]=(-0.516656801349)*x[0]**o+(-0.513901319383)*x[0]+(-0.227957010777)*x[1]**o+(-0.164363207703)*x[1]+(-0.919936042047)*x[2]**o+(0.682400184997)*x[2]
-        arg[0,3,2,0]=(-0.819629653095)*x[0]**o+(0.183937049274)*x[0]+(0.0411075800579)*x[1]**o+(0.0813088270699)*x[1]+(0.762416334575)*x[2]**o+(0.236553726705)*x[2]
-        arg[0,3,2,1]=(0.513141183759)*x[0]**o+(-0.452475512734)*x[0]+(0.0461424221984)*x[1]**o+(-0.673452844636)*x[1]+(-0.194493328878)*x[2]**o+(0.812459956422)*x[2]
-        arg[0,4,0,0]=(0.672167415195)*x[0]**o+(-0.641004730405)*x[0]+(-0.383031420851)*x[1]**o+(0.392366431186)*x[1]+(0.66479124224)*x[2]**o+(0.845503225104)*x[2]
-        arg[0,4,0,1]=(0.908241966695)*x[0]**o+(-0.816989438726)*x[0]+(-0.144902267583)*x[1]**o+(-0.654901540598)*x[1]+(-0.9840470269)*x[2]**o+(0.510970695154)*x[2]
-        arg[0,4,1,0]=(0.788858704366)*x[0]**o+(-0.50266306504)*x[0]+(-0.681248796723)*x[1]**o+(0.0317663112509)*x[1]+(0.662428035619)*x[2]**o+(0.377116420912)*x[2]
-        arg[0,4,1,1]=(-0.0734522829037)*x[0]**o+(0.0822741484655)*x[0]+(-0.509279578815)*x[1]**o+(-0.95372420098)*x[1]+(0.682868362508)*x[2]**o+(-0.947156883638)*x[2]
-        arg[0,4,2,0]=(-0.843236607337)*x[0]**o+(-0.925326238513)*x[0]+(-0.153688519983)*x[1]**o+(-0.68456413487)*x[1]+(0.920442617368)*x[2]**o+(0.852945557893)*x[2]
-        arg[0,4,2,1]=(-0.283772512528)*x[0]**o+(0.202730738521)*x[0]+(-0.287375172356)*x[1]**o+(-0.176699132816)*x[1]+(0.446391113264)*x[2]**o+(-0.783266847348)*x[2]
-        arg[1,0,0,0]=(0.81284364562)*x[0]**o+(-0.454432332505)*x[0]+(-0.684692596262)*x[1]**o+(-0.345923888237)*x[1]+(0.1201728631)*x[2]**o+(0.808246135028)*x[2]
-        arg[1,0,0,1]=(0.941104328706)*x[0]**o+(-0.802008654964)*x[0]+(0.902047483677)*x[1]**o+(0.777049224612)*x[1]+(0.120184332854)*x[2]**o+(0.983216899102)*x[2]
-        arg[1,0,1,0]=(-0.420996925767)*x[0]**o+(0.0941750615502)*x[0]+(-0.935342933578)*x[1]**o+(0.925891822058)*x[1]+(-0.153652985582)*x[2]**o+(-0.336548986153)*x[2]
-        arg[1,0,1,1]=(-0.692886221795)*x[0]**o+(-0.920419410139)*x[0]+(-0.586575583263)*x[1]**o+(-0.269347362009)*x[1]+(-0.872169736045)*x[2]**o+(-0.724727186336)*x[2]
-        arg[1,0,2,0]=(-0.0171222282058)*x[0]**o+(0.338180602976)*x[0]+(-0.0345958505395)*x[1]**o+(0.631728421505)*x[1]+(0.90596443453)*x[2]**o+(-0.144785193015)*x[2]
-        arg[1,0,2,1]=(-0.91636583885)*x[0]**o+(-0.807496789574)*x[0]+(0.63472495957)*x[1]**o+(0.966464343993)*x[1]+(-0.471311384621)*x[2]**o+(-0.449420138238)*x[2]
-        arg[1,1,0,0]=(-0.239930503474)*x[0]**o+(-0.476439715994)*x[0]+(0.421600511888)*x[1]**o+(0.477823144792)*x[1]+(0.251409914807)*x[2]**o+(0.636818001419)*x[2]
-        arg[1,1,0,1]=(-0.427510410263)*x[0]**o+(0.494810857516)*x[0]+(-0.129415181352)*x[1]**o+(0.754147770071)*x[1]+(0.0218776365985)*x[2]**o+(0.706183216616)*x[2]
-        arg[1,1,1,0]=(-0.469150375165)*x[0]**o+(-0.0651101638073)*x[0]+(-0.697853003861)*x[1]**o+(0.0389330102026)*x[1]+(-0.256557942045)*x[2]**o+(0.409565340425)*x[2]
-        arg[1,1,1,1]=(0.14957005608)*x[0]**o+(-0.209482968126)*x[0]+(0.368899650309)*x[1]**o+(-0.0899321000137)*x[1]+(0.282389903357)*x[2]**o+(-0.166633883916)*x[2]
-        arg[1,1,2,0]=(0.0374938231714)*x[0]**o+(-0.687972899893)*x[0]+(-0.0686478107779)*x[1]**o+(0.318977937888)*x[1]+(-0.601269126788)*x[2]**o+(0.453188855786)*x[2]
-        arg[1,1,2,1]=(-0.853894223222)*x[0]**o+(0.441830151478)*x[0]+(0.973114898368)*x[1]**o+(-0.264454889071)*x[1]+(-0.828332687531)*x[2]**o+(0.302493748565)*x[2]
-        arg[1,2,0,0]=(0.210365824111)*x[0]**o+(0.4674117857)*x[0]+(-0.129546969044)*x[1]**o+(0.566357125352)*x[1]+(-0.721733448514)*x[2]**o+(0.154253207106)*x[2]
-        arg[1,2,0,1]=(0.805325508181)*x[0]**o+(-0.929113563452)*x[0]+(-0.487301761321)*x[1]**o+(-0.822405526519)*x[1]+(0.254754490326)*x[2]**o+(-0.196480710709)*x[2]
-        arg[1,2,1,0]=(-0.520777275475)*x[0]**o+(-0.912569745644)*x[0]+(-0.784504791087)*x[1]**o+(-0.903473217653)*x[1]+(0.583297107374)*x[2]**o+(0.664811898195)*x[2]
-        arg[1,2,1,1]=(0.129152152958)*x[0]**o+(0.497832200867)*x[0]+(0.121217248234)*x[1]**o+(-0.183368066714)*x[1]+(-0.776145485536)*x[2]**o+(-0.223165724715)*x[2]
-        arg[1,2,2,0]=(-0.698981324488)*x[0]**o+(0.00951277777924)*x[0]+(0.997410976507)*x[1]**o+(0.534670303453)*x[1]+(0.251309223218)*x[2]**o+(-0.921148646979)*x[2]
-        arg[1,2,2,1]=(-0.731509934487)*x[0]**o+(0.87731926834)*x[0]+(0.0865507713913)*x[1]**o+(0.708835987019)*x[1]+(0.294182269171)*x[2]**o+(-0.316660750729)*x[2]
-        arg[1,3,0,0]=(-0.282903962918)*x[0]**o+(-0.793457978844)*x[0]+(0.287425807914)*x[1]**o+(-0.0252722364835)*x[1]+(-0.956202022515)*x[2]**o+(0.650271579135)*x[2]
-        arg[1,3,0,1]=(-0.946723111202)*x[0]**o+(0.669431653693)*x[0]+(-0.791125976188)*x[1]**o+(-0.466484914794)*x[1]+(-0.217225801872)*x[2]**o+(0.224719473996)*x[2]
-        arg[1,3,1,0]=(0.516479301043)*x[0]**o+(-0.42420332366)*x[0]+(-0.0649227247176)*x[1]**o+(0.208849752675)*x[1]+(-0.939001099693)*x[2]**o+(-0.0537827140932)*x[2]
-        arg[1,3,1,1]=(-0.292077069459)*x[0]**o+(-0.444848119744)*x[0]+(0.268592719199)*x[1]**o+(-0.349401060323)*x[1]+(-0.540803784489)*x[2]**o+(-0.487170123526)*x[2]
-        arg[1,3,2,0]=(-0.626222042661)*x[0]**o+(0.245937409624)*x[0]+(-0.24692162006)*x[1]**o+(0.108230029208)*x[1]+(-0.760463241928)*x[2]**o+(-0.587078263201)*x[2]
-        arg[1,3,2,1]=(-0.923891147756)*x[0]**o+(0.0961285842162)*x[0]+(0.0146853466585)*x[1]**o+(0.00951339122359)*x[1]+(-0.261383704723)*x[2]**o+(-0.0262515691324)*x[2]
-        arg[1,4,0,0]=(-0.0370003524292)*x[0]**o+(-0.0463848489957)*x[0]+(0.940061458694)*x[1]**o+(0.592787058925)*x[1]+(-0.217284379638)*x[2]**o+(-0.11746834109)*x[2]
-        arg[1,4,0,1]=(0.830404283093)*x[0]**o+(0.268135490403)*x[0]+(-0.894500398195)*x[1]**o+(0.751042648917)*x[1]+(0.687583292754)*x[2]**o+(-0.884596509742)*x[2]
-        arg[1,4,1,0]=(0.414764592469)*x[0]**o+(-0.529613347919)*x[0]+(-0.727435115594)*x[1]**o+(-0.546579777725)*x[1]+(0.378011893971)*x[2]**o+(-0.578081183238)*x[2]
-        arg[1,4,1,1]=(0.406513376747)*x[0]**o+(-0.350132869579)*x[0]+(-0.557954631299)*x[1]**o+(0.868176175754)*x[1]+(0.793021832632)*x[2]**o+(0.280529771851)*x[2]
-        arg[1,4,2,0]=(0.56741953575)*x[0]**o+(0.0115947684302)*x[0]+(0.872812725363)*x[1]**o+(-0.215183541745)*x[1]+(0.64853692203)*x[2]**o+(-0.139561471922)*x[2]
-        arg[1,4,2,1]=(0.650916904666)*x[0]**o+(0.878765271839)*x[0]+(0.0141264348052)*x[1]**o+(-0.56314426774)*x[1]+(-0.267854377704)*x[2]**o+(0.852271380667)*x[2]
-        arg[2,0,0,0]=(0.948359141577)*x[0]**o+(-0.0881747280974)*x[0]+(0.804871563368)*x[1]**o+(-0.0298585763446)*x[1]+(0.506923333569)*x[2]**o+(-0.920947093648)*x[2]
-        arg[2,0,0,1]=(-0.0144221258584)*x[0]**o+(-0.679723072824)*x[0]+(0.00829336956687)*x[1]**o+(0.675680809303)*x[1]+(-0.803195231536)*x[2]**o+(0.70240358571)*x[2]
-        arg[2,0,1,0]=(-0.159174987706)*x[0]**o+(0.922309271483)*x[0]+(0.344354343035)*x[1]**o+(-0.00954038311323)*x[1]+(-0.50225452804)*x[2]**o+(0.355899734308)*x[2]
-        arg[2,0,1,1]=(0.0857611780404)*x[0]**o+(0.876479431983)*x[0]+(0.105049158502)*x[1]**o+(-0.530308461426)*x[1]+(-0.553136649343)*x[2]**o+(0.385458516481)*x[2]
-        arg[2,0,2,0]=(-0.260086070842)*x[0]**o+(0.417766241499)*x[0]+(-0.292370383673)*x[1]**o+(-0.321315349553)*x[1]+(-0.437301444082)*x[2]**o+(0.730845669715)*x[2]
-        arg[2,0,2,1]=(0.132547674276)*x[0]**o+(0.783602886333)*x[0]+(0.822361450413)*x[1]**o+(-0.810402783)*x[1]+(0.759701191023)*x[2]**o+(0.644375788608)*x[2]
-        arg[2,1,0,0]=(-0.841458111227)*x[0]**o+(0.779917641736)*x[0]+(-0.0745587217256)*x[1]**o+(0.938545280143)*x[1]+(0.454600163373)*x[2]**o+(-0.490348377697)*x[2]
-        arg[2,1,0,1]=(-0.876477136174)*x[0]**o+(-0.248200369939)*x[0]+(-0.973654243816)*x[1]**o+(0.482402123794)*x[1]+(-0.776970490827)*x[2]**o+(-0.571349467703)*x[2]
-        arg[2,1,1,0]=(-0.433528193102)*x[0]**o+(-0.57712915767)*x[0]+(-0.328671198058)*x[1]**o+(-0.926873019075)*x[1]+(0.314232739356)*x[2]**o+(-0.199625466412)*x[2]
-        arg[2,1,1,1]=(0.892707770392)*x[0]**o+(-0.680081898234)*x[0]+(-0.754181058483)*x[1]**o+(-0.253728945575)*x[1]+(-0.906373406684)*x[2]**o+(-0.0266435080833)*x[2]
-        arg[2,1,2,0]=(-0.121605378472)*x[0]**o+(-0.503955015634)*x[0]+(-0.0960767196114)*x[1]**o+(-0.937914890361)*x[1]+(0.212042931853)*x[2]**o+(0.930703155408)*x[2]
-        arg[2,1,2,1]=(0.0564159441047)*x[0]**o+(0.842332721105)*x[0]+(0.954741657608)*x[1]**o+(0.73503176)*x[1]+(-0.390679938582)*x[2]**o+(-0.440014747741)*x[2]
-        arg[2,2,0,0]=(0.0100637970821)*x[0]**o+(-0.0283353154145)*x[0]+(0.865360758262)*x[1]**o+(0.780975027988)*x[1]+(0.16115842919)*x[2]**o+(0.247580155656)*x[2]
-        arg[2,2,0,1]=(0.61102059426)*x[0]**o+(-0.198005744101)*x[0]+(0.503568797262)*x[1]**o+(0.0288809726497)*x[1]+(-0.765127098183)*x[2]**o+(0.409803857723)*x[2]
-        arg[2,2,1,0]=(-0.712272018295)*x[0]**o+(-0.62562142063)*x[0]+(-0.579501949719)*x[1]**o+(0.628539275236)*x[1]+(0.0200945124964)*x[2]**o+(0.175966024769)*x[2]
-        arg[2,2,1,1]=(-0.798244445519)*x[0]**o+(-0.376440962535)*x[0]+(-0.134467401497)*x[1]**o+(0.877538294477)*x[1]+(-0.484870741192)*x[2]**o+(-0.224064469935)*x[2]
-        arg[2,2,2,0]=(0.200196926368)*x[0]**o+(-0.528000867086)*x[0]+(-0.708942342624)*x[1]**o+(-0.591994969141)*x[1]+(-0.990641592656)*x[2]**o+(-0.875897347303)*x[2]
-        arg[2,2,2,1]=(0.949113190797)*x[0]**o+(0.867855496786)*x[0]+(-0.0314953438065)*x[1]**o+(-0.371928428005)*x[1]+(-0.526403191063)*x[2]**o+(0.653049122326)*x[2]
-        arg[2,3,0,0]=(-0.353418327127)*x[0]**o+(-0.418588306429)*x[0]+(0.400872043269)*x[1]**o+(0.141907924042)*x[1]+(-0.999869579462)*x[2]**o+(-0.410423954563)*x[2]
-        arg[2,3,0,1]=(-0.240390877307)*x[0]**o+(0.0901879916115)*x[0]+(-0.0734683209657)*x[1]**o+(0.274836005886)*x[1]+(-0.336375498181)*x[2]**o+(-0.754776455221)*x[2]
-        arg[2,3,1,0]=(0.259928460822)*x[0]**o+(-0.227630454708)*x[0]+(0.725968066278)*x[1]**o+(-0.545440695763)*x[1]+(-0.0354926607815)*x[2]**o+(0.365010532181)*x[2]
-        arg[2,3,1,1]=(-0.969799373398)*x[0]**o+(0.514498233214)*x[0]+(0.907450925318)*x[1]**o+(-0.234993706406)*x[1]+(0.206323910806)*x[2]**o+(0.209364250369)*x[2]
-        arg[2,3,2,0]=(0.712905565941)*x[0]**o+(-0.353322758263)*x[0]+(0.816861181494)*x[1]**o+(-0.362388243619)*x[1]+(0.302543517607)*x[2]**o+(-0.831280418852)*x[2]
-        arg[2,3,2,1]=(-0.386373711182)*x[0]**o+(0.946914567792)*x[0]+(-0.52795085887)*x[1]**o+(0.86635245964)*x[1]+(0.654261054178)*x[2]**o+(0.452334882498)*x[2]
-        arg[2,4,0,0]=(0.374747033547)*x[0]**o+(-0.3471578669)*x[0]+(0.322217002639)*x[1]**o+(0.92988068982)*x[1]+(-0.642423472369)*x[2]**o+(-0.759623225653)*x[2]
-        arg[2,4,0,1]=(-0.322255157841)*x[0]**o+(-0.253806844569)*x[0]+(-0.0688746199637)*x[1]**o+(0.232840317719)*x[1]+(-0.815623721026)*x[2]**o+(0.43055485562)*x[2]
-        arg[2,4,1,0]=(-0.452320341493)*x[0]**o+(0.755240168228)*x[0]+(-0.892552611066)*x[1]**o+(0.438275161458)*x[1]+(0.441378369388)*x[2]**o+(-0.870501114753)*x[2]
-        arg[2,4,1,1]=(0.496731258286)*x[0]**o+(-0.499918335322)*x[0]+(0.000476061942027)*x[1]**o+(-0.857762621856)*x[1]+(0.957433798133)*x[2]**o+(-0.766450629361)*x[2]
-        arg[2,4,2,0]=(0.860379598562)*x[0]**o+(-0.0816478389485)*x[0]+(-0.438181864676)*x[1]**o+(0.78937427676)*x[1]+(-0.97940010041)*x[2]**o+(0.583914605259)*x[2]
-        arg[2,4,2,1]=(0.23729037277)*x[0]**o+(-0.365380141474)*x[0]+(-0.471505632575)*x[1]**o+(-0.168838288)*x[1]+(-0.519847065791)*x[2]**o+(-0.816100518668)*x[2]
-        arg[3,0,0,0]=(0.729921808661)*x[0]**o+(0.732868255388)*x[0]+(0.305434623795)*x[1]**o+(-0.45402804883)*x[1]+(0.604368334171)*x[2]**o+(-0.179233711008)*x[2]
-        arg[3,0,0,1]=(-0.208916687176)*x[0]**o+(-0.297916049539)*x[0]+(0.854941564423)*x[1]**o+(0.775355543915)*x[1]+(-0.373382357688)*x[2]**o+(0.792557314074)*x[2]
-        arg[3,0,1,0]=(0.606041025674)*x[0]**o+(0.115814644681)*x[0]+(-0.414470914985)*x[1]**o+(-0.136577390174)*x[1]+(0.672303216396)*x[2]**o+(-0.479680752765)*x[2]
-        arg[3,0,1,1]=(-0.535633649471)*x[0]**o+(0.133761944775)*x[0]+(-0.980107507665)*x[1]**o+(0.211561747114)*x[1]+(-0.530648770004)*x[2]**o+(0.417977629512)*x[2]
-        arg[3,0,2,0]=(-0.242797826282)*x[0]**o+(-0.828691638823)*x[0]+(-0.187401612749)*x[1]**o+(-0.453821620107)*x[1]+(-0.475718408605)*x[2]**o+(0.683502702497)*x[2]
-        arg[3,0,2,1]=(-0.66640812951)*x[0]**o+(-0.259184719546)*x[0]+(0.463743732654)*x[1]**o+(0.6746349156)*x[1]+(-0.0532918236783)*x[2]**o+(-0.714197225876)*x[2]
-        arg[3,1,0,0]=(-0.97693616823)*x[0]**o+(-0.825560555757)*x[0]+(0.118452690664)*x[1]**o+(-0.125279874388)*x[1]+(0.733803136335)*x[2]**o+(-0.884902209956)*x[2]
-        arg[3,1,0,1]=(-0.652466190334)*x[0]**o+(0.370106640243)*x[0]+(0.0850861818306)*x[1]**o+(-0.49744492012)*x[1]+(-0.843498619618)*x[2]**o+(-0.0480070808698)*x[2]
-        arg[3,1,1,0]=(-0.450526704276)*x[0]**o+(0.430774951776)*x[0]+(-0.956799540696)*x[1]**o+(0.820090546747)*x[1]+(0.831582198997)*x[2]**o+(0.491042906394)*x[2]
-        arg[3,1,1,1]=(0.419717807665)*x[0]**o+(0.320904534666)*x[0]+(-0.483247938999)*x[1]**o+(0.82174341564)*x[1]+(-0.441719998974)*x[2]**o+(0.691713322239)*x[2]
-        arg[3,1,2,0]=(0.255464093123)*x[0]**o+(-0.256334953799)*x[0]+(0.677105284128)*x[1]**o+(-0.584438025212)*x[1]+(0.505820591597)*x[2]**o+(0.247943562937)*x[2]
-        arg[3,1,2,1]=(-0.495204107745)*x[0]**o+(0.234426349601)*x[0]+(0.736969108189)*x[1]**o+(-0.369684409765)*x[1]+(0.164303379282)*x[2]**o+(-0.595757590519)*x[2]
-        arg[3,2,0,0]=(0.238639684591)*x[0]**o+(0.568638143194)*x[0]+(0.972646679042)*x[1]**o+(-0.652648194795)*x[1]+(-0.0530713046414)*x[2]**o+(0.356043665396)*x[2]
-        arg[3,2,0,1]=(0.458539145106)*x[0]**o+(0.111417037398)*x[0]+(-0.135374868193)*x[1]**o+(-0.535451685997)*x[1]+(-0.820797762877)*x[2]**o+(0.122239787933)*x[2]
-        arg[3,2,1,0]=(-0.323251425039)*x[0]**o+(0.106998797206)*x[0]+(-0.0671655760766)*x[1]**o+(0.836342794315)*x[1]+(0.34628715493)*x[2]**o+(-0.11058327806)*x[2]
-        arg[3,2,1,1]=(0.181994203911)*x[0]**o+(-0.710678453639)*x[0]+(0.625606409786)*x[1]**o+(-0.363170328543)*x[1]+(-0.932998745422)*x[2]**o+(-0.0411581284314)*x[2]
-        arg[3,2,2,0]=(0.710847104903)*x[0]**o+(0.483971915285)*x[0]+(0.42996482533)*x[1]**o+(0.456817348253)*x[1]+(0.844562058604)*x[2]**o+(-0.469586014721)*x[2]
-        arg[3,2,2,1]=(-0.845771280837)*x[0]**o+(-0.081384696494)*x[0]+(0.71823377714)*x[1]**o+(-0.846672143168)*x[1]+(-0.139540918461)*x[2]**o+(0.837646131987)*x[2]
-        arg[3,3,0,0]=(-0.958726792109)*x[0]**o+(0.53196455268)*x[0]+(-0.621810423658)*x[1]**o+(-0.0352106197658)*x[1]+(-0.636059207474)*x[2]**o+(-0.0491118207063)*x[2]
-        arg[3,3,0,1]=(0.987836799279)*x[0]**o+(0.41633576224)*x[0]+(0.312021799176)*x[1]**o+(-0.168836582938)*x[1]+(-0.391725003735)*x[2]**o+(-0.158000182269)*x[2]
-        arg[3,3,1,0]=(-0.280868116529)*x[0]**o+(-0.687924000092)*x[0]+(0.865840229722)*x[1]**o+(-0.0823203022874)*x[1]+(-0.857309899784)*x[2]**o+(-0.0657473493059)*x[2]
-        arg[3,3,1,1]=(0.680496030567)*x[0]**o+(0.159575720724)*x[0]+(0.0531895122046)*x[1]**o+(0.359273896084)*x[1]+(0.35084774502)*x[2]**o+(0.0982220259531)*x[2]
-        arg[3,3,2,0]=(0.140872311111)*x[0]**o+(-0.00845309046907)*x[0]+(-0.845527142503)*x[1]**o+(-0.67713103521)*x[1]+(0.972054187828)*x[2]**o+(-0.800664963509)*x[2]
-        arg[3,3,2,1]=(-0.490866666782)*x[0]**o+(-0.0988939523952)*x[0]+(0.236210969508)*x[1]**o+(-0.672617589992)*x[1]+(-0.640558724403)*x[2]**o+(-0.203125267713)*x[2]
-        arg[3,4,0,0]=(0.318438839683)*x[0]**o+(0.0864322377812)*x[0]+(-0.371419701638)*x[1]**o+(-0.311583139142)*x[1]+(-0.0533111244011)*x[2]**o+(0.841240973423)*x[2]
-        arg[3,4,0,1]=(-0.573110771334)*x[0]**o+(0.703852077914)*x[0]+(0.613309217217)*x[1]**o+(0.247223193846)*x[1]+(0.618952485205)*x[2]**o+(-0.395998308184)*x[2]
-        arg[3,4,1,0]=(0.512896938934)*x[0]**o+(0.848653171505)*x[0]+(-0.944903687062)*x[1]**o+(0.179782177607)*x[1]+(-0.0287288996538)*x[2]**o+(-0.385519118293)*x[2]
-        arg[3,4,1,1]=(0.234190647718)*x[0]**o+(0.445478221419)*x[0]+(0.588931676434)*x[1]**o+(0.140788139998)*x[1]+(-0.761952359657)*x[2]**o+(0.92377426359)*x[2]
-        arg[3,4,2,0]=(-0.836038966171)*x[0]**o+(-0.772990045933)*x[0]+(0.0622128209877)*x[1]**o+(-0.73733496141)*x[1]+(0.0234446925161)*x[2]**o+(-0.682234213315)*x[2]
-        arg[3,4,2,1]=(0.250498084214)*x[0]**o+(0.539088356159)*x[0]+(-0.691842680176)*x[1]**o+(0.710040802953)*x[1]+(-0.43691551501)*x[2]**o+(0.710668600989)*x[2]
-        ref[0,0,0,0]=(-0.836302395465)*x_ref[0]**o+(-0.842568675604)*x_ref[0]+(-0.780133441207)*x_ref[1]**o+(0.54483947113)*x_ref[1]+(-0.130253019696)*x_ref[2]**o+(0.358303389828)*x_ref[2]
-        ref[0,0,0,1]=(-0.722847500652)*x_ref[0]**o+(0.42887368878)*x_ref[0]+(0.979187056933)*x_ref[1]**o+(0.624875714982)*x_ref[1]+(-0.672529765247)*x_ref[2]**o+(0.822363583702)*x_ref[2]
-        ref[0,0,1,0]=(-0.28989650691)*x_ref[0]**o+(-0.847647954773)*x_ref[0]+(-0.11119862113)*x_ref[1]**o+(0.0809009676818)*x_ref[1]+(-0.672626533587)*x_ref[2]**o+(0.580561232267)*x_ref[2]
-        ref[0,0,1,1]=(-0.64783363248)*x_ref[0]**o+(0.212828552873)*x_ref[0]+(-0.845297180936)*x_ref[1]**o+(-0.714760411186)*x_ref[1]+(-0.385173605122)*x_ref[2]**o+(-0.760750317556)*x_ref[2]
-        ref[0,0,2,0]=(-0.328757006046)*x_ref[0]**o+(-0.0935907722247)*x_ref[0]+(-0.895866135795)*x_ref[1]**o+(-0.701241976745)*x_ref[1]+(0.893684139941)*x_ref[2]**o+(-0.265339318222)*x_ref[2]
-        ref[0,0,2,1]=(0.134066662346)*x_ref[0]**o+(0.0383231508856)*x_ref[0]+(-0.347744261995)*x_ref[1]**o+(-0.86897907336)*x_ref[1]+(-0.287792154521)*x_ref[2]**o+(0.859351846891)*x_ref[2]
-        ref[0,1,0,0]=(-0.635128124936)*x_ref[0]**o+(-0.659462189733)*x_ref[0]+(-0.0964365747936)*x_ref[1]**o+(-0.385702168747)*x_ref[1]+(0.179539914057)*x_ref[2]**o+(-0.0176420847859)*x_ref[2]
-        ref[0,1,0,1]=(-0.580750807831)*x_ref[0]**o+(0.756493147583)*x_ref[0]+(-0.436842251289)*x_ref[1]**o+(-0.705624646095)*x_ref[1]+(0.983064096262)*x_ref[2]**o+(-0.0197153825423)*x_ref[2]
-        ref[0,1,1,0]=(-0.567748582365)*x_ref[0]**o+(0.579324420356)*x_ref[0]+(0.0434168493419)*x_ref[1]**o+(-0.839692920334)*x_ref[1]+(-0.119239847745)*x_ref[2]**o+(0.527047942834)*x_ref[2]
-        ref[0,1,1,1]=(0.52870403655)*x_ref[0]**o+(0.700090892471)*x_ref[0]+(0.730224313921)*x_ref[1]**o+(-0.815451751207)*x_ref[1]+(-0.943945382413)*x_ref[2]**o+(-0.571714141916)*x_ref[2]
-        ref[0,1,2,0]=(-0.803841094887)*x_ref[0]**o+(0.0595126006237)*x_ref[0]+(-0.612341797645)*x_ref[1]**o+(0.944552805211)*x_ref[1]+(-0.00253009731786)*x_ref[2]**o+(0.0174867439912)*x_ref[2]
-        ref[0,1,2,1]=(-0.145623212549)*x_ref[0]**o+(0.546039957008)*x_ref[0]+(-0.221425237579)*x_ref[1]**o+(0.229367671159)*x_ref[1]+(-0.784903869759)*x_ref[2]**o+(0.898045208871)*x_ref[2]
-        ref[0,2,0,0]=(0.417924494005)*x_ref[0]**o+(-0.192820051987)*x_ref[0]+(0.878916271492)*x_ref[1]**o+(-0.35056320984)*x_ref[1]+(0.982897575604)*x_ref[2]**o+(-0.225793730616)*x_ref[2]
-        ref[0,2,0,1]=(-0.493279498849)*x_ref[0]**o+(-0.154177411087)*x_ref[0]+(-0.923592860492)*x_ref[1]**o+(0.872010949252)*x_ref[1]+(-0.936252147064)*x_ref[2]**o+(0.947136819308)*x_ref[2]
-        ref[0,2,1,0]=(0.109357630607)*x_ref[0]**o+(-0.518825477709)*x_ref[0]+(-0.375510667498)*x_ref[1]**o+(0.476537999644)*x_ref[1]+(0.676017421029)*x_ref[2]**o+(-0.633301158984)*x_ref[2]
-        ref[0,2,1,1]=(-0.0662265225539)*x_ref[0]**o+(-0.276634748263)*x_ref[0]+(-0.0655431981102)*x_ref[1]**o+(0.0578482920991)*x_ref[1]+(-0.264370611185)*x_ref[2]**o+(-0.674612985594)*x_ref[2]
-        ref[0,2,2,0]=(-0.924186592743)*x_ref[0]**o+(0.197603043149)*x_ref[0]+(-0.676882805046)*x_ref[1]**o+(0.564142845865)*x_ref[1]+(0.590369345306)*x_ref[2]**o+(-0.872019490978)*x_ref[2]
-        ref[0,2,2,1]=(0.480683776968)*x_ref[0]**o+(-0.412055284173)*x_ref[0]+(0.829996313473)*x_ref[1]**o+(-0.235665473048)*x_ref[1]+(-0.429191305284)*x_ref[2]**o+(-0.0867804318457)*x_ref[2]
-        ref[0,3,0,0]=(-0.0903660006043)*x_ref[0]**o+(-0.507571901766)*x_ref[0]+(-0.0305305861809)*x_ref[1]**o+(-0.915027969989)*x_ref[1]+(0.955644774347)*x_ref[2]**o+(0.739244618775)*x_ref[2]
-        ref[0,3,0,1]=(0.600619122998)*x_ref[0]**o+(0.0128699484527)*x_ref[0]+(-0.360431921281)*x_ref[1]**o+(0.304773619811)*x_ref[1]+(-0.302423314054)*x_ref[2]**o+(0.680149401572)*x_ref[2]
-        ref[0,3,1,0]=(-0.638540513323)*x_ref[0]**o+(0.766655754067)*x_ref[0]+(0.276879854223)*x_ref[1]**o+(-0.628688275247)*x_ref[1]+(0.724584107114)*x_ref[2]**o+(0.682193551967)*x_ref[2]
-        ref[0,3,1,1]=(-0.516656801349)*x_ref[0]**o+(-0.513901319383)*x_ref[0]+(-0.227957010777)*x_ref[1]**o+(-0.164363207703)*x_ref[1]+(-0.919936042047)*x_ref[2]**o+(0.682400184997)*x_ref[2]
-        ref[0,3,2,0]=(-0.819629653095)*x_ref[0]**o+(0.183937049274)*x_ref[0]+(0.0411075800579)*x_ref[1]**o+(0.0813088270699)*x_ref[1]+(0.762416334575)*x_ref[2]**o+(0.236553726705)*x_ref[2]
-        ref[0,3,2,1]=(0.513141183759)*x_ref[0]**o+(-0.452475512734)*x_ref[0]+(0.0461424221984)*x_ref[1]**o+(-0.673452844636)*x_ref[1]+(-0.194493328878)*x_ref[2]**o+(0.812459956422)*x_ref[2]
-        ref[0,4,0,0]=(0.672167415195)*x_ref[0]**o+(-0.641004730405)*x_ref[0]+(-0.383031420851)*x_ref[1]**o+(0.392366431186)*x_ref[1]+(0.66479124224)*x_ref[2]**o+(0.845503225104)*x_ref[2]
-        ref[0,4,0,1]=(0.908241966695)*x_ref[0]**o+(-0.816989438726)*x_ref[0]+(-0.144902267583)*x_ref[1]**o+(-0.654901540598)*x_ref[1]+(-0.9840470269)*x_ref[2]**o+(0.510970695154)*x_ref[2]
-        ref[0,4,1,0]=(0.788858704366)*x_ref[0]**o+(-0.50266306504)*x_ref[0]+(-0.681248796723)*x_ref[1]**o+(0.0317663112509)*x_ref[1]+(0.662428035619)*x_ref[2]**o+(0.377116420912)*x_ref[2]
-        ref[0,4,1,1]=(-0.0734522829037)*x_ref[0]**o+(0.0822741484655)*x_ref[0]+(-0.509279578815)*x_ref[1]**o+(-0.95372420098)*x_ref[1]+(0.682868362508)*x_ref[2]**o+(-0.947156883638)*x_ref[2]
-        ref[0,4,2,0]=(-0.843236607337)*x_ref[0]**o+(-0.925326238513)*x_ref[0]+(-0.153688519983)*x_ref[1]**o+(-0.68456413487)*x_ref[1]+(0.920442617368)*x_ref[2]**o+(0.852945557893)*x_ref[2]
-        ref[0,4,2,1]=(-0.283772512528)*x_ref[0]**o+(0.202730738521)*x_ref[0]+(-0.287375172356)*x_ref[1]**o+(-0.176699132816)*x_ref[1]+(0.446391113264)*x_ref[2]**o+(-0.783266847348)*x_ref[2]
-        ref[1,0,0,0]=(0.81284364562)*x_ref[0]**o+(-0.454432332505)*x_ref[0]+(-0.684692596262)*x_ref[1]**o+(-0.345923888237)*x_ref[1]+(0.1201728631)*x_ref[2]**o+(0.808246135028)*x_ref[2]
-        ref[1,0,0,1]=(0.941104328706)*x_ref[0]**o+(-0.802008654964)*x_ref[0]+(0.902047483677)*x_ref[1]**o+(0.777049224612)*x_ref[1]+(0.120184332854)*x_ref[2]**o+(0.983216899102)*x_ref[2]
-        ref[1,0,1,0]=(-0.420996925767)*x_ref[0]**o+(0.0941750615502)*x_ref[0]+(-0.935342933578)*x_ref[1]**o+(0.925891822058)*x_ref[1]+(-0.153652985582)*x_ref[2]**o+(-0.336548986153)*x_ref[2]
-        ref[1,0,1,1]=(-0.692886221795)*x_ref[0]**o+(-0.920419410139)*x_ref[0]+(-0.586575583263)*x_ref[1]**o+(-0.269347362009)*x_ref[1]+(-0.872169736045)*x_ref[2]**o+(-0.724727186336)*x_ref[2]
-        ref[1,0,2,0]=(-0.0171222282058)*x_ref[0]**o+(0.338180602976)*x_ref[0]+(-0.0345958505395)*x_ref[1]**o+(0.631728421505)*x_ref[1]+(0.90596443453)*x_ref[2]**o+(-0.144785193015)*x_ref[2]
-        ref[1,0,2,1]=(-0.91636583885)*x_ref[0]**o+(-0.807496789574)*x_ref[0]+(0.63472495957)*x_ref[1]**o+(0.966464343993)*x_ref[1]+(-0.471311384621)*x_ref[2]**o+(-0.449420138238)*x_ref[2]
-        ref[1,1,0,0]=(-0.239930503474)*x_ref[0]**o+(-0.476439715994)*x_ref[0]+(0.421600511888)*x_ref[1]**o+(0.477823144792)*x_ref[1]+(0.251409914807)*x_ref[2]**o+(0.636818001419)*x_ref[2]
-        ref[1,1,0,1]=(-0.427510410263)*x_ref[0]**o+(0.494810857516)*x_ref[0]+(-0.129415181352)*x_ref[1]**o+(0.754147770071)*x_ref[1]+(0.0218776365985)*x_ref[2]**o+(0.706183216616)*x_ref[2]
-        ref[1,1,1,0]=(-0.469150375165)*x_ref[0]**o+(-0.0651101638073)*x_ref[0]+(-0.697853003861)*x_ref[1]**o+(0.0389330102026)*x_ref[1]+(-0.256557942045)*x_ref[2]**o+(0.409565340425)*x_ref[2]
-        ref[1,1,1,1]=(0.14957005608)*x_ref[0]**o+(-0.209482968126)*x_ref[0]+(0.368899650309)*x_ref[1]**o+(-0.0899321000137)*x_ref[1]+(0.282389903357)*x_ref[2]**o+(-0.166633883916)*x_ref[2]
-        ref[1,1,2,0]=(0.0374938231714)*x_ref[0]**o+(-0.687972899893)*x_ref[0]+(-0.0686478107779)*x_ref[1]**o+(0.318977937888)*x_ref[1]+(-0.601269126788)*x_ref[2]**o+(0.453188855786)*x_ref[2]
-        ref[1,1,2,1]=(-0.853894223222)*x_ref[0]**o+(0.441830151478)*x_ref[0]+(0.973114898368)*x_ref[1]**o+(-0.264454889071)*x_ref[1]+(-0.828332687531)*x_ref[2]**o+(0.302493748565)*x_ref[2]
-        ref[1,2,0,0]=(0.210365824111)*x_ref[0]**o+(0.4674117857)*x_ref[0]+(-0.129546969044)*x_ref[1]**o+(0.566357125352)*x_ref[1]+(-0.721733448514)*x_ref[2]**o+(0.154253207106)*x_ref[2]
-        ref[1,2,0,1]=(0.805325508181)*x_ref[0]**o+(-0.929113563452)*x_ref[0]+(-0.487301761321)*x_ref[1]**o+(-0.822405526519)*x_ref[1]+(0.254754490326)*x_ref[2]**o+(-0.196480710709)*x_ref[2]
-        ref[1,2,1,0]=(-0.520777275475)*x_ref[0]**o+(-0.912569745644)*x_ref[0]+(-0.784504791087)*x_ref[1]**o+(-0.903473217653)*x_ref[1]+(0.583297107374)*x_ref[2]**o+(0.664811898195)*x_ref[2]
-        ref[1,2,1,1]=(0.129152152958)*x_ref[0]**o+(0.497832200867)*x_ref[0]+(0.121217248234)*x_ref[1]**o+(-0.183368066714)*x_ref[1]+(-0.776145485536)*x_ref[2]**o+(-0.223165724715)*x_ref[2]
-        ref[1,2,2,0]=(-0.698981324488)*x_ref[0]**o+(0.00951277777924)*x_ref[0]+(0.997410976507)*x_ref[1]**o+(0.534670303453)*x_ref[1]+(0.251309223218)*x_ref[2]**o+(-0.921148646979)*x_ref[2]
-        ref[1,2,2,1]=(-0.731509934487)*x_ref[0]**o+(0.87731926834)*x_ref[0]+(0.0865507713913)*x_ref[1]**o+(0.708835987019)*x_ref[1]+(0.294182269171)*x_ref[2]**o+(-0.316660750729)*x_ref[2]
-        ref[1,3,0,0]=(-0.282903962918)*x_ref[0]**o+(-0.793457978844)*x_ref[0]+(0.287425807914)*x_ref[1]**o+(-0.0252722364835)*x_ref[1]+(-0.956202022515)*x_ref[2]**o+(0.650271579135)*x_ref[2]
-        ref[1,3,0,1]=(-0.946723111202)*x_ref[0]**o+(0.669431653693)*x_ref[0]+(-0.791125976188)*x_ref[1]**o+(-0.466484914794)*x_ref[1]+(-0.217225801872)*x_ref[2]**o+(0.224719473996)*x_ref[2]
-        ref[1,3,1,0]=(0.516479301043)*x_ref[0]**o+(-0.42420332366)*x_ref[0]+(-0.0649227247176)*x_ref[1]**o+(0.208849752675)*x_ref[1]+(-0.939001099693)*x_ref[2]**o+(-0.0537827140932)*x_ref[2]
-        ref[1,3,1,1]=(-0.292077069459)*x_ref[0]**o+(-0.444848119744)*x_ref[0]+(0.268592719199)*x_ref[1]**o+(-0.349401060323)*x_ref[1]+(-0.540803784489)*x_ref[2]**o+(-0.487170123526)*x_ref[2]
-        ref[1,3,2,0]=(-0.626222042661)*x_ref[0]**o+(0.245937409624)*x_ref[0]+(-0.24692162006)*x_ref[1]**o+(0.108230029208)*x_ref[1]+(-0.760463241928)*x_ref[2]**o+(-0.587078263201)*x_ref[2]
-        ref[1,3,2,1]=(-0.923891147756)*x_ref[0]**o+(0.0961285842162)*x_ref[0]+(0.0146853466585)*x_ref[1]**o+(0.00951339122359)*x_ref[1]+(-0.261383704723)*x_ref[2]**o+(-0.0262515691324)*x_ref[2]
-        ref[1,4,0,0]=(-0.0370003524292)*x_ref[0]**o+(-0.0463848489957)*x_ref[0]+(0.940061458694)*x_ref[1]**o+(0.592787058925)*x_ref[1]+(-0.217284379638)*x_ref[2]**o+(-0.11746834109)*x_ref[2]
-        ref[1,4,0,1]=(0.830404283093)*x_ref[0]**o+(0.268135490403)*x_ref[0]+(-0.894500398195)*x_ref[1]**o+(0.751042648917)*x_ref[1]+(0.687583292754)*x_ref[2]**o+(-0.884596509742)*x_ref[2]
-        ref[1,4,1,0]=(0.414764592469)*x_ref[0]**o+(-0.529613347919)*x_ref[0]+(-0.727435115594)*x_ref[1]**o+(-0.546579777725)*x_ref[1]+(0.378011893971)*x_ref[2]**o+(-0.578081183238)*x_ref[2]
-        ref[1,4,1,1]=(0.406513376747)*x_ref[0]**o+(-0.350132869579)*x_ref[0]+(-0.557954631299)*x_ref[1]**o+(0.868176175754)*x_ref[1]+(0.793021832632)*x_ref[2]**o+(0.280529771851)*x_ref[2]
-        ref[1,4,2,0]=(0.56741953575)*x_ref[0]**o+(0.0115947684302)*x_ref[0]+(0.872812725363)*x_ref[1]**o+(-0.215183541745)*x_ref[1]+(0.64853692203)*x_ref[2]**o+(-0.139561471922)*x_ref[2]
-        ref[1,4,2,1]=(0.650916904666)*x_ref[0]**o+(0.878765271839)*x_ref[0]+(0.0141264348052)*x_ref[1]**o+(-0.56314426774)*x_ref[1]+(-0.267854377704)*x_ref[2]**o+(0.852271380667)*x_ref[2]
-        ref[2,0,0,0]=(0.948359141577)*x_ref[0]**o+(-0.0881747280974)*x_ref[0]+(0.804871563368)*x_ref[1]**o+(-0.0298585763446)*x_ref[1]+(0.506923333569)*x_ref[2]**o+(-0.920947093648)*x_ref[2]
-        ref[2,0,0,1]=(-0.0144221258584)*x_ref[0]**o+(-0.679723072824)*x_ref[0]+(0.00829336956687)*x_ref[1]**o+(0.675680809303)*x_ref[1]+(-0.803195231536)*x_ref[2]**o+(0.70240358571)*x_ref[2]
-        ref[2,0,1,0]=(-0.159174987706)*x_ref[0]**o+(0.922309271483)*x_ref[0]+(0.344354343035)*x_ref[1]**o+(-0.00954038311323)*x_ref[1]+(-0.50225452804)*x_ref[2]**o+(0.355899734308)*x_ref[2]
-        ref[2,0,1,1]=(0.0857611780404)*x_ref[0]**o+(0.876479431983)*x_ref[0]+(0.105049158502)*x_ref[1]**o+(-0.530308461426)*x_ref[1]+(-0.553136649343)*x_ref[2]**o+(0.385458516481)*x_ref[2]
-        ref[2,0,2,0]=(-0.260086070842)*x_ref[0]**o+(0.417766241499)*x_ref[0]+(-0.292370383673)*x_ref[1]**o+(-0.321315349553)*x_ref[1]+(-0.437301444082)*x_ref[2]**o+(0.730845669715)*x_ref[2]
-        ref[2,0,2,1]=(0.132547674276)*x_ref[0]**o+(0.783602886333)*x_ref[0]+(0.822361450413)*x_ref[1]**o+(-0.810402783)*x_ref[1]+(0.759701191023)*x_ref[2]**o+(0.644375788608)*x_ref[2]
-        ref[2,1,0,0]=(-0.841458111227)*x_ref[0]**o+(0.779917641736)*x_ref[0]+(-0.0745587217256)*x_ref[1]**o+(0.938545280143)*x_ref[1]+(0.454600163373)*x_ref[2]**o+(-0.490348377697)*x_ref[2]
-        ref[2,1,0,1]=(-0.876477136174)*x_ref[0]**o+(-0.248200369939)*x_ref[0]+(-0.973654243816)*x_ref[1]**o+(0.482402123794)*x_ref[1]+(-0.776970490827)*x_ref[2]**o+(-0.571349467703)*x_ref[2]
-        ref[2,1,1,0]=(-0.433528193102)*x_ref[0]**o+(-0.57712915767)*x_ref[0]+(-0.328671198058)*x_ref[1]**o+(-0.926873019075)*x_ref[1]+(0.314232739356)*x_ref[2]**o+(-0.199625466412)*x_ref[2]
-        ref[2,1,1,1]=(0.892707770392)*x_ref[0]**o+(-0.680081898234)*x_ref[0]+(-0.754181058483)*x_ref[1]**o+(-0.253728945575)*x_ref[1]+(-0.906373406684)*x_ref[2]**o+(-0.0266435080833)*x_ref[2]
-        ref[2,1,2,0]=(-0.121605378472)*x_ref[0]**o+(-0.503955015634)*x_ref[0]+(-0.0960767196114)*x_ref[1]**o+(-0.937914890361)*x_ref[1]+(0.212042931853)*x_ref[2]**o+(0.930703155408)*x_ref[2]
-        ref[2,1,2,1]=(0.0564159441047)*x_ref[0]**o+(0.842332721105)*x_ref[0]+(0.954741657608)*x_ref[1]**o+(0.73503176)*x_ref[1]+(-0.390679938582)*x_ref[2]**o+(-0.440014747741)*x_ref[2]
-        ref[2,2,0,0]=(0.0100637970821)*x_ref[0]**o+(-0.0283353154145)*x_ref[0]+(0.865360758262)*x_ref[1]**o+(0.780975027988)*x_ref[1]+(0.16115842919)*x_ref[2]**o+(0.247580155656)*x_ref[2]
-        ref[2,2,0,1]=(0.61102059426)*x_ref[0]**o+(-0.198005744101)*x_ref[0]+(0.503568797262)*x_ref[1]**o+(0.0288809726497)*x_ref[1]+(-0.765127098183)*x_ref[2]**o+(0.409803857723)*x_ref[2]
-        ref[2,2,1,0]=(-0.712272018295)*x_ref[0]**o+(-0.62562142063)*x_ref[0]+(-0.579501949719)*x_ref[1]**o+(0.628539275236)*x_ref[1]+(0.0200945124964)*x_ref[2]**o+(0.175966024769)*x_ref[2]
-        ref[2,2,1,1]=(-0.798244445519)*x_ref[0]**o+(-0.376440962535)*x_ref[0]+(-0.134467401497)*x_ref[1]**o+(0.877538294477)*x_ref[1]+(-0.484870741192)*x_ref[2]**o+(-0.224064469935)*x_ref[2]
-        ref[2,2,2,0]=(0.200196926368)*x_ref[0]**o+(-0.528000867086)*x_ref[0]+(-0.708942342624)*x_ref[1]**o+(-0.591994969141)*x_ref[1]+(-0.990641592656)*x_ref[2]**o+(-0.875897347303)*x_ref[2]
-        ref[2,2,2,1]=(0.949113190797)*x_ref[0]**o+(0.867855496786)*x_ref[0]+(-0.0314953438065)*x_ref[1]**o+(-0.371928428005)*x_ref[1]+(-0.526403191063)*x_ref[2]**o+(0.653049122326)*x_ref[2]
-        ref[2,3,0,0]=(-0.353418327127)*x_ref[0]**o+(-0.418588306429)*x_ref[0]+(0.400872043269)*x_ref[1]**o+(0.141907924042)*x_ref[1]+(-0.999869579462)*x_ref[2]**o+(-0.410423954563)*x_ref[2]
-        ref[2,3,0,1]=(-0.240390877307)*x_ref[0]**o+(0.0901879916115)*x_ref[0]+(-0.0734683209657)*x_ref[1]**o+(0.274836005886)*x_ref[1]+(-0.336375498181)*x_ref[2]**o+(-0.754776455221)*x_ref[2]
-        ref[2,3,1,0]=(0.259928460822)*x_ref[0]**o+(-0.227630454708)*x_ref[0]+(0.725968066278)*x_ref[1]**o+(-0.545440695763)*x_ref[1]+(-0.0354926607815)*x_ref[2]**o+(0.365010532181)*x_ref[2]
-        ref[2,3,1,1]=(-0.969799373398)*x_ref[0]**o+(0.514498233214)*x_ref[0]+(0.907450925318)*x_ref[1]**o+(-0.234993706406)*x_ref[1]+(0.206323910806)*x_ref[2]**o+(0.209364250369)*x_ref[2]
-        ref[2,3,2,0]=(0.712905565941)*x_ref[0]**o+(-0.353322758263)*x_ref[0]+(0.816861181494)*x_ref[1]**o+(-0.362388243619)*x_ref[1]+(0.302543517607)*x_ref[2]**o+(-0.831280418852)*x_ref[2]
-        ref[2,3,2,1]=(-0.386373711182)*x_ref[0]**o+(0.946914567792)*x_ref[0]+(-0.52795085887)*x_ref[1]**o+(0.86635245964)*x_ref[1]+(0.654261054178)*x_ref[2]**o+(0.452334882498)*x_ref[2]
-        ref[2,4,0,0]=(0.374747033547)*x_ref[0]**o+(-0.3471578669)*x_ref[0]+(0.322217002639)*x_ref[1]**o+(0.92988068982)*x_ref[1]+(-0.642423472369)*x_ref[2]**o+(-0.759623225653)*x_ref[2]
-        ref[2,4,0,1]=(-0.322255157841)*x_ref[0]**o+(-0.253806844569)*x_ref[0]+(-0.0688746199637)*x_ref[1]**o+(0.232840317719)*x_ref[1]+(-0.815623721026)*x_ref[2]**o+(0.43055485562)*x_ref[2]
-        ref[2,4,1,0]=(-0.452320341493)*x_ref[0]**o+(0.755240168228)*x_ref[0]+(-0.892552611066)*x_ref[1]**o+(0.438275161458)*x_ref[1]+(0.441378369388)*x_ref[2]**o+(-0.870501114753)*x_ref[2]
-        ref[2,4,1,1]=(0.496731258286)*x_ref[0]**o+(-0.499918335322)*x_ref[0]+(0.000476061942027)*x_ref[1]**o+(-0.857762621856)*x_ref[1]+(0.957433798133)*x_ref[2]**o+(-0.766450629361)*x_ref[2]
-        ref[2,4,2,0]=(0.860379598562)*x_ref[0]**o+(-0.0816478389485)*x_ref[0]+(-0.438181864676)*x_ref[1]**o+(0.78937427676)*x_ref[1]+(-0.97940010041)*x_ref[2]**o+(0.583914605259)*x_ref[2]
-        ref[2,4,2,1]=(0.23729037277)*x_ref[0]**o+(-0.365380141474)*x_ref[0]+(-0.471505632575)*x_ref[1]**o+(-0.168838288)*x_ref[1]+(-0.519847065791)*x_ref[2]**o+(-0.816100518668)*x_ref[2]
-        ref[3,0,0,0]=(0.729921808661)*x_ref[0]**o+(0.732868255388)*x_ref[0]+(0.305434623795)*x_ref[1]**o+(-0.45402804883)*x_ref[1]+(0.604368334171)*x_ref[2]**o+(-0.179233711008)*x_ref[2]
-        ref[3,0,0,1]=(-0.208916687176)*x_ref[0]**o+(-0.297916049539)*x_ref[0]+(0.854941564423)*x_ref[1]**o+(0.775355543915)*x_ref[1]+(-0.373382357688)*x_ref[2]**o+(0.792557314074)*x_ref[2]
-        ref[3,0,1,0]=(0.606041025674)*x_ref[0]**o+(0.115814644681)*x_ref[0]+(-0.414470914985)*x_ref[1]**o+(-0.136577390174)*x_ref[1]+(0.672303216396)*x_ref[2]**o+(-0.479680752765)*x_ref[2]
-        ref[3,0,1,1]=(-0.535633649471)*x_ref[0]**o+(0.133761944775)*x_ref[0]+(-0.980107507665)*x_ref[1]**o+(0.211561747114)*x_ref[1]+(-0.530648770004)*x_ref[2]**o+(0.417977629512)*x_ref[2]
-        ref[3,0,2,0]=(-0.242797826282)*x_ref[0]**o+(-0.828691638823)*x_ref[0]+(-0.187401612749)*x_ref[1]**o+(-0.453821620107)*x_ref[1]+(-0.475718408605)*x_ref[2]**o+(0.683502702497)*x_ref[2]
-        ref[3,0,2,1]=(-0.66640812951)*x_ref[0]**o+(-0.259184719546)*x_ref[0]+(0.463743732654)*x_ref[1]**o+(0.6746349156)*x_ref[1]+(-0.0532918236783)*x_ref[2]**o+(-0.714197225876)*x_ref[2]
-        ref[3,1,0,0]=(-0.97693616823)*x_ref[0]**o+(-0.825560555757)*x_ref[0]+(0.118452690664)*x_ref[1]**o+(-0.125279874388)*x_ref[1]+(0.733803136335)*x_ref[2]**o+(-0.884902209956)*x_ref[2]
-        ref[3,1,0,1]=(-0.652466190334)*x_ref[0]**o+(0.370106640243)*x_ref[0]+(0.0850861818306)*x_ref[1]**o+(-0.49744492012)*x_ref[1]+(-0.843498619618)*x_ref[2]**o+(-0.0480070808698)*x_ref[2]
-        ref[3,1,1,0]=(-0.450526704276)*x_ref[0]**o+(0.430774951776)*x_ref[0]+(-0.956799540696)*x_ref[1]**o+(0.820090546747)*x_ref[1]+(0.831582198997)*x_ref[2]**o+(0.491042906394)*x_ref[2]
-        ref[3,1,1,1]=(0.419717807665)*x_ref[0]**o+(0.320904534666)*x_ref[0]+(-0.483247938999)*x_ref[1]**o+(0.82174341564)*x_ref[1]+(-0.441719998974)*x_ref[2]**o+(0.691713322239)*x_ref[2]
-        ref[3,1,2,0]=(0.255464093123)*x_ref[0]**o+(-0.256334953799)*x_ref[0]+(0.677105284128)*x_ref[1]**o+(-0.584438025212)*x_ref[1]+(0.505820591597)*x_ref[2]**o+(0.247943562937)*x_ref[2]
-        ref[3,1,2,1]=(-0.495204107745)*x_ref[0]**o+(0.234426349601)*x_ref[0]+(0.736969108189)*x_ref[1]**o+(-0.369684409765)*x_ref[1]+(0.164303379282)*x_ref[2]**o+(-0.595757590519)*x_ref[2]
-        ref[3,2,0,0]=(0.238639684591)*x_ref[0]**o+(0.568638143194)*x_ref[0]+(0.972646679042)*x_ref[1]**o+(-0.652648194795)*x_ref[1]+(-0.0530713046414)*x_ref[2]**o+(0.356043665396)*x_ref[2]
-        ref[3,2,0,1]=(0.458539145106)*x_ref[0]**o+(0.111417037398)*x_ref[0]+(-0.135374868193)*x_ref[1]**o+(-0.535451685997)*x_ref[1]+(-0.820797762877)*x_ref[2]**o+(0.122239787933)*x_ref[2]
-        ref[3,2,1,0]=(-0.323251425039)*x_ref[0]**o+(0.106998797206)*x_ref[0]+(-0.0671655760766)*x_ref[1]**o+(0.836342794315)*x_ref[1]+(0.34628715493)*x_ref[2]**o+(-0.11058327806)*x_ref[2]
-        ref[3,2,1,1]=(0.181994203911)*x_ref[0]**o+(-0.710678453639)*x_ref[0]+(0.625606409786)*x_ref[1]**o+(-0.363170328543)*x_ref[1]+(-0.932998745422)*x_ref[2]**o+(-0.0411581284314)*x_ref[2]
-        ref[3,2,2,0]=(0.710847104903)*x_ref[0]**o+(0.483971915285)*x_ref[0]+(0.42996482533)*x_ref[1]**o+(0.456817348253)*x_ref[1]+(0.844562058604)*x_ref[2]**o+(-0.469586014721)*x_ref[2]
-        ref[3,2,2,1]=(-0.845771280837)*x_ref[0]**o+(-0.081384696494)*x_ref[0]+(0.71823377714)*x_ref[1]**o+(-0.846672143168)*x_ref[1]+(-0.139540918461)*x_ref[2]**o+(0.837646131987)*x_ref[2]
-        ref[3,3,0,0]=(-0.958726792109)*x_ref[0]**o+(0.53196455268)*x_ref[0]+(-0.621810423658)*x_ref[1]**o+(-0.0352106197658)*x_ref[1]+(-0.636059207474)*x_ref[2]**o+(-0.0491118207063)*x_ref[2]
-        ref[3,3,0,1]=(0.987836799279)*x_ref[0]**o+(0.41633576224)*x_ref[0]+(0.312021799176)*x_ref[1]**o+(-0.168836582938)*x_ref[1]+(-0.391725003735)*x_ref[2]**o+(-0.158000182269)*x_ref[2]
-        ref[3,3,1,0]=(-0.280868116529)*x_ref[0]**o+(-0.687924000092)*x_ref[0]+(0.865840229722)*x_ref[1]**o+(-0.0823203022874)*x_ref[1]+(-0.857309899784)*x_ref[2]**o+(-0.0657473493059)*x_ref[2]
-        ref[3,3,1,1]=(0.680496030567)*x_ref[0]**o+(0.159575720724)*x_ref[0]+(0.0531895122046)*x_ref[1]**o+(0.359273896084)*x_ref[1]+(0.35084774502)*x_ref[2]**o+(0.0982220259531)*x_ref[2]
-        ref[3,3,2,0]=(0.140872311111)*x_ref[0]**o+(-0.00845309046907)*x_ref[0]+(-0.845527142503)*x_ref[1]**o+(-0.67713103521)*x_ref[1]+(0.972054187828)*x_ref[2]**o+(-0.800664963509)*x_ref[2]
-        ref[3,3,2,1]=(-0.490866666782)*x_ref[0]**o+(-0.0988939523952)*x_ref[0]+(0.236210969508)*x_ref[1]**o+(-0.672617589992)*x_ref[1]+(-0.640558724403)*x_ref[2]**o+(-0.203125267713)*x_ref[2]
-        ref[3,4,0,0]=(0.318438839683)*x_ref[0]**o+(0.0864322377812)*x_ref[0]+(-0.371419701638)*x_ref[1]**o+(-0.311583139142)*x_ref[1]+(-0.0533111244011)*x_ref[2]**o+(0.841240973423)*x_ref[2]
-        ref[3,4,0,1]=(-0.573110771334)*x_ref[0]**o+(0.703852077914)*x_ref[0]+(0.613309217217)*x_ref[1]**o+(0.247223193846)*x_ref[1]+(0.618952485205)*x_ref[2]**o+(-0.395998308184)*x_ref[2]
-        ref[3,4,1,0]=(0.512896938934)*x_ref[0]**o+(0.848653171505)*x_ref[0]+(-0.944903687062)*x_ref[1]**o+(0.179782177607)*x_ref[1]+(-0.0287288996538)*x_ref[2]**o+(-0.385519118293)*x_ref[2]
-        ref[3,4,1,1]=(0.234190647718)*x_ref[0]**o+(0.445478221419)*x_ref[0]+(0.588931676434)*x_ref[1]**o+(0.140788139998)*x_ref[1]+(-0.761952359657)*x_ref[2]**o+(0.92377426359)*x_ref[2]
-        ref[3,4,2,0]=(-0.836038966171)*x_ref[0]**o+(-0.772990045933)*x_ref[0]+(0.0622128209877)*x_ref[1]**o+(-0.73733496141)*x_ref[1]+(0.0234446925161)*x_ref[2]**o+(-0.682234213315)*x_ref[2]
-        ref[3,4,2,1]=(0.250498084214)*x_ref[0]**o+(0.539088356159)*x_ref[0]+(-0.691842680176)*x_ref[1]**o+(0.710040802953)*x_ref[1]+(-0.43691551501)*x_ref[2]**o+(0.710668600989)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.742484780403)*x[0]+(0.680847966059)*x[1]
-        ref=(0.742484780403)*x_ref[0]+(0.680847966059)*x_ref[1]
-      else:
-        arg=(-0.928733928018)*x[0]+(-0.0797736636663)*x[1]+(0.517280695569)*x[2]
-        ref=(-0.928733928018)*x_ref[0]+(-0.0797736636663)*x_ref[1]+(0.517280695569)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        arg[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-        ref[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        ref[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-      else:
-        arg[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        arg[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-        ref[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        ref[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0998962983997)*x[0]+(0.52180906409)*x[1]
-        arg[0,1]=(-0.0315655223925)*x[0]+(-0.0162720186305)*x[1]
-        arg[0,2]=(0.361840834336)*x[0]+(-1.08346005817)*x[1]
-        arg[0,3]=(0.673393991338)*x[0]+(0.571192080367)*x[1]
-        arg[0,4]=(-0.725648335559)*x[0]+(0.866678056281)*x[1]
-        arg[1,0]=(0.7094760871)*x[0]+(0.666899441355)*x[1]
-        arg[1,1]=(-0.0152490017553)*x[0]+(-1.1169188656)*x[1]
-        arg[1,2]=(-1.01408330279)*x[0]+(-1.10348930367)*x[1]
-        arg[1,3]=(0.690904468829)*x[0]+(1.12602486331)*x[1]
-        arg[1,4]=(-0.0391507405365)*x[0]+(-0.338120635003)*x[1]
-        arg[2,0]=(0.175234757619)*x[0]+(1.74258329734)*x[1]
-        arg[2,1]=(0.281950269687)*x[0]+(0.0489231995634)*x[1]
-        arg[2,2]=(1.24244714043)*x[0]+(0.0149577033777)*x[1]
-        arg[2,3]=(-0.706844294482)*x[0]+(-1.85050242116)*x[1]
-        arg[2,4]=(-0.494011860105)*x[0]+(0.0809275159202)*x[1]
-        arg[3,0]=(-0.380877016583)*x[0]+(0.0345520619524)*x[1]
-        arg[3,1]=(1.10464018251)*x[0]+(0.0246274384536)*x[1]
-        arg[3,2]=(-0.00138129982685)*x[0]+(0.776306480938)*x[1]
-        arg[3,3]=(-0.0830044393648)*x[0]+(-0.173691604089)*x[1]
-        arg[3,4]=(0.0909675137463)*x[0]+(0.208083539568)*x[1]
-        ref[0,0]=(0.0998962983997)*x_ref[0]+(0.52180906409)*x_ref[1]
-        ref[0,1]=(-0.0315655223925)*x_ref[0]+(-0.0162720186305)*x_ref[1]
-        ref[0,2]=(0.361840834336)*x_ref[0]+(-1.08346005817)*x_ref[1]
-        ref[0,3]=(0.673393991338)*x_ref[0]+(0.571192080367)*x_ref[1]
-        ref[0,4]=(-0.725648335559)*x_ref[0]+(0.866678056281)*x_ref[1]
-        ref[1,0]=(0.7094760871)*x_ref[0]+(0.666899441355)*x_ref[1]
-        ref[1,1]=(-0.0152490017553)*x_ref[0]+(-1.1169188656)*x_ref[1]
-        ref[1,2]=(-1.01408330279)*x_ref[0]+(-1.10348930367)*x_ref[1]
-        ref[1,3]=(0.690904468829)*x_ref[0]+(1.12602486331)*x_ref[1]
-        ref[1,4]=(-0.0391507405365)*x_ref[0]+(-0.338120635003)*x_ref[1]
-        ref[2,0]=(0.175234757619)*x_ref[0]+(1.74258329734)*x_ref[1]
-        ref[2,1]=(0.281950269687)*x_ref[0]+(0.0489231995634)*x_ref[1]
-        ref[2,2]=(1.24244714043)*x_ref[0]+(0.0149577033777)*x_ref[1]
-        ref[2,3]=(-0.706844294482)*x_ref[0]+(-1.85050242116)*x_ref[1]
-        ref[2,4]=(-0.494011860105)*x_ref[0]+(0.0809275159202)*x_ref[1]
-        ref[3,0]=(-0.380877016583)*x_ref[0]+(0.0345520619524)*x_ref[1]
-        ref[3,1]=(1.10464018251)*x_ref[0]+(0.0246274384536)*x_ref[1]
-        ref[3,2]=(-0.00138129982685)*x_ref[0]+(0.776306480938)*x_ref[1]
-        ref[3,3]=(-0.0830044393648)*x_ref[0]+(-0.173691604089)*x_ref[1]
-        ref[3,4]=(0.0909675137463)*x_ref[0]+(0.208083539568)*x_ref[1]
-      else:
-        arg[0,0]=(0.0539484604772)*x[0]+(-0.220817236218)*x[1]+(-0.853759265774)*x[2]
-        arg[0,1]=(0.336027623724)*x[0]+(-0.111775563754)*x[1]+(0.646672879096)*x[2]
-        arg[0,2]=(0.650722528854)*x[0]+(0.0924672090652)*x[1]+(-0.881798566157)*x[2]
-        arg[0,3]=(0.276745374112)*x[0]+(-1.34491685419)*x[1]+(-0.833420124328)*x[2]
-        arg[0,4]=(1.50686931219)*x[0]+(0.489530477585)*x[1]+(1.74836249628)*x[2]
-        arg[1,0]=(-0.240001512118)*x[0]+(0.350823736593)*x[1]+(-0.227106949276)*x[2]
-        arg[1,1]=(0.354636302436)*x[0]+(-0.0893490250257)*x[1]+(-0.0650366762176)*x[2]
-        arg[1,2]=(-0.319714829694)*x[0]+(0.43056121683)*x[1]+(0.109856817034)*x[2]
-        arg[1,3]=(-1.17581255544)*x[0]+(-0.491431894533)*x[1]+(0.220857799733)*x[2]
-        arg[1,4]=(1.5680027633)*x[0]+(-0.249723385268)*x[1]+(-1.72056978299)*x[2]
-        arg[2,0]=(0.197753675106)*x[0]+(0.314723848519)*x[1]+(0.718038926838)*x[2]
-        arg[2,1]=(0.13916867566)*x[0]+(-0.0345156812431)*x[1]+(0.34208613933)*x[2]
-        arg[2,2]=(-0.275775747114)*x[0]+(0.299200648073)*x[1]+(0.37950303615)*x[2]
-        arg[2,3]=(0.685209641306)*x[0]+(-0.347743700679)*x[1]+(0.356023331014)*x[2]
-        arg[2,4]=(-0.232082602587)*x[0]+(-0.942200667607)*x[1]+(0.961251099323)*x[2]
-        arg[3,0]=(0.59399111477)*x[0]+(1.06884076218)*x[1]+(-0.194044225109)*x[2]
-        arg[3,1]=(0.522006012644)*x[0]+(0.0804272287843)*x[1]+(0.263440832249)*x[2]
-        arg[3,2]=(1.25330346872)*x[0]+(-0.757485536992)*x[1]+(0.398906137626)*x[2]
-        arg[3,3]=(0.395712858673)*x[0]+(0.423226476819)*x[1]+(0.186209217392)*x[2]
-        arg[3,4]=(0.153657073245)*x[0]+(0.536681875397)*x[1]+(0.773972080743)*x[2]
-        ref[0,0]=(0.0539484604772)*x_ref[0]+(-0.220817236218)*x_ref[1]+(-0.853759265774)*x_ref[2]
-        ref[0,1]=(0.336027623724)*x_ref[0]+(-0.111775563754)*x_ref[1]+(0.646672879096)*x_ref[2]
-        ref[0,2]=(0.650722528854)*x_ref[0]+(0.0924672090652)*x_ref[1]+(-0.881798566157)*x_ref[2]
-        ref[0,3]=(0.276745374112)*x_ref[0]+(-1.34491685419)*x_ref[1]+(-0.833420124328)*x_ref[2]
-        ref[0,4]=(1.50686931219)*x_ref[0]+(0.489530477585)*x_ref[1]+(1.74836249628)*x_ref[2]
-        ref[1,0]=(-0.240001512118)*x_ref[0]+(0.350823736593)*x_ref[1]+(-0.227106949276)*x_ref[2]
-        ref[1,1]=(0.354636302436)*x_ref[0]+(-0.0893490250257)*x_ref[1]+(-0.0650366762176)*x_ref[2]
-        ref[1,2]=(-0.319714829694)*x_ref[0]+(0.43056121683)*x_ref[1]+(0.109856817034)*x_ref[2]
-        ref[1,3]=(-1.17581255544)*x_ref[0]+(-0.491431894533)*x_ref[1]+(0.220857799733)*x_ref[2]
-        ref[1,4]=(1.5680027633)*x_ref[0]+(-0.249723385268)*x_ref[1]+(-1.72056978299)*x_ref[2]
-        ref[2,0]=(0.197753675106)*x_ref[0]+(0.314723848519)*x_ref[1]+(0.718038926838)*x_ref[2]
-        ref[2,1]=(0.13916867566)*x_ref[0]+(-0.0345156812431)*x_ref[1]+(0.34208613933)*x_ref[2]
-        ref[2,2]=(-0.275775747114)*x_ref[0]+(0.299200648073)*x_ref[1]+(0.37950303615)*x_ref[2]
-        ref[2,3]=(0.685209641306)*x_ref[0]+(-0.347743700679)*x_ref[1]+(0.356023331014)*x_ref[2]
-        ref[2,4]=(-0.232082602587)*x_ref[0]+(-0.942200667607)*x_ref[1]+(0.961251099323)*x_ref[2]
-        ref[3,0]=(0.59399111477)*x_ref[0]+(1.06884076218)*x_ref[1]+(-0.194044225109)*x_ref[2]
-        ref[3,1]=(0.522006012644)*x_ref[0]+(0.0804272287843)*x_ref[1]+(0.263440832249)*x_ref[2]
-        ref[3,2]=(1.25330346872)*x_ref[0]+(-0.757485536992)*x_ref[1]+(0.398906137626)*x_ref[2]
-        ref[3,3]=(0.395712858673)*x_ref[0]+(0.423226476819)*x_ref[1]+(0.186209217392)*x_ref[2]
-        ref[3,4]=(0.153657073245)*x_ref[0]+(0.536681875397)*x_ref[1]+(0.773972080743)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.223040346102)*x[0]+(-0.40941514813)*x[1]
-        arg[0,0,1]=(-0.580051757755)*x[0]+(0.0793034026033)*x[1]
-        arg[0,1,0]=(-0.0576028239384)*x[0]+(1.058218319)*x[1]
-        arg[0,1,1]=(0.0914458475861)*x[0]+(1.48556548656)*x[1]
-        arg[1,0,0]=(0.211508891263)*x[0]+(-1.44088884228)*x[1]
-        arg[1,0,1]=(-0.753661543994)*x[0]+(0.675867607628)*x[1]
-        arg[1,1,0]=(-0.289500075744)*x[0]+(0.573476965486)*x[1]
-        arg[1,1,1]=(0.182150073163)*x[0]+(0.937376164291)*x[1]
-        arg[2,0,0]=(1.18815471968)*x[0]+(-0.860110330094)*x[1]
-        arg[2,0,1]=(-0.238305806178)*x[0]+(-1.27916609495)*x[1]
-        arg[2,1,0]=(-0.955511742125)*x[0]+(-0.605135532767)*x[1]
-        arg[2,1,1]=(0.342919038059)*x[0]+(-0.0980330687702)*x[1]
-        arg[3,0,0]=(0.700429242018)*x[0]+(0.742017035289)*x[1]
-        arg[3,0,1]=(0.344011429773)*x[0]+(-1.64251335376)*x[1]
-        arg[3,1,0]=(-0.177856966174)*x[0]+(0.180846653076)*x[1]
-        arg[3,1,1]=(-1.59212766197)*x[0]+(0.523595606775)*x[1]
-        arg[4,0,0]=(-0.264023123775)*x[0]+(0.545951813489)*x[1]
-        arg[4,0,1]=(-1.31580310435)*x[0]+(-0.105998549363)*x[1]
-        arg[4,1,0]=(0.878775616997)*x[0]+(0.0436540350692)*x[1]
-        arg[4,1,1]=(-1.50886945727)*x[0]+(-0.156133758872)*x[1]
-        arg[5,0,0]=(-0.196603805975)*x[0]+(1.3924198011)*x[1]
-        arg[5,0,1]=(0.688423025668)*x[0]+(-1.1304740704)*x[1]
-        arg[5,1,0]=(1.05132745721)*x[0]+(-0.0190306576753)*x[1]
-        arg[5,1,1]=(-0.336157880135)*x[0]+(0.948775404759)*x[1]
-        ref[0,0,0]=(0.223040346102)*x_ref[0]+(-0.40941514813)*x_ref[1]
-        ref[0,0,1]=(-0.580051757755)*x_ref[0]+(0.0793034026033)*x_ref[1]
-        ref[0,1,0]=(-0.0576028239384)*x_ref[0]+(1.058218319)*x_ref[1]
-        ref[0,1,1]=(0.0914458475861)*x_ref[0]+(1.48556548656)*x_ref[1]
-        ref[1,0,0]=(0.211508891263)*x_ref[0]+(-1.44088884228)*x_ref[1]
-        ref[1,0,1]=(-0.753661543994)*x_ref[0]+(0.675867607628)*x_ref[1]
-        ref[1,1,0]=(-0.289500075744)*x_ref[0]+(0.573476965486)*x_ref[1]
-        ref[1,1,1]=(0.182150073163)*x_ref[0]+(0.937376164291)*x_ref[1]
-        ref[2,0,0]=(1.18815471968)*x_ref[0]+(-0.860110330094)*x_ref[1]
-        ref[2,0,1]=(-0.238305806178)*x_ref[0]+(-1.27916609495)*x_ref[1]
-        ref[2,1,0]=(-0.955511742125)*x_ref[0]+(-0.605135532767)*x_ref[1]
-        ref[2,1,1]=(0.342919038059)*x_ref[0]+(-0.0980330687702)*x_ref[1]
-        ref[3,0,0]=(0.700429242018)*x_ref[0]+(0.742017035289)*x_ref[1]
-        ref[3,0,1]=(0.344011429773)*x_ref[0]+(-1.64251335376)*x_ref[1]
-        ref[3,1,0]=(-0.177856966174)*x_ref[0]+(0.180846653076)*x_ref[1]
-        ref[3,1,1]=(-1.59212766197)*x_ref[0]+(0.523595606775)*x_ref[1]
-        ref[4,0,0]=(-0.264023123775)*x_ref[0]+(0.545951813489)*x_ref[1]
-        ref[4,0,1]=(-1.31580310435)*x_ref[0]+(-0.105998549363)*x_ref[1]
-        ref[4,1,0]=(0.878775616997)*x_ref[0]+(0.0436540350692)*x_ref[1]
-        ref[4,1,1]=(-1.50886945727)*x_ref[0]+(-0.156133758872)*x_ref[1]
-        ref[5,0,0]=(-0.196603805975)*x_ref[0]+(1.3924198011)*x_ref[1]
-        ref[5,0,1]=(0.688423025668)*x_ref[0]+(-1.1304740704)*x_ref[1]
-        ref[5,1,0]=(1.05132745721)*x_ref[0]+(-0.0190306576753)*x_ref[1]
-        ref[5,1,1]=(-0.336157880135)*x_ref[0]+(0.948775404759)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.884050876189)*x[0]+(-0.394515582819)*x[1]+(1.3097094442)*x[2]
-        arg[0,0,1]=(-0.816123587792)*x[0]+(0.355197775988)*x[1]+(0.276746708309)*x[2]
-        arg[0,1,0]=(-0.124049709168)*x[0]+(1.18541954468)*x[1]+(0.209504045468)*x[2]
-        arg[0,1,1]=(0.0683100149522)*x[0]+(0.362926075694)*x[1]+(-0.0669691928299)*x[2]
-        arg[1,0,0]=(-1.1421316954)*x[0]+(0.390740725692)*x[1]+(-0.726193980086)*x[2]
-        arg[1,0,1]=(-0.843848580922)*x[0]+(-0.525850215762)*x[1]+(-0.00216507276212)*x[2]
-        arg[1,1,0]=(1.48370169071)*x[0]+(1.0755925183)*x[1]+(0.581274760413)*x[2]
-        arg[1,1,1]=(-1.32186510041)*x[0]+(0.415895688227)*x[1]+(0.0211839725586)*x[2]
-        arg[2,0,0]=(0.064488762235)*x[0]+(1.49328658794)*x[1]+(1.58091496737)*x[2]
-        arg[2,0,1]=(0.0366527940907)*x[0]+(0.777734357144)*x[1]+(-1.42974160614)*x[2]
-        arg[2,1,0]=(1.55170579579)*x[0]+(-1.93288667897)*x[1]+(-0.293286140809)*x[2]
-        arg[2,1,1]=(1.20599946796)*x[0]+(0.0227207800543)*x[1]+(0.754694156356)*x[2]
-        arg[3,0,0]=(-0.096426023819)*x[0]+(0.254350817295)*x[1]+(-0.845563802639)*x[2]
-        arg[3,0,1]=(0.259201676184)*x[0]+(-0.10777841018)*x[1]+(0.198814801338)*x[2]
-        arg[3,1,0]=(-0.375693547297)*x[0]+(-0.566070306507)*x[1]+(0.842662788128)*x[2]
-        arg[3,1,1]=(-0.254690046974)*x[0]+(1.68423179439)*x[1]+(-0.514749238215)*x[2]
-        arg[4,0,0]=(-0.283580142327)*x[0]+(-0.906119047897)*x[1]+(1.16264752395)*x[2]
-        arg[4,0,1]=(0.559319137591)*x[0]+(-0.135216628913)*x[1]+(0.0241520443893)*x[2]
-        arg[4,1,0]=(1.51344686911)*x[0]+(0.595733533885)*x[1]+(-0.49014841511)*x[2]
-        arg[4,1,1]=(0.261868556117)*x[0]+(-0.51266470705)*x[1]+(0.617731786544)*x[2]
-        arg[5,0,0]=(-0.947197547436)*x[0]+(1.18970238499)*x[1]+(-0.0491748623501)*x[2]
-        arg[5,0,1]=(0.0541604147191)*x[0]+(-0.844601205099)*x[1]+(1.67419390002)*x[2]
-        arg[5,1,0]=(0.370982789151)*x[0]+(-0.344762868862)*x[1]+(-0.48077628478)*x[2]
-        arg[5,1,1]=(-0.0845487748754)*x[0]+(1.43148171186)*x[1]+(-0.519880423555)*x[2]
-        ref[0,0,0]=(-0.884050876189)*x_ref[0]+(-0.394515582819)*x_ref[1]+(1.3097094442)*x_ref[2]
-        ref[0,0,1]=(-0.816123587792)*x_ref[0]+(0.355197775988)*x_ref[1]+(0.276746708309)*x_ref[2]
-        ref[0,1,0]=(-0.124049709168)*x_ref[0]+(1.18541954468)*x_ref[1]+(0.209504045468)*x_ref[2]
-        ref[0,1,1]=(0.0683100149522)*x_ref[0]+(0.362926075694)*x_ref[1]+(-0.0669691928299)*x_ref[2]
-        ref[1,0,0]=(-1.1421316954)*x_ref[0]+(0.390740725692)*x_ref[1]+(-0.726193980086)*x_ref[2]
-        ref[1,0,1]=(-0.843848580922)*x_ref[0]+(-0.525850215762)*x_ref[1]+(-0.00216507276212)*x_ref[2]
-        ref[1,1,0]=(1.48370169071)*x_ref[0]+(1.0755925183)*x_ref[1]+(0.581274760413)*x_ref[2]
-        ref[1,1,1]=(-1.32186510041)*x_ref[0]+(0.415895688227)*x_ref[1]+(0.0211839725586)*x_ref[2]
-        ref[2,0,0]=(0.064488762235)*x_ref[0]+(1.49328658794)*x_ref[1]+(1.58091496737)*x_ref[2]
-        ref[2,0,1]=(0.0366527940907)*x_ref[0]+(0.777734357144)*x_ref[1]+(-1.42974160614)*x_ref[2]
-        ref[2,1,0]=(1.55170579579)*x_ref[0]+(-1.93288667897)*x_ref[1]+(-0.293286140809)*x_ref[2]
-        ref[2,1,1]=(1.20599946796)*x_ref[0]+(0.0227207800543)*x_ref[1]+(0.754694156356)*x_ref[2]
-        ref[3,0,0]=(-0.096426023819)*x_ref[0]+(0.254350817295)*x_ref[1]+(-0.845563802639)*x_ref[2]
-        ref[3,0,1]=(0.259201676184)*x_ref[0]+(-0.10777841018)*x_ref[1]+(0.198814801338)*x_ref[2]
-        ref[3,1,0]=(-0.375693547297)*x_ref[0]+(-0.566070306507)*x_ref[1]+(0.842662788128)*x_ref[2]
-        ref[3,1,1]=(-0.254690046974)*x_ref[0]+(1.68423179439)*x_ref[1]+(-0.514749238215)*x_ref[2]
-        ref[4,0,0]=(-0.283580142327)*x_ref[0]+(-0.906119047897)*x_ref[1]+(1.16264752395)*x_ref[2]
-        ref[4,0,1]=(0.559319137591)*x_ref[0]+(-0.135216628913)*x_ref[1]+(0.0241520443893)*x_ref[2]
-        ref[4,1,0]=(1.51344686911)*x_ref[0]+(0.595733533885)*x_ref[1]+(-0.49014841511)*x_ref[2]
-        ref[4,1,1]=(0.261868556117)*x_ref[0]+(-0.51266470705)*x_ref[1]+(0.617731786544)*x_ref[2]
-        ref[5,0,0]=(-0.947197547436)*x_ref[0]+(1.18970238499)*x_ref[1]+(-0.0491748623501)*x_ref[2]
-        ref[5,0,1]=(0.0541604147191)*x_ref[0]+(-0.844601205099)*x_ref[1]+(1.67419390002)*x_ref[2]
-        ref[5,1,0]=(0.370982789151)*x_ref[0]+(-0.344762868862)*x_ref[1]+(-0.48077628478)*x_ref[2]
-        ref[5,1,1]=(-0.0845487748754)*x_ref[0]+(1.43148171186)*x_ref[1]+(-0.519880423555)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.748732264044)*x[0]+(0.326649183672)*x[1]
-        arg[0,0,0,1]=(-0.118874184707)*x[0]+(0.512027378857)*x[1]
-        arg[0,0,1,0]=(0.0907534655112)*x[0]+(0.145249508199)*x[1]
-        arg[0,0,1,1]=(0.879689742122)*x[0]+(-0.238488796672)*x[1]
-        arg[0,0,2,0]=(-0.285226080478)*x[0]+(-0.560477167124)*x[1]
-        arg[0,0,2,1]=(1.3620160918)*x[0]+(-0.97877396699)*x[1]
-        arg[0,1,0,0]=(-1.52439734042)*x[0]+(0.981913225695)*x[1]
-        arg[0,1,0,1]=(-1.19963597544)*x[0]+(1.1571861154)*x[1]
-        arg[0,1,1,0]=(0.822934040682)*x[0]+(-1.75039812758)*x[1]
-        arg[0,1,1,1]=(-0.690374545295)*x[0]+(1.10465673793)*x[1]
-        arg[0,1,2,0]=(-0.222743457309)*x[0]+(-0.499809039611)*x[1]
-        arg[0,1,2,1]=(0.774614333867)*x[0]+(-0.140097281276)*x[1]
-        arg[0,2,0,0]=(0.92399157301)*x[0]+(-1.53184881088)*x[1]
-        arg[0,2,0,1]=(0.14612723475)*x[0]+(0.892066346169)*x[1]
-        arg[0,2,1,0]=(-0.136826339137)*x[0]+(0.0588253058296)*x[1]
-        arg[0,2,1,1]=(-0.73687808603)*x[0]+(0.763659413232)*x[1]
-        arg[0,2,2,0]=(0.669031805455)*x[0]+(0.452748434512)*x[1]
-        arg[0,2,2,1]=(0.969822865927)*x[0]+(0.84449053089)*x[1]
-        arg[0,3,0,0]=(1.05482233425)*x[0]+(0.592437824455)*x[1]
-        arg[0,3,0,1]=(0.632482870556)*x[0]+(0.272691402585)*x[1]
-        arg[0,3,1,0]=(-0.530755710624)*x[0]+(0.798233454742)*x[1]
-        arg[0,3,1,1]=(-0.326644901487)*x[0]+(0.912945575753)*x[1]
-        arg[0,3,2,0]=(0.313672017285)*x[0]+(0.948624232644)*x[1]
-        arg[0,3,2,1]=(-0.985713086674)*x[0]+(0.557682757171)*x[1]
-        arg[0,4,0,0]=(-1.05604811856)*x[0]+(0.953109137724)*x[1]
-        arg[0,4,0,1]=(0.443301072651)*x[0]+(0.063796068208)*x[1]
-        arg[0,4,1,0]=(-0.0166520333953)*x[0]+(0.808947969176)*x[1]
-        arg[0,4,1,1]=(0.447406784488)*x[0]+(0.511727243983)*x[1]
-        arg[0,4,2,0]=(0.966474340588)*x[0]+(0.789208895767)*x[1]
-        arg[0,4,2,1]=(0.5007322363)*x[0]+(0.1211006989)*x[1]
-        arg[1,0,0,0]=(0.328606613916)*x[0]+(-0.874029860851)*x[1]
-        arg[1,0,0,1]=(-0.906174034813)*x[0]+(-0.705820652424)*x[1]
-        arg[1,0,1,0]=(-0.543917624184)*x[0]+(-0.963384956871)*x[1]
-        arg[1,0,1,1]=(-0.516192972362)*x[0]+(0.644782734001)*x[1]
-        arg[1,0,2,0]=(-1.39622140542)*x[0]+(0.292606264905)*x[1]
-        arg[1,0,2,1]=(1.39306984816)*x[0]+(-0.544853887253)*x[1]
-        arg[1,1,0,0]=(-0.0499160669149)*x[0]+(-0.783142164006)*x[1]
-        arg[1,1,0,1]=(0.968157339631)*x[0]+(-1.68767943891)*x[1]
-        arg[1,1,1,0]=(-1.56616531333)*x[0]+(1.057002431)*x[1]
-        arg[1,1,1,1]=(0.759774810848)*x[0]+(-0.217500595483)*x[1]
-        arg[1,1,2,0]=(-0.558666811623)*x[0]+(-0.56110405702)*x[1]
-        arg[1,1,2,1]=(-1.51823291284)*x[0]+(0.968598028275)*x[1]
-        arg[1,2,0,0]=(0.459934430553)*x[0]+(-0.425611928234)*x[1]
-        arg[1,2,0,1]=(0.497077152958)*x[0]+(-0.217468584657)*x[1]
-        arg[1,2,1,0]=(-0.84050521972)*x[0]+(-0.639967173826)*x[1]
-        arg[1,2,1,1]=(1.23982979981)*x[0]+(-0.340962636339)*x[1]
-        arg[1,2,2,0]=(-0.0796290414672)*x[0]+(-0.418766465742)*x[1]
-        arg[1,2,2,1]=(-0.00357466869904)*x[0]+(0.38318423828)*x[1]
-        arg[1,3,0,0]=(-1.06978632139)*x[0]+(-0.293480140024)*x[1]
-        arg[1,3,0,1]=(0.315898405933)*x[0]+(-0.63338147672)*x[1]
-        arg[1,3,1,0]=(-0.570294815011)*x[0]+(0.0492498556666)*x[1]
-        arg[1,3,1,1]=(0.0535633163606)*x[0]+(1.03597167921)*x[1]
-        arg[1,3,2,0]=(0.740363487843)*x[0]+(-0.945398692608)*x[1]
-        arg[1,3,2,1]=(0.0118916598378)*x[0]+(1.13783979963)*x[1]
-        arg[1,4,0,0]=(-0.90818285841)*x[0]+(0.0630620135139)*x[1]
-        arg[1,4,0,1]=(1.28854967547)*x[0]+(0.564058166595)*x[1]
-        arg[1,4,1,0]=(0.0536837223463)*x[0]+(-0.754361313431)*x[1]
-        arg[1,4,1,1]=(-1.4274155179)*x[0]+(-0.0330452395142)*x[1]
-        arg[1,4,2,0]=(-0.0853100557203)*x[0]+(-0.0698244726734)*x[1]
-        arg[1,4,2,1]=(-0.969990013612)*x[0]+(-0.0928692035314)*x[1]
-        arg[2,0,0,0]=(1.402108752)*x[0]+(-0.0601730744903)*x[1]
-        arg[2,0,0,1]=(-0.544125618042)*x[0]+(1.02669845397)*x[1]
-        arg[2,0,1,0]=(-0.259299705101)*x[0]+(-0.449507095724)*x[1]
-        arg[2,0,1,1]=(0.572470083182)*x[0]+(-0.140083185208)*x[1]
-        arg[2,0,2,0]=(1.7708938802)*x[0]+(-0.0924975206473)*x[1]
-        arg[2,0,2,1]=(-0.262417029616)*x[0]+(-0.169562773872)*x[1]
-        arg[2,1,0,0]=(-1.30668657807)*x[0]+(-1.01393009909)*x[1]
-        arg[2,1,0,1]=(0.799588711881)*x[0]+(-1.17126698679)*x[1]
-        arg[2,1,1,0]=(-1.17423919188)*x[0]+(0.321090068168)*x[1]
-        arg[2,1,1,1]=(-0.778912666585)*x[0]+(0.00447436139975)*x[1]
-        arg[2,1,2,0]=(0.40622401744)*x[0]+(0.61089755242)*x[1]
-        arg[2,1,2,1]=(0.550326994175)*x[0]+(1.61303737224)*x[1]
-        arg[2,2,0,0]=(0.931647812671)*x[0]+(-0.93554163705)*x[1]
-        arg[2,2,0,1]=(0.281543117633)*x[0]+(-0.520873020458)*x[1]
-        arg[2,2,1,0]=(1.46731959732)*x[0]+(0.518798296946)*x[1]
-        arg[2,2,1,1]=(-1.18123650343)*x[0]+(-0.145310254643)*x[1]
-        arg[2,2,2,0]=(-0.560745819237)*x[0]+(-1.47844975303)*x[1]
-        arg[2,2,2,1]=(-1.11775616574)*x[0]+(-1.21514252434)*x[1]
-        arg[2,3,0,0]=(0.315369902788)*x[0]+(0.964595236889)*x[1]
-        arg[2,3,0,1]=(-0.907229008161)*x[0]+(1.20677953168)*x[1]
-        arg[2,3,1,0]=(0.0552545457484)*x[0]+(-0.202468129673)*x[1]
-        arg[2,3,1,1]=(-0.832968133648)*x[0]+(0.798887606761)*x[1]
-        arg[2,3,2,0]=(1.0330803155)*x[0]+(0.546834262777)*x[1]
-        arg[2,3,2,1]=(-1.78895672921)*x[0]+(-1.43034307109)*x[1]
-        arg[2,4,0,0]=(0.333456542345)*x[0]+(0.620879982969)*x[1]
-        arg[2,4,0,1]=(-0.141328336229)*x[0]+(-0.568586127044)*x[1]
-        arg[2,4,1,0]=(0.936638826549)*x[0]+(0.262046172423)*x[1]
-        arg[2,4,1,1]=(0.594781145732)*x[0]+(-0.795944581484)*x[1]
-        arg[2,4,2,0]=(-0.0594467711107)*x[0]+(1.65280673317)*x[1]
-        arg[2,4,2,1]=(-0.295492856013)*x[0]+(0.244222123606)*x[1]
-        arg[3,0,0,0]=(0.907207795877)*x[0]+(0.0238682693857)*x[1]
-        arg[3,0,0,1]=(0.767877824626)*x[0]+(0.781729746211)*x[1]
-        arg[3,0,1,0]=(-0.266760960719)*x[0]+(0.109690121766)*x[1]
-        arg[3,0,1,1]=(0.885111787835)*x[0]+(1.83341408518)*x[1]
-        arg[3,0,2,0]=(0.482836215622)*x[0]+(0.202385773036)*x[1]
-        arg[3,0,2,1]=(-0.722931824523)*x[0]+(0.469906208805)*x[1]
-        arg[3,1,0,0]=(0.34246223362)*x[0]+(0.652551099051)*x[1]
-        arg[3,1,0,1]=(-1.24987233614)*x[0]+(-0.208386614512)*x[1]
-        arg[3,1,1,0]=(-0.426021351048)*x[0]+(-0.481440089744)*x[1]
-        arg[3,1,1,1]=(0.402917477117)*x[0]+(0.280066256773)*x[1]
-        arg[3,1,2,0]=(0.846917449307)*x[0]+(-0.890613362071)*x[1]
-        arg[3,1,2,1]=(0.848971364583)*x[0]+(1.28188639634)*x[1]
-        arg[3,2,0,0]=(0.244851870449)*x[0]+(-1.29335472533)*x[1]
-        arg[3,2,0,1]=(-0.679420773687)*x[0]+(0.0533049166584)*x[1]
-        arg[3,2,1,0]=(0.209683196995)*x[0]+(-1.18725405512)*x[1]
-        arg[3,2,1,1]=(1.14374677567)*x[0]+(-0.0360927695675)*x[1]
-        arg[3,2,2,0]=(-0.675139110144)*x[0]+(0.203993983732)*x[1]
-        arg[3,2,2,1]=(-0.237314875828)*x[0]+(-0.581326039718)*x[1]
-        arg[3,3,0,0]=(-0.429825943466)*x[0]+(-0.256971982048)*x[1]
-        arg[3,3,0,1]=(0.520863156649)*x[0]+(-0.149770317657)*x[1]
-        arg[3,3,1,0]=(0.534493615852)*x[0]+(-0.486279758704)*x[1]
-        arg[3,3,1,1]=(1.40465616102)*x[0]+(-0.131521707731)*x[1]
-        arg[3,3,2,0]=(0.171604624229)*x[0]+(0.810160978932)*x[1]
-        arg[3,3,2,1]=(1.28980934106)*x[0]+(-1.0563749584)*x[1]
-        arg[3,4,0,0]=(-0.631680784482)*x[0]+(-1.10885428097)*x[1]
-        arg[3,4,0,1]=(-1.02297901709)*x[0]+(1.30007360034)*x[1]
-        arg[3,4,1,0]=(0.728467970192)*x[0]+(-0.872220126316)*x[1]
-        arg[3,4,1,1]=(1.18596842635)*x[0]+(-0.246158517864)*x[1]
-        arg[3,4,2,0]=(0.158818463065)*x[0]+(-0.687328798914)*x[1]
-        arg[3,4,2,1]=(-0.267029459109)*x[0]+(0.161790218602)*x[1]
-        ref[0,0,0,0]=(0.748732264044)*x_ref[0]+(0.326649183672)*x_ref[1]
-        ref[0,0,0,1]=(-0.118874184707)*x_ref[0]+(0.512027378857)*x_ref[1]
-        ref[0,0,1,0]=(0.0907534655112)*x_ref[0]+(0.145249508199)*x_ref[1]
-        ref[0,0,1,1]=(0.879689742122)*x_ref[0]+(-0.238488796672)*x_ref[1]
-        ref[0,0,2,0]=(-0.285226080478)*x_ref[0]+(-0.560477167124)*x_ref[1]
-        ref[0,0,2,1]=(1.3620160918)*x_ref[0]+(-0.97877396699)*x_ref[1]
-        ref[0,1,0,0]=(-1.52439734042)*x_ref[0]+(0.981913225695)*x_ref[1]
-        ref[0,1,0,1]=(-1.19963597544)*x_ref[0]+(1.1571861154)*x_ref[1]
-        ref[0,1,1,0]=(0.822934040682)*x_ref[0]+(-1.75039812758)*x_ref[1]
-        ref[0,1,1,1]=(-0.690374545295)*x_ref[0]+(1.10465673793)*x_ref[1]
-        ref[0,1,2,0]=(-0.222743457309)*x_ref[0]+(-0.499809039611)*x_ref[1]
-        ref[0,1,2,1]=(0.774614333867)*x_ref[0]+(-0.140097281276)*x_ref[1]
-        ref[0,2,0,0]=(0.92399157301)*x_ref[0]+(-1.53184881088)*x_ref[1]
-        ref[0,2,0,1]=(0.14612723475)*x_ref[0]+(0.892066346169)*x_ref[1]
-        ref[0,2,1,0]=(-0.136826339137)*x_ref[0]+(0.0588253058296)*x_ref[1]
-        ref[0,2,1,1]=(-0.73687808603)*x_ref[0]+(0.763659413232)*x_ref[1]
-        ref[0,2,2,0]=(0.669031805455)*x_ref[0]+(0.452748434512)*x_ref[1]
-        ref[0,2,2,1]=(0.969822865927)*x_ref[0]+(0.84449053089)*x_ref[1]
-        ref[0,3,0,0]=(1.05482233425)*x_ref[0]+(0.592437824455)*x_ref[1]
-        ref[0,3,0,1]=(0.632482870556)*x_ref[0]+(0.272691402585)*x_ref[1]
-        ref[0,3,1,0]=(-0.530755710624)*x_ref[0]+(0.798233454742)*x_ref[1]
-        ref[0,3,1,1]=(-0.326644901487)*x_ref[0]+(0.912945575753)*x_ref[1]
-        ref[0,3,2,0]=(0.313672017285)*x_ref[0]+(0.948624232644)*x_ref[1]
-        ref[0,3,2,1]=(-0.985713086674)*x_ref[0]+(0.557682757171)*x_ref[1]
-        ref[0,4,0,0]=(-1.05604811856)*x_ref[0]+(0.953109137724)*x_ref[1]
-        ref[0,4,0,1]=(0.443301072651)*x_ref[0]+(0.063796068208)*x_ref[1]
-        ref[0,4,1,0]=(-0.0166520333953)*x_ref[0]+(0.808947969176)*x_ref[1]
-        ref[0,4,1,1]=(0.447406784488)*x_ref[0]+(0.511727243983)*x_ref[1]
-        ref[0,4,2,0]=(0.966474340588)*x_ref[0]+(0.789208895767)*x_ref[1]
-        ref[0,4,2,1]=(0.5007322363)*x_ref[0]+(0.1211006989)*x_ref[1]
-        ref[1,0,0,0]=(0.328606613916)*x_ref[0]+(-0.874029860851)*x_ref[1]
-        ref[1,0,0,1]=(-0.906174034813)*x_ref[0]+(-0.705820652424)*x_ref[1]
-        ref[1,0,1,0]=(-0.543917624184)*x_ref[0]+(-0.963384956871)*x_ref[1]
-        ref[1,0,1,1]=(-0.516192972362)*x_ref[0]+(0.644782734001)*x_ref[1]
-        ref[1,0,2,0]=(-1.39622140542)*x_ref[0]+(0.292606264905)*x_ref[1]
-        ref[1,0,2,1]=(1.39306984816)*x_ref[0]+(-0.544853887253)*x_ref[1]
-        ref[1,1,0,0]=(-0.0499160669149)*x_ref[0]+(-0.783142164006)*x_ref[1]
-        ref[1,1,0,1]=(0.968157339631)*x_ref[0]+(-1.68767943891)*x_ref[1]
-        ref[1,1,1,0]=(-1.56616531333)*x_ref[0]+(1.057002431)*x_ref[1]
-        ref[1,1,1,1]=(0.759774810848)*x_ref[0]+(-0.217500595483)*x_ref[1]
-        ref[1,1,2,0]=(-0.558666811623)*x_ref[0]+(-0.56110405702)*x_ref[1]
-        ref[1,1,2,1]=(-1.51823291284)*x_ref[0]+(0.968598028275)*x_ref[1]
-        ref[1,2,0,0]=(0.459934430553)*x_ref[0]+(-0.425611928234)*x_ref[1]
-        ref[1,2,0,1]=(0.497077152958)*x_ref[0]+(-0.217468584657)*x_ref[1]
-        ref[1,2,1,0]=(-0.84050521972)*x_ref[0]+(-0.639967173826)*x_ref[1]
-        ref[1,2,1,1]=(1.23982979981)*x_ref[0]+(-0.340962636339)*x_ref[1]
-        ref[1,2,2,0]=(-0.0796290414672)*x_ref[0]+(-0.418766465742)*x_ref[1]
-        ref[1,2,2,1]=(-0.00357466869904)*x_ref[0]+(0.38318423828)*x_ref[1]
-        ref[1,3,0,0]=(-1.06978632139)*x_ref[0]+(-0.293480140024)*x_ref[1]
-        ref[1,3,0,1]=(0.315898405933)*x_ref[0]+(-0.63338147672)*x_ref[1]
-        ref[1,3,1,0]=(-0.570294815011)*x_ref[0]+(0.0492498556666)*x_ref[1]
-        ref[1,3,1,1]=(0.0535633163606)*x_ref[0]+(1.03597167921)*x_ref[1]
-        ref[1,3,2,0]=(0.740363487843)*x_ref[0]+(-0.945398692608)*x_ref[1]
-        ref[1,3,2,1]=(0.0118916598378)*x_ref[0]+(1.13783979963)*x_ref[1]
-        ref[1,4,0,0]=(-0.90818285841)*x_ref[0]+(0.0630620135139)*x_ref[1]
-        ref[1,4,0,1]=(1.28854967547)*x_ref[0]+(0.564058166595)*x_ref[1]
-        ref[1,4,1,0]=(0.0536837223463)*x_ref[0]+(-0.754361313431)*x_ref[1]
-        ref[1,4,1,1]=(-1.4274155179)*x_ref[0]+(-0.0330452395142)*x_ref[1]
-        ref[1,4,2,0]=(-0.0853100557203)*x_ref[0]+(-0.0698244726734)*x_ref[1]
-        ref[1,4,2,1]=(-0.969990013612)*x_ref[0]+(-0.0928692035314)*x_ref[1]
-        ref[2,0,0,0]=(1.402108752)*x_ref[0]+(-0.0601730744903)*x_ref[1]
-        ref[2,0,0,1]=(-0.544125618042)*x_ref[0]+(1.02669845397)*x_ref[1]
-        ref[2,0,1,0]=(-0.259299705101)*x_ref[0]+(-0.449507095724)*x_ref[1]
-        ref[2,0,1,1]=(0.572470083182)*x_ref[0]+(-0.140083185208)*x_ref[1]
-        ref[2,0,2,0]=(1.7708938802)*x_ref[0]+(-0.0924975206473)*x_ref[1]
-        ref[2,0,2,1]=(-0.262417029616)*x_ref[0]+(-0.169562773872)*x_ref[1]
-        ref[2,1,0,0]=(-1.30668657807)*x_ref[0]+(-1.01393009909)*x_ref[1]
-        ref[2,1,0,1]=(0.799588711881)*x_ref[0]+(-1.17126698679)*x_ref[1]
-        ref[2,1,1,0]=(-1.17423919188)*x_ref[0]+(0.321090068168)*x_ref[1]
-        ref[2,1,1,1]=(-0.778912666585)*x_ref[0]+(0.00447436139975)*x_ref[1]
-        ref[2,1,2,0]=(0.40622401744)*x_ref[0]+(0.61089755242)*x_ref[1]
-        ref[2,1,2,1]=(0.550326994175)*x_ref[0]+(1.61303737224)*x_ref[1]
-        ref[2,2,0,0]=(0.931647812671)*x_ref[0]+(-0.93554163705)*x_ref[1]
-        ref[2,2,0,1]=(0.281543117633)*x_ref[0]+(-0.520873020458)*x_ref[1]
-        ref[2,2,1,0]=(1.46731959732)*x_ref[0]+(0.518798296946)*x_ref[1]
-        ref[2,2,1,1]=(-1.18123650343)*x_ref[0]+(-0.145310254643)*x_ref[1]
-        ref[2,2,2,0]=(-0.560745819237)*x_ref[0]+(-1.47844975303)*x_ref[1]
-        ref[2,2,2,1]=(-1.11775616574)*x_ref[0]+(-1.21514252434)*x_ref[1]
-        ref[2,3,0,0]=(0.315369902788)*x_ref[0]+(0.964595236889)*x_ref[1]
-        ref[2,3,0,1]=(-0.907229008161)*x_ref[0]+(1.20677953168)*x_ref[1]
-        ref[2,3,1,0]=(0.0552545457484)*x_ref[0]+(-0.202468129673)*x_ref[1]
-        ref[2,3,1,1]=(-0.832968133648)*x_ref[0]+(0.798887606761)*x_ref[1]
-        ref[2,3,2,0]=(1.0330803155)*x_ref[0]+(0.546834262777)*x_ref[1]
-        ref[2,3,2,1]=(-1.78895672921)*x_ref[0]+(-1.43034307109)*x_ref[1]
-        ref[2,4,0,0]=(0.333456542345)*x_ref[0]+(0.620879982969)*x_ref[1]
-        ref[2,4,0,1]=(-0.141328336229)*x_ref[0]+(-0.568586127044)*x_ref[1]
-        ref[2,4,1,0]=(0.936638826549)*x_ref[0]+(0.262046172423)*x_ref[1]
-        ref[2,4,1,1]=(0.594781145732)*x_ref[0]+(-0.795944581484)*x_ref[1]
-        ref[2,4,2,0]=(-0.0594467711107)*x_ref[0]+(1.65280673317)*x_ref[1]
-        ref[2,4,2,1]=(-0.295492856013)*x_ref[0]+(0.244222123606)*x_ref[1]
-        ref[3,0,0,0]=(0.907207795877)*x_ref[0]+(0.0238682693857)*x_ref[1]
-        ref[3,0,0,1]=(0.767877824626)*x_ref[0]+(0.781729746211)*x_ref[1]
-        ref[3,0,1,0]=(-0.266760960719)*x_ref[0]+(0.109690121766)*x_ref[1]
-        ref[3,0,1,1]=(0.885111787835)*x_ref[0]+(1.83341408518)*x_ref[1]
-        ref[3,0,2,0]=(0.482836215622)*x_ref[0]+(0.202385773036)*x_ref[1]
-        ref[3,0,2,1]=(-0.722931824523)*x_ref[0]+(0.469906208805)*x_ref[1]
-        ref[3,1,0,0]=(0.34246223362)*x_ref[0]+(0.652551099051)*x_ref[1]
-        ref[3,1,0,1]=(-1.24987233614)*x_ref[0]+(-0.208386614512)*x_ref[1]
-        ref[3,1,1,0]=(-0.426021351048)*x_ref[0]+(-0.481440089744)*x_ref[1]
-        ref[3,1,1,1]=(0.402917477117)*x_ref[0]+(0.280066256773)*x_ref[1]
-        ref[3,1,2,0]=(0.846917449307)*x_ref[0]+(-0.890613362071)*x_ref[1]
-        ref[3,1,2,1]=(0.848971364583)*x_ref[0]+(1.28188639634)*x_ref[1]
-        ref[3,2,0,0]=(0.244851870449)*x_ref[0]+(-1.29335472533)*x_ref[1]
-        ref[3,2,0,1]=(-0.679420773687)*x_ref[0]+(0.0533049166584)*x_ref[1]
-        ref[3,2,1,0]=(0.209683196995)*x_ref[0]+(-1.18725405512)*x_ref[1]
-        ref[3,2,1,1]=(1.14374677567)*x_ref[0]+(-0.0360927695675)*x_ref[1]
-        ref[3,2,2,0]=(-0.675139110144)*x_ref[0]+(0.203993983732)*x_ref[1]
-        ref[3,2,2,1]=(-0.237314875828)*x_ref[0]+(-0.581326039718)*x_ref[1]
-        ref[3,3,0,0]=(-0.429825943466)*x_ref[0]+(-0.256971982048)*x_ref[1]
-        ref[3,3,0,1]=(0.520863156649)*x_ref[0]+(-0.149770317657)*x_ref[1]
-        ref[3,3,1,0]=(0.534493615852)*x_ref[0]+(-0.486279758704)*x_ref[1]
-        ref[3,3,1,1]=(1.40465616102)*x_ref[0]+(-0.131521707731)*x_ref[1]
-        ref[3,3,2,0]=(0.171604624229)*x_ref[0]+(0.810160978932)*x_ref[1]
-        ref[3,3,2,1]=(1.28980934106)*x_ref[0]+(-1.0563749584)*x_ref[1]
-        ref[3,4,0,0]=(-0.631680784482)*x_ref[0]+(-1.10885428097)*x_ref[1]
-        ref[3,4,0,1]=(-1.02297901709)*x_ref[0]+(1.30007360034)*x_ref[1]
-        ref[3,4,1,0]=(0.728467970192)*x_ref[0]+(-0.872220126316)*x_ref[1]
-        ref[3,4,1,1]=(1.18596842635)*x_ref[0]+(-0.246158517864)*x_ref[1]
-        ref[3,4,2,0]=(0.158818463065)*x_ref[0]+(-0.687328798914)*x_ref[1]
-        ref[3,4,2,1]=(-0.267029459109)*x_ref[0]+(0.161790218602)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.41028779384)*x[0]+(-1.69085638593)*x[1]+(-0.626478106748)*x[2]
-        arg[0,0,0,1]=(-0.322729407761)*x[0]+(-0.311218478587)*x[1]+(-0.329375635778)*x[2]
-        arg[0,0,1,0]=(-0.16111144722)*x[0]+(0.864377600354)*x[1]+(-1.01349863575)*x[2]
-        arg[0,0,1,1]=(0.0720111273067)*x[0]+(1.40365232221)*x[1]+(0.292610528868)*x[2]
-        arg[0,0,2,0]=(-1.21827641959)*x[0]+(0.168559044212)*x[1]+(0.841389848275)*x[2]
-        arg[0,0,2,1]=(0.631258821218)*x[0]+(-1.22185752256)*x[1]+(0.0213133635991)*x[2]
-        arg[0,1,0,0]=(-0.55959466492)*x[0]+(0.567105256147)*x[1]+(0.185414627961)*x[2]
-        arg[0,1,0,1]=(1.42576865692)*x[0]+(-1.38354595053)*x[1]+(1.08902163491)*x[2]
-        arg[0,1,1,0]=(-0.441288277712)*x[0]+(-0.412579680073)*x[1]+(0.85969923606)*x[2]
-        arg[0,1,1,1]=(1.20924692667)*x[0]+(-0.263790869016)*x[1]+(-0.117388627799)*x[2]
-        arg[0,1,2,0]=(-0.849546239235)*x[0]+(-0.41970601628)*x[1]+(0.712637692553)*x[2]
-        arg[0,1,2,1]=(0.665825646772)*x[0]+(-0.49641548077)*x[1]+(0.0243383084422)*x[2]
-        arg[0,2,0,0]=(0.158298703766)*x[0]+(-1.38559416875)*x[1]+(-0.549526684962)*x[2]
-        arg[0,2,0,1]=(0.290664973202)*x[0]+(-0.725089032773)*x[1]+(-0.420805410829)*x[2]
-        arg[0,2,1,0]=(-0.371388631358)*x[0]+(0.712788591622)*x[1]+(0.708499722908)*x[2]
-        arg[0,2,1,1]=(-0.209234718871)*x[0]+(-0.559384946846)*x[1]+(-0.18126082565)*x[2]
-        arg[0,2,2,0]=(0.295605948328)*x[0]+(0.0787080259554)*x[1]+(-0.413453606631)*x[2]
-        arg[0,2,2,1]=(-0.951652076608)*x[0]+(0.412030442608)*x[1]+(-1.0098591628)*x[2]
-        arg[0,3,0,0]=(0.38805130758)*x[0]+(0.725062113278)*x[1]+(-0.0789722367715)*x[2]
-        arg[0,3,0,1]=(-0.856689544368)*x[0]+(-0.378806165724)*x[1]+(-1.56132477796)*x[2]
-        arg[0,3,1,0]=(0.948414643284)*x[0]+(-0.223099011255)*x[1]+(-0.164540510924)*x[2]
-        arg[0,3,1,1]=(-0.290272025223)*x[0]+(0.0110236571203)*x[1]+(0.0344804634468)*x[2]
-        arg[0,3,2,0]=(-1.06973937948)*x[0]+(-0.19210617162)*x[1]+(-0.0319179806513)*x[2]
-        arg[0,3,2,1]=(0.873398122756)*x[0]+(0.87424619659)*x[1]+(0.130681723853)*x[2]
-        arg[0,4,0,0]=(-0.231238303513)*x[0]+(1.13248606226)*x[1]+(1.08638890671)*x[2]
-        arg[0,4,0,1]=(0.0325659323288)*x[0]+(1.53278397594)*x[1]+(-0.0823455709949)*x[2]
-        arg[0,4,1,0]=(-0.415558245155)*x[0]+(-0.468794623975)*x[1]+(-0.4219946425)*x[2]
-        arg[0,4,1,1]=(0.687857094934)*x[0]+(-0.316748377318)*x[1]+(1.51841645514)*x[2]
-        arg[0,4,2,0]=(-0.842163178579)*x[0]+(-0.459357139258)*x[1]+(-0.774999285967)*x[2]
-        arg[0,4,2,1]=(0.361059525968)*x[0]+(0.302800510186)*x[1]+(0.164988681972)*x[2]
-        arg[1,0,0,0]=(-0.549884089801)*x[0]+(0.18615759395)*x[1]+(-0.150676638905)*x[2]
-        arg[1,0,0,1]=(-0.908800158159)*x[0]+(1.74574577127)*x[1]+(0.347894281217)*x[2]
-        arg[1,0,1,0]=(1.21798491919)*x[0]+(-1.04989223901)*x[1]+(-0.706457284537)*x[2]
-        arg[1,0,1,1]=(0.441083030576)*x[0]+(0.458319482203)*x[1]+(0.704887998977)*x[2]
-        arg[1,0,2,0]=(-0.386479556415)*x[0]+(-1.28347087396)*x[1]+(-0.876058219438)*x[2]
-        arg[1,0,2,1]=(0.743100114846)*x[0]+(1.02919050439)*x[1]+(-0.357203265224)*x[2]
-        arg[1,1,0,0]=(-0.309112244319)*x[0]+(0.469639650979)*x[1]+(0.371325594811)*x[2]
-        arg[1,1,0,1]=(1.53067095144)*x[0]+(1.18235592763)*x[1]+(-0.959436428335)*x[2]
-        arg[1,1,1,0]=(0.291735282406)*x[0]+(0.449515270669)*x[1]+(0.612383052683)*x[2]
-        arg[1,1,1,1]=(-0.102313390769)*x[0]+(1.25745082506)*x[1]+(-1.03742917135)*x[2]
-        arg[1,1,2,0]=(-0.951576197839)*x[0]+(1.03094297086)*x[1]+(-0.10195348802)*x[2]
-        arg[1,1,2,1]=(1.54751905175)*x[0]+(1.47958820289)*x[1]+(-0.357466311206)*x[2]
-        arg[1,2,0,0]=(-0.452360614767)*x[0]+(-0.865741367113)*x[1]+(1.12034992845)*x[2]
-        arg[1,2,0,1]=(0.00940323370511)*x[0]+(-1.03701972012)*x[1]+(0.0102243182131)*x[2]
-        arg[1,2,1,0]=(-1.50670950911)*x[0]+(-0.219993644831)*x[1]+(-0.1612757943)*x[2]
-        arg[1,2,1,1]=(-0.792871502871)*x[0]+(-0.0163752900095)*x[1]+(1.54206281352)*x[2]
-        arg[1,2,2,0]=(1.02928968974)*x[0]+(-0.171516999194)*x[1]+(-0.446145675054)*x[2]
-        arg[1,2,2,1]=(-1.51230609746)*x[0]+(0.2034193081)*x[1]+(-0.291776924482)*x[2]
-        arg[1,3,0,0]=(-0.0312379262641)*x[0]+(0.722239260943)*x[1]+(-0.279504141505)*x[2]
-        arg[1,3,0,1]=(-1.12038082645)*x[0]+(-0.328148046828)*x[1]+(0.825288681731)*x[2]
-        arg[1,3,1,0]=(0.547173116241)*x[0]+(0.136609628569)*x[1]+(-0.476006212278)*x[2]
-        arg[1,3,1,1]=(0.000854188874487)*x[0]+(0.473989971126)*x[1]+(1.58153857042)*x[2]
-        arg[1,3,2,0]=(-0.746628247481)*x[0]+(0.859384716891)*x[1]+(0.618348305951)*x[2]
-        arg[1,3,2,1]=(0.919601890657)*x[0]+(0.422457734769)*x[1]+(-1.11235109226)*x[2]
-        arg[1,4,0,0]=(0.962587287633)*x[0]+(-1.2526632022)*x[1]+(0.210254126936)*x[2]
-        arg[1,4,0,1]=(-0.330257182624)*x[0]+(-0.251562095795)*x[1]+(1.29427728094)*x[2]
-        arg[1,4,1,0]=(-0.577555922072)*x[0]+(0.844462157498)*x[1]+(-0.120809700805)*x[2]
-        arg[1,4,1,1]=(-0.91963436975)*x[0]+(-0.415146584044)*x[1]+(-0.105600826517)*x[2]
-        arg[1,4,2,0]=(-1.28940482584)*x[0]+(-1.55548284063)*x[1]+(-0.835108666511)*x[2]
-        arg[1,4,2,1]=(-0.0299379665752)*x[0]+(-0.992000458707)*x[1]+(-0.469600133762)*x[2]
-        arg[2,0,0,0]=(0.0107575962552)*x[0]+(-1.06407817799)*x[1]+(-1.84217380223)*x[2]
-        arg[2,0,0,1]=(-0.0596138757136)*x[0]+(1.75177421542)*x[1]+(0.131511355216)*x[2]
-        arg[2,0,1,0]=(-0.29485191211)*x[0]+(1.55396303732)*x[1]+(0.137822438484)*x[2]
-        arg[2,0,1,1]=(0.968093798582)*x[0]+(-0.348515863297)*x[1]+(-0.885253223355)*x[2]
-        arg[2,0,2,0]=(0.304703601471)*x[0]+(0.350016020435)*x[1]+(0.0348615188696)*x[2]
-        arg[2,0,2,1]=(0.242706426227)*x[0]+(0.00660859017533)*x[1]+(-0.122732284886)*x[2]
-        arg[2,1,0,0]=(0.540596184477)*x[0]+(-0.0272014403068)*x[1]+(0.559631760626)*x[2]
-        arg[2,1,0,1]=(0.537160103765)*x[0]+(-0.974891403717)*x[1]+(-1.2571032682)*x[2]
-        arg[2,1,1,0]=(-0.134244705433)*x[0]+(1.63419015928)*x[1]+(0.0879689992598)*x[2]
-        arg[2,1,1,1]=(0.885004305439)*x[0]+(1.63473219215)*x[1]+(-0.714475475618)*x[2]
-        arg[2,1,2,0]=(-0.220742006931)*x[0]+(0.298113077571)*x[1]+(0.129338822854)*x[2]
-        arg[2,1,2,1]=(0.0696132558998)*x[0]+(1.28044127087)*x[1]+(-0.182025504014)*x[2]
-        arg[2,2,0,0]=(-0.108760249345)*x[0]+(-0.727726654762)*x[1]+(1.1810583418)*x[2]
-        arg[2,2,0,1]=(1.69464976816)*x[0]+(0.771779692301)*x[1]+(-0.746303209271)*x[2]
-        arg[2,2,1,0]=(1.6897653643)*x[0]+(-1.21078732523)*x[1]+(-0.000978666646647)*x[2]
-        arg[2,2,1,1]=(1.60773073603)*x[0]+(-0.583968900051)*x[1]+(-0.0511730994465)*x[2]
-        arg[2,2,2,0]=(0.506948201854)*x[0]+(-0.00990858555453)*x[1]+(1.06433022033)*x[2]
-        arg[2,2,2,1]=(0.449523090508)*x[0]+(-1.61710851818)*x[1]+(0.440720932423)*x[2]
-        arg[2,3,0,0]=(0.0167109660325)*x[0]+(-1.08812386645)*x[1]+(-1.22089632364)*x[2]
-        arg[2,3,0,1]=(-0.841668282066)*x[0]+(0.636645352356)*x[1]+(-0.537753623856)*x[2]
-        arg[2,3,1,0]=(1.79552636749)*x[0]+(0.481662215698)*x[1]+(-0.371782307951)*x[2]
-        arg[2,3,1,1]=(-0.747945987059)*x[0]+(0.818378132535)*x[1]+(1.66032057212)*x[2]
-        arg[2,3,2,0]=(-0.126253738036)*x[0]+(-0.681619876818)*x[1]+(0.117269467345)*x[2]
-        arg[2,3,2,1]=(-0.338521414346)*x[0]+(0.381458529772)*x[1]+(1.00819568542)*x[2]
-        arg[2,4,0,0]=(0.0110334310038)*x[0]+(0.229750132795)*x[1]+(-0.900772274961)*x[2]
-        arg[2,4,0,1]=(-0.798344038508)*x[0]+(0.0410740025116)*x[1]+(1.46856652632)*x[2]
-        arg[2,4,1,0]=(0.193355735165)*x[0]+(-0.539307787984)*x[1]+(-0.375854987378)*x[2]
-        arg[2,4,1,1]=(0.568143022174)*x[0]+(-1.61770216281)*x[1]+(0.208204629987)*x[2]
-        arg[2,4,2,0]=(1.37290817619)*x[0]+(-0.174324684678)*x[1]+(-0.217538755825)*x[2]
-        arg[2,4,2,1]=(-0.483601819019)*x[0]+(1.45019519818)*x[1]+(-0.623519730492)*x[2]
-        arg[3,0,0,0]=(-0.793731389518)*x[0]+(-0.154763125819)*x[1]+(1.10863435441)*x[2]
-        arg[3,0,0,1]=(0.507036346178)*x[0]+(-0.309380836403)*x[1]+(-0.418720111636)*x[2]
-        arg[3,0,1,0]=(-0.777608365831)*x[0]+(0.982848447238)*x[1]+(-0.762479658423)*x[2]
-        arg[3,0,1,1]=(-0.73325130954)*x[0]+(-0.253614119609)*x[1]+(-0.366314075481)*x[2]
-        arg[3,0,2,0]=(0.0989317940836)*x[0]+(0.0772067160489)*x[1]+(-1.84682997853)*x[2]
-        arg[3,0,2,1]=(0.256206660712)*x[0]+(1.2868655538)*x[1]+(-0.522346638322)*x[2]
-        arg[3,1,0,0]=(-1.41604178327)*x[0]+(0.662242482319)*x[1]+(1.7526698965)*x[2]
-        arg[3,1,0,1]=(-0.442315980785)*x[0]+(0.423309436413)*x[1]+(0.175362864372)*x[2]
-        arg[3,1,1,0]=(0.353602081392)*x[0]+(1.55530884146)*x[1]+(-0.115267400964)*x[2]
-        arg[3,1,1,1]=(0.1445651493)*x[0]+(0.652413545545)*x[1]+(-1.47341714223)*x[2]
-        arg[3,1,2,0]=(0.288044123145)*x[0]+(1.45339107563)*x[1]+(0.0253961147274)*x[2]
-        arg[3,1,2,1]=(0.738725097174)*x[0]+(0.556287291563)*x[1]+(0.685592801206)*x[2]
-        arg[3,2,0,0]=(-1.6952458849)*x[0]+(-0.450982750203)*x[1]+(-0.176030737746)*x[2]
-        arg[3,2,0,1]=(-0.267377959403)*x[0]+(-0.329354216237)*x[1]+(0.368496833805)*x[2]
-        arg[3,2,1,0]=(1.00419353409)*x[0]+(1.50507467849)*x[1]+(-0.529113363067)*x[2]
-        arg[3,2,1,1]=(-1.69175338104)*x[0]+(-0.101436360248)*x[1]+(0.963918243087)*x[2]
-        arg[3,2,2,0]=(0.093465616883)*x[0]+(-0.390155190153)*x[1]+(-0.354824565592)*x[2]
-        arg[3,2,2,1]=(-0.414577385531)*x[0]+(-0.665726090904)*x[1]+(-1.39857731593)*x[2]
-        arg[3,3,0,0]=(-0.528594178602)*x[0]+(-0.435472295413)*x[1]+(0.397972761993)*x[2]
-        arg[3,3,0,1]=(1.24885378376)*x[0]+(1.63537745582)*x[1]+(-0.00703582234262)*x[2]
-        arg[3,3,1,0]=(0.63369530476)*x[0]+(0.296615915965)*x[1]+(0.593277434193)*x[2]
-        arg[3,3,1,1]=(-0.197615624091)*x[0]+(1.45678045242)*x[1]+(0.571039120854)*x[2]
-        arg[3,3,2,0]=(-1.01304527292)*x[0]+(0.00892977300805)*x[1]+(0.284285861002)*x[2]
-        arg[3,3,2,1]=(0.647872454128)*x[0]+(-0.373279273659)*x[1]+(1.27785668874)*x[2]
-        arg[3,4,0,0]=(0.708994891373)*x[0]+(-0.439675903635)*x[1]+(0.612884939946)*x[2]
-        arg[3,4,0,1]=(0.535549893212)*x[0]+(-0.940830832131)*x[1]+(-0.30796510692)*x[2]
-        arg[3,4,1,0]=(-1.24560696134)*x[0]+(0.125328014324)*x[1]+(0.168757304331)*x[2]
-        arg[3,4,1,1]=(0.604969099581)*x[0]+(0.212563821283)*x[1]+(0.146243255184)*x[2]
-        arg[3,4,2,0]=(-0.0402174498351)*x[0]+(0.967028407195)*x[1]+(-0.991740640214)*x[2]
-        arg[3,4,2,1]=(0.0572331664331)*x[0]+(-0.836713731055)*x[1]+(0.78195371901)*x[2]
-        ref[0,0,0,0]=(-1.41028779384)*x_ref[0]+(-1.69085638593)*x_ref[1]+(-0.626478106748)*x_ref[2]
-        ref[0,0,0,1]=(-0.322729407761)*x_ref[0]+(-0.311218478587)*x_ref[1]+(-0.329375635778)*x_ref[2]
-        ref[0,0,1,0]=(-0.16111144722)*x_ref[0]+(0.864377600354)*x_ref[1]+(-1.01349863575)*x_ref[2]
-        ref[0,0,1,1]=(0.0720111273067)*x_ref[0]+(1.40365232221)*x_ref[1]+(0.292610528868)*x_ref[2]
-        ref[0,0,2,0]=(-1.21827641959)*x_ref[0]+(0.168559044212)*x_ref[1]+(0.841389848275)*x_ref[2]
-        ref[0,0,2,1]=(0.631258821218)*x_ref[0]+(-1.22185752256)*x_ref[1]+(0.0213133635991)*x_ref[2]
-        ref[0,1,0,0]=(-0.55959466492)*x_ref[0]+(0.567105256147)*x_ref[1]+(0.185414627961)*x_ref[2]
-        ref[0,1,0,1]=(1.42576865692)*x_ref[0]+(-1.38354595053)*x_ref[1]+(1.08902163491)*x_ref[2]
-        ref[0,1,1,0]=(-0.441288277712)*x_ref[0]+(-0.412579680073)*x_ref[1]+(0.85969923606)*x_ref[2]
-        ref[0,1,1,1]=(1.20924692667)*x_ref[0]+(-0.263790869016)*x_ref[1]+(-0.117388627799)*x_ref[2]
-        ref[0,1,2,0]=(-0.849546239235)*x_ref[0]+(-0.41970601628)*x_ref[1]+(0.712637692553)*x_ref[2]
-        ref[0,1,2,1]=(0.665825646772)*x_ref[0]+(-0.49641548077)*x_ref[1]+(0.0243383084422)*x_ref[2]
-        ref[0,2,0,0]=(0.158298703766)*x_ref[0]+(-1.38559416875)*x_ref[1]+(-0.549526684962)*x_ref[2]
-        ref[0,2,0,1]=(0.290664973202)*x_ref[0]+(-0.725089032773)*x_ref[1]+(-0.420805410829)*x_ref[2]
-        ref[0,2,1,0]=(-0.371388631358)*x_ref[0]+(0.712788591622)*x_ref[1]+(0.708499722908)*x_ref[2]
-        ref[0,2,1,1]=(-0.209234718871)*x_ref[0]+(-0.559384946846)*x_ref[1]+(-0.18126082565)*x_ref[2]
-        ref[0,2,2,0]=(0.295605948328)*x_ref[0]+(0.0787080259554)*x_ref[1]+(-0.413453606631)*x_ref[2]
-        ref[0,2,2,1]=(-0.951652076608)*x_ref[0]+(0.412030442608)*x_ref[1]+(-1.0098591628)*x_ref[2]
-        ref[0,3,0,0]=(0.38805130758)*x_ref[0]+(0.725062113278)*x_ref[1]+(-0.0789722367715)*x_ref[2]
-        ref[0,3,0,1]=(-0.856689544368)*x_ref[0]+(-0.378806165724)*x_ref[1]+(-1.56132477796)*x_ref[2]
-        ref[0,3,1,0]=(0.948414643284)*x_ref[0]+(-0.223099011255)*x_ref[1]+(-0.164540510924)*x_ref[2]
-        ref[0,3,1,1]=(-0.290272025223)*x_ref[0]+(0.0110236571203)*x_ref[1]+(0.0344804634468)*x_ref[2]
-        ref[0,3,2,0]=(-1.06973937948)*x_ref[0]+(-0.19210617162)*x_ref[1]+(-0.0319179806513)*x_ref[2]
-        ref[0,3,2,1]=(0.873398122756)*x_ref[0]+(0.87424619659)*x_ref[1]+(0.130681723853)*x_ref[2]
-        ref[0,4,0,0]=(-0.231238303513)*x_ref[0]+(1.13248606226)*x_ref[1]+(1.08638890671)*x_ref[2]
-        ref[0,4,0,1]=(0.0325659323288)*x_ref[0]+(1.53278397594)*x_ref[1]+(-0.0823455709949)*x_ref[2]
-        ref[0,4,1,0]=(-0.415558245155)*x_ref[0]+(-0.468794623975)*x_ref[1]+(-0.4219946425)*x_ref[2]
-        ref[0,4,1,1]=(0.687857094934)*x_ref[0]+(-0.316748377318)*x_ref[1]+(1.51841645514)*x_ref[2]
-        ref[0,4,2,0]=(-0.842163178579)*x_ref[0]+(-0.459357139258)*x_ref[1]+(-0.774999285967)*x_ref[2]
-        ref[0,4,2,1]=(0.361059525968)*x_ref[0]+(0.302800510186)*x_ref[1]+(0.164988681972)*x_ref[2]
-        ref[1,0,0,0]=(-0.549884089801)*x_ref[0]+(0.18615759395)*x_ref[1]+(-0.150676638905)*x_ref[2]
-        ref[1,0,0,1]=(-0.908800158159)*x_ref[0]+(1.74574577127)*x_ref[1]+(0.347894281217)*x_ref[2]
-        ref[1,0,1,0]=(1.21798491919)*x_ref[0]+(-1.04989223901)*x_ref[1]+(-0.706457284537)*x_ref[2]
-        ref[1,0,1,1]=(0.441083030576)*x_ref[0]+(0.458319482203)*x_ref[1]+(0.704887998977)*x_ref[2]
-        ref[1,0,2,0]=(-0.386479556415)*x_ref[0]+(-1.28347087396)*x_ref[1]+(-0.876058219438)*x_ref[2]
-        ref[1,0,2,1]=(0.743100114846)*x_ref[0]+(1.02919050439)*x_ref[1]+(-0.357203265224)*x_ref[2]
-        ref[1,1,0,0]=(-0.309112244319)*x_ref[0]+(0.469639650979)*x_ref[1]+(0.371325594811)*x_ref[2]
-        ref[1,1,0,1]=(1.53067095144)*x_ref[0]+(1.18235592763)*x_ref[1]+(-0.959436428335)*x_ref[2]
-        ref[1,1,1,0]=(0.291735282406)*x_ref[0]+(0.449515270669)*x_ref[1]+(0.612383052683)*x_ref[2]
-        ref[1,1,1,1]=(-0.102313390769)*x_ref[0]+(1.25745082506)*x_ref[1]+(-1.03742917135)*x_ref[2]
-        ref[1,1,2,0]=(-0.951576197839)*x_ref[0]+(1.03094297086)*x_ref[1]+(-0.10195348802)*x_ref[2]
-        ref[1,1,2,1]=(1.54751905175)*x_ref[0]+(1.47958820289)*x_ref[1]+(-0.357466311206)*x_ref[2]
-        ref[1,2,0,0]=(-0.452360614767)*x_ref[0]+(-0.865741367113)*x_ref[1]+(1.12034992845)*x_ref[2]
-        ref[1,2,0,1]=(0.00940323370511)*x_ref[0]+(-1.03701972012)*x_ref[1]+(0.0102243182131)*x_ref[2]
-        ref[1,2,1,0]=(-1.50670950911)*x_ref[0]+(-0.219993644831)*x_ref[1]+(-0.1612757943)*x_ref[2]
-        ref[1,2,1,1]=(-0.792871502871)*x_ref[0]+(-0.0163752900095)*x_ref[1]+(1.54206281352)*x_ref[2]
-        ref[1,2,2,0]=(1.02928968974)*x_ref[0]+(-0.171516999194)*x_ref[1]+(-0.446145675054)*x_ref[2]
-        ref[1,2,2,1]=(-1.51230609746)*x_ref[0]+(0.2034193081)*x_ref[1]+(-0.291776924482)*x_ref[2]
-        ref[1,3,0,0]=(-0.0312379262641)*x_ref[0]+(0.722239260943)*x_ref[1]+(-0.279504141505)*x_ref[2]
-        ref[1,3,0,1]=(-1.12038082645)*x_ref[0]+(-0.328148046828)*x_ref[1]+(0.825288681731)*x_ref[2]
-        ref[1,3,1,0]=(0.547173116241)*x_ref[0]+(0.136609628569)*x_ref[1]+(-0.476006212278)*x_ref[2]
-        ref[1,3,1,1]=(0.000854188874487)*x_ref[0]+(0.473989971126)*x_ref[1]+(1.58153857042)*x_ref[2]
-        ref[1,3,2,0]=(-0.746628247481)*x_ref[0]+(0.859384716891)*x_ref[1]+(0.618348305951)*x_ref[2]
-        ref[1,3,2,1]=(0.919601890657)*x_ref[0]+(0.422457734769)*x_ref[1]+(-1.11235109226)*x_ref[2]
-        ref[1,4,0,0]=(0.962587287633)*x_ref[0]+(-1.2526632022)*x_ref[1]+(0.210254126936)*x_ref[2]
-        ref[1,4,0,1]=(-0.330257182624)*x_ref[0]+(-0.251562095795)*x_ref[1]+(1.29427728094)*x_ref[2]
-        ref[1,4,1,0]=(-0.577555922072)*x_ref[0]+(0.844462157498)*x_ref[1]+(-0.120809700805)*x_ref[2]
-        ref[1,4,1,1]=(-0.91963436975)*x_ref[0]+(-0.415146584044)*x_ref[1]+(-0.105600826517)*x_ref[2]
-        ref[1,4,2,0]=(-1.28940482584)*x_ref[0]+(-1.55548284063)*x_ref[1]+(-0.835108666511)*x_ref[2]
-        ref[1,4,2,1]=(-0.0299379665752)*x_ref[0]+(-0.992000458707)*x_ref[1]+(-0.469600133762)*x_ref[2]
-        ref[2,0,0,0]=(0.0107575962552)*x_ref[0]+(-1.06407817799)*x_ref[1]+(-1.84217380223)*x_ref[2]
-        ref[2,0,0,1]=(-0.0596138757136)*x_ref[0]+(1.75177421542)*x_ref[1]+(0.131511355216)*x_ref[2]
-        ref[2,0,1,0]=(-0.29485191211)*x_ref[0]+(1.55396303732)*x_ref[1]+(0.137822438484)*x_ref[2]
-        ref[2,0,1,1]=(0.968093798582)*x_ref[0]+(-0.348515863297)*x_ref[1]+(-0.885253223355)*x_ref[2]
-        ref[2,0,2,0]=(0.304703601471)*x_ref[0]+(0.350016020435)*x_ref[1]+(0.0348615188696)*x_ref[2]
-        ref[2,0,2,1]=(0.242706426227)*x_ref[0]+(0.00660859017533)*x_ref[1]+(-0.122732284886)*x_ref[2]
-        ref[2,1,0,0]=(0.540596184477)*x_ref[0]+(-0.0272014403068)*x_ref[1]+(0.559631760626)*x_ref[2]
-        ref[2,1,0,1]=(0.537160103765)*x_ref[0]+(-0.974891403717)*x_ref[1]+(-1.2571032682)*x_ref[2]
-        ref[2,1,1,0]=(-0.134244705433)*x_ref[0]+(1.63419015928)*x_ref[1]+(0.0879689992598)*x_ref[2]
-        ref[2,1,1,1]=(0.885004305439)*x_ref[0]+(1.63473219215)*x_ref[1]+(-0.714475475618)*x_ref[2]
-        ref[2,1,2,0]=(-0.220742006931)*x_ref[0]+(0.298113077571)*x_ref[1]+(0.129338822854)*x_ref[2]
-        ref[2,1,2,1]=(0.0696132558998)*x_ref[0]+(1.28044127087)*x_ref[1]+(-0.182025504014)*x_ref[2]
-        ref[2,2,0,0]=(-0.108760249345)*x_ref[0]+(-0.727726654762)*x_ref[1]+(1.1810583418)*x_ref[2]
-        ref[2,2,0,1]=(1.69464976816)*x_ref[0]+(0.771779692301)*x_ref[1]+(-0.746303209271)*x_ref[2]
-        ref[2,2,1,0]=(1.6897653643)*x_ref[0]+(-1.21078732523)*x_ref[1]+(-0.000978666646647)*x_ref[2]
-        ref[2,2,1,1]=(1.60773073603)*x_ref[0]+(-0.583968900051)*x_ref[1]+(-0.0511730994465)*x_ref[2]
-        ref[2,2,2,0]=(0.506948201854)*x_ref[0]+(-0.00990858555453)*x_ref[1]+(1.06433022033)*x_ref[2]
-        ref[2,2,2,1]=(0.449523090508)*x_ref[0]+(-1.61710851818)*x_ref[1]+(0.440720932423)*x_ref[2]
-        ref[2,3,0,0]=(0.0167109660325)*x_ref[0]+(-1.08812386645)*x_ref[1]+(-1.22089632364)*x_ref[2]
-        ref[2,3,0,1]=(-0.841668282066)*x_ref[0]+(0.636645352356)*x_ref[1]+(-0.537753623856)*x_ref[2]
-        ref[2,3,1,0]=(1.79552636749)*x_ref[0]+(0.481662215698)*x_ref[1]+(-0.371782307951)*x_ref[2]
-        ref[2,3,1,1]=(-0.747945987059)*x_ref[0]+(0.818378132535)*x_ref[1]+(1.66032057212)*x_ref[2]
-        ref[2,3,2,0]=(-0.126253738036)*x_ref[0]+(-0.681619876818)*x_ref[1]+(0.117269467345)*x_ref[2]
-        ref[2,3,2,1]=(-0.338521414346)*x_ref[0]+(0.381458529772)*x_ref[1]+(1.00819568542)*x_ref[2]
-        ref[2,4,0,0]=(0.0110334310038)*x_ref[0]+(0.229750132795)*x_ref[1]+(-0.900772274961)*x_ref[2]
-        ref[2,4,0,1]=(-0.798344038508)*x_ref[0]+(0.0410740025116)*x_ref[1]+(1.46856652632)*x_ref[2]
-        ref[2,4,1,0]=(0.193355735165)*x_ref[0]+(-0.539307787984)*x_ref[1]+(-0.375854987378)*x_ref[2]
-        ref[2,4,1,1]=(0.568143022174)*x_ref[0]+(-1.61770216281)*x_ref[1]+(0.208204629987)*x_ref[2]
-        ref[2,4,2,0]=(1.37290817619)*x_ref[0]+(-0.174324684678)*x_ref[1]+(-0.217538755825)*x_ref[2]
-        ref[2,4,2,1]=(-0.483601819019)*x_ref[0]+(1.45019519818)*x_ref[1]+(-0.623519730492)*x_ref[2]
-        ref[3,0,0,0]=(-0.793731389518)*x_ref[0]+(-0.154763125819)*x_ref[1]+(1.10863435441)*x_ref[2]
-        ref[3,0,0,1]=(0.507036346178)*x_ref[0]+(-0.309380836403)*x_ref[1]+(-0.418720111636)*x_ref[2]
-        ref[3,0,1,0]=(-0.777608365831)*x_ref[0]+(0.982848447238)*x_ref[1]+(-0.762479658423)*x_ref[2]
-        ref[3,0,1,1]=(-0.73325130954)*x_ref[0]+(-0.253614119609)*x_ref[1]+(-0.366314075481)*x_ref[2]
-        ref[3,0,2,0]=(0.0989317940836)*x_ref[0]+(0.0772067160489)*x_ref[1]+(-1.84682997853)*x_ref[2]
-        ref[3,0,2,1]=(0.256206660712)*x_ref[0]+(1.2868655538)*x_ref[1]+(-0.522346638322)*x_ref[2]
-        ref[3,1,0,0]=(-1.41604178327)*x_ref[0]+(0.662242482319)*x_ref[1]+(1.7526698965)*x_ref[2]
-        ref[3,1,0,1]=(-0.442315980785)*x_ref[0]+(0.423309436413)*x_ref[1]+(0.175362864372)*x_ref[2]
-        ref[3,1,1,0]=(0.353602081392)*x_ref[0]+(1.55530884146)*x_ref[1]+(-0.115267400964)*x_ref[2]
-        ref[3,1,1,1]=(0.1445651493)*x_ref[0]+(0.652413545545)*x_ref[1]+(-1.47341714223)*x_ref[2]
-        ref[3,1,2,0]=(0.288044123145)*x_ref[0]+(1.45339107563)*x_ref[1]+(0.0253961147274)*x_ref[2]
-        ref[3,1,2,1]=(0.738725097174)*x_ref[0]+(0.556287291563)*x_ref[1]+(0.685592801206)*x_ref[2]
-        ref[3,2,0,0]=(-1.6952458849)*x_ref[0]+(-0.450982750203)*x_ref[1]+(-0.176030737746)*x_ref[2]
-        ref[3,2,0,1]=(-0.267377959403)*x_ref[0]+(-0.329354216237)*x_ref[1]+(0.368496833805)*x_ref[2]
-        ref[3,2,1,0]=(1.00419353409)*x_ref[0]+(1.50507467849)*x_ref[1]+(-0.529113363067)*x_ref[2]
-        ref[3,2,1,1]=(-1.69175338104)*x_ref[0]+(-0.101436360248)*x_ref[1]+(0.963918243087)*x_ref[2]
-        ref[3,2,2,0]=(0.093465616883)*x_ref[0]+(-0.390155190153)*x_ref[1]+(-0.354824565592)*x_ref[2]
-        ref[3,2,2,1]=(-0.414577385531)*x_ref[0]+(-0.665726090904)*x_ref[1]+(-1.39857731593)*x_ref[2]
-        ref[3,3,0,0]=(-0.528594178602)*x_ref[0]+(-0.435472295413)*x_ref[1]+(0.397972761993)*x_ref[2]
-        ref[3,3,0,1]=(1.24885378376)*x_ref[0]+(1.63537745582)*x_ref[1]+(-0.00703582234262)*x_ref[2]
-        ref[3,3,1,0]=(0.63369530476)*x_ref[0]+(0.296615915965)*x_ref[1]+(0.593277434193)*x_ref[2]
-        ref[3,3,1,1]=(-0.197615624091)*x_ref[0]+(1.45678045242)*x_ref[1]+(0.571039120854)*x_ref[2]
-        ref[3,3,2,0]=(-1.01304527292)*x_ref[0]+(0.00892977300805)*x_ref[1]+(0.284285861002)*x_ref[2]
-        ref[3,3,2,1]=(0.647872454128)*x_ref[0]+(-0.373279273659)*x_ref[1]+(1.27785668874)*x_ref[2]
-        ref[3,4,0,0]=(0.708994891373)*x_ref[0]+(-0.439675903635)*x_ref[1]+(0.612884939946)*x_ref[2]
-        ref[3,4,0,1]=(0.535549893212)*x_ref[0]+(-0.940830832131)*x_ref[1]+(-0.30796510692)*x_ref[2]
-        ref[3,4,1,0]=(-1.24560696134)*x_ref[0]+(0.125328014324)*x_ref[1]+(0.168757304331)*x_ref[2]
-        ref[3,4,1,1]=(0.604969099581)*x_ref[0]+(0.212563821283)*x_ref[1]+(0.146243255184)*x_ref[2]
-        ref[3,4,2,0]=(-0.0402174498351)*x_ref[0]+(0.967028407195)*x_ref[1]+(-0.991740640214)*x_ref[2]
-        ref[3,4,2,1]=(0.0572331664331)*x_ref[0]+(-0.836713731055)*x_ref[1]+(0.78195371901)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.742484780403)*x[0]+(0.680847966059)*x[1]
-        ref=(0.742484780403)*x_ref[0]+(0.680847966059)*x_ref[1]
-      else:
-        arg=(-0.928733928018)*x[0]+(-0.0797736636663)*x[1]+(0.517280695569)*x[2]
-        ref=(-0.928733928018)*x_ref[0]+(-0.0797736636663)*x_ref[1]+(0.517280695569)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        arg[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-        ref[0]=(0.697998850914)*x[0]+(0.0279368494078)*x[1]
-        ref[1]=(1.03722470341)*x[0]+(-1.46776547946)*x[1]
-      else:
-        arg[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        arg[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-        ref[0]=(-0.541575573414)*x[0]+(-0.200155171505)*x[1]+(-0.750342574153)*x[2]
-        ref[1]=(0.47794945122)*x[0]+(0.151104203771)*x[1]+(-0.522836359633)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0998962983997)*x[0]+(0.52180906409)*x[1]
-        arg[0,1]=(-0.0315655223925)*x[0]+(-0.0162720186305)*x[1]
-        arg[0,2]=(0.361840834336)*x[0]+(-1.08346005817)*x[1]
-        arg[0,3]=(0.673393991338)*x[0]+(0.571192080367)*x[1]
-        arg[0,4]=(-0.725648335559)*x[0]+(0.866678056281)*x[1]
-        arg[1,0]=(0.7094760871)*x[0]+(0.666899441355)*x[1]
-        arg[1,1]=(-0.0152490017553)*x[0]+(-1.1169188656)*x[1]
-        arg[1,2]=(-1.01408330279)*x[0]+(-1.10348930367)*x[1]
-        arg[1,3]=(0.690904468829)*x[0]+(1.12602486331)*x[1]
-        arg[1,4]=(-0.0391507405365)*x[0]+(-0.338120635003)*x[1]
-        arg[2,0]=(0.175234757619)*x[0]+(1.74258329734)*x[1]
-        arg[2,1]=(0.281950269687)*x[0]+(0.0489231995634)*x[1]
-        arg[2,2]=(1.24244714043)*x[0]+(0.0149577033777)*x[1]
-        arg[2,3]=(-0.706844294482)*x[0]+(-1.85050242116)*x[1]
-        arg[2,4]=(-0.494011860105)*x[0]+(0.0809275159202)*x[1]
-        arg[3,0]=(-0.380877016583)*x[0]+(0.0345520619524)*x[1]
-        arg[3,1]=(1.10464018251)*x[0]+(0.0246274384536)*x[1]
-        arg[3,2]=(-0.00138129982685)*x[0]+(0.776306480938)*x[1]
-        arg[3,3]=(-0.0830044393648)*x[0]+(-0.173691604089)*x[1]
-        arg[3,4]=(0.0909675137463)*x[0]+(0.208083539568)*x[1]
-        ref[0,0]=(0.0998962983997)*x_ref[0]+(0.52180906409)*x_ref[1]
-        ref[0,1]=(-0.0315655223925)*x_ref[0]+(-0.0162720186305)*x_ref[1]
-        ref[0,2]=(0.361840834336)*x_ref[0]+(-1.08346005817)*x_ref[1]
-        ref[0,3]=(0.673393991338)*x_ref[0]+(0.571192080367)*x_ref[1]
-        ref[0,4]=(-0.725648335559)*x_ref[0]+(0.866678056281)*x_ref[1]
-        ref[1,0]=(0.7094760871)*x_ref[0]+(0.666899441355)*x_ref[1]
-        ref[1,1]=(-0.0152490017553)*x_ref[0]+(-1.1169188656)*x_ref[1]
-        ref[1,2]=(-1.01408330279)*x_ref[0]+(-1.10348930367)*x_ref[1]
-        ref[1,3]=(0.690904468829)*x_ref[0]+(1.12602486331)*x_ref[1]
-        ref[1,4]=(-0.0391507405365)*x_ref[0]+(-0.338120635003)*x_ref[1]
-        ref[2,0]=(0.175234757619)*x_ref[0]+(1.74258329734)*x_ref[1]
-        ref[2,1]=(0.281950269687)*x_ref[0]+(0.0489231995634)*x_ref[1]
-        ref[2,2]=(1.24244714043)*x_ref[0]+(0.0149577033777)*x_ref[1]
-        ref[2,3]=(-0.706844294482)*x_ref[0]+(-1.85050242116)*x_ref[1]
-        ref[2,4]=(-0.494011860105)*x_ref[0]+(0.0809275159202)*x_ref[1]
-        ref[3,0]=(-0.380877016583)*x_ref[0]+(0.0345520619524)*x_ref[1]
-        ref[3,1]=(1.10464018251)*x_ref[0]+(0.0246274384536)*x_ref[1]
-        ref[3,2]=(-0.00138129982685)*x_ref[0]+(0.776306480938)*x_ref[1]
-        ref[3,3]=(-0.0830044393648)*x_ref[0]+(-0.173691604089)*x_ref[1]
-        ref[3,4]=(0.0909675137463)*x_ref[0]+(0.208083539568)*x_ref[1]
-      else:
-        arg[0,0]=(0.0539484604772)*x[0]+(-0.220817236218)*x[1]+(-0.853759265774)*x[2]
-        arg[0,1]=(0.336027623724)*x[0]+(-0.111775563754)*x[1]+(0.646672879096)*x[2]
-        arg[0,2]=(0.650722528854)*x[0]+(0.0924672090652)*x[1]+(-0.881798566157)*x[2]
-        arg[0,3]=(0.276745374112)*x[0]+(-1.34491685419)*x[1]+(-0.833420124328)*x[2]
-        arg[0,4]=(1.50686931219)*x[0]+(0.489530477585)*x[1]+(1.74836249628)*x[2]
-        arg[1,0]=(-0.240001512118)*x[0]+(0.350823736593)*x[1]+(-0.227106949276)*x[2]
-        arg[1,1]=(0.354636302436)*x[0]+(-0.0893490250257)*x[1]+(-0.0650366762176)*x[2]
-        arg[1,2]=(-0.319714829694)*x[0]+(0.43056121683)*x[1]+(0.109856817034)*x[2]
-        arg[1,3]=(-1.17581255544)*x[0]+(-0.491431894533)*x[1]+(0.220857799733)*x[2]
-        arg[1,4]=(1.5680027633)*x[0]+(-0.249723385268)*x[1]+(-1.72056978299)*x[2]
-        arg[2,0]=(0.197753675106)*x[0]+(0.314723848519)*x[1]+(0.718038926838)*x[2]
-        arg[2,1]=(0.13916867566)*x[0]+(-0.0345156812431)*x[1]+(0.34208613933)*x[2]
-        arg[2,2]=(-0.275775747114)*x[0]+(0.299200648073)*x[1]+(0.37950303615)*x[2]
-        arg[2,3]=(0.685209641306)*x[0]+(-0.347743700679)*x[1]+(0.356023331014)*x[2]
-        arg[2,4]=(-0.232082602587)*x[0]+(-0.942200667607)*x[1]+(0.961251099323)*x[2]
-        arg[3,0]=(0.59399111477)*x[0]+(1.06884076218)*x[1]+(-0.194044225109)*x[2]
-        arg[3,1]=(0.522006012644)*x[0]+(0.0804272287843)*x[1]+(0.263440832249)*x[2]
-        arg[3,2]=(1.25330346872)*x[0]+(-0.757485536992)*x[1]+(0.398906137626)*x[2]
-        arg[3,3]=(0.395712858673)*x[0]+(0.423226476819)*x[1]+(0.186209217392)*x[2]
-        arg[3,4]=(0.153657073245)*x[0]+(0.536681875397)*x[1]+(0.773972080743)*x[2]
-        ref[0,0]=(0.0539484604772)*x_ref[0]+(-0.220817236218)*x_ref[1]+(-0.853759265774)*x_ref[2]
-        ref[0,1]=(0.336027623724)*x_ref[0]+(-0.111775563754)*x_ref[1]+(0.646672879096)*x_ref[2]
-        ref[0,2]=(0.650722528854)*x_ref[0]+(0.0924672090652)*x_ref[1]+(-0.881798566157)*x_ref[2]
-        ref[0,3]=(0.276745374112)*x_ref[0]+(-1.34491685419)*x_ref[1]+(-0.833420124328)*x_ref[2]
-        ref[0,4]=(1.50686931219)*x_ref[0]+(0.489530477585)*x_ref[1]+(1.74836249628)*x_ref[2]
-        ref[1,0]=(-0.240001512118)*x_ref[0]+(0.350823736593)*x_ref[1]+(-0.227106949276)*x_ref[2]
-        ref[1,1]=(0.354636302436)*x_ref[0]+(-0.0893490250257)*x_ref[1]+(-0.0650366762176)*x_ref[2]
-        ref[1,2]=(-0.319714829694)*x_ref[0]+(0.43056121683)*x_ref[1]+(0.109856817034)*x_ref[2]
-        ref[1,3]=(-1.17581255544)*x_ref[0]+(-0.491431894533)*x_ref[1]+(0.220857799733)*x_ref[2]
-        ref[1,4]=(1.5680027633)*x_ref[0]+(-0.249723385268)*x_ref[1]+(-1.72056978299)*x_ref[2]
-        ref[2,0]=(0.197753675106)*x_ref[0]+(0.314723848519)*x_ref[1]+(0.718038926838)*x_ref[2]
-        ref[2,1]=(0.13916867566)*x_ref[0]+(-0.0345156812431)*x_ref[1]+(0.34208613933)*x_ref[2]
-        ref[2,2]=(-0.275775747114)*x_ref[0]+(0.299200648073)*x_ref[1]+(0.37950303615)*x_ref[2]
-        ref[2,3]=(0.685209641306)*x_ref[0]+(-0.347743700679)*x_ref[1]+(0.356023331014)*x_ref[2]
-        ref[2,4]=(-0.232082602587)*x_ref[0]+(-0.942200667607)*x_ref[1]+(0.961251099323)*x_ref[2]
-        ref[3,0]=(0.59399111477)*x_ref[0]+(1.06884076218)*x_ref[1]+(-0.194044225109)*x_ref[2]
-        ref[3,1]=(0.522006012644)*x_ref[0]+(0.0804272287843)*x_ref[1]+(0.263440832249)*x_ref[2]
-        ref[3,2]=(1.25330346872)*x_ref[0]+(-0.757485536992)*x_ref[1]+(0.398906137626)*x_ref[2]
-        ref[3,3]=(0.395712858673)*x_ref[0]+(0.423226476819)*x_ref[1]+(0.186209217392)*x_ref[2]
-        ref[3,4]=(0.153657073245)*x_ref[0]+(0.536681875397)*x_ref[1]+(0.773972080743)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.223040346102)*x[0]+(-0.40941514813)*x[1]
-        arg[0,0,1]=(-0.580051757755)*x[0]+(0.0793034026033)*x[1]
-        arg[0,1,0]=(-0.0576028239384)*x[0]+(1.058218319)*x[1]
-        arg[0,1,1]=(0.0914458475861)*x[0]+(1.48556548656)*x[1]
-        arg[1,0,0]=(0.211508891263)*x[0]+(-1.44088884228)*x[1]
-        arg[1,0,1]=(-0.753661543994)*x[0]+(0.675867607628)*x[1]
-        arg[1,1,0]=(-0.289500075744)*x[0]+(0.573476965486)*x[1]
-        arg[1,1,1]=(0.182150073163)*x[0]+(0.937376164291)*x[1]
-        arg[2,0,0]=(1.18815471968)*x[0]+(-0.860110330094)*x[1]
-        arg[2,0,1]=(-0.238305806178)*x[0]+(-1.27916609495)*x[1]
-        arg[2,1,0]=(-0.955511742125)*x[0]+(-0.605135532767)*x[1]
-        arg[2,1,1]=(0.342919038059)*x[0]+(-0.0980330687702)*x[1]
-        arg[3,0,0]=(0.700429242018)*x[0]+(0.742017035289)*x[1]
-        arg[3,0,1]=(0.344011429773)*x[0]+(-1.64251335376)*x[1]
-        arg[3,1,0]=(-0.177856966174)*x[0]+(0.180846653076)*x[1]
-        arg[3,1,1]=(-1.59212766197)*x[0]+(0.523595606775)*x[1]
-        arg[4,0,0]=(-0.264023123775)*x[0]+(0.545951813489)*x[1]
-        arg[4,0,1]=(-1.31580310435)*x[0]+(-0.105998549363)*x[1]
-        arg[4,1,0]=(0.878775616997)*x[0]+(0.0436540350692)*x[1]
-        arg[4,1,1]=(-1.50886945727)*x[0]+(-0.156133758872)*x[1]
-        arg[5,0,0]=(-0.196603805975)*x[0]+(1.3924198011)*x[1]
-        arg[5,0,1]=(0.688423025668)*x[0]+(-1.1304740704)*x[1]
-        arg[5,1,0]=(1.05132745721)*x[0]+(-0.0190306576753)*x[1]
-        arg[5,1,1]=(-0.336157880135)*x[0]+(0.948775404759)*x[1]
-        ref[0,0,0]=(0.223040346102)*x_ref[0]+(-0.40941514813)*x_ref[1]
-        ref[0,0,1]=(-0.580051757755)*x_ref[0]+(0.0793034026033)*x_ref[1]
-        ref[0,1,0]=(-0.0576028239384)*x_ref[0]+(1.058218319)*x_ref[1]
-        ref[0,1,1]=(0.0914458475861)*x_ref[0]+(1.48556548656)*x_ref[1]
-        ref[1,0,0]=(0.211508891263)*x_ref[0]+(-1.44088884228)*x_ref[1]
-        ref[1,0,1]=(-0.753661543994)*x_ref[0]+(0.675867607628)*x_ref[1]
-        ref[1,1,0]=(-0.289500075744)*x_ref[0]+(0.573476965486)*x_ref[1]
-        ref[1,1,1]=(0.182150073163)*x_ref[0]+(0.937376164291)*x_ref[1]
-        ref[2,0,0]=(1.18815471968)*x_ref[0]+(-0.860110330094)*x_ref[1]
-        ref[2,0,1]=(-0.238305806178)*x_ref[0]+(-1.27916609495)*x_ref[1]
-        ref[2,1,0]=(-0.955511742125)*x_ref[0]+(-0.605135532767)*x_ref[1]
-        ref[2,1,1]=(0.342919038059)*x_ref[0]+(-0.0980330687702)*x_ref[1]
-        ref[3,0,0]=(0.700429242018)*x_ref[0]+(0.742017035289)*x_ref[1]
-        ref[3,0,1]=(0.344011429773)*x_ref[0]+(-1.64251335376)*x_ref[1]
-        ref[3,1,0]=(-0.177856966174)*x_ref[0]+(0.180846653076)*x_ref[1]
-        ref[3,1,1]=(-1.59212766197)*x_ref[0]+(0.523595606775)*x_ref[1]
-        ref[4,0,0]=(-0.264023123775)*x_ref[0]+(0.545951813489)*x_ref[1]
-        ref[4,0,1]=(-1.31580310435)*x_ref[0]+(-0.105998549363)*x_ref[1]
-        ref[4,1,0]=(0.878775616997)*x_ref[0]+(0.0436540350692)*x_ref[1]
-        ref[4,1,1]=(-1.50886945727)*x_ref[0]+(-0.156133758872)*x_ref[1]
-        ref[5,0,0]=(-0.196603805975)*x_ref[0]+(1.3924198011)*x_ref[1]
-        ref[5,0,1]=(0.688423025668)*x_ref[0]+(-1.1304740704)*x_ref[1]
-        ref[5,1,0]=(1.05132745721)*x_ref[0]+(-0.0190306576753)*x_ref[1]
-        ref[5,1,1]=(-0.336157880135)*x_ref[0]+(0.948775404759)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.884050876189)*x[0]+(-0.394515582819)*x[1]+(1.3097094442)*x[2]
-        arg[0,0,1]=(-0.816123587792)*x[0]+(0.355197775988)*x[1]+(0.276746708309)*x[2]
-        arg[0,1,0]=(-0.124049709168)*x[0]+(1.18541954468)*x[1]+(0.209504045468)*x[2]
-        arg[0,1,1]=(0.0683100149522)*x[0]+(0.362926075694)*x[1]+(-0.0669691928299)*x[2]
-        arg[1,0,0]=(-1.1421316954)*x[0]+(0.390740725692)*x[1]+(-0.726193980086)*x[2]
-        arg[1,0,1]=(-0.843848580922)*x[0]+(-0.525850215762)*x[1]+(-0.00216507276212)*x[2]
-        arg[1,1,0]=(1.48370169071)*x[0]+(1.0755925183)*x[1]+(0.581274760413)*x[2]
-        arg[1,1,1]=(-1.32186510041)*x[0]+(0.415895688227)*x[1]+(0.0211839725586)*x[2]
-        arg[2,0,0]=(0.064488762235)*x[0]+(1.49328658794)*x[1]+(1.58091496737)*x[2]
-        arg[2,0,1]=(0.0366527940907)*x[0]+(0.777734357144)*x[1]+(-1.42974160614)*x[2]
-        arg[2,1,0]=(1.55170579579)*x[0]+(-1.93288667897)*x[1]+(-0.293286140809)*x[2]
-        arg[2,1,1]=(1.20599946796)*x[0]+(0.0227207800543)*x[1]+(0.754694156356)*x[2]
-        arg[3,0,0]=(-0.096426023819)*x[0]+(0.254350817295)*x[1]+(-0.845563802639)*x[2]
-        arg[3,0,1]=(0.259201676184)*x[0]+(-0.10777841018)*x[1]+(0.198814801338)*x[2]
-        arg[3,1,0]=(-0.375693547297)*x[0]+(-0.566070306507)*x[1]+(0.842662788128)*x[2]
-        arg[3,1,1]=(-0.254690046974)*x[0]+(1.68423179439)*x[1]+(-0.514749238215)*x[2]
-        arg[4,0,0]=(-0.283580142327)*x[0]+(-0.906119047897)*x[1]+(1.16264752395)*x[2]
-        arg[4,0,1]=(0.559319137591)*x[0]+(-0.135216628913)*x[1]+(0.0241520443893)*x[2]
-        arg[4,1,0]=(1.51344686911)*x[0]+(0.595733533885)*x[1]+(-0.49014841511)*x[2]
-        arg[4,1,1]=(0.261868556117)*x[0]+(-0.51266470705)*x[1]+(0.617731786544)*x[2]
-        arg[5,0,0]=(-0.947197547436)*x[0]+(1.18970238499)*x[1]+(-0.0491748623501)*x[2]
-        arg[5,0,1]=(0.0541604147191)*x[0]+(-0.844601205099)*x[1]+(1.67419390002)*x[2]
-        arg[5,1,0]=(0.370982789151)*x[0]+(-0.344762868862)*x[1]+(-0.48077628478)*x[2]
-        arg[5,1,1]=(-0.0845487748754)*x[0]+(1.43148171186)*x[1]+(-0.519880423555)*x[2]
-        ref[0,0,0]=(-0.884050876189)*x_ref[0]+(-0.394515582819)*x_ref[1]+(1.3097094442)*x_ref[2]
-        ref[0,0,1]=(-0.816123587792)*x_ref[0]+(0.355197775988)*x_ref[1]+(0.276746708309)*x_ref[2]
-        ref[0,1,0]=(-0.124049709168)*x_ref[0]+(1.18541954468)*x_ref[1]+(0.209504045468)*x_ref[2]
-        ref[0,1,1]=(0.0683100149522)*x_ref[0]+(0.362926075694)*x_ref[1]+(-0.0669691928299)*x_ref[2]
-        ref[1,0,0]=(-1.1421316954)*x_ref[0]+(0.390740725692)*x_ref[1]+(-0.726193980086)*x_ref[2]
-        ref[1,0,1]=(-0.843848580922)*x_ref[0]+(-0.525850215762)*x_ref[1]+(-0.00216507276212)*x_ref[2]
-        ref[1,1,0]=(1.48370169071)*x_ref[0]+(1.0755925183)*x_ref[1]+(0.581274760413)*x_ref[2]
-        ref[1,1,1]=(-1.32186510041)*x_ref[0]+(0.415895688227)*x_ref[1]+(0.0211839725586)*x_ref[2]
-        ref[2,0,0]=(0.064488762235)*x_ref[0]+(1.49328658794)*x_ref[1]+(1.58091496737)*x_ref[2]
-        ref[2,0,1]=(0.0366527940907)*x_ref[0]+(0.777734357144)*x_ref[1]+(-1.42974160614)*x_ref[2]
-        ref[2,1,0]=(1.55170579579)*x_ref[0]+(-1.93288667897)*x_ref[1]+(-0.293286140809)*x_ref[2]
-        ref[2,1,1]=(1.20599946796)*x_ref[0]+(0.0227207800543)*x_ref[1]+(0.754694156356)*x_ref[2]
-        ref[3,0,0]=(-0.096426023819)*x_ref[0]+(0.254350817295)*x_ref[1]+(-0.845563802639)*x_ref[2]
-        ref[3,0,1]=(0.259201676184)*x_ref[0]+(-0.10777841018)*x_ref[1]+(0.198814801338)*x_ref[2]
-        ref[3,1,0]=(-0.375693547297)*x_ref[0]+(-0.566070306507)*x_ref[1]+(0.842662788128)*x_ref[2]
-        ref[3,1,1]=(-0.254690046974)*x_ref[0]+(1.68423179439)*x_ref[1]+(-0.514749238215)*x_ref[2]
-        ref[4,0,0]=(-0.283580142327)*x_ref[0]+(-0.906119047897)*x_ref[1]+(1.16264752395)*x_ref[2]
-        ref[4,0,1]=(0.559319137591)*x_ref[0]+(-0.135216628913)*x_ref[1]+(0.0241520443893)*x_ref[2]
-        ref[4,1,0]=(1.51344686911)*x_ref[0]+(0.595733533885)*x_ref[1]+(-0.49014841511)*x_ref[2]
-        ref[4,1,1]=(0.261868556117)*x_ref[0]+(-0.51266470705)*x_ref[1]+(0.617731786544)*x_ref[2]
-        ref[5,0,0]=(-0.947197547436)*x_ref[0]+(1.18970238499)*x_ref[1]+(-0.0491748623501)*x_ref[2]
-        ref[5,0,1]=(0.0541604147191)*x_ref[0]+(-0.844601205099)*x_ref[1]+(1.67419390002)*x_ref[2]
-        ref[5,1,0]=(0.370982789151)*x_ref[0]+(-0.344762868862)*x_ref[1]+(-0.48077628478)*x_ref[2]
-        ref[5,1,1]=(-0.0845487748754)*x_ref[0]+(1.43148171186)*x_ref[1]+(-0.519880423555)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.748732264044)*x[0]+(0.326649183672)*x[1]
-        arg[0,0,0,1]=(-0.118874184707)*x[0]+(0.512027378857)*x[1]
-        arg[0,0,1,0]=(0.0907534655112)*x[0]+(0.145249508199)*x[1]
-        arg[0,0,1,1]=(0.879689742122)*x[0]+(-0.238488796672)*x[1]
-        arg[0,0,2,0]=(-0.285226080478)*x[0]+(-0.560477167124)*x[1]
-        arg[0,0,2,1]=(1.3620160918)*x[0]+(-0.97877396699)*x[1]
-        arg[0,1,0,0]=(-1.52439734042)*x[0]+(0.981913225695)*x[1]
-        arg[0,1,0,1]=(-1.19963597544)*x[0]+(1.1571861154)*x[1]
-        arg[0,1,1,0]=(0.822934040682)*x[0]+(-1.75039812758)*x[1]
-        arg[0,1,1,1]=(-0.690374545295)*x[0]+(1.10465673793)*x[1]
-        arg[0,1,2,0]=(-0.222743457309)*x[0]+(-0.499809039611)*x[1]
-        arg[0,1,2,1]=(0.774614333867)*x[0]+(-0.140097281276)*x[1]
-        arg[0,2,0,0]=(0.92399157301)*x[0]+(-1.53184881088)*x[1]
-        arg[0,2,0,1]=(0.14612723475)*x[0]+(0.892066346169)*x[1]
-        arg[0,2,1,0]=(-0.136826339137)*x[0]+(0.0588253058296)*x[1]
-        arg[0,2,1,1]=(-0.73687808603)*x[0]+(0.763659413232)*x[1]
-        arg[0,2,2,0]=(0.669031805455)*x[0]+(0.452748434512)*x[1]
-        arg[0,2,2,1]=(0.969822865927)*x[0]+(0.84449053089)*x[1]
-        arg[0,3,0,0]=(1.05482233425)*x[0]+(0.592437824455)*x[1]
-        arg[0,3,0,1]=(0.632482870556)*x[0]+(0.272691402585)*x[1]
-        arg[0,3,1,0]=(-0.530755710624)*x[0]+(0.798233454742)*x[1]
-        arg[0,3,1,1]=(-0.326644901487)*x[0]+(0.912945575753)*x[1]
-        arg[0,3,2,0]=(0.313672017285)*x[0]+(0.948624232644)*x[1]
-        arg[0,3,2,1]=(-0.985713086674)*x[0]+(0.557682757171)*x[1]
-        arg[0,4,0,0]=(-1.05604811856)*x[0]+(0.953109137724)*x[1]
-        arg[0,4,0,1]=(0.443301072651)*x[0]+(0.063796068208)*x[1]
-        arg[0,4,1,0]=(-0.0166520333953)*x[0]+(0.808947969176)*x[1]
-        arg[0,4,1,1]=(0.447406784488)*x[0]+(0.511727243983)*x[1]
-        arg[0,4,2,0]=(0.966474340588)*x[0]+(0.789208895767)*x[1]
-        arg[0,4,2,1]=(0.5007322363)*x[0]+(0.1211006989)*x[1]
-        arg[1,0,0,0]=(0.328606613916)*x[0]+(-0.874029860851)*x[1]
-        arg[1,0,0,1]=(-0.906174034813)*x[0]+(-0.705820652424)*x[1]
-        arg[1,0,1,0]=(-0.543917624184)*x[0]+(-0.963384956871)*x[1]
-        arg[1,0,1,1]=(-0.516192972362)*x[0]+(0.644782734001)*x[1]
-        arg[1,0,2,0]=(-1.39622140542)*x[0]+(0.292606264905)*x[1]
-        arg[1,0,2,1]=(1.39306984816)*x[0]+(-0.544853887253)*x[1]
-        arg[1,1,0,0]=(-0.0499160669149)*x[0]+(-0.783142164006)*x[1]
-        arg[1,1,0,1]=(0.968157339631)*x[0]+(-1.68767943891)*x[1]
-        arg[1,1,1,0]=(-1.56616531333)*x[0]+(1.057002431)*x[1]
-        arg[1,1,1,1]=(0.759774810848)*x[0]+(-0.217500595483)*x[1]
-        arg[1,1,2,0]=(-0.558666811623)*x[0]+(-0.56110405702)*x[1]
-        arg[1,1,2,1]=(-1.51823291284)*x[0]+(0.968598028275)*x[1]
-        arg[1,2,0,0]=(0.459934430553)*x[0]+(-0.425611928234)*x[1]
-        arg[1,2,0,1]=(0.497077152958)*x[0]+(-0.217468584657)*x[1]
-        arg[1,2,1,0]=(-0.84050521972)*x[0]+(-0.639967173826)*x[1]
-        arg[1,2,1,1]=(1.23982979981)*x[0]+(-0.340962636339)*x[1]
-        arg[1,2,2,0]=(-0.0796290414672)*x[0]+(-0.418766465742)*x[1]
-        arg[1,2,2,1]=(-0.00357466869904)*x[0]+(0.38318423828)*x[1]
-        arg[1,3,0,0]=(-1.06978632139)*x[0]+(-0.293480140024)*x[1]
-        arg[1,3,0,1]=(0.315898405933)*x[0]+(-0.63338147672)*x[1]
-        arg[1,3,1,0]=(-0.570294815011)*x[0]+(0.0492498556666)*x[1]
-        arg[1,3,1,1]=(0.0535633163606)*x[0]+(1.03597167921)*x[1]
-        arg[1,3,2,0]=(0.740363487843)*x[0]+(-0.945398692608)*x[1]
-        arg[1,3,2,1]=(0.0118916598378)*x[0]+(1.13783979963)*x[1]
-        arg[1,4,0,0]=(-0.90818285841)*x[0]+(0.0630620135139)*x[1]
-        arg[1,4,0,1]=(1.28854967547)*x[0]+(0.564058166595)*x[1]
-        arg[1,4,1,0]=(0.0536837223463)*x[0]+(-0.754361313431)*x[1]
-        arg[1,4,1,1]=(-1.4274155179)*x[0]+(-0.0330452395142)*x[1]
-        arg[1,4,2,0]=(-0.0853100557203)*x[0]+(-0.0698244726734)*x[1]
-        arg[1,4,2,1]=(-0.969990013612)*x[0]+(-0.0928692035314)*x[1]
-        arg[2,0,0,0]=(1.402108752)*x[0]+(-0.0601730744903)*x[1]
-        arg[2,0,0,1]=(-0.544125618042)*x[0]+(1.02669845397)*x[1]
-        arg[2,0,1,0]=(-0.259299705101)*x[0]+(-0.449507095724)*x[1]
-        arg[2,0,1,1]=(0.572470083182)*x[0]+(-0.140083185208)*x[1]
-        arg[2,0,2,0]=(1.7708938802)*x[0]+(-0.0924975206473)*x[1]
-        arg[2,0,2,1]=(-0.262417029616)*x[0]+(-0.169562773872)*x[1]
-        arg[2,1,0,0]=(-1.30668657807)*x[0]+(-1.01393009909)*x[1]
-        arg[2,1,0,1]=(0.799588711881)*x[0]+(-1.17126698679)*x[1]
-        arg[2,1,1,0]=(-1.17423919188)*x[0]+(0.321090068168)*x[1]
-        arg[2,1,1,1]=(-0.778912666585)*x[0]+(0.00447436139975)*x[1]
-        arg[2,1,2,0]=(0.40622401744)*x[0]+(0.61089755242)*x[1]
-        arg[2,1,2,1]=(0.550326994175)*x[0]+(1.61303737224)*x[1]
-        arg[2,2,0,0]=(0.931647812671)*x[0]+(-0.93554163705)*x[1]
-        arg[2,2,0,1]=(0.281543117633)*x[0]+(-0.520873020458)*x[1]
-        arg[2,2,1,0]=(1.46731959732)*x[0]+(0.518798296946)*x[1]
-        arg[2,2,1,1]=(-1.18123650343)*x[0]+(-0.145310254643)*x[1]
-        arg[2,2,2,0]=(-0.560745819237)*x[0]+(-1.47844975303)*x[1]
-        arg[2,2,2,1]=(-1.11775616574)*x[0]+(-1.21514252434)*x[1]
-        arg[2,3,0,0]=(0.315369902788)*x[0]+(0.964595236889)*x[1]
-        arg[2,3,0,1]=(-0.907229008161)*x[0]+(1.20677953168)*x[1]
-        arg[2,3,1,0]=(0.0552545457484)*x[0]+(-0.202468129673)*x[1]
-        arg[2,3,1,1]=(-0.832968133648)*x[0]+(0.798887606761)*x[1]
-        arg[2,3,2,0]=(1.0330803155)*x[0]+(0.546834262777)*x[1]
-        arg[2,3,2,1]=(-1.78895672921)*x[0]+(-1.43034307109)*x[1]
-        arg[2,4,0,0]=(0.333456542345)*x[0]+(0.620879982969)*x[1]
-        arg[2,4,0,1]=(-0.141328336229)*x[0]+(-0.568586127044)*x[1]
-        arg[2,4,1,0]=(0.936638826549)*x[0]+(0.262046172423)*x[1]
-        arg[2,4,1,1]=(0.594781145732)*x[0]+(-0.795944581484)*x[1]
-        arg[2,4,2,0]=(-0.0594467711107)*x[0]+(1.65280673317)*x[1]
-        arg[2,4,2,1]=(-0.295492856013)*x[0]+(0.244222123606)*x[1]
-        arg[3,0,0,0]=(0.907207795877)*x[0]+(0.0238682693857)*x[1]
-        arg[3,0,0,1]=(0.767877824626)*x[0]+(0.781729746211)*x[1]
-        arg[3,0,1,0]=(-0.266760960719)*x[0]+(0.109690121766)*x[1]
-        arg[3,0,1,1]=(0.885111787835)*x[0]+(1.83341408518)*x[1]
-        arg[3,0,2,0]=(0.482836215622)*x[0]+(0.202385773036)*x[1]
-        arg[3,0,2,1]=(-0.722931824523)*x[0]+(0.469906208805)*x[1]
-        arg[3,1,0,0]=(0.34246223362)*x[0]+(0.652551099051)*x[1]
-        arg[3,1,0,1]=(-1.24987233614)*x[0]+(-0.208386614512)*x[1]
-        arg[3,1,1,0]=(-0.426021351048)*x[0]+(-0.481440089744)*x[1]
-        arg[3,1,1,1]=(0.402917477117)*x[0]+(0.280066256773)*x[1]
-        arg[3,1,2,0]=(0.846917449307)*x[0]+(-0.890613362071)*x[1]
-        arg[3,1,2,1]=(0.848971364583)*x[0]+(1.28188639634)*x[1]
-        arg[3,2,0,0]=(0.244851870449)*x[0]+(-1.29335472533)*x[1]
-        arg[3,2,0,1]=(-0.679420773687)*x[0]+(0.0533049166584)*x[1]
-        arg[3,2,1,0]=(0.209683196995)*x[0]+(-1.18725405512)*x[1]
-        arg[3,2,1,1]=(1.14374677567)*x[0]+(-0.0360927695675)*x[1]
-        arg[3,2,2,0]=(-0.675139110144)*x[0]+(0.203993983732)*x[1]
-        arg[3,2,2,1]=(-0.237314875828)*x[0]+(-0.581326039718)*x[1]
-        arg[3,3,0,0]=(-0.429825943466)*x[0]+(-0.256971982048)*x[1]
-        arg[3,3,0,1]=(0.520863156649)*x[0]+(-0.149770317657)*x[1]
-        arg[3,3,1,0]=(0.534493615852)*x[0]+(-0.486279758704)*x[1]
-        arg[3,3,1,1]=(1.40465616102)*x[0]+(-0.131521707731)*x[1]
-        arg[3,3,2,0]=(0.171604624229)*x[0]+(0.810160978932)*x[1]
-        arg[3,3,2,1]=(1.28980934106)*x[0]+(-1.0563749584)*x[1]
-        arg[3,4,0,0]=(-0.631680784482)*x[0]+(-1.10885428097)*x[1]
-        arg[3,4,0,1]=(-1.02297901709)*x[0]+(1.30007360034)*x[1]
-        arg[3,4,1,0]=(0.728467970192)*x[0]+(-0.872220126316)*x[1]
-        arg[3,4,1,1]=(1.18596842635)*x[0]+(-0.246158517864)*x[1]
-        arg[3,4,2,0]=(0.158818463065)*x[0]+(-0.687328798914)*x[1]
-        arg[3,4,2,1]=(-0.267029459109)*x[0]+(0.161790218602)*x[1]
-        ref[0,0,0,0]=(0.748732264044)*x_ref[0]+(0.326649183672)*x_ref[1]
-        ref[0,0,0,1]=(-0.118874184707)*x_ref[0]+(0.512027378857)*x_ref[1]
-        ref[0,0,1,0]=(0.0907534655112)*x_ref[0]+(0.145249508199)*x_ref[1]
-        ref[0,0,1,1]=(0.879689742122)*x_ref[0]+(-0.238488796672)*x_ref[1]
-        ref[0,0,2,0]=(-0.285226080478)*x_ref[0]+(-0.560477167124)*x_ref[1]
-        ref[0,0,2,1]=(1.3620160918)*x_ref[0]+(-0.97877396699)*x_ref[1]
-        ref[0,1,0,0]=(-1.52439734042)*x_ref[0]+(0.981913225695)*x_ref[1]
-        ref[0,1,0,1]=(-1.19963597544)*x_ref[0]+(1.1571861154)*x_ref[1]
-        ref[0,1,1,0]=(0.822934040682)*x_ref[0]+(-1.75039812758)*x_ref[1]
-        ref[0,1,1,1]=(-0.690374545295)*x_ref[0]+(1.10465673793)*x_ref[1]
-        ref[0,1,2,0]=(-0.222743457309)*x_ref[0]+(-0.499809039611)*x_ref[1]
-        ref[0,1,2,1]=(0.774614333867)*x_ref[0]+(-0.140097281276)*x_ref[1]
-        ref[0,2,0,0]=(0.92399157301)*x_ref[0]+(-1.53184881088)*x_ref[1]
-        ref[0,2,0,1]=(0.14612723475)*x_ref[0]+(0.892066346169)*x_ref[1]
-        ref[0,2,1,0]=(-0.136826339137)*x_ref[0]+(0.0588253058296)*x_ref[1]
-        ref[0,2,1,1]=(-0.73687808603)*x_ref[0]+(0.763659413232)*x_ref[1]
-        ref[0,2,2,0]=(0.669031805455)*x_ref[0]+(0.452748434512)*x_ref[1]
-        ref[0,2,2,1]=(0.969822865927)*x_ref[0]+(0.84449053089)*x_ref[1]
-        ref[0,3,0,0]=(1.05482233425)*x_ref[0]+(0.592437824455)*x_ref[1]
-        ref[0,3,0,1]=(0.632482870556)*x_ref[0]+(0.272691402585)*x_ref[1]
-        ref[0,3,1,0]=(-0.530755710624)*x_ref[0]+(0.798233454742)*x_ref[1]
-        ref[0,3,1,1]=(-0.326644901487)*x_ref[0]+(0.912945575753)*x_ref[1]
-        ref[0,3,2,0]=(0.313672017285)*x_ref[0]+(0.948624232644)*x_ref[1]
-        ref[0,3,2,1]=(-0.985713086674)*x_ref[0]+(0.557682757171)*x_ref[1]
-        ref[0,4,0,0]=(-1.05604811856)*x_ref[0]+(0.953109137724)*x_ref[1]
-        ref[0,4,0,1]=(0.443301072651)*x_ref[0]+(0.063796068208)*x_ref[1]
-        ref[0,4,1,0]=(-0.0166520333953)*x_ref[0]+(0.808947969176)*x_ref[1]
-        ref[0,4,1,1]=(0.447406784488)*x_ref[0]+(0.511727243983)*x_ref[1]
-        ref[0,4,2,0]=(0.966474340588)*x_ref[0]+(0.789208895767)*x_ref[1]
-        ref[0,4,2,1]=(0.5007322363)*x_ref[0]+(0.1211006989)*x_ref[1]
-        ref[1,0,0,0]=(0.328606613916)*x_ref[0]+(-0.874029860851)*x_ref[1]
-        ref[1,0,0,1]=(-0.906174034813)*x_ref[0]+(-0.705820652424)*x_ref[1]
-        ref[1,0,1,0]=(-0.543917624184)*x_ref[0]+(-0.963384956871)*x_ref[1]
-        ref[1,0,1,1]=(-0.516192972362)*x_ref[0]+(0.644782734001)*x_ref[1]
-        ref[1,0,2,0]=(-1.39622140542)*x_ref[0]+(0.292606264905)*x_ref[1]
-        ref[1,0,2,1]=(1.39306984816)*x_ref[0]+(-0.544853887253)*x_ref[1]
-        ref[1,1,0,0]=(-0.0499160669149)*x_ref[0]+(-0.783142164006)*x_ref[1]
-        ref[1,1,0,1]=(0.968157339631)*x_ref[0]+(-1.68767943891)*x_ref[1]
-        ref[1,1,1,0]=(-1.56616531333)*x_ref[0]+(1.057002431)*x_ref[1]
-        ref[1,1,1,1]=(0.759774810848)*x_ref[0]+(-0.217500595483)*x_ref[1]
-        ref[1,1,2,0]=(-0.558666811623)*x_ref[0]+(-0.56110405702)*x_ref[1]
-        ref[1,1,2,1]=(-1.51823291284)*x_ref[0]+(0.968598028275)*x_ref[1]
-        ref[1,2,0,0]=(0.459934430553)*x_ref[0]+(-0.425611928234)*x_ref[1]
-        ref[1,2,0,1]=(0.497077152958)*x_ref[0]+(-0.217468584657)*x_ref[1]
-        ref[1,2,1,0]=(-0.84050521972)*x_ref[0]+(-0.639967173826)*x_ref[1]
-        ref[1,2,1,1]=(1.23982979981)*x_ref[0]+(-0.340962636339)*x_ref[1]
-        ref[1,2,2,0]=(-0.0796290414672)*x_ref[0]+(-0.418766465742)*x_ref[1]
-        ref[1,2,2,1]=(-0.00357466869904)*x_ref[0]+(0.38318423828)*x_ref[1]
-        ref[1,3,0,0]=(-1.06978632139)*x_ref[0]+(-0.293480140024)*x_ref[1]
-        ref[1,3,0,1]=(0.315898405933)*x_ref[0]+(-0.63338147672)*x_ref[1]
-        ref[1,3,1,0]=(-0.570294815011)*x_ref[0]+(0.0492498556666)*x_ref[1]
-        ref[1,3,1,1]=(0.0535633163606)*x_ref[0]+(1.03597167921)*x_ref[1]
-        ref[1,3,2,0]=(0.740363487843)*x_ref[0]+(-0.945398692608)*x_ref[1]
-        ref[1,3,2,1]=(0.0118916598378)*x_ref[0]+(1.13783979963)*x_ref[1]
-        ref[1,4,0,0]=(-0.90818285841)*x_ref[0]+(0.0630620135139)*x_ref[1]
-        ref[1,4,0,1]=(1.28854967547)*x_ref[0]+(0.564058166595)*x_ref[1]
-        ref[1,4,1,0]=(0.0536837223463)*x_ref[0]+(-0.754361313431)*x_ref[1]
-        ref[1,4,1,1]=(-1.4274155179)*x_ref[0]+(-0.0330452395142)*x_ref[1]
-        ref[1,4,2,0]=(-0.0853100557203)*x_ref[0]+(-0.0698244726734)*x_ref[1]
-        ref[1,4,2,1]=(-0.969990013612)*x_ref[0]+(-0.0928692035314)*x_ref[1]
-        ref[2,0,0,0]=(1.402108752)*x_ref[0]+(-0.0601730744903)*x_ref[1]
-        ref[2,0,0,1]=(-0.544125618042)*x_ref[0]+(1.02669845397)*x_ref[1]
-        ref[2,0,1,0]=(-0.259299705101)*x_ref[0]+(-0.449507095724)*x_ref[1]
-        ref[2,0,1,1]=(0.572470083182)*x_ref[0]+(-0.140083185208)*x_ref[1]
-        ref[2,0,2,0]=(1.7708938802)*x_ref[0]+(-0.0924975206473)*x_ref[1]
-        ref[2,0,2,1]=(-0.262417029616)*x_ref[0]+(-0.169562773872)*x_ref[1]
-        ref[2,1,0,0]=(-1.30668657807)*x_ref[0]+(-1.01393009909)*x_ref[1]
-        ref[2,1,0,1]=(0.799588711881)*x_ref[0]+(-1.17126698679)*x_ref[1]
-        ref[2,1,1,0]=(-1.17423919188)*x_ref[0]+(0.321090068168)*x_ref[1]
-        ref[2,1,1,1]=(-0.778912666585)*x_ref[0]+(0.00447436139975)*x_ref[1]
-        ref[2,1,2,0]=(0.40622401744)*x_ref[0]+(0.61089755242)*x_ref[1]
-        ref[2,1,2,1]=(0.550326994175)*x_ref[0]+(1.61303737224)*x_ref[1]
-        ref[2,2,0,0]=(0.931647812671)*x_ref[0]+(-0.93554163705)*x_ref[1]
-        ref[2,2,0,1]=(0.281543117633)*x_ref[0]+(-0.520873020458)*x_ref[1]
-        ref[2,2,1,0]=(1.46731959732)*x_ref[0]+(0.518798296946)*x_ref[1]
-        ref[2,2,1,1]=(-1.18123650343)*x_ref[0]+(-0.145310254643)*x_ref[1]
-        ref[2,2,2,0]=(-0.560745819237)*x_ref[0]+(-1.47844975303)*x_ref[1]
-        ref[2,2,2,1]=(-1.11775616574)*x_ref[0]+(-1.21514252434)*x_ref[1]
-        ref[2,3,0,0]=(0.315369902788)*x_ref[0]+(0.964595236889)*x_ref[1]
-        ref[2,3,0,1]=(-0.907229008161)*x_ref[0]+(1.20677953168)*x_ref[1]
-        ref[2,3,1,0]=(0.0552545457484)*x_ref[0]+(-0.202468129673)*x_ref[1]
-        ref[2,3,1,1]=(-0.832968133648)*x_ref[0]+(0.798887606761)*x_ref[1]
-        ref[2,3,2,0]=(1.0330803155)*x_ref[0]+(0.546834262777)*x_ref[1]
-        ref[2,3,2,1]=(-1.78895672921)*x_ref[0]+(-1.43034307109)*x_ref[1]
-        ref[2,4,0,0]=(0.333456542345)*x_ref[0]+(0.620879982969)*x_ref[1]
-        ref[2,4,0,1]=(-0.141328336229)*x_ref[0]+(-0.568586127044)*x_ref[1]
-        ref[2,4,1,0]=(0.936638826549)*x_ref[0]+(0.262046172423)*x_ref[1]
-        ref[2,4,1,1]=(0.594781145732)*x_ref[0]+(-0.795944581484)*x_ref[1]
-        ref[2,4,2,0]=(-0.0594467711107)*x_ref[0]+(1.65280673317)*x_ref[1]
-        ref[2,4,2,1]=(-0.295492856013)*x_ref[0]+(0.244222123606)*x_ref[1]
-        ref[3,0,0,0]=(0.907207795877)*x_ref[0]+(0.0238682693857)*x_ref[1]
-        ref[3,0,0,1]=(0.767877824626)*x_ref[0]+(0.781729746211)*x_ref[1]
-        ref[3,0,1,0]=(-0.266760960719)*x_ref[0]+(0.109690121766)*x_ref[1]
-        ref[3,0,1,1]=(0.885111787835)*x_ref[0]+(1.83341408518)*x_ref[1]
-        ref[3,0,2,0]=(0.482836215622)*x_ref[0]+(0.202385773036)*x_ref[1]
-        ref[3,0,2,1]=(-0.722931824523)*x_ref[0]+(0.469906208805)*x_ref[1]
-        ref[3,1,0,0]=(0.34246223362)*x_ref[0]+(0.652551099051)*x_ref[1]
-        ref[3,1,0,1]=(-1.24987233614)*x_ref[0]+(-0.208386614512)*x_ref[1]
-        ref[3,1,1,0]=(-0.426021351048)*x_ref[0]+(-0.481440089744)*x_ref[1]
-        ref[3,1,1,1]=(0.402917477117)*x_ref[0]+(0.280066256773)*x_ref[1]
-        ref[3,1,2,0]=(0.846917449307)*x_ref[0]+(-0.890613362071)*x_ref[1]
-        ref[3,1,2,1]=(0.848971364583)*x_ref[0]+(1.28188639634)*x_ref[1]
-        ref[3,2,0,0]=(0.244851870449)*x_ref[0]+(-1.29335472533)*x_ref[1]
-        ref[3,2,0,1]=(-0.679420773687)*x_ref[0]+(0.0533049166584)*x_ref[1]
-        ref[3,2,1,0]=(0.209683196995)*x_ref[0]+(-1.18725405512)*x_ref[1]
-        ref[3,2,1,1]=(1.14374677567)*x_ref[0]+(-0.0360927695675)*x_ref[1]
-        ref[3,2,2,0]=(-0.675139110144)*x_ref[0]+(0.203993983732)*x_ref[1]
-        ref[3,2,2,1]=(-0.237314875828)*x_ref[0]+(-0.581326039718)*x_ref[1]
-        ref[3,3,0,0]=(-0.429825943466)*x_ref[0]+(-0.256971982048)*x_ref[1]
-        ref[3,3,0,1]=(0.520863156649)*x_ref[0]+(-0.149770317657)*x_ref[1]
-        ref[3,3,1,0]=(0.534493615852)*x_ref[0]+(-0.486279758704)*x_ref[1]
-        ref[3,3,1,1]=(1.40465616102)*x_ref[0]+(-0.131521707731)*x_ref[1]
-        ref[3,3,2,0]=(0.171604624229)*x_ref[0]+(0.810160978932)*x_ref[1]
-        ref[3,3,2,1]=(1.28980934106)*x_ref[0]+(-1.0563749584)*x_ref[1]
-        ref[3,4,0,0]=(-0.631680784482)*x_ref[0]+(-1.10885428097)*x_ref[1]
-        ref[3,4,0,1]=(-1.02297901709)*x_ref[0]+(1.30007360034)*x_ref[1]
-        ref[3,4,1,0]=(0.728467970192)*x_ref[0]+(-0.872220126316)*x_ref[1]
-        ref[3,4,1,1]=(1.18596842635)*x_ref[0]+(-0.246158517864)*x_ref[1]
-        ref[3,4,2,0]=(0.158818463065)*x_ref[0]+(-0.687328798914)*x_ref[1]
-        ref[3,4,2,1]=(-0.267029459109)*x_ref[0]+(0.161790218602)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.41028779384)*x[0]+(-1.69085638593)*x[1]+(-0.626478106748)*x[2]
-        arg[0,0,0,1]=(-0.322729407761)*x[0]+(-0.311218478587)*x[1]+(-0.329375635778)*x[2]
-        arg[0,0,1,0]=(-0.16111144722)*x[0]+(0.864377600354)*x[1]+(-1.01349863575)*x[2]
-        arg[0,0,1,1]=(0.0720111273067)*x[0]+(1.40365232221)*x[1]+(0.292610528868)*x[2]
-        arg[0,0,2,0]=(-1.21827641959)*x[0]+(0.168559044212)*x[1]+(0.841389848275)*x[2]
-        arg[0,0,2,1]=(0.631258821218)*x[0]+(-1.22185752256)*x[1]+(0.0213133635991)*x[2]
-        arg[0,1,0,0]=(-0.55959466492)*x[0]+(0.567105256147)*x[1]+(0.185414627961)*x[2]
-        arg[0,1,0,1]=(1.42576865692)*x[0]+(-1.38354595053)*x[1]+(1.08902163491)*x[2]
-        arg[0,1,1,0]=(-0.441288277712)*x[0]+(-0.412579680073)*x[1]+(0.85969923606)*x[2]
-        arg[0,1,1,1]=(1.20924692667)*x[0]+(-0.263790869016)*x[1]+(-0.117388627799)*x[2]
-        arg[0,1,2,0]=(-0.849546239235)*x[0]+(-0.41970601628)*x[1]+(0.712637692553)*x[2]
-        arg[0,1,2,1]=(0.665825646772)*x[0]+(-0.49641548077)*x[1]+(0.0243383084422)*x[2]
-        arg[0,2,0,0]=(0.158298703766)*x[0]+(-1.38559416875)*x[1]+(-0.549526684962)*x[2]
-        arg[0,2,0,1]=(0.290664973202)*x[0]+(-0.725089032773)*x[1]+(-0.420805410829)*x[2]
-        arg[0,2,1,0]=(-0.371388631358)*x[0]+(0.712788591622)*x[1]+(0.708499722908)*x[2]
-        arg[0,2,1,1]=(-0.209234718871)*x[0]+(-0.559384946846)*x[1]+(-0.18126082565)*x[2]
-        arg[0,2,2,0]=(0.295605948328)*x[0]+(0.0787080259554)*x[1]+(-0.413453606631)*x[2]
-        arg[0,2,2,1]=(-0.951652076608)*x[0]+(0.412030442608)*x[1]+(-1.0098591628)*x[2]
-        arg[0,3,0,0]=(0.38805130758)*x[0]+(0.725062113278)*x[1]+(-0.0789722367715)*x[2]
-        arg[0,3,0,1]=(-0.856689544368)*x[0]+(-0.378806165724)*x[1]+(-1.56132477796)*x[2]
-        arg[0,3,1,0]=(0.948414643284)*x[0]+(-0.223099011255)*x[1]+(-0.164540510924)*x[2]
-        arg[0,3,1,1]=(-0.290272025223)*x[0]+(0.0110236571203)*x[1]+(0.0344804634468)*x[2]
-        arg[0,3,2,0]=(-1.06973937948)*x[0]+(-0.19210617162)*x[1]+(-0.0319179806513)*x[2]
-        arg[0,3,2,1]=(0.873398122756)*x[0]+(0.87424619659)*x[1]+(0.130681723853)*x[2]
-        arg[0,4,0,0]=(-0.231238303513)*x[0]+(1.13248606226)*x[1]+(1.08638890671)*x[2]
-        arg[0,4,0,1]=(0.0325659323288)*x[0]+(1.53278397594)*x[1]+(-0.0823455709949)*x[2]
-        arg[0,4,1,0]=(-0.415558245155)*x[0]+(-0.468794623975)*x[1]+(-0.4219946425)*x[2]
-        arg[0,4,1,1]=(0.687857094934)*x[0]+(-0.316748377318)*x[1]+(1.51841645514)*x[2]
-        arg[0,4,2,0]=(-0.842163178579)*x[0]+(-0.459357139258)*x[1]+(-0.774999285967)*x[2]
-        arg[0,4,2,1]=(0.361059525968)*x[0]+(0.302800510186)*x[1]+(0.164988681972)*x[2]
-        arg[1,0,0,0]=(-0.549884089801)*x[0]+(0.18615759395)*x[1]+(-0.150676638905)*x[2]
-        arg[1,0,0,1]=(-0.908800158159)*x[0]+(1.74574577127)*x[1]+(0.347894281217)*x[2]
-        arg[1,0,1,0]=(1.21798491919)*x[0]+(-1.04989223901)*x[1]+(-0.706457284537)*x[2]
-        arg[1,0,1,1]=(0.441083030576)*x[0]+(0.458319482203)*x[1]+(0.704887998977)*x[2]
-        arg[1,0,2,0]=(-0.386479556415)*x[0]+(-1.28347087396)*x[1]+(-0.876058219438)*x[2]
-        arg[1,0,2,1]=(0.743100114846)*x[0]+(1.02919050439)*x[1]+(-0.357203265224)*x[2]
-        arg[1,1,0,0]=(-0.309112244319)*x[0]+(0.469639650979)*x[1]+(0.371325594811)*x[2]
-        arg[1,1,0,1]=(1.53067095144)*x[0]+(1.18235592763)*x[1]+(-0.959436428335)*x[2]
-        arg[1,1,1,0]=(0.291735282406)*x[0]+(0.449515270669)*x[1]+(0.612383052683)*x[2]
-        arg[1,1,1,1]=(-0.102313390769)*x[0]+(1.25745082506)*x[1]+(-1.03742917135)*x[2]
-        arg[1,1,2,0]=(-0.951576197839)*x[0]+(1.03094297086)*x[1]+(-0.10195348802)*x[2]
-        arg[1,1,2,1]=(1.54751905175)*x[0]+(1.47958820289)*x[1]+(-0.357466311206)*x[2]
-        arg[1,2,0,0]=(-0.452360614767)*x[0]+(-0.865741367113)*x[1]+(1.12034992845)*x[2]
-        arg[1,2,0,1]=(0.00940323370511)*x[0]+(-1.03701972012)*x[1]+(0.0102243182131)*x[2]
-        arg[1,2,1,0]=(-1.50670950911)*x[0]+(-0.219993644831)*x[1]+(-0.1612757943)*x[2]
-        arg[1,2,1,1]=(-0.792871502871)*x[0]+(-0.0163752900095)*x[1]+(1.54206281352)*x[2]
-        arg[1,2,2,0]=(1.02928968974)*x[0]+(-0.171516999194)*x[1]+(-0.446145675054)*x[2]
-        arg[1,2,2,1]=(-1.51230609746)*x[0]+(0.2034193081)*x[1]+(-0.291776924482)*x[2]
-        arg[1,3,0,0]=(-0.0312379262641)*x[0]+(0.722239260943)*x[1]+(-0.279504141505)*x[2]
-        arg[1,3,0,1]=(-1.12038082645)*x[0]+(-0.328148046828)*x[1]+(0.825288681731)*x[2]
-        arg[1,3,1,0]=(0.547173116241)*x[0]+(0.136609628569)*x[1]+(-0.476006212278)*x[2]
-        arg[1,3,1,1]=(0.000854188874487)*x[0]+(0.473989971126)*x[1]+(1.58153857042)*x[2]
-        arg[1,3,2,0]=(-0.746628247481)*x[0]+(0.859384716891)*x[1]+(0.618348305951)*x[2]
-        arg[1,3,2,1]=(0.919601890657)*x[0]+(0.422457734769)*x[1]+(-1.11235109226)*x[2]
-        arg[1,4,0,0]=(0.962587287633)*x[0]+(-1.2526632022)*x[1]+(0.210254126936)*x[2]
-        arg[1,4,0,1]=(-0.330257182624)*x[0]+(-0.251562095795)*x[1]+(1.29427728094)*x[2]
-        arg[1,4,1,0]=(-0.577555922072)*x[0]+(0.844462157498)*x[1]+(-0.120809700805)*x[2]
-        arg[1,4,1,1]=(-0.91963436975)*x[0]+(-0.415146584044)*x[1]+(-0.105600826517)*x[2]
-        arg[1,4,2,0]=(-1.28940482584)*x[0]+(-1.55548284063)*x[1]+(-0.835108666511)*x[2]
-        arg[1,4,2,1]=(-0.0299379665752)*x[0]+(-0.992000458707)*x[1]+(-0.469600133762)*x[2]
-        arg[2,0,0,0]=(0.0107575962552)*x[0]+(-1.06407817799)*x[1]+(-1.84217380223)*x[2]
-        arg[2,0,0,1]=(-0.0596138757136)*x[0]+(1.75177421542)*x[1]+(0.131511355216)*x[2]
-        arg[2,0,1,0]=(-0.29485191211)*x[0]+(1.55396303732)*x[1]+(0.137822438484)*x[2]
-        arg[2,0,1,1]=(0.968093798582)*x[0]+(-0.348515863297)*x[1]+(-0.885253223355)*x[2]
-        arg[2,0,2,0]=(0.304703601471)*x[0]+(0.350016020435)*x[1]+(0.0348615188696)*x[2]
-        arg[2,0,2,1]=(0.242706426227)*x[0]+(0.00660859017533)*x[1]+(-0.122732284886)*x[2]
-        arg[2,1,0,0]=(0.540596184477)*x[0]+(-0.0272014403068)*x[1]+(0.559631760626)*x[2]
-        arg[2,1,0,1]=(0.537160103765)*x[0]+(-0.974891403717)*x[1]+(-1.2571032682)*x[2]
-        arg[2,1,1,0]=(-0.134244705433)*x[0]+(1.63419015928)*x[1]+(0.0879689992598)*x[2]
-        arg[2,1,1,1]=(0.885004305439)*x[0]+(1.63473219215)*x[1]+(-0.714475475618)*x[2]
-        arg[2,1,2,0]=(-0.220742006931)*x[0]+(0.298113077571)*x[1]+(0.129338822854)*x[2]
-        arg[2,1,2,1]=(0.0696132558998)*x[0]+(1.28044127087)*x[1]+(-0.182025504014)*x[2]
-        arg[2,2,0,0]=(-0.108760249345)*x[0]+(-0.727726654762)*x[1]+(1.1810583418)*x[2]
-        arg[2,2,0,1]=(1.69464976816)*x[0]+(0.771779692301)*x[1]+(-0.746303209271)*x[2]
-        arg[2,2,1,0]=(1.6897653643)*x[0]+(-1.21078732523)*x[1]+(-0.000978666646647)*x[2]
-        arg[2,2,1,1]=(1.60773073603)*x[0]+(-0.583968900051)*x[1]+(-0.0511730994465)*x[2]
-        arg[2,2,2,0]=(0.506948201854)*x[0]+(-0.00990858555453)*x[1]+(1.06433022033)*x[2]
-        arg[2,2,2,1]=(0.449523090508)*x[0]+(-1.61710851818)*x[1]+(0.440720932423)*x[2]
-        arg[2,3,0,0]=(0.0167109660325)*x[0]+(-1.08812386645)*x[1]+(-1.22089632364)*x[2]
-        arg[2,3,0,1]=(-0.841668282066)*x[0]+(0.636645352356)*x[1]+(-0.537753623856)*x[2]
-        arg[2,3,1,0]=(1.79552636749)*x[0]+(0.481662215698)*x[1]+(-0.371782307951)*x[2]
-        arg[2,3,1,1]=(-0.747945987059)*x[0]+(0.818378132535)*x[1]+(1.66032057212)*x[2]
-        arg[2,3,2,0]=(-0.126253738036)*x[0]+(-0.681619876818)*x[1]+(0.117269467345)*x[2]
-        arg[2,3,2,1]=(-0.338521414346)*x[0]+(0.381458529772)*x[1]+(1.00819568542)*x[2]
-        arg[2,4,0,0]=(0.0110334310038)*x[0]+(0.229750132795)*x[1]+(-0.900772274961)*x[2]
-        arg[2,4,0,1]=(-0.798344038508)*x[0]+(0.0410740025116)*x[1]+(1.46856652632)*x[2]
-        arg[2,4,1,0]=(0.193355735165)*x[0]+(-0.539307787984)*x[1]+(-0.375854987378)*x[2]
-        arg[2,4,1,1]=(0.568143022174)*x[0]+(-1.61770216281)*x[1]+(0.208204629987)*x[2]
-        arg[2,4,2,0]=(1.37290817619)*x[0]+(-0.174324684678)*x[1]+(-0.217538755825)*x[2]
-        arg[2,4,2,1]=(-0.483601819019)*x[0]+(1.45019519818)*x[1]+(-0.623519730492)*x[2]
-        arg[3,0,0,0]=(-0.793731389518)*x[0]+(-0.154763125819)*x[1]+(1.10863435441)*x[2]
-        arg[3,0,0,1]=(0.507036346178)*x[0]+(-0.309380836403)*x[1]+(-0.418720111636)*x[2]
-        arg[3,0,1,0]=(-0.777608365831)*x[0]+(0.982848447238)*x[1]+(-0.762479658423)*x[2]
-        arg[3,0,1,1]=(-0.73325130954)*x[0]+(-0.253614119609)*x[1]+(-0.366314075481)*x[2]
-        arg[3,0,2,0]=(0.0989317940836)*x[0]+(0.0772067160489)*x[1]+(-1.84682997853)*x[2]
-        arg[3,0,2,1]=(0.256206660712)*x[0]+(1.2868655538)*x[1]+(-0.522346638322)*x[2]
-        arg[3,1,0,0]=(-1.41604178327)*x[0]+(0.662242482319)*x[1]+(1.7526698965)*x[2]
-        arg[3,1,0,1]=(-0.442315980785)*x[0]+(0.423309436413)*x[1]+(0.175362864372)*x[2]
-        arg[3,1,1,0]=(0.353602081392)*x[0]+(1.55530884146)*x[1]+(-0.115267400964)*x[2]
-        arg[3,1,1,1]=(0.1445651493)*x[0]+(0.652413545545)*x[1]+(-1.47341714223)*x[2]
-        arg[3,1,2,0]=(0.288044123145)*x[0]+(1.45339107563)*x[1]+(0.0253961147274)*x[2]
-        arg[3,1,2,1]=(0.738725097174)*x[0]+(0.556287291563)*x[1]+(0.685592801206)*x[2]
-        arg[3,2,0,0]=(-1.6952458849)*x[0]+(-0.450982750203)*x[1]+(-0.176030737746)*x[2]
-        arg[3,2,0,1]=(-0.267377959403)*x[0]+(-0.329354216237)*x[1]+(0.368496833805)*x[2]
-        arg[3,2,1,0]=(1.00419353409)*x[0]+(1.50507467849)*x[1]+(-0.529113363067)*x[2]
-        arg[3,2,1,1]=(-1.69175338104)*x[0]+(-0.101436360248)*x[1]+(0.963918243087)*x[2]
-        arg[3,2,2,0]=(0.093465616883)*x[0]+(-0.390155190153)*x[1]+(-0.354824565592)*x[2]
-        arg[3,2,2,1]=(-0.414577385531)*x[0]+(-0.665726090904)*x[1]+(-1.39857731593)*x[2]
-        arg[3,3,0,0]=(-0.528594178602)*x[0]+(-0.435472295413)*x[1]+(0.397972761993)*x[2]
-        arg[3,3,0,1]=(1.24885378376)*x[0]+(1.63537745582)*x[1]+(-0.00703582234262)*x[2]
-        arg[3,3,1,0]=(0.63369530476)*x[0]+(0.296615915965)*x[1]+(0.593277434193)*x[2]
-        arg[3,3,1,1]=(-0.197615624091)*x[0]+(1.45678045242)*x[1]+(0.571039120854)*x[2]
-        arg[3,3,2,0]=(-1.01304527292)*x[0]+(0.00892977300805)*x[1]+(0.284285861002)*x[2]
-        arg[3,3,2,1]=(0.647872454128)*x[0]+(-0.373279273659)*x[1]+(1.27785668874)*x[2]
-        arg[3,4,0,0]=(0.708994891373)*x[0]+(-0.439675903635)*x[1]+(0.612884939946)*x[2]
-        arg[3,4,0,1]=(0.535549893212)*x[0]+(-0.940830832131)*x[1]+(-0.30796510692)*x[2]
-        arg[3,4,1,0]=(-1.24560696134)*x[0]+(0.125328014324)*x[1]+(0.168757304331)*x[2]
-        arg[3,4,1,1]=(0.604969099581)*x[0]+(0.212563821283)*x[1]+(0.146243255184)*x[2]
-        arg[3,4,2,0]=(-0.0402174498351)*x[0]+(0.967028407195)*x[1]+(-0.991740640214)*x[2]
-        arg[3,4,2,1]=(0.0572331664331)*x[0]+(-0.836713731055)*x[1]+(0.78195371901)*x[2]
-        ref[0,0,0,0]=(-1.41028779384)*x_ref[0]+(-1.69085638593)*x_ref[1]+(-0.626478106748)*x_ref[2]
-        ref[0,0,0,1]=(-0.322729407761)*x_ref[0]+(-0.311218478587)*x_ref[1]+(-0.329375635778)*x_ref[2]
-        ref[0,0,1,0]=(-0.16111144722)*x_ref[0]+(0.864377600354)*x_ref[1]+(-1.01349863575)*x_ref[2]
-        ref[0,0,1,1]=(0.0720111273067)*x_ref[0]+(1.40365232221)*x_ref[1]+(0.292610528868)*x_ref[2]
-        ref[0,0,2,0]=(-1.21827641959)*x_ref[0]+(0.168559044212)*x_ref[1]+(0.841389848275)*x_ref[2]
-        ref[0,0,2,1]=(0.631258821218)*x_ref[0]+(-1.22185752256)*x_ref[1]+(0.0213133635991)*x_ref[2]
-        ref[0,1,0,0]=(-0.55959466492)*x_ref[0]+(0.567105256147)*x_ref[1]+(0.185414627961)*x_ref[2]
-        ref[0,1,0,1]=(1.42576865692)*x_ref[0]+(-1.38354595053)*x_ref[1]+(1.08902163491)*x_ref[2]
-        ref[0,1,1,0]=(-0.441288277712)*x_ref[0]+(-0.412579680073)*x_ref[1]+(0.85969923606)*x_ref[2]
-        ref[0,1,1,1]=(1.20924692667)*x_ref[0]+(-0.263790869016)*x_ref[1]+(-0.117388627799)*x_ref[2]
-        ref[0,1,2,0]=(-0.849546239235)*x_ref[0]+(-0.41970601628)*x_ref[1]+(0.712637692553)*x_ref[2]
-        ref[0,1,2,1]=(0.665825646772)*x_ref[0]+(-0.49641548077)*x_ref[1]+(0.0243383084422)*x_ref[2]
-        ref[0,2,0,0]=(0.158298703766)*x_ref[0]+(-1.38559416875)*x_ref[1]+(-0.549526684962)*x_ref[2]
-        ref[0,2,0,1]=(0.290664973202)*x_ref[0]+(-0.725089032773)*x_ref[1]+(-0.420805410829)*x_ref[2]
-        ref[0,2,1,0]=(-0.371388631358)*x_ref[0]+(0.712788591622)*x_ref[1]+(0.708499722908)*x_ref[2]
-        ref[0,2,1,1]=(-0.209234718871)*x_ref[0]+(-0.559384946846)*x_ref[1]+(-0.18126082565)*x_ref[2]
-        ref[0,2,2,0]=(0.295605948328)*x_ref[0]+(0.0787080259554)*x_ref[1]+(-0.413453606631)*x_ref[2]
-        ref[0,2,2,1]=(-0.951652076608)*x_ref[0]+(0.412030442608)*x_ref[1]+(-1.0098591628)*x_ref[2]
-        ref[0,3,0,0]=(0.38805130758)*x_ref[0]+(0.725062113278)*x_ref[1]+(-0.0789722367715)*x_ref[2]
-        ref[0,3,0,1]=(-0.856689544368)*x_ref[0]+(-0.378806165724)*x_ref[1]+(-1.56132477796)*x_ref[2]
-        ref[0,3,1,0]=(0.948414643284)*x_ref[0]+(-0.223099011255)*x_ref[1]+(-0.164540510924)*x_ref[2]
-        ref[0,3,1,1]=(-0.290272025223)*x_ref[0]+(0.0110236571203)*x_ref[1]+(0.0344804634468)*x_ref[2]
-        ref[0,3,2,0]=(-1.06973937948)*x_ref[0]+(-0.19210617162)*x_ref[1]+(-0.0319179806513)*x_ref[2]
-        ref[0,3,2,1]=(0.873398122756)*x_ref[0]+(0.87424619659)*x_ref[1]+(0.130681723853)*x_ref[2]
-        ref[0,4,0,0]=(-0.231238303513)*x_ref[0]+(1.13248606226)*x_ref[1]+(1.08638890671)*x_ref[2]
-        ref[0,4,0,1]=(0.0325659323288)*x_ref[0]+(1.53278397594)*x_ref[1]+(-0.0823455709949)*x_ref[2]
-        ref[0,4,1,0]=(-0.415558245155)*x_ref[0]+(-0.468794623975)*x_ref[1]+(-0.4219946425)*x_ref[2]
-        ref[0,4,1,1]=(0.687857094934)*x_ref[0]+(-0.316748377318)*x_ref[1]+(1.51841645514)*x_ref[2]
-        ref[0,4,2,0]=(-0.842163178579)*x_ref[0]+(-0.459357139258)*x_ref[1]+(-0.774999285967)*x_ref[2]
-        ref[0,4,2,1]=(0.361059525968)*x_ref[0]+(0.302800510186)*x_ref[1]+(0.164988681972)*x_ref[2]
-        ref[1,0,0,0]=(-0.549884089801)*x_ref[0]+(0.18615759395)*x_ref[1]+(-0.150676638905)*x_ref[2]
-        ref[1,0,0,1]=(-0.908800158159)*x_ref[0]+(1.74574577127)*x_ref[1]+(0.347894281217)*x_ref[2]
-        ref[1,0,1,0]=(1.21798491919)*x_ref[0]+(-1.04989223901)*x_ref[1]+(-0.706457284537)*x_ref[2]
-        ref[1,0,1,1]=(0.441083030576)*x_ref[0]+(0.458319482203)*x_ref[1]+(0.704887998977)*x_ref[2]
-        ref[1,0,2,0]=(-0.386479556415)*x_ref[0]+(-1.28347087396)*x_ref[1]+(-0.876058219438)*x_ref[2]
-        ref[1,0,2,1]=(0.743100114846)*x_ref[0]+(1.02919050439)*x_ref[1]+(-0.357203265224)*x_ref[2]
-        ref[1,1,0,0]=(-0.309112244319)*x_ref[0]+(0.469639650979)*x_ref[1]+(0.371325594811)*x_ref[2]
-        ref[1,1,0,1]=(1.53067095144)*x_ref[0]+(1.18235592763)*x_ref[1]+(-0.959436428335)*x_ref[2]
-        ref[1,1,1,0]=(0.291735282406)*x_ref[0]+(0.449515270669)*x_ref[1]+(0.612383052683)*x_ref[2]
-        ref[1,1,1,1]=(-0.102313390769)*x_ref[0]+(1.25745082506)*x_ref[1]+(-1.03742917135)*x_ref[2]
-        ref[1,1,2,0]=(-0.951576197839)*x_ref[0]+(1.03094297086)*x_ref[1]+(-0.10195348802)*x_ref[2]
-        ref[1,1,2,1]=(1.54751905175)*x_ref[0]+(1.47958820289)*x_ref[1]+(-0.357466311206)*x_ref[2]
-        ref[1,2,0,0]=(-0.452360614767)*x_ref[0]+(-0.865741367113)*x_ref[1]+(1.12034992845)*x_ref[2]
-        ref[1,2,0,1]=(0.00940323370511)*x_ref[0]+(-1.03701972012)*x_ref[1]+(0.0102243182131)*x_ref[2]
-        ref[1,2,1,0]=(-1.50670950911)*x_ref[0]+(-0.219993644831)*x_ref[1]+(-0.1612757943)*x_ref[2]
-        ref[1,2,1,1]=(-0.792871502871)*x_ref[0]+(-0.0163752900095)*x_ref[1]+(1.54206281352)*x_ref[2]
-        ref[1,2,2,0]=(1.02928968974)*x_ref[0]+(-0.171516999194)*x_ref[1]+(-0.446145675054)*x_ref[2]
-        ref[1,2,2,1]=(-1.51230609746)*x_ref[0]+(0.2034193081)*x_ref[1]+(-0.291776924482)*x_ref[2]
-        ref[1,3,0,0]=(-0.0312379262641)*x_ref[0]+(0.722239260943)*x_ref[1]+(-0.279504141505)*x_ref[2]
-        ref[1,3,0,1]=(-1.12038082645)*x_ref[0]+(-0.328148046828)*x_ref[1]+(0.825288681731)*x_ref[2]
-        ref[1,3,1,0]=(0.547173116241)*x_ref[0]+(0.136609628569)*x_ref[1]+(-0.476006212278)*x_ref[2]
-        ref[1,3,1,1]=(0.000854188874487)*x_ref[0]+(0.473989971126)*x_ref[1]+(1.58153857042)*x_ref[2]
-        ref[1,3,2,0]=(-0.746628247481)*x_ref[0]+(0.859384716891)*x_ref[1]+(0.618348305951)*x_ref[2]
-        ref[1,3,2,1]=(0.919601890657)*x_ref[0]+(0.422457734769)*x_ref[1]+(-1.11235109226)*x_ref[2]
-        ref[1,4,0,0]=(0.962587287633)*x_ref[0]+(-1.2526632022)*x_ref[1]+(0.210254126936)*x_ref[2]
-        ref[1,4,0,1]=(-0.330257182624)*x_ref[0]+(-0.251562095795)*x_ref[1]+(1.29427728094)*x_ref[2]
-        ref[1,4,1,0]=(-0.577555922072)*x_ref[0]+(0.844462157498)*x_ref[1]+(-0.120809700805)*x_ref[2]
-        ref[1,4,1,1]=(-0.91963436975)*x_ref[0]+(-0.415146584044)*x_ref[1]+(-0.105600826517)*x_ref[2]
-        ref[1,4,2,0]=(-1.28940482584)*x_ref[0]+(-1.55548284063)*x_ref[1]+(-0.835108666511)*x_ref[2]
-        ref[1,4,2,1]=(-0.0299379665752)*x_ref[0]+(-0.992000458707)*x_ref[1]+(-0.469600133762)*x_ref[2]
-        ref[2,0,0,0]=(0.0107575962552)*x_ref[0]+(-1.06407817799)*x_ref[1]+(-1.84217380223)*x_ref[2]
-        ref[2,0,0,1]=(-0.0596138757136)*x_ref[0]+(1.75177421542)*x_ref[1]+(0.131511355216)*x_ref[2]
-        ref[2,0,1,0]=(-0.29485191211)*x_ref[0]+(1.55396303732)*x_ref[1]+(0.137822438484)*x_ref[2]
-        ref[2,0,1,1]=(0.968093798582)*x_ref[0]+(-0.348515863297)*x_ref[1]+(-0.885253223355)*x_ref[2]
-        ref[2,0,2,0]=(0.304703601471)*x_ref[0]+(0.350016020435)*x_ref[1]+(0.0348615188696)*x_ref[2]
-        ref[2,0,2,1]=(0.242706426227)*x_ref[0]+(0.00660859017533)*x_ref[1]+(-0.122732284886)*x_ref[2]
-        ref[2,1,0,0]=(0.540596184477)*x_ref[0]+(-0.0272014403068)*x_ref[1]+(0.559631760626)*x_ref[2]
-        ref[2,1,0,1]=(0.537160103765)*x_ref[0]+(-0.974891403717)*x_ref[1]+(-1.2571032682)*x_ref[2]
-        ref[2,1,1,0]=(-0.134244705433)*x_ref[0]+(1.63419015928)*x_ref[1]+(0.0879689992598)*x_ref[2]
-        ref[2,1,1,1]=(0.885004305439)*x_ref[0]+(1.63473219215)*x_ref[1]+(-0.714475475618)*x_ref[2]
-        ref[2,1,2,0]=(-0.220742006931)*x_ref[0]+(0.298113077571)*x_ref[1]+(0.129338822854)*x_ref[2]
-        ref[2,1,2,1]=(0.0696132558998)*x_ref[0]+(1.28044127087)*x_ref[1]+(-0.182025504014)*x_ref[2]
-        ref[2,2,0,0]=(-0.108760249345)*x_ref[0]+(-0.727726654762)*x_ref[1]+(1.1810583418)*x_ref[2]
-        ref[2,2,0,1]=(1.69464976816)*x_ref[0]+(0.771779692301)*x_ref[1]+(-0.746303209271)*x_ref[2]
-        ref[2,2,1,0]=(1.6897653643)*x_ref[0]+(-1.21078732523)*x_ref[1]+(-0.000978666646647)*x_ref[2]
-        ref[2,2,1,1]=(1.60773073603)*x_ref[0]+(-0.583968900051)*x_ref[1]+(-0.0511730994465)*x_ref[2]
-        ref[2,2,2,0]=(0.506948201854)*x_ref[0]+(-0.00990858555453)*x_ref[1]+(1.06433022033)*x_ref[2]
-        ref[2,2,2,1]=(0.449523090508)*x_ref[0]+(-1.61710851818)*x_ref[1]+(0.440720932423)*x_ref[2]
-        ref[2,3,0,0]=(0.0167109660325)*x_ref[0]+(-1.08812386645)*x_ref[1]+(-1.22089632364)*x_ref[2]
-        ref[2,3,0,1]=(-0.841668282066)*x_ref[0]+(0.636645352356)*x_ref[1]+(-0.537753623856)*x_ref[2]
-        ref[2,3,1,0]=(1.79552636749)*x_ref[0]+(0.481662215698)*x_ref[1]+(-0.371782307951)*x_ref[2]
-        ref[2,3,1,1]=(-0.747945987059)*x_ref[0]+(0.818378132535)*x_ref[1]+(1.66032057212)*x_ref[2]
-        ref[2,3,2,0]=(-0.126253738036)*x_ref[0]+(-0.681619876818)*x_ref[1]+(0.117269467345)*x_ref[2]
-        ref[2,3,2,1]=(-0.338521414346)*x_ref[0]+(0.381458529772)*x_ref[1]+(1.00819568542)*x_ref[2]
-        ref[2,4,0,0]=(0.0110334310038)*x_ref[0]+(0.229750132795)*x_ref[1]+(-0.900772274961)*x_ref[2]
-        ref[2,4,0,1]=(-0.798344038508)*x_ref[0]+(0.0410740025116)*x_ref[1]+(1.46856652632)*x_ref[2]
-        ref[2,4,1,0]=(0.193355735165)*x_ref[0]+(-0.539307787984)*x_ref[1]+(-0.375854987378)*x_ref[2]
-        ref[2,4,1,1]=(0.568143022174)*x_ref[0]+(-1.61770216281)*x_ref[1]+(0.208204629987)*x_ref[2]
-        ref[2,4,2,0]=(1.37290817619)*x_ref[0]+(-0.174324684678)*x_ref[1]+(-0.217538755825)*x_ref[2]
-        ref[2,4,2,1]=(-0.483601819019)*x_ref[0]+(1.45019519818)*x_ref[1]+(-0.623519730492)*x_ref[2]
-        ref[3,0,0,0]=(-0.793731389518)*x_ref[0]+(-0.154763125819)*x_ref[1]+(1.10863435441)*x_ref[2]
-        ref[3,0,0,1]=(0.507036346178)*x_ref[0]+(-0.309380836403)*x_ref[1]+(-0.418720111636)*x_ref[2]
-        ref[3,0,1,0]=(-0.777608365831)*x_ref[0]+(0.982848447238)*x_ref[1]+(-0.762479658423)*x_ref[2]
-        ref[3,0,1,1]=(-0.73325130954)*x_ref[0]+(-0.253614119609)*x_ref[1]+(-0.366314075481)*x_ref[2]
-        ref[3,0,2,0]=(0.0989317940836)*x_ref[0]+(0.0772067160489)*x_ref[1]+(-1.84682997853)*x_ref[2]
-        ref[3,0,2,1]=(0.256206660712)*x_ref[0]+(1.2868655538)*x_ref[1]+(-0.522346638322)*x_ref[2]
-        ref[3,1,0,0]=(-1.41604178327)*x_ref[0]+(0.662242482319)*x_ref[1]+(1.7526698965)*x_ref[2]
-        ref[3,1,0,1]=(-0.442315980785)*x_ref[0]+(0.423309436413)*x_ref[1]+(0.175362864372)*x_ref[2]
-        ref[3,1,1,0]=(0.353602081392)*x_ref[0]+(1.55530884146)*x_ref[1]+(-0.115267400964)*x_ref[2]
-        ref[3,1,1,1]=(0.1445651493)*x_ref[0]+(0.652413545545)*x_ref[1]+(-1.47341714223)*x_ref[2]
-        ref[3,1,2,0]=(0.288044123145)*x_ref[0]+(1.45339107563)*x_ref[1]+(0.0253961147274)*x_ref[2]
-        ref[3,1,2,1]=(0.738725097174)*x_ref[0]+(0.556287291563)*x_ref[1]+(0.685592801206)*x_ref[2]
-        ref[3,2,0,0]=(-1.6952458849)*x_ref[0]+(-0.450982750203)*x_ref[1]+(-0.176030737746)*x_ref[2]
-        ref[3,2,0,1]=(-0.267377959403)*x_ref[0]+(-0.329354216237)*x_ref[1]+(0.368496833805)*x_ref[2]
-        ref[3,2,1,0]=(1.00419353409)*x_ref[0]+(1.50507467849)*x_ref[1]+(-0.529113363067)*x_ref[2]
-        ref[3,2,1,1]=(-1.69175338104)*x_ref[0]+(-0.101436360248)*x_ref[1]+(0.963918243087)*x_ref[2]
-        ref[3,2,2,0]=(0.093465616883)*x_ref[0]+(-0.390155190153)*x_ref[1]+(-0.354824565592)*x_ref[2]
-        ref[3,2,2,1]=(-0.414577385531)*x_ref[0]+(-0.665726090904)*x_ref[1]+(-1.39857731593)*x_ref[2]
-        ref[3,3,0,0]=(-0.528594178602)*x_ref[0]+(-0.435472295413)*x_ref[1]+(0.397972761993)*x_ref[2]
-        ref[3,3,0,1]=(1.24885378376)*x_ref[0]+(1.63537745582)*x_ref[1]+(-0.00703582234262)*x_ref[2]
-        ref[3,3,1,0]=(0.63369530476)*x_ref[0]+(0.296615915965)*x_ref[1]+(0.593277434193)*x_ref[2]
-        ref[3,3,1,1]=(-0.197615624091)*x_ref[0]+(1.45678045242)*x_ref[1]+(0.571039120854)*x_ref[2]
-        ref[3,3,2,0]=(-1.01304527292)*x_ref[0]+(0.00892977300805)*x_ref[1]+(0.284285861002)*x_ref[2]
-        ref[3,3,2,1]=(0.647872454128)*x_ref[0]+(-0.373279273659)*x_ref[1]+(1.27785668874)*x_ref[2]
-        ref[3,4,0,0]=(0.708994891373)*x_ref[0]+(-0.439675903635)*x_ref[1]+(0.612884939946)*x_ref[2]
-        ref[3,4,0,1]=(0.535549893212)*x_ref[0]+(-0.940830832131)*x_ref[1]+(-0.30796510692)*x_ref[2]
-        ref[3,4,1,0]=(-1.24560696134)*x_ref[0]+(0.125328014324)*x_ref[1]+(0.168757304331)*x_ref[2]
-        ref[3,4,1,1]=(0.604969099581)*x_ref[0]+(0.212563821283)*x_ref[1]+(0.146243255184)*x_ref[2]
-        ref[3,4,2,0]=(-0.0402174498351)*x_ref[0]+(0.967028407195)*x_ref[1]+(-0.991740640214)*x_ref[2]
-        ref[3,4,2,1]=(0.0572331664331)*x_ref[0]+(-0.836713731055)*x_ref[1]+(0.78195371901)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnBoundary onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.70941034293)*x[0]**o+(-0.988234004949)*x[0]+(0.440342659022)*x[1]**o+(0.221444369839)*x[1]
-        ref=(0.70941034293)*x_ref[0]**o+(-0.988234004949)*x_ref[0]+(0.440342659022)*x_ref[1]**o+(0.221444369839)*x_ref[1]
-      else:
-        arg=(0.720798141776)*x[0]**o+(0.841475017012)*x[0]+(-0.76285313232)*x[1]**o+(-0.214354625268)*x[1]+(-0.887218533751)*x[2]**o+(-0.066368425118)*x[2]
-        ref=(0.720798141776)*x_ref[0]**o+(0.841475017012)*x_ref[0]+(-0.76285313232)*x_ref[1]**o+(-0.214354625268)*x_ref[1]+(-0.887218533751)*x_ref[2]**o+(-0.066368425118)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnBoundary onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.940260123916)*x[0]**o+(-0.977192570293)*x[0]+(-0.0910686020625)*x[1]**o+(0.464205016172)*x[1]
-        arg[1]=(-0.634146043992)*x[0]**o+(0.00438663094072)*x[0]+(0.905996907036)*x[1]**o+(0.175291641923)*x[1]
-        ref[0]=(-0.940260123916)*x_ref[0]**o+(-0.977192570293)*x_ref[0]+(-0.0910686020625)*x_ref[1]**o+(0.464205016172)*x_ref[1]
-        ref[1]=(-0.634146043992)*x_ref[0]**o+(0.00438663094072)*x_ref[0]+(0.905996907036)*x_ref[1]**o+(0.175291641923)*x_ref[1]
-      else:
-        arg[0]=(0.0746302635373)*x[0]**o+(0.611568121627)*x[0]+(0.0392401043636)*x[1]**o+(0.846339953866)*x[1]+(0.775935477701)*x[2]**o+(0.309530355508)*x[2]
-        arg[1]=(0.790143430408)*x[0]**o+(0.987665779965)*x[0]+(0.569313447766)*x[1]**o+(0.170690891282)*x[1]+(0.224015411231)*x[2]**o+(-0.670946134012)*x[2]
-        ref[0]=(0.0746302635373)*x_ref[0]**o+(0.611568121627)*x_ref[0]+(0.0392401043636)*x_ref[1]**o+(0.846339953866)*x_ref[1]+(0.775935477701)*x_ref[2]**o+(0.309530355508)*x_ref[2]
-        ref[1]=(0.790143430408)*x_ref[0]**o+(0.987665779965)*x_ref[0]+(0.569313447766)*x_ref[1]**o+(0.170690891282)*x_ref[1]+(0.224015411231)*x_ref[2]**o+(-0.670946134012)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnBoundary onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.339464191741)*x[0]**o+(0.898634031554)*x[0]+(-0.67217412133)*x[1]**o+(-0.732882671617)*x[1]
-        arg[0,1]=(0.475031035618)*x[0]**o+(-0.712271710437)*x[0]+(-0.346485473024)*x[1]**o+(0.936873073538)*x[1]
-        arg[0,2]=(0.139217050193)*x[0]**o+(0.532762047045)*x[0]+(-0.411674842781)*x[1]**o+(-0.423096144938)*x[1]
-        arg[0,3]=(-0.146193322436)*x[0]**o+(-0.227693594412)*x[0]+(0.74715898621)*x[1]**o+(0.538402714773)*x[1]
-        arg[0,4]=(0.233316268084)*x[0]**o+(-0.0155557244918)*x[0]+(0.588017790807)*x[1]**o+(-0.58604454457)*x[1]
-        arg[1,0]=(0.30473687856)*x[0]**o+(0.933154007362)*x[0]+(-0.0797692178609)*x[1]**o+(0.270021035922)*x[1]
-        arg[1,1]=(-0.495613786111)*x[0]**o+(0.0857849462525)*x[0]+(0.330048664047)*x[1]**o+(0.0442768259753)*x[1]
-        arg[1,2]=(0.203830377049)*x[0]**o+(-0.891094217974)*x[0]+(-0.643947141174)*x[1]**o+(-0.564315919126)*x[1]
-        arg[1,3]=(-0.783514920199)*x[0]**o+(0.356882300706)*x[0]+(-0.307634481801)*x[1]**o+(0.521370775315)*x[1]
-        arg[1,4]=(0.418545793821)*x[0]**o+(0.574742804708)*x[0]+(-0.340992300811)*x[1]**o+(-0.892118088815)*x[1]
-        arg[2,0]=(-0.361915184269)*x[0]**o+(-0.834492406999)*x[0]+(0.750344593844)*x[1]**o+(-0.516981733186)*x[1]
-        arg[2,1]=(-0.0123811923638)*x[0]**o+(-0.9808055138)*x[0]+(-0.176978785352)*x[1]**o+(0.519804799089)*x[1]
-        arg[2,2]=(-0.901764228726)*x[0]**o+(-0.610547400097)*x[0]+(0.384870544403)*x[1]**o+(0.0308096944571)*x[1]
-        arg[2,3]=(-0.163626872732)*x[0]**o+(0.278523098981)*x[0]+(-0.0544994735633)*x[1]**o+(-0.319354318824)*x[1]
-        arg[2,4]=(0.558959525812)*x[0]**o+(0.435157723929)*x[0]+(0.758922109245)*x[1]**o+(-0.702427033542)*x[1]
-        arg[3,0]=(0.832800430277)*x[0]**o+(-0.709285644484)*x[0]+(-0.201572915312)*x[1]**o+(0.398294738552)*x[1]
-        arg[3,1]=(-0.836258924261)*x[0]**o+(-0.461452427039)*x[0]+(0.314485542425)*x[1]**o+(0.860807479051)*x[1]
-        arg[3,2]=(-0.569661610862)*x[0]**o+(-0.46125190469)*x[0]+(0.807311492846)*x[1]**o+(0.72312107176)*x[1]
-        arg[3,3]=(0.842126813179)*x[0]**o+(-0.714991954637)*x[0]+(-0.853100178283)*x[1]**o+(-0.644363753291)*x[1]
-        arg[3,4]=(-0.0480369646571)*x[0]**o+(-0.330580215997)*x[0]+(0.609757645513)*x[1]**o+(0.915764017541)*x[1]
-        ref[0,0]=(0.339464191741)*x_ref[0]**o+(0.898634031554)*x_ref[0]+(-0.67217412133)*x_ref[1]**o+(-0.732882671617)*x_ref[1]
-        ref[0,1]=(0.475031035618)*x_ref[0]**o+(-0.712271710437)*x_ref[0]+(-0.346485473024)*x_ref[1]**o+(0.936873073538)*x_ref[1]
-        ref[0,2]=(0.139217050193)*x_ref[0]**o+(0.532762047045)*x_ref[0]+(-0.411674842781)*x_ref[1]**o+(-0.423096144938)*x_ref[1]
-        ref[0,3]=(-0.146193322436)*x_ref[0]**o+(-0.227693594412)*x_ref[0]+(0.74715898621)*x_ref[1]**o+(0.538402714773)*x_ref[1]
-        ref[0,4]=(0.233316268084)*x_ref[0]**o+(-0.0155557244918)*x_ref[0]+(0.588017790807)*x_ref[1]**o+(-0.58604454457)*x_ref[1]
-        ref[1,0]=(0.30473687856)*x_ref[0]**o+(0.933154007362)*x_ref[0]+(-0.0797692178609)*x_ref[1]**o+(0.270021035922)*x_ref[1]
-        ref[1,1]=(-0.495613786111)*x_ref[0]**o+(0.0857849462525)*x_ref[0]+(0.330048664047)*x_ref[1]**o+(0.0442768259753)*x_ref[1]
-        ref[1,2]=(0.203830377049)*x_ref[0]**o+(-0.891094217974)*x_ref[0]+(-0.643947141174)*x_ref[1]**o+(-0.564315919126)*x_ref[1]
-        ref[1,3]=(-0.783514920199)*x_ref[0]**o+(0.356882300706)*x_ref[0]+(-0.307634481801)*x_ref[1]**o+(0.521370775315)*x_ref[1]
-        ref[1,4]=(0.418545793821)*x_ref[0]**o+(0.574742804708)*x_ref[0]+(-0.340992300811)*x_ref[1]**o+(-0.892118088815)*x_ref[1]
-        ref[2,0]=(-0.361915184269)*x_ref[0]**o+(-0.834492406999)*x_ref[0]+(0.750344593844)*x_ref[1]**o+(-0.516981733186)*x_ref[1]
-        ref[2,1]=(-0.0123811923638)*x_ref[0]**o+(-0.9808055138)*x_ref[0]+(-0.176978785352)*x_ref[1]**o+(0.519804799089)*x_ref[1]
-        ref[2,2]=(-0.901764228726)*x_ref[0]**o+(-0.610547400097)*x_ref[0]+(0.384870544403)*x_ref[1]**o+(0.0308096944571)*x_ref[1]
-        ref[2,3]=(-0.163626872732)*x_ref[0]**o+(0.278523098981)*x_ref[0]+(-0.0544994735633)*x_ref[1]**o+(-0.319354318824)*x_ref[1]
-        ref[2,4]=(0.558959525812)*x_ref[0]**o+(0.435157723929)*x_ref[0]+(0.758922109245)*x_ref[1]**o+(-0.702427033542)*x_ref[1]
-        ref[3,0]=(0.832800430277)*x_ref[0]**o+(-0.709285644484)*x_ref[0]+(-0.201572915312)*x_ref[1]**o+(0.398294738552)*x_ref[1]
-        ref[3,1]=(-0.836258924261)*x_ref[0]**o+(-0.461452427039)*x_ref[0]+(0.314485542425)*x_ref[1]**o+(0.860807479051)*x_ref[1]
-        ref[3,2]=(-0.569661610862)*x_ref[0]**o+(-0.46125190469)*x_ref[0]+(0.807311492846)*x_ref[1]**o+(0.72312107176)*x_ref[1]
-        ref[3,3]=(0.842126813179)*x_ref[0]**o+(-0.714991954637)*x_ref[0]+(-0.853100178283)*x_ref[1]**o+(-0.644363753291)*x_ref[1]
-        ref[3,4]=(-0.0480369646571)*x_ref[0]**o+(-0.330580215997)*x_ref[0]+(0.609757645513)*x_ref[1]**o+(0.915764017541)*x_ref[1]
-      else:
-        arg[0,0]=(-0.256088293513)*x[0]**o+(0.980138068946)*x[0]+(0.375373123738)*x[1]**o+(0.118268751779)*x[1]+(-0.848800006681)*x[2]**o+(0.861808952535)*x[2]
-        arg[0,1]=(-0.0658163161725)*x[0]**o+(-0.21582867866)*x[0]+(0.99787757796)*x[1]**o+(0.0175357022646)*x[1]+(-0.305438242469)*x[2]**o+(0.114385992332)*x[2]
-        arg[0,2]=(-0.296948302927)*x[0]**o+(0.146852900649)*x[0]+(0.386910961544)*x[1]**o+(0.353651457394)*x[1]+(0.420964895802)*x[2]**o+(0.71145244268)*x[2]
-        arg[0,3]=(0.61102494979)*x[0]**o+(-0.316055853885)*x[0]+(-0.117200390837)*x[1]**o+(-0.808630441349)*x[1]+(0.0914828526025)*x[2]**o+(0.305837943839)*x[2]
-        arg[0,4]=(-0.22863340097)*x[0]**o+(0.398083421617)*x[0]+(-0.39971917463)*x[1]**o+(-0.0307312416932)*x[1]+(0.510443863383)*x[2]**o+(-0.129495846726)*x[2]
-        arg[1,0]=(0.423968874298)*x[0]**o+(0.371480448801)*x[0]+(-0.934565508125)*x[1]**o+(0.890972208341)*x[1]+(-0.169067233411)*x[2]**o+(-0.757264272484)*x[2]
-        arg[1,1]=(0.999152573666)*x[0]**o+(-0.659676649566)*x[0]+(0.993153643567)*x[1]**o+(0.350141892848)*x[1]+(-0.493784056536)*x[2]**o+(-0.966494205893)*x[2]
-        arg[1,2]=(-0.141337889298)*x[0]**o+(0.689935513838)*x[0]+(0.335444607712)*x[1]**o+(-0.733351283662)*x[1]+(0.323775887172)*x[2]**o+(0.314099156544)*x[2]
-        arg[1,3]=(-0.157132412118)*x[0]**o+(0.602468153313)*x[0]+(-0.618134886591)*x[1]**o+(-0.404425578444)*x[1]+(-0.5069585924)*x[2]**o+(0.616829810596)*x[2]
-        arg[1,4]=(-0.107902610028)*x[0]**o+(0.664787826515)*x[0]+(-0.19940280262)*x[1]**o+(0.461794954077)*x[1]+(-0.0516671817578)*x[2]**o+(0.426165289622)*x[2]
-        arg[2,0]=(-0.568061237616)*x[0]**o+(-0.744340542576)*x[0]+(-0.0125924903194)*x[1]**o+(0.710153866172)*x[1]+(0.979871553596)*x[2]**o+(0.945862455036)*x[2]
-        arg[2,1]=(0.201599120538)*x[0]**o+(-0.11057289344)*x[0]+(0.522031147141)*x[1]**o+(0.194694594101)*x[1]+(-0.771997994079)*x[2]**o+(-0.513574957413)*x[2]
-        arg[2,2]=(0.401979025382)*x[0]**o+(-0.743641669014)*x[0]+(-0.796071557874)*x[1]**o+(-0.352651095657)*x[1]+(-0.564117536877)*x[2]**o+(0.952729715875)*x[2]
-        arg[2,3]=(-0.526162893019)*x[0]**o+(0.691019471759)*x[0]+(-0.68646084088)*x[1]**o+(0.839630438544)*x[1]+(-0.491997512287)*x[2]**o+(-0.405069600537)*x[2]
-        arg[2,4]=(0.117664099703)*x[0]**o+(-0.807496546596)*x[0]+(0.607810703702)*x[1]**o+(-0.696118154009)*x[1]+(-0.156011683803)*x[2]**o+(-0.26100420077)*x[2]
-        arg[3,0]=(0.280066174527)*x[0]**o+(-0.225940135983)*x[0]+(-0.338716163489)*x[1]**o+(0.628405669096)*x[1]+(-0.890543405425)*x[2]**o+(-0.142082524497)*x[2]
-        arg[3,1]=(-0.659241351226)*x[0]**o+(0.275483386126)*x[0]+(-0.318352239058)*x[1]**o+(0.168536648793)*x[1]+(0.539555610218)*x[2]**o+(-0.95280560435)*x[2]
-        arg[3,2]=(0.673861565841)*x[0]**o+(-0.0303873544723)*x[0]+(-0.638241094445)*x[1]**o+(0.664488908579)*x[1]+(-0.789484082135)*x[2]**o+(-0.982437408359)*x[2]
-        arg[3,3]=(-0.902346309293)*x[0]**o+(0.818106160371)*x[0]+(-0.410074078135)*x[1]**o+(0.977554592344)*x[1]+(-0.00195907247124)*x[2]**o+(0.94762151647)*x[2]
-        arg[3,4]=(0.27272813538)*x[0]**o+(0.0563423990113)*x[0]+(0.254612551508)*x[1]**o+(-0.901948547799)*x[1]+(0.263613075865)*x[2]**o+(0.879691314116)*x[2]
-        ref[0,0]=(-0.256088293513)*x_ref[0]**o+(0.980138068946)*x_ref[0]+(0.375373123738)*x_ref[1]**o+(0.118268751779)*x_ref[1]+(-0.848800006681)*x_ref[2]**o+(0.861808952535)*x_ref[2]
-        ref[0,1]=(-0.0658163161725)*x_ref[0]**o+(-0.21582867866)*x_ref[0]+(0.99787757796)*x_ref[1]**o+(0.0175357022646)*x_ref[1]+(-0.305438242469)*x_ref[2]**o+(0.114385992332)*x_ref[2]
-        ref[0,2]=(-0.296948302927)*x_ref[0]**o+(0.146852900649)*x_ref[0]+(0.386910961544)*x_ref[1]**o+(0.353651457394)*x_ref[1]+(0.420964895802)*x_ref[2]**o+(0.71145244268)*x_ref[2]
-        ref[0,3]=(0.61102494979)*x_ref[0]**o+(-0.316055853885)*x_ref[0]+(-0.117200390837)*x_ref[1]**o+(-0.808630441349)*x_ref[1]+(0.0914828526025)*x_ref[2]**o+(0.305837943839)*x_ref[2]
-        ref[0,4]=(-0.22863340097)*x_ref[0]**o+(0.398083421617)*x_ref[0]+(-0.39971917463)*x_ref[1]**o+(-0.0307312416932)*x_ref[1]+(0.510443863383)*x_ref[2]**o+(-0.129495846726)*x_ref[2]
-        ref[1,0]=(0.423968874298)*x_ref[0]**o+(0.371480448801)*x_ref[0]+(-0.934565508125)*x_ref[1]**o+(0.890972208341)*x_ref[1]+(-0.169067233411)*x_ref[2]**o+(-0.757264272484)*x_ref[2]
-        ref[1,1]=(0.999152573666)*x_ref[0]**o+(-0.659676649566)*x_ref[0]+(0.993153643567)*x_ref[1]**o+(0.350141892848)*x_ref[1]+(-0.493784056536)*x_ref[2]**o+(-0.966494205893)*x_ref[2]
-        ref[1,2]=(-0.141337889298)*x_ref[0]**o+(0.689935513838)*x_ref[0]+(0.335444607712)*x_ref[1]**o+(-0.733351283662)*x_ref[1]+(0.323775887172)*x_ref[2]**o+(0.314099156544)*x_ref[2]
-        ref[1,3]=(-0.157132412118)*x_ref[0]**o+(0.602468153313)*x_ref[0]+(-0.618134886591)*x_ref[1]**o+(-0.404425578444)*x_ref[1]+(-0.5069585924)*x_ref[2]**o+(0.616829810596)*x_ref[2]
-        ref[1,4]=(-0.107902610028)*x_ref[0]**o+(0.664787826515)*x_ref[0]+(-0.19940280262)*x_ref[1]**o+(0.461794954077)*x_ref[1]+(-0.0516671817578)*x_ref[2]**o+(0.426165289622)*x_ref[2]
-        ref[2,0]=(-0.568061237616)*x_ref[0]**o+(-0.744340542576)*x_ref[0]+(-0.0125924903194)*x_ref[1]**o+(0.710153866172)*x_ref[1]+(0.979871553596)*x_ref[2]**o+(0.945862455036)*x_ref[2]
-        ref[2,1]=(0.201599120538)*x_ref[0]**o+(-0.11057289344)*x_ref[0]+(0.522031147141)*x_ref[1]**o+(0.194694594101)*x_ref[1]+(-0.771997994079)*x_ref[2]**o+(-0.513574957413)*x_ref[2]
-        ref[2,2]=(0.401979025382)*x_ref[0]**o+(-0.743641669014)*x_ref[0]+(-0.796071557874)*x_ref[1]**o+(-0.352651095657)*x_ref[1]+(-0.564117536877)*x_ref[2]**o+(0.952729715875)*x_ref[2]
-        ref[2,3]=(-0.526162893019)*x_ref[0]**o+(0.691019471759)*x_ref[0]+(-0.68646084088)*x_ref[1]**o+(0.839630438544)*x_ref[1]+(-0.491997512287)*x_ref[2]**o+(-0.405069600537)*x_ref[2]
-        ref[2,4]=(0.117664099703)*x_ref[0]**o+(-0.807496546596)*x_ref[0]+(0.607810703702)*x_ref[1]**o+(-0.696118154009)*x_ref[1]+(-0.156011683803)*x_ref[2]**o+(-0.26100420077)*x_ref[2]
-        ref[3,0]=(0.280066174527)*x_ref[0]**o+(-0.225940135983)*x_ref[0]+(-0.338716163489)*x_ref[1]**o+(0.628405669096)*x_ref[1]+(-0.890543405425)*x_ref[2]**o+(-0.142082524497)*x_ref[2]
-        ref[3,1]=(-0.659241351226)*x_ref[0]**o+(0.275483386126)*x_ref[0]+(-0.318352239058)*x_ref[1]**o+(0.168536648793)*x_ref[1]+(0.539555610218)*x_ref[2]**o+(-0.95280560435)*x_ref[2]
-        ref[3,2]=(0.673861565841)*x_ref[0]**o+(-0.0303873544723)*x_ref[0]+(-0.638241094445)*x_ref[1]**o+(0.664488908579)*x_ref[1]+(-0.789484082135)*x_ref[2]**o+(-0.982437408359)*x_ref[2]
-        ref[3,3]=(-0.902346309293)*x_ref[0]**o+(0.818106160371)*x_ref[0]+(-0.410074078135)*x_ref[1]**o+(0.977554592344)*x_ref[1]+(-0.00195907247124)*x_ref[2]**o+(0.94762151647)*x_ref[2]
-        ref[3,4]=(0.27272813538)*x_ref[0]**o+(0.0563423990113)*x_ref[0]+(0.254612551508)*x_ref[1]**o+(-0.901948547799)*x_ref[1]+(0.263613075865)*x_ref[2]**o+(0.879691314116)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnBoundary onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.023497804886)*x[0]**o+(0.934780781287)*x[0]+(0.488935915319)*x[1]**o+(-0.843152487959)*x[1]
-        arg[0,0,1]=(0.074870516034)*x[0]**o+(-0.515115482624)*x[0]+(-0.582499912837)*x[1]**o+(-0.148911376041)*x[1]
-        arg[0,1,0]=(0.0364775990427)*x[0]**o+(-0.258379408121)*x[0]+(0.109704222415)*x[1]**o+(-0.0149203380717)*x[1]
-        arg[0,1,1]=(0.749804547117)*x[0]**o+(-0.65162531688)*x[0]+(-0.529952602569)*x[1]**o+(0.901735743956)*x[1]
-        arg[1,0,0]=(0.74941277085)*x[0]**o+(-0.878903916612)*x[0]+(0.866605680273)*x[1]**o+(0.182572622995)*x[1]
-        arg[1,0,1]=(-0.787476915117)*x[0]**o+(0.945314823283)*x[0]+(0.165599597226)*x[1]**o+(0.733712603726)*x[1]
-        arg[1,1,0]=(0.696240085313)*x[0]**o+(0.775501454572)*x[0]+(0.225131553571)*x[1]**o+(-0.75288780057)*x[1]
-        arg[1,1,1]=(-0.352416785284)*x[0]**o+(-0.681447081047)*x[0]+(0.164273429957)*x[1]**o+(-0.0977235074729)*x[1]
-        arg[2,0,0]=(-0.484651384894)*x[0]**o+(0.162048679786)*x[0]+(0.433731200543)*x[1]**o+(-0.2255104779)*x[1]
-        arg[2,0,1]=(0.230113349848)*x[0]**o+(0.674218493869)*x[0]+(0.124852942645)*x[1]**o+(0.361278270173)*x[1]
-        arg[2,1,0]=(-0.604246197352)*x[0]**o+(0.26763755318)*x[0]+(-0.821482774631)*x[1]**o+(-0.821813801109)*x[1]
-        arg[2,1,1]=(0.71669276429)*x[0]**o+(0.861782230871)*x[0]+(-0.837503788825)*x[1]**o+(0.0437253153979)*x[1]
-        arg[3,0,0]=(-0.0941343724431)*x[0]**o+(0.376175369776)*x[0]+(-0.455752787585)*x[1]**o+(0.777480094583)*x[1]
-        arg[3,0,1]=(-0.730897141543)*x[0]**o+(0.750046665085)*x[0]+(0.855742434657)*x[1]**o+(0.941826664412)*x[1]
-        arg[3,1,0]=(-0.788757907886)*x[0]**o+(-0.0255067018415)*x[0]+(-0.875292088318)*x[1]**o+(0.401677848256)*x[1]
-        arg[3,1,1]=(-0.980570910972)*x[0]**o+(0.936108649845)*x[0]+(-0.0463362409126)*x[1]**o+(0.630408734656)*x[1]
-        arg[4,0,0]=(-0.72642075391)*x[0]**o+(0.283788406364)*x[0]+(-0.119645741265)*x[1]**o+(0.66948892422)*x[1]
-        arg[4,0,1]=(0.178235706017)*x[0]**o+(0.693466107843)*x[0]+(-0.585602683437)*x[1]**o+(-0.493386713436)*x[1]
-        arg[4,1,0]=(0.348039277129)*x[0]**o+(-0.806776084421)*x[0]+(-0.73591780841)*x[1]**o+(-0.310246367505)*x[1]
-        arg[4,1,1]=(0.993294877418)*x[0]**o+(-0.683114302069)*x[0]+(0.0679022755308)*x[1]**o+(0.341981988936)*x[1]
-        arg[5,0,0]=(-0.807380701959)*x[0]**o+(-0.78936779476)*x[0]+(0.142089012614)*x[1]**o+(-0.129335524031)*x[1]
-        arg[5,0,1]=(-0.855714388031)*x[0]**o+(0.00825196217877)*x[0]+(0.310039590415)*x[1]**o+(-0.242861862397)*x[1]
-        arg[5,1,0]=(-0.0908183346277)*x[0]**o+(-0.941876543235)*x[0]+(0.981459557493)*x[1]**o+(0.559563798858)*x[1]
-        arg[5,1,1]=(-0.852223567371)*x[0]**o+(-0.272541886199)*x[0]+(-0.873908247032)*x[1]**o+(-0.387571769068)*x[1]
-        ref[0,0,0]=(-0.023497804886)*x_ref[0]**o+(0.934780781287)*x_ref[0]+(0.488935915319)*x_ref[1]**o+(-0.843152487959)*x_ref[1]
-        ref[0,0,1]=(0.074870516034)*x_ref[0]**o+(-0.515115482624)*x_ref[0]+(-0.582499912837)*x_ref[1]**o+(-0.148911376041)*x_ref[1]
-        ref[0,1,0]=(0.0364775990427)*x_ref[0]**o+(-0.258379408121)*x_ref[0]+(0.109704222415)*x_ref[1]**o+(-0.0149203380717)*x_ref[1]
-        ref[0,1,1]=(0.749804547117)*x_ref[0]**o+(-0.65162531688)*x_ref[0]+(-0.529952602569)*x_ref[1]**o+(0.901735743956)*x_ref[1]
-        ref[1,0,0]=(0.74941277085)*x_ref[0]**o+(-0.878903916612)*x_ref[0]+(0.866605680273)*x_ref[1]**o+(0.182572622995)*x_ref[1]
-        ref[1,0,1]=(-0.787476915117)*x_ref[0]**o+(0.945314823283)*x_ref[0]+(0.165599597226)*x_ref[1]**o+(0.733712603726)*x_ref[1]
-        ref[1,1,0]=(0.696240085313)*x_ref[0]**o+(0.775501454572)*x_ref[0]+(0.225131553571)*x_ref[1]**o+(-0.75288780057)*x_ref[1]
-        ref[1,1,1]=(-0.352416785284)*x_ref[0]**o+(-0.681447081047)*x_ref[0]+(0.164273429957)*x_ref[1]**o+(-0.0977235074729)*x_ref[1]
-        ref[2,0,0]=(-0.484651384894)*x_ref[0]**o+(0.162048679786)*x_ref[0]+(0.433731200543)*x_ref[1]**o+(-0.2255104779)*x_ref[1]
-        ref[2,0,1]=(0.230113349848)*x_ref[0]**o+(0.674218493869)*x_ref[0]+(0.124852942645)*x_ref[1]**o+(0.361278270173)*x_ref[1]
-        ref[2,1,0]=(-0.604246197352)*x_ref[0]**o+(0.26763755318)*x_ref[0]+(-0.821482774631)*x_ref[1]**o+(-0.821813801109)*x_ref[1]
-        ref[2,1,1]=(0.71669276429)*x_ref[0]**o+(0.861782230871)*x_ref[0]+(-0.837503788825)*x_ref[1]**o+(0.0437253153979)*x_ref[1]
-        ref[3,0,0]=(-0.0941343724431)*x_ref[0]**o+(0.376175369776)*x_ref[0]+(-0.455752787585)*x_ref[1]**o+(0.777480094583)*x_ref[1]
-        ref[3,0,1]=(-0.730897141543)*x_ref[0]**o+(0.750046665085)*x_ref[0]+(0.855742434657)*x_ref[1]**o+(0.941826664412)*x_ref[1]
-        ref[3,1,0]=(-0.788757907886)*x_ref[0]**o+(-0.0255067018415)*x_ref[0]+(-0.875292088318)*x_ref[1]**o+(0.401677848256)*x_ref[1]
-        ref[3,1,1]=(-0.980570910972)*x_ref[0]**o+(0.936108649845)*x_ref[0]+(-0.0463362409126)*x_ref[1]**o+(0.630408734656)*x_ref[1]
-        ref[4,0,0]=(-0.72642075391)*x_ref[0]**o+(0.283788406364)*x_ref[0]+(-0.119645741265)*x_ref[1]**o+(0.66948892422)*x_ref[1]
-        ref[4,0,1]=(0.178235706017)*x_ref[0]**o+(0.693466107843)*x_ref[0]+(-0.585602683437)*x_ref[1]**o+(-0.493386713436)*x_ref[1]
-        ref[4,1,0]=(0.348039277129)*x_ref[0]**o+(-0.806776084421)*x_ref[0]+(-0.73591780841)*x_ref[1]**o+(-0.310246367505)*x_ref[1]
-        ref[4,1,1]=(0.993294877418)*x_ref[0]**o+(-0.683114302069)*x_ref[0]+(0.0679022755308)*x_ref[1]**o+(0.341981988936)*x_ref[1]
-        ref[5,0,0]=(-0.807380701959)*x_ref[0]**o+(-0.78936779476)*x_ref[0]+(0.142089012614)*x_ref[1]**o+(-0.129335524031)*x_ref[1]
-        ref[5,0,1]=(-0.855714388031)*x_ref[0]**o+(0.00825196217877)*x_ref[0]+(0.310039590415)*x_ref[1]**o+(-0.242861862397)*x_ref[1]
-        ref[5,1,0]=(-0.0908183346277)*x_ref[0]**o+(-0.941876543235)*x_ref[0]+(0.981459557493)*x_ref[1]**o+(0.559563798858)*x_ref[1]
-        ref[5,1,1]=(-0.852223567371)*x_ref[0]**o+(-0.272541886199)*x_ref[0]+(-0.873908247032)*x_ref[1]**o+(-0.387571769068)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.418981395334)*x[0]**o+(-0.720305875042)*x[0]+(0.876880439526)*x[1]**o+(-0.17785803746)*x[1]+(0.779797986429)*x[2]**o+(0.363827072746)*x[2]
-        arg[0,0,1]=(0.159567966427)*x[0]**o+(-0.614151008569)*x[0]+(0.249982224851)*x[1]**o+(-0.119598774468)*x[1]+(-0.66603578755)*x[2]**o+(0.202190479552)*x[2]
-        arg[0,1,0]=(0.337868020939)*x[0]**o+(-0.0828148711399)*x[0]+(-0.0631659329293)*x[1]**o+(-0.725100695213)*x[1]+(0.852068398846)*x[2]**o+(-0.951116521211)*x[2]
-        arg[0,1,1]=(0.710866728186)*x[0]**o+(-0.517133891599)*x[0]+(0.320028321875)*x[1]**o+(0.0331233805016)*x[1]+(-0.0945382588101)*x[2]**o+(-0.795725457058)*x[2]
-        arg[1,0,0]=(0.261503329866)*x[0]**o+(0.697062723662)*x[0]+(0.926550326146)*x[1]**o+(-0.318704885103)*x[1]+(-0.76904956799)*x[2]**o+(0.0750521033639)*x[2]
-        arg[1,0,1]=(-0.594460213676)*x[0]**o+(0.356692399969)*x[0]+(-0.611558953982)*x[1]**o+(0.289469152887)*x[1]+(-0.73222413782)*x[2]**o+(-0.576883793051)*x[2]
-        arg[1,1,0]=(-0.399324648161)*x[0]**o+(0.975428000926)*x[0]+(-0.889762441468)*x[1]**o+(-0.137573068244)*x[1]+(0.252276361744)*x[2]**o+(-0.554435968553)*x[2]
-        arg[1,1,1]=(0.677933864695)*x[0]**o+(-0.19825134391)*x[0]+(0.556783296976)*x[1]**o+(0.0349255641106)*x[1]+(-0.387378575139)*x[2]**o+(0.889628545207)*x[2]
-        arg[2,0,0]=(-0.839356850436)*x[0]**o+(0.0186947034157)*x[0]+(-0.264793716814)*x[1]**o+(-0.767468006197)*x[1]+(0.91661695419)*x[2]**o+(-0.374036622497)*x[2]
-        arg[2,0,1]=(-0.030357536408)*x[0]**o+(0.57424762933)*x[0]+(-0.590115256932)*x[1]**o+(-0.176169776757)*x[1]+(-0.502845936823)*x[2]**o+(0.0399243413515)*x[2]
-        arg[2,1,0]=(0.257324735469)*x[0]**o+(-0.686083724325)*x[0]+(-0.166609564696)*x[1]**o+(-0.132181292726)*x[1]+(0.10419146703)*x[2]**o+(-0.827571838114)*x[2]
-        arg[2,1,1]=(0.339465982319)*x[0]**o+(0.766586466841)*x[0]+(0.277538823819)*x[1]**o+(0.222607512697)*x[1]+(-0.909105282607)*x[2]**o+(0.463729842225)*x[2]
-        arg[3,0,0]=(-0.00132043337846)*x[0]**o+(0.670451981959)*x[0]+(-0.0122245380346)*x[1]**o+(-0.922535904926)*x[1]+(0.49486742)*x[2]**o+(0.0785274524546)*x[2]
-        arg[3,0,1]=(0.0360876610851)*x[0]**o+(0.69319604661)*x[0]+(0.980826095079)*x[1]**o+(0.167689443923)*x[1]+(0.561634492527)*x[2]**o+(0.996948790413)*x[2]
-        arg[3,1,0]=(-0.238705628819)*x[0]**o+(-0.915859436874)*x[0]+(0.942122040692)*x[1]**o+(0.971025407162)*x[1]+(-0.965945363654)*x[2]**o+(0.136537412741)*x[2]
-        arg[3,1,1]=(-0.672314439537)*x[0]**o+(0.792647645097)*x[0]+(-0.432226224113)*x[1]**o+(0.424246857841)*x[1]+(-0.639842531517)*x[2]**o+(0.0570057507731)*x[2]
-        arg[4,0,0]=(0.450831267081)*x[0]**o+(0.75992870254)*x[0]+(0.768779936214)*x[1]**o+(-0.0135947286596)*x[1]+(0.126345191973)*x[2]**o+(-0.619763308655)*x[2]
-        arg[4,0,1]=(-0.325005948888)*x[0]**o+(-0.0655421631802)*x[0]+(0.607182269636)*x[1]**o+(-0.631044141835)*x[1]+(-0.356580309429)*x[2]**o+(-0.593198006905)*x[2]
-        arg[4,1,0]=(0.304932527518)*x[0]**o+(-0.763995484499)*x[0]+(0.884855995183)*x[1]**o+(-0.42180322102)*x[1]+(0.605742059302)*x[2]**o+(0.448553789891)*x[2]
-        arg[4,1,1]=(-0.787145437063)*x[0]**o+(-0.465220934558)*x[0]+(-0.370336760606)*x[1]**o+(-0.854850692759)*x[1]+(0.482896516171)*x[2]**o+(-0.551567519291)*x[2]
-        arg[5,0,0]=(-0.537738873639)*x[0]**o+(-0.213268842545)*x[0]+(0.492208051415)*x[1]**o+(-0.609304634017)*x[1]+(-0.487753207718)*x[2]**o+(-0.70650655894)*x[2]
-        arg[5,0,1]=(0.600359837292)*x[0]**o+(-0.604421599924)*x[0]+(-0.051356466466)*x[1]**o+(-0.168592544661)*x[1]+(0.789340570036)*x[2]**o+(0.910249026599)*x[2]
-        arg[5,1,0]=(0.264506197816)*x[0]**o+(-0.711775430363)*x[0]+(0.384666624979)*x[1]**o+(0.0926714847986)*x[1]+(-0.551232557648)*x[2]**o+(0.758927448717)*x[2]
-        arg[5,1,1]=(0.894998835449)*x[0]**o+(-0.466338210072)*x[0]+(-0.522475632898)*x[1]**o+(0.766949173671)*x[1]+(0.915063619607)*x[2]**o+(-0.270696846692)*x[2]
-        ref[0,0,0]=(0.418981395334)*x_ref[0]**o+(-0.720305875042)*x_ref[0]+(0.876880439526)*x_ref[1]**o+(-0.17785803746)*x_ref[1]+(0.779797986429)*x_ref[2]**o+(0.363827072746)*x_ref[2]
-        ref[0,0,1]=(0.159567966427)*x_ref[0]**o+(-0.614151008569)*x_ref[0]+(0.249982224851)*x_ref[1]**o+(-0.119598774468)*x_ref[1]+(-0.66603578755)*x_ref[2]**o+(0.202190479552)*x_ref[2]
-        ref[0,1,0]=(0.337868020939)*x_ref[0]**o+(-0.0828148711399)*x_ref[0]+(-0.0631659329293)*x_ref[1]**o+(-0.725100695213)*x_ref[1]+(0.852068398846)*x_ref[2]**o+(-0.951116521211)*x_ref[2]
-        ref[0,1,1]=(0.710866728186)*x_ref[0]**o+(-0.517133891599)*x_ref[0]+(0.320028321875)*x_ref[1]**o+(0.0331233805016)*x_ref[1]+(-0.0945382588101)*x_ref[2]**o+(-0.795725457058)*x_ref[2]
-        ref[1,0,0]=(0.261503329866)*x_ref[0]**o+(0.697062723662)*x_ref[0]+(0.926550326146)*x_ref[1]**o+(-0.318704885103)*x_ref[1]+(-0.76904956799)*x_ref[2]**o+(0.0750521033639)*x_ref[2]
-        ref[1,0,1]=(-0.594460213676)*x_ref[0]**o+(0.356692399969)*x_ref[0]+(-0.611558953982)*x_ref[1]**o+(0.289469152887)*x_ref[1]+(-0.73222413782)*x_ref[2]**o+(-0.576883793051)*x_ref[2]
-        ref[1,1,0]=(-0.399324648161)*x_ref[0]**o+(0.975428000926)*x_ref[0]+(-0.889762441468)*x_ref[1]**o+(-0.137573068244)*x_ref[1]+(0.252276361744)*x_ref[2]**o+(-0.554435968553)*x_ref[2]
-        ref[1,1,1]=(0.677933864695)*x_ref[0]**o+(-0.19825134391)*x_ref[0]+(0.556783296976)*x_ref[1]**o+(0.0349255641106)*x_ref[1]+(-0.387378575139)*x_ref[2]**o+(0.889628545207)*x_ref[2]
-        ref[2,0,0]=(-0.839356850436)*x_ref[0]**o+(0.0186947034157)*x_ref[0]+(-0.264793716814)*x_ref[1]**o+(-0.767468006197)*x_ref[1]+(0.91661695419)*x_ref[2]**o+(-0.374036622497)*x_ref[2]
-        ref[2,0,1]=(-0.030357536408)*x_ref[0]**o+(0.57424762933)*x_ref[0]+(-0.590115256932)*x_ref[1]**o+(-0.176169776757)*x_ref[1]+(-0.502845936823)*x_ref[2]**o+(0.0399243413515)*x_ref[2]
-        ref[2,1,0]=(0.257324735469)*x_ref[0]**o+(-0.686083724325)*x_ref[0]+(-0.166609564696)*x_ref[1]**o+(-0.132181292726)*x_ref[1]+(0.10419146703)*x_ref[2]**o+(-0.827571838114)*x_ref[2]
-        ref[2,1,1]=(0.339465982319)*x_ref[0]**o+(0.766586466841)*x_ref[0]+(0.277538823819)*x_ref[1]**o+(0.222607512697)*x_ref[1]+(-0.909105282607)*x_ref[2]**o+(0.463729842225)*x_ref[2]
-        ref[3,0,0]=(-0.00132043337846)*x_ref[0]**o+(0.670451981959)*x_ref[0]+(-0.0122245380346)*x_ref[1]**o+(-0.922535904926)*x_ref[1]+(0.49486742)*x_ref[2]**o+(0.0785274524546)*x_ref[2]
-        ref[3,0,1]=(0.0360876610851)*x_ref[0]**o+(0.69319604661)*x_ref[0]+(0.980826095079)*x_ref[1]**o+(0.167689443923)*x_ref[1]+(0.561634492527)*x_ref[2]**o+(0.996948790413)*x_ref[2]
-        ref[3,1,0]=(-0.238705628819)*x_ref[0]**o+(-0.915859436874)*x_ref[0]+(0.942122040692)*x_ref[1]**o+(0.971025407162)*x_ref[1]+(-0.965945363654)*x_ref[2]**o+(0.136537412741)*x_ref[2]
-        ref[3,1,1]=(-0.672314439537)*x_ref[0]**o+(0.792647645097)*x_ref[0]+(-0.432226224113)*x_ref[1]**o+(0.424246857841)*x_ref[1]+(-0.639842531517)*x_ref[2]**o+(0.0570057507731)*x_ref[2]
-        ref[4,0,0]=(0.450831267081)*x_ref[0]**o+(0.75992870254)*x_ref[0]+(0.768779936214)*x_ref[1]**o+(-0.0135947286596)*x_ref[1]+(0.126345191973)*x_ref[2]**o+(-0.619763308655)*x_ref[2]
-        ref[4,0,1]=(-0.325005948888)*x_ref[0]**o+(-0.0655421631802)*x_ref[0]+(0.607182269636)*x_ref[1]**o+(-0.631044141835)*x_ref[1]+(-0.356580309429)*x_ref[2]**o+(-0.593198006905)*x_ref[2]
-        ref[4,1,0]=(0.304932527518)*x_ref[0]**o+(-0.763995484499)*x_ref[0]+(0.884855995183)*x_ref[1]**o+(-0.42180322102)*x_ref[1]+(0.605742059302)*x_ref[2]**o+(0.448553789891)*x_ref[2]
-        ref[4,1,1]=(-0.787145437063)*x_ref[0]**o+(-0.465220934558)*x_ref[0]+(-0.370336760606)*x_ref[1]**o+(-0.854850692759)*x_ref[1]+(0.482896516171)*x_ref[2]**o+(-0.551567519291)*x_ref[2]
-        ref[5,0,0]=(-0.537738873639)*x_ref[0]**o+(-0.213268842545)*x_ref[0]+(0.492208051415)*x_ref[1]**o+(-0.609304634017)*x_ref[1]+(-0.487753207718)*x_ref[2]**o+(-0.70650655894)*x_ref[2]
-        ref[5,0,1]=(0.600359837292)*x_ref[0]**o+(-0.604421599924)*x_ref[0]+(-0.051356466466)*x_ref[1]**o+(-0.168592544661)*x_ref[1]+(0.789340570036)*x_ref[2]**o+(0.910249026599)*x_ref[2]
-        ref[5,1,0]=(0.264506197816)*x_ref[0]**o+(-0.711775430363)*x_ref[0]+(0.384666624979)*x_ref[1]**o+(0.0926714847986)*x_ref[1]+(-0.551232557648)*x_ref[2]**o+(0.758927448717)*x_ref[2]
-        ref[5,1,1]=(0.894998835449)*x_ref[0]**o+(-0.466338210072)*x_ref[0]+(-0.522475632898)*x_ref[1]**o+(0.766949173671)*x_ref[1]+(0.915063619607)*x_ref[2]**o+(-0.270696846692)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnBoundary
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnBoundary onto ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnBoundary(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.240887319278)*x[0]**o+(-0.192166587545)*x[0]+(0.0176974287409)*x[1]**o+(0.100761748824)*x[1]
-        arg[0,0,0,1]=(-0.549649845775)*x[0]**o+(-0.293969245646)*x[0]+(-0.605885325133)*x[1]**o+(0.799558451173)*x[1]
-        arg[0,0,1,0]=(-0.899658769582)*x[0]**o+(0.484524193987)*x[0]+(0.437485870351)*x[1]**o+(-0.220549034927)*x[1]
-        arg[0,0,1,1]=(-0.146539961793)*x[0]**o+(-0.278343486929)*x[0]+(0.0913912456082)*x[1]**o+(-0.751028975123)*x[1]
-        arg[0,0,2,0]=(0.806344701194)*x[0]**o+(0.0537872824561)*x[0]+(-0.70407828379)*x[1]**o+(-0.922963486601)*x[1]
-        arg[0,0,2,1]=(0.307202902495)*x[0]**o+(0.301603506731)*x[0]+(0.232983743616)*x[1]**o+(-0.744267542759)*x[1]
-        arg[0,1,0,0]=(-0.550616060824)*x[0]**o+(-0.661367750254)*x[0]+(-0.695905895864)*x[1]**o+(-0.788045922398)*x[1]
-        arg[0,1,0,1]=(-0.934169134035)*x[0]**o+(-0.843861105521)*x[0]+(-0.237877254439)*x[1]**o+(-0.364956821348)*x[1]
-        arg[0,1,1,0]=(0.0950675750026)*x[0]**o+(-0.815510640594)*x[0]+(0.72526035968)*x[1]**o+(0.898675190106)*x[1]
-        arg[0,1,1,1]=(0.715609066776)*x[0]**o+(0.371314845206)*x[0]+(0.326878867244)*x[1]**o+(-0.468798950199)*x[1]
-        arg[0,1,2,0]=(0.392175939547)*x[0]**o+(0.105332682674)*x[0]+(0.997967455477)*x[1]**o+(0.0322491822496)*x[1]
-        arg[0,1,2,1]=(-0.804498399187)*x[0]**o+(0.819653744739)*x[0]+(0.609610573703)*x[1]**o+(-0.623299047794)*x[1]
-        arg[0,2,0,0]=(0.993877917386)*x[0]**o+(0.815952897899)*x[0]+(-0.258432174486)*x[1]**o+(0.209324387308)*x[1]
-        arg[0,2,0,1]=(0.395946889364)*x[0]**o+(-0.859500539908)*x[0]+(-0.68495734785)*x[1]**o+(0.791813946302)*x[1]
-        arg[0,2,1,0]=(0.154347661108)*x[0]**o+(0.0873140744322)*x[0]+(-0.423935109956)*x[1]**o+(-0.754297239226)*x[1]
-        arg[0,2,1,1]=(-0.623998419484)*x[0]**o+(0.487300130941)*x[0]+(-0.323613219784)*x[1]**o+(0.744877983729)*x[1]
-        arg[0,2,2,0]=(0.515686374371)*x[0]**o+(0.512572153346)*x[0]+(-0.641245783272)*x[1]**o+(-0.390660158759)*x[1]
-        arg[0,2,2,1]=(0.24398238139)*x[0]**o+(-0.172020271678)*x[0]+(0.980197812701)*x[1]**o+(0.336941934503)*x[1]
-        arg[0,3,0,0]=(0.0154584447615)*x[0]**o+(-0.547048191238)*x[0]+(-0.555319223005)*x[1]**o+(0.0972794598106)*x[1]
-        arg[0,3,0,1]=(0.44744389335)*x[0]**o+(0.475046337874)*x[0]+(0.876228982066)*x[1]**o+(-0.0636405241175)*x[1]
-        arg[0,3,1,0]=(0.392948465298)*x[0]**o+(-0.341342654182)*x[0]+(0.747185683968)*x[1]**o+(-0.99981172166)*x[1]
-        arg[0,3,1,1]=(-0.172355321621)*x[0]**o+(-0.531391484795)*x[0]+(0.451654274019)*x[1]**o+(0.0795298667915)*x[1]
-        arg[0,3,2,0]=(0.0841642474674)*x[0]**o+(0.308494435164)*x[0]+(0.53181918181)*x[1]**o+(0.480258067959)*x[1]
-        arg[0,3,2,1]=(-0.222903054864)*x[0]**o+(-0.0330655869754)*x[0]+(0.227482525015)*x[1]**o+(0.536136212347)*x[1]
-        arg[0,4,0,0]=(0.574798381284)*x[0]**o+(0.181354466484)*x[0]+(0.103049514171)*x[1]**o+(0.156282818835)*x[1]
-        arg[0,4,0,1]=(0.478314255289)*x[0]**o+(0.224797222592)*x[0]+(0.307668606272)*x[1]**o+(-0.785262182937)*x[1]
-        arg[0,4,1,0]=(0.519356961182)*x[0]**o+(0.646200458344)*x[0]+(0.0522618783181)*x[1]**o+(0.702335307324)*x[1]
-        arg[0,4,1,1]=(-0.168756029541)*x[0]**o+(-0.00618364750666)*x[0]+(0.472704616213)*x[1]**o+(0.974257451871)*x[1]
-        arg[0,4,2,0]=(-0.279196869573)*x[0]**o+(-0.333083174091)*x[0]+(-0.980089574428)*x[1]**o+(0.405273709405)*x[1]
-        arg[0,4,2,1]=(-0.199431380673)*x[0]**o+(0.823294899866)*x[0]+(-0.174125117685)*x[1]**o+(-0.730500493887)*x[1]
-        arg[1,0,0,0]=(-0.577281489635)*x[0]**o+(0.231906139898)*x[0]+(0.537128708963)*x[1]**o+(0.363444540898)*x[1]
-        arg[1,0,0,1]=(0.204108541882)*x[0]**o+(-0.217661714888)*x[0]+(0.963384293759)*x[1]**o+(-0.0817519801351)*x[1]
-        arg[1,0,1,0]=(0.540681325439)*x[0]**o+(-0.496036960808)*x[0]+(0.421037689661)*x[1]**o+(0.19399086996)*x[1]
-        arg[1,0,1,1]=(0.482938542126)*x[0]**o+(-0.0725027675209)*x[0]+(-0.441517962054)*x[1]**o+(0.787445860714)*x[1]
-        arg[1,0,2,0]=(0.0378928111257)*x[0]**o+(0.451368848019)*x[0]+(-0.228668284485)*x[1]**o+(0.505927229432)*x[1]
-        arg[1,0,2,1]=(-0.59833518872)*x[0]**o+(0.956068253354)*x[0]+(0.667905995469)*x[1]**o+(0.963273292214)*x[1]
-        arg[1,1,0,0]=(0.901637865236)*x[0]**o+(-0.642678971748)*x[0]+(-0.603915019524)*x[1]**o+(-0.208004993919)*x[1]
-        arg[1,1,0,1]=(-0.227162661052)*x[0]**o+(-0.5816434303)*x[0]+(0.274961293801)*x[1]**o+(-0.614001328621)*x[1]
-        arg[1,1,1,0]=(0.078438078548)*x[0]**o+(0.570191242883)*x[0]+(0.0952878212484)*x[1]**o+(0.844460205497)*x[1]
-        arg[1,1,1,1]=(-0.901445811786)*x[0]**o+(-0.996376775344)*x[0]+(0.707470471613)*x[1]**o+(-0.187517936674)*x[1]
-        arg[1,1,2,0]=(-0.66891443067)*x[0]**o+(0.0462057239324)*x[0]+(-0.825820539128)*x[1]**o+(-0.766932836843)*x[1]
-        arg[1,1,2,1]=(-0.851428828811)*x[0]**o+(0.504484422346)*x[0]+(0.121378315545)*x[1]**o+(0.903947012757)*x[1]
-        arg[1,2,0,0]=(-0.393827449768)*x[0]**o+(-0.251827904608)*x[0]+(0.8320040882)*x[1]**o+(0.57595149855)*x[1]
-        arg[1,2,0,1]=(0.638738110712)*x[0]**o+(-0.439962152539)*x[0]+(-0.977211078995)*x[1]**o+(0.0528475212451)*x[1]
-        arg[1,2,1,0]=(0.824313588941)*x[0]**o+(-0.589968996823)*x[0]+(-0.512156794152)*x[1]**o+(0.142809794443)*x[1]
-        arg[1,2,1,1]=(-0.31789333147)*x[0]**o+(0.598839896949)*x[0]+(0.638319398651)*x[1]**o+(0.353625999317)*x[1]
-        arg[1,2,2,0]=(-0.720472365012)*x[0]**o+(0.896538030051)*x[0]+(-0.224639169972)*x[1]**o+(-0.898299360738)*x[1]
-        arg[1,2,2,1]=(0.123077707167)*x[0]**o+(0.15922851038)*x[0]+(0.678984783843)*x[1]**o+(-0.778188269852)*x[1]
-        arg[1,3,0,0]=(0.344256301209)*x[0]**o+(0.884367738289)*x[0]+(0.00556636219289)*x[1]**o+(0.684361331195)*x[1]
-        arg[1,3,0,1]=(-0.812245131065)*x[0]**o+(0.971365671228)*x[0]+(0.0696053239569)*x[1]**o+(-0.300266235138)*x[1]
-        arg[1,3,1,0]=(0.470254588058)*x[0]**o+(0.0946825509913)*x[0]+(-0.415619255025)*x[1]**o+(-0.27381652858)*x[1]
-        arg[1,3,1,1]=(-0.84555138241)*x[0]**o+(0.873510832091)*x[0]+(-0.138010338152)*x[1]**o+(-0.982274515316)*x[1]
-        arg[1,3,2,0]=(0.695614136148)*x[0]**o+(-0.192588082771)*x[0]+(-0.21579127791)*x[1]**o+(-0.0335939736388)*x[1]
-        arg[1,3,2,1]=(-0.633363463896)*x[0]**o+(-0.958320549993)*x[0]+(0.197331067481)*x[1]**o+(0.315089888409)*x[1]
-        arg[1,4,0,0]=(-0.211531219945)*x[0]**o+(-0.399700721799)*x[0]+(0.578927638839)*x[1]**o+(-0.389034976195)*x[1]
-        arg[1,4,0,1]=(-0.846399571893)*x[0]**o+(-0.952904755903)*x[0]+(-0.858399802693)*x[1]**o+(-0.23264354907)*x[1]
-        arg[1,4,1,0]=(0.255822441586)*x[0]**o+(0.896237710393)*x[0]+(-0.90248008271)*x[1]**o+(0.654804848244)*x[1]
-        arg[1,4,1,1]=(-0.112475508163)*x[0]**o+(-0.861697204453)*x[0]+(-0.782581931187)*x[1]**o+(-0.129345341581)*x[1]
-        arg[1,4,2,0]=(0.690095687033)*x[0]**o+(0.729317334019)*x[0]+(-0.00961483612288)*x[1]**o+(-0.288320551243)*x[1]
-        arg[1,4,2,1]=(-0.648146433517)*x[0]**o+(-0.301246601263)*x[0]+(-0.490119612994)*x[1]**o+(0.231186845615)*x[1]
-        arg[2,0,0,0]=(-0.645560891595)*x[0]**o+(-0.889067544988)*x[0]+(-0.193353414221)*x[1]**o+(-0.726988479344)*x[1]
-        arg[2,0,0,1]=(-0.083614738484)*x[0]**o+(-0.822530927241)*x[0]+(0.660338934241)*x[1]**o+(0.0383821036508)*x[1]
-        arg[2,0,1,0]=(-0.132250736664)*x[0]**o+(-0.571474370931)*x[0]+(-0.755931100342)*x[1]**o+(-0.145196865115)*x[1]
-        arg[2,0,1,1]=(0.545219196727)*x[0]**o+(-0.846368787913)*x[0]+(-0.845706160842)*x[1]**o+(0.550703610989)*x[1]
-        arg[2,0,2,0]=(-0.766303732195)*x[0]**o+(0.156822893641)*x[0]+(0.00954334254282)*x[1]**o+(0.201506144561)*x[1]
-        arg[2,0,2,1]=(-0.274476449632)*x[0]**o+(-0.361690468185)*x[0]+(-0.816535747268)*x[1]**o+(-0.473913811701)*x[1]
-        arg[2,1,0,0]=(-0.927592771482)*x[0]**o+(0.534615269814)*x[0]+(-0.571217133452)*x[1]**o+(0.57448299216)*x[1]
-        arg[2,1,0,1]=(-0.298153953211)*x[0]**o+(-0.143636909462)*x[0]+(0.990660288864)*x[1]**o+(-0.495864284763)*x[1]
-        arg[2,1,1,0]=(-0.110625727208)*x[0]**o+(-0.221057774317)*x[0]+(0.557195078358)*x[1]**o+(0.803162691808)*x[1]
-        arg[2,1,1,1]=(-0.115589176775)*x[0]**o+(0.08253351782)*x[0]+(-0.595996958977)*x[1]**o+(0.501435717501)*x[1]
-        arg[2,1,2,0]=(0.78764976658)*x[0]**o+(0.966729831711)*x[0]+(-0.585879575667)*x[1]**o+(0.341148176793)*x[1]
-        arg[2,1,2,1]=(-0.551697945691)*x[0]**o+(0.545857249323)*x[0]+(-0.919321724495)*x[1]**o+(-0.286043327415)*x[1]
-        arg[2,2,0,0]=(-0.669933890655)*x[0]**o+(-0.344862118495)*x[0]+(0.878331282597)*x[1]**o+(0.881893760718)*x[1]
-        arg[2,2,0,1]=(-0.217876618414)*x[0]**o+(-0.289118007199)*x[0]+(0.513464171525)*x[1]**o+(0.310055899102)*x[1]
-        arg[2,2,1,0]=(0.0472051379154)*x[0]**o+(0.42455388451)*x[0]+(-0.920571834891)*x[1]**o+(-0.779095076537)*x[1]
-        arg[2,2,1,1]=(-0.299619304537)*x[0]**o+(-0.289777287294)*x[0]+(0.920505062988)*x[1]**o+(-0.243924179095)*x[1]
-        arg[2,2,2,0]=(-0.819343530877)*x[0]**o+(0.975953690875)*x[0]+(-0.787239459241)*x[1]**o+(-0.199900734691)*x[1]
-        arg[2,2,2,1]=(0.0980085780878)*x[0]**o+(0.642946515451)*x[0]+(0.951790535152)*x[1]**o+(-0.253914817366)*x[1]
-        arg[2,3,0,0]=(-0.882075522824)*x[0]**o+(0.200934502682)*x[0]+(-0.83200464496)*x[1]**o+(0.941479345375)*x[1]
-        arg[2,3,0,1]=(-0.615941782209)*x[0]**o+(-0.693242388092)*x[0]+(-0.640417278871)*x[1]**o+(-0.346459094803)*x[1]
-        arg[2,3,1,0]=(-0.447919427952)*x[0]**o+(0.205055689141)*x[0]+(-0.453290032411)*x[1]**o+(0.879062836521)*x[1]
-        arg[2,3,1,1]=(0.721133924016)*x[0]**o+(0.71294558459)*x[0]+(-0.250087045805)*x[1]**o+(0.605146721129)*x[1]
-        arg[2,3,2,0]=(0.247782322921)*x[0]**o+(-0.956367425119)*x[0]+(-0.054045082005)*x[1]**o+(-0.128151832132)*x[1]
-        arg[2,3,2,1]=(-0.427039259088)*x[0]**o+(-0.359849242839)*x[0]+(-0.244990934481)*x[1]**o+(-0.038020035629)*x[1]
-        arg[2,4,0,0]=(-0.216409150834)*x[0]**o+(0.492547989921)*x[0]+(0.878317438469)*x[1]**o+(-0.112718719119)*x[1]
-        arg[2,4,0,1]=(0.487403443102)*x[0]**o+(0.228155519468)*x[0]+(0.923150527516)*x[1]**o+(0.642654867908)*x[1]
-        arg[2,4,1,0]=(0.916418483417)*x[0]**o+(-0.177198935173)*x[0]+(-0.790548940412)*x[1]**o+(0.87540167052)*x[1]
-        arg[2,4,1,1]=(0.718502075538)*x[0]**o+(0.691254010569)*x[0]+(-0.0134430122729)*x[1]**o+(-0.739888770749)*x[1]
-        arg[2,4,2,0]=(0.287825086861)*x[0]**o+(0.596621809347)*x[0]+(0.729784205391)*x[1]**o+(-0.25984257955)*x[1]
-        arg[2,4,2,1]=(-0.515102480025)*x[0]**o+(-0.609951840015)*x[0]+(0.229834340075)*x[1]**o+(-0.727157816241)*x[1]
-        arg[3,0,0,0]=(-0.349406091363)*x[0]**o+(0.802348451103)*x[0]+(-0.174421346276)*x[1]**o+(0.120711198036)*x[1]
-        arg[3,0,0,1]=(0.367085169423)*x[0]**o+(-0.319683236434)*x[0]+(-0.590820542566)*x[1]**o+(0.607625953303)*x[1]
-        arg[3,0,1,0]=(0.231259976433)*x[0]**o+(-0.493297408825)*x[0]+(0.919363640504)*x[1]**o+(-0.839841270429)*x[1]
-        arg[3,0,1,1]=(0.57672135684)*x[0]**o+(0.882062879704)*x[0]+(-0.600979706444)*x[1]**o+(-0.704008344509)*x[1]
-        arg[3,0,2,0]=(-0.208162114527)*x[0]**o+(0.593682243052)*x[0]+(-0.428436832487)*x[1]**o+(0.51007021604)*x[1]
-        arg[3,0,2,1]=(0.315264672653)*x[0]**o+(-0.0835897376534)*x[0]+(-0.135315173106)*x[1]**o+(-0.646372309498)*x[1]
-        arg[3,1,0,0]=(0.815505953752)*x[0]**o+(0.0625493643292)*x[0]+(0.383118433815)*x[1]**o+(0.17372720435)*x[1]
-        arg[3,1,0,1]=(0.557295786969)*x[0]**o+(-0.568823508165)*x[0]+(-0.00874733267675)*x[1]**o+(-0.27454140598)*x[1]
-        arg[3,1,1,0]=(0.649021026591)*x[0]**o+(0.232255030448)*x[0]+(0.845939296425)*x[1]**o+(0.116387378294)*x[1]
-        arg[3,1,1,1]=(0.431124940343)*x[0]**o+(-0.0865937271969)*x[0]+(0.937911741288)*x[1]**o+(0.362850039234)*x[1]
-        arg[3,1,2,0]=(0.155965414439)*x[0]**o+(0.110850421841)*x[0]+(0.244563080191)*x[1]**o+(0.266325498006)*x[1]
-        arg[3,1,2,1]=(0.766813300935)*x[0]**o+(0.77492422889)*x[0]+(-0.0141436554714)*x[1]**o+(0.780444449009)*x[1]
-        arg[3,2,0,0]=(0.619086019019)*x[0]**o+(-0.574130567601)*x[0]+(-0.417708159593)*x[1]**o+(0.707727284254)*x[1]
-        arg[3,2,0,1]=(-0.845657409353)*x[0]**o+(0.705282507748)*x[0]+(0.124557418112)*x[1]**o+(-0.337493494733)*x[1]
-        arg[3,2,1,0]=(0.114875146211)*x[0]**o+(-0.724480426892)*x[0]+(-0.0763476904405)*x[1]**o+(0.12064907114)*x[1]
-        arg[3,2,1,1]=(-0.74994413376)*x[0]**o+(-0.916476035217)*x[0]+(-0.360412756599)*x[1]**o+(-0.917457363098)*x[1]
-        arg[3,2,2,0]=(-0.446839470984)*x[0]**o+(-0.097704838316)*x[0]+(-0.653584364909)*x[1]**o+(0.561014757758)*x[1]
-        arg[3,2,2,1]=(-0.178975301038)*x[0]**o+(-0.843669982667)*x[0]+(-0.566610094242)*x[1]**o+(0.213047649003)*x[1]
-        arg[3,3,0,0]=(0.144115764355)*x[0]**o+(0.199435411954)*x[0]+(0.173334385199)*x[1]**o+(-0.942957035808)*x[1]
-        arg[3,3,0,1]=(-0.417589926342)*x[0]**o+(-0.819188022852)*x[0]+(-0.68299160003)*x[1]**o+(-0.314851447894)*x[1]
-        arg[3,3,1,0]=(0.737898219164)*x[0]**o+(0.612906277393)*x[0]+(-0.768349396729)*x[1]**o+(-0.192998755095)*x[1]
-        arg[3,3,1,1]=(0.35433362007)*x[0]**o+(0.894174225208)*x[0]+(-0.450333030837)*x[1]**o+(0.819450589483)*x[1]
-        arg[3,3,2,0]=(-0.455377131302)*x[0]**o+(-0.748183144687)*x[0]+(-0.482739450231)*x[1]**o+(0.300625929022)*x[1]
-        arg[3,3,2,1]=(-0.602766693698)*x[0]**o+(-0.416288436985)*x[0]+(0.837501983536)*x[1]**o+(-0.745935308188)*x[1]
-        arg[3,4,0,0]=(-0.706774010405)*x[0]**o+(0.407766818701)*x[0]+(-0.248964401443)*x[1]**o+(0.675466487229)*x[1]
-        arg[3,4,0,1]=(0.512302883876)*x[0]**o+(0.0809544867105)*x[0]+(-0.204555203536)*x[1]**o+(-0.628574073749)*x[1]
-        arg[3,4,1,0]=(0.126376796421)*x[0]**o+(0.174607814129)*x[0]+(0.68867194136)*x[1]**o+(0.940025934568)*x[1]
-        arg[3,4,1,1]=(0.583042444739)*x[0]**o+(-0.786981763836)*x[0]+(0.319397032405)*x[1]**o+(-0.324993351432)*x[1]
-        arg[3,4,2,0]=(-0.941997068836)*x[0]**o+(-0.892825520378)*x[0]+(0.275995419027)*x[1]**o+(0.841260061022)*x[1]
-        arg[3,4,2,1]=(0.520110030788)*x[0]**o+(0.519262786324)*x[0]+(0.861221788948)*x[1]**o+(-0.376714934937)*x[1]
-        ref[0,0,0,0]=(0.240887319278)*x_ref[0]**o+(-0.192166587545)*x_ref[0]+(0.0176974287409)*x_ref[1]**o+(0.100761748824)*x_ref[1]
-        ref[0,0,0,1]=(-0.549649845775)*x_ref[0]**o+(-0.293969245646)*x_ref[0]+(-0.605885325133)*x_ref[1]**o+(0.799558451173)*x_ref[1]
-        ref[0,0,1,0]=(-0.899658769582)*x_ref[0]**o+(0.484524193987)*x_ref[0]+(0.437485870351)*x_ref[1]**o+(-0.220549034927)*x_ref[1]
-        ref[0,0,1,1]=(-0.146539961793)*x_ref[0]**o+(-0.278343486929)*x_ref[0]+(0.0913912456082)*x_ref[1]**o+(-0.751028975123)*x_ref[1]
-        ref[0,0,2,0]=(0.806344701194)*x_ref[0]**o+(0.0537872824561)*x_ref[0]+(-0.70407828379)*x_ref[1]**o+(-0.922963486601)*x_ref[1]
-        ref[0,0,2,1]=(0.307202902495)*x_ref[0]**o+(0.301603506731)*x_ref[0]+(0.232983743616)*x_ref[1]**o+(-0.744267542759)*x_ref[1]
-        ref[0,1,0,0]=(-0.550616060824)*x_ref[0]**o+(-0.661367750254)*x_ref[0]+(-0.695905895864)*x_ref[1]**o+(-0.788045922398)*x_ref[1]
-        ref[0,1,0,1]=(-0.934169134035)*x_ref[0]**o+(-0.843861105521)*x_ref[0]+(-0.237877254439)*x_ref[1]**o+(-0.364956821348)*x_ref[1]
-        ref[0,1,1,0]=(0.0950675750026)*x_ref[0]**o+(-0.815510640594)*x_ref[0]+(0.72526035968)*x_ref[1]**o+(0.898675190106)*x_ref[1]
-        ref[0,1,1,1]=(0.715609066776)*x_ref[0]**o+(0.371314845206)*x_ref[0]+(0.326878867244)*x_ref[1]**o+(-0.468798950199)*x_ref[1]
-        ref[0,1,2,0]=(0.392175939547)*x_ref[0]**o+(0.105332682674)*x_ref[0]+(0.997967455477)*x_ref[1]**o+(0.0322491822496)*x_ref[1]
-        ref[0,1,2,1]=(-0.804498399187)*x_ref[0]**o+(0.819653744739)*x_ref[0]+(0.609610573703)*x_ref[1]**o+(-0.623299047794)*x_ref[1]
-        ref[0,2,0,0]=(0.993877917386)*x_ref[0]**o+(0.815952897899)*x_ref[0]+(-0.258432174486)*x_ref[1]**o+(0.209324387308)*x_ref[1]
-        ref[0,2,0,1]=(0.395946889364)*x_ref[0]**o+(-0.859500539908)*x_ref[0]+(-0.68495734785)*x_ref[1]**o+(0.791813946302)*x_ref[1]
-        ref[0,2,1,0]=(0.154347661108)*x_ref[0]**o+(0.0873140744322)*x_ref[0]+(-0.423935109956)*x_ref[1]**o+(-0.754297239226)*x_ref[1]
-        ref[0,2,1,1]=(-0.623998419484)*x_ref[0]**o+(0.487300130941)*x_ref[0]+(-0.323613219784)*x_ref[1]**o+(0.744877983729)*x_ref[1]
-        ref[0,2,2,0]=(0.515686374371)*x_ref[0]**o+(0.512572153346)*x_ref[0]+(-0.641245783272)*x_ref[1]**o+(-0.390660158759)*x_ref[1]
-        ref[0,2,2,1]=(0.24398238139)*x_ref[0]**o+(-0.172020271678)*x_ref[0]+(0.980197812701)*x_ref[1]**o+(0.336941934503)*x_ref[1]
-        ref[0,3,0,0]=(0.0154584447615)*x_ref[0]**o+(-0.547048191238)*x_ref[0]+(-0.555319223005)*x_ref[1]**o+(0.0972794598106)*x_ref[1]
-        ref[0,3,0,1]=(0.44744389335)*x_ref[0]**o+(0.475046337874)*x_ref[0]+(0.876228982066)*x_ref[1]**o+(-0.0636405241175)*x_ref[1]
-        ref[0,3,1,0]=(0.392948465298)*x_ref[0]**o+(-0.341342654182)*x_ref[0]+(0.747185683968)*x_ref[1]**o+(-0.99981172166)*x_ref[1]
-        ref[0,3,1,1]=(-0.172355321621)*x_ref[0]**o+(-0.531391484795)*x_ref[0]+(0.451654274019)*x_ref[1]**o+(0.0795298667915)*x_ref[1]
-        ref[0,3,2,0]=(0.0841642474674)*x_ref[0]**o+(0.308494435164)*x_ref[0]+(0.53181918181)*x_ref[1]**o+(0.480258067959)*x_ref[1]
-        ref[0,3,2,1]=(-0.222903054864)*x_ref[0]**o+(-0.0330655869754)*x_ref[0]+(0.227482525015)*x_ref[1]**o+(0.536136212347)*x_ref[1]
-        ref[0,4,0,0]=(0.574798381284)*x_ref[0]**o+(0.181354466484)*x_ref[0]+(0.103049514171)*x_ref[1]**o+(0.156282818835)*x_ref[1]
-        ref[0,4,0,1]=(0.478314255289)*x_ref[0]**o+(0.224797222592)*x_ref[0]+(0.307668606272)*x_ref[1]**o+(-0.785262182937)*x_ref[1]
-        ref[0,4,1,0]=(0.519356961182)*x_ref[0]**o+(0.646200458344)*x_ref[0]+(0.0522618783181)*x_ref[1]**o+(0.702335307324)*x_ref[1]
-        ref[0,4,1,1]=(-0.168756029541)*x_ref[0]**o+(-0.00618364750666)*x_ref[0]+(0.472704616213)*x_ref[1]**o+(0.974257451871)*x_ref[1]
-        ref[0,4,2,0]=(-0.279196869573)*x_ref[0]**o+(-0.333083174091)*x_ref[0]+(-0.980089574428)*x_ref[1]**o+(0.405273709405)*x_ref[1]
-        ref[0,4,2,1]=(-0.199431380673)*x_ref[0]**o+(0.823294899866)*x_ref[0]+(-0.174125117685)*x_ref[1]**o+(-0.730500493887)*x_ref[1]
-        ref[1,0,0,0]=(-0.577281489635)*x_ref[0]**o+(0.231906139898)*x_ref[0]+(0.537128708963)*x_ref[1]**o+(0.363444540898)*x_ref[1]
-        ref[1,0,0,1]=(0.204108541882)*x_ref[0]**o+(-0.217661714888)*x_ref[0]+(0.963384293759)*x_ref[1]**o+(-0.0817519801351)*x_ref[1]
-        ref[1,0,1,0]=(0.540681325439)*x_ref[0]**o+(-0.496036960808)*x_ref[0]+(0.421037689661)*x_ref[1]**o+(0.19399086996)*x_ref[1]
-        ref[1,0,1,1]=(0.482938542126)*x_ref[0]**o+(-0.0725027675209)*x_ref[0]+(-0.441517962054)*x_ref[1]**o+(0.787445860714)*x_ref[1]
-        ref[1,0,2,0]=(0.0378928111257)*x_ref[0]**o+(0.451368848019)*x_ref[0]+(-0.228668284485)*x_ref[1]**o+(0.505927229432)*x_ref[1]
-        ref[1,0,2,1]=(-0.59833518872)*x_ref[0]**o+(0.956068253354)*x_ref[0]+(0.667905995469)*x_ref[1]**o+(0.963273292214)*x_ref[1]
-        ref[1,1,0,0]=(0.901637865236)*x_ref[0]**o+(-0.642678971748)*x_ref[0]+(-0.603915019524)*x_ref[1]**o+(-0.208004993919)*x_ref[1]
-        ref[1,1,0,1]=(-0.227162661052)*x_ref[0]**o+(-0.5816434303)*x_ref[0]+(0.274961293801)*x_ref[1]**o+(-0.614001328621)*x_ref[1]
-        ref[1,1,1,0]=(0.078438078548)*x_ref[0]**o+(0.570191242883)*x_ref[0]+(0.0952878212484)*x_ref[1]**o+(0.844460205497)*x_ref[1]
-        ref[1,1,1,1]=(-0.901445811786)*x_ref[0]**o+(-0.996376775344)*x_ref[0]+(0.707470471613)*x_ref[1]**o+(-0.187517936674)*x_ref[1]
-        ref[1,1,2,0]=(-0.66891443067)*x_ref[0]**o+(0.0462057239324)*x_ref[0]+(-0.825820539128)*x_ref[1]**o+(-0.766932836843)*x_ref[1]
-        ref[1,1,2,1]=(-0.851428828811)*x_ref[0]**o+(0.504484422346)*x_ref[0]+(0.121378315545)*x_ref[1]**o+(0.903947012757)*x_ref[1]
-        ref[1,2,0,0]=(-0.393827449768)*x_ref[0]**o+(-0.251827904608)*x_ref[0]+(0.8320040882)*x_ref[1]**o+(0.57595149855)*x_ref[1]
-        ref[1,2,0,1]=(0.638738110712)*x_ref[0]**o+(-0.439962152539)*x_ref[0]+(-0.977211078995)*x_ref[1]**o+(0.0528475212451)*x_ref[1]
-        ref[1,2,1,0]=(0.824313588941)*x_ref[0]**o+(-0.589968996823)*x_ref[0]+(-0.512156794152)*x_ref[1]**o+(0.142809794443)*x_ref[1]
-        ref[1,2,1,1]=(-0.31789333147)*x_ref[0]**o+(0.598839896949)*x_ref[0]+(0.638319398651)*x_ref[1]**o+(0.353625999317)*x_ref[1]
-        ref[1,2,2,0]=(-0.720472365012)*x_ref[0]**o+(0.896538030051)*x_ref[0]+(-0.224639169972)*x_ref[1]**o+(-0.898299360738)*x_ref[1]
-        ref[1,2,2,1]=(0.123077707167)*x_ref[0]**o+(0.15922851038)*x_ref[0]+(0.678984783843)*x_ref[1]**o+(-0.778188269852)*x_ref[1]
-        ref[1,3,0,0]=(0.344256301209)*x_ref[0]**o+(0.884367738289)*x_ref[0]+(0.00556636219289)*x_ref[1]**o+(0.684361331195)*x_ref[1]
-        ref[1,3,0,1]=(-0.812245131065)*x_ref[0]**o+(0.971365671228)*x_ref[0]+(0.0696053239569)*x_ref[1]**o+(-0.300266235138)*x_ref[1]
-        ref[1,3,1,0]=(0.470254588058)*x_ref[0]**o+(0.0946825509913)*x_ref[0]+(-0.415619255025)*x_ref[1]**o+(-0.27381652858)*x_ref[1]
-        ref[1,3,1,1]=(-0.84555138241)*x_ref[0]**o+(0.873510832091)*x_ref[0]+(-0.138010338152)*x_ref[1]**o+(-0.982274515316)*x_ref[1]
-        ref[1,3,2,0]=(0.695614136148)*x_ref[0]**o+(-0.192588082771)*x_ref[0]+(-0.21579127791)*x_ref[1]**o+(-0.0335939736388)*x_ref[1]
-        ref[1,3,2,1]=(-0.633363463896)*x_ref[0]**o+(-0.958320549993)*x_ref[0]+(0.197331067481)*x_ref[1]**o+(0.315089888409)*x_ref[1]
-        ref[1,4,0,0]=(-0.211531219945)*x_ref[0]**o+(-0.399700721799)*x_ref[0]+(0.578927638839)*x_ref[1]**o+(-0.389034976195)*x_ref[1]
-        ref[1,4,0,1]=(-0.846399571893)*x_ref[0]**o+(-0.952904755903)*x_ref[0]+(-0.858399802693)*x_ref[1]**o+(-0.23264354907)*x_ref[1]
-        ref[1,4,1,0]=(0.255822441586)*x_ref[0]**o+(0.896237710393)*x_ref[0]+(-0.90248008271)*x_ref[1]**o+(0.654804848244)*x_ref[1]
-        ref[1,4,1,1]=(-0.112475508163)*x_ref[0]**o+(-0.861697204453)*x_ref[0]+(-0.782581931187)*x_ref[1]**o+(-0.129345341581)*x_ref[1]
-        ref[1,4,2,0]=(0.690095687033)*x_ref[0]**o+(0.729317334019)*x_ref[0]+(-0.00961483612288)*x_ref[1]**o+(-0.288320551243)*x_ref[1]
-        ref[1,4,2,1]=(-0.648146433517)*x_ref[0]**o+(-0.301246601263)*x_ref[0]+(-0.490119612994)*x_ref[1]**o+(0.231186845615)*x_ref[1]
-        ref[2,0,0,0]=(-0.645560891595)*x_ref[0]**o+(-0.889067544988)*x_ref[0]+(-0.193353414221)*x_ref[1]**o+(-0.726988479344)*x_ref[1]
-        ref[2,0,0,1]=(-0.083614738484)*x_ref[0]**o+(-0.822530927241)*x_ref[0]+(0.660338934241)*x_ref[1]**o+(0.0383821036508)*x_ref[1]
-        ref[2,0,1,0]=(-0.132250736664)*x_ref[0]**o+(-0.571474370931)*x_ref[0]+(-0.755931100342)*x_ref[1]**o+(-0.145196865115)*x_ref[1]
-        ref[2,0,1,1]=(0.545219196727)*x_ref[0]**o+(-0.846368787913)*x_ref[0]+(-0.845706160842)*x_ref[1]**o+(0.550703610989)*x_ref[1]
-        ref[2,0,2,0]=(-0.766303732195)*x_ref[0]**o+(0.156822893641)*x_ref[0]+(0.00954334254282)*x_ref[1]**o+(0.201506144561)*x_ref[1]
-        ref[2,0,2,1]=(-0.274476449632)*x_ref[0]**o+(-0.361690468185)*x_ref[0]+(-0.816535747268)*x_ref[1]**o+(-0.473913811701)*x_ref[1]
-        ref[2,1,0,0]=(-0.927592771482)*x_ref[0]**o+(0.534615269814)*x_ref[0]+(-0.571217133452)*x_ref[1]**o+(0.57448299216)*x_ref[1]
-        ref[2,1,0,1]=(-0.298153953211)*x_ref[0]**o+(-0.143636909462)*x_ref[0]+(0.990660288864)*x_ref[1]**o+(-0.495864284763)*x_ref[1]
-        ref[2,1,1,0]=(-0.110625727208)*x_ref[0]**o+(-0.221057774317)*x_ref[0]+(0.557195078358)*x_ref[1]**o+(0.803162691808)*x_ref[1]
-        ref[2,1,1,1]=(-0.115589176775)*x_ref[0]**o+(0.08253351782)*x_ref[0]+(-0.595996958977)*x_ref[1]**o+(0.501435717501)*x_ref[1]
-        ref[2,1,2,0]=(0.78764976658)*x_ref[0]**o+(0.966729831711)*x_ref[0]+(-0.585879575667)*x_ref[1]**o+(0.341148176793)*x_ref[1]
-        ref[2,1,2,1]=(-0.551697945691)*x_ref[0]**o+(0.545857249323)*x_ref[0]+(-0.919321724495)*x_ref[1]**o+(-0.286043327415)*x_ref[1]
-        ref[2,2,0,0]=(-0.669933890655)*x_ref[0]**o+(-0.344862118495)*x_ref[0]+(0.878331282597)*x_ref[1]**o+(0.881893760718)*x_ref[1]
-        ref[2,2,0,1]=(-0.217876618414)*x_ref[0]**o+(-0.289118007199)*x_ref[0]+(0.513464171525)*x_ref[1]**o+(0.310055899102)*x_ref[1]
-        ref[2,2,1,0]=(0.0472051379154)*x_ref[0]**o+(0.42455388451)*x_ref[0]+(-0.920571834891)*x_ref[1]**o+(-0.779095076537)*x_ref[1]
-        ref[2,2,1,1]=(-0.299619304537)*x_ref[0]**o+(-0.289777287294)*x_ref[0]+(0.920505062988)*x_ref[1]**o+(-0.243924179095)*x_ref[1]
-        ref[2,2,2,0]=(-0.819343530877)*x_ref[0]**o+(0.975953690875)*x_ref[0]+(-0.787239459241)*x_ref[1]**o+(-0.199900734691)*x_ref[1]
-        ref[2,2,2,1]=(0.0980085780878)*x_ref[0]**o+(0.642946515451)*x_ref[0]+(0.951790535152)*x_ref[1]**o+(-0.253914817366)*x_ref[1]
-        ref[2,3,0,0]=(-0.882075522824)*x_ref[0]**o+(0.200934502682)*x_ref[0]+(-0.83200464496)*x_ref[1]**o+(0.941479345375)*x_ref[1]
-        ref[2,3,0,1]=(-0.615941782209)*x_ref[0]**o+(-0.693242388092)*x_ref[0]+(-0.640417278871)*x_ref[1]**o+(-0.346459094803)*x_ref[1]
-        ref[2,3,1,0]=(-0.447919427952)*x_ref[0]**o+(0.205055689141)*x_ref[0]+(-0.453290032411)*x_ref[1]**o+(0.879062836521)*x_ref[1]
-        ref[2,3,1,1]=(0.721133924016)*x_ref[0]**o+(0.71294558459)*x_ref[0]+(-0.250087045805)*x_ref[1]**o+(0.605146721129)*x_ref[1]
-        ref[2,3,2,0]=(0.247782322921)*x_ref[0]**o+(-0.956367425119)*x_ref[0]+(-0.054045082005)*x_ref[1]**o+(-0.128151832132)*x_ref[1]
-        ref[2,3,2,1]=(-0.427039259088)*x_ref[0]**o+(-0.359849242839)*x_ref[0]+(-0.244990934481)*x_ref[1]**o+(-0.038020035629)*x_ref[1]
-        ref[2,4,0,0]=(-0.216409150834)*x_ref[0]**o+(0.492547989921)*x_ref[0]+(0.878317438469)*x_ref[1]**o+(-0.112718719119)*x_ref[1]
-        ref[2,4,0,1]=(0.487403443102)*x_ref[0]**o+(0.228155519468)*x_ref[0]+(0.923150527516)*x_ref[1]**o+(0.642654867908)*x_ref[1]
-        ref[2,4,1,0]=(0.916418483417)*x_ref[0]**o+(-0.177198935173)*x_ref[0]+(-0.790548940412)*x_ref[1]**o+(0.87540167052)*x_ref[1]
-        ref[2,4,1,1]=(0.718502075538)*x_ref[0]**o+(0.691254010569)*x_ref[0]+(-0.0134430122729)*x_ref[1]**o+(-0.739888770749)*x_ref[1]
-        ref[2,4,2,0]=(0.287825086861)*x_ref[0]**o+(0.596621809347)*x_ref[0]+(0.729784205391)*x_ref[1]**o+(-0.25984257955)*x_ref[1]
-        ref[2,4,2,1]=(-0.515102480025)*x_ref[0]**o+(-0.609951840015)*x_ref[0]+(0.229834340075)*x_ref[1]**o+(-0.727157816241)*x_ref[1]
-        ref[3,0,0,0]=(-0.349406091363)*x_ref[0]**o+(0.802348451103)*x_ref[0]+(-0.174421346276)*x_ref[1]**o+(0.120711198036)*x_ref[1]
-        ref[3,0,0,1]=(0.367085169423)*x_ref[0]**o+(-0.319683236434)*x_ref[0]+(-0.590820542566)*x_ref[1]**o+(0.607625953303)*x_ref[1]
-        ref[3,0,1,0]=(0.231259976433)*x_ref[0]**o+(-0.493297408825)*x_ref[0]+(0.919363640504)*x_ref[1]**o+(-0.839841270429)*x_ref[1]
-        ref[3,0,1,1]=(0.57672135684)*x_ref[0]**o+(0.882062879704)*x_ref[0]+(-0.600979706444)*x_ref[1]**o+(-0.704008344509)*x_ref[1]
-        ref[3,0,2,0]=(-0.208162114527)*x_ref[0]**o+(0.593682243052)*x_ref[0]+(-0.428436832487)*x_ref[1]**o+(0.51007021604)*x_ref[1]
-        ref[3,0,2,1]=(0.315264672653)*x_ref[0]**o+(-0.0835897376534)*x_ref[0]+(-0.135315173106)*x_ref[1]**o+(-0.646372309498)*x_ref[1]
-        ref[3,1,0,0]=(0.815505953752)*x_ref[0]**o+(0.0625493643292)*x_ref[0]+(0.383118433815)*x_ref[1]**o+(0.17372720435)*x_ref[1]
-        ref[3,1,0,1]=(0.557295786969)*x_ref[0]**o+(-0.568823508165)*x_ref[0]+(-0.00874733267675)*x_ref[1]**o+(-0.27454140598)*x_ref[1]
-        ref[3,1,1,0]=(0.649021026591)*x_ref[0]**o+(0.232255030448)*x_ref[0]+(0.845939296425)*x_ref[1]**o+(0.116387378294)*x_ref[1]
-        ref[3,1,1,1]=(0.431124940343)*x_ref[0]**o+(-0.0865937271969)*x_ref[0]+(0.937911741288)*x_ref[1]**o+(0.362850039234)*x_ref[1]
-        ref[3,1,2,0]=(0.155965414439)*x_ref[0]**o+(0.110850421841)*x_ref[0]+(0.244563080191)*x_ref[1]**o+(0.266325498006)*x_ref[1]
-        ref[3,1,2,1]=(0.766813300935)*x_ref[0]**o+(0.77492422889)*x_ref[0]+(-0.0141436554714)*x_ref[1]**o+(0.780444449009)*x_ref[1]
-        ref[3,2,0,0]=(0.619086019019)*x_ref[0]**o+(-0.574130567601)*x_ref[0]+(-0.417708159593)*x_ref[1]**o+(0.707727284254)*x_ref[1]
-        ref[3,2,0,1]=(-0.845657409353)*x_ref[0]**o+(0.705282507748)*x_ref[0]+(0.124557418112)*x_ref[1]**o+(-0.337493494733)*x_ref[1]
-        ref[3,2,1,0]=(0.114875146211)*x_ref[0]**o+(-0.724480426892)*x_ref[0]+(-0.0763476904405)*x_ref[1]**o+(0.12064907114)*x_ref[1]
-        ref[3,2,1,1]=(-0.74994413376)*x_ref[0]**o+(-0.916476035217)*x_ref[0]+(-0.360412756599)*x_ref[1]**o+(-0.917457363098)*x_ref[1]
-        ref[3,2,2,0]=(-0.446839470984)*x_ref[0]**o+(-0.097704838316)*x_ref[0]+(-0.653584364909)*x_ref[1]**o+(0.561014757758)*x_ref[1]
-        ref[3,2,2,1]=(-0.178975301038)*x_ref[0]**o+(-0.843669982667)*x_ref[0]+(-0.566610094242)*x_ref[1]**o+(0.213047649003)*x_ref[1]
-        ref[3,3,0,0]=(0.144115764355)*x_ref[0]**o+(0.199435411954)*x_ref[0]+(0.173334385199)*x_ref[1]**o+(-0.942957035808)*x_ref[1]
-        ref[3,3,0,1]=(-0.417589926342)*x_ref[0]**o+(-0.819188022852)*x_ref[0]+(-0.68299160003)*x_ref[1]**o+(-0.314851447894)*x_ref[1]
-        ref[3,3,1,0]=(0.737898219164)*x_ref[0]**o+(0.612906277393)*x_ref[0]+(-0.768349396729)*x_ref[1]**o+(-0.192998755095)*x_ref[1]
-        ref[3,3,1,1]=(0.35433362007)*x_ref[0]**o+(0.894174225208)*x_ref[0]+(-0.450333030837)*x_ref[1]**o+(0.819450589483)*x_ref[1]
-        ref[3,3,2,0]=(-0.455377131302)*x_ref[0]**o+(-0.748183144687)*x_ref[0]+(-0.482739450231)*x_ref[1]**o+(0.300625929022)*x_ref[1]
-        ref[3,3,2,1]=(-0.602766693698)*x_ref[0]**o+(-0.416288436985)*x_ref[0]+(0.837501983536)*x_ref[1]**o+(-0.745935308188)*x_ref[1]
-        ref[3,4,0,0]=(-0.706774010405)*x_ref[0]**o+(0.407766818701)*x_ref[0]+(-0.248964401443)*x_ref[1]**o+(0.675466487229)*x_ref[1]
-        ref[3,4,0,1]=(0.512302883876)*x_ref[0]**o+(0.0809544867105)*x_ref[0]+(-0.204555203536)*x_ref[1]**o+(-0.628574073749)*x_ref[1]
-        ref[3,4,1,0]=(0.126376796421)*x_ref[0]**o+(0.174607814129)*x_ref[0]+(0.68867194136)*x_ref[1]**o+(0.940025934568)*x_ref[1]
-        ref[3,4,1,1]=(0.583042444739)*x_ref[0]**o+(-0.786981763836)*x_ref[0]+(0.319397032405)*x_ref[1]**o+(-0.324993351432)*x_ref[1]
-        ref[3,4,2,0]=(-0.941997068836)*x_ref[0]**o+(-0.892825520378)*x_ref[0]+(0.275995419027)*x_ref[1]**o+(0.841260061022)*x_ref[1]
-        ref[3,4,2,1]=(0.520110030788)*x_ref[0]**o+(0.519262786324)*x_ref[0]+(0.861221788948)*x_ref[1]**o+(-0.376714934937)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.615899511086)*x[0]**o+(0.823637401824)*x[0]+(-0.986967740198)*x[1]**o+(-0.782088977641)*x[1]+(-0.576799974679)*x[2]**o+(-0.910942885711)*x[2]
-        arg[0,0,0,1]=(-0.790830593449)*x[0]**o+(-0.897724279499)*x[0]+(-0.881691805807)*x[1]**o+(-0.133793238901)*x[1]+(-0.0903391684489)*x[2]**o+(0.659893469877)*x[2]
-        arg[0,0,1,0]=(-0.0567117900114)*x[0]**o+(-0.858031985686)*x[0]+(-0.397443445702)*x[1]**o+(0.549982838823)*x[1]+(-0.636905143813)*x[2]**o+(0.8488142632)*x[2]
-        arg[0,0,1,1]=(-0.644557373082)*x[0]**o+(-0.323654898522)*x[0]+(0.210458705923)*x[1]**o+(0.990436827296)*x[1]+(-0.597872757151)*x[2]**o+(-0.83865548618)*x[2]
-        arg[0,0,2,0]=(-0.29830667084)*x[0]**o+(0.327035546909)*x[0]+(0.132690049791)*x[1]**o+(-0.55625443282)*x[1]+(0.0972781385283)*x[2]**o+(0.151885837608)*x[2]
-        arg[0,0,2,1]=(-0.435983465578)*x[0]**o+(-0.0852522953446)*x[0]+(0.257654807094)*x[1]**o+(-0.336603197583)*x[1]+(0.637913421592)*x[2]**o+(0.8151042055)*x[2]
-        arg[0,1,0,0]=(-0.0373980191125)*x[0]**o+(-0.45937285505)*x[0]+(-0.857933684889)*x[1]**o+(-0.843826686256)*x[1]+(-0.727077320504)*x[2]**o+(-0.65222863395)*x[2]
-        arg[0,1,0,1]=(0.63426017384)*x[0]**o+(0.845708641601)*x[0]+(0.246160302486)*x[1]**o+(-0.660855572094)*x[1]+(0.67420981328)*x[2]**o+(-0.280803968781)*x[2]
-        arg[0,1,1,0]=(0.881193264597)*x[0]**o+(-0.881936969515)*x[0]+(-0.883246837152)*x[1]**o+(0.182222471927)*x[1]+(0.405380496272)*x[2]**o+(0.175721746883)*x[2]
-        arg[0,1,1,1]=(-0.44447667237)*x[0]**o+(0.956169274606)*x[0]+(0.0370532940652)*x[1]**o+(-0.181239635583)*x[1]+(-0.678412161285)*x[2]**o+(-0.653172157401)*x[2]
-        arg[0,1,2,0]=(-0.50038634718)*x[0]**o+(0.00278321765167)*x[0]+(-0.831539460218)*x[1]**o+(-0.555243320385)*x[1]+(-0.626789452003)*x[2]**o+(-0.495085243933)*x[2]
-        arg[0,1,2,1]=(-0.32886359569)*x[0]**o+(0.406099965475)*x[0]+(0.764756177266)*x[1]**o+(-0.272070344181)*x[1]+(-0.41812596516)*x[2]**o+(0.349063696376)*x[2]
-        arg[0,2,0,0]=(-0.580544978365)*x[0]**o+(0.53441241334)*x[0]+(-0.808749795876)*x[1]**o+(0.172110801632)*x[1]+(-0.939262606098)*x[2]**o+(-0.724859325104)*x[2]
-        arg[0,2,0,1]=(0.256335221944)*x[0]**o+(0.463522371018)*x[0]+(0.990516478508)*x[1]**o+(0.423931177054)*x[1]+(0.184277693683)*x[2]**o+(-0.272967447689)*x[2]
-        arg[0,2,1,0]=(-0.126943811008)*x[0]**o+(0.645821387926)*x[0]+(0.150370174987)*x[1]**o+(-0.150954538301)*x[1]+(-0.378720078559)*x[2]**o+(0.0975963807109)*x[2]
-        arg[0,2,1,1]=(-0.451434544339)*x[0]**o+(0.557314109088)*x[0]+(-0.0402970749558)*x[1]**o+(0.306984557206)*x[1]+(-0.297018139186)*x[2]**o+(0.593800698785)*x[2]
-        arg[0,2,2,0]=(-0.376199144911)*x[0]**o+(-0.230454116373)*x[0]+(0.992738297651)*x[1]**o+(0.183510534927)*x[1]+(0.409381711992)*x[2]**o+(0.171945265727)*x[2]
-        arg[0,2,2,1]=(0.363233095971)*x[0]**o+(-0.130589148249)*x[0]+(0.809611042018)*x[1]**o+(-0.354546307961)*x[1]+(0.0631410169203)*x[2]**o+(0.630306161781)*x[2]
-        arg[0,3,0,0]=(0.49655016161)*x[0]**o+(0.878957258614)*x[0]+(-0.397408696784)*x[1]**o+(-0.199445321288)*x[1]+(0.929857086663)*x[2]**o+(-0.648770887161)*x[2]
-        arg[0,3,0,1]=(-0.85578334594)*x[0]**o+(-0.294617109229)*x[0]+(-0.0790295769768)*x[1]**o+(0.82151942311)*x[1]+(0.541628117444)*x[2]**o+(0.805418174827)*x[2]
-        arg[0,3,1,0]=(0.800775454804)*x[0]**o+(0.599550462983)*x[0]+(-0.384788634082)*x[1]**o+(-0.356933972363)*x[1]+(-0.423116265473)*x[2]**o+(-0.125492982003)*x[2]
-        arg[0,3,1,1]=(0.929652994661)*x[0]**o+(-0.57396682406)*x[0]+(0.313584116036)*x[1]**o+(-0.190575043496)*x[1]+(-0.29110884935)*x[2]**o+(0.967530639925)*x[2]
-        arg[0,3,2,0]=(0.761136478868)*x[0]**o+(0.565721170014)*x[0]+(0.239619122131)*x[1]**o+(-0.0821651979956)*x[1]+(-0.699218775545)*x[2]**o+(0.19973415585)*x[2]
-        arg[0,3,2,1]=(0.209543244648)*x[0]**o+(0.93957796874)*x[0]+(0.354405887426)*x[1]**o+(0.504177262864)*x[1]+(0.446866674894)*x[2]**o+(-0.522936485464)*x[2]
-        arg[0,4,0,0]=(0.427541399652)*x[0]**o+(-0.114806067206)*x[0]+(0.236780877643)*x[1]**o+(0.422226381272)*x[1]+(-0.506450961214)*x[2]**o+(0.616091720212)*x[2]
-        arg[0,4,0,1]=(0.698773571323)*x[0]**o+(-0.357878713085)*x[0]+(-0.453730359129)*x[1]**o+(-0.328701041355)*x[1]+(-0.28646346679)*x[2]**o+(-0.0449784265203)*x[2]
-        arg[0,4,1,0]=(-0.419416306509)*x[0]**o+(-0.1970394955)*x[0]+(-0.814008932379)*x[1]**o+(-0.805127589929)*x[1]+(0.244059789875)*x[2]**o+(-0.983027843847)*x[2]
-        arg[0,4,1,1]=(0.84837346004)*x[0]**o+(0.501808510624)*x[0]+(-0.105800351358)*x[1]**o+(0.903999231718)*x[1]+(-0.0473996978124)*x[2]**o+(0.683647253381)*x[2]
-        arg[0,4,2,0]=(0.658722899682)*x[0]**o+(-0.401846635016)*x[0]+(-0.967322202581)*x[1]**o+(-0.948306922217)*x[1]+(0.496409308219)*x[2]**o+(-0.184768777052)*x[2]
-        arg[0,4,2,1]=(-0.454468390888)*x[0]**o+(-0.220640468215)*x[0]+(0.995269925943)*x[1]**o+(0.778951329211)*x[1]+(0.0439534466302)*x[2]**o+(0.806197038383)*x[2]
-        arg[1,0,0,0]=(-0.547461802236)*x[0]**o+(0.370768827789)*x[0]+(-0.619991757552)*x[1]**o+(0.391727195645)*x[1]+(-0.649274922953)*x[2]**o+(-0.478788248429)*x[2]
-        arg[1,0,0,1]=(-0.899230505882)*x[0]**o+(0.603064321735)*x[0]+(-0.737475386349)*x[1]**o+(0.594197953001)*x[1]+(0.341324049064)*x[2]**o+(0.285202633917)*x[2]
-        arg[1,0,1,0]=(-0.107063589618)*x[0]**o+(-0.260491562358)*x[0]+(-0.667059815618)*x[1]**o+(0.473227354537)*x[1]+(-0.587170510558)*x[2]**o+(-0.740299218393)*x[2]
-        arg[1,0,1,1]=(0.87705715098)*x[0]**o+(0.312753471827)*x[0]+(-0.307530283315)*x[1]**o+(0.195564644822)*x[1]+(-0.64384485166)*x[2]**o+(-0.776362951729)*x[2]
-        arg[1,0,2,0]=(0.0949408564739)*x[0]**o+(0.765922179855)*x[0]+(0.441215568253)*x[1]**o+(0.339112969437)*x[1]+(-0.0774615292449)*x[2]**o+(0.673258055783)*x[2]
-        arg[1,0,2,1]=(0.114828212302)*x[0]**o+(0.0831258766277)*x[0]+(0.674540402248)*x[1]**o+(-0.304921039094)*x[1]+(-0.725514770578)*x[2]**o+(-0.627584773746)*x[2]
-        arg[1,1,0,0]=(0.291561714675)*x[0]**o+(0.898587624783)*x[0]+(0.476696264545)*x[1]**o+(-0.454648604978)*x[1]+(0.677949150743)*x[2]**o+(-0.59438289851)*x[2]
-        arg[1,1,0,1]=(0.356687258009)*x[0]**o+(0.806236251629)*x[0]+(0.843636690354)*x[1]**o+(-0.649776947181)*x[1]+(0.208542122388)*x[2]**o+(-0.0726045573458)*x[2]
-        arg[1,1,1,0]=(0.712800450558)*x[0]**o+(0.748271875755)*x[0]+(0.403880649356)*x[1]**o+(0.956549336754)*x[1]+(0.0420128495043)*x[2]**o+(-0.83177870499)*x[2]
-        arg[1,1,1,1]=(-0.886862904174)*x[0]**o+(-0.03822986594)*x[0]+(0.587151517496)*x[1]**o+(-0.120272060898)*x[1]+(-0.573366391933)*x[2]**o+(-0.59772763241)*x[2]
-        arg[1,1,2,0]=(0.311960197804)*x[0]**o+(0.486854949444)*x[0]+(-0.647995651954)*x[1]**o+(0.30104277964)*x[1]+(-0.174718703748)*x[2]**o+(-0.506993216295)*x[2]
-        arg[1,1,2,1]=(0.979056206991)*x[0]**o+(0.892104464812)*x[0]+(0.0507432703245)*x[1]**o+(0.103630858454)*x[1]+(-0.0254965952266)*x[2]**o+(0.13034027239)*x[2]
-        arg[1,2,0,0]=(0.259797966548)*x[0]**o+(0.53018999371)*x[0]+(0.533745722992)*x[1]**o+(0.53029084173)*x[1]+(-0.595126791061)*x[2]**o+(-0.51668295558)*x[2]
-        arg[1,2,0,1]=(0.926395590808)*x[0]**o+(-0.0700141207179)*x[0]+(-0.973392454012)*x[1]**o+(-0.46204067097)*x[1]+(0.814964497207)*x[2]**o+(-0.183546091376)*x[2]
-        arg[1,2,1,0]=(-0.0872635441658)*x[0]**o+(-0.0307630839035)*x[0]+(0.539798653095)*x[1]**o+(0.966367734848)*x[1]+(-0.817495053612)*x[2]**o+(-0.268397867848)*x[2]
-        arg[1,2,1,1]=(-0.933074613921)*x[0]**o+(0.48896533938)*x[0]+(0.453696133488)*x[1]**o+(-0.238730406749)*x[1]+(-0.696785951086)*x[2]**o+(-0.359858385642)*x[2]
-        arg[1,2,2,0]=(-0.844406286809)*x[0]**o+(-0.506332243946)*x[0]+(0.976436731658)*x[1]**o+(-0.201489161857)*x[1]+(0.851236173166)*x[2]**o+(-0.998803612947)*x[2]
-        arg[1,2,2,1]=(0.259707321449)*x[0]**o+(-0.888149478655)*x[0]+(-0.273502842869)*x[1]**o+(0.291193582158)*x[1]+(-0.897542178027)*x[2]**o+(-0.345994824429)*x[2]
-        arg[1,3,0,0]=(0.961298984697)*x[0]**o+(0.248141115092)*x[0]+(-0.623053025178)*x[1]**o+(-0.775095452078)*x[1]+(0.955362707049)*x[2]**o+(-0.517547333705)*x[2]
-        arg[1,3,0,1]=(0.858098596227)*x[0]**o+(0.309307483873)*x[0]+(-0.209217034755)*x[1]**o+(0.783803593379)*x[1]+(0.138164128092)*x[2]**o+(-0.922854003461)*x[2]
-        arg[1,3,1,0]=(-0.139017942141)*x[0]**o+(-0.338223039119)*x[0]+(0.737882941498)*x[1]**o+(0.948854903087)*x[1]+(-0.0792461633266)*x[2]**o+(0.848875660203)*x[2]
-        arg[1,3,1,1]=(0.693284332212)*x[0]**o+(-0.392272875348)*x[0]+(-0.475709045479)*x[1]**o+(0.182948077236)*x[1]+(0.0277569761538)*x[2]**o+(-0.550294947596)*x[2]
-        arg[1,3,2,0]=(-0.105381649505)*x[0]**o+(-0.403051690238)*x[0]+(-0.722219735818)*x[1]**o+(-0.380114388869)*x[1]+(0.321452572491)*x[2]**o+(0.858583245253)*x[2]
-        arg[1,3,2,1]=(-0.405370062024)*x[0]**o+(0.0743704840047)*x[0]+(0.998947017815)*x[1]**o+(0.983611079522)*x[1]+(0.854202982674)*x[2]**o+(0.288478746498)*x[2]
-        arg[1,4,0,0]=(0.0584782489998)*x[0]**o+(0.999286927604)*x[0]+(-0.458166020555)*x[1]**o+(0.529008844128)*x[1]+(0.424592641922)*x[2]**o+(-0.489692340187)*x[2]
-        arg[1,4,0,1]=(-0.150555966138)*x[0]**o+(0.362589320838)*x[0]+(0.515820915391)*x[1]**o+(0.742403661312)*x[1]+(0.230278843183)*x[2]**o+(-0.213977724366)*x[2]
-        arg[1,4,1,0]=(-0.361161802362)*x[0]**o+(-0.49718332222)*x[0]+(0.143956046197)*x[1]**o+(-0.044550912758)*x[1]+(-0.299892874708)*x[2]**o+(0.370248709792)*x[2]
-        arg[1,4,1,1]=(0.259365238173)*x[0]**o+(-0.474694548557)*x[0]+(0.732983396669)*x[1]**o+(-0.295151546774)*x[1]+(-0.337144628526)*x[2]**o+(0.664201775714)*x[2]
-        arg[1,4,2,0]=(-0.318016754284)*x[0]**o+(0.555291443852)*x[0]+(0.538150727998)*x[1]**o+(-0.800118353132)*x[1]+(0.652262386596)*x[2]**o+(0.303156645857)*x[2]
-        arg[1,4,2,1]=(0.0827142921796)*x[0]**o+(-0.88498648372)*x[0]+(-0.941249844349)*x[1]**o+(-0.162576659039)*x[1]+(0.867621252192)*x[2]**o+(0.0834583795227)*x[2]
-        arg[2,0,0,0]=(0.0670088199264)*x[0]**o+(-0.0425961894346)*x[0]+(0.329605789302)*x[1]**o+(0.860453156363)*x[1]+(-0.37410469727)*x[2]**o+(0.55476432384)*x[2]
-        arg[2,0,0,1]=(0.801738221879)*x[0]**o+(-0.836563530923)*x[0]+(-0.449651673142)*x[1]**o+(-0.19423133918)*x[1]+(0.947648200044)*x[2]**o+(0.0854067601423)*x[2]
-        arg[2,0,1,0]=(0.986595046855)*x[0]**o+(-0.358319352175)*x[0]+(0.493917713513)*x[1]**o+(-0.92052282445)*x[1]+(-0.692726467259)*x[2]**o+(-0.0636943737807)*x[2]
-        arg[2,0,1,1]=(0.38491150492)*x[0]**o+(0.766893245938)*x[0]+(0.420188917945)*x[1]**o+(0.43760538854)*x[1]+(-0.770749451981)*x[2]**o+(0.124882164378)*x[2]
-        arg[2,0,2,0]=(0.775715718797)*x[0]**o+(0.89516703208)*x[0]+(-0.829021524898)*x[1]**o+(-0.650262454311)*x[1]+(-0.812556336598)*x[2]**o+(-0.997075743997)*x[2]
-        arg[2,0,2,1]=(0.3503761008)*x[0]**o+(-0.822009897455)*x[0]+(-0.657657365354)*x[1]**o+(0.476295612156)*x[1]+(0.315554008711)*x[2]**o+(0.691631078049)*x[2]
-        arg[2,1,0,0]=(0.680177375433)*x[0]**o+(-0.922726813311)*x[0]+(-0.581116746321)*x[1]**o+(0.628138099343)*x[1]+(-0.568262800293)*x[2]**o+(-0.228201382395)*x[2]
-        arg[2,1,0,1]=(0.210094833324)*x[0]**o+(0.281549673876)*x[0]+(0.23785231073)*x[1]**o+(-0.103812455993)*x[1]+(0.530445971191)*x[2]**o+(-0.0830520449939)*x[2]
-        arg[2,1,1,0]=(0.367133297563)*x[0]**o+(0.168289954585)*x[0]+(0.614117392787)*x[1]**o+(0.790467766841)*x[1]+(-0.958002150805)*x[2]**o+(0.328916248824)*x[2]
-        arg[2,1,1,1]=(0.089535347231)*x[0]**o+(-0.93155993701)*x[0]+(-0.674670760794)*x[1]**o+(-0.274148261773)*x[1]+(-0.807020126056)*x[2]**o+(-0.323334769496)*x[2]
-        arg[2,1,2,0]=(-0.948679835219)*x[0]**o+(-0.577235742425)*x[0]+(-0.732584834146)*x[1]**o+(-0.475242504288)*x[1]+(0.213663223262)*x[2]**o+(-0.151401354381)*x[2]
-        arg[2,1,2,1]=(0.264513246206)*x[0]**o+(-0.605806437391)*x[0]+(-0.058730926693)*x[1]**o+(-0.661696304412)*x[1]+(-0.361277352457)*x[2]**o+(-0.804408258253)*x[2]
-        arg[2,2,0,0]=(-0.144562358054)*x[0]**o+(-0.0960550555725)*x[0]+(-0.905096867803)*x[1]**o+(0.188861784103)*x[1]+(-0.616751005568)*x[2]**o+(0.604711974248)*x[2]
-        arg[2,2,0,1]=(-0.0582524307858)*x[0]**o+(-0.503648879785)*x[0]+(-0.682755209956)*x[1]**o+(-0.808213164425)*x[1]+(0.539987276327)*x[2]**o+(0.650557703689)*x[2]
-        arg[2,2,1,0]=(0.0607729567733)*x[0]**o+(-0.498819638428)*x[0]+(0.434442595334)*x[1]**o+(-0.491063977603)*x[1]+(0.499436212229)*x[2]**o+(-0.932071991206)*x[2]
-        arg[2,2,1,1]=(-0.461295295294)*x[0]**o+(-0.153600767916)*x[0]+(-0.86452392231)*x[1]**o+(0.136760034153)*x[1]+(-0.471642416082)*x[2]**o+(0.453820403438)*x[2]
-        arg[2,2,2,0]=(-0.970051888584)*x[0]**o+(0.415728825057)*x[0]+(0.971643909569)*x[1]**o+(0.923719420524)*x[1]+(-0.837313513804)*x[2]**o+(-0.738057676093)*x[2]
-        arg[2,2,2,1]=(-0.941355918089)*x[0]**o+(-0.9629784524)*x[0]+(-0.931184348072)*x[1]**o+(0.720006097658)*x[1]+(-0.140750567978)*x[2]**o+(0.55381939119)*x[2]
-        arg[2,3,0,0]=(0.753455933669)*x[0]**o+(0.352384922037)*x[0]+(0.737644348002)*x[1]**o+(-0.565144188248)*x[1]+(0.257417624014)*x[2]**o+(-0.660006641683)*x[2]
-        arg[2,3,0,1]=(0.886996770925)*x[0]**o+(-0.876595418252)*x[0]+(-0.189778073871)*x[1]**o+(0.560867442336)*x[1]+(-0.262338156346)*x[2]**o+(0.614749098901)*x[2]
-        arg[2,3,1,0]=(-0.722912374016)*x[0]**o+(0.447451310273)*x[0]+(0.397510140568)*x[1]**o+(0.932405917932)*x[1]+(-0.206969252336)*x[2]**o+(-0.897366208888)*x[2]
-        arg[2,3,1,1]=(0.106324074547)*x[0]**o+(0.822109425884)*x[0]+(0.62699223277)*x[1]**o+(0.238371557839)*x[1]+(-0.422051841243)*x[2]**o+(0.868932130329)*x[2]
-        arg[2,3,2,0]=(0.0155790371581)*x[0]**o+(-0.696029577918)*x[0]+(0.259909585217)*x[1]**o+(0.260209121862)*x[1]+(0.780977081459)*x[2]**o+(-0.819957534538)*x[2]
-        arg[2,3,2,1]=(0.736223721904)*x[0]**o+(-0.433132598174)*x[0]+(-0.880913649812)*x[1]**o+(-0.375988777461)*x[1]+(-0.351763406307)*x[2]**o+(0.948468252467)*x[2]
-        arg[2,4,0,0]=(0.943349180556)*x[0]**o+(-0.720044514103)*x[0]+(0.671900161807)*x[1]**o+(0.358571142942)*x[1]+(-0.132755998648)*x[2]**o+(0.0749815044365)*x[2]
-        arg[2,4,0,1]=(0.639070752347)*x[0]**o+(0.551441363406)*x[0]+(0.507547844432)*x[1]**o+(-0.800043772307)*x[1]+(-0.506359503394)*x[2]**o+(0.952191432651)*x[2]
-        arg[2,4,1,0]=(-0.655864732254)*x[0]**o+(0.142198390642)*x[0]+(0.075292486702)*x[1]**o+(0.191013189029)*x[1]+(0.106768453247)*x[2]**o+(0.974526515449)*x[2]
-        arg[2,4,1,1]=(-0.354750205648)*x[0]**o+(0.141506849368)*x[0]+(-0.170074898141)*x[1]**o+(-0.0882776529335)*x[1]+(0.845254802876)*x[2]**o+(-0.435414692125)*x[2]
-        arg[2,4,2,0]=(-0.412836027163)*x[0]**o+(0.830777132582)*x[0]+(-0.87554952236)*x[1]**o+(0.970647516313)*x[1]+(0.989864827286)*x[2]**o+(-0.67790755421)*x[2]
-        arg[2,4,2,1]=(0.762907045031)*x[0]**o+(0.140771931118)*x[0]+(0.716859940142)*x[1]**o+(0.151769314189)*x[1]+(-0.812408853675)*x[2]**o+(0.755727078666)*x[2]
-        arg[3,0,0,0]=(-0.13358237438)*x[0]**o+(-0.594735856789)*x[0]+(-0.367418402298)*x[1]**o+(0.5349162872)*x[1]+(0.238285320118)*x[2]**o+(0.999627906459)*x[2]
-        arg[3,0,0,1]=(-0.537433369218)*x[0]**o+(0.133034652667)*x[0]+(-0.190302464596)*x[1]**o+(0.869919012762)*x[1]+(0.320294306008)*x[2]**o+(0.865908856629)*x[2]
-        arg[3,0,1,0]=(0.480851043043)*x[0]**o+(0.833358259022)*x[0]+(0.893051476621)*x[1]**o+(-0.505255581199)*x[1]+(-0.15316145317)*x[2]**o+(-0.937103563776)*x[2]
-        arg[3,0,1,1]=(0.765360137605)*x[0]**o+(0.502399552842)*x[0]+(-0.215707512276)*x[1]**o+(-0.402720816967)*x[1]+(0.231360098578)*x[2]**o+(0.732903327067)*x[2]
-        arg[3,0,2,0]=(0.120836669045)*x[0]**o+(0.198346794548)*x[0]+(-0.28708447536)*x[1]**o+(0.289672075353)*x[1]+(-0.0305777738322)*x[2]**o+(-0.0686651569373)*x[2]
-        arg[3,0,2,1]=(0.0574598844614)*x[0]**o+(0.031092492399)*x[0]+(-0.406805507341)*x[1]**o+(-0.623370509947)*x[1]+(-0.476094160966)*x[2]**o+(0.0840271758875)*x[2]
-        arg[3,1,0,0]=(-0.569415249126)*x[0]**o+(-0.339675540399)*x[0]+(0.182536980707)*x[1]**o+(0.727480200453)*x[1]+(0.851672551504)*x[2]**o+(0.817312313075)*x[2]
-        arg[3,1,0,1]=(0.921422642904)*x[0]**o+(0.697656143906)*x[0]+(0.969442847752)*x[1]**o+(-0.00957994710064)*x[1]+(-0.315230556399)*x[2]**o+(-0.870759158384)*x[2]
-        arg[3,1,1,0]=(-0.813310465463)*x[0]**o+(-0.809362802903)*x[0]+(-0.0685101056428)*x[1]**o+(0.708195651847)*x[1]+(-0.876449456312)*x[2]**o+(0.882503536479)*x[2]
-        arg[3,1,1,1]=(-0.277504922905)*x[0]**o+(-0.819428706347)*x[0]+(0.463203258731)*x[1]**o+(0.597493096401)*x[1]+(0.630522187524)*x[2]**o+(0.92480079466)*x[2]
-        arg[3,1,2,0]=(-0.703167803764)*x[0]**o+(0.730459205382)*x[0]+(-0.507036921123)*x[1]**o+(0.419358545765)*x[1]+(-0.542758923679)*x[2]**o+(0.831844312917)*x[2]
-        arg[3,1,2,1]=(0.135200299704)*x[0]**o+(-0.160734675188)*x[0]+(-0.893851689192)*x[1]**o+(0.748734906185)*x[1]+(0.970464447167)*x[2]**o+(0.277911376757)*x[2]
-        arg[3,2,0,0]=(0.750104328784)*x[0]**o+(-0.818350593893)*x[0]+(-0.749900854281)*x[1]**o+(0.289117653816)*x[1]+(-0.219904822162)*x[2]**o+(0.805208050452)*x[2]
-        arg[3,2,0,1]=(-0.129614389749)*x[0]**o+(-0.64067443816)*x[0]+(0.513013650233)*x[1]**o+(0.868869035341)*x[1]+(-0.040145121639)*x[2]**o+(-0.282350136119)*x[2]
-        arg[3,2,1,0]=(-0.172814929104)*x[0]**o+(-0.296930471915)*x[0]+(-0.796114111585)*x[1]**o+(-0.210181080249)*x[1]+(-0.606107841173)*x[2]**o+(-0.954329084175)*x[2]
-        arg[3,2,1,1]=(0.136149261959)*x[0]**o+(-0.613980696755)*x[0]+(0.968430714778)*x[1]**o+(0.683553952099)*x[1]+(-0.321383789121)*x[2]**o+(-0.139570984234)*x[2]
-        arg[3,2,2,0]=(-0.273321720654)*x[0]**o+(0.963651110162)*x[0]+(-0.847402611499)*x[1]**o+(0.237131262905)*x[1]+(-0.617296821558)*x[2]**o+(-0.681856394629)*x[2]
-        arg[3,2,2,1]=(-0.760071928624)*x[0]**o+(0.0345053779755)*x[0]+(-0.583680069732)*x[1]**o+(0.150497658077)*x[1]+(0.0257096621429)*x[2]**o+(-0.159406203385)*x[2]
-        arg[3,3,0,0]=(-0.0668501746947)*x[0]**o+(-0.183645899611)*x[0]+(0.123667845765)*x[1]**o+(0.0928142420352)*x[1]+(-0.933250766317)*x[2]**o+(-0.629986949639)*x[2]
-        arg[3,3,0,1]=(-0.0212790928206)*x[0]**o+(0.444036360325)*x[0]+(0.09182358127)*x[1]**o+(0.473088563672)*x[1]+(0.0852925382953)*x[2]**o+(-0.238517929786)*x[2]
-        arg[3,3,1,0]=(0.0647235093728)*x[0]**o+(-0.266285898716)*x[0]+(0.944999560866)*x[1]**o+(-0.757696716486)*x[1]+(-0.439165278732)*x[2]**o+(0.960091479774)*x[2]
-        arg[3,3,1,1]=(-0.792249238894)*x[0]**o+(-0.568585439587)*x[0]+(-0.0426655335607)*x[1]**o+(0.980004032206)*x[1]+(0.635227812889)*x[2]**o+(0.6687165384)*x[2]
-        arg[3,3,2,0]=(0.340468442769)*x[0]**o+(0.791071154735)*x[0]+(-0.817919975547)*x[1]**o+(0.0328383066982)*x[1]+(-0.323093904705)*x[2]**o+(-0.302641620002)*x[2]
-        arg[3,3,2,1]=(-0.476501733213)*x[0]**o+(-0.429845943537)*x[0]+(0.518551215268)*x[1]**o+(-0.551690143654)*x[1]+(0.591983049997)*x[2]**o+(0.586292683497)*x[2]
-        arg[3,4,0,0]=(0.119036526248)*x[0]**o+(-0.156404044048)*x[0]+(0.158504048681)*x[1]**o+(-0.3779600709)*x[1]+(-0.362107671534)*x[2]**o+(-0.314508628804)*x[2]
-        arg[3,4,0,1]=(0.382011103106)*x[0]**o+(-0.123711676964)*x[0]+(-0.939014457264)*x[1]**o+(-0.5986155807)*x[1]+(-0.852092491566)*x[2]**o+(-0.410438924788)*x[2]
-        arg[3,4,1,0]=(0.83612586535)*x[0]**o+(-0.606098645092)*x[0]+(0.643469717148)*x[1]**o+(0.845106525654)*x[1]+(0.347455649691)*x[2]**o+(-0.166796580458)*x[2]
-        arg[3,4,1,1]=(0.693431758156)*x[0]**o+(-0.313983401147)*x[0]+(-0.862690834893)*x[1]**o+(0.417233988055)*x[1]+(-0.361769997589)*x[2]**o+(-0.22749888397)*x[2]
-        arg[3,4,2,0]=(0.680358405387)*x[0]**o+(-0.786041842215)*x[0]+(0.288823579415)*x[1]**o+(-0.961099851196)*x[1]+(0.669431785695)*x[2]**o+(0.956564160268)*x[2]
-        arg[3,4,2,1]=(-0.21416500005)*x[0]**o+(0.48495191486)*x[0]+(-0.173465452645)*x[1]**o+(0.662530321557)*x[1]+(0.984573283824)*x[2]**o+(-0.568211383785)*x[2]
-        ref[0,0,0,0]=(-0.615899511086)*x_ref[0]**o+(0.823637401824)*x_ref[0]+(-0.986967740198)*x_ref[1]**o+(-0.782088977641)*x_ref[1]+(-0.576799974679)*x_ref[2]**o+(-0.910942885711)*x_ref[2]
-        ref[0,0,0,1]=(-0.790830593449)*x_ref[0]**o+(-0.897724279499)*x_ref[0]+(-0.881691805807)*x_ref[1]**o+(-0.133793238901)*x_ref[1]+(-0.0903391684489)*x_ref[2]**o+(0.659893469877)*x_ref[2]
-        ref[0,0,1,0]=(-0.0567117900114)*x_ref[0]**o+(-0.858031985686)*x_ref[0]+(-0.397443445702)*x_ref[1]**o+(0.549982838823)*x_ref[1]+(-0.636905143813)*x_ref[2]**o+(0.8488142632)*x_ref[2]
-        ref[0,0,1,1]=(-0.644557373082)*x_ref[0]**o+(-0.323654898522)*x_ref[0]+(0.210458705923)*x_ref[1]**o+(0.990436827296)*x_ref[1]+(-0.597872757151)*x_ref[2]**o+(-0.83865548618)*x_ref[2]
-        ref[0,0,2,0]=(-0.29830667084)*x_ref[0]**o+(0.327035546909)*x_ref[0]+(0.132690049791)*x_ref[1]**o+(-0.55625443282)*x_ref[1]+(0.0972781385283)*x_ref[2]**o+(0.151885837608)*x_ref[2]
-        ref[0,0,2,1]=(-0.435983465578)*x_ref[0]**o+(-0.0852522953446)*x_ref[0]+(0.257654807094)*x_ref[1]**o+(-0.336603197583)*x_ref[1]+(0.637913421592)*x_ref[2]**o+(0.8151042055)*x_ref[2]
-        ref[0,1,0,0]=(-0.0373980191125)*x_ref[0]**o+(-0.45937285505)*x_ref[0]+(-0.857933684889)*x_ref[1]**o+(-0.843826686256)*x_ref[1]+(-0.727077320504)*x_ref[2]**o+(-0.65222863395)*x_ref[2]
-        ref[0,1,0,1]=(0.63426017384)*x_ref[0]**o+(0.845708641601)*x_ref[0]+(0.246160302486)*x_ref[1]**o+(-0.660855572094)*x_ref[1]+(0.67420981328)*x_ref[2]**o+(-0.280803968781)*x_ref[2]
-        ref[0,1,1,0]=(0.881193264597)*x_ref[0]**o+(-0.881936969515)*x_ref[0]+(-0.883246837152)*x_ref[1]**o+(0.182222471927)*x_ref[1]+(0.405380496272)*x_ref[2]**o+(0.175721746883)*x_ref[2]
-        ref[0,1,1,1]=(-0.44447667237)*x_ref[0]**o+(0.956169274606)*x_ref[0]+(0.0370532940652)*x_ref[1]**o+(-0.181239635583)*x_ref[1]+(-0.678412161285)*x_ref[2]**o+(-0.653172157401)*x_ref[2]
-        ref[0,1,2,0]=(-0.50038634718)*x_ref[0]**o+(0.00278321765167)*x_ref[0]+(-0.831539460218)*x_ref[1]**o+(-0.555243320385)*x_ref[1]+(-0.626789452003)*x_ref[2]**o+(-0.495085243933)*x_ref[2]
-        ref[0,1,2,1]=(-0.32886359569)*x_ref[0]**o+(0.406099965475)*x_ref[0]+(0.764756177266)*x_ref[1]**o+(-0.272070344181)*x_ref[1]+(-0.41812596516)*x_ref[2]**o+(0.349063696376)*x_ref[2]
-        ref[0,2,0,0]=(-0.580544978365)*x_ref[0]**o+(0.53441241334)*x_ref[0]+(-0.808749795876)*x_ref[1]**o+(0.172110801632)*x_ref[1]+(-0.939262606098)*x_ref[2]**o+(-0.724859325104)*x_ref[2]
-        ref[0,2,0,1]=(0.256335221944)*x_ref[0]**o+(0.463522371018)*x_ref[0]+(0.990516478508)*x_ref[1]**o+(0.423931177054)*x_ref[1]+(0.184277693683)*x_ref[2]**o+(-0.272967447689)*x_ref[2]
-        ref[0,2,1,0]=(-0.126943811008)*x_ref[0]**o+(0.645821387926)*x_ref[0]+(0.150370174987)*x_ref[1]**o+(-0.150954538301)*x_ref[1]+(-0.378720078559)*x_ref[2]**o+(0.0975963807109)*x_ref[2]
-        ref[0,2,1,1]=(-0.451434544339)*x_ref[0]**o+(0.557314109088)*x_ref[0]+(-0.0402970749558)*x_ref[1]**o+(0.306984557206)*x_ref[1]+(-0.297018139186)*x_ref[2]**o+(0.593800698785)*x_ref[2]
-        ref[0,2,2,0]=(-0.376199144911)*x_ref[0]**o+(-0.230454116373)*x_ref[0]+(0.992738297651)*x_ref[1]**o+(0.183510534927)*x_ref[1]+(0.409381711992)*x_ref[2]**o+(0.171945265727)*x_ref[2]
-        ref[0,2,2,1]=(0.363233095971)*x_ref[0]**o+(-0.130589148249)*x_ref[0]+(0.809611042018)*x_ref[1]**o+(-0.354546307961)*x_ref[1]+(0.0631410169203)*x_ref[2]**o+(0.630306161781)*x_ref[2]
-        ref[0,3,0,0]=(0.49655016161)*x_ref[0]**o+(0.878957258614)*x_ref[0]+(-0.397408696784)*x_ref[1]**o+(-0.199445321288)*x_ref[1]+(0.929857086663)*x_ref[2]**o+(-0.648770887161)*x_ref[2]
-        ref[0,3,0,1]=(-0.85578334594)*x_ref[0]**o+(-0.294617109229)*x_ref[0]+(-0.0790295769768)*x_ref[1]**o+(0.82151942311)*x_ref[1]+(0.541628117444)*x_ref[2]**o+(0.805418174827)*x_ref[2]
-        ref[0,3,1,0]=(0.800775454804)*x_ref[0]**o+(0.599550462983)*x_ref[0]+(-0.384788634082)*x_ref[1]**o+(-0.356933972363)*x_ref[1]+(-0.423116265473)*x_ref[2]**o+(-0.125492982003)*x_ref[2]
-        ref[0,3,1,1]=(0.929652994661)*x_ref[0]**o+(-0.57396682406)*x_ref[0]+(0.313584116036)*x_ref[1]**o+(-0.190575043496)*x_ref[1]+(-0.29110884935)*x_ref[2]**o+(0.967530639925)*x_ref[2]
-        ref[0,3,2,0]=(0.761136478868)*x_ref[0]**o+(0.565721170014)*x_ref[0]+(0.239619122131)*x_ref[1]**o+(-0.0821651979956)*x_ref[1]+(-0.699218775545)*x_ref[2]**o+(0.19973415585)*x_ref[2]
-        ref[0,3,2,1]=(0.209543244648)*x_ref[0]**o+(0.93957796874)*x_ref[0]+(0.354405887426)*x_ref[1]**o+(0.504177262864)*x_ref[1]+(0.446866674894)*x_ref[2]**o+(-0.522936485464)*x_ref[2]
-        ref[0,4,0,0]=(0.427541399652)*x_ref[0]**o+(-0.114806067206)*x_ref[0]+(0.236780877643)*x_ref[1]**o+(0.422226381272)*x_ref[1]+(-0.506450961214)*x_ref[2]**o+(0.616091720212)*x_ref[2]
-        ref[0,4,0,1]=(0.698773571323)*x_ref[0]**o+(-0.357878713085)*x_ref[0]+(-0.453730359129)*x_ref[1]**o+(-0.328701041355)*x_ref[1]+(-0.28646346679)*x_ref[2]**o+(-0.0449784265203)*x_ref[2]
-        ref[0,4,1,0]=(-0.419416306509)*x_ref[0]**o+(-0.1970394955)*x_ref[0]+(-0.814008932379)*x_ref[1]**o+(-0.805127589929)*x_ref[1]+(0.244059789875)*x_ref[2]**o+(-0.983027843847)*x_ref[2]
-        ref[0,4,1,1]=(0.84837346004)*x_ref[0]**o+(0.501808510624)*x_ref[0]+(-0.105800351358)*x_ref[1]**o+(0.903999231718)*x_ref[1]+(-0.0473996978124)*x_ref[2]**o+(0.683647253381)*x_ref[2]
-        ref[0,4,2,0]=(0.658722899682)*x_ref[0]**o+(-0.401846635016)*x_ref[0]+(-0.967322202581)*x_ref[1]**o+(-0.948306922217)*x_ref[1]+(0.496409308219)*x_ref[2]**o+(-0.184768777052)*x_ref[2]
-        ref[0,4,2,1]=(-0.454468390888)*x_ref[0]**o+(-0.220640468215)*x_ref[0]+(0.995269925943)*x_ref[1]**o+(0.778951329211)*x_ref[1]+(0.0439534466302)*x_ref[2]**o+(0.806197038383)*x_ref[2]
-        ref[1,0,0,0]=(-0.547461802236)*x_ref[0]**o+(0.370768827789)*x_ref[0]+(-0.619991757552)*x_ref[1]**o+(0.391727195645)*x_ref[1]+(-0.649274922953)*x_ref[2]**o+(-0.478788248429)*x_ref[2]
-        ref[1,0,0,1]=(-0.899230505882)*x_ref[0]**o+(0.603064321735)*x_ref[0]+(-0.737475386349)*x_ref[1]**o+(0.594197953001)*x_ref[1]+(0.341324049064)*x_ref[2]**o+(0.285202633917)*x_ref[2]
-        ref[1,0,1,0]=(-0.107063589618)*x_ref[0]**o+(-0.260491562358)*x_ref[0]+(-0.667059815618)*x_ref[1]**o+(0.473227354537)*x_ref[1]+(-0.587170510558)*x_ref[2]**o+(-0.740299218393)*x_ref[2]
-        ref[1,0,1,1]=(0.87705715098)*x_ref[0]**o+(0.312753471827)*x_ref[0]+(-0.307530283315)*x_ref[1]**o+(0.195564644822)*x_ref[1]+(-0.64384485166)*x_ref[2]**o+(-0.776362951729)*x_ref[2]
-        ref[1,0,2,0]=(0.0949408564739)*x_ref[0]**o+(0.765922179855)*x_ref[0]+(0.441215568253)*x_ref[1]**o+(0.339112969437)*x_ref[1]+(-0.0774615292449)*x_ref[2]**o+(0.673258055783)*x_ref[2]
-        ref[1,0,2,1]=(0.114828212302)*x_ref[0]**o+(0.0831258766277)*x_ref[0]+(0.674540402248)*x_ref[1]**o+(-0.304921039094)*x_ref[1]+(-0.725514770578)*x_ref[2]**o+(-0.627584773746)*x_ref[2]
-        ref[1,1,0,0]=(0.291561714675)*x_ref[0]**o+(0.898587624783)*x_ref[0]+(0.476696264545)*x_ref[1]**o+(-0.454648604978)*x_ref[1]+(0.677949150743)*x_ref[2]**o+(-0.59438289851)*x_ref[2]
-        ref[1,1,0,1]=(0.356687258009)*x_ref[0]**o+(0.806236251629)*x_ref[0]+(0.843636690354)*x_ref[1]**o+(-0.649776947181)*x_ref[1]+(0.208542122388)*x_ref[2]**o+(-0.0726045573458)*x_ref[2]
-        ref[1,1,1,0]=(0.712800450558)*x_ref[0]**o+(0.748271875755)*x_ref[0]+(0.403880649356)*x_ref[1]**o+(0.956549336754)*x_ref[1]+(0.0420128495043)*x_ref[2]**o+(-0.83177870499)*x_ref[2]
-        ref[1,1,1,1]=(-0.886862904174)*x_ref[0]**o+(-0.03822986594)*x_ref[0]+(0.587151517496)*x_ref[1]**o+(-0.120272060898)*x_ref[1]+(-0.573366391933)*x_ref[2]**o+(-0.59772763241)*x_ref[2]
-        ref[1,1,2,0]=(0.311960197804)*x_ref[0]**o+(0.486854949444)*x_ref[0]+(-0.647995651954)*x_ref[1]**o+(0.30104277964)*x_ref[1]+(-0.174718703748)*x_ref[2]**o+(-0.506993216295)*x_ref[2]
-        ref[1,1,2,1]=(0.979056206991)*x_ref[0]**o+(0.892104464812)*x_ref[0]+(0.0507432703245)*x_ref[1]**o+(0.103630858454)*x_ref[1]+(-0.0254965952266)*x_ref[2]**o+(0.13034027239)*x_ref[2]
-        ref[1,2,0,0]=(0.259797966548)*x_ref[0]**o+(0.53018999371)*x_ref[0]+(0.533745722992)*x_ref[1]**o+(0.53029084173)*x_ref[1]+(-0.595126791061)*x_ref[2]**o+(-0.51668295558)*x_ref[2]
-        ref[1,2,0,1]=(0.926395590808)*x_ref[0]**o+(-0.0700141207179)*x_ref[0]+(-0.973392454012)*x_ref[1]**o+(-0.46204067097)*x_ref[1]+(0.814964497207)*x_ref[2]**o+(-0.183546091376)*x_ref[2]
-        ref[1,2,1,0]=(-0.0872635441658)*x_ref[0]**o+(-0.0307630839035)*x_ref[0]+(0.539798653095)*x_ref[1]**o+(0.966367734848)*x_ref[1]+(-0.817495053612)*x_ref[2]**o+(-0.268397867848)*x_ref[2]
-        ref[1,2,1,1]=(-0.933074613921)*x_ref[0]**o+(0.48896533938)*x_ref[0]+(0.453696133488)*x_ref[1]**o+(-0.238730406749)*x_ref[1]+(-0.696785951086)*x_ref[2]**o+(-0.359858385642)*x_ref[2]
-        ref[1,2,2,0]=(-0.844406286809)*x_ref[0]**o+(-0.506332243946)*x_ref[0]+(0.976436731658)*x_ref[1]**o+(-0.201489161857)*x_ref[1]+(0.851236173166)*x_ref[2]**o+(-0.998803612947)*x_ref[2]
-        ref[1,2,2,1]=(0.259707321449)*x_ref[0]**o+(-0.888149478655)*x_ref[0]+(-0.273502842869)*x_ref[1]**o+(0.291193582158)*x_ref[1]+(-0.897542178027)*x_ref[2]**o+(-0.345994824429)*x_ref[2]
-        ref[1,3,0,0]=(0.961298984697)*x_ref[0]**o+(0.248141115092)*x_ref[0]+(-0.623053025178)*x_ref[1]**o+(-0.775095452078)*x_ref[1]+(0.955362707049)*x_ref[2]**o+(-0.517547333705)*x_ref[2]
-        ref[1,3,0,1]=(0.858098596227)*x_ref[0]**o+(0.309307483873)*x_ref[0]+(-0.209217034755)*x_ref[1]**o+(0.783803593379)*x_ref[1]+(0.138164128092)*x_ref[2]**o+(-0.922854003461)*x_ref[2]
-        ref[1,3,1,0]=(-0.139017942141)*x_ref[0]**o+(-0.338223039119)*x_ref[0]+(0.737882941498)*x_ref[1]**o+(0.948854903087)*x_ref[1]+(-0.0792461633266)*x_ref[2]**o+(0.848875660203)*x_ref[2]
-        ref[1,3,1,1]=(0.693284332212)*x_ref[0]**o+(-0.392272875348)*x_ref[0]+(-0.475709045479)*x_ref[1]**o+(0.182948077236)*x_ref[1]+(0.0277569761538)*x_ref[2]**o+(-0.550294947596)*x_ref[2]
-        ref[1,3,2,0]=(-0.105381649505)*x_ref[0]**o+(-0.403051690238)*x_ref[0]+(-0.722219735818)*x_ref[1]**o+(-0.380114388869)*x_ref[1]+(0.321452572491)*x_ref[2]**o+(0.858583245253)*x_ref[2]
-        ref[1,3,2,1]=(-0.405370062024)*x_ref[0]**o+(0.0743704840047)*x_ref[0]+(0.998947017815)*x_ref[1]**o+(0.983611079522)*x_ref[1]+(0.854202982674)*x_ref[2]**o+(0.288478746498)*x_ref[2]
-        ref[1,4,0,0]=(0.0584782489998)*x_ref[0]**o+(0.999286927604)*x_ref[0]+(-0.458166020555)*x_ref[1]**o+(0.529008844128)*x_ref[1]+(0.424592641922)*x_ref[2]**o+(-0.489692340187)*x_ref[2]
-        ref[1,4,0,1]=(-0.150555966138)*x_ref[0]**o+(0.362589320838)*x_ref[0]+(0.515820915391)*x_ref[1]**o+(0.742403661312)*x_ref[1]+(0.230278843183)*x_ref[2]**o+(-0.213977724366)*x_ref[2]
-        ref[1,4,1,0]=(-0.361161802362)*x_ref[0]**o+(-0.49718332222)*x_ref[0]+(0.143956046197)*x_ref[1]**o+(-0.044550912758)*x_ref[1]+(-0.299892874708)*x_ref[2]**o+(0.370248709792)*x_ref[2]
-        ref[1,4,1,1]=(0.259365238173)*x_ref[0]**o+(-0.474694548557)*x_ref[0]+(0.732983396669)*x_ref[1]**o+(-0.295151546774)*x_ref[1]+(-0.337144628526)*x_ref[2]**o+(0.664201775714)*x_ref[2]
-        ref[1,4,2,0]=(-0.318016754284)*x_ref[0]**o+(0.555291443852)*x_ref[0]+(0.538150727998)*x_ref[1]**o+(-0.800118353132)*x_ref[1]+(0.652262386596)*x_ref[2]**o+(0.303156645857)*x_ref[2]
-        ref[1,4,2,1]=(0.0827142921796)*x_ref[0]**o+(-0.88498648372)*x_ref[0]+(-0.941249844349)*x_ref[1]**o+(-0.162576659039)*x_ref[1]+(0.867621252192)*x_ref[2]**o+(0.0834583795227)*x_ref[2]
-        ref[2,0,0,0]=(0.0670088199264)*x_ref[0]**o+(-0.0425961894346)*x_ref[0]+(0.329605789302)*x_ref[1]**o+(0.860453156363)*x_ref[1]+(-0.37410469727)*x_ref[2]**o+(0.55476432384)*x_ref[2]
-        ref[2,0,0,1]=(0.801738221879)*x_ref[0]**o+(-0.836563530923)*x_ref[0]+(-0.449651673142)*x_ref[1]**o+(-0.19423133918)*x_ref[1]+(0.947648200044)*x_ref[2]**o+(0.0854067601423)*x_ref[2]
-        ref[2,0,1,0]=(0.986595046855)*x_ref[0]**o+(-0.358319352175)*x_ref[0]+(0.493917713513)*x_ref[1]**o+(-0.92052282445)*x_ref[1]+(-0.692726467259)*x_ref[2]**o+(-0.0636943737807)*x_ref[2]
-        ref[2,0,1,1]=(0.38491150492)*x_ref[0]**o+(0.766893245938)*x_ref[0]+(0.420188917945)*x_ref[1]**o+(0.43760538854)*x_ref[1]+(-0.770749451981)*x_ref[2]**o+(0.124882164378)*x_ref[2]
-        ref[2,0,2,0]=(0.775715718797)*x_ref[0]**o+(0.89516703208)*x_ref[0]+(-0.829021524898)*x_ref[1]**o+(-0.650262454311)*x_ref[1]+(-0.812556336598)*x_ref[2]**o+(-0.997075743997)*x_ref[2]
-        ref[2,0,2,1]=(0.3503761008)*x_ref[0]**o+(-0.822009897455)*x_ref[0]+(-0.657657365354)*x_ref[1]**o+(0.476295612156)*x_ref[1]+(0.315554008711)*x_ref[2]**o+(0.691631078049)*x_ref[2]
-        ref[2,1,0,0]=(0.680177375433)*x_ref[0]**o+(-0.922726813311)*x_ref[0]+(-0.581116746321)*x_ref[1]**o+(0.628138099343)*x_ref[1]+(-0.568262800293)*x_ref[2]**o+(-0.228201382395)*x_ref[2]
-        ref[2,1,0,1]=(0.210094833324)*x_ref[0]**o+(0.281549673876)*x_ref[0]+(0.23785231073)*x_ref[1]**o+(-0.103812455993)*x_ref[1]+(0.530445971191)*x_ref[2]**o+(-0.0830520449939)*x_ref[2]
-        ref[2,1,1,0]=(0.367133297563)*x_ref[0]**o+(0.168289954585)*x_ref[0]+(0.614117392787)*x_ref[1]**o+(0.790467766841)*x_ref[1]+(-0.958002150805)*x_ref[2]**o+(0.328916248824)*x_ref[2]
-        ref[2,1,1,1]=(0.089535347231)*x_ref[0]**o+(-0.93155993701)*x_ref[0]+(-0.674670760794)*x_ref[1]**o+(-0.274148261773)*x_ref[1]+(-0.807020126056)*x_ref[2]**o+(-0.323334769496)*x_ref[2]
-        ref[2,1,2,0]=(-0.948679835219)*x_ref[0]**o+(-0.577235742425)*x_ref[0]+(-0.732584834146)*x_ref[1]**o+(-0.475242504288)*x_ref[1]+(0.213663223262)*x_ref[2]**o+(-0.151401354381)*x_ref[2]
-        ref[2,1,2,1]=(0.264513246206)*x_ref[0]**o+(-0.605806437391)*x_ref[0]+(-0.058730926693)*x_ref[1]**o+(-0.661696304412)*x_ref[1]+(-0.361277352457)*x_ref[2]**o+(-0.804408258253)*x_ref[2]
-        ref[2,2,0,0]=(-0.144562358054)*x_ref[0]**o+(-0.0960550555725)*x_ref[0]+(-0.905096867803)*x_ref[1]**o+(0.188861784103)*x_ref[1]+(-0.616751005568)*x_ref[2]**o+(0.604711974248)*x_ref[2]
-        ref[2,2,0,1]=(-0.0582524307858)*x_ref[0]**o+(-0.503648879785)*x_ref[0]+(-0.682755209956)*x_ref[1]**o+(-0.808213164425)*x_ref[1]+(0.539987276327)*x_ref[2]**o+(0.650557703689)*x_ref[2]
-        ref[2,2,1,0]=(0.0607729567733)*x_ref[0]**o+(-0.498819638428)*x_ref[0]+(0.434442595334)*x_ref[1]**o+(-0.491063977603)*x_ref[1]+(0.499436212229)*x_ref[2]**o+(-0.932071991206)*x_ref[2]
-        ref[2,2,1,1]=(-0.461295295294)*x_ref[0]**o+(-0.153600767916)*x_ref[0]+(-0.86452392231)*x_ref[1]**o+(0.136760034153)*x_ref[1]+(-0.471642416082)*x_ref[2]**o+(0.453820403438)*x_ref[2]
-        ref[2,2,2,0]=(-0.970051888584)*x_ref[0]**o+(0.415728825057)*x_ref[0]+(0.971643909569)*x_ref[1]**o+(0.923719420524)*x_ref[1]+(-0.837313513804)*x_ref[2]**o+(-0.738057676093)*x_ref[2]
-        ref[2,2,2,1]=(-0.941355918089)*x_ref[0]**o+(-0.9629784524)*x_ref[0]+(-0.931184348072)*x_ref[1]**o+(0.720006097658)*x_ref[1]+(-0.140750567978)*x_ref[2]**o+(0.55381939119)*x_ref[2]
-        ref[2,3,0,0]=(0.753455933669)*x_ref[0]**o+(0.352384922037)*x_ref[0]+(0.737644348002)*x_ref[1]**o+(-0.565144188248)*x_ref[1]+(0.257417624014)*x_ref[2]**o+(-0.660006641683)*x_ref[2]
-        ref[2,3,0,1]=(0.886996770925)*x_ref[0]**o+(-0.876595418252)*x_ref[0]+(-0.189778073871)*x_ref[1]**o+(0.560867442336)*x_ref[1]+(-0.262338156346)*x_ref[2]**o+(0.614749098901)*x_ref[2]
-        ref[2,3,1,0]=(-0.722912374016)*x_ref[0]**o+(0.447451310273)*x_ref[0]+(0.397510140568)*x_ref[1]**o+(0.932405917932)*x_ref[1]+(-0.206969252336)*x_ref[2]**o+(-0.897366208888)*x_ref[2]
-        ref[2,3,1,1]=(0.106324074547)*x_ref[0]**o+(0.822109425884)*x_ref[0]+(0.62699223277)*x_ref[1]**o+(0.238371557839)*x_ref[1]+(-0.422051841243)*x_ref[2]**o+(0.868932130329)*x_ref[2]
-        ref[2,3,2,0]=(0.0155790371581)*x_ref[0]**o+(-0.696029577918)*x_ref[0]+(0.259909585217)*x_ref[1]**o+(0.260209121862)*x_ref[1]+(0.780977081459)*x_ref[2]**o+(-0.819957534538)*x_ref[2]
-        ref[2,3,2,1]=(0.736223721904)*x_ref[0]**o+(-0.433132598174)*x_ref[0]+(-0.880913649812)*x_ref[1]**o+(-0.375988777461)*x_ref[1]+(-0.351763406307)*x_ref[2]**o+(0.948468252467)*x_ref[2]
-        ref[2,4,0,0]=(0.943349180556)*x_ref[0]**o+(-0.720044514103)*x_ref[0]+(0.671900161807)*x_ref[1]**o+(0.358571142942)*x_ref[1]+(-0.132755998648)*x_ref[2]**o+(0.0749815044365)*x_ref[2]
-        ref[2,4,0,1]=(0.639070752347)*x_ref[0]**o+(0.551441363406)*x_ref[0]+(0.507547844432)*x_ref[1]**o+(-0.800043772307)*x_ref[1]+(-0.506359503394)*x_ref[2]**o+(0.952191432651)*x_ref[2]
-        ref[2,4,1,0]=(-0.655864732254)*x_ref[0]**o+(0.142198390642)*x_ref[0]+(0.075292486702)*x_ref[1]**o+(0.191013189029)*x_ref[1]+(0.106768453247)*x_ref[2]**o+(0.974526515449)*x_ref[2]
-        ref[2,4,1,1]=(-0.354750205648)*x_ref[0]**o+(0.141506849368)*x_ref[0]+(-0.170074898141)*x_ref[1]**o+(-0.0882776529335)*x_ref[1]+(0.845254802876)*x_ref[2]**o+(-0.435414692125)*x_ref[2]
-        ref[2,4,2,0]=(-0.412836027163)*x_ref[0]**o+(0.830777132582)*x_ref[0]+(-0.87554952236)*x_ref[1]**o+(0.970647516313)*x_ref[1]+(0.989864827286)*x_ref[2]**o+(-0.67790755421)*x_ref[2]
-        ref[2,4,2,1]=(0.762907045031)*x_ref[0]**o+(0.140771931118)*x_ref[0]+(0.716859940142)*x_ref[1]**o+(0.151769314189)*x_ref[1]+(-0.812408853675)*x_ref[2]**o+(0.755727078666)*x_ref[2]
-        ref[3,0,0,0]=(-0.13358237438)*x_ref[0]**o+(-0.594735856789)*x_ref[0]+(-0.367418402298)*x_ref[1]**o+(0.5349162872)*x_ref[1]+(0.238285320118)*x_ref[2]**o+(0.999627906459)*x_ref[2]
-        ref[3,0,0,1]=(-0.537433369218)*x_ref[0]**o+(0.133034652667)*x_ref[0]+(-0.190302464596)*x_ref[1]**o+(0.869919012762)*x_ref[1]+(0.320294306008)*x_ref[2]**o+(0.865908856629)*x_ref[2]
-        ref[3,0,1,0]=(0.480851043043)*x_ref[0]**o+(0.833358259022)*x_ref[0]+(0.893051476621)*x_ref[1]**o+(-0.505255581199)*x_ref[1]+(-0.15316145317)*x_ref[2]**o+(-0.937103563776)*x_ref[2]
-        ref[3,0,1,1]=(0.765360137605)*x_ref[0]**o+(0.502399552842)*x_ref[0]+(-0.215707512276)*x_ref[1]**o+(-0.402720816967)*x_ref[1]+(0.231360098578)*x_ref[2]**o+(0.732903327067)*x_ref[2]
-        ref[3,0,2,0]=(0.120836669045)*x_ref[0]**o+(0.198346794548)*x_ref[0]+(-0.28708447536)*x_ref[1]**o+(0.289672075353)*x_ref[1]+(-0.0305777738322)*x_ref[2]**o+(-0.0686651569373)*x_ref[2]
-        ref[3,0,2,1]=(0.0574598844614)*x_ref[0]**o+(0.031092492399)*x_ref[0]+(-0.406805507341)*x_ref[1]**o+(-0.623370509947)*x_ref[1]+(-0.476094160966)*x_ref[2]**o+(0.0840271758875)*x_ref[2]
-        ref[3,1,0,0]=(-0.569415249126)*x_ref[0]**o+(-0.339675540399)*x_ref[0]+(0.182536980707)*x_ref[1]**o+(0.727480200453)*x_ref[1]+(0.851672551504)*x_ref[2]**o+(0.817312313075)*x_ref[2]
-        ref[3,1,0,1]=(0.921422642904)*x_ref[0]**o+(0.697656143906)*x_ref[0]+(0.969442847752)*x_ref[1]**o+(-0.00957994710064)*x_ref[1]+(-0.315230556399)*x_ref[2]**o+(-0.870759158384)*x_ref[2]
-        ref[3,1,1,0]=(-0.813310465463)*x_ref[0]**o+(-0.809362802903)*x_ref[0]+(-0.0685101056428)*x_ref[1]**o+(0.708195651847)*x_ref[1]+(-0.876449456312)*x_ref[2]**o+(0.882503536479)*x_ref[2]
-        ref[3,1,1,1]=(-0.277504922905)*x_ref[0]**o+(-0.819428706347)*x_ref[0]+(0.463203258731)*x_ref[1]**o+(0.597493096401)*x_ref[1]+(0.630522187524)*x_ref[2]**o+(0.92480079466)*x_ref[2]
-        ref[3,1,2,0]=(-0.703167803764)*x_ref[0]**o+(0.730459205382)*x_ref[0]+(-0.507036921123)*x_ref[1]**o+(0.419358545765)*x_ref[1]+(-0.542758923679)*x_ref[2]**o+(0.831844312917)*x_ref[2]
-        ref[3,1,2,1]=(0.135200299704)*x_ref[0]**o+(-0.160734675188)*x_ref[0]+(-0.893851689192)*x_ref[1]**o+(0.748734906185)*x_ref[1]+(0.970464447167)*x_ref[2]**o+(0.277911376757)*x_ref[2]
-        ref[3,2,0,0]=(0.750104328784)*x_ref[0]**o+(-0.818350593893)*x_ref[0]+(-0.749900854281)*x_ref[1]**o+(0.289117653816)*x_ref[1]+(-0.219904822162)*x_ref[2]**o+(0.805208050452)*x_ref[2]
-        ref[3,2,0,1]=(-0.129614389749)*x_ref[0]**o+(-0.64067443816)*x_ref[0]+(0.513013650233)*x_ref[1]**o+(0.868869035341)*x_ref[1]+(-0.040145121639)*x_ref[2]**o+(-0.282350136119)*x_ref[2]
-        ref[3,2,1,0]=(-0.172814929104)*x_ref[0]**o+(-0.296930471915)*x_ref[0]+(-0.796114111585)*x_ref[1]**o+(-0.210181080249)*x_ref[1]+(-0.606107841173)*x_ref[2]**o+(-0.954329084175)*x_ref[2]
-        ref[3,2,1,1]=(0.136149261959)*x_ref[0]**o+(-0.613980696755)*x_ref[0]+(0.968430714778)*x_ref[1]**o+(0.683553952099)*x_ref[1]+(-0.321383789121)*x_ref[2]**o+(-0.139570984234)*x_ref[2]
-        ref[3,2,2,0]=(-0.273321720654)*x_ref[0]**o+(0.963651110162)*x_ref[0]+(-0.847402611499)*x_ref[1]**o+(0.237131262905)*x_ref[1]+(-0.617296821558)*x_ref[2]**o+(-0.681856394629)*x_ref[2]
-        ref[3,2,2,1]=(-0.760071928624)*x_ref[0]**o+(0.0345053779755)*x_ref[0]+(-0.583680069732)*x_ref[1]**o+(0.150497658077)*x_ref[1]+(0.0257096621429)*x_ref[2]**o+(-0.159406203385)*x_ref[2]
-        ref[3,3,0,0]=(-0.0668501746947)*x_ref[0]**o+(-0.183645899611)*x_ref[0]+(0.123667845765)*x_ref[1]**o+(0.0928142420352)*x_ref[1]+(-0.933250766317)*x_ref[2]**o+(-0.629986949639)*x_ref[2]
-        ref[3,3,0,1]=(-0.0212790928206)*x_ref[0]**o+(0.444036360325)*x_ref[0]+(0.09182358127)*x_ref[1]**o+(0.473088563672)*x_ref[1]+(0.0852925382953)*x_ref[2]**o+(-0.238517929786)*x_ref[2]
-        ref[3,3,1,0]=(0.0647235093728)*x_ref[0]**o+(-0.266285898716)*x_ref[0]+(0.944999560866)*x_ref[1]**o+(-0.757696716486)*x_ref[1]+(-0.439165278732)*x_ref[2]**o+(0.960091479774)*x_ref[2]
-        ref[3,3,1,1]=(-0.792249238894)*x_ref[0]**o+(-0.568585439587)*x_ref[0]+(-0.0426655335607)*x_ref[1]**o+(0.980004032206)*x_ref[1]+(0.635227812889)*x_ref[2]**o+(0.6687165384)*x_ref[2]
-        ref[3,3,2,0]=(0.340468442769)*x_ref[0]**o+(0.791071154735)*x_ref[0]+(-0.817919975547)*x_ref[1]**o+(0.0328383066982)*x_ref[1]+(-0.323093904705)*x_ref[2]**o+(-0.302641620002)*x_ref[2]
-        ref[3,3,2,1]=(-0.476501733213)*x_ref[0]**o+(-0.429845943537)*x_ref[0]+(0.518551215268)*x_ref[1]**o+(-0.551690143654)*x_ref[1]+(0.591983049997)*x_ref[2]**o+(0.586292683497)*x_ref[2]
-        ref[3,4,0,0]=(0.119036526248)*x_ref[0]**o+(-0.156404044048)*x_ref[0]+(0.158504048681)*x_ref[1]**o+(-0.3779600709)*x_ref[1]+(-0.362107671534)*x_ref[2]**o+(-0.314508628804)*x_ref[2]
-        ref[3,4,0,1]=(0.382011103106)*x_ref[0]**o+(-0.123711676964)*x_ref[0]+(-0.939014457264)*x_ref[1]**o+(-0.5986155807)*x_ref[1]+(-0.852092491566)*x_ref[2]**o+(-0.410438924788)*x_ref[2]
-        ref[3,4,1,0]=(0.83612586535)*x_ref[0]**o+(-0.606098645092)*x_ref[0]+(0.643469717148)*x_ref[1]**o+(0.845106525654)*x_ref[1]+(0.347455649691)*x_ref[2]**o+(-0.166796580458)*x_ref[2]
-        ref[3,4,1,1]=(0.693431758156)*x_ref[0]**o+(-0.313983401147)*x_ref[0]+(-0.862690834893)*x_ref[1]**o+(0.417233988055)*x_ref[1]+(-0.361769997589)*x_ref[2]**o+(-0.22749888397)*x_ref[2]
-        ref[3,4,2,0]=(0.680358405387)*x_ref[0]**o+(-0.786041842215)*x_ref[0]+(0.288823579415)*x_ref[1]**o+(-0.961099851196)*x_ref[1]+(0.669431785695)*x_ref[2]**o+(0.956564160268)*x_ref[2]
-        ref[3,4,2,1]=(-0.21416500005)*x_ref[0]**o+(0.48495191486)*x_ref[0]+(-0.173465452645)*x_ref[1]**o+(0.662530321557)*x_ref[1]+(0.984573283824)*x_ref[2]**o+(-0.568211383785)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.901681414005)*x[0]**o+(-0.888451321413)*x[0]+(-0.22985947361)*x[1]**o+(0.492641717896)*x[1]
-        ref=(-0.901681414005)*x_ref[0]**o+(-0.888451321413)*x_ref[0]+(-0.22985947361)*x_ref[1]**o+(0.492641717896)*x_ref[1]
-      else:
-        arg=(0.428268592739)*x[0]**o+(-0.996603298562)*x[0]+(0.677084172419)*x[1]**o+(0.0826120162779)*x[1]+(0.0206562071525)*x[2]**o+(-0.79500921274)*x[2]
-        ref=(0.428268592739)*x_ref[0]**o+(-0.996603298562)*x_ref[0]+(0.677084172419)*x_ref[1]**o+(0.0826120162779)*x_ref[1]+(0.0206562071525)*x_ref[2]**o+(-0.79500921274)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.756853446555)*x[0]**o+(-0.767585641318)*x[0]+(-0.426982757541)*x[1]**o+(0.399806070854)*x[1]
-        arg[1]=(-0.821677396516)*x[0]**o+(-0.591723513375)*x[0]+(-0.355824690337)*x[1]**o+(0.1636370609)*x[1]
-        ref[0]=(0.756853446555)*x_ref[0]**o+(-0.767585641318)*x_ref[0]+(-0.426982757541)*x_ref[1]**o+(0.399806070854)*x_ref[1]
-        ref[1]=(-0.821677396516)*x_ref[0]**o+(-0.591723513375)*x_ref[0]+(-0.355824690337)*x_ref[1]**o+(0.1636370609)*x_ref[1]
-      else:
-        arg[0]=(0.938054074343)*x[0]**o+(0.539056499967)*x[0]+(-0.617107808198)*x[1]**o+(-0.00223894362929)*x[1]+(-0.789674052883)*x[2]**o+(-0.61592268025)*x[2]
-        arg[1]=(-0.820479870378)*x[0]**o+(0.34390095545)*x[0]+(-0.501478928282)*x[1]**o+(0.174440566415)*x[1]+(-0.964557050796)*x[2]**o+(0.116014110585)*x[2]
-        ref[0]=(0.938054074343)*x_ref[0]**o+(0.539056499967)*x_ref[0]+(-0.617107808198)*x_ref[1]**o+(-0.00223894362929)*x_ref[1]+(-0.789674052883)*x_ref[2]**o+(-0.61592268025)*x_ref[2]
-        ref[1]=(-0.820479870378)*x_ref[0]**o+(0.34390095545)*x_ref[0]+(-0.501478928282)*x_ref[1]**o+(0.174440566415)*x_ref[1]+(-0.964557050796)*x_ref[2]**o+(0.116014110585)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.717924477933)*x[0]**o+(-0.629682284247)*x[0]+(0.0982832832089)*x[1]**o+(-0.762193509689)*x[1]
-        arg[0,1]=(-0.997822794773)*x[0]**o+(-0.561696934643)*x[0]+(-0.145516013467)*x[1]**o+(0.630378080139)*x[1]
-        arg[0,2]=(-0.751323417918)*x[0]**o+(0.479440101564)*x[0]+(-0.00432956740012)*x[1]**o+(0.767912131968)*x[1]
-        arg[0,3]=(0.507272228985)*x[0]**o+(-0.389291668683)*x[0]+(-0.883016581216)*x[1]**o+(0.0437908939974)*x[1]
-        arg[0,4]=(-0.137343257739)*x[0]**o+(0.743817161998)*x[0]+(0.507769921129)*x[1]**o+(-0.300283389883)*x[1]
-        arg[1,0]=(0.257422912353)*x[0]**o+(0.681717676022)*x[0]+(0.79106312381)*x[1]**o+(-0.671634660385)*x[1]
-        arg[1,1]=(0.136314663047)*x[0]**o+(-0.782099147193)*x[0]+(0.885974280892)*x[1]**o+(-0.798425202013)*x[1]
-        arg[1,2]=(0.247486687708)*x[0]**o+(0.795328036132)*x[0]+(-0.875686910387)*x[1]**o+(0.0568336903007)*x[1]
-        arg[1,3]=(0.080829127843)*x[0]**o+(-0.386433809573)*x[0]+(0.314034401629)*x[1]**o+(-0.872662795541)*x[1]
-        arg[1,4]=(-0.807283287271)*x[0]**o+(0.725492503192)*x[0]+(-0.584629907108)*x[1]**o+(-0.268021081298)*x[1]
-        arg[2,0]=(0.581563251557)*x[0]**o+(-0.886151193174)*x[0]+(0.193339118534)*x[1]**o+(0.978747305418)*x[1]
-        arg[2,1]=(0.141736956675)*x[0]**o+(0.668515974495)*x[0]+(-0.0791701432021)*x[1]**o+(0.410197138729)*x[1]
-        arg[2,2]=(-0.287456411619)*x[0]**o+(-0.772391150719)*x[0]+(-0.748682403636)*x[1]**o+(0.538840924967)*x[1]
-        arg[2,3]=(0.637529128236)*x[0]**o+(0.471131728149)*x[0]+(-0.433070242121)*x[1]**o+(-0.583240138198)*x[1]
-        arg[2,4]=(-0.624702895751)*x[0]**o+(-0.118770841979)*x[0]+(0.587084874695)*x[1]**o+(0.46959556491)*x[1]
-        arg[3,0]=(0.209166082888)*x[0]**o+(0.870738524234)*x[0]+(0.00990651539088)*x[1]**o+(-0.423308444734)*x[1]
-        arg[3,1]=(0.00446369533847)*x[0]**o+(-0.445436215897)*x[0]+(-0.939826442104)*x[1]**o+(0.486172187596)*x[1]
-        arg[3,2]=(-0.697054010365)*x[0]**o+(0.543343700538)*x[0]+(0.491284777488)*x[1]**o+(-0.021410495956)*x[1]
-        arg[3,3]=(-0.00457600194633)*x[0]**o+(-0.234648384385)*x[0]+(0.200988754362)*x[1]**o+(0.74772788001)*x[1]
-        arg[3,4]=(0.721800958056)*x[0]**o+(0.930824787753)*x[0]+(0.374340208263)*x[1]**o+(0.474293362128)*x[1]
-        ref[0,0]=(-0.717924477933)*x_ref[0]**o+(-0.629682284247)*x_ref[0]+(0.0982832832089)*x_ref[1]**o+(-0.762193509689)*x_ref[1]
-        ref[0,1]=(-0.997822794773)*x_ref[0]**o+(-0.561696934643)*x_ref[0]+(-0.145516013467)*x_ref[1]**o+(0.630378080139)*x_ref[1]
-        ref[0,2]=(-0.751323417918)*x_ref[0]**o+(0.479440101564)*x_ref[0]+(-0.00432956740012)*x_ref[1]**o+(0.767912131968)*x_ref[1]
-        ref[0,3]=(0.507272228985)*x_ref[0]**o+(-0.389291668683)*x_ref[0]+(-0.883016581216)*x_ref[1]**o+(0.0437908939974)*x_ref[1]
-        ref[0,4]=(-0.137343257739)*x_ref[0]**o+(0.743817161998)*x_ref[0]+(0.507769921129)*x_ref[1]**o+(-0.300283389883)*x_ref[1]
-        ref[1,0]=(0.257422912353)*x_ref[0]**o+(0.681717676022)*x_ref[0]+(0.79106312381)*x_ref[1]**o+(-0.671634660385)*x_ref[1]
-        ref[1,1]=(0.136314663047)*x_ref[0]**o+(-0.782099147193)*x_ref[0]+(0.885974280892)*x_ref[1]**o+(-0.798425202013)*x_ref[1]
-        ref[1,2]=(0.247486687708)*x_ref[0]**o+(0.795328036132)*x_ref[0]+(-0.875686910387)*x_ref[1]**o+(0.0568336903007)*x_ref[1]
-        ref[1,3]=(0.080829127843)*x_ref[0]**o+(-0.386433809573)*x_ref[0]+(0.314034401629)*x_ref[1]**o+(-0.872662795541)*x_ref[1]
-        ref[1,4]=(-0.807283287271)*x_ref[0]**o+(0.725492503192)*x_ref[0]+(-0.584629907108)*x_ref[1]**o+(-0.268021081298)*x_ref[1]
-        ref[2,0]=(0.581563251557)*x_ref[0]**o+(-0.886151193174)*x_ref[0]+(0.193339118534)*x_ref[1]**o+(0.978747305418)*x_ref[1]
-        ref[2,1]=(0.141736956675)*x_ref[0]**o+(0.668515974495)*x_ref[0]+(-0.0791701432021)*x_ref[1]**o+(0.410197138729)*x_ref[1]
-        ref[2,2]=(-0.287456411619)*x_ref[0]**o+(-0.772391150719)*x_ref[0]+(-0.748682403636)*x_ref[1]**o+(0.538840924967)*x_ref[1]
-        ref[2,3]=(0.637529128236)*x_ref[0]**o+(0.471131728149)*x_ref[0]+(-0.433070242121)*x_ref[1]**o+(-0.583240138198)*x_ref[1]
-        ref[2,4]=(-0.624702895751)*x_ref[0]**o+(-0.118770841979)*x_ref[0]+(0.587084874695)*x_ref[1]**o+(0.46959556491)*x_ref[1]
-        ref[3,0]=(0.209166082888)*x_ref[0]**o+(0.870738524234)*x_ref[0]+(0.00990651539088)*x_ref[1]**o+(-0.423308444734)*x_ref[1]
-        ref[3,1]=(0.00446369533847)*x_ref[0]**o+(-0.445436215897)*x_ref[0]+(-0.939826442104)*x_ref[1]**o+(0.486172187596)*x_ref[1]
-        ref[3,2]=(-0.697054010365)*x_ref[0]**o+(0.543343700538)*x_ref[0]+(0.491284777488)*x_ref[1]**o+(-0.021410495956)*x_ref[1]
-        ref[3,3]=(-0.00457600194633)*x_ref[0]**o+(-0.234648384385)*x_ref[0]+(0.200988754362)*x_ref[1]**o+(0.74772788001)*x_ref[1]
-        ref[3,4]=(0.721800958056)*x_ref[0]**o+(0.930824787753)*x_ref[0]+(0.374340208263)*x_ref[1]**o+(0.474293362128)*x_ref[1]
-      else:
-        arg[0,0]=(-0.740386815771)*x[0]**o+(-0.0523021332821)*x[0]+(0.0398159725211)*x[1]**o+(-0.426888207497)*x[1]+(0.0567170299031)*x[2]**o+(-0.183938925645)*x[2]
-        arg[0,1]=(-0.201789590886)*x[0]**o+(-0.367737630124)*x[0]+(0.109364462083)*x[1]**o+(-0.28601743506)*x[1]+(-0.399129253776)*x[2]**o+(0.583952239438)*x[2]
-        arg[0,2]=(0.542532512804)*x[0]**o+(0.494398493909)*x[0]+(0.292582889596)*x[1]**o+(-0.954001260258)*x[1]+(0.943184269693)*x[2]**o+(-0.52768765864)*x[2]
-        arg[0,3]=(0.804183352494)*x[0]**o+(-0.975349076994)*x[0]+(-0.827375030117)*x[1]**o+(-0.669898333686)*x[1]+(0.748094239981)*x[2]**o+(0.979045988454)*x[2]
-        arg[0,4]=(0.425028347472)*x[0]**o+(0.875274586351)*x[0]+(0.854098942537)*x[1]**o+(0.579588487828)*x[1]+(0.082708589378)*x[2]**o+(0.476235952573)*x[2]
-        arg[1,0]=(-0.624794007494)*x[0]**o+(-0.138866900862)*x[0]+(0.970509187706)*x[1]**o+(0.0253783907447)*x[1]+(0.468865716232)*x[2]**o+(0.676697194907)*x[2]
-        arg[1,1]=(-0.153766978847)*x[0]**o+(-0.426626120688)*x[0]+(-0.773847907631)*x[1]**o+(0.245927709658)*x[1]+(0.255639913539)*x[2]**o+(0.808676567134)*x[2]
-        arg[1,2]=(0.232094367521)*x[0]**o+(0.297706438396)*x[0]+(0.446407126908)*x[1]**o+(0.740223236781)*x[1]+(0.39141114872)*x[2]**o+(0.773847600596)*x[2]
-        arg[1,3]=(0.255568261799)*x[0]**o+(-0.978846043266)*x[0]+(0.354385282456)*x[1]**o+(0.105066752677)*x[1]+(0.942760820578)*x[2]**o+(0.780092891693)*x[2]
-        arg[1,4]=(0.529084170195)*x[0]**o+(0.747311333653)*x[0]+(-0.545359901284)*x[1]**o+(-0.281724707651)*x[1]+(0.313967713269)*x[2]**o+(-0.215058831724)*x[2]
-        arg[2,0]=(-0.831081561199)*x[0]**o+(-0.773735958748)*x[0]+(0.368966594678)*x[1]**o+(0.666937704315)*x[1]+(-0.974922863204)*x[2]**o+(0.715578049273)*x[2]
-        arg[2,1]=(0.578362294564)*x[0]**o+(0.889684843543)*x[0]+(0.588806147025)*x[1]**o+(0.0617034215889)*x[1]+(-0.16631520681)*x[2]**o+(0.730086241349)*x[2]
-        arg[2,2]=(0.448838826514)*x[0]**o+(-0.0709459785553)*x[0]+(-0.876698569979)*x[1]**o+(-0.506314680523)*x[1]+(0.688738500291)*x[2]**o+(0.618955116168)*x[2]
-        arg[2,3]=(0.290663008974)*x[0]**o+(0.73644965206)*x[0]+(-0.14313225421)*x[1]**o+(0.83074119153)*x[1]+(-0.247893391581)*x[2]**o+(-0.541433435359)*x[2]
-        arg[2,4]=(-0.215556795169)*x[0]**o+(-0.340257823449)*x[0]+(0.326604718415)*x[1]**o+(-0.939889251927)*x[1]+(0.425604617369)*x[2]**o+(0.430639358886)*x[2]
-        arg[3,0]=(0.0317232868586)*x[0]**o+(0.820693319131)*x[0]+(0.973940331646)*x[1]**o+(0.626976945683)*x[1]+(0.788447937745)*x[2]**o+(-0.718491682844)*x[2]
-        arg[3,1]=(0.292924833121)*x[0]**o+(-0.648128515891)*x[0]+(-0.300791515646)*x[1]**o+(-0.26123312127)*x[1]+(-0.263541248274)*x[2]**o+(0.890699912174)*x[2]
-        arg[3,2]=(-0.741612826841)*x[0]**o+(-0.095466430566)*x[0]+(-0.987682602605)*x[1]**o+(-0.0258256251685)*x[1]+(0.544387724417)*x[2]**o+(0.917676395583)*x[2]
-        arg[3,3]=(0.148313573908)*x[0]**o+(-0.438648673746)*x[0]+(-0.151998255103)*x[1]**o+(-0.500903665338)*x[1]+(0.61275976182)*x[2]**o+(-0.0509716866391)*x[2]
-        arg[3,4]=(0.292189003653)*x[0]**o+(0.564355242514)*x[0]+(-0.585718580333)*x[1]**o+(0.635365614994)*x[1]+(-0.00185257696349)*x[2]**o+(0.813357014726)*x[2]
-        ref[0,0]=(-0.740386815771)*x_ref[0]**o+(-0.0523021332821)*x_ref[0]+(0.0398159725211)*x_ref[1]**o+(-0.426888207497)*x_ref[1]+(0.0567170299031)*x_ref[2]**o+(-0.183938925645)*x_ref[2]
-        ref[0,1]=(-0.201789590886)*x_ref[0]**o+(-0.367737630124)*x_ref[0]+(0.109364462083)*x_ref[1]**o+(-0.28601743506)*x_ref[1]+(-0.399129253776)*x_ref[2]**o+(0.583952239438)*x_ref[2]
-        ref[0,2]=(0.542532512804)*x_ref[0]**o+(0.494398493909)*x_ref[0]+(0.292582889596)*x_ref[1]**o+(-0.954001260258)*x_ref[1]+(0.943184269693)*x_ref[2]**o+(-0.52768765864)*x_ref[2]
-        ref[0,3]=(0.804183352494)*x_ref[0]**o+(-0.975349076994)*x_ref[0]+(-0.827375030117)*x_ref[1]**o+(-0.669898333686)*x_ref[1]+(0.748094239981)*x_ref[2]**o+(0.979045988454)*x_ref[2]
-        ref[0,4]=(0.425028347472)*x_ref[0]**o+(0.875274586351)*x_ref[0]+(0.854098942537)*x_ref[1]**o+(0.579588487828)*x_ref[1]+(0.082708589378)*x_ref[2]**o+(0.476235952573)*x_ref[2]
-        ref[1,0]=(-0.624794007494)*x_ref[0]**o+(-0.138866900862)*x_ref[0]+(0.970509187706)*x_ref[1]**o+(0.0253783907447)*x_ref[1]+(0.468865716232)*x_ref[2]**o+(0.676697194907)*x_ref[2]
-        ref[1,1]=(-0.153766978847)*x_ref[0]**o+(-0.426626120688)*x_ref[0]+(-0.773847907631)*x_ref[1]**o+(0.245927709658)*x_ref[1]+(0.255639913539)*x_ref[2]**o+(0.808676567134)*x_ref[2]
-        ref[1,2]=(0.232094367521)*x_ref[0]**o+(0.297706438396)*x_ref[0]+(0.446407126908)*x_ref[1]**o+(0.740223236781)*x_ref[1]+(0.39141114872)*x_ref[2]**o+(0.773847600596)*x_ref[2]
-        ref[1,3]=(0.255568261799)*x_ref[0]**o+(-0.978846043266)*x_ref[0]+(0.354385282456)*x_ref[1]**o+(0.105066752677)*x_ref[1]+(0.942760820578)*x_ref[2]**o+(0.780092891693)*x_ref[2]
-        ref[1,4]=(0.529084170195)*x_ref[0]**o+(0.747311333653)*x_ref[0]+(-0.545359901284)*x_ref[1]**o+(-0.281724707651)*x_ref[1]+(0.313967713269)*x_ref[2]**o+(-0.215058831724)*x_ref[2]
-        ref[2,0]=(-0.831081561199)*x_ref[0]**o+(-0.773735958748)*x_ref[0]+(0.368966594678)*x_ref[1]**o+(0.666937704315)*x_ref[1]+(-0.974922863204)*x_ref[2]**o+(0.715578049273)*x_ref[2]
-        ref[2,1]=(0.578362294564)*x_ref[0]**o+(0.889684843543)*x_ref[0]+(0.588806147025)*x_ref[1]**o+(0.0617034215889)*x_ref[1]+(-0.16631520681)*x_ref[2]**o+(0.730086241349)*x_ref[2]
-        ref[2,2]=(0.448838826514)*x_ref[0]**o+(-0.0709459785553)*x_ref[0]+(-0.876698569979)*x_ref[1]**o+(-0.506314680523)*x_ref[1]+(0.688738500291)*x_ref[2]**o+(0.618955116168)*x_ref[2]
-        ref[2,3]=(0.290663008974)*x_ref[0]**o+(0.73644965206)*x_ref[0]+(-0.14313225421)*x_ref[1]**o+(0.83074119153)*x_ref[1]+(-0.247893391581)*x_ref[2]**o+(-0.541433435359)*x_ref[2]
-        ref[2,4]=(-0.215556795169)*x_ref[0]**o+(-0.340257823449)*x_ref[0]+(0.326604718415)*x_ref[1]**o+(-0.939889251927)*x_ref[1]+(0.425604617369)*x_ref[2]**o+(0.430639358886)*x_ref[2]
-        ref[3,0]=(0.0317232868586)*x_ref[0]**o+(0.820693319131)*x_ref[0]+(0.973940331646)*x_ref[1]**o+(0.626976945683)*x_ref[1]+(0.788447937745)*x_ref[2]**o+(-0.718491682844)*x_ref[2]
-        ref[3,1]=(0.292924833121)*x_ref[0]**o+(-0.648128515891)*x_ref[0]+(-0.300791515646)*x_ref[1]**o+(-0.26123312127)*x_ref[1]+(-0.263541248274)*x_ref[2]**o+(0.890699912174)*x_ref[2]
-        ref[3,2]=(-0.741612826841)*x_ref[0]**o+(-0.095466430566)*x_ref[0]+(-0.987682602605)*x_ref[1]**o+(-0.0258256251685)*x_ref[1]+(0.544387724417)*x_ref[2]**o+(0.917676395583)*x_ref[2]
-        ref[3,3]=(0.148313573908)*x_ref[0]**o+(-0.438648673746)*x_ref[0]+(-0.151998255103)*x_ref[1]**o+(-0.500903665338)*x_ref[1]+(0.61275976182)*x_ref[2]**o+(-0.0509716866391)*x_ref[2]
-        ref[3,4]=(0.292189003653)*x_ref[0]**o+(0.564355242514)*x_ref[0]+(-0.585718580333)*x_ref[1]**o+(0.635365614994)*x_ref[1]+(-0.00185257696349)*x_ref[2]**o+(0.813357014726)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0128414848839)*x[0]**o+(0.465050006132)*x[0]+(0.965707055318)*x[1]**o+(-0.0245081370356)*x[1]
-        arg[0,0,1]=(-0.200472047017)*x[0]**o+(-0.663028900371)*x[0]+(-0.943040910702)*x[1]**o+(-0.120563561139)*x[1]
-        arg[0,1,0]=(-0.582794137412)*x[0]**o+(-0.17277488426)*x[0]+(-0.328856513193)*x[1]**o+(-0.995542154323)*x[1]
-        arg[0,1,1]=(0.628900216244)*x[0]**o+(0.42314911968)*x[0]+(0.720137185717)*x[1]**o+(-0.360847007396)*x[1]
-        arg[1,0,0]=(-0.320599577005)*x[0]**o+(0.551919914795)*x[0]+(-0.0459652088094)*x[1]**o+(-0.559395421304)*x[1]
-        arg[1,0,1]=(0.148179561705)*x[0]**o+(0.434674232208)*x[0]+(-0.475375603732)*x[1]**o+(-0.58939903081)*x[1]
-        arg[1,1,0]=(0.617416045561)*x[0]**o+(0.937293925453)*x[0]+(0.348092333305)*x[1]**o+(0.503125307597)*x[1]
-        arg[1,1,1]=(-0.569221008948)*x[0]**o+(-0.00405502766105)*x[0]+(-0.389443082681)*x[1]**o+(-0.149118473431)*x[1]
-        arg[2,0,0]=(0.118769588477)*x[0]**o+(-0.96708351582)*x[0]+(-0.0145855500917)*x[1]**o+(0.370997674141)*x[1]
-        arg[2,0,1]=(-0.3129615573)*x[0]**o+(0.206299148764)*x[0]+(-0.721288027396)*x[1]**o+(-0.884411444055)*x[1]
-        arg[2,1,0]=(-0.780163860911)*x[0]**o+(-0.568714964563)*x[0]+(-0.0381936992532)*x[1]**o+(0.830243364454)*x[1]
-        arg[2,1,1]=(0.440674933834)*x[0]**o+(0.659074990645)*x[0]+(0.373520241513)*x[1]**o+(0.609301500641)*x[1]
-        arg[3,0,0]=(0.377299608317)*x[0]**o+(0.258769326825)*x[0]+(0.108755954544)*x[1]**o+(0.416736701504)*x[1]
-        arg[3,0,1]=(-0.368375671218)*x[0]**o+(-0.194408664196)*x[0]+(0.22066484944)*x[1]**o+(-0.105513517239)*x[1]
-        arg[3,1,0]=(-0.45311889531)*x[0]**o+(0.758137223649)*x[0]+(0.642250313677)*x[1]**o+(0.67780041241)*x[1]
-        arg[3,1,1]=(-0.584467518038)*x[0]**o+(0.873450785862)*x[0]+(0.949121750467)*x[1]**o+(-0.774601385823)*x[1]
-        arg[4,0,0]=(0.36378291068)*x[0]**o+(-0.489477884746)*x[0]+(-0.665910069342)*x[1]**o+(0.9839391739)*x[1]
-        arg[4,0,1]=(-0.539599763616)*x[0]**o+(0.651501126417)*x[0]+(-0.291030902108)*x[1]**o+(0.719794225744)*x[1]
-        arg[4,1,0]=(0.144776367586)*x[0]**o+(-0.154981280527)*x[0]+(0.170526162601)*x[1]**o+(-0.821596149241)*x[1]
-        arg[4,1,1]=(-0.460621351209)*x[0]**o+(-0.75486897537)*x[0]+(0.615982502995)*x[1]**o+(-0.756893047476)*x[1]
-        arg[5,0,0]=(0.209926220994)*x[0]**o+(0.412132938536)*x[0]+(0.28119780747)*x[1]**o+(-0.829072062922)*x[1]
-        arg[5,0,1]=(0.347615632334)*x[0]**o+(-0.101954769092)*x[0]+(-0.535842225724)*x[1]**o+(-0.0790159065772)*x[1]
-        arg[5,1,0]=(-0.951105825038)*x[0]**o+(-0.167113372047)*x[0]+(-0.368722457931)*x[1]**o+(0.00398630826759)*x[1]
-        arg[5,1,1]=(-0.280966220945)*x[0]**o+(0.749467953656)*x[0]+(-0.862358852162)*x[1]**o+(-0.947469365289)*x[1]
-        ref[0,0,0]=(-0.0128414848839)*x_ref[0]**o+(0.465050006132)*x_ref[0]+(0.965707055318)*x_ref[1]**o+(-0.0245081370356)*x_ref[1]
-        ref[0,0,1]=(-0.200472047017)*x_ref[0]**o+(-0.663028900371)*x_ref[0]+(-0.943040910702)*x_ref[1]**o+(-0.120563561139)*x_ref[1]
-        ref[0,1,0]=(-0.582794137412)*x_ref[0]**o+(-0.17277488426)*x_ref[0]+(-0.328856513193)*x_ref[1]**o+(-0.995542154323)*x_ref[1]
-        ref[0,1,1]=(0.628900216244)*x_ref[0]**o+(0.42314911968)*x_ref[0]+(0.720137185717)*x_ref[1]**o+(-0.360847007396)*x_ref[1]
-        ref[1,0,0]=(-0.320599577005)*x_ref[0]**o+(0.551919914795)*x_ref[0]+(-0.0459652088094)*x_ref[1]**o+(-0.559395421304)*x_ref[1]
-        ref[1,0,1]=(0.148179561705)*x_ref[0]**o+(0.434674232208)*x_ref[0]+(-0.475375603732)*x_ref[1]**o+(-0.58939903081)*x_ref[1]
-        ref[1,1,0]=(0.617416045561)*x_ref[0]**o+(0.937293925453)*x_ref[0]+(0.348092333305)*x_ref[1]**o+(0.503125307597)*x_ref[1]
-        ref[1,1,1]=(-0.569221008948)*x_ref[0]**o+(-0.00405502766105)*x_ref[0]+(-0.389443082681)*x_ref[1]**o+(-0.149118473431)*x_ref[1]
-        ref[2,0,0]=(0.118769588477)*x_ref[0]**o+(-0.96708351582)*x_ref[0]+(-0.0145855500917)*x_ref[1]**o+(0.370997674141)*x_ref[1]
-        ref[2,0,1]=(-0.3129615573)*x_ref[0]**o+(0.206299148764)*x_ref[0]+(-0.721288027396)*x_ref[1]**o+(-0.884411444055)*x_ref[1]
-        ref[2,1,0]=(-0.780163860911)*x_ref[0]**o+(-0.568714964563)*x_ref[0]+(-0.0381936992532)*x_ref[1]**o+(0.830243364454)*x_ref[1]
-        ref[2,1,1]=(0.440674933834)*x_ref[0]**o+(0.659074990645)*x_ref[0]+(0.373520241513)*x_ref[1]**o+(0.609301500641)*x_ref[1]
-        ref[3,0,0]=(0.377299608317)*x_ref[0]**o+(0.258769326825)*x_ref[0]+(0.108755954544)*x_ref[1]**o+(0.416736701504)*x_ref[1]
-        ref[3,0,1]=(-0.368375671218)*x_ref[0]**o+(-0.194408664196)*x_ref[0]+(0.22066484944)*x_ref[1]**o+(-0.105513517239)*x_ref[1]
-        ref[3,1,0]=(-0.45311889531)*x_ref[0]**o+(0.758137223649)*x_ref[0]+(0.642250313677)*x_ref[1]**o+(0.67780041241)*x_ref[1]
-        ref[3,1,1]=(-0.584467518038)*x_ref[0]**o+(0.873450785862)*x_ref[0]+(0.949121750467)*x_ref[1]**o+(-0.774601385823)*x_ref[1]
-        ref[4,0,0]=(0.36378291068)*x_ref[0]**o+(-0.489477884746)*x_ref[0]+(-0.665910069342)*x_ref[1]**o+(0.9839391739)*x_ref[1]
-        ref[4,0,1]=(-0.539599763616)*x_ref[0]**o+(0.651501126417)*x_ref[0]+(-0.291030902108)*x_ref[1]**o+(0.719794225744)*x_ref[1]
-        ref[4,1,0]=(0.144776367586)*x_ref[0]**o+(-0.154981280527)*x_ref[0]+(0.170526162601)*x_ref[1]**o+(-0.821596149241)*x_ref[1]
-        ref[4,1,1]=(-0.460621351209)*x_ref[0]**o+(-0.75486897537)*x_ref[0]+(0.615982502995)*x_ref[1]**o+(-0.756893047476)*x_ref[1]
-        ref[5,0,0]=(0.209926220994)*x_ref[0]**o+(0.412132938536)*x_ref[0]+(0.28119780747)*x_ref[1]**o+(-0.829072062922)*x_ref[1]
-        ref[5,0,1]=(0.347615632334)*x_ref[0]**o+(-0.101954769092)*x_ref[0]+(-0.535842225724)*x_ref[1]**o+(-0.0790159065772)*x_ref[1]
-        ref[5,1,0]=(-0.951105825038)*x_ref[0]**o+(-0.167113372047)*x_ref[0]+(-0.368722457931)*x_ref[1]**o+(0.00398630826759)*x_ref[1]
-        ref[5,1,1]=(-0.280966220945)*x_ref[0]**o+(0.749467953656)*x_ref[0]+(-0.862358852162)*x_ref[1]**o+(-0.947469365289)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.0415833284333)*x[0]**o+(0.194911622005)*x[0]+(0.50312866507)*x[1]**o+(0.0264724613449)*x[1]+(0.8791018499)*x[2]**o+(0.55217332601)*x[2]
-        arg[0,0,1]=(0.272403975118)*x[0]**o+(0.747717699355)*x[0]+(0.630267108269)*x[1]**o+(-0.532392610953)*x[1]+(-0.335800539303)*x[2]**o+(-0.45202877276)*x[2]
-        arg[0,1,0]=(-0.345230079718)*x[0]**o+(-0.463428154207)*x[0]+(-0.235612061263)*x[1]**o+(0.25205454387)*x[1]+(0.00383801658594)*x[2]**o+(0.94886179389)*x[2]
-        arg[0,1,1]=(0.83425074828)*x[0]**o+(0.0678634336979)*x[0]+(0.58303694875)*x[1]**o+(-0.390423615317)*x[1]+(-0.198506665254)*x[2]**o+(-0.153926424072)*x[2]
-        arg[1,0,0]=(0.748583887807)*x[0]**o+(-0.619758023753)*x[0]+(-0.637192600624)*x[1]**o+(-0.77944796466)*x[1]+(-0.745635449844)*x[2]**o+(0.385052490848)*x[2]
-        arg[1,0,1]=(0.178249452349)*x[0]**o+(-0.758000510749)*x[0]+(0.173656449057)*x[1]**o+(-0.496282271341)*x[1]+(-0.75929155861)*x[2]**o+(-0.0916648747906)*x[2]
-        arg[1,1,0]=(-0.106375867266)*x[0]**o+(-0.985973054508)*x[0]+(-0.828346807601)*x[1]**o+(-0.780869332747)*x[1]+(0.956166673219)*x[2]**o+(0.0115486522377)*x[2]
-        arg[1,1,1]=(-0.347056651581)*x[0]**o+(0.159310474468)*x[0]+(0.169356329598)*x[1]**o+(0.0379131764296)*x[1]+(0.547302672178)*x[2]**o+(-0.192168337756)*x[2]
-        arg[2,0,0]=(-0.264646719961)*x[0]**o+(-0.32990817159)*x[0]+(0.360599653268)*x[1]**o+(0.53317997944)*x[1]+(-0.288609084526)*x[2]**o+(0.117445043254)*x[2]
-        arg[2,0,1]=(-0.717210086649)*x[0]**o+(-0.913859607432)*x[0]+(0.494198228468)*x[1]**o+(-0.52463221583)*x[1]+(0.711597567219)*x[2]**o+(0.585196869172)*x[2]
-        arg[2,1,0]=(-0.398182449924)*x[0]**o+(-0.224237207359)*x[0]+(0.245111044519)*x[1]**o+(0.556757042489)*x[1]+(-0.747490064606)*x[2]**o+(0.974848330189)*x[2]
-        arg[2,1,1]=(-0.525098204339)*x[0]**o+(-0.787485492675)*x[0]+(-0.233307380294)*x[1]**o+(-0.609570071623)*x[1]+(-0.709676638973)*x[2]**o+(0.428630406545)*x[2]
-        arg[3,0,0]=(-0.604801204556)*x[0]**o+(0.483355489609)*x[0]+(0.602251424119)*x[1]**o+(-0.512483059948)*x[1]+(0.530298952371)*x[2]**o+(0.460582484929)*x[2]
-        arg[3,0,1]=(-0.223026657674)*x[0]**o+(-0.843908334265)*x[0]+(0.630773219249)*x[1]**o+(-0.962463994312)*x[1]+(-0.086366368162)*x[2]**o+(0.441208496119)*x[2]
-        arg[3,1,0]=(-0.861051836152)*x[0]**o+(0.282995621585)*x[0]+(-0.971513512619)*x[1]**o+(0.691494798209)*x[1]+(-0.264269824543)*x[2]**o+(0.430075879498)*x[2]
-        arg[3,1,1]=(0.195995685886)*x[0]**o+(-0.441184708365)*x[0]+(-0.768193293663)*x[1]**o+(-0.308275906926)*x[1]+(0.849067046286)*x[2]**o+(-0.822000111049)*x[2]
-        arg[4,0,0]=(-0.776936350216)*x[0]**o+(0.987846537986)*x[0]+(0.027119101665)*x[1]**o+(-0.0179353982234)*x[1]+(-0.453287099644)*x[2]**o+(0.970207770741)*x[2]
-        arg[4,0,1]=(0.781708265017)*x[0]**o+(-0.625176653149)*x[0]+(0.0637837953361)*x[1]**o+(0.381401415932)*x[1]+(0.575142751522)*x[2]**o+(0.482009069423)*x[2]
-        arg[4,1,0]=(-0.864838932985)*x[0]**o+(0.116211445658)*x[0]+(-0.103985339842)*x[1]**o+(0.616435777123)*x[1]+(0.0343826165658)*x[2]**o+(0.67732900142)*x[2]
-        arg[4,1,1]=(0.637545268689)*x[0]**o+(0.495935489884)*x[0]+(-0.949001441035)*x[1]**o+(-0.600568665738)*x[1]+(0.339278287549)*x[2]**o+(0.979389021599)*x[2]
-        arg[5,0,0]=(-0.486412877541)*x[0]**o+(-0.220311090368)*x[0]+(-0.941323254025)*x[1]**o+(0.122065018067)*x[1]+(0.537799827381)*x[2]**o+(0.942570757444)*x[2]
-        arg[5,0,1]=(0.713697533198)*x[0]**o+(-0.382404769437)*x[0]+(0.629644547983)*x[1]**o+(-0.618351494049)*x[1]+(0.257178470315)*x[2]**o+(-0.488029666124)*x[2]
-        arg[5,1,0]=(-0.531207567018)*x[0]**o+(-0.873678479376)*x[0]+(0.344856295667)*x[1]**o+(-0.401836367886)*x[1]+(0.397967958128)*x[2]**o+(-0.518169984782)*x[2]
-        arg[5,1,1]=(-0.0270647126884)*x[0]**o+(-0.493698732948)*x[0]+(-0.523416157841)*x[1]**o+(-0.710897753488)*x[1]+(-0.597569566681)*x[2]**o+(0.240935331308)*x[2]
-        ref[0,0,0]=(0.0415833284333)*x_ref[0]**o+(0.194911622005)*x_ref[0]+(0.50312866507)*x_ref[1]**o+(0.0264724613449)*x_ref[1]+(0.8791018499)*x_ref[2]**o+(0.55217332601)*x_ref[2]
-        ref[0,0,1]=(0.272403975118)*x_ref[0]**o+(0.747717699355)*x_ref[0]+(0.630267108269)*x_ref[1]**o+(-0.532392610953)*x_ref[1]+(-0.335800539303)*x_ref[2]**o+(-0.45202877276)*x_ref[2]
-        ref[0,1,0]=(-0.345230079718)*x_ref[0]**o+(-0.463428154207)*x_ref[0]+(-0.235612061263)*x_ref[1]**o+(0.25205454387)*x_ref[1]+(0.00383801658594)*x_ref[2]**o+(0.94886179389)*x_ref[2]
-        ref[0,1,1]=(0.83425074828)*x_ref[0]**o+(0.0678634336979)*x_ref[0]+(0.58303694875)*x_ref[1]**o+(-0.390423615317)*x_ref[1]+(-0.198506665254)*x_ref[2]**o+(-0.153926424072)*x_ref[2]
-        ref[1,0,0]=(0.748583887807)*x_ref[0]**o+(-0.619758023753)*x_ref[0]+(-0.637192600624)*x_ref[1]**o+(-0.77944796466)*x_ref[1]+(-0.745635449844)*x_ref[2]**o+(0.385052490848)*x_ref[2]
-        ref[1,0,1]=(0.178249452349)*x_ref[0]**o+(-0.758000510749)*x_ref[0]+(0.173656449057)*x_ref[1]**o+(-0.496282271341)*x_ref[1]+(-0.75929155861)*x_ref[2]**o+(-0.0916648747906)*x_ref[2]
-        ref[1,1,0]=(-0.106375867266)*x_ref[0]**o+(-0.985973054508)*x_ref[0]+(-0.828346807601)*x_ref[1]**o+(-0.780869332747)*x_ref[1]+(0.956166673219)*x_ref[2]**o+(0.0115486522377)*x_ref[2]
-        ref[1,1,1]=(-0.347056651581)*x_ref[0]**o+(0.159310474468)*x_ref[0]+(0.169356329598)*x_ref[1]**o+(0.0379131764296)*x_ref[1]+(0.547302672178)*x_ref[2]**o+(-0.192168337756)*x_ref[2]
-        ref[2,0,0]=(-0.264646719961)*x_ref[0]**o+(-0.32990817159)*x_ref[0]+(0.360599653268)*x_ref[1]**o+(0.53317997944)*x_ref[1]+(-0.288609084526)*x_ref[2]**o+(0.117445043254)*x_ref[2]
-        ref[2,0,1]=(-0.717210086649)*x_ref[0]**o+(-0.913859607432)*x_ref[0]+(0.494198228468)*x_ref[1]**o+(-0.52463221583)*x_ref[1]+(0.711597567219)*x_ref[2]**o+(0.585196869172)*x_ref[2]
-        ref[2,1,0]=(-0.398182449924)*x_ref[0]**o+(-0.224237207359)*x_ref[0]+(0.245111044519)*x_ref[1]**o+(0.556757042489)*x_ref[1]+(-0.747490064606)*x_ref[2]**o+(0.974848330189)*x_ref[2]
-        ref[2,1,1]=(-0.525098204339)*x_ref[0]**o+(-0.787485492675)*x_ref[0]+(-0.233307380294)*x_ref[1]**o+(-0.609570071623)*x_ref[1]+(-0.709676638973)*x_ref[2]**o+(0.428630406545)*x_ref[2]
-        ref[3,0,0]=(-0.604801204556)*x_ref[0]**o+(0.483355489609)*x_ref[0]+(0.602251424119)*x_ref[1]**o+(-0.512483059948)*x_ref[1]+(0.530298952371)*x_ref[2]**o+(0.460582484929)*x_ref[2]
-        ref[3,0,1]=(-0.223026657674)*x_ref[0]**o+(-0.843908334265)*x_ref[0]+(0.630773219249)*x_ref[1]**o+(-0.962463994312)*x_ref[1]+(-0.086366368162)*x_ref[2]**o+(0.441208496119)*x_ref[2]
-        ref[3,1,0]=(-0.861051836152)*x_ref[0]**o+(0.282995621585)*x_ref[0]+(-0.971513512619)*x_ref[1]**o+(0.691494798209)*x_ref[1]+(-0.264269824543)*x_ref[2]**o+(0.430075879498)*x_ref[2]
-        ref[3,1,1]=(0.195995685886)*x_ref[0]**o+(-0.441184708365)*x_ref[0]+(-0.768193293663)*x_ref[1]**o+(-0.308275906926)*x_ref[1]+(0.849067046286)*x_ref[2]**o+(-0.822000111049)*x_ref[2]
-        ref[4,0,0]=(-0.776936350216)*x_ref[0]**o+(0.987846537986)*x_ref[0]+(0.027119101665)*x_ref[1]**o+(-0.0179353982234)*x_ref[1]+(-0.453287099644)*x_ref[2]**o+(0.970207770741)*x_ref[2]
-        ref[4,0,1]=(0.781708265017)*x_ref[0]**o+(-0.625176653149)*x_ref[0]+(0.0637837953361)*x_ref[1]**o+(0.381401415932)*x_ref[1]+(0.575142751522)*x_ref[2]**o+(0.482009069423)*x_ref[2]
-        ref[4,1,0]=(-0.864838932985)*x_ref[0]**o+(0.116211445658)*x_ref[0]+(-0.103985339842)*x_ref[1]**o+(0.616435777123)*x_ref[1]+(0.0343826165658)*x_ref[2]**o+(0.67732900142)*x_ref[2]
-        ref[4,1,1]=(0.637545268689)*x_ref[0]**o+(0.495935489884)*x_ref[0]+(-0.949001441035)*x_ref[1]**o+(-0.600568665738)*x_ref[1]+(0.339278287549)*x_ref[2]**o+(0.979389021599)*x_ref[2]
-        ref[5,0,0]=(-0.486412877541)*x_ref[0]**o+(-0.220311090368)*x_ref[0]+(-0.941323254025)*x_ref[1]**o+(0.122065018067)*x_ref[1]+(0.537799827381)*x_ref[2]**o+(0.942570757444)*x_ref[2]
-        ref[5,0,1]=(0.713697533198)*x_ref[0]**o+(-0.382404769437)*x_ref[0]+(0.629644547983)*x_ref[1]**o+(-0.618351494049)*x_ref[1]+(0.257178470315)*x_ref[2]**o+(-0.488029666124)*x_ref[2]
-        ref[5,1,0]=(-0.531207567018)*x_ref[0]**o+(-0.873678479376)*x_ref[0]+(0.344856295667)*x_ref[1]**o+(-0.401836367886)*x_ref[1]+(0.397967958128)*x_ref[2]**o+(-0.518169984782)*x_ref[2]
-        ref[5,1,1]=(-0.0270647126884)*x_ref[0]**o+(-0.493698732948)*x_ref[0]+(-0.523416157841)*x_ref[1]**o+(-0.710897753488)*x_ref[1]+(-0.597569566681)*x_ref[2]**o+(0.240935331308)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.70041600073)*x[0]**o+(0.0368444393254)*x[0]+(-0.939011570256)*x[1]**o+(0.762796835248)*x[1]
-        arg[0,0,0,1]=(-0.383188465228)*x[0]**o+(-0.956202930503)*x[0]+(-0.0433250191873)*x[1]**o+(-0.263494367743)*x[1]
-        arg[0,0,1,0]=(0.494889208666)*x[0]**o+(0.721800653649)*x[0]+(0.275748820606)*x[1]**o+(0.190701062508)*x[1]
-        arg[0,0,1,1]=(0.317345288325)*x[0]**o+(-0.0713887739659)*x[0]+(-0.0901699882517)*x[1]**o+(0.350861486991)*x[1]
-        arg[0,0,2,0]=(-0.0399664417282)*x[0]**o+(-0.73007860251)*x[0]+(-0.123301660907)*x[1]**o+(0.935774110316)*x[1]
-        arg[0,0,2,1]=(-0.774484178038)*x[0]**o+(-0.427643344733)*x[0]+(0.00466934570081)*x[1]**o+(0.644433150981)*x[1]
-        arg[0,1,0,0]=(0.532951038821)*x[0]**o+(-0.267404179599)*x[0]+(-0.488651484135)*x[1]**o+(-0.354416641555)*x[1]
-        arg[0,1,0,1]=(0.816219473407)*x[0]**o+(0.095041670769)*x[0]+(0.130824542151)*x[1]**o+(-0.91799466789)*x[1]
-        arg[0,1,1,0]=(-0.926659688215)*x[0]**o+(-0.99257560771)*x[0]+(0.76472846278)*x[1]**o+(-0.77301872817)*x[1]
-        arg[0,1,1,1]=(-0.291848070507)*x[0]**o+(0.988869135358)*x[0]+(-0.355431590669)*x[1]**o+(-0.397109808154)*x[1]
-        arg[0,1,2,0]=(-0.630380994644)*x[0]**o+(0.121188015244)*x[0]+(-0.527521198931)*x[1]**o+(0.743015163843)*x[1]
-        arg[0,1,2,1]=(0.624350853711)*x[0]**o+(-0.269065524076)*x[0]+(0.381181149379)*x[1]**o+(0.964176747301)*x[1]
-        arg[0,2,0,0]=(0.386078831223)*x[0]**o+(-0.143893625755)*x[0]+(-0.957649154953)*x[1]**o+(-0.728625629809)*x[1]
-        arg[0,2,0,1]=(-0.752542988554)*x[0]**o+(-0.334338454849)*x[0]+(-0.888583790871)*x[1]**o+(-0.49515709924)*x[1]
-        arg[0,2,1,0]=(0.67213418036)*x[0]**o+(0.63778853358)*x[0]+(-0.305139731169)*x[1]**o+(-0.349307973811)*x[1]
-        arg[0,2,1,1]=(0.226718551492)*x[0]**o+(0.0927018122394)*x[0]+(-0.742387419573)*x[1]**o+(0.528087866126)*x[1]
-        arg[0,2,2,0]=(-0.724349079038)*x[0]**o+(-0.758167121924)*x[0]+(-0.687742086176)*x[1]**o+(-0.415119729664)*x[1]
-        arg[0,2,2,1]=(0.0399247837941)*x[0]**o+(-0.728504254588)*x[0]+(0.382011768693)*x[1]**o+(-0.743726886782)*x[1]
-        arg[0,3,0,0]=(-0.994002993417)*x[0]**o+(0.293311671699)*x[0]+(-0.9731492726)*x[1]**o+(0.0673759518597)*x[1]
-        arg[0,3,0,1]=(-0.638426251977)*x[0]**o+(-0.537134730931)*x[0]+(0.993741859056)*x[1]**o+(-0.909049905282)*x[1]
-        arg[0,3,1,0]=(-0.994595072064)*x[0]**o+(0.0252993150106)*x[0]+(-0.739129165128)*x[1]**o+(-0.132376880599)*x[1]
-        arg[0,3,1,1]=(-0.539219874104)*x[0]**o+(0.796849273908)*x[0]+(0.682514446887)*x[1]**o+(-0.704901251482)*x[1]
-        arg[0,3,2,0]=(0.0401802421987)*x[0]**o+(-0.0354713202277)*x[0]+(-0.660064980444)*x[1]**o+(0.0477264910037)*x[1]
-        arg[0,3,2,1]=(0.832824897985)*x[0]**o+(0.877654166375)*x[0]+(-0.909219867154)*x[1]**o+(-0.796258795798)*x[1]
-        arg[0,4,0,0]=(0.0310731814412)*x[0]**o+(0.39714436047)*x[0]+(0.61669106719)*x[1]**o+(0.789287424452)*x[1]
-        arg[0,4,0,1]=(-0.8919943646)*x[0]**o+(0.55041132884)*x[0]+(-0.0397475694211)*x[1]**o+(0.993245641481)*x[1]
-        arg[0,4,1,0]=(0.550134389567)*x[0]**o+(-0.657732937381)*x[0]+(0.204770242863)*x[1]**o+(-0.0296391840031)*x[1]
-        arg[0,4,1,1]=(0.753185285169)*x[0]**o+(0.74420982803)*x[0]+(0.108834676972)*x[1]**o+(0.183891847557)*x[1]
-        arg[0,4,2,0]=(-0.259653246466)*x[0]**o+(-0.120308818888)*x[0]+(-0.827119024697)*x[1]**o+(-0.672357922311)*x[1]
-        arg[0,4,2,1]=(-0.807666107771)*x[0]**o+(0.873748263895)*x[0]+(-0.160494957388)*x[1]**o+(0.7551018226)*x[1]
-        arg[1,0,0,0]=(0.780978036182)*x[0]**o+(-0.260409851047)*x[0]+(-0.597455360543)*x[1]**o+(0.0689482125215)*x[1]
-        arg[1,0,0,1]=(0.811121169417)*x[0]**o+(-0.614791318516)*x[0]+(0.663679164632)*x[1]**o+(-0.853931508608)*x[1]
-        arg[1,0,1,0]=(-0.601473156596)*x[0]**o+(-0.1232863608)*x[0]+(0.200905517492)*x[1]**o+(0.337784236126)*x[1]
-        arg[1,0,1,1]=(-0.924015099396)*x[0]**o+(0.197096316191)*x[0]+(-0.580606258161)*x[1]**o+(0.517410299916)*x[1]
-        arg[1,0,2,0]=(0.32384939376)*x[0]**o+(0.871622229492)*x[0]+(0.403013167399)*x[1]**o+(-0.50285362219)*x[1]
-        arg[1,0,2,1]=(-0.875266612786)*x[0]**o+(0.773236652169)*x[0]+(0.93949088522)*x[1]**o+(-0.607791659163)*x[1]
-        arg[1,1,0,0]=(-0.972124688294)*x[0]**o+(0.895545224323)*x[0]+(-0.904953764575)*x[1]**o+(0.388629839442)*x[1]
-        arg[1,1,0,1]=(0.792386948636)*x[0]**o+(-0.467370445542)*x[0]+(0.16664753332)*x[1]**o+(-0.202002832911)*x[1]
-        arg[1,1,1,0]=(0.748979883957)*x[0]**o+(-0.272594191544)*x[0]+(-0.724533609431)*x[1]**o+(0.0670080576995)*x[1]
-        arg[1,1,1,1]=(0.155216275716)*x[0]**o+(-0.394137469825)*x[0]+(-0.527098097796)*x[1]**o+(0.504014563188)*x[1]
-        arg[1,1,2,0]=(-0.806704090439)*x[0]**o+(-0.791435275759)*x[0]+(0.866962482)*x[1]**o+(0.60302217776)*x[1]
-        arg[1,1,2,1]=(-0.728053309956)*x[0]**o+(0.0559583022356)*x[0]+(0.0926294355801)*x[1]**o+(-0.835984838669)*x[1]
-        arg[1,2,0,0]=(-0.0661747052735)*x[0]**o+(0.0537098973346)*x[0]+(0.310702398279)*x[1]**o+(-0.489393478975)*x[1]
-        arg[1,2,0,1]=(-0.0910654471721)*x[0]**o+(0.327801831182)*x[0]+(-0.42833439187)*x[1]**o+(0.267067714743)*x[1]
-        arg[1,2,1,0]=(-0.693916583922)*x[0]**o+(-0.100272651463)*x[0]+(-0.195971225883)*x[1]**o+(0.660851591786)*x[1]
-        arg[1,2,1,1]=(-0.158662866194)*x[0]**o+(0.756412009601)*x[0]+(-0.923974707134)*x[1]**o+(0.61664700863)*x[1]
-        arg[1,2,2,0]=(-0.449981632451)*x[0]**o+(0.272083805383)*x[0]+(-0.207156704608)*x[1]**o+(0.413596665304)*x[1]
-        arg[1,2,2,1]=(0.67039491127)*x[0]**o+(-0.606081942118)*x[0]+(-0.358862791857)*x[1]**o+(-0.191412169743)*x[1]
-        arg[1,3,0,0]=(0.214562206436)*x[0]**o+(0.475358432768)*x[0]+(0.639237285541)*x[1]**o+(-0.221799470417)*x[1]
-        arg[1,3,0,1]=(0.468332920849)*x[0]**o+(0.359173095186)*x[0]+(0.513170435198)*x[1]**o+(0.472621770345)*x[1]
-        arg[1,3,1,0]=(-0.722500106774)*x[0]**o+(0.781087784307)*x[0]+(0.633141730145)*x[1]**o+(0.958777327006)*x[1]
-        arg[1,3,1,1]=(0.488269631028)*x[0]**o+(0.148575659631)*x[0]+(-0.229858507326)*x[1]**o+(-0.857118507195)*x[1]
-        arg[1,3,2,0]=(0.99463505025)*x[0]**o+(-0.970275234551)*x[0]+(-0.431529655117)*x[1]**o+(-0.208112330684)*x[1]
-        arg[1,3,2,1]=(-0.715411408332)*x[0]**o+(0.554401881121)*x[0]+(-0.980883542633)*x[1]**o+(0.316356494975)*x[1]
-        arg[1,4,0,0]=(0.747620638111)*x[0]**o+(-0.505093883319)*x[0]+(-0.217289877652)*x[1]**o+(-0.122961101484)*x[1]
-        arg[1,4,0,1]=(-0.329916740819)*x[0]**o+(0.778840575985)*x[0]+(-0.696382782242)*x[1]**o+(-0.096185679235)*x[1]
-        arg[1,4,1,0]=(0.574218122656)*x[0]**o+(0.0949666147475)*x[0]+(-0.789015428301)*x[1]**o+(-0.400376747438)*x[1]
-        arg[1,4,1,1]=(0.569036824328)*x[0]**o+(0.132679527923)*x[0]+(-0.229208784312)*x[1]**o+(0.405134795549)*x[1]
-        arg[1,4,2,0]=(0.0123943827354)*x[0]**o+(-0.0446024014977)*x[0]+(-0.221944819571)*x[1]**o+(-0.596890233794)*x[1]
-        arg[1,4,2,1]=(0.499247385143)*x[0]**o+(0.891843495388)*x[0]+(-0.348380026198)*x[1]**o+(0.146344723761)*x[1]
-        arg[2,0,0,0]=(-0.929032869237)*x[0]**o+(-0.438035650633)*x[0]+(0.117030848904)*x[1]**o+(-0.489094945626)*x[1]
-        arg[2,0,0,1]=(0.661960656348)*x[0]**o+(0.437346307001)*x[0]+(0.15713464744)*x[1]**o+(0.578309634731)*x[1]
-        arg[2,0,1,0]=(-0.368410149772)*x[0]**o+(-0.135484081321)*x[0]+(-0.51575875197)*x[1]**o+(0.26997748887)*x[1]
-        arg[2,0,1,1]=(0.784159013964)*x[0]**o+(-0.558040177257)*x[0]+(-0.100963880851)*x[1]**o+(-0.319503517522)*x[1]
-        arg[2,0,2,0]=(-0.0260076717983)*x[0]**o+(-0.252140406297)*x[0]+(-0.335458650519)*x[1]**o+(-0.0739605444814)*x[1]
-        arg[2,0,2,1]=(0.484818876559)*x[0]**o+(-0.59157296366)*x[0]+(-0.83491407929)*x[1]**o+(0.143217129439)*x[1]
-        arg[2,1,0,0]=(0.672216209481)*x[0]**o+(0.225722770162)*x[0]+(-0.46608814621)*x[1]**o+(-0.779035303765)*x[1]
-        arg[2,1,0,1]=(-0.738780643364)*x[0]**o+(0.0741487570855)*x[0]+(-0.362480267529)*x[1]**o+(0.474314990314)*x[1]
-        arg[2,1,1,0]=(0.942380641613)*x[0]**o+(0.834468091419)*x[0]+(-0.413376836135)*x[1]**o+(0.996367350352)*x[1]
-        arg[2,1,1,1]=(0.544360198404)*x[0]**o+(-0.327857763859)*x[0]+(-0.00306338907092)*x[1]**o+(0.448394961269)*x[1]
-        arg[2,1,2,0]=(-0.345632293594)*x[0]**o+(0.505451030738)*x[0]+(-0.644095213138)*x[1]**o+(0.603588130789)*x[1]
-        arg[2,1,2,1]=(-0.300809177049)*x[0]**o+(-0.531168939571)*x[0]+(0.513243419239)*x[1]**o+(0.62918148667)*x[1]
-        arg[2,2,0,0]=(0.610906338615)*x[0]**o+(-0.656455478681)*x[0]+(-0.386484840223)*x[1]**o+(0.720074853711)*x[1]
-        arg[2,2,0,1]=(-0.403600090425)*x[0]**o+(0.454789490943)*x[0]+(-0.399073455918)*x[1]**o+(-0.0552326255369)*x[1]
-        arg[2,2,1,0]=(-0.308592576779)*x[0]**o+(0.253298307559)*x[0]+(-0.862040156595)*x[1]**o+(0.195088197599)*x[1]
-        arg[2,2,1,1]=(0.143353860538)*x[0]**o+(-0.590315683091)*x[0]+(-0.955465510619)*x[1]**o+(0.372352027984)*x[1]
-        arg[2,2,2,0]=(-0.13314652456)*x[0]**o+(0.580744198064)*x[0]+(-0.903035808104)*x[1]**o+(-0.193570555816)*x[1]
-        arg[2,2,2,1]=(-0.647218355992)*x[0]**o+(0.00521075379725)*x[0]+(0.877022602564)*x[1]**o+(-0.104569127278)*x[1]
-        arg[2,3,0,0]=(-0.532184390508)*x[0]**o+(0.739226859366)*x[0]+(0.595122128361)*x[1]**o+(0.0135063212516)*x[1]
-        arg[2,3,0,1]=(-0.121073574394)*x[0]**o+(-0.175990877109)*x[0]+(-0.00319744367579)*x[1]**o+(0.140264888668)*x[1]
-        arg[2,3,1,0]=(-0.0778296806357)*x[0]**o+(0.760344573573)*x[0]+(-0.250209333031)*x[1]**o+(-0.413073766011)*x[1]
-        arg[2,3,1,1]=(-0.809655592364)*x[0]**o+(-0.147000481704)*x[0]+(-0.760732613787)*x[1]**o+(0.399494900513)*x[1]
-        arg[2,3,2,0]=(-0.131633255327)*x[0]**o+(-0.0268295912955)*x[0]+(-0.934414490057)*x[1]**o+(-0.339746795066)*x[1]
-        arg[2,3,2,1]=(0.503687469605)*x[0]**o+(-0.415050204706)*x[0]+(0.152421197486)*x[1]**o+(0.529931932615)*x[1]
-        arg[2,4,0,0]=(0.930580833077)*x[0]**o+(-0.377748298816)*x[0]+(-0.159931528324)*x[1]**o+(0.374143651635)*x[1]
-        arg[2,4,0,1]=(0.254339441506)*x[0]**o+(0.695672173367)*x[0]+(-0.499989877641)*x[1]**o+(-0.745148857716)*x[1]
-        arg[2,4,1,0]=(0.205325187322)*x[0]**o+(0.317887475767)*x[0]+(0.755338840391)*x[1]**o+(-0.106253370416)*x[1]
-        arg[2,4,1,1]=(0.175711808412)*x[0]**o+(-0.437006733188)*x[0]+(-0.449737979076)*x[1]**o+(-0.0421697213234)*x[1]
-        arg[2,4,2,0]=(-0.543184540283)*x[0]**o+(0.616024774255)*x[0]+(-0.429403317932)*x[1]**o+(-0.557076956301)*x[1]
-        arg[2,4,2,1]=(0.224704163386)*x[0]**o+(-0.945537746026)*x[0]+(0.947303520688)*x[1]**o+(0.909695468251)*x[1]
-        arg[3,0,0,0]=(-0.671167109353)*x[0]**o+(-0.513526771737)*x[0]+(-0.511672331777)*x[1]**o+(-0.301926771817)*x[1]
-        arg[3,0,0,1]=(0.39343937992)*x[0]**o+(-0.194833946828)*x[0]+(0.882702377998)*x[1]**o+(0.191544038874)*x[1]
-        arg[3,0,1,0]=(0.521271797889)*x[0]**o+(0.924897421226)*x[0]+(-0.597268916449)*x[1]**o+(-0.897621830518)*x[1]
-        arg[3,0,1,1]=(-0.446311941735)*x[0]**o+(-0.223997368297)*x[0]+(-0.348064954666)*x[1]**o+(0.661704488202)*x[1]
-        arg[3,0,2,0]=(-0.785706283015)*x[0]**o+(0.434487336824)*x[0]+(-0.0447968030358)*x[1]**o+(0.0231287166506)*x[1]
-        arg[3,0,2,1]=(0.347155629717)*x[0]**o+(-0.836660082409)*x[0]+(0.391492038747)*x[1]**o+(0.883578619998)*x[1]
-        arg[3,1,0,0]=(0.571669585809)*x[0]**o+(0.966740526379)*x[0]+(-0.657144215536)*x[1]**o+(0.357025591929)*x[1]
-        arg[3,1,0,1]=(-0.269900462792)*x[0]**o+(0.770680682031)*x[0]+(0.744696440247)*x[1]**o+(0.755227887237)*x[1]
-        arg[3,1,1,0]=(-0.667568521409)*x[0]**o+(-0.483641971546)*x[0]+(0.687266187401)*x[1]**o+(-0.597241584922)*x[1]
-        arg[3,1,1,1]=(-0.947316636771)*x[0]**o+(0.0797873425176)*x[0]+(0.254921442278)*x[1]**o+(-0.0500536165406)*x[1]
-        arg[3,1,2,0]=(0.966192971983)*x[0]**o+(-0.597929938773)*x[0]+(-0.174360538)*x[1]**o+(0.46405478391)*x[1]
-        arg[3,1,2,1]=(-0.675528960994)*x[0]**o+(0.51539766317)*x[0]+(-0.99673299807)*x[1]**o+(-0.488746102106)*x[1]
-        arg[3,2,0,0]=(-0.604138916979)*x[0]**o+(-0.0431165687312)*x[0]+(-0.346697341122)*x[1]**o+(-0.966811623167)*x[1]
-        arg[3,2,0,1]=(0.963965750281)*x[0]**o+(-0.059166688536)*x[0]+(0.166515828506)*x[1]**o+(0.832637512663)*x[1]
-        arg[3,2,1,0]=(-0.808155600589)*x[0]**o+(-0.178526483687)*x[0]+(-0.012382108719)*x[1]**o+(0.194810458281)*x[1]
-        arg[3,2,1,1]=(0.905922872414)*x[0]**o+(0.580755461959)*x[0]+(0.84253193847)*x[1]**o+(0.300676716124)*x[1]
-        arg[3,2,2,0]=(-0.560928128044)*x[0]**o+(0.215498997249)*x[0]+(0.630359499164)*x[1]**o+(0.0955049343157)*x[1]
-        arg[3,2,2,1]=(-0.977307154392)*x[0]**o+(0.543314643158)*x[0]+(-0.617962918616)*x[1]**o+(0.222318165123)*x[1]
-        arg[3,3,0,0]=(0.910351367774)*x[0]**o+(-0.349015106312)*x[0]+(-0.367900620181)*x[1]**o+(-0.371131872755)*x[1]
-        arg[3,3,0,1]=(0.663510744888)*x[0]**o+(-0.16380815063)*x[0]+(0.770895156906)*x[1]**o+(0.84395768389)*x[1]
-        arg[3,3,1,0]=(0.553097521137)*x[0]**o+(-0.139012828014)*x[0]+(-0.986291992888)*x[1]**o+(-0.780024041157)*x[1]
-        arg[3,3,1,1]=(-0.894441791323)*x[0]**o+(0.91199469535)*x[0]+(-0.349154843905)*x[1]**o+(0.538946349908)*x[1]
-        arg[3,3,2,0]=(-0.464541735353)*x[0]**o+(-0.44894927329)*x[0]+(-0.488621463959)*x[1]**o+(-0.987756549629)*x[1]
-        arg[3,3,2,1]=(0.136069699682)*x[0]**o+(-0.794904844715)*x[0]+(0.300038435268)*x[1]**o+(-0.599562792523)*x[1]
-        arg[3,4,0,0]=(0.391227355996)*x[0]**o+(-0.634937772688)*x[0]+(0.0618326566602)*x[1]**o+(0.396379987618)*x[1]
-        arg[3,4,0,1]=(0.485984857628)*x[0]**o+(-0.884694203334)*x[0]+(-0.791392877516)*x[1]**o+(0.832758707832)*x[1]
-        arg[3,4,1,0]=(0.983115009543)*x[0]**o+(0.830522788331)*x[0]+(-0.947942131374)*x[1]**o+(0.890681434885)*x[1]
-        arg[3,4,1,1]=(-0.0596041988514)*x[0]**o+(0.203878482428)*x[0]+(-0.739288417295)*x[1]**o+(0.150351531263)*x[1]
-        arg[3,4,2,0]=(-0.821412631737)*x[0]**o+(0.366097632474)*x[0]+(-0.978999319755)*x[1]**o+(-0.556584079904)*x[1]
-        arg[3,4,2,1]=(0.677346101991)*x[0]**o+(0.617303832579)*x[0]+(0.963322024959)*x[1]**o+(0.0765656809305)*x[1]
-        ref[0,0,0,0]=(0.70041600073)*x_ref[0]**o+(0.0368444393254)*x_ref[0]+(-0.939011570256)*x_ref[1]**o+(0.762796835248)*x_ref[1]
-        ref[0,0,0,1]=(-0.383188465228)*x_ref[0]**o+(-0.956202930503)*x_ref[0]+(-0.0433250191873)*x_ref[1]**o+(-0.263494367743)*x_ref[1]
-        ref[0,0,1,0]=(0.494889208666)*x_ref[0]**o+(0.721800653649)*x_ref[0]+(0.275748820606)*x_ref[1]**o+(0.190701062508)*x_ref[1]
-        ref[0,0,1,1]=(0.317345288325)*x_ref[0]**o+(-0.0713887739659)*x_ref[0]+(-0.0901699882517)*x_ref[1]**o+(0.350861486991)*x_ref[1]
-        ref[0,0,2,0]=(-0.0399664417282)*x_ref[0]**o+(-0.73007860251)*x_ref[0]+(-0.123301660907)*x_ref[1]**o+(0.935774110316)*x_ref[1]
-        ref[0,0,2,1]=(-0.774484178038)*x_ref[0]**o+(-0.427643344733)*x_ref[0]+(0.00466934570081)*x_ref[1]**o+(0.644433150981)*x_ref[1]
-        ref[0,1,0,0]=(0.532951038821)*x_ref[0]**o+(-0.267404179599)*x_ref[0]+(-0.488651484135)*x_ref[1]**o+(-0.354416641555)*x_ref[1]
-        ref[0,1,0,1]=(0.816219473407)*x_ref[0]**o+(0.095041670769)*x_ref[0]+(0.130824542151)*x_ref[1]**o+(-0.91799466789)*x_ref[1]
-        ref[0,1,1,0]=(-0.926659688215)*x_ref[0]**o+(-0.99257560771)*x_ref[0]+(0.76472846278)*x_ref[1]**o+(-0.77301872817)*x_ref[1]
-        ref[0,1,1,1]=(-0.291848070507)*x_ref[0]**o+(0.988869135358)*x_ref[0]+(-0.355431590669)*x_ref[1]**o+(-0.397109808154)*x_ref[1]
-        ref[0,1,2,0]=(-0.630380994644)*x_ref[0]**o+(0.121188015244)*x_ref[0]+(-0.527521198931)*x_ref[1]**o+(0.743015163843)*x_ref[1]
-        ref[0,1,2,1]=(0.624350853711)*x_ref[0]**o+(-0.269065524076)*x_ref[0]+(0.381181149379)*x_ref[1]**o+(0.964176747301)*x_ref[1]
-        ref[0,2,0,0]=(0.386078831223)*x_ref[0]**o+(-0.143893625755)*x_ref[0]+(-0.957649154953)*x_ref[1]**o+(-0.728625629809)*x_ref[1]
-        ref[0,2,0,1]=(-0.752542988554)*x_ref[0]**o+(-0.334338454849)*x_ref[0]+(-0.888583790871)*x_ref[1]**o+(-0.49515709924)*x_ref[1]
-        ref[0,2,1,0]=(0.67213418036)*x_ref[0]**o+(0.63778853358)*x_ref[0]+(-0.305139731169)*x_ref[1]**o+(-0.349307973811)*x_ref[1]
-        ref[0,2,1,1]=(0.226718551492)*x_ref[0]**o+(0.0927018122394)*x_ref[0]+(-0.742387419573)*x_ref[1]**o+(0.528087866126)*x_ref[1]
-        ref[0,2,2,0]=(-0.724349079038)*x_ref[0]**o+(-0.758167121924)*x_ref[0]+(-0.687742086176)*x_ref[1]**o+(-0.415119729664)*x_ref[1]
-        ref[0,2,2,1]=(0.0399247837941)*x_ref[0]**o+(-0.728504254588)*x_ref[0]+(0.382011768693)*x_ref[1]**o+(-0.743726886782)*x_ref[1]
-        ref[0,3,0,0]=(-0.994002993417)*x_ref[0]**o+(0.293311671699)*x_ref[0]+(-0.9731492726)*x_ref[1]**o+(0.0673759518597)*x_ref[1]
-        ref[0,3,0,1]=(-0.638426251977)*x_ref[0]**o+(-0.537134730931)*x_ref[0]+(0.993741859056)*x_ref[1]**o+(-0.909049905282)*x_ref[1]
-        ref[0,3,1,0]=(-0.994595072064)*x_ref[0]**o+(0.0252993150106)*x_ref[0]+(-0.739129165128)*x_ref[1]**o+(-0.132376880599)*x_ref[1]
-        ref[0,3,1,1]=(-0.539219874104)*x_ref[0]**o+(0.796849273908)*x_ref[0]+(0.682514446887)*x_ref[1]**o+(-0.704901251482)*x_ref[1]
-        ref[0,3,2,0]=(0.0401802421987)*x_ref[0]**o+(-0.0354713202277)*x_ref[0]+(-0.660064980444)*x_ref[1]**o+(0.0477264910037)*x_ref[1]
-        ref[0,3,2,1]=(0.832824897985)*x_ref[0]**o+(0.877654166375)*x_ref[0]+(-0.909219867154)*x_ref[1]**o+(-0.796258795798)*x_ref[1]
-        ref[0,4,0,0]=(0.0310731814412)*x_ref[0]**o+(0.39714436047)*x_ref[0]+(0.61669106719)*x_ref[1]**o+(0.789287424452)*x_ref[1]
-        ref[0,4,0,1]=(-0.8919943646)*x_ref[0]**o+(0.55041132884)*x_ref[0]+(-0.0397475694211)*x_ref[1]**o+(0.993245641481)*x_ref[1]
-        ref[0,4,1,0]=(0.550134389567)*x_ref[0]**o+(-0.657732937381)*x_ref[0]+(0.204770242863)*x_ref[1]**o+(-0.0296391840031)*x_ref[1]
-        ref[0,4,1,1]=(0.753185285169)*x_ref[0]**o+(0.74420982803)*x_ref[0]+(0.108834676972)*x_ref[1]**o+(0.183891847557)*x_ref[1]
-        ref[0,4,2,0]=(-0.259653246466)*x_ref[0]**o+(-0.120308818888)*x_ref[0]+(-0.827119024697)*x_ref[1]**o+(-0.672357922311)*x_ref[1]
-        ref[0,4,2,1]=(-0.807666107771)*x_ref[0]**o+(0.873748263895)*x_ref[0]+(-0.160494957388)*x_ref[1]**o+(0.7551018226)*x_ref[1]
-        ref[1,0,0,0]=(0.780978036182)*x_ref[0]**o+(-0.260409851047)*x_ref[0]+(-0.597455360543)*x_ref[1]**o+(0.0689482125215)*x_ref[1]
-        ref[1,0,0,1]=(0.811121169417)*x_ref[0]**o+(-0.614791318516)*x_ref[0]+(0.663679164632)*x_ref[1]**o+(-0.853931508608)*x_ref[1]
-        ref[1,0,1,0]=(-0.601473156596)*x_ref[0]**o+(-0.1232863608)*x_ref[0]+(0.200905517492)*x_ref[1]**o+(0.337784236126)*x_ref[1]
-        ref[1,0,1,1]=(-0.924015099396)*x_ref[0]**o+(0.197096316191)*x_ref[0]+(-0.580606258161)*x_ref[1]**o+(0.517410299916)*x_ref[1]
-        ref[1,0,2,0]=(0.32384939376)*x_ref[0]**o+(0.871622229492)*x_ref[0]+(0.403013167399)*x_ref[1]**o+(-0.50285362219)*x_ref[1]
-        ref[1,0,2,1]=(-0.875266612786)*x_ref[0]**o+(0.773236652169)*x_ref[0]+(0.93949088522)*x_ref[1]**o+(-0.607791659163)*x_ref[1]
-        ref[1,1,0,0]=(-0.972124688294)*x_ref[0]**o+(0.895545224323)*x_ref[0]+(-0.904953764575)*x_ref[1]**o+(0.388629839442)*x_ref[1]
-        ref[1,1,0,1]=(0.792386948636)*x_ref[0]**o+(-0.467370445542)*x_ref[0]+(0.16664753332)*x_ref[1]**o+(-0.202002832911)*x_ref[1]
-        ref[1,1,1,0]=(0.748979883957)*x_ref[0]**o+(-0.272594191544)*x_ref[0]+(-0.724533609431)*x_ref[1]**o+(0.0670080576995)*x_ref[1]
-        ref[1,1,1,1]=(0.155216275716)*x_ref[0]**o+(-0.394137469825)*x_ref[0]+(-0.527098097796)*x_ref[1]**o+(0.504014563188)*x_ref[1]
-        ref[1,1,2,0]=(-0.806704090439)*x_ref[0]**o+(-0.791435275759)*x_ref[0]+(0.866962482)*x_ref[1]**o+(0.60302217776)*x_ref[1]
-        ref[1,1,2,1]=(-0.728053309956)*x_ref[0]**o+(0.0559583022356)*x_ref[0]+(0.0926294355801)*x_ref[1]**o+(-0.835984838669)*x_ref[1]
-        ref[1,2,0,0]=(-0.0661747052735)*x_ref[0]**o+(0.0537098973346)*x_ref[0]+(0.310702398279)*x_ref[1]**o+(-0.489393478975)*x_ref[1]
-        ref[1,2,0,1]=(-0.0910654471721)*x_ref[0]**o+(0.327801831182)*x_ref[0]+(-0.42833439187)*x_ref[1]**o+(0.267067714743)*x_ref[1]
-        ref[1,2,1,0]=(-0.693916583922)*x_ref[0]**o+(-0.100272651463)*x_ref[0]+(-0.195971225883)*x_ref[1]**o+(0.660851591786)*x_ref[1]
-        ref[1,2,1,1]=(-0.158662866194)*x_ref[0]**o+(0.756412009601)*x_ref[0]+(-0.923974707134)*x_ref[1]**o+(0.61664700863)*x_ref[1]
-        ref[1,2,2,0]=(-0.449981632451)*x_ref[0]**o+(0.272083805383)*x_ref[0]+(-0.207156704608)*x_ref[1]**o+(0.413596665304)*x_ref[1]
-        ref[1,2,2,1]=(0.67039491127)*x_ref[0]**o+(-0.606081942118)*x_ref[0]+(-0.358862791857)*x_ref[1]**o+(-0.191412169743)*x_ref[1]
-        ref[1,3,0,0]=(0.214562206436)*x_ref[0]**o+(0.475358432768)*x_ref[0]+(0.639237285541)*x_ref[1]**o+(-0.221799470417)*x_ref[1]
-        ref[1,3,0,1]=(0.468332920849)*x_ref[0]**o+(0.359173095186)*x_ref[0]+(0.513170435198)*x_ref[1]**o+(0.472621770345)*x_ref[1]
-        ref[1,3,1,0]=(-0.722500106774)*x_ref[0]**o+(0.781087784307)*x_ref[0]+(0.633141730145)*x_ref[1]**o+(0.958777327006)*x_ref[1]
-        ref[1,3,1,1]=(0.488269631028)*x_ref[0]**o+(0.148575659631)*x_ref[0]+(-0.229858507326)*x_ref[1]**o+(-0.857118507195)*x_ref[1]
-        ref[1,3,2,0]=(0.99463505025)*x_ref[0]**o+(-0.970275234551)*x_ref[0]+(-0.431529655117)*x_ref[1]**o+(-0.208112330684)*x_ref[1]
-        ref[1,3,2,1]=(-0.715411408332)*x_ref[0]**o+(0.554401881121)*x_ref[0]+(-0.980883542633)*x_ref[1]**o+(0.316356494975)*x_ref[1]
-        ref[1,4,0,0]=(0.747620638111)*x_ref[0]**o+(-0.505093883319)*x_ref[0]+(-0.217289877652)*x_ref[1]**o+(-0.122961101484)*x_ref[1]
-        ref[1,4,0,1]=(-0.329916740819)*x_ref[0]**o+(0.778840575985)*x_ref[0]+(-0.696382782242)*x_ref[1]**o+(-0.096185679235)*x_ref[1]
-        ref[1,4,1,0]=(0.574218122656)*x_ref[0]**o+(0.0949666147475)*x_ref[0]+(-0.789015428301)*x_ref[1]**o+(-0.400376747438)*x_ref[1]
-        ref[1,4,1,1]=(0.569036824328)*x_ref[0]**o+(0.132679527923)*x_ref[0]+(-0.229208784312)*x_ref[1]**o+(0.405134795549)*x_ref[1]
-        ref[1,4,2,0]=(0.0123943827354)*x_ref[0]**o+(-0.0446024014977)*x_ref[0]+(-0.221944819571)*x_ref[1]**o+(-0.596890233794)*x_ref[1]
-        ref[1,4,2,1]=(0.499247385143)*x_ref[0]**o+(0.891843495388)*x_ref[0]+(-0.348380026198)*x_ref[1]**o+(0.146344723761)*x_ref[1]
-        ref[2,0,0,0]=(-0.929032869237)*x_ref[0]**o+(-0.438035650633)*x_ref[0]+(0.117030848904)*x_ref[1]**o+(-0.489094945626)*x_ref[1]
-        ref[2,0,0,1]=(0.661960656348)*x_ref[0]**o+(0.437346307001)*x_ref[0]+(0.15713464744)*x_ref[1]**o+(0.578309634731)*x_ref[1]
-        ref[2,0,1,0]=(-0.368410149772)*x_ref[0]**o+(-0.135484081321)*x_ref[0]+(-0.51575875197)*x_ref[1]**o+(0.26997748887)*x_ref[1]
-        ref[2,0,1,1]=(0.784159013964)*x_ref[0]**o+(-0.558040177257)*x_ref[0]+(-0.100963880851)*x_ref[1]**o+(-0.319503517522)*x_ref[1]
-        ref[2,0,2,0]=(-0.0260076717983)*x_ref[0]**o+(-0.252140406297)*x_ref[0]+(-0.335458650519)*x_ref[1]**o+(-0.0739605444814)*x_ref[1]
-        ref[2,0,2,1]=(0.484818876559)*x_ref[0]**o+(-0.59157296366)*x_ref[0]+(-0.83491407929)*x_ref[1]**o+(0.143217129439)*x_ref[1]
-        ref[2,1,0,0]=(0.672216209481)*x_ref[0]**o+(0.225722770162)*x_ref[0]+(-0.46608814621)*x_ref[1]**o+(-0.779035303765)*x_ref[1]
-        ref[2,1,0,1]=(-0.738780643364)*x_ref[0]**o+(0.0741487570855)*x_ref[0]+(-0.362480267529)*x_ref[1]**o+(0.474314990314)*x_ref[1]
-        ref[2,1,1,0]=(0.942380641613)*x_ref[0]**o+(0.834468091419)*x_ref[0]+(-0.413376836135)*x_ref[1]**o+(0.996367350352)*x_ref[1]
-        ref[2,1,1,1]=(0.544360198404)*x_ref[0]**o+(-0.327857763859)*x_ref[0]+(-0.00306338907092)*x_ref[1]**o+(0.448394961269)*x_ref[1]
-        ref[2,1,2,0]=(-0.345632293594)*x_ref[0]**o+(0.505451030738)*x_ref[0]+(-0.644095213138)*x_ref[1]**o+(0.603588130789)*x_ref[1]
-        ref[2,1,2,1]=(-0.300809177049)*x_ref[0]**o+(-0.531168939571)*x_ref[0]+(0.513243419239)*x_ref[1]**o+(0.62918148667)*x_ref[1]
-        ref[2,2,0,0]=(0.610906338615)*x_ref[0]**o+(-0.656455478681)*x_ref[0]+(-0.386484840223)*x_ref[1]**o+(0.720074853711)*x_ref[1]
-        ref[2,2,0,1]=(-0.403600090425)*x_ref[0]**o+(0.454789490943)*x_ref[0]+(-0.399073455918)*x_ref[1]**o+(-0.0552326255369)*x_ref[1]
-        ref[2,2,1,0]=(-0.308592576779)*x_ref[0]**o+(0.253298307559)*x_ref[0]+(-0.862040156595)*x_ref[1]**o+(0.195088197599)*x_ref[1]
-        ref[2,2,1,1]=(0.143353860538)*x_ref[0]**o+(-0.590315683091)*x_ref[0]+(-0.955465510619)*x_ref[1]**o+(0.372352027984)*x_ref[1]
-        ref[2,2,2,0]=(-0.13314652456)*x_ref[0]**o+(0.580744198064)*x_ref[0]+(-0.903035808104)*x_ref[1]**o+(-0.193570555816)*x_ref[1]
-        ref[2,2,2,1]=(-0.647218355992)*x_ref[0]**o+(0.00521075379725)*x_ref[0]+(0.877022602564)*x_ref[1]**o+(-0.104569127278)*x_ref[1]
-        ref[2,3,0,0]=(-0.532184390508)*x_ref[0]**o+(0.739226859366)*x_ref[0]+(0.595122128361)*x_ref[1]**o+(0.0135063212516)*x_ref[1]
-        ref[2,3,0,1]=(-0.121073574394)*x_ref[0]**o+(-0.175990877109)*x_ref[0]+(-0.00319744367579)*x_ref[1]**o+(0.140264888668)*x_ref[1]
-        ref[2,3,1,0]=(-0.0778296806357)*x_ref[0]**o+(0.760344573573)*x_ref[0]+(-0.250209333031)*x_ref[1]**o+(-0.413073766011)*x_ref[1]
-        ref[2,3,1,1]=(-0.809655592364)*x_ref[0]**o+(-0.147000481704)*x_ref[0]+(-0.760732613787)*x_ref[1]**o+(0.399494900513)*x_ref[1]
-        ref[2,3,2,0]=(-0.131633255327)*x_ref[0]**o+(-0.0268295912955)*x_ref[0]+(-0.934414490057)*x_ref[1]**o+(-0.339746795066)*x_ref[1]
-        ref[2,3,2,1]=(0.503687469605)*x_ref[0]**o+(-0.415050204706)*x_ref[0]+(0.152421197486)*x_ref[1]**o+(0.529931932615)*x_ref[1]
-        ref[2,4,0,0]=(0.930580833077)*x_ref[0]**o+(-0.377748298816)*x_ref[0]+(-0.159931528324)*x_ref[1]**o+(0.374143651635)*x_ref[1]
-        ref[2,4,0,1]=(0.254339441506)*x_ref[0]**o+(0.695672173367)*x_ref[0]+(-0.499989877641)*x_ref[1]**o+(-0.745148857716)*x_ref[1]
-        ref[2,4,1,0]=(0.205325187322)*x_ref[0]**o+(0.317887475767)*x_ref[0]+(0.755338840391)*x_ref[1]**o+(-0.106253370416)*x_ref[1]
-        ref[2,4,1,1]=(0.175711808412)*x_ref[0]**o+(-0.437006733188)*x_ref[0]+(-0.449737979076)*x_ref[1]**o+(-0.0421697213234)*x_ref[1]
-        ref[2,4,2,0]=(-0.543184540283)*x_ref[0]**o+(0.616024774255)*x_ref[0]+(-0.429403317932)*x_ref[1]**o+(-0.557076956301)*x_ref[1]
-        ref[2,4,2,1]=(0.224704163386)*x_ref[0]**o+(-0.945537746026)*x_ref[0]+(0.947303520688)*x_ref[1]**o+(0.909695468251)*x_ref[1]
-        ref[3,0,0,0]=(-0.671167109353)*x_ref[0]**o+(-0.513526771737)*x_ref[0]+(-0.511672331777)*x_ref[1]**o+(-0.301926771817)*x_ref[1]
-        ref[3,0,0,1]=(0.39343937992)*x_ref[0]**o+(-0.194833946828)*x_ref[0]+(0.882702377998)*x_ref[1]**o+(0.191544038874)*x_ref[1]
-        ref[3,0,1,0]=(0.521271797889)*x_ref[0]**o+(0.924897421226)*x_ref[0]+(-0.597268916449)*x_ref[1]**o+(-0.897621830518)*x_ref[1]
-        ref[3,0,1,1]=(-0.446311941735)*x_ref[0]**o+(-0.223997368297)*x_ref[0]+(-0.348064954666)*x_ref[1]**o+(0.661704488202)*x_ref[1]
-        ref[3,0,2,0]=(-0.785706283015)*x_ref[0]**o+(0.434487336824)*x_ref[0]+(-0.0447968030358)*x_ref[1]**o+(0.0231287166506)*x_ref[1]
-        ref[3,0,2,1]=(0.347155629717)*x_ref[0]**o+(-0.836660082409)*x_ref[0]+(0.391492038747)*x_ref[1]**o+(0.883578619998)*x_ref[1]
-        ref[3,1,0,0]=(0.571669585809)*x_ref[0]**o+(0.966740526379)*x_ref[0]+(-0.657144215536)*x_ref[1]**o+(0.357025591929)*x_ref[1]
-        ref[3,1,0,1]=(-0.269900462792)*x_ref[0]**o+(0.770680682031)*x_ref[0]+(0.744696440247)*x_ref[1]**o+(0.755227887237)*x_ref[1]
-        ref[3,1,1,0]=(-0.667568521409)*x_ref[0]**o+(-0.483641971546)*x_ref[0]+(0.687266187401)*x_ref[1]**o+(-0.597241584922)*x_ref[1]
-        ref[3,1,1,1]=(-0.947316636771)*x_ref[0]**o+(0.0797873425176)*x_ref[0]+(0.254921442278)*x_ref[1]**o+(-0.0500536165406)*x_ref[1]
-        ref[3,1,2,0]=(0.966192971983)*x_ref[0]**o+(-0.597929938773)*x_ref[0]+(-0.174360538)*x_ref[1]**o+(0.46405478391)*x_ref[1]
-        ref[3,1,2,1]=(-0.675528960994)*x_ref[0]**o+(0.51539766317)*x_ref[0]+(-0.99673299807)*x_ref[1]**o+(-0.488746102106)*x_ref[1]
-        ref[3,2,0,0]=(-0.604138916979)*x_ref[0]**o+(-0.0431165687312)*x_ref[0]+(-0.346697341122)*x_ref[1]**o+(-0.966811623167)*x_ref[1]
-        ref[3,2,0,1]=(0.963965750281)*x_ref[0]**o+(-0.059166688536)*x_ref[0]+(0.166515828506)*x_ref[1]**o+(0.832637512663)*x_ref[1]
-        ref[3,2,1,0]=(-0.808155600589)*x_ref[0]**o+(-0.178526483687)*x_ref[0]+(-0.012382108719)*x_ref[1]**o+(0.194810458281)*x_ref[1]
-        ref[3,2,1,1]=(0.905922872414)*x_ref[0]**o+(0.580755461959)*x_ref[0]+(0.84253193847)*x_ref[1]**o+(0.300676716124)*x_ref[1]
-        ref[3,2,2,0]=(-0.560928128044)*x_ref[0]**o+(0.215498997249)*x_ref[0]+(0.630359499164)*x_ref[1]**o+(0.0955049343157)*x_ref[1]
-        ref[3,2,2,1]=(-0.977307154392)*x_ref[0]**o+(0.543314643158)*x_ref[0]+(-0.617962918616)*x_ref[1]**o+(0.222318165123)*x_ref[1]
-        ref[3,3,0,0]=(0.910351367774)*x_ref[0]**o+(-0.349015106312)*x_ref[0]+(-0.367900620181)*x_ref[1]**o+(-0.371131872755)*x_ref[1]
-        ref[3,3,0,1]=(0.663510744888)*x_ref[0]**o+(-0.16380815063)*x_ref[0]+(0.770895156906)*x_ref[1]**o+(0.84395768389)*x_ref[1]
-        ref[3,3,1,0]=(0.553097521137)*x_ref[0]**o+(-0.139012828014)*x_ref[0]+(-0.986291992888)*x_ref[1]**o+(-0.780024041157)*x_ref[1]
-        ref[3,3,1,1]=(-0.894441791323)*x_ref[0]**o+(0.91199469535)*x_ref[0]+(-0.349154843905)*x_ref[1]**o+(0.538946349908)*x_ref[1]
-        ref[3,3,2,0]=(-0.464541735353)*x_ref[0]**o+(-0.44894927329)*x_ref[0]+(-0.488621463959)*x_ref[1]**o+(-0.987756549629)*x_ref[1]
-        ref[3,3,2,1]=(0.136069699682)*x_ref[0]**o+(-0.794904844715)*x_ref[0]+(0.300038435268)*x_ref[1]**o+(-0.599562792523)*x_ref[1]
-        ref[3,4,0,0]=(0.391227355996)*x_ref[0]**o+(-0.634937772688)*x_ref[0]+(0.0618326566602)*x_ref[1]**o+(0.396379987618)*x_ref[1]
-        ref[3,4,0,1]=(0.485984857628)*x_ref[0]**o+(-0.884694203334)*x_ref[0]+(-0.791392877516)*x_ref[1]**o+(0.832758707832)*x_ref[1]
-        ref[3,4,1,0]=(0.983115009543)*x_ref[0]**o+(0.830522788331)*x_ref[0]+(-0.947942131374)*x_ref[1]**o+(0.890681434885)*x_ref[1]
-        ref[3,4,1,1]=(-0.0596041988514)*x_ref[0]**o+(0.203878482428)*x_ref[0]+(-0.739288417295)*x_ref[1]**o+(0.150351531263)*x_ref[1]
-        ref[3,4,2,0]=(-0.821412631737)*x_ref[0]**o+(0.366097632474)*x_ref[0]+(-0.978999319755)*x_ref[1]**o+(-0.556584079904)*x_ref[1]
-        ref[3,4,2,1]=(0.677346101991)*x_ref[0]**o+(0.617303832579)*x_ref[0]+(0.963322024959)*x_ref[1]**o+(0.0765656809305)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.412268765993)*x[0]**o+(-0.31214585911)*x[0]+(0.153520487818)*x[1]**o+(-0.3104168266)*x[1]+(0.909798069186)*x[2]**o+(0.742916044571)*x[2]
-        arg[0,0,0,1]=(0.0735781063807)*x[0]**o+(0.725527279895)*x[0]+(-0.884760504783)*x[1]**o+(0.751678022946)*x[1]+(-0.169364499242)*x[2]**o+(-0.946699946704)*x[2]
-        arg[0,0,1,0]=(-0.308928255723)*x[0]**o+(-0.601764425359)*x[0]+(-0.176466074749)*x[1]**o+(-0.14838705699)*x[1]+(0.897444985593)*x[2]**o+(-0.0552696055317)*x[2]
-        arg[0,0,1,1]=(0.278269305614)*x[0]**o+(-0.419731200355)*x[0]+(0.450955076279)*x[1]**o+(-0.899203207333)*x[1]+(-0.458812838787)*x[2]**o+(0.507871397895)*x[2]
-        arg[0,0,2,0]=(0.887873653495)*x[0]**o+(0.130110213077)*x[0]+(0.203761425496)*x[1]**o+(-0.0563898018944)*x[1]+(0.0125548052261)*x[2]**o+(-0.594578723877)*x[2]
-        arg[0,0,2,1]=(-0.104210554142)*x[0]**o+(-0.792596213906)*x[0]+(0.570869430862)*x[1]**o+(-0.798160727294)*x[1]+(0.241269856254)*x[2]**o+(0.194885978057)*x[2]
-        arg[0,1,0,0]=(0.819550431682)*x[0]**o+(-0.239970258367)*x[0]+(-0.960362264523)*x[1]**o+(0.872093886273)*x[1]+(-0.857325000718)*x[2]**o+(-0.907620072404)*x[2]
-        arg[0,1,0,1]=(-0.989011816788)*x[0]**o+(0.853577413178)*x[0]+(-0.160335863166)*x[1]**o+(-0.751266166108)*x[1]+(0.631146799273)*x[2]**o+(0.739741622363)*x[2]
-        arg[0,1,1,0]=(0.162828987854)*x[0]**o+(-0.200652438446)*x[0]+(-0.890837153528)*x[1]**o+(-0.972029967593)*x[1]+(0.850395155009)*x[2]**o+(-0.0868272213807)*x[2]
-        arg[0,1,1,1]=(-0.770711232994)*x[0]**o+(0.986518762896)*x[0]+(0.0970713645745)*x[1]**o+(0.996843418865)*x[1]+(0.208134397469)*x[2]**o+(0.946600905711)*x[2]
-        arg[0,1,2,0]=(-0.543213476288)*x[0]**o+(0.0335009416664)*x[0]+(0.165751788147)*x[1]**o+(0.660276877927)*x[1]+(-0.485925597349)*x[2]**o+(-0.632302900376)*x[2]
-        arg[0,1,2,1]=(0.175798920586)*x[0]**o+(-0.42873239224)*x[0]+(0.164896129395)*x[1]**o+(0.662142729145)*x[1]+(-0.425944275652)*x[2]**o+(0.306978282183)*x[2]
-        arg[0,2,0,0]=(0.790303828628)*x[0]**o+(0.169346034559)*x[0]+(-0.901026918205)*x[1]**o+(0.661856377517)*x[1]+(0.194850846261)*x[2]**o+(0.155282302183)*x[2]
-        arg[0,2,0,1]=(-0.43947970094)*x[0]**o+(-0.535569903832)*x[0]+(-0.534035397281)*x[1]**o+(-0.169724793112)*x[1]+(-0.717226228021)*x[2]**o+(0.771292292609)*x[2]
-        arg[0,2,1,0]=(-0.424991151717)*x[0]**o+(-0.0837800409811)*x[0]+(-0.747139428246)*x[1]**o+(0.739025612454)*x[1]+(0.464486611081)*x[2]**o+(0.824926522179)*x[2]
-        arg[0,2,1,1]=(-0.4666399509)*x[0]**o+(-0.479130555457)*x[0]+(-0.676718441278)*x[1]**o+(0.352685580535)*x[1]+(0.537789487962)*x[2]**o+(-0.774383681009)*x[2]
-        arg[0,2,2,0]=(-0.30983510311)*x[0]**o+(0.00141603592636)*x[0]+(0.546192108985)*x[1]**o+(0.229628329192)*x[1]+(0.788466929747)*x[2]**o+(-0.169587087096)*x[2]
-        arg[0,2,2,1]=(0.810282347322)*x[0]**o+(0.961056346191)*x[0]+(0.204622339898)*x[1]**o+(0.288786527052)*x[1]+(0.87096784221)*x[2]**o+(0.967565754848)*x[2]
-        arg[0,3,0,0]=(-0.154669358868)*x[0]**o+(-0.449349763143)*x[0]+(-0.692997905123)*x[1]**o+(0.666308436198)*x[1]+(0.0638963436229)*x[2]**o+(-0.318233405188)*x[2]
-        arg[0,3,0,1]=(0.951324381413)*x[0]**o+(0.10400502165)*x[0]+(-0.910416795399)*x[1]**o+(-0.931501370526)*x[1]+(0.455893141186)*x[2]**o+(0.536556088937)*x[2]
-        arg[0,3,1,0]=(-0.315779909544)*x[0]**o+(0.189718508813)*x[0]+(0.0995068185023)*x[1]**o+(-0.863775500494)*x[1]+(0.99696081153)*x[2]**o+(0.0941784151393)*x[2]
-        arg[0,3,1,1]=(0.122766381329)*x[0]**o+(-0.953220464103)*x[0]+(-0.853780873931)*x[1]**o+(-0.719623724002)*x[1]+(-0.58783153111)*x[2]**o+(-0.919075056141)*x[2]
-        arg[0,3,2,0]=(-0.740349380942)*x[0]**o+(-0.0161629946027)*x[0]+(0.790593892223)*x[1]**o+(0.81563688519)*x[1]+(0.515002236312)*x[2]**o+(0.906399338047)*x[2]
-        arg[0,3,2,1]=(-0.21876846821)*x[0]**o+(0.099226679818)*x[0]+(-0.501220667305)*x[1]**o+(-0.645539150063)*x[1]+(0.705501523136)*x[2]**o+(-0.640426266054)*x[2]
-        arg[0,4,0,0]=(0.382430876525)*x[0]**o+(0.728752519135)*x[0]+(-0.696198853186)*x[1]**o+(0.181187001577)*x[1]+(0.818931936956)*x[2]**o+(0.267607197602)*x[2]
-        arg[0,4,0,1]=(0.667658893159)*x[0]**o+(0.129176508255)*x[0]+(0.579266506883)*x[1]**o+(-0.27290178784)*x[1]+(0.804307104985)*x[2]**o+(-0.384179099369)*x[2]
-        arg[0,4,1,0]=(0.472611036284)*x[0]**o+(0.532026319531)*x[0]+(-0.11900311657)*x[1]**o+(0.818635083182)*x[1]+(-0.127618053257)*x[2]**o+(-0.8464024968)*x[2]
-        arg[0,4,1,1]=(-0.52572498077)*x[0]**o+(-0.222527963121)*x[0]+(-0.733344395469)*x[1]**o+(-0.519230573211)*x[1]+(0.550298161034)*x[2]**o+(-0.091253041563)*x[2]
-        arg[0,4,2,0]=(-0.995556194807)*x[0]**o+(-0.157265619525)*x[0]+(0.646987111139)*x[1]**o+(0.114269194694)*x[1]+(0.787559342851)*x[2]**o+(0.655874189666)*x[2]
-        arg[0,4,2,1]=(-0.534706379451)*x[0]**o+(0.89989539183)*x[0]+(0.584227019406)*x[1]**o+(-0.261650143902)*x[1]+(-0.0741247974759)*x[2]**o+(-0.646603374886)*x[2]
-        arg[1,0,0,0]=(-0.16346294005)*x[0]**o+(0.515625993676)*x[0]+(-0.0294710658489)*x[1]**o+(-0.886489878353)*x[1]+(0.184376222466)*x[2]**o+(0.872455440027)*x[2]
-        arg[1,0,0,1]=(-0.239569565644)*x[0]**o+(-0.0196989227301)*x[0]+(-0.333999804595)*x[1]**o+(0.79703425655)*x[1]+(0.332925813867)*x[2]**o+(0.384766118619)*x[2]
-        arg[1,0,1,0]=(0.337775521215)*x[0]**o+(-0.214105347244)*x[0]+(-0.055476365922)*x[1]**o+(-0.511469291523)*x[1]+(0.390455425321)*x[2]**o+(0.346749928211)*x[2]
-        arg[1,0,1,1]=(0.255034684548)*x[0]**o+(-0.975969854422)*x[0]+(-0.588154151576)*x[1]**o+(0.981825996023)*x[1]+(-0.16323013592)*x[2]**o+(-0.165779157778)*x[2]
-        arg[1,0,2,0]=(-0.421647673573)*x[0]**o+(0.0892056009306)*x[0]+(-0.659566191892)*x[1]**o+(-0.640769435519)*x[1]+(-0.5474352085)*x[2]**o+(0.619855556292)*x[2]
-        arg[1,0,2,1]=(0.678408254014)*x[0]**o+(0.114013125353)*x[0]+(0.222310135576)*x[1]**o+(-0.297909583371)*x[1]+(0.885716237809)*x[2]**o+(0.151576219626)*x[2]
-        arg[1,1,0,0]=(-0.724825546043)*x[0]**o+(-0.796280833482)*x[0]+(0.894034526494)*x[1]**o+(-0.496334573913)*x[1]+(0.161130154754)*x[2]**o+(0.0137999166704)*x[2]
-        arg[1,1,0,1]=(-0.959049520871)*x[0]**o+(0.0727868983195)*x[0]+(-0.0475524824482)*x[1]**o+(0.8098016511)*x[1]+(0.154268238454)*x[2]**o+(-0.0583213692933)*x[2]
-        arg[1,1,1,0]=(-0.684320939672)*x[0]**o+(-0.841165491324)*x[0]+(0.307147508965)*x[1]**o+(0.0204906256209)*x[1]+(0.658432728833)*x[2]**o+(0.398570233826)*x[2]
-        arg[1,1,1,1]=(0.921894102193)*x[0]**o+(0.33017900913)*x[0]+(0.566856960125)*x[1]**o+(0.826695387569)*x[1]+(-0.6253390282)*x[2]**o+(-0.527610353599)*x[2]
-        arg[1,1,2,0]=(0.0640251272456)*x[0]**o+(0.789847887603)*x[0]+(-0.00457885872972)*x[1]**o+(-0.24681292381)*x[1]+(-0.0832674042894)*x[2]**o+(-0.254280656434)*x[2]
-        arg[1,1,2,1]=(0.786208197486)*x[0]**o+(0.519575725184)*x[0]+(-0.452657209679)*x[1]**o+(0.36570806994)*x[1]+(0.875049922923)*x[2]**o+(0.881026792786)*x[2]
-        arg[1,2,0,0]=(-0.415919514711)*x[0]**o+(-0.933890170641)*x[0]+(0.717990882823)*x[1]**o+(0.355555237378)*x[1]+(0.458971778535)*x[2]**o+(0.888647676837)*x[2]
-        arg[1,2,0,1]=(-0.453925437723)*x[0]**o+(0.153501471971)*x[0]+(0.815830410181)*x[1]**o+(-0.519500430324)*x[1]+(-0.791530261324)*x[2]**o+(0.849179201427)*x[2]
-        arg[1,2,1,0]=(0.299736697301)*x[0]**o+(0.645276033981)*x[0]+(-0.731636401343)*x[1]**o+(0.127189134157)*x[1]+(0.891427235216)*x[2]**o+(0.750052326597)*x[2]
-        arg[1,2,1,1]=(-0.987392548561)*x[0]**o+(0.129053618821)*x[0]+(0.220541501123)*x[1]**o+(0.276873448998)*x[1]+(0.645231056419)*x[2]**o+(0.776634462468)*x[2]
-        arg[1,2,2,0]=(-0.879738240565)*x[0]**o+(-0.0352288276658)*x[0]+(-0.247550105519)*x[1]**o+(0.782133317388)*x[1]+(-0.948666864992)*x[2]**o+(0.310357478071)*x[2]
-        arg[1,2,2,1]=(-0.606778611022)*x[0]**o+(0.964356172073)*x[0]+(-0.520291905065)*x[1]**o+(-0.219411824153)*x[1]+(-0.405356968701)*x[2]**o+(0.969492630653)*x[2]
-        arg[1,3,0,0]=(-0.991624055852)*x[0]**o+(-0.762240034313)*x[0]+(0.423262307551)*x[1]**o+(-0.05789904696)*x[1]+(-0.696181866276)*x[2]**o+(-0.327406198937)*x[2]
-        arg[1,3,0,1]=(-0.614181964006)*x[0]**o+(0.927675019363)*x[0]+(-0.750120185372)*x[1]**o+(0.440548313639)*x[1]+(-0.116776982636)*x[2]**o+(-0.799181582827)*x[2]
-        arg[1,3,1,0]=(0.286032474963)*x[0]**o+(0.391407042942)*x[0]+(-0.268363949002)*x[1]**o+(-0.421319501252)*x[1]+(-0.318595882607)*x[2]**o+(0.273120761382)*x[2]
-        arg[1,3,1,1]=(0.918425098597)*x[0]**o+(-0.211260796786)*x[0]+(-0.793780530123)*x[1]**o+(-0.839335876894)*x[1]+(-0.595786792228)*x[2]**o+(-0.592690829684)*x[2]
-        arg[1,3,2,0]=(-0.959108168319)*x[0]**o+(-0.94492160223)*x[0]+(0.0778030192626)*x[1]**o+(-0.169988420265)*x[1]+(0.042653831433)*x[2]**o+(-0.595426371148)*x[2]
-        arg[1,3,2,1]=(0.897478414413)*x[0]**o+(-0.222864711011)*x[0]+(0.900965727203)*x[1]**o+(0.501243022513)*x[1]+(0.75496626209)*x[2]**o+(0.312225549338)*x[2]
-        arg[1,4,0,0]=(0.168321984115)*x[0]**o+(-0.495995847038)*x[0]+(0.595773350289)*x[1]**o+(-0.914906345927)*x[1]+(0.224831726299)*x[2]**o+(-0.0743642212453)*x[2]
-        arg[1,4,0,1]=(0.352717252696)*x[0]**o+(-0.873077111264)*x[0]+(-0.296366541486)*x[1]**o+(-0.00338438754009)*x[1]+(0.0294923296914)*x[2]**o+(-0.067479335313)*x[2]
-        arg[1,4,1,0]=(-0.518757232583)*x[0]**o+(0.463948954744)*x[0]+(0.712607983792)*x[1]**o+(0.717184663437)*x[1]+(0.323391383016)*x[2]**o+(-0.225868711026)*x[2]
-        arg[1,4,1,1]=(-0.24381531137)*x[0]**o+(0.630251169076)*x[0]+(0.70462966259)*x[1]**o+(-0.125357204688)*x[1]+(-0.258633435955)*x[2]**o+(0.902171387163)*x[2]
-        arg[1,4,2,0]=(-0.632179111447)*x[0]**o+(-0.59290738268)*x[0]+(-0.825795231706)*x[1]**o+(0.399660693305)*x[1]+(0.0620015248102)*x[2]**o+(-0.451556558781)*x[2]
-        arg[1,4,2,1]=(-0.858145688916)*x[0]**o+(-0.787993091462)*x[0]+(0.803723603768)*x[1]**o+(-0.835043986384)*x[1]+(0.467577922972)*x[2]**o+(0.819139387663)*x[2]
-        arg[2,0,0,0]=(0.274886550898)*x[0]**o+(-0.0742978734335)*x[0]+(-0.773015479116)*x[1]**o+(-0.138971598539)*x[1]+(-0.702175483988)*x[2]**o+(0.9147072714)*x[2]
-        arg[2,0,0,1]=(-0.598714805644)*x[0]**o+(0.11878664701)*x[0]+(-0.554608391808)*x[1]**o+(-0.734151257491)*x[1]+(0.234629053469)*x[2]**o+(0.911072319646)*x[2]
-        arg[2,0,1,0]=(-0.83850906403)*x[0]**o+(0.799369711531)*x[0]+(0.436211860763)*x[1]**o+(-0.855173818525)*x[1]+(0.256241482884)*x[2]**o+(0.657883842259)*x[2]
-        arg[2,0,1,1]=(-0.724328143383)*x[0]**o+(-0.781110608395)*x[0]+(-0.987464957106)*x[1]**o+(0.936448332957)*x[1]+(0.711870454531)*x[2]**o+(0.64958966746)*x[2]
-        arg[2,0,2,0]=(0.485490298364)*x[0]**o+(-0.648402414524)*x[0]+(0.0493575279485)*x[1]**o+(-0.168695660031)*x[1]+(0.236500977054)*x[2]**o+(-0.699035972752)*x[2]
-        arg[2,0,2,1]=(-0.508561382238)*x[0]**o+(0.0587152225749)*x[0]+(-0.92072872998)*x[1]**o+(-0.210536816562)*x[1]+(0.735465423941)*x[2]**o+(0.557002016885)*x[2]
-        arg[2,1,0,0]=(-0.301683530613)*x[0]**o+(-0.501004347082)*x[0]+(-0.415125116853)*x[1]**o+(-0.975209043974)*x[1]+(0.0952958379219)*x[2]**o+(-0.882009529251)*x[2]
-        arg[2,1,0,1]=(0.569047454657)*x[0]**o+(0.87107862461)*x[0]+(0.977655371485)*x[1]**o+(-0.870823933133)*x[1]+(-0.12817645442)*x[2]**o+(-0.412450404053)*x[2]
-        arg[2,1,1,0]=(0.532638832559)*x[0]**o+(-0.669778224526)*x[0]+(0.516969768896)*x[1]**o+(0.725495018612)*x[1]+(0.604820640277)*x[2]**o+(-0.537483520132)*x[2]
-        arg[2,1,1,1]=(-0.413776169533)*x[0]**o+(0.19037961067)*x[0]+(-0.109551737415)*x[1]**o+(-0.195599236834)*x[1]+(-0.183237365211)*x[2]**o+(0.0279625528407)*x[2]
-        arg[2,1,2,0]=(-0.46089173487)*x[0]**o+(-0.151158992117)*x[0]+(0.359508089079)*x[1]**o+(-0.0808350778984)*x[1]+(0.845464278946)*x[2]**o+(0.177891463715)*x[2]
-        arg[2,1,2,1]=(0.416828200435)*x[0]**o+(0.763110094817)*x[0]+(0.855595717948)*x[1]**o+(0.379358815658)*x[1]+(0.954688280021)*x[2]**o+(-0.808098938468)*x[2]
-        arg[2,2,0,0]=(-0.697342667428)*x[0]**o+(-0.855608259014)*x[0]+(0.866084171318)*x[1]**o+(0.632470977708)*x[1]+(-0.399703926338)*x[2]**o+(0.211173996927)*x[2]
-        arg[2,2,0,1]=(-0.940742486357)*x[0]**o+(0.249267367828)*x[0]+(0.197336418576)*x[1]**o+(-0.0573784352507)*x[1]+(-0.328108062127)*x[2]**o+(0.570204614968)*x[2]
-        arg[2,2,1,0]=(0.134960606335)*x[0]**o+(0.490123643194)*x[0]+(-0.102294210304)*x[1]**o+(0.427727810449)*x[1]+(-0.158572569775)*x[2]**o+(-0.165504764483)*x[2]
-        arg[2,2,1,1]=(-0.427912549906)*x[0]**o+(-0.311524081823)*x[0]+(0.220211421031)*x[1]**o+(0.123679381711)*x[1]+(0.593149361283)*x[2]**o+(-0.283233437917)*x[2]
-        arg[2,2,2,0]=(0.901179489164)*x[0]**o+(0.292780095159)*x[0]+(-0.295149620179)*x[1]**o+(0.860483795735)*x[1]+(0.848872993178)*x[2]**o+(-0.612494025994)*x[2]
-        arg[2,2,2,1]=(0.904689835334)*x[0]**o+(0.33689603833)*x[0]+(0.0765595244364)*x[1]**o+(0.215174063849)*x[1]+(0.973122153293)*x[2]**o+(-0.49840689696)*x[2]
-        arg[2,3,0,0]=(0.973713543725)*x[0]**o+(0.0727815483094)*x[0]+(-0.0723336244169)*x[1]**o+(-0.102547958784)*x[1]+(0.573980704603)*x[2]**o+(0.784756916348)*x[2]
-        arg[2,3,0,1]=(0.871042616423)*x[0]**o+(-0.966021391258)*x[0]+(0.9402258232)*x[1]**o+(0.163522806825)*x[1]+(-0.260871238896)*x[2]**o+(0.68201099906)*x[2]
-        arg[2,3,1,0]=(0.916349358422)*x[0]**o+(-0.923720463388)*x[0]+(0.814116732807)*x[1]**o+(-0.521079005717)*x[1]+(-0.996963157941)*x[2]**o+(-0.251248775427)*x[2]
-        arg[2,3,1,1]=(0.752568485119)*x[0]**o+(-0.134517175046)*x[0]+(0.691477362575)*x[1]**o+(-0.864047765263)*x[1]+(0.0632525427291)*x[2]**o+(0.27617797274)*x[2]
-        arg[2,3,2,0]=(0.028335700298)*x[0]**o+(-0.853592964385)*x[0]+(0.554336703119)*x[1]**o+(0.0895176258833)*x[1]+(-0.932756504547)*x[2]**o+(-0.18860048352)*x[2]
-        arg[2,3,2,1]=(-0.959044064582)*x[0]**o+(-0.287170878547)*x[0]+(-0.897642111161)*x[1]**o+(0.831990727144)*x[1]+(-0.92281664542)*x[2]**o+(0.96636082362)*x[2]
-        arg[2,4,0,0]=(-0.626564609232)*x[0]**o+(0.20773355223)*x[0]+(0.356017212402)*x[1]**o+(0.308760707002)*x[1]+(0.206460527236)*x[2]**o+(-0.343529244774)*x[2]
-        arg[2,4,0,1]=(0.176611466931)*x[0]**o+(-0.838329948167)*x[0]+(0.354707816246)*x[1]**o+(0.649522955877)*x[1]+(0.545930184768)*x[2]**o+(-0.859928910201)*x[2]
-        arg[2,4,1,0]=(-0.487262434448)*x[0]**o+(0.162363232036)*x[0]+(0.0818357859487)*x[1]**o+(-0.0114240923675)*x[1]+(0.391159686245)*x[2]**o+(0.591883722488)*x[2]
-        arg[2,4,1,1]=(0.89780703396)*x[0]**o+(-0.672932240376)*x[0]+(0.166200721661)*x[1]**o+(0.556829138872)*x[1]+(0.420925668076)*x[2]**o+(0.543645319787)*x[2]
-        arg[2,4,2,0]=(-0.25384993317)*x[0]**o+(0.347964473446)*x[0]+(-0.579025655422)*x[1]**o+(-0.790871375452)*x[1]+(0.937422382916)*x[2]**o+(0.34952117072)*x[2]
-        arg[2,4,2,1]=(-0.979549805807)*x[0]**o+(-0.514338851166)*x[0]+(0.590481348069)*x[1]**o+(0.70090898505)*x[1]+(0.0211126831373)*x[2]**o+(0.112132700392)*x[2]
-        arg[3,0,0,0]=(0.712615071708)*x[0]**o+(-0.395279000567)*x[0]+(0.572303465332)*x[1]**o+(-0.18990757808)*x[1]+(0.552173988053)*x[2]**o+(0.66384838566)*x[2]
-        arg[3,0,0,1]=(-0.144778596155)*x[0]**o+(0.587515130999)*x[0]+(-0.329480229216)*x[1]**o+(-0.67629797205)*x[1]+(0.132217152221)*x[2]**o+(0.688653172908)*x[2]
-        arg[3,0,1,0]=(0.540370436223)*x[0]**o+(0.34677963828)*x[0]+(0.554331354626)*x[1]**o+(0.936508271818)*x[1]+(-0.375652281911)*x[2]**o+(-0.599300575121)*x[2]
-        arg[3,0,1,1]=(0.534919542204)*x[0]**o+(-0.153133704085)*x[0]+(-0.121018513777)*x[1]**o+(0.850253887541)*x[1]+(-0.356227750213)*x[2]**o+(0.610895662256)*x[2]
-        arg[3,0,2,0]=(-0.29877753893)*x[0]**o+(0.0284310686839)*x[0]+(0.647432584397)*x[1]**o+(-0.215364318325)*x[1]+(-0.580839810547)*x[2]**o+(0.811531717828)*x[2]
-        arg[3,0,2,1]=(-0.166467908391)*x[0]**o+(0.75238635157)*x[0]+(0.387810278118)*x[1]**o+(0.516762295584)*x[1]+(-0.451298232627)*x[2]**o+(-0.877792995315)*x[2]
-        arg[3,1,0,0]=(0.732332840481)*x[0]**o+(0.0567319375815)*x[0]+(-0.405681445532)*x[1]**o+(0.866920327583)*x[1]+(0.744087567632)*x[2]**o+(-0.257414527262)*x[2]
-        arg[3,1,0,1]=(0.641165454863)*x[0]**o+(-0.880320701499)*x[0]+(-0.488201727677)*x[1]**o+(-0.604286576258)*x[1]+(-0.396469224601)*x[2]**o+(0.919924897798)*x[2]
-        arg[3,1,1,0]=(0.276953637864)*x[0]**o+(0.825294595252)*x[0]+(-0.00681547733671)*x[1]**o+(0.610898921858)*x[1]+(-0.113640919359)*x[2]**o+(-0.41745293894)*x[2]
-        arg[3,1,1,1]=(-0.0556423502541)*x[0]**o+(0.0992203569857)*x[0]+(0.26999259247)*x[1]**o+(0.687729401581)*x[1]+(-0.42626708563)*x[2]**o+(0.137838345424)*x[2]
-        arg[3,1,2,0]=(-0.82862652423)*x[0]**o+(0.384688571211)*x[0]+(-0.485754978842)*x[1]**o+(0.289363174139)*x[1]+(0.809823491656)*x[2]**o+(-0.468263092294)*x[2]
-        arg[3,1,2,1]=(0.330774389497)*x[0]**o+(0.29069658199)*x[0]+(-0.0852835960508)*x[1]**o+(-0.496327335153)*x[1]+(-0.701004642133)*x[2]**o+(-0.850968582466)*x[2]
-        arg[3,2,0,0]=(-0.211872121822)*x[0]**o+(-0.544218825487)*x[0]+(-0.554174609604)*x[1]**o+(0.28186606841)*x[1]+(0.272511831479)*x[2]**o+(0.130059249976)*x[2]
-        arg[3,2,0,1]=(0.496592232013)*x[0]**o+(-0.541037353713)*x[0]+(0.848137836475)*x[1]**o+(-0.508526127555)*x[1]+(0.468412010792)*x[2]**o+(0.0139501620456)*x[2]
-        arg[3,2,1,0]=(0.987830151765)*x[0]**o+(0.356732413851)*x[0]+(0.958334312356)*x[1]**o+(0.244871130977)*x[1]+(0.200379593754)*x[2]**o+(0.105621740392)*x[2]
-        arg[3,2,1,1]=(-0.751728177957)*x[0]**o+(-0.71132733669)*x[0]+(-0.792801223542)*x[1]**o+(0.932243495719)*x[1]+(0.278721571387)*x[2]**o+(0.16204818826)*x[2]
-        arg[3,2,2,0]=(-0.844470031769)*x[0]**o+(0.233237514806)*x[0]+(0.567935434819)*x[1]**o+(0.315504620349)*x[1]+(-0.886427966592)*x[2]**o+(-0.514415287917)*x[2]
-        arg[3,2,2,1]=(-0.113390105251)*x[0]**o+(-0.227293501546)*x[0]+(-0.501842049116)*x[1]**o+(-0.2393770551)*x[1]+(-0.636288744693)*x[2]**o+(-0.364637404491)*x[2]
-        arg[3,3,0,0]=(-0.454817772137)*x[0]**o+(0.0991199341563)*x[0]+(-0.891035204309)*x[1]**o+(-0.894694305011)*x[1]+(0.476722687543)*x[2]**o+(-0.616323189052)*x[2]
-        arg[3,3,0,1]=(-0.641204554575)*x[0]**o+(0.418692269871)*x[0]+(-0.497353963751)*x[1]**o+(0.443236835952)*x[1]+(0.771380772745)*x[2]**o+(0.913143060887)*x[2]
-        arg[3,3,1,0]=(0.340731926682)*x[0]**o+(0.231807962221)*x[0]+(-0.35677786751)*x[1]**o+(-0.171036937234)*x[1]+(-0.697055158669)*x[2]**o+(0.58599029377)*x[2]
-        arg[3,3,1,1]=(0.754473421244)*x[0]**o+(0.658054374737)*x[0]+(0.696211053347)*x[1]**o+(0.401778988971)*x[1]+(0.121272999311)*x[2]**o+(0.509498775106)*x[2]
-        arg[3,3,2,0]=(-0.0930185763819)*x[0]**o+(-0.0798587560353)*x[0]+(-0.0370412597984)*x[1]**o+(-0.440515510516)*x[1]+(-0.855771461636)*x[2]**o+(0.216680759655)*x[2]
-        arg[3,3,2,1]=(0.763831414202)*x[0]**o+(0.207864762366)*x[0]+(-0.815789136019)*x[1]**o+(-0.808073090924)*x[1]+(0.97581837589)*x[2]**o+(-0.560842077761)*x[2]
-        arg[3,4,0,0]=(-0.241036031728)*x[0]**o+(-0.634789191932)*x[0]+(-0.321678486205)*x[1]**o+(-0.754677817943)*x[1]+(-0.078216578971)*x[2]**o+(-0.924028965218)*x[2]
-        arg[3,4,0,1]=(-0.851189221011)*x[0]**o+(0.425561499671)*x[0]+(-0.293305262525)*x[1]**o+(-0.191023566093)*x[1]+(-0.810379587547)*x[2]**o+(0.593883389908)*x[2]
-        arg[3,4,1,0]=(0.905139594202)*x[0]**o+(-0.904771548418)*x[0]+(0.228410726617)*x[1]**o+(0.327253374618)*x[1]+(-0.214649399974)*x[2]**o+(-0.766320611635)*x[2]
-        arg[3,4,1,1]=(0.494131404603)*x[0]**o+(-0.902996362946)*x[0]+(-0.88445944326)*x[1]**o+(-0.458372750995)*x[1]+(-0.306694339897)*x[2]**o+(0.0486088169447)*x[2]
-        arg[3,4,2,0]=(0.856321787222)*x[0]**o+(0.314315880734)*x[0]+(-0.996526923819)*x[1]**o+(-0.905235331678)*x[1]+(-0.775589521164)*x[2]**o+(0.812013030327)*x[2]
-        arg[3,4,2,1]=(0.271281347275)*x[0]**o+(-0.600074638655)*x[0]+(-0.16332213744)*x[1]**o+(-0.483539594381)*x[1]+(0.820910011338)*x[2]**o+(0.14947223917)*x[2]
-        ref[0,0,0,0]=(0.412268765993)*x_ref[0]**o+(-0.31214585911)*x_ref[0]+(0.153520487818)*x_ref[1]**o+(-0.3104168266)*x_ref[1]+(0.909798069186)*x_ref[2]**o+(0.742916044571)*x_ref[2]
-        ref[0,0,0,1]=(0.0735781063807)*x_ref[0]**o+(0.725527279895)*x_ref[0]+(-0.884760504783)*x_ref[1]**o+(0.751678022946)*x_ref[1]+(-0.169364499242)*x_ref[2]**o+(-0.946699946704)*x_ref[2]
-        ref[0,0,1,0]=(-0.308928255723)*x_ref[0]**o+(-0.601764425359)*x_ref[0]+(-0.176466074749)*x_ref[1]**o+(-0.14838705699)*x_ref[1]+(0.897444985593)*x_ref[2]**o+(-0.0552696055317)*x_ref[2]
-        ref[0,0,1,1]=(0.278269305614)*x_ref[0]**o+(-0.419731200355)*x_ref[0]+(0.450955076279)*x_ref[1]**o+(-0.899203207333)*x_ref[1]+(-0.458812838787)*x_ref[2]**o+(0.507871397895)*x_ref[2]
-        ref[0,0,2,0]=(0.887873653495)*x_ref[0]**o+(0.130110213077)*x_ref[0]+(0.203761425496)*x_ref[1]**o+(-0.0563898018944)*x_ref[1]+(0.0125548052261)*x_ref[2]**o+(-0.594578723877)*x_ref[2]
-        ref[0,0,2,1]=(-0.104210554142)*x_ref[0]**o+(-0.792596213906)*x_ref[0]+(0.570869430862)*x_ref[1]**o+(-0.798160727294)*x_ref[1]+(0.241269856254)*x_ref[2]**o+(0.194885978057)*x_ref[2]
-        ref[0,1,0,0]=(0.819550431682)*x_ref[0]**o+(-0.239970258367)*x_ref[0]+(-0.960362264523)*x_ref[1]**o+(0.872093886273)*x_ref[1]+(-0.857325000718)*x_ref[2]**o+(-0.907620072404)*x_ref[2]
-        ref[0,1,0,1]=(-0.989011816788)*x_ref[0]**o+(0.853577413178)*x_ref[0]+(-0.160335863166)*x_ref[1]**o+(-0.751266166108)*x_ref[1]+(0.631146799273)*x_ref[2]**o+(0.739741622363)*x_ref[2]
-        ref[0,1,1,0]=(0.162828987854)*x_ref[0]**o+(-0.200652438446)*x_ref[0]+(-0.890837153528)*x_ref[1]**o+(-0.972029967593)*x_ref[1]+(0.850395155009)*x_ref[2]**o+(-0.0868272213807)*x_ref[2]
-        ref[0,1,1,1]=(-0.770711232994)*x_ref[0]**o+(0.986518762896)*x_ref[0]+(0.0970713645745)*x_ref[1]**o+(0.996843418865)*x_ref[1]+(0.208134397469)*x_ref[2]**o+(0.946600905711)*x_ref[2]
-        ref[0,1,2,0]=(-0.543213476288)*x_ref[0]**o+(0.0335009416664)*x_ref[0]+(0.165751788147)*x_ref[1]**o+(0.660276877927)*x_ref[1]+(-0.485925597349)*x_ref[2]**o+(-0.632302900376)*x_ref[2]
-        ref[0,1,2,1]=(0.175798920586)*x_ref[0]**o+(-0.42873239224)*x_ref[0]+(0.164896129395)*x_ref[1]**o+(0.662142729145)*x_ref[1]+(-0.425944275652)*x_ref[2]**o+(0.306978282183)*x_ref[2]
-        ref[0,2,0,0]=(0.790303828628)*x_ref[0]**o+(0.169346034559)*x_ref[0]+(-0.901026918205)*x_ref[1]**o+(0.661856377517)*x_ref[1]+(0.194850846261)*x_ref[2]**o+(0.155282302183)*x_ref[2]
-        ref[0,2,0,1]=(-0.43947970094)*x_ref[0]**o+(-0.535569903832)*x_ref[0]+(-0.534035397281)*x_ref[1]**o+(-0.169724793112)*x_ref[1]+(-0.717226228021)*x_ref[2]**o+(0.771292292609)*x_ref[2]
-        ref[0,2,1,0]=(-0.424991151717)*x_ref[0]**o+(-0.0837800409811)*x_ref[0]+(-0.747139428246)*x_ref[1]**o+(0.739025612454)*x_ref[1]+(0.464486611081)*x_ref[2]**o+(0.824926522179)*x_ref[2]
-        ref[0,2,1,1]=(-0.4666399509)*x_ref[0]**o+(-0.479130555457)*x_ref[0]+(-0.676718441278)*x_ref[1]**o+(0.352685580535)*x_ref[1]+(0.537789487962)*x_ref[2]**o+(-0.774383681009)*x_ref[2]
-        ref[0,2,2,0]=(-0.30983510311)*x_ref[0]**o+(0.00141603592636)*x_ref[0]+(0.546192108985)*x_ref[1]**o+(0.229628329192)*x_ref[1]+(0.788466929747)*x_ref[2]**o+(-0.169587087096)*x_ref[2]
-        ref[0,2,2,1]=(0.810282347322)*x_ref[0]**o+(0.961056346191)*x_ref[0]+(0.204622339898)*x_ref[1]**o+(0.288786527052)*x_ref[1]+(0.87096784221)*x_ref[2]**o+(0.967565754848)*x_ref[2]
-        ref[0,3,0,0]=(-0.154669358868)*x_ref[0]**o+(-0.449349763143)*x_ref[0]+(-0.692997905123)*x_ref[1]**o+(0.666308436198)*x_ref[1]+(0.0638963436229)*x_ref[2]**o+(-0.318233405188)*x_ref[2]
-        ref[0,3,0,1]=(0.951324381413)*x_ref[0]**o+(0.10400502165)*x_ref[0]+(-0.910416795399)*x_ref[1]**o+(-0.931501370526)*x_ref[1]+(0.455893141186)*x_ref[2]**o+(0.536556088937)*x_ref[2]
-        ref[0,3,1,0]=(-0.315779909544)*x_ref[0]**o+(0.189718508813)*x_ref[0]+(0.0995068185023)*x_ref[1]**o+(-0.863775500494)*x_ref[1]+(0.99696081153)*x_ref[2]**o+(0.0941784151393)*x_ref[2]
-        ref[0,3,1,1]=(0.122766381329)*x_ref[0]**o+(-0.953220464103)*x_ref[0]+(-0.853780873931)*x_ref[1]**o+(-0.719623724002)*x_ref[1]+(-0.58783153111)*x_ref[2]**o+(-0.919075056141)*x_ref[2]
-        ref[0,3,2,0]=(-0.740349380942)*x_ref[0]**o+(-0.0161629946027)*x_ref[0]+(0.790593892223)*x_ref[1]**o+(0.81563688519)*x_ref[1]+(0.515002236312)*x_ref[2]**o+(0.906399338047)*x_ref[2]
-        ref[0,3,2,1]=(-0.21876846821)*x_ref[0]**o+(0.099226679818)*x_ref[0]+(-0.501220667305)*x_ref[1]**o+(-0.645539150063)*x_ref[1]+(0.705501523136)*x_ref[2]**o+(-0.640426266054)*x_ref[2]
-        ref[0,4,0,0]=(0.382430876525)*x_ref[0]**o+(0.728752519135)*x_ref[0]+(-0.696198853186)*x_ref[1]**o+(0.181187001577)*x_ref[1]+(0.818931936956)*x_ref[2]**o+(0.267607197602)*x_ref[2]
-        ref[0,4,0,1]=(0.667658893159)*x_ref[0]**o+(0.129176508255)*x_ref[0]+(0.579266506883)*x_ref[1]**o+(-0.27290178784)*x_ref[1]+(0.804307104985)*x_ref[2]**o+(-0.384179099369)*x_ref[2]
-        ref[0,4,1,0]=(0.472611036284)*x_ref[0]**o+(0.532026319531)*x_ref[0]+(-0.11900311657)*x_ref[1]**o+(0.818635083182)*x_ref[1]+(-0.127618053257)*x_ref[2]**o+(-0.8464024968)*x_ref[2]
-        ref[0,4,1,1]=(-0.52572498077)*x_ref[0]**o+(-0.222527963121)*x_ref[0]+(-0.733344395469)*x_ref[1]**o+(-0.519230573211)*x_ref[1]+(0.550298161034)*x_ref[2]**o+(-0.091253041563)*x_ref[2]
-        ref[0,4,2,0]=(-0.995556194807)*x_ref[0]**o+(-0.157265619525)*x_ref[0]+(0.646987111139)*x_ref[1]**o+(0.114269194694)*x_ref[1]+(0.787559342851)*x_ref[2]**o+(0.655874189666)*x_ref[2]
-        ref[0,4,2,1]=(-0.534706379451)*x_ref[0]**o+(0.89989539183)*x_ref[0]+(0.584227019406)*x_ref[1]**o+(-0.261650143902)*x_ref[1]+(-0.0741247974759)*x_ref[2]**o+(-0.646603374886)*x_ref[2]
-        ref[1,0,0,0]=(-0.16346294005)*x_ref[0]**o+(0.515625993676)*x_ref[0]+(-0.0294710658489)*x_ref[1]**o+(-0.886489878353)*x_ref[1]+(0.184376222466)*x_ref[2]**o+(0.872455440027)*x_ref[2]
-        ref[1,0,0,1]=(-0.239569565644)*x_ref[0]**o+(-0.0196989227301)*x_ref[0]+(-0.333999804595)*x_ref[1]**o+(0.79703425655)*x_ref[1]+(0.332925813867)*x_ref[2]**o+(0.384766118619)*x_ref[2]
-        ref[1,0,1,0]=(0.337775521215)*x_ref[0]**o+(-0.214105347244)*x_ref[0]+(-0.055476365922)*x_ref[1]**o+(-0.511469291523)*x_ref[1]+(0.390455425321)*x_ref[2]**o+(0.346749928211)*x_ref[2]
-        ref[1,0,1,1]=(0.255034684548)*x_ref[0]**o+(-0.975969854422)*x_ref[0]+(-0.588154151576)*x_ref[1]**o+(0.981825996023)*x_ref[1]+(-0.16323013592)*x_ref[2]**o+(-0.165779157778)*x_ref[2]
-        ref[1,0,2,0]=(-0.421647673573)*x_ref[0]**o+(0.0892056009306)*x_ref[0]+(-0.659566191892)*x_ref[1]**o+(-0.640769435519)*x_ref[1]+(-0.5474352085)*x_ref[2]**o+(0.619855556292)*x_ref[2]
-        ref[1,0,2,1]=(0.678408254014)*x_ref[0]**o+(0.114013125353)*x_ref[0]+(0.222310135576)*x_ref[1]**o+(-0.297909583371)*x_ref[1]+(0.885716237809)*x_ref[2]**o+(0.151576219626)*x_ref[2]
-        ref[1,1,0,0]=(-0.724825546043)*x_ref[0]**o+(-0.796280833482)*x_ref[0]+(0.894034526494)*x_ref[1]**o+(-0.496334573913)*x_ref[1]+(0.161130154754)*x_ref[2]**o+(0.0137999166704)*x_ref[2]
-        ref[1,1,0,1]=(-0.959049520871)*x_ref[0]**o+(0.0727868983195)*x_ref[0]+(-0.0475524824482)*x_ref[1]**o+(0.8098016511)*x_ref[1]+(0.154268238454)*x_ref[2]**o+(-0.0583213692933)*x_ref[2]
-        ref[1,1,1,0]=(-0.684320939672)*x_ref[0]**o+(-0.841165491324)*x_ref[0]+(0.307147508965)*x_ref[1]**o+(0.0204906256209)*x_ref[1]+(0.658432728833)*x_ref[2]**o+(0.398570233826)*x_ref[2]
-        ref[1,1,1,1]=(0.921894102193)*x_ref[0]**o+(0.33017900913)*x_ref[0]+(0.566856960125)*x_ref[1]**o+(0.826695387569)*x_ref[1]+(-0.6253390282)*x_ref[2]**o+(-0.527610353599)*x_ref[2]
-        ref[1,1,2,0]=(0.0640251272456)*x_ref[0]**o+(0.789847887603)*x_ref[0]+(-0.00457885872972)*x_ref[1]**o+(-0.24681292381)*x_ref[1]+(-0.0832674042894)*x_ref[2]**o+(-0.254280656434)*x_ref[2]
-        ref[1,1,2,1]=(0.786208197486)*x_ref[0]**o+(0.519575725184)*x_ref[0]+(-0.452657209679)*x_ref[1]**o+(0.36570806994)*x_ref[1]+(0.875049922923)*x_ref[2]**o+(0.881026792786)*x_ref[2]
-        ref[1,2,0,0]=(-0.415919514711)*x_ref[0]**o+(-0.933890170641)*x_ref[0]+(0.717990882823)*x_ref[1]**o+(0.355555237378)*x_ref[1]+(0.458971778535)*x_ref[2]**o+(0.888647676837)*x_ref[2]
-        ref[1,2,0,1]=(-0.453925437723)*x_ref[0]**o+(0.153501471971)*x_ref[0]+(0.815830410181)*x_ref[1]**o+(-0.519500430324)*x_ref[1]+(-0.791530261324)*x_ref[2]**o+(0.849179201427)*x_ref[2]
-        ref[1,2,1,0]=(0.299736697301)*x_ref[0]**o+(0.645276033981)*x_ref[0]+(-0.731636401343)*x_ref[1]**o+(0.127189134157)*x_ref[1]+(0.891427235216)*x_ref[2]**o+(0.750052326597)*x_ref[2]
-        ref[1,2,1,1]=(-0.987392548561)*x_ref[0]**o+(0.129053618821)*x_ref[0]+(0.220541501123)*x_ref[1]**o+(0.276873448998)*x_ref[1]+(0.645231056419)*x_ref[2]**o+(0.776634462468)*x_ref[2]
-        ref[1,2,2,0]=(-0.879738240565)*x_ref[0]**o+(-0.0352288276658)*x_ref[0]+(-0.247550105519)*x_ref[1]**o+(0.782133317388)*x_ref[1]+(-0.948666864992)*x_ref[2]**o+(0.310357478071)*x_ref[2]
-        ref[1,2,2,1]=(-0.606778611022)*x_ref[0]**o+(0.964356172073)*x_ref[0]+(-0.520291905065)*x_ref[1]**o+(-0.219411824153)*x_ref[1]+(-0.405356968701)*x_ref[2]**o+(0.969492630653)*x_ref[2]
-        ref[1,3,0,0]=(-0.991624055852)*x_ref[0]**o+(-0.762240034313)*x_ref[0]+(0.423262307551)*x_ref[1]**o+(-0.05789904696)*x_ref[1]+(-0.696181866276)*x_ref[2]**o+(-0.327406198937)*x_ref[2]
-        ref[1,3,0,1]=(-0.614181964006)*x_ref[0]**o+(0.927675019363)*x_ref[0]+(-0.750120185372)*x_ref[1]**o+(0.440548313639)*x_ref[1]+(-0.116776982636)*x_ref[2]**o+(-0.799181582827)*x_ref[2]
-        ref[1,3,1,0]=(0.286032474963)*x_ref[0]**o+(0.391407042942)*x_ref[0]+(-0.268363949002)*x_ref[1]**o+(-0.421319501252)*x_ref[1]+(-0.318595882607)*x_ref[2]**o+(0.273120761382)*x_ref[2]
-        ref[1,3,1,1]=(0.918425098597)*x_ref[0]**o+(-0.211260796786)*x_ref[0]+(-0.793780530123)*x_ref[1]**o+(-0.839335876894)*x_ref[1]+(-0.595786792228)*x_ref[2]**o+(-0.592690829684)*x_ref[2]
-        ref[1,3,2,0]=(-0.959108168319)*x_ref[0]**o+(-0.94492160223)*x_ref[0]+(0.0778030192626)*x_ref[1]**o+(-0.169988420265)*x_ref[1]+(0.042653831433)*x_ref[2]**o+(-0.595426371148)*x_ref[2]
-        ref[1,3,2,1]=(0.897478414413)*x_ref[0]**o+(-0.222864711011)*x_ref[0]+(0.900965727203)*x_ref[1]**o+(0.501243022513)*x_ref[1]+(0.75496626209)*x_ref[2]**o+(0.312225549338)*x_ref[2]
-        ref[1,4,0,0]=(0.168321984115)*x_ref[0]**o+(-0.495995847038)*x_ref[0]+(0.595773350289)*x_ref[1]**o+(-0.914906345927)*x_ref[1]+(0.224831726299)*x_ref[2]**o+(-0.0743642212453)*x_ref[2]
-        ref[1,4,0,1]=(0.352717252696)*x_ref[0]**o+(-0.873077111264)*x_ref[0]+(-0.296366541486)*x_ref[1]**o+(-0.00338438754009)*x_ref[1]+(0.0294923296914)*x_ref[2]**o+(-0.067479335313)*x_ref[2]
-        ref[1,4,1,0]=(-0.518757232583)*x_ref[0]**o+(0.463948954744)*x_ref[0]+(0.712607983792)*x_ref[1]**o+(0.717184663437)*x_ref[1]+(0.323391383016)*x_ref[2]**o+(-0.225868711026)*x_ref[2]
-        ref[1,4,1,1]=(-0.24381531137)*x_ref[0]**o+(0.630251169076)*x_ref[0]+(0.70462966259)*x_ref[1]**o+(-0.125357204688)*x_ref[1]+(-0.258633435955)*x_ref[2]**o+(0.902171387163)*x_ref[2]
-        ref[1,4,2,0]=(-0.632179111447)*x_ref[0]**o+(-0.59290738268)*x_ref[0]+(-0.825795231706)*x_ref[1]**o+(0.399660693305)*x_ref[1]+(0.0620015248102)*x_ref[2]**o+(-0.451556558781)*x_ref[2]
-        ref[1,4,2,1]=(-0.858145688916)*x_ref[0]**o+(-0.787993091462)*x_ref[0]+(0.803723603768)*x_ref[1]**o+(-0.835043986384)*x_ref[1]+(0.467577922972)*x_ref[2]**o+(0.819139387663)*x_ref[2]
-        ref[2,0,0,0]=(0.274886550898)*x_ref[0]**o+(-0.0742978734335)*x_ref[0]+(-0.773015479116)*x_ref[1]**o+(-0.138971598539)*x_ref[1]+(-0.702175483988)*x_ref[2]**o+(0.9147072714)*x_ref[2]
-        ref[2,0,0,1]=(-0.598714805644)*x_ref[0]**o+(0.11878664701)*x_ref[0]+(-0.554608391808)*x_ref[1]**o+(-0.734151257491)*x_ref[1]+(0.234629053469)*x_ref[2]**o+(0.911072319646)*x_ref[2]
-        ref[2,0,1,0]=(-0.83850906403)*x_ref[0]**o+(0.799369711531)*x_ref[0]+(0.436211860763)*x_ref[1]**o+(-0.855173818525)*x_ref[1]+(0.256241482884)*x_ref[2]**o+(0.657883842259)*x_ref[2]
-        ref[2,0,1,1]=(-0.724328143383)*x_ref[0]**o+(-0.781110608395)*x_ref[0]+(-0.987464957106)*x_ref[1]**o+(0.936448332957)*x_ref[1]+(0.711870454531)*x_ref[2]**o+(0.64958966746)*x_ref[2]
-        ref[2,0,2,0]=(0.485490298364)*x_ref[0]**o+(-0.648402414524)*x_ref[0]+(0.0493575279485)*x_ref[1]**o+(-0.168695660031)*x_ref[1]+(0.236500977054)*x_ref[2]**o+(-0.699035972752)*x_ref[2]
-        ref[2,0,2,1]=(-0.508561382238)*x_ref[0]**o+(0.0587152225749)*x_ref[0]+(-0.92072872998)*x_ref[1]**o+(-0.210536816562)*x_ref[1]+(0.735465423941)*x_ref[2]**o+(0.557002016885)*x_ref[2]
-        ref[2,1,0,0]=(-0.301683530613)*x_ref[0]**o+(-0.501004347082)*x_ref[0]+(-0.415125116853)*x_ref[1]**o+(-0.975209043974)*x_ref[1]+(0.0952958379219)*x_ref[2]**o+(-0.882009529251)*x_ref[2]
-        ref[2,1,0,1]=(0.569047454657)*x_ref[0]**o+(0.87107862461)*x_ref[0]+(0.977655371485)*x_ref[1]**o+(-0.870823933133)*x_ref[1]+(-0.12817645442)*x_ref[2]**o+(-0.412450404053)*x_ref[2]
-        ref[2,1,1,0]=(0.532638832559)*x_ref[0]**o+(-0.669778224526)*x_ref[0]+(0.516969768896)*x_ref[1]**o+(0.725495018612)*x_ref[1]+(0.604820640277)*x_ref[2]**o+(-0.537483520132)*x_ref[2]
-        ref[2,1,1,1]=(-0.413776169533)*x_ref[0]**o+(0.19037961067)*x_ref[0]+(-0.109551737415)*x_ref[1]**o+(-0.195599236834)*x_ref[1]+(-0.183237365211)*x_ref[2]**o+(0.0279625528407)*x_ref[2]
-        ref[2,1,2,0]=(-0.46089173487)*x_ref[0]**o+(-0.151158992117)*x_ref[0]+(0.359508089079)*x_ref[1]**o+(-0.0808350778984)*x_ref[1]+(0.845464278946)*x_ref[2]**o+(0.177891463715)*x_ref[2]
-        ref[2,1,2,1]=(0.416828200435)*x_ref[0]**o+(0.763110094817)*x_ref[0]+(0.855595717948)*x_ref[1]**o+(0.379358815658)*x_ref[1]+(0.954688280021)*x_ref[2]**o+(-0.808098938468)*x_ref[2]
-        ref[2,2,0,0]=(-0.697342667428)*x_ref[0]**o+(-0.855608259014)*x_ref[0]+(0.866084171318)*x_ref[1]**o+(0.632470977708)*x_ref[1]+(-0.399703926338)*x_ref[2]**o+(0.211173996927)*x_ref[2]
-        ref[2,2,0,1]=(-0.940742486357)*x_ref[0]**o+(0.249267367828)*x_ref[0]+(0.197336418576)*x_ref[1]**o+(-0.0573784352507)*x_ref[1]+(-0.328108062127)*x_ref[2]**o+(0.570204614968)*x_ref[2]
-        ref[2,2,1,0]=(0.134960606335)*x_ref[0]**o+(0.490123643194)*x_ref[0]+(-0.102294210304)*x_ref[1]**o+(0.427727810449)*x_ref[1]+(-0.158572569775)*x_ref[2]**o+(-0.165504764483)*x_ref[2]
-        ref[2,2,1,1]=(-0.427912549906)*x_ref[0]**o+(-0.311524081823)*x_ref[0]+(0.220211421031)*x_ref[1]**o+(0.123679381711)*x_ref[1]+(0.593149361283)*x_ref[2]**o+(-0.283233437917)*x_ref[2]
-        ref[2,2,2,0]=(0.901179489164)*x_ref[0]**o+(0.292780095159)*x_ref[0]+(-0.295149620179)*x_ref[1]**o+(0.860483795735)*x_ref[1]+(0.848872993178)*x_ref[2]**o+(-0.612494025994)*x_ref[2]
-        ref[2,2,2,1]=(0.904689835334)*x_ref[0]**o+(0.33689603833)*x_ref[0]+(0.0765595244364)*x_ref[1]**o+(0.215174063849)*x_ref[1]+(0.973122153293)*x_ref[2]**o+(-0.49840689696)*x_ref[2]
-        ref[2,3,0,0]=(0.973713543725)*x_ref[0]**o+(0.0727815483094)*x_ref[0]+(-0.0723336244169)*x_ref[1]**o+(-0.102547958784)*x_ref[1]+(0.573980704603)*x_ref[2]**o+(0.784756916348)*x_ref[2]
-        ref[2,3,0,1]=(0.871042616423)*x_ref[0]**o+(-0.966021391258)*x_ref[0]+(0.9402258232)*x_ref[1]**o+(0.163522806825)*x_ref[1]+(-0.260871238896)*x_ref[2]**o+(0.68201099906)*x_ref[2]
-        ref[2,3,1,0]=(0.916349358422)*x_ref[0]**o+(-0.923720463388)*x_ref[0]+(0.814116732807)*x_ref[1]**o+(-0.521079005717)*x_ref[1]+(-0.996963157941)*x_ref[2]**o+(-0.251248775427)*x_ref[2]
-        ref[2,3,1,1]=(0.752568485119)*x_ref[0]**o+(-0.134517175046)*x_ref[0]+(0.691477362575)*x_ref[1]**o+(-0.864047765263)*x_ref[1]+(0.0632525427291)*x_ref[2]**o+(0.27617797274)*x_ref[2]
-        ref[2,3,2,0]=(0.028335700298)*x_ref[0]**o+(-0.853592964385)*x_ref[0]+(0.554336703119)*x_ref[1]**o+(0.0895176258833)*x_ref[1]+(-0.932756504547)*x_ref[2]**o+(-0.18860048352)*x_ref[2]
-        ref[2,3,2,1]=(-0.959044064582)*x_ref[0]**o+(-0.287170878547)*x_ref[0]+(-0.897642111161)*x_ref[1]**o+(0.831990727144)*x_ref[1]+(-0.92281664542)*x_ref[2]**o+(0.96636082362)*x_ref[2]
-        ref[2,4,0,0]=(-0.626564609232)*x_ref[0]**o+(0.20773355223)*x_ref[0]+(0.356017212402)*x_ref[1]**o+(0.308760707002)*x_ref[1]+(0.206460527236)*x_ref[2]**o+(-0.343529244774)*x_ref[2]
-        ref[2,4,0,1]=(0.176611466931)*x_ref[0]**o+(-0.838329948167)*x_ref[0]+(0.354707816246)*x_ref[1]**o+(0.649522955877)*x_ref[1]+(0.545930184768)*x_ref[2]**o+(-0.859928910201)*x_ref[2]
-        ref[2,4,1,0]=(-0.487262434448)*x_ref[0]**o+(0.162363232036)*x_ref[0]+(0.0818357859487)*x_ref[1]**o+(-0.0114240923675)*x_ref[1]+(0.391159686245)*x_ref[2]**o+(0.591883722488)*x_ref[2]
-        ref[2,4,1,1]=(0.89780703396)*x_ref[0]**o+(-0.672932240376)*x_ref[0]+(0.166200721661)*x_ref[1]**o+(0.556829138872)*x_ref[1]+(0.420925668076)*x_ref[2]**o+(0.543645319787)*x_ref[2]
-        ref[2,4,2,0]=(-0.25384993317)*x_ref[0]**o+(0.347964473446)*x_ref[0]+(-0.579025655422)*x_ref[1]**o+(-0.790871375452)*x_ref[1]+(0.937422382916)*x_ref[2]**o+(0.34952117072)*x_ref[2]
-        ref[2,4,2,1]=(-0.979549805807)*x_ref[0]**o+(-0.514338851166)*x_ref[0]+(0.590481348069)*x_ref[1]**o+(0.70090898505)*x_ref[1]+(0.0211126831373)*x_ref[2]**o+(0.112132700392)*x_ref[2]
-        ref[3,0,0,0]=(0.712615071708)*x_ref[0]**o+(-0.395279000567)*x_ref[0]+(0.572303465332)*x_ref[1]**o+(-0.18990757808)*x_ref[1]+(0.552173988053)*x_ref[2]**o+(0.66384838566)*x_ref[2]
-        ref[3,0,0,1]=(-0.144778596155)*x_ref[0]**o+(0.587515130999)*x_ref[0]+(-0.329480229216)*x_ref[1]**o+(-0.67629797205)*x_ref[1]+(0.132217152221)*x_ref[2]**o+(0.688653172908)*x_ref[2]
-        ref[3,0,1,0]=(0.540370436223)*x_ref[0]**o+(0.34677963828)*x_ref[0]+(0.554331354626)*x_ref[1]**o+(0.936508271818)*x_ref[1]+(-0.375652281911)*x_ref[2]**o+(-0.599300575121)*x_ref[2]
-        ref[3,0,1,1]=(0.534919542204)*x_ref[0]**o+(-0.153133704085)*x_ref[0]+(-0.121018513777)*x_ref[1]**o+(0.850253887541)*x_ref[1]+(-0.356227750213)*x_ref[2]**o+(0.610895662256)*x_ref[2]
-        ref[3,0,2,0]=(-0.29877753893)*x_ref[0]**o+(0.0284310686839)*x_ref[0]+(0.647432584397)*x_ref[1]**o+(-0.215364318325)*x_ref[1]+(-0.580839810547)*x_ref[2]**o+(0.811531717828)*x_ref[2]
-        ref[3,0,2,1]=(-0.166467908391)*x_ref[0]**o+(0.75238635157)*x_ref[0]+(0.387810278118)*x_ref[1]**o+(0.516762295584)*x_ref[1]+(-0.451298232627)*x_ref[2]**o+(-0.877792995315)*x_ref[2]
-        ref[3,1,0,0]=(0.732332840481)*x_ref[0]**o+(0.0567319375815)*x_ref[0]+(-0.405681445532)*x_ref[1]**o+(0.866920327583)*x_ref[1]+(0.744087567632)*x_ref[2]**o+(-0.257414527262)*x_ref[2]
-        ref[3,1,0,1]=(0.641165454863)*x_ref[0]**o+(-0.880320701499)*x_ref[0]+(-0.488201727677)*x_ref[1]**o+(-0.604286576258)*x_ref[1]+(-0.396469224601)*x_ref[2]**o+(0.919924897798)*x_ref[2]
-        ref[3,1,1,0]=(0.276953637864)*x_ref[0]**o+(0.825294595252)*x_ref[0]+(-0.00681547733671)*x_ref[1]**o+(0.610898921858)*x_ref[1]+(-0.113640919359)*x_ref[2]**o+(-0.41745293894)*x_ref[2]
-        ref[3,1,1,1]=(-0.0556423502541)*x_ref[0]**o+(0.0992203569857)*x_ref[0]+(0.26999259247)*x_ref[1]**o+(0.687729401581)*x_ref[1]+(-0.42626708563)*x_ref[2]**o+(0.137838345424)*x_ref[2]
-        ref[3,1,2,0]=(-0.82862652423)*x_ref[0]**o+(0.384688571211)*x_ref[0]+(-0.485754978842)*x_ref[1]**o+(0.289363174139)*x_ref[1]+(0.809823491656)*x_ref[2]**o+(-0.468263092294)*x_ref[2]
-        ref[3,1,2,1]=(0.330774389497)*x_ref[0]**o+(0.29069658199)*x_ref[0]+(-0.0852835960508)*x_ref[1]**o+(-0.496327335153)*x_ref[1]+(-0.701004642133)*x_ref[2]**o+(-0.850968582466)*x_ref[2]
-        ref[3,2,0,0]=(-0.211872121822)*x_ref[0]**o+(-0.544218825487)*x_ref[0]+(-0.554174609604)*x_ref[1]**o+(0.28186606841)*x_ref[1]+(0.272511831479)*x_ref[2]**o+(0.130059249976)*x_ref[2]
-        ref[3,2,0,1]=(0.496592232013)*x_ref[0]**o+(-0.541037353713)*x_ref[0]+(0.848137836475)*x_ref[1]**o+(-0.508526127555)*x_ref[1]+(0.468412010792)*x_ref[2]**o+(0.0139501620456)*x_ref[2]
-        ref[3,2,1,0]=(0.987830151765)*x_ref[0]**o+(0.356732413851)*x_ref[0]+(0.958334312356)*x_ref[1]**o+(0.244871130977)*x_ref[1]+(0.200379593754)*x_ref[2]**o+(0.105621740392)*x_ref[2]
-        ref[3,2,1,1]=(-0.751728177957)*x_ref[0]**o+(-0.71132733669)*x_ref[0]+(-0.792801223542)*x_ref[1]**o+(0.932243495719)*x_ref[1]+(0.278721571387)*x_ref[2]**o+(0.16204818826)*x_ref[2]
-        ref[3,2,2,0]=(-0.844470031769)*x_ref[0]**o+(0.233237514806)*x_ref[0]+(0.567935434819)*x_ref[1]**o+(0.315504620349)*x_ref[1]+(-0.886427966592)*x_ref[2]**o+(-0.514415287917)*x_ref[2]
-        ref[3,2,2,1]=(-0.113390105251)*x_ref[0]**o+(-0.227293501546)*x_ref[0]+(-0.501842049116)*x_ref[1]**o+(-0.2393770551)*x_ref[1]+(-0.636288744693)*x_ref[2]**o+(-0.364637404491)*x_ref[2]
-        ref[3,3,0,0]=(-0.454817772137)*x_ref[0]**o+(0.0991199341563)*x_ref[0]+(-0.891035204309)*x_ref[1]**o+(-0.894694305011)*x_ref[1]+(0.476722687543)*x_ref[2]**o+(-0.616323189052)*x_ref[2]
-        ref[3,3,0,1]=(-0.641204554575)*x_ref[0]**o+(0.418692269871)*x_ref[0]+(-0.497353963751)*x_ref[1]**o+(0.443236835952)*x_ref[1]+(0.771380772745)*x_ref[2]**o+(0.913143060887)*x_ref[2]
-        ref[3,3,1,0]=(0.340731926682)*x_ref[0]**o+(0.231807962221)*x_ref[0]+(-0.35677786751)*x_ref[1]**o+(-0.171036937234)*x_ref[1]+(-0.697055158669)*x_ref[2]**o+(0.58599029377)*x_ref[2]
-        ref[3,3,1,1]=(0.754473421244)*x_ref[0]**o+(0.658054374737)*x_ref[0]+(0.696211053347)*x_ref[1]**o+(0.401778988971)*x_ref[1]+(0.121272999311)*x_ref[2]**o+(0.509498775106)*x_ref[2]
-        ref[3,3,2,0]=(-0.0930185763819)*x_ref[0]**o+(-0.0798587560353)*x_ref[0]+(-0.0370412597984)*x_ref[1]**o+(-0.440515510516)*x_ref[1]+(-0.855771461636)*x_ref[2]**o+(0.216680759655)*x_ref[2]
-        ref[3,3,2,1]=(0.763831414202)*x_ref[0]**o+(0.207864762366)*x_ref[0]+(-0.815789136019)*x_ref[1]**o+(-0.808073090924)*x_ref[1]+(0.97581837589)*x_ref[2]**o+(-0.560842077761)*x_ref[2]
-        ref[3,4,0,0]=(-0.241036031728)*x_ref[0]**o+(-0.634789191932)*x_ref[0]+(-0.321678486205)*x_ref[1]**o+(-0.754677817943)*x_ref[1]+(-0.078216578971)*x_ref[2]**o+(-0.924028965218)*x_ref[2]
-        ref[3,4,0,1]=(-0.851189221011)*x_ref[0]**o+(0.425561499671)*x_ref[0]+(-0.293305262525)*x_ref[1]**o+(-0.191023566093)*x_ref[1]+(-0.810379587547)*x_ref[2]**o+(0.593883389908)*x_ref[2]
-        ref[3,4,1,0]=(0.905139594202)*x_ref[0]**o+(-0.904771548418)*x_ref[0]+(0.228410726617)*x_ref[1]**o+(0.327253374618)*x_ref[1]+(-0.214649399974)*x_ref[2]**o+(-0.766320611635)*x_ref[2]
-        ref[3,4,1,1]=(0.494131404603)*x_ref[0]**o+(-0.902996362946)*x_ref[0]+(-0.88445944326)*x_ref[1]**o+(-0.458372750995)*x_ref[1]+(-0.306694339897)*x_ref[2]**o+(0.0486088169447)*x_ref[2]
-        ref[3,4,2,0]=(0.856321787222)*x_ref[0]**o+(0.314315880734)*x_ref[0]+(-0.996526923819)*x_ref[1]**o+(-0.905235331678)*x_ref[1]+(-0.775589521164)*x_ref[2]**o+(0.812013030327)*x_ref[2]
-        ref[3,4,2,1]=(0.271281347275)*x_ref[0]**o+(-0.600074638655)*x_ref[0]+(-0.16332213744)*x_ref[1]**o+(-0.483539594381)*x_ref[1]+(0.820910011338)*x_ref[2]**o+(0.14947223917)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from Solution onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0368926203259)*x[0]**o+(-0.256519664931)*x[0]+(0.168576661932)*x[1]**o+(-0.231158401549)*x[1]
-        ref=(0.0368926203259)*x_ref[0]**o+(-0.256519664931)*x_ref[0]+(0.168576661932)*x_ref[1]**o+(-0.231158401549)*x_ref[1]
-      else:
-        arg=(0.597124147524)*x[0]**o+(-0.404660180764)*x[0]+(-0.923138194509)*x[1]**o+(-0.263963516316)*x[1]+(-0.897643246613)*x[2]**o+(0.0180371552704)*x[2]
-        ref=(0.597124147524)*x_ref[0]**o+(-0.404660180764)*x_ref[0]+(-0.923138194509)*x_ref[1]**o+(-0.263963516316)*x_ref[1]+(-0.897643246613)*x_ref[2]**o+(0.0180371552704)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from Solution onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.639330723902)*x[0]**o+(0.404929658475)*x[0]+(0.000241871115531)*x[1]**o+(0.770530713516)*x[1]
-        arg[1]=(0.245348516629)*x[0]**o+(-0.00142757994203)*x[0]+(0.297525985266)*x[1]**o+(0.683033847851)*x[1]
-        ref[0]=(0.639330723902)*x_ref[0]**o+(0.404929658475)*x_ref[0]+(0.000241871115531)*x_ref[1]**o+(0.770530713516)*x_ref[1]
-        ref[1]=(0.245348516629)*x_ref[0]**o+(-0.00142757994203)*x_ref[0]+(0.297525985266)*x_ref[1]**o+(0.683033847851)*x_ref[1]
-      else:
-        arg[0]=(-0.45360978548)*x[0]**o+(-0.069702953017)*x[0]+(0.745603275442)*x[1]**o+(0.591869498191)*x[1]+(-0.90835287387)*x[2]**o+(-0.0405228474208)*x[2]
-        arg[1]=(-0.659979134044)*x[0]**o+(0.393634998529)*x[0]+(-0.685193662459)*x[1]**o+(0.773497371593)*x[1]+(0.139726737595)*x[2]**o+(-0.549174223126)*x[2]
-        ref[0]=(-0.45360978548)*x_ref[0]**o+(-0.069702953017)*x_ref[0]+(0.745603275442)*x_ref[1]**o+(0.591869498191)*x_ref[1]+(-0.90835287387)*x_ref[2]**o+(-0.0405228474208)*x_ref[2]
-        ref[1]=(-0.659979134044)*x_ref[0]**o+(0.393634998529)*x_ref[0]+(-0.685193662459)*x_ref[1]**o+(0.773497371593)*x_ref[1]+(0.139726737595)*x_ref[2]**o+(-0.549174223126)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from Solution onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0734861043324)*x[0]**o+(0.698132844974)*x[0]+(-0.0711338889844)*x[1]**o+(0.667313854486)*x[1]
-        arg[0,1]=(0.846132724611)*x[0]**o+(-0.215521619475)*x[0]+(-0.920637540655)*x[1]**o+(0.666739063184)*x[1]
-        arg[0,2]=(-0.963337851184)*x[0]**o+(-0.961935972833)*x[0]+(-0.0689798144115)*x[1]**o+(0.0106557770119)*x[1]
-        arg[0,3]=(0.875063015269)*x[0]**o+(-0.735727431445)*x[0]+(-0.599251007104)*x[1]**o+(-0.274659381946)*x[1]
-        arg[0,4]=(-0.378214565543)*x[0]**o+(-0.476230056857)*x[0]+(0.617722084788)*x[1]**o+(-0.808732634287)*x[1]
-        arg[1,0]=(-0.324652264865)*x[0]**o+(-0.314957074449)*x[0]+(0.467828791079)*x[1]**o+(-0.105499299461)*x[1]
-        arg[1,1]=(-0.0815291997441)*x[0]**o+(0.1473072227)*x[0]+(-0.866265670368)*x[1]**o+(-0.66256092454)*x[1]
-        arg[1,2]=(-0.83962092333)*x[0]**o+(0.681365396039)*x[0]+(-0.607267339395)*x[1]**o+(0.278637239291)*x[1]
-        arg[1,3]=(-0.300965517299)*x[0]**o+(-0.0884159654351)*x[0]+(-0.547465656655)*x[1]**o+(0.708740949324)*x[1]
-        arg[1,4]=(-0.0250728833518)*x[0]**o+(0.306828709412)*x[0]+(-0.972269802286)*x[1]**o+(0.619649412235)*x[1]
-        arg[2,0]=(-0.873228641325)*x[0]**o+(-0.184974115411)*x[0]+(-0.500142861985)*x[1]**o+(0.708256240395)*x[1]
-        arg[2,1]=(-0.588540228523)*x[0]**o+(-0.747378078994)*x[0]+(0.560791728487)*x[1]**o+(-0.619937635414)*x[1]
-        arg[2,2]=(-0.738023386417)*x[0]**o+(-0.35311314517)*x[0]+(0.0350349516849)*x[1]**o+(-0.256133328724)*x[1]
-        arg[2,3]=(0.836816159205)*x[0]**o+(-0.15869161496)*x[0]+(-0.115472743499)*x[1]**o+(-0.664972307042)*x[1]
-        arg[2,4]=(0.257379090396)*x[0]**o+(0.970107472837)*x[0]+(0.323300957751)*x[1]**o+(0.028118478034)*x[1]
-        arg[3,0]=(0.198639991638)*x[0]**o+(-0.386442010103)*x[0]+(0.566123916917)*x[1]**o+(0.442943885392)*x[1]
-        arg[3,1]=(-0.108796148814)*x[0]**o+(0.896004033429)*x[0]+(-0.860364745295)*x[1]**o+(-0.362632925024)*x[1]
-        arg[3,2]=(0.247204027814)*x[0]**o+(0.469777186671)*x[0]+(0.545991233155)*x[1]**o+(-0.320776951704)*x[1]
-        arg[3,3]=(-0.98116086999)*x[0]**o+(-0.860611730622)*x[0]+(-0.333595175081)*x[1]**o+(0.437722032729)*x[1]
-        arg[3,4]=(0.678428238286)*x[0]**o+(-0.827472935935)*x[0]+(0.355143303916)*x[1]**o+(-0.613985799175)*x[1]
-        ref[0,0]=(0.0734861043324)*x_ref[0]**o+(0.698132844974)*x_ref[0]+(-0.0711338889844)*x_ref[1]**o+(0.667313854486)*x_ref[1]
-        ref[0,1]=(0.846132724611)*x_ref[0]**o+(-0.215521619475)*x_ref[0]+(-0.920637540655)*x_ref[1]**o+(0.666739063184)*x_ref[1]
-        ref[0,2]=(-0.963337851184)*x_ref[0]**o+(-0.961935972833)*x_ref[0]+(-0.0689798144115)*x_ref[1]**o+(0.0106557770119)*x_ref[1]
-        ref[0,3]=(0.875063015269)*x_ref[0]**o+(-0.735727431445)*x_ref[0]+(-0.599251007104)*x_ref[1]**o+(-0.274659381946)*x_ref[1]
-        ref[0,4]=(-0.378214565543)*x_ref[0]**o+(-0.476230056857)*x_ref[0]+(0.617722084788)*x_ref[1]**o+(-0.808732634287)*x_ref[1]
-        ref[1,0]=(-0.324652264865)*x_ref[0]**o+(-0.314957074449)*x_ref[0]+(0.467828791079)*x_ref[1]**o+(-0.105499299461)*x_ref[1]
-        ref[1,1]=(-0.0815291997441)*x_ref[0]**o+(0.1473072227)*x_ref[0]+(-0.866265670368)*x_ref[1]**o+(-0.66256092454)*x_ref[1]
-        ref[1,2]=(-0.83962092333)*x_ref[0]**o+(0.681365396039)*x_ref[0]+(-0.607267339395)*x_ref[1]**o+(0.278637239291)*x_ref[1]
-        ref[1,3]=(-0.300965517299)*x_ref[0]**o+(-0.0884159654351)*x_ref[0]+(-0.547465656655)*x_ref[1]**o+(0.708740949324)*x_ref[1]
-        ref[1,4]=(-0.0250728833518)*x_ref[0]**o+(0.306828709412)*x_ref[0]+(-0.972269802286)*x_ref[1]**o+(0.619649412235)*x_ref[1]
-        ref[2,0]=(-0.873228641325)*x_ref[0]**o+(-0.184974115411)*x_ref[0]+(-0.500142861985)*x_ref[1]**o+(0.708256240395)*x_ref[1]
-        ref[2,1]=(-0.588540228523)*x_ref[0]**o+(-0.747378078994)*x_ref[0]+(0.560791728487)*x_ref[1]**o+(-0.619937635414)*x_ref[1]
-        ref[2,2]=(-0.738023386417)*x_ref[0]**o+(-0.35311314517)*x_ref[0]+(0.0350349516849)*x_ref[1]**o+(-0.256133328724)*x_ref[1]
-        ref[2,3]=(0.836816159205)*x_ref[0]**o+(-0.15869161496)*x_ref[0]+(-0.115472743499)*x_ref[1]**o+(-0.664972307042)*x_ref[1]
-        ref[2,4]=(0.257379090396)*x_ref[0]**o+(0.970107472837)*x_ref[0]+(0.323300957751)*x_ref[1]**o+(0.028118478034)*x_ref[1]
-        ref[3,0]=(0.198639991638)*x_ref[0]**o+(-0.386442010103)*x_ref[0]+(0.566123916917)*x_ref[1]**o+(0.442943885392)*x_ref[1]
-        ref[3,1]=(-0.108796148814)*x_ref[0]**o+(0.896004033429)*x_ref[0]+(-0.860364745295)*x_ref[1]**o+(-0.362632925024)*x_ref[1]
-        ref[3,2]=(0.247204027814)*x_ref[0]**o+(0.469777186671)*x_ref[0]+(0.545991233155)*x_ref[1]**o+(-0.320776951704)*x_ref[1]
-        ref[3,3]=(-0.98116086999)*x_ref[0]**o+(-0.860611730622)*x_ref[0]+(-0.333595175081)*x_ref[1]**o+(0.437722032729)*x_ref[1]
-        ref[3,4]=(0.678428238286)*x_ref[0]**o+(-0.827472935935)*x_ref[0]+(0.355143303916)*x_ref[1]**o+(-0.613985799175)*x_ref[1]
-      else:
-        arg[0,0]=(-0.34607777608)*x[0]**o+(0.932253964366)*x[0]+(0.698472742413)*x[1]**o+(-0.661983421645)*x[1]+(-0.965529107787)*x[2]**o+(-0.478528818669)*x[2]
-        arg[0,1]=(0.664589900347)*x[0]**o+(-0.0719631882089)*x[0]+(-0.273316024389)*x[1]**o+(-0.887470310768)*x[1]+(-0.362253378888)*x[2]**o+(-0.604337291362)*x[2]
-        arg[0,2]=(-0.0505574996951)*x[0]**o+(0.249062378634)*x[0]+(-0.760304066926)*x[1]**o+(-0.314569115107)*x[1]+(-0.679403446488)*x[2]**o+(-0.788567095894)*x[2]
-        arg[0,3]=(0.737488025877)*x[0]**o+(0.489265711974)*x[0]+(0.192836157119)*x[1]**o+(-0.599394457037)*x[1]+(-0.972415976641)*x[2]**o+(0.620281802505)*x[2]
-        arg[0,4]=(0.830347930734)*x[0]**o+(0.65690057858)*x[0]+(0.756058142792)*x[1]**o+(-0.886073273277)*x[1]+(-0.817193788749)*x[2]**o+(-0.906989660372)*x[2]
-        arg[1,0]=(-0.961741874676)*x[0]**o+(0.231117463615)*x[0]+(-0.911422849525)*x[1]**o+(0.616612023918)*x[1]+(-0.563171272809)*x[2]**o+(0.00995177904006)*x[2]
-        arg[1,1]=(-0.431814251982)*x[0]**o+(-0.244589543993)*x[0]+(-0.169319798745)*x[1]**o+(0.818064351799)*x[1]+(-0.899145214151)*x[2]**o+(-0.164644770082)*x[2]
-        arg[1,2]=(0.149443250669)*x[0]**o+(-0.574248417945)*x[0]+(0.660724984377)*x[1]**o+(0.180990753976)*x[1]+(-0.36059400132)*x[2]**o+(-0.864734906872)*x[2]
-        arg[1,3]=(-0.450956708576)*x[0]**o+(0.80934912947)*x[0]+(-0.921267395954)*x[1]**o+(0.449214650071)*x[1]+(-0.833237094175)*x[2]**o+(0.579827382459)*x[2]
-        arg[1,4]=(-0.078106995473)*x[0]**o+(0.379085563974)*x[0]+(0.227204387882)*x[1]**o+(0.968199115202)*x[1]+(-0.272353745148)*x[2]**o+(0.380201872298)*x[2]
-        arg[2,0]=(-0.852858598591)*x[0]**o+(0.720596990849)*x[0]+(0.281332272808)*x[1]**o+(-0.692404010367)*x[1]+(0.00869602393889)*x[2]**o+(0.0870674708905)*x[2]
-        arg[2,1]=(0.466694162196)*x[0]**o+(-0.985083301887)*x[0]+(-0.208640915086)*x[1]**o+(-0.515440367775)*x[1]+(-0.76882243815)*x[2]**o+(0.345968814999)*x[2]
-        arg[2,2]=(-0.0459664460618)*x[0]**o+(0.0919391841846)*x[0]+(0.687996833826)*x[1]**o+(0.94270298674)*x[1]+(0.0757885229342)*x[2]**o+(0.60760259541)*x[2]
-        arg[2,3]=(0.968401710017)*x[0]**o+(0.0562744847066)*x[0]+(-0.345586665712)*x[1]**o+(-0.190986464506)*x[1]+(-0.202797239715)*x[2]**o+(-0.817657264098)*x[2]
-        arg[2,4]=(-0.0288083775852)*x[0]**o+(0.164133034209)*x[0]+(-0.597572578553)*x[1]**o+(-0.669747923644)*x[1]+(-0.77713249687)*x[2]**o+(-0.0955335853718)*x[2]
-        arg[3,0]=(-0.173723012835)*x[0]**o+(-0.306216351741)*x[0]+(-0.253810127374)*x[1]**o+(0.145737581929)*x[1]+(-0.950430852252)*x[2]**o+(-0.425608679334)*x[2]
-        arg[3,1]=(0.0107577437502)*x[0]**o+(0.0213302772169)*x[0]+(0.403278323078)*x[1]**o+(0.390227936687)*x[1]+(-0.398743418731)*x[2]**o+(0.39090803029)*x[2]
-        arg[3,2]=(0.151330768449)*x[0]**o+(0.290347114058)*x[0]+(-0.709672288966)*x[1]**o+(0.379791524303)*x[1]+(-0.403890944944)*x[2]**o+(0.327620813352)*x[2]
-        arg[3,3]=(0.377649942493)*x[0]**o+(-0.140974638681)*x[0]+(-0.150965798704)*x[1]**o+(0.203654011715)*x[1]+(-0.70422609343)*x[2]**o+(-0.238707376032)*x[2]
-        arg[3,4]=(0.454156920234)*x[0]**o+(-0.0803177888347)*x[0]+(0.325504272926)*x[1]**o+(0.285029937842)*x[1]+(-0.0684685710649)*x[2]**o+(0.471348026862)*x[2]
-        ref[0,0]=(-0.34607777608)*x_ref[0]**o+(0.932253964366)*x_ref[0]+(0.698472742413)*x_ref[1]**o+(-0.661983421645)*x_ref[1]+(-0.965529107787)*x_ref[2]**o+(-0.478528818669)*x_ref[2]
-        ref[0,1]=(0.664589900347)*x_ref[0]**o+(-0.0719631882089)*x_ref[0]+(-0.273316024389)*x_ref[1]**o+(-0.887470310768)*x_ref[1]+(-0.362253378888)*x_ref[2]**o+(-0.604337291362)*x_ref[2]
-        ref[0,2]=(-0.0505574996951)*x_ref[0]**o+(0.249062378634)*x_ref[0]+(-0.760304066926)*x_ref[1]**o+(-0.314569115107)*x_ref[1]+(-0.679403446488)*x_ref[2]**o+(-0.788567095894)*x_ref[2]
-        ref[0,3]=(0.737488025877)*x_ref[0]**o+(0.489265711974)*x_ref[0]+(0.192836157119)*x_ref[1]**o+(-0.599394457037)*x_ref[1]+(-0.972415976641)*x_ref[2]**o+(0.620281802505)*x_ref[2]
-        ref[0,4]=(0.830347930734)*x_ref[0]**o+(0.65690057858)*x_ref[0]+(0.756058142792)*x_ref[1]**o+(-0.886073273277)*x_ref[1]+(-0.817193788749)*x_ref[2]**o+(-0.906989660372)*x_ref[2]
-        ref[1,0]=(-0.961741874676)*x_ref[0]**o+(0.231117463615)*x_ref[0]+(-0.911422849525)*x_ref[1]**o+(0.616612023918)*x_ref[1]+(-0.563171272809)*x_ref[2]**o+(0.00995177904006)*x_ref[2]
-        ref[1,1]=(-0.431814251982)*x_ref[0]**o+(-0.244589543993)*x_ref[0]+(-0.169319798745)*x_ref[1]**o+(0.818064351799)*x_ref[1]+(-0.899145214151)*x_ref[2]**o+(-0.164644770082)*x_ref[2]
-        ref[1,2]=(0.149443250669)*x_ref[0]**o+(-0.574248417945)*x_ref[0]+(0.660724984377)*x_ref[1]**o+(0.180990753976)*x_ref[1]+(-0.36059400132)*x_ref[2]**o+(-0.864734906872)*x_ref[2]
-        ref[1,3]=(-0.450956708576)*x_ref[0]**o+(0.80934912947)*x_ref[0]+(-0.921267395954)*x_ref[1]**o+(0.449214650071)*x_ref[1]+(-0.833237094175)*x_ref[2]**o+(0.579827382459)*x_ref[2]
-        ref[1,4]=(-0.078106995473)*x_ref[0]**o+(0.379085563974)*x_ref[0]+(0.227204387882)*x_ref[1]**o+(0.968199115202)*x_ref[1]+(-0.272353745148)*x_ref[2]**o+(0.380201872298)*x_ref[2]
-        ref[2,0]=(-0.852858598591)*x_ref[0]**o+(0.720596990849)*x_ref[0]+(0.281332272808)*x_ref[1]**o+(-0.692404010367)*x_ref[1]+(0.00869602393889)*x_ref[2]**o+(0.0870674708905)*x_ref[2]
-        ref[2,1]=(0.466694162196)*x_ref[0]**o+(-0.985083301887)*x_ref[0]+(-0.208640915086)*x_ref[1]**o+(-0.515440367775)*x_ref[1]+(-0.76882243815)*x_ref[2]**o+(0.345968814999)*x_ref[2]
-        ref[2,2]=(-0.0459664460618)*x_ref[0]**o+(0.0919391841846)*x_ref[0]+(0.687996833826)*x_ref[1]**o+(0.94270298674)*x_ref[1]+(0.0757885229342)*x_ref[2]**o+(0.60760259541)*x_ref[2]
-        ref[2,3]=(0.968401710017)*x_ref[0]**o+(0.0562744847066)*x_ref[0]+(-0.345586665712)*x_ref[1]**o+(-0.190986464506)*x_ref[1]+(-0.202797239715)*x_ref[2]**o+(-0.817657264098)*x_ref[2]
-        ref[2,4]=(-0.0288083775852)*x_ref[0]**o+(0.164133034209)*x_ref[0]+(-0.597572578553)*x_ref[1]**o+(-0.669747923644)*x_ref[1]+(-0.77713249687)*x_ref[2]**o+(-0.0955335853718)*x_ref[2]
-        ref[3,0]=(-0.173723012835)*x_ref[0]**o+(-0.306216351741)*x_ref[0]+(-0.253810127374)*x_ref[1]**o+(0.145737581929)*x_ref[1]+(-0.950430852252)*x_ref[2]**o+(-0.425608679334)*x_ref[2]
-        ref[3,1]=(0.0107577437502)*x_ref[0]**o+(0.0213302772169)*x_ref[0]+(0.403278323078)*x_ref[1]**o+(0.390227936687)*x_ref[1]+(-0.398743418731)*x_ref[2]**o+(0.39090803029)*x_ref[2]
-        ref[3,2]=(0.151330768449)*x_ref[0]**o+(0.290347114058)*x_ref[0]+(-0.709672288966)*x_ref[1]**o+(0.379791524303)*x_ref[1]+(-0.403890944944)*x_ref[2]**o+(0.327620813352)*x_ref[2]
-        ref[3,3]=(0.377649942493)*x_ref[0]**o+(-0.140974638681)*x_ref[0]+(-0.150965798704)*x_ref[1]**o+(0.203654011715)*x_ref[1]+(-0.70422609343)*x_ref[2]**o+(-0.238707376032)*x_ref[2]
-        ref[3,4]=(0.454156920234)*x_ref[0]**o+(-0.0803177888347)*x_ref[0]+(0.325504272926)*x_ref[1]**o+(0.285029937842)*x_ref[1]+(-0.0684685710649)*x_ref[2]**o+(0.471348026862)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from Solution onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.754456420402)*x[0]**o+(0.379017389471)*x[0]+(-0.131681017079)*x[1]**o+(0.0844844232338)*x[1]
-        arg[0,0,1]=(0.358583374641)*x[0]**o+(-0.237291325422)*x[0]+(-0.636434065455)*x[1]**o+(0.797375166528)*x[1]
-        arg[0,1,0]=(0.715400241041)*x[0]**o+(-0.953885532065)*x[0]+(0.505634627788)*x[1]**o+(-0.0943694996143)*x[1]
-        arg[0,1,1]=(-0.748388212428)*x[0]**o+(0.645715603392)*x[0]+(0.225587797337)*x[1]**o+(-0.274312832296)*x[1]
-        arg[1,0,0]=(-0.696048542115)*x[0]**o+(0.728824156388)*x[0]+(0.475125287255)*x[1]**o+(0.231272864783)*x[1]
-        arg[1,0,1]=(-0.171961266224)*x[0]**o+(0.751228523936)*x[0]+(0.0204128165955)*x[1]**o+(0.391751936939)*x[1]
-        arg[1,1,0]=(0.702487008399)*x[0]**o+(0.408391530323)*x[0]+(-0.523719800121)*x[1]**o+(-0.142757224099)*x[1]
-        arg[1,1,1]=(0.356477993939)*x[0]**o+(-0.552570052325)*x[0]+(-0.728412167408)*x[1]**o+(-0.138741983568)*x[1]
-        arg[2,0,0]=(-0.972746877268)*x[0]**o+(-0.563197198314)*x[0]+(0.660003706244)*x[1]**o+(0.0312816821703)*x[1]
-        arg[2,0,1]=(0.181440001149)*x[0]**o+(-0.551943857642)*x[0]+(0.550354945981)*x[1]**o+(0.222234118435)*x[1]
-        arg[2,1,0]=(-0.843578289392)*x[0]**o+(-0.926317212728)*x[0]+(0.473372460648)*x[1]**o+(0.271910634427)*x[1]
-        arg[2,1,1]=(-0.388589229676)*x[0]**o+(-0.117517308339)*x[0]+(0.0211660415594)*x[1]**o+(0.620489966427)*x[1]
-        arg[3,0,0]=(-0.259455891555)*x[0]**o+(0.602520729775)*x[0]+(0.755086640963)*x[1]**o+(0.420352546305)*x[1]
-        arg[3,0,1]=(0.901413641143)*x[0]**o+(-0.229939015002)*x[0]+(-0.0225626235937)*x[1]**o+(-0.319692416473)*x[1]
-        arg[3,1,0]=(-0.398546041269)*x[0]**o+(-0.715449072888)*x[0]+(-0.079576973955)*x[1]**o+(0.132797262272)*x[1]
-        arg[3,1,1]=(-0.0790389300192)*x[0]**o+(0.681411537598)*x[0]+(0.311941366364)*x[1]**o+(-0.350457682161)*x[1]
-        arg[4,0,0]=(0.046674838542)*x[0]**o+(-0.765876197237)*x[0]+(-0.791075696221)*x[1]**o+(0.0338652019786)*x[1]
-        arg[4,0,1]=(-0.00225965167336)*x[0]**o+(-0.773773082204)*x[0]+(0.696918916543)*x[1]**o+(-0.215060949558)*x[1]
-        arg[4,1,0]=(-0.38907085938)*x[0]**o+(-0.907941787301)*x[0]+(-0.447045949233)*x[1]**o+(0.780078047474)*x[1]
-        arg[4,1,1]=(0.198269028442)*x[0]**o+(0.991680341644)*x[0]+(-0.117854134367)*x[1]**o+(0.818191822875)*x[1]
-        arg[5,0,0]=(-0.205861859192)*x[0]**o+(-0.230700784928)*x[0]+(-0.91205826553)*x[1]**o+(-0.563882902438)*x[1]
-        arg[5,0,1]=(-0.667447962115)*x[0]**o+(0.0539650266455)*x[0]+(0.917333817791)*x[1]**o+(0.0571269304606)*x[1]
-        arg[5,1,0]=(0.69461644672)*x[0]**o+(-0.901397746901)*x[0]+(0.388360725574)*x[1]**o+(-0.833240932275)*x[1]
-        arg[5,1,1]=(0.236741248684)*x[0]**o+(0.637532818313)*x[0]+(-0.774742465882)*x[1]**o+(0.895299029069)*x[1]
-        ref[0,0,0]=(0.754456420402)*x_ref[0]**o+(0.379017389471)*x_ref[0]+(-0.131681017079)*x_ref[1]**o+(0.0844844232338)*x_ref[1]
-        ref[0,0,1]=(0.358583374641)*x_ref[0]**o+(-0.237291325422)*x_ref[0]+(-0.636434065455)*x_ref[1]**o+(0.797375166528)*x_ref[1]
-        ref[0,1,0]=(0.715400241041)*x_ref[0]**o+(-0.953885532065)*x_ref[0]+(0.505634627788)*x_ref[1]**o+(-0.0943694996143)*x_ref[1]
-        ref[0,1,1]=(-0.748388212428)*x_ref[0]**o+(0.645715603392)*x_ref[0]+(0.225587797337)*x_ref[1]**o+(-0.274312832296)*x_ref[1]
-        ref[1,0,0]=(-0.696048542115)*x_ref[0]**o+(0.728824156388)*x_ref[0]+(0.475125287255)*x_ref[1]**o+(0.231272864783)*x_ref[1]
-        ref[1,0,1]=(-0.171961266224)*x_ref[0]**o+(0.751228523936)*x_ref[0]+(0.0204128165955)*x_ref[1]**o+(0.391751936939)*x_ref[1]
-        ref[1,1,0]=(0.702487008399)*x_ref[0]**o+(0.408391530323)*x_ref[0]+(-0.523719800121)*x_ref[1]**o+(-0.142757224099)*x_ref[1]
-        ref[1,1,1]=(0.356477993939)*x_ref[0]**o+(-0.552570052325)*x_ref[0]+(-0.728412167408)*x_ref[1]**o+(-0.138741983568)*x_ref[1]
-        ref[2,0,0]=(-0.972746877268)*x_ref[0]**o+(-0.563197198314)*x_ref[0]+(0.660003706244)*x_ref[1]**o+(0.0312816821703)*x_ref[1]
-        ref[2,0,1]=(0.181440001149)*x_ref[0]**o+(-0.551943857642)*x_ref[0]+(0.550354945981)*x_ref[1]**o+(0.222234118435)*x_ref[1]
-        ref[2,1,0]=(-0.843578289392)*x_ref[0]**o+(-0.926317212728)*x_ref[0]+(0.473372460648)*x_ref[1]**o+(0.271910634427)*x_ref[1]
-        ref[2,1,1]=(-0.388589229676)*x_ref[0]**o+(-0.117517308339)*x_ref[0]+(0.0211660415594)*x_ref[1]**o+(0.620489966427)*x_ref[1]
-        ref[3,0,0]=(-0.259455891555)*x_ref[0]**o+(0.602520729775)*x_ref[0]+(0.755086640963)*x_ref[1]**o+(0.420352546305)*x_ref[1]
-        ref[3,0,1]=(0.901413641143)*x_ref[0]**o+(-0.229939015002)*x_ref[0]+(-0.0225626235937)*x_ref[1]**o+(-0.319692416473)*x_ref[1]
-        ref[3,1,0]=(-0.398546041269)*x_ref[0]**o+(-0.715449072888)*x_ref[0]+(-0.079576973955)*x_ref[1]**o+(0.132797262272)*x_ref[1]
-        ref[3,1,1]=(-0.0790389300192)*x_ref[0]**o+(0.681411537598)*x_ref[0]+(0.311941366364)*x_ref[1]**o+(-0.350457682161)*x_ref[1]
-        ref[4,0,0]=(0.046674838542)*x_ref[0]**o+(-0.765876197237)*x_ref[0]+(-0.791075696221)*x_ref[1]**o+(0.0338652019786)*x_ref[1]
-        ref[4,0,1]=(-0.00225965167336)*x_ref[0]**o+(-0.773773082204)*x_ref[0]+(0.696918916543)*x_ref[1]**o+(-0.215060949558)*x_ref[1]
-        ref[4,1,0]=(-0.38907085938)*x_ref[0]**o+(-0.907941787301)*x_ref[0]+(-0.447045949233)*x_ref[1]**o+(0.780078047474)*x_ref[1]
-        ref[4,1,1]=(0.198269028442)*x_ref[0]**o+(0.991680341644)*x_ref[0]+(-0.117854134367)*x_ref[1]**o+(0.818191822875)*x_ref[1]
-        ref[5,0,0]=(-0.205861859192)*x_ref[0]**o+(-0.230700784928)*x_ref[0]+(-0.91205826553)*x_ref[1]**o+(-0.563882902438)*x_ref[1]
-        ref[5,0,1]=(-0.667447962115)*x_ref[0]**o+(0.0539650266455)*x_ref[0]+(0.917333817791)*x_ref[1]**o+(0.0571269304606)*x_ref[1]
-        ref[5,1,0]=(0.69461644672)*x_ref[0]**o+(-0.901397746901)*x_ref[0]+(0.388360725574)*x_ref[1]**o+(-0.833240932275)*x_ref[1]
-        ref[5,1,1]=(0.236741248684)*x_ref[0]**o+(0.637532818313)*x_ref[0]+(-0.774742465882)*x_ref[1]**o+(0.895299029069)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.349847065801)*x[0]**o+(-0.373197072565)*x[0]+(-0.744002096082)*x[1]**o+(-0.32885837005)*x[1]+(-0.123733527788)*x[2]**o+(0.0357511439931)*x[2]
-        arg[0,0,1]=(0.92390791115)*x[0]**o+(0.359314162684)*x[0]+(-0.344639305985)*x[1]**o+(0.87224607823)*x[1]+(0.603450217818)*x[2]**o+(0.767736049618)*x[2]
-        arg[0,1,0]=(0.619626616187)*x[0]**o+(0.0777214591672)*x[0]+(-0.454938621339)*x[1]**o+(0.397372303072)*x[1]+(0.64005891461)*x[2]**o+(0.384837098241)*x[2]
-        arg[0,1,1]=(0.694681223586)*x[0]**o+(0.746056110128)*x[0]+(-0.299128956618)*x[1]**o+(-0.411577781871)*x[1]+(0.0769629748738)*x[2]**o+(0.185345614784)*x[2]
-        arg[1,0,0]=(-0.686338455095)*x[0]**o+(0.516443141718)*x[0]+(0.0963836215517)*x[1]**o+(-0.142756276631)*x[1]+(0.783984002173)*x[2]**o+(0.453983016774)*x[2]
-        arg[1,0,1]=(-0.261515294422)*x[0]**o+(0.193353051852)*x[0]+(0.536103258837)*x[1]**o+(0.739075865062)*x[1]+(0.0854181253451)*x[2]**o+(0.993960851485)*x[2]
-        arg[1,1,0]=(-0.041143202263)*x[0]**o+(-0.0483966496614)*x[0]+(0.100238616242)*x[1]**o+(0.229736237164)*x[1]+(-0.427145221147)*x[2]**o+(-0.143755555255)*x[2]
-        arg[1,1,1]=(-0.489208229053)*x[0]**o+(-0.339638394047)*x[0]+(-0.0197108849498)*x[1]**o+(-0.64396285961)*x[1]+(0.644185397988)*x[2]**o+(0.952646865856)*x[2]
-        arg[2,0,0]=(0.524059731144)*x[0]**o+(0.184311280754)*x[0]+(0.119889599722)*x[1]**o+(0.953938302354)*x[1]+(0.0331959462044)*x[2]**o+(-0.695477785189)*x[2]
-        arg[2,0,1]=(0.925889695911)*x[0]**o+(0.612691423308)*x[0]+(0.492933561499)*x[1]**o+(-0.320060666384)*x[1]+(-0.308466393813)*x[2]**o+(0.907998151313)*x[2]
-        arg[2,1,0]=(-0.874135284498)*x[0]**o+(0.0151718942733)*x[0]+(0.861045338983)*x[1]**o+(-0.228228955072)*x[1]+(-0.350972290538)*x[2]**o+(0.961075321834)*x[2]
-        arg[2,1,1]=(-0.889805119627)*x[0]**o+(0.561790945688)*x[0]+(-0.500273719691)*x[1]**o+(-0.633623450372)*x[1]+(-0.0153487772927)*x[2]**o+(-0.0798904596833)*x[2]
-        arg[3,0,0]=(-0.873621421496)*x[0]**o+(0.513411619207)*x[0]+(-0.961906901835)*x[1]**o+(0.321006445811)*x[1]+(-0.592020038506)*x[2]**o+(0.555697967812)*x[2]
-        arg[3,0,1]=(0.850390230672)*x[0]**o+(-0.391435099771)*x[0]+(0.700909972778)*x[1]**o+(0.794987613709)*x[1]+(-0.775188800108)*x[2]**o+(-0.132226119354)*x[2]
-        arg[3,1,0]=(0.597260092409)*x[0]**o+(0.393550227561)*x[0]+(-0.554683881247)*x[1]**o+(-0.371724214354)*x[1]+(-0.53562488411)*x[2]**o+(-0.555005739246)*x[2]
-        arg[3,1,1]=(-0.14964970997)*x[0]**o+(-0.524377521321)*x[0]+(-0.738788452632)*x[1]**o+(-0.832575942733)*x[1]+(-0.766690459508)*x[2]**o+(-0.788273000486)*x[2]
-        arg[4,0,0]=(-0.772922450679)*x[0]**o+(-0.0329959778533)*x[0]+(-0.504822565972)*x[1]**o+(-0.0328377918948)*x[1]+(0.598087910099)*x[2]**o+(-0.598910302754)*x[2]
-        arg[4,0,1]=(-0.516823078367)*x[0]**o+(-0.783263163828)*x[0]+(0.793230730885)*x[1]**o+(-0.760393659268)*x[1]+(-0.39824557053)*x[2]**o+(0.448151384682)*x[2]
-        arg[4,1,0]=(0.95067110965)*x[0]**o+(0.107038151555)*x[0]+(0.986100034409)*x[1]**o+(-0.603396251285)*x[1]+(0.463709896646)*x[2]**o+(-0.0752001209014)*x[2]
-        arg[4,1,1]=(0.704778063889)*x[0]**o+(-0.00723361955023)*x[0]+(-0.229254019288)*x[1]**o+(0.972066929322)*x[1]+(-0.792377966898)*x[2]**o+(0.00519477641991)*x[2]
-        arg[5,0,0]=(-0.37253642897)*x[0]**o+(-0.283784448234)*x[0]+(0.361753608877)*x[1]**o+(-0.119118907688)*x[1]+(0.403505165985)*x[2]**o+(0.223093000071)*x[2]
-        arg[5,0,1]=(-0.78071834268)*x[0]**o+(0.0321159500156)*x[0]+(0.829040628045)*x[1]**o+(0.864378422992)*x[1]+(0.343294472729)*x[2]**o+(-0.502881977207)*x[2]
-        arg[5,1,0]=(0.445553133352)*x[0]**o+(0.167144149279)*x[0]+(-0.773477294809)*x[1]**o+(0.400540684182)*x[1]+(-0.806904730971)*x[2]**o+(-0.789278588588)*x[2]
-        arg[5,1,1]=(0.290545952984)*x[0]**o+(0.692814030915)*x[0]+(0.176313232933)*x[1]**o+(-0.88461128488)*x[1]+(-0.17903700494)*x[2]**o+(0.448842621603)*x[2]
-        ref[0,0,0]=(-0.349847065801)*x_ref[0]**o+(-0.373197072565)*x_ref[0]+(-0.744002096082)*x_ref[1]**o+(-0.32885837005)*x_ref[1]+(-0.123733527788)*x_ref[2]**o+(0.0357511439931)*x_ref[2]
-        ref[0,0,1]=(0.92390791115)*x_ref[0]**o+(0.359314162684)*x_ref[0]+(-0.344639305985)*x_ref[1]**o+(0.87224607823)*x_ref[1]+(0.603450217818)*x_ref[2]**o+(0.767736049618)*x_ref[2]
-        ref[0,1,0]=(0.619626616187)*x_ref[0]**o+(0.0777214591672)*x_ref[0]+(-0.454938621339)*x_ref[1]**o+(0.397372303072)*x_ref[1]+(0.64005891461)*x_ref[2]**o+(0.384837098241)*x_ref[2]
-        ref[0,1,1]=(0.694681223586)*x_ref[0]**o+(0.746056110128)*x_ref[0]+(-0.299128956618)*x_ref[1]**o+(-0.411577781871)*x_ref[1]+(0.0769629748738)*x_ref[2]**o+(0.185345614784)*x_ref[2]
-        ref[1,0,0]=(-0.686338455095)*x_ref[0]**o+(0.516443141718)*x_ref[0]+(0.0963836215517)*x_ref[1]**o+(-0.142756276631)*x_ref[1]+(0.783984002173)*x_ref[2]**o+(0.453983016774)*x_ref[2]
-        ref[1,0,1]=(-0.261515294422)*x_ref[0]**o+(0.193353051852)*x_ref[0]+(0.536103258837)*x_ref[1]**o+(0.739075865062)*x_ref[1]+(0.0854181253451)*x_ref[2]**o+(0.993960851485)*x_ref[2]
-        ref[1,1,0]=(-0.041143202263)*x_ref[0]**o+(-0.0483966496614)*x_ref[0]+(0.100238616242)*x_ref[1]**o+(0.229736237164)*x_ref[1]+(-0.427145221147)*x_ref[2]**o+(-0.143755555255)*x_ref[2]
-        ref[1,1,1]=(-0.489208229053)*x_ref[0]**o+(-0.339638394047)*x_ref[0]+(-0.0197108849498)*x_ref[1]**o+(-0.64396285961)*x_ref[1]+(0.644185397988)*x_ref[2]**o+(0.952646865856)*x_ref[2]
-        ref[2,0,0]=(0.524059731144)*x_ref[0]**o+(0.184311280754)*x_ref[0]+(0.119889599722)*x_ref[1]**o+(0.953938302354)*x_ref[1]+(0.0331959462044)*x_ref[2]**o+(-0.695477785189)*x_ref[2]
-        ref[2,0,1]=(0.925889695911)*x_ref[0]**o+(0.612691423308)*x_ref[0]+(0.492933561499)*x_ref[1]**o+(-0.320060666384)*x_ref[1]+(-0.308466393813)*x_ref[2]**o+(0.907998151313)*x_ref[2]
-        ref[2,1,0]=(-0.874135284498)*x_ref[0]**o+(0.0151718942733)*x_ref[0]+(0.861045338983)*x_ref[1]**o+(-0.228228955072)*x_ref[1]+(-0.350972290538)*x_ref[2]**o+(0.961075321834)*x_ref[2]
-        ref[2,1,1]=(-0.889805119627)*x_ref[0]**o+(0.561790945688)*x_ref[0]+(-0.500273719691)*x_ref[1]**o+(-0.633623450372)*x_ref[1]+(-0.0153487772927)*x_ref[2]**o+(-0.0798904596833)*x_ref[2]
-        ref[3,0,0]=(-0.873621421496)*x_ref[0]**o+(0.513411619207)*x_ref[0]+(-0.961906901835)*x_ref[1]**o+(0.321006445811)*x_ref[1]+(-0.592020038506)*x_ref[2]**o+(0.555697967812)*x_ref[2]
-        ref[3,0,1]=(0.850390230672)*x_ref[0]**o+(-0.391435099771)*x_ref[0]+(0.700909972778)*x_ref[1]**o+(0.794987613709)*x_ref[1]+(-0.775188800108)*x_ref[2]**o+(-0.132226119354)*x_ref[2]
-        ref[3,1,0]=(0.597260092409)*x_ref[0]**o+(0.393550227561)*x_ref[0]+(-0.554683881247)*x_ref[1]**o+(-0.371724214354)*x_ref[1]+(-0.53562488411)*x_ref[2]**o+(-0.555005739246)*x_ref[2]
-        ref[3,1,1]=(-0.14964970997)*x_ref[0]**o+(-0.524377521321)*x_ref[0]+(-0.738788452632)*x_ref[1]**o+(-0.832575942733)*x_ref[1]+(-0.766690459508)*x_ref[2]**o+(-0.788273000486)*x_ref[2]
-        ref[4,0,0]=(-0.772922450679)*x_ref[0]**o+(-0.0329959778533)*x_ref[0]+(-0.504822565972)*x_ref[1]**o+(-0.0328377918948)*x_ref[1]+(0.598087910099)*x_ref[2]**o+(-0.598910302754)*x_ref[2]
-        ref[4,0,1]=(-0.516823078367)*x_ref[0]**o+(-0.783263163828)*x_ref[0]+(0.793230730885)*x_ref[1]**o+(-0.760393659268)*x_ref[1]+(-0.39824557053)*x_ref[2]**o+(0.448151384682)*x_ref[2]
-        ref[4,1,0]=(0.95067110965)*x_ref[0]**o+(0.107038151555)*x_ref[0]+(0.986100034409)*x_ref[1]**o+(-0.603396251285)*x_ref[1]+(0.463709896646)*x_ref[2]**o+(-0.0752001209014)*x_ref[2]
-        ref[4,1,1]=(0.704778063889)*x_ref[0]**o+(-0.00723361955023)*x_ref[0]+(-0.229254019288)*x_ref[1]**o+(0.972066929322)*x_ref[1]+(-0.792377966898)*x_ref[2]**o+(0.00519477641991)*x_ref[2]
-        ref[5,0,0]=(-0.37253642897)*x_ref[0]**o+(-0.283784448234)*x_ref[0]+(0.361753608877)*x_ref[1]**o+(-0.119118907688)*x_ref[1]+(0.403505165985)*x_ref[2]**o+(0.223093000071)*x_ref[2]
-        ref[5,0,1]=(-0.78071834268)*x_ref[0]**o+(0.0321159500156)*x_ref[0]+(0.829040628045)*x_ref[1]**o+(0.864378422992)*x_ref[1]+(0.343294472729)*x_ref[2]**o+(-0.502881977207)*x_ref[2]
-        ref[5,1,0]=(0.445553133352)*x_ref[0]**o+(0.167144149279)*x_ref[0]+(-0.773477294809)*x_ref[1]**o+(0.400540684182)*x_ref[1]+(-0.806904730971)*x_ref[2]**o+(-0.789278588588)*x_ref[2]
-        ref[5,1,1]=(0.290545952984)*x_ref[0]**o+(0.692814030915)*x_ref[0]+(0.176313232933)*x_ref[1]**o+(-0.88461128488)*x_ref[1]+(-0.17903700494)*x_ref[2]**o+(0.448842621603)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onSolution_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the Solution
-
-      assumptions: self.domain supports inpterpolation from Solution onto Solution
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Solution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.355090869915)*x[0]**o+(0.62333594265)*x[0]+(0.127393746399)*x[1]**o+(0.938815550559)*x[1]
-        arg[0,0,0,1]=(0.361108442937)*x[0]**o+(0.848759016468)*x[0]+(-0.100173964534)*x[1]**o+(-0.798463736192)*x[1]
-        arg[0,0,1,0]=(0.85312225866)*x[0]**o+(0.862709543579)*x[0]+(0.0794424365586)*x[1]**o+(-0.798377510326)*x[1]
-        arg[0,0,1,1]=(-0.370853792692)*x[0]**o+(-0.967610789809)*x[0]+(0.277035447492)*x[1]**o+(-0.880157165176)*x[1]
-        arg[0,0,2,0]=(-0.717702490059)*x[0]**o+(0.701614319774)*x[0]+(0.870301462626)*x[1]**o+(0.97842528383)*x[1]
-        arg[0,0,2,1]=(0.398938846238)*x[0]**o+(0.460600049445)*x[0]+(-0.719014936029)*x[1]**o+(0.909351103488)*x[1]
-        arg[0,1,0,0]=(-0.607340194261)*x[0]**o+(-0.851772216829)*x[0]+(0.7593824952)*x[1]**o+(-0.621669238017)*x[1]
-        arg[0,1,0,1]=(-0.769916079359)*x[0]**o+(0.628665644279)*x[0]+(0.198700163204)*x[1]**o+(-0.878872706777)*x[1]
-        arg[0,1,1,0]=(-0.133970652198)*x[0]**o+(0.817475343341)*x[0]+(-0.553628012005)*x[1]**o+(-0.780184324119)*x[1]
-        arg[0,1,1,1]=(-0.91240774502)*x[0]**o+(-0.438683032351)*x[0]+(-0.651970251415)*x[1]**o+(-0.985718981791)*x[1]
-        arg[0,1,2,0]=(-0.0894695484803)*x[0]**o+(0.230969119002)*x[0]+(-0.181318345335)*x[1]**o+(-0.684304266075)*x[1]
-        arg[0,1,2,1]=(0.116582610294)*x[0]**o+(0.508506980325)*x[0]+(-0.227569256068)*x[1]**o+(-0.743396388621)*x[1]
-        arg[0,2,0,0]=(0.163058551784)*x[0]**o+(-0.819992657695)*x[0]+(-0.0400315416665)*x[1]**o+(-0.368673546217)*x[1]
-        arg[0,2,0,1]=(-0.760195093607)*x[0]**o+(-0.186788923915)*x[0]+(0.0439683490286)*x[1]**o+(-0.329021652328)*x[1]
-        arg[0,2,1,0]=(-0.740086957456)*x[0]**o+(0.67648478989)*x[0]+(0.233575048863)*x[1]**o+(-0.353142296901)*x[1]
-        arg[0,2,1,1]=(0.0374034623006)*x[0]**o+(-0.912304735553)*x[0]+(-0.982504180489)*x[1]**o+(0.388144019319)*x[1]
-        arg[0,2,2,0]=(-0.812061018965)*x[0]**o+(0.641603736452)*x[0]+(0.260352725676)*x[1]**o+(-0.361534248663)*x[1]
-        arg[0,2,2,1]=(0.0783398648132)*x[0]**o+(0.276408362801)*x[0]+(-0.107410956411)*x[1]**o+(-0.0733118712953)*x[1]
-        arg[0,3,0,0]=(-0.085393595974)*x[0]**o+(0.545214990205)*x[0]+(0.451103178758)*x[1]**o+(0.741889771181)*x[1]
-        arg[0,3,0,1]=(-0.377253694991)*x[0]**o+(0.243160465116)*x[0]+(-0.330892504638)*x[1]**o+(0.0688453403018)*x[1]
-        arg[0,3,1,0]=(0.569018176673)*x[0]**o+(-0.519384243562)*x[0]+(0.807469891684)*x[1]**o+(-0.511601914558)*x[1]
-        arg[0,3,1,1]=(-0.624467771068)*x[0]**o+(0.722555599188)*x[0]+(0.165243550597)*x[1]**o+(0.124887773794)*x[1]
-        arg[0,3,2,0]=(0.846969233067)*x[0]**o+(0.143910732534)*x[0]+(-0.933748958347)*x[1]**o+(-0.468985899594)*x[1]
-        arg[0,3,2,1]=(-0.00559860682228)*x[0]**o+(0.6265077144)*x[0]+(-0.597502391816)*x[1]**o+(-0.0269950883749)*x[1]
-        arg[0,4,0,0]=(-0.929830228823)*x[0]**o+(0.533173796675)*x[0]+(-0.513355534671)*x[1]**o+(0.739452877653)*x[1]
-        arg[0,4,0,1]=(0.573157694447)*x[0]**o+(0.533950659465)*x[0]+(-0.470668156002)*x[1]**o+(-0.267083337629)*x[1]
-        arg[0,4,1,0]=(-0.786758281623)*x[0]**o+(-0.559211099907)*x[0]+(-0.981412883007)*x[1]**o+(-0.760247332612)*x[1]
-        arg[0,4,1,1]=(0.811476615714)*x[0]**o+(-0.483217733654)*x[0]+(-0.473107949588)*x[1]**o+(-0.388655922158)*x[1]
-        arg[0,4,2,0]=(0.743903538516)*x[0]**o+(-0.0914243557971)*x[0]+(0.523767499227)*x[1]**o+(0.105519926963)*x[1]
-        arg[0,4,2,1]=(-0.425629408466)*x[0]**o+(0.294957108568)*x[0]+(-0.248527445843)*x[1]**o+(0.343947931379)*x[1]
-        arg[1,0,0,0]=(0.413841637504)*x[0]**o+(0.609974192806)*x[0]+(-0.0785287734637)*x[1]**o+(0.538510227782)*x[1]
-        arg[1,0,0,1]=(-0.905065001974)*x[0]**o+(-0.440318385611)*x[0]+(-0.0108293746138)*x[1]**o+(0.132125994317)*x[1]
-        arg[1,0,1,0]=(0.212448400234)*x[0]**o+(0.117680077385)*x[0]+(0.501566152733)*x[1]**o+(-0.0914837162066)*x[1]
-        arg[1,0,1,1]=(-0.763152636104)*x[0]**o+(0.318595673875)*x[0]+(-0.166759749724)*x[1]**o+(0.742420099653)*x[1]
-        arg[1,0,2,0]=(-0.711420698498)*x[0]**o+(-0.0777910925778)*x[0]+(-0.885593755559)*x[1]**o+(0.302761673106)*x[1]
-        arg[1,0,2,1]=(0.980964252534)*x[0]**o+(-0.890328597184)*x[0]+(-0.230421339981)*x[1]**o+(-0.656523995481)*x[1]
-        arg[1,1,0,0]=(0.376070672474)*x[0]**o+(0.940362151504)*x[0]+(-0.297285488825)*x[1]**o+(0.451414529855)*x[1]
-        arg[1,1,0,1]=(0.867987607318)*x[0]**o+(0.0477620815134)*x[0]+(0.257575148838)*x[1]**o+(-0.54187477723)*x[1]
-        arg[1,1,1,0]=(-0.0643073021305)*x[0]**o+(0.20805724465)*x[0]+(-0.16501072904)*x[1]**o+(-0.341858346811)*x[1]
-        arg[1,1,1,1]=(0.317830146671)*x[0]**o+(-0.307344984878)*x[0]+(0.170352713722)*x[1]**o+(-0.219561938951)*x[1]
-        arg[1,1,2,0]=(0.89815928322)*x[0]**o+(0.51678942721)*x[0]+(0.897095493092)*x[1]**o+(-0.732217042123)*x[1]
-        arg[1,1,2,1]=(0.0216578477569)*x[0]**o+(-0.942894641381)*x[0]+(-0.475731377321)*x[1]**o+(-0.753173025139)*x[1]
-        arg[1,2,0,0]=(-0.897860515192)*x[0]**o+(0.833870034804)*x[0]+(0.554274053224)*x[1]**o+(-0.785991934149)*x[1]
-        arg[1,2,0,1]=(-0.0648893111877)*x[0]**o+(0.173757424631)*x[0]+(0.860427552735)*x[1]**o+(0.139897107451)*x[1]
-        arg[1,2,1,0]=(-0.146915585006)*x[0]**o+(-0.290881625114)*x[0]+(0.98541624122)*x[1]**o+(0.868617044417)*x[1]
-        arg[1,2,1,1]=(0.17817541898)*x[0]**o+(-0.0112388444881)*x[0]+(0.646731986079)*x[1]**o+(0.653380181018)*x[1]
-        arg[1,2,2,0]=(0.208250797377)*x[0]**o+(0.362989066599)*x[0]+(-0.384302232322)*x[1]**o+(0.376460044532)*x[1]
-        arg[1,2,2,1]=(0.0437567097332)*x[0]**o+(0.739696851008)*x[0]+(0.0308848949312)*x[1]**o+(-0.445528203988)*x[1]
-        arg[1,3,0,0]=(-0.257780793962)*x[0]**o+(0.840582446797)*x[0]+(0.599894892775)*x[1]**o+(-0.744691829118)*x[1]
-        arg[1,3,0,1]=(0.913814269186)*x[0]**o+(0.295261304054)*x[0]+(0.0934778065196)*x[1]**o+(0.567115895371)*x[1]
-        arg[1,3,1,0]=(-0.399785878199)*x[0]**o+(0.0336841328611)*x[0]+(0.236101490273)*x[1]**o+(0.915159045152)*x[1]
-        arg[1,3,1,1]=(-0.955438743542)*x[0]**o+(-0.457060494715)*x[0]+(0.582140402321)*x[1]**o+(-0.999341752789)*x[1]
-        arg[1,3,2,0]=(0.0206746776356)*x[0]**o+(-0.307327438556)*x[0]+(-0.646238381067)*x[1]**o+(0.248313182827)*x[1]
-        arg[1,3,2,1]=(-0.10971097551)*x[0]**o+(-0.825303025298)*x[0]+(0.876884308015)*x[1]**o+(0.53621927318)*x[1]
-        arg[1,4,0,0]=(0.833490742222)*x[0]**o+(0.865604127412)*x[0]+(0.627418353815)*x[1]**o+(0.523133814878)*x[1]
-        arg[1,4,0,1]=(0.57616288545)*x[0]**o+(0.438552559891)*x[0]+(0.0256681709722)*x[1]**o+(-0.738314027898)*x[1]
-        arg[1,4,1,0]=(0.319863593844)*x[0]**o+(0.177342228601)*x[0]+(0.0865784775196)*x[1]**o+(0.642550298518)*x[1]
-        arg[1,4,1,1]=(-0.0141646689097)*x[0]**o+(0.317108687762)*x[0]+(0.188163493751)*x[1]**o+(0.990958509748)*x[1]
-        arg[1,4,2,0]=(0.199211769035)*x[0]**o+(-0.0280132568124)*x[0]+(0.144960116505)*x[1]**o+(0.226821898255)*x[1]
-        arg[1,4,2,1]=(-0.892464680507)*x[0]**o+(-0.60166056141)*x[0]+(-0.492226295363)*x[1]**o+(0.189924737916)*x[1]
-        arg[2,0,0,0]=(0.329199148463)*x[0]**o+(-0.345343145094)*x[0]+(-0.22723822677)*x[1]**o+(-0.214232512114)*x[1]
-        arg[2,0,0,1]=(-0.195525660216)*x[0]**o+(0.323518517888)*x[0]+(-0.116808991213)*x[1]**o+(0.22923091239)*x[1]
-        arg[2,0,1,0]=(-0.826978585914)*x[0]**o+(0.641345887454)*x[0]+(-0.335583694811)*x[1]**o+(0.168685506673)*x[1]
-        arg[2,0,1,1]=(-0.756460980453)*x[0]**o+(-0.9181609332)*x[0]+(0.0735111723828)*x[1]**o+(0.312524164436)*x[1]
-        arg[2,0,2,0]=(0.297314747638)*x[0]**o+(0.522844740561)*x[0]+(0.890404335261)*x[1]**o+(-0.158861326888)*x[1]
-        arg[2,0,2,1]=(-0.280311121771)*x[0]**o+(0.561223136791)*x[0]+(-0.952737235492)*x[1]**o+(0.581165512883)*x[1]
-        arg[2,1,0,0]=(-0.202509823332)*x[0]**o+(0.298626146584)*x[0]+(0.533843705865)*x[1]**o+(0.652127174748)*x[1]
-        arg[2,1,0,1]=(-0.349734740031)*x[0]**o+(-0.0589736478602)*x[0]+(0.741348559428)*x[1]**o+(0.993586735262)*x[1]
-        arg[2,1,1,0]=(-0.350986159862)*x[0]**o+(-0.814566621733)*x[0]+(0.0556573702074)*x[1]**o+(0.363924401853)*x[1]
-        arg[2,1,1,1]=(-0.562086543404)*x[0]**o+(0.126278013645)*x[0]+(-0.488684138283)*x[1]**o+(-0.990773306296)*x[1]
-        arg[2,1,2,0]=(-0.873707667752)*x[0]**o+(-0.00610530100216)*x[0]+(-0.927847882023)*x[1]**o+(0.255850655097)*x[1]
-        arg[2,1,2,1]=(0.683462220662)*x[0]**o+(-0.515973835798)*x[0]+(-0.676735030671)*x[1]**o+(0.704690967291)*x[1]
-        arg[2,2,0,0]=(-0.0891987051347)*x[0]**o+(0.783509807114)*x[0]+(0.583865611337)*x[1]**o+(-0.373096806492)*x[1]
-        arg[2,2,0,1]=(0.606443213957)*x[0]**o+(0.887055818748)*x[0]+(-0.281844491159)*x[1]**o+(0.420965776696)*x[1]
-        arg[2,2,1,0]=(0.205051077925)*x[0]**o+(0.267690802839)*x[0]+(-0.821781634855)*x[1]**o+(-0.903592743179)*x[1]
-        arg[2,2,1,1]=(-0.0438536252522)*x[0]**o+(-0.870635324748)*x[0]+(-0.238830174768)*x[1]**o+(-0.230782152037)*x[1]
-        arg[2,2,2,0]=(-0.94437182489)*x[0]**o+(0.0666311523262)*x[0]+(0.481913247572)*x[1]**o+(-0.646415708448)*x[1]
-        arg[2,2,2,1]=(0.443901323099)*x[0]**o+(0.349352493291)*x[0]+(-0.158789593075)*x[1]**o+(-0.603521202861)*x[1]
-        arg[2,3,0,0]=(0.716829455981)*x[0]**o+(0.0186823101139)*x[0]+(-0.209053562063)*x[1]**o+(0.847906310296)*x[1]
-        arg[2,3,0,1]=(0.305837642219)*x[0]**o+(0.138301301592)*x[0]+(0.0645236431399)*x[1]**o+(0.909641719567)*x[1]
-        arg[2,3,1,0]=(-0.0177501904561)*x[0]**o+(0.177278703549)*x[0]+(-0.445915965222)*x[1]**o+(-0.894038892768)*x[1]
-        arg[2,3,1,1]=(0.00187039478357)*x[0]**o+(-0.598690809424)*x[0]+(0.299307927538)*x[1]**o+(-0.882235917926)*x[1]
-        arg[2,3,2,0]=(0.730056097248)*x[0]**o+(-0.307654523095)*x[0]+(0.246914489171)*x[1]**o+(-0.60035541725)*x[1]
-        arg[2,3,2,1]=(-0.608344323894)*x[0]**o+(-0.081794637624)*x[0]+(0.099524567015)*x[1]**o+(-0.0654861171366)*x[1]
-        arg[2,4,0,0]=(-0.225654564715)*x[0]**o+(-0.529959598356)*x[0]+(-0.890574962317)*x[1]**o+(0.994618025898)*x[1]
-        arg[2,4,0,1]=(-0.231311865123)*x[0]**o+(0.479613722979)*x[0]+(-0.614977654518)*x[1]**o+(0.804794516306)*x[1]
-        arg[2,4,1,0]=(0.365865384972)*x[0]**o+(-0.889202382492)*x[0]+(-0.300736557219)*x[1]**o+(0.838201123405)*x[1]
-        arg[2,4,1,1]=(-0.809876332779)*x[0]**o+(0.1890391825)*x[0]+(-0.607869144071)*x[1]**o+(0.0448966585205)*x[1]
-        arg[2,4,2,0]=(-0.83080984753)*x[0]**o+(0.305865817658)*x[0]+(-0.359639965091)*x[1]**o+(-0.288164510937)*x[1]
-        arg[2,4,2,1]=(0.616022940224)*x[0]**o+(-0.636356653421)*x[0]+(0.693033289027)*x[1]**o+(-0.780662522342)*x[1]
-        arg[3,0,0,0]=(0.985497135193)*x[0]**o+(-0.441259417159)*x[0]+(0.0550399586931)*x[1]**o+(-0.401551085867)*x[1]
-        arg[3,0,0,1]=(0.66919872999)*x[0]**o+(-0.21372913425)*x[0]+(-0.904643614761)*x[1]**o+(0.254555219564)*x[1]
-        arg[3,0,1,0]=(0.342630495616)*x[0]**o+(-0.688520932208)*x[0]+(-0.795149453533)*x[1]**o+(-0.532353008569)*x[1]
-        arg[3,0,1,1]=(-0.157354065395)*x[0]**o+(-0.574302953359)*x[0]+(-0.0505170558232)*x[1]**o+(-0.916081229428)*x[1]
-        arg[3,0,2,0]=(-0.276092076819)*x[0]**o+(0.755203166655)*x[0]+(0.71481609597)*x[1]**o+(-0.623929271337)*x[1]
-        arg[3,0,2,1]=(0.901066640027)*x[0]**o+(0.615459930577)*x[0]+(-0.65213904597)*x[1]**o+(0.52496253783)*x[1]
-        arg[3,1,0,0]=(-0.90847876416)*x[0]**o+(0.787519284245)*x[0]+(0.260252163627)*x[1]**o+(0.24849374459)*x[1]
-        arg[3,1,0,1]=(-0.519950434741)*x[0]**o+(-0.146327164967)*x[0]+(0.199399508881)*x[1]**o+(0.583497630868)*x[1]
-        arg[3,1,1,0]=(-0.956798390834)*x[0]**o+(0.145681684376)*x[0]+(0.308458821145)*x[1]**o+(-0.759589804755)*x[1]
-        arg[3,1,1,1]=(-0.195569939954)*x[0]**o+(-0.544313649532)*x[0]+(0.387017502787)*x[1]**o+(0.174663629204)*x[1]
-        arg[3,1,2,0]=(-0.3697024469)*x[0]**o+(0.356841678749)*x[0]+(0.922691790563)*x[1]**o+(-0.906755290703)*x[1]
-        arg[3,1,2,1]=(-0.343599294558)*x[0]**o+(-0.213227630549)*x[0]+(-0.822516525353)*x[1]**o+(-0.0350701846979)*x[1]
-        arg[3,2,0,0]=(-0.671120249859)*x[0]**o+(-0.409571854187)*x[0]+(-0.948171208395)*x[1]**o+(0.00128117529499)*x[1]
-        arg[3,2,0,1]=(0.573086687235)*x[0]**o+(0.272624522478)*x[0]+(0.404610375833)*x[1]**o+(0.177742792198)*x[1]
-        arg[3,2,1,0]=(-0.0481585168757)*x[0]**o+(0.108306965224)*x[0]+(0.962229835277)*x[1]**o+(0.457705229155)*x[1]
-        arg[3,2,1,1]=(0.843866939471)*x[0]**o+(-0.209955643474)*x[0]+(0.861076954064)*x[1]**o+(-0.0920496448252)*x[1]
-        arg[3,2,2,0]=(-0.482466555781)*x[0]**o+(0.905888895109)*x[0]+(0.969984046224)*x[1]**o+(0.779155706115)*x[1]
-        arg[3,2,2,1]=(-0.119059605916)*x[0]**o+(-0.413165838565)*x[0]+(-0.458952085266)*x[1]**o+(0.667357851674)*x[1]
-        arg[3,3,0,0]=(-0.139020214893)*x[0]**o+(-0.430716093157)*x[0]+(0.587151976237)*x[1]**o+(0.538779583614)*x[1]
-        arg[3,3,0,1]=(-0.196698073225)*x[0]**o+(0.28357504894)*x[0]+(0.628834405238)*x[1]**o+(0.991210138395)*x[1]
-        arg[3,3,1,0]=(-0.375644375731)*x[0]**o+(0.889016565145)*x[0]+(-0.495700828743)*x[1]**o+(-0.498859003938)*x[1]
-        arg[3,3,1,1]=(0.783773071811)*x[0]**o+(-0.0875026023418)*x[0]+(-0.421213063239)*x[1]**o+(0.750220508147)*x[1]
-        arg[3,3,2,0]=(0.211305046835)*x[0]**o+(-0.828436860631)*x[0]+(0.225275220049)*x[1]**o+(0.264723427485)*x[1]
-        arg[3,3,2,1]=(0.582818095069)*x[0]**o+(0.497614150982)*x[0]+(-0.445084955033)*x[1]**o+(-0.600656630963)*x[1]
-        arg[3,4,0,0]=(-0.886999530258)*x[0]**o+(0.386008089061)*x[0]+(-0.292729716725)*x[1]**o+(-0.159269788338)*x[1]
-        arg[3,4,0,1]=(0.260932511148)*x[0]**o+(-0.533553803234)*x[0]+(0.174946866584)*x[1]**o+(-0.17701796222)*x[1]
-        arg[3,4,1,0]=(0.37985010505)*x[0]**o+(0.934809225579)*x[0]+(-0.76271501884)*x[1]**o+(0.171072659)*x[1]
-        arg[3,4,1,1]=(-0.369797459679)*x[0]**o+(-0.714539720717)*x[0]+(-0.122698805149)*x[1]**o+(0.874232715421)*x[1]
-        arg[3,4,2,0]=(0.912569854856)*x[0]**o+(-0.773508960793)*x[0]+(-0.447748330632)*x[1]**o+(-0.0117517938995)*x[1]
-        arg[3,4,2,1]=(-0.467442835658)*x[0]**o+(-0.792740521854)*x[0]+(-0.33441666815)*x[1]**o+(-0.821650769855)*x[1]
-        ref[0,0,0,0]=(0.355090869915)*x_ref[0]**o+(0.62333594265)*x_ref[0]+(0.127393746399)*x_ref[1]**o+(0.938815550559)*x_ref[1]
-        ref[0,0,0,1]=(0.361108442937)*x_ref[0]**o+(0.848759016468)*x_ref[0]+(-0.100173964534)*x_ref[1]**o+(-0.798463736192)*x_ref[1]
-        ref[0,0,1,0]=(0.85312225866)*x_ref[0]**o+(0.862709543579)*x_ref[0]+(0.0794424365586)*x_ref[1]**o+(-0.798377510326)*x_ref[1]
-        ref[0,0,1,1]=(-0.370853792692)*x_ref[0]**o+(-0.967610789809)*x_ref[0]+(0.277035447492)*x_ref[1]**o+(-0.880157165176)*x_ref[1]
-        ref[0,0,2,0]=(-0.717702490059)*x_ref[0]**o+(0.701614319774)*x_ref[0]+(0.870301462626)*x_ref[1]**o+(0.97842528383)*x_ref[1]
-        ref[0,0,2,1]=(0.398938846238)*x_ref[0]**o+(0.460600049445)*x_ref[0]+(-0.719014936029)*x_ref[1]**o+(0.909351103488)*x_ref[1]
-        ref[0,1,0,0]=(-0.607340194261)*x_ref[0]**o+(-0.851772216829)*x_ref[0]+(0.7593824952)*x_ref[1]**o+(-0.621669238017)*x_ref[1]
-        ref[0,1,0,1]=(-0.769916079359)*x_ref[0]**o+(0.628665644279)*x_ref[0]+(0.198700163204)*x_ref[1]**o+(-0.878872706777)*x_ref[1]
-        ref[0,1,1,0]=(-0.133970652198)*x_ref[0]**o+(0.817475343341)*x_ref[0]+(-0.553628012005)*x_ref[1]**o+(-0.780184324119)*x_ref[1]
-        ref[0,1,1,1]=(-0.91240774502)*x_ref[0]**o+(-0.438683032351)*x_ref[0]+(-0.651970251415)*x_ref[1]**o+(-0.985718981791)*x_ref[1]
-        ref[0,1,2,0]=(-0.0894695484803)*x_ref[0]**o+(0.230969119002)*x_ref[0]+(-0.181318345335)*x_ref[1]**o+(-0.684304266075)*x_ref[1]
-        ref[0,1,2,1]=(0.116582610294)*x_ref[0]**o+(0.508506980325)*x_ref[0]+(-0.227569256068)*x_ref[1]**o+(-0.743396388621)*x_ref[1]
-        ref[0,2,0,0]=(0.163058551784)*x_ref[0]**o+(-0.819992657695)*x_ref[0]+(-0.0400315416665)*x_ref[1]**o+(-0.368673546217)*x_ref[1]
-        ref[0,2,0,1]=(-0.760195093607)*x_ref[0]**o+(-0.186788923915)*x_ref[0]+(0.0439683490286)*x_ref[1]**o+(-0.329021652328)*x_ref[1]
-        ref[0,2,1,0]=(-0.740086957456)*x_ref[0]**o+(0.67648478989)*x_ref[0]+(0.233575048863)*x_ref[1]**o+(-0.353142296901)*x_ref[1]
-        ref[0,2,1,1]=(0.0374034623006)*x_ref[0]**o+(-0.912304735553)*x_ref[0]+(-0.982504180489)*x_ref[1]**o+(0.388144019319)*x_ref[1]
-        ref[0,2,2,0]=(-0.812061018965)*x_ref[0]**o+(0.641603736452)*x_ref[0]+(0.260352725676)*x_ref[1]**o+(-0.361534248663)*x_ref[1]
-        ref[0,2,2,1]=(0.0783398648132)*x_ref[0]**o+(0.276408362801)*x_ref[0]+(-0.107410956411)*x_ref[1]**o+(-0.0733118712953)*x_ref[1]
-        ref[0,3,0,0]=(-0.085393595974)*x_ref[0]**o+(0.545214990205)*x_ref[0]+(0.451103178758)*x_ref[1]**o+(0.741889771181)*x_ref[1]
-        ref[0,3,0,1]=(-0.377253694991)*x_ref[0]**o+(0.243160465116)*x_ref[0]+(-0.330892504638)*x_ref[1]**o+(0.0688453403018)*x_ref[1]
-        ref[0,3,1,0]=(0.569018176673)*x_ref[0]**o+(-0.519384243562)*x_ref[0]+(0.807469891684)*x_ref[1]**o+(-0.511601914558)*x_ref[1]
-        ref[0,3,1,1]=(-0.624467771068)*x_ref[0]**o+(0.722555599188)*x_ref[0]+(0.165243550597)*x_ref[1]**o+(0.124887773794)*x_ref[1]
-        ref[0,3,2,0]=(0.846969233067)*x_ref[0]**o+(0.143910732534)*x_ref[0]+(-0.933748958347)*x_ref[1]**o+(-0.468985899594)*x_ref[1]
-        ref[0,3,2,1]=(-0.00559860682228)*x_ref[0]**o+(0.6265077144)*x_ref[0]+(-0.597502391816)*x_ref[1]**o+(-0.0269950883749)*x_ref[1]
-        ref[0,4,0,0]=(-0.929830228823)*x_ref[0]**o+(0.533173796675)*x_ref[0]+(-0.513355534671)*x_ref[1]**o+(0.739452877653)*x_ref[1]
-        ref[0,4,0,1]=(0.573157694447)*x_ref[0]**o+(0.533950659465)*x_ref[0]+(-0.470668156002)*x_ref[1]**o+(-0.267083337629)*x_ref[1]
-        ref[0,4,1,0]=(-0.786758281623)*x_ref[0]**o+(-0.559211099907)*x_ref[0]+(-0.981412883007)*x_ref[1]**o+(-0.760247332612)*x_ref[1]
-        ref[0,4,1,1]=(0.811476615714)*x_ref[0]**o+(-0.483217733654)*x_ref[0]+(-0.473107949588)*x_ref[1]**o+(-0.388655922158)*x_ref[1]
-        ref[0,4,2,0]=(0.743903538516)*x_ref[0]**o+(-0.0914243557971)*x_ref[0]+(0.523767499227)*x_ref[1]**o+(0.105519926963)*x_ref[1]
-        ref[0,4,2,1]=(-0.425629408466)*x_ref[0]**o+(0.294957108568)*x_ref[0]+(-0.248527445843)*x_ref[1]**o+(0.343947931379)*x_ref[1]
-        ref[1,0,0,0]=(0.413841637504)*x_ref[0]**o+(0.609974192806)*x_ref[0]+(-0.0785287734637)*x_ref[1]**o+(0.538510227782)*x_ref[1]
-        ref[1,0,0,1]=(-0.905065001974)*x_ref[0]**o+(-0.440318385611)*x_ref[0]+(-0.0108293746138)*x_ref[1]**o+(0.132125994317)*x_ref[1]
-        ref[1,0,1,0]=(0.212448400234)*x_ref[0]**o+(0.117680077385)*x_ref[0]+(0.501566152733)*x_ref[1]**o+(-0.0914837162066)*x_ref[1]
-        ref[1,0,1,1]=(-0.763152636104)*x_ref[0]**o+(0.318595673875)*x_ref[0]+(-0.166759749724)*x_ref[1]**o+(0.742420099653)*x_ref[1]
-        ref[1,0,2,0]=(-0.711420698498)*x_ref[0]**o+(-0.0777910925778)*x_ref[0]+(-0.885593755559)*x_ref[1]**o+(0.302761673106)*x_ref[1]
-        ref[1,0,2,1]=(0.980964252534)*x_ref[0]**o+(-0.890328597184)*x_ref[0]+(-0.230421339981)*x_ref[1]**o+(-0.656523995481)*x_ref[1]
-        ref[1,1,0,0]=(0.376070672474)*x_ref[0]**o+(0.940362151504)*x_ref[0]+(-0.297285488825)*x_ref[1]**o+(0.451414529855)*x_ref[1]
-        ref[1,1,0,1]=(0.867987607318)*x_ref[0]**o+(0.0477620815134)*x_ref[0]+(0.257575148838)*x_ref[1]**o+(-0.54187477723)*x_ref[1]
-        ref[1,1,1,0]=(-0.0643073021305)*x_ref[0]**o+(0.20805724465)*x_ref[0]+(-0.16501072904)*x_ref[1]**o+(-0.341858346811)*x_ref[1]
-        ref[1,1,1,1]=(0.317830146671)*x_ref[0]**o+(-0.307344984878)*x_ref[0]+(0.170352713722)*x_ref[1]**o+(-0.219561938951)*x_ref[1]
-        ref[1,1,2,0]=(0.89815928322)*x_ref[0]**o+(0.51678942721)*x_ref[0]+(0.897095493092)*x_ref[1]**o+(-0.732217042123)*x_ref[1]
-        ref[1,1,2,1]=(0.0216578477569)*x_ref[0]**o+(-0.942894641381)*x_ref[0]+(-0.475731377321)*x_ref[1]**o+(-0.753173025139)*x_ref[1]
-        ref[1,2,0,0]=(-0.897860515192)*x_ref[0]**o+(0.833870034804)*x_ref[0]+(0.554274053224)*x_ref[1]**o+(-0.785991934149)*x_ref[1]
-        ref[1,2,0,1]=(-0.0648893111877)*x_ref[0]**o+(0.173757424631)*x_ref[0]+(0.860427552735)*x_ref[1]**o+(0.139897107451)*x_ref[1]
-        ref[1,2,1,0]=(-0.146915585006)*x_ref[0]**o+(-0.290881625114)*x_ref[0]+(0.98541624122)*x_ref[1]**o+(0.868617044417)*x_ref[1]
-        ref[1,2,1,1]=(0.17817541898)*x_ref[0]**o+(-0.0112388444881)*x_ref[0]+(0.646731986079)*x_ref[1]**o+(0.653380181018)*x_ref[1]
-        ref[1,2,2,0]=(0.208250797377)*x_ref[0]**o+(0.362989066599)*x_ref[0]+(-0.384302232322)*x_ref[1]**o+(0.376460044532)*x_ref[1]
-        ref[1,2,2,1]=(0.0437567097332)*x_ref[0]**o+(0.739696851008)*x_ref[0]+(0.0308848949312)*x_ref[1]**o+(-0.445528203988)*x_ref[1]
-        ref[1,3,0,0]=(-0.257780793962)*x_ref[0]**o+(0.840582446797)*x_ref[0]+(0.599894892775)*x_ref[1]**o+(-0.744691829118)*x_ref[1]
-        ref[1,3,0,1]=(0.913814269186)*x_ref[0]**o+(0.295261304054)*x_ref[0]+(0.0934778065196)*x_ref[1]**o+(0.567115895371)*x_ref[1]
-        ref[1,3,1,0]=(-0.399785878199)*x_ref[0]**o+(0.0336841328611)*x_ref[0]+(0.236101490273)*x_ref[1]**o+(0.915159045152)*x_ref[1]
-        ref[1,3,1,1]=(-0.955438743542)*x_ref[0]**o+(-0.457060494715)*x_ref[0]+(0.582140402321)*x_ref[1]**o+(-0.999341752789)*x_ref[1]
-        ref[1,3,2,0]=(0.0206746776356)*x_ref[0]**o+(-0.307327438556)*x_ref[0]+(-0.646238381067)*x_ref[1]**o+(0.248313182827)*x_ref[1]
-        ref[1,3,2,1]=(-0.10971097551)*x_ref[0]**o+(-0.825303025298)*x_ref[0]+(0.876884308015)*x_ref[1]**o+(0.53621927318)*x_ref[1]
-        ref[1,4,0,0]=(0.833490742222)*x_ref[0]**o+(0.865604127412)*x_ref[0]+(0.627418353815)*x_ref[1]**o+(0.523133814878)*x_ref[1]
-        ref[1,4,0,1]=(0.57616288545)*x_ref[0]**o+(0.438552559891)*x_ref[0]+(0.0256681709722)*x_ref[1]**o+(-0.738314027898)*x_ref[1]
-        ref[1,4,1,0]=(0.319863593844)*x_ref[0]**o+(0.177342228601)*x_ref[0]+(0.0865784775196)*x_ref[1]**o+(0.642550298518)*x_ref[1]
-        ref[1,4,1,1]=(-0.0141646689097)*x_ref[0]**o+(0.317108687762)*x_ref[0]+(0.188163493751)*x_ref[1]**o+(0.990958509748)*x_ref[1]
-        ref[1,4,2,0]=(0.199211769035)*x_ref[0]**o+(-0.0280132568124)*x_ref[0]+(0.144960116505)*x_ref[1]**o+(0.226821898255)*x_ref[1]
-        ref[1,4,2,1]=(-0.892464680507)*x_ref[0]**o+(-0.60166056141)*x_ref[0]+(-0.492226295363)*x_ref[1]**o+(0.189924737916)*x_ref[1]
-        ref[2,0,0,0]=(0.329199148463)*x_ref[0]**o+(-0.345343145094)*x_ref[0]+(-0.22723822677)*x_ref[1]**o+(-0.214232512114)*x_ref[1]
-        ref[2,0,0,1]=(-0.195525660216)*x_ref[0]**o+(0.323518517888)*x_ref[0]+(-0.116808991213)*x_ref[1]**o+(0.22923091239)*x_ref[1]
-        ref[2,0,1,0]=(-0.826978585914)*x_ref[0]**o+(0.641345887454)*x_ref[0]+(-0.335583694811)*x_ref[1]**o+(0.168685506673)*x_ref[1]
-        ref[2,0,1,1]=(-0.756460980453)*x_ref[0]**o+(-0.9181609332)*x_ref[0]+(0.0735111723828)*x_ref[1]**o+(0.312524164436)*x_ref[1]
-        ref[2,0,2,0]=(0.297314747638)*x_ref[0]**o+(0.522844740561)*x_ref[0]+(0.890404335261)*x_ref[1]**o+(-0.158861326888)*x_ref[1]
-        ref[2,0,2,1]=(-0.280311121771)*x_ref[0]**o+(0.561223136791)*x_ref[0]+(-0.952737235492)*x_ref[1]**o+(0.581165512883)*x_ref[1]
-        ref[2,1,0,0]=(-0.202509823332)*x_ref[0]**o+(0.298626146584)*x_ref[0]+(0.533843705865)*x_ref[1]**o+(0.652127174748)*x_ref[1]
-        ref[2,1,0,1]=(-0.349734740031)*x_ref[0]**o+(-0.0589736478602)*x_ref[0]+(0.741348559428)*x_ref[1]**o+(0.993586735262)*x_ref[1]
-        ref[2,1,1,0]=(-0.350986159862)*x_ref[0]**o+(-0.814566621733)*x_ref[0]+(0.0556573702074)*x_ref[1]**o+(0.363924401853)*x_ref[1]
-        ref[2,1,1,1]=(-0.562086543404)*x_ref[0]**o+(0.126278013645)*x_ref[0]+(-0.488684138283)*x_ref[1]**o+(-0.990773306296)*x_ref[1]
-        ref[2,1,2,0]=(-0.873707667752)*x_ref[0]**o+(-0.00610530100216)*x_ref[0]+(-0.927847882023)*x_ref[1]**o+(0.255850655097)*x_ref[1]
-        ref[2,1,2,1]=(0.683462220662)*x_ref[0]**o+(-0.515973835798)*x_ref[0]+(-0.676735030671)*x_ref[1]**o+(0.704690967291)*x_ref[1]
-        ref[2,2,0,0]=(-0.0891987051347)*x_ref[0]**o+(0.783509807114)*x_ref[0]+(0.583865611337)*x_ref[1]**o+(-0.373096806492)*x_ref[1]
-        ref[2,2,0,1]=(0.606443213957)*x_ref[0]**o+(0.887055818748)*x_ref[0]+(-0.281844491159)*x_ref[1]**o+(0.420965776696)*x_ref[1]
-        ref[2,2,1,0]=(0.205051077925)*x_ref[0]**o+(0.267690802839)*x_ref[0]+(-0.821781634855)*x_ref[1]**o+(-0.903592743179)*x_ref[1]
-        ref[2,2,1,1]=(-0.0438536252522)*x_ref[0]**o+(-0.870635324748)*x_ref[0]+(-0.238830174768)*x_ref[1]**o+(-0.230782152037)*x_ref[1]
-        ref[2,2,2,0]=(-0.94437182489)*x_ref[0]**o+(0.0666311523262)*x_ref[0]+(0.481913247572)*x_ref[1]**o+(-0.646415708448)*x_ref[1]
-        ref[2,2,2,1]=(0.443901323099)*x_ref[0]**o+(0.349352493291)*x_ref[0]+(-0.158789593075)*x_ref[1]**o+(-0.603521202861)*x_ref[1]
-        ref[2,3,0,0]=(0.716829455981)*x_ref[0]**o+(0.0186823101139)*x_ref[0]+(-0.209053562063)*x_ref[1]**o+(0.847906310296)*x_ref[1]
-        ref[2,3,0,1]=(0.305837642219)*x_ref[0]**o+(0.138301301592)*x_ref[0]+(0.0645236431399)*x_ref[1]**o+(0.909641719567)*x_ref[1]
-        ref[2,3,1,0]=(-0.0177501904561)*x_ref[0]**o+(0.177278703549)*x_ref[0]+(-0.445915965222)*x_ref[1]**o+(-0.894038892768)*x_ref[1]
-        ref[2,3,1,1]=(0.00187039478357)*x_ref[0]**o+(-0.598690809424)*x_ref[0]+(0.299307927538)*x_ref[1]**o+(-0.882235917926)*x_ref[1]
-        ref[2,3,2,0]=(0.730056097248)*x_ref[0]**o+(-0.307654523095)*x_ref[0]+(0.246914489171)*x_ref[1]**o+(-0.60035541725)*x_ref[1]
-        ref[2,3,2,1]=(-0.608344323894)*x_ref[0]**o+(-0.081794637624)*x_ref[0]+(0.099524567015)*x_ref[1]**o+(-0.0654861171366)*x_ref[1]
-        ref[2,4,0,0]=(-0.225654564715)*x_ref[0]**o+(-0.529959598356)*x_ref[0]+(-0.890574962317)*x_ref[1]**o+(0.994618025898)*x_ref[1]
-        ref[2,4,0,1]=(-0.231311865123)*x_ref[0]**o+(0.479613722979)*x_ref[0]+(-0.614977654518)*x_ref[1]**o+(0.804794516306)*x_ref[1]
-        ref[2,4,1,0]=(0.365865384972)*x_ref[0]**o+(-0.889202382492)*x_ref[0]+(-0.300736557219)*x_ref[1]**o+(0.838201123405)*x_ref[1]
-        ref[2,4,1,1]=(-0.809876332779)*x_ref[0]**o+(0.1890391825)*x_ref[0]+(-0.607869144071)*x_ref[1]**o+(0.0448966585205)*x_ref[1]
-        ref[2,4,2,0]=(-0.83080984753)*x_ref[0]**o+(0.305865817658)*x_ref[0]+(-0.359639965091)*x_ref[1]**o+(-0.288164510937)*x_ref[1]
-        ref[2,4,2,1]=(0.616022940224)*x_ref[0]**o+(-0.636356653421)*x_ref[0]+(0.693033289027)*x_ref[1]**o+(-0.780662522342)*x_ref[1]
-        ref[3,0,0,0]=(0.985497135193)*x_ref[0]**o+(-0.441259417159)*x_ref[0]+(0.0550399586931)*x_ref[1]**o+(-0.401551085867)*x_ref[1]
-        ref[3,0,0,1]=(0.66919872999)*x_ref[0]**o+(-0.21372913425)*x_ref[0]+(-0.904643614761)*x_ref[1]**o+(0.254555219564)*x_ref[1]
-        ref[3,0,1,0]=(0.342630495616)*x_ref[0]**o+(-0.688520932208)*x_ref[0]+(-0.795149453533)*x_ref[1]**o+(-0.532353008569)*x_ref[1]
-        ref[3,0,1,1]=(-0.157354065395)*x_ref[0]**o+(-0.574302953359)*x_ref[0]+(-0.0505170558232)*x_ref[1]**o+(-0.916081229428)*x_ref[1]
-        ref[3,0,2,0]=(-0.276092076819)*x_ref[0]**o+(0.755203166655)*x_ref[0]+(0.71481609597)*x_ref[1]**o+(-0.623929271337)*x_ref[1]
-        ref[3,0,2,1]=(0.901066640027)*x_ref[0]**o+(0.615459930577)*x_ref[0]+(-0.65213904597)*x_ref[1]**o+(0.52496253783)*x_ref[1]
-        ref[3,1,0,0]=(-0.90847876416)*x_ref[0]**o+(0.787519284245)*x_ref[0]+(0.260252163627)*x_ref[1]**o+(0.24849374459)*x_ref[1]
-        ref[3,1,0,1]=(-0.519950434741)*x_ref[0]**o+(-0.146327164967)*x_ref[0]+(0.199399508881)*x_ref[1]**o+(0.583497630868)*x_ref[1]
-        ref[3,1,1,0]=(-0.956798390834)*x_ref[0]**o+(0.145681684376)*x_ref[0]+(0.308458821145)*x_ref[1]**o+(-0.759589804755)*x_ref[1]
-        ref[3,1,1,1]=(-0.195569939954)*x_ref[0]**o+(-0.544313649532)*x_ref[0]+(0.387017502787)*x_ref[1]**o+(0.174663629204)*x_ref[1]
-        ref[3,1,2,0]=(-0.3697024469)*x_ref[0]**o+(0.356841678749)*x_ref[0]+(0.922691790563)*x_ref[1]**o+(-0.906755290703)*x_ref[1]
-        ref[3,1,2,1]=(-0.343599294558)*x_ref[0]**o+(-0.213227630549)*x_ref[0]+(-0.822516525353)*x_ref[1]**o+(-0.0350701846979)*x_ref[1]
-        ref[3,2,0,0]=(-0.671120249859)*x_ref[0]**o+(-0.409571854187)*x_ref[0]+(-0.948171208395)*x_ref[1]**o+(0.00128117529499)*x_ref[1]
-        ref[3,2,0,1]=(0.573086687235)*x_ref[0]**o+(0.272624522478)*x_ref[0]+(0.404610375833)*x_ref[1]**o+(0.177742792198)*x_ref[1]
-        ref[3,2,1,0]=(-0.0481585168757)*x_ref[0]**o+(0.108306965224)*x_ref[0]+(0.962229835277)*x_ref[1]**o+(0.457705229155)*x_ref[1]
-        ref[3,2,1,1]=(0.843866939471)*x_ref[0]**o+(-0.209955643474)*x_ref[0]+(0.861076954064)*x_ref[1]**o+(-0.0920496448252)*x_ref[1]
-        ref[3,2,2,0]=(-0.482466555781)*x_ref[0]**o+(0.905888895109)*x_ref[0]+(0.969984046224)*x_ref[1]**o+(0.779155706115)*x_ref[1]
-        ref[3,2,2,1]=(-0.119059605916)*x_ref[0]**o+(-0.413165838565)*x_ref[0]+(-0.458952085266)*x_ref[1]**o+(0.667357851674)*x_ref[1]
-        ref[3,3,0,0]=(-0.139020214893)*x_ref[0]**o+(-0.430716093157)*x_ref[0]+(0.587151976237)*x_ref[1]**o+(0.538779583614)*x_ref[1]
-        ref[3,3,0,1]=(-0.196698073225)*x_ref[0]**o+(0.28357504894)*x_ref[0]+(0.628834405238)*x_ref[1]**o+(0.991210138395)*x_ref[1]
-        ref[3,3,1,0]=(-0.375644375731)*x_ref[0]**o+(0.889016565145)*x_ref[0]+(-0.495700828743)*x_ref[1]**o+(-0.498859003938)*x_ref[1]
-        ref[3,3,1,1]=(0.783773071811)*x_ref[0]**o+(-0.0875026023418)*x_ref[0]+(-0.421213063239)*x_ref[1]**o+(0.750220508147)*x_ref[1]
-        ref[3,3,2,0]=(0.211305046835)*x_ref[0]**o+(-0.828436860631)*x_ref[0]+(0.225275220049)*x_ref[1]**o+(0.264723427485)*x_ref[1]
-        ref[3,3,2,1]=(0.582818095069)*x_ref[0]**o+(0.497614150982)*x_ref[0]+(-0.445084955033)*x_ref[1]**o+(-0.600656630963)*x_ref[1]
-        ref[3,4,0,0]=(-0.886999530258)*x_ref[0]**o+(0.386008089061)*x_ref[0]+(-0.292729716725)*x_ref[1]**o+(-0.159269788338)*x_ref[1]
-        ref[3,4,0,1]=(0.260932511148)*x_ref[0]**o+(-0.533553803234)*x_ref[0]+(0.174946866584)*x_ref[1]**o+(-0.17701796222)*x_ref[1]
-        ref[3,4,1,0]=(0.37985010505)*x_ref[0]**o+(0.934809225579)*x_ref[0]+(-0.76271501884)*x_ref[1]**o+(0.171072659)*x_ref[1]
-        ref[3,4,1,1]=(-0.369797459679)*x_ref[0]**o+(-0.714539720717)*x_ref[0]+(-0.122698805149)*x_ref[1]**o+(0.874232715421)*x_ref[1]
-        ref[3,4,2,0]=(0.912569854856)*x_ref[0]**o+(-0.773508960793)*x_ref[0]+(-0.447748330632)*x_ref[1]**o+(-0.0117517938995)*x_ref[1]
-        ref[3,4,2,1]=(-0.467442835658)*x_ref[0]**o+(-0.792740521854)*x_ref[0]+(-0.33441666815)*x_ref[1]**o+(-0.821650769855)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.171866645738)*x[0]**o+(0.561850203514)*x[0]+(0.416451445795)*x[1]**o+(-0.235582248693)*x[1]+(-0.196259994197)*x[2]**o+(0.940566952036)*x[2]
-        arg[0,0,0,1]=(-0.00971758894531)*x[0]**o+(-0.590140440451)*x[0]+(-0.719992277571)*x[1]**o+(-0.0411344370809)*x[1]+(-0.301518484556)*x[2]**o+(-0.624210342075)*x[2]
-        arg[0,0,1,0]=(0.142493885612)*x[0]**o+(0.473915143223)*x[0]+(0.236217877001)*x[1]**o+(-0.26535451945)*x[1]+(0.197580058644)*x[2]**o+(0.440093349171)*x[2]
-        arg[0,0,1,1]=(0.532930185145)*x[0]**o+(0.206573108032)*x[0]+(-0.903235976279)*x[1]**o+(-0.192856647484)*x[1]+(0.247399954122)*x[2]**o+(-0.396060116726)*x[2]
-        arg[0,0,2,0]=(0.106261668354)*x[0]**o+(-0.169092441923)*x[0]+(0.495324512568)*x[1]**o+(0.612873784609)*x[1]+(-0.181887252227)*x[2]**o+(-0.349265048779)*x[2]
-        arg[0,0,2,1]=(0.0407741271369)*x[0]**o+(-0.286131832952)*x[0]+(0.00801790328545)*x[1]**o+(-0.930580202402)*x[1]+(-0.977595004998)*x[2]**o+(-0.176312831325)*x[2]
-        arg[0,1,0,0]=(0.0660805950534)*x[0]**o+(0.27279659698)*x[0]+(0.383210617595)*x[1]**o+(-0.453071384847)*x[1]+(-0.497520020161)*x[2]**o+(-0.0622858051806)*x[2]
-        arg[0,1,0,1]=(0.343928280381)*x[0]**o+(0.612026453223)*x[0]+(-0.278958038519)*x[1]**o+(-0.287367815759)*x[1]+(-0.975555454735)*x[2]**o+(-0.0381461641238)*x[2]
-        arg[0,1,1,0]=(-0.651824952239)*x[0]**o+(0.504032353063)*x[0]+(-0.505340720597)*x[1]**o+(0.804430789885)*x[1]+(0.626321487603)*x[2]**o+(0.771921294247)*x[2]
-        arg[0,1,1,1]=(-0.677075301947)*x[0]**o+(0.977678280199)*x[0]+(-0.0282503291518)*x[1]**o+(0.383805851778)*x[1]+(-0.942267069472)*x[2]**o+(-0.168439203764)*x[2]
-        arg[0,1,2,0]=(-0.218809773899)*x[0]**o+(-0.923486201344)*x[0]+(-0.771580374186)*x[1]**o+(-0.802318678915)*x[1]+(-0.817711294844)*x[2]**o+(-0.524488450611)*x[2]
-        arg[0,1,2,1]=(-0.258192021864)*x[0]**o+(-0.30201835948)*x[0]+(0.908539532951)*x[1]**o+(0.53218981056)*x[1]+(0.0337395431484)*x[2]**o+(0.358676387738)*x[2]
-        arg[0,2,0,0]=(0.181349802806)*x[0]**o+(-0.67447696451)*x[0]+(-0.905389539679)*x[1]**o+(-0.0192162208351)*x[1]+(0.475994769738)*x[2]**o+(0.258880626391)*x[2]
-        arg[0,2,0,1]=(0.683461009428)*x[0]**o+(0.101633874876)*x[0]+(-0.666120146454)*x[1]**o+(-0.79937847801)*x[1]+(-0.0519440794346)*x[2]**o+(0.412543335301)*x[2]
-        arg[0,2,1,0]=(-0.705756906195)*x[0]**o+(-0.914133519297)*x[0]+(0.203329174425)*x[1]**o+(-0.125897560162)*x[1]+(-0.845555978817)*x[2]**o+(-0.376117448037)*x[2]
-        arg[0,2,1,1]=(0.129675218633)*x[0]**o+(0.230278463142)*x[0]+(-0.0465924540599)*x[1]**o+(0.618850924426)*x[1]+(-0.981020601489)*x[2]**o+(-0.446786649897)*x[2]
-        arg[0,2,2,0]=(0.709293140521)*x[0]**o+(-0.117595235921)*x[0]+(0.00527289231769)*x[1]**o+(0.407867521466)*x[1]+(-0.0513211295402)*x[2]**o+(-0.775396743388)*x[2]
-        arg[0,2,2,1]=(0.456146533185)*x[0]**o+(0.357343068604)*x[0]+(-0.596648639307)*x[1]**o+(0.0400180634504)*x[1]+(-0.773508416513)*x[2]**o+(0.873275482135)*x[2]
-        arg[0,3,0,0]=(-0.553923806627)*x[0]**o+(0.416008424454)*x[0]+(-0.18857445771)*x[1]**o+(0.668616517137)*x[1]+(0.850445273446)*x[2]**o+(0.0324670478739)*x[2]
-        arg[0,3,0,1]=(-0.556129092409)*x[0]**o+(-0.207129568151)*x[0]+(-0.616200225149)*x[1]**o+(0.173694871558)*x[1]+(-0.389943310499)*x[2]**o+(-0.0171456312507)*x[2]
-        arg[0,3,1,0]=(0.029375229156)*x[0]**o+(-0.710817311305)*x[0]+(0.487826213322)*x[1]**o+(-0.353110144226)*x[1]+(-0.326240277953)*x[2]**o+(0.435853126161)*x[2]
-        arg[0,3,1,1]=(-0.973283235545)*x[0]**o+(0.119293099332)*x[0]+(-0.987231590871)*x[1]**o+(-0.778410371876)*x[1]+(-0.123668803712)*x[2]**o+(0.836409669329)*x[2]
-        arg[0,3,2,0]=(-0.953711717094)*x[0]**o+(0.0211462821501)*x[0]+(0.989232030291)*x[1]**o+(0.684525652819)*x[1]+(-0.934499312995)*x[2]**o+(0.0759185573729)*x[2]
-        arg[0,3,2,1]=(0.962555034668)*x[0]**o+(-0.344084097742)*x[0]+(0.627919365161)*x[1]**o+(-0.0520511084603)*x[1]+(0.548149991599)*x[2]**o+(0.885011282903)*x[2]
-        arg[0,4,0,0]=(-0.604624034071)*x[0]**o+(0.194224357892)*x[0]+(-0.171628912052)*x[1]**o+(0.0361170699761)*x[1]+(0.68259161986)*x[2]**o+(-0.47807189026)*x[2]
-        arg[0,4,0,1]=(-0.441358360042)*x[0]**o+(0.854885170771)*x[0]+(0.739245976992)*x[1]**o+(-0.712495821809)*x[1]+(0.786863605702)*x[2]**o+(0.244289741577)*x[2]
-        arg[0,4,1,0]=(-0.93437768143)*x[0]**o+(0.909235101604)*x[0]+(0.398343776489)*x[1]**o+(-0.8015457882)*x[1]+(-0.045056420534)*x[2]**o+(-0.0696087139589)*x[2]
-        arg[0,4,1,1]=(0.997282980634)*x[0]**o+(-0.523146965095)*x[0]+(0.888300277406)*x[1]**o+(0.0692584552317)*x[1]+(-0.361183524085)*x[2]**o+(0.298003855572)*x[2]
-        arg[0,4,2,0]=(0.510704730088)*x[0]**o+(-0.288621287507)*x[0]+(0.694375966407)*x[1]**o+(0.438558764462)*x[1]+(0.999793245458)*x[2]**o+(0.146242565823)*x[2]
-        arg[0,4,2,1]=(0.461717367889)*x[0]**o+(0.585419576536)*x[0]+(0.172514336678)*x[1]**o+(-0.372717466388)*x[1]+(0.354162503692)*x[2]**o+(0.465497372897)*x[2]
-        arg[1,0,0,0]=(0.536758620313)*x[0]**o+(0.428277991055)*x[0]+(-0.60617935999)*x[1]**o+(-0.889897682367)*x[1]+(-0.326378737219)*x[2]**o+(0.735260248159)*x[2]
-        arg[1,0,0,1]=(-0.629157417304)*x[0]**o+(-0.00171372949641)*x[0]+(0.110550936359)*x[1]**o+(-0.418314227619)*x[1]+(0.968147035552)*x[2]**o+(-0.58304546387)*x[2]
-        arg[1,0,1,0]=(0.528767817229)*x[0]**o+(0.111986940482)*x[0]+(0.853287140505)*x[1]**o+(0.551761795603)*x[1]+(-0.848026685332)*x[2]**o+(0.799725876993)*x[2]
-        arg[1,0,1,1]=(0.154974399407)*x[0]**o+(-0.662212037776)*x[0]+(0.628908352518)*x[1]**o+(-0.0175576929699)*x[1]+(-0.0501253203152)*x[2]**o+(0.147651837545)*x[2]
-        arg[1,0,2,0]=(0.53576644491)*x[0]**o+(-0.935865707952)*x[0]+(-0.256921357737)*x[1]**o+(0.452311436169)*x[1]+(-0.449646854354)*x[2]**o+(0.0137632023964)*x[2]
-        arg[1,0,2,1]=(-0.103323182353)*x[0]**o+(-0.0636296047221)*x[0]+(-0.681883331812)*x[1]**o+(-0.284589673307)*x[1]+(-0.525524911635)*x[2]**o+(0.525757772842)*x[2]
-        arg[1,1,0,0]=(0.106186299307)*x[0]**o+(0.193833690397)*x[0]+(0.755686652252)*x[1]**o+(-0.954503081175)*x[1]+(-0.946058471992)*x[2]**o+(0.258850283735)*x[2]
-        arg[1,1,0,1]=(-0.352425152661)*x[0]**o+(-0.955207432287)*x[0]+(0.946989898911)*x[1]**o+(0.426365715943)*x[1]+(-0.225898340088)*x[2]**o+(-0.108613105442)*x[2]
-        arg[1,1,1,0]=(0.505488482593)*x[0]**o+(-0.0193114896733)*x[0]+(-0.809537000564)*x[1]**o+(0.39999431472)*x[1]+(-0.968315699948)*x[2]**o+(0.672744543525)*x[2]
-        arg[1,1,1,1]=(0.0967454491182)*x[0]**o+(-0.608840080579)*x[0]+(0.287989672484)*x[1]**o+(-0.989435924681)*x[1]+(0.46833865882)*x[2]**o+(0.0211042567481)*x[2]
-        arg[1,1,2,0]=(-0.461777513493)*x[0]**o+(-0.539619783995)*x[0]+(-0.719051252797)*x[1]**o+(-0.980491094424)*x[1]+(0.526872369892)*x[2]**o+(0.534649090672)*x[2]
-        arg[1,1,2,1]=(-0.498068667635)*x[0]**o+(-0.977138256259)*x[0]+(0.388405877405)*x[1]**o+(-0.652220953523)*x[1]+(0.214733833456)*x[2]**o+(0.925064130776)*x[2]
-        arg[1,2,0,0]=(-0.728915088302)*x[0]**o+(-0.867653377354)*x[0]+(-0.0240751909884)*x[1]**o+(-0.617932013511)*x[1]+(0.342417783703)*x[2]**o+(0.269029568448)*x[2]
-        arg[1,2,0,1]=(0.659030580895)*x[0]**o+(0.460057036148)*x[0]+(0.0556749040721)*x[1]**o+(-0.0943860780082)*x[1]+(0.940068201493)*x[2]**o+(-0.156531042318)*x[2]
-        arg[1,2,1,0]=(-0.0373627034239)*x[0]**o+(-0.631862915794)*x[0]+(0.384889489295)*x[1]**o+(-0.85645836005)*x[1]+(-0.448074134473)*x[2]**o+(-0.103825620602)*x[2]
-        arg[1,2,1,1]=(-0.19142928199)*x[0]**o+(-0.993719455322)*x[0]+(0.204439624689)*x[1]**o+(-0.0616134769914)*x[1]+(0.581621603387)*x[2]**o+(-0.554871585864)*x[2]
-        arg[1,2,2,0]=(0.684658549351)*x[0]**o+(-0.0520805658251)*x[0]+(-0.549405651115)*x[1]**o+(-0.0890223507953)*x[1]+(0.538847108562)*x[2]**o+(0.555575374976)*x[2]
-        arg[1,2,2,1]=(-0.197138807828)*x[0]**o+(0.691528695453)*x[0]+(0.337770131451)*x[1]**o+(-0.0662330700506)*x[1]+(-0.556170962811)*x[2]**o+(-0.415321654558)*x[2]
-        arg[1,3,0,0]=(-0.255542847866)*x[0]**o+(-0.731103056475)*x[0]+(-0.764119472108)*x[1]**o+(0.264775911336)*x[1]+(0.976604892324)*x[2]**o+(-0.929820558374)*x[2]
-        arg[1,3,0,1]=(-0.506143192998)*x[0]**o+(-0.139848041055)*x[0]+(-0.074839899541)*x[1]**o+(-0.35100597507)*x[1]+(-0.127574366194)*x[2]**o+(-0.0084655916902)*x[2]
-        arg[1,3,1,0]=(0.099997170805)*x[0]**o+(-0.149089017918)*x[0]+(0.419790611192)*x[1]**o+(-0.148698964676)*x[1]+(0.490423198386)*x[2]**o+(-0.210076971679)*x[2]
-        arg[1,3,1,1]=(-0.139371350292)*x[0]**o+(-0.320648977772)*x[0]+(0.836558622998)*x[1]**o+(0.394491153689)*x[1]+(0.0857621395676)*x[2]**o+(-0.709138669156)*x[2]
-        arg[1,3,2,0]=(0.743901534332)*x[0]**o+(-0.249486095838)*x[0]+(0.281087339807)*x[1]**o+(0.617669579771)*x[1]+(-0.383135240681)*x[2]**o+(-0.647267353645)*x[2]
-        arg[1,3,2,1]=(-0.465587857279)*x[0]**o+(0.578094609537)*x[0]+(0.400668301655)*x[1]**o+(-0.999984469723)*x[1]+(-0.460584024789)*x[2]**o+(0.943466859654)*x[2]
-        arg[1,4,0,0]=(-0.246915327144)*x[0]**o+(-0.203163427715)*x[0]+(0.138589009969)*x[1]**o+(-0.705709971036)*x[1]+(0.273085758612)*x[2]**o+(0.901084781824)*x[2]
-        arg[1,4,0,1]=(-0.919682459969)*x[0]**o+(-0.476395399467)*x[0]+(0.00638460254264)*x[1]**o+(-0.474710529098)*x[1]+(-0.935681998683)*x[2]**o+(0.461344674976)*x[2]
-        arg[1,4,1,0]=(0.8225038116)*x[0]**o+(0.0855444334027)*x[0]+(-0.685983943046)*x[1]**o+(-0.46700703117)*x[1]+(0.760260028729)*x[2]**o+(-0.190951535155)*x[2]
-        arg[1,4,1,1]=(0.512940503439)*x[0]**o+(0.998803686398)*x[0]+(0.200914807938)*x[1]**o+(0.793533216819)*x[1]+(0.980475771536)*x[2]**o+(-0.00307515759413)*x[2]
-        arg[1,4,2,0]=(0.278761841603)*x[0]**o+(-0.368232992504)*x[0]+(0.939116142167)*x[1]**o+(0.13661977072)*x[1]+(-0.490378973691)*x[2]**o+(-0.409117913136)*x[2]
-        arg[1,4,2,1]=(-0.456090186141)*x[0]**o+(-0.881413614887)*x[0]+(-0.951099957833)*x[1]**o+(0.859690794224)*x[1]+(0.0723671154601)*x[2]**o+(0.468823687196)*x[2]
-        arg[2,0,0,0]=(-0.415483671814)*x[0]**o+(0.415160471625)*x[0]+(-0.730798143253)*x[1]**o+(-0.90883538519)*x[1]+(-0.241870631235)*x[2]**o+(-0.549577536182)*x[2]
-        arg[2,0,0,1]=(0.86985374761)*x[0]**o+(0.378073808491)*x[0]+(0.0923146623212)*x[1]**o+(-0.912604209727)*x[1]+(0.529162434789)*x[2]**o+(-0.135836425669)*x[2]
-        arg[2,0,1,0]=(0.702609345242)*x[0]**o+(-0.63859466548)*x[0]+(-0.2668268067)*x[1]**o+(0.107377268995)*x[1]+(-0.575458650368)*x[2]**o+(-0.359972696269)*x[2]
-        arg[2,0,1,1]=(-0.169295117134)*x[0]**o+(-0.0780580709275)*x[0]+(0.9803920116)*x[1]**o+(0.794090800797)*x[1]+(0.71271688197)*x[2]**o+(0.265355025589)*x[2]
-        arg[2,0,2,0]=(0.700475435131)*x[0]**o+(0.317025249264)*x[0]+(0.885140001575)*x[1]**o+(-0.733992012528)*x[1]+(-0.937990577058)*x[2]**o+(-0.566197708973)*x[2]
-        arg[2,0,2,1]=(0.369801749993)*x[0]**o+(0.292267254334)*x[0]+(0.24962184892)*x[1]**o+(-0.912670113872)*x[1]+(0.590235505871)*x[2]**o+(0.199279333126)*x[2]
-        arg[2,1,0,0]=(-0.165657934182)*x[0]**o+(0.837030192613)*x[0]+(-0.615301249273)*x[1]**o+(-0.947633937776)*x[1]+(0.916677465451)*x[2]**o+(0.633727682324)*x[2]
-        arg[2,1,0,1]=(0.260787013495)*x[0]**o+(0.367146934614)*x[0]+(0.0271903085878)*x[1]**o+(0.853398837558)*x[1]+(-0.381379969861)*x[2]**o+(0.140001581749)*x[2]
-        arg[2,1,1,0]=(0.121628758983)*x[0]**o+(-0.212350487769)*x[0]+(-0.198031244861)*x[1]**o+(-0.695620829484)*x[1]+(-0.0533521134282)*x[2]**o+(0.956103910898)*x[2]
-        arg[2,1,1,1]=(-0.321102504727)*x[0]**o+(-0.920842546991)*x[0]+(0.082643684589)*x[1]**o+(-0.0960346141926)*x[1]+(0.475269198456)*x[2]**o+(-0.184473007427)*x[2]
-        arg[2,1,2,0]=(0.412066628472)*x[0]**o+(-0.667420990332)*x[0]+(0.754028295628)*x[1]**o+(0.967928426879)*x[1]+(-0.129320768473)*x[2]**o+(-0.496085464716)*x[2]
-        arg[2,1,2,1]=(-0.379495871082)*x[0]**o+(0.768674450671)*x[0]+(0.786595353344)*x[1]**o+(-0.191866280074)*x[1]+(0.314572026852)*x[2]**o+(-0.0245751436484)*x[2]
-        arg[2,2,0,0]=(-0.291171443165)*x[0]**o+(0.857660522727)*x[0]+(-0.0611031323308)*x[1]**o+(0.365691706254)*x[1]+(0.906199720505)*x[2]**o+(0.621747944156)*x[2]
-        arg[2,2,0,1]=(-0.110402534173)*x[0]**o+(-0.465943589112)*x[0]+(0.896364485404)*x[1]**o+(0.16234913823)*x[1]+(0.443564946892)*x[2]**o+(0.259358795418)*x[2]
-        arg[2,2,1,0]=(-0.480613805459)*x[0]**o+(-0.837751646963)*x[0]+(0.803669049568)*x[1]**o+(-0.859501917481)*x[1]+(0.633523536226)*x[2]**o+(0.351742190573)*x[2]
-        arg[2,2,1,1]=(0.133665578883)*x[0]**o+(-0.283052337652)*x[0]+(-0.382761111917)*x[1]**o+(-0.197039443436)*x[1]+(0.081520912443)*x[2]**o+(-0.167181778234)*x[2]
-        arg[2,2,2,0]=(0.207787204976)*x[0]**o+(0.245207436631)*x[0]+(0.340092449827)*x[1]**o+(0.541457158709)*x[1]+(-0.606955763027)*x[2]**o+(-0.197506280875)*x[2]
-        arg[2,2,2,1]=(0.399727427867)*x[0]**o+(-0.0452717156729)*x[0]+(0.85643441)*x[1]**o+(-0.938966108133)*x[1]+(0.832098573693)*x[2]**o+(-0.375366657117)*x[2]
-        arg[2,3,0,0]=(-0.661411409657)*x[0]**o+(0.702058724486)*x[0]+(0.851820224497)*x[1]**o+(-0.984572528809)*x[1]+(0.700617112775)*x[2]**o+(0.990437560702)*x[2]
-        arg[2,3,0,1]=(-0.937637737824)*x[0]**o+(0.970774222765)*x[0]+(0.0263154279607)*x[1]**o+(-0.453145473796)*x[1]+(-0.740101764089)*x[2]**o+(0.248604522836)*x[2]
-        arg[2,3,1,0]=(0.624217308865)*x[0]**o+(0.682749411369)*x[0]+(0.394444314015)*x[1]**o+(0.288021257523)*x[1]+(-0.943712429774)*x[2]**o+(-0.299272610192)*x[2]
-        arg[2,3,1,1]=(0.00512058360895)*x[0]**o+(-0.0263977566592)*x[0]+(-0.769491595627)*x[1]**o+(-0.403091037334)*x[1]+(-0.940178247778)*x[2]**o+(-0.664590180141)*x[2]
-        arg[2,3,2,0]=(-0.606361369179)*x[0]**o+(0.0252279171688)*x[0]+(0.0125424811264)*x[1]**o+(-0.249080159522)*x[1]+(0.969599361427)*x[2]**o+(0.369428527325)*x[2]
-        arg[2,3,2,1]=(-0.899501409225)*x[0]**o+(0.834437734927)*x[0]+(-0.992484449733)*x[1]**o+(0.00567086116985)*x[1]+(0.112432151044)*x[2]**o+(0.725013775434)*x[2]
-        arg[2,4,0,0]=(-0.864861209468)*x[0]**o+(0.475518351325)*x[0]+(-0.575172287508)*x[1]**o+(-0.695754751991)*x[1]+(0.935933655733)*x[2]**o+(-0.156489388279)*x[2]
-        arg[2,4,0,1]=(-0.072905918035)*x[0]**o+(0.912617659416)*x[0]+(0.76767638187)*x[1]**o+(0.517738398356)*x[1]+(-0.116771137305)*x[2]**o+(-0.887027853796)*x[2]
-        arg[2,4,1,0]=(-0.169351806151)*x[0]**o+(-0.667994142736)*x[0]+(-0.742400183746)*x[1]**o+(-0.345483488309)*x[1]+(0.534459208989)*x[2]**o+(-0.314632556106)*x[2]
-        arg[2,4,1,1]=(0.571889164138)*x[0]**o+(-0.603799705213)*x[0]+(0.574246013631)*x[1]**o+(-0.156121300765)*x[1]+(-0.300131083217)*x[2]**o+(0.781527389701)*x[2]
-        arg[2,4,2,0]=(-0.433340783774)*x[0]**o+(-0.337577532056)*x[0]+(-0.991017325155)*x[1]**o+(0.169866142612)*x[1]+(0.531407605197)*x[2]**o+(0.91525228665)*x[2]
-        arg[2,4,2,1]=(0.837883720242)*x[0]**o+(-0.647682324772)*x[0]+(0.125057981769)*x[1]**o+(-0.734369688409)*x[1]+(0.5864622868)*x[2]**o+(-0.378030111621)*x[2]
-        arg[3,0,0,0]=(-0.497406654549)*x[0]**o+(0.773396244829)*x[0]+(0.587080735986)*x[1]**o+(0.80571073543)*x[1]+(-0.621583700283)*x[2]**o+(0.214586226671)*x[2]
-        arg[3,0,0,1]=(0.602557120764)*x[0]**o+(0.362884272628)*x[0]+(-0.469709604155)*x[1]**o+(0.570294839284)*x[1]+(-0.977082842755)*x[2]**o+(-0.871580274035)*x[2]
-        arg[3,0,1,0]=(0.801845637209)*x[0]**o+(0.65646927893)*x[0]+(0.181490001743)*x[1]**o+(-0.579155840484)*x[1]+(-0.690604456924)*x[2]**o+(0.999798826875)*x[2]
-        arg[3,0,1,1]=(-0.0835741146147)*x[0]**o+(0.251697832709)*x[0]+(0.915417127133)*x[1]**o+(0.859412289228)*x[1]+(0.529025246336)*x[2]**o+(0.0290945910046)*x[2]
-        arg[3,0,2,0]=(0.43632860403)*x[0]**o+(-0.71378809102)*x[0]+(0.996769149715)*x[1]**o+(-0.694095684973)*x[1]+(0.24606095312)*x[2]**o+(0.0974139948716)*x[2]
-        arg[3,0,2,1]=(-0.615800860737)*x[0]**o+(-0.0194774462371)*x[0]+(-0.323266780598)*x[1]**o+(0.70039319915)*x[1]+(0.0990606501268)*x[2]**o+(-0.265400117193)*x[2]
-        arg[3,1,0,0]=(0.637788917841)*x[0]**o+(-0.898134292781)*x[0]+(0.397058421405)*x[1]**o+(0.424875003774)*x[1]+(0.493154896437)*x[2]**o+(0.426966521522)*x[2]
-        arg[3,1,0,1]=(0.307016370261)*x[0]**o+(0.583037237501)*x[0]+(-0.715510433757)*x[1]**o+(-0.778084356162)*x[1]+(0.624410868665)*x[2]**o+(0.534413229876)*x[2]
-        arg[3,1,1,0]=(0.53494197621)*x[0]**o+(0.0347747301727)*x[0]+(0.387683566308)*x[1]**o+(0.79111981305)*x[1]+(0.499346741486)*x[2]**o+(-0.89736311061)*x[2]
-        arg[3,1,1,1]=(-0.414505914492)*x[0]**o+(0.738343334487)*x[0]+(0.0839982715753)*x[1]**o+(0.306059781071)*x[1]+(0.205292188103)*x[2]**o+(0.478479664712)*x[2]
-        arg[3,1,2,0]=(0.649444916094)*x[0]**o+(-0.616363283285)*x[0]+(-0.890710011556)*x[1]**o+(-0.55638070962)*x[1]+(0.63397005463)*x[2]**o+(-0.296632593945)*x[2]
-        arg[3,1,2,1]=(0.867500426375)*x[0]**o+(0.087056846585)*x[0]+(-0.347167872287)*x[1]**o+(-0.593410409382)*x[1]+(-0.0853161439992)*x[2]**o+(0.32855927156)*x[2]
-        arg[3,2,0,0]=(0.176880322402)*x[0]**o+(-0.342939990014)*x[0]+(0.927975205318)*x[1]**o+(0.395166493409)*x[1]+(-0.114428155908)*x[2]**o+(0.518356015938)*x[2]
-        arg[3,2,0,1]=(-0.560834784775)*x[0]**o+(0.989745819909)*x[0]+(-0.201732235802)*x[1]**o+(-0.953838293418)*x[1]+(-0.797223863765)*x[2]**o+(-0.44533752286)*x[2]
-        arg[3,2,1,0]=(-0.83129861256)*x[0]**o+(-0.768067351258)*x[0]+(-0.564704574946)*x[1]**o+(0.419961478425)*x[1]+(0.561243126484)*x[2]**o+(0.536547545961)*x[2]
-        arg[3,2,1,1]=(-0.245876224002)*x[0]**o+(-0.0399839529678)*x[0]+(-0.728071866725)*x[1]**o+(0.68478402008)*x[1]+(0.907895423543)*x[2]**o+(0.454698589619)*x[2]
-        arg[3,2,2,0]=(-0.412012705012)*x[0]**o+(-0.575272496028)*x[0]+(0.877861906104)*x[1]**o+(-0.586319475679)*x[1]+(0.668997061563)*x[2]**o+(-0.418342969428)*x[2]
-        arg[3,2,2,1]=(0.270232215934)*x[0]**o+(0.236642564222)*x[0]+(-0.0693779443521)*x[1]**o+(0.77329883812)*x[1]+(-0.743424502879)*x[2]**o+(0.296073856497)*x[2]
-        arg[3,3,0,0]=(-0.0659865092333)*x[0]**o+(-0.645286369943)*x[0]+(0.746214220465)*x[1]**o+(-0.549592848453)*x[1]+(-0.194552740752)*x[2]**o+(0.136734604935)*x[2]
-        arg[3,3,0,1]=(0.0407640382533)*x[0]**o+(-0.720002890774)*x[0]+(-0.902500650998)*x[1]**o+(-0.0763091975748)*x[1]+(-0.70279308164)*x[2]**o+(-0.412384977965)*x[2]
-        arg[3,3,1,0]=(0.460226151062)*x[0]**o+(-0.359911871464)*x[0]+(0.654909639152)*x[1]**o+(-0.574154331236)*x[1]+(-0.226246538275)*x[2]**o+(-0.168145308987)*x[2]
-        arg[3,3,1,1]=(-0.966169813904)*x[0]**o+(-0.784593122487)*x[0]+(-0.857455334787)*x[1]**o+(-0.116963343366)*x[1]+(0.231055675695)*x[2]**o+(-0.953091037377)*x[2]
-        arg[3,3,2,0]=(-0.796170783237)*x[0]**o+(-0.605030579381)*x[0]+(0.388310055252)*x[1]**o+(-0.504349251868)*x[1]+(0.83840677955)*x[2]**o+(-0.586099851479)*x[2]
-        arg[3,3,2,1]=(0.195092011781)*x[0]**o+(-0.358423372419)*x[0]+(-0.643669425281)*x[1]**o+(0.721564003575)*x[1]+(-0.588431193874)*x[2]**o+(-0.378625221371)*x[2]
-        arg[3,4,0,0]=(0.585756187041)*x[0]**o+(-0.753400165107)*x[0]+(0.790439809615)*x[1]**o+(0.0473109698221)*x[1]+(0.951768026456)*x[2]**o+(0.423960993524)*x[2]
-        arg[3,4,0,1]=(0.32857275647)*x[0]**o+(0.566198295813)*x[0]+(-0.372998380277)*x[1]**o+(0.671551057967)*x[1]+(-0.990512903698)*x[2]**o+(-0.598820986842)*x[2]
-        arg[3,4,1,0]=(0.512362923169)*x[0]**o+(0.161976775973)*x[0]+(-0.823370116651)*x[1]**o+(-0.539694552746)*x[1]+(-0.252135888305)*x[2]**o+(-0.323536133539)*x[2]
-        arg[3,4,1,1]=(0.342762199745)*x[0]**o+(0.569702637139)*x[0]+(0.514189130968)*x[1]**o+(-0.219203654565)*x[1]+(-0.839606678057)*x[2]**o+(0.374386070142)*x[2]
-        arg[3,4,2,0]=(0.0568713695577)*x[0]**o+(-0.494349350234)*x[0]+(0.829657653367)*x[1]**o+(0.541489358189)*x[1]+(-0.9469529858)*x[2]**o+(0.230257255487)*x[2]
-        arg[3,4,2,1]=(0.874227414064)*x[0]**o+(0.76572262681)*x[0]+(0.305716770957)*x[1]**o+(0.225904980409)*x[1]+(-0.10063057638)*x[2]**o+(-0.87920628616)*x[2]
-        ref[0,0,0,0]=(-0.171866645738)*x_ref[0]**o+(0.561850203514)*x_ref[0]+(0.416451445795)*x_ref[1]**o+(-0.235582248693)*x_ref[1]+(-0.196259994197)*x_ref[2]**o+(0.940566952036)*x_ref[2]
-        ref[0,0,0,1]=(-0.00971758894531)*x_ref[0]**o+(-0.590140440451)*x_ref[0]+(-0.719992277571)*x_ref[1]**o+(-0.0411344370809)*x_ref[1]+(-0.301518484556)*x_ref[2]**o+(-0.624210342075)*x_ref[2]
-        ref[0,0,1,0]=(0.142493885612)*x_ref[0]**o+(0.473915143223)*x_ref[0]+(0.236217877001)*x_ref[1]**o+(-0.26535451945)*x_ref[1]+(0.197580058644)*x_ref[2]**o+(0.440093349171)*x_ref[2]
-        ref[0,0,1,1]=(0.532930185145)*x_ref[0]**o+(0.206573108032)*x_ref[0]+(-0.903235976279)*x_ref[1]**o+(-0.192856647484)*x_ref[1]+(0.247399954122)*x_ref[2]**o+(-0.396060116726)*x_ref[2]
-        ref[0,0,2,0]=(0.106261668354)*x_ref[0]**o+(-0.169092441923)*x_ref[0]+(0.495324512568)*x_ref[1]**o+(0.612873784609)*x_ref[1]+(-0.181887252227)*x_ref[2]**o+(-0.349265048779)*x_ref[2]
-        ref[0,0,2,1]=(0.0407741271369)*x_ref[0]**o+(-0.286131832952)*x_ref[0]+(0.00801790328545)*x_ref[1]**o+(-0.930580202402)*x_ref[1]+(-0.977595004998)*x_ref[2]**o+(-0.176312831325)*x_ref[2]
-        ref[0,1,0,0]=(0.0660805950534)*x_ref[0]**o+(0.27279659698)*x_ref[0]+(0.383210617595)*x_ref[1]**o+(-0.453071384847)*x_ref[1]+(-0.497520020161)*x_ref[2]**o+(-0.0622858051806)*x_ref[2]
-        ref[0,1,0,1]=(0.343928280381)*x_ref[0]**o+(0.612026453223)*x_ref[0]+(-0.278958038519)*x_ref[1]**o+(-0.287367815759)*x_ref[1]+(-0.975555454735)*x_ref[2]**o+(-0.0381461641238)*x_ref[2]
-        ref[0,1,1,0]=(-0.651824952239)*x_ref[0]**o+(0.504032353063)*x_ref[0]+(-0.505340720597)*x_ref[1]**o+(0.804430789885)*x_ref[1]+(0.626321487603)*x_ref[2]**o+(0.771921294247)*x_ref[2]
-        ref[0,1,1,1]=(-0.677075301947)*x_ref[0]**o+(0.977678280199)*x_ref[0]+(-0.0282503291518)*x_ref[1]**o+(0.383805851778)*x_ref[1]+(-0.942267069472)*x_ref[2]**o+(-0.168439203764)*x_ref[2]
-        ref[0,1,2,0]=(-0.218809773899)*x_ref[0]**o+(-0.923486201344)*x_ref[0]+(-0.771580374186)*x_ref[1]**o+(-0.802318678915)*x_ref[1]+(-0.817711294844)*x_ref[2]**o+(-0.524488450611)*x_ref[2]
-        ref[0,1,2,1]=(-0.258192021864)*x_ref[0]**o+(-0.30201835948)*x_ref[0]+(0.908539532951)*x_ref[1]**o+(0.53218981056)*x_ref[1]+(0.0337395431484)*x_ref[2]**o+(0.358676387738)*x_ref[2]
-        ref[0,2,0,0]=(0.181349802806)*x_ref[0]**o+(-0.67447696451)*x_ref[0]+(-0.905389539679)*x_ref[1]**o+(-0.0192162208351)*x_ref[1]+(0.475994769738)*x_ref[2]**o+(0.258880626391)*x_ref[2]
-        ref[0,2,0,1]=(0.683461009428)*x_ref[0]**o+(0.101633874876)*x_ref[0]+(-0.666120146454)*x_ref[1]**o+(-0.79937847801)*x_ref[1]+(-0.0519440794346)*x_ref[2]**o+(0.412543335301)*x_ref[2]
-        ref[0,2,1,0]=(-0.705756906195)*x_ref[0]**o+(-0.914133519297)*x_ref[0]+(0.203329174425)*x_ref[1]**o+(-0.125897560162)*x_ref[1]+(-0.845555978817)*x_ref[2]**o+(-0.376117448037)*x_ref[2]
-        ref[0,2,1,1]=(0.129675218633)*x_ref[0]**o+(0.230278463142)*x_ref[0]+(-0.0465924540599)*x_ref[1]**o+(0.618850924426)*x_ref[1]+(-0.981020601489)*x_ref[2]**o+(-0.446786649897)*x_ref[2]
-        ref[0,2,2,0]=(0.709293140521)*x_ref[0]**o+(-0.117595235921)*x_ref[0]+(0.00527289231769)*x_ref[1]**o+(0.407867521466)*x_ref[1]+(-0.0513211295402)*x_ref[2]**o+(-0.775396743388)*x_ref[2]
-        ref[0,2,2,1]=(0.456146533185)*x_ref[0]**o+(0.357343068604)*x_ref[0]+(-0.596648639307)*x_ref[1]**o+(0.0400180634504)*x_ref[1]+(-0.773508416513)*x_ref[2]**o+(0.873275482135)*x_ref[2]
-        ref[0,3,0,0]=(-0.553923806627)*x_ref[0]**o+(0.416008424454)*x_ref[0]+(-0.18857445771)*x_ref[1]**o+(0.668616517137)*x_ref[1]+(0.850445273446)*x_ref[2]**o+(0.0324670478739)*x_ref[2]
-        ref[0,3,0,1]=(-0.556129092409)*x_ref[0]**o+(-0.207129568151)*x_ref[0]+(-0.616200225149)*x_ref[1]**o+(0.173694871558)*x_ref[1]+(-0.389943310499)*x_ref[2]**o+(-0.0171456312507)*x_ref[2]
-        ref[0,3,1,0]=(0.029375229156)*x_ref[0]**o+(-0.710817311305)*x_ref[0]+(0.487826213322)*x_ref[1]**o+(-0.353110144226)*x_ref[1]+(-0.326240277953)*x_ref[2]**o+(0.435853126161)*x_ref[2]
-        ref[0,3,1,1]=(-0.973283235545)*x_ref[0]**o+(0.119293099332)*x_ref[0]+(-0.987231590871)*x_ref[1]**o+(-0.778410371876)*x_ref[1]+(-0.123668803712)*x_ref[2]**o+(0.836409669329)*x_ref[2]
-        ref[0,3,2,0]=(-0.953711717094)*x_ref[0]**o+(0.0211462821501)*x_ref[0]+(0.989232030291)*x_ref[1]**o+(0.684525652819)*x_ref[1]+(-0.934499312995)*x_ref[2]**o+(0.0759185573729)*x_ref[2]
-        ref[0,3,2,1]=(0.962555034668)*x_ref[0]**o+(-0.344084097742)*x_ref[0]+(0.627919365161)*x_ref[1]**o+(-0.0520511084603)*x_ref[1]+(0.548149991599)*x_ref[2]**o+(0.885011282903)*x_ref[2]
-        ref[0,4,0,0]=(-0.604624034071)*x_ref[0]**o+(0.194224357892)*x_ref[0]+(-0.171628912052)*x_ref[1]**o+(0.0361170699761)*x_ref[1]+(0.68259161986)*x_ref[2]**o+(-0.47807189026)*x_ref[2]
-        ref[0,4,0,1]=(-0.441358360042)*x_ref[0]**o+(0.854885170771)*x_ref[0]+(0.739245976992)*x_ref[1]**o+(-0.712495821809)*x_ref[1]+(0.786863605702)*x_ref[2]**o+(0.244289741577)*x_ref[2]
-        ref[0,4,1,0]=(-0.93437768143)*x_ref[0]**o+(0.909235101604)*x_ref[0]+(0.398343776489)*x_ref[1]**o+(-0.8015457882)*x_ref[1]+(-0.045056420534)*x_ref[2]**o+(-0.0696087139589)*x_ref[2]
-        ref[0,4,1,1]=(0.997282980634)*x_ref[0]**o+(-0.523146965095)*x_ref[0]+(0.888300277406)*x_ref[1]**o+(0.0692584552317)*x_ref[1]+(-0.361183524085)*x_ref[2]**o+(0.298003855572)*x_ref[2]
-        ref[0,4,2,0]=(0.510704730088)*x_ref[0]**o+(-0.288621287507)*x_ref[0]+(0.694375966407)*x_ref[1]**o+(0.438558764462)*x_ref[1]+(0.999793245458)*x_ref[2]**o+(0.146242565823)*x_ref[2]
-        ref[0,4,2,1]=(0.461717367889)*x_ref[0]**o+(0.585419576536)*x_ref[0]+(0.172514336678)*x_ref[1]**o+(-0.372717466388)*x_ref[1]+(0.354162503692)*x_ref[2]**o+(0.465497372897)*x_ref[2]
-        ref[1,0,0,0]=(0.536758620313)*x_ref[0]**o+(0.428277991055)*x_ref[0]+(-0.60617935999)*x_ref[1]**o+(-0.889897682367)*x_ref[1]+(-0.326378737219)*x_ref[2]**o+(0.735260248159)*x_ref[2]
-        ref[1,0,0,1]=(-0.629157417304)*x_ref[0]**o+(-0.00171372949641)*x_ref[0]+(0.110550936359)*x_ref[1]**o+(-0.418314227619)*x_ref[1]+(0.968147035552)*x_ref[2]**o+(-0.58304546387)*x_ref[2]
-        ref[1,0,1,0]=(0.528767817229)*x_ref[0]**o+(0.111986940482)*x_ref[0]+(0.853287140505)*x_ref[1]**o+(0.551761795603)*x_ref[1]+(-0.848026685332)*x_ref[2]**o+(0.799725876993)*x_ref[2]
-        ref[1,0,1,1]=(0.154974399407)*x_ref[0]**o+(-0.662212037776)*x_ref[0]+(0.628908352518)*x_ref[1]**o+(-0.0175576929699)*x_ref[1]+(-0.0501253203152)*x_ref[2]**o+(0.147651837545)*x_ref[2]
-        ref[1,0,2,0]=(0.53576644491)*x_ref[0]**o+(-0.935865707952)*x_ref[0]+(-0.256921357737)*x_ref[1]**o+(0.452311436169)*x_ref[1]+(-0.449646854354)*x_ref[2]**o+(0.0137632023964)*x_ref[2]
-        ref[1,0,2,1]=(-0.103323182353)*x_ref[0]**o+(-0.0636296047221)*x_ref[0]+(-0.681883331812)*x_ref[1]**o+(-0.284589673307)*x_ref[1]+(-0.525524911635)*x_ref[2]**o+(0.525757772842)*x_ref[2]
-        ref[1,1,0,0]=(0.106186299307)*x_ref[0]**o+(0.193833690397)*x_ref[0]+(0.755686652252)*x_ref[1]**o+(-0.954503081175)*x_ref[1]+(-0.946058471992)*x_ref[2]**o+(0.258850283735)*x_ref[2]
-        ref[1,1,0,1]=(-0.352425152661)*x_ref[0]**o+(-0.955207432287)*x_ref[0]+(0.946989898911)*x_ref[1]**o+(0.426365715943)*x_ref[1]+(-0.225898340088)*x_ref[2]**o+(-0.108613105442)*x_ref[2]
-        ref[1,1,1,0]=(0.505488482593)*x_ref[0]**o+(-0.0193114896733)*x_ref[0]+(-0.809537000564)*x_ref[1]**o+(0.39999431472)*x_ref[1]+(-0.968315699948)*x_ref[2]**o+(0.672744543525)*x_ref[2]
-        ref[1,1,1,1]=(0.0967454491182)*x_ref[0]**o+(-0.608840080579)*x_ref[0]+(0.287989672484)*x_ref[1]**o+(-0.989435924681)*x_ref[1]+(0.46833865882)*x_ref[2]**o+(0.0211042567481)*x_ref[2]
-        ref[1,1,2,0]=(-0.461777513493)*x_ref[0]**o+(-0.539619783995)*x_ref[0]+(-0.719051252797)*x_ref[1]**o+(-0.980491094424)*x_ref[1]+(0.526872369892)*x_ref[2]**o+(0.534649090672)*x_ref[2]
-        ref[1,1,2,1]=(-0.498068667635)*x_ref[0]**o+(-0.977138256259)*x_ref[0]+(0.388405877405)*x_ref[1]**o+(-0.652220953523)*x_ref[1]+(0.214733833456)*x_ref[2]**o+(0.925064130776)*x_ref[2]
-        ref[1,2,0,0]=(-0.728915088302)*x_ref[0]**o+(-0.867653377354)*x_ref[0]+(-0.0240751909884)*x_ref[1]**o+(-0.617932013511)*x_ref[1]+(0.342417783703)*x_ref[2]**o+(0.269029568448)*x_ref[2]
-        ref[1,2,0,1]=(0.659030580895)*x_ref[0]**o+(0.460057036148)*x_ref[0]+(0.0556749040721)*x_ref[1]**o+(-0.0943860780082)*x_ref[1]+(0.940068201493)*x_ref[2]**o+(-0.156531042318)*x_ref[2]
-        ref[1,2,1,0]=(-0.0373627034239)*x_ref[0]**o+(-0.631862915794)*x_ref[0]+(0.384889489295)*x_ref[1]**o+(-0.85645836005)*x_ref[1]+(-0.448074134473)*x_ref[2]**o+(-0.103825620602)*x_ref[2]
-        ref[1,2,1,1]=(-0.19142928199)*x_ref[0]**o+(-0.993719455322)*x_ref[0]+(0.204439624689)*x_ref[1]**o+(-0.0616134769914)*x_ref[1]+(0.581621603387)*x_ref[2]**o+(-0.554871585864)*x_ref[2]
-        ref[1,2,2,0]=(0.684658549351)*x_ref[0]**o+(-0.0520805658251)*x_ref[0]+(-0.549405651115)*x_ref[1]**o+(-0.0890223507953)*x_ref[1]+(0.538847108562)*x_ref[2]**o+(0.555575374976)*x_ref[2]
-        ref[1,2,2,1]=(-0.197138807828)*x_ref[0]**o+(0.691528695453)*x_ref[0]+(0.337770131451)*x_ref[1]**o+(-0.0662330700506)*x_ref[1]+(-0.556170962811)*x_ref[2]**o+(-0.415321654558)*x_ref[2]
-        ref[1,3,0,0]=(-0.255542847866)*x_ref[0]**o+(-0.731103056475)*x_ref[0]+(-0.764119472108)*x_ref[1]**o+(0.264775911336)*x_ref[1]+(0.976604892324)*x_ref[2]**o+(-0.929820558374)*x_ref[2]
-        ref[1,3,0,1]=(-0.506143192998)*x_ref[0]**o+(-0.139848041055)*x_ref[0]+(-0.074839899541)*x_ref[1]**o+(-0.35100597507)*x_ref[1]+(-0.127574366194)*x_ref[2]**o+(-0.0084655916902)*x_ref[2]
-        ref[1,3,1,0]=(0.099997170805)*x_ref[0]**o+(-0.149089017918)*x_ref[0]+(0.419790611192)*x_ref[1]**o+(-0.148698964676)*x_ref[1]+(0.490423198386)*x_ref[2]**o+(-0.210076971679)*x_ref[2]
-        ref[1,3,1,1]=(-0.139371350292)*x_ref[0]**o+(-0.320648977772)*x_ref[0]+(0.836558622998)*x_ref[1]**o+(0.394491153689)*x_ref[1]+(0.0857621395676)*x_ref[2]**o+(-0.709138669156)*x_ref[2]
-        ref[1,3,2,0]=(0.743901534332)*x_ref[0]**o+(-0.249486095838)*x_ref[0]+(0.281087339807)*x_ref[1]**o+(0.617669579771)*x_ref[1]+(-0.383135240681)*x_ref[2]**o+(-0.647267353645)*x_ref[2]
-        ref[1,3,2,1]=(-0.465587857279)*x_ref[0]**o+(0.578094609537)*x_ref[0]+(0.400668301655)*x_ref[1]**o+(-0.999984469723)*x_ref[1]+(-0.460584024789)*x_ref[2]**o+(0.943466859654)*x_ref[2]
-        ref[1,4,0,0]=(-0.246915327144)*x_ref[0]**o+(-0.203163427715)*x_ref[0]+(0.138589009969)*x_ref[1]**o+(-0.705709971036)*x_ref[1]+(0.273085758612)*x_ref[2]**o+(0.901084781824)*x_ref[2]
-        ref[1,4,0,1]=(-0.919682459969)*x_ref[0]**o+(-0.476395399467)*x_ref[0]+(0.00638460254264)*x_ref[1]**o+(-0.474710529098)*x_ref[1]+(-0.935681998683)*x_ref[2]**o+(0.461344674976)*x_ref[2]
-        ref[1,4,1,0]=(0.8225038116)*x_ref[0]**o+(0.0855444334027)*x_ref[0]+(-0.685983943046)*x_ref[1]**o+(-0.46700703117)*x_ref[1]+(0.760260028729)*x_ref[2]**o+(-0.190951535155)*x_ref[2]
-        ref[1,4,1,1]=(0.512940503439)*x_ref[0]**o+(0.998803686398)*x_ref[0]+(0.200914807938)*x_ref[1]**o+(0.793533216819)*x_ref[1]+(0.980475771536)*x_ref[2]**o+(-0.00307515759413)*x_ref[2]
-        ref[1,4,2,0]=(0.278761841603)*x_ref[0]**o+(-0.368232992504)*x_ref[0]+(0.939116142167)*x_ref[1]**o+(0.13661977072)*x_ref[1]+(-0.490378973691)*x_ref[2]**o+(-0.409117913136)*x_ref[2]
-        ref[1,4,2,1]=(-0.456090186141)*x_ref[0]**o+(-0.881413614887)*x_ref[0]+(-0.951099957833)*x_ref[1]**o+(0.859690794224)*x_ref[1]+(0.0723671154601)*x_ref[2]**o+(0.468823687196)*x_ref[2]
-        ref[2,0,0,0]=(-0.415483671814)*x_ref[0]**o+(0.415160471625)*x_ref[0]+(-0.730798143253)*x_ref[1]**o+(-0.90883538519)*x_ref[1]+(-0.241870631235)*x_ref[2]**o+(-0.549577536182)*x_ref[2]
-        ref[2,0,0,1]=(0.86985374761)*x_ref[0]**o+(0.378073808491)*x_ref[0]+(0.0923146623212)*x_ref[1]**o+(-0.912604209727)*x_ref[1]+(0.529162434789)*x_ref[2]**o+(-0.135836425669)*x_ref[2]
-        ref[2,0,1,0]=(0.702609345242)*x_ref[0]**o+(-0.63859466548)*x_ref[0]+(-0.2668268067)*x_ref[1]**o+(0.107377268995)*x_ref[1]+(-0.575458650368)*x_ref[2]**o+(-0.359972696269)*x_ref[2]
-        ref[2,0,1,1]=(-0.169295117134)*x_ref[0]**o+(-0.0780580709275)*x_ref[0]+(0.9803920116)*x_ref[1]**o+(0.794090800797)*x_ref[1]+(0.71271688197)*x_ref[2]**o+(0.265355025589)*x_ref[2]
-        ref[2,0,2,0]=(0.700475435131)*x_ref[0]**o+(0.317025249264)*x_ref[0]+(0.885140001575)*x_ref[1]**o+(-0.733992012528)*x_ref[1]+(-0.937990577058)*x_ref[2]**o+(-0.566197708973)*x_ref[2]
-        ref[2,0,2,1]=(0.369801749993)*x_ref[0]**o+(0.292267254334)*x_ref[0]+(0.24962184892)*x_ref[1]**o+(-0.912670113872)*x_ref[1]+(0.590235505871)*x_ref[2]**o+(0.199279333126)*x_ref[2]
-        ref[2,1,0,0]=(-0.165657934182)*x_ref[0]**o+(0.837030192613)*x_ref[0]+(-0.615301249273)*x_ref[1]**o+(-0.947633937776)*x_ref[1]+(0.916677465451)*x_ref[2]**o+(0.633727682324)*x_ref[2]
-        ref[2,1,0,1]=(0.260787013495)*x_ref[0]**o+(0.367146934614)*x_ref[0]+(0.0271903085878)*x_ref[1]**o+(0.853398837558)*x_ref[1]+(-0.381379969861)*x_ref[2]**o+(0.140001581749)*x_ref[2]
-        ref[2,1,1,0]=(0.121628758983)*x_ref[0]**o+(-0.212350487769)*x_ref[0]+(-0.198031244861)*x_ref[1]**o+(-0.695620829484)*x_ref[1]+(-0.0533521134282)*x_ref[2]**o+(0.956103910898)*x_ref[2]
-        ref[2,1,1,1]=(-0.321102504727)*x_ref[0]**o+(-0.920842546991)*x_ref[0]+(0.082643684589)*x_ref[1]**o+(-0.0960346141926)*x_ref[1]+(0.475269198456)*x_ref[2]**o+(-0.184473007427)*x_ref[2]
-        ref[2,1,2,0]=(0.412066628472)*x_ref[0]**o+(-0.667420990332)*x_ref[0]+(0.754028295628)*x_ref[1]**o+(0.967928426879)*x_ref[1]+(-0.129320768473)*x_ref[2]**o+(-0.496085464716)*x_ref[2]
-        ref[2,1,2,1]=(-0.379495871082)*x_ref[0]**o+(0.768674450671)*x_ref[0]+(0.786595353344)*x_ref[1]**o+(-0.191866280074)*x_ref[1]+(0.314572026852)*x_ref[2]**o+(-0.0245751436484)*x_ref[2]
-        ref[2,2,0,0]=(-0.291171443165)*x_ref[0]**o+(0.857660522727)*x_ref[0]+(-0.0611031323308)*x_ref[1]**o+(0.365691706254)*x_ref[1]+(0.906199720505)*x_ref[2]**o+(0.621747944156)*x_ref[2]
-        ref[2,2,0,1]=(-0.110402534173)*x_ref[0]**o+(-0.465943589112)*x_ref[0]+(0.896364485404)*x_ref[1]**o+(0.16234913823)*x_ref[1]+(0.443564946892)*x_ref[2]**o+(0.259358795418)*x_ref[2]
-        ref[2,2,1,0]=(-0.480613805459)*x_ref[0]**o+(-0.837751646963)*x_ref[0]+(0.803669049568)*x_ref[1]**o+(-0.859501917481)*x_ref[1]+(0.633523536226)*x_ref[2]**o+(0.351742190573)*x_ref[2]
-        ref[2,2,1,1]=(0.133665578883)*x_ref[0]**o+(-0.283052337652)*x_ref[0]+(-0.382761111917)*x_ref[1]**o+(-0.197039443436)*x_ref[1]+(0.081520912443)*x_ref[2]**o+(-0.167181778234)*x_ref[2]
-        ref[2,2,2,0]=(0.207787204976)*x_ref[0]**o+(0.245207436631)*x_ref[0]+(0.340092449827)*x_ref[1]**o+(0.541457158709)*x_ref[1]+(-0.606955763027)*x_ref[2]**o+(-0.197506280875)*x_ref[2]
-        ref[2,2,2,1]=(0.399727427867)*x_ref[0]**o+(-0.0452717156729)*x_ref[0]+(0.85643441)*x_ref[1]**o+(-0.938966108133)*x_ref[1]+(0.832098573693)*x_ref[2]**o+(-0.375366657117)*x_ref[2]
-        ref[2,3,0,0]=(-0.661411409657)*x_ref[0]**o+(0.702058724486)*x_ref[0]+(0.851820224497)*x_ref[1]**o+(-0.984572528809)*x_ref[1]+(0.700617112775)*x_ref[2]**o+(0.990437560702)*x_ref[2]
-        ref[2,3,0,1]=(-0.937637737824)*x_ref[0]**o+(0.970774222765)*x_ref[0]+(0.0263154279607)*x_ref[1]**o+(-0.453145473796)*x_ref[1]+(-0.740101764089)*x_ref[2]**o+(0.248604522836)*x_ref[2]
-        ref[2,3,1,0]=(0.624217308865)*x_ref[0]**o+(0.682749411369)*x_ref[0]+(0.394444314015)*x_ref[1]**o+(0.288021257523)*x_ref[1]+(-0.943712429774)*x_ref[2]**o+(-0.299272610192)*x_ref[2]
-        ref[2,3,1,1]=(0.00512058360895)*x_ref[0]**o+(-0.0263977566592)*x_ref[0]+(-0.769491595627)*x_ref[1]**o+(-0.403091037334)*x_ref[1]+(-0.940178247778)*x_ref[2]**o+(-0.664590180141)*x_ref[2]
-        ref[2,3,2,0]=(-0.606361369179)*x_ref[0]**o+(0.0252279171688)*x_ref[0]+(0.0125424811264)*x_ref[1]**o+(-0.249080159522)*x_ref[1]+(0.969599361427)*x_ref[2]**o+(0.369428527325)*x_ref[2]
-        ref[2,3,2,1]=(-0.899501409225)*x_ref[0]**o+(0.834437734927)*x_ref[0]+(-0.992484449733)*x_ref[1]**o+(0.00567086116985)*x_ref[1]+(0.112432151044)*x_ref[2]**o+(0.725013775434)*x_ref[2]
-        ref[2,4,0,0]=(-0.864861209468)*x_ref[0]**o+(0.475518351325)*x_ref[0]+(-0.575172287508)*x_ref[1]**o+(-0.695754751991)*x_ref[1]+(0.935933655733)*x_ref[2]**o+(-0.156489388279)*x_ref[2]
-        ref[2,4,0,1]=(-0.072905918035)*x_ref[0]**o+(0.912617659416)*x_ref[0]+(0.76767638187)*x_ref[1]**o+(0.517738398356)*x_ref[1]+(-0.116771137305)*x_ref[2]**o+(-0.887027853796)*x_ref[2]
-        ref[2,4,1,0]=(-0.169351806151)*x_ref[0]**o+(-0.667994142736)*x_ref[0]+(-0.742400183746)*x_ref[1]**o+(-0.345483488309)*x_ref[1]+(0.534459208989)*x_ref[2]**o+(-0.314632556106)*x_ref[2]
-        ref[2,4,1,1]=(0.571889164138)*x_ref[0]**o+(-0.603799705213)*x_ref[0]+(0.574246013631)*x_ref[1]**o+(-0.156121300765)*x_ref[1]+(-0.300131083217)*x_ref[2]**o+(0.781527389701)*x_ref[2]
-        ref[2,4,2,0]=(-0.433340783774)*x_ref[0]**o+(-0.337577532056)*x_ref[0]+(-0.991017325155)*x_ref[1]**o+(0.169866142612)*x_ref[1]+(0.531407605197)*x_ref[2]**o+(0.91525228665)*x_ref[2]
-        ref[2,4,2,1]=(0.837883720242)*x_ref[0]**o+(-0.647682324772)*x_ref[0]+(0.125057981769)*x_ref[1]**o+(-0.734369688409)*x_ref[1]+(0.5864622868)*x_ref[2]**o+(-0.378030111621)*x_ref[2]
-        ref[3,0,0,0]=(-0.497406654549)*x_ref[0]**o+(0.773396244829)*x_ref[0]+(0.587080735986)*x_ref[1]**o+(0.80571073543)*x_ref[1]+(-0.621583700283)*x_ref[2]**o+(0.214586226671)*x_ref[2]
-        ref[3,0,0,1]=(0.602557120764)*x_ref[0]**o+(0.362884272628)*x_ref[0]+(-0.469709604155)*x_ref[1]**o+(0.570294839284)*x_ref[1]+(-0.977082842755)*x_ref[2]**o+(-0.871580274035)*x_ref[2]
-        ref[3,0,1,0]=(0.801845637209)*x_ref[0]**o+(0.65646927893)*x_ref[0]+(0.181490001743)*x_ref[1]**o+(-0.579155840484)*x_ref[1]+(-0.690604456924)*x_ref[2]**o+(0.999798826875)*x_ref[2]
-        ref[3,0,1,1]=(-0.0835741146147)*x_ref[0]**o+(0.251697832709)*x_ref[0]+(0.915417127133)*x_ref[1]**o+(0.859412289228)*x_ref[1]+(0.529025246336)*x_ref[2]**o+(0.0290945910046)*x_ref[2]
-        ref[3,0,2,0]=(0.43632860403)*x_ref[0]**o+(-0.71378809102)*x_ref[0]+(0.996769149715)*x_ref[1]**o+(-0.694095684973)*x_ref[1]+(0.24606095312)*x_ref[2]**o+(0.0974139948716)*x_ref[2]
-        ref[3,0,2,1]=(-0.615800860737)*x_ref[0]**o+(-0.0194774462371)*x_ref[0]+(-0.323266780598)*x_ref[1]**o+(0.70039319915)*x_ref[1]+(0.0990606501268)*x_ref[2]**o+(-0.265400117193)*x_ref[2]
-        ref[3,1,0,0]=(0.637788917841)*x_ref[0]**o+(-0.898134292781)*x_ref[0]+(0.397058421405)*x_ref[1]**o+(0.424875003774)*x_ref[1]+(0.493154896437)*x_ref[2]**o+(0.426966521522)*x_ref[2]
-        ref[3,1,0,1]=(0.307016370261)*x_ref[0]**o+(0.583037237501)*x_ref[0]+(-0.715510433757)*x_ref[1]**o+(-0.778084356162)*x_ref[1]+(0.624410868665)*x_ref[2]**o+(0.534413229876)*x_ref[2]
-        ref[3,1,1,0]=(0.53494197621)*x_ref[0]**o+(0.0347747301727)*x_ref[0]+(0.387683566308)*x_ref[1]**o+(0.79111981305)*x_ref[1]+(0.499346741486)*x_ref[2]**o+(-0.89736311061)*x_ref[2]
-        ref[3,1,1,1]=(-0.414505914492)*x_ref[0]**o+(0.738343334487)*x_ref[0]+(0.0839982715753)*x_ref[1]**o+(0.306059781071)*x_ref[1]+(0.205292188103)*x_ref[2]**o+(0.478479664712)*x_ref[2]
-        ref[3,1,2,0]=(0.649444916094)*x_ref[0]**o+(-0.616363283285)*x_ref[0]+(-0.890710011556)*x_ref[1]**o+(-0.55638070962)*x_ref[1]+(0.63397005463)*x_ref[2]**o+(-0.296632593945)*x_ref[2]
-        ref[3,1,2,1]=(0.867500426375)*x_ref[0]**o+(0.087056846585)*x_ref[0]+(-0.347167872287)*x_ref[1]**o+(-0.593410409382)*x_ref[1]+(-0.0853161439992)*x_ref[2]**o+(0.32855927156)*x_ref[2]
-        ref[3,2,0,0]=(0.176880322402)*x_ref[0]**o+(-0.342939990014)*x_ref[0]+(0.927975205318)*x_ref[1]**o+(0.395166493409)*x_ref[1]+(-0.114428155908)*x_ref[2]**o+(0.518356015938)*x_ref[2]
-        ref[3,2,0,1]=(-0.560834784775)*x_ref[0]**o+(0.989745819909)*x_ref[0]+(-0.201732235802)*x_ref[1]**o+(-0.953838293418)*x_ref[1]+(-0.797223863765)*x_ref[2]**o+(-0.44533752286)*x_ref[2]
-        ref[3,2,1,0]=(-0.83129861256)*x_ref[0]**o+(-0.768067351258)*x_ref[0]+(-0.564704574946)*x_ref[1]**o+(0.419961478425)*x_ref[1]+(0.561243126484)*x_ref[2]**o+(0.536547545961)*x_ref[2]
-        ref[3,2,1,1]=(-0.245876224002)*x_ref[0]**o+(-0.0399839529678)*x_ref[0]+(-0.728071866725)*x_ref[1]**o+(0.68478402008)*x_ref[1]+(0.907895423543)*x_ref[2]**o+(0.454698589619)*x_ref[2]
-        ref[3,2,2,0]=(-0.412012705012)*x_ref[0]**o+(-0.575272496028)*x_ref[0]+(0.877861906104)*x_ref[1]**o+(-0.586319475679)*x_ref[1]+(0.668997061563)*x_ref[2]**o+(-0.418342969428)*x_ref[2]
-        ref[3,2,2,1]=(0.270232215934)*x_ref[0]**o+(0.236642564222)*x_ref[0]+(-0.0693779443521)*x_ref[1]**o+(0.77329883812)*x_ref[1]+(-0.743424502879)*x_ref[2]**o+(0.296073856497)*x_ref[2]
-        ref[3,3,0,0]=(-0.0659865092333)*x_ref[0]**o+(-0.645286369943)*x_ref[0]+(0.746214220465)*x_ref[1]**o+(-0.549592848453)*x_ref[1]+(-0.194552740752)*x_ref[2]**o+(0.136734604935)*x_ref[2]
-        ref[3,3,0,1]=(0.0407640382533)*x_ref[0]**o+(-0.720002890774)*x_ref[0]+(-0.902500650998)*x_ref[1]**o+(-0.0763091975748)*x_ref[1]+(-0.70279308164)*x_ref[2]**o+(-0.412384977965)*x_ref[2]
-        ref[3,3,1,0]=(0.460226151062)*x_ref[0]**o+(-0.359911871464)*x_ref[0]+(0.654909639152)*x_ref[1]**o+(-0.574154331236)*x_ref[1]+(-0.226246538275)*x_ref[2]**o+(-0.168145308987)*x_ref[2]
-        ref[3,3,1,1]=(-0.966169813904)*x_ref[0]**o+(-0.784593122487)*x_ref[0]+(-0.857455334787)*x_ref[1]**o+(-0.116963343366)*x_ref[1]+(0.231055675695)*x_ref[2]**o+(-0.953091037377)*x_ref[2]
-        ref[3,3,2,0]=(-0.796170783237)*x_ref[0]**o+(-0.605030579381)*x_ref[0]+(0.388310055252)*x_ref[1]**o+(-0.504349251868)*x_ref[1]+(0.83840677955)*x_ref[2]**o+(-0.586099851479)*x_ref[2]
-        ref[3,3,2,1]=(0.195092011781)*x_ref[0]**o+(-0.358423372419)*x_ref[0]+(-0.643669425281)*x_ref[1]**o+(0.721564003575)*x_ref[1]+(-0.588431193874)*x_ref[2]**o+(-0.378625221371)*x_ref[2]
-        ref[3,4,0,0]=(0.585756187041)*x_ref[0]**o+(-0.753400165107)*x_ref[0]+(0.790439809615)*x_ref[1]**o+(0.0473109698221)*x_ref[1]+(0.951768026456)*x_ref[2]**o+(0.423960993524)*x_ref[2]
-        ref[3,4,0,1]=(0.32857275647)*x_ref[0]**o+(0.566198295813)*x_ref[0]+(-0.372998380277)*x_ref[1]**o+(0.671551057967)*x_ref[1]+(-0.990512903698)*x_ref[2]**o+(-0.598820986842)*x_ref[2]
-        ref[3,4,1,0]=(0.512362923169)*x_ref[0]**o+(0.161976775973)*x_ref[0]+(-0.823370116651)*x_ref[1]**o+(-0.539694552746)*x_ref[1]+(-0.252135888305)*x_ref[2]**o+(-0.323536133539)*x_ref[2]
-        ref[3,4,1,1]=(0.342762199745)*x_ref[0]**o+(0.569702637139)*x_ref[0]+(0.514189130968)*x_ref[1]**o+(-0.219203654565)*x_ref[1]+(-0.839606678057)*x_ref[2]**o+(0.374386070142)*x_ref[2]
-        ref[3,4,2,0]=(0.0568713695577)*x_ref[0]**o+(-0.494349350234)*x_ref[0]+(0.829657653367)*x_ref[1]**o+(0.541489358189)*x_ref[1]+(-0.9469529858)*x_ref[2]**o+(0.230257255487)*x_ref[2]
-        ref[3,4,2,1]=(0.874227414064)*x_ref[0]**o+(0.76572262681)*x_ref[0]+(0.305716770957)*x_ref[1]**o+(0.225904980409)*x_ref[1]+(-0.10063057638)*x_ref[2]**o+(-0.87920628616)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-1.02854286859)*x[0]+(0.105922853194)*x[1]
-        ref=(-1.02854286859)*x_ref[0]+(0.105922853194)*x_ref[1]
-      else:
-        arg=(1.36620376771)*x[0]+(-0.336798536224)*x[1]+(0.534538499605)*x[2]
-        ref=(1.36620376771)*x_ref[0]+(-0.336798536224)*x_ref[1]+(0.534538499605)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.403120829068)*x[0]+(-0.70319880694)*x[1]
-        arg[1]=(0.936461664193)*x[0]+(1.3454908089)*x[1]
-        ref[0]=(-0.403120829068)*x[0]+(-0.70319880694)*x[1]
-        ref[1]=(0.936461664193)*x[0]+(1.3454908089)*x[1]
-      else:
-        arg[0]=(0.154137304713)*x[0]+(0.332968506642)*x[1]+(-0.4661136382)*x[2]
-        arg[1]=(0.306790292003)*x[0]+(0.466856258098)*x[1]+(0.205782933414)*x[2]
-        ref[0]=(0.154137304713)*x[0]+(0.332968506642)*x[1]+(-0.4661136382)*x[2]
-        ref[1]=(0.306790292003)*x[0]+(0.466856258098)*x[1]+(0.205782933414)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.452635897444)*x[0]+(-0.210513646405)*x[1]
-        arg[0,1]=(-0.590704436627)*x[0]+(1.78000273884)*x[1]
-        arg[0,2]=(1.01331349402)*x[0]+(1.76279765125)*x[1]
-        arg[0,3]=(1.5588852701)*x[0]+(-0.550895238707)*x[1]
-        arg[0,4]=(-0.352453804527)*x[0]+(-0.338832613421)*x[1]
-        arg[1,0]=(-0.809837877163)*x[0]+(-0.531009602702)*x[1]
-        arg[1,1]=(0.513641503665)*x[0]+(0.232114989082)*x[1]
-        arg[1,2]=(-0.424635655997)*x[0]+(0.0796757576821)*x[1]
-        arg[1,3]=(-1.5899938122)*x[0]+(-0.178949548482)*x[1]
-        arg[1,4]=(0.989317971495)*x[0]+(0.969711267468)*x[1]
-        arg[2,0]=(0.384490947785)*x[0]+(1.42230193156)*x[1]
-        arg[2,1]=(-0.0832227929255)*x[0]+(0.859020891429)*x[1]
-        arg[2,2]=(-1.36129563124)*x[0]+(-0.240985031888)*x[1]
-        arg[2,3]=(0.319706901063)*x[0]+(1.03419924566)*x[1]
-        arg[2,4]=(0.986965249719)*x[0]+(0.228684031472)*x[1]
-        arg[3,0]=(0.588520127337)*x[0]+(0.016799594822)*x[1]
-        arg[3,1]=(1.46193438322)*x[0]+(0.431838900383)*x[1]
-        arg[3,2]=(-0.0235512206818)*x[0]+(0.00227038037474)*x[1]
-        arg[3,3]=(0.977383733076)*x[0]+(0.383979958766)*x[1]
-        arg[3,4]=(0.447782383836)*x[0]+(-0.504218231709)*x[1]
-        ref[0,0]=(-0.452635897444)*x_ref[0]+(-0.210513646405)*x_ref[1]
-        ref[0,1]=(-0.590704436627)*x_ref[0]+(1.78000273884)*x_ref[1]
-        ref[0,2]=(1.01331349402)*x_ref[0]+(1.76279765125)*x_ref[1]
-        ref[0,3]=(1.5588852701)*x_ref[0]+(-0.550895238707)*x_ref[1]
-        ref[0,4]=(-0.352453804527)*x_ref[0]+(-0.338832613421)*x_ref[1]
-        ref[1,0]=(-0.809837877163)*x_ref[0]+(-0.531009602702)*x_ref[1]
-        ref[1,1]=(0.513641503665)*x_ref[0]+(0.232114989082)*x_ref[1]
-        ref[1,2]=(-0.424635655997)*x_ref[0]+(0.0796757576821)*x_ref[1]
-        ref[1,3]=(-1.5899938122)*x_ref[0]+(-0.178949548482)*x_ref[1]
-        ref[1,4]=(0.989317971495)*x_ref[0]+(0.969711267468)*x_ref[1]
-        ref[2,0]=(0.384490947785)*x_ref[0]+(1.42230193156)*x_ref[1]
-        ref[2,1]=(-0.0832227929255)*x_ref[0]+(0.859020891429)*x_ref[1]
-        ref[2,2]=(-1.36129563124)*x_ref[0]+(-0.240985031888)*x_ref[1]
-        ref[2,3]=(0.319706901063)*x_ref[0]+(1.03419924566)*x_ref[1]
-        ref[2,4]=(0.986965249719)*x_ref[0]+(0.228684031472)*x_ref[1]
-        ref[3,0]=(0.588520127337)*x_ref[0]+(0.016799594822)*x_ref[1]
-        ref[3,1]=(1.46193438322)*x_ref[0]+(0.431838900383)*x_ref[1]
-        ref[3,2]=(-0.0235512206818)*x_ref[0]+(0.00227038037474)*x_ref[1]
-        ref[3,3]=(0.977383733076)*x_ref[0]+(0.383979958766)*x_ref[1]
-        ref[3,4]=(0.447782383836)*x_ref[0]+(-0.504218231709)*x_ref[1]
-      else:
-        arg[0,0]=(-0.566459971675)*x[0]+(0.240246648893)*x[1]+(1.84693181923)*x[2]
-        arg[0,1]=(1.09715015899)*x[0]+(1.26531924413)*x[1]+(0.627813347679)*x[2]
-        arg[0,2]=(-1.17535073843)*x[0]+(-0.215601498941)*x[1]+(1.36346500888)*x[2]
-        arg[0,3]=(-0.637207120161)*x[0]+(1.08542566952)*x[1]+(-1.13757514425)*x[2]
-        arg[0,4]=(1.18247424069)*x[0]+(-1.48951614815)*x[1]+(0.615535039719)*x[2]
-        arg[1,0]=(0.0937432100426)*x[0]+(-0.510326894156)*x[1]+(-0.456208996457)*x[2]
-        arg[1,1]=(-0.866120342442)*x[0]+(0.927484984985)*x[1]+(0.918081524156)*x[2]
-        arg[1,2]=(0.025238374235)*x[0]+(-0.182938599269)*x[1]+(-1.50048281322)*x[2]
-        arg[1,3]=(-0.302334971294)*x[0]+(-0.925062799423)*x[1]+(-1.4675138953)*x[2]
-        arg[1,4]=(-0.497738566447)*x[0]+(-0.324727071875)*x[1]+(-1.43341212055)*x[2]
-        arg[2,0]=(-1.4605237958)*x[0]+(-0.332826007088)*x[1]+(-0.230483401111)*x[2]
-        arg[2,1]=(0.801769248581)*x[0]+(-0.930588036503)*x[1]+(-1.06804808381)*x[2]
-        arg[2,2]=(-1.07972165017)*x[0]+(1.09295362882)*x[1]+(0.048550098477)*x[2]
-        arg[2,3]=(0.028290230337)*x[0]+(0.179461246635)*x[1]+(-1.09165257072)*x[2]
-        arg[2,4]=(0.238850986174)*x[0]+(-0.837307206184)*x[1]+(-0.617254874594)*x[2]
-        arg[3,0]=(-0.125921204582)*x[0]+(0.234758657879)*x[1]+(0.0847162247843)*x[2]
-        arg[3,1]=(-0.213352414907)*x[0]+(0.206777352455)*x[1]+(-0.135357638131)*x[2]
-        arg[3,2]=(-0.41897394434)*x[0]+(0.152706100016)*x[1]+(1.52390356012)*x[2]
-        arg[3,3]=(0.1831705248)*x[0]+(-1.13556841364)*x[1]+(-1.7661652693)*x[2]
-        arg[3,4]=(0.43473708388)*x[0]+(1.04496896213)*x[1]+(-0.816894739325)*x[2]
-        ref[0,0]=(-0.566459971675)*x_ref[0]+(0.240246648893)*x_ref[1]+(1.84693181923)*x_ref[2]
-        ref[0,1]=(1.09715015899)*x_ref[0]+(1.26531924413)*x_ref[1]+(0.627813347679)*x_ref[2]
-        ref[0,2]=(-1.17535073843)*x_ref[0]+(-0.215601498941)*x_ref[1]+(1.36346500888)*x_ref[2]
-        ref[0,3]=(-0.637207120161)*x_ref[0]+(1.08542566952)*x_ref[1]+(-1.13757514425)*x_ref[2]
-        ref[0,4]=(1.18247424069)*x_ref[0]+(-1.48951614815)*x_ref[1]+(0.615535039719)*x_ref[2]
-        ref[1,0]=(0.0937432100426)*x_ref[0]+(-0.510326894156)*x_ref[1]+(-0.456208996457)*x_ref[2]
-        ref[1,1]=(-0.866120342442)*x_ref[0]+(0.927484984985)*x_ref[1]+(0.918081524156)*x_ref[2]
-        ref[1,2]=(0.025238374235)*x_ref[0]+(-0.182938599269)*x_ref[1]+(-1.50048281322)*x_ref[2]
-        ref[1,3]=(-0.302334971294)*x_ref[0]+(-0.925062799423)*x_ref[1]+(-1.4675138953)*x_ref[2]
-        ref[1,4]=(-0.497738566447)*x_ref[0]+(-0.324727071875)*x_ref[1]+(-1.43341212055)*x_ref[2]
-        ref[2,0]=(-1.4605237958)*x_ref[0]+(-0.332826007088)*x_ref[1]+(-0.230483401111)*x_ref[2]
-        ref[2,1]=(0.801769248581)*x_ref[0]+(-0.930588036503)*x_ref[1]+(-1.06804808381)*x_ref[2]
-        ref[2,2]=(-1.07972165017)*x_ref[0]+(1.09295362882)*x_ref[1]+(0.048550098477)*x_ref[2]
-        ref[2,3]=(0.028290230337)*x_ref[0]+(0.179461246635)*x_ref[1]+(-1.09165257072)*x_ref[2]
-        ref[2,4]=(0.238850986174)*x_ref[0]+(-0.837307206184)*x_ref[1]+(-0.617254874594)*x_ref[2]
-        ref[3,0]=(-0.125921204582)*x_ref[0]+(0.234758657879)*x_ref[1]+(0.0847162247843)*x_ref[2]
-        ref[3,1]=(-0.213352414907)*x_ref[0]+(0.206777352455)*x_ref[1]+(-0.135357638131)*x_ref[2]
-        ref[3,2]=(-0.41897394434)*x_ref[0]+(0.152706100016)*x_ref[1]+(1.52390356012)*x_ref[2]
-        ref[3,3]=(0.1831705248)*x_ref[0]+(-1.13556841364)*x_ref[1]+(-1.7661652693)*x_ref[2]
-        ref[3,4]=(0.43473708388)*x_ref[0]+(1.04496896213)*x_ref[1]+(-0.816894739325)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.324237136046)*x[0]+(0.67172278334)*x[1]
-        arg[0,0,1]=(-1.07360258996)*x[0]+(-0.646208771542)*x[1]
-        arg[0,1,0]=(-0.040139403311)*x[0]+(-0.281626553874)*x[1]
-        arg[0,1,1]=(0.963343050385)*x[0]+(-0.724838290038)*x[1]
-        arg[1,0,0]=(-0.909697586367)*x[0]+(0.48041903189)*x[1]
-        arg[1,0,1]=(0.414758676032)*x[0]+(-0.0921084575218)*x[1]
-        arg[1,1,0]=(1.06852211241)*x[0]+(-1.01026709886)*x[1]
-        arg[1,1,1]=(-0.675258695211)*x[0]+(0.51361078905)*x[1]
-        arg[2,0,0]=(-0.791246198786)*x[0]+(-0.0283034425042)*x[1]
-        arg[2,0,1]=(-0.87756010848)*x[0]+(-0.00868464377539)*x[1]
-        arg[2,1,0]=(0.44209070344)*x[0]+(0.0846344294002)*x[1]
-        arg[2,1,1]=(0.777287404475)*x[0]+(0.72614634535)*x[1]
-        arg[3,0,0]=(-0.363354104693)*x[0]+(-1.22959837449)*x[1]
-        arg[3,0,1]=(-0.532220757425)*x[0]+(-1.54990170304)*x[1]
-        arg[3,1,0]=(-0.491099325731)*x[0]+(-0.412402332731)*x[1]
-        arg[3,1,1]=(0.0750673227925)*x[0]+(-0.725108664028)*x[1]
-        arg[4,0,0]=(-0.419689899608)*x[0]+(-1.32423898043)*x[1]
-        arg[4,0,1]=(0.532682204197)*x[0]+(0.0703779631797)*x[1]
-        arg[4,1,0]=(1.68643150913)*x[0]+(0.105443733595)*x[1]
-        arg[4,1,1]=(0.936329701936)*x[0]+(1.04067808474)*x[1]
-        arg[5,0,0]=(1.37285560133)*x[0]+(-0.680844454631)*x[1]
-        arg[5,0,1]=(0.843677131436)*x[0]+(0.272365035967)*x[1]
-        arg[5,1,0]=(0.00586472074043)*x[0]+(-1.09785622721)*x[1]
-        arg[5,1,1]=(1.1410854961)*x[0]+(-0.591468439837)*x[1]
-        ref[0,0,0]=(0.324237136046)*x_ref[0]+(0.67172278334)*x_ref[1]
-        ref[0,0,1]=(-1.07360258996)*x_ref[0]+(-0.646208771542)*x_ref[1]
-        ref[0,1,0]=(-0.040139403311)*x_ref[0]+(-0.281626553874)*x_ref[1]
-        ref[0,1,1]=(0.963343050385)*x_ref[0]+(-0.724838290038)*x_ref[1]
-        ref[1,0,0]=(-0.909697586367)*x_ref[0]+(0.48041903189)*x_ref[1]
-        ref[1,0,1]=(0.414758676032)*x_ref[0]+(-0.0921084575218)*x_ref[1]
-        ref[1,1,0]=(1.06852211241)*x_ref[0]+(-1.01026709886)*x_ref[1]
-        ref[1,1,1]=(-0.675258695211)*x_ref[0]+(0.51361078905)*x_ref[1]
-        ref[2,0,0]=(-0.791246198786)*x_ref[0]+(-0.0283034425042)*x_ref[1]
-        ref[2,0,1]=(-0.87756010848)*x_ref[0]+(-0.00868464377539)*x_ref[1]
-        ref[2,1,0]=(0.44209070344)*x_ref[0]+(0.0846344294002)*x_ref[1]
-        ref[2,1,1]=(0.777287404475)*x_ref[0]+(0.72614634535)*x_ref[1]
-        ref[3,0,0]=(-0.363354104693)*x_ref[0]+(-1.22959837449)*x_ref[1]
-        ref[3,0,1]=(-0.532220757425)*x_ref[0]+(-1.54990170304)*x_ref[1]
-        ref[3,1,0]=(-0.491099325731)*x_ref[0]+(-0.412402332731)*x_ref[1]
-        ref[3,1,1]=(0.0750673227925)*x_ref[0]+(-0.725108664028)*x_ref[1]
-        ref[4,0,0]=(-0.419689899608)*x_ref[0]+(-1.32423898043)*x_ref[1]
-        ref[4,0,1]=(0.532682204197)*x_ref[0]+(0.0703779631797)*x_ref[1]
-        ref[4,1,0]=(1.68643150913)*x_ref[0]+(0.105443733595)*x_ref[1]
-        ref[4,1,1]=(0.936329701936)*x_ref[0]+(1.04067808474)*x_ref[1]
-        ref[5,0,0]=(1.37285560133)*x_ref[0]+(-0.680844454631)*x_ref[1]
-        ref[5,0,1]=(0.843677131436)*x_ref[0]+(0.272365035967)*x_ref[1]
-        ref[5,1,0]=(0.00586472074043)*x_ref[0]+(-1.09785622721)*x_ref[1]
-        ref[5,1,1]=(1.1410854961)*x_ref[0]+(-0.591468439837)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.289427308366)*x[0]+(1.17077011703)*x[1]+(0.763196501047)*x[2]
-        arg[0,0,1]=(0.642730500265)*x[0]+(1.1719001632)*x[1]+(-0.121378040894)*x[2]
-        arg[0,1,0]=(0.0879005621769)*x[0]+(-0.627582537594)*x[1]+(0.220072369447)*x[2]
-        arg[0,1,1]=(-0.518762071566)*x[0]+(-0.700754417623)*x[1]+(-0.340623426752)*x[2]
-        arg[1,0,0]=(-0.162635708202)*x[0]+(-0.996922517356)*x[1]+(0.48000598379)*x[2]
-        arg[1,0,1]=(-0.49910792923)*x[0]+(1.11334748765)*x[1]+(0.0050657496159)*x[2]
-        arg[1,1,0]=(-1.55972927502)*x[0]+(0.233936234238)*x[1]+(-0.546906209213)*x[2]
-        arg[1,1,1]=(-0.6012330303)*x[0]+(-0.267951301884)*x[1]+(-0.193021060351)*x[2]
-        arg[2,0,0]=(1.32515959423)*x[0]+(1.2070735022)*x[1]+(1.11474945521)*x[2]
-        arg[2,0,1]=(-1.05500093406)*x[0]+(-0.937935240268)*x[1]+(0.180289797658)*x[2]
-        arg[2,1,0]=(-0.450015559749)*x[0]+(-1.17715272891)*x[1]+(0.197160834934)*x[2]
-        arg[2,1,1]=(-1.24969258786)*x[0]+(-0.300915973735)*x[1]+(-0.195058423793)*x[2]
-        arg[3,0,0]=(0.704171975525)*x[0]+(1.0327384159)*x[1]+(-1.23664355084)*x[2]
-        arg[3,0,1]=(0.916288412006)*x[0]+(1.6929893349)*x[1]+(-1.16682244827)*x[2]
-        arg[3,1,0]=(-0.756147901025)*x[0]+(0.0232005287342)*x[1]+(0.213796289692)*x[2]
-        arg[3,1,1]=(0.92799443461)*x[0]+(-0.228093116826)*x[1]+(-1.53373185211)*x[2]
-        arg[4,0,0]=(-0.272514671459)*x[0]+(0.310026631492)*x[1]+(0.735127519475)*x[2]
-        arg[4,0,1]=(1.23963120106)*x[0]+(-0.0769223754537)*x[1]+(0.767002455909)*x[2]
-        arg[4,1,0]=(-1.1121433063)*x[0]+(0.748482838233)*x[1]+(-0.0985898502473)*x[2]
-        arg[4,1,1]=(-1.08169600038)*x[0]+(-1.39575461699)*x[1]+(0.468455733883)*x[2]
-        arg[5,0,0]=(-0.737100332594)*x[0]+(1.0950941569)*x[1]+(0.530144605873)*x[2]
-        arg[5,0,1]=(1.94353080429)*x[0]+(1.61187736568)*x[1]+(0.887255997784)*x[2]
-        arg[5,1,0]=(-0.492812782764)*x[0]+(-1.17859119673)*x[1]+(-0.627254028293)*x[2]
-        arg[5,1,1]=(0.932565304399)*x[0]+(0.760125636669)*x[1]+(-0.687485104891)*x[2]
-        ref[0,0,0]=(-0.289427308366)*x_ref[0]+(1.17077011703)*x_ref[1]+(0.763196501047)*x_ref[2]
-        ref[0,0,1]=(0.642730500265)*x_ref[0]+(1.1719001632)*x_ref[1]+(-0.121378040894)*x_ref[2]
-        ref[0,1,0]=(0.0879005621769)*x_ref[0]+(-0.627582537594)*x_ref[1]+(0.220072369447)*x_ref[2]
-        ref[0,1,1]=(-0.518762071566)*x_ref[0]+(-0.700754417623)*x_ref[1]+(-0.340623426752)*x_ref[2]
-        ref[1,0,0]=(-0.162635708202)*x_ref[0]+(-0.996922517356)*x_ref[1]+(0.48000598379)*x_ref[2]
-        ref[1,0,1]=(-0.49910792923)*x_ref[0]+(1.11334748765)*x_ref[1]+(0.0050657496159)*x_ref[2]
-        ref[1,1,0]=(-1.55972927502)*x_ref[0]+(0.233936234238)*x_ref[1]+(-0.546906209213)*x_ref[2]
-        ref[1,1,1]=(-0.6012330303)*x_ref[0]+(-0.267951301884)*x_ref[1]+(-0.193021060351)*x_ref[2]
-        ref[2,0,0]=(1.32515959423)*x_ref[0]+(1.2070735022)*x_ref[1]+(1.11474945521)*x_ref[2]
-        ref[2,0,1]=(-1.05500093406)*x_ref[0]+(-0.937935240268)*x_ref[1]+(0.180289797658)*x_ref[2]
-        ref[2,1,0]=(-0.450015559749)*x_ref[0]+(-1.17715272891)*x_ref[1]+(0.197160834934)*x_ref[2]
-        ref[2,1,1]=(-1.24969258786)*x_ref[0]+(-0.300915973735)*x_ref[1]+(-0.195058423793)*x_ref[2]
-        ref[3,0,0]=(0.704171975525)*x_ref[0]+(1.0327384159)*x_ref[1]+(-1.23664355084)*x_ref[2]
-        ref[3,0,1]=(0.916288412006)*x_ref[0]+(1.6929893349)*x_ref[1]+(-1.16682244827)*x_ref[2]
-        ref[3,1,0]=(-0.756147901025)*x_ref[0]+(0.0232005287342)*x_ref[1]+(0.213796289692)*x_ref[2]
-        ref[3,1,1]=(0.92799443461)*x_ref[0]+(-0.228093116826)*x_ref[1]+(-1.53373185211)*x_ref[2]
-        ref[4,0,0]=(-0.272514671459)*x_ref[0]+(0.310026631492)*x_ref[1]+(0.735127519475)*x_ref[2]
-        ref[4,0,1]=(1.23963120106)*x_ref[0]+(-0.0769223754537)*x_ref[1]+(0.767002455909)*x_ref[2]
-        ref[4,1,0]=(-1.1121433063)*x_ref[0]+(0.748482838233)*x_ref[1]+(-0.0985898502473)*x_ref[2]
-        ref[4,1,1]=(-1.08169600038)*x_ref[0]+(-1.39575461699)*x_ref[1]+(0.468455733883)*x_ref[2]
-        ref[5,0,0]=(-0.737100332594)*x_ref[0]+(1.0950941569)*x_ref[1]+(0.530144605873)*x_ref[2]
-        ref[5,0,1]=(1.94353080429)*x_ref[0]+(1.61187736568)*x_ref[1]+(0.887255997784)*x_ref[2]
-        ref[5,1,0]=(-0.492812782764)*x_ref[0]+(-1.17859119673)*x_ref[1]+(-0.627254028293)*x_ref[2]
-        ref[5,1,1]=(0.932565304399)*x_ref[0]+(0.760125636669)*x_ref[1]+(-0.687485104891)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.261713255264)*x[0]+(-0.650225996431)*x[1]
-        arg[0,0,0,1]=(0.177056727607)*x[0]+(-0.486487540393)*x[1]
-        arg[0,0,1,0]=(1.38050234107)*x[0]+(0.273417897264)*x[1]
-        arg[0,0,1,1]=(-1.059824929)*x[0]+(0.432893707387)*x[1]
-        arg[0,0,2,0]=(1.11328992978)*x[0]+(1.14949237037)*x[1]
-        arg[0,0,2,1]=(-0.176459646227)*x[0]+(-0.835980248375)*x[1]
-        arg[0,1,0,0]=(0.992757237392)*x[0]+(0.113511598452)*x[1]
-        arg[0,1,0,1]=(-0.211425610821)*x[0]+(-0.472765285276)*x[1]
-        arg[0,1,1,0]=(-1.52498305232)*x[0]+(-0.869737083114)*x[1]
-        arg[0,1,1,1]=(-0.474203117317)*x[0]+(-0.284532442353)*x[1]
-        arg[0,1,2,0]=(-0.431542961546)*x[0]+(-0.0427397090453)*x[1]
-        arg[0,1,2,1]=(-1.0562625269)*x[0]+(-0.74486767124)*x[1]
-        arg[0,2,0,0]=(1.46553867064)*x[0]+(-0.650182195657)*x[1]
-        arg[0,2,0,1]=(-0.717482663647)*x[0]+(-0.716320000777)*x[1]
-        arg[0,2,1,0]=(-1.21701970743)*x[0]+(0.636901443761)*x[1]
-        arg[0,2,1,1]=(0.438592928507)*x[0]+(0.812362899723)*x[1]
-        arg[0,2,2,0]=(0.104885477141)*x[0]+(-0.127968978832)*x[1]
-        arg[0,2,2,1]=(0.285116712849)*x[0]+(0.169740783305)*x[1]
-        arg[0,3,0,0]=(-1.22825142912)*x[0]+(-0.562911687838)*x[1]
-        arg[0,3,0,1]=(-0.569159534025)*x[0]+(1.30898732707)*x[1]
-        arg[0,3,1,0]=(0.164709387569)*x[0]+(-1.62733582919)*x[1]
-        arg[0,3,1,1]=(-0.477197320128)*x[0]+(-0.115207237191)*x[1]
-        arg[0,3,2,0]=(-0.046871003317)*x[0]+(0.0371149345252)*x[1]
-        arg[0,3,2,1]=(0.839624830979)*x[0]+(0.0785937909827)*x[1]
-        arg[0,4,0,0]=(-0.0250725769598)*x[0]+(-0.535781603767)*x[1]
-        arg[0,4,0,1]=(-0.761849740443)*x[0]+(-0.300714501152)*x[1]
-        arg[0,4,1,0]=(0.0212637838833)*x[0]+(-1.56914428088)*x[1]
-        arg[0,4,1,1]=(-0.254524677425)*x[0]+(0.699288623343)*x[1]
-        arg[0,4,2,0]=(1.14678964272)*x[0]+(1.24738649379)*x[1]
-        arg[0,4,2,1]=(1.80545916472)*x[0]+(1.22689087643)*x[1]
-        arg[1,0,0,0]=(-0.116129927341)*x[0]+(-0.875165834648)*x[1]
-        arg[1,0,0,1]=(-0.49905851236)*x[0]+(-1.10711214732)*x[1]
-        arg[1,0,1,0]=(-1.44706167224)*x[0]+(-1.80259802262)*x[1]
-        arg[1,0,1,1]=(0.555288273554)*x[0]+(0.153437302525)*x[1]
-        arg[1,0,2,0]=(0.00774838569142)*x[0]+(-1.35683757658)*x[1]
-        arg[1,0,2,1]=(-0.625156986286)*x[0]+(-0.201091038824)*x[1]
-        arg[1,1,0,0]=(-0.765068445971)*x[0]+(1.32890117415)*x[1]
-        arg[1,1,0,1]=(-0.629548919312)*x[0]+(-0.0512345513979)*x[1]
-        arg[1,1,1,0]=(-0.361717423775)*x[0]+(0.286169858965)*x[1]
-        arg[1,1,1,1]=(-0.533065922681)*x[0]+(0.103362397133)*x[1]
-        arg[1,1,2,0]=(0.978041972715)*x[0]+(0.405949452109)*x[1]
-        arg[1,1,2,1]=(-1.08418078618)*x[0]+(0.027879770152)*x[1]
-        arg[1,2,0,0]=(1.23545256768)*x[0]+(0.574400116282)*x[1]
-        arg[1,2,0,1]=(0.245362478488)*x[0]+(0.241577755816)*x[1]
-        arg[1,2,1,0]=(0.645309443244)*x[0]+(0.0437773509036)*x[1]
-        arg[1,2,1,1]=(0.00930197364105)*x[0]+(0.472462788946)*x[1]
-        arg[1,2,2,0]=(1.44241534167)*x[0]+(-0.901332994844)*x[1]
-        arg[1,2,2,1]=(0.893335284585)*x[0]+(0.109130146628)*x[1]
-        arg[1,3,0,0]=(0.601907323675)*x[0]+(-1.54057502586)*x[1]
-        arg[1,3,0,1]=(1.38086759376)*x[0]+(0.356522488945)*x[1]
-        arg[1,3,1,0]=(1.16786130652)*x[0]+(-0.788756049484)*x[1]
-        arg[1,3,1,1]=(-0.22580270698)*x[0]+(0.857686971693)*x[1]
-        arg[1,3,2,0]=(0.709549396131)*x[0]+(-0.644330864877)*x[1]
-        arg[1,3,2,1]=(1.04901965211)*x[0]+(0.0178384468958)*x[1]
-        arg[1,4,0,0]=(-0.525050731412)*x[0]+(-0.253639122312)*x[1]
-        arg[1,4,0,1]=(-1.63200911423)*x[0]+(0.519020443372)*x[1]
-        arg[1,4,1,0]=(0.23956666878)*x[0]+(-1.76973024011)*x[1]
-        arg[1,4,1,1]=(-0.412317050346)*x[0]+(-0.391711749094)*x[1]
-        arg[1,4,2,0]=(1.63293176518)*x[0]+(0.583921572851)*x[1]
-        arg[1,4,2,1]=(0.434893659373)*x[0]+(-0.324706930043)*x[1]
-        arg[2,0,0,0]=(0.368478865639)*x[0]+(1.87637158068)*x[1]
-        arg[2,0,0,1]=(1.32519020398)*x[0]+(0.306016568948)*x[1]
-        arg[2,0,1,0]=(-0.284264003593)*x[0]+(-0.899022593367)*x[1]
-        arg[2,0,1,1]=(-0.0439761413236)*x[0]+(-0.696386615358)*x[1]
-        arg[2,0,2,0]=(0.407393812349)*x[0]+(-1.04815464317)*x[1]
-        arg[2,0,2,1]=(-0.956661282071)*x[0]+(0.243281223782)*x[1]
-        arg[2,1,0,0]=(-1.29201911939)*x[0]+(-0.693049706038)*x[1]
-        arg[2,1,0,1]=(-0.711059848853)*x[0]+(-1.14204907272)*x[1]
-        arg[2,1,1,0]=(-0.347693333057)*x[0]+(0.818879269672)*x[1]
-        arg[2,1,1,1]=(0.00742807299875)*x[0]+(0.138845309984)*x[1]
-        arg[2,1,2,0]=(1.13412244048)*x[0]+(-0.481422214102)*x[1]
-        arg[2,1,2,1]=(0.64440302826)*x[0]+(-0.955231893089)*x[1]
-        arg[2,2,0,0]=(0.13123141544)*x[0]+(-0.602266537541)*x[1]
-        arg[2,2,0,1]=(-0.204818071763)*x[0]+(-1.13480248293)*x[1]
-        arg[2,2,1,0]=(0.781058287579)*x[0]+(-1.31936224435)*x[1]
-        arg[2,2,1,1]=(-0.591275351662)*x[0]+(0.691816969517)*x[1]
-        arg[2,2,2,0]=(-0.921964826241)*x[0]+(1.28687075541)*x[1]
-        arg[2,2,2,1]=(0.246260462337)*x[0]+(-1.04699282194)*x[1]
-        arg[2,3,0,0]=(0.264209126513)*x[0]+(-0.697094400566)*x[1]
-        arg[2,3,0,1]=(0.456158298484)*x[0]+(0.0288036445565)*x[1]
-        arg[2,3,1,0]=(-0.720337925392)*x[0]+(0.0965182642186)*x[1]
-        arg[2,3,1,1]=(0.397480419547)*x[0]+(-1.55232798344)*x[1]
-        arg[2,3,2,0]=(-0.337139999283)*x[0]+(0.918809751807)*x[1]
-        arg[2,3,2,1]=(1.34009447198)*x[0]+(-1.41390962018)*x[1]
-        arg[2,4,0,0]=(1.67781838006)*x[0]+(0.521276193814)*x[1]
-        arg[2,4,0,1]=(-0.114014321939)*x[0]+(0.529316778773)*x[1]
-        arg[2,4,1,0]=(-0.19938131807)*x[0]+(-0.0712417614843)*x[1]
-        arg[2,4,1,1]=(-0.724676753871)*x[0]+(0.731341170171)*x[1]
-        arg[2,4,2,0]=(0.988755659656)*x[0]+(-1.0327352189)*x[1]
-        arg[2,4,2,1]=(-0.526286732859)*x[0]+(-1.18295671598)*x[1]
-        arg[3,0,0,0]=(-0.685223304723)*x[0]+(0.508431586068)*x[1]
-        arg[3,0,0,1]=(0.529240274944)*x[0]+(0.77519128969)*x[1]
-        arg[3,0,1,0]=(-0.757098431928)*x[0]+(1.41375812725)*x[1]
-        arg[3,0,1,1]=(1.20805599335)*x[0]+(-0.184660334182)*x[1]
-        arg[3,0,2,0]=(0.718413765561)*x[0]+(0.971149168706)*x[1]
-        arg[3,0,2,1]=(-0.632670534518)*x[0]+(0.0389618967363)*x[1]
-        arg[3,1,0,0]=(-0.525814673755)*x[0]+(0.574122587598)*x[1]
-        arg[3,1,0,1]=(-1.04117288975)*x[0]+(-1.00738089823)*x[1]
-        arg[3,1,1,0]=(0.0312806064182)*x[0]+(-0.30773511847)*x[1]
-        arg[3,1,1,1]=(0.889930889355)*x[0]+(0.833689153489)*x[1]
-        arg[3,1,2,0]=(-1.21586293381)*x[0]+(0.512182349574)*x[1]
-        arg[3,1,2,1]=(-0.00437508755415)*x[0]+(-1.13228664497)*x[1]
-        arg[3,2,0,0]=(1.64174174554)*x[0]+(-0.696500062562)*x[1]
-        arg[3,2,0,1]=(0.0265343210604)*x[0]+(-0.707378716636)*x[1]
-        arg[3,2,1,0]=(0.952922122967)*x[0]+(0.0946904561805)*x[1]
-        arg[3,2,1,1]=(-1.06905266456)*x[0]+(-0.155122789807)*x[1]
-        arg[3,2,2,0]=(-1.14410789976)*x[0]+(-0.379020164446)*x[1]
-        arg[3,2,2,1]=(-0.0922611198553)*x[0]+(1.36680699099)*x[1]
-        arg[3,3,0,0]=(0.849028205422)*x[0]+(-0.968698293811)*x[1]
-        arg[3,3,0,1]=(0.649894718675)*x[0]+(0.238249259292)*x[1]
-        arg[3,3,1,0]=(1.28170508471)*x[0]+(-0.736544947537)*x[1]
-        arg[3,3,1,1]=(-0.188411685414)*x[0]+(1.14145010691)*x[1]
-        arg[3,3,2,0]=(-1.13973037849)*x[0]+(-0.256565914821)*x[1]
-        arg[3,3,2,1]=(0.955478585358)*x[0]+(-0.83417326515)*x[1]
-        arg[3,4,0,0]=(0.155710789468)*x[0]+(0.204956811648)*x[1]
-        arg[3,4,0,1]=(0.567866952974)*x[0]+(-0.168398320099)*x[1]
-        arg[3,4,1,0]=(-1.36997367)*x[0]+(0.141984040172)*x[1]
-        arg[3,4,1,1]=(-0.809532285206)*x[0]+(0.70611485405)*x[1]
-        arg[3,4,2,0]=(-0.453260232051)*x[0]+(0.0665127865858)*x[1]
-        arg[3,4,2,1]=(0.00142021115277)*x[0]+(1.02307505343)*x[1]
-        ref[0,0,0,0]=(-0.261713255264)*x_ref[0]+(-0.650225996431)*x_ref[1]
-        ref[0,0,0,1]=(0.177056727607)*x_ref[0]+(-0.486487540393)*x_ref[1]
-        ref[0,0,1,0]=(1.38050234107)*x_ref[0]+(0.273417897264)*x_ref[1]
-        ref[0,0,1,1]=(-1.059824929)*x_ref[0]+(0.432893707387)*x_ref[1]
-        ref[0,0,2,0]=(1.11328992978)*x_ref[0]+(1.14949237037)*x_ref[1]
-        ref[0,0,2,1]=(-0.176459646227)*x_ref[0]+(-0.835980248375)*x_ref[1]
-        ref[0,1,0,0]=(0.992757237392)*x_ref[0]+(0.113511598452)*x_ref[1]
-        ref[0,1,0,1]=(-0.211425610821)*x_ref[0]+(-0.472765285276)*x_ref[1]
-        ref[0,1,1,0]=(-1.52498305232)*x_ref[0]+(-0.869737083114)*x_ref[1]
-        ref[0,1,1,1]=(-0.474203117317)*x_ref[0]+(-0.284532442353)*x_ref[1]
-        ref[0,1,2,0]=(-0.431542961546)*x_ref[0]+(-0.0427397090453)*x_ref[1]
-        ref[0,1,2,1]=(-1.0562625269)*x_ref[0]+(-0.74486767124)*x_ref[1]
-        ref[0,2,0,0]=(1.46553867064)*x_ref[0]+(-0.650182195657)*x_ref[1]
-        ref[0,2,0,1]=(-0.717482663647)*x_ref[0]+(-0.716320000777)*x_ref[1]
-        ref[0,2,1,0]=(-1.21701970743)*x_ref[0]+(0.636901443761)*x_ref[1]
-        ref[0,2,1,1]=(0.438592928507)*x_ref[0]+(0.812362899723)*x_ref[1]
-        ref[0,2,2,0]=(0.104885477141)*x_ref[0]+(-0.127968978832)*x_ref[1]
-        ref[0,2,2,1]=(0.285116712849)*x_ref[0]+(0.169740783305)*x_ref[1]
-        ref[0,3,0,0]=(-1.22825142912)*x_ref[0]+(-0.562911687838)*x_ref[1]
-        ref[0,3,0,1]=(-0.569159534025)*x_ref[0]+(1.30898732707)*x_ref[1]
-        ref[0,3,1,0]=(0.164709387569)*x_ref[0]+(-1.62733582919)*x_ref[1]
-        ref[0,3,1,1]=(-0.477197320128)*x_ref[0]+(-0.115207237191)*x_ref[1]
-        ref[0,3,2,0]=(-0.046871003317)*x_ref[0]+(0.0371149345252)*x_ref[1]
-        ref[0,3,2,1]=(0.839624830979)*x_ref[0]+(0.0785937909827)*x_ref[1]
-        ref[0,4,0,0]=(-0.0250725769598)*x_ref[0]+(-0.535781603767)*x_ref[1]
-        ref[0,4,0,1]=(-0.761849740443)*x_ref[0]+(-0.300714501152)*x_ref[1]
-        ref[0,4,1,0]=(0.0212637838833)*x_ref[0]+(-1.56914428088)*x_ref[1]
-        ref[0,4,1,1]=(-0.254524677425)*x_ref[0]+(0.699288623343)*x_ref[1]
-        ref[0,4,2,0]=(1.14678964272)*x_ref[0]+(1.24738649379)*x_ref[1]
-        ref[0,4,2,1]=(1.80545916472)*x_ref[0]+(1.22689087643)*x_ref[1]
-        ref[1,0,0,0]=(-0.116129927341)*x_ref[0]+(-0.875165834648)*x_ref[1]
-        ref[1,0,0,1]=(-0.49905851236)*x_ref[0]+(-1.10711214732)*x_ref[1]
-        ref[1,0,1,0]=(-1.44706167224)*x_ref[0]+(-1.80259802262)*x_ref[1]
-        ref[1,0,1,1]=(0.555288273554)*x_ref[0]+(0.153437302525)*x_ref[1]
-        ref[1,0,2,0]=(0.00774838569142)*x_ref[0]+(-1.35683757658)*x_ref[1]
-        ref[1,0,2,1]=(-0.625156986286)*x_ref[0]+(-0.201091038824)*x_ref[1]
-        ref[1,1,0,0]=(-0.765068445971)*x_ref[0]+(1.32890117415)*x_ref[1]
-        ref[1,1,0,1]=(-0.629548919312)*x_ref[0]+(-0.0512345513979)*x_ref[1]
-        ref[1,1,1,0]=(-0.361717423775)*x_ref[0]+(0.286169858965)*x_ref[1]
-        ref[1,1,1,1]=(-0.533065922681)*x_ref[0]+(0.103362397133)*x_ref[1]
-        ref[1,1,2,0]=(0.978041972715)*x_ref[0]+(0.405949452109)*x_ref[1]
-        ref[1,1,2,1]=(-1.08418078618)*x_ref[0]+(0.027879770152)*x_ref[1]
-        ref[1,2,0,0]=(1.23545256768)*x_ref[0]+(0.574400116282)*x_ref[1]
-        ref[1,2,0,1]=(0.245362478488)*x_ref[0]+(0.241577755816)*x_ref[1]
-        ref[1,2,1,0]=(0.645309443244)*x_ref[0]+(0.0437773509036)*x_ref[1]
-        ref[1,2,1,1]=(0.00930197364105)*x_ref[0]+(0.472462788946)*x_ref[1]
-        ref[1,2,2,0]=(1.44241534167)*x_ref[0]+(-0.901332994844)*x_ref[1]
-        ref[1,2,2,1]=(0.893335284585)*x_ref[0]+(0.109130146628)*x_ref[1]
-        ref[1,3,0,0]=(0.601907323675)*x_ref[0]+(-1.54057502586)*x_ref[1]
-        ref[1,3,0,1]=(1.38086759376)*x_ref[0]+(0.356522488945)*x_ref[1]
-        ref[1,3,1,0]=(1.16786130652)*x_ref[0]+(-0.788756049484)*x_ref[1]
-        ref[1,3,1,1]=(-0.22580270698)*x_ref[0]+(0.857686971693)*x_ref[1]
-        ref[1,3,2,0]=(0.709549396131)*x_ref[0]+(-0.644330864877)*x_ref[1]
-        ref[1,3,2,1]=(1.04901965211)*x_ref[0]+(0.0178384468958)*x_ref[1]
-        ref[1,4,0,0]=(-0.525050731412)*x_ref[0]+(-0.253639122312)*x_ref[1]
-        ref[1,4,0,1]=(-1.63200911423)*x_ref[0]+(0.519020443372)*x_ref[1]
-        ref[1,4,1,0]=(0.23956666878)*x_ref[0]+(-1.76973024011)*x_ref[1]
-        ref[1,4,1,1]=(-0.412317050346)*x_ref[0]+(-0.391711749094)*x_ref[1]
-        ref[1,4,2,0]=(1.63293176518)*x_ref[0]+(0.583921572851)*x_ref[1]
-        ref[1,4,2,1]=(0.434893659373)*x_ref[0]+(-0.324706930043)*x_ref[1]
-        ref[2,0,0,0]=(0.368478865639)*x_ref[0]+(1.87637158068)*x_ref[1]
-        ref[2,0,0,1]=(1.32519020398)*x_ref[0]+(0.306016568948)*x_ref[1]
-        ref[2,0,1,0]=(-0.284264003593)*x_ref[0]+(-0.899022593367)*x_ref[1]
-        ref[2,0,1,1]=(-0.0439761413236)*x_ref[0]+(-0.696386615358)*x_ref[1]
-        ref[2,0,2,0]=(0.407393812349)*x_ref[0]+(-1.04815464317)*x_ref[1]
-        ref[2,0,2,1]=(-0.956661282071)*x_ref[0]+(0.243281223782)*x_ref[1]
-        ref[2,1,0,0]=(-1.29201911939)*x_ref[0]+(-0.693049706038)*x_ref[1]
-        ref[2,1,0,1]=(-0.711059848853)*x_ref[0]+(-1.14204907272)*x_ref[1]
-        ref[2,1,1,0]=(-0.347693333057)*x_ref[0]+(0.818879269672)*x_ref[1]
-        ref[2,1,1,1]=(0.00742807299875)*x_ref[0]+(0.138845309984)*x_ref[1]
-        ref[2,1,2,0]=(1.13412244048)*x_ref[0]+(-0.481422214102)*x_ref[1]
-        ref[2,1,2,1]=(0.64440302826)*x_ref[0]+(-0.955231893089)*x_ref[1]
-        ref[2,2,0,0]=(0.13123141544)*x_ref[0]+(-0.602266537541)*x_ref[1]
-        ref[2,2,0,1]=(-0.204818071763)*x_ref[0]+(-1.13480248293)*x_ref[1]
-        ref[2,2,1,0]=(0.781058287579)*x_ref[0]+(-1.31936224435)*x_ref[1]
-        ref[2,2,1,1]=(-0.591275351662)*x_ref[0]+(0.691816969517)*x_ref[1]
-        ref[2,2,2,0]=(-0.921964826241)*x_ref[0]+(1.28687075541)*x_ref[1]
-        ref[2,2,2,1]=(0.246260462337)*x_ref[0]+(-1.04699282194)*x_ref[1]
-        ref[2,3,0,0]=(0.264209126513)*x_ref[0]+(-0.697094400566)*x_ref[1]
-        ref[2,3,0,1]=(0.456158298484)*x_ref[0]+(0.0288036445565)*x_ref[1]
-        ref[2,3,1,0]=(-0.720337925392)*x_ref[0]+(0.0965182642186)*x_ref[1]
-        ref[2,3,1,1]=(0.397480419547)*x_ref[0]+(-1.55232798344)*x_ref[1]
-        ref[2,3,2,0]=(-0.337139999283)*x_ref[0]+(0.918809751807)*x_ref[1]
-        ref[2,3,2,1]=(1.34009447198)*x_ref[0]+(-1.41390962018)*x_ref[1]
-        ref[2,4,0,0]=(1.67781838006)*x_ref[0]+(0.521276193814)*x_ref[1]
-        ref[2,4,0,1]=(-0.114014321939)*x_ref[0]+(0.529316778773)*x_ref[1]
-        ref[2,4,1,0]=(-0.19938131807)*x_ref[0]+(-0.0712417614843)*x_ref[1]
-        ref[2,4,1,1]=(-0.724676753871)*x_ref[0]+(0.731341170171)*x_ref[1]
-        ref[2,4,2,0]=(0.988755659656)*x_ref[0]+(-1.0327352189)*x_ref[1]
-        ref[2,4,2,1]=(-0.526286732859)*x_ref[0]+(-1.18295671598)*x_ref[1]
-        ref[3,0,0,0]=(-0.685223304723)*x_ref[0]+(0.508431586068)*x_ref[1]
-        ref[3,0,0,1]=(0.529240274944)*x_ref[0]+(0.77519128969)*x_ref[1]
-        ref[3,0,1,0]=(-0.757098431928)*x_ref[0]+(1.41375812725)*x_ref[1]
-        ref[3,0,1,1]=(1.20805599335)*x_ref[0]+(-0.184660334182)*x_ref[1]
-        ref[3,0,2,0]=(0.718413765561)*x_ref[0]+(0.971149168706)*x_ref[1]
-        ref[3,0,2,1]=(-0.632670534518)*x_ref[0]+(0.0389618967363)*x_ref[1]
-        ref[3,1,0,0]=(-0.525814673755)*x_ref[0]+(0.574122587598)*x_ref[1]
-        ref[3,1,0,1]=(-1.04117288975)*x_ref[0]+(-1.00738089823)*x_ref[1]
-        ref[3,1,1,0]=(0.0312806064182)*x_ref[0]+(-0.30773511847)*x_ref[1]
-        ref[3,1,1,1]=(0.889930889355)*x_ref[0]+(0.833689153489)*x_ref[1]
-        ref[3,1,2,0]=(-1.21586293381)*x_ref[0]+(0.512182349574)*x_ref[1]
-        ref[3,1,2,1]=(-0.00437508755415)*x_ref[0]+(-1.13228664497)*x_ref[1]
-        ref[3,2,0,0]=(1.64174174554)*x_ref[0]+(-0.696500062562)*x_ref[1]
-        ref[3,2,0,1]=(0.0265343210604)*x_ref[0]+(-0.707378716636)*x_ref[1]
-        ref[3,2,1,0]=(0.952922122967)*x_ref[0]+(0.0946904561805)*x_ref[1]
-        ref[3,2,1,1]=(-1.06905266456)*x_ref[0]+(-0.155122789807)*x_ref[1]
-        ref[3,2,2,0]=(-1.14410789976)*x_ref[0]+(-0.379020164446)*x_ref[1]
-        ref[3,2,2,1]=(-0.0922611198553)*x_ref[0]+(1.36680699099)*x_ref[1]
-        ref[3,3,0,0]=(0.849028205422)*x_ref[0]+(-0.968698293811)*x_ref[1]
-        ref[3,3,0,1]=(0.649894718675)*x_ref[0]+(0.238249259292)*x_ref[1]
-        ref[3,3,1,0]=(1.28170508471)*x_ref[0]+(-0.736544947537)*x_ref[1]
-        ref[3,3,1,1]=(-0.188411685414)*x_ref[0]+(1.14145010691)*x_ref[1]
-        ref[3,3,2,0]=(-1.13973037849)*x_ref[0]+(-0.256565914821)*x_ref[1]
-        ref[3,3,2,1]=(0.955478585358)*x_ref[0]+(-0.83417326515)*x_ref[1]
-        ref[3,4,0,0]=(0.155710789468)*x_ref[0]+(0.204956811648)*x_ref[1]
-        ref[3,4,0,1]=(0.567866952974)*x_ref[0]+(-0.168398320099)*x_ref[1]
-        ref[3,4,1,0]=(-1.36997367)*x_ref[0]+(0.141984040172)*x_ref[1]
-        ref[3,4,1,1]=(-0.809532285206)*x_ref[0]+(0.70611485405)*x_ref[1]
-        ref[3,4,2,0]=(-0.453260232051)*x_ref[0]+(0.0665127865858)*x_ref[1]
-        ref[3,4,2,1]=(0.00142021115277)*x_ref[0]+(1.02307505343)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.59037121238)*x[0]+(-0.432259357387)*x[1]+(1.06313464506)*x[2]
-        arg[0,0,0,1]=(-0.29317617186)*x[0]+(-0.477878024138)*x[1]+(-0.943279870083)*x[2]
-        arg[0,0,1,0]=(-0.0140970955833)*x[0]+(0.141752937281)*x[1]+(0.46748311988)*x[2]
-        arg[0,0,1,1]=(1.06645552756)*x[0]+(-1.4360320823)*x[1]+(-1.05643251873)*x[2]
-        arg[0,0,2,0]=(-0.527854671619)*x[0]+(0.68918711423)*x[1]+(0.225750468582)*x[2]
-        arg[0,0,2,1]=(0.765285169635)*x[0]+(-0.292098568154)*x[1]+(-0.611702446821)*x[2]
-        arg[0,1,0,0]=(0.472029729041)*x[0]+(-0.391383508709)*x[1]+(-0.0882199174494)*x[2]
-        arg[0,1,0,1]=(1.76010861737)*x[0]+(1.40668629263)*x[1]+(-0.171024087043)*x[2]
-        arg[0,1,1,0]=(0.251929705017)*x[0]+(-0.326420063624)*x[1]+(-0.337849942832)*x[2]
-        arg[0,1,1,1]=(0.049289902392)*x[0]+(1.61775987596)*x[1]+(0.545741506198)*x[2]
-        arg[0,1,2,0]=(-0.500710333189)*x[0]+(-0.551222136922)*x[1]+(0.665856619864)*x[2]
-        arg[0,1,2,1]=(0.271547935249)*x[0]+(0.46154733209)*x[1]+(0.0776993672589)*x[2]
-        arg[0,2,0,0]=(0.46744023541)*x[0]+(0.281754164985)*x[1]+(0.11721465855)*x[2]
-        arg[0,2,0,1]=(0.58865724402)*x[0]+(-0.280911783535)*x[1]+(0.793461201474)*x[2]
-        arg[0,2,1,0]=(-0.348215254122)*x[0]+(-0.274357607001)*x[1]+(-0.975813503666)*x[2]
-        arg[0,2,1,1]=(-0.546269224094)*x[0]+(0.54132986357)*x[1]+(-0.346797273682)*x[2]
-        arg[0,2,2,0]=(0.956395362583)*x[0]+(-0.609333787208)*x[1]+(-0.86408067145)*x[2]
-        arg[0,2,2,1]=(0.570075324955)*x[0]+(-0.251638346903)*x[1]+(0.292841304398)*x[2]
-        arg[0,3,0,0]=(-0.240717117869)*x[0]+(0.571307481772)*x[1]+(0.66826910816)*x[2]
-        arg[0,3,0,1]=(0.113871023723)*x[0]+(0.022498355636)*x[1]+(0.95331234379)*x[2]
-        arg[0,3,1,0]=(-0.264946899001)*x[0]+(1.08412373438)*x[1]+(-1.10548347411)*x[2]
-        arg[0,3,1,1]=(-0.744510132854)*x[0]+(-0.716638983187)*x[1]+(0.64330838226)*x[2]
-        arg[0,3,2,0]=(1.15237343787)*x[0]+(-1.42565901229)*x[1]+(0.727585401396)*x[2]
-        arg[0,3,2,1]=(-0.251464863627)*x[0]+(1.4067624912)*x[1]+(0.674418739118)*x[2]
-        arg[0,4,0,0]=(-0.00551820316191)*x[0]+(0.193862853101)*x[1]+(1.8004924522)*x[2]
-        arg[0,4,0,1]=(-0.985879358916)*x[0]+(0.476965815991)*x[1]+(0.96363449822)*x[2]
-        arg[0,4,1,0]=(-0.657967361584)*x[0]+(0.833452284341)*x[1]+(-1.40128003822)*x[2]
-        arg[0,4,1,1]=(0.301379967988)*x[0]+(0.0474545542353)*x[1]+(-0.633087920569)*x[2]
-        arg[0,4,2,0]=(-1.94409755409)*x[0]+(-0.468638363928)*x[1]+(-0.713880237452)*x[2]
-        arg[0,4,2,1]=(-1.13536316065)*x[0]+(-0.250761280127)*x[1]+(0.328722833182)*x[2]
-        arg[1,0,0,0]=(0.556886266554)*x[0]+(-0.70523094638)*x[1]+(-0.333621268224)*x[2]
-        arg[1,0,0,1]=(-0.995565683628)*x[0]+(-0.158120855239)*x[1]+(0.0738870470169)*x[2]
-        arg[1,0,1,0]=(-0.209556712574)*x[0]+(0.54393408711)*x[1]+(-1.1617498966)*x[2]
-        arg[1,0,1,1]=(0.666809649924)*x[0]+(1.18555984779)*x[1]+(-0.442831598796)*x[2]
-        arg[1,0,2,0]=(-0.21354395591)*x[0]+(-0.634626698269)*x[1]+(1.25643757008)*x[2]
-        arg[1,0,2,1]=(-0.676259187073)*x[0]+(-0.458532774397)*x[1]+(0.271156919902)*x[2]
-        arg[1,1,0,0]=(-1.45529139262)*x[0]+(0.311382249732)*x[1]+(-0.134620909882)*x[2]
-        arg[1,1,0,1]=(-1.47708829198)*x[0]+(0.968291536601)*x[1]+(-0.566606887608)*x[2]
-        arg[1,1,1,0]=(1.18904329045)*x[0]+(-0.209072247061)*x[1]+(-0.26261457093)*x[2]
-        arg[1,1,1,1]=(0.313723817215)*x[0]+(-0.169177309423)*x[1]+(-0.00119161234247)*x[2]
-        arg[1,1,2,0]=(0.431298197457)*x[0]+(0.264113678484)*x[1]+(0.192619025313)*x[2]
-        arg[1,1,2,1]=(0.0469221259627)*x[0]+(1.53477696238)*x[1]+(0.00794662724457)*x[2]
-        arg[1,2,0,0]=(0.102179220279)*x[0]+(-0.391365988191)*x[1]+(0.302910557263)*x[2]
-        arg[1,2,0,1]=(0.841803002697)*x[0]+(0.581539244301)*x[1]+(0.00409108885792)*x[2]
-        arg[1,2,1,0]=(0.0840378161144)*x[0]+(-0.431329807551)*x[1]+(-1.0774029159)*x[2]
-        arg[1,2,1,1]=(-0.270803943532)*x[0]+(0.0124514531652)*x[1]+(0.197735227059)*x[2]
-        arg[1,2,2,0]=(0.479336250918)*x[0]+(0.0435331360815)*x[1]+(0.458048853417)*x[2]
-        arg[1,2,2,1]=(-0.59916419564)*x[0]+(0.415546807791)*x[1]+(-1.12105410423)*x[2]
-        arg[1,3,0,0]=(0.378277354507)*x[0]+(1.00734343779)*x[1]+(-0.282811389334)*x[2]
-        arg[1,3,0,1]=(0.717420487474)*x[0]+(-0.730395427407)*x[1]+(1.63850706843)*x[2]
-        arg[1,3,1,0]=(-0.0126954991872)*x[0]+(-1.35916858377)*x[1]+(-0.955731750212)*x[2]
-        arg[1,3,1,1]=(-0.560951559862)*x[0]+(0.271085100351)*x[1]+(0.60767567276)*x[2]
-        arg[1,3,2,0]=(-0.73286080289)*x[0]+(-1.12018839274)*x[1]+(0.365586479937)*x[2]
-        arg[1,3,2,1]=(-0.495391543232)*x[0]+(-0.404605421036)*x[1]+(1.21261493791)*x[2]
-        arg[1,4,0,0]=(-0.322147956238)*x[0]+(0.278257549185)*x[1]+(-0.927648624956)*x[2]
-        arg[1,4,0,1]=(1.23243511737)*x[0]+(1.38355111729)*x[1]+(0.0813739945129)*x[2]
-        arg[1,4,1,0]=(0.668384291635)*x[0]+(0.995328961231)*x[1]+(0.803009543307)*x[2]
-        arg[1,4,1,1]=(1.42643018603)*x[0]+(0.940855692156)*x[1]+(0.277556451163)*x[2]
-        arg[1,4,2,0]=(0.489588226757)*x[0]+(-1.63608809124)*x[1]+(-0.262918068522)*x[2]
-        arg[1,4,2,1]=(-1.06922340601)*x[0]+(-0.0241938384008)*x[1]+(-0.244107290038)*x[2]
-        arg[2,0,0,0]=(-0.556338154459)*x[0]+(0.12071126785)*x[1]+(0.11215804852)*x[2]
-        arg[2,0,0,1]=(-0.479017339774)*x[0]+(-0.530313718209)*x[1]+(0.490083551372)*x[2]
-        arg[2,0,1,0]=(0.731269264444)*x[0]+(0.245793038193)*x[1]+(0.0479833912422)*x[2]
-        arg[2,0,1,1]=(-0.286189382681)*x[0]+(0.601756275554)*x[1]+(-0.559334203137)*x[2]
-        arg[2,0,2,0]=(-0.876495720673)*x[0]+(0.592513223261)*x[1]+(0.844551261652)*x[2]
-        arg[2,0,2,1]=(1.22915142187)*x[0]+(0.136223623577)*x[1]+(0.88656874029)*x[2]
-        arg[2,1,0,0]=(0.542222650916)*x[0]+(-0.709719163926)*x[1]+(0.262207188498)*x[2]
-        arg[2,1,0,1]=(-0.208896980258)*x[0]+(1.33968890395)*x[1]+(-0.599621090138)*x[2]
-        arg[2,1,1,0]=(-0.171147406604)*x[0]+(0.332227749427)*x[1]+(1.15043521586)*x[2]
-        arg[2,1,1,1]=(0.571607567027)*x[0]+(0.1367434941)*x[1]+(1.47797159814)*x[2]
-        arg[2,1,2,0]=(0.839845574634)*x[0]+(0.732437808234)*x[1]+(-0.0311071654701)*x[2]
-        arg[2,1,2,1]=(1.45193213653)*x[0]+(-0.0192312612414)*x[1]+(0.308521161282)*x[2]
-        arg[2,2,0,0]=(-0.122755384028)*x[0]+(0.133510038844)*x[1]+(0.837213365425)*x[2]
-        arg[2,2,0,1]=(-0.411967923958)*x[0]+(-0.955489021071)*x[1]+(0.269005602186)*x[2]
-        arg[2,2,1,0]=(-1.19993089382)*x[0]+(0.276541296246)*x[1]+(0.523388479396)*x[2]
-        arg[2,2,1,1]=(0.0586514653869)*x[0]+(-0.624975232742)*x[1]+(-1.55738876751)*x[2]
-        arg[2,2,2,0]=(-0.892065938887)*x[0]+(-0.4848241954)*x[1]+(0.315463883511)*x[2]
-        arg[2,2,2,1]=(0.0272963181118)*x[0]+(0.0187713454669)*x[1]+(-1.06524661854)*x[2]
-        arg[2,3,0,0]=(-1.44099287886)*x[0]+(0.495718421075)*x[1]+(0.100401960223)*x[2]
-        arg[2,3,0,1]=(0.171175119412)*x[0]+(-1.34795558607)*x[1]+(-0.361766653264)*x[2]
-        arg[2,3,1,0]=(-1.80591882588)*x[0]+(-0.511459455136)*x[1]+(-0.491310264055)*x[2]
-        arg[2,3,1,1]=(-0.419508934622)*x[0]+(-1.12084042844)*x[1]+(-0.086947672548)*x[2]
-        arg[2,3,2,0]=(0.492388303934)*x[0]+(-0.623505828597)*x[1]+(1.6965873745)*x[2]
-        arg[2,3,2,1]=(1.59203810356)*x[0]+(0.36918142231)*x[1]+(-1.90067115052)*x[2]
-        arg[2,4,0,0]=(1.00875649298)*x[0]+(-1.43246384934)*x[1]+(-0.51811906593)*x[2]
-        arg[2,4,0,1]=(0.260118918034)*x[0]+(-1.57606061865)*x[1]+(-0.79257165655)*x[2]
-        arg[2,4,1,0]=(0.954414074467)*x[0]+(-0.230132876613)*x[1]+(0.0956378957424)*x[2]
-        arg[2,4,1,1]=(0.958843806364)*x[0]+(-0.155804429995)*x[1]+(-1.02904877039)*x[2]
-        arg[2,4,2,0]=(0.252668700811)*x[0]+(0.164829885749)*x[1]+(0.747032722421)*x[2]
-        arg[2,4,2,1]=(1.96393052323)*x[0]+(-0.821363958807)*x[1]+(-1.01663555063)*x[2]
-        arg[3,0,0,0]=(1.58086037053)*x[0]+(-1.66495295611)*x[1]+(-0.510526191383)*x[2]
-        arg[3,0,0,1]=(-0.931871976029)*x[0]+(1.33102205125)*x[1]+(-0.95170580468)*x[2]
-        arg[3,0,1,0]=(0.99825404115)*x[0]+(0.915274413552)*x[1]+(1.5057227674)*x[2]
-        arg[3,0,1,1]=(0.0485551924989)*x[0]+(-1.0877405758)*x[1]+(-0.887342573702)*x[2]
-        arg[3,0,2,0]=(-0.745146140677)*x[0]+(-0.0108141266015)*x[1]+(0.194597576308)*x[2]
-        arg[3,0,2,1]=(-0.935029218338)*x[0]+(0.726322809025)*x[1]+(0.57508467103)*x[2]
-        arg[3,1,0,0]=(0.115668237156)*x[0]+(0.0970255991906)*x[1]+(-0.227291123547)*x[2]
-        arg[3,1,0,1]=(0.167722335863)*x[0]+(-0.552168424291)*x[1]+(1.36293027463)*x[2]
-        arg[3,1,1,0]=(-1.05781878028)*x[0]+(-0.0429389047972)*x[1]+(-0.257166337509)*x[2]
-        arg[3,1,1,1]=(0.129148486118)*x[0]+(-0.0209434899369)*x[1]+(0.253153005253)*x[2]
-        arg[3,1,2,0]=(1.3236615365)*x[0]+(-1.18164469224)*x[1]+(0.698012697426)*x[2]
-        arg[3,1,2,1]=(1.10438661886)*x[0]+(-0.852903948395)*x[1]+(1.40365162024)*x[2]
-        arg[3,2,0,0]=(-0.949308009957)*x[0]+(1.01993206161)*x[1]+(-0.821721697476)*x[2]
-        arg[3,2,0,1]=(0.326450662787)*x[0]+(0.395096088107)*x[1]+(-0.368904800584)*x[2]
-        arg[3,2,1,0]=(0.13107780566)*x[0]+(-0.342904134623)*x[1]+(0.00835087701185)*x[2]
-        arg[3,2,1,1]=(-0.500694550647)*x[0]+(1.38322390003)*x[1]+(0.0576453183412)*x[2]
-        arg[3,2,2,0]=(-1.32014489811)*x[0]+(-0.444079317864)*x[1]+(1.1135946018)*x[2]
-        arg[3,2,2,1]=(-0.19593105007)*x[0]+(-0.00224390969377)*x[1]+(-0.73869338942)*x[2]
-        arg[3,3,0,0]=(0.0151201622255)*x[0]+(-1.10873788153)*x[1]+(0.189116254832)*x[2]
-        arg[3,3,0,1]=(1.05996205566)*x[0]+(0.398465639867)*x[1]+(-0.319773104448)*x[2]
-        arg[3,3,1,0]=(0.687612827243)*x[0]+(1.10970823257)*x[1]+(1.02543288975)*x[2]
-        arg[3,3,1,1]=(1.27258509981)*x[0]+(-1.7060826391)*x[1]+(-0.84948812227)*x[2]
-        arg[3,3,2,0]=(1.2343036886)*x[0]+(0.521090253023)*x[1]+(-1.13377412954)*x[2]
-        arg[3,3,2,1]=(-0.65568738385)*x[0]+(1.00354617712)*x[1]+(0.836719015812)*x[2]
-        arg[3,4,0,0]=(-0.545324078594)*x[0]+(0.452747782208)*x[1]+(-1.59718954237)*x[2]
-        arg[3,4,0,1]=(1.71651153317)*x[0]+(-0.161984538787)*x[1]+(-0.377244827904)*x[2]
-        arg[3,4,1,0]=(-0.284033324558)*x[0]+(-0.405941433062)*x[1]+(0.824573264594)*x[2]
-        arg[3,4,1,1]=(-0.112542702803)*x[0]+(-0.470814805786)*x[1]+(-0.827427436576)*x[2]
-        arg[3,4,2,0]=(-0.763655132981)*x[0]+(-0.442818775864)*x[1]+(0.809814510041)*x[2]
-        arg[3,4,2,1]=(-0.33794306298)*x[0]+(1.91169591332)*x[1]+(-0.487268088196)*x[2]
-        ref[0,0,0,0]=(-0.59037121238)*x_ref[0]+(-0.432259357387)*x_ref[1]+(1.06313464506)*x_ref[2]
-        ref[0,0,0,1]=(-0.29317617186)*x_ref[0]+(-0.477878024138)*x_ref[1]+(-0.943279870083)*x_ref[2]
-        ref[0,0,1,0]=(-0.0140970955833)*x_ref[0]+(0.141752937281)*x_ref[1]+(0.46748311988)*x_ref[2]
-        ref[0,0,1,1]=(1.06645552756)*x_ref[0]+(-1.4360320823)*x_ref[1]+(-1.05643251873)*x_ref[2]
-        ref[0,0,2,0]=(-0.527854671619)*x_ref[0]+(0.68918711423)*x_ref[1]+(0.225750468582)*x_ref[2]
-        ref[0,0,2,1]=(0.765285169635)*x_ref[0]+(-0.292098568154)*x_ref[1]+(-0.611702446821)*x_ref[2]
-        ref[0,1,0,0]=(0.472029729041)*x_ref[0]+(-0.391383508709)*x_ref[1]+(-0.0882199174494)*x_ref[2]
-        ref[0,1,0,1]=(1.76010861737)*x_ref[0]+(1.40668629263)*x_ref[1]+(-0.171024087043)*x_ref[2]
-        ref[0,1,1,0]=(0.251929705017)*x_ref[0]+(-0.326420063624)*x_ref[1]+(-0.337849942832)*x_ref[2]
-        ref[0,1,1,1]=(0.049289902392)*x_ref[0]+(1.61775987596)*x_ref[1]+(0.545741506198)*x_ref[2]
-        ref[0,1,2,0]=(-0.500710333189)*x_ref[0]+(-0.551222136922)*x_ref[1]+(0.665856619864)*x_ref[2]
-        ref[0,1,2,1]=(0.271547935249)*x_ref[0]+(0.46154733209)*x_ref[1]+(0.0776993672589)*x_ref[2]
-        ref[0,2,0,0]=(0.46744023541)*x_ref[0]+(0.281754164985)*x_ref[1]+(0.11721465855)*x_ref[2]
-        ref[0,2,0,1]=(0.58865724402)*x_ref[0]+(-0.280911783535)*x_ref[1]+(0.793461201474)*x_ref[2]
-        ref[0,2,1,0]=(-0.348215254122)*x_ref[0]+(-0.274357607001)*x_ref[1]+(-0.975813503666)*x_ref[2]
-        ref[0,2,1,1]=(-0.546269224094)*x_ref[0]+(0.54132986357)*x_ref[1]+(-0.346797273682)*x_ref[2]
-        ref[0,2,2,0]=(0.956395362583)*x_ref[0]+(-0.609333787208)*x_ref[1]+(-0.86408067145)*x_ref[2]
-        ref[0,2,2,1]=(0.570075324955)*x_ref[0]+(-0.251638346903)*x_ref[1]+(0.292841304398)*x_ref[2]
-        ref[0,3,0,0]=(-0.240717117869)*x_ref[0]+(0.571307481772)*x_ref[1]+(0.66826910816)*x_ref[2]
-        ref[0,3,0,1]=(0.113871023723)*x_ref[0]+(0.022498355636)*x_ref[1]+(0.95331234379)*x_ref[2]
-        ref[0,3,1,0]=(-0.264946899001)*x_ref[0]+(1.08412373438)*x_ref[1]+(-1.10548347411)*x_ref[2]
-        ref[0,3,1,1]=(-0.744510132854)*x_ref[0]+(-0.716638983187)*x_ref[1]+(0.64330838226)*x_ref[2]
-        ref[0,3,2,0]=(1.15237343787)*x_ref[0]+(-1.42565901229)*x_ref[1]+(0.727585401396)*x_ref[2]
-        ref[0,3,2,1]=(-0.251464863627)*x_ref[0]+(1.4067624912)*x_ref[1]+(0.674418739118)*x_ref[2]
-        ref[0,4,0,0]=(-0.00551820316191)*x_ref[0]+(0.193862853101)*x_ref[1]+(1.8004924522)*x_ref[2]
-        ref[0,4,0,1]=(-0.985879358916)*x_ref[0]+(0.476965815991)*x_ref[1]+(0.96363449822)*x_ref[2]
-        ref[0,4,1,0]=(-0.657967361584)*x_ref[0]+(0.833452284341)*x_ref[1]+(-1.40128003822)*x_ref[2]
-        ref[0,4,1,1]=(0.301379967988)*x_ref[0]+(0.0474545542353)*x_ref[1]+(-0.633087920569)*x_ref[2]
-        ref[0,4,2,0]=(-1.94409755409)*x_ref[0]+(-0.468638363928)*x_ref[1]+(-0.713880237452)*x_ref[2]
-        ref[0,4,2,1]=(-1.13536316065)*x_ref[0]+(-0.250761280127)*x_ref[1]+(0.328722833182)*x_ref[2]
-        ref[1,0,0,0]=(0.556886266554)*x_ref[0]+(-0.70523094638)*x_ref[1]+(-0.333621268224)*x_ref[2]
-        ref[1,0,0,1]=(-0.995565683628)*x_ref[0]+(-0.158120855239)*x_ref[1]+(0.0738870470169)*x_ref[2]
-        ref[1,0,1,0]=(-0.209556712574)*x_ref[0]+(0.54393408711)*x_ref[1]+(-1.1617498966)*x_ref[2]
-        ref[1,0,1,1]=(0.666809649924)*x_ref[0]+(1.18555984779)*x_ref[1]+(-0.442831598796)*x_ref[2]
-        ref[1,0,2,0]=(-0.21354395591)*x_ref[0]+(-0.634626698269)*x_ref[1]+(1.25643757008)*x_ref[2]
-        ref[1,0,2,1]=(-0.676259187073)*x_ref[0]+(-0.458532774397)*x_ref[1]+(0.271156919902)*x_ref[2]
-        ref[1,1,0,0]=(-1.45529139262)*x_ref[0]+(0.311382249732)*x_ref[1]+(-0.134620909882)*x_ref[2]
-        ref[1,1,0,1]=(-1.47708829198)*x_ref[0]+(0.968291536601)*x_ref[1]+(-0.566606887608)*x_ref[2]
-        ref[1,1,1,0]=(1.18904329045)*x_ref[0]+(-0.209072247061)*x_ref[1]+(-0.26261457093)*x_ref[2]
-        ref[1,1,1,1]=(0.313723817215)*x_ref[0]+(-0.169177309423)*x_ref[1]+(-0.00119161234247)*x_ref[2]
-        ref[1,1,2,0]=(0.431298197457)*x_ref[0]+(0.264113678484)*x_ref[1]+(0.192619025313)*x_ref[2]
-        ref[1,1,2,1]=(0.0469221259627)*x_ref[0]+(1.53477696238)*x_ref[1]+(0.00794662724457)*x_ref[2]
-        ref[1,2,0,0]=(0.102179220279)*x_ref[0]+(-0.391365988191)*x_ref[1]+(0.302910557263)*x_ref[2]
-        ref[1,2,0,1]=(0.841803002697)*x_ref[0]+(0.581539244301)*x_ref[1]+(0.00409108885792)*x_ref[2]
-        ref[1,2,1,0]=(0.0840378161144)*x_ref[0]+(-0.431329807551)*x_ref[1]+(-1.0774029159)*x_ref[2]
-        ref[1,2,1,1]=(-0.270803943532)*x_ref[0]+(0.0124514531652)*x_ref[1]+(0.197735227059)*x_ref[2]
-        ref[1,2,2,0]=(0.479336250918)*x_ref[0]+(0.0435331360815)*x_ref[1]+(0.458048853417)*x_ref[2]
-        ref[1,2,2,1]=(-0.59916419564)*x_ref[0]+(0.415546807791)*x_ref[1]+(-1.12105410423)*x_ref[2]
-        ref[1,3,0,0]=(0.378277354507)*x_ref[0]+(1.00734343779)*x_ref[1]+(-0.282811389334)*x_ref[2]
-        ref[1,3,0,1]=(0.717420487474)*x_ref[0]+(-0.730395427407)*x_ref[1]+(1.63850706843)*x_ref[2]
-        ref[1,3,1,0]=(-0.0126954991872)*x_ref[0]+(-1.35916858377)*x_ref[1]+(-0.955731750212)*x_ref[2]
-        ref[1,3,1,1]=(-0.560951559862)*x_ref[0]+(0.271085100351)*x_ref[1]+(0.60767567276)*x_ref[2]
-        ref[1,3,2,0]=(-0.73286080289)*x_ref[0]+(-1.12018839274)*x_ref[1]+(0.365586479937)*x_ref[2]
-        ref[1,3,2,1]=(-0.495391543232)*x_ref[0]+(-0.404605421036)*x_ref[1]+(1.21261493791)*x_ref[2]
-        ref[1,4,0,0]=(-0.322147956238)*x_ref[0]+(0.278257549185)*x_ref[1]+(-0.927648624956)*x_ref[2]
-        ref[1,4,0,1]=(1.23243511737)*x_ref[0]+(1.38355111729)*x_ref[1]+(0.0813739945129)*x_ref[2]
-        ref[1,4,1,0]=(0.668384291635)*x_ref[0]+(0.995328961231)*x_ref[1]+(0.803009543307)*x_ref[2]
-        ref[1,4,1,1]=(1.42643018603)*x_ref[0]+(0.940855692156)*x_ref[1]+(0.277556451163)*x_ref[2]
-        ref[1,4,2,0]=(0.489588226757)*x_ref[0]+(-1.63608809124)*x_ref[1]+(-0.262918068522)*x_ref[2]
-        ref[1,4,2,1]=(-1.06922340601)*x_ref[0]+(-0.0241938384008)*x_ref[1]+(-0.244107290038)*x_ref[2]
-        ref[2,0,0,0]=(-0.556338154459)*x_ref[0]+(0.12071126785)*x_ref[1]+(0.11215804852)*x_ref[2]
-        ref[2,0,0,1]=(-0.479017339774)*x_ref[0]+(-0.530313718209)*x_ref[1]+(0.490083551372)*x_ref[2]
-        ref[2,0,1,0]=(0.731269264444)*x_ref[0]+(0.245793038193)*x_ref[1]+(0.0479833912422)*x_ref[2]
-        ref[2,0,1,1]=(-0.286189382681)*x_ref[0]+(0.601756275554)*x_ref[1]+(-0.559334203137)*x_ref[2]
-        ref[2,0,2,0]=(-0.876495720673)*x_ref[0]+(0.592513223261)*x_ref[1]+(0.844551261652)*x_ref[2]
-        ref[2,0,2,1]=(1.22915142187)*x_ref[0]+(0.136223623577)*x_ref[1]+(0.88656874029)*x_ref[2]
-        ref[2,1,0,0]=(0.542222650916)*x_ref[0]+(-0.709719163926)*x_ref[1]+(0.262207188498)*x_ref[2]
-        ref[2,1,0,1]=(-0.208896980258)*x_ref[0]+(1.33968890395)*x_ref[1]+(-0.599621090138)*x_ref[2]
-        ref[2,1,1,0]=(-0.171147406604)*x_ref[0]+(0.332227749427)*x_ref[1]+(1.15043521586)*x_ref[2]
-        ref[2,1,1,1]=(0.571607567027)*x_ref[0]+(0.1367434941)*x_ref[1]+(1.47797159814)*x_ref[2]
-        ref[2,1,2,0]=(0.839845574634)*x_ref[0]+(0.732437808234)*x_ref[1]+(-0.0311071654701)*x_ref[2]
-        ref[2,1,2,1]=(1.45193213653)*x_ref[0]+(-0.0192312612414)*x_ref[1]+(0.308521161282)*x_ref[2]
-        ref[2,2,0,0]=(-0.122755384028)*x_ref[0]+(0.133510038844)*x_ref[1]+(0.837213365425)*x_ref[2]
-        ref[2,2,0,1]=(-0.411967923958)*x_ref[0]+(-0.955489021071)*x_ref[1]+(0.269005602186)*x_ref[2]
-        ref[2,2,1,0]=(-1.19993089382)*x_ref[0]+(0.276541296246)*x_ref[1]+(0.523388479396)*x_ref[2]
-        ref[2,2,1,1]=(0.0586514653869)*x_ref[0]+(-0.624975232742)*x_ref[1]+(-1.55738876751)*x_ref[2]
-        ref[2,2,2,0]=(-0.892065938887)*x_ref[0]+(-0.4848241954)*x_ref[1]+(0.315463883511)*x_ref[2]
-        ref[2,2,2,1]=(0.0272963181118)*x_ref[0]+(0.0187713454669)*x_ref[1]+(-1.06524661854)*x_ref[2]
-        ref[2,3,0,0]=(-1.44099287886)*x_ref[0]+(0.495718421075)*x_ref[1]+(0.100401960223)*x_ref[2]
-        ref[2,3,0,1]=(0.171175119412)*x_ref[0]+(-1.34795558607)*x_ref[1]+(-0.361766653264)*x_ref[2]
-        ref[2,3,1,0]=(-1.80591882588)*x_ref[0]+(-0.511459455136)*x_ref[1]+(-0.491310264055)*x_ref[2]
-        ref[2,3,1,1]=(-0.419508934622)*x_ref[0]+(-1.12084042844)*x_ref[1]+(-0.086947672548)*x_ref[2]
-        ref[2,3,2,0]=(0.492388303934)*x_ref[0]+(-0.623505828597)*x_ref[1]+(1.6965873745)*x_ref[2]
-        ref[2,3,2,1]=(1.59203810356)*x_ref[0]+(0.36918142231)*x_ref[1]+(-1.90067115052)*x_ref[2]
-        ref[2,4,0,0]=(1.00875649298)*x_ref[0]+(-1.43246384934)*x_ref[1]+(-0.51811906593)*x_ref[2]
-        ref[2,4,0,1]=(0.260118918034)*x_ref[0]+(-1.57606061865)*x_ref[1]+(-0.79257165655)*x_ref[2]
-        ref[2,4,1,0]=(0.954414074467)*x_ref[0]+(-0.230132876613)*x_ref[1]+(0.0956378957424)*x_ref[2]
-        ref[2,4,1,1]=(0.958843806364)*x_ref[0]+(-0.155804429995)*x_ref[1]+(-1.02904877039)*x_ref[2]
-        ref[2,4,2,0]=(0.252668700811)*x_ref[0]+(0.164829885749)*x_ref[1]+(0.747032722421)*x_ref[2]
-        ref[2,4,2,1]=(1.96393052323)*x_ref[0]+(-0.821363958807)*x_ref[1]+(-1.01663555063)*x_ref[2]
-        ref[3,0,0,0]=(1.58086037053)*x_ref[0]+(-1.66495295611)*x_ref[1]+(-0.510526191383)*x_ref[2]
-        ref[3,0,0,1]=(-0.931871976029)*x_ref[0]+(1.33102205125)*x_ref[1]+(-0.95170580468)*x_ref[2]
-        ref[3,0,1,0]=(0.99825404115)*x_ref[0]+(0.915274413552)*x_ref[1]+(1.5057227674)*x_ref[2]
-        ref[3,0,1,1]=(0.0485551924989)*x_ref[0]+(-1.0877405758)*x_ref[1]+(-0.887342573702)*x_ref[2]
-        ref[3,0,2,0]=(-0.745146140677)*x_ref[0]+(-0.0108141266015)*x_ref[1]+(0.194597576308)*x_ref[2]
-        ref[3,0,2,1]=(-0.935029218338)*x_ref[0]+(0.726322809025)*x_ref[1]+(0.57508467103)*x_ref[2]
-        ref[3,1,0,0]=(0.115668237156)*x_ref[0]+(0.0970255991906)*x_ref[1]+(-0.227291123547)*x_ref[2]
-        ref[3,1,0,1]=(0.167722335863)*x_ref[0]+(-0.552168424291)*x_ref[1]+(1.36293027463)*x_ref[2]
-        ref[3,1,1,0]=(-1.05781878028)*x_ref[0]+(-0.0429389047972)*x_ref[1]+(-0.257166337509)*x_ref[2]
-        ref[3,1,1,1]=(0.129148486118)*x_ref[0]+(-0.0209434899369)*x_ref[1]+(0.253153005253)*x_ref[2]
-        ref[3,1,2,0]=(1.3236615365)*x_ref[0]+(-1.18164469224)*x_ref[1]+(0.698012697426)*x_ref[2]
-        ref[3,1,2,1]=(1.10438661886)*x_ref[0]+(-0.852903948395)*x_ref[1]+(1.40365162024)*x_ref[2]
-        ref[3,2,0,0]=(-0.949308009957)*x_ref[0]+(1.01993206161)*x_ref[1]+(-0.821721697476)*x_ref[2]
-        ref[3,2,0,1]=(0.326450662787)*x_ref[0]+(0.395096088107)*x_ref[1]+(-0.368904800584)*x_ref[2]
-        ref[3,2,1,0]=(0.13107780566)*x_ref[0]+(-0.342904134623)*x_ref[1]+(0.00835087701185)*x_ref[2]
-        ref[3,2,1,1]=(-0.500694550647)*x_ref[0]+(1.38322390003)*x_ref[1]+(0.0576453183412)*x_ref[2]
-        ref[3,2,2,0]=(-1.32014489811)*x_ref[0]+(-0.444079317864)*x_ref[1]+(1.1135946018)*x_ref[2]
-        ref[3,2,2,1]=(-0.19593105007)*x_ref[0]+(-0.00224390969377)*x_ref[1]+(-0.73869338942)*x_ref[2]
-        ref[3,3,0,0]=(0.0151201622255)*x_ref[0]+(-1.10873788153)*x_ref[1]+(0.189116254832)*x_ref[2]
-        ref[3,3,0,1]=(1.05996205566)*x_ref[0]+(0.398465639867)*x_ref[1]+(-0.319773104448)*x_ref[2]
-        ref[3,3,1,0]=(0.687612827243)*x_ref[0]+(1.10970823257)*x_ref[1]+(1.02543288975)*x_ref[2]
-        ref[3,3,1,1]=(1.27258509981)*x_ref[0]+(-1.7060826391)*x_ref[1]+(-0.84948812227)*x_ref[2]
-        ref[3,3,2,0]=(1.2343036886)*x_ref[0]+(0.521090253023)*x_ref[1]+(-1.13377412954)*x_ref[2]
-        ref[3,3,2,1]=(-0.65568738385)*x_ref[0]+(1.00354617712)*x_ref[1]+(0.836719015812)*x_ref[2]
-        ref[3,4,0,0]=(-0.545324078594)*x_ref[0]+(0.452747782208)*x_ref[1]+(-1.59718954237)*x_ref[2]
-        ref[3,4,0,1]=(1.71651153317)*x_ref[0]+(-0.161984538787)*x_ref[1]+(-0.377244827904)*x_ref[2]
-        ref[3,4,1,0]=(-0.284033324558)*x_ref[0]+(-0.405941433062)*x_ref[1]+(0.824573264594)*x_ref[2]
-        ref[3,4,1,1]=(-0.112542702803)*x_ref[0]+(-0.470814805786)*x_ref[1]+(-0.827427436576)*x_ref[2]
-        ref[3,4,2,0]=(-0.763655132981)*x_ref[0]+(-0.442818775864)*x_ref[1]+(0.809814510041)*x_ref[2]
-        ref[3,4,2,1]=(-0.33794306298)*x_ref[0]+(1.91169591332)*x_ref[1]+(-0.487268088196)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.898871557679)*x[0]+(0.0218492481542)*x[1]
-        ref=(0.898871557679)*x_ref[0]+(0.0218492481542)*x_ref[1]
-      else:
-        arg=(-0.490730396919)*x[0]+(0.840683566031)*x[1]+(-0.265457839434)*x[2]
-        ref=(-0.490730396919)*x_ref[0]+(0.840683566031)*x_ref[1]+(-0.265457839434)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.505098987801)*x[0]+(-0.647246526986)*x[1]
-        arg[1]=(-0.823205698667)*x[0]+(-0.88472991168)*x[1]
-        ref[0]=(-0.505098987801)*x[0]+(-0.647246526986)*x[1]
-        ref[1]=(-0.823205698667)*x[0]+(-0.88472991168)*x[1]
-      else:
-        arg[0]=(-1.01688152316)*x[0]+(0.197478760214)*x[1]+(-0.833266923905)*x[2]
-        arg[1]=(0.763755283448)*x[0]+(-0.920100276504)*x[1]+(1.0042717309)*x[2]
-        ref[0]=(-1.01688152316)*x[0]+(0.197478760214)*x[1]+(-0.833266923905)*x[2]
-        ref[1]=(0.763755283448)*x[0]+(-0.920100276504)*x[1]+(1.0042717309)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.609515733352)*x[0]+(0.477437125804)*x[1]
-        arg[0,1]=(0.225027969847)*x[0]+(-1.2178256661)*x[1]
-        arg[0,2]=(-0.414641287889)*x[0]+(-0.536814389632)*x[1]
-        arg[0,3]=(0.993370642676)*x[0]+(0.430000528217)*x[1]
-        arg[0,4]=(0.577804610335)*x[0]+(0.0950391061127)*x[1]
-        arg[1,0]=(0.437140855856)*x[0]+(0.764946114688)*x[1]
-        arg[1,1]=(-0.491195658809)*x[0]+(-1.04729131261)*x[1]
-        arg[1,2]=(-0.179287249145)*x[0]+(-1.84699873991)*x[1]
-        arg[1,3]=(0.650408136022)*x[0]+(0.437145116534)*x[1]
-        arg[1,4]=(0.43853490169)*x[0]+(-0.633716126064)*x[1]
-        arg[2,0]=(0.6275418675)*x[0]+(0.812839621482)*x[1]
-        arg[2,1]=(0.151298084104)*x[0]+(0.191677853013)*x[1]
-        arg[2,2]=(1.35800571802)*x[0]+(1.08489593249)*x[1]
-        arg[2,3]=(0.343386100925)*x[0]+(-0.108323271881)*x[1]
-        arg[2,4]=(1.5968773444)*x[0]+(0.421328566279)*x[1]
-        arg[3,0]=(1.0607367804)*x[0]+(-0.347352081886)*x[1]
-        arg[3,1]=(-0.307183028406)*x[0]+(0.171667489459)*x[1]
-        arg[3,2]=(0.255609148103)*x[0]+(0.21702578756)*x[1]
-        arg[3,3]=(0.204487068999)*x[0]+(0.380168463726)*x[1]
-        arg[3,4]=(-0.727714186561)*x[0]+(-0.129616906837)*x[1]
-        ref[0,0]=(-0.609515733352)*x_ref[0]+(0.477437125804)*x_ref[1]
-        ref[0,1]=(0.225027969847)*x_ref[0]+(-1.2178256661)*x_ref[1]
-        ref[0,2]=(-0.414641287889)*x_ref[0]+(-0.536814389632)*x_ref[1]
-        ref[0,3]=(0.993370642676)*x_ref[0]+(0.430000528217)*x_ref[1]
-        ref[0,4]=(0.577804610335)*x_ref[0]+(0.0950391061127)*x_ref[1]
-        ref[1,0]=(0.437140855856)*x_ref[0]+(0.764946114688)*x_ref[1]
-        ref[1,1]=(-0.491195658809)*x_ref[0]+(-1.04729131261)*x_ref[1]
-        ref[1,2]=(-0.179287249145)*x_ref[0]+(-1.84699873991)*x_ref[1]
-        ref[1,3]=(0.650408136022)*x_ref[0]+(0.437145116534)*x_ref[1]
-        ref[1,4]=(0.43853490169)*x_ref[0]+(-0.633716126064)*x_ref[1]
-        ref[2,0]=(0.6275418675)*x_ref[0]+(0.812839621482)*x_ref[1]
-        ref[2,1]=(0.151298084104)*x_ref[0]+(0.191677853013)*x_ref[1]
-        ref[2,2]=(1.35800571802)*x_ref[0]+(1.08489593249)*x_ref[1]
-        ref[2,3]=(0.343386100925)*x_ref[0]+(-0.108323271881)*x_ref[1]
-        ref[2,4]=(1.5968773444)*x_ref[0]+(0.421328566279)*x_ref[1]
-        ref[3,0]=(1.0607367804)*x_ref[0]+(-0.347352081886)*x_ref[1]
-        ref[3,1]=(-0.307183028406)*x_ref[0]+(0.171667489459)*x_ref[1]
-        ref[3,2]=(0.255609148103)*x_ref[0]+(0.21702578756)*x_ref[1]
-        ref[3,3]=(0.204487068999)*x_ref[0]+(0.380168463726)*x_ref[1]
-        ref[3,4]=(-0.727714186561)*x_ref[0]+(-0.129616906837)*x_ref[1]
-      else:
-        arg[0,0]=(-0.282058347281)*x[0]+(-0.804878634484)*x[1]+(1.59321960831)*x[2]
-        arg[0,1]=(0.046711660417)*x[0]+(-0.353452776565)*x[1]+(-1.22459734449)*x[2]
-        arg[0,2]=(0.846231855307)*x[0]+(1.08618070898)*x[1]+(-1.50365393652)*x[2]
-        arg[0,3]=(-0.358546890162)*x[0]+(1.53476318049)*x[1]+(-1.19382694871)*x[2]
-        arg[0,4]=(-1.1943310015)*x[0]+(0.260842673421)*x[1]+(-0.337737972605)*x[2]
-        arg[1,0]=(1.87166717118)*x[0]+(0.853452519127)*x[1]+(-0.59081660847)*x[2]
-        arg[1,1]=(0.23310002871)*x[0]+(0.306981228888)*x[1]+(0.36040454683)*x[2]
-        arg[1,2]=(-1.619288679)*x[0]+(-0.459254234211)*x[1]+(0.722479242965)*x[2]
-        arg[1,3]=(-1.07724802769)*x[0]+(0.836465436044)*x[1]+(0.255446930493)*x[2]
-        arg[1,4]=(1.07857092921)*x[0]+(1.25642859092)*x[1]+(-0.922799422574)*x[2]
-        arg[2,0]=(-0.832179820568)*x[0]+(-0.511243247139)*x[1]+(0.589457094147)*x[2]
-        arg[2,1]=(-0.22616483359)*x[0]+(1.75842052561)*x[1]+(-1.19438769374)*x[2]
-        arg[2,2]=(-0.690678634371)*x[0]+(0.963335056891)*x[1]+(0.53653322138)*x[2]
-        arg[2,3]=(-0.906140718249)*x[0]+(0.766237211441)*x[1]+(1.19445635284)*x[2]
-        arg[2,4]=(-0.16966820901)*x[0]+(0.185706811112)*x[1]+(0.975546783315)*x[2]
-        arg[3,0]=(1.85053644213)*x[0]+(1.000328518)*x[1]+(0.332466610087)*x[2]
-        arg[3,1]=(-0.199393988242)*x[0]+(0.637601295557)*x[1]+(1.29246614993)*x[2]
-        arg[3,2]=(-0.275167528438)*x[0]+(1.00557873837)*x[1]+(1.17143679274)*x[2]
-        arg[3,3]=(-0.306797319235)*x[0]+(0.984827835253)*x[1]+(0.0324710900497)*x[2]
-        arg[3,4]=(-1.07994829511)*x[0]+(0.341016609147)*x[1]+(0.115829923585)*x[2]
-        ref[0,0]=(-0.282058347281)*x_ref[0]+(-0.804878634484)*x_ref[1]+(1.59321960831)*x_ref[2]
-        ref[0,1]=(0.046711660417)*x_ref[0]+(-0.353452776565)*x_ref[1]+(-1.22459734449)*x_ref[2]
-        ref[0,2]=(0.846231855307)*x_ref[0]+(1.08618070898)*x_ref[1]+(-1.50365393652)*x_ref[2]
-        ref[0,3]=(-0.358546890162)*x_ref[0]+(1.53476318049)*x_ref[1]+(-1.19382694871)*x_ref[2]
-        ref[0,4]=(-1.1943310015)*x_ref[0]+(0.260842673421)*x_ref[1]+(-0.337737972605)*x_ref[2]
-        ref[1,0]=(1.87166717118)*x_ref[0]+(0.853452519127)*x_ref[1]+(-0.59081660847)*x_ref[2]
-        ref[1,1]=(0.23310002871)*x_ref[0]+(0.306981228888)*x_ref[1]+(0.36040454683)*x_ref[2]
-        ref[1,2]=(-1.619288679)*x_ref[0]+(-0.459254234211)*x_ref[1]+(0.722479242965)*x_ref[2]
-        ref[1,3]=(-1.07724802769)*x_ref[0]+(0.836465436044)*x_ref[1]+(0.255446930493)*x_ref[2]
-        ref[1,4]=(1.07857092921)*x_ref[0]+(1.25642859092)*x_ref[1]+(-0.922799422574)*x_ref[2]
-        ref[2,0]=(-0.832179820568)*x_ref[0]+(-0.511243247139)*x_ref[1]+(0.589457094147)*x_ref[2]
-        ref[2,1]=(-0.22616483359)*x_ref[0]+(1.75842052561)*x_ref[1]+(-1.19438769374)*x_ref[2]
-        ref[2,2]=(-0.690678634371)*x_ref[0]+(0.963335056891)*x_ref[1]+(0.53653322138)*x_ref[2]
-        ref[2,3]=(-0.906140718249)*x_ref[0]+(0.766237211441)*x_ref[1]+(1.19445635284)*x_ref[2]
-        ref[2,4]=(-0.16966820901)*x_ref[0]+(0.185706811112)*x_ref[1]+(0.975546783315)*x_ref[2]
-        ref[3,0]=(1.85053644213)*x_ref[0]+(1.000328518)*x_ref[1]+(0.332466610087)*x_ref[2]
-        ref[3,1]=(-0.199393988242)*x_ref[0]+(0.637601295557)*x_ref[1]+(1.29246614993)*x_ref[2]
-        ref[3,2]=(-0.275167528438)*x_ref[0]+(1.00557873837)*x_ref[1]+(1.17143679274)*x_ref[2]
-        ref[3,3]=(-0.306797319235)*x_ref[0]+(0.984827835253)*x_ref[1]+(0.0324710900497)*x_ref[2]
-        ref[3,4]=(-1.07994829511)*x_ref[0]+(0.341016609147)*x_ref[1]+(0.115829923585)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.618861298758)*x[0]+(-0.764616734859)*x[1]
-        arg[0,0,1]=(-0.220720229024)*x[0]+(-0.670415412641)*x[1]
-        arg[0,1,0]=(0.847082172076)*x[0]+(0.104515154796)*x[1]
-        arg[0,1,1]=(-1.39487869037)*x[0]+(1.37639032205)*x[1]
-        arg[1,0,0]=(-0.12944065767)*x[0]+(-0.91214412252)*x[1]
-        arg[1,0,1]=(0.0421119211697)*x[0]+(1.19918915102)*x[1]
-        arg[1,1,0]=(0.657099038454)*x[0]+(0.102886690913)*x[1]
-        arg[1,1,1]=(0.114311284584)*x[0]+(-0.827908524893)*x[1]
-        arg[2,0,0]=(-0.905281334495)*x[0]+(1.02228309099)*x[1]
-        arg[2,0,1]=(-0.560619228879)*x[0]+(-0.924304525905)*x[1]
-        arg[2,1,0]=(0.082868967617)*x[0]+(-0.129063346527)*x[1]
-        arg[2,1,1]=(0.386687881433)*x[0]+(-0.874995344656)*x[1]
-        arg[3,0,0]=(0.460976605295)*x[0]+(0.145631537258)*x[1]
-        arg[3,0,1]=(0.439977672901)*x[0]+(0.714321229059)*x[1]
-        arg[3,1,0]=(-0.0459363656635)*x[0]+(-0.0754715887416)*x[1]
-        arg[3,1,1]=(-0.789910257931)*x[0]+(-0.806078036909)*x[1]
-        arg[4,0,0]=(-1.09951071165)*x[0]+(-1.33461983123)*x[1]
-        arg[4,0,1]=(0.857184302111)*x[0]+(0.823036666525)*x[1]
-        arg[4,1,0]=(-1.0682486872)*x[0]+(-0.149861981932)*x[1]
-        arg[4,1,1]=(-0.0758367136425)*x[0]+(0.0460556685916)*x[1]
-        arg[5,0,0]=(0.856207295965)*x[0]+(-0.885450852663)*x[1]
-        arg[5,0,1]=(-0.113939086685)*x[0]+(0.742808810968)*x[1]
-        arg[5,1,0]=(-0.174573302919)*x[0]+(0.486803189896)*x[1]
-        arg[5,1,1]=(1.1726771004)*x[0]+(-0.329765988186)*x[1]
-        ref[0,0,0]=(0.618861298758)*x_ref[0]+(-0.764616734859)*x_ref[1]
-        ref[0,0,1]=(-0.220720229024)*x_ref[0]+(-0.670415412641)*x_ref[1]
-        ref[0,1,0]=(0.847082172076)*x_ref[0]+(0.104515154796)*x_ref[1]
-        ref[0,1,1]=(-1.39487869037)*x_ref[0]+(1.37639032205)*x_ref[1]
-        ref[1,0,0]=(-0.12944065767)*x_ref[0]+(-0.91214412252)*x_ref[1]
-        ref[1,0,1]=(0.0421119211697)*x_ref[0]+(1.19918915102)*x_ref[1]
-        ref[1,1,0]=(0.657099038454)*x_ref[0]+(0.102886690913)*x_ref[1]
-        ref[1,1,1]=(0.114311284584)*x_ref[0]+(-0.827908524893)*x_ref[1]
-        ref[2,0,0]=(-0.905281334495)*x_ref[0]+(1.02228309099)*x_ref[1]
-        ref[2,0,1]=(-0.560619228879)*x_ref[0]+(-0.924304525905)*x_ref[1]
-        ref[2,1,0]=(0.082868967617)*x_ref[0]+(-0.129063346527)*x_ref[1]
-        ref[2,1,1]=(0.386687881433)*x_ref[0]+(-0.874995344656)*x_ref[1]
-        ref[3,0,0]=(0.460976605295)*x_ref[0]+(0.145631537258)*x_ref[1]
-        ref[3,0,1]=(0.439977672901)*x_ref[0]+(0.714321229059)*x_ref[1]
-        ref[3,1,0]=(-0.0459363656635)*x_ref[0]+(-0.0754715887416)*x_ref[1]
-        ref[3,1,1]=(-0.789910257931)*x_ref[0]+(-0.806078036909)*x_ref[1]
-        ref[4,0,0]=(-1.09951071165)*x_ref[0]+(-1.33461983123)*x_ref[1]
-        ref[4,0,1]=(0.857184302111)*x_ref[0]+(0.823036666525)*x_ref[1]
-        ref[4,1,0]=(-1.0682486872)*x_ref[0]+(-0.149861981932)*x_ref[1]
-        ref[4,1,1]=(-0.0758367136425)*x_ref[0]+(0.0460556685916)*x_ref[1]
-        ref[5,0,0]=(0.856207295965)*x_ref[0]+(-0.885450852663)*x_ref[1]
-        ref[5,0,1]=(-0.113939086685)*x_ref[0]+(0.742808810968)*x_ref[1]
-        ref[5,1,0]=(-0.174573302919)*x_ref[0]+(0.486803189896)*x_ref[1]
-        ref[5,1,1]=(1.1726771004)*x_ref[0]+(-0.329765988186)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.640205798541)*x[0]+(0.271670719935)*x[1]+(-0.163000598261)*x[2]
-        arg[0,0,1]=(0.735605297981)*x[0]+(-1.05892412676)*x[1]+(-1.1083007441)*x[2]
-        arg[0,1,0]=(0.0349869408333)*x[0]+(0.699147831788)*x[1]+(-0.454390826725)*x[2]
-        arg[0,1,1]=(-0.703957679243)*x[0]+(-1.63654420176)*x[1]+(-1.13045075795)*x[2]
-        arg[1,0,0]=(1.01167296102)*x[0]+(-0.362443738659)*x[1]+(-0.0481138040854)*x[2]
-        arg[1,0,1]=(0.110033706339)*x[0]+(1.47809236549)*x[1]+(0.240737599484)*x[2]
-        arg[1,1,0]=(-0.0429437939148)*x[0]+(-1.16945967196)*x[1]+(0.924577053186)*x[2]
-        arg[1,1,1]=(-1.57856509244)*x[0]+(-0.460441809594)*x[1]+(-0.792590928973)*x[2]
-        arg[2,0,0]=(-1.93020920065)*x[0]+(0.391612451745)*x[1]+(-0.0130238634938)*x[2]
-        arg[2,0,1]=(0.0678908982414)*x[0]+(-0.929813889361)*x[1]+(0.727462587818)*x[2]
-        arg[2,1,0]=(-0.297494494419)*x[0]+(0.167234033247)*x[1]+(-1.01372084798)*x[2]
-        arg[2,1,1]=(-0.608810623174)*x[0]+(1.04629900384)*x[1]+(1.09464953456)*x[2]
-        arg[3,0,0]=(1.2996449893)*x[0]+(-0.458197425323)*x[1]+(1.31523663461)*x[2]
-        arg[3,0,1]=(-0.848124038387)*x[0]+(0.0136487458675)*x[1]+(1.13573336016)*x[2]
-        arg[3,1,0]=(0.377245000633)*x[0]+(-0.766336675857)*x[1]+(0.380031677083)*x[2]
-        arg[3,1,1]=(0.158289533163)*x[0]+(-0.149454925108)*x[1]+(-0.59348598427)*x[2]
-        arg[4,0,0]=(-1.13101661269)*x[0]+(-0.694062133171)*x[1]+(0.00925221725394)*x[2]
-        arg[4,0,1]=(-0.977317473287)*x[0]+(-0.121712752812)*x[1]+(-0.480470720169)*x[2]
-        arg[4,1,0]=(1.14884269473)*x[0]+(-0.204958154665)*x[1]+(1.24328207187)*x[2]
-        arg[4,1,1]=(0.0791969146134)*x[0]+(0.589873409499)*x[1]+(1.90521993698)*x[2]
-        arg[5,0,0]=(1.75625788908)*x[0]+(0.0134922175773)*x[1]+(-0.699884009939)*x[2]
-        arg[5,0,1]=(-0.73456900252)*x[0]+(0.923248295457)*x[1]+(1.05161845199)*x[2]
-        arg[5,1,0]=(-0.0335528775888)*x[0]+(0.728742831853)*x[1]+(-0.5212350627)*x[2]
-        arg[5,1,1]=(0.556540394981)*x[0]+(-0.128428520433)*x[1]+(1.06358498081)*x[2]
-        ref[0,0,0]=(-0.640205798541)*x_ref[0]+(0.271670719935)*x_ref[1]+(-0.163000598261)*x_ref[2]
-        ref[0,0,1]=(0.735605297981)*x_ref[0]+(-1.05892412676)*x_ref[1]+(-1.1083007441)*x_ref[2]
-        ref[0,1,0]=(0.0349869408333)*x_ref[0]+(0.699147831788)*x_ref[1]+(-0.454390826725)*x_ref[2]
-        ref[0,1,1]=(-0.703957679243)*x_ref[0]+(-1.63654420176)*x_ref[1]+(-1.13045075795)*x_ref[2]
-        ref[1,0,0]=(1.01167296102)*x_ref[0]+(-0.362443738659)*x_ref[1]+(-0.0481138040854)*x_ref[2]
-        ref[1,0,1]=(0.110033706339)*x_ref[0]+(1.47809236549)*x_ref[1]+(0.240737599484)*x_ref[2]
-        ref[1,1,0]=(-0.0429437939148)*x_ref[0]+(-1.16945967196)*x_ref[1]+(0.924577053186)*x_ref[2]
-        ref[1,1,1]=(-1.57856509244)*x_ref[0]+(-0.460441809594)*x_ref[1]+(-0.792590928973)*x_ref[2]
-        ref[2,0,0]=(-1.93020920065)*x_ref[0]+(0.391612451745)*x_ref[1]+(-0.0130238634938)*x_ref[2]
-        ref[2,0,1]=(0.0678908982414)*x_ref[0]+(-0.929813889361)*x_ref[1]+(0.727462587818)*x_ref[2]
-        ref[2,1,0]=(-0.297494494419)*x_ref[0]+(0.167234033247)*x_ref[1]+(-1.01372084798)*x_ref[2]
-        ref[2,1,1]=(-0.608810623174)*x_ref[0]+(1.04629900384)*x_ref[1]+(1.09464953456)*x_ref[2]
-        ref[3,0,0]=(1.2996449893)*x_ref[0]+(-0.458197425323)*x_ref[1]+(1.31523663461)*x_ref[2]
-        ref[3,0,1]=(-0.848124038387)*x_ref[0]+(0.0136487458675)*x_ref[1]+(1.13573336016)*x_ref[2]
-        ref[3,1,0]=(0.377245000633)*x_ref[0]+(-0.766336675857)*x_ref[1]+(0.380031677083)*x_ref[2]
-        ref[3,1,1]=(0.158289533163)*x_ref[0]+(-0.149454925108)*x_ref[1]+(-0.59348598427)*x_ref[2]
-        ref[4,0,0]=(-1.13101661269)*x_ref[0]+(-0.694062133171)*x_ref[1]+(0.00925221725394)*x_ref[2]
-        ref[4,0,1]=(-0.977317473287)*x_ref[0]+(-0.121712752812)*x_ref[1]+(-0.480470720169)*x_ref[2]
-        ref[4,1,0]=(1.14884269473)*x_ref[0]+(-0.204958154665)*x_ref[1]+(1.24328207187)*x_ref[2]
-        ref[4,1,1]=(0.0791969146134)*x_ref[0]+(0.589873409499)*x_ref[1]+(1.90521993698)*x_ref[2]
-        ref[5,0,0]=(1.75625788908)*x_ref[0]+(0.0134922175773)*x_ref[1]+(-0.699884009939)*x_ref[2]
-        ref[5,0,1]=(-0.73456900252)*x_ref[0]+(0.923248295457)*x_ref[1]+(1.05161845199)*x_ref[2]
-        ref[5,1,0]=(-0.0335528775888)*x_ref[0]+(0.728742831853)*x_ref[1]+(-0.5212350627)*x_ref[2]
-        ref[5,1,1]=(0.556540394981)*x_ref[0]+(-0.128428520433)*x_ref[1]+(1.06358498081)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.507324804235)*x[0]+(0.725831700089)*x[1]
-        arg[0,0,0,1]=(0.847901454936)*x[0]+(0.84787024099)*x[1]
-        arg[0,0,1,0]=(0.221488465784)*x[0]+(0.0449286988708)*x[1]
-        arg[0,0,1,1]=(0.00897176578501)*x[0]+(-0.799118487206)*x[1]
-        arg[0,0,2,0]=(0.171491682599)*x[0]+(1.0259065872)*x[1]
-        arg[0,0,2,1]=(-0.213244683798)*x[0]+(-0.706816385516)*x[1]
-        arg[0,1,0,0]=(1.54199875186)*x[0]+(-1.09479402082)*x[1]
-        arg[0,1,0,1]=(-0.755278051349)*x[0]+(-0.371785089226)*x[1]
-        arg[0,1,1,0]=(-0.798931370137)*x[0]+(-0.716047155117)*x[1]
-        arg[0,1,1,1]=(-0.79104072521)*x[0]+(-1.45842710768)*x[1]
-        arg[0,1,2,0]=(-0.489161301965)*x[0]+(0.115368605994)*x[1]
-        arg[0,1,2,1]=(0.00167228618616)*x[0]+(-0.636896504873)*x[1]
-        arg[0,2,0,0]=(-0.239182729045)*x[0]+(0.470786327067)*x[1]
-        arg[0,2,0,1]=(0.182105943188)*x[0]+(0.328443662342)*x[1]
-        arg[0,2,1,0]=(0.000476540430199)*x[0]+(-0.498066512126)*x[1]
-        arg[0,2,1,1]=(-0.822985659305)*x[0]+(-0.118645880185)*x[1]
-        arg[0,2,2,0]=(1.18375382554)*x[0]+(1.51417307474)*x[1]
-        arg[0,2,2,1]=(-0.99755868797)*x[0]+(-1.4187068658)*x[1]
-        arg[0,3,0,0]=(-0.0908782314954)*x[0]+(-0.25901340471)*x[1]
-        arg[0,3,0,1]=(-1.77626335863)*x[0]+(-0.862132832663)*x[1]
-        arg[0,3,1,0]=(0.532147327491)*x[0]+(0.454949026506)*x[1]
-        arg[0,3,1,1]=(-0.882307958628)*x[0]+(0.00780544746858)*x[1]
-        arg[0,3,2,0]=(0.700104420574)*x[0]+(0.720508036709)*x[1]
-        arg[0,3,2,1]=(-1.27167118811)*x[0]+(-0.372999410908)*x[1]
-        arg[0,4,0,0]=(0.396222903345)*x[0]+(1.70664799562)*x[1]
-        arg[0,4,0,1]=(0.229159055372)*x[0]+(0.0162677758439)*x[1]
-        arg[0,4,1,0]=(1.69470499818)*x[0]+(0.0971804891468)*x[1]
-        arg[0,4,1,1]=(0.180710573838)*x[0]+(1.05311557127)*x[1]
-        arg[0,4,2,0]=(-0.072661496917)*x[0]+(0.466256643644)*x[1]
-        arg[0,4,2,1]=(0.25755631084)*x[0]+(0.306990925808)*x[1]
-        arg[1,0,0,0]=(0.835353191317)*x[0]+(-0.619237060145)*x[1]
-        arg[1,0,0,1]=(1.02966866371)*x[0]+(0.327724003031)*x[1]
-        arg[1,0,1,0]=(-0.59214788986)*x[0]+(-0.927738485428)*x[1]
-        arg[1,0,1,1]=(-0.805929278446)*x[0]+(-0.366113927406)*x[1]
-        arg[1,0,2,0]=(0.952876155721)*x[0]+(0.490531201467)*x[1]
-        arg[1,0,2,1]=(1.44341651657)*x[0]+(-0.269899260772)*x[1]
-        arg[1,1,0,0]=(0.302587966785)*x[0]+(-0.0373883991695)*x[1]
-        arg[1,1,0,1]=(0.77498995648)*x[0]+(1.81052574555)*x[1]
-        arg[1,1,1,0]=(1.47950560134)*x[0]+(-0.714878219566)*x[1]
-        arg[1,1,1,1]=(0.0713827629606)*x[0]+(-1.22018291576)*x[1]
-        arg[1,1,2,0]=(1.30715631604)*x[0]+(-0.191666253513)*x[1]
-        arg[1,1,2,1]=(0.330921962628)*x[0]+(-1.57160261912)*x[1]
-        arg[1,2,0,0]=(0.593477126597)*x[0]+(0.728196634765)*x[1]
-        arg[1,2,0,1]=(0.853860342143)*x[0]+(0.142625101433)*x[1]
-        arg[1,2,1,0]=(-0.743590115343)*x[0]+(0.108893736366)*x[1]
-        arg[1,2,1,1]=(-0.651514863459)*x[0]+(0.365517180762)*x[1]
-        arg[1,2,2,0]=(1.491516719)*x[0]+(0.28900806658)*x[1]
-        arg[1,2,2,1]=(1.23733736339)*x[0]+(-0.58438294882)*x[1]
-        arg[1,3,0,0]=(0.185696018505)*x[0]+(-1.29119084907)*x[1]
-        arg[1,3,0,1]=(1.73584656085)*x[0]+(0.720989518003)*x[1]
-        arg[1,3,1,0]=(-1.16044192371)*x[0]+(-0.131128994204)*x[1]
-        arg[1,3,1,1]=(-0.00913995119508)*x[0]+(0.506516682557)*x[1]
-        arg[1,3,2,0]=(-1.4970171408)*x[0]+(0.692262679219)*x[1]
-        arg[1,3,2,1]=(0.433442352395)*x[0]+(-0.118782513258)*x[1]
-        arg[1,4,0,0]=(0.186272280804)*x[0]+(-0.136627137097)*x[1]
-        arg[1,4,0,1]=(1.25477168515)*x[0]+(-0.0871831369474)*x[1]
-        arg[1,4,1,0]=(1.22746022677)*x[0]+(0.799329883559)*x[1]
-        arg[1,4,1,1]=(-0.756298280123)*x[0]+(0.317500967634)*x[1]
-        arg[1,4,2,0]=(0.201184703435)*x[0]+(-0.116537935236)*x[1]
-        arg[1,4,2,1]=(0.851291897607)*x[0]+(0.404063606516)*x[1]
-        arg[2,0,0,0]=(-0.257605370026)*x[0]+(-0.202424701671)*x[1]
-        arg[2,0,0,1]=(0.0219332720675)*x[0]+(0.518222103227)*x[1]
-        arg[2,0,1,0]=(1.03726036144)*x[0]+(-1.01482867596)*x[1]
-        arg[2,0,1,1]=(0.00677025785109)*x[0]+(0.607932484906)*x[1]
-        arg[2,0,2,0]=(-0.753000974637)*x[0]+(0.112884693676)*x[1]
-        arg[2,0,2,1]=(-0.585627190582)*x[0]+(0.548136242722)*x[1]
-        arg[2,1,0,0]=(0.382466685883)*x[0]+(-1.15520454298)*x[1]
-        arg[2,1,0,1]=(-0.722705123323)*x[0]+(-0.599069291154)*x[1]
-        arg[2,1,1,0]=(-0.845885208256)*x[0]+(-1.56066350212)*x[1]
-        arg[2,1,1,1]=(-1.31472469553)*x[0]+(0.18973548452)*x[1]
-        arg[2,1,2,0]=(-0.419142599733)*x[0]+(1.43873372527)*x[1]
-        arg[2,1,2,1]=(0.22685530286)*x[0]+(-0.53636714393)*x[1]
-        arg[2,2,0,0]=(1.32884214935)*x[0]+(-0.377575726395)*x[1]
-        arg[2,2,0,1]=(0.0845542736847)*x[0]+(0.0888339000429)*x[1]
-        arg[2,2,1,0]=(-1.05813285521)*x[0]+(-0.980382395463)*x[1]
-        arg[2,2,1,1]=(0.306785463268)*x[0]+(0.622558337967)*x[1]
-        arg[2,2,2,0]=(-0.765475308614)*x[0]+(1.40320055807)*x[1]
-        arg[2,2,2,1]=(-1.23199081441)*x[0]+(0.245517841221)*x[1]
-        arg[2,3,0,0]=(0.655775411743)*x[0]+(-1.09496249546)*x[1]
-        arg[2,3,0,1]=(-1.57906394006)*x[0]+(-0.223321547826)*x[1]
-        arg[2,3,1,0]=(-0.329934697034)*x[0]+(-1.36492062074)*x[1]
-        arg[2,3,1,1]=(1.2584701256)*x[0]+(0.172958559745)*x[1]
-        arg[2,3,2,0]=(0.265769150885)*x[0]+(-0.273148332255)*x[1]
-        arg[2,3,2,1]=(-1.18294356647)*x[0]+(-0.269813147795)*x[1]
-        arg[2,4,0,0]=(-1.80352122024)*x[0]+(-0.417693287507)*x[1]
-        arg[2,4,0,1]=(0.829979623343)*x[0]+(0.0526239642579)*x[1]
-        arg[2,4,1,0]=(0.967999103063)*x[0]+(0.0184170526665)*x[1]
-        arg[2,4,1,1]=(-0.326938715134)*x[0]+(-0.575040647639)*x[1]
-        arg[2,4,2,0]=(1.44727400099)*x[0]+(0.710269500685)*x[1]
-        arg[2,4,2,1]=(-0.248166665809)*x[0]+(0.247820501661)*x[1]
-        arg[3,0,0,0]=(0.0463415093786)*x[0]+(0.650085996364)*x[1]
-        arg[3,0,0,1]=(-0.440939509697)*x[0]+(-0.323307669473)*x[1]
-        arg[3,0,1,0]=(0.273356160699)*x[0]+(-0.66721600197)*x[1]
-        arg[3,0,1,1]=(1.29465477714)*x[0]+(-0.37486215111)*x[1]
-        arg[3,0,2,0]=(-0.809896216106)*x[0]+(-1.51076103892)*x[1]
-        arg[3,0,2,1]=(0.686428827303)*x[0]+(-0.538164742287)*x[1]
-        arg[3,1,0,0]=(-0.863651610678)*x[0]+(0.673803453645)*x[1]
-        arg[3,1,0,1]=(0.526827519816)*x[0]+(-0.0379595314201)*x[1]
-        arg[3,1,1,0]=(-1.04759557033)*x[0]+(0.114198098457)*x[1]
-        arg[3,1,1,1]=(0.552205171704)*x[0]+(0.116364312378)*x[1]
-        arg[3,1,2,0]=(-0.926549911354)*x[0]+(0.296927704155)*x[1]
-        arg[3,1,2,1]=(0.46702104365)*x[0]+(0.355015968814)*x[1]
-        arg[3,2,0,0]=(0.603177046544)*x[0]+(-0.600600764625)*x[1]
-        arg[3,2,0,1]=(0.656827398088)*x[0]+(1.19922812106)*x[1]
-        arg[3,2,1,0]=(-0.0185352951675)*x[0]+(-0.575006610999)*x[1]
-        arg[3,2,1,1]=(0.954361462974)*x[0]+(-0.239751892125)*x[1]
-        arg[3,2,2,0]=(0.880568376655)*x[0]+(1.46879509876)*x[1]
-        arg[3,2,2,1]=(-1.19051913627)*x[0]+(-0.0387119361514)*x[1]
-        arg[3,3,0,0]=(1.19520855834)*x[0]+(1.3515728248)*x[1]
-        arg[3,3,0,1]=(0.695487159903)*x[0]+(0.783460154378)*x[1]
-        arg[3,3,1,0]=(0.482352542106)*x[0]+(-1.321707654)*x[1]
-        arg[3,3,1,1]=(0.0637384915311)*x[0]+(-0.5903067787)*x[1]
-        arg[3,3,2,0]=(0.571974795979)*x[0]+(1.33251727342)*x[1]
-        arg[3,3,2,1]=(0.579723470137)*x[0]+(-0.260885275522)*x[1]
-        arg[3,4,0,0]=(0.0717612359082)*x[0]+(-0.576982745638)*x[1]
-        arg[3,4,0,1]=(-0.227660227523)*x[0]+(0.232974094548)*x[1]
-        arg[3,4,1,0]=(0.767797269581)*x[0]+(0.98857043831)*x[1]
-        arg[3,4,1,1]=(0.31200408415)*x[0]+(-0.8317658048)*x[1]
-        arg[3,4,2,0]=(0.381688388928)*x[0]+(-0.335620162467)*x[1]
-        arg[3,4,2,1]=(0.781228510591)*x[0]+(0.960966953643)*x[1]
-        ref[0,0,0,0]=(0.507324804235)*x_ref[0]+(0.725831700089)*x_ref[1]
-        ref[0,0,0,1]=(0.847901454936)*x_ref[0]+(0.84787024099)*x_ref[1]
-        ref[0,0,1,0]=(0.221488465784)*x_ref[0]+(0.0449286988708)*x_ref[1]
-        ref[0,0,1,1]=(0.00897176578501)*x_ref[0]+(-0.799118487206)*x_ref[1]
-        ref[0,0,2,0]=(0.171491682599)*x_ref[0]+(1.0259065872)*x_ref[1]
-        ref[0,0,2,1]=(-0.213244683798)*x_ref[0]+(-0.706816385516)*x_ref[1]
-        ref[0,1,0,0]=(1.54199875186)*x_ref[0]+(-1.09479402082)*x_ref[1]
-        ref[0,1,0,1]=(-0.755278051349)*x_ref[0]+(-0.371785089226)*x_ref[1]
-        ref[0,1,1,0]=(-0.798931370137)*x_ref[0]+(-0.716047155117)*x_ref[1]
-        ref[0,1,1,1]=(-0.79104072521)*x_ref[0]+(-1.45842710768)*x_ref[1]
-        ref[0,1,2,0]=(-0.489161301965)*x_ref[0]+(0.115368605994)*x_ref[1]
-        ref[0,1,2,1]=(0.00167228618616)*x_ref[0]+(-0.636896504873)*x_ref[1]
-        ref[0,2,0,0]=(-0.239182729045)*x_ref[0]+(0.470786327067)*x_ref[1]
-        ref[0,2,0,1]=(0.182105943188)*x_ref[0]+(0.328443662342)*x_ref[1]
-        ref[0,2,1,0]=(0.000476540430199)*x_ref[0]+(-0.498066512126)*x_ref[1]
-        ref[0,2,1,1]=(-0.822985659305)*x_ref[0]+(-0.118645880185)*x_ref[1]
-        ref[0,2,2,0]=(1.18375382554)*x_ref[0]+(1.51417307474)*x_ref[1]
-        ref[0,2,2,1]=(-0.99755868797)*x_ref[0]+(-1.4187068658)*x_ref[1]
-        ref[0,3,0,0]=(-0.0908782314954)*x_ref[0]+(-0.25901340471)*x_ref[1]
-        ref[0,3,0,1]=(-1.77626335863)*x_ref[0]+(-0.862132832663)*x_ref[1]
-        ref[0,3,1,0]=(0.532147327491)*x_ref[0]+(0.454949026506)*x_ref[1]
-        ref[0,3,1,1]=(-0.882307958628)*x_ref[0]+(0.00780544746858)*x_ref[1]
-        ref[0,3,2,0]=(0.700104420574)*x_ref[0]+(0.720508036709)*x_ref[1]
-        ref[0,3,2,1]=(-1.27167118811)*x_ref[0]+(-0.372999410908)*x_ref[1]
-        ref[0,4,0,0]=(0.396222903345)*x_ref[0]+(1.70664799562)*x_ref[1]
-        ref[0,4,0,1]=(0.229159055372)*x_ref[0]+(0.0162677758439)*x_ref[1]
-        ref[0,4,1,0]=(1.69470499818)*x_ref[0]+(0.0971804891468)*x_ref[1]
-        ref[0,4,1,1]=(0.180710573838)*x_ref[0]+(1.05311557127)*x_ref[1]
-        ref[0,4,2,0]=(-0.072661496917)*x_ref[0]+(0.466256643644)*x_ref[1]
-        ref[0,4,2,1]=(0.25755631084)*x_ref[0]+(0.306990925808)*x_ref[1]
-        ref[1,0,0,0]=(0.835353191317)*x_ref[0]+(-0.619237060145)*x_ref[1]
-        ref[1,0,0,1]=(1.02966866371)*x_ref[0]+(0.327724003031)*x_ref[1]
-        ref[1,0,1,0]=(-0.59214788986)*x_ref[0]+(-0.927738485428)*x_ref[1]
-        ref[1,0,1,1]=(-0.805929278446)*x_ref[0]+(-0.366113927406)*x_ref[1]
-        ref[1,0,2,0]=(0.952876155721)*x_ref[0]+(0.490531201467)*x_ref[1]
-        ref[1,0,2,1]=(1.44341651657)*x_ref[0]+(-0.269899260772)*x_ref[1]
-        ref[1,1,0,0]=(0.302587966785)*x_ref[0]+(-0.0373883991695)*x_ref[1]
-        ref[1,1,0,1]=(0.77498995648)*x_ref[0]+(1.81052574555)*x_ref[1]
-        ref[1,1,1,0]=(1.47950560134)*x_ref[0]+(-0.714878219566)*x_ref[1]
-        ref[1,1,1,1]=(0.0713827629606)*x_ref[0]+(-1.22018291576)*x_ref[1]
-        ref[1,1,2,0]=(1.30715631604)*x_ref[0]+(-0.191666253513)*x_ref[1]
-        ref[1,1,2,1]=(0.330921962628)*x_ref[0]+(-1.57160261912)*x_ref[1]
-        ref[1,2,0,0]=(0.593477126597)*x_ref[0]+(0.728196634765)*x_ref[1]
-        ref[1,2,0,1]=(0.853860342143)*x_ref[0]+(0.142625101433)*x_ref[1]
-        ref[1,2,1,0]=(-0.743590115343)*x_ref[0]+(0.108893736366)*x_ref[1]
-        ref[1,2,1,1]=(-0.651514863459)*x_ref[0]+(0.365517180762)*x_ref[1]
-        ref[1,2,2,0]=(1.491516719)*x_ref[0]+(0.28900806658)*x_ref[1]
-        ref[1,2,2,1]=(1.23733736339)*x_ref[0]+(-0.58438294882)*x_ref[1]
-        ref[1,3,0,0]=(0.185696018505)*x_ref[0]+(-1.29119084907)*x_ref[1]
-        ref[1,3,0,1]=(1.73584656085)*x_ref[0]+(0.720989518003)*x_ref[1]
-        ref[1,3,1,0]=(-1.16044192371)*x_ref[0]+(-0.131128994204)*x_ref[1]
-        ref[1,3,1,1]=(-0.00913995119508)*x_ref[0]+(0.506516682557)*x_ref[1]
-        ref[1,3,2,0]=(-1.4970171408)*x_ref[0]+(0.692262679219)*x_ref[1]
-        ref[1,3,2,1]=(0.433442352395)*x_ref[0]+(-0.118782513258)*x_ref[1]
-        ref[1,4,0,0]=(0.186272280804)*x_ref[0]+(-0.136627137097)*x_ref[1]
-        ref[1,4,0,1]=(1.25477168515)*x_ref[0]+(-0.0871831369474)*x_ref[1]
-        ref[1,4,1,0]=(1.22746022677)*x_ref[0]+(0.799329883559)*x_ref[1]
-        ref[1,4,1,1]=(-0.756298280123)*x_ref[0]+(0.317500967634)*x_ref[1]
-        ref[1,4,2,0]=(0.201184703435)*x_ref[0]+(-0.116537935236)*x_ref[1]
-        ref[1,4,2,1]=(0.851291897607)*x_ref[0]+(0.404063606516)*x_ref[1]
-        ref[2,0,0,0]=(-0.257605370026)*x_ref[0]+(-0.202424701671)*x_ref[1]
-        ref[2,0,0,1]=(0.0219332720675)*x_ref[0]+(0.518222103227)*x_ref[1]
-        ref[2,0,1,0]=(1.03726036144)*x_ref[0]+(-1.01482867596)*x_ref[1]
-        ref[2,0,1,1]=(0.00677025785109)*x_ref[0]+(0.607932484906)*x_ref[1]
-        ref[2,0,2,0]=(-0.753000974637)*x_ref[0]+(0.112884693676)*x_ref[1]
-        ref[2,0,2,1]=(-0.585627190582)*x_ref[0]+(0.548136242722)*x_ref[1]
-        ref[2,1,0,0]=(0.382466685883)*x_ref[0]+(-1.15520454298)*x_ref[1]
-        ref[2,1,0,1]=(-0.722705123323)*x_ref[0]+(-0.599069291154)*x_ref[1]
-        ref[2,1,1,0]=(-0.845885208256)*x_ref[0]+(-1.56066350212)*x_ref[1]
-        ref[2,1,1,1]=(-1.31472469553)*x_ref[0]+(0.18973548452)*x_ref[1]
-        ref[2,1,2,0]=(-0.419142599733)*x_ref[0]+(1.43873372527)*x_ref[1]
-        ref[2,1,2,1]=(0.22685530286)*x_ref[0]+(-0.53636714393)*x_ref[1]
-        ref[2,2,0,0]=(1.32884214935)*x_ref[0]+(-0.377575726395)*x_ref[1]
-        ref[2,2,0,1]=(0.0845542736847)*x_ref[0]+(0.0888339000429)*x_ref[1]
-        ref[2,2,1,0]=(-1.05813285521)*x_ref[0]+(-0.980382395463)*x_ref[1]
-        ref[2,2,1,1]=(0.306785463268)*x_ref[0]+(0.622558337967)*x_ref[1]
-        ref[2,2,2,0]=(-0.765475308614)*x_ref[0]+(1.40320055807)*x_ref[1]
-        ref[2,2,2,1]=(-1.23199081441)*x_ref[0]+(0.245517841221)*x_ref[1]
-        ref[2,3,0,0]=(0.655775411743)*x_ref[0]+(-1.09496249546)*x_ref[1]
-        ref[2,3,0,1]=(-1.57906394006)*x_ref[0]+(-0.223321547826)*x_ref[1]
-        ref[2,3,1,0]=(-0.329934697034)*x_ref[0]+(-1.36492062074)*x_ref[1]
-        ref[2,3,1,1]=(1.2584701256)*x_ref[0]+(0.172958559745)*x_ref[1]
-        ref[2,3,2,0]=(0.265769150885)*x_ref[0]+(-0.273148332255)*x_ref[1]
-        ref[2,3,2,1]=(-1.18294356647)*x_ref[0]+(-0.269813147795)*x_ref[1]
-        ref[2,4,0,0]=(-1.80352122024)*x_ref[0]+(-0.417693287507)*x_ref[1]
-        ref[2,4,0,1]=(0.829979623343)*x_ref[0]+(0.0526239642579)*x_ref[1]
-        ref[2,4,1,0]=(0.967999103063)*x_ref[0]+(0.0184170526665)*x_ref[1]
-        ref[2,4,1,1]=(-0.326938715134)*x_ref[0]+(-0.575040647639)*x_ref[1]
-        ref[2,4,2,0]=(1.44727400099)*x_ref[0]+(0.710269500685)*x_ref[1]
-        ref[2,4,2,1]=(-0.248166665809)*x_ref[0]+(0.247820501661)*x_ref[1]
-        ref[3,0,0,0]=(0.0463415093786)*x_ref[0]+(0.650085996364)*x_ref[1]
-        ref[3,0,0,1]=(-0.440939509697)*x_ref[0]+(-0.323307669473)*x_ref[1]
-        ref[3,0,1,0]=(0.273356160699)*x_ref[0]+(-0.66721600197)*x_ref[1]
-        ref[3,0,1,1]=(1.29465477714)*x_ref[0]+(-0.37486215111)*x_ref[1]
-        ref[3,0,2,0]=(-0.809896216106)*x_ref[0]+(-1.51076103892)*x_ref[1]
-        ref[3,0,2,1]=(0.686428827303)*x_ref[0]+(-0.538164742287)*x_ref[1]
-        ref[3,1,0,0]=(-0.863651610678)*x_ref[0]+(0.673803453645)*x_ref[1]
-        ref[3,1,0,1]=(0.526827519816)*x_ref[0]+(-0.0379595314201)*x_ref[1]
-        ref[3,1,1,0]=(-1.04759557033)*x_ref[0]+(0.114198098457)*x_ref[1]
-        ref[3,1,1,1]=(0.552205171704)*x_ref[0]+(0.116364312378)*x_ref[1]
-        ref[3,1,2,0]=(-0.926549911354)*x_ref[0]+(0.296927704155)*x_ref[1]
-        ref[3,1,2,1]=(0.46702104365)*x_ref[0]+(0.355015968814)*x_ref[1]
-        ref[3,2,0,0]=(0.603177046544)*x_ref[0]+(-0.600600764625)*x_ref[1]
-        ref[3,2,0,1]=(0.656827398088)*x_ref[0]+(1.19922812106)*x_ref[1]
-        ref[3,2,1,0]=(-0.0185352951675)*x_ref[0]+(-0.575006610999)*x_ref[1]
-        ref[3,2,1,1]=(0.954361462974)*x_ref[0]+(-0.239751892125)*x_ref[1]
-        ref[3,2,2,0]=(0.880568376655)*x_ref[0]+(1.46879509876)*x_ref[1]
-        ref[3,2,2,1]=(-1.19051913627)*x_ref[0]+(-0.0387119361514)*x_ref[1]
-        ref[3,3,0,0]=(1.19520855834)*x_ref[0]+(1.3515728248)*x_ref[1]
-        ref[3,3,0,1]=(0.695487159903)*x_ref[0]+(0.783460154378)*x_ref[1]
-        ref[3,3,1,0]=(0.482352542106)*x_ref[0]+(-1.321707654)*x_ref[1]
-        ref[3,3,1,1]=(0.0637384915311)*x_ref[0]+(-0.5903067787)*x_ref[1]
-        ref[3,3,2,0]=(0.571974795979)*x_ref[0]+(1.33251727342)*x_ref[1]
-        ref[3,3,2,1]=(0.579723470137)*x_ref[0]+(-0.260885275522)*x_ref[1]
-        ref[3,4,0,0]=(0.0717612359082)*x_ref[0]+(-0.576982745638)*x_ref[1]
-        ref[3,4,0,1]=(-0.227660227523)*x_ref[0]+(0.232974094548)*x_ref[1]
-        ref[3,4,1,0]=(0.767797269581)*x_ref[0]+(0.98857043831)*x_ref[1]
-        ref[3,4,1,1]=(0.31200408415)*x_ref[0]+(-0.8317658048)*x_ref[1]
-        ref[3,4,2,0]=(0.381688388928)*x_ref[0]+(-0.335620162467)*x_ref[1]
-        ref[3,4,2,1]=(0.781228510591)*x_ref[0]+(0.960966953643)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.875410081875)*x[0]+(0.859961622438)*x[1]+(0.716805919947)*x[2]
-        arg[0,0,0,1]=(0.343337453662)*x[0]+(0.802028072985)*x[1]+(0.588370750348)*x[2]
-        arg[0,0,1,0]=(0.467615640242)*x[0]+(0.0457804028001)*x[1]+(-0.163677176662)*x[2]
-        arg[0,0,1,1]=(-0.46378923457)*x[0]+(1.29379360824)*x[1]+(0.183839231748)*x[2]
-        arg[0,0,2,0]=(1.65864647053)*x[0]+(1.23523675105)*x[1]+(-0.556155025527)*x[2]
-        arg[0,0,2,1]=(-0.41581445233)*x[0]+(-0.0709880820438)*x[1]+(0.45785589934)*x[2]
-        arg[0,1,0,0]=(1.83790068156)*x[0]+(-0.1690836925)*x[1]+(1.25356286366)*x[2]
-        arg[0,1,0,1]=(-0.22584314958)*x[0]+(0.684595424346)*x[1]+(1.13919885217)*x[2]
-        arg[0,1,1,0]=(1.02792150528)*x[0]+(-0.312817626145)*x[1]+(-0.121465758957)*x[2]
-        arg[0,1,1,1]=(0.533491564413)*x[0]+(-0.62208812136)*x[1]+(-0.717947781071)*x[2]
-        arg[0,1,2,0]=(-0.864505701555)*x[0]+(-0.296047724934)*x[1]+(-0.122917018588)*x[2]
-        arg[0,1,2,1]=(1.05520768182)*x[0]+(0.662053590424)*x[1]+(0.0251841065476)*x[2]
-        arg[0,2,0,0]=(-0.408305818721)*x[0]+(-0.355992587618)*x[1]+(-0.075231462678)*x[2]
-        arg[0,2,0,1]=(0.926563898549)*x[0]+(0.203358704647)*x[1]+(-0.365269987808)*x[2]
-        arg[0,2,1,0]=(-0.403860257745)*x[0]+(-0.0312835722524)*x[1]+(0.241379582617)*x[2]
-        arg[0,2,1,1]=(-0.287297815371)*x[0]+(-0.381813267253)*x[1]+(0.46047051318)*x[2]
-        arg[0,2,2,0]=(-0.168164506906)*x[0]+(-1.24152426841)*x[1]+(-0.629704769515)*x[2]
-        arg[0,2,2,1]=(-0.937219354291)*x[0]+(-0.736950161299)*x[1]+(0.284057170092)*x[2]
-        arg[0,3,0,0]=(-0.292205445759)*x[0]+(1.21842674086)*x[1]+(0.608979796402)*x[2]
-        arg[0,3,0,1]=(0.53232240924)*x[0]+(0.226439017439)*x[1]+(-0.42603939944)*x[2]
-        arg[0,3,1,0]=(1.67410358342)*x[0]+(-0.00813619771347)*x[1]+(-0.463361889732)*x[2]
-        arg[0,3,1,1]=(1.3991502461)*x[0]+(0.239999857694)*x[1]+(-0.369907067208)*x[2]
-        arg[0,3,2,0]=(-0.248767913403)*x[0]+(0.893584158229)*x[1]+(1.97656682548)*x[2]
-        arg[0,3,2,1]=(-0.835046144341)*x[0]+(-0.00979850832247)*x[1]+(-0.281439904932)*x[2]
-        arg[0,4,0,0]=(0.974179494371)*x[0]+(-0.0432121220464)*x[1]+(-0.475018088554)*x[2]
-        arg[0,4,0,1]=(0.245490151034)*x[0]+(-0.367572047585)*x[1]+(-0.926123425123)*x[2]
-        arg[0,4,1,0]=(-0.239057491277)*x[0]+(0.339734302574)*x[1]+(0.760546363123)*x[2]
-        arg[0,4,1,1]=(-1.0425426898)*x[0]+(0.774210702874)*x[1]+(-1.15990543484)*x[2]
-        arg[0,4,2,0]=(1.02994063274)*x[0]+(1.69313195574)*x[1]+(-1.02468862318)*x[2]
-        arg[0,4,2,1]=(0.221805673731)*x[0]+(-1.06588014758)*x[1]+(-0.546973870537)*x[2]
-        arg[1,0,0,0]=(-0.140765393552)*x[0]+(-0.309057115268)*x[1]+(0.07814948965)*x[2]
-        arg[1,0,0,1]=(-0.29622101259)*x[0]+(-1.0654452087)*x[1]+(1.77500323701)*x[2]
-        arg[1,0,1,0]=(1.13202947738)*x[0]+(-0.515454892388)*x[1]+(-1.34230346013)*x[2]
-        arg[1,0,1,1]=(1.50210238409)*x[0]+(-0.75673088573)*x[1]+(-0.792078632258)*x[2]
-        arg[1,0,2,0]=(0.249111383954)*x[0]+(-0.972418007776)*x[1]+(0.766060429469)*x[2]
-        arg[1,0,2,1]=(-0.0710717292409)*x[0]+(0.164949706666)*x[1]+(1.46045331387)*x[2]
-        arg[1,1,0,0]=(-0.587668209291)*x[0]+(0.303249169818)*x[1]+(0.352197808782)*x[2]
-        arg[1,1,0,1]=(-0.145609904248)*x[0]+(0.91895760024)*x[1]+(-1.25063091478)*x[2]
-        arg[1,1,1,0]=(0.450869946651)*x[0]+(0.752704827905)*x[1]+(0.132042943533)*x[2]
-        arg[1,1,1,1]=(-0.87296460294)*x[0]+(-0.459840609019)*x[1]+(0.422574948491)*x[2]
-        arg[1,1,2,0]=(0.828459269131)*x[0]+(0.45869153936)*x[1]+(0.854640684176)*x[2]
-        arg[1,1,2,1]=(1.84720399473)*x[0]+(0.0416642546234)*x[1]+(-0.309583524852)*x[2]
-        arg[1,2,0,0]=(-1.12563293246)*x[0]+(0.0142184473972)*x[1]+(-1.18150362584)*x[2]
-        arg[1,2,0,1]=(-0.0750965768147)*x[0]+(-0.419276687751)*x[1]+(0.521012213863)*x[2]
-        arg[1,2,1,0]=(-1.06905807284)*x[0]+(0.692258030743)*x[1]+(0.262254909068)*x[2]
-        arg[1,2,1,1]=(0.0552441016888)*x[0]+(-0.131040560322)*x[1]+(-0.321517725963)*x[2]
-        arg[1,2,2,0]=(-0.740410514693)*x[0]+(0.219020143899)*x[1]+(1.35104682965)*x[2]
-        arg[1,2,2,1]=(-1.38198583939)*x[0]+(-0.19342887842)*x[1]+(-0.780008129494)*x[2]
-        arg[1,3,0,0]=(0.378358305605)*x[0]+(1.32138618734)*x[1]+(0.627209784997)*x[2]
-        arg[1,3,0,1]=(-0.0383657917537)*x[0]+(-1.41770189628)*x[1]+(-1.21625280681)*x[2]
-        arg[1,3,1,0]=(0.819666413875)*x[0]+(0.160369878383)*x[1]+(-0.229388558682)*x[2]
-        arg[1,3,1,1]=(0.393409555876)*x[0]+(-0.525985341296)*x[1]+(-1.11892438309)*x[2]
-        arg[1,3,2,0]=(0.145077010777)*x[0]+(0.229800008438)*x[1]+(-0.202652862622)*x[2]
-        arg[1,3,2,1]=(-1.48698378177)*x[0]+(0.553698672636)*x[1]+(-0.427263736796)*x[2]
-        arg[1,4,0,0]=(-0.129527725249)*x[0]+(-0.639824801211)*x[1]+(0.759081980717)*x[2]
-        arg[1,4,0,1]=(-0.117772473784)*x[0]+(0.387474104611)*x[1]+(0.507306747135)*x[2]
-        arg[1,4,1,0]=(-0.82518622198)*x[0]+(-0.754474320343)*x[1]+(-0.978049152511)*x[2]
-        arg[1,4,1,1]=(-0.370385633483)*x[0]+(-0.348429423043)*x[1]+(-0.254278257899)*x[2]
-        arg[1,4,2,0]=(1.42596167697)*x[0]+(-0.871785904514)*x[1]+(-0.5343959325)*x[2]
-        arg[1,4,2,1]=(0.817877672506)*x[0]+(-0.222622791737)*x[1]+(-0.677237468595)*x[2]
-        arg[2,0,0,0]=(0.877660484813)*x[0]+(0.818663846913)*x[1]+(-1.26520874625)*x[2]
-        arg[2,0,0,1]=(-0.822344385073)*x[0]+(-0.274691696266)*x[1]+(-0.35079248697)*x[2]
-        arg[2,0,1,0]=(-0.319040285312)*x[0]+(-0.750406131559)*x[1]+(-0.920332967032)*x[2]
-        arg[2,0,1,1]=(1.48758278445)*x[0]+(1.30587557873)*x[1]+(0.230692557888)*x[2]
-        arg[2,0,2,0]=(1.44269354043)*x[0]+(-0.63270356894)*x[1]+(0.229323632455)*x[2]
-        arg[2,0,2,1]=(-0.645065877536)*x[0]+(-0.393083499676)*x[1]+(-0.305117645453)*x[2]
-        arg[2,1,0,0]=(-0.63304134143)*x[0]+(0.0664768401917)*x[1]+(0.87587743066)*x[2]
-        arg[2,1,0,1]=(-0.531856958285)*x[0]+(0.747953146648)*x[1]+(1.23560779546)*x[2]
-        arg[2,1,1,0]=(0.0564479101025)*x[0]+(0.546307803332)*x[1]+(0.655044890368)*x[2]
-        arg[2,1,1,1]=(-1.12793057228)*x[0]+(-0.736676194013)*x[1]+(0.0375913829411)*x[2]
-        arg[2,1,2,0]=(-0.531384188067)*x[0]+(0.249416904081)*x[1]+(0.711430712986)*x[2]
-        arg[2,1,2,1]=(0.884244664065)*x[0]+(0.456066941968)*x[1]+(0.181630861785)*x[2]
-        arg[2,2,0,0]=(0.0844543345062)*x[0]+(-0.435288041256)*x[1]+(-0.434816763062)*x[2]
-        arg[2,2,0,1]=(0.373388105049)*x[0]+(0.239833846429)*x[1]+(-0.437771573282)*x[2]
-        arg[2,2,1,0]=(0.534401521907)*x[0]+(0.393077203448)*x[1]+(-0.42440387717)*x[2]
-        arg[2,2,1,1]=(0.318683369617)*x[0]+(-0.538864643793)*x[1]+(1.83466945806)*x[2]
-        arg[2,2,2,0]=(-1.79048122074)*x[0]+(-1.05441213478)*x[1]+(-0.573963806281)*x[2]
-        arg[2,2,2,1]=(0.944017405182)*x[0]+(0.772756791538)*x[1]+(0.0269673237336)*x[2]
-        arg[2,3,0,0]=(0.989703689142)*x[0]+(1.21302325945)*x[1]+(-0.92209419073)*x[2]
-        arg[2,3,0,1]=(-0.0957244757576)*x[0]+(1.50132638315)*x[1]+(-1.38716099756)*x[2]
-        arg[2,3,1,0]=(1.6445441776)*x[0]+(-0.490207070694)*x[1]+(0.626469347781)*x[2]
-        arg[2,3,1,1]=(0.0185568939147)*x[0]+(0.412024752941)*x[1]+(-0.22626102813)*x[2]
-        arg[2,3,2,0]=(0.0143609822966)*x[0]+(0.115739025893)*x[1]+(-0.544468631925)*x[2]
-        arg[2,3,2,1]=(-1.80522341493)*x[0]+(0.33352152695)*x[1]+(-0.841286464932)*x[2]
-        arg[2,4,0,0]=(0.0618444122042)*x[0]+(1.91232484622)*x[1]+(-0.406317200023)*x[2]
-        arg[2,4,0,1]=(0.279131062922)*x[0]+(0.0194232637634)*x[1]+(-0.00179069113634)*x[2]
-        arg[2,4,1,0]=(-0.701344579135)*x[0]+(-0.27410935473)*x[1]+(0.763362100733)*x[2]
-        arg[2,4,1,1]=(0.831198601185)*x[0]+(0.90336781771)*x[1]+(1.21856633382)*x[2]
-        arg[2,4,2,0]=(0.526278615033)*x[0]+(-1.08673855801)*x[1]+(0.0784355900913)*x[2]
-        arg[2,4,2,1]=(0.853226856851)*x[0]+(-1.15919062627)*x[1]+(0.185686031732)*x[2]
-        arg[3,0,0,0]=(0.272127498117)*x[0]+(-0.457140162438)*x[1]+(0.318358670541)*x[2]
-        arg[3,0,0,1]=(1.71056378307)*x[0]+(0.200052730234)*x[1]+(-0.127733325792)*x[2]
-        arg[3,0,1,0]=(-0.285340963261)*x[0]+(-0.524544624385)*x[1]+(0.916366474944)*x[2]
-        arg[3,0,1,1]=(-0.625506557557)*x[0]+(1.0858476479)*x[1]+(-1.24478983268)*x[2]
-        arg[3,0,2,0]=(-1.37299619916)*x[0]+(-0.482246528202)*x[1]+(-1.36857669075)*x[2]
-        arg[3,0,2,1]=(-0.924421844916)*x[0]+(-1.50402098115)*x[1]+(1.00045130673)*x[2]
-        arg[3,1,0,0]=(0.0417304700827)*x[0]+(0.554527451004)*x[1]+(0.299758163628)*x[2]
-        arg[3,1,0,1]=(0.639611639279)*x[0]+(-0.444675638162)*x[1]+(1.43150046757)*x[2]
-        arg[3,1,1,0]=(0.288697220898)*x[0]+(1.32660433773)*x[1]+(0.0889412116759)*x[2]
-        arg[3,1,1,1]=(-0.110516770201)*x[0]+(-0.0214248733565)*x[1]+(-0.758638794785)*x[2]
-        arg[3,1,2,0]=(1.34357138654)*x[0]+(-0.13759272972)*x[1]+(-0.00183845032784)*x[2]
-        arg[3,1,2,1]=(1.44174769627)*x[0]+(0.49190176388)*x[1]+(0.477331360141)*x[2]
-        arg[3,2,0,0]=(-0.10284777121)*x[0]+(-0.63294157419)*x[1]+(0.246064460451)*x[2]
-        arg[3,2,0,1]=(0.974270980699)*x[0]+(1.03835886161)*x[1]+(0.420000854838)*x[2]
-        arg[3,2,1,0]=(-0.00617831615923)*x[0]+(-0.354063634073)*x[1]+(0.764285884619)*x[2]
-        arg[3,2,1,1]=(0.210815790746)*x[0]+(0.76609515744)*x[1]+(-0.564401558401)*x[2]
-        arg[3,2,2,0]=(1.30471234011)*x[0]+(1.54864119332)*x[1]+(-0.493583650519)*x[2]
-        arg[3,2,2,1]=(0.42287513668)*x[0]+(-0.603093868171)*x[1]+(-0.811892974203)*x[2]
-        arg[3,3,0,0]=(-1.38358134693)*x[0]+(-1.53706018098)*x[1]+(-1.29701227501)*x[2]
-        arg[3,3,0,1]=(0.598581779902)*x[0]+(1.02424010922)*x[1]+(-1.1814313009)*x[2]
-        arg[3,3,1,0]=(1.30938529116)*x[0]+(-0.504468477244)*x[1]+(1.63655848854)*x[2]
-        arg[3,3,1,1]=(-1.47006424113)*x[0]+(0.225951520203)*x[1]+(-0.412273003169)*x[2]
-        arg[3,3,2,0]=(-0.116902234482)*x[0]+(0.488144536044)*x[1]+(1.01732461694)*x[2]
-        arg[3,3,2,1]=(1.0935814877)*x[0]+(1.06389385916)*x[1]+(-0.17981400591)*x[2]
-        arg[3,4,0,0]=(-0.833265062101)*x[0]+(-0.754461148648)*x[1]+(1.26702012815)*x[2]
-        arg[3,4,0,1]=(-0.793744278171)*x[0]+(0.112704521653)*x[1]+(-0.448684922187)*x[2]
-        arg[3,4,1,0]=(-0.396153523625)*x[0]+(-0.0370870723568)*x[1]+(0.554347618511)*x[2]
-        arg[3,4,1,1]=(-0.323276139711)*x[0]+(-0.397389928392)*x[1]+(-1.1707028324)*x[2]
-        arg[3,4,2,0]=(0.823350512513)*x[0]+(1.47105759864)*x[1]+(-0.977456877855)*x[2]
-        arg[3,4,2,1]=(-0.719791170741)*x[0]+(-1.00363340645)*x[1]+(0.814612770572)*x[2]
-        ref[0,0,0,0]=(-0.875410081875)*x_ref[0]+(0.859961622438)*x_ref[1]+(0.716805919947)*x_ref[2]
-        ref[0,0,0,1]=(0.343337453662)*x_ref[0]+(0.802028072985)*x_ref[1]+(0.588370750348)*x_ref[2]
-        ref[0,0,1,0]=(0.467615640242)*x_ref[0]+(0.0457804028001)*x_ref[1]+(-0.163677176662)*x_ref[2]
-        ref[0,0,1,1]=(-0.46378923457)*x_ref[0]+(1.29379360824)*x_ref[1]+(0.183839231748)*x_ref[2]
-        ref[0,0,2,0]=(1.65864647053)*x_ref[0]+(1.23523675105)*x_ref[1]+(-0.556155025527)*x_ref[2]
-        ref[0,0,2,1]=(-0.41581445233)*x_ref[0]+(-0.0709880820438)*x_ref[1]+(0.45785589934)*x_ref[2]
-        ref[0,1,0,0]=(1.83790068156)*x_ref[0]+(-0.1690836925)*x_ref[1]+(1.25356286366)*x_ref[2]
-        ref[0,1,0,1]=(-0.22584314958)*x_ref[0]+(0.684595424346)*x_ref[1]+(1.13919885217)*x_ref[2]
-        ref[0,1,1,0]=(1.02792150528)*x_ref[0]+(-0.312817626145)*x_ref[1]+(-0.121465758957)*x_ref[2]
-        ref[0,1,1,1]=(0.533491564413)*x_ref[0]+(-0.62208812136)*x_ref[1]+(-0.717947781071)*x_ref[2]
-        ref[0,1,2,0]=(-0.864505701555)*x_ref[0]+(-0.296047724934)*x_ref[1]+(-0.122917018588)*x_ref[2]
-        ref[0,1,2,1]=(1.05520768182)*x_ref[0]+(0.662053590424)*x_ref[1]+(0.0251841065476)*x_ref[2]
-        ref[0,2,0,0]=(-0.408305818721)*x_ref[0]+(-0.355992587618)*x_ref[1]+(-0.075231462678)*x_ref[2]
-        ref[0,2,0,1]=(0.926563898549)*x_ref[0]+(0.203358704647)*x_ref[1]+(-0.365269987808)*x_ref[2]
-        ref[0,2,1,0]=(-0.403860257745)*x_ref[0]+(-0.0312835722524)*x_ref[1]+(0.241379582617)*x_ref[2]
-        ref[0,2,1,1]=(-0.287297815371)*x_ref[0]+(-0.381813267253)*x_ref[1]+(0.46047051318)*x_ref[2]
-        ref[0,2,2,0]=(-0.168164506906)*x_ref[0]+(-1.24152426841)*x_ref[1]+(-0.629704769515)*x_ref[2]
-        ref[0,2,2,1]=(-0.937219354291)*x_ref[0]+(-0.736950161299)*x_ref[1]+(0.284057170092)*x_ref[2]
-        ref[0,3,0,0]=(-0.292205445759)*x_ref[0]+(1.21842674086)*x_ref[1]+(0.608979796402)*x_ref[2]
-        ref[0,3,0,1]=(0.53232240924)*x_ref[0]+(0.226439017439)*x_ref[1]+(-0.42603939944)*x_ref[2]
-        ref[0,3,1,0]=(1.67410358342)*x_ref[0]+(-0.00813619771347)*x_ref[1]+(-0.463361889732)*x_ref[2]
-        ref[0,3,1,1]=(1.3991502461)*x_ref[0]+(0.239999857694)*x_ref[1]+(-0.369907067208)*x_ref[2]
-        ref[0,3,2,0]=(-0.248767913403)*x_ref[0]+(0.893584158229)*x_ref[1]+(1.97656682548)*x_ref[2]
-        ref[0,3,2,1]=(-0.835046144341)*x_ref[0]+(-0.00979850832247)*x_ref[1]+(-0.281439904932)*x_ref[2]
-        ref[0,4,0,0]=(0.974179494371)*x_ref[0]+(-0.0432121220464)*x_ref[1]+(-0.475018088554)*x_ref[2]
-        ref[0,4,0,1]=(0.245490151034)*x_ref[0]+(-0.367572047585)*x_ref[1]+(-0.926123425123)*x_ref[2]
-        ref[0,4,1,0]=(-0.239057491277)*x_ref[0]+(0.339734302574)*x_ref[1]+(0.760546363123)*x_ref[2]
-        ref[0,4,1,1]=(-1.0425426898)*x_ref[0]+(0.774210702874)*x_ref[1]+(-1.15990543484)*x_ref[2]
-        ref[0,4,2,0]=(1.02994063274)*x_ref[0]+(1.69313195574)*x_ref[1]+(-1.02468862318)*x_ref[2]
-        ref[0,4,2,1]=(0.221805673731)*x_ref[0]+(-1.06588014758)*x_ref[1]+(-0.546973870537)*x_ref[2]
-        ref[1,0,0,0]=(-0.140765393552)*x_ref[0]+(-0.309057115268)*x_ref[1]+(0.07814948965)*x_ref[2]
-        ref[1,0,0,1]=(-0.29622101259)*x_ref[0]+(-1.0654452087)*x_ref[1]+(1.77500323701)*x_ref[2]
-        ref[1,0,1,0]=(1.13202947738)*x_ref[0]+(-0.515454892388)*x_ref[1]+(-1.34230346013)*x_ref[2]
-        ref[1,0,1,1]=(1.50210238409)*x_ref[0]+(-0.75673088573)*x_ref[1]+(-0.792078632258)*x_ref[2]
-        ref[1,0,2,0]=(0.249111383954)*x_ref[0]+(-0.972418007776)*x_ref[1]+(0.766060429469)*x_ref[2]
-        ref[1,0,2,1]=(-0.0710717292409)*x_ref[0]+(0.164949706666)*x_ref[1]+(1.46045331387)*x_ref[2]
-        ref[1,1,0,0]=(-0.587668209291)*x_ref[0]+(0.303249169818)*x_ref[1]+(0.352197808782)*x_ref[2]
-        ref[1,1,0,1]=(-0.145609904248)*x_ref[0]+(0.91895760024)*x_ref[1]+(-1.25063091478)*x_ref[2]
-        ref[1,1,1,0]=(0.450869946651)*x_ref[0]+(0.752704827905)*x_ref[1]+(0.132042943533)*x_ref[2]
-        ref[1,1,1,1]=(-0.87296460294)*x_ref[0]+(-0.459840609019)*x_ref[1]+(0.422574948491)*x_ref[2]
-        ref[1,1,2,0]=(0.828459269131)*x_ref[0]+(0.45869153936)*x_ref[1]+(0.854640684176)*x_ref[2]
-        ref[1,1,2,1]=(1.84720399473)*x_ref[0]+(0.0416642546234)*x_ref[1]+(-0.309583524852)*x_ref[2]
-        ref[1,2,0,0]=(-1.12563293246)*x_ref[0]+(0.0142184473972)*x_ref[1]+(-1.18150362584)*x_ref[2]
-        ref[1,2,0,1]=(-0.0750965768147)*x_ref[0]+(-0.419276687751)*x_ref[1]+(0.521012213863)*x_ref[2]
-        ref[1,2,1,0]=(-1.06905807284)*x_ref[0]+(0.692258030743)*x_ref[1]+(0.262254909068)*x_ref[2]
-        ref[1,2,1,1]=(0.0552441016888)*x_ref[0]+(-0.131040560322)*x_ref[1]+(-0.321517725963)*x_ref[2]
-        ref[1,2,2,0]=(-0.740410514693)*x_ref[0]+(0.219020143899)*x_ref[1]+(1.35104682965)*x_ref[2]
-        ref[1,2,2,1]=(-1.38198583939)*x_ref[0]+(-0.19342887842)*x_ref[1]+(-0.780008129494)*x_ref[2]
-        ref[1,3,0,0]=(0.378358305605)*x_ref[0]+(1.32138618734)*x_ref[1]+(0.627209784997)*x_ref[2]
-        ref[1,3,0,1]=(-0.0383657917537)*x_ref[0]+(-1.41770189628)*x_ref[1]+(-1.21625280681)*x_ref[2]
-        ref[1,3,1,0]=(0.819666413875)*x_ref[0]+(0.160369878383)*x_ref[1]+(-0.229388558682)*x_ref[2]
-        ref[1,3,1,1]=(0.393409555876)*x_ref[0]+(-0.525985341296)*x_ref[1]+(-1.11892438309)*x_ref[2]
-        ref[1,3,2,0]=(0.145077010777)*x_ref[0]+(0.229800008438)*x_ref[1]+(-0.202652862622)*x_ref[2]
-        ref[1,3,2,1]=(-1.48698378177)*x_ref[0]+(0.553698672636)*x_ref[1]+(-0.427263736796)*x_ref[2]
-        ref[1,4,0,0]=(-0.129527725249)*x_ref[0]+(-0.639824801211)*x_ref[1]+(0.759081980717)*x_ref[2]
-        ref[1,4,0,1]=(-0.117772473784)*x_ref[0]+(0.387474104611)*x_ref[1]+(0.507306747135)*x_ref[2]
-        ref[1,4,1,0]=(-0.82518622198)*x_ref[0]+(-0.754474320343)*x_ref[1]+(-0.978049152511)*x_ref[2]
-        ref[1,4,1,1]=(-0.370385633483)*x_ref[0]+(-0.348429423043)*x_ref[1]+(-0.254278257899)*x_ref[2]
-        ref[1,4,2,0]=(1.42596167697)*x_ref[0]+(-0.871785904514)*x_ref[1]+(-0.5343959325)*x_ref[2]
-        ref[1,4,2,1]=(0.817877672506)*x_ref[0]+(-0.222622791737)*x_ref[1]+(-0.677237468595)*x_ref[2]
-        ref[2,0,0,0]=(0.877660484813)*x_ref[0]+(0.818663846913)*x_ref[1]+(-1.26520874625)*x_ref[2]
-        ref[2,0,0,1]=(-0.822344385073)*x_ref[0]+(-0.274691696266)*x_ref[1]+(-0.35079248697)*x_ref[2]
-        ref[2,0,1,0]=(-0.319040285312)*x_ref[0]+(-0.750406131559)*x_ref[1]+(-0.920332967032)*x_ref[2]
-        ref[2,0,1,1]=(1.48758278445)*x_ref[0]+(1.30587557873)*x_ref[1]+(0.230692557888)*x_ref[2]
-        ref[2,0,2,0]=(1.44269354043)*x_ref[0]+(-0.63270356894)*x_ref[1]+(0.229323632455)*x_ref[2]
-        ref[2,0,2,1]=(-0.645065877536)*x_ref[0]+(-0.393083499676)*x_ref[1]+(-0.305117645453)*x_ref[2]
-        ref[2,1,0,0]=(-0.63304134143)*x_ref[0]+(0.0664768401917)*x_ref[1]+(0.87587743066)*x_ref[2]
-        ref[2,1,0,1]=(-0.531856958285)*x_ref[0]+(0.747953146648)*x_ref[1]+(1.23560779546)*x_ref[2]
-        ref[2,1,1,0]=(0.0564479101025)*x_ref[0]+(0.546307803332)*x_ref[1]+(0.655044890368)*x_ref[2]
-        ref[2,1,1,1]=(-1.12793057228)*x_ref[0]+(-0.736676194013)*x_ref[1]+(0.0375913829411)*x_ref[2]
-        ref[2,1,2,0]=(-0.531384188067)*x_ref[0]+(0.249416904081)*x_ref[1]+(0.711430712986)*x_ref[2]
-        ref[2,1,2,1]=(0.884244664065)*x_ref[0]+(0.456066941968)*x_ref[1]+(0.181630861785)*x_ref[2]
-        ref[2,2,0,0]=(0.0844543345062)*x_ref[0]+(-0.435288041256)*x_ref[1]+(-0.434816763062)*x_ref[2]
-        ref[2,2,0,1]=(0.373388105049)*x_ref[0]+(0.239833846429)*x_ref[1]+(-0.437771573282)*x_ref[2]
-        ref[2,2,1,0]=(0.534401521907)*x_ref[0]+(0.393077203448)*x_ref[1]+(-0.42440387717)*x_ref[2]
-        ref[2,2,1,1]=(0.318683369617)*x_ref[0]+(-0.538864643793)*x_ref[1]+(1.83466945806)*x_ref[2]
-        ref[2,2,2,0]=(-1.79048122074)*x_ref[0]+(-1.05441213478)*x_ref[1]+(-0.573963806281)*x_ref[2]
-        ref[2,2,2,1]=(0.944017405182)*x_ref[0]+(0.772756791538)*x_ref[1]+(0.0269673237336)*x_ref[2]
-        ref[2,3,0,0]=(0.989703689142)*x_ref[0]+(1.21302325945)*x_ref[1]+(-0.92209419073)*x_ref[2]
-        ref[2,3,0,1]=(-0.0957244757576)*x_ref[0]+(1.50132638315)*x_ref[1]+(-1.38716099756)*x_ref[2]
-        ref[2,3,1,0]=(1.6445441776)*x_ref[0]+(-0.490207070694)*x_ref[1]+(0.626469347781)*x_ref[2]
-        ref[2,3,1,1]=(0.0185568939147)*x_ref[0]+(0.412024752941)*x_ref[1]+(-0.22626102813)*x_ref[2]
-        ref[2,3,2,0]=(0.0143609822966)*x_ref[0]+(0.115739025893)*x_ref[1]+(-0.544468631925)*x_ref[2]
-        ref[2,3,2,1]=(-1.80522341493)*x_ref[0]+(0.33352152695)*x_ref[1]+(-0.841286464932)*x_ref[2]
-        ref[2,4,0,0]=(0.0618444122042)*x_ref[0]+(1.91232484622)*x_ref[1]+(-0.406317200023)*x_ref[2]
-        ref[2,4,0,1]=(0.279131062922)*x_ref[0]+(0.0194232637634)*x_ref[1]+(-0.00179069113634)*x_ref[2]
-        ref[2,4,1,0]=(-0.701344579135)*x_ref[0]+(-0.27410935473)*x_ref[1]+(0.763362100733)*x_ref[2]
-        ref[2,4,1,1]=(0.831198601185)*x_ref[0]+(0.90336781771)*x_ref[1]+(1.21856633382)*x_ref[2]
-        ref[2,4,2,0]=(0.526278615033)*x_ref[0]+(-1.08673855801)*x_ref[1]+(0.0784355900913)*x_ref[2]
-        ref[2,4,2,1]=(0.853226856851)*x_ref[0]+(-1.15919062627)*x_ref[1]+(0.185686031732)*x_ref[2]
-        ref[3,0,0,0]=(0.272127498117)*x_ref[0]+(-0.457140162438)*x_ref[1]+(0.318358670541)*x_ref[2]
-        ref[3,0,0,1]=(1.71056378307)*x_ref[0]+(0.200052730234)*x_ref[1]+(-0.127733325792)*x_ref[2]
-        ref[3,0,1,0]=(-0.285340963261)*x_ref[0]+(-0.524544624385)*x_ref[1]+(0.916366474944)*x_ref[2]
-        ref[3,0,1,1]=(-0.625506557557)*x_ref[0]+(1.0858476479)*x_ref[1]+(-1.24478983268)*x_ref[2]
-        ref[3,0,2,0]=(-1.37299619916)*x_ref[0]+(-0.482246528202)*x_ref[1]+(-1.36857669075)*x_ref[2]
-        ref[3,0,2,1]=(-0.924421844916)*x_ref[0]+(-1.50402098115)*x_ref[1]+(1.00045130673)*x_ref[2]
-        ref[3,1,0,0]=(0.0417304700827)*x_ref[0]+(0.554527451004)*x_ref[1]+(0.299758163628)*x_ref[2]
-        ref[3,1,0,1]=(0.639611639279)*x_ref[0]+(-0.444675638162)*x_ref[1]+(1.43150046757)*x_ref[2]
-        ref[3,1,1,0]=(0.288697220898)*x_ref[0]+(1.32660433773)*x_ref[1]+(0.0889412116759)*x_ref[2]
-        ref[3,1,1,1]=(-0.110516770201)*x_ref[0]+(-0.0214248733565)*x_ref[1]+(-0.758638794785)*x_ref[2]
-        ref[3,1,2,0]=(1.34357138654)*x_ref[0]+(-0.13759272972)*x_ref[1]+(-0.00183845032784)*x_ref[2]
-        ref[3,1,2,1]=(1.44174769627)*x_ref[0]+(0.49190176388)*x_ref[1]+(0.477331360141)*x_ref[2]
-        ref[3,2,0,0]=(-0.10284777121)*x_ref[0]+(-0.63294157419)*x_ref[1]+(0.246064460451)*x_ref[2]
-        ref[3,2,0,1]=(0.974270980699)*x_ref[0]+(1.03835886161)*x_ref[1]+(0.420000854838)*x_ref[2]
-        ref[3,2,1,0]=(-0.00617831615923)*x_ref[0]+(-0.354063634073)*x_ref[1]+(0.764285884619)*x_ref[2]
-        ref[3,2,1,1]=(0.210815790746)*x_ref[0]+(0.76609515744)*x_ref[1]+(-0.564401558401)*x_ref[2]
-        ref[3,2,2,0]=(1.30471234011)*x_ref[0]+(1.54864119332)*x_ref[1]+(-0.493583650519)*x_ref[2]
-        ref[3,2,2,1]=(0.42287513668)*x_ref[0]+(-0.603093868171)*x_ref[1]+(-0.811892974203)*x_ref[2]
-        ref[3,3,0,0]=(-1.38358134693)*x_ref[0]+(-1.53706018098)*x_ref[1]+(-1.29701227501)*x_ref[2]
-        ref[3,3,0,1]=(0.598581779902)*x_ref[0]+(1.02424010922)*x_ref[1]+(-1.1814313009)*x_ref[2]
-        ref[3,3,1,0]=(1.30938529116)*x_ref[0]+(-0.504468477244)*x_ref[1]+(1.63655848854)*x_ref[2]
-        ref[3,3,1,1]=(-1.47006424113)*x_ref[0]+(0.225951520203)*x_ref[1]+(-0.412273003169)*x_ref[2]
-        ref[3,3,2,0]=(-0.116902234482)*x_ref[0]+(0.488144536044)*x_ref[1]+(1.01732461694)*x_ref[2]
-        ref[3,3,2,1]=(1.0935814877)*x_ref[0]+(1.06389385916)*x_ref[1]+(-0.17981400591)*x_ref[2]
-        ref[3,4,0,0]=(-0.833265062101)*x_ref[0]+(-0.754461148648)*x_ref[1]+(1.26702012815)*x_ref[2]
-        ref[3,4,0,1]=(-0.793744278171)*x_ref[0]+(0.112704521653)*x_ref[1]+(-0.448684922187)*x_ref[2]
-        ref[3,4,1,0]=(-0.396153523625)*x_ref[0]+(-0.0370870723568)*x_ref[1]+(0.554347618511)*x_ref[2]
-        ref[3,4,1,1]=(-0.323276139711)*x_ref[0]+(-0.397389928392)*x_ref[1]+(-1.1707028324)*x_ref[2]
-        ref[3,4,2,0]=(0.823350512513)*x_ref[0]+(1.47105759864)*x_ref[1]+(-0.977456877855)*x_ref[2]
-        ref[3,4,2,1]=(-0.719791170741)*x_ref[0]+(-1.00363340645)*x_ref[1]+(0.814612770572)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0473893058941)*x[0]+(0.951986966173)*x[1]
-        ref=(0.0473893058941)*x_ref[0]+(0.951986966173)*x_ref[1]
-      else:
-        arg=(1.17583059)*x[0]+(-0.0937717081252)*x[1]+(-1.27613571861)*x[2]
-        ref=(1.17583059)*x_ref[0]+(-0.0937717081252)*x_ref[1]+(-1.27613571861)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        arg[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-        ref[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        ref[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-      else:
-        arg[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        arg[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-        ref[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        ref[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.352147407922)*x[0]+(1.05748871495)*x[1]
-        arg[0,1]=(-0.474780656205)*x[0]+(0.459896921083)*x[1]
-        arg[0,2]=(0.460595468629)*x[0]+(-0.719265552984)*x[1]
-        arg[0,3]=(-0.182481554307)*x[0]+(0.658370858696)*x[1]
-        arg[0,4]=(0.827070331069)*x[0]+(0.461652365051)*x[1]
-        arg[1,0]=(-1.04815178098)*x[0]+(-0.401056329621)*x[1]
-        arg[1,1]=(1.44973151029)*x[0]+(-0.240684558811)*x[1]
-        arg[1,2]=(1.66374138794)*x[0]+(0.77295074874)*x[1]
-        arg[1,3]=(0.367619281099)*x[0]+(1.68735398814)*x[1]
-        arg[1,4]=(-0.609166774517)*x[0]+(-0.236664892047)*x[1]
-        arg[2,0]=(0.517168891914)*x[0]+(0.14465722282)*x[1]
-        arg[2,1]=(1.44226468541)*x[0]+(0.138272882962)*x[1]
-        arg[2,2]=(1.48139408702)*x[0]+(0.858274661903)*x[1]
-        arg[2,3]=(-0.313581651419)*x[0]+(0.23082842733)*x[1]
-        arg[2,4]=(-0.174268737758)*x[0]+(-0.21537909808)*x[1]
-        arg[3,0]=(-0.228982633638)*x[0]+(0.469215862849)*x[1]
-        arg[3,1]=(1.13696568169)*x[0]+(0.937455803513)*x[1]
-        arg[3,2]=(-0.104407288228)*x[0]+(0.695766113469)*x[1]
-        arg[3,3]=(-0.854996521846)*x[0]+(-0.112176127951)*x[1]
-        arg[3,4]=(-0.995531601234)*x[0]+(0.0800402854558)*x[1]
-        ref[0,0]=(-0.352147407922)*x_ref[0]+(1.05748871495)*x_ref[1]
-        ref[0,1]=(-0.474780656205)*x_ref[0]+(0.459896921083)*x_ref[1]
-        ref[0,2]=(0.460595468629)*x_ref[0]+(-0.719265552984)*x_ref[1]
-        ref[0,3]=(-0.182481554307)*x_ref[0]+(0.658370858696)*x_ref[1]
-        ref[0,4]=(0.827070331069)*x_ref[0]+(0.461652365051)*x_ref[1]
-        ref[1,0]=(-1.04815178098)*x_ref[0]+(-0.401056329621)*x_ref[1]
-        ref[1,1]=(1.44973151029)*x_ref[0]+(-0.240684558811)*x_ref[1]
-        ref[1,2]=(1.66374138794)*x_ref[0]+(0.77295074874)*x_ref[1]
-        ref[1,3]=(0.367619281099)*x_ref[0]+(1.68735398814)*x_ref[1]
-        ref[1,4]=(-0.609166774517)*x_ref[0]+(-0.236664892047)*x_ref[1]
-        ref[2,0]=(0.517168891914)*x_ref[0]+(0.14465722282)*x_ref[1]
-        ref[2,1]=(1.44226468541)*x_ref[0]+(0.138272882962)*x_ref[1]
-        ref[2,2]=(1.48139408702)*x_ref[0]+(0.858274661903)*x_ref[1]
-        ref[2,3]=(-0.313581651419)*x_ref[0]+(0.23082842733)*x_ref[1]
-        ref[2,4]=(-0.174268737758)*x_ref[0]+(-0.21537909808)*x_ref[1]
-        ref[3,0]=(-0.228982633638)*x_ref[0]+(0.469215862849)*x_ref[1]
-        ref[3,1]=(1.13696568169)*x_ref[0]+(0.937455803513)*x_ref[1]
-        ref[3,2]=(-0.104407288228)*x_ref[0]+(0.695766113469)*x_ref[1]
-        ref[3,3]=(-0.854996521846)*x_ref[0]+(-0.112176127951)*x_ref[1]
-        ref[3,4]=(-0.995531601234)*x_ref[0]+(0.0800402854558)*x_ref[1]
-      else:
-        arg[0,0]=(-1.37643176268)*x[0]+(-0.1427781822)*x[1]+(-0.959699369061)*x[2]
-        arg[0,1]=(-0.182711571685)*x[0]+(0.961312900413)*x[1]+(1.51040175428)*x[2]
-        arg[0,2]=(0.705353375057)*x[0]+(-0.486345048698)*x[1]+(0.276322756959)*x[2]
-        arg[0,3]=(0.617751891549)*x[0]+(0.842087813554)*x[1]+(0.181498577908)*x[2]
-        arg[0,4]=(-0.806056649748)*x[0]+(-1.46464582218)*x[1]+(1.16207385717)*x[2]
-        arg[1,0]=(0.443056731112)*x[0]+(-0.227362546034)*x[1]+(-0.34165958927)*x[2]
-        arg[1,1]=(-0.0914572456267)*x[0]+(-1.45454323755)*x[1]+(-0.197767792435)*x[2]
-        arg[1,2]=(-0.0294645792971)*x[0]+(0.154875742902)*x[1]+(0.227583590411)*x[2]
-        arg[1,3]=(0.0412025551742)*x[0]+(0.263462610593)*x[1]+(-0.916261691981)*x[2]
-        arg[1,4]=(0.436907441126)*x[0]+(1.69979623684)*x[1]+(1.28829395572)*x[2]
-        arg[2,0]=(0.328651176462)*x[0]+(1.15129657872)*x[1]+(0.288790490546)*x[2]
-        arg[2,1]=(0.603244456904)*x[0]+(0.579263327926)*x[1]+(1.29848862962)*x[2]
-        arg[2,2]=(1.20931621113)*x[0]+(1.45214239482)*x[1]+(-0.859270540382)*x[2]
-        arg[2,3]=(-0.313390836289)*x[0]+(1.29725175689)*x[1]+(-0.677628108203)*x[2]
-        arg[2,4]=(-0.182499400988)*x[0]+(-0.150297906549)*x[1]+(-0.0239318512478)*x[2]
-        arg[3,0]=(1.24015393707)*x[0]+(0.0747824863962)*x[1]+(0.0762786991199)*x[2]
-        arg[3,1]=(0.0278504259683)*x[0]+(-1.03121188802)*x[1]+(-1.1241189107)*x[2]
-        arg[3,2]=(-0.014656978991)*x[0]+(-0.0946814312886)*x[1]+(0.281133656449)*x[2]
-        arg[3,3]=(0.0763735895586)*x[0]+(-0.878856395577)*x[1]+(-0.0317884442673)*x[2]
-        arg[3,4]=(-0.0394676966134)*x[0]+(0.491771511608)*x[1]+(0.270055976645)*x[2]
-        ref[0,0]=(-1.37643176268)*x_ref[0]+(-0.1427781822)*x_ref[1]+(-0.959699369061)*x_ref[2]
-        ref[0,1]=(-0.182711571685)*x_ref[0]+(0.961312900413)*x_ref[1]+(1.51040175428)*x_ref[2]
-        ref[0,2]=(0.705353375057)*x_ref[0]+(-0.486345048698)*x_ref[1]+(0.276322756959)*x_ref[2]
-        ref[0,3]=(0.617751891549)*x_ref[0]+(0.842087813554)*x_ref[1]+(0.181498577908)*x_ref[2]
-        ref[0,4]=(-0.806056649748)*x_ref[0]+(-1.46464582218)*x_ref[1]+(1.16207385717)*x_ref[2]
-        ref[1,0]=(0.443056731112)*x_ref[0]+(-0.227362546034)*x_ref[1]+(-0.34165958927)*x_ref[2]
-        ref[1,1]=(-0.0914572456267)*x_ref[0]+(-1.45454323755)*x_ref[1]+(-0.197767792435)*x_ref[2]
-        ref[1,2]=(-0.0294645792971)*x_ref[0]+(0.154875742902)*x_ref[1]+(0.227583590411)*x_ref[2]
-        ref[1,3]=(0.0412025551742)*x_ref[0]+(0.263462610593)*x_ref[1]+(-0.916261691981)*x_ref[2]
-        ref[1,4]=(0.436907441126)*x_ref[0]+(1.69979623684)*x_ref[1]+(1.28829395572)*x_ref[2]
-        ref[2,0]=(0.328651176462)*x_ref[0]+(1.15129657872)*x_ref[1]+(0.288790490546)*x_ref[2]
-        ref[2,1]=(0.603244456904)*x_ref[0]+(0.579263327926)*x_ref[1]+(1.29848862962)*x_ref[2]
-        ref[2,2]=(1.20931621113)*x_ref[0]+(1.45214239482)*x_ref[1]+(-0.859270540382)*x_ref[2]
-        ref[2,3]=(-0.313390836289)*x_ref[0]+(1.29725175689)*x_ref[1]+(-0.677628108203)*x_ref[2]
-        ref[2,4]=(-0.182499400988)*x_ref[0]+(-0.150297906549)*x_ref[1]+(-0.0239318512478)*x_ref[2]
-        ref[3,0]=(1.24015393707)*x_ref[0]+(0.0747824863962)*x_ref[1]+(0.0762786991199)*x_ref[2]
-        ref[3,1]=(0.0278504259683)*x_ref[0]+(-1.03121188802)*x_ref[1]+(-1.1241189107)*x_ref[2]
-        ref[3,2]=(-0.014656978991)*x_ref[0]+(-0.0946814312886)*x_ref[1]+(0.281133656449)*x_ref[2]
-        ref[3,3]=(0.0763735895586)*x_ref[0]+(-0.878856395577)*x_ref[1]+(-0.0317884442673)*x_ref[2]
-        ref[3,4]=(-0.0394676966134)*x_ref[0]+(0.491771511608)*x_ref[1]+(0.270055976645)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.648027713097)*x[0]+(0.454772464521)*x[1]
-        arg[0,0,1]=(-1.04215194027)*x[0]+(1.77272186309)*x[1]
-        arg[0,1,0]=(0.957518940744)*x[0]+(-0.00690667683404)*x[1]
-        arg[0,1,1]=(0.498748880149)*x[0]+(0.259327852057)*x[1]
-        arg[1,0,0]=(0.0289932206553)*x[0]+(-0.0536452199935)*x[1]
-        arg[1,0,1]=(1.87294208563)*x[0]+(-1.51381628261)*x[1]
-        arg[1,1,0]=(-1.23040396582)*x[0]+(0.554662981657)*x[1]
-        arg[1,1,1]=(-0.860941498913)*x[0]+(0.574367240324)*x[1]
-        arg[2,0,0]=(0.137130620331)*x[0]+(-0.670662009715)*x[1]
-        arg[2,0,1]=(-0.01425641324)*x[0]+(0.938457397733)*x[1]
-        arg[2,1,0]=(-1.19963811258)*x[0]+(0.644324590438)*x[1]
-        arg[2,1,1]=(1.95704700194e-05)*x[0]+(-1.38366302093)*x[1]
-        arg[3,0,0]=(-0.340745623814)*x[0]+(0.250094821868)*x[1]
-        arg[3,0,1]=(-1.29605858834)*x[0]+(0.960366146641)*x[1]
-        arg[3,1,0]=(0.550081967023)*x[0]+(0.288502329322)*x[1]
-        arg[3,1,1]=(0.732775194015)*x[0]+(-0.0386387970031)*x[1]
-        arg[4,0,0]=(-0.849770148692)*x[0]+(-0.436107981485)*x[1]
-        arg[4,0,1]=(0.11202465528)*x[0]+(1.66934758318)*x[1]
-        arg[4,1,0]=(-0.0549275626402)*x[0]+(0.75026785816)*x[1]
-        arg[4,1,1]=(-0.351732868571)*x[0]+(0.892311743034)*x[1]
-        arg[5,0,0]=(-0.744188679625)*x[0]+(0.335492215064)*x[1]
-        arg[5,0,1]=(-0.998395994344)*x[0]+(-1.10552505805)*x[1]
-        arg[5,1,0]=(-0.125733052457)*x[0]+(0.433627801831)*x[1]
-        arg[5,1,1]=(-0.0704342146568)*x[0]+(-1.38357990003)*x[1]
-        ref[0,0,0]=(-0.648027713097)*x_ref[0]+(0.454772464521)*x_ref[1]
-        ref[0,0,1]=(-1.04215194027)*x_ref[0]+(1.77272186309)*x_ref[1]
-        ref[0,1,0]=(0.957518940744)*x_ref[0]+(-0.00690667683404)*x_ref[1]
-        ref[0,1,1]=(0.498748880149)*x_ref[0]+(0.259327852057)*x_ref[1]
-        ref[1,0,0]=(0.0289932206553)*x_ref[0]+(-0.0536452199935)*x_ref[1]
-        ref[1,0,1]=(1.87294208563)*x_ref[0]+(-1.51381628261)*x_ref[1]
-        ref[1,1,0]=(-1.23040396582)*x_ref[0]+(0.554662981657)*x_ref[1]
-        ref[1,1,1]=(-0.860941498913)*x_ref[0]+(0.574367240324)*x_ref[1]
-        ref[2,0,0]=(0.137130620331)*x_ref[0]+(-0.670662009715)*x_ref[1]
-        ref[2,0,1]=(-0.01425641324)*x_ref[0]+(0.938457397733)*x_ref[1]
-        ref[2,1,0]=(-1.19963811258)*x_ref[0]+(0.644324590438)*x_ref[1]
-        ref[2,1,1]=(1.95704700194e-05)*x_ref[0]+(-1.38366302093)*x_ref[1]
-        ref[3,0,0]=(-0.340745623814)*x_ref[0]+(0.250094821868)*x_ref[1]
-        ref[3,0,1]=(-1.29605858834)*x_ref[0]+(0.960366146641)*x_ref[1]
-        ref[3,1,0]=(0.550081967023)*x_ref[0]+(0.288502329322)*x_ref[1]
-        ref[3,1,1]=(0.732775194015)*x_ref[0]+(-0.0386387970031)*x_ref[1]
-        ref[4,0,0]=(-0.849770148692)*x_ref[0]+(-0.436107981485)*x_ref[1]
-        ref[4,0,1]=(0.11202465528)*x_ref[0]+(1.66934758318)*x_ref[1]
-        ref[4,1,0]=(-0.0549275626402)*x_ref[0]+(0.75026785816)*x_ref[1]
-        ref[4,1,1]=(-0.351732868571)*x_ref[0]+(0.892311743034)*x_ref[1]
-        ref[5,0,0]=(-0.744188679625)*x_ref[0]+(0.335492215064)*x_ref[1]
-        ref[5,0,1]=(-0.998395994344)*x_ref[0]+(-1.10552505805)*x_ref[1]
-        ref[5,1,0]=(-0.125733052457)*x_ref[0]+(0.433627801831)*x_ref[1]
-        ref[5,1,1]=(-0.0704342146568)*x_ref[0]+(-1.38357990003)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.514282046117)*x[0]+(-0.323828864786)*x[1]+(1.01124693935)*x[2]
-        arg[0,0,1]=(-0.621932286265)*x[0]+(-0.797795969893)*x[1]+(-0.0773166049033)*x[2]
-        arg[0,1,0]=(-0.874326235403)*x[0]+(1.20497718671)*x[1]+(-0.327967753068)*x[2]
-        arg[0,1,1]=(0.951360009956)*x[0]+(-1.21275900525)*x[1]+(-0.018534105952)*x[2]
-        arg[1,0,0]=(0.281987835612)*x[0]+(-1.19722794418)*x[1]+(1.1763726345)*x[2]
-        arg[1,0,1]=(-0.32305643761)*x[0]+(-1.03791873988)*x[1]+(-0.27820297843)*x[2]
-        arg[1,1,0]=(-0.250435095454)*x[0]+(-0.214489103641)*x[1]+(0.24396821423)*x[2]
-        arg[1,1,1]=(0.579357080067)*x[0]+(-0.0941366284697)*x[1]+(0.723253564904)*x[2]
-        arg[2,0,0]=(0.0300521887548)*x[0]+(0.856925059877)*x[1]+(1.62627876391)*x[2]
-        arg[2,0,1]=(0.852347895674)*x[0]+(0.206107771527)*x[1]+(0.117053849317)*x[2]
-        arg[2,1,0]=(0.398984864506)*x[0]+(-0.547599955809)*x[1]+(0.960920641374)*x[2]
-        arg[2,1,1]=(-0.958823099193)*x[0]+(0.781951729915)*x[1]+(0.450383856811)*x[2]
-        arg[3,0,0]=(0.229905485668)*x[0]+(0.13732685767)*x[1]+(0.512823357151)*x[2]
-        arg[3,0,1]=(-1.85513528612)*x[0]+(1.26641983818)*x[1]+(1.23786450856)*x[2]
-        arg[3,1,0]=(-1.42722463673)*x[0]+(1.39168597069)*x[1]+(0.268597738146)*x[2]
-        arg[3,1,1]=(0.290999479499)*x[0]+(0.948263729849)*x[1]+(-1.60034455324)*x[2]
-        arg[4,0,0]=(-0.755582573265)*x[0]+(-0.0499101766292)*x[1]+(0.0615553965851)*x[2]
-        arg[4,0,1]=(0.437479529174)*x[0]+(-1.05498330706)*x[1]+(-0.707627367761)*x[2]
-        arg[4,1,0]=(0.608125820223)*x[0]+(0.893214773163)*x[1]+(-1.28896829926)*x[2]
-        arg[4,1,1]=(0.953486972425)*x[0]+(1.41823237022)*x[1]+(-0.0439589309603)*x[2]
-        arg[5,0,0]=(1.06772863677)*x[0]+(0.25868918695)*x[1]+(-0.118887800607)*x[2]
-        arg[5,0,1]=(0.407678657671)*x[0]+(-0.464724724076)*x[1]+(0.249621788892)*x[2]
-        arg[5,1,0]=(-0.516649619366)*x[0]+(-1.7414783126)*x[1]+(-1.1378435051)*x[2]
-        arg[5,1,1]=(-0.805463452054)*x[0]+(-0.189909983229)*x[1]+(-0.127169486885)*x[2]
-        ref[0,0,0]=(0.514282046117)*x_ref[0]+(-0.323828864786)*x_ref[1]+(1.01124693935)*x_ref[2]
-        ref[0,0,1]=(-0.621932286265)*x_ref[0]+(-0.797795969893)*x_ref[1]+(-0.0773166049033)*x_ref[2]
-        ref[0,1,0]=(-0.874326235403)*x_ref[0]+(1.20497718671)*x_ref[1]+(-0.327967753068)*x_ref[2]
-        ref[0,1,1]=(0.951360009956)*x_ref[0]+(-1.21275900525)*x_ref[1]+(-0.018534105952)*x_ref[2]
-        ref[1,0,0]=(0.281987835612)*x_ref[0]+(-1.19722794418)*x_ref[1]+(1.1763726345)*x_ref[2]
-        ref[1,0,1]=(-0.32305643761)*x_ref[0]+(-1.03791873988)*x_ref[1]+(-0.27820297843)*x_ref[2]
-        ref[1,1,0]=(-0.250435095454)*x_ref[0]+(-0.214489103641)*x_ref[1]+(0.24396821423)*x_ref[2]
-        ref[1,1,1]=(0.579357080067)*x_ref[0]+(-0.0941366284697)*x_ref[1]+(0.723253564904)*x_ref[2]
-        ref[2,0,0]=(0.0300521887548)*x_ref[0]+(0.856925059877)*x_ref[1]+(1.62627876391)*x_ref[2]
-        ref[2,0,1]=(0.852347895674)*x_ref[0]+(0.206107771527)*x_ref[1]+(0.117053849317)*x_ref[2]
-        ref[2,1,0]=(0.398984864506)*x_ref[0]+(-0.547599955809)*x_ref[1]+(0.960920641374)*x_ref[2]
-        ref[2,1,1]=(-0.958823099193)*x_ref[0]+(0.781951729915)*x_ref[1]+(0.450383856811)*x_ref[2]
-        ref[3,0,0]=(0.229905485668)*x_ref[0]+(0.13732685767)*x_ref[1]+(0.512823357151)*x_ref[2]
-        ref[3,0,1]=(-1.85513528612)*x_ref[0]+(1.26641983818)*x_ref[1]+(1.23786450856)*x_ref[2]
-        ref[3,1,0]=(-1.42722463673)*x_ref[0]+(1.39168597069)*x_ref[1]+(0.268597738146)*x_ref[2]
-        ref[3,1,1]=(0.290999479499)*x_ref[0]+(0.948263729849)*x_ref[1]+(-1.60034455324)*x_ref[2]
-        ref[4,0,0]=(-0.755582573265)*x_ref[0]+(-0.0499101766292)*x_ref[1]+(0.0615553965851)*x_ref[2]
-        ref[4,0,1]=(0.437479529174)*x_ref[0]+(-1.05498330706)*x_ref[1]+(-0.707627367761)*x_ref[2]
-        ref[4,1,0]=(0.608125820223)*x_ref[0]+(0.893214773163)*x_ref[1]+(-1.28896829926)*x_ref[2]
-        ref[4,1,1]=(0.953486972425)*x_ref[0]+(1.41823237022)*x_ref[1]+(-0.0439589309603)*x_ref[2]
-        ref[5,0,0]=(1.06772863677)*x_ref[0]+(0.25868918695)*x_ref[1]+(-0.118887800607)*x_ref[2]
-        ref[5,0,1]=(0.407678657671)*x_ref[0]+(-0.464724724076)*x_ref[1]+(0.249621788892)*x_ref[2]
-        ref[5,1,0]=(-0.516649619366)*x_ref[0]+(-1.7414783126)*x_ref[1]+(-1.1378435051)*x_ref[2]
-        ref[5,1,1]=(-0.805463452054)*x_ref[0]+(-0.189909983229)*x_ref[1]+(-0.127169486885)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0345299040391)*x[0]+(-0.454395763203)*x[1]
-        arg[0,0,0,1]=(0.816055157967)*x[0]+(1.65538436278)*x[1]
-        arg[0,0,1,0]=(0.0173895492935)*x[0]+(0.390351555311)*x[1]
-        arg[0,0,1,1]=(0.0601948568001)*x[0]+(0.221935674716)*x[1]
-        arg[0,0,2,0]=(-0.86832157368)*x[0]+(0.719344815038)*x[1]
-        arg[0,0,2,1]=(1.25819429092)*x[0]+(-0.626192861251)*x[1]
-        arg[0,1,0,0]=(-0.408148703502)*x[0]+(0.614498083344)*x[1]
-        arg[0,1,0,1]=(-0.948405669606)*x[0]+(-0.431912186759)*x[1]
-        arg[0,1,1,0]=(1.31545349201)*x[0]+(-1.43633966996)*x[1]
-        arg[0,1,1,1]=(-0.262029058642)*x[0]+(-0.211155762782)*x[1]
-        arg[0,1,2,0]=(-1.29637408623)*x[0]+(0.015300306679)*x[1]
-        arg[0,1,2,1]=(-0.338105266735)*x[0]+(-1.17464147824)*x[1]
-        arg[0,2,0,0]=(-1.29420036616)*x[0]+(0.162651211594)*x[1]
-        arg[0,2,0,1]=(-0.524474022859)*x[0]+(-0.606176834607)*x[1]
-        arg[0,2,1,0]=(1.43089226048)*x[0]+(-1.4419171599)*x[1]
-        arg[0,2,1,1]=(1.2204089172)*x[0]+(0.642504226769)*x[1]
-        arg[0,2,2,0]=(-1.43093048803)*x[0]+(-0.220023978143)*x[1]
-        arg[0,2,2,1]=(-1.03649750995)*x[0]+(0.169884643951)*x[1]
-        arg[0,3,0,0]=(-0.250124925508)*x[0]+(-0.46412090099)*x[1]
-        arg[0,3,0,1]=(-0.534018976189)*x[0]+(-0.118541672182)*x[1]
-        arg[0,3,1,0]=(-1.79137479214)*x[0]+(0.662559958387)*x[1]
-        arg[0,3,1,1]=(-0.881482101487)*x[0]+(0.372532785249)*x[1]
-        arg[0,3,2,0]=(-1.71336096366)*x[0]+(-1.24175201959)*x[1]
-        arg[0,3,2,1]=(0.384581239528)*x[0]+(-0.131008110136)*x[1]
-        arg[0,4,0,0]=(0.315863164115)*x[0]+(-0.494712527335)*x[1]
-        arg[0,4,0,1]=(-1.10002713328)*x[0]+(0.129861779935)*x[1]
-        arg[0,4,1,0]=(1.10412289984)*x[0]+(1.34015931457)*x[1]
-        arg[0,4,1,1]=(-0.692340206781)*x[0]+(1.08467851048)*x[1]
-        arg[0,4,2,0]=(-0.0972657457169)*x[0]+(1.0145314899)*x[1]
-        arg[0,4,2,1]=(0.299871193443)*x[0]+(-0.470271033392)*x[1]
-        arg[1,0,0,0]=(-0.724229380092)*x[0]+(1.14448991134)*x[1]
-        arg[1,0,0,1]=(0.154147313948)*x[0]+(-0.318350887819)*x[1]
-        arg[1,0,1,0]=(-1.2997484551)*x[0]+(0.00645216870018)*x[1]
-        arg[1,0,1,1]=(1.53322180988)*x[0]+(-0.356405349895)*x[1]
-        arg[1,0,2,0]=(0.971184272781)*x[0]+(1.07821077146)*x[1]
-        arg[1,0,2,1]=(0.000530732762419)*x[0]+(0.955934156926)*x[1]
-        arg[1,1,0,0]=(-0.180982534825)*x[0]+(1.33554642886)*x[1]
-        arg[1,1,0,1]=(-0.419614369168)*x[0]+(-0.51201636845)*x[1]
-        arg[1,1,1,0]=(-0.263686990653)*x[0]+(-0.463089568134)*x[1]
-        arg[1,1,1,1]=(-0.792982985293)*x[0]+(-0.720992794822)*x[1]
-        arg[1,1,2,0]=(1.72981591311)*x[0]+(-0.305755746837)*x[1]
-        arg[1,1,2,1]=(0.874057242127)*x[0]+(0.247839316695)*x[1]
-        arg[1,2,0,0]=(1.20726244725)*x[0]+(0.44394602451)*x[1]
-        arg[1,2,0,1]=(-0.516016832395)*x[0]+(0.036120494771)*x[1]
-        arg[1,2,1,0]=(-0.157245073014)*x[0]+(0.845240869121)*x[1]
-        arg[1,2,1,1]=(0.588082465766)*x[0]+(0.195937663431)*x[1]
-        arg[1,2,2,0]=(0.095726763028)*x[0]+(-0.177757031723)*x[1]
-        arg[1,2,2,1]=(1.73215168642)*x[0]+(-0.189154112108)*x[1]
-        arg[1,3,0,0]=(-1.76621021161)*x[0]+(0.367931299124)*x[1]
-        arg[1,3,0,1]=(0.0222607642178)*x[0]+(0.466368587137)*x[1]
-        arg[1,3,1,0]=(0.412132176201)*x[0]+(0.553362139129)*x[1]
-        arg[1,3,1,1]=(-1.08306042349)*x[0]+(-0.834943125248)*x[1]
-        arg[1,3,2,0]=(-0.417451930632)*x[0]+(-0.659233486131)*x[1]
-        arg[1,3,2,1]=(-0.400333106519)*x[0]+(0.854889031906)*x[1]
-        arg[1,4,0,0]=(-0.758414654342)*x[0]+(0.838957251391)*x[1]
-        arg[1,4,0,1]=(-0.353472866001)*x[0]+(0.397138506541)*x[1]
-        arg[1,4,1,0]=(0.127641591916)*x[0]+(0.327603318651)*x[1]
-        arg[1,4,1,1]=(-0.341040162377)*x[0]+(-0.846062323778)*x[1]
-        arg[1,4,2,0]=(-0.293356226448)*x[0]+(-0.700648323903)*x[1]
-        arg[1,4,2,1]=(-0.228549394688)*x[0]+(1.43724938876)*x[1]
-        arg[2,0,0,0]=(-0.322023776234)*x[0]+(0.564889094588)*x[1]
-        arg[2,0,0,1]=(-1.11907082102)*x[0]+(-1.39374772922)*x[1]
-        arg[2,0,1,0]=(-0.705740617022)*x[0]+(0.511499218842)*x[1]
-        arg[2,0,1,1]=(0.454111255253)*x[0]+(-1.69843226881)*x[1]
-        arg[2,0,2,0]=(-0.317781478691)*x[0]+(-1.35991309273)*x[1]
-        arg[2,0,2,1]=(1.54613408914)*x[0]+(1.32901459805)*x[1]
-        arg[2,1,0,0]=(0.837517924208)*x[0]+(-0.386149637251)*x[1]
-        arg[2,1,0,1]=(0.961896547496)*x[0]+(0.617366532183)*x[1]
-        arg[2,1,1,0]=(-0.124021064331)*x[0]+(1.45238030663)*x[1]
-        arg[2,1,1,1]=(-1.34194701555)*x[0]+(-0.479310148218)*x[1]
-        arg[2,1,2,0]=(-0.813567438318)*x[0]+(0.35270597356)*x[1]
-        arg[2,1,2,1]=(0.833034787475)*x[0]+(-0.108648813503)*x[1]
-        arg[2,2,0,0]=(-1.36052757115)*x[0]+(-0.528858737068)*x[1]
-        arg[2,2,0,1]=(0.348085718404)*x[0]+(-0.550199132198)*x[1]
-        arg[2,2,1,0]=(-0.592064932053)*x[0]+(0.268729595158)*x[1]
-        arg[2,2,1,1]=(0.762201961036)*x[0]+(-0.170275800619)*x[1]
-        arg[2,2,2,0]=(0.292508257449)*x[0]+(0.546726460436)*x[1]
-        arg[2,2,2,1]=(-0.832981468483)*x[0]+(-1.01580974142)*x[1]
-        arg[2,3,0,0]=(-0.0778970282444)*x[0]+(-0.0588582131822)*x[1]
-        arg[2,3,0,1]=(-0.462860486423)*x[0]+(0.938910405107)*x[1]
-        arg[2,3,1,0]=(0.274056697467)*x[0]+(0.0938367562972)*x[1]
-        arg[2,3,1,1]=(0.168689167517)*x[0]+(-0.486345829711)*x[1]
-        arg[2,3,2,0]=(-1.33699397485)*x[0]+(-0.863623492326)*x[1]
-        arg[2,3,2,1]=(-0.317889793298)*x[0]+(0.47526951533)*x[1]
-        arg[2,4,0,0]=(-1.26561106959)*x[0]+(0.0486883091899)*x[1]
-        arg[2,4,0,1]=(-1.37742147186)*x[0]+(-1.14365670741)*x[1]
-        arg[2,4,1,0]=(0.891487506649)*x[0]+(-1.02149537779)*x[1]
-        arg[2,4,1,1]=(0.120446738176)*x[0]+(1.128322636)*x[1]
-        arg[2,4,2,0]=(-0.322931882495)*x[0]+(-0.00993625804164)*x[1]
-        arg[2,4,2,1]=(0.17764198759)*x[0]+(0.311937789824)*x[1]
-        arg[3,0,0,0]=(0.482490440467)*x[0]+(0.98496437249)*x[1]
-        arg[3,0,0,1]=(-0.174114820802)*x[0]+(0.442866651846)*x[1]
-        arg[3,0,1,0]=(-0.934180386688)*x[0]+(-1.33361314957)*x[1]
-        arg[3,0,1,1]=(0.0452285929122)*x[0]+(0.686705971575)*x[1]
-        arg[3,0,2,0]=(0.839801283293)*x[0]+(-0.967697483261)*x[1]
-        arg[3,0,2,1]=(0.14250663194)*x[0]+(-1.3515960506)*x[1]
-        arg[3,1,0,0]=(-0.322855905664)*x[0]+(0.177298330914)*x[1]
-        arg[3,1,0,1]=(-0.376491734039)*x[0]+(0.451059427164)*x[1]
-        arg[3,1,1,0]=(0.817537444737)*x[0]+(-0.93908061343)*x[1]
-        arg[3,1,1,1]=(-0.0753530118606)*x[0]+(-0.0718596035883)*x[1]
-        arg[3,1,2,0]=(-1.48772358944)*x[0]+(0.414823807711)*x[1]
-        arg[3,1,2,1]=(0.857324284797)*x[0]+(0.47131796901)*x[1]
-        arg[3,2,0,0]=(0.440034775536)*x[0]+(0.712881563582)*x[1]
-        arg[3,2,0,1]=(-1.05547066)*x[0]+(0.718956424358)*x[1]
-        arg[3,2,1,0]=(-1.40526673086)*x[0]+(-0.366871542135)*x[1]
-        arg[3,2,1,1]=(1.65950470328)*x[0]+(-1.65805816594)*x[1]
-        arg[3,2,2,0]=(1.09096918876)*x[0]+(-1.33325242756)*x[1]
-        arg[3,2,2,1]=(-0.591939877469)*x[0]+(1.0303591776)*x[1]
-        arg[3,3,0,0]=(-0.969754780364)*x[0]+(-0.0145852822005)*x[1]
-        arg[3,3,0,1]=(-1.22384841753)*x[0]+(-0.0867406833581)*x[1]
-        arg[3,3,1,0]=(0.673272022388)*x[0]+(0.947486168095)*x[1]
-        arg[3,3,1,1]=(-0.41449883684)*x[0]+(0.137714746421)*x[1]
-        arg[3,3,2,0]=(0.874598196414)*x[0]+(0.436570682065)*x[1]
-        arg[3,3,2,1]=(0.127986513106)*x[0]+(0.955109334387)*x[1]
-        arg[3,4,0,0]=(0.226160174687)*x[0]+(-0.258282204272)*x[1]
-        arg[3,4,0,1]=(-0.157570106985)*x[0]+(-0.299582244336)*x[1]
-        arg[3,4,1,0]=(0.305056978098)*x[0]+(1.34807929179)*x[1]
-        arg[3,4,1,1]=(1.16863934732)*x[0]+(-0.265384337877)*x[1]
-        arg[3,4,2,0]=(1.26265936998)*x[0]+(0.379703748135)*x[1]
-        arg[3,4,2,1]=(-0.392236938104)*x[0]+(0.829704189106)*x[1]
-        ref[0,0,0,0]=(-0.0345299040391)*x_ref[0]+(-0.454395763203)*x_ref[1]
-        ref[0,0,0,1]=(0.816055157967)*x_ref[0]+(1.65538436278)*x_ref[1]
-        ref[0,0,1,0]=(0.0173895492935)*x_ref[0]+(0.390351555311)*x_ref[1]
-        ref[0,0,1,1]=(0.0601948568001)*x_ref[0]+(0.221935674716)*x_ref[1]
-        ref[0,0,2,0]=(-0.86832157368)*x_ref[0]+(0.719344815038)*x_ref[1]
-        ref[0,0,2,1]=(1.25819429092)*x_ref[0]+(-0.626192861251)*x_ref[1]
-        ref[0,1,0,0]=(-0.408148703502)*x_ref[0]+(0.614498083344)*x_ref[1]
-        ref[0,1,0,1]=(-0.948405669606)*x_ref[0]+(-0.431912186759)*x_ref[1]
-        ref[0,1,1,0]=(1.31545349201)*x_ref[0]+(-1.43633966996)*x_ref[1]
-        ref[0,1,1,1]=(-0.262029058642)*x_ref[0]+(-0.211155762782)*x_ref[1]
-        ref[0,1,2,0]=(-1.29637408623)*x_ref[0]+(0.015300306679)*x_ref[1]
-        ref[0,1,2,1]=(-0.338105266735)*x_ref[0]+(-1.17464147824)*x_ref[1]
-        ref[0,2,0,0]=(-1.29420036616)*x_ref[0]+(0.162651211594)*x_ref[1]
-        ref[0,2,0,1]=(-0.524474022859)*x_ref[0]+(-0.606176834607)*x_ref[1]
-        ref[0,2,1,0]=(1.43089226048)*x_ref[0]+(-1.4419171599)*x_ref[1]
-        ref[0,2,1,1]=(1.2204089172)*x_ref[0]+(0.642504226769)*x_ref[1]
-        ref[0,2,2,0]=(-1.43093048803)*x_ref[0]+(-0.220023978143)*x_ref[1]
-        ref[0,2,2,1]=(-1.03649750995)*x_ref[0]+(0.169884643951)*x_ref[1]
-        ref[0,3,0,0]=(-0.250124925508)*x_ref[0]+(-0.46412090099)*x_ref[1]
-        ref[0,3,0,1]=(-0.534018976189)*x_ref[0]+(-0.118541672182)*x_ref[1]
-        ref[0,3,1,0]=(-1.79137479214)*x_ref[0]+(0.662559958387)*x_ref[1]
-        ref[0,3,1,1]=(-0.881482101487)*x_ref[0]+(0.372532785249)*x_ref[1]
-        ref[0,3,2,0]=(-1.71336096366)*x_ref[0]+(-1.24175201959)*x_ref[1]
-        ref[0,3,2,1]=(0.384581239528)*x_ref[0]+(-0.131008110136)*x_ref[1]
-        ref[0,4,0,0]=(0.315863164115)*x_ref[0]+(-0.494712527335)*x_ref[1]
-        ref[0,4,0,1]=(-1.10002713328)*x_ref[0]+(0.129861779935)*x_ref[1]
-        ref[0,4,1,0]=(1.10412289984)*x_ref[0]+(1.34015931457)*x_ref[1]
-        ref[0,4,1,1]=(-0.692340206781)*x_ref[0]+(1.08467851048)*x_ref[1]
-        ref[0,4,2,0]=(-0.0972657457169)*x_ref[0]+(1.0145314899)*x_ref[1]
-        ref[0,4,2,1]=(0.299871193443)*x_ref[0]+(-0.470271033392)*x_ref[1]
-        ref[1,0,0,0]=(-0.724229380092)*x_ref[0]+(1.14448991134)*x_ref[1]
-        ref[1,0,0,1]=(0.154147313948)*x_ref[0]+(-0.318350887819)*x_ref[1]
-        ref[1,0,1,0]=(-1.2997484551)*x_ref[0]+(0.00645216870018)*x_ref[1]
-        ref[1,0,1,1]=(1.53322180988)*x_ref[0]+(-0.356405349895)*x_ref[1]
-        ref[1,0,2,0]=(0.971184272781)*x_ref[0]+(1.07821077146)*x_ref[1]
-        ref[1,0,2,1]=(0.000530732762419)*x_ref[0]+(0.955934156926)*x_ref[1]
-        ref[1,1,0,0]=(-0.180982534825)*x_ref[0]+(1.33554642886)*x_ref[1]
-        ref[1,1,0,1]=(-0.419614369168)*x_ref[0]+(-0.51201636845)*x_ref[1]
-        ref[1,1,1,0]=(-0.263686990653)*x_ref[0]+(-0.463089568134)*x_ref[1]
-        ref[1,1,1,1]=(-0.792982985293)*x_ref[0]+(-0.720992794822)*x_ref[1]
-        ref[1,1,2,0]=(1.72981591311)*x_ref[0]+(-0.305755746837)*x_ref[1]
-        ref[1,1,2,1]=(0.874057242127)*x_ref[0]+(0.247839316695)*x_ref[1]
-        ref[1,2,0,0]=(1.20726244725)*x_ref[0]+(0.44394602451)*x_ref[1]
-        ref[1,2,0,1]=(-0.516016832395)*x_ref[0]+(0.036120494771)*x_ref[1]
-        ref[1,2,1,0]=(-0.157245073014)*x_ref[0]+(0.845240869121)*x_ref[1]
-        ref[1,2,1,1]=(0.588082465766)*x_ref[0]+(0.195937663431)*x_ref[1]
-        ref[1,2,2,0]=(0.095726763028)*x_ref[0]+(-0.177757031723)*x_ref[1]
-        ref[1,2,2,1]=(1.73215168642)*x_ref[0]+(-0.189154112108)*x_ref[1]
-        ref[1,3,0,0]=(-1.76621021161)*x_ref[0]+(0.367931299124)*x_ref[1]
-        ref[1,3,0,1]=(0.0222607642178)*x_ref[0]+(0.466368587137)*x_ref[1]
-        ref[1,3,1,0]=(0.412132176201)*x_ref[0]+(0.553362139129)*x_ref[1]
-        ref[1,3,1,1]=(-1.08306042349)*x_ref[0]+(-0.834943125248)*x_ref[1]
-        ref[1,3,2,0]=(-0.417451930632)*x_ref[0]+(-0.659233486131)*x_ref[1]
-        ref[1,3,2,1]=(-0.400333106519)*x_ref[0]+(0.854889031906)*x_ref[1]
-        ref[1,4,0,0]=(-0.758414654342)*x_ref[0]+(0.838957251391)*x_ref[1]
-        ref[1,4,0,1]=(-0.353472866001)*x_ref[0]+(0.397138506541)*x_ref[1]
-        ref[1,4,1,0]=(0.127641591916)*x_ref[0]+(0.327603318651)*x_ref[1]
-        ref[1,4,1,1]=(-0.341040162377)*x_ref[0]+(-0.846062323778)*x_ref[1]
-        ref[1,4,2,0]=(-0.293356226448)*x_ref[0]+(-0.700648323903)*x_ref[1]
-        ref[1,4,2,1]=(-0.228549394688)*x_ref[0]+(1.43724938876)*x_ref[1]
-        ref[2,0,0,0]=(-0.322023776234)*x_ref[0]+(0.564889094588)*x_ref[1]
-        ref[2,0,0,1]=(-1.11907082102)*x_ref[0]+(-1.39374772922)*x_ref[1]
-        ref[2,0,1,0]=(-0.705740617022)*x_ref[0]+(0.511499218842)*x_ref[1]
-        ref[2,0,1,1]=(0.454111255253)*x_ref[0]+(-1.69843226881)*x_ref[1]
-        ref[2,0,2,0]=(-0.317781478691)*x_ref[0]+(-1.35991309273)*x_ref[1]
-        ref[2,0,2,1]=(1.54613408914)*x_ref[0]+(1.32901459805)*x_ref[1]
-        ref[2,1,0,0]=(0.837517924208)*x_ref[0]+(-0.386149637251)*x_ref[1]
-        ref[2,1,0,1]=(0.961896547496)*x_ref[0]+(0.617366532183)*x_ref[1]
-        ref[2,1,1,0]=(-0.124021064331)*x_ref[0]+(1.45238030663)*x_ref[1]
-        ref[2,1,1,1]=(-1.34194701555)*x_ref[0]+(-0.479310148218)*x_ref[1]
-        ref[2,1,2,0]=(-0.813567438318)*x_ref[0]+(0.35270597356)*x_ref[1]
-        ref[2,1,2,1]=(0.833034787475)*x_ref[0]+(-0.108648813503)*x_ref[1]
-        ref[2,2,0,0]=(-1.36052757115)*x_ref[0]+(-0.528858737068)*x_ref[1]
-        ref[2,2,0,1]=(0.348085718404)*x_ref[0]+(-0.550199132198)*x_ref[1]
-        ref[2,2,1,0]=(-0.592064932053)*x_ref[0]+(0.268729595158)*x_ref[1]
-        ref[2,2,1,1]=(0.762201961036)*x_ref[0]+(-0.170275800619)*x_ref[1]
-        ref[2,2,2,0]=(0.292508257449)*x_ref[0]+(0.546726460436)*x_ref[1]
-        ref[2,2,2,1]=(-0.832981468483)*x_ref[0]+(-1.01580974142)*x_ref[1]
-        ref[2,3,0,0]=(-0.0778970282444)*x_ref[0]+(-0.0588582131822)*x_ref[1]
-        ref[2,3,0,1]=(-0.462860486423)*x_ref[0]+(0.938910405107)*x_ref[1]
-        ref[2,3,1,0]=(0.274056697467)*x_ref[0]+(0.0938367562972)*x_ref[1]
-        ref[2,3,1,1]=(0.168689167517)*x_ref[0]+(-0.486345829711)*x_ref[1]
-        ref[2,3,2,0]=(-1.33699397485)*x_ref[0]+(-0.863623492326)*x_ref[1]
-        ref[2,3,2,1]=(-0.317889793298)*x_ref[0]+(0.47526951533)*x_ref[1]
-        ref[2,4,0,0]=(-1.26561106959)*x_ref[0]+(0.0486883091899)*x_ref[1]
-        ref[2,4,0,1]=(-1.37742147186)*x_ref[0]+(-1.14365670741)*x_ref[1]
-        ref[2,4,1,0]=(0.891487506649)*x_ref[0]+(-1.02149537779)*x_ref[1]
-        ref[2,4,1,1]=(0.120446738176)*x_ref[0]+(1.128322636)*x_ref[1]
-        ref[2,4,2,0]=(-0.322931882495)*x_ref[0]+(-0.00993625804164)*x_ref[1]
-        ref[2,4,2,1]=(0.17764198759)*x_ref[0]+(0.311937789824)*x_ref[1]
-        ref[3,0,0,0]=(0.482490440467)*x_ref[0]+(0.98496437249)*x_ref[1]
-        ref[3,0,0,1]=(-0.174114820802)*x_ref[0]+(0.442866651846)*x_ref[1]
-        ref[3,0,1,0]=(-0.934180386688)*x_ref[0]+(-1.33361314957)*x_ref[1]
-        ref[3,0,1,1]=(0.0452285929122)*x_ref[0]+(0.686705971575)*x_ref[1]
-        ref[3,0,2,0]=(0.839801283293)*x_ref[0]+(-0.967697483261)*x_ref[1]
-        ref[3,0,2,1]=(0.14250663194)*x_ref[0]+(-1.3515960506)*x_ref[1]
-        ref[3,1,0,0]=(-0.322855905664)*x_ref[0]+(0.177298330914)*x_ref[1]
-        ref[3,1,0,1]=(-0.376491734039)*x_ref[0]+(0.451059427164)*x_ref[1]
-        ref[3,1,1,0]=(0.817537444737)*x_ref[0]+(-0.93908061343)*x_ref[1]
-        ref[3,1,1,1]=(-0.0753530118606)*x_ref[0]+(-0.0718596035883)*x_ref[1]
-        ref[3,1,2,0]=(-1.48772358944)*x_ref[0]+(0.414823807711)*x_ref[1]
-        ref[3,1,2,1]=(0.857324284797)*x_ref[0]+(0.47131796901)*x_ref[1]
-        ref[3,2,0,0]=(0.440034775536)*x_ref[0]+(0.712881563582)*x_ref[1]
-        ref[3,2,0,1]=(-1.05547066)*x_ref[0]+(0.718956424358)*x_ref[1]
-        ref[3,2,1,0]=(-1.40526673086)*x_ref[0]+(-0.366871542135)*x_ref[1]
-        ref[3,2,1,1]=(1.65950470328)*x_ref[0]+(-1.65805816594)*x_ref[1]
-        ref[3,2,2,0]=(1.09096918876)*x_ref[0]+(-1.33325242756)*x_ref[1]
-        ref[3,2,2,1]=(-0.591939877469)*x_ref[0]+(1.0303591776)*x_ref[1]
-        ref[3,3,0,0]=(-0.969754780364)*x_ref[0]+(-0.0145852822005)*x_ref[1]
-        ref[3,3,0,1]=(-1.22384841753)*x_ref[0]+(-0.0867406833581)*x_ref[1]
-        ref[3,3,1,0]=(0.673272022388)*x_ref[0]+(0.947486168095)*x_ref[1]
-        ref[3,3,1,1]=(-0.41449883684)*x_ref[0]+(0.137714746421)*x_ref[1]
-        ref[3,3,2,0]=(0.874598196414)*x_ref[0]+(0.436570682065)*x_ref[1]
-        ref[3,3,2,1]=(0.127986513106)*x_ref[0]+(0.955109334387)*x_ref[1]
-        ref[3,4,0,0]=(0.226160174687)*x_ref[0]+(-0.258282204272)*x_ref[1]
-        ref[3,4,0,1]=(-0.157570106985)*x_ref[0]+(-0.299582244336)*x_ref[1]
-        ref[3,4,1,0]=(0.305056978098)*x_ref[0]+(1.34807929179)*x_ref[1]
-        ref[3,4,1,1]=(1.16863934732)*x_ref[0]+(-0.265384337877)*x_ref[1]
-        ref[3,4,2,0]=(1.26265936998)*x_ref[0]+(0.379703748135)*x_ref[1]
-        ref[3,4,2,1]=(-0.392236938104)*x_ref[0]+(0.829704189106)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.657131010834)*x[0]+(0.925056704895)*x[1]+(0.405133059909)*x[2]
-        arg[0,0,0,1]=(1.00133275423)*x[0]+(0.804604848583)*x[1]+(-0.127865284577)*x[2]
-        arg[0,0,1,0]=(-1.43854141172)*x[0]+(0.461779683792)*x[1]+(-1.35332048209)*x[2]
-        arg[0,0,1,1]=(0.00990645894894)*x[0]+(-0.127101800988)*x[1]+(-0.105358765313)*x[2]
-        arg[0,0,2,0]=(0.116780997053)*x[0]+(1.14704063829)*x[1]+(-0.0190951296257)*x[2]
-        arg[0,0,2,1]=(0.485352133633)*x[0]+(0.232507104974)*x[1]+(-1.13067055888)*x[2]
-        arg[0,1,0,0]=(-0.350822544873)*x[0]+(-0.812391120478)*x[1]+(0.215924121867)*x[2]
-        arg[0,1,0,1]=(-0.351284651716)*x[0]+(-0.221990440191)*x[1]+(-0.223075105598)*x[2]
-        arg[0,1,1,0]=(-0.148376043654)*x[0]+(0.571632161665)*x[1]+(0.519163900078)*x[2]
-        arg[0,1,1,1]=(-1.45038964408)*x[0]+(0.302237803429)*x[1]+(0.742483356143)*x[2]
-        arg[0,1,2,0]=(-0.504270471573)*x[0]+(0.450418202232)*x[1]+(-0.111778328066)*x[2]
-        arg[0,1,2,1]=(-0.0249264677684)*x[0]+(-1.50643033256)*x[1]+(-1.35775630013)*x[2]
-        arg[0,2,0,0]=(0.303211268309)*x[0]+(-0.464853430563)*x[1]+(0.649958565051)*x[2]
-        arg[0,2,0,1]=(-0.099640500895)*x[0]+(-0.190653996191)*x[1]+(1.25662361146)*x[2]
-        arg[0,2,1,0]=(0.196051285683)*x[0]+(-0.0405207084252)*x[1]+(-0.247626612712)*x[2]
-        arg[0,2,1,1]=(0.466541264508)*x[0]+(1.12203001637)*x[1]+(0.214880867458)*x[2]
-        arg[0,2,2,0]=(-0.066399925725)*x[0]+(-0.246038048418)*x[1]+(-1.36436628718)*x[2]
-        arg[0,2,2,1]=(1.11813537863)*x[0]+(-1.09166896181)*x[1]+(0.321936214135)*x[2]
-        arg[0,3,0,0]=(0.374873324445)*x[0]+(-0.465943548272)*x[1]+(0.0190372923331)*x[2]
-        arg[0,3,0,1]=(0.833988907462)*x[0]+(-1.01195758004)*x[1]+(0.237305351727)*x[2]
-        arg[0,3,1,0]=(0.311900067643)*x[0]+(-1.11508238642)*x[1]+(-1.04912391557)*x[2]
-        arg[0,3,1,1]=(-0.211460991448)*x[0]+(-0.768164308901)*x[1]+(-0.450128967205)*x[2]
-        arg[0,3,2,0]=(-0.412678195326)*x[0]+(-0.0808659043088)*x[1]+(0.588002415672)*x[2]
-        arg[0,3,2,1]=(-1.25661069251)*x[0]+(-1.51596081235)*x[1]+(-1.38001371964)*x[2]
-        arg[0,4,0,0]=(0.0822281994319)*x[0]+(-0.726137997384)*x[1]+(0.20532237702)*x[2]
-        arg[0,4,0,1]=(-0.538872250604)*x[0]+(0.669139417413)*x[1]+(0.235909494023)*x[2]
-        arg[0,4,1,0]=(0.171512295446)*x[0]+(-1.37296529156)*x[1]+(1.25081328539)*x[2]
-        arg[0,4,1,1]=(-0.440062802901)*x[0]+(1.32591598513)*x[1]+(0.802645502519)*x[2]
-        arg[0,4,2,0]=(1.55151533491)*x[0]+(0.923232387757)*x[1]+(-0.238979557225)*x[2]
-        arg[0,4,2,1]=(-0.193306423923)*x[0]+(-0.565399635257)*x[1]+(-0.149043846608)*x[2]
-        arg[1,0,0,0]=(0.152247539316)*x[0]+(-1.219763414)*x[1]+(0.836742536417)*x[2]
-        arg[1,0,0,1]=(0.279236863017)*x[0]+(0.14118432621)*x[1]+(-0.33072070595)*x[2]
-        arg[1,0,1,0]=(-0.242848555181)*x[0]+(-0.981144530476)*x[1]+(-0.925220699112)*x[2]
-        arg[1,0,1,1]=(-1.8765425995)*x[0]+(-0.0878096696901)*x[1]+(0.133461124587)*x[2]
-        arg[1,0,2,0]=(-0.282373512491)*x[0]+(0.640862824684)*x[1]+(-1.41391625471)*x[2]
-        arg[1,0,2,1]=(0.168260007994)*x[0]+(0.660595443409)*x[1]+(1.14161006755)*x[2]
-        arg[1,1,0,0]=(-0.160956063437)*x[0]+(-0.60581390216)*x[1]+(1.28589122111)*x[2]
-        arg[1,1,0,1]=(0.0969448014041)*x[0]+(-1.63715420302)*x[1]+(-0.350879443881)*x[2]
-        arg[1,1,1,0]=(0.0878659583502)*x[0]+(1.13265578932)*x[1]+(-0.615846752768)*x[2]
-        arg[1,1,1,1]=(-0.434597962742)*x[0]+(-0.177532580699)*x[1]+(0.543921860391)*x[2]
-        arg[1,1,2,0]=(-0.7739187322)*x[0]+(-0.285452235523)*x[1]+(-0.0426663737344)*x[2]
-        arg[1,1,2,1]=(0.796313217511)*x[0]+(-1.12909584404)*x[1]+(1.26302048961)*x[2]
-        arg[1,2,0,0]=(1.62555299859)*x[0]+(-1.1660403401)*x[1]+(-0.668592413245)*x[2]
-        arg[1,2,0,1]=(-0.807742954877)*x[0]+(-0.238532476847)*x[1]+(-1.13575189406)*x[2]
-        arg[1,2,1,0]=(-0.139280450456)*x[0]+(-0.043306992095)*x[1]+(0.832351898761)*x[2]
-        arg[1,2,1,1]=(0.16731150192)*x[0]+(0.0705653171485)*x[1]+(0.12943106453)*x[2]
-        arg[1,2,2,0]=(0.669247838367)*x[0]+(1.10177451339)*x[1]+(1.21850224582)*x[2]
-        arg[1,2,2,1]=(-0.779527532537)*x[0]+(0.10943711539)*x[1]+(0.0286417760627)*x[2]
-        arg[1,3,0,0]=(-0.500367153143)*x[0]+(-0.0315766921687)*x[1]+(0.0814977959486)*x[2]
-        arg[1,3,0,1]=(1.44010930702)*x[0]+(0.985266827661)*x[1]+(-0.4777280416)*x[2]
-        arg[1,3,1,0]=(-1.09856159209)*x[0]+(0.914767947742)*x[1]+(0.257975836816)*x[2]
-        arg[1,3,1,1]=(1.20572454864)*x[0]+(-1.18899739672)*x[1]+(-0.881322688875)*x[2]
-        arg[1,3,2,0]=(0.0683727807399)*x[0]+(0.27893403097)*x[1]+(0.532141657019)*x[2]
-        arg[1,3,2,1]=(1.22927878362)*x[0]+(-0.746664730318)*x[1]+(0.706635763178)*x[2]
-        arg[1,4,0,0]=(-0.056381118157)*x[0]+(0.497463663176)*x[1]+(-0.0170016763418)*x[2]
-        arg[1,4,0,1]=(0.220396391337)*x[0]+(-0.311295539709)*x[1]+(-0.0925408150537)*x[2]
-        arg[1,4,1,0]=(-1.26814101481)*x[0]+(1.36544235985)*x[1]+(-0.706223605983)*x[2]
-        arg[1,4,1,1]=(-0.151531826396)*x[0]+(0.709418004406)*x[1]+(0.361464674136)*x[2]
-        arg[1,4,2,0]=(-1.29637464683)*x[0]+(1.12643501861)*x[1]+(0.0119437305981)*x[2]
-        arg[1,4,2,1]=(-0.127448007113)*x[0]+(0.423470578567)*x[1]+(0.57274403474)*x[2]
-        arg[2,0,0,0]=(-0.753513005537)*x[0]+(-1.42995648081)*x[1]+(-0.748578276092)*x[2]
-        arg[2,0,0,1]=(-0.529225216075)*x[0]+(0.723600505708)*x[1]+(-0.265987788752)*x[2]
-        arg[2,0,1,0]=(0.570242632099)*x[0]+(0.7183918375)*x[1]+(-0.127239408099)*x[2]
-        arg[2,0,1,1]=(0.23496854128)*x[0]+(0.642830624861)*x[1]+(0.734149374044)*x[2]
-        arg[2,0,2,0]=(-0.302583224046)*x[0]+(0.0684944027143)*x[1]+(0.156995461545)*x[2]
-        arg[2,0,2,1]=(-0.549180930856)*x[0]+(0.334205359442)*x[1]+(1.05254428528)*x[2]
-        arg[2,1,0,0]=(-0.234799499951)*x[0]+(1.17826730605)*x[1]+(1.09739059469)*x[2]
-        arg[2,1,0,1]=(-0.187707076501)*x[0]+(0.011330011831)*x[1]+(-0.233605047453)*x[2]
-        arg[2,1,1,0]=(0.290424858876)*x[0]+(0.12865400019)*x[1]+(-1.01515096279)*x[2]
-        arg[2,1,1,1]=(-1.05797585987)*x[0]+(0.679572972092)*x[1]+(1.04481198693)*x[2]
-        arg[2,1,2,0]=(0.240336170335)*x[0]+(0.567306847159)*x[1]+(0.224146880555)*x[2]
-        arg[2,1,2,1]=(-0.568589696446)*x[0]+(1.37586080732)*x[1]+(-0.292086990344)*x[2]
-        arg[2,2,0,0]=(1.16127933088)*x[0]+(-0.205088565357)*x[1]+(-0.0262686243919)*x[2]
-        arg[2,2,0,1]=(1.17913541301)*x[0]+(-0.953527588914)*x[1]+(-1.0594095352)*x[2]
-        arg[2,2,1,0]=(-0.116342811686)*x[0]+(0.459831226378)*x[1]+(0.532324650374)*x[2]
-        arg[2,2,1,1]=(-0.904379150749)*x[0]+(0.0197201393782)*x[1]+(1.16488799459)*x[2]
-        arg[2,2,2,0]=(0.288441825708)*x[0]+(-0.00162365695053)*x[1]+(-0.696961968544)*x[2]
-        arg[2,2,2,1]=(-0.278951886334)*x[0]+(-0.438973263931)*x[1]+(-0.617387268055)*x[2]
-        arg[2,3,0,0]=(-0.575840111545)*x[0]+(-0.430583405817)*x[1]+(0.678495026384)*x[2]
-        arg[2,3,0,1]=(-0.0712810127233)*x[0]+(-0.479271089471)*x[1]+(-0.561687276819)*x[2]
-        arg[2,3,1,0]=(0.00293903214402)*x[0]+(0.707224264038)*x[1]+(0.863200461564)*x[2]
-        arg[2,3,1,1]=(-0.982725212738)*x[0]+(1.12174250462)*x[1]+(0.692163622484)*x[2]
-        arg[2,3,2,0]=(0.563182079719)*x[0]+(0.592670114886)*x[1]+(1.12490471848)*x[2]
-        arg[2,3,2,1]=(0.674175588576)*x[0]+(0.125281804818)*x[1]+(0.260310807977)*x[2]
-        arg[2,4,0,0]=(-0.468871891598)*x[0]+(0.628476449634)*x[1]+(1.44798783935)*x[2]
-        arg[2,4,0,1]=(0.331618946805)*x[0]+(1.18126898042)*x[1]+(1.73036582285)*x[2]
-        arg[2,4,1,0]=(0.643190142583)*x[0]+(0.958102048788)*x[1]+(-1.17509922201)*x[2]
-        arg[2,4,1,1]=(0.140678141755)*x[0]+(-0.964205570281)*x[1]+(1.33722038246)*x[2]
-        arg[2,4,2,0]=(1.00405626052)*x[0]+(-0.766180509924)*x[1]+(-1.12787337858)*x[2]
-        arg[2,4,2,1]=(0.015701651285)*x[0]+(-0.0327586063712)*x[1]+(-1.60288759856)*x[2]
-        arg[3,0,0,0]=(-0.0648346068133)*x[0]+(0.0319743940508)*x[1]+(-0.0885983990043)*x[2]
-        arg[3,0,0,1]=(0.440191590799)*x[0]+(-0.224950534025)*x[1]+(-1.59285278381)*x[2]
-        arg[3,0,1,0]=(-1.39437403492)*x[0]+(0.718181967012)*x[1]+(-0.320282124786)*x[2]
-        arg[3,0,1,1]=(0.212062143443)*x[0]+(0.552967368897)*x[1]+(-0.805494016261)*x[2]
-        arg[3,0,2,0]=(0.123432537169)*x[0]+(-0.124637759512)*x[1]+(-0.627011571378)*x[2]
-        arg[3,0,2,1]=(-0.112696666742)*x[0]+(-0.264195102375)*x[1]+(0.0720389973432)*x[2]
-        arg[3,1,0,0]=(-0.13525504711)*x[0]+(1.02997422411)*x[1]+(-1.00797986845)*x[2]
-        arg[3,1,0,1]=(-0.0675047394459)*x[0]+(1.39934707441)*x[1]+(-0.563292489037)*x[2]
-        arg[3,1,1,0]=(-0.597786255631)*x[0]+(0.969544698551)*x[1]+(-0.0636563520143)*x[2]
-        arg[3,1,1,1]=(0.615372705023)*x[0]+(-0.312239254268)*x[1]+(1.11108440155)*x[2]
-        arg[3,1,2,0]=(0.876145642141)*x[0]+(0.117271425687)*x[1]+(1.10498467015)*x[2]
-        arg[3,1,2,1]=(-0.881281403659)*x[0]+(0.240299603044)*x[1]+(0.14672255814)*x[2]
-        arg[3,2,0,0]=(-1.72712606675)*x[0]+(0.20271220583)*x[1]+(1.10555001416)*x[2]
-        arg[3,2,0,1]=(0.251203467531)*x[0]+(1.14031566726)*x[1]+(0.13511684108)*x[2]
-        arg[3,2,1,0]=(-0.318589273012)*x[0]+(1.22432558956)*x[1]+(0.0532448118609)*x[2]
-        arg[3,2,1,1]=(0.238528986535)*x[0]+(0.181951236101)*x[1]+(0.0816544114367)*x[2]
-        arg[3,2,2,0]=(0.691665718353)*x[0]+(0.238132802916)*x[1]+(1.0244502435)*x[2]
-        arg[3,2,2,1]=(-1.64759886895)*x[0]+(1.06200853706)*x[1]+(-0.0980251738655)*x[2]
-        arg[3,3,0,0]=(-0.0493788966334)*x[0]+(-0.471962146153)*x[1]+(0.156759333734)*x[2]
-        arg[3,3,0,1]=(-0.304056988684)*x[0]+(-0.298060200774)*x[1]+(-0.455474275206)*x[2]
-        arg[3,3,1,0]=(-0.62366321672)*x[0]+(0.229030608831)*x[1]+(0.737950069935)*x[2]
-        arg[3,3,1,1]=(0.132130038359)*x[0]+(0.749997139232)*x[1]+(-0.793138255465)*x[2]
-        arg[3,3,2,0]=(1.71562899872)*x[0]+(0.659770561383)*x[1]+(0.59886052289)*x[2]
-        arg[3,3,2,1]=(0.863622138509)*x[0]+(-0.626586688059)*x[1]+(0.744519466248)*x[2]
-        arg[3,4,0,0]=(0.0214494537522)*x[0]+(0.732351688803)*x[1]+(-0.46140559894)*x[2]
-        arg[3,4,0,1]=(1.33581215441)*x[0]+(-1.16528842961)*x[1]+(-0.888687584892)*x[2]
-        arg[3,4,1,0]=(-0.971883445892)*x[0]+(0.715423530047)*x[1]+(-0.0743908860543)*x[2]
-        arg[3,4,1,1]=(-0.941321450189)*x[0]+(-0.120890461937)*x[1]+(0.929504478456)*x[2]
-        arg[3,4,2,0]=(0.515343485731)*x[0]+(0.323772401243)*x[1]+(-1.03459959098)*x[2]
-        arg[3,4,2,1]=(0.50815257234)*x[0]+(0.461750357229)*x[1]+(0.0260081346396)*x[2]
-        ref[0,0,0,0]=(0.657131010834)*x_ref[0]+(0.925056704895)*x_ref[1]+(0.405133059909)*x_ref[2]
-        ref[0,0,0,1]=(1.00133275423)*x_ref[0]+(0.804604848583)*x_ref[1]+(-0.127865284577)*x_ref[2]
-        ref[0,0,1,0]=(-1.43854141172)*x_ref[0]+(0.461779683792)*x_ref[1]+(-1.35332048209)*x_ref[2]
-        ref[0,0,1,1]=(0.00990645894894)*x_ref[0]+(-0.127101800988)*x_ref[1]+(-0.105358765313)*x_ref[2]
-        ref[0,0,2,0]=(0.116780997053)*x_ref[0]+(1.14704063829)*x_ref[1]+(-0.0190951296257)*x_ref[2]
-        ref[0,0,2,1]=(0.485352133633)*x_ref[0]+(0.232507104974)*x_ref[1]+(-1.13067055888)*x_ref[2]
-        ref[0,1,0,0]=(-0.350822544873)*x_ref[0]+(-0.812391120478)*x_ref[1]+(0.215924121867)*x_ref[2]
-        ref[0,1,0,1]=(-0.351284651716)*x_ref[0]+(-0.221990440191)*x_ref[1]+(-0.223075105598)*x_ref[2]
-        ref[0,1,1,0]=(-0.148376043654)*x_ref[0]+(0.571632161665)*x_ref[1]+(0.519163900078)*x_ref[2]
-        ref[0,1,1,1]=(-1.45038964408)*x_ref[0]+(0.302237803429)*x_ref[1]+(0.742483356143)*x_ref[2]
-        ref[0,1,2,0]=(-0.504270471573)*x_ref[0]+(0.450418202232)*x_ref[1]+(-0.111778328066)*x_ref[2]
-        ref[0,1,2,1]=(-0.0249264677684)*x_ref[0]+(-1.50643033256)*x_ref[1]+(-1.35775630013)*x_ref[2]
-        ref[0,2,0,0]=(0.303211268309)*x_ref[0]+(-0.464853430563)*x_ref[1]+(0.649958565051)*x_ref[2]
-        ref[0,2,0,1]=(-0.099640500895)*x_ref[0]+(-0.190653996191)*x_ref[1]+(1.25662361146)*x_ref[2]
-        ref[0,2,1,0]=(0.196051285683)*x_ref[0]+(-0.0405207084252)*x_ref[1]+(-0.247626612712)*x_ref[2]
-        ref[0,2,1,1]=(0.466541264508)*x_ref[0]+(1.12203001637)*x_ref[1]+(0.214880867458)*x_ref[2]
-        ref[0,2,2,0]=(-0.066399925725)*x_ref[0]+(-0.246038048418)*x_ref[1]+(-1.36436628718)*x_ref[2]
-        ref[0,2,2,1]=(1.11813537863)*x_ref[0]+(-1.09166896181)*x_ref[1]+(0.321936214135)*x_ref[2]
-        ref[0,3,0,0]=(0.374873324445)*x_ref[0]+(-0.465943548272)*x_ref[1]+(0.0190372923331)*x_ref[2]
-        ref[0,3,0,1]=(0.833988907462)*x_ref[0]+(-1.01195758004)*x_ref[1]+(0.237305351727)*x_ref[2]
-        ref[0,3,1,0]=(0.311900067643)*x_ref[0]+(-1.11508238642)*x_ref[1]+(-1.04912391557)*x_ref[2]
-        ref[0,3,1,1]=(-0.211460991448)*x_ref[0]+(-0.768164308901)*x_ref[1]+(-0.450128967205)*x_ref[2]
-        ref[0,3,2,0]=(-0.412678195326)*x_ref[0]+(-0.0808659043088)*x_ref[1]+(0.588002415672)*x_ref[2]
-        ref[0,3,2,1]=(-1.25661069251)*x_ref[0]+(-1.51596081235)*x_ref[1]+(-1.38001371964)*x_ref[2]
-        ref[0,4,0,0]=(0.0822281994319)*x_ref[0]+(-0.726137997384)*x_ref[1]+(0.20532237702)*x_ref[2]
-        ref[0,4,0,1]=(-0.538872250604)*x_ref[0]+(0.669139417413)*x_ref[1]+(0.235909494023)*x_ref[2]
-        ref[0,4,1,0]=(0.171512295446)*x_ref[0]+(-1.37296529156)*x_ref[1]+(1.25081328539)*x_ref[2]
-        ref[0,4,1,1]=(-0.440062802901)*x_ref[0]+(1.32591598513)*x_ref[1]+(0.802645502519)*x_ref[2]
-        ref[0,4,2,0]=(1.55151533491)*x_ref[0]+(0.923232387757)*x_ref[1]+(-0.238979557225)*x_ref[2]
-        ref[0,4,2,1]=(-0.193306423923)*x_ref[0]+(-0.565399635257)*x_ref[1]+(-0.149043846608)*x_ref[2]
-        ref[1,0,0,0]=(0.152247539316)*x_ref[0]+(-1.219763414)*x_ref[1]+(0.836742536417)*x_ref[2]
-        ref[1,0,0,1]=(0.279236863017)*x_ref[0]+(0.14118432621)*x_ref[1]+(-0.33072070595)*x_ref[2]
-        ref[1,0,1,0]=(-0.242848555181)*x_ref[0]+(-0.981144530476)*x_ref[1]+(-0.925220699112)*x_ref[2]
-        ref[1,0,1,1]=(-1.8765425995)*x_ref[0]+(-0.0878096696901)*x_ref[1]+(0.133461124587)*x_ref[2]
-        ref[1,0,2,0]=(-0.282373512491)*x_ref[0]+(0.640862824684)*x_ref[1]+(-1.41391625471)*x_ref[2]
-        ref[1,0,2,1]=(0.168260007994)*x_ref[0]+(0.660595443409)*x_ref[1]+(1.14161006755)*x_ref[2]
-        ref[1,1,0,0]=(-0.160956063437)*x_ref[0]+(-0.60581390216)*x_ref[1]+(1.28589122111)*x_ref[2]
-        ref[1,1,0,1]=(0.0969448014041)*x_ref[0]+(-1.63715420302)*x_ref[1]+(-0.350879443881)*x_ref[2]
-        ref[1,1,1,0]=(0.0878659583502)*x_ref[0]+(1.13265578932)*x_ref[1]+(-0.615846752768)*x_ref[2]
-        ref[1,1,1,1]=(-0.434597962742)*x_ref[0]+(-0.177532580699)*x_ref[1]+(0.543921860391)*x_ref[2]
-        ref[1,1,2,0]=(-0.7739187322)*x_ref[0]+(-0.285452235523)*x_ref[1]+(-0.0426663737344)*x_ref[2]
-        ref[1,1,2,1]=(0.796313217511)*x_ref[0]+(-1.12909584404)*x_ref[1]+(1.26302048961)*x_ref[2]
-        ref[1,2,0,0]=(1.62555299859)*x_ref[0]+(-1.1660403401)*x_ref[1]+(-0.668592413245)*x_ref[2]
-        ref[1,2,0,1]=(-0.807742954877)*x_ref[0]+(-0.238532476847)*x_ref[1]+(-1.13575189406)*x_ref[2]
-        ref[1,2,1,0]=(-0.139280450456)*x_ref[0]+(-0.043306992095)*x_ref[1]+(0.832351898761)*x_ref[2]
-        ref[1,2,1,1]=(0.16731150192)*x_ref[0]+(0.0705653171485)*x_ref[1]+(0.12943106453)*x_ref[2]
-        ref[1,2,2,0]=(0.669247838367)*x_ref[0]+(1.10177451339)*x_ref[1]+(1.21850224582)*x_ref[2]
-        ref[1,2,2,1]=(-0.779527532537)*x_ref[0]+(0.10943711539)*x_ref[1]+(0.0286417760627)*x_ref[2]
-        ref[1,3,0,0]=(-0.500367153143)*x_ref[0]+(-0.0315766921687)*x_ref[1]+(0.0814977959486)*x_ref[2]
-        ref[1,3,0,1]=(1.44010930702)*x_ref[0]+(0.985266827661)*x_ref[1]+(-0.4777280416)*x_ref[2]
-        ref[1,3,1,0]=(-1.09856159209)*x_ref[0]+(0.914767947742)*x_ref[1]+(0.257975836816)*x_ref[2]
-        ref[1,3,1,1]=(1.20572454864)*x_ref[0]+(-1.18899739672)*x_ref[1]+(-0.881322688875)*x_ref[2]
-        ref[1,3,2,0]=(0.0683727807399)*x_ref[0]+(0.27893403097)*x_ref[1]+(0.532141657019)*x_ref[2]
-        ref[1,3,2,1]=(1.22927878362)*x_ref[0]+(-0.746664730318)*x_ref[1]+(0.706635763178)*x_ref[2]
-        ref[1,4,0,0]=(-0.056381118157)*x_ref[0]+(0.497463663176)*x_ref[1]+(-0.0170016763418)*x_ref[2]
-        ref[1,4,0,1]=(0.220396391337)*x_ref[0]+(-0.311295539709)*x_ref[1]+(-0.0925408150537)*x_ref[2]
-        ref[1,4,1,0]=(-1.26814101481)*x_ref[0]+(1.36544235985)*x_ref[1]+(-0.706223605983)*x_ref[2]
-        ref[1,4,1,1]=(-0.151531826396)*x_ref[0]+(0.709418004406)*x_ref[1]+(0.361464674136)*x_ref[2]
-        ref[1,4,2,0]=(-1.29637464683)*x_ref[0]+(1.12643501861)*x_ref[1]+(0.0119437305981)*x_ref[2]
-        ref[1,4,2,1]=(-0.127448007113)*x_ref[0]+(0.423470578567)*x_ref[1]+(0.57274403474)*x_ref[2]
-        ref[2,0,0,0]=(-0.753513005537)*x_ref[0]+(-1.42995648081)*x_ref[1]+(-0.748578276092)*x_ref[2]
-        ref[2,0,0,1]=(-0.529225216075)*x_ref[0]+(0.723600505708)*x_ref[1]+(-0.265987788752)*x_ref[2]
-        ref[2,0,1,0]=(0.570242632099)*x_ref[0]+(0.7183918375)*x_ref[1]+(-0.127239408099)*x_ref[2]
-        ref[2,0,1,1]=(0.23496854128)*x_ref[0]+(0.642830624861)*x_ref[1]+(0.734149374044)*x_ref[2]
-        ref[2,0,2,0]=(-0.302583224046)*x_ref[0]+(0.0684944027143)*x_ref[1]+(0.156995461545)*x_ref[2]
-        ref[2,0,2,1]=(-0.549180930856)*x_ref[0]+(0.334205359442)*x_ref[1]+(1.05254428528)*x_ref[2]
-        ref[2,1,0,0]=(-0.234799499951)*x_ref[0]+(1.17826730605)*x_ref[1]+(1.09739059469)*x_ref[2]
-        ref[2,1,0,1]=(-0.187707076501)*x_ref[0]+(0.011330011831)*x_ref[1]+(-0.233605047453)*x_ref[2]
-        ref[2,1,1,0]=(0.290424858876)*x_ref[0]+(0.12865400019)*x_ref[1]+(-1.01515096279)*x_ref[2]
-        ref[2,1,1,1]=(-1.05797585987)*x_ref[0]+(0.679572972092)*x_ref[1]+(1.04481198693)*x_ref[2]
-        ref[2,1,2,0]=(0.240336170335)*x_ref[0]+(0.567306847159)*x_ref[1]+(0.224146880555)*x_ref[2]
-        ref[2,1,2,1]=(-0.568589696446)*x_ref[0]+(1.37586080732)*x_ref[1]+(-0.292086990344)*x_ref[2]
-        ref[2,2,0,0]=(1.16127933088)*x_ref[0]+(-0.205088565357)*x_ref[1]+(-0.0262686243919)*x_ref[2]
-        ref[2,2,0,1]=(1.17913541301)*x_ref[0]+(-0.953527588914)*x_ref[1]+(-1.0594095352)*x_ref[2]
-        ref[2,2,1,0]=(-0.116342811686)*x_ref[0]+(0.459831226378)*x_ref[1]+(0.532324650374)*x_ref[2]
-        ref[2,2,1,1]=(-0.904379150749)*x_ref[0]+(0.0197201393782)*x_ref[1]+(1.16488799459)*x_ref[2]
-        ref[2,2,2,0]=(0.288441825708)*x_ref[0]+(-0.00162365695053)*x_ref[1]+(-0.696961968544)*x_ref[2]
-        ref[2,2,2,1]=(-0.278951886334)*x_ref[0]+(-0.438973263931)*x_ref[1]+(-0.617387268055)*x_ref[2]
-        ref[2,3,0,0]=(-0.575840111545)*x_ref[0]+(-0.430583405817)*x_ref[1]+(0.678495026384)*x_ref[2]
-        ref[2,3,0,1]=(-0.0712810127233)*x_ref[0]+(-0.479271089471)*x_ref[1]+(-0.561687276819)*x_ref[2]
-        ref[2,3,1,0]=(0.00293903214402)*x_ref[0]+(0.707224264038)*x_ref[1]+(0.863200461564)*x_ref[2]
-        ref[2,3,1,1]=(-0.982725212738)*x_ref[0]+(1.12174250462)*x_ref[1]+(0.692163622484)*x_ref[2]
-        ref[2,3,2,0]=(0.563182079719)*x_ref[0]+(0.592670114886)*x_ref[1]+(1.12490471848)*x_ref[2]
-        ref[2,3,2,1]=(0.674175588576)*x_ref[0]+(0.125281804818)*x_ref[1]+(0.260310807977)*x_ref[2]
-        ref[2,4,0,0]=(-0.468871891598)*x_ref[0]+(0.628476449634)*x_ref[1]+(1.44798783935)*x_ref[2]
-        ref[2,4,0,1]=(0.331618946805)*x_ref[0]+(1.18126898042)*x_ref[1]+(1.73036582285)*x_ref[2]
-        ref[2,4,1,0]=(0.643190142583)*x_ref[0]+(0.958102048788)*x_ref[1]+(-1.17509922201)*x_ref[2]
-        ref[2,4,1,1]=(0.140678141755)*x_ref[0]+(-0.964205570281)*x_ref[1]+(1.33722038246)*x_ref[2]
-        ref[2,4,2,0]=(1.00405626052)*x_ref[0]+(-0.766180509924)*x_ref[1]+(-1.12787337858)*x_ref[2]
-        ref[2,4,2,1]=(0.015701651285)*x_ref[0]+(-0.0327586063712)*x_ref[1]+(-1.60288759856)*x_ref[2]
-        ref[3,0,0,0]=(-0.0648346068133)*x_ref[0]+(0.0319743940508)*x_ref[1]+(-0.0885983990043)*x_ref[2]
-        ref[3,0,0,1]=(0.440191590799)*x_ref[0]+(-0.224950534025)*x_ref[1]+(-1.59285278381)*x_ref[2]
-        ref[3,0,1,0]=(-1.39437403492)*x_ref[0]+(0.718181967012)*x_ref[1]+(-0.320282124786)*x_ref[2]
-        ref[3,0,1,1]=(0.212062143443)*x_ref[0]+(0.552967368897)*x_ref[1]+(-0.805494016261)*x_ref[2]
-        ref[3,0,2,0]=(0.123432537169)*x_ref[0]+(-0.124637759512)*x_ref[1]+(-0.627011571378)*x_ref[2]
-        ref[3,0,2,1]=(-0.112696666742)*x_ref[0]+(-0.264195102375)*x_ref[1]+(0.0720389973432)*x_ref[2]
-        ref[3,1,0,0]=(-0.13525504711)*x_ref[0]+(1.02997422411)*x_ref[1]+(-1.00797986845)*x_ref[2]
-        ref[3,1,0,1]=(-0.0675047394459)*x_ref[0]+(1.39934707441)*x_ref[1]+(-0.563292489037)*x_ref[2]
-        ref[3,1,1,0]=(-0.597786255631)*x_ref[0]+(0.969544698551)*x_ref[1]+(-0.0636563520143)*x_ref[2]
-        ref[3,1,1,1]=(0.615372705023)*x_ref[0]+(-0.312239254268)*x_ref[1]+(1.11108440155)*x_ref[2]
-        ref[3,1,2,0]=(0.876145642141)*x_ref[0]+(0.117271425687)*x_ref[1]+(1.10498467015)*x_ref[2]
-        ref[3,1,2,1]=(-0.881281403659)*x_ref[0]+(0.240299603044)*x_ref[1]+(0.14672255814)*x_ref[2]
-        ref[3,2,0,0]=(-1.72712606675)*x_ref[0]+(0.20271220583)*x_ref[1]+(1.10555001416)*x_ref[2]
-        ref[3,2,0,1]=(0.251203467531)*x_ref[0]+(1.14031566726)*x_ref[1]+(0.13511684108)*x_ref[2]
-        ref[3,2,1,0]=(-0.318589273012)*x_ref[0]+(1.22432558956)*x_ref[1]+(0.0532448118609)*x_ref[2]
-        ref[3,2,1,1]=(0.238528986535)*x_ref[0]+(0.181951236101)*x_ref[1]+(0.0816544114367)*x_ref[2]
-        ref[3,2,2,0]=(0.691665718353)*x_ref[0]+(0.238132802916)*x_ref[1]+(1.0244502435)*x_ref[2]
-        ref[3,2,2,1]=(-1.64759886895)*x_ref[0]+(1.06200853706)*x_ref[1]+(-0.0980251738655)*x_ref[2]
-        ref[3,3,0,0]=(-0.0493788966334)*x_ref[0]+(-0.471962146153)*x_ref[1]+(0.156759333734)*x_ref[2]
-        ref[3,3,0,1]=(-0.304056988684)*x_ref[0]+(-0.298060200774)*x_ref[1]+(-0.455474275206)*x_ref[2]
-        ref[3,3,1,0]=(-0.62366321672)*x_ref[0]+(0.229030608831)*x_ref[1]+(0.737950069935)*x_ref[2]
-        ref[3,3,1,1]=(0.132130038359)*x_ref[0]+(0.749997139232)*x_ref[1]+(-0.793138255465)*x_ref[2]
-        ref[3,3,2,0]=(1.71562899872)*x_ref[0]+(0.659770561383)*x_ref[1]+(0.59886052289)*x_ref[2]
-        ref[3,3,2,1]=(0.863622138509)*x_ref[0]+(-0.626586688059)*x_ref[1]+(0.744519466248)*x_ref[2]
-        ref[3,4,0,0]=(0.0214494537522)*x_ref[0]+(0.732351688803)*x_ref[1]+(-0.46140559894)*x_ref[2]
-        ref[3,4,0,1]=(1.33581215441)*x_ref[0]+(-1.16528842961)*x_ref[1]+(-0.888687584892)*x_ref[2]
-        ref[3,4,1,0]=(-0.971883445892)*x_ref[0]+(0.715423530047)*x_ref[1]+(-0.0743908860543)*x_ref[2]
-        ref[3,4,1,1]=(-0.941321450189)*x_ref[0]+(-0.120890461937)*x_ref[1]+(0.929504478456)*x_ref[2]
-        ref[3,4,2,0]=(0.515343485731)*x_ref[0]+(0.323772401243)*x_ref[1]+(-1.03459959098)*x_ref[2]
-        ref[3,4,2,1]=(0.50815257234)*x_ref[0]+(0.461750357229)*x_ref[1]+(0.0260081346396)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedContinuousFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0473893058941)*x[0]+(0.951986966173)*x[1]
-        ref=(0.0473893058941)*x_ref[0]+(0.951986966173)*x_ref[1]
-      else:
-        arg=(1.17583059)*x[0]+(-0.0937717081252)*x[1]+(-1.27613571861)*x[2]
-        ref=(1.17583059)*x_ref[0]+(-0.0937717081252)*x_ref[1]+(-1.27613571861)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        arg[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-        ref[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        ref[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-      else:
-        arg[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        arg[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-        ref[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        ref[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.352147407922)*x[0]+(1.05748871495)*x[1]
-        arg[0,1]=(-0.474780656205)*x[0]+(0.459896921083)*x[1]
-        arg[0,2]=(0.460595468629)*x[0]+(-0.719265552984)*x[1]
-        arg[0,3]=(-0.182481554307)*x[0]+(0.658370858696)*x[1]
-        arg[0,4]=(0.827070331069)*x[0]+(0.461652365051)*x[1]
-        arg[1,0]=(-1.04815178098)*x[0]+(-0.401056329621)*x[1]
-        arg[1,1]=(1.44973151029)*x[0]+(-0.240684558811)*x[1]
-        arg[1,2]=(1.66374138794)*x[0]+(0.77295074874)*x[1]
-        arg[1,3]=(0.367619281099)*x[0]+(1.68735398814)*x[1]
-        arg[1,4]=(-0.609166774517)*x[0]+(-0.236664892047)*x[1]
-        arg[2,0]=(0.517168891914)*x[0]+(0.14465722282)*x[1]
-        arg[2,1]=(1.44226468541)*x[0]+(0.138272882962)*x[1]
-        arg[2,2]=(1.48139408702)*x[0]+(0.858274661903)*x[1]
-        arg[2,3]=(-0.313581651419)*x[0]+(0.23082842733)*x[1]
-        arg[2,4]=(-0.174268737758)*x[0]+(-0.21537909808)*x[1]
-        arg[3,0]=(-0.228982633638)*x[0]+(0.469215862849)*x[1]
-        arg[3,1]=(1.13696568169)*x[0]+(0.937455803513)*x[1]
-        arg[3,2]=(-0.104407288228)*x[0]+(0.695766113469)*x[1]
-        arg[3,3]=(-0.854996521846)*x[0]+(-0.112176127951)*x[1]
-        arg[3,4]=(-0.995531601234)*x[0]+(0.0800402854558)*x[1]
-        ref[0,0]=(-0.352147407922)*x_ref[0]+(1.05748871495)*x_ref[1]
-        ref[0,1]=(-0.474780656205)*x_ref[0]+(0.459896921083)*x_ref[1]
-        ref[0,2]=(0.460595468629)*x_ref[0]+(-0.719265552984)*x_ref[1]
-        ref[0,3]=(-0.182481554307)*x_ref[0]+(0.658370858696)*x_ref[1]
-        ref[0,4]=(0.827070331069)*x_ref[0]+(0.461652365051)*x_ref[1]
-        ref[1,0]=(-1.04815178098)*x_ref[0]+(-0.401056329621)*x_ref[1]
-        ref[1,1]=(1.44973151029)*x_ref[0]+(-0.240684558811)*x_ref[1]
-        ref[1,2]=(1.66374138794)*x_ref[0]+(0.77295074874)*x_ref[1]
-        ref[1,3]=(0.367619281099)*x_ref[0]+(1.68735398814)*x_ref[1]
-        ref[1,4]=(-0.609166774517)*x_ref[0]+(-0.236664892047)*x_ref[1]
-        ref[2,0]=(0.517168891914)*x_ref[0]+(0.14465722282)*x_ref[1]
-        ref[2,1]=(1.44226468541)*x_ref[0]+(0.138272882962)*x_ref[1]
-        ref[2,2]=(1.48139408702)*x_ref[0]+(0.858274661903)*x_ref[1]
-        ref[2,3]=(-0.313581651419)*x_ref[0]+(0.23082842733)*x_ref[1]
-        ref[2,4]=(-0.174268737758)*x_ref[0]+(-0.21537909808)*x_ref[1]
-        ref[3,0]=(-0.228982633638)*x_ref[0]+(0.469215862849)*x_ref[1]
-        ref[3,1]=(1.13696568169)*x_ref[0]+(0.937455803513)*x_ref[1]
-        ref[3,2]=(-0.104407288228)*x_ref[0]+(0.695766113469)*x_ref[1]
-        ref[3,3]=(-0.854996521846)*x_ref[0]+(-0.112176127951)*x_ref[1]
-        ref[3,4]=(-0.995531601234)*x_ref[0]+(0.0800402854558)*x_ref[1]
-      else:
-        arg[0,0]=(-1.37643176268)*x[0]+(-0.1427781822)*x[1]+(-0.959699369061)*x[2]
-        arg[0,1]=(-0.182711571685)*x[0]+(0.961312900413)*x[1]+(1.51040175428)*x[2]
-        arg[0,2]=(0.705353375057)*x[0]+(-0.486345048698)*x[1]+(0.276322756959)*x[2]
-        arg[0,3]=(0.617751891549)*x[0]+(0.842087813554)*x[1]+(0.181498577908)*x[2]
-        arg[0,4]=(-0.806056649748)*x[0]+(-1.46464582218)*x[1]+(1.16207385717)*x[2]
-        arg[1,0]=(0.443056731112)*x[0]+(-0.227362546034)*x[1]+(-0.34165958927)*x[2]
-        arg[1,1]=(-0.0914572456267)*x[0]+(-1.45454323755)*x[1]+(-0.197767792435)*x[2]
-        arg[1,2]=(-0.0294645792971)*x[0]+(0.154875742902)*x[1]+(0.227583590411)*x[2]
-        arg[1,3]=(0.0412025551742)*x[0]+(0.263462610593)*x[1]+(-0.916261691981)*x[2]
-        arg[1,4]=(0.436907441126)*x[0]+(1.69979623684)*x[1]+(1.28829395572)*x[2]
-        arg[2,0]=(0.328651176462)*x[0]+(1.15129657872)*x[1]+(0.288790490546)*x[2]
-        arg[2,1]=(0.603244456904)*x[0]+(0.579263327926)*x[1]+(1.29848862962)*x[2]
-        arg[2,2]=(1.20931621113)*x[0]+(1.45214239482)*x[1]+(-0.859270540382)*x[2]
-        arg[2,3]=(-0.313390836289)*x[0]+(1.29725175689)*x[1]+(-0.677628108203)*x[2]
-        arg[2,4]=(-0.182499400988)*x[0]+(-0.150297906549)*x[1]+(-0.0239318512478)*x[2]
-        arg[3,0]=(1.24015393707)*x[0]+(0.0747824863962)*x[1]+(0.0762786991199)*x[2]
-        arg[3,1]=(0.0278504259683)*x[0]+(-1.03121188802)*x[1]+(-1.1241189107)*x[2]
-        arg[3,2]=(-0.014656978991)*x[0]+(-0.0946814312886)*x[1]+(0.281133656449)*x[2]
-        arg[3,3]=(0.0763735895586)*x[0]+(-0.878856395577)*x[1]+(-0.0317884442673)*x[2]
-        arg[3,4]=(-0.0394676966134)*x[0]+(0.491771511608)*x[1]+(0.270055976645)*x[2]
-        ref[0,0]=(-1.37643176268)*x_ref[0]+(-0.1427781822)*x_ref[1]+(-0.959699369061)*x_ref[2]
-        ref[0,1]=(-0.182711571685)*x_ref[0]+(0.961312900413)*x_ref[1]+(1.51040175428)*x_ref[2]
-        ref[0,2]=(0.705353375057)*x_ref[0]+(-0.486345048698)*x_ref[1]+(0.276322756959)*x_ref[2]
-        ref[0,3]=(0.617751891549)*x_ref[0]+(0.842087813554)*x_ref[1]+(0.181498577908)*x_ref[2]
-        ref[0,4]=(-0.806056649748)*x_ref[0]+(-1.46464582218)*x_ref[1]+(1.16207385717)*x_ref[2]
-        ref[1,0]=(0.443056731112)*x_ref[0]+(-0.227362546034)*x_ref[1]+(-0.34165958927)*x_ref[2]
-        ref[1,1]=(-0.0914572456267)*x_ref[0]+(-1.45454323755)*x_ref[1]+(-0.197767792435)*x_ref[2]
-        ref[1,2]=(-0.0294645792971)*x_ref[0]+(0.154875742902)*x_ref[1]+(0.227583590411)*x_ref[2]
-        ref[1,3]=(0.0412025551742)*x_ref[0]+(0.263462610593)*x_ref[1]+(-0.916261691981)*x_ref[2]
-        ref[1,4]=(0.436907441126)*x_ref[0]+(1.69979623684)*x_ref[1]+(1.28829395572)*x_ref[2]
-        ref[2,0]=(0.328651176462)*x_ref[0]+(1.15129657872)*x_ref[1]+(0.288790490546)*x_ref[2]
-        ref[2,1]=(0.603244456904)*x_ref[0]+(0.579263327926)*x_ref[1]+(1.29848862962)*x_ref[2]
-        ref[2,2]=(1.20931621113)*x_ref[0]+(1.45214239482)*x_ref[1]+(-0.859270540382)*x_ref[2]
-        ref[2,3]=(-0.313390836289)*x_ref[0]+(1.29725175689)*x_ref[1]+(-0.677628108203)*x_ref[2]
-        ref[2,4]=(-0.182499400988)*x_ref[0]+(-0.150297906549)*x_ref[1]+(-0.0239318512478)*x_ref[2]
-        ref[3,0]=(1.24015393707)*x_ref[0]+(0.0747824863962)*x_ref[1]+(0.0762786991199)*x_ref[2]
-        ref[3,1]=(0.0278504259683)*x_ref[0]+(-1.03121188802)*x_ref[1]+(-1.1241189107)*x_ref[2]
-        ref[3,2]=(-0.014656978991)*x_ref[0]+(-0.0946814312886)*x_ref[1]+(0.281133656449)*x_ref[2]
-        ref[3,3]=(0.0763735895586)*x_ref[0]+(-0.878856395577)*x_ref[1]+(-0.0317884442673)*x_ref[2]
-        ref[3,4]=(-0.0394676966134)*x_ref[0]+(0.491771511608)*x_ref[1]+(0.270055976645)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.648027713097)*x[0]+(0.454772464521)*x[1]
-        arg[0,0,1]=(-1.04215194027)*x[0]+(1.77272186309)*x[1]
-        arg[0,1,0]=(0.957518940744)*x[0]+(-0.00690667683404)*x[1]
-        arg[0,1,1]=(0.498748880149)*x[0]+(0.259327852057)*x[1]
-        arg[1,0,0]=(0.0289932206553)*x[0]+(-0.0536452199935)*x[1]
-        arg[1,0,1]=(1.87294208563)*x[0]+(-1.51381628261)*x[1]
-        arg[1,1,0]=(-1.23040396582)*x[0]+(0.554662981657)*x[1]
-        arg[1,1,1]=(-0.860941498913)*x[0]+(0.574367240324)*x[1]
-        arg[2,0,0]=(0.137130620331)*x[0]+(-0.670662009715)*x[1]
-        arg[2,0,1]=(-0.01425641324)*x[0]+(0.938457397733)*x[1]
-        arg[2,1,0]=(-1.19963811258)*x[0]+(0.644324590438)*x[1]
-        arg[2,1,1]=(1.95704700194e-05)*x[0]+(-1.38366302093)*x[1]
-        arg[3,0,0]=(-0.340745623814)*x[0]+(0.250094821868)*x[1]
-        arg[3,0,1]=(-1.29605858834)*x[0]+(0.960366146641)*x[1]
-        arg[3,1,0]=(0.550081967023)*x[0]+(0.288502329322)*x[1]
-        arg[3,1,1]=(0.732775194015)*x[0]+(-0.0386387970031)*x[1]
-        arg[4,0,0]=(-0.849770148692)*x[0]+(-0.436107981485)*x[1]
-        arg[4,0,1]=(0.11202465528)*x[0]+(1.66934758318)*x[1]
-        arg[4,1,0]=(-0.0549275626402)*x[0]+(0.75026785816)*x[1]
-        arg[4,1,1]=(-0.351732868571)*x[0]+(0.892311743034)*x[1]
-        arg[5,0,0]=(-0.744188679625)*x[0]+(0.335492215064)*x[1]
-        arg[5,0,1]=(-0.998395994344)*x[0]+(-1.10552505805)*x[1]
-        arg[5,1,0]=(-0.125733052457)*x[0]+(0.433627801831)*x[1]
-        arg[5,1,1]=(-0.0704342146568)*x[0]+(-1.38357990003)*x[1]
-        ref[0,0,0]=(-0.648027713097)*x_ref[0]+(0.454772464521)*x_ref[1]
-        ref[0,0,1]=(-1.04215194027)*x_ref[0]+(1.77272186309)*x_ref[1]
-        ref[0,1,0]=(0.957518940744)*x_ref[0]+(-0.00690667683404)*x_ref[1]
-        ref[0,1,1]=(0.498748880149)*x_ref[0]+(0.259327852057)*x_ref[1]
-        ref[1,0,0]=(0.0289932206553)*x_ref[0]+(-0.0536452199935)*x_ref[1]
-        ref[1,0,1]=(1.87294208563)*x_ref[0]+(-1.51381628261)*x_ref[1]
-        ref[1,1,0]=(-1.23040396582)*x_ref[0]+(0.554662981657)*x_ref[1]
-        ref[1,1,1]=(-0.860941498913)*x_ref[0]+(0.574367240324)*x_ref[1]
-        ref[2,0,0]=(0.137130620331)*x_ref[0]+(-0.670662009715)*x_ref[1]
-        ref[2,0,1]=(-0.01425641324)*x_ref[0]+(0.938457397733)*x_ref[1]
-        ref[2,1,0]=(-1.19963811258)*x_ref[0]+(0.644324590438)*x_ref[1]
-        ref[2,1,1]=(1.95704700194e-05)*x_ref[0]+(-1.38366302093)*x_ref[1]
-        ref[3,0,0]=(-0.340745623814)*x_ref[0]+(0.250094821868)*x_ref[1]
-        ref[3,0,1]=(-1.29605858834)*x_ref[0]+(0.960366146641)*x_ref[1]
-        ref[3,1,0]=(0.550081967023)*x_ref[0]+(0.288502329322)*x_ref[1]
-        ref[3,1,1]=(0.732775194015)*x_ref[0]+(-0.0386387970031)*x_ref[1]
-        ref[4,0,0]=(-0.849770148692)*x_ref[0]+(-0.436107981485)*x_ref[1]
-        ref[4,0,1]=(0.11202465528)*x_ref[0]+(1.66934758318)*x_ref[1]
-        ref[4,1,0]=(-0.0549275626402)*x_ref[0]+(0.75026785816)*x_ref[1]
-        ref[4,1,1]=(-0.351732868571)*x_ref[0]+(0.892311743034)*x_ref[1]
-        ref[5,0,0]=(-0.744188679625)*x_ref[0]+(0.335492215064)*x_ref[1]
-        ref[5,0,1]=(-0.998395994344)*x_ref[0]+(-1.10552505805)*x_ref[1]
-        ref[5,1,0]=(-0.125733052457)*x_ref[0]+(0.433627801831)*x_ref[1]
-        ref[5,1,1]=(-0.0704342146568)*x_ref[0]+(-1.38357990003)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.514282046117)*x[0]+(-0.323828864786)*x[1]+(1.01124693935)*x[2]
-        arg[0,0,1]=(-0.621932286265)*x[0]+(-0.797795969893)*x[1]+(-0.0773166049033)*x[2]
-        arg[0,1,0]=(-0.874326235403)*x[0]+(1.20497718671)*x[1]+(-0.327967753068)*x[2]
-        arg[0,1,1]=(0.951360009956)*x[0]+(-1.21275900525)*x[1]+(-0.018534105952)*x[2]
-        arg[1,0,0]=(0.281987835612)*x[0]+(-1.19722794418)*x[1]+(1.1763726345)*x[2]
-        arg[1,0,1]=(-0.32305643761)*x[0]+(-1.03791873988)*x[1]+(-0.27820297843)*x[2]
-        arg[1,1,0]=(-0.250435095454)*x[0]+(-0.214489103641)*x[1]+(0.24396821423)*x[2]
-        arg[1,1,1]=(0.579357080067)*x[0]+(-0.0941366284697)*x[1]+(0.723253564904)*x[2]
-        arg[2,0,0]=(0.0300521887548)*x[0]+(0.856925059877)*x[1]+(1.62627876391)*x[2]
-        arg[2,0,1]=(0.852347895674)*x[0]+(0.206107771527)*x[1]+(0.117053849317)*x[2]
-        arg[2,1,0]=(0.398984864506)*x[0]+(-0.547599955809)*x[1]+(0.960920641374)*x[2]
-        arg[2,1,1]=(-0.958823099193)*x[0]+(0.781951729915)*x[1]+(0.450383856811)*x[2]
-        arg[3,0,0]=(0.229905485668)*x[0]+(0.13732685767)*x[1]+(0.512823357151)*x[2]
-        arg[3,0,1]=(-1.85513528612)*x[0]+(1.26641983818)*x[1]+(1.23786450856)*x[2]
-        arg[3,1,0]=(-1.42722463673)*x[0]+(1.39168597069)*x[1]+(0.268597738146)*x[2]
-        arg[3,1,1]=(0.290999479499)*x[0]+(0.948263729849)*x[1]+(-1.60034455324)*x[2]
-        arg[4,0,0]=(-0.755582573265)*x[0]+(-0.0499101766292)*x[1]+(0.0615553965851)*x[2]
-        arg[4,0,1]=(0.437479529174)*x[0]+(-1.05498330706)*x[1]+(-0.707627367761)*x[2]
-        arg[4,1,0]=(0.608125820223)*x[0]+(0.893214773163)*x[1]+(-1.28896829926)*x[2]
-        arg[4,1,1]=(0.953486972425)*x[0]+(1.41823237022)*x[1]+(-0.0439589309603)*x[2]
-        arg[5,0,0]=(1.06772863677)*x[0]+(0.25868918695)*x[1]+(-0.118887800607)*x[2]
-        arg[5,0,1]=(0.407678657671)*x[0]+(-0.464724724076)*x[1]+(0.249621788892)*x[2]
-        arg[5,1,0]=(-0.516649619366)*x[0]+(-1.7414783126)*x[1]+(-1.1378435051)*x[2]
-        arg[5,1,1]=(-0.805463452054)*x[0]+(-0.189909983229)*x[1]+(-0.127169486885)*x[2]
-        ref[0,0,0]=(0.514282046117)*x_ref[0]+(-0.323828864786)*x_ref[1]+(1.01124693935)*x_ref[2]
-        ref[0,0,1]=(-0.621932286265)*x_ref[0]+(-0.797795969893)*x_ref[1]+(-0.0773166049033)*x_ref[2]
-        ref[0,1,0]=(-0.874326235403)*x_ref[0]+(1.20497718671)*x_ref[1]+(-0.327967753068)*x_ref[2]
-        ref[0,1,1]=(0.951360009956)*x_ref[0]+(-1.21275900525)*x_ref[1]+(-0.018534105952)*x_ref[2]
-        ref[1,0,0]=(0.281987835612)*x_ref[0]+(-1.19722794418)*x_ref[1]+(1.1763726345)*x_ref[2]
-        ref[1,0,1]=(-0.32305643761)*x_ref[0]+(-1.03791873988)*x_ref[1]+(-0.27820297843)*x_ref[2]
-        ref[1,1,0]=(-0.250435095454)*x_ref[0]+(-0.214489103641)*x_ref[1]+(0.24396821423)*x_ref[2]
-        ref[1,1,1]=(0.579357080067)*x_ref[0]+(-0.0941366284697)*x_ref[1]+(0.723253564904)*x_ref[2]
-        ref[2,0,0]=(0.0300521887548)*x_ref[0]+(0.856925059877)*x_ref[1]+(1.62627876391)*x_ref[2]
-        ref[2,0,1]=(0.852347895674)*x_ref[0]+(0.206107771527)*x_ref[1]+(0.117053849317)*x_ref[2]
-        ref[2,1,0]=(0.398984864506)*x_ref[0]+(-0.547599955809)*x_ref[1]+(0.960920641374)*x_ref[2]
-        ref[2,1,1]=(-0.958823099193)*x_ref[0]+(0.781951729915)*x_ref[1]+(0.450383856811)*x_ref[2]
-        ref[3,0,0]=(0.229905485668)*x_ref[0]+(0.13732685767)*x_ref[1]+(0.512823357151)*x_ref[2]
-        ref[3,0,1]=(-1.85513528612)*x_ref[0]+(1.26641983818)*x_ref[1]+(1.23786450856)*x_ref[2]
-        ref[3,1,0]=(-1.42722463673)*x_ref[0]+(1.39168597069)*x_ref[1]+(0.268597738146)*x_ref[2]
-        ref[3,1,1]=(0.290999479499)*x_ref[0]+(0.948263729849)*x_ref[1]+(-1.60034455324)*x_ref[2]
-        ref[4,0,0]=(-0.755582573265)*x_ref[0]+(-0.0499101766292)*x_ref[1]+(0.0615553965851)*x_ref[2]
-        ref[4,0,1]=(0.437479529174)*x_ref[0]+(-1.05498330706)*x_ref[1]+(-0.707627367761)*x_ref[2]
-        ref[4,1,0]=(0.608125820223)*x_ref[0]+(0.893214773163)*x_ref[1]+(-1.28896829926)*x_ref[2]
-        ref[4,1,1]=(0.953486972425)*x_ref[0]+(1.41823237022)*x_ref[1]+(-0.0439589309603)*x_ref[2]
-        ref[5,0,0]=(1.06772863677)*x_ref[0]+(0.25868918695)*x_ref[1]+(-0.118887800607)*x_ref[2]
-        ref[5,0,1]=(0.407678657671)*x_ref[0]+(-0.464724724076)*x_ref[1]+(0.249621788892)*x_ref[2]
-        ref[5,1,0]=(-0.516649619366)*x_ref[0]+(-1.7414783126)*x_ref[1]+(-1.1378435051)*x_ref[2]
-        ref[5,1,1]=(-0.805463452054)*x_ref[0]+(-0.189909983229)*x_ref[1]+(-0.127169486885)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedSolution(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0345299040391)*x[0]+(-0.454395763203)*x[1]
-        arg[0,0,0,1]=(0.816055157967)*x[0]+(1.65538436278)*x[1]
-        arg[0,0,1,0]=(0.0173895492935)*x[0]+(0.390351555311)*x[1]
-        arg[0,0,1,1]=(0.0601948568001)*x[0]+(0.221935674716)*x[1]
-        arg[0,0,2,0]=(-0.86832157368)*x[0]+(0.719344815038)*x[1]
-        arg[0,0,2,1]=(1.25819429092)*x[0]+(-0.626192861251)*x[1]
-        arg[0,1,0,0]=(-0.408148703502)*x[0]+(0.614498083344)*x[1]
-        arg[0,1,0,1]=(-0.948405669606)*x[0]+(-0.431912186759)*x[1]
-        arg[0,1,1,0]=(1.31545349201)*x[0]+(-1.43633966996)*x[1]
-        arg[0,1,1,1]=(-0.262029058642)*x[0]+(-0.211155762782)*x[1]
-        arg[0,1,2,0]=(-1.29637408623)*x[0]+(0.015300306679)*x[1]
-        arg[0,1,2,1]=(-0.338105266735)*x[0]+(-1.17464147824)*x[1]
-        arg[0,2,0,0]=(-1.29420036616)*x[0]+(0.162651211594)*x[1]
-        arg[0,2,0,1]=(-0.524474022859)*x[0]+(-0.606176834607)*x[1]
-        arg[0,2,1,0]=(1.43089226048)*x[0]+(-1.4419171599)*x[1]
-        arg[0,2,1,1]=(1.2204089172)*x[0]+(0.642504226769)*x[1]
-        arg[0,2,2,0]=(-1.43093048803)*x[0]+(-0.220023978143)*x[1]
-        arg[0,2,2,1]=(-1.03649750995)*x[0]+(0.169884643951)*x[1]
-        arg[0,3,0,0]=(-0.250124925508)*x[0]+(-0.46412090099)*x[1]
-        arg[0,3,0,1]=(-0.534018976189)*x[0]+(-0.118541672182)*x[1]
-        arg[0,3,1,0]=(-1.79137479214)*x[0]+(0.662559958387)*x[1]
-        arg[0,3,1,1]=(-0.881482101487)*x[0]+(0.372532785249)*x[1]
-        arg[0,3,2,0]=(-1.71336096366)*x[0]+(-1.24175201959)*x[1]
-        arg[0,3,2,1]=(0.384581239528)*x[0]+(-0.131008110136)*x[1]
-        arg[0,4,0,0]=(0.315863164115)*x[0]+(-0.494712527335)*x[1]
-        arg[0,4,0,1]=(-1.10002713328)*x[0]+(0.129861779935)*x[1]
-        arg[0,4,1,0]=(1.10412289984)*x[0]+(1.34015931457)*x[1]
-        arg[0,4,1,1]=(-0.692340206781)*x[0]+(1.08467851048)*x[1]
-        arg[0,4,2,0]=(-0.0972657457169)*x[0]+(1.0145314899)*x[1]
-        arg[0,4,2,1]=(0.299871193443)*x[0]+(-0.470271033392)*x[1]
-        arg[1,0,0,0]=(-0.724229380092)*x[0]+(1.14448991134)*x[1]
-        arg[1,0,0,1]=(0.154147313948)*x[0]+(-0.318350887819)*x[1]
-        arg[1,0,1,0]=(-1.2997484551)*x[0]+(0.00645216870018)*x[1]
-        arg[1,0,1,1]=(1.53322180988)*x[0]+(-0.356405349895)*x[1]
-        arg[1,0,2,0]=(0.971184272781)*x[0]+(1.07821077146)*x[1]
-        arg[1,0,2,1]=(0.000530732762419)*x[0]+(0.955934156926)*x[1]
-        arg[1,1,0,0]=(-0.180982534825)*x[0]+(1.33554642886)*x[1]
-        arg[1,1,0,1]=(-0.419614369168)*x[0]+(-0.51201636845)*x[1]
-        arg[1,1,1,0]=(-0.263686990653)*x[0]+(-0.463089568134)*x[1]
-        arg[1,1,1,1]=(-0.792982985293)*x[0]+(-0.720992794822)*x[1]
-        arg[1,1,2,0]=(1.72981591311)*x[0]+(-0.305755746837)*x[1]
-        arg[1,1,2,1]=(0.874057242127)*x[0]+(0.247839316695)*x[1]
-        arg[1,2,0,0]=(1.20726244725)*x[0]+(0.44394602451)*x[1]
-        arg[1,2,0,1]=(-0.516016832395)*x[0]+(0.036120494771)*x[1]
-        arg[1,2,1,0]=(-0.157245073014)*x[0]+(0.845240869121)*x[1]
-        arg[1,2,1,1]=(0.588082465766)*x[0]+(0.195937663431)*x[1]
-        arg[1,2,2,0]=(0.095726763028)*x[0]+(-0.177757031723)*x[1]
-        arg[1,2,2,1]=(1.73215168642)*x[0]+(-0.189154112108)*x[1]
-        arg[1,3,0,0]=(-1.76621021161)*x[0]+(0.367931299124)*x[1]
-        arg[1,3,0,1]=(0.0222607642178)*x[0]+(0.466368587137)*x[1]
-        arg[1,3,1,0]=(0.412132176201)*x[0]+(0.553362139129)*x[1]
-        arg[1,3,1,1]=(-1.08306042349)*x[0]+(-0.834943125248)*x[1]
-        arg[1,3,2,0]=(-0.417451930632)*x[0]+(-0.659233486131)*x[1]
-        arg[1,3,2,1]=(-0.400333106519)*x[0]+(0.854889031906)*x[1]
-        arg[1,4,0,0]=(-0.758414654342)*x[0]+(0.838957251391)*x[1]
-        arg[1,4,0,1]=(-0.353472866001)*x[0]+(0.397138506541)*x[1]
-        arg[1,4,1,0]=(0.127641591916)*x[0]+(0.327603318651)*x[1]
-        arg[1,4,1,1]=(-0.341040162377)*x[0]+(-0.846062323778)*x[1]
-        arg[1,4,2,0]=(-0.293356226448)*x[0]+(-0.700648323903)*x[1]
-        arg[1,4,2,1]=(-0.228549394688)*x[0]+(1.43724938876)*x[1]
-        arg[2,0,0,0]=(-0.322023776234)*x[0]+(0.564889094588)*x[1]
-        arg[2,0,0,1]=(-1.11907082102)*x[0]+(-1.39374772922)*x[1]
-        arg[2,0,1,0]=(-0.705740617022)*x[0]+(0.511499218842)*x[1]
-        arg[2,0,1,1]=(0.454111255253)*x[0]+(-1.69843226881)*x[1]
-        arg[2,0,2,0]=(-0.317781478691)*x[0]+(-1.35991309273)*x[1]
-        arg[2,0,2,1]=(1.54613408914)*x[0]+(1.32901459805)*x[1]
-        arg[2,1,0,0]=(0.837517924208)*x[0]+(-0.386149637251)*x[1]
-        arg[2,1,0,1]=(0.961896547496)*x[0]+(0.617366532183)*x[1]
-        arg[2,1,1,0]=(-0.124021064331)*x[0]+(1.45238030663)*x[1]
-        arg[2,1,1,1]=(-1.34194701555)*x[0]+(-0.479310148218)*x[1]
-        arg[2,1,2,0]=(-0.813567438318)*x[0]+(0.35270597356)*x[1]
-        arg[2,1,2,1]=(0.833034787475)*x[0]+(-0.108648813503)*x[1]
-        arg[2,2,0,0]=(-1.36052757115)*x[0]+(-0.528858737068)*x[1]
-        arg[2,2,0,1]=(0.348085718404)*x[0]+(-0.550199132198)*x[1]
-        arg[2,2,1,0]=(-0.592064932053)*x[0]+(0.268729595158)*x[1]
-        arg[2,2,1,1]=(0.762201961036)*x[0]+(-0.170275800619)*x[1]
-        arg[2,2,2,0]=(0.292508257449)*x[0]+(0.546726460436)*x[1]
-        arg[2,2,2,1]=(-0.832981468483)*x[0]+(-1.01580974142)*x[1]
-        arg[2,3,0,0]=(-0.0778970282444)*x[0]+(-0.0588582131822)*x[1]
-        arg[2,3,0,1]=(-0.462860486423)*x[0]+(0.938910405107)*x[1]
-        arg[2,3,1,0]=(0.274056697467)*x[0]+(0.0938367562972)*x[1]
-        arg[2,3,1,1]=(0.168689167517)*x[0]+(-0.486345829711)*x[1]
-        arg[2,3,2,0]=(-1.33699397485)*x[0]+(-0.863623492326)*x[1]
-        arg[2,3,2,1]=(-0.317889793298)*x[0]+(0.47526951533)*x[1]
-        arg[2,4,0,0]=(-1.26561106959)*x[0]+(0.0486883091899)*x[1]
-        arg[2,4,0,1]=(-1.37742147186)*x[0]+(-1.14365670741)*x[1]
-        arg[2,4,1,0]=(0.891487506649)*x[0]+(-1.02149537779)*x[1]
-        arg[2,4,1,1]=(0.120446738176)*x[0]+(1.128322636)*x[1]
-        arg[2,4,2,0]=(-0.322931882495)*x[0]+(-0.00993625804164)*x[1]
-        arg[2,4,2,1]=(0.17764198759)*x[0]+(0.311937789824)*x[1]
-        arg[3,0,0,0]=(0.482490440467)*x[0]+(0.98496437249)*x[1]
-        arg[3,0,0,1]=(-0.174114820802)*x[0]+(0.442866651846)*x[1]
-        arg[3,0,1,0]=(-0.934180386688)*x[0]+(-1.33361314957)*x[1]
-        arg[3,0,1,1]=(0.0452285929122)*x[0]+(0.686705971575)*x[1]
-        arg[3,0,2,0]=(0.839801283293)*x[0]+(-0.967697483261)*x[1]
-        arg[3,0,2,1]=(0.14250663194)*x[0]+(-1.3515960506)*x[1]
-        arg[3,1,0,0]=(-0.322855905664)*x[0]+(0.177298330914)*x[1]
-        arg[3,1,0,1]=(-0.376491734039)*x[0]+(0.451059427164)*x[1]
-        arg[3,1,1,0]=(0.817537444737)*x[0]+(-0.93908061343)*x[1]
-        arg[3,1,1,1]=(-0.0753530118606)*x[0]+(-0.0718596035883)*x[1]
-        arg[3,1,2,0]=(-1.48772358944)*x[0]+(0.414823807711)*x[1]
-        arg[3,1,2,1]=(0.857324284797)*x[0]+(0.47131796901)*x[1]
-        arg[3,2,0,0]=(0.440034775536)*x[0]+(0.712881563582)*x[1]
-        arg[3,2,0,1]=(-1.05547066)*x[0]+(0.718956424358)*x[1]
-        arg[3,2,1,0]=(-1.40526673086)*x[0]+(-0.366871542135)*x[1]
-        arg[3,2,1,1]=(1.65950470328)*x[0]+(-1.65805816594)*x[1]
-        arg[3,2,2,0]=(1.09096918876)*x[0]+(-1.33325242756)*x[1]
-        arg[3,2,2,1]=(-0.591939877469)*x[0]+(1.0303591776)*x[1]
-        arg[3,3,0,0]=(-0.969754780364)*x[0]+(-0.0145852822005)*x[1]
-        arg[3,3,0,1]=(-1.22384841753)*x[0]+(-0.0867406833581)*x[1]
-        arg[3,3,1,0]=(0.673272022388)*x[0]+(0.947486168095)*x[1]
-        arg[3,3,1,1]=(-0.41449883684)*x[0]+(0.137714746421)*x[1]
-        arg[3,3,2,0]=(0.874598196414)*x[0]+(0.436570682065)*x[1]
-        arg[3,3,2,1]=(0.127986513106)*x[0]+(0.955109334387)*x[1]
-        arg[3,4,0,0]=(0.226160174687)*x[0]+(-0.258282204272)*x[1]
-        arg[3,4,0,1]=(-0.157570106985)*x[0]+(-0.299582244336)*x[1]
-        arg[3,4,1,0]=(0.305056978098)*x[0]+(1.34807929179)*x[1]
-        arg[3,4,1,1]=(1.16863934732)*x[0]+(-0.265384337877)*x[1]
-        arg[3,4,2,0]=(1.26265936998)*x[0]+(0.379703748135)*x[1]
-        arg[3,4,2,1]=(-0.392236938104)*x[0]+(0.829704189106)*x[1]
-        ref[0,0,0,0]=(-0.0345299040391)*x_ref[0]+(-0.454395763203)*x_ref[1]
-        ref[0,0,0,1]=(0.816055157967)*x_ref[0]+(1.65538436278)*x_ref[1]
-        ref[0,0,1,0]=(0.0173895492935)*x_ref[0]+(0.390351555311)*x_ref[1]
-        ref[0,0,1,1]=(0.0601948568001)*x_ref[0]+(0.221935674716)*x_ref[1]
-        ref[0,0,2,0]=(-0.86832157368)*x_ref[0]+(0.719344815038)*x_ref[1]
-        ref[0,0,2,1]=(1.25819429092)*x_ref[0]+(-0.626192861251)*x_ref[1]
-        ref[0,1,0,0]=(-0.408148703502)*x_ref[0]+(0.614498083344)*x_ref[1]
-        ref[0,1,0,1]=(-0.948405669606)*x_ref[0]+(-0.431912186759)*x_ref[1]
-        ref[0,1,1,0]=(1.31545349201)*x_ref[0]+(-1.43633966996)*x_ref[1]
-        ref[0,1,1,1]=(-0.262029058642)*x_ref[0]+(-0.211155762782)*x_ref[1]
-        ref[0,1,2,0]=(-1.29637408623)*x_ref[0]+(0.015300306679)*x_ref[1]
-        ref[0,1,2,1]=(-0.338105266735)*x_ref[0]+(-1.17464147824)*x_ref[1]
-        ref[0,2,0,0]=(-1.29420036616)*x_ref[0]+(0.162651211594)*x_ref[1]
-        ref[0,2,0,1]=(-0.524474022859)*x_ref[0]+(-0.606176834607)*x_ref[1]
-        ref[0,2,1,0]=(1.43089226048)*x_ref[0]+(-1.4419171599)*x_ref[1]
-        ref[0,2,1,1]=(1.2204089172)*x_ref[0]+(0.642504226769)*x_ref[1]
-        ref[0,2,2,0]=(-1.43093048803)*x_ref[0]+(-0.220023978143)*x_ref[1]
-        ref[0,2,2,1]=(-1.03649750995)*x_ref[0]+(0.169884643951)*x_ref[1]
-        ref[0,3,0,0]=(-0.250124925508)*x_ref[0]+(-0.46412090099)*x_ref[1]
-        ref[0,3,0,1]=(-0.534018976189)*x_ref[0]+(-0.118541672182)*x_ref[1]
-        ref[0,3,1,0]=(-1.79137479214)*x_ref[0]+(0.662559958387)*x_ref[1]
-        ref[0,3,1,1]=(-0.881482101487)*x_ref[0]+(0.372532785249)*x_ref[1]
-        ref[0,3,2,0]=(-1.71336096366)*x_ref[0]+(-1.24175201959)*x_ref[1]
-        ref[0,3,2,1]=(0.384581239528)*x_ref[0]+(-0.131008110136)*x_ref[1]
-        ref[0,4,0,0]=(0.315863164115)*x_ref[0]+(-0.494712527335)*x_ref[1]
-        ref[0,4,0,1]=(-1.10002713328)*x_ref[0]+(0.129861779935)*x_ref[1]
-        ref[0,4,1,0]=(1.10412289984)*x_ref[0]+(1.34015931457)*x_ref[1]
-        ref[0,4,1,1]=(-0.692340206781)*x_ref[0]+(1.08467851048)*x_ref[1]
-        ref[0,4,2,0]=(-0.0972657457169)*x_ref[0]+(1.0145314899)*x_ref[1]
-        ref[0,4,2,1]=(0.299871193443)*x_ref[0]+(-0.470271033392)*x_ref[1]
-        ref[1,0,0,0]=(-0.724229380092)*x_ref[0]+(1.14448991134)*x_ref[1]
-        ref[1,0,0,1]=(0.154147313948)*x_ref[0]+(-0.318350887819)*x_ref[1]
-        ref[1,0,1,0]=(-1.2997484551)*x_ref[0]+(0.00645216870018)*x_ref[1]
-        ref[1,0,1,1]=(1.53322180988)*x_ref[0]+(-0.356405349895)*x_ref[1]
-        ref[1,0,2,0]=(0.971184272781)*x_ref[0]+(1.07821077146)*x_ref[1]
-        ref[1,0,2,1]=(0.000530732762419)*x_ref[0]+(0.955934156926)*x_ref[1]
-        ref[1,1,0,0]=(-0.180982534825)*x_ref[0]+(1.33554642886)*x_ref[1]
-        ref[1,1,0,1]=(-0.419614369168)*x_ref[0]+(-0.51201636845)*x_ref[1]
-        ref[1,1,1,0]=(-0.263686990653)*x_ref[0]+(-0.463089568134)*x_ref[1]
-        ref[1,1,1,1]=(-0.792982985293)*x_ref[0]+(-0.720992794822)*x_ref[1]
-        ref[1,1,2,0]=(1.72981591311)*x_ref[0]+(-0.305755746837)*x_ref[1]
-        ref[1,1,2,1]=(0.874057242127)*x_ref[0]+(0.247839316695)*x_ref[1]
-        ref[1,2,0,0]=(1.20726244725)*x_ref[0]+(0.44394602451)*x_ref[1]
-        ref[1,2,0,1]=(-0.516016832395)*x_ref[0]+(0.036120494771)*x_ref[1]
-        ref[1,2,1,0]=(-0.157245073014)*x_ref[0]+(0.845240869121)*x_ref[1]
-        ref[1,2,1,1]=(0.588082465766)*x_ref[0]+(0.195937663431)*x_ref[1]
-        ref[1,2,2,0]=(0.095726763028)*x_ref[0]+(-0.177757031723)*x_ref[1]
-        ref[1,2,2,1]=(1.73215168642)*x_ref[0]+(-0.189154112108)*x_ref[1]
-        ref[1,3,0,0]=(-1.76621021161)*x_ref[0]+(0.367931299124)*x_ref[1]
-        ref[1,3,0,1]=(0.0222607642178)*x_ref[0]+(0.466368587137)*x_ref[1]
-        ref[1,3,1,0]=(0.412132176201)*x_ref[0]+(0.553362139129)*x_ref[1]
-        ref[1,3,1,1]=(-1.08306042349)*x_ref[0]+(-0.834943125248)*x_ref[1]
-        ref[1,3,2,0]=(-0.417451930632)*x_ref[0]+(-0.659233486131)*x_ref[1]
-        ref[1,3,2,1]=(-0.400333106519)*x_ref[0]+(0.854889031906)*x_ref[1]
-        ref[1,4,0,0]=(-0.758414654342)*x_ref[0]+(0.838957251391)*x_ref[1]
-        ref[1,4,0,1]=(-0.353472866001)*x_ref[0]+(0.397138506541)*x_ref[1]
-        ref[1,4,1,0]=(0.127641591916)*x_ref[0]+(0.327603318651)*x_ref[1]
-        ref[1,4,1,1]=(-0.341040162377)*x_ref[0]+(-0.846062323778)*x_ref[1]
-        ref[1,4,2,0]=(-0.293356226448)*x_ref[0]+(-0.700648323903)*x_ref[1]
-        ref[1,4,2,1]=(-0.228549394688)*x_ref[0]+(1.43724938876)*x_ref[1]
-        ref[2,0,0,0]=(-0.322023776234)*x_ref[0]+(0.564889094588)*x_ref[1]
-        ref[2,0,0,1]=(-1.11907082102)*x_ref[0]+(-1.39374772922)*x_ref[1]
-        ref[2,0,1,0]=(-0.705740617022)*x_ref[0]+(0.511499218842)*x_ref[1]
-        ref[2,0,1,1]=(0.454111255253)*x_ref[0]+(-1.69843226881)*x_ref[1]
-        ref[2,0,2,0]=(-0.317781478691)*x_ref[0]+(-1.35991309273)*x_ref[1]
-        ref[2,0,2,1]=(1.54613408914)*x_ref[0]+(1.32901459805)*x_ref[1]
-        ref[2,1,0,0]=(0.837517924208)*x_ref[0]+(-0.386149637251)*x_ref[1]
-        ref[2,1,0,1]=(0.961896547496)*x_ref[0]+(0.617366532183)*x_ref[1]
-        ref[2,1,1,0]=(-0.124021064331)*x_ref[0]+(1.45238030663)*x_ref[1]
-        ref[2,1,1,1]=(-1.34194701555)*x_ref[0]+(-0.479310148218)*x_ref[1]
-        ref[2,1,2,0]=(-0.813567438318)*x_ref[0]+(0.35270597356)*x_ref[1]
-        ref[2,1,2,1]=(0.833034787475)*x_ref[0]+(-0.108648813503)*x_ref[1]
-        ref[2,2,0,0]=(-1.36052757115)*x_ref[0]+(-0.528858737068)*x_ref[1]
-        ref[2,2,0,1]=(0.348085718404)*x_ref[0]+(-0.550199132198)*x_ref[1]
-        ref[2,2,1,0]=(-0.592064932053)*x_ref[0]+(0.268729595158)*x_ref[1]
-        ref[2,2,1,1]=(0.762201961036)*x_ref[0]+(-0.170275800619)*x_ref[1]
-        ref[2,2,2,0]=(0.292508257449)*x_ref[0]+(0.546726460436)*x_ref[1]
-        ref[2,2,2,1]=(-0.832981468483)*x_ref[0]+(-1.01580974142)*x_ref[1]
-        ref[2,3,0,0]=(-0.0778970282444)*x_ref[0]+(-0.0588582131822)*x_ref[1]
-        ref[2,3,0,1]=(-0.462860486423)*x_ref[0]+(0.938910405107)*x_ref[1]
-        ref[2,3,1,0]=(0.274056697467)*x_ref[0]+(0.0938367562972)*x_ref[1]
-        ref[2,3,1,1]=(0.168689167517)*x_ref[0]+(-0.486345829711)*x_ref[1]
-        ref[2,3,2,0]=(-1.33699397485)*x_ref[0]+(-0.863623492326)*x_ref[1]
-        ref[2,3,2,1]=(-0.317889793298)*x_ref[0]+(0.47526951533)*x_ref[1]
-        ref[2,4,0,0]=(-1.26561106959)*x_ref[0]+(0.0486883091899)*x_ref[1]
-        ref[2,4,0,1]=(-1.37742147186)*x_ref[0]+(-1.14365670741)*x_ref[1]
-        ref[2,4,1,0]=(0.891487506649)*x_ref[0]+(-1.02149537779)*x_ref[1]
-        ref[2,4,1,1]=(0.120446738176)*x_ref[0]+(1.128322636)*x_ref[1]
-        ref[2,4,2,0]=(-0.322931882495)*x_ref[0]+(-0.00993625804164)*x_ref[1]
-        ref[2,4,2,1]=(0.17764198759)*x_ref[0]+(0.311937789824)*x_ref[1]
-        ref[3,0,0,0]=(0.482490440467)*x_ref[0]+(0.98496437249)*x_ref[1]
-        ref[3,0,0,1]=(-0.174114820802)*x_ref[0]+(0.442866651846)*x_ref[1]
-        ref[3,0,1,0]=(-0.934180386688)*x_ref[0]+(-1.33361314957)*x_ref[1]
-        ref[3,0,1,1]=(0.0452285929122)*x_ref[0]+(0.686705971575)*x_ref[1]
-        ref[3,0,2,0]=(0.839801283293)*x_ref[0]+(-0.967697483261)*x_ref[1]
-        ref[3,0,2,1]=(0.14250663194)*x_ref[0]+(-1.3515960506)*x_ref[1]
-        ref[3,1,0,0]=(-0.322855905664)*x_ref[0]+(0.177298330914)*x_ref[1]
-        ref[3,1,0,1]=(-0.376491734039)*x_ref[0]+(0.451059427164)*x_ref[1]
-        ref[3,1,1,0]=(0.817537444737)*x_ref[0]+(-0.93908061343)*x_ref[1]
-        ref[3,1,1,1]=(-0.0753530118606)*x_ref[0]+(-0.0718596035883)*x_ref[1]
-        ref[3,1,2,0]=(-1.48772358944)*x_ref[0]+(0.414823807711)*x_ref[1]
-        ref[3,1,2,1]=(0.857324284797)*x_ref[0]+(0.47131796901)*x_ref[1]
-        ref[3,2,0,0]=(0.440034775536)*x_ref[0]+(0.712881563582)*x_ref[1]
-        ref[3,2,0,1]=(-1.05547066)*x_ref[0]+(0.718956424358)*x_ref[1]
-        ref[3,2,1,0]=(-1.40526673086)*x_ref[0]+(-0.366871542135)*x_ref[1]
-        ref[3,2,1,1]=(1.65950470328)*x_ref[0]+(-1.65805816594)*x_ref[1]
-        ref[3,2,2,0]=(1.09096918876)*x_ref[0]+(-1.33325242756)*x_ref[1]
-        ref[3,2,2,1]=(-0.591939877469)*x_ref[0]+(1.0303591776)*x_ref[1]
-        ref[3,3,0,0]=(-0.969754780364)*x_ref[0]+(-0.0145852822005)*x_ref[1]
-        ref[3,3,0,1]=(-1.22384841753)*x_ref[0]+(-0.0867406833581)*x_ref[1]
-        ref[3,3,1,0]=(0.673272022388)*x_ref[0]+(0.947486168095)*x_ref[1]
-        ref[3,3,1,1]=(-0.41449883684)*x_ref[0]+(0.137714746421)*x_ref[1]
-        ref[3,3,2,0]=(0.874598196414)*x_ref[0]+(0.436570682065)*x_ref[1]
-        ref[3,3,2,1]=(0.127986513106)*x_ref[0]+(0.955109334387)*x_ref[1]
-        ref[3,4,0,0]=(0.226160174687)*x_ref[0]+(-0.258282204272)*x_ref[1]
-        ref[3,4,0,1]=(-0.157570106985)*x_ref[0]+(-0.299582244336)*x_ref[1]
-        ref[3,4,1,0]=(0.305056978098)*x_ref[0]+(1.34807929179)*x_ref[1]
-        ref[3,4,1,1]=(1.16863934732)*x_ref[0]+(-0.265384337877)*x_ref[1]
-        ref[3,4,2,0]=(1.26265936998)*x_ref[0]+(0.379703748135)*x_ref[1]
-        ref[3,4,2,1]=(-0.392236938104)*x_ref[0]+(0.829704189106)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.657131010834)*x[0]+(0.925056704895)*x[1]+(0.405133059909)*x[2]
-        arg[0,0,0,1]=(1.00133275423)*x[0]+(0.804604848583)*x[1]+(-0.127865284577)*x[2]
-        arg[0,0,1,0]=(-1.43854141172)*x[0]+(0.461779683792)*x[1]+(-1.35332048209)*x[2]
-        arg[0,0,1,1]=(0.00990645894894)*x[0]+(-0.127101800988)*x[1]+(-0.105358765313)*x[2]
-        arg[0,0,2,0]=(0.116780997053)*x[0]+(1.14704063829)*x[1]+(-0.0190951296257)*x[2]
-        arg[0,0,2,1]=(0.485352133633)*x[0]+(0.232507104974)*x[1]+(-1.13067055888)*x[2]
-        arg[0,1,0,0]=(-0.350822544873)*x[0]+(-0.812391120478)*x[1]+(0.215924121867)*x[2]
-        arg[0,1,0,1]=(-0.351284651716)*x[0]+(-0.221990440191)*x[1]+(-0.223075105598)*x[2]
-        arg[0,1,1,0]=(-0.148376043654)*x[0]+(0.571632161665)*x[1]+(0.519163900078)*x[2]
-        arg[0,1,1,1]=(-1.45038964408)*x[0]+(0.302237803429)*x[1]+(0.742483356143)*x[2]
-        arg[0,1,2,0]=(-0.504270471573)*x[0]+(0.450418202232)*x[1]+(-0.111778328066)*x[2]
-        arg[0,1,2,1]=(-0.0249264677684)*x[0]+(-1.50643033256)*x[1]+(-1.35775630013)*x[2]
-        arg[0,2,0,0]=(0.303211268309)*x[0]+(-0.464853430563)*x[1]+(0.649958565051)*x[2]
-        arg[0,2,0,1]=(-0.099640500895)*x[0]+(-0.190653996191)*x[1]+(1.25662361146)*x[2]
-        arg[0,2,1,0]=(0.196051285683)*x[0]+(-0.0405207084252)*x[1]+(-0.247626612712)*x[2]
-        arg[0,2,1,1]=(0.466541264508)*x[0]+(1.12203001637)*x[1]+(0.214880867458)*x[2]
-        arg[0,2,2,0]=(-0.066399925725)*x[0]+(-0.246038048418)*x[1]+(-1.36436628718)*x[2]
-        arg[0,2,2,1]=(1.11813537863)*x[0]+(-1.09166896181)*x[1]+(0.321936214135)*x[2]
-        arg[0,3,0,0]=(0.374873324445)*x[0]+(-0.465943548272)*x[1]+(0.0190372923331)*x[2]
-        arg[0,3,0,1]=(0.833988907462)*x[0]+(-1.01195758004)*x[1]+(0.237305351727)*x[2]
-        arg[0,3,1,0]=(0.311900067643)*x[0]+(-1.11508238642)*x[1]+(-1.04912391557)*x[2]
-        arg[0,3,1,1]=(-0.211460991448)*x[0]+(-0.768164308901)*x[1]+(-0.450128967205)*x[2]
-        arg[0,3,2,0]=(-0.412678195326)*x[0]+(-0.0808659043088)*x[1]+(0.588002415672)*x[2]
-        arg[0,3,2,1]=(-1.25661069251)*x[0]+(-1.51596081235)*x[1]+(-1.38001371964)*x[2]
-        arg[0,4,0,0]=(0.0822281994319)*x[0]+(-0.726137997384)*x[1]+(0.20532237702)*x[2]
-        arg[0,4,0,1]=(-0.538872250604)*x[0]+(0.669139417413)*x[1]+(0.235909494023)*x[2]
-        arg[0,4,1,0]=(0.171512295446)*x[0]+(-1.37296529156)*x[1]+(1.25081328539)*x[2]
-        arg[0,4,1,1]=(-0.440062802901)*x[0]+(1.32591598513)*x[1]+(0.802645502519)*x[2]
-        arg[0,4,2,0]=(1.55151533491)*x[0]+(0.923232387757)*x[1]+(-0.238979557225)*x[2]
-        arg[0,4,2,1]=(-0.193306423923)*x[0]+(-0.565399635257)*x[1]+(-0.149043846608)*x[2]
-        arg[1,0,0,0]=(0.152247539316)*x[0]+(-1.219763414)*x[1]+(0.836742536417)*x[2]
-        arg[1,0,0,1]=(0.279236863017)*x[0]+(0.14118432621)*x[1]+(-0.33072070595)*x[2]
-        arg[1,0,1,0]=(-0.242848555181)*x[0]+(-0.981144530476)*x[1]+(-0.925220699112)*x[2]
-        arg[1,0,1,1]=(-1.8765425995)*x[0]+(-0.0878096696901)*x[1]+(0.133461124587)*x[2]
-        arg[1,0,2,0]=(-0.282373512491)*x[0]+(0.640862824684)*x[1]+(-1.41391625471)*x[2]
-        arg[1,0,2,1]=(0.168260007994)*x[0]+(0.660595443409)*x[1]+(1.14161006755)*x[2]
-        arg[1,1,0,0]=(-0.160956063437)*x[0]+(-0.60581390216)*x[1]+(1.28589122111)*x[2]
-        arg[1,1,0,1]=(0.0969448014041)*x[0]+(-1.63715420302)*x[1]+(-0.350879443881)*x[2]
-        arg[1,1,1,0]=(0.0878659583502)*x[0]+(1.13265578932)*x[1]+(-0.615846752768)*x[2]
-        arg[1,1,1,1]=(-0.434597962742)*x[0]+(-0.177532580699)*x[1]+(0.543921860391)*x[2]
-        arg[1,1,2,0]=(-0.7739187322)*x[0]+(-0.285452235523)*x[1]+(-0.0426663737344)*x[2]
-        arg[1,1,2,1]=(0.796313217511)*x[0]+(-1.12909584404)*x[1]+(1.26302048961)*x[2]
-        arg[1,2,0,0]=(1.62555299859)*x[0]+(-1.1660403401)*x[1]+(-0.668592413245)*x[2]
-        arg[1,2,0,1]=(-0.807742954877)*x[0]+(-0.238532476847)*x[1]+(-1.13575189406)*x[2]
-        arg[1,2,1,0]=(-0.139280450456)*x[0]+(-0.043306992095)*x[1]+(0.832351898761)*x[2]
-        arg[1,2,1,1]=(0.16731150192)*x[0]+(0.0705653171485)*x[1]+(0.12943106453)*x[2]
-        arg[1,2,2,0]=(0.669247838367)*x[0]+(1.10177451339)*x[1]+(1.21850224582)*x[2]
-        arg[1,2,2,1]=(-0.779527532537)*x[0]+(0.10943711539)*x[1]+(0.0286417760627)*x[2]
-        arg[1,3,0,0]=(-0.500367153143)*x[0]+(-0.0315766921687)*x[1]+(0.0814977959486)*x[2]
-        arg[1,3,0,1]=(1.44010930702)*x[0]+(0.985266827661)*x[1]+(-0.4777280416)*x[2]
-        arg[1,3,1,0]=(-1.09856159209)*x[0]+(0.914767947742)*x[1]+(0.257975836816)*x[2]
-        arg[1,3,1,1]=(1.20572454864)*x[0]+(-1.18899739672)*x[1]+(-0.881322688875)*x[2]
-        arg[1,3,2,0]=(0.0683727807399)*x[0]+(0.27893403097)*x[1]+(0.532141657019)*x[2]
-        arg[1,3,2,1]=(1.22927878362)*x[0]+(-0.746664730318)*x[1]+(0.706635763178)*x[2]
-        arg[1,4,0,0]=(-0.056381118157)*x[0]+(0.497463663176)*x[1]+(-0.0170016763418)*x[2]
-        arg[1,4,0,1]=(0.220396391337)*x[0]+(-0.311295539709)*x[1]+(-0.0925408150537)*x[2]
-        arg[1,4,1,0]=(-1.26814101481)*x[0]+(1.36544235985)*x[1]+(-0.706223605983)*x[2]
-        arg[1,4,1,1]=(-0.151531826396)*x[0]+(0.709418004406)*x[1]+(0.361464674136)*x[2]
-        arg[1,4,2,0]=(-1.29637464683)*x[0]+(1.12643501861)*x[1]+(0.0119437305981)*x[2]
-        arg[1,4,2,1]=(-0.127448007113)*x[0]+(0.423470578567)*x[1]+(0.57274403474)*x[2]
-        arg[2,0,0,0]=(-0.753513005537)*x[0]+(-1.42995648081)*x[1]+(-0.748578276092)*x[2]
-        arg[2,0,0,1]=(-0.529225216075)*x[0]+(0.723600505708)*x[1]+(-0.265987788752)*x[2]
-        arg[2,0,1,0]=(0.570242632099)*x[0]+(0.7183918375)*x[1]+(-0.127239408099)*x[2]
-        arg[2,0,1,1]=(0.23496854128)*x[0]+(0.642830624861)*x[1]+(0.734149374044)*x[2]
-        arg[2,0,2,0]=(-0.302583224046)*x[0]+(0.0684944027143)*x[1]+(0.156995461545)*x[2]
-        arg[2,0,2,1]=(-0.549180930856)*x[0]+(0.334205359442)*x[1]+(1.05254428528)*x[2]
-        arg[2,1,0,0]=(-0.234799499951)*x[0]+(1.17826730605)*x[1]+(1.09739059469)*x[2]
-        arg[2,1,0,1]=(-0.187707076501)*x[0]+(0.011330011831)*x[1]+(-0.233605047453)*x[2]
-        arg[2,1,1,0]=(0.290424858876)*x[0]+(0.12865400019)*x[1]+(-1.01515096279)*x[2]
-        arg[2,1,1,1]=(-1.05797585987)*x[0]+(0.679572972092)*x[1]+(1.04481198693)*x[2]
-        arg[2,1,2,0]=(0.240336170335)*x[0]+(0.567306847159)*x[1]+(0.224146880555)*x[2]
-        arg[2,1,2,1]=(-0.568589696446)*x[0]+(1.37586080732)*x[1]+(-0.292086990344)*x[2]
-        arg[2,2,0,0]=(1.16127933088)*x[0]+(-0.205088565357)*x[1]+(-0.0262686243919)*x[2]
-        arg[2,2,0,1]=(1.17913541301)*x[0]+(-0.953527588914)*x[1]+(-1.0594095352)*x[2]
-        arg[2,2,1,0]=(-0.116342811686)*x[0]+(0.459831226378)*x[1]+(0.532324650374)*x[2]
-        arg[2,2,1,1]=(-0.904379150749)*x[0]+(0.0197201393782)*x[1]+(1.16488799459)*x[2]
-        arg[2,2,2,0]=(0.288441825708)*x[0]+(-0.00162365695053)*x[1]+(-0.696961968544)*x[2]
-        arg[2,2,2,1]=(-0.278951886334)*x[0]+(-0.438973263931)*x[1]+(-0.617387268055)*x[2]
-        arg[2,3,0,0]=(-0.575840111545)*x[0]+(-0.430583405817)*x[1]+(0.678495026384)*x[2]
-        arg[2,3,0,1]=(-0.0712810127233)*x[0]+(-0.479271089471)*x[1]+(-0.561687276819)*x[2]
-        arg[2,3,1,0]=(0.00293903214402)*x[0]+(0.707224264038)*x[1]+(0.863200461564)*x[2]
-        arg[2,3,1,1]=(-0.982725212738)*x[0]+(1.12174250462)*x[1]+(0.692163622484)*x[2]
-        arg[2,3,2,0]=(0.563182079719)*x[0]+(0.592670114886)*x[1]+(1.12490471848)*x[2]
-        arg[2,3,2,1]=(0.674175588576)*x[0]+(0.125281804818)*x[1]+(0.260310807977)*x[2]
-        arg[2,4,0,0]=(-0.468871891598)*x[0]+(0.628476449634)*x[1]+(1.44798783935)*x[2]
-        arg[2,4,0,1]=(0.331618946805)*x[0]+(1.18126898042)*x[1]+(1.73036582285)*x[2]
-        arg[2,4,1,0]=(0.643190142583)*x[0]+(0.958102048788)*x[1]+(-1.17509922201)*x[2]
-        arg[2,4,1,1]=(0.140678141755)*x[0]+(-0.964205570281)*x[1]+(1.33722038246)*x[2]
-        arg[2,4,2,0]=(1.00405626052)*x[0]+(-0.766180509924)*x[1]+(-1.12787337858)*x[2]
-        arg[2,4,2,1]=(0.015701651285)*x[0]+(-0.0327586063712)*x[1]+(-1.60288759856)*x[2]
-        arg[3,0,0,0]=(-0.0648346068133)*x[0]+(0.0319743940508)*x[1]+(-0.0885983990043)*x[2]
-        arg[3,0,0,1]=(0.440191590799)*x[0]+(-0.224950534025)*x[1]+(-1.59285278381)*x[2]
-        arg[3,0,1,0]=(-1.39437403492)*x[0]+(0.718181967012)*x[1]+(-0.320282124786)*x[2]
-        arg[3,0,1,1]=(0.212062143443)*x[0]+(0.552967368897)*x[1]+(-0.805494016261)*x[2]
-        arg[3,0,2,0]=(0.123432537169)*x[0]+(-0.124637759512)*x[1]+(-0.627011571378)*x[2]
-        arg[3,0,2,1]=(-0.112696666742)*x[0]+(-0.264195102375)*x[1]+(0.0720389973432)*x[2]
-        arg[3,1,0,0]=(-0.13525504711)*x[0]+(1.02997422411)*x[1]+(-1.00797986845)*x[2]
-        arg[3,1,0,1]=(-0.0675047394459)*x[0]+(1.39934707441)*x[1]+(-0.563292489037)*x[2]
-        arg[3,1,1,0]=(-0.597786255631)*x[0]+(0.969544698551)*x[1]+(-0.0636563520143)*x[2]
-        arg[3,1,1,1]=(0.615372705023)*x[0]+(-0.312239254268)*x[1]+(1.11108440155)*x[2]
-        arg[3,1,2,0]=(0.876145642141)*x[0]+(0.117271425687)*x[1]+(1.10498467015)*x[2]
-        arg[3,1,2,1]=(-0.881281403659)*x[0]+(0.240299603044)*x[1]+(0.14672255814)*x[2]
-        arg[3,2,0,0]=(-1.72712606675)*x[0]+(0.20271220583)*x[1]+(1.10555001416)*x[2]
-        arg[3,2,0,1]=(0.251203467531)*x[0]+(1.14031566726)*x[1]+(0.13511684108)*x[2]
-        arg[3,2,1,0]=(-0.318589273012)*x[0]+(1.22432558956)*x[1]+(0.0532448118609)*x[2]
-        arg[3,2,1,1]=(0.238528986535)*x[0]+(0.181951236101)*x[1]+(0.0816544114367)*x[2]
-        arg[3,2,2,0]=(0.691665718353)*x[0]+(0.238132802916)*x[1]+(1.0244502435)*x[2]
-        arg[3,2,2,1]=(-1.64759886895)*x[0]+(1.06200853706)*x[1]+(-0.0980251738655)*x[2]
-        arg[3,3,0,0]=(-0.0493788966334)*x[0]+(-0.471962146153)*x[1]+(0.156759333734)*x[2]
-        arg[3,3,0,1]=(-0.304056988684)*x[0]+(-0.298060200774)*x[1]+(-0.455474275206)*x[2]
-        arg[3,3,1,0]=(-0.62366321672)*x[0]+(0.229030608831)*x[1]+(0.737950069935)*x[2]
-        arg[3,3,1,1]=(0.132130038359)*x[0]+(0.749997139232)*x[1]+(-0.793138255465)*x[2]
-        arg[3,3,2,0]=(1.71562899872)*x[0]+(0.659770561383)*x[1]+(0.59886052289)*x[2]
-        arg[3,3,2,1]=(0.863622138509)*x[0]+(-0.626586688059)*x[1]+(0.744519466248)*x[2]
-        arg[3,4,0,0]=(0.0214494537522)*x[0]+(0.732351688803)*x[1]+(-0.46140559894)*x[2]
-        arg[3,4,0,1]=(1.33581215441)*x[0]+(-1.16528842961)*x[1]+(-0.888687584892)*x[2]
-        arg[3,4,1,0]=(-0.971883445892)*x[0]+(0.715423530047)*x[1]+(-0.0743908860543)*x[2]
-        arg[3,4,1,1]=(-0.941321450189)*x[0]+(-0.120890461937)*x[1]+(0.929504478456)*x[2]
-        arg[3,4,2,0]=(0.515343485731)*x[0]+(0.323772401243)*x[1]+(-1.03459959098)*x[2]
-        arg[3,4,2,1]=(0.50815257234)*x[0]+(0.461750357229)*x[1]+(0.0260081346396)*x[2]
-        ref[0,0,0,0]=(0.657131010834)*x_ref[0]+(0.925056704895)*x_ref[1]+(0.405133059909)*x_ref[2]
-        ref[0,0,0,1]=(1.00133275423)*x_ref[0]+(0.804604848583)*x_ref[1]+(-0.127865284577)*x_ref[2]
-        ref[0,0,1,0]=(-1.43854141172)*x_ref[0]+(0.461779683792)*x_ref[1]+(-1.35332048209)*x_ref[2]
-        ref[0,0,1,1]=(0.00990645894894)*x_ref[0]+(-0.127101800988)*x_ref[1]+(-0.105358765313)*x_ref[2]
-        ref[0,0,2,0]=(0.116780997053)*x_ref[0]+(1.14704063829)*x_ref[1]+(-0.0190951296257)*x_ref[2]
-        ref[0,0,2,1]=(0.485352133633)*x_ref[0]+(0.232507104974)*x_ref[1]+(-1.13067055888)*x_ref[2]
-        ref[0,1,0,0]=(-0.350822544873)*x_ref[0]+(-0.812391120478)*x_ref[1]+(0.215924121867)*x_ref[2]
-        ref[0,1,0,1]=(-0.351284651716)*x_ref[0]+(-0.221990440191)*x_ref[1]+(-0.223075105598)*x_ref[2]
-        ref[0,1,1,0]=(-0.148376043654)*x_ref[0]+(0.571632161665)*x_ref[1]+(0.519163900078)*x_ref[2]
-        ref[0,1,1,1]=(-1.45038964408)*x_ref[0]+(0.302237803429)*x_ref[1]+(0.742483356143)*x_ref[2]
-        ref[0,1,2,0]=(-0.504270471573)*x_ref[0]+(0.450418202232)*x_ref[1]+(-0.111778328066)*x_ref[2]
-        ref[0,1,2,1]=(-0.0249264677684)*x_ref[0]+(-1.50643033256)*x_ref[1]+(-1.35775630013)*x_ref[2]
-        ref[0,2,0,0]=(0.303211268309)*x_ref[0]+(-0.464853430563)*x_ref[1]+(0.649958565051)*x_ref[2]
-        ref[0,2,0,1]=(-0.099640500895)*x_ref[0]+(-0.190653996191)*x_ref[1]+(1.25662361146)*x_ref[2]
-        ref[0,2,1,0]=(0.196051285683)*x_ref[0]+(-0.0405207084252)*x_ref[1]+(-0.247626612712)*x_ref[2]
-        ref[0,2,1,1]=(0.466541264508)*x_ref[0]+(1.12203001637)*x_ref[1]+(0.214880867458)*x_ref[2]
-        ref[0,2,2,0]=(-0.066399925725)*x_ref[0]+(-0.246038048418)*x_ref[1]+(-1.36436628718)*x_ref[2]
-        ref[0,2,2,1]=(1.11813537863)*x_ref[0]+(-1.09166896181)*x_ref[1]+(0.321936214135)*x_ref[2]
-        ref[0,3,0,0]=(0.374873324445)*x_ref[0]+(-0.465943548272)*x_ref[1]+(0.0190372923331)*x_ref[2]
-        ref[0,3,0,1]=(0.833988907462)*x_ref[0]+(-1.01195758004)*x_ref[1]+(0.237305351727)*x_ref[2]
-        ref[0,3,1,0]=(0.311900067643)*x_ref[0]+(-1.11508238642)*x_ref[1]+(-1.04912391557)*x_ref[2]
-        ref[0,3,1,1]=(-0.211460991448)*x_ref[0]+(-0.768164308901)*x_ref[1]+(-0.450128967205)*x_ref[2]
-        ref[0,3,2,0]=(-0.412678195326)*x_ref[0]+(-0.0808659043088)*x_ref[1]+(0.588002415672)*x_ref[2]
-        ref[0,3,2,1]=(-1.25661069251)*x_ref[0]+(-1.51596081235)*x_ref[1]+(-1.38001371964)*x_ref[2]
-        ref[0,4,0,0]=(0.0822281994319)*x_ref[0]+(-0.726137997384)*x_ref[1]+(0.20532237702)*x_ref[2]
-        ref[0,4,0,1]=(-0.538872250604)*x_ref[0]+(0.669139417413)*x_ref[1]+(0.235909494023)*x_ref[2]
-        ref[0,4,1,0]=(0.171512295446)*x_ref[0]+(-1.37296529156)*x_ref[1]+(1.25081328539)*x_ref[2]
-        ref[0,4,1,1]=(-0.440062802901)*x_ref[0]+(1.32591598513)*x_ref[1]+(0.802645502519)*x_ref[2]
-        ref[0,4,2,0]=(1.55151533491)*x_ref[0]+(0.923232387757)*x_ref[1]+(-0.238979557225)*x_ref[2]
-        ref[0,4,2,1]=(-0.193306423923)*x_ref[0]+(-0.565399635257)*x_ref[1]+(-0.149043846608)*x_ref[2]
-        ref[1,0,0,0]=(0.152247539316)*x_ref[0]+(-1.219763414)*x_ref[1]+(0.836742536417)*x_ref[2]
-        ref[1,0,0,1]=(0.279236863017)*x_ref[0]+(0.14118432621)*x_ref[1]+(-0.33072070595)*x_ref[2]
-        ref[1,0,1,0]=(-0.242848555181)*x_ref[0]+(-0.981144530476)*x_ref[1]+(-0.925220699112)*x_ref[2]
-        ref[1,0,1,1]=(-1.8765425995)*x_ref[0]+(-0.0878096696901)*x_ref[1]+(0.133461124587)*x_ref[2]
-        ref[1,0,2,0]=(-0.282373512491)*x_ref[0]+(0.640862824684)*x_ref[1]+(-1.41391625471)*x_ref[2]
-        ref[1,0,2,1]=(0.168260007994)*x_ref[0]+(0.660595443409)*x_ref[1]+(1.14161006755)*x_ref[2]
-        ref[1,1,0,0]=(-0.160956063437)*x_ref[0]+(-0.60581390216)*x_ref[1]+(1.28589122111)*x_ref[2]
-        ref[1,1,0,1]=(0.0969448014041)*x_ref[0]+(-1.63715420302)*x_ref[1]+(-0.350879443881)*x_ref[2]
-        ref[1,1,1,0]=(0.0878659583502)*x_ref[0]+(1.13265578932)*x_ref[1]+(-0.615846752768)*x_ref[2]
-        ref[1,1,1,1]=(-0.434597962742)*x_ref[0]+(-0.177532580699)*x_ref[1]+(0.543921860391)*x_ref[2]
-        ref[1,1,2,0]=(-0.7739187322)*x_ref[0]+(-0.285452235523)*x_ref[1]+(-0.0426663737344)*x_ref[2]
-        ref[1,1,2,1]=(0.796313217511)*x_ref[0]+(-1.12909584404)*x_ref[1]+(1.26302048961)*x_ref[2]
-        ref[1,2,0,0]=(1.62555299859)*x_ref[0]+(-1.1660403401)*x_ref[1]+(-0.668592413245)*x_ref[2]
-        ref[1,2,0,1]=(-0.807742954877)*x_ref[0]+(-0.238532476847)*x_ref[1]+(-1.13575189406)*x_ref[2]
-        ref[1,2,1,0]=(-0.139280450456)*x_ref[0]+(-0.043306992095)*x_ref[1]+(0.832351898761)*x_ref[2]
-        ref[1,2,1,1]=(0.16731150192)*x_ref[0]+(0.0705653171485)*x_ref[1]+(0.12943106453)*x_ref[2]
-        ref[1,2,2,0]=(0.669247838367)*x_ref[0]+(1.10177451339)*x_ref[1]+(1.21850224582)*x_ref[2]
-        ref[1,2,2,1]=(-0.779527532537)*x_ref[0]+(0.10943711539)*x_ref[1]+(0.0286417760627)*x_ref[2]
-        ref[1,3,0,0]=(-0.500367153143)*x_ref[0]+(-0.0315766921687)*x_ref[1]+(0.0814977959486)*x_ref[2]
-        ref[1,3,0,1]=(1.44010930702)*x_ref[0]+(0.985266827661)*x_ref[1]+(-0.4777280416)*x_ref[2]
-        ref[1,3,1,0]=(-1.09856159209)*x_ref[0]+(0.914767947742)*x_ref[1]+(0.257975836816)*x_ref[2]
-        ref[1,3,1,1]=(1.20572454864)*x_ref[0]+(-1.18899739672)*x_ref[1]+(-0.881322688875)*x_ref[2]
-        ref[1,3,2,0]=(0.0683727807399)*x_ref[0]+(0.27893403097)*x_ref[1]+(0.532141657019)*x_ref[2]
-        ref[1,3,2,1]=(1.22927878362)*x_ref[0]+(-0.746664730318)*x_ref[1]+(0.706635763178)*x_ref[2]
-        ref[1,4,0,0]=(-0.056381118157)*x_ref[0]+(0.497463663176)*x_ref[1]+(-0.0170016763418)*x_ref[2]
-        ref[1,4,0,1]=(0.220396391337)*x_ref[0]+(-0.311295539709)*x_ref[1]+(-0.0925408150537)*x_ref[2]
-        ref[1,4,1,0]=(-1.26814101481)*x_ref[0]+(1.36544235985)*x_ref[1]+(-0.706223605983)*x_ref[2]
-        ref[1,4,1,1]=(-0.151531826396)*x_ref[0]+(0.709418004406)*x_ref[1]+(0.361464674136)*x_ref[2]
-        ref[1,4,2,0]=(-1.29637464683)*x_ref[0]+(1.12643501861)*x_ref[1]+(0.0119437305981)*x_ref[2]
-        ref[1,4,2,1]=(-0.127448007113)*x_ref[0]+(0.423470578567)*x_ref[1]+(0.57274403474)*x_ref[2]
-        ref[2,0,0,0]=(-0.753513005537)*x_ref[0]+(-1.42995648081)*x_ref[1]+(-0.748578276092)*x_ref[2]
-        ref[2,0,0,1]=(-0.529225216075)*x_ref[0]+(0.723600505708)*x_ref[1]+(-0.265987788752)*x_ref[2]
-        ref[2,0,1,0]=(0.570242632099)*x_ref[0]+(0.7183918375)*x_ref[1]+(-0.127239408099)*x_ref[2]
-        ref[2,0,1,1]=(0.23496854128)*x_ref[0]+(0.642830624861)*x_ref[1]+(0.734149374044)*x_ref[2]
-        ref[2,0,2,0]=(-0.302583224046)*x_ref[0]+(0.0684944027143)*x_ref[1]+(0.156995461545)*x_ref[2]
-        ref[2,0,2,1]=(-0.549180930856)*x_ref[0]+(0.334205359442)*x_ref[1]+(1.05254428528)*x_ref[2]
-        ref[2,1,0,0]=(-0.234799499951)*x_ref[0]+(1.17826730605)*x_ref[1]+(1.09739059469)*x_ref[2]
-        ref[2,1,0,1]=(-0.187707076501)*x_ref[0]+(0.011330011831)*x_ref[1]+(-0.233605047453)*x_ref[2]
-        ref[2,1,1,0]=(0.290424858876)*x_ref[0]+(0.12865400019)*x_ref[1]+(-1.01515096279)*x_ref[2]
-        ref[2,1,1,1]=(-1.05797585987)*x_ref[0]+(0.679572972092)*x_ref[1]+(1.04481198693)*x_ref[2]
-        ref[2,1,2,0]=(0.240336170335)*x_ref[0]+(0.567306847159)*x_ref[1]+(0.224146880555)*x_ref[2]
-        ref[2,1,2,1]=(-0.568589696446)*x_ref[0]+(1.37586080732)*x_ref[1]+(-0.292086990344)*x_ref[2]
-        ref[2,2,0,0]=(1.16127933088)*x_ref[0]+(-0.205088565357)*x_ref[1]+(-0.0262686243919)*x_ref[2]
-        ref[2,2,0,1]=(1.17913541301)*x_ref[0]+(-0.953527588914)*x_ref[1]+(-1.0594095352)*x_ref[2]
-        ref[2,2,1,0]=(-0.116342811686)*x_ref[0]+(0.459831226378)*x_ref[1]+(0.532324650374)*x_ref[2]
-        ref[2,2,1,1]=(-0.904379150749)*x_ref[0]+(0.0197201393782)*x_ref[1]+(1.16488799459)*x_ref[2]
-        ref[2,2,2,0]=(0.288441825708)*x_ref[0]+(-0.00162365695053)*x_ref[1]+(-0.696961968544)*x_ref[2]
-        ref[2,2,2,1]=(-0.278951886334)*x_ref[0]+(-0.438973263931)*x_ref[1]+(-0.617387268055)*x_ref[2]
-        ref[2,3,0,0]=(-0.575840111545)*x_ref[0]+(-0.430583405817)*x_ref[1]+(0.678495026384)*x_ref[2]
-        ref[2,3,0,1]=(-0.0712810127233)*x_ref[0]+(-0.479271089471)*x_ref[1]+(-0.561687276819)*x_ref[2]
-        ref[2,3,1,0]=(0.00293903214402)*x_ref[0]+(0.707224264038)*x_ref[1]+(0.863200461564)*x_ref[2]
-        ref[2,3,1,1]=(-0.982725212738)*x_ref[0]+(1.12174250462)*x_ref[1]+(0.692163622484)*x_ref[2]
-        ref[2,3,2,0]=(0.563182079719)*x_ref[0]+(0.592670114886)*x_ref[1]+(1.12490471848)*x_ref[2]
-        ref[2,3,2,1]=(0.674175588576)*x_ref[0]+(0.125281804818)*x_ref[1]+(0.260310807977)*x_ref[2]
-        ref[2,4,0,0]=(-0.468871891598)*x_ref[0]+(0.628476449634)*x_ref[1]+(1.44798783935)*x_ref[2]
-        ref[2,4,0,1]=(0.331618946805)*x_ref[0]+(1.18126898042)*x_ref[1]+(1.73036582285)*x_ref[2]
-        ref[2,4,1,0]=(0.643190142583)*x_ref[0]+(0.958102048788)*x_ref[1]+(-1.17509922201)*x_ref[2]
-        ref[2,4,1,1]=(0.140678141755)*x_ref[0]+(-0.964205570281)*x_ref[1]+(1.33722038246)*x_ref[2]
-        ref[2,4,2,0]=(1.00405626052)*x_ref[0]+(-0.766180509924)*x_ref[1]+(-1.12787337858)*x_ref[2]
-        ref[2,4,2,1]=(0.015701651285)*x_ref[0]+(-0.0327586063712)*x_ref[1]+(-1.60288759856)*x_ref[2]
-        ref[3,0,0,0]=(-0.0648346068133)*x_ref[0]+(0.0319743940508)*x_ref[1]+(-0.0885983990043)*x_ref[2]
-        ref[3,0,0,1]=(0.440191590799)*x_ref[0]+(-0.224950534025)*x_ref[1]+(-1.59285278381)*x_ref[2]
-        ref[3,0,1,0]=(-1.39437403492)*x_ref[0]+(0.718181967012)*x_ref[1]+(-0.320282124786)*x_ref[2]
-        ref[3,0,1,1]=(0.212062143443)*x_ref[0]+(0.552967368897)*x_ref[1]+(-0.805494016261)*x_ref[2]
-        ref[3,0,2,0]=(0.123432537169)*x_ref[0]+(-0.124637759512)*x_ref[1]+(-0.627011571378)*x_ref[2]
-        ref[3,0,2,1]=(-0.112696666742)*x_ref[0]+(-0.264195102375)*x_ref[1]+(0.0720389973432)*x_ref[2]
-        ref[3,1,0,0]=(-0.13525504711)*x_ref[0]+(1.02997422411)*x_ref[1]+(-1.00797986845)*x_ref[2]
-        ref[3,1,0,1]=(-0.0675047394459)*x_ref[0]+(1.39934707441)*x_ref[1]+(-0.563292489037)*x_ref[2]
-        ref[3,1,1,0]=(-0.597786255631)*x_ref[0]+(0.969544698551)*x_ref[1]+(-0.0636563520143)*x_ref[2]
-        ref[3,1,1,1]=(0.615372705023)*x_ref[0]+(-0.312239254268)*x_ref[1]+(1.11108440155)*x_ref[2]
-        ref[3,1,2,0]=(0.876145642141)*x_ref[0]+(0.117271425687)*x_ref[1]+(1.10498467015)*x_ref[2]
-        ref[3,1,2,1]=(-0.881281403659)*x_ref[0]+(0.240299603044)*x_ref[1]+(0.14672255814)*x_ref[2]
-        ref[3,2,0,0]=(-1.72712606675)*x_ref[0]+(0.20271220583)*x_ref[1]+(1.10555001416)*x_ref[2]
-        ref[3,2,0,1]=(0.251203467531)*x_ref[0]+(1.14031566726)*x_ref[1]+(0.13511684108)*x_ref[2]
-        ref[3,2,1,0]=(-0.318589273012)*x_ref[0]+(1.22432558956)*x_ref[1]+(0.0532448118609)*x_ref[2]
-        ref[3,2,1,1]=(0.238528986535)*x_ref[0]+(0.181951236101)*x_ref[1]+(0.0816544114367)*x_ref[2]
-        ref[3,2,2,0]=(0.691665718353)*x_ref[0]+(0.238132802916)*x_ref[1]+(1.0244502435)*x_ref[2]
-        ref[3,2,2,1]=(-1.64759886895)*x_ref[0]+(1.06200853706)*x_ref[1]+(-0.0980251738655)*x_ref[2]
-        ref[3,3,0,0]=(-0.0493788966334)*x_ref[0]+(-0.471962146153)*x_ref[1]+(0.156759333734)*x_ref[2]
-        ref[3,3,0,1]=(-0.304056988684)*x_ref[0]+(-0.298060200774)*x_ref[1]+(-0.455474275206)*x_ref[2]
-        ref[3,3,1,0]=(-0.62366321672)*x_ref[0]+(0.229030608831)*x_ref[1]+(0.737950069935)*x_ref[2]
-        ref[3,3,1,1]=(0.132130038359)*x_ref[0]+(0.749997139232)*x_ref[1]+(-0.793138255465)*x_ref[2]
-        ref[3,3,2,0]=(1.71562899872)*x_ref[0]+(0.659770561383)*x_ref[1]+(0.59886052289)*x_ref[2]
-        ref[3,3,2,1]=(0.863622138509)*x_ref[0]+(-0.626586688059)*x_ref[1]+(0.744519466248)*x_ref[2]
-        ref[3,4,0,0]=(0.0214494537522)*x_ref[0]+(0.732351688803)*x_ref[1]+(-0.46140559894)*x_ref[2]
-        ref[3,4,0,1]=(1.33581215441)*x_ref[0]+(-1.16528842961)*x_ref[1]+(-0.888687584892)*x_ref[2]
-        ref[3,4,1,0]=(-0.971883445892)*x_ref[0]+(0.715423530047)*x_ref[1]+(-0.0743908860543)*x_ref[2]
-        ref[3,4,1,1]=(-0.941321450189)*x_ref[0]+(-0.120890461937)*x_ref[1]+(0.929504478456)*x_ref[2]
-        ref[3,4,2,0]=(0.515343485731)*x_ref[0]+(0.323772401243)*x_ref[1]+(-1.03459959098)*x_ref[2]
-        ref[3,4,2,1]=(0.50815257234)*x_ref[0]+(0.461750357229)*x_ref[1]+(0.0260081346396)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-1.02854286859)*x[0]+(0.105922853194)*x[1]
-        ref=(-1.02854286859)*x_ref[0]+(0.105922853194)*x_ref[1]
-      else:
-        arg=(1.36620376771)*x[0]+(-0.336798536224)*x[1]+(0.534538499605)*x[2]
-        ref=(1.36620376771)*x_ref[0]+(-0.336798536224)*x_ref[1]+(0.534538499605)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.403120829068)*x[0]+(-0.70319880694)*x[1]
-        arg[1]=(0.936461664193)*x[0]+(1.3454908089)*x[1]
-        ref[0]=(-0.403120829068)*x[0]+(-0.70319880694)*x[1]
-        ref[1]=(0.936461664193)*x[0]+(1.3454908089)*x[1]
-      else:
-        arg[0]=(0.154137304713)*x[0]+(0.332968506642)*x[1]+(-0.4661136382)*x[2]
-        arg[1]=(0.306790292003)*x[0]+(0.466856258098)*x[1]+(0.205782933414)*x[2]
-        ref[0]=(0.154137304713)*x[0]+(0.332968506642)*x[1]+(-0.4661136382)*x[2]
-        ref[1]=(0.306790292003)*x[0]+(0.466856258098)*x[1]+(0.205782933414)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.452635897444)*x[0]+(-0.210513646405)*x[1]
-        arg[0,1]=(-0.590704436627)*x[0]+(1.78000273884)*x[1]
-        arg[0,2]=(1.01331349402)*x[0]+(1.76279765125)*x[1]
-        arg[0,3]=(1.5588852701)*x[0]+(-0.550895238707)*x[1]
-        arg[0,4]=(-0.352453804527)*x[0]+(-0.338832613421)*x[1]
-        arg[1,0]=(-0.809837877163)*x[0]+(-0.531009602702)*x[1]
-        arg[1,1]=(0.513641503665)*x[0]+(0.232114989082)*x[1]
-        arg[1,2]=(-0.424635655997)*x[0]+(0.0796757576821)*x[1]
-        arg[1,3]=(-1.5899938122)*x[0]+(-0.178949548482)*x[1]
-        arg[1,4]=(0.989317971495)*x[0]+(0.969711267468)*x[1]
-        arg[2,0]=(0.384490947785)*x[0]+(1.42230193156)*x[1]
-        arg[2,1]=(-0.0832227929255)*x[0]+(0.859020891429)*x[1]
-        arg[2,2]=(-1.36129563124)*x[0]+(-0.240985031888)*x[1]
-        arg[2,3]=(0.319706901063)*x[0]+(1.03419924566)*x[1]
-        arg[2,4]=(0.986965249719)*x[0]+(0.228684031472)*x[1]
-        arg[3,0]=(0.588520127337)*x[0]+(0.016799594822)*x[1]
-        arg[3,1]=(1.46193438322)*x[0]+(0.431838900383)*x[1]
-        arg[3,2]=(-0.0235512206818)*x[0]+(0.00227038037474)*x[1]
-        arg[3,3]=(0.977383733076)*x[0]+(0.383979958766)*x[1]
-        arg[3,4]=(0.447782383836)*x[0]+(-0.504218231709)*x[1]
-        ref[0,0]=(-0.452635897444)*x_ref[0]+(-0.210513646405)*x_ref[1]
-        ref[0,1]=(-0.590704436627)*x_ref[0]+(1.78000273884)*x_ref[1]
-        ref[0,2]=(1.01331349402)*x_ref[0]+(1.76279765125)*x_ref[1]
-        ref[0,3]=(1.5588852701)*x_ref[0]+(-0.550895238707)*x_ref[1]
-        ref[0,4]=(-0.352453804527)*x_ref[0]+(-0.338832613421)*x_ref[1]
-        ref[1,0]=(-0.809837877163)*x_ref[0]+(-0.531009602702)*x_ref[1]
-        ref[1,1]=(0.513641503665)*x_ref[0]+(0.232114989082)*x_ref[1]
-        ref[1,2]=(-0.424635655997)*x_ref[0]+(0.0796757576821)*x_ref[1]
-        ref[1,3]=(-1.5899938122)*x_ref[0]+(-0.178949548482)*x_ref[1]
-        ref[1,4]=(0.989317971495)*x_ref[0]+(0.969711267468)*x_ref[1]
-        ref[2,0]=(0.384490947785)*x_ref[0]+(1.42230193156)*x_ref[1]
-        ref[2,1]=(-0.0832227929255)*x_ref[0]+(0.859020891429)*x_ref[1]
-        ref[2,2]=(-1.36129563124)*x_ref[0]+(-0.240985031888)*x_ref[1]
-        ref[2,3]=(0.319706901063)*x_ref[0]+(1.03419924566)*x_ref[1]
-        ref[2,4]=(0.986965249719)*x_ref[0]+(0.228684031472)*x_ref[1]
-        ref[3,0]=(0.588520127337)*x_ref[0]+(0.016799594822)*x_ref[1]
-        ref[3,1]=(1.46193438322)*x_ref[0]+(0.431838900383)*x_ref[1]
-        ref[3,2]=(-0.0235512206818)*x_ref[0]+(0.00227038037474)*x_ref[1]
-        ref[3,3]=(0.977383733076)*x_ref[0]+(0.383979958766)*x_ref[1]
-        ref[3,4]=(0.447782383836)*x_ref[0]+(-0.504218231709)*x_ref[1]
-      else:
-        arg[0,0]=(-0.566459971675)*x[0]+(0.240246648893)*x[1]+(1.84693181923)*x[2]
-        arg[0,1]=(1.09715015899)*x[0]+(1.26531924413)*x[1]+(0.627813347679)*x[2]
-        arg[0,2]=(-1.17535073843)*x[0]+(-0.215601498941)*x[1]+(1.36346500888)*x[2]
-        arg[0,3]=(-0.637207120161)*x[0]+(1.08542566952)*x[1]+(-1.13757514425)*x[2]
-        arg[0,4]=(1.18247424069)*x[0]+(-1.48951614815)*x[1]+(0.615535039719)*x[2]
-        arg[1,0]=(0.0937432100426)*x[0]+(-0.510326894156)*x[1]+(-0.456208996457)*x[2]
-        arg[1,1]=(-0.866120342442)*x[0]+(0.927484984985)*x[1]+(0.918081524156)*x[2]
-        arg[1,2]=(0.025238374235)*x[0]+(-0.182938599269)*x[1]+(-1.50048281322)*x[2]
-        arg[1,3]=(-0.302334971294)*x[0]+(-0.925062799423)*x[1]+(-1.4675138953)*x[2]
-        arg[1,4]=(-0.497738566447)*x[0]+(-0.324727071875)*x[1]+(-1.43341212055)*x[2]
-        arg[2,0]=(-1.4605237958)*x[0]+(-0.332826007088)*x[1]+(-0.230483401111)*x[2]
-        arg[2,1]=(0.801769248581)*x[0]+(-0.930588036503)*x[1]+(-1.06804808381)*x[2]
-        arg[2,2]=(-1.07972165017)*x[0]+(1.09295362882)*x[1]+(0.048550098477)*x[2]
-        arg[2,3]=(0.028290230337)*x[0]+(0.179461246635)*x[1]+(-1.09165257072)*x[2]
-        arg[2,4]=(0.238850986174)*x[0]+(-0.837307206184)*x[1]+(-0.617254874594)*x[2]
-        arg[3,0]=(-0.125921204582)*x[0]+(0.234758657879)*x[1]+(0.0847162247843)*x[2]
-        arg[3,1]=(-0.213352414907)*x[0]+(0.206777352455)*x[1]+(-0.135357638131)*x[2]
-        arg[3,2]=(-0.41897394434)*x[0]+(0.152706100016)*x[1]+(1.52390356012)*x[2]
-        arg[3,3]=(0.1831705248)*x[0]+(-1.13556841364)*x[1]+(-1.7661652693)*x[2]
-        arg[3,4]=(0.43473708388)*x[0]+(1.04496896213)*x[1]+(-0.816894739325)*x[2]
-        ref[0,0]=(-0.566459971675)*x_ref[0]+(0.240246648893)*x_ref[1]+(1.84693181923)*x_ref[2]
-        ref[0,1]=(1.09715015899)*x_ref[0]+(1.26531924413)*x_ref[1]+(0.627813347679)*x_ref[2]
-        ref[0,2]=(-1.17535073843)*x_ref[0]+(-0.215601498941)*x_ref[1]+(1.36346500888)*x_ref[2]
-        ref[0,3]=(-0.637207120161)*x_ref[0]+(1.08542566952)*x_ref[1]+(-1.13757514425)*x_ref[2]
-        ref[0,4]=(1.18247424069)*x_ref[0]+(-1.48951614815)*x_ref[1]+(0.615535039719)*x_ref[2]
-        ref[1,0]=(0.0937432100426)*x_ref[0]+(-0.510326894156)*x_ref[1]+(-0.456208996457)*x_ref[2]
-        ref[1,1]=(-0.866120342442)*x_ref[0]+(0.927484984985)*x_ref[1]+(0.918081524156)*x_ref[2]
-        ref[1,2]=(0.025238374235)*x_ref[0]+(-0.182938599269)*x_ref[1]+(-1.50048281322)*x_ref[2]
-        ref[1,3]=(-0.302334971294)*x_ref[0]+(-0.925062799423)*x_ref[1]+(-1.4675138953)*x_ref[2]
-        ref[1,4]=(-0.497738566447)*x_ref[0]+(-0.324727071875)*x_ref[1]+(-1.43341212055)*x_ref[2]
-        ref[2,0]=(-1.4605237958)*x_ref[0]+(-0.332826007088)*x_ref[1]+(-0.230483401111)*x_ref[2]
-        ref[2,1]=(0.801769248581)*x_ref[0]+(-0.930588036503)*x_ref[1]+(-1.06804808381)*x_ref[2]
-        ref[2,2]=(-1.07972165017)*x_ref[0]+(1.09295362882)*x_ref[1]+(0.048550098477)*x_ref[2]
-        ref[2,3]=(0.028290230337)*x_ref[0]+(0.179461246635)*x_ref[1]+(-1.09165257072)*x_ref[2]
-        ref[2,4]=(0.238850986174)*x_ref[0]+(-0.837307206184)*x_ref[1]+(-0.617254874594)*x_ref[2]
-        ref[3,0]=(-0.125921204582)*x_ref[0]+(0.234758657879)*x_ref[1]+(0.0847162247843)*x_ref[2]
-        ref[3,1]=(-0.213352414907)*x_ref[0]+(0.206777352455)*x_ref[1]+(-0.135357638131)*x_ref[2]
-        ref[3,2]=(-0.41897394434)*x_ref[0]+(0.152706100016)*x_ref[1]+(1.52390356012)*x_ref[2]
-        ref[3,3]=(0.1831705248)*x_ref[0]+(-1.13556841364)*x_ref[1]+(-1.7661652693)*x_ref[2]
-        ref[3,4]=(0.43473708388)*x_ref[0]+(1.04496896213)*x_ref[1]+(-0.816894739325)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.324237136046)*x[0]+(0.67172278334)*x[1]
-        arg[0,0,1]=(-1.07360258996)*x[0]+(-0.646208771542)*x[1]
-        arg[0,1,0]=(-0.040139403311)*x[0]+(-0.281626553874)*x[1]
-        arg[0,1,1]=(0.963343050385)*x[0]+(-0.724838290038)*x[1]
-        arg[1,0,0]=(-0.909697586367)*x[0]+(0.48041903189)*x[1]
-        arg[1,0,1]=(0.414758676032)*x[0]+(-0.0921084575218)*x[1]
-        arg[1,1,0]=(1.06852211241)*x[0]+(-1.01026709886)*x[1]
-        arg[1,1,1]=(-0.675258695211)*x[0]+(0.51361078905)*x[1]
-        arg[2,0,0]=(-0.791246198786)*x[0]+(-0.0283034425042)*x[1]
-        arg[2,0,1]=(-0.87756010848)*x[0]+(-0.00868464377539)*x[1]
-        arg[2,1,0]=(0.44209070344)*x[0]+(0.0846344294002)*x[1]
-        arg[2,1,1]=(0.777287404475)*x[0]+(0.72614634535)*x[1]
-        arg[3,0,0]=(-0.363354104693)*x[0]+(-1.22959837449)*x[1]
-        arg[3,0,1]=(-0.532220757425)*x[0]+(-1.54990170304)*x[1]
-        arg[3,1,0]=(-0.491099325731)*x[0]+(-0.412402332731)*x[1]
-        arg[3,1,1]=(0.0750673227925)*x[0]+(-0.725108664028)*x[1]
-        arg[4,0,0]=(-0.419689899608)*x[0]+(-1.32423898043)*x[1]
-        arg[4,0,1]=(0.532682204197)*x[0]+(0.0703779631797)*x[1]
-        arg[4,1,0]=(1.68643150913)*x[0]+(0.105443733595)*x[1]
-        arg[4,1,1]=(0.936329701936)*x[0]+(1.04067808474)*x[1]
-        arg[5,0,0]=(1.37285560133)*x[0]+(-0.680844454631)*x[1]
-        arg[5,0,1]=(0.843677131436)*x[0]+(0.272365035967)*x[1]
-        arg[5,1,0]=(0.00586472074043)*x[0]+(-1.09785622721)*x[1]
-        arg[5,1,1]=(1.1410854961)*x[0]+(-0.591468439837)*x[1]
-        ref[0,0,0]=(0.324237136046)*x_ref[0]+(0.67172278334)*x_ref[1]
-        ref[0,0,1]=(-1.07360258996)*x_ref[0]+(-0.646208771542)*x_ref[1]
-        ref[0,1,0]=(-0.040139403311)*x_ref[0]+(-0.281626553874)*x_ref[1]
-        ref[0,1,1]=(0.963343050385)*x_ref[0]+(-0.724838290038)*x_ref[1]
-        ref[1,0,0]=(-0.909697586367)*x_ref[0]+(0.48041903189)*x_ref[1]
-        ref[1,0,1]=(0.414758676032)*x_ref[0]+(-0.0921084575218)*x_ref[1]
-        ref[1,1,0]=(1.06852211241)*x_ref[0]+(-1.01026709886)*x_ref[1]
-        ref[1,1,1]=(-0.675258695211)*x_ref[0]+(0.51361078905)*x_ref[1]
-        ref[2,0,0]=(-0.791246198786)*x_ref[0]+(-0.0283034425042)*x_ref[1]
-        ref[2,0,1]=(-0.87756010848)*x_ref[0]+(-0.00868464377539)*x_ref[1]
-        ref[2,1,0]=(0.44209070344)*x_ref[0]+(0.0846344294002)*x_ref[1]
-        ref[2,1,1]=(0.777287404475)*x_ref[0]+(0.72614634535)*x_ref[1]
-        ref[3,0,0]=(-0.363354104693)*x_ref[0]+(-1.22959837449)*x_ref[1]
-        ref[3,0,1]=(-0.532220757425)*x_ref[0]+(-1.54990170304)*x_ref[1]
-        ref[3,1,0]=(-0.491099325731)*x_ref[0]+(-0.412402332731)*x_ref[1]
-        ref[3,1,1]=(0.0750673227925)*x_ref[0]+(-0.725108664028)*x_ref[1]
-        ref[4,0,0]=(-0.419689899608)*x_ref[0]+(-1.32423898043)*x_ref[1]
-        ref[4,0,1]=(0.532682204197)*x_ref[0]+(0.0703779631797)*x_ref[1]
-        ref[4,1,0]=(1.68643150913)*x_ref[0]+(0.105443733595)*x_ref[1]
-        ref[4,1,1]=(0.936329701936)*x_ref[0]+(1.04067808474)*x_ref[1]
-        ref[5,0,0]=(1.37285560133)*x_ref[0]+(-0.680844454631)*x_ref[1]
-        ref[5,0,1]=(0.843677131436)*x_ref[0]+(0.272365035967)*x_ref[1]
-        ref[5,1,0]=(0.00586472074043)*x_ref[0]+(-1.09785622721)*x_ref[1]
-        ref[5,1,1]=(1.1410854961)*x_ref[0]+(-0.591468439837)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.289427308366)*x[0]+(1.17077011703)*x[1]+(0.763196501047)*x[2]
-        arg[0,0,1]=(0.642730500265)*x[0]+(1.1719001632)*x[1]+(-0.121378040894)*x[2]
-        arg[0,1,0]=(0.0879005621769)*x[0]+(-0.627582537594)*x[1]+(0.220072369447)*x[2]
-        arg[0,1,1]=(-0.518762071566)*x[0]+(-0.700754417623)*x[1]+(-0.340623426752)*x[2]
-        arg[1,0,0]=(-0.162635708202)*x[0]+(-0.996922517356)*x[1]+(0.48000598379)*x[2]
-        arg[1,0,1]=(-0.49910792923)*x[0]+(1.11334748765)*x[1]+(0.0050657496159)*x[2]
-        arg[1,1,0]=(-1.55972927502)*x[0]+(0.233936234238)*x[1]+(-0.546906209213)*x[2]
-        arg[1,1,1]=(-0.6012330303)*x[0]+(-0.267951301884)*x[1]+(-0.193021060351)*x[2]
-        arg[2,0,0]=(1.32515959423)*x[0]+(1.2070735022)*x[1]+(1.11474945521)*x[2]
-        arg[2,0,1]=(-1.05500093406)*x[0]+(-0.937935240268)*x[1]+(0.180289797658)*x[2]
-        arg[2,1,0]=(-0.450015559749)*x[0]+(-1.17715272891)*x[1]+(0.197160834934)*x[2]
-        arg[2,1,1]=(-1.24969258786)*x[0]+(-0.300915973735)*x[1]+(-0.195058423793)*x[2]
-        arg[3,0,0]=(0.704171975525)*x[0]+(1.0327384159)*x[1]+(-1.23664355084)*x[2]
-        arg[3,0,1]=(0.916288412006)*x[0]+(1.6929893349)*x[1]+(-1.16682244827)*x[2]
-        arg[3,1,0]=(-0.756147901025)*x[0]+(0.0232005287342)*x[1]+(0.213796289692)*x[2]
-        arg[3,1,1]=(0.92799443461)*x[0]+(-0.228093116826)*x[1]+(-1.53373185211)*x[2]
-        arg[4,0,0]=(-0.272514671459)*x[0]+(0.310026631492)*x[1]+(0.735127519475)*x[2]
-        arg[4,0,1]=(1.23963120106)*x[0]+(-0.0769223754537)*x[1]+(0.767002455909)*x[2]
-        arg[4,1,0]=(-1.1121433063)*x[0]+(0.748482838233)*x[1]+(-0.0985898502473)*x[2]
-        arg[4,1,1]=(-1.08169600038)*x[0]+(-1.39575461699)*x[1]+(0.468455733883)*x[2]
-        arg[5,0,0]=(-0.737100332594)*x[0]+(1.0950941569)*x[1]+(0.530144605873)*x[2]
-        arg[5,0,1]=(1.94353080429)*x[0]+(1.61187736568)*x[1]+(0.887255997784)*x[2]
-        arg[5,1,0]=(-0.492812782764)*x[0]+(-1.17859119673)*x[1]+(-0.627254028293)*x[2]
-        arg[5,1,1]=(0.932565304399)*x[0]+(0.760125636669)*x[1]+(-0.687485104891)*x[2]
-        ref[0,0,0]=(-0.289427308366)*x_ref[0]+(1.17077011703)*x_ref[1]+(0.763196501047)*x_ref[2]
-        ref[0,0,1]=(0.642730500265)*x_ref[0]+(1.1719001632)*x_ref[1]+(-0.121378040894)*x_ref[2]
-        ref[0,1,0]=(0.0879005621769)*x_ref[0]+(-0.627582537594)*x_ref[1]+(0.220072369447)*x_ref[2]
-        ref[0,1,1]=(-0.518762071566)*x_ref[0]+(-0.700754417623)*x_ref[1]+(-0.340623426752)*x_ref[2]
-        ref[1,0,0]=(-0.162635708202)*x_ref[0]+(-0.996922517356)*x_ref[1]+(0.48000598379)*x_ref[2]
-        ref[1,0,1]=(-0.49910792923)*x_ref[0]+(1.11334748765)*x_ref[1]+(0.0050657496159)*x_ref[2]
-        ref[1,1,0]=(-1.55972927502)*x_ref[0]+(0.233936234238)*x_ref[1]+(-0.546906209213)*x_ref[2]
-        ref[1,1,1]=(-0.6012330303)*x_ref[0]+(-0.267951301884)*x_ref[1]+(-0.193021060351)*x_ref[2]
-        ref[2,0,0]=(1.32515959423)*x_ref[0]+(1.2070735022)*x_ref[1]+(1.11474945521)*x_ref[2]
-        ref[2,0,1]=(-1.05500093406)*x_ref[0]+(-0.937935240268)*x_ref[1]+(0.180289797658)*x_ref[2]
-        ref[2,1,0]=(-0.450015559749)*x_ref[0]+(-1.17715272891)*x_ref[1]+(0.197160834934)*x_ref[2]
-        ref[2,1,1]=(-1.24969258786)*x_ref[0]+(-0.300915973735)*x_ref[1]+(-0.195058423793)*x_ref[2]
-        ref[3,0,0]=(0.704171975525)*x_ref[0]+(1.0327384159)*x_ref[1]+(-1.23664355084)*x_ref[2]
-        ref[3,0,1]=(0.916288412006)*x_ref[0]+(1.6929893349)*x_ref[1]+(-1.16682244827)*x_ref[2]
-        ref[3,1,0]=(-0.756147901025)*x_ref[0]+(0.0232005287342)*x_ref[1]+(0.213796289692)*x_ref[2]
-        ref[3,1,1]=(0.92799443461)*x_ref[0]+(-0.228093116826)*x_ref[1]+(-1.53373185211)*x_ref[2]
-        ref[4,0,0]=(-0.272514671459)*x_ref[0]+(0.310026631492)*x_ref[1]+(0.735127519475)*x_ref[2]
-        ref[4,0,1]=(1.23963120106)*x_ref[0]+(-0.0769223754537)*x_ref[1]+(0.767002455909)*x_ref[2]
-        ref[4,1,0]=(-1.1121433063)*x_ref[0]+(0.748482838233)*x_ref[1]+(-0.0985898502473)*x_ref[2]
-        ref[4,1,1]=(-1.08169600038)*x_ref[0]+(-1.39575461699)*x_ref[1]+(0.468455733883)*x_ref[2]
-        ref[5,0,0]=(-0.737100332594)*x_ref[0]+(1.0950941569)*x_ref[1]+(0.530144605873)*x_ref[2]
-        ref[5,0,1]=(1.94353080429)*x_ref[0]+(1.61187736568)*x_ref[1]+(0.887255997784)*x_ref[2]
-        ref[5,1,0]=(-0.492812782764)*x_ref[0]+(-1.17859119673)*x_ref[1]+(-0.627254028293)*x_ref[2]
-        ref[5,1,1]=(0.932565304399)*x_ref[0]+(0.760125636669)*x_ref[1]+(-0.687485104891)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.261713255264)*x[0]+(-0.650225996431)*x[1]
-        arg[0,0,0,1]=(0.177056727607)*x[0]+(-0.486487540393)*x[1]
-        arg[0,0,1,0]=(1.38050234107)*x[0]+(0.273417897264)*x[1]
-        arg[0,0,1,1]=(-1.059824929)*x[0]+(0.432893707387)*x[1]
-        arg[0,0,2,0]=(1.11328992978)*x[0]+(1.14949237037)*x[1]
-        arg[0,0,2,1]=(-0.176459646227)*x[0]+(-0.835980248375)*x[1]
-        arg[0,1,0,0]=(0.992757237392)*x[0]+(0.113511598452)*x[1]
-        arg[0,1,0,1]=(-0.211425610821)*x[0]+(-0.472765285276)*x[1]
-        arg[0,1,1,0]=(-1.52498305232)*x[0]+(-0.869737083114)*x[1]
-        arg[0,1,1,1]=(-0.474203117317)*x[0]+(-0.284532442353)*x[1]
-        arg[0,1,2,0]=(-0.431542961546)*x[0]+(-0.0427397090453)*x[1]
-        arg[0,1,2,1]=(-1.0562625269)*x[0]+(-0.74486767124)*x[1]
-        arg[0,2,0,0]=(1.46553867064)*x[0]+(-0.650182195657)*x[1]
-        arg[0,2,0,1]=(-0.717482663647)*x[0]+(-0.716320000777)*x[1]
-        arg[0,2,1,0]=(-1.21701970743)*x[0]+(0.636901443761)*x[1]
-        arg[0,2,1,1]=(0.438592928507)*x[0]+(0.812362899723)*x[1]
-        arg[0,2,2,0]=(0.104885477141)*x[0]+(-0.127968978832)*x[1]
-        arg[0,2,2,1]=(0.285116712849)*x[0]+(0.169740783305)*x[1]
-        arg[0,3,0,0]=(-1.22825142912)*x[0]+(-0.562911687838)*x[1]
-        arg[0,3,0,1]=(-0.569159534025)*x[0]+(1.30898732707)*x[1]
-        arg[0,3,1,0]=(0.164709387569)*x[0]+(-1.62733582919)*x[1]
-        arg[0,3,1,1]=(-0.477197320128)*x[0]+(-0.115207237191)*x[1]
-        arg[0,3,2,0]=(-0.046871003317)*x[0]+(0.0371149345252)*x[1]
-        arg[0,3,2,1]=(0.839624830979)*x[0]+(0.0785937909827)*x[1]
-        arg[0,4,0,0]=(-0.0250725769598)*x[0]+(-0.535781603767)*x[1]
-        arg[0,4,0,1]=(-0.761849740443)*x[0]+(-0.300714501152)*x[1]
-        arg[0,4,1,0]=(0.0212637838833)*x[0]+(-1.56914428088)*x[1]
-        arg[0,4,1,1]=(-0.254524677425)*x[0]+(0.699288623343)*x[1]
-        arg[0,4,2,0]=(1.14678964272)*x[0]+(1.24738649379)*x[1]
-        arg[0,4,2,1]=(1.80545916472)*x[0]+(1.22689087643)*x[1]
-        arg[1,0,0,0]=(-0.116129927341)*x[0]+(-0.875165834648)*x[1]
-        arg[1,0,0,1]=(-0.49905851236)*x[0]+(-1.10711214732)*x[1]
-        arg[1,0,1,0]=(-1.44706167224)*x[0]+(-1.80259802262)*x[1]
-        arg[1,0,1,1]=(0.555288273554)*x[0]+(0.153437302525)*x[1]
-        arg[1,0,2,0]=(0.00774838569142)*x[0]+(-1.35683757658)*x[1]
-        arg[1,0,2,1]=(-0.625156986286)*x[0]+(-0.201091038824)*x[1]
-        arg[1,1,0,0]=(-0.765068445971)*x[0]+(1.32890117415)*x[1]
-        arg[1,1,0,1]=(-0.629548919312)*x[0]+(-0.0512345513979)*x[1]
-        arg[1,1,1,0]=(-0.361717423775)*x[0]+(0.286169858965)*x[1]
-        arg[1,1,1,1]=(-0.533065922681)*x[0]+(0.103362397133)*x[1]
-        arg[1,1,2,0]=(0.978041972715)*x[0]+(0.405949452109)*x[1]
-        arg[1,1,2,1]=(-1.08418078618)*x[0]+(0.027879770152)*x[1]
-        arg[1,2,0,0]=(1.23545256768)*x[0]+(0.574400116282)*x[1]
-        arg[1,2,0,1]=(0.245362478488)*x[0]+(0.241577755816)*x[1]
-        arg[1,2,1,0]=(0.645309443244)*x[0]+(0.0437773509036)*x[1]
-        arg[1,2,1,1]=(0.00930197364105)*x[0]+(0.472462788946)*x[1]
-        arg[1,2,2,0]=(1.44241534167)*x[0]+(-0.901332994844)*x[1]
-        arg[1,2,2,1]=(0.893335284585)*x[0]+(0.109130146628)*x[1]
-        arg[1,3,0,0]=(0.601907323675)*x[0]+(-1.54057502586)*x[1]
-        arg[1,3,0,1]=(1.38086759376)*x[0]+(0.356522488945)*x[1]
-        arg[1,3,1,0]=(1.16786130652)*x[0]+(-0.788756049484)*x[1]
-        arg[1,3,1,1]=(-0.22580270698)*x[0]+(0.857686971693)*x[1]
-        arg[1,3,2,0]=(0.709549396131)*x[0]+(-0.644330864877)*x[1]
-        arg[1,3,2,1]=(1.04901965211)*x[0]+(0.0178384468958)*x[1]
-        arg[1,4,0,0]=(-0.525050731412)*x[0]+(-0.253639122312)*x[1]
-        arg[1,4,0,1]=(-1.63200911423)*x[0]+(0.519020443372)*x[1]
-        arg[1,4,1,0]=(0.23956666878)*x[0]+(-1.76973024011)*x[1]
-        arg[1,4,1,1]=(-0.412317050346)*x[0]+(-0.391711749094)*x[1]
-        arg[1,4,2,0]=(1.63293176518)*x[0]+(0.583921572851)*x[1]
-        arg[1,4,2,1]=(0.434893659373)*x[0]+(-0.324706930043)*x[1]
-        arg[2,0,0,0]=(0.368478865639)*x[0]+(1.87637158068)*x[1]
-        arg[2,0,0,1]=(1.32519020398)*x[0]+(0.306016568948)*x[1]
-        arg[2,0,1,0]=(-0.284264003593)*x[0]+(-0.899022593367)*x[1]
-        arg[2,0,1,1]=(-0.0439761413236)*x[0]+(-0.696386615358)*x[1]
-        arg[2,0,2,0]=(0.407393812349)*x[0]+(-1.04815464317)*x[1]
-        arg[2,0,2,1]=(-0.956661282071)*x[0]+(0.243281223782)*x[1]
-        arg[2,1,0,0]=(-1.29201911939)*x[0]+(-0.693049706038)*x[1]
-        arg[2,1,0,1]=(-0.711059848853)*x[0]+(-1.14204907272)*x[1]
-        arg[2,1,1,0]=(-0.347693333057)*x[0]+(0.818879269672)*x[1]
-        arg[2,1,1,1]=(0.00742807299875)*x[0]+(0.138845309984)*x[1]
-        arg[2,1,2,0]=(1.13412244048)*x[0]+(-0.481422214102)*x[1]
-        arg[2,1,2,1]=(0.64440302826)*x[0]+(-0.955231893089)*x[1]
-        arg[2,2,0,0]=(0.13123141544)*x[0]+(-0.602266537541)*x[1]
-        arg[2,2,0,1]=(-0.204818071763)*x[0]+(-1.13480248293)*x[1]
-        arg[2,2,1,0]=(0.781058287579)*x[0]+(-1.31936224435)*x[1]
-        arg[2,2,1,1]=(-0.591275351662)*x[0]+(0.691816969517)*x[1]
-        arg[2,2,2,0]=(-0.921964826241)*x[0]+(1.28687075541)*x[1]
-        arg[2,2,2,1]=(0.246260462337)*x[0]+(-1.04699282194)*x[1]
-        arg[2,3,0,0]=(0.264209126513)*x[0]+(-0.697094400566)*x[1]
-        arg[2,3,0,1]=(0.456158298484)*x[0]+(0.0288036445565)*x[1]
-        arg[2,3,1,0]=(-0.720337925392)*x[0]+(0.0965182642186)*x[1]
-        arg[2,3,1,1]=(0.397480419547)*x[0]+(-1.55232798344)*x[1]
-        arg[2,3,2,0]=(-0.337139999283)*x[0]+(0.918809751807)*x[1]
-        arg[2,3,2,1]=(1.34009447198)*x[0]+(-1.41390962018)*x[1]
-        arg[2,4,0,0]=(1.67781838006)*x[0]+(0.521276193814)*x[1]
-        arg[2,4,0,1]=(-0.114014321939)*x[0]+(0.529316778773)*x[1]
-        arg[2,4,1,0]=(-0.19938131807)*x[0]+(-0.0712417614843)*x[1]
-        arg[2,4,1,1]=(-0.724676753871)*x[0]+(0.731341170171)*x[1]
-        arg[2,4,2,0]=(0.988755659656)*x[0]+(-1.0327352189)*x[1]
-        arg[2,4,2,1]=(-0.526286732859)*x[0]+(-1.18295671598)*x[1]
-        arg[3,0,0,0]=(-0.685223304723)*x[0]+(0.508431586068)*x[1]
-        arg[3,0,0,1]=(0.529240274944)*x[0]+(0.77519128969)*x[1]
-        arg[3,0,1,0]=(-0.757098431928)*x[0]+(1.41375812725)*x[1]
-        arg[3,0,1,1]=(1.20805599335)*x[0]+(-0.184660334182)*x[1]
-        arg[3,0,2,0]=(0.718413765561)*x[0]+(0.971149168706)*x[1]
-        arg[3,0,2,1]=(-0.632670534518)*x[0]+(0.0389618967363)*x[1]
-        arg[3,1,0,0]=(-0.525814673755)*x[0]+(0.574122587598)*x[1]
-        arg[3,1,0,1]=(-1.04117288975)*x[0]+(-1.00738089823)*x[1]
-        arg[3,1,1,0]=(0.0312806064182)*x[0]+(-0.30773511847)*x[1]
-        arg[3,1,1,1]=(0.889930889355)*x[0]+(0.833689153489)*x[1]
-        arg[3,1,2,0]=(-1.21586293381)*x[0]+(0.512182349574)*x[1]
-        arg[3,1,2,1]=(-0.00437508755415)*x[0]+(-1.13228664497)*x[1]
-        arg[3,2,0,0]=(1.64174174554)*x[0]+(-0.696500062562)*x[1]
-        arg[3,2,0,1]=(0.0265343210604)*x[0]+(-0.707378716636)*x[1]
-        arg[3,2,1,0]=(0.952922122967)*x[0]+(0.0946904561805)*x[1]
-        arg[3,2,1,1]=(-1.06905266456)*x[0]+(-0.155122789807)*x[1]
-        arg[3,2,2,0]=(-1.14410789976)*x[0]+(-0.379020164446)*x[1]
-        arg[3,2,2,1]=(-0.0922611198553)*x[0]+(1.36680699099)*x[1]
-        arg[3,3,0,0]=(0.849028205422)*x[0]+(-0.968698293811)*x[1]
-        arg[3,3,0,1]=(0.649894718675)*x[0]+(0.238249259292)*x[1]
-        arg[3,3,1,0]=(1.28170508471)*x[0]+(-0.736544947537)*x[1]
-        arg[3,3,1,1]=(-0.188411685414)*x[0]+(1.14145010691)*x[1]
-        arg[3,3,2,0]=(-1.13973037849)*x[0]+(-0.256565914821)*x[1]
-        arg[3,3,2,1]=(0.955478585358)*x[0]+(-0.83417326515)*x[1]
-        arg[3,4,0,0]=(0.155710789468)*x[0]+(0.204956811648)*x[1]
-        arg[3,4,0,1]=(0.567866952974)*x[0]+(-0.168398320099)*x[1]
-        arg[3,4,1,0]=(-1.36997367)*x[0]+(0.141984040172)*x[1]
-        arg[3,4,1,1]=(-0.809532285206)*x[0]+(0.70611485405)*x[1]
-        arg[3,4,2,0]=(-0.453260232051)*x[0]+(0.0665127865858)*x[1]
-        arg[3,4,2,1]=(0.00142021115277)*x[0]+(1.02307505343)*x[1]
-        ref[0,0,0,0]=(-0.261713255264)*x_ref[0]+(-0.650225996431)*x_ref[1]
-        ref[0,0,0,1]=(0.177056727607)*x_ref[0]+(-0.486487540393)*x_ref[1]
-        ref[0,0,1,0]=(1.38050234107)*x_ref[0]+(0.273417897264)*x_ref[1]
-        ref[0,0,1,1]=(-1.059824929)*x_ref[0]+(0.432893707387)*x_ref[1]
-        ref[0,0,2,0]=(1.11328992978)*x_ref[0]+(1.14949237037)*x_ref[1]
-        ref[0,0,2,1]=(-0.176459646227)*x_ref[0]+(-0.835980248375)*x_ref[1]
-        ref[0,1,0,0]=(0.992757237392)*x_ref[0]+(0.113511598452)*x_ref[1]
-        ref[0,1,0,1]=(-0.211425610821)*x_ref[0]+(-0.472765285276)*x_ref[1]
-        ref[0,1,1,0]=(-1.52498305232)*x_ref[0]+(-0.869737083114)*x_ref[1]
-        ref[0,1,1,1]=(-0.474203117317)*x_ref[0]+(-0.284532442353)*x_ref[1]
-        ref[0,1,2,0]=(-0.431542961546)*x_ref[0]+(-0.0427397090453)*x_ref[1]
-        ref[0,1,2,1]=(-1.0562625269)*x_ref[0]+(-0.74486767124)*x_ref[1]
-        ref[0,2,0,0]=(1.46553867064)*x_ref[0]+(-0.650182195657)*x_ref[1]
-        ref[0,2,0,1]=(-0.717482663647)*x_ref[0]+(-0.716320000777)*x_ref[1]
-        ref[0,2,1,0]=(-1.21701970743)*x_ref[0]+(0.636901443761)*x_ref[1]
-        ref[0,2,1,1]=(0.438592928507)*x_ref[0]+(0.812362899723)*x_ref[1]
-        ref[0,2,2,0]=(0.104885477141)*x_ref[0]+(-0.127968978832)*x_ref[1]
-        ref[0,2,2,1]=(0.285116712849)*x_ref[0]+(0.169740783305)*x_ref[1]
-        ref[0,3,0,0]=(-1.22825142912)*x_ref[0]+(-0.562911687838)*x_ref[1]
-        ref[0,3,0,1]=(-0.569159534025)*x_ref[0]+(1.30898732707)*x_ref[1]
-        ref[0,3,1,0]=(0.164709387569)*x_ref[0]+(-1.62733582919)*x_ref[1]
-        ref[0,3,1,1]=(-0.477197320128)*x_ref[0]+(-0.115207237191)*x_ref[1]
-        ref[0,3,2,0]=(-0.046871003317)*x_ref[0]+(0.0371149345252)*x_ref[1]
-        ref[0,3,2,1]=(0.839624830979)*x_ref[0]+(0.0785937909827)*x_ref[1]
-        ref[0,4,0,0]=(-0.0250725769598)*x_ref[0]+(-0.535781603767)*x_ref[1]
-        ref[0,4,0,1]=(-0.761849740443)*x_ref[0]+(-0.300714501152)*x_ref[1]
-        ref[0,4,1,0]=(0.0212637838833)*x_ref[0]+(-1.56914428088)*x_ref[1]
-        ref[0,4,1,1]=(-0.254524677425)*x_ref[0]+(0.699288623343)*x_ref[1]
-        ref[0,4,2,0]=(1.14678964272)*x_ref[0]+(1.24738649379)*x_ref[1]
-        ref[0,4,2,1]=(1.80545916472)*x_ref[0]+(1.22689087643)*x_ref[1]
-        ref[1,0,0,0]=(-0.116129927341)*x_ref[0]+(-0.875165834648)*x_ref[1]
-        ref[1,0,0,1]=(-0.49905851236)*x_ref[0]+(-1.10711214732)*x_ref[1]
-        ref[1,0,1,0]=(-1.44706167224)*x_ref[0]+(-1.80259802262)*x_ref[1]
-        ref[1,0,1,1]=(0.555288273554)*x_ref[0]+(0.153437302525)*x_ref[1]
-        ref[1,0,2,0]=(0.00774838569142)*x_ref[0]+(-1.35683757658)*x_ref[1]
-        ref[1,0,2,1]=(-0.625156986286)*x_ref[0]+(-0.201091038824)*x_ref[1]
-        ref[1,1,0,0]=(-0.765068445971)*x_ref[0]+(1.32890117415)*x_ref[1]
-        ref[1,1,0,1]=(-0.629548919312)*x_ref[0]+(-0.0512345513979)*x_ref[1]
-        ref[1,1,1,0]=(-0.361717423775)*x_ref[0]+(0.286169858965)*x_ref[1]
-        ref[1,1,1,1]=(-0.533065922681)*x_ref[0]+(0.103362397133)*x_ref[1]
-        ref[1,1,2,0]=(0.978041972715)*x_ref[0]+(0.405949452109)*x_ref[1]
-        ref[1,1,2,1]=(-1.08418078618)*x_ref[0]+(0.027879770152)*x_ref[1]
-        ref[1,2,0,0]=(1.23545256768)*x_ref[0]+(0.574400116282)*x_ref[1]
-        ref[1,2,0,1]=(0.245362478488)*x_ref[0]+(0.241577755816)*x_ref[1]
-        ref[1,2,1,0]=(0.645309443244)*x_ref[0]+(0.0437773509036)*x_ref[1]
-        ref[1,2,1,1]=(0.00930197364105)*x_ref[0]+(0.472462788946)*x_ref[1]
-        ref[1,2,2,0]=(1.44241534167)*x_ref[0]+(-0.901332994844)*x_ref[1]
-        ref[1,2,2,1]=(0.893335284585)*x_ref[0]+(0.109130146628)*x_ref[1]
-        ref[1,3,0,0]=(0.601907323675)*x_ref[0]+(-1.54057502586)*x_ref[1]
-        ref[1,3,0,1]=(1.38086759376)*x_ref[0]+(0.356522488945)*x_ref[1]
-        ref[1,3,1,0]=(1.16786130652)*x_ref[0]+(-0.788756049484)*x_ref[1]
-        ref[1,3,1,1]=(-0.22580270698)*x_ref[0]+(0.857686971693)*x_ref[1]
-        ref[1,3,2,0]=(0.709549396131)*x_ref[0]+(-0.644330864877)*x_ref[1]
-        ref[1,3,2,1]=(1.04901965211)*x_ref[0]+(0.0178384468958)*x_ref[1]
-        ref[1,4,0,0]=(-0.525050731412)*x_ref[0]+(-0.253639122312)*x_ref[1]
-        ref[1,4,0,1]=(-1.63200911423)*x_ref[0]+(0.519020443372)*x_ref[1]
-        ref[1,4,1,0]=(0.23956666878)*x_ref[0]+(-1.76973024011)*x_ref[1]
-        ref[1,4,1,1]=(-0.412317050346)*x_ref[0]+(-0.391711749094)*x_ref[1]
-        ref[1,4,2,0]=(1.63293176518)*x_ref[0]+(0.583921572851)*x_ref[1]
-        ref[1,4,2,1]=(0.434893659373)*x_ref[0]+(-0.324706930043)*x_ref[1]
-        ref[2,0,0,0]=(0.368478865639)*x_ref[0]+(1.87637158068)*x_ref[1]
-        ref[2,0,0,1]=(1.32519020398)*x_ref[0]+(0.306016568948)*x_ref[1]
-        ref[2,0,1,0]=(-0.284264003593)*x_ref[0]+(-0.899022593367)*x_ref[1]
-        ref[2,0,1,1]=(-0.0439761413236)*x_ref[0]+(-0.696386615358)*x_ref[1]
-        ref[2,0,2,0]=(0.407393812349)*x_ref[0]+(-1.04815464317)*x_ref[1]
-        ref[2,0,2,1]=(-0.956661282071)*x_ref[0]+(0.243281223782)*x_ref[1]
-        ref[2,1,0,0]=(-1.29201911939)*x_ref[0]+(-0.693049706038)*x_ref[1]
-        ref[2,1,0,1]=(-0.711059848853)*x_ref[0]+(-1.14204907272)*x_ref[1]
-        ref[2,1,1,0]=(-0.347693333057)*x_ref[0]+(0.818879269672)*x_ref[1]
-        ref[2,1,1,1]=(0.00742807299875)*x_ref[0]+(0.138845309984)*x_ref[1]
-        ref[2,1,2,0]=(1.13412244048)*x_ref[0]+(-0.481422214102)*x_ref[1]
-        ref[2,1,2,1]=(0.64440302826)*x_ref[0]+(-0.955231893089)*x_ref[1]
-        ref[2,2,0,0]=(0.13123141544)*x_ref[0]+(-0.602266537541)*x_ref[1]
-        ref[2,2,0,1]=(-0.204818071763)*x_ref[0]+(-1.13480248293)*x_ref[1]
-        ref[2,2,1,0]=(0.781058287579)*x_ref[0]+(-1.31936224435)*x_ref[1]
-        ref[2,2,1,1]=(-0.591275351662)*x_ref[0]+(0.691816969517)*x_ref[1]
-        ref[2,2,2,0]=(-0.921964826241)*x_ref[0]+(1.28687075541)*x_ref[1]
-        ref[2,2,2,1]=(0.246260462337)*x_ref[0]+(-1.04699282194)*x_ref[1]
-        ref[2,3,0,0]=(0.264209126513)*x_ref[0]+(-0.697094400566)*x_ref[1]
-        ref[2,3,0,1]=(0.456158298484)*x_ref[0]+(0.0288036445565)*x_ref[1]
-        ref[2,3,1,0]=(-0.720337925392)*x_ref[0]+(0.0965182642186)*x_ref[1]
-        ref[2,3,1,1]=(0.397480419547)*x_ref[0]+(-1.55232798344)*x_ref[1]
-        ref[2,3,2,0]=(-0.337139999283)*x_ref[0]+(0.918809751807)*x_ref[1]
-        ref[2,3,2,1]=(1.34009447198)*x_ref[0]+(-1.41390962018)*x_ref[1]
-        ref[2,4,0,0]=(1.67781838006)*x_ref[0]+(0.521276193814)*x_ref[1]
-        ref[2,4,0,1]=(-0.114014321939)*x_ref[0]+(0.529316778773)*x_ref[1]
-        ref[2,4,1,0]=(-0.19938131807)*x_ref[0]+(-0.0712417614843)*x_ref[1]
-        ref[2,4,1,1]=(-0.724676753871)*x_ref[0]+(0.731341170171)*x_ref[1]
-        ref[2,4,2,0]=(0.988755659656)*x_ref[0]+(-1.0327352189)*x_ref[1]
-        ref[2,4,2,1]=(-0.526286732859)*x_ref[0]+(-1.18295671598)*x_ref[1]
-        ref[3,0,0,0]=(-0.685223304723)*x_ref[0]+(0.508431586068)*x_ref[1]
-        ref[3,0,0,1]=(0.529240274944)*x_ref[0]+(0.77519128969)*x_ref[1]
-        ref[3,0,1,0]=(-0.757098431928)*x_ref[0]+(1.41375812725)*x_ref[1]
-        ref[3,0,1,1]=(1.20805599335)*x_ref[0]+(-0.184660334182)*x_ref[1]
-        ref[3,0,2,0]=(0.718413765561)*x_ref[0]+(0.971149168706)*x_ref[1]
-        ref[3,0,2,1]=(-0.632670534518)*x_ref[0]+(0.0389618967363)*x_ref[1]
-        ref[3,1,0,0]=(-0.525814673755)*x_ref[0]+(0.574122587598)*x_ref[1]
-        ref[3,1,0,1]=(-1.04117288975)*x_ref[0]+(-1.00738089823)*x_ref[1]
-        ref[3,1,1,0]=(0.0312806064182)*x_ref[0]+(-0.30773511847)*x_ref[1]
-        ref[3,1,1,1]=(0.889930889355)*x_ref[0]+(0.833689153489)*x_ref[1]
-        ref[3,1,2,0]=(-1.21586293381)*x_ref[0]+(0.512182349574)*x_ref[1]
-        ref[3,1,2,1]=(-0.00437508755415)*x_ref[0]+(-1.13228664497)*x_ref[1]
-        ref[3,2,0,0]=(1.64174174554)*x_ref[0]+(-0.696500062562)*x_ref[1]
-        ref[3,2,0,1]=(0.0265343210604)*x_ref[0]+(-0.707378716636)*x_ref[1]
-        ref[3,2,1,0]=(0.952922122967)*x_ref[0]+(0.0946904561805)*x_ref[1]
-        ref[3,2,1,1]=(-1.06905266456)*x_ref[0]+(-0.155122789807)*x_ref[1]
-        ref[3,2,2,0]=(-1.14410789976)*x_ref[0]+(-0.379020164446)*x_ref[1]
-        ref[3,2,2,1]=(-0.0922611198553)*x_ref[0]+(1.36680699099)*x_ref[1]
-        ref[3,3,0,0]=(0.849028205422)*x_ref[0]+(-0.968698293811)*x_ref[1]
-        ref[3,3,0,1]=(0.649894718675)*x_ref[0]+(0.238249259292)*x_ref[1]
-        ref[3,3,1,0]=(1.28170508471)*x_ref[0]+(-0.736544947537)*x_ref[1]
-        ref[3,3,1,1]=(-0.188411685414)*x_ref[0]+(1.14145010691)*x_ref[1]
-        ref[3,3,2,0]=(-1.13973037849)*x_ref[0]+(-0.256565914821)*x_ref[1]
-        ref[3,3,2,1]=(0.955478585358)*x_ref[0]+(-0.83417326515)*x_ref[1]
-        ref[3,4,0,0]=(0.155710789468)*x_ref[0]+(0.204956811648)*x_ref[1]
-        ref[3,4,0,1]=(0.567866952974)*x_ref[0]+(-0.168398320099)*x_ref[1]
-        ref[3,4,1,0]=(-1.36997367)*x_ref[0]+(0.141984040172)*x_ref[1]
-        ref[3,4,1,1]=(-0.809532285206)*x_ref[0]+(0.70611485405)*x_ref[1]
-        ref[3,4,2,0]=(-0.453260232051)*x_ref[0]+(0.0665127865858)*x_ref[1]
-        ref[3,4,2,1]=(0.00142021115277)*x_ref[0]+(1.02307505343)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.59037121238)*x[0]+(-0.432259357387)*x[1]+(1.06313464506)*x[2]
-        arg[0,0,0,1]=(-0.29317617186)*x[0]+(-0.477878024138)*x[1]+(-0.943279870083)*x[2]
-        arg[0,0,1,0]=(-0.0140970955833)*x[0]+(0.141752937281)*x[1]+(0.46748311988)*x[2]
-        arg[0,0,1,1]=(1.06645552756)*x[0]+(-1.4360320823)*x[1]+(-1.05643251873)*x[2]
-        arg[0,0,2,0]=(-0.527854671619)*x[0]+(0.68918711423)*x[1]+(0.225750468582)*x[2]
-        arg[0,0,2,1]=(0.765285169635)*x[0]+(-0.292098568154)*x[1]+(-0.611702446821)*x[2]
-        arg[0,1,0,0]=(0.472029729041)*x[0]+(-0.391383508709)*x[1]+(-0.0882199174494)*x[2]
-        arg[0,1,0,1]=(1.76010861737)*x[0]+(1.40668629263)*x[1]+(-0.171024087043)*x[2]
-        arg[0,1,1,0]=(0.251929705017)*x[0]+(-0.326420063624)*x[1]+(-0.337849942832)*x[2]
-        arg[0,1,1,1]=(0.049289902392)*x[0]+(1.61775987596)*x[1]+(0.545741506198)*x[2]
-        arg[0,1,2,0]=(-0.500710333189)*x[0]+(-0.551222136922)*x[1]+(0.665856619864)*x[2]
-        arg[0,1,2,1]=(0.271547935249)*x[0]+(0.46154733209)*x[1]+(0.0776993672589)*x[2]
-        arg[0,2,0,0]=(0.46744023541)*x[0]+(0.281754164985)*x[1]+(0.11721465855)*x[2]
-        arg[0,2,0,1]=(0.58865724402)*x[0]+(-0.280911783535)*x[1]+(0.793461201474)*x[2]
-        arg[0,2,1,0]=(-0.348215254122)*x[0]+(-0.274357607001)*x[1]+(-0.975813503666)*x[2]
-        arg[0,2,1,1]=(-0.546269224094)*x[0]+(0.54132986357)*x[1]+(-0.346797273682)*x[2]
-        arg[0,2,2,0]=(0.956395362583)*x[0]+(-0.609333787208)*x[1]+(-0.86408067145)*x[2]
-        arg[0,2,2,1]=(0.570075324955)*x[0]+(-0.251638346903)*x[1]+(0.292841304398)*x[2]
-        arg[0,3,0,0]=(-0.240717117869)*x[0]+(0.571307481772)*x[1]+(0.66826910816)*x[2]
-        arg[0,3,0,1]=(0.113871023723)*x[0]+(0.022498355636)*x[1]+(0.95331234379)*x[2]
-        arg[0,3,1,0]=(-0.264946899001)*x[0]+(1.08412373438)*x[1]+(-1.10548347411)*x[2]
-        arg[0,3,1,1]=(-0.744510132854)*x[0]+(-0.716638983187)*x[1]+(0.64330838226)*x[2]
-        arg[0,3,2,0]=(1.15237343787)*x[0]+(-1.42565901229)*x[1]+(0.727585401396)*x[2]
-        arg[0,3,2,1]=(-0.251464863627)*x[0]+(1.4067624912)*x[1]+(0.674418739118)*x[2]
-        arg[0,4,0,0]=(-0.00551820316191)*x[0]+(0.193862853101)*x[1]+(1.8004924522)*x[2]
-        arg[0,4,0,1]=(-0.985879358916)*x[0]+(0.476965815991)*x[1]+(0.96363449822)*x[2]
-        arg[0,4,1,0]=(-0.657967361584)*x[0]+(0.833452284341)*x[1]+(-1.40128003822)*x[2]
-        arg[0,4,1,1]=(0.301379967988)*x[0]+(0.0474545542353)*x[1]+(-0.633087920569)*x[2]
-        arg[0,4,2,0]=(-1.94409755409)*x[0]+(-0.468638363928)*x[1]+(-0.713880237452)*x[2]
-        arg[0,4,2,1]=(-1.13536316065)*x[0]+(-0.250761280127)*x[1]+(0.328722833182)*x[2]
-        arg[1,0,0,0]=(0.556886266554)*x[0]+(-0.70523094638)*x[1]+(-0.333621268224)*x[2]
-        arg[1,0,0,1]=(-0.995565683628)*x[0]+(-0.158120855239)*x[1]+(0.0738870470169)*x[2]
-        arg[1,0,1,0]=(-0.209556712574)*x[0]+(0.54393408711)*x[1]+(-1.1617498966)*x[2]
-        arg[1,0,1,1]=(0.666809649924)*x[0]+(1.18555984779)*x[1]+(-0.442831598796)*x[2]
-        arg[1,0,2,0]=(-0.21354395591)*x[0]+(-0.634626698269)*x[1]+(1.25643757008)*x[2]
-        arg[1,0,2,1]=(-0.676259187073)*x[0]+(-0.458532774397)*x[1]+(0.271156919902)*x[2]
-        arg[1,1,0,0]=(-1.45529139262)*x[0]+(0.311382249732)*x[1]+(-0.134620909882)*x[2]
-        arg[1,1,0,1]=(-1.47708829198)*x[0]+(0.968291536601)*x[1]+(-0.566606887608)*x[2]
-        arg[1,1,1,0]=(1.18904329045)*x[0]+(-0.209072247061)*x[1]+(-0.26261457093)*x[2]
-        arg[1,1,1,1]=(0.313723817215)*x[0]+(-0.169177309423)*x[1]+(-0.00119161234247)*x[2]
-        arg[1,1,2,0]=(0.431298197457)*x[0]+(0.264113678484)*x[1]+(0.192619025313)*x[2]
-        arg[1,1,2,1]=(0.0469221259627)*x[0]+(1.53477696238)*x[1]+(0.00794662724457)*x[2]
-        arg[1,2,0,0]=(0.102179220279)*x[0]+(-0.391365988191)*x[1]+(0.302910557263)*x[2]
-        arg[1,2,0,1]=(0.841803002697)*x[0]+(0.581539244301)*x[1]+(0.00409108885792)*x[2]
-        arg[1,2,1,0]=(0.0840378161144)*x[0]+(-0.431329807551)*x[1]+(-1.0774029159)*x[2]
-        arg[1,2,1,1]=(-0.270803943532)*x[0]+(0.0124514531652)*x[1]+(0.197735227059)*x[2]
-        arg[1,2,2,0]=(0.479336250918)*x[0]+(0.0435331360815)*x[1]+(0.458048853417)*x[2]
-        arg[1,2,2,1]=(-0.59916419564)*x[0]+(0.415546807791)*x[1]+(-1.12105410423)*x[2]
-        arg[1,3,0,0]=(0.378277354507)*x[0]+(1.00734343779)*x[1]+(-0.282811389334)*x[2]
-        arg[1,3,0,1]=(0.717420487474)*x[0]+(-0.730395427407)*x[1]+(1.63850706843)*x[2]
-        arg[1,3,1,0]=(-0.0126954991872)*x[0]+(-1.35916858377)*x[1]+(-0.955731750212)*x[2]
-        arg[1,3,1,1]=(-0.560951559862)*x[0]+(0.271085100351)*x[1]+(0.60767567276)*x[2]
-        arg[1,3,2,0]=(-0.73286080289)*x[0]+(-1.12018839274)*x[1]+(0.365586479937)*x[2]
-        arg[1,3,2,1]=(-0.495391543232)*x[0]+(-0.404605421036)*x[1]+(1.21261493791)*x[2]
-        arg[1,4,0,0]=(-0.322147956238)*x[0]+(0.278257549185)*x[1]+(-0.927648624956)*x[2]
-        arg[1,4,0,1]=(1.23243511737)*x[0]+(1.38355111729)*x[1]+(0.0813739945129)*x[2]
-        arg[1,4,1,0]=(0.668384291635)*x[0]+(0.995328961231)*x[1]+(0.803009543307)*x[2]
-        arg[1,4,1,1]=(1.42643018603)*x[0]+(0.940855692156)*x[1]+(0.277556451163)*x[2]
-        arg[1,4,2,0]=(0.489588226757)*x[0]+(-1.63608809124)*x[1]+(-0.262918068522)*x[2]
-        arg[1,4,2,1]=(-1.06922340601)*x[0]+(-0.0241938384008)*x[1]+(-0.244107290038)*x[2]
-        arg[2,0,0,0]=(-0.556338154459)*x[0]+(0.12071126785)*x[1]+(0.11215804852)*x[2]
-        arg[2,0,0,1]=(-0.479017339774)*x[0]+(-0.530313718209)*x[1]+(0.490083551372)*x[2]
-        arg[2,0,1,0]=(0.731269264444)*x[0]+(0.245793038193)*x[1]+(0.0479833912422)*x[2]
-        arg[2,0,1,1]=(-0.286189382681)*x[0]+(0.601756275554)*x[1]+(-0.559334203137)*x[2]
-        arg[2,0,2,0]=(-0.876495720673)*x[0]+(0.592513223261)*x[1]+(0.844551261652)*x[2]
-        arg[2,0,2,1]=(1.22915142187)*x[0]+(0.136223623577)*x[1]+(0.88656874029)*x[2]
-        arg[2,1,0,0]=(0.542222650916)*x[0]+(-0.709719163926)*x[1]+(0.262207188498)*x[2]
-        arg[2,1,0,1]=(-0.208896980258)*x[0]+(1.33968890395)*x[1]+(-0.599621090138)*x[2]
-        arg[2,1,1,0]=(-0.171147406604)*x[0]+(0.332227749427)*x[1]+(1.15043521586)*x[2]
-        arg[2,1,1,1]=(0.571607567027)*x[0]+(0.1367434941)*x[1]+(1.47797159814)*x[2]
-        arg[2,1,2,0]=(0.839845574634)*x[0]+(0.732437808234)*x[1]+(-0.0311071654701)*x[2]
-        arg[2,1,2,1]=(1.45193213653)*x[0]+(-0.0192312612414)*x[1]+(0.308521161282)*x[2]
-        arg[2,2,0,0]=(-0.122755384028)*x[0]+(0.133510038844)*x[1]+(0.837213365425)*x[2]
-        arg[2,2,0,1]=(-0.411967923958)*x[0]+(-0.955489021071)*x[1]+(0.269005602186)*x[2]
-        arg[2,2,1,0]=(-1.19993089382)*x[0]+(0.276541296246)*x[1]+(0.523388479396)*x[2]
-        arg[2,2,1,1]=(0.0586514653869)*x[0]+(-0.624975232742)*x[1]+(-1.55738876751)*x[2]
-        arg[2,2,2,0]=(-0.892065938887)*x[0]+(-0.4848241954)*x[1]+(0.315463883511)*x[2]
-        arg[2,2,2,1]=(0.0272963181118)*x[0]+(0.0187713454669)*x[1]+(-1.06524661854)*x[2]
-        arg[2,3,0,0]=(-1.44099287886)*x[0]+(0.495718421075)*x[1]+(0.100401960223)*x[2]
-        arg[2,3,0,1]=(0.171175119412)*x[0]+(-1.34795558607)*x[1]+(-0.361766653264)*x[2]
-        arg[2,3,1,0]=(-1.80591882588)*x[0]+(-0.511459455136)*x[1]+(-0.491310264055)*x[2]
-        arg[2,3,1,1]=(-0.419508934622)*x[0]+(-1.12084042844)*x[1]+(-0.086947672548)*x[2]
-        arg[2,3,2,0]=(0.492388303934)*x[0]+(-0.623505828597)*x[1]+(1.6965873745)*x[2]
-        arg[2,3,2,1]=(1.59203810356)*x[0]+(0.36918142231)*x[1]+(-1.90067115052)*x[2]
-        arg[2,4,0,0]=(1.00875649298)*x[0]+(-1.43246384934)*x[1]+(-0.51811906593)*x[2]
-        arg[2,4,0,1]=(0.260118918034)*x[0]+(-1.57606061865)*x[1]+(-0.79257165655)*x[2]
-        arg[2,4,1,0]=(0.954414074467)*x[0]+(-0.230132876613)*x[1]+(0.0956378957424)*x[2]
-        arg[2,4,1,1]=(0.958843806364)*x[0]+(-0.155804429995)*x[1]+(-1.02904877039)*x[2]
-        arg[2,4,2,0]=(0.252668700811)*x[0]+(0.164829885749)*x[1]+(0.747032722421)*x[2]
-        arg[2,4,2,1]=(1.96393052323)*x[0]+(-0.821363958807)*x[1]+(-1.01663555063)*x[2]
-        arg[3,0,0,0]=(1.58086037053)*x[0]+(-1.66495295611)*x[1]+(-0.510526191383)*x[2]
-        arg[3,0,0,1]=(-0.931871976029)*x[0]+(1.33102205125)*x[1]+(-0.95170580468)*x[2]
-        arg[3,0,1,0]=(0.99825404115)*x[0]+(0.915274413552)*x[1]+(1.5057227674)*x[2]
-        arg[3,0,1,1]=(0.0485551924989)*x[0]+(-1.0877405758)*x[1]+(-0.887342573702)*x[2]
-        arg[3,0,2,0]=(-0.745146140677)*x[0]+(-0.0108141266015)*x[1]+(0.194597576308)*x[2]
-        arg[3,0,2,1]=(-0.935029218338)*x[0]+(0.726322809025)*x[1]+(0.57508467103)*x[2]
-        arg[3,1,0,0]=(0.115668237156)*x[0]+(0.0970255991906)*x[1]+(-0.227291123547)*x[2]
-        arg[3,1,0,1]=(0.167722335863)*x[0]+(-0.552168424291)*x[1]+(1.36293027463)*x[2]
-        arg[3,1,1,0]=(-1.05781878028)*x[0]+(-0.0429389047972)*x[1]+(-0.257166337509)*x[2]
-        arg[3,1,1,1]=(0.129148486118)*x[0]+(-0.0209434899369)*x[1]+(0.253153005253)*x[2]
-        arg[3,1,2,0]=(1.3236615365)*x[0]+(-1.18164469224)*x[1]+(0.698012697426)*x[2]
-        arg[3,1,2,1]=(1.10438661886)*x[0]+(-0.852903948395)*x[1]+(1.40365162024)*x[2]
-        arg[3,2,0,0]=(-0.949308009957)*x[0]+(1.01993206161)*x[1]+(-0.821721697476)*x[2]
-        arg[3,2,0,1]=(0.326450662787)*x[0]+(0.395096088107)*x[1]+(-0.368904800584)*x[2]
-        arg[3,2,1,0]=(0.13107780566)*x[0]+(-0.342904134623)*x[1]+(0.00835087701185)*x[2]
-        arg[3,2,1,1]=(-0.500694550647)*x[0]+(1.38322390003)*x[1]+(0.0576453183412)*x[2]
-        arg[3,2,2,0]=(-1.32014489811)*x[0]+(-0.444079317864)*x[1]+(1.1135946018)*x[2]
-        arg[3,2,2,1]=(-0.19593105007)*x[0]+(-0.00224390969377)*x[1]+(-0.73869338942)*x[2]
-        arg[3,3,0,0]=(0.0151201622255)*x[0]+(-1.10873788153)*x[1]+(0.189116254832)*x[2]
-        arg[3,3,0,1]=(1.05996205566)*x[0]+(0.398465639867)*x[1]+(-0.319773104448)*x[2]
-        arg[3,3,1,0]=(0.687612827243)*x[0]+(1.10970823257)*x[1]+(1.02543288975)*x[2]
-        arg[3,3,1,1]=(1.27258509981)*x[0]+(-1.7060826391)*x[1]+(-0.84948812227)*x[2]
-        arg[3,3,2,0]=(1.2343036886)*x[0]+(0.521090253023)*x[1]+(-1.13377412954)*x[2]
-        arg[3,3,2,1]=(-0.65568738385)*x[0]+(1.00354617712)*x[1]+(0.836719015812)*x[2]
-        arg[3,4,0,0]=(-0.545324078594)*x[0]+(0.452747782208)*x[1]+(-1.59718954237)*x[2]
-        arg[3,4,0,1]=(1.71651153317)*x[0]+(-0.161984538787)*x[1]+(-0.377244827904)*x[2]
-        arg[3,4,1,0]=(-0.284033324558)*x[0]+(-0.405941433062)*x[1]+(0.824573264594)*x[2]
-        arg[3,4,1,1]=(-0.112542702803)*x[0]+(-0.470814805786)*x[1]+(-0.827427436576)*x[2]
-        arg[3,4,2,0]=(-0.763655132981)*x[0]+(-0.442818775864)*x[1]+(0.809814510041)*x[2]
-        arg[3,4,2,1]=(-0.33794306298)*x[0]+(1.91169591332)*x[1]+(-0.487268088196)*x[2]
-        ref[0,0,0,0]=(-0.59037121238)*x_ref[0]+(-0.432259357387)*x_ref[1]+(1.06313464506)*x_ref[2]
-        ref[0,0,0,1]=(-0.29317617186)*x_ref[0]+(-0.477878024138)*x_ref[1]+(-0.943279870083)*x_ref[2]
-        ref[0,0,1,0]=(-0.0140970955833)*x_ref[0]+(0.141752937281)*x_ref[1]+(0.46748311988)*x_ref[2]
-        ref[0,0,1,1]=(1.06645552756)*x_ref[0]+(-1.4360320823)*x_ref[1]+(-1.05643251873)*x_ref[2]
-        ref[0,0,2,0]=(-0.527854671619)*x_ref[0]+(0.68918711423)*x_ref[1]+(0.225750468582)*x_ref[2]
-        ref[0,0,2,1]=(0.765285169635)*x_ref[0]+(-0.292098568154)*x_ref[1]+(-0.611702446821)*x_ref[2]
-        ref[0,1,0,0]=(0.472029729041)*x_ref[0]+(-0.391383508709)*x_ref[1]+(-0.0882199174494)*x_ref[2]
-        ref[0,1,0,1]=(1.76010861737)*x_ref[0]+(1.40668629263)*x_ref[1]+(-0.171024087043)*x_ref[2]
-        ref[0,1,1,0]=(0.251929705017)*x_ref[0]+(-0.326420063624)*x_ref[1]+(-0.337849942832)*x_ref[2]
-        ref[0,1,1,1]=(0.049289902392)*x_ref[0]+(1.61775987596)*x_ref[1]+(0.545741506198)*x_ref[2]
-        ref[0,1,2,0]=(-0.500710333189)*x_ref[0]+(-0.551222136922)*x_ref[1]+(0.665856619864)*x_ref[2]
-        ref[0,1,2,1]=(0.271547935249)*x_ref[0]+(0.46154733209)*x_ref[1]+(0.0776993672589)*x_ref[2]
-        ref[0,2,0,0]=(0.46744023541)*x_ref[0]+(0.281754164985)*x_ref[1]+(0.11721465855)*x_ref[2]
-        ref[0,2,0,1]=(0.58865724402)*x_ref[0]+(-0.280911783535)*x_ref[1]+(0.793461201474)*x_ref[2]
-        ref[0,2,1,0]=(-0.348215254122)*x_ref[0]+(-0.274357607001)*x_ref[1]+(-0.975813503666)*x_ref[2]
-        ref[0,2,1,1]=(-0.546269224094)*x_ref[0]+(0.54132986357)*x_ref[1]+(-0.346797273682)*x_ref[2]
-        ref[0,2,2,0]=(0.956395362583)*x_ref[0]+(-0.609333787208)*x_ref[1]+(-0.86408067145)*x_ref[2]
-        ref[0,2,2,1]=(0.570075324955)*x_ref[0]+(-0.251638346903)*x_ref[1]+(0.292841304398)*x_ref[2]
-        ref[0,3,0,0]=(-0.240717117869)*x_ref[0]+(0.571307481772)*x_ref[1]+(0.66826910816)*x_ref[2]
-        ref[0,3,0,1]=(0.113871023723)*x_ref[0]+(0.022498355636)*x_ref[1]+(0.95331234379)*x_ref[2]
-        ref[0,3,1,0]=(-0.264946899001)*x_ref[0]+(1.08412373438)*x_ref[1]+(-1.10548347411)*x_ref[2]
-        ref[0,3,1,1]=(-0.744510132854)*x_ref[0]+(-0.716638983187)*x_ref[1]+(0.64330838226)*x_ref[2]
-        ref[0,3,2,0]=(1.15237343787)*x_ref[0]+(-1.42565901229)*x_ref[1]+(0.727585401396)*x_ref[2]
-        ref[0,3,2,1]=(-0.251464863627)*x_ref[0]+(1.4067624912)*x_ref[1]+(0.674418739118)*x_ref[2]
-        ref[0,4,0,0]=(-0.00551820316191)*x_ref[0]+(0.193862853101)*x_ref[1]+(1.8004924522)*x_ref[2]
-        ref[0,4,0,1]=(-0.985879358916)*x_ref[0]+(0.476965815991)*x_ref[1]+(0.96363449822)*x_ref[2]
-        ref[0,4,1,0]=(-0.657967361584)*x_ref[0]+(0.833452284341)*x_ref[1]+(-1.40128003822)*x_ref[2]
-        ref[0,4,1,1]=(0.301379967988)*x_ref[0]+(0.0474545542353)*x_ref[1]+(-0.633087920569)*x_ref[2]
-        ref[0,4,2,0]=(-1.94409755409)*x_ref[0]+(-0.468638363928)*x_ref[1]+(-0.713880237452)*x_ref[2]
-        ref[0,4,2,1]=(-1.13536316065)*x_ref[0]+(-0.250761280127)*x_ref[1]+(0.328722833182)*x_ref[2]
-        ref[1,0,0,0]=(0.556886266554)*x_ref[0]+(-0.70523094638)*x_ref[1]+(-0.333621268224)*x_ref[2]
-        ref[1,0,0,1]=(-0.995565683628)*x_ref[0]+(-0.158120855239)*x_ref[1]+(0.0738870470169)*x_ref[2]
-        ref[1,0,1,0]=(-0.209556712574)*x_ref[0]+(0.54393408711)*x_ref[1]+(-1.1617498966)*x_ref[2]
-        ref[1,0,1,1]=(0.666809649924)*x_ref[0]+(1.18555984779)*x_ref[1]+(-0.442831598796)*x_ref[2]
-        ref[1,0,2,0]=(-0.21354395591)*x_ref[0]+(-0.634626698269)*x_ref[1]+(1.25643757008)*x_ref[2]
-        ref[1,0,2,1]=(-0.676259187073)*x_ref[0]+(-0.458532774397)*x_ref[1]+(0.271156919902)*x_ref[2]
-        ref[1,1,0,0]=(-1.45529139262)*x_ref[0]+(0.311382249732)*x_ref[1]+(-0.134620909882)*x_ref[2]
-        ref[1,1,0,1]=(-1.47708829198)*x_ref[0]+(0.968291536601)*x_ref[1]+(-0.566606887608)*x_ref[2]
-        ref[1,1,1,0]=(1.18904329045)*x_ref[0]+(-0.209072247061)*x_ref[1]+(-0.26261457093)*x_ref[2]
-        ref[1,1,1,1]=(0.313723817215)*x_ref[0]+(-0.169177309423)*x_ref[1]+(-0.00119161234247)*x_ref[2]
-        ref[1,1,2,0]=(0.431298197457)*x_ref[0]+(0.264113678484)*x_ref[1]+(0.192619025313)*x_ref[2]
-        ref[1,1,2,1]=(0.0469221259627)*x_ref[0]+(1.53477696238)*x_ref[1]+(0.00794662724457)*x_ref[2]
-        ref[1,2,0,0]=(0.102179220279)*x_ref[0]+(-0.391365988191)*x_ref[1]+(0.302910557263)*x_ref[2]
-        ref[1,2,0,1]=(0.841803002697)*x_ref[0]+(0.581539244301)*x_ref[1]+(0.00409108885792)*x_ref[2]
-        ref[1,2,1,0]=(0.0840378161144)*x_ref[0]+(-0.431329807551)*x_ref[1]+(-1.0774029159)*x_ref[2]
-        ref[1,2,1,1]=(-0.270803943532)*x_ref[0]+(0.0124514531652)*x_ref[1]+(0.197735227059)*x_ref[2]
-        ref[1,2,2,0]=(0.479336250918)*x_ref[0]+(0.0435331360815)*x_ref[1]+(0.458048853417)*x_ref[2]
-        ref[1,2,2,1]=(-0.59916419564)*x_ref[0]+(0.415546807791)*x_ref[1]+(-1.12105410423)*x_ref[2]
-        ref[1,3,0,0]=(0.378277354507)*x_ref[0]+(1.00734343779)*x_ref[1]+(-0.282811389334)*x_ref[2]
-        ref[1,3,0,1]=(0.717420487474)*x_ref[0]+(-0.730395427407)*x_ref[1]+(1.63850706843)*x_ref[2]
-        ref[1,3,1,0]=(-0.0126954991872)*x_ref[0]+(-1.35916858377)*x_ref[1]+(-0.955731750212)*x_ref[2]
-        ref[1,3,1,1]=(-0.560951559862)*x_ref[0]+(0.271085100351)*x_ref[1]+(0.60767567276)*x_ref[2]
-        ref[1,3,2,0]=(-0.73286080289)*x_ref[0]+(-1.12018839274)*x_ref[1]+(0.365586479937)*x_ref[2]
-        ref[1,3,2,1]=(-0.495391543232)*x_ref[0]+(-0.404605421036)*x_ref[1]+(1.21261493791)*x_ref[2]
-        ref[1,4,0,0]=(-0.322147956238)*x_ref[0]+(0.278257549185)*x_ref[1]+(-0.927648624956)*x_ref[2]
-        ref[1,4,0,1]=(1.23243511737)*x_ref[0]+(1.38355111729)*x_ref[1]+(0.0813739945129)*x_ref[2]
-        ref[1,4,1,0]=(0.668384291635)*x_ref[0]+(0.995328961231)*x_ref[1]+(0.803009543307)*x_ref[2]
-        ref[1,4,1,1]=(1.42643018603)*x_ref[0]+(0.940855692156)*x_ref[1]+(0.277556451163)*x_ref[2]
-        ref[1,4,2,0]=(0.489588226757)*x_ref[0]+(-1.63608809124)*x_ref[1]+(-0.262918068522)*x_ref[2]
-        ref[1,4,2,1]=(-1.06922340601)*x_ref[0]+(-0.0241938384008)*x_ref[1]+(-0.244107290038)*x_ref[2]
-        ref[2,0,0,0]=(-0.556338154459)*x_ref[0]+(0.12071126785)*x_ref[1]+(0.11215804852)*x_ref[2]
-        ref[2,0,0,1]=(-0.479017339774)*x_ref[0]+(-0.530313718209)*x_ref[1]+(0.490083551372)*x_ref[2]
-        ref[2,0,1,0]=(0.731269264444)*x_ref[0]+(0.245793038193)*x_ref[1]+(0.0479833912422)*x_ref[2]
-        ref[2,0,1,1]=(-0.286189382681)*x_ref[0]+(0.601756275554)*x_ref[1]+(-0.559334203137)*x_ref[2]
-        ref[2,0,2,0]=(-0.876495720673)*x_ref[0]+(0.592513223261)*x_ref[1]+(0.844551261652)*x_ref[2]
-        ref[2,0,2,1]=(1.22915142187)*x_ref[0]+(0.136223623577)*x_ref[1]+(0.88656874029)*x_ref[2]
-        ref[2,1,0,0]=(0.542222650916)*x_ref[0]+(-0.709719163926)*x_ref[1]+(0.262207188498)*x_ref[2]
-        ref[2,1,0,1]=(-0.208896980258)*x_ref[0]+(1.33968890395)*x_ref[1]+(-0.599621090138)*x_ref[2]
-        ref[2,1,1,0]=(-0.171147406604)*x_ref[0]+(0.332227749427)*x_ref[1]+(1.15043521586)*x_ref[2]
-        ref[2,1,1,1]=(0.571607567027)*x_ref[0]+(0.1367434941)*x_ref[1]+(1.47797159814)*x_ref[2]
-        ref[2,1,2,0]=(0.839845574634)*x_ref[0]+(0.732437808234)*x_ref[1]+(-0.0311071654701)*x_ref[2]
-        ref[2,1,2,1]=(1.45193213653)*x_ref[0]+(-0.0192312612414)*x_ref[1]+(0.308521161282)*x_ref[2]
-        ref[2,2,0,0]=(-0.122755384028)*x_ref[0]+(0.133510038844)*x_ref[1]+(0.837213365425)*x_ref[2]
-        ref[2,2,0,1]=(-0.411967923958)*x_ref[0]+(-0.955489021071)*x_ref[1]+(0.269005602186)*x_ref[2]
-        ref[2,2,1,0]=(-1.19993089382)*x_ref[0]+(0.276541296246)*x_ref[1]+(0.523388479396)*x_ref[2]
-        ref[2,2,1,1]=(0.0586514653869)*x_ref[0]+(-0.624975232742)*x_ref[1]+(-1.55738876751)*x_ref[2]
-        ref[2,2,2,0]=(-0.892065938887)*x_ref[0]+(-0.4848241954)*x_ref[1]+(0.315463883511)*x_ref[2]
-        ref[2,2,2,1]=(0.0272963181118)*x_ref[0]+(0.0187713454669)*x_ref[1]+(-1.06524661854)*x_ref[2]
-        ref[2,3,0,0]=(-1.44099287886)*x_ref[0]+(0.495718421075)*x_ref[1]+(0.100401960223)*x_ref[2]
-        ref[2,3,0,1]=(0.171175119412)*x_ref[0]+(-1.34795558607)*x_ref[1]+(-0.361766653264)*x_ref[2]
-        ref[2,3,1,0]=(-1.80591882588)*x_ref[0]+(-0.511459455136)*x_ref[1]+(-0.491310264055)*x_ref[2]
-        ref[2,3,1,1]=(-0.419508934622)*x_ref[0]+(-1.12084042844)*x_ref[1]+(-0.086947672548)*x_ref[2]
-        ref[2,3,2,0]=(0.492388303934)*x_ref[0]+(-0.623505828597)*x_ref[1]+(1.6965873745)*x_ref[2]
-        ref[2,3,2,1]=(1.59203810356)*x_ref[0]+(0.36918142231)*x_ref[1]+(-1.90067115052)*x_ref[2]
-        ref[2,4,0,0]=(1.00875649298)*x_ref[0]+(-1.43246384934)*x_ref[1]+(-0.51811906593)*x_ref[2]
-        ref[2,4,0,1]=(0.260118918034)*x_ref[0]+(-1.57606061865)*x_ref[1]+(-0.79257165655)*x_ref[2]
-        ref[2,4,1,0]=(0.954414074467)*x_ref[0]+(-0.230132876613)*x_ref[1]+(0.0956378957424)*x_ref[2]
-        ref[2,4,1,1]=(0.958843806364)*x_ref[0]+(-0.155804429995)*x_ref[1]+(-1.02904877039)*x_ref[2]
-        ref[2,4,2,0]=(0.252668700811)*x_ref[0]+(0.164829885749)*x_ref[1]+(0.747032722421)*x_ref[2]
-        ref[2,4,2,1]=(1.96393052323)*x_ref[0]+(-0.821363958807)*x_ref[1]+(-1.01663555063)*x_ref[2]
-        ref[3,0,0,0]=(1.58086037053)*x_ref[0]+(-1.66495295611)*x_ref[1]+(-0.510526191383)*x_ref[2]
-        ref[3,0,0,1]=(-0.931871976029)*x_ref[0]+(1.33102205125)*x_ref[1]+(-0.95170580468)*x_ref[2]
-        ref[3,0,1,0]=(0.99825404115)*x_ref[0]+(0.915274413552)*x_ref[1]+(1.5057227674)*x_ref[2]
-        ref[3,0,1,1]=(0.0485551924989)*x_ref[0]+(-1.0877405758)*x_ref[1]+(-0.887342573702)*x_ref[2]
-        ref[3,0,2,0]=(-0.745146140677)*x_ref[0]+(-0.0108141266015)*x_ref[1]+(0.194597576308)*x_ref[2]
-        ref[3,0,2,1]=(-0.935029218338)*x_ref[0]+(0.726322809025)*x_ref[1]+(0.57508467103)*x_ref[2]
-        ref[3,1,0,0]=(0.115668237156)*x_ref[0]+(0.0970255991906)*x_ref[1]+(-0.227291123547)*x_ref[2]
-        ref[3,1,0,1]=(0.167722335863)*x_ref[0]+(-0.552168424291)*x_ref[1]+(1.36293027463)*x_ref[2]
-        ref[3,1,1,0]=(-1.05781878028)*x_ref[0]+(-0.0429389047972)*x_ref[1]+(-0.257166337509)*x_ref[2]
-        ref[3,1,1,1]=(0.129148486118)*x_ref[0]+(-0.0209434899369)*x_ref[1]+(0.253153005253)*x_ref[2]
-        ref[3,1,2,0]=(1.3236615365)*x_ref[0]+(-1.18164469224)*x_ref[1]+(0.698012697426)*x_ref[2]
-        ref[3,1,2,1]=(1.10438661886)*x_ref[0]+(-0.852903948395)*x_ref[1]+(1.40365162024)*x_ref[2]
-        ref[3,2,0,0]=(-0.949308009957)*x_ref[0]+(1.01993206161)*x_ref[1]+(-0.821721697476)*x_ref[2]
-        ref[3,2,0,1]=(0.326450662787)*x_ref[0]+(0.395096088107)*x_ref[1]+(-0.368904800584)*x_ref[2]
-        ref[3,2,1,0]=(0.13107780566)*x_ref[0]+(-0.342904134623)*x_ref[1]+(0.00835087701185)*x_ref[2]
-        ref[3,2,1,1]=(-0.500694550647)*x_ref[0]+(1.38322390003)*x_ref[1]+(0.0576453183412)*x_ref[2]
-        ref[3,2,2,0]=(-1.32014489811)*x_ref[0]+(-0.444079317864)*x_ref[1]+(1.1135946018)*x_ref[2]
-        ref[3,2,2,1]=(-0.19593105007)*x_ref[0]+(-0.00224390969377)*x_ref[1]+(-0.73869338942)*x_ref[2]
-        ref[3,3,0,0]=(0.0151201622255)*x_ref[0]+(-1.10873788153)*x_ref[1]+(0.189116254832)*x_ref[2]
-        ref[3,3,0,1]=(1.05996205566)*x_ref[0]+(0.398465639867)*x_ref[1]+(-0.319773104448)*x_ref[2]
-        ref[3,3,1,0]=(0.687612827243)*x_ref[0]+(1.10970823257)*x_ref[1]+(1.02543288975)*x_ref[2]
-        ref[3,3,1,1]=(1.27258509981)*x_ref[0]+(-1.7060826391)*x_ref[1]+(-0.84948812227)*x_ref[2]
-        ref[3,3,2,0]=(1.2343036886)*x_ref[0]+(0.521090253023)*x_ref[1]+(-1.13377412954)*x_ref[2]
-        ref[3,3,2,1]=(-0.65568738385)*x_ref[0]+(1.00354617712)*x_ref[1]+(0.836719015812)*x_ref[2]
-        ref[3,4,0,0]=(-0.545324078594)*x_ref[0]+(0.452747782208)*x_ref[1]+(-1.59718954237)*x_ref[2]
-        ref[3,4,0,1]=(1.71651153317)*x_ref[0]+(-0.161984538787)*x_ref[1]+(-0.377244827904)*x_ref[2]
-        ref[3,4,1,0]=(-0.284033324558)*x_ref[0]+(-0.405941433062)*x_ref[1]+(0.824573264594)*x_ref[2]
-        ref[3,4,1,1]=(-0.112542702803)*x_ref[0]+(-0.470814805786)*x_ref[1]+(-0.827427436576)*x_ref[2]
-        ref[3,4,2,0]=(-0.763655132981)*x_ref[0]+(-0.442818775864)*x_ref[1]+(0.809814510041)*x_ref[2]
-        ref[3,4,2,1]=(-0.33794306298)*x_ref[0]+(1.91169591332)*x_ref[1]+(-0.487268088196)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.898871557679)*x[0]+(0.0218492481542)*x[1]
-        ref=(0.898871557679)*x_ref[0]+(0.0218492481542)*x_ref[1]
-      else:
-        arg=(-0.490730396919)*x[0]+(0.840683566031)*x[1]+(-0.265457839434)*x[2]
-        ref=(-0.490730396919)*x_ref[0]+(0.840683566031)*x_ref[1]+(-0.265457839434)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.505098987801)*x[0]+(-0.647246526986)*x[1]
-        arg[1]=(-0.823205698667)*x[0]+(-0.88472991168)*x[1]
-        ref[0]=(-0.505098987801)*x[0]+(-0.647246526986)*x[1]
-        ref[1]=(-0.823205698667)*x[0]+(-0.88472991168)*x[1]
-      else:
-        arg[0]=(-1.01688152316)*x[0]+(0.197478760214)*x[1]+(-0.833266923905)*x[2]
-        arg[1]=(0.763755283448)*x[0]+(-0.920100276504)*x[1]+(1.0042717309)*x[2]
-        ref[0]=(-1.01688152316)*x[0]+(0.197478760214)*x[1]+(-0.833266923905)*x[2]
-        ref[1]=(0.763755283448)*x[0]+(-0.920100276504)*x[1]+(1.0042717309)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.609515733352)*x[0]+(0.477437125804)*x[1]
-        arg[0,1]=(0.225027969847)*x[0]+(-1.2178256661)*x[1]
-        arg[0,2]=(-0.414641287889)*x[0]+(-0.536814389632)*x[1]
-        arg[0,3]=(0.993370642676)*x[0]+(0.430000528217)*x[1]
-        arg[0,4]=(0.577804610335)*x[0]+(0.0950391061127)*x[1]
-        arg[1,0]=(0.437140855856)*x[0]+(0.764946114688)*x[1]
-        arg[1,1]=(-0.491195658809)*x[0]+(-1.04729131261)*x[1]
-        arg[1,2]=(-0.179287249145)*x[0]+(-1.84699873991)*x[1]
-        arg[1,3]=(0.650408136022)*x[0]+(0.437145116534)*x[1]
-        arg[1,4]=(0.43853490169)*x[0]+(-0.633716126064)*x[1]
-        arg[2,0]=(0.6275418675)*x[0]+(0.812839621482)*x[1]
-        arg[2,1]=(0.151298084104)*x[0]+(0.191677853013)*x[1]
-        arg[2,2]=(1.35800571802)*x[0]+(1.08489593249)*x[1]
-        arg[2,3]=(0.343386100925)*x[0]+(-0.108323271881)*x[1]
-        arg[2,4]=(1.5968773444)*x[0]+(0.421328566279)*x[1]
-        arg[3,0]=(1.0607367804)*x[0]+(-0.347352081886)*x[1]
-        arg[3,1]=(-0.307183028406)*x[0]+(0.171667489459)*x[1]
-        arg[3,2]=(0.255609148103)*x[0]+(0.21702578756)*x[1]
-        arg[3,3]=(0.204487068999)*x[0]+(0.380168463726)*x[1]
-        arg[3,4]=(-0.727714186561)*x[0]+(-0.129616906837)*x[1]
-        ref[0,0]=(-0.609515733352)*x_ref[0]+(0.477437125804)*x_ref[1]
-        ref[0,1]=(0.225027969847)*x_ref[0]+(-1.2178256661)*x_ref[1]
-        ref[0,2]=(-0.414641287889)*x_ref[0]+(-0.536814389632)*x_ref[1]
-        ref[0,3]=(0.993370642676)*x_ref[0]+(0.430000528217)*x_ref[1]
-        ref[0,4]=(0.577804610335)*x_ref[0]+(0.0950391061127)*x_ref[1]
-        ref[1,0]=(0.437140855856)*x_ref[0]+(0.764946114688)*x_ref[1]
-        ref[1,1]=(-0.491195658809)*x_ref[0]+(-1.04729131261)*x_ref[1]
-        ref[1,2]=(-0.179287249145)*x_ref[0]+(-1.84699873991)*x_ref[1]
-        ref[1,3]=(0.650408136022)*x_ref[0]+(0.437145116534)*x_ref[1]
-        ref[1,4]=(0.43853490169)*x_ref[0]+(-0.633716126064)*x_ref[1]
-        ref[2,0]=(0.6275418675)*x_ref[0]+(0.812839621482)*x_ref[1]
-        ref[2,1]=(0.151298084104)*x_ref[0]+(0.191677853013)*x_ref[1]
-        ref[2,2]=(1.35800571802)*x_ref[0]+(1.08489593249)*x_ref[1]
-        ref[2,3]=(0.343386100925)*x_ref[0]+(-0.108323271881)*x_ref[1]
-        ref[2,4]=(1.5968773444)*x_ref[0]+(0.421328566279)*x_ref[1]
-        ref[3,0]=(1.0607367804)*x_ref[0]+(-0.347352081886)*x_ref[1]
-        ref[3,1]=(-0.307183028406)*x_ref[0]+(0.171667489459)*x_ref[1]
-        ref[3,2]=(0.255609148103)*x_ref[0]+(0.21702578756)*x_ref[1]
-        ref[3,3]=(0.204487068999)*x_ref[0]+(0.380168463726)*x_ref[1]
-        ref[3,4]=(-0.727714186561)*x_ref[0]+(-0.129616906837)*x_ref[1]
-      else:
-        arg[0,0]=(-0.282058347281)*x[0]+(-0.804878634484)*x[1]+(1.59321960831)*x[2]
-        arg[0,1]=(0.046711660417)*x[0]+(-0.353452776565)*x[1]+(-1.22459734449)*x[2]
-        arg[0,2]=(0.846231855307)*x[0]+(1.08618070898)*x[1]+(-1.50365393652)*x[2]
-        arg[0,3]=(-0.358546890162)*x[0]+(1.53476318049)*x[1]+(-1.19382694871)*x[2]
-        arg[0,4]=(-1.1943310015)*x[0]+(0.260842673421)*x[1]+(-0.337737972605)*x[2]
-        arg[1,0]=(1.87166717118)*x[0]+(0.853452519127)*x[1]+(-0.59081660847)*x[2]
-        arg[1,1]=(0.23310002871)*x[0]+(0.306981228888)*x[1]+(0.36040454683)*x[2]
-        arg[1,2]=(-1.619288679)*x[0]+(-0.459254234211)*x[1]+(0.722479242965)*x[2]
-        arg[1,3]=(-1.07724802769)*x[0]+(0.836465436044)*x[1]+(0.255446930493)*x[2]
-        arg[1,4]=(1.07857092921)*x[0]+(1.25642859092)*x[1]+(-0.922799422574)*x[2]
-        arg[2,0]=(-0.832179820568)*x[0]+(-0.511243247139)*x[1]+(0.589457094147)*x[2]
-        arg[2,1]=(-0.22616483359)*x[0]+(1.75842052561)*x[1]+(-1.19438769374)*x[2]
-        arg[2,2]=(-0.690678634371)*x[0]+(0.963335056891)*x[1]+(0.53653322138)*x[2]
-        arg[2,3]=(-0.906140718249)*x[0]+(0.766237211441)*x[1]+(1.19445635284)*x[2]
-        arg[2,4]=(-0.16966820901)*x[0]+(0.185706811112)*x[1]+(0.975546783315)*x[2]
-        arg[3,0]=(1.85053644213)*x[0]+(1.000328518)*x[1]+(0.332466610087)*x[2]
-        arg[3,1]=(-0.199393988242)*x[0]+(0.637601295557)*x[1]+(1.29246614993)*x[2]
-        arg[3,2]=(-0.275167528438)*x[0]+(1.00557873837)*x[1]+(1.17143679274)*x[2]
-        arg[3,3]=(-0.306797319235)*x[0]+(0.984827835253)*x[1]+(0.0324710900497)*x[2]
-        arg[3,4]=(-1.07994829511)*x[0]+(0.341016609147)*x[1]+(0.115829923585)*x[2]
-        ref[0,0]=(-0.282058347281)*x_ref[0]+(-0.804878634484)*x_ref[1]+(1.59321960831)*x_ref[2]
-        ref[0,1]=(0.046711660417)*x_ref[0]+(-0.353452776565)*x_ref[1]+(-1.22459734449)*x_ref[2]
-        ref[0,2]=(0.846231855307)*x_ref[0]+(1.08618070898)*x_ref[1]+(-1.50365393652)*x_ref[2]
-        ref[0,3]=(-0.358546890162)*x_ref[0]+(1.53476318049)*x_ref[1]+(-1.19382694871)*x_ref[2]
-        ref[0,4]=(-1.1943310015)*x_ref[0]+(0.260842673421)*x_ref[1]+(-0.337737972605)*x_ref[2]
-        ref[1,0]=(1.87166717118)*x_ref[0]+(0.853452519127)*x_ref[1]+(-0.59081660847)*x_ref[2]
-        ref[1,1]=(0.23310002871)*x_ref[0]+(0.306981228888)*x_ref[1]+(0.36040454683)*x_ref[2]
-        ref[1,2]=(-1.619288679)*x_ref[0]+(-0.459254234211)*x_ref[1]+(0.722479242965)*x_ref[2]
-        ref[1,3]=(-1.07724802769)*x_ref[0]+(0.836465436044)*x_ref[1]+(0.255446930493)*x_ref[2]
-        ref[1,4]=(1.07857092921)*x_ref[0]+(1.25642859092)*x_ref[1]+(-0.922799422574)*x_ref[2]
-        ref[2,0]=(-0.832179820568)*x_ref[0]+(-0.511243247139)*x_ref[1]+(0.589457094147)*x_ref[2]
-        ref[2,1]=(-0.22616483359)*x_ref[0]+(1.75842052561)*x_ref[1]+(-1.19438769374)*x_ref[2]
-        ref[2,2]=(-0.690678634371)*x_ref[0]+(0.963335056891)*x_ref[1]+(0.53653322138)*x_ref[2]
-        ref[2,3]=(-0.906140718249)*x_ref[0]+(0.766237211441)*x_ref[1]+(1.19445635284)*x_ref[2]
-        ref[2,4]=(-0.16966820901)*x_ref[0]+(0.185706811112)*x_ref[1]+(0.975546783315)*x_ref[2]
-        ref[3,0]=(1.85053644213)*x_ref[0]+(1.000328518)*x_ref[1]+(0.332466610087)*x_ref[2]
-        ref[3,1]=(-0.199393988242)*x_ref[0]+(0.637601295557)*x_ref[1]+(1.29246614993)*x_ref[2]
-        ref[3,2]=(-0.275167528438)*x_ref[0]+(1.00557873837)*x_ref[1]+(1.17143679274)*x_ref[2]
-        ref[3,3]=(-0.306797319235)*x_ref[0]+(0.984827835253)*x_ref[1]+(0.0324710900497)*x_ref[2]
-        ref[3,4]=(-1.07994829511)*x_ref[0]+(0.341016609147)*x_ref[1]+(0.115829923585)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.618861298758)*x[0]+(-0.764616734859)*x[1]
-        arg[0,0,1]=(-0.220720229024)*x[0]+(-0.670415412641)*x[1]
-        arg[0,1,0]=(0.847082172076)*x[0]+(0.104515154796)*x[1]
-        arg[0,1,1]=(-1.39487869037)*x[0]+(1.37639032205)*x[1]
-        arg[1,0,0]=(-0.12944065767)*x[0]+(-0.91214412252)*x[1]
-        arg[1,0,1]=(0.0421119211697)*x[0]+(1.19918915102)*x[1]
-        arg[1,1,0]=(0.657099038454)*x[0]+(0.102886690913)*x[1]
-        arg[1,1,1]=(0.114311284584)*x[0]+(-0.827908524893)*x[1]
-        arg[2,0,0]=(-0.905281334495)*x[0]+(1.02228309099)*x[1]
-        arg[2,0,1]=(-0.560619228879)*x[0]+(-0.924304525905)*x[1]
-        arg[2,1,0]=(0.082868967617)*x[0]+(-0.129063346527)*x[1]
-        arg[2,1,1]=(0.386687881433)*x[0]+(-0.874995344656)*x[1]
-        arg[3,0,0]=(0.460976605295)*x[0]+(0.145631537258)*x[1]
-        arg[3,0,1]=(0.439977672901)*x[0]+(0.714321229059)*x[1]
-        arg[3,1,0]=(-0.0459363656635)*x[0]+(-0.0754715887416)*x[1]
-        arg[3,1,1]=(-0.789910257931)*x[0]+(-0.806078036909)*x[1]
-        arg[4,0,0]=(-1.09951071165)*x[0]+(-1.33461983123)*x[1]
-        arg[4,0,1]=(0.857184302111)*x[0]+(0.823036666525)*x[1]
-        arg[4,1,0]=(-1.0682486872)*x[0]+(-0.149861981932)*x[1]
-        arg[4,1,1]=(-0.0758367136425)*x[0]+(0.0460556685916)*x[1]
-        arg[5,0,0]=(0.856207295965)*x[0]+(-0.885450852663)*x[1]
-        arg[5,0,1]=(-0.113939086685)*x[0]+(0.742808810968)*x[1]
-        arg[5,1,0]=(-0.174573302919)*x[0]+(0.486803189896)*x[1]
-        arg[5,1,1]=(1.1726771004)*x[0]+(-0.329765988186)*x[1]
-        ref[0,0,0]=(0.618861298758)*x_ref[0]+(-0.764616734859)*x_ref[1]
-        ref[0,0,1]=(-0.220720229024)*x_ref[0]+(-0.670415412641)*x_ref[1]
-        ref[0,1,0]=(0.847082172076)*x_ref[0]+(0.104515154796)*x_ref[1]
-        ref[0,1,1]=(-1.39487869037)*x_ref[0]+(1.37639032205)*x_ref[1]
-        ref[1,0,0]=(-0.12944065767)*x_ref[0]+(-0.91214412252)*x_ref[1]
-        ref[1,0,1]=(0.0421119211697)*x_ref[0]+(1.19918915102)*x_ref[1]
-        ref[1,1,0]=(0.657099038454)*x_ref[0]+(0.102886690913)*x_ref[1]
-        ref[1,1,1]=(0.114311284584)*x_ref[0]+(-0.827908524893)*x_ref[1]
-        ref[2,0,0]=(-0.905281334495)*x_ref[0]+(1.02228309099)*x_ref[1]
-        ref[2,0,1]=(-0.560619228879)*x_ref[0]+(-0.924304525905)*x_ref[1]
-        ref[2,1,0]=(0.082868967617)*x_ref[0]+(-0.129063346527)*x_ref[1]
-        ref[2,1,1]=(0.386687881433)*x_ref[0]+(-0.874995344656)*x_ref[1]
-        ref[3,0,0]=(0.460976605295)*x_ref[0]+(0.145631537258)*x_ref[1]
-        ref[3,0,1]=(0.439977672901)*x_ref[0]+(0.714321229059)*x_ref[1]
-        ref[3,1,0]=(-0.0459363656635)*x_ref[0]+(-0.0754715887416)*x_ref[1]
-        ref[3,1,1]=(-0.789910257931)*x_ref[0]+(-0.806078036909)*x_ref[1]
-        ref[4,0,0]=(-1.09951071165)*x_ref[0]+(-1.33461983123)*x_ref[1]
-        ref[4,0,1]=(0.857184302111)*x_ref[0]+(0.823036666525)*x_ref[1]
-        ref[4,1,0]=(-1.0682486872)*x_ref[0]+(-0.149861981932)*x_ref[1]
-        ref[4,1,1]=(-0.0758367136425)*x_ref[0]+(0.0460556685916)*x_ref[1]
-        ref[5,0,0]=(0.856207295965)*x_ref[0]+(-0.885450852663)*x_ref[1]
-        ref[5,0,1]=(-0.113939086685)*x_ref[0]+(0.742808810968)*x_ref[1]
-        ref[5,1,0]=(-0.174573302919)*x_ref[0]+(0.486803189896)*x_ref[1]
-        ref[5,1,1]=(1.1726771004)*x_ref[0]+(-0.329765988186)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.640205798541)*x[0]+(0.271670719935)*x[1]+(-0.163000598261)*x[2]
-        arg[0,0,1]=(0.735605297981)*x[0]+(-1.05892412676)*x[1]+(-1.1083007441)*x[2]
-        arg[0,1,0]=(0.0349869408333)*x[0]+(0.699147831788)*x[1]+(-0.454390826725)*x[2]
-        arg[0,1,1]=(-0.703957679243)*x[0]+(-1.63654420176)*x[1]+(-1.13045075795)*x[2]
-        arg[1,0,0]=(1.01167296102)*x[0]+(-0.362443738659)*x[1]+(-0.0481138040854)*x[2]
-        arg[1,0,1]=(0.110033706339)*x[0]+(1.47809236549)*x[1]+(0.240737599484)*x[2]
-        arg[1,1,0]=(-0.0429437939148)*x[0]+(-1.16945967196)*x[1]+(0.924577053186)*x[2]
-        arg[1,1,1]=(-1.57856509244)*x[0]+(-0.460441809594)*x[1]+(-0.792590928973)*x[2]
-        arg[2,0,0]=(-1.93020920065)*x[0]+(0.391612451745)*x[1]+(-0.0130238634938)*x[2]
-        arg[2,0,1]=(0.0678908982414)*x[0]+(-0.929813889361)*x[1]+(0.727462587818)*x[2]
-        arg[2,1,0]=(-0.297494494419)*x[0]+(0.167234033247)*x[1]+(-1.01372084798)*x[2]
-        arg[2,1,1]=(-0.608810623174)*x[0]+(1.04629900384)*x[1]+(1.09464953456)*x[2]
-        arg[3,0,0]=(1.2996449893)*x[0]+(-0.458197425323)*x[1]+(1.31523663461)*x[2]
-        arg[3,0,1]=(-0.848124038387)*x[0]+(0.0136487458675)*x[1]+(1.13573336016)*x[2]
-        arg[3,1,0]=(0.377245000633)*x[0]+(-0.766336675857)*x[1]+(0.380031677083)*x[2]
-        arg[3,1,1]=(0.158289533163)*x[0]+(-0.149454925108)*x[1]+(-0.59348598427)*x[2]
-        arg[4,0,0]=(-1.13101661269)*x[0]+(-0.694062133171)*x[1]+(0.00925221725394)*x[2]
-        arg[4,0,1]=(-0.977317473287)*x[0]+(-0.121712752812)*x[1]+(-0.480470720169)*x[2]
-        arg[4,1,0]=(1.14884269473)*x[0]+(-0.204958154665)*x[1]+(1.24328207187)*x[2]
-        arg[4,1,1]=(0.0791969146134)*x[0]+(0.589873409499)*x[1]+(1.90521993698)*x[2]
-        arg[5,0,0]=(1.75625788908)*x[0]+(0.0134922175773)*x[1]+(-0.699884009939)*x[2]
-        arg[5,0,1]=(-0.73456900252)*x[0]+(0.923248295457)*x[1]+(1.05161845199)*x[2]
-        arg[5,1,0]=(-0.0335528775888)*x[0]+(0.728742831853)*x[1]+(-0.5212350627)*x[2]
-        arg[5,1,1]=(0.556540394981)*x[0]+(-0.128428520433)*x[1]+(1.06358498081)*x[2]
-        ref[0,0,0]=(-0.640205798541)*x_ref[0]+(0.271670719935)*x_ref[1]+(-0.163000598261)*x_ref[2]
-        ref[0,0,1]=(0.735605297981)*x_ref[0]+(-1.05892412676)*x_ref[1]+(-1.1083007441)*x_ref[2]
-        ref[0,1,0]=(0.0349869408333)*x_ref[0]+(0.699147831788)*x_ref[1]+(-0.454390826725)*x_ref[2]
-        ref[0,1,1]=(-0.703957679243)*x_ref[0]+(-1.63654420176)*x_ref[1]+(-1.13045075795)*x_ref[2]
-        ref[1,0,0]=(1.01167296102)*x_ref[0]+(-0.362443738659)*x_ref[1]+(-0.0481138040854)*x_ref[2]
-        ref[1,0,1]=(0.110033706339)*x_ref[0]+(1.47809236549)*x_ref[1]+(0.240737599484)*x_ref[2]
-        ref[1,1,0]=(-0.0429437939148)*x_ref[0]+(-1.16945967196)*x_ref[1]+(0.924577053186)*x_ref[2]
-        ref[1,1,1]=(-1.57856509244)*x_ref[0]+(-0.460441809594)*x_ref[1]+(-0.792590928973)*x_ref[2]
-        ref[2,0,0]=(-1.93020920065)*x_ref[0]+(0.391612451745)*x_ref[1]+(-0.0130238634938)*x_ref[2]
-        ref[2,0,1]=(0.0678908982414)*x_ref[0]+(-0.929813889361)*x_ref[1]+(0.727462587818)*x_ref[2]
-        ref[2,1,0]=(-0.297494494419)*x_ref[0]+(0.167234033247)*x_ref[1]+(-1.01372084798)*x_ref[2]
-        ref[2,1,1]=(-0.608810623174)*x_ref[0]+(1.04629900384)*x_ref[1]+(1.09464953456)*x_ref[2]
-        ref[3,0,0]=(1.2996449893)*x_ref[0]+(-0.458197425323)*x_ref[1]+(1.31523663461)*x_ref[2]
-        ref[3,0,1]=(-0.848124038387)*x_ref[0]+(0.0136487458675)*x_ref[1]+(1.13573336016)*x_ref[2]
-        ref[3,1,0]=(0.377245000633)*x_ref[0]+(-0.766336675857)*x_ref[1]+(0.380031677083)*x_ref[2]
-        ref[3,1,1]=(0.158289533163)*x_ref[0]+(-0.149454925108)*x_ref[1]+(-0.59348598427)*x_ref[2]
-        ref[4,0,0]=(-1.13101661269)*x_ref[0]+(-0.694062133171)*x_ref[1]+(0.00925221725394)*x_ref[2]
-        ref[4,0,1]=(-0.977317473287)*x_ref[0]+(-0.121712752812)*x_ref[1]+(-0.480470720169)*x_ref[2]
-        ref[4,1,0]=(1.14884269473)*x_ref[0]+(-0.204958154665)*x_ref[1]+(1.24328207187)*x_ref[2]
-        ref[4,1,1]=(0.0791969146134)*x_ref[0]+(0.589873409499)*x_ref[1]+(1.90521993698)*x_ref[2]
-        ref[5,0,0]=(1.75625788908)*x_ref[0]+(0.0134922175773)*x_ref[1]+(-0.699884009939)*x_ref[2]
-        ref[5,0,1]=(-0.73456900252)*x_ref[0]+(0.923248295457)*x_ref[1]+(1.05161845199)*x_ref[2]
-        ref[5,1,0]=(-0.0335528775888)*x_ref[0]+(0.728742831853)*x_ref[1]+(-0.5212350627)*x_ref[2]
-        ref[5,1,1]=(0.556540394981)*x_ref[0]+(-0.128428520433)*x_ref[1]+(1.06358498081)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.507324804235)*x[0]+(0.725831700089)*x[1]
-        arg[0,0,0,1]=(0.847901454936)*x[0]+(0.84787024099)*x[1]
-        arg[0,0,1,0]=(0.221488465784)*x[0]+(0.0449286988708)*x[1]
-        arg[0,0,1,1]=(0.00897176578501)*x[0]+(-0.799118487206)*x[1]
-        arg[0,0,2,0]=(0.171491682599)*x[0]+(1.0259065872)*x[1]
-        arg[0,0,2,1]=(-0.213244683798)*x[0]+(-0.706816385516)*x[1]
-        arg[0,1,0,0]=(1.54199875186)*x[0]+(-1.09479402082)*x[1]
-        arg[0,1,0,1]=(-0.755278051349)*x[0]+(-0.371785089226)*x[1]
-        arg[0,1,1,0]=(-0.798931370137)*x[0]+(-0.716047155117)*x[1]
-        arg[0,1,1,1]=(-0.79104072521)*x[0]+(-1.45842710768)*x[1]
-        arg[0,1,2,0]=(-0.489161301965)*x[0]+(0.115368605994)*x[1]
-        arg[0,1,2,1]=(0.00167228618616)*x[0]+(-0.636896504873)*x[1]
-        arg[0,2,0,0]=(-0.239182729045)*x[0]+(0.470786327067)*x[1]
-        arg[0,2,0,1]=(0.182105943188)*x[0]+(0.328443662342)*x[1]
-        arg[0,2,1,0]=(0.000476540430199)*x[0]+(-0.498066512126)*x[1]
-        arg[0,2,1,1]=(-0.822985659305)*x[0]+(-0.118645880185)*x[1]
-        arg[0,2,2,0]=(1.18375382554)*x[0]+(1.51417307474)*x[1]
-        arg[0,2,2,1]=(-0.99755868797)*x[0]+(-1.4187068658)*x[1]
-        arg[0,3,0,0]=(-0.0908782314954)*x[0]+(-0.25901340471)*x[1]
-        arg[0,3,0,1]=(-1.77626335863)*x[0]+(-0.862132832663)*x[1]
-        arg[0,3,1,0]=(0.532147327491)*x[0]+(0.454949026506)*x[1]
-        arg[0,3,1,1]=(-0.882307958628)*x[0]+(0.00780544746858)*x[1]
-        arg[0,3,2,0]=(0.700104420574)*x[0]+(0.720508036709)*x[1]
-        arg[0,3,2,1]=(-1.27167118811)*x[0]+(-0.372999410908)*x[1]
-        arg[0,4,0,0]=(0.396222903345)*x[0]+(1.70664799562)*x[1]
-        arg[0,4,0,1]=(0.229159055372)*x[0]+(0.0162677758439)*x[1]
-        arg[0,4,1,0]=(1.69470499818)*x[0]+(0.0971804891468)*x[1]
-        arg[0,4,1,1]=(0.180710573838)*x[0]+(1.05311557127)*x[1]
-        arg[0,4,2,0]=(-0.072661496917)*x[0]+(0.466256643644)*x[1]
-        arg[0,4,2,1]=(0.25755631084)*x[0]+(0.306990925808)*x[1]
-        arg[1,0,0,0]=(0.835353191317)*x[0]+(-0.619237060145)*x[1]
-        arg[1,0,0,1]=(1.02966866371)*x[0]+(0.327724003031)*x[1]
-        arg[1,0,1,0]=(-0.59214788986)*x[0]+(-0.927738485428)*x[1]
-        arg[1,0,1,1]=(-0.805929278446)*x[0]+(-0.366113927406)*x[1]
-        arg[1,0,2,0]=(0.952876155721)*x[0]+(0.490531201467)*x[1]
-        arg[1,0,2,1]=(1.44341651657)*x[0]+(-0.269899260772)*x[1]
-        arg[1,1,0,0]=(0.302587966785)*x[0]+(-0.0373883991695)*x[1]
-        arg[1,1,0,1]=(0.77498995648)*x[0]+(1.81052574555)*x[1]
-        arg[1,1,1,0]=(1.47950560134)*x[0]+(-0.714878219566)*x[1]
-        arg[1,1,1,1]=(0.0713827629606)*x[0]+(-1.22018291576)*x[1]
-        arg[1,1,2,0]=(1.30715631604)*x[0]+(-0.191666253513)*x[1]
-        arg[1,1,2,1]=(0.330921962628)*x[0]+(-1.57160261912)*x[1]
-        arg[1,2,0,0]=(0.593477126597)*x[0]+(0.728196634765)*x[1]
-        arg[1,2,0,1]=(0.853860342143)*x[0]+(0.142625101433)*x[1]
-        arg[1,2,1,0]=(-0.743590115343)*x[0]+(0.108893736366)*x[1]
-        arg[1,2,1,1]=(-0.651514863459)*x[0]+(0.365517180762)*x[1]
-        arg[1,2,2,0]=(1.491516719)*x[0]+(0.28900806658)*x[1]
-        arg[1,2,2,1]=(1.23733736339)*x[0]+(-0.58438294882)*x[1]
-        arg[1,3,0,0]=(0.185696018505)*x[0]+(-1.29119084907)*x[1]
-        arg[1,3,0,1]=(1.73584656085)*x[0]+(0.720989518003)*x[1]
-        arg[1,3,1,0]=(-1.16044192371)*x[0]+(-0.131128994204)*x[1]
-        arg[1,3,1,1]=(-0.00913995119508)*x[0]+(0.506516682557)*x[1]
-        arg[1,3,2,0]=(-1.4970171408)*x[0]+(0.692262679219)*x[1]
-        arg[1,3,2,1]=(0.433442352395)*x[0]+(-0.118782513258)*x[1]
-        arg[1,4,0,0]=(0.186272280804)*x[0]+(-0.136627137097)*x[1]
-        arg[1,4,0,1]=(1.25477168515)*x[0]+(-0.0871831369474)*x[1]
-        arg[1,4,1,0]=(1.22746022677)*x[0]+(0.799329883559)*x[1]
-        arg[1,4,1,1]=(-0.756298280123)*x[0]+(0.317500967634)*x[1]
-        arg[1,4,2,0]=(0.201184703435)*x[0]+(-0.116537935236)*x[1]
-        arg[1,4,2,1]=(0.851291897607)*x[0]+(0.404063606516)*x[1]
-        arg[2,0,0,0]=(-0.257605370026)*x[0]+(-0.202424701671)*x[1]
-        arg[2,0,0,1]=(0.0219332720675)*x[0]+(0.518222103227)*x[1]
-        arg[2,0,1,0]=(1.03726036144)*x[0]+(-1.01482867596)*x[1]
-        arg[2,0,1,1]=(0.00677025785109)*x[0]+(0.607932484906)*x[1]
-        arg[2,0,2,0]=(-0.753000974637)*x[0]+(0.112884693676)*x[1]
-        arg[2,0,2,1]=(-0.585627190582)*x[0]+(0.548136242722)*x[1]
-        arg[2,1,0,0]=(0.382466685883)*x[0]+(-1.15520454298)*x[1]
-        arg[2,1,0,1]=(-0.722705123323)*x[0]+(-0.599069291154)*x[1]
-        arg[2,1,1,0]=(-0.845885208256)*x[0]+(-1.56066350212)*x[1]
-        arg[2,1,1,1]=(-1.31472469553)*x[0]+(0.18973548452)*x[1]
-        arg[2,1,2,0]=(-0.419142599733)*x[0]+(1.43873372527)*x[1]
-        arg[2,1,2,1]=(0.22685530286)*x[0]+(-0.53636714393)*x[1]
-        arg[2,2,0,0]=(1.32884214935)*x[0]+(-0.377575726395)*x[1]
-        arg[2,2,0,1]=(0.0845542736847)*x[0]+(0.0888339000429)*x[1]
-        arg[2,2,1,0]=(-1.05813285521)*x[0]+(-0.980382395463)*x[1]
-        arg[2,2,1,1]=(0.306785463268)*x[0]+(0.622558337967)*x[1]
-        arg[2,2,2,0]=(-0.765475308614)*x[0]+(1.40320055807)*x[1]
-        arg[2,2,2,1]=(-1.23199081441)*x[0]+(0.245517841221)*x[1]
-        arg[2,3,0,0]=(0.655775411743)*x[0]+(-1.09496249546)*x[1]
-        arg[2,3,0,1]=(-1.57906394006)*x[0]+(-0.223321547826)*x[1]
-        arg[2,3,1,0]=(-0.329934697034)*x[0]+(-1.36492062074)*x[1]
-        arg[2,3,1,1]=(1.2584701256)*x[0]+(0.172958559745)*x[1]
-        arg[2,3,2,0]=(0.265769150885)*x[0]+(-0.273148332255)*x[1]
-        arg[2,3,2,1]=(-1.18294356647)*x[0]+(-0.269813147795)*x[1]
-        arg[2,4,0,0]=(-1.80352122024)*x[0]+(-0.417693287507)*x[1]
-        arg[2,4,0,1]=(0.829979623343)*x[0]+(0.0526239642579)*x[1]
-        arg[2,4,1,0]=(0.967999103063)*x[0]+(0.0184170526665)*x[1]
-        arg[2,4,1,1]=(-0.326938715134)*x[0]+(-0.575040647639)*x[1]
-        arg[2,4,2,0]=(1.44727400099)*x[0]+(0.710269500685)*x[1]
-        arg[2,4,2,1]=(-0.248166665809)*x[0]+(0.247820501661)*x[1]
-        arg[3,0,0,0]=(0.0463415093786)*x[0]+(0.650085996364)*x[1]
-        arg[3,0,0,1]=(-0.440939509697)*x[0]+(-0.323307669473)*x[1]
-        arg[3,0,1,0]=(0.273356160699)*x[0]+(-0.66721600197)*x[1]
-        arg[3,0,1,1]=(1.29465477714)*x[0]+(-0.37486215111)*x[1]
-        arg[3,0,2,0]=(-0.809896216106)*x[0]+(-1.51076103892)*x[1]
-        arg[3,0,2,1]=(0.686428827303)*x[0]+(-0.538164742287)*x[1]
-        arg[3,1,0,0]=(-0.863651610678)*x[0]+(0.673803453645)*x[1]
-        arg[3,1,0,1]=(0.526827519816)*x[0]+(-0.0379595314201)*x[1]
-        arg[3,1,1,0]=(-1.04759557033)*x[0]+(0.114198098457)*x[1]
-        arg[3,1,1,1]=(0.552205171704)*x[0]+(0.116364312378)*x[1]
-        arg[3,1,2,0]=(-0.926549911354)*x[0]+(0.296927704155)*x[1]
-        arg[3,1,2,1]=(0.46702104365)*x[0]+(0.355015968814)*x[1]
-        arg[3,2,0,0]=(0.603177046544)*x[0]+(-0.600600764625)*x[1]
-        arg[3,2,0,1]=(0.656827398088)*x[0]+(1.19922812106)*x[1]
-        arg[3,2,1,0]=(-0.0185352951675)*x[0]+(-0.575006610999)*x[1]
-        arg[3,2,1,1]=(0.954361462974)*x[0]+(-0.239751892125)*x[1]
-        arg[3,2,2,0]=(0.880568376655)*x[0]+(1.46879509876)*x[1]
-        arg[3,2,2,1]=(-1.19051913627)*x[0]+(-0.0387119361514)*x[1]
-        arg[3,3,0,0]=(1.19520855834)*x[0]+(1.3515728248)*x[1]
-        arg[3,3,0,1]=(0.695487159903)*x[0]+(0.783460154378)*x[1]
-        arg[3,3,1,0]=(0.482352542106)*x[0]+(-1.321707654)*x[1]
-        arg[3,3,1,1]=(0.0637384915311)*x[0]+(-0.5903067787)*x[1]
-        arg[3,3,2,0]=(0.571974795979)*x[0]+(1.33251727342)*x[1]
-        arg[3,3,2,1]=(0.579723470137)*x[0]+(-0.260885275522)*x[1]
-        arg[3,4,0,0]=(0.0717612359082)*x[0]+(-0.576982745638)*x[1]
-        arg[3,4,0,1]=(-0.227660227523)*x[0]+(0.232974094548)*x[1]
-        arg[3,4,1,0]=(0.767797269581)*x[0]+(0.98857043831)*x[1]
-        arg[3,4,1,1]=(0.31200408415)*x[0]+(-0.8317658048)*x[1]
-        arg[3,4,2,0]=(0.381688388928)*x[0]+(-0.335620162467)*x[1]
-        arg[3,4,2,1]=(0.781228510591)*x[0]+(0.960966953643)*x[1]
-        ref[0,0,0,0]=(0.507324804235)*x_ref[0]+(0.725831700089)*x_ref[1]
-        ref[0,0,0,1]=(0.847901454936)*x_ref[0]+(0.84787024099)*x_ref[1]
-        ref[0,0,1,0]=(0.221488465784)*x_ref[0]+(0.0449286988708)*x_ref[1]
-        ref[0,0,1,1]=(0.00897176578501)*x_ref[0]+(-0.799118487206)*x_ref[1]
-        ref[0,0,2,0]=(0.171491682599)*x_ref[0]+(1.0259065872)*x_ref[1]
-        ref[0,0,2,1]=(-0.213244683798)*x_ref[0]+(-0.706816385516)*x_ref[1]
-        ref[0,1,0,0]=(1.54199875186)*x_ref[0]+(-1.09479402082)*x_ref[1]
-        ref[0,1,0,1]=(-0.755278051349)*x_ref[0]+(-0.371785089226)*x_ref[1]
-        ref[0,1,1,0]=(-0.798931370137)*x_ref[0]+(-0.716047155117)*x_ref[1]
-        ref[0,1,1,1]=(-0.79104072521)*x_ref[0]+(-1.45842710768)*x_ref[1]
-        ref[0,1,2,0]=(-0.489161301965)*x_ref[0]+(0.115368605994)*x_ref[1]
-        ref[0,1,2,1]=(0.00167228618616)*x_ref[0]+(-0.636896504873)*x_ref[1]
-        ref[0,2,0,0]=(-0.239182729045)*x_ref[0]+(0.470786327067)*x_ref[1]
-        ref[0,2,0,1]=(0.182105943188)*x_ref[0]+(0.328443662342)*x_ref[1]
-        ref[0,2,1,0]=(0.000476540430199)*x_ref[0]+(-0.498066512126)*x_ref[1]
-        ref[0,2,1,1]=(-0.822985659305)*x_ref[0]+(-0.118645880185)*x_ref[1]
-        ref[0,2,2,0]=(1.18375382554)*x_ref[0]+(1.51417307474)*x_ref[1]
-        ref[0,2,2,1]=(-0.99755868797)*x_ref[0]+(-1.4187068658)*x_ref[1]
-        ref[0,3,0,0]=(-0.0908782314954)*x_ref[0]+(-0.25901340471)*x_ref[1]
-        ref[0,3,0,1]=(-1.77626335863)*x_ref[0]+(-0.862132832663)*x_ref[1]
-        ref[0,3,1,0]=(0.532147327491)*x_ref[0]+(0.454949026506)*x_ref[1]
-        ref[0,3,1,1]=(-0.882307958628)*x_ref[0]+(0.00780544746858)*x_ref[1]
-        ref[0,3,2,0]=(0.700104420574)*x_ref[0]+(0.720508036709)*x_ref[1]
-        ref[0,3,2,1]=(-1.27167118811)*x_ref[0]+(-0.372999410908)*x_ref[1]
-        ref[0,4,0,0]=(0.396222903345)*x_ref[0]+(1.70664799562)*x_ref[1]
-        ref[0,4,0,1]=(0.229159055372)*x_ref[0]+(0.0162677758439)*x_ref[1]
-        ref[0,4,1,0]=(1.69470499818)*x_ref[0]+(0.0971804891468)*x_ref[1]
-        ref[0,4,1,1]=(0.180710573838)*x_ref[0]+(1.05311557127)*x_ref[1]
-        ref[0,4,2,0]=(-0.072661496917)*x_ref[0]+(0.466256643644)*x_ref[1]
-        ref[0,4,2,1]=(0.25755631084)*x_ref[0]+(0.306990925808)*x_ref[1]
-        ref[1,0,0,0]=(0.835353191317)*x_ref[0]+(-0.619237060145)*x_ref[1]
-        ref[1,0,0,1]=(1.02966866371)*x_ref[0]+(0.327724003031)*x_ref[1]
-        ref[1,0,1,0]=(-0.59214788986)*x_ref[0]+(-0.927738485428)*x_ref[1]
-        ref[1,0,1,1]=(-0.805929278446)*x_ref[0]+(-0.366113927406)*x_ref[1]
-        ref[1,0,2,0]=(0.952876155721)*x_ref[0]+(0.490531201467)*x_ref[1]
-        ref[1,0,2,1]=(1.44341651657)*x_ref[0]+(-0.269899260772)*x_ref[1]
-        ref[1,1,0,0]=(0.302587966785)*x_ref[0]+(-0.0373883991695)*x_ref[1]
-        ref[1,1,0,1]=(0.77498995648)*x_ref[0]+(1.81052574555)*x_ref[1]
-        ref[1,1,1,0]=(1.47950560134)*x_ref[0]+(-0.714878219566)*x_ref[1]
-        ref[1,1,1,1]=(0.0713827629606)*x_ref[0]+(-1.22018291576)*x_ref[1]
-        ref[1,1,2,0]=(1.30715631604)*x_ref[0]+(-0.191666253513)*x_ref[1]
-        ref[1,1,2,1]=(0.330921962628)*x_ref[0]+(-1.57160261912)*x_ref[1]
-        ref[1,2,0,0]=(0.593477126597)*x_ref[0]+(0.728196634765)*x_ref[1]
-        ref[1,2,0,1]=(0.853860342143)*x_ref[0]+(0.142625101433)*x_ref[1]
-        ref[1,2,1,0]=(-0.743590115343)*x_ref[0]+(0.108893736366)*x_ref[1]
-        ref[1,2,1,1]=(-0.651514863459)*x_ref[0]+(0.365517180762)*x_ref[1]
-        ref[1,2,2,0]=(1.491516719)*x_ref[0]+(0.28900806658)*x_ref[1]
-        ref[1,2,2,1]=(1.23733736339)*x_ref[0]+(-0.58438294882)*x_ref[1]
-        ref[1,3,0,0]=(0.185696018505)*x_ref[0]+(-1.29119084907)*x_ref[1]
-        ref[1,3,0,1]=(1.73584656085)*x_ref[0]+(0.720989518003)*x_ref[1]
-        ref[1,3,1,0]=(-1.16044192371)*x_ref[0]+(-0.131128994204)*x_ref[1]
-        ref[1,3,1,1]=(-0.00913995119508)*x_ref[0]+(0.506516682557)*x_ref[1]
-        ref[1,3,2,0]=(-1.4970171408)*x_ref[0]+(0.692262679219)*x_ref[1]
-        ref[1,3,2,1]=(0.433442352395)*x_ref[0]+(-0.118782513258)*x_ref[1]
-        ref[1,4,0,0]=(0.186272280804)*x_ref[0]+(-0.136627137097)*x_ref[1]
-        ref[1,4,0,1]=(1.25477168515)*x_ref[0]+(-0.0871831369474)*x_ref[1]
-        ref[1,4,1,0]=(1.22746022677)*x_ref[0]+(0.799329883559)*x_ref[1]
-        ref[1,4,1,1]=(-0.756298280123)*x_ref[0]+(0.317500967634)*x_ref[1]
-        ref[1,4,2,0]=(0.201184703435)*x_ref[0]+(-0.116537935236)*x_ref[1]
-        ref[1,4,2,1]=(0.851291897607)*x_ref[0]+(0.404063606516)*x_ref[1]
-        ref[2,0,0,0]=(-0.257605370026)*x_ref[0]+(-0.202424701671)*x_ref[1]
-        ref[2,0,0,1]=(0.0219332720675)*x_ref[0]+(0.518222103227)*x_ref[1]
-        ref[2,0,1,0]=(1.03726036144)*x_ref[0]+(-1.01482867596)*x_ref[1]
-        ref[2,0,1,1]=(0.00677025785109)*x_ref[0]+(0.607932484906)*x_ref[1]
-        ref[2,0,2,0]=(-0.753000974637)*x_ref[0]+(0.112884693676)*x_ref[1]
-        ref[2,0,2,1]=(-0.585627190582)*x_ref[0]+(0.548136242722)*x_ref[1]
-        ref[2,1,0,0]=(0.382466685883)*x_ref[0]+(-1.15520454298)*x_ref[1]
-        ref[2,1,0,1]=(-0.722705123323)*x_ref[0]+(-0.599069291154)*x_ref[1]
-        ref[2,1,1,0]=(-0.845885208256)*x_ref[0]+(-1.56066350212)*x_ref[1]
-        ref[2,1,1,1]=(-1.31472469553)*x_ref[0]+(0.18973548452)*x_ref[1]
-        ref[2,1,2,0]=(-0.419142599733)*x_ref[0]+(1.43873372527)*x_ref[1]
-        ref[2,1,2,1]=(0.22685530286)*x_ref[0]+(-0.53636714393)*x_ref[1]
-        ref[2,2,0,0]=(1.32884214935)*x_ref[0]+(-0.377575726395)*x_ref[1]
-        ref[2,2,0,1]=(0.0845542736847)*x_ref[0]+(0.0888339000429)*x_ref[1]
-        ref[2,2,1,0]=(-1.05813285521)*x_ref[0]+(-0.980382395463)*x_ref[1]
-        ref[2,2,1,1]=(0.306785463268)*x_ref[0]+(0.622558337967)*x_ref[1]
-        ref[2,2,2,0]=(-0.765475308614)*x_ref[0]+(1.40320055807)*x_ref[1]
-        ref[2,2,2,1]=(-1.23199081441)*x_ref[0]+(0.245517841221)*x_ref[1]
-        ref[2,3,0,0]=(0.655775411743)*x_ref[0]+(-1.09496249546)*x_ref[1]
-        ref[2,3,0,1]=(-1.57906394006)*x_ref[0]+(-0.223321547826)*x_ref[1]
-        ref[2,3,1,0]=(-0.329934697034)*x_ref[0]+(-1.36492062074)*x_ref[1]
-        ref[2,3,1,1]=(1.2584701256)*x_ref[0]+(0.172958559745)*x_ref[1]
-        ref[2,3,2,0]=(0.265769150885)*x_ref[0]+(-0.273148332255)*x_ref[1]
-        ref[2,3,2,1]=(-1.18294356647)*x_ref[0]+(-0.269813147795)*x_ref[1]
-        ref[2,4,0,0]=(-1.80352122024)*x_ref[0]+(-0.417693287507)*x_ref[1]
-        ref[2,4,0,1]=(0.829979623343)*x_ref[0]+(0.0526239642579)*x_ref[1]
-        ref[2,4,1,0]=(0.967999103063)*x_ref[0]+(0.0184170526665)*x_ref[1]
-        ref[2,4,1,1]=(-0.326938715134)*x_ref[0]+(-0.575040647639)*x_ref[1]
-        ref[2,4,2,0]=(1.44727400099)*x_ref[0]+(0.710269500685)*x_ref[1]
-        ref[2,4,2,1]=(-0.248166665809)*x_ref[0]+(0.247820501661)*x_ref[1]
-        ref[3,0,0,0]=(0.0463415093786)*x_ref[0]+(0.650085996364)*x_ref[1]
-        ref[3,0,0,1]=(-0.440939509697)*x_ref[0]+(-0.323307669473)*x_ref[1]
-        ref[3,0,1,0]=(0.273356160699)*x_ref[0]+(-0.66721600197)*x_ref[1]
-        ref[3,0,1,1]=(1.29465477714)*x_ref[0]+(-0.37486215111)*x_ref[1]
-        ref[3,0,2,0]=(-0.809896216106)*x_ref[0]+(-1.51076103892)*x_ref[1]
-        ref[3,0,2,1]=(0.686428827303)*x_ref[0]+(-0.538164742287)*x_ref[1]
-        ref[3,1,0,0]=(-0.863651610678)*x_ref[0]+(0.673803453645)*x_ref[1]
-        ref[3,1,0,1]=(0.526827519816)*x_ref[0]+(-0.0379595314201)*x_ref[1]
-        ref[3,1,1,0]=(-1.04759557033)*x_ref[0]+(0.114198098457)*x_ref[1]
-        ref[3,1,1,1]=(0.552205171704)*x_ref[0]+(0.116364312378)*x_ref[1]
-        ref[3,1,2,0]=(-0.926549911354)*x_ref[0]+(0.296927704155)*x_ref[1]
-        ref[3,1,2,1]=(0.46702104365)*x_ref[0]+(0.355015968814)*x_ref[1]
-        ref[3,2,0,0]=(0.603177046544)*x_ref[0]+(-0.600600764625)*x_ref[1]
-        ref[3,2,0,1]=(0.656827398088)*x_ref[0]+(1.19922812106)*x_ref[1]
-        ref[3,2,1,0]=(-0.0185352951675)*x_ref[0]+(-0.575006610999)*x_ref[1]
-        ref[3,2,1,1]=(0.954361462974)*x_ref[0]+(-0.239751892125)*x_ref[1]
-        ref[3,2,2,0]=(0.880568376655)*x_ref[0]+(1.46879509876)*x_ref[1]
-        ref[3,2,2,1]=(-1.19051913627)*x_ref[0]+(-0.0387119361514)*x_ref[1]
-        ref[3,3,0,0]=(1.19520855834)*x_ref[0]+(1.3515728248)*x_ref[1]
-        ref[3,3,0,1]=(0.695487159903)*x_ref[0]+(0.783460154378)*x_ref[1]
-        ref[3,3,1,0]=(0.482352542106)*x_ref[0]+(-1.321707654)*x_ref[1]
-        ref[3,3,1,1]=(0.0637384915311)*x_ref[0]+(-0.5903067787)*x_ref[1]
-        ref[3,3,2,0]=(0.571974795979)*x_ref[0]+(1.33251727342)*x_ref[1]
-        ref[3,3,2,1]=(0.579723470137)*x_ref[0]+(-0.260885275522)*x_ref[1]
-        ref[3,4,0,0]=(0.0717612359082)*x_ref[0]+(-0.576982745638)*x_ref[1]
-        ref[3,4,0,1]=(-0.227660227523)*x_ref[0]+(0.232974094548)*x_ref[1]
-        ref[3,4,1,0]=(0.767797269581)*x_ref[0]+(0.98857043831)*x_ref[1]
-        ref[3,4,1,1]=(0.31200408415)*x_ref[0]+(-0.8317658048)*x_ref[1]
-        ref[3,4,2,0]=(0.381688388928)*x_ref[0]+(-0.335620162467)*x_ref[1]
-        ref[3,4,2,1]=(0.781228510591)*x_ref[0]+(0.960966953643)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.875410081875)*x[0]+(0.859961622438)*x[1]+(0.716805919947)*x[2]
-        arg[0,0,0,1]=(0.343337453662)*x[0]+(0.802028072985)*x[1]+(0.588370750348)*x[2]
-        arg[0,0,1,0]=(0.467615640242)*x[0]+(0.0457804028001)*x[1]+(-0.163677176662)*x[2]
-        arg[0,0,1,1]=(-0.46378923457)*x[0]+(1.29379360824)*x[1]+(0.183839231748)*x[2]
-        arg[0,0,2,0]=(1.65864647053)*x[0]+(1.23523675105)*x[1]+(-0.556155025527)*x[2]
-        arg[0,0,2,1]=(-0.41581445233)*x[0]+(-0.0709880820438)*x[1]+(0.45785589934)*x[2]
-        arg[0,1,0,0]=(1.83790068156)*x[0]+(-0.1690836925)*x[1]+(1.25356286366)*x[2]
-        arg[0,1,0,1]=(-0.22584314958)*x[0]+(0.684595424346)*x[1]+(1.13919885217)*x[2]
-        arg[0,1,1,0]=(1.02792150528)*x[0]+(-0.312817626145)*x[1]+(-0.121465758957)*x[2]
-        arg[0,1,1,1]=(0.533491564413)*x[0]+(-0.62208812136)*x[1]+(-0.717947781071)*x[2]
-        arg[0,1,2,0]=(-0.864505701555)*x[0]+(-0.296047724934)*x[1]+(-0.122917018588)*x[2]
-        arg[0,1,2,1]=(1.05520768182)*x[0]+(0.662053590424)*x[1]+(0.0251841065476)*x[2]
-        arg[0,2,0,0]=(-0.408305818721)*x[0]+(-0.355992587618)*x[1]+(-0.075231462678)*x[2]
-        arg[0,2,0,1]=(0.926563898549)*x[0]+(0.203358704647)*x[1]+(-0.365269987808)*x[2]
-        arg[0,2,1,0]=(-0.403860257745)*x[0]+(-0.0312835722524)*x[1]+(0.241379582617)*x[2]
-        arg[0,2,1,1]=(-0.287297815371)*x[0]+(-0.381813267253)*x[1]+(0.46047051318)*x[2]
-        arg[0,2,2,0]=(-0.168164506906)*x[0]+(-1.24152426841)*x[1]+(-0.629704769515)*x[2]
-        arg[0,2,2,1]=(-0.937219354291)*x[0]+(-0.736950161299)*x[1]+(0.284057170092)*x[2]
-        arg[0,3,0,0]=(-0.292205445759)*x[0]+(1.21842674086)*x[1]+(0.608979796402)*x[2]
-        arg[0,3,0,1]=(0.53232240924)*x[0]+(0.226439017439)*x[1]+(-0.42603939944)*x[2]
-        arg[0,3,1,0]=(1.67410358342)*x[0]+(-0.00813619771347)*x[1]+(-0.463361889732)*x[2]
-        arg[0,3,1,1]=(1.3991502461)*x[0]+(0.239999857694)*x[1]+(-0.369907067208)*x[2]
-        arg[0,3,2,0]=(-0.248767913403)*x[0]+(0.893584158229)*x[1]+(1.97656682548)*x[2]
-        arg[0,3,2,1]=(-0.835046144341)*x[0]+(-0.00979850832247)*x[1]+(-0.281439904932)*x[2]
-        arg[0,4,0,0]=(0.974179494371)*x[0]+(-0.0432121220464)*x[1]+(-0.475018088554)*x[2]
-        arg[0,4,0,1]=(0.245490151034)*x[0]+(-0.367572047585)*x[1]+(-0.926123425123)*x[2]
-        arg[0,4,1,0]=(-0.239057491277)*x[0]+(0.339734302574)*x[1]+(0.760546363123)*x[2]
-        arg[0,4,1,1]=(-1.0425426898)*x[0]+(0.774210702874)*x[1]+(-1.15990543484)*x[2]
-        arg[0,4,2,0]=(1.02994063274)*x[0]+(1.69313195574)*x[1]+(-1.02468862318)*x[2]
-        arg[0,4,2,1]=(0.221805673731)*x[0]+(-1.06588014758)*x[1]+(-0.546973870537)*x[2]
-        arg[1,0,0,0]=(-0.140765393552)*x[0]+(-0.309057115268)*x[1]+(0.07814948965)*x[2]
-        arg[1,0,0,1]=(-0.29622101259)*x[0]+(-1.0654452087)*x[1]+(1.77500323701)*x[2]
-        arg[1,0,1,0]=(1.13202947738)*x[0]+(-0.515454892388)*x[1]+(-1.34230346013)*x[2]
-        arg[1,0,1,1]=(1.50210238409)*x[0]+(-0.75673088573)*x[1]+(-0.792078632258)*x[2]
-        arg[1,0,2,0]=(0.249111383954)*x[0]+(-0.972418007776)*x[1]+(0.766060429469)*x[2]
-        arg[1,0,2,1]=(-0.0710717292409)*x[0]+(0.164949706666)*x[1]+(1.46045331387)*x[2]
-        arg[1,1,0,0]=(-0.587668209291)*x[0]+(0.303249169818)*x[1]+(0.352197808782)*x[2]
-        arg[1,1,0,1]=(-0.145609904248)*x[0]+(0.91895760024)*x[1]+(-1.25063091478)*x[2]
-        arg[1,1,1,0]=(0.450869946651)*x[0]+(0.752704827905)*x[1]+(0.132042943533)*x[2]
-        arg[1,1,1,1]=(-0.87296460294)*x[0]+(-0.459840609019)*x[1]+(0.422574948491)*x[2]
-        arg[1,1,2,0]=(0.828459269131)*x[0]+(0.45869153936)*x[1]+(0.854640684176)*x[2]
-        arg[1,1,2,1]=(1.84720399473)*x[0]+(0.0416642546234)*x[1]+(-0.309583524852)*x[2]
-        arg[1,2,0,0]=(-1.12563293246)*x[0]+(0.0142184473972)*x[1]+(-1.18150362584)*x[2]
-        arg[1,2,0,1]=(-0.0750965768147)*x[0]+(-0.419276687751)*x[1]+(0.521012213863)*x[2]
-        arg[1,2,1,0]=(-1.06905807284)*x[0]+(0.692258030743)*x[1]+(0.262254909068)*x[2]
-        arg[1,2,1,1]=(0.0552441016888)*x[0]+(-0.131040560322)*x[1]+(-0.321517725963)*x[2]
-        arg[1,2,2,0]=(-0.740410514693)*x[0]+(0.219020143899)*x[1]+(1.35104682965)*x[2]
-        arg[1,2,2,1]=(-1.38198583939)*x[0]+(-0.19342887842)*x[1]+(-0.780008129494)*x[2]
-        arg[1,3,0,0]=(0.378358305605)*x[0]+(1.32138618734)*x[1]+(0.627209784997)*x[2]
-        arg[1,3,0,1]=(-0.0383657917537)*x[0]+(-1.41770189628)*x[1]+(-1.21625280681)*x[2]
-        arg[1,3,1,0]=(0.819666413875)*x[0]+(0.160369878383)*x[1]+(-0.229388558682)*x[2]
-        arg[1,3,1,1]=(0.393409555876)*x[0]+(-0.525985341296)*x[1]+(-1.11892438309)*x[2]
-        arg[1,3,2,0]=(0.145077010777)*x[0]+(0.229800008438)*x[1]+(-0.202652862622)*x[2]
-        arg[1,3,2,1]=(-1.48698378177)*x[0]+(0.553698672636)*x[1]+(-0.427263736796)*x[2]
-        arg[1,4,0,0]=(-0.129527725249)*x[0]+(-0.639824801211)*x[1]+(0.759081980717)*x[2]
-        arg[1,4,0,1]=(-0.117772473784)*x[0]+(0.387474104611)*x[1]+(0.507306747135)*x[2]
-        arg[1,4,1,0]=(-0.82518622198)*x[0]+(-0.754474320343)*x[1]+(-0.978049152511)*x[2]
-        arg[1,4,1,1]=(-0.370385633483)*x[0]+(-0.348429423043)*x[1]+(-0.254278257899)*x[2]
-        arg[1,4,2,0]=(1.42596167697)*x[0]+(-0.871785904514)*x[1]+(-0.5343959325)*x[2]
-        arg[1,4,2,1]=(0.817877672506)*x[0]+(-0.222622791737)*x[1]+(-0.677237468595)*x[2]
-        arg[2,0,0,0]=(0.877660484813)*x[0]+(0.818663846913)*x[1]+(-1.26520874625)*x[2]
-        arg[2,0,0,1]=(-0.822344385073)*x[0]+(-0.274691696266)*x[1]+(-0.35079248697)*x[2]
-        arg[2,0,1,0]=(-0.319040285312)*x[0]+(-0.750406131559)*x[1]+(-0.920332967032)*x[2]
-        arg[2,0,1,1]=(1.48758278445)*x[0]+(1.30587557873)*x[1]+(0.230692557888)*x[2]
-        arg[2,0,2,0]=(1.44269354043)*x[0]+(-0.63270356894)*x[1]+(0.229323632455)*x[2]
-        arg[2,0,2,1]=(-0.645065877536)*x[0]+(-0.393083499676)*x[1]+(-0.305117645453)*x[2]
-        arg[2,1,0,0]=(-0.63304134143)*x[0]+(0.0664768401917)*x[1]+(0.87587743066)*x[2]
-        arg[2,1,0,1]=(-0.531856958285)*x[0]+(0.747953146648)*x[1]+(1.23560779546)*x[2]
-        arg[2,1,1,0]=(0.0564479101025)*x[0]+(0.546307803332)*x[1]+(0.655044890368)*x[2]
-        arg[2,1,1,1]=(-1.12793057228)*x[0]+(-0.736676194013)*x[1]+(0.0375913829411)*x[2]
-        arg[2,1,2,0]=(-0.531384188067)*x[0]+(0.249416904081)*x[1]+(0.711430712986)*x[2]
-        arg[2,1,2,1]=(0.884244664065)*x[0]+(0.456066941968)*x[1]+(0.181630861785)*x[2]
-        arg[2,2,0,0]=(0.0844543345062)*x[0]+(-0.435288041256)*x[1]+(-0.434816763062)*x[2]
-        arg[2,2,0,1]=(0.373388105049)*x[0]+(0.239833846429)*x[1]+(-0.437771573282)*x[2]
-        arg[2,2,1,0]=(0.534401521907)*x[0]+(0.393077203448)*x[1]+(-0.42440387717)*x[2]
-        arg[2,2,1,1]=(0.318683369617)*x[0]+(-0.538864643793)*x[1]+(1.83466945806)*x[2]
-        arg[2,2,2,0]=(-1.79048122074)*x[0]+(-1.05441213478)*x[1]+(-0.573963806281)*x[2]
-        arg[2,2,2,1]=(0.944017405182)*x[0]+(0.772756791538)*x[1]+(0.0269673237336)*x[2]
-        arg[2,3,0,0]=(0.989703689142)*x[0]+(1.21302325945)*x[1]+(-0.92209419073)*x[2]
-        arg[2,3,0,1]=(-0.0957244757576)*x[0]+(1.50132638315)*x[1]+(-1.38716099756)*x[2]
-        arg[2,3,1,0]=(1.6445441776)*x[0]+(-0.490207070694)*x[1]+(0.626469347781)*x[2]
-        arg[2,3,1,1]=(0.0185568939147)*x[0]+(0.412024752941)*x[1]+(-0.22626102813)*x[2]
-        arg[2,3,2,0]=(0.0143609822966)*x[0]+(0.115739025893)*x[1]+(-0.544468631925)*x[2]
-        arg[2,3,2,1]=(-1.80522341493)*x[0]+(0.33352152695)*x[1]+(-0.841286464932)*x[2]
-        arg[2,4,0,0]=(0.0618444122042)*x[0]+(1.91232484622)*x[1]+(-0.406317200023)*x[2]
-        arg[2,4,0,1]=(0.279131062922)*x[0]+(0.0194232637634)*x[1]+(-0.00179069113634)*x[2]
-        arg[2,4,1,0]=(-0.701344579135)*x[0]+(-0.27410935473)*x[1]+(0.763362100733)*x[2]
-        arg[2,4,1,1]=(0.831198601185)*x[0]+(0.90336781771)*x[1]+(1.21856633382)*x[2]
-        arg[2,4,2,0]=(0.526278615033)*x[0]+(-1.08673855801)*x[1]+(0.0784355900913)*x[2]
-        arg[2,4,2,1]=(0.853226856851)*x[0]+(-1.15919062627)*x[1]+(0.185686031732)*x[2]
-        arg[3,0,0,0]=(0.272127498117)*x[0]+(-0.457140162438)*x[1]+(0.318358670541)*x[2]
-        arg[3,0,0,1]=(1.71056378307)*x[0]+(0.200052730234)*x[1]+(-0.127733325792)*x[2]
-        arg[3,0,1,0]=(-0.285340963261)*x[0]+(-0.524544624385)*x[1]+(0.916366474944)*x[2]
-        arg[3,0,1,1]=(-0.625506557557)*x[0]+(1.0858476479)*x[1]+(-1.24478983268)*x[2]
-        arg[3,0,2,0]=(-1.37299619916)*x[0]+(-0.482246528202)*x[1]+(-1.36857669075)*x[2]
-        arg[3,0,2,1]=(-0.924421844916)*x[0]+(-1.50402098115)*x[1]+(1.00045130673)*x[2]
-        arg[3,1,0,0]=(0.0417304700827)*x[0]+(0.554527451004)*x[1]+(0.299758163628)*x[2]
-        arg[3,1,0,1]=(0.639611639279)*x[0]+(-0.444675638162)*x[1]+(1.43150046757)*x[2]
-        arg[3,1,1,0]=(0.288697220898)*x[0]+(1.32660433773)*x[1]+(0.0889412116759)*x[2]
-        arg[3,1,1,1]=(-0.110516770201)*x[0]+(-0.0214248733565)*x[1]+(-0.758638794785)*x[2]
-        arg[3,1,2,0]=(1.34357138654)*x[0]+(-0.13759272972)*x[1]+(-0.00183845032784)*x[2]
-        arg[3,1,2,1]=(1.44174769627)*x[0]+(0.49190176388)*x[1]+(0.477331360141)*x[2]
-        arg[3,2,0,0]=(-0.10284777121)*x[0]+(-0.63294157419)*x[1]+(0.246064460451)*x[2]
-        arg[3,2,0,1]=(0.974270980699)*x[0]+(1.03835886161)*x[1]+(0.420000854838)*x[2]
-        arg[3,2,1,0]=(-0.00617831615923)*x[0]+(-0.354063634073)*x[1]+(0.764285884619)*x[2]
-        arg[3,2,1,1]=(0.210815790746)*x[0]+(0.76609515744)*x[1]+(-0.564401558401)*x[2]
-        arg[3,2,2,0]=(1.30471234011)*x[0]+(1.54864119332)*x[1]+(-0.493583650519)*x[2]
-        arg[3,2,2,1]=(0.42287513668)*x[0]+(-0.603093868171)*x[1]+(-0.811892974203)*x[2]
-        arg[3,3,0,0]=(-1.38358134693)*x[0]+(-1.53706018098)*x[1]+(-1.29701227501)*x[2]
-        arg[3,3,0,1]=(0.598581779902)*x[0]+(1.02424010922)*x[1]+(-1.1814313009)*x[2]
-        arg[3,3,1,0]=(1.30938529116)*x[0]+(-0.504468477244)*x[1]+(1.63655848854)*x[2]
-        arg[3,3,1,1]=(-1.47006424113)*x[0]+(0.225951520203)*x[1]+(-0.412273003169)*x[2]
-        arg[3,3,2,0]=(-0.116902234482)*x[0]+(0.488144536044)*x[1]+(1.01732461694)*x[2]
-        arg[3,3,2,1]=(1.0935814877)*x[0]+(1.06389385916)*x[1]+(-0.17981400591)*x[2]
-        arg[3,4,0,0]=(-0.833265062101)*x[0]+(-0.754461148648)*x[1]+(1.26702012815)*x[2]
-        arg[3,4,0,1]=(-0.793744278171)*x[0]+(0.112704521653)*x[1]+(-0.448684922187)*x[2]
-        arg[3,4,1,0]=(-0.396153523625)*x[0]+(-0.0370870723568)*x[1]+(0.554347618511)*x[2]
-        arg[3,4,1,1]=(-0.323276139711)*x[0]+(-0.397389928392)*x[1]+(-1.1707028324)*x[2]
-        arg[3,4,2,0]=(0.823350512513)*x[0]+(1.47105759864)*x[1]+(-0.977456877855)*x[2]
-        arg[3,4,2,1]=(-0.719791170741)*x[0]+(-1.00363340645)*x[1]+(0.814612770572)*x[2]
-        ref[0,0,0,0]=(-0.875410081875)*x_ref[0]+(0.859961622438)*x_ref[1]+(0.716805919947)*x_ref[2]
-        ref[0,0,0,1]=(0.343337453662)*x_ref[0]+(0.802028072985)*x_ref[1]+(0.588370750348)*x_ref[2]
-        ref[0,0,1,0]=(0.467615640242)*x_ref[0]+(0.0457804028001)*x_ref[1]+(-0.163677176662)*x_ref[2]
-        ref[0,0,1,1]=(-0.46378923457)*x_ref[0]+(1.29379360824)*x_ref[1]+(0.183839231748)*x_ref[2]
-        ref[0,0,2,0]=(1.65864647053)*x_ref[0]+(1.23523675105)*x_ref[1]+(-0.556155025527)*x_ref[2]
-        ref[0,0,2,1]=(-0.41581445233)*x_ref[0]+(-0.0709880820438)*x_ref[1]+(0.45785589934)*x_ref[2]
-        ref[0,1,0,0]=(1.83790068156)*x_ref[0]+(-0.1690836925)*x_ref[1]+(1.25356286366)*x_ref[2]
-        ref[0,1,0,1]=(-0.22584314958)*x_ref[0]+(0.684595424346)*x_ref[1]+(1.13919885217)*x_ref[2]
-        ref[0,1,1,0]=(1.02792150528)*x_ref[0]+(-0.312817626145)*x_ref[1]+(-0.121465758957)*x_ref[2]
-        ref[0,1,1,1]=(0.533491564413)*x_ref[0]+(-0.62208812136)*x_ref[1]+(-0.717947781071)*x_ref[2]
-        ref[0,1,2,0]=(-0.864505701555)*x_ref[0]+(-0.296047724934)*x_ref[1]+(-0.122917018588)*x_ref[2]
-        ref[0,1,2,1]=(1.05520768182)*x_ref[0]+(0.662053590424)*x_ref[1]+(0.0251841065476)*x_ref[2]
-        ref[0,2,0,0]=(-0.408305818721)*x_ref[0]+(-0.355992587618)*x_ref[1]+(-0.075231462678)*x_ref[2]
-        ref[0,2,0,1]=(0.926563898549)*x_ref[0]+(0.203358704647)*x_ref[1]+(-0.365269987808)*x_ref[2]
-        ref[0,2,1,0]=(-0.403860257745)*x_ref[0]+(-0.0312835722524)*x_ref[1]+(0.241379582617)*x_ref[2]
-        ref[0,2,1,1]=(-0.287297815371)*x_ref[0]+(-0.381813267253)*x_ref[1]+(0.46047051318)*x_ref[2]
-        ref[0,2,2,0]=(-0.168164506906)*x_ref[0]+(-1.24152426841)*x_ref[1]+(-0.629704769515)*x_ref[2]
-        ref[0,2,2,1]=(-0.937219354291)*x_ref[0]+(-0.736950161299)*x_ref[1]+(0.284057170092)*x_ref[2]
-        ref[0,3,0,0]=(-0.292205445759)*x_ref[0]+(1.21842674086)*x_ref[1]+(0.608979796402)*x_ref[2]
-        ref[0,3,0,1]=(0.53232240924)*x_ref[0]+(0.226439017439)*x_ref[1]+(-0.42603939944)*x_ref[2]
-        ref[0,3,1,0]=(1.67410358342)*x_ref[0]+(-0.00813619771347)*x_ref[1]+(-0.463361889732)*x_ref[2]
-        ref[0,3,1,1]=(1.3991502461)*x_ref[0]+(0.239999857694)*x_ref[1]+(-0.369907067208)*x_ref[2]
-        ref[0,3,2,0]=(-0.248767913403)*x_ref[0]+(0.893584158229)*x_ref[1]+(1.97656682548)*x_ref[2]
-        ref[0,3,2,1]=(-0.835046144341)*x_ref[0]+(-0.00979850832247)*x_ref[1]+(-0.281439904932)*x_ref[2]
-        ref[0,4,0,0]=(0.974179494371)*x_ref[0]+(-0.0432121220464)*x_ref[1]+(-0.475018088554)*x_ref[2]
-        ref[0,4,0,1]=(0.245490151034)*x_ref[0]+(-0.367572047585)*x_ref[1]+(-0.926123425123)*x_ref[2]
-        ref[0,4,1,0]=(-0.239057491277)*x_ref[0]+(0.339734302574)*x_ref[1]+(0.760546363123)*x_ref[2]
-        ref[0,4,1,1]=(-1.0425426898)*x_ref[0]+(0.774210702874)*x_ref[1]+(-1.15990543484)*x_ref[2]
-        ref[0,4,2,0]=(1.02994063274)*x_ref[0]+(1.69313195574)*x_ref[1]+(-1.02468862318)*x_ref[2]
-        ref[0,4,2,1]=(0.221805673731)*x_ref[0]+(-1.06588014758)*x_ref[1]+(-0.546973870537)*x_ref[2]
-        ref[1,0,0,0]=(-0.140765393552)*x_ref[0]+(-0.309057115268)*x_ref[1]+(0.07814948965)*x_ref[2]
-        ref[1,0,0,1]=(-0.29622101259)*x_ref[0]+(-1.0654452087)*x_ref[1]+(1.77500323701)*x_ref[2]
-        ref[1,0,1,0]=(1.13202947738)*x_ref[0]+(-0.515454892388)*x_ref[1]+(-1.34230346013)*x_ref[2]
-        ref[1,0,1,1]=(1.50210238409)*x_ref[0]+(-0.75673088573)*x_ref[1]+(-0.792078632258)*x_ref[2]
-        ref[1,0,2,0]=(0.249111383954)*x_ref[0]+(-0.972418007776)*x_ref[1]+(0.766060429469)*x_ref[2]
-        ref[1,0,2,1]=(-0.0710717292409)*x_ref[0]+(0.164949706666)*x_ref[1]+(1.46045331387)*x_ref[2]
-        ref[1,1,0,0]=(-0.587668209291)*x_ref[0]+(0.303249169818)*x_ref[1]+(0.352197808782)*x_ref[2]
-        ref[1,1,0,1]=(-0.145609904248)*x_ref[0]+(0.91895760024)*x_ref[1]+(-1.25063091478)*x_ref[2]
-        ref[1,1,1,0]=(0.450869946651)*x_ref[0]+(0.752704827905)*x_ref[1]+(0.132042943533)*x_ref[2]
-        ref[1,1,1,1]=(-0.87296460294)*x_ref[0]+(-0.459840609019)*x_ref[1]+(0.422574948491)*x_ref[2]
-        ref[1,1,2,0]=(0.828459269131)*x_ref[0]+(0.45869153936)*x_ref[1]+(0.854640684176)*x_ref[2]
-        ref[1,1,2,1]=(1.84720399473)*x_ref[0]+(0.0416642546234)*x_ref[1]+(-0.309583524852)*x_ref[2]
-        ref[1,2,0,0]=(-1.12563293246)*x_ref[0]+(0.0142184473972)*x_ref[1]+(-1.18150362584)*x_ref[2]
-        ref[1,2,0,1]=(-0.0750965768147)*x_ref[0]+(-0.419276687751)*x_ref[1]+(0.521012213863)*x_ref[2]
-        ref[1,2,1,0]=(-1.06905807284)*x_ref[0]+(0.692258030743)*x_ref[1]+(0.262254909068)*x_ref[2]
-        ref[1,2,1,1]=(0.0552441016888)*x_ref[0]+(-0.131040560322)*x_ref[1]+(-0.321517725963)*x_ref[2]
-        ref[1,2,2,0]=(-0.740410514693)*x_ref[0]+(0.219020143899)*x_ref[1]+(1.35104682965)*x_ref[2]
-        ref[1,2,2,1]=(-1.38198583939)*x_ref[0]+(-0.19342887842)*x_ref[1]+(-0.780008129494)*x_ref[2]
-        ref[1,3,0,0]=(0.378358305605)*x_ref[0]+(1.32138618734)*x_ref[1]+(0.627209784997)*x_ref[2]
-        ref[1,3,0,1]=(-0.0383657917537)*x_ref[0]+(-1.41770189628)*x_ref[1]+(-1.21625280681)*x_ref[2]
-        ref[1,3,1,0]=(0.819666413875)*x_ref[0]+(0.160369878383)*x_ref[1]+(-0.229388558682)*x_ref[2]
-        ref[1,3,1,1]=(0.393409555876)*x_ref[0]+(-0.525985341296)*x_ref[1]+(-1.11892438309)*x_ref[2]
-        ref[1,3,2,0]=(0.145077010777)*x_ref[0]+(0.229800008438)*x_ref[1]+(-0.202652862622)*x_ref[2]
-        ref[1,3,2,1]=(-1.48698378177)*x_ref[0]+(0.553698672636)*x_ref[1]+(-0.427263736796)*x_ref[2]
-        ref[1,4,0,0]=(-0.129527725249)*x_ref[0]+(-0.639824801211)*x_ref[1]+(0.759081980717)*x_ref[2]
-        ref[1,4,0,1]=(-0.117772473784)*x_ref[0]+(0.387474104611)*x_ref[1]+(0.507306747135)*x_ref[2]
-        ref[1,4,1,0]=(-0.82518622198)*x_ref[0]+(-0.754474320343)*x_ref[1]+(-0.978049152511)*x_ref[2]
-        ref[1,4,1,1]=(-0.370385633483)*x_ref[0]+(-0.348429423043)*x_ref[1]+(-0.254278257899)*x_ref[2]
-        ref[1,4,2,0]=(1.42596167697)*x_ref[0]+(-0.871785904514)*x_ref[1]+(-0.5343959325)*x_ref[2]
-        ref[1,4,2,1]=(0.817877672506)*x_ref[0]+(-0.222622791737)*x_ref[1]+(-0.677237468595)*x_ref[2]
-        ref[2,0,0,0]=(0.877660484813)*x_ref[0]+(0.818663846913)*x_ref[1]+(-1.26520874625)*x_ref[2]
-        ref[2,0,0,1]=(-0.822344385073)*x_ref[0]+(-0.274691696266)*x_ref[1]+(-0.35079248697)*x_ref[2]
-        ref[2,0,1,0]=(-0.319040285312)*x_ref[0]+(-0.750406131559)*x_ref[1]+(-0.920332967032)*x_ref[2]
-        ref[2,0,1,1]=(1.48758278445)*x_ref[0]+(1.30587557873)*x_ref[1]+(0.230692557888)*x_ref[2]
-        ref[2,0,2,0]=(1.44269354043)*x_ref[0]+(-0.63270356894)*x_ref[1]+(0.229323632455)*x_ref[2]
-        ref[2,0,2,1]=(-0.645065877536)*x_ref[0]+(-0.393083499676)*x_ref[1]+(-0.305117645453)*x_ref[2]
-        ref[2,1,0,0]=(-0.63304134143)*x_ref[0]+(0.0664768401917)*x_ref[1]+(0.87587743066)*x_ref[2]
-        ref[2,1,0,1]=(-0.531856958285)*x_ref[0]+(0.747953146648)*x_ref[1]+(1.23560779546)*x_ref[2]
-        ref[2,1,1,0]=(0.0564479101025)*x_ref[0]+(0.546307803332)*x_ref[1]+(0.655044890368)*x_ref[2]
-        ref[2,1,1,1]=(-1.12793057228)*x_ref[0]+(-0.736676194013)*x_ref[1]+(0.0375913829411)*x_ref[2]
-        ref[2,1,2,0]=(-0.531384188067)*x_ref[0]+(0.249416904081)*x_ref[1]+(0.711430712986)*x_ref[2]
-        ref[2,1,2,1]=(0.884244664065)*x_ref[0]+(0.456066941968)*x_ref[1]+(0.181630861785)*x_ref[2]
-        ref[2,2,0,0]=(0.0844543345062)*x_ref[0]+(-0.435288041256)*x_ref[1]+(-0.434816763062)*x_ref[2]
-        ref[2,2,0,1]=(0.373388105049)*x_ref[0]+(0.239833846429)*x_ref[1]+(-0.437771573282)*x_ref[2]
-        ref[2,2,1,0]=(0.534401521907)*x_ref[0]+(0.393077203448)*x_ref[1]+(-0.42440387717)*x_ref[2]
-        ref[2,2,1,1]=(0.318683369617)*x_ref[0]+(-0.538864643793)*x_ref[1]+(1.83466945806)*x_ref[2]
-        ref[2,2,2,0]=(-1.79048122074)*x_ref[0]+(-1.05441213478)*x_ref[1]+(-0.573963806281)*x_ref[2]
-        ref[2,2,2,1]=(0.944017405182)*x_ref[0]+(0.772756791538)*x_ref[1]+(0.0269673237336)*x_ref[2]
-        ref[2,3,0,0]=(0.989703689142)*x_ref[0]+(1.21302325945)*x_ref[1]+(-0.92209419073)*x_ref[2]
-        ref[2,3,0,1]=(-0.0957244757576)*x_ref[0]+(1.50132638315)*x_ref[1]+(-1.38716099756)*x_ref[2]
-        ref[2,3,1,0]=(1.6445441776)*x_ref[0]+(-0.490207070694)*x_ref[1]+(0.626469347781)*x_ref[2]
-        ref[2,3,1,1]=(0.0185568939147)*x_ref[0]+(0.412024752941)*x_ref[1]+(-0.22626102813)*x_ref[2]
-        ref[2,3,2,0]=(0.0143609822966)*x_ref[0]+(0.115739025893)*x_ref[1]+(-0.544468631925)*x_ref[2]
-        ref[2,3,2,1]=(-1.80522341493)*x_ref[0]+(0.33352152695)*x_ref[1]+(-0.841286464932)*x_ref[2]
-        ref[2,4,0,0]=(0.0618444122042)*x_ref[0]+(1.91232484622)*x_ref[1]+(-0.406317200023)*x_ref[2]
-        ref[2,4,0,1]=(0.279131062922)*x_ref[0]+(0.0194232637634)*x_ref[1]+(-0.00179069113634)*x_ref[2]
-        ref[2,4,1,0]=(-0.701344579135)*x_ref[0]+(-0.27410935473)*x_ref[1]+(0.763362100733)*x_ref[2]
-        ref[2,4,1,1]=(0.831198601185)*x_ref[0]+(0.90336781771)*x_ref[1]+(1.21856633382)*x_ref[2]
-        ref[2,4,2,0]=(0.526278615033)*x_ref[0]+(-1.08673855801)*x_ref[1]+(0.0784355900913)*x_ref[2]
-        ref[2,4,2,1]=(0.853226856851)*x_ref[0]+(-1.15919062627)*x_ref[1]+(0.185686031732)*x_ref[2]
-        ref[3,0,0,0]=(0.272127498117)*x_ref[0]+(-0.457140162438)*x_ref[1]+(0.318358670541)*x_ref[2]
-        ref[3,0,0,1]=(1.71056378307)*x_ref[0]+(0.200052730234)*x_ref[1]+(-0.127733325792)*x_ref[2]
-        ref[3,0,1,0]=(-0.285340963261)*x_ref[0]+(-0.524544624385)*x_ref[1]+(0.916366474944)*x_ref[2]
-        ref[3,0,1,1]=(-0.625506557557)*x_ref[0]+(1.0858476479)*x_ref[1]+(-1.24478983268)*x_ref[2]
-        ref[3,0,2,0]=(-1.37299619916)*x_ref[0]+(-0.482246528202)*x_ref[1]+(-1.36857669075)*x_ref[2]
-        ref[3,0,2,1]=(-0.924421844916)*x_ref[0]+(-1.50402098115)*x_ref[1]+(1.00045130673)*x_ref[2]
-        ref[3,1,0,0]=(0.0417304700827)*x_ref[0]+(0.554527451004)*x_ref[1]+(0.299758163628)*x_ref[2]
-        ref[3,1,0,1]=(0.639611639279)*x_ref[0]+(-0.444675638162)*x_ref[1]+(1.43150046757)*x_ref[2]
-        ref[3,1,1,0]=(0.288697220898)*x_ref[0]+(1.32660433773)*x_ref[1]+(0.0889412116759)*x_ref[2]
-        ref[3,1,1,1]=(-0.110516770201)*x_ref[0]+(-0.0214248733565)*x_ref[1]+(-0.758638794785)*x_ref[2]
-        ref[3,1,2,0]=(1.34357138654)*x_ref[0]+(-0.13759272972)*x_ref[1]+(-0.00183845032784)*x_ref[2]
-        ref[3,1,2,1]=(1.44174769627)*x_ref[0]+(0.49190176388)*x_ref[1]+(0.477331360141)*x_ref[2]
-        ref[3,2,0,0]=(-0.10284777121)*x_ref[0]+(-0.63294157419)*x_ref[1]+(0.246064460451)*x_ref[2]
-        ref[3,2,0,1]=(0.974270980699)*x_ref[0]+(1.03835886161)*x_ref[1]+(0.420000854838)*x_ref[2]
-        ref[3,2,1,0]=(-0.00617831615923)*x_ref[0]+(-0.354063634073)*x_ref[1]+(0.764285884619)*x_ref[2]
-        ref[3,2,1,1]=(0.210815790746)*x_ref[0]+(0.76609515744)*x_ref[1]+(-0.564401558401)*x_ref[2]
-        ref[3,2,2,0]=(1.30471234011)*x_ref[0]+(1.54864119332)*x_ref[1]+(-0.493583650519)*x_ref[2]
-        ref[3,2,2,1]=(0.42287513668)*x_ref[0]+(-0.603093868171)*x_ref[1]+(-0.811892974203)*x_ref[2]
-        ref[3,3,0,0]=(-1.38358134693)*x_ref[0]+(-1.53706018098)*x_ref[1]+(-1.29701227501)*x_ref[2]
-        ref[3,3,0,1]=(0.598581779902)*x_ref[0]+(1.02424010922)*x_ref[1]+(-1.1814313009)*x_ref[2]
-        ref[3,3,1,0]=(1.30938529116)*x_ref[0]+(-0.504468477244)*x_ref[1]+(1.63655848854)*x_ref[2]
-        ref[3,3,1,1]=(-1.47006424113)*x_ref[0]+(0.225951520203)*x_ref[1]+(-0.412273003169)*x_ref[2]
-        ref[3,3,2,0]=(-0.116902234482)*x_ref[0]+(0.488144536044)*x_ref[1]+(1.01732461694)*x_ref[2]
-        ref[3,3,2,1]=(1.0935814877)*x_ref[0]+(1.06389385916)*x_ref[1]+(-0.17981400591)*x_ref[2]
-        ref[3,4,0,0]=(-0.833265062101)*x_ref[0]+(-0.754461148648)*x_ref[1]+(1.26702012815)*x_ref[2]
-        ref[3,4,0,1]=(-0.793744278171)*x_ref[0]+(0.112704521653)*x_ref[1]+(-0.448684922187)*x_ref[2]
-        ref[3,4,1,0]=(-0.396153523625)*x_ref[0]+(-0.0370870723568)*x_ref[1]+(0.554347618511)*x_ref[2]
-        ref[3,4,1,1]=(-0.323276139711)*x_ref[0]+(-0.397389928392)*x_ref[1]+(-1.1707028324)*x_ref[2]
-        ref[3,4,2,0]=(0.823350512513)*x_ref[0]+(1.47105759864)*x_ref[1]+(-0.977456877855)*x_ref[2]
-        ref[3,4,2,1]=(-0.719791170741)*x_ref[0]+(-1.00363340645)*x_ref[1]+(0.814612770572)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0473893058941)*x[0]+(0.951986966173)*x[1]
-        ref=(0.0473893058941)*x_ref[0]+(0.951986966173)*x_ref[1]
-      else:
-        arg=(1.17583059)*x[0]+(-0.0937717081252)*x[1]+(-1.27613571861)*x[2]
-        ref=(1.17583059)*x_ref[0]+(-0.0937717081252)*x_ref[1]+(-1.27613571861)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        arg[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-        ref[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        ref[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-      else:
-        arg[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        arg[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-        ref[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        ref[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.352147407922)*x[0]+(1.05748871495)*x[1]
-        arg[0,1]=(-0.474780656205)*x[0]+(0.459896921083)*x[1]
-        arg[0,2]=(0.460595468629)*x[0]+(-0.719265552984)*x[1]
-        arg[0,3]=(-0.182481554307)*x[0]+(0.658370858696)*x[1]
-        arg[0,4]=(0.827070331069)*x[0]+(0.461652365051)*x[1]
-        arg[1,0]=(-1.04815178098)*x[0]+(-0.401056329621)*x[1]
-        arg[1,1]=(1.44973151029)*x[0]+(-0.240684558811)*x[1]
-        arg[1,2]=(1.66374138794)*x[0]+(0.77295074874)*x[1]
-        arg[1,3]=(0.367619281099)*x[0]+(1.68735398814)*x[1]
-        arg[1,4]=(-0.609166774517)*x[0]+(-0.236664892047)*x[1]
-        arg[2,0]=(0.517168891914)*x[0]+(0.14465722282)*x[1]
-        arg[2,1]=(1.44226468541)*x[0]+(0.138272882962)*x[1]
-        arg[2,2]=(1.48139408702)*x[0]+(0.858274661903)*x[1]
-        arg[2,3]=(-0.313581651419)*x[0]+(0.23082842733)*x[1]
-        arg[2,4]=(-0.174268737758)*x[0]+(-0.21537909808)*x[1]
-        arg[3,0]=(-0.228982633638)*x[0]+(0.469215862849)*x[1]
-        arg[3,1]=(1.13696568169)*x[0]+(0.937455803513)*x[1]
-        arg[3,2]=(-0.104407288228)*x[0]+(0.695766113469)*x[1]
-        arg[3,3]=(-0.854996521846)*x[0]+(-0.112176127951)*x[1]
-        arg[3,4]=(-0.995531601234)*x[0]+(0.0800402854558)*x[1]
-        ref[0,0]=(-0.352147407922)*x_ref[0]+(1.05748871495)*x_ref[1]
-        ref[0,1]=(-0.474780656205)*x_ref[0]+(0.459896921083)*x_ref[1]
-        ref[0,2]=(0.460595468629)*x_ref[0]+(-0.719265552984)*x_ref[1]
-        ref[0,3]=(-0.182481554307)*x_ref[0]+(0.658370858696)*x_ref[1]
-        ref[0,4]=(0.827070331069)*x_ref[0]+(0.461652365051)*x_ref[1]
-        ref[1,0]=(-1.04815178098)*x_ref[0]+(-0.401056329621)*x_ref[1]
-        ref[1,1]=(1.44973151029)*x_ref[0]+(-0.240684558811)*x_ref[1]
-        ref[1,2]=(1.66374138794)*x_ref[0]+(0.77295074874)*x_ref[1]
-        ref[1,3]=(0.367619281099)*x_ref[0]+(1.68735398814)*x_ref[1]
-        ref[1,4]=(-0.609166774517)*x_ref[0]+(-0.236664892047)*x_ref[1]
-        ref[2,0]=(0.517168891914)*x_ref[0]+(0.14465722282)*x_ref[1]
-        ref[2,1]=(1.44226468541)*x_ref[0]+(0.138272882962)*x_ref[1]
-        ref[2,2]=(1.48139408702)*x_ref[0]+(0.858274661903)*x_ref[1]
-        ref[2,3]=(-0.313581651419)*x_ref[0]+(0.23082842733)*x_ref[1]
-        ref[2,4]=(-0.174268737758)*x_ref[0]+(-0.21537909808)*x_ref[1]
-        ref[3,0]=(-0.228982633638)*x_ref[0]+(0.469215862849)*x_ref[1]
-        ref[3,1]=(1.13696568169)*x_ref[0]+(0.937455803513)*x_ref[1]
-        ref[3,2]=(-0.104407288228)*x_ref[0]+(0.695766113469)*x_ref[1]
-        ref[3,3]=(-0.854996521846)*x_ref[0]+(-0.112176127951)*x_ref[1]
-        ref[3,4]=(-0.995531601234)*x_ref[0]+(0.0800402854558)*x_ref[1]
-      else:
-        arg[0,0]=(-1.37643176268)*x[0]+(-0.1427781822)*x[1]+(-0.959699369061)*x[2]
-        arg[0,1]=(-0.182711571685)*x[0]+(0.961312900413)*x[1]+(1.51040175428)*x[2]
-        arg[0,2]=(0.705353375057)*x[0]+(-0.486345048698)*x[1]+(0.276322756959)*x[2]
-        arg[0,3]=(0.617751891549)*x[0]+(0.842087813554)*x[1]+(0.181498577908)*x[2]
-        arg[0,4]=(-0.806056649748)*x[0]+(-1.46464582218)*x[1]+(1.16207385717)*x[2]
-        arg[1,0]=(0.443056731112)*x[0]+(-0.227362546034)*x[1]+(-0.34165958927)*x[2]
-        arg[1,1]=(-0.0914572456267)*x[0]+(-1.45454323755)*x[1]+(-0.197767792435)*x[2]
-        arg[1,2]=(-0.0294645792971)*x[0]+(0.154875742902)*x[1]+(0.227583590411)*x[2]
-        arg[1,3]=(0.0412025551742)*x[0]+(0.263462610593)*x[1]+(-0.916261691981)*x[2]
-        arg[1,4]=(0.436907441126)*x[0]+(1.69979623684)*x[1]+(1.28829395572)*x[2]
-        arg[2,0]=(0.328651176462)*x[0]+(1.15129657872)*x[1]+(0.288790490546)*x[2]
-        arg[2,1]=(0.603244456904)*x[0]+(0.579263327926)*x[1]+(1.29848862962)*x[2]
-        arg[2,2]=(1.20931621113)*x[0]+(1.45214239482)*x[1]+(-0.859270540382)*x[2]
-        arg[2,3]=(-0.313390836289)*x[0]+(1.29725175689)*x[1]+(-0.677628108203)*x[2]
-        arg[2,4]=(-0.182499400988)*x[0]+(-0.150297906549)*x[1]+(-0.0239318512478)*x[2]
-        arg[3,0]=(1.24015393707)*x[0]+(0.0747824863962)*x[1]+(0.0762786991199)*x[2]
-        arg[3,1]=(0.0278504259683)*x[0]+(-1.03121188802)*x[1]+(-1.1241189107)*x[2]
-        arg[3,2]=(-0.014656978991)*x[0]+(-0.0946814312886)*x[1]+(0.281133656449)*x[2]
-        arg[3,3]=(0.0763735895586)*x[0]+(-0.878856395577)*x[1]+(-0.0317884442673)*x[2]
-        arg[3,4]=(-0.0394676966134)*x[0]+(0.491771511608)*x[1]+(0.270055976645)*x[2]
-        ref[0,0]=(-1.37643176268)*x_ref[0]+(-0.1427781822)*x_ref[1]+(-0.959699369061)*x_ref[2]
-        ref[0,1]=(-0.182711571685)*x_ref[0]+(0.961312900413)*x_ref[1]+(1.51040175428)*x_ref[2]
-        ref[0,2]=(0.705353375057)*x_ref[0]+(-0.486345048698)*x_ref[1]+(0.276322756959)*x_ref[2]
-        ref[0,3]=(0.617751891549)*x_ref[0]+(0.842087813554)*x_ref[1]+(0.181498577908)*x_ref[2]
-        ref[0,4]=(-0.806056649748)*x_ref[0]+(-1.46464582218)*x_ref[1]+(1.16207385717)*x_ref[2]
-        ref[1,0]=(0.443056731112)*x_ref[0]+(-0.227362546034)*x_ref[1]+(-0.34165958927)*x_ref[2]
-        ref[1,1]=(-0.0914572456267)*x_ref[0]+(-1.45454323755)*x_ref[1]+(-0.197767792435)*x_ref[2]
-        ref[1,2]=(-0.0294645792971)*x_ref[0]+(0.154875742902)*x_ref[1]+(0.227583590411)*x_ref[2]
-        ref[1,3]=(0.0412025551742)*x_ref[0]+(0.263462610593)*x_ref[1]+(-0.916261691981)*x_ref[2]
-        ref[1,4]=(0.436907441126)*x_ref[0]+(1.69979623684)*x_ref[1]+(1.28829395572)*x_ref[2]
-        ref[2,0]=(0.328651176462)*x_ref[0]+(1.15129657872)*x_ref[1]+(0.288790490546)*x_ref[2]
-        ref[2,1]=(0.603244456904)*x_ref[0]+(0.579263327926)*x_ref[1]+(1.29848862962)*x_ref[2]
-        ref[2,2]=(1.20931621113)*x_ref[0]+(1.45214239482)*x_ref[1]+(-0.859270540382)*x_ref[2]
-        ref[2,3]=(-0.313390836289)*x_ref[0]+(1.29725175689)*x_ref[1]+(-0.677628108203)*x_ref[2]
-        ref[2,4]=(-0.182499400988)*x_ref[0]+(-0.150297906549)*x_ref[1]+(-0.0239318512478)*x_ref[2]
-        ref[3,0]=(1.24015393707)*x_ref[0]+(0.0747824863962)*x_ref[1]+(0.0762786991199)*x_ref[2]
-        ref[3,1]=(0.0278504259683)*x_ref[0]+(-1.03121188802)*x_ref[1]+(-1.1241189107)*x_ref[2]
-        ref[3,2]=(-0.014656978991)*x_ref[0]+(-0.0946814312886)*x_ref[1]+(0.281133656449)*x_ref[2]
-        ref[3,3]=(0.0763735895586)*x_ref[0]+(-0.878856395577)*x_ref[1]+(-0.0317884442673)*x_ref[2]
-        ref[3,4]=(-0.0394676966134)*x_ref[0]+(0.491771511608)*x_ref[1]+(0.270055976645)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.648027713097)*x[0]+(0.454772464521)*x[1]
-        arg[0,0,1]=(-1.04215194027)*x[0]+(1.77272186309)*x[1]
-        arg[0,1,0]=(0.957518940744)*x[0]+(-0.00690667683404)*x[1]
-        arg[0,1,1]=(0.498748880149)*x[0]+(0.259327852057)*x[1]
-        arg[1,0,0]=(0.0289932206553)*x[0]+(-0.0536452199935)*x[1]
-        arg[1,0,1]=(1.87294208563)*x[0]+(-1.51381628261)*x[1]
-        arg[1,1,0]=(-1.23040396582)*x[0]+(0.554662981657)*x[1]
-        arg[1,1,1]=(-0.860941498913)*x[0]+(0.574367240324)*x[1]
-        arg[2,0,0]=(0.137130620331)*x[0]+(-0.670662009715)*x[1]
-        arg[2,0,1]=(-0.01425641324)*x[0]+(0.938457397733)*x[1]
-        arg[2,1,0]=(-1.19963811258)*x[0]+(0.644324590438)*x[1]
-        arg[2,1,1]=(1.95704700194e-05)*x[0]+(-1.38366302093)*x[1]
-        arg[3,0,0]=(-0.340745623814)*x[0]+(0.250094821868)*x[1]
-        arg[3,0,1]=(-1.29605858834)*x[0]+(0.960366146641)*x[1]
-        arg[3,1,0]=(0.550081967023)*x[0]+(0.288502329322)*x[1]
-        arg[3,1,1]=(0.732775194015)*x[0]+(-0.0386387970031)*x[1]
-        arg[4,0,0]=(-0.849770148692)*x[0]+(-0.436107981485)*x[1]
-        arg[4,0,1]=(0.11202465528)*x[0]+(1.66934758318)*x[1]
-        arg[4,1,0]=(-0.0549275626402)*x[0]+(0.75026785816)*x[1]
-        arg[4,1,1]=(-0.351732868571)*x[0]+(0.892311743034)*x[1]
-        arg[5,0,0]=(-0.744188679625)*x[0]+(0.335492215064)*x[1]
-        arg[5,0,1]=(-0.998395994344)*x[0]+(-1.10552505805)*x[1]
-        arg[5,1,0]=(-0.125733052457)*x[0]+(0.433627801831)*x[1]
-        arg[5,1,1]=(-0.0704342146568)*x[0]+(-1.38357990003)*x[1]
-        ref[0,0,0]=(-0.648027713097)*x_ref[0]+(0.454772464521)*x_ref[1]
-        ref[0,0,1]=(-1.04215194027)*x_ref[0]+(1.77272186309)*x_ref[1]
-        ref[0,1,0]=(0.957518940744)*x_ref[0]+(-0.00690667683404)*x_ref[1]
-        ref[0,1,1]=(0.498748880149)*x_ref[0]+(0.259327852057)*x_ref[1]
-        ref[1,0,0]=(0.0289932206553)*x_ref[0]+(-0.0536452199935)*x_ref[1]
-        ref[1,0,1]=(1.87294208563)*x_ref[0]+(-1.51381628261)*x_ref[1]
-        ref[1,1,0]=(-1.23040396582)*x_ref[0]+(0.554662981657)*x_ref[1]
-        ref[1,1,1]=(-0.860941498913)*x_ref[0]+(0.574367240324)*x_ref[1]
-        ref[2,0,0]=(0.137130620331)*x_ref[0]+(-0.670662009715)*x_ref[1]
-        ref[2,0,1]=(-0.01425641324)*x_ref[0]+(0.938457397733)*x_ref[1]
-        ref[2,1,0]=(-1.19963811258)*x_ref[0]+(0.644324590438)*x_ref[1]
-        ref[2,1,1]=(1.95704700194e-05)*x_ref[0]+(-1.38366302093)*x_ref[1]
-        ref[3,0,0]=(-0.340745623814)*x_ref[0]+(0.250094821868)*x_ref[1]
-        ref[3,0,1]=(-1.29605858834)*x_ref[0]+(0.960366146641)*x_ref[1]
-        ref[3,1,0]=(0.550081967023)*x_ref[0]+(0.288502329322)*x_ref[1]
-        ref[3,1,1]=(0.732775194015)*x_ref[0]+(-0.0386387970031)*x_ref[1]
-        ref[4,0,0]=(-0.849770148692)*x_ref[0]+(-0.436107981485)*x_ref[1]
-        ref[4,0,1]=(0.11202465528)*x_ref[0]+(1.66934758318)*x_ref[1]
-        ref[4,1,0]=(-0.0549275626402)*x_ref[0]+(0.75026785816)*x_ref[1]
-        ref[4,1,1]=(-0.351732868571)*x_ref[0]+(0.892311743034)*x_ref[1]
-        ref[5,0,0]=(-0.744188679625)*x_ref[0]+(0.335492215064)*x_ref[1]
-        ref[5,0,1]=(-0.998395994344)*x_ref[0]+(-1.10552505805)*x_ref[1]
-        ref[5,1,0]=(-0.125733052457)*x_ref[0]+(0.433627801831)*x_ref[1]
-        ref[5,1,1]=(-0.0704342146568)*x_ref[0]+(-1.38357990003)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.514282046117)*x[0]+(-0.323828864786)*x[1]+(1.01124693935)*x[2]
-        arg[0,0,1]=(-0.621932286265)*x[0]+(-0.797795969893)*x[1]+(-0.0773166049033)*x[2]
-        arg[0,1,0]=(-0.874326235403)*x[0]+(1.20497718671)*x[1]+(-0.327967753068)*x[2]
-        arg[0,1,1]=(0.951360009956)*x[0]+(-1.21275900525)*x[1]+(-0.018534105952)*x[2]
-        arg[1,0,0]=(0.281987835612)*x[0]+(-1.19722794418)*x[1]+(1.1763726345)*x[2]
-        arg[1,0,1]=(-0.32305643761)*x[0]+(-1.03791873988)*x[1]+(-0.27820297843)*x[2]
-        arg[1,1,0]=(-0.250435095454)*x[0]+(-0.214489103641)*x[1]+(0.24396821423)*x[2]
-        arg[1,1,1]=(0.579357080067)*x[0]+(-0.0941366284697)*x[1]+(0.723253564904)*x[2]
-        arg[2,0,0]=(0.0300521887548)*x[0]+(0.856925059877)*x[1]+(1.62627876391)*x[2]
-        arg[2,0,1]=(0.852347895674)*x[0]+(0.206107771527)*x[1]+(0.117053849317)*x[2]
-        arg[2,1,0]=(0.398984864506)*x[0]+(-0.547599955809)*x[1]+(0.960920641374)*x[2]
-        arg[2,1,1]=(-0.958823099193)*x[0]+(0.781951729915)*x[1]+(0.450383856811)*x[2]
-        arg[3,0,0]=(0.229905485668)*x[0]+(0.13732685767)*x[1]+(0.512823357151)*x[2]
-        arg[3,0,1]=(-1.85513528612)*x[0]+(1.26641983818)*x[1]+(1.23786450856)*x[2]
-        arg[3,1,0]=(-1.42722463673)*x[0]+(1.39168597069)*x[1]+(0.268597738146)*x[2]
-        arg[3,1,1]=(0.290999479499)*x[0]+(0.948263729849)*x[1]+(-1.60034455324)*x[2]
-        arg[4,0,0]=(-0.755582573265)*x[0]+(-0.0499101766292)*x[1]+(0.0615553965851)*x[2]
-        arg[4,0,1]=(0.437479529174)*x[0]+(-1.05498330706)*x[1]+(-0.707627367761)*x[2]
-        arg[4,1,0]=(0.608125820223)*x[0]+(0.893214773163)*x[1]+(-1.28896829926)*x[2]
-        arg[4,1,1]=(0.953486972425)*x[0]+(1.41823237022)*x[1]+(-0.0439589309603)*x[2]
-        arg[5,0,0]=(1.06772863677)*x[0]+(0.25868918695)*x[1]+(-0.118887800607)*x[2]
-        arg[5,0,1]=(0.407678657671)*x[0]+(-0.464724724076)*x[1]+(0.249621788892)*x[2]
-        arg[5,1,0]=(-0.516649619366)*x[0]+(-1.7414783126)*x[1]+(-1.1378435051)*x[2]
-        arg[5,1,1]=(-0.805463452054)*x[0]+(-0.189909983229)*x[1]+(-0.127169486885)*x[2]
-        ref[0,0,0]=(0.514282046117)*x_ref[0]+(-0.323828864786)*x_ref[1]+(1.01124693935)*x_ref[2]
-        ref[0,0,1]=(-0.621932286265)*x_ref[0]+(-0.797795969893)*x_ref[1]+(-0.0773166049033)*x_ref[2]
-        ref[0,1,0]=(-0.874326235403)*x_ref[0]+(1.20497718671)*x_ref[1]+(-0.327967753068)*x_ref[2]
-        ref[0,1,1]=(0.951360009956)*x_ref[0]+(-1.21275900525)*x_ref[1]+(-0.018534105952)*x_ref[2]
-        ref[1,0,0]=(0.281987835612)*x_ref[0]+(-1.19722794418)*x_ref[1]+(1.1763726345)*x_ref[2]
-        ref[1,0,1]=(-0.32305643761)*x_ref[0]+(-1.03791873988)*x_ref[1]+(-0.27820297843)*x_ref[2]
-        ref[1,1,0]=(-0.250435095454)*x_ref[0]+(-0.214489103641)*x_ref[1]+(0.24396821423)*x_ref[2]
-        ref[1,1,1]=(0.579357080067)*x_ref[0]+(-0.0941366284697)*x_ref[1]+(0.723253564904)*x_ref[2]
-        ref[2,0,0]=(0.0300521887548)*x_ref[0]+(0.856925059877)*x_ref[1]+(1.62627876391)*x_ref[2]
-        ref[2,0,1]=(0.852347895674)*x_ref[0]+(0.206107771527)*x_ref[1]+(0.117053849317)*x_ref[2]
-        ref[2,1,0]=(0.398984864506)*x_ref[0]+(-0.547599955809)*x_ref[1]+(0.960920641374)*x_ref[2]
-        ref[2,1,1]=(-0.958823099193)*x_ref[0]+(0.781951729915)*x_ref[1]+(0.450383856811)*x_ref[2]
-        ref[3,0,0]=(0.229905485668)*x_ref[0]+(0.13732685767)*x_ref[1]+(0.512823357151)*x_ref[2]
-        ref[3,0,1]=(-1.85513528612)*x_ref[0]+(1.26641983818)*x_ref[1]+(1.23786450856)*x_ref[2]
-        ref[3,1,0]=(-1.42722463673)*x_ref[0]+(1.39168597069)*x_ref[1]+(0.268597738146)*x_ref[2]
-        ref[3,1,1]=(0.290999479499)*x_ref[0]+(0.948263729849)*x_ref[1]+(-1.60034455324)*x_ref[2]
-        ref[4,0,0]=(-0.755582573265)*x_ref[0]+(-0.0499101766292)*x_ref[1]+(0.0615553965851)*x_ref[2]
-        ref[4,0,1]=(0.437479529174)*x_ref[0]+(-1.05498330706)*x_ref[1]+(-0.707627367761)*x_ref[2]
-        ref[4,1,0]=(0.608125820223)*x_ref[0]+(0.893214773163)*x_ref[1]+(-1.28896829926)*x_ref[2]
-        ref[4,1,1]=(0.953486972425)*x_ref[0]+(1.41823237022)*x_ref[1]+(-0.0439589309603)*x_ref[2]
-        ref[5,0,0]=(1.06772863677)*x_ref[0]+(0.25868918695)*x_ref[1]+(-0.118887800607)*x_ref[2]
-        ref[5,0,1]=(0.407678657671)*x_ref[0]+(-0.464724724076)*x_ref[1]+(0.249621788892)*x_ref[2]
-        ref[5,1,0]=(-0.516649619366)*x_ref[0]+(-1.7414783126)*x_ref[1]+(-1.1378435051)*x_ref[2]
-        ref[5,1,1]=(-0.805463452054)*x_ref[0]+(-0.189909983229)*x_ref[1]+(-0.127169486885)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0345299040391)*x[0]+(-0.454395763203)*x[1]
-        arg[0,0,0,1]=(0.816055157967)*x[0]+(1.65538436278)*x[1]
-        arg[0,0,1,0]=(0.0173895492935)*x[0]+(0.390351555311)*x[1]
-        arg[0,0,1,1]=(0.0601948568001)*x[0]+(0.221935674716)*x[1]
-        arg[0,0,2,0]=(-0.86832157368)*x[0]+(0.719344815038)*x[1]
-        arg[0,0,2,1]=(1.25819429092)*x[0]+(-0.626192861251)*x[1]
-        arg[0,1,0,0]=(-0.408148703502)*x[0]+(0.614498083344)*x[1]
-        arg[0,1,0,1]=(-0.948405669606)*x[0]+(-0.431912186759)*x[1]
-        arg[0,1,1,0]=(1.31545349201)*x[0]+(-1.43633966996)*x[1]
-        arg[0,1,1,1]=(-0.262029058642)*x[0]+(-0.211155762782)*x[1]
-        arg[0,1,2,0]=(-1.29637408623)*x[0]+(0.015300306679)*x[1]
-        arg[0,1,2,1]=(-0.338105266735)*x[0]+(-1.17464147824)*x[1]
-        arg[0,2,0,0]=(-1.29420036616)*x[0]+(0.162651211594)*x[1]
-        arg[0,2,0,1]=(-0.524474022859)*x[0]+(-0.606176834607)*x[1]
-        arg[0,2,1,0]=(1.43089226048)*x[0]+(-1.4419171599)*x[1]
-        arg[0,2,1,1]=(1.2204089172)*x[0]+(0.642504226769)*x[1]
-        arg[0,2,2,0]=(-1.43093048803)*x[0]+(-0.220023978143)*x[1]
-        arg[0,2,2,1]=(-1.03649750995)*x[0]+(0.169884643951)*x[1]
-        arg[0,3,0,0]=(-0.250124925508)*x[0]+(-0.46412090099)*x[1]
-        arg[0,3,0,1]=(-0.534018976189)*x[0]+(-0.118541672182)*x[1]
-        arg[0,3,1,0]=(-1.79137479214)*x[0]+(0.662559958387)*x[1]
-        arg[0,3,1,1]=(-0.881482101487)*x[0]+(0.372532785249)*x[1]
-        arg[0,3,2,0]=(-1.71336096366)*x[0]+(-1.24175201959)*x[1]
-        arg[0,3,2,1]=(0.384581239528)*x[0]+(-0.131008110136)*x[1]
-        arg[0,4,0,0]=(0.315863164115)*x[0]+(-0.494712527335)*x[1]
-        arg[0,4,0,1]=(-1.10002713328)*x[0]+(0.129861779935)*x[1]
-        arg[0,4,1,0]=(1.10412289984)*x[0]+(1.34015931457)*x[1]
-        arg[0,4,1,1]=(-0.692340206781)*x[0]+(1.08467851048)*x[1]
-        arg[0,4,2,0]=(-0.0972657457169)*x[0]+(1.0145314899)*x[1]
-        arg[0,4,2,1]=(0.299871193443)*x[0]+(-0.470271033392)*x[1]
-        arg[1,0,0,0]=(-0.724229380092)*x[0]+(1.14448991134)*x[1]
-        arg[1,0,0,1]=(0.154147313948)*x[0]+(-0.318350887819)*x[1]
-        arg[1,0,1,0]=(-1.2997484551)*x[0]+(0.00645216870018)*x[1]
-        arg[1,0,1,1]=(1.53322180988)*x[0]+(-0.356405349895)*x[1]
-        arg[1,0,2,0]=(0.971184272781)*x[0]+(1.07821077146)*x[1]
-        arg[1,0,2,1]=(0.000530732762419)*x[0]+(0.955934156926)*x[1]
-        arg[1,1,0,0]=(-0.180982534825)*x[0]+(1.33554642886)*x[1]
-        arg[1,1,0,1]=(-0.419614369168)*x[0]+(-0.51201636845)*x[1]
-        arg[1,1,1,0]=(-0.263686990653)*x[0]+(-0.463089568134)*x[1]
-        arg[1,1,1,1]=(-0.792982985293)*x[0]+(-0.720992794822)*x[1]
-        arg[1,1,2,0]=(1.72981591311)*x[0]+(-0.305755746837)*x[1]
-        arg[1,1,2,1]=(0.874057242127)*x[0]+(0.247839316695)*x[1]
-        arg[1,2,0,0]=(1.20726244725)*x[0]+(0.44394602451)*x[1]
-        arg[1,2,0,1]=(-0.516016832395)*x[0]+(0.036120494771)*x[1]
-        arg[1,2,1,0]=(-0.157245073014)*x[0]+(0.845240869121)*x[1]
-        arg[1,2,1,1]=(0.588082465766)*x[0]+(0.195937663431)*x[1]
-        arg[1,2,2,0]=(0.095726763028)*x[0]+(-0.177757031723)*x[1]
-        arg[1,2,2,1]=(1.73215168642)*x[0]+(-0.189154112108)*x[1]
-        arg[1,3,0,0]=(-1.76621021161)*x[0]+(0.367931299124)*x[1]
-        arg[1,3,0,1]=(0.0222607642178)*x[0]+(0.466368587137)*x[1]
-        arg[1,3,1,0]=(0.412132176201)*x[0]+(0.553362139129)*x[1]
-        arg[1,3,1,1]=(-1.08306042349)*x[0]+(-0.834943125248)*x[1]
-        arg[1,3,2,0]=(-0.417451930632)*x[0]+(-0.659233486131)*x[1]
-        arg[1,3,2,1]=(-0.400333106519)*x[0]+(0.854889031906)*x[1]
-        arg[1,4,0,0]=(-0.758414654342)*x[0]+(0.838957251391)*x[1]
-        arg[1,4,0,1]=(-0.353472866001)*x[0]+(0.397138506541)*x[1]
-        arg[1,4,1,0]=(0.127641591916)*x[0]+(0.327603318651)*x[1]
-        arg[1,4,1,1]=(-0.341040162377)*x[0]+(-0.846062323778)*x[1]
-        arg[1,4,2,0]=(-0.293356226448)*x[0]+(-0.700648323903)*x[1]
-        arg[1,4,2,1]=(-0.228549394688)*x[0]+(1.43724938876)*x[1]
-        arg[2,0,0,0]=(-0.322023776234)*x[0]+(0.564889094588)*x[1]
-        arg[2,0,0,1]=(-1.11907082102)*x[0]+(-1.39374772922)*x[1]
-        arg[2,0,1,0]=(-0.705740617022)*x[0]+(0.511499218842)*x[1]
-        arg[2,0,1,1]=(0.454111255253)*x[0]+(-1.69843226881)*x[1]
-        arg[2,0,2,0]=(-0.317781478691)*x[0]+(-1.35991309273)*x[1]
-        arg[2,0,2,1]=(1.54613408914)*x[0]+(1.32901459805)*x[1]
-        arg[2,1,0,0]=(0.837517924208)*x[0]+(-0.386149637251)*x[1]
-        arg[2,1,0,1]=(0.961896547496)*x[0]+(0.617366532183)*x[1]
-        arg[2,1,1,0]=(-0.124021064331)*x[0]+(1.45238030663)*x[1]
-        arg[2,1,1,1]=(-1.34194701555)*x[0]+(-0.479310148218)*x[1]
-        arg[2,1,2,0]=(-0.813567438318)*x[0]+(0.35270597356)*x[1]
-        arg[2,1,2,1]=(0.833034787475)*x[0]+(-0.108648813503)*x[1]
-        arg[2,2,0,0]=(-1.36052757115)*x[0]+(-0.528858737068)*x[1]
-        arg[2,2,0,1]=(0.348085718404)*x[0]+(-0.550199132198)*x[1]
-        arg[2,2,1,0]=(-0.592064932053)*x[0]+(0.268729595158)*x[1]
-        arg[2,2,1,1]=(0.762201961036)*x[0]+(-0.170275800619)*x[1]
-        arg[2,2,2,0]=(0.292508257449)*x[0]+(0.546726460436)*x[1]
-        arg[2,2,2,1]=(-0.832981468483)*x[0]+(-1.01580974142)*x[1]
-        arg[2,3,0,0]=(-0.0778970282444)*x[0]+(-0.0588582131822)*x[1]
-        arg[2,3,0,1]=(-0.462860486423)*x[0]+(0.938910405107)*x[1]
-        arg[2,3,1,0]=(0.274056697467)*x[0]+(0.0938367562972)*x[1]
-        arg[2,3,1,1]=(0.168689167517)*x[0]+(-0.486345829711)*x[1]
-        arg[2,3,2,0]=(-1.33699397485)*x[0]+(-0.863623492326)*x[1]
-        arg[2,3,2,1]=(-0.317889793298)*x[0]+(0.47526951533)*x[1]
-        arg[2,4,0,0]=(-1.26561106959)*x[0]+(0.0486883091899)*x[1]
-        arg[2,4,0,1]=(-1.37742147186)*x[0]+(-1.14365670741)*x[1]
-        arg[2,4,1,0]=(0.891487506649)*x[0]+(-1.02149537779)*x[1]
-        arg[2,4,1,1]=(0.120446738176)*x[0]+(1.128322636)*x[1]
-        arg[2,4,2,0]=(-0.322931882495)*x[0]+(-0.00993625804164)*x[1]
-        arg[2,4,2,1]=(0.17764198759)*x[0]+(0.311937789824)*x[1]
-        arg[3,0,0,0]=(0.482490440467)*x[0]+(0.98496437249)*x[1]
-        arg[3,0,0,1]=(-0.174114820802)*x[0]+(0.442866651846)*x[1]
-        arg[3,0,1,0]=(-0.934180386688)*x[0]+(-1.33361314957)*x[1]
-        arg[3,0,1,1]=(0.0452285929122)*x[0]+(0.686705971575)*x[1]
-        arg[3,0,2,0]=(0.839801283293)*x[0]+(-0.967697483261)*x[1]
-        arg[3,0,2,1]=(0.14250663194)*x[0]+(-1.3515960506)*x[1]
-        arg[3,1,0,0]=(-0.322855905664)*x[0]+(0.177298330914)*x[1]
-        arg[3,1,0,1]=(-0.376491734039)*x[0]+(0.451059427164)*x[1]
-        arg[3,1,1,0]=(0.817537444737)*x[0]+(-0.93908061343)*x[1]
-        arg[3,1,1,1]=(-0.0753530118606)*x[0]+(-0.0718596035883)*x[1]
-        arg[3,1,2,0]=(-1.48772358944)*x[0]+(0.414823807711)*x[1]
-        arg[3,1,2,1]=(0.857324284797)*x[0]+(0.47131796901)*x[1]
-        arg[3,2,0,0]=(0.440034775536)*x[0]+(0.712881563582)*x[1]
-        arg[3,2,0,1]=(-1.05547066)*x[0]+(0.718956424358)*x[1]
-        arg[3,2,1,0]=(-1.40526673086)*x[0]+(-0.366871542135)*x[1]
-        arg[3,2,1,1]=(1.65950470328)*x[0]+(-1.65805816594)*x[1]
-        arg[3,2,2,0]=(1.09096918876)*x[0]+(-1.33325242756)*x[1]
-        arg[3,2,2,1]=(-0.591939877469)*x[0]+(1.0303591776)*x[1]
-        arg[3,3,0,0]=(-0.969754780364)*x[0]+(-0.0145852822005)*x[1]
-        arg[3,3,0,1]=(-1.22384841753)*x[0]+(-0.0867406833581)*x[1]
-        arg[3,3,1,0]=(0.673272022388)*x[0]+(0.947486168095)*x[1]
-        arg[3,3,1,1]=(-0.41449883684)*x[0]+(0.137714746421)*x[1]
-        arg[3,3,2,0]=(0.874598196414)*x[0]+(0.436570682065)*x[1]
-        arg[3,3,2,1]=(0.127986513106)*x[0]+(0.955109334387)*x[1]
-        arg[3,4,0,0]=(0.226160174687)*x[0]+(-0.258282204272)*x[1]
-        arg[3,4,0,1]=(-0.157570106985)*x[0]+(-0.299582244336)*x[1]
-        arg[3,4,1,0]=(0.305056978098)*x[0]+(1.34807929179)*x[1]
-        arg[3,4,1,1]=(1.16863934732)*x[0]+(-0.265384337877)*x[1]
-        arg[3,4,2,0]=(1.26265936998)*x[0]+(0.379703748135)*x[1]
-        arg[3,4,2,1]=(-0.392236938104)*x[0]+(0.829704189106)*x[1]
-        ref[0,0,0,0]=(-0.0345299040391)*x_ref[0]+(-0.454395763203)*x_ref[1]
-        ref[0,0,0,1]=(0.816055157967)*x_ref[0]+(1.65538436278)*x_ref[1]
-        ref[0,0,1,0]=(0.0173895492935)*x_ref[0]+(0.390351555311)*x_ref[1]
-        ref[0,0,1,1]=(0.0601948568001)*x_ref[0]+(0.221935674716)*x_ref[1]
-        ref[0,0,2,0]=(-0.86832157368)*x_ref[0]+(0.719344815038)*x_ref[1]
-        ref[0,0,2,1]=(1.25819429092)*x_ref[0]+(-0.626192861251)*x_ref[1]
-        ref[0,1,0,0]=(-0.408148703502)*x_ref[0]+(0.614498083344)*x_ref[1]
-        ref[0,1,0,1]=(-0.948405669606)*x_ref[0]+(-0.431912186759)*x_ref[1]
-        ref[0,1,1,0]=(1.31545349201)*x_ref[0]+(-1.43633966996)*x_ref[1]
-        ref[0,1,1,1]=(-0.262029058642)*x_ref[0]+(-0.211155762782)*x_ref[1]
-        ref[0,1,2,0]=(-1.29637408623)*x_ref[0]+(0.015300306679)*x_ref[1]
-        ref[0,1,2,1]=(-0.338105266735)*x_ref[0]+(-1.17464147824)*x_ref[1]
-        ref[0,2,0,0]=(-1.29420036616)*x_ref[0]+(0.162651211594)*x_ref[1]
-        ref[0,2,0,1]=(-0.524474022859)*x_ref[0]+(-0.606176834607)*x_ref[1]
-        ref[0,2,1,0]=(1.43089226048)*x_ref[0]+(-1.4419171599)*x_ref[1]
-        ref[0,2,1,1]=(1.2204089172)*x_ref[0]+(0.642504226769)*x_ref[1]
-        ref[0,2,2,0]=(-1.43093048803)*x_ref[0]+(-0.220023978143)*x_ref[1]
-        ref[0,2,2,1]=(-1.03649750995)*x_ref[0]+(0.169884643951)*x_ref[1]
-        ref[0,3,0,0]=(-0.250124925508)*x_ref[0]+(-0.46412090099)*x_ref[1]
-        ref[0,3,0,1]=(-0.534018976189)*x_ref[0]+(-0.118541672182)*x_ref[1]
-        ref[0,3,1,0]=(-1.79137479214)*x_ref[0]+(0.662559958387)*x_ref[1]
-        ref[0,3,1,1]=(-0.881482101487)*x_ref[0]+(0.372532785249)*x_ref[1]
-        ref[0,3,2,0]=(-1.71336096366)*x_ref[0]+(-1.24175201959)*x_ref[1]
-        ref[0,3,2,1]=(0.384581239528)*x_ref[0]+(-0.131008110136)*x_ref[1]
-        ref[0,4,0,0]=(0.315863164115)*x_ref[0]+(-0.494712527335)*x_ref[1]
-        ref[0,4,0,1]=(-1.10002713328)*x_ref[0]+(0.129861779935)*x_ref[1]
-        ref[0,4,1,0]=(1.10412289984)*x_ref[0]+(1.34015931457)*x_ref[1]
-        ref[0,4,1,1]=(-0.692340206781)*x_ref[0]+(1.08467851048)*x_ref[1]
-        ref[0,4,2,0]=(-0.0972657457169)*x_ref[0]+(1.0145314899)*x_ref[1]
-        ref[0,4,2,1]=(0.299871193443)*x_ref[0]+(-0.470271033392)*x_ref[1]
-        ref[1,0,0,0]=(-0.724229380092)*x_ref[0]+(1.14448991134)*x_ref[1]
-        ref[1,0,0,1]=(0.154147313948)*x_ref[0]+(-0.318350887819)*x_ref[1]
-        ref[1,0,1,0]=(-1.2997484551)*x_ref[0]+(0.00645216870018)*x_ref[1]
-        ref[1,0,1,1]=(1.53322180988)*x_ref[0]+(-0.356405349895)*x_ref[1]
-        ref[1,0,2,0]=(0.971184272781)*x_ref[0]+(1.07821077146)*x_ref[1]
-        ref[1,0,2,1]=(0.000530732762419)*x_ref[0]+(0.955934156926)*x_ref[1]
-        ref[1,1,0,0]=(-0.180982534825)*x_ref[0]+(1.33554642886)*x_ref[1]
-        ref[1,1,0,1]=(-0.419614369168)*x_ref[0]+(-0.51201636845)*x_ref[1]
-        ref[1,1,1,0]=(-0.263686990653)*x_ref[0]+(-0.463089568134)*x_ref[1]
-        ref[1,1,1,1]=(-0.792982985293)*x_ref[0]+(-0.720992794822)*x_ref[1]
-        ref[1,1,2,0]=(1.72981591311)*x_ref[0]+(-0.305755746837)*x_ref[1]
-        ref[1,1,2,1]=(0.874057242127)*x_ref[0]+(0.247839316695)*x_ref[1]
-        ref[1,2,0,0]=(1.20726244725)*x_ref[0]+(0.44394602451)*x_ref[1]
-        ref[1,2,0,1]=(-0.516016832395)*x_ref[0]+(0.036120494771)*x_ref[1]
-        ref[1,2,1,0]=(-0.157245073014)*x_ref[0]+(0.845240869121)*x_ref[1]
-        ref[1,2,1,1]=(0.588082465766)*x_ref[0]+(0.195937663431)*x_ref[1]
-        ref[1,2,2,0]=(0.095726763028)*x_ref[0]+(-0.177757031723)*x_ref[1]
-        ref[1,2,2,1]=(1.73215168642)*x_ref[0]+(-0.189154112108)*x_ref[1]
-        ref[1,3,0,0]=(-1.76621021161)*x_ref[0]+(0.367931299124)*x_ref[1]
-        ref[1,3,0,1]=(0.0222607642178)*x_ref[0]+(0.466368587137)*x_ref[1]
-        ref[1,3,1,0]=(0.412132176201)*x_ref[0]+(0.553362139129)*x_ref[1]
-        ref[1,3,1,1]=(-1.08306042349)*x_ref[0]+(-0.834943125248)*x_ref[1]
-        ref[1,3,2,0]=(-0.417451930632)*x_ref[0]+(-0.659233486131)*x_ref[1]
-        ref[1,3,2,1]=(-0.400333106519)*x_ref[0]+(0.854889031906)*x_ref[1]
-        ref[1,4,0,0]=(-0.758414654342)*x_ref[0]+(0.838957251391)*x_ref[1]
-        ref[1,4,0,1]=(-0.353472866001)*x_ref[0]+(0.397138506541)*x_ref[1]
-        ref[1,4,1,0]=(0.127641591916)*x_ref[0]+(0.327603318651)*x_ref[1]
-        ref[1,4,1,1]=(-0.341040162377)*x_ref[0]+(-0.846062323778)*x_ref[1]
-        ref[1,4,2,0]=(-0.293356226448)*x_ref[0]+(-0.700648323903)*x_ref[1]
-        ref[1,4,2,1]=(-0.228549394688)*x_ref[0]+(1.43724938876)*x_ref[1]
-        ref[2,0,0,0]=(-0.322023776234)*x_ref[0]+(0.564889094588)*x_ref[1]
-        ref[2,0,0,1]=(-1.11907082102)*x_ref[0]+(-1.39374772922)*x_ref[1]
-        ref[2,0,1,0]=(-0.705740617022)*x_ref[0]+(0.511499218842)*x_ref[1]
-        ref[2,0,1,1]=(0.454111255253)*x_ref[0]+(-1.69843226881)*x_ref[1]
-        ref[2,0,2,0]=(-0.317781478691)*x_ref[0]+(-1.35991309273)*x_ref[1]
-        ref[2,0,2,1]=(1.54613408914)*x_ref[0]+(1.32901459805)*x_ref[1]
-        ref[2,1,0,0]=(0.837517924208)*x_ref[0]+(-0.386149637251)*x_ref[1]
-        ref[2,1,0,1]=(0.961896547496)*x_ref[0]+(0.617366532183)*x_ref[1]
-        ref[2,1,1,0]=(-0.124021064331)*x_ref[0]+(1.45238030663)*x_ref[1]
-        ref[2,1,1,1]=(-1.34194701555)*x_ref[0]+(-0.479310148218)*x_ref[1]
-        ref[2,1,2,0]=(-0.813567438318)*x_ref[0]+(0.35270597356)*x_ref[1]
-        ref[2,1,2,1]=(0.833034787475)*x_ref[0]+(-0.108648813503)*x_ref[1]
-        ref[2,2,0,0]=(-1.36052757115)*x_ref[0]+(-0.528858737068)*x_ref[1]
-        ref[2,2,0,1]=(0.348085718404)*x_ref[0]+(-0.550199132198)*x_ref[1]
-        ref[2,2,1,0]=(-0.592064932053)*x_ref[0]+(0.268729595158)*x_ref[1]
-        ref[2,2,1,1]=(0.762201961036)*x_ref[0]+(-0.170275800619)*x_ref[1]
-        ref[2,2,2,0]=(0.292508257449)*x_ref[0]+(0.546726460436)*x_ref[1]
-        ref[2,2,2,1]=(-0.832981468483)*x_ref[0]+(-1.01580974142)*x_ref[1]
-        ref[2,3,0,0]=(-0.0778970282444)*x_ref[0]+(-0.0588582131822)*x_ref[1]
-        ref[2,3,0,1]=(-0.462860486423)*x_ref[0]+(0.938910405107)*x_ref[1]
-        ref[2,3,1,0]=(0.274056697467)*x_ref[0]+(0.0938367562972)*x_ref[1]
-        ref[2,3,1,1]=(0.168689167517)*x_ref[0]+(-0.486345829711)*x_ref[1]
-        ref[2,3,2,0]=(-1.33699397485)*x_ref[0]+(-0.863623492326)*x_ref[1]
-        ref[2,3,2,1]=(-0.317889793298)*x_ref[0]+(0.47526951533)*x_ref[1]
-        ref[2,4,0,0]=(-1.26561106959)*x_ref[0]+(0.0486883091899)*x_ref[1]
-        ref[2,4,0,1]=(-1.37742147186)*x_ref[0]+(-1.14365670741)*x_ref[1]
-        ref[2,4,1,0]=(0.891487506649)*x_ref[0]+(-1.02149537779)*x_ref[1]
-        ref[2,4,1,1]=(0.120446738176)*x_ref[0]+(1.128322636)*x_ref[1]
-        ref[2,4,2,0]=(-0.322931882495)*x_ref[0]+(-0.00993625804164)*x_ref[1]
-        ref[2,4,2,1]=(0.17764198759)*x_ref[0]+(0.311937789824)*x_ref[1]
-        ref[3,0,0,0]=(0.482490440467)*x_ref[0]+(0.98496437249)*x_ref[1]
-        ref[3,0,0,1]=(-0.174114820802)*x_ref[0]+(0.442866651846)*x_ref[1]
-        ref[3,0,1,0]=(-0.934180386688)*x_ref[0]+(-1.33361314957)*x_ref[1]
-        ref[3,0,1,1]=(0.0452285929122)*x_ref[0]+(0.686705971575)*x_ref[1]
-        ref[3,0,2,0]=(0.839801283293)*x_ref[0]+(-0.967697483261)*x_ref[1]
-        ref[3,0,2,1]=(0.14250663194)*x_ref[0]+(-1.3515960506)*x_ref[1]
-        ref[3,1,0,0]=(-0.322855905664)*x_ref[0]+(0.177298330914)*x_ref[1]
-        ref[3,1,0,1]=(-0.376491734039)*x_ref[0]+(0.451059427164)*x_ref[1]
-        ref[3,1,1,0]=(0.817537444737)*x_ref[0]+(-0.93908061343)*x_ref[1]
-        ref[3,1,1,1]=(-0.0753530118606)*x_ref[0]+(-0.0718596035883)*x_ref[1]
-        ref[3,1,2,0]=(-1.48772358944)*x_ref[0]+(0.414823807711)*x_ref[1]
-        ref[3,1,2,1]=(0.857324284797)*x_ref[0]+(0.47131796901)*x_ref[1]
-        ref[3,2,0,0]=(0.440034775536)*x_ref[0]+(0.712881563582)*x_ref[1]
-        ref[3,2,0,1]=(-1.05547066)*x_ref[0]+(0.718956424358)*x_ref[1]
-        ref[3,2,1,0]=(-1.40526673086)*x_ref[0]+(-0.366871542135)*x_ref[1]
-        ref[3,2,1,1]=(1.65950470328)*x_ref[0]+(-1.65805816594)*x_ref[1]
-        ref[3,2,2,0]=(1.09096918876)*x_ref[0]+(-1.33325242756)*x_ref[1]
-        ref[3,2,2,1]=(-0.591939877469)*x_ref[0]+(1.0303591776)*x_ref[1]
-        ref[3,3,0,0]=(-0.969754780364)*x_ref[0]+(-0.0145852822005)*x_ref[1]
-        ref[3,3,0,1]=(-1.22384841753)*x_ref[0]+(-0.0867406833581)*x_ref[1]
-        ref[3,3,1,0]=(0.673272022388)*x_ref[0]+(0.947486168095)*x_ref[1]
-        ref[3,3,1,1]=(-0.41449883684)*x_ref[0]+(0.137714746421)*x_ref[1]
-        ref[3,3,2,0]=(0.874598196414)*x_ref[0]+(0.436570682065)*x_ref[1]
-        ref[3,3,2,1]=(0.127986513106)*x_ref[0]+(0.955109334387)*x_ref[1]
-        ref[3,4,0,0]=(0.226160174687)*x_ref[0]+(-0.258282204272)*x_ref[1]
-        ref[3,4,0,1]=(-0.157570106985)*x_ref[0]+(-0.299582244336)*x_ref[1]
-        ref[3,4,1,0]=(0.305056978098)*x_ref[0]+(1.34807929179)*x_ref[1]
-        ref[3,4,1,1]=(1.16863934732)*x_ref[0]+(-0.265384337877)*x_ref[1]
-        ref[3,4,2,0]=(1.26265936998)*x_ref[0]+(0.379703748135)*x_ref[1]
-        ref[3,4,2,1]=(-0.392236938104)*x_ref[0]+(0.829704189106)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.657131010834)*x[0]+(0.925056704895)*x[1]+(0.405133059909)*x[2]
-        arg[0,0,0,1]=(1.00133275423)*x[0]+(0.804604848583)*x[1]+(-0.127865284577)*x[2]
-        arg[0,0,1,0]=(-1.43854141172)*x[0]+(0.461779683792)*x[1]+(-1.35332048209)*x[2]
-        arg[0,0,1,1]=(0.00990645894894)*x[0]+(-0.127101800988)*x[1]+(-0.105358765313)*x[2]
-        arg[0,0,2,0]=(0.116780997053)*x[0]+(1.14704063829)*x[1]+(-0.0190951296257)*x[2]
-        arg[0,0,2,1]=(0.485352133633)*x[0]+(0.232507104974)*x[1]+(-1.13067055888)*x[2]
-        arg[0,1,0,0]=(-0.350822544873)*x[0]+(-0.812391120478)*x[1]+(0.215924121867)*x[2]
-        arg[0,1,0,1]=(-0.351284651716)*x[0]+(-0.221990440191)*x[1]+(-0.223075105598)*x[2]
-        arg[0,1,1,0]=(-0.148376043654)*x[0]+(0.571632161665)*x[1]+(0.519163900078)*x[2]
-        arg[0,1,1,1]=(-1.45038964408)*x[0]+(0.302237803429)*x[1]+(0.742483356143)*x[2]
-        arg[0,1,2,0]=(-0.504270471573)*x[0]+(0.450418202232)*x[1]+(-0.111778328066)*x[2]
-        arg[0,1,2,1]=(-0.0249264677684)*x[0]+(-1.50643033256)*x[1]+(-1.35775630013)*x[2]
-        arg[0,2,0,0]=(0.303211268309)*x[0]+(-0.464853430563)*x[1]+(0.649958565051)*x[2]
-        arg[0,2,0,1]=(-0.099640500895)*x[0]+(-0.190653996191)*x[1]+(1.25662361146)*x[2]
-        arg[0,2,1,0]=(0.196051285683)*x[0]+(-0.0405207084252)*x[1]+(-0.247626612712)*x[2]
-        arg[0,2,1,1]=(0.466541264508)*x[0]+(1.12203001637)*x[1]+(0.214880867458)*x[2]
-        arg[0,2,2,0]=(-0.066399925725)*x[0]+(-0.246038048418)*x[1]+(-1.36436628718)*x[2]
-        arg[0,2,2,1]=(1.11813537863)*x[0]+(-1.09166896181)*x[1]+(0.321936214135)*x[2]
-        arg[0,3,0,0]=(0.374873324445)*x[0]+(-0.465943548272)*x[1]+(0.0190372923331)*x[2]
-        arg[0,3,0,1]=(0.833988907462)*x[0]+(-1.01195758004)*x[1]+(0.237305351727)*x[2]
-        arg[0,3,1,0]=(0.311900067643)*x[0]+(-1.11508238642)*x[1]+(-1.04912391557)*x[2]
-        arg[0,3,1,1]=(-0.211460991448)*x[0]+(-0.768164308901)*x[1]+(-0.450128967205)*x[2]
-        arg[0,3,2,0]=(-0.412678195326)*x[0]+(-0.0808659043088)*x[1]+(0.588002415672)*x[2]
-        arg[0,3,2,1]=(-1.25661069251)*x[0]+(-1.51596081235)*x[1]+(-1.38001371964)*x[2]
-        arg[0,4,0,0]=(0.0822281994319)*x[0]+(-0.726137997384)*x[1]+(0.20532237702)*x[2]
-        arg[0,4,0,1]=(-0.538872250604)*x[0]+(0.669139417413)*x[1]+(0.235909494023)*x[2]
-        arg[0,4,1,0]=(0.171512295446)*x[0]+(-1.37296529156)*x[1]+(1.25081328539)*x[2]
-        arg[0,4,1,1]=(-0.440062802901)*x[0]+(1.32591598513)*x[1]+(0.802645502519)*x[2]
-        arg[0,4,2,0]=(1.55151533491)*x[0]+(0.923232387757)*x[1]+(-0.238979557225)*x[2]
-        arg[0,4,2,1]=(-0.193306423923)*x[0]+(-0.565399635257)*x[1]+(-0.149043846608)*x[2]
-        arg[1,0,0,0]=(0.152247539316)*x[0]+(-1.219763414)*x[1]+(0.836742536417)*x[2]
-        arg[1,0,0,1]=(0.279236863017)*x[0]+(0.14118432621)*x[1]+(-0.33072070595)*x[2]
-        arg[1,0,1,0]=(-0.242848555181)*x[0]+(-0.981144530476)*x[1]+(-0.925220699112)*x[2]
-        arg[1,0,1,1]=(-1.8765425995)*x[0]+(-0.0878096696901)*x[1]+(0.133461124587)*x[2]
-        arg[1,0,2,0]=(-0.282373512491)*x[0]+(0.640862824684)*x[1]+(-1.41391625471)*x[2]
-        arg[1,0,2,1]=(0.168260007994)*x[0]+(0.660595443409)*x[1]+(1.14161006755)*x[2]
-        arg[1,1,0,0]=(-0.160956063437)*x[0]+(-0.60581390216)*x[1]+(1.28589122111)*x[2]
-        arg[1,1,0,1]=(0.0969448014041)*x[0]+(-1.63715420302)*x[1]+(-0.350879443881)*x[2]
-        arg[1,1,1,0]=(0.0878659583502)*x[0]+(1.13265578932)*x[1]+(-0.615846752768)*x[2]
-        arg[1,1,1,1]=(-0.434597962742)*x[0]+(-0.177532580699)*x[1]+(0.543921860391)*x[2]
-        arg[1,1,2,0]=(-0.7739187322)*x[0]+(-0.285452235523)*x[1]+(-0.0426663737344)*x[2]
-        arg[1,1,2,1]=(0.796313217511)*x[0]+(-1.12909584404)*x[1]+(1.26302048961)*x[2]
-        arg[1,2,0,0]=(1.62555299859)*x[0]+(-1.1660403401)*x[1]+(-0.668592413245)*x[2]
-        arg[1,2,0,1]=(-0.807742954877)*x[0]+(-0.238532476847)*x[1]+(-1.13575189406)*x[2]
-        arg[1,2,1,0]=(-0.139280450456)*x[0]+(-0.043306992095)*x[1]+(0.832351898761)*x[2]
-        arg[1,2,1,1]=(0.16731150192)*x[0]+(0.0705653171485)*x[1]+(0.12943106453)*x[2]
-        arg[1,2,2,0]=(0.669247838367)*x[0]+(1.10177451339)*x[1]+(1.21850224582)*x[2]
-        arg[1,2,2,1]=(-0.779527532537)*x[0]+(0.10943711539)*x[1]+(0.0286417760627)*x[2]
-        arg[1,3,0,0]=(-0.500367153143)*x[0]+(-0.0315766921687)*x[1]+(0.0814977959486)*x[2]
-        arg[1,3,0,1]=(1.44010930702)*x[0]+(0.985266827661)*x[1]+(-0.4777280416)*x[2]
-        arg[1,3,1,0]=(-1.09856159209)*x[0]+(0.914767947742)*x[1]+(0.257975836816)*x[2]
-        arg[1,3,1,1]=(1.20572454864)*x[0]+(-1.18899739672)*x[1]+(-0.881322688875)*x[2]
-        arg[1,3,2,0]=(0.0683727807399)*x[0]+(0.27893403097)*x[1]+(0.532141657019)*x[2]
-        arg[1,3,2,1]=(1.22927878362)*x[0]+(-0.746664730318)*x[1]+(0.706635763178)*x[2]
-        arg[1,4,0,0]=(-0.056381118157)*x[0]+(0.497463663176)*x[1]+(-0.0170016763418)*x[2]
-        arg[1,4,0,1]=(0.220396391337)*x[0]+(-0.311295539709)*x[1]+(-0.0925408150537)*x[2]
-        arg[1,4,1,0]=(-1.26814101481)*x[0]+(1.36544235985)*x[1]+(-0.706223605983)*x[2]
-        arg[1,4,1,1]=(-0.151531826396)*x[0]+(0.709418004406)*x[1]+(0.361464674136)*x[2]
-        arg[1,4,2,0]=(-1.29637464683)*x[0]+(1.12643501861)*x[1]+(0.0119437305981)*x[2]
-        arg[1,4,2,1]=(-0.127448007113)*x[0]+(0.423470578567)*x[1]+(0.57274403474)*x[2]
-        arg[2,0,0,0]=(-0.753513005537)*x[0]+(-1.42995648081)*x[1]+(-0.748578276092)*x[2]
-        arg[2,0,0,1]=(-0.529225216075)*x[0]+(0.723600505708)*x[1]+(-0.265987788752)*x[2]
-        arg[2,0,1,0]=(0.570242632099)*x[0]+(0.7183918375)*x[1]+(-0.127239408099)*x[2]
-        arg[2,0,1,1]=(0.23496854128)*x[0]+(0.642830624861)*x[1]+(0.734149374044)*x[2]
-        arg[2,0,2,0]=(-0.302583224046)*x[0]+(0.0684944027143)*x[1]+(0.156995461545)*x[2]
-        arg[2,0,2,1]=(-0.549180930856)*x[0]+(0.334205359442)*x[1]+(1.05254428528)*x[2]
-        arg[2,1,0,0]=(-0.234799499951)*x[0]+(1.17826730605)*x[1]+(1.09739059469)*x[2]
-        arg[2,1,0,1]=(-0.187707076501)*x[0]+(0.011330011831)*x[1]+(-0.233605047453)*x[2]
-        arg[2,1,1,0]=(0.290424858876)*x[0]+(0.12865400019)*x[1]+(-1.01515096279)*x[2]
-        arg[2,1,1,1]=(-1.05797585987)*x[0]+(0.679572972092)*x[1]+(1.04481198693)*x[2]
-        arg[2,1,2,0]=(0.240336170335)*x[0]+(0.567306847159)*x[1]+(0.224146880555)*x[2]
-        arg[2,1,2,1]=(-0.568589696446)*x[0]+(1.37586080732)*x[1]+(-0.292086990344)*x[2]
-        arg[2,2,0,0]=(1.16127933088)*x[0]+(-0.205088565357)*x[1]+(-0.0262686243919)*x[2]
-        arg[2,2,0,1]=(1.17913541301)*x[0]+(-0.953527588914)*x[1]+(-1.0594095352)*x[2]
-        arg[2,2,1,0]=(-0.116342811686)*x[0]+(0.459831226378)*x[1]+(0.532324650374)*x[2]
-        arg[2,2,1,1]=(-0.904379150749)*x[0]+(0.0197201393782)*x[1]+(1.16488799459)*x[2]
-        arg[2,2,2,0]=(0.288441825708)*x[0]+(-0.00162365695053)*x[1]+(-0.696961968544)*x[2]
-        arg[2,2,2,1]=(-0.278951886334)*x[0]+(-0.438973263931)*x[1]+(-0.617387268055)*x[2]
-        arg[2,3,0,0]=(-0.575840111545)*x[0]+(-0.430583405817)*x[1]+(0.678495026384)*x[2]
-        arg[2,3,0,1]=(-0.0712810127233)*x[0]+(-0.479271089471)*x[1]+(-0.561687276819)*x[2]
-        arg[2,3,1,0]=(0.00293903214402)*x[0]+(0.707224264038)*x[1]+(0.863200461564)*x[2]
-        arg[2,3,1,1]=(-0.982725212738)*x[0]+(1.12174250462)*x[1]+(0.692163622484)*x[2]
-        arg[2,3,2,0]=(0.563182079719)*x[0]+(0.592670114886)*x[1]+(1.12490471848)*x[2]
-        arg[2,3,2,1]=(0.674175588576)*x[0]+(0.125281804818)*x[1]+(0.260310807977)*x[2]
-        arg[2,4,0,0]=(-0.468871891598)*x[0]+(0.628476449634)*x[1]+(1.44798783935)*x[2]
-        arg[2,4,0,1]=(0.331618946805)*x[0]+(1.18126898042)*x[1]+(1.73036582285)*x[2]
-        arg[2,4,1,0]=(0.643190142583)*x[0]+(0.958102048788)*x[1]+(-1.17509922201)*x[2]
-        arg[2,4,1,1]=(0.140678141755)*x[0]+(-0.964205570281)*x[1]+(1.33722038246)*x[2]
-        arg[2,4,2,0]=(1.00405626052)*x[0]+(-0.766180509924)*x[1]+(-1.12787337858)*x[2]
-        arg[2,4,2,1]=(0.015701651285)*x[0]+(-0.0327586063712)*x[1]+(-1.60288759856)*x[2]
-        arg[3,0,0,0]=(-0.0648346068133)*x[0]+(0.0319743940508)*x[1]+(-0.0885983990043)*x[2]
-        arg[3,0,0,1]=(0.440191590799)*x[0]+(-0.224950534025)*x[1]+(-1.59285278381)*x[2]
-        arg[3,0,1,0]=(-1.39437403492)*x[0]+(0.718181967012)*x[1]+(-0.320282124786)*x[2]
-        arg[3,0,1,1]=(0.212062143443)*x[0]+(0.552967368897)*x[1]+(-0.805494016261)*x[2]
-        arg[3,0,2,0]=(0.123432537169)*x[0]+(-0.124637759512)*x[1]+(-0.627011571378)*x[2]
-        arg[3,0,2,1]=(-0.112696666742)*x[0]+(-0.264195102375)*x[1]+(0.0720389973432)*x[2]
-        arg[3,1,0,0]=(-0.13525504711)*x[0]+(1.02997422411)*x[1]+(-1.00797986845)*x[2]
-        arg[3,1,0,1]=(-0.0675047394459)*x[0]+(1.39934707441)*x[1]+(-0.563292489037)*x[2]
-        arg[3,1,1,0]=(-0.597786255631)*x[0]+(0.969544698551)*x[1]+(-0.0636563520143)*x[2]
-        arg[3,1,1,1]=(0.615372705023)*x[0]+(-0.312239254268)*x[1]+(1.11108440155)*x[2]
-        arg[3,1,2,0]=(0.876145642141)*x[0]+(0.117271425687)*x[1]+(1.10498467015)*x[2]
-        arg[3,1,2,1]=(-0.881281403659)*x[0]+(0.240299603044)*x[1]+(0.14672255814)*x[2]
-        arg[3,2,0,0]=(-1.72712606675)*x[0]+(0.20271220583)*x[1]+(1.10555001416)*x[2]
-        arg[3,2,0,1]=(0.251203467531)*x[0]+(1.14031566726)*x[1]+(0.13511684108)*x[2]
-        arg[3,2,1,0]=(-0.318589273012)*x[0]+(1.22432558956)*x[1]+(0.0532448118609)*x[2]
-        arg[3,2,1,1]=(0.238528986535)*x[0]+(0.181951236101)*x[1]+(0.0816544114367)*x[2]
-        arg[3,2,2,0]=(0.691665718353)*x[0]+(0.238132802916)*x[1]+(1.0244502435)*x[2]
-        arg[3,2,2,1]=(-1.64759886895)*x[0]+(1.06200853706)*x[1]+(-0.0980251738655)*x[2]
-        arg[3,3,0,0]=(-0.0493788966334)*x[0]+(-0.471962146153)*x[1]+(0.156759333734)*x[2]
-        arg[3,3,0,1]=(-0.304056988684)*x[0]+(-0.298060200774)*x[1]+(-0.455474275206)*x[2]
-        arg[3,3,1,0]=(-0.62366321672)*x[0]+(0.229030608831)*x[1]+(0.737950069935)*x[2]
-        arg[3,3,1,1]=(0.132130038359)*x[0]+(0.749997139232)*x[1]+(-0.793138255465)*x[2]
-        arg[3,3,2,0]=(1.71562899872)*x[0]+(0.659770561383)*x[1]+(0.59886052289)*x[2]
-        arg[3,3,2,1]=(0.863622138509)*x[0]+(-0.626586688059)*x[1]+(0.744519466248)*x[2]
-        arg[3,4,0,0]=(0.0214494537522)*x[0]+(0.732351688803)*x[1]+(-0.46140559894)*x[2]
-        arg[3,4,0,1]=(1.33581215441)*x[0]+(-1.16528842961)*x[1]+(-0.888687584892)*x[2]
-        arg[3,4,1,0]=(-0.971883445892)*x[0]+(0.715423530047)*x[1]+(-0.0743908860543)*x[2]
-        arg[3,4,1,1]=(-0.941321450189)*x[0]+(-0.120890461937)*x[1]+(0.929504478456)*x[2]
-        arg[3,4,2,0]=(0.515343485731)*x[0]+(0.323772401243)*x[1]+(-1.03459959098)*x[2]
-        arg[3,4,2,1]=(0.50815257234)*x[0]+(0.461750357229)*x[1]+(0.0260081346396)*x[2]
-        ref[0,0,0,0]=(0.657131010834)*x_ref[0]+(0.925056704895)*x_ref[1]+(0.405133059909)*x_ref[2]
-        ref[0,0,0,1]=(1.00133275423)*x_ref[0]+(0.804604848583)*x_ref[1]+(-0.127865284577)*x_ref[2]
-        ref[0,0,1,0]=(-1.43854141172)*x_ref[0]+(0.461779683792)*x_ref[1]+(-1.35332048209)*x_ref[2]
-        ref[0,0,1,1]=(0.00990645894894)*x_ref[0]+(-0.127101800988)*x_ref[1]+(-0.105358765313)*x_ref[2]
-        ref[0,0,2,0]=(0.116780997053)*x_ref[0]+(1.14704063829)*x_ref[1]+(-0.0190951296257)*x_ref[2]
-        ref[0,0,2,1]=(0.485352133633)*x_ref[0]+(0.232507104974)*x_ref[1]+(-1.13067055888)*x_ref[2]
-        ref[0,1,0,0]=(-0.350822544873)*x_ref[0]+(-0.812391120478)*x_ref[1]+(0.215924121867)*x_ref[2]
-        ref[0,1,0,1]=(-0.351284651716)*x_ref[0]+(-0.221990440191)*x_ref[1]+(-0.223075105598)*x_ref[2]
-        ref[0,1,1,0]=(-0.148376043654)*x_ref[0]+(0.571632161665)*x_ref[1]+(0.519163900078)*x_ref[2]
-        ref[0,1,1,1]=(-1.45038964408)*x_ref[0]+(0.302237803429)*x_ref[1]+(0.742483356143)*x_ref[2]
-        ref[0,1,2,0]=(-0.504270471573)*x_ref[0]+(0.450418202232)*x_ref[1]+(-0.111778328066)*x_ref[2]
-        ref[0,1,2,1]=(-0.0249264677684)*x_ref[0]+(-1.50643033256)*x_ref[1]+(-1.35775630013)*x_ref[2]
-        ref[0,2,0,0]=(0.303211268309)*x_ref[0]+(-0.464853430563)*x_ref[1]+(0.649958565051)*x_ref[2]
-        ref[0,2,0,1]=(-0.099640500895)*x_ref[0]+(-0.190653996191)*x_ref[1]+(1.25662361146)*x_ref[2]
-        ref[0,2,1,0]=(0.196051285683)*x_ref[0]+(-0.0405207084252)*x_ref[1]+(-0.247626612712)*x_ref[2]
-        ref[0,2,1,1]=(0.466541264508)*x_ref[0]+(1.12203001637)*x_ref[1]+(0.214880867458)*x_ref[2]
-        ref[0,2,2,0]=(-0.066399925725)*x_ref[0]+(-0.246038048418)*x_ref[1]+(-1.36436628718)*x_ref[2]
-        ref[0,2,2,1]=(1.11813537863)*x_ref[0]+(-1.09166896181)*x_ref[1]+(0.321936214135)*x_ref[2]
-        ref[0,3,0,0]=(0.374873324445)*x_ref[0]+(-0.465943548272)*x_ref[1]+(0.0190372923331)*x_ref[2]
-        ref[0,3,0,1]=(0.833988907462)*x_ref[0]+(-1.01195758004)*x_ref[1]+(0.237305351727)*x_ref[2]
-        ref[0,3,1,0]=(0.311900067643)*x_ref[0]+(-1.11508238642)*x_ref[1]+(-1.04912391557)*x_ref[2]
-        ref[0,3,1,1]=(-0.211460991448)*x_ref[0]+(-0.768164308901)*x_ref[1]+(-0.450128967205)*x_ref[2]
-        ref[0,3,2,0]=(-0.412678195326)*x_ref[0]+(-0.0808659043088)*x_ref[1]+(0.588002415672)*x_ref[2]
-        ref[0,3,2,1]=(-1.25661069251)*x_ref[0]+(-1.51596081235)*x_ref[1]+(-1.38001371964)*x_ref[2]
-        ref[0,4,0,0]=(0.0822281994319)*x_ref[0]+(-0.726137997384)*x_ref[1]+(0.20532237702)*x_ref[2]
-        ref[0,4,0,1]=(-0.538872250604)*x_ref[0]+(0.669139417413)*x_ref[1]+(0.235909494023)*x_ref[2]
-        ref[0,4,1,0]=(0.171512295446)*x_ref[0]+(-1.37296529156)*x_ref[1]+(1.25081328539)*x_ref[2]
-        ref[0,4,1,1]=(-0.440062802901)*x_ref[0]+(1.32591598513)*x_ref[1]+(0.802645502519)*x_ref[2]
-        ref[0,4,2,0]=(1.55151533491)*x_ref[0]+(0.923232387757)*x_ref[1]+(-0.238979557225)*x_ref[2]
-        ref[0,4,2,1]=(-0.193306423923)*x_ref[0]+(-0.565399635257)*x_ref[1]+(-0.149043846608)*x_ref[2]
-        ref[1,0,0,0]=(0.152247539316)*x_ref[0]+(-1.219763414)*x_ref[1]+(0.836742536417)*x_ref[2]
-        ref[1,0,0,1]=(0.279236863017)*x_ref[0]+(0.14118432621)*x_ref[1]+(-0.33072070595)*x_ref[2]
-        ref[1,0,1,0]=(-0.242848555181)*x_ref[0]+(-0.981144530476)*x_ref[1]+(-0.925220699112)*x_ref[2]
-        ref[1,0,1,1]=(-1.8765425995)*x_ref[0]+(-0.0878096696901)*x_ref[1]+(0.133461124587)*x_ref[2]
-        ref[1,0,2,0]=(-0.282373512491)*x_ref[0]+(0.640862824684)*x_ref[1]+(-1.41391625471)*x_ref[2]
-        ref[1,0,2,1]=(0.168260007994)*x_ref[0]+(0.660595443409)*x_ref[1]+(1.14161006755)*x_ref[2]
-        ref[1,1,0,0]=(-0.160956063437)*x_ref[0]+(-0.60581390216)*x_ref[1]+(1.28589122111)*x_ref[2]
-        ref[1,1,0,1]=(0.0969448014041)*x_ref[0]+(-1.63715420302)*x_ref[1]+(-0.350879443881)*x_ref[2]
-        ref[1,1,1,0]=(0.0878659583502)*x_ref[0]+(1.13265578932)*x_ref[1]+(-0.615846752768)*x_ref[2]
-        ref[1,1,1,1]=(-0.434597962742)*x_ref[0]+(-0.177532580699)*x_ref[1]+(0.543921860391)*x_ref[2]
-        ref[1,1,2,0]=(-0.7739187322)*x_ref[0]+(-0.285452235523)*x_ref[1]+(-0.0426663737344)*x_ref[2]
-        ref[1,1,2,1]=(0.796313217511)*x_ref[0]+(-1.12909584404)*x_ref[1]+(1.26302048961)*x_ref[2]
-        ref[1,2,0,0]=(1.62555299859)*x_ref[0]+(-1.1660403401)*x_ref[1]+(-0.668592413245)*x_ref[2]
-        ref[1,2,0,1]=(-0.807742954877)*x_ref[0]+(-0.238532476847)*x_ref[1]+(-1.13575189406)*x_ref[2]
-        ref[1,2,1,0]=(-0.139280450456)*x_ref[0]+(-0.043306992095)*x_ref[1]+(0.832351898761)*x_ref[2]
-        ref[1,2,1,1]=(0.16731150192)*x_ref[0]+(0.0705653171485)*x_ref[1]+(0.12943106453)*x_ref[2]
-        ref[1,2,2,0]=(0.669247838367)*x_ref[0]+(1.10177451339)*x_ref[1]+(1.21850224582)*x_ref[2]
-        ref[1,2,2,1]=(-0.779527532537)*x_ref[0]+(0.10943711539)*x_ref[1]+(0.0286417760627)*x_ref[2]
-        ref[1,3,0,0]=(-0.500367153143)*x_ref[0]+(-0.0315766921687)*x_ref[1]+(0.0814977959486)*x_ref[2]
-        ref[1,3,0,1]=(1.44010930702)*x_ref[0]+(0.985266827661)*x_ref[1]+(-0.4777280416)*x_ref[2]
-        ref[1,3,1,0]=(-1.09856159209)*x_ref[0]+(0.914767947742)*x_ref[1]+(0.257975836816)*x_ref[2]
-        ref[1,3,1,1]=(1.20572454864)*x_ref[0]+(-1.18899739672)*x_ref[1]+(-0.881322688875)*x_ref[2]
-        ref[1,3,2,0]=(0.0683727807399)*x_ref[0]+(0.27893403097)*x_ref[1]+(0.532141657019)*x_ref[2]
-        ref[1,3,2,1]=(1.22927878362)*x_ref[0]+(-0.746664730318)*x_ref[1]+(0.706635763178)*x_ref[2]
-        ref[1,4,0,0]=(-0.056381118157)*x_ref[0]+(0.497463663176)*x_ref[1]+(-0.0170016763418)*x_ref[2]
-        ref[1,4,0,1]=(0.220396391337)*x_ref[0]+(-0.311295539709)*x_ref[1]+(-0.0925408150537)*x_ref[2]
-        ref[1,4,1,0]=(-1.26814101481)*x_ref[0]+(1.36544235985)*x_ref[1]+(-0.706223605983)*x_ref[2]
-        ref[1,4,1,1]=(-0.151531826396)*x_ref[0]+(0.709418004406)*x_ref[1]+(0.361464674136)*x_ref[2]
-        ref[1,4,2,0]=(-1.29637464683)*x_ref[0]+(1.12643501861)*x_ref[1]+(0.0119437305981)*x_ref[2]
-        ref[1,4,2,1]=(-0.127448007113)*x_ref[0]+(0.423470578567)*x_ref[1]+(0.57274403474)*x_ref[2]
-        ref[2,0,0,0]=(-0.753513005537)*x_ref[0]+(-1.42995648081)*x_ref[1]+(-0.748578276092)*x_ref[2]
-        ref[2,0,0,1]=(-0.529225216075)*x_ref[0]+(0.723600505708)*x_ref[1]+(-0.265987788752)*x_ref[2]
-        ref[2,0,1,0]=(0.570242632099)*x_ref[0]+(0.7183918375)*x_ref[1]+(-0.127239408099)*x_ref[2]
-        ref[2,0,1,1]=(0.23496854128)*x_ref[0]+(0.642830624861)*x_ref[1]+(0.734149374044)*x_ref[2]
-        ref[2,0,2,0]=(-0.302583224046)*x_ref[0]+(0.0684944027143)*x_ref[1]+(0.156995461545)*x_ref[2]
-        ref[2,0,2,1]=(-0.549180930856)*x_ref[0]+(0.334205359442)*x_ref[1]+(1.05254428528)*x_ref[2]
-        ref[2,1,0,0]=(-0.234799499951)*x_ref[0]+(1.17826730605)*x_ref[1]+(1.09739059469)*x_ref[2]
-        ref[2,1,0,1]=(-0.187707076501)*x_ref[0]+(0.011330011831)*x_ref[1]+(-0.233605047453)*x_ref[2]
-        ref[2,1,1,0]=(0.290424858876)*x_ref[0]+(0.12865400019)*x_ref[1]+(-1.01515096279)*x_ref[2]
-        ref[2,1,1,1]=(-1.05797585987)*x_ref[0]+(0.679572972092)*x_ref[1]+(1.04481198693)*x_ref[2]
-        ref[2,1,2,0]=(0.240336170335)*x_ref[0]+(0.567306847159)*x_ref[1]+(0.224146880555)*x_ref[2]
-        ref[2,1,2,1]=(-0.568589696446)*x_ref[0]+(1.37586080732)*x_ref[1]+(-0.292086990344)*x_ref[2]
-        ref[2,2,0,0]=(1.16127933088)*x_ref[0]+(-0.205088565357)*x_ref[1]+(-0.0262686243919)*x_ref[2]
-        ref[2,2,0,1]=(1.17913541301)*x_ref[0]+(-0.953527588914)*x_ref[1]+(-1.0594095352)*x_ref[2]
-        ref[2,2,1,0]=(-0.116342811686)*x_ref[0]+(0.459831226378)*x_ref[1]+(0.532324650374)*x_ref[2]
-        ref[2,2,1,1]=(-0.904379150749)*x_ref[0]+(0.0197201393782)*x_ref[1]+(1.16488799459)*x_ref[2]
-        ref[2,2,2,0]=(0.288441825708)*x_ref[0]+(-0.00162365695053)*x_ref[1]+(-0.696961968544)*x_ref[2]
-        ref[2,2,2,1]=(-0.278951886334)*x_ref[0]+(-0.438973263931)*x_ref[1]+(-0.617387268055)*x_ref[2]
-        ref[2,3,0,0]=(-0.575840111545)*x_ref[0]+(-0.430583405817)*x_ref[1]+(0.678495026384)*x_ref[2]
-        ref[2,3,0,1]=(-0.0712810127233)*x_ref[0]+(-0.479271089471)*x_ref[1]+(-0.561687276819)*x_ref[2]
-        ref[2,3,1,0]=(0.00293903214402)*x_ref[0]+(0.707224264038)*x_ref[1]+(0.863200461564)*x_ref[2]
-        ref[2,3,1,1]=(-0.982725212738)*x_ref[0]+(1.12174250462)*x_ref[1]+(0.692163622484)*x_ref[2]
-        ref[2,3,2,0]=(0.563182079719)*x_ref[0]+(0.592670114886)*x_ref[1]+(1.12490471848)*x_ref[2]
-        ref[2,3,2,1]=(0.674175588576)*x_ref[0]+(0.125281804818)*x_ref[1]+(0.260310807977)*x_ref[2]
-        ref[2,4,0,0]=(-0.468871891598)*x_ref[0]+(0.628476449634)*x_ref[1]+(1.44798783935)*x_ref[2]
-        ref[2,4,0,1]=(0.331618946805)*x_ref[0]+(1.18126898042)*x_ref[1]+(1.73036582285)*x_ref[2]
-        ref[2,4,1,0]=(0.643190142583)*x_ref[0]+(0.958102048788)*x_ref[1]+(-1.17509922201)*x_ref[2]
-        ref[2,4,1,1]=(0.140678141755)*x_ref[0]+(-0.964205570281)*x_ref[1]+(1.33722038246)*x_ref[2]
-        ref[2,4,2,0]=(1.00405626052)*x_ref[0]+(-0.766180509924)*x_ref[1]+(-1.12787337858)*x_ref[2]
-        ref[2,4,2,1]=(0.015701651285)*x_ref[0]+(-0.0327586063712)*x_ref[1]+(-1.60288759856)*x_ref[2]
-        ref[3,0,0,0]=(-0.0648346068133)*x_ref[0]+(0.0319743940508)*x_ref[1]+(-0.0885983990043)*x_ref[2]
-        ref[3,0,0,1]=(0.440191590799)*x_ref[0]+(-0.224950534025)*x_ref[1]+(-1.59285278381)*x_ref[2]
-        ref[3,0,1,0]=(-1.39437403492)*x_ref[0]+(0.718181967012)*x_ref[1]+(-0.320282124786)*x_ref[2]
-        ref[3,0,1,1]=(0.212062143443)*x_ref[0]+(0.552967368897)*x_ref[1]+(-0.805494016261)*x_ref[2]
-        ref[3,0,2,0]=(0.123432537169)*x_ref[0]+(-0.124637759512)*x_ref[1]+(-0.627011571378)*x_ref[2]
-        ref[3,0,2,1]=(-0.112696666742)*x_ref[0]+(-0.264195102375)*x_ref[1]+(0.0720389973432)*x_ref[2]
-        ref[3,1,0,0]=(-0.13525504711)*x_ref[0]+(1.02997422411)*x_ref[1]+(-1.00797986845)*x_ref[2]
-        ref[3,1,0,1]=(-0.0675047394459)*x_ref[0]+(1.39934707441)*x_ref[1]+(-0.563292489037)*x_ref[2]
-        ref[3,1,1,0]=(-0.597786255631)*x_ref[0]+(0.969544698551)*x_ref[1]+(-0.0636563520143)*x_ref[2]
-        ref[3,1,1,1]=(0.615372705023)*x_ref[0]+(-0.312239254268)*x_ref[1]+(1.11108440155)*x_ref[2]
-        ref[3,1,2,0]=(0.876145642141)*x_ref[0]+(0.117271425687)*x_ref[1]+(1.10498467015)*x_ref[2]
-        ref[3,1,2,1]=(-0.881281403659)*x_ref[0]+(0.240299603044)*x_ref[1]+(0.14672255814)*x_ref[2]
-        ref[3,2,0,0]=(-1.72712606675)*x_ref[0]+(0.20271220583)*x_ref[1]+(1.10555001416)*x_ref[2]
-        ref[3,2,0,1]=(0.251203467531)*x_ref[0]+(1.14031566726)*x_ref[1]+(0.13511684108)*x_ref[2]
-        ref[3,2,1,0]=(-0.318589273012)*x_ref[0]+(1.22432558956)*x_ref[1]+(0.0532448118609)*x_ref[2]
-        ref[3,2,1,1]=(0.238528986535)*x_ref[0]+(0.181951236101)*x_ref[1]+(0.0816544114367)*x_ref[2]
-        ref[3,2,2,0]=(0.691665718353)*x_ref[0]+(0.238132802916)*x_ref[1]+(1.0244502435)*x_ref[2]
-        ref[3,2,2,1]=(-1.64759886895)*x_ref[0]+(1.06200853706)*x_ref[1]+(-0.0980251738655)*x_ref[2]
-        ref[3,3,0,0]=(-0.0493788966334)*x_ref[0]+(-0.471962146153)*x_ref[1]+(0.156759333734)*x_ref[2]
-        ref[3,3,0,1]=(-0.304056988684)*x_ref[0]+(-0.298060200774)*x_ref[1]+(-0.455474275206)*x_ref[2]
-        ref[3,3,1,0]=(-0.62366321672)*x_ref[0]+(0.229030608831)*x_ref[1]+(0.737950069935)*x_ref[2]
-        ref[3,3,1,1]=(0.132130038359)*x_ref[0]+(0.749997139232)*x_ref[1]+(-0.793138255465)*x_ref[2]
-        ref[3,3,2,0]=(1.71562899872)*x_ref[0]+(0.659770561383)*x_ref[1]+(0.59886052289)*x_ref[2]
-        ref[3,3,2,1]=(0.863622138509)*x_ref[0]+(-0.626586688059)*x_ref[1]+(0.744519466248)*x_ref[2]
-        ref[3,4,0,0]=(0.0214494537522)*x_ref[0]+(0.732351688803)*x_ref[1]+(-0.46140559894)*x_ref[2]
-        ref[3,4,0,1]=(1.33581215441)*x_ref[0]+(-1.16528842961)*x_ref[1]+(-0.888687584892)*x_ref[2]
-        ref[3,4,1,0]=(-0.971883445892)*x_ref[0]+(0.715423530047)*x_ref[1]+(-0.0743908860543)*x_ref[2]
-        ref[3,4,1,1]=(-0.941321450189)*x_ref[0]+(-0.120890461937)*x_ref[1]+(0.929504478456)*x_ref[2]
-        ref[3,4,2,0]=(0.515343485731)*x_ref[0]+(0.323772401243)*x_ref[1]+(-1.03459959098)*x_ref[2]
-        ref[3,4,2,1]=(0.50815257234)*x_ref[0]+(0.461750357229)*x_ref[1]+(0.0260081346396)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedContinuousFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.0473893058941)*x[0]+(0.951986966173)*x[1]
-        ref=(0.0473893058941)*x_ref[0]+(0.951986966173)*x_ref[1]
-      else:
-        arg=(1.17583059)*x[0]+(-0.0937717081252)*x[1]+(-1.27613571861)*x[2]
-        ref=(1.17583059)*x_ref[0]+(-0.0937717081252)*x_ref[1]+(-1.27613571861)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        arg[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-        ref[0]=(-1.12026442538)*x[0]+(-0.118489919905)*x[1]
-        ref[1]=(-1.31300753934)*x[0]+(0.938487315467)*x[1]
-      else:
-        arg[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        arg[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-        ref[0]=(1.03792743444)*x[0]+(0.131747885089)*x[1]+(-0.122522375594)*x[2]
-        ref[1]=(-0.948813532769)*x[0]+(0.355251567439)*x[1]+(0.256406780636)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.352147407922)*x[0]+(1.05748871495)*x[1]
-        arg[0,1]=(-0.474780656205)*x[0]+(0.459896921083)*x[1]
-        arg[0,2]=(0.460595468629)*x[0]+(-0.719265552984)*x[1]
-        arg[0,3]=(-0.182481554307)*x[0]+(0.658370858696)*x[1]
-        arg[0,4]=(0.827070331069)*x[0]+(0.461652365051)*x[1]
-        arg[1,0]=(-1.04815178098)*x[0]+(-0.401056329621)*x[1]
-        arg[1,1]=(1.44973151029)*x[0]+(-0.240684558811)*x[1]
-        arg[1,2]=(1.66374138794)*x[0]+(0.77295074874)*x[1]
-        arg[1,3]=(0.367619281099)*x[0]+(1.68735398814)*x[1]
-        arg[1,4]=(-0.609166774517)*x[0]+(-0.236664892047)*x[1]
-        arg[2,0]=(0.517168891914)*x[0]+(0.14465722282)*x[1]
-        arg[2,1]=(1.44226468541)*x[0]+(0.138272882962)*x[1]
-        arg[2,2]=(1.48139408702)*x[0]+(0.858274661903)*x[1]
-        arg[2,3]=(-0.313581651419)*x[0]+(0.23082842733)*x[1]
-        arg[2,4]=(-0.174268737758)*x[0]+(-0.21537909808)*x[1]
-        arg[3,0]=(-0.228982633638)*x[0]+(0.469215862849)*x[1]
-        arg[3,1]=(1.13696568169)*x[0]+(0.937455803513)*x[1]
-        arg[3,2]=(-0.104407288228)*x[0]+(0.695766113469)*x[1]
-        arg[3,3]=(-0.854996521846)*x[0]+(-0.112176127951)*x[1]
-        arg[3,4]=(-0.995531601234)*x[0]+(0.0800402854558)*x[1]
-        ref[0,0]=(-0.352147407922)*x_ref[0]+(1.05748871495)*x_ref[1]
-        ref[0,1]=(-0.474780656205)*x_ref[0]+(0.459896921083)*x_ref[1]
-        ref[0,2]=(0.460595468629)*x_ref[0]+(-0.719265552984)*x_ref[1]
-        ref[0,3]=(-0.182481554307)*x_ref[0]+(0.658370858696)*x_ref[1]
-        ref[0,4]=(0.827070331069)*x_ref[0]+(0.461652365051)*x_ref[1]
-        ref[1,0]=(-1.04815178098)*x_ref[0]+(-0.401056329621)*x_ref[1]
-        ref[1,1]=(1.44973151029)*x_ref[0]+(-0.240684558811)*x_ref[1]
-        ref[1,2]=(1.66374138794)*x_ref[0]+(0.77295074874)*x_ref[1]
-        ref[1,3]=(0.367619281099)*x_ref[0]+(1.68735398814)*x_ref[1]
-        ref[1,4]=(-0.609166774517)*x_ref[0]+(-0.236664892047)*x_ref[1]
-        ref[2,0]=(0.517168891914)*x_ref[0]+(0.14465722282)*x_ref[1]
-        ref[2,1]=(1.44226468541)*x_ref[0]+(0.138272882962)*x_ref[1]
-        ref[2,2]=(1.48139408702)*x_ref[0]+(0.858274661903)*x_ref[1]
-        ref[2,3]=(-0.313581651419)*x_ref[0]+(0.23082842733)*x_ref[1]
-        ref[2,4]=(-0.174268737758)*x_ref[0]+(-0.21537909808)*x_ref[1]
-        ref[3,0]=(-0.228982633638)*x_ref[0]+(0.469215862849)*x_ref[1]
-        ref[3,1]=(1.13696568169)*x_ref[0]+(0.937455803513)*x_ref[1]
-        ref[3,2]=(-0.104407288228)*x_ref[0]+(0.695766113469)*x_ref[1]
-        ref[3,3]=(-0.854996521846)*x_ref[0]+(-0.112176127951)*x_ref[1]
-        ref[3,4]=(-0.995531601234)*x_ref[0]+(0.0800402854558)*x_ref[1]
-      else:
-        arg[0,0]=(-1.37643176268)*x[0]+(-0.1427781822)*x[1]+(-0.959699369061)*x[2]
-        arg[0,1]=(-0.182711571685)*x[0]+(0.961312900413)*x[1]+(1.51040175428)*x[2]
-        arg[0,2]=(0.705353375057)*x[0]+(-0.486345048698)*x[1]+(0.276322756959)*x[2]
-        arg[0,3]=(0.617751891549)*x[0]+(0.842087813554)*x[1]+(0.181498577908)*x[2]
-        arg[0,4]=(-0.806056649748)*x[0]+(-1.46464582218)*x[1]+(1.16207385717)*x[2]
-        arg[1,0]=(0.443056731112)*x[0]+(-0.227362546034)*x[1]+(-0.34165958927)*x[2]
-        arg[1,1]=(-0.0914572456267)*x[0]+(-1.45454323755)*x[1]+(-0.197767792435)*x[2]
-        arg[1,2]=(-0.0294645792971)*x[0]+(0.154875742902)*x[1]+(0.227583590411)*x[2]
-        arg[1,3]=(0.0412025551742)*x[0]+(0.263462610593)*x[1]+(-0.916261691981)*x[2]
-        arg[1,4]=(0.436907441126)*x[0]+(1.69979623684)*x[1]+(1.28829395572)*x[2]
-        arg[2,0]=(0.328651176462)*x[0]+(1.15129657872)*x[1]+(0.288790490546)*x[2]
-        arg[2,1]=(0.603244456904)*x[0]+(0.579263327926)*x[1]+(1.29848862962)*x[2]
-        arg[2,2]=(1.20931621113)*x[0]+(1.45214239482)*x[1]+(-0.859270540382)*x[2]
-        arg[2,3]=(-0.313390836289)*x[0]+(1.29725175689)*x[1]+(-0.677628108203)*x[2]
-        arg[2,4]=(-0.182499400988)*x[0]+(-0.150297906549)*x[1]+(-0.0239318512478)*x[2]
-        arg[3,0]=(1.24015393707)*x[0]+(0.0747824863962)*x[1]+(0.0762786991199)*x[2]
-        arg[3,1]=(0.0278504259683)*x[0]+(-1.03121188802)*x[1]+(-1.1241189107)*x[2]
-        arg[3,2]=(-0.014656978991)*x[0]+(-0.0946814312886)*x[1]+(0.281133656449)*x[2]
-        arg[3,3]=(0.0763735895586)*x[0]+(-0.878856395577)*x[1]+(-0.0317884442673)*x[2]
-        arg[3,4]=(-0.0394676966134)*x[0]+(0.491771511608)*x[1]+(0.270055976645)*x[2]
-        ref[0,0]=(-1.37643176268)*x_ref[0]+(-0.1427781822)*x_ref[1]+(-0.959699369061)*x_ref[2]
-        ref[0,1]=(-0.182711571685)*x_ref[0]+(0.961312900413)*x_ref[1]+(1.51040175428)*x_ref[2]
-        ref[0,2]=(0.705353375057)*x_ref[0]+(-0.486345048698)*x_ref[1]+(0.276322756959)*x_ref[2]
-        ref[0,3]=(0.617751891549)*x_ref[0]+(0.842087813554)*x_ref[1]+(0.181498577908)*x_ref[2]
-        ref[0,4]=(-0.806056649748)*x_ref[0]+(-1.46464582218)*x_ref[1]+(1.16207385717)*x_ref[2]
-        ref[1,0]=(0.443056731112)*x_ref[0]+(-0.227362546034)*x_ref[1]+(-0.34165958927)*x_ref[2]
-        ref[1,1]=(-0.0914572456267)*x_ref[0]+(-1.45454323755)*x_ref[1]+(-0.197767792435)*x_ref[2]
-        ref[1,2]=(-0.0294645792971)*x_ref[0]+(0.154875742902)*x_ref[1]+(0.227583590411)*x_ref[2]
-        ref[1,3]=(0.0412025551742)*x_ref[0]+(0.263462610593)*x_ref[1]+(-0.916261691981)*x_ref[2]
-        ref[1,4]=(0.436907441126)*x_ref[0]+(1.69979623684)*x_ref[1]+(1.28829395572)*x_ref[2]
-        ref[2,0]=(0.328651176462)*x_ref[0]+(1.15129657872)*x_ref[1]+(0.288790490546)*x_ref[2]
-        ref[2,1]=(0.603244456904)*x_ref[0]+(0.579263327926)*x_ref[1]+(1.29848862962)*x_ref[2]
-        ref[2,2]=(1.20931621113)*x_ref[0]+(1.45214239482)*x_ref[1]+(-0.859270540382)*x_ref[2]
-        ref[2,3]=(-0.313390836289)*x_ref[0]+(1.29725175689)*x_ref[1]+(-0.677628108203)*x_ref[2]
-        ref[2,4]=(-0.182499400988)*x_ref[0]+(-0.150297906549)*x_ref[1]+(-0.0239318512478)*x_ref[2]
-        ref[3,0]=(1.24015393707)*x_ref[0]+(0.0747824863962)*x_ref[1]+(0.0762786991199)*x_ref[2]
-        ref[3,1]=(0.0278504259683)*x_ref[0]+(-1.03121188802)*x_ref[1]+(-1.1241189107)*x_ref[2]
-        ref[3,2]=(-0.014656978991)*x_ref[0]+(-0.0946814312886)*x_ref[1]+(0.281133656449)*x_ref[2]
-        ref[3,3]=(0.0763735895586)*x_ref[0]+(-0.878856395577)*x_ref[1]+(-0.0317884442673)*x_ref[2]
-        ref[3,4]=(-0.0394676966134)*x_ref[0]+(0.491771511608)*x_ref[1]+(0.270055976645)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.648027713097)*x[0]+(0.454772464521)*x[1]
-        arg[0,0,1]=(-1.04215194027)*x[0]+(1.77272186309)*x[1]
-        arg[0,1,0]=(0.957518940744)*x[0]+(-0.00690667683404)*x[1]
-        arg[0,1,1]=(0.498748880149)*x[0]+(0.259327852057)*x[1]
-        arg[1,0,0]=(0.0289932206553)*x[0]+(-0.0536452199935)*x[1]
-        arg[1,0,1]=(1.87294208563)*x[0]+(-1.51381628261)*x[1]
-        arg[1,1,0]=(-1.23040396582)*x[0]+(0.554662981657)*x[1]
-        arg[1,1,1]=(-0.860941498913)*x[0]+(0.574367240324)*x[1]
-        arg[2,0,0]=(0.137130620331)*x[0]+(-0.670662009715)*x[1]
-        arg[2,0,1]=(-0.01425641324)*x[0]+(0.938457397733)*x[1]
-        arg[2,1,0]=(-1.19963811258)*x[0]+(0.644324590438)*x[1]
-        arg[2,1,1]=(1.95704700194e-05)*x[0]+(-1.38366302093)*x[1]
-        arg[3,0,0]=(-0.340745623814)*x[0]+(0.250094821868)*x[1]
-        arg[3,0,1]=(-1.29605858834)*x[0]+(0.960366146641)*x[1]
-        arg[3,1,0]=(0.550081967023)*x[0]+(0.288502329322)*x[1]
-        arg[3,1,1]=(0.732775194015)*x[0]+(-0.0386387970031)*x[1]
-        arg[4,0,0]=(-0.849770148692)*x[0]+(-0.436107981485)*x[1]
-        arg[4,0,1]=(0.11202465528)*x[0]+(1.66934758318)*x[1]
-        arg[4,1,0]=(-0.0549275626402)*x[0]+(0.75026785816)*x[1]
-        arg[4,1,1]=(-0.351732868571)*x[0]+(0.892311743034)*x[1]
-        arg[5,0,0]=(-0.744188679625)*x[0]+(0.335492215064)*x[1]
-        arg[5,0,1]=(-0.998395994344)*x[0]+(-1.10552505805)*x[1]
-        arg[5,1,0]=(-0.125733052457)*x[0]+(0.433627801831)*x[1]
-        arg[5,1,1]=(-0.0704342146568)*x[0]+(-1.38357990003)*x[1]
-        ref[0,0,0]=(-0.648027713097)*x_ref[0]+(0.454772464521)*x_ref[1]
-        ref[0,0,1]=(-1.04215194027)*x_ref[0]+(1.77272186309)*x_ref[1]
-        ref[0,1,0]=(0.957518940744)*x_ref[0]+(-0.00690667683404)*x_ref[1]
-        ref[0,1,1]=(0.498748880149)*x_ref[0]+(0.259327852057)*x_ref[1]
-        ref[1,0,0]=(0.0289932206553)*x_ref[0]+(-0.0536452199935)*x_ref[1]
-        ref[1,0,1]=(1.87294208563)*x_ref[0]+(-1.51381628261)*x_ref[1]
-        ref[1,1,0]=(-1.23040396582)*x_ref[0]+(0.554662981657)*x_ref[1]
-        ref[1,1,1]=(-0.860941498913)*x_ref[0]+(0.574367240324)*x_ref[1]
-        ref[2,0,0]=(0.137130620331)*x_ref[0]+(-0.670662009715)*x_ref[1]
-        ref[2,0,1]=(-0.01425641324)*x_ref[0]+(0.938457397733)*x_ref[1]
-        ref[2,1,0]=(-1.19963811258)*x_ref[0]+(0.644324590438)*x_ref[1]
-        ref[2,1,1]=(1.95704700194e-05)*x_ref[0]+(-1.38366302093)*x_ref[1]
-        ref[3,0,0]=(-0.340745623814)*x_ref[0]+(0.250094821868)*x_ref[1]
-        ref[3,0,1]=(-1.29605858834)*x_ref[0]+(0.960366146641)*x_ref[1]
-        ref[3,1,0]=(0.550081967023)*x_ref[0]+(0.288502329322)*x_ref[1]
-        ref[3,1,1]=(0.732775194015)*x_ref[0]+(-0.0386387970031)*x_ref[1]
-        ref[4,0,0]=(-0.849770148692)*x_ref[0]+(-0.436107981485)*x_ref[1]
-        ref[4,0,1]=(0.11202465528)*x_ref[0]+(1.66934758318)*x_ref[1]
-        ref[4,1,0]=(-0.0549275626402)*x_ref[0]+(0.75026785816)*x_ref[1]
-        ref[4,1,1]=(-0.351732868571)*x_ref[0]+(0.892311743034)*x_ref[1]
-        ref[5,0,0]=(-0.744188679625)*x_ref[0]+(0.335492215064)*x_ref[1]
-        ref[5,0,1]=(-0.998395994344)*x_ref[0]+(-1.10552505805)*x_ref[1]
-        ref[5,1,0]=(-0.125733052457)*x_ref[0]+(0.433627801831)*x_ref[1]
-        ref[5,1,1]=(-0.0704342146568)*x_ref[0]+(-1.38357990003)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.514282046117)*x[0]+(-0.323828864786)*x[1]+(1.01124693935)*x[2]
-        arg[0,0,1]=(-0.621932286265)*x[0]+(-0.797795969893)*x[1]+(-0.0773166049033)*x[2]
-        arg[0,1,0]=(-0.874326235403)*x[0]+(1.20497718671)*x[1]+(-0.327967753068)*x[2]
-        arg[0,1,1]=(0.951360009956)*x[0]+(-1.21275900525)*x[1]+(-0.018534105952)*x[2]
-        arg[1,0,0]=(0.281987835612)*x[0]+(-1.19722794418)*x[1]+(1.1763726345)*x[2]
-        arg[1,0,1]=(-0.32305643761)*x[0]+(-1.03791873988)*x[1]+(-0.27820297843)*x[2]
-        arg[1,1,0]=(-0.250435095454)*x[0]+(-0.214489103641)*x[1]+(0.24396821423)*x[2]
-        arg[1,1,1]=(0.579357080067)*x[0]+(-0.0941366284697)*x[1]+(0.723253564904)*x[2]
-        arg[2,0,0]=(0.0300521887548)*x[0]+(0.856925059877)*x[1]+(1.62627876391)*x[2]
-        arg[2,0,1]=(0.852347895674)*x[0]+(0.206107771527)*x[1]+(0.117053849317)*x[2]
-        arg[2,1,0]=(0.398984864506)*x[0]+(-0.547599955809)*x[1]+(0.960920641374)*x[2]
-        arg[2,1,1]=(-0.958823099193)*x[0]+(0.781951729915)*x[1]+(0.450383856811)*x[2]
-        arg[3,0,0]=(0.229905485668)*x[0]+(0.13732685767)*x[1]+(0.512823357151)*x[2]
-        arg[3,0,1]=(-1.85513528612)*x[0]+(1.26641983818)*x[1]+(1.23786450856)*x[2]
-        arg[3,1,0]=(-1.42722463673)*x[0]+(1.39168597069)*x[1]+(0.268597738146)*x[2]
-        arg[3,1,1]=(0.290999479499)*x[0]+(0.948263729849)*x[1]+(-1.60034455324)*x[2]
-        arg[4,0,0]=(-0.755582573265)*x[0]+(-0.0499101766292)*x[1]+(0.0615553965851)*x[2]
-        arg[4,0,1]=(0.437479529174)*x[0]+(-1.05498330706)*x[1]+(-0.707627367761)*x[2]
-        arg[4,1,0]=(0.608125820223)*x[0]+(0.893214773163)*x[1]+(-1.28896829926)*x[2]
-        arg[4,1,1]=(0.953486972425)*x[0]+(1.41823237022)*x[1]+(-0.0439589309603)*x[2]
-        arg[5,0,0]=(1.06772863677)*x[0]+(0.25868918695)*x[1]+(-0.118887800607)*x[2]
-        arg[5,0,1]=(0.407678657671)*x[0]+(-0.464724724076)*x[1]+(0.249621788892)*x[2]
-        arg[5,1,0]=(-0.516649619366)*x[0]+(-1.7414783126)*x[1]+(-1.1378435051)*x[2]
-        arg[5,1,1]=(-0.805463452054)*x[0]+(-0.189909983229)*x[1]+(-0.127169486885)*x[2]
-        ref[0,0,0]=(0.514282046117)*x_ref[0]+(-0.323828864786)*x_ref[1]+(1.01124693935)*x_ref[2]
-        ref[0,0,1]=(-0.621932286265)*x_ref[0]+(-0.797795969893)*x_ref[1]+(-0.0773166049033)*x_ref[2]
-        ref[0,1,0]=(-0.874326235403)*x_ref[0]+(1.20497718671)*x_ref[1]+(-0.327967753068)*x_ref[2]
-        ref[0,1,1]=(0.951360009956)*x_ref[0]+(-1.21275900525)*x_ref[1]+(-0.018534105952)*x_ref[2]
-        ref[1,0,0]=(0.281987835612)*x_ref[0]+(-1.19722794418)*x_ref[1]+(1.1763726345)*x_ref[2]
-        ref[1,0,1]=(-0.32305643761)*x_ref[0]+(-1.03791873988)*x_ref[1]+(-0.27820297843)*x_ref[2]
-        ref[1,1,0]=(-0.250435095454)*x_ref[0]+(-0.214489103641)*x_ref[1]+(0.24396821423)*x_ref[2]
-        ref[1,1,1]=(0.579357080067)*x_ref[0]+(-0.0941366284697)*x_ref[1]+(0.723253564904)*x_ref[2]
-        ref[2,0,0]=(0.0300521887548)*x_ref[0]+(0.856925059877)*x_ref[1]+(1.62627876391)*x_ref[2]
-        ref[2,0,1]=(0.852347895674)*x_ref[0]+(0.206107771527)*x_ref[1]+(0.117053849317)*x_ref[2]
-        ref[2,1,0]=(0.398984864506)*x_ref[0]+(-0.547599955809)*x_ref[1]+(0.960920641374)*x_ref[2]
-        ref[2,1,1]=(-0.958823099193)*x_ref[0]+(0.781951729915)*x_ref[1]+(0.450383856811)*x_ref[2]
-        ref[3,0,0]=(0.229905485668)*x_ref[0]+(0.13732685767)*x_ref[1]+(0.512823357151)*x_ref[2]
-        ref[3,0,1]=(-1.85513528612)*x_ref[0]+(1.26641983818)*x_ref[1]+(1.23786450856)*x_ref[2]
-        ref[3,1,0]=(-1.42722463673)*x_ref[0]+(1.39168597069)*x_ref[1]+(0.268597738146)*x_ref[2]
-        ref[3,1,1]=(0.290999479499)*x_ref[0]+(0.948263729849)*x_ref[1]+(-1.60034455324)*x_ref[2]
-        ref[4,0,0]=(-0.755582573265)*x_ref[0]+(-0.0499101766292)*x_ref[1]+(0.0615553965851)*x_ref[2]
-        ref[4,0,1]=(0.437479529174)*x_ref[0]+(-1.05498330706)*x_ref[1]+(-0.707627367761)*x_ref[2]
-        ref[4,1,0]=(0.608125820223)*x_ref[0]+(0.893214773163)*x_ref[1]+(-1.28896829926)*x_ref[2]
-        ref[4,1,1]=(0.953486972425)*x_ref[0]+(1.41823237022)*x_ref[1]+(-0.0439589309603)*x_ref[2]
-        ref[5,0,0]=(1.06772863677)*x_ref[0]+(0.25868918695)*x_ref[1]+(-0.118887800607)*x_ref[2]
-        ref[5,0,1]=(0.407678657671)*x_ref[0]+(-0.464724724076)*x_ref[1]+(0.249621788892)*x_ref[2]
-        ref[5,1,0]=(-0.516649619366)*x_ref[0]+(-1.7414783126)*x_ref[1]+(-1.1378435051)*x_ref[2]
-        ref[5,1,1]=(-0.805463452054)*x_ref[0]+(-0.189909983229)*x_ref[1]+(-0.127169486885)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedSolution
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedSolution
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedContinuousFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0345299040391)*x[0]+(-0.454395763203)*x[1]
-        arg[0,0,0,1]=(0.816055157967)*x[0]+(1.65538436278)*x[1]
-        arg[0,0,1,0]=(0.0173895492935)*x[0]+(0.390351555311)*x[1]
-        arg[0,0,1,1]=(0.0601948568001)*x[0]+(0.221935674716)*x[1]
-        arg[0,0,2,0]=(-0.86832157368)*x[0]+(0.719344815038)*x[1]
-        arg[0,0,2,1]=(1.25819429092)*x[0]+(-0.626192861251)*x[1]
-        arg[0,1,0,0]=(-0.408148703502)*x[0]+(0.614498083344)*x[1]
-        arg[0,1,0,1]=(-0.948405669606)*x[0]+(-0.431912186759)*x[1]
-        arg[0,1,1,0]=(1.31545349201)*x[0]+(-1.43633966996)*x[1]
-        arg[0,1,1,1]=(-0.262029058642)*x[0]+(-0.211155762782)*x[1]
-        arg[0,1,2,0]=(-1.29637408623)*x[0]+(0.015300306679)*x[1]
-        arg[0,1,2,1]=(-0.338105266735)*x[0]+(-1.17464147824)*x[1]
-        arg[0,2,0,0]=(-1.29420036616)*x[0]+(0.162651211594)*x[1]
-        arg[0,2,0,1]=(-0.524474022859)*x[0]+(-0.606176834607)*x[1]
-        arg[0,2,1,0]=(1.43089226048)*x[0]+(-1.4419171599)*x[1]
-        arg[0,2,1,1]=(1.2204089172)*x[0]+(0.642504226769)*x[1]
-        arg[0,2,2,0]=(-1.43093048803)*x[0]+(-0.220023978143)*x[1]
-        arg[0,2,2,1]=(-1.03649750995)*x[0]+(0.169884643951)*x[1]
-        arg[0,3,0,0]=(-0.250124925508)*x[0]+(-0.46412090099)*x[1]
-        arg[0,3,0,1]=(-0.534018976189)*x[0]+(-0.118541672182)*x[1]
-        arg[0,3,1,0]=(-1.79137479214)*x[0]+(0.662559958387)*x[1]
-        arg[0,3,1,1]=(-0.881482101487)*x[0]+(0.372532785249)*x[1]
-        arg[0,3,2,0]=(-1.71336096366)*x[0]+(-1.24175201959)*x[1]
-        arg[0,3,2,1]=(0.384581239528)*x[0]+(-0.131008110136)*x[1]
-        arg[0,4,0,0]=(0.315863164115)*x[0]+(-0.494712527335)*x[1]
-        arg[0,4,0,1]=(-1.10002713328)*x[0]+(0.129861779935)*x[1]
-        arg[0,4,1,0]=(1.10412289984)*x[0]+(1.34015931457)*x[1]
-        arg[0,4,1,1]=(-0.692340206781)*x[0]+(1.08467851048)*x[1]
-        arg[0,4,2,0]=(-0.0972657457169)*x[0]+(1.0145314899)*x[1]
-        arg[0,4,2,1]=(0.299871193443)*x[0]+(-0.470271033392)*x[1]
-        arg[1,0,0,0]=(-0.724229380092)*x[0]+(1.14448991134)*x[1]
-        arg[1,0,0,1]=(0.154147313948)*x[0]+(-0.318350887819)*x[1]
-        arg[1,0,1,0]=(-1.2997484551)*x[0]+(0.00645216870018)*x[1]
-        arg[1,0,1,1]=(1.53322180988)*x[0]+(-0.356405349895)*x[1]
-        arg[1,0,2,0]=(0.971184272781)*x[0]+(1.07821077146)*x[1]
-        arg[1,0,2,1]=(0.000530732762419)*x[0]+(0.955934156926)*x[1]
-        arg[1,1,0,0]=(-0.180982534825)*x[0]+(1.33554642886)*x[1]
-        arg[1,1,0,1]=(-0.419614369168)*x[0]+(-0.51201636845)*x[1]
-        arg[1,1,1,0]=(-0.263686990653)*x[0]+(-0.463089568134)*x[1]
-        arg[1,1,1,1]=(-0.792982985293)*x[0]+(-0.720992794822)*x[1]
-        arg[1,1,2,0]=(1.72981591311)*x[0]+(-0.305755746837)*x[1]
-        arg[1,1,2,1]=(0.874057242127)*x[0]+(0.247839316695)*x[1]
-        arg[1,2,0,0]=(1.20726244725)*x[0]+(0.44394602451)*x[1]
-        arg[1,2,0,1]=(-0.516016832395)*x[0]+(0.036120494771)*x[1]
-        arg[1,2,1,0]=(-0.157245073014)*x[0]+(0.845240869121)*x[1]
-        arg[1,2,1,1]=(0.588082465766)*x[0]+(0.195937663431)*x[1]
-        arg[1,2,2,0]=(0.095726763028)*x[0]+(-0.177757031723)*x[1]
-        arg[1,2,2,1]=(1.73215168642)*x[0]+(-0.189154112108)*x[1]
-        arg[1,3,0,0]=(-1.76621021161)*x[0]+(0.367931299124)*x[1]
-        arg[1,3,0,1]=(0.0222607642178)*x[0]+(0.466368587137)*x[1]
-        arg[1,3,1,0]=(0.412132176201)*x[0]+(0.553362139129)*x[1]
-        arg[1,3,1,1]=(-1.08306042349)*x[0]+(-0.834943125248)*x[1]
-        arg[1,3,2,0]=(-0.417451930632)*x[0]+(-0.659233486131)*x[1]
-        arg[1,3,2,1]=(-0.400333106519)*x[0]+(0.854889031906)*x[1]
-        arg[1,4,0,0]=(-0.758414654342)*x[0]+(0.838957251391)*x[1]
-        arg[1,4,0,1]=(-0.353472866001)*x[0]+(0.397138506541)*x[1]
-        arg[1,4,1,0]=(0.127641591916)*x[0]+(0.327603318651)*x[1]
-        arg[1,4,1,1]=(-0.341040162377)*x[0]+(-0.846062323778)*x[1]
-        arg[1,4,2,0]=(-0.293356226448)*x[0]+(-0.700648323903)*x[1]
-        arg[1,4,2,1]=(-0.228549394688)*x[0]+(1.43724938876)*x[1]
-        arg[2,0,0,0]=(-0.322023776234)*x[0]+(0.564889094588)*x[1]
-        arg[2,0,0,1]=(-1.11907082102)*x[0]+(-1.39374772922)*x[1]
-        arg[2,0,1,0]=(-0.705740617022)*x[0]+(0.511499218842)*x[1]
-        arg[2,0,1,1]=(0.454111255253)*x[0]+(-1.69843226881)*x[1]
-        arg[2,0,2,0]=(-0.317781478691)*x[0]+(-1.35991309273)*x[1]
-        arg[2,0,2,1]=(1.54613408914)*x[0]+(1.32901459805)*x[1]
-        arg[2,1,0,0]=(0.837517924208)*x[0]+(-0.386149637251)*x[1]
-        arg[2,1,0,1]=(0.961896547496)*x[0]+(0.617366532183)*x[1]
-        arg[2,1,1,0]=(-0.124021064331)*x[0]+(1.45238030663)*x[1]
-        arg[2,1,1,1]=(-1.34194701555)*x[0]+(-0.479310148218)*x[1]
-        arg[2,1,2,0]=(-0.813567438318)*x[0]+(0.35270597356)*x[1]
-        arg[2,1,2,1]=(0.833034787475)*x[0]+(-0.108648813503)*x[1]
-        arg[2,2,0,0]=(-1.36052757115)*x[0]+(-0.528858737068)*x[1]
-        arg[2,2,0,1]=(0.348085718404)*x[0]+(-0.550199132198)*x[1]
-        arg[2,2,1,0]=(-0.592064932053)*x[0]+(0.268729595158)*x[1]
-        arg[2,2,1,1]=(0.762201961036)*x[0]+(-0.170275800619)*x[1]
-        arg[2,2,2,0]=(0.292508257449)*x[0]+(0.546726460436)*x[1]
-        arg[2,2,2,1]=(-0.832981468483)*x[0]+(-1.01580974142)*x[1]
-        arg[2,3,0,0]=(-0.0778970282444)*x[0]+(-0.0588582131822)*x[1]
-        arg[2,3,0,1]=(-0.462860486423)*x[0]+(0.938910405107)*x[1]
-        arg[2,3,1,0]=(0.274056697467)*x[0]+(0.0938367562972)*x[1]
-        arg[2,3,1,1]=(0.168689167517)*x[0]+(-0.486345829711)*x[1]
-        arg[2,3,2,0]=(-1.33699397485)*x[0]+(-0.863623492326)*x[1]
-        arg[2,3,2,1]=(-0.317889793298)*x[0]+(0.47526951533)*x[1]
-        arg[2,4,0,0]=(-1.26561106959)*x[0]+(0.0486883091899)*x[1]
-        arg[2,4,0,1]=(-1.37742147186)*x[0]+(-1.14365670741)*x[1]
-        arg[2,4,1,0]=(0.891487506649)*x[0]+(-1.02149537779)*x[1]
-        arg[2,4,1,1]=(0.120446738176)*x[0]+(1.128322636)*x[1]
-        arg[2,4,2,0]=(-0.322931882495)*x[0]+(-0.00993625804164)*x[1]
-        arg[2,4,2,1]=(0.17764198759)*x[0]+(0.311937789824)*x[1]
-        arg[3,0,0,0]=(0.482490440467)*x[0]+(0.98496437249)*x[1]
-        arg[3,0,0,1]=(-0.174114820802)*x[0]+(0.442866651846)*x[1]
-        arg[3,0,1,0]=(-0.934180386688)*x[0]+(-1.33361314957)*x[1]
-        arg[3,0,1,1]=(0.0452285929122)*x[0]+(0.686705971575)*x[1]
-        arg[3,0,2,0]=(0.839801283293)*x[0]+(-0.967697483261)*x[1]
-        arg[3,0,2,1]=(0.14250663194)*x[0]+(-1.3515960506)*x[1]
-        arg[3,1,0,0]=(-0.322855905664)*x[0]+(0.177298330914)*x[1]
-        arg[3,1,0,1]=(-0.376491734039)*x[0]+(0.451059427164)*x[1]
-        arg[3,1,1,0]=(0.817537444737)*x[0]+(-0.93908061343)*x[1]
-        arg[3,1,1,1]=(-0.0753530118606)*x[0]+(-0.0718596035883)*x[1]
-        arg[3,1,2,0]=(-1.48772358944)*x[0]+(0.414823807711)*x[1]
-        arg[3,1,2,1]=(0.857324284797)*x[0]+(0.47131796901)*x[1]
-        arg[3,2,0,0]=(0.440034775536)*x[0]+(0.712881563582)*x[1]
-        arg[3,2,0,1]=(-1.05547066)*x[0]+(0.718956424358)*x[1]
-        arg[3,2,1,0]=(-1.40526673086)*x[0]+(-0.366871542135)*x[1]
-        arg[3,2,1,1]=(1.65950470328)*x[0]+(-1.65805816594)*x[1]
-        arg[3,2,2,0]=(1.09096918876)*x[0]+(-1.33325242756)*x[1]
-        arg[3,2,2,1]=(-0.591939877469)*x[0]+(1.0303591776)*x[1]
-        arg[3,3,0,0]=(-0.969754780364)*x[0]+(-0.0145852822005)*x[1]
-        arg[3,3,0,1]=(-1.22384841753)*x[0]+(-0.0867406833581)*x[1]
-        arg[3,3,1,0]=(0.673272022388)*x[0]+(0.947486168095)*x[1]
-        arg[3,3,1,1]=(-0.41449883684)*x[0]+(0.137714746421)*x[1]
-        arg[3,3,2,0]=(0.874598196414)*x[0]+(0.436570682065)*x[1]
-        arg[3,3,2,1]=(0.127986513106)*x[0]+(0.955109334387)*x[1]
-        arg[3,4,0,0]=(0.226160174687)*x[0]+(-0.258282204272)*x[1]
-        arg[3,4,0,1]=(-0.157570106985)*x[0]+(-0.299582244336)*x[1]
-        arg[3,4,1,0]=(0.305056978098)*x[0]+(1.34807929179)*x[1]
-        arg[3,4,1,1]=(1.16863934732)*x[0]+(-0.265384337877)*x[1]
-        arg[3,4,2,0]=(1.26265936998)*x[0]+(0.379703748135)*x[1]
-        arg[3,4,2,1]=(-0.392236938104)*x[0]+(0.829704189106)*x[1]
-        ref[0,0,0,0]=(-0.0345299040391)*x_ref[0]+(-0.454395763203)*x_ref[1]
-        ref[0,0,0,1]=(0.816055157967)*x_ref[0]+(1.65538436278)*x_ref[1]
-        ref[0,0,1,0]=(0.0173895492935)*x_ref[0]+(0.390351555311)*x_ref[1]
-        ref[0,0,1,1]=(0.0601948568001)*x_ref[0]+(0.221935674716)*x_ref[1]
-        ref[0,0,2,0]=(-0.86832157368)*x_ref[0]+(0.719344815038)*x_ref[1]
-        ref[0,0,2,1]=(1.25819429092)*x_ref[0]+(-0.626192861251)*x_ref[1]
-        ref[0,1,0,0]=(-0.408148703502)*x_ref[0]+(0.614498083344)*x_ref[1]
-        ref[0,1,0,1]=(-0.948405669606)*x_ref[0]+(-0.431912186759)*x_ref[1]
-        ref[0,1,1,0]=(1.31545349201)*x_ref[0]+(-1.43633966996)*x_ref[1]
-        ref[0,1,1,1]=(-0.262029058642)*x_ref[0]+(-0.211155762782)*x_ref[1]
-        ref[0,1,2,0]=(-1.29637408623)*x_ref[0]+(0.015300306679)*x_ref[1]
-        ref[0,1,2,1]=(-0.338105266735)*x_ref[0]+(-1.17464147824)*x_ref[1]
-        ref[0,2,0,0]=(-1.29420036616)*x_ref[0]+(0.162651211594)*x_ref[1]
-        ref[0,2,0,1]=(-0.524474022859)*x_ref[0]+(-0.606176834607)*x_ref[1]
-        ref[0,2,1,0]=(1.43089226048)*x_ref[0]+(-1.4419171599)*x_ref[1]
-        ref[0,2,1,1]=(1.2204089172)*x_ref[0]+(0.642504226769)*x_ref[1]
-        ref[0,2,2,0]=(-1.43093048803)*x_ref[0]+(-0.220023978143)*x_ref[1]
-        ref[0,2,2,1]=(-1.03649750995)*x_ref[0]+(0.169884643951)*x_ref[1]
-        ref[0,3,0,0]=(-0.250124925508)*x_ref[0]+(-0.46412090099)*x_ref[1]
-        ref[0,3,0,1]=(-0.534018976189)*x_ref[0]+(-0.118541672182)*x_ref[1]
-        ref[0,3,1,0]=(-1.79137479214)*x_ref[0]+(0.662559958387)*x_ref[1]
-        ref[0,3,1,1]=(-0.881482101487)*x_ref[0]+(0.372532785249)*x_ref[1]
-        ref[0,3,2,0]=(-1.71336096366)*x_ref[0]+(-1.24175201959)*x_ref[1]
-        ref[0,3,2,1]=(0.384581239528)*x_ref[0]+(-0.131008110136)*x_ref[1]
-        ref[0,4,0,0]=(0.315863164115)*x_ref[0]+(-0.494712527335)*x_ref[1]
-        ref[0,4,0,1]=(-1.10002713328)*x_ref[0]+(0.129861779935)*x_ref[1]
-        ref[0,4,1,0]=(1.10412289984)*x_ref[0]+(1.34015931457)*x_ref[1]
-        ref[0,4,1,1]=(-0.692340206781)*x_ref[0]+(1.08467851048)*x_ref[1]
-        ref[0,4,2,0]=(-0.0972657457169)*x_ref[0]+(1.0145314899)*x_ref[1]
-        ref[0,4,2,1]=(0.299871193443)*x_ref[0]+(-0.470271033392)*x_ref[1]
-        ref[1,0,0,0]=(-0.724229380092)*x_ref[0]+(1.14448991134)*x_ref[1]
-        ref[1,0,0,1]=(0.154147313948)*x_ref[0]+(-0.318350887819)*x_ref[1]
-        ref[1,0,1,0]=(-1.2997484551)*x_ref[0]+(0.00645216870018)*x_ref[1]
-        ref[1,0,1,1]=(1.53322180988)*x_ref[0]+(-0.356405349895)*x_ref[1]
-        ref[1,0,2,0]=(0.971184272781)*x_ref[0]+(1.07821077146)*x_ref[1]
-        ref[1,0,2,1]=(0.000530732762419)*x_ref[0]+(0.955934156926)*x_ref[1]
-        ref[1,1,0,0]=(-0.180982534825)*x_ref[0]+(1.33554642886)*x_ref[1]
-        ref[1,1,0,1]=(-0.419614369168)*x_ref[0]+(-0.51201636845)*x_ref[1]
-        ref[1,1,1,0]=(-0.263686990653)*x_ref[0]+(-0.463089568134)*x_ref[1]
-        ref[1,1,1,1]=(-0.792982985293)*x_ref[0]+(-0.720992794822)*x_ref[1]
-        ref[1,1,2,0]=(1.72981591311)*x_ref[0]+(-0.305755746837)*x_ref[1]
-        ref[1,1,2,1]=(0.874057242127)*x_ref[0]+(0.247839316695)*x_ref[1]
-        ref[1,2,0,0]=(1.20726244725)*x_ref[0]+(0.44394602451)*x_ref[1]
-        ref[1,2,0,1]=(-0.516016832395)*x_ref[0]+(0.036120494771)*x_ref[1]
-        ref[1,2,1,0]=(-0.157245073014)*x_ref[0]+(0.845240869121)*x_ref[1]
-        ref[1,2,1,1]=(0.588082465766)*x_ref[0]+(0.195937663431)*x_ref[1]
-        ref[1,2,2,0]=(0.095726763028)*x_ref[0]+(-0.177757031723)*x_ref[1]
-        ref[1,2,2,1]=(1.73215168642)*x_ref[0]+(-0.189154112108)*x_ref[1]
-        ref[1,3,0,0]=(-1.76621021161)*x_ref[0]+(0.367931299124)*x_ref[1]
-        ref[1,3,0,1]=(0.0222607642178)*x_ref[0]+(0.466368587137)*x_ref[1]
-        ref[1,3,1,0]=(0.412132176201)*x_ref[0]+(0.553362139129)*x_ref[1]
-        ref[1,3,1,1]=(-1.08306042349)*x_ref[0]+(-0.834943125248)*x_ref[1]
-        ref[1,3,2,0]=(-0.417451930632)*x_ref[0]+(-0.659233486131)*x_ref[1]
-        ref[1,3,2,1]=(-0.400333106519)*x_ref[0]+(0.854889031906)*x_ref[1]
-        ref[1,4,0,0]=(-0.758414654342)*x_ref[0]+(0.838957251391)*x_ref[1]
-        ref[1,4,0,1]=(-0.353472866001)*x_ref[0]+(0.397138506541)*x_ref[1]
-        ref[1,4,1,0]=(0.127641591916)*x_ref[0]+(0.327603318651)*x_ref[1]
-        ref[1,4,1,1]=(-0.341040162377)*x_ref[0]+(-0.846062323778)*x_ref[1]
-        ref[1,4,2,0]=(-0.293356226448)*x_ref[0]+(-0.700648323903)*x_ref[1]
-        ref[1,4,2,1]=(-0.228549394688)*x_ref[0]+(1.43724938876)*x_ref[1]
-        ref[2,0,0,0]=(-0.322023776234)*x_ref[0]+(0.564889094588)*x_ref[1]
-        ref[2,0,0,1]=(-1.11907082102)*x_ref[0]+(-1.39374772922)*x_ref[1]
-        ref[2,0,1,0]=(-0.705740617022)*x_ref[0]+(0.511499218842)*x_ref[1]
-        ref[2,0,1,1]=(0.454111255253)*x_ref[0]+(-1.69843226881)*x_ref[1]
-        ref[2,0,2,0]=(-0.317781478691)*x_ref[0]+(-1.35991309273)*x_ref[1]
-        ref[2,0,2,1]=(1.54613408914)*x_ref[0]+(1.32901459805)*x_ref[1]
-        ref[2,1,0,0]=(0.837517924208)*x_ref[0]+(-0.386149637251)*x_ref[1]
-        ref[2,1,0,1]=(0.961896547496)*x_ref[0]+(0.617366532183)*x_ref[1]
-        ref[2,1,1,0]=(-0.124021064331)*x_ref[0]+(1.45238030663)*x_ref[1]
-        ref[2,1,1,1]=(-1.34194701555)*x_ref[0]+(-0.479310148218)*x_ref[1]
-        ref[2,1,2,0]=(-0.813567438318)*x_ref[0]+(0.35270597356)*x_ref[1]
-        ref[2,1,2,1]=(0.833034787475)*x_ref[0]+(-0.108648813503)*x_ref[1]
-        ref[2,2,0,0]=(-1.36052757115)*x_ref[0]+(-0.528858737068)*x_ref[1]
-        ref[2,2,0,1]=(0.348085718404)*x_ref[0]+(-0.550199132198)*x_ref[1]
-        ref[2,2,1,0]=(-0.592064932053)*x_ref[0]+(0.268729595158)*x_ref[1]
-        ref[2,2,1,1]=(0.762201961036)*x_ref[0]+(-0.170275800619)*x_ref[1]
-        ref[2,2,2,0]=(0.292508257449)*x_ref[0]+(0.546726460436)*x_ref[1]
-        ref[2,2,2,1]=(-0.832981468483)*x_ref[0]+(-1.01580974142)*x_ref[1]
-        ref[2,3,0,0]=(-0.0778970282444)*x_ref[0]+(-0.0588582131822)*x_ref[1]
-        ref[2,3,0,1]=(-0.462860486423)*x_ref[0]+(0.938910405107)*x_ref[1]
-        ref[2,3,1,0]=(0.274056697467)*x_ref[0]+(0.0938367562972)*x_ref[1]
-        ref[2,3,1,1]=(0.168689167517)*x_ref[0]+(-0.486345829711)*x_ref[1]
-        ref[2,3,2,0]=(-1.33699397485)*x_ref[0]+(-0.863623492326)*x_ref[1]
-        ref[2,3,2,1]=(-0.317889793298)*x_ref[0]+(0.47526951533)*x_ref[1]
-        ref[2,4,0,0]=(-1.26561106959)*x_ref[0]+(0.0486883091899)*x_ref[1]
-        ref[2,4,0,1]=(-1.37742147186)*x_ref[0]+(-1.14365670741)*x_ref[1]
-        ref[2,4,1,0]=(0.891487506649)*x_ref[0]+(-1.02149537779)*x_ref[1]
-        ref[2,4,1,1]=(0.120446738176)*x_ref[0]+(1.128322636)*x_ref[1]
-        ref[2,4,2,0]=(-0.322931882495)*x_ref[0]+(-0.00993625804164)*x_ref[1]
-        ref[2,4,2,1]=(0.17764198759)*x_ref[0]+(0.311937789824)*x_ref[1]
-        ref[3,0,0,0]=(0.482490440467)*x_ref[0]+(0.98496437249)*x_ref[1]
-        ref[3,0,0,1]=(-0.174114820802)*x_ref[0]+(0.442866651846)*x_ref[1]
-        ref[3,0,1,0]=(-0.934180386688)*x_ref[0]+(-1.33361314957)*x_ref[1]
-        ref[3,0,1,1]=(0.0452285929122)*x_ref[0]+(0.686705971575)*x_ref[1]
-        ref[3,0,2,0]=(0.839801283293)*x_ref[0]+(-0.967697483261)*x_ref[1]
-        ref[3,0,2,1]=(0.14250663194)*x_ref[0]+(-1.3515960506)*x_ref[1]
-        ref[3,1,0,0]=(-0.322855905664)*x_ref[0]+(0.177298330914)*x_ref[1]
-        ref[3,1,0,1]=(-0.376491734039)*x_ref[0]+(0.451059427164)*x_ref[1]
-        ref[3,1,1,0]=(0.817537444737)*x_ref[0]+(-0.93908061343)*x_ref[1]
-        ref[3,1,1,1]=(-0.0753530118606)*x_ref[0]+(-0.0718596035883)*x_ref[1]
-        ref[3,1,2,0]=(-1.48772358944)*x_ref[0]+(0.414823807711)*x_ref[1]
-        ref[3,1,2,1]=(0.857324284797)*x_ref[0]+(0.47131796901)*x_ref[1]
-        ref[3,2,0,0]=(0.440034775536)*x_ref[0]+(0.712881563582)*x_ref[1]
-        ref[3,2,0,1]=(-1.05547066)*x_ref[0]+(0.718956424358)*x_ref[1]
-        ref[3,2,1,0]=(-1.40526673086)*x_ref[0]+(-0.366871542135)*x_ref[1]
-        ref[3,2,1,1]=(1.65950470328)*x_ref[0]+(-1.65805816594)*x_ref[1]
-        ref[3,2,2,0]=(1.09096918876)*x_ref[0]+(-1.33325242756)*x_ref[1]
-        ref[3,2,2,1]=(-0.591939877469)*x_ref[0]+(1.0303591776)*x_ref[1]
-        ref[3,3,0,0]=(-0.969754780364)*x_ref[0]+(-0.0145852822005)*x_ref[1]
-        ref[3,3,0,1]=(-1.22384841753)*x_ref[0]+(-0.0867406833581)*x_ref[1]
-        ref[3,3,1,0]=(0.673272022388)*x_ref[0]+(0.947486168095)*x_ref[1]
-        ref[3,3,1,1]=(-0.41449883684)*x_ref[0]+(0.137714746421)*x_ref[1]
-        ref[3,3,2,0]=(0.874598196414)*x_ref[0]+(0.436570682065)*x_ref[1]
-        ref[3,3,2,1]=(0.127986513106)*x_ref[0]+(0.955109334387)*x_ref[1]
-        ref[3,4,0,0]=(0.226160174687)*x_ref[0]+(-0.258282204272)*x_ref[1]
-        ref[3,4,0,1]=(-0.157570106985)*x_ref[0]+(-0.299582244336)*x_ref[1]
-        ref[3,4,1,0]=(0.305056978098)*x_ref[0]+(1.34807929179)*x_ref[1]
-        ref[3,4,1,1]=(1.16863934732)*x_ref[0]+(-0.265384337877)*x_ref[1]
-        ref[3,4,2,0]=(1.26265936998)*x_ref[0]+(0.379703748135)*x_ref[1]
-        ref[3,4,2,1]=(-0.392236938104)*x_ref[0]+(0.829704189106)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.657131010834)*x[0]+(0.925056704895)*x[1]+(0.405133059909)*x[2]
-        arg[0,0,0,1]=(1.00133275423)*x[0]+(0.804604848583)*x[1]+(-0.127865284577)*x[2]
-        arg[0,0,1,0]=(-1.43854141172)*x[0]+(0.461779683792)*x[1]+(-1.35332048209)*x[2]
-        arg[0,0,1,1]=(0.00990645894894)*x[0]+(-0.127101800988)*x[1]+(-0.105358765313)*x[2]
-        arg[0,0,2,0]=(0.116780997053)*x[0]+(1.14704063829)*x[1]+(-0.0190951296257)*x[2]
-        arg[0,0,2,1]=(0.485352133633)*x[0]+(0.232507104974)*x[1]+(-1.13067055888)*x[2]
-        arg[0,1,0,0]=(-0.350822544873)*x[0]+(-0.812391120478)*x[1]+(0.215924121867)*x[2]
-        arg[0,1,0,1]=(-0.351284651716)*x[0]+(-0.221990440191)*x[1]+(-0.223075105598)*x[2]
-        arg[0,1,1,0]=(-0.148376043654)*x[0]+(0.571632161665)*x[1]+(0.519163900078)*x[2]
-        arg[0,1,1,1]=(-1.45038964408)*x[0]+(0.302237803429)*x[1]+(0.742483356143)*x[2]
-        arg[0,1,2,0]=(-0.504270471573)*x[0]+(0.450418202232)*x[1]+(-0.111778328066)*x[2]
-        arg[0,1,2,1]=(-0.0249264677684)*x[0]+(-1.50643033256)*x[1]+(-1.35775630013)*x[2]
-        arg[0,2,0,0]=(0.303211268309)*x[0]+(-0.464853430563)*x[1]+(0.649958565051)*x[2]
-        arg[0,2,0,1]=(-0.099640500895)*x[0]+(-0.190653996191)*x[1]+(1.25662361146)*x[2]
-        arg[0,2,1,0]=(0.196051285683)*x[0]+(-0.0405207084252)*x[1]+(-0.247626612712)*x[2]
-        arg[0,2,1,1]=(0.466541264508)*x[0]+(1.12203001637)*x[1]+(0.214880867458)*x[2]
-        arg[0,2,2,0]=(-0.066399925725)*x[0]+(-0.246038048418)*x[1]+(-1.36436628718)*x[2]
-        arg[0,2,2,1]=(1.11813537863)*x[0]+(-1.09166896181)*x[1]+(0.321936214135)*x[2]
-        arg[0,3,0,0]=(0.374873324445)*x[0]+(-0.465943548272)*x[1]+(0.0190372923331)*x[2]
-        arg[0,3,0,1]=(0.833988907462)*x[0]+(-1.01195758004)*x[1]+(0.237305351727)*x[2]
-        arg[0,3,1,0]=(0.311900067643)*x[0]+(-1.11508238642)*x[1]+(-1.04912391557)*x[2]
-        arg[0,3,1,1]=(-0.211460991448)*x[0]+(-0.768164308901)*x[1]+(-0.450128967205)*x[2]
-        arg[0,3,2,0]=(-0.412678195326)*x[0]+(-0.0808659043088)*x[1]+(0.588002415672)*x[2]
-        arg[0,3,2,1]=(-1.25661069251)*x[0]+(-1.51596081235)*x[1]+(-1.38001371964)*x[2]
-        arg[0,4,0,0]=(0.0822281994319)*x[0]+(-0.726137997384)*x[1]+(0.20532237702)*x[2]
-        arg[0,4,0,1]=(-0.538872250604)*x[0]+(0.669139417413)*x[1]+(0.235909494023)*x[2]
-        arg[0,4,1,0]=(0.171512295446)*x[0]+(-1.37296529156)*x[1]+(1.25081328539)*x[2]
-        arg[0,4,1,1]=(-0.440062802901)*x[0]+(1.32591598513)*x[1]+(0.802645502519)*x[2]
-        arg[0,4,2,0]=(1.55151533491)*x[0]+(0.923232387757)*x[1]+(-0.238979557225)*x[2]
-        arg[0,4,2,1]=(-0.193306423923)*x[0]+(-0.565399635257)*x[1]+(-0.149043846608)*x[2]
-        arg[1,0,0,0]=(0.152247539316)*x[0]+(-1.219763414)*x[1]+(0.836742536417)*x[2]
-        arg[1,0,0,1]=(0.279236863017)*x[0]+(0.14118432621)*x[1]+(-0.33072070595)*x[2]
-        arg[1,0,1,0]=(-0.242848555181)*x[0]+(-0.981144530476)*x[1]+(-0.925220699112)*x[2]
-        arg[1,0,1,1]=(-1.8765425995)*x[0]+(-0.0878096696901)*x[1]+(0.133461124587)*x[2]
-        arg[1,0,2,0]=(-0.282373512491)*x[0]+(0.640862824684)*x[1]+(-1.41391625471)*x[2]
-        arg[1,0,2,1]=(0.168260007994)*x[0]+(0.660595443409)*x[1]+(1.14161006755)*x[2]
-        arg[1,1,0,0]=(-0.160956063437)*x[0]+(-0.60581390216)*x[1]+(1.28589122111)*x[2]
-        arg[1,1,0,1]=(0.0969448014041)*x[0]+(-1.63715420302)*x[1]+(-0.350879443881)*x[2]
-        arg[1,1,1,0]=(0.0878659583502)*x[0]+(1.13265578932)*x[1]+(-0.615846752768)*x[2]
-        arg[1,1,1,1]=(-0.434597962742)*x[0]+(-0.177532580699)*x[1]+(0.543921860391)*x[2]
-        arg[1,1,2,0]=(-0.7739187322)*x[0]+(-0.285452235523)*x[1]+(-0.0426663737344)*x[2]
-        arg[1,1,2,1]=(0.796313217511)*x[0]+(-1.12909584404)*x[1]+(1.26302048961)*x[2]
-        arg[1,2,0,0]=(1.62555299859)*x[0]+(-1.1660403401)*x[1]+(-0.668592413245)*x[2]
-        arg[1,2,0,1]=(-0.807742954877)*x[0]+(-0.238532476847)*x[1]+(-1.13575189406)*x[2]
-        arg[1,2,1,0]=(-0.139280450456)*x[0]+(-0.043306992095)*x[1]+(0.832351898761)*x[2]
-        arg[1,2,1,1]=(0.16731150192)*x[0]+(0.0705653171485)*x[1]+(0.12943106453)*x[2]
-        arg[1,2,2,0]=(0.669247838367)*x[0]+(1.10177451339)*x[1]+(1.21850224582)*x[2]
-        arg[1,2,2,1]=(-0.779527532537)*x[0]+(0.10943711539)*x[1]+(0.0286417760627)*x[2]
-        arg[1,3,0,0]=(-0.500367153143)*x[0]+(-0.0315766921687)*x[1]+(0.0814977959486)*x[2]
-        arg[1,3,0,1]=(1.44010930702)*x[0]+(0.985266827661)*x[1]+(-0.4777280416)*x[2]
-        arg[1,3,1,0]=(-1.09856159209)*x[0]+(0.914767947742)*x[1]+(0.257975836816)*x[2]
-        arg[1,3,1,1]=(1.20572454864)*x[0]+(-1.18899739672)*x[1]+(-0.881322688875)*x[2]
-        arg[1,3,2,0]=(0.0683727807399)*x[0]+(0.27893403097)*x[1]+(0.532141657019)*x[2]
-        arg[1,3,2,1]=(1.22927878362)*x[0]+(-0.746664730318)*x[1]+(0.706635763178)*x[2]
-        arg[1,4,0,0]=(-0.056381118157)*x[0]+(0.497463663176)*x[1]+(-0.0170016763418)*x[2]
-        arg[1,4,0,1]=(0.220396391337)*x[0]+(-0.311295539709)*x[1]+(-0.0925408150537)*x[2]
-        arg[1,4,1,0]=(-1.26814101481)*x[0]+(1.36544235985)*x[1]+(-0.706223605983)*x[2]
-        arg[1,4,1,1]=(-0.151531826396)*x[0]+(0.709418004406)*x[1]+(0.361464674136)*x[2]
-        arg[1,4,2,0]=(-1.29637464683)*x[0]+(1.12643501861)*x[1]+(0.0119437305981)*x[2]
-        arg[1,4,2,1]=(-0.127448007113)*x[0]+(0.423470578567)*x[1]+(0.57274403474)*x[2]
-        arg[2,0,0,0]=(-0.753513005537)*x[0]+(-1.42995648081)*x[1]+(-0.748578276092)*x[2]
-        arg[2,0,0,1]=(-0.529225216075)*x[0]+(0.723600505708)*x[1]+(-0.265987788752)*x[2]
-        arg[2,0,1,0]=(0.570242632099)*x[0]+(0.7183918375)*x[1]+(-0.127239408099)*x[2]
-        arg[2,0,1,1]=(0.23496854128)*x[0]+(0.642830624861)*x[1]+(0.734149374044)*x[2]
-        arg[2,0,2,0]=(-0.302583224046)*x[0]+(0.0684944027143)*x[1]+(0.156995461545)*x[2]
-        arg[2,0,2,1]=(-0.549180930856)*x[0]+(0.334205359442)*x[1]+(1.05254428528)*x[2]
-        arg[2,1,0,0]=(-0.234799499951)*x[0]+(1.17826730605)*x[1]+(1.09739059469)*x[2]
-        arg[2,1,0,1]=(-0.187707076501)*x[0]+(0.011330011831)*x[1]+(-0.233605047453)*x[2]
-        arg[2,1,1,0]=(0.290424858876)*x[0]+(0.12865400019)*x[1]+(-1.01515096279)*x[2]
-        arg[2,1,1,1]=(-1.05797585987)*x[0]+(0.679572972092)*x[1]+(1.04481198693)*x[2]
-        arg[2,1,2,0]=(0.240336170335)*x[0]+(0.567306847159)*x[1]+(0.224146880555)*x[2]
-        arg[2,1,2,1]=(-0.568589696446)*x[0]+(1.37586080732)*x[1]+(-0.292086990344)*x[2]
-        arg[2,2,0,0]=(1.16127933088)*x[0]+(-0.205088565357)*x[1]+(-0.0262686243919)*x[2]
-        arg[2,2,0,1]=(1.17913541301)*x[0]+(-0.953527588914)*x[1]+(-1.0594095352)*x[2]
-        arg[2,2,1,0]=(-0.116342811686)*x[0]+(0.459831226378)*x[1]+(0.532324650374)*x[2]
-        arg[2,2,1,1]=(-0.904379150749)*x[0]+(0.0197201393782)*x[1]+(1.16488799459)*x[2]
-        arg[2,2,2,0]=(0.288441825708)*x[0]+(-0.00162365695053)*x[1]+(-0.696961968544)*x[2]
-        arg[2,2,2,1]=(-0.278951886334)*x[0]+(-0.438973263931)*x[1]+(-0.617387268055)*x[2]
-        arg[2,3,0,0]=(-0.575840111545)*x[0]+(-0.430583405817)*x[1]+(0.678495026384)*x[2]
-        arg[2,3,0,1]=(-0.0712810127233)*x[0]+(-0.479271089471)*x[1]+(-0.561687276819)*x[2]
-        arg[2,3,1,0]=(0.00293903214402)*x[0]+(0.707224264038)*x[1]+(0.863200461564)*x[2]
-        arg[2,3,1,1]=(-0.982725212738)*x[0]+(1.12174250462)*x[1]+(0.692163622484)*x[2]
-        arg[2,3,2,0]=(0.563182079719)*x[0]+(0.592670114886)*x[1]+(1.12490471848)*x[2]
-        arg[2,3,2,1]=(0.674175588576)*x[0]+(0.125281804818)*x[1]+(0.260310807977)*x[2]
-        arg[2,4,0,0]=(-0.468871891598)*x[0]+(0.628476449634)*x[1]+(1.44798783935)*x[2]
-        arg[2,4,0,1]=(0.331618946805)*x[0]+(1.18126898042)*x[1]+(1.73036582285)*x[2]
-        arg[2,4,1,0]=(0.643190142583)*x[0]+(0.958102048788)*x[1]+(-1.17509922201)*x[2]
-        arg[2,4,1,1]=(0.140678141755)*x[0]+(-0.964205570281)*x[1]+(1.33722038246)*x[2]
-        arg[2,4,2,0]=(1.00405626052)*x[0]+(-0.766180509924)*x[1]+(-1.12787337858)*x[2]
-        arg[2,4,2,1]=(0.015701651285)*x[0]+(-0.0327586063712)*x[1]+(-1.60288759856)*x[2]
-        arg[3,0,0,0]=(-0.0648346068133)*x[0]+(0.0319743940508)*x[1]+(-0.0885983990043)*x[2]
-        arg[3,0,0,1]=(0.440191590799)*x[0]+(-0.224950534025)*x[1]+(-1.59285278381)*x[2]
-        arg[3,0,1,0]=(-1.39437403492)*x[0]+(0.718181967012)*x[1]+(-0.320282124786)*x[2]
-        arg[3,0,1,1]=(0.212062143443)*x[0]+(0.552967368897)*x[1]+(-0.805494016261)*x[2]
-        arg[3,0,2,0]=(0.123432537169)*x[0]+(-0.124637759512)*x[1]+(-0.627011571378)*x[2]
-        arg[3,0,2,1]=(-0.112696666742)*x[0]+(-0.264195102375)*x[1]+(0.0720389973432)*x[2]
-        arg[3,1,0,0]=(-0.13525504711)*x[0]+(1.02997422411)*x[1]+(-1.00797986845)*x[2]
-        arg[3,1,0,1]=(-0.0675047394459)*x[0]+(1.39934707441)*x[1]+(-0.563292489037)*x[2]
-        arg[3,1,1,0]=(-0.597786255631)*x[0]+(0.969544698551)*x[1]+(-0.0636563520143)*x[2]
-        arg[3,1,1,1]=(0.615372705023)*x[0]+(-0.312239254268)*x[1]+(1.11108440155)*x[2]
-        arg[3,1,2,0]=(0.876145642141)*x[0]+(0.117271425687)*x[1]+(1.10498467015)*x[2]
-        arg[3,1,2,1]=(-0.881281403659)*x[0]+(0.240299603044)*x[1]+(0.14672255814)*x[2]
-        arg[3,2,0,0]=(-1.72712606675)*x[0]+(0.20271220583)*x[1]+(1.10555001416)*x[2]
-        arg[3,2,0,1]=(0.251203467531)*x[0]+(1.14031566726)*x[1]+(0.13511684108)*x[2]
-        arg[3,2,1,0]=(-0.318589273012)*x[0]+(1.22432558956)*x[1]+(0.0532448118609)*x[2]
-        arg[3,2,1,1]=(0.238528986535)*x[0]+(0.181951236101)*x[1]+(0.0816544114367)*x[2]
-        arg[3,2,2,0]=(0.691665718353)*x[0]+(0.238132802916)*x[1]+(1.0244502435)*x[2]
-        arg[3,2,2,1]=(-1.64759886895)*x[0]+(1.06200853706)*x[1]+(-0.0980251738655)*x[2]
-        arg[3,3,0,0]=(-0.0493788966334)*x[0]+(-0.471962146153)*x[1]+(0.156759333734)*x[2]
-        arg[3,3,0,1]=(-0.304056988684)*x[0]+(-0.298060200774)*x[1]+(-0.455474275206)*x[2]
-        arg[3,3,1,0]=(-0.62366321672)*x[0]+(0.229030608831)*x[1]+(0.737950069935)*x[2]
-        arg[3,3,1,1]=(0.132130038359)*x[0]+(0.749997139232)*x[1]+(-0.793138255465)*x[2]
-        arg[3,3,2,0]=(1.71562899872)*x[0]+(0.659770561383)*x[1]+(0.59886052289)*x[2]
-        arg[3,3,2,1]=(0.863622138509)*x[0]+(-0.626586688059)*x[1]+(0.744519466248)*x[2]
-        arg[3,4,0,0]=(0.0214494537522)*x[0]+(0.732351688803)*x[1]+(-0.46140559894)*x[2]
-        arg[3,4,0,1]=(1.33581215441)*x[0]+(-1.16528842961)*x[1]+(-0.888687584892)*x[2]
-        arg[3,4,1,0]=(-0.971883445892)*x[0]+(0.715423530047)*x[1]+(-0.0743908860543)*x[2]
-        arg[3,4,1,1]=(-0.941321450189)*x[0]+(-0.120890461937)*x[1]+(0.929504478456)*x[2]
-        arg[3,4,2,0]=(0.515343485731)*x[0]+(0.323772401243)*x[1]+(-1.03459959098)*x[2]
-        arg[3,4,2,1]=(0.50815257234)*x[0]+(0.461750357229)*x[1]+(0.0260081346396)*x[2]
-        ref[0,0,0,0]=(0.657131010834)*x_ref[0]+(0.925056704895)*x_ref[1]+(0.405133059909)*x_ref[2]
-        ref[0,0,0,1]=(1.00133275423)*x_ref[0]+(0.804604848583)*x_ref[1]+(-0.127865284577)*x_ref[2]
-        ref[0,0,1,0]=(-1.43854141172)*x_ref[0]+(0.461779683792)*x_ref[1]+(-1.35332048209)*x_ref[2]
-        ref[0,0,1,1]=(0.00990645894894)*x_ref[0]+(-0.127101800988)*x_ref[1]+(-0.105358765313)*x_ref[2]
-        ref[0,0,2,0]=(0.116780997053)*x_ref[0]+(1.14704063829)*x_ref[1]+(-0.0190951296257)*x_ref[2]
-        ref[0,0,2,1]=(0.485352133633)*x_ref[0]+(0.232507104974)*x_ref[1]+(-1.13067055888)*x_ref[2]
-        ref[0,1,0,0]=(-0.350822544873)*x_ref[0]+(-0.812391120478)*x_ref[1]+(0.215924121867)*x_ref[2]
-        ref[0,1,0,1]=(-0.351284651716)*x_ref[0]+(-0.221990440191)*x_ref[1]+(-0.223075105598)*x_ref[2]
-        ref[0,1,1,0]=(-0.148376043654)*x_ref[0]+(0.571632161665)*x_ref[1]+(0.519163900078)*x_ref[2]
-        ref[0,1,1,1]=(-1.45038964408)*x_ref[0]+(0.302237803429)*x_ref[1]+(0.742483356143)*x_ref[2]
-        ref[0,1,2,0]=(-0.504270471573)*x_ref[0]+(0.450418202232)*x_ref[1]+(-0.111778328066)*x_ref[2]
-        ref[0,1,2,1]=(-0.0249264677684)*x_ref[0]+(-1.50643033256)*x_ref[1]+(-1.35775630013)*x_ref[2]
-        ref[0,2,0,0]=(0.303211268309)*x_ref[0]+(-0.464853430563)*x_ref[1]+(0.649958565051)*x_ref[2]
-        ref[0,2,0,1]=(-0.099640500895)*x_ref[0]+(-0.190653996191)*x_ref[1]+(1.25662361146)*x_ref[2]
-        ref[0,2,1,0]=(0.196051285683)*x_ref[0]+(-0.0405207084252)*x_ref[1]+(-0.247626612712)*x_ref[2]
-        ref[0,2,1,1]=(0.466541264508)*x_ref[0]+(1.12203001637)*x_ref[1]+(0.214880867458)*x_ref[2]
-        ref[0,2,2,0]=(-0.066399925725)*x_ref[0]+(-0.246038048418)*x_ref[1]+(-1.36436628718)*x_ref[2]
-        ref[0,2,2,1]=(1.11813537863)*x_ref[0]+(-1.09166896181)*x_ref[1]+(0.321936214135)*x_ref[2]
-        ref[0,3,0,0]=(0.374873324445)*x_ref[0]+(-0.465943548272)*x_ref[1]+(0.0190372923331)*x_ref[2]
-        ref[0,3,0,1]=(0.833988907462)*x_ref[0]+(-1.01195758004)*x_ref[1]+(0.237305351727)*x_ref[2]
-        ref[0,3,1,0]=(0.311900067643)*x_ref[0]+(-1.11508238642)*x_ref[1]+(-1.04912391557)*x_ref[2]
-        ref[0,3,1,1]=(-0.211460991448)*x_ref[0]+(-0.768164308901)*x_ref[1]+(-0.450128967205)*x_ref[2]
-        ref[0,3,2,0]=(-0.412678195326)*x_ref[0]+(-0.0808659043088)*x_ref[1]+(0.588002415672)*x_ref[2]
-        ref[0,3,2,1]=(-1.25661069251)*x_ref[0]+(-1.51596081235)*x_ref[1]+(-1.38001371964)*x_ref[2]
-        ref[0,4,0,0]=(0.0822281994319)*x_ref[0]+(-0.726137997384)*x_ref[1]+(0.20532237702)*x_ref[2]
-        ref[0,4,0,1]=(-0.538872250604)*x_ref[0]+(0.669139417413)*x_ref[1]+(0.235909494023)*x_ref[2]
-        ref[0,4,1,0]=(0.171512295446)*x_ref[0]+(-1.37296529156)*x_ref[1]+(1.25081328539)*x_ref[2]
-        ref[0,4,1,1]=(-0.440062802901)*x_ref[0]+(1.32591598513)*x_ref[1]+(0.802645502519)*x_ref[2]
-        ref[0,4,2,0]=(1.55151533491)*x_ref[0]+(0.923232387757)*x_ref[1]+(-0.238979557225)*x_ref[2]
-        ref[0,4,2,1]=(-0.193306423923)*x_ref[0]+(-0.565399635257)*x_ref[1]+(-0.149043846608)*x_ref[2]
-        ref[1,0,0,0]=(0.152247539316)*x_ref[0]+(-1.219763414)*x_ref[1]+(0.836742536417)*x_ref[2]
-        ref[1,0,0,1]=(0.279236863017)*x_ref[0]+(0.14118432621)*x_ref[1]+(-0.33072070595)*x_ref[2]
-        ref[1,0,1,0]=(-0.242848555181)*x_ref[0]+(-0.981144530476)*x_ref[1]+(-0.925220699112)*x_ref[2]
-        ref[1,0,1,1]=(-1.8765425995)*x_ref[0]+(-0.0878096696901)*x_ref[1]+(0.133461124587)*x_ref[2]
-        ref[1,0,2,0]=(-0.282373512491)*x_ref[0]+(0.640862824684)*x_ref[1]+(-1.41391625471)*x_ref[2]
-        ref[1,0,2,1]=(0.168260007994)*x_ref[0]+(0.660595443409)*x_ref[1]+(1.14161006755)*x_ref[2]
-        ref[1,1,0,0]=(-0.160956063437)*x_ref[0]+(-0.60581390216)*x_ref[1]+(1.28589122111)*x_ref[2]
-        ref[1,1,0,1]=(0.0969448014041)*x_ref[0]+(-1.63715420302)*x_ref[1]+(-0.350879443881)*x_ref[2]
-        ref[1,1,1,0]=(0.0878659583502)*x_ref[0]+(1.13265578932)*x_ref[1]+(-0.615846752768)*x_ref[2]
-        ref[1,1,1,1]=(-0.434597962742)*x_ref[0]+(-0.177532580699)*x_ref[1]+(0.543921860391)*x_ref[2]
-        ref[1,1,2,0]=(-0.7739187322)*x_ref[0]+(-0.285452235523)*x_ref[1]+(-0.0426663737344)*x_ref[2]
-        ref[1,1,2,1]=(0.796313217511)*x_ref[0]+(-1.12909584404)*x_ref[1]+(1.26302048961)*x_ref[2]
-        ref[1,2,0,0]=(1.62555299859)*x_ref[0]+(-1.1660403401)*x_ref[1]+(-0.668592413245)*x_ref[2]
-        ref[1,2,0,1]=(-0.807742954877)*x_ref[0]+(-0.238532476847)*x_ref[1]+(-1.13575189406)*x_ref[2]
-        ref[1,2,1,0]=(-0.139280450456)*x_ref[0]+(-0.043306992095)*x_ref[1]+(0.832351898761)*x_ref[2]
-        ref[1,2,1,1]=(0.16731150192)*x_ref[0]+(0.0705653171485)*x_ref[1]+(0.12943106453)*x_ref[2]
-        ref[1,2,2,0]=(0.669247838367)*x_ref[0]+(1.10177451339)*x_ref[1]+(1.21850224582)*x_ref[2]
-        ref[1,2,2,1]=(-0.779527532537)*x_ref[0]+(0.10943711539)*x_ref[1]+(0.0286417760627)*x_ref[2]
-        ref[1,3,0,0]=(-0.500367153143)*x_ref[0]+(-0.0315766921687)*x_ref[1]+(0.0814977959486)*x_ref[2]
-        ref[1,3,0,1]=(1.44010930702)*x_ref[0]+(0.985266827661)*x_ref[1]+(-0.4777280416)*x_ref[2]
-        ref[1,3,1,0]=(-1.09856159209)*x_ref[0]+(0.914767947742)*x_ref[1]+(0.257975836816)*x_ref[2]
-        ref[1,3,1,1]=(1.20572454864)*x_ref[0]+(-1.18899739672)*x_ref[1]+(-0.881322688875)*x_ref[2]
-        ref[1,3,2,0]=(0.0683727807399)*x_ref[0]+(0.27893403097)*x_ref[1]+(0.532141657019)*x_ref[2]
-        ref[1,3,2,1]=(1.22927878362)*x_ref[0]+(-0.746664730318)*x_ref[1]+(0.706635763178)*x_ref[2]
-        ref[1,4,0,0]=(-0.056381118157)*x_ref[0]+(0.497463663176)*x_ref[1]+(-0.0170016763418)*x_ref[2]
-        ref[1,4,0,1]=(0.220396391337)*x_ref[0]+(-0.311295539709)*x_ref[1]+(-0.0925408150537)*x_ref[2]
-        ref[1,4,1,0]=(-1.26814101481)*x_ref[0]+(1.36544235985)*x_ref[1]+(-0.706223605983)*x_ref[2]
-        ref[1,4,1,1]=(-0.151531826396)*x_ref[0]+(0.709418004406)*x_ref[1]+(0.361464674136)*x_ref[2]
-        ref[1,4,2,0]=(-1.29637464683)*x_ref[0]+(1.12643501861)*x_ref[1]+(0.0119437305981)*x_ref[2]
-        ref[1,4,2,1]=(-0.127448007113)*x_ref[0]+(0.423470578567)*x_ref[1]+(0.57274403474)*x_ref[2]
-        ref[2,0,0,0]=(-0.753513005537)*x_ref[0]+(-1.42995648081)*x_ref[1]+(-0.748578276092)*x_ref[2]
-        ref[2,0,0,1]=(-0.529225216075)*x_ref[0]+(0.723600505708)*x_ref[1]+(-0.265987788752)*x_ref[2]
-        ref[2,0,1,0]=(0.570242632099)*x_ref[0]+(0.7183918375)*x_ref[1]+(-0.127239408099)*x_ref[2]
-        ref[2,0,1,1]=(0.23496854128)*x_ref[0]+(0.642830624861)*x_ref[1]+(0.734149374044)*x_ref[2]
-        ref[2,0,2,0]=(-0.302583224046)*x_ref[0]+(0.0684944027143)*x_ref[1]+(0.156995461545)*x_ref[2]
-        ref[2,0,2,1]=(-0.549180930856)*x_ref[0]+(0.334205359442)*x_ref[1]+(1.05254428528)*x_ref[2]
-        ref[2,1,0,0]=(-0.234799499951)*x_ref[0]+(1.17826730605)*x_ref[1]+(1.09739059469)*x_ref[2]
-        ref[2,1,0,1]=(-0.187707076501)*x_ref[0]+(0.011330011831)*x_ref[1]+(-0.233605047453)*x_ref[2]
-        ref[2,1,1,0]=(0.290424858876)*x_ref[0]+(0.12865400019)*x_ref[1]+(-1.01515096279)*x_ref[2]
-        ref[2,1,1,1]=(-1.05797585987)*x_ref[0]+(0.679572972092)*x_ref[1]+(1.04481198693)*x_ref[2]
-        ref[2,1,2,0]=(0.240336170335)*x_ref[0]+(0.567306847159)*x_ref[1]+(0.224146880555)*x_ref[2]
-        ref[2,1,2,1]=(-0.568589696446)*x_ref[0]+(1.37586080732)*x_ref[1]+(-0.292086990344)*x_ref[2]
-        ref[2,2,0,0]=(1.16127933088)*x_ref[0]+(-0.205088565357)*x_ref[1]+(-0.0262686243919)*x_ref[2]
-        ref[2,2,0,1]=(1.17913541301)*x_ref[0]+(-0.953527588914)*x_ref[1]+(-1.0594095352)*x_ref[2]
-        ref[2,2,1,0]=(-0.116342811686)*x_ref[0]+(0.459831226378)*x_ref[1]+(0.532324650374)*x_ref[2]
-        ref[2,2,1,1]=(-0.904379150749)*x_ref[0]+(0.0197201393782)*x_ref[1]+(1.16488799459)*x_ref[2]
-        ref[2,2,2,0]=(0.288441825708)*x_ref[0]+(-0.00162365695053)*x_ref[1]+(-0.696961968544)*x_ref[2]
-        ref[2,2,2,1]=(-0.278951886334)*x_ref[0]+(-0.438973263931)*x_ref[1]+(-0.617387268055)*x_ref[2]
-        ref[2,3,0,0]=(-0.575840111545)*x_ref[0]+(-0.430583405817)*x_ref[1]+(0.678495026384)*x_ref[2]
-        ref[2,3,0,1]=(-0.0712810127233)*x_ref[0]+(-0.479271089471)*x_ref[1]+(-0.561687276819)*x_ref[2]
-        ref[2,3,1,0]=(0.00293903214402)*x_ref[0]+(0.707224264038)*x_ref[1]+(0.863200461564)*x_ref[2]
-        ref[2,3,1,1]=(-0.982725212738)*x_ref[0]+(1.12174250462)*x_ref[1]+(0.692163622484)*x_ref[2]
-        ref[2,3,2,0]=(0.563182079719)*x_ref[0]+(0.592670114886)*x_ref[1]+(1.12490471848)*x_ref[2]
-        ref[2,3,2,1]=(0.674175588576)*x_ref[0]+(0.125281804818)*x_ref[1]+(0.260310807977)*x_ref[2]
-        ref[2,4,0,0]=(-0.468871891598)*x_ref[0]+(0.628476449634)*x_ref[1]+(1.44798783935)*x_ref[2]
-        ref[2,4,0,1]=(0.331618946805)*x_ref[0]+(1.18126898042)*x_ref[1]+(1.73036582285)*x_ref[2]
-        ref[2,4,1,0]=(0.643190142583)*x_ref[0]+(0.958102048788)*x_ref[1]+(-1.17509922201)*x_ref[2]
-        ref[2,4,1,1]=(0.140678141755)*x_ref[0]+(-0.964205570281)*x_ref[1]+(1.33722038246)*x_ref[2]
-        ref[2,4,2,0]=(1.00405626052)*x_ref[0]+(-0.766180509924)*x_ref[1]+(-1.12787337858)*x_ref[2]
-        ref[2,4,2,1]=(0.015701651285)*x_ref[0]+(-0.0327586063712)*x_ref[1]+(-1.60288759856)*x_ref[2]
-        ref[3,0,0,0]=(-0.0648346068133)*x_ref[0]+(0.0319743940508)*x_ref[1]+(-0.0885983990043)*x_ref[2]
-        ref[3,0,0,1]=(0.440191590799)*x_ref[0]+(-0.224950534025)*x_ref[1]+(-1.59285278381)*x_ref[2]
-        ref[3,0,1,0]=(-1.39437403492)*x_ref[0]+(0.718181967012)*x_ref[1]+(-0.320282124786)*x_ref[2]
-        ref[3,0,1,1]=(0.212062143443)*x_ref[0]+(0.552967368897)*x_ref[1]+(-0.805494016261)*x_ref[2]
-        ref[3,0,2,0]=(0.123432537169)*x_ref[0]+(-0.124637759512)*x_ref[1]+(-0.627011571378)*x_ref[2]
-        ref[3,0,2,1]=(-0.112696666742)*x_ref[0]+(-0.264195102375)*x_ref[1]+(0.0720389973432)*x_ref[2]
-        ref[3,1,0,0]=(-0.13525504711)*x_ref[0]+(1.02997422411)*x_ref[1]+(-1.00797986845)*x_ref[2]
-        ref[3,1,0,1]=(-0.0675047394459)*x_ref[0]+(1.39934707441)*x_ref[1]+(-0.563292489037)*x_ref[2]
-        ref[3,1,1,0]=(-0.597786255631)*x_ref[0]+(0.969544698551)*x_ref[1]+(-0.0636563520143)*x_ref[2]
-        ref[3,1,1,1]=(0.615372705023)*x_ref[0]+(-0.312239254268)*x_ref[1]+(1.11108440155)*x_ref[2]
-        ref[3,1,2,0]=(0.876145642141)*x_ref[0]+(0.117271425687)*x_ref[1]+(1.10498467015)*x_ref[2]
-        ref[3,1,2,1]=(-0.881281403659)*x_ref[0]+(0.240299603044)*x_ref[1]+(0.14672255814)*x_ref[2]
-        ref[3,2,0,0]=(-1.72712606675)*x_ref[0]+(0.20271220583)*x_ref[1]+(1.10555001416)*x_ref[2]
-        ref[3,2,0,1]=(0.251203467531)*x_ref[0]+(1.14031566726)*x_ref[1]+(0.13511684108)*x_ref[2]
-        ref[3,2,1,0]=(-0.318589273012)*x_ref[0]+(1.22432558956)*x_ref[1]+(0.0532448118609)*x_ref[2]
-        ref[3,2,1,1]=(0.238528986535)*x_ref[0]+(0.181951236101)*x_ref[1]+(0.0816544114367)*x_ref[2]
-        ref[3,2,2,0]=(0.691665718353)*x_ref[0]+(0.238132802916)*x_ref[1]+(1.0244502435)*x_ref[2]
-        ref[3,2,2,1]=(-1.64759886895)*x_ref[0]+(1.06200853706)*x_ref[1]+(-0.0980251738655)*x_ref[2]
-        ref[3,3,0,0]=(-0.0493788966334)*x_ref[0]+(-0.471962146153)*x_ref[1]+(0.156759333734)*x_ref[2]
-        ref[3,3,0,1]=(-0.304056988684)*x_ref[0]+(-0.298060200774)*x_ref[1]+(-0.455474275206)*x_ref[2]
-        ref[3,3,1,0]=(-0.62366321672)*x_ref[0]+(0.229030608831)*x_ref[1]+(0.737950069935)*x_ref[2]
-        ref[3,3,1,1]=(0.132130038359)*x_ref[0]+(0.749997139232)*x_ref[1]+(-0.793138255465)*x_ref[2]
-        ref[3,3,2,0]=(1.71562899872)*x_ref[0]+(0.659770561383)*x_ref[1]+(0.59886052289)*x_ref[2]
-        ref[3,3,2,1]=(0.863622138509)*x_ref[0]+(-0.626586688059)*x_ref[1]+(0.744519466248)*x_ref[2]
-        ref[3,4,0,0]=(0.0214494537522)*x_ref[0]+(0.732351688803)*x_ref[1]+(-0.46140559894)*x_ref[2]
-        ref[3,4,0,1]=(1.33581215441)*x_ref[0]+(-1.16528842961)*x_ref[1]+(-0.888687584892)*x_ref[2]
-        ref[3,4,1,0]=(-0.971883445892)*x_ref[0]+(0.715423530047)*x_ref[1]+(-0.0743908860543)*x_ref[2]
-        ref[3,4,1,1]=(-0.941321450189)*x_ref[0]+(-0.120890461937)*x_ref[1]+(0.929504478456)*x_ref[2]
-        ref[3,4,2,0]=(0.515343485731)*x_ref[0]+(0.323772401243)*x_ref[1]+(-1.03459959098)*x_ref[2]
-        ref[3,4,2,1]=(0.50815257234)*x_ref[0]+(0.461750357229)*x_ref[1]+(0.0260081346396)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onFunction_fromData_ContinuousFunction(self):
-      """
-      tests divergence of Data on the Function
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports div on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(-0.627139584179)*x[0]**o+(0.0871027334774)*x[0]+(-0.540784323698)*x[1]**o+(0.951143032871)*x[1]
-        arg[1]=(-0.119239347115)*x[0]**o+(0.277154010744)*x[0]+(-0.0745557686973)*x[1]**o+(-0.15832879535)*x[1]
-        ref=o*(-0.627139584179)*x_ref[0]**(o-1)+o*(-0.0745557686973)*x_ref[1]**(o-1)+(-0.0712260618722)
-      else:
-        arg[0]=(0.687070465546)*x[0]**o+(0.789237250884)*x[0]+(-0.00415360035876)*x[1]**o+(-0.809802614239)*x[1]+(0.418087966616)*x[2]**o+(0.730203229934)*x[2]
-        arg[1]=(-0.0962217374268)*x[0]**o+(-0.180692492986)*x[0]+(-0.59921793179)*x[1]**o+(-0.799342788982)*x[1]+(0.421364766686)*x[2]**o+(-0.586211831795)*x[2]
-        arg[2]=(0.774915504102)*x[0]**o+(-0.968436517935)*x[0]+(0.325821385033)*x[1]**o+(-0.159885723341)*x[1]+(0.411134413872)*x[2]**o+(0.083388357951)*x[2]
-        ref=o*(0.687070465546)*x_ref[0]**(o-1)+o*(-0.59921793179)*x_ref[1]**(o-1)+o*(0.411134413872)*x_ref[2]**(o-1)+(0.0732828198535)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onFunction_fromData_Solution(self):
-      """
-      tests divergence of Data on the Function
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports div on Function
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(-0.037254966228)*x[0]**o+(-0.175442318226)*x[0]+(-0.723089592066)*x[1]**o+(-0.487393332634)*x[1]
-        arg[1]=(0.617589532887)*x[0]**o+(0.392126578405)*x[0]+(0.612110931251)*x[1]**o+(-0.932236829843)*x[1]
-        ref=o*(-0.037254966228)*x_ref[0]**(o-1)+o*(0.612110931251)*x_ref[1]**(o-1)+(-1.10767914807)
-      else:
-        arg[0]=(-0.855344637098)*x[0]**o+(0.152992485241)*x[0]+(0.519809077415)*x[1]**o+(-0.0514985311411)*x[1]+(-0.473095642241)*x[2]**o+(-0.743711945025)*x[2]
-        arg[1]=(0.629819444749)*x[0]**o+(-0.649277860811)*x[0]+(-0.382231371814)*x[1]**o+(-0.354475847319)*x[1]+(0.523961319618)*x[2]**o+(-0.0301027430993)*x[2]
-        arg[2]=(0.489214433445)*x[0]**o+(-0.340824606014)*x[0]+(-0.78445257629)*x[1]**o+(-0.821498813523)*x[1]+(-0.147119976738)*x[2]**o+(0.464427291378)*x[2]
-        ref=o*(-0.855344637098)*x_ref[0]**(o-1)+o*(-0.382231371814)*x_ref[1]**(o-1)+o*(-0.147119976738)*x_ref[2]**(o-1)+(0.2629439293)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onFunction_fromData_ReducedSolution(self):
-      """
-      tests divergence of Data on the Function
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports div on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(0.983549953155)*x[0]+(0.741104834322)*x[1]
-        arg[1]=(0.548447952865)*x[0]+(-0.817326874507)*x[1]
-        ref=(0.166223078648)
-      else:
-        arg[0]=(1.39002615085)*x[0]+(0.609245504565)*x[1]+(-1.06625041498)*x[2]
-        arg[1]=(-1.13329921103)*x[0]+(0.160224729695)*x[1]+(0.408632198066)*x[2]
-        arg[2]=(0.124694320475)*x[0]+(-1.53975404419)*x[1]+(1.00224340458)*x[2]
-        ref=(2.55249428513)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onFunction_fromData_ReducedContinuousFunction(self):
-      """
-      tests divergence of Data on the Function
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports div on Function
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=Function(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(0.983549953155)*x[0]+(0.741104834322)*x[1]
-        arg[1]=(0.548447952865)*x[0]+(-0.817326874507)*x[1]
-        ref=(0.166223078648)
-      else:
-        arg[0]=(1.39002615085)*x[0]+(0.609245504565)*x[1]+(-1.06625041498)*x[2]
-        arg[1]=(-1.13329921103)*x[0]+(0.160224729695)*x[1]+(0.408632198066)*x[2]
-        arg[2]=(0.124694320475)*x[0]+(-1.53975404419)*x[1]+(1.00224340458)*x[2]
-        ref=(2.55249428513)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onReducedFunction_fromData_ContinuousFunction(self):
-      """
-      tests divergence of Data on the ReducedFunction
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports div on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(-0.627139584179)*x[0]**o+(0.0871027334774)*x[0]+(-0.540784323698)*x[1]**o+(0.951143032871)*x[1]
-        arg[1]=(-0.119239347115)*x[0]**o+(0.277154010744)*x[0]+(-0.0745557686973)*x[1]**o+(-0.15832879535)*x[1]
-        ref=o*(-0.627139584179)*x_ref[0]**(o-1)+o*(-0.0745557686973)*x_ref[1]**(o-1)+(-0.0712260618722)
-      else:
-        arg[0]=(0.687070465546)*x[0]**o+(0.789237250884)*x[0]+(-0.00415360035876)*x[1]**o+(-0.809802614239)*x[1]+(0.418087966616)*x[2]**o+(0.730203229934)*x[2]
-        arg[1]=(-0.0962217374268)*x[0]**o+(-0.180692492986)*x[0]+(-0.59921793179)*x[1]**o+(-0.799342788982)*x[1]+(0.421364766686)*x[2]**o+(-0.586211831795)*x[2]
-        arg[2]=(0.774915504102)*x[0]**o+(-0.968436517935)*x[0]+(0.325821385033)*x[1]**o+(-0.159885723341)*x[1]+(0.411134413872)*x[2]**o+(0.083388357951)*x[2]
-        ref=o*(0.687070465546)*x_ref[0]**(o-1)+o*(-0.59921793179)*x_ref[1]**(o-1)+o*(0.411134413872)*x_ref[2]**(o-1)+(0.0732828198535)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onReducedFunction_fromData_Solution(self):
-      """
-      tests divergence of Data on the ReducedFunction
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports div on ReducedFunction
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(-0.037254966228)*x[0]**o+(-0.175442318226)*x[0]+(-0.723089592066)*x[1]**o+(-0.487393332634)*x[1]
-        arg[1]=(0.617589532887)*x[0]**o+(0.392126578405)*x[0]+(0.612110931251)*x[1]**o+(-0.932236829843)*x[1]
-        ref=o*(-0.037254966228)*x_ref[0]**(o-1)+o*(0.612110931251)*x_ref[1]**(o-1)+(-1.10767914807)
-      else:
-        arg[0]=(-0.855344637098)*x[0]**o+(0.152992485241)*x[0]+(0.519809077415)*x[1]**o+(-0.0514985311411)*x[1]+(-0.473095642241)*x[2]**o+(-0.743711945025)*x[2]
-        arg[1]=(0.629819444749)*x[0]**o+(-0.649277860811)*x[0]+(-0.382231371814)*x[1]**o+(-0.354475847319)*x[1]+(0.523961319618)*x[2]**o+(-0.0301027430993)*x[2]
-        arg[2]=(0.489214433445)*x[0]**o+(-0.340824606014)*x[0]+(-0.78445257629)*x[1]**o+(-0.821498813523)*x[1]+(-0.147119976738)*x[2]**o+(0.464427291378)*x[2]
-        ref=o*(-0.855344637098)*x_ref[0]**(o-1)+o*(-0.382231371814)*x_ref[1]**(o-1)+o*(-0.147119976738)*x_ref[2]**(o-1)+(0.2629439293)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onReducedFunction_fromData_ReducedSolution(self):
-      """
-      tests divergence of Data on the ReducedFunction
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports div on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(0.983549953155)*x[0]+(0.741104834322)*x[1]
-        arg[1]=(0.548447952865)*x[0]+(-0.817326874507)*x[1]
-        ref=(0.166223078648)
-      else:
-        arg[0]=(1.39002615085)*x[0]+(0.609245504565)*x[1]+(-1.06625041498)*x[2]
-        arg[1]=(-1.13329921103)*x[0]+(0.160224729695)*x[1]+(0.408632198066)*x[2]
-        arg[2]=(0.124694320475)*x[0]+(-1.53975404419)*x[1]+(1.00224340458)*x[2]
-        ref=(2.55249428513)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_div_onReducedFunction_fromData_ReducedContinuousFunction(self):
-      """
-      tests divergence of Data on the ReducedFunction
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports div on ReducedFunction
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunction(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Vector(0,w)
-      if dim==2:
-        arg[0]=(0.983549953155)*x[0]+(0.741104834322)*x[1]
-        arg[1]=(0.548447952865)*x[0]+(-0.817326874507)*x[1]
-        ref=(0.166223078648)
-      else:
-        arg[0]=(1.39002615085)*x[0]+(0.609245504565)*x[1]+(-1.06625041498)*x[2]
-        arg[1]=(-1.13329921103)*x[0]+(0.160224729695)*x[1]+(0.408632198066)*x[2]
-        arg[2]=(0.124694320475)*x[0]+(-1.53975404419)*x[1]+(1.00224340458)*x[2]
-        ref=(2.55249428513)
-      res=div(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong function space of result.")
-      self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_L2_onFunction_fromData_rank0(self):
       """
       tests L2-norm of Data on the Function
diff --git a/escriptcore/test/python/test_util_spatial_functions2.py b/escriptcore/test/python/test_util_spatial_functions2.py
index e0067d4..820b339 100644
--- a/escriptcore/test/python/test_util_spatial_functions2.py
+++ b/escriptcore/test/python/test_util_spatial_functions2.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -45,10 +45,12 @@ from numpy import array
 import numpy
 
 from test_util_spatial_functions1 import Test_Util_SpatialFunctions_noGradOnBoundary_noContact
+from test_util_integrals import Test_Util_Integration
+from test_util_interpolation import Test_Util_Interpolation
 
 #begin
 
-class Test_Util_SpatialFunctions_noGradOnBoundary(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
+class Test_Util_SpatialFunctions_noGradOnBoundary(Test_Util_SpatialFunctions_noGradOnBoundary_noContact, Test_Util_Integration, Test_Util_Interpolation):
    RES_TOL=1.e-8
 
    def test_normal_onFunctionOnContactZero(self):
@@ -133,38766 +135,6 @@ class Test_Util_SpatialFunctions_noGradOnBoundary(Test_Util_SpatialFunctions_noG
      self.assertTrue(Lsup(length(res)-1)<=self.RES_TOL,"wrong length")
      self.assertTrue(Lsup(abs(inner(ref,res))-1)<=self.RES_TOL,"wrong direction")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_integrate_onFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
-      """
-      tests integral of rank 0 Data on the 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.311774053155)*x[0]**o+(0.52292841627)*x[0]+(-0.518467126196)*x[1]**o+(-0.11329290159)*x[1]
-        ref=(-0.518467126196)/(o+1.)+(0.20481775734)+(0.311774053155)*0.5**o
-      else:
-        arg=(0.233765319091)*x[0]**o+(-0.453551209762)*x[0]+(0.920140231713)*x[1]**o+(0.741695479084)*x[1]+(-0.255834461065)*x[2]**o+(-0.102580899053)*x[2]
-        ref=(0.664305770648)/(o+1.)+(0.0927816851348)+(0.233765319091)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.651678780872)*x[0]**o+(-0.749709447394)*x[0]+(0.311088209082)*x[1]**o+(0.553081401193)*x[1]
-        arg[1]=(0.657887728987)*x[0]**o+(0.052270143604)*x[0]+(-0.15507994277)*x[1]**o+(-0.30302150082)*x[1]
-        ref[0]=(0.311088209082)/(o+1.)+(-0.0983140231004)+(-0.651678780872)*0.5**o
-        ref[1]=(-0.15507994277)/(o+1.)+(-0.125375678608)+(0.657887728987)*0.5**o
-      else:
-        arg[0]=(0.844909347644)*x[0]**o+(-0.342697697483)*x[0]+(0.126242548186)*x[1]**o+(-0.854010732849)*x[1]+(-0.307627587461)*x[2]**o+(-0.998566290754)*x[2]
-        arg[1]=(0.900073726701)*x[0]**o+(-0.703841701859)*x[0]+(-0.651690896499)*x[1]**o+(0.828362322181)*x[1]+(0.284410420895)*x[2]**o+(-0.394606348974)*x[2]
-        ref[0]=(-0.181385039275)/(o+1.)+(-1.09763736054)+(0.844909347644)*0.5**o
-        ref[1]=(-0.367280475604)/(o+1.)+(-0.135042864326)+(0.900073726701)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.263642681371)*x[0]**o+(0.668992571787)*x[0]+(0.873939846194)*x[1]**o+(0.784820355998)*x[1]
-        arg[0,1]=(-0.389306088628)*x[0]**o+(-0.0549482389907)*x[0]+(-0.787101008457)*x[1]**o+(0.860345123812)*x[1]
-        arg[0,2]=(-0.995721191961)*x[0]**o+(-0.587928136153)*x[0]+(-0.378312614832)*x[1]**o+(0.199765674281)*x[1]
-        arg[0,3]=(-0.374679425145)*x[0]**o+(-0.503606183146)*x[0]+(0.23995738992)*x[1]**o+(-0.525359181744)*x[1]
-        arg[0,4]=(-0.69923255665)*x[0]**o+(0.547634979941)*x[0]+(0.728792702739)*x[1]**o+(0.949888533828)*x[1]
-        arg[1,0]=(-0.61856415528)*x[0]**o+(-0.0516239651093)*x[0]+(0.158516649979)*x[1]**o+(-0.0522288881011)*x[1]
-        arg[1,1]=(0.0285524133857)*x[0]**o+(0.741357758307)*x[0]+(-0.0714860903847)*x[1]**o+(-0.539632750385)*x[1]
-        arg[1,2]=(-0.291101401382)*x[0]**o+(-0.114900246437)*x[0]+(-0.982305031665)*x[1]**o+(0.0823478844055)*x[1]
-        arg[1,3]=(-0.931305732525)*x[0]**o+(0.077332436417)*x[0]+(-0.880626154921)*x[1]**o+(-0.321222234507)*x[1]
-        arg[1,4]=(-0.00778033208815)*x[0]**o+(-0.536626847957)*x[0]+(-0.599742714546)*x[1]**o+(0.454108299336)*x[1]
-        arg[2,0]=(-0.575243090445)*x[0]**o+(-0.920247228564)*x[0]+(0.4569784462)*x[1]**o+(-0.105175798804)*x[1]
-        arg[2,1]=(0.333985911748)*x[0]**o+(-0.017876213076)*x[0]+(0.475164778165)*x[1]**o+(0.561072178015)*x[1]
-        arg[2,2]=(-0.559587786773)*x[0]**o+(-0.917134128672)*x[0]+(0.316654889327)*x[1]**o+(-0.640569595027)*x[1]
-        arg[2,3]=(-0.140461324817)*x[0]**o+(0.259052969883)*x[0]+(0.397898509159)*x[1]**o+(0.932233331785)*x[1]
-        arg[2,4]=(0.368626304985)*x[0]**o+(0.616310502384)*x[0]+(-0.756845293566)*x[1]**o+(-0.920088968132)*x[1]
-        arg[3,0]=(-0.824398741087)*x[0]**o+(0.0498115894252)*x[0]+(-0.5256621655)*x[1]**o+(0.114806237108)*x[1]
-        arg[3,1]=(-0.77671057316)*x[0]**o+(0.569249443162)*x[0]+(0.416628465801)*x[1]**o+(0.0603627487913)*x[1]
-        arg[3,2]=(-0.247875220913)*x[0]**o+(0.19548828878)*x[0]+(0.643226101838)*x[1]**o+(-0.154558826499)*x[1]
-        arg[3,3]=(-0.918937118963)*x[0]**o+(0.193777174417)*x[0]+(-0.906042347107)*x[1]**o+(0.872033230033)*x[1]
-        arg[3,4]=(-0.628918336086)*x[0]**o+(0.823242191714)*x[0]+(-0.593691166712)*x[1]**o+(-0.661715840814)*x[1]
-        ref[0,0]=(0.873939846194)/(o+1.)+(0.726906463892)+(-0.263642681371)*0.5**o
-        ref[0,1]=(-0.787101008457)/(o+1.)+(0.402698442411)+(-0.389306088628)*0.5**o
-        ref[0,2]=(-0.378312614832)/(o+1.)+(-0.194081230936)+(-0.995721191961)*0.5**o
-        ref[0,3]=(0.23995738992)/(o+1.)+(-0.514482682445)+(-0.374679425145)*0.5**o
-        ref[0,4]=(0.728792702739)/(o+1.)+(0.748761756885)+(-0.69923255665)*0.5**o
-        ref[1,0]=(0.158516649979)/(o+1.)+(-0.0519264266052)+(-0.61856415528)*0.5**o
-        ref[1,1]=(-0.0714860903847)/(o+1.)+(0.100862503961)+(0.0285524133857)*0.5**o
-        ref[1,2]=(-0.982305031665)/(o+1.)+(-0.0162761810159)+(-0.291101401382)*0.5**o
-        ref[1,3]=(-0.880626154921)/(o+1.)+(-0.121944899045)+(-0.931305732525)*0.5**o
-        ref[1,4]=(-0.599742714546)/(o+1.)+(-0.0412592743102)+(-0.00778033208815)*0.5**o
-        ref[2,0]=(0.4569784462)/(o+1.)+(-0.512711513684)+(-0.575243090445)*0.5**o
-        ref[2,1]=(0.475164778165)/(o+1.)+(0.27159798247)+(0.333985911748)*0.5**o
-        ref[2,2]=(0.316654889327)/(o+1.)+(-0.778851861849)+(-0.559587786773)*0.5**o
-        ref[2,3]=(0.397898509159)/(o+1.)+(0.595643150834)+(-0.140461324817)*0.5**o
-        ref[2,4]=(-0.756845293566)/(o+1.)+(-0.151889232874)+(0.368626304985)*0.5**o
-        ref[3,0]=(-0.5256621655)/(o+1.)+(0.0823089132668)+(-0.824398741087)*0.5**o
-        ref[3,1]=(0.416628465801)/(o+1.)+(0.314806095977)+(-0.77671057316)*0.5**o
-        ref[3,2]=(0.643226101838)/(o+1.)+(0.0204647311405)+(-0.247875220913)*0.5**o
-        ref[3,3]=(-0.906042347107)/(o+1.)+(0.532905202225)+(-0.918937118963)*0.5**o
-        ref[3,4]=(-0.593691166712)/(o+1.)+(0.0807631754499)+(-0.628918336086)*0.5**o
-      else:
-        arg[0,0]=(0.748857269399)*x[0]**o+(-0.21982973469)*x[0]+(-0.765987921295)*x[1]**o+(0.556577019909)*x[1]+(-0.0438548079278)*x[2]**o+(0.543610874817)*x[2]
-        arg[0,1]=(-0.784526004748)*x[0]**o+(-0.949423172035)*x[0]+(-0.29888188317)*x[1]**o+(-0.850638766848)*x[1]+(-0.853027558387)*x[2]**o+(-0.846378486588)*x[2]
-        arg[0,2]=(0.53445882525)*x[0]**o+(-0.653655652989)*x[0]+(-0.968129875689)*x[1]**o+(-0.603598808323)*x[1]+(0.545841014272)*x[2]**o+(0.126131861082)*x[2]
-        arg[0,3]=(0.181662498503)*x[0]**o+(-0.769571080865)*x[0]+(0.771109181078)*x[1]**o+(0.980677373303)*x[1]+(-0.625057940268)*x[2]**o+(0.0585672357346)*x[2]
-        arg[0,4]=(-0.0320907540755)*x[0]**o+(-0.519517369917)*x[0]+(-0.365190231996)*x[1]**o+(-0.192392652661)*x[1]+(-0.693267159516)*x[2]**o+(0.106458640425)*x[2]
-        arg[1,0]=(0.414286358161)*x[0]**o+(0.0223282279507)*x[0]+(0.215881279469)*x[1]**o+(0.68990977849)*x[1]+(-0.532075885581)*x[2]**o+(-0.269164904232)*x[2]
-        arg[1,1]=(-0.0445879250589)*x[0]**o+(0.889985400599)*x[0]+(0.842050582947)*x[1]**o+(-0.0275307884642)*x[1]+(0.774650107671)*x[2]**o+(0.19446514971)*x[2]
-        arg[1,2]=(0.913032880034)*x[0]**o+(-0.286537470008)*x[0]+(0.0902778267032)*x[1]**o+(0.548596933564)*x[1]+(-0.996100405074)*x[2]**o+(-0.509554019549)*x[2]
-        arg[1,3]=(0.44308812765)*x[0]**o+(-0.0641227726924)*x[0]+(0.484249008075)*x[1]**o+(0.581496384894)*x[1]+(0.592538533183)*x[2]**o+(-0.821638541512)*x[2]
-        arg[1,4]=(-0.898304735153)*x[0]**o+(0.333217967121)*x[0]+(-0.788218899371)*x[1]**o+(0.579723459039)*x[1]+(0.467006473159)*x[2]**o+(-0.277113860535)*x[2]
-        arg[2,0]=(0.515308716564)*x[0]**o+(0.255947750577)*x[0]+(0.232578337945)*x[1]**o+(0.900611887592)*x[1]+(-0.247710965611)*x[2]**o+(-0.985523228221)*x[2]
-        arg[2,1]=(0.611196756618)*x[0]**o+(0.146822999187)*x[0]+(-0.318793147278)*x[1]**o+(0.790772432028)*x[1]+(0.138036152668)*x[2]**o+(-0.800234207543)*x[2]
-        arg[2,2]=(-0.293576196546)*x[0]**o+(-0.521059592737)*x[0]+(0.301178293957)*x[1]**o+(-0.141430900198)*x[1]+(-0.782381874467)*x[2]**o+(0.92221179729)*x[2]
-        arg[2,3]=(0.673951778483)*x[0]**o+(-0.335068772752)*x[0]+(0.408793200723)*x[1]**o+(0.36906212176)*x[1]+(0.246292093855)*x[2]**o+(0.356147233675)*x[2]
-        arg[2,4]=(-0.218899302236)*x[0]**o+(0.271285962886)*x[0]+(-0.16364707283)*x[1]**o+(0.177195607727)*x[1]+(-0.287331396699)*x[2]**o+(-0.465391460497)*x[2]
-        arg[3,0]=(-0.369727856735)*x[0]**o+(-0.44351931666)*x[0]+(0.0375097686939)*x[1]**o+(0.276779121402)*x[1]+(0.662505672881)*x[2]**o+(-0.642709866174)*x[2]
-        arg[3,1]=(0.444940917816)*x[0]**o+(-0.178926126454)*x[0]+(0.824660645994)*x[1]**o+(0.825996820355)*x[1]+(0.798260651848)*x[2]**o+(0.331744022239)*x[2]
-        arg[3,2]=(-0.82489261483)*x[0]**o+(-0.340862079766)*x[0]+(-0.998375587383)*x[1]**o+(0.880222106116)*x[1]+(0.656096580473)*x[2]**o+(0.530854486127)*x[2]
-        arg[3,3]=(0.732863411435)*x[0]**o+(-0.324252004147)*x[0]+(0.789472654884)*x[1]**o+(-0.207794796011)*x[1]+(0.50903180567)*x[2]**o+(0.724319112504)*x[2]
-        arg[3,4]=(-0.980748139471)*x[0]**o+(0.0974331161906)*x[0]+(0.196275528452)*x[1]**o+(0.305231910003)*x[1]+(-0.0417825350947)*x[2]**o+(-0.2916834261)*x[2]
-        ref[0,0]=(-0.809842729223)/(o+1.)+(0.440179080018)+(0.748857269399)*0.5**o
-        ref[0,1]=(-1.15190944156)/(o+1.)+(-1.32322021274)+(-0.784526004748)*0.5**o
-        ref[0,2]=(-0.422288861417)/(o+1.)+(-0.565561300115)+(0.53445882525)*0.5**o
-        ref[0,3]=(0.146051240811)/(o+1.)+(0.134836764087)+(0.181662498503)*0.5**o
-        ref[0,4]=(-1.05845739151)/(o+1.)+(-0.302725691077)+(-0.0320907540755)*0.5**o
-        ref[1,0]=(-0.316194606113)/(o+1.)+(0.221536551104)+(0.414286358161)*0.5**o
-        ref[1,1]=(1.61670069062)/(o+1.)+(0.528459880922)+(-0.0445879250589)*0.5**o
-        ref[1,2]=(-0.905822578371)/(o+1.)+(-0.123747277996)+(0.913032880034)*0.5**o
-        ref[1,3]=(1.07678754126)/(o+1.)+(-0.152132464655)+(0.44308812765)*0.5**o
-        ref[1,4]=(-0.321212426212)/(o+1.)+(0.317913782812)+(-0.898304735153)*0.5**o
-        ref[2,0]=(-0.015132627666)/(o+1.)+(0.085518204974)+(0.515308716564)*0.5**o
-        ref[2,1]=(-0.18075699461)/(o+1.)+(0.0686806118359)+(0.611196756618)*0.5**o
-        ref[2,2]=(-0.481203580509)/(o+1.)+(0.129860652178)+(-0.293576196546)*0.5**o
-        ref[2,3]=(0.655085294578)/(o+1.)+(0.195070291341)+(0.673951778483)*0.5**o
-        ref[2,4]=(-0.450978469529)/(o+1.)+(-0.00845494494169)+(-0.218899302236)*0.5**o
-        ref[3,0]=(0.700015441575)/(o+1.)+(-0.404725030716)+(-0.369727856735)*0.5**o
-        ref[3,1]=(1.62292129784)/(o+1.)+(0.48940735807)+(0.444940917816)*0.5**o
-        ref[3,2]=(-0.342279006911)/(o+1.)+(0.535107256239)+(-0.82489261483)*0.5**o
-        ref[3,3]=(1.29850446055)/(o+1.)+(0.0961361561734)+(0.732863411435)*0.5**o
-        ref[3,4]=(0.154492993358)/(o+1.)+(0.055490800047)+(-0.980748139471)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.33788666753)*x[0]**o+(0.0147671449643)*x[0]+(0.14066054662)*x[1]**o+(-0.675231899756)*x[1]
-        arg[0,0,1]=(0.0100961441611)*x[0]**o+(0.401304171984)*x[0]+(-0.594786282119)*x[1]**o+(-0.561543495067)*x[1]
-        arg[0,1,0]=(-0.118311175162)*x[0]**o+(0.62454992688)*x[0]+(-0.8163725079)*x[1]**o+(-0.756355655277)*x[1]
-        arg[0,1,1]=(0.586991709411)*x[0]**o+(-0.600757941586)*x[0]+(0.0953383109011)*x[1]**o+(0.317827629801)*x[1]
-        arg[1,0,0]=(-0.251125236294)*x[0]**o+(0.166603616954)*x[0]+(0.978704943828)*x[1]**o+(0.589215389731)*x[1]
-        arg[1,0,1]=(0.0543182786738)*x[0]**o+(-0.334756305272)*x[0]+(-0.919571042987)*x[1]**o+(-0.0425734727213)*x[1]
-        arg[1,1,0]=(-0.867177621518)*x[0]**o+(-0.0750659593232)*x[0]+(-0.227277029921)*x[1]**o+(0.361120763296)*x[1]
-        arg[1,1,1]=(0.85129514889)*x[0]**o+(-0.441962000795)*x[0]+(0.425335668395)*x[1]**o+(0.204091109081)*x[1]
-        arg[2,0,0]=(-0.537930401585)*x[0]**o+(-0.206510941636)*x[0]+(-0.247374421196)*x[1]**o+(0.67043841725)*x[1]
-        arg[2,0,1]=(-0.101273864474)*x[0]**o+(0.283769727506)*x[0]+(-0.0850059833654)*x[1]**o+(-0.71291661379)*x[1]
-        arg[2,1,0]=(0.684430088582)*x[0]**o+(0.107733116086)*x[0]+(0.40398578341)*x[1]**o+(-0.525004991854)*x[1]
-        arg[2,1,1]=(-0.00801759014554)*x[0]**o+(-0.214858014851)*x[0]+(-0.427822011518)*x[1]**o+(0.0168962506945)*x[1]
-        arg[3,0,0]=(0.528563052182)*x[0]**o+(-0.630485796029)*x[0]+(0.0525765317703)*x[1]**o+(-0.469639006097)*x[1]
-        arg[3,0,1]=(0.178622695427)*x[0]**o+(0.0952996500383)*x[0]+(-0.785851578496)*x[1]**o+(0.856665398338)*x[1]
-        arg[3,1,0]=(0.547391926072)*x[0]**o+(-0.0179195091852)*x[0]+(-0.831368961862)*x[1]**o+(-0.437229107453)*x[1]
-        arg[3,1,1]=(-0.657011566453)*x[0]**o+(0.530176142378)*x[0]+(0.649145894746)*x[1]**o+(-0.755185337598)*x[1]
-        arg[4,0,0]=(-0.188305872652)*x[0]**o+(0.0207245930982)*x[0]+(-0.590757998421)*x[1]**o+(-0.793662033952)*x[1]
-        arg[4,0,1]=(0.417712824349)*x[0]**o+(-0.138327612527)*x[0]+(-0.381595921766)*x[1]**o+(0.0287368364725)*x[1]
-        arg[4,1,0]=(-0.83750540403)*x[0]**o+(0.247261273008)*x[0]+(-0.0769629479034)*x[1]**o+(0.0693501875686)*x[1]
-        arg[4,1,1]=(0.697434044074)*x[0]**o+(0.396582403702)*x[0]+(0.736132107034)*x[1]**o+(0.482245183242)*x[1]
-        arg[5,0,0]=(0.769936158184)*x[0]**o+(0.808871896459)*x[0]+(-0.559205314785)*x[1]**o+(-0.258014827146)*x[1]
-        arg[5,0,1]=(0.667132553969)*x[0]**o+(0.618184492083)*x[0]+(0.475852440157)*x[1]**o+(0.084499293443)*x[1]
-        arg[5,1,0]=(0.910882712823)*x[0]**o+(0.153897139268)*x[0]+(-0.61197280039)*x[1]**o+(0.441331985295)*x[1]
-        arg[5,1,1]=(-0.290188623857)*x[0]**o+(0.318266320131)*x[0]+(0.9587856247)*x[1]**o+(0.311981486508)*x[1]
-        ref[0,0,0]=(0.14066054662)/(o+1.)+(-0.330232377396)+(-0.33788666753)*0.5**o
-        ref[0,0,1]=(-0.594786282119)/(o+1.)+(-0.0801196615418)+(0.0100961441611)*0.5**o
-        ref[0,1,0]=(-0.8163725079)/(o+1.)+(-0.0659028641985)+(-0.118311175162)*0.5**o
-        ref[0,1,1]=(0.0953383109011)/(o+1.)+(-0.141465155893)+(0.586991709411)*0.5**o
-        ref[1,0,0]=(0.978704943828)/(o+1.)+(0.377909503343)+(-0.251125236294)*0.5**o
-        ref[1,0,1]=(-0.919571042987)/(o+1.)+(-0.188664888997)+(0.0543182786738)*0.5**o
-        ref[1,1,0]=(-0.227277029921)/(o+1.)+(0.143027401987)+(-0.867177621518)*0.5**o
-        ref[1,1,1]=(0.425335668395)/(o+1.)+(-0.118935445857)+(0.85129514889)*0.5**o
-        ref[2,0,0]=(-0.247374421196)/(o+1.)+(0.231963737807)+(-0.537930401585)*0.5**o
-        ref[2,0,1]=(-0.0850059833654)/(o+1.)+(-0.214573443142)+(-0.101273864474)*0.5**o
-        ref[2,1,0]=(0.40398578341)/(o+1.)+(-0.208635937884)+(0.684430088582)*0.5**o
-        ref[2,1,1]=(-0.427822011518)/(o+1.)+(-0.0989808820785)+(-0.00801759014554)*0.5**o
-        ref[3,0,0]=(0.0525765317703)/(o+1.)+(-0.550062401063)+(0.528563052182)*0.5**o
-        ref[3,0,1]=(-0.785851578496)/(o+1.)+(0.475982524188)+(0.178622695427)*0.5**o
-        ref[3,1,0]=(-0.831368961862)/(o+1.)+(-0.227574308319)+(0.547391926072)*0.5**o
-        ref[3,1,1]=(0.649145894746)/(o+1.)+(-0.11250459761)+(-0.657011566453)*0.5**o
-        ref[4,0,0]=(-0.590757998421)/(o+1.)+(-0.386468720427)+(-0.188305872652)*0.5**o
-        ref[4,0,1]=(-0.381595921766)/(o+1.)+(-0.0547953880271)+(0.417712824349)*0.5**o
-        ref[4,1,0]=(-0.0769629479034)/(o+1.)+(0.158305730288)+(-0.83750540403)*0.5**o
-        ref[4,1,1]=(0.736132107034)/(o+1.)+(0.439413793472)+(0.697434044074)*0.5**o
-        ref[5,0,0]=(-0.559205314785)/(o+1.)+(0.275428534657)+(0.769936158184)*0.5**o
-        ref[5,0,1]=(0.475852440157)/(o+1.)+(0.351341892763)+(0.667132553969)*0.5**o
-        ref[5,1,0]=(-0.61197280039)/(o+1.)+(0.297614562282)+(0.910882712823)*0.5**o
-        ref[5,1,1]=(0.9587856247)/(o+1.)+(0.315123903319)+(-0.290188623857)*0.5**o
-      else:
-        arg[0,0,0]=(0.292346424086)*x[0]**o+(0.105058465241)*x[0]+(-0.281467283372)*x[1]**o+(0.828345267021)*x[1]+(0.741242558638)*x[2]**o+(0.0858780765977)*x[2]
-        arg[0,0,1]=(-0.460556250835)*x[0]**o+(-0.845199338719)*x[0]+(-0.547000154821)*x[1]**o+(-0.972236450512)*x[1]+(0.823031420765)*x[2]**o+(0.278285294464)*x[2]
-        arg[0,1,0]=(0.380027894487)*x[0]**o+(-0.579359210385)*x[0]+(-0.760849798908)*x[1]**o+(0.0065870459398)*x[1]+(-0.869735580799)*x[2]**o+(-0.937378284335)*x[2]
-        arg[0,1,1]=(0.948682597897)*x[0]**o+(-0.882044080711)*x[0]+(-0.694398833899)*x[1]**o+(0.883635235205)*x[1]+(-0.473761903609)*x[2]**o+(0.961453193379)*x[2]
-        arg[1,0,0]=(0.357218603696)*x[0]**o+(-0.694504294144)*x[0]+(-0.187119222895)*x[1]**o+(0.727463485088)*x[1]+(0.150410254875)*x[2]**o+(-0.373430202907)*x[2]
-        arg[1,0,1]=(-0.776893233002)*x[0]**o+(0.565238637388)*x[0]+(-0.155674628662)*x[1]**o+(-0.938226259914)*x[1]+(0.575183633137)*x[2]**o+(0.319871583783)*x[2]
-        arg[1,1,0]=(0.593512911569)*x[0]**o+(-0.0578762085927)*x[0]+(-0.913450847289)*x[1]**o+(0.7074653217)*x[1]+(0.991175636143)*x[2]**o+(-0.535632452281)*x[2]
-        arg[1,1,1]=(-0.154542349616)*x[0]**o+(-0.841642050346)*x[0]+(0.878833704431)*x[1]**o+(0.85568524402)*x[1]+(-0.710374336281)*x[2]**o+(0.346540187252)*x[2]
-        arg[2,0,0]=(-0.765160864305)*x[0]**o+(0.608017010487)*x[0]+(0.841265469171)*x[1]**o+(-0.409854579584)*x[1]+(0.728931324538)*x[2]**o+(0.121315209213)*x[2]
-        arg[2,0,1]=(0.0397067301375)*x[0]**o+(-0.0451925117802)*x[0]+(-0.412724345414)*x[1]**o+(-0.447675002107)*x[1]+(0.141728105561)*x[2]**o+(0.923970189305)*x[2]
-        arg[2,1,0]=(-0.237044096923)*x[0]**o+(-0.826168294669)*x[0]+(0.19833520121)*x[1]**o+(-0.796076984382)*x[1]+(0.367399642334)*x[2]**o+(0.71172848801)*x[2]
-        arg[2,1,1]=(-0.3881830464)*x[0]**o+(0.988354722657)*x[0]+(0.762756805728)*x[1]**o+(0.551778683619)*x[1]+(0.975932105591)*x[2]**o+(-0.173192098292)*x[2]
-        arg[3,0,0]=(-0.226163777371)*x[0]**o+(-0.301094659695)*x[0]+(0.0682567814743)*x[1]**o+(-0.154914902824)*x[1]+(0.984669238436)*x[2]**o+(-0.431011897738)*x[2]
-        arg[3,0,1]=(-0.47230847571)*x[0]**o+(-0.579315893476)*x[0]+(-0.989289806396)*x[1]**o+(-0.673951334134)*x[1]+(0.98143767614)*x[2]**o+(-0.311074531383)*x[2]
-        arg[3,1,0]=(-0.276309910109)*x[0]**o+(-0.70244304164)*x[0]+(-0.963669800079)*x[1]**o+(-0.947723474952)*x[1]+(0.513451083144)*x[2]**o+(-0.0651803692263)*x[2]
-        arg[3,1,1]=(0.65175527234)*x[0]**o+(-0.294569414615)*x[0]+(-0.32846386125)*x[1]**o+(-0.868822318527)*x[1]+(0.268414480892)*x[2]**o+(-0.866835042217)*x[2]
-        arg[4,0,0]=(0.304002845434)*x[0]**o+(0.938467246002)*x[0]+(-0.106648262772)*x[1]**o+(0.227863374571)*x[1]+(-0.789305204045)*x[2]**o+(-0.171526142133)*x[2]
-        arg[4,0,1]=(0.70982305774)*x[0]**o+(0.404228697442)*x[0]+(0.190029230022)*x[1]**o+(-0.825276083634)*x[1]+(-0.739774636921)*x[2]**o+(-0.726529211281)*x[2]
-        arg[4,1,0]=(-0.238487290076)*x[0]**o+(-0.4901234628)*x[0]+(-0.836670757945)*x[1]**o+(0.0841493712661)*x[1]+(-0.685144435198)*x[2]**o+(-0.304978244786)*x[2]
-        arg[4,1,1]=(0.264176905985)*x[0]**o+(-0.410582158319)*x[0]+(-0.271915471538)*x[1]**o+(-0.996082427599)*x[1]+(-0.466654446945)*x[2]**o+(-0.723243781429)*x[2]
-        arg[5,0,0]=(0.379390860481)*x[0]**o+(-0.78556086955)*x[0]+(0.189126836375)*x[1]**o+(0.235947881164)*x[1]+(0.149142076852)*x[2]**o+(-0.944419890441)*x[2]
-        arg[5,0,1]=(0.768867280189)*x[0]**o+(-0.728364777249)*x[0]+(0.60414049451)*x[1]**o+(-0.538876171991)*x[1]+(-0.0947560131508)*x[2]**o+(0.474986163327)*x[2]
-        arg[5,1,0]=(-0.228069986734)*x[0]**o+(-0.680841588894)*x[0]+(-0.663806510587)*x[1]**o+(-0.852775021416)*x[1]+(-0.59539582999)*x[2]**o+(0.52369159839)*x[2]
-        arg[5,1,1]=(0.177872029425)*x[0]**o+(0.93423742256)*x[0]+(-0.0369475988192)*x[1]**o+(0.242202072343)*x[1]+(0.526144455402)*x[2]**o+(0.0217547142691)*x[2]
-        ref[0,0,0]=(0.459775275267)/(o+1.)+(0.50964090443)+(0.292346424086)*0.5**o
-        ref[0,0,1]=(0.276031265944)/(o+1.)+(-0.769575247383)+(-0.460556250835)*0.5**o
-        ref[0,1,0]=(-1.63058537971)/(o+1.)+(-0.75507522439)+(0.380027894487)*0.5**o
-        ref[0,1,1]=(-1.16816073751)/(o+1.)+(0.481522173937)+(0.948682597897)*0.5**o
-        ref[1,0,0]=(-0.0367089680209)/(o+1.)+(-0.170235505982)+(0.357218603696)*0.5**o
-        ref[1,0,1]=(0.419509004475)/(o+1.)+(-0.0265580193719)+(-0.776893233002)*0.5**o
-        ref[1,1,0]=(0.0777247888533)/(o+1.)+(0.0569783304129)+(0.593512911569)*0.5**o
-        ref[1,1,1]=(0.168459368149)/(o+1.)+(0.180291690463)+(-0.154542349616)*0.5**o
-        ref[2,0,0]=(1.57019679371)/(o+1.)+(0.159738820058)+(-0.765160864305)*0.5**o
-        ref[2,0,1]=(-0.270996239853)/(o+1.)+(0.215551337709)+(0.0397067301375)*0.5**o
-        ref[2,1,0]=(0.565734843545)/(o+1.)+(-0.455258395521)+(-0.237044096923)*0.5**o
-        ref[2,1,1]=(1.73868891132)/(o+1.)+(0.683470653992)+(-0.3881830464)*0.5**o
-        ref[3,0,0]=(1.05292601991)/(o+1.)+(-0.443510730129)+(-0.226163777371)*0.5**o
-        ref[3,0,1]=(-0.00785213025503)/(o+1.)+(-0.782170879496)+(-0.47230847571)*0.5**o
-        ref[3,1,0]=(-0.450218716935)/(o+1.)+(-0.857673442909)+(-0.276309910109)*0.5**o
-        ref[3,1,1]=(-0.0600493803575)/(o+1.)+(-1.01511338768)+(0.65175527234)*0.5**o
-        ref[4,0,0]=(-0.895953466817)/(o+1.)+(0.49740223922)+(0.304002845434)*0.5**o
-        ref[4,0,1]=(-0.549745406899)/(o+1.)+(-0.573788298736)+(0.70982305774)*0.5**o
-        ref[4,1,0]=(-1.52181519314)/(o+1.)+(-0.35547616816)+(-0.238487290076)*0.5**o
-        ref[4,1,1]=(-0.738569918483)/(o+1.)+(-1.06495418367)+(0.264176905985)*0.5**o
-        ref[5,0,0]=(0.338268913228)/(o+1.)+(-0.747016439414)+(0.379390860481)*0.5**o
-        ref[5,0,1]=(0.50938448136)/(o+1.)+(-0.396127392956)+(0.768867280189)*0.5**o
-        ref[5,1,0]=(-1.25920234058)/(o+1.)+(-0.50496250596)+(-0.228069986734)*0.5**o
-        ref[5,1,1]=(0.489196856583)/(o+1.)+(0.599097104586)+(0.177872029425)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.423100205741)*x[0]**o+(-0.681307394941)*x[0]+(-0.848175950825)*x[1]**o+(0.559338235783)*x[1]
-        arg[0,0,0,1]=(-0.739687474039)*x[0]**o+(-0.202202358237)*x[0]+(-0.838397517739)*x[1]**o+(-0.377580621185)*x[1]
-        arg[0,0,1,0]=(-0.423462958438)*x[0]**o+(-0.335929684088)*x[0]+(-0.616976579504)*x[1]**o+(-0.77803694581)*x[1]
-        arg[0,0,1,1]=(-0.432533121428)*x[0]**o+(0.0723865130937)*x[0]+(-0.953014661461)*x[1]**o+(0.92761707252)*x[1]
-        arg[0,0,2,0]=(-0.891613775753)*x[0]**o+(0.780592229933)*x[0]+(-0.156191993934)*x[1]**o+(0.985464289737)*x[1]
-        arg[0,0,2,1]=(0.909573147888)*x[0]**o+(-0.225603851475)*x[0]+(-0.68287286477)*x[1]**o+(0.330105905794)*x[1]
-        arg[0,1,0,0]=(-0.39808363424)*x[0]**o+(-0.290872560992)*x[0]+(-0.631624427826)*x[1]**o+(-0.389239289826)*x[1]
-        arg[0,1,0,1]=(-0.748658247224)*x[0]**o+(0.22314629362)*x[0]+(-0.0750972377036)*x[1]**o+(0.908914722147)*x[1]
-        arg[0,1,1,0]=(0.877627912148)*x[0]**o+(-0.988434656301)*x[0]+(-0.163646238293)*x[1]**o+(-0.169410711361)*x[1]
-        arg[0,1,1,1]=(-0.592580581615)*x[0]**o+(0.997989912544)*x[0]+(0.0667564973731)*x[1]**o+(-0.121580259121)*x[1]
-        arg[0,1,2,0]=(-0.505569292541)*x[0]**o+(-0.534428841308)*x[0]+(-0.899276958155)*x[1]**o+(-0.833972415825)*x[1]
-        arg[0,1,2,1]=(-0.215752366701)*x[0]**o+(-0.249993262232)*x[0]+(0.912452712698)*x[1]**o+(0.0601524115958)*x[1]
-        arg[0,2,0,0]=(0.684112319204)*x[0]**o+(0.343018234122)*x[0]+(0.267409202785)*x[1]**o+(0.7781133929)*x[1]
-        arg[0,2,0,1]=(0.552438501301)*x[0]**o+(-0.101558113559)*x[0]+(-0.152472725029)*x[1]**o+(-0.8771654517)*x[1]
-        arg[0,2,1,0]=(-0.31213422297)*x[0]**o+(0.597042319279)*x[0]+(-0.873134889407)*x[1]**o+(-0.68920786345)*x[1]
-        arg[0,2,1,1]=(0.883048532408)*x[0]**o+(-0.653997880306)*x[0]+(-0.761310589424)*x[1]**o+(-0.698342623962)*x[1]
-        arg[0,2,2,0]=(-0.324489237508)*x[0]**o+(-0.717724692716)*x[0]+(-0.936381308418)*x[1]**o+(0.712416971077)*x[1]
-        arg[0,2,2,1]=(-0.971735193469)*x[0]**o+(0.0943629094751)*x[0]+(0.419811305063)*x[1]**o+(0.125623316569)*x[1]
-        arg[0,3,0,0]=(-0.305553454905)*x[0]**o+(-0.936112994503)*x[0]+(0.707279059071)*x[1]**o+(-0.794754809337)*x[1]
-        arg[0,3,0,1]=(0.803934620926)*x[0]**o+(-0.632020033455)*x[0]+(0.819264129099)*x[1]**o+(0.770744069672)*x[1]
-        arg[0,3,1,0]=(0.996632326055)*x[0]**o+(-0.537850178404)*x[0]+(-0.60262522048)*x[1]**o+(-0.431667704232)*x[1]
-        arg[0,3,1,1]=(0.402799911553)*x[0]**o+(0.155798565063)*x[0]+(0.722837842981)*x[1]**o+(0.462463978227)*x[1]
-        arg[0,3,2,0]=(0.937966588808)*x[0]**o+(-0.797151899551)*x[0]+(0.62363567076)*x[1]**o+(-0.60458214868)*x[1]
-        arg[0,3,2,1]=(-0.0389713032301)*x[0]**o+(0.497820326557)*x[0]+(-0.950660964237)*x[1]**o+(0.0247372614337)*x[1]
-        arg[0,4,0,0]=(-0.589529640529)*x[0]**o+(-0.71761078076)*x[0]+(-0.872148906918)*x[1]**o+(-0.666618835503)*x[1]
-        arg[0,4,0,1]=(0.78615039967)*x[0]**o+(0.99287672137)*x[0]+(0.329194160571)*x[1]**o+(0.309370990805)*x[1]
-        arg[0,4,1,0]=(-0.801187683466)*x[0]**o+(0.476957978386)*x[0]+(0.107007555422)*x[1]**o+(-0.211909676249)*x[1]
-        arg[0,4,1,1]=(0.817551079419)*x[0]**o+(0.958544826763)*x[0]+(-0.720479146591)*x[1]**o+(0.0769824586505)*x[1]
-        arg[0,4,2,0]=(-0.245391293539)*x[0]**o+(0.240588876322)*x[0]+(0.766214937295)*x[1]**o+(0.625282150348)*x[1]
-        arg[0,4,2,1]=(-0.780163545255)*x[0]**o+(-0.84424180556)*x[0]+(-0.993826355778)*x[1]**o+(-0.708432857746)*x[1]
-        arg[1,0,0,0]=(0.0998104654851)*x[0]**o+(-0.933870759023)*x[0]+(-0.00667060999489)*x[1]**o+(-0.304328472241)*x[1]
-        arg[1,0,0,1]=(0.716858223574)*x[0]**o+(0.0907083966301)*x[0]+(0.118004968786)*x[1]**o+(-0.989434356769)*x[1]
-        arg[1,0,1,0]=(0.433505460082)*x[0]**o+(0.927792393402)*x[0]+(0.10117572965)*x[1]**o+(-0.719175235748)*x[1]
-        arg[1,0,1,1]=(0.93394463477)*x[0]**o+(0.30554551436)*x[0]+(-0.221528653572)*x[1]**o+(-0.965153365935)*x[1]
-        arg[1,0,2,0]=(0.217926136552)*x[0]**o+(0.75089182057)*x[0]+(0.798438119547)*x[1]**o+(-0.131885152617)*x[1]
-        arg[1,0,2,1]=(0.489885370386)*x[0]**o+(-0.958785443386)*x[0]+(-0.934023631551)*x[1]**o+(-0.120727978484)*x[1]
-        arg[1,1,0,0]=(-0.104659311537)*x[0]**o+(0.323817119133)*x[0]+(0.207178629335)*x[1]**o+(0.132677138305)*x[1]
-        arg[1,1,0,1]=(0.855593354128)*x[0]**o+(-0.319099268106)*x[0]+(-0.75522659926)*x[1]**o+(0.398648791668)*x[1]
-        arg[1,1,1,0]=(0.165499959353)*x[0]**o+(0.025416591231)*x[0]+(-0.454711374202)*x[1]**o+(-0.149643847094)*x[1]
-        arg[1,1,1,1]=(0.668195333828)*x[0]**o+(-0.954315351102)*x[0]+(-0.15549992542)*x[1]**o+(0.960203842246)*x[1]
-        arg[1,1,2,0]=(-0.0830862028828)*x[0]**o+(0.104413343709)*x[0]+(0.0666836881524)*x[1]**o+(-0.909918510114)*x[1]
-        arg[1,1,2,1]=(-0.614061685098)*x[0]**o+(-0.696536572273)*x[0]+(0.674867602585)*x[1]**o+(0.742233774001)*x[1]
-        arg[1,2,0,0]=(-0.271025278576)*x[0]**o+(0.194146585691)*x[0]+(0.369545867263)*x[1]**o+(-0.444209773003)*x[1]
-        arg[1,2,0,1]=(-0.646570016511)*x[0]**o+(-0.1181935343)*x[0]+(-0.473468176784)*x[1]**o+(0.980639666617)*x[1]
-        arg[1,2,1,0]=(-0.274558546949)*x[0]**o+(-0.994564294804)*x[0]+(-0.710677848448)*x[1]**o+(-0.471981673909)*x[1]
-        arg[1,2,1,1]=(0.920326662139)*x[0]**o+(-0.503477706392)*x[0]+(-0.488075258363)*x[1]**o+(-0.390701293427)*x[1]
-        arg[1,2,2,0]=(-0.734779609501)*x[0]**o+(-0.211522964885)*x[0]+(-0.209704158218)*x[1]**o+(0.602143419316)*x[1]
-        arg[1,2,2,1]=(-0.71042927509)*x[0]**o+(-0.320801535296)*x[0]+(-0.307645214006)*x[1]**o+(0.902857741355)*x[1]
-        arg[1,3,0,0]=(0.430044544461)*x[0]**o+(-0.321809854969)*x[0]+(-0.202705286059)*x[1]**o+(-0.136245903236)*x[1]
-        arg[1,3,0,1]=(-0.0215232394148)*x[0]**o+(0.560515199075)*x[0]+(0.183422356152)*x[1]**o+(0.0500950744933)*x[1]
-        arg[1,3,1,0]=(0.956072319541)*x[0]**o+(-0.910407504398)*x[0]+(0.710351406673)*x[1]**o+(-0.673149941902)*x[1]
-        arg[1,3,1,1]=(0.512105745894)*x[0]**o+(0.617656019287)*x[0]+(0.178878380134)*x[1]**o+(-0.304972517759)*x[1]
-        arg[1,3,2,0]=(0.505194196756)*x[0]**o+(-0.588278604691)*x[0]+(0.657312673212)*x[1]**o+(-0.198666173753)*x[1]
-        arg[1,3,2,1]=(0.562199962955)*x[0]**o+(-0.855080919048)*x[0]+(0.798106457622)*x[1]**o+(-0.462368594285)*x[1]
-        arg[1,4,0,0]=(-0.95103819151)*x[0]**o+(0.996179304819)*x[0]+(0.720809353558)*x[1]**o+(-0.357882371835)*x[1]
-        arg[1,4,0,1]=(-0.337212448334)*x[0]**o+(-0.647939092937)*x[0]+(0.432152553594)*x[1]**o+(0.284393585377)*x[1]
-        arg[1,4,1,0]=(0.286170290079)*x[0]**o+(0.813168170391)*x[0]+(-0.178814496497)*x[1]**o+(0.414687546663)*x[1]
-        arg[1,4,1,1]=(0.00961378883254)*x[0]**o+(-0.946718643529)*x[0]+(0.828780485661)*x[1]**o+(0.54461217692)*x[1]
-        arg[1,4,2,0]=(0.784403348421)*x[0]**o+(0.430078584466)*x[0]+(-0.542741131881)*x[1]**o+(0.0290828265624)*x[1]
-        arg[1,4,2,1]=(-0.246343667616)*x[0]**o+(-0.27406067089)*x[0]+(-0.938704878102)*x[1]**o+(0.907921504301)*x[1]
-        arg[2,0,0,0]=(-0.551056874357)*x[0]**o+(-0.697006980356)*x[0]+(-0.733447125487)*x[1]**o+(-0.241902075189)*x[1]
-        arg[2,0,0,1]=(-0.75556701159)*x[0]**o+(0.155303331948)*x[0]+(0.480546881289)*x[1]**o+(-0.420954472057)*x[1]
-        arg[2,0,1,0]=(0.12990139506)*x[0]**o+(-0.0990388974263)*x[0]+(-0.913089275462)*x[1]**o+(-0.766316334455)*x[1]
-        arg[2,0,1,1]=(-0.96760564527)*x[0]**o+(0.94596820894)*x[0]+(-0.208507053422)*x[1]**o+(0.82642580152)*x[1]
-        arg[2,0,2,0]=(-0.801660576339)*x[0]**o+(0.724091208253)*x[0]+(-0.416451086696)*x[1]**o+(-0.255959329575)*x[1]
-        arg[2,0,2,1]=(0.380233654687)*x[0]**o+(-0.27467061721)*x[0]+(-0.626861863133)*x[1]**o+(0.498725464891)*x[1]
-        arg[2,1,0,0]=(0.733227197081)*x[0]**o+(-0.111622822078)*x[0]+(-0.199363221943)*x[1]**o+(-0.449664634046)*x[1]
-        arg[2,1,0,1]=(0.381774304841)*x[0]**o+(0.914208421879)*x[0]+(-0.545958908798)*x[1]**o+(-0.344721917598)*x[1]
-        arg[2,1,1,0]=(-0.861412661903)*x[0]**o+(-0.202264578976)*x[0]+(-0.225404313047)*x[1]**o+(0.716189374265)*x[1]
-        arg[2,1,1,1]=(-0.180088205315)*x[0]**o+(0.133136657032)*x[0]+(-0.341650807958)*x[1]**o+(-0.570348715256)*x[1]
-        arg[2,1,2,0]=(-0.626863150737)*x[0]**o+(-0.236854925766)*x[0]+(-0.271186155613)*x[1]**o+(-0.750500826476)*x[1]
-        arg[2,1,2,1]=(-0.138580929054)*x[0]**o+(-0.925057205334)*x[0]+(0.404961686669)*x[1]**o+(0.542298342705)*x[1]
-        arg[2,2,0,0]=(0.453186536783)*x[0]**o+(0.368065177204)*x[0]+(0.545211472015)*x[1]**o+(0.334551805933)*x[1]
-        arg[2,2,0,1]=(0.0639699038803)*x[0]**o+(0.154192875522)*x[0]+(0.101347900441)*x[1]**o+(-0.668313576443)*x[1]
-        arg[2,2,1,0]=(0.465173445732)*x[0]**o+(-0.475009875122)*x[0]+(-0.748444748361)*x[1]**o+(0.620845514745)*x[1]
-        arg[2,2,1,1]=(0.720975965615)*x[0]**o+(-0.266631032721)*x[0]+(0.0996389916136)*x[1]**o+(-0.96886977517)*x[1]
-        arg[2,2,2,0]=(-0.396391719953)*x[0]**o+(-0.240091626001)*x[0]+(-0.42411685734)*x[1]**o+(-0.458446010754)*x[1]
-        arg[2,2,2,1]=(-0.662584035264)*x[0]**o+(0.23813614536)*x[0]+(0.810893160816)*x[1]**o+(-0.130143663026)*x[1]
-        arg[2,3,0,0]=(-0.651550480594)*x[0]**o+(0.370844612999)*x[0]+(-0.808002027275)*x[1]**o+(0.531083477622)*x[1]
-        arg[2,3,0,1]=(-0.287184182382)*x[0]**o+(0.928877646221)*x[0]+(-0.271563784371)*x[1]**o+(-0.46908309398)*x[1]
-        arg[2,3,1,0]=(0.342080138259)*x[0]**o+(0.458994887529)*x[0]+(-0.544475387926)*x[1]**o+(-0.203224249914)*x[1]
-        arg[2,3,1,1]=(-0.0791009979206)*x[0]**o+(0.536480501773)*x[0]+(-0.624008015173)*x[1]**o+(-0.380504135174)*x[1]
-        arg[2,3,2,0]=(-0.707089360149)*x[0]**o+(0.217716900812)*x[0]+(0.020441009853)*x[1]**o+(0.680214150153)*x[1]
-        arg[2,3,2,1]=(0.0368635610611)*x[0]**o+(0.646697307691)*x[0]+(0.36118713723)*x[1]**o+(-0.535295583008)*x[1]
-        arg[2,4,0,0]=(0.806938680905)*x[0]**o+(0.449096825134)*x[0]+(-0.43507826254)*x[1]**o+(-0.300956286252)*x[1]
-        arg[2,4,0,1]=(-0.268005914326)*x[0]**o+(0.583132947291)*x[0]+(-0.344067495236)*x[1]**o+(-0.526011968282)*x[1]
-        arg[2,4,1,0]=(-0.0953663458348)*x[0]**o+(0.834765967023)*x[0]+(-0.0410345097335)*x[1]**o+(0.493198054713)*x[1]
-        arg[2,4,1,1]=(0.964777812988)*x[0]**o+(-0.791397009733)*x[0]+(-0.962108127047)*x[1]**o+(0.378083818799)*x[1]
-        arg[2,4,2,0]=(0.0977715857241)*x[0]**o+(-0.118265910205)*x[0]+(-0.0181736456148)*x[1]**o+(-0.480499109439)*x[1]
-        arg[2,4,2,1]=(0.396936262802)*x[0]**o+(0.979807961416)*x[0]+(0.383251286227)*x[1]**o+(-0.921599329372)*x[1]
-        arg[3,0,0,0]=(-0.193869568904)*x[0]**o+(0.335533150532)*x[0]+(-0.542087879921)*x[1]**o+(0.916531699685)*x[1]
-        arg[3,0,0,1]=(0.732192438113)*x[0]**o+(0.610866210623)*x[0]+(0.232455584069)*x[1]**o+(0.109577342902)*x[1]
-        arg[3,0,1,0]=(0.0487640958479)*x[0]**o+(-0.250229114846)*x[0]+(-0.539343546695)*x[1]**o+(-0.456485153733)*x[1]
-        arg[3,0,1,1]=(0.951844805407)*x[0]**o+(-0.811442383281)*x[0]+(-0.537581471096)*x[1]**o+(0.350217063609)*x[1]
-        arg[3,0,2,0]=(0.495490307938)*x[0]**o+(0.529667417659)*x[0]+(-0.853447043865)*x[1]**o+(0.97002519322)*x[1]
-        arg[3,0,2,1]=(0.38188303469)*x[0]**o+(-0.75911672537)*x[0]+(-0.67563531103)*x[1]**o+(0.384002769031)*x[1]
-        arg[3,1,0,0]=(0.44471228922)*x[0]**o+(-0.958995287488)*x[0]+(-0.356730659314)*x[1]**o+(0.853749081247)*x[1]
-        arg[3,1,0,1]=(-0.674677862576)*x[0]**o+(-0.651945231545)*x[0]+(-0.869871613483)*x[1]**o+(0.518493292422)*x[1]
-        arg[3,1,1,0]=(-0.803923033456)*x[0]**o+(0.916638584514)*x[0]+(-0.410056071233)*x[1]**o+(-0.313811798732)*x[1]
-        arg[3,1,1,1]=(-0.677586574312)*x[0]**o+(0.101317771211)*x[0]+(-0.848629733526)*x[1]**o+(0.956935407827)*x[1]
-        arg[3,1,2,0]=(0.723956969878)*x[0]**o+(-0.677929268987)*x[0]+(0.168694427833)*x[1]**o+(0.675664564011)*x[1]
-        arg[3,1,2,1]=(-0.0961257584415)*x[0]**o+(0.870273004118)*x[0]+(0.0979731186867)*x[1]**o+(-0.561786099655)*x[1]
-        arg[3,2,0,0]=(-0.506857925404)*x[0]**o+(0.950429186893)*x[0]+(-0.765686972231)*x[1]**o+(0.300787357163)*x[1]
-        arg[3,2,0,1]=(-0.479464705052)*x[0]**o+(-0.814881390688)*x[0]+(-0.549033177495)*x[1]**o+(0.875164713771)*x[1]
-        arg[3,2,1,0]=(0.984579775952)*x[0]**o+(0.822464384935)*x[0]+(-0.352937841183)*x[1]**o+(-0.389516730371)*x[1]
-        arg[3,2,1,1]=(-0.75230207503)*x[0]**o+(0.921759892886)*x[0]+(0.683120790039)*x[1]**o+(0.470250085193)*x[1]
-        arg[3,2,2,0]=(-0.257935272452)*x[0]**o+(-0.437370511818)*x[0]+(-0.350363036315)*x[1]**o+(-0.232415372202)*x[1]
-        arg[3,2,2,1]=(0.0784702766009)*x[0]**o+(0.460959683819)*x[0]+(0.758201028024)*x[1]**o+(0.101597092257)*x[1]
-        arg[3,3,0,0]=(0.292597181224)*x[0]**o+(-0.322992033991)*x[0]+(-0.536413055541)*x[1]**o+(-0.95609054732)*x[1]
-        arg[3,3,0,1]=(0.174134715952)*x[0]**o+(0.811729326606)*x[0]+(0.89040777319)*x[1]**o+(0.893572419966)*x[1]
-        arg[3,3,1,0]=(0.768234215847)*x[0]**o+(0.36391719033)*x[0]+(0.598889528719)*x[1]**o+(0.152035960251)*x[1]
-        arg[3,3,1,1]=(-0.77938361663)*x[0]**o+(-0.448945619013)*x[0]+(0.471242869055)*x[1]**o+(0.112888214554)*x[1]
-        arg[3,3,2,0]=(-0.00617753872016)*x[0]**o+(0.0155218100192)*x[0]+(0.674100983537)*x[1]**o+(0.211406831421)*x[1]
-        arg[3,3,2,1]=(0.124470359441)*x[0]**o+(0.117393617733)*x[0]+(-0.297791856337)*x[1]**o+(-0.210405798241)*x[1]
-        arg[3,4,0,0]=(0.139920132608)*x[0]**o+(-0.0073381380034)*x[0]+(-0.77267392403)*x[1]**o+(0.792299687107)*x[1]
-        arg[3,4,0,1]=(0.328592839797)*x[0]**o+(-0.758899359217)*x[0]+(0.730856047416)*x[1]**o+(-0.389548922357)*x[1]
-        arg[3,4,1,0]=(-0.239362896774)*x[0]**o+(0.513205289336)*x[0]+(-0.393781550386)*x[1]**o+(0.229968513732)*x[1]
-        arg[3,4,1,1]=(0.777985150139)*x[0]**o+(0.273278793895)*x[0]+(0.17782134987)*x[1]**o+(0.491127331923)*x[1]
-        arg[3,4,2,0]=(0.348482781008)*x[0]**o+(0.458696185739)*x[0]+(-0.77882422986)*x[1]**o+(0.455739446004)*x[1]
-        arg[3,4,2,1]=(-0.396751338134)*x[0]**o+(0.449026376364)*x[0]+(0.308553967581)*x[1]**o+(-0.777653415416)*x[1]
-        ref[0,0,0,0]=(-0.848175950825)/(o+1.)+(-0.060984579579)+(0.423100205741)*0.5**o
-        ref[0,0,0,1]=(-0.838397517739)/(o+1.)+(-0.289891489711)+(-0.739687474039)*0.5**o
-        ref[0,0,1,0]=(-0.616976579504)/(o+1.)+(-0.556983314949)+(-0.423462958438)*0.5**o
-        ref[0,0,1,1]=(-0.953014661461)/(o+1.)+(0.500001792807)+(-0.432533121428)*0.5**o
-        ref[0,0,2,0]=(-0.156191993934)/(o+1.)+(0.883028259835)+(-0.891613775753)*0.5**o
-        ref[0,0,2,1]=(-0.68287286477)/(o+1.)+(0.0522510271596)+(0.909573147888)*0.5**o
-        ref[0,1,0,0]=(-0.631624427826)/(o+1.)+(-0.340055925409)+(-0.39808363424)*0.5**o
-        ref[0,1,0,1]=(-0.0750972377036)/(o+1.)+(0.566030507884)+(-0.748658247224)*0.5**o
-        ref[0,1,1,0]=(-0.163646238293)/(o+1.)+(-0.578922683831)+(0.877627912148)*0.5**o
-        ref[0,1,1,1]=(0.0667564973731)/(o+1.)+(0.438204826712)+(-0.592580581615)*0.5**o
-        ref[0,1,2,0]=(-0.899276958155)/(o+1.)+(-0.684200628566)+(-0.505569292541)*0.5**o
-        ref[0,1,2,1]=(0.912452712698)/(o+1.)+(-0.0949204253183)+(-0.215752366701)*0.5**o
-        ref[0,2,0,0]=(0.267409202785)/(o+1.)+(0.560565813511)+(0.684112319204)*0.5**o
-        ref[0,2,0,1]=(-0.152472725029)/(o+1.)+(-0.48936178263)+(0.552438501301)*0.5**o
-        ref[0,2,1,0]=(-0.873134889407)/(o+1.)+(-0.0460827720855)+(-0.31213422297)*0.5**o
-        ref[0,2,1,1]=(-0.761310589424)/(o+1.)+(-0.676170252134)+(0.883048532408)*0.5**o
-        ref[0,2,2,0]=(-0.936381308418)/(o+1.)+(-0.00265386081956)+(-0.324489237508)*0.5**o
-        ref[0,2,2,1]=(0.419811305063)/(o+1.)+(0.109993113022)+(-0.971735193469)*0.5**o
-        ref[0,3,0,0]=(0.707279059071)/(o+1.)+(-0.86543390192)+(-0.305553454905)*0.5**o
-        ref[0,3,0,1]=(0.819264129099)/(o+1.)+(0.0693620181083)+(0.803934620926)*0.5**o
-        ref[0,3,1,0]=(-0.60262522048)/(o+1.)+(-0.484758941318)+(0.996632326055)*0.5**o
-        ref[0,3,1,1]=(0.722837842981)/(o+1.)+(0.309131271645)+(0.402799911553)*0.5**o
-        ref[0,3,2,0]=(0.62363567076)/(o+1.)+(-0.700867024115)+(0.937966588808)*0.5**o
-        ref[0,3,2,1]=(-0.950660964237)/(o+1.)+(0.261278793995)+(-0.0389713032301)*0.5**o
-        ref[0,4,0,0]=(-0.872148906918)/(o+1.)+(-0.692114808131)+(-0.589529640529)*0.5**o
-        ref[0,4,0,1]=(0.329194160571)/(o+1.)+(0.651123856087)+(0.78615039967)*0.5**o
-        ref[0,4,1,0]=(0.107007555422)/(o+1.)+(0.132524151069)+(-0.801187683466)*0.5**o
-        ref[0,4,1,1]=(-0.720479146591)/(o+1.)+(0.517763642707)+(0.817551079419)*0.5**o
-        ref[0,4,2,0]=(0.766214937295)/(o+1.)+(0.432935513335)+(-0.245391293539)*0.5**o
-        ref[0,4,2,1]=(-0.993826355778)/(o+1.)+(-0.776337331653)+(-0.780163545255)*0.5**o
-        ref[1,0,0,0]=(-0.00667060999489)/(o+1.)+(-0.619099615632)+(0.0998104654851)*0.5**o
-        ref[1,0,0,1]=(0.118004968786)/(o+1.)+(-0.449362980069)+(0.716858223574)*0.5**o
-        ref[1,0,1,0]=(0.10117572965)/(o+1.)+(0.104308578827)+(0.433505460082)*0.5**o
-        ref[1,0,1,1]=(-0.221528653572)/(o+1.)+(-0.329803925788)+(0.93394463477)*0.5**o
-        ref[1,0,2,0]=(0.798438119547)/(o+1.)+(0.309503333977)+(0.217926136552)*0.5**o
-        ref[1,0,2,1]=(-0.934023631551)/(o+1.)+(-0.539756710935)+(0.489885370386)*0.5**o
-        ref[1,1,0,0]=(0.207178629335)/(o+1.)+(0.228247128719)+(-0.104659311537)*0.5**o
-        ref[1,1,0,1]=(-0.75522659926)/(o+1.)+(0.0397747617809)+(0.855593354128)*0.5**o
-        ref[1,1,1,0]=(-0.454711374202)/(o+1.)+(-0.0621136279316)+(0.165499959353)*0.5**o
-        ref[1,1,1,1]=(-0.15549992542)/(o+1.)+(0.00294424557217)+(0.668195333828)*0.5**o
-        ref[1,1,2,0]=(0.0666836881524)/(o+1.)+(-0.402752583203)+(-0.0830862028828)*0.5**o
-        ref[1,1,2,1]=(0.674867602585)/(o+1.)+(0.0228486008642)+(-0.614061685098)*0.5**o
-        ref[1,2,0,0]=(0.369545867263)/(o+1.)+(-0.125031593656)+(-0.271025278576)*0.5**o
-        ref[1,2,0,1]=(-0.473468176784)/(o+1.)+(0.431223066159)+(-0.646570016511)*0.5**o
-        ref[1,2,1,0]=(-0.710677848448)/(o+1.)+(-0.733272984356)+(-0.274558546949)*0.5**o
-        ref[1,2,1,1]=(-0.488075258363)/(o+1.)+(-0.44708949991)+(0.920326662139)*0.5**o
-        ref[1,2,2,0]=(-0.209704158218)/(o+1.)+(0.195310227215)+(-0.734779609501)*0.5**o
-        ref[1,2,2,1]=(-0.307645214006)/(o+1.)+(0.29102810303)+(-0.71042927509)*0.5**o
-        ref[1,3,0,0]=(-0.202705286059)/(o+1.)+(-0.229027879102)+(0.430044544461)*0.5**o
-        ref[1,3,0,1]=(0.183422356152)/(o+1.)+(0.305305136784)+(-0.0215232394148)*0.5**o
-        ref[1,3,1,0]=(0.710351406673)/(o+1.)+(-0.79177872315)+(0.956072319541)*0.5**o
-        ref[1,3,1,1]=(0.178878380134)/(o+1.)+(0.156341750764)+(0.512105745894)*0.5**o
-        ref[1,3,2,0]=(0.657312673212)/(o+1.)+(-0.393472389222)+(0.505194196756)*0.5**o
-        ref[1,3,2,1]=(0.798106457622)/(o+1.)+(-0.658724756667)+(0.562199962955)*0.5**o
-        ref[1,4,0,0]=(0.720809353558)/(o+1.)+(0.319148466492)+(-0.95103819151)*0.5**o
-        ref[1,4,0,1]=(0.432152553594)/(o+1.)+(-0.18177275378)+(-0.337212448334)*0.5**o
-        ref[1,4,1,0]=(-0.178814496497)/(o+1.)+(0.613927858527)+(0.286170290079)*0.5**o
-        ref[1,4,1,1]=(0.828780485661)/(o+1.)+(-0.201053233304)+(0.00961378883254)*0.5**o
-        ref[1,4,2,0]=(-0.542741131881)/(o+1.)+(0.229580705514)+(0.784403348421)*0.5**o
-        ref[1,4,2,1]=(-0.938704878102)/(o+1.)+(0.316930416706)+(-0.246343667616)*0.5**o
-        ref[2,0,0,0]=(-0.733447125487)/(o+1.)+(-0.469454527772)+(-0.551056874357)*0.5**o
-        ref[2,0,0,1]=(0.480546881289)/(o+1.)+(-0.132825570055)+(-0.75556701159)*0.5**o
-        ref[2,0,1,0]=(-0.913089275462)/(o+1.)+(-0.432677615941)+(0.12990139506)*0.5**o
-        ref[2,0,1,1]=(-0.208507053422)/(o+1.)+(0.88619700523)+(-0.96760564527)*0.5**o
-        ref[2,0,2,0]=(-0.416451086696)/(o+1.)+(0.234065939339)+(-0.801660576339)*0.5**o
-        ref[2,0,2,1]=(-0.626861863133)/(o+1.)+(0.112027423841)+(0.380233654687)*0.5**o
-        ref[2,1,0,0]=(-0.199363221943)/(o+1.)+(-0.280643728062)+(0.733227197081)*0.5**o
-        ref[2,1,0,1]=(-0.545958908798)/(o+1.)+(0.284743252141)+(0.381774304841)*0.5**o
-        ref[2,1,1,0]=(-0.225404313047)/(o+1.)+(0.256962397644)+(-0.861412661903)*0.5**o
-        ref[2,1,1,1]=(-0.341650807958)/(o+1.)+(-0.218606029112)+(-0.180088205315)*0.5**o
-        ref[2,1,2,0]=(-0.271186155613)/(o+1.)+(-0.493677876121)+(-0.626863150737)*0.5**o
-        ref[2,1,2,1]=(0.404961686669)/(o+1.)+(-0.191379431315)+(-0.138580929054)*0.5**o
-        ref[2,2,0,0]=(0.545211472015)/(o+1.)+(0.351308491569)+(0.453186536783)*0.5**o
-        ref[2,2,0,1]=(0.101347900441)/(o+1.)+(-0.257060350461)+(0.0639699038803)*0.5**o
-        ref[2,2,1,0]=(-0.748444748361)/(o+1.)+(0.0729178198114)+(0.465173445732)*0.5**o
-        ref[2,2,1,1]=(0.0996389916136)/(o+1.)+(-0.617750403946)+(0.720975965615)*0.5**o
-        ref[2,2,2,0]=(-0.42411685734)/(o+1.)+(-0.349268818378)+(-0.396391719953)*0.5**o
-        ref[2,2,2,1]=(0.810893160816)/(o+1.)+(0.053996241167)+(-0.662584035264)*0.5**o
-        ref[2,3,0,0]=(-0.808002027275)/(o+1.)+(0.45096404531)+(-0.651550480594)*0.5**o
-        ref[2,3,0,1]=(-0.271563784371)/(o+1.)+(0.22989727612)+(-0.287184182382)*0.5**o
-        ref[2,3,1,0]=(-0.544475387926)/(o+1.)+(0.127885318807)+(0.342080138259)*0.5**o
-        ref[2,3,1,1]=(-0.624008015173)/(o+1.)+(0.0779881832997)+(-0.0791009979206)*0.5**o
-        ref[2,3,2,0]=(0.020441009853)/(o+1.)+(0.448965525483)+(-0.707089360149)*0.5**o
-        ref[2,3,2,1]=(0.36118713723)/(o+1.)+(0.0557008623413)+(0.0368635610611)*0.5**o
-        ref[2,4,0,0]=(-0.43507826254)/(o+1.)+(0.0740702694408)+(0.806938680905)*0.5**o
-        ref[2,4,0,1]=(-0.344067495236)/(o+1.)+(0.0285604895043)+(-0.268005914326)*0.5**o
-        ref[2,4,1,0]=(-0.0410345097335)/(o+1.)+(0.663982010868)+(-0.0953663458348)*0.5**o
-        ref[2,4,1,1]=(-0.962108127047)/(o+1.)+(-0.206656595467)+(0.964777812988)*0.5**o
-        ref[2,4,2,0]=(-0.0181736456148)/(o+1.)+(-0.299382509822)+(0.0977715857241)*0.5**o
-        ref[2,4,2,1]=(0.383251286227)/(o+1.)+(0.0291043160221)+(0.396936262802)*0.5**o
-        ref[3,0,0,0]=(-0.542087879921)/(o+1.)+(0.626032425109)+(-0.193869568904)*0.5**o
-        ref[3,0,0,1]=(0.232455584069)/(o+1.)+(0.360221776762)+(0.732192438113)*0.5**o
-        ref[3,0,1,0]=(-0.539343546695)/(o+1.)+(-0.353357134289)+(0.0487640958479)*0.5**o
-        ref[3,0,1,1]=(-0.537581471096)/(o+1.)+(-0.230612659836)+(0.951844805407)*0.5**o
-        ref[3,0,2,0]=(-0.853447043865)/(o+1.)+(0.74984630544)+(0.495490307938)*0.5**o
-        ref[3,0,2,1]=(-0.67563531103)/(o+1.)+(-0.187556978169)+(0.38188303469)*0.5**o
-        ref[3,1,0,0]=(-0.356730659314)/(o+1.)+(-0.0526231031206)+(0.44471228922)*0.5**o
-        ref[3,1,0,1]=(-0.869871613483)/(o+1.)+(-0.0667259695618)+(-0.674677862576)*0.5**o
-        ref[3,1,1,0]=(-0.410056071233)/(o+1.)+(0.301413392891)+(-0.803923033456)*0.5**o
-        ref[3,1,1,1]=(-0.848629733526)/(o+1.)+(0.529126589519)+(-0.677586574312)*0.5**o
-        ref[3,1,2,0]=(0.168694427833)/(o+1.)+(-0.00113235248793)+(0.723956969878)*0.5**o
-        ref[3,1,2,1]=(0.0979731186867)/(o+1.)+(0.154243452232)+(-0.0961257584415)*0.5**o
-        ref[3,2,0,0]=(-0.765686972231)/(o+1.)+(0.625608272028)+(-0.506857925404)*0.5**o
-        ref[3,2,0,1]=(-0.549033177495)/(o+1.)+(0.0301416615418)+(-0.479464705052)*0.5**o
-        ref[3,2,1,0]=(-0.352937841183)/(o+1.)+(0.216473827282)+(0.984579775952)*0.5**o
-        ref[3,2,1,1]=(0.683120790039)/(o+1.)+(0.696004989039)+(-0.75230207503)*0.5**o
-        ref[3,2,2,0]=(-0.350363036315)/(o+1.)+(-0.33489294201)+(-0.257935272452)*0.5**o
-        ref[3,2,2,1]=(0.758201028024)/(o+1.)+(0.281278388038)+(0.0784702766009)*0.5**o
-        ref[3,3,0,0]=(-0.536413055541)/(o+1.)+(-0.639541290655)+(0.292597181224)*0.5**o
-        ref[3,3,0,1]=(0.89040777319)/(o+1.)+(0.852650873286)+(0.174134715952)*0.5**o
-        ref[3,3,1,0]=(0.598889528719)/(o+1.)+(0.257976575291)+(0.768234215847)*0.5**o
-        ref[3,3,1,1]=(0.471242869055)/(o+1.)+(-0.168028702229)+(-0.77938361663)*0.5**o
-        ref[3,3,2,0]=(0.674100983537)/(o+1.)+(0.11346432072)+(-0.00617753872016)*0.5**o
-        ref[3,3,2,1]=(-0.297791856337)/(o+1.)+(-0.0465060902539)+(0.124470359441)*0.5**o
-        ref[3,4,0,0]=(-0.77267392403)/(o+1.)+(0.392480774552)+(0.139920132608)*0.5**o
-        ref[3,4,0,1]=(0.730856047416)/(o+1.)+(-0.574224140787)+(0.328592839797)*0.5**o
-        ref[3,4,1,0]=(-0.393781550386)/(o+1.)+(0.371586901534)+(-0.239362896774)*0.5**o
-        ref[3,4,1,1]=(0.17782134987)/(o+1.)+(0.382203062909)+(0.777985150139)*0.5**o
-        ref[3,4,2,0]=(-0.77882422986)/(o+1.)+(0.457217815872)+(0.348482781008)*0.5**o
-        ref[3,4,2,1]=(0.308553967581)/(o+1.)+(-0.164313519526)+(-0.396751338134)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.663998508168)*x[0]**o+(0.797340164931)*x[0]+(0.285182001599)*x[1]**o+(0.99720606542)*x[1]+(0.127610260108)*x[2]**o+(0.0141819362674)*x[2]
-        arg[0,0,0,1]=(-0.010130464476)*x[0]**o+(-0.694140348803)*x[0]+(-0.554528445238)*x[1]**o+(0.192639775817)*x[1]+(-0.520164891934)*x[2]**o+(0.316830081989)*x[2]
-        arg[0,0,1,0]=(-0.176542289385)*x[0]**o+(-0.312451025451)*x[0]+(0.33951668081)*x[1]**o+(-0.66674551066)*x[1]+(-0.0515929546862)*x[2]**o+(0.688180995863)*x[2]
-        arg[0,0,1,1]=(-0.98152572229)*x[0]**o+(0.156411605196)*x[0]+(0.588065240125)*x[1]**o+(0.665830732172)*x[1]+(-0.834625744106)*x[2]**o+(-0.138276534671)*x[2]
-        arg[0,0,2,0]=(0.555897422173)*x[0]**o+(0.0269431977874)*x[0]+(0.671161746561)*x[1]**o+(0.0857445285374)*x[1]+(0.578027911522)*x[2]**o+(0.217805007393)*x[2]
-        arg[0,0,2,1]=(0.23127040923)*x[0]**o+(0.624353504617)*x[0]+(-0.433915231286)*x[1]**o+(-0.860173971996)*x[1]+(-0.801472434932)*x[2]**o+(-0.779575445432)*x[2]
-        arg[0,1,0,0]=(0.0202445177842)*x[0]**o+(-0.0654289514039)*x[0]+(-0.877581892208)*x[1]**o+(-0.231833216639)*x[1]+(0.609752401432)*x[2]**o+(-0.802673983603)*x[2]
-        arg[0,1,0,1]=(0.99935098551)*x[0]**o+(0.665639246142)*x[0]+(0.593510187831)*x[1]**o+(0.213336090684)*x[1]+(0.232667772738)*x[2]**o+(-0.651386262633)*x[2]
-        arg[0,1,1,0]=(0.151799117419)*x[0]**o+(-0.34631043288)*x[0]+(-0.264898731671)*x[1]**o+(0.697527693137)*x[1]+(0.389030412719)*x[2]**o+(0.613338381577)*x[2]
-        arg[0,1,1,1]=(-0.51422532626)*x[0]**o+(0.228040429268)*x[0]+(-0.276760984751)*x[1]**o+(0.379484010198)*x[1]+(0.896837565192)*x[2]**o+(0.195866552401)*x[2]
-        arg[0,1,2,0]=(0.908244888839)*x[0]**o+(0.217098236162)*x[0]+(0.798725721675)*x[1]**o+(0.216635630826)*x[1]+(0.960227216319)*x[2]**o+(-0.885381182879)*x[2]
-        arg[0,1,2,1]=(-0.872307766634)*x[0]**o+(0.843197737136)*x[0]+(-0.895220198791)*x[1]**o+(0.866433237518)*x[1]+(0.560344834226)*x[2]**o+(0.895797915384)*x[2]
-        arg[0,2,0,0]=(0.00173619592035)*x[0]**o+(-0.209651858019)*x[0]+(0.323249367733)*x[1]**o+(-0.848445788048)*x[1]+(-0.747443572813)*x[2]**o+(0.342929929066)*x[2]
-        arg[0,2,0,1]=(0.998184336552)*x[0]**o+(-0.669882578313)*x[0]+(-0.632794054696)*x[1]**o+(-0.779832061924)*x[1]+(0.0588815237456)*x[2]**o+(0.419538634163)*x[2]
-        arg[0,2,1,0]=(-0.921234331968)*x[0]**o+(0.319724478943)*x[0]+(0.867192523265)*x[1]**o+(-0.183047755109)*x[1]+(-0.753047661507)*x[2]**o+(-0.797179040607)*x[2]
-        arg[0,2,1,1]=(0.153578015941)*x[0]**o+(0.887820807812)*x[0]+(-0.607944647299)*x[1]**o+(-0.0487413965527)*x[1]+(-0.812369692315)*x[2]**o+(0.323102876844)*x[2]
-        arg[0,2,2,0]=(0.29601674794)*x[0]**o+(-0.108738759628)*x[0]+(0.242837345895)*x[1]**o+(-0.324487554664)*x[1]+(0.584399369463)*x[2]**o+(0.683877139789)*x[2]
-        arg[0,2,2,1]=(0.0580007647099)*x[0]**o+(0.214488016057)*x[0]+(0.669087265419)*x[1]**o+(-0.311999860513)*x[1]+(0.678940598195)*x[2]**o+(0.658847203441)*x[2]
-        arg[0,3,0,0]=(-0.337999890505)*x[0]**o+(-0.842479530409)*x[0]+(0.786376708623)*x[1]**o+(0.597298234359)*x[1]+(0.495442668997)*x[2]**o+(-0.183828960943)*x[2]
-        arg[0,3,0,1]=(-0.825813329629)*x[0]**o+(0.197040670392)*x[0]+(0.997784261354)*x[1]**o+(-0.355290279278)*x[1]+(0.657909516664)*x[2]**o+(-0.568281670001)*x[2]
-        arg[0,3,1,0]=(0.699313512079)*x[0]**o+(-0.916350147519)*x[0]+(-0.311605808179)*x[1]**o+(0.222618888987)*x[1]+(0.872150798976)*x[2]**o+(0.139773150125)*x[2]
-        arg[0,3,1,1]=(0.140764124286)*x[0]**o+(0.994013777309)*x[0]+(-0.0792107151558)*x[1]**o+(-0.285357856751)*x[1]+(-0.800285107223)*x[2]**o+(0.413029089978)*x[2]
-        arg[0,3,2,0]=(-0.68177752688)*x[0]**o+(0.0339522871939)*x[0]+(-0.641399841911)*x[1]**o+(0.263279621719)*x[1]+(-0.406115766497)*x[2]**o+(-0.774639092638)*x[2]
-        arg[0,3,2,1]=(0.655685968811)*x[0]**o+(0.20085918281)*x[0]+(-0.753491228829)*x[1]**o+(0.393669658887)*x[1]+(0.339469131428)*x[2]**o+(0.424803724709)*x[2]
-        arg[0,4,0,0]=(-0.18027010068)*x[0]**o+(-0.773007683353)*x[0]+(0.767133020895)*x[1]**o+(-0.810449138606)*x[1]+(0.295421955604)*x[2]**o+(-0.955926880008)*x[2]
-        arg[0,4,0,1]=(-0.914768182433)*x[0]**o+(-0.67024319498)*x[0]+(0.533244666277)*x[1]**o+(-0.705719628704)*x[1]+(-0.963633923897)*x[2]**o+(-0.0818895784023)*x[2]
-        arg[0,4,1,0]=(0.274727423835)*x[0]**o+(0.838218676826)*x[0]+(0.269989900726)*x[1]**o+(0.650600179293)*x[1]+(-0.855210211935)*x[2]**o+(-0.800261683904)*x[2]
-        arg[0,4,1,1]=(0.257574026756)*x[0]**o+(-0.787643878696)*x[0]+(-0.619136916008)*x[1]**o+(-0.242580269843)*x[1]+(0.0229959873555)*x[2]**o+(-0.685725009107)*x[2]
-        arg[0,4,2,0]=(0.703185665611)*x[0]**o+(0.37686548395)*x[0]+(-0.414901304236)*x[1]**o+(0.310335568741)*x[1]+(-0.740764649572)*x[2]**o+(-0.389356987349)*x[2]
-        arg[0,4,2,1]=(-0.153792811673)*x[0]**o+(-0.179777301012)*x[0]+(0.694402537357)*x[1]**o+(-0.928918851291)*x[1]+(-0.439307255129)*x[2]**o+(0.148671231214)*x[2]
-        arg[1,0,0,0]=(0.298044833507)*x[0]**o+(0.538000859279)*x[0]+(-0.405432041063)*x[1]**o+(-0.8912548734)*x[1]+(0.929554154255)*x[2]**o+(-0.515905504512)*x[2]
-        arg[1,0,0,1]=(-0.575485929806)*x[0]**o+(0.757951009672)*x[0]+(-0.815024122535)*x[1]**o+(0.846519632117)*x[1]+(0.594901198403)*x[2]**o+(-0.672034020351)*x[2]
-        arg[1,0,1,0]=(0.998358005707)*x[0]**o+(-0.144729504804)*x[0]+(0.463445062889)*x[1]**o+(0.428918148475)*x[1]+(-0.172684103233)*x[2]**o+(-0.394742387769)*x[2]
-        arg[1,0,1,1]=(0.783593367143)*x[0]**o+(-0.269882783638)*x[0]+(-0.880336283806)*x[1]**o+(0.337087191943)*x[1]+(-0.819512478233)*x[2]**o+(0.582924902797)*x[2]
-        arg[1,0,2,0]=(-0.42345692756)*x[0]**o+(-0.251910598711)*x[0]+(-0.882193473121)*x[1]**o+(0.535405977525)*x[1]+(-0.117109433242)*x[2]**o+(0.99565775159)*x[2]
-        arg[1,0,2,1]=(-0.790917746681)*x[0]**o+(-0.291814540513)*x[0]+(-0.0828604085821)*x[1]**o+(-0.0715382319561)*x[1]+(-0.188453557262)*x[2]**o+(0.297596604241)*x[2]
-        arg[1,1,0,0]=(0.944343622558)*x[0]**o+(0.537893843235)*x[0]+(-0.370697218599)*x[1]**o+(-0.043709074747)*x[1]+(-0.803318845377)*x[2]**o+(0.814392946479)*x[2]
-        arg[1,1,0,1]=(-0.246711023019)*x[0]**o+(-0.847902406307)*x[0]+(0.062135604814)*x[1]**o+(0.581341495124)*x[1]+(0.561484848132)*x[2]**o+(0.06820017559)*x[2]
-        arg[1,1,1,0]=(-0.530782063061)*x[0]**o+(-0.951246029994)*x[0]+(-0.809647094351)*x[1]**o+(0.198165508669)*x[1]+(0.591475451485)*x[2]**o+(-0.0567469904903)*x[2]
-        arg[1,1,1,1]=(-0.710844761085)*x[0]**o+(0.742146961382)*x[0]+(0.482950602277)*x[1]**o+(-0.701576649521)*x[1]+(0.752305355358)*x[2]**o+(0.658478074845)*x[2]
-        arg[1,1,2,0]=(0.574657505707)*x[0]**o+(-0.268094098242)*x[0]+(-0.79745549318)*x[1]**o+(0.994732385826)*x[1]+(0.36752110393)*x[2]**o+(0.0733521344978)*x[2]
-        arg[1,1,2,1]=(-0.365373199615)*x[0]**o+(0.295532428151)*x[0]+(-0.916049089517)*x[1]**o+(0.562876895658)*x[1]+(0.698818392781)*x[2]**o+(0.413166153315)*x[2]
-        arg[1,2,0,0]=(0.544776615353)*x[0]**o+(-0.647889580869)*x[0]+(-0.0569263298125)*x[1]**o+(0.145083519829)*x[1]+(-0.0456368749942)*x[2]**o+(0.125915481669)*x[2]
-        arg[1,2,0,1]=(0.11684721915)*x[0]**o+(-0.793592672443)*x[0]+(-0.428585283805)*x[1]**o+(0.280358391066)*x[1]+(0.72731741847)*x[2]**o+(-0.320459136831)*x[2]
-        arg[1,2,1,0]=(0.561736948232)*x[0]**o+(0.833411538285)*x[0]+(0.361519222525)*x[1]**o+(-0.785948355356)*x[1]+(-0.595938528895)*x[2]**o+(0.720247127573)*x[2]
-        arg[1,2,1,1]=(0.578630452142)*x[0]**o+(0.218238639275)*x[0]+(0.792496779641)*x[1]**o+(-0.818431209813)*x[1]+(-0.252522807953)*x[2]**o+(0.648505893606)*x[2]
-        arg[1,2,2,0]=(-0.0269203575755)*x[0]**o+(-0.586454813205)*x[0]+(-0.239885637578)*x[1]**o+(0.186263805313)*x[1]+(0.585909451795)*x[2]**o+(-0.630731036615)*x[2]
-        arg[1,2,2,1]=(-0.534642633404)*x[0]**o+(0.921034930282)*x[0]+(-0.326672365556)*x[1]**o+(0.690509146367)*x[1]+(-0.802567575176)*x[2]**o+(-0.235903818924)*x[2]
-        arg[1,3,0,0]=(0.892302802156)*x[0]**o+(-0.528836075071)*x[0]+(-0.806520835766)*x[1]**o+(0.771321197577)*x[1]+(-0.545545197249)*x[2]**o+(-0.633185919719)*x[2]
-        arg[1,3,0,1]=(0.883702447985)*x[0]**o+(0.698176356191)*x[0]+(-0.348189466787)*x[1]**o+(-0.390058291315)*x[1]+(0.805736008481)*x[2]**o+(0.861787745203)*x[2]
-        arg[1,3,1,0]=(0.492527250981)*x[0]**o+(0.635712008949)*x[0]+(-0.464397346193)*x[1]**o+(-0.820952575379)*x[1]+(0.235015001164)*x[2]**o+(-0.846160845231)*x[2]
-        arg[1,3,1,1]=(0.372499842901)*x[0]**o+(-0.524824414377)*x[0]+(0.553450359486)*x[1]**o+(-0.187372498756)*x[1]+(-0.389983195918)*x[2]**o+(-0.310421627605)*x[2]
-        arg[1,3,2,0]=(0.533098362924)*x[0]**o+(0.917820078197)*x[0]+(-0.557683070597)*x[1]**o+(-0.388498248383)*x[1]+(-0.551866333066)*x[2]**o+(0.696873468511)*x[2]
-        arg[1,3,2,1]=(-0.909038123273)*x[0]**o+(0.19323884412)*x[0]+(-0.00134861813725)*x[1]**o+(-0.858193032021)*x[1]+(0.0436856504635)*x[2]**o+(-0.646994265986)*x[2]
-        arg[1,4,0,0]=(-0.974474210185)*x[0]**o+(-0.39786371112)*x[0]+(-0.829024534519)*x[1]**o+(0.836151642189)*x[1]+(0.679654655991)*x[2]**o+(0.750995377779)*x[2]
-        arg[1,4,0,1]=(0.964745405431)*x[0]**o+(0.269189443297)*x[0]+(0.531636623506)*x[1]**o+(-0.522687387383)*x[1]+(0.463500385567)*x[2]**o+(0.160556224359)*x[2]
-        arg[1,4,1,0]=(-0.714725894011)*x[0]**o+(0.0478807291181)*x[0]+(0.591494552904)*x[1]**o+(-0.240293119817)*x[1]+(-0.0463360360003)*x[2]**o+(-0.932835908096)*x[2]
-        arg[1,4,1,1]=(-0.809072545597)*x[0]**o+(-0.963335650229)*x[0]+(-0.781885522838)*x[1]**o+(0.822395174213)*x[1]+(-0.42590899181)*x[2]**o+(-0.237357227214)*x[2]
-        arg[1,4,2,0]=(-0.21281876112)*x[0]**o+(-0.131640536998)*x[0]+(-0.648680371617)*x[1]**o+(0.555759774031)*x[1]+(-0.911030244394)*x[2]**o+(0.962859403252)*x[2]
-        arg[1,4,2,1]=(-0.247930702516)*x[0]**o+(0.509829884687)*x[0]+(0.0387816417333)*x[1]**o+(-0.605945140743)*x[1]+(0.187880415018)*x[2]**o+(-0.813242364046)*x[2]
-        arg[2,0,0,0]=(0.616352869937)*x[0]**o+(-0.930708209966)*x[0]+(-0.874778661809)*x[1]**o+(-0.330225154904)*x[1]+(0.632020336392)*x[2]**o+(0.205631598228)*x[2]
-        arg[2,0,0,1]=(-0.85704374519)*x[0]**o+(0.99958496465)*x[0]+(0.807095767473)*x[1]**o+(0.63097388144)*x[1]+(0.000665614692828)*x[2]**o+(0.418070858864)*x[2]
-        arg[2,0,1,0]=(0.326870102902)*x[0]**o+(0.565855791221)*x[0]+(-0.39418644908)*x[1]**o+(-0.96081735968)*x[1]+(0.937255293725)*x[2]**o+(0.533015538451)*x[2]
-        arg[2,0,1,1]=(-0.699939842176)*x[0]**o+(0.808055402204)*x[0]+(0.448948790025)*x[1]**o+(-0.720122241439)*x[1]+(0.0532200858319)*x[2]**o+(-0.204851171261)*x[2]
-        arg[2,0,2,0]=(-0.985996827188)*x[0]**o+(-0.604602591167)*x[0]+(0.445903925662)*x[1]**o+(-0.163135114049)*x[1]+(-0.264281316158)*x[2]**o+(-0.381814212863)*x[2]
-        arg[2,0,2,1]=(-0.195357773436)*x[0]**o+(0.73285122682)*x[0]+(-0.914846292757)*x[1]**o+(-0.190524885095)*x[1]+(-0.103440307801)*x[2]**o+(-0.0309647945217)*x[2]
-        arg[2,1,0,0]=(0.601652939329)*x[0]**o+(-0.757171386065)*x[0]+(-0.91147090556)*x[1]**o+(-0.665258414941)*x[1]+(-0.0504245123191)*x[2]**o+(-0.274928427711)*x[2]
-        arg[2,1,0,1]=(0.534038022604)*x[0]**o+(-0.977365399298)*x[0]+(0.884656682614)*x[1]**o+(0.0866421048629)*x[1]+(-0.70687555879)*x[2]**o+(-0.99928465036)*x[2]
-        arg[2,1,1,0]=(-0.361196978257)*x[0]**o+(0.192559020092)*x[0]+(-0.0767715201942)*x[1]**o+(0.222254953069)*x[1]+(-0.128362555436)*x[2]**o+(-0.667485829139)*x[2]
-        arg[2,1,1,1]=(0.00930987921229)*x[0]**o+(0.269207633273)*x[0]+(0.943798095916)*x[1]**o+(0.483123564952)*x[1]+(-0.231669365037)*x[2]**o+(-0.877005245489)*x[2]
-        arg[2,1,2,0]=(-0.181479246679)*x[0]**o+(0.619551810132)*x[0]+(0.499400298722)*x[1]**o+(-0.307864349855)*x[1]+(0.19303040809)*x[2]**o+(0.523640816928)*x[2]
-        arg[2,1,2,1]=(-0.99665050175)*x[0]**o+(-0.647775674514)*x[0]+(-0.0015481673821)*x[1]**o+(-0.749198451256)*x[1]+(0.652528193579)*x[2]**o+(-0.0194127861341)*x[2]
-        arg[2,2,0,0]=(0.870069083779)*x[0]**o+(0.179747121592)*x[0]+(0.387523112512)*x[1]**o+(0.625711925024)*x[1]+(0.840141938096)*x[2]**o+(0.629709976556)*x[2]
-        arg[2,2,0,1]=(-0.841259995642)*x[0]**o+(0.220858862445)*x[0]+(0.397334296484)*x[1]**o+(-0.036654179636)*x[1]+(0.235704322138)*x[2]**o+(-0.6299228864)*x[2]
-        arg[2,2,1,0]=(-0.561184923307)*x[0]**o+(-0.643644162376)*x[0]+(0.728784994685)*x[1]**o+(-0.697418070844)*x[1]+(-0.56166463788)*x[2]**o+(-0.668760084534)*x[2]
-        arg[2,2,1,1]=(0.92243000401)*x[0]**o+(0.96165833182)*x[0]+(0.540379002453)*x[1]**o+(0.630245078647)*x[1]+(-0.375873656541)*x[2]**o+(0.71424898756)*x[2]
-        arg[2,2,2,0]=(0.331131296272)*x[0]**o+(-0.136167378345)*x[0]+(-0.375407637025)*x[1]**o+(-0.0890691004072)*x[1]+(-0.787306129385)*x[2]**o+(-0.447474749986)*x[2]
-        arg[2,2,2,1]=(-0.47892171854)*x[0]**o+(0.341448171328)*x[0]+(0.662403724393)*x[1]**o+(0.581128263913)*x[1]+(0.00987835902932)*x[2]**o+(-0.884847129103)*x[2]
-        arg[2,3,0,0]=(0.0219406022052)*x[0]**o+(-0.370001982912)*x[0]+(0.948162807268)*x[1]**o+(-0.870857624404)*x[1]+(0.580053532448)*x[2]**o+(-0.488657040041)*x[2]
-        arg[2,3,0,1]=(-0.114799511617)*x[0]**o+(0.547853919356)*x[0]+(-0.224367707174)*x[1]**o+(0.551491902831)*x[1]+(-0.101845907889)*x[2]**o+(-0.793527438395)*x[2]
-        arg[2,3,1,0]=(-0.103518223905)*x[0]**o+(-0.319840011093)*x[0]+(-0.856612861717)*x[1]**o+(0.0208578084364)*x[1]+(0.132248308449)*x[2]**o+(-0.580663554499)*x[2]
-        arg[2,3,1,1]=(-0.958142224242)*x[0]**o+(-0.401299403423)*x[0]+(-0.289034019185)*x[1]**o+(-0.0913958572584)*x[1]+(-0.818515945817)*x[2]**o+(-0.918366425737)*x[2]
-        arg[2,3,2,0]=(0.730554594734)*x[0]**o+(0.209964841318)*x[0]+(-0.4157212696)*x[1]**o+(-0.673375403124)*x[1]+(-0.409899056244)*x[2]**o+(0.124418003637)*x[2]
-        arg[2,3,2,1]=(-0.930974589897)*x[0]**o+(0.256452400333)*x[0]+(0.778606258675)*x[1]**o+(0.23173182074)*x[1]+(-0.846439682798)*x[2]**o+(-0.408860675089)*x[2]
-        arg[2,4,0,0]=(-0.246046780287)*x[0]**o+(-0.653766430943)*x[0]+(0.725379461155)*x[1]**o+(-0.305490823497)*x[1]+(0.0837637468427)*x[2]**o+(-0.458770631133)*x[2]
-        arg[2,4,0,1]=(-0.612751147889)*x[0]**o+(0.504418327803)*x[0]+(-0.835051783805)*x[1]**o+(-0.86410559166)*x[1]+(0.928919612861)*x[2]**o+(0.303164594248)*x[2]
-        arg[2,4,1,0]=(-0.26092972064)*x[0]**o+(-0.990592356395)*x[0]+(-0.48716443965)*x[1]**o+(0.659447608304)*x[1]+(0.429865593656)*x[2]**o+(-0.661470437053)*x[2]
-        arg[2,4,1,1]=(0.325840618456)*x[0]**o+(-0.261974904995)*x[0]+(0.476982730267)*x[1]**o+(-0.738119182885)*x[1]+(0.903618858571)*x[2]**o+(-0.287442022624)*x[2]
-        arg[2,4,2,0]=(0.655590135983)*x[0]**o+(-0.135505327297)*x[0]+(-0.38079131346)*x[1]**o+(0.663850751769)*x[1]+(-0.658568109867)*x[2]**o+(-0.267875066063)*x[2]
-        arg[2,4,2,1]=(0.570712162768)*x[0]**o+(0.390833274898)*x[0]+(-0.97326103687)*x[1]**o+(-0.419300688467)*x[1]+(0.55695479018)*x[2]**o+(0.547271407555)*x[2]
-        arg[3,0,0,0]=(-0.486023722572)*x[0]**o+(-0.790544923201)*x[0]+(0.101237181961)*x[1]**o+(0.23267779263)*x[1]+(-0.458580701132)*x[2]**o+(-0.479449733139)*x[2]
-        arg[3,0,0,1]=(-0.705291625776)*x[0]**o+(0.144166702405)*x[0]+(-0.210596631253)*x[1]**o+(0.843721258425)*x[1]+(-0.716420627484)*x[2]**o+(0.145427688875)*x[2]
-        arg[3,0,1,0]=(-0.838974120992)*x[0]**o+(0.824423674933)*x[0]+(-0.211643366873)*x[1]**o+(0.603255736693)*x[1]+(-0.119484817371)*x[2]**o+(-0.357272543813)*x[2]
-        arg[3,0,1,1]=(0.140027541071)*x[0]**o+(0.373598174368)*x[0]+(-0.661831753147)*x[1]**o+(-0.973724961653)*x[1]+(-0.0738899100301)*x[2]**o+(0.0128579666074)*x[2]
-        arg[3,0,2,0]=(-0.39083471939)*x[0]**o+(-0.00821070494132)*x[0]+(-0.315936839906)*x[1]**o+(-0.967556350778)*x[1]+(0.136991762476)*x[2]**o+(0.374041520875)*x[2]
-        arg[3,0,2,1]=(0.0734743009776)*x[0]**o+(-0.103186084491)*x[0]+(0.426933353985)*x[1]**o+(-0.631917740007)*x[1]+(0.755296770294)*x[2]**o+(0.492171872216)*x[2]
-        arg[3,1,0,0]=(-0.414502599055)*x[0]**o+(0.512031410722)*x[0]+(0.610677049483)*x[1]**o+(-0.075275839509)*x[1]+(0.853407100545)*x[2]**o+(-0.569731924126)*x[2]
-        arg[3,1,0,1]=(0.886115095396)*x[0]**o+(0.811807969433)*x[0]+(0.550623354147)*x[1]**o+(-0.703728894875)*x[1]+(0.784318903356)*x[2]**o+(0.45891829089)*x[2]
-        arg[3,1,1,0]=(0.312577129879)*x[0]**o+(0.0127110992422)*x[0]+(-0.174614340667)*x[1]**o+(0.744535847679)*x[1]+(0.991125452344)*x[2]**o+(-0.405595301834)*x[2]
-        arg[3,1,1,1]=(0.784369258288)*x[0]**o+(-0.709503832235)*x[0]+(0.032963558933)*x[1]**o+(-0.471036543959)*x[1]+(-0.138022967476)*x[2]**o+(-0.38452297541)*x[2]
-        arg[3,1,2,0]=(-0.337332295082)*x[0]**o+(-0.460457867002)*x[0]+(-0.102806204559)*x[1]**o+(-0.502889108364)*x[1]+(-0.641488011668)*x[2]**o+(0.359501036527)*x[2]
-        arg[3,1,2,1]=(0.791575892417)*x[0]**o+(0.126853712619)*x[0]+(-0.408911942637)*x[1]**o+(0.557039825987)*x[1]+(-0.260719710621)*x[2]**o+(-0.648326395935)*x[2]
-        arg[3,2,0,0]=(-0.0909007497318)*x[0]**o+(-0.337085519884)*x[0]+(-0.651987922715)*x[1]**o+(-0.130225558042)*x[1]+(0.926567188664)*x[2]**o+(0.764369275478)*x[2]
-        arg[3,2,0,1]=(-0.764137934896)*x[0]**o+(0.443892891832)*x[0]+(0.688197384487)*x[1]**o+(0.485210058592)*x[1]+(0.267932741224)*x[2]**o+(0.0366064885582)*x[2]
-        arg[3,2,1,0]=(0.49435832562)*x[0]**o+(0.860649583676)*x[0]+(0.667415091305)*x[1]**o+(0.144069385904)*x[1]+(-0.933847080974)*x[2]**o+(-0.378123304101)*x[2]
-        arg[3,2,1,1]=(-0.460752644946)*x[0]**o+(0.491079753273)*x[0]+(-0.536055633506)*x[1]**o+(0.786378615881)*x[1]+(-0.190647453518)*x[2]**o+(-0.192868019034)*x[2]
-        arg[3,2,2,0]=(0.0946687985697)*x[0]**o+(0.978197346579)*x[0]+(0.972747948856)*x[1]**o+(-0.575670550665)*x[1]+(-0.096229657916)*x[2]**o+(-0.772567430449)*x[2]
-        arg[3,2,2,1]=(0.177521713734)*x[0]**o+(0.0683685252148)*x[0]+(0.423995112682)*x[1]**o+(-0.489247981968)*x[1]+(-0.537130434099)*x[2]**o+(-0.0228879131449)*x[2]
-        arg[3,3,0,0]=(0.592201472175)*x[0]**o+(0.674304504132)*x[0]+(0.428414872879)*x[1]**o+(0.956414209094)*x[1]+(-0.272853242491)*x[2]**o+(-0.639858910901)*x[2]
-        arg[3,3,0,1]=(0.572972211447)*x[0]**o+(0.943096858489)*x[0]+(-0.990948797302)*x[1]**o+(-0.475383526007)*x[1]+(0.542076985363)*x[2]**o+(-0.884809421862)*x[2]
-        arg[3,3,1,0]=(0.775163727164)*x[0]**o+(0.101808074039)*x[0]+(0.575490330857)*x[1]**o+(0.199751068512)*x[1]+(0.538742155685)*x[2]**o+(-0.725822956214)*x[2]
-        arg[3,3,1,1]=(-0.244586606882)*x[0]**o+(0.983712254807)*x[0]+(0.187370538052)*x[1]**o+(0.332611385073)*x[1]+(0.536377667373)*x[2]**o+(0.255272558489)*x[2]
-        arg[3,3,2,0]=(-0.676040282048)*x[0]**o+(-0.172059284021)*x[0]+(0.25100451419)*x[1]**o+(0.303226061816)*x[1]+(0.138976177556)*x[2]**o+(-0.330104849626)*x[2]
-        arg[3,3,2,1]=(-0.136437682299)*x[0]**o+(0.938786085213)*x[0]+(0.853018944962)*x[1]**o+(-0.628078903025)*x[1]+(-0.903567849919)*x[2]**o+(0.837621994591)*x[2]
-        arg[3,4,0,0]=(0.28632587806)*x[0]**o+(-0.480626263522)*x[0]+(-0.0537965100699)*x[1]**o+(0.423252432505)*x[1]+(0.200777153039)*x[2]**o+(0.629713098071)*x[2]
-        arg[3,4,0,1]=(0.326448964148)*x[0]**o+(0.809991245673)*x[0]+(-0.527362539073)*x[1]**o+(-0.0727890632651)*x[1]+(0.210806278508)*x[2]**o+(0.736535063786)*x[2]
-        arg[3,4,1,0]=(0.760474271531)*x[0]**o+(0.378083396435)*x[0]+(-0.991296179693)*x[1]**o+(0.431965391269)*x[1]+(-0.12597704605)*x[2]**o+(-0.128017966575)*x[2]
-        arg[3,4,1,1]=(-0.21508452109)*x[0]**o+(-0.583147117492)*x[0]+(0.779535489322)*x[1]**o+(0.601144982341)*x[1]+(-0.870362610456)*x[2]**o+(-0.318535391517)*x[2]
-        arg[3,4,2,0]=(-0.195181632154)*x[0]**o+(0.237570596161)*x[0]+(-0.794725125363)*x[1]**o+(0.862030507166)*x[1]+(-0.612206533195)*x[2]**o+(0.494078406766)*x[2]
-        arg[3,4,2,1]=(0.270278273932)*x[0]**o+(-0.115833233113)*x[0]+(0.754464364285)*x[1]**o+(-0.186069521903)*x[1]+(-0.864426716229)*x[2]**o+(-0.425054438064)*x[2]
-        ref[0,0,0,0]=(0.412792261707)/(o+1.)+(0.904364083309)+(0.663998508168)*0.5**o
-        ref[0,0,0,1]=(-1.07469333717)/(o+1.)+(-0.0923352454984)+(-0.010130464476)*0.5**o
-        ref[0,0,1,0]=(0.287923726124)/(o+1.)+(-0.145507770124)+(-0.176542289385)*0.5**o
-        ref[0,0,1,1]=(-0.24656050398)/(o+1.)+(0.341982901349)+(-0.98152572229)*0.5**o
-        ref[0,0,2,0]=(1.24918965808)/(o+1.)+(0.165246366859)+(0.555897422173)*0.5**o
-        ref[0,0,2,1]=(-1.23538766622)/(o+1.)+(-0.507697956406)+(0.23127040923)*0.5**o
-        ref[0,1,0,0]=(-0.267829490776)/(o+1.)+(-0.549968075823)+(0.0202445177842)*0.5**o
-        ref[0,1,0,1]=(0.826177960569)/(o+1.)+(0.113794537096)+(0.99935098551)*0.5**o
-        ref[0,1,1,0]=(0.124131681048)/(o+1.)+(0.482277820918)+(0.151799117419)*0.5**o
-        ref[0,1,1,1]=(0.620076580442)/(o+1.)+(0.401695495934)+(-0.51422532626)*0.5**o
-        ref[0,1,2,0]=(1.75895293799)/(o+1.)+(-0.225823657945)+(0.908244888839)*0.5**o
-        ref[0,1,2,1]=(-0.334875364565)/(o+1.)+(1.30271444502)+(-0.872307766634)*0.5**o
-        ref[0,2,0,0]=(-0.42419420508)/(o+1.)+(-0.3575838585)+(0.00173619592035)*0.5**o
-        ref[0,2,0,1]=(-0.57391253095)/(o+1.)+(-0.515088003037)+(0.998184336552)*0.5**o
-        ref[0,2,1,0]=(0.114144861758)/(o+1.)+(-0.330251158386)+(-0.921234331968)*0.5**o
-        ref[0,2,1,1]=(-1.42031433961)/(o+1.)+(0.581091144051)+(0.153578015941)*0.5**o
-        ref[0,2,2,0]=(0.827236715358)/(o+1.)+(0.125325412749)+(0.29601674794)*0.5**o
-        ref[0,2,2,1]=(1.34802786361)/(o+1.)+(0.280667679493)+(0.0580007647099)*0.5**o
-        ref[0,3,0,0]=(1.28181937762)/(o+1.)+(-0.214505128496)+(-0.337999890505)*0.5**o
-        ref[0,3,0,1]=(1.65569377802)/(o+1.)+(-0.363265639443)+(-0.825813329629)*0.5**o
-        ref[0,3,1,0]=(0.560544990797)/(o+1.)+(-0.276979054204)+(0.699313512079)*0.5**o
-        ref[0,3,1,1]=(-0.879495822379)/(o+1.)+(0.560842505268)+(0.140764124286)*0.5**o
-        ref[0,3,2,0]=(-1.04751560841)/(o+1.)+(-0.238703591863)+(-0.68177752688)*0.5**o
-        ref[0,3,2,1]=(-0.414022097401)/(o+1.)+(0.509666283203)+(0.655685968811)*0.5**o
-        ref[0,4,0,0]=(1.0625549765)/(o+1.)+(-1.26969185098)+(-0.18027010068)*0.5**o
-        ref[0,4,0,1]=(-0.430389257621)/(o+1.)+(-0.728926201043)+(-0.914768182433)*0.5**o
-        ref[0,4,1,0]=(-0.585220311209)/(o+1.)+(0.344278586108)+(0.274727423835)*0.5**o
-        ref[0,4,1,1]=(-0.596140928652)/(o+1.)+(-0.857974578823)+(0.257574026756)*0.5**o
-        ref[0,4,2,0]=(-1.15566595381)/(o+1.)+(0.148922032671)+(0.703185665611)*0.5**o
-        ref[0,4,2,1]=(0.255095282229)/(o+1.)+(-0.480012460544)+(-0.153792811673)*0.5**o
-        ref[1,0,0,0]=(0.524122113192)/(o+1.)+(-0.434579759316)+(0.298044833507)*0.5**o
-        ref[1,0,0,1]=(-0.220122924131)/(o+1.)+(0.466218310719)+(-0.575485929806)*0.5**o
-        ref[1,0,1,0]=(0.290760959656)/(o+1.)+(-0.0552768720487)+(0.998358005707)*0.5**o
-        ref[1,0,1,1]=(-1.69984876204)/(o+1.)+(0.325064655551)+(0.783593367143)*0.5**o
-        ref[1,0,2,0]=(-0.999302906363)/(o+1.)+(0.639576565202)+(-0.42345692756)*0.5**o
-        ref[1,0,2,1]=(-0.271313965844)/(o+1.)+(-0.0328780841139)+(-0.790917746681)*0.5**o
-        ref[1,1,0,0]=(-1.17401606398)/(o+1.)+(0.654288857484)+(0.944343622558)*0.5**o
-        ref[1,1,0,1]=(0.623620452946)/(o+1.)+(-0.0991803677964)+(-0.246711023019)*0.5**o
-        ref[1,1,1,0]=(-0.218171642866)/(o+1.)+(-0.404913755908)+(-0.530782063061)*0.5**o
-        ref[1,1,1,1]=(1.23525595763)/(o+1.)+(0.349524193353)+(-0.710844761085)*0.5**o
-        ref[1,1,2,0]=(-0.42993438925)/(o+1.)+(0.399995211041)+(0.574657505707)*0.5**o
-        ref[1,1,2,1]=(-0.217230696736)/(o+1.)+(0.635787738562)+(-0.365373199615)*0.5**o
-        ref[1,2,0,0]=(-0.102563204807)/(o+1.)+(-0.188445289686)+(0.544776615353)*0.5**o
-        ref[1,2,0,1]=(0.298732134665)/(o+1.)+(-0.416846709104)+(0.11684721915)*0.5**o
-        ref[1,2,1,0]=(-0.234419306371)/(o+1.)+(0.383855155251)+(0.561736948232)*0.5**o
-        ref[1,2,1,1]=(0.539973971687)/(o+1.)+(0.0241566615339)+(0.578630452142)*0.5**o
-        ref[1,2,2,0]=(0.346023814217)/(o+1.)+(-0.515461022254)+(-0.0269203575755)*0.5**o
-        ref[1,2,2,1]=(-1.12923994073)/(o+1.)+(0.687820128862)+(-0.534642633404)*0.5**o
-        ref[1,3,0,0]=(-1.35206603301)/(o+1.)+(-0.195350398606)+(0.892302802156)*0.5**o
-        ref[1,3,0,1]=(0.457546541694)/(o+1.)+(0.584952905039)+(0.883702447985)*0.5**o
-        ref[1,3,1,0]=(-0.229382345029)/(o+1.)+(-0.51570070583)+(0.492527250981)*0.5**o
-        ref[1,3,1,1]=(0.163467163568)/(o+1.)+(-0.511309270369)+(0.372499842901)*0.5**o
-        ref[1,3,2,0]=(-1.10954940366)/(o+1.)+(0.613097649163)+(0.533098362924)*0.5**o
-        ref[1,3,2,1]=(0.0423370323263)/(o+1.)+(-0.655974226943)+(-0.909038123273)*0.5**o
-        ref[1,4,0,0]=(-0.149369878527)/(o+1.)+(0.594641654424)+(-0.974474210185)*0.5**o
-        ref[1,4,0,1]=(0.995137009073)/(o+1.)+(-0.0464708598635)+(0.964745405431)*0.5**o
-        ref[1,4,1,0]=(0.545158516903)/(o+1.)+(-0.562624149397)+(-0.714725894011)*0.5**o
-        ref[1,4,1,1]=(-1.20779451465)/(o+1.)+(-0.189148851615)+(-0.809072545597)*0.5**o
-        ref[1,4,2,0]=(-1.55971061601)/(o+1.)+(0.693489320143)+(-0.21281876112)*0.5**o
-        ref[1,4,2,1]=(0.226662056752)/(o+1.)+(-0.454678810051)+(-0.247930702516)*0.5**o
-        ref[2,0,0,0]=(-0.242758325417)/(o+1.)+(-0.527650883321)+(0.616352869937)*0.5**o
-        ref[2,0,0,1]=(0.807761382166)/(o+1.)+(1.02431485248)+(-0.85704374519)*0.5**o
-        ref[2,0,1,0]=(0.543068844645)/(o+1.)+(0.0690269849966)+(0.326870102902)*0.5**o
-        ref[2,0,1,1]=(0.502168875857)/(o+1.)+(-0.0584590052478)+(-0.699939842176)*0.5**o
-        ref[2,0,2,0]=(0.181622609504)/(o+1.)+(-0.57477595904)+(-0.985996827188)*0.5**o
-        ref[2,0,2,1]=(-1.01828660056)/(o+1.)+(0.255680773601)+(-0.195357773436)*0.5**o
-        ref[2,1,0,0]=(-0.961895417879)/(o+1.)+(-0.848679114358)+(0.601652939329)*0.5**o
-        ref[2,1,0,1]=(0.177781123824)/(o+1.)+(-0.945003972397)+(0.534038022604)*0.5**o
-        ref[2,1,1,0]=(-0.20513407563)/(o+1.)+(-0.126335927989)+(-0.361196978257)*0.5**o
-        ref[2,1,1,1]=(0.712128730879)/(o+1.)+(-0.0623370236322)+(0.00930987921229)*0.5**o
-        ref[2,1,2,0]=(0.692430706812)/(o+1.)+(0.417664138602)+(-0.181479246679)*0.5**o
-        ref[2,1,2,1]=(0.650980026197)/(o+1.)+(-0.708193455952)+(-0.99665050175)*0.5**o
-        ref[2,2,0,0]=(1.22766505061)/(o+1.)+(0.717584511586)+(0.870069083779)*0.5**o
-        ref[2,2,0,1]=(0.633038618622)/(o+1.)+(-0.222859101796)+(-0.841259995642)*0.5**o
-        ref[2,2,1,0]=(0.167120356805)/(o+1.)+(-1.00491115888)+(-0.561184923307)*0.5**o
-        ref[2,2,1,1]=(0.164505345911)/(o+1.)+(1.15307619901)+(0.92243000401)*0.5**o
-        ref[2,2,2,0]=(-1.16271376641)/(o+1.)+(-0.336355614369)+(0.331131296272)*0.5**o
-        ref[2,2,2,1]=(0.672282083422)/(o+1.)+(0.018864653069)+(-0.47892171854)*0.5**o
-        ref[2,3,0,0]=(1.52821633972)/(o+1.)+(-0.864758323678)+(0.0219406022052)*0.5**o
-        ref[2,3,0,1]=(-0.326213615062)/(o+1.)+(0.152909191896)+(-0.114799511617)*0.5**o
-        ref[2,3,1,0]=(-0.724364553267)/(o+1.)+(-0.439822878578)+(-0.103518223905)*0.5**o
-        ref[2,3,1,1]=(-1.107549965)/(o+1.)+(-0.705530843209)+(-0.958142224242)*0.5**o
-        ref[2,3,2,0]=(-0.825620325844)/(o+1.)+(-0.169496279085)+(0.730554594734)*0.5**o
-        ref[2,3,2,1]=(-0.0678334241233)/(o+1.)+(0.0396617729923)+(-0.930974589897)*0.5**o
-        ref[2,4,0,0]=(0.809143207998)/(o+1.)+(-0.709013942786)+(-0.246046780287)*0.5**o
-        ref[2,4,0,1]=(0.0938678290563)/(o+1.)+(-0.0282613348041)+(-0.612751147889)*0.5**o
-        ref[2,4,1,0]=(-0.0572988459938)/(o+1.)+(-0.496307592572)+(-0.26092972064)*0.5**o
-        ref[2,4,1,1]=(1.38060158884)/(o+1.)+(-0.643768055252)+(0.325840618456)*0.5**o
-        ref[2,4,2,0]=(-1.03935942333)/(o+1.)+(0.130235179204)+(0.655590135983)*0.5**o
-        ref[2,4,2,1]=(-0.41630624669)/(o+1.)+(0.259401996992)+(0.570712162768)*0.5**o
-        ref[3,0,0,0]=(-0.357343519171)/(o+1.)+(-0.518658431855)+(-0.486023722572)*0.5**o
-        ref[3,0,0,1]=(-0.927017258737)/(o+1.)+(0.566657824853)+(-0.705291625776)*0.5**o
-        ref[3,0,1,0]=(-0.331128184244)/(o+1.)+(0.535203433907)+(-0.838974120992)*0.5**o
-        ref[3,0,1,1]=(-0.735721663177)/(o+1.)+(-0.293634410339)+(0.140027541071)*0.5**o
-        ref[3,0,2,0]=(-0.178945077431)/(o+1.)+(-0.300862767422)+(-0.39083471939)*0.5**o
-        ref[3,0,2,1]=(1.18223012428)/(o+1.)+(-0.121465976141)+(0.0734743009776)*0.5**o
-        ref[3,1,0,0]=(1.46408415003)/(o+1.)+(-0.0664881764563)+(-0.414502599055)*0.5**o
-        ref[3,1,0,1]=(1.3349422575)/(o+1.)+(0.283498682724)+(0.886115095396)*0.5**o
-        ref[3,1,1,0]=(0.816511111677)/(o+1.)+(0.175825822544)+(0.312577129879)*0.5**o
-        ref[3,1,1,1]=(-0.105059408543)/(o+1.)+(-0.782531675802)+(0.784369258288)*0.5**o
-        ref[3,1,2,0]=(-0.744294216228)/(o+1.)+(-0.301922969419)+(-0.337332295082)*0.5**o
-        ref[3,1,2,1]=(-0.669631653258)/(o+1.)+(0.0177835713351)+(0.791575892417)*0.5**o
-        ref[3,2,0,0]=(0.274579265949)/(o+1.)+(0.148529098776)+(-0.0909007497318)*0.5**o
-        ref[3,2,0,1]=(0.956130125711)/(o+1.)+(0.482854719491)+(-0.764137934896)*0.5**o
-        ref[3,2,1,0]=(-0.266431989669)/(o+1.)+(0.313297832739)+(0.49435832562)*0.5**o
-        ref[3,2,1,1]=(-0.726703087024)/(o+1.)+(0.542295175061)+(-0.460752644946)*0.5**o
-        ref[3,2,2,0]=(0.87651829094)/(o+1.)+(-0.185020317268)+(0.0946687985697)*0.5**o
-        ref[3,2,2,1]=(-0.113135321417)/(o+1.)+(-0.221883684949)+(0.177521713734)*0.5**o
-        ref[3,3,0,0]=(0.155561630388)/(o+1.)+(0.495429901163)+(0.592201472175)*0.5**o
-        ref[3,3,0,1]=(-0.44887181194)/(o+1.)+(-0.20854804469)+(0.572972211447)*0.5**o
-        ref[3,3,1,0]=(1.11423248654)/(o+1.)+(-0.212131906831)+(0.775163727164)*0.5**o
-        ref[3,3,1,1]=(0.723748205425)/(o+1.)+(0.785798099184)+(-0.244586606882)*0.5**o
-        ref[3,3,2,0]=(0.389980691746)/(o+1.)+(-0.0994690359155)+(-0.676040282048)*0.5**o
-        ref[3,3,2,1]=(-0.0505489049572)/(o+1.)+(0.57416458839)+(-0.136437682299)*0.5**o
-        ref[3,4,0,0]=(0.14698064297)/(o+1.)+(0.286169633527)+(0.28632587806)*0.5**o
-        ref[3,4,0,1]=(-0.316556260565)/(o+1.)+(0.736868623097)+(0.326448964148)*0.5**o
-        ref[3,4,1,0]=(-1.11727322574)/(o+1.)+(0.341015410564)+(0.760474271531)*0.5**o
-        ref[3,4,1,1]=(-0.0908271211344)/(o+1.)+(-0.150268763334)+(-0.21508452109)*0.5**o
-        ref[3,4,2,0]=(-1.40693165856)/(o+1.)+(0.796839755046)+(-0.195181632154)*0.5**o
-        ref[3,4,2,1]=(-0.109962351944)/(o+1.)+(-0.36347859654)+(0.270278273932)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.0433006726989)*x[0]**o+(0.819109331838)*x[0]+(0.150292245587)*x[1]**o+(0.949397165008)*x[1]
-        ref=(0.150292245587)/(o+1.)+(0.884253248423)+(0.0433006726989)*0.5**o
-      else:
-        arg=(-0.765858486678)*x[0]**o+(-0.829061249978)*x[0]+(-0.0255273602735)*x[1]**o+(-0.93097352763)*x[1]+(-0.775974817954)*x[2]**o+(0.0414580763278)*x[2]
-        ref=(-0.801502178228)/(o+1.)+(-0.85928835064)+(-0.765858486678)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.float_)
-      if dim==2:
-        arg[0]=(0.708418284738)*x[0]**o+(-0.265416249865)*x[0]+(0.0412873279676)*x[1]**o+(0.18827690539)*x[1]
-        arg[1]=(-0.0639578348425)*x[0]**o+(-0.435408788697)*x[0]+(0.429134354603)*x[1]**o+(0.0391558318157)*x[1]
-        ref[0]=(0.0412873279676)/(o+1.)+(-0.0385696722374)+(0.708418284738)*0.5**o
-        ref[1]=(0.429134354603)/(o+1.)+(-0.198126478441)+(-0.0639578348425)*0.5**o
-      else:
-        arg[0]=(-0.516066856372)*x[0]**o+(-0.509677909948)*x[0]+(0.189594948337)*x[1]**o+(0.743432553688)*x[1]+(0.687864109046)*x[2]**o+(0.257280277379)*x[2]
-        arg[1]=(0.948762785699)*x[0]**o+(0.372861763607)*x[0]+(-0.166460043702)*x[1]**o+(0.0474018901531)*x[1]+(-0.485380626595)*x[2]**o+(-0.341701937267)*x[2]
-        ref[0]=(0.877459057383)/(o+1.)+(0.245517460559)+(-0.516066856372)*0.5**o
-        ref[1]=(-0.651840670298)/(o+1.)+(0.0392808582465)+(0.948762785699)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.0540280486222)*x[0]**o+(-0.936629447756)*x[0]+(0.530867101627)*x[1]**o+(-0.404522355122)*x[1]
-        arg[0,1]=(0.585051034599)*x[0]**o+(-0.899683342239)*x[0]+(0.61865830472)*x[1]**o+(0.491768251743)*x[1]
-        arg[0,2]=(0.924131379905)*x[0]**o+(-0.394367734246)*x[0]+(0.432122525065)*x[1]**o+(0.79923634141)*x[1]
-        arg[0,3]=(-0.41435196904)*x[0]**o+(-0.22039395628)*x[0]+(-0.866551833459)*x[1]**o+(-0.0966534238435)*x[1]
-        arg[0,4]=(0.855785701017)*x[0]**o+(0.0879754354535)*x[0]+(-0.0727782016239)*x[1]**o+(0.746878225435)*x[1]
-        arg[1,0]=(-0.868450306659)*x[0]**o+(-0.00845792225901)*x[0]+(0.227399876353)*x[1]**o+(-0.522196483799)*x[1]
-        arg[1,1]=(0.53076931297)*x[0]**o+(0.165744140226)*x[0]+(0.14586398181)*x[1]**o+(-0.694169551043)*x[1]
-        arg[1,2]=(-0.936146144862)*x[0]**o+(-0.198367580291)*x[0]+(0.848822682163)*x[1]**o+(0.360521711263)*x[1]
-        arg[1,3]=(-0.395889451325)*x[0]**o+(0.510713345487)*x[0]+(-0.62440033386)*x[1]**o+(0.29695714683)*x[1]
-        arg[1,4]=(0.847685553395)*x[0]**o+(-0.291266469606)*x[0]+(-0.517114839541)*x[1]**o+(-0.279948585383)*x[1]
-        arg[2,0]=(-0.622481093435)*x[0]**o+(0.0911922519622)*x[0]+(0.216648336495)*x[1]**o+(0.663562516802)*x[1]
-        arg[2,1]=(0.567833843918)*x[0]**o+(0.18116887359)*x[0]+(-0.0433012798352)*x[1]**o+(0.998332142285)*x[1]
-        arg[2,2]=(-0.81729786652)*x[0]**o+(-0.634680104287)*x[0]+(0.991513806139)*x[1]**o+(-0.0721700196003)*x[1]
-        arg[2,3]=(0.121181286827)*x[0]**o+(-0.677803464822)*x[0]+(0.870139639102)*x[1]**o+(-0.134662002755)*x[1]
-        arg[2,4]=(-0.167376807346)*x[0]**o+(-0.500556007898)*x[0]+(-0.839256017197)*x[1]**o+(-0.82147890878)*x[1]
-        arg[3,0]=(0.576521064132)*x[0]**o+(-0.510276372588)*x[0]+(0.92888227487)*x[1]**o+(-0.88293512036)*x[1]
-        arg[3,1]=(-0.159048471862)*x[0]**o+(-0.0479500210678)*x[0]+(-0.0216438779517)*x[1]**o+(-0.108252189548)*x[1]
-        arg[3,2]=(-0.483779576334)*x[0]**o+(-0.871829147209)*x[0]+(-0.22556218283)*x[1]**o+(0.451007116911)*x[1]
-        arg[3,3]=(-0.358888369902)*x[0]**o+(0.436554685191)*x[0]+(-0.0359187908139)*x[1]**o+(-0.0148930474244)*x[1]
-        arg[3,4]=(-0.995411478882)*x[0]**o+(-0.457206328785)*x[0]+(-0.833823947273)*x[1]**o+(-0.0517068976093)*x[1]
-        ref[0,0]=(0.530867101627)/(o+1.)+(-0.670575901439)+(-0.0540280486222)*0.5**o
-        ref[0,1]=(0.61865830472)/(o+1.)+(-0.203957545248)+(0.585051034599)*0.5**o
-        ref[0,2]=(0.432122525065)/(o+1.)+(0.202434303582)+(0.924131379905)*0.5**o
-        ref[0,3]=(-0.866551833459)/(o+1.)+(-0.158523690062)+(-0.41435196904)*0.5**o
-        ref[0,4]=(-0.0727782016239)/(o+1.)+(0.417426830444)+(0.855785701017)*0.5**o
-        ref[1,0]=(0.227399876353)/(o+1.)+(-0.265327203029)+(-0.868450306659)*0.5**o
-        ref[1,1]=(0.14586398181)/(o+1.)+(-0.264212705408)+(0.53076931297)*0.5**o
-        ref[1,2]=(0.848822682163)/(o+1.)+(0.0810770654864)+(-0.936146144862)*0.5**o
-        ref[1,3]=(-0.62440033386)/(o+1.)+(0.403835246159)+(-0.395889451325)*0.5**o
-        ref[1,4]=(-0.517114839541)/(o+1.)+(-0.285607527495)+(0.847685553395)*0.5**o
-        ref[2,0]=(0.216648336495)/(o+1.)+(0.377377384382)+(-0.622481093435)*0.5**o
-        ref[2,1]=(-0.0433012798352)/(o+1.)+(0.589750507938)+(0.567833843918)*0.5**o
-        ref[2,2]=(0.991513806139)/(o+1.)+(-0.353425061944)+(-0.81729786652)*0.5**o
-        ref[2,3]=(0.870139639102)/(o+1.)+(-0.406232733789)+(0.121181286827)*0.5**o
-        ref[2,4]=(-0.839256017197)/(o+1.)+(-0.661017458339)+(-0.167376807346)*0.5**o
-        ref[3,0]=(0.92888227487)/(o+1.)+(-0.696605746474)+(0.576521064132)*0.5**o
-        ref[3,1]=(-0.0216438779517)/(o+1.)+(-0.078101105308)+(-0.159048471862)*0.5**o
-        ref[3,2]=(-0.22556218283)/(o+1.)+(-0.210411015149)+(-0.483779576334)*0.5**o
-        ref[3,3]=(-0.0359187908139)/(o+1.)+(0.210830818883)+(-0.358888369902)*0.5**o
-        ref[3,4]=(-0.833823947273)/(o+1.)+(-0.254456613197)+(-0.995411478882)*0.5**o
-      else:
-        arg[0,0]=(-0.937858877179)*x[0]**o+(-0.41590845461)*x[0]+(0.317385444442)*x[1]**o+(-0.166284606371)*x[1]+(-0.846106994172)*x[2]**o+(0.227876218054)*x[2]
-        arg[0,1]=(0.497785867084)*x[0]**o+(0.883557362705)*x[0]+(-0.846602726567)*x[1]**o+(-0.859091910548)*x[1]+(-0.295742503292)*x[2]**o+(-0.853931233266)*x[2]
-        arg[0,2]=(0.744501879094)*x[0]**o+(-0.0181115125382)*x[0]+(-0.856099357899)*x[1]**o+(0.767449074734)*x[1]+(-0.858552187616)*x[2]**o+(-0.580142057156)*x[2]
-        arg[0,3]=(0.210031467359)*x[0]**o+(-0.994426053833)*x[0]+(0.648522478175)*x[1]**o+(0.0355805603417)*x[1]+(-0.274347447112)*x[2]**o+(-0.280165537012)*x[2]
-        arg[0,4]=(-0.323650660168)*x[0]**o+(-0.279592941595)*x[0]+(-0.478811425713)*x[1]**o+(0.19753271141)*x[1]+(0.476202875551)*x[2]**o+(0.657358100659)*x[2]
-        arg[1,0]=(0.890659868437)*x[0]**o+(0.100235405989)*x[0]+(0.325177871418)*x[1]**o+(0.675379114656)*x[1]+(0.458473828724)*x[2]**o+(-0.449822467434)*x[2]
-        arg[1,1]=(-0.467895039242)*x[0]**o+(-0.551300000422)*x[0]+(0.976111922801)*x[1]**o+(0.809389941274)*x[1]+(-0.693066235685)*x[2]**o+(0.595719115505)*x[2]
-        arg[1,2]=(-0.727304617172)*x[0]**o+(-0.270682330445)*x[0]+(-0.32926621635)*x[1]**o+(0.0389068111165)*x[1]+(0.300096425532)*x[2]**o+(-0.964910767632)*x[2]
-        arg[1,3]=(0.195012106644)*x[0]**o+(0.18137839607)*x[0]+(-0.823129279257)*x[1]**o+(-0.0440106889304)*x[1]+(-0.298898659898)*x[2]**o+(0.801623925974)*x[2]
-        arg[1,4]=(0.590200326369)*x[0]**o+(-0.800085209049)*x[0]+(-0.323836133834)*x[1]**o+(-0.953413527643)*x[1]+(0.0257128844735)*x[2]**o+(0.652469516082)*x[2]
-        arg[2,0]=(-0.467537281458)*x[0]**o+(-0.05673369912)*x[0]+(-0.813542619659)*x[1]**o+(-0.778596374878)*x[1]+(0.752073310476)*x[2]**o+(0.187824163254)*x[2]
-        arg[2,1]=(-0.75708112983)*x[0]**o+(0.866111788737)*x[0]+(0.715424327432)*x[1]**o+(-0.297967739435)*x[1]+(0.420241611178)*x[2]**o+(-0.616867390634)*x[2]
-        arg[2,2]=(0.00628628803839)*x[0]**o+(0.700962301988)*x[0]+(0.712979263919)*x[1]**o+(-0.414401132518)*x[1]+(-0.975498928756)*x[2]**o+(0.858116391039)*x[2]
-        arg[2,3]=(0.948164399923)*x[0]**o+(-0.88227825142)*x[0]+(0.30703295864)*x[1]**o+(0.510607674984)*x[1]+(0.362361719392)*x[2]**o+(-0.208696380629)*x[2]
-        arg[2,4]=(0.661545494115)*x[0]**o+(-0.122960355184)*x[0]+(-0.801367604574)*x[1]**o+(0.395708459987)*x[1]+(0.0197225340457)*x[2]**o+(-0.377005073637)*x[2]
-        arg[3,0]=(0.733597350529)*x[0]**o+(0.339318978843)*x[0]+(0.317608635437)*x[1]**o+(0.147746051469)*x[1]+(-0.33413935488)*x[2]**o+(-0.793337674933)*x[2]
-        arg[3,1]=(0.0918904281646)*x[0]**o+(-0.530786152204)*x[0]+(-0.587542750401)*x[1]**o+(-0.810331029621)*x[1]+(-0.40221065987)*x[2]**o+(-0.250472092093)*x[2]
-        arg[3,2]=(0.966442952042)*x[0]**o+(-0.756649866552)*x[0]+(-0.36466223222)*x[1]**o+(-0.48639005055)*x[1]+(-0.831374462742)*x[2]**o+(0.503451143644)*x[2]
-        arg[3,3]=(-0.322275644664)*x[0]**o+(-0.254067149982)*x[0]+(-0.440264794128)*x[1]**o+(0.226546045529)*x[1]+(-0.761870916789)*x[2]**o+(0.70024066379)*x[2]
-        arg[3,4]=(0.595459342613)*x[0]**o+(-0.439436200258)*x[0]+(0.0932538180176)*x[1]**o+(-0.975450806707)*x[1]+(0.0461423323623)*x[2]**o+(0.0294352472154)*x[2]
-        ref[0,0]=(-0.52872154973)/(o+1.)+(-0.177158421464)+(-0.937858877179)*0.5**o
-        ref[0,1]=(-1.14234522986)/(o+1.)+(-0.414732890554)+(0.497785867084)*0.5**o
-        ref[0,2]=(-1.71465154551)/(o+1.)+(0.0845977525197)+(0.744501879094)*0.5**o
-        ref[0,3]=(0.374175031062)/(o+1.)+(-0.619505515252)+(0.210031467359)*0.5**o
-        ref[0,4]=(-0.00260855016132)/(o+1.)+(0.287648935237)+(-0.323650660168)*0.5**o
-        ref[1,0]=(0.783651700142)/(o+1.)+(0.162896026605)+(0.890659868437)*0.5**o
-        ref[1,1]=(0.283045687117)/(o+1.)+(0.426904528178)+(-0.467895039242)*0.5**o
-        ref[1,2]=(-0.0291697908188)/(o+1.)+(-0.59834314348)+(-0.727304617172)*0.5**o
-        ref[1,3]=(-1.12202793916)/(o+1.)+(0.469495816557)+(0.195012106644)*0.5**o
-        ref[1,4]=(-0.29812324936)/(o+1.)+(-0.550514610305)+(0.590200326369)*0.5**o
-        ref[2,0]=(-0.0614693091826)/(o+1.)+(-0.323752955372)+(-0.467537281458)*0.5**o
-        ref[2,1]=(1.13566593861)/(o+1.)+(-0.024361670666)+(-0.75708112983)*0.5**o
-        ref[2,2]=(-0.262519664837)/(o+1.)+(0.572338780255)+(0.00628628803839)*0.5**o
-        ref[2,3]=(0.669394678032)/(o+1.)+(-0.290183478532)+(0.948164399923)*0.5**o
-        ref[2,4]=(-0.781645070528)/(o+1.)+(-0.0521284844165)+(0.661545494115)*0.5**o
-        ref[3,0]=(-0.0165307194439)/(o+1.)+(-0.15313632231)+(0.733597350529)*0.5**o
-        ref[3,1]=(-0.989753410271)/(o+1.)+(-0.795794636959)+(0.0918904281646)*0.5**o
-        ref[3,2]=(-1.19603669496)/(o+1.)+(-0.369794386729)+(0.966442952042)*0.5**o
-        ref[3,3]=(-1.20213571092)/(o+1.)+(0.336359779668)+(-0.322275644664)*0.5**o
-        ref[3,4]=(0.13939615038)/(o+1.)+(-0.692725879875)+(0.595459342613)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.12237588236)*x[0]**o+(-0.671341785528)*x[0]+(0.998910161099)*x[1]**o+(-0.552290246966)*x[1]
-        arg[0,0,1]=(-0.90821257221)*x[0]**o+(-0.413391927764)*x[0]+(-0.428904099491)*x[1]**o+(-0.226766222189)*x[1]
-        arg[0,1,0]=(-0.333819313127)*x[0]**o+(-0.458569899029)*x[0]+(-0.83776177332)*x[1]**o+(0.22951184631)*x[1]
-        arg[0,1,1]=(-0.0571879315489)*x[0]**o+(-0.38056227895)*x[0]+(0.0784628125977)*x[1]**o+(-0.659353613638)*x[1]
-        arg[1,0,0]=(0.645871468353)*x[0]**o+(-0.986005542006)*x[0]+(0.395704509276)*x[1]**o+(0.980666918726)*x[1]
-        arg[1,0,1]=(0.337293036597)*x[0]**o+(-0.520809490378)*x[0]+(0.543657498632)*x[1]**o+(0.632777244118)*x[1]
-        arg[1,1,0]=(-0.432349538121)*x[0]**o+(-0.579685247099)*x[0]+(0.331943072726)*x[1]**o+(0.25042188644)*x[1]
-        arg[1,1,1]=(0.329861800715)*x[0]**o+(-0.48725090895)*x[0]+(-0.149357998414)*x[1]**o+(-0.580650134153)*x[1]
-        arg[2,0,0]=(-0.75424658357)*x[0]**o+(-0.696352517414)*x[0]+(-0.00272313166917)*x[1]**o+(-0.488581343546)*x[1]
-        arg[2,0,1]=(-0.136489901339)*x[0]**o+(-0.752587775699)*x[0]+(0.986413392791)*x[1]**o+(0.759344728162)*x[1]
-        arg[2,1,0]=(-0.0832674877963)*x[0]**o+(0.765419402778)*x[0]+(0.958533611564)*x[1]**o+(-0.315461136294)*x[1]
-        arg[2,1,1]=(0.362764663642)*x[0]**o+(-0.351519282456)*x[0]+(-0.115554433923)*x[1]**o+(-0.789365036398)*x[1]
-        arg[3,0,0]=(0.0977752933224)*x[0]**o+(-0.838881001576)*x[0]+(0.275578737811)*x[1]**o+(-0.971208155806)*x[1]
-        arg[3,0,1]=(0.0588243034654)*x[0]**o+(-0.141302234145)*x[0]+(-0.460044396206)*x[1]**o+(-0.776793718354)*x[1]
-        arg[3,1,0]=(0.786922930047)*x[0]**o+(-0.187797924361)*x[0]+(0.971516347812)*x[1]**o+(-0.250547377602)*x[1]
-        arg[3,1,1]=(-0.69240453335)*x[0]**o+(0.439425578473)*x[0]+(0.00864940781276)*x[1]**o+(-0.458898387231)*x[1]
-        arg[4,0,0]=(0.0700104829681)*x[0]**o+(0.905031121846)*x[0]+(0.37676750477)*x[1]**o+(0.411190149331)*x[1]
-        arg[4,0,1]=(-0.615737714754)*x[0]**o+(0.1945204765)*x[0]+(0.0889014902938)*x[1]**o+(0.650020022597)*x[1]
-        arg[4,1,0]=(-0.883448519911)*x[0]**o+(0.00124188371434)*x[0]+(-0.501662684156)*x[1]**o+(0.290235036398)*x[1]
-        arg[4,1,1]=(-0.723885968554)*x[0]**o+(-0.0112308623755)*x[0]+(0.679499427805)*x[1]**o+(-0.00261690404287)*x[1]
-        arg[5,0,0]=(0.0834731365594)*x[0]**o+(-0.873857991293)*x[0]+(0.831158842487)*x[1]**o+(-0.585808323324)*x[1]
-        arg[5,0,1]=(0.250830078938)*x[0]**o+(0.310347394372)*x[0]+(-0.412138455827)*x[1]**o+(0.974823718029)*x[1]
-        arg[5,1,0]=(-0.865155065381)*x[0]**o+(0.72190541012)*x[0]+(0.72020941875)*x[1]**o+(-0.604997858133)*x[1]
-        arg[5,1,1]=(0.57252234131)*x[0]**o+(-0.366230226771)*x[0]+(0.115400105646)*x[1]**o+(0.0485229323141)*x[1]
-        ref[0,0,0]=(0.998910161099)/(o+1.)+(-0.611816016247)+(-0.12237588236)*0.5**o
-        ref[0,0,1]=(-0.428904099491)/(o+1.)+(-0.320079074977)+(-0.90821257221)*0.5**o
-        ref[0,1,0]=(-0.83776177332)/(o+1.)+(-0.11452902636)+(-0.333819313127)*0.5**o
-        ref[0,1,1]=(0.0784628125977)/(o+1.)+(-0.519957946294)+(-0.0571879315489)*0.5**o
-        ref[1,0,0]=(0.395704509276)/(o+1.)+(-0.00266931163989)+(0.645871468353)*0.5**o
-        ref[1,0,1]=(0.543657498632)/(o+1.)+(0.0559838768697)+(0.337293036597)*0.5**o
-        ref[1,1,0]=(0.331943072726)/(o+1.)+(-0.16463168033)+(-0.432349538121)*0.5**o
-        ref[1,1,1]=(-0.149357998414)/(o+1.)+(-0.533950521552)+(0.329861800715)*0.5**o
-        ref[2,0,0]=(-0.00272313166917)/(o+1.)+(-0.59246693048)+(-0.75424658357)*0.5**o
-        ref[2,0,1]=(0.986413392791)/(o+1.)+(0.00337847623164)+(-0.136489901339)*0.5**o
-        ref[2,1,0]=(0.958533611564)/(o+1.)+(0.224979133242)+(-0.0832674877963)*0.5**o
-        ref[2,1,1]=(-0.115554433923)/(o+1.)+(-0.570442159427)+(0.362764663642)*0.5**o
-        ref[3,0,0]=(0.275578737811)/(o+1.)+(-0.905044578691)+(0.0977752933224)*0.5**o
-        ref[3,0,1]=(-0.460044396206)/(o+1.)+(-0.45904797625)+(0.0588243034654)*0.5**o
-        ref[3,1,0]=(0.971516347812)/(o+1.)+(-0.219172650981)+(0.786922930047)*0.5**o
-        ref[3,1,1]=(0.00864940781276)/(o+1.)+(-0.00973640437899)+(-0.69240453335)*0.5**o
-        ref[4,0,0]=(0.37676750477)/(o+1.)+(0.658110635589)+(0.0700104829681)*0.5**o
-        ref[4,0,1]=(0.0889014902938)/(o+1.)+(0.422270249549)+(-0.615737714754)*0.5**o
-        ref[4,1,0]=(-0.501662684156)/(o+1.)+(0.145738460056)+(-0.883448519911)*0.5**o
-        ref[4,1,1]=(0.679499427805)/(o+1.)+(-0.00692388320921)+(-0.723885968554)*0.5**o
-        ref[5,0,0]=(0.831158842487)/(o+1.)+(-0.729833157309)+(0.0834731365594)*0.5**o
-        ref[5,0,1]=(-0.412138455827)/(o+1.)+(0.642585556201)+(0.250830078938)*0.5**o
-        ref[5,1,0]=(0.72020941875)/(o+1.)+(0.0584537759935)+(-0.865155065381)*0.5**o
-        ref[5,1,1]=(0.115400105646)/(o+1.)+(-0.158853647228)+(0.57252234131)*0.5**o
-      else:
-        arg[0,0,0]=(0.962792187023)*x[0]**o+(0.799861778652)*x[0]+(-0.811367630134)*x[1]**o+(-0.553496861095)*x[1]+(-0.810089307714)*x[2]**o+(0.135449765364)*x[2]
-        arg[0,0,1]=(0.644573004654)*x[0]**o+(-0.565823623798)*x[0]+(0.337026645127)*x[1]**o+(0.413612857799)*x[1]+(0.604366347987)*x[2]**o+(0.0867373815054)*x[2]
-        arg[0,1,0]=(0.829914553754)*x[0]**o+(-0.462419132852)*x[0]+(0.889464473044)*x[1]**o+(-0.425594549042)*x[1]+(0.679251542389)*x[2]**o+(-0.501090535615)*x[2]
-        arg[0,1,1]=(0.874166303558)*x[0]**o+(0.437595762221)*x[0]+(-0.836229998654)*x[1]**o+(-0.704020633222)*x[1]+(-0.279878325513)*x[2]**o+(0.697289463565)*x[2]
-        arg[1,0,0]=(-0.963425479949)*x[0]**o+(0.399090631945)*x[0]+(-0.80371987894)*x[1]**o+(0.614102223184)*x[1]+(-0.821741166107)*x[2]**o+(-0.245209306654)*x[2]
-        arg[1,0,1]=(-0.288791346674)*x[0]**o+(0.0125896799209)*x[0]+(0.0536290891541)*x[1]**o+(-0.127968165901)*x[1]+(-0.635591402779)*x[2]**o+(-0.723850350215)*x[2]
-        arg[1,1,0]=(-0.554196270608)*x[0]**o+(-0.409293351346)*x[0]+(-0.759821124187)*x[1]**o+(-0.828913354317)*x[1]+(0.66900958614)*x[2]**o+(0.412403847239)*x[2]
-        arg[1,1,1]=(-0.862735330269)*x[0]**o+(-0.406644646366)*x[0]+(-0.375399872184)*x[1]**o+(-0.10762837777)*x[1]+(0.540886844249)*x[2]**o+(0.97487281528)*x[2]
-        arg[2,0,0]=(0.388899900771)*x[0]**o+(-0.692092360652)*x[0]+(0.794415524913)*x[1]**o+(0.369239170999)*x[1]+(0.482269641926)*x[2]**o+(0.58717167121)*x[2]
-        arg[2,0,1]=(0.324795219208)*x[0]**o+(0.508631698719)*x[0]+(0.128456415737)*x[1]**o+(0.73678163559)*x[1]+(0.0527520660005)*x[2]**o+(-0.180289299372)*x[2]
-        arg[2,1,0]=(-0.901972287405)*x[0]**o+(-0.635701120264)*x[0]+(0.298343193246)*x[1]**o+(-0.870902858159)*x[1]+(-0.979619200422)*x[2]**o+(0.708567755329)*x[2]
-        arg[2,1,1]=(0.391663724321)*x[0]**o+(0.69891810611)*x[0]+(0.717069638885)*x[1]**o+(0.493487853359)*x[1]+(0.270536570073)*x[2]**o+(0.679115502666)*x[2]
-        arg[3,0,0]=(0.830590943609)*x[0]**o+(-0.000320739222143)*x[0]+(-0.659146599349)*x[1]**o+(-0.858428982679)*x[1]+(-0.158070494634)*x[2]**o+(-0.364394913197)*x[2]
-        arg[3,0,1]=(0.903615175916)*x[0]**o+(0.186562406505)*x[0]+(0.463860110418)*x[1]**o+(0.0382550628307)*x[1]+(0.835148180357)*x[2]**o+(-0.117637969912)*x[2]
-        arg[3,1,0]=(-0.901874408714)*x[0]**o+(0.00493918499294)*x[0]+(0.180179475909)*x[1]**o+(-0.549428619271)*x[1]+(-0.392536708051)*x[2]**o+(0.68054148024)*x[2]
-        arg[3,1,1]=(0.807693382033)*x[0]**o+(-0.47532617097)*x[0]+(-0.52499678021)*x[1]**o+(-0.0365395713918)*x[1]+(0.654881606829)*x[2]**o+(-0.63350736651)*x[2]
-        arg[4,0,0]=(0.440830144989)*x[0]**o+(-0.454694325046)*x[0]+(0.403509667018)*x[1]**o+(0.360080283937)*x[1]+(0.164208775222)*x[2]**o+(0.203945755083)*x[2]
-        arg[4,0,1]=(-0.836804887763)*x[0]**o+(-0.910979763109)*x[0]+(-0.629411293881)*x[1]**o+(0.0546020113997)*x[1]+(0.63435754491)*x[2]**o+(-0.323224122475)*x[2]
-        arg[4,1,0]=(0.204216251019)*x[0]**o+(-0.372349067194)*x[0]+(-0.320768886225)*x[1]**o+(-0.139715856072)*x[1]+(0.62329130659)*x[2]**o+(0.626784461235)*x[2]
-        arg[4,1,1]=(0.275074685897)*x[0]**o+(0.0664691742991)*x[0]+(0.949175504221)*x[1]**o+(-0.438858093561)*x[1]+(0.330489174462)*x[2]**o+(0.361586647545)*x[2]
-        arg[5,0,0]=(0.370194889673)*x[0]**o+(-0.0549428893157)*x[0]+(0.0219932528442)*x[1]**o+(-0.699553487775)*x[1]+(0.0161212665659)*x[2]**o+(-0.268426682266)*x[2]
-        arg[5,0,1]=(-0.527801267225)*x[0]**o+(0.151774276637)*x[0]+(-0.0623666836223)*x[1]**o+(-0.953572390482)*x[1]+(0.778912307756)*x[2]**o+(-0.851760269136)*x[2]
-        arg[5,1,0]=(0.11418535486)*x[0]**o+(-0.299719975234)*x[0]+(-0.508303365848)*x[1]**o+(-0.856367302992)*x[1]+(0.311609370032)*x[2]**o+(0.4731881155)*x[2]
-        arg[5,1,1]=(0.455947680647)*x[0]**o+(0.856811965126)*x[0]+(-0.176215162097)*x[1]**o+(0.581325693162)*x[1]+(-0.306514780798)*x[2]**o+(-0.005241787834)*x[2]
-        ref[0,0,0]=(-1.62145693785)/(o+1.)+(0.19090734146)+(0.962792187023)*0.5**o
-        ref[0,0,1]=(0.941392993115)/(o+1.)+(-0.0327366922471)+(0.644573004654)*0.5**o
-        ref[0,1,0]=(1.56871601543)/(o+1.)+(-0.694552108754)+(0.829914553754)*0.5**o
-        ref[0,1,1]=(-1.11610832417)/(o+1.)+(0.215432296282)+(0.874166303558)*0.5**o
-        ref[1,0,0]=(-1.62546104505)/(o+1.)+(0.383991774237)+(-0.963425479949)*0.5**o
-        ref[1,0,1]=(-0.581962313625)/(o+1.)+(-0.419614418097)+(-0.288791346674)*0.5**o
-        ref[1,1,0]=(-0.0908115380472)/(o+1.)+(-0.412901429212)+(-0.554196270608)*0.5**o
-        ref[1,1,1]=(0.165486972066)/(o+1.)+(0.230299895572)+(-0.862735330269)*0.5**o
-        ref[2,0,0]=(1.27668516684)/(o+1.)+(0.132159240779)+(0.388899900771)*0.5**o
-        ref[2,0,1]=(0.181208481738)/(o+1.)+(0.532562017469)+(0.324795219208)*0.5**o
-        ref[2,1,0]=(-0.681276007176)/(o+1.)+(-0.399018111547)+(-0.901972287405)*0.5**o
-        ref[2,1,1]=(0.987606208958)/(o+1.)+(0.935760731067)+(0.391663724321)*0.5**o
-        ref[3,0,0]=(-0.817217093983)/(o+1.)+(-0.611572317549)+(0.830590943609)*0.5**o
-        ref[3,0,1]=(1.29900829077)/(o+1.)+(0.0535897497116)+(0.903615175916)*0.5**o
-        ref[3,1,0]=(-0.212357232141)/(o+1.)+(0.0680260229807)+(-0.901874408714)*0.5**o
-        ref[3,1,1]=(0.12988482662)/(o+1.)+(-0.572686554436)+(0.807693382033)*0.5**o
-        ref[4,0,0]=(0.567718442239)/(o+1.)+(0.0546658569873)+(0.440830144989)*0.5**o
-        ref[4,0,1]=(0.00494625102884)/(o+1.)+(-0.589800937092)+(-0.836804887763)*0.5**o
-        ref[4,1,0]=(0.302522420366)/(o+1.)+(0.0573597689848)+(0.204216251019)*0.5**o
-        ref[4,1,1]=(1.27966467868)/(o+1.)+(-0.0054011358584)+(0.275074685897)*0.5**o
-        ref[5,0,0]=(0.0381145194101)/(o+1.)+(-0.511461529678)+(0.370194889673)*0.5**o
-        ref[5,0,1]=(0.716545624134)/(o+1.)+(-0.826779191491)+(-0.527801267225)*0.5**o
-        ref[5,1,0]=(-0.196693995816)/(o+1.)+(-0.341449581363)+(0.11418535486)*0.5**o
-        ref[5,1,1]=(-0.482729942895)/(o+1.)+(0.716447935227)+(0.455947680647)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.415003066171)*x[0]**o+(-0.47441250281)*x[0]+(0.765391656872)*x[1]**o+(-0.170257448926)*x[1]
-        arg[0,0,0,1]=(-0.928539602254)*x[0]**o+(0.792240012243)*x[0]+(-0.152730990885)*x[1]**o+(-0.667500454847)*x[1]
-        arg[0,0,1,0]=(-0.937831078575)*x[0]**o+(0.963649346531)*x[0]+(0.505558859525)*x[1]**o+(-0.921354612243)*x[1]
-        arg[0,0,1,1]=(0.909415074451)*x[0]**o+(0.199360871726)*x[0]+(0.194087349442)*x[1]**o+(0.875065381425)*x[1]
-        arg[0,0,2,0]=(0.935190448625)*x[0]**o+(-0.109984767478)*x[0]+(0.518460161897)*x[1]**o+(-0.597684157349)*x[1]
-        arg[0,0,2,1]=(-0.94062714999)*x[0]**o+(-0.308960574286)*x[0]+(0.578391007321)*x[1]**o+(0.864501040998)*x[1]
-        arg[0,1,0,0]=(-0.197219678026)*x[0]**o+(-0.982899373778)*x[0]+(-0.603956105825)*x[1]**o+(-0.242717148913)*x[1]
-        arg[0,1,0,1]=(-0.590715606611)*x[0]**o+(0.461185487788)*x[0]+(-0.270612249495)*x[1]**o+(-0.644742980654)*x[1]
-        arg[0,1,1,0]=(-0.365516638755)*x[0]**o+(-0.255307471195)*x[0]+(0.0875989587033)*x[1]**o+(0.923189427818)*x[1]
-        arg[0,1,1,1]=(0.315218558548)*x[0]**o+(-0.373070897551)*x[0]+(0.625272530385)*x[1]**o+(-0.174054543645)*x[1]
-        arg[0,1,2,0]=(-0.502497884169)*x[0]**o+(-0.933785405889)*x[0]+(0.115500534905)*x[1]**o+(-0.864454092408)*x[1]
-        arg[0,1,2,1]=(0.615837581258)*x[0]**o+(0.832538142367)*x[0]+(-0.0715650027129)*x[1]**o+(-0.775173801322)*x[1]
-        arg[0,2,0,0]=(-0.898904577889)*x[0]**o+(-0.430072579352)*x[0]+(-0.532213103734)*x[1]**o+(0.970885652167)*x[1]
-        arg[0,2,0,1]=(-0.0056483770747)*x[0]**o+(-0.566550554106)*x[0]+(0.751663691868)*x[1]**o+(0.677878661708)*x[1]
-        arg[0,2,1,0]=(0.271196923039)*x[0]**o+(-0.291608730386)*x[0]+(-0.932579716748)*x[1]**o+(-0.437823650176)*x[1]
-        arg[0,2,1,1]=(-0.788206773125)*x[0]**o+(0.18675055747)*x[0]+(0.747625244884)*x[1]**o+(0.654933611758)*x[1]
-        arg[0,2,2,0]=(-0.787603701957)*x[0]**o+(-0.789784850865)*x[0]+(0.197684766271)*x[1]**o+(-0.988404958072)*x[1]
-        arg[0,2,2,1]=(0.417538087399)*x[0]**o+(0.745832250585)*x[0]+(-0.525306115268)*x[1]**o+(0.134086803871)*x[1]
-        arg[0,3,0,0]=(-0.230658480436)*x[0]**o+(-0.072983085881)*x[0]+(-0.149386157207)*x[1]**o+(-0.506870604002)*x[1]
-        arg[0,3,0,1]=(-0.815859549425)*x[0]**o+(-0.962632495033)*x[0]+(-0.542257139282)*x[1]**o+(0.93598141472)*x[1]
-        arg[0,3,1,0]=(0.0508974791413)*x[0]**o+(-0.722669867743)*x[0]+(0.714019527678)*x[1]**o+(0.710015283752)*x[1]
-        arg[0,3,1,1]=(0.119419200166)*x[0]**o+(0.365663074152)*x[0]+(0.352455072404)*x[1]**o+(-0.0788953701144)*x[1]
-        arg[0,3,2,0]=(-0.82075904747)*x[0]**o+(-0.224534176808)*x[0]+(-0.585094684368)*x[1]**o+(0.242958171035)*x[1]
-        arg[0,3,2,1]=(-0.748061395205)*x[0]**o+(0.676995891547)*x[0]+(0.686644239408)*x[1]**o+(0.260350484065)*x[1]
-        arg[0,4,0,0]=(0.128293903485)*x[0]**o+(0.226748407809)*x[0]+(0.129373873322)*x[1]**o+(0.988775321025)*x[1]
-        arg[0,4,0,1]=(0.639638672694)*x[0]**o+(-0.817791454136)*x[0]+(-0.170677596319)*x[1]**o+(0.404161643274)*x[1]
-        arg[0,4,1,0]=(0.43743097727)*x[0]**o+(-0.408230274495)*x[0]+(0.282544628333)*x[1]**o+(-0.542352697967)*x[1]
-        arg[0,4,1,1]=(-0.995599965283)*x[0]**o+(-0.0512373236039)*x[0]+(0.218383977926)*x[1]**o+(0.929355335423)*x[1]
-        arg[0,4,2,0]=(0.922609534479)*x[0]**o+(-0.166291574079)*x[0]+(-0.449331655188)*x[1]**o+(-0.0279347569009)*x[1]
-        arg[0,4,2,1]=(0.950186933361)*x[0]**o+(-0.426615341822)*x[0]+(-0.167639663907)*x[1]**o+(0.219020502174)*x[1]
-        arg[1,0,0,0]=(0.0573632292788)*x[0]**o+(0.543681035865)*x[0]+(-0.622510875807)*x[1]**o+(-0.171567467655)*x[1]
-        arg[1,0,0,1]=(0.368975600444)*x[0]**o+(-0.754217532725)*x[0]+(0.469744047929)*x[1]**o+(-0.922445394777)*x[1]
-        arg[1,0,1,0]=(-0.810194964715)*x[0]**o+(0.0861796117934)*x[0]+(0.625367069433)*x[1]**o+(-0.950906871025)*x[1]
-        arg[1,0,1,1]=(0.744923275143)*x[0]**o+(0.465744045178)*x[0]+(0.359324627118)*x[1]**o+(0.273934205663)*x[1]
-        arg[1,0,2,0]=(0.891959004941)*x[0]**o+(-0.498241249484)*x[0]+(0.318198109895)*x[1]**o+(0.0674564169104)*x[1]
-        arg[1,0,2,1]=(0.842125439023)*x[0]**o+(0.731884782944)*x[0]+(-0.674805144805)*x[1]**o+(0.431782566319)*x[1]
-        arg[1,1,0,0]=(-0.786719774805)*x[0]**o+(-0.55929144961)*x[0]+(-0.740263211102)*x[1]**o+(0.777914467998)*x[1]
-        arg[1,1,0,1]=(0.831245977993)*x[0]**o+(-0.758991188073)*x[0]+(0.714032957488)*x[1]**o+(-0.879935556766)*x[1]
-        arg[1,1,1,0]=(0.862796574462)*x[0]**o+(0.746875042565)*x[0]+(0.455949140326)*x[1]**o+(0.585491946591)*x[1]
-        arg[1,1,1,1]=(-0.500409398892)*x[0]**o+(0.292753163538)*x[0]+(-0.62474682088)*x[1]**o+(0.583368504524)*x[1]
-        arg[1,1,2,0]=(-0.402886961189)*x[0]**o+(-0.288733078165)*x[0]+(-0.770315341866)*x[1]**o+(-0.462764773299)*x[1]
-        arg[1,1,2,1]=(0.358161520677)*x[0]**o+(-0.524052652951)*x[0]+(0.654162491323)*x[1]**o+(0.902382016998)*x[1]
-        arg[1,2,0,0]=(-0.15539934232)*x[0]**o+(0.693162750731)*x[0]+(-0.0538737948754)*x[1]**o+(-0.025534990068)*x[1]
-        arg[1,2,0,1]=(0.371159212282)*x[0]**o+(-0.751292369171)*x[0]+(-0.377617770006)*x[1]**o+(0.707647483842)*x[1]
-        arg[1,2,1,0]=(0.117790556271)*x[0]**o+(0.848017682445)*x[0]+(-0.360936107893)*x[1]**o+(-0.564060873236)*x[1]
-        arg[1,2,1,1]=(-0.524828128971)*x[0]**o+(0.737876348154)*x[0]+(0.183316445987)*x[1]**o+(-0.821207746237)*x[1]
-        arg[1,2,2,0]=(0.300516177535)*x[0]**o+(-0.204187510383)*x[0]+(0.126601242737)*x[1]**o+(0.0794834423875)*x[1]
-        arg[1,2,2,1]=(-0.29046926624)*x[0]**o+(-0.310057692431)*x[0]+(-0.810227948574)*x[1]**o+(-0.464128160277)*x[1]
-        arg[1,3,0,0]=(-0.134275834453)*x[0]**o+(0.448577162559)*x[0]+(0.757723452446)*x[1]**o+(0.139202834725)*x[1]
-        arg[1,3,0,1]=(0.882915728842)*x[0]**o+(-0.0750591947315)*x[0]+(0.503482692135)*x[1]**o+(-0.176350465386)*x[1]
-        arg[1,3,1,0]=(-0.954792910945)*x[0]**o+(0.772215353622)*x[0]+(-0.861747803918)*x[1]**o+(-0.932727438775)*x[1]
-        arg[1,3,1,1]=(0.747255393187)*x[0]**o+(0.0392661297355)*x[0]+(-0.322274864209)*x[1]**o+(-0.491462177972)*x[1]
-        arg[1,3,2,0]=(0.139287057836)*x[0]**o+(0.312258185231)*x[0]+(-0.488288412308)*x[1]**o+(-0.185131700928)*x[1]
-        arg[1,3,2,1]=(-0.861625516304)*x[0]**o+(0.681454010645)*x[0]+(0.206644380777)*x[1]**o+(-0.0344138929268)*x[1]
-        arg[1,4,0,0]=(-0.714198122614)*x[0]**o+(-0.413113909739)*x[0]+(-0.971680855409)*x[1]**o+(0.602598611545)*x[1]
-        arg[1,4,0,1]=(0.293578109913)*x[0]**o+(-0.495635685351)*x[0]+(0.347408878778)*x[1]**o+(-0.923814185786)*x[1]
-        arg[1,4,1,0]=(0.843760126513)*x[0]**o+(-0.671075074679)*x[0]+(-0.284086603407)*x[1]**o+(0.437492233496)*x[1]
-        arg[1,4,1,1]=(-0.342911357374)*x[0]**o+(-0.440232224635)*x[0]+(0.537701123084)*x[1]**o+(-0.525203729082)*x[1]
-        arg[1,4,2,0]=(-0.71201360314)*x[0]**o+(-0.706332525171)*x[0]+(0.831438049852)*x[1]**o+(0.819141670055)*x[1]
-        arg[1,4,2,1]=(-0.616403541928)*x[0]**o+(0.635973739636)*x[0]+(-0.0369972206543)*x[1]**o+(-0.08595692743)*x[1]
-        arg[2,0,0,0]=(-0.959754423491)*x[0]**o+(-0.332473557912)*x[0]+(-0.464334304695)*x[1]**o+(0.597214020843)*x[1]
-        arg[2,0,0,1]=(0.231051530608)*x[0]**o+(0.368524293555)*x[0]+(0.173044245392)*x[1]**o+(0.505867390994)*x[1]
-        arg[2,0,1,0]=(0.376577055194)*x[0]**o+(-0.739990982509)*x[0]+(-0.816201949845)*x[1]**o+(-0.71233193641)*x[1]
-        arg[2,0,1,1]=(-0.4891837531)*x[0]**o+(-0.121562226208)*x[0]+(-0.876294548464)*x[1]**o+(0.377763924093)*x[1]
-        arg[2,0,2,0]=(-0.759548081841)*x[0]**o+(-0.118749434442)*x[0]+(0.602375475355)*x[1]**o+(-0.877213577079)*x[1]
-        arg[2,0,2,1]=(0.114018259802)*x[0]**o+(-0.627149204501)*x[0]+(0.813648191424)*x[1]**o+(-0.612548616323)*x[1]
-        arg[2,1,0,0]=(-0.572699800518)*x[0]**o+(0.507715829662)*x[0]+(-0.12122456959)*x[1]**o+(0.75522878228)*x[1]
-        arg[2,1,0,1]=(0.0655268452799)*x[0]**o+(0.211191572823)*x[0]+(0.539760655497)*x[1]**o+(0.657397992057)*x[1]
-        arg[2,1,1,0]=(0.358281119336)*x[0]**o+(0.119364032507)*x[0]+(-0.0242249415295)*x[1]**o+(-0.645986730609)*x[1]
-        arg[2,1,1,1]=(0.523751704889)*x[0]**o+(-0.237670103222)*x[0]+(-0.995787126907)*x[1]**o+(-0.504129088442)*x[1]
-        arg[2,1,2,0]=(-0.185380508646)*x[0]**o+(-0.218341933583)*x[0]+(0.149400154478)*x[1]**o+(0.00252616040715)*x[1]
-        arg[2,1,2,1]=(0.81086932122)*x[0]**o+(0.387271527481)*x[0]+(0.908525646396)*x[1]**o+(-0.75383394204)*x[1]
-        arg[2,2,0,0]=(-0.463416100256)*x[0]**o+(-0.891654021409)*x[0]+(-0.0495088159461)*x[1]**o+(0.398915277911)*x[1]
-        arg[2,2,0,1]=(-0.200698149193)*x[0]**o+(0.127899540753)*x[0]+(-0.895280577411)*x[1]**o+(-0.197025422242)*x[1]
-        arg[2,2,1,0]=(0.888683772867)*x[0]**o+(-0.84436563509)*x[0]+(-0.375709672588)*x[1]**o+(0.591336312818)*x[1]
-        arg[2,2,1,1]=(-0.0167949020901)*x[0]**o+(0.145017501865)*x[0]+(0.868194479789)*x[1]**o+(-0.62439676328)*x[1]
-        arg[2,2,2,0]=(0.441981698578)*x[0]**o+(-0.481156166596)*x[0]+(0.267937553127)*x[1]**o+(-0.37032246733)*x[1]
-        arg[2,2,2,1]=(0.876701424579)*x[0]**o+(0.473798212378)*x[0]+(0.697645775876)*x[1]**o+(-0.798143376838)*x[1]
-        arg[2,3,0,0]=(0.111231509217)*x[0]**o+(0.188121806171)*x[0]+(-0.0706155476337)*x[1]**o+(0.779423336221)*x[1]
-        arg[2,3,0,1]=(-0.858913402812)*x[0]**o+(0.655459361097)*x[0]+(0.326282512878)*x[1]**o+(0.863386952614)*x[1]
-        arg[2,3,1,0]=(-0.524551221953)*x[0]**o+(-0.807242415277)*x[0]+(0.575866251831)*x[1]**o+(-0.74503615846)*x[1]
-        arg[2,3,1,1]=(0.391514075129)*x[0]**o+(0.477257809825)*x[0]+(-0.488263373008)*x[1]**o+(-0.29101442481)*x[1]
-        arg[2,3,2,0]=(0.26532129161)*x[0]**o+(0.22794872765)*x[0]+(0.85094548724)*x[1]**o+(-0.369690624817)*x[1]
-        arg[2,3,2,1]=(0.2339994493)*x[0]**o+(-0.901432708956)*x[0]+(0.309349741876)*x[1]**o+(0.132010344317)*x[1]
-        arg[2,4,0,0]=(-0.713553783036)*x[0]**o+(0.791484993301)*x[0]+(0.339247480459)*x[1]**o+(0.158842307171)*x[1]
-        arg[2,4,0,1]=(-0.733490022564)*x[0]**o+(0.631284830844)*x[0]+(0.340009298488)*x[1]**o+(-0.483162310574)*x[1]
-        arg[2,4,1,0]=(0.709413437683)*x[0]**o+(0.896590124659)*x[0]+(0.680862759763)*x[1]**o+(-0.23579845663)*x[1]
-        arg[2,4,1,1]=(-0.130761551034)*x[0]**o+(0.269095282394)*x[0]+(0.687201138134)*x[1]**o+(0.905183436376)*x[1]
-        arg[2,4,2,0]=(0.256894911335)*x[0]**o+(0.706744915172)*x[0]+(0.910504833397)*x[1]**o+(-0.285088297895)*x[1]
-        arg[2,4,2,1]=(0.95137247728)*x[0]**o+(-0.924669436646)*x[0]+(-0.146356272875)*x[1]**o+(-0.673326194162)*x[1]
-        arg[3,0,0,0]=(0.663180444534)*x[0]**o+(0.894728781279)*x[0]+(0.894383747285)*x[1]**o+(0.969779862148)*x[1]
-        arg[3,0,0,1]=(0.424556283891)*x[0]**o+(-0.97849198275)*x[0]+(0.367908872519)*x[1]**o+(0.624098355956)*x[1]
-        arg[3,0,1,0]=(0.908698580251)*x[0]**o+(-0.899102004477)*x[0]+(0.509310001763)*x[1]**o+(-0.8399697646)*x[1]
-        arg[3,0,1,1]=(0.523444225814)*x[0]**o+(0.410650511976)*x[0]+(-0.986699126405)*x[1]**o+(0.081494682537)*x[1]
-        arg[3,0,2,0]=(-0.163604985314)*x[0]**o+(0.959338619715)*x[0]+(-0.843900271478)*x[1]**o+(-0.0218386544947)*x[1]
-        arg[3,0,2,1]=(-0.490804271432)*x[0]**o+(0.123332672938)*x[0]+(0.902072835174)*x[1]**o+(-0.202340709957)*x[1]
-        arg[3,1,0,0]=(-0.949731382685)*x[0]**o+(0.533695608969)*x[0]+(0.430512336347)*x[1]**o+(0.977434372776)*x[1]
-        arg[3,1,0,1]=(0.945102298088)*x[0]**o+(-0.117807763531)*x[0]+(-0.203921504027)*x[1]**o+(-0.261266079346)*x[1]
-        arg[3,1,1,0]=(0.762442770795)*x[0]**o+(-0.318456087863)*x[0]+(-0.365021977395)*x[1]**o+(0.0516932816311)*x[1]
-        arg[3,1,1,1]=(-0.829061607399)*x[0]**o+(0.854900781365)*x[0]+(-0.397139314214)*x[1]**o+(-0.549679351555)*x[1]
-        arg[3,1,2,0]=(-0.780040060687)*x[0]**o+(0.719393460042)*x[0]+(-0.435377419129)*x[1]**o+(0.655962063649)*x[1]
-        arg[3,1,2,1]=(-0.853144390228)*x[0]**o+(0.0940222442927)*x[0]+(-0.642258121264)*x[1]**o+(-0.615386923437)*x[1]
-        arg[3,2,0,0]=(0.377161814597)*x[0]**o+(0.349238572634)*x[0]+(0.361300611554)*x[1]**o+(0.554382639639)*x[1]
-        arg[3,2,0,1]=(-0.51174671413)*x[0]**o+(-0.0586248632463)*x[0]+(0.083224329707)*x[1]**o+(0.506614699443)*x[1]
-        arg[3,2,1,0]=(0.612695079311)*x[0]**o+(0.82053876378)*x[0]+(-0.132608876197)*x[1]**o+(0.701720563108)*x[1]
-        arg[3,2,1,1]=(0.0928734170244)*x[0]**o+(-0.127564289866)*x[0]+(0.68468196965)*x[1]**o+(0.0168958305852)*x[1]
-        arg[3,2,2,0]=(-0.863542893122)*x[0]**o+(0.0533007397457)*x[0]+(-0.0602194449612)*x[1]**o+(0.391122261927)*x[1]
-        arg[3,2,2,1]=(-0.0942537498633)*x[0]**o+(-0.421741120475)*x[0]+(-0.0746938765947)*x[1]**o+(0.988111802567)*x[1]
-        arg[3,3,0,0]=(-0.0588913579205)*x[0]**o+(0.439330145374)*x[0]+(-0.541714868844)*x[1]**o+(0.845344272279)*x[1]
-        arg[3,3,0,1]=(0.221784155922)*x[0]**o+(0.983539923382)*x[0]+(-0.32332836636)*x[1]**o+(-0.892579743718)*x[1]
-        arg[3,3,1,0]=(0.804097639203)*x[0]**o+(-0.342072604164)*x[0]+(0.755681096012)*x[1]**o+(0.432897246925)*x[1]
-        arg[3,3,1,1]=(0.825696602707)*x[0]**o+(0.536999112965)*x[0]+(0.745033643035)*x[1]**o+(0.156806358776)*x[1]
-        arg[3,3,2,0]=(-0.372114391352)*x[0]**o+(0.670417556114)*x[0]+(-0.569395510546)*x[1]**o+(-0.523784408534)*x[1]
-        arg[3,3,2,1]=(0.439723359721)*x[0]**o+(0.809733189174)*x[0]+(0.781753556415)*x[1]**o+(0.375991547044)*x[1]
-        arg[3,4,0,0]=(-0.429896412297)*x[0]**o+(-0.908820042346)*x[0]+(0.328787484151)*x[1]**o+(-0.610488251755)*x[1]
-        arg[3,4,0,1]=(0.803567111353)*x[0]**o+(-0.487219379817)*x[0]+(-0.541538468561)*x[1]**o+(-0.692964506777)*x[1]
-        arg[3,4,1,0]=(-0.963266835039)*x[0]**o+(0.667510333677)*x[0]+(0.308312799035)*x[1]**o+(0.686605377458)*x[1]
-        arg[3,4,1,1]=(0.651198604373)*x[0]**o+(0.306465142929)*x[0]+(-0.923691546947)*x[1]**o+(-0.376240035765)*x[1]
-        arg[3,4,2,0]=(-0.339406539705)*x[0]**o+(0.524709759622)*x[0]+(-0.0326564953763)*x[1]**o+(-0.658296780229)*x[1]
-        arg[3,4,2,1]=(0.471355209305)*x[0]**o+(-0.473756698531)*x[0]+(0.193890658409)*x[1]**o+(-0.266632530307)*x[1]
-        ref[0,0,0,0]=(0.765391656872)/(o+1.)+(-0.322334975868)+(0.415003066171)*0.5**o
-        ref[0,0,0,1]=(-0.152730990885)/(o+1.)+(0.0623697786981)+(-0.928539602254)*0.5**o
-        ref[0,0,1,0]=(0.505558859525)/(o+1.)+(0.0211473671443)+(-0.937831078575)*0.5**o
-        ref[0,0,1,1]=(0.194087349442)/(o+1.)+(0.537213126576)+(0.909415074451)*0.5**o
-        ref[0,0,2,0]=(0.518460161897)/(o+1.)+(-0.353834462413)+(0.935190448625)*0.5**o
-        ref[0,0,2,1]=(0.578391007321)/(o+1.)+(0.277770233356)+(-0.94062714999)*0.5**o
-        ref[0,1,0,0]=(-0.603956105825)/(o+1.)+(-0.612808261345)+(-0.197219678026)*0.5**o
-        ref[0,1,0,1]=(-0.270612249495)/(o+1.)+(-0.0917787464331)+(-0.590715606611)*0.5**o
-        ref[0,1,1,0]=(0.0875989587033)/(o+1.)+(0.333940978312)+(-0.365516638755)*0.5**o
-        ref[0,1,1,1]=(0.625272530385)/(o+1.)+(-0.273562720598)+(0.315218558548)*0.5**o
-        ref[0,1,2,0]=(0.115500534905)/(o+1.)+(-0.899119749149)+(-0.502497884169)*0.5**o
-        ref[0,1,2,1]=(-0.0715650027129)/(o+1.)+(0.0286821705227)+(0.615837581258)*0.5**o
-        ref[0,2,0,0]=(-0.532213103734)/(o+1.)+(0.270406536408)+(-0.898904577889)*0.5**o
-        ref[0,2,0,1]=(0.751663691868)/(o+1.)+(0.0556640538013)+(-0.0056483770747)*0.5**o
-        ref[0,2,1,0]=(-0.932579716748)/(o+1.)+(-0.364716190281)+(0.271196923039)*0.5**o
-        ref[0,2,1,1]=(0.747625244884)/(o+1.)+(0.420842084614)+(-0.788206773125)*0.5**o
-        ref[0,2,2,0]=(0.197684766271)/(o+1.)+(-0.889094904468)+(-0.787603701957)*0.5**o
-        ref[0,2,2,1]=(-0.525306115268)/(o+1.)+(0.439959527228)+(0.417538087399)*0.5**o
-        ref[0,3,0,0]=(-0.149386157207)/(o+1.)+(-0.289926844941)+(-0.230658480436)*0.5**o
-        ref[0,3,0,1]=(-0.542257139282)/(o+1.)+(-0.0133255401565)+(-0.815859549425)*0.5**o
-        ref[0,3,1,0]=(0.714019527678)/(o+1.)+(-0.00632729199566)+(0.0508974791413)*0.5**o
-        ref[0,3,1,1]=(0.352455072404)/(o+1.)+(0.143383852019)+(0.119419200166)*0.5**o
-        ref[0,3,2,0]=(-0.585094684368)/(o+1.)+(0.00921199711359)+(-0.82075904747)*0.5**o
-        ref[0,3,2,1]=(0.686644239408)/(o+1.)+(0.468673187806)+(-0.748061395205)*0.5**o
-        ref[0,4,0,0]=(0.129373873322)/(o+1.)+(0.607761864417)+(0.128293903485)*0.5**o
-        ref[0,4,0,1]=(-0.170677596319)/(o+1.)+(-0.206814905431)+(0.639638672694)*0.5**o
-        ref[0,4,1,0]=(0.282544628333)/(o+1.)+(-0.475291486231)+(0.43743097727)*0.5**o
-        ref[0,4,1,1]=(0.218383977926)/(o+1.)+(0.43905900591)+(-0.995599965283)*0.5**o
-        ref[0,4,2,0]=(-0.449331655188)/(o+1.)+(-0.0971131654902)+(0.922609534479)*0.5**o
-        ref[0,4,2,1]=(-0.167639663907)/(o+1.)+(-0.103797419824)+(0.950186933361)*0.5**o
-        ref[1,0,0,0]=(-0.622510875807)/(o+1.)+(0.186056784105)+(0.0573632292788)*0.5**o
-        ref[1,0,0,1]=(0.469744047929)/(o+1.)+(-0.838331463751)+(0.368975600444)*0.5**o
-        ref[1,0,1,0]=(0.625367069433)/(o+1.)+(-0.432363629616)+(-0.810194964715)*0.5**o
-        ref[1,0,1,1]=(0.359324627118)/(o+1.)+(0.36983912542)+(0.744923275143)*0.5**o
-        ref[1,0,2,0]=(0.318198109895)/(o+1.)+(-0.215392416287)+(0.891959004941)*0.5**o
-        ref[1,0,2,1]=(-0.674805144805)/(o+1.)+(0.581833674632)+(0.842125439023)*0.5**o
-        ref[1,1,0,0]=(-0.740263211102)/(o+1.)+(0.109311509194)+(-0.786719774805)*0.5**o
-        ref[1,1,0,1]=(0.714032957488)/(o+1.)+(-0.81946337242)+(0.831245977993)*0.5**o
-        ref[1,1,1,0]=(0.455949140326)/(o+1.)+(0.666183494578)+(0.862796574462)*0.5**o
-        ref[1,1,1,1]=(-0.62474682088)/(o+1.)+(0.438060834031)+(-0.500409398892)*0.5**o
-        ref[1,1,2,0]=(-0.770315341866)/(o+1.)+(-0.375748925732)+(-0.402886961189)*0.5**o
-        ref[1,1,2,1]=(0.654162491323)/(o+1.)+(0.189164682023)+(0.358161520677)*0.5**o
-        ref[1,2,0,0]=(-0.0538737948754)/(o+1.)+(0.333813880332)+(-0.15539934232)*0.5**o
-        ref[1,2,0,1]=(-0.377617770006)/(o+1.)+(-0.0218224426646)+(0.371159212282)*0.5**o
-        ref[1,2,1,0]=(-0.360936107893)/(o+1.)+(0.141978404604)+(0.117790556271)*0.5**o
-        ref[1,2,1,1]=(0.183316445987)/(o+1.)+(-0.0416656990415)+(-0.524828128971)*0.5**o
-        ref[1,2,2,0]=(0.126601242737)/(o+1.)+(-0.0623520339976)+(0.300516177535)*0.5**o
-        ref[1,2,2,1]=(-0.810227948574)/(o+1.)+(-0.387092926354)+(-0.29046926624)*0.5**o
-        ref[1,3,0,0]=(0.757723452446)/(o+1.)+(0.293889998642)+(-0.134275834453)*0.5**o
-        ref[1,3,0,1]=(0.503482692135)/(o+1.)+(-0.125704830059)+(0.882915728842)*0.5**o
-        ref[1,3,1,0]=(-0.861747803918)/(o+1.)+(-0.0802560425765)+(-0.954792910945)*0.5**o
-        ref[1,3,1,1]=(-0.322274864209)/(o+1.)+(-0.226098024118)+(0.747255393187)*0.5**o
-        ref[1,3,2,0]=(-0.488288412308)/(o+1.)+(0.0635632421511)+(0.139287057836)*0.5**o
-        ref[1,3,2,1]=(0.206644380777)/(o+1.)+(0.323520058859)+(-0.861625516304)*0.5**o
-        ref[1,4,0,0]=(-0.971680855409)/(o+1.)+(0.0947423509032)+(-0.714198122614)*0.5**o
-        ref[1,4,0,1]=(0.347408878778)/(o+1.)+(-0.709724935569)+(0.293578109913)*0.5**o
-        ref[1,4,1,0]=(-0.284086603407)/(o+1.)+(-0.116791420591)+(0.843760126513)*0.5**o
-        ref[1,4,1,1]=(0.537701123084)/(o+1.)+(-0.482717976859)+(-0.342911357374)*0.5**o
-        ref[1,4,2,0]=(0.831438049852)/(o+1.)+(0.056404572442)+(-0.71201360314)*0.5**o
-        ref[1,4,2,1]=(-0.0369972206543)/(o+1.)+(0.275008406103)+(-0.616403541928)*0.5**o
-        ref[2,0,0,0]=(-0.464334304695)/(o+1.)+(0.132370231466)+(-0.959754423491)*0.5**o
-        ref[2,0,0,1]=(0.173044245392)/(o+1.)+(0.437195842274)+(0.231051530608)*0.5**o
-        ref[2,0,1,0]=(-0.816201949845)/(o+1.)+(-0.72616145946)+(0.376577055194)*0.5**o
-        ref[2,0,1,1]=(-0.876294548464)/(o+1.)+(0.128100848943)+(-0.4891837531)*0.5**o
-        ref[2,0,2,0]=(0.602375475355)/(o+1.)+(-0.497981505761)+(-0.759548081841)*0.5**o
-        ref[2,0,2,1]=(0.813648191424)/(o+1.)+(-0.619848910412)+(0.114018259802)*0.5**o
-        ref[2,1,0,0]=(-0.12122456959)/(o+1.)+(0.631472305971)+(-0.572699800518)*0.5**o
-        ref[2,1,0,1]=(0.539760655497)/(o+1.)+(0.43429478244)+(0.0655268452799)*0.5**o
-        ref[2,1,1,0]=(-0.0242249415295)/(o+1.)+(-0.263311349051)+(0.358281119336)*0.5**o
-        ref[2,1,1,1]=(-0.995787126907)/(o+1.)+(-0.370899595832)+(0.523751704889)*0.5**o
-        ref[2,1,2,0]=(0.149400154478)/(o+1.)+(-0.107907886588)+(-0.185380508646)*0.5**o
-        ref[2,1,2,1]=(0.908525646396)/(o+1.)+(-0.18328120728)+(0.81086932122)*0.5**o
-        ref[2,2,0,0]=(-0.0495088159461)/(o+1.)+(-0.246369371749)+(-0.463416100256)*0.5**o
-        ref[2,2,0,1]=(-0.895280577411)/(o+1.)+(-0.0345629407446)+(-0.200698149193)*0.5**o
-        ref[2,2,1,0]=(-0.375709672588)/(o+1.)+(-0.126514661136)+(0.888683772867)*0.5**o
-        ref[2,2,1,1]=(0.868194479789)/(o+1.)+(-0.239689630708)+(-0.0167949020901)*0.5**o
-        ref[2,2,2,0]=(0.267937553127)/(o+1.)+(-0.425739316963)+(0.441981698578)*0.5**o
-        ref[2,2,2,1]=(0.697645775876)/(o+1.)+(-0.16217258223)+(0.876701424579)*0.5**o
-        ref[2,3,0,0]=(-0.0706155476337)/(o+1.)+(0.483772571196)+(0.111231509217)*0.5**o
-        ref[2,3,0,1]=(0.326282512878)/(o+1.)+(0.759423156855)+(-0.858913402812)*0.5**o
-        ref[2,3,1,0]=(0.575866251831)/(o+1.)+(-0.776139286869)+(-0.524551221953)*0.5**o
-        ref[2,3,1,1]=(-0.488263373008)/(o+1.)+(0.0931216925076)+(0.391514075129)*0.5**o
-        ref[2,3,2,0]=(0.85094548724)/(o+1.)+(-0.0708709485834)+(0.26532129161)*0.5**o
-        ref[2,3,2,1]=(0.309349741876)/(o+1.)+(-0.384711182319)+(0.2339994493)*0.5**o
-        ref[2,4,0,0]=(0.339247480459)/(o+1.)+(0.475163650236)+(-0.713553783036)*0.5**o
-        ref[2,4,0,1]=(0.340009298488)/(o+1.)+(0.0740612601349)+(-0.733490022564)*0.5**o
-        ref[2,4,1,0]=(0.680862759763)/(o+1.)+(0.330395834014)+(0.709413437683)*0.5**o
-        ref[2,4,1,1]=(0.687201138134)/(o+1.)+(0.587139359385)+(-0.130761551034)*0.5**o
-        ref[2,4,2,0]=(0.910504833397)/(o+1.)+(0.210828308638)+(0.256894911335)*0.5**o
-        ref[2,4,2,1]=(-0.146356272875)/(o+1.)+(-0.798997815404)+(0.95137247728)*0.5**o
-        ref[3,0,0,0]=(0.894383747285)/(o+1.)+(0.932254321713)+(0.663180444534)*0.5**o
-        ref[3,0,0,1]=(0.367908872519)/(o+1.)+(-0.177196813397)+(0.424556283891)*0.5**o
-        ref[3,0,1,0]=(0.509310001763)/(o+1.)+(-0.869535884539)+(0.908698580251)*0.5**o
-        ref[3,0,1,1]=(-0.986699126405)/(o+1.)+(0.246072597257)+(0.523444225814)*0.5**o
-        ref[3,0,2,0]=(-0.843900271478)/(o+1.)+(0.46874998261)+(-0.163604985314)*0.5**o
-        ref[3,0,2,1]=(0.902072835174)/(o+1.)+(-0.0395040185096)+(-0.490804271432)*0.5**o
-        ref[3,1,0,0]=(0.430512336347)/(o+1.)+(0.755564990872)+(-0.949731382685)*0.5**o
-        ref[3,1,0,1]=(-0.203921504027)/(o+1.)+(-0.189536921439)+(0.945102298088)*0.5**o
-        ref[3,1,1,0]=(-0.365021977395)/(o+1.)+(-0.133381403116)+(0.762442770795)*0.5**o
-        ref[3,1,1,1]=(-0.397139314214)/(o+1.)+(0.152610714905)+(-0.829061607399)*0.5**o
-        ref[3,1,2,0]=(-0.435377419129)/(o+1.)+(0.687677761846)+(-0.780040060687)*0.5**o
-        ref[3,1,2,1]=(-0.642258121264)/(o+1.)+(-0.260682339572)+(-0.853144390228)*0.5**o
-        ref[3,2,0,0]=(0.361300611554)/(o+1.)+(0.451810606136)+(0.377161814597)*0.5**o
-        ref[3,2,0,1]=(0.083224329707)/(o+1.)+(0.223994918098)+(-0.51174671413)*0.5**o
-        ref[3,2,1,0]=(-0.132608876197)/(o+1.)+(0.761129663444)+(0.612695079311)*0.5**o
-        ref[3,2,1,1]=(0.68468196965)/(o+1.)+(-0.0553342296404)+(0.0928734170244)*0.5**o
-        ref[3,2,2,0]=(-0.0602194449612)/(o+1.)+(0.222211500837)+(-0.863542893122)*0.5**o
-        ref[3,2,2,1]=(-0.0746938765947)/(o+1.)+(0.283185341046)+(-0.0942537498633)*0.5**o
-        ref[3,3,0,0]=(-0.541714868844)/(o+1.)+(0.642337208826)+(-0.0588913579205)*0.5**o
-        ref[3,3,0,1]=(-0.32332836636)/(o+1.)+(0.0454800898319)+(0.221784155922)*0.5**o
-        ref[3,3,1,0]=(0.755681096012)/(o+1.)+(0.0454123213802)+(0.804097639203)*0.5**o
-        ref[3,3,1,1]=(0.745033643035)/(o+1.)+(0.34690273587)+(0.825696602707)*0.5**o
-        ref[3,3,2,0]=(-0.569395510546)/(o+1.)+(0.0733165737898)+(-0.372114391352)*0.5**o
-        ref[3,3,2,1]=(0.781753556415)/(o+1.)+(0.592862368109)+(0.439723359721)*0.5**o
-        ref[3,4,0,0]=(0.328787484151)/(o+1.)+(-0.75965414705)+(-0.429896412297)*0.5**o
-        ref[3,4,0,1]=(-0.541538468561)/(o+1.)+(-0.590091943297)+(0.803567111353)*0.5**o
-        ref[3,4,1,0]=(0.308312799035)/(o+1.)+(0.677057855567)+(-0.963266835039)*0.5**o
-        ref[3,4,1,1]=(-0.923691546947)/(o+1.)+(-0.0348874464182)+(0.651198604373)*0.5**o
-        ref[3,4,2,0]=(-0.0326564953763)/(o+1.)+(-0.0667935103036)+(-0.339406539705)*0.5**o
-        ref[3,4,2,1]=(0.193890658409)/(o+1.)+(-0.370194614419)+(0.471355209305)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.0737627367843)*x[0]**o+(-0.897508234376)*x[0]+(0.499361502035)*x[1]**o+(-0.830793706142)*x[1]+(0.967672023686)*x[2]**o+(-0.94209897356)*x[2]
-        arg[0,0,0,1]=(0.353968533247)*x[0]**o+(-0.828575104081)*x[0]+(0.111197799977)*x[1]**o+(0.475627052455)*x[1]+(0.10233739786)*x[2]**o+(-0.297090205985)*x[2]
-        arg[0,0,1,0]=(0.315704665816)*x[0]**o+(0.450577419574)*x[0]+(-0.0225047225996)*x[1]**o+(0.221436098936)*x[1]+(-0.210708820992)*x[2]**o+(0.22813686037)*x[2]
-        arg[0,0,1,1]=(-0.453912049362)*x[0]**o+(0.443266972459)*x[0]+(-0.166003491301)*x[1]**o+(0.325157034345)*x[1]+(0.975435329063)*x[2]**o+(0.516477372955)*x[2]
-        arg[0,0,2,0]=(0.705225432895)*x[0]**o+(0.406870556161)*x[0]+(0.967131048725)*x[1]**o+(-0.31111693058)*x[1]+(0.915125425876)*x[2]**o+(-0.417407852906)*x[2]
-        arg[0,0,2,1]=(-0.397162258761)*x[0]**o+(-0.49079016751)*x[0]+(-0.444905720899)*x[1]**o+(0.258998080457)*x[1]+(-0.406172174923)*x[2]**o+(0.166620074269)*x[2]
-        arg[0,1,0,0]=(0.00444300957662)*x[0]**o+(0.59448685984)*x[0]+(-0.755596203939)*x[1]**o+(-0.587866578467)*x[1]+(-0.994620629569)*x[2]**o+(0.558539124849)*x[2]
-        arg[0,1,0,1]=(0.726535641072)*x[0]**o+(-0.515254556008)*x[0]+(-0.737095044797)*x[1]**o+(0.396218854768)*x[1]+(-0.873340093434)*x[2]**o+(0.538194586759)*x[2]
-        arg[0,1,1,0]=(-0.554579794515)*x[0]**o+(-0.754117891877)*x[0]+(0.242579027102)*x[1]**o+(0.368307663104)*x[1]+(0.308372932825)*x[2]**o+(-0.521440130826)*x[2]
-        arg[0,1,1,1]=(0.294744137189)*x[0]**o+(0.44996935134)*x[0]+(0.118263237453)*x[1]**o+(-0.143566244715)*x[1]+(-0.927385432821)*x[2]**o+(0.912735237305)*x[2]
-        arg[0,1,2,0]=(-0.30261020867)*x[0]**o+(-0.994883662031)*x[0]+(0.514662053738)*x[1]**o+(0.327770859964)*x[1]+(0.862452368458)*x[2]**o+(-0.739026842429)*x[2]
-        arg[0,1,2,1]=(0.494855964972)*x[0]**o+(-0.358461686787)*x[0]+(0.406489619959)*x[1]**o+(0.417722618206)*x[1]+(0.679808195501)*x[2]**o+(-0.00502769522311)*x[2]
-        arg[0,2,0,0]=(-0.914585215232)*x[0]**o+(0.305890296017)*x[0]+(-0.867826544668)*x[1]**o+(0.304580882671)*x[1]+(-0.401401956053)*x[2]**o+(0.842276423411)*x[2]
-        arg[0,2,0,1]=(-0.260590397572)*x[0]**o+(0.541867335986)*x[0]+(0.0279475511153)*x[1]**o+(0.0255320376447)*x[1]+(-0.584584718877)*x[2]**o+(-0.640388032783)*x[2]
-        arg[0,2,1,0]=(0.0455797513404)*x[0]**o+(-0.764984318339)*x[0]+(-0.257174640639)*x[1]**o+(0.745888292962)*x[1]+(0.964524202534)*x[2]**o+(0.435680191282)*x[2]
-        arg[0,2,1,1]=(-0.300900136798)*x[0]**o+(-0.899164082043)*x[0]+(-0.63273853331)*x[1]**o+(0.56522562781)*x[1]+(-0.846482371222)*x[2]**o+(-0.909985752269)*x[2]
-        arg[0,2,2,0]=(0.745711773093)*x[0]**o+(0.0627291150681)*x[0]+(-0.090340386706)*x[1]**o+(-0.0912293084958)*x[1]+(0.108613205226)*x[2]**o+(-0.28985444593)*x[2]
-        arg[0,2,2,1]=(0.291340077334)*x[0]**o+(0.592856577974)*x[0]+(0.141857446535)*x[1]**o+(0.830526360843)*x[1]+(0.956840406828)*x[2]**o+(-0.717465405888)*x[2]
-        arg[0,3,0,0]=(0.89242099254)*x[0]**o+(0.529348654364)*x[0]+(-0.074382350183)*x[1]**o+(0.874670648345)*x[1]+(-0.728104560168)*x[2]**o+(0.0781153963606)*x[2]
-        arg[0,3,0,1]=(0.095390666498)*x[0]**o+(0.0124610436496)*x[0]+(0.278014506594)*x[1]**o+(0.923928359216)*x[1]+(-0.0905667357972)*x[2]**o+(-0.894031439498)*x[2]
-        arg[0,3,1,0]=(-0.317750910722)*x[0]**o+(0.677406387747)*x[0]+(0.550094997541)*x[1]**o+(-0.30098732949)*x[1]+(0.501753868155)*x[2]**o+(-0.42859127752)*x[2]
-        arg[0,3,1,1]=(-0.204455448392)*x[0]**o+(0.445237113438)*x[0]+(0.853596204887)*x[1]**o+(0.315701645178)*x[1]+(0.307192864939)*x[2]**o+(-0.708325809173)*x[2]
-        arg[0,3,2,0]=(0.38581656579)*x[0]**o+(-0.79289714243)*x[0]+(-0.412226202311)*x[1]**o+(0.655534112291)*x[1]+(0.31352728014)*x[2]**o+(0.502089385396)*x[2]
-        arg[0,3,2,1]=(-0.225571343976)*x[0]**o+(0.687765563016)*x[0]+(0.0421378888728)*x[1]**o+(0.54466301835)*x[1]+(-0.430288255786)*x[2]**o+(-0.117571440224)*x[2]
-        arg[0,4,0,0]=(0.834083057621)*x[0]**o+(0.0292441566815)*x[0]+(-0.947154369416)*x[1]**o+(0.597153808995)*x[1]+(0.323706009194)*x[2]**o+(0.664093182644)*x[2]
-        arg[0,4,0,1]=(-0.613152578007)*x[0]**o+(0.253155875339)*x[0]+(0.297138228345)*x[1]**o+(-0.604393247773)*x[1]+(-0.936718722281)*x[2]**o+(-0.410140848312)*x[2]
-        arg[0,4,1,0]=(-0.373668614153)*x[0]**o+(-0.401240526097)*x[0]+(-0.417458139032)*x[1]**o+(0.456033864594)*x[1]+(-0.158434012225)*x[2]**o+(-0.33938136039)*x[2]
-        arg[0,4,1,1]=(0.00943802199128)*x[0]**o+(-0.800756064115)*x[0]+(0.899199671858)*x[1]**o+(0.376830611387)*x[1]+(-0.930822199046)*x[2]**o+(0.192235807799)*x[2]
-        arg[0,4,2,0]=(0.157099024354)*x[0]**o+(0.195942080381)*x[0]+(-0.554519054021)*x[1]**o+(0.871823312361)*x[1]+(-0.34803033039)*x[2]**o+(-0.646933331859)*x[2]
-        arg[0,4,2,1]=(0.933762543076)*x[0]**o+(-0.169843985744)*x[0]+(0.971089176971)*x[1]**o+(-0.605176382286)*x[1]+(0.254369209427)*x[2]**o+(0.0314820745541)*x[2]
-        arg[1,0,0,0]=(0.0417476479889)*x[0]**o+(-0.144293810851)*x[0]+(-0.677039420744)*x[1]**o+(-0.137097132377)*x[1]+(0.721082639859)*x[2]**o+(-0.32510577691)*x[2]
-        arg[1,0,0,1]=(0.450986977446)*x[0]**o+(-0.921371106219)*x[0]+(0.536898979198)*x[1]**o+(-0.814951108186)*x[1]+(-0.733774506956)*x[2]**o+(0.938941747764)*x[2]
-        arg[1,0,1,0]=(-0.23712795738)*x[0]**o+(0.450883240541)*x[0]+(0.101102533189)*x[1]**o+(-0.998253664232)*x[1]+(-0.843977488601)*x[2]**o+(-0.807025450448)*x[2]
-        arg[1,0,1,1]=(-0.308721170682)*x[0]**o+(-0.546268734305)*x[0]+(0.643628083343)*x[1]**o+(0.206934468523)*x[1]+(-0.257667927436)*x[2]**o+(0.468860780891)*x[2]
-        arg[1,0,2,0]=(-0.267232319593)*x[0]**o+(0.221737693042)*x[0]+(0.202218228468)*x[1]**o+(-0.560941556406)*x[1]+(0.910244160614)*x[2]**o+(0.361584784536)*x[2]
-        arg[1,0,2,1]=(0.405254374432)*x[0]**o+(-0.102574362257)*x[0]+(0.527874164745)*x[1]**o+(0.0318395137256)*x[1]+(-0.448050293943)*x[2]**o+(-0.6401160036)*x[2]
-        arg[1,1,0,0]=(-0.877224972777)*x[0]**o+(-0.544175806369)*x[0]+(0.528037913494)*x[1]**o+(-0.477854554671)*x[1]+(-0.394875438861)*x[2]**o+(-0.704656012962)*x[2]
-        arg[1,1,0,1]=(-0.873928172379)*x[0]**o+(0.273455449944)*x[0]+(0.681090480547)*x[1]**o+(0.883243766093)*x[1]+(0.557357114631)*x[2]**o+(0.586148966774)*x[2]
-        arg[1,1,1,0]=(0.552826305913)*x[0]**o+(-0.277269605193)*x[0]+(-0.681872908424)*x[1]**o+(-0.84578699459)*x[1]+(0.6543624385)*x[2]**o+(-0.355051513153)*x[2]
-        arg[1,1,1,1]=(-0.71233607947)*x[0]**o+(-0.779861555179)*x[0]+(0.11496674995)*x[1]**o+(0.634901982779)*x[1]+(0.833044137166)*x[2]**o+(0.0443514408009)*x[2]
-        arg[1,1,2,0]=(-0.411667274338)*x[0]**o+(0.218709061898)*x[0]+(0.132573928273)*x[1]**o+(-0.450677430962)*x[1]+(0.88420873514)*x[2]**o+(-0.618513305411)*x[2]
-        arg[1,1,2,1]=(0.533005373575)*x[0]**o+(0.846343252936)*x[0]+(0.697076801609)*x[1]**o+(0.342260840742)*x[1]+(0.923380136498)*x[2]**o+(-0.727450493778)*x[2]
-        arg[1,2,0,0]=(-0.637366803484)*x[0]**o+(-0.654649539562)*x[0]+(-0.443035194144)*x[1]**o+(0.4928304386)*x[1]+(0.889290653473)*x[2]**o+(0.208513517091)*x[2]
-        arg[1,2,0,1]=(-0.404870452835)*x[0]**o+(-0.556431486625)*x[0]+(-0.428885935216)*x[1]**o+(0.208771213187)*x[1]+(0.706109349268)*x[2]**o+(0.726168991522)*x[2]
-        arg[1,2,1,0]=(0.85574176569)*x[0]**o+(-0.371989246254)*x[0]+(0.0376283091444)*x[1]**o+(-0.164811219077)*x[1]+(0.842513532253)*x[2]**o+(-0.963454790343)*x[2]
-        arg[1,2,1,1]=(0.576825533647)*x[0]**o+(0.866570909412)*x[0]+(-0.286228055595)*x[1]**o+(-0.509258889664)*x[1]+(0.358087406384)*x[2]**o+(0.2558870556)*x[2]
-        arg[1,2,2,0]=(0.741411326194)*x[0]**o+(0.887444210472)*x[0]+(0.176659455323)*x[1]**o+(-0.292731470152)*x[1]+(0.179836617557)*x[2]**o+(-0.10894424483)*x[2]
-        arg[1,2,2,1]=(0.386515069261)*x[0]**o+(-0.423389396097)*x[0]+(0.300384913804)*x[1]**o+(-0.569308908813)*x[1]+(0.845849686169)*x[2]**o+(-0.802483942058)*x[2]
-        arg[1,3,0,0]=(0.848952965744)*x[0]**o+(0.113555873929)*x[0]+(0.132168122705)*x[1]**o+(0.464116031047)*x[1]+(-0.928746352905)*x[2]**o+(-0.176374657603)*x[2]
-        arg[1,3,0,1]=(0.357870838328)*x[0]**o+(-0.294290586373)*x[0]+(0.395859596543)*x[1]**o+(-0.265635871788)*x[1]+(0.283887401402)*x[2]**o+(0.500378090749)*x[2]
-        arg[1,3,1,0]=(-0.509333127149)*x[0]**o+(0.328856435768)*x[0]+(-0.377387784476)*x[1]**o+(-0.878505533565)*x[1]+(0.448760304667)*x[2]**o+(0.996692047048)*x[2]
-        arg[1,3,1,1]=(-0.837885550386)*x[0]**o+(0.0608579436757)*x[0]+(-0.627132023609)*x[1]**o+(0.902538475491)*x[1]+(-0.449596037062)*x[2]**o+(-0.158786724549)*x[2]
-        arg[1,3,2,0]=(0.205889276236)*x[0]**o+(0.576561726109)*x[0]+(-0.00281354319689)*x[1]**o+(0.214968600999)*x[1]+(0.811758703832)*x[2]**o+(0.260164242506)*x[2]
-        arg[1,3,2,1]=(-0.331660060588)*x[0]**o+(0.713879758554)*x[0]+(0.804549392751)*x[1]**o+(-0.346397636822)*x[1]+(-0.364073503513)*x[2]**o+(0.338612348994)*x[2]
-        arg[1,4,0,0]=(0.394201404247)*x[0]**o+(-0.416853395415)*x[0]+(-0.0581465874206)*x[1]**o+(0.105267182588)*x[1]+(0.791799718009)*x[2]**o+(0.0840172853234)*x[2]
-        arg[1,4,0,1]=(-0.346144268453)*x[0]**o+(-0.661228785728)*x[0]+(0.326588395606)*x[1]**o+(0.766137046896)*x[1]+(0.566377202267)*x[2]**o+(0.613565461425)*x[2]
-        arg[1,4,1,0]=(-0.907566140749)*x[0]**o+(-0.391612881392)*x[0]+(0.263322351365)*x[1]**o+(-0.4373853914)*x[1]+(0.248855925063)*x[2]**o+(0.973515668505)*x[2]
-        arg[1,4,1,1]=(0.726194147182)*x[0]**o+(0.497593423927)*x[0]+(-0.951344923018)*x[1]**o+(0.55327321528)*x[1]+(-0.266195110749)*x[2]**o+(-0.310893832826)*x[2]
-        arg[1,4,2,0]=(-0.940824546553)*x[0]**o+(-0.47838524024)*x[0]+(0.408728941942)*x[1]**o+(0.627300786998)*x[1]+(-0.0547545650101)*x[2]**o+(0.433290388525)*x[2]
-        arg[1,4,2,1]=(0.728499572603)*x[0]**o+(-0.232088507059)*x[0]+(0.0550057703801)*x[1]**o+(0.159356057226)*x[1]+(0.111191390097)*x[2]**o+(-0.64498018454)*x[2]
-        arg[2,0,0,0]=(0.467025642879)*x[0]**o+(-0.695379603222)*x[0]+(0.591732172092)*x[1]**o+(0.84325648142)*x[1]+(0.965696472916)*x[2]**o+(0.626196181241)*x[2]
-        arg[2,0,0,1]=(-0.211129222294)*x[0]**o+(-0.501208172412)*x[0]+(-0.0162146409175)*x[1]**o+(-0.672364205306)*x[1]+(-0.851073479662)*x[2]**o+(-0.817568385627)*x[2]
-        arg[2,0,1,0]=(-0.668065295797)*x[0]**o+(-0.90359857855)*x[0]+(0.040519772083)*x[1]**o+(-0.295766307198)*x[1]+(0.0491234828524)*x[2]**o+(-0.589557178985)*x[2]
-        arg[2,0,1,1]=(0.928751918298)*x[0]**o+(-0.773787731767)*x[0]+(-0.744325160449)*x[1]**o+(-0.426987905682)*x[1]+(0.503339956851)*x[2]**o+(0.386756648382)*x[2]
-        arg[2,0,2,0]=(-0.531818105049)*x[0]**o+(-0.586811490681)*x[0]+(0.780379352762)*x[1]**o+(-0.5575328003)*x[1]+(0.0354867101462)*x[2]**o+(0.581226069105)*x[2]
-        arg[2,0,2,1]=(0.0150988200159)*x[0]**o+(0.56415563975)*x[0]+(0.540723773613)*x[1]**o+(0.0653377679637)*x[1]+(-0.52633696371)*x[2]**o+(-0.122811009405)*x[2]
-        arg[2,1,0,0]=(-0.0829154151121)*x[0]**o+(-0.416192198737)*x[0]+(0.944232067474)*x[1]**o+(-0.159852455491)*x[1]+(-0.198397797188)*x[2]**o+(-0.684211447305)*x[2]
-        arg[2,1,0,1]=(-0.834502772339)*x[0]**o+(-0.856817328109)*x[0]+(0.213303574315)*x[1]**o+(-0.283140791695)*x[1]+(-0.727061494352)*x[2]**o+(0.12871372765)*x[2]
-        arg[2,1,1,0]=(0.247439924718)*x[0]**o+(-0.912464825903)*x[0]+(0.791177764168)*x[1]**o+(0.160047921728)*x[1]+(0.591086305304)*x[2]**o+(-0.774025941232)*x[2]
-        arg[2,1,1,1]=(-0.120169534728)*x[0]**o+(-0.747254680906)*x[0]+(-0.394003570933)*x[1]**o+(-0.938198960695)*x[1]+(-0.0142776288517)*x[2]**o+(0.0627959740849)*x[2]
-        arg[2,1,2,0]=(0.703841647274)*x[0]**o+(-0.946039767174)*x[0]+(-0.836717609846)*x[1]**o+(0.776573515772)*x[1]+(0.250502751027)*x[2]**o+(0.403896552902)*x[2]
-        arg[2,1,2,1]=(-0.19760048131)*x[0]**o+(-0.250991189554)*x[0]+(0.278810924634)*x[1]**o+(-0.580148097047)*x[1]+(-0.197518781697)*x[2]**o+(0.116835806412)*x[2]
-        arg[2,2,0,0]=(-0.507872937196)*x[0]**o+(-0.771841217512)*x[0]+(0.852666314762)*x[1]**o+(-0.482947444136)*x[1]+(0.805824662389)*x[2]**o+(-0.299255374349)*x[2]
-        arg[2,2,0,1]=(-0.481403986338)*x[0]**o+(0.904322169038)*x[0]+(0.937553651477)*x[1]**o+(0.727763542606)*x[1]+(-0.69485539356)*x[2]**o+(0.547755372933)*x[2]
-        arg[2,2,1,0]=(0.241675645258)*x[0]**o+(0.957681326492)*x[0]+(-0.305747218513)*x[1]**o+(-0.0393749799535)*x[1]+(-0.448892234759)*x[2]**o+(0.707429367761)*x[2]
-        arg[2,2,1,1]=(0.114772627763)*x[0]**o+(-0.411147710203)*x[0]+(0.13389320737)*x[1]**o+(0.806309117051)*x[1]+(-0.572620769665)*x[2]**o+(0.0389925355751)*x[2]
-        arg[2,2,2,0]=(0.887023209688)*x[0]**o+(0.158261816385)*x[0]+(0.687399231822)*x[1]**o+(-0.858491519094)*x[1]+(-0.00348150506922)*x[2]**o+(-0.863496570874)*x[2]
-        arg[2,2,2,1]=(0.836731324893)*x[0]**o+(0.975472534225)*x[0]+(0.407275572226)*x[1]**o+(0.565132026147)*x[1]+(0.79110912675)*x[2]**o+(-0.0816802575667)*x[2]
-        arg[2,3,0,0]=(0.196161020545)*x[0]**o+(0.254301467318)*x[0]+(0.759363127106)*x[1]**o+(0.536320544038)*x[1]+(0.522705219849)*x[2]**o+(0.376531450811)*x[2]
-        arg[2,3,0,1]=(-0.862326385376)*x[0]**o+(0.766714365146)*x[0]+(0.279327620722)*x[1]**o+(-0.44416461578)*x[1]+(0.115982232563)*x[2]**o+(0.824064889151)*x[2]
-        arg[2,3,1,0]=(0.571263839862)*x[0]**o+(-0.679998793927)*x[0]+(0.63548515376)*x[1]**o+(0.464171242163)*x[1]+(0.712124752567)*x[2]**o+(0.913131755622)*x[2]
-        arg[2,3,1,1]=(0.272559456412)*x[0]**o+(0.0577748172306)*x[0]+(-0.610464803438)*x[1]**o+(0.233987628538)*x[1]+(0.904147555826)*x[2]**o+(-0.131245442847)*x[2]
-        arg[2,3,2,0]=(0.3409363126)*x[0]**o+(0.40060221588)*x[0]+(-0.603551487822)*x[1]**o+(-0.697430353793)*x[1]+(-0.867009193249)*x[2]**o+(-0.178991284979)*x[2]
-        arg[2,3,2,1]=(0.949170673623)*x[0]**o+(-0.0217541208215)*x[0]+(-0.775307373317)*x[1]**o+(0.421565612874)*x[1]+(0.419254478365)*x[2]**o+(-0.732203964657)*x[2]
-        arg[2,4,0,0]=(0.876774885889)*x[0]**o+(0.441155536177)*x[0]+(-0.292113312365)*x[1]**o+(0.880590008772)*x[1]+(0.0732363738743)*x[2]**o+(-0.590855067487)*x[2]
-        arg[2,4,0,1]=(0.347441329383)*x[0]**o+(-0.96566344519)*x[0]+(-0.0870932691958)*x[1]**o+(-0.793898415692)*x[1]+(0.911757004621)*x[2]**o+(0.623070769788)*x[2]
-        arg[2,4,1,0]=(0.732123350436)*x[0]**o+(-0.707615856771)*x[0]+(-0.57969408421)*x[1]**o+(0.0643464469617)*x[1]+(-0.648380091597)*x[2]**o+(0.567100447405)*x[2]
-        arg[2,4,1,1]=(-0.128872747083)*x[0]**o+(-0.463336399393)*x[0]+(-0.1679086419)*x[1]**o+(0.602218708561)*x[1]+(0.62788576637)*x[2]**o+(0.223548351914)*x[2]
-        arg[2,4,2,0]=(0.619034818105)*x[0]**o+(0.167994824318)*x[0]+(-0.244892750219)*x[1]**o+(0.471338499791)*x[1]+(0.526950200066)*x[2]**o+(0.345611623572)*x[2]
-        arg[2,4,2,1]=(0.645979236759)*x[0]**o+(0.79896884484)*x[0]+(-0.587486435644)*x[1]**o+(-0.467838428827)*x[1]+(0.672707985612)*x[2]**o+(-0.169680966884)*x[2]
-        arg[3,0,0,0]=(-0.265836015694)*x[0]**o+(-0.383762854285)*x[0]+(0.420375720992)*x[1]**o+(0.739662661302)*x[1]+(-0.593559713248)*x[2]**o+(0.0743208592009)*x[2]
-        arg[3,0,0,1]=(0.306246512933)*x[0]**o+(0.0357065903179)*x[0]+(0.213209244461)*x[1]**o+(-0.069836605971)*x[1]+(0.668535341179)*x[2]**o+(0.59870885392)*x[2]
-        arg[3,0,1,0]=(0.509420593773)*x[0]**o+(0.995859415429)*x[0]+(-0.07734119959)*x[1]**o+(0.269006992126)*x[1]+(-0.465576902019)*x[2]**o+(0.318766487761)*x[2]
-        arg[3,0,1,1]=(-0.609626065482)*x[0]**o+(0.970976299205)*x[0]+(-0.314734168176)*x[1]**o+(-0.536438958228)*x[1]+(0.900096595598)*x[2]**o+(-0.893816431641)*x[2]
-        arg[3,0,2,0]=(0.269212290711)*x[0]**o+(-0.119897130167)*x[0]+(-0.937350065698)*x[1]**o+(0.913313769348)*x[1]+(0.311695335026)*x[2]**o+(0.58822688023)*x[2]
-        arg[3,0,2,1]=(-0.445116541697)*x[0]**o+(-0.64630078598)*x[0]+(0.811173945666)*x[1]**o+(-0.910503175962)*x[1]+(0.160819266078)*x[2]**o+(-0.807050548571)*x[2]
-        arg[3,1,0,0]=(0.25585673506)*x[0]**o+(-0.174293490388)*x[0]+(-0.510750951271)*x[1]**o+(-0.215780338673)*x[1]+(-0.531739311594)*x[2]**o+(0.479569840128)*x[2]
-        arg[3,1,0,1]=(-0.159301665223)*x[0]**o+(0.88558738006)*x[0]+(-0.933255168276)*x[1]**o+(0.739621529924)*x[1]+(-0.371501556668)*x[2]**o+(-0.224043643673)*x[2]
-        arg[3,1,1,0]=(0.673375237931)*x[0]**o+(0.29315421593)*x[0]+(0.378983835599)*x[1]**o+(-0.187220470447)*x[1]+(-0.122366431969)*x[2]**o+(-0.178182488821)*x[2]
-        arg[3,1,1,1]=(0.273992606955)*x[0]**o+(-0.42302685869)*x[0]+(0.490650718142)*x[1]**o+(0.067822229282)*x[1]+(0.758676637186)*x[2]**o+(-0.840062442278)*x[2]
-        arg[3,1,2,0]=(-0.533129977534)*x[0]**o+(0.743362501638)*x[0]+(0.0397932337285)*x[1]**o+(0.134261172942)*x[1]+(0.076467475088)*x[2]**o+(0.750124646154)*x[2]
-        arg[3,1,2,1]=(0.977824314677)*x[0]**o+(0.322104772509)*x[0]+(0.478366489119)*x[1]**o+(0.139966919282)*x[1]+(0.823631645543)*x[2]**o+(0.29259439301)*x[2]
-        arg[3,2,0,0]=(0.969349250234)*x[0]**o+(0.158604629065)*x[0]+(0.517280925739)*x[1]**o+(-0.32151445591)*x[1]+(0.516829269337)*x[2]**o+(0.935139450142)*x[2]
-        arg[3,2,0,1]=(-0.673721580725)*x[0]**o+(0.1932869215)*x[0]+(0.47375679317)*x[1]**o+(0.377941367578)*x[1]+(-0.359306451576)*x[2]**o+(0.00498822119998)*x[2]
-        arg[3,2,1,0]=(-0.432873699676)*x[0]**o+(0.191782167044)*x[0]+(0.191395777927)*x[1]**o+(-0.540088847941)*x[1]+(0.608451872364)*x[2]**o+(0.151589512705)*x[2]
-        arg[3,2,1,1]=(0.633726614581)*x[0]**o+(-0.824133266602)*x[0]+(-0.380289061608)*x[1]**o+(-0.722136850408)*x[1]+(-0.807853184729)*x[2]**o+(0.152552828168)*x[2]
-        arg[3,2,2,0]=(-0.182700878265)*x[0]**o+(0.105776705469)*x[0]+(0.837527799957)*x[1]**o+(0.120438395343)*x[1]+(-0.211142277471)*x[2]**o+(-0.0499206664041)*x[2]
-        arg[3,2,2,1]=(0.999790796581)*x[0]**o+(0.523238189614)*x[0]+(0.108118557801)*x[1]**o+(-0.899694790145)*x[1]+(0.165089392648)*x[2]**o+(0.38599870475)*x[2]
-        arg[3,3,0,0]=(-0.959143897162)*x[0]**o+(-0.968197835338)*x[0]+(-0.521866033091)*x[1]**o+(-0.560799919169)*x[1]+(0.604562365858)*x[2]**o+(0.195593261393)*x[2]
-        arg[3,3,0,1]=(0.385513188376)*x[0]**o+(0.918485762628)*x[0]+(0.581126961809)*x[1]**o+(-0.365882492483)*x[1]+(-0.260563773993)*x[2]**o+(0.997016165521)*x[2]
-        arg[3,3,1,0]=(0.809269330969)*x[0]**o+(0.472424328796)*x[0]+(-0.920680159926)*x[1]**o+(0.756205962059)*x[1]+(-0.886275742364)*x[2]**o+(-0.800132407145)*x[2]
-        arg[3,3,1,1]=(-0.983474390608)*x[0]**o+(-0.436192301851)*x[0]+(0.653210945793)*x[1]**o+(-0.465357783291)*x[1]+(-0.799261076035)*x[2]**o+(-0.349990963152)*x[2]
-        arg[3,3,2,0]=(0.710820041642)*x[0]**o+(-0.973768204693)*x[0]+(0.0408403957292)*x[1]**o+(0.61546181161)*x[1]+(0.915939389579)*x[2]**o+(0.634659938301)*x[2]
-        arg[3,3,2,1]=(0.633364771689)*x[0]**o+(0.887553239682)*x[0]+(-0.64913373177)*x[1]**o+(0.557465560353)*x[1]+(-0.744072153243)*x[2]**o+(-0.301528624747)*x[2]
-        arg[3,4,0,0]=(0.44039719913)*x[0]**o+(-0.0339525806656)*x[0]+(0.574166395893)*x[1]**o+(-0.810441051899)*x[1]+(0.254523432152)*x[2]**o+(-0.798403721953)*x[2]
-        arg[3,4,0,1]=(0.253149910502)*x[0]**o+(-0.909846068796)*x[0]+(0.855107984234)*x[1]**o+(-0.973196168972)*x[1]+(0.646832394105)*x[2]**o+(0.811892995874)*x[2]
-        arg[3,4,1,0]=(0.13027869782)*x[0]**o+(-0.424094152568)*x[0]+(-0.197473699021)*x[1]**o+(0.0795845331856)*x[1]+(-0.511301398362)*x[2]**o+(-0.331330168767)*x[2]
-        arg[3,4,1,1]=(0.476554240918)*x[0]**o+(0.18800431479)*x[0]+(0.259031626216)*x[1]**o+(-0.0532533771273)*x[1]+(0.914847196458)*x[2]**o+(0.333851370508)*x[2]
-        arg[3,4,2,0]=(0.800058524963)*x[0]**o+(-0.402028928896)*x[0]+(0.913881556051)*x[1]**o+(0.895516442873)*x[1]+(-0.0227700921994)*x[2]**o+(-0.0502319834692)*x[2]
-        arg[3,4,2,1]=(-0.533834741079)*x[0]**o+(0.557954226232)*x[0]+(-0.121676666641)*x[1]**o+(0.781782385789)*x[1]+(0.0682870158781)*x[2]**o+(-0.236432552686)*x[2]
-        ref[0,0,0,0]=(1.46703352572)/(o+1.)+(-1.33520045704)+(0.0737627367843)*0.5**o
-        ref[0,0,0,1]=(0.213535197837)/(o+1.)+(-0.325019128805)+(0.353968533247)*0.5**o
-        ref[0,0,1,0]=(-0.233213543591)/(o+1.)+(0.450075189439)+(0.315704665816)*0.5**o
-        ref[0,0,1,1]=(0.809431837761)/(o+1.)+(0.642450689879)+(-0.453912049362)*0.5**o
-        ref[0,0,2,0]=(1.8822564746)/(o+1.)+(-0.160827113662)+(0.705225432895)*0.5**o
-        ref[0,0,2,1]=(-0.851077895823)/(o+1.)+(-0.032586006392)+(-0.397162258761)*0.5**o
-        ref[0,1,0,0]=(-1.75021683351)/(o+1.)+(0.282579703111)+(0.00444300957662)*0.5**o
-        ref[0,1,0,1]=(-1.61043513823)/(o+1.)+(0.209579442759)+(0.726535641072)*0.5**o
-        ref[0,1,1,0]=(0.550951959927)/(o+1.)+(-0.453625179799)+(-0.554579794515)*0.5**o
-        ref[0,1,1,1]=(-0.809122195368)/(o+1.)+(0.609569171964)+(0.294744137189)*0.5**o
-        ref[0,1,2,0]=(1.3771144222)/(o+1.)+(-0.703069822248)+(-0.30261020867)*0.5**o
-        ref[0,1,2,1]=(1.08629781546)/(o+1.)+(0.0271166180983)+(0.494855964972)*0.5**o
-        ref[0,2,0,0]=(-1.26922850072)/(o+1.)+(0.72637380105)+(-0.914585215232)*0.5**o
-        ref[0,2,0,1]=(-0.556637167762)/(o+1.)+(-0.036494329576)+(-0.260590397572)*0.5**o
-        ref[0,2,1,0]=(0.707349561895)/(o+1.)+(0.208292082952)+(0.0455797513404)*0.5**o
-        ref[0,2,1,1]=(-1.47922090453)/(o+1.)+(-0.621962103251)+(-0.300900136798)*0.5**o
-        ref[0,2,2,0]=(0.01827281852)/(o+1.)+(-0.159177319679)+(0.745711773093)*0.5**o
-        ref[0,2,2,1]=(1.09869785336)/(o+1.)+(0.352958766464)+(0.291340077334)*0.5**o
-        ref[0,3,0,0]=(-0.802486910351)/(o+1.)+(0.741067349535)+(0.89242099254)*0.5**o
-        ref[0,3,0,1]=(0.187447770797)/(o+1.)+(0.0211789816838)+(0.095390666498)*0.5**o
-        ref[0,3,1,0]=(1.0518488657)/(o+1.)+(-0.0260861096315)+(-0.317750910722)*0.5**o
-        ref[0,3,1,1]=(1.16078906983)/(o+1.)+(0.0263064747213)+(-0.204455448392)*0.5**o
-        ref[0,3,2,0]=(-0.0986989221708)/(o+1.)+(0.182363177629)+(0.38581656579)*0.5**o
-        ref[0,3,2,1]=(-0.388150366913)/(o+1.)+(0.557428570571)+(-0.225571343976)*0.5**o
-        ref[0,4,0,0]=(-0.623448360222)/(o+1.)+(0.64524557416)+(0.834083057621)*0.5**o
-        ref[0,4,0,1]=(-0.639580493935)/(o+1.)+(-0.380689110373)+(-0.613152578007)*0.5**o
-        ref[0,4,1,0]=(-0.575892151257)/(o+1.)+(-0.142294010946)+(-0.373668614153)*0.5**o
-        ref[0,4,1,1]=(-0.0316225271882)/(o+1.)+(-0.115844822465)+(0.00943802199128)*0.5**o
-        ref[0,4,2,0]=(-0.902549384411)/(o+1.)+(0.210416030442)+(0.157099024354)*0.5**o
-        ref[0,4,2,1]=(1.2254583864)/(o+1.)+(-0.371769146738)+(0.933762543076)*0.5**o
-        ref[1,0,0,0]=(0.0440432191149)/(o+1.)+(-0.303248360069)+(0.0417476479889)*0.5**o
-        ref[1,0,0,1]=(-0.196875527758)/(o+1.)+(-0.39869023332)+(0.450986977446)*0.5**o
-        ref[1,0,1,0]=(-0.742874955412)/(o+1.)+(-0.677197937069)+(-0.23712795738)*0.5**o
-        ref[1,0,1,1]=(0.385960155907)/(o+1.)+(0.0647632575546)+(-0.308721170682)*0.5**o
-        ref[1,0,2,0]=(1.11246238908)/(o+1.)+(0.0111904605859)+(-0.267232319593)*0.5**o
-        ref[1,0,2,1]=(0.0798238708014)/(o+1.)+(-0.355425426066)+(0.405254374432)*0.5**o
-        ref[1,1,0,0]=(0.133162474633)/(o+1.)+(-0.863343187001)+(-0.877224972777)*0.5**o
-        ref[1,1,0,1]=(1.23844759518)/(o+1.)+(0.871424091405)+(-0.873928172379)*0.5**o
-        ref[1,1,1,0]=(-0.0275104699246)/(o+1.)+(-0.739054056468)+(0.552826305913)*0.5**o
-        ref[1,1,1,1]=(0.948010887116)/(o+1.)+(-0.0503040657995)+(-0.71233607947)*0.5**o
-        ref[1,1,2,0]=(1.01678266341)/(o+1.)+(-0.425240837237)+(-0.411667274338)*0.5**o
-        ref[1,1,2,1]=(1.62045693811)/(o+1.)+(0.23057679995)+(0.533005373575)*0.5**o
-        ref[1,2,0,0]=(0.44625545933)/(o+1.)+(0.0233472080645)+(-0.637366803484)*0.5**o
-        ref[1,2,0,1]=(0.277223414052)/(o+1.)+(0.189254359042)+(-0.404870452835)*0.5**o
-        ref[1,2,1,0]=(0.880141841398)/(o+1.)+(-0.750127627837)+(0.85574176569)*0.5**o
-        ref[1,2,1,1]=(0.0718593507895)/(o+1.)+(0.306599537674)+(0.576825533647)*0.5**o
-        ref[1,2,2,0]=(0.35649607288)/(o+1.)+(0.242884247745)+(0.741411326194)*0.5**o
-        ref[1,2,2,1]=(1.14623459997)/(o+1.)+(-0.897591123484)+(0.386515069261)*0.5**o
-        ref[1,3,0,0]=(-0.796578230199)/(o+1.)+(0.200648623687)+(0.848952965744)*0.5**o
-        ref[1,3,0,1]=(0.679746997945)/(o+1.)+(-0.0297741837061)+(0.357870838328)*0.5**o
-        ref[1,3,1,0]=(0.0713725201916)/(o+1.)+(0.223521474626)+(-0.509333127149)*0.5**o
-        ref[1,3,1,1]=(-1.07672806067)/(o+1.)+(0.402304847309)+(-0.837885550386)*0.5**o
-        ref[1,3,2,0]=(0.808945160636)/(o+1.)+(0.525847284807)+(0.205889276236)*0.5**o
-        ref[1,3,2,1]=(0.440475889238)/(o+1.)+(0.353047235363)+(-0.331660060588)*0.5**o
-        ref[1,4,0,0]=(0.733653130588)/(o+1.)+(-0.113784463751)+(0.394201404247)*0.5**o
-        ref[1,4,0,1]=(0.892965597874)/(o+1.)+(0.359236861297)+(-0.346144268453)*0.5**o
-        ref[1,4,1,0]=(0.512178276429)/(o+1.)+(0.0722586978563)+(-0.907566140749)*0.5**o
-        ref[1,4,1,1]=(-1.21754003377)/(o+1.)+(0.369986403191)+(0.726194147182)*0.5**o
-        ref[1,4,2,0]=(0.353974376932)/(o+1.)+(0.291102967642)+(-0.940824546553)*0.5**o
-        ref[1,4,2,1]=(0.166197160477)/(o+1.)+(-0.358856317187)+(0.728499572603)*0.5**o
-        ref[2,0,0,0]=(1.55742864501)/(o+1.)+(0.38703652972)+(0.467025642879)*0.5**o
-        ref[2,0,0,1]=(-0.867288120579)/(o+1.)+(-0.995570381672)+(-0.211129222294)*0.5**o
-        ref[2,0,1,0]=(0.0896432549354)/(o+1.)+(-0.894461032367)+(-0.668065295797)*0.5**o
-        ref[2,0,1,1]=(-0.240985203598)/(o+1.)+(-0.407009494534)+(0.928751918298)*0.5**o
-        ref[2,0,2,0]=(0.815866062908)/(o+1.)+(-0.281559110938)+(-0.531818105049)*0.5**o
-        ref[2,0,2,1]=(0.0143868099026)/(o+1.)+(0.253341199154)+(0.0150988200159)*0.5**o
-        ref[2,1,0,0]=(0.745834270286)/(o+1.)+(-0.630128050767)+(-0.0829154151121)*0.5**o
-        ref[2,1,0,1]=(-0.513757920038)/(o+1.)+(-0.505622196077)+(-0.834502772339)*0.5**o
-        ref[2,1,1,0]=(1.38226406947)/(o+1.)+(-0.763221422703)+(0.247439924718)*0.5**o
-        ref[2,1,1,1]=(-0.408281199784)/(o+1.)+(-0.811328833758)+(-0.120169534728)*0.5**o
-        ref[2,1,2,0]=(-0.586214858819)/(o+1.)+(0.11721515075)+(0.703841647274)*0.5**o
-        ref[2,1,2,1]=(0.0812921429368)/(o+1.)+(-0.357151740094)+(-0.19760048131)*0.5**o
-        ref[2,2,0,0]=(1.65849097715)/(o+1.)+(-0.777022017999)+(-0.507872937196)*0.5**o
-        ref[2,2,0,1]=(0.242698257917)/(o+1.)+(1.08992054229)+(-0.481403986338)*0.5**o
-        ref[2,2,1,0]=(-0.754639453272)/(o+1.)+(0.81286785715)+(0.241675645258)*0.5**o
-        ref[2,2,1,1]=(-0.438727562295)/(o+1.)+(0.217076971211)+(0.114772627763)*0.5**o
-        ref[2,2,2,0]=(0.683917726753)/(o+1.)+(-0.781863136791)+(0.887023209688)*0.5**o
-        ref[2,2,2,1]=(1.19838469898)/(o+1.)+(0.729462151403)+(0.836731324893)*0.5**o
-        ref[2,3,0,0]=(1.28206834695)/(o+1.)+(0.583576731084)+(0.196161020545)*0.5**o
-        ref[2,3,0,1]=(0.395309853285)/(o+1.)+(0.573307319258)+(-0.862326385376)*0.5**o
-        ref[2,3,1,0]=(1.34760990633)/(o+1.)+(0.348652101929)+(0.571263839862)*0.5**o
-        ref[2,3,1,1]=(0.293682752388)/(o+1.)+(0.080258501461)+(0.272559456412)*0.5**o
-        ref[2,3,2,0]=(-1.47056068107)/(o+1.)+(-0.237909711446)+(0.3409363126)*0.5**o
-        ref[2,3,2,1]=(-0.356052894952)/(o+1.)+(-0.166196236302)+(0.949170673623)*0.5**o
-        ref[2,4,0,0]=(-0.21887693849)/(o+1.)+(0.365445238731)+(0.876774885889)*0.5**o
-        ref[2,4,0,1]=(0.824663735425)/(o+1.)+(-0.568245545547)+(0.347441329383)*0.5**o
-        ref[2,4,1,0]=(-1.22807417581)/(o+1.)+(-0.0380844812022)+(0.732123350436)*0.5**o
-        ref[2,4,1,1]=(0.45997712447)/(o+1.)+(0.181215330541)+(-0.128872747083)*0.5**o
-        ref[2,4,2,0]=(0.282057449847)/(o+1.)+(0.49247247384)+(0.619034818105)*0.5**o
-        ref[2,4,2,1]=(0.0852215499679)/(o+1.)+(0.0807247245641)+(0.645979236759)*0.5**o
-        ref[3,0,0,0]=(-0.173183992256)/(o+1.)+(0.215110333109)+(-0.265836015694)*0.5**o
-        ref[3,0,0,1]=(0.88174458564)/(o+1.)+(0.282289419133)+(0.306246512933)*0.5**o
-        ref[3,0,1,0]=(-0.542918101609)/(o+1.)+(0.791816447658)+(0.509420593773)*0.5**o
-        ref[3,0,1,1]=(0.585362427423)/(o+1.)+(-0.229639545331)+(-0.609626065482)*0.5**o
-        ref[3,0,2,0]=(-0.625654730672)/(o+1.)+(0.690821759706)+(0.269212290711)*0.5**o
-        ref[3,0,2,1]=(0.971993211744)/(o+1.)+(-1.18192725526)+(-0.445116541697)*0.5**o
-        ref[3,1,0,0]=(-1.04249026287)/(o+1.)+(0.0447480055334)+(0.25585673506)*0.5**o
-        ref[3,1,0,1]=(-1.30475672494)/(o+1.)+(0.700582633156)+(-0.159301665223)*0.5**o
-        ref[3,1,1,0]=(0.25661740363)/(o+1.)+(-0.036124371669)+(0.673375237931)*0.5**o
-        ref[3,1,1,1]=(1.24932735533)/(o+1.)+(-0.597633535843)+(0.273992606955)*0.5**o
-        ref[3,1,2,0]=(0.116260708817)/(o+1.)+(0.813874160367)+(-0.533129977534)*0.5**o
-        ref[3,1,2,1]=(1.30199813466)/(o+1.)+(0.377333042401)+(0.977824314677)*0.5**o
-        ref[3,2,0,0]=(1.03411019508)/(o+1.)+(0.386114811649)+(0.969349250234)*0.5**o
-        ref[3,2,0,1]=(0.114450341594)/(o+1.)+(0.288108255139)+(-0.673721580725)*0.5**o
-        ref[3,2,1,0]=(0.799847650292)/(o+1.)+(-0.0983585840958)+(-0.432873699676)*0.5**o
-        ref[3,2,1,1]=(-1.18814224634)/(o+1.)+(-0.696858644421)+(0.633726614581)*0.5**o
-        ref[3,2,2,0]=(0.626385522485)/(o+1.)+(0.0881472172038)+(-0.182700878265)*0.5**o
-        ref[3,2,2,1]=(0.27320795045)/(o+1.)+(0.0047710521094)+(0.999790796581)*0.5**o
-        ref[3,3,0,0]=(0.0826963327674)/(o+1.)+(-0.666702246557)+(-0.959143897162)*0.5**o
-        ref[3,3,0,1]=(0.320563187816)/(o+1.)+(0.774809717833)+(0.385513188376)*0.5**o
-        ref[3,3,1,0]=(-1.80695590229)/(o+1.)+(0.214248941855)+(0.809269330969)*0.5**o
-        ref[3,3,1,1]=(-0.146050130242)/(o+1.)+(-0.625770524147)+(-0.983474390608)*0.5**o
-        ref[3,3,2,0]=(0.956779785308)/(o+1.)+(0.138176772609)+(0.710820041642)*0.5**o
-        ref[3,3,2,1]=(-1.39320588501)/(o+1.)+(0.571745087644)+(0.633364771689)*0.5**o
-        ref[3,4,0,0]=(0.828689828045)/(o+1.)+(-0.821398677259)+(0.44039719913)*0.5**o
-        ref[3,4,0,1]=(1.50194037834)/(o+1.)+(-0.535574620947)+(0.253149910502)*0.5**o
-        ref[3,4,1,0]=(-0.708775097383)/(o+1.)+(-0.337919894074)+(0.13027869782)*0.5**o
-        ref[3,4,1,1]=(1.17387882267)/(o+1.)+(0.234301154085)+(0.476554240918)*0.5**o
-        ref[3,4,2,0]=(0.891111463851)/(o+1.)+(0.221627765254)+(0.800058524963)*0.5**o
-        ref[3,4,2,1]=(-0.0533896507631)/(o+1.)+(0.551652029667)+(-0.533834741079)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      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.570707549273)*x[0]+(-0.726264032186)*x[1]
-        ref=(-0.0423765208873)/(o+1.)+(-0.791542656673)+(0.328490252775)*0.5**o
-      else:
-        arg=(1.28222892931)*x[0]+(-0.798170675576)*x[1]+(1.5701208405)*x[2]
-        ref=(0.721975372868)/(o+1.)+(0.344720905832)+(0.642761909705)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      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.575166906798)*x[0]+(-1.63698773418)*x[1]
-        arg[1]=(-0.0535946584636)*x[0]+(0.105969101775)*x[1]
-        ref[0]=(-0.751926426344)/(o+1.)+(-0.395800138888)+(0.481705876734)*0.5**o
-        ref[1]=(0.698496252242)/(o+1.)+(-0.265927161866)+(-0.114267485199)*0.5**o
-      else:
-        arg[0]=(-0.17879254138)*x[0]+(-1.12752123792)*x[1]+(0.921297311605)*x[2]
-        arg[1]=(1.33131824618)*x[0]+(-0.392175059176)*x[1]+(0.545754281465)*x[2]
-        ref[0]=(-0.494870303061)/(o+1.)+(0.0697636237654)+(-0.0296734121631)*0.5**o
-        ref[1]=(-0.394300983704)/(o+1.)+(0.722261312754)+(0.434675826665)*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.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.338658191734)*x[0]+(1.46127609683)*x[1]
-        arg[0,1]=(-0.629116867491)*x[0]+(1.40141569066)*x[1]
-        arg[0,2]=(0.105569779347)*x[0]+(0.239936324967)*x[1]
-        arg[0,3]=(-0.281718331718)*x[0]+(0.280323404866)*x[1]
-        arg[0,4]=(0.467341113661)*x[0]+(-0.50452062075)*x[1]
-        arg[1,0]=(-0.841295219186)*x[0]+(0.524038163723)*x[1]
-        arg[1,1]=(1.40143704236)*x[0]+(-1.50467961637)*x[1]
-        arg[1,2]=(1.21078790505)*x[0]+(-0.731453470292)*x[1]
-        arg[1,3]=(0.469556922076)*x[0]+(0.0686293204391)*x[1]
-        arg[1,4]=(-1.26394637585)*x[0]+(-0.0361395276585)*x[1]
-        arg[2,0]=(-1.12850883148)*x[0]+(0.284296673326)*x[1]
-        arg[2,1]=(-0.626362828813)*x[0]+(1.19459827573)*x[1]
-        arg[2,2]=(-0.545457293083)*x[0]+(1.547337019)*x[1]
-        arg[2,3]=(0.664461986629)*x[0]+(-1.69082198266)*x[1]
-        arg[2,4]=(-0.100004763305)*x[0]+(0.152159044423)*x[1]
-        arg[3,0]=(0.307574843061)*x[0]+(1.20209181301)*x[1]
-        arg[3,1]=(-0.0663203356627)*x[0]+(-1.26669863527)*x[1]
-        arg[3,2]=(-1.20436798894)*x[0]+(-0.0375693379661)*x[1]
-        arg[3,3]=(0.753649087747)*x[0]+(0.69376223486)*x[1]
-        arg[3,4]=(-0.0512732264834)*x[0]+(-0.658097606436)*x[1]
-        ref[0,0]=(0.996821439952)/(o+1.)+(0.015088160779)+(0.0956201435879)*0.5**o
-        ref[0,1]=(0.643092963726)/(o+1.)+(0.239390724844)+(-0.349575590244)*0.5**o
-        ref[0,2]=(-0.198468008977)/(o+1.)+(0.00411201743342)+(0.535750078425)*0.5**o
-        ref[0,3]=(0.642491201137)/(o+1.)+(-0.623413199652)+(0.602940271315)*0.5**o
-        ref[0,4]=(-0.105706120549)/(o+1.)+(-0.353560054939)+(0.775646723338)*0.5**o
-        ref[1,0]=(0.144540669221)/(o+1.)+(0.0228268215803)+(-0.507451367845)*0.5**o
-        ref[1,1]=(-0.820379339897)/(o+1.)+(0.0951825678509)+(0.526771630185)*0.5**o
-        ref[1,2]=(-0.21214585824)/(o+1.)+(-0.0889183062985)+(0.869316905591)*0.5**o
-        ref[1,3]=(0.291228940674)/(o+1.)+(0.192623928703)+(-0.138290555565)*0.5**o
-        ref[1,4]=(-0.0663718956434)/(o+1.)+(-0.309484335614)+(-0.614745336642)*0.5**o
-        ref[2,0]=(0.484892962201)/(o+1.)+(-0.367129859793)+(-0.594845400763)*0.5**o
-        ref[2,1]=(0.768457634672)/(o+1.)+(0.154447657562)+(-0.509117502876)*0.5**o
-        ref[2,2]=(0.707320338363)/(o+1.)+(-0.0592149232183)+(0.412989233992)*0.5**o
-        ref[2,3]=(-0.983684339171)/(o+1.)+(-0.495377645598)+(0.948079634337)*0.5**o
-        ref[2,4]=(-0.0315947220465)/(o+1.)+(0.506833986759)+(-0.929918970353)*0.5**o
-        ref[3,0]=(0.54141067098)/(o+1.)+(0.489049131493)+(-0.00984227789859)*0.5**o
-        ref[3,1]=(-0.552335053051)/(o+1.)+(-0.383325638803)+(-0.0140326402734)*0.5**o
-        ref[3,2]=(0.0821472412575)/(o+1.)+(-0.335827719718)+(-0.652429128733)*0.5**o
-        ref[3,3]=(0.112917208924)/(o+1.)+(0.667772807338)+(-0.00105150099312)*0.5**o
-        ref[3,4]=(-0.19331508157)/(o+1.)+(-0.102296385708)+(-0.311462979932)*0.5**o
-      else:
-        arg[0,0]=(0.069245963142)*x[0]+(-0.185727379494)*x[1]+(-0.887410889699)*x[2]
-        arg[0,1]=(-0.816745668949)*x[0]+(-0.250435680662)*x[1]+(0.701607830582)*x[2]
-        arg[0,2]=(-0.862433954308)*x[0]+(0.731874372527)*x[1]+(-0.115384982779)*x[2]
-        arg[0,3]=(-0.265247631604)*x[0]+(-0.157059741958)*x[1]+(-0.368419335078)*x[2]
-        arg[0,4]=(1.66720203567)*x[0]+(-0.759393708719)*x[1]+(1.36360850704)*x[2]
-        arg[1,0]=(-0.192822813795)*x[0]+(0.0358776152527)*x[1]+(-0.722864520788)*x[2]
-        arg[1,1]=(-0.480606215471)*x[0]+(1.13682774573)*x[1]+(0.17900467623)*x[2]
-        arg[1,2]=(0.346760852584)*x[0]+(0.994833030281)*x[1]+(0.507055933913)*x[2]
-        arg[1,3]=(-0.509961853478)*x[0]+(-0.852997575505)*x[1]+(0.586527030253)*x[2]
-        arg[1,4]=(0.93957975846)*x[0]+(0.28878335152)*x[1]+(0.128070931738)*x[2]
-        arg[2,0]=(0.338283306313)*x[0]+(0.0244500761608)*x[1]+(-0.606875554888)*x[2]
-        arg[2,1]=(0.850782624552)*x[0]+(-0.836382038189)*x[1]+(-1.41808459947)*x[2]
-        arg[2,2]=(-1.06176229613)*x[0]+(-0.259247046061)*x[1]+(-0.583455484089)*x[2]
-        arg[2,3]=(1.17437923282)*x[0]+(1.31485601495)*x[1]+(1.3139743231)*x[2]
-        arg[2,4]=(0.362851636275)*x[0]+(0.804049783156)*x[1]+(1.09205000214)*x[2]
-        arg[3,0]=(0.343603837195)*x[0]+(-1.49082257981)*x[1]+(-0.628668674545)*x[2]
-        arg[3,1]=(-0.676847711765)*x[0]+(1.32350560453)*x[1]+(1.07275185686)*x[2]
-        arg[3,2]=(0.570784985469)*x[0]+(-1.01212360602)*x[1]+(-0.0808776667606)*x[2]
-        arg[3,3]=(0.506392444236)*x[0]+(-1.00848318041)*x[1]+(0.558777901541)*x[2]
-        arg[3,4]=(-0.60925738291)*x[0]+(-0.386755957809)*x[1]+(0.60930115434)*x[2]
-        ref[0,0]=(-0.695230136419)/(o+1.)+(-0.388400729083)+(0.468139288533)*0.5**o
-        ref[0,1]=(0.462098132187)/(o+1.)+(-0.215041893287)+(-0.397587864642)*0.5**o
-        ref[0,2]=(-0.262411385363)/(o+1.)+(0.275729226874)+(-0.534991632946)*0.5**o
-        ref[0,3]=(0.117822633378)/(o+1.)+(0.0286827897592)+(-0.965914921536)*0.5**o
-        ref[0,4]=(0.293575681039)/(o+1.)+(0.584039692827)+(0.809761767299)*0.5**o
-        ref[1,0]=(0.627951922463)/(o+1.)+(-0.994889162557)+(0.482016683321)*0.5**o
-        ref[1,1]=(1.83482238662)/(o+1.)+(-0.205719558739)+(-0.588157062647)*0.5**o
-        ref[1,2]=(1.13612020398)/(o+1.)+(0.0262824938134)+(0.659964625174)*0.5**o
-        ref[1,3]=(0.325264487741)/(o+1.)+(-0.0752154813413)+(-0.951265923787)*0.5**o
-        ref[1,4]=(-0.149919283302)/(o+1.)+(0.77701502585)+(-0.0476767266789)*0.5**o
-        ref[2,0]=(0.491504686171)/(o+1.)+(-0.562534706926)+(0.389422555265)*0.5**o
-        ref[2,1]=(-1.52704217417)/(o+1.)+(0.120525042098)+(-0.117691923134)*0.5**o
-        ref[2,2]=(-0.779796772543)/(o+1.)+(-0.318864997267)+(-0.486938059201)*0.5**o
-        ref[2,3]=(1.53343318682)/(o+1.)+(0.731149467308)+(0.807477449443)*0.5**o
-        ref[2,4]=(1.15919207694)/(o+1.)+(0.113921448815)+(0.871916446996)*0.5**o
-        ref[3,0]=(-1.75312920944)/(o+1.)+(-0.153798982308)+(0.284839756895)*0.5**o
-        ref[3,1]=(1.30985814569)/(o+1.)+(0.438430874237)+(-0.467310144534)*0.5**o
-        ref[3,2]=(-0.737480320972)/(o+1.)+(0.0604403094397)+(0.094383414777)*0.5**o
-        ref[3,3]=(-0.688723266524)/(o+1.)+(0.43486027018)+(-0.124310108473)*0.5**o
-        ref[3,4]=(0.128399262674)/(o+1.)+(-0.372445844122)+(0.229780239192)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.993339371954)*x[0]+(-1.35308128985)*x[1]
-        arg[0,0,1]=(-1.07886149134)*x[0]+(-1.38999283206)*x[1]
-        arg[0,1,0]=(0.246468026972)*x[0]+(-1.37217464882)*x[1]
-        arg[0,1,1]=(0.645672648599)*x[0]+(1.8070624103)*x[1]
-        arg[1,0,0]=(-1.02278989388)*x[0]+(0.151634023103)*x[1]
-        arg[1,0,1]=(-0.667332860541)*x[0]+(0.312742149193)*x[1]
-        arg[1,1,0]=(-0.848647385832)*x[0]+(0.466438038516)*x[1]
-        arg[1,1,1]=(-0.185495911372)*x[0]+(-0.137118786891)*x[1]
-        arg[2,0,0]=(-0.0250555870731)*x[0]+(0.905553573283)*x[1]
-        arg[2,0,1]=(-1.03940852939)*x[0]+(-1.57326016394)*x[1]
-        arg[2,1,0]=(1.48834718811)*x[0]+(-0.340889253246)*x[1]
-        arg[2,1,1]=(0.875721514739)*x[0]+(-0.310857412212)*x[1]
-        arg[3,0,0]=(1.25129508831)*x[0]+(-1.69312043525)*x[1]
-        arg[3,0,1]=(1.50124675312)*x[0]+(0.244195748654)*x[1]
-        arg[3,1,0]=(0.292060478909)*x[0]+(-0.660005422696)*x[1]
-        arg[3,1,1]=(0.791335231308)*x[0]+(0.466481573591)*x[1]
-        arg[4,0,0]=(-0.361241947236)*x[0]+(-1.43591648587)*x[1]
-        arg[4,0,1]=(-1.10385456695)*x[0]+(-0.325314195825)*x[1]
-        arg[4,1,0]=(1.01004173033)*x[0]+(0.426824552857)*x[1]
-        arg[4,1,1]=(-0.631382479612)*x[0]+(0.0603792190966)*x[1]
-        arg[5,0,0]=(-0.30404368786)*x[0]+(-0.0102498522932)*x[1]
-        arg[5,0,1]=(0.109188848746)*x[0]+(-1.16846160105)*x[1]
-        arg[5,1,0]=(-0.351916879547)*x[0]+(-0.320714795448)*x[1]
-        arg[5,1,1]=(-0.534138562652)*x[0]+(-0.256013589844)*x[1]
-        ref[0,0,0]=(-0.506159375456)/(o+1.)+(-0.522895228783)+(-0.794470828783)*0.5**o
-        ref[0,0,1]=(-0.930984367068)/(o+1.)+(-0.636851258685)+(-0.264167438968)*0.5**o
-        ref[0,1,0]=(-0.674222792172)/(o+1.)+(-0.52131379048)+(0.591143751282)*0.5**o
-        ref[0,1,1]=(0.953370751283)/(o+1.)+(0.377773224645)+(0.743817858326)*0.5**o
-        ref[1,0,0]=(0.700508215428)/(o+1.)+(-0.303343530867)+(-0.964977024471)*0.5**o
-        ref[1,0,1]=(-0.408185116452)/(o+1.)+(0.0668983569743)+(-0.0802023088445)*0.5**o
-        ref[1,1,0]=(0.80742345527)/(o+1.)+(-0.405780705683)+(-0.37807139122)*0.5**o
-        ref[1,1,1]=(0.0184615568095)/(o+1.)+(0.221921562266)+(-0.784919379605)*0.5**o
-        ref[2,0,0]=(0.571906256883)/(o+1.)+(-0.0415588382133)+(0.391709405753)*0.5**o
-        ref[2,0,1]=(-0.778176009451)/(o+1.)+(-0.761680990566)+(-0.311130702752)*0.5**o
-        ref[2,1,0]=(0.498214686321)/(o+1.)+(-0.146173705483)+(0.941590659509)*0.5**o
-        ref[2,1,1]=(-0.273747071818)/(o+1.)+(-0.0319184747153)+(0.902448123776)*0.5**o
-        ref[3,0,0]=(-0.730029471178)/(o+1.)+(-0.288672747933)+(0.865549620109)*0.5**o
-        ref[3,0,1]=(-0.371409186475)/(o+1.)+(0.623169375401)+(0.870512937445)*0.5**o
-        ref[3,1,0]=(0.0611454391867)/(o+1.)+(-0.627723874214)+(0.826357365454)*0.5**o
-        ref[3,1,1]=(0.785553447935)/(o+1.)+(0.246940213405)+(-0.021617069845)*0.5**o
-        ref[4,0,0]=(-0.936201955907)/(o+1.)+(-0.484823720021)+(0.108690962842)*0.5**o
-        ref[4,0,1]=(-0.277830390815)/(o+1.)+(-0.151786547071)+(-0.847765277819)*0.5**o
-        ref[4,1,0]=(0.12293099533)/(o+1.)+(0.295620382054)+(0.722694523749)*0.5**o
-        ref[4,1,1]=(-0.5517019185)/(o+1.)+(0.0850748937088)+(-0.189451129433)*0.5**o
-        ref[5,0,0]=(-0.942533148805)/(o+1.)+(0.425680504872)+(-0.223121401092)*0.5**o
-        ref[5,0,1]=(-0.377134228332)/(o+1.)+(-0.721019409569)+(0.759900295162)*0.5**o
-        ref[5,1,0]=(-0.643828391942)/(o+1.)+(0.399974456311)+(-0.828752195674)*0.5**o
-        ref[5,1,1]=(-0.118293731439)/(o+1.)+(-0.355568544431)+(0.0392786678054)*0.5**o
-      else:
-        arg[0,0,0]=(0.205446621454)*x[0]+(0.10254878667)*x[1]+(1.27673728979)*x[2]
-        arg[0,0,1]=(0.758846313193)*x[0]+(0.63320336713)*x[1]+(-0.42638505807)*x[2]
-        arg[0,1,0]=(-0.0127116561603)*x[0]+(-0.360359420027)*x[1]+(0.540508591493)*x[2]
-        arg[0,1,1]=(-0.278918629538)*x[0]+(-0.0291534835772)*x[1]+(0.708655731565)*x[2]
-        arg[1,0,0]=(-0.612965210483)*x[0]+(0.787787556912)*x[1]+(0.222384448462)*x[2]
-        arg[1,0,1]=(1.07409083742)*x[0]+(1.19429173706)*x[1]+(-0.484979976779)*x[2]
-        arg[1,1,0]=(-1.25714999157)*x[0]+(-0.321346019622)*x[1]+(0.278329320837)*x[2]
-        arg[1,1,1]=(-0.512262689707)*x[0]+(1.6891992053)*x[1]+(-1.02351830068)*x[2]
-        arg[2,0,0]=(-1.57911907773)*x[0]+(0.096124258122)*x[1]+(0.336619253521)*x[2]
-        arg[2,0,1]=(0.0901144254199)*x[0]+(-1.36818186255)*x[1]+(1.2969609239)*x[2]
-        arg[2,1,0]=(0.158329511499)*x[0]+(0.696997185217)*x[1]+(-0.400535235927)*x[2]
-        arg[2,1,1]=(-1.44570853201)*x[0]+(0.237359587195)*x[1]+(-1.17323024801)*x[2]
-        arg[3,0,0]=(-1.4325812824)*x[0]+(-0.733085265902)*x[1]+(0.125883186484)*x[2]
-        arg[3,0,1]=(-0.0529889021435)*x[0]+(0.335154600942)*x[1]+(0.839337375209)*x[2]
-        arg[3,1,0]=(-0.423552182963)*x[0]+(1.31813289315)*x[1]+(0.13235854915)*x[2]
-        arg[3,1,1]=(0.53278572217)*x[0]+(0.159434073071)*x[1]+(-0.313621199136)*x[2]
-        arg[4,0,0]=(0.747779887673)*x[0]+(0.30977483911)*x[1]+(-0.0760295896739)*x[2]
-        arg[4,0,1]=(0.00295118909194)*x[0]+(-0.687914867842)*x[1]+(0.0386268422915)*x[2]
-        arg[4,1,0]=(-0.276363532754)*x[0]+(0.52102466785)*x[1]+(-0.684840191917)*x[2]
-        arg[4,1,1]=(0.0283138898538)*x[0]+(0.116042458294)*x[1]+(0.485578401528)*x[2]
-        arg[5,0,0]=(-0.118402060192)*x[0]+(-1.18409809944)*x[1]+(-0.304048852342)*x[2]
-        arg[5,0,1]=(0.174393790186)*x[0]+(-0.524912689263)*x[1]+(-0.648708392355)*x[2]
-        arg[5,1,0]=(-0.254958756344)*x[0]+(-0.772071348728)*x[1]+(-0.0572494064027)*x[2]
-        arg[5,1,1]=(-0.74777072018)*x[0]+(0.19109939364)*x[1]+(0.498973987814)*x[2]
-        ref[0,0,0]=(0.986457444152)/(o+1.)+(0.258994989412)+(0.0802852749346)*0.5**o
-        ref[0,0,1]=(-0.0286717143415)/(o+1.)+(0.554867138611)+(-0.115397940627)*0.5**o
-        ref[0,1,0]=(-0.886482131138)/(o+1.)+(0.464293129749)+(0.125333386946)*0.5**o
-        ref[0,1,1]=(0.199214164457)/(o+1.)+(0.336882900218)+(-0.472396346443)*0.5**o
-        ref[1,0,0]=(0.36021680954)/(o+1.)+(0.408903924703)+(-0.780817864055)*0.5**o
-        ref[1,0,1]=(0.44795581074)/(o+1.)+(0.472159267742)+(0.391128251477)*0.5**o
-        ref[1,1,0]=(1.02665734893)/(o+1.)+(-0.71418625728)+(-0.898451524719)*0.5**o
-        ref[1,1,1]=(0.0322676607777)/(o+1.)+(0.105378958385)+(-0.0896073626306)*0.5**o
-        ref[2,0,0]=(1.15723247637)/(o+1.)+(-0.719604538702)+(-0.86439896505)*0.5**o
-        ref[2,0,1]=(-0.254100181576)/(o+1.)+(-0.0387997401585)+(0.35059314866)*0.5**o
-        ref[2,1,0]=(-0.636439167982)/(o+1.)+(0.563390681981)+(-0.0355507351918)*0.5**o
-        ref[2,1,1]=(-0.265265225142)/(o+1.)+(-0.635620798949)+(-0.845072369786)*0.5**o
-        ref[3,0,0]=(-0.062162800164)/(o+1.)+(-0.554499928282)+(-0.868620705087)*0.5**o
-        ref[3,0,1]=(0.784681961813)/(o+1.)+(0.355202655131)+(-0.373584198067)*0.5**o
-        ref[3,1,0]=(1.20272043429)/(o+1.)+(0.352677694103)+(-0.881136563162)*0.5**o
-        ref[3,1,1]=(-0.311152797156)/(o+1.)+(0.313736563953)+(0.0622782653549)*0.5**o
-        ref[4,0,0]=(-0.365517620238)/(o+1.)+(0.733502174253)+(-0.119961591158)*0.5**o
-        ref[4,0,1]=(0.0155845896619)/(o+1.)+(-0.654963543839)+(0.648005661558)*0.5**o
-        ref[4,1,0]=(0.405697975915)/(o+1.)+(-0.637805133954)+(0.429733235172)*0.5**o
-        ref[4,1,1]=(-0.0469738326054)/(o+1.)+(0.0590721074184)+(0.558764367445)*0.5**o
-        ref[5,0,0]=(-0.333825007954)/(o+1.)+(-0.46448520882)+(-0.343753586377)*0.5**o
-        ref[5,0,1]=(-0.469125954795)/(o+1.)+(-0.147192309255)+(-0.235716718127)*0.5**o
-        ref[5,1,0]=(-0.573275891777)/(o+1.)+(-0.478328163121)+(0.445652706545)*0.5**o
-        ref[5,1,1]=(0.0545515234726)/(o+1.)+(-0.153919681346)+(0.195590500493)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.226142137728)*x[0]+(0.85681895183)*x[1]
-        arg[0,0,0,1]=(-0.824407181762)*x[0]+(-0.290023144892)*x[1]
-        arg[0,0,1,0]=(-1.25987816017)*x[0]+(0.824340990595)*x[1]
-        arg[0,0,1,1]=(-0.0917811606765)*x[0]+(0.660211932964)*x[1]
-        arg[0,0,2,0]=(-1.31073149178)*x[0]+(0.482324984918)*x[1]
-        arg[0,0,2,1]=(0.256995458227)*x[0]+(0.79244254852)*x[1]
-        arg[0,1,0,0]=(-0.0682147475407)*x[0]+(0.243620052061)*x[1]
-        arg[0,1,0,1]=(0.071099982687)*x[0]+(-0.62986754897)*x[1]
-        arg[0,1,1,0]=(-0.0716793733131)*x[0]+(-1.15235525814)*x[1]
-        arg[0,1,1,1]=(0.193107575216)*x[0]+(-0.596149957543)*x[1]
-        arg[0,1,2,0]=(-0.160142629886)*x[0]+(1.36581707067)*x[1]
-        arg[0,1,2,1]=(-1.21477648376)*x[0]+(-0.732000298369)*x[1]
-        arg[0,2,0,0]=(-1.02468971059)*x[0]+(0.330721595217)*x[1]
-        arg[0,2,0,1]=(1.11414907391)*x[0]+(1.29386127812)*x[1]
-        arg[0,2,1,0]=(1.1485850154)*x[0]+(0.387585977495)*x[1]
-        arg[0,2,1,1]=(0.237382583072)*x[0]+(1.56248221279)*x[1]
-        arg[0,2,2,0]=(-0.949129049229)*x[0]+(0.578823379063)*x[1]
-        arg[0,2,2,1]=(-1.0667182537)*x[0]+(0.462227485959)*x[1]
-        arg[0,3,0,0]=(1.37954377554)*x[0]+(0.541856880139)*x[1]
-        arg[0,3,0,1]=(0.401584700319)*x[0]+(0.577102327147)*x[1]
-        arg[0,3,1,0]=(-0.289796408108)*x[0]+(0.807853785325)*x[1]
-        arg[0,3,1,1]=(0.0038467861822)*x[0]+(-0.931311510771)*x[1]
-        arg[0,3,2,0]=(0.859036254821)*x[0]+(0.198884218516)*x[1]
-        arg[0,3,2,1]=(-0.00310256070968)*x[0]+(0.511838475968)*x[1]
-        arg[0,4,0,0]=(0.539686886802)*x[0]+(-0.324612924267)*x[1]
-        arg[0,4,0,1]=(-0.0458655898565)*x[0]+(0.211810380966)*x[1]
-        arg[0,4,1,0]=(0.302333533003)*x[0]+(0.0663033316831)*x[1]
-        arg[0,4,1,1]=(-0.981519161639)*x[0]+(-0.00207756909914)*x[1]
-        arg[0,4,2,0]=(0.283659447004)*x[0]+(-0.231526592979)*x[1]
-        arg[0,4,2,1]=(-1.17679167875)*x[0]+(0.285698985756)*x[1]
-        arg[1,0,0,0]=(-0.162900059582)*x[0]+(-0.877164340783)*x[1]
-        arg[1,0,0,1]=(-0.50468605065)*x[0]+(-0.160440073709)*x[1]
-        arg[1,0,1,0]=(-0.100901676644)*x[0]+(-0.296111526029)*x[1]
-        arg[1,0,1,1]=(0.176107421869)*x[0]+(1.74393708745)*x[1]
-        arg[1,0,2,0]=(-0.979807721703)*x[0]+(-0.229400841067)*x[1]
-        arg[1,0,2,1]=(0.217472795645)*x[0]+(0.0881503243323)*x[1]
-        arg[1,1,0,0]=(-0.127980123625)*x[0]+(0.0932095456541)*x[1]
-        arg[1,1,0,1]=(0.829674410931)*x[0]+(-0.796196041601)*x[1]
-        arg[1,1,1,0]=(1.28656110233)*x[0]+(-1.27850471392)*x[1]
-        arg[1,1,1,1]=(1.159269884)*x[0]+(-0.973135433631)*x[1]
-        arg[1,1,2,0]=(1.46274837856)*x[0]+(-1.81554270863)*x[1]
-        arg[1,1,2,1]=(0.0973472511688)*x[0]+(0.551451261495)*x[1]
-        arg[1,2,0,0]=(0.510667671293)*x[0]+(-0.51075982099)*x[1]
-        arg[1,2,0,1]=(-1.41612093451)*x[0]+(0.614417669629)*x[1]
-        arg[1,2,1,0]=(1.46595125796)*x[0]+(0.60374279122)*x[1]
-        arg[1,2,1,1]=(-0.317185218187)*x[0]+(-0.0785532882696)*x[1]
-        arg[1,2,2,0]=(-0.388504041993)*x[0]+(-0.838003398775)*x[1]
-        arg[1,2,2,1]=(0.0497207129012)*x[0]+(-0.622155692247)*x[1]
-        arg[1,3,0,0]=(-0.0471400179563)*x[0]+(1.3378948207)*x[1]
-        arg[1,3,0,1]=(-1.22250822195)*x[0]+(0.629714783138)*x[1]
-        arg[1,3,1,0]=(-1.28801080408)*x[0]+(-1.54079710038)*x[1]
-        arg[1,3,1,1]=(-0.426412448469)*x[0]+(-1.09410474021)*x[1]
-        arg[1,3,2,0]=(0.022834167351)*x[0]+(-0.497423389788)*x[1]
-        arg[1,3,2,1]=(-0.787492124301)*x[0]+(-0.245621168419)*x[1]
-        arg[1,4,0,0]=(-1.37814880919)*x[0]+(-0.704805848451)*x[1]
-        arg[1,4,0,1]=(-1.12494770055)*x[0]+(1.44920024305)*x[1]
-        arg[1,4,1,0]=(-0.809532572761)*x[0]+(1.16638587657)*x[1]
-        arg[1,4,1,1]=(0.931784486816)*x[0]+(1.34629889453)*x[1]
-        arg[1,4,2,0]=(-0.172430942793)*x[0]+(-0.584736998321)*x[1]
-        arg[1,4,2,1]=(0.00542948736389)*x[0]+(0.43917597284)*x[1]
-        arg[2,0,0,0]=(-0.946122337406)*x[0]+(-0.161940168137)*x[1]
-        arg[2,0,0,1]=(-0.7856653779)*x[0]+(-0.75287701788)*x[1]
-        arg[2,0,1,0]=(-1.08858367592)*x[0]+(-0.530380818694)*x[1]
-        arg[2,0,1,1]=(-1.0573555095)*x[0]+(-0.854148765785)*x[1]
-        arg[2,0,2,0]=(0.723412825328)*x[0]+(0.326761950437)*x[1]
-        arg[2,0,2,1]=(-0.0143142161225)*x[0]+(-0.752724311876)*x[1]
-        arg[2,1,0,0]=(-0.942548092355)*x[0]+(0.700861094897)*x[1]
-        arg[2,1,0,1]=(-0.712286567957)*x[0]+(0.230406545738)*x[1]
-        arg[2,1,1,0]=(1.27414839774)*x[0]+(0.724784649037)*x[1]
-        arg[2,1,1,1]=(0.637494163002)*x[0]+(0.442489599192)*x[1]
-        arg[2,1,2,0]=(1.81617631726)*x[0]+(1.56870218809)*x[1]
-        arg[2,1,2,1]=(1.16419900666)*x[0]+(-0.044314729141)*x[1]
-        arg[2,2,0,0]=(0.880267125196)*x[0]+(0.77124406259)*x[1]
-        arg[2,2,0,1]=(0.482402867542)*x[0]+(0.0746924305017)*x[1]
-        arg[2,2,1,0]=(0.105861259696)*x[0]+(0.484292207267)*x[1]
-        arg[2,2,1,1]=(-0.107785838196)*x[0]+(0.701132243209)*x[1]
-        arg[2,2,2,0]=(0.559717405844)*x[0]+(-1.5585942717)*x[1]
-        arg[2,2,2,1]=(-0.989130712605)*x[0]+(0.221361137556)*x[1]
-        arg[2,3,0,0]=(-0.045471818095)*x[0]+(-0.437941959792)*x[1]
-        arg[2,3,0,1]=(1.25840468379)*x[0]+(-1.18872011057)*x[1]
-        arg[2,3,1,0]=(1.70665829408)*x[0]+(0.705273921003)*x[1]
-        arg[2,3,1,1]=(-0.0928709253845)*x[0]+(0.785115449756)*x[1]
-        arg[2,3,2,0]=(-0.887243418838)*x[0]+(1.06790660642)*x[1]
-        arg[2,3,2,1]=(-0.572644686872)*x[0]+(-0.672831948394)*x[1]
-        arg[2,4,0,0]=(1.28282566801)*x[0]+(0.651985199447)*x[1]
-        arg[2,4,0,1]=(0.0965663229335)*x[0]+(1.33819998052)*x[1]
-        arg[2,4,1,0]=(0.205569041098)*x[0]+(-0.873095358733)*x[1]
-        arg[2,4,1,1]=(-1.04452025745)*x[0]+(-0.204917033907)*x[1]
-        arg[2,4,2,0]=(-0.181163938972)*x[0]+(0.0341993409272)*x[1]
-        arg[2,4,2,1]=(1.68327027059)*x[0]+(-0.289436355642)*x[1]
-        arg[3,0,0,0]=(1.05712810731)*x[0]+(0.915711819735)*x[1]
-        arg[3,0,0,1]=(-0.171072039482)*x[0]+(-0.160656943623)*x[1]
-        arg[3,0,1,0]=(-1.27063799869)*x[0]+(-0.605131642813)*x[1]
-        arg[3,0,1,1]=(0.940512990835)*x[0]+(-0.116675577531)*x[1]
-        arg[3,0,2,0]=(-0.194213869952)*x[0]+(0.364066752025)*x[1]
-        arg[3,0,2,1]=(-0.328780465397)*x[0]+(-0.114689413673)*x[1]
-        arg[3,1,0,0]=(-0.825914305895)*x[0]+(-0.167010056731)*x[1]
-        arg[3,1,0,1]=(0.657779056207)*x[0]+(0.0666252451638)*x[1]
-        arg[3,1,1,0]=(-0.464004426036)*x[0]+(-0.340932918409)*x[1]
-        arg[3,1,1,1]=(-1.6698652667)*x[0]+(0.731870373141)*x[1]
-        arg[3,1,2,0]=(1.39626250779)*x[0]+(-0.879152855557)*x[1]
-        arg[3,1,2,1]=(1.34973919508)*x[0]+(-0.129753332761)*x[1]
-        arg[3,2,0,0]=(1.03443450706)*x[0]+(0.807333477811)*x[1]
-        arg[3,2,0,1]=(0.366011302596)*x[0]+(0.543804800926)*x[1]
-        arg[3,2,1,0]=(0.262446846036)*x[0]+(-0.247786850991)*x[1]
-        arg[3,2,1,1]=(-1.04657091196)*x[0]+(-0.485443426155)*x[1]
-        arg[3,2,2,0]=(0.342434327538)*x[0]+(-0.148503585588)*x[1]
-        arg[3,2,2,1]=(-0.189833429716)*x[0]+(0.424391874819)*x[1]
-        arg[3,3,0,0]=(-0.118348838118)*x[0]+(0.397628264341)*x[1]
-        arg[3,3,0,1]=(0.481440510084)*x[0]+(-0.393576221424)*x[1]
-        arg[3,3,1,0]=(0.907533552208)*x[0]+(-0.668646549376)*x[1]
-        arg[3,3,1,1]=(-1.49731714213)*x[0]+(-1.18710678264)*x[1]
-        arg[3,3,2,0]=(-0.460660079207)*x[0]+(1.48078266444)*x[1]
-        arg[3,3,2,1]=(-0.161073556988)*x[0]+(-0.486827042754)*x[1]
-        arg[3,4,0,0]=(-0.668755455623)*x[0]+(0.345804059434)*x[1]
-        arg[3,4,0,1]=(1.00528889193)*x[0]+(0.978507928191)*x[1]
-        arg[3,4,1,0]=(0.98955856331)*x[0]+(1.0421852144)*x[1]
-        arg[3,4,1,1]=(0.711688260873)*x[0]+(1.39962222322)*x[1]
-        arg[3,4,2,0]=(1.08512429209)*x[0]+(-0.555249097743)*x[1]
-        arg[3,4,2,1]=(-1.10443784007)*x[0]+(-0.782274429169)*x[1]
-        ref[0,0,0,0]=(0.151153165564)/(o+1.)+(0.112609656739)+(0.254304335059)*0.5**o
-        ref[0,0,0,1]=(-0.530602583511)/(o+1.)+(0.1817855378)+(-0.947398818743)*0.5**o
-        ref[0,0,1,0]=(0.308747437738)/(o+1.)+(-0.0338129255643)+(-0.676658756184)*0.5**o
-        ref[0,0,1,1]=(0.321026553427)/(o+1.)+(0.0692705367618)+(0.108863145337)*0.5**o
-        ref[0,0,2,0]=(-0.0908034666655)/(o+1.)+(-0.1100205155)+(-0.517562009199)*0.5**o
-        ref[0,0,2,1]=(0.303456040903)/(o+1.)+(0.500090875336)+(-0.254199784829)*0.5**o
-        ref[0,1,0,0]=(-0.440641221831)/(o+1.)+(0.456218946873)+(-0.296391367396)*0.5**o
-        ref[0,1,0,1]=(0.222628561762)/(o+1.)+(-0.162064412854)+(-0.457267302337)*0.5**o
-        ref[0,1,1,0]=(-0.913361887408)/(o+1.)+(-0.356168674239)+(0.401664604431)*0.5**o
-        ref[0,1,1,1]=(-0.543116639248)/(o+1.)+(-0.120902439422)+(0.381879135767)*0.5**o
-        ref[0,1,2,0]=(0.993649262831)/(o+1.)+(0.384695858206)+(-0.55736653846)*0.5**o
-        ref[0,1,2,1]=(-0.968077797451)/(o+1.)+(-0.187765942637)+(-0.603167099406)*0.5**o
-        ref[0,2,0,0]=(0.873662019918)/(o+1.)+(-0.710635360033)+(-0.146359415223)*0.5**o
-        ref[0,2,0,1]=(0.466408230693)/(o+1.)+(0.77626565285)+(0.389070815631)*0.5**o
-        ref[0,2,1,0]=(-0.475010813579)/(o+1.)+(0.525435880006)+(0.960310046461)*0.5**o
-        ref[0,2,1,1]=(0.697127520484)/(o+1.)+(0.357204276552)+(0.388328722275)*0.5**o
-        ref[0,2,2,0]=(-0.108434738487)/(o+1.)+(0.356443300466)+(-0.97475753261)*0.5**o
-        ref[0,2,2,1]=(0.952274964304)/(o+1.)+(-0.497379508976)+(-0.562006714089)*0.5**o
-        ref[0,3,0,0]=(-0.0368012761671)/(o+1.)+(0.594000625518)+(0.770200680808)*0.5**o
-        ref[0,3,0,1]=(0.450361861836)/(o+1.)+(0.182031052848)+(0.164263059934)*0.5**o
-        ref[0,3,1,0]=(0.500714741956)/(o+1.)+(0.0479711343168)+(-0.0785996333735)*0.5**o
-        ref[0,3,1,1]=(-0.949280938645)/(o+1.)+(0.452441874504)+(-0.88306753495)*0.5**o
-        ref[0,3,2,0]=(0.186931712837)/(o+1.)+(0.222335175903)+(0.426318408694)*0.5**o
-        ref[0,3,2,1]=(-0.288015428918)/(o+1.)+(0.80948657963)+(-0.822221815085)*0.5**o
-        ref[0,4,0,0]=(0.670151184695)/(o+1.)+(-0.415883847013)+(0.376690471866)*0.5**o
-        ref[0,4,0,1]=(-0.107106843992)/(o+1.)+(0.555375298435)+(-0.837698961768)*0.5**o
-        ref[0,4,1,0]=(-0.299999096802)/(o+1.)+(0.668996782774)+(-0.669357604061)*0.5**o
-        ref[0,4,1,1]=(0.778006183401)/(o+1.)+(-0.614473529032)+(-0.532655856076)*0.5**o
-        ref[0,4,2,0]=(-0.250068389818)/(o+1.)+(0.156274314197)+(-0.0103473845504)*0.5**o
-        ref[0,4,2,1]=(0.902125322216)/(o+1.)+(-0.616424567683)+(-0.560368879846)*0.5**o
-        ref[1,0,0,0]=(-0.133690258295)/(o+1.)+(-0.715949360249)+(0.525524578427)*0.5**o
-        ref[1,0,0,1]=(-0.788097689216)/(o+1.)+(0.0998405659256)+(-0.076709566994)*0.5**o
-        ref[1,0,1,0]=(0.144280886187)/(o+1.)+(0.0775377290314)+(-0.696369546924)*0.5**o
-        ref[1,0,1,1]=(0.824172196605)/(o+1.)+(0.561804029444)+(-0.0277357461773)*0.5**o
-        ref[1,0,2,0]=(0.422564421802)/(o+1.)+(-0.60719307099)+(-0.417386842591)*0.5**o
-        ref[1,0,2,1]=(0.778908672762)/(o+1.)+(0.0163446340765)+(-0.505974820938)*0.5**o
-        ref[1,1,0,0]=(0.0574071047387)/(o+1.)+(-0.350514214742)+(0.608850746775)*0.5**o
-        ref[1,1,0,1]=(-0.991660961792)/(o+1.)+(0.322084279455)+(0.380970772212)*0.5**o
-        ref[1,1,1,0]=(-0.823761120268)/(o+1.)+(-0.0495419092898)+(0.930901327253)*0.5**o
-        ref[1,1,1,1]=(-0.384729980569)/(o+1.)+(-0.0392583789163)+(0.649381188769)*0.5**o
-        ref[1,1,2,0]=(-0.840365304069)/(o+1.)+(-0.0150512662777)+(0.517673506558)*0.5**o
-        ref[1,1,2,1]=(0.555976660846)/(o+1.)+(-0.307265886898)+(0.707353625614)*0.5**o
-        ref[1,2,0,0]=(-0.423056705491)/(o+1.)+(0.0559404393793)+(0.311083677036)*0.5**o
-        ref[1,2,0,1]=(0.15409797664)/(o+1.)+(-0.0906637067519)+(-0.774473828018)*0.5**o
-        ref[1,2,1,0]=(0.796718644088)/(o+1.)+(0.248012077098)+(0.776951250898)*0.5**o
-        ref[1,2,1,1]=(-0.342830889263)/(o+1.)+(-0.282162737841)+(0.511417858487)*0.5**o
-        ref[1,2,2,0]=(-0.722403016671)/(o+1.)+(-0.367059457954)+(0.230014491812)*0.5**o
-        ref[1,2,2,1]=(-0.773685058881)/(o+1.)+(0.412807900451)+(-0.624365721366)*0.5**o
-        ref[1,3,0,0]=(0.527481434758)/(o+1.)+(0.36602961117)+(0.031214145649)*0.5**o
-        ref[1,3,0,1]=(0.0630927531585)/(o+1.)+(-0.164989701995)+(-0.325906787975)*0.5**o
-        ref[1,3,1,0]=(-0.612390590593)/(o+1.)+(-0.78855996274)+(-0.63929738839)*0.5**o
-        ref[1,3,1,1]=(-0.962656044265)/(o+1.)+(-0.00576535037253)+(-0.546330443673)*0.5**o
-        ref[1,3,2,0]=(-0.947280922008)/(o+1.)+(-0.137449579996)+(0.747590859563)*0.5**o
-        ref[1,3,2,1]=(-0.946623026202)/(o+1.)+(0.0787536550213)+(-0.24399757656)*0.5**o
-        ref[1,4,0,0]=(-0.174471016943)/(o+1.)+(-0.636500556039)+(-0.635482528623)*0.5**o
-        ref[1,4,0,1]=(0.806379391595)/(o+1.)+(-0.00304106577093)+(-0.476044717545)*0.5**o
-        ref[1,4,1,0]=(0.729649125134)/(o+1.)+(0.0151477051616)+(-0.403091231646)*0.5**o
-        ref[1,4,1,1]=(0.559976454745)/(o+1.)+(0.479295896421)+(0.75951513376)*0.5**o
-        ref[1,4,2,0]=(0.272199270818)/(o+1.)+(-0.0929072274332)+(-0.843552757065)*0.5**o
-        ref[1,4,2,1]=(-0.552663678377)/(o+1.)+(0.613784745778)+(-0.230300352975)*0.5**o
-        ref[2,0,0,0]=(-0.174247908098)/(o+1.)+(-0.108873783282)+(-0.716067030882)*0.5**o
-        ref[2,0,0,1]=(-0.300584841532)/(o+1.)+(-0.485363665493)+(-0.267230223262)*0.5**o
-        ref[2,0,1,0]=(0.316261805154)/(o+1.)+(-0.523474106451)+(-0.888278086869)*0.5**o
-        ref[2,0,1,1]=(-0.699622562861)/(o+1.)+(-0.151089538248)+(-0.909702635929)*0.5**o
-        ref[2,0,2,0]=(0.728545639829)/(o+1.)+(0.192083148877)+(-0.0625371618174)*0.5**o
-        ref[2,0,2,1]=(-0.22042267239)/(o+1.)+(-0.611974599324)+(0.677333343041)*0.5**o
-        ref[2,1,0,0]=(-0.0734883811113)/(o+1.)+(0.36100831022)+(-0.890215236787)*0.5**o
-        ref[2,1,0,1]=(0.121656829057)/(o+1.)+(-0.130801635799)+(-0.341933579678)*0.5**o
-        ref[2,1,1,0]=(0.221353168629)/(o+1.)+(0.618635673483)+(0.540308531179)*0.5**o
-        ref[2,1,1,1]=(0.0152580531273)/(o+1.)+(0.252173415542)+(0.560378877984)*0.5**o
-        ref[2,1,2,0]=(0.580319777731)/(o+1.)+(0.90566612137)+(0.993226484879)*0.5**o
-        ref[2,1,2,1]=(-0.710250320949)/(o+1.)+(0.742177021871)+(0.345780554724)*0.5**o
-        ref[2,2,0,0]=(0.770701563507)/(o+1.)+(0.240823471881)+(0.399162680517)*0.5**o
-        ref[2,2,0,1]=(0.76121761761)/(o+1.)+(0.128382656738)+(-0.460887633042)*0.5**o
-        ref[2,2,1,0]=(-0.269854962057)/(o+1.)+(0.690854898294)+(-0.521701367567)*0.5**o
-        ref[2,2,1,1]=(0.719518595712)/(o+1.)+(0.029596430244)+(-0.185365051187)*0.5**o
-        ref[2,2,2,0]=(-0.671157761165)/(o+1.)+(-0.142688285012)+(-0.0423425346644)*0.5**o
-        ref[2,2,2,1]=(-0.541156097112)/(o+1.)+(0.0765180918929)+(-0.379649661722)*0.5**o
-        ref[2,3,0,0]=(-0.0604347109212)/(o+1.)+(-0.19403702073)+(-0.034905025507)*0.5**o
-        ref[2,3,0,1]=(-0.793398507071)/(o+1.)+(0.255681280626)+(0.351720519037)*0.5**o
-        ref[2,3,1,0]=(-0.267058413731)/(o+1.)+(0.852211426049)+(0.974567776717)*0.5**o
-        ref[2,3,1,1]=(0.228396641207)/(o+1.)+(0.322922896735)+(-0.181997910305)*0.5**o
-        ref[2,3,2,0]=(0.480987773937)/(o+1.)+(-0.197709028569)+(0.0950934707835)*0.5**o
-        ref[2,3,2,1]=(-0.648934475027)/(o+1.)+(-0.418383297875)+(0.240224435511)*0.5**o
-        ref[2,4,0,0]=(0.430020261528)/(o+1.)+(0.53421018733)+(0.436370231269)*0.5**o
-        ref[2,4,0,1]=(0.906390660223)/(o+1.)+(-0.056057545856)+(0.640490734948)*0.5**o
-        ref[2,4,1,0]=(-0.732099770943)/(o+1.)+(-0.0485027617732)+(0.161578976854)*0.5**o
-        ref[2,4,1,1]=(-0.827495680848)/(o+1.)+(0.285044728936)+(-0.992031068384)*0.5**o
-        ref[2,4,2,0]=(-0.919905471787)/(o+1.)+(0.656971386264)+(-0.541001898785)*0.5**o
-        ref[2,4,2,1]=(0.161975875302)/(o+1.)+(0.272665206557)+(0.686527626533)*0.5**o
-        ref[3,0,0,0]=(0.584120963259)/(o+1.)+(0.207930729804)+(0.972857504177)*0.5**o
-        ref[3,0,0,1]=(0.315823141491)/(o+1.)+(-0.217561208386)+(-0.212429707823)*0.5**o
-        ref[3,0,1,0]=(-0.732294996139)/(o+1.)+(-0.278653143596)+(-0.586168358175)*0.5**o
-        ref[3,0,1,1]=(0.481321847225)/(o+1.)+(-0.070080648792)+(0.482676863662)*0.5**o
-        ref[3,0,2,0]=(0.616679859076)/(o+1.)+(-0.418784546677)+(0.390742116352)*0.5**o
-        ref[3,0,2,1]=(0.866778417448)/(o+1.)+(-0.686585656643)+(0.0629230167692)*0.5**o
-        ref[3,1,0,0]=(0.531890054167)/(o+1.)+(-0.516187607633)+(-0.492439201527)*0.5**o
-        ref[3,1,0,1]=(-0.512361639413)/(o+1.)+(0.499557182545)+(0.237651575694)*0.5**o
-        ref[3,1,1,0]=(-0.67542965405)/(o+1.)+(0.274414249559)+(-0.678336189514)*0.5**o
-        ref[3,1,1,1]=(0.371936242507)/(o+1.)+(-0.1636482466)+(-0.982634642862)*0.5**o
-        ref[3,1,2,0]=(-0.799408831501)/(o+1.)+(0.458633399549)+(0.399251684639)*0.5**o
-        ref[3,1,2,1]=(-0.0145253903686)/(o+1.)+(0.238472345905)+(0.757566560882)*0.5**o
-        ref[3,2,0,0]=(-0.130519473112)/(o+1.)+(0.695277604837)+(0.581732248306)*0.5**o
-        ref[3,2,0,1]=(0.632010536438)/(o+1.)+(0.123066205529)+(0.0316731560259)*0.5**o
-        ref[3,2,1,0]=(-0.709926210356)/(o+1.)+(0.0926699972302)+(0.53924621094)*0.5**o
-        ref[3,2,1,1]=(0.428094002247)/(o+1.)+(-0.841997926131)+(-0.276112488096)*0.5**o
-        ref[3,2,2,0]=(0.708481148086)/(o+1.)+(-0.50498161534)+(0.495412824545)*0.5**o
-        ref[3,2,2,1]=(0.782824622703)/(o+1.)+(-0.151509698687)+(-0.245246780227)*0.5**o
-        ref[3,3,0,0]=(0.848460868418)/(o+1.)+(-0.104639248461)+(-0.359902945273)*0.5**o
-        ref[3,3,0,1]=(0.0569151307298)/(o+1.)+(-0.0674224535469)+(0.165794065024)*0.5**o
-        ref[3,3,1,0]=(-0.165683739908)/(o+1.)+(-0.183388699236)+(0.771348141212)*0.5**o
-        ref[3,3,1,1]=(-0.932550058069)/(o+1.)+(-0.47828109001)+(-0.795311686688)*0.5**o
-        ref[3,3,2,0]=(0.821542940923)/(o+1.)+(0.166853194487)+(-0.13512674466)*0.5**o
-        ref[3,3,2,1]=(-0.46375871628)/(o+1.)+(0.132701267732)+(-0.449544418926)*0.5**o
-        ref[3,4,0,0]=(-0.074530542168)/(o+1.)+(-0.0567877963797)+(-0.134845261261)*0.5**o
-        ref[3,4,0,1]=(0.238671520479)/(o+1.)+(0.50689253572)+(0.731340228204)*0.5**o
-        ref[3,4,1,0]=(0.981601513335)/(o+1.)+(0.400717209822)+(0.248707844726)*0.5**o
-        ref[3,4,1,1]=(0.592304390107)/(o+1.)+(0.342408637328)+(0.834188819333)*0.5**o
-        ref[3,4,2,0]=(-0.339991330909)/(o+1.)+(-0.0145922376156)+(0.899051000485)*0.5**o
-        ref[3,4,2,1]=(-0.626610688164)/(o+1.)+(-0.417008165115)+(-0.426085250846)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.697666818785)*x[0]+(1.00202295791)*x[1]+(0.617700157184)*x[2]
-        arg[0,0,0,1]=(-0.465577819457)*x[0]+(-1.40054693355)*x[1]+(1.16912653295)*x[2]
-        arg[0,0,1,0]=(-1.26696500634)*x[0]+(-0.0469756169975)*x[1]+(-0.445591738991)*x[2]
-        arg[0,0,1,1]=(-1.61654321709)*x[0]+(-1.69522962467)*x[1]+(-1.06089094851)*x[2]
-        arg[0,0,2,0]=(0.229468378506)*x[0]+(0.716813596991)*x[1]+(-0.237703937029)*x[2]
-        arg[0,0,2,1]=(-1.12052051905)*x[0]+(0.835000004618)*x[1]+(-0.853004812404)*x[2]
-        arg[0,1,0,0]=(-1.75500745705)*x[0]+(0.655055836882)*x[1]+(1.05207750735)*x[2]
-        arg[0,1,0,1]=(-0.0746024824253)*x[0]+(-0.421596816958)*x[1]+(-0.375715855989)*x[2]
-        arg[0,1,1,0]=(-0.963269684396)*x[0]+(0.431993248836)*x[1]+(-1.63061928649)*x[2]
-        arg[0,1,1,1]=(-0.418757265018)*x[0]+(-0.665626168583)*x[1]+(-0.335734432507)*x[2]
-        arg[0,1,2,0]=(0.980346404307)*x[0]+(1.45442049802)*x[1]+(-0.833420308612)*x[2]
-        arg[0,1,2,1]=(-1.52536017847)*x[0]+(0.99484028681)*x[1]+(0.109754321663)*x[2]
-        arg[0,2,0,0]=(1.697179262)*x[0]+(-0.928732802147)*x[1]+(-0.653379513626)*x[2]
-        arg[0,2,0,1]=(0.682698902948)*x[0]+(0.829307959583)*x[1]+(-1.0300112276)*x[2]
-        arg[0,2,1,0]=(0.026084323266)*x[0]+(1.28865784608)*x[1]+(0.830446580645)*x[2]
-        arg[0,2,1,1]=(0.486291506032)*x[0]+(-0.519637742913)*x[1]+(0.81671330629)*x[2]
-        arg[0,2,2,0]=(-0.761591624634)*x[0]+(0.370951131011)*x[1]+(-0.256748479312)*x[2]
-        arg[0,2,2,1]=(-0.249974326513)*x[0]+(0.267323484635)*x[1]+(-1.09642130905)*x[2]
-        arg[0,3,0,0]=(0.752057563255)*x[0]+(-1.2772262175)*x[1]+(-0.264569668983)*x[2]
-        arg[0,3,0,1]=(-0.173167796447)*x[0]+(0.31873208356)*x[1]+(-0.599780701112)*x[2]
-        arg[0,3,1,0]=(-0.912464014941)*x[0]+(-1.56452517166)*x[1]+(1.37651660499)*x[2]
-        arg[0,3,1,1]=(0.302009667854)*x[0]+(0.524213064769)*x[1]+(0.316301522683)*x[2]
-        arg[0,3,2,0]=(-1.2940154673)*x[0]+(-0.900061396992)*x[1]+(0.3860029847)*x[2]
-        arg[0,3,2,1]=(-0.97354131341)*x[0]+(1.08221883964)*x[1]+(-0.739323076416)*x[2]
-        arg[0,4,0,0]=(1.86535317192)*x[0]+(-0.478359589546)*x[1]+(-0.798014592302)*x[2]
-        arg[0,4,0,1]=(-1.08518693851)*x[0]+(-0.186048654536)*x[1]+(1.04915573267)*x[2]
-        arg[0,4,1,0]=(-1.09692811055)*x[0]+(1.01042920935)*x[1]+(-0.73978089555)*x[2]
-        arg[0,4,1,1]=(0.654656964663)*x[0]+(0.279204596126)*x[1]+(0.886217781361)*x[2]
-        arg[0,4,2,0]=(-0.54009886291)*x[0]+(0.378037248739)*x[1]+(1.09785568886)*x[2]
-        arg[0,4,2,1]=(-1.43995958913)*x[0]+(-0.720157090994)*x[1]+(0.0676362028136)*x[2]
-        arg[1,0,0,0]=(1.47735412608)*x[0]+(0.342355546228)*x[1]+(-0.0134502415508)*x[2]
-        arg[1,0,0,1]=(-0.419536590369)*x[0]+(-1.61108470511)*x[1]+(1.51281979355)*x[2]
-        arg[1,0,1,0]=(1.31765698245)*x[0]+(-0.7499566294)*x[1]+(0.934537503478)*x[2]
-        arg[1,0,1,1]=(0.688467914883)*x[0]+(-1.32681280673)*x[1]+(-0.387405705058)*x[2]
-        arg[1,0,2,0]=(1.37069587556)*x[0]+(0.540830111773)*x[1]+(0.477311068263)*x[2]
-        arg[1,0,2,1]=(-0.572066213761)*x[0]+(-1.11950925494)*x[1]+(1.07939217872)*x[2]
-        arg[1,1,0,0]=(0.564997105326)*x[0]+(-0.73130546389)*x[1]+(0.435910937304)*x[2]
-        arg[1,1,0,1]=(0.513931739674)*x[0]+(-0.944043404826)*x[1]+(0.014114227468)*x[2]
-        arg[1,1,1,0]=(-0.77850597256)*x[0]+(-0.445835136484)*x[1]+(0.157478357479)*x[2]
-        arg[1,1,1,1]=(0.752431176866)*x[0]+(0.659759664199)*x[1]+(-0.859515433521)*x[2]
-        arg[1,1,2,0]=(0.0693158730911)*x[0]+(-0.820997827204)*x[1]+(-0.714694436829)*x[2]
-        arg[1,1,2,1]=(0.604674152847)*x[0]+(0.647261183132)*x[1]+(-1.21981352028)*x[2]
-        arg[1,2,0,0]=(0.0997504695984)*x[0]+(-0.271549839083)*x[1]+(-0.573467835942)*x[2]
-        arg[1,2,0,1]=(0.01861845581)*x[0]+(0.157410502406)*x[1]+(0.939257868776)*x[2]
-        arg[1,2,1,0]=(1.44909894631)*x[0]+(0.116038517547)*x[1]+(-0.851940489233)*x[2]
-        arg[1,2,1,1]=(1.34598841007)*x[0]+(1.79163125841)*x[1]+(0.719171044245)*x[2]
-        arg[1,2,2,0]=(-0.214737791448)*x[0]+(-1.85810839095)*x[1]+(-0.240776599927)*x[2]
-        arg[1,2,2,1]=(-0.574707645928)*x[0]+(-0.664173831956)*x[1]+(0.310262106696)*x[2]
-        arg[1,3,0,0]=(0.296213453592)*x[0]+(-0.831112482555)*x[1]+(0.130075739128)*x[2]
-        arg[1,3,0,1]=(-0.369510604457)*x[0]+(0.0373909697998)*x[1]+(1.6689129783)*x[2]
-        arg[1,3,1,0]=(0.0922435881419)*x[0]+(-0.280519827004)*x[1]+(0.285933839232)*x[2]
-        arg[1,3,1,1]=(-0.649253282272)*x[0]+(-0.460065044123)*x[1]+(-0.0711164948063)*x[2]
-        arg[1,3,2,0]=(0.793313307581)*x[0]+(-0.0587956351149)*x[1]+(0.810487259739)*x[2]
-        arg[1,3,2,1]=(-1.38668597055)*x[0]+(1.51396934198)*x[1]+(-1.13918550255)*x[2]
-        arg[1,4,0,0]=(1.40078167737)*x[0]+(-1.61915436345)*x[1]+(0.421710091214)*x[2]
-        arg[1,4,0,1]=(-1.37982015877)*x[0]+(1.30607371738)*x[1]+(-0.608888848419)*x[2]
-        arg[1,4,1,0]=(-0.558087802805)*x[0]+(-0.214169499512)*x[1]+(-0.766242546503)*x[2]
-        arg[1,4,1,1]=(-1.75503436584)*x[0]+(0.183604705451)*x[1]+(-0.148071484576)*x[2]
-        arg[1,4,2,0]=(0.537942069142)*x[0]+(-0.00640749928252)*x[1]+(-0.277544629657)*x[2]
-        arg[1,4,2,1]=(-0.652645833371)*x[0]+(-1.33439077026)*x[1]+(-0.226308197201)*x[2]
-        arg[2,0,0,0]=(1.45646289279)*x[0]+(1.40842127675)*x[1]+(1.75078281495)*x[2]
-        arg[2,0,0,1]=(0.867988651995)*x[0]+(1.35061812241)*x[1]+(-1.56520776323)*x[2]
-        arg[2,0,1,0]=(0.549686523522)*x[0]+(-0.528085465813)*x[1]+(-0.994978820267)*x[2]
-        arg[2,0,1,1]=(0.383595996552)*x[0]+(0.612989859087)*x[1]+(-0.560401247231)*x[2]
-        arg[2,0,2,0]=(-0.341259919499)*x[0]+(-0.125491675042)*x[1]+(0.545572340757)*x[2]
-        arg[2,0,2,1]=(-0.414269395434)*x[0]+(-0.433969881898)*x[1]+(-1.01820199328)*x[2]
-        arg[2,1,0,0]=(-0.113575280389)*x[0]+(0.326916039942)*x[1]+(-0.576072890249)*x[2]
-        arg[2,1,0,1]=(-0.296473969661)*x[0]+(0.195675099431)*x[1]+(-1.72378150831)*x[2]
-        arg[2,1,1,0]=(-1.31575932758)*x[0]+(-0.122557423522)*x[1]+(0.53435027695)*x[2]
-        arg[2,1,1,1]=(0.299435754608)*x[0]+(0.727140413706)*x[1]+(0.848931358475)*x[2]
-        arg[2,1,2,0]=(0.2618965198)*x[0]+(-0.461672573339)*x[1]+(0.923592803172)*x[2]
-        arg[2,1,2,1]=(-0.326817258523)*x[0]+(-0.0363300805442)*x[1]+(1.82049875918)*x[2]
-        arg[2,2,0,0]=(-0.435113320888)*x[0]+(0.0257984353786)*x[1]+(0.287846577657)*x[2]
-        arg[2,2,0,1]=(1.39178068279)*x[0]+(0.136781967539)*x[1]+(-1.38161590351)*x[2]
-        arg[2,2,1,0]=(-0.887874199356)*x[0]+(-0.476769153654)*x[1]+(-0.618760485829)*x[2]
-        arg[2,2,1,1]=(1.58883355098)*x[0]+(-0.889469047555)*x[1]+(-0.678486755843)*x[2]
-        arg[2,2,2,0]=(0.237147029365)*x[0]+(-0.509883462401)*x[1]+(0.533163151551)*x[2]
-        arg[2,2,2,1]=(0.66513913749)*x[0]+(1.30317030657)*x[1]+(0.804083365617)*x[2]
-        arg[2,3,0,0]=(1.01531518403)*x[0]+(1.3753053143)*x[1]+(0.000877284235964)*x[2]
-        arg[2,3,0,1]=(-0.40853642543)*x[0]+(0.154794268783)*x[1]+(-1.34306671117)*x[2]
-        arg[2,3,1,0]=(0.43065284359)*x[0]+(-0.28965146009)*x[1]+(0.660248828789)*x[2]
-        arg[2,3,1,1]=(-1.4334922681)*x[0]+(-0.0348802858609)*x[1]+(0.502051304974)*x[2]
-        arg[2,3,2,0]=(-1.17399537487)*x[0]+(0.865787043946)*x[1]+(-0.0105949677478)*x[2]
-        arg[2,3,2,1]=(0.63104158794)*x[0]+(0.436196079951)*x[1]+(0.498606623061)*x[2]
-        arg[2,4,0,0]=(-1.44410177354)*x[0]+(0.513406326011)*x[1]+(0.699127199447)*x[2]
-        arg[2,4,0,1]=(-0.981727023077)*x[0]+(0.484182120695)*x[1]+(0.667175832045)*x[2]
-        arg[2,4,1,0]=(-1.3352602588)*x[0]+(0.626269023364)*x[1]+(0.813537646695)*x[2]
-        arg[2,4,1,1]=(-0.932486930114)*x[0]+(0.299448807849)*x[1]+(0.195862014797)*x[2]
-        arg[2,4,2,0]=(-0.0621489644806)*x[0]+(0.131979664158)*x[1]+(0.442029269778)*x[2]
-        arg[2,4,2,1]=(-0.507508608633)*x[0]+(-1.28613226533)*x[1]+(-0.697920444023)*x[2]
-        arg[3,0,0,0]=(-0.984942677585)*x[0]+(-1.58913299616)*x[1]+(-0.373026784822)*x[2]
-        arg[3,0,0,1]=(0.616666427113)*x[0]+(-0.625162800471)*x[1]+(-0.796307290839)*x[2]
-        arg[3,0,1,0]=(-0.48469203683)*x[0]+(-0.0572105166553)*x[1]+(0.809572383581)*x[2]
-        arg[3,0,1,1]=(-0.487160309892)*x[0]+(0.77646454341)*x[1]+(-0.41947544573)*x[2]
-        arg[3,0,2,0]=(-1.17902121554)*x[0]+(-0.244939532033)*x[1]+(-0.282994359476)*x[2]
-        arg[3,0,2,1]=(0.33515909881)*x[0]+(0.146866561705)*x[1]+(1.81486098364)*x[2]
-        arg[3,1,0,0]=(0.379977901341)*x[0]+(0.834531701517)*x[1]+(-0.0242027062166)*x[2]
-        arg[3,1,0,1]=(0.184318292766)*x[0]+(1.08367911805)*x[1]+(-0.164531741594)*x[2]
-        arg[3,1,1,0]=(-1.00967115996)*x[0]+(0.542699640149)*x[1]+(0.707616701259)*x[2]
-        arg[3,1,1,1]=(0.856948233811)*x[0]+(-1.2186550297)*x[1]+(-0.034268798159)*x[2]
-        arg[3,1,2,0]=(0.259470684477)*x[0]+(-1.03586983732)*x[1]+(-0.157275979341)*x[2]
-        arg[3,1,2,1]=(-0.161954890658)*x[0]+(1.65853209885)*x[1]+(0.381113456719)*x[2]
-        arg[3,2,0,0]=(-0.437413004681)*x[0]+(-0.730340273929)*x[1]+(-0.687689272494)*x[2]
-        arg[3,2,0,1]=(-0.336618164118)*x[0]+(-1.24388666895)*x[1]+(-0.2198689254)*x[2]
-        arg[3,2,1,0]=(0.0872793087887)*x[0]+(-0.336554573215)*x[1]+(-0.0597803523262)*x[2]
-        arg[3,2,1,1]=(0.192805432018)*x[0]+(0.0540495582064)*x[1]+(0.846658042071)*x[2]
-        arg[3,2,2,0]=(0.00794192604414)*x[0]+(-0.33504559053)*x[1]+(0.615701149787)*x[2]
-        arg[3,2,2,1]=(0.210870961503)*x[0]+(1.14164095846)*x[1]+(-0.192785742791)*x[2]
-        arg[3,3,0,0]=(-0.25895162041)*x[0]+(-0.225800436488)*x[1]+(-0.198007079838)*x[2]
-        arg[3,3,0,1]=(-0.150363703231)*x[0]+(1.23870429535)*x[1]+(0.28635881247)*x[2]
-        arg[3,3,1,0]=(-0.865980718216)*x[0]+(-0.0849853244335)*x[1]+(-0.292164217189)*x[2]
-        arg[3,3,1,1]=(-0.350465968722)*x[0]+(0.09853736936)*x[1]+(-0.476711524665)*x[2]
-        arg[3,3,2,0]=(0.311396300263)*x[0]+(-0.92437612034)*x[1]+(-0.757139962928)*x[2]
-        arg[3,3,2,1]=(-0.912311919837)*x[0]+(0.267793631099)*x[1]+(0.4917345401)*x[2]
-        arg[3,4,0,0]=(0.613662541753)*x[0]+(0.782757341361)*x[1]+(1.04209808158)*x[2]
-        arg[3,4,0,1]=(0.492828613997)*x[0]+(1.11979095664)*x[1]+(-0.843545072354)*x[2]
-        arg[3,4,1,0]=(-0.51939120556)*x[0]+(0.476004484286)*x[1]+(-0.516311785432)*x[2]
-        arg[3,4,1,1]=(1.00423313567)*x[0]+(0.90776890388)*x[1]+(1.34423309497)*x[2]
-        arg[3,4,2,0]=(-1.44069600826)*x[0]+(-1.39515290909)*x[1]+(1.19851590247)*x[2]
-        arg[3,4,2,1]=(0.391851619877)*x[0]+(0.265529120553)*x[1]+(0.996610410913)*x[2]
-        ref[0,0,0,0]=(1.19330263935)/(o+1.)+(0.55394275251)+(0.0162017895041)*0.5**o
-        ref[0,0,0,1]=(-0.672351783684)/(o+1.)+(-0.187889622039)+(0.351132807711)*0.5**o
-        ref[0,0,1,0]=(-1.27021996264)/(o+1.)+(0.236286530101)+(-0.961885459894)*0.5**o
-        ref[0,0,1,1]=(-1.43442517107)/(o+1.)+(-1.00113374859)+(-0.935971122022)*0.5**o
-        ref[0,0,2,0]=(-0.434813695127)/(o+1.)+(0.606673209583)+(-0.0699546855712)*0.5**o
-        ref[0,0,2,1]=(-0.0434901247948)/(o+1.)+(-0.180911877983)+(-0.733211446073)*0.5**o
-        ref[0,1,0,0]=(1.41514302182)/(o+1.)+(-0.247977413325)+(-0.967062307989)*0.5**o
-        ref[0,1,0,1]=(0.69128100142)/(o+1.)+(-0.621609882923)+(-0.319976390946)*0.5**o
-        ref[0,1,1,0]=(-0.881870429191)/(o+1.)+(-0.654075774082)+(0.0281262553057)*0.5**o
-        ref[0,1,1,1]=(-1.27239116086)/(o+1.)+(-0.0854066429492)+(0.0230865806541)*0.5**o
-        ref[0,1,2,0]=(-0.222663945351)/(o+1.)+(0.685312598747)+(0.453385341573)*0.5**o
-        ref[0,1,2,1]=(0.101409038706)/(o+1.)+(0.151367946744)+(-0.824910502191)*0.5**o
-        ref[0,2,0,0]=(-1.19509443892)/(o+1.)+(0.225437856866)+(0.85928567141)*0.5**o
-        ref[0,2,0,1]=(0.285764347754)/(o+1.)+(-0.383432127133)+(0.963095541446)*0.5**o
-        ref[0,2,1,0]=(0.728010227911)/(o+1.)+(0.983790919896)+(-0.550403317717)*0.5**o
-        ref[0,2,1,1]=(0.563748259036)/(o+1.)+(0.165164845927)+(-0.110710881481)*0.5**o
-        ref[0,2,2,0]=(-0.361502606429)/(o+1.)+(0.0276145482611)+(-0.341115463028)*0.5**o
-        ref[0,2,2,1]=(-0.293320207933)/(o+1.)+(0.0336757304385)+(-0.853103403872)*0.5**o
-        ref[0,3,0,0]=(-0.410233956527)/(o+1.)+(-0.474281126245)+(0.569057885785)*0.5**o
-        ref[0,3,0,1]=(-0.835861970115)/(o+1.)+(0.0173715483175)+(0.346902459481)*0.5**o
-        ref[0,3,1,0]=(0.0830466456187)/(o+1.)+(-0.288204681495)+(-0.607109864241)*0.5**o
-        ref[0,3,1,1]=(1.07074130823)/(o+1.)+(-0.0437983012867)+(0.159379549652)*0.5**o
-        ref[0,3,2,0]=(0.172301049609)/(o+1.)+(-0.491724874152)+(-0.996925180895)*0.5**o
-        ref[0,3,2,1]=(-0.24891941221)/(o+1.)+(-0.03935856269)+(-0.3030090126)*0.5**o
-        ref[0,4,0,0]=(-0.778575122429)/(o+1.)+(0.213085222078)+(0.941383668349)*0.5**o
-        ref[0,4,0,1]=(0.880801627174)/(o+1.)+(-0.454451723401)+(-0.193978040747)*0.5**o
-        ref[0,4,1,0]=(-0.835604724882)/(o+1.)+(0.127240834083)+(-0.245156740036)*0.5**o
-        ref[0,4,1,1]=(1.62336716324)/(o+1.)+(-0.101085918464)+(0.398884015839)*0.5**o
-        ref[0,4,2,0]=(1.16805827702)/(o+1.)+(0.211232591688)+(-0.654729385702)*0.5**o
-        ref[0,4,2,1]=(-0.305424138957)/(o+1.)+(-0.431076572693)+(-0.924903192969)*0.5**o
-        ref[1,0,0,0]=(-0.481596247529)/(o+1.)+(0.769902632559)+(0.748050413171)*0.5**o
-        ref[1,0,0,1]=(0.177388661252)/(o+1.)+(-0.118766442613)+(-0.457657277952)*0.5**o
-        ref[1,0,1,0]=(0.709890860372)/(o+1.)+(0.0668010230727)+(0.658744950012)*0.5**o
-        ref[1,0,1,1]=(-1.45685781381)/(o+1.)+(-0.178674426089)+(0.788456069079)*0.5**o
-        ref[1,0,2,0]=(0.194388185612)/(o+1.)+(0.649177543063)+(0.896093783855)*0.5**o
-        ref[1,0,2,1]=(0.181561279507)/(o+1.)+(-0.200618291902)+(-0.392507985678)*0.5**o
-        ref[1,1,0,0]=(-0.884376814027)/(o+1.)+(0.280382736159)+(0.593213920451)*0.5**o
-        ref[1,1,0,1]=(-0.250709602218)/(o+1.)+(-0.492104211211)+(0.818920586956)*0.5**o
-        ref[1,1,1,0]=(0.0529723694625)/(o+1.)+(-0.502047650638)+(-0.115739819752)*0.5**o
-        ref[1,1,1,1]=(0.215812202957)/(o+1.)+(-0.308796450292)+(0.954456105171)*0.5**o
-        ref[1,1,2,0]=(-0.991481050902)/(o+1.)+(0.162626252838)+(-0.800147845717)*0.5**o
-        ref[1,1,2,1]=(-0.433989756951)/(o+1.)+(0.362776336712)+(-0.259441100777)*0.5**o
-        ref[1,2,0,0]=(-0.930287052624)/(o+1.)+(-0.347752763108)+(0.880525373413)*0.5**o
-        ref[1,2,0,1]=(0.698674852861)/(o+1.)+(-0.15119613196)+(0.719004238051)*0.5**o
-        ref[1,2,1,0]=(-0.777216821365)/(o+1.)+(0.436336076297)+(0.617741643399)*0.5**o
-        ref[1,2,1,1]=(1.09595223135)/(o+1.)+(0.978251130983)+(0.804336219412)*0.5**o
-        ref[1,2,2,0]=(-0.651012630849)/(o+1.)+(-1.04894606664)+(0.43528198181)*0.5**o
-        ref[1,2,2,1]=(-1.5227353883)/(o+1.)+(0.670019307557)+(-0.745922598001)*0.5**o
-        ref[1,3,0,0]=(-0.750195637997)/(o+1.)+(0.231864245348)+(-0.118356142533)*0.5**o
-        ref[1,3,0,1]=(1.17136226596)/(o+1.)+(-0.114976421389)+(0.395383920468)*0.5**o
-        ref[1,3,1,0]=(-0.108070636769)/(o+1.)+(0.279145429234)+(-0.352562621327)*0.5**o
-        ref[1,3,1,1]=(-0.144223481714)/(o+1.)+(-0.472954352493)+(-0.0903026345013)*0.5**o
-        ref[1,3,2,0]=(-0.487564307786)/(o+1.)+(0.636973351449)+(0.758622537094)*0.5**o
-        ref[1,3,2,1]=(0.390860965954)/(o+1.)+(-0.36647678165)+(-0.66980953377)*0.5**o
-        ref[1,4,0,0]=(-1.04824984837)/(o+1.)+(0.213932231728)+(0.823722790054)*0.5**o
-        ref[1,4,0,1]=(-0.0984653601336)/(o+1.)+(0.07867877705)+(-0.741527483773)*0.5**o
-        ref[1,4,1,0]=(-0.146287867383)/(o+1.)+(-0.908951868158)+(0.425691754878)*0.5**o
-        ref[1,4,1,1]=(-0.94160416554)/(o+1.)+(0.0459877010016)+(-0.869872381431)*0.5**o
-        ref[1,4,2,0]=(0.0115742858952)/(o+1.)+(-0.222488399041)+(0.687392452389)*0.5**o
-        ref[1,4,2,1]=(-0.956561936575)/(o+1.)+(-0.59770879042)+(-0.0613652834159)*0.5**o
-        ref[2,0,0,0]=(1.83987381729)/(o+1.)+(0.956579317963)+(0.862634531274)*0.5**o
-        ref[2,0,0,1]=(0.105446127421)/(o+1.)+(0.180661881191)+(0.186629121375)*0.5**o
-        ref[2,0,1,0]=(0.0212167440766)/(o+1.)+(-0.337825588888)+(-0.318943328859)*0.5**o
-        ref[2,0,1,1]=(0.744834715631)/(o+1.)+(-0.350058416663)+(0.391466726104)*0.5**o
-        ref[2,0,2,0]=(-0.788776613856)/(o+1.)+(0.233776806014)+(0.400043748043)*0.5**o
-        ref[2,0,2,1]=(-0.95346976307)/(o+1.)+(0.0274998652324)+(-0.967971238003)*0.5**o
-        ref[2,1,0,0]=(-0.536051408942)/(o+1.)+(-0.208498016994)+(0.590315312233)*0.5**o
-        ref[2,1,0,1]=(-1.04158508788)/(o+1.)+(-0.397885793101)+(0.0127762955396)*0.5**o
-        ref[2,1,1,0]=(0.529914207253)/(o+1.)+(-0.547503443987)+(-0.338873793431)*0.5**o
-        ref[2,1,1,1]=(0.62298670274)/(o+1.)+(0.449860048786)+(0.352800726478)*0.5**o
-        ref[2,1,2,0]=(0.965292650595)/(o+1.)+(0.00980498639)+(-0.261085873742)*0.5**o
-        ref[2,1,2,1]=(0.403285360803)/(o+1.)+(0.369160592269)+(0.315744874774)*0.5**o
-        ref[2,2,0,0]=(-0.457764884724)/(o+1.)+(0.563657776706)+(-0.791018976541)*0.5**o
-        ref[2,2,0,1]=(0.188151274044)/(o+1.)+(-0.476470545911)+(0.911736564588)*0.5**o
-        ref[2,2,1,0]=(-0.558515085739)/(o+1.)+(-0.445583796553)+(-0.533721159994)*0.5**o
-        ref[2,2,1,1]=(-0.431992337265)/(o+1.)+(-0.0957726221961)+(0.64441532924)*0.5**o
-        ref[2,2,2,0]=(-0.159056461947)/(o+1.)+(-0.0326864536156)+(0.484856087693)*0.5**o
-        ref[2,2,2,1]=(0.533116456037)/(o+1.)+(1.10197257725)+(0.0353311991352)*0.5**o
-        ref[2,3,0,0]=(0.0570625147023)/(o+1.)+(0.74170779854)+(0.851019670777)*0.5**o
-        ref[2,3,0,1]=(-0.495059904832)/(o+1.)+(-0.169954912181)+(-0.761839138623)*0.5**o
-        ref[2,3,1,0]=(0.482375173314)/(o+1.)+(-0.19374838651)+(0.706371811996)*0.5**o
-        ref[2,3,1,1]=(0.12928100721)/(o+1.)+(-0.317327862062)+(-0.460946532077)*0.5**o
-        ref[2,3,2,0]=(-0.234362084763)/(o+1.)+(0.423486279181)+(-0.93141377227)*0.5**o
-        ref[2,3,2,1]=(1.25586693002)/(o+1.)+(-0.127551329993)+(0.56508002092)*0.5**o
-        ref[2,4,0,0]=(0.45235297749)/(o+1.)+(-0.0217537364788)+(-0.640413752615)*0.5**o
-        ref[2,4,0,1]=(0.936809207384)/(o+1.)+(-0.151519610695)+(-0.464139056331)*0.5**o
-        ref[2,4,1,0]=(0.867693208863)/(o+1.)+(0.105683574314)+(-0.974513946233)*0.5**o
-        ref[2,4,1,1]=(-1.27821575101)/(o+1.)+(0.463163847311)+(-0.0852880510814)*0.5**o
-        ref[2,4,2,0]=(-0.846224501366)/(o+1.)+(0.432619461409)+(0.492845548002)*0.5**o
-        ref[2,4,2,1]=(-1.48923229995)/(o+1.)+(-0.505747396375)+(0.00916577472118)*0.5**o
-        ref[3,0,0,0]=(-0.959215731121)/(o+1.)+(-0.904609108587)+(-0.178668510268)*0.5**o
-        ref[3,0,0,1]=(-1.53181231865)/(o+1.)+(-0.0758543610408)+(0.878717376536)*0.5**o
-        ref[3,0,1,0]=(1.18643238831)/(o+1.)+(-0.288825159097)+(-0.341112240015)*0.5**o
-        ref[3,0,1,1]=(-0.0675694917031)/(o+1.)+(-0.168955703616)+(0.275309686724)*0.5**o
-        ref[3,0,2,0]=(-0.663269860133)/(o+1.)+(-0.235102421885)+(-0.573480403148)*0.5**o
-        ref[3,0,2,1]=(1.0969289778)/(o+1.)+(0.46603172821)+(0.267894209932)*0.5**o
-        ref[3,1,0,0]=(-0.716870513559)/(o+1.)+(0.712039409283)+(0.483098591635)*0.5**o
-        ref[3,1,0,1]=(0.0328531999411)/(o+1.)+(0.379319450988)+(0.311973567308)*0.5**o
-        ref[3,1,1,0]=(1.08648208064)/(o+1.)+(-0.196831959338)+(-0.452172980519)*0.5**o
-        ref[3,1,1,1]=(0.0813181502612)/(o+1.)+(-0.227364064527)+(-0.0225656152548)*0.5**o
-        ref[3,1,2,0]=(-0.271000454408)/(o+1.)+(-0.765711687155)+(0.868748696531)*0.5**o
-        ref[3,1,2,1]=(1.60569646253)/(o+1.)+(0.137437739736)+(-0.00288127709197)*0.5**o
-        ref[3,2,0,0]=(-1.25887089059)/(o+1.)+(-0.525842290945)+(0.455112921376)*0.5**o
-        ref[3,2,0,1]=(-1.63787880725)/(o+1.)+(0.00214706725405)+(-0.166789085722)*0.5**o
-        ref[3,2,1,0]=(-1.82111307894)/(o+1.)+(0.561806270366)+(0.388444921454)*0.5**o
-        ref[3,2,1,1]=(-0.489259906414)/(o+1.)+(0.582548398381)+(0.417676141947)*0.5**o
-        ref[3,2,2,0]=(-0.0674375340391)/(o+1.)+(-0.00345549227349)+(0.362946003887)*0.5**o
-        ref[3,2,2,1]=(0.662780682001)/(o+1.)+(-0.15453848218)+(0.806022459534)*0.5**o
-        ref[3,3,0,0]=(-1.15795406515)/(o+1.)+(0.0926725746467)+(0.289849779118)*0.5**o
-        ref[3,3,0,1]=(1.27520269547)/(o+1.)+(-0.286529818361)+(0.672556345847)*0.5**o
-        ref[3,3,1,0]=(-0.343290651469)/(o+1.)+(-0.0269962100904)+(-0.845847188189)*0.5**o
-        ref[3,3,1,1]=(0.497715053371)/(o+1.)+(-0.158577177766)+(-0.909200821866)*0.5**o
-        ref[3,3,2,0]=(-0.952431538662)/(o+1.)+(0.0816482063045)+(-0.580984656952)*0.5**o
-        ref[3,3,2,1]=(-0.176227469799)/(o+1.)+(0.0456157853688)+(-0.0677878495767)*0.5**o
-        ref[3,4,0,0]=(0.976460483802)/(o+1.)+(0.347595506011)+(0.766866468871)*0.5**o
-        ref[3,4,0,1]=(0.0358170327662)/(o+1.)+(-0.0991456259778)+(0.931548717473)*0.5**o
-        ref[3,4,1,0]=(0.114544318514)/(o+1.)+(-0.201014865792)+(-0.272213093635)*0.5**o
-        ref[3,4,1,1]=(0.554509925385)/(o+1.)+(1.23219332557)+(0.237338557994)*0.5**o
-        ref[3,4,2,0]=(0.0803465444931)/(o+1.)+(-0.518257569997)+(-0.681164419371)*0.5**o
-        ref[3,4,2,1]=(-0.0443609570522)/(o+1.)+(0.572813368096)+(0.552725372202)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      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.570707549273)*x[0]+(-0.726264032186)*x[1]
-        ref=(-0.0423765208873)/(o+1.)+(-0.791542656673)+(0.328490252775)*0.5**o
-      else:
-        arg=(1.28222892931)*x[0]+(-0.798170675576)*x[1]+(1.5701208405)*x[2]
-        ref=(0.721975372868)/(o+1.)+(0.344720905832)+(0.642761909705)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      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.575166906798)*x[0]+(-1.63698773418)*x[1]
-        arg[1]=(-0.0535946584636)*x[0]+(0.105969101775)*x[1]
-        ref[0]=(-0.751926426344)/(o+1.)+(-0.395800138888)+(0.481705876734)*0.5**o
-        ref[1]=(0.698496252242)/(o+1.)+(-0.265927161866)+(-0.114267485199)*0.5**o
-      else:
-        arg[0]=(-0.17879254138)*x[0]+(-1.12752123792)*x[1]+(0.921297311605)*x[2]
-        arg[1]=(1.33131824618)*x[0]+(-0.392175059176)*x[1]+(0.545754281465)*x[2]
-        ref[0]=(-0.494870303061)/(o+1.)+(0.0697636237654)+(-0.0296734121631)*0.5**o
-        ref[1]=(-0.394300983704)/(o+1.)+(0.722261312754)+(0.434675826665)*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.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.338658191734)*x[0]+(1.46127609683)*x[1]
-        arg[0,1]=(-0.629116867491)*x[0]+(1.40141569066)*x[1]
-        arg[0,2]=(0.105569779347)*x[0]+(0.239936324967)*x[1]
-        arg[0,3]=(-0.281718331718)*x[0]+(0.280323404866)*x[1]
-        arg[0,4]=(0.467341113661)*x[0]+(-0.50452062075)*x[1]
-        arg[1,0]=(-0.841295219186)*x[0]+(0.524038163723)*x[1]
-        arg[1,1]=(1.40143704236)*x[0]+(-1.50467961637)*x[1]
-        arg[1,2]=(1.21078790505)*x[0]+(-0.731453470292)*x[1]
-        arg[1,3]=(0.469556922076)*x[0]+(0.0686293204391)*x[1]
-        arg[1,4]=(-1.26394637585)*x[0]+(-0.0361395276585)*x[1]
-        arg[2,0]=(-1.12850883148)*x[0]+(0.284296673326)*x[1]
-        arg[2,1]=(-0.626362828813)*x[0]+(1.19459827573)*x[1]
-        arg[2,2]=(-0.545457293083)*x[0]+(1.547337019)*x[1]
-        arg[2,3]=(0.664461986629)*x[0]+(-1.69082198266)*x[1]
-        arg[2,4]=(-0.100004763305)*x[0]+(0.152159044423)*x[1]
-        arg[3,0]=(0.307574843061)*x[0]+(1.20209181301)*x[1]
-        arg[3,1]=(-0.0663203356627)*x[0]+(-1.26669863527)*x[1]
-        arg[3,2]=(-1.20436798894)*x[0]+(-0.0375693379661)*x[1]
-        arg[3,3]=(0.753649087747)*x[0]+(0.69376223486)*x[1]
-        arg[3,4]=(-0.0512732264834)*x[0]+(-0.658097606436)*x[1]
-        ref[0,0]=(0.996821439952)/(o+1.)+(0.015088160779)+(0.0956201435879)*0.5**o
-        ref[0,1]=(0.643092963726)/(o+1.)+(0.239390724844)+(-0.349575590244)*0.5**o
-        ref[0,2]=(-0.198468008977)/(o+1.)+(0.00411201743342)+(0.535750078425)*0.5**o
-        ref[0,3]=(0.642491201137)/(o+1.)+(-0.623413199652)+(0.602940271315)*0.5**o
-        ref[0,4]=(-0.105706120549)/(o+1.)+(-0.353560054939)+(0.775646723338)*0.5**o
-        ref[1,0]=(0.144540669221)/(o+1.)+(0.0228268215803)+(-0.507451367845)*0.5**o
-        ref[1,1]=(-0.820379339897)/(o+1.)+(0.0951825678509)+(0.526771630185)*0.5**o
-        ref[1,2]=(-0.21214585824)/(o+1.)+(-0.0889183062985)+(0.869316905591)*0.5**o
-        ref[1,3]=(0.291228940674)/(o+1.)+(0.192623928703)+(-0.138290555565)*0.5**o
-        ref[1,4]=(-0.0663718956434)/(o+1.)+(-0.309484335614)+(-0.614745336642)*0.5**o
-        ref[2,0]=(0.484892962201)/(o+1.)+(-0.367129859793)+(-0.594845400763)*0.5**o
-        ref[2,1]=(0.768457634672)/(o+1.)+(0.154447657562)+(-0.509117502876)*0.5**o
-        ref[2,2]=(0.707320338363)/(o+1.)+(-0.0592149232183)+(0.412989233992)*0.5**o
-        ref[2,3]=(-0.983684339171)/(o+1.)+(-0.495377645598)+(0.948079634337)*0.5**o
-        ref[2,4]=(-0.0315947220465)/(o+1.)+(0.506833986759)+(-0.929918970353)*0.5**o
-        ref[3,0]=(0.54141067098)/(o+1.)+(0.489049131493)+(-0.00984227789859)*0.5**o
-        ref[3,1]=(-0.552335053051)/(o+1.)+(-0.383325638803)+(-0.0140326402734)*0.5**o
-        ref[3,2]=(0.0821472412575)/(o+1.)+(-0.335827719718)+(-0.652429128733)*0.5**o
-        ref[3,3]=(0.112917208924)/(o+1.)+(0.667772807338)+(-0.00105150099312)*0.5**o
-        ref[3,4]=(-0.19331508157)/(o+1.)+(-0.102296385708)+(-0.311462979932)*0.5**o
-      else:
-        arg[0,0]=(0.069245963142)*x[0]+(-0.185727379494)*x[1]+(-0.887410889699)*x[2]
-        arg[0,1]=(-0.816745668949)*x[0]+(-0.250435680662)*x[1]+(0.701607830582)*x[2]
-        arg[0,2]=(-0.862433954308)*x[0]+(0.731874372527)*x[1]+(-0.115384982779)*x[2]
-        arg[0,3]=(-0.265247631604)*x[0]+(-0.157059741958)*x[1]+(-0.368419335078)*x[2]
-        arg[0,4]=(1.66720203567)*x[0]+(-0.759393708719)*x[1]+(1.36360850704)*x[2]
-        arg[1,0]=(-0.192822813795)*x[0]+(0.0358776152527)*x[1]+(-0.722864520788)*x[2]
-        arg[1,1]=(-0.480606215471)*x[0]+(1.13682774573)*x[1]+(0.17900467623)*x[2]
-        arg[1,2]=(0.346760852584)*x[0]+(0.994833030281)*x[1]+(0.507055933913)*x[2]
-        arg[1,3]=(-0.509961853478)*x[0]+(-0.852997575505)*x[1]+(0.586527030253)*x[2]
-        arg[1,4]=(0.93957975846)*x[0]+(0.28878335152)*x[1]+(0.128070931738)*x[2]
-        arg[2,0]=(0.338283306313)*x[0]+(0.0244500761608)*x[1]+(-0.606875554888)*x[2]
-        arg[2,1]=(0.850782624552)*x[0]+(-0.836382038189)*x[1]+(-1.41808459947)*x[2]
-        arg[2,2]=(-1.06176229613)*x[0]+(-0.259247046061)*x[1]+(-0.583455484089)*x[2]
-        arg[2,3]=(1.17437923282)*x[0]+(1.31485601495)*x[1]+(1.3139743231)*x[2]
-        arg[2,4]=(0.362851636275)*x[0]+(0.804049783156)*x[1]+(1.09205000214)*x[2]
-        arg[3,0]=(0.343603837195)*x[0]+(-1.49082257981)*x[1]+(-0.628668674545)*x[2]
-        arg[3,1]=(-0.676847711765)*x[0]+(1.32350560453)*x[1]+(1.07275185686)*x[2]
-        arg[3,2]=(0.570784985469)*x[0]+(-1.01212360602)*x[1]+(-0.0808776667606)*x[2]
-        arg[3,3]=(0.506392444236)*x[0]+(-1.00848318041)*x[1]+(0.558777901541)*x[2]
-        arg[3,4]=(-0.60925738291)*x[0]+(-0.386755957809)*x[1]+(0.60930115434)*x[2]
-        ref[0,0]=(-0.695230136419)/(o+1.)+(-0.388400729083)+(0.468139288533)*0.5**o
-        ref[0,1]=(0.462098132187)/(o+1.)+(-0.215041893287)+(-0.397587864642)*0.5**o
-        ref[0,2]=(-0.262411385363)/(o+1.)+(0.275729226874)+(-0.534991632946)*0.5**o
-        ref[0,3]=(0.117822633378)/(o+1.)+(0.0286827897592)+(-0.965914921536)*0.5**o
-        ref[0,4]=(0.293575681039)/(o+1.)+(0.584039692827)+(0.809761767299)*0.5**o
-        ref[1,0]=(0.627951922463)/(o+1.)+(-0.994889162557)+(0.482016683321)*0.5**o
-        ref[1,1]=(1.83482238662)/(o+1.)+(-0.205719558739)+(-0.588157062647)*0.5**o
-        ref[1,2]=(1.13612020398)/(o+1.)+(0.0262824938134)+(0.659964625174)*0.5**o
-        ref[1,3]=(0.325264487741)/(o+1.)+(-0.0752154813413)+(-0.951265923787)*0.5**o
-        ref[1,4]=(-0.149919283302)/(o+1.)+(0.77701502585)+(-0.0476767266789)*0.5**o
-        ref[2,0]=(0.491504686171)/(o+1.)+(-0.562534706926)+(0.389422555265)*0.5**o
-        ref[2,1]=(-1.52704217417)/(o+1.)+(0.120525042098)+(-0.117691923134)*0.5**o
-        ref[2,2]=(-0.779796772543)/(o+1.)+(-0.318864997267)+(-0.486938059201)*0.5**o
-        ref[2,3]=(1.53343318682)/(o+1.)+(0.731149467308)+(0.807477449443)*0.5**o
-        ref[2,4]=(1.15919207694)/(o+1.)+(0.113921448815)+(0.871916446996)*0.5**o
-        ref[3,0]=(-1.75312920944)/(o+1.)+(-0.153798982308)+(0.284839756895)*0.5**o
-        ref[3,1]=(1.30985814569)/(o+1.)+(0.438430874237)+(-0.467310144534)*0.5**o
-        ref[3,2]=(-0.737480320972)/(o+1.)+(0.0604403094397)+(0.094383414777)*0.5**o
-        ref[3,3]=(-0.688723266524)/(o+1.)+(0.43486027018)+(-0.124310108473)*0.5**o
-        ref[3,4]=(0.128399262674)/(o+1.)+(-0.372445844122)+(0.229780239192)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.993339371954)*x[0]+(-1.35308128985)*x[1]
-        arg[0,0,1]=(-1.07886149134)*x[0]+(-1.38999283206)*x[1]
-        arg[0,1,0]=(0.246468026972)*x[0]+(-1.37217464882)*x[1]
-        arg[0,1,1]=(0.645672648599)*x[0]+(1.8070624103)*x[1]
-        arg[1,0,0]=(-1.02278989388)*x[0]+(0.151634023103)*x[1]
-        arg[1,0,1]=(-0.667332860541)*x[0]+(0.312742149193)*x[1]
-        arg[1,1,0]=(-0.848647385832)*x[0]+(0.466438038516)*x[1]
-        arg[1,1,1]=(-0.185495911372)*x[0]+(-0.137118786891)*x[1]
-        arg[2,0,0]=(-0.0250555870731)*x[0]+(0.905553573283)*x[1]
-        arg[2,0,1]=(-1.03940852939)*x[0]+(-1.57326016394)*x[1]
-        arg[2,1,0]=(1.48834718811)*x[0]+(-0.340889253246)*x[1]
-        arg[2,1,1]=(0.875721514739)*x[0]+(-0.310857412212)*x[1]
-        arg[3,0,0]=(1.25129508831)*x[0]+(-1.69312043525)*x[1]
-        arg[3,0,1]=(1.50124675312)*x[0]+(0.244195748654)*x[1]
-        arg[3,1,0]=(0.292060478909)*x[0]+(-0.660005422696)*x[1]
-        arg[3,1,1]=(0.791335231308)*x[0]+(0.466481573591)*x[1]
-        arg[4,0,0]=(-0.361241947236)*x[0]+(-1.43591648587)*x[1]
-        arg[4,0,1]=(-1.10385456695)*x[0]+(-0.325314195825)*x[1]
-        arg[4,1,0]=(1.01004173033)*x[0]+(0.426824552857)*x[1]
-        arg[4,1,1]=(-0.631382479612)*x[0]+(0.0603792190966)*x[1]
-        arg[5,0,0]=(-0.30404368786)*x[0]+(-0.0102498522932)*x[1]
-        arg[5,0,1]=(0.109188848746)*x[0]+(-1.16846160105)*x[1]
-        arg[5,1,0]=(-0.351916879547)*x[0]+(-0.320714795448)*x[1]
-        arg[5,1,1]=(-0.534138562652)*x[0]+(-0.256013589844)*x[1]
-        ref[0,0,0]=(-0.506159375456)/(o+1.)+(-0.522895228783)+(-0.794470828783)*0.5**o
-        ref[0,0,1]=(-0.930984367068)/(o+1.)+(-0.636851258685)+(-0.264167438968)*0.5**o
-        ref[0,1,0]=(-0.674222792172)/(o+1.)+(-0.52131379048)+(0.591143751282)*0.5**o
-        ref[0,1,1]=(0.953370751283)/(o+1.)+(0.377773224645)+(0.743817858326)*0.5**o
-        ref[1,0,0]=(0.700508215428)/(o+1.)+(-0.303343530867)+(-0.964977024471)*0.5**o
-        ref[1,0,1]=(-0.408185116452)/(o+1.)+(0.0668983569743)+(-0.0802023088445)*0.5**o
-        ref[1,1,0]=(0.80742345527)/(o+1.)+(-0.405780705683)+(-0.37807139122)*0.5**o
-        ref[1,1,1]=(0.0184615568095)/(o+1.)+(0.221921562266)+(-0.784919379605)*0.5**o
-        ref[2,0,0]=(0.571906256883)/(o+1.)+(-0.0415588382133)+(0.391709405753)*0.5**o
-        ref[2,0,1]=(-0.778176009451)/(o+1.)+(-0.761680990566)+(-0.311130702752)*0.5**o
-        ref[2,1,0]=(0.498214686321)/(o+1.)+(-0.146173705483)+(0.941590659509)*0.5**o
-        ref[2,1,1]=(-0.273747071818)/(o+1.)+(-0.0319184747153)+(0.902448123776)*0.5**o
-        ref[3,0,0]=(-0.730029471178)/(o+1.)+(-0.288672747933)+(0.865549620109)*0.5**o
-        ref[3,0,1]=(-0.371409186475)/(o+1.)+(0.623169375401)+(0.870512937445)*0.5**o
-        ref[3,1,0]=(0.0611454391867)/(o+1.)+(-0.627723874214)+(0.826357365454)*0.5**o
-        ref[3,1,1]=(0.785553447935)/(o+1.)+(0.246940213405)+(-0.021617069845)*0.5**o
-        ref[4,0,0]=(-0.936201955907)/(o+1.)+(-0.484823720021)+(0.108690962842)*0.5**o
-        ref[4,0,1]=(-0.277830390815)/(o+1.)+(-0.151786547071)+(-0.847765277819)*0.5**o
-        ref[4,1,0]=(0.12293099533)/(o+1.)+(0.295620382054)+(0.722694523749)*0.5**o
-        ref[4,1,1]=(-0.5517019185)/(o+1.)+(0.0850748937088)+(-0.189451129433)*0.5**o
-        ref[5,0,0]=(-0.942533148805)/(o+1.)+(0.425680504872)+(-0.223121401092)*0.5**o
-        ref[5,0,1]=(-0.377134228332)/(o+1.)+(-0.721019409569)+(0.759900295162)*0.5**o
-        ref[5,1,0]=(-0.643828391942)/(o+1.)+(0.399974456311)+(-0.828752195674)*0.5**o
-        ref[5,1,1]=(-0.118293731439)/(o+1.)+(-0.355568544431)+(0.0392786678054)*0.5**o
-      else:
-        arg[0,0,0]=(0.205446621454)*x[0]+(0.10254878667)*x[1]+(1.27673728979)*x[2]
-        arg[0,0,1]=(0.758846313193)*x[0]+(0.63320336713)*x[1]+(-0.42638505807)*x[2]
-        arg[0,1,0]=(-0.0127116561603)*x[0]+(-0.360359420027)*x[1]+(0.540508591493)*x[2]
-        arg[0,1,1]=(-0.278918629538)*x[0]+(-0.0291534835772)*x[1]+(0.708655731565)*x[2]
-        arg[1,0,0]=(-0.612965210483)*x[0]+(0.787787556912)*x[1]+(0.222384448462)*x[2]
-        arg[1,0,1]=(1.07409083742)*x[0]+(1.19429173706)*x[1]+(-0.484979976779)*x[2]
-        arg[1,1,0]=(-1.25714999157)*x[0]+(-0.321346019622)*x[1]+(0.278329320837)*x[2]
-        arg[1,1,1]=(-0.512262689707)*x[0]+(1.6891992053)*x[1]+(-1.02351830068)*x[2]
-        arg[2,0,0]=(-1.57911907773)*x[0]+(0.096124258122)*x[1]+(0.336619253521)*x[2]
-        arg[2,0,1]=(0.0901144254199)*x[0]+(-1.36818186255)*x[1]+(1.2969609239)*x[2]
-        arg[2,1,0]=(0.158329511499)*x[0]+(0.696997185217)*x[1]+(-0.400535235927)*x[2]
-        arg[2,1,1]=(-1.44570853201)*x[0]+(0.237359587195)*x[1]+(-1.17323024801)*x[2]
-        arg[3,0,0]=(-1.4325812824)*x[0]+(-0.733085265902)*x[1]+(0.125883186484)*x[2]
-        arg[3,0,1]=(-0.0529889021435)*x[0]+(0.335154600942)*x[1]+(0.839337375209)*x[2]
-        arg[3,1,0]=(-0.423552182963)*x[0]+(1.31813289315)*x[1]+(0.13235854915)*x[2]
-        arg[3,1,1]=(0.53278572217)*x[0]+(0.159434073071)*x[1]+(-0.313621199136)*x[2]
-        arg[4,0,0]=(0.747779887673)*x[0]+(0.30977483911)*x[1]+(-0.0760295896739)*x[2]
-        arg[4,0,1]=(0.00295118909194)*x[0]+(-0.687914867842)*x[1]+(0.0386268422915)*x[2]
-        arg[4,1,0]=(-0.276363532754)*x[0]+(0.52102466785)*x[1]+(-0.684840191917)*x[2]
-        arg[4,1,1]=(0.0283138898538)*x[0]+(0.116042458294)*x[1]+(0.485578401528)*x[2]
-        arg[5,0,0]=(-0.118402060192)*x[0]+(-1.18409809944)*x[1]+(-0.304048852342)*x[2]
-        arg[5,0,1]=(0.174393790186)*x[0]+(-0.524912689263)*x[1]+(-0.648708392355)*x[2]
-        arg[5,1,0]=(-0.254958756344)*x[0]+(-0.772071348728)*x[1]+(-0.0572494064027)*x[2]
-        arg[5,1,1]=(-0.74777072018)*x[0]+(0.19109939364)*x[1]+(0.498973987814)*x[2]
-        ref[0,0,0]=(0.986457444152)/(o+1.)+(0.258994989412)+(0.0802852749346)*0.5**o
-        ref[0,0,1]=(-0.0286717143415)/(o+1.)+(0.554867138611)+(-0.115397940627)*0.5**o
-        ref[0,1,0]=(-0.886482131138)/(o+1.)+(0.464293129749)+(0.125333386946)*0.5**o
-        ref[0,1,1]=(0.199214164457)/(o+1.)+(0.336882900218)+(-0.472396346443)*0.5**o
-        ref[1,0,0]=(0.36021680954)/(o+1.)+(0.408903924703)+(-0.780817864055)*0.5**o
-        ref[1,0,1]=(0.44795581074)/(o+1.)+(0.472159267742)+(0.391128251477)*0.5**o
-        ref[1,1,0]=(1.02665734893)/(o+1.)+(-0.71418625728)+(-0.898451524719)*0.5**o
-        ref[1,1,1]=(0.0322676607777)/(o+1.)+(0.105378958385)+(-0.0896073626306)*0.5**o
-        ref[2,0,0]=(1.15723247637)/(o+1.)+(-0.719604538702)+(-0.86439896505)*0.5**o
-        ref[2,0,1]=(-0.254100181576)/(o+1.)+(-0.0387997401585)+(0.35059314866)*0.5**o
-        ref[2,1,0]=(-0.636439167982)/(o+1.)+(0.563390681981)+(-0.0355507351918)*0.5**o
-        ref[2,1,1]=(-0.265265225142)/(o+1.)+(-0.635620798949)+(-0.845072369786)*0.5**o
-        ref[3,0,0]=(-0.062162800164)/(o+1.)+(-0.554499928282)+(-0.868620705087)*0.5**o
-        ref[3,0,1]=(0.784681961813)/(o+1.)+(0.355202655131)+(-0.373584198067)*0.5**o
-        ref[3,1,0]=(1.20272043429)/(o+1.)+(0.352677694103)+(-0.881136563162)*0.5**o
-        ref[3,1,1]=(-0.311152797156)/(o+1.)+(0.313736563953)+(0.0622782653549)*0.5**o
-        ref[4,0,0]=(-0.365517620238)/(o+1.)+(0.733502174253)+(-0.119961591158)*0.5**o
-        ref[4,0,1]=(0.0155845896619)/(o+1.)+(-0.654963543839)+(0.648005661558)*0.5**o
-        ref[4,1,0]=(0.405697975915)/(o+1.)+(-0.637805133954)+(0.429733235172)*0.5**o
-        ref[4,1,1]=(-0.0469738326054)/(o+1.)+(0.0590721074184)+(0.558764367445)*0.5**o
-        ref[5,0,0]=(-0.333825007954)/(o+1.)+(-0.46448520882)+(-0.343753586377)*0.5**o
-        ref[5,0,1]=(-0.469125954795)/(o+1.)+(-0.147192309255)+(-0.235716718127)*0.5**o
-        ref[5,1,0]=(-0.573275891777)/(o+1.)+(-0.478328163121)+(0.445652706545)*0.5**o
-        ref[5,1,1]=(0.0545515234726)/(o+1.)+(-0.153919681346)+(0.195590500493)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.226142137728)*x[0]+(0.85681895183)*x[1]
-        arg[0,0,0,1]=(-0.824407181762)*x[0]+(-0.290023144892)*x[1]
-        arg[0,0,1,0]=(-1.25987816017)*x[0]+(0.824340990595)*x[1]
-        arg[0,0,1,1]=(-0.0917811606765)*x[0]+(0.660211932964)*x[1]
-        arg[0,0,2,0]=(-1.31073149178)*x[0]+(0.482324984918)*x[1]
-        arg[0,0,2,1]=(0.256995458227)*x[0]+(0.79244254852)*x[1]
-        arg[0,1,0,0]=(-0.0682147475407)*x[0]+(0.243620052061)*x[1]
-        arg[0,1,0,1]=(0.071099982687)*x[0]+(-0.62986754897)*x[1]
-        arg[0,1,1,0]=(-0.0716793733131)*x[0]+(-1.15235525814)*x[1]
-        arg[0,1,1,1]=(0.193107575216)*x[0]+(-0.596149957543)*x[1]
-        arg[0,1,2,0]=(-0.160142629886)*x[0]+(1.36581707067)*x[1]
-        arg[0,1,2,1]=(-1.21477648376)*x[0]+(-0.732000298369)*x[1]
-        arg[0,2,0,0]=(-1.02468971059)*x[0]+(0.330721595217)*x[1]
-        arg[0,2,0,1]=(1.11414907391)*x[0]+(1.29386127812)*x[1]
-        arg[0,2,1,0]=(1.1485850154)*x[0]+(0.387585977495)*x[1]
-        arg[0,2,1,1]=(0.237382583072)*x[0]+(1.56248221279)*x[1]
-        arg[0,2,2,0]=(-0.949129049229)*x[0]+(0.578823379063)*x[1]
-        arg[0,2,2,1]=(-1.0667182537)*x[0]+(0.462227485959)*x[1]
-        arg[0,3,0,0]=(1.37954377554)*x[0]+(0.541856880139)*x[1]
-        arg[0,3,0,1]=(0.401584700319)*x[0]+(0.577102327147)*x[1]
-        arg[0,3,1,0]=(-0.289796408108)*x[0]+(0.807853785325)*x[1]
-        arg[0,3,1,1]=(0.0038467861822)*x[0]+(-0.931311510771)*x[1]
-        arg[0,3,2,0]=(0.859036254821)*x[0]+(0.198884218516)*x[1]
-        arg[0,3,2,1]=(-0.00310256070968)*x[0]+(0.511838475968)*x[1]
-        arg[0,4,0,0]=(0.539686886802)*x[0]+(-0.324612924267)*x[1]
-        arg[0,4,0,1]=(-0.0458655898565)*x[0]+(0.211810380966)*x[1]
-        arg[0,4,1,0]=(0.302333533003)*x[0]+(0.0663033316831)*x[1]
-        arg[0,4,1,1]=(-0.981519161639)*x[0]+(-0.00207756909914)*x[1]
-        arg[0,4,2,0]=(0.283659447004)*x[0]+(-0.231526592979)*x[1]
-        arg[0,4,2,1]=(-1.17679167875)*x[0]+(0.285698985756)*x[1]
-        arg[1,0,0,0]=(-0.162900059582)*x[0]+(-0.877164340783)*x[1]
-        arg[1,0,0,1]=(-0.50468605065)*x[0]+(-0.160440073709)*x[1]
-        arg[1,0,1,0]=(-0.100901676644)*x[0]+(-0.296111526029)*x[1]
-        arg[1,0,1,1]=(0.176107421869)*x[0]+(1.74393708745)*x[1]
-        arg[1,0,2,0]=(-0.979807721703)*x[0]+(-0.229400841067)*x[1]
-        arg[1,0,2,1]=(0.217472795645)*x[0]+(0.0881503243323)*x[1]
-        arg[1,1,0,0]=(-0.127980123625)*x[0]+(0.0932095456541)*x[1]
-        arg[1,1,0,1]=(0.829674410931)*x[0]+(-0.796196041601)*x[1]
-        arg[1,1,1,0]=(1.28656110233)*x[0]+(-1.27850471392)*x[1]
-        arg[1,1,1,1]=(1.159269884)*x[0]+(-0.973135433631)*x[1]
-        arg[1,1,2,0]=(1.46274837856)*x[0]+(-1.81554270863)*x[1]
-        arg[1,1,2,1]=(0.0973472511688)*x[0]+(0.551451261495)*x[1]
-        arg[1,2,0,0]=(0.510667671293)*x[0]+(-0.51075982099)*x[1]
-        arg[1,2,0,1]=(-1.41612093451)*x[0]+(0.614417669629)*x[1]
-        arg[1,2,1,0]=(1.46595125796)*x[0]+(0.60374279122)*x[1]
-        arg[1,2,1,1]=(-0.317185218187)*x[0]+(-0.0785532882696)*x[1]
-        arg[1,2,2,0]=(-0.388504041993)*x[0]+(-0.838003398775)*x[1]
-        arg[1,2,2,1]=(0.0497207129012)*x[0]+(-0.622155692247)*x[1]
-        arg[1,3,0,0]=(-0.0471400179563)*x[0]+(1.3378948207)*x[1]
-        arg[1,3,0,1]=(-1.22250822195)*x[0]+(0.629714783138)*x[1]
-        arg[1,3,1,0]=(-1.28801080408)*x[0]+(-1.54079710038)*x[1]
-        arg[1,3,1,1]=(-0.426412448469)*x[0]+(-1.09410474021)*x[1]
-        arg[1,3,2,0]=(0.022834167351)*x[0]+(-0.497423389788)*x[1]
-        arg[1,3,2,1]=(-0.787492124301)*x[0]+(-0.245621168419)*x[1]
-        arg[1,4,0,0]=(-1.37814880919)*x[0]+(-0.704805848451)*x[1]
-        arg[1,4,0,1]=(-1.12494770055)*x[0]+(1.44920024305)*x[1]
-        arg[1,4,1,0]=(-0.809532572761)*x[0]+(1.16638587657)*x[1]
-        arg[1,4,1,1]=(0.931784486816)*x[0]+(1.34629889453)*x[1]
-        arg[1,4,2,0]=(-0.172430942793)*x[0]+(-0.584736998321)*x[1]
-        arg[1,4,2,1]=(0.00542948736389)*x[0]+(0.43917597284)*x[1]
-        arg[2,0,0,0]=(-0.946122337406)*x[0]+(-0.161940168137)*x[1]
-        arg[2,0,0,1]=(-0.7856653779)*x[0]+(-0.75287701788)*x[1]
-        arg[2,0,1,0]=(-1.08858367592)*x[0]+(-0.530380818694)*x[1]
-        arg[2,0,1,1]=(-1.0573555095)*x[0]+(-0.854148765785)*x[1]
-        arg[2,0,2,0]=(0.723412825328)*x[0]+(0.326761950437)*x[1]
-        arg[2,0,2,1]=(-0.0143142161225)*x[0]+(-0.752724311876)*x[1]
-        arg[2,1,0,0]=(-0.942548092355)*x[0]+(0.700861094897)*x[1]
-        arg[2,1,0,1]=(-0.712286567957)*x[0]+(0.230406545738)*x[1]
-        arg[2,1,1,0]=(1.27414839774)*x[0]+(0.724784649037)*x[1]
-        arg[2,1,1,1]=(0.637494163002)*x[0]+(0.442489599192)*x[1]
-        arg[2,1,2,0]=(1.81617631726)*x[0]+(1.56870218809)*x[1]
-        arg[2,1,2,1]=(1.16419900666)*x[0]+(-0.044314729141)*x[1]
-        arg[2,2,0,0]=(0.880267125196)*x[0]+(0.77124406259)*x[1]
-        arg[2,2,0,1]=(0.482402867542)*x[0]+(0.0746924305017)*x[1]
-        arg[2,2,1,0]=(0.105861259696)*x[0]+(0.484292207267)*x[1]
-        arg[2,2,1,1]=(-0.107785838196)*x[0]+(0.701132243209)*x[1]
-        arg[2,2,2,0]=(0.559717405844)*x[0]+(-1.5585942717)*x[1]
-        arg[2,2,2,1]=(-0.989130712605)*x[0]+(0.221361137556)*x[1]
-        arg[2,3,0,0]=(-0.045471818095)*x[0]+(-0.437941959792)*x[1]
-        arg[2,3,0,1]=(1.25840468379)*x[0]+(-1.18872011057)*x[1]
-        arg[2,3,1,0]=(1.70665829408)*x[0]+(0.705273921003)*x[1]
-        arg[2,3,1,1]=(-0.0928709253845)*x[0]+(0.785115449756)*x[1]
-        arg[2,3,2,0]=(-0.887243418838)*x[0]+(1.06790660642)*x[1]
-        arg[2,3,2,1]=(-0.572644686872)*x[0]+(-0.672831948394)*x[1]
-        arg[2,4,0,0]=(1.28282566801)*x[0]+(0.651985199447)*x[1]
-        arg[2,4,0,1]=(0.0965663229335)*x[0]+(1.33819998052)*x[1]
-        arg[2,4,1,0]=(0.205569041098)*x[0]+(-0.873095358733)*x[1]
-        arg[2,4,1,1]=(-1.04452025745)*x[0]+(-0.204917033907)*x[1]
-        arg[2,4,2,0]=(-0.181163938972)*x[0]+(0.0341993409272)*x[1]
-        arg[2,4,2,1]=(1.68327027059)*x[0]+(-0.289436355642)*x[1]
-        arg[3,0,0,0]=(1.05712810731)*x[0]+(0.915711819735)*x[1]
-        arg[3,0,0,1]=(-0.171072039482)*x[0]+(-0.160656943623)*x[1]
-        arg[3,0,1,0]=(-1.27063799869)*x[0]+(-0.605131642813)*x[1]
-        arg[3,0,1,1]=(0.940512990835)*x[0]+(-0.116675577531)*x[1]
-        arg[3,0,2,0]=(-0.194213869952)*x[0]+(0.364066752025)*x[1]
-        arg[3,0,2,1]=(-0.328780465397)*x[0]+(-0.114689413673)*x[1]
-        arg[3,1,0,0]=(-0.825914305895)*x[0]+(-0.167010056731)*x[1]
-        arg[3,1,0,1]=(0.657779056207)*x[0]+(0.0666252451638)*x[1]
-        arg[3,1,1,0]=(-0.464004426036)*x[0]+(-0.340932918409)*x[1]
-        arg[3,1,1,1]=(-1.6698652667)*x[0]+(0.731870373141)*x[1]
-        arg[3,1,2,0]=(1.39626250779)*x[0]+(-0.879152855557)*x[1]
-        arg[3,1,2,1]=(1.34973919508)*x[0]+(-0.129753332761)*x[1]
-        arg[3,2,0,0]=(1.03443450706)*x[0]+(0.807333477811)*x[1]
-        arg[3,2,0,1]=(0.366011302596)*x[0]+(0.543804800926)*x[1]
-        arg[3,2,1,0]=(0.262446846036)*x[0]+(-0.247786850991)*x[1]
-        arg[3,2,1,1]=(-1.04657091196)*x[0]+(-0.485443426155)*x[1]
-        arg[3,2,2,0]=(0.342434327538)*x[0]+(-0.148503585588)*x[1]
-        arg[3,2,2,1]=(-0.189833429716)*x[0]+(0.424391874819)*x[1]
-        arg[3,3,0,0]=(-0.118348838118)*x[0]+(0.397628264341)*x[1]
-        arg[3,3,0,1]=(0.481440510084)*x[0]+(-0.393576221424)*x[1]
-        arg[3,3,1,0]=(0.907533552208)*x[0]+(-0.668646549376)*x[1]
-        arg[3,3,1,1]=(-1.49731714213)*x[0]+(-1.18710678264)*x[1]
-        arg[3,3,2,0]=(-0.460660079207)*x[0]+(1.48078266444)*x[1]
-        arg[3,3,2,1]=(-0.161073556988)*x[0]+(-0.486827042754)*x[1]
-        arg[3,4,0,0]=(-0.668755455623)*x[0]+(0.345804059434)*x[1]
-        arg[3,4,0,1]=(1.00528889193)*x[0]+(0.978507928191)*x[1]
-        arg[3,4,1,0]=(0.98955856331)*x[0]+(1.0421852144)*x[1]
-        arg[3,4,1,1]=(0.711688260873)*x[0]+(1.39962222322)*x[1]
-        arg[3,4,2,0]=(1.08512429209)*x[0]+(-0.555249097743)*x[1]
-        arg[3,4,2,1]=(-1.10443784007)*x[0]+(-0.782274429169)*x[1]
-        ref[0,0,0,0]=(0.151153165564)/(o+1.)+(0.112609656739)+(0.254304335059)*0.5**o
-        ref[0,0,0,1]=(-0.530602583511)/(o+1.)+(0.1817855378)+(-0.947398818743)*0.5**o
-        ref[0,0,1,0]=(0.308747437738)/(o+1.)+(-0.0338129255643)+(-0.676658756184)*0.5**o
-        ref[0,0,1,1]=(0.321026553427)/(o+1.)+(0.0692705367618)+(0.108863145337)*0.5**o
-        ref[0,0,2,0]=(-0.0908034666655)/(o+1.)+(-0.1100205155)+(-0.517562009199)*0.5**o
-        ref[0,0,2,1]=(0.303456040903)/(o+1.)+(0.500090875336)+(-0.254199784829)*0.5**o
-        ref[0,1,0,0]=(-0.440641221831)/(o+1.)+(0.456218946873)+(-0.296391367396)*0.5**o
-        ref[0,1,0,1]=(0.222628561762)/(o+1.)+(-0.162064412854)+(-0.457267302337)*0.5**o
-        ref[0,1,1,0]=(-0.913361887408)/(o+1.)+(-0.356168674239)+(0.401664604431)*0.5**o
-        ref[0,1,1,1]=(-0.543116639248)/(o+1.)+(-0.120902439422)+(0.381879135767)*0.5**o
-        ref[0,1,2,0]=(0.993649262831)/(o+1.)+(0.384695858206)+(-0.55736653846)*0.5**o
-        ref[0,1,2,1]=(-0.968077797451)/(o+1.)+(-0.187765942637)+(-0.603167099406)*0.5**o
-        ref[0,2,0,0]=(0.873662019918)/(o+1.)+(-0.710635360033)+(-0.146359415223)*0.5**o
-        ref[0,2,0,1]=(0.466408230693)/(o+1.)+(0.77626565285)+(0.389070815631)*0.5**o
-        ref[0,2,1,0]=(-0.475010813579)/(o+1.)+(0.525435880006)+(0.960310046461)*0.5**o
-        ref[0,2,1,1]=(0.697127520484)/(o+1.)+(0.357204276552)+(0.388328722275)*0.5**o
-        ref[0,2,2,0]=(-0.108434738487)/(o+1.)+(0.356443300466)+(-0.97475753261)*0.5**o
-        ref[0,2,2,1]=(0.952274964304)/(o+1.)+(-0.497379508976)+(-0.562006714089)*0.5**o
-        ref[0,3,0,0]=(-0.0368012761671)/(o+1.)+(0.594000625518)+(0.770200680808)*0.5**o
-        ref[0,3,0,1]=(0.450361861836)/(o+1.)+(0.182031052848)+(0.164263059934)*0.5**o
-        ref[0,3,1,0]=(0.500714741956)/(o+1.)+(0.0479711343168)+(-0.0785996333735)*0.5**o
-        ref[0,3,1,1]=(-0.949280938645)/(o+1.)+(0.452441874504)+(-0.88306753495)*0.5**o
-        ref[0,3,2,0]=(0.186931712837)/(o+1.)+(0.222335175903)+(0.426318408694)*0.5**o
-        ref[0,3,2,1]=(-0.288015428918)/(o+1.)+(0.80948657963)+(-0.822221815085)*0.5**o
-        ref[0,4,0,0]=(0.670151184695)/(o+1.)+(-0.415883847013)+(0.376690471866)*0.5**o
-        ref[0,4,0,1]=(-0.107106843992)/(o+1.)+(0.555375298435)+(-0.837698961768)*0.5**o
-        ref[0,4,1,0]=(-0.299999096802)/(o+1.)+(0.668996782774)+(-0.669357604061)*0.5**o
-        ref[0,4,1,1]=(0.778006183401)/(o+1.)+(-0.614473529032)+(-0.532655856076)*0.5**o
-        ref[0,4,2,0]=(-0.250068389818)/(o+1.)+(0.156274314197)+(-0.0103473845504)*0.5**o
-        ref[0,4,2,1]=(0.902125322216)/(o+1.)+(-0.616424567683)+(-0.560368879846)*0.5**o
-        ref[1,0,0,0]=(-0.133690258295)/(o+1.)+(-0.715949360249)+(0.525524578427)*0.5**o
-        ref[1,0,0,1]=(-0.788097689216)/(o+1.)+(0.0998405659256)+(-0.076709566994)*0.5**o
-        ref[1,0,1,0]=(0.144280886187)/(o+1.)+(0.0775377290314)+(-0.696369546924)*0.5**o
-        ref[1,0,1,1]=(0.824172196605)/(o+1.)+(0.561804029444)+(-0.0277357461773)*0.5**o
-        ref[1,0,2,0]=(0.422564421802)/(o+1.)+(-0.60719307099)+(-0.417386842591)*0.5**o
-        ref[1,0,2,1]=(0.778908672762)/(o+1.)+(0.0163446340765)+(-0.505974820938)*0.5**o
-        ref[1,1,0,0]=(0.0574071047387)/(o+1.)+(-0.350514214742)+(0.608850746775)*0.5**o
-        ref[1,1,0,1]=(-0.991660961792)/(o+1.)+(0.322084279455)+(0.380970772212)*0.5**o
-        ref[1,1,1,0]=(-0.823761120268)/(o+1.)+(-0.0495419092898)+(0.930901327253)*0.5**o
-        ref[1,1,1,1]=(-0.384729980569)/(o+1.)+(-0.0392583789163)+(0.649381188769)*0.5**o
-        ref[1,1,2,0]=(-0.840365304069)/(o+1.)+(-0.0150512662777)+(0.517673506558)*0.5**o
-        ref[1,1,2,1]=(0.555976660846)/(o+1.)+(-0.307265886898)+(0.707353625614)*0.5**o
-        ref[1,2,0,0]=(-0.423056705491)/(o+1.)+(0.0559404393793)+(0.311083677036)*0.5**o
-        ref[1,2,0,1]=(0.15409797664)/(o+1.)+(-0.0906637067519)+(-0.774473828018)*0.5**o
-        ref[1,2,1,0]=(0.796718644088)/(o+1.)+(0.248012077098)+(0.776951250898)*0.5**o
-        ref[1,2,1,1]=(-0.342830889263)/(o+1.)+(-0.282162737841)+(0.511417858487)*0.5**o
-        ref[1,2,2,0]=(-0.722403016671)/(o+1.)+(-0.367059457954)+(0.230014491812)*0.5**o
-        ref[1,2,2,1]=(-0.773685058881)/(o+1.)+(0.412807900451)+(-0.624365721366)*0.5**o
-        ref[1,3,0,0]=(0.527481434758)/(o+1.)+(0.36602961117)+(0.031214145649)*0.5**o
-        ref[1,3,0,1]=(0.0630927531585)/(o+1.)+(-0.164989701995)+(-0.325906787975)*0.5**o
-        ref[1,3,1,0]=(-0.612390590593)/(o+1.)+(-0.78855996274)+(-0.63929738839)*0.5**o
-        ref[1,3,1,1]=(-0.962656044265)/(o+1.)+(-0.00576535037253)+(-0.546330443673)*0.5**o
-        ref[1,3,2,0]=(-0.947280922008)/(o+1.)+(-0.137449579996)+(0.747590859563)*0.5**o
-        ref[1,3,2,1]=(-0.946623026202)/(o+1.)+(0.0787536550213)+(-0.24399757656)*0.5**o
-        ref[1,4,0,0]=(-0.174471016943)/(o+1.)+(-0.636500556039)+(-0.635482528623)*0.5**o
-        ref[1,4,0,1]=(0.806379391595)/(o+1.)+(-0.00304106577093)+(-0.476044717545)*0.5**o
-        ref[1,4,1,0]=(0.729649125134)/(o+1.)+(0.0151477051616)+(-0.403091231646)*0.5**o
-        ref[1,4,1,1]=(0.559976454745)/(o+1.)+(0.479295896421)+(0.75951513376)*0.5**o
-        ref[1,4,2,0]=(0.272199270818)/(o+1.)+(-0.0929072274332)+(-0.843552757065)*0.5**o
-        ref[1,4,2,1]=(-0.552663678377)/(o+1.)+(0.613784745778)+(-0.230300352975)*0.5**o
-        ref[2,0,0,0]=(-0.174247908098)/(o+1.)+(-0.108873783282)+(-0.716067030882)*0.5**o
-        ref[2,0,0,1]=(-0.300584841532)/(o+1.)+(-0.485363665493)+(-0.267230223262)*0.5**o
-        ref[2,0,1,0]=(0.316261805154)/(o+1.)+(-0.523474106451)+(-0.888278086869)*0.5**o
-        ref[2,0,1,1]=(-0.699622562861)/(o+1.)+(-0.151089538248)+(-0.909702635929)*0.5**o
-        ref[2,0,2,0]=(0.728545639829)/(o+1.)+(0.192083148877)+(-0.0625371618174)*0.5**o
-        ref[2,0,2,1]=(-0.22042267239)/(o+1.)+(-0.611974599324)+(0.677333343041)*0.5**o
-        ref[2,1,0,0]=(-0.0734883811113)/(o+1.)+(0.36100831022)+(-0.890215236787)*0.5**o
-        ref[2,1,0,1]=(0.121656829057)/(o+1.)+(-0.130801635799)+(-0.341933579678)*0.5**o
-        ref[2,1,1,0]=(0.221353168629)/(o+1.)+(0.618635673483)+(0.540308531179)*0.5**o
-        ref[2,1,1,1]=(0.0152580531273)/(o+1.)+(0.252173415542)+(0.560378877984)*0.5**o
-        ref[2,1,2,0]=(0.580319777731)/(o+1.)+(0.90566612137)+(0.993226484879)*0.5**o
-        ref[2,1,2,1]=(-0.710250320949)/(o+1.)+(0.742177021871)+(0.345780554724)*0.5**o
-        ref[2,2,0,0]=(0.770701563507)/(o+1.)+(0.240823471881)+(0.399162680517)*0.5**o
-        ref[2,2,0,1]=(0.76121761761)/(o+1.)+(0.128382656738)+(-0.460887633042)*0.5**o
-        ref[2,2,1,0]=(-0.269854962057)/(o+1.)+(0.690854898294)+(-0.521701367567)*0.5**o
-        ref[2,2,1,1]=(0.719518595712)/(o+1.)+(0.029596430244)+(-0.185365051187)*0.5**o
-        ref[2,2,2,0]=(-0.671157761165)/(o+1.)+(-0.142688285012)+(-0.0423425346644)*0.5**o
-        ref[2,2,2,1]=(-0.541156097112)/(o+1.)+(0.0765180918929)+(-0.379649661722)*0.5**o
-        ref[2,3,0,0]=(-0.0604347109212)/(o+1.)+(-0.19403702073)+(-0.034905025507)*0.5**o
-        ref[2,3,0,1]=(-0.793398507071)/(o+1.)+(0.255681280626)+(0.351720519037)*0.5**o
-        ref[2,3,1,0]=(-0.267058413731)/(o+1.)+(0.852211426049)+(0.974567776717)*0.5**o
-        ref[2,3,1,1]=(0.228396641207)/(o+1.)+(0.322922896735)+(-0.181997910305)*0.5**o
-        ref[2,3,2,0]=(0.480987773937)/(o+1.)+(-0.197709028569)+(0.0950934707835)*0.5**o
-        ref[2,3,2,1]=(-0.648934475027)/(o+1.)+(-0.418383297875)+(0.240224435511)*0.5**o
-        ref[2,4,0,0]=(0.430020261528)/(o+1.)+(0.53421018733)+(0.436370231269)*0.5**o
-        ref[2,4,0,1]=(0.906390660223)/(o+1.)+(-0.056057545856)+(0.640490734948)*0.5**o
-        ref[2,4,1,0]=(-0.732099770943)/(o+1.)+(-0.0485027617732)+(0.161578976854)*0.5**o
-        ref[2,4,1,1]=(-0.827495680848)/(o+1.)+(0.285044728936)+(-0.992031068384)*0.5**o
-        ref[2,4,2,0]=(-0.919905471787)/(o+1.)+(0.656971386264)+(-0.541001898785)*0.5**o
-        ref[2,4,2,1]=(0.161975875302)/(o+1.)+(0.272665206557)+(0.686527626533)*0.5**o
-        ref[3,0,0,0]=(0.584120963259)/(o+1.)+(0.207930729804)+(0.972857504177)*0.5**o
-        ref[3,0,0,1]=(0.315823141491)/(o+1.)+(-0.217561208386)+(-0.212429707823)*0.5**o
-        ref[3,0,1,0]=(-0.732294996139)/(o+1.)+(-0.278653143596)+(-0.586168358175)*0.5**o
-        ref[3,0,1,1]=(0.481321847225)/(o+1.)+(-0.070080648792)+(0.482676863662)*0.5**o
-        ref[3,0,2,0]=(0.616679859076)/(o+1.)+(-0.418784546677)+(0.390742116352)*0.5**o
-        ref[3,0,2,1]=(0.866778417448)/(o+1.)+(-0.686585656643)+(0.0629230167692)*0.5**o
-        ref[3,1,0,0]=(0.531890054167)/(o+1.)+(-0.516187607633)+(-0.492439201527)*0.5**o
-        ref[3,1,0,1]=(-0.512361639413)/(o+1.)+(0.499557182545)+(0.237651575694)*0.5**o
-        ref[3,1,1,0]=(-0.67542965405)/(o+1.)+(0.274414249559)+(-0.678336189514)*0.5**o
-        ref[3,1,1,1]=(0.371936242507)/(o+1.)+(-0.1636482466)+(-0.982634642862)*0.5**o
-        ref[3,1,2,0]=(-0.799408831501)/(o+1.)+(0.458633399549)+(0.399251684639)*0.5**o
-        ref[3,1,2,1]=(-0.0145253903686)/(o+1.)+(0.238472345905)+(0.757566560882)*0.5**o
-        ref[3,2,0,0]=(-0.130519473112)/(o+1.)+(0.695277604837)+(0.581732248306)*0.5**o
-        ref[3,2,0,1]=(0.632010536438)/(o+1.)+(0.123066205529)+(0.0316731560259)*0.5**o
-        ref[3,2,1,0]=(-0.709926210356)/(o+1.)+(0.0926699972302)+(0.53924621094)*0.5**o
-        ref[3,2,1,1]=(0.428094002247)/(o+1.)+(-0.841997926131)+(-0.276112488096)*0.5**o
-        ref[3,2,2,0]=(0.708481148086)/(o+1.)+(-0.50498161534)+(0.495412824545)*0.5**o
-        ref[3,2,2,1]=(0.782824622703)/(o+1.)+(-0.151509698687)+(-0.245246780227)*0.5**o
-        ref[3,3,0,0]=(0.848460868418)/(o+1.)+(-0.104639248461)+(-0.359902945273)*0.5**o
-        ref[3,3,0,1]=(0.0569151307298)/(o+1.)+(-0.0674224535469)+(0.165794065024)*0.5**o
-        ref[3,3,1,0]=(-0.165683739908)/(o+1.)+(-0.183388699236)+(0.771348141212)*0.5**o
-        ref[3,3,1,1]=(-0.932550058069)/(o+1.)+(-0.47828109001)+(-0.795311686688)*0.5**o
-        ref[3,3,2,0]=(0.821542940923)/(o+1.)+(0.166853194487)+(-0.13512674466)*0.5**o
-        ref[3,3,2,1]=(-0.46375871628)/(o+1.)+(0.132701267732)+(-0.449544418926)*0.5**o
-        ref[3,4,0,0]=(-0.074530542168)/(o+1.)+(-0.0567877963797)+(-0.134845261261)*0.5**o
-        ref[3,4,0,1]=(0.238671520479)/(o+1.)+(0.50689253572)+(0.731340228204)*0.5**o
-        ref[3,4,1,0]=(0.981601513335)/(o+1.)+(0.400717209822)+(0.248707844726)*0.5**o
-        ref[3,4,1,1]=(0.592304390107)/(o+1.)+(0.342408637328)+(0.834188819333)*0.5**o
-        ref[3,4,2,0]=(-0.339991330909)/(o+1.)+(-0.0145922376156)+(0.899051000485)*0.5**o
-        ref[3,4,2,1]=(-0.626610688164)/(o+1.)+(-0.417008165115)+(-0.426085250846)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.697666818785)*x[0]+(1.00202295791)*x[1]+(0.617700157184)*x[2]
-        arg[0,0,0,1]=(-0.465577819457)*x[0]+(-1.40054693355)*x[1]+(1.16912653295)*x[2]
-        arg[0,0,1,0]=(-1.26696500634)*x[0]+(-0.0469756169975)*x[1]+(-0.445591738991)*x[2]
-        arg[0,0,1,1]=(-1.61654321709)*x[0]+(-1.69522962467)*x[1]+(-1.06089094851)*x[2]
-        arg[0,0,2,0]=(0.229468378506)*x[0]+(0.716813596991)*x[1]+(-0.237703937029)*x[2]
-        arg[0,0,2,1]=(-1.12052051905)*x[0]+(0.835000004618)*x[1]+(-0.853004812404)*x[2]
-        arg[0,1,0,0]=(-1.75500745705)*x[0]+(0.655055836882)*x[1]+(1.05207750735)*x[2]
-        arg[0,1,0,1]=(-0.0746024824253)*x[0]+(-0.421596816958)*x[1]+(-0.375715855989)*x[2]
-        arg[0,1,1,0]=(-0.963269684396)*x[0]+(0.431993248836)*x[1]+(-1.63061928649)*x[2]
-        arg[0,1,1,1]=(-0.418757265018)*x[0]+(-0.665626168583)*x[1]+(-0.335734432507)*x[2]
-        arg[0,1,2,0]=(0.980346404307)*x[0]+(1.45442049802)*x[1]+(-0.833420308612)*x[2]
-        arg[0,1,2,1]=(-1.52536017847)*x[0]+(0.99484028681)*x[1]+(0.109754321663)*x[2]
-        arg[0,2,0,0]=(1.697179262)*x[0]+(-0.928732802147)*x[1]+(-0.653379513626)*x[2]
-        arg[0,2,0,1]=(0.682698902948)*x[0]+(0.829307959583)*x[1]+(-1.0300112276)*x[2]
-        arg[0,2,1,0]=(0.026084323266)*x[0]+(1.28865784608)*x[1]+(0.830446580645)*x[2]
-        arg[0,2,1,1]=(0.486291506032)*x[0]+(-0.519637742913)*x[1]+(0.81671330629)*x[2]
-        arg[0,2,2,0]=(-0.761591624634)*x[0]+(0.370951131011)*x[1]+(-0.256748479312)*x[2]
-        arg[0,2,2,1]=(-0.249974326513)*x[0]+(0.267323484635)*x[1]+(-1.09642130905)*x[2]
-        arg[0,3,0,0]=(0.752057563255)*x[0]+(-1.2772262175)*x[1]+(-0.264569668983)*x[2]
-        arg[0,3,0,1]=(-0.173167796447)*x[0]+(0.31873208356)*x[1]+(-0.599780701112)*x[2]
-        arg[0,3,1,0]=(-0.912464014941)*x[0]+(-1.56452517166)*x[1]+(1.37651660499)*x[2]
-        arg[0,3,1,1]=(0.302009667854)*x[0]+(0.524213064769)*x[1]+(0.316301522683)*x[2]
-        arg[0,3,2,0]=(-1.2940154673)*x[0]+(-0.900061396992)*x[1]+(0.3860029847)*x[2]
-        arg[0,3,2,1]=(-0.97354131341)*x[0]+(1.08221883964)*x[1]+(-0.739323076416)*x[2]
-        arg[0,4,0,0]=(1.86535317192)*x[0]+(-0.478359589546)*x[1]+(-0.798014592302)*x[2]
-        arg[0,4,0,1]=(-1.08518693851)*x[0]+(-0.186048654536)*x[1]+(1.04915573267)*x[2]
-        arg[0,4,1,0]=(-1.09692811055)*x[0]+(1.01042920935)*x[1]+(-0.73978089555)*x[2]
-        arg[0,4,1,1]=(0.654656964663)*x[0]+(0.279204596126)*x[1]+(0.886217781361)*x[2]
-        arg[0,4,2,0]=(-0.54009886291)*x[0]+(0.378037248739)*x[1]+(1.09785568886)*x[2]
-        arg[0,4,2,1]=(-1.43995958913)*x[0]+(-0.720157090994)*x[1]+(0.0676362028136)*x[2]
-        arg[1,0,0,0]=(1.47735412608)*x[0]+(0.342355546228)*x[1]+(-0.0134502415508)*x[2]
-        arg[1,0,0,1]=(-0.419536590369)*x[0]+(-1.61108470511)*x[1]+(1.51281979355)*x[2]
-        arg[1,0,1,0]=(1.31765698245)*x[0]+(-0.7499566294)*x[1]+(0.934537503478)*x[2]
-        arg[1,0,1,1]=(0.688467914883)*x[0]+(-1.32681280673)*x[1]+(-0.387405705058)*x[2]
-        arg[1,0,2,0]=(1.37069587556)*x[0]+(0.540830111773)*x[1]+(0.477311068263)*x[2]
-        arg[1,0,2,1]=(-0.572066213761)*x[0]+(-1.11950925494)*x[1]+(1.07939217872)*x[2]
-        arg[1,1,0,0]=(0.564997105326)*x[0]+(-0.73130546389)*x[1]+(0.435910937304)*x[2]
-        arg[1,1,0,1]=(0.513931739674)*x[0]+(-0.944043404826)*x[1]+(0.014114227468)*x[2]
-        arg[1,1,1,0]=(-0.77850597256)*x[0]+(-0.445835136484)*x[1]+(0.157478357479)*x[2]
-        arg[1,1,1,1]=(0.752431176866)*x[0]+(0.659759664199)*x[1]+(-0.859515433521)*x[2]
-        arg[1,1,2,0]=(0.0693158730911)*x[0]+(-0.820997827204)*x[1]+(-0.714694436829)*x[2]
-        arg[1,1,2,1]=(0.604674152847)*x[0]+(0.647261183132)*x[1]+(-1.21981352028)*x[2]
-        arg[1,2,0,0]=(0.0997504695984)*x[0]+(-0.271549839083)*x[1]+(-0.573467835942)*x[2]
-        arg[1,2,0,1]=(0.01861845581)*x[0]+(0.157410502406)*x[1]+(0.939257868776)*x[2]
-        arg[1,2,1,0]=(1.44909894631)*x[0]+(0.116038517547)*x[1]+(-0.851940489233)*x[2]
-        arg[1,2,1,1]=(1.34598841007)*x[0]+(1.79163125841)*x[1]+(0.719171044245)*x[2]
-        arg[1,2,2,0]=(-0.214737791448)*x[0]+(-1.85810839095)*x[1]+(-0.240776599927)*x[2]
-        arg[1,2,2,1]=(-0.574707645928)*x[0]+(-0.664173831956)*x[1]+(0.310262106696)*x[2]
-        arg[1,3,0,0]=(0.296213453592)*x[0]+(-0.831112482555)*x[1]+(0.130075739128)*x[2]
-        arg[1,3,0,1]=(-0.369510604457)*x[0]+(0.0373909697998)*x[1]+(1.6689129783)*x[2]
-        arg[1,3,1,0]=(0.0922435881419)*x[0]+(-0.280519827004)*x[1]+(0.285933839232)*x[2]
-        arg[1,3,1,1]=(-0.649253282272)*x[0]+(-0.460065044123)*x[1]+(-0.0711164948063)*x[2]
-        arg[1,3,2,0]=(0.793313307581)*x[0]+(-0.0587956351149)*x[1]+(0.810487259739)*x[2]
-        arg[1,3,2,1]=(-1.38668597055)*x[0]+(1.51396934198)*x[1]+(-1.13918550255)*x[2]
-        arg[1,4,0,0]=(1.40078167737)*x[0]+(-1.61915436345)*x[1]+(0.421710091214)*x[2]
-        arg[1,4,0,1]=(-1.37982015877)*x[0]+(1.30607371738)*x[1]+(-0.608888848419)*x[2]
-        arg[1,4,1,0]=(-0.558087802805)*x[0]+(-0.214169499512)*x[1]+(-0.766242546503)*x[2]
-        arg[1,4,1,1]=(-1.75503436584)*x[0]+(0.183604705451)*x[1]+(-0.148071484576)*x[2]
-        arg[1,4,2,0]=(0.537942069142)*x[0]+(-0.00640749928252)*x[1]+(-0.277544629657)*x[2]
-        arg[1,4,2,1]=(-0.652645833371)*x[0]+(-1.33439077026)*x[1]+(-0.226308197201)*x[2]
-        arg[2,0,0,0]=(1.45646289279)*x[0]+(1.40842127675)*x[1]+(1.75078281495)*x[2]
-        arg[2,0,0,1]=(0.867988651995)*x[0]+(1.35061812241)*x[1]+(-1.56520776323)*x[2]
-        arg[2,0,1,0]=(0.549686523522)*x[0]+(-0.528085465813)*x[1]+(-0.994978820267)*x[2]
-        arg[2,0,1,1]=(0.383595996552)*x[0]+(0.612989859087)*x[1]+(-0.560401247231)*x[2]
-        arg[2,0,2,0]=(-0.341259919499)*x[0]+(-0.125491675042)*x[1]+(0.545572340757)*x[2]
-        arg[2,0,2,1]=(-0.414269395434)*x[0]+(-0.433969881898)*x[1]+(-1.01820199328)*x[2]
-        arg[2,1,0,0]=(-0.113575280389)*x[0]+(0.326916039942)*x[1]+(-0.576072890249)*x[2]
-        arg[2,1,0,1]=(-0.296473969661)*x[0]+(0.195675099431)*x[1]+(-1.72378150831)*x[2]
-        arg[2,1,1,0]=(-1.31575932758)*x[0]+(-0.122557423522)*x[1]+(0.53435027695)*x[2]
-        arg[2,1,1,1]=(0.299435754608)*x[0]+(0.727140413706)*x[1]+(0.848931358475)*x[2]
-        arg[2,1,2,0]=(0.2618965198)*x[0]+(-0.461672573339)*x[1]+(0.923592803172)*x[2]
-        arg[2,1,2,1]=(-0.326817258523)*x[0]+(-0.0363300805442)*x[1]+(1.82049875918)*x[2]
-        arg[2,2,0,0]=(-0.435113320888)*x[0]+(0.0257984353786)*x[1]+(0.287846577657)*x[2]
-        arg[2,2,0,1]=(1.39178068279)*x[0]+(0.136781967539)*x[1]+(-1.38161590351)*x[2]
-        arg[2,2,1,0]=(-0.887874199356)*x[0]+(-0.476769153654)*x[1]+(-0.618760485829)*x[2]
-        arg[2,2,1,1]=(1.58883355098)*x[0]+(-0.889469047555)*x[1]+(-0.678486755843)*x[2]
-        arg[2,2,2,0]=(0.237147029365)*x[0]+(-0.509883462401)*x[1]+(0.533163151551)*x[2]
-        arg[2,2,2,1]=(0.66513913749)*x[0]+(1.30317030657)*x[1]+(0.804083365617)*x[2]
-        arg[2,3,0,0]=(1.01531518403)*x[0]+(1.3753053143)*x[1]+(0.000877284235964)*x[2]
-        arg[2,3,0,1]=(-0.40853642543)*x[0]+(0.154794268783)*x[1]+(-1.34306671117)*x[2]
-        arg[2,3,1,0]=(0.43065284359)*x[0]+(-0.28965146009)*x[1]+(0.660248828789)*x[2]
-        arg[2,3,1,1]=(-1.4334922681)*x[0]+(-0.0348802858609)*x[1]+(0.502051304974)*x[2]
-        arg[2,3,2,0]=(-1.17399537487)*x[0]+(0.865787043946)*x[1]+(-0.0105949677478)*x[2]
-        arg[2,3,2,1]=(0.63104158794)*x[0]+(0.436196079951)*x[1]+(0.498606623061)*x[2]
-        arg[2,4,0,0]=(-1.44410177354)*x[0]+(0.513406326011)*x[1]+(0.699127199447)*x[2]
-        arg[2,4,0,1]=(-0.981727023077)*x[0]+(0.484182120695)*x[1]+(0.667175832045)*x[2]
-        arg[2,4,1,0]=(-1.3352602588)*x[0]+(0.626269023364)*x[1]+(0.813537646695)*x[2]
-        arg[2,4,1,1]=(-0.932486930114)*x[0]+(0.299448807849)*x[1]+(0.195862014797)*x[2]
-        arg[2,4,2,0]=(-0.0621489644806)*x[0]+(0.131979664158)*x[1]+(0.442029269778)*x[2]
-        arg[2,4,2,1]=(-0.507508608633)*x[0]+(-1.28613226533)*x[1]+(-0.697920444023)*x[2]
-        arg[3,0,0,0]=(-0.984942677585)*x[0]+(-1.58913299616)*x[1]+(-0.373026784822)*x[2]
-        arg[3,0,0,1]=(0.616666427113)*x[0]+(-0.625162800471)*x[1]+(-0.796307290839)*x[2]
-        arg[3,0,1,0]=(-0.48469203683)*x[0]+(-0.0572105166553)*x[1]+(0.809572383581)*x[2]
-        arg[3,0,1,1]=(-0.487160309892)*x[0]+(0.77646454341)*x[1]+(-0.41947544573)*x[2]
-        arg[3,0,2,0]=(-1.17902121554)*x[0]+(-0.244939532033)*x[1]+(-0.282994359476)*x[2]
-        arg[3,0,2,1]=(0.33515909881)*x[0]+(0.146866561705)*x[1]+(1.81486098364)*x[2]
-        arg[3,1,0,0]=(0.379977901341)*x[0]+(0.834531701517)*x[1]+(-0.0242027062166)*x[2]
-        arg[3,1,0,1]=(0.184318292766)*x[0]+(1.08367911805)*x[1]+(-0.164531741594)*x[2]
-        arg[3,1,1,0]=(-1.00967115996)*x[0]+(0.542699640149)*x[1]+(0.707616701259)*x[2]
-        arg[3,1,1,1]=(0.856948233811)*x[0]+(-1.2186550297)*x[1]+(-0.034268798159)*x[2]
-        arg[3,1,2,0]=(0.259470684477)*x[0]+(-1.03586983732)*x[1]+(-0.157275979341)*x[2]
-        arg[3,1,2,1]=(-0.161954890658)*x[0]+(1.65853209885)*x[1]+(0.381113456719)*x[2]
-        arg[3,2,0,0]=(-0.437413004681)*x[0]+(-0.730340273929)*x[1]+(-0.687689272494)*x[2]
-        arg[3,2,0,1]=(-0.336618164118)*x[0]+(-1.24388666895)*x[1]+(-0.2198689254)*x[2]
-        arg[3,2,1,0]=(0.0872793087887)*x[0]+(-0.336554573215)*x[1]+(-0.0597803523262)*x[2]
-        arg[3,2,1,1]=(0.192805432018)*x[0]+(0.0540495582064)*x[1]+(0.846658042071)*x[2]
-        arg[3,2,2,0]=(0.00794192604414)*x[0]+(-0.33504559053)*x[1]+(0.615701149787)*x[2]
-        arg[3,2,2,1]=(0.210870961503)*x[0]+(1.14164095846)*x[1]+(-0.192785742791)*x[2]
-        arg[3,3,0,0]=(-0.25895162041)*x[0]+(-0.225800436488)*x[1]+(-0.198007079838)*x[2]
-        arg[3,3,0,1]=(-0.150363703231)*x[0]+(1.23870429535)*x[1]+(0.28635881247)*x[2]
-        arg[3,3,1,0]=(-0.865980718216)*x[0]+(-0.0849853244335)*x[1]+(-0.292164217189)*x[2]
-        arg[3,3,1,1]=(-0.350465968722)*x[0]+(0.09853736936)*x[1]+(-0.476711524665)*x[2]
-        arg[3,3,2,0]=(0.311396300263)*x[0]+(-0.92437612034)*x[1]+(-0.757139962928)*x[2]
-        arg[3,3,2,1]=(-0.912311919837)*x[0]+(0.267793631099)*x[1]+(0.4917345401)*x[2]
-        arg[3,4,0,0]=(0.613662541753)*x[0]+(0.782757341361)*x[1]+(1.04209808158)*x[2]
-        arg[3,4,0,1]=(0.492828613997)*x[0]+(1.11979095664)*x[1]+(-0.843545072354)*x[2]
-        arg[3,4,1,0]=(-0.51939120556)*x[0]+(0.476004484286)*x[1]+(-0.516311785432)*x[2]
-        arg[3,4,1,1]=(1.00423313567)*x[0]+(0.90776890388)*x[1]+(1.34423309497)*x[2]
-        arg[3,4,2,0]=(-1.44069600826)*x[0]+(-1.39515290909)*x[1]+(1.19851590247)*x[2]
-        arg[3,4,2,1]=(0.391851619877)*x[0]+(0.265529120553)*x[1]+(0.996610410913)*x[2]
-        ref[0,0,0,0]=(1.19330263935)/(o+1.)+(0.55394275251)+(0.0162017895041)*0.5**o
-        ref[0,0,0,1]=(-0.672351783684)/(o+1.)+(-0.187889622039)+(0.351132807711)*0.5**o
-        ref[0,0,1,0]=(-1.27021996264)/(o+1.)+(0.236286530101)+(-0.961885459894)*0.5**o
-        ref[0,0,1,1]=(-1.43442517107)/(o+1.)+(-1.00113374859)+(-0.935971122022)*0.5**o
-        ref[0,0,2,0]=(-0.434813695127)/(o+1.)+(0.606673209583)+(-0.0699546855712)*0.5**o
-        ref[0,0,2,1]=(-0.0434901247948)/(o+1.)+(-0.180911877983)+(-0.733211446073)*0.5**o
-        ref[0,1,0,0]=(1.41514302182)/(o+1.)+(-0.247977413325)+(-0.967062307989)*0.5**o
-        ref[0,1,0,1]=(0.69128100142)/(o+1.)+(-0.621609882923)+(-0.319976390946)*0.5**o
-        ref[0,1,1,0]=(-0.881870429191)/(o+1.)+(-0.654075774082)+(0.0281262553057)*0.5**o
-        ref[0,1,1,1]=(-1.27239116086)/(o+1.)+(-0.0854066429492)+(0.0230865806541)*0.5**o
-        ref[0,1,2,0]=(-0.222663945351)/(o+1.)+(0.685312598747)+(0.453385341573)*0.5**o
-        ref[0,1,2,1]=(0.101409038706)/(o+1.)+(0.151367946744)+(-0.824910502191)*0.5**o
-        ref[0,2,0,0]=(-1.19509443892)/(o+1.)+(0.225437856866)+(0.85928567141)*0.5**o
-        ref[0,2,0,1]=(0.285764347754)/(o+1.)+(-0.383432127133)+(0.963095541446)*0.5**o
-        ref[0,2,1,0]=(0.728010227911)/(o+1.)+(0.983790919896)+(-0.550403317717)*0.5**o
-        ref[0,2,1,1]=(0.563748259036)/(o+1.)+(0.165164845927)+(-0.110710881481)*0.5**o
-        ref[0,2,2,0]=(-0.361502606429)/(o+1.)+(0.0276145482611)+(-0.341115463028)*0.5**o
-        ref[0,2,2,1]=(-0.293320207933)/(o+1.)+(0.0336757304385)+(-0.853103403872)*0.5**o
-        ref[0,3,0,0]=(-0.410233956527)/(o+1.)+(-0.474281126245)+(0.569057885785)*0.5**o
-        ref[0,3,0,1]=(-0.835861970115)/(o+1.)+(0.0173715483175)+(0.346902459481)*0.5**o
-        ref[0,3,1,0]=(0.0830466456187)/(o+1.)+(-0.288204681495)+(-0.607109864241)*0.5**o
-        ref[0,3,1,1]=(1.07074130823)/(o+1.)+(-0.0437983012867)+(0.159379549652)*0.5**o
-        ref[0,3,2,0]=(0.172301049609)/(o+1.)+(-0.491724874152)+(-0.996925180895)*0.5**o
-        ref[0,3,2,1]=(-0.24891941221)/(o+1.)+(-0.03935856269)+(-0.3030090126)*0.5**o
-        ref[0,4,0,0]=(-0.778575122429)/(o+1.)+(0.213085222078)+(0.941383668349)*0.5**o
-        ref[0,4,0,1]=(0.880801627174)/(o+1.)+(-0.454451723401)+(-0.193978040747)*0.5**o
-        ref[0,4,1,0]=(-0.835604724882)/(o+1.)+(0.127240834083)+(-0.245156740036)*0.5**o
-        ref[0,4,1,1]=(1.62336716324)/(o+1.)+(-0.101085918464)+(0.398884015839)*0.5**o
-        ref[0,4,2,0]=(1.16805827702)/(o+1.)+(0.211232591688)+(-0.654729385702)*0.5**o
-        ref[0,4,2,1]=(-0.305424138957)/(o+1.)+(-0.431076572693)+(-0.924903192969)*0.5**o
-        ref[1,0,0,0]=(-0.481596247529)/(o+1.)+(0.769902632559)+(0.748050413171)*0.5**o
-        ref[1,0,0,1]=(0.177388661252)/(o+1.)+(-0.118766442613)+(-0.457657277952)*0.5**o
-        ref[1,0,1,0]=(0.709890860372)/(o+1.)+(0.0668010230727)+(0.658744950012)*0.5**o
-        ref[1,0,1,1]=(-1.45685781381)/(o+1.)+(-0.178674426089)+(0.788456069079)*0.5**o
-        ref[1,0,2,0]=(0.194388185612)/(o+1.)+(0.649177543063)+(0.896093783855)*0.5**o
-        ref[1,0,2,1]=(0.181561279507)/(o+1.)+(-0.200618291902)+(-0.392507985678)*0.5**o
-        ref[1,1,0,0]=(-0.884376814027)/(o+1.)+(0.280382736159)+(0.593213920451)*0.5**o
-        ref[1,1,0,1]=(-0.250709602218)/(o+1.)+(-0.492104211211)+(0.818920586956)*0.5**o
-        ref[1,1,1,0]=(0.0529723694625)/(o+1.)+(-0.502047650638)+(-0.115739819752)*0.5**o
-        ref[1,1,1,1]=(0.215812202957)/(o+1.)+(-0.308796450292)+(0.954456105171)*0.5**o
-        ref[1,1,2,0]=(-0.991481050902)/(o+1.)+(0.162626252838)+(-0.800147845717)*0.5**o
-        ref[1,1,2,1]=(-0.433989756951)/(o+1.)+(0.362776336712)+(-0.259441100777)*0.5**o
-        ref[1,2,0,0]=(-0.930287052624)/(o+1.)+(-0.347752763108)+(0.880525373413)*0.5**o
-        ref[1,2,0,1]=(0.698674852861)/(o+1.)+(-0.15119613196)+(0.719004238051)*0.5**o
-        ref[1,2,1,0]=(-0.777216821365)/(o+1.)+(0.436336076297)+(0.617741643399)*0.5**o
-        ref[1,2,1,1]=(1.09595223135)/(o+1.)+(0.978251130983)+(0.804336219412)*0.5**o
-        ref[1,2,2,0]=(-0.651012630849)/(o+1.)+(-1.04894606664)+(0.43528198181)*0.5**o
-        ref[1,2,2,1]=(-1.5227353883)/(o+1.)+(0.670019307557)+(-0.745922598001)*0.5**o
-        ref[1,3,0,0]=(-0.750195637997)/(o+1.)+(0.231864245348)+(-0.118356142533)*0.5**o
-        ref[1,3,0,1]=(1.17136226596)/(o+1.)+(-0.114976421389)+(0.395383920468)*0.5**o
-        ref[1,3,1,0]=(-0.108070636769)/(o+1.)+(0.279145429234)+(-0.352562621327)*0.5**o
-        ref[1,3,1,1]=(-0.144223481714)/(o+1.)+(-0.472954352493)+(-0.0903026345013)*0.5**o
-        ref[1,3,2,0]=(-0.487564307786)/(o+1.)+(0.636973351449)+(0.758622537094)*0.5**o
-        ref[1,3,2,1]=(0.390860965954)/(o+1.)+(-0.36647678165)+(-0.66980953377)*0.5**o
-        ref[1,4,0,0]=(-1.04824984837)/(o+1.)+(0.213932231728)+(0.823722790054)*0.5**o
-        ref[1,4,0,1]=(-0.0984653601336)/(o+1.)+(0.07867877705)+(-0.741527483773)*0.5**o
-        ref[1,4,1,0]=(-0.146287867383)/(o+1.)+(-0.908951868158)+(0.425691754878)*0.5**o
-        ref[1,4,1,1]=(-0.94160416554)/(o+1.)+(0.0459877010016)+(-0.869872381431)*0.5**o
-        ref[1,4,2,0]=(0.0115742858952)/(o+1.)+(-0.222488399041)+(0.687392452389)*0.5**o
-        ref[1,4,2,1]=(-0.956561936575)/(o+1.)+(-0.59770879042)+(-0.0613652834159)*0.5**o
-        ref[2,0,0,0]=(1.83987381729)/(o+1.)+(0.956579317963)+(0.862634531274)*0.5**o
-        ref[2,0,0,1]=(0.105446127421)/(o+1.)+(0.180661881191)+(0.186629121375)*0.5**o
-        ref[2,0,1,0]=(0.0212167440766)/(o+1.)+(-0.337825588888)+(-0.318943328859)*0.5**o
-        ref[2,0,1,1]=(0.744834715631)/(o+1.)+(-0.350058416663)+(0.391466726104)*0.5**o
-        ref[2,0,2,0]=(-0.788776613856)/(o+1.)+(0.233776806014)+(0.400043748043)*0.5**o
-        ref[2,0,2,1]=(-0.95346976307)/(o+1.)+(0.0274998652324)+(-0.967971238003)*0.5**o
-        ref[2,1,0,0]=(-0.536051408942)/(o+1.)+(-0.208498016994)+(0.590315312233)*0.5**o
-        ref[2,1,0,1]=(-1.04158508788)/(o+1.)+(-0.397885793101)+(0.0127762955396)*0.5**o
-        ref[2,1,1,0]=(0.529914207253)/(o+1.)+(-0.547503443987)+(-0.338873793431)*0.5**o
-        ref[2,1,1,1]=(0.62298670274)/(o+1.)+(0.449860048786)+(0.352800726478)*0.5**o
-        ref[2,1,2,0]=(0.965292650595)/(o+1.)+(0.00980498639)+(-0.261085873742)*0.5**o
-        ref[2,1,2,1]=(0.403285360803)/(o+1.)+(0.369160592269)+(0.315744874774)*0.5**o
-        ref[2,2,0,0]=(-0.457764884724)/(o+1.)+(0.563657776706)+(-0.791018976541)*0.5**o
-        ref[2,2,0,1]=(0.188151274044)/(o+1.)+(-0.476470545911)+(0.911736564588)*0.5**o
-        ref[2,2,1,0]=(-0.558515085739)/(o+1.)+(-0.445583796553)+(-0.533721159994)*0.5**o
-        ref[2,2,1,1]=(-0.431992337265)/(o+1.)+(-0.0957726221961)+(0.64441532924)*0.5**o
-        ref[2,2,2,0]=(-0.159056461947)/(o+1.)+(-0.0326864536156)+(0.484856087693)*0.5**o
-        ref[2,2,2,1]=(0.533116456037)/(o+1.)+(1.10197257725)+(0.0353311991352)*0.5**o
-        ref[2,3,0,0]=(0.0570625147023)/(o+1.)+(0.74170779854)+(0.851019670777)*0.5**o
-        ref[2,3,0,1]=(-0.495059904832)/(o+1.)+(-0.169954912181)+(-0.761839138623)*0.5**o
-        ref[2,3,1,0]=(0.482375173314)/(o+1.)+(-0.19374838651)+(0.706371811996)*0.5**o
-        ref[2,3,1,1]=(0.12928100721)/(o+1.)+(-0.317327862062)+(-0.460946532077)*0.5**o
-        ref[2,3,2,0]=(-0.234362084763)/(o+1.)+(0.423486279181)+(-0.93141377227)*0.5**o
-        ref[2,3,2,1]=(1.25586693002)/(o+1.)+(-0.127551329993)+(0.56508002092)*0.5**o
-        ref[2,4,0,0]=(0.45235297749)/(o+1.)+(-0.0217537364788)+(-0.640413752615)*0.5**o
-        ref[2,4,0,1]=(0.936809207384)/(o+1.)+(-0.151519610695)+(-0.464139056331)*0.5**o
-        ref[2,4,1,0]=(0.867693208863)/(o+1.)+(0.105683574314)+(-0.974513946233)*0.5**o
-        ref[2,4,1,1]=(-1.27821575101)/(o+1.)+(0.463163847311)+(-0.0852880510814)*0.5**o
-        ref[2,4,2,0]=(-0.846224501366)/(o+1.)+(0.432619461409)+(0.492845548002)*0.5**o
-        ref[2,4,2,1]=(-1.48923229995)/(o+1.)+(-0.505747396375)+(0.00916577472118)*0.5**o
-        ref[3,0,0,0]=(-0.959215731121)/(o+1.)+(-0.904609108587)+(-0.178668510268)*0.5**o
-        ref[3,0,0,1]=(-1.53181231865)/(o+1.)+(-0.0758543610408)+(0.878717376536)*0.5**o
-        ref[3,0,1,0]=(1.18643238831)/(o+1.)+(-0.288825159097)+(-0.341112240015)*0.5**o
-        ref[3,0,1,1]=(-0.0675694917031)/(o+1.)+(-0.168955703616)+(0.275309686724)*0.5**o
-        ref[3,0,2,0]=(-0.663269860133)/(o+1.)+(-0.235102421885)+(-0.573480403148)*0.5**o
-        ref[3,0,2,1]=(1.0969289778)/(o+1.)+(0.46603172821)+(0.267894209932)*0.5**o
-        ref[3,1,0,0]=(-0.716870513559)/(o+1.)+(0.712039409283)+(0.483098591635)*0.5**o
-        ref[3,1,0,1]=(0.0328531999411)/(o+1.)+(0.379319450988)+(0.311973567308)*0.5**o
-        ref[3,1,1,0]=(1.08648208064)/(o+1.)+(-0.196831959338)+(-0.452172980519)*0.5**o
-        ref[3,1,1,1]=(0.0813181502612)/(o+1.)+(-0.227364064527)+(-0.0225656152548)*0.5**o
-        ref[3,1,2,0]=(-0.271000454408)/(o+1.)+(-0.765711687155)+(0.868748696531)*0.5**o
-        ref[3,1,2,1]=(1.60569646253)/(o+1.)+(0.137437739736)+(-0.00288127709197)*0.5**o
-        ref[3,2,0,0]=(-1.25887089059)/(o+1.)+(-0.525842290945)+(0.455112921376)*0.5**o
-        ref[3,2,0,1]=(-1.63787880725)/(o+1.)+(0.00214706725405)+(-0.166789085722)*0.5**o
-        ref[3,2,1,0]=(-1.82111307894)/(o+1.)+(0.561806270366)+(0.388444921454)*0.5**o
-        ref[3,2,1,1]=(-0.489259906414)/(o+1.)+(0.582548398381)+(0.417676141947)*0.5**o
-        ref[3,2,2,0]=(-0.0674375340391)/(o+1.)+(-0.00345549227349)+(0.362946003887)*0.5**o
-        ref[3,2,2,1]=(0.662780682001)/(o+1.)+(-0.15453848218)+(0.806022459534)*0.5**o
-        ref[3,3,0,0]=(-1.15795406515)/(o+1.)+(0.0926725746467)+(0.289849779118)*0.5**o
-        ref[3,3,0,1]=(1.27520269547)/(o+1.)+(-0.286529818361)+(0.672556345847)*0.5**o
-        ref[3,3,1,0]=(-0.343290651469)/(o+1.)+(-0.0269962100904)+(-0.845847188189)*0.5**o
-        ref[3,3,1,1]=(0.497715053371)/(o+1.)+(-0.158577177766)+(-0.909200821866)*0.5**o
-        ref[3,3,2,0]=(-0.952431538662)/(o+1.)+(0.0816482063045)+(-0.580984656952)*0.5**o
-        ref[3,3,2,1]=(-0.176227469799)/(o+1.)+(0.0456157853688)+(-0.0677878495767)*0.5**o
-        ref[3,4,0,0]=(0.976460483802)/(o+1.)+(0.347595506011)+(0.766866468871)*0.5**o
-        ref[3,4,0,1]=(0.0358170327662)/(o+1.)+(-0.0991456259778)+(0.931548717473)*0.5**o
-        ref[3,4,1,0]=(0.114544318514)/(o+1.)+(-0.201014865792)+(-0.272213093635)*0.5**o
-        ref[3,4,1,1]=(0.554509925385)/(o+1.)+(1.23219332557)+(0.237338557994)*0.5**o
-        ref[3,4,2,0]=(0.0803465444931)/(o+1.)+(-0.518257569997)+(-0.681164419371)*0.5**o
-        ref[3,4,2,1]=(-0.0443609570522)/(o+1.)+(0.572813368096)+(0.552725372202)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.114918917602)*x[0]**o+(0.304834778607)*x[0]+(0.704057176139)*x[1]**o+(-0.0664624375434)*x[1]
-        ref=(0.704057176139)/(o+1.)+(0.119186170532)+(-0.114918917602)*0.5**o
-      else:
-        arg=(-0.134961573162)*x[0]**o+(0.585433861814)*x[0]+(0.209596676649)*x[1]**o+(0.870867416311)*x[1]+(-0.902854033973)*x[2]**o+(-0.812135783993)*x[2]
-        ref=(-0.693257357324)/(o+1.)+(0.322082747066)+(-0.134961573162)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(0.441677901994)*x[0]**o+(0.0234076994082)*x[0]+(-0.520465368981)*x[1]**o+(-0.668717137452)*x[1]
-        arg[1]=(0.0637451453664)*x[0]**o+(0.610543665309)*x[0]+(0.639008465664)*x[1]**o+(-0.460500756968)*x[1]
-        ref[0]=(-0.520465368981)/(o+1.)+(-0.322654719022)+(0.441677901994)*0.5**o
-        ref[1]=(0.639008465664)/(o+1.)+(0.0750214541708)+(0.0637451453664)*0.5**o
-      else:
-        arg[0]=(0.207042421638)*x[0]**o+(0.586067682859)*x[0]+(-0.731189752251)*x[1]**o+(0.439755444977)*x[1]+(-0.215027146515)*x[2]**o+(-0.22109699198)*x[2]
-        arg[1]=(-0.482897746923)*x[0]**o+(-0.262848758384)*x[0]+(-0.130231246709)*x[1]**o+(0.494143899685)*x[1]+(0.871226664446)*x[2]**o+(-0.45136577521)*x[2]
-        ref[0]=(-0.946216898767)/(o+1.)+(0.402363067928)+(0.207042421638)*0.5**o
-        ref[1]=(0.740995417737)/(o+1.)+(-0.110035316955)+(-0.482897746923)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.418217706031)*x[0]**o+(0.817101274679)*x[0]+(0.359227724634)*x[1]**o+(0.106952446872)*x[1]
-        arg[0,1]=(0.735477258623)*x[0]**o+(-0.181692404492)*x[0]+(0.118248218763)*x[1]**o+(0.910033225874)*x[1]
-        arg[0,2]=(-0.370301174151)*x[0]**o+(0.421589410528)*x[0]+(-0.91974297037)*x[1]**o+(0.676441845707)*x[1]
-        arg[0,3]=(0.170535646217)*x[0]**o+(0.650458506701)*x[0]+(-0.431898202846)*x[1]**o+(-0.89133664224)*x[1]
-        arg[0,4]=(-0.288793192482)*x[0]**o+(-0.752066662422)*x[0]+(0.279565184651)*x[1]**o+(-0.20569858505)*x[1]
-        arg[1,0]=(-0.831478902729)*x[0]**o+(-0.545347589281)*x[0]+(-0.315738709444)*x[1]**o+(-0.407156023524)*x[1]
-        arg[1,1]=(0.119396512736)*x[0]**o+(0.56655186098)*x[0]+(0.798206239231)*x[1]**o+(0.0342467197178)*x[1]
-        arg[1,2]=(-0.264721761214)*x[0]**o+(-0.7583989175)*x[0]+(-0.350411882147)*x[1]**o+(-0.556879396863)*x[1]
-        arg[1,3]=(0.976029513102)*x[0]**o+(-0.117830794452)*x[0]+(0.318067419468)*x[1]**o+(-0.496129688948)*x[1]
-        arg[1,4]=(0.462797018845)*x[0]**o+(-0.214502973992)*x[0]+(0.155052684044)*x[1]**o+(0.264794267973)*x[1]
-        arg[2,0]=(0.193892132778)*x[0]**o+(-0.440406597181)*x[0]+(0.527330868842)*x[1]**o+(0.856602716155)*x[1]
-        arg[2,1]=(0.0418968976051)*x[0]**o+(0.944283628708)*x[0]+(0.923548919008)*x[1]**o+(0.958011594347)*x[1]
-        arg[2,2]=(0.744026460715)*x[0]**o+(0.238896690247)*x[0]+(0.968891312128)*x[1]**o+(0.0636831438113)*x[1]
-        arg[2,3]=(-0.289048983574)*x[0]**o+(0.897469203226)*x[0]+(0.948131139828)*x[1]**o+(0.821749060686)*x[1]
-        arg[2,4]=(-0.903766144138)*x[0]**o+(-0.453139974489)*x[0]+(-0.715818671181)*x[1]**o+(-0.712367492971)*x[1]
-        arg[3,0]=(0.315277263598)*x[0]**o+(-0.676815102073)*x[0]+(0.428704415911)*x[1]**o+(0.54703485039)*x[1]
-        arg[3,1]=(-0.301882901745)*x[0]**o+(0.888822293672)*x[0]+(-0.496204235393)*x[1]**o+(0.210598259748)*x[1]
-        arg[3,2]=(0.568071178492)*x[0]**o+(-0.552863936415)*x[0]+(0.758619958752)*x[1]**o+(0.520428540448)*x[1]
-        arg[3,3]=(0.477425351692)*x[0]**o+(-0.427405588029)*x[0]+(0.197959279245)*x[1]**o+(0.328047998649)*x[1]
-        arg[3,4]=(-0.869704203328)*x[0]**o+(-0.0825164966999)*x[0]+(0.779325592334)*x[1]**o+(0.419916607608)*x[1]
-        ref[0,0]=(0.359227724634)/(o+1.)+(0.462026860776)+(0.418217706031)*0.5**o
-        ref[0,1]=(0.118248218763)/(o+1.)+(0.364170410691)+(0.735477258623)*0.5**o
-        ref[0,2]=(-0.91974297037)/(o+1.)+(0.549015628118)+(-0.370301174151)*0.5**o
-        ref[0,3]=(-0.431898202846)/(o+1.)+(-0.120439067769)+(0.170535646217)*0.5**o
-        ref[0,4]=(0.279565184651)/(o+1.)+(-0.478882623736)+(-0.288793192482)*0.5**o
-        ref[1,0]=(-0.315738709444)/(o+1.)+(-0.476251806402)+(-0.831478902729)*0.5**o
-        ref[1,1]=(0.798206239231)/(o+1.)+(0.300399290349)+(0.119396512736)*0.5**o
-        ref[1,2]=(-0.350411882147)/(o+1.)+(-0.657639157182)+(-0.264721761214)*0.5**o
-        ref[1,3]=(0.318067419468)/(o+1.)+(-0.3069802417)+(0.976029513102)*0.5**o
-        ref[1,4]=(0.155052684044)/(o+1.)+(0.02514564699)+(0.462797018845)*0.5**o
-        ref[2,0]=(0.527330868842)/(o+1.)+(0.208098059487)+(0.193892132778)*0.5**o
-        ref[2,1]=(0.923548919008)/(o+1.)+(0.951147611528)+(0.0418968976051)*0.5**o
-        ref[2,2]=(0.968891312128)/(o+1.)+(0.151289917029)+(0.744026460715)*0.5**o
-        ref[2,3]=(0.948131139828)/(o+1.)+(0.859609131956)+(-0.289048983574)*0.5**o
-        ref[2,4]=(-0.715818671181)/(o+1.)+(-0.58275373373)+(-0.903766144138)*0.5**o
-        ref[3,0]=(0.428704415911)/(o+1.)+(-0.0648901258416)+(0.315277263598)*0.5**o
-        ref[3,1]=(-0.496204235393)/(o+1.)+(0.54971027671)+(-0.301882901745)*0.5**o
-        ref[3,2]=(0.758619958752)/(o+1.)+(-0.0162176979831)+(0.568071178492)*0.5**o
-        ref[3,3]=(0.197959279245)/(o+1.)+(-0.0496787946897)+(0.477425351692)*0.5**o
-        ref[3,4]=(0.779325592334)/(o+1.)+(0.168700055454)+(-0.869704203328)*0.5**o
-      else:
-        arg[0,0]=(0.204452789147)*x[0]**o+(0.411843111144)*x[0]+(-0.0502866367412)*x[1]**o+(0.957356261522)*x[1]+(0.173522462943)*x[2]**o+(-0.0194908382525)*x[2]
-        arg[0,1]=(-0.49641528149)*x[0]**o+(0.158625922243)*x[0]+(0.670932733725)*x[1]**o+(-0.611829064862)*x[1]+(0.758373881782)*x[2]**o+(0.151236368375)*x[2]
-        arg[0,2]=(0.577504765611)*x[0]**o+(0.872996499874)*x[0]+(-0.734000014722)*x[1]**o+(-0.890824538872)*x[1]+(-0.796786080271)*x[2]**o+(-0.389005562901)*x[2]
-        arg[0,3]=(-0.933166619447)*x[0]**o+(-0.528627639194)*x[0]+(-0.828111326322)*x[1]**o+(0.528345547301)*x[1]+(0.99894455165)*x[2]**o+(0.472982583662)*x[2]
-        arg[0,4]=(-0.495503045054)*x[0]**o+(0.629909217292)*x[0]+(0.901515784751)*x[1]**o+(-0.863668288904)*x[1]+(0.76892679355)*x[2]**o+(0.34730747389)*x[2]
-        arg[1,0]=(0.303189803506)*x[0]**o+(-0.17543401741)*x[0]+(-0.283157585975)*x[1]**o+(0.950171529024)*x[1]+(0.0483247572497)*x[2]**o+(-0.604332298954)*x[2]
-        arg[1,1]=(-0.225480407643)*x[0]**o+(-0.0521067696425)*x[0]+(-0.10259234894)*x[1]**o+(0.373551917005)*x[1]+(0.89047195372)*x[2]**o+(-0.292740890417)*x[2]
-        arg[1,2]=(-0.476041156832)*x[0]**o+(0.916078681628)*x[0]+(-0.393887610676)*x[1]**o+(-0.651852504525)*x[1]+(0.611404175606)*x[2]**o+(0.336594647903)*x[2]
-        arg[1,3]=(-0.415178048882)*x[0]**o+(0.145394549559)*x[0]+(0.680115054186)*x[1]**o+(0.261517386893)*x[1]+(0.781566117396)*x[2]**o+(-0.659634539391)*x[2]
-        arg[1,4]=(0.874821341857)*x[0]**o+(0.317418381126)*x[0]+(0.051455923305)*x[1]**o+(0.670170143071)*x[1]+(-0.211902435336)*x[2]**o+(-0.175299130233)*x[2]
-        arg[2,0]=(-0.372961546517)*x[0]**o+(0.199493150648)*x[0]+(-0.630239499285)*x[1]**o+(0.657412283442)*x[1]+(-0.82211915324)*x[2]**o+(-0.468612977158)*x[2]
-        arg[2,1]=(-0.503168527887)*x[0]**o+(0.904406483201)*x[0]+(-0.206179628633)*x[1]**o+(0.0787026584997)*x[1]+(0.899590466467)*x[2]**o+(-0.893401768413)*x[2]
-        arg[2,2]=(-0.860556408954)*x[0]**o+(0.39021140432)*x[0]+(-0.66425383352)*x[1]**o+(0.287711780417)*x[1]+(0.776884760126)*x[2]**o+(-0.115905192334)*x[2]
-        arg[2,3]=(0.461359695993)*x[0]**o+(0.997877835019)*x[0]+(0.0513514112685)*x[1]**o+(-0.904812988908)*x[1]+(-0.903222331838)*x[2]**o+(-0.470185679041)*x[2]
-        arg[2,4]=(-0.646560730528)*x[0]**o+(0.10038324067)*x[0]+(0.426753245517)*x[1]**o+(-0.109889624344)*x[1]+(-0.20158193753)*x[2]**o+(0.014258531224)*x[2]
-        arg[3,0]=(0.364407704271)*x[0]**o+(0.840519040103)*x[0]+(0.528721642544)*x[1]**o+(-0.853679853614)*x[1]+(0.079836122575)*x[2]**o+(-0.439039178308)*x[2]
-        arg[3,1]=(-0.0726491927955)*x[0]**o+(0.217804431494)*x[0]+(-0.454354285545)*x[1]**o+(0.390539936003)*x[1]+(-0.989667912688)*x[2]**o+(-0.0674079606774)*x[2]
-        arg[3,2]=(0.62239422825)*x[0]**o+(0.998733716844)*x[0]+(0.796258161536)*x[1]**o+(0.618545466026)*x[1]+(-0.243188896911)*x[2]**o+(-0.677687584224)*x[2]
-        arg[3,3]=(0.444073180258)*x[0]**o+(-0.764729326792)*x[0]+(-0.823491453567)*x[1]**o+(0.985393963131)*x[1]+(0.623800470977)*x[2]**o+(0.947328422513)*x[2]
-        arg[3,4]=(0.686438920325)*x[0]**o+(0.789760134176)*x[0]+(-0.26011082782)*x[1]**o+(0.0692377043339)*x[1]+(-0.3712894236)*x[2]**o+(-0.542974191103)*x[2]
-        ref[0,0]=(0.123235826202)/(o+1.)+(0.674854267207)+(0.204452789147)*0.5**o
-        ref[0,1]=(1.42930661551)/(o+1.)+(-0.150983387122)+(-0.49641528149)*0.5**o
-        ref[0,2]=(-1.53078609499)/(o+1.)+(-0.203416800949)+(0.577504765611)*0.5**o
-        ref[0,3]=(0.170833225328)/(o+1.)+(0.236350245885)+(-0.933166619447)*0.5**o
-        ref[0,4]=(1.6704425783)/(o+1.)+(0.0567742011389)+(-0.495503045054)*0.5**o
-        ref[1,0]=(-0.234832828725)/(o+1.)+(0.0852026063299)+(0.303189803506)*0.5**o
-        ref[1,1]=(0.787879604779)/(o+1.)+(0.0143521284725)+(-0.225480407643)*0.5**o
-        ref[1,2]=(0.21751656493)/(o+1.)+(0.300410412503)+(-0.476041156832)*0.5**o
-        ref[1,3]=(1.46168117158)/(o+1.)+(-0.126361301469)+(-0.415178048882)*0.5**o
-        ref[1,4]=(-0.160446512031)/(o+1.)+(0.406144696982)+(0.874821341857)*0.5**o
-        ref[2,0]=(-1.45235865253)/(o+1.)+(0.194146228466)+(-0.372961546517)*0.5**o
-        ref[2,1]=(0.693410837835)/(o+1.)+(0.0448536866438)+(-0.503168527887)*0.5**o
-        ref[2,2]=(0.112630926606)/(o+1.)+(0.281008996202)+(-0.860556408954)*0.5**o
-        ref[2,3]=(-0.85187092057)/(o+1.)+(-0.188560416464)+(0.461359695993)*0.5**o
-        ref[2,4]=(0.225171307987)/(o+1.)+(0.00237607377473)+(-0.646560730528)*0.5**o
-        ref[3,0]=(0.608557765119)/(o+1.)+(-0.22609999591)+(0.364407704271)*0.5**o
-        ref[3,1]=(-1.44402219823)/(o+1.)+(0.27046820341)+(-0.0726491927955)*0.5**o
-        ref[3,2]=(0.553069264625)/(o+1.)+(0.469795799323)+(0.62239422825)*0.5**o
-        ref[3,3]=(-0.19969098259)/(o+1.)+(0.583996529426)+(0.444073180258)*0.5**o
-        ref[3,4]=(-0.631400251421)/(o+1.)+(0.158011823704)+(0.686438920325)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.963014866001)*x[0]**o+(-0.592091539519)*x[0]+(0.397897510985)*x[1]**o+(0.485612885034)*x[1]
-        arg[0,0,1]=(-0.764849027936)*x[0]**o+(0.936217923087)*x[0]+(-0.6256860991)*x[1]**o+(0.162359755936)*x[1]
-        arg[0,1,0]=(-0.269607090458)*x[0]**o+(0.197100067821)*x[0]+(-0.216513043667)*x[1]**o+(0.143038940436)*x[1]
-        arg[0,1,1]=(-0.432206914977)*x[0]**o+(0.177851208963)*x[0]+(0.0477652910843)*x[1]**o+(0.278333389583)*x[1]
-        arg[1,0,0]=(-0.123940629628)*x[0]**o+(0.818553665062)*x[0]+(-0.168322144522)*x[1]**o+(0.485324994762)*x[1]
-        arg[1,0,1]=(0.593609516922)*x[0]**o+(0.530508390905)*x[0]+(-0.938421636915)*x[1]**o+(-0.686459217917)*x[1]
-        arg[1,1,0]=(-0.874022523162)*x[0]**o+(0.694500749056)*x[0]+(-0.650951516798)*x[1]**o+(0.45826621855)*x[1]
-        arg[1,1,1]=(-0.259058106634)*x[0]**o+(0.0837282545694)*x[0]+(0.465734884341)*x[1]**o+(0.185558060279)*x[1]
-        arg[2,0,0]=(0.346292866419)*x[0]**o+(0.982902010078)*x[0]+(0.0297606445334)*x[1]**o+(0.339043518987)*x[1]
-        arg[2,0,1]=(0.749684718966)*x[0]**o+(-0.855799436867)*x[0]+(-0.186333913876)*x[1]**o+(-0.548968316245)*x[1]
-        arg[2,1,0]=(-0.255759466052)*x[0]**o+(0.441882703647)*x[0]+(-0.0239807362322)*x[1]**o+(-0.236417762222)*x[1]
-        arg[2,1,1]=(-0.0586694299212)*x[0]**o+(-0.912208422332)*x[0]+(-0.11610871626)*x[1]**o+(-0.512805786403)*x[1]
-        arg[3,0,0]=(0.826027179564)*x[0]**o+(-0.589876767386)*x[0]+(-0.654858828463)*x[1]**o+(0.601656609023)*x[1]
-        arg[3,0,1]=(-0.148714999203)*x[0]**o+(-0.409138795316)*x[0]+(0.290726299307)*x[1]**o+(-0.94009130345)*x[1]
-        arg[3,1,0]=(0.63431415979)*x[0]**o+(-0.184553980231)*x[0]+(0.4087395755)*x[1]**o+(-0.694376406449)*x[1]
-        arg[3,1,1]=(-0.000928514830108)*x[0]**o+(-0.782814501236)*x[0]+(0.177390244103)*x[1]**o+(0.698562703841)*x[1]
-        arg[4,0,0]=(-0.939264907756)*x[0]**o+(0.191360117367)*x[0]+(-0.318750748728)*x[1]**o+(0.910713477162)*x[1]
-        arg[4,0,1]=(-0.105186863713)*x[0]**o+(0.0319652211881)*x[0]+(0.118896230389)*x[1]**o+(-0.212677289177)*x[1]
-        arg[4,1,0]=(-0.702838100428)*x[0]**o+(0.881695294345)*x[0]+(0.728231539571)*x[1]**o+(-0.192311604244)*x[1]
-        arg[4,1,1]=(0.25197450886)*x[0]**o+(0.464857988125)*x[0]+(0.851996888259)*x[1]**o+(-0.408525083481)*x[1]
-        arg[5,0,0]=(0.665627182446)*x[0]**o+(0.5367740452)*x[0]+(0.295800616406)*x[1]**o+(0.0620589956995)*x[1]
-        arg[5,0,1]=(-0.37320168697)*x[0]**o+(0.072855481498)*x[0]+(0.539806161326)*x[1]**o+(-0.999091813027)*x[1]
-        arg[5,1,0]=(-0.060845772709)*x[0]**o+(-0.931869215952)*x[0]+(-0.393477853475)*x[1]**o+(0.968288081996)*x[1]
-        arg[5,1,1]=(-0.0768045781739)*x[0]**o+(-0.257318730887)*x[0]+(0.781473167319)*x[1]**o+(-0.458870794544)*x[1]
-        ref[0,0,0]=(0.397897510985)/(o+1.)+(-0.0532393272425)+(-0.963014866001)*0.5**o
-        ref[0,0,1]=(-0.6256860991)/(o+1.)+(0.549288839511)+(-0.764849027936)*0.5**o
-        ref[0,1,0]=(-0.216513043667)/(o+1.)+(0.170069504128)+(-0.269607090458)*0.5**o
-        ref[0,1,1]=(0.0477652910843)/(o+1.)+(0.228092299273)+(-0.432206914977)*0.5**o
-        ref[1,0,0]=(-0.168322144522)/(o+1.)+(0.651939329912)+(-0.123940629628)*0.5**o
-        ref[1,0,1]=(-0.938421636915)/(o+1.)+(-0.0779754135063)+(0.593609516922)*0.5**o
-        ref[1,1,0]=(-0.650951516798)/(o+1.)+(0.576383483803)+(-0.874022523162)*0.5**o
-        ref[1,1,1]=(0.465734884341)/(o+1.)+(0.134643157424)+(-0.259058106634)*0.5**o
-        ref[2,0,0]=(0.0297606445334)/(o+1.)+(0.660972764533)+(0.346292866419)*0.5**o
-        ref[2,0,1]=(-0.186333913876)/(o+1.)+(-0.702383876556)+(0.749684718966)*0.5**o
-        ref[2,1,0]=(-0.0239807362322)/(o+1.)+(0.102732470713)+(-0.255759466052)*0.5**o
-        ref[2,1,1]=(-0.11610871626)/(o+1.)+(-0.712507104367)+(-0.0586694299212)*0.5**o
-        ref[3,0,0]=(-0.654858828463)/(o+1.)+(0.0058899208184)+(0.826027179564)*0.5**o
-        ref[3,0,1]=(0.290726299307)/(o+1.)+(-0.674615049383)+(-0.148714999203)*0.5**o
-        ref[3,1,0]=(0.4087395755)/(o+1.)+(-0.43946519334)+(0.63431415979)*0.5**o
-        ref[3,1,1]=(0.177390244103)/(o+1.)+(-0.0421258986973)+(-0.000928514830108)*0.5**o
-        ref[4,0,0]=(-0.318750748728)/(o+1.)+(0.551036797264)+(-0.939264907756)*0.5**o
-        ref[4,0,1]=(0.118896230389)/(o+1.)+(-0.0903560339946)+(-0.105186863713)*0.5**o
-        ref[4,1,0]=(0.728231539571)/(o+1.)+(0.344691845051)+(-0.702838100428)*0.5**o
-        ref[4,1,1]=(0.851996888259)/(o+1.)+(0.0281664523221)+(0.25197450886)*0.5**o
-        ref[5,0,0]=(0.295800616406)/(o+1.)+(0.29941652045)+(0.665627182446)*0.5**o
-        ref[5,0,1]=(0.539806161326)/(o+1.)+(-0.463118165764)+(-0.37320168697)*0.5**o
-        ref[5,1,0]=(-0.393477853475)/(o+1.)+(0.0182094330217)+(-0.060845772709)*0.5**o
-        ref[5,1,1]=(0.781473167319)/(o+1.)+(-0.358094762716)+(-0.0768045781739)*0.5**o
-      else:
-        arg[0,0,0]=(0.638389367885)*x[0]**o+(-0.77703387527)*x[0]+(0.951496212227)*x[1]**o+(-0.484305156823)*x[1]+(-0.582437996275)*x[2]**o+(-0.460130065965)*x[2]
-        arg[0,0,1]=(0.859011160063)*x[0]**o+(0.999372374168)*x[0]+(-0.946049724069)*x[1]**o+(0.522184535496)*x[1]+(0.00820405492191)*x[2]**o+(0.769305042211)*x[2]
-        arg[0,1,0]=(-0.998681640062)*x[0]**o+(0.916063974594)*x[0]+(0.0801858148899)*x[1]**o+(0.475476401258)*x[1]+(-0.805247247843)*x[2]**o+(-0.809331278141)*x[2]
-        arg[0,1,1]=(0.1340261052)*x[0]**o+(0.843204972218)*x[0]+(-0.809433597166)*x[1]**o+(-0.947798215446)*x[1]+(0.268796347717)*x[2]**o+(-0.896620567629)*x[2]
-        arg[1,0,0]=(0.251201824008)*x[0]**o+(0.762438451805)*x[0]+(0.892722429031)*x[1]**o+(0.146944927124)*x[1]+(0.00953973207152)*x[2]**o+(0.423262196414)*x[2]
-        arg[1,0,1]=(-0.258843593921)*x[0]**o+(-0.950574260099)*x[0]+(-0.49096256134)*x[1]**o+(0.446238902975)*x[1]+(-0.880706204083)*x[2]**o+(-0.400075002454)*x[2]
-        arg[1,1,0]=(-0.854529145157)*x[0]**o+(0.118165533114)*x[0]+(-0.913218271084)*x[1]**o+(0.991977570414)*x[1]+(0.626241160161)*x[2]**o+(0.667843914102)*x[2]
-        arg[1,1,1]=(0.636818650335)*x[0]**o+(-0.174996100829)*x[0]+(0.77317621688)*x[1]**o+(0.369280208456)*x[1]+(-0.0130124322187)*x[2]**o+(0.857098751007)*x[2]
-        arg[2,0,0]=(-0.415847479141)*x[0]**o+(0.675986357495)*x[0]+(0.704926614111)*x[1]**o+(-0.166544295134)*x[1]+(-0.00917226654826)*x[2]**o+(-0.896432190739)*x[2]
-        arg[2,0,1]=(-0.882383192316)*x[0]**o+(0.11122730635)*x[0]+(-0.693587089789)*x[1]**o+(-0.0905457091132)*x[1]+(-0.610526000157)*x[2]**o+(-0.992542379681)*x[2]
-        arg[2,1,0]=(-0.476987072283)*x[0]**o+(-0.450296923812)*x[0]+(0.905270434608)*x[1]**o+(0.976270820516)*x[1]+(-0.233422717373)*x[2]**o+(-0.641253735386)*x[2]
-        arg[2,1,1]=(0.873832514958)*x[0]**o+(-0.478059419217)*x[0]+(-0.941650455606)*x[1]**o+(0.307250152442)*x[1]+(0.865160620819)*x[2]**o+(0.961340749451)*x[2]
-        arg[3,0,0]=(-0.443837945036)*x[0]**o+(-0.688773058425)*x[0]+(-0.654988618952)*x[1]**o+(-0.259511611372)*x[1]+(-0.931332326494)*x[2]**o+(0.939379631125)*x[2]
-        arg[3,0,1]=(-0.181860312567)*x[0]**o+(-0.229066064127)*x[0]+(-0.359408642857)*x[1]**o+(-0.47945907585)*x[1]+(0.312345402782)*x[2]**o+(0.559298232285)*x[2]
-        arg[3,1,0]=(-0.372379819015)*x[0]**o+(0.308179383085)*x[0]+(0.123613160006)*x[1]**o+(0.191944822984)*x[1]+(0.950869988808)*x[2]**o+(0.229360419984)*x[2]
-        arg[3,1,1]=(-0.803126271269)*x[0]**o+(0.833324260042)*x[0]+(-0.917001746509)*x[1]**o+(-0.649776906898)*x[1]+(0.49624769362)*x[2]**o+(0.414080802594)*x[2]
-        arg[4,0,0]=(-0.951747333891)*x[0]**o+(0.5919442178)*x[0]+(0.121310623341)*x[1]**o+(-0.321939845724)*x[1]+(0.358051737083)*x[2]**o+(-0.222801347833)*x[2]
-        arg[4,0,1]=(-0.59462534105)*x[0]**o+(0.943860617698)*x[0]+(0.787822231831)*x[1]**o+(-0.0913435772425)*x[1]+(0.831651946729)*x[2]**o+(-0.903604465879)*x[2]
-        arg[4,1,0]=(0.68655463207)*x[0]**o+(-0.98918689213)*x[0]+(0.251300089098)*x[1]**o+(-0.317828131349)*x[1]+(-0.105934216764)*x[2]**o+(-0.874506361945)*x[2]
-        arg[4,1,1]=(-0.80544616293)*x[0]**o+(-0.321523684723)*x[0]+(0.874455533992)*x[1]**o+(0.200912811442)*x[1]+(-0.646776981862)*x[2]**o+(-0.988728118812)*x[2]
-        arg[5,0,0]=(0.413387141328)*x[0]**o+(0.349210032211)*x[0]+(0.80870689028)*x[1]**o+(-0.633296311752)*x[1]+(0.24621029112)*x[2]**o+(0.853398479355)*x[2]
-        arg[5,0,1]=(0.398787817372)*x[0]**o+(0.662875239272)*x[0]+(-0.719962467558)*x[1]**o+(0.49562860294)*x[1]+(-0.694859272211)*x[2]**o+(-0.792616661463)*x[2]
-        arg[5,1,0]=(-0.298838035128)*x[0]**o+(0.121578680468)*x[0]+(-0.931062588633)*x[1]**o+(-0.0575832984853)*x[1]+(-0.696140085453)*x[2]**o+(0.836738246058)*x[2]
-        arg[5,1,1]=(-0.949626960081)*x[0]**o+(-0.449843145228)*x[0]+(-0.304260073311)*x[1]**o+(-0.258880519466)*x[1]+(0.880466679751)*x[2]**o+(0.97505579364)*x[2]
-        ref[0,0,0]=(0.369058215952)/(o+1.)+(-0.860734549029)+(0.638389367885)*0.5**o
-        ref[0,0,1]=(-0.937845669147)/(o+1.)+(1.14543097594)+(0.859011160063)*0.5**o
-        ref[0,1,0]=(-0.725061432954)/(o+1.)+(0.291104548855)+(-0.998681640062)*0.5**o
-        ref[0,1,1]=(-0.540637249448)/(o+1.)+(-0.500606905428)+(0.1340261052)*0.5**o
-        ref[1,0,0]=(0.902262161102)/(o+1.)+(0.666322787672)+(0.251201824008)*0.5**o
-        ref[1,0,1]=(-1.37166876542)/(o+1.)+(-0.452205179789)+(-0.258843593921)*0.5**o
-        ref[1,1,0]=(-0.286977110923)/(o+1.)+(0.888993508815)+(-0.854529145157)*0.5**o
-        ref[1,1,1]=(0.760163784662)/(o+1.)+(0.525691429317)+(0.636818650335)*0.5**o
-        ref[2,0,0]=(0.695754347563)/(o+1.)+(-0.193495064189)+(-0.415847479141)*0.5**o
-        ref[2,0,1]=(-1.30411308995)/(o+1.)+(-0.485930391222)+(-0.882383192316)*0.5**o
-        ref[2,1,0]=(0.671847717235)/(o+1.)+(-0.0576399193408)+(-0.476987072283)*0.5**o
-        ref[2,1,1]=(-0.0764898347868)/(o+1.)+(0.395265741338)+(0.873832514958)*0.5**o
-        ref[3,0,0]=(-1.58632094545)/(o+1.)+(-0.00445251933618)+(-0.443837945036)*0.5**o
-        ref[3,0,1]=(-0.0470632400747)/(o+1.)+(-0.0746134538458)+(-0.181860312567)*0.5**o
-        ref[3,1,0]=(1.07448314881)/(o+1.)+(0.364742313027)+(-0.372379819015)*0.5**o
-        ref[3,1,1]=(-0.420754052889)/(o+1.)+(0.298814077869)+(-0.803126271269)*0.5**o
-        ref[4,0,0]=(0.479362360424)/(o+1.)+(0.0236015121217)+(-0.951747333891)*0.5**o
-        ref[4,0,1]=(1.61947417856)/(o+1.)+(-0.0255437127116)+(-0.59462534105)*0.5**o
-        ref[4,1,0]=(0.145365872334)/(o+1.)+(-1.09076069271)+(0.68655463207)*0.5**o
-        ref[4,1,1]=(0.22767855213)/(o+1.)+(-0.554669496046)+(-0.80544616293)*0.5**o
-        ref[5,0,0]=(1.0549171814)/(o+1.)+(0.284656099907)+(0.413387141328)*0.5**o
-        ref[5,0,1]=(-1.41482173977)/(o+1.)+(0.182943590374)+(0.398787817372)*0.5**o
-        ref[5,1,0]=(-1.62720267409)/(o+1.)+(0.450366814021)+(-0.298838035128)*0.5**o
-        ref[5,1,1]=(0.576206606439)/(o+1.)+(0.133166064473)+(-0.949626960081)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.392628958003)*x[0]**o+(0.186084293395)*x[0]+(0.965300679335)*x[1]**o+(0.0986282244747)*x[1]
-        arg[0,0,0,1]=(-0.503312425492)*x[0]**o+(-0.205791466802)*x[0]+(0.384782163488)*x[1]**o+(-0.608371097114)*x[1]
-        arg[0,0,1,0]=(0.660162511699)*x[0]**o+(-0.263141686561)*x[0]+(-0.765235012795)*x[1]**o+(-0.371233144611)*x[1]
-        arg[0,0,1,1]=(-0.986935412732)*x[0]**o+(0.645433351743)*x[0]+(-0.451665346257)*x[1]**o+(-0.713815759872)*x[1]
-        arg[0,0,2,0]=(0.632875178502)*x[0]**o+(-0.257542208821)*x[0]+(-0.695553902133)*x[1]**o+(-0.677920876645)*x[1]
-        arg[0,0,2,1]=(0.102625648731)*x[0]**o+(0.511896902175)*x[0]+(0.345909088853)*x[1]**o+(-0.0609413722414)*x[1]
-        arg[0,1,0,0]=(-0.0108106931425)*x[0]**o+(-0.595497517075)*x[0]+(0.332480141972)*x[1]**o+(-0.18131109924)*x[1]
-        arg[0,1,0,1]=(0.220826593491)*x[0]**o+(-0.202422451222)*x[0]+(0.328480565578)*x[1]**o+(0.851432750557)*x[1]
-        arg[0,1,1,0]=(0.22735402466)*x[0]**o+(0.51437836535)*x[0]+(0.292927451477)*x[1]**o+(-0.148121856023)*x[1]
-        arg[0,1,1,1]=(0.495079875966)*x[0]**o+(0.582755117761)*x[0]+(-0.322061131008)*x[1]**o+(0.953437449986)*x[1]
-        arg[0,1,2,0]=(0.968583889554)*x[0]**o+(-0.593253483731)*x[0]+(0.286037351205)*x[1]**o+(0.997314411263)*x[1]
-        arg[0,1,2,1]=(0.361498191707)*x[0]**o+(0.633275777697)*x[0]+(0.891305263219)*x[1]**o+(-0.194468605638)*x[1]
-        arg[0,2,0,0]=(0.185647566516)*x[0]**o+(0.101448861247)*x[0]+(0.0870608077911)*x[1]**o+(-0.86477908948)*x[1]
-        arg[0,2,0,1]=(0.227262327826)*x[0]**o+(0.812586702875)*x[0]+(-0.0229924234496)*x[1]**o+(-0.323581477982)*x[1]
-        arg[0,2,1,0]=(0.0405753322301)*x[0]**o+(0.891289727227)*x[0]+(0.957377329048)*x[1]**o+(-0.982119724379)*x[1]
-        arg[0,2,1,1]=(-0.546046301701)*x[0]**o+(0.628511534929)*x[0]+(-0.628262263897)*x[1]**o+(-0.454315708999)*x[1]
-        arg[0,2,2,0]=(-0.828455793175)*x[0]**o+(0.190147126828)*x[0]+(0.499595322279)*x[1]**o+(-0.0882297087937)*x[1]
-        arg[0,2,2,1]=(0.926138085222)*x[0]**o+(0.402659001583)*x[0]+(-0.678432418122)*x[1]**o+(0.236054704896)*x[1]
-        arg[0,3,0,0]=(-0.473066058658)*x[0]**o+(0.57622727181)*x[0]+(0.62665109546)*x[1]**o+(0.948409659533)*x[1]
-        arg[0,3,0,1]=(0.776790978673)*x[0]**o+(-0.0244752180934)*x[0]+(-0.459252843816)*x[1]**o+(0.616203849528)*x[1]
-        arg[0,3,1,0]=(0.34783214571)*x[0]**o+(0.806528120142)*x[0]+(0.445864469556)*x[1]**o+(-0.221961922099)*x[1]
-        arg[0,3,1,1]=(0.0717966037463)*x[0]**o+(-0.434117388366)*x[0]+(0.577708844669)*x[1]**o+(-0.548519157145)*x[1]
-        arg[0,3,2,0]=(-0.548573971799)*x[0]**o+(-0.926704595492)*x[0]+(-0.33936340707)*x[1]**o+(0.0687290934591)*x[1]
-        arg[0,3,2,1]=(-0.28309240461)*x[0]**o+(0.12914675768)*x[0]+(-0.833323497891)*x[1]**o+(-0.577727985559)*x[1]
-        arg[0,4,0,0]=(-0.105416428922)*x[0]**o+(0.41564239907)*x[0]+(0.146657173319)*x[1]**o+(-0.0141417271845)*x[1]
-        arg[0,4,0,1]=(-0.876111094069)*x[0]**o+(0.491957669628)*x[0]+(0.534941970665)*x[1]**o+(-0.995507289274)*x[1]
-        arg[0,4,1,0]=(-0.678996394303)*x[0]**o+(0.183159947613)*x[0]+(-0.739368558349)*x[1]**o+(0.274319401135)*x[1]
-        arg[0,4,1,1]=(0.0472145581152)*x[0]**o+(-0.669737608207)*x[0]+(-0.651647023142)*x[1]**o+(0.351208329111)*x[1]
-        arg[0,4,2,0]=(0.114936857967)*x[0]**o+(0.564688790898)*x[0]+(-0.524234284672)*x[1]**o+(-0.127615425724)*x[1]
-        arg[0,4,2,1]=(0.568834117773)*x[0]**o+(-0.936513147599)*x[0]+(0.133122220811)*x[1]**o+(0.31510090512)*x[1]
-        arg[1,0,0,0]=(-0.821241886235)*x[0]**o+(0.779734235239)*x[0]+(-0.132449009841)*x[1]**o+(-0.0179700618848)*x[1]
-        arg[1,0,0,1]=(0.624372422235)*x[0]**o+(-0.752831611955)*x[0]+(-0.573597121344)*x[1]**o+(0.376463665377)*x[1]
-        arg[1,0,1,0]=(-0.568749808355)*x[0]**o+(-0.697521100346)*x[0]+(-0.249786553024)*x[1]**o+(-0.624593568423)*x[1]
-        arg[1,0,1,1]=(0.0765557360835)*x[0]**o+(-0.744005823966)*x[0]+(0.59246455477)*x[1]**o+(0.231310687774)*x[1]
-        arg[1,0,2,0]=(0.909614864187)*x[0]**o+(0.350543076144)*x[0]+(0.0689432766231)*x[1]**o+(-0.88465698758)*x[1]
-        arg[1,0,2,1]=(0.0610206203468)*x[0]**o+(0.620401328094)*x[0]+(0.378273922837)*x[1]**o+(0.91988744934)*x[1]
-        arg[1,1,0,0]=(0.917249169051)*x[0]**o+(0.756656473206)*x[0]+(0.728786835113)*x[1]**o+(0.116994159781)*x[1]
-        arg[1,1,0,1]=(0.331129708654)*x[0]**o+(-0.14342302905)*x[0]+(-0.418402258918)*x[1]**o+(-0.808676850609)*x[1]
-        arg[1,1,1,0]=(-0.527408405279)*x[0]**o+(-0.671440239997)*x[0]+(0.989603613532)*x[1]**o+(0.364280392731)*x[1]
-        arg[1,1,1,1]=(-0.189543145217)*x[0]**o+(0.14762392216)*x[0]+(0.11459047938)*x[1]**o+(-0.760477267267)*x[1]
-        arg[1,1,2,0]=(0.385274935809)*x[0]**o+(0.527744200995)*x[0]+(-0.862654310338)*x[1]**o+(0.904005467598)*x[1]
-        arg[1,1,2,1]=(-0.380421555378)*x[0]**o+(0.598300323394)*x[0]+(-0.541819816686)*x[1]**o+(0.446934572528)*x[1]
-        arg[1,2,0,0]=(0.446781075767)*x[0]**o+(0.906830344178)*x[0]+(0.158734254777)*x[1]**o+(-0.722982586936)*x[1]
-        arg[1,2,0,1]=(0.927811104869)*x[0]**o+(-0.446795135388)*x[0]+(-0.90301726295)*x[1]**o+(0.289530807979)*x[1]
-        arg[1,2,1,0]=(0.741527109588)*x[0]**o+(-0.370029728344)*x[0]+(0.157695458386)*x[1]**o+(-0.620804465293)*x[1]
-        arg[1,2,1,1]=(0.193242816889)*x[0]**o+(0.455789913444)*x[0]+(0.0491001091271)*x[1]**o+(-0.942127264151)*x[1]
-        arg[1,2,2,0]=(0.220709813709)*x[0]**o+(-0.713472965425)*x[0]+(-0.736262418061)*x[1]**o+(0.341347605023)*x[1]
-        arg[1,2,2,1]=(0.0034506429721)*x[0]**o+(0.397289753453)*x[0]+(-0.167013881353)*x[1]**o+(0.390364445974)*x[1]
-        arg[1,3,0,0]=(0.321471168172)*x[0]**o+(-0.237896433618)*x[0]+(-0.199843421009)*x[1]**o+(0.811319091471)*x[1]
-        arg[1,3,0,1]=(-0.0799622908037)*x[0]**o+(-0.66155883346)*x[0]+(0.0303112997369)*x[1]**o+(-0.199256497975)*x[1]
-        arg[1,3,1,0]=(-0.12051943489)*x[0]**o+(0.674374603779)*x[0]+(0.335933608833)*x[1]**o+(0.366671959553)*x[1]
-        arg[1,3,1,1]=(-0.587242845986)*x[0]**o+(-0.495652656487)*x[0]+(0.10609614346)*x[1]**o+(0.177210588935)*x[1]
-        arg[1,3,2,0]=(0.947782336638)*x[0]**o+(-0.327283099142)*x[0]+(-0.0280648836948)*x[1]**o+(0.133334543825)*x[1]
-        arg[1,3,2,1]=(-0.0887414134508)*x[0]**o+(0.640694455701)*x[0]+(0.266916366237)*x[1]**o+(0.345886606493)*x[1]
-        arg[1,4,0,0]=(-0.138184872938)*x[0]**o+(0.658635897645)*x[0]+(-0.00526240442626)*x[1]**o+(0.800443113371)*x[1]
-        arg[1,4,0,1]=(-0.549831917928)*x[0]**o+(-0.666733703837)*x[0]+(0.400982699808)*x[1]**o+(0.739099662817)*x[1]
-        arg[1,4,1,0]=(-0.137046722563)*x[0]**o+(-0.818450480933)*x[0]+(-0.827665726293)*x[1]**o+(-0.286585607624)*x[1]
-        arg[1,4,1,1]=(-0.474156202572)*x[0]**o+(-0.855381707793)*x[0]+(0.113318564035)*x[1]**o+(0.218410511108)*x[1]
-        arg[1,4,2,0]=(0.18476112439)*x[0]**o+(-0.964533442641)*x[0]+(-0.968611931598)*x[1]**o+(0.0973026144203)*x[1]
-        arg[1,4,2,1]=(-0.372995418552)*x[0]**o+(0.998322146553)*x[0]+(-0.384672070744)*x[1]**o+(0.47536977268)*x[1]
-        arg[2,0,0,0]=(0.882400857222)*x[0]**o+(0.455324640128)*x[0]+(0.764297272234)*x[1]**o+(0.498669000791)*x[1]
-        arg[2,0,0,1]=(0.894017590794)*x[0]**o+(0.217984119634)*x[0]+(-0.0934000967188)*x[1]**o+(-0.886960376026)*x[1]
-        arg[2,0,1,0]=(-0.382158057826)*x[0]**o+(-0.897639065996)*x[0]+(0.819002513335)*x[1]**o+(-0.0739374877518)*x[1]
-        arg[2,0,1,1]=(-0.259771272131)*x[0]**o+(-0.533540086977)*x[0]+(0.366917477923)*x[1]**o+(-0.751904525722)*x[1]
-        arg[2,0,2,0]=(-0.33946164111)*x[0]**o+(-0.317441178182)*x[0]+(-0.857625945147)*x[1]**o+(-0.84647892719)*x[1]
-        arg[2,0,2,1]=(0.153353093148)*x[0]**o+(0.832883645984)*x[0]+(-0.359476461654)*x[1]**o+(0.332390899654)*x[1]
-        arg[2,1,0,0]=(0.780980225775)*x[0]**o+(0.619330950566)*x[0]+(0.194312746335)*x[1]**o+(0.595311976655)*x[1]
-        arg[2,1,0,1]=(-0.334149973283)*x[0]**o+(-0.670178805858)*x[0]+(-0.313038325156)*x[1]**o+(0.793149618246)*x[1]
-        arg[2,1,1,0]=(-0.832852528577)*x[0]**o+(-0.606634692926)*x[0]+(-0.0643816133251)*x[1]**o+(-0.663765987285)*x[1]
-        arg[2,1,1,1]=(0.300975732963)*x[0]**o+(0.965431406497)*x[0]+(-0.618456119184)*x[1]**o+(0.459530421885)*x[1]
-        arg[2,1,2,0]=(0.122326105776)*x[0]**o+(0.0940802696378)*x[0]+(-0.986852501828)*x[1]**o+(0.370428043236)*x[1]
-        arg[2,1,2,1]=(0.447916985436)*x[0]**o+(-0.161926311978)*x[0]+(-0.0933563424166)*x[1]**o+(0.836290263421)*x[1]
-        arg[2,2,0,0]=(0.032076347277)*x[0]**o+(-0.447517143643)*x[0]+(-0.053769157756)*x[1]**o+(-0.0242981207801)*x[1]
-        arg[2,2,0,1]=(-0.403935703163)*x[0]**o+(-0.960750093184)*x[0]+(-0.287956277998)*x[1]**o+(-0.168614701082)*x[1]
-        arg[2,2,1,0]=(-0.205077009492)*x[0]**o+(-0.409536289697)*x[0]+(0.359071620541)*x[1]**o+(-0.466455759025)*x[1]
-        arg[2,2,1,1]=(0.443658057141)*x[0]**o+(-0.748681939527)*x[0]+(0.2153167916)*x[1]**o+(-0.475899799738)*x[1]
-        arg[2,2,2,0]=(-0.463879681251)*x[0]**o+(0.758317222041)*x[0]+(0.608221916958)*x[1]**o+(-0.237798399085)*x[1]
-        arg[2,2,2,1]=(0.533981754168)*x[0]**o+(0.590125912931)*x[0]+(0.8957267808)*x[1]**o+(0.294612478767)*x[1]
-        arg[2,3,0,0]=(0.499387701403)*x[0]**o+(0.0379132293822)*x[0]+(0.717384215206)*x[1]**o+(0.754497698503)*x[1]
-        arg[2,3,0,1]=(0.866500398882)*x[0]**o+(0.23678788012)*x[0]+(0.395132533716)*x[1]**o+(-0.451619930593)*x[1]
-        arg[2,3,1,0]=(-0.879663354176)*x[0]**o+(-0.328937922978)*x[0]+(0.688771917581)*x[1]**o+(-0.87392051489)*x[1]
-        arg[2,3,1,1]=(0.291214284356)*x[0]**o+(-0.783159133488)*x[0]+(0.240960084233)*x[1]**o+(0.339043900275)*x[1]
-        arg[2,3,2,0]=(0.47064755192)*x[0]**o+(-0.42618815064)*x[0]+(-0.505342655776)*x[1]**o+(0.408218280069)*x[1]
-        arg[2,3,2,1]=(0.775731405735)*x[0]**o+(-0.768750178591)*x[0]+(-0.896333275063)*x[1]**o+(0.286558848957)*x[1]
-        arg[2,4,0,0]=(-0.7221248688)*x[0]**o+(0.612509823967)*x[0]+(0.436744528143)*x[1]**o+(-0.761502758764)*x[1]
-        arg[2,4,0,1]=(-0.742652222385)*x[0]**o+(0.214811997988)*x[0]+(-0.031320962337)*x[1]**o+(-0.320134664789)*x[1]
-        arg[2,4,1,0]=(-0.529575527815)*x[0]**o+(0.623770482091)*x[0]+(-0.50790148262)*x[1]**o+(0.629874274271)*x[1]
-        arg[2,4,1,1]=(0.535631957883)*x[0]**o+(0.439578618993)*x[0]+(-0.770747718564)*x[1]**o+(0.0798696116058)*x[1]
-        arg[2,4,2,0]=(0.81688202721)*x[0]**o+(-0.0301054197201)*x[0]+(0.613495031968)*x[1]**o+(-0.153619455295)*x[1]
-        arg[2,4,2,1]=(0.493471708612)*x[0]**o+(0.423626757568)*x[0]+(0.093174141001)*x[1]**o+(0.307452108722)*x[1]
-        arg[3,0,0,0]=(-0.0668630243284)*x[0]**o+(-0.577709692979)*x[0]+(0.984307685082)*x[1]**o+(-0.171487030152)*x[1]
-        arg[3,0,0,1]=(-0.210452484293)*x[0]**o+(-0.130476372055)*x[0]+(-0.693596086089)*x[1]**o+(-0.692143724329)*x[1]
-        arg[3,0,1,0]=(-0.34853285523)*x[0]**o+(-0.369649709966)*x[0]+(0.824648362105)*x[1]**o+(0.733046240399)*x[1]
-        arg[3,0,1,1]=(0.861903045965)*x[0]**o+(0.609535692452)*x[0]+(0.681514895836)*x[1]**o+(0.66773275418)*x[1]
-        arg[3,0,2,0]=(0.0197670342844)*x[0]**o+(-0.251645539228)*x[0]+(-0.0390293468405)*x[1]**o+(-0.00955605638373)*x[1]
-        arg[3,0,2,1]=(-0.499093940395)*x[0]**o+(0.660356623112)*x[0]+(0.969057635866)*x[1]**o+(-0.821377317197)*x[1]
-        arg[3,1,0,0]=(-0.955568800095)*x[0]**o+(0.557877698917)*x[0]+(0.829599262959)*x[1]**o+(0.933736802562)*x[1]
-        arg[3,1,0,1]=(-0.910307638058)*x[0]**o+(-0.3287646946)*x[0]+(-0.777548579252)*x[1]**o+(-0.971744353969)*x[1]
-        arg[3,1,1,0]=(0.22353820834)*x[0]**o+(0.904479243377)*x[0]+(-0.108768166204)*x[1]**o+(0.823767232517)*x[1]
-        arg[3,1,1,1]=(0.371995768061)*x[0]**o+(0.747630377273)*x[0]+(0.931152588498)*x[1]**o+(-0.0154330268188)*x[1]
-        arg[3,1,2,0]=(0.4567417369)*x[0]**o+(0.424951293892)*x[0]+(-0.14032259215)*x[1]**o+(0.603329614924)*x[1]
-        arg[3,1,2,1]=(-0.855100213731)*x[0]**o+(-0.667832882495)*x[0]+(0.942530922378)*x[1]**o+(0.55861156259)*x[1]
-        arg[3,2,0,0]=(0.17190936572)*x[0]**o+(-0.904098615762)*x[0]+(0.991497679624)*x[1]**o+(0.373020358381)*x[1]
-        arg[3,2,0,1]=(-0.683587206983)*x[0]**o+(0.718257814718)*x[0]+(-0.730243933765)*x[1]**o+(-0.583892189979)*x[1]
-        arg[3,2,1,0]=(0.051672736629)*x[0]**o+(-0.991172563807)*x[0]+(0.36605487466)*x[1]**o+(0.680719877794)*x[1]
-        arg[3,2,1,1]=(0.438014662973)*x[0]**o+(0.172969450125)*x[0]+(-0.424515284177)*x[1]**o+(0.615315132547)*x[1]
-        arg[3,2,2,0]=(-0.709499532674)*x[0]**o+(0.985097212621)*x[0]+(0.326610298255)*x[1]**o+(0.994701669258)*x[1]
-        arg[3,2,2,1]=(-0.657647707844)*x[0]**o+(-0.683954483768)*x[0]+(-0.846657945161)*x[1]**o+(0.852308904063)*x[1]
-        arg[3,3,0,0]=(0.21346320453)*x[0]**o+(-0.181665119768)*x[0]+(0.549866100727)*x[1]**o+(-0.0858045316871)*x[1]
-        arg[3,3,0,1]=(0.249957470685)*x[0]**o+(0.537464773638)*x[0]+(0.0224330511636)*x[1]**o+(0.114623595638)*x[1]
-        arg[3,3,1,0]=(0.166507029533)*x[0]**o+(0.232150195873)*x[0]+(0.119453667263)*x[1]**o+(-0.261110960642)*x[1]
-        arg[3,3,1,1]=(0.358248720077)*x[0]**o+(-0.871911261059)*x[0]+(0.57743453064)*x[1]**o+(0.950322066335)*x[1]
-        arg[3,3,2,0]=(-0.896899724447)*x[0]**o+(-0.898884767716)*x[0]+(0.63832012742)*x[1]**o+(-0.833800375634)*x[1]
-        arg[3,3,2,1]=(0.425194254583)*x[0]**o+(0.161328467295)*x[0]+(0.496219405916)*x[1]**o+(0.380935896093)*x[1]
-        arg[3,4,0,0]=(0.793902581592)*x[0]**o+(-0.33428511164)*x[0]+(-0.283510438468)*x[1]**o+(0.228913046074)*x[1]
-        arg[3,4,0,1]=(0.372028980539)*x[0]**o+(-0.388909011671)*x[0]+(-0.259885631206)*x[1]**o+(-0.950910172897)*x[1]
-        arg[3,4,1,0]=(-0.80489673786)*x[0]**o+(-0.828175420038)*x[0]+(0.895070489116)*x[1]**o+(-0.742272132103)*x[1]
-        arg[3,4,1,1]=(0.272535126101)*x[0]**o+(0.902668974891)*x[0]+(0.399816667015)*x[1]**o+(-0.953186908789)*x[1]
-        arg[3,4,2,0]=(0.0341775288582)*x[0]**o+(0.962241492639)*x[0]+(0.906020184876)*x[1]**o+(-0.400536255726)*x[1]
-        arg[3,4,2,1]=(-0.745016464485)*x[0]**o+(-0.85241829747)*x[0]+(-0.648936544722)*x[1]**o+(-0.997030074218)*x[1]
-        ref[0,0,0,0]=(0.965300679335)/(o+1.)+(0.142356258935)+(0.392628958003)*0.5**o
-        ref[0,0,0,1]=(0.384782163488)/(o+1.)+(-0.407081281958)+(-0.503312425492)*0.5**o
-        ref[0,0,1,0]=(-0.765235012795)/(o+1.)+(-0.317187415586)+(0.660162511699)*0.5**o
-        ref[0,0,1,1]=(-0.451665346257)/(o+1.)+(-0.0341912040643)+(-0.986935412732)*0.5**o
-        ref[0,0,2,0]=(-0.695553902133)/(o+1.)+(-0.467731542733)+(0.632875178502)*0.5**o
-        ref[0,0,2,1]=(0.345909088853)/(o+1.)+(0.225477764967)+(0.102625648731)*0.5**o
-        ref[0,1,0,0]=(0.332480141972)/(o+1.)+(-0.388404308158)+(-0.0108106931425)*0.5**o
-        ref[0,1,0,1]=(0.328480565578)/(o+1.)+(0.324505149668)+(0.220826593491)*0.5**o
-        ref[0,1,1,0]=(0.292927451477)/(o+1.)+(0.183128254664)+(0.22735402466)*0.5**o
-        ref[0,1,1,1]=(-0.322061131008)/(o+1.)+(0.768096283874)+(0.495079875966)*0.5**o
-        ref[0,1,2,0]=(0.286037351205)/(o+1.)+(0.202030463766)+(0.968583889554)*0.5**o
-        ref[0,1,2,1]=(0.891305263219)/(o+1.)+(0.219403586029)+(0.361498191707)*0.5**o
-        ref[0,2,0,0]=(0.0870608077911)/(o+1.)+(-0.381665114117)+(0.185647566516)*0.5**o
-        ref[0,2,0,1]=(-0.0229924234496)/(o+1.)+(0.244502612446)+(0.227262327826)*0.5**o
-        ref[0,2,1,0]=(0.957377329048)/(o+1.)+(-0.0454149985758)+(0.0405753322301)*0.5**o
-        ref[0,2,1,1]=(-0.628262263897)/(o+1.)+(0.0870979129647)+(-0.546046301701)*0.5**o
-        ref[0,2,2,0]=(0.499595322279)/(o+1.)+(0.0509587090171)+(-0.828455793175)*0.5**o
-        ref[0,2,2,1]=(-0.678432418122)/(o+1.)+(0.319356853239)+(0.926138085222)*0.5**o
-        ref[0,3,0,0]=(0.62665109546)/(o+1.)+(0.762318465671)+(-0.473066058658)*0.5**o
-        ref[0,3,0,1]=(-0.459252843816)/(o+1.)+(0.295864315717)+(0.776790978673)*0.5**o
-        ref[0,3,1,0]=(0.445864469556)/(o+1.)+(0.292283099022)+(0.34783214571)*0.5**o
-        ref[0,3,1,1]=(0.577708844669)/(o+1.)+(-0.491318272755)+(0.0717966037463)*0.5**o
-        ref[0,3,2,0]=(-0.33936340707)/(o+1.)+(-0.428987751016)+(-0.548573971799)*0.5**o
-        ref[0,3,2,1]=(-0.833323497891)/(o+1.)+(-0.224290613939)+(-0.28309240461)*0.5**o
-        ref[0,4,0,0]=(0.146657173319)/(o+1.)+(0.200750335943)+(-0.105416428922)*0.5**o
-        ref[0,4,0,1]=(0.534941970665)/(o+1.)+(-0.251774809823)+(-0.876111094069)*0.5**o
-        ref[0,4,1,0]=(-0.739368558349)/(o+1.)+(0.228739674374)+(-0.678996394303)*0.5**o
-        ref[0,4,1,1]=(-0.651647023142)/(o+1.)+(-0.159264639548)+(0.0472145581152)*0.5**o
-        ref[0,4,2,0]=(-0.524234284672)/(o+1.)+(0.218536682587)+(0.114936857967)*0.5**o
-        ref[0,4,2,1]=(0.133122220811)/(o+1.)+(-0.31070612124)+(0.568834117773)*0.5**o
-        ref[1,0,0,0]=(-0.132449009841)/(o+1.)+(0.380882086677)+(-0.821241886235)*0.5**o
-        ref[1,0,0,1]=(-0.573597121344)/(o+1.)+(-0.188183973289)+(0.624372422235)*0.5**o
-        ref[1,0,1,0]=(-0.249786553024)/(o+1.)+(-0.661057334385)+(-0.568749808355)*0.5**o
-        ref[1,0,1,1]=(0.59246455477)/(o+1.)+(-0.256347568096)+(0.0765557360835)*0.5**o
-        ref[1,0,2,0]=(0.0689432766231)/(o+1.)+(-0.267056955718)+(0.909614864187)*0.5**o
-        ref[1,0,2,1]=(0.378273922837)/(o+1.)+(0.770144388717)+(0.0610206203468)*0.5**o
-        ref[1,1,0,0]=(0.728786835113)/(o+1.)+(0.436825316493)+(0.917249169051)*0.5**o
-        ref[1,1,0,1]=(-0.418402258918)/(o+1.)+(-0.47604993983)+(0.331129708654)*0.5**o
-        ref[1,1,1,0]=(0.989603613532)/(o+1.)+(-0.153579923633)+(-0.527408405279)*0.5**o
-        ref[1,1,1,1]=(0.11459047938)/(o+1.)+(-0.306426672553)+(-0.189543145217)*0.5**o
-        ref[1,1,2,0]=(-0.862654310338)/(o+1.)+(0.715874834296)+(0.385274935809)*0.5**o
-        ref[1,1,2,1]=(-0.541819816686)/(o+1.)+(0.522617447961)+(-0.380421555378)*0.5**o
-        ref[1,2,0,0]=(0.158734254777)/(o+1.)+(0.0919238786215)+(0.446781075767)*0.5**o
-        ref[1,2,0,1]=(-0.90301726295)/(o+1.)+(-0.0786321637044)+(0.927811104869)*0.5**o
-        ref[1,2,1,0]=(0.157695458386)/(o+1.)+(-0.495417096819)+(0.741527109588)*0.5**o
-        ref[1,2,1,1]=(0.0491001091271)/(o+1.)+(-0.243168675353)+(0.193242816889)*0.5**o
-        ref[1,2,2,0]=(-0.736262418061)/(o+1.)+(-0.186062680201)+(0.220709813709)*0.5**o
-        ref[1,2,2,1]=(-0.167013881353)/(o+1.)+(0.393827099713)+(0.0034506429721)*0.5**o
-        ref[1,3,0,0]=(-0.199843421009)/(o+1.)+(0.286711328927)+(0.321471168172)*0.5**o
-        ref[1,3,0,1]=(0.0303112997369)/(o+1.)+(-0.430407665717)+(-0.0799622908037)*0.5**o
-        ref[1,3,1,0]=(0.335933608833)/(o+1.)+(0.520523281666)+(-0.12051943489)*0.5**o
-        ref[1,3,1,1]=(0.10609614346)/(o+1.)+(-0.159221033776)+(-0.587242845986)*0.5**o
-        ref[1,3,2,0]=(-0.0280648836948)/(o+1.)+(-0.0969742776586)+(0.947782336638)*0.5**o
-        ref[1,3,2,1]=(0.266916366237)/(o+1.)+(0.493290531097)+(-0.0887414134508)*0.5**o
-        ref[1,4,0,0]=(-0.00526240442626)/(o+1.)+(0.729539505508)+(-0.138184872938)*0.5**o
-        ref[1,4,0,1]=(0.400982699808)/(o+1.)+(0.0361829794896)+(-0.549831917928)*0.5**o
-        ref[1,4,1,0]=(-0.827665726293)/(o+1.)+(-0.552518044279)+(-0.137046722563)*0.5**o
-        ref[1,4,1,1]=(0.113318564035)/(o+1.)+(-0.318485598343)+(-0.474156202572)*0.5**o
-        ref[1,4,2,0]=(-0.968611931598)/(o+1.)+(-0.433615414111)+(0.18476112439)*0.5**o
-        ref[1,4,2,1]=(-0.384672070744)/(o+1.)+(0.736845959617)+(-0.372995418552)*0.5**o
-        ref[2,0,0,0]=(0.764297272234)/(o+1.)+(0.476996820459)+(0.882400857222)*0.5**o
-        ref[2,0,0,1]=(-0.0934000967188)/(o+1.)+(-0.334488128196)+(0.894017590794)*0.5**o
-        ref[2,0,1,0]=(0.819002513335)/(o+1.)+(-0.485788276874)+(-0.382158057826)*0.5**o
-        ref[2,0,1,1]=(0.366917477923)/(o+1.)+(-0.64272230635)+(-0.259771272131)*0.5**o
-        ref[2,0,2,0]=(-0.857625945147)/(o+1.)+(-0.581960052686)+(-0.33946164111)*0.5**o
-        ref[2,0,2,1]=(-0.359476461654)/(o+1.)+(0.582637272819)+(0.153353093148)*0.5**o
-        ref[2,1,0,0]=(0.194312746335)/(o+1.)+(0.607321463611)+(0.780980225775)*0.5**o
-        ref[2,1,0,1]=(-0.313038325156)/(o+1.)+(0.0614854061938)+(-0.334149973283)*0.5**o
-        ref[2,1,1,0]=(-0.0643816133251)/(o+1.)+(-0.635200340106)+(-0.832852528577)*0.5**o
-        ref[2,1,1,1]=(-0.618456119184)/(o+1.)+(0.712480914191)+(0.300975732963)*0.5**o
-        ref[2,1,2,0]=(-0.986852501828)/(o+1.)+(0.232254156437)+(0.122326105776)*0.5**o
-        ref[2,1,2,1]=(-0.0933563424166)/(o+1.)+(0.337181975722)+(0.447916985436)*0.5**o
-        ref[2,2,0,0]=(-0.053769157756)/(o+1.)+(-0.235907632211)+(0.032076347277)*0.5**o
-        ref[2,2,0,1]=(-0.287956277998)/(o+1.)+(-0.564682397133)+(-0.403935703163)*0.5**o
-        ref[2,2,1,0]=(0.359071620541)/(o+1.)+(-0.437996024361)+(-0.205077009492)*0.5**o
-        ref[2,2,1,1]=(0.2153167916)/(o+1.)+(-0.612290869632)+(0.443658057141)*0.5**o
-        ref[2,2,2,0]=(0.608221916958)/(o+1.)+(0.260259411478)+(-0.463879681251)*0.5**o
-        ref[2,2,2,1]=(0.8957267808)/(o+1.)+(0.442369195849)+(0.533981754168)*0.5**o
-        ref[2,3,0,0]=(0.717384215206)/(o+1.)+(0.396205463942)+(0.499387701403)*0.5**o
-        ref[2,3,0,1]=(0.395132533716)/(o+1.)+(-0.107416025237)+(0.866500398882)*0.5**o
-        ref[2,3,1,0]=(0.688771917581)/(o+1.)+(-0.601429218934)+(-0.879663354176)*0.5**o
-        ref[2,3,1,1]=(0.240960084233)/(o+1.)+(-0.222057616607)+(0.291214284356)*0.5**o
-        ref[2,3,2,0]=(-0.505342655776)/(o+1.)+(-0.00898493528542)+(0.47064755192)*0.5**o
-        ref[2,3,2,1]=(-0.896333275063)/(o+1.)+(-0.241095664817)+(0.775731405735)*0.5**o
-        ref[2,4,0,0]=(0.436744528143)/(o+1.)+(-0.0744964673986)+(-0.7221248688)*0.5**o
-        ref[2,4,0,1]=(-0.031320962337)/(o+1.)+(-0.0526613334003)+(-0.742652222385)*0.5**o
-        ref[2,4,1,0]=(-0.50790148262)/(o+1.)+(0.626822378181)+(-0.529575527815)*0.5**o
-        ref[2,4,1,1]=(-0.770747718564)/(o+1.)+(0.2597241153)+(0.535631957883)*0.5**o
-        ref[2,4,2,0]=(0.613495031968)/(o+1.)+(-0.0918624375077)+(0.81688202721)*0.5**o
-        ref[2,4,2,1]=(0.093174141001)/(o+1.)+(0.365539433145)+(0.493471708612)*0.5**o
-        ref[3,0,0,0]=(0.984307685082)/(o+1.)+(-0.374598361566)+(-0.0668630243284)*0.5**o
-        ref[3,0,0,1]=(-0.693596086089)/(o+1.)+(-0.411310048192)+(-0.210452484293)*0.5**o
-        ref[3,0,1,0]=(0.824648362105)/(o+1.)+(0.181698265217)+(-0.34853285523)*0.5**o
-        ref[3,0,1,1]=(0.681514895836)/(o+1.)+(0.638634223316)+(0.861903045965)*0.5**o
-        ref[3,0,2,0]=(-0.0390293468405)/(o+1.)+(-0.130600797806)+(0.0197670342844)*0.5**o
-        ref[3,0,2,1]=(0.969057635866)/(o+1.)+(-0.0805103470423)+(-0.499093940395)*0.5**o
-        ref[3,1,0,0]=(0.829599262959)/(o+1.)+(0.745807250739)+(-0.955568800095)*0.5**o
-        ref[3,1,0,1]=(-0.777548579252)/(o+1.)+(-0.650254524284)+(-0.910307638058)*0.5**o
-        ref[3,1,1,0]=(-0.108768166204)/(o+1.)+(0.864123237947)+(0.22353820834)*0.5**o
-        ref[3,1,1,1]=(0.931152588498)/(o+1.)+(0.366098675227)+(0.371995768061)*0.5**o
-        ref[3,1,2,0]=(-0.14032259215)/(o+1.)+(0.514140454408)+(0.4567417369)*0.5**o
-        ref[3,1,2,1]=(0.942530922378)/(o+1.)+(-0.0546106599524)+(-0.855100213731)*0.5**o
-        ref[3,2,0,0]=(0.991497679624)/(o+1.)+(-0.26553912869)+(0.17190936572)*0.5**o
-        ref[3,2,0,1]=(-0.730243933765)/(o+1.)+(0.0671828123695)+(-0.683587206983)*0.5**o
-        ref[3,2,1,0]=(0.36605487466)/(o+1.)+(-0.155226343006)+(0.051672736629)*0.5**o
-        ref[3,2,1,1]=(-0.424515284177)/(o+1.)+(0.394142291336)+(0.438014662973)*0.5**o
-        ref[3,2,2,0]=(0.326610298255)/(o+1.)+(0.98989944094)+(-0.709499532674)*0.5**o
-        ref[3,2,2,1]=(-0.846657945161)/(o+1.)+(0.0841772101477)+(-0.657647707844)*0.5**o
-        ref[3,3,0,0]=(0.549866100727)/(o+1.)+(-0.133734825728)+(0.21346320453)*0.5**o
-        ref[3,3,0,1]=(0.0224330511636)/(o+1.)+(0.326044184638)+(0.249957470685)*0.5**o
-        ref[3,3,1,0]=(0.119453667263)/(o+1.)+(-0.0144803823844)+(0.166507029533)*0.5**o
-        ref[3,3,1,1]=(0.57743453064)/(o+1.)+(0.0392054026384)+(0.358248720077)*0.5**o
-        ref[3,3,2,0]=(0.63832012742)/(o+1.)+(-0.866342571675)+(-0.896899724447)*0.5**o
-        ref[3,3,2,1]=(0.496219405916)/(o+1.)+(0.271132181694)+(0.425194254583)*0.5**o
-        ref[3,4,0,0]=(-0.283510438468)/(o+1.)+(-0.0526860327828)+(0.793902581592)*0.5**o
-        ref[3,4,0,1]=(-0.259885631206)/(o+1.)+(-0.669909592284)+(0.372028980539)*0.5**o
-        ref[3,4,1,0]=(0.895070489116)/(o+1.)+(-0.78522377607)+(-0.80489673786)*0.5**o
-        ref[3,4,1,1]=(0.399816667015)/(o+1.)+(-0.0252589669489)+(0.272535126101)*0.5**o
-        ref[3,4,2,0]=(0.906020184876)/(o+1.)+(0.280852618457)+(0.0341775288582)*0.5**o
-        ref[3,4,2,1]=(-0.648936544722)/(o+1.)+(-0.924724185844)+(-0.745016464485)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.891975745754)*x[0]**o+(0.678331209591)*x[0]+(-0.450022305538)*x[1]**o+(0.521272586024)*x[1]+(-0.28868708769)*x[2]**o+(-0.631617544339)*x[2]
-        arg[0,0,0,1]=(0.428698930349)*x[0]**o+(-0.856251438077)*x[0]+(0.915766367729)*x[1]**o+(-0.35019463199)*x[1]+(-0.0029340113102)*x[2]**o+(-0.394458505835)*x[2]
-        arg[0,0,1,0]=(0.974069118653)*x[0]**o+(-0.674028781962)*x[0]+(0.489718068973)*x[1]**o+(-0.471323892144)*x[1]+(0.11469271678)*x[2]**o+(-0.264584383354)*x[2]
-        arg[0,0,1,1]=(0.813412823502)*x[0]**o+(0.739276532652)*x[0]+(-0.863216628203)*x[1]**o+(0.486539683681)*x[1]+(-0.771448803712)*x[2]**o+(-0.621526889056)*x[2]
-        arg[0,0,2,0]=(-0.874502916672)*x[0]**o+(0.0708047915752)*x[0]+(0.917576817333)*x[1]**o+(-0.257626031306)*x[1]+(-0.161822453369)*x[2]**o+(0.488866912786)*x[2]
-        arg[0,0,2,1]=(-0.258524075807)*x[0]**o+(0.206589504672)*x[0]+(0.232971263871)*x[1]**o+(-0.917991566808)*x[1]+(0.725943193794)*x[2]**o+(-0.170341108992)*x[2]
-        arg[0,1,0,0]=(0.489505903018)*x[0]**o+(0.386376068728)*x[0]+(0.510797276159)*x[1]**o+(0.45356046467)*x[1]+(-0.664963144251)*x[2]**o+(0.128579947316)*x[2]
-        arg[0,1,0,1]=(0.441567332096)*x[0]**o+(0.658686083904)*x[0]+(0.46601056348)*x[1]**o+(-0.130759928108)*x[1]+(0.324576589)*x[2]**o+(0.844700852997)*x[2]
-        arg[0,1,1,0]=(0.388576628492)*x[0]**o+(0.41731399682)*x[0]+(-0.37037879729)*x[1]**o+(-0.00306376860454)*x[1]+(-0.464420131682)*x[2]**o+(0.570470055678)*x[2]
-        arg[0,1,1,1]=(-0.0537780037583)*x[0]**o+(0.641854502644)*x[0]+(-0.475355608842)*x[1]**o+(-0.155501886306)*x[1]+(0.159833591997)*x[2]**o+(0.889951997355)*x[2]
-        arg[0,1,2,0]=(0.58262140787)*x[0]**o+(0.487380368384)*x[0]+(-0.783228845976)*x[1]**o+(-0.683221249176)*x[1]+(0.98628901689)*x[2]**o+(0.591884616904)*x[2]
-        arg[0,1,2,1]=(0.438472233911)*x[0]**o+(0.989088416794)*x[0]+(0.221688966923)*x[1]**o+(-0.119266918098)*x[1]+(-0.887421255415)*x[2]**o+(0.728082459156)*x[2]
-        arg[0,2,0,0]=(-0.334110476968)*x[0]**o+(-0.877094545216)*x[0]+(-0.293135209996)*x[1]**o+(0.578110480224)*x[1]+(-0.898686340104)*x[2]**o+(0.528072783107)*x[2]
-        arg[0,2,0,1]=(0.33041258354)*x[0]**o+(-0.70349630629)*x[0]+(0.349551161792)*x[1]**o+(-0.296687014146)*x[1]+(-0.272377440466)*x[2]**o+(-0.42221458274)*x[2]
-        arg[0,2,1,0]=(-0.80021736912)*x[0]**o+(0.271727608951)*x[0]+(0.689351606243)*x[1]**o+(-0.95063104158)*x[1]+(0.447293221661)*x[2]**o+(0.962435109303)*x[2]
-        arg[0,2,1,1]=(-0.773331228218)*x[0]**o+(0.569225340051)*x[0]+(-0.0330042729183)*x[1]**o+(-0.732867386826)*x[1]+(-0.399631128084)*x[2]**o+(0.235907094874)*x[2]
-        arg[0,2,2,0]=(-0.943072868965)*x[0]**o+(-0.959364749946)*x[0]+(0.922934300445)*x[1]**o+(0.27257203243)*x[1]+(0.450453864748)*x[2]**o+(0.521284310775)*x[2]
-        arg[0,2,2,1]=(-0.821201079286)*x[0]**o+(-0.801011107627)*x[0]+(0.554575277011)*x[1]**o+(-0.411361733513)*x[1]+(-0.858195570474)*x[2]**o+(0.420660103079)*x[2]
-        arg[0,3,0,0]=(-0.0564164524098)*x[0]**o+(-0.865516143298)*x[0]+(-0.85754022189)*x[1]**o+(-0.0159800361584)*x[1]+(-0.891158469429)*x[2]**o+(-0.809909518115)*x[2]
-        arg[0,3,0,1]=(-0.553858251068)*x[0]**o+(0.827558838148)*x[0]+(0.690081127613)*x[1]**o+(0.3475090336)*x[1]+(-0.190426828891)*x[2]**o+(-0.99589316535)*x[2]
-        arg[0,3,1,0]=(-0.992317453163)*x[0]**o+(-0.992812531491)*x[0]+(-0.859683310869)*x[1]**o+(0.441779587739)*x[1]+(0.582457020078)*x[2]**o+(-0.959111461424)*x[2]
-        arg[0,3,1,1]=(-0.713753922213)*x[0]**o+(0.504885148776)*x[0]+(-0.076988545634)*x[1]**o+(0.530828889101)*x[1]+(-0.335616242708)*x[2]**o+(-0.0421293420747)*x[2]
-        arg[0,3,2,0]=(0.536024118289)*x[0]**o+(-0.527038052847)*x[0]+(-0.558392588656)*x[1]**o+(0.928618057856)*x[1]+(0.427507510033)*x[2]**o+(0.223570914141)*x[2]
-        arg[0,3,2,1]=(-0.197968756117)*x[0]**o+(-0.58157606173)*x[0]+(-0.878630012825)*x[1]**o+(-0.380635552726)*x[1]+(-0.477570149125)*x[2]**o+(-0.642904015434)*x[2]
-        arg[0,4,0,0]=(0.688763655127)*x[0]**o+(0.286011523933)*x[0]+(0.0933014250929)*x[1]**o+(0.355550563233)*x[1]+(0.121445291305)*x[2]**o+(-0.814538082974)*x[2]
-        arg[0,4,0,1]=(-0.402717742839)*x[0]**o+(0.403946649835)*x[0]+(0.286978800579)*x[1]**o+(-0.363358056216)*x[1]+(-0.185233594102)*x[2]**o+(-0.902660250807)*x[2]
-        arg[0,4,1,0]=(0.39352838659)*x[0]**o+(-0.430755011337)*x[0]+(-0.912518631162)*x[1]**o+(-0.634118795867)*x[1]+(-0.802445843416)*x[2]**o+(0.643395158048)*x[2]
-        arg[0,4,1,1]=(-0.375507250175)*x[0]**o+(-0.609576942939)*x[0]+(0.35060243693)*x[1]**o+(0.384630130603)*x[1]+(0.165576820334)*x[2]**o+(-0.319012357341)*x[2]
-        arg[0,4,2,0]=(0.0603590263818)*x[0]**o+(-0.435954775883)*x[0]+(-0.895329092913)*x[1]**o+(0.364809539103)*x[1]+(0.912864788565)*x[2]**o+(0.582044419963)*x[2]
-        arg[0,4,2,1]=(-0.111089454685)*x[0]**o+(-0.247527778755)*x[0]+(0.897263901657)*x[1]**o+(0.168097655548)*x[1]+(-0.532273075067)*x[2]**o+(-0.158529268933)*x[2]
-        arg[1,0,0,0]=(-0.940865155622)*x[0]**o+(0.639652431549)*x[0]+(0.204433172026)*x[1]**o+(-0.333435100662)*x[1]+(0.922286591304)*x[2]**o+(0.245091036189)*x[2]
-        arg[1,0,0,1]=(-0.843207880309)*x[0]**o+(0.496567621809)*x[0]+(-0.747925907677)*x[1]**o+(-0.666195656311)*x[1]+(-0.836848401917)*x[2]**o+(-0.77301298659)*x[2]
-        arg[1,0,1,0]=(-0.484987528212)*x[0]**o+(-0.208798022576)*x[0]+(-0.516295195217)*x[1]**o+(0.273733676249)*x[1]+(0.642865886081)*x[2]**o+(0.94556566928)*x[2]
-        arg[1,0,1,1]=(0.285548625366)*x[0]**o+(-0.316870037241)*x[0]+(0.166055429845)*x[1]**o+(-0.907240066063)*x[1]+(-0.973602611383)*x[2]**o+(-0.232655535454)*x[2]
-        arg[1,0,2,0]=(0.96797757731)*x[0]**o+(-0.0920831342923)*x[0]+(0.0367163548581)*x[1]**o+(0.372503137376)*x[1]+(0.114902128151)*x[2]**o+(0.147390259838)*x[2]
-        arg[1,0,2,1]=(-0.486190283922)*x[0]**o+(-0.713417720041)*x[0]+(0.0212905465522)*x[1]**o+(-0.358636168795)*x[1]+(0.719370965272)*x[2]**o+(-0.506502687359)*x[2]
-        arg[1,1,0,0]=(-0.216544472879)*x[0]**o+(-0.690540499698)*x[0]+(0.190155427044)*x[1]**o+(0.832206912182)*x[1]+(-0.108713936252)*x[2]**o+(-0.221373087337)*x[2]
-        arg[1,1,0,1]=(0.982934604971)*x[0]**o+(0.604369826835)*x[0]+(-0.34365978148)*x[1]**o+(-0.167486779981)*x[1]+(-0.753609370582)*x[2]**o+(-0.220160888977)*x[2]
-        arg[1,1,1,0]=(0.516177509446)*x[0]**o+(-0.474445723273)*x[0]+(0.813647087566)*x[1]**o+(-0.281201093802)*x[1]+(0.941465944108)*x[2]**o+(0.352728360059)*x[2]
-        arg[1,1,1,1]=(-0.914732890633)*x[0]**o+(0.214962090901)*x[0]+(-0.710485058274)*x[1]**o+(-0.070756754056)*x[1]+(-0.449571590211)*x[2]**o+(0.353655711451)*x[2]
-        arg[1,1,2,0]=(-0.96655555619)*x[0]**o+(-0.47460534732)*x[0]+(0.0610695053327)*x[1]**o+(0.815390116709)*x[1]+(-0.844916163552)*x[2]**o+(-0.433015304307)*x[2]
-        arg[1,1,2,1]=(-0.611879453709)*x[0]**o+(0.849092848509)*x[0]+(0.0181322361566)*x[1]**o+(0.264173017827)*x[1]+(0.0452154806937)*x[2]**o+(0.0395300648465)*x[2]
-        arg[1,2,0,0]=(0.558820946357)*x[0]**o+(-0.471519705598)*x[0]+(-0.200404864145)*x[1]**o+(0.452044160691)*x[1]+(-0.507559485963)*x[2]**o+(-0.993437841726)*x[2]
-        arg[1,2,0,1]=(-0.944738664192)*x[0]**o+(-0.497536772117)*x[0]+(0.111399525675)*x[1]**o+(-0.93450294271)*x[1]+(-0.463702615737)*x[2]**o+(-0.330112672884)*x[2]
-        arg[1,2,1,0]=(0.238225961058)*x[0]**o+(-0.471520173419)*x[0]+(0.483767084892)*x[1]**o+(-0.0359407284537)*x[1]+(-0.767379409753)*x[2]**o+(-0.283596371915)*x[2]
-        arg[1,2,1,1]=(0.188699181238)*x[0]**o+(0.829593121989)*x[0]+(0.603377767593)*x[1]**o+(0.163334775468)*x[1]+(-0.695141594131)*x[2]**o+(-0.335208640181)*x[2]
-        arg[1,2,2,0]=(-0.0953160757881)*x[0]**o+(0.179594592176)*x[0]+(0.95983902191)*x[1]**o+(-0.689622683527)*x[1]+(0.418442085936)*x[2]**o+(-0.271399861129)*x[2]
-        arg[1,2,2,1]=(0.598691886555)*x[0]**o+(0.334120340646)*x[0]+(0.580763872443)*x[1]**o+(0.769016736836)*x[1]+(-0.442121483951)*x[2]**o+(0.0685264980499)*x[2]
-        arg[1,3,0,0]=(-0.482944276372)*x[0]**o+(-0.0518057205519)*x[0]+(-0.878100108766)*x[1]**o+(-0.130957239599)*x[1]+(0.71270341547)*x[2]**o+(-0.313822116756)*x[2]
-        arg[1,3,0,1]=(0.565128725562)*x[0]**o+(0.706149004661)*x[0]+(0.837747652328)*x[1]**o+(-0.429417376176)*x[1]+(0.179437627997)*x[2]**o+(-0.841831183522)*x[2]
-        arg[1,3,1,0]=(0.608648887224)*x[0]**o+(0.118220851451)*x[0]+(0.492890967377)*x[1]**o+(-0.162344084552)*x[1]+(0.141203210671)*x[2]**o+(0.883457779687)*x[2]
-        arg[1,3,1,1]=(0.0322521291544)*x[0]**o+(0.839748977403)*x[0]+(0.75094786544)*x[1]**o+(0.954833145672)*x[1]+(0.461457599013)*x[2]**o+(-0.761973385747)*x[2]
-        arg[1,3,2,0]=(-0.757022609619)*x[0]**o+(-0.250893790099)*x[0]+(-0.973631035961)*x[1]**o+(0.506574565217)*x[1]+(0.103557430896)*x[2]**o+(0.881026337134)*x[2]
-        arg[1,3,2,1]=(-0.395945302352)*x[0]**o+(-0.125428842065)*x[0]+(-0.339663004568)*x[1]**o+(-0.0272044592179)*x[1]+(0.75200506467)*x[2]**o+(-0.632922582454)*x[2]
-        arg[1,4,0,0]=(0.0462127928202)*x[0]**o+(-0.745613488751)*x[0]+(0.357338297422)*x[1]**o+(0.739034094804)*x[1]+(-0.451247272253)*x[2]**o+(0.418030110847)*x[2]
-        arg[1,4,0,1]=(0.914131238526)*x[0]**o+(-0.0280436066624)*x[0]+(0.861048515118)*x[1]**o+(0.148206807819)*x[1]+(-0.990856990354)*x[2]**o+(0.903615279172)*x[2]
-        arg[1,4,1,0]=(0.189809824038)*x[0]**o+(-0.749477832258)*x[0]+(-0.802713794942)*x[1]**o+(0.0610727255572)*x[1]+(0.292940815327)*x[2]**o+(0.213443422205)*x[2]
-        arg[1,4,1,1]=(0.792313292544)*x[0]**o+(0.321344675677)*x[0]+(-0.417516596097)*x[1]**o+(-0.63797359819)*x[1]+(-0.426112319872)*x[2]**o+(0.69281310288)*x[2]
-        arg[1,4,2,0]=(-0.11017764073)*x[0]**o+(0.703037562344)*x[0]+(0.739591950873)*x[1]**o+(0.445612268331)*x[1]+(-0.071251825024)*x[2]**o+(0.00577350654185)*x[2]
-        arg[1,4,2,1]=(-0.793584849832)*x[0]**o+(-0.546439256231)*x[0]+(-0.947194030803)*x[1]**o+(-0.0455700937677)*x[1]+(0.535368301918)*x[2]**o+(0.814435535521)*x[2]
-        arg[2,0,0,0]=(0.249661949438)*x[0]**o+(-0.581533619092)*x[0]+(-0.674373505747)*x[1]**o+(0.464175602196)*x[1]+(-0.528086662834)*x[2]**o+(-0.212416176351)*x[2]
-        arg[2,0,0,1]=(-0.588282108798)*x[0]**o+(0.761293399494)*x[0]+(0.99918874903)*x[1]**o+(0.542499992928)*x[1]+(0.433925746483)*x[2]**o+(0.972864491889)*x[2]
-        arg[2,0,1,0]=(0.0572335623442)*x[0]**o+(0.444906443533)*x[0]+(-0.305538151235)*x[1]**o+(0.244530068532)*x[1]+(-0.20198975858)*x[2]**o+(-0.00490928477351)*x[2]
-        arg[2,0,1,1]=(0.832496085695)*x[0]**o+(-0.797246004595)*x[0]+(0.873816520001)*x[1]**o+(0.628293733929)*x[1]+(-0.110922710624)*x[2]**o+(-0.0718221914062)*x[2]
-        arg[2,0,2,0]=(0.140970192196)*x[0]**o+(0.582230323368)*x[0]+(-0.757764751267)*x[1]**o+(0.206061262231)*x[1]+(0.657237474788)*x[2]**o+(0.598632779121)*x[2]
-        arg[2,0,2,1]=(-0.686218790734)*x[0]**o+(-0.157012470162)*x[0]+(0.448565721848)*x[1]**o+(0.0539087954076)*x[1]+(0.619821805007)*x[2]**o+(0.289144379283)*x[2]
-        arg[2,1,0,0]=(0.787423884494)*x[0]**o+(-0.985959420171)*x[0]+(0.155584360983)*x[1]**o+(0.223292293778)*x[1]+(-0.437349719833)*x[2]**o+(0.989077189275)*x[2]
-        arg[2,1,0,1]=(-0.597301631508)*x[0]**o+(-0.0414813766671)*x[0]+(-0.64883048443)*x[1]**o+(-0.18731615522)*x[1]+(0.735189823623)*x[2]**o+(-0.746633725819)*x[2]
-        arg[2,1,1,0]=(-0.393486075452)*x[0]**o+(-0.480110060647)*x[0]+(0.559811870081)*x[1]**o+(0.0814282056993)*x[1]+(0.244899906416)*x[2]**o+(-0.884478480652)*x[2]
-        arg[2,1,1,1]=(0.547747813175)*x[0]**o+(0.317890585903)*x[0]+(-0.70925099068)*x[1]**o+(-0.543227445702)*x[1]+(0.749693240223)*x[2]**o+(0.79984501038)*x[2]
-        arg[2,1,2,0]=(-0.289583636666)*x[0]**o+(0.513926622265)*x[0]+(-0.00283544918865)*x[1]**o+(0.530724065811)*x[1]+(0.900479623243)*x[2]**o+(-0.146332301083)*x[2]
-        arg[2,1,2,1]=(-0.487223003118)*x[0]**o+(0.161546483594)*x[0]+(-0.685211654772)*x[1]**o+(0.4803179816)*x[1]+(0.676120396917)*x[2]**o+(-0.174953085068)*x[2]
-        arg[2,2,0,0]=(0.31746495834)*x[0]**o+(-0.513225182059)*x[0]+(0.33220677322)*x[1]**o+(-0.302371334854)*x[1]+(0.0964988251907)*x[2]**o+(-0.259532745762)*x[2]
-        arg[2,2,0,1]=(0.313462846078)*x[0]**o+(0.079720902627)*x[0]+(-0.487932457563)*x[1]**o+(-0.786522786773)*x[1]+(0.357868214554)*x[2]**o+(0.251856050362)*x[2]
-        arg[2,2,1,0]=(-0.180472378556)*x[0]**o+(0.345084802362)*x[0]+(0.641108557953)*x[1]**o+(0.198717742483)*x[1]+(0.0374114682326)*x[2]**o+(-0.915249907773)*x[2]
-        arg[2,2,1,1]=(0.303787742688)*x[0]**o+(-0.941822487745)*x[0]+(-0.262567025842)*x[1]**o+(-0.197051445307)*x[1]+(0.381561965565)*x[2]**o+(-0.198549777232)*x[2]
-        arg[2,2,2,0]=(-0.850284190461)*x[0]**o+(0.985224868544)*x[0]+(0.633868153422)*x[1]**o+(-0.57559927346)*x[1]+(0.68753726951)*x[2]**o+(-0.923696997656)*x[2]
-        arg[2,2,2,1]=(0.559527478503)*x[0]**o+(-0.619764636475)*x[0]+(-0.0352163693945)*x[1]**o+(-0.37351931995)*x[1]+(0.0772333960938)*x[2]**o+(-0.353057755509)*x[2]
-        arg[2,3,0,0]=(-0.274260374984)*x[0]**o+(0.365180349506)*x[0]+(-0.879564869545)*x[1]**o+(-0.0908162765131)*x[1]+(0.813491263836)*x[2]**o+(-0.396739585204)*x[2]
-        arg[2,3,0,1]=(-0.793218219979)*x[0]**o+(0.227474218201)*x[0]+(0.97716610661)*x[1]**o+(0.317074032722)*x[1]+(0.076776446926)*x[2]**o+(0.069448617786)*x[2]
-        arg[2,3,1,0]=(0.411400569812)*x[0]**o+(0.517743454926)*x[0]+(0.646697523033)*x[1]**o+(-0.973369313024)*x[1]+(-0.599741793926)*x[2]**o+(-0.743687020283)*x[2]
-        arg[2,3,1,1]=(-0.491445354697)*x[0]**o+(-0.549840110396)*x[0]+(-0.260012915614)*x[1]**o+(0.671054626537)*x[1]+(0.0394966796969)*x[2]**o+(-0.701243931411)*x[2]
-        arg[2,3,2,0]=(-0.806859723517)*x[0]**o+(-0.753940066715)*x[0]+(-0.664229274865)*x[1]**o+(0.0595484609931)*x[1]+(-0.921892262667)*x[2]**o+(-0.701770672395)*x[2]
-        arg[2,3,2,1]=(-0.313979805844)*x[0]**o+(-0.542583864222)*x[0]+(-0.985990886553)*x[1]**o+(0.664926443979)*x[1]+(-0.99778334615)*x[2]**o+(0.268046810979)*x[2]
-        arg[2,4,0,0]=(-0.41348240167)*x[0]**o+(0.473517720534)*x[0]+(-0.290880345559)*x[1]**o+(-0.607611624107)*x[1]+(-0.25537697471)*x[2]**o+(-0.472402477362)*x[2]
-        arg[2,4,0,1]=(0.0222534371058)*x[0]**o+(-0.0739354104963)*x[0]+(-0.960057765718)*x[1]**o+(-0.772161403037)*x[1]+(-0.0356127352146)*x[2]**o+(-0.623605628308)*x[2]
-        arg[2,4,1,0]=(-0.750995516053)*x[0]**o+(-0.289601799215)*x[0]+(0.294370180152)*x[1]**o+(0.956012147239)*x[1]+(-0.27958662106)*x[2]**o+(-0.370609593537)*x[2]
-        arg[2,4,1,1]=(0.321767371741)*x[0]**o+(0.999223434136)*x[0]+(0.665865428241)*x[1]**o+(0.427942082269)*x[1]+(-0.135020552387)*x[2]**o+(0.692025479514)*x[2]
-        arg[2,4,2,0]=(-0.519508249649)*x[0]**o+(0.0779688946471)*x[0]+(0.493489242872)*x[1]**o+(-0.0961136530093)*x[1]+(-0.0750243559261)*x[2]**o+(0.860970740104)*x[2]
-        arg[2,4,2,1]=(0.807909049346)*x[0]**o+(0.388180877227)*x[0]+(-0.9044578433)*x[1]**o+(0.86765389355)*x[1]+(-0.196105779343)*x[2]**o+(0.448661151455)*x[2]
-        arg[3,0,0,0]=(-0.780895567041)*x[0]**o+(-0.571253266808)*x[0]+(-0.904183399932)*x[1]**o+(-0.883296586722)*x[1]+(0.855945559487)*x[2]**o+(0.618533553098)*x[2]
-        arg[3,0,0,1]=(-0.831076704037)*x[0]**o+(0.898347446798)*x[0]+(-0.716442620396)*x[1]**o+(0.761028369421)*x[1]+(-0.486505604444)*x[2]**o+(0.25474220145)*x[2]
-        arg[3,0,1,0]=(-0.0127541044953)*x[0]**o+(0.759482315308)*x[0]+(-0.725655006866)*x[1]**o+(0.667310781285)*x[1]+(0.266075927439)*x[2]**o+(0.423300182252)*x[2]
-        arg[3,0,1,1]=(-0.594972266882)*x[0]**o+(-0.842501149639)*x[0]+(-0.347686790781)*x[1]**o+(0.686403640474)*x[1]+(0.3452971966)*x[2]**o+(0.722258585706)*x[2]
-        arg[3,0,2,0]=(-0.715711146058)*x[0]**o+(-0.835739963371)*x[0]+(0.966177361301)*x[1]**o+(-0.909111754995)*x[1]+(-0.175184576557)*x[2]**o+(0.695058239921)*x[2]
-        arg[3,0,2,1]=(0.306251544915)*x[0]**o+(0.944775715803)*x[0]+(-0.740601754617)*x[1]**o+(0.434394890125)*x[1]+(-0.876527474971)*x[2]**o+(0.209321129689)*x[2]
-        arg[3,1,0,0]=(-0.86788221871)*x[0]**o+(-0.833030657309)*x[0]+(0.84576621947)*x[1]**o+(-0.469186887277)*x[1]+(-0.527611740694)*x[2]**o+(-0.312054431001)*x[2]
-        arg[3,1,0,1]=(-0.353678394652)*x[0]**o+(0.591287444611)*x[0]+(-0.213012375931)*x[1]**o+(-0.917259099251)*x[1]+(0.739016360622)*x[2]**o+(0.718754459378)*x[2]
-        arg[3,1,1,0]=(-0.92646825221)*x[0]**o+(-0.870564973175)*x[0]+(-0.781805219404)*x[1]**o+(0.078530434642)*x[1]+(0.386018501087)*x[2]**o+(-0.120490492288)*x[2]
-        arg[3,1,1,1]=(-0.824273737615)*x[0]**o+(0.401211543421)*x[0]+(0.360077381624)*x[1]**o+(-0.0599234883152)*x[1]+(0.246820480884)*x[2]**o+(-0.175313542134)*x[2]
-        arg[3,1,2,0]=(0.807756928769)*x[0]**o+(0.889534807508)*x[0]+(0.633296189954)*x[1]**o+(-0.471821951252)*x[1]+(0.396011249874)*x[2]**o+(0.386800809575)*x[2]
-        arg[3,1,2,1]=(-0.494145142543)*x[0]**o+(-0.514793985721)*x[0]+(0.825379848403)*x[1]**o+(-0.457860259786)*x[1]+(-0.599557868275)*x[2]**o+(-0.952704784672)*x[2]
-        arg[3,2,0,0]=(0.970345295013)*x[0]**o+(-0.838468036663)*x[0]+(0.265634348738)*x[1]**o+(-0.873847124748)*x[1]+(0.416242648913)*x[2]**o+(0.59908438222)*x[2]
-        arg[3,2,0,1]=(0.692377432429)*x[0]**o+(-0.338749041227)*x[0]+(-0.449383750398)*x[1]**o+(0.841669527559)*x[1]+(0.902482059741)*x[2]**o+(-0.655719647704)*x[2]
-        arg[3,2,1,0]=(0.152417917522)*x[0]**o+(-0.78860144)*x[0]+(-0.881276170743)*x[1]**o+(0.692901550061)*x[1]+(-0.985377819322)*x[2]**o+(0.362747973601)*x[2]
-        arg[3,2,1,1]=(0.238845792119)*x[0]**o+(-0.65838373309)*x[0]+(-0.659676514296)*x[1]**o+(0.870742876778)*x[1]+(-0.367345415947)*x[2]**o+(0.322353666541)*x[2]
-        arg[3,2,2,0]=(0.456386394533)*x[0]**o+(-0.135575574979)*x[0]+(-0.731714323922)*x[1]**o+(0.936807859479)*x[1]+(0.511595594967)*x[2]**o+(0.570282464669)*x[2]
-        arg[3,2,2,1]=(0.53299212624)*x[0]**o+(0.800998166434)*x[0]+(-0.431740087552)*x[1]**o+(-0.880092532661)*x[1]+(-0.418657988674)*x[2]**o+(-0.181008149338)*x[2]
-        arg[3,3,0,0]=(0.60015312936)*x[0]**o+(-0.163125583081)*x[0]+(0.299668981953)*x[1]**o+(-0.761494422747)*x[1]+(0.404839953231)*x[2]**o+(-0.114039836538)*x[2]
-        arg[3,3,0,1]=(-0.597481072133)*x[0]**o+(-0.506468582896)*x[0]+(0.406822348574)*x[1]**o+(0.247431348859)*x[1]+(-0.137941563908)*x[2]**o+(0.0503979259383)*x[2]
-        arg[3,3,1,0]=(0.0921069092744)*x[0]**o+(-0.113960490794)*x[0]+(0.750059773909)*x[1]**o+(0.894945048248)*x[1]+(-0.154873449786)*x[2]**o+(-0.520229467775)*x[2]
-        arg[3,3,1,1]=(0.349078696154)*x[0]**o+(0.141298430827)*x[0]+(0.249161007832)*x[1]**o+(0.0240310278591)*x[1]+(-0.18294527838)*x[2]**o+(-0.666698832632)*x[2]
-        arg[3,3,2,0]=(-0.476684936147)*x[0]**o+(0.334093402615)*x[0]+(-0.326434684009)*x[1]**o+(0.91336431975)*x[1]+(0.483080537399)*x[2]**o+(0.439096732335)*x[2]
-        arg[3,3,2,1]=(0.214713426286)*x[0]**o+(-0.973239849984)*x[0]+(0.984290637567)*x[1]**o+(-0.644668525299)*x[1]+(0.00985524319943)*x[2]**o+(0.68777403533)*x[2]
-        arg[3,4,0,0]=(-0.88715423933)*x[0]**o+(0.642412222188)*x[0]+(-0.119667464132)*x[1]**o+(-0.201583116481)*x[1]+(-0.870921042381)*x[2]**o+(-0.00379039429884)*x[2]
-        arg[3,4,0,1]=(0.511114986801)*x[0]**o+(-0.497617928997)*x[0]+(-0.189435233543)*x[1]**o+(-0.29288141421)*x[1]+(-0.476297664539)*x[2]**o+(-0.202915859137)*x[2]
-        arg[3,4,1,0]=(0.0739878219028)*x[0]**o+(0.675050675951)*x[0]+(-0.45950101521)*x[1]**o+(0.306538598103)*x[1]+(-0.726069135031)*x[2]**o+(0.193290422951)*x[2]
-        arg[3,4,1,1]=(-0.141324267565)*x[0]**o+(0.377343882109)*x[0]+(-0.16075604872)*x[1]**o+(0.263332274591)*x[1]+(0.886416182992)*x[2]**o+(0.931905996631)*x[2]
-        arg[3,4,2,0]=(-0.76912732001)*x[0]**o+(-0.255011103121)*x[0]+(-0.372810348364)*x[1]**o+(0.108137766687)*x[1]+(-0.0761382180171)*x[2]**o+(0.46825331282)*x[2]
-        arg[3,4,2,1]=(-0.515945940217)*x[0]**o+(-0.630017609554)*x[0]+(-0.815236764508)*x[1]**o+(0.636572471005)*x[1]+(0.244112465789)*x[2]**o+(-0.471661017589)*x[2]
-        ref[0,0,0,0]=(-0.738709393227)/(o+1.)+(0.283993125638)+(-0.891975745754)*0.5**o
-        ref[0,0,0,1]=(0.912832356419)/(o+1.)+(-0.800452287951)+(0.428698930349)*0.5**o
-        ref[0,0,1,0]=(0.604410785754)/(o+1.)+(-0.70496852873)+(0.974069118653)*0.5**o
-        ref[0,0,1,1]=(-1.63466543191)/(o+1.)+(0.302144663639)+(0.813412823502)*0.5**o
-        ref[0,0,2,0]=(0.755754363963)/(o+1.)+(0.151022836528)+(-0.874502916672)*0.5**o
-        ref[0,0,2,1]=(0.958914457666)/(o+1.)+(-0.440871585564)+(-0.258524075807)*0.5**o
-        ref[0,1,0,0]=(-0.154165868092)/(o+1.)+(0.484258240357)+(0.489505903018)*0.5**o
-        ref[0,1,0,1]=(0.79058715248)/(o+1.)+(0.686313504396)+(0.441567332096)*0.5**o
-        ref[0,1,1,0]=(-0.834798928973)/(o+1.)+(0.492360141946)+(0.388576628492)*0.5**o
-        ref[0,1,1,1]=(-0.315522016845)/(o+1.)+(0.688152306846)+(-0.0537780037583)*0.5**o
-        ref[0,1,2,0]=(0.203060170914)/(o+1.)+(0.198021868056)+(0.58262140787)*0.5**o
-        ref[0,1,2,1]=(-0.665732288492)/(o+1.)+(0.798951978927)+(0.438472233911)*0.5**o
-        ref[0,2,0,0]=(-1.1918215501)/(o+1.)+(0.114544359058)+(-0.334110476968)*0.5**o
-        ref[0,2,0,1]=(0.0771737213265)/(o+1.)+(-0.711198951588)+(0.33041258354)*0.5**o
-        ref[0,2,1,0]=(1.1366448279)/(o+1.)+(0.141765838337)+(-0.80021736912)*0.5**o
-        ref[0,2,1,1]=(-0.432635401002)/(o+1.)+(0.0361325240497)+(-0.773331228218)*0.5**o
-        ref[0,2,2,0]=(1.37338816519)/(o+1.)+(-0.0827542033711)+(-0.943072868965)*0.5**o
-        ref[0,2,2,1]=(-0.303620293463)/(o+1.)+(-0.39585636903)+(-0.821201079286)*0.5**o
-        ref[0,3,0,0]=(-1.74869869132)/(o+1.)+(-0.845702848785)+(-0.0564164524098)*0.5**o
-        ref[0,3,0,1]=(0.499654298722)/(o+1.)+(0.0895873531986)+(-0.553858251068)*0.5**o
-        ref[0,3,1,0]=(-0.277226290791)/(o+1.)+(-0.755072202588)+(-0.992317453163)*0.5**o
-        ref[0,3,1,1]=(-0.412604788342)/(o+1.)+(0.496792347901)+(-0.713753922213)*0.5**o
-        ref[0,3,2,0]=(-0.130885078624)/(o+1.)+(0.312575459575)+(0.536024118289)*0.5**o
-        ref[0,3,2,1]=(-1.35620016195)/(o+1.)+(-0.802557814945)+(-0.197968756117)*0.5**o
-        ref[0,4,0,0]=(0.214746716397)/(o+1.)+(-0.0864879979042)+(0.688763655127)*0.5**o
-        ref[0,4,0,1]=(0.101745206477)/(o+1.)+(-0.431035828594)+(-0.402717742839)*0.5**o
-        ref[0,4,1,0]=(-1.71496447458)/(o+1.)+(-0.210739324578)+(0.39352838659)*0.5**o
-        ref[0,4,1,1]=(0.516179257264)/(o+1.)+(-0.271979584839)+(-0.375507250175)*0.5**o
-        ref[0,4,2,0]=(0.0175356956523)/(o+1.)+(0.255449591592)+(0.0603590263818)*0.5**o
-        ref[0,4,2,1]=(0.36499082659)/(o+1.)+(-0.11897969607)+(-0.111089454685)*0.5**o
-        ref[1,0,0,0]=(1.12671976333)/(o+1.)+(0.275654183538)+(-0.940865155622)*0.5**o
-        ref[1,0,0,1]=(-1.58477430959)/(o+1.)+(-0.471320510546)+(-0.843207880309)*0.5**o
-        ref[1,0,1,0]=(0.126570690864)/(o+1.)+(0.505250661477)+(-0.484987528212)*0.5**o
-        ref[1,0,1,1]=(-0.807547181539)/(o+1.)+(-0.728382819379)+(0.285548625366)*0.5**o
-        ref[1,0,2,0]=(0.151618483009)/(o+1.)+(0.213905131461)+(0.96797757731)*0.5**o
-        ref[1,0,2,1]=(0.740661511824)/(o+1.)+(-0.789278288097)+(-0.486190283922)*0.5**o
-        ref[1,1,0,0]=(0.0814414907926)/(o+1.)+(-0.0398533374263)+(-0.216544472879)*0.5**o
-        ref[1,1,0,1]=(-1.09726915206)/(o+1.)+(0.108361078938)+(0.982934604971)*0.5**o
-        ref[1,1,1,0]=(1.75511303167)/(o+1.)+(-0.201459228508)+(0.516177509446)*0.5**o
-        ref[1,1,1,1]=(-1.16005664849)/(o+1.)+(0.248930524148)+(-0.914732890633)*0.5**o
-        ref[1,1,2,0]=(-0.78384665822)/(o+1.)+(-0.0461152674588)+(-0.96655555619)*0.5**o
-        ref[1,1,2,1]=(0.0633477168503)/(o+1.)+(0.576397965591)+(-0.611879453709)*0.5**o
-        ref[1,2,0,0]=(-0.707964350108)/(o+1.)+(-0.506456693317)+(0.558820946357)*0.5**o
-        ref[1,2,0,1]=(-0.352303090063)/(o+1.)+(-0.881076193856)+(-0.944738664192)*0.5**o
-        ref[1,2,1,0]=(-0.283612324861)/(o+1.)+(-0.395528636894)+(0.238225961058)*0.5**o
-        ref[1,2,1,1]=(-0.0917638265383)/(o+1.)+(0.328859628638)+(0.188699181238)*0.5**o
-        ref[1,2,2,0]=(1.37828110785)/(o+1.)+(-0.39071397624)+(-0.0953160757881)*0.5**o
-        ref[1,2,2,1]=(0.138642388492)/(o+1.)+(0.585831787766)+(0.598691886555)*0.5**o
-        ref[1,3,0,0]=(-0.165396693296)/(o+1.)+(-0.248292538454)+(-0.482944276372)*0.5**o
-        ref[1,3,0,1]=(1.01718528032)/(o+1.)+(-0.282549777519)+(0.565128725562)*0.5**o
-        ref[1,3,1,0]=(0.634094178049)/(o+1.)+(0.419667273293)+(0.608648887224)*0.5**o
-        ref[1,3,1,1]=(1.21240546445)/(o+1.)+(0.516304368664)+(0.0322521291544)*0.5**o
-        ref[1,3,2,0]=(-0.870073605065)/(o+1.)+(0.568353556126)+(-0.757022609619)*0.5**o
-        ref[1,3,2,1]=(0.412342060102)/(o+1.)+(-0.392777941868)+(-0.395945302352)*0.5**o
-        ref[1,4,0,0]=(-0.0939089748304)/(o+1.)+(0.20572535845)+(0.0462127928202)*0.5**o
-        ref[1,4,0,1]=(-0.129808475236)/(o+1.)+(0.511889240164)+(0.914131238526)*0.5**o
-        ref[1,4,1,0]=(-0.509772979615)/(o+1.)+(-0.237480842248)+(0.189809824038)*0.5**o
-        ref[1,4,1,1]=(-0.843628915969)/(o+1.)+(0.188092090183)+(0.792313292544)*0.5**o
-        ref[1,4,2,0]=(0.668340125849)/(o+1.)+(0.577211668608)+(-0.11017764073)*0.5**o
-        ref[1,4,2,1]=(-0.411825728886)/(o+1.)+(0.111213092761)+(-0.793584849832)*0.5**o
-        ref[2,0,0,0]=(-1.20246016858)/(o+1.)+(-0.164887096623)+(0.249661949438)*0.5**o
-        ref[2,0,0,1]=(1.43311449551)/(o+1.)+(1.13832894216)+(-0.588282108798)*0.5**o
-        ref[2,0,1,0]=(-0.507527909815)/(o+1.)+(0.342263613646)+(0.0572335623442)*0.5**o
-        ref[2,0,1,1]=(0.762893809377)/(o+1.)+(-0.120387231036)+(0.832496085695)*0.5**o
-        ref[2,0,2,0]=(-0.100527276479)/(o+1.)+(0.69346218236)+(0.140970192196)*0.5**o
-        ref[2,0,2,1]=(1.06838752686)/(o+1.)+(0.0930203522642)+(-0.686218790734)*0.5**o
-        ref[2,1,0,0]=(-0.28176535885)/(o+1.)+(0.113205031441)+(0.787423884494)*0.5**o
-        ref[2,1,0,1]=(0.0863593391922)/(o+1.)+(-0.487715628853)+(-0.597301631508)*0.5**o
-        ref[2,1,1,0]=(0.804711776497)/(o+1.)+(-0.6415801678)+(-0.393486075452)*0.5**o
-        ref[2,1,1,1]=(0.0404422495423)/(o+1.)+(0.28725407529)+(0.547747813175)*0.5**o
-        ref[2,1,2,0]=(0.897644174054)/(o+1.)+(0.449159193497)+(-0.289583636666)*0.5**o
-        ref[2,1,2,1]=(-0.00909125785473)/(o+1.)+(0.233455690063)+(-0.487223003118)*0.5**o
-        ref[2,2,0,0]=(0.428705598411)/(o+1.)+(-0.537564631337)+(0.31746495834)*0.5**o
-        ref[2,2,0,1]=(-0.13006424301)/(o+1.)+(-0.227472916892)+(0.313462846078)*0.5**o
-        ref[2,2,1,0]=(0.678520026185)/(o+1.)+(-0.185723681464)+(-0.180472378556)*0.5**o
-        ref[2,2,1,1]=(0.118994939723)/(o+1.)+(-0.668711855142)+(0.303787742688)*0.5**o
-        ref[2,2,2,0]=(1.32140542293)/(o+1.)+(-0.257035701286)+(-0.850284190461)*0.5**o
-        ref[2,2,2,1]=(0.0420170266993)/(o+1.)+(-0.673170855967)+(0.559527478503)*0.5**o
-        ref[2,3,0,0]=(-0.0660736057092)/(o+1.)+(-0.0611877561056)+(-0.274260374984)*0.5**o
-        ref[2,3,0,1]=(1.05394255354)/(o+1.)+(0.306998434354)+(-0.793218219979)*0.5**o
-        ref[2,3,1,0]=(0.046955729107)/(o+1.)+(-0.599656439191)+(0.411400569812)*0.5**o
-        ref[2,3,1,1]=(-0.220516235917)/(o+1.)+(-0.290014707635)+(-0.491445354697)*0.5**o
-        ref[2,3,2,0]=(-1.58612153753)/(o+1.)+(-0.698081139059)+(-0.806859723517)*0.5**o
-        ref[2,3,2,1]=(-1.9837742327)/(o+1.)+(0.195194695368)+(-0.313979805844)*0.5**o
-        ref[2,4,0,0]=(-0.546257320269)/(o+1.)+(-0.303248190467)+(-0.41348240167)*0.5**o
-        ref[2,4,0,1]=(-0.995670500932)/(o+1.)+(-0.734851220921)+(0.0222534371058)*0.5**o
-        ref[2,4,1,0]=(0.0147835590923)/(o+1.)+(0.147900377243)+(-0.750995516053)*0.5**o
-        ref[2,4,1,1]=(0.530844875854)/(o+1.)+(1.05959549796)+(0.321767371741)*0.5**o
-        ref[2,4,2,0]=(0.418464886946)/(o+1.)+(0.421412990871)+(-0.519508249649)*0.5**o
-        ref[2,4,2,1]=(-1.10056362264)/(o+1.)+(0.852247961116)+(0.807909049346)*0.5**o
-        ref[3,0,0,0]=(-0.0482378404454)/(o+1.)+(-0.418008150216)+(-0.780895567041)*0.5**o
-        ref[3,0,0,1]=(-1.20294822484)/(o+1.)+(0.957059008835)+(-0.831076704037)*0.5**o
-        ref[3,0,1,0]=(-0.459579079427)/(o+1.)+(0.925046639422)+(-0.0127541044953)*0.5**o
-        ref[3,0,1,1]=(-0.00238959418047)/(o+1.)+(0.28308053827)+(-0.594972266882)*0.5**o
-        ref[3,0,2,0]=(0.790992784744)/(o+1.)+(-0.524896739222)+(-0.715711146058)*0.5**o
-        ref[3,0,2,1]=(-1.61712922959)/(o+1.)+(0.794245867809)+(0.306251544915)*0.5**o
-        ref[3,1,0,0]=(0.318154478777)/(o+1.)+(-0.807135987793)+(-0.86788221871)*0.5**o
-        ref[3,1,0,1]=(0.526003984691)/(o+1.)+(0.196391402369)+(-0.353678394652)*0.5**o
-        ref[3,1,1,0]=(-0.395786718317)/(o+1.)+(-0.456262515411)+(-0.92646825221)*0.5**o
-        ref[3,1,1,1]=(0.606897862508)/(o+1.)+(0.082987256486)+(-0.824273737615)*0.5**o
-        ref[3,1,2,0]=(1.02930743983)/(o+1.)+(0.402256832916)+(0.807756928769)*0.5**o
-        ref[3,1,2,1]=(0.225821980128)/(o+1.)+(-0.96267951509)+(-0.494145142543)*0.5**o
-        ref[3,2,0,0]=(0.681876997651)/(o+1.)+(-0.556615389596)+(0.970345295013)*0.5**o
-        ref[3,2,0,1]=(0.453098309344)/(o+1.)+(-0.0763995806862)+(0.692377432429)*0.5**o
-        ref[3,2,1,0]=(-1.86665399006)/(o+1.)+(0.133524041831)+(0.152417917522)*0.5**o
-        ref[3,2,1,1]=(-1.02702193024)/(o+1.)+(0.267356405114)+(0.238845792119)*0.5**o
-        ref[3,2,2,0]=(-0.220118728954)/(o+1.)+(0.685757374584)+(0.456386394533)*0.5**o
-        ref[3,2,2,1]=(-0.850398076225)/(o+1.)+(-0.130051257782)+(0.53299212624)*0.5**o
-        ref[3,3,0,0]=(0.704508935183)/(o+1.)+(-0.519329921183)+(0.60015312936)*0.5**o
-        ref[3,3,0,1]=(0.268880784666)/(o+1.)+(-0.10431965405)+(-0.597481072133)*0.5**o
-        ref[3,3,1,0]=(0.595186324123)/(o+1.)+(0.13037754484)+(0.0921069092744)*0.5**o
-        ref[3,3,1,1]=(0.0662157294518)/(o+1.)+(-0.250684686973)+(0.349078696154)*0.5**o
-        ref[3,3,2,0]=(0.156645853389)/(o+1.)+(0.84327722735)+(-0.476684936147)*0.5**o
-        ref[3,3,2,1]=(0.994145880767)/(o+1.)+(-0.465067169976)+(0.214713426286)*0.5**o
-        ref[3,4,0,0]=(-0.990588506513)/(o+1.)+(0.218519355704)+(-0.88715423933)*0.5**o
-        ref[3,4,0,1]=(-0.665732898082)/(o+1.)+(-0.496707601172)+(0.511114986801)*0.5**o
-        ref[3,4,1,0]=(-1.18557015024)/(o+1.)+(0.587439848502)+(0.0739878219028)*0.5**o
-        ref[3,4,1,1]=(0.725660134271)/(o+1.)+(0.786291076666)+(-0.141324267565)*0.5**o
-        ref[3,4,2,0]=(-0.448948566381)/(o+1.)+(0.160689988193)+(-0.76912732001)*0.5**o
-        ref[3,4,2,1]=(-0.571124298719)/(o+1.)+(-0.232553078069)+(-0.515945940217)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.311774053155)*x[0]**o+(0.52292841627)*x[0]+(-0.518467126196)*x[1]**o+(-0.11329290159)*x[1]
-        ref=(-0.518467126196)/(o+1.)+(0.20481775734)+(0.311774053155)*0.5**o
-      else:
-        arg=(0.233765319091)*x[0]**o+(-0.453551209762)*x[0]+(0.920140231713)*x[1]**o+(0.741695479084)*x[1]+(-0.255834461065)*x[2]**o+(-0.102580899053)*x[2]
-        ref=(0.664305770648)/(o+1.)+(0.0927816851348)+(0.233765319091)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(-0.651678780872)*x[0]**o+(-0.749709447394)*x[0]+(0.311088209082)*x[1]**o+(0.553081401193)*x[1]
-        arg[1]=(0.657887728987)*x[0]**o+(0.052270143604)*x[0]+(-0.15507994277)*x[1]**o+(-0.30302150082)*x[1]
-        ref[0]=(0.311088209082)/(o+1.)+(-0.0983140231004)+(-0.651678780872)*0.5**o
-        ref[1]=(-0.15507994277)/(o+1.)+(-0.125375678608)+(0.657887728987)*0.5**o
-      else:
-        arg[0]=(0.844909347644)*x[0]**o+(-0.342697697483)*x[0]+(0.126242548186)*x[1]**o+(-0.854010732849)*x[1]+(-0.307627587461)*x[2]**o+(-0.998566290754)*x[2]
-        arg[1]=(0.900073726701)*x[0]**o+(-0.703841701859)*x[0]+(-0.651690896499)*x[1]**o+(0.828362322181)*x[1]+(0.284410420895)*x[2]**o+(-0.394606348974)*x[2]
-        ref[0]=(-0.181385039275)/(o+1.)+(-1.09763736054)+(0.844909347644)*0.5**o
-        ref[1]=(-0.367280475604)/(o+1.)+(-0.135042864326)+(0.900073726701)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.263642681371)*x[0]**o+(0.668992571787)*x[0]+(0.873939846194)*x[1]**o+(0.784820355998)*x[1]
-        arg[0,1]=(-0.389306088628)*x[0]**o+(-0.0549482389907)*x[0]+(-0.787101008457)*x[1]**o+(0.860345123812)*x[1]
-        arg[0,2]=(-0.995721191961)*x[0]**o+(-0.587928136153)*x[0]+(-0.378312614832)*x[1]**o+(0.199765674281)*x[1]
-        arg[0,3]=(-0.374679425145)*x[0]**o+(-0.503606183146)*x[0]+(0.23995738992)*x[1]**o+(-0.525359181744)*x[1]
-        arg[0,4]=(-0.69923255665)*x[0]**o+(0.547634979941)*x[0]+(0.728792702739)*x[1]**o+(0.949888533828)*x[1]
-        arg[1,0]=(-0.61856415528)*x[0]**o+(-0.0516239651093)*x[0]+(0.158516649979)*x[1]**o+(-0.0522288881011)*x[1]
-        arg[1,1]=(0.0285524133857)*x[0]**o+(0.741357758307)*x[0]+(-0.0714860903847)*x[1]**o+(-0.539632750385)*x[1]
-        arg[1,2]=(-0.291101401382)*x[0]**o+(-0.114900246437)*x[0]+(-0.982305031665)*x[1]**o+(0.0823478844055)*x[1]
-        arg[1,3]=(-0.931305732525)*x[0]**o+(0.077332436417)*x[0]+(-0.880626154921)*x[1]**o+(-0.321222234507)*x[1]
-        arg[1,4]=(-0.00778033208815)*x[0]**o+(-0.536626847957)*x[0]+(-0.599742714546)*x[1]**o+(0.454108299336)*x[1]
-        arg[2,0]=(-0.575243090445)*x[0]**o+(-0.920247228564)*x[0]+(0.4569784462)*x[1]**o+(-0.105175798804)*x[1]
-        arg[2,1]=(0.333985911748)*x[0]**o+(-0.017876213076)*x[0]+(0.475164778165)*x[1]**o+(0.561072178015)*x[1]
-        arg[2,2]=(-0.559587786773)*x[0]**o+(-0.917134128672)*x[0]+(0.316654889327)*x[1]**o+(-0.640569595027)*x[1]
-        arg[2,3]=(-0.140461324817)*x[0]**o+(0.259052969883)*x[0]+(0.397898509159)*x[1]**o+(0.932233331785)*x[1]
-        arg[2,4]=(0.368626304985)*x[0]**o+(0.616310502384)*x[0]+(-0.756845293566)*x[1]**o+(-0.920088968132)*x[1]
-        arg[3,0]=(-0.824398741087)*x[0]**o+(0.0498115894252)*x[0]+(-0.5256621655)*x[1]**o+(0.114806237108)*x[1]
-        arg[3,1]=(-0.77671057316)*x[0]**o+(0.569249443162)*x[0]+(0.416628465801)*x[1]**o+(0.0603627487913)*x[1]
-        arg[3,2]=(-0.247875220913)*x[0]**o+(0.19548828878)*x[0]+(0.643226101838)*x[1]**o+(-0.154558826499)*x[1]
-        arg[3,3]=(-0.918937118963)*x[0]**o+(0.193777174417)*x[0]+(-0.906042347107)*x[1]**o+(0.872033230033)*x[1]
-        arg[3,4]=(-0.628918336086)*x[0]**o+(0.823242191714)*x[0]+(-0.593691166712)*x[1]**o+(-0.661715840814)*x[1]
-        ref[0,0]=(0.873939846194)/(o+1.)+(0.726906463892)+(-0.263642681371)*0.5**o
-        ref[0,1]=(-0.787101008457)/(o+1.)+(0.402698442411)+(-0.389306088628)*0.5**o
-        ref[0,2]=(-0.378312614832)/(o+1.)+(-0.194081230936)+(-0.995721191961)*0.5**o
-        ref[0,3]=(0.23995738992)/(o+1.)+(-0.514482682445)+(-0.374679425145)*0.5**o
-        ref[0,4]=(0.728792702739)/(o+1.)+(0.748761756885)+(-0.69923255665)*0.5**o
-        ref[1,0]=(0.158516649979)/(o+1.)+(-0.0519264266052)+(-0.61856415528)*0.5**o
-        ref[1,1]=(-0.0714860903847)/(o+1.)+(0.100862503961)+(0.0285524133857)*0.5**o
-        ref[1,2]=(-0.982305031665)/(o+1.)+(-0.0162761810159)+(-0.291101401382)*0.5**o
-        ref[1,3]=(-0.880626154921)/(o+1.)+(-0.121944899045)+(-0.931305732525)*0.5**o
-        ref[1,4]=(-0.599742714546)/(o+1.)+(-0.0412592743102)+(-0.00778033208815)*0.5**o
-        ref[2,0]=(0.4569784462)/(o+1.)+(-0.512711513684)+(-0.575243090445)*0.5**o
-        ref[2,1]=(0.475164778165)/(o+1.)+(0.27159798247)+(0.333985911748)*0.5**o
-        ref[2,2]=(0.316654889327)/(o+1.)+(-0.778851861849)+(-0.559587786773)*0.5**o
-        ref[2,3]=(0.397898509159)/(o+1.)+(0.595643150834)+(-0.140461324817)*0.5**o
-        ref[2,4]=(-0.756845293566)/(o+1.)+(-0.151889232874)+(0.368626304985)*0.5**o
-        ref[3,0]=(-0.5256621655)/(o+1.)+(0.0823089132668)+(-0.824398741087)*0.5**o
-        ref[3,1]=(0.416628465801)/(o+1.)+(0.314806095977)+(-0.77671057316)*0.5**o
-        ref[3,2]=(0.643226101838)/(o+1.)+(0.0204647311405)+(-0.247875220913)*0.5**o
-        ref[3,3]=(-0.906042347107)/(o+1.)+(0.532905202225)+(-0.918937118963)*0.5**o
-        ref[3,4]=(-0.593691166712)/(o+1.)+(0.0807631754499)+(-0.628918336086)*0.5**o
-      else:
-        arg[0,0]=(0.748857269399)*x[0]**o+(-0.21982973469)*x[0]+(-0.765987921295)*x[1]**o+(0.556577019909)*x[1]+(-0.0438548079278)*x[2]**o+(0.543610874817)*x[2]
-        arg[0,1]=(-0.784526004748)*x[0]**o+(-0.949423172035)*x[0]+(-0.29888188317)*x[1]**o+(-0.850638766848)*x[1]+(-0.853027558387)*x[2]**o+(-0.846378486588)*x[2]
-        arg[0,2]=(0.53445882525)*x[0]**o+(-0.653655652989)*x[0]+(-0.968129875689)*x[1]**o+(-0.603598808323)*x[1]+(0.545841014272)*x[2]**o+(0.126131861082)*x[2]
-        arg[0,3]=(0.181662498503)*x[0]**o+(-0.769571080865)*x[0]+(0.771109181078)*x[1]**o+(0.980677373303)*x[1]+(-0.625057940268)*x[2]**o+(0.0585672357346)*x[2]
-        arg[0,4]=(-0.0320907540755)*x[0]**o+(-0.519517369917)*x[0]+(-0.365190231996)*x[1]**o+(-0.192392652661)*x[1]+(-0.693267159516)*x[2]**o+(0.106458640425)*x[2]
-        arg[1,0]=(0.414286358161)*x[0]**o+(0.0223282279507)*x[0]+(0.215881279469)*x[1]**o+(0.68990977849)*x[1]+(-0.532075885581)*x[2]**o+(-0.269164904232)*x[2]
-        arg[1,1]=(-0.0445879250589)*x[0]**o+(0.889985400599)*x[0]+(0.842050582947)*x[1]**o+(-0.0275307884642)*x[1]+(0.774650107671)*x[2]**o+(0.19446514971)*x[2]
-        arg[1,2]=(0.913032880034)*x[0]**o+(-0.286537470008)*x[0]+(0.0902778267032)*x[1]**o+(0.548596933564)*x[1]+(-0.996100405074)*x[2]**o+(-0.509554019549)*x[2]
-        arg[1,3]=(0.44308812765)*x[0]**o+(-0.0641227726924)*x[0]+(0.484249008075)*x[1]**o+(0.581496384894)*x[1]+(0.592538533183)*x[2]**o+(-0.821638541512)*x[2]
-        arg[1,4]=(-0.898304735153)*x[0]**o+(0.333217967121)*x[0]+(-0.788218899371)*x[1]**o+(0.579723459039)*x[1]+(0.467006473159)*x[2]**o+(-0.277113860535)*x[2]
-        arg[2,0]=(0.515308716564)*x[0]**o+(0.255947750577)*x[0]+(0.232578337945)*x[1]**o+(0.900611887592)*x[1]+(-0.247710965611)*x[2]**o+(-0.985523228221)*x[2]
-        arg[2,1]=(0.611196756618)*x[0]**o+(0.146822999187)*x[0]+(-0.318793147278)*x[1]**o+(0.790772432028)*x[1]+(0.138036152668)*x[2]**o+(-0.800234207543)*x[2]
-        arg[2,2]=(-0.293576196546)*x[0]**o+(-0.521059592737)*x[0]+(0.301178293957)*x[1]**o+(-0.141430900198)*x[1]+(-0.782381874467)*x[2]**o+(0.92221179729)*x[2]
-        arg[2,3]=(0.673951778483)*x[0]**o+(-0.335068772752)*x[0]+(0.408793200723)*x[1]**o+(0.36906212176)*x[1]+(0.246292093855)*x[2]**o+(0.356147233675)*x[2]
-        arg[2,4]=(-0.218899302236)*x[0]**o+(0.271285962886)*x[0]+(-0.16364707283)*x[1]**o+(0.177195607727)*x[1]+(-0.287331396699)*x[2]**o+(-0.465391460497)*x[2]
-        arg[3,0]=(-0.369727856735)*x[0]**o+(-0.44351931666)*x[0]+(0.0375097686939)*x[1]**o+(0.276779121402)*x[1]+(0.662505672881)*x[2]**o+(-0.642709866174)*x[2]
-        arg[3,1]=(0.444940917816)*x[0]**o+(-0.178926126454)*x[0]+(0.824660645994)*x[1]**o+(0.825996820355)*x[1]+(0.798260651848)*x[2]**o+(0.331744022239)*x[2]
-        arg[3,2]=(-0.82489261483)*x[0]**o+(-0.340862079766)*x[0]+(-0.998375587383)*x[1]**o+(0.880222106116)*x[1]+(0.656096580473)*x[2]**o+(0.530854486127)*x[2]
-        arg[3,3]=(0.732863411435)*x[0]**o+(-0.324252004147)*x[0]+(0.789472654884)*x[1]**o+(-0.207794796011)*x[1]+(0.50903180567)*x[2]**o+(0.724319112504)*x[2]
-        arg[3,4]=(-0.980748139471)*x[0]**o+(0.0974331161906)*x[0]+(0.196275528452)*x[1]**o+(0.305231910003)*x[1]+(-0.0417825350947)*x[2]**o+(-0.2916834261)*x[2]
-        ref[0,0]=(-0.809842729223)/(o+1.)+(0.440179080018)+(0.748857269399)*0.5**o
-        ref[0,1]=(-1.15190944156)/(o+1.)+(-1.32322021274)+(-0.784526004748)*0.5**o
-        ref[0,2]=(-0.422288861417)/(o+1.)+(-0.565561300115)+(0.53445882525)*0.5**o
-        ref[0,3]=(0.146051240811)/(o+1.)+(0.134836764087)+(0.181662498503)*0.5**o
-        ref[0,4]=(-1.05845739151)/(o+1.)+(-0.302725691077)+(-0.0320907540755)*0.5**o
-        ref[1,0]=(-0.316194606113)/(o+1.)+(0.221536551104)+(0.414286358161)*0.5**o
-        ref[1,1]=(1.61670069062)/(o+1.)+(0.528459880922)+(-0.0445879250589)*0.5**o
-        ref[1,2]=(-0.905822578371)/(o+1.)+(-0.123747277996)+(0.913032880034)*0.5**o
-        ref[1,3]=(1.07678754126)/(o+1.)+(-0.152132464655)+(0.44308812765)*0.5**o
-        ref[1,4]=(-0.321212426212)/(o+1.)+(0.317913782812)+(-0.898304735153)*0.5**o
-        ref[2,0]=(-0.015132627666)/(o+1.)+(0.085518204974)+(0.515308716564)*0.5**o
-        ref[2,1]=(-0.18075699461)/(o+1.)+(0.0686806118359)+(0.611196756618)*0.5**o
-        ref[2,2]=(-0.481203580509)/(o+1.)+(0.129860652178)+(-0.293576196546)*0.5**o
-        ref[2,3]=(0.655085294578)/(o+1.)+(0.195070291341)+(0.673951778483)*0.5**o
-        ref[2,4]=(-0.450978469529)/(o+1.)+(-0.00845494494169)+(-0.218899302236)*0.5**o
-        ref[3,0]=(0.700015441575)/(o+1.)+(-0.404725030716)+(-0.369727856735)*0.5**o
-        ref[3,1]=(1.62292129784)/(o+1.)+(0.48940735807)+(0.444940917816)*0.5**o
-        ref[3,2]=(-0.342279006911)/(o+1.)+(0.535107256239)+(-0.82489261483)*0.5**o
-        ref[3,3]=(1.29850446055)/(o+1.)+(0.0961361561734)+(0.732863411435)*0.5**o
-        ref[3,4]=(0.154492993358)/(o+1.)+(0.055490800047)+(-0.980748139471)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.33788666753)*x[0]**o+(0.0147671449643)*x[0]+(0.14066054662)*x[1]**o+(-0.675231899756)*x[1]
-        arg[0,0,1]=(0.0100961441611)*x[0]**o+(0.401304171984)*x[0]+(-0.594786282119)*x[1]**o+(-0.561543495067)*x[1]
-        arg[0,1,0]=(-0.118311175162)*x[0]**o+(0.62454992688)*x[0]+(-0.8163725079)*x[1]**o+(-0.756355655277)*x[1]
-        arg[0,1,1]=(0.586991709411)*x[0]**o+(-0.600757941586)*x[0]+(0.0953383109011)*x[1]**o+(0.317827629801)*x[1]
-        arg[1,0,0]=(-0.251125236294)*x[0]**o+(0.166603616954)*x[0]+(0.978704943828)*x[1]**o+(0.589215389731)*x[1]
-        arg[1,0,1]=(0.0543182786738)*x[0]**o+(-0.334756305272)*x[0]+(-0.919571042987)*x[1]**o+(-0.0425734727213)*x[1]
-        arg[1,1,0]=(-0.867177621518)*x[0]**o+(-0.0750659593232)*x[0]+(-0.227277029921)*x[1]**o+(0.361120763296)*x[1]
-        arg[1,1,1]=(0.85129514889)*x[0]**o+(-0.441962000795)*x[0]+(0.425335668395)*x[1]**o+(0.204091109081)*x[1]
-        arg[2,0,0]=(-0.537930401585)*x[0]**o+(-0.206510941636)*x[0]+(-0.247374421196)*x[1]**o+(0.67043841725)*x[1]
-        arg[2,0,1]=(-0.101273864474)*x[0]**o+(0.283769727506)*x[0]+(-0.0850059833654)*x[1]**o+(-0.71291661379)*x[1]
-        arg[2,1,0]=(0.684430088582)*x[0]**o+(0.107733116086)*x[0]+(0.40398578341)*x[1]**o+(-0.525004991854)*x[1]
-        arg[2,1,1]=(-0.00801759014554)*x[0]**o+(-0.214858014851)*x[0]+(-0.427822011518)*x[1]**o+(0.0168962506945)*x[1]
-        arg[3,0,0]=(0.528563052182)*x[0]**o+(-0.630485796029)*x[0]+(0.0525765317703)*x[1]**o+(-0.469639006097)*x[1]
-        arg[3,0,1]=(0.178622695427)*x[0]**o+(0.0952996500383)*x[0]+(-0.785851578496)*x[1]**o+(0.856665398338)*x[1]
-        arg[3,1,0]=(0.547391926072)*x[0]**o+(-0.0179195091852)*x[0]+(-0.831368961862)*x[1]**o+(-0.437229107453)*x[1]
-        arg[3,1,1]=(-0.657011566453)*x[0]**o+(0.530176142378)*x[0]+(0.649145894746)*x[1]**o+(-0.755185337598)*x[1]
-        arg[4,0,0]=(-0.188305872652)*x[0]**o+(0.0207245930982)*x[0]+(-0.590757998421)*x[1]**o+(-0.793662033952)*x[1]
-        arg[4,0,1]=(0.417712824349)*x[0]**o+(-0.138327612527)*x[0]+(-0.381595921766)*x[1]**o+(0.0287368364725)*x[1]
-        arg[4,1,0]=(-0.83750540403)*x[0]**o+(0.247261273008)*x[0]+(-0.0769629479034)*x[1]**o+(0.0693501875686)*x[1]
-        arg[4,1,1]=(0.697434044074)*x[0]**o+(0.396582403702)*x[0]+(0.736132107034)*x[1]**o+(0.482245183242)*x[1]
-        arg[5,0,0]=(0.769936158184)*x[0]**o+(0.808871896459)*x[0]+(-0.559205314785)*x[1]**o+(-0.258014827146)*x[1]
-        arg[5,0,1]=(0.667132553969)*x[0]**o+(0.618184492083)*x[0]+(0.475852440157)*x[1]**o+(0.084499293443)*x[1]
-        arg[5,1,0]=(0.910882712823)*x[0]**o+(0.153897139268)*x[0]+(-0.61197280039)*x[1]**o+(0.441331985295)*x[1]
-        arg[5,1,1]=(-0.290188623857)*x[0]**o+(0.318266320131)*x[0]+(0.9587856247)*x[1]**o+(0.311981486508)*x[1]
-        ref[0,0,0]=(0.14066054662)/(o+1.)+(-0.330232377396)+(-0.33788666753)*0.5**o
-        ref[0,0,1]=(-0.594786282119)/(o+1.)+(-0.0801196615418)+(0.0100961441611)*0.5**o
-        ref[0,1,0]=(-0.8163725079)/(o+1.)+(-0.0659028641985)+(-0.118311175162)*0.5**o
-        ref[0,1,1]=(0.0953383109011)/(o+1.)+(-0.141465155893)+(0.586991709411)*0.5**o
-        ref[1,0,0]=(0.978704943828)/(o+1.)+(0.377909503343)+(-0.251125236294)*0.5**o
-        ref[1,0,1]=(-0.919571042987)/(o+1.)+(-0.188664888997)+(0.0543182786738)*0.5**o
-        ref[1,1,0]=(-0.227277029921)/(o+1.)+(0.143027401987)+(-0.867177621518)*0.5**o
-        ref[1,1,1]=(0.425335668395)/(o+1.)+(-0.118935445857)+(0.85129514889)*0.5**o
-        ref[2,0,0]=(-0.247374421196)/(o+1.)+(0.231963737807)+(-0.537930401585)*0.5**o
-        ref[2,0,1]=(-0.0850059833654)/(o+1.)+(-0.214573443142)+(-0.101273864474)*0.5**o
-        ref[2,1,0]=(0.40398578341)/(o+1.)+(-0.208635937884)+(0.684430088582)*0.5**o
-        ref[2,1,1]=(-0.427822011518)/(o+1.)+(-0.0989808820785)+(-0.00801759014554)*0.5**o
-        ref[3,0,0]=(0.0525765317703)/(o+1.)+(-0.550062401063)+(0.528563052182)*0.5**o
-        ref[3,0,1]=(-0.785851578496)/(o+1.)+(0.475982524188)+(0.178622695427)*0.5**o
-        ref[3,1,0]=(-0.831368961862)/(o+1.)+(-0.227574308319)+(0.547391926072)*0.5**o
-        ref[3,1,1]=(0.649145894746)/(o+1.)+(-0.11250459761)+(-0.657011566453)*0.5**o
-        ref[4,0,0]=(-0.590757998421)/(o+1.)+(-0.386468720427)+(-0.188305872652)*0.5**o
-        ref[4,0,1]=(-0.381595921766)/(o+1.)+(-0.0547953880271)+(0.417712824349)*0.5**o
-        ref[4,1,0]=(-0.0769629479034)/(o+1.)+(0.158305730288)+(-0.83750540403)*0.5**o
-        ref[4,1,1]=(0.736132107034)/(o+1.)+(0.439413793472)+(0.697434044074)*0.5**o
-        ref[5,0,0]=(-0.559205314785)/(o+1.)+(0.275428534657)+(0.769936158184)*0.5**o
-        ref[5,0,1]=(0.475852440157)/(o+1.)+(0.351341892763)+(0.667132553969)*0.5**o
-        ref[5,1,0]=(-0.61197280039)/(o+1.)+(0.297614562282)+(0.910882712823)*0.5**o
-        ref[5,1,1]=(0.9587856247)/(o+1.)+(0.315123903319)+(-0.290188623857)*0.5**o
-      else:
-        arg[0,0,0]=(0.292346424086)*x[0]**o+(0.105058465241)*x[0]+(-0.281467283372)*x[1]**o+(0.828345267021)*x[1]+(0.741242558638)*x[2]**o+(0.0858780765977)*x[2]
-        arg[0,0,1]=(-0.460556250835)*x[0]**o+(-0.845199338719)*x[0]+(-0.547000154821)*x[1]**o+(-0.972236450512)*x[1]+(0.823031420765)*x[2]**o+(0.278285294464)*x[2]
-        arg[0,1,0]=(0.380027894487)*x[0]**o+(-0.579359210385)*x[0]+(-0.760849798908)*x[1]**o+(0.0065870459398)*x[1]+(-0.869735580799)*x[2]**o+(-0.937378284335)*x[2]
-        arg[0,1,1]=(0.948682597897)*x[0]**o+(-0.882044080711)*x[0]+(-0.694398833899)*x[1]**o+(0.883635235205)*x[1]+(-0.473761903609)*x[2]**o+(0.961453193379)*x[2]
-        arg[1,0,0]=(0.357218603696)*x[0]**o+(-0.694504294144)*x[0]+(-0.187119222895)*x[1]**o+(0.727463485088)*x[1]+(0.150410254875)*x[2]**o+(-0.373430202907)*x[2]
-        arg[1,0,1]=(-0.776893233002)*x[0]**o+(0.565238637388)*x[0]+(-0.155674628662)*x[1]**o+(-0.938226259914)*x[1]+(0.575183633137)*x[2]**o+(0.319871583783)*x[2]
-        arg[1,1,0]=(0.593512911569)*x[0]**o+(-0.0578762085927)*x[0]+(-0.913450847289)*x[1]**o+(0.7074653217)*x[1]+(0.991175636143)*x[2]**o+(-0.535632452281)*x[2]
-        arg[1,1,1]=(-0.154542349616)*x[0]**o+(-0.841642050346)*x[0]+(0.878833704431)*x[1]**o+(0.85568524402)*x[1]+(-0.710374336281)*x[2]**o+(0.346540187252)*x[2]
-        arg[2,0,0]=(-0.765160864305)*x[0]**o+(0.608017010487)*x[0]+(0.841265469171)*x[1]**o+(-0.409854579584)*x[1]+(0.728931324538)*x[2]**o+(0.121315209213)*x[2]
-        arg[2,0,1]=(0.0397067301375)*x[0]**o+(-0.0451925117802)*x[0]+(-0.412724345414)*x[1]**o+(-0.447675002107)*x[1]+(0.141728105561)*x[2]**o+(0.923970189305)*x[2]
-        arg[2,1,0]=(-0.237044096923)*x[0]**o+(-0.826168294669)*x[0]+(0.19833520121)*x[1]**o+(-0.796076984382)*x[1]+(0.367399642334)*x[2]**o+(0.71172848801)*x[2]
-        arg[2,1,1]=(-0.3881830464)*x[0]**o+(0.988354722657)*x[0]+(0.762756805728)*x[1]**o+(0.551778683619)*x[1]+(0.975932105591)*x[2]**o+(-0.173192098292)*x[2]
-        arg[3,0,0]=(-0.226163777371)*x[0]**o+(-0.301094659695)*x[0]+(0.0682567814743)*x[1]**o+(-0.154914902824)*x[1]+(0.984669238436)*x[2]**o+(-0.431011897738)*x[2]
-        arg[3,0,1]=(-0.47230847571)*x[0]**o+(-0.579315893476)*x[0]+(-0.989289806396)*x[1]**o+(-0.673951334134)*x[1]+(0.98143767614)*x[2]**o+(-0.311074531383)*x[2]
-        arg[3,1,0]=(-0.276309910109)*x[0]**o+(-0.70244304164)*x[0]+(-0.963669800079)*x[1]**o+(-0.947723474952)*x[1]+(0.513451083144)*x[2]**o+(-0.0651803692263)*x[2]
-        arg[3,1,1]=(0.65175527234)*x[0]**o+(-0.294569414615)*x[0]+(-0.32846386125)*x[1]**o+(-0.868822318527)*x[1]+(0.268414480892)*x[2]**o+(-0.866835042217)*x[2]
-        arg[4,0,0]=(0.304002845434)*x[0]**o+(0.938467246002)*x[0]+(-0.106648262772)*x[1]**o+(0.227863374571)*x[1]+(-0.789305204045)*x[2]**o+(-0.171526142133)*x[2]
-        arg[4,0,1]=(0.70982305774)*x[0]**o+(0.404228697442)*x[0]+(0.190029230022)*x[1]**o+(-0.825276083634)*x[1]+(-0.739774636921)*x[2]**o+(-0.726529211281)*x[2]
-        arg[4,1,0]=(-0.238487290076)*x[0]**o+(-0.4901234628)*x[0]+(-0.836670757945)*x[1]**o+(0.0841493712661)*x[1]+(-0.685144435198)*x[2]**o+(-0.304978244786)*x[2]
-        arg[4,1,1]=(0.264176905985)*x[0]**o+(-0.410582158319)*x[0]+(-0.271915471538)*x[1]**o+(-0.996082427599)*x[1]+(-0.466654446945)*x[2]**o+(-0.723243781429)*x[2]
-        arg[5,0,0]=(0.379390860481)*x[0]**o+(-0.78556086955)*x[0]+(0.189126836375)*x[1]**o+(0.235947881164)*x[1]+(0.149142076852)*x[2]**o+(-0.944419890441)*x[2]
-        arg[5,0,1]=(0.768867280189)*x[0]**o+(-0.728364777249)*x[0]+(0.60414049451)*x[1]**o+(-0.538876171991)*x[1]+(-0.0947560131508)*x[2]**o+(0.474986163327)*x[2]
-        arg[5,1,0]=(-0.228069986734)*x[0]**o+(-0.680841588894)*x[0]+(-0.663806510587)*x[1]**o+(-0.852775021416)*x[1]+(-0.59539582999)*x[2]**o+(0.52369159839)*x[2]
-        arg[5,1,1]=(0.177872029425)*x[0]**o+(0.93423742256)*x[0]+(-0.0369475988192)*x[1]**o+(0.242202072343)*x[1]+(0.526144455402)*x[2]**o+(0.0217547142691)*x[2]
-        ref[0,0,0]=(0.459775275267)/(o+1.)+(0.50964090443)+(0.292346424086)*0.5**o
-        ref[0,0,1]=(0.276031265944)/(o+1.)+(-0.769575247383)+(-0.460556250835)*0.5**o
-        ref[0,1,0]=(-1.63058537971)/(o+1.)+(-0.75507522439)+(0.380027894487)*0.5**o
-        ref[0,1,1]=(-1.16816073751)/(o+1.)+(0.481522173937)+(0.948682597897)*0.5**o
-        ref[1,0,0]=(-0.0367089680209)/(o+1.)+(-0.170235505982)+(0.357218603696)*0.5**o
-        ref[1,0,1]=(0.419509004475)/(o+1.)+(-0.0265580193719)+(-0.776893233002)*0.5**o
-        ref[1,1,0]=(0.0777247888533)/(o+1.)+(0.0569783304129)+(0.593512911569)*0.5**o
-        ref[1,1,1]=(0.168459368149)/(o+1.)+(0.180291690463)+(-0.154542349616)*0.5**o
-        ref[2,0,0]=(1.57019679371)/(o+1.)+(0.159738820058)+(-0.765160864305)*0.5**o
-        ref[2,0,1]=(-0.270996239853)/(o+1.)+(0.215551337709)+(0.0397067301375)*0.5**o
-        ref[2,1,0]=(0.565734843545)/(o+1.)+(-0.455258395521)+(-0.237044096923)*0.5**o
-        ref[2,1,1]=(1.73868891132)/(o+1.)+(0.683470653992)+(-0.3881830464)*0.5**o
-        ref[3,0,0]=(1.05292601991)/(o+1.)+(-0.443510730129)+(-0.226163777371)*0.5**o
-        ref[3,0,1]=(-0.00785213025503)/(o+1.)+(-0.782170879496)+(-0.47230847571)*0.5**o
-        ref[3,1,0]=(-0.450218716935)/(o+1.)+(-0.857673442909)+(-0.276309910109)*0.5**o
-        ref[3,1,1]=(-0.0600493803575)/(o+1.)+(-1.01511338768)+(0.65175527234)*0.5**o
-        ref[4,0,0]=(-0.895953466817)/(o+1.)+(0.49740223922)+(0.304002845434)*0.5**o
-        ref[4,0,1]=(-0.549745406899)/(o+1.)+(-0.573788298736)+(0.70982305774)*0.5**o
-        ref[4,1,0]=(-1.52181519314)/(o+1.)+(-0.35547616816)+(-0.238487290076)*0.5**o
-        ref[4,1,1]=(-0.738569918483)/(o+1.)+(-1.06495418367)+(0.264176905985)*0.5**o
-        ref[5,0,0]=(0.338268913228)/(o+1.)+(-0.747016439414)+(0.379390860481)*0.5**o
-        ref[5,0,1]=(0.50938448136)/(o+1.)+(-0.396127392956)+(0.768867280189)*0.5**o
-        ref[5,1,0]=(-1.25920234058)/(o+1.)+(-0.50496250596)+(-0.228069986734)*0.5**o
-        ref[5,1,1]=(0.489196856583)/(o+1.)+(0.599097104586)+(0.177872029425)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.423100205741)*x[0]**o+(-0.681307394941)*x[0]+(-0.848175950825)*x[1]**o+(0.559338235783)*x[1]
-        arg[0,0,0,1]=(-0.739687474039)*x[0]**o+(-0.202202358237)*x[0]+(-0.838397517739)*x[1]**o+(-0.377580621185)*x[1]
-        arg[0,0,1,0]=(-0.423462958438)*x[0]**o+(-0.335929684088)*x[0]+(-0.616976579504)*x[1]**o+(-0.77803694581)*x[1]
-        arg[0,0,1,1]=(-0.432533121428)*x[0]**o+(0.0723865130937)*x[0]+(-0.953014661461)*x[1]**o+(0.92761707252)*x[1]
-        arg[0,0,2,0]=(-0.891613775753)*x[0]**o+(0.780592229933)*x[0]+(-0.156191993934)*x[1]**o+(0.985464289737)*x[1]
-        arg[0,0,2,1]=(0.909573147888)*x[0]**o+(-0.225603851475)*x[0]+(-0.68287286477)*x[1]**o+(0.330105905794)*x[1]
-        arg[0,1,0,0]=(-0.39808363424)*x[0]**o+(-0.290872560992)*x[0]+(-0.631624427826)*x[1]**o+(-0.389239289826)*x[1]
-        arg[0,1,0,1]=(-0.748658247224)*x[0]**o+(0.22314629362)*x[0]+(-0.0750972377036)*x[1]**o+(0.908914722147)*x[1]
-        arg[0,1,1,0]=(0.877627912148)*x[0]**o+(-0.988434656301)*x[0]+(-0.163646238293)*x[1]**o+(-0.169410711361)*x[1]
-        arg[0,1,1,1]=(-0.592580581615)*x[0]**o+(0.997989912544)*x[0]+(0.0667564973731)*x[1]**o+(-0.121580259121)*x[1]
-        arg[0,1,2,0]=(-0.505569292541)*x[0]**o+(-0.534428841308)*x[0]+(-0.899276958155)*x[1]**o+(-0.833972415825)*x[1]
-        arg[0,1,2,1]=(-0.215752366701)*x[0]**o+(-0.249993262232)*x[0]+(0.912452712698)*x[1]**o+(0.0601524115958)*x[1]
-        arg[0,2,0,0]=(0.684112319204)*x[0]**o+(0.343018234122)*x[0]+(0.267409202785)*x[1]**o+(0.7781133929)*x[1]
-        arg[0,2,0,1]=(0.552438501301)*x[0]**o+(-0.101558113559)*x[0]+(-0.152472725029)*x[1]**o+(-0.8771654517)*x[1]
-        arg[0,2,1,0]=(-0.31213422297)*x[0]**o+(0.597042319279)*x[0]+(-0.873134889407)*x[1]**o+(-0.68920786345)*x[1]
-        arg[0,2,1,1]=(0.883048532408)*x[0]**o+(-0.653997880306)*x[0]+(-0.761310589424)*x[1]**o+(-0.698342623962)*x[1]
-        arg[0,2,2,0]=(-0.324489237508)*x[0]**o+(-0.717724692716)*x[0]+(-0.936381308418)*x[1]**o+(0.712416971077)*x[1]
-        arg[0,2,2,1]=(-0.971735193469)*x[0]**o+(0.0943629094751)*x[0]+(0.419811305063)*x[1]**o+(0.125623316569)*x[1]
-        arg[0,3,0,0]=(-0.305553454905)*x[0]**o+(-0.936112994503)*x[0]+(0.707279059071)*x[1]**o+(-0.794754809337)*x[1]
-        arg[0,3,0,1]=(0.803934620926)*x[0]**o+(-0.632020033455)*x[0]+(0.819264129099)*x[1]**o+(0.770744069672)*x[1]
-        arg[0,3,1,0]=(0.996632326055)*x[0]**o+(-0.537850178404)*x[0]+(-0.60262522048)*x[1]**o+(-0.431667704232)*x[1]
-        arg[0,3,1,1]=(0.402799911553)*x[0]**o+(0.155798565063)*x[0]+(0.722837842981)*x[1]**o+(0.462463978227)*x[1]
-        arg[0,3,2,0]=(0.937966588808)*x[0]**o+(-0.797151899551)*x[0]+(0.62363567076)*x[1]**o+(-0.60458214868)*x[1]
-        arg[0,3,2,1]=(-0.0389713032301)*x[0]**o+(0.497820326557)*x[0]+(-0.950660964237)*x[1]**o+(0.0247372614337)*x[1]
-        arg[0,4,0,0]=(-0.589529640529)*x[0]**o+(-0.71761078076)*x[0]+(-0.872148906918)*x[1]**o+(-0.666618835503)*x[1]
-        arg[0,4,0,1]=(0.78615039967)*x[0]**o+(0.99287672137)*x[0]+(0.329194160571)*x[1]**o+(0.309370990805)*x[1]
-        arg[0,4,1,0]=(-0.801187683466)*x[0]**o+(0.476957978386)*x[0]+(0.107007555422)*x[1]**o+(-0.211909676249)*x[1]
-        arg[0,4,1,1]=(0.817551079419)*x[0]**o+(0.958544826763)*x[0]+(-0.720479146591)*x[1]**o+(0.0769824586505)*x[1]
-        arg[0,4,2,0]=(-0.245391293539)*x[0]**o+(0.240588876322)*x[0]+(0.766214937295)*x[1]**o+(0.625282150348)*x[1]
-        arg[0,4,2,1]=(-0.780163545255)*x[0]**o+(-0.84424180556)*x[0]+(-0.993826355778)*x[1]**o+(-0.708432857746)*x[1]
-        arg[1,0,0,0]=(0.0998104654851)*x[0]**o+(-0.933870759023)*x[0]+(-0.00667060999489)*x[1]**o+(-0.304328472241)*x[1]
-        arg[1,0,0,1]=(0.716858223574)*x[0]**o+(0.0907083966301)*x[0]+(0.118004968786)*x[1]**o+(-0.989434356769)*x[1]
-        arg[1,0,1,0]=(0.433505460082)*x[0]**o+(0.927792393402)*x[0]+(0.10117572965)*x[1]**o+(-0.719175235748)*x[1]
-        arg[1,0,1,1]=(0.93394463477)*x[0]**o+(0.30554551436)*x[0]+(-0.221528653572)*x[1]**o+(-0.965153365935)*x[1]
-        arg[1,0,2,0]=(0.217926136552)*x[0]**o+(0.75089182057)*x[0]+(0.798438119547)*x[1]**o+(-0.131885152617)*x[1]
-        arg[1,0,2,1]=(0.489885370386)*x[0]**o+(-0.958785443386)*x[0]+(-0.934023631551)*x[1]**o+(-0.120727978484)*x[1]
-        arg[1,1,0,0]=(-0.104659311537)*x[0]**o+(0.323817119133)*x[0]+(0.207178629335)*x[1]**o+(0.132677138305)*x[1]
-        arg[1,1,0,1]=(0.855593354128)*x[0]**o+(-0.319099268106)*x[0]+(-0.75522659926)*x[1]**o+(0.398648791668)*x[1]
-        arg[1,1,1,0]=(0.165499959353)*x[0]**o+(0.025416591231)*x[0]+(-0.454711374202)*x[1]**o+(-0.149643847094)*x[1]
-        arg[1,1,1,1]=(0.668195333828)*x[0]**o+(-0.954315351102)*x[0]+(-0.15549992542)*x[1]**o+(0.960203842246)*x[1]
-        arg[1,1,2,0]=(-0.0830862028828)*x[0]**o+(0.104413343709)*x[0]+(0.0666836881524)*x[1]**o+(-0.909918510114)*x[1]
-        arg[1,1,2,1]=(-0.614061685098)*x[0]**o+(-0.696536572273)*x[0]+(0.674867602585)*x[1]**o+(0.742233774001)*x[1]
-        arg[1,2,0,0]=(-0.271025278576)*x[0]**o+(0.194146585691)*x[0]+(0.369545867263)*x[1]**o+(-0.444209773003)*x[1]
-        arg[1,2,0,1]=(-0.646570016511)*x[0]**o+(-0.1181935343)*x[0]+(-0.473468176784)*x[1]**o+(0.980639666617)*x[1]
-        arg[1,2,1,0]=(-0.274558546949)*x[0]**o+(-0.994564294804)*x[0]+(-0.710677848448)*x[1]**o+(-0.471981673909)*x[1]
-        arg[1,2,1,1]=(0.920326662139)*x[0]**o+(-0.503477706392)*x[0]+(-0.488075258363)*x[1]**o+(-0.390701293427)*x[1]
-        arg[1,2,2,0]=(-0.734779609501)*x[0]**o+(-0.211522964885)*x[0]+(-0.209704158218)*x[1]**o+(0.602143419316)*x[1]
-        arg[1,2,2,1]=(-0.71042927509)*x[0]**o+(-0.320801535296)*x[0]+(-0.307645214006)*x[1]**o+(0.902857741355)*x[1]
-        arg[1,3,0,0]=(0.430044544461)*x[0]**o+(-0.321809854969)*x[0]+(-0.202705286059)*x[1]**o+(-0.136245903236)*x[1]
-        arg[1,3,0,1]=(-0.0215232394148)*x[0]**o+(0.560515199075)*x[0]+(0.183422356152)*x[1]**o+(0.0500950744933)*x[1]
-        arg[1,3,1,0]=(0.956072319541)*x[0]**o+(-0.910407504398)*x[0]+(0.710351406673)*x[1]**o+(-0.673149941902)*x[1]
-        arg[1,3,1,1]=(0.512105745894)*x[0]**o+(0.617656019287)*x[0]+(0.178878380134)*x[1]**o+(-0.304972517759)*x[1]
-        arg[1,3,2,0]=(0.505194196756)*x[0]**o+(-0.588278604691)*x[0]+(0.657312673212)*x[1]**o+(-0.198666173753)*x[1]
-        arg[1,3,2,1]=(0.562199962955)*x[0]**o+(-0.855080919048)*x[0]+(0.798106457622)*x[1]**o+(-0.462368594285)*x[1]
-        arg[1,4,0,0]=(-0.95103819151)*x[0]**o+(0.996179304819)*x[0]+(0.720809353558)*x[1]**o+(-0.357882371835)*x[1]
-        arg[1,4,0,1]=(-0.337212448334)*x[0]**o+(-0.647939092937)*x[0]+(0.432152553594)*x[1]**o+(0.284393585377)*x[1]
-        arg[1,4,1,0]=(0.286170290079)*x[0]**o+(0.813168170391)*x[0]+(-0.178814496497)*x[1]**o+(0.414687546663)*x[1]
-        arg[1,4,1,1]=(0.00961378883254)*x[0]**o+(-0.946718643529)*x[0]+(0.828780485661)*x[1]**o+(0.54461217692)*x[1]
-        arg[1,4,2,0]=(0.784403348421)*x[0]**o+(0.430078584466)*x[0]+(-0.542741131881)*x[1]**o+(0.0290828265624)*x[1]
-        arg[1,4,2,1]=(-0.246343667616)*x[0]**o+(-0.27406067089)*x[0]+(-0.938704878102)*x[1]**o+(0.907921504301)*x[1]
-        arg[2,0,0,0]=(-0.551056874357)*x[0]**o+(-0.697006980356)*x[0]+(-0.733447125487)*x[1]**o+(-0.241902075189)*x[1]
-        arg[2,0,0,1]=(-0.75556701159)*x[0]**o+(0.155303331948)*x[0]+(0.480546881289)*x[1]**o+(-0.420954472057)*x[1]
-        arg[2,0,1,0]=(0.12990139506)*x[0]**o+(-0.0990388974263)*x[0]+(-0.913089275462)*x[1]**o+(-0.766316334455)*x[1]
-        arg[2,0,1,1]=(-0.96760564527)*x[0]**o+(0.94596820894)*x[0]+(-0.208507053422)*x[1]**o+(0.82642580152)*x[1]
-        arg[2,0,2,0]=(-0.801660576339)*x[0]**o+(0.724091208253)*x[0]+(-0.416451086696)*x[1]**o+(-0.255959329575)*x[1]
-        arg[2,0,2,1]=(0.380233654687)*x[0]**o+(-0.27467061721)*x[0]+(-0.626861863133)*x[1]**o+(0.498725464891)*x[1]
-        arg[2,1,0,0]=(0.733227197081)*x[0]**o+(-0.111622822078)*x[0]+(-0.199363221943)*x[1]**o+(-0.449664634046)*x[1]
-        arg[2,1,0,1]=(0.381774304841)*x[0]**o+(0.914208421879)*x[0]+(-0.545958908798)*x[1]**o+(-0.344721917598)*x[1]
-        arg[2,1,1,0]=(-0.861412661903)*x[0]**o+(-0.202264578976)*x[0]+(-0.225404313047)*x[1]**o+(0.716189374265)*x[1]
-        arg[2,1,1,1]=(-0.180088205315)*x[0]**o+(0.133136657032)*x[0]+(-0.341650807958)*x[1]**o+(-0.570348715256)*x[1]
-        arg[2,1,2,0]=(-0.626863150737)*x[0]**o+(-0.236854925766)*x[0]+(-0.271186155613)*x[1]**o+(-0.750500826476)*x[1]
-        arg[2,1,2,1]=(-0.138580929054)*x[0]**o+(-0.925057205334)*x[0]+(0.404961686669)*x[1]**o+(0.542298342705)*x[1]
-        arg[2,2,0,0]=(0.453186536783)*x[0]**o+(0.368065177204)*x[0]+(0.545211472015)*x[1]**o+(0.334551805933)*x[1]
-        arg[2,2,0,1]=(0.0639699038803)*x[0]**o+(0.154192875522)*x[0]+(0.101347900441)*x[1]**o+(-0.668313576443)*x[1]
-        arg[2,2,1,0]=(0.465173445732)*x[0]**o+(-0.475009875122)*x[0]+(-0.748444748361)*x[1]**o+(0.620845514745)*x[1]
-        arg[2,2,1,1]=(0.720975965615)*x[0]**o+(-0.266631032721)*x[0]+(0.0996389916136)*x[1]**o+(-0.96886977517)*x[1]
-        arg[2,2,2,0]=(-0.396391719953)*x[0]**o+(-0.240091626001)*x[0]+(-0.42411685734)*x[1]**o+(-0.458446010754)*x[1]
-        arg[2,2,2,1]=(-0.662584035264)*x[0]**o+(0.23813614536)*x[0]+(0.810893160816)*x[1]**o+(-0.130143663026)*x[1]
-        arg[2,3,0,0]=(-0.651550480594)*x[0]**o+(0.370844612999)*x[0]+(-0.808002027275)*x[1]**o+(0.531083477622)*x[1]
-        arg[2,3,0,1]=(-0.287184182382)*x[0]**o+(0.928877646221)*x[0]+(-0.271563784371)*x[1]**o+(-0.46908309398)*x[1]
-        arg[2,3,1,0]=(0.342080138259)*x[0]**o+(0.458994887529)*x[0]+(-0.544475387926)*x[1]**o+(-0.203224249914)*x[1]
-        arg[2,3,1,1]=(-0.0791009979206)*x[0]**o+(0.536480501773)*x[0]+(-0.624008015173)*x[1]**o+(-0.380504135174)*x[1]
-        arg[2,3,2,0]=(-0.707089360149)*x[0]**o+(0.217716900812)*x[0]+(0.020441009853)*x[1]**o+(0.680214150153)*x[1]
-        arg[2,3,2,1]=(0.0368635610611)*x[0]**o+(0.646697307691)*x[0]+(0.36118713723)*x[1]**o+(-0.535295583008)*x[1]
-        arg[2,4,0,0]=(0.806938680905)*x[0]**o+(0.449096825134)*x[0]+(-0.43507826254)*x[1]**o+(-0.300956286252)*x[1]
-        arg[2,4,0,1]=(-0.268005914326)*x[0]**o+(0.583132947291)*x[0]+(-0.344067495236)*x[1]**o+(-0.526011968282)*x[1]
-        arg[2,4,1,0]=(-0.0953663458348)*x[0]**o+(0.834765967023)*x[0]+(-0.0410345097335)*x[1]**o+(0.493198054713)*x[1]
-        arg[2,4,1,1]=(0.964777812988)*x[0]**o+(-0.791397009733)*x[0]+(-0.962108127047)*x[1]**o+(0.378083818799)*x[1]
-        arg[2,4,2,0]=(0.0977715857241)*x[0]**o+(-0.118265910205)*x[0]+(-0.0181736456148)*x[1]**o+(-0.480499109439)*x[1]
-        arg[2,4,2,1]=(0.396936262802)*x[0]**o+(0.979807961416)*x[0]+(0.383251286227)*x[1]**o+(-0.921599329372)*x[1]
-        arg[3,0,0,0]=(-0.193869568904)*x[0]**o+(0.335533150532)*x[0]+(-0.542087879921)*x[1]**o+(0.916531699685)*x[1]
-        arg[3,0,0,1]=(0.732192438113)*x[0]**o+(0.610866210623)*x[0]+(0.232455584069)*x[1]**o+(0.109577342902)*x[1]
-        arg[3,0,1,0]=(0.0487640958479)*x[0]**o+(-0.250229114846)*x[0]+(-0.539343546695)*x[1]**o+(-0.456485153733)*x[1]
-        arg[3,0,1,1]=(0.951844805407)*x[0]**o+(-0.811442383281)*x[0]+(-0.537581471096)*x[1]**o+(0.350217063609)*x[1]
-        arg[3,0,2,0]=(0.495490307938)*x[0]**o+(0.529667417659)*x[0]+(-0.853447043865)*x[1]**o+(0.97002519322)*x[1]
-        arg[3,0,2,1]=(0.38188303469)*x[0]**o+(-0.75911672537)*x[0]+(-0.67563531103)*x[1]**o+(0.384002769031)*x[1]
-        arg[3,1,0,0]=(0.44471228922)*x[0]**o+(-0.958995287488)*x[0]+(-0.356730659314)*x[1]**o+(0.853749081247)*x[1]
-        arg[3,1,0,1]=(-0.674677862576)*x[0]**o+(-0.651945231545)*x[0]+(-0.869871613483)*x[1]**o+(0.518493292422)*x[1]
-        arg[3,1,1,0]=(-0.803923033456)*x[0]**o+(0.916638584514)*x[0]+(-0.410056071233)*x[1]**o+(-0.313811798732)*x[1]
-        arg[3,1,1,1]=(-0.677586574312)*x[0]**o+(0.101317771211)*x[0]+(-0.848629733526)*x[1]**o+(0.956935407827)*x[1]
-        arg[3,1,2,0]=(0.723956969878)*x[0]**o+(-0.677929268987)*x[0]+(0.168694427833)*x[1]**o+(0.675664564011)*x[1]
-        arg[3,1,2,1]=(-0.0961257584415)*x[0]**o+(0.870273004118)*x[0]+(0.0979731186867)*x[1]**o+(-0.561786099655)*x[1]
-        arg[3,2,0,0]=(-0.506857925404)*x[0]**o+(0.950429186893)*x[0]+(-0.765686972231)*x[1]**o+(0.300787357163)*x[1]
-        arg[3,2,0,1]=(-0.479464705052)*x[0]**o+(-0.814881390688)*x[0]+(-0.549033177495)*x[1]**o+(0.875164713771)*x[1]
-        arg[3,2,1,0]=(0.984579775952)*x[0]**o+(0.822464384935)*x[0]+(-0.352937841183)*x[1]**o+(-0.389516730371)*x[1]
-        arg[3,2,1,1]=(-0.75230207503)*x[0]**o+(0.921759892886)*x[0]+(0.683120790039)*x[1]**o+(0.470250085193)*x[1]
-        arg[3,2,2,0]=(-0.257935272452)*x[0]**o+(-0.437370511818)*x[0]+(-0.350363036315)*x[1]**o+(-0.232415372202)*x[1]
-        arg[3,2,2,1]=(0.0784702766009)*x[0]**o+(0.460959683819)*x[0]+(0.758201028024)*x[1]**o+(0.101597092257)*x[1]
-        arg[3,3,0,0]=(0.292597181224)*x[0]**o+(-0.322992033991)*x[0]+(-0.536413055541)*x[1]**o+(-0.95609054732)*x[1]
-        arg[3,3,0,1]=(0.174134715952)*x[0]**o+(0.811729326606)*x[0]+(0.89040777319)*x[1]**o+(0.893572419966)*x[1]
-        arg[3,3,1,0]=(0.768234215847)*x[0]**o+(0.36391719033)*x[0]+(0.598889528719)*x[1]**o+(0.152035960251)*x[1]
-        arg[3,3,1,1]=(-0.77938361663)*x[0]**o+(-0.448945619013)*x[0]+(0.471242869055)*x[1]**o+(0.112888214554)*x[1]
-        arg[3,3,2,0]=(-0.00617753872016)*x[0]**o+(0.0155218100192)*x[0]+(0.674100983537)*x[1]**o+(0.211406831421)*x[1]
-        arg[3,3,2,1]=(0.124470359441)*x[0]**o+(0.117393617733)*x[0]+(-0.297791856337)*x[1]**o+(-0.210405798241)*x[1]
-        arg[3,4,0,0]=(0.139920132608)*x[0]**o+(-0.0073381380034)*x[0]+(-0.77267392403)*x[1]**o+(0.792299687107)*x[1]
-        arg[3,4,0,1]=(0.328592839797)*x[0]**o+(-0.758899359217)*x[0]+(0.730856047416)*x[1]**o+(-0.389548922357)*x[1]
-        arg[3,4,1,0]=(-0.239362896774)*x[0]**o+(0.513205289336)*x[0]+(-0.393781550386)*x[1]**o+(0.229968513732)*x[1]
-        arg[3,4,1,1]=(0.777985150139)*x[0]**o+(0.273278793895)*x[0]+(0.17782134987)*x[1]**o+(0.491127331923)*x[1]
-        arg[3,4,2,0]=(0.348482781008)*x[0]**o+(0.458696185739)*x[0]+(-0.77882422986)*x[1]**o+(0.455739446004)*x[1]
-        arg[3,4,2,1]=(-0.396751338134)*x[0]**o+(0.449026376364)*x[0]+(0.308553967581)*x[1]**o+(-0.777653415416)*x[1]
-        ref[0,0,0,0]=(-0.848175950825)/(o+1.)+(-0.060984579579)+(0.423100205741)*0.5**o
-        ref[0,0,0,1]=(-0.838397517739)/(o+1.)+(-0.289891489711)+(-0.739687474039)*0.5**o
-        ref[0,0,1,0]=(-0.616976579504)/(o+1.)+(-0.556983314949)+(-0.423462958438)*0.5**o
-        ref[0,0,1,1]=(-0.953014661461)/(o+1.)+(0.500001792807)+(-0.432533121428)*0.5**o
-        ref[0,0,2,0]=(-0.156191993934)/(o+1.)+(0.883028259835)+(-0.891613775753)*0.5**o
-        ref[0,0,2,1]=(-0.68287286477)/(o+1.)+(0.0522510271596)+(0.909573147888)*0.5**o
-        ref[0,1,0,0]=(-0.631624427826)/(o+1.)+(-0.340055925409)+(-0.39808363424)*0.5**o
-        ref[0,1,0,1]=(-0.0750972377036)/(o+1.)+(0.566030507884)+(-0.748658247224)*0.5**o
-        ref[0,1,1,0]=(-0.163646238293)/(o+1.)+(-0.578922683831)+(0.877627912148)*0.5**o
-        ref[0,1,1,1]=(0.0667564973731)/(o+1.)+(0.438204826712)+(-0.592580581615)*0.5**o
-        ref[0,1,2,0]=(-0.899276958155)/(o+1.)+(-0.684200628566)+(-0.505569292541)*0.5**o
-        ref[0,1,2,1]=(0.912452712698)/(o+1.)+(-0.0949204253183)+(-0.215752366701)*0.5**o
-        ref[0,2,0,0]=(0.267409202785)/(o+1.)+(0.560565813511)+(0.684112319204)*0.5**o
-        ref[0,2,0,1]=(-0.152472725029)/(o+1.)+(-0.48936178263)+(0.552438501301)*0.5**o
-        ref[0,2,1,0]=(-0.873134889407)/(o+1.)+(-0.0460827720855)+(-0.31213422297)*0.5**o
-        ref[0,2,1,1]=(-0.761310589424)/(o+1.)+(-0.676170252134)+(0.883048532408)*0.5**o
-        ref[0,2,2,0]=(-0.936381308418)/(o+1.)+(-0.00265386081956)+(-0.324489237508)*0.5**o
-        ref[0,2,2,1]=(0.419811305063)/(o+1.)+(0.109993113022)+(-0.971735193469)*0.5**o
-        ref[0,3,0,0]=(0.707279059071)/(o+1.)+(-0.86543390192)+(-0.305553454905)*0.5**o
-        ref[0,3,0,1]=(0.819264129099)/(o+1.)+(0.0693620181083)+(0.803934620926)*0.5**o
-        ref[0,3,1,0]=(-0.60262522048)/(o+1.)+(-0.484758941318)+(0.996632326055)*0.5**o
-        ref[0,3,1,1]=(0.722837842981)/(o+1.)+(0.309131271645)+(0.402799911553)*0.5**o
-        ref[0,3,2,0]=(0.62363567076)/(o+1.)+(-0.700867024115)+(0.937966588808)*0.5**o
-        ref[0,3,2,1]=(-0.950660964237)/(o+1.)+(0.261278793995)+(-0.0389713032301)*0.5**o
-        ref[0,4,0,0]=(-0.872148906918)/(o+1.)+(-0.692114808131)+(-0.589529640529)*0.5**o
-        ref[0,4,0,1]=(0.329194160571)/(o+1.)+(0.651123856087)+(0.78615039967)*0.5**o
-        ref[0,4,1,0]=(0.107007555422)/(o+1.)+(0.132524151069)+(-0.801187683466)*0.5**o
-        ref[0,4,1,1]=(-0.720479146591)/(o+1.)+(0.517763642707)+(0.817551079419)*0.5**o
-        ref[0,4,2,0]=(0.766214937295)/(o+1.)+(0.432935513335)+(-0.245391293539)*0.5**o
-        ref[0,4,2,1]=(-0.993826355778)/(o+1.)+(-0.776337331653)+(-0.780163545255)*0.5**o
-        ref[1,0,0,0]=(-0.00667060999489)/(o+1.)+(-0.619099615632)+(0.0998104654851)*0.5**o
-        ref[1,0,0,1]=(0.118004968786)/(o+1.)+(-0.449362980069)+(0.716858223574)*0.5**o
-        ref[1,0,1,0]=(0.10117572965)/(o+1.)+(0.104308578827)+(0.433505460082)*0.5**o
-        ref[1,0,1,1]=(-0.221528653572)/(o+1.)+(-0.329803925788)+(0.93394463477)*0.5**o
-        ref[1,0,2,0]=(0.798438119547)/(o+1.)+(0.309503333977)+(0.217926136552)*0.5**o
-        ref[1,0,2,1]=(-0.934023631551)/(o+1.)+(-0.539756710935)+(0.489885370386)*0.5**o
-        ref[1,1,0,0]=(0.207178629335)/(o+1.)+(0.228247128719)+(-0.104659311537)*0.5**o
-        ref[1,1,0,1]=(-0.75522659926)/(o+1.)+(0.0397747617809)+(0.855593354128)*0.5**o
-        ref[1,1,1,0]=(-0.454711374202)/(o+1.)+(-0.0621136279316)+(0.165499959353)*0.5**o
-        ref[1,1,1,1]=(-0.15549992542)/(o+1.)+(0.00294424557217)+(0.668195333828)*0.5**o
-        ref[1,1,2,0]=(0.0666836881524)/(o+1.)+(-0.402752583203)+(-0.0830862028828)*0.5**o
-        ref[1,1,2,1]=(0.674867602585)/(o+1.)+(0.0228486008642)+(-0.614061685098)*0.5**o
-        ref[1,2,0,0]=(0.369545867263)/(o+1.)+(-0.125031593656)+(-0.271025278576)*0.5**o
-        ref[1,2,0,1]=(-0.473468176784)/(o+1.)+(0.431223066159)+(-0.646570016511)*0.5**o
-        ref[1,2,1,0]=(-0.710677848448)/(o+1.)+(-0.733272984356)+(-0.274558546949)*0.5**o
-        ref[1,2,1,1]=(-0.488075258363)/(o+1.)+(-0.44708949991)+(0.920326662139)*0.5**o
-        ref[1,2,2,0]=(-0.209704158218)/(o+1.)+(0.195310227215)+(-0.734779609501)*0.5**o
-        ref[1,2,2,1]=(-0.307645214006)/(o+1.)+(0.29102810303)+(-0.71042927509)*0.5**o
-        ref[1,3,0,0]=(-0.202705286059)/(o+1.)+(-0.229027879102)+(0.430044544461)*0.5**o
-        ref[1,3,0,1]=(0.183422356152)/(o+1.)+(0.305305136784)+(-0.0215232394148)*0.5**o
-        ref[1,3,1,0]=(0.710351406673)/(o+1.)+(-0.79177872315)+(0.956072319541)*0.5**o
-        ref[1,3,1,1]=(0.178878380134)/(o+1.)+(0.156341750764)+(0.512105745894)*0.5**o
-        ref[1,3,2,0]=(0.657312673212)/(o+1.)+(-0.393472389222)+(0.505194196756)*0.5**o
-        ref[1,3,2,1]=(0.798106457622)/(o+1.)+(-0.658724756667)+(0.562199962955)*0.5**o
-        ref[1,4,0,0]=(0.720809353558)/(o+1.)+(0.319148466492)+(-0.95103819151)*0.5**o
-        ref[1,4,0,1]=(0.432152553594)/(o+1.)+(-0.18177275378)+(-0.337212448334)*0.5**o
-        ref[1,4,1,0]=(-0.178814496497)/(o+1.)+(0.613927858527)+(0.286170290079)*0.5**o
-        ref[1,4,1,1]=(0.828780485661)/(o+1.)+(-0.201053233304)+(0.00961378883254)*0.5**o
-        ref[1,4,2,0]=(-0.542741131881)/(o+1.)+(0.229580705514)+(0.784403348421)*0.5**o
-        ref[1,4,2,1]=(-0.938704878102)/(o+1.)+(0.316930416706)+(-0.246343667616)*0.5**o
-        ref[2,0,0,0]=(-0.733447125487)/(o+1.)+(-0.469454527772)+(-0.551056874357)*0.5**o
-        ref[2,0,0,1]=(0.480546881289)/(o+1.)+(-0.132825570055)+(-0.75556701159)*0.5**o
-        ref[2,0,1,0]=(-0.913089275462)/(o+1.)+(-0.432677615941)+(0.12990139506)*0.5**o
-        ref[2,0,1,1]=(-0.208507053422)/(o+1.)+(0.88619700523)+(-0.96760564527)*0.5**o
-        ref[2,0,2,0]=(-0.416451086696)/(o+1.)+(0.234065939339)+(-0.801660576339)*0.5**o
-        ref[2,0,2,1]=(-0.626861863133)/(o+1.)+(0.112027423841)+(0.380233654687)*0.5**o
-        ref[2,1,0,0]=(-0.199363221943)/(o+1.)+(-0.280643728062)+(0.733227197081)*0.5**o
-        ref[2,1,0,1]=(-0.545958908798)/(o+1.)+(0.284743252141)+(0.381774304841)*0.5**o
-        ref[2,1,1,0]=(-0.225404313047)/(o+1.)+(0.256962397644)+(-0.861412661903)*0.5**o
-        ref[2,1,1,1]=(-0.341650807958)/(o+1.)+(-0.218606029112)+(-0.180088205315)*0.5**o
-        ref[2,1,2,0]=(-0.271186155613)/(o+1.)+(-0.493677876121)+(-0.626863150737)*0.5**o
-        ref[2,1,2,1]=(0.404961686669)/(o+1.)+(-0.191379431315)+(-0.138580929054)*0.5**o
-        ref[2,2,0,0]=(0.545211472015)/(o+1.)+(0.351308491569)+(0.453186536783)*0.5**o
-        ref[2,2,0,1]=(0.101347900441)/(o+1.)+(-0.257060350461)+(0.0639699038803)*0.5**o
-        ref[2,2,1,0]=(-0.748444748361)/(o+1.)+(0.0729178198114)+(0.465173445732)*0.5**o
-        ref[2,2,1,1]=(0.0996389916136)/(o+1.)+(-0.617750403946)+(0.720975965615)*0.5**o
-        ref[2,2,2,0]=(-0.42411685734)/(o+1.)+(-0.349268818378)+(-0.396391719953)*0.5**o
-        ref[2,2,2,1]=(0.810893160816)/(o+1.)+(0.053996241167)+(-0.662584035264)*0.5**o
-        ref[2,3,0,0]=(-0.808002027275)/(o+1.)+(0.45096404531)+(-0.651550480594)*0.5**o
-        ref[2,3,0,1]=(-0.271563784371)/(o+1.)+(0.22989727612)+(-0.287184182382)*0.5**o
-        ref[2,3,1,0]=(-0.544475387926)/(o+1.)+(0.127885318807)+(0.342080138259)*0.5**o
-        ref[2,3,1,1]=(-0.624008015173)/(o+1.)+(0.0779881832997)+(-0.0791009979206)*0.5**o
-        ref[2,3,2,0]=(0.020441009853)/(o+1.)+(0.448965525483)+(-0.707089360149)*0.5**o
-        ref[2,3,2,1]=(0.36118713723)/(o+1.)+(0.0557008623413)+(0.0368635610611)*0.5**o
-        ref[2,4,0,0]=(-0.43507826254)/(o+1.)+(0.0740702694408)+(0.806938680905)*0.5**o
-        ref[2,4,0,1]=(-0.344067495236)/(o+1.)+(0.0285604895043)+(-0.268005914326)*0.5**o
-        ref[2,4,1,0]=(-0.0410345097335)/(o+1.)+(0.663982010868)+(-0.0953663458348)*0.5**o
-        ref[2,4,1,1]=(-0.962108127047)/(o+1.)+(-0.206656595467)+(0.964777812988)*0.5**o
-        ref[2,4,2,0]=(-0.0181736456148)/(o+1.)+(-0.299382509822)+(0.0977715857241)*0.5**o
-        ref[2,4,2,1]=(0.383251286227)/(o+1.)+(0.0291043160221)+(0.396936262802)*0.5**o
-        ref[3,0,0,0]=(-0.542087879921)/(o+1.)+(0.626032425109)+(-0.193869568904)*0.5**o
-        ref[3,0,0,1]=(0.232455584069)/(o+1.)+(0.360221776762)+(0.732192438113)*0.5**o
-        ref[3,0,1,0]=(-0.539343546695)/(o+1.)+(-0.353357134289)+(0.0487640958479)*0.5**o
-        ref[3,0,1,1]=(-0.537581471096)/(o+1.)+(-0.230612659836)+(0.951844805407)*0.5**o
-        ref[3,0,2,0]=(-0.853447043865)/(o+1.)+(0.74984630544)+(0.495490307938)*0.5**o
-        ref[3,0,2,1]=(-0.67563531103)/(o+1.)+(-0.187556978169)+(0.38188303469)*0.5**o
-        ref[3,1,0,0]=(-0.356730659314)/(o+1.)+(-0.0526231031206)+(0.44471228922)*0.5**o
-        ref[3,1,0,1]=(-0.869871613483)/(o+1.)+(-0.0667259695618)+(-0.674677862576)*0.5**o
-        ref[3,1,1,0]=(-0.410056071233)/(o+1.)+(0.301413392891)+(-0.803923033456)*0.5**o
-        ref[3,1,1,1]=(-0.848629733526)/(o+1.)+(0.529126589519)+(-0.677586574312)*0.5**o
-        ref[3,1,2,0]=(0.168694427833)/(o+1.)+(-0.00113235248793)+(0.723956969878)*0.5**o
-        ref[3,1,2,1]=(0.0979731186867)/(o+1.)+(0.154243452232)+(-0.0961257584415)*0.5**o
-        ref[3,2,0,0]=(-0.765686972231)/(o+1.)+(0.625608272028)+(-0.506857925404)*0.5**o
-        ref[3,2,0,1]=(-0.549033177495)/(o+1.)+(0.0301416615418)+(-0.479464705052)*0.5**o
-        ref[3,2,1,0]=(-0.352937841183)/(o+1.)+(0.216473827282)+(0.984579775952)*0.5**o
-        ref[3,2,1,1]=(0.683120790039)/(o+1.)+(0.696004989039)+(-0.75230207503)*0.5**o
-        ref[3,2,2,0]=(-0.350363036315)/(o+1.)+(-0.33489294201)+(-0.257935272452)*0.5**o
-        ref[3,2,2,1]=(0.758201028024)/(o+1.)+(0.281278388038)+(0.0784702766009)*0.5**o
-        ref[3,3,0,0]=(-0.536413055541)/(o+1.)+(-0.639541290655)+(0.292597181224)*0.5**o
-        ref[3,3,0,1]=(0.89040777319)/(o+1.)+(0.852650873286)+(0.174134715952)*0.5**o
-        ref[3,3,1,0]=(0.598889528719)/(o+1.)+(0.257976575291)+(0.768234215847)*0.5**o
-        ref[3,3,1,1]=(0.471242869055)/(o+1.)+(-0.168028702229)+(-0.77938361663)*0.5**o
-        ref[3,3,2,0]=(0.674100983537)/(o+1.)+(0.11346432072)+(-0.00617753872016)*0.5**o
-        ref[3,3,2,1]=(-0.297791856337)/(o+1.)+(-0.0465060902539)+(0.124470359441)*0.5**o
-        ref[3,4,0,0]=(-0.77267392403)/(o+1.)+(0.392480774552)+(0.139920132608)*0.5**o
-        ref[3,4,0,1]=(0.730856047416)/(o+1.)+(-0.574224140787)+(0.328592839797)*0.5**o
-        ref[3,4,1,0]=(-0.393781550386)/(o+1.)+(0.371586901534)+(-0.239362896774)*0.5**o
-        ref[3,4,1,1]=(0.17782134987)/(o+1.)+(0.382203062909)+(0.777985150139)*0.5**o
-        ref[3,4,2,0]=(-0.77882422986)/(o+1.)+(0.457217815872)+(0.348482781008)*0.5**o
-        ref[3,4,2,1]=(0.308553967581)/(o+1.)+(-0.164313519526)+(-0.396751338134)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.663998508168)*x[0]**o+(0.797340164931)*x[0]+(0.285182001599)*x[1]**o+(0.99720606542)*x[1]+(0.127610260108)*x[2]**o+(0.0141819362674)*x[2]
-        arg[0,0,0,1]=(-0.010130464476)*x[0]**o+(-0.694140348803)*x[0]+(-0.554528445238)*x[1]**o+(0.192639775817)*x[1]+(-0.520164891934)*x[2]**o+(0.316830081989)*x[2]
-        arg[0,0,1,0]=(-0.176542289385)*x[0]**o+(-0.312451025451)*x[0]+(0.33951668081)*x[1]**o+(-0.66674551066)*x[1]+(-0.0515929546862)*x[2]**o+(0.688180995863)*x[2]
-        arg[0,0,1,1]=(-0.98152572229)*x[0]**o+(0.156411605196)*x[0]+(0.588065240125)*x[1]**o+(0.665830732172)*x[1]+(-0.834625744106)*x[2]**o+(-0.138276534671)*x[2]
-        arg[0,0,2,0]=(0.555897422173)*x[0]**o+(0.0269431977874)*x[0]+(0.671161746561)*x[1]**o+(0.0857445285374)*x[1]+(0.578027911522)*x[2]**o+(0.217805007393)*x[2]
-        arg[0,0,2,1]=(0.23127040923)*x[0]**o+(0.624353504617)*x[0]+(-0.433915231286)*x[1]**o+(-0.860173971996)*x[1]+(-0.801472434932)*x[2]**o+(-0.779575445432)*x[2]
-        arg[0,1,0,0]=(0.0202445177842)*x[0]**o+(-0.0654289514039)*x[0]+(-0.877581892208)*x[1]**o+(-0.231833216639)*x[1]+(0.609752401432)*x[2]**o+(-0.802673983603)*x[2]
-        arg[0,1,0,1]=(0.99935098551)*x[0]**o+(0.665639246142)*x[0]+(0.593510187831)*x[1]**o+(0.213336090684)*x[1]+(0.232667772738)*x[2]**o+(-0.651386262633)*x[2]
-        arg[0,1,1,0]=(0.151799117419)*x[0]**o+(-0.34631043288)*x[0]+(-0.264898731671)*x[1]**o+(0.697527693137)*x[1]+(0.389030412719)*x[2]**o+(0.613338381577)*x[2]
-        arg[0,1,1,1]=(-0.51422532626)*x[0]**o+(0.228040429268)*x[0]+(-0.276760984751)*x[1]**o+(0.379484010198)*x[1]+(0.896837565192)*x[2]**o+(0.195866552401)*x[2]
-        arg[0,1,2,0]=(0.908244888839)*x[0]**o+(0.217098236162)*x[0]+(0.798725721675)*x[1]**o+(0.216635630826)*x[1]+(0.960227216319)*x[2]**o+(-0.885381182879)*x[2]
-        arg[0,1,2,1]=(-0.872307766634)*x[0]**o+(0.843197737136)*x[0]+(-0.895220198791)*x[1]**o+(0.866433237518)*x[1]+(0.560344834226)*x[2]**o+(0.895797915384)*x[2]
-        arg[0,2,0,0]=(0.00173619592035)*x[0]**o+(-0.209651858019)*x[0]+(0.323249367733)*x[1]**o+(-0.848445788048)*x[1]+(-0.747443572813)*x[2]**o+(0.342929929066)*x[2]
-        arg[0,2,0,1]=(0.998184336552)*x[0]**o+(-0.669882578313)*x[0]+(-0.632794054696)*x[1]**o+(-0.779832061924)*x[1]+(0.0588815237456)*x[2]**o+(0.419538634163)*x[2]
-        arg[0,2,1,0]=(-0.921234331968)*x[0]**o+(0.319724478943)*x[0]+(0.867192523265)*x[1]**o+(-0.183047755109)*x[1]+(-0.753047661507)*x[2]**o+(-0.797179040607)*x[2]
-        arg[0,2,1,1]=(0.153578015941)*x[0]**o+(0.887820807812)*x[0]+(-0.607944647299)*x[1]**o+(-0.0487413965527)*x[1]+(-0.812369692315)*x[2]**o+(0.323102876844)*x[2]
-        arg[0,2,2,0]=(0.29601674794)*x[0]**o+(-0.108738759628)*x[0]+(0.242837345895)*x[1]**o+(-0.324487554664)*x[1]+(0.584399369463)*x[2]**o+(0.683877139789)*x[2]
-        arg[0,2,2,1]=(0.0580007647099)*x[0]**o+(0.214488016057)*x[0]+(0.669087265419)*x[1]**o+(-0.311999860513)*x[1]+(0.678940598195)*x[2]**o+(0.658847203441)*x[2]
-        arg[0,3,0,0]=(-0.337999890505)*x[0]**o+(-0.842479530409)*x[0]+(0.786376708623)*x[1]**o+(0.597298234359)*x[1]+(0.495442668997)*x[2]**o+(-0.183828960943)*x[2]
-        arg[0,3,0,1]=(-0.825813329629)*x[0]**o+(0.197040670392)*x[0]+(0.997784261354)*x[1]**o+(-0.355290279278)*x[1]+(0.657909516664)*x[2]**o+(-0.568281670001)*x[2]
-        arg[0,3,1,0]=(0.699313512079)*x[0]**o+(-0.916350147519)*x[0]+(-0.311605808179)*x[1]**o+(0.222618888987)*x[1]+(0.872150798976)*x[2]**o+(0.139773150125)*x[2]
-        arg[0,3,1,1]=(0.140764124286)*x[0]**o+(0.994013777309)*x[0]+(-0.0792107151558)*x[1]**o+(-0.285357856751)*x[1]+(-0.800285107223)*x[2]**o+(0.413029089978)*x[2]
-        arg[0,3,2,0]=(-0.68177752688)*x[0]**o+(0.0339522871939)*x[0]+(-0.641399841911)*x[1]**o+(0.263279621719)*x[1]+(-0.406115766497)*x[2]**o+(-0.774639092638)*x[2]
-        arg[0,3,2,1]=(0.655685968811)*x[0]**o+(0.20085918281)*x[0]+(-0.753491228829)*x[1]**o+(0.393669658887)*x[1]+(0.339469131428)*x[2]**o+(0.424803724709)*x[2]
-        arg[0,4,0,0]=(-0.18027010068)*x[0]**o+(-0.773007683353)*x[0]+(0.767133020895)*x[1]**o+(-0.810449138606)*x[1]+(0.295421955604)*x[2]**o+(-0.955926880008)*x[2]
-        arg[0,4,0,1]=(-0.914768182433)*x[0]**o+(-0.67024319498)*x[0]+(0.533244666277)*x[1]**o+(-0.705719628704)*x[1]+(-0.963633923897)*x[2]**o+(-0.0818895784023)*x[2]
-        arg[0,4,1,0]=(0.274727423835)*x[0]**o+(0.838218676826)*x[0]+(0.269989900726)*x[1]**o+(0.650600179293)*x[1]+(-0.855210211935)*x[2]**o+(-0.800261683904)*x[2]
-        arg[0,4,1,1]=(0.257574026756)*x[0]**o+(-0.787643878696)*x[0]+(-0.619136916008)*x[1]**o+(-0.242580269843)*x[1]+(0.0229959873555)*x[2]**o+(-0.685725009107)*x[2]
-        arg[0,4,2,0]=(0.703185665611)*x[0]**o+(0.37686548395)*x[0]+(-0.414901304236)*x[1]**o+(0.310335568741)*x[1]+(-0.740764649572)*x[2]**o+(-0.389356987349)*x[2]
-        arg[0,4,2,1]=(-0.153792811673)*x[0]**o+(-0.179777301012)*x[0]+(0.694402537357)*x[1]**o+(-0.928918851291)*x[1]+(-0.439307255129)*x[2]**o+(0.148671231214)*x[2]
-        arg[1,0,0,0]=(0.298044833507)*x[0]**o+(0.538000859279)*x[0]+(-0.405432041063)*x[1]**o+(-0.8912548734)*x[1]+(0.929554154255)*x[2]**o+(-0.515905504512)*x[2]
-        arg[1,0,0,1]=(-0.575485929806)*x[0]**o+(0.757951009672)*x[0]+(-0.815024122535)*x[1]**o+(0.846519632117)*x[1]+(0.594901198403)*x[2]**o+(-0.672034020351)*x[2]
-        arg[1,0,1,0]=(0.998358005707)*x[0]**o+(-0.144729504804)*x[0]+(0.463445062889)*x[1]**o+(0.428918148475)*x[1]+(-0.172684103233)*x[2]**o+(-0.394742387769)*x[2]
-        arg[1,0,1,1]=(0.783593367143)*x[0]**o+(-0.269882783638)*x[0]+(-0.880336283806)*x[1]**o+(0.337087191943)*x[1]+(-0.819512478233)*x[2]**o+(0.582924902797)*x[2]
-        arg[1,0,2,0]=(-0.42345692756)*x[0]**o+(-0.251910598711)*x[0]+(-0.882193473121)*x[1]**o+(0.535405977525)*x[1]+(-0.117109433242)*x[2]**o+(0.99565775159)*x[2]
-        arg[1,0,2,1]=(-0.790917746681)*x[0]**o+(-0.291814540513)*x[0]+(-0.0828604085821)*x[1]**o+(-0.0715382319561)*x[1]+(-0.188453557262)*x[2]**o+(0.297596604241)*x[2]
-        arg[1,1,0,0]=(0.944343622558)*x[0]**o+(0.537893843235)*x[0]+(-0.370697218599)*x[1]**o+(-0.043709074747)*x[1]+(-0.803318845377)*x[2]**o+(0.814392946479)*x[2]
-        arg[1,1,0,1]=(-0.246711023019)*x[0]**o+(-0.847902406307)*x[0]+(0.062135604814)*x[1]**o+(0.581341495124)*x[1]+(0.561484848132)*x[2]**o+(0.06820017559)*x[2]
-        arg[1,1,1,0]=(-0.530782063061)*x[0]**o+(-0.951246029994)*x[0]+(-0.809647094351)*x[1]**o+(0.198165508669)*x[1]+(0.591475451485)*x[2]**o+(-0.0567469904903)*x[2]
-        arg[1,1,1,1]=(-0.710844761085)*x[0]**o+(0.742146961382)*x[0]+(0.482950602277)*x[1]**o+(-0.701576649521)*x[1]+(0.752305355358)*x[2]**o+(0.658478074845)*x[2]
-        arg[1,1,2,0]=(0.574657505707)*x[0]**o+(-0.268094098242)*x[0]+(-0.79745549318)*x[1]**o+(0.994732385826)*x[1]+(0.36752110393)*x[2]**o+(0.0733521344978)*x[2]
-        arg[1,1,2,1]=(-0.365373199615)*x[0]**o+(0.295532428151)*x[0]+(-0.916049089517)*x[1]**o+(0.562876895658)*x[1]+(0.698818392781)*x[2]**o+(0.413166153315)*x[2]
-        arg[1,2,0,0]=(0.544776615353)*x[0]**o+(-0.647889580869)*x[0]+(-0.0569263298125)*x[1]**o+(0.145083519829)*x[1]+(-0.0456368749942)*x[2]**o+(0.125915481669)*x[2]
-        arg[1,2,0,1]=(0.11684721915)*x[0]**o+(-0.793592672443)*x[0]+(-0.428585283805)*x[1]**o+(0.280358391066)*x[1]+(0.72731741847)*x[2]**o+(-0.320459136831)*x[2]
-        arg[1,2,1,0]=(0.561736948232)*x[0]**o+(0.833411538285)*x[0]+(0.361519222525)*x[1]**o+(-0.785948355356)*x[1]+(-0.595938528895)*x[2]**o+(0.720247127573)*x[2]
-        arg[1,2,1,1]=(0.578630452142)*x[0]**o+(0.218238639275)*x[0]+(0.792496779641)*x[1]**o+(-0.818431209813)*x[1]+(-0.252522807953)*x[2]**o+(0.648505893606)*x[2]
-        arg[1,2,2,0]=(-0.0269203575755)*x[0]**o+(-0.586454813205)*x[0]+(-0.239885637578)*x[1]**o+(0.186263805313)*x[1]+(0.585909451795)*x[2]**o+(-0.630731036615)*x[2]
-        arg[1,2,2,1]=(-0.534642633404)*x[0]**o+(0.921034930282)*x[0]+(-0.326672365556)*x[1]**o+(0.690509146367)*x[1]+(-0.802567575176)*x[2]**o+(-0.235903818924)*x[2]
-        arg[1,3,0,0]=(0.892302802156)*x[0]**o+(-0.528836075071)*x[0]+(-0.806520835766)*x[1]**o+(0.771321197577)*x[1]+(-0.545545197249)*x[2]**o+(-0.633185919719)*x[2]
-        arg[1,3,0,1]=(0.883702447985)*x[0]**o+(0.698176356191)*x[0]+(-0.348189466787)*x[1]**o+(-0.390058291315)*x[1]+(0.805736008481)*x[2]**o+(0.861787745203)*x[2]
-        arg[1,3,1,0]=(0.492527250981)*x[0]**o+(0.635712008949)*x[0]+(-0.464397346193)*x[1]**o+(-0.820952575379)*x[1]+(0.235015001164)*x[2]**o+(-0.846160845231)*x[2]
-        arg[1,3,1,1]=(0.372499842901)*x[0]**o+(-0.524824414377)*x[0]+(0.553450359486)*x[1]**o+(-0.187372498756)*x[1]+(-0.389983195918)*x[2]**o+(-0.310421627605)*x[2]
-        arg[1,3,2,0]=(0.533098362924)*x[0]**o+(0.917820078197)*x[0]+(-0.557683070597)*x[1]**o+(-0.388498248383)*x[1]+(-0.551866333066)*x[2]**o+(0.696873468511)*x[2]
-        arg[1,3,2,1]=(-0.909038123273)*x[0]**o+(0.19323884412)*x[0]+(-0.00134861813725)*x[1]**o+(-0.858193032021)*x[1]+(0.0436856504635)*x[2]**o+(-0.646994265986)*x[2]
-        arg[1,4,0,0]=(-0.974474210185)*x[0]**o+(-0.39786371112)*x[0]+(-0.829024534519)*x[1]**o+(0.836151642189)*x[1]+(0.679654655991)*x[2]**o+(0.750995377779)*x[2]
-        arg[1,4,0,1]=(0.964745405431)*x[0]**o+(0.269189443297)*x[0]+(0.531636623506)*x[1]**o+(-0.522687387383)*x[1]+(0.463500385567)*x[2]**o+(0.160556224359)*x[2]
-        arg[1,4,1,0]=(-0.714725894011)*x[0]**o+(0.0478807291181)*x[0]+(0.591494552904)*x[1]**o+(-0.240293119817)*x[1]+(-0.0463360360003)*x[2]**o+(-0.932835908096)*x[2]
-        arg[1,4,1,1]=(-0.809072545597)*x[0]**o+(-0.963335650229)*x[0]+(-0.781885522838)*x[1]**o+(0.822395174213)*x[1]+(-0.42590899181)*x[2]**o+(-0.237357227214)*x[2]
-        arg[1,4,2,0]=(-0.21281876112)*x[0]**o+(-0.131640536998)*x[0]+(-0.648680371617)*x[1]**o+(0.555759774031)*x[1]+(-0.911030244394)*x[2]**o+(0.962859403252)*x[2]
-        arg[1,4,2,1]=(-0.247930702516)*x[0]**o+(0.509829884687)*x[0]+(0.0387816417333)*x[1]**o+(-0.605945140743)*x[1]+(0.187880415018)*x[2]**o+(-0.813242364046)*x[2]
-        arg[2,0,0,0]=(0.616352869937)*x[0]**o+(-0.930708209966)*x[0]+(-0.874778661809)*x[1]**o+(-0.330225154904)*x[1]+(0.632020336392)*x[2]**o+(0.205631598228)*x[2]
-        arg[2,0,0,1]=(-0.85704374519)*x[0]**o+(0.99958496465)*x[0]+(0.807095767473)*x[1]**o+(0.63097388144)*x[1]+(0.000665614692828)*x[2]**o+(0.418070858864)*x[2]
-        arg[2,0,1,0]=(0.326870102902)*x[0]**o+(0.565855791221)*x[0]+(-0.39418644908)*x[1]**o+(-0.96081735968)*x[1]+(0.937255293725)*x[2]**o+(0.533015538451)*x[2]
-        arg[2,0,1,1]=(-0.699939842176)*x[0]**o+(0.808055402204)*x[0]+(0.448948790025)*x[1]**o+(-0.720122241439)*x[1]+(0.0532200858319)*x[2]**o+(-0.204851171261)*x[2]
-        arg[2,0,2,0]=(-0.985996827188)*x[0]**o+(-0.604602591167)*x[0]+(0.445903925662)*x[1]**o+(-0.163135114049)*x[1]+(-0.264281316158)*x[2]**o+(-0.381814212863)*x[2]
-        arg[2,0,2,1]=(-0.195357773436)*x[0]**o+(0.73285122682)*x[0]+(-0.914846292757)*x[1]**o+(-0.190524885095)*x[1]+(-0.103440307801)*x[2]**o+(-0.0309647945217)*x[2]
-        arg[2,1,0,0]=(0.601652939329)*x[0]**o+(-0.757171386065)*x[0]+(-0.91147090556)*x[1]**o+(-0.665258414941)*x[1]+(-0.0504245123191)*x[2]**o+(-0.274928427711)*x[2]
-        arg[2,1,0,1]=(0.534038022604)*x[0]**o+(-0.977365399298)*x[0]+(0.884656682614)*x[1]**o+(0.0866421048629)*x[1]+(-0.70687555879)*x[2]**o+(-0.99928465036)*x[2]
-        arg[2,1,1,0]=(-0.361196978257)*x[0]**o+(0.192559020092)*x[0]+(-0.0767715201942)*x[1]**o+(0.222254953069)*x[1]+(-0.128362555436)*x[2]**o+(-0.667485829139)*x[2]
-        arg[2,1,1,1]=(0.00930987921229)*x[0]**o+(0.269207633273)*x[0]+(0.943798095916)*x[1]**o+(0.483123564952)*x[1]+(-0.231669365037)*x[2]**o+(-0.877005245489)*x[2]
-        arg[2,1,2,0]=(-0.181479246679)*x[0]**o+(0.619551810132)*x[0]+(0.499400298722)*x[1]**o+(-0.307864349855)*x[1]+(0.19303040809)*x[2]**o+(0.523640816928)*x[2]
-        arg[2,1,2,1]=(-0.99665050175)*x[0]**o+(-0.647775674514)*x[0]+(-0.0015481673821)*x[1]**o+(-0.749198451256)*x[1]+(0.652528193579)*x[2]**o+(-0.0194127861341)*x[2]
-        arg[2,2,0,0]=(0.870069083779)*x[0]**o+(0.179747121592)*x[0]+(0.387523112512)*x[1]**o+(0.625711925024)*x[1]+(0.840141938096)*x[2]**o+(0.629709976556)*x[2]
-        arg[2,2,0,1]=(-0.841259995642)*x[0]**o+(0.220858862445)*x[0]+(0.397334296484)*x[1]**o+(-0.036654179636)*x[1]+(0.235704322138)*x[2]**o+(-0.6299228864)*x[2]
-        arg[2,2,1,0]=(-0.561184923307)*x[0]**o+(-0.643644162376)*x[0]+(0.728784994685)*x[1]**o+(-0.697418070844)*x[1]+(-0.56166463788)*x[2]**o+(-0.668760084534)*x[2]
-        arg[2,2,1,1]=(0.92243000401)*x[0]**o+(0.96165833182)*x[0]+(0.540379002453)*x[1]**o+(0.630245078647)*x[1]+(-0.375873656541)*x[2]**o+(0.71424898756)*x[2]
-        arg[2,2,2,0]=(0.331131296272)*x[0]**o+(-0.136167378345)*x[0]+(-0.375407637025)*x[1]**o+(-0.0890691004072)*x[1]+(-0.787306129385)*x[2]**o+(-0.447474749986)*x[2]
-        arg[2,2,2,1]=(-0.47892171854)*x[0]**o+(0.341448171328)*x[0]+(0.662403724393)*x[1]**o+(0.581128263913)*x[1]+(0.00987835902932)*x[2]**o+(-0.884847129103)*x[2]
-        arg[2,3,0,0]=(0.0219406022052)*x[0]**o+(-0.370001982912)*x[0]+(0.948162807268)*x[1]**o+(-0.870857624404)*x[1]+(0.580053532448)*x[2]**o+(-0.488657040041)*x[2]
-        arg[2,3,0,1]=(-0.114799511617)*x[0]**o+(0.547853919356)*x[0]+(-0.224367707174)*x[1]**o+(0.551491902831)*x[1]+(-0.101845907889)*x[2]**o+(-0.793527438395)*x[2]
-        arg[2,3,1,0]=(-0.103518223905)*x[0]**o+(-0.319840011093)*x[0]+(-0.856612861717)*x[1]**o+(0.0208578084364)*x[1]+(0.132248308449)*x[2]**o+(-0.580663554499)*x[2]
-        arg[2,3,1,1]=(-0.958142224242)*x[0]**o+(-0.401299403423)*x[0]+(-0.289034019185)*x[1]**o+(-0.0913958572584)*x[1]+(-0.818515945817)*x[2]**o+(-0.918366425737)*x[2]
-        arg[2,3,2,0]=(0.730554594734)*x[0]**o+(0.209964841318)*x[0]+(-0.4157212696)*x[1]**o+(-0.673375403124)*x[1]+(-0.409899056244)*x[2]**o+(0.124418003637)*x[2]
-        arg[2,3,2,1]=(-0.930974589897)*x[0]**o+(0.256452400333)*x[0]+(0.778606258675)*x[1]**o+(0.23173182074)*x[1]+(-0.846439682798)*x[2]**o+(-0.408860675089)*x[2]
-        arg[2,4,0,0]=(-0.246046780287)*x[0]**o+(-0.653766430943)*x[0]+(0.725379461155)*x[1]**o+(-0.305490823497)*x[1]+(0.0837637468427)*x[2]**o+(-0.458770631133)*x[2]
-        arg[2,4,0,1]=(-0.612751147889)*x[0]**o+(0.504418327803)*x[0]+(-0.835051783805)*x[1]**o+(-0.86410559166)*x[1]+(0.928919612861)*x[2]**o+(0.303164594248)*x[2]
-        arg[2,4,1,0]=(-0.26092972064)*x[0]**o+(-0.990592356395)*x[0]+(-0.48716443965)*x[1]**o+(0.659447608304)*x[1]+(0.429865593656)*x[2]**o+(-0.661470437053)*x[2]
-        arg[2,4,1,1]=(0.325840618456)*x[0]**o+(-0.261974904995)*x[0]+(0.476982730267)*x[1]**o+(-0.738119182885)*x[1]+(0.903618858571)*x[2]**o+(-0.287442022624)*x[2]
-        arg[2,4,2,0]=(0.655590135983)*x[0]**o+(-0.135505327297)*x[0]+(-0.38079131346)*x[1]**o+(0.663850751769)*x[1]+(-0.658568109867)*x[2]**o+(-0.267875066063)*x[2]
-        arg[2,4,2,1]=(0.570712162768)*x[0]**o+(0.390833274898)*x[0]+(-0.97326103687)*x[1]**o+(-0.419300688467)*x[1]+(0.55695479018)*x[2]**o+(0.547271407555)*x[2]
-        arg[3,0,0,0]=(-0.486023722572)*x[0]**o+(-0.790544923201)*x[0]+(0.101237181961)*x[1]**o+(0.23267779263)*x[1]+(-0.458580701132)*x[2]**o+(-0.479449733139)*x[2]
-        arg[3,0,0,1]=(-0.705291625776)*x[0]**o+(0.144166702405)*x[0]+(-0.210596631253)*x[1]**o+(0.843721258425)*x[1]+(-0.716420627484)*x[2]**o+(0.145427688875)*x[2]
-        arg[3,0,1,0]=(-0.838974120992)*x[0]**o+(0.824423674933)*x[0]+(-0.211643366873)*x[1]**o+(0.603255736693)*x[1]+(-0.119484817371)*x[2]**o+(-0.357272543813)*x[2]
-        arg[3,0,1,1]=(0.140027541071)*x[0]**o+(0.373598174368)*x[0]+(-0.661831753147)*x[1]**o+(-0.973724961653)*x[1]+(-0.0738899100301)*x[2]**o+(0.0128579666074)*x[2]
-        arg[3,0,2,0]=(-0.39083471939)*x[0]**o+(-0.00821070494132)*x[0]+(-0.315936839906)*x[1]**o+(-0.967556350778)*x[1]+(0.136991762476)*x[2]**o+(0.374041520875)*x[2]
-        arg[3,0,2,1]=(0.0734743009776)*x[0]**o+(-0.103186084491)*x[0]+(0.426933353985)*x[1]**o+(-0.631917740007)*x[1]+(0.755296770294)*x[2]**o+(0.492171872216)*x[2]
-        arg[3,1,0,0]=(-0.414502599055)*x[0]**o+(0.512031410722)*x[0]+(0.610677049483)*x[1]**o+(-0.075275839509)*x[1]+(0.853407100545)*x[2]**o+(-0.569731924126)*x[2]
-        arg[3,1,0,1]=(0.886115095396)*x[0]**o+(0.811807969433)*x[0]+(0.550623354147)*x[1]**o+(-0.703728894875)*x[1]+(0.784318903356)*x[2]**o+(0.45891829089)*x[2]
-        arg[3,1,1,0]=(0.312577129879)*x[0]**o+(0.0127110992422)*x[0]+(-0.174614340667)*x[1]**o+(0.744535847679)*x[1]+(0.991125452344)*x[2]**o+(-0.405595301834)*x[2]
-        arg[3,1,1,1]=(0.784369258288)*x[0]**o+(-0.709503832235)*x[0]+(0.032963558933)*x[1]**o+(-0.471036543959)*x[1]+(-0.138022967476)*x[2]**o+(-0.38452297541)*x[2]
-        arg[3,1,2,0]=(-0.337332295082)*x[0]**o+(-0.460457867002)*x[0]+(-0.102806204559)*x[1]**o+(-0.502889108364)*x[1]+(-0.641488011668)*x[2]**o+(0.359501036527)*x[2]
-        arg[3,1,2,1]=(0.791575892417)*x[0]**o+(0.126853712619)*x[0]+(-0.408911942637)*x[1]**o+(0.557039825987)*x[1]+(-0.260719710621)*x[2]**o+(-0.648326395935)*x[2]
-        arg[3,2,0,0]=(-0.0909007497318)*x[0]**o+(-0.337085519884)*x[0]+(-0.651987922715)*x[1]**o+(-0.130225558042)*x[1]+(0.926567188664)*x[2]**o+(0.764369275478)*x[2]
-        arg[3,2,0,1]=(-0.764137934896)*x[0]**o+(0.443892891832)*x[0]+(0.688197384487)*x[1]**o+(0.485210058592)*x[1]+(0.267932741224)*x[2]**o+(0.0366064885582)*x[2]
-        arg[3,2,1,0]=(0.49435832562)*x[0]**o+(0.860649583676)*x[0]+(0.667415091305)*x[1]**o+(0.144069385904)*x[1]+(-0.933847080974)*x[2]**o+(-0.378123304101)*x[2]
-        arg[3,2,1,1]=(-0.460752644946)*x[0]**o+(0.491079753273)*x[0]+(-0.536055633506)*x[1]**o+(0.786378615881)*x[1]+(-0.190647453518)*x[2]**o+(-0.192868019034)*x[2]
-        arg[3,2,2,0]=(0.0946687985697)*x[0]**o+(0.978197346579)*x[0]+(0.972747948856)*x[1]**o+(-0.575670550665)*x[1]+(-0.096229657916)*x[2]**o+(-0.772567430449)*x[2]
-        arg[3,2,2,1]=(0.177521713734)*x[0]**o+(0.0683685252148)*x[0]+(0.423995112682)*x[1]**o+(-0.489247981968)*x[1]+(-0.537130434099)*x[2]**o+(-0.0228879131449)*x[2]
-        arg[3,3,0,0]=(0.592201472175)*x[0]**o+(0.674304504132)*x[0]+(0.428414872879)*x[1]**o+(0.956414209094)*x[1]+(-0.272853242491)*x[2]**o+(-0.639858910901)*x[2]
-        arg[3,3,0,1]=(0.572972211447)*x[0]**o+(0.943096858489)*x[0]+(-0.990948797302)*x[1]**o+(-0.475383526007)*x[1]+(0.542076985363)*x[2]**o+(-0.884809421862)*x[2]
-        arg[3,3,1,0]=(0.775163727164)*x[0]**o+(0.101808074039)*x[0]+(0.575490330857)*x[1]**o+(0.199751068512)*x[1]+(0.538742155685)*x[2]**o+(-0.725822956214)*x[2]
-        arg[3,3,1,1]=(-0.244586606882)*x[0]**o+(0.983712254807)*x[0]+(0.187370538052)*x[1]**o+(0.332611385073)*x[1]+(0.536377667373)*x[2]**o+(0.255272558489)*x[2]
-        arg[3,3,2,0]=(-0.676040282048)*x[0]**o+(-0.172059284021)*x[0]+(0.25100451419)*x[1]**o+(0.303226061816)*x[1]+(0.138976177556)*x[2]**o+(-0.330104849626)*x[2]
-        arg[3,3,2,1]=(-0.136437682299)*x[0]**o+(0.938786085213)*x[0]+(0.853018944962)*x[1]**o+(-0.628078903025)*x[1]+(-0.903567849919)*x[2]**o+(0.837621994591)*x[2]
-        arg[3,4,0,0]=(0.28632587806)*x[0]**o+(-0.480626263522)*x[0]+(-0.0537965100699)*x[1]**o+(0.423252432505)*x[1]+(0.200777153039)*x[2]**o+(0.629713098071)*x[2]
-        arg[3,4,0,1]=(0.326448964148)*x[0]**o+(0.809991245673)*x[0]+(-0.527362539073)*x[1]**o+(-0.0727890632651)*x[1]+(0.210806278508)*x[2]**o+(0.736535063786)*x[2]
-        arg[3,4,1,0]=(0.760474271531)*x[0]**o+(0.378083396435)*x[0]+(-0.991296179693)*x[1]**o+(0.431965391269)*x[1]+(-0.12597704605)*x[2]**o+(-0.128017966575)*x[2]
-        arg[3,4,1,1]=(-0.21508452109)*x[0]**o+(-0.583147117492)*x[0]+(0.779535489322)*x[1]**o+(0.601144982341)*x[1]+(-0.870362610456)*x[2]**o+(-0.318535391517)*x[2]
-        arg[3,4,2,0]=(-0.195181632154)*x[0]**o+(0.237570596161)*x[0]+(-0.794725125363)*x[1]**o+(0.862030507166)*x[1]+(-0.612206533195)*x[2]**o+(0.494078406766)*x[2]
-        arg[3,4,2,1]=(0.270278273932)*x[0]**o+(-0.115833233113)*x[0]+(0.754464364285)*x[1]**o+(-0.186069521903)*x[1]+(-0.864426716229)*x[2]**o+(-0.425054438064)*x[2]
-        ref[0,0,0,0]=(0.412792261707)/(o+1.)+(0.904364083309)+(0.663998508168)*0.5**o
-        ref[0,0,0,1]=(-1.07469333717)/(o+1.)+(-0.0923352454984)+(-0.010130464476)*0.5**o
-        ref[0,0,1,0]=(0.287923726124)/(o+1.)+(-0.145507770124)+(-0.176542289385)*0.5**o
-        ref[0,0,1,1]=(-0.24656050398)/(o+1.)+(0.341982901349)+(-0.98152572229)*0.5**o
-        ref[0,0,2,0]=(1.24918965808)/(o+1.)+(0.165246366859)+(0.555897422173)*0.5**o
-        ref[0,0,2,1]=(-1.23538766622)/(o+1.)+(-0.507697956406)+(0.23127040923)*0.5**o
-        ref[0,1,0,0]=(-0.267829490776)/(o+1.)+(-0.549968075823)+(0.0202445177842)*0.5**o
-        ref[0,1,0,1]=(0.826177960569)/(o+1.)+(0.113794537096)+(0.99935098551)*0.5**o
-        ref[0,1,1,0]=(0.124131681048)/(o+1.)+(0.482277820918)+(0.151799117419)*0.5**o
-        ref[0,1,1,1]=(0.620076580442)/(o+1.)+(0.401695495934)+(-0.51422532626)*0.5**o
-        ref[0,1,2,0]=(1.75895293799)/(o+1.)+(-0.225823657945)+(0.908244888839)*0.5**o
-        ref[0,1,2,1]=(-0.334875364565)/(o+1.)+(1.30271444502)+(-0.872307766634)*0.5**o
-        ref[0,2,0,0]=(-0.42419420508)/(o+1.)+(-0.3575838585)+(0.00173619592035)*0.5**o
-        ref[0,2,0,1]=(-0.57391253095)/(o+1.)+(-0.515088003037)+(0.998184336552)*0.5**o
-        ref[0,2,1,0]=(0.114144861758)/(o+1.)+(-0.330251158386)+(-0.921234331968)*0.5**o
-        ref[0,2,1,1]=(-1.42031433961)/(o+1.)+(0.581091144051)+(0.153578015941)*0.5**o
-        ref[0,2,2,0]=(0.827236715358)/(o+1.)+(0.125325412749)+(0.29601674794)*0.5**o
-        ref[0,2,2,1]=(1.34802786361)/(o+1.)+(0.280667679493)+(0.0580007647099)*0.5**o
-        ref[0,3,0,0]=(1.28181937762)/(o+1.)+(-0.214505128496)+(-0.337999890505)*0.5**o
-        ref[0,3,0,1]=(1.65569377802)/(o+1.)+(-0.363265639443)+(-0.825813329629)*0.5**o
-        ref[0,3,1,0]=(0.560544990797)/(o+1.)+(-0.276979054204)+(0.699313512079)*0.5**o
-        ref[0,3,1,1]=(-0.879495822379)/(o+1.)+(0.560842505268)+(0.140764124286)*0.5**o
-        ref[0,3,2,0]=(-1.04751560841)/(o+1.)+(-0.238703591863)+(-0.68177752688)*0.5**o
-        ref[0,3,2,1]=(-0.414022097401)/(o+1.)+(0.509666283203)+(0.655685968811)*0.5**o
-        ref[0,4,0,0]=(1.0625549765)/(o+1.)+(-1.26969185098)+(-0.18027010068)*0.5**o
-        ref[0,4,0,1]=(-0.430389257621)/(o+1.)+(-0.728926201043)+(-0.914768182433)*0.5**o
-        ref[0,4,1,0]=(-0.585220311209)/(o+1.)+(0.344278586108)+(0.274727423835)*0.5**o
-        ref[0,4,1,1]=(-0.596140928652)/(o+1.)+(-0.857974578823)+(0.257574026756)*0.5**o
-        ref[0,4,2,0]=(-1.15566595381)/(o+1.)+(0.148922032671)+(0.703185665611)*0.5**o
-        ref[0,4,2,1]=(0.255095282229)/(o+1.)+(-0.480012460544)+(-0.153792811673)*0.5**o
-        ref[1,0,0,0]=(0.524122113192)/(o+1.)+(-0.434579759316)+(0.298044833507)*0.5**o
-        ref[1,0,0,1]=(-0.220122924131)/(o+1.)+(0.466218310719)+(-0.575485929806)*0.5**o
-        ref[1,0,1,0]=(0.290760959656)/(o+1.)+(-0.0552768720487)+(0.998358005707)*0.5**o
-        ref[1,0,1,1]=(-1.69984876204)/(o+1.)+(0.325064655551)+(0.783593367143)*0.5**o
-        ref[1,0,2,0]=(-0.999302906363)/(o+1.)+(0.639576565202)+(-0.42345692756)*0.5**o
-        ref[1,0,2,1]=(-0.271313965844)/(o+1.)+(-0.0328780841139)+(-0.790917746681)*0.5**o
-        ref[1,1,0,0]=(-1.17401606398)/(o+1.)+(0.654288857484)+(0.944343622558)*0.5**o
-        ref[1,1,0,1]=(0.623620452946)/(o+1.)+(-0.0991803677964)+(-0.246711023019)*0.5**o
-        ref[1,1,1,0]=(-0.218171642866)/(o+1.)+(-0.404913755908)+(-0.530782063061)*0.5**o
-        ref[1,1,1,1]=(1.23525595763)/(o+1.)+(0.349524193353)+(-0.710844761085)*0.5**o
-        ref[1,1,2,0]=(-0.42993438925)/(o+1.)+(0.399995211041)+(0.574657505707)*0.5**o
-        ref[1,1,2,1]=(-0.217230696736)/(o+1.)+(0.635787738562)+(-0.365373199615)*0.5**o
-        ref[1,2,0,0]=(-0.102563204807)/(o+1.)+(-0.188445289686)+(0.544776615353)*0.5**o
-        ref[1,2,0,1]=(0.298732134665)/(o+1.)+(-0.416846709104)+(0.11684721915)*0.5**o
-        ref[1,2,1,0]=(-0.234419306371)/(o+1.)+(0.383855155251)+(0.561736948232)*0.5**o
-        ref[1,2,1,1]=(0.539973971687)/(o+1.)+(0.0241566615339)+(0.578630452142)*0.5**o
-        ref[1,2,2,0]=(0.346023814217)/(o+1.)+(-0.515461022254)+(-0.0269203575755)*0.5**o
-        ref[1,2,2,1]=(-1.12923994073)/(o+1.)+(0.687820128862)+(-0.534642633404)*0.5**o
-        ref[1,3,0,0]=(-1.35206603301)/(o+1.)+(-0.195350398606)+(0.892302802156)*0.5**o
-        ref[1,3,0,1]=(0.457546541694)/(o+1.)+(0.584952905039)+(0.883702447985)*0.5**o
-        ref[1,3,1,0]=(-0.229382345029)/(o+1.)+(-0.51570070583)+(0.492527250981)*0.5**o
-        ref[1,3,1,1]=(0.163467163568)/(o+1.)+(-0.511309270369)+(0.372499842901)*0.5**o
-        ref[1,3,2,0]=(-1.10954940366)/(o+1.)+(0.613097649163)+(0.533098362924)*0.5**o
-        ref[1,3,2,1]=(0.0423370323263)/(o+1.)+(-0.655974226943)+(-0.909038123273)*0.5**o
-        ref[1,4,0,0]=(-0.149369878527)/(o+1.)+(0.594641654424)+(-0.974474210185)*0.5**o
-        ref[1,4,0,1]=(0.995137009073)/(o+1.)+(-0.0464708598635)+(0.964745405431)*0.5**o
-        ref[1,4,1,0]=(0.545158516903)/(o+1.)+(-0.562624149397)+(-0.714725894011)*0.5**o
-        ref[1,4,1,1]=(-1.20779451465)/(o+1.)+(-0.189148851615)+(-0.809072545597)*0.5**o
-        ref[1,4,2,0]=(-1.55971061601)/(o+1.)+(0.693489320143)+(-0.21281876112)*0.5**o
-        ref[1,4,2,1]=(0.226662056752)/(o+1.)+(-0.454678810051)+(-0.247930702516)*0.5**o
-        ref[2,0,0,0]=(-0.242758325417)/(o+1.)+(-0.527650883321)+(0.616352869937)*0.5**o
-        ref[2,0,0,1]=(0.807761382166)/(o+1.)+(1.02431485248)+(-0.85704374519)*0.5**o
-        ref[2,0,1,0]=(0.543068844645)/(o+1.)+(0.0690269849966)+(0.326870102902)*0.5**o
-        ref[2,0,1,1]=(0.502168875857)/(o+1.)+(-0.0584590052478)+(-0.699939842176)*0.5**o
-        ref[2,0,2,0]=(0.181622609504)/(o+1.)+(-0.57477595904)+(-0.985996827188)*0.5**o
-        ref[2,0,2,1]=(-1.01828660056)/(o+1.)+(0.255680773601)+(-0.195357773436)*0.5**o
-        ref[2,1,0,0]=(-0.961895417879)/(o+1.)+(-0.848679114358)+(0.601652939329)*0.5**o
-        ref[2,1,0,1]=(0.177781123824)/(o+1.)+(-0.945003972397)+(0.534038022604)*0.5**o
-        ref[2,1,1,0]=(-0.20513407563)/(o+1.)+(-0.126335927989)+(-0.361196978257)*0.5**o
-        ref[2,1,1,1]=(0.712128730879)/(o+1.)+(-0.0623370236322)+(0.00930987921229)*0.5**o
-        ref[2,1,2,0]=(0.692430706812)/(o+1.)+(0.417664138602)+(-0.181479246679)*0.5**o
-        ref[2,1,2,1]=(0.650980026197)/(o+1.)+(-0.708193455952)+(-0.99665050175)*0.5**o
-        ref[2,2,0,0]=(1.22766505061)/(o+1.)+(0.717584511586)+(0.870069083779)*0.5**o
-        ref[2,2,0,1]=(0.633038618622)/(o+1.)+(-0.222859101796)+(-0.841259995642)*0.5**o
-        ref[2,2,1,0]=(0.167120356805)/(o+1.)+(-1.00491115888)+(-0.561184923307)*0.5**o
-        ref[2,2,1,1]=(0.164505345911)/(o+1.)+(1.15307619901)+(0.92243000401)*0.5**o
-        ref[2,2,2,0]=(-1.16271376641)/(o+1.)+(-0.336355614369)+(0.331131296272)*0.5**o
-        ref[2,2,2,1]=(0.672282083422)/(o+1.)+(0.018864653069)+(-0.47892171854)*0.5**o
-        ref[2,3,0,0]=(1.52821633972)/(o+1.)+(-0.864758323678)+(0.0219406022052)*0.5**o
-        ref[2,3,0,1]=(-0.326213615062)/(o+1.)+(0.152909191896)+(-0.114799511617)*0.5**o
-        ref[2,3,1,0]=(-0.724364553267)/(o+1.)+(-0.439822878578)+(-0.103518223905)*0.5**o
-        ref[2,3,1,1]=(-1.107549965)/(o+1.)+(-0.705530843209)+(-0.958142224242)*0.5**o
-        ref[2,3,2,0]=(-0.825620325844)/(o+1.)+(-0.169496279085)+(0.730554594734)*0.5**o
-        ref[2,3,2,1]=(-0.0678334241233)/(o+1.)+(0.0396617729923)+(-0.930974589897)*0.5**o
-        ref[2,4,0,0]=(0.809143207998)/(o+1.)+(-0.709013942786)+(-0.246046780287)*0.5**o
-        ref[2,4,0,1]=(0.0938678290563)/(o+1.)+(-0.0282613348041)+(-0.612751147889)*0.5**o
-        ref[2,4,1,0]=(-0.0572988459938)/(o+1.)+(-0.496307592572)+(-0.26092972064)*0.5**o
-        ref[2,4,1,1]=(1.38060158884)/(o+1.)+(-0.643768055252)+(0.325840618456)*0.5**o
-        ref[2,4,2,0]=(-1.03935942333)/(o+1.)+(0.130235179204)+(0.655590135983)*0.5**o
-        ref[2,4,2,1]=(-0.41630624669)/(o+1.)+(0.259401996992)+(0.570712162768)*0.5**o
-        ref[3,0,0,0]=(-0.357343519171)/(o+1.)+(-0.518658431855)+(-0.486023722572)*0.5**o
-        ref[3,0,0,1]=(-0.927017258737)/(o+1.)+(0.566657824853)+(-0.705291625776)*0.5**o
-        ref[3,0,1,0]=(-0.331128184244)/(o+1.)+(0.535203433907)+(-0.838974120992)*0.5**o
-        ref[3,0,1,1]=(-0.735721663177)/(o+1.)+(-0.293634410339)+(0.140027541071)*0.5**o
-        ref[3,0,2,0]=(-0.178945077431)/(o+1.)+(-0.300862767422)+(-0.39083471939)*0.5**o
-        ref[3,0,2,1]=(1.18223012428)/(o+1.)+(-0.121465976141)+(0.0734743009776)*0.5**o
-        ref[3,1,0,0]=(1.46408415003)/(o+1.)+(-0.0664881764563)+(-0.414502599055)*0.5**o
-        ref[3,1,0,1]=(1.3349422575)/(o+1.)+(0.283498682724)+(0.886115095396)*0.5**o
-        ref[3,1,1,0]=(0.816511111677)/(o+1.)+(0.175825822544)+(0.312577129879)*0.5**o
-        ref[3,1,1,1]=(-0.105059408543)/(o+1.)+(-0.782531675802)+(0.784369258288)*0.5**o
-        ref[3,1,2,0]=(-0.744294216228)/(o+1.)+(-0.301922969419)+(-0.337332295082)*0.5**o
-        ref[3,1,2,1]=(-0.669631653258)/(o+1.)+(0.0177835713351)+(0.791575892417)*0.5**o
-        ref[3,2,0,0]=(0.274579265949)/(o+1.)+(0.148529098776)+(-0.0909007497318)*0.5**o
-        ref[3,2,0,1]=(0.956130125711)/(o+1.)+(0.482854719491)+(-0.764137934896)*0.5**o
-        ref[3,2,1,0]=(-0.266431989669)/(o+1.)+(0.313297832739)+(0.49435832562)*0.5**o
-        ref[3,2,1,1]=(-0.726703087024)/(o+1.)+(0.542295175061)+(-0.460752644946)*0.5**o
-        ref[3,2,2,0]=(0.87651829094)/(o+1.)+(-0.185020317268)+(0.0946687985697)*0.5**o
-        ref[3,2,2,1]=(-0.113135321417)/(o+1.)+(-0.221883684949)+(0.177521713734)*0.5**o
-        ref[3,3,0,0]=(0.155561630388)/(o+1.)+(0.495429901163)+(0.592201472175)*0.5**o
-        ref[3,3,0,1]=(-0.44887181194)/(o+1.)+(-0.20854804469)+(0.572972211447)*0.5**o
-        ref[3,3,1,0]=(1.11423248654)/(o+1.)+(-0.212131906831)+(0.775163727164)*0.5**o
-        ref[3,3,1,1]=(0.723748205425)/(o+1.)+(0.785798099184)+(-0.244586606882)*0.5**o
-        ref[3,3,2,0]=(0.389980691746)/(o+1.)+(-0.0994690359155)+(-0.676040282048)*0.5**o
-        ref[3,3,2,1]=(-0.0505489049572)/(o+1.)+(0.57416458839)+(-0.136437682299)*0.5**o
-        ref[3,4,0,0]=(0.14698064297)/(o+1.)+(0.286169633527)+(0.28632587806)*0.5**o
-        ref[3,4,0,1]=(-0.316556260565)/(o+1.)+(0.736868623097)+(0.326448964148)*0.5**o
-        ref[3,4,1,0]=(-1.11727322574)/(o+1.)+(0.341015410564)+(0.760474271531)*0.5**o
-        ref[3,4,1,1]=(-0.0908271211344)/(o+1.)+(-0.150268763334)+(-0.21508452109)*0.5**o
-        ref[3,4,2,0]=(-1.40693165856)/(o+1.)+(0.796839755046)+(-0.195181632154)*0.5**o
-        ref[3,4,2,1]=(-0.109962351944)/(o+1.)+(-0.36347859654)+(0.270278273932)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.0433006726989)*x[0]**o+(0.819109331838)*x[0]+(0.150292245587)*x[1]**o+(0.949397165008)*x[1]
-        ref=(0.150292245587)/(o+1.)+(0.884253248423)+(0.0433006726989)*0.5**o
-      else:
-        arg=(-0.765858486678)*x[0]**o+(-0.829061249978)*x[0]+(-0.0255273602735)*x[1]**o+(-0.93097352763)*x[1]+(-0.775974817954)*x[2]**o+(0.0414580763278)*x[2]
-        ref=(-0.801502178228)/(o+1.)+(-0.85928835064)+(-0.765858486678)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.float_)
-      if dim==2:
-        arg[0]=(0.708418284738)*x[0]**o+(-0.265416249865)*x[0]+(0.0412873279676)*x[1]**o+(0.18827690539)*x[1]
-        arg[1]=(-0.0639578348425)*x[0]**o+(-0.435408788697)*x[0]+(0.429134354603)*x[1]**o+(0.0391558318157)*x[1]
-        ref[0]=(0.0412873279676)/(o+1.)+(-0.0385696722374)+(0.708418284738)*0.5**o
-        ref[1]=(0.429134354603)/(o+1.)+(-0.198126478441)+(-0.0639578348425)*0.5**o
-      else:
-        arg[0]=(-0.516066856372)*x[0]**o+(-0.509677909948)*x[0]+(0.189594948337)*x[1]**o+(0.743432553688)*x[1]+(0.687864109046)*x[2]**o+(0.257280277379)*x[2]
-        arg[1]=(0.948762785699)*x[0]**o+(0.372861763607)*x[0]+(-0.166460043702)*x[1]**o+(0.0474018901531)*x[1]+(-0.485380626595)*x[2]**o+(-0.341701937267)*x[2]
-        ref[0]=(0.877459057383)/(o+1.)+(0.245517460559)+(-0.516066856372)*0.5**o
-        ref[1]=(-0.651840670298)/(o+1.)+(0.0392808582465)+(0.948762785699)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.0540280486222)*x[0]**o+(-0.936629447756)*x[0]+(0.530867101627)*x[1]**o+(-0.404522355122)*x[1]
-        arg[0,1]=(0.585051034599)*x[0]**o+(-0.899683342239)*x[0]+(0.61865830472)*x[1]**o+(0.491768251743)*x[1]
-        arg[0,2]=(0.924131379905)*x[0]**o+(-0.394367734246)*x[0]+(0.432122525065)*x[1]**o+(0.79923634141)*x[1]
-        arg[0,3]=(-0.41435196904)*x[0]**o+(-0.22039395628)*x[0]+(-0.866551833459)*x[1]**o+(-0.0966534238435)*x[1]
-        arg[0,4]=(0.855785701017)*x[0]**o+(0.0879754354535)*x[0]+(-0.0727782016239)*x[1]**o+(0.746878225435)*x[1]
-        arg[1,0]=(-0.868450306659)*x[0]**o+(-0.00845792225901)*x[0]+(0.227399876353)*x[1]**o+(-0.522196483799)*x[1]
-        arg[1,1]=(0.53076931297)*x[0]**o+(0.165744140226)*x[0]+(0.14586398181)*x[1]**o+(-0.694169551043)*x[1]
-        arg[1,2]=(-0.936146144862)*x[0]**o+(-0.198367580291)*x[0]+(0.848822682163)*x[1]**o+(0.360521711263)*x[1]
-        arg[1,3]=(-0.395889451325)*x[0]**o+(0.510713345487)*x[0]+(-0.62440033386)*x[1]**o+(0.29695714683)*x[1]
-        arg[1,4]=(0.847685553395)*x[0]**o+(-0.291266469606)*x[0]+(-0.517114839541)*x[1]**o+(-0.279948585383)*x[1]
-        arg[2,0]=(-0.622481093435)*x[0]**o+(0.0911922519622)*x[0]+(0.216648336495)*x[1]**o+(0.663562516802)*x[1]
-        arg[2,1]=(0.567833843918)*x[0]**o+(0.18116887359)*x[0]+(-0.0433012798352)*x[1]**o+(0.998332142285)*x[1]
-        arg[2,2]=(-0.81729786652)*x[0]**o+(-0.634680104287)*x[0]+(0.991513806139)*x[1]**o+(-0.0721700196003)*x[1]
-        arg[2,3]=(0.121181286827)*x[0]**o+(-0.677803464822)*x[0]+(0.870139639102)*x[1]**o+(-0.134662002755)*x[1]
-        arg[2,4]=(-0.167376807346)*x[0]**o+(-0.500556007898)*x[0]+(-0.839256017197)*x[1]**o+(-0.82147890878)*x[1]
-        arg[3,0]=(0.576521064132)*x[0]**o+(-0.510276372588)*x[0]+(0.92888227487)*x[1]**o+(-0.88293512036)*x[1]
-        arg[3,1]=(-0.159048471862)*x[0]**o+(-0.0479500210678)*x[0]+(-0.0216438779517)*x[1]**o+(-0.108252189548)*x[1]
-        arg[3,2]=(-0.483779576334)*x[0]**o+(-0.871829147209)*x[0]+(-0.22556218283)*x[1]**o+(0.451007116911)*x[1]
-        arg[3,3]=(-0.358888369902)*x[0]**o+(0.436554685191)*x[0]+(-0.0359187908139)*x[1]**o+(-0.0148930474244)*x[1]
-        arg[3,4]=(-0.995411478882)*x[0]**o+(-0.457206328785)*x[0]+(-0.833823947273)*x[1]**o+(-0.0517068976093)*x[1]
-        ref[0,0]=(0.530867101627)/(o+1.)+(-0.670575901439)+(-0.0540280486222)*0.5**o
-        ref[0,1]=(0.61865830472)/(o+1.)+(-0.203957545248)+(0.585051034599)*0.5**o
-        ref[0,2]=(0.432122525065)/(o+1.)+(0.202434303582)+(0.924131379905)*0.5**o
-        ref[0,3]=(-0.866551833459)/(o+1.)+(-0.158523690062)+(-0.41435196904)*0.5**o
-        ref[0,4]=(-0.0727782016239)/(o+1.)+(0.417426830444)+(0.855785701017)*0.5**o
-        ref[1,0]=(0.227399876353)/(o+1.)+(-0.265327203029)+(-0.868450306659)*0.5**o
-        ref[1,1]=(0.14586398181)/(o+1.)+(-0.264212705408)+(0.53076931297)*0.5**o
-        ref[1,2]=(0.848822682163)/(o+1.)+(0.0810770654864)+(-0.936146144862)*0.5**o
-        ref[1,3]=(-0.62440033386)/(o+1.)+(0.403835246159)+(-0.395889451325)*0.5**o
-        ref[1,4]=(-0.517114839541)/(o+1.)+(-0.285607527495)+(0.847685553395)*0.5**o
-        ref[2,0]=(0.216648336495)/(o+1.)+(0.377377384382)+(-0.622481093435)*0.5**o
-        ref[2,1]=(-0.0433012798352)/(o+1.)+(0.589750507938)+(0.567833843918)*0.5**o
-        ref[2,2]=(0.991513806139)/(o+1.)+(-0.353425061944)+(-0.81729786652)*0.5**o
-        ref[2,3]=(0.870139639102)/(o+1.)+(-0.406232733789)+(0.121181286827)*0.5**o
-        ref[2,4]=(-0.839256017197)/(o+1.)+(-0.661017458339)+(-0.167376807346)*0.5**o
-        ref[3,0]=(0.92888227487)/(o+1.)+(-0.696605746474)+(0.576521064132)*0.5**o
-        ref[3,1]=(-0.0216438779517)/(o+1.)+(-0.078101105308)+(-0.159048471862)*0.5**o
-        ref[3,2]=(-0.22556218283)/(o+1.)+(-0.210411015149)+(-0.483779576334)*0.5**o
-        ref[3,3]=(-0.0359187908139)/(o+1.)+(0.210830818883)+(-0.358888369902)*0.5**o
-        ref[3,4]=(-0.833823947273)/(o+1.)+(-0.254456613197)+(-0.995411478882)*0.5**o
-      else:
-        arg[0,0]=(-0.937858877179)*x[0]**o+(-0.41590845461)*x[0]+(0.317385444442)*x[1]**o+(-0.166284606371)*x[1]+(-0.846106994172)*x[2]**o+(0.227876218054)*x[2]
-        arg[0,1]=(0.497785867084)*x[0]**o+(0.883557362705)*x[0]+(-0.846602726567)*x[1]**o+(-0.859091910548)*x[1]+(-0.295742503292)*x[2]**o+(-0.853931233266)*x[2]
-        arg[0,2]=(0.744501879094)*x[0]**o+(-0.0181115125382)*x[0]+(-0.856099357899)*x[1]**o+(0.767449074734)*x[1]+(-0.858552187616)*x[2]**o+(-0.580142057156)*x[2]
-        arg[0,3]=(0.210031467359)*x[0]**o+(-0.994426053833)*x[0]+(0.648522478175)*x[1]**o+(0.0355805603417)*x[1]+(-0.274347447112)*x[2]**o+(-0.280165537012)*x[2]
-        arg[0,4]=(-0.323650660168)*x[0]**o+(-0.279592941595)*x[0]+(-0.478811425713)*x[1]**o+(0.19753271141)*x[1]+(0.476202875551)*x[2]**o+(0.657358100659)*x[2]
-        arg[1,0]=(0.890659868437)*x[0]**o+(0.100235405989)*x[0]+(0.325177871418)*x[1]**o+(0.675379114656)*x[1]+(0.458473828724)*x[2]**o+(-0.449822467434)*x[2]
-        arg[1,1]=(-0.467895039242)*x[0]**o+(-0.551300000422)*x[0]+(0.976111922801)*x[1]**o+(0.809389941274)*x[1]+(-0.693066235685)*x[2]**o+(0.595719115505)*x[2]
-        arg[1,2]=(-0.727304617172)*x[0]**o+(-0.270682330445)*x[0]+(-0.32926621635)*x[1]**o+(0.0389068111165)*x[1]+(0.300096425532)*x[2]**o+(-0.964910767632)*x[2]
-        arg[1,3]=(0.195012106644)*x[0]**o+(0.18137839607)*x[0]+(-0.823129279257)*x[1]**o+(-0.0440106889304)*x[1]+(-0.298898659898)*x[2]**o+(0.801623925974)*x[2]
-        arg[1,4]=(0.590200326369)*x[0]**o+(-0.800085209049)*x[0]+(-0.323836133834)*x[1]**o+(-0.953413527643)*x[1]+(0.0257128844735)*x[2]**o+(0.652469516082)*x[2]
-        arg[2,0]=(-0.467537281458)*x[0]**o+(-0.05673369912)*x[0]+(-0.813542619659)*x[1]**o+(-0.778596374878)*x[1]+(0.752073310476)*x[2]**o+(0.187824163254)*x[2]
-        arg[2,1]=(-0.75708112983)*x[0]**o+(0.866111788737)*x[0]+(0.715424327432)*x[1]**o+(-0.297967739435)*x[1]+(0.420241611178)*x[2]**o+(-0.616867390634)*x[2]
-        arg[2,2]=(0.00628628803839)*x[0]**o+(0.700962301988)*x[0]+(0.712979263919)*x[1]**o+(-0.414401132518)*x[1]+(-0.975498928756)*x[2]**o+(0.858116391039)*x[2]
-        arg[2,3]=(0.948164399923)*x[0]**o+(-0.88227825142)*x[0]+(0.30703295864)*x[1]**o+(0.510607674984)*x[1]+(0.362361719392)*x[2]**o+(-0.208696380629)*x[2]
-        arg[2,4]=(0.661545494115)*x[0]**o+(-0.122960355184)*x[0]+(-0.801367604574)*x[1]**o+(0.395708459987)*x[1]+(0.0197225340457)*x[2]**o+(-0.377005073637)*x[2]
-        arg[3,0]=(0.733597350529)*x[0]**o+(0.339318978843)*x[0]+(0.317608635437)*x[1]**o+(0.147746051469)*x[1]+(-0.33413935488)*x[2]**o+(-0.793337674933)*x[2]
-        arg[3,1]=(0.0918904281646)*x[0]**o+(-0.530786152204)*x[0]+(-0.587542750401)*x[1]**o+(-0.810331029621)*x[1]+(-0.40221065987)*x[2]**o+(-0.250472092093)*x[2]
-        arg[3,2]=(0.966442952042)*x[0]**o+(-0.756649866552)*x[0]+(-0.36466223222)*x[1]**o+(-0.48639005055)*x[1]+(-0.831374462742)*x[2]**o+(0.503451143644)*x[2]
-        arg[3,3]=(-0.322275644664)*x[0]**o+(-0.254067149982)*x[0]+(-0.440264794128)*x[1]**o+(0.226546045529)*x[1]+(-0.761870916789)*x[2]**o+(0.70024066379)*x[2]
-        arg[3,4]=(0.595459342613)*x[0]**o+(-0.439436200258)*x[0]+(0.0932538180176)*x[1]**o+(-0.975450806707)*x[1]+(0.0461423323623)*x[2]**o+(0.0294352472154)*x[2]
-        ref[0,0]=(-0.52872154973)/(o+1.)+(-0.177158421464)+(-0.937858877179)*0.5**o
-        ref[0,1]=(-1.14234522986)/(o+1.)+(-0.414732890554)+(0.497785867084)*0.5**o
-        ref[0,2]=(-1.71465154551)/(o+1.)+(0.0845977525197)+(0.744501879094)*0.5**o
-        ref[0,3]=(0.374175031062)/(o+1.)+(-0.619505515252)+(0.210031467359)*0.5**o
-        ref[0,4]=(-0.00260855016132)/(o+1.)+(0.287648935237)+(-0.323650660168)*0.5**o
-        ref[1,0]=(0.783651700142)/(o+1.)+(0.162896026605)+(0.890659868437)*0.5**o
-        ref[1,1]=(0.283045687117)/(o+1.)+(0.426904528178)+(-0.467895039242)*0.5**o
-        ref[1,2]=(-0.0291697908188)/(o+1.)+(-0.59834314348)+(-0.727304617172)*0.5**o
-        ref[1,3]=(-1.12202793916)/(o+1.)+(0.469495816557)+(0.195012106644)*0.5**o
-        ref[1,4]=(-0.29812324936)/(o+1.)+(-0.550514610305)+(0.590200326369)*0.5**o
-        ref[2,0]=(-0.0614693091826)/(o+1.)+(-0.323752955372)+(-0.467537281458)*0.5**o
-        ref[2,1]=(1.13566593861)/(o+1.)+(-0.024361670666)+(-0.75708112983)*0.5**o
-        ref[2,2]=(-0.262519664837)/(o+1.)+(0.572338780255)+(0.00628628803839)*0.5**o
-        ref[2,3]=(0.669394678032)/(o+1.)+(-0.290183478532)+(0.948164399923)*0.5**o
-        ref[2,4]=(-0.781645070528)/(o+1.)+(-0.0521284844165)+(0.661545494115)*0.5**o
-        ref[3,0]=(-0.0165307194439)/(o+1.)+(-0.15313632231)+(0.733597350529)*0.5**o
-        ref[3,1]=(-0.989753410271)/(o+1.)+(-0.795794636959)+(0.0918904281646)*0.5**o
-        ref[3,2]=(-1.19603669496)/(o+1.)+(-0.369794386729)+(0.966442952042)*0.5**o
-        ref[3,3]=(-1.20213571092)/(o+1.)+(0.336359779668)+(-0.322275644664)*0.5**o
-        ref[3,4]=(0.13939615038)/(o+1.)+(-0.692725879875)+(0.595459342613)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.12237588236)*x[0]**o+(-0.671341785528)*x[0]+(0.998910161099)*x[1]**o+(-0.552290246966)*x[1]
-        arg[0,0,1]=(-0.90821257221)*x[0]**o+(-0.413391927764)*x[0]+(-0.428904099491)*x[1]**o+(-0.226766222189)*x[1]
-        arg[0,1,0]=(-0.333819313127)*x[0]**o+(-0.458569899029)*x[0]+(-0.83776177332)*x[1]**o+(0.22951184631)*x[1]
-        arg[0,1,1]=(-0.0571879315489)*x[0]**o+(-0.38056227895)*x[0]+(0.0784628125977)*x[1]**o+(-0.659353613638)*x[1]
-        arg[1,0,0]=(0.645871468353)*x[0]**o+(-0.986005542006)*x[0]+(0.395704509276)*x[1]**o+(0.980666918726)*x[1]
-        arg[1,0,1]=(0.337293036597)*x[0]**o+(-0.520809490378)*x[0]+(0.543657498632)*x[1]**o+(0.632777244118)*x[1]
-        arg[1,1,0]=(-0.432349538121)*x[0]**o+(-0.579685247099)*x[0]+(0.331943072726)*x[1]**o+(0.25042188644)*x[1]
-        arg[1,1,1]=(0.329861800715)*x[0]**o+(-0.48725090895)*x[0]+(-0.149357998414)*x[1]**o+(-0.580650134153)*x[1]
-        arg[2,0,0]=(-0.75424658357)*x[0]**o+(-0.696352517414)*x[0]+(-0.00272313166917)*x[1]**o+(-0.488581343546)*x[1]
-        arg[2,0,1]=(-0.136489901339)*x[0]**o+(-0.752587775699)*x[0]+(0.986413392791)*x[1]**o+(0.759344728162)*x[1]
-        arg[2,1,0]=(-0.0832674877963)*x[0]**o+(0.765419402778)*x[0]+(0.958533611564)*x[1]**o+(-0.315461136294)*x[1]
-        arg[2,1,1]=(0.362764663642)*x[0]**o+(-0.351519282456)*x[0]+(-0.115554433923)*x[1]**o+(-0.789365036398)*x[1]
-        arg[3,0,0]=(0.0977752933224)*x[0]**o+(-0.838881001576)*x[0]+(0.275578737811)*x[1]**o+(-0.971208155806)*x[1]
-        arg[3,0,1]=(0.0588243034654)*x[0]**o+(-0.141302234145)*x[0]+(-0.460044396206)*x[1]**o+(-0.776793718354)*x[1]
-        arg[3,1,0]=(0.786922930047)*x[0]**o+(-0.187797924361)*x[0]+(0.971516347812)*x[1]**o+(-0.250547377602)*x[1]
-        arg[3,1,1]=(-0.69240453335)*x[0]**o+(0.439425578473)*x[0]+(0.00864940781276)*x[1]**o+(-0.458898387231)*x[1]
-        arg[4,0,0]=(0.0700104829681)*x[0]**o+(0.905031121846)*x[0]+(0.37676750477)*x[1]**o+(0.411190149331)*x[1]
-        arg[4,0,1]=(-0.615737714754)*x[0]**o+(0.1945204765)*x[0]+(0.0889014902938)*x[1]**o+(0.650020022597)*x[1]
-        arg[4,1,0]=(-0.883448519911)*x[0]**o+(0.00124188371434)*x[0]+(-0.501662684156)*x[1]**o+(0.290235036398)*x[1]
-        arg[4,1,1]=(-0.723885968554)*x[0]**o+(-0.0112308623755)*x[0]+(0.679499427805)*x[1]**o+(-0.00261690404287)*x[1]
-        arg[5,0,0]=(0.0834731365594)*x[0]**o+(-0.873857991293)*x[0]+(0.831158842487)*x[1]**o+(-0.585808323324)*x[1]
-        arg[5,0,1]=(0.250830078938)*x[0]**o+(0.310347394372)*x[0]+(-0.412138455827)*x[1]**o+(0.974823718029)*x[1]
-        arg[5,1,0]=(-0.865155065381)*x[0]**o+(0.72190541012)*x[0]+(0.72020941875)*x[1]**o+(-0.604997858133)*x[1]
-        arg[5,1,1]=(0.57252234131)*x[0]**o+(-0.366230226771)*x[0]+(0.115400105646)*x[1]**o+(0.0485229323141)*x[1]
-        ref[0,0,0]=(0.998910161099)/(o+1.)+(-0.611816016247)+(-0.12237588236)*0.5**o
-        ref[0,0,1]=(-0.428904099491)/(o+1.)+(-0.320079074977)+(-0.90821257221)*0.5**o
-        ref[0,1,0]=(-0.83776177332)/(o+1.)+(-0.11452902636)+(-0.333819313127)*0.5**o
-        ref[0,1,1]=(0.0784628125977)/(o+1.)+(-0.519957946294)+(-0.0571879315489)*0.5**o
-        ref[1,0,0]=(0.395704509276)/(o+1.)+(-0.00266931163989)+(0.645871468353)*0.5**o
-        ref[1,0,1]=(0.543657498632)/(o+1.)+(0.0559838768697)+(0.337293036597)*0.5**o
-        ref[1,1,0]=(0.331943072726)/(o+1.)+(-0.16463168033)+(-0.432349538121)*0.5**o
-        ref[1,1,1]=(-0.149357998414)/(o+1.)+(-0.533950521552)+(0.329861800715)*0.5**o
-        ref[2,0,0]=(-0.00272313166917)/(o+1.)+(-0.59246693048)+(-0.75424658357)*0.5**o
-        ref[2,0,1]=(0.986413392791)/(o+1.)+(0.00337847623164)+(-0.136489901339)*0.5**o
-        ref[2,1,0]=(0.958533611564)/(o+1.)+(0.224979133242)+(-0.0832674877963)*0.5**o
-        ref[2,1,1]=(-0.115554433923)/(o+1.)+(-0.570442159427)+(0.362764663642)*0.5**o
-        ref[3,0,0]=(0.275578737811)/(o+1.)+(-0.905044578691)+(0.0977752933224)*0.5**o
-        ref[3,0,1]=(-0.460044396206)/(o+1.)+(-0.45904797625)+(0.0588243034654)*0.5**o
-        ref[3,1,0]=(0.971516347812)/(o+1.)+(-0.219172650981)+(0.786922930047)*0.5**o
-        ref[3,1,1]=(0.00864940781276)/(o+1.)+(-0.00973640437899)+(-0.69240453335)*0.5**o
-        ref[4,0,0]=(0.37676750477)/(o+1.)+(0.658110635589)+(0.0700104829681)*0.5**o
-        ref[4,0,1]=(0.0889014902938)/(o+1.)+(0.422270249549)+(-0.615737714754)*0.5**o
-        ref[4,1,0]=(-0.501662684156)/(o+1.)+(0.145738460056)+(-0.883448519911)*0.5**o
-        ref[4,1,1]=(0.679499427805)/(o+1.)+(-0.00692388320921)+(-0.723885968554)*0.5**o
-        ref[5,0,0]=(0.831158842487)/(o+1.)+(-0.729833157309)+(0.0834731365594)*0.5**o
-        ref[5,0,1]=(-0.412138455827)/(o+1.)+(0.642585556201)+(0.250830078938)*0.5**o
-        ref[5,1,0]=(0.72020941875)/(o+1.)+(0.0584537759935)+(-0.865155065381)*0.5**o
-        ref[5,1,1]=(0.115400105646)/(o+1.)+(-0.158853647228)+(0.57252234131)*0.5**o
-      else:
-        arg[0,0,0]=(0.962792187023)*x[0]**o+(0.799861778652)*x[0]+(-0.811367630134)*x[1]**o+(-0.553496861095)*x[1]+(-0.810089307714)*x[2]**o+(0.135449765364)*x[2]
-        arg[0,0,1]=(0.644573004654)*x[0]**o+(-0.565823623798)*x[0]+(0.337026645127)*x[1]**o+(0.413612857799)*x[1]+(0.604366347987)*x[2]**o+(0.0867373815054)*x[2]
-        arg[0,1,0]=(0.829914553754)*x[0]**o+(-0.462419132852)*x[0]+(0.889464473044)*x[1]**o+(-0.425594549042)*x[1]+(0.679251542389)*x[2]**o+(-0.501090535615)*x[2]
-        arg[0,1,1]=(0.874166303558)*x[0]**o+(0.437595762221)*x[0]+(-0.836229998654)*x[1]**o+(-0.704020633222)*x[1]+(-0.279878325513)*x[2]**o+(0.697289463565)*x[2]
-        arg[1,0,0]=(-0.963425479949)*x[0]**o+(0.399090631945)*x[0]+(-0.80371987894)*x[1]**o+(0.614102223184)*x[1]+(-0.821741166107)*x[2]**o+(-0.245209306654)*x[2]
-        arg[1,0,1]=(-0.288791346674)*x[0]**o+(0.0125896799209)*x[0]+(0.0536290891541)*x[1]**o+(-0.127968165901)*x[1]+(-0.635591402779)*x[2]**o+(-0.723850350215)*x[2]
-        arg[1,1,0]=(-0.554196270608)*x[0]**o+(-0.409293351346)*x[0]+(-0.759821124187)*x[1]**o+(-0.828913354317)*x[1]+(0.66900958614)*x[2]**o+(0.412403847239)*x[2]
-        arg[1,1,1]=(-0.862735330269)*x[0]**o+(-0.406644646366)*x[0]+(-0.375399872184)*x[1]**o+(-0.10762837777)*x[1]+(0.540886844249)*x[2]**o+(0.97487281528)*x[2]
-        arg[2,0,0]=(0.388899900771)*x[0]**o+(-0.692092360652)*x[0]+(0.794415524913)*x[1]**o+(0.369239170999)*x[1]+(0.482269641926)*x[2]**o+(0.58717167121)*x[2]
-        arg[2,0,1]=(0.324795219208)*x[0]**o+(0.508631698719)*x[0]+(0.128456415737)*x[1]**o+(0.73678163559)*x[1]+(0.0527520660005)*x[2]**o+(-0.180289299372)*x[2]
-        arg[2,1,0]=(-0.901972287405)*x[0]**o+(-0.635701120264)*x[0]+(0.298343193246)*x[1]**o+(-0.870902858159)*x[1]+(-0.979619200422)*x[2]**o+(0.708567755329)*x[2]
-        arg[2,1,1]=(0.391663724321)*x[0]**o+(0.69891810611)*x[0]+(0.717069638885)*x[1]**o+(0.493487853359)*x[1]+(0.270536570073)*x[2]**o+(0.679115502666)*x[2]
-        arg[3,0,0]=(0.830590943609)*x[0]**o+(-0.000320739222143)*x[0]+(-0.659146599349)*x[1]**o+(-0.858428982679)*x[1]+(-0.158070494634)*x[2]**o+(-0.364394913197)*x[2]
-        arg[3,0,1]=(0.903615175916)*x[0]**o+(0.186562406505)*x[0]+(0.463860110418)*x[1]**o+(0.0382550628307)*x[1]+(0.835148180357)*x[2]**o+(-0.117637969912)*x[2]
-        arg[3,1,0]=(-0.901874408714)*x[0]**o+(0.00493918499294)*x[0]+(0.180179475909)*x[1]**o+(-0.549428619271)*x[1]+(-0.392536708051)*x[2]**o+(0.68054148024)*x[2]
-        arg[3,1,1]=(0.807693382033)*x[0]**o+(-0.47532617097)*x[0]+(-0.52499678021)*x[1]**o+(-0.0365395713918)*x[1]+(0.654881606829)*x[2]**o+(-0.63350736651)*x[2]
-        arg[4,0,0]=(0.440830144989)*x[0]**o+(-0.454694325046)*x[0]+(0.403509667018)*x[1]**o+(0.360080283937)*x[1]+(0.164208775222)*x[2]**o+(0.203945755083)*x[2]
-        arg[4,0,1]=(-0.836804887763)*x[0]**o+(-0.910979763109)*x[0]+(-0.629411293881)*x[1]**o+(0.0546020113997)*x[1]+(0.63435754491)*x[2]**o+(-0.323224122475)*x[2]
-        arg[4,1,0]=(0.204216251019)*x[0]**o+(-0.372349067194)*x[0]+(-0.320768886225)*x[1]**o+(-0.139715856072)*x[1]+(0.62329130659)*x[2]**o+(0.626784461235)*x[2]
-        arg[4,1,1]=(0.275074685897)*x[0]**o+(0.0664691742991)*x[0]+(0.949175504221)*x[1]**o+(-0.438858093561)*x[1]+(0.330489174462)*x[2]**o+(0.361586647545)*x[2]
-        arg[5,0,0]=(0.370194889673)*x[0]**o+(-0.0549428893157)*x[0]+(0.0219932528442)*x[1]**o+(-0.699553487775)*x[1]+(0.0161212665659)*x[2]**o+(-0.268426682266)*x[2]
-        arg[5,0,1]=(-0.527801267225)*x[0]**o+(0.151774276637)*x[0]+(-0.0623666836223)*x[1]**o+(-0.953572390482)*x[1]+(0.778912307756)*x[2]**o+(-0.851760269136)*x[2]
-        arg[5,1,0]=(0.11418535486)*x[0]**o+(-0.299719975234)*x[0]+(-0.508303365848)*x[1]**o+(-0.856367302992)*x[1]+(0.311609370032)*x[2]**o+(0.4731881155)*x[2]
-        arg[5,1,1]=(0.455947680647)*x[0]**o+(0.856811965126)*x[0]+(-0.176215162097)*x[1]**o+(0.581325693162)*x[1]+(-0.306514780798)*x[2]**o+(-0.005241787834)*x[2]
-        ref[0,0,0]=(-1.62145693785)/(o+1.)+(0.19090734146)+(0.962792187023)*0.5**o
-        ref[0,0,1]=(0.941392993115)/(o+1.)+(-0.0327366922471)+(0.644573004654)*0.5**o
-        ref[0,1,0]=(1.56871601543)/(o+1.)+(-0.694552108754)+(0.829914553754)*0.5**o
-        ref[0,1,1]=(-1.11610832417)/(o+1.)+(0.215432296282)+(0.874166303558)*0.5**o
-        ref[1,0,0]=(-1.62546104505)/(o+1.)+(0.383991774237)+(-0.963425479949)*0.5**o
-        ref[1,0,1]=(-0.581962313625)/(o+1.)+(-0.419614418097)+(-0.288791346674)*0.5**o
-        ref[1,1,0]=(-0.0908115380472)/(o+1.)+(-0.412901429212)+(-0.554196270608)*0.5**o
-        ref[1,1,1]=(0.165486972066)/(o+1.)+(0.230299895572)+(-0.862735330269)*0.5**o
-        ref[2,0,0]=(1.27668516684)/(o+1.)+(0.132159240779)+(0.388899900771)*0.5**o
-        ref[2,0,1]=(0.181208481738)/(o+1.)+(0.532562017469)+(0.324795219208)*0.5**o
-        ref[2,1,0]=(-0.681276007176)/(o+1.)+(-0.399018111547)+(-0.901972287405)*0.5**o
-        ref[2,1,1]=(0.987606208958)/(o+1.)+(0.935760731067)+(0.391663724321)*0.5**o
-        ref[3,0,0]=(-0.817217093983)/(o+1.)+(-0.611572317549)+(0.830590943609)*0.5**o
-        ref[3,0,1]=(1.29900829077)/(o+1.)+(0.0535897497116)+(0.903615175916)*0.5**o
-        ref[3,1,0]=(-0.212357232141)/(o+1.)+(0.0680260229807)+(-0.901874408714)*0.5**o
-        ref[3,1,1]=(0.12988482662)/(o+1.)+(-0.572686554436)+(0.807693382033)*0.5**o
-        ref[4,0,0]=(0.567718442239)/(o+1.)+(0.0546658569873)+(0.440830144989)*0.5**o
-        ref[4,0,1]=(0.00494625102884)/(o+1.)+(-0.589800937092)+(-0.836804887763)*0.5**o
-        ref[4,1,0]=(0.302522420366)/(o+1.)+(0.0573597689848)+(0.204216251019)*0.5**o
-        ref[4,1,1]=(1.27966467868)/(o+1.)+(-0.0054011358584)+(0.275074685897)*0.5**o
-        ref[5,0,0]=(0.0381145194101)/(o+1.)+(-0.511461529678)+(0.370194889673)*0.5**o
-        ref[5,0,1]=(0.716545624134)/(o+1.)+(-0.826779191491)+(-0.527801267225)*0.5**o
-        ref[5,1,0]=(-0.196693995816)/(o+1.)+(-0.341449581363)+(0.11418535486)*0.5**o
-        ref[5,1,1]=(-0.482729942895)/(o+1.)+(0.716447935227)+(0.455947680647)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.415003066171)*x[0]**o+(-0.47441250281)*x[0]+(0.765391656872)*x[1]**o+(-0.170257448926)*x[1]
-        arg[0,0,0,1]=(-0.928539602254)*x[0]**o+(0.792240012243)*x[0]+(-0.152730990885)*x[1]**o+(-0.667500454847)*x[1]
-        arg[0,0,1,0]=(-0.937831078575)*x[0]**o+(0.963649346531)*x[0]+(0.505558859525)*x[1]**o+(-0.921354612243)*x[1]
-        arg[0,0,1,1]=(0.909415074451)*x[0]**o+(0.199360871726)*x[0]+(0.194087349442)*x[1]**o+(0.875065381425)*x[1]
-        arg[0,0,2,0]=(0.935190448625)*x[0]**o+(-0.109984767478)*x[0]+(0.518460161897)*x[1]**o+(-0.597684157349)*x[1]
-        arg[0,0,2,1]=(-0.94062714999)*x[0]**o+(-0.308960574286)*x[0]+(0.578391007321)*x[1]**o+(0.864501040998)*x[1]
-        arg[0,1,0,0]=(-0.197219678026)*x[0]**o+(-0.982899373778)*x[0]+(-0.603956105825)*x[1]**o+(-0.242717148913)*x[1]
-        arg[0,1,0,1]=(-0.590715606611)*x[0]**o+(0.461185487788)*x[0]+(-0.270612249495)*x[1]**o+(-0.644742980654)*x[1]
-        arg[0,1,1,0]=(-0.365516638755)*x[0]**o+(-0.255307471195)*x[0]+(0.0875989587033)*x[1]**o+(0.923189427818)*x[1]
-        arg[0,1,1,1]=(0.315218558548)*x[0]**o+(-0.373070897551)*x[0]+(0.625272530385)*x[1]**o+(-0.174054543645)*x[1]
-        arg[0,1,2,0]=(-0.502497884169)*x[0]**o+(-0.933785405889)*x[0]+(0.115500534905)*x[1]**o+(-0.864454092408)*x[1]
-        arg[0,1,2,1]=(0.615837581258)*x[0]**o+(0.832538142367)*x[0]+(-0.0715650027129)*x[1]**o+(-0.775173801322)*x[1]
-        arg[0,2,0,0]=(-0.898904577889)*x[0]**o+(-0.430072579352)*x[0]+(-0.532213103734)*x[1]**o+(0.970885652167)*x[1]
-        arg[0,2,0,1]=(-0.0056483770747)*x[0]**o+(-0.566550554106)*x[0]+(0.751663691868)*x[1]**o+(0.677878661708)*x[1]
-        arg[0,2,1,0]=(0.271196923039)*x[0]**o+(-0.291608730386)*x[0]+(-0.932579716748)*x[1]**o+(-0.437823650176)*x[1]
-        arg[0,2,1,1]=(-0.788206773125)*x[0]**o+(0.18675055747)*x[0]+(0.747625244884)*x[1]**o+(0.654933611758)*x[1]
-        arg[0,2,2,0]=(-0.787603701957)*x[0]**o+(-0.789784850865)*x[0]+(0.197684766271)*x[1]**o+(-0.988404958072)*x[1]
-        arg[0,2,2,1]=(0.417538087399)*x[0]**o+(0.745832250585)*x[0]+(-0.525306115268)*x[1]**o+(0.134086803871)*x[1]
-        arg[0,3,0,0]=(-0.230658480436)*x[0]**o+(-0.072983085881)*x[0]+(-0.149386157207)*x[1]**o+(-0.506870604002)*x[1]
-        arg[0,3,0,1]=(-0.815859549425)*x[0]**o+(-0.962632495033)*x[0]+(-0.542257139282)*x[1]**o+(0.93598141472)*x[1]
-        arg[0,3,1,0]=(0.0508974791413)*x[0]**o+(-0.722669867743)*x[0]+(0.714019527678)*x[1]**o+(0.710015283752)*x[1]
-        arg[0,3,1,1]=(0.119419200166)*x[0]**o+(0.365663074152)*x[0]+(0.352455072404)*x[1]**o+(-0.0788953701144)*x[1]
-        arg[0,3,2,0]=(-0.82075904747)*x[0]**o+(-0.224534176808)*x[0]+(-0.585094684368)*x[1]**o+(0.242958171035)*x[1]
-        arg[0,3,2,1]=(-0.748061395205)*x[0]**o+(0.676995891547)*x[0]+(0.686644239408)*x[1]**o+(0.260350484065)*x[1]
-        arg[0,4,0,0]=(0.128293903485)*x[0]**o+(0.226748407809)*x[0]+(0.129373873322)*x[1]**o+(0.988775321025)*x[1]
-        arg[0,4,0,1]=(0.639638672694)*x[0]**o+(-0.817791454136)*x[0]+(-0.170677596319)*x[1]**o+(0.404161643274)*x[1]
-        arg[0,4,1,0]=(0.43743097727)*x[0]**o+(-0.408230274495)*x[0]+(0.282544628333)*x[1]**o+(-0.542352697967)*x[1]
-        arg[0,4,1,1]=(-0.995599965283)*x[0]**o+(-0.0512373236039)*x[0]+(0.218383977926)*x[1]**o+(0.929355335423)*x[1]
-        arg[0,4,2,0]=(0.922609534479)*x[0]**o+(-0.166291574079)*x[0]+(-0.449331655188)*x[1]**o+(-0.0279347569009)*x[1]
-        arg[0,4,2,1]=(0.950186933361)*x[0]**o+(-0.426615341822)*x[0]+(-0.167639663907)*x[1]**o+(0.219020502174)*x[1]
-        arg[1,0,0,0]=(0.0573632292788)*x[0]**o+(0.543681035865)*x[0]+(-0.622510875807)*x[1]**o+(-0.171567467655)*x[1]
-        arg[1,0,0,1]=(0.368975600444)*x[0]**o+(-0.754217532725)*x[0]+(0.469744047929)*x[1]**o+(-0.922445394777)*x[1]
-        arg[1,0,1,0]=(-0.810194964715)*x[0]**o+(0.0861796117934)*x[0]+(0.625367069433)*x[1]**o+(-0.950906871025)*x[1]
-        arg[1,0,1,1]=(0.744923275143)*x[0]**o+(0.465744045178)*x[0]+(0.359324627118)*x[1]**o+(0.273934205663)*x[1]
-        arg[1,0,2,0]=(0.891959004941)*x[0]**o+(-0.498241249484)*x[0]+(0.318198109895)*x[1]**o+(0.0674564169104)*x[1]
-        arg[1,0,2,1]=(0.842125439023)*x[0]**o+(0.731884782944)*x[0]+(-0.674805144805)*x[1]**o+(0.431782566319)*x[1]
-        arg[1,1,0,0]=(-0.786719774805)*x[0]**o+(-0.55929144961)*x[0]+(-0.740263211102)*x[1]**o+(0.777914467998)*x[1]
-        arg[1,1,0,1]=(0.831245977993)*x[0]**o+(-0.758991188073)*x[0]+(0.714032957488)*x[1]**o+(-0.879935556766)*x[1]
-        arg[1,1,1,0]=(0.862796574462)*x[0]**o+(0.746875042565)*x[0]+(0.455949140326)*x[1]**o+(0.585491946591)*x[1]
-        arg[1,1,1,1]=(-0.500409398892)*x[0]**o+(0.292753163538)*x[0]+(-0.62474682088)*x[1]**o+(0.583368504524)*x[1]
-        arg[1,1,2,0]=(-0.402886961189)*x[0]**o+(-0.288733078165)*x[0]+(-0.770315341866)*x[1]**o+(-0.462764773299)*x[1]
-        arg[1,1,2,1]=(0.358161520677)*x[0]**o+(-0.524052652951)*x[0]+(0.654162491323)*x[1]**o+(0.902382016998)*x[1]
-        arg[1,2,0,0]=(-0.15539934232)*x[0]**o+(0.693162750731)*x[0]+(-0.0538737948754)*x[1]**o+(-0.025534990068)*x[1]
-        arg[1,2,0,1]=(0.371159212282)*x[0]**o+(-0.751292369171)*x[0]+(-0.377617770006)*x[1]**o+(0.707647483842)*x[1]
-        arg[1,2,1,0]=(0.117790556271)*x[0]**o+(0.848017682445)*x[0]+(-0.360936107893)*x[1]**o+(-0.564060873236)*x[1]
-        arg[1,2,1,1]=(-0.524828128971)*x[0]**o+(0.737876348154)*x[0]+(0.183316445987)*x[1]**o+(-0.821207746237)*x[1]
-        arg[1,2,2,0]=(0.300516177535)*x[0]**o+(-0.204187510383)*x[0]+(0.126601242737)*x[1]**o+(0.0794834423875)*x[1]
-        arg[1,2,2,1]=(-0.29046926624)*x[0]**o+(-0.310057692431)*x[0]+(-0.810227948574)*x[1]**o+(-0.464128160277)*x[1]
-        arg[1,3,0,0]=(-0.134275834453)*x[0]**o+(0.448577162559)*x[0]+(0.757723452446)*x[1]**o+(0.139202834725)*x[1]
-        arg[1,3,0,1]=(0.882915728842)*x[0]**o+(-0.0750591947315)*x[0]+(0.503482692135)*x[1]**o+(-0.176350465386)*x[1]
-        arg[1,3,1,0]=(-0.954792910945)*x[0]**o+(0.772215353622)*x[0]+(-0.861747803918)*x[1]**o+(-0.932727438775)*x[1]
-        arg[1,3,1,1]=(0.747255393187)*x[0]**o+(0.0392661297355)*x[0]+(-0.322274864209)*x[1]**o+(-0.491462177972)*x[1]
-        arg[1,3,2,0]=(0.139287057836)*x[0]**o+(0.312258185231)*x[0]+(-0.488288412308)*x[1]**o+(-0.185131700928)*x[1]
-        arg[1,3,2,1]=(-0.861625516304)*x[0]**o+(0.681454010645)*x[0]+(0.206644380777)*x[1]**o+(-0.0344138929268)*x[1]
-        arg[1,4,0,0]=(-0.714198122614)*x[0]**o+(-0.413113909739)*x[0]+(-0.971680855409)*x[1]**o+(0.602598611545)*x[1]
-        arg[1,4,0,1]=(0.293578109913)*x[0]**o+(-0.495635685351)*x[0]+(0.347408878778)*x[1]**o+(-0.923814185786)*x[1]
-        arg[1,4,1,0]=(0.843760126513)*x[0]**o+(-0.671075074679)*x[0]+(-0.284086603407)*x[1]**o+(0.437492233496)*x[1]
-        arg[1,4,1,1]=(-0.342911357374)*x[0]**o+(-0.440232224635)*x[0]+(0.537701123084)*x[1]**o+(-0.525203729082)*x[1]
-        arg[1,4,2,0]=(-0.71201360314)*x[0]**o+(-0.706332525171)*x[0]+(0.831438049852)*x[1]**o+(0.819141670055)*x[1]
-        arg[1,4,2,1]=(-0.616403541928)*x[0]**o+(0.635973739636)*x[0]+(-0.0369972206543)*x[1]**o+(-0.08595692743)*x[1]
-        arg[2,0,0,0]=(-0.959754423491)*x[0]**o+(-0.332473557912)*x[0]+(-0.464334304695)*x[1]**o+(0.597214020843)*x[1]
-        arg[2,0,0,1]=(0.231051530608)*x[0]**o+(0.368524293555)*x[0]+(0.173044245392)*x[1]**o+(0.505867390994)*x[1]
-        arg[2,0,1,0]=(0.376577055194)*x[0]**o+(-0.739990982509)*x[0]+(-0.816201949845)*x[1]**o+(-0.71233193641)*x[1]
-        arg[2,0,1,1]=(-0.4891837531)*x[0]**o+(-0.121562226208)*x[0]+(-0.876294548464)*x[1]**o+(0.377763924093)*x[1]
-        arg[2,0,2,0]=(-0.759548081841)*x[0]**o+(-0.118749434442)*x[0]+(0.602375475355)*x[1]**o+(-0.877213577079)*x[1]
-        arg[2,0,2,1]=(0.114018259802)*x[0]**o+(-0.627149204501)*x[0]+(0.813648191424)*x[1]**o+(-0.612548616323)*x[1]
-        arg[2,1,0,0]=(-0.572699800518)*x[0]**o+(0.507715829662)*x[0]+(-0.12122456959)*x[1]**o+(0.75522878228)*x[1]
-        arg[2,1,0,1]=(0.0655268452799)*x[0]**o+(0.211191572823)*x[0]+(0.539760655497)*x[1]**o+(0.657397992057)*x[1]
-        arg[2,1,1,0]=(0.358281119336)*x[0]**o+(0.119364032507)*x[0]+(-0.0242249415295)*x[1]**o+(-0.645986730609)*x[1]
-        arg[2,1,1,1]=(0.523751704889)*x[0]**o+(-0.237670103222)*x[0]+(-0.995787126907)*x[1]**o+(-0.504129088442)*x[1]
-        arg[2,1,2,0]=(-0.185380508646)*x[0]**o+(-0.218341933583)*x[0]+(0.149400154478)*x[1]**o+(0.00252616040715)*x[1]
-        arg[2,1,2,1]=(0.81086932122)*x[0]**o+(0.387271527481)*x[0]+(0.908525646396)*x[1]**o+(-0.75383394204)*x[1]
-        arg[2,2,0,0]=(-0.463416100256)*x[0]**o+(-0.891654021409)*x[0]+(-0.0495088159461)*x[1]**o+(0.398915277911)*x[1]
-        arg[2,2,0,1]=(-0.200698149193)*x[0]**o+(0.127899540753)*x[0]+(-0.895280577411)*x[1]**o+(-0.197025422242)*x[1]
-        arg[2,2,1,0]=(0.888683772867)*x[0]**o+(-0.84436563509)*x[0]+(-0.375709672588)*x[1]**o+(0.591336312818)*x[1]
-        arg[2,2,1,1]=(-0.0167949020901)*x[0]**o+(0.145017501865)*x[0]+(0.868194479789)*x[1]**o+(-0.62439676328)*x[1]
-        arg[2,2,2,0]=(0.441981698578)*x[0]**o+(-0.481156166596)*x[0]+(0.267937553127)*x[1]**o+(-0.37032246733)*x[1]
-        arg[2,2,2,1]=(0.876701424579)*x[0]**o+(0.473798212378)*x[0]+(0.697645775876)*x[1]**o+(-0.798143376838)*x[1]
-        arg[2,3,0,0]=(0.111231509217)*x[0]**o+(0.188121806171)*x[0]+(-0.0706155476337)*x[1]**o+(0.779423336221)*x[1]
-        arg[2,3,0,1]=(-0.858913402812)*x[0]**o+(0.655459361097)*x[0]+(0.326282512878)*x[1]**o+(0.863386952614)*x[1]
-        arg[2,3,1,0]=(-0.524551221953)*x[0]**o+(-0.807242415277)*x[0]+(0.575866251831)*x[1]**o+(-0.74503615846)*x[1]
-        arg[2,3,1,1]=(0.391514075129)*x[0]**o+(0.477257809825)*x[0]+(-0.488263373008)*x[1]**o+(-0.29101442481)*x[1]
-        arg[2,3,2,0]=(0.26532129161)*x[0]**o+(0.22794872765)*x[0]+(0.85094548724)*x[1]**o+(-0.369690624817)*x[1]
-        arg[2,3,2,1]=(0.2339994493)*x[0]**o+(-0.901432708956)*x[0]+(0.309349741876)*x[1]**o+(0.132010344317)*x[1]
-        arg[2,4,0,0]=(-0.713553783036)*x[0]**o+(0.791484993301)*x[0]+(0.339247480459)*x[1]**o+(0.158842307171)*x[1]
-        arg[2,4,0,1]=(-0.733490022564)*x[0]**o+(0.631284830844)*x[0]+(0.340009298488)*x[1]**o+(-0.483162310574)*x[1]
-        arg[2,4,1,0]=(0.709413437683)*x[0]**o+(0.896590124659)*x[0]+(0.680862759763)*x[1]**o+(-0.23579845663)*x[1]
-        arg[2,4,1,1]=(-0.130761551034)*x[0]**o+(0.269095282394)*x[0]+(0.687201138134)*x[1]**o+(0.905183436376)*x[1]
-        arg[2,4,2,0]=(0.256894911335)*x[0]**o+(0.706744915172)*x[0]+(0.910504833397)*x[1]**o+(-0.285088297895)*x[1]
-        arg[2,4,2,1]=(0.95137247728)*x[0]**o+(-0.924669436646)*x[0]+(-0.146356272875)*x[1]**o+(-0.673326194162)*x[1]
-        arg[3,0,0,0]=(0.663180444534)*x[0]**o+(0.894728781279)*x[0]+(0.894383747285)*x[1]**o+(0.969779862148)*x[1]
-        arg[3,0,0,1]=(0.424556283891)*x[0]**o+(-0.97849198275)*x[0]+(0.367908872519)*x[1]**o+(0.624098355956)*x[1]
-        arg[3,0,1,0]=(0.908698580251)*x[0]**o+(-0.899102004477)*x[0]+(0.509310001763)*x[1]**o+(-0.8399697646)*x[1]
-        arg[3,0,1,1]=(0.523444225814)*x[0]**o+(0.410650511976)*x[0]+(-0.986699126405)*x[1]**o+(0.081494682537)*x[1]
-        arg[3,0,2,0]=(-0.163604985314)*x[0]**o+(0.959338619715)*x[0]+(-0.843900271478)*x[1]**o+(-0.0218386544947)*x[1]
-        arg[3,0,2,1]=(-0.490804271432)*x[0]**o+(0.123332672938)*x[0]+(0.902072835174)*x[1]**o+(-0.202340709957)*x[1]
-        arg[3,1,0,0]=(-0.949731382685)*x[0]**o+(0.533695608969)*x[0]+(0.430512336347)*x[1]**o+(0.977434372776)*x[1]
-        arg[3,1,0,1]=(0.945102298088)*x[0]**o+(-0.117807763531)*x[0]+(-0.203921504027)*x[1]**o+(-0.261266079346)*x[1]
-        arg[3,1,1,0]=(0.762442770795)*x[0]**o+(-0.318456087863)*x[0]+(-0.365021977395)*x[1]**o+(0.0516932816311)*x[1]
-        arg[3,1,1,1]=(-0.829061607399)*x[0]**o+(0.854900781365)*x[0]+(-0.397139314214)*x[1]**o+(-0.549679351555)*x[1]
-        arg[3,1,2,0]=(-0.780040060687)*x[0]**o+(0.719393460042)*x[0]+(-0.435377419129)*x[1]**o+(0.655962063649)*x[1]
-        arg[3,1,2,1]=(-0.853144390228)*x[0]**o+(0.0940222442927)*x[0]+(-0.642258121264)*x[1]**o+(-0.615386923437)*x[1]
-        arg[3,2,0,0]=(0.377161814597)*x[0]**o+(0.349238572634)*x[0]+(0.361300611554)*x[1]**o+(0.554382639639)*x[1]
-        arg[3,2,0,1]=(-0.51174671413)*x[0]**o+(-0.0586248632463)*x[0]+(0.083224329707)*x[1]**o+(0.506614699443)*x[1]
-        arg[3,2,1,0]=(0.612695079311)*x[0]**o+(0.82053876378)*x[0]+(-0.132608876197)*x[1]**o+(0.701720563108)*x[1]
-        arg[3,2,1,1]=(0.0928734170244)*x[0]**o+(-0.127564289866)*x[0]+(0.68468196965)*x[1]**o+(0.0168958305852)*x[1]
-        arg[3,2,2,0]=(-0.863542893122)*x[0]**o+(0.0533007397457)*x[0]+(-0.0602194449612)*x[1]**o+(0.391122261927)*x[1]
-        arg[3,2,2,1]=(-0.0942537498633)*x[0]**o+(-0.421741120475)*x[0]+(-0.0746938765947)*x[1]**o+(0.988111802567)*x[1]
-        arg[3,3,0,0]=(-0.0588913579205)*x[0]**o+(0.439330145374)*x[0]+(-0.541714868844)*x[1]**o+(0.845344272279)*x[1]
-        arg[3,3,0,1]=(0.221784155922)*x[0]**o+(0.983539923382)*x[0]+(-0.32332836636)*x[1]**o+(-0.892579743718)*x[1]
-        arg[3,3,1,0]=(0.804097639203)*x[0]**o+(-0.342072604164)*x[0]+(0.755681096012)*x[1]**o+(0.432897246925)*x[1]
-        arg[3,3,1,1]=(0.825696602707)*x[0]**o+(0.536999112965)*x[0]+(0.745033643035)*x[1]**o+(0.156806358776)*x[1]
-        arg[3,3,2,0]=(-0.372114391352)*x[0]**o+(0.670417556114)*x[0]+(-0.569395510546)*x[1]**o+(-0.523784408534)*x[1]
-        arg[3,3,2,1]=(0.439723359721)*x[0]**o+(0.809733189174)*x[0]+(0.781753556415)*x[1]**o+(0.375991547044)*x[1]
-        arg[3,4,0,0]=(-0.429896412297)*x[0]**o+(-0.908820042346)*x[0]+(0.328787484151)*x[1]**o+(-0.610488251755)*x[1]
-        arg[3,4,0,1]=(0.803567111353)*x[0]**o+(-0.487219379817)*x[0]+(-0.541538468561)*x[1]**o+(-0.692964506777)*x[1]
-        arg[3,4,1,0]=(-0.963266835039)*x[0]**o+(0.667510333677)*x[0]+(0.308312799035)*x[1]**o+(0.686605377458)*x[1]
-        arg[3,4,1,1]=(0.651198604373)*x[0]**o+(0.306465142929)*x[0]+(-0.923691546947)*x[1]**o+(-0.376240035765)*x[1]
-        arg[3,4,2,0]=(-0.339406539705)*x[0]**o+(0.524709759622)*x[0]+(-0.0326564953763)*x[1]**o+(-0.658296780229)*x[1]
-        arg[3,4,2,1]=(0.471355209305)*x[0]**o+(-0.473756698531)*x[0]+(0.193890658409)*x[1]**o+(-0.266632530307)*x[1]
-        ref[0,0,0,0]=(0.765391656872)/(o+1.)+(-0.322334975868)+(0.415003066171)*0.5**o
-        ref[0,0,0,1]=(-0.152730990885)/(o+1.)+(0.0623697786981)+(-0.928539602254)*0.5**o
-        ref[0,0,1,0]=(0.505558859525)/(o+1.)+(0.0211473671443)+(-0.937831078575)*0.5**o
-        ref[0,0,1,1]=(0.194087349442)/(o+1.)+(0.537213126576)+(0.909415074451)*0.5**o
-        ref[0,0,2,0]=(0.518460161897)/(o+1.)+(-0.353834462413)+(0.935190448625)*0.5**o
-        ref[0,0,2,1]=(0.578391007321)/(o+1.)+(0.277770233356)+(-0.94062714999)*0.5**o
-        ref[0,1,0,0]=(-0.603956105825)/(o+1.)+(-0.612808261345)+(-0.197219678026)*0.5**o
-        ref[0,1,0,1]=(-0.270612249495)/(o+1.)+(-0.0917787464331)+(-0.590715606611)*0.5**o
-        ref[0,1,1,0]=(0.0875989587033)/(o+1.)+(0.333940978312)+(-0.365516638755)*0.5**o
-        ref[0,1,1,1]=(0.625272530385)/(o+1.)+(-0.273562720598)+(0.315218558548)*0.5**o
-        ref[0,1,2,0]=(0.115500534905)/(o+1.)+(-0.899119749149)+(-0.502497884169)*0.5**o
-        ref[0,1,2,1]=(-0.0715650027129)/(o+1.)+(0.0286821705227)+(0.615837581258)*0.5**o
-        ref[0,2,0,0]=(-0.532213103734)/(o+1.)+(0.270406536408)+(-0.898904577889)*0.5**o
-        ref[0,2,0,1]=(0.751663691868)/(o+1.)+(0.0556640538013)+(-0.0056483770747)*0.5**o
-        ref[0,2,1,0]=(-0.932579716748)/(o+1.)+(-0.364716190281)+(0.271196923039)*0.5**o
-        ref[0,2,1,1]=(0.747625244884)/(o+1.)+(0.420842084614)+(-0.788206773125)*0.5**o
-        ref[0,2,2,0]=(0.197684766271)/(o+1.)+(-0.889094904468)+(-0.787603701957)*0.5**o
-        ref[0,2,2,1]=(-0.525306115268)/(o+1.)+(0.439959527228)+(0.417538087399)*0.5**o
-        ref[0,3,0,0]=(-0.149386157207)/(o+1.)+(-0.289926844941)+(-0.230658480436)*0.5**o
-        ref[0,3,0,1]=(-0.542257139282)/(o+1.)+(-0.0133255401565)+(-0.815859549425)*0.5**o
-        ref[0,3,1,0]=(0.714019527678)/(o+1.)+(-0.00632729199566)+(0.0508974791413)*0.5**o
-        ref[0,3,1,1]=(0.352455072404)/(o+1.)+(0.143383852019)+(0.119419200166)*0.5**o
-        ref[0,3,2,0]=(-0.585094684368)/(o+1.)+(0.00921199711359)+(-0.82075904747)*0.5**o
-        ref[0,3,2,1]=(0.686644239408)/(o+1.)+(0.468673187806)+(-0.748061395205)*0.5**o
-        ref[0,4,0,0]=(0.129373873322)/(o+1.)+(0.607761864417)+(0.128293903485)*0.5**o
-        ref[0,4,0,1]=(-0.170677596319)/(o+1.)+(-0.206814905431)+(0.639638672694)*0.5**o
-        ref[0,4,1,0]=(0.282544628333)/(o+1.)+(-0.475291486231)+(0.43743097727)*0.5**o
-        ref[0,4,1,1]=(0.218383977926)/(o+1.)+(0.43905900591)+(-0.995599965283)*0.5**o
-        ref[0,4,2,0]=(-0.449331655188)/(o+1.)+(-0.0971131654902)+(0.922609534479)*0.5**o
-        ref[0,4,2,1]=(-0.167639663907)/(o+1.)+(-0.103797419824)+(0.950186933361)*0.5**o
-        ref[1,0,0,0]=(-0.622510875807)/(o+1.)+(0.186056784105)+(0.0573632292788)*0.5**o
-        ref[1,0,0,1]=(0.469744047929)/(o+1.)+(-0.838331463751)+(0.368975600444)*0.5**o
-        ref[1,0,1,0]=(0.625367069433)/(o+1.)+(-0.432363629616)+(-0.810194964715)*0.5**o
-        ref[1,0,1,1]=(0.359324627118)/(o+1.)+(0.36983912542)+(0.744923275143)*0.5**o
-        ref[1,0,2,0]=(0.318198109895)/(o+1.)+(-0.215392416287)+(0.891959004941)*0.5**o
-        ref[1,0,2,1]=(-0.674805144805)/(o+1.)+(0.581833674632)+(0.842125439023)*0.5**o
-        ref[1,1,0,0]=(-0.740263211102)/(o+1.)+(0.109311509194)+(-0.786719774805)*0.5**o
-        ref[1,1,0,1]=(0.714032957488)/(o+1.)+(-0.81946337242)+(0.831245977993)*0.5**o
-        ref[1,1,1,0]=(0.455949140326)/(o+1.)+(0.666183494578)+(0.862796574462)*0.5**o
-        ref[1,1,1,1]=(-0.62474682088)/(o+1.)+(0.438060834031)+(-0.500409398892)*0.5**o
-        ref[1,1,2,0]=(-0.770315341866)/(o+1.)+(-0.375748925732)+(-0.402886961189)*0.5**o
-        ref[1,1,2,1]=(0.654162491323)/(o+1.)+(0.189164682023)+(0.358161520677)*0.5**o
-        ref[1,2,0,0]=(-0.0538737948754)/(o+1.)+(0.333813880332)+(-0.15539934232)*0.5**o
-        ref[1,2,0,1]=(-0.377617770006)/(o+1.)+(-0.0218224426646)+(0.371159212282)*0.5**o
-        ref[1,2,1,0]=(-0.360936107893)/(o+1.)+(0.141978404604)+(0.117790556271)*0.5**o
-        ref[1,2,1,1]=(0.183316445987)/(o+1.)+(-0.0416656990415)+(-0.524828128971)*0.5**o
-        ref[1,2,2,0]=(0.126601242737)/(o+1.)+(-0.0623520339976)+(0.300516177535)*0.5**o
-        ref[1,2,2,1]=(-0.810227948574)/(o+1.)+(-0.387092926354)+(-0.29046926624)*0.5**o
-        ref[1,3,0,0]=(0.757723452446)/(o+1.)+(0.293889998642)+(-0.134275834453)*0.5**o
-        ref[1,3,0,1]=(0.503482692135)/(o+1.)+(-0.125704830059)+(0.882915728842)*0.5**o
-        ref[1,3,1,0]=(-0.861747803918)/(o+1.)+(-0.0802560425765)+(-0.954792910945)*0.5**o
-        ref[1,3,1,1]=(-0.322274864209)/(o+1.)+(-0.226098024118)+(0.747255393187)*0.5**o
-        ref[1,3,2,0]=(-0.488288412308)/(o+1.)+(0.0635632421511)+(0.139287057836)*0.5**o
-        ref[1,3,2,1]=(0.206644380777)/(o+1.)+(0.323520058859)+(-0.861625516304)*0.5**o
-        ref[1,4,0,0]=(-0.971680855409)/(o+1.)+(0.0947423509032)+(-0.714198122614)*0.5**o
-        ref[1,4,0,1]=(0.347408878778)/(o+1.)+(-0.709724935569)+(0.293578109913)*0.5**o
-        ref[1,4,1,0]=(-0.284086603407)/(o+1.)+(-0.116791420591)+(0.843760126513)*0.5**o
-        ref[1,4,1,1]=(0.537701123084)/(o+1.)+(-0.482717976859)+(-0.342911357374)*0.5**o
-        ref[1,4,2,0]=(0.831438049852)/(o+1.)+(0.056404572442)+(-0.71201360314)*0.5**o
-        ref[1,4,2,1]=(-0.0369972206543)/(o+1.)+(0.275008406103)+(-0.616403541928)*0.5**o
-        ref[2,0,0,0]=(-0.464334304695)/(o+1.)+(0.132370231466)+(-0.959754423491)*0.5**o
-        ref[2,0,0,1]=(0.173044245392)/(o+1.)+(0.437195842274)+(0.231051530608)*0.5**o
-        ref[2,0,1,0]=(-0.816201949845)/(o+1.)+(-0.72616145946)+(0.376577055194)*0.5**o
-        ref[2,0,1,1]=(-0.876294548464)/(o+1.)+(0.128100848943)+(-0.4891837531)*0.5**o
-        ref[2,0,2,0]=(0.602375475355)/(o+1.)+(-0.497981505761)+(-0.759548081841)*0.5**o
-        ref[2,0,2,1]=(0.813648191424)/(o+1.)+(-0.619848910412)+(0.114018259802)*0.5**o
-        ref[2,1,0,0]=(-0.12122456959)/(o+1.)+(0.631472305971)+(-0.572699800518)*0.5**o
-        ref[2,1,0,1]=(0.539760655497)/(o+1.)+(0.43429478244)+(0.0655268452799)*0.5**o
-        ref[2,1,1,0]=(-0.0242249415295)/(o+1.)+(-0.263311349051)+(0.358281119336)*0.5**o
-        ref[2,1,1,1]=(-0.995787126907)/(o+1.)+(-0.370899595832)+(0.523751704889)*0.5**o
-        ref[2,1,2,0]=(0.149400154478)/(o+1.)+(-0.107907886588)+(-0.185380508646)*0.5**o
-        ref[2,1,2,1]=(0.908525646396)/(o+1.)+(-0.18328120728)+(0.81086932122)*0.5**o
-        ref[2,2,0,0]=(-0.0495088159461)/(o+1.)+(-0.246369371749)+(-0.463416100256)*0.5**o
-        ref[2,2,0,1]=(-0.895280577411)/(o+1.)+(-0.0345629407446)+(-0.200698149193)*0.5**o
-        ref[2,2,1,0]=(-0.375709672588)/(o+1.)+(-0.126514661136)+(0.888683772867)*0.5**o
-        ref[2,2,1,1]=(0.868194479789)/(o+1.)+(-0.239689630708)+(-0.0167949020901)*0.5**o
-        ref[2,2,2,0]=(0.267937553127)/(o+1.)+(-0.425739316963)+(0.441981698578)*0.5**o
-        ref[2,2,2,1]=(0.697645775876)/(o+1.)+(-0.16217258223)+(0.876701424579)*0.5**o
-        ref[2,3,0,0]=(-0.0706155476337)/(o+1.)+(0.483772571196)+(0.111231509217)*0.5**o
-        ref[2,3,0,1]=(0.326282512878)/(o+1.)+(0.759423156855)+(-0.858913402812)*0.5**o
-        ref[2,3,1,0]=(0.575866251831)/(o+1.)+(-0.776139286869)+(-0.524551221953)*0.5**o
-        ref[2,3,1,1]=(-0.488263373008)/(o+1.)+(0.0931216925076)+(0.391514075129)*0.5**o
-        ref[2,3,2,0]=(0.85094548724)/(o+1.)+(-0.0708709485834)+(0.26532129161)*0.5**o
-        ref[2,3,2,1]=(0.309349741876)/(o+1.)+(-0.384711182319)+(0.2339994493)*0.5**o
-        ref[2,4,0,0]=(0.339247480459)/(o+1.)+(0.475163650236)+(-0.713553783036)*0.5**o
-        ref[2,4,0,1]=(0.340009298488)/(o+1.)+(0.0740612601349)+(-0.733490022564)*0.5**o
-        ref[2,4,1,0]=(0.680862759763)/(o+1.)+(0.330395834014)+(0.709413437683)*0.5**o
-        ref[2,4,1,1]=(0.687201138134)/(o+1.)+(0.587139359385)+(-0.130761551034)*0.5**o
-        ref[2,4,2,0]=(0.910504833397)/(o+1.)+(0.210828308638)+(0.256894911335)*0.5**o
-        ref[2,4,2,1]=(-0.146356272875)/(o+1.)+(-0.798997815404)+(0.95137247728)*0.5**o
-        ref[3,0,0,0]=(0.894383747285)/(o+1.)+(0.932254321713)+(0.663180444534)*0.5**o
-        ref[3,0,0,1]=(0.367908872519)/(o+1.)+(-0.177196813397)+(0.424556283891)*0.5**o
-        ref[3,0,1,0]=(0.509310001763)/(o+1.)+(-0.869535884539)+(0.908698580251)*0.5**o
-        ref[3,0,1,1]=(-0.986699126405)/(o+1.)+(0.246072597257)+(0.523444225814)*0.5**o
-        ref[3,0,2,0]=(-0.843900271478)/(o+1.)+(0.46874998261)+(-0.163604985314)*0.5**o
-        ref[3,0,2,1]=(0.902072835174)/(o+1.)+(-0.0395040185096)+(-0.490804271432)*0.5**o
-        ref[3,1,0,0]=(0.430512336347)/(o+1.)+(0.755564990872)+(-0.949731382685)*0.5**o
-        ref[3,1,0,1]=(-0.203921504027)/(o+1.)+(-0.189536921439)+(0.945102298088)*0.5**o
-        ref[3,1,1,0]=(-0.365021977395)/(o+1.)+(-0.133381403116)+(0.762442770795)*0.5**o
-        ref[3,1,1,1]=(-0.397139314214)/(o+1.)+(0.152610714905)+(-0.829061607399)*0.5**o
-        ref[3,1,2,0]=(-0.435377419129)/(o+1.)+(0.687677761846)+(-0.780040060687)*0.5**o
-        ref[3,1,2,1]=(-0.642258121264)/(o+1.)+(-0.260682339572)+(-0.853144390228)*0.5**o
-        ref[3,2,0,0]=(0.361300611554)/(o+1.)+(0.451810606136)+(0.377161814597)*0.5**o
-        ref[3,2,0,1]=(0.083224329707)/(o+1.)+(0.223994918098)+(-0.51174671413)*0.5**o
-        ref[3,2,1,0]=(-0.132608876197)/(o+1.)+(0.761129663444)+(0.612695079311)*0.5**o
-        ref[3,2,1,1]=(0.68468196965)/(o+1.)+(-0.0553342296404)+(0.0928734170244)*0.5**o
-        ref[3,2,2,0]=(-0.0602194449612)/(o+1.)+(0.222211500837)+(-0.863542893122)*0.5**o
-        ref[3,2,2,1]=(-0.0746938765947)/(o+1.)+(0.283185341046)+(-0.0942537498633)*0.5**o
-        ref[3,3,0,0]=(-0.541714868844)/(o+1.)+(0.642337208826)+(-0.0588913579205)*0.5**o
-        ref[3,3,0,1]=(-0.32332836636)/(o+1.)+(0.0454800898319)+(0.221784155922)*0.5**o
-        ref[3,3,1,0]=(0.755681096012)/(o+1.)+(0.0454123213802)+(0.804097639203)*0.5**o
-        ref[3,3,1,1]=(0.745033643035)/(o+1.)+(0.34690273587)+(0.825696602707)*0.5**o
-        ref[3,3,2,0]=(-0.569395510546)/(o+1.)+(0.0733165737898)+(-0.372114391352)*0.5**o
-        ref[3,3,2,1]=(0.781753556415)/(o+1.)+(0.592862368109)+(0.439723359721)*0.5**o
-        ref[3,4,0,0]=(0.328787484151)/(o+1.)+(-0.75965414705)+(-0.429896412297)*0.5**o
-        ref[3,4,0,1]=(-0.541538468561)/(o+1.)+(-0.590091943297)+(0.803567111353)*0.5**o
-        ref[3,4,1,0]=(0.308312799035)/(o+1.)+(0.677057855567)+(-0.963266835039)*0.5**o
-        ref[3,4,1,1]=(-0.923691546947)/(o+1.)+(-0.0348874464182)+(0.651198604373)*0.5**o
-        ref[3,4,2,0]=(-0.0326564953763)/(o+1.)+(-0.0667935103036)+(-0.339406539705)*0.5**o
-        ref[3,4,2,1]=(0.193890658409)/(o+1.)+(-0.370194614419)+(0.471355209305)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.0737627367843)*x[0]**o+(-0.897508234376)*x[0]+(0.499361502035)*x[1]**o+(-0.830793706142)*x[1]+(0.967672023686)*x[2]**o+(-0.94209897356)*x[2]
-        arg[0,0,0,1]=(0.353968533247)*x[0]**o+(-0.828575104081)*x[0]+(0.111197799977)*x[1]**o+(0.475627052455)*x[1]+(0.10233739786)*x[2]**o+(-0.297090205985)*x[2]
-        arg[0,0,1,0]=(0.315704665816)*x[0]**o+(0.450577419574)*x[0]+(-0.0225047225996)*x[1]**o+(0.221436098936)*x[1]+(-0.210708820992)*x[2]**o+(0.22813686037)*x[2]
-        arg[0,0,1,1]=(-0.453912049362)*x[0]**o+(0.443266972459)*x[0]+(-0.166003491301)*x[1]**o+(0.325157034345)*x[1]+(0.975435329063)*x[2]**o+(0.516477372955)*x[2]
-        arg[0,0,2,0]=(0.705225432895)*x[0]**o+(0.406870556161)*x[0]+(0.967131048725)*x[1]**o+(-0.31111693058)*x[1]+(0.915125425876)*x[2]**o+(-0.417407852906)*x[2]
-        arg[0,0,2,1]=(-0.397162258761)*x[0]**o+(-0.49079016751)*x[0]+(-0.444905720899)*x[1]**o+(0.258998080457)*x[1]+(-0.406172174923)*x[2]**o+(0.166620074269)*x[2]
-        arg[0,1,0,0]=(0.00444300957662)*x[0]**o+(0.59448685984)*x[0]+(-0.755596203939)*x[1]**o+(-0.587866578467)*x[1]+(-0.994620629569)*x[2]**o+(0.558539124849)*x[2]
-        arg[0,1,0,1]=(0.726535641072)*x[0]**o+(-0.515254556008)*x[0]+(-0.737095044797)*x[1]**o+(0.396218854768)*x[1]+(-0.873340093434)*x[2]**o+(0.538194586759)*x[2]
-        arg[0,1,1,0]=(-0.554579794515)*x[0]**o+(-0.754117891877)*x[0]+(0.242579027102)*x[1]**o+(0.368307663104)*x[1]+(0.308372932825)*x[2]**o+(-0.521440130826)*x[2]
-        arg[0,1,1,1]=(0.294744137189)*x[0]**o+(0.44996935134)*x[0]+(0.118263237453)*x[1]**o+(-0.143566244715)*x[1]+(-0.927385432821)*x[2]**o+(0.912735237305)*x[2]
-        arg[0,1,2,0]=(-0.30261020867)*x[0]**o+(-0.994883662031)*x[0]+(0.514662053738)*x[1]**o+(0.327770859964)*x[1]+(0.862452368458)*x[2]**o+(-0.739026842429)*x[2]
-        arg[0,1,2,1]=(0.494855964972)*x[0]**o+(-0.358461686787)*x[0]+(0.406489619959)*x[1]**o+(0.417722618206)*x[1]+(0.679808195501)*x[2]**o+(-0.00502769522311)*x[2]
-        arg[0,2,0,0]=(-0.914585215232)*x[0]**o+(0.305890296017)*x[0]+(-0.867826544668)*x[1]**o+(0.304580882671)*x[1]+(-0.401401956053)*x[2]**o+(0.842276423411)*x[2]
-        arg[0,2,0,1]=(-0.260590397572)*x[0]**o+(0.541867335986)*x[0]+(0.0279475511153)*x[1]**o+(0.0255320376447)*x[1]+(-0.584584718877)*x[2]**o+(-0.640388032783)*x[2]
-        arg[0,2,1,0]=(0.0455797513404)*x[0]**o+(-0.764984318339)*x[0]+(-0.257174640639)*x[1]**o+(0.745888292962)*x[1]+(0.964524202534)*x[2]**o+(0.435680191282)*x[2]
-        arg[0,2,1,1]=(-0.300900136798)*x[0]**o+(-0.899164082043)*x[0]+(-0.63273853331)*x[1]**o+(0.56522562781)*x[1]+(-0.846482371222)*x[2]**o+(-0.909985752269)*x[2]
-        arg[0,2,2,0]=(0.745711773093)*x[0]**o+(0.0627291150681)*x[0]+(-0.090340386706)*x[1]**o+(-0.0912293084958)*x[1]+(0.108613205226)*x[2]**o+(-0.28985444593)*x[2]
-        arg[0,2,2,1]=(0.291340077334)*x[0]**o+(0.592856577974)*x[0]+(0.141857446535)*x[1]**o+(0.830526360843)*x[1]+(0.956840406828)*x[2]**o+(-0.717465405888)*x[2]
-        arg[0,3,0,0]=(0.89242099254)*x[0]**o+(0.529348654364)*x[0]+(-0.074382350183)*x[1]**o+(0.874670648345)*x[1]+(-0.728104560168)*x[2]**o+(0.0781153963606)*x[2]
-        arg[0,3,0,1]=(0.095390666498)*x[0]**o+(0.0124610436496)*x[0]+(0.278014506594)*x[1]**o+(0.923928359216)*x[1]+(-0.0905667357972)*x[2]**o+(-0.894031439498)*x[2]
-        arg[0,3,1,0]=(-0.317750910722)*x[0]**o+(0.677406387747)*x[0]+(0.550094997541)*x[1]**o+(-0.30098732949)*x[1]+(0.501753868155)*x[2]**o+(-0.42859127752)*x[2]
-        arg[0,3,1,1]=(-0.204455448392)*x[0]**o+(0.445237113438)*x[0]+(0.853596204887)*x[1]**o+(0.315701645178)*x[1]+(0.307192864939)*x[2]**o+(-0.708325809173)*x[2]
-        arg[0,3,2,0]=(0.38581656579)*x[0]**o+(-0.79289714243)*x[0]+(-0.412226202311)*x[1]**o+(0.655534112291)*x[1]+(0.31352728014)*x[2]**o+(0.502089385396)*x[2]
-        arg[0,3,2,1]=(-0.225571343976)*x[0]**o+(0.687765563016)*x[0]+(0.0421378888728)*x[1]**o+(0.54466301835)*x[1]+(-0.430288255786)*x[2]**o+(-0.117571440224)*x[2]
-        arg[0,4,0,0]=(0.834083057621)*x[0]**o+(0.0292441566815)*x[0]+(-0.947154369416)*x[1]**o+(0.597153808995)*x[1]+(0.323706009194)*x[2]**o+(0.664093182644)*x[2]
-        arg[0,4,0,1]=(-0.613152578007)*x[0]**o+(0.253155875339)*x[0]+(0.297138228345)*x[1]**o+(-0.604393247773)*x[1]+(-0.936718722281)*x[2]**o+(-0.410140848312)*x[2]
-        arg[0,4,1,0]=(-0.373668614153)*x[0]**o+(-0.401240526097)*x[0]+(-0.417458139032)*x[1]**o+(0.456033864594)*x[1]+(-0.158434012225)*x[2]**o+(-0.33938136039)*x[2]
-        arg[0,4,1,1]=(0.00943802199128)*x[0]**o+(-0.800756064115)*x[0]+(0.899199671858)*x[1]**o+(0.376830611387)*x[1]+(-0.930822199046)*x[2]**o+(0.192235807799)*x[2]
-        arg[0,4,2,0]=(0.157099024354)*x[0]**o+(0.195942080381)*x[0]+(-0.554519054021)*x[1]**o+(0.871823312361)*x[1]+(-0.34803033039)*x[2]**o+(-0.646933331859)*x[2]
-        arg[0,4,2,1]=(0.933762543076)*x[0]**o+(-0.169843985744)*x[0]+(0.971089176971)*x[1]**o+(-0.605176382286)*x[1]+(0.254369209427)*x[2]**o+(0.0314820745541)*x[2]
-        arg[1,0,0,0]=(0.0417476479889)*x[0]**o+(-0.144293810851)*x[0]+(-0.677039420744)*x[1]**o+(-0.137097132377)*x[1]+(0.721082639859)*x[2]**o+(-0.32510577691)*x[2]
-        arg[1,0,0,1]=(0.450986977446)*x[0]**o+(-0.921371106219)*x[0]+(0.536898979198)*x[1]**o+(-0.814951108186)*x[1]+(-0.733774506956)*x[2]**o+(0.938941747764)*x[2]
-        arg[1,0,1,0]=(-0.23712795738)*x[0]**o+(0.450883240541)*x[0]+(0.101102533189)*x[1]**o+(-0.998253664232)*x[1]+(-0.843977488601)*x[2]**o+(-0.807025450448)*x[2]
-        arg[1,0,1,1]=(-0.308721170682)*x[0]**o+(-0.546268734305)*x[0]+(0.643628083343)*x[1]**o+(0.206934468523)*x[1]+(-0.257667927436)*x[2]**o+(0.468860780891)*x[2]
-        arg[1,0,2,0]=(-0.267232319593)*x[0]**o+(0.221737693042)*x[0]+(0.202218228468)*x[1]**o+(-0.560941556406)*x[1]+(0.910244160614)*x[2]**o+(0.361584784536)*x[2]
-        arg[1,0,2,1]=(0.405254374432)*x[0]**o+(-0.102574362257)*x[0]+(0.527874164745)*x[1]**o+(0.0318395137256)*x[1]+(-0.448050293943)*x[2]**o+(-0.6401160036)*x[2]
-        arg[1,1,0,0]=(-0.877224972777)*x[0]**o+(-0.544175806369)*x[0]+(0.528037913494)*x[1]**o+(-0.477854554671)*x[1]+(-0.394875438861)*x[2]**o+(-0.704656012962)*x[2]
-        arg[1,1,0,1]=(-0.873928172379)*x[0]**o+(0.273455449944)*x[0]+(0.681090480547)*x[1]**o+(0.883243766093)*x[1]+(0.557357114631)*x[2]**o+(0.586148966774)*x[2]
-        arg[1,1,1,0]=(0.552826305913)*x[0]**o+(-0.277269605193)*x[0]+(-0.681872908424)*x[1]**o+(-0.84578699459)*x[1]+(0.6543624385)*x[2]**o+(-0.355051513153)*x[2]
-        arg[1,1,1,1]=(-0.71233607947)*x[0]**o+(-0.779861555179)*x[0]+(0.11496674995)*x[1]**o+(0.634901982779)*x[1]+(0.833044137166)*x[2]**o+(0.0443514408009)*x[2]
-        arg[1,1,2,0]=(-0.411667274338)*x[0]**o+(0.218709061898)*x[0]+(0.132573928273)*x[1]**o+(-0.450677430962)*x[1]+(0.88420873514)*x[2]**o+(-0.618513305411)*x[2]
-        arg[1,1,2,1]=(0.533005373575)*x[0]**o+(0.846343252936)*x[0]+(0.697076801609)*x[1]**o+(0.342260840742)*x[1]+(0.923380136498)*x[2]**o+(-0.727450493778)*x[2]
-        arg[1,2,0,0]=(-0.637366803484)*x[0]**o+(-0.654649539562)*x[0]+(-0.443035194144)*x[1]**o+(0.4928304386)*x[1]+(0.889290653473)*x[2]**o+(0.208513517091)*x[2]
-        arg[1,2,0,1]=(-0.404870452835)*x[0]**o+(-0.556431486625)*x[0]+(-0.428885935216)*x[1]**o+(0.208771213187)*x[1]+(0.706109349268)*x[2]**o+(0.726168991522)*x[2]
-        arg[1,2,1,0]=(0.85574176569)*x[0]**o+(-0.371989246254)*x[0]+(0.0376283091444)*x[1]**o+(-0.164811219077)*x[1]+(0.842513532253)*x[2]**o+(-0.963454790343)*x[2]
-        arg[1,2,1,1]=(0.576825533647)*x[0]**o+(0.866570909412)*x[0]+(-0.286228055595)*x[1]**o+(-0.509258889664)*x[1]+(0.358087406384)*x[2]**o+(0.2558870556)*x[2]
-        arg[1,2,2,0]=(0.741411326194)*x[0]**o+(0.887444210472)*x[0]+(0.176659455323)*x[1]**o+(-0.292731470152)*x[1]+(0.179836617557)*x[2]**o+(-0.10894424483)*x[2]
-        arg[1,2,2,1]=(0.386515069261)*x[0]**o+(-0.423389396097)*x[0]+(0.300384913804)*x[1]**o+(-0.569308908813)*x[1]+(0.845849686169)*x[2]**o+(-0.802483942058)*x[2]
-        arg[1,3,0,0]=(0.848952965744)*x[0]**o+(0.113555873929)*x[0]+(0.132168122705)*x[1]**o+(0.464116031047)*x[1]+(-0.928746352905)*x[2]**o+(-0.176374657603)*x[2]
-        arg[1,3,0,1]=(0.357870838328)*x[0]**o+(-0.294290586373)*x[0]+(0.395859596543)*x[1]**o+(-0.265635871788)*x[1]+(0.283887401402)*x[2]**o+(0.500378090749)*x[2]
-        arg[1,3,1,0]=(-0.509333127149)*x[0]**o+(0.328856435768)*x[0]+(-0.377387784476)*x[1]**o+(-0.878505533565)*x[1]+(0.448760304667)*x[2]**o+(0.996692047048)*x[2]
-        arg[1,3,1,1]=(-0.837885550386)*x[0]**o+(0.0608579436757)*x[0]+(-0.627132023609)*x[1]**o+(0.902538475491)*x[1]+(-0.449596037062)*x[2]**o+(-0.158786724549)*x[2]
-        arg[1,3,2,0]=(0.205889276236)*x[0]**o+(0.576561726109)*x[0]+(-0.00281354319689)*x[1]**o+(0.214968600999)*x[1]+(0.811758703832)*x[2]**o+(0.260164242506)*x[2]
-        arg[1,3,2,1]=(-0.331660060588)*x[0]**o+(0.713879758554)*x[0]+(0.804549392751)*x[1]**o+(-0.346397636822)*x[1]+(-0.364073503513)*x[2]**o+(0.338612348994)*x[2]
-        arg[1,4,0,0]=(0.394201404247)*x[0]**o+(-0.416853395415)*x[0]+(-0.0581465874206)*x[1]**o+(0.105267182588)*x[1]+(0.791799718009)*x[2]**o+(0.0840172853234)*x[2]
-        arg[1,4,0,1]=(-0.346144268453)*x[0]**o+(-0.661228785728)*x[0]+(0.326588395606)*x[1]**o+(0.766137046896)*x[1]+(0.566377202267)*x[2]**o+(0.613565461425)*x[2]
-        arg[1,4,1,0]=(-0.907566140749)*x[0]**o+(-0.391612881392)*x[0]+(0.263322351365)*x[1]**o+(-0.4373853914)*x[1]+(0.248855925063)*x[2]**o+(0.973515668505)*x[2]
-        arg[1,4,1,1]=(0.726194147182)*x[0]**o+(0.497593423927)*x[0]+(-0.951344923018)*x[1]**o+(0.55327321528)*x[1]+(-0.266195110749)*x[2]**o+(-0.310893832826)*x[2]
-        arg[1,4,2,0]=(-0.940824546553)*x[0]**o+(-0.47838524024)*x[0]+(0.408728941942)*x[1]**o+(0.627300786998)*x[1]+(-0.0547545650101)*x[2]**o+(0.433290388525)*x[2]
-        arg[1,4,2,1]=(0.728499572603)*x[0]**o+(-0.232088507059)*x[0]+(0.0550057703801)*x[1]**o+(0.159356057226)*x[1]+(0.111191390097)*x[2]**o+(-0.64498018454)*x[2]
-        arg[2,0,0,0]=(0.467025642879)*x[0]**o+(-0.695379603222)*x[0]+(0.591732172092)*x[1]**o+(0.84325648142)*x[1]+(0.965696472916)*x[2]**o+(0.626196181241)*x[2]
-        arg[2,0,0,1]=(-0.211129222294)*x[0]**o+(-0.501208172412)*x[0]+(-0.0162146409175)*x[1]**o+(-0.672364205306)*x[1]+(-0.851073479662)*x[2]**o+(-0.817568385627)*x[2]
-        arg[2,0,1,0]=(-0.668065295797)*x[0]**o+(-0.90359857855)*x[0]+(0.040519772083)*x[1]**o+(-0.295766307198)*x[1]+(0.0491234828524)*x[2]**o+(-0.589557178985)*x[2]
-        arg[2,0,1,1]=(0.928751918298)*x[0]**o+(-0.773787731767)*x[0]+(-0.744325160449)*x[1]**o+(-0.426987905682)*x[1]+(0.503339956851)*x[2]**o+(0.386756648382)*x[2]
-        arg[2,0,2,0]=(-0.531818105049)*x[0]**o+(-0.586811490681)*x[0]+(0.780379352762)*x[1]**o+(-0.5575328003)*x[1]+(0.0354867101462)*x[2]**o+(0.581226069105)*x[2]
-        arg[2,0,2,1]=(0.0150988200159)*x[0]**o+(0.56415563975)*x[0]+(0.540723773613)*x[1]**o+(0.0653377679637)*x[1]+(-0.52633696371)*x[2]**o+(-0.122811009405)*x[2]
-        arg[2,1,0,0]=(-0.0829154151121)*x[0]**o+(-0.416192198737)*x[0]+(0.944232067474)*x[1]**o+(-0.159852455491)*x[1]+(-0.198397797188)*x[2]**o+(-0.684211447305)*x[2]
-        arg[2,1,0,1]=(-0.834502772339)*x[0]**o+(-0.856817328109)*x[0]+(0.213303574315)*x[1]**o+(-0.283140791695)*x[1]+(-0.727061494352)*x[2]**o+(0.12871372765)*x[2]
-        arg[2,1,1,0]=(0.247439924718)*x[0]**o+(-0.912464825903)*x[0]+(0.791177764168)*x[1]**o+(0.160047921728)*x[1]+(0.591086305304)*x[2]**o+(-0.774025941232)*x[2]
-        arg[2,1,1,1]=(-0.120169534728)*x[0]**o+(-0.747254680906)*x[0]+(-0.394003570933)*x[1]**o+(-0.938198960695)*x[1]+(-0.0142776288517)*x[2]**o+(0.0627959740849)*x[2]
-        arg[2,1,2,0]=(0.703841647274)*x[0]**o+(-0.946039767174)*x[0]+(-0.836717609846)*x[1]**o+(0.776573515772)*x[1]+(0.250502751027)*x[2]**o+(0.403896552902)*x[2]
-        arg[2,1,2,1]=(-0.19760048131)*x[0]**o+(-0.250991189554)*x[0]+(0.278810924634)*x[1]**o+(-0.580148097047)*x[1]+(-0.197518781697)*x[2]**o+(0.116835806412)*x[2]
-        arg[2,2,0,0]=(-0.507872937196)*x[0]**o+(-0.771841217512)*x[0]+(0.852666314762)*x[1]**o+(-0.482947444136)*x[1]+(0.805824662389)*x[2]**o+(-0.299255374349)*x[2]
-        arg[2,2,0,1]=(-0.481403986338)*x[0]**o+(0.904322169038)*x[0]+(0.937553651477)*x[1]**o+(0.727763542606)*x[1]+(-0.69485539356)*x[2]**o+(0.547755372933)*x[2]
-        arg[2,2,1,0]=(0.241675645258)*x[0]**o+(0.957681326492)*x[0]+(-0.305747218513)*x[1]**o+(-0.0393749799535)*x[1]+(-0.448892234759)*x[2]**o+(0.707429367761)*x[2]
-        arg[2,2,1,1]=(0.114772627763)*x[0]**o+(-0.411147710203)*x[0]+(0.13389320737)*x[1]**o+(0.806309117051)*x[1]+(-0.572620769665)*x[2]**o+(0.0389925355751)*x[2]
-        arg[2,2,2,0]=(0.887023209688)*x[0]**o+(0.158261816385)*x[0]+(0.687399231822)*x[1]**o+(-0.858491519094)*x[1]+(-0.00348150506922)*x[2]**o+(-0.863496570874)*x[2]
-        arg[2,2,2,1]=(0.836731324893)*x[0]**o+(0.975472534225)*x[0]+(0.407275572226)*x[1]**o+(0.565132026147)*x[1]+(0.79110912675)*x[2]**o+(-0.0816802575667)*x[2]
-        arg[2,3,0,0]=(0.196161020545)*x[0]**o+(0.254301467318)*x[0]+(0.759363127106)*x[1]**o+(0.536320544038)*x[1]+(0.522705219849)*x[2]**o+(0.376531450811)*x[2]
-        arg[2,3,0,1]=(-0.862326385376)*x[0]**o+(0.766714365146)*x[0]+(0.279327620722)*x[1]**o+(-0.44416461578)*x[1]+(0.115982232563)*x[2]**o+(0.824064889151)*x[2]
-        arg[2,3,1,0]=(0.571263839862)*x[0]**o+(-0.679998793927)*x[0]+(0.63548515376)*x[1]**o+(0.464171242163)*x[1]+(0.712124752567)*x[2]**o+(0.913131755622)*x[2]
-        arg[2,3,1,1]=(0.272559456412)*x[0]**o+(0.0577748172306)*x[0]+(-0.610464803438)*x[1]**o+(0.233987628538)*x[1]+(0.904147555826)*x[2]**o+(-0.131245442847)*x[2]
-        arg[2,3,2,0]=(0.3409363126)*x[0]**o+(0.40060221588)*x[0]+(-0.603551487822)*x[1]**o+(-0.697430353793)*x[1]+(-0.867009193249)*x[2]**o+(-0.178991284979)*x[2]
-        arg[2,3,2,1]=(0.949170673623)*x[0]**o+(-0.0217541208215)*x[0]+(-0.775307373317)*x[1]**o+(0.421565612874)*x[1]+(0.419254478365)*x[2]**o+(-0.732203964657)*x[2]
-        arg[2,4,0,0]=(0.876774885889)*x[0]**o+(0.441155536177)*x[0]+(-0.292113312365)*x[1]**o+(0.880590008772)*x[1]+(0.0732363738743)*x[2]**o+(-0.590855067487)*x[2]
-        arg[2,4,0,1]=(0.347441329383)*x[0]**o+(-0.96566344519)*x[0]+(-0.0870932691958)*x[1]**o+(-0.793898415692)*x[1]+(0.911757004621)*x[2]**o+(0.623070769788)*x[2]
-        arg[2,4,1,0]=(0.732123350436)*x[0]**o+(-0.707615856771)*x[0]+(-0.57969408421)*x[1]**o+(0.0643464469617)*x[1]+(-0.648380091597)*x[2]**o+(0.567100447405)*x[2]
-        arg[2,4,1,1]=(-0.128872747083)*x[0]**o+(-0.463336399393)*x[0]+(-0.1679086419)*x[1]**o+(0.602218708561)*x[1]+(0.62788576637)*x[2]**o+(0.223548351914)*x[2]
-        arg[2,4,2,0]=(0.619034818105)*x[0]**o+(0.167994824318)*x[0]+(-0.244892750219)*x[1]**o+(0.471338499791)*x[1]+(0.526950200066)*x[2]**o+(0.345611623572)*x[2]
-        arg[2,4,2,1]=(0.645979236759)*x[0]**o+(0.79896884484)*x[0]+(-0.587486435644)*x[1]**o+(-0.467838428827)*x[1]+(0.672707985612)*x[2]**o+(-0.169680966884)*x[2]
-        arg[3,0,0,0]=(-0.265836015694)*x[0]**o+(-0.383762854285)*x[0]+(0.420375720992)*x[1]**o+(0.739662661302)*x[1]+(-0.593559713248)*x[2]**o+(0.0743208592009)*x[2]
-        arg[3,0,0,1]=(0.306246512933)*x[0]**o+(0.0357065903179)*x[0]+(0.213209244461)*x[1]**o+(-0.069836605971)*x[1]+(0.668535341179)*x[2]**o+(0.59870885392)*x[2]
-        arg[3,0,1,0]=(0.509420593773)*x[0]**o+(0.995859415429)*x[0]+(-0.07734119959)*x[1]**o+(0.269006992126)*x[1]+(-0.465576902019)*x[2]**o+(0.318766487761)*x[2]
-        arg[3,0,1,1]=(-0.609626065482)*x[0]**o+(0.970976299205)*x[0]+(-0.314734168176)*x[1]**o+(-0.536438958228)*x[1]+(0.900096595598)*x[2]**o+(-0.893816431641)*x[2]
-        arg[3,0,2,0]=(0.269212290711)*x[0]**o+(-0.119897130167)*x[0]+(-0.937350065698)*x[1]**o+(0.913313769348)*x[1]+(0.311695335026)*x[2]**o+(0.58822688023)*x[2]
-        arg[3,0,2,1]=(-0.445116541697)*x[0]**o+(-0.64630078598)*x[0]+(0.811173945666)*x[1]**o+(-0.910503175962)*x[1]+(0.160819266078)*x[2]**o+(-0.807050548571)*x[2]
-        arg[3,1,0,0]=(0.25585673506)*x[0]**o+(-0.174293490388)*x[0]+(-0.510750951271)*x[1]**o+(-0.215780338673)*x[1]+(-0.531739311594)*x[2]**o+(0.479569840128)*x[2]
-        arg[3,1,0,1]=(-0.159301665223)*x[0]**o+(0.88558738006)*x[0]+(-0.933255168276)*x[1]**o+(0.739621529924)*x[1]+(-0.371501556668)*x[2]**o+(-0.224043643673)*x[2]
-        arg[3,1,1,0]=(0.673375237931)*x[0]**o+(0.29315421593)*x[0]+(0.378983835599)*x[1]**o+(-0.187220470447)*x[1]+(-0.122366431969)*x[2]**o+(-0.178182488821)*x[2]
-        arg[3,1,1,1]=(0.273992606955)*x[0]**o+(-0.42302685869)*x[0]+(0.490650718142)*x[1]**o+(0.067822229282)*x[1]+(0.758676637186)*x[2]**o+(-0.840062442278)*x[2]
-        arg[3,1,2,0]=(-0.533129977534)*x[0]**o+(0.743362501638)*x[0]+(0.0397932337285)*x[1]**o+(0.134261172942)*x[1]+(0.076467475088)*x[2]**o+(0.750124646154)*x[2]
-        arg[3,1,2,1]=(0.977824314677)*x[0]**o+(0.322104772509)*x[0]+(0.478366489119)*x[1]**o+(0.139966919282)*x[1]+(0.823631645543)*x[2]**o+(0.29259439301)*x[2]
-        arg[3,2,0,0]=(0.969349250234)*x[0]**o+(0.158604629065)*x[0]+(0.517280925739)*x[1]**o+(-0.32151445591)*x[1]+(0.516829269337)*x[2]**o+(0.935139450142)*x[2]
-        arg[3,2,0,1]=(-0.673721580725)*x[0]**o+(0.1932869215)*x[0]+(0.47375679317)*x[1]**o+(0.377941367578)*x[1]+(-0.359306451576)*x[2]**o+(0.00498822119998)*x[2]
-        arg[3,2,1,0]=(-0.432873699676)*x[0]**o+(0.191782167044)*x[0]+(0.191395777927)*x[1]**o+(-0.540088847941)*x[1]+(0.608451872364)*x[2]**o+(0.151589512705)*x[2]
-        arg[3,2,1,1]=(0.633726614581)*x[0]**o+(-0.824133266602)*x[0]+(-0.380289061608)*x[1]**o+(-0.722136850408)*x[1]+(-0.807853184729)*x[2]**o+(0.152552828168)*x[2]
-        arg[3,2,2,0]=(-0.182700878265)*x[0]**o+(0.105776705469)*x[0]+(0.837527799957)*x[1]**o+(0.120438395343)*x[1]+(-0.211142277471)*x[2]**o+(-0.0499206664041)*x[2]
-        arg[3,2,2,1]=(0.999790796581)*x[0]**o+(0.523238189614)*x[0]+(0.108118557801)*x[1]**o+(-0.899694790145)*x[1]+(0.165089392648)*x[2]**o+(0.38599870475)*x[2]
-        arg[3,3,0,0]=(-0.959143897162)*x[0]**o+(-0.968197835338)*x[0]+(-0.521866033091)*x[1]**o+(-0.560799919169)*x[1]+(0.604562365858)*x[2]**o+(0.195593261393)*x[2]
-        arg[3,3,0,1]=(0.385513188376)*x[0]**o+(0.918485762628)*x[0]+(0.581126961809)*x[1]**o+(-0.365882492483)*x[1]+(-0.260563773993)*x[2]**o+(0.997016165521)*x[2]
-        arg[3,3,1,0]=(0.809269330969)*x[0]**o+(0.472424328796)*x[0]+(-0.920680159926)*x[1]**o+(0.756205962059)*x[1]+(-0.886275742364)*x[2]**o+(-0.800132407145)*x[2]
-        arg[3,3,1,1]=(-0.983474390608)*x[0]**o+(-0.436192301851)*x[0]+(0.653210945793)*x[1]**o+(-0.465357783291)*x[1]+(-0.799261076035)*x[2]**o+(-0.349990963152)*x[2]
-        arg[3,3,2,0]=(0.710820041642)*x[0]**o+(-0.973768204693)*x[0]+(0.0408403957292)*x[1]**o+(0.61546181161)*x[1]+(0.915939389579)*x[2]**o+(0.634659938301)*x[2]
-        arg[3,3,2,1]=(0.633364771689)*x[0]**o+(0.887553239682)*x[0]+(-0.64913373177)*x[1]**o+(0.557465560353)*x[1]+(-0.744072153243)*x[2]**o+(-0.301528624747)*x[2]
-        arg[3,4,0,0]=(0.44039719913)*x[0]**o+(-0.0339525806656)*x[0]+(0.574166395893)*x[1]**o+(-0.810441051899)*x[1]+(0.254523432152)*x[2]**o+(-0.798403721953)*x[2]
-        arg[3,4,0,1]=(0.253149910502)*x[0]**o+(-0.909846068796)*x[0]+(0.855107984234)*x[1]**o+(-0.973196168972)*x[1]+(0.646832394105)*x[2]**o+(0.811892995874)*x[2]
-        arg[3,4,1,0]=(0.13027869782)*x[0]**o+(-0.424094152568)*x[0]+(-0.197473699021)*x[1]**o+(0.0795845331856)*x[1]+(-0.511301398362)*x[2]**o+(-0.331330168767)*x[2]
-        arg[3,4,1,1]=(0.476554240918)*x[0]**o+(0.18800431479)*x[0]+(0.259031626216)*x[1]**o+(-0.0532533771273)*x[1]+(0.914847196458)*x[2]**o+(0.333851370508)*x[2]
-        arg[3,4,2,0]=(0.800058524963)*x[0]**o+(-0.402028928896)*x[0]+(0.913881556051)*x[1]**o+(0.895516442873)*x[1]+(-0.0227700921994)*x[2]**o+(-0.0502319834692)*x[2]
-        arg[3,4,2,1]=(-0.533834741079)*x[0]**o+(0.557954226232)*x[0]+(-0.121676666641)*x[1]**o+(0.781782385789)*x[1]+(0.0682870158781)*x[2]**o+(-0.236432552686)*x[2]
-        ref[0,0,0,0]=(1.46703352572)/(o+1.)+(-1.33520045704)+(0.0737627367843)*0.5**o
-        ref[0,0,0,1]=(0.213535197837)/(o+1.)+(-0.325019128805)+(0.353968533247)*0.5**o
-        ref[0,0,1,0]=(-0.233213543591)/(o+1.)+(0.450075189439)+(0.315704665816)*0.5**o
-        ref[0,0,1,1]=(0.809431837761)/(o+1.)+(0.642450689879)+(-0.453912049362)*0.5**o
-        ref[0,0,2,0]=(1.8822564746)/(o+1.)+(-0.160827113662)+(0.705225432895)*0.5**o
-        ref[0,0,2,1]=(-0.851077895823)/(o+1.)+(-0.032586006392)+(-0.397162258761)*0.5**o
-        ref[0,1,0,0]=(-1.75021683351)/(o+1.)+(0.282579703111)+(0.00444300957662)*0.5**o
-        ref[0,1,0,1]=(-1.61043513823)/(o+1.)+(0.209579442759)+(0.726535641072)*0.5**o
-        ref[0,1,1,0]=(0.550951959927)/(o+1.)+(-0.453625179799)+(-0.554579794515)*0.5**o
-        ref[0,1,1,1]=(-0.809122195368)/(o+1.)+(0.609569171964)+(0.294744137189)*0.5**o
-        ref[0,1,2,0]=(1.3771144222)/(o+1.)+(-0.703069822248)+(-0.30261020867)*0.5**o
-        ref[0,1,2,1]=(1.08629781546)/(o+1.)+(0.0271166180983)+(0.494855964972)*0.5**o
-        ref[0,2,0,0]=(-1.26922850072)/(o+1.)+(0.72637380105)+(-0.914585215232)*0.5**o
-        ref[0,2,0,1]=(-0.556637167762)/(o+1.)+(-0.036494329576)+(-0.260590397572)*0.5**o
-        ref[0,2,1,0]=(0.707349561895)/(o+1.)+(0.208292082952)+(0.0455797513404)*0.5**o
-        ref[0,2,1,1]=(-1.47922090453)/(o+1.)+(-0.621962103251)+(-0.300900136798)*0.5**o
-        ref[0,2,2,0]=(0.01827281852)/(o+1.)+(-0.159177319679)+(0.745711773093)*0.5**o
-        ref[0,2,2,1]=(1.09869785336)/(o+1.)+(0.352958766464)+(0.291340077334)*0.5**o
-        ref[0,3,0,0]=(-0.802486910351)/(o+1.)+(0.741067349535)+(0.89242099254)*0.5**o
-        ref[0,3,0,1]=(0.187447770797)/(o+1.)+(0.0211789816838)+(0.095390666498)*0.5**o
-        ref[0,3,1,0]=(1.0518488657)/(o+1.)+(-0.0260861096315)+(-0.317750910722)*0.5**o
-        ref[0,3,1,1]=(1.16078906983)/(o+1.)+(0.0263064747213)+(-0.204455448392)*0.5**o
-        ref[0,3,2,0]=(-0.0986989221708)/(o+1.)+(0.182363177629)+(0.38581656579)*0.5**o
-        ref[0,3,2,1]=(-0.388150366913)/(o+1.)+(0.557428570571)+(-0.225571343976)*0.5**o
-        ref[0,4,0,0]=(-0.623448360222)/(o+1.)+(0.64524557416)+(0.834083057621)*0.5**o
-        ref[0,4,0,1]=(-0.639580493935)/(o+1.)+(-0.380689110373)+(-0.613152578007)*0.5**o
-        ref[0,4,1,0]=(-0.575892151257)/(o+1.)+(-0.142294010946)+(-0.373668614153)*0.5**o
-        ref[0,4,1,1]=(-0.0316225271882)/(o+1.)+(-0.115844822465)+(0.00943802199128)*0.5**o
-        ref[0,4,2,0]=(-0.902549384411)/(o+1.)+(0.210416030442)+(0.157099024354)*0.5**o
-        ref[0,4,2,1]=(1.2254583864)/(o+1.)+(-0.371769146738)+(0.933762543076)*0.5**o
-        ref[1,0,0,0]=(0.0440432191149)/(o+1.)+(-0.303248360069)+(0.0417476479889)*0.5**o
-        ref[1,0,0,1]=(-0.196875527758)/(o+1.)+(-0.39869023332)+(0.450986977446)*0.5**o
-        ref[1,0,1,0]=(-0.742874955412)/(o+1.)+(-0.677197937069)+(-0.23712795738)*0.5**o
-        ref[1,0,1,1]=(0.385960155907)/(o+1.)+(0.0647632575546)+(-0.308721170682)*0.5**o
-        ref[1,0,2,0]=(1.11246238908)/(o+1.)+(0.0111904605859)+(-0.267232319593)*0.5**o
-        ref[1,0,2,1]=(0.0798238708014)/(o+1.)+(-0.355425426066)+(0.405254374432)*0.5**o
-        ref[1,1,0,0]=(0.133162474633)/(o+1.)+(-0.863343187001)+(-0.877224972777)*0.5**o
-        ref[1,1,0,1]=(1.23844759518)/(o+1.)+(0.871424091405)+(-0.873928172379)*0.5**o
-        ref[1,1,1,0]=(-0.0275104699246)/(o+1.)+(-0.739054056468)+(0.552826305913)*0.5**o
-        ref[1,1,1,1]=(0.948010887116)/(o+1.)+(-0.0503040657995)+(-0.71233607947)*0.5**o
-        ref[1,1,2,0]=(1.01678266341)/(o+1.)+(-0.425240837237)+(-0.411667274338)*0.5**o
-        ref[1,1,2,1]=(1.62045693811)/(o+1.)+(0.23057679995)+(0.533005373575)*0.5**o
-        ref[1,2,0,0]=(0.44625545933)/(o+1.)+(0.0233472080645)+(-0.637366803484)*0.5**o
-        ref[1,2,0,1]=(0.277223414052)/(o+1.)+(0.189254359042)+(-0.404870452835)*0.5**o
-        ref[1,2,1,0]=(0.880141841398)/(o+1.)+(-0.750127627837)+(0.85574176569)*0.5**o
-        ref[1,2,1,1]=(0.0718593507895)/(o+1.)+(0.306599537674)+(0.576825533647)*0.5**o
-        ref[1,2,2,0]=(0.35649607288)/(o+1.)+(0.242884247745)+(0.741411326194)*0.5**o
-        ref[1,2,2,1]=(1.14623459997)/(o+1.)+(-0.897591123484)+(0.386515069261)*0.5**o
-        ref[1,3,0,0]=(-0.796578230199)/(o+1.)+(0.200648623687)+(0.848952965744)*0.5**o
-        ref[1,3,0,1]=(0.679746997945)/(o+1.)+(-0.0297741837061)+(0.357870838328)*0.5**o
-        ref[1,3,1,0]=(0.0713725201916)/(o+1.)+(0.223521474626)+(-0.509333127149)*0.5**o
-        ref[1,3,1,1]=(-1.07672806067)/(o+1.)+(0.402304847309)+(-0.837885550386)*0.5**o
-        ref[1,3,2,0]=(0.808945160636)/(o+1.)+(0.525847284807)+(0.205889276236)*0.5**o
-        ref[1,3,2,1]=(0.440475889238)/(o+1.)+(0.353047235363)+(-0.331660060588)*0.5**o
-        ref[1,4,0,0]=(0.733653130588)/(o+1.)+(-0.113784463751)+(0.394201404247)*0.5**o
-        ref[1,4,0,1]=(0.892965597874)/(o+1.)+(0.359236861297)+(-0.346144268453)*0.5**o
-        ref[1,4,1,0]=(0.512178276429)/(o+1.)+(0.0722586978563)+(-0.907566140749)*0.5**o
-        ref[1,4,1,1]=(-1.21754003377)/(o+1.)+(0.369986403191)+(0.726194147182)*0.5**o
-        ref[1,4,2,0]=(0.353974376932)/(o+1.)+(0.291102967642)+(-0.940824546553)*0.5**o
-        ref[1,4,2,1]=(0.166197160477)/(o+1.)+(-0.358856317187)+(0.728499572603)*0.5**o
-        ref[2,0,0,0]=(1.55742864501)/(o+1.)+(0.38703652972)+(0.467025642879)*0.5**o
-        ref[2,0,0,1]=(-0.867288120579)/(o+1.)+(-0.995570381672)+(-0.211129222294)*0.5**o
-        ref[2,0,1,0]=(0.0896432549354)/(o+1.)+(-0.894461032367)+(-0.668065295797)*0.5**o
-        ref[2,0,1,1]=(-0.240985203598)/(o+1.)+(-0.407009494534)+(0.928751918298)*0.5**o
-        ref[2,0,2,0]=(0.815866062908)/(o+1.)+(-0.281559110938)+(-0.531818105049)*0.5**o
-        ref[2,0,2,1]=(0.0143868099026)/(o+1.)+(0.253341199154)+(0.0150988200159)*0.5**o
-        ref[2,1,0,0]=(0.745834270286)/(o+1.)+(-0.630128050767)+(-0.0829154151121)*0.5**o
-        ref[2,1,0,1]=(-0.513757920038)/(o+1.)+(-0.505622196077)+(-0.834502772339)*0.5**o
-        ref[2,1,1,0]=(1.38226406947)/(o+1.)+(-0.763221422703)+(0.247439924718)*0.5**o
-        ref[2,1,1,1]=(-0.408281199784)/(o+1.)+(-0.811328833758)+(-0.120169534728)*0.5**o
-        ref[2,1,2,0]=(-0.586214858819)/(o+1.)+(0.11721515075)+(0.703841647274)*0.5**o
-        ref[2,1,2,1]=(0.0812921429368)/(o+1.)+(-0.357151740094)+(-0.19760048131)*0.5**o
-        ref[2,2,0,0]=(1.65849097715)/(o+1.)+(-0.777022017999)+(-0.507872937196)*0.5**o
-        ref[2,2,0,1]=(0.242698257917)/(o+1.)+(1.08992054229)+(-0.481403986338)*0.5**o
-        ref[2,2,1,0]=(-0.754639453272)/(o+1.)+(0.81286785715)+(0.241675645258)*0.5**o
-        ref[2,2,1,1]=(-0.438727562295)/(o+1.)+(0.217076971211)+(0.114772627763)*0.5**o
-        ref[2,2,2,0]=(0.683917726753)/(o+1.)+(-0.781863136791)+(0.887023209688)*0.5**o
-        ref[2,2,2,1]=(1.19838469898)/(o+1.)+(0.729462151403)+(0.836731324893)*0.5**o
-        ref[2,3,0,0]=(1.28206834695)/(o+1.)+(0.583576731084)+(0.196161020545)*0.5**o
-        ref[2,3,0,1]=(0.395309853285)/(o+1.)+(0.573307319258)+(-0.862326385376)*0.5**o
-        ref[2,3,1,0]=(1.34760990633)/(o+1.)+(0.348652101929)+(0.571263839862)*0.5**o
-        ref[2,3,1,1]=(0.293682752388)/(o+1.)+(0.080258501461)+(0.272559456412)*0.5**o
-        ref[2,3,2,0]=(-1.47056068107)/(o+1.)+(-0.237909711446)+(0.3409363126)*0.5**o
-        ref[2,3,2,1]=(-0.356052894952)/(o+1.)+(-0.166196236302)+(0.949170673623)*0.5**o
-        ref[2,4,0,0]=(-0.21887693849)/(o+1.)+(0.365445238731)+(0.876774885889)*0.5**o
-        ref[2,4,0,1]=(0.824663735425)/(o+1.)+(-0.568245545547)+(0.347441329383)*0.5**o
-        ref[2,4,1,0]=(-1.22807417581)/(o+1.)+(-0.0380844812022)+(0.732123350436)*0.5**o
-        ref[2,4,1,1]=(0.45997712447)/(o+1.)+(0.181215330541)+(-0.128872747083)*0.5**o
-        ref[2,4,2,0]=(0.282057449847)/(o+1.)+(0.49247247384)+(0.619034818105)*0.5**o
-        ref[2,4,2,1]=(0.0852215499679)/(o+1.)+(0.0807247245641)+(0.645979236759)*0.5**o
-        ref[3,0,0,0]=(-0.173183992256)/(o+1.)+(0.215110333109)+(-0.265836015694)*0.5**o
-        ref[3,0,0,1]=(0.88174458564)/(o+1.)+(0.282289419133)+(0.306246512933)*0.5**o
-        ref[3,0,1,0]=(-0.542918101609)/(o+1.)+(0.791816447658)+(0.509420593773)*0.5**o
-        ref[3,0,1,1]=(0.585362427423)/(o+1.)+(-0.229639545331)+(-0.609626065482)*0.5**o
-        ref[3,0,2,0]=(-0.625654730672)/(o+1.)+(0.690821759706)+(0.269212290711)*0.5**o
-        ref[3,0,2,1]=(0.971993211744)/(o+1.)+(-1.18192725526)+(-0.445116541697)*0.5**o
-        ref[3,1,0,0]=(-1.04249026287)/(o+1.)+(0.0447480055334)+(0.25585673506)*0.5**o
-        ref[3,1,0,1]=(-1.30475672494)/(o+1.)+(0.700582633156)+(-0.159301665223)*0.5**o
-        ref[3,1,1,0]=(0.25661740363)/(o+1.)+(-0.036124371669)+(0.673375237931)*0.5**o
-        ref[3,1,1,1]=(1.24932735533)/(o+1.)+(-0.597633535843)+(0.273992606955)*0.5**o
-        ref[3,1,2,0]=(0.116260708817)/(o+1.)+(0.813874160367)+(-0.533129977534)*0.5**o
-        ref[3,1,2,1]=(1.30199813466)/(o+1.)+(0.377333042401)+(0.977824314677)*0.5**o
-        ref[3,2,0,0]=(1.03411019508)/(o+1.)+(0.386114811649)+(0.969349250234)*0.5**o
-        ref[3,2,0,1]=(0.114450341594)/(o+1.)+(0.288108255139)+(-0.673721580725)*0.5**o
-        ref[3,2,1,0]=(0.799847650292)/(o+1.)+(-0.0983585840958)+(-0.432873699676)*0.5**o
-        ref[3,2,1,1]=(-1.18814224634)/(o+1.)+(-0.696858644421)+(0.633726614581)*0.5**o
-        ref[3,2,2,0]=(0.626385522485)/(o+1.)+(0.0881472172038)+(-0.182700878265)*0.5**o
-        ref[3,2,2,1]=(0.27320795045)/(o+1.)+(0.0047710521094)+(0.999790796581)*0.5**o
-        ref[3,3,0,0]=(0.0826963327674)/(o+1.)+(-0.666702246557)+(-0.959143897162)*0.5**o
-        ref[3,3,0,1]=(0.320563187816)/(o+1.)+(0.774809717833)+(0.385513188376)*0.5**o
-        ref[3,3,1,0]=(-1.80695590229)/(o+1.)+(0.214248941855)+(0.809269330969)*0.5**o
-        ref[3,3,1,1]=(-0.146050130242)/(o+1.)+(-0.625770524147)+(-0.983474390608)*0.5**o
-        ref[3,3,2,0]=(0.956779785308)/(o+1.)+(0.138176772609)+(0.710820041642)*0.5**o
-        ref[3,3,2,1]=(-1.39320588501)/(o+1.)+(0.571745087644)+(0.633364771689)*0.5**o
-        ref[3,4,0,0]=(0.828689828045)/(o+1.)+(-0.821398677259)+(0.44039719913)*0.5**o
-        ref[3,4,0,1]=(1.50194037834)/(o+1.)+(-0.535574620947)+(0.253149910502)*0.5**o
-        ref[3,4,1,0]=(-0.708775097383)/(o+1.)+(-0.337919894074)+(0.13027869782)*0.5**o
-        ref[3,4,1,1]=(1.17387882267)/(o+1.)+(0.234301154085)+(0.476554240918)*0.5**o
-        ref[3,4,2,0]=(0.891111463851)/(o+1.)+(0.221627765254)+(0.800058524963)*0.5**o
-        ref[3,4,2,1]=(-0.0533896507631)/(o+1.)+(0.551652029667)+(-0.533834741079)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      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.570707549273)*x[0]+(-0.726264032186)*x[1]
-        ref=(-0.0423765208873)/(o+1.)+(-0.791542656673)+(0.328490252775)*0.5**o
-      else:
-        arg=(1.28222892931)*x[0]+(-0.798170675576)*x[1]+(1.5701208405)*x[2]
-        ref=(0.721975372868)/(o+1.)+(0.344720905832)+(0.642761909705)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      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.575166906798)*x[0]+(-1.63698773418)*x[1]
-        arg[1]=(-0.0535946584636)*x[0]+(0.105969101775)*x[1]
-        ref[0]=(-0.751926426344)/(o+1.)+(-0.395800138888)+(0.481705876734)*0.5**o
-        ref[1]=(0.698496252242)/(o+1.)+(-0.265927161866)+(-0.114267485199)*0.5**o
-      else:
-        arg[0]=(-0.17879254138)*x[0]+(-1.12752123792)*x[1]+(0.921297311605)*x[2]
-        arg[1]=(1.33131824618)*x[0]+(-0.392175059176)*x[1]+(0.545754281465)*x[2]
-        ref[0]=(-0.494870303061)/(o+1.)+(0.0697636237654)+(-0.0296734121631)*0.5**o
-        ref[1]=(-0.394300983704)/(o+1.)+(0.722261312754)+(0.434675826665)*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.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.338658191734)*x[0]+(1.46127609683)*x[1]
-        arg[0,1]=(-0.629116867491)*x[0]+(1.40141569066)*x[1]
-        arg[0,2]=(0.105569779347)*x[0]+(0.239936324967)*x[1]
-        arg[0,3]=(-0.281718331718)*x[0]+(0.280323404866)*x[1]
-        arg[0,4]=(0.467341113661)*x[0]+(-0.50452062075)*x[1]
-        arg[1,0]=(-0.841295219186)*x[0]+(0.524038163723)*x[1]
-        arg[1,1]=(1.40143704236)*x[0]+(-1.50467961637)*x[1]
-        arg[1,2]=(1.21078790505)*x[0]+(-0.731453470292)*x[1]
-        arg[1,3]=(0.469556922076)*x[0]+(0.0686293204391)*x[1]
-        arg[1,4]=(-1.26394637585)*x[0]+(-0.0361395276585)*x[1]
-        arg[2,0]=(-1.12850883148)*x[0]+(0.284296673326)*x[1]
-        arg[2,1]=(-0.626362828813)*x[0]+(1.19459827573)*x[1]
-        arg[2,2]=(-0.545457293083)*x[0]+(1.547337019)*x[1]
-        arg[2,3]=(0.664461986629)*x[0]+(-1.69082198266)*x[1]
-        arg[2,4]=(-0.100004763305)*x[0]+(0.152159044423)*x[1]
-        arg[3,0]=(0.307574843061)*x[0]+(1.20209181301)*x[1]
-        arg[3,1]=(-0.0663203356627)*x[0]+(-1.26669863527)*x[1]
-        arg[3,2]=(-1.20436798894)*x[0]+(-0.0375693379661)*x[1]
-        arg[3,3]=(0.753649087747)*x[0]+(0.69376223486)*x[1]
-        arg[3,4]=(-0.0512732264834)*x[0]+(-0.658097606436)*x[1]
-        ref[0,0]=(0.996821439952)/(o+1.)+(0.015088160779)+(0.0956201435879)*0.5**o
-        ref[0,1]=(0.643092963726)/(o+1.)+(0.239390724844)+(-0.349575590244)*0.5**o
-        ref[0,2]=(-0.198468008977)/(o+1.)+(0.00411201743342)+(0.535750078425)*0.5**o
-        ref[0,3]=(0.642491201137)/(o+1.)+(-0.623413199652)+(0.602940271315)*0.5**o
-        ref[0,4]=(-0.105706120549)/(o+1.)+(-0.353560054939)+(0.775646723338)*0.5**o
-        ref[1,0]=(0.144540669221)/(o+1.)+(0.0228268215803)+(-0.507451367845)*0.5**o
-        ref[1,1]=(-0.820379339897)/(o+1.)+(0.0951825678509)+(0.526771630185)*0.5**o
-        ref[1,2]=(-0.21214585824)/(o+1.)+(-0.0889183062985)+(0.869316905591)*0.5**o
-        ref[1,3]=(0.291228940674)/(o+1.)+(0.192623928703)+(-0.138290555565)*0.5**o
-        ref[1,4]=(-0.0663718956434)/(o+1.)+(-0.309484335614)+(-0.614745336642)*0.5**o
-        ref[2,0]=(0.484892962201)/(o+1.)+(-0.367129859793)+(-0.594845400763)*0.5**o
-        ref[2,1]=(0.768457634672)/(o+1.)+(0.154447657562)+(-0.509117502876)*0.5**o
-        ref[2,2]=(0.707320338363)/(o+1.)+(-0.0592149232183)+(0.412989233992)*0.5**o
-        ref[2,3]=(-0.983684339171)/(o+1.)+(-0.495377645598)+(0.948079634337)*0.5**o
-        ref[2,4]=(-0.0315947220465)/(o+1.)+(0.506833986759)+(-0.929918970353)*0.5**o
-        ref[3,0]=(0.54141067098)/(o+1.)+(0.489049131493)+(-0.00984227789859)*0.5**o
-        ref[3,1]=(-0.552335053051)/(o+1.)+(-0.383325638803)+(-0.0140326402734)*0.5**o
-        ref[3,2]=(0.0821472412575)/(o+1.)+(-0.335827719718)+(-0.652429128733)*0.5**o
-        ref[3,3]=(0.112917208924)/(o+1.)+(0.667772807338)+(-0.00105150099312)*0.5**o
-        ref[3,4]=(-0.19331508157)/(o+1.)+(-0.102296385708)+(-0.311462979932)*0.5**o
-      else:
-        arg[0,0]=(0.069245963142)*x[0]+(-0.185727379494)*x[1]+(-0.887410889699)*x[2]
-        arg[0,1]=(-0.816745668949)*x[0]+(-0.250435680662)*x[1]+(0.701607830582)*x[2]
-        arg[0,2]=(-0.862433954308)*x[0]+(0.731874372527)*x[1]+(-0.115384982779)*x[2]
-        arg[0,3]=(-0.265247631604)*x[0]+(-0.157059741958)*x[1]+(-0.368419335078)*x[2]
-        arg[0,4]=(1.66720203567)*x[0]+(-0.759393708719)*x[1]+(1.36360850704)*x[2]
-        arg[1,0]=(-0.192822813795)*x[0]+(0.0358776152527)*x[1]+(-0.722864520788)*x[2]
-        arg[1,1]=(-0.480606215471)*x[0]+(1.13682774573)*x[1]+(0.17900467623)*x[2]
-        arg[1,2]=(0.346760852584)*x[0]+(0.994833030281)*x[1]+(0.507055933913)*x[2]
-        arg[1,3]=(-0.509961853478)*x[0]+(-0.852997575505)*x[1]+(0.586527030253)*x[2]
-        arg[1,4]=(0.93957975846)*x[0]+(0.28878335152)*x[1]+(0.128070931738)*x[2]
-        arg[2,0]=(0.338283306313)*x[0]+(0.0244500761608)*x[1]+(-0.606875554888)*x[2]
-        arg[2,1]=(0.850782624552)*x[0]+(-0.836382038189)*x[1]+(-1.41808459947)*x[2]
-        arg[2,2]=(-1.06176229613)*x[0]+(-0.259247046061)*x[1]+(-0.583455484089)*x[2]
-        arg[2,3]=(1.17437923282)*x[0]+(1.31485601495)*x[1]+(1.3139743231)*x[2]
-        arg[2,4]=(0.362851636275)*x[0]+(0.804049783156)*x[1]+(1.09205000214)*x[2]
-        arg[3,0]=(0.343603837195)*x[0]+(-1.49082257981)*x[1]+(-0.628668674545)*x[2]
-        arg[3,1]=(-0.676847711765)*x[0]+(1.32350560453)*x[1]+(1.07275185686)*x[2]
-        arg[3,2]=(0.570784985469)*x[0]+(-1.01212360602)*x[1]+(-0.0808776667606)*x[2]
-        arg[3,3]=(0.506392444236)*x[0]+(-1.00848318041)*x[1]+(0.558777901541)*x[2]
-        arg[3,4]=(-0.60925738291)*x[0]+(-0.386755957809)*x[1]+(0.60930115434)*x[2]
-        ref[0,0]=(-0.695230136419)/(o+1.)+(-0.388400729083)+(0.468139288533)*0.5**o
-        ref[0,1]=(0.462098132187)/(o+1.)+(-0.215041893287)+(-0.397587864642)*0.5**o
-        ref[0,2]=(-0.262411385363)/(o+1.)+(0.275729226874)+(-0.534991632946)*0.5**o
-        ref[0,3]=(0.117822633378)/(o+1.)+(0.0286827897592)+(-0.965914921536)*0.5**o
-        ref[0,4]=(0.293575681039)/(o+1.)+(0.584039692827)+(0.809761767299)*0.5**o
-        ref[1,0]=(0.627951922463)/(o+1.)+(-0.994889162557)+(0.482016683321)*0.5**o
-        ref[1,1]=(1.83482238662)/(o+1.)+(-0.205719558739)+(-0.588157062647)*0.5**o
-        ref[1,2]=(1.13612020398)/(o+1.)+(0.0262824938134)+(0.659964625174)*0.5**o
-        ref[1,3]=(0.325264487741)/(o+1.)+(-0.0752154813413)+(-0.951265923787)*0.5**o
-        ref[1,4]=(-0.149919283302)/(o+1.)+(0.77701502585)+(-0.0476767266789)*0.5**o
-        ref[2,0]=(0.491504686171)/(o+1.)+(-0.562534706926)+(0.389422555265)*0.5**o
-        ref[2,1]=(-1.52704217417)/(o+1.)+(0.120525042098)+(-0.117691923134)*0.5**o
-        ref[2,2]=(-0.779796772543)/(o+1.)+(-0.318864997267)+(-0.486938059201)*0.5**o
-        ref[2,3]=(1.53343318682)/(o+1.)+(0.731149467308)+(0.807477449443)*0.5**o
-        ref[2,4]=(1.15919207694)/(o+1.)+(0.113921448815)+(0.871916446996)*0.5**o
-        ref[3,0]=(-1.75312920944)/(o+1.)+(-0.153798982308)+(0.284839756895)*0.5**o
-        ref[3,1]=(1.30985814569)/(o+1.)+(0.438430874237)+(-0.467310144534)*0.5**o
-        ref[3,2]=(-0.737480320972)/(o+1.)+(0.0604403094397)+(0.094383414777)*0.5**o
-        ref[3,3]=(-0.688723266524)/(o+1.)+(0.43486027018)+(-0.124310108473)*0.5**o
-        ref[3,4]=(0.128399262674)/(o+1.)+(-0.372445844122)+(0.229780239192)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.993339371954)*x[0]+(-1.35308128985)*x[1]
-        arg[0,0,1]=(-1.07886149134)*x[0]+(-1.38999283206)*x[1]
-        arg[0,1,0]=(0.246468026972)*x[0]+(-1.37217464882)*x[1]
-        arg[0,1,1]=(0.645672648599)*x[0]+(1.8070624103)*x[1]
-        arg[1,0,0]=(-1.02278989388)*x[0]+(0.151634023103)*x[1]
-        arg[1,0,1]=(-0.667332860541)*x[0]+(0.312742149193)*x[1]
-        arg[1,1,0]=(-0.848647385832)*x[0]+(0.466438038516)*x[1]
-        arg[1,1,1]=(-0.185495911372)*x[0]+(-0.137118786891)*x[1]
-        arg[2,0,0]=(-0.0250555870731)*x[0]+(0.905553573283)*x[1]
-        arg[2,0,1]=(-1.03940852939)*x[0]+(-1.57326016394)*x[1]
-        arg[2,1,0]=(1.48834718811)*x[0]+(-0.340889253246)*x[1]
-        arg[2,1,1]=(0.875721514739)*x[0]+(-0.310857412212)*x[1]
-        arg[3,0,0]=(1.25129508831)*x[0]+(-1.69312043525)*x[1]
-        arg[3,0,1]=(1.50124675312)*x[0]+(0.244195748654)*x[1]
-        arg[3,1,0]=(0.292060478909)*x[0]+(-0.660005422696)*x[1]
-        arg[3,1,1]=(0.791335231308)*x[0]+(0.466481573591)*x[1]
-        arg[4,0,0]=(-0.361241947236)*x[0]+(-1.43591648587)*x[1]
-        arg[4,0,1]=(-1.10385456695)*x[0]+(-0.325314195825)*x[1]
-        arg[4,1,0]=(1.01004173033)*x[0]+(0.426824552857)*x[1]
-        arg[4,1,1]=(-0.631382479612)*x[0]+(0.0603792190966)*x[1]
-        arg[5,0,0]=(-0.30404368786)*x[0]+(-0.0102498522932)*x[1]
-        arg[5,0,1]=(0.109188848746)*x[0]+(-1.16846160105)*x[1]
-        arg[5,1,0]=(-0.351916879547)*x[0]+(-0.320714795448)*x[1]
-        arg[5,1,1]=(-0.534138562652)*x[0]+(-0.256013589844)*x[1]
-        ref[0,0,0]=(-0.506159375456)/(o+1.)+(-0.522895228783)+(-0.794470828783)*0.5**o
-        ref[0,0,1]=(-0.930984367068)/(o+1.)+(-0.636851258685)+(-0.264167438968)*0.5**o
-        ref[0,1,0]=(-0.674222792172)/(o+1.)+(-0.52131379048)+(0.591143751282)*0.5**o
-        ref[0,1,1]=(0.953370751283)/(o+1.)+(0.377773224645)+(0.743817858326)*0.5**o
-        ref[1,0,0]=(0.700508215428)/(o+1.)+(-0.303343530867)+(-0.964977024471)*0.5**o
-        ref[1,0,1]=(-0.408185116452)/(o+1.)+(0.0668983569743)+(-0.0802023088445)*0.5**o
-        ref[1,1,0]=(0.80742345527)/(o+1.)+(-0.405780705683)+(-0.37807139122)*0.5**o
-        ref[1,1,1]=(0.0184615568095)/(o+1.)+(0.221921562266)+(-0.784919379605)*0.5**o
-        ref[2,0,0]=(0.571906256883)/(o+1.)+(-0.0415588382133)+(0.391709405753)*0.5**o
-        ref[2,0,1]=(-0.778176009451)/(o+1.)+(-0.761680990566)+(-0.311130702752)*0.5**o
-        ref[2,1,0]=(0.498214686321)/(o+1.)+(-0.146173705483)+(0.941590659509)*0.5**o
-        ref[2,1,1]=(-0.273747071818)/(o+1.)+(-0.0319184747153)+(0.902448123776)*0.5**o
-        ref[3,0,0]=(-0.730029471178)/(o+1.)+(-0.288672747933)+(0.865549620109)*0.5**o
-        ref[3,0,1]=(-0.371409186475)/(o+1.)+(0.623169375401)+(0.870512937445)*0.5**o
-        ref[3,1,0]=(0.0611454391867)/(o+1.)+(-0.627723874214)+(0.826357365454)*0.5**o
-        ref[3,1,1]=(0.785553447935)/(o+1.)+(0.246940213405)+(-0.021617069845)*0.5**o
-        ref[4,0,0]=(-0.936201955907)/(o+1.)+(-0.484823720021)+(0.108690962842)*0.5**o
-        ref[4,0,1]=(-0.277830390815)/(o+1.)+(-0.151786547071)+(-0.847765277819)*0.5**o
-        ref[4,1,0]=(0.12293099533)/(o+1.)+(0.295620382054)+(0.722694523749)*0.5**o
-        ref[4,1,1]=(-0.5517019185)/(o+1.)+(0.0850748937088)+(-0.189451129433)*0.5**o
-        ref[5,0,0]=(-0.942533148805)/(o+1.)+(0.425680504872)+(-0.223121401092)*0.5**o
-        ref[5,0,1]=(-0.377134228332)/(o+1.)+(-0.721019409569)+(0.759900295162)*0.5**o
-        ref[5,1,0]=(-0.643828391942)/(o+1.)+(0.399974456311)+(-0.828752195674)*0.5**o
-        ref[5,1,1]=(-0.118293731439)/(o+1.)+(-0.355568544431)+(0.0392786678054)*0.5**o
-      else:
-        arg[0,0,0]=(0.205446621454)*x[0]+(0.10254878667)*x[1]+(1.27673728979)*x[2]
-        arg[0,0,1]=(0.758846313193)*x[0]+(0.63320336713)*x[1]+(-0.42638505807)*x[2]
-        arg[0,1,0]=(-0.0127116561603)*x[0]+(-0.360359420027)*x[1]+(0.540508591493)*x[2]
-        arg[0,1,1]=(-0.278918629538)*x[0]+(-0.0291534835772)*x[1]+(0.708655731565)*x[2]
-        arg[1,0,0]=(-0.612965210483)*x[0]+(0.787787556912)*x[1]+(0.222384448462)*x[2]
-        arg[1,0,1]=(1.07409083742)*x[0]+(1.19429173706)*x[1]+(-0.484979976779)*x[2]
-        arg[1,1,0]=(-1.25714999157)*x[0]+(-0.321346019622)*x[1]+(0.278329320837)*x[2]
-        arg[1,1,1]=(-0.512262689707)*x[0]+(1.6891992053)*x[1]+(-1.02351830068)*x[2]
-        arg[2,0,0]=(-1.57911907773)*x[0]+(0.096124258122)*x[1]+(0.336619253521)*x[2]
-        arg[2,0,1]=(0.0901144254199)*x[0]+(-1.36818186255)*x[1]+(1.2969609239)*x[2]
-        arg[2,1,0]=(0.158329511499)*x[0]+(0.696997185217)*x[1]+(-0.400535235927)*x[2]
-        arg[2,1,1]=(-1.44570853201)*x[0]+(0.237359587195)*x[1]+(-1.17323024801)*x[2]
-        arg[3,0,0]=(-1.4325812824)*x[0]+(-0.733085265902)*x[1]+(0.125883186484)*x[2]
-        arg[3,0,1]=(-0.0529889021435)*x[0]+(0.335154600942)*x[1]+(0.839337375209)*x[2]
-        arg[3,1,0]=(-0.423552182963)*x[0]+(1.31813289315)*x[1]+(0.13235854915)*x[2]
-        arg[3,1,1]=(0.53278572217)*x[0]+(0.159434073071)*x[1]+(-0.313621199136)*x[2]
-        arg[4,0,0]=(0.747779887673)*x[0]+(0.30977483911)*x[1]+(-0.0760295896739)*x[2]
-        arg[4,0,1]=(0.00295118909194)*x[0]+(-0.687914867842)*x[1]+(0.0386268422915)*x[2]
-        arg[4,1,0]=(-0.276363532754)*x[0]+(0.52102466785)*x[1]+(-0.684840191917)*x[2]
-        arg[4,1,1]=(0.0283138898538)*x[0]+(0.116042458294)*x[1]+(0.485578401528)*x[2]
-        arg[5,0,0]=(-0.118402060192)*x[0]+(-1.18409809944)*x[1]+(-0.304048852342)*x[2]
-        arg[5,0,1]=(0.174393790186)*x[0]+(-0.524912689263)*x[1]+(-0.648708392355)*x[2]
-        arg[5,1,0]=(-0.254958756344)*x[0]+(-0.772071348728)*x[1]+(-0.0572494064027)*x[2]
-        arg[5,1,1]=(-0.74777072018)*x[0]+(0.19109939364)*x[1]+(0.498973987814)*x[2]
-        ref[0,0,0]=(0.986457444152)/(o+1.)+(0.258994989412)+(0.0802852749346)*0.5**o
-        ref[0,0,1]=(-0.0286717143415)/(o+1.)+(0.554867138611)+(-0.115397940627)*0.5**o
-        ref[0,1,0]=(-0.886482131138)/(o+1.)+(0.464293129749)+(0.125333386946)*0.5**o
-        ref[0,1,1]=(0.199214164457)/(o+1.)+(0.336882900218)+(-0.472396346443)*0.5**o
-        ref[1,0,0]=(0.36021680954)/(o+1.)+(0.408903924703)+(-0.780817864055)*0.5**o
-        ref[1,0,1]=(0.44795581074)/(o+1.)+(0.472159267742)+(0.391128251477)*0.5**o
-        ref[1,1,0]=(1.02665734893)/(o+1.)+(-0.71418625728)+(-0.898451524719)*0.5**o
-        ref[1,1,1]=(0.0322676607777)/(o+1.)+(0.105378958385)+(-0.0896073626306)*0.5**o
-        ref[2,0,0]=(1.15723247637)/(o+1.)+(-0.719604538702)+(-0.86439896505)*0.5**o
-        ref[2,0,1]=(-0.254100181576)/(o+1.)+(-0.0387997401585)+(0.35059314866)*0.5**o
-        ref[2,1,0]=(-0.636439167982)/(o+1.)+(0.563390681981)+(-0.0355507351918)*0.5**o
-        ref[2,1,1]=(-0.265265225142)/(o+1.)+(-0.635620798949)+(-0.845072369786)*0.5**o
-        ref[3,0,0]=(-0.062162800164)/(o+1.)+(-0.554499928282)+(-0.868620705087)*0.5**o
-        ref[3,0,1]=(0.784681961813)/(o+1.)+(0.355202655131)+(-0.373584198067)*0.5**o
-        ref[3,1,0]=(1.20272043429)/(o+1.)+(0.352677694103)+(-0.881136563162)*0.5**o
-        ref[3,1,1]=(-0.311152797156)/(o+1.)+(0.313736563953)+(0.0622782653549)*0.5**o
-        ref[4,0,0]=(-0.365517620238)/(o+1.)+(0.733502174253)+(-0.119961591158)*0.5**o
-        ref[4,0,1]=(0.0155845896619)/(o+1.)+(-0.654963543839)+(0.648005661558)*0.5**o
-        ref[4,1,0]=(0.405697975915)/(o+1.)+(-0.637805133954)+(0.429733235172)*0.5**o
-        ref[4,1,1]=(-0.0469738326054)/(o+1.)+(0.0590721074184)+(0.558764367445)*0.5**o
-        ref[5,0,0]=(-0.333825007954)/(o+1.)+(-0.46448520882)+(-0.343753586377)*0.5**o
-        ref[5,0,1]=(-0.469125954795)/(o+1.)+(-0.147192309255)+(-0.235716718127)*0.5**o
-        ref[5,1,0]=(-0.573275891777)/(o+1.)+(-0.478328163121)+(0.445652706545)*0.5**o
-        ref[5,1,1]=(0.0545515234726)/(o+1.)+(-0.153919681346)+(0.195590500493)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.226142137728)*x[0]+(0.85681895183)*x[1]
-        arg[0,0,0,1]=(-0.824407181762)*x[0]+(-0.290023144892)*x[1]
-        arg[0,0,1,0]=(-1.25987816017)*x[0]+(0.824340990595)*x[1]
-        arg[0,0,1,1]=(-0.0917811606765)*x[0]+(0.660211932964)*x[1]
-        arg[0,0,2,0]=(-1.31073149178)*x[0]+(0.482324984918)*x[1]
-        arg[0,0,2,1]=(0.256995458227)*x[0]+(0.79244254852)*x[1]
-        arg[0,1,0,0]=(-0.0682147475407)*x[0]+(0.243620052061)*x[1]
-        arg[0,1,0,1]=(0.071099982687)*x[0]+(-0.62986754897)*x[1]
-        arg[0,1,1,0]=(-0.0716793733131)*x[0]+(-1.15235525814)*x[1]
-        arg[0,1,1,1]=(0.193107575216)*x[0]+(-0.596149957543)*x[1]
-        arg[0,1,2,0]=(-0.160142629886)*x[0]+(1.36581707067)*x[1]
-        arg[0,1,2,1]=(-1.21477648376)*x[0]+(-0.732000298369)*x[1]
-        arg[0,2,0,0]=(-1.02468971059)*x[0]+(0.330721595217)*x[1]
-        arg[0,2,0,1]=(1.11414907391)*x[0]+(1.29386127812)*x[1]
-        arg[0,2,1,0]=(1.1485850154)*x[0]+(0.387585977495)*x[1]
-        arg[0,2,1,1]=(0.237382583072)*x[0]+(1.56248221279)*x[1]
-        arg[0,2,2,0]=(-0.949129049229)*x[0]+(0.578823379063)*x[1]
-        arg[0,2,2,1]=(-1.0667182537)*x[0]+(0.462227485959)*x[1]
-        arg[0,3,0,0]=(1.37954377554)*x[0]+(0.541856880139)*x[1]
-        arg[0,3,0,1]=(0.401584700319)*x[0]+(0.577102327147)*x[1]
-        arg[0,3,1,0]=(-0.289796408108)*x[0]+(0.807853785325)*x[1]
-        arg[0,3,1,1]=(0.0038467861822)*x[0]+(-0.931311510771)*x[1]
-        arg[0,3,2,0]=(0.859036254821)*x[0]+(0.198884218516)*x[1]
-        arg[0,3,2,1]=(-0.00310256070968)*x[0]+(0.511838475968)*x[1]
-        arg[0,4,0,0]=(0.539686886802)*x[0]+(-0.324612924267)*x[1]
-        arg[0,4,0,1]=(-0.0458655898565)*x[0]+(0.211810380966)*x[1]
-        arg[0,4,1,0]=(0.302333533003)*x[0]+(0.0663033316831)*x[1]
-        arg[0,4,1,1]=(-0.981519161639)*x[0]+(-0.00207756909914)*x[1]
-        arg[0,4,2,0]=(0.283659447004)*x[0]+(-0.231526592979)*x[1]
-        arg[0,4,2,1]=(-1.17679167875)*x[0]+(0.285698985756)*x[1]
-        arg[1,0,0,0]=(-0.162900059582)*x[0]+(-0.877164340783)*x[1]
-        arg[1,0,0,1]=(-0.50468605065)*x[0]+(-0.160440073709)*x[1]
-        arg[1,0,1,0]=(-0.100901676644)*x[0]+(-0.296111526029)*x[1]
-        arg[1,0,1,1]=(0.176107421869)*x[0]+(1.74393708745)*x[1]
-        arg[1,0,2,0]=(-0.979807721703)*x[0]+(-0.229400841067)*x[1]
-        arg[1,0,2,1]=(0.217472795645)*x[0]+(0.0881503243323)*x[1]
-        arg[1,1,0,0]=(-0.127980123625)*x[0]+(0.0932095456541)*x[1]
-        arg[1,1,0,1]=(0.829674410931)*x[0]+(-0.796196041601)*x[1]
-        arg[1,1,1,0]=(1.28656110233)*x[0]+(-1.27850471392)*x[1]
-        arg[1,1,1,1]=(1.159269884)*x[0]+(-0.973135433631)*x[1]
-        arg[1,1,2,0]=(1.46274837856)*x[0]+(-1.81554270863)*x[1]
-        arg[1,1,2,1]=(0.0973472511688)*x[0]+(0.551451261495)*x[1]
-        arg[1,2,0,0]=(0.510667671293)*x[0]+(-0.51075982099)*x[1]
-        arg[1,2,0,1]=(-1.41612093451)*x[0]+(0.614417669629)*x[1]
-        arg[1,2,1,0]=(1.46595125796)*x[0]+(0.60374279122)*x[1]
-        arg[1,2,1,1]=(-0.317185218187)*x[0]+(-0.0785532882696)*x[1]
-        arg[1,2,2,0]=(-0.388504041993)*x[0]+(-0.838003398775)*x[1]
-        arg[1,2,2,1]=(0.0497207129012)*x[0]+(-0.622155692247)*x[1]
-        arg[1,3,0,0]=(-0.0471400179563)*x[0]+(1.3378948207)*x[1]
-        arg[1,3,0,1]=(-1.22250822195)*x[0]+(0.629714783138)*x[1]
-        arg[1,3,1,0]=(-1.28801080408)*x[0]+(-1.54079710038)*x[1]
-        arg[1,3,1,1]=(-0.426412448469)*x[0]+(-1.09410474021)*x[1]
-        arg[1,3,2,0]=(0.022834167351)*x[0]+(-0.497423389788)*x[1]
-        arg[1,3,2,1]=(-0.787492124301)*x[0]+(-0.245621168419)*x[1]
-        arg[1,4,0,0]=(-1.37814880919)*x[0]+(-0.704805848451)*x[1]
-        arg[1,4,0,1]=(-1.12494770055)*x[0]+(1.44920024305)*x[1]
-        arg[1,4,1,0]=(-0.809532572761)*x[0]+(1.16638587657)*x[1]
-        arg[1,4,1,1]=(0.931784486816)*x[0]+(1.34629889453)*x[1]
-        arg[1,4,2,0]=(-0.172430942793)*x[0]+(-0.584736998321)*x[1]
-        arg[1,4,2,1]=(0.00542948736389)*x[0]+(0.43917597284)*x[1]
-        arg[2,0,0,0]=(-0.946122337406)*x[0]+(-0.161940168137)*x[1]
-        arg[2,0,0,1]=(-0.7856653779)*x[0]+(-0.75287701788)*x[1]
-        arg[2,0,1,0]=(-1.08858367592)*x[0]+(-0.530380818694)*x[1]
-        arg[2,0,1,1]=(-1.0573555095)*x[0]+(-0.854148765785)*x[1]
-        arg[2,0,2,0]=(0.723412825328)*x[0]+(0.326761950437)*x[1]
-        arg[2,0,2,1]=(-0.0143142161225)*x[0]+(-0.752724311876)*x[1]
-        arg[2,1,0,0]=(-0.942548092355)*x[0]+(0.700861094897)*x[1]
-        arg[2,1,0,1]=(-0.712286567957)*x[0]+(0.230406545738)*x[1]
-        arg[2,1,1,0]=(1.27414839774)*x[0]+(0.724784649037)*x[1]
-        arg[2,1,1,1]=(0.637494163002)*x[0]+(0.442489599192)*x[1]
-        arg[2,1,2,0]=(1.81617631726)*x[0]+(1.56870218809)*x[1]
-        arg[2,1,2,1]=(1.16419900666)*x[0]+(-0.044314729141)*x[1]
-        arg[2,2,0,0]=(0.880267125196)*x[0]+(0.77124406259)*x[1]
-        arg[2,2,0,1]=(0.482402867542)*x[0]+(0.0746924305017)*x[1]
-        arg[2,2,1,0]=(0.105861259696)*x[0]+(0.484292207267)*x[1]
-        arg[2,2,1,1]=(-0.107785838196)*x[0]+(0.701132243209)*x[1]
-        arg[2,2,2,0]=(0.559717405844)*x[0]+(-1.5585942717)*x[1]
-        arg[2,2,2,1]=(-0.989130712605)*x[0]+(0.221361137556)*x[1]
-        arg[2,3,0,0]=(-0.045471818095)*x[0]+(-0.437941959792)*x[1]
-        arg[2,3,0,1]=(1.25840468379)*x[0]+(-1.18872011057)*x[1]
-        arg[2,3,1,0]=(1.70665829408)*x[0]+(0.705273921003)*x[1]
-        arg[2,3,1,1]=(-0.0928709253845)*x[0]+(0.785115449756)*x[1]
-        arg[2,3,2,0]=(-0.887243418838)*x[0]+(1.06790660642)*x[1]
-        arg[2,3,2,1]=(-0.572644686872)*x[0]+(-0.672831948394)*x[1]
-        arg[2,4,0,0]=(1.28282566801)*x[0]+(0.651985199447)*x[1]
-        arg[2,4,0,1]=(0.0965663229335)*x[0]+(1.33819998052)*x[1]
-        arg[2,4,1,0]=(0.205569041098)*x[0]+(-0.873095358733)*x[1]
-        arg[2,4,1,1]=(-1.04452025745)*x[0]+(-0.204917033907)*x[1]
-        arg[2,4,2,0]=(-0.181163938972)*x[0]+(0.0341993409272)*x[1]
-        arg[2,4,2,1]=(1.68327027059)*x[0]+(-0.289436355642)*x[1]
-        arg[3,0,0,0]=(1.05712810731)*x[0]+(0.915711819735)*x[1]
-        arg[3,0,0,1]=(-0.171072039482)*x[0]+(-0.160656943623)*x[1]
-        arg[3,0,1,0]=(-1.27063799869)*x[0]+(-0.605131642813)*x[1]
-        arg[3,0,1,1]=(0.940512990835)*x[0]+(-0.116675577531)*x[1]
-        arg[3,0,2,0]=(-0.194213869952)*x[0]+(0.364066752025)*x[1]
-        arg[3,0,2,1]=(-0.328780465397)*x[0]+(-0.114689413673)*x[1]
-        arg[3,1,0,0]=(-0.825914305895)*x[0]+(-0.167010056731)*x[1]
-        arg[3,1,0,1]=(0.657779056207)*x[0]+(0.0666252451638)*x[1]
-        arg[3,1,1,0]=(-0.464004426036)*x[0]+(-0.340932918409)*x[1]
-        arg[3,1,1,1]=(-1.6698652667)*x[0]+(0.731870373141)*x[1]
-        arg[3,1,2,0]=(1.39626250779)*x[0]+(-0.879152855557)*x[1]
-        arg[3,1,2,1]=(1.34973919508)*x[0]+(-0.129753332761)*x[1]
-        arg[3,2,0,0]=(1.03443450706)*x[0]+(0.807333477811)*x[1]
-        arg[3,2,0,1]=(0.366011302596)*x[0]+(0.543804800926)*x[1]
-        arg[3,2,1,0]=(0.262446846036)*x[0]+(-0.247786850991)*x[1]
-        arg[3,2,1,1]=(-1.04657091196)*x[0]+(-0.485443426155)*x[1]
-        arg[3,2,2,0]=(0.342434327538)*x[0]+(-0.148503585588)*x[1]
-        arg[3,2,2,1]=(-0.189833429716)*x[0]+(0.424391874819)*x[1]
-        arg[3,3,0,0]=(-0.118348838118)*x[0]+(0.397628264341)*x[1]
-        arg[3,3,0,1]=(0.481440510084)*x[0]+(-0.393576221424)*x[1]
-        arg[3,3,1,0]=(0.907533552208)*x[0]+(-0.668646549376)*x[1]
-        arg[3,3,1,1]=(-1.49731714213)*x[0]+(-1.18710678264)*x[1]
-        arg[3,3,2,0]=(-0.460660079207)*x[0]+(1.48078266444)*x[1]
-        arg[3,3,2,1]=(-0.161073556988)*x[0]+(-0.486827042754)*x[1]
-        arg[3,4,0,0]=(-0.668755455623)*x[0]+(0.345804059434)*x[1]
-        arg[3,4,0,1]=(1.00528889193)*x[0]+(0.978507928191)*x[1]
-        arg[3,4,1,0]=(0.98955856331)*x[0]+(1.0421852144)*x[1]
-        arg[3,4,1,1]=(0.711688260873)*x[0]+(1.39962222322)*x[1]
-        arg[3,4,2,0]=(1.08512429209)*x[0]+(-0.555249097743)*x[1]
-        arg[3,4,2,1]=(-1.10443784007)*x[0]+(-0.782274429169)*x[1]
-        ref[0,0,0,0]=(0.151153165564)/(o+1.)+(0.112609656739)+(0.254304335059)*0.5**o
-        ref[0,0,0,1]=(-0.530602583511)/(o+1.)+(0.1817855378)+(-0.947398818743)*0.5**o
-        ref[0,0,1,0]=(0.308747437738)/(o+1.)+(-0.0338129255643)+(-0.676658756184)*0.5**o
-        ref[0,0,1,1]=(0.321026553427)/(o+1.)+(0.0692705367618)+(0.108863145337)*0.5**o
-        ref[0,0,2,0]=(-0.0908034666655)/(o+1.)+(-0.1100205155)+(-0.517562009199)*0.5**o
-        ref[0,0,2,1]=(0.303456040903)/(o+1.)+(0.500090875336)+(-0.254199784829)*0.5**o
-        ref[0,1,0,0]=(-0.440641221831)/(o+1.)+(0.456218946873)+(-0.296391367396)*0.5**o
-        ref[0,1,0,1]=(0.222628561762)/(o+1.)+(-0.162064412854)+(-0.457267302337)*0.5**o
-        ref[0,1,1,0]=(-0.913361887408)/(o+1.)+(-0.356168674239)+(0.401664604431)*0.5**o
-        ref[0,1,1,1]=(-0.543116639248)/(o+1.)+(-0.120902439422)+(0.381879135767)*0.5**o
-        ref[0,1,2,0]=(0.993649262831)/(o+1.)+(0.384695858206)+(-0.55736653846)*0.5**o
-        ref[0,1,2,1]=(-0.968077797451)/(o+1.)+(-0.187765942637)+(-0.603167099406)*0.5**o
-        ref[0,2,0,0]=(0.873662019918)/(o+1.)+(-0.710635360033)+(-0.146359415223)*0.5**o
-        ref[0,2,0,1]=(0.466408230693)/(o+1.)+(0.77626565285)+(0.389070815631)*0.5**o
-        ref[0,2,1,0]=(-0.475010813579)/(o+1.)+(0.525435880006)+(0.960310046461)*0.5**o
-        ref[0,2,1,1]=(0.697127520484)/(o+1.)+(0.357204276552)+(0.388328722275)*0.5**o
-        ref[0,2,2,0]=(-0.108434738487)/(o+1.)+(0.356443300466)+(-0.97475753261)*0.5**o
-        ref[0,2,2,1]=(0.952274964304)/(o+1.)+(-0.497379508976)+(-0.562006714089)*0.5**o
-        ref[0,3,0,0]=(-0.0368012761671)/(o+1.)+(0.594000625518)+(0.770200680808)*0.5**o
-        ref[0,3,0,1]=(0.450361861836)/(o+1.)+(0.182031052848)+(0.164263059934)*0.5**o
-        ref[0,3,1,0]=(0.500714741956)/(o+1.)+(0.0479711343168)+(-0.0785996333735)*0.5**o
-        ref[0,3,1,1]=(-0.949280938645)/(o+1.)+(0.452441874504)+(-0.88306753495)*0.5**o
-        ref[0,3,2,0]=(0.186931712837)/(o+1.)+(0.222335175903)+(0.426318408694)*0.5**o
-        ref[0,3,2,1]=(-0.288015428918)/(o+1.)+(0.80948657963)+(-0.822221815085)*0.5**o
-        ref[0,4,0,0]=(0.670151184695)/(o+1.)+(-0.415883847013)+(0.376690471866)*0.5**o
-        ref[0,4,0,1]=(-0.107106843992)/(o+1.)+(0.555375298435)+(-0.837698961768)*0.5**o
-        ref[0,4,1,0]=(-0.299999096802)/(o+1.)+(0.668996782774)+(-0.669357604061)*0.5**o
-        ref[0,4,1,1]=(0.778006183401)/(o+1.)+(-0.614473529032)+(-0.532655856076)*0.5**o
-        ref[0,4,2,0]=(-0.250068389818)/(o+1.)+(0.156274314197)+(-0.0103473845504)*0.5**o
-        ref[0,4,2,1]=(0.902125322216)/(o+1.)+(-0.616424567683)+(-0.560368879846)*0.5**o
-        ref[1,0,0,0]=(-0.133690258295)/(o+1.)+(-0.715949360249)+(0.525524578427)*0.5**o
-        ref[1,0,0,1]=(-0.788097689216)/(o+1.)+(0.0998405659256)+(-0.076709566994)*0.5**o
-        ref[1,0,1,0]=(0.144280886187)/(o+1.)+(0.0775377290314)+(-0.696369546924)*0.5**o
-        ref[1,0,1,1]=(0.824172196605)/(o+1.)+(0.561804029444)+(-0.0277357461773)*0.5**o
-        ref[1,0,2,0]=(0.422564421802)/(o+1.)+(-0.60719307099)+(-0.417386842591)*0.5**o
-        ref[1,0,2,1]=(0.778908672762)/(o+1.)+(0.0163446340765)+(-0.505974820938)*0.5**o
-        ref[1,1,0,0]=(0.0574071047387)/(o+1.)+(-0.350514214742)+(0.608850746775)*0.5**o
-        ref[1,1,0,1]=(-0.991660961792)/(o+1.)+(0.322084279455)+(0.380970772212)*0.5**o
-        ref[1,1,1,0]=(-0.823761120268)/(o+1.)+(-0.0495419092898)+(0.930901327253)*0.5**o
-        ref[1,1,1,1]=(-0.384729980569)/(o+1.)+(-0.0392583789163)+(0.649381188769)*0.5**o
-        ref[1,1,2,0]=(-0.840365304069)/(o+1.)+(-0.0150512662777)+(0.517673506558)*0.5**o
-        ref[1,1,2,1]=(0.555976660846)/(o+1.)+(-0.307265886898)+(0.707353625614)*0.5**o
-        ref[1,2,0,0]=(-0.423056705491)/(o+1.)+(0.0559404393793)+(0.311083677036)*0.5**o
-        ref[1,2,0,1]=(0.15409797664)/(o+1.)+(-0.0906637067519)+(-0.774473828018)*0.5**o
-        ref[1,2,1,0]=(0.796718644088)/(o+1.)+(0.248012077098)+(0.776951250898)*0.5**o
-        ref[1,2,1,1]=(-0.342830889263)/(o+1.)+(-0.282162737841)+(0.511417858487)*0.5**o
-        ref[1,2,2,0]=(-0.722403016671)/(o+1.)+(-0.367059457954)+(0.230014491812)*0.5**o
-        ref[1,2,2,1]=(-0.773685058881)/(o+1.)+(0.412807900451)+(-0.624365721366)*0.5**o
-        ref[1,3,0,0]=(0.527481434758)/(o+1.)+(0.36602961117)+(0.031214145649)*0.5**o
-        ref[1,3,0,1]=(0.0630927531585)/(o+1.)+(-0.164989701995)+(-0.325906787975)*0.5**o
-        ref[1,3,1,0]=(-0.612390590593)/(o+1.)+(-0.78855996274)+(-0.63929738839)*0.5**o
-        ref[1,3,1,1]=(-0.962656044265)/(o+1.)+(-0.00576535037253)+(-0.546330443673)*0.5**o
-        ref[1,3,2,0]=(-0.947280922008)/(o+1.)+(-0.137449579996)+(0.747590859563)*0.5**o
-        ref[1,3,2,1]=(-0.946623026202)/(o+1.)+(0.0787536550213)+(-0.24399757656)*0.5**o
-        ref[1,4,0,0]=(-0.174471016943)/(o+1.)+(-0.636500556039)+(-0.635482528623)*0.5**o
-        ref[1,4,0,1]=(0.806379391595)/(o+1.)+(-0.00304106577093)+(-0.476044717545)*0.5**o
-        ref[1,4,1,0]=(0.729649125134)/(o+1.)+(0.0151477051616)+(-0.403091231646)*0.5**o
-        ref[1,4,1,1]=(0.559976454745)/(o+1.)+(0.479295896421)+(0.75951513376)*0.5**o
-        ref[1,4,2,0]=(0.272199270818)/(o+1.)+(-0.0929072274332)+(-0.843552757065)*0.5**o
-        ref[1,4,2,1]=(-0.552663678377)/(o+1.)+(0.613784745778)+(-0.230300352975)*0.5**o
-        ref[2,0,0,0]=(-0.174247908098)/(o+1.)+(-0.108873783282)+(-0.716067030882)*0.5**o
-        ref[2,0,0,1]=(-0.300584841532)/(o+1.)+(-0.485363665493)+(-0.267230223262)*0.5**o
-        ref[2,0,1,0]=(0.316261805154)/(o+1.)+(-0.523474106451)+(-0.888278086869)*0.5**o
-        ref[2,0,1,1]=(-0.699622562861)/(o+1.)+(-0.151089538248)+(-0.909702635929)*0.5**o
-        ref[2,0,2,0]=(0.728545639829)/(o+1.)+(0.192083148877)+(-0.0625371618174)*0.5**o
-        ref[2,0,2,1]=(-0.22042267239)/(o+1.)+(-0.611974599324)+(0.677333343041)*0.5**o
-        ref[2,1,0,0]=(-0.0734883811113)/(o+1.)+(0.36100831022)+(-0.890215236787)*0.5**o
-        ref[2,1,0,1]=(0.121656829057)/(o+1.)+(-0.130801635799)+(-0.341933579678)*0.5**o
-        ref[2,1,1,0]=(0.221353168629)/(o+1.)+(0.618635673483)+(0.540308531179)*0.5**o
-        ref[2,1,1,1]=(0.0152580531273)/(o+1.)+(0.252173415542)+(0.560378877984)*0.5**o
-        ref[2,1,2,0]=(0.580319777731)/(o+1.)+(0.90566612137)+(0.993226484879)*0.5**o
-        ref[2,1,2,1]=(-0.710250320949)/(o+1.)+(0.742177021871)+(0.345780554724)*0.5**o
-        ref[2,2,0,0]=(0.770701563507)/(o+1.)+(0.240823471881)+(0.399162680517)*0.5**o
-        ref[2,2,0,1]=(0.76121761761)/(o+1.)+(0.128382656738)+(-0.460887633042)*0.5**o
-        ref[2,2,1,0]=(-0.269854962057)/(o+1.)+(0.690854898294)+(-0.521701367567)*0.5**o
-        ref[2,2,1,1]=(0.719518595712)/(o+1.)+(0.029596430244)+(-0.185365051187)*0.5**o
-        ref[2,2,2,0]=(-0.671157761165)/(o+1.)+(-0.142688285012)+(-0.0423425346644)*0.5**o
-        ref[2,2,2,1]=(-0.541156097112)/(o+1.)+(0.0765180918929)+(-0.379649661722)*0.5**o
-        ref[2,3,0,0]=(-0.0604347109212)/(o+1.)+(-0.19403702073)+(-0.034905025507)*0.5**o
-        ref[2,3,0,1]=(-0.793398507071)/(o+1.)+(0.255681280626)+(0.351720519037)*0.5**o
-        ref[2,3,1,0]=(-0.267058413731)/(o+1.)+(0.852211426049)+(0.974567776717)*0.5**o
-        ref[2,3,1,1]=(0.228396641207)/(o+1.)+(0.322922896735)+(-0.181997910305)*0.5**o
-        ref[2,3,2,0]=(0.480987773937)/(o+1.)+(-0.197709028569)+(0.0950934707835)*0.5**o
-        ref[2,3,2,1]=(-0.648934475027)/(o+1.)+(-0.418383297875)+(0.240224435511)*0.5**o
-        ref[2,4,0,0]=(0.430020261528)/(o+1.)+(0.53421018733)+(0.436370231269)*0.5**o
-        ref[2,4,0,1]=(0.906390660223)/(o+1.)+(-0.056057545856)+(0.640490734948)*0.5**o
-        ref[2,4,1,0]=(-0.732099770943)/(o+1.)+(-0.0485027617732)+(0.161578976854)*0.5**o
-        ref[2,4,1,1]=(-0.827495680848)/(o+1.)+(0.285044728936)+(-0.992031068384)*0.5**o
-        ref[2,4,2,0]=(-0.919905471787)/(o+1.)+(0.656971386264)+(-0.541001898785)*0.5**o
-        ref[2,4,2,1]=(0.161975875302)/(o+1.)+(0.272665206557)+(0.686527626533)*0.5**o
-        ref[3,0,0,0]=(0.584120963259)/(o+1.)+(0.207930729804)+(0.972857504177)*0.5**o
-        ref[3,0,0,1]=(0.315823141491)/(o+1.)+(-0.217561208386)+(-0.212429707823)*0.5**o
-        ref[3,0,1,0]=(-0.732294996139)/(o+1.)+(-0.278653143596)+(-0.586168358175)*0.5**o
-        ref[3,0,1,1]=(0.481321847225)/(o+1.)+(-0.070080648792)+(0.482676863662)*0.5**o
-        ref[3,0,2,0]=(0.616679859076)/(o+1.)+(-0.418784546677)+(0.390742116352)*0.5**o
-        ref[3,0,2,1]=(0.866778417448)/(o+1.)+(-0.686585656643)+(0.0629230167692)*0.5**o
-        ref[3,1,0,0]=(0.531890054167)/(o+1.)+(-0.516187607633)+(-0.492439201527)*0.5**o
-        ref[3,1,0,1]=(-0.512361639413)/(o+1.)+(0.499557182545)+(0.237651575694)*0.5**o
-        ref[3,1,1,0]=(-0.67542965405)/(o+1.)+(0.274414249559)+(-0.678336189514)*0.5**o
-        ref[3,1,1,1]=(0.371936242507)/(o+1.)+(-0.1636482466)+(-0.982634642862)*0.5**o
-        ref[3,1,2,0]=(-0.799408831501)/(o+1.)+(0.458633399549)+(0.399251684639)*0.5**o
-        ref[3,1,2,1]=(-0.0145253903686)/(o+1.)+(0.238472345905)+(0.757566560882)*0.5**o
-        ref[3,2,0,0]=(-0.130519473112)/(o+1.)+(0.695277604837)+(0.581732248306)*0.5**o
-        ref[3,2,0,1]=(0.632010536438)/(o+1.)+(0.123066205529)+(0.0316731560259)*0.5**o
-        ref[3,2,1,0]=(-0.709926210356)/(o+1.)+(0.0926699972302)+(0.53924621094)*0.5**o
-        ref[3,2,1,1]=(0.428094002247)/(o+1.)+(-0.841997926131)+(-0.276112488096)*0.5**o
-        ref[3,2,2,0]=(0.708481148086)/(o+1.)+(-0.50498161534)+(0.495412824545)*0.5**o
-        ref[3,2,2,1]=(0.782824622703)/(o+1.)+(-0.151509698687)+(-0.245246780227)*0.5**o
-        ref[3,3,0,0]=(0.848460868418)/(o+1.)+(-0.104639248461)+(-0.359902945273)*0.5**o
-        ref[3,3,0,1]=(0.0569151307298)/(o+1.)+(-0.0674224535469)+(0.165794065024)*0.5**o
-        ref[3,3,1,0]=(-0.165683739908)/(o+1.)+(-0.183388699236)+(0.771348141212)*0.5**o
-        ref[3,3,1,1]=(-0.932550058069)/(o+1.)+(-0.47828109001)+(-0.795311686688)*0.5**o
-        ref[3,3,2,0]=(0.821542940923)/(o+1.)+(0.166853194487)+(-0.13512674466)*0.5**o
-        ref[3,3,2,1]=(-0.46375871628)/(o+1.)+(0.132701267732)+(-0.449544418926)*0.5**o
-        ref[3,4,0,0]=(-0.074530542168)/(o+1.)+(-0.0567877963797)+(-0.134845261261)*0.5**o
-        ref[3,4,0,1]=(0.238671520479)/(o+1.)+(0.50689253572)+(0.731340228204)*0.5**o
-        ref[3,4,1,0]=(0.981601513335)/(o+1.)+(0.400717209822)+(0.248707844726)*0.5**o
-        ref[3,4,1,1]=(0.592304390107)/(o+1.)+(0.342408637328)+(0.834188819333)*0.5**o
-        ref[3,4,2,0]=(-0.339991330909)/(o+1.)+(-0.0145922376156)+(0.899051000485)*0.5**o
-        ref[3,4,2,1]=(-0.626610688164)/(o+1.)+(-0.417008165115)+(-0.426085250846)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.697666818785)*x[0]+(1.00202295791)*x[1]+(0.617700157184)*x[2]
-        arg[0,0,0,1]=(-0.465577819457)*x[0]+(-1.40054693355)*x[1]+(1.16912653295)*x[2]
-        arg[0,0,1,0]=(-1.26696500634)*x[0]+(-0.0469756169975)*x[1]+(-0.445591738991)*x[2]
-        arg[0,0,1,1]=(-1.61654321709)*x[0]+(-1.69522962467)*x[1]+(-1.06089094851)*x[2]
-        arg[0,0,2,0]=(0.229468378506)*x[0]+(0.716813596991)*x[1]+(-0.237703937029)*x[2]
-        arg[0,0,2,1]=(-1.12052051905)*x[0]+(0.835000004618)*x[1]+(-0.853004812404)*x[2]
-        arg[0,1,0,0]=(-1.75500745705)*x[0]+(0.655055836882)*x[1]+(1.05207750735)*x[2]
-        arg[0,1,0,1]=(-0.0746024824253)*x[0]+(-0.421596816958)*x[1]+(-0.375715855989)*x[2]
-        arg[0,1,1,0]=(-0.963269684396)*x[0]+(0.431993248836)*x[1]+(-1.63061928649)*x[2]
-        arg[0,1,1,1]=(-0.418757265018)*x[0]+(-0.665626168583)*x[1]+(-0.335734432507)*x[2]
-        arg[0,1,2,0]=(0.980346404307)*x[0]+(1.45442049802)*x[1]+(-0.833420308612)*x[2]
-        arg[0,1,2,1]=(-1.52536017847)*x[0]+(0.99484028681)*x[1]+(0.109754321663)*x[2]
-        arg[0,2,0,0]=(1.697179262)*x[0]+(-0.928732802147)*x[1]+(-0.653379513626)*x[2]
-        arg[0,2,0,1]=(0.682698902948)*x[0]+(0.829307959583)*x[1]+(-1.0300112276)*x[2]
-        arg[0,2,1,0]=(0.026084323266)*x[0]+(1.28865784608)*x[1]+(0.830446580645)*x[2]
-        arg[0,2,1,1]=(0.486291506032)*x[0]+(-0.519637742913)*x[1]+(0.81671330629)*x[2]
-        arg[0,2,2,0]=(-0.761591624634)*x[0]+(0.370951131011)*x[1]+(-0.256748479312)*x[2]
-        arg[0,2,2,1]=(-0.249974326513)*x[0]+(0.267323484635)*x[1]+(-1.09642130905)*x[2]
-        arg[0,3,0,0]=(0.752057563255)*x[0]+(-1.2772262175)*x[1]+(-0.264569668983)*x[2]
-        arg[0,3,0,1]=(-0.173167796447)*x[0]+(0.31873208356)*x[1]+(-0.599780701112)*x[2]
-        arg[0,3,1,0]=(-0.912464014941)*x[0]+(-1.56452517166)*x[1]+(1.37651660499)*x[2]
-        arg[0,3,1,1]=(0.302009667854)*x[0]+(0.524213064769)*x[1]+(0.316301522683)*x[2]
-        arg[0,3,2,0]=(-1.2940154673)*x[0]+(-0.900061396992)*x[1]+(0.3860029847)*x[2]
-        arg[0,3,2,1]=(-0.97354131341)*x[0]+(1.08221883964)*x[1]+(-0.739323076416)*x[2]
-        arg[0,4,0,0]=(1.86535317192)*x[0]+(-0.478359589546)*x[1]+(-0.798014592302)*x[2]
-        arg[0,4,0,1]=(-1.08518693851)*x[0]+(-0.186048654536)*x[1]+(1.04915573267)*x[2]
-        arg[0,4,1,0]=(-1.09692811055)*x[0]+(1.01042920935)*x[1]+(-0.73978089555)*x[2]
-        arg[0,4,1,1]=(0.654656964663)*x[0]+(0.279204596126)*x[1]+(0.886217781361)*x[2]
-        arg[0,4,2,0]=(-0.54009886291)*x[0]+(0.378037248739)*x[1]+(1.09785568886)*x[2]
-        arg[0,4,2,1]=(-1.43995958913)*x[0]+(-0.720157090994)*x[1]+(0.0676362028136)*x[2]
-        arg[1,0,0,0]=(1.47735412608)*x[0]+(0.342355546228)*x[1]+(-0.0134502415508)*x[2]
-        arg[1,0,0,1]=(-0.419536590369)*x[0]+(-1.61108470511)*x[1]+(1.51281979355)*x[2]
-        arg[1,0,1,0]=(1.31765698245)*x[0]+(-0.7499566294)*x[1]+(0.934537503478)*x[2]
-        arg[1,0,1,1]=(0.688467914883)*x[0]+(-1.32681280673)*x[1]+(-0.387405705058)*x[2]
-        arg[1,0,2,0]=(1.37069587556)*x[0]+(0.540830111773)*x[1]+(0.477311068263)*x[2]
-        arg[1,0,2,1]=(-0.572066213761)*x[0]+(-1.11950925494)*x[1]+(1.07939217872)*x[2]
-        arg[1,1,0,0]=(0.564997105326)*x[0]+(-0.73130546389)*x[1]+(0.435910937304)*x[2]
-        arg[1,1,0,1]=(0.513931739674)*x[0]+(-0.944043404826)*x[1]+(0.014114227468)*x[2]
-        arg[1,1,1,0]=(-0.77850597256)*x[0]+(-0.445835136484)*x[1]+(0.157478357479)*x[2]
-        arg[1,1,1,1]=(0.752431176866)*x[0]+(0.659759664199)*x[1]+(-0.859515433521)*x[2]
-        arg[1,1,2,0]=(0.0693158730911)*x[0]+(-0.820997827204)*x[1]+(-0.714694436829)*x[2]
-        arg[1,1,2,1]=(0.604674152847)*x[0]+(0.647261183132)*x[1]+(-1.21981352028)*x[2]
-        arg[1,2,0,0]=(0.0997504695984)*x[0]+(-0.271549839083)*x[1]+(-0.573467835942)*x[2]
-        arg[1,2,0,1]=(0.01861845581)*x[0]+(0.157410502406)*x[1]+(0.939257868776)*x[2]
-        arg[1,2,1,0]=(1.44909894631)*x[0]+(0.116038517547)*x[1]+(-0.851940489233)*x[2]
-        arg[1,2,1,1]=(1.34598841007)*x[0]+(1.79163125841)*x[1]+(0.719171044245)*x[2]
-        arg[1,2,2,0]=(-0.214737791448)*x[0]+(-1.85810839095)*x[1]+(-0.240776599927)*x[2]
-        arg[1,2,2,1]=(-0.574707645928)*x[0]+(-0.664173831956)*x[1]+(0.310262106696)*x[2]
-        arg[1,3,0,0]=(0.296213453592)*x[0]+(-0.831112482555)*x[1]+(0.130075739128)*x[2]
-        arg[1,3,0,1]=(-0.369510604457)*x[0]+(0.0373909697998)*x[1]+(1.6689129783)*x[2]
-        arg[1,3,1,0]=(0.0922435881419)*x[0]+(-0.280519827004)*x[1]+(0.285933839232)*x[2]
-        arg[1,3,1,1]=(-0.649253282272)*x[0]+(-0.460065044123)*x[1]+(-0.0711164948063)*x[2]
-        arg[1,3,2,0]=(0.793313307581)*x[0]+(-0.0587956351149)*x[1]+(0.810487259739)*x[2]
-        arg[1,3,2,1]=(-1.38668597055)*x[0]+(1.51396934198)*x[1]+(-1.13918550255)*x[2]
-        arg[1,4,0,0]=(1.40078167737)*x[0]+(-1.61915436345)*x[1]+(0.421710091214)*x[2]
-        arg[1,4,0,1]=(-1.37982015877)*x[0]+(1.30607371738)*x[1]+(-0.608888848419)*x[2]
-        arg[1,4,1,0]=(-0.558087802805)*x[0]+(-0.214169499512)*x[1]+(-0.766242546503)*x[2]
-        arg[1,4,1,1]=(-1.75503436584)*x[0]+(0.183604705451)*x[1]+(-0.148071484576)*x[2]
-        arg[1,4,2,0]=(0.537942069142)*x[0]+(-0.00640749928252)*x[1]+(-0.277544629657)*x[2]
-        arg[1,4,2,1]=(-0.652645833371)*x[0]+(-1.33439077026)*x[1]+(-0.226308197201)*x[2]
-        arg[2,0,0,0]=(1.45646289279)*x[0]+(1.40842127675)*x[1]+(1.75078281495)*x[2]
-        arg[2,0,0,1]=(0.867988651995)*x[0]+(1.35061812241)*x[1]+(-1.56520776323)*x[2]
-        arg[2,0,1,0]=(0.549686523522)*x[0]+(-0.528085465813)*x[1]+(-0.994978820267)*x[2]
-        arg[2,0,1,1]=(0.383595996552)*x[0]+(0.612989859087)*x[1]+(-0.560401247231)*x[2]
-        arg[2,0,2,0]=(-0.341259919499)*x[0]+(-0.125491675042)*x[1]+(0.545572340757)*x[2]
-        arg[2,0,2,1]=(-0.414269395434)*x[0]+(-0.433969881898)*x[1]+(-1.01820199328)*x[2]
-        arg[2,1,0,0]=(-0.113575280389)*x[0]+(0.326916039942)*x[1]+(-0.576072890249)*x[2]
-        arg[2,1,0,1]=(-0.296473969661)*x[0]+(0.195675099431)*x[1]+(-1.72378150831)*x[2]
-        arg[2,1,1,0]=(-1.31575932758)*x[0]+(-0.122557423522)*x[1]+(0.53435027695)*x[2]
-        arg[2,1,1,1]=(0.299435754608)*x[0]+(0.727140413706)*x[1]+(0.848931358475)*x[2]
-        arg[2,1,2,0]=(0.2618965198)*x[0]+(-0.461672573339)*x[1]+(0.923592803172)*x[2]
-        arg[2,1,2,1]=(-0.326817258523)*x[0]+(-0.0363300805442)*x[1]+(1.82049875918)*x[2]
-        arg[2,2,0,0]=(-0.435113320888)*x[0]+(0.0257984353786)*x[1]+(0.287846577657)*x[2]
-        arg[2,2,0,1]=(1.39178068279)*x[0]+(0.136781967539)*x[1]+(-1.38161590351)*x[2]
-        arg[2,2,1,0]=(-0.887874199356)*x[0]+(-0.476769153654)*x[1]+(-0.618760485829)*x[2]
-        arg[2,2,1,1]=(1.58883355098)*x[0]+(-0.889469047555)*x[1]+(-0.678486755843)*x[2]
-        arg[2,2,2,0]=(0.237147029365)*x[0]+(-0.509883462401)*x[1]+(0.533163151551)*x[2]
-        arg[2,2,2,1]=(0.66513913749)*x[0]+(1.30317030657)*x[1]+(0.804083365617)*x[2]
-        arg[2,3,0,0]=(1.01531518403)*x[0]+(1.3753053143)*x[1]+(0.000877284235964)*x[2]
-        arg[2,3,0,1]=(-0.40853642543)*x[0]+(0.154794268783)*x[1]+(-1.34306671117)*x[2]
-        arg[2,3,1,0]=(0.43065284359)*x[0]+(-0.28965146009)*x[1]+(0.660248828789)*x[2]
-        arg[2,3,1,1]=(-1.4334922681)*x[0]+(-0.0348802858609)*x[1]+(0.502051304974)*x[2]
-        arg[2,3,2,0]=(-1.17399537487)*x[0]+(0.865787043946)*x[1]+(-0.0105949677478)*x[2]
-        arg[2,3,2,1]=(0.63104158794)*x[0]+(0.436196079951)*x[1]+(0.498606623061)*x[2]
-        arg[2,4,0,0]=(-1.44410177354)*x[0]+(0.513406326011)*x[1]+(0.699127199447)*x[2]
-        arg[2,4,0,1]=(-0.981727023077)*x[0]+(0.484182120695)*x[1]+(0.667175832045)*x[2]
-        arg[2,4,1,0]=(-1.3352602588)*x[0]+(0.626269023364)*x[1]+(0.813537646695)*x[2]
-        arg[2,4,1,1]=(-0.932486930114)*x[0]+(0.299448807849)*x[1]+(0.195862014797)*x[2]
-        arg[2,4,2,0]=(-0.0621489644806)*x[0]+(0.131979664158)*x[1]+(0.442029269778)*x[2]
-        arg[2,4,2,1]=(-0.507508608633)*x[0]+(-1.28613226533)*x[1]+(-0.697920444023)*x[2]
-        arg[3,0,0,0]=(-0.984942677585)*x[0]+(-1.58913299616)*x[1]+(-0.373026784822)*x[2]
-        arg[3,0,0,1]=(0.616666427113)*x[0]+(-0.625162800471)*x[1]+(-0.796307290839)*x[2]
-        arg[3,0,1,0]=(-0.48469203683)*x[0]+(-0.0572105166553)*x[1]+(0.809572383581)*x[2]
-        arg[3,0,1,1]=(-0.487160309892)*x[0]+(0.77646454341)*x[1]+(-0.41947544573)*x[2]
-        arg[3,0,2,0]=(-1.17902121554)*x[0]+(-0.244939532033)*x[1]+(-0.282994359476)*x[2]
-        arg[3,0,2,1]=(0.33515909881)*x[0]+(0.146866561705)*x[1]+(1.81486098364)*x[2]
-        arg[3,1,0,0]=(0.379977901341)*x[0]+(0.834531701517)*x[1]+(-0.0242027062166)*x[2]
-        arg[3,1,0,1]=(0.184318292766)*x[0]+(1.08367911805)*x[1]+(-0.164531741594)*x[2]
-        arg[3,1,1,0]=(-1.00967115996)*x[0]+(0.542699640149)*x[1]+(0.707616701259)*x[2]
-        arg[3,1,1,1]=(0.856948233811)*x[0]+(-1.2186550297)*x[1]+(-0.034268798159)*x[2]
-        arg[3,1,2,0]=(0.259470684477)*x[0]+(-1.03586983732)*x[1]+(-0.157275979341)*x[2]
-        arg[3,1,2,1]=(-0.161954890658)*x[0]+(1.65853209885)*x[1]+(0.381113456719)*x[2]
-        arg[3,2,0,0]=(-0.437413004681)*x[0]+(-0.730340273929)*x[1]+(-0.687689272494)*x[2]
-        arg[3,2,0,1]=(-0.336618164118)*x[0]+(-1.24388666895)*x[1]+(-0.2198689254)*x[2]
-        arg[3,2,1,0]=(0.0872793087887)*x[0]+(-0.336554573215)*x[1]+(-0.0597803523262)*x[2]
-        arg[3,2,1,1]=(0.192805432018)*x[0]+(0.0540495582064)*x[1]+(0.846658042071)*x[2]
-        arg[3,2,2,0]=(0.00794192604414)*x[0]+(-0.33504559053)*x[1]+(0.615701149787)*x[2]
-        arg[3,2,2,1]=(0.210870961503)*x[0]+(1.14164095846)*x[1]+(-0.192785742791)*x[2]
-        arg[3,3,0,0]=(-0.25895162041)*x[0]+(-0.225800436488)*x[1]+(-0.198007079838)*x[2]
-        arg[3,3,0,1]=(-0.150363703231)*x[0]+(1.23870429535)*x[1]+(0.28635881247)*x[2]
-        arg[3,3,1,0]=(-0.865980718216)*x[0]+(-0.0849853244335)*x[1]+(-0.292164217189)*x[2]
-        arg[3,3,1,1]=(-0.350465968722)*x[0]+(0.09853736936)*x[1]+(-0.476711524665)*x[2]
-        arg[3,3,2,0]=(0.311396300263)*x[0]+(-0.92437612034)*x[1]+(-0.757139962928)*x[2]
-        arg[3,3,2,1]=(-0.912311919837)*x[0]+(0.267793631099)*x[1]+(0.4917345401)*x[2]
-        arg[3,4,0,0]=(0.613662541753)*x[0]+(0.782757341361)*x[1]+(1.04209808158)*x[2]
-        arg[3,4,0,1]=(0.492828613997)*x[0]+(1.11979095664)*x[1]+(-0.843545072354)*x[2]
-        arg[3,4,1,0]=(-0.51939120556)*x[0]+(0.476004484286)*x[1]+(-0.516311785432)*x[2]
-        arg[3,4,1,1]=(1.00423313567)*x[0]+(0.90776890388)*x[1]+(1.34423309497)*x[2]
-        arg[3,4,2,0]=(-1.44069600826)*x[0]+(-1.39515290909)*x[1]+(1.19851590247)*x[2]
-        arg[3,4,2,1]=(0.391851619877)*x[0]+(0.265529120553)*x[1]+(0.996610410913)*x[2]
-        ref[0,0,0,0]=(1.19330263935)/(o+1.)+(0.55394275251)+(0.0162017895041)*0.5**o
-        ref[0,0,0,1]=(-0.672351783684)/(o+1.)+(-0.187889622039)+(0.351132807711)*0.5**o
-        ref[0,0,1,0]=(-1.27021996264)/(o+1.)+(0.236286530101)+(-0.961885459894)*0.5**o
-        ref[0,0,1,1]=(-1.43442517107)/(o+1.)+(-1.00113374859)+(-0.935971122022)*0.5**o
-        ref[0,0,2,0]=(-0.434813695127)/(o+1.)+(0.606673209583)+(-0.0699546855712)*0.5**o
-        ref[0,0,2,1]=(-0.0434901247948)/(o+1.)+(-0.180911877983)+(-0.733211446073)*0.5**o
-        ref[0,1,0,0]=(1.41514302182)/(o+1.)+(-0.247977413325)+(-0.967062307989)*0.5**o
-        ref[0,1,0,1]=(0.69128100142)/(o+1.)+(-0.621609882923)+(-0.319976390946)*0.5**o
-        ref[0,1,1,0]=(-0.881870429191)/(o+1.)+(-0.654075774082)+(0.0281262553057)*0.5**o
-        ref[0,1,1,1]=(-1.27239116086)/(o+1.)+(-0.0854066429492)+(0.0230865806541)*0.5**o
-        ref[0,1,2,0]=(-0.222663945351)/(o+1.)+(0.685312598747)+(0.453385341573)*0.5**o
-        ref[0,1,2,1]=(0.101409038706)/(o+1.)+(0.151367946744)+(-0.824910502191)*0.5**o
-        ref[0,2,0,0]=(-1.19509443892)/(o+1.)+(0.225437856866)+(0.85928567141)*0.5**o
-        ref[0,2,0,1]=(0.285764347754)/(o+1.)+(-0.383432127133)+(0.963095541446)*0.5**o
-        ref[0,2,1,0]=(0.728010227911)/(o+1.)+(0.983790919896)+(-0.550403317717)*0.5**o
-        ref[0,2,1,1]=(0.563748259036)/(o+1.)+(0.165164845927)+(-0.110710881481)*0.5**o
-        ref[0,2,2,0]=(-0.361502606429)/(o+1.)+(0.0276145482611)+(-0.341115463028)*0.5**o
-        ref[0,2,2,1]=(-0.293320207933)/(o+1.)+(0.0336757304385)+(-0.853103403872)*0.5**o
-        ref[0,3,0,0]=(-0.410233956527)/(o+1.)+(-0.474281126245)+(0.569057885785)*0.5**o
-        ref[0,3,0,1]=(-0.835861970115)/(o+1.)+(0.0173715483175)+(0.346902459481)*0.5**o
-        ref[0,3,1,0]=(0.0830466456187)/(o+1.)+(-0.288204681495)+(-0.607109864241)*0.5**o
-        ref[0,3,1,1]=(1.07074130823)/(o+1.)+(-0.0437983012867)+(0.159379549652)*0.5**o
-        ref[0,3,2,0]=(0.172301049609)/(o+1.)+(-0.491724874152)+(-0.996925180895)*0.5**o
-        ref[0,3,2,1]=(-0.24891941221)/(o+1.)+(-0.03935856269)+(-0.3030090126)*0.5**o
-        ref[0,4,0,0]=(-0.778575122429)/(o+1.)+(0.213085222078)+(0.941383668349)*0.5**o
-        ref[0,4,0,1]=(0.880801627174)/(o+1.)+(-0.454451723401)+(-0.193978040747)*0.5**o
-        ref[0,4,1,0]=(-0.835604724882)/(o+1.)+(0.127240834083)+(-0.245156740036)*0.5**o
-        ref[0,4,1,1]=(1.62336716324)/(o+1.)+(-0.101085918464)+(0.398884015839)*0.5**o
-        ref[0,4,2,0]=(1.16805827702)/(o+1.)+(0.211232591688)+(-0.654729385702)*0.5**o
-        ref[0,4,2,1]=(-0.305424138957)/(o+1.)+(-0.431076572693)+(-0.924903192969)*0.5**o
-        ref[1,0,0,0]=(-0.481596247529)/(o+1.)+(0.769902632559)+(0.748050413171)*0.5**o
-        ref[1,0,0,1]=(0.177388661252)/(o+1.)+(-0.118766442613)+(-0.457657277952)*0.5**o
-        ref[1,0,1,0]=(0.709890860372)/(o+1.)+(0.0668010230727)+(0.658744950012)*0.5**o
-        ref[1,0,1,1]=(-1.45685781381)/(o+1.)+(-0.178674426089)+(0.788456069079)*0.5**o
-        ref[1,0,2,0]=(0.194388185612)/(o+1.)+(0.649177543063)+(0.896093783855)*0.5**o
-        ref[1,0,2,1]=(0.181561279507)/(o+1.)+(-0.200618291902)+(-0.392507985678)*0.5**o
-        ref[1,1,0,0]=(-0.884376814027)/(o+1.)+(0.280382736159)+(0.593213920451)*0.5**o
-        ref[1,1,0,1]=(-0.250709602218)/(o+1.)+(-0.492104211211)+(0.818920586956)*0.5**o
-        ref[1,1,1,0]=(0.0529723694625)/(o+1.)+(-0.502047650638)+(-0.115739819752)*0.5**o
-        ref[1,1,1,1]=(0.215812202957)/(o+1.)+(-0.308796450292)+(0.954456105171)*0.5**o
-        ref[1,1,2,0]=(-0.991481050902)/(o+1.)+(0.162626252838)+(-0.800147845717)*0.5**o
-        ref[1,1,2,1]=(-0.433989756951)/(o+1.)+(0.362776336712)+(-0.259441100777)*0.5**o
-        ref[1,2,0,0]=(-0.930287052624)/(o+1.)+(-0.347752763108)+(0.880525373413)*0.5**o
-        ref[1,2,0,1]=(0.698674852861)/(o+1.)+(-0.15119613196)+(0.719004238051)*0.5**o
-        ref[1,2,1,0]=(-0.777216821365)/(o+1.)+(0.436336076297)+(0.617741643399)*0.5**o
-        ref[1,2,1,1]=(1.09595223135)/(o+1.)+(0.978251130983)+(0.804336219412)*0.5**o
-        ref[1,2,2,0]=(-0.651012630849)/(o+1.)+(-1.04894606664)+(0.43528198181)*0.5**o
-        ref[1,2,2,1]=(-1.5227353883)/(o+1.)+(0.670019307557)+(-0.745922598001)*0.5**o
-        ref[1,3,0,0]=(-0.750195637997)/(o+1.)+(0.231864245348)+(-0.118356142533)*0.5**o
-        ref[1,3,0,1]=(1.17136226596)/(o+1.)+(-0.114976421389)+(0.395383920468)*0.5**o
-        ref[1,3,1,0]=(-0.108070636769)/(o+1.)+(0.279145429234)+(-0.352562621327)*0.5**o
-        ref[1,3,1,1]=(-0.144223481714)/(o+1.)+(-0.472954352493)+(-0.0903026345013)*0.5**o
-        ref[1,3,2,0]=(-0.487564307786)/(o+1.)+(0.636973351449)+(0.758622537094)*0.5**o
-        ref[1,3,2,1]=(0.390860965954)/(o+1.)+(-0.36647678165)+(-0.66980953377)*0.5**o
-        ref[1,4,0,0]=(-1.04824984837)/(o+1.)+(0.213932231728)+(0.823722790054)*0.5**o
-        ref[1,4,0,1]=(-0.0984653601336)/(o+1.)+(0.07867877705)+(-0.741527483773)*0.5**o
-        ref[1,4,1,0]=(-0.146287867383)/(o+1.)+(-0.908951868158)+(0.425691754878)*0.5**o
-        ref[1,4,1,1]=(-0.94160416554)/(o+1.)+(0.0459877010016)+(-0.869872381431)*0.5**o
-        ref[1,4,2,0]=(0.0115742858952)/(o+1.)+(-0.222488399041)+(0.687392452389)*0.5**o
-        ref[1,4,2,1]=(-0.956561936575)/(o+1.)+(-0.59770879042)+(-0.0613652834159)*0.5**o
-        ref[2,0,0,0]=(1.83987381729)/(o+1.)+(0.956579317963)+(0.862634531274)*0.5**o
-        ref[2,0,0,1]=(0.105446127421)/(o+1.)+(0.180661881191)+(0.186629121375)*0.5**o
-        ref[2,0,1,0]=(0.0212167440766)/(o+1.)+(-0.337825588888)+(-0.318943328859)*0.5**o
-        ref[2,0,1,1]=(0.744834715631)/(o+1.)+(-0.350058416663)+(0.391466726104)*0.5**o
-        ref[2,0,2,0]=(-0.788776613856)/(o+1.)+(0.233776806014)+(0.400043748043)*0.5**o
-        ref[2,0,2,1]=(-0.95346976307)/(o+1.)+(0.0274998652324)+(-0.967971238003)*0.5**o
-        ref[2,1,0,0]=(-0.536051408942)/(o+1.)+(-0.208498016994)+(0.590315312233)*0.5**o
-        ref[2,1,0,1]=(-1.04158508788)/(o+1.)+(-0.397885793101)+(0.0127762955396)*0.5**o
-        ref[2,1,1,0]=(0.529914207253)/(o+1.)+(-0.547503443987)+(-0.338873793431)*0.5**o
-        ref[2,1,1,1]=(0.62298670274)/(o+1.)+(0.449860048786)+(0.352800726478)*0.5**o
-        ref[2,1,2,0]=(0.965292650595)/(o+1.)+(0.00980498639)+(-0.261085873742)*0.5**o
-        ref[2,1,2,1]=(0.403285360803)/(o+1.)+(0.369160592269)+(0.315744874774)*0.5**o
-        ref[2,2,0,0]=(-0.457764884724)/(o+1.)+(0.563657776706)+(-0.791018976541)*0.5**o
-        ref[2,2,0,1]=(0.188151274044)/(o+1.)+(-0.476470545911)+(0.911736564588)*0.5**o
-        ref[2,2,1,0]=(-0.558515085739)/(o+1.)+(-0.445583796553)+(-0.533721159994)*0.5**o
-        ref[2,2,1,1]=(-0.431992337265)/(o+1.)+(-0.0957726221961)+(0.64441532924)*0.5**o
-        ref[2,2,2,0]=(-0.159056461947)/(o+1.)+(-0.0326864536156)+(0.484856087693)*0.5**o
-        ref[2,2,2,1]=(0.533116456037)/(o+1.)+(1.10197257725)+(0.0353311991352)*0.5**o
-        ref[2,3,0,0]=(0.0570625147023)/(o+1.)+(0.74170779854)+(0.851019670777)*0.5**o
-        ref[2,3,0,1]=(-0.495059904832)/(o+1.)+(-0.169954912181)+(-0.761839138623)*0.5**o
-        ref[2,3,1,0]=(0.482375173314)/(o+1.)+(-0.19374838651)+(0.706371811996)*0.5**o
-        ref[2,3,1,1]=(0.12928100721)/(o+1.)+(-0.317327862062)+(-0.460946532077)*0.5**o
-        ref[2,3,2,0]=(-0.234362084763)/(o+1.)+(0.423486279181)+(-0.93141377227)*0.5**o
-        ref[2,3,2,1]=(1.25586693002)/(o+1.)+(-0.127551329993)+(0.56508002092)*0.5**o
-        ref[2,4,0,0]=(0.45235297749)/(o+1.)+(-0.0217537364788)+(-0.640413752615)*0.5**o
-        ref[2,4,0,1]=(0.936809207384)/(o+1.)+(-0.151519610695)+(-0.464139056331)*0.5**o
-        ref[2,4,1,0]=(0.867693208863)/(o+1.)+(0.105683574314)+(-0.974513946233)*0.5**o
-        ref[2,4,1,1]=(-1.27821575101)/(o+1.)+(0.463163847311)+(-0.0852880510814)*0.5**o
-        ref[2,4,2,0]=(-0.846224501366)/(o+1.)+(0.432619461409)+(0.492845548002)*0.5**o
-        ref[2,4,2,1]=(-1.48923229995)/(o+1.)+(-0.505747396375)+(0.00916577472118)*0.5**o
-        ref[3,0,0,0]=(-0.959215731121)/(o+1.)+(-0.904609108587)+(-0.178668510268)*0.5**o
-        ref[3,0,0,1]=(-1.53181231865)/(o+1.)+(-0.0758543610408)+(0.878717376536)*0.5**o
-        ref[3,0,1,0]=(1.18643238831)/(o+1.)+(-0.288825159097)+(-0.341112240015)*0.5**o
-        ref[3,0,1,1]=(-0.0675694917031)/(o+1.)+(-0.168955703616)+(0.275309686724)*0.5**o
-        ref[3,0,2,0]=(-0.663269860133)/(o+1.)+(-0.235102421885)+(-0.573480403148)*0.5**o
-        ref[3,0,2,1]=(1.0969289778)/(o+1.)+(0.46603172821)+(0.267894209932)*0.5**o
-        ref[3,1,0,0]=(-0.716870513559)/(o+1.)+(0.712039409283)+(0.483098591635)*0.5**o
-        ref[3,1,0,1]=(0.0328531999411)/(o+1.)+(0.379319450988)+(0.311973567308)*0.5**o
-        ref[3,1,1,0]=(1.08648208064)/(o+1.)+(-0.196831959338)+(-0.452172980519)*0.5**o
-        ref[3,1,1,1]=(0.0813181502612)/(o+1.)+(-0.227364064527)+(-0.0225656152548)*0.5**o
-        ref[3,1,2,0]=(-0.271000454408)/(o+1.)+(-0.765711687155)+(0.868748696531)*0.5**o
-        ref[3,1,2,1]=(1.60569646253)/(o+1.)+(0.137437739736)+(-0.00288127709197)*0.5**o
-        ref[3,2,0,0]=(-1.25887089059)/(o+1.)+(-0.525842290945)+(0.455112921376)*0.5**o
-        ref[3,2,0,1]=(-1.63787880725)/(o+1.)+(0.00214706725405)+(-0.166789085722)*0.5**o
-        ref[3,2,1,0]=(-1.82111307894)/(o+1.)+(0.561806270366)+(0.388444921454)*0.5**o
-        ref[3,2,1,1]=(-0.489259906414)/(o+1.)+(0.582548398381)+(0.417676141947)*0.5**o
-        ref[3,2,2,0]=(-0.0674375340391)/(o+1.)+(-0.00345549227349)+(0.362946003887)*0.5**o
-        ref[3,2,2,1]=(0.662780682001)/(o+1.)+(-0.15453848218)+(0.806022459534)*0.5**o
-        ref[3,3,0,0]=(-1.15795406515)/(o+1.)+(0.0926725746467)+(0.289849779118)*0.5**o
-        ref[3,3,0,1]=(1.27520269547)/(o+1.)+(-0.286529818361)+(0.672556345847)*0.5**o
-        ref[3,3,1,0]=(-0.343290651469)/(o+1.)+(-0.0269962100904)+(-0.845847188189)*0.5**o
-        ref[3,3,1,1]=(0.497715053371)/(o+1.)+(-0.158577177766)+(-0.909200821866)*0.5**o
-        ref[3,3,2,0]=(-0.952431538662)/(o+1.)+(0.0816482063045)+(-0.580984656952)*0.5**o
-        ref[3,3,2,1]=(-0.176227469799)/(o+1.)+(0.0456157853688)+(-0.0677878495767)*0.5**o
-        ref[3,4,0,0]=(0.976460483802)/(o+1.)+(0.347595506011)+(0.766866468871)*0.5**o
-        ref[3,4,0,1]=(0.0358170327662)/(o+1.)+(-0.0991456259778)+(0.931548717473)*0.5**o
-        ref[3,4,1,0]=(0.114544318514)/(o+1.)+(-0.201014865792)+(-0.272213093635)*0.5**o
-        ref[3,4,1,1]=(0.554509925385)/(o+1.)+(1.23219332557)+(0.237338557994)*0.5**o
-        ref[3,4,2,0]=(0.0803465444931)/(o+1.)+(-0.518257569997)+(-0.681164419371)*0.5**o
-        ref[3,4,2,1]=(-0.0443609570522)/(o+1.)+(0.572813368096)+(0.552725372202)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      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.570707549273)*x[0]+(-0.726264032186)*x[1]
-        ref=(-0.0423765208873)/(o+1.)+(-0.791542656673)+(0.328490252775)*0.5**o
-      else:
-        arg=(1.28222892931)*x[0]+(-0.798170675576)*x[1]+(1.5701208405)*x[2]
-        ref=(0.721975372868)/(o+1.)+(0.344720905832)+(0.642761909705)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(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.575166906798)*x[0]+(-1.63698773418)*x[1]
-        arg[1]=(-0.0535946584636)*x[0]+(0.105969101775)*x[1]
-        ref[0]=(-0.751926426344)/(o+1.)+(-0.395800138888)+(0.481705876734)*0.5**o
-        ref[1]=(0.698496252242)/(o+1.)+(-0.265927161866)+(-0.114267485199)*0.5**o
-      else:
-        arg[0]=(-0.17879254138)*x[0]+(-1.12752123792)*x[1]+(0.921297311605)*x[2]
-        arg[1]=(1.33131824618)*x[0]+(-0.392175059176)*x[1]+(0.545754281465)*x[2]
-        ref[0]=(-0.494870303061)/(o+1.)+(0.0697636237654)+(-0.0296734121631)*0.5**o
-        ref[1]=(-0.394300983704)/(o+1.)+(0.722261312754)+(0.434675826665)*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.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.338658191734)*x[0]+(1.46127609683)*x[1]
-        arg[0,1]=(-0.629116867491)*x[0]+(1.40141569066)*x[1]
-        arg[0,2]=(0.105569779347)*x[0]+(0.239936324967)*x[1]
-        arg[0,3]=(-0.281718331718)*x[0]+(0.280323404866)*x[1]
-        arg[0,4]=(0.467341113661)*x[0]+(-0.50452062075)*x[1]
-        arg[1,0]=(-0.841295219186)*x[0]+(0.524038163723)*x[1]
-        arg[1,1]=(1.40143704236)*x[0]+(-1.50467961637)*x[1]
-        arg[1,2]=(1.21078790505)*x[0]+(-0.731453470292)*x[1]
-        arg[1,3]=(0.469556922076)*x[0]+(0.0686293204391)*x[1]
-        arg[1,4]=(-1.26394637585)*x[0]+(-0.0361395276585)*x[1]
-        arg[2,0]=(-1.12850883148)*x[0]+(0.284296673326)*x[1]
-        arg[2,1]=(-0.626362828813)*x[0]+(1.19459827573)*x[1]
-        arg[2,2]=(-0.545457293083)*x[0]+(1.547337019)*x[1]
-        arg[2,3]=(0.664461986629)*x[0]+(-1.69082198266)*x[1]
-        arg[2,4]=(-0.100004763305)*x[0]+(0.152159044423)*x[1]
-        arg[3,0]=(0.307574843061)*x[0]+(1.20209181301)*x[1]
-        arg[3,1]=(-0.0663203356627)*x[0]+(-1.26669863527)*x[1]
-        arg[3,2]=(-1.20436798894)*x[0]+(-0.0375693379661)*x[1]
-        arg[3,3]=(0.753649087747)*x[0]+(0.69376223486)*x[1]
-        arg[3,4]=(-0.0512732264834)*x[0]+(-0.658097606436)*x[1]
-        ref[0,0]=(0.996821439952)/(o+1.)+(0.015088160779)+(0.0956201435879)*0.5**o
-        ref[0,1]=(0.643092963726)/(o+1.)+(0.239390724844)+(-0.349575590244)*0.5**o
-        ref[0,2]=(-0.198468008977)/(o+1.)+(0.00411201743342)+(0.535750078425)*0.5**o
-        ref[0,3]=(0.642491201137)/(o+1.)+(-0.623413199652)+(0.602940271315)*0.5**o
-        ref[0,4]=(-0.105706120549)/(o+1.)+(-0.353560054939)+(0.775646723338)*0.5**o
-        ref[1,0]=(0.144540669221)/(o+1.)+(0.0228268215803)+(-0.507451367845)*0.5**o
-        ref[1,1]=(-0.820379339897)/(o+1.)+(0.0951825678509)+(0.526771630185)*0.5**o
-        ref[1,2]=(-0.21214585824)/(o+1.)+(-0.0889183062985)+(0.869316905591)*0.5**o
-        ref[1,3]=(0.291228940674)/(o+1.)+(0.192623928703)+(-0.138290555565)*0.5**o
-        ref[1,4]=(-0.0663718956434)/(o+1.)+(-0.309484335614)+(-0.614745336642)*0.5**o
-        ref[2,0]=(0.484892962201)/(o+1.)+(-0.367129859793)+(-0.594845400763)*0.5**o
-        ref[2,1]=(0.768457634672)/(o+1.)+(0.154447657562)+(-0.509117502876)*0.5**o
-        ref[2,2]=(0.707320338363)/(o+1.)+(-0.0592149232183)+(0.412989233992)*0.5**o
-        ref[2,3]=(-0.983684339171)/(o+1.)+(-0.495377645598)+(0.948079634337)*0.5**o
-        ref[2,4]=(-0.0315947220465)/(o+1.)+(0.506833986759)+(-0.929918970353)*0.5**o
-        ref[3,0]=(0.54141067098)/(o+1.)+(0.489049131493)+(-0.00984227789859)*0.5**o
-        ref[3,1]=(-0.552335053051)/(o+1.)+(-0.383325638803)+(-0.0140326402734)*0.5**o
-        ref[3,2]=(0.0821472412575)/(o+1.)+(-0.335827719718)+(-0.652429128733)*0.5**o
-        ref[3,3]=(0.112917208924)/(o+1.)+(0.667772807338)+(-0.00105150099312)*0.5**o
-        ref[3,4]=(-0.19331508157)/(o+1.)+(-0.102296385708)+(-0.311462979932)*0.5**o
-      else:
-        arg[0,0]=(0.069245963142)*x[0]+(-0.185727379494)*x[1]+(-0.887410889699)*x[2]
-        arg[0,1]=(-0.816745668949)*x[0]+(-0.250435680662)*x[1]+(0.701607830582)*x[2]
-        arg[0,2]=(-0.862433954308)*x[0]+(0.731874372527)*x[1]+(-0.115384982779)*x[2]
-        arg[0,3]=(-0.265247631604)*x[0]+(-0.157059741958)*x[1]+(-0.368419335078)*x[2]
-        arg[0,4]=(1.66720203567)*x[0]+(-0.759393708719)*x[1]+(1.36360850704)*x[2]
-        arg[1,0]=(-0.192822813795)*x[0]+(0.0358776152527)*x[1]+(-0.722864520788)*x[2]
-        arg[1,1]=(-0.480606215471)*x[0]+(1.13682774573)*x[1]+(0.17900467623)*x[2]
-        arg[1,2]=(0.346760852584)*x[0]+(0.994833030281)*x[1]+(0.507055933913)*x[2]
-        arg[1,3]=(-0.509961853478)*x[0]+(-0.852997575505)*x[1]+(0.586527030253)*x[2]
-        arg[1,4]=(0.93957975846)*x[0]+(0.28878335152)*x[1]+(0.128070931738)*x[2]
-        arg[2,0]=(0.338283306313)*x[0]+(0.0244500761608)*x[1]+(-0.606875554888)*x[2]
-        arg[2,1]=(0.850782624552)*x[0]+(-0.836382038189)*x[1]+(-1.41808459947)*x[2]
-        arg[2,2]=(-1.06176229613)*x[0]+(-0.259247046061)*x[1]+(-0.583455484089)*x[2]
-        arg[2,3]=(1.17437923282)*x[0]+(1.31485601495)*x[1]+(1.3139743231)*x[2]
-        arg[2,4]=(0.362851636275)*x[0]+(0.804049783156)*x[1]+(1.09205000214)*x[2]
-        arg[3,0]=(0.343603837195)*x[0]+(-1.49082257981)*x[1]+(-0.628668674545)*x[2]
-        arg[3,1]=(-0.676847711765)*x[0]+(1.32350560453)*x[1]+(1.07275185686)*x[2]
-        arg[3,2]=(0.570784985469)*x[0]+(-1.01212360602)*x[1]+(-0.0808776667606)*x[2]
-        arg[3,3]=(0.506392444236)*x[0]+(-1.00848318041)*x[1]+(0.558777901541)*x[2]
-        arg[3,4]=(-0.60925738291)*x[0]+(-0.386755957809)*x[1]+(0.60930115434)*x[2]
-        ref[0,0]=(-0.695230136419)/(o+1.)+(-0.388400729083)+(0.468139288533)*0.5**o
-        ref[0,1]=(0.462098132187)/(o+1.)+(-0.215041893287)+(-0.397587864642)*0.5**o
-        ref[0,2]=(-0.262411385363)/(o+1.)+(0.275729226874)+(-0.534991632946)*0.5**o
-        ref[0,3]=(0.117822633378)/(o+1.)+(0.0286827897592)+(-0.965914921536)*0.5**o
-        ref[0,4]=(0.293575681039)/(o+1.)+(0.584039692827)+(0.809761767299)*0.5**o
-        ref[1,0]=(0.627951922463)/(o+1.)+(-0.994889162557)+(0.482016683321)*0.5**o
-        ref[1,1]=(1.83482238662)/(o+1.)+(-0.205719558739)+(-0.588157062647)*0.5**o
-        ref[1,2]=(1.13612020398)/(o+1.)+(0.0262824938134)+(0.659964625174)*0.5**o
-        ref[1,3]=(0.325264487741)/(o+1.)+(-0.0752154813413)+(-0.951265923787)*0.5**o
-        ref[1,4]=(-0.149919283302)/(o+1.)+(0.77701502585)+(-0.0476767266789)*0.5**o
-        ref[2,0]=(0.491504686171)/(o+1.)+(-0.562534706926)+(0.389422555265)*0.5**o
-        ref[2,1]=(-1.52704217417)/(o+1.)+(0.120525042098)+(-0.117691923134)*0.5**o
-        ref[2,2]=(-0.779796772543)/(o+1.)+(-0.318864997267)+(-0.486938059201)*0.5**o
-        ref[2,3]=(1.53343318682)/(o+1.)+(0.731149467308)+(0.807477449443)*0.5**o
-        ref[2,4]=(1.15919207694)/(o+1.)+(0.113921448815)+(0.871916446996)*0.5**o
-        ref[3,0]=(-1.75312920944)/(o+1.)+(-0.153798982308)+(0.284839756895)*0.5**o
-        ref[3,1]=(1.30985814569)/(o+1.)+(0.438430874237)+(-0.467310144534)*0.5**o
-        ref[3,2]=(-0.737480320972)/(o+1.)+(0.0604403094397)+(0.094383414777)*0.5**o
-        ref[3,3]=(-0.688723266524)/(o+1.)+(0.43486027018)+(-0.124310108473)*0.5**o
-        ref[3,4]=(0.128399262674)/(o+1.)+(-0.372445844122)+(0.229780239192)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.993339371954)*x[0]+(-1.35308128985)*x[1]
-        arg[0,0,1]=(-1.07886149134)*x[0]+(-1.38999283206)*x[1]
-        arg[0,1,0]=(0.246468026972)*x[0]+(-1.37217464882)*x[1]
-        arg[0,1,1]=(0.645672648599)*x[0]+(1.8070624103)*x[1]
-        arg[1,0,0]=(-1.02278989388)*x[0]+(0.151634023103)*x[1]
-        arg[1,0,1]=(-0.667332860541)*x[0]+(0.312742149193)*x[1]
-        arg[1,1,0]=(-0.848647385832)*x[0]+(0.466438038516)*x[1]
-        arg[1,1,1]=(-0.185495911372)*x[0]+(-0.137118786891)*x[1]
-        arg[2,0,0]=(-0.0250555870731)*x[0]+(0.905553573283)*x[1]
-        arg[2,0,1]=(-1.03940852939)*x[0]+(-1.57326016394)*x[1]
-        arg[2,1,0]=(1.48834718811)*x[0]+(-0.340889253246)*x[1]
-        arg[2,1,1]=(0.875721514739)*x[0]+(-0.310857412212)*x[1]
-        arg[3,0,0]=(1.25129508831)*x[0]+(-1.69312043525)*x[1]
-        arg[3,0,1]=(1.50124675312)*x[0]+(0.244195748654)*x[1]
-        arg[3,1,0]=(0.292060478909)*x[0]+(-0.660005422696)*x[1]
-        arg[3,1,1]=(0.791335231308)*x[0]+(0.466481573591)*x[1]
-        arg[4,0,0]=(-0.361241947236)*x[0]+(-1.43591648587)*x[1]
-        arg[4,0,1]=(-1.10385456695)*x[0]+(-0.325314195825)*x[1]
-        arg[4,1,0]=(1.01004173033)*x[0]+(0.426824552857)*x[1]
-        arg[4,1,1]=(-0.631382479612)*x[0]+(0.0603792190966)*x[1]
-        arg[5,0,0]=(-0.30404368786)*x[0]+(-0.0102498522932)*x[1]
-        arg[5,0,1]=(0.109188848746)*x[0]+(-1.16846160105)*x[1]
-        arg[5,1,0]=(-0.351916879547)*x[0]+(-0.320714795448)*x[1]
-        arg[5,1,1]=(-0.534138562652)*x[0]+(-0.256013589844)*x[1]
-        ref[0,0,0]=(-0.506159375456)/(o+1.)+(-0.522895228783)+(-0.794470828783)*0.5**o
-        ref[0,0,1]=(-0.930984367068)/(o+1.)+(-0.636851258685)+(-0.264167438968)*0.5**o
-        ref[0,1,0]=(-0.674222792172)/(o+1.)+(-0.52131379048)+(0.591143751282)*0.5**o
-        ref[0,1,1]=(0.953370751283)/(o+1.)+(0.377773224645)+(0.743817858326)*0.5**o
-        ref[1,0,0]=(0.700508215428)/(o+1.)+(-0.303343530867)+(-0.964977024471)*0.5**o
-        ref[1,0,1]=(-0.408185116452)/(o+1.)+(0.0668983569743)+(-0.0802023088445)*0.5**o
-        ref[1,1,0]=(0.80742345527)/(o+1.)+(-0.405780705683)+(-0.37807139122)*0.5**o
-        ref[1,1,1]=(0.0184615568095)/(o+1.)+(0.221921562266)+(-0.784919379605)*0.5**o
-        ref[2,0,0]=(0.571906256883)/(o+1.)+(-0.0415588382133)+(0.391709405753)*0.5**o
-        ref[2,0,1]=(-0.778176009451)/(o+1.)+(-0.761680990566)+(-0.311130702752)*0.5**o
-        ref[2,1,0]=(0.498214686321)/(o+1.)+(-0.146173705483)+(0.941590659509)*0.5**o
-        ref[2,1,1]=(-0.273747071818)/(o+1.)+(-0.0319184747153)+(0.902448123776)*0.5**o
-        ref[3,0,0]=(-0.730029471178)/(o+1.)+(-0.288672747933)+(0.865549620109)*0.5**o
-        ref[3,0,1]=(-0.371409186475)/(o+1.)+(0.623169375401)+(0.870512937445)*0.5**o
-        ref[3,1,0]=(0.0611454391867)/(o+1.)+(-0.627723874214)+(0.826357365454)*0.5**o
-        ref[3,1,1]=(0.785553447935)/(o+1.)+(0.246940213405)+(-0.021617069845)*0.5**o
-        ref[4,0,0]=(-0.936201955907)/(o+1.)+(-0.484823720021)+(0.108690962842)*0.5**o
-        ref[4,0,1]=(-0.277830390815)/(o+1.)+(-0.151786547071)+(-0.847765277819)*0.5**o
-        ref[4,1,0]=(0.12293099533)/(o+1.)+(0.295620382054)+(0.722694523749)*0.5**o
-        ref[4,1,1]=(-0.5517019185)/(o+1.)+(0.0850748937088)+(-0.189451129433)*0.5**o
-        ref[5,0,0]=(-0.942533148805)/(o+1.)+(0.425680504872)+(-0.223121401092)*0.5**o
-        ref[5,0,1]=(-0.377134228332)/(o+1.)+(-0.721019409569)+(0.759900295162)*0.5**o
-        ref[5,1,0]=(-0.643828391942)/(o+1.)+(0.399974456311)+(-0.828752195674)*0.5**o
-        ref[5,1,1]=(-0.118293731439)/(o+1.)+(-0.355568544431)+(0.0392786678054)*0.5**o
-      else:
-        arg[0,0,0]=(0.205446621454)*x[0]+(0.10254878667)*x[1]+(1.27673728979)*x[2]
-        arg[0,0,1]=(0.758846313193)*x[0]+(0.63320336713)*x[1]+(-0.42638505807)*x[2]
-        arg[0,1,0]=(-0.0127116561603)*x[0]+(-0.360359420027)*x[1]+(0.540508591493)*x[2]
-        arg[0,1,1]=(-0.278918629538)*x[0]+(-0.0291534835772)*x[1]+(0.708655731565)*x[2]
-        arg[1,0,0]=(-0.612965210483)*x[0]+(0.787787556912)*x[1]+(0.222384448462)*x[2]
-        arg[1,0,1]=(1.07409083742)*x[0]+(1.19429173706)*x[1]+(-0.484979976779)*x[2]
-        arg[1,1,0]=(-1.25714999157)*x[0]+(-0.321346019622)*x[1]+(0.278329320837)*x[2]
-        arg[1,1,1]=(-0.512262689707)*x[0]+(1.6891992053)*x[1]+(-1.02351830068)*x[2]
-        arg[2,0,0]=(-1.57911907773)*x[0]+(0.096124258122)*x[1]+(0.336619253521)*x[2]
-        arg[2,0,1]=(0.0901144254199)*x[0]+(-1.36818186255)*x[1]+(1.2969609239)*x[2]
-        arg[2,1,0]=(0.158329511499)*x[0]+(0.696997185217)*x[1]+(-0.400535235927)*x[2]
-        arg[2,1,1]=(-1.44570853201)*x[0]+(0.237359587195)*x[1]+(-1.17323024801)*x[2]
-        arg[3,0,0]=(-1.4325812824)*x[0]+(-0.733085265902)*x[1]+(0.125883186484)*x[2]
-        arg[3,0,1]=(-0.0529889021435)*x[0]+(0.335154600942)*x[1]+(0.839337375209)*x[2]
-        arg[3,1,0]=(-0.423552182963)*x[0]+(1.31813289315)*x[1]+(0.13235854915)*x[2]
-        arg[3,1,1]=(0.53278572217)*x[0]+(0.159434073071)*x[1]+(-0.313621199136)*x[2]
-        arg[4,0,0]=(0.747779887673)*x[0]+(0.30977483911)*x[1]+(-0.0760295896739)*x[2]
-        arg[4,0,1]=(0.00295118909194)*x[0]+(-0.687914867842)*x[1]+(0.0386268422915)*x[2]
-        arg[4,1,0]=(-0.276363532754)*x[0]+(0.52102466785)*x[1]+(-0.684840191917)*x[2]
-        arg[4,1,1]=(0.0283138898538)*x[0]+(0.116042458294)*x[1]+(0.485578401528)*x[2]
-        arg[5,0,0]=(-0.118402060192)*x[0]+(-1.18409809944)*x[1]+(-0.304048852342)*x[2]
-        arg[5,0,1]=(0.174393790186)*x[0]+(-0.524912689263)*x[1]+(-0.648708392355)*x[2]
-        arg[5,1,0]=(-0.254958756344)*x[0]+(-0.772071348728)*x[1]+(-0.0572494064027)*x[2]
-        arg[5,1,1]=(-0.74777072018)*x[0]+(0.19109939364)*x[1]+(0.498973987814)*x[2]
-        ref[0,0,0]=(0.986457444152)/(o+1.)+(0.258994989412)+(0.0802852749346)*0.5**o
-        ref[0,0,1]=(-0.0286717143415)/(o+1.)+(0.554867138611)+(-0.115397940627)*0.5**o
-        ref[0,1,0]=(-0.886482131138)/(o+1.)+(0.464293129749)+(0.125333386946)*0.5**o
-        ref[0,1,1]=(0.199214164457)/(o+1.)+(0.336882900218)+(-0.472396346443)*0.5**o
-        ref[1,0,0]=(0.36021680954)/(o+1.)+(0.408903924703)+(-0.780817864055)*0.5**o
-        ref[1,0,1]=(0.44795581074)/(o+1.)+(0.472159267742)+(0.391128251477)*0.5**o
-        ref[1,1,0]=(1.02665734893)/(o+1.)+(-0.71418625728)+(-0.898451524719)*0.5**o
-        ref[1,1,1]=(0.0322676607777)/(o+1.)+(0.105378958385)+(-0.0896073626306)*0.5**o
-        ref[2,0,0]=(1.15723247637)/(o+1.)+(-0.719604538702)+(-0.86439896505)*0.5**o
-        ref[2,0,1]=(-0.254100181576)/(o+1.)+(-0.0387997401585)+(0.35059314866)*0.5**o
-        ref[2,1,0]=(-0.636439167982)/(o+1.)+(0.563390681981)+(-0.0355507351918)*0.5**o
-        ref[2,1,1]=(-0.265265225142)/(o+1.)+(-0.635620798949)+(-0.845072369786)*0.5**o
-        ref[3,0,0]=(-0.062162800164)/(o+1.)+(-0.554499928282)+(-0.868620705087)*0.5**o
-        ref[3,0,1]=(0.784681961813)/(o+1.)+(0.355202655131)+(-0.373584198067)*0.5**o
-        ref[3,1,0]=(1.20272043429)/(o+1.)+(0.352677694103)+(-0.881136563162)*0.5**o
-        ref[3,1,1]=(-0.311152797156)/(o+1.)+(0.313736563953)+(0.0622782653549)*0.5**o
-        ref[4,0,0]=(-0.365517620238)/(o+1.)+(0.733502174253)+(-0.119961591158)*0.5**o
-        ref[4,0,1]=(0.0155845896619)/(o+1.)+(-0.654963543839)+(0.648005661558)*0.5**o
-        ref[4,1,0]=(0.405697975915)/(o+1.)+(-0.637805133954)+(0.429733235172)*0.5**o
-        ref[4,1,1]=(-0.0469738326054)/(o+1.)+(0.0590721074184)+(0.558764367445)*0.5**o
-        ref[5,0,0]=(-0.333825007954)/(o+1.)+(-0.46448520882)+(-0.343753586377)*0.5**o
-        ref[5,0,1]=(-0.469125954795)/(o+1.)+(-0.147192309255)+(-0.235716718127)*0.5**o
-        ref[5,1,0]=(-0.573275891777)/(o+1.)+(-0.478328163121)+(0.445652706545)*0.5**o
-        ref[5,1,1]=(0.0545515234726)/(o+1.)+(-0.153919681346)+(0.195590500493)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.226142137728)*x[0]+(0.85681895183)*x[1]
-        arg[0,0,0,1]=(-0.824407181762)*x[0]+(-0.290023144892)*x[1]
-        arg[0,0,1,0]=(-1.25987816017)*x[0]+(0.824340990595)*x[1]
-        arg[0,0,1,1]=(-0.0917811606765)*x[0]+(0.660211932964)*x[1]
-        arg[0,0,2,0]=(-1.31073149178)*x[0]+(0.482324984918)*x[1]
-        arg[0,0,2,1]=(0.256995458227)*x[0]+(0.79244254852)*x[1]
-        arg[0,1,0,0]=(-0.0682147475407)*x[0]+(0.243620052061)*x[1]
-        arg[0,1,0,1]=(0.071099982687)*x[0]+(-0.62986754897)*x[1]
-        arg[0,1,1,0]=(-0.0716793733131)*x[0]+(-1.15235525814)*x[1]
-        arg[0,1,1,1]=(0.193107575216)*x[0]+(-0.596149957543)*x[1]
-        arg[0,1,2,0]=(-0.160142629886)*x[0]+(1.36581707067)*x[1]
-        arg[0,1,2,1]=(-1.21477648376)*x[0]+(-0.732000298369)*x[1]
-        arg[0,2,0,0]=(-1.02468971059)*x[0]+(0.330721595217)*x[1]
-        arg[0,2,0,1]=(1.11414907391)*x[0]+(1.29386127812)*x[1]
-        arg[0,2,1,0]=(1.1485850154)*x[0]+(0.387585977495)*x[1]
-        arg[0,2,1,1]=(0.237382583072)*x[0]+(1.56248221279)*x[1]
-        arg[0,2,2,0]=(-0.949129049229)*x[0]+(0.578823379063)*x[1]
-        arg[0,2,2,1]=(-1.0667182537)*x[0]+(0.462227485959)*x[1]
-        arg[0,3,0,0]=(1.37954377554)*x[0]+(0.541856880139)*x[1]
-        arg[0,3,0,1]=(0.401584700319)*x[0]+(0.577102327147)*x[1]
-        arg[0,3,1,0]=(-0.289796408108)*x[0]+(0.807853785325)*x[1]
-        arg[0,3,1,1]=(0.0038467861822)*x[0]+(-0.931311510771)*x[1]
-        arg[0,3,2,0]=(0.859036254821)*x[0]+(0.198884218516)*x[1]
-        arg[0,3,2,1]=(-0.00310256070968)*x[0]+(0.511838475968)*x[1]
-        arg[0,4,0,0]=(0.539686886802)*x[0]+(-0.324612924267)*x[1]
-        arg[0,4,0,1]=(-0.0458655898565)*x[0]+(0.211810380966)*x[1]
-        arg[0,4,1,0]=(0.302333533003)*x[0]+(0.0663033316831)*x[1]
-        arg[0,4,1,1]=(-0.981519161639)*x[0]+(-0.00207756909914)*x[1]
-        arg[0,4,2,0]=(0.283659447004)*x[0]+(-0.231526592979)*x[1]
-        arg[0,4,2,1]=(-1.17679167875)*x[0]+(0.285698985756)*x[1]
-        arg[1,0,0,0]=(-0.162900059582)*x[0]+(-0.877164340783)*x[1]
-        arg[1,0,0,1]=(-0.50468605065)*x[0]+(-0.160440073709)*x[1]
-        arg[1,0,1,0]=(-0.100901676644)*x[0]+(-0.296111526029)*x[1]
-        arg[1,0,1,1]=(0.176107421869)*x[0]+(1.74393708745)*x[1]
-        arg[1,0,2,0]=(-0.979807721703)*x[0]+(-0.229400841067)*x[1]
-        arg[1,0,2,1]=(0.217472795645)*x[0]+(0.0881503243323)*x[1]
-        arg[1,1,0,0]=(-0.127980123625)*x[0]+(0.0932095456541)*x[1]
-        arg[1,1,0,1]=(0.829674410931)*x[0]+(-0.796196041601)*x[1]
-        arg[1,1,1,0]=(1.28656110233)*x[0]+(-1.27850471392)*x[1]
-        arg[1,1,1,1]=(1.159269884)*x[0]+(-0.973135433631)*x[1]
-        arg[1,1,2,0]=(1.46274837856)*x[0]+(-1.81554270863)*x[1]
-        arg[1,1,2,1]=(0.0973472511688)*x[0]+(0.551451261495)*x[1]
-        arg[1,2,0,0]=(0.510667671293)*x[0]+(-0.51075982099)*x[1]
-        arg[1,2,0,1]=(-1.41612093451)*x[0]+(0.614417669629)*x[1]
-        arg[1,2,1,0]=(1.46595125796)*x[0]+(0.60374279122)*x[1]
-        arg[1,2,1,1]=(-0.317185218187)*x[0]+(-0.0785532882696)*x[1]
-        arg[1,2,2,0]=(-0.388504041993)*x[0]+(-0.838003398775)*x[1]
-        arg[1,2,2,1]=(0.0497207129012)*x[0]+(-0.622155692247)*x[1]
-        arg[1,3,0,0]=(-0.0471400179563)*x[0]+(1.3378948207)*x[1]
-        arg[1,3,0,1]=(-1.22250822195)*x[0]+(0.629714783138)*x[1]
-        arg[1,3,1,0]=(-1.28801080408)*x[0]+(-1.54079710038)*x[1]
-        arg[1,3,1,1]=(-0.426412448469)*x[0]+(-1.09410474021)*x[1]
-        arg[1,3,2,0]=(0.022834167351)*x[0]+(-0.497423389788)*x[1]
-        arg[1,3,2,1]=(-0.787492124301)*x[0]+(-0.245621168419)*x[1]
-        arg[1,4,0,0]=(-1.37814880919)*x[0]+(-0.704805848451)*x[1]
-        arg[1,4,0,1]=(-1.12494770055)*x[0]+(1.44920024305)*x[1]
-        arg[1,4,1,0]=(-0.809532572761)*x[0]+(1.16638587657)*x[1]
-        arg[1,4,1,1]=(0.931784486816)*x[0]+(1.34629889453)*x[1]
-        arg[1,4,2,0]=(-0.172430942793)*x[0]+(-0.584736998321)*x[1]
-        arg[1,4,2,1]=(0.00542948736389)*x[0]+(0.43917597284)*x[1]
-        arg[2,0,0,0]=(-0.946122337406)*x[0]+(-0.161940168137)*x[1]
-        arg[2,0,0,1]=(-0.7856653779)*x[0]+(-0.75287701788)*x[1]
-        arg[2,0,1,0]=(-1.08858367592)*x[0]+(-0.530380818694)*x[1]
-        arg[2,0,1,1]=(-1.0573555095)*x[0]+(-0.854148765785)*x[1]
-        arg[2,0,2,0]=(0.723412825328)*x[0]+(0.326761950437)*x[1]
-        arg[2,0,2,1]=(-0.0143142161225)*x[0]+(-0.752724311876)*x[1]
-        arg[2,1,0,0]=(-0.942548092355)*x[0]+(0.700861094897)*x[1]
-        arg[2,1,0,1]=(-0.712286567957)*x[0]+(0.230406545738)*x[1]
-        arg[2,1,1,0]=(1.27414839774)*x[0]+(0.724784649037)*x[1]
-        arg[2,1,1,1]=(0.637494163002)*x[0]+(0.442489599192)*x[1]
-        arg[2,1,2,0]=(1.81617631726)*x[0]+(1.56870218809)*x[1]
-        arg[2,1,2,1]=(1.16419900666)*x[0]+(-0.044314729141)*x[1]
-        arg[2,2,0,0]=(0.880267125196)*x[0]+(0.77124406259)*x[1]
-        arg[2,2,0,1]=(0.482402867542)*x[0]+(0.0746924305017)*x[1]
-        arg[2,2,1,0]=(0.105861259696)*x[0]+(0.484292207267)*x[1]
-        arg[2,2,1,1]=(-0.107785838196)*x[0]+(0.701132243209)*x[1]
-        arg[2,2,2,0]=(0.559717405844)*x[0]+(-1.5585942717)*x[1]
-        arg[2,2,2,1]=(-0.989130712605)*x[0]+(0.221361137556)*x[1]
-        arg[2,3,0,0]=(-0.045471818095)*x[0]+(-0.437941959792)*x[1]
-        arg[2,3,0,1]=(1.25840468379)*x[0]+(-1.18872011057)*x[1]
-        arg[2,3,1,0]=(1.70665829408)*x[0]+(0.705273921003)*x[1]
-        arg[2,3,1,1]=(-0.0928709253845)*x[0]+(0.785115449756)*x[1]
-        arg[2,3,2,0]=(-0.887243418838)*x[0]+(1.06790660642)*x[1]
-        arg[2,3,2,1]=(-0.572644686872)*x[0]+(-0.672831948394)*x[1]
-        arg[2,4,0,0]=(1.28282566801)*x[0]+(0.651985199447)*x[1]
-        arg[2,4,0,1]=(0.0965663229335)*x[0]+(1.33819998052)*x[1]
-        arg[2,4,1,0]=(0.205569041098)*x[0]+(-0.873095358733)*x[1]
-        arg[2,4,1,1]=(-1.04452025745)*x[0]+(-0.204917033907)*x[1]
-        arg[2,4,2,0]=(-0.181163938972)*x[0]+(0.0341993409272)*x[1]
-        arg[2,4,2,1]=(1.68327027059)*x[0]+(-0.289436355642)*x[1]
-        arg[3,0,0,0]=(1.05712810731)*x[0]+(0.915711819735)*x[1]
-        arg[3,0,0,1]=(-0.171072039482)*x[0]+(-0.160656943623)*x[1]
-        arg[3,0,1,0]=(-1.27063799869)*x[0]+(-0.605131642813)*x[1]
-        arg[3,0,1,1]=(0.940512990835)*x[0]+(-0.116675577531)*x[1]
-        arg[3,0,2,0]=(-0.194213869952)*x[0]+(0.364066752025)*x[1]
-        arg[3,0,2,1]=(-0.328780465397)*x[0]+(-0.114689413673)*x[1]
-        arg[3,1,0,0]=(-0.825914305895)*x[0]+(-0.167010056731)*x[1]
-        arg[3,1,0,1]=(0.657779056207)*x[0]+(0.0666252451638)*x[1]
-        arg[3,1,1,0]=(-0.464004426036)*x[0]+(-0.340932918409)*x[1]
-        arg[3,1,1,1]=(-1.6698652667)*x[0]+(0.731870373141)*x[1]
-        arg[3,1,2,0]=(1.39626250779)*x[0]+(-0.879152855557)*x[1]
-        arg[3,1,2,1]=(1.34973919508)*x[0]+(-0.129753332761)*x[1]
-        arg[3,2,0,0]=(1.03443450706)*x[0]+(0.807333477811)*x[1]
-        arg[3,2,0,1]=(0.366011302596)*x[0]+(0.543804800926)*x[1]
-        arg[3,2,1,0]=(0.262446846036)*x[0]+(-0.247786850991)*x[1]
-        arg[3,2,1,1]=(-1.04657091196)*x[0]+(-0.485443426155)*x[1]
-        arg[3,2,2,0]=(0.342434327538)*x[0]+(-0.148503585588)*x[1]
-        arg[3,2,2,1]=(-0.189833429716)*x[0]+(0.424391874819)*x[1]
-        arg[3,3,0,0]=(-0.118348838118)*x[0]+(0.397628264341)*x[1]
-        arg[3,3,0,1]=(0.481440510084)*x[0]+(-0.393576221424)*x[1]
-        arg[3,3,1,0]=(0.907533552208)*x[0]+(-0.668646549376)*x[1]
-        arg[3,3,1,1]=(-1.49731714213)*x[0]+(-1.18710678264)*x[1]
-        arg[3,3,2,0]=(-0.460660079207)*x[0]+(1.48078266444)*x[1]
-        arg[3,3,2,1]=(-0.161073556988)*x[0]+(-0.486827042754)*x[1]
-        arg[3,4,0,0]=(-0.668755455623)*x[0]+(0.345804059434)*x[1]
-        arg[3,4,0,1]=(1.00528889193)*x[0]+(0.978507928191)*x[1]
-        arg[3,4,1,0]=(0.98955856331)*x[0]+(1.0421852144)*x[1]
-        arg[3,4,1,1]=(0.711688260873)*x[0]+(1.39962222322)*x[1]
-        arg[3,4,2,0]=(1.08512429209)*x[0]+(-0.555249097743)*x[1]
-        arg[3,4,2,1]=(-1.10443784007)*x[0]+(-0.782274429169)*x[1]
-        ref[0,0,0,0]=(0.151153165564)/(o+1.)+(0.112609656739)+(0.254304335059)*0.5**o
-        ref[0,0,0,1]=(-0.530602583511)/(o+1.)+(0.1817855378)+(-0.947398818743)*0.5**o
-        ref[0,0,1,0]=(0.308747437738)/(o+1.)+(-0.0338129255643)+(-0.676658756184)*0.5**o
-        ref[0,0,1,1]=(0.321026553427)/(o+1.)+(0.0692705367618)+(0.108863145337)*0.5**o
-        ref[0,0,2,0]=(-0.0908034666655)/(o+1.)+(-0.1100205155)+(-0.517562009199)*0.5**o
-        ref[0,0,2,1]=(0.303456040903)/(o+1.)+(0.500090875336)+(-0.254199784829)*0.5**o
-        ref[0,1,0,0]=(-0.440641221831)/(o+1.)+(0.456218946873)+(-0.296391367396)*0.5**o
-        ref[0,1,0,1]=(0.222628561762)/(o+1.)+(-0.162064412854)+(-0.457267302337)*0.5**o
-        ref[0,1,1,0]=(-0.913361887408)/(o+1.)+(-0.356168674239)+(0.401664604431)*0.5**o
-        ref[0,1,1,1]=(-0.543116639248)/(o+1.)+(-0.120902439422)+(0.381879135767)*0.5**o
-        ref[0,1,2,0]=(0.993649262831)/(o+1.)+(0.384695858206)+(-0.55736653846)*0.5**o
-        ref[0,1,2,1]=(-0.968077797451)/(o+1.)+(-0.187765942637)+(-0.603167099406)*0.5**o
-        ref[0,2,0,0]=(0.873662019918)/(o+1.)+(-0.710635360033)+(-0.146359415223)*0.5**o
-        ref[0,2,0,1]=(0.466408230693)/(o+1.)+(0.77626565285)+(0.389070815631)*0.5**o
-        ref[0,2,1,0]=(-0.475010813579)/(o+1.)+(0.525435880006)+(0.960310046461)*0.5**o
-        ref[0,2,1,1]=(0.697127520484)/(o+1.)+(0.357204276552)+(0.388328722275)*0.5**o
-        ref[0,2,2,0]=(-0.108434738487)/(o+1.)+(0.356443300466)+(-0.97475753261)*0.5**o
-        ref[0,2,2,1]=(0.952274964304)/(o+1.)+(-0.497379508976)+(-0.562006714089)*0.5**o
-        ref[0,3,0,0]=(-0.0368012761671)/(o+1.)+(0.594000625518)+(0.770200680808)*0.5**o
-        ref[0,3,0,1]=(0.450361861836)/(o+1.)+(0.182031052848)+(0.164263059934)*0.5**o
-        ref[0,3,1,0]=(0.500714741956)/(o+1.)+(0.0479711343168)+(-0.0785996333735)*0.5**o
-        ref[0,3,1,1]=(-0.949280938645)/(o+1.)+(0.452441874504)+(-0.88306753495)*0.5**o
-        ref[0,3,2,0]=(0.186931712837)/(o+1.)+(0.222335175903)+(0.426318408694)*0.5**o
-        ref[0,3,2,1]=(-0.288015428918)/(o+1.)+(0.80948657963)+(-0.822221815085)*0.5**o
-        ref[0,4,0,0]=(0.670151184695)/(o+1.)+(-0.415883847013)+(0.376690471866)*0.5**o
-        ref[0,4,0,1]=(-0.107106843992)/(o+1.)+(0.555375298435)+(-0.837698961768)*0.5**o
-        ref[0,4,1,0]=(-0.299999096802)/(o+1.)+(0.668996782774)+(-0.669357604061)*0.5**o
-        ref[0,4,1,1]=(0.778006183401)/(o+1.)+(-0.614473529032)+(-0.532655856076)*0.5**o
-        ref[0,4,2,0]=(-0.250068389818)/(o+1.)+(0.156274314197)+(-0.0103473845504)*0.5**o
-        ref[0,4,2,1]=(0.902125322216)/(o+1.)+(-0.616424567683)+(-0.560368879846)*0.5**o
-        ref[1,0,0,0]=(-0.133690258295)/(o+1.)+(-0.715949360249)+(0.525524578427)*0.5**o
-        ref[1,0,0,1]=(-0.788097689216)/(o+1.)+(0.0998405659256)+(-0.076709566994)*0.5**o
-        ref[1,0,1,0]=(0.144280886187)/(o+1.)+(0.0775377290314)+(-0.696369546924)*0.5**o
-        ref[1,0,1,1]=(0.824172196605)/(o+1.)+(0.561804029444)+(-0.0277357461773)*0.5**o
-        ref[1,0,2,0]=(0.422564421802)/(o+1.)+(-0.60719307099)+(-0.417386842591)*0.5**o
-        ref[1,0,2,1]=(0.778908672762)/(o+1.)+(0.0163446340765)+(-0.505974820938)*0.5**o
-        ref[1,1,0,0]=(0.0574071047387)/(o+1.)+(-0.350514214742)+(0.608850746775)*0.5**o
-        ref[1,1,0,1]=(-0.991660961792)/(o+1.)+(0.322084279455)+(0.380970772212)*0.5**o
-        ref[1,1,1,0]=(-0.823761120268)/(o+1.)+(-0.0495419092898)+(0.930901327253)*0.5**o
-        ref[1,1,1,1]=(-0.384729980569)/(o+1.)+(-0.0392583789163)+(0.649381188769)*0.5**o
-        ref[1,1,2,0]=(-0.840365304069)/(o+1.)+(-0.0150512662777)+(0.517673506558)*0.5**o
-        ref[1,1,2,1]=(0.555976660846)/(o+1.)+(-0.307265886898)+(0.707353625614)*0.5**o
-        ref[1,2,0,0]=(-0.423056705491)/(o+1.)+(0.0559404393793)+(0.311083677036)*0.5**o
-        ref[1,2,0,1]=(0.15409797664)/(o+1.)+(-0.0906637067519)+(-0.774473828018)*0.5**o
-        ref[1,2,1,0]=(0.796718644088)/(o+1.)+(0.248012077098)+(0.776951250898)*0.5**o
-        ref[1,2,1,1]=(-0.342830889263)/(o+1.)+(-0.282162737841)+(0.511417858487)*0.5**o
-        ref[1,2,2,0]=(-0.722403016671)/(o+1.)+(-0.367059457954)+(0.230014491812)*0.5**o
-        ref[1,2,2,1]=(-0.773685058881)/(o+1.)+(0.412807900451)+(-0.624365721366)*0.5**o
-        ref[1,3,0,0]=(0.527481434758)/(o+1.)+(0.36602961117)+(0.031214145649)*0.5**o
-        ref[1,3,0,1]=(0.0630927531585)/(o+1.)+(-0.164989701995)+(-0.325906787975)*0.5**o
-        ref[1,3,1,0]=(-0.612390590593)/(o+1.)+(-0.78855996274)+(-0.63929738839)*0.5**o
-        ref[1,3,1,1]=(-0.962656044265)/(o+1.)+(-0.00576535037253)+(-0.546330443673)*0.5**o
-        ref[1,3,2,0]=(-0.947280922008)/(o+1.)+(-0.137449579996)+(0.747590859563)*0.5**o
-        ref[1,3,2,1]=(-0.946623026202)/(o+1.)+(0.0787536550213)+(-0.24399757656)*0.5**o
-        ref[1,4,0,0]=(-0.174471016943)/(o+1.)+(-0.636500556039)+(-0.635482528623)*0.5**o
-        ref[1,4,0,1]=(0.806379391595)/(o+1.)+(-0.00304106577093)+(-0.476044717545)*0.5**o
-        ref[1,4,1,0]=(0.729649125134)/(o+1.)+(0.0151477051616)+(-0.403091231646)*0.5**o
-        ref[1,4,1,1]=(0.559976454745)/(o+1.)+(0.479295896421)+(0.75951513376)*0.5**o
-        ref[1,4,2,0]=(0.272199270818)/(o+1.)+(-0.0929072274332)+(-0.843552757065)*0.5**o
-        ref[1,4,2,1]=(-0.552663678377)/(o+1.)+(0.613784745778)+(-0.230300352975)*0.5**o
-        ref[2,0,0,0]=(-0.174247908098)/(o+1.)+(-0.108873783282)+(-0.716067030882)*0.5**o
-        ref[2,0,0,1]=(-0.300584841532)/(o+1.)+(-0.485363665493)+(-0.267230223262)*0.5**o
-        ref[2,0,1,0]=(0.316261805154)/(o+1.)+(-0.523474106451)+(-0.888278086869)*0.5**o
-        ref[2,0,1,1]=(-0.699622562861)/(o+1.)+(-0.151089538248)+(-0.909702635929)*0.5**o
-        ref[2,0,2,0]=(0.728545639829)/(o+1.)+(0.192083148877)+(-0.0625371618174)*0.5**o
-        ref[2,0,2,1]=(-0.22042267239)/(o+1.)+(-0.611974599324)+(0.677333343041)*0.5**o
-        ref[2,1,0,0]=(-0.0734883811113)/(o+1.)+(0.36100831022)+(-0.890215236787)*0.5**o
-        ref[2,1,0,1]=(0.121656829057)/(o+1.)+(-0.130801635799)+(-0.341933579678)*0.5**o
-        ref[2,1,1,0]=(0.221353168629)/(o+1.)+(0.618635673483)+(0.540308531179)*0.5**o
-        ref[2,1,1,1]=(0.0152580531273)/(o+1.)+(0.252173415542)+(0.560378877984)*0.5**o
-        ref[2,1,2,0]=(0.580319777731)/(o+1.)+(0.90566612137)+(0.993226484879)*0.5**o
-        ref[2,1,2,1]=(-0.710250320949)/(o+1.)+(0.742177021871)+(0.345780554724)*0.5**o
-        ref[2,2,0,0]=(0.770701563507)/(o+1.)+(0.240823471881)+(0.399162680517)*0.5**o
-        ref[2,2,0,1]=(0.76121761761)/(o+1.)+(0.128382656738)+(-0.460887633042)*0.5**o
-        ref[2,2,1,0]=(-0.269854962057)/(o+1.)+(0.690854898294)+(-0.521701367567)*0.5**o
-        ref[2,2,1,1]=(0.719518595712)/(o+1.)+(0.029596430244)+(-0.185365051187)*0.5**o
-        ref[2,2,2,0]=(-0.671157761165)/(o+1.)+(-0.142688285012)+(-0.0423425346644)*0.5**o
-        ref[2,2,2,1]=(-0.541156097112)/(o+1.)+(0.0765180918929)+(-0.379649661722)*0.5**o
-        ref[2,3,0,0]=(-0.0604347109212)/(o+1.)+(-0.19403702073)+(-0.034905025507)*0.5**o
-        ref[2,3,0,1]=(-0.793398507071)/(o+1.)+(0.255681280626)+(0.351720519037)*0.5**o
-        ref[2,3,1,0]=(-0.267058413731)/(o+1.)+(0.852211426049)+(0.974567776717)*0.5**o
-        ref[2,3,1,1]=(0.228396641207)/(o+1.)+(0.322922896735)+(-0.181997910305)*0.5**o
-        ref[2,3,2,0]=(0.480987773937)/(o+1.)+(-0.197709028569)+(0.0950934707835)*0.5**o
-        ref[2,3,2,1]=(-0.648934475027)/(o+1.)+(-0.418383297875)+(0.240224435511)*0.5**o
-        ref[2,4,0,0]=(0.430020261528)/(o+1.)+(0.53421018733)+(0.436370231269)*0.5**o
-        ref[2,4,0,1]=(0.906390660223)/(o+1.)+(-0.056057545856)+(0.640490734948)*0.5**o
-        ref[2,4,1,0]=(-0.732099770943)/(o+1.)+(-0.0485027617732)+(0.161578976854)*0.5**o
-        ref[2,4,1,1]=(-0.827495680848)/(o+1.)+(0.285044728936)+(-0.992031068384)*0.5**o
-        ref[2,4,2,0]=(-0.919905471787)/(o+1.)+(0.656971386264)+(-0.541001898785)*0.5**o
-        ref[2,4,2,1]=(0.161975875302)/(o+1.)+(0.272665206557)+(0.686527626533)*0.5**o
-        ref[3,0,0,0]=(0.584120963259)/(o+1.)+(0.207930729804)+(0.972857504177)*0.5**o
-        ref[3,0,0,1]=(0.315823141491)/(o+1.)+(-0.217561208386)+(-0.212429707823)*0.5**o
-        ref[3,0,1,0]=(-0.732294996139)/(o+1.)+(-0.278653143596)+(-0.586168358175)*0.5**o
-        ref[3,0,1,1]=(0.481321847225)/(o+1.)+(-0.070080648792)+(0.482676863662)*0.5**o
-        ref[3,0,2,0]=(0.616679859076)/(o+1.)+(-0.418784546677)+(0.390742116352)*0.5**o
-        ref[3,0,2,1]=(0.866778417448)/(o+1.)+(-0.686585656643)+(0.0629230167692)*0.5**o
-        ref[3,1,0,0]=(0.531890054167)/(o+1.)+(-0.516187607633)+(-0.492439201527)*0.5**o
-        ref[3,1,0,1]=(-0.512361639413)/(o+1.)+(0.499557182545)+(0.237651575694)*0.5**o
-        ref[3,1,1,0]=(-0.67542965405)/(o+1.)+(0.274414249559)+(-0.678336189514)*0.5**o
-        ref[3,1,1,1]=(0.371936242507)/(o+1.)+(-0.1636482466)+(-0.982634642862)*0.5**o
-        ref[3,1,2,0]=(-0.799408831501)/(o+1.)+(0.458633399549)+(0.399251684639)*0.5**o
-        ref[3,1,2,1]=(-0.0145253903686)/(o+1.)+(0.238472345905)+(0.757566560882)*0.5**o
-        ref[3,2,0,0]=(-0.130519473112)/(o+1.)+(0.695277604837)+(0.581732248306)*0.5**o
-        ref[3,2,0,1]=(0.632010536438)/(o+1.)+(0.123066205529)+(0.0316731560259)*0.5**o
-        ref[3,2,1,0]=(-0.709926210356)/(o+1.)+(0.0926699972302)+(0.53924621094)*0.5**o
-        ref[3,2,1,1]=(0.428094002247)/(o+1.)+(-0.841997926131)+(-0.276112488096)*0.5**o
-        ref[3,2,2,0]=(0.708481148086)/(o+1.)+(-0.50498161534)+(0.495412824545)*0.5**o
-        ref[3,2,2,1]=(0.782824622703)/(o+1.)+(-0.151509698687)+(-0.245246780227)*0.5**o
-        ref[3,3,0,0]=(0.848460868418)/(o+1.)+(-0.104639248461)+(-0.359902945273)*0.5**o
-        ref[3,3,0,1]=(0.0569151307298)/(o+1.)+(-0.0674224535469)+(0.165794065024)*0.5**o
-        ref[3,3,1,0]=(-0.165683739908)/(o+1.)+(-0.183388699236)+(0.771348141212)*0.5**o
-        ref[3,3,1,1]=(-0.932550058069)/(o+1.)+(-0.47828109001)+(-0.795311686688)*0.5**o
-        ref[3,3,2,0]=(0.821542940923)/(o+1.)+(0.166853194487)+(-0.13512674466)*0.5**o
-        ref[3,3,2,1]=(-0.46375871628)/(o+1.)+(0.132701267732)+(-0.449544418926)*0.5**o
-        ref[3,4,0,0]=(-0.074530542168)/(o+1.)+(-0.0567877963797)+(-0.134845261261)*0.5**o
-        ref[3,4,0,1]=(0.238671520479)/(o+1.)+(0.50689253572)+(0.731340228204)*0.5**o
-        ref[3,4,1,0]=(0.981601513335)/(o+1.)+(0.400717209822)+(0.248707844726)*0.5**o
-        ref[3,4,1,1]=(0.592304390107)/(o+1.)+(0.342408637328)+(0.834188819333)*0.5**o
-        ref[3,4,2,0]=(-0.339991330909)/(o+1.)+(-0.0145922376156)+(0.899051000485)*0.5**o
-        ref[3,4,2,1]=(-0.626610688164)/(o+1.)+(-0.417008165115)+(-0.426085250846)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.697666818785)*x[0]+(1.00202295791)*x[1]+(0.617700157184)*x[2]
-        arg[0,0,0,1]=(-0.465577819457)*x[0]+(-1.40054693355)*x[1]+(1.16912653295)*x[2]
-        arg[0,0,1,0]=(-1.26696500634)*x[0]+(-0.0469756169975)*x[1]+(-0.445591738991)*x[2]
-        arg[0,0,1,1]=(-1.61654321709)*x[0]+(-1.69522962467)*x[1]+(-1.06089094851)*x[2]
-        arg[0,0,2,0]=(0.229468378506)*x[0]+(0.716813596991)*x[1]+(-0.237703937029)*x[2]
-        arg[0,0,2,1]=(-1.12052051905)*x[0]+(0.835000004618)*x[1]+(-0.853004812404)*x[2]
-        arg[0,1,0,0]=(-1.75500745705)*x[0]+(0.655055836882)*x[1]+(1.05207750735)*x[2]
-        arg[0,1,0,1]=(-0.0746024824253)*x[0]+(-0.421596816958)*x[1]+(-0.375715855989)*x[2]
-        arg[0,1,1,0]=(-0.963269684396)*x[0]+(0.431993248836)*x[1]+(-1.63061928649)*x[2]
-        arg[0,1,1,1]=(-0.418757265018)*x[0]+(-0.665626168583)*x[1]+(-0.335734432507)*x[2]
-        arg[0,1,2,0]=(0.980346404307)*x[0]+(1.45442049802)*x[1]+(-0.833420308612)*x[2]
-        arg[0,1,2,1]=(-1.52536017847)*x[0]+(0.99484028681)*x[1]+(0.109754321663)*x[2]
-        arg[0,2,0,0]=(1.697179262)*x[0]+(-0.928732802147)*x[1]+(-0.653379513626)*x[2]
-        arg[0,2,0,1]=(0.682698902948)*x[0]+(0.829307959583)*x[1]+(-1.0300112276)*x[2]
-        arg[0,2,1,0]=(0.026084323266)*x[0]+(1.28865784608)*x[1]+(0.830446580645)*x[2]
-        arg[0,2,1,1]=(0.486291506032)*x[0]+(-0.519637742913)*x[1]+(0.81671330629)*x[2]
-        arg[0,2,2,0]=(-0.761591624634)*x[0]+(0.370951131011)*x[1]+(-0.256748479312)*x[2]
-        arg[0,2,2,1]=(-0.249974326513)*x[0]+(0.267323484635)*x[1]+(-1.09642130905)*x[2]
-        arg[0,3,0,0]=(0.752057563255)*x[0]+(-1.2772262175)*x[1]+(-0.264569668983)*x[2]
-        arg[0,3,0,1]=(-0.173167796447)*x[0]+(0.31873208356)*x[1]+(-0.599780701112)*x[2]
-        arg[0,3,1,0]=(-0.912464014941)*x[0]+(-1.56452517166)*x[1]+(1.37651660499)*x[2]
-        arg[0,3,1,1]=(0.302009667854)*x[0]+(0.524213064769)*x[1]+(0.316301522683)*x[2]
-        arg[0,3,2,0]=(-1.2940154673)*x[0]+(-0.900061396992)*x[1]+(0.3860029847)*x[2]
-        arg[0,3,2,1]=(-0.97354131341)*x[0]+(1.08221883964)*x[1]+(-0.739323076416)*x[2]
-        arg[0,4,0,0]=(1.86535317192)*x[0]+(-0.478359589546)*x[1]+(-0.798014592302)*x[2]
-        arg[0,4,0,1]=(-1.08518693851)*x[0]+(-0.186048654536)*x[1]+(1.04915573267)*x[2]
-        arg[0,4,1,0]=(-1.09692811055)*x[0]+(1.01042920935)*x[1]+(-0.73978089555)*x[2]
-        arg[0,4,1,1]=(0.654656964663)*x[0]+(0.279204596126)*x[1]+(0.886217781361)*x[2]
-        arg[0,4,2,0]=(-0.54009886291)*x[0]+(0.378037248739)*x[1]+(1.09785568886)*x[2]
-        arg[0,4,2,1]=(-1.43995958913)*x[0]+(-0.720157090994)*x[1]+(0.0676362028136)*x[2]
-        arg[1,0,0,0]=(1.47735412608)*x[0]+(0.342355546228)*x[1]+(-0.0134502415508)*x[2]
-        arg[1,0,0,1]=(-0.419536590369)*x[0]+(-1.61108470511)*x[1]+(1.51281979355)*x[2]
-        arg[1,0,1,0]=(1.31765698245)*x[0]+(-0.7499566294)*x[1]+(0.934537503478)*x[2]
-        arg[1,0,1,1]=(0.688467914883)*x[0]+(-1.32681280673)*x[1]+(-0.387405705058)*x[2]
-        arg[1,0,2,0]=(1.37069587556)*x[0]+(0.540830111773)*x[1]+(0.477311068263)*x[2]
-        arg[1,0,2,1]=(-0.572066213761)*x[0]+(-1.11950925494)*x[1]+(1.07939217872)*x[2]
-        arg[1,1,0,0]=(0.564997105326)*x[0]+(-0.73130546389)*x[1]+(0.435910937304)*x[2]
-        arg[1,1,0,1]=(0.513931739674)*x[0]+(-0.944043404826)*x[1]+(0.014114227468)*x[2]
-        arg[1,1,1,0]=(-0.77850597256)*x[0]+(-0.445835136484)*x[1]+(0.157478357479)*x[2]
-        arg[1,1,1,1]=(0.752431176866)*x[0]+(0.659759664199)*x[1]+(-0.859515433521)*x[2]
-        arg[1,1,2,0]=(0.0693158730911)*x[0]+(-0.820997827204)*x[1]+(-0.714694436829)*x[2]
-        arg[1,1,2,1]=(0.604674152847)*x[0]+(0.647261183132)*x[1]+(-1.21981352028)*x[2]
-        arg[1,2,0,0]=(0.0997504695984)*x[0]+(-0.271549839083)*x[1]+(-0.573467835942)*x[2]
-        arg[1,2,0,1]=(0.01861845581)*x[0]+(0.157410502406)*x[1]+(0.939257868776)*x[2]
-        arg[1,2,1,0]=(1.44909894631)*x[0]+(0.116038517547)*x[1]+(-0.851940489233)*x[2]
-        arg[1,2,1,1]=(1.34598841007)*x[0]+(1.79163125841)*x[1]+(0.719171044245)*x[2]
-        arg[1,2,2,0]=(-0.214737791448)*x[0]+(-1.85810839095)*x[1]+(-0.240776599927)*x[2]
-        arg[1,2,2,1]=(-0.574707645928)*x[0]+(-0.664173831956)*x[1]+(0.310262106696)*x[2]
-        arg[1,3,0,0]=(0.296213453592)*x[0]+(-0.831112482555)*x[1]+(0.130075739128)*x[2]
-        arg[1,3,0,1]=(-0.369510604457)*x[0]+(0.0373909697998)*x[1]+(1.6689129783)*x[2]
-        arg[1,3,1,0]=(0.0922435881419)*x[0]+(-0.280519827004)*x[1]+(0.285933839232)*x[2]
-        arg[1,3,1,1]=(-0.649253282272)*x[0]+(-0.460065044123)*x[1]+(-0.0711164948063)*x[2]
-        arg[1,3,2,0]=(0.793313307581)*x[0]+(-0.0587956351149)*x[1]+(0.810487259739)*x[2]
-        arg[1,3,2,1]=(-1.38668597055)*x[0]+(1.51396934198)*x[1]+(-1.13918550255)*x[2]
-        arg[1,4,0,0]=(1.40078167737)*x[0]+(-1.61915436345)*x[1]+(0.421710091214)*x[2]
-        arg[1,4,0,1]=(-1.37982015877)*x[0]+(1.30607371738)*x[1]+(-0.608888848419)*x[2]
-        arg[1,4,1,0]=(-0.558087802805)*x[0]+(-0.214169499512)*x[1]+(-0.766242546503)*x[2]
-        arg[1,4,1,1]=(-1.75503436584)*x[0]+(0.183604705451)*x[1]+(-0.148071484576)*x[2]
-        arg[1,4,2,0]=(0.537942069142)*x[0]+(-0.00640749928252)*x[1]+(-0.277544629657)*x[2]
-        arg[1,4,2,1]=(-0.652645833371)*x[0]+(-1.33439077026)*x[1]+(-0.226308197201)*x[2]
-        arg[2,0,0,0]=(1.45646289279)*x[0]+(1.40842127675)*x[1]+(1.75078281495)*x[2]
-        arg[2,0,0,1]=(0.867988651995)*x[0]+(1.35061812241)*x[1]+(-1.56520776323)*x[2]
-        arg[2,0,1,0]=(0.549686523522)*x[0]+(-0.528085465813)*x[1]+(-0.994978820267)*x[2]
-        arg[2,0,1,1]=(0.383595996552)*x[0]+(0.612989859087)*x[1]+(-0.560401247231)*x[2]
-        arg[2,0,2,0]=(-0.341259919499)*x[0]+(-0.125491675042)*x[1]+(0.545572340757)*x[2]
-        arg[2,0,2,1]=(-0.414269395434)*x[0]+(-0.433969881898)*x[1]+(-1.01820199328)*x[2]
-        arg[2,1,0,0]=(-0.113575280389)*x[0]+(0.326916039942)*x[1]+(-0.576072890249)*x[2]
-        arg[2,1,0,1]=(-0.296473969661)*x[0]+(0.195675099431)*x[1]+(-1.72378150831)*x[2]
-        arg[2,1,1,0]=(-1.31575932758)*x[0]+(-0.122557423522)*x[1]+(0.53435027695)*x[2]
-        arg[2,1,1,1]=(0.299435754608)*x[0]+(0.727140413706)*x[1]+(0.848931358475)*x[2]
-        arg[2,1,2,0]=(0.2618965198)*x[0]+(-0.461672573339)*x[1]+(0.923592803172)*x[2]
-        arg[2,1,2,1]=(-0.326817258523)*x[0]+(-0.0363300805442)*x[1]+(1.82049875918)*x[2]
-        arg[2,2,0,0]=(-0.435113320888)*x[0]+(0.0257984353786)*x[1]+(0.287846577657)*x[2]
-        arg[2,2,0,1]=(1.39178068279)*x[0]+(0.136781967539)*x[1]+(-1.38161590351)*x[2]
-        arg[2,2,1,0]=(-0.887874199356)*x[0]+(-0.476769153654)*x[1]+(-0.618760485829)*x[2]
-        arg[2,2,1,1]=(1.58883355098)*x[0]+(-0.889469047555)*x[1]+(-0.678486755843)*x[2]
-        arg[2,2,2,0]=(0.237147029365)*x[0]+(-0.509883462401)*x[1]+(0.533163151551)*x[2]
-        arg[2,2,2,1]=(0.66513913749)*x[0]+(1.30317030657)*x[1]+(0.804083365617)*x[2]
-        arg[2,3,0,0]=(1.01531518403)*x[0]+(1.3753053143)*x[1]+(0.000877284235964)*x[2]
-        arg[2,3,0,1]=(-0.40853642543)*x[0]+(0.154794268783)*x[1]+(-1.34306671117)*x[2]
-        arg[2,3,1,0]=(0.43065284359)*x[0]+(-0.28965146009)*x[1]+(0.660248828789)*x[2]
-        arg[2,3,1,1]=(-1.4334922681)*x[0]+(-0.0348802858609)*x[1]+(0.502051304974)*x[2]
-        arg[2,3,2,0]=(-1.17399537487)*x[0]+(0.865787043946)*x[1]+(-0.0105949677478)*x[2]
-        arg[2,3,2,1]=(0.63104158794)*x[0]+(0.436196079951)*x[1]+(0.498606623061)*x[2]
-        arg[2,4,0,0]=(-1.44410177354)*x[0]+(0.513406326011)*x[1]+(0.699127199447)*x[2]
-        arg[2,4,0,1]=(-0.981727023077)*x[0]+(0.484182120695)*x[1]+(0.667175832045)*x[2]
-        arg[2,4,1,0]=(-1.3352602588)*x[0]+(0.626269023364)*x[1]+(0.813537646695)*x[2]
-        arg[2,4,1,1]=(-0.932486930114)*x[0]+(0.299448807849)*x[1]+(0.195862014797)*x[2]
-        arg[2,4,2,0]=(-0.0621489644806)*x[0]+(0.131979664158)*x[1]+(0.442029269778)*x[2]
-        arg[2,4,2,1]=(-0.507508608633)*x[0]+(-1.28613226533)*x[1]+(-0.697920444023)*x[2]
-        arg[3,0,0,0]=(-0.984942677585)*x[0]+(-1.58913299616)*x[1]+(-0.373026784822)*x[2]
-        arg[3,0,0,1]=(0.616666427113)*x[0]+(-0.625162800471)*x[1]+(-0.796307290839)*x[2]
-        arg[3,0,1,0]=(-0.48469203683)*x[0]+(-0.0572105166553)*x[1]+(0.809572383581)*x[2]
-        arg[3,0,1,1]=(-0.487160309892)*x[0]+(0.77646454341)*x[1]+(-0.41947544573)*x[2]
-        arg[3,0,2,0]=(-1.17902121554)*x[0]+(-0.244939532033)*x[1]+(-0.282994359476)*x[2]
-        arg[3,0,2,1]=(0.33515909881)*x[0]+(0.146866561705)*x[1]+(1.81486098364)*x[2]
-        arg[3,1,0,0]=(0.379977901341)*x[0]+(0.834531701517)*x[1]+(-0.0242027062166)*x[2]
-        arg[3,1,0,1]=(0.184318292766)*x[0]+(1.08367911805)*x[1]+(-0.164531741594)*x[2]
-        arg[3,1,1,0]=(-1.00967115996)*x[0]+(0.542699640149)*x[1]+(0.707616701259)*x[2]
-        arg[3,1,1,1]=(0.856948233811)*x[0]+(-1.2186550297)*x[1]+(-0.034268798159)*x[2]
-        arg[3,1,2,0]=(0.259470684477)*x[0]+(-1.03586983732)*x[1]+(-0.157275979341)*x[2]
-        arg[3,1,2,1]=(-0.161954890658)*x[0]+(1.65853209885)*x[1]+(0.381113456719)*x[2]
-        arg[3,2,0,0]=(-0.437413004681)*x[0]+(-0.730340273929)*x[1]+(-0.687689272494)*x[2]
-        arg[3,2,0,1]=(-0.336618164118)*x[0]+(-1.24388666895)*x[1]+(-0.2198689254)*x[2]
-        arg[3,2,1,0]=(0.0872793087887)*x[0]+(-0.336554573215)*x[1]+(-0.0597803523262)*x[2]
-        arg[3,2,1,1]=(0.192805432018)*x[0]+(0.0540495582064)*x[1]+(0.846658042071)*x[2]
-        arg[3,2,2,0]=(0.00794192604414)*x[0]+(-0.33504559053)*x[1]+(0.615701149787)*x[2]
-        arg[3,2,2,1]=(0.210870961503)*x[0]+(1.14164095846)*x[1]+(-0.192785742791)*x[2]
-        arg[3,3,0,0]=(-0.25895162041)*x[0]+(-0.225800436488)*x[1]+(-0.198007079838)*x[2]
-        arg[3,3,0,1]=(-0.150363703231)*x[0]+(1.23870429535)*x[1]+(0.28635881247)*x[2]
-        arg[3,3,1,0]=(-0.865980718216)*x[0]+(-0.0849853244335)*x[1]+(-0.292164217189)*x[2]
-        arg[3,3,1,1]=(-0.350465968722)*x[0]+(0.09853736936)*x[1]+(-0.476711524665)*x[2]
-        arg[3,3,2,0]=(0.311396300263)*x[0]+(-0.92437612034)*x[1]+(-0.757139962928)*x[2]
-        arg[3,3,2,1]=(-0.912311919837)*x[0]+(0.267793631099)*x[1]+(0.4917345401)*x[2]
-        arg[3,4,0,0]=(0.613662541753)*x[0]+(0.782757341361)*x[1]+(1.04209808158)*x[2]
-        arg[3,4,0,1]=(0.492828613997)*x[0]+(1.11979095664)*x[1]+(-0.843545072354)*x[2]
-        arg[3,4,1,0]=(-0.51939120556)*x[0]+(0.476004484286)*x[1]+(-0.516311785432)*x[2]
-        arg[3,4,1,1]=(1.00423313567)*x[0]+(0.90776890388)*x[1]+(1.34423309497)*x[2]
-        arg[3,4,2,0]=(-1.44069600826)*x[0]+(-1.39515290909)*x[1]+(1.19851590247)*x[2]
-        arg[3,4,2,1]=(0.391851619877)*x[0]+(0.265529120553)*x[1]+(0.996610410913)*x[2]
-        ref[0,0,0,0]=(1.19330263935)/(o+1.)+(0.55394275251)+(0.0162017895041)*0.5**o
-        ref[0,0,0,1]=(-0.672351783684)/(o+1.)+(-0.187889622039)+(0.351132807711)*0.5**o
-        ref[0,0,1,0]=(-1.27021996264)/(o+1.)+(0.236286530101)+(-0.961885459894)*0.5**o
-        ref[0,0,1,1]=(-1.43442517107)/(o+1.)+(-1.00113374859)+(-0.935971122022)*0.5**o
-        ref[0,0,2,0]=(-0.434813695127)/(o+1.)+(0.606673209583)+(-0.0699546855712)*0.5**o
-        ref[0,0,2,1]=(-0.0434901247948)/(o+1.)+(-0.180911877983)+(-0.733211446073)*0.5**o
-        ref[0,1,0,0]=(1.41514302182)/(o+1.)+(-0.247977413325)+(-0.967062307989)*0.5**o
-        ref[0,1,0,1]=(0.69128100142)/(o+1.)+(-0.621609882923)+(-0.319976390946)*0.5**o
-        ref[0,1,1,0]=(-0.881870429191)/(o+1.)+(-0.654075774082)+(0.0281262553057)*0.5**o
-        ref[0,1,1,1]=(-1.27239116086)/(o+1.)+(-0.0854066429492)+(0.0230865806541)*0.5**o
-        ref[0,1,2,0]=(-0.222663945351)/(o+1.)+(0.685312598747)+(0.453385341573)*0.5**o
-        ref[0,1,2,1]=(0.101409038706)/(o+1.)+(0.151367946744)+(-0.824910502191)*0.5**o
-        ref[0,2,0,0]=(-1.19509443892)/(o+1.)+(0.225437856866)+(0.85928567141)*0.5**o
-        ref[0,2,0,1]=(0.285764347754)/(o+1.)+(-0.383432127133)+(0.963095541446)*0.5**o
-        ref[0,2,1,0]=(0.728010227911)/(o+1.)+(0.983790919896)+(-0.550403317717)*0.5**o
-        ref[0,2,1,1]=(0.563748259036)/(o+1.)+(0.165164845927)+(-0.110710881481)*0.5**o
-        ref[0,2,2,0]=(-0.361502606429)/(o+1.)+(0.0276145482611)+(-0.341115463028)*0.5**o
-        ref[0,2,2,1]=(-0.293320207933)/(o+1.)+(0.0336757304385)+(-0.853103403872)*0.5**o
-        ref[0,3,0,0]=(-0.410233956527)/(o+1.)+(-0.474281126245)+(0.569057885785)*0.5**o
-        ref[0,3,0,1]=(-0.835861970115)/(o+1.)+(0.0173715483175)+(0.346902459481)*0.5**o
-        ref[0,3,1,0]=(0.0830466456187)/(o+1.)+(-0.288204681495)+(-0.607109864241)*0.5**o
-        ref[0,3,1,1]=(1.07074130823)/(o+1.)+(-0.0437983012867)+(0.159379549652)*0.5**o
-        ref[0,3,2,0]=(0.172301049609)/(o+1.)+(-0.491724874152)+(-0.996925180895)*0.5**o
-        ref[0,3,2,1]=(-0.24891941221)/(o+1.)+(-0.03935856269)+(-0.3030090126)*0.5**o
-        ref[0,4,0,0]=(-0.778575122429)/(o+1.)+(0.213085222078)+(0.941383668349)*0.5**o
-        ref[0,4,0,1]=(0.880801627174)/(o+1.)+(-0.454451723401)+(-0.193978040747)*0.5**o
-        ref[0,4,1,0]=(-0.835604724882)/(o+1.)+(0.127240834083)+(-0.245156740036)*0.5**o
-        ref[0,4,1,1]=(1.62336716324)/(o+1.)+(-0.101085918464)+(0.398884015839)*0.5**o
-        ref[0,4,2,0]=(1.16805827702)/(o+1.)+(0.211232591688)+(-0.654729385702)*0.5**o
-        ref[0,4,2,1]=(-0.305424138957)/(o+1.)+(-0.431076572693)+(-0.924903192969)*0.5**o
-        ref[1,0,0,0]=(-0.481596247529)/(o+1.)+(0.769902632559)+(0.748050413171)*0.5**o
-        ref[1,0,0,1]=(0.177388661252)/(o+1.)+(-0.118766442613)+(-0.457657277952)*0.5**o
-        ref[1,0,1,0]=(0.709890860372)/(o+1.)+(0.0668010230727)+(0.658744950012)*0.5**o
-        ref[1,0,1,1]=(-1.45685781381)/(o+1.)+(-0.178674426089)+(0.788456069079)*0.5**o
-        ref[1,0,2,0]=(0.194388185612)/(o+1.)+(0.649177543063)+(0.896093783855)*0.5**o
-        ref[1,0,2,1]=(0.181561279507)/(o+1.)+(-0.200618291902)+(-0.392507985678)*0.5**o
-        ref[1,1,0,0]=(-0.884376814027)/(o+1.)+(0.280382736159)+(0.593213920451)*0.5**o
-        ref[1,1,0,1]=(-0.250709602218)/(o+1.)+(-0.492104211211)+(0.818920586956)*0.5**o
-        ref[1,1,1,0]=(0.0529723694625)/(o+1.)+(-0.502047650638)+(-0.115739819752)*0.5**o
-        ref[1,1,1,1]=(0.215812202957)/(o+1.)+(-0.308796450292)+(0.954456105171)*0.5**o
-        ref[1,1,2,0]=(-0.991481050902)/(o+1.)+(0.162626252838)+(-0.800147845717)*0.5**o
-        ref[1,1,2,1]=(-0.433989756951)/(o+1.)+(0.362776336712)+(-0.259441100777)*0.5**o
-        ref[1,2,0,0]=(-0.930287052624)/(o+1.)+(-0.347752763108)+(0.880525373413)*0.5**o
-        ref[1,2,0,1]=(0.698674852861)/(o+1.)+(-0.15119613196)+(0.719004238051)*0.5**o
-        ref[1,2,1,0]=(-0.777216821365)/(o+1.)+(0.436336076297)+(0.617741643399)*0.5**o
-        ref[1,2,1,1]=(1.09595223135)/(o+1.)+(0.978251130983)+(0.804336219412)*0.5**o
-        ref[1,2,2,0]=(-0.651012630849)/(o+1.)+(-1.04894606664)+(0.43528198181)*0.5**o
-        ref[1,2,2,1]=(-1.5227353883)/(o+1.)+(0.670019307557)+(-0.745922598001)*0.5**o
-        ref[1,3,0,0]=(-0.750195637997)/(o+1.)+(0.231864245348)+(-0.118356142533)*0.5**o
-        ref[1,3,0,1]=(1.17136226596)/(o+1.)+(-0.114976421389)+(0.395383920468)*0.5**o
-        ref[1,3,1,0]=(-0.108070636769)/(o+1.)+(0.279145429234)+(-0.352562621327)*0.5**o
-        ref[1,3,1,1]=(-0.144223481714)/(o+1.)+(-0.472954352493)+(-0.0903026345013)*0.5**o
-        ref[1,3,2,0]=(-0.487564307786)/(o+1.)+(0.636973351449)+(0.758622537094)*0.5**o
-        ref[1,3,2,1]=(0.390860965954)/(o+1.)+(-0.36647678165)+(-0.66980953377)*0.5**o
-        ref[1,4,0,0]=(-1.04824984837)/(o+1.)+(0.213932231728)+(0.823722790054)*0.5**o
-        ref[1,4,0,1]=(-0.0984653601336)/(o+1.)+(0.07867877705)+(-0.741527483773)*0.5**o
-        ref[1,4,1,0]=(-0.146287867383)/(o+1.)+(-0.908951868158)+(0.425691754878)*0.5**o
-        ref[1,4,1,1]=(-0.94160416554)/(o+1.)+(0.0459877010016)+(-0.869872381431)*0.5**o
-        ref[1,4,2,0]=(0.0115742858952)/(o+1.)+(-0.222488399041)+(0.687392452389)*0.5**o
-        ref[1,4,2,1]=(-0.956561936575)/(o+1.)+(-0.59770879042)+(-0.0613652834159)*0.5**o
-        ref[2,0,0,0]=(1.83987381729)/(o+1.)+(0.956579317963)+(0.862634531274)*0.5**o
-        ref[2,0,0,1]=(0.105446127421)/(o+1.)+(0.180661881191)+(0.186629121375)*0.5**o
-        ref[2,0,1,0]=(0.0212167440766)/(o+1.)+(-0.337825588888)+(-0.318943328859)*0.5**o
-        ref[2,0,1,1]=(0.744834715631)/(o+1.)+(-0.350058416663)+(0.391466726104)*0.5**o
-        ref[2,0,2,0]=(-0.788776613856)/(o+1.)+(0.233776806014)+(0.400043748043)*0.5**o
-        ref[2,0,2,1]=(-0.95346976307)/(o+1.)+(0.0274998652324)+(-0.967971238003)*0.5**o
-        ref[2,1,0,0]=(-0.536051408942)/(o+1.)+(-0.208498016994)+(0.590315312233)*0.5**o
-        ref[2,1,0,1]=(-1.04158508788)/(o+1.)+(-0.397885793101)+(0.0127762955396)*0.5**o
-        ref[2,1,1,0]=(0.529914207253)/(o+1.)+(-0.547503443987)+(-0.338873793431)*0.5**o
-        ref[2,1,1,1]=(0.62298670274)/(o+1.)+(0.449860048786)+(0.352800726478)*0.5**o
-        ref[2,1,2,0]=(0.965292650595)/(o+1.)+(0.00980498639)+(-0.261085873742)*0.5**o
-        ref[2,1,2,1]=(0.403285360803)/(o+1.)+(0.369160592269)+(0.315744874774)*0.5**o
-        ref[2,2,0,0]=(-0.457764884724)/(o+1.)+(0.563657776706)+(-0.791018976541)*0.5**o
-        ref[2,2,0,1]=(0.188151274044)/(o+1.)+(-0.476470545911)+(0.911736564588)*0.5**o
-        ref[2,2,1,0]=(-0.558515085739)/(o+1.)+(-0.445583796553)+(-0.533721159994)*0.5**o
-        ref[2,2,1,1]=(-0.431992337265)/(o+1.)+(-0.0957726221961)+(0.64441532924)*0.5**o
-        ref[2,2,2,0]=(-0.159056461947)/(o+1.)+(-0.0326864536156)+(0.484856087693)*0.5**o
-        ref[2,2,2,1]=(0.533116456037)/(o+1.)+(1.10197257725)+(0.0353311991352)*0.5**o
-        ref[2,3,0,0]=(0.0570625147023)/(o+1.)+(0.74170779854)+(0.851019670777)*0.5**o
-        ref[2,3,0,1]=(-0.495059904832)/(o+1.)+(-0.169954912181)+(-0.761839138623)*0.5**o
-        ref[2,3,1,0]=(0.482375173314)/(o+1.)+(-0.19374838651)+(0.706371811996)*0.5**o
-        ref[2,3,1,1]=(0.12928100721)/(o+1.)+(-0.317327862062)+(-0.460946532077)*0.5**o
-        ref[2,3,2,0]=(-0.234362084763)/(o+1.)+(0.423486279181)+(-0.93141377227)*0.5**o
-        ref[2,3,2,1]=(1.25586693002)/(o+1.)+(-0.127551329993)+(0.56508002092)*0.5**o
-        ref[2,4,0,0]=(0.45235297749)/(o+1.)+(-0.0217537364788)+(-0.640413752615)*0.5**o
-        ref[2,4,0,1]=(0.936809207384)/(o+1.)+(-0.151519610695)+(-0.464139056331)*0.5**o
-        ref[2,4,1,0]=(0.867693208863)/(o+1.)+(0.105683574314)+(-0.974513946233)*0.5**o
-        ref[2,4,1,1]=(-1.27821575101)/(o+1.)+(0.463163847311)+(-0.0852880510814)*0.5**o
-        ref[2,4,2,0]=(-0.846224501366)/(o+1.)+(0.432619461409)+(0.492845548002)*0.5**o
-        ref[2,4,2,1]=(-1.48923229995)/(o+1.)+(-0.505747396375)+(0.00916577472118)*0.5**o
-        ref[3,0,0,0]=(-0.959215731121)/(o+1.)+(-0.904609108587)+(-0.178668510268)*0.5**o
-        ref[3,0,0,1]=(-1.53181231865)/(o+1.)+(-0.0758543610408)+(0.878717376536)*0.5**o
-        ref[3,0,1,0]=(1.18643238831)/(o+1.)+(-0.288825159097)+(-0.341112240015)*0.5**o
-        ref[3,0,1,1]=(-0.0675694917031)/(o+1.)+(-0.168955703616)+(0.275309686724)*0.5**o
-        ref[3,0,2,0]=(-0.663269860133)/(o+1.)+(-0.235102421885)+(-0.573480403148)*0.5**o
-        ref[3,0,2,1]=(1.0969289778)/(o+1.)+(0.46603172821)+(0.267894209932)*0.5**o
-        ref[3,1,0,0]=(-0.716870513559)/(o+1.)+(0.712039409283)+(0.483098591635)*0.5**o
-        ref[3,1,0,1]=(0.0328531999411)/(o+1.)+(0.379319450988)+(0.311973567308)*0.5**o
-        ref[3,1,1,0]=(1.08648208064)/(o+1.)+(-0.196831959338)+(-0.452172980519)*0.5**o
-        ref[3,1,1,1]=(0.0813181502612)/(o+1.)+(-0.227364064527)+(-0.0225656152548)*0.5**o
-        ref[3,1,2,0]=(-0.271000454408)/(o+1.)+(-0.765711687155)+(0.868748696531)*0.5**o
-        ref[3,1,2,1]=(1.60569646253)/(o+1.)+(0.137437739736)+(-0.00288127709197)*0.5**o
-        ref[3,2,0,0]=(-1.25887089059)/(o+1.)+(-0.525842290945)+(0.455112921376)*0.5**o
-        ref[3,2,0,1]=(-1.63787880725)/(o+1.)+(0.00214706725405)+(-0.166789085722)*0.5**o
-        ref[3,2,1,0]=(-1.82111307894)/(o+1.)+(0.561806270366)+(0.388444921454)*0.5**o
-        ref[3,2,1,1]=(-0.489259906414)/(o+1.)+(0.582548398381)+(0.417676141947)*0.5**o
-        ref[3,2,2,0]=(-0.0674375340391)/(o+1.)+(-0.00345549227349)+(0.362946003887)*0.5**o
-        ref[3,2,2,1]=(0.662780682001)/(o+1.)+(-0.15453848218)+(0.806022459534)*0.5**o
-        ref[3,3,0,0]=(-1.15795406515)/(o+1.)+(0.0926725746467)+(0.289849779118)*0.5**o
-        ref[3,3,0,1]=(1.27520269547)/(o+1.)+(-0.286529818361)+(0.672556345847)*0.5**o
-        ref[3,3,1,0]=(-0.343290651469)/(o+1.)+(-0.0269962100904)+(-0.845847188189)*0.5**o
-        ref[3,3,1,1]=(0.497715053371)/(o+1.)+(-0.158577177766)+(-0.909200821866)*0.5**o
-        ref[3,3,2,0]=(-0.952431538662)/(o+1.)+(0.0816482063045)+(-0.580984656952)*0.5**o
-        ref[3,3,2,1]=(-0.176227469799)/(o+1.)+(0.0456157853688)+(-0.0677878495767)*0.5**o
-        ref[3,4,0,0]=(0.976460483802)/(o+1.)+(0.347595506011)+(0.766866468871)*0.5**o
-        ref[3,4,0,1]=(0.0358170327662)/(o+1.)+(-0.0991456259778)+(0.931548717473)*0.5**o
-        ref[3,4,1,0]=(0.114544318514)/(o+1.)+(-0.201014865792)+(-0.272213093635)*0.5**o
-        ref[3,4,1,1]=(0.554509925385)/(o+1.)+(1.23219332557)+(0.237338557994)*0.5**o
-        ref[3,4,2,0]=(0.0803465444931)/(o+1.)+(-0.518257569997)+(-0.681164419371)*0.5**o
-        ref[3,4,2,1]=(-0.0443609570522)/(o+1.)+(0.572813368096)+(0.552725372202)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.114918917602)*x[0]**o+(0.304834778607)*x[0]+(0.704057176139)*x[1]**o+(-0.0664624375434)*x[1]
-        ref=(0.704057176139)/(o+1.)+(0.119186170532)+(-0.114918917602)*0.5**o
-      else:
-        arg=(-0.134961573162)*x[0]**o+(0.585433861814)*x[0]+(0.209596676649)*x[1]**o+(0.870867416311)*x[1]+(-0.902854033973)*x[2]**o+(-0.812135783993)*x[2]
-        ref=(-0.693257357324)/(o+1.)+(0.322082747066)+(-0.134961573162)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.441677901994)*x[0]**o+(0.0234076994082)*x[0]+(-0.520465368981)*x[1]**o+(-0.668717137452)*x[1]
-        arg[1]=(0.0637451453664)*x[0]**o+(0.610543665309)*x[0]+(0.639008465664)*x[1]**o+(-0.460500756968)*x[1]
-        ref[0]=(-0.520465368981)/(o+1.)+(-0.322654719022)+(0.441677901994)*0.5**o
-        ref[1]=(0.639008465664)/(o+1.)+(0.0750214541708)+(0.0637451453664)*0.5**o
-      else:
-        arg[0]=(0.207042421638)*x[0]**o+(0.586067682859)*x[0]+(-0.731189752251)*x[1]**o+(0.439755444977)*x[1]+(-0.215027146515)*x[2]**o+(-0.22109699198)*x[2]
-        arg[1]=(-0.482897746923)*x[0]**o+(-0.262848758384)*x[0]+(-0.130231246709)*x[1]**o+(0.494143899685)*x[1]+(0.871226664446)*x[2]**o+(-0.45136577521)*x[2]
-        ref[0]=(-0.946216898767)/(o+1.)+(0.402363067928)+(0.207042421638)*0.5**o
-        ref[1]=(0.740995417737)/(o+1.)+(-0.110035316955)+(-0.482897746923)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.418217706031)*x[0]**o+(0.817101274679)*x[0]+(0.359227724634)*x[1]**o+(0.106952446872)*x[1]
-        arg[0,1]=(0.735477258623)*x[0]**o+(-0.181692404492)*x[0]+(0.118248218763)*x[1]**o+(0.910033225874)*x[1]
-        arg[0,2]=(-0.370301174151)*x[0]**o+(0.421589410528)*x[0]+(-0.91974297037)*x[1]**o+(0.676441845707)*x[1]
-        arg[0,3]=(0.170535646217)*x[0]**o+(0.650458506701)*x[0]+(-0.431898202846)*x[1]**o+(-0.89133664224)*x[1]
-        arg[0,4]=(-0.288793192482)*x[0]**o+(-0.752066662422)*x[0]+(0.279565184651)*x[1]**o+(-0.20569858505)*x[1]
-        arg[1,0]=(-0.831478902729)*x[0]**o+(-0.545347589281)*x[0]+(-0.315738709444)*x[1]**o+(-0.407156023524)*x[1]
-        arg[1,1]=(0.119396512736)*x[0]**o+(0.56655186098)*x[0]+(0.798206239231)*x[1]**o+(0.0342467197178)*x[1]
-        arg[1,2]=(-0.264721761214)*x[0]**o+(-0.7583989175)*x[0]+(-0.350411882147)*x[1]**o+(-0.556879396863)*x[1]
-        arg[1,3]=(0.976029513102)*x[0]**o+(-0.117830794452)*x[0]+(0.318067419468)*x[1]**o+(-0.496129688948)*x[1]
-        arg[1,4]=(0.462797018845)*x[0]**o+(-0.214502973992)*x[0]+(0.155052684044)*x[1]**o+(0.264794267973)*x[1]
-        arg[2,0]=(0.193892132778)*x[0]**o+(-0.440406597181)*x[0]+(0.527330868842)*x[1]**o+(0.856602716155)*x[1]
-        arg[2,1]=(0.0418968976051)*x[0]**o+(0.944283628708)*x[0]+(0.923548919008)*x[1]**o+(0.958011594347)*x[1]
-        arg[2,2]=(0.744026460715)*x[0]**o+(0.238896690247)*x[0]+(0.968891312128)*x[1]**o+(0.0636831438113)*x[1]
-        arg[2,3]=(-0.289048983574)*x[0]**o+(0.897469203226)*x[0]+(0.948131139828)*x[1]**o+(0.821749060686)*x[1]
-        arg[2,4]=(-0.903766144138)*x[0]**o+(-0.453139974489)*x[0]+(-0.715818671181)*x[1]**o+(-0.712367492971)*x[1]
-        arg[3,0]=(0.315277263598)*x[0]**o+(-0.676815102073)*x[0]+(0.428704415911)*x[1]**o+(0.54703485039)*x[1]
-        arg[3,1]=(-0.301882901745)*x[0]**o+(0.888822293672)*x[0]+(-0.496204235393)*x[1]**o+(0.210598259748)*x[1]
-        arg[3,2]=(0.568071178492)*x[0]**o+(-0.552863936415)*x[0]+(0.758619958752)*x[1]**o+(0.520428540448)*x[1]
-        arg[3,3]=(0.477425351692)*x[0]**o+(-0.427405588029)*x[0]+(0.197959279245)*x[1]**o+(0.328047998649)*x[1]
-        arg[3,4]=(-0.869704203328)*x[0]**o+(-0.0825164966999)*x[0]+(0.779325592334)*x[1]**o+(0.419916607608)*x[1]
-        ref[0,0]=(0.359227724634)/(o+1.)+(0.462026860776)+(0.418217706031)*0.5**o
-        ref[0,1]=(0.118248218763)/(o+1.)+(0.364170410691)+(0.735477258623)*0.5**o
-        ref[0,2]=(-0.91974297037)/(o+1.)+(0.549015628118)+(-0.370301174151)*0.5**o
-        ref[0,3]=(-0.431898202846)/(o+1.)+(-0.120439067769)+(0.170535646217)*0.5**o
-        ref[0,4]=(0.279565184651)/(o+1.)+(-0.478882623736)+(-0.288793192482)*0.5**o
-        ref[1,0]=(-0.315738709444)/(o+1.)+(-0.476251806402)+(-0.831478902729)*0.5**o
-        ref[1,1]=(0.798206239231)/(o+1.)+(0.300399290349)+(0.119396512736)*0.5**o
-        ref[1,2]=(-0.350411882147)/(o+1.)+(-0.657639157182)+(-0.264721761214)*0.5**o
-        ref[1,3]=(0.318067419468)/(o+1.)+(-0.3069802417)+(0.976029513102)*0.5**o
-        ref[1,4]=(0.155052684044)/(o+1.)+(0.02514564699)+(0.462797018845)*0.5**o
-        ref[2,0]=(0.527330868842)/(o+1.)+(0.208098059487)+(0.193892132778)*0.5**o
-        ref[2,1]=(0.923548919008)/(o+1.)+(0.951147611528)+(0.0418968976051)*0.5**o
-        ref[2,2]=(0.968891312128)/(o+1.)+(0.151289917029)+(0.744026460715)*0.5**o
-        ref[2,3]=(0.948131139828)/(o+1.)+(0.859609131956)+(-0.289048983574)*0.5**o
-        ref[2,4]=(-0.715818671181)/(o+1.)+(-0.58275373373)+(-0.903766144138)*0.5**o
-        ref[3,0]=(0.428704415911)/(o+1.)+(-0.0648901258416)+(0.315277263598)*0.5**o
-        ref[3,1]=(-0.496204235393)/(o+1.)+(0.54971027671)+(-0.301882901745)*0.5**o
-        ref[3,2]=(0.758619958752)/(o+1.)+(-0.0162176979831)+(0.568071178492)*0.5**o
-        ref[3,3]=(0.197959279245)/(o+1.)+(-0.0496787946897)+(0.477425351692)*0.5**o
-        ref[3,4]=(0.779325592334)/(o+1.)+(0.168700055454)+(-0.869704203328)*0.5**o
-      else:
-        arg[0,0]=(0.204452789147)*x[0]**o+(0.411843111144)*x[0]+(-0.0502866367412)*x[1]**o+(0.957356261522)*x[1]+(0.173522462943)*x[2]**o+(-0.0194908382525)*x[2]
-        arg[0,1]=(-0.49641528149)*x[0]**o+(0.158625922243)*x[0]+(0.670932733725)*x[1]**o+(-0.611829064862)*x[1]+(0.758373881782)*x[2]**o+(0.151236368375)*x[2]
-        arg[0,2]=(0.577504765611)*x[0]**o+(0.872996499874)*x[0]+(-0.734000014722)*x[1]**o+(-0.890824538872)*x[1]+(-0.796786080271)*x[2]**o+(-0.389005562901)*x[2]
-        arg[0,3]=(-0.933166619447)*x[0]**o+(-0.528627639194)*x[0]+(-0.828111326322)*x[1]**o+(0.528345547301)*x[1]+(0.99894455165)*x[2]**o+(0.472982583662)*x[2]
-        arg[0,4]=(-0.495503045054)*x[0]**o+(0.629909217292)*x[0]+(0.901515784751)*x[1]**o+(-0.863668288904)*x[1]+(0.76892679355)*x[2]**o+(0.34730747389)*x[2]
-        arg[1,0]=(0.303189803506)*x[0]**o+(-0.17543401741)*x[0]+(-0.283157585975)*x[1]**o+(0.950171529024)*x[1]+(0.0483247572497)*x[2]**o+(-0.604332298954)*x[2]
-        arg[1,1]=(-0.225480407643)*x[0]**o+(-0.0521067696425)*x[0]+(-0.10259234894)*x[1]**o+(0.373551917005)*x[1]+(0.89047195372)*x[2]**o+(-0.292740890417)*x[2]
-        arg[1,2]=(-0.476041156832)*x[0]**o+(0.916078681628)*x[0]+(-0.393887610676)*x[1]**o+(-0.651852504525)*x[1]+(0.611404175606)*x[2]**o+(0.336594647903)*x[2]
-        arg[1,3]=(-0.415178048882)*x[0]**o+(0.145394549559)*x[0]+(0.680115054186)*x[1]**o+(0.261517386893)*x[1]+(0.781566117396)*x[2]**o+(-0.659634539391)*x[2]
-        arg[1,4]=(0.874821341857)*x[0]**o+(0.317418381126)*x[0]+(0.051455923305)*x[1]**o+(0.670170143071)*x[1]+(-0.211902435336)*x[2]**o+(-0.175299130233)*x[2]
-        arg[2,0]=(-0.372961546517)*x[0]**o+(0.199493150648)*x[0]+(-0.630239499285)*x[1]**o+(0.657412283442)*x[1]+(-0.82211915324)*x[2]**o+(-0.468612977158)*x[2]
-        arg[2,1]=(-0.503168527887)*x[0]**o+(0.904406483201)*x[0]+(-0.206179628633)*x[1]**o+(0.0787026584997)*x[1]+(0.899590466467)*x[2]**o+(-0.893401768413)*x[2]
-        arg[2,2]=(-0.860556408954)*x[0]**o+(0.39021140432)*x[0]+(-0.66425383352)*x[1]**o+(0.287711780417)*x[1]+(0.776884760126)*x[2]**o+(-0.115905192334)*x[2]
-        arg[2,3]=(0.461359695993)*x[0]**o+(0.997877835019)*x[0]+(0.0513514112685)*x[1]**o+(-0.904812988908)*x[1]+(-0.903222331838)*x[2]**o+(-0.470185679041)*x[2]
-        arg[2,4]=(-0.646560730528)*x[0]**o+(0.10038324067)*x[0]+(0.426753245517)*x[1]**o+(-0.109889624344)*x[1]+(-0.20158193753)*x[2]**o+(0.014258531224)*x[2]
-        arg[3,0]=(0.364407704271)*x[0]**o+(0.840519040103)*x[0]+(0.528721642544)*x[1]**o+(-0.853679853614)*x[1]+(0.079836122575)*x[2]**o+(-0.439039178308)*x[2]
-        arg[3,1]=(-0.0726491927955)*x[0]**o+(0.217804431494)*x[0]+(-0.454354285545)*x[1]**o+(0.390539936003)*x[1]+(-0.989667912688)*x[2]**o+(-0.0674079606774)*x[2]
-        arg[3,2]=(0.62239422825)*x[0]**o+(0.998733716844)*x[0]+(0.796258161536)*x[1]**o+(0.618545466026)*x[1]+(-0.243188896911)*x[2]**o+(-0.677687584224)*x[2]
-        arg[3,3]=(0.444073180258)*x[0]**o+(-0.764729326792)*x[0]+(-0.823491453567)*x[1]**o+(0.985393963131)*x[1]+(0.623800470977)*x[2]**o+(0.947328422513)*x[2]
-        arg[3,4]=(0.686438920325)*x[0]**o+(0.789760134176)*x[0]+(-0.26011082782)*x[1]**o+(0.0692377043339)*x[1]+(-0.3712894236)*x[2]**o+(-0.542974191103)*x[2]
-        ref[0,0]=(0.123235826202)/(o+1.)+(0.674854267207)+(0.204452789147)*0.5**o
-        ref[0,1]=(1.42930661551)/(o+1.)+(-0.150983387122)+(-0.49641528149)*0.5**o
-        ref[0,2]=(-1.53078609499)/(o+1.)+(-0.203416800949)+(0.577504765611)*0.5**o
-        ref[0,3]=(0.170833225328)/(o+1.)+(0.236350245885)+(-0.933166619447)*0.5**o
-        ref[0,4]=(1.6704425783)/(o+1.)+(0.0567742011389)+(-0.495503045054)*0.5**o
-        ref[1,0]=(-0.234832828725)/(o+1.)+(0.0852026063299)+(0.303189803506)*0.5**o
-        ref[1,1]=(0.787879604779)/(o+1.)+(0.0143521284725)+(-0.225480407643)*0.5**o
-        ref[1,2]=(0.21751656493)/(o+1.)+(0.300410412503)+(-0.476041156832)*0.5**o
-        ref[1,3]=(1.46168117158)/(o+1.)+(-0.126361301469)+(-0.415178048882)*0.5**o
-        ref[1,4]=(-0.160446512031)/(o+1.)+(0.406144696982)+(0.874821341857)*0.5**o
-        ref[2,0]=(-1.45235865253)/(o+1.)+(0.194146228466)+(-0.372961546517)*0.5**o
-        ref[2,1]=(0.693410837835)/(o+1.)+(0.0448536866438)+(-0.503168527887)*0.5**o
-        ref[2,2]=(0.112630926606)/(o+1.)+(0.281008996202)+(-0.860556408954)*0.5**o
-        ref[2,3]=(-0.85187092057)/(o+1.)+(-0.188560416464)+(0.461359695993)*0.5**o
-        ref[2,4]=(0.225171307987)/(o+1.)+(0.00237607377473)+(-0.646560730528)*0.5**o
-        ref[3,0]=(0.608557765119)/(o+1.)+(-0.22609999591)+(0.364407704271)*0.5**o
-        ref[3,1]=(-1.44402219823)/(o+1.)+(0.27046820341)+(-0.0726491927955)*0.5**o
-        ref[3,2]=(0.553069264625)/(o+1.)+(0.469795799323)+(0.62239422825)*0.5**o
-        ref[3,3]=(-0.19969098259)/(o+1.)+(0.583996529426)+(0.444073180258)*0.5**o
-        ref[3,4]=(-0.631400251421)/(o+1.)+(0.158011823704)+(0.686438920325)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.963014866001)*x[0]**o+(-0.592091539519)*x[0]+(0.397897510985)*x[1]**o+(0.485612885034)*x[1]
-        arg[0,0,1]=(-0.764849027936)*x[0]**o+(0.936217923087)*x[0]+(-0.6256860991)*x[1]**o+(0.162359755936)*x[1]
-        arg[0,1,0]=(-0.269607090458)*x[0]**o+(0.197100067821)*x[0]+(-0.216513043667)*x[1]**o+(0.143038940436)*x[1]
-        arg[0,1,1]=(-0.432206914977)*x[0]**o+(0.177851208963)*x[0]+(0.0477652910843)*x[1]**o+(0.278333389583)*x[1]
-        arg[1,0,0]=(-0.123940629628)*x[0]**o+(0.818553665062)*x[0]+(-0.168322144522)*x[1]**o+(0.485324994762)*x[1]
-        arg[1,0,1]=(0.593609516922)*x[0]**o+(0.530508390905)*x[0]+(-0.938421636915)*x[1]**o+(-0.686459217917)*x[1]
-        arg[1,1,0]=(-0.874022523162)*x[0]**o+(0.694500749056)*x[0]+(-0.650951516798)*x[1]**o+(0.45826621855)*x[1]
-        arg[1,1,1]=(-0.259058106634)*x[0]**o+(0.0837282545694)*x[0]+(0.465734884341)*x[1]**o+(0.185558060279)*x[1]
-        arg[2,0,0]=(0.346292866419)*x[0]**o+(0.982902010078)*x[0]+(0.0297606445334)*x[1]**o+(0.339043518987)*x[1]
-        arg[2,0,1]=(0.749684718966)*x[0]**o+(-0.855799436867)*x[0]+(-0.186333913876)*x[1]**o+(-0.548968316245)*x[1]
-        arg[2,1,0]=(-0.255759466052)*x[0]**o+(0.441882703647)*x[0]+(-0.0239807362322)*x[1]**o+(-0.236417762222)*x[1]
-        arg[2,1,1]=(-0.0586694299212)*x[0]**o+(-0.912208422332)*x[0]+(-0.11610871626)*x[1]**o+(-0.512805786403)*x[1]
-        arg[3,0,0]=(0.826027179564)*x[0]**o+(-0.589876767386)*x[0]+(-0.654858828463)*x[1]**o+(0.601656609023)*x[1]
-        arg[3,0,1]=(-0.148714999203)*x[0]**o+(-0.409138795316)*x[0]+(0.290726299307)*x[1]**o+(-0.94009130345)*x[1]
-        arg[3,1,0]=(0.63431415979)*x[0]**o+(-0.184553980231)*x[0]+(0.4087395755)*x[1]**o+(-0.694376406449)*x[1]
-        arg[3,1,1]=(-0.000928514830108)*x[0]**o+(-0.782814501236)*x[0]+(0.177390244103)*x[1]**o+(0.698562703841)*x[1]
-        arg[4,0,0]=(-0.939264907756)*x[0]**o+(0.191360117367)*x[0]+(-0.318750748728)*x[1]**o+(0.910713477162)*x[1]
-        arg[4,0,1]=(-0.105186863713)*x[0]**o+(0.0319652211881)*x[0]+(0.118896230389)*x[1]**o+(-0.212677289177)*x[1]
-        arg[4,1,0]=(-0.702838100428)*x[0]**o+(0.881695294345)*x[0]+(0.728231539571)*x[1]**o+(-0.192311604244)*x[1]
-        arg[4,1,1]=(0.25197450886)*x[0]**o+(0.464857988125)*x[0]+(0.851996888259)*x[1]**o+(-0.408525083481)*x[1]
-        arg[5,0,0]=(0.665627182446)*x[0]**o+(0.5367740452)*x[0]+(0.295800616406)*x[1]**o+(0.0620589956995)*x[1]
-        arg[5,0,1]=(-0.37320168697)*x[0]**o+(0.072855481498)*x[0]+(0.539806161326)*x[1]**o+(-0.999091813027)*x[1]
-        arg[5,1,0]=(-0.060845772709)*x[0]**o+(-0.931869215952)*x[0]+(-0.393477853475)*x[1]**o+(0.968288081996)*x[1]
-        arg[5,1,1]=(-0.0768045781739)*x[0]**o+(-0.257318730887)*x[0]+(0.781473167319)*x[1]**o+(-0.458870794544)*x[1]
-        ref[0,0,0]=(0.397897510985)/(o+1.)+(-0.0532393272425)+(-0.963014866001)*0.5**o
-        ref[0,0,1]=(-0.6256860991)/(o+1.)+(0.549288839511)+(-0.764849027936)*0.5**o
-        ref[0,1,0]=(-0.216513043667)/(o+1.)+(0.170069504128)+(-0.269607090458)*0.5**o
-        ref[0,1,1]=(0.0477652910843)/(o+1.)+(0.228092299273)+(-0.432206914977)*0.5**o
-        ref[1,0,0]=(-0.168322144522)/(o+1.)+(0.651939329912)+(-0.123940629628)*0.5**o
-        ref[1,0,1]=(-0.938421636915)/(o+1.)+(-0.0779754135063)+(0.593609516922)*0.5**o
-        ref[1,1,0]=(-0.650951516798)/(o+1.)+(0.576383483803)+(-0.874022523162)*0.5**o
-        ref[1,1,1]=(0.465734884341)/(o+1.)+(0.134643157424)+(-0.259058106634)*0.5**o
-        ref[2,0,0]=(0.0297606445334)/(o+1.)+(0.660972764533)+(0.346292866419)*0.5**o
-        ref[2,0,1]=(-0.186333913876)/(o+1.)+(-0.702383876556)+(0.749684718966)*0.5**o
-        ref[2,1,0]=(-0.0239807362322)/(o+1.)+(0.102732470713)+(-0.255759466052)*0.5**o
-        ref[2,1,1]=(-0.11610871626)/(o+1.)+(-0.712507104367)+(-0.0586694299212)*0.5**o
-        ref[3,0,0]=(-0.654858828463)/(o+1.)+(0.0058899208184)+(0.826027179564)*0.5**o
-        ref[3,0,1]=(0.290726299307)/(o+1.)+(-0.674615049383)+(-0.148714999203)*0.5**o
-        ref[3,1,0]=(0.4087395755)/(o+1.)+(-0.43946519334)+(0.63431415979)*0.5**o
-        ref[3,1,1]=(0.177390244103)/(o+1.)+(-0.0421258986973)+(-0.000928514830108)*0.5**o
-        ref[4,0,0]=(-0.318750748728)/(o+1.)+(0.551036797264)+(-0.939264907756)*0.5**o
-        ref[4,0,1]=(0.118896230389)/(o+1.)+(-0.0903560339946)+(-0.105186863713)*0.5**o
-        ref[4,1,0]=(0.728231539571)/(o+1.)+(0.344691845051)+(-0.702838100428)*0.5**o
-        ref[4,1,1]=(0.851996888259)/(o+1.)+(0.0281664523221)+(0.25197450886)*0.5**o
-        ref[5,0,0]=(0.295800616406)/(o+1.)+(0.29941652045)+(0.665627182446)*0.5**o
-        ref[5,0,1]=(0.539806161326)/(o+1.)+(-0.463118165764)+(-0.37320168697)*0.5**o
-        ref[5,1,0]=(-0.393477853475)/(o+1.)+(0.0182094330217)+(-0.060845772709)*0.5**o
-        ref[5,1,1]=(0.781473167319)/(o+1.)+(-0.358094762716)+(-0.0768045781739)*0.5**o
-      else:
-        arg[0,0,0]=(0.638389367885)*x[0]**o+(-0.77703387527)*x[0]+(0.951496212227)*x[1]**o+(-0.484305156823)*x[1]+(-0.582437996275)*x[2]**o+(-0.460130065965)*x[2]
-        arg[0,0,1]=(0.859011160063)*x[0]**o+(0.999372374168)*x[0]+(-0.946049724069)*x[1]**o+(0.522184535496)*x[1]+(0.00820405492191)*x[2]**o+(0.769305042211)*x[2]
-        arg[0,1,0]=(-0.998681640062)*x[0]**o+(0.916063974594)*x[0]+(0.0801858148899)*x[1]**o+(0.475476401258)*x[1]+(-0.805247247843)*x[2]**o+(-0.809331278141)*x[2]
-        arg[0,1,1]=(0.1340261052)*x[0]**o+(0.843204972218)*x[0]+(-0.809433597166)*x[1]**o+(-0.947798215446)*x[1]+(0.268796347717)*x[2]**o+(-0.896620567629)*x[2]
-        arg[1,0,0]=(0.251201824008)*x[0]**o+(0.762438451805)*x[0]+(0.892722429031)*x[1]**o+(0.146944927124)*x[1]+(0.00953973207152)*x[2]**o+(0.423262196414)*x[2]
-        arg[1,0,1]=(-0.258843593921)*x[0]**o+(-0.950574260099)*x[0]+(-0.49096256134)*x[1]**o+(0.446238902975)*x[1]+(-0.880706204083)*x[2]**o+(-0.400075002454)*x[2]
-        arg[1,1,0]=(-0.854529145157)*x[0]**o+(0.118165533114)*x[0]+(-0.913218271084)*x[1]**o+(0.991977570414)*x[1]+(0.626241160161)*x[2]**o+(0.667843914102)*x[2]
-        arg[1,1,1]=(0.636818650335)*x[0]**o+(-0.174996100829)*x[0]+(0.77317621688)*x[1]**o+(0.369280208456)*x[1]+(-0.0130124322187)*x[2]**o+(0.857098751007)*x[2]
-        arg[2,0,0]=(-0.415847479141)*x[0]**o+(0.675986357495)*x[0]+(0.704926614111)*x[1]**o+(-0.166544295134)*x[1]+(-0.00917226654826)*x[2]**o+(-0.896432190739)*x[2]
-        arg[2,0,1]=(-0.882383192316)*x[0]**o+(0.11122730635)*x[0]+(-0.693587089789)*x[1]**o+(-0.0905457091132)*x[1]+(-0.610526000157)*x[2]**o+(-0.992542379681)*x[2]
-        arg[2,1,0]=(-0.476987072283)*x[0]**o+(-0.450296923812)*x[0]+(0.905270434608)*x[1]**o+(0.976270820516)*x[1]+(-0.233422717373)*x[2]**o+(-0.641253735386)*x[2]
-        arg[2,1,1]=(0.873832514958)*x[0]**o+(-0.478059419217)*x[0]+(-0.941650455606)*x[1]**o+(0.307250152442)*x[1]+(0.865160620819)*x[2]**o+(0.961340749451)*x[2]
-        arg[3,0,0]=(-0.443837945036)*x[0]**o+(-0.688773058425)*x[0]+(-0.654988618952)*x[1]**o+(-0.259511611372)*x[1]+(-0.931332326494)*x[2]**o+(0.939379631125)*x[2]
-        arg[3,0,1]=(-0.181860312567)*x[0]**o+(-0.229066064127)*x[0]+(-0.359408642857)*x[1]**o+(-0.47945907585)*x[1]+(0.312345402782)*x[2]**o+(0.559298232285)*x[2]
-        arg[3,1,0]=(-0.372379819015)*x[0]**o+(0.308179383085)*x[0]+(0.123613160006)*x[1]**o+(0.191944822984)*x[1]+(0.950869988808)*x[2]**o+(0.229360419984)*x[2]
-        arg[3,1,1]=(-0.803126271269)*x[0]**o+(0.833324260042)*x[0]+(-0.917001746509)*x[1]**o+(-0.649776906898)*x[1]+(0.49624769362)*x[2]**o+(0.414080802594)*x[2]
-        arg[4,0,0]=(-0.951747333891)*x[0]**o+(0.5919442178)*x[0]+(0.121310623341)*x[1]**o+(-0.321939845724)*x[1]+(0.358051737083)*x[2]**o+(-0.222801347833)*x[2]
-        arg[4,0,1]=(-0.59462534105)*x[0]**o+(0.943860617698)*x[0]+(0.787822231831)*x[1]**o+(-0.0913435772425)*x[1]+(0.831651946729)*x[2]**o+(-0.903604465879)*x[2]
-        arg[4,1,0]=(0.68655463207)*x[0]**o+(-0.98918689213)*x[0]+(0.251300089098)*x[1]**o+(-0.317828131349)*x[1]+(-0.105934216764)*x[2]**o+(-0.874506361945)*x[2]
-        arg[4,1,1]=(-0.80544616293)*x[0]**o+(-0.321523684723)*x[0]+(0.874455533992)*x[1]**o+(0.200912811442)*x[1]+(-0.646776981862)*x[2]**o+(-0.988728118812)*x[2]
-        arg[5,0,0]=(0.413387141328)*x[0]**o+(0.349210032211)*x[0]+(0.80870689028)*x[1]**o+(-0.633296311752)*x[1]+(0.24621029112)*x[2]**o+(0.853398479355)*x[2]
-        arg[5,0,1]=(0.398787817372)*x[0]**o+(0.662875239272)*x[0]+(-0.719962467558)*x[1]**o+(0.49562860294)*x[1]+(-0.694859272211)*x[2]**o+(-0.792616661463)*x[2]
-        arg[5,1,0]=(-0.298838035128)*x[0]**o+(0.121578680468)*x[0]+(-0.931062588633)*x[1]**o+(-0.0575832984853)*x[1]+(-0.696140085453)*x[2]**o+(0.836738246058)*x[2]
-        arg[5,1,1]=(-0.949626960081)*x[0]**o+(-0.449843145228)*x[0]+(-0.304260073311)*x[1]**o+(-0.258880519466)*x[1]+(0.880466679751)*x[2]**o+(0.97505579364)*x[2]
-        ref[0,0,0]=(0.369058215952)/(o+1.)+(-0.860734549029)+(0.638389367885)*0.5**o
-        ref[0,0,1]=(-0.937845669147)/(o+1.)+(1.14543097594)+(0.859011160063)*0.5**o
-        ref[0,1,0]=(-0.725061432954)/(o+1.)+(0.291104548855)+(-0.998681640062)*0.5**o
-        ref[0,1,1]=(-0.540637249448)/(o+1.)+(-0.500606905428)+(0.1340261052)*0.5**o
-        ref[1,0,0]=(0.902262161102)/(o+1.)+(0.666322787672)+(0.251201824008)*0.5**o
-        ref[1,0,1]=(-1.37166876542)/(o+1.)+(-0.452205179789)+(-0.258843593921)*0.5**o
-        ref[1,1,0]=(-0.286977110923)/(o+1.)+(0.888993508815)+(-0.854529145157)*0.5**o
-        ref[1,1,1]=(0.760163784662)/(o+1.)+(0.525691429317)+(0.636818650335)*0.5**o
-        ref[2,0,0]=(0.695754347563)/(o+1.)+(-0.193495064189)+(-0.415847479141)*0.5**o
-        ref[2,0,1]=(-1.30411308995)/(o+1.)+(-0.485930391222)+(-0.882383192316)*0.5**o
-        ref[2,1,0]=(0.671847717235)/(o+1.)+(-0.0576399193408)+(-0.476987072283)*0.5**o
-        ref[2,1,1]=(-0.0764898347868)/(o+1.)+(0.395265741338)+(0.873832514958)*0.5**o
-        ref[3,0,0]=(-1.58632094545)/(o+1.)+(-0.00445251933618)+(-0.443837945036)*0.5**o
-        ref[3,0,1]=(-0.0470632400747)/(o+1.)+(-0.0746134538458)+(-0.181860312567)*0.5**o
-        ref[3,1,0]=(1.07448314881)/(o+1.)+(0.364742313027)+(-0.372379819015)*0.5**o
-        ref[3,1,1]=(-0.420754052889)/(o+1.)+(0.298814077869)+(-0.803126271269)*0.5**o
-        ref[4,0,0]=(0.479362360424)/(o+1.)+(0.0236015121217)+(-0.951747333891)*0.5**o
-        ref[4,0,1]=(1.61947417856)/(o+1.)+(-0.0255437127116)+(-0.59462534105)*0.5**o
-        ref[4,1,0]=(0.145365872334)/(o+1.)+(-1.09076069271)+(0.68655463207)*0.5**o
-        ref[4,1,1]=(0.22767855213)/(o+1.)+(-0.554669496046)+(-0.80544616293)*0.5**o
-        ref[5,0,0]=(1.0549171814)/(o+1.)+(0.284656099907)+(0.413387141328)*0.5**o
-        ref[5,0,1]=(-1.41482173977)/(o+1.)+(0.182943590374)+(0.398787817372)*0.5**o
-        ref[5,1,0]=(-1.62720267409)/(o+1.)+(0.450366814021)+(-0.298838035128)*0.5**o
-        ref[5,1,1]=(0.576206606439)/(o+1.)+(0.133166064473)+(-0.949626960081)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.392628958003)*x[0]**o+(0.186084293395)*x[0]+(0.965300679335)*x[1]**o+(0.0986282244747)*x[1]
-        arg[0,0,0,1]=(-0.503312425492)*x[0]**o+(-0.205791466802)*x[0]+(0.384782163488)*x[1]**o+(-0.608371097114)*x[1]
-        arg[0,0,1,0]=(0.660162511699)*x[0]**o+(-0.263141686561)*x[0]+(-0.765235012795)*x[1]**o+(-0.371233144611)*x[1]
-        arg[0,0,1,1]=(-0.986935412732)*x[0]**o+(0.645433351743)*x[0]+(-0.451665346257)*x[1]**o+(-0.713815759872)*x[1]
-        arg[0,0,2,0]=(0.632875178502)*x[0]**o+(-0.257542208821)*x[0]+(-0.695553902133)*x[1]**o+(-0.677920876645)*x[1]
-        arg[0,0,2,1]=(0.102625648731)*x[0]**o+(0.511896902175)*x[0]+(0.345909088853)*x[1]**o+(-0.0609413722414)*x[1]
-        arg[0,1,0,0]=(-0.0108106931425)*x[0]**o+(-0.595497517075)*x[0]+(0.332480141972)*x[1]**o+(-0.18131109924)*x[1]
-        arg[0,1,0,1]=(0.220826593491)*x[0]**o+(-0.202422451222)*x[0]+(0.328480565578)*x[1]**o+(0.851432750557)*x[1]
-        arg[0,1,1,0]=(0.22735402466)*x[0]**o+(0.51437836535)*x[0]+(0.292927451477)*x[1]**o+(-0.148121856023)*x[1]
-        arg[0,1,1,1]=(0.495079875966)*x[0]**o+(0.582755117761)*x[0]+(-0.322061131008)*x[1]**o+(0.953437449986)*x[1]
-        arg[0,1,2,0]=(0.968583889554)*x[0]**o+(-0.593253483731)*x[0]+(0.286037351205)*x[1]**o+(0.997314411263)*x[1]
-        arg[0,1,2,1]=(0.361498191707)*x[0]**o+(0.633275777697)*x[0]+(0.891305263219)*x[1]**o+(-0.194468605638)*x[1]
-        arg[0,2,0,0]=(0.185647566516)*x[0]**o+(0.101448861247)*x[0]+(0.0870608077911)*x[1]**o+(-0.86477908948)*x[1]
-        arg[0,2,0,1]=(0.227262327826)*x[0]**o+(0.812586702875)*x[0]+(-0.0229924234496)*x[1]**o+(-0.323581477982)*x[1]
-        arg[0,2,1,0]=(0.0405753322301)*x[0]**o+(0.891289727227)*x[0]+(0.957377329048)*x[1]**o+(-0.982119724379)*x[1]
-        arg[0,2,1,1]=(-0.546046301701)*x[0]**o+(0.628511534929)*x[0]+(-0.628262263897)*x[1]**o+(-0.454315708999)*x[1]
-        arg[0,2,2,0]=(-0.828455793175)*x[0]**o+(0.190147126828)*x[0]+(0.499595322279)*x[1]**o+(-0.0882297087937)*x[1]
-        arg[0,2,2,1]=(0.926138085222)*x[0]**o+(0.402659001583)*x[0]+(-0.678432418122)*x[1]**o+(0.236054704896)*x[1]
-        arg[0,3,0,0]=(-0.473066058658)*x[0]**o+(0.57622727181)*x[0]+(0.62665109546)*x[1]**o+(0.948409659533)*x[1]
-        arg[0,3,0,1]=(0.776790978673)*x[0]**o+(-0.0244752180934)*x[0]+(-0.459252843816)*x[1]**o+(0.616203849528)*x[1]
-        arg[0,3,1,0]=(0.34783214571)*x[0]**o+(0.806528120142)*x[0]+(0.445864469556)*x[1]**o+(-0.221961922099)*x[1]
-        arg[0,3,1,1]=(0.0717966037463)*x[0]**o+(-0.434117388366)*x[0]+(0.577708844669)*x[1]**o+(-0.548519157145)*x[1]
-        arg[0,3,2,0]=(-0.548573971799)*x[0]**o+(-0.926704595492)*x[0]+(-0.33936340707)*x[1]**o+(0.0687290934591)*x[1]
-        arg[0,3,2,1]=(-0.28309240461)*x[0]**o+(0.12914675768)*x[0]+(-0.833323497891)*x[1]**o+(-0.577727985559)*x[1]
-        arg[0,4,0,0]=(-0.105416428922)*x[0]**o+(0.41564239907)*x[0]+(0.146657173319)*x[1]**o+(-0.0141417271845)*x[1]
-        arg[0,4,0,1]=(-0.876111094069)*x[0]**o+(0.491957669628)*x[0]+(0.534941970665)*x[1]**o+(-0.995507289274)*x[1]
-        arg[0,4,1,0]=(-0.678996394303)*x[0]**o+(0.183159947613)*x[0]+(-0.739368558349)*x[1]**o+(0.274319401135)*x[1]
-        arg[0,4,1,1]=(0.0472145581152)*x[0]**o+(-0.669737608207)*x[0]+(-0.651647023142)*x[1]**o+(0.351208329111)*x[1]
-        arg[0,4,2,0]=(0.114936857967)*x[0]**o+(0.564688790898)*x[0]+(-0.524234284672)*x[1]**o+(-0.127615425724)*x[1]
-        arg[0,4,2,1]=(0.568834117773)*x[0]**o+(-0.936513147599)*x[0]+(0.133122220811)*x[1]**o+(0.31510090512)*x[1]
-        arg[1,0,0,0]=(-0.821241886235)*x[0]**o+(0.779734235239)*x[0]+(-0.132449009841)*x[1]**o+(-0.0179700618848)*x[1]
-        arg[1,0,0,1]=(0.624372422235)*x[0]**o+(-0.752831611955)*x[0]+(-0.573597121344)*x[1]**o+(0.376463665377)*x[1]
-        arg[1,0,1,0]=(-0.568749808355)*x[0]**o+(-0.697521100346)*x[0]+(-0.249786553024)*x[1]**o+(-0.624593568423)*x[1]
-        arg[1,0,1,1]=(0.0765557360835)*x[0]**o+(-0.744005823966)*x[0]+(0.59246455477)*x[1]**o+(0.231310687774)*x[1]
-        arg[1,0,2,0]=(0.909614864187)*x[0]**o+(0.350543076144)*x[0]+(0.0689432766231)*x[1]**o+(-0.88465698758)*x[1]
-        arg[1,0,2,1]=(0.0610206203468)*x[0]**o+(0.620401328094)*x[0]+(0.378273922837)*x[1]**o+(0.91988744934)*x[1]
-        arg[1,1,0,0]=(0.917249169051)*x[0]**o+(0.756656473206)*x[0]+(0.728786835113)*x[1]**o+(0.116994159781)*x[1]
-        arg[1,1,0,1]=(0.331129708654)*x[0]**o+(-0.14342302905)*x[0]+(-0.418402258918)*x[1]**o+(-0.808676850609)*x[1]
-        arg[1,1,1,0]=(-0.527408405279)*x[0]**o+(-0.671440239997)*x[0]+(0.989603613532)*x[1]**o+(0.364280392731)*x[1]
-        arg[1,1,1,1]=(-0.189543145217)*x[0]**o+(0.14762392216)*x[0]+(0.11459047938)*x[1]**o+(-0.760477267267)*x[1]
-        arg[1,1,2,0]=(0.385274935809)*x[0]**o+(0.527744200995)*x[0]+(-0.862654310338)*x[1]**o+(0.904005467598)*x[1]
-        arg[1,1,2,1]=(-0.380421555378)*x[0]**o+(0.598300323394)*x[0]+(-0.541819816686)*x[1]**o+(0.446934572528)*x[1]
-        arg[1,2,0,0]=(0.446781075767)*x[0]**o+(0.906830344178)*x[0]+(0.158734254777)*x[1]**o+(-0.722982586936)*x[1]
-        arg[1,2,0,1]=(0.927811104869)*x[0]**o+(-0.446795135388)*x[0]+(-0.90301726295)*x[1]**o+(0.289530807979)*x[1]
-        arg[1,2,1,0]=(0.741527109588)*x[0]**o+(-0.370029728344)*x[0]+(0.157695458386)*x[1]**o+(-0.620804465293)*x[1]
-        arg[1,2,1,1]=(0.193242816889)*x[0]**o+(0.455789913444)*x[0]+(0.0491001091271)*x[1]**o+(-0.942127264151)*x[1]
-        arg[1,2,2,0]=(0.220709813709)*x[0]**o+(-0.713472965425)*x[0]+(-0.736262418061)*x[1]**o+(0.341347605023)*x[1]
-        arg[1,2,2,1]=(0.0034506429721)*x[0]**o+(0.397289753453)*x[0]+(-0.167013881353)*x[1]**o+(0.390364445974)*x[1]
-        arg[1,3,0,0]=(0.321471168172)*x[0]**o+(-0.237896433618)*x[0]+(-0.199843421009)*x[1]**o+(0.811319091471)*x[1]
-        arg[1,3,0,1]=(-0.0799622908037)*x[0]**o+(-0.66155883346)*x[0]+(0.0303112997369)*x[1]**o+(-0.199256497975)*x[1]
-        arg[1,3,1,0]=(-0.12051943489)*x[0]**o+(0.674374603779)*x[0]+(0.335933608833)*x[1]**o+(0.366671959553)*x[1]
-        arg[1,3,1,1]=(-0.587242845986)*x[0]**o+(-0.495652656487)*x[0]+(0.10609614346)*x[1]**o+(0.177210588935)*x[1]
-        arg[1,3,2,0]=(0.947782336638)*x[0]**o+(-0.327283099142)*x[0]+(-0.0280648836948)*x[1]**o+(0.133334543825)*x[1]
-        arg[1,3,2,1]=(-0.0887414134508)*x[0]**o+(0.640694455701)*x[0]+(0.266916366237)*x[1]**o+(0.345886606493)*x[1]
-        arg[1,4,0,0]=(-0.138184872938)*x[0]**o+(0.658635897645)*x[0]+(-0.00526240442626)*x[1]**o+(0.800443113371)*x[1]
-        arg[1,4,0,1]=(-0.549831917928)*x[0]**o+(-0.666733703837)*x[0]+(0.400982699808)*x[1]**o+(0.739099662817)*x[1]
-        arg[1,4,1,0]=(-0.137046722563)*x[0]**o+(-0.818450480933)*x[0]+(-0.827665726293)*x[1]**o+(-0.286585607624)*x[1]
-        arg[1,4,1,1]=(-0.474156202572)*x[0]**o+(-0.855381707793)*x[0]+(0.113318564035)*x[1]**o+(0.218410511108)*x[1]
-        arg[1,4,2,0]=(0.18476112439)*x[0]**o+(-0.964533442641)*x[0]+(-0.968611931598)*x[1]**o+(0.0973026144203)*x[1]
-        arg[1,4,2,1]=(-0.372995418552)*x[0]**o+(0.998322146553)*x[0]+(-0.384672070744)*x[1]**o+(0.47536977268)*x[1]
-        arg[2,0,0,0]=(0.882400857222)*x[0]**o+(0.455324640128)*x[0]+(0.764297272234)*x[1]**o+(0.498669000791)*x[1]
-        arg[2,0,0,1]=(0.894017590794)*x[0]**o+(0.217984119634)*x[0]+(-0.0934000967188)*x[1]**o+(-0.886960376026)*x[1]
-        arg[2,0,1,0]=(-0.382158057826)*x[0]**o+(-0.897639065996)*x[0]+(0.819002513335)*x[1]**o+(-0.0739374877518)*x[1]
-        arg[2,0,1,1]=(-0.259771272131)*x[0]**o+(-0.533540086977)*x[0]+(0.366917477923)*x[1]**o+(-0.751904525722)*x[1]
-        arg[2,0,2,0]=(-0.33946164111)*x[0]**o+(-0.317441178182)*x[0]+(-0.857625945147)*x[1]**o+(-0.84647892719)*x[1]
-        arg[2,0,2,1]=(0.153353093148)*x[0]**o+(0.832883645984)*x[0]+(-0.359476461654)*x[1]**o+(0.332390899654)*x[1]
-        arg[2,1,0,0]=(0.780980225775)*x[0]**o+(0.619330950566)*x[0]+(0.194312746335)*x[1]**o+(0.595311976655)*x[1]
-        arg[2,1,0,1]=(-0.334149973283)*x[0]**o+(-0.670178805858)*x[0]+(-0.313038325156)*x[1]**o+(0.793149618246)*x[1]
-        arg[2,1,1,0]=(-0.832852528577)*x[0]**o+(-0.606634692926)*x[0]+(-0.0643816133251)*x[1]**o+(-0.663765987285)*x[1]
-        arg[2,1,1,1]=(0.300975732963)*x[0]**o+(0.965431406497)*x[0]+(-0.618456119184)*x[1]**o+(0.459530421885)*x[1]
-        arg[2,1,2,0]=(0.122326105776)*x[0]**o+(0.0940802696378)*x[0]+(-0.986852501828)*x[1]**o+(0.370428043236)*x[1]
-        arg[2,1,2,1]=(0.447916985436)*x[0]**o+(-0.161926311978)*x[0]+(-0.0933563424166)*x[1]**o+(0.836290263421)*x[1]
-        arg[2,2,0,0]=(0.032076347277)*x[0]**o+(-0.447517143643)*x[0]+(-0.053769157756)*x[1]**o+(-0.0242981207801)*x[1]
-        arg[2,2,0,1]=(-0.403935703163)*x[0]**o+(-0.960750093184)*x[0]+(-0.287956277998)*x[1]**o+(-0.168614701082)*x[1]
-        arg[2,2,1,0]=(-0.205077009492)*x[0]**o+(-0.409536289697)*x[0]+(0.359071620541)*x[1]**o+(-0.466455759025)*x[1]
-        arg[2,2,1,1]=(0.443658057141)*x[0]**o+(-0.748681939527)*x[0]+(0.2153167916)*x[1]**o+(-0.475899799738)*x[1]
-        arg[2,2,2,0]=(-0.463879681251)*x[0]**o+(0.758317222041)*x[0]+(0.608221916958)*x[1]**o+(-0.237798399085)*x[1]
-        arg[2,2,2,1]=(0.533981754168)*x[0]**o+(0.590125912931)*x[0]+(0.8957267808)*x[1]**o+(0.294612478767)*x[1]
-        arg[2,3,0,0]=(0.499387701403)*x[0]**o+(0.0379132293822)*x[0]+(0.717384215206)*x[1]**o+(0.754497698503)*x[1]
-        arg[2,3,0,1]=(0.866500398882)*x[0]**o+(0.23678788012)*x[0]+(0.395132533716)*x[1]**o+(-0.451619930593)*x[1]
-        arg[2,3,1,0]=(-0.879663354176)*x[0]**o+(-0.328937922978)*x[0]+(0.688771917581)*x[1]**o+(-0.87392051489)*x[1]
-        arg[2,3,1,1]=(0.291214284356)*x[0]**o+(-0.783159133488)*x[0]+(0.240960084233)*x[1]**o+(0.339043900275)*x[1]
-        arg[2,3,2,0]=(0.47064755192)*x[0]**o+(-0.42618815064)*x[0]+(-0.505342655776)*x[1]**o+(0.408218280069)*x[1]
-        arg[2,3,2,1]=(0.775731405735)*x[0]**o+(-0.768750178591)*x[0]+(-0.896333275063)*x[1]**o+(0.286558848957)*x[1]
-        arg[2,4,0,0]=(-0.7221248688)*x[0]**o+(0.612509823967)*x[0]+(0.436744528143)*x[1]**o+(-0.761502758764)*x[1]
-        arg[2,4,0,1]=(-0.742652222385)*x[0]**o+(0.214811997988)*x[0]+(-0.031320962337)*x[1]**o+(-0.320134664789)*x[1]
-        arg[2,4,1,0]=(-0.529575527815)*x[0]**o+(0.623770482091)*x[0]+(-0.50790148262)*x[1]**o+(0.629874274271)*x[1]
-        arg[2,4,1,1]=(0.535631957883)*x[0]**o+(0.439578618993)*x[0]+(-0.770747718564)*x[1]**o+(0.0798696116058)*x[1]
-        arg[2,4,2,0]=(0.81688202721)*x[0]**o+(-0.0301054197201)*x[0]+(0.613495031968)*x[1]**o+(-0.153619455295)*x[1]
-        arg[2,4,2,1]=(0.493471708612)*x[0]**o+(0.423626757568)*x[0]+(0.093174141001)*x[1]**o+(0.307452108722)*x[1]
-        arg[3,0,0,0]=(-0.0668630243284)*x[0]**o+(-0.577709692979)*x[0]+(0.984307685082)*x[1]**o+(-0.171487030152)*x[1]
-        arg[3,0,0,1]=(-0.210452484293)*x[0]**o+(-0.130476372055)*x[0]+(-0.693596086089)*x[1]**o+(-0.692143724329)*x[1]
-        arg[3,0,1,0]=(-0.34853285523)*x[0]**o+(-0.369649709966)*x[0]+(0.824648362105)*x[1]**o+(0.733046240399)*x[1]
-        arg[3,0,1,1]=(0.861903045965)*x[0]**o+(0.609535692452)*x[0]+(0.681514895836)*x[1]**o+(0.66773275418)*x[1]
-        arg[3,0,2,0]=(0.0197670342844)*x[0]**o+(-0.251645539228)*x[0]+(-0.0390293468405)*x[1]**o+(-0.00955605638373)*x[1]
-        arg[3,0,2,1]=(-0.499093940395)*x[0]**o+(0.660356623112)*x[0]+(0.969057635866)*x[1]**o+(-0.821377317197)*x[1]
-        arg[3,1,0,0]=(-0.955568800095)*x[0]**o+(0.557877698917)*x[0]+(0.829599262959)*x[1]**o+(0.933736802562)*x[1]
-        arg[3,1,0,1]=(-0.910307638058)*x[0]**o+(-0.3287646946)*x[0]+(-0.777548579252)*x[1]**o+(-0.971744353969)*x[1]
-        arg[3,1,1,0]=(0.22353820834)*x[0]**o+(0.904479243377)*x[0]+(-0.108768166204)*x[1]**o+(0.823767232517)*x[1]
-        arg[3,1,1,1]=(0.371995768061)*x[0]**o+(0.747630377273)*x[0]+(0.931152588498)*x[1]**o+(-0.0154330268188)*x[1]
-        arg[3,1,2,0]=(0.4567417369)*x[0]**o+(0.424951293892)*x[0]+(-0.14032259215)*x[1]**o+(0.603329614924)*x[1]
-        arg[3,1,2,1]=(-0.855100213731)*x[0]**o+(-0.667832882495)*x[0]+(0.942530922378)*x[1]**o+(0.55861156259)*x[1]
-        arg[3,2,0,0]=(0.17190936572)*x[0]**o+(-0.904098615762)*x[0]+(0.991497679624)*x[1]**o+(0.373020358381)*x[1]
-        arg[3,2,0,1]=(-0.683587206983)*x[0]**o+(0.718257814718)*x[0]+(-0.730243933765)*x[1]**o+(-0.583892189979)*x[1]
-        arg[3,2,1,0]=(0.051672736629)*x[0]**o+(-0.991172563807)*x[0]+(0.36605487466)*x[1]**o+(0.680719877794)*x[1]
-        arg[3,2,1,1]=(0.438014662973)*x[0]**o+(0.172969450125)*x[0]+(-0.424515284177)*x[1]**o+(0.615315132547)*x[1]
-        arg[3,2,2,0]=(-0.709499532674)*x[0]**o+(0.985097212621)*x[0]+(0.326610298255)*x[1]**o+(0.994701669258)*x[1]
-        arg[3,2,2,1]=(-0.657647707844)*x[0]**o+(-0.683954483768)*x[0]+(-0.846657945161)*x[1]**o+(0.852308904063)*x[1]
-        arg[3,3,0,0]=(0.21346320453)*x[0]**o+(-0.181665119768)*x[0]+(0.549866100727)*x[1]**o+(-0.0858045316871)*x[1]
-        arg[3,3,0,1]=(0.249957470685)*x[0]**o+(0.537464773638)*x[0]+(0.0224330511636)*x[1]**o+(0.114623595638)*x[1]
-        arg[3,3,1,0]=(0.166507029533)*x[0]**o+(0.232150195873)*x[0]+(0.119453667263)*x[1]**o+(-0.261110960642)*x[1]
-        arg[3,3,1,1]=(0.358248720077)*x[0]**o+(-0.871911261059)*x[0]+(0.57743453064)*x[1]**o+(0.950322066335)*x[1]
-        arg[3,3,2,0]=(-0.896899724447)*x[0]**o+(-0.898884767716)*x[0]+(0.63832012742)*x[1]**o+(-0.833800375634)*x[1]
-        arg[3,3,2,1]=(0.425194254583)*x[0]**o+(0.161328467295)*x[0]+(0.496219405916)*x[1]**o+(0.380935896093)*x[1]
-        arg[3,4,0,0]=(0.793902581592)*x[0]**o+(-0.33428511164)*x[0]+(-0.283510438468)*x[1]**o+(0.228913046074)*x[1]
-        arg[3,4,0,1]=(0.372028980539)*x[0]**o+(-0.388909011671)*x[0]+(-0.259885631206)*x[1]**o+(-0.950910172897)*x[1]
-        arg[3,4,1,0]=(-0.80489673786)*x[0]**o+(-0.828175420038)*x[0]+(0.895070489116)*x[1]**o+(-0.742272132103)*x[1]
-        arg[3,4,1,1]=(0.272535126101)*x[0]**o+(0.902668974891)*x[0]+(0.399816667015)*x[1]**o+(-0.953186908789)*x[1]
-        arg[3,4,2,0]=(0.0341775288582)*x[0]**o+(0.962241492639)*x[0]+(0.906020184876)*x[1]**o+(-0.400536255726)*x[1]
-        arg[3,4,2,1]=(-0.745016464485)*x[0]**o+(-0.85241829747)*x[0]+(-0.648936544722)*x[1]**o+(-0.997030074218)*x[1]
-        ref[0,0,0,0]=(0.965300679335)/(o+1.)+(0.142356258935)+(0.392628958003)*0.5**o
-        ref[0,0,0,1]=(0.384782163488)/(o+1.)+(-0.407081281958)+(-0.503312425492)*0.5**o
-        ref[0,0,1,0]=(-0.765235012795)/(o+1.)+(-0.317187415586)+(0.660162511699)*0.5**o
-        ref[0,0,1,1]=(-0.451665346257)/(o+1.)+(-0.0341912040643)+(-0.986935412732)*0.5**o
-        ref[0,0,2,0]=(-0.695553902133)/(o+1.)+(-0.467731542733)+(0.632875178502)*0.5**o
-        ref[0,0,2,1]=(0.345909088853)/(o+1.)+(0.225477764967)+(0.102625648731)*0.5**o
-        ref[0,1,0,0]=(0.332480141972)/(o+1.)+(-0.388404308158)+(-0.0108106931425)*0.5**o
-        ref[0,1,0,1]=(0.328480565578)/(o+1.)+(0.324505149668)+(0.220826593491)*0.5**o
-        ref[0,1,1,0]=(0.292927451477)/(o+1.)+(0.183128254664)+(0.22735402466)*0.5**o
-        ref[0,1,1,1]=(-0.322061131008)/(o+1.)+(0.768096283874)+(0.495079875966)*0.5**o
-        ref[0,1,2,0]=(0.286037351205)/(o+1.)+(0.202030463766)+(0.968583889554)*0.5**o
-        ref[0,1,2,1]=(0.891305263219)/(o+1.)+(0.219403586029)+(0.361498191707)*0.5**o
-        ref[0,2,0,0]=(0.0870608077911)/(o+1.)+(-0.381665114117)+(0.185647566516)*0.5**o
-        ref[0,2,0,1]=(-0.0229924234496)/(o+1.)+(0.244502612446)+(0.227262327826)*0.5**o
-        ref[0,2,1,0]=(0.957377329048)/(o+1.)+(-0.0454149985758)+(0.0405753322301)*0.5**o
-        ref[0,2,1,1]=(-0.628262263897)/(o+1.)+(0.0870979129647)+(-0.546046301701)*0.5**o
-        ref[0,2,2,0]=(0.499595322279)/(o+1.)+(0.0509587090171)+(-0.828455793175)*0.5**o
-        ref[0,2,2,1]=(-0.678432418122)/(o+1.)+(0.319356853239)+(0.926138085222)*0.5**o
-        ref[0,3,0,0]=(0.62665109546)/(o+1.)+(0.762318465671)+(-0.473066058658)*0.5**o
-        ref[0,3,0,1]=(-0.459252843816)/(o+1.)+(0.295864315717)+(0.776790978673)*0.5**o
-        ref[0,3,1,0]=(0.445864469556)/(o+1.)+(0.292283099022)+(0.34783214571)*0.5**o
-        ref[0,3,1,1]=(0.577708844669)/(o+1.)+(-0.491318272755)+(0.0717966037463)*0.5**o
-        ref[0,3,2,0]=(-0.33936340707)/(o+1.)+(-0.428987751016)+(-0.548573971799)*0.5**o
-        ref[0,3,2,1]=(-0.833323497891)/(o+1.)+(-0.224290613939)+(-0.28309240461)*0.5**o
-        ref[0,4,0,0]=(0.146657173319)/(o+1.)+(0.200750335943)+(-0.105416428922)*0.5**o
-        ref[0,4,0,1]=(0.534941970665)/(o+1.)+(-0.251774809823)+(-0.876111094069)*0.5**o
-        ref[0,4,1,0]=(-0.739368558349)/(o+1.)+(0.228739674374)+(-0.678996394303)*0.5**o
-        ref[0,4,1,1]=(-0.651647023142)/(o+1.)+(-0.159264639548)+(0.0472145581152)*0.5**o
-        ref[0,4,2,0]=(-0.524234284672)/(o+1.)+(0.218536682587)+(0.114936857967)*0.5**o
-        ref[0,4,2,1]=(0.133122220811)/(o+1.)+(-0.31070612124)+(0.568834117773)*0.5**o
-        ref[1,0,0,0]=(-0.132449009841)/(o+1.)+(0.380882086677)+(-0.821241886235)*0.5**o
-        ref[1,0,0,1]=(-0.573597121344)/(o+1.)+(-0.188183973289)+(0.624372422235)*0.5**o
-        ref[1,0,1,0]=(-0.249786553024)/(o+1.)+(-0.661057334385)+(-0.568749808355)*0.5**o
-        ref[1,0,1,1]=(0.59246455477)/(o+1.)+(-0.256347568096)+(0.0765557360835)*0.5**o
-        ref[1,0,2,0]=(0.0689432766231)/(o+1.)+(-0.267056955718)+(0.909614864187)*0.5**o
-        ref[1,0,2,1]=(0.378273922837)/(o+1.)+(0.770144388717)+(0.0610206203468)*0.5**o
-        ref[1,1,0,0]=(0.728786835113)/(o+1.)+(0.436825316493)+(0.917249169051)*0.5**o
-        ref[1,1,0,1]=(-0.418402258918)/(o+1.)+(-0.47604993983)+(0.331129708654)*0.5**o
-        ref[1,1,1,0]=(0.989603613532)/(o+1.)+(-0.153579923633)+(-0.527408405279)*0.5**o
-        ref[1,1,1,1]=(0.11459047938)/(o+1.)+(-0.306426672553)+(-0.189543145217)*0.5**o
-        ref[1,1,2,0]=(-0.862654310338)/(o+1.)+(0.715874834296)+(0.385274935809)*0.5**o
-        ref[1,1,2,1]=(-0.541819816686)/(o+1.)+(0.522617447961)+(-0.380421555378)*0.5**o
-        ref[1,2,0,0]=(0.158734254777)/(o+1.)+(0.0919238786215)+(0.446781075767)*0.5**o
-        ref[1,2,0,1]=(-0.90301726295)/(o+1.)+(-0.0786321637044)+(0.927811104869)*0.5**o
-        ref[1,2,1,0]=(0.157695458386)/(o+1.)+(-0.495417096819)+(0.741527109588)*0.5**o
-        ref[1,2,1,1]=(0.0491001091271)/(o+1.)+(-0.243168675353)+(0.193242816889)*0.5**o
-        ref[1,2,2,0]=(-0.736262418061)/(o+1.)+(-0.186062680201)+(0.220709813709)*0.5**o
-        ref[1,2,2,1]=(-0.167013881353)/(o+1.)+(0.393827099713)+(0.0034506429721)*0.5**o
-        ref[1,3,0,0]=(-0.199843421009)/(o+1.)+(0.286711328927)+(0.321471168172)*0.5**o
-        ref[1,3,0,1]=(0.0303112997369)/(o+1.)+(-0.430407665717)+(-0.0799622908037)*0.5**o
-        ref[1,3,1,0]=(0.335933608833)/(o+1.)+(0.520523281666)+(-0.12051943489)*0.5**o
-        ref[1,3,1,1]=(0.10609614346)/(o+1.)+(-0.159221033776)+(-0.587242845986)*0.5**o
-        ref[1,3,2,0]=(-0.0280648836948)/(o+1.)+(-0.0969742776586)+(0.947782336638)*0.5**o
-        ref[1,3,2,1]=(0.266916366237)/(o+1.)+(0.493290531097)+(-0.0887414134508)*0.5**o
-        ref[1,4,0,0]=(-0.00526240442626)/(o+1.)+(0.729539505508)+(-0.138184872938)*0.5**o
-        ref[1,4,0,1]=(0.400982699808)/(o+1.)+(0.0361829794896)+(-0.549831917928)*0.5**o
-        ref[1,4,1,0]=(-0.827665726293)/(o+1.)+(-0.552518044279)+(-0.137046722563)*0.5**o
-        ref[1,4,1,1]=(0.113318564035)/(o+1.)+(-0.318485598343)+(-0.474156202572)*0.5**o
-        ref[1,4,2,0]=(-0.968611931598)/(o+1.)+(-0.433615414111)+(0.18476112439)*0.5**o
-        ref[1,4,2,1]=(-0.384672070744)/(o+1.)+(0.736845959617)+(-0.372995418552)*0.5**o
-        ref[2,0,0,0]=(0.764297272234)/(o+1.)+(0.476996820459)+(0.882400857222)*0.5**o
-        ref[2,0,0,1]=(-0.0934000967188)/(o+1.)+(-0.334488128196)+(0.894017590794)*0.5**o
-        ref[2,0,1,0]=(0.819002513335)/(o+1.)+(-0.485788276874)+(-0.382158057826)*0.5**o
-        ref[2,0,1,1]=(0.366917477923)/(o+1.)+(-0.64272230635)+(-0.259771272131)*0.5**o
-        ref[2,0,2,0]=(-0.857625945147)/(o+1.)+(-0.581960052686)+(-0.33946164111)*0.5**o
-        ref[2,0,2,1]=(-0.359476461654)/(o+1.)+(0.582637272819)+(0.153353093148)*0.5**o
-        ref[2,1,0,0]=(0.194312746335)/(o+1.)+(0.607321463611)+(0.780980225775)*0.5**o
-        ref[2,1,0,1]=(-0.313038325156)/(o+1.)+(0.0614854061938)+(-0.334149973283)*0.5**o
-        ref[2,1,1,0]=(-0.0643816133251)/(o+1.)+(-0.635200340106)+(-0.832852528577)*0.5**o
-        ref[2,1,1,1]=(-0.618456119184)/(o+1.)+(0.712480914191)+(0.300975732963)*0.5**o
-        ref[2,1,2,0]=(-0.986852501828)/(o+1.)+(0.232254156437)+(0.122326105776)*0.5**o
-        ref[2,1,2,1]=(-0.0933563424166)/(o+1.)+(0.337181975722)+(0.447916985436)*0.5**o
-        ref[2,2,0,0]=(-0.053769157756)/(o+1.)+(-0.235907632211)+(0.032076347277)*0.5**o
-        ref[2,2,0,1]=(-0.287956277998)/(o+1.)+(-0.564682397133)+(-0.403935703163)*0.5**o
-        ref[2,2,1,0]=(0.359071620541)/(o+1.)+(-0.437996024361)+(-0.205077009492)*0.5**o
-        ref[2,2,1,1]=(0.2153167916)/(o+1.)+(-0.612290869632)+(0.443658057141)*0.5**o
-        ref[2,2,2,0]=(0.608221916958)/(o+1.)+(0.260259411478)+(-0.463879681251)*0.5**o
-        ref[2,2,2,1]=(0.8957267808)/(o+1.)+(0.442369195849)+(0.533981754168)*0.5**o
-        ref[2,3,0,0]=(0.717384215206)/(o+1.)+(0.396205463942)+(0.499387701403)*0.5**o
-        ref[2,3,0,1]=(0.395132533716)/(o+1.)+(-0.107416025237)+(0.866500398882)*0.5**o
-        ref[2,3,1,0]=(0.688771917581)/(o+1.)+(-0.601429218934)+(-0.879663354176)*0.5**o
-        ref[2,3,1,1]=(0.240960084233)/(o+1.)+(-0.222057616607)+(0.291214284356)*0.5**o
-        ref[2,3,2,0]=(-0.505342655776)/(o+1.)+(-0.00898493528542)+(0.47064755192)*0.5**o
-        ref[2,3,2,1]=(-0.896333275063)/(o+1.)+(-0.241095664817)+(0.775731405735)*0.5**o
-        ref[2,4,0,0]=(0.436744528143)/(o+1.)+(-0.0744964673986)+(-0.7221248688)*0.5**o
-        ref[2,4,0,1]=(-0.031320962337)/(o+1.)+(-0.0526613334003)+(-0.742652222385)*0.5**o
-        ref[2,4,1,0]=(-0.50790148262)/(o+1.)+(0.626822378181)+(-0.529575527815)*0.5**o
-        ref[2,4,1,1]=(-0.770747718564)/(o+1.)+(0.2597241153)+(0.535631957883)*0.5**o
-        ref[2,4,2,0]=(0.613495031968)/(o+1.)+(-0.0918624375077)+(0.81688202721)*0.5**o
-        ref[2,4,2,1]=(0.093174141001)/(o+1.)+(0.365539433145)+(0.493471708612)*0.5**o
-        ref[3,0,0,0]=(0.984307685082)/(o+1.)+(-0.374598361566)+(-0.0668630243284)*0.5**o
-        ref[3,0,0,1]=(-0.693596086089)/(o+1.)+(-0.411310048192)+(-0.210452484293)*0.5**o
-        ref[3,0,1,0]=(0.824648362105)/(o+1.)+(0.181698265217)+(-0.34853285523)*0.5**o
-        ref[3,0,1,1]=(0.681514895836)/(o+1.)+(0.638634223316)+(0.861903045965)*0.5**o
-        ref[3,0,2,0]=(-0.0390293468405)/(o+1.)+(-0.130600797806)+(0.0197670342844)*0.5**o
-        ref[3,0,2,1]=(0.969057635866)/(o+1.)+(-0.0805103470423)+(-0.499093940395)*0.5**o
-        ref[3,1,0,0]=(0.829599262959)/(o+1.)+(0.745807250739)+(-0.955568800095)*0.5**o
-        ref[3,1,0,1]=(-0.777548579252)/(o+1.)+(-0.650254524284)+(-0.910307638058)*0.5**o
-        ref[3,1,1,0]=(-0.108768166204)/(o+1.)+(0.864123237947)+(0.22353820834)*0.5**o
-        ref[3,1,1,1]=(0.931152588498)/(o+1.)+(0.366098675227)+(0.371995768061)*0.5**o
-        ref[3,1,2,0]=(-0.14032259215)/(o+1.)+(0.514140454408)+(0.4567417369)*0.5**o
-        ref[3,1,2,1]=(0.942530922378)/(o+1.)+(-0.0546106599524)+(-0.855100213731)*0.5**o
-        ref[3,2,0,0]=(0.991497679624)/(o+1.)+(-0.26553912869)+(0.17190936572)*0.5**o
-        ref[3,2,0,1]=(-0.730243933765)/(o+1.)+(0.0671828123695)+(-0.683587206983)*0.5**o
-        ref[3,2,1,0]=(0.36605487466)/(o+1.)+(-0.155226343006)+(0.051672736629)*0.5**o
-        ref[3,2,1,1]=(-0.424515284177)/(o+1.)+(0.394142291336)+(0.438014662973)*0.5**o
-        ref[3,2,2,0]=(0.326610298255)/(o+1.)+(0.98989944094)+(-0.709499532674)*0.5**o
-        ref[3,2,2,1]=(-0.846657945161)/(o+1.)+(0.0841772101477)+(-0.657647707844)*0.5**o
-        ref[3,3,0,0]=(0.549866100727)/(o+1.)+(-0.133734825728)+(0.21346320453)*0.5**o
-        ref[3,3,0,1]=(0.0224330511636)/(o+1.)+(0.326044184638)+(0.249957470685)*0.5**o
-        ref[3,3,1,0]=(0.119453667263)/(o+1.)+(-0.0144803823844)+(0.166507029533)*0.5**o
-        ref[3,3,1,1]=(0.57743453064)/(o+1.)+(0.0392054026384)+(0.358248720077)*0.5**o
-        ref[3,3,2,0]=(0.63832012742)/(o+1.)+(-0.866342571675)+(-0.896899724447)*0.5**o
-        ref[3,3,2,1]=(0.496219405916)/(o+1.)+(0.271132181694)+(0.425194254583)*0.5**o
-        ref[3,4,0,0]=(-0.283510438468)/(o+1.)+(-0.0526860327828)+(0.793902581592)*0.5**o
-        ref[3,4,0,1]=(-0.259885631206)/(o+1.)+(-0.669909592284)+(0.372028980539)*0.5**o
-        ref[3,4,1,0]=(0.895070489116)/(o+1.)+(-0.78522377607)+(-0.80489673786)*0.5**o
-        ref[3,4,1,1]=(0.399816667015)/(o+1.)+(-0.0252589669489)+(0.272535126101)*0.5**o
-        ref[3,4,2,0]=(0.906020184876)/(o+1.)+(0.280852618457)+(0.0341775288582)*0.5**o
-        ref[3,4,2,1]=(-0.648936544722)/(o+1.)+(-0.924724185844)+(-0.745016464485)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.891975745754)*x[0]**o+(0.678331209591)*x[0]+(-0.450022305538)*x[1]**o+(0.521272586024)*x[1]+(-0.28868708769)*x[2]**o+(-0.631617544339)*x[2]
-        arg[0,0,0,1]=(0.428698930349)*x[0]**o+(-0.856251438077)*x[0]+(0.915766367729)*x[1]**o+(-0.35019463199)*x[1]+(-0.0029340113102)*x[2]**o+(-0.394458505835)*x[2]
-        arg[0,0,1,0]=(0.974069118653)*x[0]**o+(-0.674028781962)*x[0]+(0.489718068973)*x[1]**o+(-0.471323892144)*x[1]+(0.11469271678)*x[2]**o+(-0.264584383354)*x[2]
-        arg[0,0,1,1]=(0.813412823502)*x[0]**o+(0.739276532652)*x[0]+(-0.863216628203)*x[1]**o+(0.486539683681)*x[1]+(-0.771448803712)*x[2]**o+(-0.621526889056)*x[2]
-        arg[0,0,2,0]=(-0.874502916672)*x[0]**o+(0.0708047915752)*x[0]+(0.917576817333)*x[1]**o+(-0.257626031306)*x[1]+(-0.161822453369)*x[2]**o+(0.488866912786)*x[2]
-        arg[0,0,2,1]=(-0.258524075807)*x[0]**o+(0.206589504672)*x[0]+(0.232971263871)*x[1]**o+(-0.917991566808)*x[1]+(0.725943193794)*x[2]**o+(-0.170341108992)*x[2]
-        arg[0,1,0,0]=(0.489505903018)*x[0]**o+(0.386376068728)*x[0]+(0.510797276159)*x[1]**o+(0.45356046467)*x[1]+(-0.664963144251)*x[2]**o+(0.128579947316)*x[2]
-        arg[0,1,0,1]=(0.441567332096)*x[0]**o+(0.658686083904)*x[0]+(0.46601056348)*x[1]**o+(-0.130759928108)*x[1]+(0.324576589)*x[2]**o+(0.844700852997)*x[2]
-        arg[0,1,1,0]=(0.388576628492)*x[0]**o+(0.41731399682)*x[0]+(-0.37037879729)*x[1]**o+(-0.00306376860454)*x[1]+(-0.464420131682)*x[2]**o+(0.570470055678)*x[2]
-        arg[0,1,1,1]=(-0.0537780037583)*x[0]**o+(0.641854502644)*x[0]+(-0.475355608842)*x[1]**o+(-0.155501886306)*x[1]+(0.159833591997)*x[2]**o+(0.889951997355)*x[2]
-        arg[0,1,2,0]=(0.58262140787)*x[0]**o+(0.487380368384)*x[0]+(-0.783228845976)*x[1]**o+(-0.683221249176)*x[1]+(0.98628901689)*x[2]**o+(0.591884616904)*x[2]
-        arg[0,1,2,1]=(0.438472233911)*x[0]**o+(0.989088416794)*x[0]+(0.221688966923)*x[1]**o+(-0.119266918098)*x[1]+(-0.887421255415)*x[2]**o+(0.728082459156)*x[2]
-        arg[0,2,0,0]=(-0.334110476968)*x[0]**o+(-0.877094545216)*x[0]+(-0.293135209996)*x[1]**o+(0.578110480224)*x[1]+(-0.898686340104)*x[2]**o+(0.528072783107)*x[2]
-        arg[0,2,0,1]=(0.33041258354)*x[0]**o+(-0.70349630629)*x[0]+(0.349551161792)*x[1]**o+(-0.296687014146)*x[1]+(-0.272377440466)*x[2]**o+(-0.42221458274)*x[2]
-        arg[0,2,1,0]=(-0.80021736912)*x[0]**o+(0.271727608951)*x[0]+(0.689351606243)*x[1]**o+(-0.95063104158)*x[1]+(0.447293221661)*x[2]**o+(0.962435109303)*x[2]
-        arg[0,2,1,1]=(-0.773331228218)*x[0]**o+(0.569225340051)*x[0]+(-0.0330042729183)*x[1]**o+(-0.732867386826)*x[1]+(-0.399631128084)*x[2]**o+(0.235907094874)*x[2]
-        arg[0,2,2,0]=(-0.943072868965)*x[0]**o+(-0.959364749946)*x[0]+(0.922934300445)*x[1]**o+(0.27257203243)*x[1]+(0.450453864748)*x[2]**o+(0.521284310775)*x[2]
-        arg[0,2,2,1]=(-0.821201079286)*x[0]**o+(-0.801011107627)*x[0]+(0.554575277011)*x[1]**o+(-0.411361733513)*x[1]+(-0.858195570474)*x[2]**o+(0.420660103079)*x[2]
-        arg[0,3,0,0]=(-0.0564164524098)*x[0]**o+(-0.865516143298)*x[0]+(-0.85754022189)*x[1]**o+(-0.0159800361584)*x[1]+(-0.891158469429)*x[2]**o+(-0.809909518115)*x[2]
-        arg[0,3,0,1]=(-0.553858251068)*x[0]**o+(0.827558838148)*x[0]+(0.690081127613)*x[1]**o+(0.3475090336)*x[1]+(-0.190426828891)*x[2]**o+(-0.99589316535)*x[2]
-        arg[0,3,1,0]=(-0.992317453163)*x[0]**o+(-0.992812531491)*x[0]+(-0.859683310869)*x[1]**o+(0.441779587739)*x[1]+(0.582457020078)*x[2]**o+(-0.959111461424)*x[2]
-        arg[0,3,1,1]=(-0.713753922213)*x[0]**o+(0.504885148776)*x[0]+(-0.076988545634)*x[1]**o+(0.530828889101)*x[1]+(-0.335616242708)*x[2]**o+(-0.0421293420747)*x[2]
-        arg[0,3,2,0]=(0.536024118289)*x[0]**o+(-0.527038052847)*x[0]+(-0.558392588656)*x[1]**o+(0.928618057856)*x[1]+(0.427507510033)*x[2]**o+(0.223570914141)*x[2]
-        arg[0,3,2,1]=(-0.197968756117)*x[0]**o+(-0.58157606173)*x[0]+(-0.878630012825)*x[1]**o+(-0.380635552726)*x[1]+(-0.477570149125)*x[2]**o+(-0.642904015434)*x[2]
-        arg[0,4,0,0]=(0.688763655127)*x[0]**o+(0.286011523933)*x[0]+(0.0933014250929)*x[1]**o+(0.355550563233)*x[1]+(0.121445291305)*x[2]**o+(-0.814538082974)*x[2]
-        arg[0,4,0,1]=(-0.402717742839)*x[0]**o+(0.403946649835)*x[0]+(0.286978800579)*x[1]**o+(-0.363358056216)*x[1]+(-0.185233594102)*x[2]**o+(-0.902660250807)*x[2]
-        arg[0,4,1,0]=(0.39352838659)*x[0]**o+(-0.430755011337)*x[0]+(-0.912518631162)*x[1]**o+(-0.634118795867)*x[1]+(-0.802445843416)*x[2]**o+(0.643395158048)*x[2]
-        arg[0,4,1,1]=(-0.375507250175)*x[0]**o+(-0.609576942939)*x[0]+(0.35060243693)*x[1]**o+(0.384630130603)*x[1]+(0.165576820334)*x[2]**o+(-0.319012357341)*x[2]
-        arg[0,4,2,0]=(0.0603590263818)*x[0]**o+(-0.435954775883)*x[0]+(-0.895329092913)*x[1]**o+(0.364809539103)*x[1]+(0.912864788565)*x[2]**o+(0.582044419963)*x[2]
-        arg[0,4,2,1]=(-0.111089454685)*x[0]**o+(-0.247527778755)*x[0]+(0.897263901657)*x[1]**o+(0.168097655548)*x[1]+(-0.532273075067)*x[2]**o+(-0.158529268933)*x[2]
-        arg[1,0,0,0]=(-0.940865155622)*x[0]**o+(0.639652431549)*x[0]+(0.204433172026)*x[1]**o+(-0.333435100662)*x[1]+(0.922286591304)*x[2]**o+(0.245091036189)*x[2]
-        arg[1,0,0,1]=(-0.843207880309)*x[0]**o+(0.496567621809)*x[0]+(-0.747925907677)*x[1]**o+(-0.666195656311)*x[1]+(-0.836848401917)*x[2]**o+(-0.77301298659)*x[2]
-        arg[1,0,1,0]=(-0.484987528212)*x[0]**o+(-0.208798022576)*x[0]+(-0.516295195217)*x[1]**o+(0.273733676249)*x[1]+(0.642865886081)*x[2]**o+(0.94556566928)*x[2]
-        arg[1,0,1,1]=(0.285548625366)*x[0]**o+(-0.316870037241)*x[0]+(0.166055429845)*x[1]**o+(-0.907240066063)*x[1]+(-0.973602611383)*x[2]**o+(-0.232655535454)*x[2]
-        arg[1,0,2,0]=(0.96797757731)*x[0]**o+(-0.0920831342923)*x[0]+(0.0367163548581)*x[1]**o+(0.372503137376)*x[1]+(0.114902128151)*x[2]**o+(0.147390259838)*x[2]
-        arg[1,0,2,1]=(-0.486190283922)*x[0]**o+(-0.713417720041)*x[0]+(0.0212905465522)*x[1]**o+(-0.358636168795)*x[1]+(0.719370965272)*x[2]**o+(-0.506502687359)*x[2]
-        arg[1,1,0,0]=(-0.216544472879)*x[0]**o+(-0.690540499698)*x[0]+(0.190155427044)*x[1]**o+(0.832206912182)*x[1]+(-0.108713936252)*x[2]**o+(-0.221373087337)*x[2]
-        arg[1,1,0,1]=(0.982934604971)*x[0]**o+(0.604369826835)*x[0]+(-0.34365978148)*x[1]**o+(-0.167486779981)*x[1]+(-0.753609370582)*x[2]**o+(-0.220160888977)*x[2]
-        arg[1,1,1,0]=(0.516177509446)*x[0]**o+(-0.474445723273)*x[0]+(0.813647087566)*x[1]**o+(-0.281201093802)*x[1]+(0.941465944108)*x[2]**o+(0.352728360059)*x[2]
-        arg[1,1,1,1]=(-0.914732890633)*x[0]**o+(0.214962090901)*x[0]+(-0.710485058274)*x[1]**o+(-0.070756754056)*x[1]+(-0.449571590211)*x[2]**o+(0.353655711451)*x[2]
-        arg[1,1,2,0]=(-0.96655555619)*x[0]**o+(-0.47460534732)*x[0]+(0.0610695053327)*x[1]**o+(0.815390116709)*x[1]+(-0.844916163552)*x[2]**o+(-0.433015304307)*x[2]
-        arg[1,1,2,1]=(-0.611879453709)*x[0]**o+(0.849092848509)*x[0]+(0.0181322361566)*x[1]**o+(0.264173017827)*x[1]+(0.0452154806937)*x[2]**o+(0.0395300648465)*x[2]
-        arg[1,2,0,0]=(0.558820946357)*x[0]**o+(-0.471519705598)*x[0]+(-0.200404864145)*x[1]**o+(0.452044160691)*x[1]+(-0.507559485963)*x[2]**o+(-0.993437841726)*x[2]
-        arg[1,2,0,1]=(-0.944738664192)*x[0]**o+(-0.497536772117)*x[0]+(0.111399525675)*x[1]**o+(-0.93450294271)*x[1]+(-0.463702615737)*x[2]**o+(-0.330112672884)*x[2]
-        arg[1,2,1,0]=(0.238225961058)*x[0]**o+(-0.471520173419)*x[0]+(0.483767084892)*x[1]**o+(-0.0359407284537)*x[1]+(-0.767379409753)*x[2]**o+(-0.283596371915)*x[2]
-        arg[1,2,1,1]=(0.188699181238)*x[0]**o+(0.829593121989)*x[0]+(0.603377767593)*x[1]**o+(0.163334775468)*x[1]+(-0.695141594131)*x[2]**o+(-0.335208640181)*x[2]
-        arg[1,2,2,0]=(-0.0953160757881)*x[0]**o+(0.179594592176)*x[0]+(0.95983902191)*x[1]**o+(-0.689622683527)*x[1]+(0.418442085936)*x[2]**o+(-0.271399861129)*x[2]
-        arg[1,2,2,1]=(0.598691886555)*x[0]**o+(0.334120340646)*x[0]+(0.580763872443)*x[1]**o+(0.769016736836)*x[1]+(-0.442121483951)*x[2]**o+(0.0685264980499)*x[2]
-        arg[1,3,0,0]=(-0.482944276372)*x[0]**o+(-0.0518057205519)*x[0]+(-0.878100108766)*x[1]**o+(-0.130957239599)*x[1]+(0.71270341547)*x[2]**o+(-0.313822116756)*x[2]
-        arg[1,3,0,1]=(0.565128725562)*x[0]**o+(0.706149004661)*x[0]+(0.837747652328)*x[1]**o+(-0.429417376176)*x[1]+(0.179437627997)*x[2]**o+(-0.841831183522)*x[2]
-        arg[1,3,1,0]=(0.608648887224)*x[0]**o+(0.118220851451)*x[0]+(0.492890967377)*x[1]**o+(-0.162344084552)*x[1]+(0.141203210671)*x[2]**o+(0.883457779687)*x[2]
-        arg[1,3,1,1]=(0.0322521291544)*x[0]**o+(0.839748977403)*x[0]+(0.75094786544)*x[1]**o+(0.954833145672)*x[1]+(0.461457599013)*x[2]**o+(-0.761973385747)*x[2]
-        arg[1,3,2,0]=(-0.757022609619)*x[0]**o+(-0.250893790099)*x[0]+(-0.973631035961)*x[1]**o+(0.506574565217)*x[1]+(0.103557430896)*x[2]**o+(0.881026337134)*x[2]
-        arg[1,3,2,1]=(-0.395945302352)*x[0]**o+(-0.125428842065)*x[0]+(-0.339663004568)*x[1]**o+(-0.0272044592179)*x[1]+(0.75200506467)*x[2]**o+(-0.632922582454)*x[2]
-        arg[1,4,0,0]=(0.0462127928202)*x[0]**o+(-0.745613488751)*x[0]+(0.357338297422)*x[1]**o+(0.739034094804)*x[1]+(-0.451247272253)*x[2]**o+(0.418030110847)*x[2]
-        arg[1,4,0,1]=(0.914131238526)*x[0]**o+(-0.0280436066624)*x[0]+(0.861048515118)*x[1]**o+(0.148206807819)*x[1]+(-0.990856990354)*x[2]**o+(0.903615279172)*x[2]
-        arg[1,4,1,0]=(0.189809824038)*x[0]**o+(-0.749477832258)*x[0]+(-0.802713794942)*x[1]**o+(0.0610727255572)*x[1]+(0.292940815327)*x[2]**o+(0.213443422205)*x[2]
-        arg[1,4,1,1]=(0.792313292544)*x[0]**o+(0.321344675677)*x[0]+(-0.417516596097)*x[1]**o+(-0.63797359819)*x[1]+(-0.426112319872)*x[2]**o+(0.69281310288)*x[2]
-        arg[1,4,2,0]=(-0.11017764073)*x[0]**o+(0.703037562344)*x[0]+(0.739591950873)*x[1]**o+(0.445612268331)*x[1]+(-0.071251825024)*x[2]**o+(0.00577350654185)*x[2]
-        arg[1,4,2,1]=(-0.793584849832)*x[0]**o+(-0.546439256231)*x[0]+(-0.947194030803)*x[1]**o+(-0.0455700937677)*x[1]+(0.535368301918)*x[2]**o+(0.814435535521)*x[2]
-        arg[2,0,0,0]=(0.249661949438)*x[0]**o+(-0.581533619092)*x[0]+(-0.674373505747)*x[1]**o+(0.464175602196)*x[1]+(-0.528086662834)*x[2]**o+(-0.212416176351)*x[2]
-        arg[2,0,0,1]=(-0.588282108798)*x[0]**o+(0.761293399494)*x[0]+(0.99918874903)*x[1]**o+(0.542499992928)*x[1]+(0.433925746483)*x[2]**o+(0.972864491889)*x[2]
-        arg[2,0,1,0]=(0.0572335623442)*x[0]**o+(0.444906443533)*x[0]+(-0.305538151235)*x[1]**o+(0.244530068532)*x[1]+(-0.20198975858)*x[2]**o+(-0.00490928477351)*x[2]
-        arg[2,0,1,1]=(0.832496085695)*x[0]**o+(-0.797246004595)*x[0]+(0.873816520001)*x[1]**o+(0.628293733929)*x[1]+(-0.110922710624)*x[2]**o+(-0.0718221914062)*x[2]
-        arg[2,0,2,0]=(0.140970192196)*x[0]**o+(0.582230323368)*x[0]+(-0.757764751267)*x[1]**o+(0.206061262231)*x[1]+(0.657237474788)*x[2]**o+(0.598632779121)*x[2]
-        arg[2,0,2,1]=(-0.686218790734)*x[0]**o+(-0.157012470162)*x[0]+(0.448565721848)*x[1]**o+(0.0539087954076)*x[1]+(0.619821805007)*x[2]**o+(0.289144379283)*x[2]
-        arg[2,1,0,0]=(0.787423884494)*x[0]**o+(-0.985959420171)*x[0]+(0.155584360983)*x[1]**o+(0.223292293778)*x[1]+(-0.437349719833)*x[2]**o+(0.989077189275)*x[2]
-        arg[2,1,0,1]=(-0.597301631508)*x[0]**o+(-0.0414813766671)*x[0]+(-0.64883048443)*x[1]**o+(-0.18731615522)*x[1]+(0.735189823623)*x[2]**o+(-0.746633725819)*x[2]
-        arg[2,1,1,0]=(-0.393486075452)*x[0]**o+(-0.480110060647)*x[0]+(0.559811870081)*x[1]**o+(0.0814282056993)*x[1]+(0.244899906416)*x[2]**o+(-0.884478480652)*x[2]
-        arg[2,1,1,1]=(0.547747813175)*x[0]**o+(0.317890585903)*x[0]+(-0.70925099068)*x[1]**o+(-0.543227445702)*x[1]+(0.749693240223)*x[2]**o+(0.79984501038)*x[2]
-        arg[2,1,2,0]=(-0.289583636666)*x[0]**o+(0.513926622265)*x[0]+(-0.00283544918865)*x[1]**o+(0.530724065811)*x[1]+(0.900479623243)*x[2]**o+(-0.146332301083)*x[2]
-        arg[2,1,2,1]=(-0.487223003118)*x[0]**o+(0.161546483594)*x[0]+(-0.685211654772)*x[1]**o+(0.4803179816)*x[1]+(0.676120396917)*x[2]**o+(-0.174953085068)*x[2]
-        arg[2,2,0,0]=(0.31746495834)*x[0]**o+(-0.513225182059)*x[0]+(0.33220677322)*x[1]**o+(-0.302371334854)*x[1]+(0.0964988251907)*x[2]**o+(-0.259532745762)*x[2]
-        arg[2,2,0,1]=(0.313462846078)*x[0]**o+(0.079720902627)*x[0]+(-0.487932457563)*x[1]**o+(-0.786522786773)*x[1]+(0.357868214554)*x[2]**o+(0.251856050362)*x[2]
-        arg[2,2,1,0]=(-0.180472378556)*x[0]**o+(0.345084802362)*x[0]+(0.641108557953)*x[1]**o+(0.198717742483)*x[1]+(0.0374114682326)*x[2]**o+(-0.915249907773)*x[2]
-        arg[2,2,1,1]=(0.303787742688)*x[0]**o+(-0.941822487745)*x[0]+(-0.262567025842)*x[1]**o+(-0.197051445307)*x[1]+(0.381561965565)*x[2]**o+(-0.198549777232)*x[2]
-        arg[2,2,2,0]=(-0.850284190461)*x[0]**o+(0.985224868544)*x[0]+(0.633868153422)*x[1]**o+(-0.57559927346)*x[1]+(0.68753726951)*x[2]**o+(-0.923696997656)*x[2]
-        arg[2,2,2,1]=(0.559527478503)*x[0]**o+(-0.619764636475)*x[0]+(-0.0352163693945)*x[1]**o+(-0.37351931995)*x[1]+(0.0772333960938)*x[2]**o+(-0.353057755509)*x[2]
-        arg[2,3,0,0]=(-0.274260374984)*x[0]**o+(0.365180349506)*x[0]+(-0.879564869545)*x[1]**o+(-0.0908162765131)*x[1]+(0.813491263836)*x[2]**o+(-0.396739585204)*x[2]
-        arg[2,3,0,1]=(-0.793218219979)*x[0]**o+(0.227474218201)*x[0]+(0.97716610661)*x[1]**o+(0.317074032722)*x[1]+(0.076776446926)*x[2]**o+(0.069448617786)*x[2]
-        arg[2,3,1,0]=(0.411400569812)*x[0]**o+(0.517743454926)*x[0]+(0.646697523033)*x[1]**o+(-0.973369313024)*x[1]+(-0.599741793926)*x[2]**o+(-0.743687020283)*x[2]
-        arg[2,3,1,1]=(-0.491445354697)*x[0]**o+(-0.549840110396)*x[0]+(-0.260012915614)*x[1]**o+(0.671054626537)*x[1]+(0.0394966796969)*x[2]**o+(-0.701243931411)*x[2]
-        arg[2,3,2,0]=(-0.806859723517)*x[0]**o+(-0.753940066715)*x[0]+(-0.664229274865)*x[1]**o+(0.0595484609931)*x[1]+(-0.921892262667)*x[2]**o+(-0.701770672395)*x[2]
-        arg[2,3,2,1]=(-0.313979805844)*x[0]**o+(-0.542583864222)*x[0]+(-0.985990886553)*x[1]**o+(0.664926443979)*x[1]+(-0.99778334615)*x[2]**o+(0.268046810979)*x[2]
-        arg[2,4,0,0]=(-0.41348240167)*x[0]**o+(0.473517720534)*x[0]+(-0.290880345559)*x[1]**o+(-0.607611624107)*x[1]+(-0.25537697471)*x[2]**o+(-0.472402477362)*x[2]
-        arg[2,4,0,1]=(0.0222534371058)*x[0]**o+(-0.0739354104963)*x[0]+(-0.960057765718)*x[1]**o+(-0.772161403037)*x[1]+(-0.0356127352146)*x[2]**o+(-0.623605628308)*x[2]
-        arg[2,4,1,0]=(-0.750995516053)*x[0]**o+(-0.289601799215)*x[0]+(0.294370180152)*x[1]**o+(0.956012147239)*x[1]+(-0.27958662106)*x[2]**o+(-0.370609593537)*x[2]
-        arg[2,4,1,1]=(0.321767371741)*x[0]**o+(0.999223434136)*x[0]+(0.665865428241)*x[1]**o+(0.427942082269)*x[1]+(-0.135020552387)*x[2]**o+(0.692025479514)*x[2]
-        arg[2,4,2,0]=(-0.519508249649)*x[0]**o+(0.0779688946471)*x[0]+(0.493489242872)*x[1]**o+(-0.0961136530093)*x[1]+(-0.0750243559261)*x[2]**o+(0.860970740104)*x[2]
-        arg[2,4,2,1]=(0.807909049346)*x[0]**o+(0.388180877227)*x[0]+(-0.9044578433)*x[1]**o+(0.86765389355)*x[1]+(-0.196105779343)*x[2]**o+(0.448661151455)*x[2]
-        arg[3,0,0,0]=(-0.780895567041)*x[0]**o+(-0.571253266808)*x[0]+(-0.904183399932)*x[1]**o+(-0.883296586722)*x[1]+(0.855945559487)*x[2]**o+(0.618533553098)*x[2]
-        arg[3,0,0,1]=(-0.831076704037)*x[0]**o+(0.898347446798)*x[0]+(-0.716442620396)*x[1]**o+(0.761028369421)*x[1]+(-0.486505604444)*x[2]**o+(0.25474220145)*x[2]
-        arg[3,0,1,0]=(-0.0127541044953)*x[0]**o+(0.759482315308)*x[0]+(-0.725655006866)*x[1]**o+(0.667310781285)*x[1]+(0.266075927439)*x[2]**o+(0.423300182252)*x[2]
-        arg[3,0,1,1]=(-0.594972266882)*x[0]**o+(-0.842501149639)*x[0]+(-0.347686790781)*x[1]**o+(0.686403640474)*x[1]+(0.3452971966)*x[2]**o+(0.722258585706)*x[2]
-        arg[3,0,2,0]=(-0.715711146058)*x[0]**o+(-0.835739963371)*x[0]+(0.966177361301)*x[1]**o+(-0.909111754995)*x[1]+(-0.175184576557)*x[2]**o+(0.695058239921)*x[2]
-        arg[3,0,2,1]=(0.306251544915)*x[0]**o+(0.944775715803)*x[0]+(-0.740601754617)*x[1]**o+(0.434394890125)*x[1]+(-0.876527474971)*x[2]**o+(0.209321129689)*x[2]
-        arg[3,1,0,0]=(-0.86788221871)*x[0]**o+(-0.833030657309)*x[0]+(0.84576621947)*x[1]**o+(-0.469186887277)*x[1]+(-0.527611740694)*x[2]**o+(-0.312054431001)*x[2]
-        arg[3,1,0,1]=(-0.353678394652)*x[0]**o+(0.591287444611)*x[0]+(-0.213012375931)*x[1]**o+(-0.917259099251)*x[1]+(0.739016360622)*x[2]**o+(0.718754459378)*x[2]
-        arg[3,1,1,0]=(-0.92646825221)*x[0]**o+(-0.870564973175)*x[0]+(-0.781805219404)*x[1]**o+(0.078530434642)*x[1]+(0.386018501087)*x[2]**o+(-0.120490492288)*x[2]
-        arg[3,1,1,1]=(-0.824273737615)*x[0]**o+(0.401211543421)*x[0]+(0.360077381624)*x[1]**o+(-0.0599234883152)*x[1]+(0.246820480884)*x[2]**o+(-0.175313542134)*x[2]
-        arg[3,1,2,0]=(0.807756928769)*x[0]**o+(0.889534807508)*x[0]+(0.633296189954)*x[1]**o+(-0.471821951252)*x[1]+(0.396011249874)*x[2]**o+(0.386800809575)*x[2]
-        arg[3,1,2,1]=(-0.494145142543)*x[0]**o+(-0.514793985721)*x[0]+(0.825379848403)*x[1]**o+(-0.457860259786)*x[1]+(-0.599557868275)*x[2]**o+(-0.952704784672)*x[2]
-        arg[3,2,0,0]=(0.970345295013)*x[0]**o+(-0.838468036663)*x[0]+(0.265634348738)*x[1]**o+(-0.873847124748)*x[1]+(0.416242648913)*x[2]**o+(0.59908438222)*x[2]
-        arg[3,2,0,1]=(0.692377432429)*x[0]**o+(-0.338749041227)*x[0]+(-0.449383750398)*x[1]**o+(0.841669527559)*x[1]+(0.902482059741)*x[2]**o+(-0.655719647704)*x[2]
-        arg[3,2,1,0]=(0.152417917522)*x[0]**o+(-0.78860144)*x[0]+(-0.881276170743)*x[1]**o+(0.692901550061)*x[1]+(-0.985377819322)*x[2]**o+(0.362747973601)*x[2]
-        arg[3,2,1,1]=(0.238845792119)*x[0]**o+(-0.65838373309)*x[0]+(-0.659676514296)*x[1]**o+(0.870742876778)*x[1]+(-0.367345415947)*x[2]**o+(0.322353666541)*x[2]
-        arg[3,2,2,0]=(0.456386394533)*x[0]**o+(-0.135575574979)*x[0]+(-0.731714323922)*x[1]**o+(0.936807859479)*x[1]+(0.511595594967)*x[2]**o+(0.570282464669)*x[2]
-        arg[3,2,2,1]=(0.53299212624)*x[0]**o+(0.800998166434)*x[0]+(-0.431740087552)*x[1]**o+(-0.880092532661)*x[1]+(-0.418657988674)*x[2]**o+(-0.181008149338)*x[2]
-        arg[3,3,0,0]=(0.60015312936)*x[0]**o+(-0.163125583081)*x[0]+(0.299668981953)*x[1]**o+(-0.761494422747)*x[1]+(0.404839953231)*x[2]**o+(-0.114039836538)*x[2]
-        arg[3,3,0,1]=(-0.597481072133)*x[0]**o+(-0.506468582896)*x[0]+(0.406822348574)*x[1]**o+(0.247431348859)*x[1]+(-0.137941563908)*x[2]**o+(0.0503979259383)*x[2]
-        arg[3,3,1,0]=(0.0921069092744)*x[0]**o+(-0.113960490794)*x[0]+(0.750059773909)*x[1]**o+(0.894945048248)*x[1]+(-0.154873449786)*x[2]**o+(-0.520229467775)*x[2]
-        arg[3,3,1,1]=(0.349078696154)*x[0]**o+(0.141298430827)*x[0]+(0.249161007832)*x[1]**o+(0.0240310278591)*x[1]+(-0.18294527838)*x[2]**o+(-0.666698832632)*x[2]
-        arg[3,3,2,0]=(-0.476684936147)*x[0]**o+(0.334093402615)*x[0]+(-0.326434684009)*x[1]**o+(0.91336431975)*x[1]+(0.483080537399)*x[2]**o+(0.439096732335)*x[2]
-        arg[3,3,2,1]=(0.214713426286)*x[0]**o+(-0.973239849984)*x[0]+(0.984290637567)*x[1]**o+(-0.644668525299)*x[1]+(0.00985524319943)*x[2]**o+(0.68777403533)*x[2]
-        arg[3,4,0,0]=(-0.88715423933)*x[0]**o+(0.642412222188)*x[0]+(-0.119667464132)*x[1]**o+(-0.201583116481)*x[1]+(-0.870921042381)*x[2]**o+(-0.00379039429884)*x[2]
-        arg[3,4,0,1]=(0.511114986801)*x[0]**o+(-0.497617928997)*x[0]+(-0.189435233543)*x[1]**o+(-0.29288141421)*x[1]+(-0.476297664539)*x[2]**o+(-0.202915859137)*x[2]
-        arg[3,4,1,0]=(0.0739878219028)*x[0]**o+(0.675050675951)*x[0]+(-0.45950101521)*x[1]**o+(0.306538598103)*x[1]+(-0.726069135031)*x[2]**o+(0.193290422951)*x[2]
-        arg[3,4,1,1]=(-0.141324267565)*x[0]**o+(0.377343882109)*x[0]+(-0.16075604872)*x[1]**o+(0.263332274591)*x[1]+(0.886416182992)*x[2]**o+(0.931905996631)*x[2]
-        arg[3,4,2,0]=(-0.76912732001)*x[0]**o+(-0.255011103121)*x[0]+(-0.372810348364)*x[1]**o+(0.108137766687)*x[1]+(-0.0761382180171)*x[2]**o+(0.46825331282)*x[2]
-        arg[3,4,2,1]=(-0.515945940217)*x[0]**o+(-0.630017609554)*x[0]+(-0.815236764508)*x[1]**o+(0.636572471005)*x[1]+(0.244112465789)*x[2]**o+(-0.471661017589)*x[2]
-        ref[0,0,0,0]=(-0.738709393227)/(o+1.)+(0.283993125638)+(-0.891975745754)*0.5**o
-        ref[0,0,0,1]=(0.912832356419)/(o+1.)+(-0.800452287951)+(0.428698930349)*0.5**o
-        ref[0,0,1,0]=(0.604410785754)/(o+1.)+(-0.70496852873)+(0.974069118653)*0.5**o
-        ref[0,0,1,1]=(-1.63466543191)/(o+1.)+(0.302144663639)+(0.813412823502)*0.5**o
-        ref[0,0,2,0]=(0.755754363963)/(o+1.)+(0.151022836528)+(-0.874502916672)*0.5**o
-        ref[0,0,2,1]=(0.958914457666)/(o+1.)+(-0.440871585564)+(-0.258524075807)*0.5**o
-        ref[0,1,0,0]=(-0.154165868092)/(o+1.)+(0.484258240357)+(0.489505903018)*0.5**o
-        ref[0,1,0,1]=(0.79058715248)/(o+1.)+(0.686313504396)+(0.441567332096)*0.5**o
-        ref[0,1,1,0]=(-0.834798928973)/(o+1.)+(0.492360141946)+(0.388576628492)*0.5**o
-        ref[0,1,1,1]=(-0.315522016845)/(o+1.)+(0.688152306846)+(-0.0537780037583)*0.5**o
-        ref[0,1,2,0]=(0.203060170914)/(o+1.)+(0.198021868056)+(0.58262140787)*0.5**o
-        ref[0,1,2,1]=(-0.665732288492)/(o+1.)+(0.798951978927)+(0.438472233911)*0.5**o
-        ref[0,2,0,0]=(-1.1918215501)/(o+1.)+(0.114544359058)+(-0.334110476968)*0.5**o
-        ref[0,2,0,1]=(0.0771737213265)/(o+1.)+(-0.711198951588)+(0.33041258354)*0.5**o
-        ref[0,2,1,0]=(1.1366448279)/(o+1.)+(0.141765838337)+(-0.80021736912)*0.5**o
-        ref[0,2,1,1]=(-0.432635401002)/(o+1.)+(0.0361325240497)+(-0.773331228218)*0.5**o
-        ref[0,2,2,0]=(1.37338816519)/(o+1.)+(-0.0827542033711)+(-0.943072868965)*0.5**o
-        ref[0,2,2,1]=(-0.303620293463)/(o+1.)+(-0.39585636903)+(-0.821201079286)*0.5**o
-        ref[0,3,0,0]=(-1.74869869132)/(o+1.)+(-0.845702848785)+(-0.0564164524098)*0.5**o
-        ref[0,3,0,1]=(0.499654298722)/(o+1.)+(0.0895873531986)+(-0.553858251068)*0.5**o
-        ref[0,3,1,0]=(-0.277226290791)/(o+1.)+(-0.755072202588)+(-0.992317453163)*0.5**o
-        ref[0,3,1,1]=(-0.412604788342)/(o+1.)+(0.496792347901)+(-0.713753922213)*0.5**o
-        ref[0,3,2,0]=(-0.130885078624)/(o+1.)+(0.312575459575)+(0.536024118289)*0.5**o
-        ref[0,3,2,1]=(-1.35620016195)/(o+1.)+(-0.802557814945)+(-0.197968756117)*0.5**o
-        ref[0,4,0,0]=(0.214746716397)/(o+1.)+(-0.0864879979042)+(0.688763655127)*0.5**o
-        ref[0,4,0,1]=(0.101745206477)/(o+1.)+(-0.431035828594)+(-0.402717742839)*0.5**o
-        ref[0,4,1,0]=(-1.71496447458)/(o+1.)+(-0.210739324578)+(0.39352838659)*0.5**o
-        ref[0,4,1,1]=(0.516179257264)/(o+1.)+(-0.271979584839)+(-0.375507250175)*0.5**o
-        ref[0,4,2,0]=(0.0175356956523)/(o+1.)+(0.255449591592)+(0.0603590263818)*0.5**o
-        ref[0,4,2,1]=(0.36499082659)/(o+1.)+(-0.11897969607)+(-0.111089454685)*0.5**o
-        ref[1,0,0,0]=(1.12671976333)/(o+1.)+(0.275654183538)+(-0.940865155622)*0.5**o
-        ref[1,0,0,1]=(-1.58477430959)/(o+1.)+(-0.471320510546)+(-0.843207880309)*0.5**o
-        ref[1,0,1,0]=(0.126570690864)/(o+1.)+(0.505250661477)+(-0.484987528212)*0.5**o
-        ref[1,0,1,1]=(-0.807547181539)/(o+1.)+(-0.728382819379)+(0.285548625366)*0.5**o
-        ref[1,0,2,0]=(0.151618483009)/(o+1.)+(0.213905131461)+(0.96797757731)*0.5**o
-        ref[1,0,2,1]=(0.740661511824)/(o+1.)+(-0.789278288097)+(-0.486190283922)*0.5**o
-        ref[1,1,0,0]=(0.0814414907926)/(o+1.)+(-0.0398533374263)+(-0.216544472879)*0.5**o
-        ref[1,1,0,1]=(-1.09726915206)/(o+1.)+(0.108361078938)+(0.982934604971)*0.5**o
-        ref[1,1,1,0]=(1.75511303167)/(o+1.)+(-0.201459228508)+(0.516177509446)*0.5**o
-        ref[1,1,1,1]=(-1.16005664849)/(o+1.)+(0.248930524148)+(-0.914732890633)*0.5**o
-        ref[1,1,2,0]=(-0.78384665822)/(o+1.)+(-0.0461152674588)+(-0.96655555619)*0.5**o
-        ref[1,1,2,1]=(0.0633477168503)/(o+1.)+(0.576397965591)+(-0.611879453709)*0.5**o
-        ref[1,2,0,0]=(-0.707964350108)/(o+1.)+(-0.506456693317)+(0.558820946357)*0.5**o
-        ref[1,2,0,1]=(-0.352303090063)/(o+1.)+(-0.881076193856)+(-0.944738664192)*0.5**o
-        ref[1,2,1,0]=(-0.283612324861)/(o+1.)+(-0.395528636894)+(0.238225961058)*0.5**o
-        ref[1,2,1,1]=(-0.0917638265383)/(o+1.)+(0.328859628638)+(0.188699181238)*0.5**o
-        ref[1,2,2,0]=(1.37828110785)/(o+1.)+(-0.39071397624)+(-0.0953160757881)*0.5**o
-        ref[1,2,2,1]=(0.138642388492)/(o+1.)+(0.585831787766)+(0.598691886555)*0.5**o
-        ref[1,3,0,0]=(-0.165396693296)/(o+1.)+(-0.248292538454)+(-0.482944276372)*0.5**o
-        ref[1,3,0,1]=(1.01718528032)/(o+1.)+(-0.282549777519)+(0.565128725562)*0.5**o
-        ref[1,3,1,0]=(0.634094178049)/(o+1.)+(0.419667273293)+(0.608648887224)*0.5**o
-        ref[1,3,1,1]=(1.21240546445)/(o+1.)+(0.516304368664)+(0.0322521291544)*0.5**o
-        ref[1,3,2,0]=(-0.870073605065)/(o+1.)+(0.568353556126)+(-0.757022609619)*0.5**o
-        ref[1,3,2,1]=(0.412342060102)/(o+1.)+(-0.392777941868)+(-0.395945302352)*0.5**o
-        ref[1,4,0,0]=(-0.0939089748304)/(o+1.)+(0.20572535845)+(0.0462127928202)*0.5**o
-        ref[1,4,0,1]=(-0.129808475236)/(o+1.)+(0.511889240164)+(0.914131238526)*0.5**o
-        ref[1,4,1,0]=(-0.509772979615)/(o+1.)+(-0.237480842248)+(0.189809824038)*0.5**o
-        ref[1,4,1,1]=(-0.843628915969)/(o+1.)+(0.188092090183)+(0.792313292544)*0.5**o
-        ref[1,4,2,0]=(0.668340125849)/(o+1.)+(0.577211668608)+(-0.11017764073)*0.5**o
-        ref[1,4,2,1]=(-0.411825728886)/(o+1.)+(0.111213092761)+(-0.793584849832)*0.5**o
-        ref[2,0,0,0]=(-1.20246016858)/(o+1.)+(-0.164887096623)+(0.249661949438)*0.5**o
-        ref[2,0,0,1]=(1.43311449551)/(o+1.)+(1.13832894216)+(-0.588282108798)*0.5**o
-        ref[2,0,1,0]=(-0.507527909815)/(o+1.)+(0.342263613646)+(0.0572335623442)*0.5**o
-        ref[2,0,1,1]=(0.762893809377)/(o+1.)+(-0.120387231036)+(0.832496085695)*0.5**o
-        ref[2,0,2,0]=(-0.100527276479)/(o+1.)+(0.69346218236)+(0.140970192196)*0.5**o
-        ref[2,0,2,1]=(1.06838752686)/(o+1.)+(0.0930203522642)+(-0.686218790734)*0.5**o
-        ref[2,1,0,0]=(-0.28176535885)/(o+1.)+(0.113205031441)+(0.787423884494)*0.5**o
-        ref[2,1,0,1]=(0.0863593391922)/(o+1.)+(-0.487715628853)+(-0.597301631508)*0.5**o
-        ref[2,1,1,0]=(0.804711776497)/(o+1.)+(-0.6415801678)+(-0.393486075452)*0.5**o
-        ref[2,1,1,1]=(0.0404422495423)/(o+1.)+(0.28725407529)+(0.547747813175)*0.5**o
-        ref[2,1,2,0]=(0.897644174054)/(o+1.)+(0.449159193497)+(-0.289583636666)*0.5**o
-        ref[2,1,2,1]=(-0.00909125785473)/(o+1.)+(0.233455690063)+(-0.487223003118)*0.5**o
-        ref[2,2,0,0]=(0.428705598411)/(o+1.)+(-0.537564631337)+(0.31746495834)*0.5**o
-        ref[2,2,0,1]=(-0.13006424301)/(o+1.)+(-0.227472916892)+(0.313462846078)*0.5**o
-        ref[2,2,1,0]=(0.678520026185)/(o+1.)+(-0.185723681464)+(-0.180472378556)*0.5**o
-        ref[2,2,1,1]=(0.118994939723)/(o+1.)+(-0.668711855142)+(0.303787742688)*0.5**o
-        ref[2,2,2,0]=(1.32140542293)/(o+1.)+(-0.257035701286)+(-0.850284190461)*0.5**o
-        ref[2,2,2,1]=(0.0420170266993)/(o+1.)+(-0.673170855967)+(0.559527478503)*0.5**o
-        ref[2,3,0,0]=(-0.0660736057092)/(o+1.)+(-0.0611877561056)+(-0.274260374984)*0.5**o
-        ref[2,3,0,1]=(1.05394255354)/(o+1.)+(0.306998434354)+(-0.793218219979)*0.5**o
-        ref[2,3,1,0]=(0.046955729107)/(o+1.)+(-0.599656439191)+(0.411400569812)*0.5**o
-        ref[2,3,1,1]=(-0.220516235917)/(o+1.)+(-0.290014707635)+(-0.491445354697)*0.5**o
-        ref[2,3,2,0]=(-1.58612153753)/(o+1.)+(-0.698081139059)+(-0.806859723517)*0.5**o
-        ref[2,3,2,1]=(-1.9837742327)/(o+1.)+(0.195194695368)+(-0.313979805844)*0.5**o
-        ref[2,4,0,0]=(-0.546257320269)/(o+1.)+(-0.303248190467)+(-0.41348240167)*0.5**o
-        ref[2,4,0,1]=(-0.995670500932)/(o+1.)+(-0.734851220921)+(0.0222534371058)*0.5**o
-        ref[2,4,1,0]=(0.0147835590923)/(o+1.)+(0.147900377243)+(-0.750995516053)*0.5**o
-        ref[2,4,1,1]=(0.530844875854)/(o+1.)+(1.05959549796)+(0.321767371741)*0.5**o
-        ref[2,4,2,0]=(0.418464886946)/(o+1.)+(0.421412990871)+(-0.519508249649)*0.5**o
-        ref[2,4,2,1]=(-1.10056362264)/(o+1.)+(0.852247961116)+(0.807909049346)*0.5**o
-        ref[3,0,0,0]=(-0.0482378404454)/(o+1.)+(-0.418008150216)+(-0.780895567041)*0.5**o
-        ref[3,0,0,1]=(-1.20294822484)/(o+1.)+(0.957059008835)+(-0.831076704037)*0.5**o
-        ref[3,0,1,0]=(-0.459579079427)/(o+1.)+(0.925046639422)+(-0.0127541044953)*0.5**o
-        ref[3,0,1,1]=(-0.00238959418047)/(o+1.)+(0.28308053827)+(-0.594972266882)*0.5**o
-        ref[3,0,2,0]=(0.790992784744)/(o+1.)+(-0.524896739222)+(-0.715711146058)*0.5**o
-        ref[3,0,2,1]=(-1.61712922959)/(o+1.)+(0.794245867809)+(0.306251544915)*0.5**o
-        ref[3,1,0,0]=(0.318154478777)/(o+1.)+(-0.807135987793)+(-0.86788221871)*0.5**o
-        ref[3,1,0,1]=(0.526003984691)/(o+1.)+(0.196391402369)+(-0.353678394652)*0.5**o
-        ref[3,1,1,0]=(-0.395786718317)/(o+1.)+(-0.456262515411)+(-0.92646825221)*0.5**o
-        ref[3,1,1,1]=(0.606897862508)/(o+1.)+(0.082987256486)+(-0.824273737615)*0.5**o
-        ref[3,1,2,0]=(1.02930743983)/(o+1.)+(0.402256832916)+(0.807756928769)*0.5**o
-        ref[3,1,2,1]=(0.225821980128)/(o+1.)+(-0.96267951509)+(-0.494145142543)*0.5**o
-        ref[3,2,0,0]=(0.681876997651)/(o+1.)+(-0.556615389596)+(0.970345295013)*0.5**o
-        ref[3,2,0,1]=(0.453098309344)/(o+1.)+(-0.0763995806862)+(0.692377432429)*0.5**o
-        ref[3,2,1,0]=(-1.86665399006)/(o+1.)+(0.133524041831)+(0.152417917522)*0.5**o
-        ref[3,2,1,1]=(-1.02702193024)/(o+1.)+(0.267356405114)+(0.238845792119)*0.5**o
-        ref[3,2,2,0]=(-0.220118728954)/(o+1.)+(0.685757374584)+(0.456386394533)*0.5**o
-        ref[3,2,2,1]=(-0.850398076225)/(o+1.)+(-0.130051257782)+(0.53299212624)*0.5**o
-        ref[3,3,0,0]=(0.704508935183)/(o+1.)+(-0.519329921183)+(0.60015312936)*0.5**o
-        ref[3,3,0,1]=(0.268880784666)/(o+1.)+(-0.10431965405)+(-0.597481072133)*0.5**o
-        ref[3,3,1,0]=(0.595186324123)/(o+1.)+(0.13037754484)+(0.0921069092744)*0.5**o
-        ref[3,3,1,1]=(0.0662157294518)/(o+1.)+(-0.250684686973)+(0.349078696154)*0.5**o
-        ref[3,3,2,0]=(0.156645853389)/(o+1.)+(0.84327722735)+(-0.476684936147)*0.5**o
-        ref[3,3,2,1]=(0.994145880767)/(o+1.)+(-0.465067169976)+(0.214713426286)*0.5**o
-        ref[3,4,0,0]=(-0.990588506513)/(o+1.)+(0.218519355704)+(-0.88715423933)*0.5**o
-        ref[3,4,0,1]=(-0.665732898082)/(o+1.)+(-0.496707601172)+(0.511114986801)*0.5**o
-        ref[3,4,1,0]=(-1.18557015024)/(o+1.)+(0.587439848502)+(0.0739878219028)*0.5**o
-        ref[3,4,1,1]=(0.725660134271)/(o+1.)+(0.786291076666)+(-0.141324267565)*0.5**o
-        ref[3,4,2,0]=(-0.448948566381)/(o+1.)+(0.160689988193)+(-0.76912732001)*0.5**o
-        ref[3,4,2,1]=(-0.571124298719)/(o+1.)+(-0.232553078069)+(-0.515945940217)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.0333010052777)*x[0]**o+(-0.242011298555)*x[0]+(0.686457578633)*x[1]**o+(0.438506741453)*x[1]
-        ref=(0.686457578633)/(o+1.)+(0.0982477214491)+(-0.0333010052777)*0.5**o
-      else:
-        arg=(-0.365813216932)*x[0]**o+(0.969816151161)*x[0]+(0.349995764077)*x[1]**o+(0.867492181692)*x[1]+(-0.866177355796)*x[2]**o+(-0.203219031102)*x[2]
-        ref=(-0.516181591719)/(o+1.)+(0.817044650875)+(-0.365813216932)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.038446371199)*x[0]**o+(0.323075821067)*x[0]+(0.770528210463)*x[1]**o+(0.0434528043023)*x[1]
-        arg[1]=(-0.461876402566)*x[0]**o+(0.746965376214)*x[0]+(0.861234840159)*x[1]**o+(-0.568165009958)*x[1]
-        ref[0]=(0.770528210463)/(o+1.)+(0.183264312685)+(0.038446371199)*0.5**o
-        ref[1]=(0.861234840159)/(o+1.)+(0.0894001831281)+(-0.461876402566)*0.5**o
-      else:
-        arg[0]=(-0.472858663642)*x[0]**o+(-0.680210745369)*x[0]+(0.175425838082)*x[1]**o+(0.0189427039667)*x[1]+(0.0365198456146)*x[2]**o+(0.7840527457)*x[2]
-        arg[1]=(-0.0191775972693)*x[0]**o+(0.19303923194)*x[0]+(0.775528295333)*x[1]**o+(-0.765500708496)*x[1]+(0.351369471606)*x[2]**o+(-0.351587727906)*x[2]
-        ref[0]=(0.211945683696)/(o+1.)+(0.0613923521485)+(-0.472858663642)*0.5**o
-        ref[1]=(1.12689776694)/(o+1.)+(-0.462024602231)+(-0.0191775972693)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.994443255559)*x[0]**o+(-0.403427184912)*x[0]+(-0.889656446862)*x[1]**o+(-0.411934106034)*x[1]
-        arg[0,1]=(-0.864086447061)*x[0]**o+(-0.277489357308)*x[0]+(0.977910864864)*x[1]**o+(-0.0505775488074)*x[1]
-        arg[0,2]=(-0.397179114534)*x[0]**o+(-0.448046821439)*x[0]+(-0.340253609736)*x[1]**o+(0.624988837716)*x[1]
-        arg[0,3]=(-0.9155191116)*x[0]**o+(0.133777450278)*x[0]+(-0.809567026065)*x[1]**o+(-0.815374059364)*x[1]
-        arg[0,4]=(-0.416764684181)*x[0]**o+(0.0965164570638)*x[0]+(0.190191799833)*x[1]**o+(0.0970709424519)*x[1]
-        arg[1,0]=(0.646527294535)*x[0]**o+(-0.337119506636)*x[0]+(0.42669563245)*x[1]**o+(-0.185228568706)*x[1]
-        arg[1,1]=(-0.411532647934)*x[0]**o+(0.178830973832)*x[0]+(-0.904886020892)*x[1]**o+(-0.740623071275)*x[1]
-        arg[1,2]=(0.523024622808)*x[0]**o+(-0.226298848077)*x[0]+(-0.707740568617)*x[1]**o+(0.998182796571)*x[1]
-        arg[1,3]=(0.840649917357)*x[0]**o+(-0.736279151571)*x[0]+(0.996017554392)*x[1]**o+(-0.397833319931)*x[1]
-        arg[1,4]=(0.76711764419)*x[0]**o+(-0.905452991298)*x[0]+(-0.925675237951)*x[1]**o+(-0.982712645237)*x[1]
-        arg[2,0]=(0.198547103682)*x[0]**o+(0.674537682234)*x[0]+(-0.891195618193)*x[1]**o+(0.979109691481)*x[1]
-        arg[2,1]=(0.171629921737)*x[0]**o+(0.0102727001751)*x[0]+(0.467578393374)*x[1]**o+(0.583960984645)*x[1]
-        arg[2,2]=(-0.637526271497)*x[0]**o+(-0.900821073531)*x[0]+(0.61637733965)*x[1]**o+(0.43717505341)*x[1]
-        arg[2,3]=(-0.205861963967)*x[0]**o+(-0.104621062003)*x[0]+(0.582584591946)*x[1]**o+(0.351739662419)*x[1]
-        arg[2,4]=(-0.179355911316)*x[0]**o+(-0.188415282678)*x[0]+(0.598342895007)*x[1]**o+(0.364638908577)*x[1]
-        arg[3,0]=(0.150471526119)*x[0]**o+(-0.940789873202)*x[0]+(-0.524275825864)*x[1]**o+(0.729004683023)*x[1]
-        arg[3,1]=(0.123933417087)*x[0]**o+(0.192413160498)*x[0]+(0.203730760507)*x[1]**o+(0.852010172966)*x[1]
-        arg[3,2]=(-0.297766950847)*x[0]**o+(0.269905131596)*x[0]+(-0.0830931256847)*x[1]**o+(0.26964712569)*x[1]
-        arg[3,3]=(0.96961517265)*x[0]**o+(0.363312967302)*x[0]+(-0.811142762589)*x[1]**o+(-0.420442983537)*x[1]
-        arg[3,4]=(-0.314185602206)*x[0]**o+(-0.0446515646101)*x[0]+(-0.884651038732)*x[1]**o+(-0.166386477611)*x[1]
-        ref[0,0]=(-0.889656446862)/(o+1.)+(-0.407680645473)+(-0.994443255559)*0.5**o
-        ref[0,1]=(0.977910864864)/(o+1.)+(-0.164033453058)+(-0.864086447061)*0.5**o
-        ref[0,2]=(-0.340253609736)/(o+1.)+(0.0884710081389)+(-0.397179114534)*0.5**o
-        ref[0,3]=(-0.809567026065)/(o+1.)+(-0.340798304543)+(-0.9155191116)*0.5**o
-        ref[0,4]=(0.190191799833)/(o+1.)+(0.0967936997578)+(-0.416764684181)*0.5**o
-        ref[1,0]=(0.42669563245)/(o+1.)+(-0.261174037671)+(0.646527294535)*0.5**o
-        ref[1,1]=(-0.904886020892)/(o+1.)+(-0.280896048722)+(-0.411532647934)*0.5**o
-        ref[1,2]=(-0.707740568617)/(o+1.)+(0.385941974247)+(0.523024622808)*0.5**o
-        ref[1,3]=(0.996017554392)/(o+1.)+(-0.567056235751)+(0.840649917357)*0.5**o
-        ref[1,4]=(-0.925675237951)/(o+1.)+(-0.944082818268)+(0.76711764419)*0.5**o
-        ref[2,0]=(-0.891195618193)/(o+1.)+(0.826823686857)+(0.198547103682)*0.5**o
-        ref[2,1]=(0.467578393374)/(o+1.)+(0.29711684241)+(0.171629921737)*0.5**o
-        ref[2,2]=(0.61637733965)/(o+1.)+(-0.231823010061)+(-0.637526271497)*0.5**o
-        ref[2,3]=(0.582584591946)/(o+1.)+(0.123559300208)+(-0.205861963967)*0.5**o
-        ref[2,4]=(0.598342895007)/(o+1.)+(0.0881118129495)+(-0.179355911316)*0.5**o
-        ref[3,0]=(-0.524275825864)/(o+1.)+(-0.105892595089)+(0.150471526119)*0.5**o
-        ref[3,1]=(0.203730760507)/(o+1.)+(0.522211666732)+(0.123933417087)*0.5**o
-        ref[3,2]=(-0.0830931256847)/(o+1.)+(0.269776128643)+(-0.297766950847)*0.5**o
-        ref[3,3]=(-0.811142762589)/(o+1.)+(-0.0285650081177)+(0.96961517265)*0.5**o
-        ref[3,4]=(-0.884651038732)/(o+1.)+(-0.105519021111)+(-0.314185602206)*0.5**o
-      else:
-        arg[0,0]=(0.264691789613)*x[0]**o+(0.816541340997)*x[0]+(-0.402990464667)*x[1]**o+(-0.57479619687)*x[1]+(0.336313666995)*x[2]**o+(-0.353125285536)*x[2]
-        arg[0,1]=(-0.0526559162494)*x[0]**o+(-0.901336706583)*x[0]+(0.237482536727)*x[1]**o+(-0.458564275773)*x[1]+(-0.90715992057)*x[2]**o+(-0.352062856077)*x[2]
-        arg[0,2]=(0.786349112412)*x[0]**o+(-0.395569856472)*x[0]+(-0.996593023157)*x[1]**o+(-0.277001350627)*x[1]+(0.435375913289)*x[2]**o+(0.00380742297736)*x[2]
-        arg[0,3]=(0.3336751197)*x[0]**o+(0.592185657129)*x[0]+(0.148956266814)*x[1]**o+(-0.852264651722)*x[1]+(-0.680249245511)*x[2]**o+(0.238843544413)*x[2]
-        arg[0,4]=(0.875206676786)*x[0]**o+(0.0420423017124)*x[0]+(-0.690488811412)*x[1]**o+(-0.191328696331)*x[1]+(-0.861423624177)*x[2]**o+(0.483925405411)*x[2]
-        arg[1,0]=(-0.573216715158)*x[0]**o+(-0.0668114726198)*x[0]+(0.382097918101)*x[1]**o+(-0.126485626438)*x[1]+(0.37521336616)*x[2]**o+(0.42402066058)*x[2]
-        arg[1,1]=(-0.0919326514467)*x[0]**o+(-0.791351880042)*x[0]+(0.772694542694)*x[1]**o+(-0.537902003787)*x[1]+(0.424413342503)*x[2]**o+(-0.285553230731)*x[2]
-        arg[1,2]=(0.855490362389)*x[0]**o+(0.60428104628)*x[0]+(-0.846565232506)*x[1]**o+(-0.243727717758)*x[1]+(0.900077399935)*x[2]**o+(-0.974305489047)*x[2]
-        arg[1,3]=(-0.90802343526)*x[0]**o+(0.00950587842259)*x[0]+(0.821234711321)*x[1]**o+(-0.0628912085092)*x[1]+(-0.773563396868)*x[2]**o+(-0.403955952419)*x[2]
-        arg[1,4]=(-0.33139358787)*x[0]**o+(-0.901382943687)*x[0]+(-0.981921375707)*x[1]**o+(-0.0654519807133)*x[1]+(0.880069861158)*x[2]**o+(-0.0796172270076)*x[2]
-        arg[2,0]=(-0.202818692518)*x[0]**o+(-0.155436611971)*x[0]+(0.739467305515)*x[1]**o+(-0.12096877475)*x[1]+(0.479644796804)*x[2]**o+(0.0580715322389)*x[2]
-        arg[2,1]=(0.0461326006936)*x[0]**o+(0.122168224674)*x[0]+(0.986788073931)*x[1]**o+(-0.435933938764)*x[1]+(-0.312527130215)*x[2]**o+(0.726805187165)*x[2]
-        arg[2,2]=(-0.539659153805)*x[0]**o+(-0.26082353681)*x[0]+(0.367739719819)*x[1]**o+(0.943584828354)*x[1]+(0.688225221556)*x[2]**o+(-0.121563525696)*x[2]
-        arg[2,3]=(0.861717128203)*x[0]**o+(0.0666983176426)*x[0]+(0.984510848927)*x[1]**o+(-0.321865378029)*x[1]+(0.522584734)*x[2]**o+(0.589527116625)*x[2]
-        arg[2,4]=(0.778575699703)*x[0]**o+(0.515802361664)*x[0]+(0.817655905624)*x[1]**o+(0.883824717911)*x[1]+(0.656833761714)*x[2]**o+(-0.991585145611)*x[2]
-        arg[3,0]=(0.752875513075)*x[0]**o+(0.615136567082)*x[0]+(-0.205265870704)*x[1]**o+(0.483918142728)*x[1]+(-0.0495322147557)*x[2]**o+(-0.132474571954)*x[2]
-        arg[3,1]=(0.0563875061408)*x[0]**o+(-0.603033440119)*x[0]+(-0.0944809376206)*x[1]**o+(0.725330686731)*x[1]+(0.00527671533343)*x[2]**o+(-0.434519675586)*x[2]
-        arg[3,2]=(0.100078550382)*x[0]**o+(-0.340988639989)*x[0]+(-0.392591649097)*x[1]**o+(-0.924705734588)*x[1]+(0.420410192075)*x[2]**o+(-0.94741221593)*x[2]
-        arg[3,3]=(0.536414145801)*x[0]**o+(0.142421640429)*x[0]+(0.213162255423)*x[1]**o+(-0.695193008147)*x[1]+(0.9625091599)*x[2]**o+(0.534409542153)*x[2]
-        arg[3,4]=(0.305683606235)*x[0]**o+(0.340964210305)*x[0]+(0.757807973246)*x[1]**o+(0.11459551493)*x[1]+(-0.81395047506)*x[2]**o+(0.636392281491)*x[2]
-        ref[0,0]=(-0.0666767976714)/(o+1.)+(-0.0556900707042)+(0.264691789613)*0.5**o
-        ref[0,1]=(-0.669677383843)/(o+1.)+(-0.855981919217)+(-0.0526559162494)*0.5**o
-        ref[0,2]=(-0.561217109869)/(o+1.)+(-0.334381892061)+(0.786349112412)*0.5**o
-        ref[0,3]=(-0.531292978697)/(o+1.)+(-0.0106177250896)+(0.3336751197)*0.5**o
-        ref[0,4]=(-1.55191243559)/(o+1.)+(0.167319505396)+(0.875206676786)*0.5**o
-        ref[1,0]=(0.757311284261)/(o+1.)+(0.115361780761)+(-0.573216715158)*0.5**o
-        ref[1,1]=(1.1971078852)/(o+1.)+(-0.80740355728)+(-0.0919326514467)*0.5**o
-        ref[1,2]=(0.0535121674292)/(o+1.)+(-0.306876080263)+(0.855490362389)*0.5**o
-        ref[1,3]=(0.0476713144526)/(o+1.)+(-0.228670641253)+(-0.90802343526)*0.5**o
-        ref[1,4]=(-0.101851514548)/(o+1.)+(-0.523226075704)+(-0.33139358787)*0.5**o
-        ref[2,0]=(1.21911210232)/(o+1.)+(-0.109166927241)+(-0.202818692518)*0.5**o
-        ref[2,1]=(0.674260943716)/(o+1.)+(0.206519736538)+(0.0461326006936)*0.5**o
-        ref[2,2]=(1.05596494137)/(o+1.)+(0.280598882924)+(-0.539659153805)*0.5**o
-        ref[2,3]=(1.50709558293)/(o+1.)+(0.167180028119)+(0.861717128203)*0.5**o
-        ref[2,4]=(1.47448966734)/(o+1.)+(0.204020966982)+(0.778575699703)*0.5**o
-        ref[3,0]=(-0.25479808546)/(o+1.)+(0.483290068928)+(0.752875513075)*0.5**o
-        ref[3,1]=(-0.0892042222872)/(o+1.)+(-0.156111214487)+(0.0563875061408)*0.5**o
-        ref[3,2]=(0.0278185429781)/(o+1.)+(-1.10655329525)+(0.100078550382)*0.5**o
-        ref[3,3]=(1.17567141532)/(o+1.)+(-0.00918091278228)+(0.536414145801)*0.5**o
-        ref[3,4]=(-0.0561425018138)/(o+1.)+(0.545976003363)+(0.305683606235)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.448877659671)*x[0]**o+(0.130599173692)*x[0]+(-0.264185555629)*x[1]**o+(-0.722726040492)*x[1]
-        arg[0,0,1]=(-0.543806308372)*x[0]**o+(-0.685242399166)*x[0]+(0.325336801501)*x[1]**o+(0.572960380228)*x[1]
-        arg[0,1,0]=(-0.893080563297)*x[0]**o+(-0.251553981066)*x[0]+(0.256078388483)*x[1]**o+(-0.926701685259)*x[1]
-        arg[0,1,1]=(0.346088914447)*x[0]**o+(0.166180418696)*x[0]+(0.353024178635)*x[1]**o+(0.731811935721)*x[1]
-        arg[1,0,0]=(0.553083243483)*x[0]**o+(0.976153803522)*x[0]+(-0.260777317634)*x[1]**o+(-0.641936915628)*x[1]
-        arg[1,0,1]=(-0.561076901068)*x[0]**o+(0.837832618302)*x[0]+(-0.638970151828)*x[1]**o+(-0.495169195543)*x[1]
-        arg[1,1,0]=(-0.292805925132)*x[0]**o+(0.670472035586)*x[0]+(-0.752026521307)*x[1]**o+(-0.473087472861)*x[1]
-        arg[1,1,1]=(-0.432857805275)*x[0]**o+(0.495387797249)*x[0]+(0.0579881469257)*x[1]**o+(0.831644440274)*x[1]
-        arg[2,0,0]=(0.413433231384)*x[0]**o+(0.919831571878)*x[0]+(-0.373581626416)*x[1]**o+(0.16423318333)*x[1]
-        arg[2,0,1]=(0.857566619293)*x[0]**o+(0.340454525569)*x[0]+(0.139298007219)*x[1]**o+(0.220542978265)*x[1]
-        arg[2,1,0]=(-0.914184896115)*x[0]**o+(-0.0279186159835)*x[0]+(0.893417478351)*x[1]**o+(-0.108178714604)*x[1]
-        arg[2,1,1]=(-0.749629612712)*x[0]**o+(-0.649957092299)*x[0]+(0.181944194719)*x[1]**o+(-0.988782927329)*x[1]
-        arg[3,0,0]=(0.292013067678)*x[0]**o+(0.491680364317)*x[0]+(0.951144487798)*x[1]**o+(0.980949630108)*x[1]
-        arg[3,0,1]=(0.89779245885)*x[0]**o+(-0.147546711846)*x[0]+(0.0902450198362)*x[1]**o+(-0.669984062969)*x[1]
-        arg[3,1,0]=(0.62590631314)*x[0]**o+(0.329384454978)*x[0]+(-0.676917185409)*x[1]**o+(-0.0903173226074)*x[1]
-        arg[3,1,1]=(-0.668268661271)*x[0]**o+(-0.847167879584)*x[0]+(0.329431843319)*x[1]**o+(-0.989253343115)*x[1]
-        arg[4,0,0]=(-0.675111374291)*x[0]**o+(0.738030423939)*x[0]+(-0.413299452027)*x[1]**o+(0.36859580301)*x[1]
-        arg[4,0,1]=(-0.207625666422)*x[0]**o+(-0.455639256266)*x[0]+(0.554118743878)*x[1]**o+(0.14044849621)*x[1]
-        arg[4,1,0]=(-0.313337039275)*x[0]**o+(-0.451797308521)*x[0]+(0.201296275104)*x[1]**o+(-0.779869953962)*x[1]
-        arg[4,1,1]=(-0.0308697706768)*x[0]**o+(0.214664850788)*x[0]+(-0.824157101269)*x[1]**o+(0.156012836486)*x[1]
-        arg[5,0,0]=(0.277885566309)*x[0]**o+(-0.387820938776)*x[0]+(0.820602896312)*x[1]**o+(0.162715513355)*x[1]
-        arg[5,0,1]=(-0.216951421349)*x[0]**o+(0.906019329549)*x[0]+(-0.330132336808)*x[1]**o+(0.416109194357)*x[1]
-        arg[5,1,0]=(0.923496627826)*x[0]**o+(-0.177644464371)*x[0]+(0.482278717995)*x[1]**o+(-0.362003106154)*x[1]
-        arg[5,1,1]=(0.9109111591)*x[0]**o+(-0.0919782899769)*x[0]+(0.103950387446)*x[1]**o+(0.447452648868)*x[1]
-        ref[0,0,0]=(-0.264185555629)/(o+1.)+(-0.2960634334)+(0.448877659671)*0.5**o
-        ref[0,0,1]=(0.325336801501)/(o+1.)+(-0.0561410094689)+(-0.543806308372)*0.5**o
-        ref[0,1,0]=(0.256078388483)/(o+1.)+(-0.589127833162)+(-0.893080563297)*0.5**o
-        ref[0,1,1]=(0.353024178635)/(o+1.)+(0.448996177208)+(0.346088914447)*0.5**o
-        ref[1,0,0]=(-0.260777317634)/(o+1.)+(0.167108443947)+(0.553083243483)*0.5**o
-        ref[1,0,1]=(-0.638970151828)/(o+1.)+(0.17133171138)+(-0.561076901068)*0.5**o
-        ref[1,1,0]=(-0.752026521307)/(o+1.)+(0.0986922813626)+(-0.292805925132)*0.5**o
-        ref[1,1,1]=(0.0579881469257)/(o+1.)+(0.663516118762)+(-0.432857805275)*0.5**o
-        ref[2,0,0]=(-0.373581626416)/(o+1.)+(0.542032377604)+(0.413433231384)*0.5**o
-        ref[2,0,1]=(0.139298007219)/(o+1.)+(0.280498751917)+(0.857566619293)*0.5**o
-        ref[2,1,0]=(0.893417478351)/(o+1.)+(-0.0680486652939)+(-0.914184896115)*0.5**o
-        ref[2,1,1]=(0.181944194719)/(o+1.)+(-0.819370009814)+(-0.749629612712)*0.5**o
-        ref[3,0,0]=(0.951144487798)/(o+1.)+(0.736314997212)+(0.292013067678)*0.5**o
-        ref[3,0,1]=(0.0902450198362)/(o+1.)+(-0.408765387408)+(0.89779245885)*0.5**o
-        ref[3,1,0]=(-0.676917185409)/(o+1.)+(0.119533566185)+(0.62590631314)*0.5**o
-        ref[3,1,1]=(0.329431843319)/(o+1.)+(-0.91821061135)+(-0.668268661271)*0.5**o
-        ref[4,0,0]=(-0.413299452027)/(o+1.)+(0.553313113475)+(-0.675111374291)*0.5**o
-        ref[4,0,1]=(0.554118743878)/(o+1.)+(-0.157595380028)+(-0.207625666422)*0.5**o
-        ref[4,1,0]=(0.201296275104)/(o+1.)+(-0.615833631241)+(-0.313337039275)*0.5**o
-        ref[4,1,1]=(-0.824157101269)/(o+1.)+(0.185338843637)+(-0.0308697706768)*0.5**o
-        ref[5,0,0]=(0.820602896312)/(o+1.)+(-0.11255271271)+(0.277885566309)*0.5**o
-        ref[5,0,1]=(-0.330132336808)/(o+1.)+(0.661064261953)+(-0.216951421349)*0.5**o
-        ref[5,1,0]=(0.482278717995)/(o+1.)+(-0.269823785262)+(0.923496627826)*0.5**o
-        ref[5,1,1]=(0.103950387446)/(o+1.)+(0.177737179446)+(0.9109111591)*0.5**o
-      else:
-        arg[0,0,0]=(0.843169691966)*x[0]**o+(0.252560741792)*x[0]+(0.0428740803857)*x[1]**o+(-0.702885246223)*x[1]+(0.175406156382)*x[2]**o+(-0.819206174419)*x[2]
-        arg[0,0,1]=(-0.780678250187)*x[0]**o+(-0.628781977796)*x[0]+(0.345241549754)*x[1]**o+(-0.686783366275)*x[1]+(0.298501249797)*x[2]**o+(-0.592222734778)*x[2]
-        arg[0,1,0]=(0.680331984783)*x[0]**o+(0.20945731105)*x[0]+(0.582220641498)*x[1]**o+(0.159144772508)*x[1]+(0.197544685245)*x[2]**o+(-0.542847499692)*x[2]
-        arg[0,1,1]=(0.561649107089)*x[0]**o+(0.409538404439)*x[0]+(0.687461001448)*x[1]**o+(0.327986995905)*x[1]+(0.701007758697)*x[2]**o+(0.95919995454)*x[2]
-        arg[1,0,0]=(0.0620287124894)*x[0]**o+(-0.946536581396)*x[0]+(-0.813637608115)*x[1]**o+(0.0808967031579)*x[1]+(0.545408819059)*x[2]**o+(0.250558134093)*x[2]
-        arg[1,0,1]=(-0.0778300410758)*x[0]**o+(-0.852201314682)*x[0]+(0.712528858815)*x[1]**o+(-0.69009644973)*x[1]+(-0.0836140529567)*x[2]**o+(0.687579338803)*x[2]
-        arg[1,1,0]=(-0.37648103863)*x[0]**o+(-0.264461846666)*x[0]+(-0.45921598716)*x[1]**o+(-0.516551658367)*x[1]+(0.512446750786)*x[2]**o+(0.850266522322)*x[2]
-        arg[1,1,1]=(-0.951741356481)*x[0]**o+(-0.989023540683)*x[0]+(0.338787640816)*x[1]**o+(0.764043925298)*x[1]+(0.524009019713)*x[2]**o+(-0.912507794534)*x[2]
-        arg[2,0,0]=(0.613468181683)*x[0]**o+(-0.357325179573)*x[0]+(0.153221256731)*x[1]**o+(-0.748686771579)*x[1]+(0.364085012368)*x[2]**o+(-0.134535056195)*x[2]
-        arg[2,0,1]=(-0.728948376511)*x[0]**o+(-0.0657162843876)*x[0]+(-0.336013775703)*x[1]**o+(0.299044747397)*x[1]+(-0.712877779871)*x[2]**o+(0.229974926734)*x[2]
-        arg[2,1,0]=(-0.213428159952)*x[0]**o+(0.680250111549)*x[0]+(-0.986942572737)*x[1]**o+(0.549006049647)*x[1]+(0.572921637402)*x[2]**o+(-0.241851127933)*x[2]
-        arg[2,1,1]=(0.0367155018841)*x[0]**o+(-0.768111161527)*x[0]+(-0.748085216726)*x[1]**o+(-0.752536272228)*x[1]+(0.555945063877)*x[2]**o+(0.012687074005)*x[2]
-        arg[3,0,0]=(-0.945391902075)*x[0]**o+(-0.581330133808)*x[0]+(-0.253390460088)*x[1]**o+(-0.885589795648)*x[1]+(-0.555900062171)*x[2]**o+(-0.241006607054)*x[2]
-        arg[3,0,1]=(0.924110231188)*x[0]**o+(0.428520753545)*x[0]+(0.187773835144)*x[1]**o+(-0.53787305121)*x[1]+(0.0970284978901)*x[2]**o+(0.0580212350951)*x[2]
-        arg[3,1,0]=(0.426389283701)*x[0]**o+(-0.0976148877161)*x[0]+(-0.364828466078)*x[1]**o+(-0.536398529197)*x[1]+(0.648605043498)*x[2]**o+(-0.234629706559)*x[2]
-        arg[3,1,1]=(-0.736098543054)*x[0]**o+(0.985014182905)*x[0]+(-0.563513361433)*x[1]**o+(0.589434310221)*x[1]+(-0.360296462891)*x[2]**o+(-0.586591636182)*x[2]
-        arg[4,0,0]=(0.953916732391)*x[0]**o+(-0.835620914249)*x[0]+(0.562803727423)*x[1]**o+(-0.904263689551)*x[1]+(-0.349815820142)*x[2]**o+(-0.156410988081)*x[2]
-        arg[4,0,1]=(-0.236710267891)*x[0]**o+(0.958992060128)*x[0]+(0.711565908363)*x[1]**o+(-0.639771085045)*x[1]+(-0.919042661652)*x[2]**o+(-0.198907436333)*x[2]
-        arg[4,1,0]=(0.275058935551)*x[0]**o+(0.563461500878)*x[0]+(0.438833998471)*x[1]**o+(0.686375712335)*x[1]+(-0.930322605963)*x[2]**o+(0.710777122765)*x[2]
-        arg[4,1,1]=(-0.507845102241)*x[0]**o+(-0.390574086909)*x[0]+(-0.170020669232)*x[1]**o+(-0.107455242464)*x[1]+(-0.97056652533)*x[2]**o+(-0.720180192255)*x[2]
-        arg[5,0,0]=(-0.922597172214)*x[0]**o+(0.229197305733)*x[0]+(-0.943214499543)*x[1]**o+(0.269256599046)*x[1]+(-0.11540537404)*x[2]**o+(0.956940487934)*x[2]
-        arg[5,0,1]=(-0.0350868975578)*x[0]**o+(-0.547620412319)*x[0]+(-0.818344866429)*x[1]**o+(-0.0632082353078)*x[1]+(-0.490536679501)*x[2]**o+(-0.79641747407)*x[2]
-        arg[5,1,0]=(0.877279477171)*x[0]**o+(-0.408752853807)*x[0]+(0.143432191997)*x[1]**o+(0.230679627667)*x[1]+(0.0346230515425)*x[2]**o+(0.357377660033)*x[2]
-        arg[5,1,1]=(0.294375780312)*x[0]**o+(-0.688447065878)*x[0]+(0.213334642918)*x[1]**o+(0.664021137697)*x[1]+(-0.532996065961)*x[2]**o+(0.794315136407)*x[2]
-        ref[0,0,0]=(0.218280236768)/(o+1.)+(-0.634765339425)+(0.843169691966)*0.5**o
-        ref[0,0,1]=(0.64374279955)/(o+1.)+(-0.953894039424)+(-0.780678250187)*0.5**o
-        ref[0,1,0]=(0.779765326742)/(o+1.)+(-0.0871227080671)+(0.680331984783)*0.5**o
-        ref[0,1,1]=(1.38846876015)/(o+1.)+(0.848362677442)+(0.561649107089)*0.5**o
-        ref[1,0,0]=(-0.268228789055)/(o+1.)+(-0.307540872072)+(0.0620287124894)*0.5**o
-        ref[1,0,1]=(0.628914805859)/(o+1.)+(-0.427359212804)+(-0.0778300410758)*0.5**o
-        ref[1,1,0]=(0.0532307636262)/(o+1.)+(0.0346265086445)+(-0.37648103863)*0.5**o
-        ref[1,1,1]=(0.862796660529)/(o+1.)+(-0.56874370496)+(-0.951741356481)*0.5**o
-        ref[2,0,0]=(0.5173062691)/(o+1.)+(-0.620273503673)+(0.613468181683)*0.5**o
-        ref[2,0,1]=(-1.04889155557)/(o+1.)+(0.231651694871)+(-0.728948376511)*0.5**o
-        ref[2,1,0]=(-0.414020935335)/(o+1.)+(0.493702516631)+(-0.213428159952)*0.5**o
-        ref[2,1,1]=(-0.192140152849)/(o+1.)+(-0.753980179875)+(0.0367155018841)*0.5**o
-        ref[3,0,0]=(-0.809290522259)/(o+1.)+(-0.853963268255)+(-0.945391902075)*0.5**o
-        ref[3,0,1]=(0.284802333034)/(o+1.)+(-0.0256655312851)+(0.924110231188)*0.5**o
-        ref[3,1,0]=(0.28377657742)/(o+1.)+(-0.434321561736)+(0.426389283701)*0.5**o
-        ref[3,1,1]=(-0.923809824324)/(o+1.)+(0.493928428472)+(-0.736098543054)*0.5**o
-        ref[4,0,0]=(0.212987907281)/(o+1.)+(-0.948147795941)+(0.953916732391)*0.5**o
-        ref[4,0,1]=(-0.207476753289)/(o+1.)+(0.0601567693744)+(-0.236710267891)*0.5**o
-        ref[4,1,0]=(-0.491488607492)/(o+1.)+(0.980307167989)+(0.275058935551)*0.5**o
-        ref[4,1,1]=(-1.14058719456)/(o+1.)+(-0.609104760814)+(-0.507845102241)*0.5**o
-        ref[5,0,0]=(-1.05861987358)/(o+1.)+(0.727697196357)+(-0.922597172214)*0.5**o
-        ref[5,0,1]=(-1.30888154593)/(o+1.)+(-0.703623060848)+(-0.0350868975578)*0.5**o
-        ref[5,1,0]=(0.17805524354)/(o+1.)+(0.0896522169463)+(0.877279477171)*0.5**o
-        ref[5,1,1]=(-0.319661423044)/(o+1.)+(0.384944604113)+(0.294375780312)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.182956096072)*x[0]**o+(0.857065806542)*x[0]+(-0.0352052809673)*x[1]**o+(0.950661773214)*x[1]
-        arg[0,0,0,1]=(-0.81342189211)*x[0]**o+(0.36137453013)*x[0]+(0.0610373691872)*x[1]**o+(-0.974859653337)*x[1]
-        arg[0,0,1,0]=(-0.149103531408)*x[0]**o+(0.853517194849)*x[0]+(0.623943596759)*x[1]**o+(0.441477983782)*x[1]
-        arg[0,0,1,1]=(0.74912087771)*x[0]**o+(0.935896347068)*x[0]+(0.136600247183)*x[1]**o+(0.915043476739)*x[1]
-        arg[0,0,2,0]=(-0.289042694587)*x[0]**o+(-0.0324580134489)*x[0]+(0.966454801911)*x[1]**o+(0.158747002668)*x[1]
-        arg[0,0,2,1]=(0.0809737838902)*x[0]**o+(0.483125829124)*x[0]+(-0.156074498516)*x[1]**o+(-0.387215102608)*x[1]
-        arg[0,1,0,0]=(0.638822193145)*x[0]**o+(-0.211942445721)*x[0]+(-0.016865109839)*x[1]**o+(-0.596486509057)*x[1]
-        arg[0,1,0,1]=(0.611604473356)*x[0]**o+(-0.330484367791)*x[0]+(-0.897448372147)*x[1]**o+(-0.0188556077191)*x[1]
-        arg[0,1,1,0]=(-0.745407006471)*x[0]**o+(0.547985829362)*x[0]+(-0.229098133178)*x[1]**o+(0.339357994536)*x[1]
-        arg[0,1,1,1]=(0.756528549281)*x[0]**o+(0.0968167016962)*x[0]+(0.481206893907)*x[1]**o+(-0.320299781291)*x[1]
-        arg[0,1,2,0]=(0.335544368565)*x[0]**o+(0.143490409353)*x[0]+(0.367303506039)*x[1]**o+(-0.459001464112)*x[1]
-        arg[0,1,2,1]=(0.669933676654)*x[0]**o+(0.0679909847194)*x[0]+(0.182483888026)*x[1]**o+(-0.382138842505)*x[1]
-        arg[0,2,0,0]=(-0.929163949925)*x[0]**o+(0.670533855076)*x[0]+(0.587675819052)*x[1]**o+(0.221939557678)*x[1]
-        arg[0,2,0,1]=(0.639896773528)*x[0]**o+(-0.166901547286)*x[0]+(-0.83934259298)*x[1]**o+(-0.522536841927)*x[1]
-        arg[0,2,1,0]=(-0.399556357179)*x[0]**o+(0.860582177909)*x[0]+(0.675592435624)*x[1]**o+(0.77480796903)*x[1]
-        arg[0,2,1,1]=(-0.281969675471)*x[0]**o+(-0.250831251067)*x[0]+(0.14396936899)*x[1]**o+(-0.65775670156)*x[1]
-        arg[0,2,2,0]=(0.339204154215)*x[0]**o+(0.125319656279)*x[0]+(0.417557775604)*x[1]**o+(-0.985431777777)*x[1]
-        arg[0,2,2,1]=(-0.655500794874)*x[0]**o+(-0.419889131296)*x[0]+(-0.0763188160723)*x[1]**o+(0.995600932757)*x[1]
-        arg[0,3,0,0]=(-0.483746115201)*x[0]**o+(-0.256632816498)*x[0]+(-0.0533973517656)*x[1]**o+(-0.982541041474)*x[1]
-        arg[0,3,0,1]=(0.446810992304)*x[0]**o+(-0.823523374302)*x[0]+(-0.607238533539)*x[1]**o+(-0.97562384609)*x[1]
-        arg[0,3,1,0]=(-0.0235907627093)*x[0]**o+(-0.0720587626585)*x[0]+(0.930589323947)*x[1]**o+(0.327916365569)*x[1]
-        arg[0,3,1,1]=(0.486342062258)*x[0]**o+(0.430279082913)*x[0]+(0.237445053125)*x[1]**o+(0.577650421809)*x[1]
-        arg[0,3,2,0]=(-0.581025309937)*x[0]**o+(0.97026755344)*x[0]+(0.180505264557)*x[1]**o+(0.289585805796)*x[1]
-        arg[0,3,2,1]=(-0.523356041281)*x[0]**o+(-0.502230606793)*x[0]+(0.915270822508)*x[1]**o+(0.622076448072)*x[1]
-        arg[0,4,0,0]=(-0.584782530121)*x[0]**o+(-0.433761163729)*x[0]+(-0.449731522195)*x[1]**o+(0.392234342377)*x[1]
-        arg[0,4,0,1]=(-0.0724106581167)*x[0]**o+(0.76896002907)*x[0]+(0.0374933582543)*x[1]**o+(-0.417790382045)*x[1]
-        arg[0,4,1,0]=(0.0460360663465)*x[0]**o+(-0.0343116732267)*x[0]+(0.815864788848)*x[1]**o+(-0.922236546574)*x[1]
-        arg[0,4,1,1]=(-0.978584425712)*x[0]**o+(0.249337867126)*x[0]+(-0.822961904166)*x[1]**o+(0.627473480274)*x[1]
-        arg[0,4,2,0]=(-0.267227111945)*x[0]**o+(0.791320996051)*x[0]+(0.721009228711)*x[1]**o+(0.00199546728243)*x[1]
-        arg[0,4,2,1]=(-0.141372777283)*x[0]**o+(-0.996912487736)*x[0]+(0.94281427253)*x[1]**o+(-0.780685413978)*x[1]
-        arg[1,0,0,0]=(-0.721911758033)*x[0]**o+(0.0119756829508)*x[0]+(0.583083015744)*x[1]**o+(0.80826073507)*x[1]
-        arg[1,0,0,1]=(0.929636966638)*x[0]**o+(-0.35107696413)*x[0]+(-0.656523378462)*x[1]**o+(0.610681274197)*x[1]
-        arg[1,0,1,0]=(0.594847872723)*x[0]**o+(-0.15013091781)*x[0]+(-0.562311637909)*x[1]**o+(0.871283992407)*x[1]
-        arg[1,0,1,1]=(0.529274819592)*x[0]**o+(0.998035152453)*x[0]+(-0.265309908189)*x[1]**o+(-0.703391843389)*x[1]
-        arg[1,0,2,0]=(0.2321959905)*x[0]**o+(-0.781602927232)*x[0]+(-0.0509405210126)*x[1]**o+(0.839298348419)*x[1]
-        arg[1,0,2,1]=(0.0811824999287)*x[0]**o+(0.916373714851)*x[0]+(0.817375877796)*x[1]**o+(-0.926274023089)*x[1]
-        arg[1,1,0,0]=(0.418525096774)*x[0]**o+(0.064653235493)*x[0]+(0.15912570069)*x[1]**o+(0.47570489259)*x[1]
-        arg[1,1,0,1]=(0.784138248952)*x[0]**o+(-0.715130508682)*x[0]+(-0.299421222048)*x[1]**o+(-0.816706522916)*x[1]
-        arg[1,1,1,0]=(-0.911449050332)*x[0]**o+(-0.472182975049)*x[0]+(0.935180253062)*x[1]**o+(0.527208406385)*x[1]
-        arg[1,1,1,1]=(-0.378301315644)*x[0]**o+(0.430065353544)*x[0]+(0.827581865806)*x[1]**o+(-0.355263817375)*x[1]
-        arg[1,1,2,0]=(-0.882543004053)*x[0]**o+(0.503794963637)*x[0]+(-0.580086073626)*x[1]**o+(0.545676378283)*x[1]
-        arg[1,1,2,1]=(-0.116197074531)*x[0]**o+(-0.0629871602139)*x[0]+(0.320343551712)*x[1]**o+(0.0552550885696)*x[1]
-        arg[1,2,0,0]=(-0.870347384636)*x[0]**o+(-0.611439594673)*x[0]+(0.707766015783)*x[1]**o+(0.0653036268139)*x[1]
-        arg[1,2,0,1]=(-0.219872666014)*x[0]**o+(-0.435867669656)*x[0]+(0.825489444837)*x[1]**o+(-0.737253859382)*x[1]
-        arg[1,2,1,0]=(-0.963149287055)*x[0]**o+(0.964306345088)*x[0]+(0.502736178959)*x[1]**o+(0.998017404878)*x[1]
-        arg[1,2,1,1]=(-0.586350249194)*x[0]**o+(-0.437455605038)*x[0]+(-0.182719660538)*x[1]**o+(-0.50797820305)*x[1]
-        arg[1,2,2,0]=(-0.423818475166)*x[0]**o+(0.290902418459)*x[0]+(-0.304129806418)*x[1]**o+(-0.67571878331)*x[1]
-        arg[1,2,2,1]=(0.901384945886)*x[0]**o+(0.0526906910209)*x[0]+(0.438755721196)*x[1]**o+(-0.774352941544)*x[1]
-        arg[1,3,0,0]=(-0.797968602257)*x[0]**o+(0.856637297517)*x[0]+(0.427243495756)*x[1]**o+(0.212942988457)*x[1]
-        arg[1,3,0,1]=(-0.696126104381)*x[0]**o+(0.616445534254)*x[0]+(-0.943037028688)*x[1]**o+(0.807265721375)*x[1]
-        arg[1,3,1,0]=(-0.69028368426)*x[0]**o+(-0.652017674488)*x[0]+(-0.772965740874)*x[1]**o+(-0.726830598291)*x[1]
-        arg[1,3,1,1]=(-0.534347181294)*x[0]**o+(-0.861020241321)*x[0]+(-0.250549859157)*x[1]**o+(-0.638289396201)*x[1]
-        arg[1,3,2,0]=(-0.827981962115)*x[0]**o+(-0.427544131008)*x[0]+(-0.516514308221)*x[1]**o+(-0.101906062547)*x[1]
-        arg[1,3,2,1]=(0.864701869194)*x[0]**o+(0.876327129524)*x[0]+(0.806201346091)*x[1]**o+(0.845259832272)*x[1]
-        arg[1,4,0,0]=(-0.589044559231)*x[0]**o+(0.697104039773)*x[0]+(-0.288389617381)*x[1]**o+(0.422618969092)*x[1]
-        arg[1,4,0,1]=(0.814971550967)*x[0]**o+(-0.665151459593)*x[0]+(-0.696145763418)*x[1]**o+(0.906949165457)*x[1]
-        arg[1,4,1,0]=(0.760190450826)*x[0]**o+(-0.883964913626)*x[0]+(-0.507159320061)*x[1]**o+(-0.15707026975)*x[1]
-        arg[1,4,1,1]=(-0.0416603697257)*x[0]**o+(0.560561779164)*x[0]+(0.0153574982122)*x[1]**o+(0.75228872946)*x[1]
-        arg[1,4,2,0]=(0.105929120872)*x[0]**o+(0.130738968719)*x[0]+(-0.0991159921294)*x[1]**o+(0.972627650896)*x[1]
-        arg[1,4,2,1]=(-0.503911541225)*x[0]**o+(-0.00357063650385)*x[0]+(0.377083955928)*x[1]**o+(0.343010153434)*x[1]
-        arg[2,0,0,0]=(0.953733725947)*x[0]**o+(-0.988629842686)*x[0]+(0.196766730386)*x[1]**o+(0.0427993038279)*x[1]
-        arg[2,0,0,1]=(0.491469820597)*x[0]**o+(0.708248604732)*x[0]+(-0.600347310418)*x[1]**o+(-0.0380188651191)*x[1]
-        arg[2,0,1,0]=(0.615118477478)*x[0]**o+(0.832030863133)*x[0]+(0.783037278839)*x[1]**o+(-0.331824170309)*x[1]
-        arg[2,0,1,1]=(-0.806125471265)*x[0]**o+(0.763233458333)*x[0]+(-0.381389710969)*x[1]**o+(0.652974431609)*x[1]
-        arg[2,0,2,0]=(-0.831727679795)*x[0]**o+(0.239296785135)*x[0]+(-0.13737609858)*x[1]**o+(0.583210422723)*x[1]
-        arg[2,0,2,1]=(-0.805843206194)*x[0]**o+(-0.523576669019)*x[0]+(0.159758297984)*x[1]**o+(-0.298308874886)*x[1]
-        arg[2,1,0,0]=(0.589135530105)*x[0]**o+(0.272145879514)*x[0]+(0.325741074892)*x[1]**o+(-0.579782654647)*x[1]
-        arg[2,1,0,1]=(0.106049062774)*x[0]**o+(0.790280056075)*x[0]+(0.0171600098883)*x[1]**o+(-0.419540445094)*x[1]
-        arg[2,1,1,0]=(-0.181511670026)*x[0]**o+(-0.814531462508)*x[0]+(-0.576165158737)*x[1]**o+(0.679678310717)*x[1]
-        arg[2,1,1,1]=(-0.709695453728)*x[0]**o+(-0.489487606257)*x[0]+(-0.424093531654)*x[1]**o+(0.535427169862)*x[1]
-        arg[2,1,2,0]=(0.60069280023)*x[0]**o+(-0.909882731214)*x[0]+(0.640141428017)*x[1]**o+(-0.697396064954)*x[1]
-        arg[2,1,2,1]=(0.896964594562)*x[0]**o+(0.976387328697)*x[0]+(0.144061490066)*x[1]**o+(0.378042869796)*x[1]
-        arg[2,2,0,0]=(0.447633246258)*x[0]**o+(-0.531416367062)*x[0]+(0.199304002742)*x[1]**o+(0.85195706213)*x[1]
-        arg[2,2,0,1]=(-0.683614706554)*x[0]**o+(0.933255565209)*x[0]+(-0.328047392082)*x[1]**o+(-0.0865769137182)*x[1]
-        arg[2,2,1,0]=(0.22474720984)*x[0]**o+(0.0910500178874)*x[0]+(0.449220001922)*x[1]**o+(-0.0406214557829)*x[1]
-        arg[2,2,1,1]=(-0.266419887395)*x[0]**o+(-0.48883285131)*x[0]+(-0.794933934805)*x[1]**o+(0.182439649969)*x[1]
-        arg[2,2,2,0]=(0.949852186215)*x[0]**o+(-0.116121704259)*x[0]+(-0.977131144423)*x[1]**o+(0.698402625747)*x[1]
-        arg[2,2,2,1]=(-0.0446180768654)*x[0]**o+(-0.742263614438)*x[0]+(-0.898675367333)*x[1]**o+(-0.260891146746)*x[1]
-        arg[2,3,0,0]=(0.819774310005)*x[0]**o+(-0.0677371406664)*x[0]+(0.276747165681)*x[1]**o+(-0.42828783)*x[1]
-        arg[2,3,0,1]=(-0.391001671385)*x[0]**o+(0.0558814994728)*x[0]+(-0.624786978129)*x[1]**o+(0.178742280566)*x[1]
-        arg[2,3,1,0]=(0.904597103646)*x[0]**o+(-0.825472271707)*x[0]+(0.112221476422)*x[1]**o+(0.269349199527)*x[1]
-        arg[2,3,1,1]=(-0.190955697638)*x[0]**o+(0.441698994606)*x[0]+(-0.26229840557)*x[1]**o+(0.148974540187)*x[1]
-        arg[2,3,2,0]=(-0.873098622934)*x[0]**o+(-0.624915584376)*x[0]+(-0.151646578512)*x[1]**o+(-0.914878228283)*x[1]
-        arg[2,3,2,1]=(-0.712569947477)*x[0]**o+(-0.72679361801)*x[0]+(-0.0946869166491)*x[1]**o+(-0.580512407933)*x[1]
-        arg[2,4,0,0]=(-0.655752680768)*x[0]**o+(-0.409544975855)*x[0]+(0.865325438086)*x[1]**o+(-0.227397026937)*x[1]
-        arg[2,4,0,1]=(0.670566711209)*x[0]**o+(-0.794343533883)*x[0]+(-0.127116396219)*x[1]**o+(-0.422419866647)*x[1]
-        arg[2,4,1,0]=(0.46903441444)*x[0]**o+(0.0689129759715)*x[0]+(-0.549325647826)*x[1]**o+(0.893700020399)*x[1]
-        arg[2,4,1,1]=(-0.0099246750652)*x[0]**o+(0.446742615509)*x[0]+(0.900251202513)*x[1]**o+(0.221599931055)*x[1]
-        arg[2,4,2,0]=(0.218854380066)*x[0]**o+(0.877849336909)*x[0]+(-0.338211083089)*x[1]**o+(0.746950973063)*x[1]
-        arg[2,4,2,1]=(-0.890762146523)*x[0]**o+(0.439653904008)*x[0]+(0.0802890292215)*x[1]**o+(-0.305233739845)*x[1]
-        arg[3,0,0,0]=(0.284622209957)*x[0]**o+(0.983284338924)*x[0]+(-0.732588048234)*x[1]**o+(0.654066388109)*x[1]
-        arg[3,0,0,1]=(0.379628076244)*x[0]**o+(-0.75362875047)*x[0]+(0.288422119968)*x[1]**o+(0.139197401407)*x[1]
-        arg[3,0,1,0]=(0.0594472092467)*x[0]**o+(-0.391581973307)*x[0]+(-0.898996153568)*x[1]**o+(-2.75165483707e-05)*x[1]
-        arg[3,0,1,1]=(-0.241252797172)*x[0]**o+(-0.87384982932)*x[0]+(0.811628957112)*x[1]**o+(0.0170539509618)*x[1]
-        arg[3,0,2,0]=(0.255617459837)*x[0]**o+(-0.744071491889)*x[0]+(0.745552769828)*x[1]**o+(0.128612266243)*x[1]
-        arg[3,0,2,1]=(0.0725082197254)*x[0]**o+(0.779602587374)*x[0]+(-0.751879287668)*x[1]**o+(0.838360641095)*x[1]
-        arg[3,1,0,0]=(-0.444520674459)*x[0]**o+(-0.811442143542)*x[0]+(-0.485010478999)*x[1]**o+(0.727600464745)*x[1]
-        arg[3,1,0,1]=(0.260061065042)*x[0]**o+(0.932320346965)*x[0]+(0.556377882844)*x[1]**o+(0.284348284894)*x[1]
-        arg[3,1,1,0]=(0.561755002522)*x[0]**o+(-0.842983435746)*x[0]+(0.729209244377)*x[1]**o+(-0.254683846974)*x[1]
-        arg[3,1,1,1]=(-0.949556399673)*x[0]**o+(-0.0804522142379)*x[0]+(0.066141483426)*x[1]**o+(0.78626145966)*x[1]
-        arg[3,1,2,0]=(0.833198651881)*x[0]**o+(-0.297955946153)*x[0]+(-0.561247934789)*x[1]**o+(-0.645124432611)*x[1]
-        arg[3,1,2,1]=(-0.641727656043)*x[0]**o+(0.32981201062)*x[0]+(-0.152588766563)*x[1]**o+(-0.289611460761)*x[1]
-        arg[3,2,0,0]=(0.825643539598)*x[0]**o+(0.924286336436)*x[0]+(0.413089850944)*x[1]**o+(-0.640198886209)*x[1]
-        arg[3,2,0,1]=(0.0855693847128)*x[0]**o+(-0.363881253576)*x[0]+(0.0397854550832)*x[1]**o+(-0.844391996875)*x[1]
-        arg[3,2,1,0]=(-0.8248537795)*x[0]**o+(0.153070857979)*x[0]+(0.970009460355)*x[1]**o+(0.431000028243)*x[1]
-        arg[3,2,1,1]=(-0.978024209918)*x[0]**o+(-0.527494257814)*x[0]+(-0.814691105217)*x[1]**o+(0.458334868681)*x[1]
-        arg[3,2,2,0]=(0.944359157869)*x[0]**o+(-0.868016282191)*x[0]+(0.410849160429)*x[1]**o+(0.480177162607)*x[1]
-        arg[3,2,2,1]=(0.109166287134)*x[0]**o+(0.940100154901)*x[0]+(0.630946061805)*x[1]**o+(0.347160020469)*x[1]
-        arg[3,3,0,0]=(0.364585502975)*x[0]**o+(0.717282598047)*x[0]+(0.517805310585)*x[1]**o+(0.963452728824)*x[1]
-        arg[3,3,0,1]=(0.0373453558524)*x[0]**o+(0.943887402198)*x[0]+(0.983624425071)*x[1]**o+(-0.396242794059)*x[1]
-        arg[3,3,1,0]=(-0.563724031351)*x[0]**o+(0.959753988518)*x[0]+(0.118506885299)*x[1]**o+(-0.587748202342)*x[1]
-        arg[3,3,1,1]=(0.460419807013)*x[0]**o+(0.237753399499)*x[0]+(0.585589833251)*x[1]**o+(0.935177937667)*x[1]
-        arg[3,3,2,0]=(-0.750248086829)*x[0]**o+(-0.561629848994)*x[0]+(-0.919919077536)*x[1]**o+(0.239984179086)*x[1]
-        arg[3,3,2,1]=(-0.0969897163659)*x[0]**o+(0.185433022889)*x[0]+(0.733111631837)*x[1]**o+(-0.508147081928)*x[1]
-        arg[3,4,0,0]=(0.247054568876)*x[0]**o+(0.721751593201)*x[0]+(-0.684740924498)*x[1]**o+(0.28395202476)*x[1]
-        arg[3,4,0,1]=(-0.0949248638736)*x[0]**o+(0.270285273316)*x[0]+(0.850836559464)*x[1]**o+(-0.771085947382)*x[1]
-        arg[3,4,1,0]=(-0.965410502362)*x[0]**o+(-0.582448742001)*x[0]+(-0.90307507827)*x[1]**o+(0.914051445745)*x[1]
-        arg[3,4,1,1]=(0.443340058617)*x[0]**o+(0.434462120769)*x[0]+(0.522015964301)*x[1]**o+(-0.520184389865)*x[1]
-        arg[3,4,2,0]=(-0.961375562593)*x[0]**o+(-0.474630747481)*x[0]+(0.59574636341)*x[1]**o+(0.434190359663)*x[1]
-        arg[3,4,2,1]=(0.174154210501)*x[0]**o+(-0.510858596799)*x[0]+(-0.0279700806065)*x[1]**o+(-0.0401612371912)*x[1]
-        ref[0,0,0,0]=(-0.0352052809673)/(o+1.)+(0.903863789878)+(0.182956096072)*0.5**o
-        ref[0,0,0,1]=(0.0610373691872)/(o+1.)+(-0.306742561603)+(-0.81342189211)*0.5**o
-        ref[0,0,1,0]=(0.623943596759)/(o+1.)+(0.647497589315)+(-0.149103531408)*0.5**o
-        ref[0,0,1,1]=(0.136600247183)/(o+1.)+(0.925469911903)+(0.74912087771)*0.5**o
-        ref[0,0,2,0]=(0.966454801911)/(o+1.)+(0.0631444946098)+(-0.289042694587)*0.5**o
-        ref[0,0,2,1]=(-0.156074498516)/(o+1.)+(0.047955363258)+(0.0809737838902)*0.5**o
-        ref[0,1,0,0]=(-0.016865109839)/(o+1.)+(-0.404214477389)+(0.638822193145)*0.5**o
-        ref[0,1,0,1]=(-0.897448372147)/(o+1.)+(-0.174669987755)+(0.611604473356)*0.5**o
-        ref[0,1,1,0]=(-0.229098133178)/(o+1.)+(0.443671911949)+(-0.745407006471)*0.5**o
-        ref[0,1,1,1]=(0.481206893907)/(o+1.)+(-0.111741539797)+(0.756528549281)*0.5**o
-        ref[0,1,2,0]=(0.367303506039)/(o+1.)+(-0.157755527379)+(0.335544368565)*0.5**o
-        ref[0,1,2,1]=(0.182483888026)/(o+1.)+(-0.157073928893)+(0.669933676654)*0.5**o
-        ref[0,2,0,0]=(0.587675819052)/(o+1.)+(0.446236706377)+(-0.929163949925)*0.5**o
-        ref[0,2,0,1]=(-0.83934259298)/(o+1.)+(-0.344719194607)+(0.639896773528)*0.5**o
-        ref[0,2,1,0]=(0.675592435624)/(o+1.)+(0.81769507347)+(-0.399556357179)*0.5**o
-        ref[0,2,1,1]=(0.14396936899)/(o+1.)+(-0.454293976313)+(-0.281969675471)*0.5**o
-        ref[0,2,2,0]=(0.417557775604)/(o+1.)+(-0.430056060749)+(0.339204154215)*0.5**o
-        ref[0,2,2,1]=(-0.0763188160723)/(o+1.)+(0.28785590073)+(-0.655500794874)*0.5**o
-        ref[0,3,0,0]=(-0.0533973517656)/(o+1.)+(-0.619586928986)+(-0.483746115201)*0.5**o
-        ref[0,3,0,1]=(-0.607238533539)/(o+1.)+(-0.899573610196)+(0.446810992304)*0.5**o
-        ref[0,3,1,0]=(0.930589323947)/(o+1.)+(0.127928801455)+(-0.0235907627093)*0.5**o
-        ref[0,3,1,1]=(0.237445053125)/(o+1.)+(0.503964752361)+(0.486342062258)*0.5**o
-        ref[0,3,2,0]=(0.180505264557)/(o+1.)+(0.629926679618)+(-0.581025309937)*0.5**o
-        ref[0,3,2,1]=(0.915270822508)/(o+1.)+(0.0599229206396)+(-0.523356041281)*0.5**o
-        ref[0,4,0,0]=(-0.449731522195)/(o+1.)+(-0.0207634106763)+(-0.584782530121)*0.5**o
-        ref[0,4,0,1]=(0.0374933582543)/(o+1.)+(0.175584823513)+(-0.0724106581167)*0.5**o
-        ref[0,4,1,0]=(0.815864788848)/(o+1.)+(-0.4782741099)+(0.0460360663465)*0.5**o
-        ref[0,4,1,1]=(-0.822961904166)/(o+1.)+(0.4384056737)+(-0.978584425712)*0.5**o
-        ref[0,4,2,0]=(0.721009228711)/(o+1.)+(0.396658231667)+(-0.267227111945)*0.5**o
-        ref[0,4,2,1]=(0.94281427253)/(o+1.)+(-0.888798950857)+(-0.141372777283)*0.5**o
-        ref[1,0,0,0]=(0.583083015744)/(o+1.)+(0.41011820901)+(-0.721911758033)*0.5**o
-        ref[1,0,0,1]=(-0.656523378462)/(o+1.)+(0.129802155034)+(0.929636966638)*0.5**o
-        ref[1,0,1,0]=(-0.562311637909)/(o+1.)+(0.360576537299)+(0.594847872723)*0.5**o
-        ref[1,0,1,1]=(-0.265309908189)/(o+1.)+(0.147321654532)+(0.529274819592)*0.5**o
-        ref[1,0,2,0]=(-0.0509405210126)/(o+1.)+(0.0288477105933)+(0.2321959905)*0.5**o
-        ref[1,0,2,1]=(0.817375877796)/(o+1.)+(-0.00495015411903)+(0.0811824999287)*0.5**o
-        ref[1,1,0,0]=(0.15912570069)/(o+1.)+(0.270179064041)+(0.418525096774)*0.5**o
-        ref[1,1,0,1]=(-0.299421222048)/(o+1.)+(-0.765918515799)+(0.784138248952)*0.5**o
-        ref[1,1,1,0]=(0.935180253062)/(o+1.)+(0.0275127156677)+(-0.911449050332)*0.5**o
-        ref[1,1,1,1]=(0.827581865806)/(o+1.)+(0.0374007680845)+(-0.378301315644)*0.5**o
-        ref[1,1,2,0]=(-0.580086073626)/(o+1.)+(0.52473567096)+(-0.882543004053)*0.5**o
-        ref[1,1,2,1]=(0.320343551712)/(o+1.)+(-0.00386603582212)+(-0.116197074531)*0.5**o
-        ref[1,2,0,0]=(0.707766015783)/(o+1.)+(-0.273067983929)+(-0.870347384636)*0.5**o
-        ref[1,2,0,1]=(0.825489444837)/(o+1.)+(-0.586560764519)+(-0.219872666014)*0.5**o
-        ref[1,2,1,0]=(0.502736178959)/(o+1.)+(0.981161874983)+(-0.963149287055)*0.5**o
-        ref[1,2,1,1]=(-0.182719660538)/(o+1.)+(-0.472716904044)+(-0.586350249194)*0.5**o
-        ref[1,2,2,0]=(-0.304129806418)/(o+1.)+(-0.192408182425)+(-0.423818475166)*0.5**o
-        ref[1,2,2,1]=(0.438755721196)/(o+1.)+(-0.360831125262)+(0.901384945886)*0.5**o
-        ref[1,3,0,0]=(0.427243495756)/(o+1.)+(0.534790142987)+(-0.797968602257)*0.5**o
-        ref[1,3,0,1]=(-0.943037028688)/(o+1.)+(0.711855627815)+(-0.696126104381)*0.5**o
-        ref[1,3,1,0]=(-0.772965740874)/(o+1.)+(-0.689424136389)+(-0.69028368426)*0.5**o
-        ref[1,3,1,1]=(-0.250549859157)/(o+1.)+(-0.749654818761)+(-0.534347181294)*0.5**o
-        ref[1,3,2,0]=(-0.516514308221)/(o+1.)+(-0.264725096778)+(-0.827981962115)*0.5**o
-        ref[1,3,2,1]=(0.806201346091)/(o+1.)+(0.860793480898)+(0.864701869194)*0.5**o
-        ref[1,4,0,0]=(-0.288389617381)/(o+1.)+(0.559861504432)+(-0.589044559231)*0.5**o
-        ref[1,4,0,1]=(-0.696145763418)/(o+1.)+(0.120898852932)+(0.814971550967)*0.5**o
-        ref[1,4,1,0]=(-0.507159320061)/(o+1.)+(-0.520517591688)+(0.760190450826)*0.5**o
-        ref[1,4,1,1]=(0.0153574982122)/(o+1.)+(0.656425254312)+(-0.0416603697257)*0.5**o
-        ref[1,4,2,0]=(-0.0991159921294)/(o+1.)+(0.551683309807)+(0.105929120872)*0.5**o
-        ref[1,4,2,1]=(0.377083955928)/(o+1.)+(0.169719758465)+(-0.503911541225)*0.5**o
-        ref[2,0,0,0]=(0.196766730386)/(o+1.)+(-0.472915269429)+(0.953733725947)*0.5**o
-        ref[2,0,0,1]=(-0.600347310418)/(o+1.)+(0.335114869806)+(0.491469820597)*0.5**o
-        ref[2,0,1,0]=(0.783037278839)/(o+1.)+(0.250103346412)+(0.615118477478)*0.5**o
-        ref[2,0,1,1]=(-0.381389710969)/(o+1.)+(0.708103944971)+(-0.806125471265)*0.5**o
-        ref[2,0,2,0]=(-0.13737609858)/(o+1.)+(0.411253603929)+(-0.831727679795)*0.5**o
-        ref[2,0,2,1]=(0.159758297984)/(o+1.)+(-0.410942771953)+(-0.805843206194)*0.5**o
-        ref[2,1,0,0]=(0.325741074892)/(o+1.)+(-0.153818387566)+(0.589135530105)*0.5**o
-        ref[2,1,0,1]=(0.0171600098883)/(o+1.)+(0.185369805491)+(0.106049062774)*0.5**o
-        ref[2,1,1,0]=(-0.576165158737)/(o+1.)+(-0.0674265758955)+(-0.181511670026)*0.5**o
-        ref[2,1,1,1]=(-0.424093531654)/(o+1.)+(0.0229697818029)+(-0.709695453728)*0.5**o
-        ref[2,1,2,0]=(0.640141428017)/(o+1.)+(-0.803639398084)+(0.60069280023)*0.5**o
-        ref[2,1,2,1]=(0.144061490066)/(o+1.)+(0.677215099246)+(0.896964594562)*0.5**o
-        ref[2,2,0,0]=(0.199304002742)/(o+1.)+(0.160270347534)+(0.447633246258)*0.5**o
-        ref[2,2,0,1]=(-0.328047392082)/(o+1.)+(0.423339325745)+(-0.683614706554)*0.5**o
-        ref[2,2,1,0]=(0.449220001922)/(o+1.)+(0.0252142810523)+(0.22474720984)*0.5**o
-        ref[2,2,1,1]=(-0.794933934805)/(o+1.)+(-0.153196600671)+(-0.266419887395)*0.5**o
-        ref[2,2,2,0]=(-0.977131144423)/(o+1.)+(0.291140460744)+(0.949852186215)*0.5**o
-        ref[2,2,2,1]=(-0.898675367333)/(o+1.)+(-0.501577380592)+(-0.0446180768654)*0.5**o
-        ref[2,3,0,0]=(0.276747165681)/(o+1.)+(-0.248012485333)+(0.819774310005)*0.5**o
-        ref[2,3,0,1]=(-0.624786978129)/(o+1.)+(0.11731189002)+(-0.391001671385)*0.5**o
-        ref[2,3,1,0]=(0.112221476422)/(o+1.)+(-0.27806153609)+(0.904597103646)*0.5**o
-        ref[2,3,1,1]=(-0.26229840557)/(o+1.)+(0.295336767397)+(-0.190955697638)*0.5**o
-        ref[2,3,2,0]=(-0.151646578512)/(o+1.)+(-0.76989690633)+(-0.873098622934)*0.5**o
-        ref[2,3,2,1]=(-0.0946869166491)/(o+1.)+(-0.653653012971)+(-0.712569947477)*0.5**o
-        ref[2,4,0,0]=(0.865325438086)/(o+1.)+(-0.318471001396)+(-0.655752680768)*0.5**o
-        ref[2,4,0,1]=(-0.127116396219)/(o+1.)+(-0.608381700265)+(0.670566711209)*0.5**o
-        ref[2,4,1,0]=(-0.549325647826)/(o+1.)+(0.481306498185)+(0.46903441444)*0.5**o
-        ref[2,4,1,1]=(0.900251202513)/(o+1.)+(0.334171273282)+(-0.0099246750652)*0.5**o
-        ref[2,4,2,0]=(-0.338211083089)/(o+1.)+(0.812400154986)+(0.218854380066)*0.5**o
-        ref[2,4,2,1]=(0.0802890292215)/(o+1.)+(0.0672100820814)+(-0.890762146523)*0.5**o
-        ref[3,0,0,0]=(-0.732588048234)/(o+1.)+(0.818675363516)+(0.284622209957)*0.5**o
-        ref[3,0,0,1]=(0.288422119968)/(o+1.)+(-0.307215674532)+(0.379628076244)*0.5**o
-        ref[3,0,1,0]=(-0.898996153568)/(o+1.)+(-0.195804744928)+(0.0594472092467)*0.5**o
-        ref[3,0,1,1]=(0.811628957112)/(o+1.)+(-0.428397939179)+(-0.241252797172)*0.5**o
-        ref[3,0,2,0]=(0.745552769828)/(o+1.)+(-0.307729612823)+(0.255617459837)*0.5**o
-        ref[3,0,2,1]=(-0.751879287668)/(o+1.)+(0.808981614234)+(0.0725082197254)*0.5**o
-        ref[3,1,0,0]=(-0.485010478999)/(o+1.)+(-0.0419208393982)+(-0.444520674459)*0.5**o
-        ref[3,1,0,1]=(0.556377882844)/(o+1.)+(0.60833431593)+(0.260061065042)*0.5**o
-        ref[3,1,1,0]=(0.729209244377)/(o+1.)+(-0.54883364136)+(0.561755002522)*0.5**o
-        ref[3,1,1,1]=(0.066141483426)/(o+1.)+(0.352904622711)+(-0.949556399673)*0.5**o
-        ref[3,1,2,0]=(-0.561247934789)/(o+1.)+(-0.471540189382)+(0.833198651881)*0.5**o
-        ref[3,1,2,1]=(-0.152588766563)/(o+1.)+(0.0201002749295)+(-0.641727656043)*0.5**o
-        ref[3,2,0,0]=(0.413089850944)/(o+1.)+(0.142043725114)+(0.825643539598)*0.5**o
-        ref[3,2,0,1]=(0.0397854550832)/(o+1.)+(-0.604136625225)+(0.0855693847128)*0.5**o
-        ref[3,2,1,0]=(0.970009460355)/(o+1.)+(0.292035443111)+(-0.8248537795)*0.5**o
-        ref[3,2,1,1]=(-0.814691105217)/(o+1.)+(-0.0345796945668)+(-0.978024209918)*0.5**o
-        ref[3,2,2,0]=(0.410849160429)/(o+1.)+(-0.193919559792)+(0.944359157869)*0.5**o
-        ref[3,2,2,1]=(0.630946061805)/(o+1.)+(0.643630087685)+(0.109166287134)*0.5**o
-        ref[3,3,0,0]=(0.517805310585)/(o+1.)+(0.840367663435)+(0.364585502975)*0.5**o
-        ref[3,3,0,1]=(0.983624425071)/(o+1.)+(0.273822304069)+(0.0373453558524)*0.5**o
-        ref[3,3,1,0]=(0.118506885299)/(o+1.)+(0.186002893088)+(-0.563724031351)*0.5**o
-        ref[3,3,1,1]=(0.585589833251)/(o+1.)+(0.586465668583)+(0.460419807013)*0.5**o
-        ref[3,3,2,0]=(-0.919919077536)/(o+1.)+(-0.160822834954)+(-0.750248086829)*0.5**o
-        ref[3,3,2,1]=(0.733111631837)/(o+1.)+(-0.161357029519)+(-0.0969897163659)*0.5**o
-        ref[3,4,0,0]=(-0.684740924498)/(o+1.)+(0.50285180898)+(0.247054568876)*0.5**o
-        ref[3,4,0,1]=(0.850836559464)/(o+1.)+(-0.250400337033)+(-0.0949248638736)*0.5**o
-        ref[3,4,1,0]=(-0.90307507827)/(o+1.)+(0.165801351872)+(-0.965410502362)*0.5**o
-        ref[3,4,1,1]=(0.522015964301)/(o+1.)+(-0.0428611345479)+(0.443340058617)*0.5**o
-        ref[3,4,2,0]=(0.59574636341)/(o+1.)+(-0.0202201939092)+(-0.961375562593)*0.5**o
-        ref[3,4,2,1]=(-0.0279700806065)/(o+1.)+(-0.275509916995)+(0.174154210501)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.793251694335)*x[0]**o+(0.616970271582)*x[0]+(-0.805609243189)*x[1]**o+(0.949515692474)*x[1]+(0.484069738431)*x[2]**o+(-0.0407533911672)*x[2]
-        arg[0,0,0,1]=(-0.624206604764)*x[0]**o+(-0.992961148702)*x[0]+(-0.737741763879)*x[1]**o+(0.161544434398)*x[1]+(0.47292947772)*x[2]**o+(0.525538846945)*x[2]
-        arg[0,0,1,0]=(0.115999561481)*x[0]**o+(-0.612694096044)*x[0]+(0.625539443386)*x[1]**o+(0.857353715882)*x[1]+(-0.0811256709155)*x[2]**o+(0.183474706394)*x[2]
-        arg[0,0,1,1]=(-0.972466831671)*x[0]**o+(0.262980887655)*x[0]+(0.920924576059)*x[1]**o+(0.983517658667)*x[1]+(0.579443973505)*x[2]**o+(0.101139612823)*x[2]
-        arg[0,0,2,0]=(0.708180260094)*x[0]**o+(-0.0950913766285)*x[0]+(0.361602191798)*x[1]**o+(-0.880757848201)*x[1]+(0.326272205058)*x[2]**o+(-0.997155694972)*x[2]
-        arg[0,0,2,1]=(0.0282615573045)*x[0]**o+(-0.317851994728)*x[0]+(0.449330147388)*x[1]**o+(-0.156946318079)*x[1]+(0.344196894245)*x[2]**o+(-0.045082290904)*x[2]
-        arg[0,1,0,0]=(0.231621820235)*x[0]**o+(0.0985804817846)*x[0]+(-0.343623333022)*x[1]**o+(0.115043475441)*x[1]+(-0.910742772023)*x[2]**o+(-0.663592068553)*x[2]
-        arg[0,1,0,1]=(0.114056801155)*x[0]**o+(-0.463711315494)*x[0]+(0.380521147429)*x[1]**o+(0.294823684238)*x[1]+(0.510501672453)*x[2]**o+(-0.161234251875)*x[2]
-        arg[0,1,1,0]=(-0.973115195017)*x[0]**o+(-0.0133290715609)*x[0]+(-0.642072931588)*x[1]**o+(-0.580655605735)*x[1]+(-0.191371539061)*x[2]**o+(-0.0513051439064)*x[2]
-        arg[0,1,1,1]=(-0.304758579369)*x[0]**o+(-0.321904612871)*x[0]+(-0.389525877547)*x[1]**o+(-0.0602638359252)*x[1]+(0.199726168523)*x[2]**o+(-0.10313327614)*x[2]
-        arg[0,1,2,0]=(0.0923844967157)*x[0]**o+(-0.369319307184)*x[0]+(-0.614761123101)*x[1]**o+(0.78817430449)*x[1]+(-0.783809995839)*x[2]**o+(-0.701522582246)*x[2]
-        arg[0,1,2,1]=(0.793568921835)*x[0]**o+(0.352244892726)*x[0]+(0.185546719529)*x[1]**o+(0.145969792058)*x[1]+(0.85147546253)*x[2]**o+(-0.862069843156)*x[2]
-        arg[0,2,0,0]=(0.570673248048)*x[0]**o+(0.607924942767)*x[0]+(-0.353952625913)*x[1]**o+(0.111796842318)*x[1]+(-0.765670542263)*x[2]**o+(0.589532724922)*x[2]
-        arg[0,2,0,1]=(0.299061155215)*x[0]**o+(-0.542978954882)*x[0]+(0.0946151623892)*x[1]**o+(0.310266302534)*x[1]+(-0.00880229885823)*x[2]**o+(0.585508874849)*x[2]
-        arg[0,2,1,0]=(0.694725244159)*x[0]**o+(0.530004132186)*x[0]+(-0.32588478629)*x[1]**o+(0.357278329148)*x[1]+(-0.93877612203)*x[2]**o+(0.34973013935)*x[2]
-        arg[0,2,1,1]=(-0.83896527178)*x[0]**o+(0.487231460025)*x[0]+(0.493952010418)*x[1]**o+(0.247442509692)*x[1]+(-0.312456515075)*x[2]**o+(0.90248200924)*x[2]
-        arg[0,2,2,0]=(0.2228052704)*x[0]**o+(0.901373696962)*x[0]+(0.149826948427)*x[1]**o+(0.234013159005)*x[1]+(0.717685535862)*x[2]**o+(-0.42865545543)*x[2]
-        arg[0,2,2,1]=(0.63141216243)*x[0]**o+(0.448446314659)*x[0]+(0.379625538779)*x[1]**o+(-0.807448154272)*x[1]+(0.238724835223)*x[2]**o+(-0.478216911196)*x[2]
-        arg[0,3,0,0]=(0.00698107166168)*x[0]**o+(-0.727207190747)*x[0]+(-0.78731647832)*x[1]**o+(0.885371753974)*x[1]+(-0.0146821479126)*x[2]**o+(-0.763310617205)*x[2]
-        arg[0,3,0,1]=(0.243423742325)*x[0]**o+(0.0587322175837)*x[0]+(-0.453213790216)*x[1]**o+(0.861270481703)*x[1]+(0.867332526083)*x[2]**o+(-0.713187214416)*x[2]
-        arg[0,3,1,0]=(-0.106629554393)*x[0]**o+(0.723693136654)*x[0]+(-0.0276604293602)*x[1]**o+(0.339456904686)*x[1]+(-0.102075459215)*x[2]**o+(-0.0348969356596)*x[2]
-        arg[0,3,1,1]=(0.375143733111)*x[0]**o+(-0.490781234413)*x[0]+(0.168903339622)*x[1]**o+(0.594080859808)*x[1]+(-0.0802336915361)*x[2]**o+(0.472348979787)*x[2]
-        arg[0,3,2,0]=(0.955685455438)*x[0]**o+(0.105142628533)*x[0]+(-0.446384800971)*x[1]**o+(-0.905998305229)*x[1]+(-0.30011637186)*x[2]**o+(0.0218195326037)*x[2]
-        arg[0,3,2,1]=(0.353654445481)*x[0]**o+(-0.0477024594709)*x[0]+(-0.495075817497)*x[1]**o+(-0.425091398447)*x[1]+(-0.571207600446)*x[2]**o+(0.177935012163)*x[2]
-        arg[0,4,0,0]=(0.974759684151)*x[0]**o+(-0.876975976179)*x[0]+(-0.472336406836)*x[1]**o+(0.991410874408)*x[1]+(0.297823444758)*x[2]**o+(-0.161436760659)*x[2]
-        arg[0,4,0,1]=(-0.0799922241539)*x[0]**o+(0.975369691404)*x[0]+(0.302361880712)*x[1]**o+(0.171779641966)*x[1]+(0.878428630413)*x[2]**o+(0.814497247319)*x[2]
-        arg[0,4,1,0]=(0.532633280629)*x[0]**o+(0.902436316468)*x[0]+(-0.676910177358)*x[1]**o+(-0.986029752926)*x[1]+(-0.519990783496)*x[2]**o+(0.430468215617)*x[2]
-        arg[0,4,1,1]=(-0.353243658293)*x[0]**o+(-0.908938062877)*x[0]+(0.922933758125)*x[1]**o+(0.00500161721147)*x[1]+(0.189861558609)*x[2]**o+(-0.623307494462)*x[2]
-        arg[0,4,2,0]=(-0.720840869801)*x[0]**o+(0.0349736577597)*x[0]+(-0.516608060915)*x[1]**o+(0.688756843577)*x[1]+(-0.302494303699)*x[2]**o+(-0.0703783111937)*x[2]
-        arg[0,4,2,1]=(-0.179073400214)*x[0]**o+(0.128485402427)*x[0]+(-0.726789308786)*x[1]**o+(-0.691163482057)*x[1]+(0.329009412577)*x[2]**o+(-0.79293394396)*x[2]
-        arg[1,0,0,0]=(-0.384011553333)*x[0]**o+(0.285271264922)*x[0]+(0.512105930181)*x[1]**o+(0.190321101872)*x[1]+(-0.509334982029)*x[2]**o+(0.128097742502)*x[2]
-        arg[1,0,0,1]=(-0.808211570649)*x[0]**o+(-0.730450956462)*x[0]+(0.92309757237)*x[1]**o+(-0.703749565272)*x[1]+(0.301129716544)*x[2]**o+(0.244379489105)*x[2]
-        arg[1,0,1,0]=(0.0404274840294)*x[0]**o+(-0.483903392253)*x[0]+(0.73680959705)*x[1]**o+(0.190850758522)*x[1]+(0.133136432605)*x[2]**o+(0.910055186498)*x[2]
-        arg[1,0,1,1]=(0.302394139901)*x[0]**o+(0.802524687002)*x[0]+(0.970871728408)*x[1]**o+(0.207348092291)*x[1]+(0.666310912781)*x[2]**o+(0.510392805767)*x[2]
-        arg[1,0,2,0]=(-0.981981997649)*x[0]**o+(-0.465269233707)*x[0]+(0.916146418639)*x[1]**o+(0.143602438774)*x[1]+(-0.947874263512)*x[2]**o+(0.0840394012229)*x[2]
-        arg[1,0,2,1]=(-0.237479805943)*x[0]**o+(-0.89993757244)*x[0]+(-0.759650487895)*x[1]**o+(-0.807139164373)*x[1]+(-0.377055204014)*x[2]**o+(-0.57656201026)*x[2]
-        arg[1,1,0,0]=(-0.543719871098)*x[0]**o+(-0.726308160246)*x[0]+(0.821244616742)*x[1]**o+(0.718112961487)*x[1]+(-0.655445553192)*x[2]**o+(-0.599104608292)*x[2]
-        arg[1,1,0,1]=(-0.2624625471)*x[0]**o+(0.85250071151)*x[0]+(-0.665066081561)*x[1]**o+(-0.566502138196)*x[1]+(-0.572858653628)*x[2]**o+(-0.862890633323)*x[2]
-        arg[1,1,1,0]=(0.88003513115)*x[0]**o+(-0.0150959972442)*x[0]+(-0.698880737368)*x[1]**o+(-0.236909810427)*x[1]+(-0.721315930706)*x[2]**o+(-0.219894530829)*x[2]
-        arg[1,1,1,1]=(0.177746615088)*x[0]**o+(0.205790814183)*x[0]+(-0.216021190604)*x[1]**o+(0.384079010991)*x[1]+(0.61634008905)*x[2]**o+(0.940900776108)*x[2]
-        arg[1,1,2,0]=(0.889070121473)*x[0]**o+(0.68131533527)*x[0]+(0.709207182081)*x[1]**o+(-0.765184991252)*x[1]+(0.506328018952)*x[2]**o+(-0.46041174473)*x[2]
-        arg[1,1,2,1]=(0.951736215954)*x[0]**o+(-0.147499702642)*x[0]+(0.60348358384)*x[1]**o+(0.777404433567)*x[1]+(-0.482441452679)*x[2]**o+(0.714835256434)*x[2]
-        arg[1,2,0,0]=(-0.954701036263)*x[0]**o+(-0.360901887475)*x[0]+(-0.644285028623)*x[1]**o+(0.169271524632)*x[1]+(-0.687047203668)*x[2]**o+(0.205115312108)*x[2]
-        arg[1,2,0,1]=(0.256489282842)*x[0]**o+(0.17406448362)*x[0]+(0.97500243816)*x[1]**o+(0.614577997602)*x[1]+(0.0537536804583)*x[2]**o+(-0.211963274032)*x[2]
-        arg[1,2,1,0]=(-0.94015914517)*x[0]**o+(0.169982490736)*x[0]+(0.482085495724)*x[1]**o+(-0.556994404153)*x[1]+(-0.809311296883)*x[2]**o+(0.719907503024)*x[2]
-        arg[1,2,1,1]=(0.367156421931)*x[0]**o+(0.489648825153)*x[0]+(-0.0398225517816)*x[1]**o+(-0.495726296032)*x[1]+(0.359374061053)*x[2]**o+(0.231991952482)*x[2]
-        arg[1,2,2,0]=(-0.812516694781)*x[0]**o+(-0.631181257391)*x[0]+(-0.723784471687)*x[1]**o+(0.178976877342)*x[1]+(-0.629293758013)*x[2]**o+(-0.313897724608)*x[2]
-        arg[1,2,2,1]=(-0.497461944186)*x[0]**o+(0.268998525103)*x[0]+(-0.478017492026)*x[1]**o+(0.026395792841)*x[1]+(0.581256386137)*x[2]**o+(-0.476961644324)*x[2]
-        arg[1,3,0,0]=(-0.227077550639)*x[0]**o+(0.400407424161)*x[0]+(-0.53529812303)*x[1]**o+(-0.418594299853)*x[1]+(-0.195190916346)*x[2]**o+(-0.624284483774)*x[2]
-        arg[1,3,0,1]=(0.822091021645)*x[0]**o+(-0.31133140026)*x[0]+(0.0665130965049)*x[1]**o+(0.596697216047)*x[1]+(0.466195828646)*x[2]**o+(-0.477988391299)*x[2]
-        arg[1,3,1,0]=(-0.0341577310045)*x[0]**o+(-0.77936644392)*x[0]+(0.954811382784)*x[1]**o+(0.837374830631)*x[1]+(0.738992234768)*x[2]**o+(-0.501187788985)*x[2]
-        arg[1,3,1,1]=(-0.102867224088)*x[0]**o+(0.00829793194765)*x[0]+(0.081790556957)*x[1]**o+(-0.779351210472)*x[1]+(-0.735321115716)*x[2]**o+(0.126919542418)*x[2]
-        arg[1,3,2,0]=(0.556301076488)*x[0]**o+(0.0923434629749)*x[0]+(-0.191048735713)*x[1]**o+(-0.218833028687)*x[1]+(-0.088867516146)*x[2]**o+(-0.247214200389)*x[2]
-        arg[1,3,2,1]=(0.888436531887)*x[0]**o+(-0.79225495914)*x[0]+(0.0154788262219)*x[1]**o+(-0.210622890864)*x[1]+(0.782629134632)*x[2]**o+(0.350772185791)*x[2]
-        arg[1,4,0,0]=(0.651898073685)*x[0]**o+(-0.84098616689)*x[0]+(0.674088959443)*x[1]**o+(-0.658824952898)*x[1]+(-0.423551541558)*x[2]**o+(0.985098530356)*x[2]
-        arg[1,4,0,1]=(-0.149187282052)*x[0]**o+(0.0880370482988)*x[0]+(0.780809276595)*x[1]**o+(-0.610833366472)*x[1]+(0.794946384304)*x[2]**o+(-0.817031796429)*x[2]
-        arg[1,4,1,0]=(-0.285938055108)*x[0]**o+(-0.106165154734)*x[0]+(-0.948376845189)*x[1]**o+(0.874607682056)*x[1]+(-0.100051825909)*x[2]**o+(-0.483640835026)*x[2]
-        arg[1,4,1,1]=(-0.34015136472)*x[0]**o+(0.991331180352)*x[0]+(-0.925796518928)*x[1]**o+(-0.872775691287)*x[1]+(0.953898056819)*x[2]**o+(0.985025365955)*x[2]
-        arg[1,4,2,0]=(-0.464687865356)*x[0]**o+(-0.439271850879)*x[0]+(0.302716649876)*x[1]**o+(0.235186289965)*x[1]+(0.672062761925)*x[2]**o+(-0.793689262392)*x[2]
-        arg[1,4,2,1]=(-0.777967458564)*x[0]**o+(0.0565891925223)*x[0]+(-0.27539733623)*x[1]**o+(0.252329868046)*x[1]+(-0.269529792944)*x[2]**o+(-0.953051723483)*x[2]
-        arg[2,0,0,0]=(0.665321754689)*x[0]**o+(0.00639681939987)*x[0]+(0.262193891905)*x[1]**o+(-0.312800735151)*x[1]+(0.8403244871)*x[2]**o+(-0.607084328204)*x[2]
-        arg[2,0,0,1]=(0.876435018569)*x[0]**o+(-0.388250784543)*x[0]+(-0.799866349878)*x[1]**o+(0.114896594902)*x[1]+(-0.438064877186)*x[2]**o+(-0.458871344685)*x[2]
-        arg[2,0,1,0]=(-0.344552466761)*x[0]**o+(0.967217640605)*x[0]+(-0.00183230845245)*x[1]**o+(-0.861206591247)*x[1]+(0.795588257851)*x[2]**o+(-0.333607767932)*x[2]
-        arg[2,0,1,1]=(0.841069648591)*x[0]**o+(0.580162460873)*x[0]+(-0.0277035983747)*x[1]**o+(-0.404616536792)*x[1]+(-0.403195438454)*x[2]**o+(-0.202877947947)*x[2]
-        arg[2,0,2,0]=(0.192691357169)*x[0]**o+(-0.519968251714)*x[0]+(-0.575397578091)*x[1]**o+(-0.029378989829)*x[1]+(-0.958861195684)*x[2]**o+(0.848705509543)*x[2]
-        arg[2,0,2,1]=(0.556616365284)*x[0]**o+(0.679993071506)*x[0]+(-0.800652717274)*x[1]**o+(0.979182847258)*x[1]+(-0.501953582042)*x[2]**o+(0.127003985335)*x[2]
-        arg[2,1,0,0]=(0.947750123445)*x[0]**o+(-0.0350691553359)*x[0]+(0.0650485999092)*x[1]**o+(-0.131216537555)*x[1]+(0.888782559831)*x[2]**o+(0.0338703818654)*x[2]
-        arg[2,1,0,1]=(0.962918564559)*x[0]**o+(-0.119367421389)*x[0]+(0.43003549616)*x[1]**o+(-0.097883763913)*x[1]+(0.230422206305)*x[2]**o+(0.187273479711)*x[2]
-        arg[2,1,1,0]=(-0.549909211973)*x[0]**o+(0.263443098451)*x[0]+(-0.476703606205)*x[1]**o+(0.216159301182)*x[1]+(-0.561829938323)*x[2]**o+(0.943016557203)*x[2]
-        arg[2,1,1,1]=(0.382867749635)*x[0]**o+(0.404317006935)*x[0]+(0.786117847428)*x[1]**o+(-0.80719258612)*x[1]+(0.471144889777)*x[2]**o+(0.6478813349)*x[2]
-        arg[2,1,2,0]=(0.355742024596)*x[0]**o+(-0.728812391059)*x[0]+(0.766039604734)*x[1]**o+(-0.532629598363)*x[1]+(-0.518284303077)*x[2]**o+(-0.972348067947)*x[2]
-        arg[2,1,2,1]=(-0.882334243081)*x[0]**o+(-0.0940633993231)*x[0]+(-0.00166643832426)*x[1]**o+(-0.971243725495)*x[1]+(-0.0422614083707)*x[2]**o+(-0.547881520447)*x[2]
-        arg[2,2,0,0]=(0.372164678051)*x[0]**o+(-0.0644361811234)*x[0]+(0.886078780084)*x[1]**o+(-0.459054628604)*x[1]+(-0.983880547097)*x[2]**o+(-0.669749873181)*x[2]
-        arg[2,2,0,1]=(0.126650330827)*x[0]**o+(0.375111974063)*x[0]+(-0.759797654917)*x[1]**o+(-0.663216091322)*x[1]+(-0.683191373782)*x[2]**o+(-0.607048449469)*x[2]
-        arg[2,2,1,0]=(-0.805920040628)*x[0]**o+(-0.0144685877057)*x[0]+(0.00875222056291)*x[1]**o+(-0.110000267929)*x[1]+(-0.478201664476)*x[2]**o+(-0.0537439708493)*x[2]
-        arg[2,2,1,1]=(-0.550624517803)*x[0]**o+(0.570407090431)*x[0]+(0.661026826148)*x[1]**o+(0.905189813242)*x[1]+(0.00707531661352)*x[2]**o+(0.711072343064)*x[2]
-        arg[2,2,2,0]=(-0.644276976064)*x[0]**o+(-0.151665972531)*x[0]+(-0.645369927259)*x[1]**o+(0.915967227715)*x[1]+(-0.211750817665)*x[2]**o+(-0.596646212118)*x[2]
-        arg[2,2,2,1]=(0.564688999107)*x[0]**o+(0.635094410913)*x[0]+(0.281863287848)*x[1]**o+(-0.927529659408)*x[1]+(0.581071087484)*x[2]**o+(0.164399277305)*x[2]
-        arg[2,3,0,0]=(0.64754765253)*x[0]**o+(0.176693707964)*x[0]+(0.172801737347)*x[1]**o+(-0.769408746261)*x[1]+(-0.176026486601)*x[2]**o+(0.187304474822)*x[2]
-        arg[2,3,0,1]=(0.365315558093)*x[0]**o+(0.888853264239)*x[0]+(0.0541759434362)*x[1]**o+(0.241489226711)*x[1]+(0.441822201832)*x[2]**o+(0.075541840076)*x[2]
-        arg[2,3,1,0]=(-0.984940830356)*x[0]**o+(0.521596714942)*x[0]+(-0.933671223761)*x[1]**o+(-0.132907654205)*x[1]+(-0.225804727932)*x[2]**o+(0.987334445626)*x[2]
-        arg[2,3,1,1]=(-0.785516613303)*x[0]**o+(0.0324126413814)*x[0]+(-0.084233004699)*x[1]**o+(0.45131442059)*x[1]+(0.36498759129)*x[2]**o+(0.417036982561)*x[2]
-        arg[2,3,2,0]=(-0.310575473358)*x[0]**o+(-0.769219454218)*x[0]+(-0.263431454577)*x[1]**o+(0.474143448264)*x[1]+(-0.490633240671)*x[2]**o+(0.435609988849)*x[2]
-        arg[2,3,2,1]=(0.230960030802)*x[0]**o+(-0.480593443732)*x[0]+(0.547888534735)*x[1]**o+(-0.818842709599)*x[1]+(-0.857141410253)*x[2]**o+(-0.287898487847)*x[2]
-        arg[2,4,0,0]=(-0.811008715357)*x[0]**o+(-0.608505768579)*x[0]+(-0.117642307757)*x[1]**o+(-0.658229045784)*x[1]+(0.246542958193)*x[2]**o+(-0.42783248265)*x[2]
-        arg[2,4,0,1]=(0.817994599948)*x[0]**o+(0.394931907893)*x[0]+(-0.273993145403)*x[1]**o+(0.9572397013)*x[1]+(0.101025833331)*x[2]**o+(-0.925874548613)*x[2]
-        arg[2,4,1,0]=(-0.626152000269)*x[0]**o+(0.821322294557)*x[0]+(0.543761841392)*x[1]**o+(0.112341361443)*x[1]+(-0.395657376418)*x[2]**o+(0.815481187683)*x[2]
-        arg[2,4,1,1]=(0.97134483493)*x[0]**o+(0.303341541402)*x[0]+(-0.270102237344)*x[1]**o+(-0.982452271352)*x[1]+(0.435568243011)*x[2]**o+(-0.200051496445)*x[2]
-        arg[2,4,2,0]=(-0.827528679064)*x[0]**o+(-0.559447627475)*x[0]+(-0.867397899368)*x[1]**o+(0.915539157819)*x[1]+(0.370118757042)*x[2]**o+(0.578366179408)*x[2]
-        arg[2,4,2,1]=(0.685882920875)*x[0]**o+(0.830016468585)*x[0]+(-0.603607199824)*x[1]**o+(0.888619939961)*x[1]+(-0.264173896988)*x[2]**o+(-0.588065135532)*x[2]
-        arg[3,0,0,0]=(0.480000662344)*x[0]**o+(-0.240072007989)*x[0]+(0.252669294205)*x[1]**o+(-0.657466732916)*x[1]+(0.945149322572)*x[2]**o+(0.340592627149)*x[2]
-        arg[3,0,0,1]=(-0.819956304014)*x[0]**o+(0.910408628621)*x[0]+(-0.875714560314)*x[1]**o+(0.653323198674)*x[1]+(0.910127896386)*x[2]**o+(0.21382952806)*x[2]
-        arg[3,0,1,0]=(0.736655857249)*x[0]**o+(-0.982636511328)*x[0]+(0.747965385081)*x[1]**o+(-0.952056699676)*x[1]+(0.143168283422)*x[2]**o+(0.891386576579)*x[2]
-        arg[3,0,1,1]=(0.615723453617)*x[0]**o+(0.57376968582)*x[0]+(0.766802940979)*x[1]**o+(-0.294849095727)*x[1]+(-0.26718123792)*x[2]**o+(-0.979175148343)*x[2]
-        arg[3,0,2,0]=(-0.299975789693)*x[0]**o+(-0.941879795797)*x[0]+(-0.332633604206)*x[1]**o+(0.887589360228)*x[1]+(0.570321438438)*x[2]**o+(0.107180499249)*x[2]
-        arg[3,0,2,1]=(-0.77479605873)*x[0]**o+(0.928359807986)*x[0]+(-0.144170026638)*x[1]**o+(0.533835316696)*x[1]+(0.183938136052)*x[2]**o+(-0.87336340483)*x[2]
-        arg[3,1,0,0]=(-0.121858163593)*x[0]**o+(-0.971122306623)*x[0]+(-0.351891554168)*x[1]**o+(-0.989754547278)*x[1]+(0.48106592456)*x[2]**o+(0.750009716044)*x[2]
-        arg[3,1,0,1]=(-0.332320017719)*x[0]**o+(0.229814969323)*x[0]+(0.950038106614)*x[1]**o+(-0.364221636516)*x[1]+(-0.842684764717)*x[2]**o+(-0.430003876831)*x[2]
-        arg[3,1,1,0]=(0.1036461168)*x[0]**o+(0.243047542195)*x[0]+(-0.189881740385)*x[1]**o+(-0.646948186795)*x[1]+(-0.246523431838)*x[2]**o+(0.0363222140239)*x[2]
-        arg[3,1,1,1]=(0.629747493968)*x[0]**o+(0.257110968013)*x[0]+(-0.594332699815)*x[1]**o+(-0.74041867705)*x[1]+(0.656583120031)*x[2]**o+(0.392776534802)*x[2]
-        arg[3,1,2,0]=(0.997368307137)*x[0]**o+(-0.709004475665)*x[0]+(-0.379447862403)*x[1]**o+(-0.368700793823)*x[1]+(0.293673648471)*x[2]**o+(-0.555545691082)*x[2]
-        arg[3,1,2,1]=(-0.323027033928)*x[0]**o+(0.804640557762)*x[0]+(-0.199434780533)*x[1]**o+(0.604194682736)*x[1]+(0.945516011113)*x[2]**o+(-0.831838977373)*x[2]
-        arg[3,2,0,0]=(0.255071922458)*x[0]**o+(0.261075290259)*x[0]+(0.198792431961)*x[1]**o+(0.987681568369)*x[1]+(-0.257626079249)*x[2]**o+(0.817801578613)*x[2]
-        arg[3,2,0,1]=(-0.732615916833)*x[0]**o+(0.8114347023)*x[0]+(0.308896981216)*x[1]**o+(-0.164981244979)*x[1]+(0.724411853266)*x[2]**o+(-0.647969863039)*x[2]
-        arg[3,2,1,0]=(0.126755528121)*x[0]**o+(0.0203968097627)*x[0]+(0.350888385037)*x[1]**o+(0.765584878761)*x[1]+(0.43521215637)*x[2]**o+(0.5821821143)*x[2]
-        arg[3,2,1,1]=(0.795956472753)*x[0]**o+(0.363631111688)*x[0]+(-0.296417527594)*x[1]**o+(-0.0927953540926)*x[1]+(0.396041397741)*x[2]**o+(0.43932000066)*x[2]
-        arg[3,2,2,0]=(-0.926754341344)*x[0]**o+(-0.688414966522)*x[0]+(-0.660984101932)*x[1]**o+(-0.627883344982)*x[1]+(0.403036784646)*x[2]**o+(0.818277068314)*x[2]
-        arg[3,2,2,1]=(-0.358921307079)*x[0]**o+(0.636847962491)*x[0]+(-0.510050460541)*x[1]**o+(-0.758190944228)*x[1]+(-0.0319326931965)*x[2]**o+(-0.643422203077)*x[2]
-        arg[3,3,0,0]=(-0.930730482483)*x[0]**o+(-0.883991363505)*x[0]+(0.156751809769)*x[1]**o+(0.669949596594)*x[1]+(0.697840698407)*x[2]**o+(0.721622061073)*x[2]
-        arg[3,3,0,1]=(0.108814498453)*x[0]**o+(-0.164024398834)*x[0]+(-0.172084798233)*x[1]**o+(0.031530303081)*x[1]+(-0.985663868487)*x[2]**o+(-0.290224642955)*x[2]
-        arg[3,3,1,0]=(0.690575802875)*x[0]**o+(-0.720428203968)*x[0]+(-0.837111899789)*x[1]**o+(0.140256279088)*x[1]+(0.532813462778)*x[2]**o+(-0.557885762558)*x[2]
-        arg[3,3,1,1]=(-0.0785388159589)*x[0]**o+(-0.40595445804)*x[0]+(-0.691255332383)*x[1]**o+(0.54108326284)*x[1]+(0.737684932212)*x[2]**o+(0.423508847197)*x[2]
-        arg[3,3,2,0]=(-0.589838770269)*x[0]**o+(-0.557133995504)*x[0]+(-0.297626023793)*x[1]**o+(-0.511809000987)*x[1]+(-0.933566600332)*x[2]**o+(-0.21434993446)*x[2]
-        arg[3,3,2,1]=(0.19892263441)*x[0]**o+(0.633952342142)*x[0]+(0.0179400729177)*x[1]**o+(0.154020947355)*x[1]+(-0.620690264897)*x[2]**o+(0.524853027077)*x[2]
-        arg[3,4,0,0]=(0.475231682303)*x[0]**o+(-0.48174419167)*x[0]+(-0.100854189221)*x[1]**o+(0.818166518054)*x[1]+(-0.922566309657)*x[2]**o+(-0.498745068755)*x[2]
-        arg[3,4,0,1]=(0.613982633884)*x[0]**o+(-0.947323459945)*x[0]+(0.17395204013)*x[1]**o+(0.929669087853)*x[1]+(-0.617278089466)*x[2]**o+(0.900537470392)*x[2]
-        arg[3,4,1,0]=(-0.403633510324)*x[0]**o+(0.954097943555)*x[0]+(-0.463422043607)*x[1]**o+(0.843916487223)*x[1]+(-0.5955912138)*x[2]**o+(-0.765444657727)*x[2]
-        arg[3,4,1,1]=(-0.663412886802)*x[0]**o+(-0.547440885077)*x[0]+(-0.479993570508)*x[1]**o+(0.0620303034445)*x[1]+(-0.653759917895)*x[2]**o+(-0.681004441743)*x[2]
-        arg[3,4,2,0]=(-0.994529375243)*x[0]**o+(0.546983479745)*x[0]+(0.17913912435)*x[1]**o+(0.660366383627)*x[1]+(0.0747943517387)*x[2]**o+(-0.321063660452)*x[2]
-        arg[3,4,2,1]=(-0.538074654323)*x[0]**o+(-0.81330034965)*x[0]+(0.660614896398)*x[1]**o+(-0.918192909648)*x[1]+(0.553635166581)*x[2]**o+(-0.918131802189)*x[2]
-        ref[0,0,0,0]=(-0.321539504757)/(o+1.)+(0.762866286444)+(-0.793251694335)*0.5**o
-        ref[0,0,0,1]=(-0.264812286159)/(o+1.)+(-0.15293893368)+(-0.624206604764)*0.5**o
-        ref[0,0,1,0]=(0.54441377247)/(o+1.)+(0.214067163116)+(0.115999561481)*0.5**o
-        ref[0,0,1,1]=(1.50036854956)/(o+1.)+(0.673819079573)+(-0.972466831671)*0.5**o
-        ref[0,0,2,0]=(0.687874396856)/(o+1.)+(-0.986502459901)+(0.708180260094)*0.5**o
-        ref[0,0,2,1]=(0.793527041633)/(o+1.)+(-0.259940301856)+(0.0282615573045)*0.5**o
-        ref[0,1,0,0]=(-1.25436610505)/(o+1.)+(-0.224984055664)+(0.231621820235)*0.5**o
-        ref[0,1,0,1]=(0.891022819882)/(o+1.)+(-0.165060941565)+(0.114056801155)*0.5**o
-        ref[0,1,1,0]=(-0.833444470649)/(o+1.)+(-0.322644910601)+(-0.973115195017)*0.5**o
-        ref[0,1,1,1]=(-0.189799709023)/(o+1.)+(-0.242650862468)+(-0.304758579369)*0.5**o
-        ref[0,1,2,0]=(-1.39857111894)/(o+1.)+(-0.14133379247)+(0.0923844967157)*0.5**o
-        ref[0,1,2,1]=(1.03702218206)/(o+1.)+(-0.181927579186)+(0.793568921835)*0.5**o
-        ref[0,2,0,0]=(-1.11962316818)/(o+1.)+(0.654627255004)+(0.570673248048)*0.5**o
-        ref[0,2,0,1]=(0.085812863531)/(o+1.)+(0.17639811125)+(0.299061155215)*0.5**o
-        ref[0,2,1,0]=(-1.26466090832)/(o+1.)+(0.618506300342)+(0.694725244159)*0.5**o
-        ref[0,2,1,1]=(0.181495495342)/(o+1.)+(0.818577989479)+(-0.83896527178)*0.5**o
-        ref[0,2,2,0]=(0.867512484289)/(o+1.)+(0.353365700269)+(0.2228052704)*0.5**o
-        ref[0,2,2,1]=(0.618350374002)/(o+1.)+(-0.418609375405)+(0.63141216243)*0.5**o
-        ref[0,3,0,0]=(-0.801998626232)/(o+1.)+(-0.302573026989)+(0.00698107166168)*0.5**o
-        ref[0,3,0,1]=(0.414118735868)/(o+1.)+(0.103407742435)+(0.243423742325)*0.5**o
-        ref[0,3,1,0]=(-0.129735888575)/(o+1.)+(0.51412655284)+(-0.106629554393)*0.5**o
-        ref[0,3,1,1]=(0.0886696480864)/(o+1.)+(0.287824302591)+(0.375143733111)*0.5**o
-        ref[0,3,2,0]=(-0.746501172831)/(o+1.)+(-0.389518072046)+(0.955685455438)*0.5**o
-        ref[0,3,2,1]=(-1.06628341794)/(o+1.)+(-0.147429422878)+(0.353654445481)*0.5**o
-        ref[0,4,0,0]=(-0.174512962078)/(o+1.)+(-0.023500931215)+(0.974759684151)*0.5**o
-        ref[0,4,0,1]=(1.18079051113)/(o+1.)+(0.980823290345)+(-0.0799922241539)*0.5**o
-        ref[0,4,1,0]=(-1.19690096085)/(o+1.)+(0.173437389579)+(0.532633280629)*0.5**o
-        ref[0,4,1,1]=(1.11279531673)/(o+1.)+(-0.763621970064)+(-0.353243658293)*0.5**o
-        ref[0,4,2,0]=(-0.819102364613)/(o+1.)+(0.326676095071)+(-0.720840869801)*0.5**o
-        ref[0,4,2,1]=(-0.397779896209)/(o+1.)+(-0.677806011795)+(-0.179073400214)*0.5**o
-        ref[1,0,0,0]=(0.00277094815158)/(o+1.)+(0.301845054648)+(-0.384011553333)*0.5**o
-        ref[1,0,0,1]=(1.22422728891)/(o+1.)+(-0.594910516315)+(-0.808211570649)*0.5**o
-        ref[1,0,1,0]=(0.869946029655)/(o+1.)+(0.308501276384)+(0.0404274840294)*0.5**o
-        ref[1,0,1,1]=(1.63718264119)/(o+1.)+(0.76013279253)+(0.302394139901)*0.5**o
-        ref[1,0,2,0]=(-0.0317278448724)/(o+1.)+(-0.118813696855)+(-0.981981997649)*0.5**o
-        ref[1,0,2,1]=(-1.13670569191)/(o+1.)+(-1.14181937354)+(-0.237479805943)*0.5**o
-        ref[1,1,0,0]=(0.16579906355)/(o+1.)+(-0.303649903525)+(-0.543719871098)*0.5**o
-        ref[1,1,0,1]=(-1.23792473519)/(o+1.)+(-0.288446030005)+(-0.2624625471)*0.5**o
-        ref[1,1,1,0]=(-1.42019666807)/(o+1.)+(-0.23595016925)+(0.88003513115)*0.5**o
-        ref[1,1,1,1]=(0.400318898446)/(o+1.)+(0.765385300641)+(0.177746615088)*0.5**o
-        ref[1,1,2,0]=(1.21553520103)/(o+1.)+(-0.272140700356)+(0.889070121473)*0.5**o
-        ref[1,1,2,1]=(0.121042131161)/(o+1.)+(0.672369993679)+(0.951736215954)*0.5**o
-        ref[1,2,0,0]=(-1.33133223229)/(o+1.)+(0.0067424746325)+(-0.954701036263)*0.5**o
-        ref[1,2,0,1]=(1.02875611862)/(o+1.)+(0.288339603595)+(0.256489282842)*0.5**o
-        ref[1,2,1,0]=(-0.32722580116)/(o+1.)+(0.166447794803)+(-0.94015914517)*0.5**o
-        ref[1,2,1,1]=(0.319551509271)/(o+1.)+(0.112957240802)+(0.367156421931)*0.5**o
-        ref[1,2,2,0]=(-1.3530782297)/(o+1.)+(-0.383051052329)+(-0.812516694781)*0.5**o
-        ref[1,2,2,1]=(0.103238894111)/(o+1.)+(-0.09078366319)+(-0.497461944186)*0.5**o
-        ref[1,3,0,0]=(-0.730489039376)/(o+1.)+(-0.321235679733)+(-0.227077550639)*0.5**o
-        ref[1,3,0,1]=(0.532708925151)/(o+1.)+(-0.0963112877562)+(0.822091021645)*0.5**o
-        ref[1,3,1,0]=(1.69380361755)/(o+1.)+(-0.221589701137)+(-0.0341577310045)*0.5**o
-        ref[1,3,1,1]=(-0.653530558759)/(o+1.)+(-0.322066868053)+(-0.102867224088)*0.5**o
-        ref[1,3,2,0]=(-0.279916251859)/(o+1.)+(-0.18685188305)+(0.556301076488)*0.5**o
-        ref[1,3,2,1]=(0.798107960854)/(o+1.)+(-0.326052832107)+(0.888436531887)*0.5**o
-        ref[1,4,0,0]=(0.250537417885)/(o+1.)+(-0.257356294716)+(0.651898073685)*0.5**o
-        ref[1,4,0,1]=(1.5757556609)/(o+1.)+(-0.669914057301)+(-0.149187282052)*0.5**o
-        ref[1,4,1,0]=(-1.0484286711)/(o+1.)+(0.142400846148)+(-0.285938055108)*0.5**o
-        ref[1,4,1,1]=(0.028101537891)/(o+1.)+(0.55179042751)+(-0.34015136472)*0.5**o
-        ref[1,4,2,0]=(0.974779411801)/(o+1.)+(-0.498887411653)+(-0.464687865356)*0.5**o
-        ref[1,4,2,1]=(-0.544927129174)/(o+1.)+(-0.322066331457)+(-0.777967458564)*0.5**o
-        ref[2,0,0,0]=(1.102518379)/(o+1.)+(-0.456744121978)+(0.665321754689)*0.5**o
-        ref[2,0,0,1]=(-1.23793122706)/(o+1.)+(-0.366112767163)+(0.876435018569)*0.5**o
-        ref[2,0,1,0]=(0.793755949398)/(o+1.)+(-0.113798359287)+(-0.344552466761)*0.5**o
-        ref[2,0,1,1]=(-0.430899036829)/(o+1.)+(-0.0136660119329)+(0.841069648591)*0.5**o
-        ref[2,0,2,0]=(-1.53425877377)/(o+1.)+(0.149679134)+(0.192691357169)*0.5**o
-        ref[2,0,2,1]=(-1.30260629932)/(o+1.)+(0.89308995205)+(0.556616365284)*0.5**o
-        ref[2,1,0,0]=(0.95383115974)/(o+1.)+(-0.0662076555126)+(0.947750123445)*0.5**o
-        ref[2,1,0,1]=(0.660457702465)/(o+1.)+(-0.0149888527952)+(0.962918564559)*0.5**o
-        ref[2,1,1,0]=(-1.03853354453)/(o+1.)+(0.711309478418)+(-0.549909211973)*0.5**o
-        ref[2,1,1,1]=(1.25726273721)/(o+1.)+(0.122502877857)+(0.382867749635)*0.5**o
-        ref[2,1,2,0]=(0.247755301657)/(o+1.)+(-1.11689502868)+(0.355742024596)*0.5**o
-        ref[2,1,2,1]=(-0.043927846695)/(o+1.)+(-0.806594322632)+(-0.882334243081)*0.5**o
-        ref[2,2,0,0]=(-0.0978017670124)/(o+1.)+(-0.596620341454)+(0.372164678051)*0.5**o
-        ref[2,2,0,1]=(-1.4429890287)/(o+1.)+(-0.447576283364)+(0.126650330827)*0.5**o
-        ref[2,2,1,0]=(-0.469449443913)/(o+1.)+(-0.0891064132419)+(-0.805920040628)*0.5**o
-        ref[2,2,1,1]=(0.668102142762)/(o+1.)+(1.09333462337)+(-0.550624517803)*0.5**o
-        ref[2,2,2,0]=(-0.857120744924)/(o+1.)+(0.0838275215328)+(-0.644276976064)*0.5**o
-        ref[2,2,2,1]=(0.862934375332)/(o+1.)+(-0.0640179855954)+(0.564688999107)*0.5**o
-        ref[2,3,0,0]=(-0.00322474925369)/(o+1.)+(-0.202705281737)+(0.64754765253)*0.5**o
-        ref[2,3,0,1]=(0.495998145268)/(o+1.)+(0.602942165513)+(0.365315558093)*0.5**o
-        ref[2,3,1,0]=(-1.15947595169)/(o+1.)+(0.688011753181)+(-0.984940830356)*0.5**o
-        ref[2,3,1,1]=(0.280754586591)/(o+1.)+(0.450382022266)+(-0.785516613303)*0.5**o
-        ref[2,3,2,0]=(-0.754064695248)/(o+1.)+(0.0702669914474)+(-0.310575473358)*0.5**o
-        ref[2,3,2,1]=(-0.309252875518)/(o+1.)+(-0.793667320589)+(0.230960030802)*0.5**o
-        ref[2,4,0,0]=(0.128900650436)/(o+1.)+(-0.847283648506)+(-0.811008715357)*0.5**o
-        ref[2,4,0,1]=(-0.172967312072)/(o+1.)+(0.21314853029)+(0.817994599948)*0.5**o
-        ref[2,4,1,0]=(0.148104464974)/(o+1.)+(0.874572421841)+(-0.626152000269)*0.5**o
-        ref[2,4,1,1]=(0.165466005667)/(o+1.)+(-0.439581113198)+(0.97134483493)*0.5**o
-        ref[2,4,2,0]=(-0.497279142326)/(o+1.)+(0.467228854876)+(-0.827528679064)*0.5**o
-        ref[2,4,2,1]=(-0.867781096812)/(o+1.)+(0.565285636507)+(0.685882920875)*0.5**o
-        ref[3,0,0,0]=(1.19781861678)/(o+1.)+(-0.278473056878)+(0.480000662344)*0.5**o
-        ref[3,0,0,1]=(0.0344133360711)/(o+1.)+(0.888780677678)+(-0.819956304014)*0.5**o
-        ref[3,0,1,0]=(0.891133668503)/(o+1.)+(-0.521653317213)+(0.736655857249)*0.5**o
-        ref[3,0,1,1]=(0.499621703059)/(o+1.)+(-0.350127279125)+(0.615723453617)*0.5**o
-        ref[3,0,2,0]=(0.237687834232)/(o+1.)+(0.0264450318399)+(-0.299975789693)*0.5**o
-        ref[3,0,2,1]=(0.0397681094138)/(o+1.)+(0.294415859926)+(-0.77479605873)*0.5**o
-        ref[3,1,0,0]=(0.129174370391)/(o+1.)+(-0.605433568929)+(-0.121858163593)*0.5**o
-        ref[3,1,0,1]=(0.107353341897)/(o+1.)+(-0.282205272012)+(-0.332320017719)*0.5**o
-        ref[3,1,1,0]=(-0.436405172223)/(o+1.)+(-0.183789215288)+(0.1036461168)*0.5**o
-        ref[3,1,1,1]=(0.0622504202157)/(o+1.)+(-0.0452655871179)+(0.629747493968)*0.5**o
-        ref[3,1,2,0]=(-0.0857742139322)/(o+1.)+(-0.816625480285)+(0.997368307137)*0.5**o
-        ref[3,1,2,1]=(0.746081230581)/(o+1.)+(0.288498131562)+(-0.323027033928)*0.5**o
-        ref[3,2,0,0]=(-0.0588336472879)/(o+1.)+(1.03327921862)+(0.255071922458)*0.5**o
-        ref[3,2,0,1]=(1.03330883448)/(o+1.)+(-0.000758202858916)+(-0.732615916833)*0.5**o
-        ref[3,2,1,0]=(0.786100541406)/(o+1.)+(0.684081901412)+(0.126755528121)*0.5**o
-        ref[3,2,1,1]=(0.099623870147)/(o+1.)+(0.355077879128)+(0.795956472753)*0.5**o
-        ref[3,2,2,0]=(-0.257947317287)/(o+1.)+(-0.249010621595)+(-0.926754341344)*0.5**o
-        ref[3,2,2,1]=(-0.541983153738)/(o+1.)+(-0.382382592407)+(-0.358921307079)*0.5**o
-        ref[3,3,0,0]=(0.854592508176)/(o+1.)+(0.253790147081)+(-0.930730482483)*0.5**o
-        ref[3,3,0,1]=(-1.15774866672)/(o+1.)+(-0.211359369354)+(0.108814498453)*0.5**o
-        ref[3,3,1,0]=(-0.304298437011)/(o+1.)+(-0.569028843719)+(0.690575802875)*0.5**o
-        ref[3,3,1,1]=(0.0464295998283)/(o+1.)+(0.279318825998)+(-0.0785388159589)*0.5**o
-        ref[3,3,2,0]=(-1.23119262412)/(o+1.)+(-0.641646465476)+(-0.589838770269)*0.5**o
-        ref[3,3,2,1]=(-0.60275019198)/(o+1.)+(0.656413158287)+(0.19892263441)*0.5**o
-        ref[3,4,0,0]=(-1.02342049888)/(o+1.)+(-0.0811613711857)+(0.475231682303)*0.5**o
-        ref[3,4,0,1]=(-0.443326049337)/(o+1.)+(0.44144154915)+(0.613982633884)*0.5**o
-        ref[3,4,1,0]=(-1.05901325741)/(o+1.)+(0.516284886526)+(-0.403633510324)*0.5**o
-        ref[3,4,1,1]=(-1.1337534884)/(o+1.)+(-0.583207511688)+(-0.663412886802)*0.5**o
-        ref[3,4,2,0]=(0.253933476088)/(o+1.)+(0.44314310146)+(-0.994529375243)*0.5**o
-        ref[3,4,2,1]=(1.21425006298)/(o+1.)+(-1.32481253074)+(-0.538074654323)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.441098788712)*x[0]**o+(0.082953252724)*x[0]+(-0.97005044508)*x[1]**o+(0.928239302707)*x[1]
-        ref=(-0.97005044508)/(o+1.)+(0.505596277715)+(-0.441098788712)*0.5**o
-      else:
-        arg=(0.384995424392)*x[0]**o+(0.999298118235)*x[0]+(0.144745460948)*x[1]**o+(0.0545198589076)*x[1]+(-0.773375797864)*x[2]**o+(0.145524911495)*x[2]
-        ref=(-0.628630336917)/(o+1.)+(0.599671444318)+(0.384995424392)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(0.0745889108767)*x[0]**o+(-0.694812761318)*x[0]+(-0.357791726239)*x[1]**o+(-0.785448350489)*x[1]
-        arg[1]=(0.436006633056)*x[0]**o+(-0.797943632034)*x[0]+(-0.903321835716)*x[1]**o+(0.299527545727)*x[1]
-        ref[0]=(-0.357791726239)/(o+1.)+(-0.740130555904)+(0.0745889108767)*0.5**o
-        ref[1]=(-0.903321835716)/(o+1.)+(-0.249208043154)+(0.436006633056)*0.5**o
-      else:
-        arg[0]=(-0.292048194246)*x[0]**o+(-0.612402340241)*x[0]+(0.830253896674)*x[1]**o+(-0.0173245051245)*x[1]+(-0.105062444571)*x[2]**o+(0.968232377167)*x[2]
-        arg[1]=(0.153118126553)*x[0]**o+(0.958628221601)*x[0]+(-0.326368437133)*x[1]**o+(0.878861879269)*x[1]+(-0.297398071379)*x[2]**o+(0.155202299471)*x[2]
-        ref[0]=(0.725191452103)/(o+1.)+(0.169252765901)+(-0.292048194246)*0.5**o
-        ref[1]=(-0.623766508512)/(o+1.)+(0.99634620017)+(0.153118126553)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.410346849722)*x[0]**o+(0.86102012198)*x[0]+(-0.0143604505833)*x[1]**o+(-0.333268586255)*x[1]
-        arg[0,1]=(-0.104991947387)*x[0]**o+(0.51540973662)*x[0]+(0.449773354197)*x[1]**o+(0.0397236625379)*x[1]
-        arg[0,2]=(0.0010671797269)*x[0]**o+(0.165202831822)*x[0]+(-0.536444395178)*x[1]**o+(0.142112903729)*x[1]
-        arg[0,3]=(0.0655247081801)*x[0]**o+(-0.59093644572)*x[0]+(-0.0135713515051)*x[1]**o+(0.665578431202)*x[1]
-        arg[0,4]=(0.902382714765)*x[0]**o+(-0.358716290301)*x[0]+(-0.504792876433)*x[1]**o+(-0.760982991404)*x[1]
-        arg[1,0]=(0.663815334483)*x[0]**o+(-0.967978720711)*x[0]+(-0.308953852146)*x[1]**o+(-0.250315651366)*x[1]
-        arg[1,1]=(0.602976841368)*x[0]**o+(0.407346455361)*x[0]+(0.820076160142)*x[1]**o+(0.720380314572)*x[1]
-        arg[1,2]=(0.0899286747557)*x[0]**o+(-0.636748133402)*x[0]+(0.615853620374)*x[1]**o+(0.389136375831)*x[1]
-        arg[1,3]=(-0.695859848989)*x[0]**o+(-0.160892907203)*x[0]+(0.972252211687)*x[1]**o+(0.971653054313)*x[1]
-        arg[1,4]=(-0.229141368314)*x[0]**o+(0.434757135281)*x[0]+(0.508751791725)*x[1]**o+(-0.593022987916)*x[1]
-        arg[2,0]=(-0.732297666821)*x[0]**o+(-0.885623150041)*x[0]+(0.355264312146)*x[1]**o+(-0.203582600498)*x[1]
-        arg[2,1]=(-0.0683706126862)*x[0]**o+(0.390953181924)*x[0]+(-0.104115827873)*x[1]**o+(-0.0586349400277)*x[1]
-        arg[2,2]=(0.213052201915)*x[0]**o+(0.813758731408)*x[0]+(-0.927085393446)*x[1]**o+(-0.70884993627)*x[1]
-        arg[2,3]=(-0.11792311156)*x[0]**o+(0.705053056049)*x[0]+(-0.988858028527)*x[1]**o+(-0.532493233644)*x[1]
-        arg[2,4]=(0.643258167584)*x[0]**o+(0.991059864292)*x[0]+(0.466734669253)*x[1]**o+(-0.763209421816)*x[1]
-        arg[3,0]=(-0.686036752646)*x[0]**o+(-0.0152278415398)*x[0]+(0.572818298467)*x[1]**o+(0.0883817883272)*x[1]
-        arg[3,1]=(-0.498088836117)*x[0]**o+(0.413958831603)*x[0]+(-0.788338642889)*x[1]**o+(-0.219412111863)*x[1]
-        arg[3,2]=(0.895103303091)*x[0]**o+(0.967224972282)*x[0]+(0.778129303031)*x[1]**o+(-0.239067231978)*x[1]
-        arg[3,3]=(-0.715385920659)*x[0]**o+(-0.928446013585)*x[0]+(-0.919578735328)*x[1]**o+(0.735438220506)*x[1]
-        arg[3,4]=(0.273825880641)*x[0]**o+(0.602304312788)*x[0]+(-0.788415866411)*x[1]**o+(0.841776933557)*x[1]
-        ref[0,0]=(-0.0143604505833)/(o+1.)+(0.263875767862)+(0.410346849722)*0.5**o
-        ref[0,1]=(0.449773354197)/(o+1.)+(0.277566699579)+(-0.104991947387)*0.5**o
-        ref[0,2]=(-0.536444395178)/(o+1.)+(0.153657867776)+(0.0010671797269)*0.5**o
-        ref[0,3]=(-0.0135713515051)/(o+1.)+(0.0373209927411)+(0.0655247081801)*0.5**o
-        ref[0,4]=(-0.504792876433)/(o+1.)+(-0.559849640852)+(0.902382714765)*0.5**o
-        ref[1,0]=(-0.308953852146)/(o+1.)+(-0.609147186038)+(0.663815334483)*0.5**o
-        ref[1,1]=(0.820076160142)/(o+1.)+(0.563863384966)+(0.602976841368)*0.5**o
-        ref[1,2]=(0.615853620374)/(o+1.)+(-0.123805878786)+(0.0899286747557)*0.5**o
-        ref[1,3]=(0.972252211687)/(o+1.)+(0.405380073555)+(-0.695859848989)*0.5**o
-        ref[1,4]=(0.508751791725)/(o+1.)+(-0.0791329263176)+(-0.229141368314)*0.5**o
-        ref[2,0]=(0.355264312146)/(o+1.)+(-0.544602875269)+(-0.732297666821)*0.5**o
-        ref[2,1]=(-0.104115827873)/(o+1.)+(0.166159120948)+(-0.0683706126862)*0.5**o
-        ref[2,2]=(-0.927085393446)/(o+1.)+(0.0524543975689)+(0.213052201915)*0.5**o
-        ref[2,3]=(-0.988858028527)/(o+1.)+(0.0862799112023)+(-0.11792311156)*0.5**o
-        ref[2,4]=(0.466734669253)/(o+1.)+(0.113925221238)+(0.643258167584)*0.5**o
-        ref[3,0]=(0.572818298467)/(o+1.)+(0.0365769733937)+(-0.686036752646)*0.5**o
-        ref[3,1]=(-0.788338642889)/(o+1.)+(0.0972733598697)+(-0.498088836117)*0.5**o
-        ref[3,2]=(0.778129303031)/(o+1.)+(0.364078870152)+(0.895103303091)*0.5**o
-        ref[3,3]=(-0.919578735328)/(o+1.)+(-0.0965038965398)+(-0.715385920659)*0.5**o
-        ref[3,4]=(-0.788415866411)/(o+1.)+(0.722040623173)+(0.273825880641)*0.5**o
-      else:
-        arg[0,0]=(-0.903197979191)*x[0]**o+(-0.497252911882)*x[0]+(0.5689188153)*x[1]**o+(-0.569434759407)*x[1]+(-0.204533481399)*x[2]**o+(-0.0255207088467)*x[2]
-        arg[0,1]=(-0.0296606374337)*x[0]**o+(0.917552577919)*x[0]+(0.746132694062)*x[1]**o+(0.285568252958)*x[1]+(0.175571603104)*x[2]**o+(0.5701931124)*x[2]
-        arg[0,2]=(0.657981464039)*x[0]**o+(-0.105816675859)*x[0]+(-0.210726712386)*x[1]**o+(-0.457303699577)*x[1]+(-0.225517453595)*x[2]**o+(0.61593257413)*x[2]
-        arg[0,3]=(-0.652766009035)*x[0]**o+(0.538908603782)*x[0]+(0.226594150058)*x[1]**o+(0.691428293374)*x[1]+(-0.210896072508)*x[2]**o+(0.538061905948)*x[2]
-        arg[0,4]=(0.175024193446)*x[0]**o+(0.433285241007)*x[0]+(0.928411521986)*x[1]**o+(-0.241175862661)*x[1]+(-0.779192552542)*x[2]**o+(0.428100531631)*x[2]
-        arg[1,0]=(-0.094230207815)*x[0]**o+(-0.113255272088)*x[0]+(-0.880816596679)*x[1]**o+(0.56261116141)*x[1]+(-0.418606336511)*x[2]**o+(0.858058623759)*x[2]
-        arg[1,1]=(0.08556853498)*x[0]**o+(0.95491440456)*x[0]+(-0.435275492231)*x[1]**o+(0.339105115812)*x[1]+(-0.634101556975)*x[2]**o+(0.357557194572)*x[2]
-        arg[1,2]=(-0.692883812524)*x[0]**o+(0.673540357384)*x[0]+(0.240219465837)*x[1]**o+(0.139957925862)*x[1]+(0.135892430596)*x[2]**o+(0.383465818668)*x[2]
-        arg[1,3]=(-0.892921935206)*x[0]**o+(0.0694647682287)*x[0]+(0.0530888770821)*x[1]**o+(-0.0735398003251)*x[1]+(-0.40702392212)*x[2]**o+(-0.223494881098)*x[2]
-        arg[1,4]=(0.743112585337)*x[0]**o+(-0.12393012942)*x[0]+(-0.660616664197)*x[1]**o+(-0.0334489536139)*x[1]+(-0.0566394013558)*x[2]**o+(-0.0281273872158)*x[2]
-        arg[2,0]=(-0.500500871517)*x[0]**o+(-0.326237506809)*x[0]+(-0.960480146386)*x[1]**o+(0.0901654083154)*x[1]+(0.466124845857)*x[2]**o+(0.6908848619)*x[2]
-        arg[2,1]=(0.120233846989)*x[0]**o+(0.520609850629)*x[0]+(-0.407423400749)*x[1]**o+(0.59145151128)*x[1]+(0.981171407459)*x[2]**o+(-0.703987165108)*x[2]
-        arg[2,2]=(0.811775583161)*x[0]**o+(-0.209650983138)*x[0]+(-0.286223486261)*x[1]**o+(-0.864122954179)*x[1]+(0.609725467363)*x[2]**o+(0.0311464898903)*x[2]
-        arg[2,3]=(-0.325647787579)*x[0]**o+(0.956001955119)*x[0]+(0.637272546129)*x[1]**o+(-0.951109798103)*x[1]+(0.406445558466)*x[2]**o+(-0.930854597943)*x[2]
-        arg[2,4]=(0.0621315789778)*x[0]**o+(-0.917033227802)*x[0]+(-0.179584904974)*x[1]**o+(0.283357518809)*x[1]+(-0.778863909832)*x[2]**o+(-0.524497331838)*x[2]
-        arg[3,0]=(0.140605486894)*x[0]**o+(0.172882849759)*x[0]+(-0.883586756712)*x[1]**o+(-0.160461884399)*x[1]+(-0.718343713337)*x[2]**o+(0.196937721256)*x[2]
-        arg[3,1]=(-0.660232764173)*x[0]**o+(-0.92091042631)*x[0]+(-0.568852134661)*x[1]**o+(-0.331441330509)*x[1]+(-0.220286922375)*x[2]**o+(-0.256407439105)*x[2]
-        arg[3,2]=(0.593940468197)*x[0]**o+(0.527756437117)*x[0]+(0.943980933807)*x[1]**o+(0.749415167795)*x[1]+(0.484043332105)*x[2]**o+(0.40135030381)*x[2]
-        arg[3,3]=(0.870508483705)*x[0]**o+(-0.234209640456)*x[0]+(-0.62692310882)*x[1]**o+(0.352628981854)*x[1]+(-0.24937844453)*x[2]**o+(0.73438735864)*x[2]
-        arg[3,4]=(-0.638437449353)*x[0]**o+(0.308007229542)*x[0]+(0.537590844528)*x[1]**o+(-0.755595388361)*x[1]+(-0.152781228745)*x[2]**o+(-0.450122095362)*x[2]
-        ref[0,0]=(0.364385333901)/(o+1.)+(-0.546104190068)+(-0.903197979191)*0.5**o
-        ref[0,1]=(0.921704297167)/(o+1.)+(0.886656971638)+(-0.0296606374337)*0.5**o
-        ref[0,2]=(-0.436244165981)/(o+1.)+(0.0264060993469)+(0.657981464039)*0.5**o
-        ref[0,3]=(0.0156980775503)/(o+1.)+(0.884199401552)+(-0.652766009035)*0.5**o
-        ref[0,4]=(0.149218969444)/(o+1.)+(0.310104954989)+(0.175024193446)*0.5**o
-        ref[1,0]=(-1.29942293319)/(o+1.)+(0.653707256541)+(-0.094230207815)*0.5**o
-        ref[1,1]=(-1.06937704921)/(o+1.)+(0.825788357473)+(0.08556853498)*0.5**o
-        ref[1,2]=(0.376111896433)/(o+1.)+(0.598482050957)+(-0.692883812524)*0.5**o
-        ref[1,3]=(-0.353935045038)/(o+1.)+(-0.113784956597)+(-0.892921935206)*0.5**o
-        ref[1,4]=(-0.717256065552)/(o+1.)+(-0.0927532351247)+(0.743112585337)*0.5**o
-        ref[2,0]=(-0.494355300528)/(o+1.)+(0.227406381703)+(-0.500500871517)*0.5**o
-        ref[2,1]=(0.57374800671)/(o+1.)+(0.2040370984)+(0.120233846989)*0.5**o
-        ref[2,2]=(0.323501981101)/(o+1.)+(-0.521313723714)+(0.811775583161)*0.5**o
-        ref[2,3]=(1.04371810459)/(o+1.)+(-0.462981220464)+(-0.325647787579)*0.5**o
-        ref[2,4]=(-0.958448814807)/(o+1.)+(-0.579086520416)+(0.0621315789778)*0.5**o
-        ref[3,0]=(-1.60193047005)/(o+1.)+(0.104679343308)+(0.140605486894)*0.5**o
-        ref[3,1]=(-0.789139057035)/(o+1.)+(-0.754379597962)+(-0.660232764173)*0.5**o
-        ref[3,2]=(1.42802426591)/(o+1.)+(0.839260954361)+(0.593940468197)*0.5**o
-        ref[3,3]=(-0.87630155335)/(o+1.)+(0.426403350019)+(0.870508483705)*0.5**o
-        ref[3,4]=(0.384809615783)/(o+1.)+(-0.448855127091)+(-0.638437449353)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.315756069525)*x[0]**o+(0.253240552004)*x[0]+(0.86540335823)*x[1]**o+(-0.616203780065)*x[1]
-        arg[0,0,1]=(-0.948116617977)*x[0]**o+(0.892154336439)*x[0]+(0.136605864823)*x[1]**o+(-0.135599413854)*x[1]
-        arg[0,1,0]=(0.249388669107)*x[0]**o+(-0.299043026617)*x[0]+(0.335963868826)*x[1]**o+(-0.147202749474)*x[1]
-        arg[0,1,1]=(0.649003124445)*x[0]**o+(0.102344972673)*x[0]+(-0.795038258171)*x[1]**o+(0.149716983842)*x[1]
-        arg[1,0,0]=(0.814606374941)*x[0]**o+(-0.949251236145)*x[0]+(0.723727126173)*x[1]**o+(-0.75419822708)*x[1]
-        arg[1,0,1]=(0.043251358201)*x[0]**o+(-0.227748374318)*x[0]+(-0.231556019421)*x[1]**o+(-0.152524439909)*x[1]
-        arg[1,1,0]=(0.565989211326)*x[0]**o+(-0.488248650798)*x[0]+(-0.353077780419)*x[1]**o+(-0.0139123365766)*x[1]
-        arg[1,1,1]=(-0.106085432662)*x[0]**o+(0.627311916563)*x[0]+(-0.496301561324)*x[1]**o+(-0.648448849796)*x[1]
-        arg[2,0,0]=(0.741868098354)*x[0]**o+(-0.486898566862)*x[0]+(0.0461464851414)*x[1]**o+(0.0133916949979)*x[1]
-        arg[2,0,1]=(0.969108066213)*x[0]**o+(-0.688797899381)*x[0]+(0.897017408844)*x[1]**o+(0.807714585761)*x[1]
-        arg[2,1,0]=(-0.138159486947)*x[0]**o+(-0.377759480876)*x[0]+(-0.764484355987)*x[1]**o+(-0.723912265361)*x[1]
-        arg[2,1,1]=(-0.781167132076)*x[0]**o+(0.119512137054)*x[0]+(-0.535230596139)*x[1]**o+(0.441358968417)*x[1]
-        arg[3,0,0]=(-0.663820836909)*x[0]**o+(0.907668749761)*x[0]+(-0.345114213135)*x[1]**o+(0.0580058218243)*x[1]
-        arg[3,0,1]=(-0.359054701663)*x[0]**o+(0.0389188839076)*x[0]+(0.168050801441)*x[1]**o+(-0.695770024565)*x[1]
-        arg[3,1,0]=(0.70118269628)*x[0]**o+(0.87976625188)*x[0]+(0.154503286758)*x[1]**o+(0.807878896951)*x[1]
-        arg[3,1,1]=(-0.143516320927)*x[0]**o+(-0.369452129865)*x[0]+(-0.0392268449697)*x[1]**o+(-0.046104227955)*x[1]
-        arg[4,0,0]=(0.197244254754)*x[0]**o+(-0.580444991466)*x[0]+(0.334036744845)*x[1]**o+(0.000791083620504)*x[1]
-        arg[4,0,1]=(-0.892626226865)*x[0]**o+(0.140042741589)*x[0]+(0.158775259845)*x[1]**o+(-0.308266331028)*x[1]
-        arg[4,1,0]=(0.650374542633)*x[0]**o+(0.586152174865)*x[0]+(0.0201324360301)*x[1]**o+(-0.813221777119)*x[1]
-        arg[4,1,1]=(0.149656968314)*x[0]**o+(0.700641349434)*x[0]+(-0.529780404433)*x[1]**o+(0.512159137234)*x[1]
-        arg[5,0,0]=(0.288664621864)*x[0]**o+(0.119652133593)*x[0]+(-0.599113573241)*x[1]**o+(0.879966724309)*x[1]
-        arg[5,0,1]=(0.861443356689)*x[0]**o+(0.530607121787)*x[0]+(0.240306513701)*x[1]**o+(-0.575772515225)*x[1]
-        arg[5,1,0]=(0.721635890008)*x[0]**o+(-0.109537583449)*x[0]+(0.162041613112)*x[1]**o+(0.229143033467)*x[1]
-        arg[5,1,1]=(-0.876930820494)*x[0]**o+(0.749378811252)*x[0]+(0.886213554632)*x[1]**o+(0.433327797349)*x[1]
-        ref[0,0,0]=(0.86540335823)/(o+1.)+(-0.18148161403)+(-0.315756069525)*0.5**o
-        ref[0,0,1]=(0.136605864823)/(o+1.)+(0.378277461292)+(-0.948116617977)*0.5**o
-        ref[0,1,0]=(0.335963868826)/(o+1.)+(-0.223122888045)+(0.249388669107)*0.5**o
-        ref[0,1,1]=(-0.795038258171)/(o+1.)+(0.126030978258)+(0.649003124445)*0.5**o
-        ref[1,0,0]=(0.723727126173)/(o+1.)+(-0.851724731613)+(0.814606374941)*0.5**o
-        ref[1,0,1]=(-0.231556019421)/(o+1.)+(-0.190136407114)+(0.043251358201)*0.5**o
-        ref[1,1,0]=(-0.353077780419)/(o+1.)+(-0.251080493687)+(0.565989211326)*0.5**o
-        ref[1,1,1]=(-0.496301561324)/(o+1.)+(-0.0105684666165)+(-0.106085432662)*0.5**o
-        ref[2,0,0]=(0.0461464851414)/(o+1.)+(-0.236753435932)+(0.741868098354)*0.5**o
-        ref[2,0,1]=(0.897017408844)/(o+1.)+(0.05945834319)+(0.969108066213)*0.5**o
-        ref[2,1,0]=(-0.764484355987)/(o+1.)+(-0.550835873118)+(-0.138159486947)*0.5**o
-        ref[2,1,1]=(-0.535230596139)/(o+1.)+(0.280435552736)+(-0.781167132076)*0.5**o
-        ref[3,0,0]=(-0.345114213135)/(o+1.)+(0.482837285793)+(-0.663820836909)*0.5**o
-        ref[3,0,1]=(0.168050801441)/(o+1.)+(-0.328425570329)+(-0.359054701663)*0.5**o
-        ref[3,1,0]=(0.154503286758)/(o+1.)+(0.843822574415)+(0.70118269628)*0.5**o
-        ref[3,1,1]=(-0.0392268449697)/(o+1.)+(-0.20777817891)+(-0.143516320927)*0.5**o
-        ref[4,0,0]=(0.334036744845)/(o+1.)+(-0.289826953923)+(0.197244254754)*0.5**o
-        ref[4,0,1]=(0.158775259845)/(o+1.)+(-0.0841117947196)+(-0.892626226865)*0.5**o
-        ref[4,1,0]=(0.0201324360301)/(o+1.)+(-0.113534801127)+(0.650374542633)*0.5**o
-        ref[4,1,1]=(-0.529780404433)/(o+1.)+(0.606400243334)+(0.149656968314)*0.5**o
-        ref[5,0,0]=(-0.599113573241)/(o+1.)+(0.499809428951)+(0.288664621864)*0.5**o
-        ref[5,0,1]=(0.240306513701)/(o+1.)+(-0.022582696719)+(0.861443356689)*0.5**o
-        ref[5,1,0]=(0.162041613112)/(o+1.)+(0.0598027250089)+(0.721635890008)*0.5**o
-        ref[5,1,1]=(0.886213554632)/(o+1.)+(0.5913533043)+(-0.876930820494)*0.5**o
-      else:
-        arg[0,0,0]=(0.804252705823)*x[0]**o+(-0.215722921442)*x[0]+(-0.806316349529)*x[1]**o+(-0.984002993222)*x[1]+(-0.411946014731)*x[2]**o+(-0.526356191855)*x[2]
-        arg[0,0,1]=(-0.845902068304)*x[0]**o+(0.0773568471048)*x[0]+(-0.746877301439)*x[1]**o+(-0.581914187059)*x[1]+(-0.0299873869697)*x[2]**o+(-0.133702230427)*x[2]
-        arg[0,1,0]=(0.0113663840954)*x[0]**o+(-0.155702215771)*x[0]+(-0.134490626112)*x[1]**o+(0.973329917011)*x[1]+(-0.71585624135)*x[2]**o+(-0.840113198085)*x[2]
-        arg[0,1,1]=(0.708589516593)*x[0]**o+(0.40282025998)*x[0]+(0.114498353117)*x[1]**o+(0.117244230433)*x[1]+(0.110135318853)*x[2]**o+(-0.0227879044898)*x[2]
-        arg[1,0,0]=(0.836102144172)*x[0]**o+(0.212564417583)*x[0]+(0.744354739679)*x[1]**o+(-0.265633978841)*x[1]+(0.843108381264)*x[2]**o+(-0.288428427501)*x[2]
-        arg[1,0,1]=(-0.0712209756059)*x[0]**o+(-0.186158140814)*x[0]+(0.184457099888)*x[1]**o+(0.381365494077)*x[1]+(-0.547874738232)*x[2]**o+(0.645124013254)*x[2]
-        arg[1,1,0]=(-0.982992052158)*x[0]**o+(0.259627201342)*x[0]+(-0.885159598031)*x[1]**o+(-0.720754022982)*x[1]+(-0.762444117798)*x[2]**o+(0.737661938668)*x[2]
-        arg[1,1,1]=(0.518426662725)*x[0]**o+(0.718331452733)*x[0]+(0.523870992899)*x[1]**o+(0.527831420124)*x[1]+(0.791634534316)*x[2]**o+(0.17320870773)*x[2]
-        arg[2,0,0]=(-0.0368697940364)*x[0]**o+(-0.101718169515)*x[0]+(0.933712377315)*x[1]**o+(-0.465193151914)*x[1]+(-0.113637506449)*x[2]**o+(0.606619949802)*x[2]
-        arg[2,0,1]=(-0.785633726304)*x[0]**o+(0.526518355588)*x[0]+(0.151859749675)*x[1]**o+(0.805094094642)*x[1]+(-0.881122119524)*x[2]**o+(0.85143600659)*x[2]
-        arg[2,1,0]=(0.969244001518)*x[0]**o+(0.22600349917)*x[0]+(0.404826692149)*x[1]**o+(0.633039564539)*x[1]+(0.470567669552)*x[2]**o+(0.378348877016)*x[2]
-        arg[2,1,1]=(-0.310035929524)*x[0]**o+(0.42632271287)*x[0]+(0.866930472029)*x[1]**o+(-0.124483457934)*x[1]+(0.291920406068)*x[2]**o+(0.573984377154)*x[2]
-        arg[3,0,0]=(0.245553971829)*x[0]**o+(-0.567563766526)*x[0]+(0.326654705159)*x[1]**o+(0.642370867777)*x[1]+(-0.538450732704)*x[2]**o+(0.773349470647)*x[2]
-        arg[3,0,1]=(0.427017913395)*x[0]**o+(0.885132021286)*x[0]+(0.0338747045378)*x[1]**o+(-0.978508839789)*x[1]+(-0.734559666249)*x[2]**o+(0.379991690191)*x[2]
-        arg[3,1,0]=(-0.29533334088)*x[0]**o+(-0.894548834889)*x[0]+(0.537043269081)*x[1]**o+(-0.559173506199)*x[1]+(0.359216600837)*x[2]**o+(0.269563745611)*x[2]
-        arg[3,1,1]=(-0.146152544907)*x[0]**o+(-0.95681567795)*x[0]+(-0.0323978120064)*x[1]**o+(-0.5351716012)*x[1]+(-0.548536561192)*x[2]**o+(0.489675460511)*x[2]
-        arg[4,0,0]=(0.0552991386013)*x[0]**o+(0.772417012152)*x[0]+(-0.298212559744)*x[1]**o+(-0.189934984078)*x[1]+(0.74843296731)*x[2]**o+(-0.00412448772016)*x[2]
-        arg[4,0,1]=(0.577046858044)*x[0]**o+(-0.804142676861)*x[0]+(-0.0703211154568)*x[1]**o+(-0.84092953544)*x[1]+(0.254119640557)*x[2]**o+(-0.765048199333)*x[2]
-        arg[4,1,0]=(-0.358558179011)*x[0]**o+(-0.998072158283)*x[0]+(0.508152998513)*x[1]**o+(-0.0813296609683)*x[1]+(-0.534332816004)*x[2]**o+(-0.189623317277)*x[2]
-        arg[4,1,1]=(0.840098089823)*x[0]**o+(0.966726062679)*x[0]+(0.920079609258)*x[1]**o+(-0.242532131681)*x[1]+(0.429713768025)*x[2]**o+(0.171223902751)*x[2]
-        arg[5,0,0]=(0.695331559401)*x[0]**o+(0.819482211381)*x[0]+(0.550452400412)*x[1]**o+(0.518496496336)*x[1]+(-0.24727850431)*x[2]**o+(-0.796406493488)*x[2]
-        arg[5,0,1]=(0.469488028534)*x[0]**o+(0.457530124732)*x[0]+(0.922206279456)*x[1]**o+(0.678758573006)*x[1]+(0.34102098746)*x[2]**o+(0.108616278675)*x[2]
-        arg[5,1,0]=(0.444799933589)*x[0]**o+(-0.361568786934)*x[0]+(0.470174557338)*x[1]**o+(-0.344557214342)*x[1]+(0.894860467988)*x[2]**o+(-0.347027743579)*x[2]
-        arg[5,1,1]=(0.0304781332872)*x[0]**o+(-0.69046475182)*x[0]+(0.873260975232)*x[1]**o+(-0.705100555993)*x[1]+(0.660057279013)*x[2]**o+(-0.910002146105)*x[2]
-        ref[0,0,0]=(-1.21826236426)/(o+1.)+(-0.863041053259)+(0.804252705823)*0.5**o
-        ref[0,0,1]=(-0.776864688409)/(o+1.)+(-0.31912978519)+(-0.845902068304)*0.5**o
-        ref[0,1,0]=(-0.850346867462)/(o+1.)+(-0.0112427484226)+(0.0113663840954)*0.5**o
-        ref[0,1,1]=(0.22463367197)/(o+1.)+(0.248638292962)+(0.708589516593)*0.5**o
-        ref[1,0,0]=(1.58746312094)/(o+1.)+(-0.17074899438)+(0.836102144172)*0.5**o
-        ref[1,0,1]=(-0.363417638344)/(o+1.)+(0.420165683258)+(-0.0712209756059)*0.5**o
-        ref[1,1,0]=(-1.64760371583)/(o+1.)+(0.138267558514)+(-0.982992052158)*0.5**o
-        ref[1,1,1]=(1.31550552722)/(o+1.)+(0.709685790293)+(0.518426662725)*0.5**o
-        ref[2,0,0]=(0.820074870865)/(o+1.)+(0.0198543141864)+(-0.0368697940364)*0.5**o
-        ref[2,0,1]=(-0.729262369848)/(o+1.)+(1.09152422841)+(-0.785633726304)*0.5**o
-        ref[2,1,0]=(0.875394361701)/(o+1.)+(0.618695970363)+(0.969244001518)*0.5**o
-        ref[2,1,1]=(1.1588508781)/(o+1.)+(0.437911816045)+(-0.310035929524)*0.5**o
-        ref[3,0,0]=(-0.211796027546)/(o+1.)+(0.424078285949)+(0.245553971829)*0.5**o
-        ref[3,0,1]=(-0.700684961711)/(o+1.)+(0.143307435844)+(0.427017913395)*0.5**o
-        ref[3,1,0]=(0.896259869918)/(o+1.)+(-0.592079297738)+(-0.29533334088)*0.5**o
-        ref[3,1,1]=(-0.580934373198)/(o+1.)+(-0.50115590932)+(-0.146152544907)*0.5**o
-        ref[4,0,0]=(0.450220407566)/(o+1.)+(0.289178770177)+(0.0552991386013)*0.5**o
-        ref[4,0,1]=(0.1837985251)/(o+1.)+(-1.20506020582)+(0.577046858044)*0.5**o
-        ref[4,1,0]=(-0.0261798174917)/(o+1.)+(-0.634512568264)+(-0.358558179011)*0.5**o
-        ref[4,1,1]=(1.34979337728)/(o+1.)+(0.447708916874)+(0.840098089823)*0.5**o
-        ref[5,0,0]=(0.303173896103)/(o+1.)+(0.270786107114)+(0.695331559401)*0.5**o
-        ref[5,0,1]=(1.26322726692)/(o+1.)+(0.622452488207)+(0.469488028534)*0.5**o
-        ref[5,1,0]=(1.36503502533)/(o+1.)+(-0.526576872427)+(0.444799933589)*0.5**o
-        ref[5,1,1]=(1.53331825424)/(o+1.)+(-1.15278372696)+(0.0304781332872)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.348972036919)*x[0]**o+(0.123542094911)*x[0]+(-0.596353540657)*x[1]**o+(0.717656729405)*x[1]
-        arg[0,0,0,1]=(0.187733014896)*x[0]**o+(0.76244697815)*x[0]+(0.261409664458)*x[1]**o+(0.0213714031642)*x[1]
-        arg[0,0,1,0]=(0.951655197513)*x[0]**o+(-0.865274104487)*x[0]+(0.59127040848)*x[1]**o+(-0.261622300136)*x[1]
-        arg[0,0,1,1]=(-0.188127934304)*x[0]**o+(-0.513768204254)*x[0]+(0.77162116582)*x[1]**o+(-0.12621176914)*x[1]
-        arg[0,0,2,0]=(0.770717242337)*x[0]**o+(-0.991038362841)*x[0]+(0.908566805373)*x[1]**o+(-0.24890064672)*x[1]
-        arg[0,0,2,1]=(-0.543253359807)*x[0]**o+(-0.0504511921259)*x[0]+(-0.724584621389)*x[1]**o+(0.999965312141)*x[1]
-        arg[0,1,0,0]=(0.986939140609)*x[0]**o+(0.236894127675)*x[0]+(0.520162431169)*x[1]**o+(0.306413415759)*x[1]
-        arg[0,1,0,1]=(-0.171773212929)*x[0]**o+(-0.248436968201)*x[0]+(0.43818378458)*x[1]**o+(-0.495734982435)*x[1]
-        arg[0,1,1,0]=(-0.369350989684)*x[0]**o+(0.59047357584)*x[0]+(0.422340945702)*x[1]**o+(0.326270009775)*x[1]
-        arg[0,1,1,1]=(0.559606389467)*x[0]**o+(-0.0507064379501)*x[0]+(-0.0464190048363)*x[1]**o+(0.18964879235)*x[1]
-        arg[0,1,2,0]=(-0.989408371198)*x[0]**o+(0.108750148268)*x[0]+(-0.347984444559)*x[1]**o+(-0.819590699683)*x[1]
-        arg[0,1,2,1]=(-0.289295900777)*x[0]**o+(-0.579698633174)*x[0]+(-0.124928198101)*x[1]**o+(0.640901698875)*x[1]
-        arg[0,2,0,0]=(0.132599667548)*x[0]**o+(-0.102095433147)*x[0]+(0.446169236302)*x[1]**o+(-0.844062525718)*x[1]
-        arg[0,2,0,1]=(-0.452662917924)*x[0]**o+(-0.0497770418153)*x[0]+(-0.258525519083)*x[1]**o+(-0.0365197858914)*x[1]
-        arg[0,2,1,0]=(0.318740871592)*x[0]**o+(0.562764515639)*x[0]+(-0.209089266173)*x[1]**o+(0.922024900771)*x[1]
-        arg[0,2,1,1]=(-0.825757440563)*x[0]**o+(0.634009249217)*x[0]+(0.954836398565)*x[1]**o+(-0.910652766097)*x[1]
-        arg[0,2,2,0]=(-0.640337007803)*x[0]**o+(0.862625623816)*x[0]+(-0.0327529254483)*x[1]**o+(-0.327305638603)*x[1]
-        arg[0,2,2,1]=(-0.956300293885)*x[0]**o+(0.456116376134)*x[0]+(0.312023159058)*x[1]**o+(0.768546792276)*x[1]
-        arg[0,3,0,0]=(-0.927040285049)*x[0]**o+(-0.614994799603)*x[0]+(-0.431859510779)*x[1]**o+(-0.088774748513)*x[1]
-        arg[0,3,0,1]=(-0.807009561768)*x[0]**o+(0.00323409463398)*x[0]+(0.274814268019)*x[1]**o+(-0.132755038246)*x[1]
-        arg[0,3,1,0]=(0.931774139846)*x[0]**o+(0.665327108449)*x[0]+(0.130437344004)*x[1]**o+(-0.00859025546518)*x[1]
-        arg[0,3,1,1]=(-0.314188008746)*x[0]**o+(0.405251729437)*x[0]+(-0.313484462262)*x[1]**o+(-0.670765905491)*x[1]
-        arg[0,3,2,0]=(0.748691505108)*x[0]**o+(0.717110963353)*x[0]+(-0.451892315269)*x[1]**o+(-0.103930621637)*x[1]
-        arg[0,3,2,1]=(-0.124290384657)*x[0]**o+(0.0761550925153)*x[0]+(0.864166710803)*x[1]**o+(0.050297196468)*x[1]
-        arg[0,4,0,0]=(-0.726606985714)*x[0]**o+(-0.304862755503)*x[0]+(-0.364735884875)*x[1]**o+(0.769999145518)*x[1]
-        arg[0,4,0,1]=(-0.716457484159)*x[0]**o+(0.850185561874)*x[0]+(0.924535166786)*x[1]**o+(0.414539526778)*x[1]
-        arg[0,4,1,0]=(-0.67154700238)*x[0]**o+(-0.0990079744678)*x[0]+(-0.738258048173)*x[1]**o+(-0.105333364414)*x[1]
-        arg[0,4,1,1]=(-0.568569022142)*x[0]**o+(-0.865340476096)*x[0]+(0.592223896873)*x[1]**o+(0.545216501911)*x[1]
-        arg[0,4,2,0]=(0.959619955514)*x[0]**o+(-0.625097978453)*x[0]+(0.447944032533)*x[1]**o+(-0.792670959618)*x[1]
-        arg[0,4,2,1]=(-0.446578795272)*x[0]**o+(0.516341492325)*x[0]+(0.383143400712)*x[1]**o+(-0.339255681885)*x[1]
-        arg[1,0,0,0]=(0.130600745253)*x[0]**o+(-0.225084866063)*x[0]+(-0.871963625443)*x[1]**o+(-0.0741251944735)*x[1]
-        arg[1,0,0,1]=(-0.684630134211)*x[0]**o+(-0.298097256903)*x[0]+(0.511206122216)*x[1]**o+(-0.784104136535)*x[1]
-        arg[1,0,1,0]=(0.624178362847)*x[0]**o+(0.161787148072)*x[0]+(-0.0906465041298)*x[1]**o+(-0.0302149132362)*x[1]
-        arg[1,0,1,1]=(-0.403988173215)*x[0]**o+(-0.423895624882)*x[0]+(-0.0594261878161)*x[1]**o+(0.71753539369)*x[1]
-        arg[1,0,2,0]=(0.411689797339)*x[0]**o+(0.0555768292842)*x[0]+(0.786614145981)*x[1]**o+(-0.701418967065)*x[1]
-        arg[1,0,2,1]=(0.971933572797)*x[0]**o+(0.203165120814)*x[0]+(0.50340688009)*x[1]**o+(-0.443869607992)*x[1]
-        arg[1,1,0,0]=(0.517782412737)*x[0]**o+(-0.233071827503)*x[0]+(0.310115588175)*x[1]**o+(-0.970604318783)*x[1]
-        arg[1,1,0,1]=(0.250379154253)*x[0]**o+(-0.0914513321258)*x[0]+(0.466403827523)*x[1]**o+(-0.454369386353)*x[1]
-        arg[1,1,1,0]=(-0.235520035004)*x[0]**o+(0.0932661387959)*x[0]+(0.0964933173918)*x[1]**o+(0.585245824454)*x[1]
-        arg[1,1,1,1]=(-0.466145341257)*x[0]**o+(0.532910678544)*x[0]+(0.757545184326)*x[1]**o+(-0.488241176428)*x[1]
-        arg[1,1,2,0]=(0.802070127079)*x[0]**o+(0.30227826497)*x[0]+(0.76818718588)*x[1]**o+(-0.966380392422)*x[1]
-        arg[1,1,2,1]=(0.764411747219)*x[0]**o+(0.62151105703)*x[0]+(0.310875960956)*x[1]**o+(0.218417169467)*x[1]
-        arg[1,2,0,0]=(0.627865841486)*x[0]**o+(0.328844171432)*x[0]+(0.47405718918)*x[1]**o+(0.238471462812)*x[1]
-        arg[1,2,0,1]=(-0.890402471541)*x[0]**o+(0.0654874441479)*x[0]+(0.411199516291)*x[1]**o+(0.0669990208336)*x[1]
-        arg[1,2,1,0]=(-0.789401901979)*x[0]**o+(-0.379725885915)*x[0]+(-0.103817842125)*x[1]**o+(0.358055283478)*x[1]
-        arg[1,2,1,1]=(-0.619688531158)*x[0]**o+(0.314022911152)*x[0]+(-0.515963904961)*x[1]**o+(0.807912272743)*x[1]
-        arg[1,2,2,0]=(0.696584946679)*x[0]**o+(-0.156405028983)*x[0]+(0.99374085906)*x[1]**o+(0.692362331558)*x[1]
-        arg[1,2,2,1]=(0.463393460998)*x[0]**o+(-0.0302433372264)*x[0]+(0.243006695756)*x[1]**o+(0.934578685307)*x[1]
-        arg[1,3,0,0]=(-0.760149691585)*x[0]**o+(0.305312987392)*x[0]+(0.478665319824)*x[1]**o+(-0.395734016727)*x[1]
-        arg[1,3,0,1]=(-0.495638457166)*x[0]**o+(-0.352868042523)*x[0]+(0.0577132713041)*x[1]**o+(0.856507718332)*x[1]
-        arg[1,3,1,0]=(-0.588160041725)*x[0]**o+(-0.941242199161)*x[0]+(-0.883563055172)*x[1]**o+(-0.474349426459)*x[1]
-        arg[1,3,1,1]=(-0.822752260982)*x[0]**o+(0.284881595545)*x[0]+(-0.914198363943)*x[1]**o+(0.421107500666)*x[1]
-        arg[1,3,2,0]=(-0.125099230328)*x[0]**o+(-0.0167977306674)*x[0]+(-0.880147366581)*x[1]**o+(0.947650728684)*x[1]
-        arg[1,3,2,1]=(-0.770895899992)*x[0]**o+(-0.121705997003)*x[0]+(-0.0486858273347)*x[1]**o+(0.666179109672)*x[1]
-        arg[1,4,0,0]=(-0.767476534476)*x[0]**o+(0.720013119195)*x[0]+(-0.540220631624)*x[1]**o+(-0.363702385125)*x[1]
-        arg[1,4,0,1]=(0.90195509915)*x[0]**o+(0.104569298687)*x[0]+(0.901816813435)*x[1]**o+(0.421060929159)*x[1]
-        arg[1,4,1,0]=(0.0901631681262)*x[0]**o+(-0.330570875574)*x[0]+(0.892147778885)*x[1]**o+(-0.102976747188)*x[1]
-        arg[1,4,1,1]=(-0.336016437275)*x[0]**o+(-0.00913798206221)*x[0]+(-0.20211674106)*x[1]**o+(-0.0470039081275)*x[1]
-        arg[1,4,2,0]=(0.194383418491)*x[0]**o+(-0.913993330791)*x[0]+(-0.0207457431142)*x[1]**o+(-0.728130242724)*x[1]
-        arg[1,4,2,1]=(-0.285983741049)*x[0]**o+(-0.359824200302)*x[0]+(-0.286913656927)*x[1]**o+(-0.801477464894)*x[1]
-        arg[2,0,0,0]=(-0.266085322677)*x[0]**o+(-0.477036323188)*x[0]+(0.967304544659)*x[1]**o+(-0.843721203165)*x[1]
-        arg[2,0,0,1]=(-0.431692878995)*x[0]**o+(-0.326793076488)*x[0]+(0.478220893643)*x[1]**o+(-0.953607426852)*x[1]
-        arg[2,0,1,0]=(0.800398295672)*x[0]**o+(-0.726923243756)*x[0]+(0.641194491232)*x[1]**o+(0.933755071699)*x[1]
-        arg[2,0,1,1]=(0.778158607269)*x[0]**o+(0.192895772287)*x[0]+(0.160540751687)*x[1]**o+(0.132780133987)*x[1]
-        arg[2,0,2,0]=(0.0700487728725)*x[0]**o+(0.366571342769)*x[0]+(0.213123464402)*x[1]**o+(0.0224970803568)*x[1]
-        arg[2,0,2,1]=(-0.608321696505)*x[0]**o+(0.416761589908)*x[0]+(0.0499280394381)*x[1]**o+(-0.678150075911)*x[1]
-        arg[2,1,0,0]=(-0.580987690899)*x[0]**o+(-0.625951863984)*x[0]+(0.0064094419355)*x[1]**o+(0.646045286912)*x[1]
-        arg[2,1,0,1]=(-0.881255703221)*x[0]**o+(-0.153796152409)*x[0]+(0.320566497467)*x[1]**o+(-0.217827916224)*x[1]
-        arg[2,1,1,0]=(0.981593086009)*x[0]**o+(0.659643450249)*x[0]+(0.824530802391)*x[1]**o+(0.109125926037)*x[1]
-        arg[2,1,1,1]=(-0.79695617371)*x[0]**o+(-0.340030091407)*x[0]+(0.476648191338)*x[1]**o+(-0.751961375342)*x[1]
-        arg[2,1,2,0]=(0.00785807621726)*x[0]**o+(-0.177037931946)*x[0]+(-0.322685883101)*x[1]**o+(0.639485466195)*x[1]
-        arg[2,1,2,1]=(0.386667953213)*x[0]**o+(0.805115373435)*x[0]+(0.489529148574)*x[1]**o+(0.380650996708)*x[1]
-        arg[2,2,0,0]=(-0.205678281473)*x[0]**o+(0.725798252716)*x[0]+(-0.884620261631)*x[1]**o+(0.737678769923)*x[1]
-        arg[2,2,0,1]=(-0.859841848792)*x[0]**o+(0.215497396508)*x[0]+(-0.9231710768)*x[1]**o+(-0.504914651252)*x[1]
-        arg[2,2,1,0]=(-0.0161889255216)*x[0]**o+(0.218150095097)*x[0]+(0.508505799895)*x[1]**o+(0.441270271663)*x[1]
-        arg[2,2,1,1]=(0.645494826531)*x[0]**o+(0.812462584734)*x[0]+(0.498639261012)*x[1]**o+(0.695415642432)*x[1]
-        arg[2,2,2,0]=(-0.855342734108)*x[0]**o+(0.174928383231)*x[0]+(-0.550636347213)*x[1]**o+(0.814295216919)*x[1]
-        arg[2,2,2,1]=(-0.146152468476)*x[0]**o+(-0.810876776267)*x[0]+(0.77444775812)*x[1]**o+(0.758171250375)*x[1]
-        arg[2,3,0,0]=(0.914771099535)*x[0]**o+(-0.801103658802)*x[0]+(-0.339761119169)*x[1]**o+(-0.0697409372498)*x[1]
-        arg[2,3,0,1]=(-0.278017621273)*x[0]**o+(-0.916896227964)*x[0]+(0.0151205004002)*x[1]**o+(-0.36424189479)*x[1]
-        arg[2,3,1,0]=(0.635845368235)*x[0]**o+(-0.286420165946)*x[0]+(-0.547314386502)*x[1]**o+(-0.297882680065)*x[1]
-        arg[2,3,1,1]=(0.236860892332)*x[0]**o+(0.670289851551)*x[0]+(-0.437288046493)*x[1]**o+(0.0610684872034)*x[1]
-        arg[2,3,2,0]=(0.096479176127)*x[0]**o+(-0.992608241155)*x[0]+(0.622650933171)*x[1]**o+(-0.171594052732)*x[1]
-        arg[2,3,2,1]=(0.259913661654)*x[0]**o+(0.521353257934)*x[0]+(0.141212812345)*x[1]**o+(0.0311971708742)*x[1]
-        arg[2,4,0,0]=(0.208498140469)*x[0]**o+(0.914285328223)*x[0]+(-0.368860713612)*x[1]**o+(0.744057640483)*x[1]
-        arg[2,4,0,1]=(-0.0760701135919)*x[0]**o+(-0.0666410245297)*x[0]+(-0.442858585142)*x[1]**o+(-0.869273907698)*x[1]
-        arg[2,4,1,0]=(0.694291134331)*x[0]**o+(0.153487646161)*x[0]+(-0.454726570824)*x[1]**o+(0.12533511793)*x[1]
-        arg[2,4,1,1]=(0.505643124198)*x[0]**o+(0.935208927517)*x[0]+(0.120271053976)*x[1]**o+(0.472499209985)*x[1]
-        arg[2,4,2,0]=(0.458890639035)*x[0]**o+(-0.38125264637)*x[0]+(-0.742525095759)*x[1]**o+(0.0727341692272)*x[1]
-        arg[2,4,2,1]=(-0.228856512525)*x[0]**o+(0.215540806099)*x[0]+(-0.492076254398)*x[1]**o+(0.325121281149)*x[1]
-        arg[3,0,0,0]=(0.791320435019)*x[0]**o+(0.264208069532)*x[0]+(0.105218141263)*x[1]**o+(-0.947073121631)*x[1]
-        arg[3,0,0,1]=(0.384081306848)*x[0]**o+(-0.735420806741)*x[0]+(0.695451719819)*x[1]**o+(-0.104071285853)*x[1]
-        arg[3,0,1,0]=(0.176280431402)*x[0]**o+(0.766248516714)*x[0]+(0.620920827635)*x[1]**o+(0.571778731591)*x[1]
-        arg[3,0,1,1]=(0.895148060637)*x[0]**o+(0.120401904357)*x[0]+(0.500131556768)*x[1]**o+(-0.432523916076)*x[1]
-        arg[3,0,2,0]=(-0.171375065793)*x[0]**o+(0.731777853738)*x[0]+(0.914774635339)*x[1]**o+(-0.329504614878)*x[1]
-        arg[3,0,2,1]=(-0.65523706909)*x[0]**o+(-0.309487164889)*x[0]+(-0.244763521442)*x[1]**o+(0.790744116827)*x[1]
-        arg[3,1,0,0]=(-0.515742288)*x[0]**o+(0.688021032329)*x[0]+(0.744558730681)*x[1]**o+(0.663410706435)*x[1]
-        arg[3,1,0,1]=(0.299920493853)*x[0]**o+(0.221554378219)*x[0]+(-0.262111371211)*x[1]**o+(0.597219370531)*x[1]
-        arg[3,1,1,0]=(-0.491648532317)*x[0]**o+(-0.0763921400417)*x[0]+(0.517994656474)*x[1]**o+(0.690649210498)*x[1]
-        arg[3,1,1,1]=(0.291881729319)*x[0]**o+(0.388296683726)*x[0]+(0.304223657331)*x[1]**o+(-0.17249216188)*x[1]
-        arg[3,1,2,0]=(0.309288981861)*x[0]**o+(-0.638172982762)*x[0]+(-0.566768084047)*x[1]**o+(-0.694439437371)*x[1]
-        arg[3,1,2,1]=(-0.680391436031)*x[0]**o+(0.876096306554)*x[0]+(0.676979754874)*x[1]**o+(0.376507786465)*x[1]
-        arg[3,2,0,0]=(-0.688464200232)*x[0]**o+(0.404140014906)*x[0]+(-0.389359624725)*x[1]**o+(0.218257423404)*x[1]
-        arg[3,2,0,1]=(-0.321661287857)*x[0]**o+(0.305707842777)*x[0]+(0.0488067596906)*x[1]**o+(0.475071042874)*x[1]
-        arg[3,2,1,0]=(-0.172172832131)*x[0]**o+(-0.0589598637728)*x[0]+(0.997578239775)*x[1]**o+(0.0919614884141)*x[1]
-        arg[3,2,1,1]=(0.500590025777)*x[0]**o+(0.258724052781)*x[0]+(0.233819575609)*x[1]**o+(0.787949345995)*x[1]
-        arg[3,2,2,0]=(-0.464931198743)*x[0]**o+(0.689246395117)*x[0]+(0.0701366334357)*x[1]**o+(-0.206391031385)*x[1]
-        arg[3,2,2,1]=(-0.352492545609)*x[0]**o+(-0.160385273073)*x[0]+(0.876791526094)*x[1]**o+(0.748257988817)*x[1]
-        arg[3,3,0,0]=(0.70346530112)*x[0]**o+(-0.351192123239)*x[0]+(-0.985298342079)*x[1]**o+(-0.286817451723)*x[1]
-        arg[3,3,0,1]=(0.841285056577)*x[0]**o+(0.741986440026)*x[0]+(-0.758645627646)*x[1]**o+(-0.914494381783)*x[1]
-        arg[3,3,1,0]=(-0.614293213484)*x[0]**o+(-0.746555667296)*x[0]+(-0.301781252786)*x[1]**o+(-0.721633195357)*x[1]
-        arg[3,3,1,1]=(-0.287510519978)*x[0]**o+(-0.764960517935)*x[0]+(-0.948032248565)*x[1]**o+(-0.548676002552)*x[1]
-        arg[3,3,2,0]=(0.145506943729)*x[0]**o+(-0.353925293653)*x[0]+(0.786904887352)*x[1]**o+(-0.36548133551)*x[1]
-        arg[3,3,2,1]=(0.60782215735)*x[0]**o+(0.872444227513)*x[0]+(-0.237571902274)*x[1]**o+(-0.0559745367747)*x[1]
-        arg[3,4,0,0]=(0.691107698337)*x[0]**o+(0.0800532750053)*x[0]+(-0.847456183316)*x[1]**o+(0.911068576288)*x[1]
-        arg[3,4,0,1]=(-0.00167606578449)*x[0]**o+(-0.697603805697)*x[0]+(-0.362440886816)*x[1]**o+(-0.0604379772766)*x[1]
-        arg[3,4,1,0]=(-0.74026325403)*x[0]**o+(-0.539076677004)*x[0]+(-0.317176913637)*x[1]**o+(0.759776288772)*x[1]
-        arg[3,4,1,1]=(-0.230005454291)*x[0]**o+(-0.929557352119)*x[0]+(-0.435125210116)*x[1]**o+(0.106892135893)*x[1]
-        arg[3,4,2,0]=(-0.638149620463)*x[0]**o+(-0.0511424128986)*x[0]+(0.460436795546)*x[1]**o+(-0.919535518181)*x[1]
-        arg[3,4,2,1]=(-0.793537245531)*x[0]**o+(0.409768940347)*x[0]+(0.632560678557)*x[1]**o+(0.700596370851)*x[1]
-        ref[0,0,0,0]=(-0.596353540657)/(o+1.)+(0.420599412158)+(-0.348972036919)*0.5**o
-        ref[0,0,0,1]=(0.261409664458)/(o+1.)+(0.391909190657)+(0.187733014896)*0.5**o
-        ref[0,0,1,0]=(0.59127040848)/(o+1.)+(-0.563448202311)+(0.951655197513)*0.5**o
-        ref[0,0,1,1]=(0.77162116582)/(o+1.)+(-0.319989986697)+(-0.188127934304)*0.5**o
-        ref[0,0,2,0]=(0.908566805373)/(o+1.)+(-0.619969504781)+(0.770717242337)*0.5**o
-        ref[0,0,2,1]=(-0.724584621389)/(o+1.)+(0.474757060008)+(-0.543253359807)*0.5**o
-        ref[0,1,0,0]=(0.520162431169)/(o+1.)+(0.271653771717)+(0.986939140609)*0.5**o
-        ref[0,1,0,1]=(0.43818378458)/(o+1.)+(-0.372085975318)+(-0.171773212929)*0.5**o
-        ref[0,1,1,0]=(0.422340945702)/(o+1.)+(0.458371792807)+(-0.369350989684)*0.5**o
-        ref[0,1,1,1]=(-0.0464190048363)/(o+1.)+(0.0694711771999)+(0.559606389467)*0.5**o
-        ref[0,1,2,0]=(-0.347984444559)/(o+1.)+(-0.355420275708)+(-0.989408371198)*0.5**o
-        ref[0,1,2,1]=(-0.124928198101)/(o+1.)+(0.0306015328506)+(-0.289295900777)*0.5**o
-        ref[0,2,0,0]=(0.446169236302)/(o+1.)+(-0.473078979432)+(0.132599667548)*0.5**o
-        ref[0,2,0,1]=(-0.258525519083)/(o+1.)+(-0.0431484138534)+(-0.452662917924)*0.5**o
-        ref[0,2,1,0]=(-0.209089266173)/(o+1.)+(0.742394708205)+(0.318740871592)*0.5**o
-        ref[0,2,1,1]=(0.954836398565)/(o+1.)+(-0.13832175844)+(-0.825757440563)*0.5**o
-        ref[0,2,2,0]=(-0.0327529254483)/(o+1.)+(0.267659992607)+(-0.640337007803)*0.5**o
-        ref[0,2,2,1]=(0.312023159058)/(o+1.)+(0.612331584205)+(-0.956300293885)*0.5**o
-        ref[0,3,0,0]=(-0.431859510779)/(o+1.)+(-0.351884774058)+(-0.927040285049)*0.5**o
-        ref[0,3,0,1]=(0.274814268019)/(o+1.)+(-0.064760471806)+(-0.807009561768)*0.5**o
-        ref[0,3,1,0]=(0.130437344004)/(o+1.)+(0.328368426492)+(0.931774139846)*0.5**o
-        ref[0,3,1,1]=(-0.313484462262)/(o+1.)+(-0.132757088027)+(-0.314188008746)*0.5**o
-        ref[0,3,2,0]=(-0.451892315269)/(o+1.)+(0.306590170858)+(0.748691505108)*0.5**o
-        ref[0,3,2,1]=(0.864166710803)/(o+1.)+(0.0632261444916)+(-0.124290384657)*0.5**o
-        ref[0,4,0,0]=(-0.364735884875)/(o+1.)+(0.232568195007)+(-0.726606985714)*0.5**o
-        ref[0,4,0,1]=(0.924535166786)/(o+1.)+(0.632362544326)+(-0.716457484159)*0.5**o
-        ref[0,4,1,0]=(-0.738258048173)/(o+1.)+(-0.102170669441)+(-0.67154700238)*0.5**o
-        ref[0,4,1,1]=(0.592223896873)/(o+1.)+(-0.160061987092)+(-0.568569022142)*0.5**o
-        ref[0,4,2,0]=(0.447944032533)/(o+1.)+(-0.708884469036)+(0.959619955514)*0.5**o
-        ref[0,4,2,1]=(0.383143400712)/(o+1.)+(0.0885429052198)+(-0.446578795272)*0.5**o
-        ref[1,0,0,0]=(-0.871963625443)/(o+1.)+(-0.149605030268)+(0.130600745253)*0.5**o
-        ref[1,0,0,1]=(0.511206122216)/(o+1.)+(-0.541100696719)+(-0.684630134211)*0.5**o
-        ref[1,0,1,0]=(-0.0906465041298)/(o+1.)+(0.065786117418)+(0.624178362847)*0.5**o
-        ref[1,0,1,1]=(-0.0594261878161)/(o+1.)+(0.146819884404)+(-0.403988173215)*0.5**o
-        ref[1,0,2,0]=(0.786614145981)/(o+1.)+(-0.32292106889)+(0.411689797339)*0.5**o
-        ref[1,0,2,1]=(0.50340688009)/(o+1.)+(-0.120352243589)+(0.971933572797)*0.5**o
-        ref[1,1,0,0]=(0.310115588175)/(o+1.)+(-0.601838073143)+(0.517782412737)*0.5**o
-        ref[1,1,0,1]=(0.466403827523)/(o+1.)+(-0.27291035924)+(0.250379154253)*0.5**o
-        ref[1,1,1,0]=(0.0964933173918)/(o+1.)+(0.339255981625)+(-0.235520035004)*0.5**o
-        ref[1,1,1,1]=(0.757545184326)/(o+1.)+(0.0223347510579)+(-0.466145341257)*0.5**o
-        ref[1,1,2,0]=(0.76818718588)/(o+1.)+(-0.332051063726)+(0.802070127079)*0.5**o
-        ref[1,1,2,1]=(0.310875960956)/(o+1.)+(0.419964113249)+(0.764411747219)*0.5**o
-        ref[1,2,0,0]=(0.47405718918)/(o+1.)+(0.283657817122)+(0.627865841486)*0.5**o
-        ref[1,2,0,1]=(0.411199516291)/(o+1.)+(0.0662432324908)+(-0.890402471541)*0.5**o
-        ref[1,2,1,0]=(-0.103817842125)/(o+1.)+(-0.0108353012186)+(-0.789401901979)*0.5**o
-        ref[1,2,1,1]=(-0.515963904961)/(o+1.)+(0.560967591948)+(-0.619688531158)*0.5**o
-        ref[1,2,2,0]=(0.99374085906)/(o+1.)+(0.267978651288)+(0.696584946679)*0.5**o
-        ref[1,2,2,1]=(0.243006695756)/(o+1.)+(0.45216767404)+(0.463393460998)*0.5**o
-        ref[1,3,0,0]=(0.478665319824)/(o+1.)+(-0.0452105146678)+(-0.760149691585)*0.5**o
-        ref[1,3,0,1]=(0.0577132713041)/(o+1.)+(0.251819837904)+(-0.495638457166)*0.5**o
-        ref[1,3,1,0]=(-0.883563055172)/(o+1.)+(-0.70779581281)+(-0.588160041725)*0.5**o
-        ref[1,3,1,1]=(-0.914198363943)/(o+1.)+(0.352994548105)+(-0.822752260982)*0.5**o
-        ref[1,3,2,0]=(-0.880147366581)/(o+1.)+(0.465426499008)+(-0.125099230328)*0.5**o
-        ref[1,3,2,1]=(-0.0486858273347)/(o+1.)+(0.272236556335)+(-0.770895899992)*0.5**o
-        ref[1,4,0,0]=(-0.540220631624)/(o+1.)+(0.178155367035)+(-0.767476534476)*0.5**o
-        ref[1,4,0,1]=(0.901816813435)/(o+1.)+(0.262815113923)+(0.90195509915)*0.5**o
-        ref[1,4,1,0]=(0.892147778885)/(o+1.)+(-0.216773811381)+(0.0901631681262)*0.5**o
-        ref[1,4,1,1]=(-0.20211674106)/(o+1.)+(-0.0280709450949)+(-0.336016437275)*0.5**o
-        ref[1,4,2,0]=(-0.0207457431142)/(o+1.)+(-0.821061786757)+(0.194383418491)*0.5**o
-        ref[1,4,2,1]=(-0.286913656927)/(o+1.)+(-0.580650832598)+(-0.285983741049)*0.5**o
-        ref[2,0,0,0]=(0.967304544659)/(o+1.)+(-0.660378763176)+(-0.266085322677)*0.5**o
-        ref[2,0,0,1]=(0.478220893643)/(o+1.)+(-0.64020025167)+(-0.431692878995)*0.5**o
-        ref[2,0,1,0]=(0.641194491232)/(o+1.)+(0.103415913972)+(0.800398295672)*0.5**o
-        ref[2,0,1,1]=(0.160540751687)/(o+1.)+(0.162837953137)+(0.778158607269)*0.5**o
-        ref[2,0,2,0]=(0.213123464402)/(o+1.)+(0.194534211563)+(0.0700487728725)*0.5**o
-        ref[2,0,2,1]=(0.0499280394381)/(o+1.)+(-0.130694243001)+(-0.608321696505)*0.5**o
-        ref[2,1,0,0]=(0.0064094419355)/(o+1.)+(0.0100467114639)+(-0.580987690899)*0.5**o
-        ref[2,1,0,1]=(0.320566497467)/(o+1.)+(-0.185812034316)+(-0.881255703221)*0.5**o
-        ref[2,1,1,0]=(0.824530802391)/(o+1.)+(0.384384688143)+(0.981593086009)*0.5**o
-        ref[2,1,1,1]=(0.476648191338)/(o+1.)+(-0.545995733375)+(-0.79695617371)*0.5**o
-        ref[2,1,2,0]=(-0.322685883101)/(o+1.)+(0.231223767125)+(0.00785807621726)*0.5**o
-        ref[2,1,2,1]=(0.489529148574)/(o+1.)+(0.592883185071)+(0.386667953213)*0.5**o
-        ref[2,2,0,0]=(-0.884620261631)/(o+1.)+(0.73173851132)+(-0.205678281473)*0.5**o
-        ref[2,2,0,1]=(-0.9231710768)/(o+1.)+(-0.144708627372)+(-0.859841848792)*0.5**o
-        ref[2,2,1,0]=(0.508505799895)/(o+1.)+(0.32971018338)+(-0.0161889255216)*0.5**o
-        ref[2,2,1,1]=(0.498639261012)/(o+1.)+(0.753939113583)+(0.645494826531)*0.5**o
-        ref[2,2,2,0]=(-0.550636347213)/(o+1.)+(0.494611800075)+(-0.855342734108)*0.5**o
-        ref[2,2,2,1]=(0.77444775812)/(o+1.)+(-0.0263527629459)+(-0.146152468476)*0.5**o
-        ref[2,3,0,0]=(-0.339761119169)/(o+1.)+(-0.435422298026)+(0.914771099535)*0.5**o
-        ref[2,3,0,1]=(0.0151205004002)/(o+1.)+(-0.640569061377)+(-0.278017621273)*0.5**o
-        ref[2,3,1,0]=(-0.547314386502)/(o+1.)+(-0.292151423006)+(0.635845368235)*0.5**o
-        ref[2,3,1,1]=(-0.437288046493)/(o+1.)+(0.365679169377)+(0.236860892332)*0.5**o
-        ref[2,3,2,0]=(0.622650933171)/(o+1.)+(-0.582101146943)+(0.096479176127)*0.5**o
-        ref[2,3,2,1]=(0.141212812345)/(o+1.)+(0.276275214404)+(0.259913661654)*0.5**o
-        ref[2,4,0,0]=(-0.368860713612)/(o+1.)+(0.829171484353)+(0.208498140469)*0.5**o
-        ref[2,4,0,1]=(-0.442858585142)/(o+1.)+(-0.467957466114)+(-0.0760701135919)*0.5**o
-        ref[2,4,1,0]=(-0.454726570824)/(o+1.)+(0.139411382046)+(0.694291134331)*0.5**o
-        ref[2,4,1,1]=(0.120271053976)/(o+1.)+(0.703854068751)+(0.505643124198)*0.5**o
-        ref[2,4,2,0]=(-0.742525095759)/(o+1.)+(-0.154259238572)+(0.458890639035)*0.5**o
-        ref[2,4,2,1]=(-0.492076254398)/(o+1.)+(0.270331043624)+(-0.228856512525)*0.5**o
-        ref[3,0,0,0]=(0.105218141263)/(o+1.)+(-0.34143252605)+(0.791320435019)*0.5**o
-        ref[3,0,0,1]=(0.695451719819)/(o+1.)+(-0.419746046297)+(0.384081306848)*0.5**o
-        ref[3,0,1,0]=(0.620920827635)/(o+1.)+(0.669013624153)+(0.176280431402)*0.5**o
-        ref[3,0,1,1]=(0.500131556768)/(o+1.)+(-0.15606100586)+(0.895148060637)*0.5**o
-        ref[3,0,2,0]=(0.914774635339)/(o+1.)+(0.20113661943)+(-0.171375065793)*0.5**o
-        ref[3,0,2,1]=(-0.244763521442)/(o+1.)+(0.240628475969)+(-0.65523706909)*0.5**o
-        ref[3,1,0,0]=(0.744558730681)/(o+1.)+(0.675715869382)+(-0.515742288)*0.5**o
-        ref[3,1,0,1]=(-0.262111371211)/(o+1.)+(0.409386874375)+(0.299920493853)*0.5**o
-        ref[3,1,1,0]=(0.517994656474)/(o+1.)+(0.307128535228)+(-0.491648532317)*0.5**o
-        ref[3,1,1,1]=(0.304223657331)/(o+1.)+(0.107902260923)+(0.291881729319)*0.5**o
-        ref[3,1,2,0]=(-0.566768084047)/(o+1.)+(-0.666306210066)+(0.309288981861)*0.5**o
-        ref[3,1,2,1]=(0.676979754874)/(o+1.)+(0.62630204651)+(-0.680391436031)*0.5**o
-        ref[3,2,0,0]=(-0.389359624725)/(o+1.)+(0.311198719155)+(-0.688464200232)*0.5**o
-        ref[3,2,0,1]=(0.0488067596906)/(o+1.)+(0.390389442826)+(-0.321661287857)*0.5**o
-        ref[3,2,1,0]=(0.997578239775)/(o+1.)+(0.0165008123207)+(-0.172172832131)*0.5**o
-        ref[3,2,1,1]=(0.233819575609)/(o+1.)+(0.523336699388)+(0.500590025777)*0.5**o
-        ref[3,2,2,0]=(0.0701366334357)/(o+1.)+(0.241427681866)+(-0.464931198743)*0.5**o
-        ref[3,2,2,1]=(0.876791526094)/(o+1.)+(0.293936357872)+(-0.352492545609)*0.5**o
-        ref[3,3,0,0]=(-0.985298342079)/(o+1.)+(-0.319004787481)+(0.70346530112)*0.5**o
-        ref[3,3,0,1]=(-0.758645627646)/(o+1.)+(-0.0862539708788)+(0.841285056577)*0.5**o
-        ref[3,3,1,0]=(-0.301781252786)/(o+1.)+(-0.734094431327)+(-0.614293213484)*0.5**o
-        ref[3,3,1,1]=(-0.948032248565)/(o+1.)+(-0.656818260243)+(-0.287510519978)*0.5**o
-        ref[3,3,2,0]=(0.786904887352)/(o+1.)+(-0.359703314582)+(0.145506943729)*0.5**o
-        ref[3,3,2,1]=(-0.237571902274)/(o+1.)+(0.408234845369)+(0.60782215735)*0.5**o
-        ref[3,4,0,0]=(-0.847456183316)/(o+1.)+(0.495560925646)+(0.691107698337)*0.5**o
-        ref[3,4,0,1]=(-0.362440886816)/(o+1.)+(-0.379020891487)+(-0.00167606578449)*0.5**o
-        ref[3,4,1,0]=(-0.317176913637)/(o+1.)+(0.110349805884)+(-0.74026325403)*0.5**o
-        ref[3,4,1,1]=(-0.435125210116)/(o+1.)+(-0.411332608113)+(-0.230005454291)*0.5**o
-        ref[3,4,2,0]=(0.460436795546)/(o+1.)+(-0.48533896554)+(-0.638149620463)*0.5**o
-        ref[3,4,2,1]=(0.632560678557)/(o+1.)+(0.555182655599)+(-0.793537245531)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.816458625566)*x[0]**o+(-0.438180707327)*x[0]+(-0.39836196112)*x[1]**o+(0.641701267855)*x[1]+(0.919064096208)*x[2]**o+(0.0155653082454)*x[2]
-        arg[0,0,0,1]=(-0.709065020122)*x[0]**o+(-0.787938005558)*x[0]+(-0.459829890247)*x[1]**o+(-0.306587811189)*x[1]+(0.648348776519)*x[2]**o+(-0.782857657922)*x[2]
-        arg[0,0,1,0]=(-0.09165636265)*x[0]**o+(-0.215464577259)*x[0]+(-0.445060581145)*x[1]**o+(0.541797069021)*x[1]+(-0.312096860473)*x[2]**o+(0.307061070632)*x[2]
-        arg[0,0,1,1]=(0.900670566988)*x[0]**o+(-0.157226841228)*x[0]+(-0.00514019601556)*x[1]**o+(0.167616993369)*x[1]+(0.331077209212)*x[2]**o+(0.0797784869412)*x[2]
-        arg[0,0,2,0]=(-0.883617789072)*x[0]**o+(-0.233507045302)*x[0]+(0.540311388635)*x[1]**o+(-0.0698351272775)*x[1]+(0.598059668701)*x[2]**o+(-0.842961707358)*x[2]
-        arg[0,0,2,1]=(-0.770041366552)*x[0]**o+(-0.683157969301)*x[0]+(0.235580399076)*x[1]**o+(-0.994177047985)*x[1]+(-0.90074656484)*x[2]**o+(-0.0133600820046)*x[2]
-        arg[0,1,0,0]=(0.90396926296)*x[0]**o+(0.0492056402145)*x[0]+(0.32744155595)*x[1]**o+(0.0162505824727)*x[1]+(0.386607661085)*x[2]**o+(0.759639829913)*x[2]
-        arg[0,1,0,1]=(0.47956310963)*x[0]**o+(0.638067028609)*x[0]+(-0.520596788355)*x[1]**o+(0.476897948019)*x[1]+(0.950320232053)*x[2]**o+(-0.603034001297)*x[2]
-        arg[0,1,1,0]=(-0.75177304495)*x[0]**o+(0.369014786745)*x[0]+(-0.332220011735)*x[1]**o+(-0.835059332186)*x[1]+(0.0494323092557)*x[2]**o+(-0.796200422375)*x[2]
-        arg[0,1,1,1]=(-0.109937058453)*x[0]**o+(0.607637390544)*x[0]+(0.464147925564)*x[1]**o+(0.650325883743)*x[1]+(0.698196425121)*x[2]**o+(0.933002044297)*x[2]
-        arg[0,1,2,0]=(-0.13801307581)*x[0]**o+(0.75768744715)*x[0]+(-0.35990643116)*x[1]**o+(-0.787975707318)*x[1]+(-0.259281382264)*x[2]**o+(0.971003238549)*x[2]
-        arg[0,1,2,1]=(-0.518540484981)*x[0]**o+(0.197912267942)*x[0]+(0.481058074022)*x[1]**o+(0.918189335061)*x[1]+(0.160239271801)*x[2]**o+(0.75950986792)*x[2]
-        arg[0,2,0,0]=(0.286922773164)*x[0]**o+(-0.874592150595)*x[0]+(0.416014232771)*x[1]**o+(-0.492379239759)*x[1]+(0.950640982197)*x[2]**o+(-0.10625158241)*x[2]
-        arg[0,2,0,1]=(-0.116447648923)*x[0]**o+(-0.499481854319)*x[0]+(-0.556602044084)*x[1]**o+(0.753256358343)*x[1]+(0.280780022694)*x[2]**o+(-0.879728755507)*x[2]
-        arg[0,2,1,0]=(-0.322803067618)*x[0]**o+(0.0974878233964)*x[0]+(0.420547949274)*x[1]**o+(0.304839957099)*x[1]+(-0.12605355567)*x[2]**o+(-0.166970509739)*x[2]
-        arg[0,2,1,1]=(0.997823909059)*x[0]**o+(0.76749010767)*x[0]+(0.376351544673)*x[1]**o+(-0.316937252621)*x[1]+(-0.627670639733)*x[2]**o+(0.584121037987)*x[2]
-        arg[0,2,2,0]=(0.516866019209)*x[0]**o+(0.413564799736)*x[0]+(-0.0730736747833)*x[1]**o+(-0.500984764568)*x[1]+(-0.989323894645)*x[2]**o+(-0.261458643035)*x[2]
-        arg[0,2,2,1]=(0.777538237337)*x[0]**o+(-0.0623276952959)*x[0]+(0.167068351133)*x[1]**o+(-0.345550070545)*x[1]+(-0.28166577069)*x[2]**o+(-0.568650037569)*x[2]
-        arg[0,3,0,0]=(-0.622067362782)*x[0]**o+(0.971384323624)*x[0]+(-0.099597286042)*x[1]**o+(-0.265680407306)*x[1]+(-0.446275631545)*x[2]**o+(-0.0637591060995)*x[2]
-        arg[0,3,0,1]=(-0.49698112241)*x[0]**o+(0.766181263321)*x[0]+(-0.977014162391)*x[1]**o+(0.806444170647)*x[1]+(-0.441023882645)*x[2]**o+(-0.919279365683)*x[2]
-        arg[0,3,1,0]=(0.917091542097)*x[0]**o+(-0.67016353228)*x[0]+(0.0468346020734)*x[1]**o+(0.81092419675)*x[1]+(0.174037096652)*x[2]**o+(0.564190407348)*x[2]
-        arg[0,3,1,1]=(-0.437188100982)*x[0]**o+(-0.0857174204982)*x[0]+(-0.971592105442)*x[1]**o+(-0.122352019844)*x[1]+(-0.853225566811)*x[2]**o+(-0.861128476903)*x[2]
-        arg[0,3,2,0]=(-0.841265485658)*x[0]**o+(0.553186811235)*x[0]+(0.414489259007)*x[1]**o+(-0.800997281522)*x[1]+(0.630269543743)*x[2]**o+(0.263584335528)*x[2]
-        arg[0,3,2,1]=(0.383282548921)*x[0]**o+(0.260041562865)*x[0]+(-0.95180999378)*x[1]**o+(0.566954668715)*x[1]+(0.688843907846)*x[2]**o+(-0.166837115553)*x[2]
-        arg[0,4,0,0]=(0.0385891845805)*x[0]**o+(0.324932244772)*x[0]+(-0.946997425504)*x[1]**o+(-0.745439090316)*x[1]+(-0.721657519976)*x[2]**o+(-0.714366519961)*x[2]
-        arg[0,4,0,1]=(-0.387739686761)*x[0]**o+(-0.860915144676)*x[0]+(0.270056169204)*x[1]**o+(-0.914861208322)*x[1]+(-0.453514265988)*x[2]**o+(-0.495768314604)*x[2]
-        arg[0,4,1,0]=(-0.329464483421)*x[0]**o+(0.313424566493)*x[0]+(0.185677682455)*x[1]**o+(-0.720200750426)*x[1]+(0.425742092834)*x[2]**o+(0.505209526425)*x[2]
-        arg[0,4,1,1]=(0.63272559561)*x[0]**o+(-0.026429919604)*x[0]+(-0.14023723263)*x[1]**o+(-0.580805084228)*x[1]+(0.141232832837)*x[2]**o+(0.241327430534)*x[2]
-        arg[0,4,2,0]=(-0.847582850604)*x[0]**o+(0.207270297356)*x[0]+(0.851958035148)*x[1]**o+(0.336594484304)*x[1]+(-0.221434386211)*x[2]**o+(-0.607602400875)*x[2]
-        arg[0,4,2,1]=(-0.722990535113)*x[0]**o+(-0.379964881881)*x[0]+(0.825779173038)*x[1]**o+(-0.285509543358)*x[1]+(-0.518809494335)*x[2]**o+(-0.788507606636)*x[2]
-        arg[1,0,0,0]=(0.0725951752952)*x[0]**o+(-0.282800153416)*x[0]+(-0.0228303688498)*x[1]**o+(-0.863127549259)*x[1]+(-0.383553228278)*x[2]**o+(-0.0151737809185)*x[2]
-        arg[1,0,0,1]=(-0.254920010173)*x[0]**o+(0.160195189848)*x[0]+(0.216407190109)*x[1]**o+(-0.814599655672)*x[1]+(0.771746025302)*x[2]**o+(0.0636221760766)*x[2]
-        arg[1,0,1,0]=(0.486342223622)*x[0]**o+(0.736242651359)*x[0]+(0.720722697611)*x[1]**o+(0.974853194395)*x[1]+(-0.834707965096)*x[2]**o+(-0.947169299038)*x[2]
-        arg[1,0,1,1]=(0.777015150638)*x[0]**o+(-0.228082772046)*x[0]+(-0.51095285588)*x[1]**o+(-0.835057692508)*x[1]+(-0.564012944223)*x[2]**o+(-0.898040787549)*x[2]
-        arg[1,0,2,0]=(0.240813275278)*x[0]**o+(-0.509566588932)*x[0]+(0.247803237451)*x[1]**o+(0.156442781059)*x[1]+(0.618367580757)*x[2]**o+(0.943435734207)*x[2]
-        arg[1,0,2,1]=(-0.670257601629)*x[0]**o+(-0.470716006203)*x[0]+(-0.559207336128)*x[1]**o+(-0.81577896974)*x[1]+(0.0571093198914)*x[2]**o+(0.477103420898)*x[2]
-        arg[1,1,0,0]=(0.985895581872)*x[0]**o+(-0.00359465828149)*x[0]+(0.00739312124399)*x[1]**o+(-0.931299968425)*x[1]+(-0.10047347666)*x[2]**o+(0.410589913002)*x[2]
-        arg[1,1,0,1]=(-0.954132399275)*x[0]**o+(0.159222338169)*x[0]+(-0.865370419503)*x[1]**o+(-0.744696059283)*x[1]+(-0.794993976252)*x[2]**o+(0.961664562839)*x[2]
-        arg[1,1,1,0]=(0.462810965625)*x[0]**o+(0.927378551017)*x[0]+(-0.105005418179)*x[1]**o+(0.282340667975)*x[1]+(-0.443931241323)*x[2]**o+(0.740071617715)*x[2]
-        arg[1,1,1,1]=(0.645629353541)*x[0]**o+(0.848804271896)*x[0]+(-0.882497356826)*x[1]**o+(-0.74661619875)*x[1]+(-0.927133238344)*x[2]**o+(-0.502758459229)*x[2]
-        arg[1,1,2,0]=(-0.554993653726)*x[0]**o+(-0.473286752336)*x[0]+(0.759624773306)*x[1]**o+(0.809169103932)*x[1]+(0.657766085675)*x[2]**o+(0.763913478843)*x[2]
-        arg[1,1,2,1]=(0.1476587556)*x[0]**o+(0.385711162597)*x[0]+(-0.0767252754622)*x[1]**o+(-0.544968629318)*x[1]+(0.16751959089)*x[2]**o+(-0.742697412247)*x[2]
-        arg[1,2,0,0]=(-0.715887407694)*x[0]**o+(0.273818352078)*x[0]+(0.0426629688432)*x[1]**o+(-0.808531265186)*x[1]+(-0.699839650334)*x[2]**o+(-0.332093073009)*x[2]
-        arg[1,2,0,1]=(0.48440337855)*x[0]**o+(0.765443731546)*x[0]+(-0.0761968055499)*x[1]**o+(0.0516389293584)*x[1]+(-0.486224925751)*x[2]**o+(-0.796105709176)*x[2]
-        arg[1,2,1,0]=(0.621562227153)*x[0]**o+(0.907213416636)*x[0]+(0.591392192921)*x[1]**o+(-0.825911160831)*x[1]+(0.690773959314)*x[2]**o+(-0.744144678185)*x[2]
-        arg[1,2,1,1]=(0.472846565983)*x[0]**o+(-0.837395663533)*x[0]+(0.526438435448)*x[1]**o+(0.310053110281)*x[1]+(0.634301291566)*x[2]**o+(0.608270679412)*x[2]
-        arg[1,2,2,0]=(-0.212000572333)*x[0]**o+(0.644218219058)*x[0]+(0.827779140409)*x[1]**o+(0.563968121281)*x[1]+(-0.0556319977635)*x[2]**o+(0.98126338415)*x[2]
-        arg[1,2,2,1]=(-0.632752637148)*x[0]**o+(-0.999490611532)*x[0]+(0.0717950178432)*x[1]**o+(-0.0611949850049)*x[1]+(0.740177288895)*x[2]**o+(0.241010363236)*x[2]
-        arg[1,3,0,0]=(0.390081216336)*x[0]**o+(-0.389460065845)*x[0]+(0.0812808695521)*x[1]**o+(0.0843698990866)*x[1]+(0.672844227186)*x[2]**o+(0.306345015188)*x[2]
-        arg[1,3,0,1]=(-0.402887151891)*x[0]**o+(-0.908615473265)*x[0]+(-0.296307155209)*x[1]**o+(0.228858413043)*x[1]+(0.509401868055)*x[2]**o+(-0.793787805038)*x[2]
-        arg[1,3,1,0]=(0.253947492129)*x[0]**o+(0.401465417831)*x[0]+(-0.942329176703)*x[1]**o+(-0.518371272083)*x[1]+(0.90142806242)*x[2]**o+(0.694084281869)*x[2]
-        arg[1,3,1,1]=(-0.435656267291)*x[0]**o+(-0.743058541536)*x[0]+(-0.22434079396)*x[1]**o+(-0.414125965702)*x[1]+(0.743546448275)*x[2]**o+(0.323188772386)*x[2]
-        arg[1,3,2,0]=(-0.069319863146)*x[0]**o+(-0.0749969565014)*x[0]+(0.29700943253)*x[1]**o+(0.972639470201)*x[1]+(-0.270592469279)*x[2]**o+(-0.355098058901)*x[2]
-        arg[1,3,2,1]=(0.741825647399)*x[0]**o+(0.542055833087)*x[0]+(-0.0684409109262)*x[1]**o+(0.842094761143)*x[1]+(-0.777320219447)*x[2]**o+(0.758570478904)*x[2]
-        arg[1,4,0,0]=(-0.66003338591)*x[0]**o+(-0.393755284573)*x[0]+(0.617154869065)*x[1]**o+(-0.480999198967)*x[1]+(0.350625972066)*x[2]**o+(0.733472524967)*x[2]
-        arg[1,4,0,1]=(-0.0001759210396)*x[0]**o+(-0.0900574950432)*x[0]+(-0.592936627579)*x[1]**o+(-0.647214933825)*x[1]+(-0.43249743908)*x[2]**o+(-0.901387692551)*x[2]
-        arg[1,4,1,0]=(0.052435899043)*x[0]**o+(0.163326392489)*x[0]+(0.433169876656)*x[1]**o+(0.977133611649)*x[1]+(-0.311959404527)*x[2]**o+(0.297218570651)*x[2]
-        arg[1,4,1,1]=(0.00806522196579)*x[0]**o+(-0.121807466189)*x[0]+(-0.176557734776)*x[1]**o+(0.865146379005)*x[1]+(-0.304648040177)*x[2]**o+(0.269150163824)*x[2]
-        arg[1,4,2,0]=(0.440212388104)*x[0]**o+(-0.590292628428)*x[0]+(-0.595359323633)*x[1]**o+(0.606734888384)*x[1]+(-0.951693103773)*x[2]**o+(-0.539741612207)*x[2]
-        arg[1,4,2,1]=(0.346121727918)*x[0]**o+(0.188961570963)*x[0]+(0.402818736255)*x[1]**o+(-0.474029523974)*x[1]+(-0.95972237672)*x[2]**o+(0.983543070357)*x[2]
-        arg[2,0,0,0]=(-0.801941188348)*x[0]**o+(-0.318215868754)*x[0]+(0.322031073259)*x[1]**o+(-0.00368402006147)*x[1]+(0.473846239338)*x[2]**o+(0.512752561753)*x[2]
-        arg[2,0,0,1]=(0.786459471841)*x[0]**o+(0.941049841845)*x[0]+(0.064717660139)*x[1]**o+(-0.891518891268)*x[1]+(-0.317681565962)*x[2]**o+(-0.672310725168)*x[2]
-        arg[2,0,1,0]=(0.813571093948)*x[0]**o+(-0.146551267883)*x[0]+(0.942106359835)*x[1]**o+(0.165543949281)*x[1]+(-0.0301736488709)*x[2]**o+(0.936915469225)*x[2]
-        arg[2,0,1,1]=(-0.0298664722355)*x[0]**o+(-0.596644819792)*x[0]+(-0.306728572634)*x[1]**o+(0.770671782936)*x[1]+(-0.334606536003)*x[2]**o+(0.888940190159)*x[2]
-        arg[2,0,2,0]=(0.688553055025)*x[0]**o+(-0.241541868482)*x[0]+(-0.694609526571)*x[1]**o+(-0.509896457784)*x[1]+(-0.0610272843414)*x[2]**o+(-0.251290389152)*x[2]
-        arg[2,0,2,1]=(-0.959007707329)*x[0]**o+(-0.193856482901)*x[0]+(-0.138697126551)*x[1]**o+(0.768166305153)*x[1]+(0.951006645306)*x[2]**o+(-0.533986863953)*x[2]
-        arg[2,1,0,0]=(0.648021743651)*x[0]**o+(-0.839074631201)*x[0]+(-0.445337118707)*x[1]**o+(0.997475278653)*x[1]+(-0.154475323496)*x[2]**o+(-0.45292992537)*x[2]
-        arg[2,1,0,1]=(-0.134785884326)*x[0]**o+(-0.906738442209)*x[0]+(0.00509900741927)*x[1]**o+(0.489865232888)*x[1]+(0.620823018353)*x[2]**o+(-0.480127263607)*x[2]
-        arg[2,1,1,0]=(-0.210371458935)*x[0]**o+(0.308453655681)*x[0]+(-0.510473100104)*x[1]**o+(-0.0776488834445)*x[1]+(0.58103002434)*x[2]**o+(0.039267622777)*x[2]
-        arg[2,1,1,1]=(-0.124204683462)*x[0]**o+(0.429525935007)*x[0]+(0.183174600008)*x[1]**o+(-0.665914708196)*x[1]+(-0.576713549033)*x[2]**o+(-0.3788567811)*x[2]
-        arg[2,1,2,0]=(-0.864065825608)*x[0]**o+(0.644046059464)*x[0]+(-0.265959280151)*x[1]**o+(0.989465634246)*x[1]+(0.536466956842)*x[2]**o+(0.689999246325)*x[2]
-        arg[2,1,2,1]=(0.37622234855)*x[0]**o+(-0.905554688955)*x[0]+(-0.0258037833143)*x[1]**o+(-0.23415538846)*x[1]+(-0.64461795706)*x[2]**o+(0.262259040646)*x[2]
-        arg[2,2,0,0]=(0.0541619627989)*x[0]**o+(-0.978918782799)*x[0]+(0.478333900479)*x[1]**o+(0.958652455667)*x[1]+(-0.746701804693)*x[2]**o+(-0.557405653804)*x[2]
-        arg[2,2,0,1]=(0.611472347101)*x[0]**o+(-0.409754132769)*x[0]+(0.291274496706)*x[1]**o+(0.901983238042)*x[1]+(-0.102917678824)*x[2]**o+(-0.668205224505)*x[2]
-        arg[2,2,1,0]=(-0.926062469523)*x[0]**o+(0.101032437783)*x[0]+(-0.385485330853)*x[1]**o+(0.0521756546126)*x[1]+(0.132320977758)*x[2]**o+(0.471619572767)*x[2]
-        arg[2,2,1,1]=(0.0689111652346)*x[0]**o+(-0.517070173331)*x[0]+(-0.599184868344)*x[1]**o+(-0.814239996638)*x[1]+(0.97403158037)*x[2]**o+(-0.546843890524)*x[2]
-        arg[2,2,2,0]=(-0.133251706696)*x[0]**o+(-0.0954736405212)*x[0]+(0.780584398494)*x[1]**o+(-0.505305860913)*x[1]+(-0.11518705364)*x[2]**o+(0.0855698333433)*x[2]
-        arg[2,2,2,1]=(-0.567309977436)*x[0]**o+(-0.284182307402)*x[0]+(0.220302202269)*x[1]**o+(-0.252628588826)*x[1]+(-0.368390646272)*x[2]**o+(-0.577499260947)*x[2]
-        arg[2,3,0,0]=(0.477968626266)*x[0]**o+(0.522764690241)*x[0]+(-0.0339165683557)*x[1]**o+(0.623897338329)*x[1]+(-0.169558925831)*x[2]**o+(-0.426663511213)*x[2]
-        arg[2,3,0,1]=(0.185482762361)*x[0]**o+(0.496017413966)*x[0]+(-0.217189284009)*x[1]**o+(0.488205372581)*x[1]+(0.445762454794)*x[2]**o+(-0.423587587222)*x[2]
-        arg[2,3,1,0]=(-0.489549524298)*x[0]**o+(-0.482299084307)*x[0]+(0.567729727254)*x[1]**o+(-0.341933025591)*x[1]+(-0.325429025641)*x[2]**o+(0.476030984261)*x[2]
-        arg[2,3,1,1]=(-0.390754226646)*x[0]**o+(-0.980255652462)*x[0]+(0.109328516217)*x[1]**o+(-0.0141509875662)*x[1]+(0.486458644215)*x[2]**o+(-0.668018419371)*x[2]
-        arg[2,3,2,0]=(0.352912006363)*x[0]**o+(-0.542969561227)*x[0]+(0.512067200296)*x[1]**o+(0.661110389562)*x[1]+(0.289744832231)*x[2]**o+(-0.176943484459)*x[2]
-        arg[2,3,2,1]=(0.535262244127)*x[0]**o+(0.528325019892)*x[0]+(-0.106312276613)*x[1]**o+(-0.484575045858)*x[1]+(-0.407717587021)*x[2]**o+(-0.786366604025)*x[2]
-        arg[2,4,0,0]=(-0.511771630262)*x[0]**o+(-0.590485876141)*x[0]+(0.493685168985)*x[1]**o+(-0.726700517739)*x[1]+(-0.213137223607)*x[2]**o+(-0.566923814015)*x[2]
-        arg[2,4,0,1]=(0.421559088561)*x[0]**o+(0.838784944841)*x[0]+(-0.693654869402)*x[1]**o+(-0.0755493272975)*x[1]+(-0.174245799979)*x[2]**o+(0.242245946157)*x[2]
-        arg[2,4,1,0]=(0.681235817735)*x[0]**o+(-0.313564199551)*x[0]+(0.663598935418)*x[1]**o+(-0.604327253895)*x[1]+(0.698985821444)*x[2]**o+(0.298899431146)*x[2]
-        arg[2,4,1,1]=(0.432866305507)*x[0]**o+(-0.891501121013)*x[0]+(-0.290106178906)*x[1]**o+(0.268152357012)*x[1]+(0.75279498948)*x[2]**o+(0.211312203371)*x[2]
-        arg[2,4,2,0]=(-0.956901622446)*x[0]**o+(0.742548241435)*x[0]+(-0.956209816095)*x[1]**o+(-0.539017080821)*x[1]+(-0.08062797007)*x[2]**o+(0.383843198102)*x[2]
-        arg[2,4,2,1]=(-0.16700370288)*x[0]**o+(0.388837619298)*x[0]+(-0.190586726252)*x[1]**o+(0.916004535916)*x[1]+(0.310254387059)*x[2]**o+(-0.380371301717)*x[2]
-        arg[3,0,0,0]=(0.64046380712)*x[0]**o+(0.254058760972)*x[0]+(-0.829050222873)*x[1]**o+(0.289942284927)*x[1]+(0.196268101069)*x[2]**o+(0.748880970446)*x[2]
-        arg[3,0,0,1]=(-0.226057776579)*x[0]**o+(0.982685008224)*x[0]+(0.819680514589)*x[1]**o+(0.48005222662)*x[1]+(-0.615248069776)*x[2]**o+(-0.0923489923012)*x[2]
-        arg[3,0,1,0]=(-0.358031084019)*x[0]**o+(-0.83941518843)*x[0]+(-0.0687218422525)*x[1]**o+(-0.648976147029)*x[1]+(0.711009285701)*x[2]**o+(0.360758898243)*x[2]
-        arg[3,0,1,1]=(-0.312175299678)*x[0]**o+(0.360877864123)*x[0]+(0.653283960509)*x[1]**o+(0.323527948404)*x[1]+(-0.278454805659)*x[2]**o+(0.0585194127844)*x[2]
-        arg[3,0,2,0]=(0.367207247645)*x[0]**o+(-0.0743547693027)*x[0]+(-0.473358544608)*x[1]**o+(0.332985041128)*x[1]+(-0.899612971909)*x[2]**o+(0.69409768473)*x[2]
-        arg[3,0,2,1]=(-0.806787228991)*x[0]**o+(-0.110344204889)*x[0]+(-0.631610779885)*x[1]**o+(0.0239853435419)*x[1]+(0.83036063388)*x[2]**o+(0.623825256849)*x[2]
-        arg[3,1,0,0]=(-0.268344201624)*x[0]**o+(-0.59230799177)*x[0]+(0.493719194706)*x[1]**o+(-0.128351291806)*x[1]+(0.0584636422077)*x[2]**o+(0.0859725996454)*x[2]
-        arg[3,1,0,1]=(-0.870410307785)*x[0]**o+(-0.917370176071)*x[0]+(0.395701966434)*x[1]**o+(0.694856510628)*x[1]+(-0.748440730513)*x[2]**o+(0.748465450614)*x[2]
-        arg[3,1,1,0]=(-0.178465888488)*x[0]**o+(-0.956884701156)*x[0]+(0.0472790389286)*x[1]**o+(0.946702274722)*x[1]+(-0.200668750878)*x[2]**o+(-0.0104023894447)*x[2]
-        arg[3,1,1,1]=(0.113559334778)*x[0]**o+(0.270505514561)*x[0]+(-0.238008799138)*x[1]**o+(0.533067625871)*x[1]+(-0.586814102301)*x[2]**o+(0.045657074859)*x[2]
-        arg[3,1,2,0]=(-0.574716699633)*x[0]**o+(-0.659499274639)*x[0]+(0.892605757655)*x[1]**o+(-0.39697940457)*x[1]+(0.363011145793)*x[2]**o+(-0.364722526091)*x[2]
-        arg[3,1,2,1]=(-0.0193167048813)*x[0]**o+(0.761104649925)*x[0]+(0.490164183635)*x[1]**o+(0.10693267057)*x[1]+(0.635328989408)*x[2]**o+(-0.353114187925)*x[2]
-        arg[3,2,0,0]=(0.0777423524941)*x[0]**o+(-0.431011355257)*x[0]+(-0.356762042134)*x[1]**o+(-0.94361679144)*x[1]+(-0.716191700456)*x[2]**o+(0.49906825221)*x[2]
-        arg[3,2,0,1]=(0.80859948321)*x[0]**o+(0.542680788872)*x[0]+(-0.626897369633)*x[1]**o+(-0.821877255135)*x[1]+(-0.455575534023)*x[2]**o+(0.317480554025)*x[2]
-        arg[3,2,1,0]=(-0.0144328272818)*x[0]**o+(-0.395367848628)*x[0]+(-0.601042089925)*x[1]**o+(-0.0822921879892)*x[1]+(0.896199761801)*x[2]**o+(-0.215055215166)*x[2]
-        arg[3,2,1,1]=(0.377945289524)*x[0]**o+(-0.580064012583)*x[0]+(0.993926713349)*x[1]**o+(-0.736307101943)*x[1]+(-0.939628422411)*x[2]**o+(-0.923219473393)*x[2]
-        arg[3,2,2,0]=(-0.733150287394)*x[0]**o+(0.692501827859)*x[0]+(0.904655347343)*x[1]**o+(0.310386512564)*x[1]+(-0.93795078156)*x[2]**o+(0.772534565721)*x[2]
-        arg[3,2,2,1]=(-0.155229801255)*x[0]**o+(0.580356480314)*x[0]+(0.0673352927499)*x[1]**o+(-0.274975805243)*x[1]+(0.553818209037)*x[2]**o+(-0.835142674988)*x[2]
-        arg[3,3,0,0]=(0.60752130978)*x[0]**o+(0.847750395856)*x[0]+(0.8635279539)*x[1]**o+(0.16341072973)*x[1]+(0.470011948821)*x[2]**o+(0.41529971393)*x[2]
-        arg[3,3,0,1]=(0.755049219363)*x[0]**o+(0.66080573214)*x[0]+(-0.0256982576552)*x[1]**o+(-0.0311937109251)*x[1]+(-0.028843413794)*x[2]**o+(-0.19345503082)*x[2]
-        arg[3,3,1,0]=(-0.39765237082)*x[0]**o+(-0.746359385218)*x[0]+(0.275396324626)*x[1]**o+(0.064571659107)*x[1]+(0.771289010752)*x[2]**o+(-6.69891594269e-05)*x[2]
-        arg[3,3,1,1]=(0.350497253938)*x[0]**o+(-0.236419516561)*x[0]+(0.673483791847)*x[1]**o+(-0.934644138115)*x[1]+(0.994408125332)*x[2]**o+(-0.398423596854)*x[2]
-        arg[3,3,2,0]=(-0.952544750261)*x[0]**o+(0.24256752245)*x[0]+(0.376782843601)*x[1]**o+(-0.349840168156)*x[1]+(-0.260325141903)*x[2]**o+(-0.452866344447)*x[2]
-        arg[3,3,2,1]=(-0.0232941915849)*x[0]**o+(0.191625715695)*x[0]+(-0.490187753329)*x[1]**o+(-0.823976612466)*x[1]+(0.476804203752)*x[2]**o+(0.61057521184)*x[2]
-        arg[3,4,0,0]=(0.0279130167137)*x[0]**o+(-0.134953133648)*x[0]+(0.0821614836141)*x[1]**o+(-0.894046763697)*x[1]+(-0.497197221983)*x[2]**o+(0.586297244251)*x[2]
-        arg[3,4,0,1]=(0.0423746259802)*x[0]**o+(0.458075512165)*x[0]+(0.855157549678)*x[1]**o+(-0.607654212682)*x[1]+(-0.672693159955)*x[2]**o+(-0.300116892313)*x[2]
-        arg[3,4,1,0]=(-0.695685046398)*x[0]**o+(-0.709807910289)*x[0]+(-0.167879145281)*x[1]**o+(0.524084329764)*x[1]+(0.763706690019)*x[2]**o+(-0.219502671318)*x[2]
-        arg[3,4,1,1]=(0.864599640696)*x[0]**o+(-0.341125612414)*x[0]+(-0.548888211648)*x[1]**o+(0.918497762429)*x[1]+(-0.445600024463)*x[2]**o+(0.221658300325)*x[2]
-        arg[3,4,2,0]=(-0.893419673448)*x[0]**o+(0.653718653341)*x[0]+(0.323868832441)*x[1]**o+(0.905933530129)*x[1]+(0.62045953406)*x[2]**o+(0.145474797235)*x[2]
-        arg[3,4,2,1]=(0.480643160777)*x[0]**o+(-0.15896921521)*x[0]+(-0.329564714008)*x[1]**o+(-0.613303857496)*x[1]+(-0.483827450625)*x[2]**o+(-0.91023336048)*x[2]
-        ref[0,0,0,0]=(0.520702135089)/(o+1.)+(0.109542934387)+(0.816458625566)*0.5**o
-        ref[0,0,0,1]=(0.188518886272)/(o+1.)+(-0.938691737334)+(-0.709065020122)*0.5**o
-        ref[0,0,1,0]=(-0.757157441618)/(o+1.)+(0.316696781197)+(-0.09165636265)*0.5**o
-        ref[0,0,1,1]=(0.325937013197)/(o+1.)+(0.0450843195409)+(0.900670566988)*0.5**o
-        ref[0,0,2,0]=(1.13837105734)/(o+1.)+(-0.573151939969)+(-0.883617789072)*0.5**o
-        ref[0,0,2,1]=(-0.665166165764)/(o+1.)+(-0.845347549645)+(-0.770041366552)*0.5**o
-        ref[0,1,0,0]=(0.714049217035)/(o+1.)+(0.4125480263)+(0.90396926296)*0.5**o
-        ref[0,1,0,1]=(0.429723443697)/(o+1.)+(0.255965487666)+(0.47956310963)*0.5**o
-        ref[0,1,1,0]=(-0.282787702479)/(o+1.)+(-0.631122483908)+(-0.75177304495)*0.5**o
-        ref[0,1,1,1]=(1.16234435068)/(o+1.)+(1.09548265929)+(-0.109937058453)*0.5**o
-        ref[0,1,2,0]=(-0.619187813423)/(o+1.)+(0.47035748919)+(-0.13801307581)*0.5**o
-        ref[0,1,2,1]=(0.641297345823)/(o+1.)+(0.937805735461)+(-0.518540484981)*0.5**o
-        ref[0,2,0,0]=(1.36665521497)/(o+1.)+(-0.736611486382)+(0.286922773164)*0.5**o
-        ref[0,2,0,1]=(-0.27582202139)/(o+1.)+(-0.312977125741)+(-0.116447648923)*0.5**o
-        ref[0,2,1,0]=(0.294494393603)/(o+1.)+(0.117678635379)+(-0.322803067618)*0.5**o
-        ref[0,2,1,1]=(-0.251319095061)/(o+1.)+(0.517336946518)+(0.997823909059)*0.5**o
-        ref[0,2,2,0]=(-1.06239756943)/(o+1.)+(-0.174439303934)+(0.516866019209)*0.5**o
-        ref[0,2,2,1]=(-0.114597419557)/(o+1.)+(-0.488263901705)+(0.777538237337)*0.5**o
-        ref[0,3,0,0]=(-0.545872917587)/(o+1.)+(0.320972405109)+(-0.622067362782)*0.5**o
-        ref[0,3,0,1]=(-1.41803804504)/(o+1.)+(0.326673034142)+(-0.49698112241)*0.5**o
-        ref[0,3,1,0]=(0.220871698725)/(o+1.)+(0.352475535909)+(0.917091542097)*0.5**o
-        ref[0,3,1,1]=(-1.82481767225)/(o+1.)+(-0.534598958622)+(-0.437188100982)*0.5**o
-        ref[0,3,2,0]=(1.04475880275)/(o+1.)+(0.00788693262039)+(-0.841265485658)*0.5**o
-        ref[0,3,2,1]=(-0.262966085934)/(o+1.)+(0.330079558014)+(0.383282548921)*0.5**o
-        ref[0,4,0,0]=(-1.66865494548)/(o+1.)+(-0.567436682752)+(0.0385891845805)*0.5**o
-        ref[0,4,0,1]=(-0.183458096784)/(o+1.)+(-1.1357723338)+(-0.387739686761)*0.5**o
-        ref[0,4,1,0]=(0.611419775289)/(o+1.)+(0.0492166712458)+(-0.329464483421)*0.5**o
-        ref[0,4,1,1]=(0.000995600207189)/(o+1.)+(-0.182953786649)+(0.63272559561)*0.5**o
-        ref[0,4,2,0]=(0.630523648936)/(o+1.)+(-0.0318688096074)+(-0.847582850604)*0.5**o
-        ref[0,4,2,1]=(0.306969678703)/(o+1.)+(-0.726991015938)+(-0.722990535113)*0.5**o
-        ref[1,0,0,0]=(-0.406383597128)/(o+1.)+(-0.580550741796)+(0.0725951752952)*0.5**o
-        ref[1,0,0,1]=(0.988153215411)/(o+1.)+(-0.295391144874)+(-0.254920010173)*0.5**o
-        ref[1,0,1,0]=(-0.113985267485)/(o+1.)+(0.381963273358)+(0.486342223622)*0.5**o
-        ref[1,0,1,1]=(-1.0749658001)/(o+1.)+(-0.980590626052)+(0.777015150638)*0.5**o
-        ref[1,0,2,0]=(0.866170818208)/(o+1.)+(0.295155963167)+(0.240813275278)*0.5**o
-        ref[1,0,2,1]=(-0.502098016236)/(o+1.)+(-0.404695777523)+(-0.670257601629)*0.5**o
-        ref[1,1,0,0]=(-0.0930803554155)/(o+1.)+(-0.262152356852)+(0.985895581872)*0.5**o
-        ref[1,1,0,1]=(-1.66036439576)/(o+1.)+(0.188095420862)+(-0.954132399275)*0.5**o
-        ref[1,1,1,0]=(-0.548936659502)/(o+1.)+(0.974895418354)+(0.462810965625)*0.5**o
-        ref[1,1,1,1]=(-1.80963059517)/(o+1.)+(-0.200285193041)+(0.645629353541)*0.5**o
-        ref[1,1,2,0]=(1.41739085898)/(o+1.)+(0.549897915219)+(-0.554993653726)*0.5**o
-        ref[1,1,2,1]=(0.0907943154278)/(o+1.)+(-0.450977439484)+(0.1476587556)*0.5**o
-        ref[1,2,0,0]=(-0.657176681491)/(o+1.)+(-0.433402993059)+(-0.715887407694)*0.5**o
-        ref[1,2,0,1]=(-0.562421731301)/(o+1.)+(0.0104884758643)+(0.48440337855)*0.5**o
-        ref[1,2,1,0]=(1.28216615223)/(o+1.)+(-0.33142121119)+(0.621562227153)*0.5**o
-        ref[1,2,1,1]=(1.16073972701)/(o+1.)+(0.0404640630801)+(0.472846565983)*0.5**o
-        ref[1,2,2,0]=(0.772147142645)/(o+1.)+(1.09472486224)+(-0.212000572333)*0.5**o
-        ref[1,2,2,1]=(0.811972306738)/(o+1.)+(-0.409837616651)+(-0.632752637148)*0.5**o
-        ref[1,3,0,0]=(0.754125096738)/(o+1.)+(0.000627424214716)+(0.390081216336)*0.5**o
-        ref[1,3,0,1]=(0.213094712846)/(o+1.)+(-0.73677243263)+(-0.402887151891)*0.5**o
-        ref[1,3,1,0]=(-0.0409011142831)/(o+1.)+(0.288589213809)+(0.253947492129)*0.5**o
-        ref[1,3,1,1]=(0.519205654314)/(o+1.)+(-0.416997867426)+(-0.435656267291)*0.5**o
-        ref[1,3,2,0]=(0.0264169632513)/(o+1.)+(0.271272227399)+(-0.069319863146)*0.5**o
-        ref[1,3,2,1]=(-0.845761130374)/(o+1.)+(1.07136053657)+(0.741825647399)*0.5**o
-        ref[1,4,0,0]=(0.967780841131)/(o+1.)+(-0.0706409792865)+(-0.66003338591)*0.5**o
-        ref[1,4,0,1]=(-1.02543406666)/(o+1.)+(-0.81933006071)+(-0.0001759210396)*0.5**o
-        ref[1,4,1,0]=(0.121210472128)/(o+1.)+(0.718839287394)+(0.052435899043)*0.5**o
-        ref[1,4,1,1]=(-0.481205774953)/(o+1.)+(0.50624453832)+(0.00806522196579)*0.5**o
-        ref[1,4,2,0]=(-1.54705242741)/(o+1.)+(-0.261649676126)+(0.440212388104)*0.5**o
-        ref[1,4,2,1]=(-0.556903640465)/(o+1.)+(0.349237558673)+(0.346121727918)*0.5**o
-        ref[2,0,0,0]=(0.795877312597)/(o+1.)+(0.0954263364687)+(-0.801941188348)*0.5**o
-        ref[2,0,0,1]=(-0.252963905823)/(o+1.)+(-0.311389887295)+(0.786459471841)*0.5**o
-        ref[2,0,1,0]=(0.911932710964)/(o+1.)+(0.477954075311)+(0.813571093948)*0.5**o
-        ref[2,0,1,1]=(-0.641335108636)/(o+1.)+(0.531483576652)+(-0.0298664722355)*0.5**o
-        ref[2,0,2,0]=(-0.755636810913)/(o+1.)+(-0.501364357709)+(0.688553055025)*0.5**o
-        ref[2,0,2,1]=(0.812309518755)/(o+1.)+(0.0201614791497)+(-0.959007707329)*0.5**o
-        ref[2,1,0,0]=(-0.599812442203)/(o+1.)+(-0.147264638959)+(0.648021743651)*0.5**o
-        ref[2,1,0,1]=(0.625922025772)/(o+1.)+(-0.448500236464)+(-0.134785884326)*0.5**o
-        ref[2,1,1,0]=(0.0705569242367)/(o+1.)+(0.135036197507)+(-0.210371458935)*0.5**o
-        ref[2,1,1,1]=(-0.393538949024)/(o+1.)+(-0.307622777145)+(-0.124204683462)*0.5**o
-        ref[2,1,2,0]=(0.270507676691)/(o+1.)+(1.16175547002)+(-0.864065825608)*0.5**o
-        ref[2,1,2,1]=(-0.670421740374)/(o+1.)+(-0.438725518385)+(0.37622234855)*0.5**o
-        ref[2,2,0,0]=(-0.268367904213)/(o+1.)+(-0.288835990468)+(0.0541619627989)*0.5**o
-        ref[2,2,0,1]=(0.188356817882)/(o+1.)+(-0.0879880596161)+(0.611472347101)*0.5**o
-        ref[2,2,1,0]=(-0.253164353095)/(o+1.)+(0.312413832582)+(-0.926062469523)*0.5**o
-        ref[2,2,1,1]=(0.374846712027)/(o+1.)+(-0.939077030246)+(0.0689111652346)*0.5**o
-        ref[2,2,2,0]=(0.665397344854)/(o+1.)+(-0.257604834045)+(-0.133251706696)*0.5**o
-        ref[2,2,2,1]=(-0.148088444003)/(o+1.)+(-0.557155078588)+(-0.567309977436)*0.5**o
-        ref[2,3,0,0]=(-0.203475494187)/(o+1.)+(0.359999258678)+(0.477968626266)*0.5**o
-        ref[2,3,0,1]=(0.228573170785)/(o+1.)+(0.280317599662)+(0.185482762361)*0.5**o
-        ref[2,3,1,0]=(0.242300701614)/(o+1.)+(-0.174100562819)+(-0.489549524298)*0.5**o
-        ref[2,3,1,1]=(0.595787160431)/(o+1.)+(-0.8312125297)+(-0.390754226646)*0.5**o
-        ref[2,3,2,0]=(0.801812032527)/(o+1.)+(-0.0294013280621)+(0.352912006363)*0.5**o
-        ref[2,3,2,1]=(-0.514029863634)/(o+1.)+(-0.371308314996)+(0.535262244127)*0.5**o
-        ref[2,4,0,0]=(0.280547945378)/(o+1.)+(-0.942055103948)+(-0.511771630262)*0.5**o
-        ref[2,4,0,1]=(-0.867900669381)/(o+1.)+(0.50274078185)+(0.421559088561)*0.5**o
-        ref[2,4,1,0]=(1.36258475686)/(o+1.)+(-0.30949601115)+(0.681235817735)*0.5**o
-        ref[2,4,1,1]=(0.462688810574)/(o+1.)+(-0.206018280315)+(0.432866305507)*0.5**o
-        ref[2,4,2,0]=(-1.03683778617)/(o+1.)+(0.293687179358)+(-0.956901622446)*0.5**o
-        ref[2,4,2,1]=(0.119667660807)/(o+1.)+(0.462235426749)+(-0.16700370288)*0.5**o
-        ref[3,0,0,0]=(-0.632782121804)/(o+1.)+(0.646441008172)+(0.64046380712)*0.5**o
-        ref[3,0,0,1]=(0.204432444813)/(o+1.)+(0.685194121272)+(-0.226057776579)*0.5**o
-        ref[3,0,1,0]=(0.642287443449)/(o+1.)+(-0.563816218608)+(-0.358031084019)*0.5**o
-        ref[3,0,1,1]=(0.37482915485)/(o+1.)+(0.371462612656)+(-0.312175299678)*0.5**o
-        ref[3,0,2,0]=(-1.37297151652)/(o+1.)+(0.476363978278)+(0.367207247645)*0.5**o
-        ref[3,0,2,1]=(0.198749853995)/(o+1.)+(0.268733197751)+(-0.806787228991)*0.5**o
-        ref[3,1,0,0]=(0.552182836914)/(o+1.)+(-0.317343341965)+(-0.268344201624)*0.5**o
-        ref[3,1,0,1]=(-0.352738764079)/(o+1.)+(0.262975892585)+(-0.870410307785)*0.5**o
-        ref[3,1,1,0]=(-0.153389711949)/(o+1.)+(-0.0102924079393)+(-0.178465888488)*0.5**o
-        ref[3,1,1,1]=(-0.824822901439)/(o+1.)+(0.424615107645)+(0.113559334778)*0.5**o
-        ref[3,1,2,0]=(1.25561690345)/(o+1.)+(-0.71060060265)+(-0.574716699633)*0.5**o
-        ref[3,1,2,1]=(1.12549317304)/(o+1.)+(0.257461566285)+(-0.0193167048813)*0.5**o
-        ref[3,2,0,0]=(-1.07295374259)/(o+1.)+(-0.437779947243)+(0.0777423524941)*0.5**o
-        ref[3,2,0,1]=(-1.08247290366)/(o+1.)+(0.019142043881)+(0.80859948321)*0.5**o
-        ref[3,2,1,0]=(0.295157671875)/(o+1.)+(-0.346357625892)+(-0.0144328272818)*0.5**o
-        ref[3,2,1,1]=(0.054298290938)/(o+1.)+(-1.11979529396)+(0.377945289524)*0.5**o
-        ref[3,2,2,0]=(-0.0332954342171)/(o+1.)+(0.887711453071)+(-0.733150287394)*0.5**o
-        ref[3,2,2,1]=(0.621153501787)/(o+1.)+(-0.264880999958)+(-0.155229801255)*0.5**o
-        ref[3,3,0,0]=(1.33353990272)/(o+1.)+(0.713230419758)+(0.60752130978)*0.5**o
-        ref[3,3,0,1]=(-0.0545416714491)/(o+1.)+(0.218078495198)+(0.755049219363)*0.5**o
-        ref[3,3,1,0]=(1.04668533538)/(o+1.)+(-0.340927357635)+(-0.39765237082)*0.5**o
-        ref[3,3,1,1]=(1.66789191718)/(o+1.)+(-0.784743625765)+(0.350497253938)*0.5**o
-        ref[3,3,2,0]=(0.116457701698)/(o+1.)+(-0.280069495076)+(-0.952544750261)*0.5**o
-        ref[3,3,2,1]=(-0.0133835495768)/(o+1.)+(-0.0108878424651)+(-0.0232941915849)*0.5**o
-        ref[3,4,0,0]=(-0.415035738369)/(o+1.)+(-0.221351326547)+(0.0279130167137)*0.5**o
-        ref[3,4,0,1]=(0.182464389723)/(o+1.)+(-0.224847796415)+(0.0423746259802)*0.5**o
-        ref[3,4,1,0]=(0.595827544738)/(o+1.)+(-0.202613125922)+(-0.695685046398)*0.5**o
-        ref[3,4,1,1]=(-0.99448823611)/(o+1.)+(0.39951522517)+(0.864599640696)*0.5**o
-        ref[3,4,2,0]=(0.944328366501)/(o+1.)+(0.852563490353)+(-0.893419673448)*0.5**o
-        ref[3,4,2,1]=(-0.813392164634)/(o+1.)+(-0.841253216593)+(0.480643160777)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      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.241972460279)*x[0]+(0.539729925673)*x[1]
-        ref=(-0.11832904353)/(o+1.)+(0.649911364492)+(-0.399791299503)*0.5**o
-      else:
-        arg=(0.53919797656)*x[0]+(0.379010664884)*x[1]+(0.274416064529)*x[2]
-        ref=(0.307947301472)/(o+1.)+(0.120674157748)+(0.643329089005)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      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.84849017056)*x[0]+(-0.161962845202)*x[1]
-        arg[1]=(-0.794717919135)*x[0]+(1.16003773358)*x[1]
-        ref[0]=(0.780514448202)/(o+1.)+(-0.34628958021)+(0.598592037576)*0.5**o
-        ref[1]=(0.570158156278)/(o+1.)+(0.241192316704)+(-0.687222975237)*0.5**o
-      else:
-        arg[0]=(-0.637352163634)*x[0]+(1.49477462643)*x[1]+(-0.284018740238)*x[2]
-        arg[1]=(0.125937459904)*x[0]+(-0.206499869891)*x[1]+(-0.342856240345)*x[2]
-        ref[0]=(-0.274486314451)/(o+1.)+(0.379737553853)+(0.0884149293071)*0.5**o
-        ref[1]=(-0.78452814021)/(o+1.)+(-0.122017410137)+(0.605144310151)*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.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.440868762581)*x[0]+(-0.216223666616)*x[1]
-        arg[0,1]=(-1.78807355591)*x[0]+(-0.208278123838)*x[1]
-        arg[0,2]=(-0.448066998103)*x[0]+(-0.819815507826)*x[1]
-        arg[0,3]=(1.27247881689)*x[0]+(0.0653439567221)*x[1]
-        arg[0,4]=(-1.00344990223)*x[0]+(-0.291263790583)*x[1]
-        arg[1,0]=(0.440080423838)*x[0]+(0.0356836558113)*x[1]
-        arg[1,1]=(-1.49545340091)*x[0]+(-0.133615590211)*x[1]
-        arg[1,2]=(1.05947638385)*x[0]+(0.408685904238)*x[1]
-        arg[1,3]=(-0.170309086605)*x[0]+(0.660523970285)*x[1]
-        arg[1,4]=(0.764323678475)*x[0]+(-0.529415080303)*x[1]
-        arg[2,0]=(0.55270081325)*x[0]+(-1.60630146231)*x[1]
-        arg[2,1]=(1.57419330248)*x[0]+(-1.24644288706)*x[1]
-        arg[2,2]=(0.0416757238363)*x[0]+(0.0247379738465)*x[1]
-        arg[2,3]=(1.0200370393)*x[0]+(0.364209137693)*x[1]
-        arg[2,4]=(-1.21858490389)*x[0]+(0.523056254546)*x[1]
-        arg[3,0]=(0.0524205820842)*x[0]+(1.65953217854)*x[1]
-        arg[3,1]=(1.21824883395)*x[0]+(0.905190834998)*x[1]
-        arg[3,2]=(0.226344434525)*x[0]+(-0.735349531462)*x[1]
-        arg[3,3]=(-1.00295245717)*x[0]+(-0.719605376499)*x[1]
-        arg[3,4]=(-0.446228759693)*x[0]+(1.23441974277)*x[1]
-        ref[0,0]=(0.347328582602)/(o+1.)+(-0.520484463519)+(0.0365479152384)*0.5**o
-        ref[0,1]=(-0.274564442352)/(o+1.)+(-0.413557210678)+(-0.894672816039)*0.5**o
-        ref[0,2]=(0.0720644688954)/(o+1.)+(-0.906636966188)+(0.473326957552)*0.5**o
-        ref[0,3]=(-0.747749341777)/(o+1.)+(0.730249972378)+(0.625072170633)*0.5**o
-        ref[0,4]=(-0.194031116169)/(o+1.)+(-0.432063325829)+(-0.236555924983)*0.5**o
-        ref[1,0]=(0.807081538033)/(o+1.)+(-0.612266650007)+(0.893215841629)*0.5**o
-        ref[1,1]=(-0.662516518957)/(o+1.)+(-0.176318925886)+(-0.61391462039)*0.5**o
-        ref[1,2]=(-0.570345636156)/(o+1.)+(0.791877954963)+(0.454752014319)*0.5**o
-        ref[1,3]=(-0.312400910795)/(o+1.)+(0.212935137466)+(0.376745519544)*0.5**o
-        ref[1,4]=(-0.764680414264)/(o+1.)+(0.174215486579)+(0.651158039278)*0.5**o
-        ref[2,0]=(-0.837942771642)/(o+1.)+(-0.187938486702)+(0.160219095985)*0.5**o
-        ref[2,1]=(-0.672421039761)/(o+1.)+(0.17384002882)+(0.652491397549)*0.5**o
-        ref[2,2]=(-0.656187949922)/(o+1.)+(0.559888736121)+(-0.397175824637)*0.5**o
-        ref[2,3]=(0.259558368195)/(o+1.)+(0.55148644978)+(0.0217149092406)*0.5**o
-        ref[2,4]=(-0.188397537901)/(o+1.)+(-0.0561706170512)+(-0.394789877345)*0.5**o
-        ref[3,0]=(0.91055628617)/(o+1.)+(0.574211274098)+(-0.347026073739)*0.5**o
-        ref[3,1]=(0.29225509237)/(o+1.)+(0.64447705482)+(0.542230466941)*0.5**o
-        ref[3,2]=(0.121065624384)/(o+1.)+(0.0316495277836)+(-0.693369776888)*0.5**o
-        ref[3,3]=(-0.943523334976)/(o+1.)+(-0.266302644031)+(-0.246429210629)*0.5**o
-        ref[3,4]=(0.714915399455)/(o+1.)+(0.459963131994)+(-0.846650680369)*0.5**o
-      else:
-        arg[0,0]=(-0.493869713454)*x[0]+(-0.381969413515)*x[1]+(1.59862368848)*x[2]
-        arg[0,1]=(-0.581245543547)*x[0]+(0.961117271889)*x[1]+(-0.158073515343)*x[2]
-        arg[0,2]=(-0.635283143641)*x[0]+(0.695573236987)*x[1]+(-0.719180832278)*x[2]
-        arg[0,3]=(-0.737780596733)*x[0]+(-1.11171283352)*x[1]+(0.459954346315)*x[2]
-        arg[0,4]=(1.12522065074)*x[0]+(-1.08427904854)*x[1]+(-0.715679673556)*x[2]
-        arg[1,0]=(0.972468186181)*x[0]+(-0.211014530435)*x[1]+(-0.734414099002)*x[2]
-        arg[1,1]=(-1.67337704748)*x[0]+(0.871096213089)*x[1]+(1.51063313223)*x[2]
-        arg[1,2]=(-0.222013007834)*x[0]+(1.46474508326)*x[1]+(-0.979243908862)*x[2]
-        arg[1,3]=(1.21195281087)*x[0]+(0.274082389329)*x[1]+(1.56144436465)*x[2]
-        arg[1,4]=(1.35812865884)*x[0]+(1.25819798853)*x[1]+(0.895334048395)*x[2]
-        arg[2,0]=(-0.167404344437)*x[0]+(0.0710591934315)*x[1]+(-0.124469683665)*x[2]
-        arg[2,1]=(-0.492240632996)*x[0]+(-0.317251117382)*x[1]+(0.0195461703529)*x[2]
-        arg[2,2]=(-0.277590266225)*x[0]+(-1.65859476899)*x[1]+(-0.0100216405668)*x[2]
-        arg[2,3]=(-0.0701281298455)*x[0]+(0.502137254703)*x[1]+(0.701220923443)*x[2]
-        arg[2,4]=(-0.72186096407)*x[0]+(-0.900487568179)*x[1]+(-0.735573922826)*x[2]
-        arg[3,0]=(-0.0677324474129)*x[0]+(-0.649963209718)*x[1]+(-0.770861099726)*x[2]
-        arg[3,1]=(0.563588189481)*x[0]+(0.714614932251)*x[1]+(-0.0957764632886)*x[2]
-        arg[3,2]=(1.13337395062)*x[0]+(0.507556316073)*x[1]+(-0.196759085949)*x[2]
-        arg[3,3]=(-1.2636883168)*x[0]+(-0.811660344076)*x[1]+(0.645462052598)*x[2]
-        arg[3,4]=(-0.104175186987)*x[0]+(-0.929176038155)*x[1]+(1.07530379856)*x[2]
-        ref[0,0]=(0.84538674973)/(o+1.)+(0.0569713556632)+(-0.236544899547)*0.5**o
-        ref[0,1]=(-0.307689589699)/(o+1.)+(0.245040337642)+(0.0394071274131)*0.5**o
-        ref[0,2]=(0.955244736357)/(o+1.)+(-0.341771136504)+(-0.930593202281)*0.5**o
-        ref[0,3]=(-0.353490461722)/(o+1.)+(-0.476228433901)+(-0.083591754415)*0.5**o
-        ref[0,4]=(-1.31220485482)/(o+1.)+(0.0466426656676)+(0.544181452128)*0.5**o
-        ref[1,0]=(0.22773475414)/(o+1.)+(-0.488454801654)+(0.776214405914)*0.5**o
-        ref[1,1]=(1.50688678707)/(o+1.)+(0.0851415404695)+(-0.96881757017)*0.5**o
-        ref[1,2]=(0.313471097102)/(o+1.)+(-0.0875594518156)+(0.125135973096)*0.5**o
-        ref[1,3]=(0.269521220179)/(o+1.)+(1.1192007195)+(0.539556905661)*0.5**o
-        ref[1,4]=(1.91499876064)/(o+1.)+(0.509063797893)+(0.578534339343)*0.5**o
-        ref[2,0]=(0.941352651562)/(o+1.)+(-0.966199402186)+(0.770231318139)*0.5**o
-        ref[2,1]=(-0.141490823562)/(o+1.)+(-0.20919987022)+(-0.230055016023)*0.5**o
-        ref[2,2]=(-0.916148047971)/(o+1.)+(-0.371740600192)+(-0.286577427426)*0.5**o
-        ref[2,3]=(0.229516219331)/(o+1.)+(0.274790532736)+(0.354132763498)*0.5**o
-        ref[2,4]=(-1.19120612619)/(o+1.)+(-0.139859859385)+(-0.88699661011)*0.5**o
-        ref[3,0]=(-1.48630121465)/(o+1.)+(0.0744166251063)+(-0.151088792417)*0.5**o
-        ref[3,1]=(-0.335583560513)/(o+1.)+(0.277436410841)+(0.963137397276)*0.5**o
-        ref[3,2]=(-0.673942688644)/(o+1.)+(0.70077509905)+(0.716563671283)*0.5**o
-        ref[3,3]=(-0.148394092795)/(o+1.)+(-0.237190239072)+(-0.807112037336)*0.5**o
-        ref[3,4]=(0.529983886211)/(o+1.)+(-0.371055083588)+(0.254078854382)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.661725715165)*x[0]+(0.219720717581)*x[1]
-        arg[0,0,1]=(-0.642240082304)*x[0]+(-0.279652756776)*x[1]
-        arg[0,1,0]=(0.0204235813151)*x[0]+(-0.374873249933)*x[1]
-        arg[0,1,1]=(1.4418481252)*x[0]+(0.205656834772)*x[1]
-        arg[1,0,0]=(0.65992179951)*x[0]+(-1.04887875458)*x[1]
-        arg[1,0,1]=(-0.195480216199)*x[0]+(-0.373905275039)*x[1]
-        arg[1,1,0]=(0.781251543352)*x[0]+(0.0416248109536)*x[1]
-        arg[1,1,1]=(-0.925751319189)*x[0]+(-0.113992910046)*x[1]
-        arg[2,0,0]=(-0.0767414065227)*x[0]+(-0.156682840973)*x[1]
-        arg[2,0,1]=(0.688457272529)*x[0]+(0.524916336046)*x[1]
-        arg[2,1,0]=(0.753722830084)*x[0]+(-0.890325839466)*x[1]
-        arg[2,1,1]=(0.730789290145)*x[0]+(-0.278986703716)*x[1]
-        arg[3,0,0]=(-0.287376796439)*x[0]+(-0.153987233224)*x[1]
-        arg[3,0,1]=(-1.15687435255)*x[0]+(0.250005890238)*x[1]
-        arg[3,1,0]=(-0.845312830629)*x[0]+(0.256211962352)*x[1]
-        arg[3,1,1]=(-0.574311820519)*x[0]+(-0.440297035998)*x[1]
-        arg[4,0,0]=(-0.360607647308)*x[0]+(-1.29380437557)*x[1]
-        arg[4,0,1]=(1.32019433485)*x[0]+(0.295255956618)*x[1]
-        arg[4,1,0]=(-1.64162941972)*x[0]+(0.117482372162)*x[1]
-        arg[4,1,1]=(-0.303103646619)*x[0]+(-0.88458982681)*x[1]
-        arg[5,0,0]=(-0.666761879038)*x[0]+(-0.735786278877)*x[1]
-        arg[5,0,1]=(0.0892896382617)*x[0]+(-0.45478872773)*x[1]
-        arg[5,1,0]=(-0.50985624415)*x[0]+(-0.400022939567)*x[1]
-        arg[5,1,1]=(1.39240706368)*x[0]+(0.0149740822664)*x[1]
-        ref[0,0,0]=(-0.114834538488)/(o+1.)+(0.240621006484)+(0.515038958264)*0.5**o
-        ref[0,0,1]=(0.588698337077)/(o+1.)+(-0.702256377233)+(-0.10607842169)*0.5**o
-        ref[0,1,0]=(0.13849818224)/(o+1.)+(-0.277555277991)+(0.0621627051247)*0.5**o
-        ref[0,1,1]=(-0.0878009521163)/(o+1.)+(0.630168348947)+(0.474969214192)*0.5**o
-        ref[1,0,0]=(-0.696600538111)/(o+1.)+(-0.343318260912)+(0.994280104861)*0.5**o
-        ref[1,0,1]=(-0.0887026688527)/(o+1.)+(-0.385753227979)+(0.290823633572)*0.5**o
-        ref[1,1,0]=(0.831408608956)/(o+1.)+(-0.242985671853)+(0.477439089057)*0.5**o
-        ref[1,1,1]=(-0.621059053191)/(o+1.)+(-0.0700203481241)+(-0.278644479797)*0.5**o
-        ref[2,0,0]=(0.7890720399)/(o+1.)+(-0.539721196393)+(0.0569461053905)*0.5**o
-        ref[2,0,1]=(-0.228628151401)/(o+1.)+(0.826946074171)+(-0.211890388366)*0.5**o
-        ref[2,1,0]=(-0.837617325493)/(o+1.)+(0.289656653751)+(0.121701008608)*0.5**o
-        ref[2,1,1]=(0.246577988625)/(o+1.)+(0.0512227634376)+(0.102779070928)*0.5**o
-        ref[3,0,0]=(-0.0109584684212)/(o+1.)+(-0.334888666171)+(0.239371771102)*0.5**o
-        ref[3,0,1]=(-0.125987676419)/(o+1.)+(-0.170179004032)+(-0.440522777827)*0.5**o
-        ref[3,1,0]=(-0.354093141636)/(o+1.)+(-0.177294275919)+(0.119580825198)*0.5**o
-        ref[3,1,1]=(-0.746761075412)/(o+1.)+(0.192068760731)+(-0.651985302566)*0.5**o
-        ref[4,0,0]=(-0.42411673219)/(o+1.)+(-0.579162944937)+(-0.0719694008158)*0.5**o
-        ref[4,0,1]=(0.169881169584)/(o+1.)+(0.483614029132)+(0.478341063616)*0.5**o
-        ref[4,1,0]=(0.943567836264)/(o+1.)+(-0.898782941264)+(-0.670149001297)*0.5**o
-        ref[4,1,1]=(-0.703610807936)/(o+1.)+(0.225342628657)+(-0.934767922806)*0.5**o
-        ref[5,0,0]=(-0.788792225213)/(o+1.)+(-0.1768857093)+(-0.259984514102)*0.5**o
-        ref[5,0,1]=(-0.788708879899)/(o+1.)+(-0.202288491141)+(0.827786772711)*0.5**o
-        ref[5,1,0]=(-0.823081809707)/(o+1.)+(0.274720963093)+(-0.636239300197)*0.5**o
-        ref[5,1,1]=(0.498922549807)/(o+1.)+(0.0129388257746)+(0.882580944588)*0.5**o
-      else:
-        arg[0,0,0]=(-0.426613654844)*x[0]+(-1.01433980801)*x[1]+(0.564621874916)*x[2]
-        arg[0,0,1]=(-0.438521968882)*x[0]+(1.6033775267)*x[1]+(0.691349995832)*x[2]
-        arg[0,1,0]=(-0.04337513731)*x[0]+(0.142927668234)*x[1]+(0.506581723199)*x[2]
-        arg[0,1,1]=(-0.120598868162)*x[0]+(-0.213666787813)*x[1]+(-1.04221679332)*x[2]
-        arg[1,0,0]=(0.153696490712)*x[0]+(-0.122516529815)*x[1]+(-1.08837272712)*x[2]
-        arg[1,0,1]=(0.410706464237)*x[0]+(0.720079363315)*x[1]+(-0.767790357539)*x[2]
-        arg[1,1,0]=(-1.03726428173)*x[0]+(-0.316809853003)*x[1]+(-0.780405868082)*x[2]
-        arg[1,1,1]=(-0.427547967216)*x[0]+(-0.897766643609)*x[1]+(-1.56913552404)*x[2]
-        arg[2,0,0]=(-0.282789248898)*x[0]+(-0.110846936031)*x[1]+(-1.4329391906)*x[2]
-        arg[2,0,1]=(1.46866588617)*x[0]+(-1.23022501959)*x[1]+(-0.3123390018)*x[2]
-        arg[2,1,0]=(-0.314115718621)*x[0]+(1.7333934438)*x[1]+(0.833572700726)*x[2]
-        arg[2,1,1]=(0.464246462638)*x[0]+(0.267484068646)*x[1]+(0.342009204787)*x[2]
-        arg[3,0,0]=(0.578853099163)*x[0]+(-0.0453855508465)*x[1]+(-0.0751578475516)*x[2]
-        arg[3,0,1]=(-0.526734485752)*x[0]+(-1.03286310016)*x[1]+(-0.398986583917)*x[2]
-        arg[3,1,0]=(0.0239088277798)*x[0]+(0.205105470192)*x[1]+(-1.04986349166)*x[2]
-        arg[3,1,1]=(0.130893744001)*x[0]+(-0.273702140669)*x[1]+(-0.0804222415128)*x[2]
-        arg[4,0,0]=(-0.822661618584)*x[0]+(-0.267189204519)*x[1]+(-0.290013766971)*x[2]
-        arg[4,0,1]=(-1.46759823734)*x[0]+(0.317465945316)*x[1]+(0.108284317752)*x[2]
-        arg[4,1,0]=(-1.3920990386)*x[0]+(-1.17823778694)*x[1]+(-0.18366434307)*x[2]
-        arg[4,1,1]=(-0.0915496209516)*x[0]+(-0.367624609832)*x[1]+(1.30630257323)*x[2]
-        arg[5,0,0]=(0.117840830455)*x[0]+(-0.667875433194)*x[1]+(-1.59716688455)*x[2]
-        arg[5,0,1]=(-0.818693227605)*x[0]+(0.483842075248)*x[1]+(-0.408373205535)*x[2]
-        arg[5,1,0]=(1.36906770301)*x[0]+(0.494926179999)*x[1]+(0.717041707262)*x[2]
-        arg[5,1,1]=(0.819757116081)*x[0]+(0.0982458749015)*x[1]+(0.275080391599)*x[2]
-        ref[0,0,0]=(0.236560699949)/(o+1.)+(-0.392784388084)+(-0.327323511722)*0.5**o
-        ref[0,0,1]=(1.32491522045)/(o+1.)+(0.525146863711)+(-0.519003394222)*0.5**o
-        ref[0,1,0]=(0.433749865563)/(o+1.)+(0.23007126008)+(-0.287758131599)*0.5**o
-        ref[0,1,1]=(-0.0563021060686)/(o+1.)+(-0.403921160703)+(-0.512338021825)*0.5**o
-        ref[1,0,0]=(-0.170496965963)/(o+1.)+(-0.914421777259)+(0.942147754258)*0.5**o
-        ref[1,0,1]=(-0.372707483726)/(o+1.)+(0.636041158872)+(-0.536379364005)*0.5**o
-        ref[1,1,0]=(-0.211529878364)/(o+1.)+(-0.912151985776)+(-0.0986461529033)*0.5**o
-        ref[1,1,1]=(-1.32533998437)/(o+1.)+(-0.685030198386)+(-0.19904975372)*0.5**o
-        ref[2,0,0]=(0.152048902469)/(o+1.)+(-0.88880590209)+(-0.201012473813)*0.5**o
-        ref[2,0,1]=(-0.748900052246)/(o+1.)+(-0.0226120471998)+(0.720226011425)*0.5**o
-        ref[2,1,0]=(0.77797707941)/(o+1.)+(1.01635055442)+(-0.557827762351)*0.5**o
-        ref[2,1,1]=(1.08969334716)/(o+1.)+(-0.404644728844)+(0.793335846595)*0.5**o
-        ref[3,0,0]=(1.56498448669)/(o+1.)+(-0.699967188685)+(0.293259591449)*0.5**o
-        ref[3,0,1]=(-0.620133427128)/(o+1.)+(-0.550037413688)+(-0.238375915329)*0.5**o
-        ref[3,1,0]=(-0.156380586288)/(o+1.)+(-0.0154369973565)+(-0.633594612687)*0.5**o
-        ref[3,1,1]=(-0.352989559326)/(o+1.)+(-0.290547031627)+(0.710852984398)*0.5**o
-        ref[4,0,0]=(-0.147579361355)/(o+1.)+(-0.615173424765)+(-0.00193837918766)*0.5**o
-        ref[4,0,1]=(0.598152345277)/(o+1.)+(-0.540248606426)+(-0.559503106696)*0.5**o
-        ref[4,1,0]=(-1.17182448825)/(o+1.)+(-0.590551681576)+(-0.401073317208)*0.5**o
-        ref[4,1,1]=(0.837504141173)/(o+1.)+(0.0807414267186)+(-0.15185865216)*0.5**o
-        ref[5,0,0]=(-0.646601115533)/(o+1.)+(-1.20895265273)+(0.9173049337)*0.5**o
-        ref[5,0,1]=(1.26626110052)/(o+1.)+(-0.56471923973)+(-0.880046978955)*0.5**o
-        ref[5,1,0]=(-0.069063169298)/(o+1.)+(0.883536796964)+(0.883025165644)*0.5**o
-        ref[5,1,1]=(1.05999338993)/(o+1.)+(-0.392519102893)+(0.918128198439)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.257898226293)*x[0]+(-0.01230083314)*x[1]
-        arg[0,0,0,1]=(0.0531183070647)*x[0]+(-0.170192287836)*x[1]
-        arg[0,0,1,0]=(-0.364644940864)*x[0]+(1.04227651446)*x[1]
-        arg[0,0,1,1]=(-0.894334108203)*x[0]+(0.151390331211)*x[1]
-        arg[0,0,2,0]=(1.03825401708)*x[0]+(-0.882136097149)*x[1]
-        arg[0,0,2,1]=(-1.05304910155)*x[0]+(1.06866311708)*x[1]
-        arg[0,1,0,0]=(1.54742542159)*x[0]+(0.941778348482)*x[1]
-        arg[0,1,0,1]=(1.1797380956)*x[0]+(-0.296417138234)*x[1]
-        arg[0,1,1,0]=(-1.09196028027)*x[0]+(-0.783377624006)*x[1]
-        arg[0,1,1,1]=(0.370952191443)*x[0]+(-0.0854141858991)*x[1]
-        arg[0,1,2,0]=(-1.23552368139)*x[0]+(1.23848088087)*x[1]
-        arg[0,1,2,1]=(0.216345350114)*x[0]+(-0.136524468427)*x[1]
-        arg[0,2,0,0]=(-1.21206901263)*x[0]+(0.804219582144)*x[1]
-        arg[0,2,0,1]=(0.192956526208)*x[0]+(0.588417678858)*x[1]
-        arg[0,2,1,0]=(-0.940175603742)*x[0]+(0.329047260784)*x[1]
-        arg[0,2,1,1]=(-0.138597387792)*x[0]+(0.398298326223)*x[1]
-        arg[0,2,2,0]=(0.10089766824)*x[0]+(1.25459493298)*x[1]
-        arg[0,2,2,1]=(-0.401163525883)*x[0]+(0.276542765282)*x[1]
-        arg[0,3,0,0]=(0.252156795268)*x[0]+(-0.50223063539)*x[1]
-        arg[0,3,0,1]=(0.466244610905)*x[0]+(-0.587025224301)*x[1]
-        arg[0,3,1,0]=(-0.268082012713)*x[0]+(-1.28874675764)*x[1]
-        arg[0,3,1,1]=(1.10867463519)*x[0]+(-0.165500912864)*x[1]
-        arg[0,3,2,0]=(-1.94681908266)*x[0]+(0.166854108476)*x[1]
-        arg[0,3,2,1]=(-0.537150417922)*x[0]+(0.0872851457131)*x[1]
-        arg[0,4,0,0]=(-0.376548581807)*x[0]+(-0.245201133388)*x[1]
-        arg[0,4,0,1]=(-0.135287690767)*x[0]+(0.750376238942)*x[1]
-        arg[0,4,1,0]=(-0.0240491596907)*x[0]+(-1.21337088424)*x[1]
-        arg[0,4,1,1]=(0.699215733397)*x[0]+(0.0596356032853)*x[1]
-        arg[0,4,2,0]=(-0.521316010702)*x[0]+(-1.75309802615)*x[1]
-        arg[0,4,2,1]=(0.403640172305)*x[0]+(1.41465827077)*x[1]
-        arg[1,0,0,0]=(-1.01538089315)*x[0]+(-1.14785578909)*x[1]
-        arg[1,0,0,1]=(1.10045201832)*x[0]+(0.630761728795)*x[1]
-        arg[1,0,1,0]=(0.137673646147)*x[0]+(-0.387129090253)*x[1]
-        arg[1,0,1,1]=(-1.04588287863)*x[0]+(-1.22433029859)*x[1]
-        arg[1,0,2,0]=(-0.567830263535)*x[0]+(-0.405808616295)*x[1]
-        arg[1,0,2,1]=(0.139326102495)*x[0]+(-1.93153384363)*x[1]
-        arg[1,1,0,0]=(-0.638524762921)*x[0]+(0.506405751653)*x[1]
-        arg[1,1,0,1]=(0.130775153144)*x[0]+(0.531317202208)*x[1]
-        arg[1,1,1,0]=(0.557476206038)*x[0]+(0.447588676184)*x[1]
-        arg[1,1,1,1]=(-0.538795916875)*x[0]+(-0.593869493531)*x[1]
-        arg[1,1,2,0]=(-1.09827483942)*x[0]+(0.376431061876)*x[1]
-        arg[1,1,2,1]=(-0.0074505620387)*x[0]+(-0.798645151486)*x[1]
-        arg[1,2,0,0]=(0.251283911459)*x[0]+(0.194595071813)*x[1]
-        arg[1,2,0,1]=(1.00482763799)*x[0]+(-1.00059863394)*x[1]
-        arg[1,2,1,0]=(-0.453095434684)*x[0]+(-0.513922011418)*x[1]
-        arg[1,2,1,1]=(0.558548837484)*x[0]+(0.0696328406825)*x[1]
-        arg[1,2,2,0]=(-1.20625552545)*x[0]+(-0.151371710692)*x[1]
-        arg[1,2,2,1]=(0.100262209656)*x[0]+(-0.314628804179)*x[1]
-        arg[1,3,0,0]=(0.947063141882)*x[0]+(-0.297271200562)*x[1]
-        arg[1,3,0,1]=(0.0760277251261)*x[0]+(-1.17982146387)*x[1]
-        arg[1,3,1,0]=(-1.46946063969)*x[0]+(-0.615302663567)*x[1]
-        arg[1,3,1,1]=(0.419747293729)*x[0]+(-0.629842531949)*x[1]
-        arg[1,3,2,0]=(-1.44607954917)*x[0]+(0.520024093924)*x[1]
-        arg[1,3,2,1]=(-1.01556392596)*x[0]+(-0.307173811354)*x[1]
-        arg[1,4,0,0]=(-0.164339335244)*x[0]+(0.390736414982)*x[1]
-        arg[1,4,0,1]=(-0.266932380288)*x[0]+(-0.731533848078)*x[1]
-        arg[1,4,1,0]=(-0.903825489055)*x[0]+(-1.81564784421)*x[1]
-        arg[1,4,1,1]=(-0.426008882665)*x[0]+(-1.09792948908)*x[1]
-        arg[1,4,2,0]=(-1.32984927589)*x[0]+(1.58196302541)*x[1]
-        arg[1,4,2,1]=(-0.0581032806145)*x[0]+(-0.323073355302)*x[1]
-        arg[2,0,0,0]=(-0.744014251373)*x[0]+(-0.818253254872)*x[1]
-        arg[2,0,0,1]=(0.368656965396)*x[0]+(-0.0864646380237)*x[1]
-        arg[2,0,1,0]=(-0.112428845773)*x[0]+(0.109170104421)*x[1]
-        arg[2,0,1,1]=(0.0682241548911)*x[0]+(-1.65999482283)*x[1]
-        arg[2,0,2,0]=(0.212777058993)*x[0]+(0.127163480945)*x[1]
-        arg[2,0,2,1]=(-0.256989443356)*x[0]+(0.183206687414)*x[1]
-        arg[2,1,0,0]=(0.578997994373)*x[0]+(0.413087453689)*x[1]
-        arg[2,1,0,1]=(0.886532090807)*x[0]+(0.330645525532)*x[1]
-        arg[2,1,1,0]=(0.18224742814)*x[0]+(-0.713166591262)*x[1]
-        arg[2,1,1,1]=(-0.25218296706)*x[0]+(0.736797897014)*x[1]
-        arg[2,1,2,0]=(0.885270371408)*x[0]+(-1.35641397127)*x[1]
-        arg[2,1,2,1]=(-0.963214290879)*x[0]+(0.348421598509)*x[1]
-        arg[2,2,0,0]=(0.884120745351)*x[0]+(0.956857507884)*x[1]
-        arg[2,2,0,1]=(-0.00795298517561)*x[0]+(0.51243740322)*x[1]
-        arg[2,2,1,0]=(-0.563655252975)*x[0]+(-0.716305131721)*x[1]
-        arg[2,2,1,1]=(0.648243491623)*x[0]+(-0.142239786485)*x[1]
-        arg[2,2,2,0]=(1.50677848542)*x[0]+(-0.359722006818)*x[1]
-        arg[2,2,2,1]=(-0.522592086302)*x[0]+(-0.18544927497)*x[1]
-        arg[2,3,0,0]=(0.0822787762966)*x[0]+(0.196309662733)*x[1]
-        arg[2,3,0,1]=(0.232573258627)*x[0]+(-0.0597976775432)*x[1]
-        arg[2,3,1,0]=(1.50895737052)*x[0]+(0.546625934312)*x[1]
-        arg[2,3,1,1]=(-1.64023373286)*x[0]+(0.220053261777)*x[1]
-        arg[2,3,2,0]=(1.5897208842)*x[0]+(-0.0355885594992)*x[1]
-        arg[2,3,2,1]=(-1.52822349982)*x[0]+(-0.0906934717656)*x[1]
-        arg[2,4,0,0]=(0.496696582601)*x[0]+(-0.303888675059)*x[1]
-        arg[2,4,0,1]=(-0.0819586112177)*x[0]+(-0.0449047294378)*x[1]
-        arg[2,4,1,0]=(-0.678530758513)*x[0]+(-1.2173963447)*x[1]
-        arg[2,4,1,1]=(-0.645450475268)*x[0]+(0.356771113426)*x[1]
-        arg[2,4,2,0]=(-0.486643021867)*x[0]+(0.977763869689)*x[1]
-        arg[2,4,2,1]=(-0.458991807397)*x[0]+(1.80038432923)*x[1]
-        arg[3,0,0,0]=(0.270795948755)*x[0]+(-0.691512096338)*x[1]
-        arg[3,0,0,1]=(-0.756717130099)*x[0]+(1.16189640534)*x[1]
-        arg[3,0,1,0]=(0.967554346699)*x[0]+(-0.272119008963)*x[1]
-        arg[3,0,1,1]=(1.14296491195)*x[0]+(-0.707175662379)*x[1]
-        arg[3,0,2,0]=(1.15665030692)*x[0]+(0.414803389409)*x[1]
-        arg[3,0,2,1]=(1.38997274955)*x[0]+(1.07065568192)*x[1]
-        arg[3,1,0,0]=(-0.623998925511)*x[0]+(0.375545806421)*x[1]
-        arg[3,1,0,1]=(-0.363431948398)*x[0]+(-0.183100417297)*x[1]
-        arg[3,1,1,0]=(0.0435866301729)*x[0]+(-0.557137572068)*x[1]
-        arg[3,1,1,1]=(-0.253225217468)*x[0]+(-0.0657932188329)*x[1]
-        arg[3,1,2,0]=(0.147700921064)*x[0]+(0.681624563015)*x[1]
-        arg[3,1,2,1]=(-0.075394297616)*x[0]+(0.271741245789)*x[1]
-        arg[3,2,0,0]=(1.34803044812)*x[0]+(0.87991065609)*x[1]
-        arg[3,2,0,1]=(0.0529487135353)*x[0]+(0.806480092352)*x[1]
-        arg[3,2,1,0]=(-1.52038624166)*x[0]+(-0.992718138685)*x[1]
-        arg[3,2,1,1]=(0.0859852188749)*x[0]+(1.63512596202)*x[1]
-        arg[3,2,2,0]=(1.46925148575)*x[0]+(-1.60383564005)*x[1]
-        arg[3,2,2,1]=(0.114463395473)*x[0]+(-1.0186377376)*x[1]
-        arg[3,3,0,0]=(-1.02962502658)*x[0]+(-1.06788543146)*x[1]
-        arg[3,3,0,1]=(-0.184391597652)*x[0]+(0.462603936483)*x[1]
-        arg[3,3,1,0]=(0.611113335782)*x[0]+(0.282417397043)*x[1]
-        arg[3,3,1,1]=(-0.193423873796)*x[0]+(-0.56108614964)*x[1]
-        arg[3,3,2,0]=(-0.0290687598224)*x[0]+(-0.460221158417)*x[1]
-        arg[3,3,2,1]=(0.784513522959)*x[0]+(-0.484813129206)*x[1]
-        arg[3,4,0,0]=(0.423780748664)*x[0]+(-0.344020787894)*x[1]
-        arg[3,4,0,1]=(1.10623024451)*x[0]+(-0.775008153301)*x[1]
-        arg[3,4,1,0]=(0.554847534291)*x[0]+(-0.854749107999)*x[1]
-        arg[3,4,1,1]=(-0.639595693597)*x[0]+(-0.966152813212)*x[1]
-        arg[3,4,2,0]=(-0.0172621996023)*x[0]+(0.321815074269)*x[1]
-        arg[3,4,2,1]=(0.39605156824)*x[0]+(-0.499138231749)*x[1]
-        ref[0,0,0,0]=(0.169892838337)/(o+1.)+(-0.323261281472)+(0.722227117759)*0.5**o
-        ref[0,0,0,1]=(-0.899797330597)/(o+1.)+(0.731242549464)+(-0.679761749104)*0.5**o
-        ref[0,0,1,0]=(0.948969615551)/(o+1.)+(-0.173478478707)+(0.0756189154575)*0.5**o
-        ref[0,0,1,1]=(-0.484419525942)/(o+1.)+(0.287761319651)+(-0.834046890353)*0.5**o
-        ref[0,0,2,0]=(-0.275366085384)/(o+1.)+(-0.051636507926)+(0.534757021171)*0.5**o
-        ref[0,0,2,1]=(0.338862631582)/(o+1.)+(0.076489529483)+(-0.47622767501)*0.5**o
-        ref[0,1,0,0]=(0.960885993642)/(o+1.)+(0.36959166751)+(0.789134441414)*0.5**o
-        ref[0,1,0,1]=(-0.101908900511)/(o+1.)+(0.343409131566)+(0.298411594744)*0.5**o
-        ref[0,1,1,0]=(-0.50227382988)/(o+1.)+(-0.431549057432)+(-0.509965959533)*0.5**o
-        ref[0,1,1,1]=(-0.294216689224)/(o+1.)+(0.293114907564)+(-0.00647512035965)*0.5**o
-        ref[0,1,2,0]=(0.330313139948)/(o+1.)+(0.0601559902451)+(-0.447667920962)*0.5**o
-        ref[0,1,2,1]=(-0.855325117375)/(o+1.)+(0.455706690618)+(0.0237326178252)*0.5**o
-        ref[0,2,0,0]=(0.958948557218)/(o+1.)+(-0.307015973897)+(-0.752766039908)*0.5**o
-        ref[0,2,0,1]=(0.622666086232)/(o+1.)+(0.417782845058)+(-0.676857571283)*0.5**o
-        ref[0,2,1,0]=(-0.476269525636)/(o+1.)+(0.203518519787)+(-0.541895856898)*0.5**o
-        ref[0,2,1,1]=(0.396862410812)/(o+1.)+(-0.318442063423)+(0.499722654464)*0.5**o
-        ref[0,2,2,0]=(0.291546173382)/(o+1.)+(0.345688404218)+(0.372569619405)*0.5**o
-        ref[0,2,2,1]=(-0.0863432016899)/(o+1.)+(0.296494638577)+(-0.631266836064)*0.5**o
-        ref[0,3,0,0]=(0.437179077921)/(o+1.)+(-0.340515851088)+(-0.00622121586734)*0.5**o
-        ref[0,3,0,1]=(-0.0670787919003)/(o+1.)+(-0.492735838895)+(0.931769856293)*0.5**o
-        ref[0,3,1,0]=(-0.455620785864)/(o+1.)+(-0.866886545624)+(0.632565106759)*0.5**o
-        ref[0,3,1,1]=(0.769395985412)/(o+1.)+(-0.303642587154)+(0.781062911223)*0.5**o
-        ref[0,3,2,0]=(-0.338160377272)/(o+1.)+(-0.237545833658)+(-0.966712929597)*0.5**o
-        ref[0,3,2,1]=(-0.796435534783)/(o+1.)+(0.544922318125)+(-0.743274373676)*0.5**o
-        ref[0,4,0,0]=(0.452932120968)/(o+1.)+(-0.512874769603)+(-0.048932296957)*0.5**o
-        ref[0,4,0,1]=(0.361579034112)/(o+1.)+(-0.0561290568189)+(0.365767627701)*0.5**o
-        ref[0,4,1,0]=(-0.626053161593)/(o+1.)+(-0.761324946295)+(0.911283010254)*0.5**o
-        ref[0,4,1,1]=(-0.0455977379835)/(o+1.)+(0.292122388548)+(0.22020429757)*0.5**o
-        ref[0,4,2,0]=(-0.881052488675)/(o+1.)+(-0.210171400955)+(-0.973018746263)*0.5**o
-        ref[0,4,2,1]=(0.955475719603)/(o+1.)+(0.367959093676)+(0.126904536122)*0.5**o
-        ref[1,0,0,0]=(-0.314523133291)/(o+1.)+(-0.649561146707)+(-0.54959125554)*0.5**o
-        ref[1,0,0,1]=(0.776726613012)/(o+1.)+(0.0747896120381)+(0.804907910029)*0.5**o
-        ref[1,0,1,0]=(0.416309554773)/(o+1.)+(0.0650606132082)+(-0.795886225295)*0.5**o
-        ref[1,0,1,1]=(-0.642083920221)/(o+1.)+(-0.518812997818)+(-0.590503261366)*0.5**o
-        ref[1,0,2,0]=(0.209400082886)/(o+1.)+(-0.592256267485)+(0.00147357225359)*0.5**o
-        ref[1,0,2,1]=(-0.969945221754)/(o+1.)+(-0.364559871358)+(-0.0931427766681)*0.5**o
-        ref[1,1,0,0]=(0.941138659497)/(o+1.)+(-0.103485523138)+(-0.866286624489)*0.5**o
-        ref[1,1,0,1]=(0.527395399401)/(o+1.)+(0.373358049173)+(-0.612019142395)*0.5**o
-        ref[1,1,1,0]=(-0.276942103917)/(o+1.)+(0.624509599487)+(0.0329877871648)*0.5**o
-        ref[1,1,1,1]=(-0.153477829221)/(o+1.)+(-0.0616268433725)+(-0.85593389444)*0.5**o
-        ref[1,1,2,0]=(0.2685285297)/(o+1.)+(-0.301824551915)+(-0.386723203413)*0.5**o
-        ref[1,1,2,1]=(-0.530960074652)/(o+1.)+(0.248621312801)+(-0.772378264474)*0.5**o
-        ref[1,2,0,0]=(0.745071931955)/(o+1.)+(-0.149268301427)+(-0.000656345828701)*0.5**o
-        ref[1,2,0,1]=(-0.581822428087)/(o+1.)+(0.2315691847)+(0.122913062738)*0.5**o
-        ref[1,2,1,0]=(-0.325165099021)/(o+1.)+(-0.414758139139)+(0.187663931198)*0.5**o
-        ref[1,2,1,1]=(-0.389683593964)/(o+1.)+(0.265985790556)+(0.485893691018)*0.5**o
-        ref[1,2,2,0]=(0.661969003098)/(o+1.)+(-0.514584521701)+(-0.990427195841)*0.5**o
-        ref[1,2,2,1]=(-0.0828384828188)/(o+1.)+(-0.482166570368)+(0.832805029032)*0.5**o
-        ref[1,3,0,0]=(-0.756020671713)/(o+1.)+(0.627704058228)+(0.150404496577)*0.5**o
-        ref[1,3,0,1]=(-0.93648010541)/(o+1.)+(0.11022703478)+(-0.387767702896)*0.5**o
-        ref[1,3,1,0]=(-0.995823513997)/(o+1.)+(-0.242072805569)+(-0.604794178119)*0.5**o
-        ref[1,3,1,1]=(-0.543071878541)/(o+1.)+(-0.160890620667)+(0.654757881656)*0.5**o
-        ref[1,3,2,0]=(0.803184441579)/(o+1.)+(-0.612293875048)+(-0.504652146723)*0.5**o
-        ref[1,3,2,1]=(-0.786714439322)/(o+1.)+(-0.175556007517)+(-0.18491128296)*0.5**o
-        ref[1,4,0,0]=(-0.302928744298)/(o+1.)+(0.476360987754)+(-0.423396151472)*0.5**o
-        ref[1,4,0,1]=(-0.410240602476)/(o+1.)+(-0.49551630458)+(0.40280698327)*0.5**o
-        ref[1,4,1,0]=(-0.820677400346)/(o+1.)+(-0.573037933363)+(-0.752720066188)*0.5**o
-        ref[1,4,1,1]=(-0.492748923658)/(o+1.)+(-0.600739806799)+(0.170290165507)*0.5**o
-        ref[1,4,2,0]=(0.926654770824)/(o+1.)+(0.011282908181)+(-0.697106837662)*0.5**o
-        ref[1,4,2,1]=(-0.958477382611)/(o+1.)+(0.618515858902)+(-0.65973097111)*0.5**o
-        ref[2,0,0,0]=(-0.15636950624)/(o+1.)+(-0.520670547262)+(-0.36455690548)*0.5**o
-        ref[2,0,0,1]=(-0.726424878286)/(o+1.)+(0.697757734621)+(-0.386898263585)*0.5**o
-        ref[2,0,1,0]=(-0.055162393508)/(o+1.)+(0.247015646426)+(-0.442127640696)*0.5**o
-        ref[2,0,1,1]=(-0.769332288875)/(o+1.)+(-0.0917175733456)+(-0.639003232373)*0.5**o
-        ref[2,0,2,0]=(-0.196390038297)/(o+1.)+(0.0977907270548)+(0.340749124126)*0.5**o
-        ref[2,0,2,1]=(0.841927481859)/(o+1.)+(-0.489185426146)+(0.0626606144906)*0.5**o
-        ref[2,1,0,0]=(0.590018249148)/(o+1.)+(0.378476967182)+(-0.354886735451)*0.5**o
-        ref[2,1,0,1]=(0.178495604742)/(o+1.)+(0.233073081069)+(0.572535849459)*0.5**o
-        ref[2,1,1,0]=(-0.762671064919)/(o+1.)+(-0.108539686142)+(0.448831274081)*0.5**o
-        ref[2,1,1,1]=(0.927591406535)/(o+1.)+(0.0441635703243)+(-0.53130361723)*0.5**o
-        ref[2,1,2,0]=(-0.604360706259)/(o+1.)+(-0.134848102332)+(0.402913311063)*0.5**o
-        ref[2,1,2,1]=(0.229727627441)/(o+1.)+(-0.323296604293)+(-0.197927111225)*0.5**o
-        ref[2,2,0,0]=(0.287478356112)/(o+1.)+(0.762635506201)+(0.0282288847209)*0.5**o
-        ref[2,2,0,1]=(0.243518182621)/(o+1.)+(-0.241502069199)+(0.743970373822)*0.5**o
-        ref[2,2,1,0]=(-0.369049760378)/(o+1.)+(-0.21941778965)+(-0.472075045017)*0.5**o
-        ref[2,2,1,1]=(-0.745343658666)/(o+1.)+(0.193375557775)+(0.864596248255)*0.5**o
-        ref[2,2,2,0]=(-0.491769251494)/(o+1.)+(0.442742387618)+(0.753340954862)*0.5**o
-        ref[2,2,2,1]=(0.551196377158)/(o+1.)+(-0.523535406613)+(-0.212166925203)*0.5**o
-        ref[2,3,0,0]=(0.192271522168)/(o+1.)+(-0.0181953944687)+(0.122707705798)*0.5**o
-        ref[2,3,0,1]=(-0.593768738594)/(o+1.)+(0.199088910545)+(0.368366498588)*0.5**o
-        ref[2,3,1,0]=(0.0866211808983)/(o+1.)+(0.723512694127)+(0.521936735685)*0.5**o
-        ref[2,3,1,1]=(-0.453288268254)/(o+1.)+(-0.15580970281)+(-0.655272797205)*0.5**o
-        ref[2,3,2,0]=(0.614105802669)/(o+1.)+(0.0411427694898)+(0.85774098305)*0.5**o
-        ref[2,3,2,1]=(0.263133533654)/(o+1.)+(-0.628776355867)+(-0.624497793507)*0.5**o
-        ref[2,4,0,0]=(-0.809347914722)/(o+1.)+(0.367719412237)+(0.26671699779)*0.5**o
-        ref[2,4,0,1]=(0.773124137566)/(o+1.)+(-0.442496395542)+(-0.0149946871367)*0.5**o
-        ref[2,4,1,0]=(-0.927311525126)/(o+1.)+(-0.0125177466568)+(-0.943580084777)*0.5**o
-        ref[2,4,1,1]=(0.306409665483)/(o+1.)+(0.128569553604)+(-0.852228134533)*0.5**o
-        ref[2,4,2,0]=(0.926185522145)/(o+1.)+(0.0750538146738)+(-0.58517230367)*0.5**o
-        ref[2,4,2,1]=(0.858245470922)/(o+1.)+(0.0125876600893)+(0.457971730734)*0.5**o
-        ref[3,0,0,0]=(-0.74501947953)/(o+1.)+(0.343942243752)+(-0.363581155556)*0.5**o
-        ref[3,0,0,1]=(0.850890737948)/(o+1.)+(0.157997002133)+(-0.761705466968)*0.5**o
-        ref[3,0,1,0]=(-0.0468962248591)/(o+1.)+(0.0297980532763)+(0.682735456043)*0.5**o
-        ref[3,0,1,1]=(0.0126326425456)/(o+1.)+(-0.076115296096)+(0.575387199213)*0.5**o
-        ref[3,0,2,0]=(-0.410549752333)/(o+1.)+(0.85556811978)+(0.270867209104)*0.5**o
-        ref[3,0,2,1]=(0.580487848545)/(o+1.)+(0.59069171729)+(0.698757148346)*0.5**o
-        ref[3,1,0,0]=(0.139052775786)/(o+1.)+(-0.334747475889)+(0.281989056901)*0.5**o
-        ref[3,1,0,1]=(0.591083610998)/(o+1.)+(-0.322680889668)+(-0.492254197357)*0.5**o
-        ref[3,1,1,0]=(0.384713965427)/(o+1.)+(-0.522411606102)+(0.146558304882)*0.5**o
-        ref[3,1,1,1]=(-0.827615582009)/(o+1.)+(-0.00295218575854)+(0.514501517225)*0.5**o
-        ref[3,1,2,0]=(0.84762578765)/(o+1.)+(0.208361555685)+(-0.43502341494)*0.5**o
-        ref[3,1,2,1]=(-0.554668615664)/(o+1.)+(0.825347835483)+(-0.899680107129)*0.5**o
-        ref[3,2,0,0]=(0.652802712143)/(o+1.)+(0.397197582731)+(0.7807432266)*0.5**o
-        ref[3,2,0,1]=(0.421495251937)/(o+1.)+(-0.119571710512)+(0.677076974975)*0.5**o
-        ref[3,2,1,0]=(-0.230439630375)/(o+1.)+(-0.733165339017)+(-0.816334071941)*0.5**o
-        ref[3,2,1,1]=(0.64153308098)/(o+1.)+(0.778374176432)+(-0.477170252948)*0.5**o
-        ref[3,2,2,0]=(-0.987848717403)/(o+1.)+(-0.0606435888479)+(0.974551740798)*0.5**o
-        ref[3,2,2,1]=(-0.318593711859)/(o+1.)+(-0.459904454409)+(0.334228278552)*0.5**o
-        ref[3,3,0,0]=(-0.418115413351)/(o+1.)+(-0.348616063735)+(-0.982162917221)*0.5**o
-        ref[3,3,0,1]=(-0.437684435015)/(o+1.)+(0.804145379606)+(-0.892393985366)*0.5**o
-        ref[3,3,1,0]=(0.944100110135)/(o+1.)+(-0.059994562245)+(0.0694197471801)*0.5**o
-        ref[3,3,1,1]=(-0.860656048613)/(o+1.)+(0.178136109535)+(-0.250126193893)*0.5**o
-        ref[3,3,2,0]=(-0.363631991908)/(o+1.)+(-0.298384287282)+(0.471110648232)*0.5**o
-        ref[3,3,2,1]=(-0.578021736479)/(o+1.)+(0.320913094365)+(0.235895941501)*0.5**o
-        ref[3,4,0,0]=(-0.946995649946)/(o+1.)+(0.0451978887455)+(0.936359833225)*0.5**o
-        ref[3,4,0,1]=(-0.636305818291)/(o+1.)+(0.258932088634)+(0.449663732234)*0.5**o
-        ref[3,4,1,0]=(-0.823421937366)/(o+1.)+(0.112980674356)+(0.297559014947)*0.5**o
-        ref[3,4,1,1]=(-0.441768022626)/(o+1.)+(-0.240840962617)+(-0.682298558949)*0.5**o
-        ref[3,4,2,0]=(-0.258808936822)/(o+1.)+(0.510306577882)+(-0.457251344276)*0.5**o
-        ref[3,4,2,1]=(-0.489365749016)/(o+1.)+(-0.296617385332)+(0.979513856171)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.474247989728)*x[0]+(-0.768689352235)*x[1]+(-1.08527900853)*x[2]
-        arg[0,0,0,1]=(-0.237113797789)*x[0]+(0.0842735741018)*x[1]+(0.203858551029)*x[2]
-        arg[0,0,1,0]=(0.24237127665)*x[0]+(0.421022955803)*x[1]+(-1.52818540927)*x[2]
-        arg[0,0,1,1]=(1.34624865817)*x[0]+(-0.798943272818)*x[1]+(-0.823168386315)*x[2]
-        arg[0,0,2,0]=(-0.906723771267)*x[0]+(0.328893123771)*x[1]+(-0.942770202463)*x[2]
-        arg[0,0,2,1]=(1.54305197694)*x[0]+(0.813063941984)*x[1]+(0.205532727168)*x[2]
-        arg[0,1,0,0]=(0.399159979872)*x[0]+(-1.52089837934)*x[1]+(-1.4064251406)*x[2]
-        arg[0,1,0,1]=(-0.121139354731)*x[0]+(1.12768246422)*x[1]+(0.234299409411)*x[2]
-        arg[0,1,1,0]=(-1.62513899388)*x[0]+(-0.173131700583)*x[1]+(1.24199996799)*x[2]
-        arg[0,1,1,1]=(-0.371929434177)*x[0]+(-0.606278610409)*x[1]+(-0.00600790063066)*x[2]
-        arg[0,1,2,0]=(-0.804531294423)*x[0]+(0.869392248002)*x[1]+(0.840417359943)*x[2]
-        arg[0,1,2,1]=(0.329452946275)*x[0]+(1.1072495446)*x[1]+(-0.213517932323)*x[2]
-        arg[0,2,0,0]=(1.02784887224)*x[0]+(0.435517042337)*x[1]+(1.58767206677)*x[2]
-        arg[0,2,0,1]=(-0.0120997177)*x[0]+(0.430135803314)*x[1]+(-0.717473068956)*x[2]
-        arg[0,2,1,0]=(0.955455517302)*x[0]+(0.712976918968)*x[1]+(-0.624804508641)*x[2]
-        arg[0,2,1,1]=(-1.03293986594)*x[0]+(-0.539062834482)*x[1]+(-1.61172701428)*x[2]
-        arg[0,2,2,0]=(-0.177662810138)*x[0]+(0.553352366127)*x[1]+(0.695417121111)*x[2]
-        arg[0,2,2,1]=(0.318133474679)*x[0]+(-0.452528947926)*x[1]+(0.468602505091)*x[2]
-        arg[0,3,0,0]=(-0.294467725916)*x[0]+(1.67314409894)*x[1]+(0.100736440007)*x[2]
-        arg[0,3,0,1]=(-0.517162349887)*x[0]+(-1.57430191254)*x[1]+(1.24045877402)*x[2]
-        arg[0,3,1,0]=(0.667393640368)*x[0]+(0.340993632212)*x[1]+(-1.09920535559)*x[2]
-        arg[0,3,1,1]=(0.37451406727)*x[0]+(0.37350649326)*x[1]+(0.357440871322)*x[2]
-        arg[0,3,2,0]=(-0.989366398194)*x[0]+(0.596179154759)*x[1]+(-0.573280308087)*x[2]
-        arg[0,3,2,1]=(-0.25561190141)*x[0]+(1.42296905238)*x[1]+(-1.21032031399)*x[2]
-        arg[0,4,0,0]=(-0.41394085285)*x[0]+(-0.751213929646)*x[1]+(-0.68470718293)*x[2]
-        arg[0,4,0,1]=(0.702985204167)*x[0]+(-0.0375821582587)*x[1]+(0.290630803819)*x[2]
-        arg[0,4,1,0]=(0.0558204653441)*x[0]+(1.61940057302)*x[1]+(-0.518863528354)*x[2]
-        arg[0,4,1,1]=(1.25876303604)*x[0]+(-1.40923202908)*x[1]+(1.05202333762)*x[2]
-        arg[0,4,2,0]=(0.0715295483294)*x[0]+(0.883869702529)*x[1]+(-0.463253474408)*x[2]
-        arg[0,4,2,1]=(0.564563789615)*x[0]+(-0.135049742988)*x[1]+(-1.3118878567)*x[2]
-        arg[1,0,0,0]=(0.707267335291)*x[0]+(-0.197244449872)*x[1]+(-0.114362773781)*x[2]
-        arg[1,0,0,1]=(-0.144762815659)*x[0]+(0.434177706452)*x[1]+(0.0754859099691)*x[2]
-        arg[1,0,1,0]=(-0.906934991359)*x[0]+(0.179011995627)*x[1]+(0.823936036469)*x[2]
-        arg[1,0,1,1]=(1.11165724605)*x[0]+(0.48023223731)*x[1]+(0.981353808181)*x[2]
-        arg[1,0,2,0]=(0.499460583481)*x[0]+(0.171586243561)*x[1]+(-0.252474775657)*x[2]
-        arg[1,0,2,1]=(-0.604289370884)*x[0]+(1.11610914086)*x[1]+(0.747439062711)*x[2]
-        arg[1,1,0,0]=(0.696191463882)*x[0]+(0.349547714404)*x[1]+(0.651361019042)*x[2]
-        arg[1,1,0,1]=(0.152679923426)*x[0]+(-0.448442911425)*x[1]+(1.33964371501)*x[2]
-        arg[1,1,1,0]=(-0.74612592015)*x[0]+(-1.27089239786)*x[1]+(-0.261725631736)*x[2]
-        arg[1,1,1,1]=(1.50839493929)*x[0]+(1.93229724987)*x[1]+(-0.963996845831)*x[2]
-        arg[1,1,2,0]=(0.867984447375)*x[0]+(-0.777493811854)*x[1]+(0.847847553133)*x[2]
-        arg[1,1,2,1]=(1.34249389498)*x[0]+(0.776160804062)*x[1]+(-0.295393972199)*x[2]
-        arg[1,2,0,0]=(-0.655771613243)*x[0]+(1.58220214455)*x[1]+(-0.406292477629)*x[2]
-        arg[1,2,0,1]=(0.59294895986)*x[0]+(0.544961164723)*x[1]+(0.634279670948)*x[2]
-        arg[1,2,1,0]=(1.15324179862)*x[0]+(0.645764835217)*x[1]+(0.670364725309)*x[2]
-        arg[1,2,1,1]=(-0.819459106271)*x[0]+(0.024815625404)*x[1]+(0.769753650676)*x[2]
-        arg[1,2,2,0]=(1.19042366161)*x[0]+(0.982020548972)*x[1]+(0.92730609738)*x[2]
-        arg[1,2,2,1]=(-0.742441488349)*x[0]+(-1.3101429812)*x[1]+(-0.198104246324)*x[2]
-        arg[1,3,0,0]=(0.349205030437)*x[0]+(-0.745240339596)*x[1]+(-0.744742092259)*x[2]
-        arg[1,3,0,1]=(0.993101296711)*x[0]+(-1.48331355036)*x[1]+(-1.00616778677)*x[2]
-        arg[1,3,1,0]=(-1.10586442824)*x[0]+(1.71922449779)*x[1]+(-0.943451153259)*x[2]
-        arg[1,3,1,1]=(-1.72393763035)*x[0]+(-1.14113495956)*x[1]+(-0.211909615809)*x[2]
-        arg[1,3,2,0]=(-0.378302963108)*x[0]+(-0.494705322002)*x[1]+(0.940164363332)*x[2]
-        arg[1,3,2,1]=(0.850541148743)*x[0]+(-1.45461945468)*x[1]+(1.20025821328)*x[2]
-        arg[1,4,0,0]=(1.33882463795)*x[0]+(0.475208133119)*x[1]+(0.722686059253)*x[2]
-        arg[1,4,0,1]=(0.0750422155969)*x[0]+(1.29758288845)*x[1]+(-1.41431668738)*x[2]
-        arg[1,4,1,0]=(1.36072344575)*x[0]+(-0.345743547563)*x[1]+(-0.63248018754)*x[2]
-        arg[1,4,1,1]=(0.579049229913)*x[0]+(0.954245074078)*x[1]+(-0.170538926965)*x[2]
-        arg[1,4,2,0]=(1.67615484634)*x[0]+(0.561067019023)*x[1]+(-1.26952326914)*x[2]
-        arg[1,4,2,1]=(0.700910547934)*x[0]+(0.58717328764)*x[1]+(0.795138196965)*x[2]
-        arg[2,0,0,0]=(0.763193592359)*x[0]+(-0.397549328381)*x[1]+(-0.230593559545)*x[2]
-        arg[2,0,0,1]=(0.454026153468)*x[0]+(-1.12464443717)*x[1]+(-0.147462098246)*x[2]
-        arg[2,0,1,0]=(-0.276457034935)*x[0]+(0.118173156654)*x[1]+(0.57296366275)*x[2]
-        arg[2,0,1,1]=(1.31887812253)*x[0]+(-0.544644483254)*x[1]+(0.0013728350582)*x[2]
-        arg[2,0,2,0]=(-0.257589384265)*x[0]+(-0.016005453203)*x[1]+(-0.508836430965)*x[2]
-        arg[2,0,2,1]=(-0.259420301773)*x[0]+(0.122645293168)*x[1]+(0.381613885289)*x[2]
-        arg[2,1,0,0]=(-1.64168512418)*x[0]+(0.025182006192)*x[1]+(0.0268780458975)*x[2]
-        arg[2,1,0,1]=(-0.0885344200898)*x[0]+(0.408795219114)*x[1]+(0.635798801606)*x[2]
-        arg[2,1,1,0]=(-0.959658503283)*x[0]+(1.034415556)*x[1]+(0.725681105748)*x[2]
-        arg[2,1,1,1]=(1.59312707789)*x[0]+(-0.116514952101)*x[1]+(-0.86121633507)*x[2]
-        arg[2,1,2,0]=(-1.44859572067)*x[0]+(-1.28344247275)*x[1]+(0.299296401869)*x[2]
-        arg[2,1,2,1]=(-0.488424372501)*x[0]+(1.23481402288)*x[1]+(0.01702902463)*x[2]
-        arg[2,2,0,0]=(-1.29986951244)*x[0]+(-1.20190912751)*x[1]+(-0.755848291051)*x[2]
-        arg[2,2,0,1]=(-0.52421656312)*x[0]+(-0.335471509689)*x[1]+(-1.01264312499)*x[2]
-        arg[2,2,1,0]=(-1.12066642609)*x[0]+(-1.02138558053)*x[1]+(-1.00777755552)*x[2]
-        arg[2,2,1,1]=(-1.42127024744)*x[0]+(1.63480022479)*x[1]+(0.542244906643)*x[2]
-        arg[2,2,2,0]=(-0.418852880297)*x[0]+(-0.983110436453)*x[1]+(-0.622603673805)*x[2]
-        arg[2,2,2,1]=(0.727366446825)*x[0]+(-0.256324856361)*x[1]+(-0.20608740758)*x[2]
-        arg[2,3,0,0]=(0.548268302883)*x[0]+(0.0102173127665)*x[1]+(0.869833576217)*x[2]
-        arg[2,3,0,1]=(-1.70159091061)*x[0]+(1.15876875083)*x[1]+(-0.234757706773)*x[2]
-        arg[2,3,1,0]=(-1.72817024817)*x[0]+(0.690055132218)*x[1]+(-0.149398998825)*x[2]
-        arg[2,3,1,1]=(1.80829412387)*x[0]+(-0.217899654855)*x[1]+(-0.922672217822)*x[2]
-        arg[2,3,2,0]=(1.23855200328)*x[0]+(0.412795411508)*x[1]+(0.960476191755)*x[2]
-        arg[2,3,2,1]=(-1.43061904621)*x[0]+(-0.766039000745)*x[1]+(-1.25765397361)*x[2]
-        arg[2,4,0,0]=(-0.660872016687)*x[0]+(-0.000405233718708)*x[1]+(-0.178507968219)*x[2]
-        arg[2,4,0,1]=(-0.168526882871)*x[0]+(-1.06936802685)*x[1]+(1.54083857104)*x[2]
-        arg[2,4,1,0]=(0.565807359529)*x[0]+(-1.41401297939)*x[1]+(-1.23254260537)*x[2]
-        arg[2,4,1,1]=(-0.373920075802)*x[0]+(0.407330812903)*x[1]+(-0.204667001328)*x[2]
-        arg[2,4,2,0]=(0.874100879885)*x[0]+(-0.191238094267)*x[1]+(1.54890969328)*x[2]
-        arg[2,4,2,1]=(0.566428125313)*x[0]+(-1.60899595601)*x[1]+(-1.05112529768)*x[2]
-        arg[3,0,0,0]=(-0.688037248111)*x[0]+(-1.56483484784)*x[1]+(0.26782504619)*x[2]
-        arg[3,0,0,1]=(0.418788954459)*x[0]+(-0.670455226092)*x[1]+(-0.0562760591375)*x[2]
-        arg[3,0,1,0]=(-0.2614362754)*x[0]+(0.271050519855)*x[1]+(0.227811982923)*x[2]
-        arg[3,0,1,1]=(-0.873198928647)*x[0]+(-0.483763141395)*x[1]+(0.33532383979)*x[2]
-        arg[3,0,2,0]=(-0.864161938176)*x[0]+(-1.4682754386)*x[1]+(-0.38126411162)*x[2]
-        arg[3,0,2,1]=(0.142827521381)*x[0]+(0.464483940188)*x[1]+(0.214297576606)*x[2]
-        arg[3,1,0,0]=(0.188747079113)*x[0]+(0.590821253713)*x[1]+(0.908850367108)*x[2]
-        arg[3,1,0,1]=(0.0587541582624)*x[0]+(0.955494266151)*x[1]+(1.70822209849)*x[2]
-        arg[3,1,1,0]=(-0.420356861523)*x[0]+(-0.551445918262)*x[1]+(-0.0187114754269)*x[2]
-        arg[3,1,1,1]=(1.07071658401)*x[0]+(-0.589035602194)*x[1]+(0.133725074027)*x[2]
-        arg[3,1,2,0]=(0.370477043767)*x[0]+(0.226262353618)*x[1]+(0.566087784489)*x[2]
-        arg[3,1,2,1]=(1.77828660075)*x[0]+(0.607419742685)*x[1]+(0.0297054744582)*x[2]
-        arg[3,2,0,0]=(-1.19326939474)*x[0]+(1.20875153887)*x[1]+(-0.124756222091)*x[2]
-        arg[3,2,0,1]=(0.0645190914271)*x[0]+(0.357580475716)*x[1]+(-1.59461469718)*x[2]
-        arg[3,2,1,0]=(1.4853619905)*x[0]+(0.751582301648)*x[1]+(0.859363177167)*x[2]
-        arg[3,2,1,1]=(1.36658655075)*x[0]+(-0.776650996613)*x[1]+(0.654743994261)*x[2]
-        arg[3,2,2,0]=(0.406696005677)*x[0]+(-0.528546876384)*x[1]+(-0.439775325396)*x[2]
-        arg[3,2,2,1]=(-0.725198159461)*x[0]+(-0.0933136564416)*x[1]+(-0.720365141393)*x[2]
-        arg[3,3,0,0]=(-0.428669112669)*x[0]+(0.626162511175)*x[1]+(-0.382776233923)*x[2]
-        arg[3,3,0,1]=(0.340474939218)*x[0]+(-0.140550383925)*x[1]+(0.353836983746)*x[2]
-        arg[3,3,1,0]=(0.851646816711)*x[0]+(0.0171684195949)*x[1]+(0.38173044322)*x[2]
-        arg[3,3,1,1]=(0.359647722225)*x[0]+(0.425799941165)*x[1]+(-0.80174052212)*x[2]
-        arg[3,3,2,0]=(0.13012568736)*x[0]+(-0.573735693651)*x[1]+(1.08843730088)*x[2]
-        arg[3,3,2,1]=(-1.01372953294)*x[0]+(0.335282956856)*x[1]+(1.24570512628)*x[2]
-        arg[3,4,0,0]=(-0.05674609039)*x[0]+(-0.814879575064)*x[1]+(-0.169789408264)*x[2]
-        arg[3,4,0,1]=(1.5968230938)*x[0]+(0.0679819277023)*x[1]+(0.892284314512)*x[2]
-        arg[3,4,1,0]=(1.22220298478)*x[0]+(-0.0258417926472)*x[1]+(0.440670138568)*x[2]
-        arg[3,4,1,1]=(0.647072768716)*x[0]+(-0.177651087906)*x[1]+(-0.115553644646)*x[2]
-        arg[3,4,2,0]=(1.29816363306)*x[0]+(-1.18656044167)*x[1]+(-0.465776533157)*x[2]
-        arg[3,4,2,1]=(0.328907496091)*x[0]+(-0.179857937151)*x[1]+(-0.476306938306)*x[2]
-        ref[0,0,0,0]=(-0.530378359482)/(o+1.)+(-0.935143327523)+(0.0724486640358)*0.5**o
-        ref[0,0,0,1]=(1.22837847871)/(o+1.)+(-0.113350954728)+(-0.950658241915)*0.5**o
-        ref[0,0,1,0]=(-0.000414683535449)/(o+1.)+(-0.183158731552)+(-0.49805903018)*0.5**o
-        ref[0,0,1,1]=(-0.882730389132)/(o+1.)+(-0.112174958816)+(0.831217305802)*0.5**o
-        ref[0,0,2,0]=(-1.1913557966)/(o+1.)+(-0.0615750891074)+(-0.206094875146)*0.5**o
-        ref[0,0,2,1]=(0.634536492589)/(o+1.)+(0.649890059464)+(0.627332034578)*0.5**o
-        ref[0,1,0,0]=(-1.38665625775)/(o+1.)+(-1.0210653524)+(0.900623422471)*0.5**o
-        ref[0,1,0,1]=(1.20633678024)/(o+1.)+(0.0888193121856)+(-0.143132885707)*0.5**o
-        ref[0,1,1,0]=(0.452225278035)/(o+1.)+(-0.148926943801)+(-0.710642116901)*0.5**o
-        ref[0,1,1,1]=(-0.244223430204)/(o+1.)+(-0.619607191996)+(0.499221868978)*0.5**o
-        ref[0,1,2,0]=(0.0383849036606)/(o+1.)+(0.759484971644)+(-0.652076533427)*0.5**o
-        ref[0,1,2,1]=(0.207558055759)/(o+1.)+(0.502305382384)+(0.0110157380215)*0.5**o
-        ref[0,2,0,0]=(0.761374280144)/(o+1.)+(0.777616611515)+(0.734430478174)*0.5**o
-        ref[0,2,0,1]=(0.554502862028)/(o+1.)+(-0.409274602016)+(-0.0353906413371)*0.5**o
-        ref[0,2,1,0]=(-0.252543841709)/(o+1.)+(0.386640377894)+(0.522891013551)*0.5**o
-        ref[0,2,1,1]=(-1.52497235887)/(o+1.)+(-0.807603254401)+(-0.0435508470367)*0.5**o
-        ref[0,2,2,0]=(0.172485606257)/(o+1.)+(0.350297526187)+(0.19802601847)*0.5**o
-        ref[0,2,2,1]=(-0.141271359379)/(o+1.)+(0.0509198134622)+(0.373638764298)*0.5**o
-        ref[0,3,0,0]=(1.31278836809)/(o+1.)+(-0.0918739323256)+(0.350372309595)*0.5**o
-        ref[0,3,0,1]=(-0.396933928109)/(o+1.)+(-0.436137805999)+(0.418204051696)*0.5**o
-        ref[0,3,1,0]=(-0.206619840099)/(o+1.)+(-0.118703289798)+(0.353208336689)*0.5**o
-        ref[0,3,1,1]=(-0.595153371293)/(o+1.)+(0.615722581562)+(0.469169640021)*0.5**o
-        ref[0,3,2,0]=(-0.680858997986)/(o+1.)+(-0.0393223937964)+(-0.206963765944)*0.5**o
-        ref[0,3,2,1]=(0.012753264598)/(o+1.)+(0.246188741489)+(-0.548093910595)*0.5**o
-        ref[0,4,0,0]=(-0.40478987122)/(o+1.)+(-0.890399681609)+(0.33572726901)*0.5**o
-        ref[0,4,0,1]=(0.0280062557264)/(o+1.)+(0.0358049413228)+(0.856417711355)*0.5**o
-        ref[0,4,1,0]=(0.181560004565)/(o+1.)+(0.329885369854)+(0.31502676574)*0.5**o
-        ref[0,4,1,1]=(0.0552681276841)/(o+1.)+(0.00372919426319)+(0.838827828375)*0.5**o
-        ref[0,4,2,0]=(0.656057162724)/(o+1.)+(0.179315527684)+(-0.522542441641)*0.5**o
-        ref[0,4,2,1]=(0.126189389317)/(o+1.)+(-0.429452001643)+(-0.149659196108)*0.5**o
-        ref[1,0,0,0]=(1.43443485527)/(o+1.)+(-0.55091754491)+(0.0630603461901)*0.5**o
-        ref[1,0,0,1]=(-0.612191779306)/(o+1.)+(0.604025235381)+(-0.230957890695)*0.5**o
-        ref[1,0,1,0]=(0.373085423681)/(o+1.)+(-0.0817391530697)+(-0.113594076805)*0.5**o
-        ref[1,0,1,1]=(0.761862677657)/(o+1.)+(0.819524484428)+(0.172331645033)*0.5**o
-        ref[1,0,2,0]=(0.929265450746)/(o+1.)+(-0.382585784938)+(0.254478170515)*0.5**o
-        ref[1,0,2,1]=(1.58236203463)/(o+1.)+(-0.280641188811)+(0.238179175679)*0.5**o
-        ref[1,1,0,0]=(-0.117055726312)/(o+1.)+(0.957914090571)+(-0.101672257501)*0.5**o
-        ref[1,1,0,1]=(0.0849062553796)/(o+1.)+(0.0703564566846)+(0.818261558262)*0.5**o
-        ref[1,1,1,0]=(-1.72219113622)/(o+1.)+(-0.357454724939)+(0.15835663635)*0.5**o
-        ref[1,1,1,1]=(0.739078400468)/(o+1.)+(0.532292543169)+(0.673031856531)*0.5**o
-        ref[1,1,2,0]=(0.255023909903)/(o+1.)+(0.229656917655)+(0.22400044344)*0.5**o
-        ref[1,1,2,1]=(0.518856765199)/(o+1.)+(0.380552790125)+(0.543298381396)*0.5**o
-        ref[1,2,0,0]=(0.0321563884831)/(o+1.)+(0.25981567762)+(-0.0316496900482)*0.5**o
-        ref[1,2,0,1]=(1.09318176771)/(o+1.)+(0.0572442907603)+(0.564519446305)*0.5**o
-        ref[1,2,1,0]=(0.756962791387)/(o+1.)+(0.69419429624)+(0.32401997528)*0.5**o
-        ref[1,2,1,1]=(1.28480299241)/(o+1.)+(-0.201990593541)+(-0.905711635518)*0.5**o
-        ref[1,2,2,0]=(1.04969566442)/(o+1.)+(0.72854097372)+(0.592972696101)*0.5**o
-        ref[1,2,2,1]=(-1.77086264775)/(o+1.)+(-0.261914180361)+(0.0440022926066)*0.5**o
-        ref[1,3,0,0]=(-0.477780531124)/(o+1.)+(-0.181354085163)+(-0.300288699967)*0.5**o
-        ref[1,3,0,1]=(-0.797627013456)/(o+1.)+(-0.523163955197)+(0.347574883435)*0.5**o
-        ref[1,3,1,0]=(0.428806106821)/(o+1.)+(-0.0514584302394)+(-0.655980330052)*0.5**o
-        ref[1,3,1,1]=(-0.141740459457)/(o+1.)+(-1.05699960931)+(-0.821242527644)*0.5**o
-        ref[1,3,2,0]=(0.0181810985873)/(o+1.)+(-0.180697139553)+(0.41036925874)*0.5**o
-        ref[1,3,2,1]=(-0.061077367)/(o+1.)+(0.250077446763)+(0.157102380812)*0.5**o
-        ref[1,4,0,0]=(1.14087212913)/(o+1.)+(0.368059029864)+(0.659728641463)*0.5**o
-        ref[1,4,0,1]=(0.365658713316)/(o+1.)+(0.088533821044)+(-0.584417938734)*0.5**o
-        ref[1,4,1,0]=(-1.11681308321)/(o+1.)+(0.438275560627)+(0.622761672604)*0.5**o
-        ref[1,4,1,1]=(1.18893372018)/(o+1.)+(0.172934240923)+(-0.172046824999)*0.5**o
-        ref[1,4,2,0]=(0.16240489493)/(o+1.)+(-0.0145923852256)+(0.834478471749)*0.5**o
-        ref[1,4,2,1]=(0.571355829378)/(o+1.)+(0.526896417749)+(0.458073367663)*0.5**o
-        ref[2,0,0,0]=(-0.489234572937)/(o+1.)+(-0.0135589093901)+(0.65140309615)*0.5**o
-        ref[2,0,0,1]=(-1.55383491931)/(o+1.)+(0.0161644619972)+(0.703425613366)*0.5**o
-        ref[2,0,1,0]=(-0.258604855723)/(o+1.)+(0.0827812678671)+(0.507722104457)*0.5**o
-        ref[2,0,1,1]=(0.0504178529481)/(o+1.)+(0.182991850332)+(0.359204920726)*0.5**o
-        ref[2,0,2,0]=(0.652043479841)/(o+1.)+(-0.443015450013)+(-0.548443848248)*0.5**o
-        ref[2,0,2,1]=(0.340317839857)/(o+1.)+(-0.379565594545)+(0.663652225917)*0.5**o
-        ref[2,1,0,0]=(-0.587863196667)/(o+1.)+(-0.0137797674284)+(-0.974202340562)*0.5**o
-        ref[2,1,0,1]=(1.00030747039)/(o+1.)+(-0.399997754768)+(0.755747639771)*0.5**o
-        ref[2,1,1,0]=(0.703413281036)/(o+1.)+(0.487016208736)+(-0.877007540039)*0.5**o
-        ref[2,1,1,1]=(0.263166830572)/(o+1.)+(-0.157259452849)+(0.666747865841)*0.5**o
-        ref[2,1,2,0]=(0.104532343004)/(o+1.)+(-1.02548001493)+(-0.486314104701)*0.5**o
-        ref[2,1,2,1]=(0.933518655478)/(o+1.)+(0.0369928229139)+(-0.244085626298)*0.5**o
-        ref[2,2,0,0]=(-1.50550384519)/(o+1.)+(-0.590996227594)+(-0.570130630622)*0.5**o
-        ref[2,2,0,1]=(-0.60318683839)/(o+1.)+(-0.38308245528)+(-0.502979448853)*0.5**o
-        ref[2,2,1,0]=(-1.11258910879)/(o+1.)+(-0.518777277969)+(-0.999685897413)*0.5**o
-        ref[2,2,1,1]=(1.84366617107)/(o+1.)+(-0.232866738261)+(-0.622157810558)*0.5**o
-        ref[2,2,2,0]=(-0.620181988585)/(o+1.)+(-0.836162444183)+(0.267939886396)*0.5**o
-        ref[2,2,2,1]=(-0.826647389099)/(o+1.)+(0.0929536518109)+(0.905694268362)*0.5**o
-        ref[2,3,0,0]=(0.184067674443)/(o+1.)+(0.259745858757)+(0.724759799909)*0.5**o
-        ref[2,3,0,1]=(0.0175595303049)/(o+1.)+(0.0560117358912)+(-0.907162868639)*0.5**o
-        ref[2,3,1,0]=(-0.609443154617)/(o+1.)+(0.186540819401)+(-0.951152598958)*0.5**o
-        ref[2,3,1,1]=(-1.61858082094)/(o+1.)+(0.679439858578)+(0.927423354971)*0.5**o
-        ref[2,3,2,0]=(0.44350652486)/(o+1.)+(0.81466177481)+(0.53899353207)*0.5**o
-        ref[2,3,2,1]=(-0.877289862245)/(o+1.)+(-1.05742260849)+(-0.462176941342)*0.5**o
-        ref[2,4,0,0]=(-0.736381416539)/(o+1.)+(-0.0139374259612)+(-0.0755289501641)*0.5**o
-        ref[2,4,0,1]=(0.690429326999)/(o+1.)+(-0.0293644018251)+(-0.328756862036)*0.5**o
-        ref[2,4,1,0]=(-1.57117034002)/(o+1.)+(-0.531463765387)+(0.553349645561)*0.5**o
-        ref[2,4,1,1]=(1.24898175282)/(o+1.)+(-0.452273024959)+(-0.515691967125)*0.5**o
-        ref[2,4,2,0]=(0.239126191643)/(o+1.)+(0.722504563932)+(0.547637159392)*0.5**o
-        ref[2,4,2,1]=(-1.40763254209)/(o+1.)+(-0.809456441012)+(0.932852295739)*0.5**o
-        ref[3,0,0,0]=(-0.416554297686)/(o+1.)+(-0.632193610911)+(-0.304105530258)*0.5**o
-        ref[3,0,0,1]=(-1.02983448036)/(o+1.)+(0.579212231778)+(-0.436532313966)*0.5**o
-        ref[3,0,1,0]=(0.42124133216)/(o+1.)+(0.368290418827)+(-0.920395942436)*0.5**o
-        ref[3,0,1,1]=(0.158195474854)/(o+1.)+(-0.17459474514)+(-0.830644214826)*0.5**o
-        ref[3,0,2,0]=(-1.18749647329)/(o+1.)+(-0.506173996178)+(-0.513857022748)*0.5**o
-        ref[3,0,2,1]=(0.233437753018)/(o+1.)+(0.455705145371)+(-0.323239005586)*0.5**o
-        ref[3,1,0,0]=(1.42991958566)/(o+1.)+(0.053769921022)+(0.150959272234)*0.5**o
-        ref[3,1,0,1]=(1.48423731111)/(o+1.)+(0.964048315997)+(-0.689863420196)*0.5**o
-        ref[3,1,1,0]=(0.868837676765)/(o+1.)+(-1.01261543254)+(0.165878933098)*0.5**o
-        ref[3,1,1,1]=(0.820750307831)/(o+1.)+(-0.300930223821)+(0.396516195659)*0.5**o
-        ref[3,1,2,0]=(0.477077782202)/(o+1.)+(-0.0416336989494)+(0.769016797571)*0.5**o
-        ref[3,1,2,1]=(0.359895440587)/(o+1.)+(0.555322395811)+(0.944871585683)*0.5**o
-        ref[3,2,0,0]=(0.657668315832)/(o+1.)+(-0.240321895174)+(-0.286298603451)*0.5**o
-        ref[3,2,0,1]=(-0.941360568282)/(o+1.)+(-0.0246544136593)+(-0.181845734439)*0.5**o
-        ref[3,2,1,0]=(1.60316834971)/(o+1.)+(0.252291602298)+(0.988555915005)*0.5**o
-        ref[3,2,1,1]=(0.833811957678)/(o+1.)+(-0.111970621871)+(0.634808834458)*0.5**o
-        ref[3,2,2,0]=(-1.38877073784)/(o+1.)+(0.538356636307)+(-0.249568730877)*0.5**o
-        ref[3,2,2,1]=(-0.311839184097)/(o+1.)+(-0.698114103264)+(0.169190433329)*0.5**o
-        ref[3,3,0,0]=(0.743170989696)/(o+1.)+(-0.499224746788)+(0.0699956684628)*0.5**o
-        ref[3,3,0,1]=(-0.293538786051)/(o+1.)+(0.26667992866)+(0.313940467768)*0.5**o
-        ref[3,3,1,0]=(0.951483461345)/(o+1.)+(0.148317904561)+(0.00242640905887)*0.5**o
-        ref[3,3,1,1]=(-0.110753912776)/(o+1.)+(-0.44308689138)+(0.980634836805)*0.5**o
-        ref[3,3,2,0]=(-0.337895223544)/(o+1.)+(0.358941646037)+(0.264839226057)*0.5**o
-        ref[3,3,2,1]=(0.857823611315)/(o+1.)+(0.30404611512)+(-0.898657291359)*0.5**o
-        ref[3,4,0,0]=(0.037944509376)/(o+1.)+(-0.364801700413)+(-0.349756182268)*0.5**o
-        ref[3,4,0,1]=(1.01114399396)/(o+1.)+(0.457103279485)+(0.631738783076)*0.5**o
-        ref[3,4,1,0]=(0.969931913888)/(o+1.)+(-0.165922085756)+(0.998943588321)*0.5**o
-        ref[3,4,1,1]=(1.35441114248)/(o+1.)+(-0.502422727199)+(0.00430234808496)*0.5**o
-        ref[3,4,2,0]=(-0.367201097566)/(o+1.)+(-0.337780780531)+(0.688589316866)*0.5**o
-        ref[3,4,2,1]=(-0.0547905846061)/(o+1.)+(-0.293870420685)+(0.31527404661)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      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.241972460279)*x[0]+(0.539729925673)*x[1]
-        ref=(-0.11832904353)/(o+1.)+(0.649911364492)+(-0.399791299503)*0.5**o
-      else:
-        arg=(0.53919797656)*x[0]+(0.379010664884)*x[1]+(0.274416064529)*x[2]
-        ref=(0.307947301472)/(o+1.)+(0.120674157748)+(0.643329089005)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      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.float_)
-      if dim==2:
-        arg[0]=(0.84849017056)*x[0]+(-0.161962845202)*x[1]
-        arg[1]=(-0.794717919135)*x[0]+(1.16003773358)*x[1]
-        ref[0]=(0.780514448202)/(o+1.)+(-0.34628958021)+(0.598592037576)*0.5**o
-        ref[1]=(0.570158156278)/(o+1.)+(0.241192316704)+(-0.687222975237)*0.5**o
-      else:
-        arg[0]=(-0.637352163634)*x[0]+(1.49477462643)*x[1]+(-0.284018740238)*x[2]
-        arg[1]=(0.125937459904)*x[0]+(-0.206499869891)*x[1]+(-0.342856240345)*x[2]
-        ref[0]=(-0.274486314451)/(o+1.)+(0.379737553853)+(0.0884149293071)*0.5**o
-        ref[1]=(-0.78452814021)/(o+1.)+(-0.122017410137)+(0.605144310151)*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.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.440868762581)*x[0]+(-0.216223666616)*x[1]
-        arg[0,1]=(-1.78807355591)*x[0]+(-0.208278123838)*x[1]
-        arg[0,2]=(-0.448066998103)*x[0]+(-0.819815507826)*x[1]
-        arg[0,3]=(1.27247881689)*x[0]+(0.0653439567221)*x[1]
-        arg[0,4]=(-1.00344990223)*x[0]+(-0.291263790583)*x[1]
-        arg[1,0]=(0.440080423838)*x[0]+(0.0356836558113)*x[1]
-        arg[1,1]=(-1.49545340091)*x[0]+(-0.133615590211)*x[1]
-        arg[1,2]=(1.05947638385)*x[0]+(0.408685904238)*x[1]
-        arg[1,3]=(-0.170309086605)*x[0]+(0.660523970285)*x[1]
-        arg[1,4]=(0.764323678475)*x[0]+(-0.529415080303)*x[1]
-        arg[2,0]=(0.55270081325)*x[0]+(-1.60630146231)*x[1]
-        arg[2,1]=(1.57419330248)*x[0]+(-1.24644288706)*x[1]
-        arg[2,2]=(0.0416757238363)*x[0]+(0.0247379738465)*x[1]
-        arg[2,3]=(1.0200370393)*x[0]+(0.364209137693)*x[1]
-        arg[2,4]=(-1.21858490389)*x[0]+(0.523056254546)*x[1]
-        arg[3,0]=(0.0524205820842)*x[0]+(1.65953217854)*x[1]
-        arg[3,1]=(1.21824883395)*x[0]+(0.905190834998)*x[1]
-        arg[3,2]=(0.226344434525)*x[0]+(-0.735349531462)*x[1]
-        arg[3,3]=(-1.00295245717)*x[0]+(-0.719605376499)*x[1]
-        arg[3,4]=(-0.446228759693)*x[0]+(1.23441974277)*x[1]
-        ref[0,0]=(0.347328582602)/(o+1.)+(-0.520484463519)+(0.0365479152384)*0.5**o
-        ref[0,1]=(-0.274564442352)/(o+1.)+(-0.413557210678)+(-0.894672816039)*0.5**o
-        ref[0,2]=(0.0720644688954)/(o+1.)+(-0.906636966188)+(0.473326957552)*0.5**o
-        ref[0,3]=(-0.747749341777)/(o+1.)+(0.730249972378)+(0.625072170633)*0.5**o
-        ref[0,4]=(-0.194031116169)/(o+1.)+(-0.432063325829)+(-0.236555924983)*0.5**o
-        ref[1,0]=(0.807081538033)/(o+1.)+(-0.612266650007)+(0.893215841629)*0.5**o
-        ref[1,1]=(-0.662516518957)/(o+1.)+(-0.176318925886)+(-0.61391462039)*0.5**o
-        ref[1,2]=(-0.570345636156)/(o+1.)+(0.791877954963)+(0.454752014319)*0.5**o
-        ref[1,3]=(-0.312400910795)/(o+1.)+(0.212935137466)+(0.376745519544)*0.5**o
-        ref[1,4]=(-0.764680414264)/(o+1.)+(0.174215486579)+(0.651158039278)*0.5**o
-        ref[2,0]=(-0.837942771642)/(o+1.)+(-0.187938486702)+(0.160219095985)*0.5**o
-        ref[2,1]=(-0.672421039761)/(o+1.)+(0.17384002882)+(0.652491397549)*0.5**o
-        ref[2,2]=(-0.656187949922)/(o+1.)+(0.559888736121)+(-0.397175824637)*0.5**o
-        ref[2,3]=(0.259558368195)/(o+1.)+(0.55148644978)+(0.0217149092406)*0.5**o
-        ref[2,4]=(-0.188397537901)/(o+1.)+(-0.0561706170512)+(-0.394789877345)*0.5**o
-        ref[3,0]=(0.91055628617)/(o+1.)+(0.574211274098)+(-0.347026073739)*0.5**o
-        ref[3,1]=(0.29225509237)/(o+1.)+(0.64447705482)+(0.542230466941)*0.5**o
-        ref[3,2]=(0.121065624384)/(o+1.)+(0.0316495277836)+(-0.693369776888)*0.5**o
-        ref[3,3]=(-0.943523334976)/(o+1.)+(-0.266302644031)+(-0.246429210629)*0.5**o
-        ref[3,4]=(0.714915399455)/(o+1.)+(0.459963131994)+(-0.846650680369)*0.5**o
-      else:
-        arg[0,0]=(-0.493869713454)*x[0]+(-0.381969413515)*x[1]+(1.59862368848)*x[2]
-        arg[0,1]=(-0.581245543547)*x[0]+(0.961117271889)*x[1]+(-0.158073515343)*x[2]
-        arg[0,2]=(-0.635283143641)*x[0]+(0.695573236987)*x[1]+(-0.719180832278)*x[2]
-        arg[0,3]=(-0.737780596733)*x[0]+(-1.11171283352)*x[1]+(0.459954346315)*x[2]
-        arg[0,4]=(1.12522065074)*x[0]+(-1.08427904854)*x[1]+(-0.715679673556)*x[2]
-        arg[1,0]=(0.972468186181)*x[0]+(-0.211014530435)*x[1]+(-0.734414099002)*x[2]
-        arg[1,1]=(-1.67337704748)*x[0]+(0.871096213089)*x[1]+(1.51063313223)*x[2]
-        arg[1,2]=(-0.222013007834)*x[0]+(1.46474508326)*x[1]+(-0.979243908862)*x[2]
-        arg[1,3]=(1.21195281087)*x[0]+(0.274082389329)*x[1]+(1.56144436465)*x[2]
-        arg[1,4]=(1.35812865884)*x[0]+(1.25819798853)*x[1]+(0.895334048395)*x[2]
-        arg[2,0]=(-0.167404344437)*x[0]+(0.0710591934315)*x[1]+(-0.124469683665)*x[2]
-        arg[2,1]=(-0.492240632996)*x[0]+(-0.317251117382)*x[1]+(0.0195461703529)*x[2]
-        arg[2,2]=(-0.277590266225)*x[0]+(-1.65859476899)*x[1]+(-0.0100216405668)*x[2]
-        arg[2,3]=(-0.0701281298455)*x[0]+(0.502137254703)*x[1]+(0.701220923443)*x[2]
-        arg[2,4]=(-0.72186096407)*x[0]+(-0.900487568179)*x[1]+(-0.735573922826)*x[2]
-        arg[3,0]=(-0.0677324474129)*x[0]+(-0.649963209718)*x[1]+(-0.770861099726)*x[2]
-        arg[3,1]=(0.563588189481)*x[0]+(0.714614932251)*x[1]+(-0.0957764632886)*x[2]
-        arg[3,2]=(1.13337395062)*x[0]+(0.507556316073)*x[1]+(-0.196759085949)*x[2]
-        arg[3,3]=(-1.2636883168)*x[0]+(-0.811660344076)*x[1]+(0.645462052598)*x[2]
-        arg[3,4]=(-0.104175186987)*x[0]+(-0.929176038155)*x[1]+(1.07530379856)*x[2]
-        ref[0,0]=(0.84538674973)/(o+1.)+(0.0569713556632)+(-0.236544899547)*0.5**o
-        ref[0,1]=(-0.307689589699)/(o+1.)+(0.245040337642)+(0.0394071274131)*0.5**o
-        ref[0,2]=(0.955244736357)/(o+1.)+(-0.341771136504)+(-0.930593202281)*0.5**o
-        ref[0,3]=(-0.353490461722)/(o+1.)+(-0.476228433901)+(-0.083591754415)*0.5**o
-        ref[0,4]=(-1.31220485482)/(o+1.)+(0.0466426656676)+(0.544181452128)*0.5**o
-        ref[1,0]=(0.22773475414)/(o+1.)+(-0.488454801654)+(0.776214405914)*0.5**o
-        ref[1,1]=(1.50688678707)/(o+1.)+(0.0851415404695)+(-0.96881757017)*0.5**o
-        ref[1,2]=(0.313471097102)/(o+1.)+(-0.0875594518156)+(0.125135973096)*0.5**o
-        ref[1,3]=(0.269521220179)/(o+1.)+(1.1192007195)+(0.539556905661)*0.5**o
-        ref[1,4]=(1.91499876064)/(o+1.)+(0.509063797893)+(0.578534339343)*0.5**o
-        ref[2,0]=(0.941352651562)/(o+1.)+(-0.966199402186)+(0.770231318139)*0.5**o
-        ref[2,1]=(-0.141490823562)/(o+1.)+(-0.20919987022)+(-0.230055016023)*0.5**o
-        ref[2,2]=(-0.916148047971)/(o+1.)+(-0.371740600192)+(-0.286577427426)*0.5**o
-        ref[2,3]=(0.229516219331)/(o+1.)+(0.274790532736)+(0.354132763498)*0.5**o
-        ref[2,4]=(-1.19120612619)/(o+1.)+(-0.139859859385)+(-0.88699661011)*0.5**o
-        ref[3,0]=(-1.48630121465)/(o+1.)+(0.0744166251063)+(-0.151088792417)*0.5**o
-        ref[3,1]=(-0.335583560513)/(o+1.)+(0.277436410841)+(0.963137397276)*0.5**o
-        ref[3,2]=(-0.673942688644)/(o+1.)+(0.70077509905)+(0.716563671283)*0.5**o
-        ref[3,3]=(-0.148394092795)/(o+1.)+(-0.237190239072)+(-0.807112037336)*0.5**o
-        ref[3,4]=(0.529983886211)/(o+1.)+(-0.371055083588)+(0.254078854382)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.661725715165)*x[0]+(0.219720717581)*x[1]
-        arg[0,0,1]=(-0.642240082304)*x[0]+(-0.279652756776)*x[1]
-        arg[0,1,0]=(0.0204235813151)*x[0]+(-0.374873249933)*x[1]
-        arg[0,1,1]=(1.4418481252)*x[0]+(0.205656834772)*x[1]
-        arg[1,0,0]=(0.65992179951)*x[0]+(-1.04887875458)*x[1]
-        arg[1,0,1]=(-0.195480216199)*x[0]+(-0.373905275039)*x[1]
-        arg[1,1,0]=(0.781251543352)*x[0]+(0.0416248109536)*x[1]
-        arg[1,1,1]=(-0.925751319189)*x[0]+(-0.113992910046)*x[1]
-        arg[2,0,0]=(-0.0767414065227)*x[0]+(-0.156682840973)*x[1]
-        arg[2,0,1]=(0.688457272529)*x[0]+(0.524916336046)*x[1]
-        arg[2,1,0]=(0.753722830084)*x[0]+(-0.890325839466)*x[1]
-        arg[2,1,1]=(0.730789290145)*x[0]+(-0.278986703716)*x[1]
-        arg[3,0,0]=(-0.287376796439)*x[0]+(-0.153987233224)*x[1]
-        arg[3,0,1]=(-1.15687435255)*x[0]+(0.250005890238)*x[1]
-        arg[3,1,0]=(-0.845312830629)*x[0]+(0.256211962352)*x[1]
-        arg[3,1,1]=(-0.574311820519)*x[0]+(-0.440297035998)*x[1]
-        arg[4,0,0]=(-0.360607647308)*x[0]+(-1.29380437557)*x[1]
-        arg[4,0,1]=(1.32019433485)*x[0]+(0.295255956618)*x[1]
-        arg[4,1,0]=(-1.64162941972)*x[0]+(0.117482372162)*x[1]
-        arg[4,1,1]=(-0.303103646619)*x[0]+(-0.88458982681)*x[1]
-        arg[5,0,0]=(-0.666761879038)*x[0]+(-0.735786278877)*x[1]
-        arg[5,0,1]=(0.0892896382617)*x[0]+(-0.45478872773)*x[1]
-        arg[5,1,0]=(-0.50985624415)*x[0]+(-0.400022939567)*x[1]
-        arg[5,1,1]=(1.39240706368)*x[0]+(0.0149740822664)*x[1]
-        ref[0,0,0]=(-0.114834538488)/(o+1.)+(0.240621006484)+(0.515038958264)*0.5**o
-        ref[0,0,1]=(0.588698337077)/(o+1.)+(-0.702256377233)+(-0.10607842169)*0.5**o
-        ref[0,1,0]=(0.13849818224)/(o+1.)+(-0.277555277991)+(0.0621627051247)*0.5**o
-        ref[0,1,1]=(-0.0878009521163)/(o+1.)+(0.630168348947)+(0.474969214192)*0.5**o
-        ref[1,0,0]=(-0.696600538111)/(o+1.)+(-0.343318260912)+(0.994280104861)*0.5**o
-        ref[1,0,1]=(-0.0887026688527)/(o+1.)+(-0.385753227979)+(0.290823633572)*0.5**o
-        ref[1,1,0]=(0.831408608956)/(o+1.)+(-0.242985671853)+(0.477439089057)*0.5**o
-        ref[1,1,1]=(-0.621059053191)/(o+1.)+(-0.0700203481241)+(-0.278644479797)*0.5**o
-        ref[2,0,0]=(0.7890720399)/(o+1.)+(-0.539721196393)+(0.0569461053905)*0.5**o
-        ref[2,0,1]=(-0.228628151401)/(o+1.)+(0.826946074171)+(-0.211890388366)*0.5**o
-        ref[2,1,0]=(-0.837617325493)/(o+1.)+(0.289656653751)+(0.121701008608)*0.5**o
-        ref[2,1,1]=(0.246577988625)/(o+1.)+(0.0512227634376)+(0.102779070928)*0.5**o
-        ref[3,0,0]=(-0.0109584684212)/(o+1.)+(-0.334888666171)+(0.239371771102)*0.5**o
-        ref[3,0,1]=(-0.125987676419)/(o+1.)+(-0.170179004032)+(-0.440522777827)*0.5**o
-        ref[3,1,0]=(-0.354093141636)/(o+1.)+(-0.177294275919)+(0.119580825198)*0.5**o
-        ref[3,1,1]=(-0.746761075412)/(o+1.)+(0.192068760731)+(-0.651985302566)*0.5**o
-        ref[4,0,0]=(-0.42411673219)/(o+1.)+(-0.579162944937)+(-0.0719694008158)*0.5**o
-        ref[4,0,1]=(0.169881169584)/(o+1.)+(0.483614029132)+(0.478341063616)*0.5**o
-        ref[4,1,0]=(0.943567836264)/(o+1.)+(-0.898782941264)+(-0.670149001297)*0.5**o
-        ref[4,1,1]=(-0.703610807936)/(o+1.)+(0.225342628657)+(-0.934767922806)*0.5**o
-        ref[5,0,0]=(-0.788792225213)/(o+1.)+(-0.1768857093)+(-0.259984514102)*0.5**o
-        ref[5,0,1]=(-0.788708879899)/(o+1.)+(-0.202288491141)+(0.827786772711)*0.5**o
-        ref[5,1,0]=(-0.823081809707)/(o+1.)+(0.274720963093)+(-0.636239300197)*0.5**o
-        ref[5,1,1]=(0.498922549807)/(o+1.)+(0.0129388257746)+(0.882580944588)*0.5**o
-      else:
-        arg[0,0,0]=(-0.426613654844)*x[0]+(-1.01433980801)*x[1]+(0.564621874916)*x[2]
-        arg[0,0,1]=(-0.438521968882)*x[0]+(1.6033775267)*x[1]+(0.691349995832)*x[2]
-        arg[0,1,0]=(-0.04337513731)*x[0]+(0.142927668234)*x[1]+(0.506581723199)*x[2]
-        arg[0,1,1]=(-0.120598868162)*x[0]+(-0.213666787813)*x[1]+(-1.04221679332)*x[2]
-        arg[1,0,0]=(0.153696490712)*x[0]+(-0.122516529815)*x[1]+(-1.08837272712)*x[2]
-        arg[1,0,1]=(0.410706464237)*x[0]+(0.720079363315)*x[1]+(-0.767790357539)*x[2]
-        arg[1,1,0]=(-1.03726428173)*x[0]+(-0.316809853003)*x[1]+(-0.780405868082)*x[2]
-        arg[1,1,1]=(-0.427547967216)*x[0]+(-0.897766643609)*x[1]+(-1.56913552404)*x[2]
-        arg[2,0,0]=(-0.282789248898)*x[0]+(-0.110846936031)*x[1]+(-1.4329391906)*x[2]
-        arg[2,0,1]=(1.46866588617)*x[0]+(-1.23022501959)*x[1]+(-0.3123390018)*x[2]
-        arg[2,1,0]=(-0.314115718621)*x[0]+(1.7333934438)*x[1]+(0.833572700726)*x[2]
-        arg[2,1,1]=(0.464246462638)*x[0]+(0.267484068646)*x[1]+(0.342009204787)*x[2]
-        arg[3,0,0]=(0.578853099163)*x[0]+(-0.0453855508465)*x[1]+(-0.0751578475516)*x[2]
-        arg[3,0,1]=(-0.526734485752)*x[0]+(-1.03286310016)*x[1]+(-0.398986583917)*x[2]
-        arg[3,1,0]=(0.0239088277798)*x[0]+(0.205105470192)*x[1]+(-1.04986349166)*x[2]
-        arg[3,1,1]=(0.130893744001)*x[0]+(-0.273702140669)*x[1]+(-0.0804222415128)*x[2]
-        arg[4,0,0]=(-0.822661618584)*x[0]+(-0.267189204519)*x[1]+(-0.290013766971)*x[2]
-        arg[4,0,1]=(-1.46759823734)*x[0]+(0.317465945316)*x[1]+(0.108284317752)*x[2]
-        arg[4,1,0]=(-1.3920990386)*x[0]+(-1.17823778694)*x[1]+(-0.18366434307)*x[2]
-        arg[4,1,1]=(-0.0915496209516)*x[0]+(-0.367624609832)*x[1]+(1.30630257323)*x[2]
-        arg[5,0,0]=(0.117840830455)*x[0]+(-0.667875433194)*x[1]+(-1.59716688455)*x[2]
-        arg[5,0,1]=(-0.818693227605)*x[0]+(0.483842075248)*x[1]+(-0.408373205535)*x[2]
-        arg[5,1,0]=(1.36906770301)*x[0]+(0.494926179999)*x[1]+(0.717041707262)*x[2]
-        arg[5,1,1]=(0.819757116081)*x[0]+(0.0982458749015)*x[1]+(0.275080391599)*x[2]
-        ref[0,0,0]=(0.236560699949)/(o+1.)+(-0.392784388084)+(-0.327323511722)*0.5**o
-        ref[0,0,1]=(1.32491522045)/(o+1.)+(0.525146863711)+(-0.519003394222)*0.5**o
-        ref[0,1,0]=(0.433749865563)/(o+1.)+(0.23007126008)+(-0.287758131599)*0.5**o
-        ref[0,1,1]=(-0.0563021060686)/(o+1.)+(-0.403921160703)+(-0.512338021825)*0.5**o
-        ref[1,0,0]=(-0.170496965963)/(o+1.)+(-0.914421777259)+(0.942147754258)*0.5**o
-        ref[1,0,1]=(-0.372707483726)/(o+1.)+(0.636041158872)+(-0.536379364005)*0.5**o
-        ref[1,1,0]=(-0.211529878364)/(o+1.)+(-0.912151985776)+(-0.0986461529033)*0.5**o
-        ref[1,1,1]=(-1.32533998437)/(o+1.)+(-0.685030198386)+(-0.19904975372)*0.5**o
-        ref[2,0,0]=(0.152048902469)/(o+1.)+(-0.88880590209)+(-0.201012473813)*0.5**o
-        ref[2,0,1]=(-0.748900052246)/(o+1.)+(-0.0226120471998)+(0.720226011425)*0.5**o
-        ref[2,1,0]=(0.77797707941)/(o+1.)+(1.01635055442)+(-0.557827762351)*0.5**o
-        ref[2,1,1]=(1.08969334716)/(o+1.)+(-0.404644728844)+(0.793335846595)*0.5**o
-        ref[3,0,0]=(1.56498448669)/(o+1.)+(-0.699967188685)+(0.293259591449)*0.5**o
-        ref[3,0,1]=(-0.620133427128)/(o+1.)+(-0.550037413688)+(-0.238375915329)*0.5**o
-        ref[3,1,0]=(-0.156380586288)/(o+1.)+(-0.0154369973565)+(-0.633594612687)*0.5**o
-        ref[3,1,1]=(-0.352989559326)/(o+1.)+(-0.290547031627)+(0.710852984398)*0.5**o
-        ref[4,0,0]=(-0.147579361355)/(o+1.)+(-0.615173424765)+(-0.00193837918766)*0.5**o
-        ref[4,0,1]=(0.598152345277)/(o+1.)+(-0.540248606426)+(-0.559503106696)*0.5**o
-        ref[4,1,0]=(-1.17182448825)/(o+1.)+(-0.590551681576)+(-0.401073317208)*0.5**o
-        ref[4,1,1]=(0.837504141173)/(o+1.)+(0.0807414267186)+(-0.15185865216)*0.5**o
-        ref[5,0,0]=(-0.646601115533)/(o+1.)+(-1.20895265273)+(0.9173049337)*0.5**o
-        ref[5,0,1]=(1.26626110052)/(o+1.)+(-0.56471923973)+(-0.880046978955)*0.5**o
-        ref[5,1,0]=(-0.069063169298)/(o+1.)+(0.883536796964)+(0.883025165644)*0.5**o
-        ref[5,1,1]=(1.05999338993)/(o+1.)+(-0.392519102893)+(0.918128198439)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.257898226293)*x[0]+(-0.01230083314)*x[1]
-        arg[0,0,0,1]=(0.0531183070647)*x[0]+(-0.170192287836)*x[1]
-        arg[0,0,1,0]=(-0.364644940864)*x[0]+(1.04227651446)*x[1]
-        arg[0,0,1,1]=(-0.894334108203)*x[0]+(0.151390331211)*x[1]
-        arg[0,0,2,0]=(1.03825401708)*x[0]+(-0.882136097149)*x[1]
-        arg[0,0,2,1]=(-1.05304910155)*x[0]+(1.06866311708)*x[1]
-        arg[0,1,0,0]=(1.54742542159)*x[0]+(0.941778348482)*x[1]
-        arg[0,1,0,1]=(1.1797380956)*x[0]+(-0.296417138234)*x[1]
-        arg[0,1,1,0]=(-1.09196028027)*x[0]+(-0.783377624006)*x[1]
-        arg[0,1,1,1]=(0.370952191443)*x[0]+(-0.0854141858991)*x[1]
-        arg[0,1,2,0]=(-1.23552368139)*x[0]+(1.23848088087)*x[1]
-        arg[0,1,2,1]=(0.216345350114)*x[0]+(-0.136524468427)*x[1]
-        arg[0,2,0,0]=(-1.21206901263)*x[0]+(0.804219582144)*x[1]
-        arg[0,2,0,1]=(0.192956526208)*x[0]+(0.588417678858)*x[1]
-        arg[0,2,1,0]=(-0.940175603742)*x[0]+(0.329047260784)*x[1]
-        arg[0,2,1,1]=(-0.138597387792)*x[0]+(0.398298326223)*x[1]
-        arg[0,2,2,0]=(0.10089766824)*x[0]+(1.25459493298)*x[1]
-        arg[0,2,2,1]=(-0.401163525883)*x[0]+(0.276542765282)*x[1]
-        arg[0,3,0,0]=(0.252156795268)*x[0]+(-0.50223063539)*x[1]
-        arg[0,3,0,1]=(0.466244610905)*x[0]+(-0.587025224301)*x[1]
-        arg[0,3,1,0]=(-0.268082012713)*x[0]+(-1.28874675764)*x[1]
-        arg[0,3,1,1]=(1.10867463519)*x[0]+(-0.165500912864)*x[1]
-        arg[0,3,2,0]=(-1.94681908266)*x[0]+(0.166854108476)*x[1]
-        arg[0,3,2,1]=(-0.537150417922)*x[0]+(0.0872851457131)*x[1]
-        arg[0,4,0,0]=(-0.376548581807)*x[0]+(-0.245201133388)*x[1]
-        arg[0,4,0,1]=(-0.135287690767)*x[0]+(0.750376238942)*x[1]
-        arg[0,4,1,0]=(-0.0240491596907)*x[0]+(-1.21337088424)*x[1]
-        arg[0,4,1,1]=(0.699215733397)*x[0]+(0.0596356032853)*x[1]
-        arg[0,4,2,0]=(-0.521316010702)*x[0]+(-1.75309802615)*x[1]
-        arg[0,4,2,1]=(0.403640172305)*x[0]+(1.41465827077)*x[1]
-        arg[1,0,0,0]=(-1.01538089315)*x[0]+(-1.14785578909)*x[1]
-        arg[1,0,0,1]=(1.10045201832)*x[0]+(0.630761728795)*x[1]
-        arg[1,0,1,0]=(0.137673646147)*x[0]+(-0.387129090253)*x[1]
-        arg[1,0,1,1]=(-1.04588287863)*x[0]+(-1.22433029859)*x[1]
-        arg[1,0,2,0]=(-0.567830263535)*x[0]+(-0.405808616295)*x[1]
-        arg[1,0,2,1]=(0.139326102495)*x[0]+(-1.93153384363)*x[1]
-        arg[1,1,0,0]=(-0.638524762921)*x[0]+(0.506405751653)*x[1]
-        arg[1,1,0,1]=(0.130775153144)*x[0]+(0.531317202208)*x[1]
-        arg[1,1,1,0]=(0.557476206038)*x[0]+(0.447588676184)*x[1]
-        arg[1,1,1,1]=(-0.538795916875)*x[0]+(-0.593869493531)*x[1]
-        arg[1,1,2,0]=(-1.09827483942)*x[0]+(0.376431061876)*x[1]
-        arg[1,1,2,1]=(-0.0074505620387)*x[0]+(-0.798645151486)*x[1]
-        arg[1,2,0,0]=(0.251283911459)*x[0]+(0.194595071813)*x[1]
-        arg[1,2,0,1]=(1.00482763799)*x[0]+(-1.00059863394)*x[1]
-        arg[1,2,1,0]=(-0.453095434684)*x[0]+(-0.513922011418)*x[1]
-        arg[1,2,1,1]=(0.558548837484)*x[0]+(0.0696328406825)*x[1]
-        arg[1,2,2,0]=(-1.20625552545)*x[0]+(-0.151371710692)*x[1]
-        arg[1,2,2,1]=(0.100262209656)*x[0]+(-0.314628804179)*x[1]
-        arg[1,3,0,0]=(0.947063141882)*x[0]+(-0.297271200562)*x[1]
-        arg[1,3,0,1]=(0.0760277251261)*x[0]+(-1.17982146387)*x[1]
-        arg[1,3,1,0]=(-1.46946063969)*x[0]+(-0.615302663567)*x[1]
-        arg[1,3,1,1]=(0.419747293729)*x[0]+(-0.629842531949)*x[1]
-        arg[1,3,2,0]=(-1.44607954917)*x[0]+(0.520024093924)*x[1]
-        arg[1,3,2,1]=(-1.01556392596)*x[0]+(-0.307173811354)*x[1]
-        arg[1,4,0,0]=(-0.164339335244)*x[0]+(0.390736414982)*x[1]
-        arg[1,4,0,1]=(-0.266932380288)*x[0]+(-0.731533848078)*x[1]
-        arg[1,4,1,0]=(-0.903825489055)*x[0]+(-1.81564784421)*x[1]
-        arg[1,4,1,1]=(-0.426008882665)*x[0]+(-1.09792948908)*x[1]
-        arg[1,4,2,0]=(-1.32984927589)*x[0]+(1.58196302541)*x[1]
-        arg[1,4,2,1]=(-0.0581032806145)*x[0]+(-0.323073355302)*x[1]
-        arg[2,0,0,0]=(-0.744014251373)*x[0]+(-0.818253254872)*x[1]
-        arg[2,0,0,1]=(0.368656965396)*x[0]+(-0.0864646380237)*x[1]
-        arg[2,0,1,0]=(-0.112428845773)*x[0]+(0.109170104421)*x[1]
-        arg[2,0,1,1]=(0.0682241548911)*x[0]+(-1.65999482283)*x[1]
-        arg[2,0,2,0]=(0.212777058993)*x[0]+(0.127163480945)*x[1]
-        arg[2,0,2,1]=(-0.256989443356)*x[0]+(0.183206687414)*x[1]
-        arg[2,1,0,0]=(0.578997994373)*x[0]+(0.413087453689)*x[1]
-        arg[2,1,0,1]=(0.886532090807)*x[0]+(0.330645525532)*x[1]
-        arg[2,1,1,0]=(0.18224742814)*x[0]+(-0.713166591262)*x[1]
-        arg[2,1,1,1]=(-0.25218296706)*x[0]+(0.736797897014)*x[1]
-        arg[2,1,2,0]=(0.885270371408)*x[0]+(-1.35641397127)*x[1]
-        arg[2,1,2,1]=(-0.963214290879)*x[0]+(0.348421598509)*x[1]
-        arg[2,2,0,0]=(0.884120745351)*x[0]+(0.956857507884)*x[1]
-        arg[2,2,0,1]=(-0.00795298517561)*x[0]+(0.51243740322)*x[1]
-        arg[2,2,1,0]=(-0.563655252975)*x[0]+(-0.716305131721)*x[1]
-        arg[2,2,1,1]=(0.648243491623)*x[0]+(-0.142239786485)*x[1]
-        arg[2,2,2,0]=(1.50677848542)*x[0]+(-0.359722006818)*x[1]
-        arg[2,2,2,1]=(-0.522592086302)*x[0]+(-0.18544927497)*x[1]
-        arg[2,3,0,0]=(0.0822787762966)*x[0]+(0.196309662733)*x[1]
-        arg[2,3,0,1]=(0.232573258627)*x[0]+(-0.0597976775432)*x[1]
-        arg[2,3,1,0]=(1.50895737052)*x[0]+(0.546625934312)*x[1]
-        arg[2,3,1,1]=(-1.64023373286)*x[0]+(0.220053261777)*x[1]
-        arg[2,3,2,0]=(1.5897208842)*x[0]+(-0.0355885594992)*x[1]
-        arg[2,3,2,1]=(-1.52822349982)*x[0]+(-0.0906934717656)*x[1]
-        arg[2,4,0,0]=(0.496696582601)*x[0]+(-0.303888675059)*x[1]
-        arg[2,4,0,1]=(-0.0819586112177)*x[0]+(-0.0449047294378)*x[1]
-        arg[2,4,1,0]=(-0.678530758513)*x[0]+(-1.2173963447)*x[1]
-        arg[2,4,1,1]=(-0.645450475268)*x[0]+(0.356771113426)*x[1]
-        arg[2,4,2,0]=(-0.486643021867)*x[0]+(0.977763869689)*x[1]
-        arg[2,4,2,1]=(-0.458991807397)*x[0]+(1.80038432923)*x[1]
-        arg[3,0,0,0]=(0.270795948755)*x[0]+(-0.691512096338)*x[1]
-        arg[3,0,0,1]=(-0.756717130099)*x[0]+(1.16189640534)*x[1]
-        arg[3,0,1,0]=(0.967554346699)*x[0]+(-0.272119008963)*x[1]
-        arg[3,0,1,1]=(1.14296491195)*x[0]+(-0.707175662379)*x[1]
-        arg[3,0,2,0]=(1.15665030692)*x[0]+(0.414803389409)*x[1]
-        arg[3,0,2,1]=(1.38997274955)*x[0]+(1.07065568192)*x[1]
-        arg[3,1,0,0]=(-0.623998925511)*x[0]+(0.375545806421)*x[1]
-        arg[3,1,0,1]=(-0.363431948398)*x[0]+(-0.183100417297)*x[1]
-        arg[3,1,1,0]=(0.0435866301729)*x[0]+(-0.557137572068)*x[1]
-        arg[3,1,1,1]=(-0.253225217468)*x[0]+(-0.0657932188329)*x[1]
-        arg[3,1,2,0]=(0.147700921064)*x[0]+(0.681624563015)*x[1]
-        arg[3,1,2,1]=(-0.075394297616)*x[0]+(0.271741245789)*x[1]
-        arg[3,2,0,0]=(1.34803044812)*x[0]+(0.87991065609)*x[1]
-        arg[3,2,0,1]=(0.0529487135353)*x[0]+(0.806480092352)*x[1]
-        arg[3,2,1,0]=(-1.52038624166)*x[0]+(-0.992718138685)*x[1]
-        arg[3,2,1,1]=(0.0859852188749)*x[0]+(1.63512596202)*x[1]
-        arg[3,2,2,0]=(1.46925148575)*x[0]+(-1.60383564005)*x[1]
-        arg[3,2,2,1]=(0.114463395473)*x[0]+(-1.0186377376)*x[1]
-        arg[3,3,0,0]=(-1.02962502658)*x[0]+(-1.06788543146)*x[1]
-        arg[3,3,0,1]=(-0.184391597652)*x[0]+(0.462603936483)*x[1]
-        arg[3,3,1,0]=(0.611113335782)*x[0]+(0.282417397043)*x[1]
-        arg[3,3,1,1]=(-0.193423873796)*x[0]+(-0.56108614964)*x[1]
-        arg[3,3,2,0]=(-0.0290687598224)*x[0]+(-0.460221158417)*x[1]
-        arg[3,3,2,1]=(0.784513522959)*x[0]+(-0.484813129206)*x[1]
-        arg[3,4,0,0]=(0.423780748664)*x[0]+(-0.344020787894)*x[1]
-        arg[3,4,0,1]=(1.10623024451)*x[0]+(-0.775008153301)*x[1]
-        arg[3,4,1,0]=(0.554847534291)*x[0]+(-0.854749107999)*x[1]
-        arg[3,4,1,1]=(-0.639595693597)*x[0]+(-0.966152813212)*x[1]
-        arg[3,4,2,0]=(-0.0172621996023)*x[0]+(0.321815074269)*x[1]
-        arg[3,4,2,1]=(0.39605156824)*x[0]+(-0.499138231749)*x[1]
-        ref[0,0,0,0]=(0.169892838337)/(o+1.)+(-0.323261281472)+(0.722227117759)*0.5**o
-        ref[0,0,0,1]=(-0.899797330597)/(o+1.)+(0.731242549464)+(-0.679761749104)*0.5**o
-        ref[0,0,1,0]=(0.948969615551)/(o+1.)+(-0.173478478707)+(0.0756189154575)*0.5**o
-        ref[0,0,1,1]=(-0.484419525942)/(o+1.)+(0.287761319651)+(-0.834046890353)*0.5**o
-        ref[0,0,2,0]=(-0.275366085384)/(o+1.)+(-0.051636507926)+(0.534757021171)*0.5**o
-        ref[0,0,2,1]=(0.338862631582)/(o+1.)+(0.076489529483)+(-0.47622767501)*0.5**o
-        ref[0,1,0,0]=(0.960885993642)/(o+1.)+(0.36959166751)+(0.789134441414)*0.5**o
-        ref[0,1,0,1]=(-0.101908900511)/(o+1.)+(0.343409131566)+(0.298411594744)*0.5**o
-        ref[0,1,1,0]=(-0.50227382988)/(o+1.)+(-0.431549057432)+(-0.509965959533)*0.5**o
-        ref[0,1,1,1]=(-0.294216689224)/(o+1.)+(0.293114907564)+(-0.00647512035965)*0.5**o
-        ref[0,1,2,0]=(0.330313139948)/(o+1.)+(0.0601559902451)+(-0.447667920962)*0.5**o
-        ref[0,1,2,1]=(-0.855325117375)/(o+1.)+(0.455706690618)+(0.0237326178252)*0.5**o
-        ref[0,2,0,0]=(0.958948557218)/(o+1.)+(-0.307015973897)+(-0.752766039908)*0.5**o
-        ref[0,2,0,1]=(0.622666086232)/(o+1.)+(0.417782845058)+(-0.676857571283)*0.5**o
-        ref[0,2,1,0]=(-0.476269525636)/(o+1.)+(0.203518519787)+(-0.541895856898)*0.5**o
-        ref[0,2,1,1]=(0.396862410812)/(o+1.)+(-0.318442063423)+(0.499722654464)*0.5**o
-        ref[0,2,2,0]=(0.291546173382)/(o+1.)+(0.345688404218)+(0.372569619405)*0.5**o
-        ref[0,2,2,1]=(-0.0863432016899)/(o+1.)+(0.296494638577)+(-0.631266836064)*0.5**o
-        ref[0,3,0,0]=(0.437179077921)/(o+1.)+(-0.340515851088)+(-0.00622121586734)*0.5**o
-        ref[0,3,0,1]=(-0.0670787919003)/(o+1.)+(-0.492735838895)+(0.931769856293)*0.5**o
-        ref[0,3,1,0]=(-0.455620785864)/(o+1.)+(-0.866886545624)+(0.632565106759)*0.5**o
-        ref[0,3,1,1]=(0.769395985412)/(o+1.)+(-0.303642587154)+(0.781062911223)*0.5**o
-        ref[0,3,2,0]=(-0.338160377272)/(o+1.)+(-0.237545833658)+(-0.966712929597)*0.5**o
-        ref[0,3,2,1]=(-0.796435534783)/(o+1.)+(0.544922318125)+(-0.743274373676)*0.5**o
-        ref[0,4,0,0]=(0.452932120968)/(o+1.)+(-0.512874769603)+(-0.048932296957)*0.5**o
-        ref[0,4,0,1]=(0.361579034112)/(o+1.)+(-0.0561290568189)+(0.365767627701)*0.5**o
-        ref[0,4,1,0]=(-0.626053161593)/(o+1.)+(-0.761324946295)+(0.911283010254)*0.5**o
-        ref[0,4,1,1]=(-0.0455977379835)/(o+1.)+(0.292122388548)+(0.22020429757)*0.5**o
-        ref[0,4,2,0]=(-0.881052488675)/(o+1.)+(-0.210171400955)+(-0.973018746263)*0.5**o
-        ref[0,4,2,1]=(0.955475719603)/(o+1.)+(0.367959093676)+(0.126904536122)*0.5**o
-        ref[1,0,0,0]=(-0.314523133291)/(o+1.)+(-0.649561146707)+(-0.54959125554)*0.5**o
-        ref[1,0,0,1]=(0.776726613012)/(o+1.)+(0.0747896120381)+(0.804907910029)*0.5**o
-        ref[1,0,1,0]=(0.416309554773)/(o+1.)+(0.0650606132082)+(-0.795886225295)*0.5**o
-        ref[1,0,1,1]=(-0.642083920221)/(o+1.)+(-0.518812997818)+(-0.590503261366)*0.5**o
-        ref[1,0,2,0]=(0.209400082886)/(o+1.)+(-0.592256267485)+(0.00147357225359)*0.5**o
-        ref[1,0,2,1]=(-0.969945221754)/(o+1.)+(-0.364559871358)+(-0.0931427766681)*0.5**o
-        ref[1,1,0,0]=(0.941138659497)/(o+1.)+(-0.103485523138)+(-0.866286624489)*0.5**o
-        ref[1,1,0,1]=(0.527395399401)/(o+1.)+(0.373358049173)+(-0.612019142395)*0.5**o
-        ref[1,1,1,0]=(-0.276942103917)/(o+1.)+(0.624509599487)+(0.0329877871648)*0.5**o
-        ref[1,1,1,1]=(-0.153477829221)/(o+1.)+(-0.0616268433725)+(-0.85593389444)*0.5**o
-        ref[1,1,2,0]=(0.2685285297)/(o+1.)+(-0.301824551915)+(-0.386723203413)*0.5**o
-        ref[1,1,2,1]=(-0.530960074652)/(o+1.)+(0.248621312801)+(-0.772378264474)*0.5**o
-        ref[1,2,0,0]=(0.745071931955)/(o+1.)+(-0.149268301427)+(-0.000656345828701)*0.5**o
-        ref[1,2,0,1]=(-0.581822428087)/(o+1.)+(0.2315691847)+(0.122913062738)*0.5**o
-        ref[1,2,1,0]=(-0.325165099021)/(o+1.)+(-0.414758139139)+(0.187663931198)*0.5**o
-        ref[1,2,1,1]=(-0.389683593964)/(o+1.)+(0.265985790556)+(0.485893691018)*0.5**o
-        ref[1,2,2,0]=(0.661969003098)/(o+1.)+(-0.514584521701)+(-0.990427195841)*0.5**o
-        ref[1,2,2,1]=(-0.0828384828188)/(o+1.)+(-0.482166570368)+(0.832805029032)*0.5**o
-        ref[1,3,0,0]=(-0.756020671713)/(o+1.)+(0.627704058228)+(0.150404496577)*0.5**o
-        ref[1,3,0,1]=(-0.93648010541)/(o+1.)+(0.11022703478)+(-0.387767702896)*0.5**o
-        ref[1,3,1,0]=(-0.995823513997)/(o+1.)+(-0.242072805569)+(-0.604794178119)*0.5**o
-        ref[1,3,1,1]=(-0.543071878541)/(o+1.)+(-0.160890620667)+(0.654757881656)*0.5**o
-        ref[1,3,2,0]=(0.803184441579)/(o+1.)+(-0.612293875048)+(-0.504652146723)*0.5**o
-        ref[1,3,2,1]=(-0.786714439322)/(o+1.)+(-0.175556007517)+(-0.18491128296)*0.5**o
-        ref[1,4,0,0]=(-0.302928744298)/(o+1.)+(0.476360987754)+(-0.423396151472)*0.5**o
-        ref[1,4,0,1]=(-0.410240602476)/(o+1.)+(-0.49551630458)+(0.40280698327)*0.5**o
-        ref[1,4,1,0]=(-0.820677400346)/(o+1.)+(-0.573037933363)+(-0.752720066188)*0.5**o
-        ref[1,4,1,1]=(-0.492748923658)/(o+1.)+(-0.600739806799)+(0.170290165507)*0.5**o
-        ref[1,4,2,0]=(0.926654770824)/(o+1.)+(0.011282908181)+(-0.697106837662)*0.5**o
-        ref[1,4,2,1]=(-0.958477382611)/(o+1.)+(0.618515858902)+(-0.65973097111)*0.5**o
-        ref[2,0,0,0]=(-0.15636950624)/(o+1.)+(-0.520670547262)+(-0.36455690548)*0.5**o
-        ref[2,0,0,1]=(-0.726424878286)/(o+1.)+(0.697757734621)+(-0.386898263585)*0.5**o
-        ref[2,0,1,0]=(-0.055162393508)/(o+1.)+(0.247015646426)+(-0.442127640696)*0.5**o
-        ref[2,0,1,1]=(-0.769332288875)/(o+1.)+(-0.0917175733456)+(-0.639003232373)*0.5**o
-        ref[2,0,2,0]=(-0.196390038297)/(o+1.)+(0.0977907270548)+(0.340749124126)*0.5**o
-        ref[2,0,2,1]=(0.841927481859)/(o+1.)+(-0.489185426146)+(0.0626606144906)*0.5**o
-        ref[2,1,0,0]=(0.590018249148)/(o+1.)+(0.378476967182)+(-0.354886735451)*0.5**o
-        ref[2,1,0,1]=(0.178495604742)/(o+1.)+(0.233073081069)+(0.572535849459)*0.5**o
-        ref[2,1,1,0]=(-0.762671064919)/(o+1.)+(-0.108539686142)+(0.448831274081)*0.5**o
-        ref[2,1,1,1]=(0.927591406535)/(o+1.)+(0.0441635703243)+(-0.53130361723)*0.5**o
-        ref[2,1,2,0]=(-0.604360706259)/(o+1.)+(-0.134848102332)+(0.402913311063)*0.5**o
-        ref[2,1,2,1]=(0.229727627441)/(o+1.)+(-0.323296604293)+(-0.197927111225)*0.5**o
-        ref[2,2,0,0]=(0.287478356112)/(o+1.)+(0.762635506201)+(0.0282288847209)*0.5**o
-        ref[2,2,0,1]=(0.243518182621)/(o+1.)+(-0.241502069199)+(0.743970373822)*0.5**o
-        ref[2,2,1,0]=(-0.369049760378)/(o+1.)+(-0.21941778965)+(-0.472075045017)*0.5**o
-        ref[2,2,1,1]=(-0.745343658666)/(o+1.)+(0.193375557775)+(0.864596248255)*0.5**o
-        ref[2,2,2,0]=(-0.491769251494)/(o+1.)+(0.442742387618)+(0.753340954862)*0.5**o
-        ref[2,2,2,1]=(0.551196377158)/(o+1.)+(-0.523535406613)+(-0.212166925203)*0.5**o
-        ref[2,3,0,0]=(0.192271522168)/(o+1.)+(-0.0181953944687)+(0.122707705798)*0.5**o
-        ref[2,3,0,1]=(-0.593768738594)/(o+1.)+(0.199088910545)+(0.368366498588)*0.5**o
-        ref[2,3,1,0]=(0.0866211808983)/(o+1.)+(0.723512694127)+(0.521936735685)*0.5**o
-        ref[2,3,1,1]=(-0.453288268254)/(o+1.)+(-0.15580970281)+(-0.655272797205)*0.5**o
-        ref[2,3,2,0]=(0.614105802669)/(o+1.)+(0.0411427694898)+(0.85774098305)*0.5**o
-        ref[2,3,2,1]=(0.263133533654)/(o+1.)+(-0.628776355867)+(-0.624497793507)*0.5**o
-        ref[2,4,0,0]=(-0.809347914722)/(o+1.)+(0.367719412237)+(0.26671699779)*0.5**o
-        ref[2,4,0,1]=(0.773124137566)/(o+1.)+(-0.442496395542)+(-0.0149946871367)*0.5**o
-        ref[2,4,1,0]=(-0.927311525126)/(o+1.)+(-0.0125177466568)+(-0.943580084777)*0.5**o
-        ref[2,4,1,1]=(0.306409665483)/(o+1.)+(0.128569553604)+(-0.852228134533)*0.5**o
-        ref[2,4,2,0]=(0.926185522145)/(o+1.)+(0.0750538146738)+(-0.58517230367)*0.5**o
-        ref[2,4,2,1]=(0.858245470922)/(o+1.)+(0.0125876600893)+(0.457971730734)*0.5**o
-        ref[3,0,0,0]=(-0.74501947953)/(o+1.)+(0.343942243752)+(-0.363581155556)*0.5**o
-        ref[3,0,0,1]=(0.850890737948)/(o+1.)+(0.157997002133)+(-0.761705466968)*0.5**o
-        ref[3,0,1,0]=(-0.0468962248591)/(o+1.)+(0.0297980532763)+(0.682735456043)*0.5**o
-        ref[3,0,1,1]=(0.0126326425456)/(o+1.)+(-0.076115296096)+(0.575387199213)*0.5**o
-        ref[3,0,2,0]=(-0.410549752333)/(o+1.)+(0.85556811978)+(0.270867209104)*0.5**o
-        ref[3,0,2,1]=(0.580487848545)/(o+1.)+(0.59069171729)+(0.698757148346)*0.5**o
-        ref[3,1,0,0]=(0.139052775786)/(o+1.)+(-0.334747475889)+(0.281989056901)*0.5**o
-        ref[3,1,0,1]=(0.591083610998)/(o+1.)+(-0.322680889668)+(-0.492254197357)*0.5**o
-        ref[3,1,1,0]=(0.384713965427)/(o+1.)+(-0.522411606102)+(0.146558304882)*0.5**o
-        ref[3,1,1,1]=(-0.827615582009)/(o+1.)+(-0.00295218575854)+(0.514501517225)*0.5**o
-        ref[3,1,2,0]=(0.84762578765)/(o+1.)+(0.208361555685)+(-0.43502341494)*0.5**o
-        ref[3,1,2,1]=(-0.554668615664)/(o+1.)+(0.825347835483)+(-0.899680107129)*0.5**o
-        ref[3,2,0,0]=(0.652802712143)/(o+1.)+(0.397197582731)+(0.7807432266)*0.5**o
-        ref[3,2,0,1]=(0.421495251937)/(o+1.)+(-0.119571710512)+(0.677076974975)*0.5**o
-        ref[3,2,1,0]=(-0.230439630375)/(o+1.)+(-0.733165339017)+(-0.816334071941)*0.5**o
-        ref[3,2,1,1]=(0.64153308098)/(o+1.)+(0.778374176432)+(-0.477170252948)*0.5**o
-        ref[3,2,2,0]=(-0.987848717403)/(o+1.)+(-0.0606435888479)+(0.974551740798)*0.5**o
-        ref[3,2,2,1]=(-0.318593711859)/(o+1.)+(-0.459904454409)+(0.334228278552)*0.5**o
-        ref[3,3,0,0]=(-0.418115413351)/(o+1.)+(-0.348616063735)+(-0.982162917221)*0.5**o
-        ref[3,3,0,1]=(-0.437684435015)/(o+1.)+(0.804145379606)+(-0.892393985366)*0.5**o
-        ref[3,3,1,0]=(0.944100110135)/(o+1.)+(-0.059994562245)+(0.0694197471801)*0.5**o
-        ref[3,3,1,1]=(-0.860656048613)/(o+1.)+(0.178136109535)+(-0.250126193893)*0.5**o
-        ref[3,3,2,0]=(-0.363631991908)/(o+1.)+(-0.298384287282)+(0.471110648232)*0.5**o
-        ref[3,3,2,1]=(-0.578021736479)/(o+1.)+(0.320913094365)+(0.235895941501)*0.5**o
-        ref[3,4,0,0]=(-0.946995649946)/(o+1.)+(0.0451978887455)+(0.936359833225)*0.5**o
-        ref[3,4,0,1]=(-0.636305818291)/(o+1.)+(0.258932088634)+(0.449663732234)*0.5**o
-        ref[3,4,1,0]=(-0.823421937366)/(o+1.)+(0.112980674356)+(0.297559014947)*0.5**o
-        ref[3,4,1,1]=(-0.441768022626)/(o+1.)+(-0.240840962617)+(-0.682298558949)*0.5**o
-        ref[3,4,2,0]=(-0.258808936822)/(o+1.)+(0.510306577882)+(-0.457251344276)*0.5**o
-        ref[3,4,2,1]=(-0.489365749016)/(o+1.)+(-0.296617385332)+(0.979513856171)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.474247989728)*x[0]+(-0.768689352235)*x[1]+(-1.08527900853)*x[2]
-        arg[0,0,0,1]=(-0.237113797789)*x[0]+(0.0842735741018)*x[1]+(0.203858551029)*x[2]
-        arg[0,0,1,0]=(0.24237127665)*x[0]+(0.421022955803)*x[1]+(-1.52818540927)*x[2]
-        arg[0,0,1,1]=(1.34624865817)*x[0]+(-0.798943272818)*x[1]+(-0.823168386315)*x[2]
-        arg[0,0,2,0]=(-0.906723771267)*x[0]+(0.328893123771)*x[1]+(-0.942770202463)*x[2]
-        arg[0,0,2,1]=(1.54305197694)*x[0]+(0.813063941984)*x[1]+(0.205532727168)*x[2]
-        arg[0,1,0,0]=(0.399159979872)*x[0]+(-1.52089837934)*x[1]+(-1.4064251406)*x[2]
-        arg[0,1,0,1]=(-0.121139354731)*x[0]+(1.12768246422)*x[1]+(0.234299409411)*x[2]
-        arg[0,1,1,0]=(-1.62513899388)*x[0]+(-0.173131700583)*x[1]+(1.24199996799)*x[2]
-        arg[0,1,1,1]=(-0.371929434177)*x[0]+(-0.606278610409)*x[1]+(-0.00600790063066)*x[2]
-        arg[0,1,2,0]=(-0.804531294423)*x[0]+(0.869392248002)*x[1]+(0.840417359943)*x[2]
-        arg[0,1,2,1]=(0.329452946275)*x[0]+(1.1072495446)*x[1]+(-0.213517932323)*x[2]
-        arg[0,2,0,0]=(1.02784887224)*x[0]+(0.435517042337)*x[1]+(1.58767206677)*x[2]
-        arg[0,2,0,1]=(-0.0120997177)*x[0]+(0.430135803314)*x[1]+(-0.717473068956)*x[2]
-        arg[0,2,1,0]=(0.955455517302)*x[0]+(0.712976918968)*x[1]+(-0.624804508641)*x[2]
-        arg[0,2,1,1]=(-1.03293986594)*x[0]+(-0.539062834482)*x[1]+(-1.61172701428)*x[2]
-        arg[0,2,2,0]=(-0.177662810138)*x[0]+(0.553352366127)*x[1]+(0.695417121111)*x[2]
-        arg[0,2,2,1]=(0.318133474679)*x[0]+(-0.452528947926)*x[1]+(0.468602505091)*x[2]
-        arg[0,3,0,0]=(-0.294467725916)*x[0]+(1.67314409894)*x[1]+(0.100736440007)*x[2]
-        arg[0,3,0,1]=(-0.517162349887)*x[0]+(-1.57430191254)*x[1]+(1.24045877402)*x[2]
-        arg[0,3,1,0]=(0.667393640368)*x[0]+(0.340993632212)*x[1]+(-1.09920535559)*x[2]
-        arg[0,3,1,1]=(0.37451406727)*x[0]+(0.37350649326)*x[1]+(0.357440871322)*x[2]
-        arg[0,3,2,0]=(-0.989366398194)*x[0]+(0.596179154759)*x[1]+(-0.573280308087)*x[2]
-        arg[0,3,2,1]=(-0.25561190141)*x[0]+(1.42296905238)*x[1]+(-1.21032031399)*x[2]
-        arg[0,4,0,0]=(-0.41394085285)*x[0]+(-0.751213929646)*x[1]+(-0.68470718293)*x[2]
-        arg[0,4,0,1]=(0.702985204167)*x[0]+(-0.0375821582587)*x[1]+(0.290630803819)*x[2]
-        arg[0,4,1,0]=(0.0558204653441)*x[0]+(1.61940057302)*x[1]+(-0.518863528354)*x[2]
-        arg[0,4,1,1]=(1.25876303604)*x[0]+(-1.40923202908)*x[1]+(1.05202333762)*x[2]
-        arg[0,4,2,0]=(0.0715295483294)*x[0]+(0.883869702529)*x[1]+(-0.463253474408)*x[2]
-        arg[0,4,2,1]=(0.564563789615)*x[0]+(-0.135049742988)*x[1]+(-1.3118878567)*x[2]
-        arg[1,0,0,0]=(0.707267335291)*x[0]+(-0.197244449872)*x[1]+(-0.114362773781)*x[2]
-        arg[1,0,0,1]=(-0.144762815659)*x[0]+(0.434177706452)*x[1]+(0.0754859099691)*x[2]
-        arg[1,0,1,0]=(-0.906934991359)*x[0]+(0.179011995627)*x[1]+(0.823936036469)*x[2]
-        arg[1,0,1,1]=(1.11165724605)*x[0]+(0.48023223731)*x[1]+(0.981353808181)*x[2]
-        arg[1,0,2,0]=(0.499460583481)*x[0]+(0.171586243561)*x[1]+(-0.252474775657)*x[2]
-        arg[1,0,2,1]=(-0.604289370884)*x[0]+(1.11610914086)*x[1]+(0.747439062711)*x[2]
-        arg[1,1,0,0]=(0.696191463882)*x[0]+(0.349547714404)*x[1]+(0.651361019042)*x[2]
-        arg[1,1,0,1]=(0.152679923426)*x[0]+(-0.448442911425)*x[1]+(1.33964371501)*x[2]
-        arg[1,1,1,0]=(-0.74612592015)*x[0]+(-1.27089239786)*x[1]+(-0.261725631736)*x[2]
-        arg[1,1,1,1]=(1.50839493929)*x[0]+(1.93229724987)*x[1]+(-0.963996845831)*x[2]
-        arg[1,1,2,0]=(0.867984447375)*x[0]+(-0.777493811854)*x[1]+(0.847847553133)*x[2]
-        arg[1,1,2,1]=(1.34249389498)*x[0]+(0.776160804062)*x[1]+(-0.295393972199)*x[2]
-        arg[1,2,0,0]=(-0.655771613243)*x[0]+(1.58220214455)*x[1]+(-0.406292477629)*x[2]
-        arg[1,2,0,1]=(0.59294895986)*x[0]+(0.544961164723)*x[1]+(0.634279670948)*x[2]
-        arg[1,2,1,0]=(1.15324179862)*x[0]+(0.645764835217)*x[1]+(0.670364725309)*x[2]
-        arg[1,2,1,1]=(-0.819459106271)*x[0]+(0.024815625404)*x[1]+(0.769753650676)*x[2]
-        arg[1,2,2,0]=(1.19042366161)*x[0]+(0.982020548972)*x[1]+(0.92730609738)*x[2]
-        arg[1,2,2,1]=(-0.742441488349)*x[0]+(-1.3101429812)*x[1]+(-0.198104246324)*x[2]
-        arg[1,3,0,0]=(0.349205030437)*x[0]+(-0.745240339596)*x[1]+(-0.744742092259)*x[2]
-        arg[1,3,0,1]=(0.993101296711)*x[0]+(-1.48331355036)*x[1]+(-1.00616778677)*x[2]
-        arg[1,3,1,0]=(-1.10586442824)*x[0]+(1.71922449779)*x[1]+(-0.943451153259)*x[2]
-        arg[1,3,1,1]=(-1.72393763035)*x[0]+(-1.14113495956)*x[1]+(-0.211909615809)*x[2]
-        arg[1,3,2,0]=(-0.378302963108)*x[0]+(-0.494705322002)*x[1]+(0.940164363332)*x[2]
-        arg[1,3,2,1]=(0.850541148743)*x[0]+(-1.45461945468)*x[1]+(1.20025821328)*x[2]
-        arg[1,4,0,0]=(1.33882463795)*x[0]+(0.475208133119)*x[1]+(0.722686059253)*x[2]
-        arg[1,4,0,1]=(0.0750422155969)*x[0]+(1.29758288845)*x[1]+(-1.41431668738)*x[2]
-        arg[1,4,1,0]=(1.36072344575)*x[0]+(-0.345743547563)*x[1]+(-0.63248018754)*x[2]
-        arg[1,4,1,1]=(0.579049229913)*x[0]+(0.954245074078)*x[1]+(-0.170538926965)*x[2]
-        arg[1,4,2,0]=(1.67615484634)*x[0]+(0.561067019023)*x[1]+(-1.26952326914)*x[2]
-        arg[1,4,2,1]=(0.700910547934)*x[0]+(0.58717328764)*x[1]+(0.795138196965)*x[2]
-        arg[2,0,0,0]=(0.763193592359)*x[0]+(-0.397549328381)*x[1]+(-0.230593559545)*x[2]
-        arg[2,0,0,1]=(0.454026153468)*x[0]+(-1.12464443717)*x[1]+(-0.147462098246)*x[2]
-        arg[2,0,1,0]=(-0.276457034935)*x[0]+(0.118173156654)*x[1]+(0.57296366275)*x[2]
-        arg[2,0,1,1]=(1.31887812253)*x[0]+(-0.544644483254)*x[1]+(0.0013728350582)*x[2]
-        arg[2,0,2,0]=(-0.257589384265)*x[0]+(-0.016005453203)*x[1]+(-0.508836430965)*x[2]
-        arg[2,0,2,1]=(-0.259420301773)*x[0]+(0.122645293168)*x[1]+(0.381613885289)*x[2]
-        arg[2,1,0,0]=(-1.64168512418)*x[0]+(0.025182006192)*x[1]+(0.0268780458975)*x[2]
-        arg[2,1,0,1]=(-0.0885344200898)*x[0]+(0.408795219114)*x[1]+(0.635798801606)*x[2]
-        arg[2,1,1,0]=(-0.959658503283)*x[0]+(1.034415556)*x[1]+(0.725681105748)*x[2]
-        arg[2,1,1,1]=(1.59312707789)*x[0]+(-0.116514952101)*x[1]+(-0.86121633507)*x[2]
-        arg[2,1,2,0]=(-1.44859572067)*x[0]+(-1.28344247275)*x[1]+(0.299296401869)*x[2]
-        arg[2,1,2,1]=(-0.488424372501)*x[0]+(1.23481402288)*x[1]+(0.01702902463)*x[2]
-        arg[2,2,0,0]=(-1.29986951244)*x[0]+(-1.20190912751)*x[1]+(-0.755848291051)*x[2]
-        arg[2,2,0,1]=(-0.52421656312)*x[0]+(-0.335471509689)*x[1]+(-1.01264312499)*x[2]
-        arg[2,2,1,0]=(-1.12066642609)*x[0]+(-1.02138558053)*x[1]+(-1.00777755552)*x[2]
-        arg[2,2,1,1]=(-1.42127024744)*x[0]+(1.63480022479)*x[1]+(0.542244906643)*x[2]
-        arg[2,2,2,0]=(-0.418852880297)*x[0]+(-0.983110436453)*x[1]+(-0.622603673805)*x[2]
-        arg[2,2,2,1]=(0.727366446825)*x[0]+(-0.256324856361)*x[1]+(-0.20608740758)*x[2]
-        arg[2,3,0,0]=(0.548268302883)*x[0]+(0.0102173127665)*x[1]+(0.869833576217)*x[2]
-        arg[2,3,0,1]=(-1.70159091061)*x[0]+(1.15876875083)*x[1]+(-0.234757706773)*x[2]
-        arg[2,3,1,0]=(-1.72817024817)*x[0]+(0.690055132218)*x[1]+(-0.149398998825)*x[2]
-        arg[2,3,1,1]=(1.80829412387)*x[0]+(-0.217899654855)*x[1]+(-0.922672217822)*x[2]
-        arg[2,3,2,0]=(1.23855200328)*x[0]+(0.412795411508)*x[1]+(0.960476191755)*x[2]
-        arg[2,3,2,1]=(-1.43061904621)*x[0]+(-0.766039000745)*x[1]+(-1.25765397361)*x[2]
-        arg[2,4,0,0]=(-0.660872016687)*x[0]+(-0.000405233718708)*x[1]+(-0.178507968219)*x[2]
-        arg[2,4,0,1]=(-0.168526882871)*x[0]+(-1.06936802685)*x[1]+(1.54083857104)*x[2]
-        arg[2,4,1,0]=(0.565807359529)*x[0]+(-1.41401297939)*x[1]+(-1.23254260537)*x[2]
-        arg[2,4,1,1]=(-0.373920075802)*x[0]+(0.407330812903)*x[1]+(-0.204667001328)*x[2]
-        arg[2,4,2,0]=(0.874100879885)*x[0]+(-0.191238094267)*x[1]+(1.54890969328)*x[2]
-        arg[2,4,2,1]=(0.566428125313)*x[0]+(-1.60899595601)*x[1]+(-1.05112529768)*x[2]
-        arg[3,0,0,0]=(-0.688037248111)*x[0]+(-1.56483484784)*x[1]+(0.26782504619)*x[2]
-        arg[3,0,0,1]=(0.418788954459)*x[0]+(-0.670455226092)*x[1]+(-0.0562760591375)*x[2]
-        arg[3,0,1,0]=(-0.2614362754)*x[0]+(0.271050519855)*x[1]+(0.227811982923)*x[2]
-        arg[3,0,1,1]=(-0.873198928647)*x[0]+(-0.483763141395)*x[1]+(0.33532383979)*x[2]
-        arg[3,0,2,0]=(-0.864161938176)*x[0]+(-1.4682754386)*x[1]+(-0.38126411162)*x[2]
-        arg[3,0,2,1]=(0.142827521381)*x[0]+(0.464483940188)*x[1]+(0.214297576606)*x[2]
-        arg[3,1,0,0]=(0.188747079113)*x[0]+(0.590821253713)*x[1]+(0.908850367108)*x[2]
-        arg[3,1,0,1]=(0.0587541582624)*x[0]+(0.955494266151)*x[1]+(1.70822209849)*x[2]
-        arg[3,1,1,0]=(-0.420356861523)*x[0]+(-0.551445918262)*x[1]+(-0.0187114754269)*x[2]
-        arg[3,1,1,1]=(1.07071658401)*x[0]+(-0.589035602194)*x[1]+(0.133725074027)*x[2]
-        arg[3,1,2,0]=(0.370477043767)*x[0]+(0.226262353618)*x[1]+(0.566087784489)*x[2]
-        arg[3,1,2,1]=(1.77828660075)*x[0]+(0.607419742685)*x[1]+(0.0297054744582)*x[2]
-        arg[3,2,0,0]=(-1.19326939474)*x[0]+(1.20875153887)*x[1]+(-0.124756222091)*x[2]
-        arg[3,2,0,1]=(0.0645190914271)*x[0]+(0.357580475716)*x[1]+(-1.59461469718)*x[2]
-        arg[3,2,1,0]=(1.4853619905)*x[0]+(0.751582301648)*x[1]+(0.859363177167)*x[2]
-        arg[3,2,1,1]=(1.36658655075)*x[0]+(-0.776650996613)*x[1]+(0.654743994261)*x[2]
-        arg[3,2,2,0]=(0.406696005677)*x[0]+(-0.528546876384)*x[1]+(-0.439775325396)*x[2]
-        arg[3,2,2,1]=(-0.725198159461)*x[0]+(-0.0933136564416)*x[1]+(-0.720365141393)*x[2]
-        arg[3,3,0,0]=(-0.428669112669)*x[0]+(0.626162511175)*x[1]+(-0.382776233923)*x[2]
-        arg[3,3,0,1]=(0.340474939218)*x[0]+(-0.140550383925)*x[1]+(0.353836983746)*x[2]
-        arg[3,3,1,0]=(0.851646816711)*x[0]+(0.0171684195949)*x[1]+(0.38173044322)*x[2]
-        arg[3,3,1,1]=(0.359647722225)*x[0]+(0.425799941165)*x[1]+(-0.80174052212)*x[2]
-        arg[3,3,2,0]=(0.13012568736)*x[0]+(-0.573735693651)*x[1]+(1.08843730088)*x[2]
-        arg[3,3,2,1]=(-1.01372953294)*x[0]+(0.335282956856)*x[1]+(1.24570512628)*x[2]
-        arg[3,4,0,0]=(-0.05674609039)*x[0]+(-0.814879575064)*x[1]+(-0.169789408264)*x[2]
-        arg[3,4,0,1]=(1.5968230938)*x[0]+(0.0679819277023)*x[1]+(0.892284314512)*x[2]
-        arg[3,4,1,0]=(1.22220298478)*x[0]+(-0.0258417926472)*x[1]+(0.440670138568)*x[2]
-        arg[3,4,1,1]=(0.647072768716)*x[0]+(-0.177651087906)*x[1]+(-0.115553644646)*x[2]
-        arg[3,4,2,0]=(1.29816363306)*x[0]+(-1.18656044167)*x[1]+(-0.465776533157)*x[2]
-        arg[3,4,2,1]=(0.328907496091)*x[0]+(-0.179857937151)*x[1]+(-0.476306938306)*x[2]
-        ref[0,0,0,0]=(-0.530378359482)/(o+1.)+(-0.935143327523)+(0.0724486640358)*0.5**o
-        ref[0,0,0,1]=(1.22837847871)/(o+1.)+(-0.113350954728)+(-0.950658241915)*0.5**o
-        ref[0,0,1,0]=(-0.000414683535449)/(o+1.)+(-0.183158731552)+(-0.49805903018)*0.5**o
-        ref[0,0,1,1]=(-0.882730389132)/(o+1.)+(-0.112174958816)+(0.831217305802)*0.5**o
-        ref[0,0,2,0]=(-1.1913557966)/(o+1.)+(-0.0615750891074)+(-0.206094875146)*0.5**o
-        ref[0,0,2,1]=(0.634536492589)/(o+1.)+(0.649890059464)+(0.627332034578)*0.5**o
-        ref[0,1,0,0]=(-1.38665625775)/(o+1.)+(-1.0210653524)+(0.900623422471)*0.5**o
-        ref[0,1,0,1]=(1.20633678024)/(o+1.)+(0.0888193121856)+(-0.143132885707)*0.5**o
-        ref[0,1,1,0]=(0.452225278035)/(o+1.)+(-0.148926943801)+(-0.710642116901)*0.5**o
-        ref[0,1,1,1]=(-0.244223430204)/(o+1.)+(-0.619607191996)+(0.499221868978)*0.5**o
-        ref[0,1,2,0]=(0.0383849036606)/(o+1.)+(0.759484971644)+(-0.652076533427)*0.5**o
-        ref[0,1,2,1]=(0.207558055759)/(o+1.)+(0.502305382384)+(0.0110157380215)*0.5**o
-        ref[0,2,0,0]=(0.761374280144)/(o+1.)+(0.777616611515)+(0.734430478174)*0.5**o
-        ref[0,2,0,1]=(0.554502862028)/(o+1.)+(-0.409274602016)+(-0.0353906413371)*0.5**o
-        ref[0,2,1,0]=(-0.252543841709)/(o+1.)+(0.386640377894)+(0.522891013551)*0.5**o
-        ref[0,2,1,1]=(-1.52497235887)/(o+1.)+(-0.807603254401)+(-0.0435508470367)*0.5**o
-        ref[0,2,2,0]=(0.172485606257)/(o+1.)+(0.350297526187)+(0.19802601847)*0.5**o
-        ref[0,2,2,1]=(-0.141271359379)/(o+1.)+(0.0509198134622)+(0.373638764298)*0.5**o
-        ref[0,3,0,0]=(1.31278836809)/(o+1.)+(-0.0918739323256)+(0.350372309595)*0.5**o
-        ref[0,3,0,1]=(-0.396933928109)/(o+1.)+(-0.436137805999)+(0.418204051696)*0.5**o
-        ref[0,3,1,0]=(-0.206619840099)/(o+1.)+(-0.118703289798)+(0.353208336689)*0.5**o
-        ref[0,3,1,1]=(-0.595153371293)/(o+1.)+(0.615722581562)+(0.469169640021)*0.5**o
-        ref[0,3,2,0]=(-0.680858997986)/(o+1.)+(-0.0393223937964)+(-0.206963765944)*0.5**o
-        ref[0,3,2,1]=(0.012753264598)/(o+1.)+(0.246188741489)+(-0.548093910595)*0.5**o
-        ref[0,4,0,0]=(-0.40478987122)/(o+1.)+(-0.890399681609)+(0.33572726901)*0.5**o
-        ref[0,4,0,1]=(0.0280062557264)/(o+1.)+(0.0358049413228)+(0.856417711355)*0.5**o
-        ref[0,4,1,0]=(0.181560004565)/(o+1.)+(0.329885369854)+(0.31502676574)*0.5**o
-        ref[0,4,1,1]=(0.0552681276841)/(o+1.)+(0.00372919426319)+(0.838827828375)*0.5**o
-        ref[0,4,2,0]=(0.656057162724)/(o+1.)+(0.179315527684)+(-0.522542441641)*0.5**o
-        ref[0,4,2,1]=(0.126189389317)/(o+1.)+(-0.429452001643)+(-0.149659196108)*0.5**o
-        ref[1,0,0,0]=(1.43443485527)/(o+1.)+(-0.55091754491)+(0.0630603461901)*0.5**o
-        ref[1,0,0,1]=(-0.612191779306)/(o+1.)+(0.604025235381)+(-0.230957890695)*0.5**o
-        ref[1,0,1,0]=(0.373085423681)/(o+1.)+(-0.0817391530697)+(-0.113594076805)*0.5**o
-        ref[1,0,1,1]=(0.761862677657)/(o+1.)+(0.819524484428)+(0.172331645033)*0.5**o
-        ref[1,0,2,0]=(0.929265450746)/(o+1.)+(-0.382585784938)+(0.254478170515)*0.5**o
-        ref[1,0,2,1]=(1.58236203463)/(o+1.)+(-0.280641188811)+(0.238179175679)*0.5**o
-        ref[1,1,0,0]=(-0.117055726312)/(o+1.)+(0.957914090571)+(-0.101672257501)*0.5**o
-        ref[1,1,0,1]=(0.0849062553796)/(o+1.)+(0.0703564566846)+(0.818261558262)*0.5**o
-        ref[1,1,1,0]=(-1.72219113622)/(o+1.)+(-0.357454724939)+(0.15835663635)*0.5**o
-        ref[1,1,1,1]=(0.739078400468)/(o+1.)+(0.532292543169)+(0.673031856531)*0.5**o
-        ref[1,1,2,0]=(0.255023909903)/(o+1.)+(0.229656917655)+(0.22400044344)*0.5**o
-        ref[1,1,2,1]=(0.518856765199)/(o+1.)+(0.380552790125)+(0.543298381396)*0.5**o
-        ref[1,2,0,0]=(0.0321563884831)/(o+1.)+(0.25981567762)+(-0.0316496900482)*0.5**o
-        ref[1,2,0,1]=(1.09318176771)/(o+1.)+(0.0572442907603)+(0.564519446305)*0.5**o
-        ref[1,2,1,0]=(0.756962791387)/(o+1.)+(0.69419429624)+(0.32401997528)*0.5**o
-        ref[1,2,1,1]=(1.28480299241)/(o+1.)+(-0.201990593541)+(-0.905711635518)*0.5**o
-        ref[1,2,2,0]=(1.04969566442)/(o+1.)+(0.72854097372)+(0.592972696101)*0.5**o
-        ref[1,2,2,1]=(-1.77086264775)/(o+1.)+(-0.261914180361)+(0.0440022926066)*0.5**o
-        ref[1,3,0,0]=(-0.477780531124)/(o+1.)+(-0.181354085163)+(-0.300288699967)*0.5**o
-        ref[1,3,0,1]=(-0.797627013456)/(o+1.)+(-0.523163955197)+(0.347574883435)*0.5**o
-        ref[1,3,1,0]=(0.428806106821)/(o+1.)+(-0.0514584302394)+(-0.655980330052)*0.5**o
-        ref[1,3,1,1]=(-0.141740459457)/(o+1.)+(-1.05699960931)+(-0.821242527644)*0.5**o
-        ref[1,3,2,0]=(0.0181810985873)/(o+1.)+(-0.180697139553)+(0.41036925874)*0.5**o
-        ref[1,3,2,1]=(-0.061077367)/(o+1.)+(0.250077446763)+(0.157102380812)*0.5**o
-        ref[1,4,0,0]=(1.14087212913)/(o+1.)+(0.368059029864)+(0.659728641463)*0.5**o
-        ref[1,4,0,1]=(0.365658713316)/(o+1.)+(0.088533821044)+(-0.584417938734)*0.5**o
-        ref[1,4,1,0]=(-1.11681308321)/(o+1.)+(0.438275560627)+(0.622761672604)*0.5**o
-        ref[1,4,1,1]=(1.18893372018)/(o+1.)+(0.172934240923)+(-0.172046824999)*0.5**o
-        ref[1,4,2,0]=(0.16240489493)/(o+1.)+(-0.0145923852256)+(0.834478471749)*0.5**o
-        ref[1,4,2,1]=(0.571355829378)/(o+1.)+(0.526896417749)+(0.458073367663)*0.5**o
-        ref[2,0,0,0]=(-0.489234572937)/(o+1.)+(-0.0135589093901)+(0.65140309615)*0.5**o
-        ref[2,0,0,1]=(-1.55383491931)/(o+1.)+(0.0161644619972)+(0.703425613366)*0.5**o
-        ref[2,0,1,0]=(-0.258604855723)/(o+1.)+(0.0827812678671)+(0.507722104457)*0.5**o
-        ref[2,0,1,1]=(0.0504178529481)/(o+1.)+(0.182991850332)+(0.359204920726)*0.5**o
-        ref[2,0,2,0]=(0.652043479841)/(o+1.)+(-0.443015450013)+(-0.548443848248)*0.5**o
-        ref[2,0,2,1]=(0.340317839857)/(o+1.)+(-0.379565594545)+(0.663652225917)*0.5**o
-        ref[2,1,0,0]=(-0.587863196667)/(o+1.)+(-0.0137797674284)+(-0.974202340562)*0.5**o
-        ref[2,1,0,1]=(1.00030747039)/(o+1.)+(-0.399997754768)+(0.755747639771)*0.5**o
-        ref[2,1,1,0]=(0.703413281036)/(o+1.)+(0.487016208736)+(-0.877007540039)*0.5**o
-        ref[2,1,1,1]=(0.263166830572)/(o+1.)+(-0.157259452849)+(0.666747865841)*0.5**o
-        ref[2,1,2,0]=(0.104532343004)/(o+1.)+(-1.02548001493)+(-0.486314104701)*0.5**o
-        ref[2,1,2,1]=(0.933518655478)/(o+1.)+(0.0369928229139)+(-0.244085626298)*0.5**o
-        ref[2,2,0,0]=(-1.50550384519)/(o+1.)+(-0.590996227594)+(-0.570130630622)*0.5**o
-        ref[2,2,0,1]=(-0.60318683839)/(o+1.)+(-0.38308245528)+(-0.502979448853)*0.5**o
-        ref[2,2,1,0]=(-1.11258910879)/(o+1.)+(-0.518777277969)+(-0.999685897413)*0.5**o
-        ref[2,2,1,1]=(1.84366617107)/(o+1.)+(-0.232866738261)+(-0.622157810558)*0.5**o
-        ref[2,2,2,0]=(-0.620181988585)/(o+1.)+(-0.836162444183)+(0.267939886396)*0.5**o
-        ref[2,2,2,1]=(-0.826647389099)/(o+1.)+(0.0929536518109)+(0.905694268362)*0.5**o
-        ref[2,3,0,0]=(0.184067674443)/(o+1.)+(0.259745858757)+(0.724759799909)*0.5**o
-        ref[2,3,0,1]=(0.0175595303049)/(o+1.)+(0.0560117358912)+(-0.907162868639)*0.5**o
-        ref[2,3,1,0]=(-0.609443154617)/(o+1.)+(0.186540819401)+(-0.951152598958)*0.5**o
-        ref[2,3,1,1]=(-1.61858082094)/(o+1.)+(0.679439858578)+(0.927423354971)*0.5**o
-        ref[2,3,2,0]=(0.44350652486)/(o+1.)+(0.81466177481)+(0.53899353207)*0.5**o
-        ref[2,3,2,1]=(-0.877289862245)/(o+1.)+(-1.05742260849)+(-0.462176941342)*0.5**o
-        ref[2,4,0,0]=(-0.736381416539)/(o+1.)+(-0.0139374259612)+(-0.0755289501641)*0.5**o
-        ref[2,4,0,1]=(0.690429326999)/(o+1.)+(-0.0293644018251)+(-0.328756862036)*0.5**o
-        ref[2,4,1,0]=(-1.57117034002)/(o+1.)+(-0.531463765387)+(0.553349645561)*0.5**o
-        ref[2,4,1,1]=(1.24898175282)/(o+1.)+(-0.452273024959)+(-0.515691967125)*0.5**o
-        ref[2,4,2,0]=(0.239126191643)/(o+1.)+(0.722504563932)+(0.547637159392)*0.5**o
-        ref[2,4,2,1]=(-1.40763254209)/(o+1.)+(-0.809456441012)+(0.932852295739)*0.5**o
-        ref[3,0,0,0]=(-0.416554297686)/(o+1.)+(-0.632193610911)+(-0.304105530258)*0.5**o
-        ref[3,0,0,1]=(-1.02983448036)/(o+1.)+(0.579212231778)+(-0.436532313966)*0.5**o
-        ref[3,0,1,0]=(0.42124133216)/(o+1.)+(0.368290418827)+(-0.920395942436)*0.5**o
-        ref[3,0,1,1]=(0.158195474854)/(o+1.)+(-0.17459474514)+(-0.830644214826)*0.5**o
-        ref[3,0,2,0]=(-1.18749647329)/(o+1.)+(-0.506173996178)+(-0.513857022748)*0.5**o
-        ref[3,0,2,1]=(0.233437753018)/(o+1.)+(0.455705145371)+(-0.323239005586)*0.5**o
-        ref[3,1,0,0]=(1.42991958566)/(o+1.)+(0.053769921022)+(0.150959272234)*0.5**o
-        ref[3,1,0,1]=(1.48423731111)/(o+1.)+(0.964048315997)+(-0.689863420196)*0.5**o
-        ref[3,1,1,0]=(0.868837676765)/(o+1.)+(-1.01261543254)+(0.165878933098)*0.5**o
-        ref[3,1,1,1]=(0.820750307831)/(o+1.)+(-0.300930223821)+(0.396516195659)*0.5**o
-        ref[3,1,2,0]=(0.477077782202)/(o+1.)+(-0.0416336989494)+(0.769016797571)*0.5**o
-        ref[3,1,2,1]=(0.359895440587)/(o+1.)+(0.555322395811)+(0.944871585683)*0.5**o
-        ref[3,2,0,0]=(0.657668315832)/(o+1.)+(-0.240321895174)+(-0.286298603451)*0.5**o
-        ref[3,2,0,1]=(-0.941360568282)/(o+1.)+(-0.0246544136593)+(-0.181845734439)*0.5**o
-        ref[3,2,1,0]=(1.60316834971)/(o+1.)+(0.252291602298)+(0.988555915005)*0.5**o
-        ref[3,2,1,1]=(0.833811957678)/(o+1.)+(-0.111970621871)+(0.634808834458)*0.5**o
-        ref[3,2,2,0]=(-1.38877073784)/(o+1.)+(0.538356636307)+(-0.249568730877)*0.5**o
-        ref[3,2,2,1]=(-0.311839184097)/(o+1.)+(-0.698114103264)+(0.169190433329)*0.5**o
-        ref[3,3,0,0]=(0.743170989696)/(o+1.)+(-0.499224746788)+(0.0699956684628)*0.5**o
-        ref[3,3,0,1]=(-0.293538786051)/(o+1.)+(0.26667992866)+(0.313940467768)*0.5**o
-        ref[3,3,1,0]=(0.951483461345)/(o+1.)+(0.148317904561)+(0.00242640905887)*0.5**o
-        ref[3,3,1,1]=(-0.110753912776)/(o+1.)+(-0.44308689138)+(0.980634836805)*0.5**o
-        ref[3,3,2,0]=(-0.337895223544)/(o+1.)+(0.358941646037)+(0.264839226057)*0.5**o
-        ref[3,3,2,1]=(0.857823611315)/(o+1.)+(0.30404611512)+(-0.898657291359)*0.5**o
-        ref[3,4,0,0]=(0.037944509376)/(o+1.)+(-0.364801700413)+(-0.349756182268)*0.5**o
-        ref[3,4,0,1]=(1.01114399396)/(o+1.)+(0.457103279485)+(0.631738783076)*0.5**o
-        ref[3,4,1,0]=(0.969931913888)/(o+1.)+(-0.165922085756)+(0.998943588321)*0.5**o
-        ref[3,4,1,1]=(1.35441114248)/(o+1.)+(-0.502422727199)+(0.00430234808496)*0.5**o
-        ref[3,4,2,0]=(-0.367201097566)/(o+1.)+(-0.337780780531)+(0.688589316866)*0.5**o
-        ref[3,4,2,1]=(-0.0547905846061)/(o+1.)+(-0.293870420685)+(0.31527404661)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.311787641998)*x[0]**o+(0.161673282875)*x[0]+(0.32570909237)*x[1]**o+(-0.249404742764)*x[1]
-        ref=(0.32570909237)/(o+1.)+(-0.0438657299447)+(0.311787641998)*0.5**o
-      else:
-        arg=(0.0675036998003)*x[0]**o+(-0.247751392136)*x[0]+(0.791676220029)*x[1]**o+(-0.269015236163)*x[1]+(0.265735156875)*x[2]**o+(0.820319192519)*x[2]
-        ref=(1.0574113769)/(o+1.)+(0.15177628211)+(0.0675036998003)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.99235950851)*x[0]**o+(0.00867392831518)*x[0]+(-0.598024390869)*x[1]**o+(0.00945232777857)*x[1]
-        arg[1]=(-0.140261338996)*x[0]**o+(-0.166524016889)*x[0]+(0.59850076881)*x[1]**o+(-0.805756215354)*x[1]
-        ref[0]=(-0.598024390869)/(o+1.)+(0.00906312804687)+(0.99235950851)*0.5**o
-        ref[1]=(0.59850076881)/(o+1.)+(-0.486140116122)+(-0.140261338996)*0.5**o
-      else:
-        arg[0]=(-0.158686556523)*x[0]**o+(0.249193164275)*x[0]+(-0.801383648208)*x[1]**o+(-0.439021533504)*x[1]+(-0.112035191366)*x[2]**o+(-0.323385862625)*x[2]
-        arg[1]=(0.392997873484)*x[0]**o+(-0.867468854104)*x[0]+(0.804459243476)*x[1]**o+(0.129028860314)*x[1]+(-0.252715502862)*x[2]**o+(0.457355923469)*x[2]
-        ref[0]=(-0.913418839574)/(o+1.)+(-0.256607115927)+(-0.158686556523)*0.5**o
-        ref[1]=(0.551743740614)/(o+1.)+(-0.140542035161)+(0.392997873484)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.330520725992)*x[0]**o+(0.160118740246)*x[0]+(-0.178670895269)*x[1]**o+(-0.281660040648)*x[1]
-        arg[0,1]=(-0.871801084852)*x[0]**o+(0.692549035429)*x[0]+(-0.265102051042)*x[1]**o+(-0.799752901882)*x[1]
-        arg[0,2]=(-0.816985024574)*x[0]**o+(0.534242721856)*x[0]+(0.81492666918)*x[1]**o+(0.891189158633)*x[1]
-        arg[0,3]=(-0.20728122917)*x[0]**o+(-0.656873565737)*x[0]+(-0.924660993906)*x[1]**o+(0.453699593426)*x[1]
-        arg[0,4]=(-0.541377726375)*x[0]**o+(0.916287049432)*x[0]+(-0.15879052465)*x[1]**o+(-0.319875161126)*x[1]
-        arg[1,0]=(0.296966289838)*x[0]**o+(0.170347587334)*x[0]+(0.755207250839)*x[1]**o+(0.677658805212)*x[1]
-        arg[1,1]=(-0.507591010573)*x[0]**o+(0.299638021889)*x[0]+(-0.757702071557)*x[1]**o+(-0.194564860748)*x[1]
-        arg[1,2]=(0.821972467197)*x[0]**o+(-0.75902704466)*x[0]+(0.19424332718)*x[1]**o+(-0.070182646035)*x[1]
-        arg[1,3]=(-0.340805687409)*x[0]**o+(0.585961973082)*x[0]+(-0.602942732318)*x[1]**o+(-0.288941395094)*x[1]
-        arg[1,4]=(0.0314374795024)*x[0]**o+(0.293710824013)*x[0]+(0.576509865762)*x[1]**o+(-0.481377812302)*x[1]
-        arg[2,0]=(0.250117528833)*x[0]**o+(-0.318419344173)*x[0]+(-0.793830015706)*x[1]**o+(0.0445553063586)*x[1]
-        arg[2,1]=(-0.347974394766)*x[0]**o+(-0.569347105354)*x[0]+(0.838687005759)*x[1]**o+(0.534306628908)*x[1]
-        arg[2,2]=(0.53063272248)*x[0]**o+(0.426504428158)*x[0]+(0.215398162753)*x[1]**o+(0.324348187788)*x[1]
-        arg[2,3]=(-0.336752121527)*x[0]**o+(0.666074768462)*x[0]+(-0.739123251932)*x[1]**o+(-0.538899653147)*x[1]
-        arg[2,4]=(-0.832783810519)*x[0]**o+(0.558572116384)*x[0]+(0.119988536199)*x[1]**o+(-0.664170918761)*x[1]
-        arg[3,0]=(0.4941356722)*x[0]**o+(-0.403591783006)*x[0]+(0.205050527245)*x[1]**o+(0.351642574939)*x[1]
-        arg[3,1]=(0.12538190695)*x[0]**o+(-0.890722638937)*x[0]+(-0.897011486902)*x[1]**o+(-0.465522770696)*x[1]
-        arg[3,2]=(-0.862829007552)*x[0]**o+(-0.950531038019)*x[0]+(-0.970016379643)*x[1]**o+(-0.500580755888)*x[1]
-        arg[3,3]=(0.131451743264)*x[0]**o+(0.43845495141)*x[0]+(-0.929808474589)*x[1]**o+(-0.104714452616)*x[1]
-        arg[3,4]=(-0.81935224348)*x[0]**o+(-0.53791483312)*x[0]+(-0.714512816761)*x[1]**o+(0.329859667225)*x[1]
-        ref[0,0]=(-0.178670895269)/(o+1.)+(-0.0607706502011)+(0.330520725992)*0.5**o
-        ref[0,1]=(-0.265102051042)/(o+1.)+(-0.0536019332266)+(-0.871801084852)*0.5**o
-        ref[0,2]=(0.81492666918)/(o+1.)+(0.712715940244)+(-0.816985024574)*0.5**o
-        ref[0,3]=(-0.924660993906)/(o+1.)+(-0.101586986156)+(-0.20728122917)*0.5**o
-        ref[0,4]=(-0.15879052465)/(o+1.)+(0.298205944153)+(-0.541377726375)*0.5**o
-        ref[1,0]=(0.755207250839)/(o+1.)+(0.424003196273)+(0.296966289838)*0.5**o
-        ref[1,1]=(-0.757702071557)/(o+1.)+(0.0525365805706)+(-0.507591010573)*0.5**o
-        ref[1,2]=(0.19424332718)/(o+1.)+(-0.414604845348)+(0.821972467197)*0.5**o
-        ref[1,3]=(-0.602942732318)/(o+1.)+(0.148510288994)+(-0.340805687409)*0.5**o
-        ref[1,4]=(0.576509865762)/(o+1.)+(-0.0938334941445)+(0.0314374795024)*0.5**o
-        ref[2,0]=(-0.793830015706)/(o+1.)+(-0.136932018907)+(0.250117528833)*0.5**o
-        ref[2,1]=(0.838687005759)/(o+1.)+(-0.0175202382229)+(-0.347974394766)*0.5**o
-        ref[2,2]=(0.215398162753)/(o+1.)+(0.375426307973)+(0.53063272248)*0.5**o
-        ref[2,3]=(-0.739123251932)/(o+1.)+(0.0635875576574)+(-0.336752121527)*0.5**o
-        ref[2,4]=(0.119988536199)/(o+1.)+(-0.0527994011886)+(-0.832783810519)*0.5**o
-        ref[3,0]=(0.205050527245)/(o+1.)+(-0.0259746040335)+(0.4941356722)*0.5**o
-        ref[3,1]=(-0.897011486902)/(o+1.)+(-0.678122704817)+(0.12538190695)*0.5**o
-        ref[3,2]=(-0.970016379643)/(o+1.)+(-0.725555896953)+(-0.862829007552)*0.5**o
-        ref[3,3]=(-0.929808474589)/(o+1.)+(0.166870249397)+(0.131451743264)*0.5**o
-        ref[3,4]=(-0.714512816761)/(o+1.)+(-0.104027582947)+(-0.81935224348)*0.5**o
-      else:
-        arg[0,0]=(-0.916251178344)*x[0]**o+(0.858306033367)*x[0]+(0.814515071272)*x[1]**o+(-0.31988121358)*x[1]+(-0.973228319626)*x[2]**o+(-0.448894628432)*x[2]
-        arg[0,1]=(0.394307707909)*x[0]**o+(-0.270473398988)*x[0]+(0.904831123674)*x[1]**o+(-0.949869961069)*x[1]+(0.771889549168)*x[2]**o+(0.650652953462)*x[2]
-        arg[0,2]=(-0.0387282383528)*x[0]**o+(0.0292919821249)*x[0]+(-0.165189629855)*x[1]**o+(-0.265182468614)*x[1]+(0.919042632361)*x[2]**o+(0.710368688769)*x[2]
-        arg[0,3]=(0.680006301334)*x[0]**o+(0.96959940913)*x[0]+(0.773153544603)*x[1]**o+(-0.460435754764)*x[1]+(-0.202448514604)*x[2]**o+(-0.495739672831)*x[2]
-        arg[0,4]=(-0.972790915366)*x[0]**o+(-0.14148426268)*x[0]+(0.511995390348)*x[1]**o+(-0.252881217719)*x[1]+(0.255711210131)*x[2]**o+(0.729991325048)*x[2]
-        arg[1,0]=(-0.105824689194)*x[0]**o+(-0.201427239595)*x[0]+(-0.00550922402684)*x[1]**o+(-0.732794556814)*x[1]+(-0.0820953451459)*x[2]**o+(0.289904794134)*x[2]
-        arg[1,1]=(-0.378707957559)*x[0]**o+(0.776904510463)*x[0]+(0.0406721415351)*x[1]**o+(0.159288221237)*x[1]+(0.961004037621)*x[2]**o+(-0.0866180279992)*x[2]
-        arg[1,2]=(-0.0226058491089)*x[0]**o+(-0.569995151391)*x[0]+(-0.0675265986408)*x[1]**o+(-0.141280346236)*x[1]+(0.116098815262)*x[2]**o+(0.654630437206)*x[2]
-        arg[1,3]=(-0.567270755897)*x[0]**o+(0.580139672878)*x[0]+(-0.411816626246)*x[1]**o+(-0.490525831459)*x[1]+(0.9322522728)*x[2]**o+(-0.948230068413)*x[2]
-        arg[1,4]=(0.977251285351)*x[0]**o+(-0.457921996364)*x[0]+(-0.586207130671)*x[1]**o+(0.801370818191)*x[1]+(-0.667233775445)*x[2]**o+(0.277054304674)*x[2]
-        arg[2,0]=(0.997778241906)*x[0]**o+(0.490242237175)*x[0]+(0.406384527224)*x[1]**o+(-0.00724475574186)*x[1]+(-0.59799957401)*x[2]**o+(0.520598391022)*x[2]
-        arg[2,1]=(0.59766081214)*x[0]**o+(-0.144793824209)*x[0]+(-0.191121009265)*x[1]**o+(-0.178016091024)*x[1]+(0.168431462883)*x[2]**o+(-0.766200678925)*x[2]
-        arg[2,2]=(0.633988266946)*x[0]**o+(-0.880495194817)*x[0]+(-0.217502420499)*x[1]**o+(-0.730159316723)*x[1]+(0.255599562732)*x[2]**o+(-0.510511087905)*x[2]
-        arg[2,3]=(0.102332382261)*x[0]**o+(-0.370884332534)*x[0]+(-0.0926186085648)*x[1]**o+(0.86446607832)*x[1]+(0.0643112986026)*x[2]**o+(0.950118360785)*x[2]
-        arg[2,4]=(0.928323090624)*x[0]**o+(0.942943574803)*x[0]+(0.162570981489)*x[1]**o+(-0.971092675635)*x[1]+(0.641489870001)*x[2]**o+(0.695989498774)*x[2]
-        arg[3,0]=(-0.988813741403)*x[0]**o+(0.407960892494)*x[0]+(0.671572481461)*x[1]**o+(0.119756938854)*x[1]+(-0.923671788537)*x[2]**o+(-0.458931381612)*x[2]
-        arg[3,1]=(-0.241202616681)*x[0]**o+(-0.369134099039)*x[0]+(-0.129164268709)*x[1]**o+(-0.469311903775)*x[1]+(0.633909205241)*x[2]**o+(0.564043934538)*x[2]
-        arg[3,2]=(-0.397081811407)*x[0]**o+(0.909387986899)*x[0]+(0.260590665694)*x[1]**o+(-0.371472818152)*x[1]+(-0.0369834262513)*x[2]**o+(-0.887598789153)*x[2]
-        arg[3,3]=(-0.304262529036)*x[0]**o+(0.741316478862)*x[0]+(-0.384317206475)*x[1]**o+(-0.854685760579)*x[1]+(0.502373892581)*x[2]**o+(-0.923561844368)*x[2]
-        arg[3,4]=(-0.720555420423)*x[0]**o+(-0.115786593478)*x[0]+(0.832043243085)*x[1]**o+(-0.912631896773)*x[1]+(-0.583397798668)*x[2]**o+(-0.508174721594)*x[2]
-        ref[0,0]=(-0.158713248354)/(o+1.)+(0.0447650956777)+(-0.916251178344)*0.5**o
-        ref[0,1]=(1.67672067284)/(o+1.)+(-0.284845203298)+(0.394307707909)*0.5**o
-        ref[0,2]=(0.753853002506)/(o+1.)+(0.23723910114)+(-0.0387282383528)*0.5**o
-        ref[0,3]=(0.570705029999)/(o+1.)+(0.00671199076774)+(0.680006301334)*0.5**o
-        ref[0,4]=(0.767706600479)/(o+1.)+(0.167812922325)+(-0.972790915366)*0.5**o
-        ref[1,0]=(-0.0876045691728)/(o+1.)+(-0.322158501138)+(-0.105824689194)*0.5**o
-        ref[1,1]=(1.00167617916)/(o+1.)+(0.42478735185)+(-0.378707957559)*0.5**o
-        ref[1,2]=(0.0485722166212)/(o+1.)+(-0.0283225302105)+(-0.0226058491089)*0.5**o
-        ref[1,3]=(0.520435646554)/(o+1.)+(-0.429308113497)+(-0.567270755897)*0.5**o
-        ref[1,4]=(-1.25344090612)/(o+1.)+(0.31025156325)+(0.977251285351)*0.5**o
-        ref[2,0]=(-0.191615046786)/(o+1.)+(0.501797936227)+(0.997778241906)*0.5**o
-        ref[2,1]=(-0.0226895463818)/(o+1.)+(-0.544505297079)+(0.59766081214)*0.5**o
-        ref[2,2]=(0.0380971422336)/(o+1.)+(-1.06058279972)+(0.633988266946)*0.5**o
-        ref[2,3]=(-0.0283073099622)/(o+1.)+(0.721850053286)+(0.102332382261)*0.5**o
-        ref[2,4]=(0.80406085149)/(o+1.)+(0.333920198971)+(0.928323090624)*0.5**o
-        ref[3,0]=(-0.252099307076)/(o+1.)+(0.0343932248679)+(-0.988813741403)*0.5**o
-        ref[3,1]=(0.504744936532)/(o+1.)+(-0.137201034138)+(-0.241202616681)*0.5**o
-        ref[3,2]=(0.223607239442)/(o+1.)+(-0.174841810203)+(-0.397081811407)*0.5**o
-        ref[3,3]=(0.118056686106)/(o+1.)+(-0.518465563043)+(-0.304262529036)*0.5**o
-        ref[3,4]=(0.248645444416)/(o+1.)+(-0.768296605922)+(-0.720555420423)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.347273720148)*x[0]**o+(0.325185727721)*x[0]+(-0.855515194735)*x[1]**o+(0.825807975597)*x[1]
-        arg[0,0,1]=(0.842054669437)*x[0]**o+(0.353768311241)*x[0]+(0.0148900864182)*x[1]**o+(-0.402154654143)*x[1]
-        arg[0,1,0]=(-0.191525791617)*x[0]**o+(-0.299181220926)*x[0]+(-0.696260869529)*x[1]**o+(0.285645399154)*x[1]
-        arg[0,1,1]=(0.190151633835)*x[0]**o+(0.184074338131)*x[0]+(-0.497689504982)*x[1]**o+(-0.813410371313)*x[1]
-        arg[1,0,0]=(-0.695114302024)*x[0]**o+(0.427133485674)*x[0]+(-0.711899825683)*x[1]**o+(-0.296004734911)*x[1]
-        arg[1,0,1]=(0.37620789583)*x[0]**o+(-0.944850444544)*x[0]+(0.666194812839)*x[1]**o+(-0.0715430628168)*x[1]
-        arg[1,1,0]=(-0.0312291891427)*x[0]**o+(0.403009732443)*x[0]+(-0.378486005359)*x[1]**o+(-0.992729541609)*x[1]
-        arg[1,1,1]=(0.0675984132698)*x[0]**o+(0.241001129867)*x[0]+(0.340546237588)*x[1]**o+(-0.024830810543)*x[1]
-        arg[2,0,0]=(-0.146870758676)*x[0]**o+(-0.170434897147)*x[0]+(-0.579618469996)*x[1]**o+(-0.770817574749)*x[1]
-        arg[2,0,1]=(-0.3029068201)*x[0]**o+(-0.110636302601)*x[0]+(-0.905841665338)*x[1]**o+(-0.280977886629)*x[1]
-        arg[2,1,0]=(0.0547810600344)*x[0]**o+(0.00763321517272)*x[0]+(0.0156822194106)*x[1]**o+(-0.528337857094)*x[1]
-        arg[2,1,1]=(0.12016647407)*x[0]**o+(0.4590743733)*x[0]+(-0.574499998403)*x[1]**o+(0.698871172503)*x[1]
-        arg[3,0,0]=(0.481811757276)*x[0]**o+(0.748356476205)*x[0]+(-0.300272959749)*x[1]**o+(-0.707230263391)*x[1]
-        arg[3,0,1]=(-0.347858576311)*x[0]**o+(-0.177810365974)*x[0]+(0.384658344075)*x[1]**o+(-0.837385668636)*x[1]
-        arg[3,1,0]=(0.943559460135)*x[0]**o+(0.178778474835)*x[0]+(-0.831384000346)*x[1]**o+(-0.474975888568)*x[1]
-        arg[3,1,1]=(-0.589903969401)*x[0]**o+(0.271114795948)*x[0]+(-0.946594221253)*x[1]**o+(-0.964029170264)*x[1]
-        arg[4,0,0]=(0.221077049797)*x[0]**o+(0.986052914095)*x[0]+(-0.392982812685)*x[1]**o+(0.370828365061)*x[1]
-        arg[4,0,1]=(0.463121232737)*x[0]**o+(-0.91920434872)*x[0]+(0.830655891827)*x[1]**o+(0.193876462558)*x[1]
-        arg[4,1,0]=(0.925740559506)*x[0]**o+(0.534342942418)*x[0]+(0.446730463706)*x[1]**o+(0.181095371535)*x[1]
-        arg[4,1,1]=(-0.777093674353)*x[0]**o+(-0.435130879793)*x[0]+(0.134406853212)*x[1]**o+(0.861099956528)*x[1]
-        arg[5,0,0]=(-0.443943796359)*x[0]**o+(0.359190127208)*x[0]+(0.0570788998709)*x[1]**o+(0.548070594378)*x[1]
-        arg[5,0,1]=(0.762962865085)*x[0]**o+(0.969248002849)*x[0]+(0.729222816543)*x[1]**o+(-0.865271983926)*x[1]
-        arg[5,1,0]=(-0.915609563739)*x[0]**o+(-0.338560068696)*x[0]+(0.972145654544)*x[1]**o+(0.0941277349395)*x[1]
-        arg[5,1,1]=(-0.486023356984)*x[0]**o+(-0.426382776921)*x[0]+(-0.114606039743)*x[1]**o+(-0.992152486495)*x[1]
-        ref[0,0,0]=(-0.855515194735)/(o+1.)+(0.575496851659)+(-0.347273720148)*0.5**o
-        ref[0,0,1]=(0.0148900864182)/(o+1.)+(-0.0241931714509)+(0.842054669437)*0.5**o
-        ref[0,1,0]=(-0.696260869529)/(o+1.)+(-0.00676791088595)+(-0.191525791617)*0.5**o
-        ref[0,1,1]=(-0.497689504982)/(o+1.)+(-0.314668016591)+(0.190151633835)*0.5**o
-        ref[1,0,0]=(-0.711899825683)/(o+1.)+(0.0655643753813)+(-0.695114302024)*0.5**o
-        ref[1,0,1]=(0.666194812839)/(o+1.)+(-0.50819675368)+(0.37620789583)*0.5**o
-        ref[1,1,0]=(-0.378486005359)/(o+1.)+(-0.294859904583)+(-0.0312291891427)*0.5**o
-        ref[1,1,1]=(0.340546237588)/(o+1.)+(0.108085159662)+(0.0675984132698)*0.5**o
-        ref[2,0,0]=(-0.579618469996)/(o+1.)+(-0.470626235948)+(-0.146870758676)*0.5**o
-        ref[2,0,1]=(-0.905841665338)/(o+1.)+(-0.195807094615)+(-0.3029068201)*0.5**o
-        ref[2,1,0]=(0.0156822194106)/(o+1.)+(-0.260352320961)+(0.0547810600344)*0.5**o
-        ref[2,1,1]=(-0.574499998403)/(o+1.)+(0.578972772902)+(0.12016647407)*0.5**o
-        ref[3,0,0]=(-0.300272959749)/(o+1.)+(0.0205631064069)+(0.481811757276)*0.5**o
-        ref[3,0,1]=(0.384658344075)/(o+1.)+(-0.507598017305)+(-0.347858576311)*0.5**o
-        ref[3,1,0]=(-0.831384000346)/(o+1.)+(-0.148098706867)+(0.943559460135)*0.5**o
-        ref[3,1,1]=(-0.946594221253)/(o+1.)+(-0.346457187158)+(-0.589903969401)*0.5**o
-        ref[4,0,0]=(-0.392982812685)/(o+1.)+(0.678440639578)+(0.221077049797)*0.5**o
-        ref[4,0,1]=(0.830655891827)/(o+1.)+(-0.362663943081)+(0.463121232737)*0.5**o
-        ref[4,1,0]=(0.446730463706)/(o+1.)+(0.357719156977)+(0.925740559506)*0.5**o
-        ref[4,1,1]=(0.134406853212)/(o+1.)+(0.212984538367)+(-0.777093674353)*0.5**o
-        ref[5,0,0]=(0.0570788998709)/(o+1.)+(0.453630360793)+(-0.443943796359)*0.5**o
-        ref[5,0,1]=(0.729222816543)/(o+1.)+(0.0519880094615)+(0.762962865085)*0.5**o
-        ref[5,1,0]=(0.972145654544)/(o+1.)+(-0.122216166878)+(-0.915609563739)*0.5**o
-        ref[5,1,1]=(-0.114606039743)/(o+1.)+(-0.709267631708)+(-0.486023356984)*0.5**o
-      else:
-        arg[0,0,0]=(0.455440122065)*x[0]**o+(0.911340571887)*x[0]+(0.158409397783)*x[1]**o+(0.353755257124)*x[1]+(-0.392556456322)*x[2]**o+(0.707232271095)*x[2]
-        arg[0,0,1]=(-0.816405087957)*x[0]**o+(0.0691299991887)*x[0]+(0.178677657085)*x[1]**o+(0.526176369634)*x[1]+(-0.159459641444)*x[2]**o+(-0.197907778155)*x[2]
-        arg[0,1,0]=(-0.463418217546)*x[0]**o+(-0.485835567862)*x[0]+(0.760458548482)*x[1]**o+(0.902873590314)*x[1]+(-0.760679635511)*x[2]**o+(-0.483163544794)*x[2]
-        arg[0,1,1]=(0.743029549626)*x[0]**o+(-0.39131913217)*x[0]+(0.488809682734)*x[1]**o+(-0.256115251135)*x[1]+(0.0918611991036)*x[2]**o+(-0.281291060967)*x[2]
-        arg[1,0,0]=(0.794367740289)*x[0]**o+(0.727663222288)*x[0]+(-0.631739003283)*x[1]**o+(0.733862609049)*x[1]+(-0.721230552103)*x[2]**o+(0.787774790111)*x[2]
-        arg[1,0,1]=(0.505578181889)*x[0]**o+(0.616497234291)*x[0]+(-0.616903198005)*x[1]**o+(-0.355969913594)*x[1]+(0.0105854597103)*x[2]**o+(0.510273945857)*x[2]
-        arg[1,1,0]=(0.35370601878)*x[0]**o+(-0.0414232536827)*x[0]+(0.0546619209334)*x[1]**o+(0.0459241421788)*x[1]+(0.796266758386)*x[2]**o+(0.303998757002)*x[2]
-        arg[1,1,1]=(-0.245326163282)*x[0]**o+(0.0893045737315)*x[0]+(0.019401528413)*x[1]**o+(-0.838249399348)*x[1]+(0.510320088517)*x[2]**o+(0.544558918049)*x[2]
-        arg[2,0,0]=(-0.660208039977)*x[0]**o+(-0.224874460802)*x[0]+(-0.0467836584153)*x[1]**o+(-0.463886703951)*x[1]+(-0.0951679104966)*x[2]**o+(-0.735787783779)*x[2]
-        arg[2,0,1]=(-0.588259372806)*x[0]**o+(-0.18950606147)*x[0]+(-0.373439432467)*x[1]**o+(-0.116285718036)*x[1]+(-0.944687791765)*x[2]**o+(-0.243001707318)*x[2]
-        arg[2,1,0]=(0.798498386971)*x[0]**o+(0.500125941024)*x[0]+(0.197339376576)*x[1]**o+(-0.068777545221)*x[1]+(0.36649695624)*x[2]**o+(0.193956440608)*x[2]
-        arg[2,1,1]=(0.27501104189)*x[0]**o+(0.203066488761)*x[0]+(0.379278873515)*x[1]**o+(-0.789154057614)*x[1]+(0.893889499095)*x[2]**o+(0.867881975803)*x[2]
-        arg[3,0,0]=(0.0579414247006)*x[0]**o+(0.661826954985)*x[0]+(0.313969775635)*x[1]**o+(-0.125420102972)*x[1]+(-0.808513922748)*x[2]**o+(0.0301073398588)*x[2]
-        arg[3,0,1]=(-0.254544981247)*x[0]**o+(0.755983567644)*x[0]+(0.129524533092)*x[1]**o+(0.562828535682)*x[1]+(0.712881323083)*x[2]**o+(0.375450604678)*x[2]
-        arg[3,1,0]=(-0.100221176995)*x[0]**o+(-0.470987646782)*x[0]+(-0.444245257427)*x[1]**o+(-0.0112626639353)*x[1]+(-0.516917833845)*x[2]**o+(-0.664158938756)*x[2]
-        arg[3,1,1]=(0.259306174564)*x[0]**o+(0.367178744389)*x[0]+(0.177897569676)*x[1]**o+(-0.355724319562)*x[1]+(-0.809141944951)*x[2]**o+(0.962429694607)*x[2]
-        arg[4,0,0]=(0.351990799011)*x[0]**o+(-0.41657457182)*x[0]+(-0.769748341564)*x[1]**o+(-0.856355494001)*x[1]+(-0.777902936204)*x[2]**o+(-0.388980567423)*x[2]
-        arg[4,0,1]=(0.875307372684)*x[0]**o+(0.061375057221)*x[0]+(-0.262062525469)*x[1]**o+(0.0950324968281)*x[1]+(-0.145145751811)*x[2]**o+(-0.246872045818)*x[2]
-        arg[4,1,0]=(0.115340652181)*x[0]**o+(0.910414483949)*x[0]+(0.347463744624)*x[1]**o+(0.399961393031)*x[1]+(0.0491863598064)*x[2]**o+(-0.992304094864)*x[2]
-        arg[4,1,1]=(-0.125763267852)*x[0]**o+(0.485867057874)*x[0]+(-0.414172783931)*x[1]**o+(0.164145362806)*x[1]+(-0.488738184728)*x[2]**o+(-0.232758639076)*x[2]
-        arg[5,0,0]=(-0.748184063441)*x[0]**o+(-0.252715593115)*x[0]+(0.688609235584)*x[1]**o+(0.0645665122312)*x[1]+(0.365465805991)*x[2]**o+(-0.217347848328)*x[2]
-        arg[5,0,1]=(-0.298018437594)*x[0]**o+(-0.39683066279)*x[0]+(-0.0609074331294)*x[1]**o+(0.146930937933)*x[1]+(-0.00737018012329)*x[2]**o+(-0.700002160047)*x[2]
-        arg[5,1,0]=(0.974781669859)*x[0]**o+(0.0634072121163)*x[0]+(0.0194044697894)*x[1]**o+(-0.919375545742)*x[1]+(-0.779806244021)*x[2]**o+(0.641761171945)*x[2]
-        arg[5,1,1]=(0.485215976154)*x[0]**o+(0.879804212343)*x[0]+(-0.765170516406)*x[1]**o+(-0.205158612954)*x[1]+(-0.586708070331)*x[2]**o+(0.506670980992)*x[2]
-        ref[0,0,0]=(-0.23414705854)/(o+1.)+(0.986164050053)+(0.455440122065)*0.5**o
-        ref[0,0,1]=(0.0192180156412)/(o+1.)+(0.198699295334)+(-0.816405087957)*0.5**o
-        ref[0,1,0]=(-0.000221087029094)/(o+1.)+(-0.0330627611712)+(-0.463418217546)*0.5**o
-        ref[0,1,1]=(0.580670881837)/(o+1.)+(-0.464362722135)+(0.743029549626)*0.5**o
-        ref[1,0,0]=(-1.35296955539)/(o+1.)+(1.12465031072)+(0.794367740289)*0.5**o
-        ref[1,0,1]=(-0.606317738295)/(o+1.)+(0.385400633277)+(0.505578181889)*0.5**o
-        ref[1,1,0]=(0.85092867932)/(o+1.)+(0.154249822749)+(0.35370601878)*0.5**o
-        ref[1,1,1]=(0.52972161693)/(o+1.)+(-0.102192953784)+(-0.245326163282)*0.5**o
-        ref[2,0,0]=(-0.141951568912)/(o+1.)+(-0.712274474266)+(-0.660208039977)*0.5**o
-        ref[2,0,1]=(-1.31812722423)/(o+1.)+(-0.274396743412)+(-0.588259372806)*0.5**o
-        ref[2,1,0]=(0.563836332815)/(o+1.)+(0.312652418205)+(0.798498386971)*0.5**o
-        ref[2,1,1]=(1.27316837261)/(o+1.)+(0.140897203475)+(0.27501104189)*0.5**o
-        ref[3,0,0]=(-0.494544147113)/(o+1.)+(0.283257095936)+(0.0579414247006)*0.5**o
-        ref[3,0,1]=(0.842405856175)/(o+1.)+(0.847131354002)+(-0.254544981247)*0.5**o
-        ref[3,1,0]=(-0.961163091272)/(o+1.)+(-0.573204624737)+(-0.100221176995)*0.5**o
-        ref[3,1,1]=(-0.631244375275)/(o+1.)+(0.486942059717)+(0.259306174564)*0.5**o
-        ref[4,0,0]=(-1.54765127777)/(o+1.)+(-0.830955316622)+(0.351990799011)*0.5**o
-        ref[4,0,1]=(-0.407208277279)/(o+1.)+(-0.0452322458845)+(0.875307372684)*0.5**o
-        ref[4,1,0]=(0.39665010443)/(o+1.)+(0.159035891058)+(0.115340652181)*0.5**o
-        ref[4,1,1]=(-0.902910968659)/(o+1.)+(0.208626890802)+(-0.125763267852)*0.5**o
-        ref[5,0,0]=(1.05407504158)/(o+1.)+(-0.202748464606)+(-0.748184063441)*0.5**o
-        ref[5,0,1]=(-0.0682776132527)/(o+1.)+(-0.474950942452)+(-0.298018437594)*0.5**o
-        ref[5,1,0]=(-0.760401774232)/(o+1.)+(-0.10710358084)+(0.974781669859)*0.5**o
-        ref[5,1,1]=(-1.35187858674)/(o+1.)+(0.590658290191)+(0.485215976154)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.177078428867)*x[0]**o+(0.338116995819)*x[0]+(-0.750823220445)*x[1]**o+(0.0630074420245)*x[1]
-        arg[0,0,0,1]=(-0.682838671264)*x[0]**o+(-0.893797611147)*x[0]+(-0.0127659464437)*x[1]**o+(0.144120749888)*x[1]
-        arg[0,0,1,0]=(0.352439319413)*x[0]**o+(0.380064866457)*x[0]+(-0.932452125435)*x[1]**o+(0.914519937443)*x[1]
-        arg[0,0,1,1]=(-0.354033408023)*x[0]**o+(0.771069338542)*x[0]+(-0.702758889809)*x[1]**o+(-0.484485925087)*x[1]
-        arg[0,0,2,0]=(0.706826713479)*x[0]**o+(0.0526230471775)*x[0]+(-0.535244256862)*x[1]**o+(-0.085929844746)*x[1]
-        arg[0,0,2,1]=(-0.893497856528)*x[0]**o+(-0.892309840177)*x[0]+(0.742770093639)*x[1]**o+(0.987917060326)*x[1]
-        arg[0,1,0,0]=(-0.536624329097)*x[0]**o+(-0.569536051343)*x[0]+(-0.7740511254)*x[1]**o+(0.873150177653)*x[1]
-        arg[0,1,0,1]=(0.388396767346)*x[0]**o+(-0.902569510334)*x[0]+(0.196975646933)*x[1]**o+(0.184178333918)*x[1]
-        arg[0,1,1,0]=(-0.125771297178)*x[0]**o+(-0.335093336446)*x[0]+(0.372752949038)*x[1]**o+(-0.883928748878)*x[1]
-        arg[0,1,1,1]=(-0.313637256508)*x[0]**o+(-0.49607955109)*x[0]+(-0.726599229867)*x[1]**o+(0.360837115079)*x[1]
-        arg[0,1,2,0]=(0.92425817047)*x[0]**o+(0.734728600171)*x[0]+(1.60583902129e-05)*x[1]**o+(-0.124600971339)*x[1]
-        arg[0,1,2,1]=(-0.0981827607557)*x[0]**o+(-0.556005942436)*x[0]+(-0.888060617134)*x[1]**o+(0.857508807636)*x[1]
-        arg[0,2,0,0]=(-0.871590768072)*x[0]**o+(-0.208546938841)*x[0]+(-0.228336105988)*x[1]**o+(0.444098195066)*x[1]
-        arg[0,2,0,1]=(-0.628675127006)*x[0]**o+(0.834043549769)*x[0]+(-0.509662470381)*x[1]**o+(-0.801907226651)*x[1]
-        arg[0,2,1,0]=(-0.767528433339)*x[0]**o+(0.305967685996)*x[0]+(-0.587902586916)*x[1]**o+(0.38652781193)*x[1]
-        arg[0,2,1,1]=(0.388984380682)*x[0]**o+(0.490673256209)*x[0]+(-0.78470263647)*x[1]**o+(0.34909383158)*x[1]
-        arg[0,2,2,0]=(-0.910514531543)*x[0]**o+(-0.418810366626)*x[0]+(-0.637159792471)*x[1]**o+(0.794653160897)*x[1]
-        arg[0,2,2,1]=(0.570535552656)*x[0]**o+(-0.590385806831)*x[0]+(-0.298806908011)*x[1]**o+(-0.901531327347)*x[1]
-        arg[0,3,0,0]=(0.916864925136)*x[0]**o+(-0.019733476459)*x[0]+(-0.91370863065)*x[1]**o+(0.291932128733)*x[1]
-        arg[0,3,0,1]=(-0.851147484632)*x[0]**o+(-0.159304969602)*x[0]+(0.699832871063)*x[1]**o+(0.327932729929)*x[1]
-        arg[0,3,1,0]=(0.461273862468)*x[0]**o+(0.40068516653)*x[0]+(0.0203170502559)*x[1]**o+(0.973716167207)*x[1]
-        arg[0,3,1,1]=(0.63984877633)*x[0]**o+(0.580871491133)*x[0]+(-0.00587359808953)*x[1]**o+(-0.104805621161)*x[1]
-        arg[0,3,2,0]=(-0.159416471436)*x[0]**o+(-0.585039922994)*x[0]+(0.689553978928)*x[1]**o+(0.569617375406)*x[1]
-        arg[0,3,2,1]=(0.782397836312)*x[0]**o+(-0.581894025693)*x[0]+(0.0370277809126)*x[1]**o+(0.597309139432)*x[1]
-        arg[0,4,0,0]=(-0.0063433205485)*x[0]**o+(-0.242291627085)*x[0]+(0.110218625254)*x[1]**o+(0.819656578408)*x[1]
-        arg[0,4,0,1]=(-0.128215646666)*x[0]**o+(0.821312510893)*x[0]+(0.910723121611)*x[1]**o+(-0.0174623980585)*x[1]
-        arg[0,4,1,0]=(-0.604528735513)*x[0]**o+(-0.358705990504)*x[0]+(-0.281954207008)*x[1]**o+(0.123469639952)*x[1]
-        arg[0,4,1,1]=(0.65096807032)*x[0]**o+(0.882935341204)*x[0]+(-0.761226249914)*x[1]**o+(-0.830800218214)*x[1]
-        arg[0,4,2,0]=(-0.710718948634)*x[0]**o+(0.452128874613)*x[0]+(-0.780671499903)*x[1]**o+(-0.942033435912)*x[1]
-        arg[0,4,2,1]=(-0.0443187506467)*x[0]**o+(0.513943853321)*x[0]+(0.709902333411)*x[1]**o+(0.755430555318)*x[1]
-        arg[1,0,0,0]=(0.731890221753)*x[0]**o+(-0.821835735249)*x[0]+(-0.713098084853)*x[1]**o+(0.875738077525)*x[1]
-        arg[1,0,0,1]=(-0.130335125365)*x[0]**o+(0.580579210083)*x[0]+(-0.427105331069)*x[1]**o+(0.0435798068353)*x[1]
-        arg[1,0,1,0]=(-0.203908509107)*x[0]**o+(-0.941974700448)*x[0]+(0.344459670502)*x[1]**o+(0.758336135081)*x[1]
-        arg[1,0,1,1]=(0.186770929724)*x[0]**o+(0.348332058705)*x[0]+(-0.0683630778679)*x[1]**o+(0.480425212189)*x[1]
-        arg[1,0,2,0]=(-0.891275312975)*x[0]**o+(0.260630881729)*x[0]+(0.127955472707)*x[1]**o+(-0.554992279729)*x[1]
-        arg[1,0,2,1]=(-0.74620344519)*x[0]**o+(0.944025669845)*x[0]+(-0.052031562679)*x[1]**o+(0.966060927262)*x[1]
-        arg[1,1,0,0]=(0.871423198418)*x[0]**o+(-0.0769723128617)*x[0]+(0.783714758356)*x[1]**o+(0.530209967997)*x[1]
-        arg[1,1,0,1]=(0.943197824902)*x[0]**o+(-0.62624855429)*x[0]+(-0.00888785913795)*x[1]**o+(-0.0408857497082)*x[1]
-        arg[1,1,1,0]=(-0.74971981056)*x[0]**o+(0.925175163834)*x[0]+(0.481063204532)*x[1]**o+(-0.476700447185)*x[1]
-        arg[1,1,1,1]=(-0.431776603043)*x[0]**o+(-0.495358165507)*x[0]+(-0.0110588803484)*x[1]**o+(-0.575147325496)*x[1]
-        arg[1,1,2,0]=(0.578105297721)*x[0]**o+(-0.88169100464)*x[0]+(-0.646224518073)*x[1]**o+(0.465619837803)*x[1]
-        arg[1,1,2,1]=(0.442066689582)*x[0]**o+(0.0937839719519)*x[0]+(-0.101534585934)*x[1]**o+(-0.974003442605)*x[1]
-        arg[1,2,0,0]=(-0.206702379228)*x[0]**o+(0.330161049866)*x[0]+(0.185493587693)*x[1]**o+(0.0391986992855)*x[1]
-        arg[1,2,0,1]=(0.79092697362)*x[0]**o+(0.692054695304)*x[0]+(0.141622971369)*x[1]**o+(0.643869474153)*x[1]
-        arg[1,2,1,0]=(0.914281902407)*x[0]**o+(0.936365302055)*x[0]+(0.249095964198)*x[1]**o+(-0.440892551355)*x[1]
-        arg[1,2,1,1]=(-0.602926709108)*x[0]**o+(0.817198874641)*x[0]+(0.262528290838)*x[1]**o+(0.493607450371)*x[1]
-        arg[1,2,2,0]=(-0.724435531493)*x[0]**o+(-0.455127093687)*x[0]+(0.144972402754)*x[1]**o+(-0.361255031527)*x[1]
-        arg[1,2,2,1]=(-0.611538590545)*x[0]**o+(-0.780730652602)*x[0]+(-0.150439352532)*x[1]**o+(0.450875229163)*x[1]
-        arg[1,3,0,0]=(-0.913553947133)*x[0]**o+(-0.930172924067)*x[0]+(-0.509426399026)*x[1]**o+(0.3953360754)*x[1]
-        arg[1,3,0,1]=(-0.709834132519)*x[0]**o+(0.972632526254)*x[0]+(0.540358729462)*x[1]**o+(-0.0295254269136)*x[1]
-        arg[1,3,1,0]=(-0.30788139278)*x[0]**o+(-0.362561853154)*x[0]+(0.0135015706177)*x[1]**o+(0.558034983013)*x[1]
-        arg[1,3,1,1]=(-0.243327801257)*x[0]**o+(-0.156242539226)*x[0]+(0.076082439418)*x[1]**o+(0.818613998695)*x[1]
-        arg[1,3,2,0]=(-0.0290765899224)*x[0]**o+(-0.108604693002)*x[0]+(-0.0741034599215)*x[1]**o+(0.44467098076)*x[1]
-        arg[1,3,2,1]=(-0.751374584848)*x[0]**o+(0.568700665267)*x[0]+(-0.431665912498)*x[1]**o+(0.881337230634)*x[1]
-        arg[1,4,0,0]=(-0.940864464113)*x[0]**o+(-0.204392585977)*x[0]+(-0.872729326815)*x[1]**o+(0.454069061239)*x[1]
-        arg[1,4,0,1]=(0.620544898911)*x[0]**o+(-0.194050689442)*x[0]+(0.399921161647)*x[1]**o+(0.812456444893)*x[1]
-        arg[1,4,1,0]=(-0.398096053023)*x[0]**o+(-0.521802671926)*x[0]+(-0.525522030503)*x[1]**o+(-0.795276120062)*x[1]
-        arg[1,4,1,1]=(0.277239330261)*x[0]**o+(-0.376159942175)*x[0]+(0.785902674573)*x[1]**o+(-0.00686958652716)*x[1]
-        arg[1,4,2,0]=(-0.469242672532)*x[0]**o+(0.289432797089)*x[0]+(0.728305062026)*x[1]**o+(0.821761742668)*x[1]
-        arg[1,4,2,1]=(0.828113301834)*x[0]**o+(-0.149301261166)*x[0]+(0.279230829643)*x[1]**o+(-0.971944918618)*x[1]
-        arg[2,0,0,0]=(-0.724500208669)*x[0]**o+(-0.761179166402)*x[0]+(0.302409732402)*x[1]**o+(0.509101646177)*x[1]
-        arg[2,0,0,1]=(-0.133300605917)*x[0]**o+(-0.0299057843108)*x[0]+(0.190028790905)*x[1]**o+(-0.668097775221)*x[1]
-        arg[2,0,1,0]=(0.828019154028)*x[0]**o+(-0.446721913762)*x[0]+(0.745204383075)*x[1]**o+(0.363968853359)*x[1]
-        arg[2,0,1,1]=(-0.653962912288)*x[0]**o+(0.753529804971)*x[0]+(-0.104712073949)*x[1]**o+(-0.44152589042)*x[1]
-        arg[2,0,2,0]=(0.21572653818)*x[0]**o+(-0.553685840495)*x[0]+(0.372296357092)*x[1]**o+(-0.23566755183)*x[1]
-        arg[2,0,2,1]=(-0.0943992743407)*x[0]**o+(0.677836956763)*x[0]+(-0.33055202826)*x[1]**o+(0.444414877097)*x[1]
-        arg[2,1,0,0]=(-0.812500024009)*x[0]**o+(0.4856670967)*x[0]+(-0.891481528328)*x[1]**o+(-0.244043957515)*x[1]
-        arg[2,1,0,1]=(-0.958152880518)*x[0]**o+(0.494470945352)*x[0]+(-0.000696143847979)*x[1]**o+(-0.036680781152)*x[1]
-        arg[2,1,1,0]=(-0.81109120479)*x[0]**o+(-0.929246624754)*x[0]+(0.128356074186)*x[1]**o+(0.0107006959497)*x[1]
-        arg[2,1,1,1]=(-0.72470858095)*x[0]**o+(-0.202254265463)*x[0]+(-0.995176229907)*x[1]**o+(-0.752592973024)*x[1]
-        arg[2,1,2,0]=(-0.191810147267)*x[0]**o+(-0.819397723879)*x[0]+(0.306860971474)*x[1]**o+(0.681274705052)*x[1]
-        arg[2,1,2,1]=(-0.867447323913)*x[0]**o+(-0.279148200325)*x[0]+(-0.195907590382)*x[1]**o+(-0.305826952304)*x[1]
-        arg[2,2,0,0]=(0.983782298896)*x[0]**o+(-0.284064487432)*x[0]+(-0.0928333646602)*x[1]**o+(-0.929708520581)*x[1]
-        arg[2,2,0,1]=(0.121619221979)*x[0]**o+(-0.876309915691)*x[0]+(0.455030678927)*x[1]**o+(0.635763125356)*x[1]
-        arg[2,2,1,0]=(0.378726440151)*x[0]**o+(-0.626329947078)*x[0]+(-0.0239503446136)*x[1]**o+(0.32696940295)*x[1]
-        arg[2,2,1,1]=(0.442586981104)*x[0]**o+(-0.427714534417)*x[0]+(0.906235883406)*x[1]**o+(0.819595435756)*x[1]
-        arg[2,2,2,0]=(-0.564560890159)*x[0]**o+(-0.115075498726)*x[0]+(-0.520596320159)*x[1]**o+(-0.368366112222)*x[1]
-        arg[2,2,2,1]=(0.215858165597)*x[0]**o+(-0.575665537635)*x[0]+(0.792289256264)*x[1]**o+(0.215575294284)*x[1]
-        arg[2,3,0,0]=(-0.596335978041)*x[0]**o+(-0.677983108509)*x[0]+(-0.551360906631)*x[1]**o+(-0.874453959198)*x[1]
-        arg[2,3,0,1]=(-0.913806992124)*x[0]**o+(0.192343143898)*x[0]+(0.821070238869)*x[1]**o+(-0.188359117641)*x[1]
-        arg[2,3,1,0]=(-0.0831972104302)*x[0]**o+(-0.927005811846)*x[0]+(-0.43240265235)*x[1]**o+(-0.144332400422)*x[1]
-        arg[2,3,1,1]=(0.643878326697)*x[0]**o+(0.212328499471)*x[0]+(0.72072318435)*x[1]**o+(-0.146144387035)*x[1]
-        arg[2,3,2,0]=(0.843652876743)*x[0]**o+(-0.0386075132797)*x[0]+(0.754511827443)*x[1]**o+(-0.26945353599)*x[1]
-        arg[2,3,2,1]=(0.0413857115672)*x[0]**o+(0.682727309008)*x[0]+(0.261249117327)*x[1]**o+(-0.753970539308)*x[1]
-        arg[2,4,0,0]=(-0.607477693828)*x[0]**o+(-0.5870344058)*x[0]+(-0.0678823396451)*x[1]**o+(0.201869223616)*x[1]
-        arg[2,4,0,1]=(-0.618172945146)*x[0]**o+(0.685084114438)*x[0]+(0.0457149578306)*x[1]**o+(-0.877971038996)*x[1]
-        arg[2,4,1,0]=(0.722668769621)*x[0]**o+(0.302142466253)*x[0]+(0.630735604709)*x[1]**o+(-0.427754766567)*x[1]
-        arg[2,4,1,1]=(-0.847113860795)*x[0]**o+(-0.779747246887)*x[0]+(-0.693659242703)*x[1]**o+(0.897451884568)*x[1]
-        arg[2,4,2,0]=(-0.437578500878)*x[0]**o+(0.399407036331)*x[0]+(0.705207362097)*x[1]**o+(-0.271060427211)*x[1]
-        arg[2,4,2,1]=(0.329570005179)*x[0]**o+(-0.712089906899)*x[0]+(0.860707329294)*x[1]**o+(0.553218273352)*x[1]
-        arg[3,0,0,0]=(0.932602317046)*x[0]**o+(-0.948445141026)*x[0]+(0.549409370786)*x[1]**o+(0.782964260926)*x[1]
-        arg[3,0,0,1]=(0.975116319103)*x[0]**o+(-0.0131313829738)*x[0]+(0.222376331882)*x[1]**o+(0.545375534163)*x[1]
-        arg[3,0,1,0]=(0.019317277942)*x[0]**o+(0.918003018679)*x[0]+(-0.481194397466)*x[1]**o+(0.762780571026)*x[1]
-        arg[3,0,1,1]=(-0.393162543578)*x[0]**o+(0.984304464298)*x[0]+(0.737901448601)*x[1]**o+(-0.890589811376)*x[1]
-        arg[3,0,2,0]=(0.458096711279)*x[0]**o+(0.0343270226524)*x[0]+(0.278242150139)*x[1]**o+(-0.158378755134)*x[1]
-        arg[3,0,2,1]=(0.307111052767)*x[0]**o+(-0.294724312785)*x[0]+(-0.489134379327)*x[1]**o+(-0.211139185303)*x[1]
-        arg[3,1,0,0]=(0.420707084879)*x[0]**o+(-0.998173294986)*x[0]+(0.508808683)*x[1]**o+(-0.189902487212)*x[1]
-        arg[3,1,0,1]=(-0.745253594401)*x[0]**o+(-0.344809947215)*x[0]+(0.198212694401)*x[1]**o+(-0.125428245606)*x[1]
-        arg[3,1,1,0]=(0.535215252931)*x[0]**o+(0.565625295858)*x[0]+(-0.0741524230667)*x[1]**o+(-0.898600294889)*x[1]
-        arg[3,1,1,1]=(0.193417593556)*x[0]**o+(-0.80053921694)*x[0]+(-0.664372557476)*x[1]**o+(0.47786060257)*x[1]
-        arg[3,1,2,0]=(0.553690237434)*x[0]**o+(0.970763166888)*x[0]+(0.408815221365)*x[1]**o+(0.143175119269)*x[1]
-        arg[3,1,2,1]=(-0.211683249218)*x[0]**o+(0.0643055656631)*x[0]+(-0.111028404397)*x[1]**o+(0.506093872018)*x[1]
-        arg[3,2,0,0]=(-0.866119051438)*x[0]**o+(-0.417310807983)*x[0]+(-0.228385234131)*x[1]**o+(0.554977378653)*x[1]
-        arg[3,2,0,1]=(-0.146618266885)*x[0]**o+(0.817733306502)*x[0]+(-0.709059272627)*x[1]**o+(-0.271140815458)*x[1]
-        arg[3,2,1,0]=(0.622973500199)*x[0]**o+(-0.568858605993)*x[0]+(-0.651609755171)*x[1]**o+(-0.866184190672)*x[1]
-        arg[3,2,1,1]=(-0.538565077894)*x[0]**o+(-0.676237465393)*x[0]+(0.106659392436)*x[1]**o+(0.488735158765)*x[1]
-        arg[3,2,2,0]=(-0.325897413686)*x[0]**o+(0.99502293321)*x[0]+(-0.339096900793)*x[1]**o+(0.238083096263)*x[1]
-        arg[3,2,2,1]=(0.861430484293)*x[0]**o+(-0.761739126386)*x[0]+(-0.10651751912)*x[1]**o+(0.688993400068)*x[1]
-        arg[3,3,0,0]=(0.0890838652267)*x[0]**o+(0.151733228604)*x[0]+(0.230063809846)*x[1]**o+(-0.135041740614)*x[1]
-        arg[3,3,0,1]=(-0.969251937403)*x[0]**o+(0.345709865473)*x[0]+(-0.309971427898)*x[1]**o+(-0.262217856737)*x[1]
-        arg[3,3,1,0]=(0.640075232231)*x[0]**o+(-0.00817560718155)*x[0]+(0.55773788655)*x[1]**o+(0.642205213407)*x[1]
-        arg[3,3,1,1]=(-0.350002630494)*x[0]**o+(0.373270925939)*x[0]+(-0.655757122598)*x[1]**o+(-0.74598967873)*x[1]
-        arg[3,3,2,0]=(-0.262399316954)*x[0]**o+(-0.37991094527)*x[0]+(0.310310045807)*x[1]**o+(0.838942372822)*x[1]
-        arg[3,3,2,1]=(-0.977039760257)*x[0]**o+(-0.0804751651971)*x[0]+(-0.844329846245)*x[1]**o+(0.905827257908)*x[1]
-        arg[3,4,0,0]=(0.749594099085)*x[0]**o+(0.382880202285)*x[0]+(0.39699250956)*x[1]**o+(-0.708672318437)*x[1]
-        arg[3,4,0,1]=(0.913703789336)*x[0]**o+(-0.497792024208)*x[0]+(-0.34125011876)*x[1]**o+(-0.657159430634)*x[1]
-        arg[3,4,1,0]=(-0.397439923687)*x[0]**o+(0.595274583577)*x[0]+(-0.292338728991)*x[1]**o+(-0.314101057271)*x[1]
-        arg[3,4,1,1]=(-0.403584993513)*x[0]**o+(-0.758728905384)*x[0]+(-0.182501473325)*x[1]**o+(-0.0942108622967)*x[1]
-        arg[3,4,2,0]=(-0.263608698751)*x[0]**o+(-0.591451983536)*x[0]+(0.620412677389)*x[1]**o+(0.600005456466)*x[1]
-        arg[3,4,2,1]=(-0.633502278259)*x[0]**o+(0.733127573934)*x[0]+(-0.765468966987)*x[1]**o+(-0.24211874772)*x[1]
-        ref[0,0,0,0]=(-0.750823220445)/(o+1.)+(0.200562218922)+(-0.177078428867)*0.5**o
-        ref[0,0,0,1]=(-0.0127659464437)/(o+1.)+(-0.374838430629)+(-0.682838671264)*0.5**o
-        ref[0,0,1,0]=(-0.932452125435)/(o+1.)+(0.64729240195)+(0.352439319413)*0.5**o
-        ref[0,0,1,1]=(-0.702758889809)/(o+1.)+(0.143291706728)+(-0.354033408023)*0.5**o
-        ref[0,0,2,0]=(-0.535244256862)/(o+1.)+(-0.0166533987843)+(0.706826713479)*0.5**o
-        ref[0,0,2,1]=(0.742770093639)/(o+1.)+(0.0478036100749)+(-0.893497856528)*0.5**o
-        ref[0,1,0,0]=(-0.7740511254)/(o+1.)+(0.151807063155)+(-0.536624329097)*0.5**o
-        ref[0,1,0,1]=(0.196975646933)/(o+1.)+(-0.359195588208)+(0.388396767346)*0.5**o
-        ref[0,1,1,0]=(0.372752949038)/(o+1.)+(-0.609511042662)+(-0.125771297178)*0.5**o
-        ref[0,1,1,1]=(-0.726599229867)/(o+1.)+(-0.0676212180057)+(-0.313637256508)*0.5**o
-        ref[0,1,2,0]=(1.60583902129e-05)/(o+1.)+(0.305063814416)+(0.92425817047)*0.5**o
-        ref[0,1,2,1]=(-0.888060617134)/(o+1.)+(0.1507514326)+(-0.0981827607557)*0.5**o
-        ref[0,2,0,0]=(-0.228336105988)/(o+1.)+(0.117775628113)+(-0.871590768072)*0.5**o
-        ref[0,2,0,1]=(-0.509662470381)/(o+1.)+(0.0160681615592)+(-0.628675127006)*0.5**o
-        ref[0,2,1,0]=(-0.587902586916)/(o+1.)+(0.346247748963)+(-0.767528433339)*0.5**o
-        ref[0,2,1,1]=(-0.78470263647)/(o+1.)+(0.419883543895)+(0.388984380682)*0.5**o
-        ref[0,2,2,0]=(-0.637159792471)/(o+1.)+(0.187921397135)+(-0.910514531543)*0.5**o
-        ref[0,2,2,1]=(-0.298806908011)/(o+1.)+(-0.745958567089)+(0.570535552656)*0.5**o
-        ref[0,3,0,0]=(-0.91370863065)/(o+1.)+(0.136099326137)+(0.916864925136)*0.5**o
-        ref[0,3,0,1]=(0.699832871063)/(o+1.)+(0.0843138801635)+(-0.851147484632)*0.5**o
-        ref[0,3,1,0]=(0.0203170502559)/(o+1.)+(0.687200666868)+(0.461273862468)*0.5**o
-        ref[0,3,1,1]=(-0.00587359808953)/(o+1.)+(0.238032934986)+(0.63984877633)*0.5**o
-        ref[0,3,2,0]=(0.689553978928)/(o+1.)+(-0.00771127379434)+(-0.159416471436)*0.5**o
-        ref[0,3,2,1]=(0.0370277809126)/(o+1.)+(0.00770755686953)+(0.782397836312)*0.5**o
-        ref[0,4,0,0]=(0.110218625254)/(o+1.)+(0.288682475662)+(-0.0063433205485)*0.5**o
-        ref[0,4,0,1]=(0.910723121611)/(o+1.)+(0.401925056417)+(-0.128215646666)*0.5**o
-        ref[0,4,1,0]=(-0.281954207008)/(o+1.)+(-0.117618175276)+(-0.604528735513)*0.5**o
-        ref[0,4,1,1]=(-0.761226249914)/(o+1.)+(0.0260675614951)+(0.65096807032)*0.5**o
-        ref[0,4,2,0]=(-0.780671499903)/(o+1.)+(-0.244952280649)+(-0.710718948634)*0.5**o
-        ref[0,4,2,1]=(0.709902333411)/(o+1.)+(0.63468720432)+(-0.0443187506467)*0.5**o
-        ref[1,0,0,0]=(-0.713098084853)/(o+1.)+(0.026951171138)+(0.731890221753)*0.5**o
-        ref[1,0,0,1]=(-0.427105331069)/(o+1.)+(0.312079508459)+(-0.130335125365)*0.5**o
-        ref[1,0,1,0]=(0.344459670502)/(o+1.)+(-0.0918192826838)+(-0.203908509107)*0.5**o
-        ref[1,0,1,1]=(-0.0683630778679)/(o+1.)+(0.414378635447)+(0.186770929724)*0.5**o
-        ref[1,0,2,0]=(0.127955472707)/(o+1.)+(-0.147180699)+(-0.891275312975)*0.5**o
-        ref[1,0,2,1]=(-0.052031562679)/(o+1.)+(0.955043298554)+(-0.74620344519)*0.5**o
-        ref[1,1,0,0]=(0.783714758356)/(o+1.)+(0.226618827568)+(0.871423198418)*0.5**o
-        ref[1,1,0,1]=(-0.00888785913795)/(o+1.)+(-0.333567151999)+(0.943197824902)*0.5**o
-        ref[1,1,1,0]=(0.481063204532)/(o+1.)+(0.224237358325)+(-0.74971981056)*0.5**o
-        ref[1,1,1,1]=(-0.0110588803484)/(o+1.)+(-0.535252745501)+(-0.431776603043)*0.5**o
-        ref[1,1,2,0]=(-0.646224518073)/(o+1.)+(-0.208035583419)+(0.578105297721)*0.5**o
-        ref[1,1,2,1]=(-0.101534585934)/(o+1.)+(-0.440109735326)+(0.442066689582)*0.5**o
-        ref[1,2,0,0]=(0.185493587693)/(o+1.)+(0.184679874576)+(-0.206702379228)*0.5**o
-        ref[1,2,0,1]=(0.141622971369)/(o+1.)+(0.667962084728)+(0.79092697362)*0.5**o
-        ref[1,2,1,0]=(0.249095964198)/(o+1.)+(0.24773637535)+(0.914281902407)*0.5**o
-        ref[1,2,1,1]=(0.262528290838)/(o+1.)+(0.655403162506)+(-0.602926709108)*0.5**o
-        ref[1,2,2,0]=(0.144972402754)/(o+1.)+(-0.408191062607)+(-0.724435531493)*0.5**o
-        ref[1,2,2,1]=(-0.150439352532)/(o+1.)+(-0.16492771172)+(-0.611538590545)*0.5**o
-        ref[1,3,0,0]=(-0.509426399026)/(o+1.)+(-0.267418424334)+(-0.913553947133)*0.5**o
-        ref[1,3,0,1]=(0.540358729462)/(o+1.)+(0.47155354967)+(-0.709834132519)*0.5**o
-        ref[1,3,1,0]=(0.0135015706177)/(o+1.)+(0.0977365649293)+(-0.30788139278)*0.5**o
-        ref[1,3,1,1]=(0.076082439418)/(o+1.)+(0.331185729735)+(-0.243327801257)*0.5**o
-        ref[1,3,2,0]=(-0.0741034599215)/(o+1.)+(0.168033143879)+(-0.0290765899224)*0.5**o
-        ref[1,3,2,1]=(-0.431665912498)/(o+1.)+(0.72501894795)+(-0.751374584848)*0.5**o
-        ref[1,4,0,0]=(-0.872729326815)/(o+1.)+(0.124838237631)+(-0.940864464113)*0.5**o
-        ref[1,4,0,1]=(0.399921161647)/(o+1.)+(0.309202877726)+(0.620544898911)*0.5**o
-        ref[1,4,1,0]=(-0.525522030503)/(o+1.)+(-0.658539395994)+(-0.398096053023)*0.5**o
-        ref[1,4,1,1]=(0.785902674573)/(o+1.)+(-0.191514764351)+(0.277239330261)*0.5**o
-        ref[1,4,2,0]=(0.728305062026)/(o+1.)+(0.555597269878)+(-0.469242672532)*0.5**o
-        ref[1,4,2,1]=(0.279230829643)/(o+1.)+(-0.560623089892)+(0.828113301834)*0.5**o
-        ref[2,0,0,0]=(0.302409732402)/(o+1.)+(-0.126038760113)+(-0.724500208669)*0.5**o
-        ref[2,0,0,1]=(0.190028790905)/(o+1.)+(-0.349001779766)+(-0.133300605917)*0.5**o
-        ref[2,0,1,0]=(0.745204383075)/(o+1.)+(-0.0413765302013)+(0.828019154028)*0.5**o
-        ref[2,0,1,1]=(-0.104712073949)/(o+1.)+(0.156001957276)+(-0.653962912288)*0.5**o
-        ref[2,0,2,0]=(0.372296357092)/(o+1.)+(-0.394676696163)+(0.21572653818)*0.5**o
-        ref[2,0,2,1]=(-0.33055202826)/(o+1.)+(0.56112591693)+(-0.0943992743407)*0.5**o
-        ref[2,1,0,0]=(-0.891481528328)/(o+1.)+(0.120811569592)+(-0.812500024009)*0.5**o
-        ref[2,1,0,1]=(-0.000696143847979)/(o+1.)+(0.2288950821)+(-0.958152880518)*0.5**o
-        ref[2,1,1,0]=(0.128356074186)/(o+1.)+(-0.459272964402)+(-0.81109120479)*0.5**o
-        ref[2,1,1,1]=(-0.995176229907)/(o+1.)+(-0.477423619244)+(-0.72470858095)*0.5**o
-        ref[2,1,2,0]=(0.306860971474)/(o+1.)+(-0.0690615094134)+(-0.191810147267)*0.5**o
-        ref[2,1,2,1]=(-0.195907590382)/(o+1.)+(-0.292487576314)+(-0.867447323913)*0.5**o
-        ref[2,2,0,0]=(-0.0928333646602)/(o+1.)+(-0.606886504006)+(0.983782298896)*0.5**o
-        ref[2,2,0,1]=(0.455030678927)/(o+1.)+(-0.120273395167)+(0.121619221979)*0.5**o
-        ref[2,2,1,0]=(-0.0239503446136)/(o+1.)+(-0.149680272064)+(0.378726440151)*0.5**o
-        ref[2,2,1,1]=(0.906235883406)/(o+1.)+(0.19594045067)+(0.442586981104)*0.5**o
-        ref[2,2,2,0]=(-0.520596320159)/(o+1.)+(-0.241720805474)+(-0.564560890159)*0.5**o
-        ref[2,2,2,1]=(0.792289256264)/(o+1.)+(-0.180045121676)+(0.215858165597)*0.5**o
-        ref[2,3,0,0]=(-0.551360906631)/(o+1.)+(-0.776218533854)+(-0.596335978041)*0.5**o
-        ref[2,3,0,1]=(0.821070238869)/(o+1.)+(0.00199201312847)+(-0.913806992124)*0.5**o
-        ref[2,3,1,0]=(-0.43240265235)/(o+1.)+(-0.535669106134)+(-0.0831972104302)*0.5**o
-        ref[2,3,1,1]=(0.72072318435)/(o+1.)+(0.0330920562179)+(0.643878326697)*0.5**o
-        ref[2,3,2,0]=(0.754511827443)/(o+1.)+(-0.154030524635)+(0.843652876743)*0.5**o
-        ref[2,3,2,1]=(0.261249117327)/(o+1.)+(-0.03562161515)+(0.0413857115672)*0.5**o
-        ref[2,4,0,0]=(-0.0678823396451)/(o+1.)+(-0.192582591092)+(-0.607477693828)*0.5**o
-        ref[2,4,0,1]=(0.0457149578306)/(o+1.)+(-0.0964434622791)+(-0.618172945146)*0.5**o
-        ref[2,4,1,0]=(0.630735604709)/(o+1.)+(-0.0628061501569)+(0.722668769621)*0.5**o
-        ref[2,4,1,1]=(-0.693659242703)/(o+1.)+(0.0588523188405)+(-0.847113860795)*0.5**o
-        ref[2,4,2,0]=(0.705207362097)/(o+1.)+(0.0641733045603)+(-0.437578500878)*0.5**o
-        ref[2,4,2,1]=(0.860707329294)/(o+1.)+(-0.0794358167735)+(0.329570005179)*0.5**o
-        ref[3,0,0,0]=(0.549409370786)/(o+1.)+(-0.0827404400499)+(0.932602317046)*0.5**o
-        ref[3,0,0,1]=(0.222376331882)/(o+1.)+(0.266122075595)+(0.975116319103)*0.5**o
-        ref[3,0,1,0]=(-0.481194397466)/(o+1.)+(0.840391794852)+(0.019317277942)*0.5**o
-        ref[3,0,1,1]=(0.737901448601)/(o+1.)+(0.0468573264614)+(-0.393162543578)*0.5**o
-        ref[3,0,2,0]=(0.278242150139)/(o+1.)+(-0.0620258662406)+(0.458096711279)*0.5**o
-        ref[3,0,2,1]=(-0.489134379327)/(o+1.)+(-0.252931749044)+(0.307111052767)*0.5**o
-        ref[3,1,0,0]=(0.508808683)/(o+1.)+(-0.594037891099)+(0.420707084879)*0.5**o
-        ref[3,1,0,1]=(0.198212694401)/(o+1.)+(-0.23511909641)+(-0.745253594401)*0.5**o
-        ref[3,1,1,0]=(-0.0741524230667)/(o+1.)+(-0.166487499516)+(0.535215252931)*0.5**o
-        ref[3,1,1,1]=(-0.664372557476)/(o+1.)+(-0.161339307185)+(0.193417593556)*0.5**o
-        ref[3,1,2,0]=(0.408815221365)/(o+1.)+(0.556969143078)+(0.553690237434)*0.5**o
-        ref[3,1,2,1]=(-0.111028404397)/(o+1.)+(0.28519971884)+(-0.211683249218)*0.5**o
-        ref[3,2,0,0]=(-0.228385234131)/(o+1.)+(0.068833285335)+(-0.866119051438)*0.5**o
-        ref[3,2,0,1]=(-0.709059272627)/(o+1.)+(0.273296245522)+(-0.146618266885)*0.5**o
-        ref[3,2,1,0]=(-0.651609755171)/(o+1.)+(-0.717521398332)+(0.622973500199)*0.5**o
-        ref[3,2,1,1]=(0.106659392436)/(o+1.)+(-0.0937511533137)+(-0.538565077894)*0.5**o
-        ref[3,2,2,0]=(-0.339096900793)/(o+1.)+(0.616553014737)+(-0.325897413686)*0.5**o
-        ref[3,2,2,1]=(-0.10651751912)/(o+1.)+(-0.0363728631586)+(0.861430484293)*0.5**o
-        ref[3,3,0,0]=(0.230063809846)/(o+1.)+(0.0083457439947)+(0.0890838652267)*0.5**o
-        ref[3,3,0,1]=(-0.309971427898)/(o+1.)+(0.0417460043682)+(-0.969251937403)*0.5**o
-        ref[3,3,1,0]=(0.55773788655)/(o+1.)+(0.317014803113)+(0.640075232231)*0.5**o
-        ref[3,3,1,1]=(-0.655757122598)/(o+1.)+(-0.186359376395)+(-0.350002630494)*0.5**o
-        ref[3,3,2,0]=(0.310310045807)/(o+1.)+(0.229515713776)+(-0.262399316954)*0.5**o
-        ref[3,3,2,1]=(-0.844329846245)/(o+1.)+(0.412676046356)+(-0.977039760257)*0.5**o
-        ref[3,4,0,0]=(0.39699250956)/(o+1.)+(-0.162896058076)+(0.749594099085)*0.5**o
-        ref[3,4,0,1]=(-0.34125011876)/(o+1.)+(-0.577475727421)+(0.913703789336)*0.5**o
-        ref[3,4,1,0]=(-0.292338728991)/(o+1.)+(0.140586763153)+(-0.397439923687)*0.5**o
-        ref[3,4,1,1]=(-0.182501473325)/(o+1.)+(-0.42646988384)+(-0.403584993513)*0.5**o
-        ref[3,4,2,0]=(0.620412677389)/(o+1.)+(0.00427673646471)+(-0.263608698751)*0.5**o
-        ref[3,4,2,1]=(-0.765468966987)/(o+1.)+(0.245504413107)+(-0.633502278259)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.480896043196)*x[0]**o+(0.113355160927)*x[0]+(0.498630339771)*x[1]**o+(0.0149514785179)*x[1]+(-0.944439525708)*x[2]**o+(-0.349299625744)*x[2]
-        arg[0,0,0,1]=(-0.609632888023)*x[0]**o+(-0.576508904483)*x[0]+(-0.0610487008887)*x[1]**o+(-0.844087384492)*x[1]+(-0.715427733517)*x[2]**o+(-0.263424969452)*x[2]
-        arg[0,0,1,0]=(0.205065167181)*x[0]**o+(-0.840225514826)*x[0]+(0.808161497555)*x[1]**o+(0.685902712814)*x[1]+(-0.625183952417)*x[2]**o+(-0.0947932775112)*x[2]
-        arg[0,0,1,1]=(0.875716461075)*x[0]**o+(0.814425331995)*x[0]+(-0.805331622235)*x[1]**o+(-0.287737068993)*x[1]+(-0.365715978159)*x[2]**o+(0.689907502778)*x[2]
-        arg[0,0,2,0]=(0.711372030289)*x[0]**o+(-0.393612062405)*x[0]+(0.642793863702)*x[1]**o+(-0.66636178423)*x[1]+(0.00488425355017)*x[2]**o+(-0.444523817626)*x[2]
-        arg[0,0,2,1]=(-0.0536842545617)*x[0]**o+(-0.714279418499)*x[0]+(-0.487452457649)*x[1]**o+(0.917805820162)*x[1]+(0.445007135027)*x[2]**o+(0.101201310289)*x[2]
-        arg[0,1,0,0]=(-0.710091748251)*x[0]**o+(0.470243562863)*x[0]+(-0.0178862343634)*x[1]**o+(0.393644042332)*x[1]+(-0.952839337577)*x[2]**o+(-0.152392013939)*x[2]
-        arg[0,1,0,1]=(0.250989366649)*x[0]**o+(0.592158236555)*x[0]+(0.698185234877)*x[1]**o+(0.112154263635)*x[1]+(0.843915127813)*x[2]**o+(-0.825331842242)*x[2]
-        arg[0,1,1,0]=(0.690360096543)*x[0]**o+(0.78906430602)*x[0]+(0.596189773531)*x[1]**o+(-0.293452572358)*x[1]+(0.737565980909)*x[2]**o+(-0.96988090057)*x[2]
-        arg[0,1,1,1]=(-0.815220933301)*x[0]**o+(-0.875224889387)*x[0]+(-0.0562950344908)*x[1]**o+(0.56567431969)*x[1]+(0.133489969036)*x[2]**o+(0.299403989148)*x[2]
-        arg[0,1,2,0]=(0.169442617085)*x[0]**o+(-0.413300800662)*x[0]+(0.580773652363)*x[1]**o+(-0.627706012397)*x[1]+(-0.730218498677)*x[2]**o+(0.587233195345)*x[2]
-        arg[0,1,2,1]=(-0.110636656112)*x[0]**o+(-0.302213944624)*x[0]+(0.643229732019)*x[1]**o+(-0.651805494828)*x[1]+(-0.528276901455)*x[2]**o+(-0.272057635286)*x[2]
-        arg[0,2,0,0]=(0.340661037085)*x[0]**o+(-0.672207039496)*x[0]+(0.676291394824)*x[1]**o+(0.596998737167)*x[1]+(-0.689800391841)*x[2]**o+(-0.134273731064)*x[2]
-        arg[0,2,0,1]=(0.185282186176)*x[0]**o+(0.252489447393)*x[0]+(-0.0447305595755)*x[1]**o+(-0.558361084175)*x[1]+(0.922681220429)*x[2]**o+(-0.484588607971)*x[2]
-        arg[0,2,1,0]=(0.238772787004)*x[0]**o+(0.987311136495)*x[0]+(0.215079265839)*x[1]**o+(-0.797762453244)*x[1]+(0.0329055379323)*x[2]**o+(-0.88999503049)*x[2]
-        arg[0,2,1,1]=(-0.175884373587)*x[0]**o+(0.806690051494)*x[0]+(0.0086744009376)*x[1]**o+(0.286131063746)*x[1]+(0.536839534689)*x[2]**o+(-0.0946282917135)*x[2]
-        arg[0,2,2,0]=(-0.615695203188)*x[0]**o+(0.600565627235)*x[0]+(-0.869759996675)*x[1]**o+(0.648192341374)*x[1]+(-0.952728999251)*x[2]**o+(0.564068973312)*x[2]
-        arg[0,2,2,1]=(-0.0992379560876)*x[0]**o+(-0.897179656441)*x[0]+(-0.519600820875)*x[1]**o+(0.70507167679)*x[1]+(0.903640275297)*x[2]**o+(-0.645039734963)*x[2]
-        arg[0,3,0,0]=(0.432415072474)*x[0]**o+(-0.748137008742)*x[0]+(0.875883324091)*x[1]**o+(0.706172632952)*x[1]+(-0.47486904255)*x[2]**o+(0.238106343647)*x[2]
-        arg[0,3,0,1]=(-0.656397468061)*x[0]**o+(-0.530867058489)*x[0]+(-0.904148914114)*x[1]**o+(0.87213389632)*x[1]+(0.0612056123548)*x[2]**o+(0.288620109264)*x[2]
-        arg[0,3,1,0]=(-0.472896985897)*x[0]**o+(0.83328574859)*x[0]+(0.744310819801)*x[1]**o+(0.0601035189502)*x[1]+(-0.198693260491)*x[2]**o+(-0.882304016543)*x[2]
-        arg[0,3,1,1]=(-0.515568063685)*x[0]**o+(0.484765564236)*x[0]+(0.754304059424)*x[1]**o+(0.654790289063)*x[1]+(-0.102335538236)*x[2]**o+(-0.0705158755887)*x[2]
-        arg[0,3,2,0]=(-0.709802317012)*x[0]**o+(-0.346551215683)*x[0]+(0.312943005623)*x[1]**o+(0.476828461567)*x[1]+(0.901171463566)*x[2]**o+(0.538981245022)*x[2]
-        arg[0,3,2,1]=(-0.20057625974)*x[0]**o+(0.0458666109661)*x[0]+(0.909610730794)*x[1]**o+(0.145637065192)*x[1]+(0.666420073244)*x[2]**o+(0.0550124082656)*x[2]
-        arg[0,4,0,0]=(-0.726921583373)*x[0]**o+(0.891306726707)*x[0]+(-0.189151461127)*x[1]**o+(0.479274047923)*x[1]+(-0.129077261233)*x[2]**o+(-0.873599130413)*x[2]
-        arg[0,4,0,1]=(0.765272127757)*x[0]**o+(0.159307695759)*x[0]+(-0.569162341331)*x[1]**o+(-0.530158933095)*x[1]+(-0.216727788754)*x[2]**o+(-0.519551969741)*x[2]
-        arg[0,4,1,0]=(-0.613269202518)*x[0]**o+(0.612846846793)*x[0]+(-0.187285796021)*x[1]**o+(-0.462603518143)*x[1]+(-0.739162067312)*x[2]**o+(0.0737393951189)*x[2]
-        arg[0,4,1,1]=(-0.727485674691)*x[0]**o+(-0.461427895477)*x[0]+(0.917029475887)*x[1]**o+(0.265874989879)*x[1]+(0.602505162351)*x[2]**o+(-0.372206475027)*x[2]
-        arg[0,4,2,0]=(-0.663071984573)*x[0]**o+(0.511217165998)*x[0]+(-0.472765672078)*x[1]**o+(0.814962161218)*x[1]+(-0.608890631297)*x[2]**o+(-0.284872941025)*x[2]
-        arg[0,4,2,1]=(0.893396132015)*x[0]**o+(0.183468149957)*x[0]+(0.647812435076)*x[1]**o+(-0.398672312216)*x[1]+(0.6359553902)*x[2]**o+(0.485509522238)*x[2]
-        arg[1,0,0,0]=(-0.0771632829864)*x[0]**o+(-0.723025089864)*x[0]+(0.486209418481)*x[1]**o+(0.0869704919133)*x[1]+(-0.365499197901)*x[2]**o+(-0.0796713538898)*x[2]
-        arg[1,0,0,1]=(0.133617787097)*x[0]**o+(0.993872304226)*x[0]+(-0.898504795319)*x[1]**o+(0.656793416434)*x[1]+(-0.821841885906)*x[2]**o+(0.726972748423)*x[2]
-        arg[1,0,1,0]=(0.174277385391)*x[0]**o+(-0.301857401564)*x[0]+(-0.846153302312)*x[1]**o+(-0.559076632516)*x[1]+(-0.89870762709)*x[2]**o+(0.640171641512)*x[2]
-        arg[1,0,1,1]=(0.795443369588)*x[0]**o+(-0.346082013333)*x[0]+(-0.439713049567)*x[1]**o+(0.860680213906)*x[1]+(-0.466761099917)*x[2]**o+(-0.843656974958)*x[2]
-        arg[1,0,2,0]=(0.482814141263)*x[0]**o+(0.142978643528)*x[0]+(-0.735291704767)*x[1]**o+(-0.925675892787)*x[1]+(0.747235439093)*x[2]**o+(-0.569454067374)*x[2]
-        arg[1,0,2,1]=(0.619359374773)*x[0]**o+(-0.547172728307)*x[0]+(0.0829642963797)*x[1]**o+(-0.0180882163346)*x[1]+(0.328627445196)*x[2]**o+(-0.274608686384)*x[2]
-        arg[1,1,0,0]=(-0.510375454058)*x[0]**o+(-0.779894165181)*x[0]+(0.656168894408)*x[1]**o+(-0.449484133421)*x[1]+(-0.147284453744)*x[2]**o+(-0.488384108271)*x[2]
-        arg[1,1,0,1]=(-0.302705575836)*x[0]**o+(0.256670307547)*x[0]+(0.110465379068)*x[1]**o+(0.319291387545)*x[1]+(0.408832172454)*x[2]**o+(0.718793126931)*x[2]
-        arg[1,1,1,0]=(0.520882033451)*x[0]**o+(0.412524861348)*x[0]+(0.761080123209)*x[1]**o+(0.401223078157)*x[1]+(-0.65945839721)*x[2]**o+(0.71349489395)*x[2]
-        arg[1,1,1,1]=(0.624622427594)*x[0]**o+(0.847907716976)*x[0]+(0.855268296474)*x[1]**o+(-0.671685662164)*x[1]+(-0.407895715308)*x[2]**o+(-0.719054767733)*x[2]
-        arg[1,1,2,0]=(-0.044254701409)*x[0]**o+(0.72911290175)*x[0]+(0.869467934211)*x[1]**o+(0.613006764744)*x[1]+(0.678602796496)*x[2]**o+(0.388923815748)*x[2]
-        arg[1,1,2,1]=(-0.240571107795)*x[0]**o+(0.838382917252)*x[0]+(0.0342933298383)*x[1]**o+(0.595421789197)*x[1]+(-0.989088178853)*x[2]**o+(-0.20002339454)*x[2]
-        arg[1,2,0,0]=(0.0596937021722)*x[0]**o+(0.196768537308)*x[0]+(0.0834459161806)*x[1]**o+(0.194049508373)*x[1]+(-0.097309631361)*x[2]**o+(-0.867555781902)*x[2]
-        arg[1,2,0,1]=(-0.935541542647)*x[0]**o+(-0.00702430636955)*x[0]+(-0.384657002538)*x[1]**o+(0.186884376746)*x[1]+(0.97207387841)*x[2]**o+(0.452460932869)*x[2]
-        arg[1,2,1,0]=(0.276741406646)*x[0]**o+(0.838348610585)*x[0]+(-0.403054578066)*x[1]**o+(0.655318135938)*x[1]+(0.37614761635)*x[2]**o+(0.82736662494)*x[2]
-        arg[1,2,1,1]=(0.828731604537)*x[0]**o+(0.762067030749)*x[0]+(-0.881827056079)*x[1]**o+(0.250928989647)*x[1]+(-0.771040367979)*x[2]**o+(0.239950799138)*x[2]
-        arg[1,2,2,0]=(-0.380797583569)*x[0]**o+(0.112805267222)*x[0]+(-0.454730562411)*x[1]**o+(0.926061735219)*x[1]+(0.348331256905)*x[2]**o+(-0.725641369775)*x[2]
-        arg[1,2,2,1]=(0.257022926473)*x[0]**o+(0.0160557858816)*x[0]+(-0.291367922966)*x[1]**o+(-0.611341260765)*x[1]+(0.232472950268)*x[2]**o+(-0.738139185521)*x[2]
-        arg[1,3,0,0]=(-0.645340088797)*x[0]**o+(0.480235460274)*x[0]+(0.135346246274)*x[1]**o+(-0.560730820351)*x[1]+(-0.635582025321)*x[2]**o+(-0.476912924392)*x[2]
-        arg[1,3,0,1]=(0.124132693667)*x[0]**o+(-0.813993821983)*x[0]+(-0.108593659227)*x[1]**o+(-0.432186668568)*x[1]+(0.209382070426)*x[2]**o+(0.928912669667)*x[2]
-        arg[1,3,1,0]=(-0.7660131868)*x[0]**o+(-0.30274186797)*x[0]+(0.140498262981)*x[1]**o+(0.993084314471)*x[1]+(0.684043026981)*x[2]**o+(-0.339724714081)*x[2]
-        arg[1,3,1,1]=(-0.150578257351)*x[0]**o+(-0.674840941109)*x[0]+(0.469240334383)*x[1]**o+(0.729963338278)*x[1]+(-0.800829664334)*x[2]**o+(0.0467922871395)*x[2]
-        arg[1,3,2,0]=(-0.336661555676)*x[0]**o+(0.705661383379)*x[0]+(-0.76993460355)*x[1]**o+(0.459144989218)*x[1]+(0.545901025663)*x[2]**o+(0.385988013614)*x[2]
-        arg[1,3,2,1]=(0.165928745462)*x[0]**o+(0.540718600752)*x[0]+(0.172773708803)*x[1]**o+(0.253664803784)*x[1]+(-0.264896626947)*x[2]**o+(-0.478577475495)*x[2]
-        arg[1,4,0,0]=(0.283586653542)*x[0]**o+(-0.104364884571)*x[0]+(-0.840555806526)*x[1]**o+(0.701868415915)*x[1]+(-0.290943689679)*x[2]**o+(-0.73024942052)*x[2]
-        arg[1,4,0,1]=(-0.772849835334)*x[0]**o+(-0.432170589951)*x[0]+(-0.376099423267)*x[1]**o+(0.0215357491826)*x[1]+(-0.346787011464)*x[2]**o+(0.620411709813)*x[2]
-        arg[1,4,1,0]=(-0.718524564964)*x[0]**o+(0.119936682579)*x[0]+(-0.994276256462)*x[1]**o+(-0.839783920473)*x[1]+(-0.454576336782)*x[2]**o+(-0.515489988915)*x[2]
-        arg[1,4,1,1]=(-0.771664154234)*x[0]**o+(-0.584052299067)*x[0]+(-0.0233756210307)*x[1]**o+(-0.174442816636)*x[1]+(-0.702383477714)*x[2]**o+(-0.279952858144)*x[2]
-        arg[1,4,2,0]=(-0.591902790978)*x[0]**o+(-0.151826578123)*x[0]+(0.923906788219)*x[1]**o+(0.301090558476)*x[1]+(-0.518314647811)*x[2]**o+(-0.784331717681)*x[2]
-        arg[1,4,2,1]=(0.303567440092)*x[0]**o+(0.744948852961)*x[0]+(0.719939071212)*x[1]**o+(-0.161138638319)*x[1]+(0.924953261766)*x[2]**o+(-0.875565390131)*x[2]
-        arg[2,0,0,0]=(0.197574550087)*x[0]**o+(-0.962018785397)*x[0]+(0.498378037582)*x[1]**o+(-0.334199169606)*x[1]+(0.852426750588)*x[2]**o+(-0.650173474618)*x[2]
-        arg[2,0,0,1]=(0.0663499012532)*x[0]**o+(0.00812461763474)*x[0]+(0.237233309304)*x[1]**o+(-0.839377881658)*x[1]+(-0.67246872567)*x[2]**o+(0.677471261363)*x[2]
-        arg[2,0,1,0]=(-0.789090971877)*x[0]**o+(-0.387724517273)*x[0]+(0.455954877641)*x[1]**o+(-0.356995254842)*x[1]+(-0.897019846935)*x[2]**o+(-0.0703543939474)*x[2]
-        arg[2,0,1,1]=(0.222873274437)*x[0]**o+(0.405228982254)*x[0]+(-0.532697993554)*x[1]**o+(-0.836340143789)*x[1]+(-0.139525062661)*x[2]**o+(-0.916307770461)*x[2]
-        arg[2,0,2,0]=(-0.300828039715)*x[0]**o+(-0.584457605313)*x[0]+(-0.443125109903)*x[1]**o+(0.292734004842)*x[1]+(-0.55875691535)*x[2]**o+(0.391237822545)*x[2]
-        arg[2,0,2,1]=(-0.501507304569)*x[0]**o+(-0.203549089015)*x[0]+(-0.113050138121)*x[1]**o+(0.712978728546)*x[1]+(-0.642617274635)*x[2]**o+(-0.307119076865)*x[2]
-        arg[2,1,0,0]=(-0.809237327867)*x[0]**o+(0.984684980548)*x[0]+(-0.643310231704)*x[1]**o+(0.759430082065)*x[1]+(-0.393902220205)*x[2]**o+(-0.900173371318)*x[2]
-        arg[2,1,0,1]=(-0.722795722506)*x[0]**o+(0.433309366611)*x[0]+(-0.559871890844)*x[1]**o+(0.417301432603)*x[1]+(-0.364192390887)*x[2]**o+(0.64549736058)*x[2]
-        arg[2,1,1,0]=(-0.551325611251)*x[0]**o+(-0.638520772682)*x[0]+(0.222655558982)*x[1]**o+(-0.230002147207)*x[1]+(-0.290821163957)*x[2]**o+(0.0647728628594)*x[2]
-        arg[2,1,1,1]=(0.743453045588)*x[0]**o+(-0.901163108996)*x[0]+(-0.546031302921)*x[1]**o+(-0.512614476111)*x[1]+(-0.886430682715)*x[2]**o+(0.720650678026)*x[2]
-        arg[2,1,2,0]=(-0.033787671958)*x[0]**o+(0.930927279443)*x[0]+(-0.530482747719)*x[1]**o+(0.714053784656)*x[1]+(-0.0978565618487)*x[2]**o+(-0.0423072209447)*x[2]
-        arg[2,1,2,1]=(0.127121989623)*x[0]**o+(0.809654796091)*x[0]+(0.718533701795)*x[1]**o+(0.542738494557)*x[1]+(-0.342918607246)*x[2]**o+(-0.627991145352)*x[2]
-        arg[2,2,0,0]=(-0.867530011926)*x[0]**o+(0.870295856967)*x[0]+(-0.13043222912)*x[1]**o+(0.2670058777)*x[1]+(0.395016123247)*x[2]**o+(-0.811207959629)*x[2]
-        arg[2,2,0,1]=(-0.00858729113056)*x[0]**o+(-0.885551110851)*x[0]+(0.820441870015)*x[1]**o+(-0.348896120549)*x[1]+(0.295475751596)*x[2]**o+(-0.672688762902)*x[2]
-        arg[2,2,1,0]=(-0.982123891355)*x[0]**o+(0.232770408062)*x[0]+(0.374641341895)*x[1]**o+(-0.21375197203)*x[1]+(0.436992590849)*x[2]**o+(-0.473399371298)*x[2]
-        arg[2,2,1,1]=(-0.415533190881)*x[0]**o+(0.0945615271507)*x[0]+(-0.281959759072)*x[1]**o+(0.0807942449559)*x[1]+(0.225501997354)*x[2]**o+(0.305247648387)*x[2]
-        arg[2,2,2,0]=(-0.559916632426)*x[0]**o+(-0.372679495574)*x[0]+(0.392857820158)*x[1]**o+(0.726824319268)*x[1]+(0.36923535014)*x[2]**o+(-0.208169256022)*x[2]
-        arg[2,2,2,1]=(-0.869055045156)*x[0]**o+(0.359188490398)*x[0]+(0.702110073265)*x[1]**o+(0.668757858248)*x[1]+(-0.499300337779)*x[2]**o+(0.0471054271112)*x[2]
-        arg[2,3,0,0]=(0.754089271004)*x[0]**o+(-0.0240479506036)*x[0]+(-0.0775830745475)*x[1]**o+(0.215564363064)*x[1]+(-0.791969192801)*x[2]**o+(-0.130308630692)*x[2]
-        arg[2,3,0,1]=(0.448970570476)*x[0]**o+(0.510346880872)*x[0]+(-0.561996764085)*x[1]**o+(0.217897696493)*x[1]+(-0.0610826665756)*x[2]**o+(0.387896322636)*x[2]
-        arg[2,3,1,0]=(0.737635683404)*x[0]**o+(-0.35395540781)*x[0]+(0.0419652573208)*x[1]**o+(-0.519735381528)*x[1]+(0.739523085214)*x[2]**o+(0.808529094094)*x[2]
-        arg[2,3,1,1]=(0.551348499194)*x[0]**o+(-0.40145493368)*x[0]+(0.211723169473)*x[1]**o+(-0.762751144824)*x[1]+(-0.17710033067)*x[2]**o+(0.688961224051)*x[2]
-        arg[2,3,2,0]=(-0.870721462645)*x[0]**o+(-0.0356869329313)*x[0]+(0.277142920424)*x[1]**o+(-0.154474999666)*x[1]+(0.837001124911)*x[2]**o+(-0.233028214567)*x[2]
-        arg[2,3,2,1]=(-0.234260935528)*x[0]**o+(0.913718165996)*x[0]+(0.385678747942)*x[1]**o+(0.237966356277)*x[1]+(0.382072927695)*x[2]**o+(0.627666395757)*x[2]
-        arg[2,4,0,0]=(-0.474674316363)*x[0]**o+(-0.575533683959)*x[0]+(0.751489557666)*x[1]**o+(-0.0623565445313)*x[1]+(-0.517274743843)*x[2]**o+(-0.712143034168)*x[2]
-        arg[2,4,0,1]=(0.259723799797)*x[0]**o+(0.345952822815)*x[0]+(0.169940774832)*x[1]**o+(-0.185154259609)*x[1]+(0.418430344681)*x[2]**o+(0.861837327531)*x[2]
-        arg[2,4,1,0]=(-0.960970748682)*x[0]**o+(0.842706511282)*x[0]+(-0.771779045108)*x[1]**o+(-0.63675621795)*x[1]+(-0.317416556239)*x[2]**o+(0.287317968341)*x[2]
-        arg[2,4,1,1]=(-0.753944077832)*x[0]**o+(0.570245260805)*x[0]+(-0.0226797611003)*x[1]**o+(0.0776773843077)*x[1]+(0.629536717673)*x[2]**o+(0.271216337699)*x[2]
-        arg[2,4,2,0]=(-0.233304828171)*x[0]**o+(-0.217436697538)*x[0]+(-0.373618121496)*x[1]**o+(-0.342584906659)*x[1]+(0.0114484228954)*x[2]**o+(-0.639753178531)*x[2]
-        arg[2,4,2,1]=(0.341373328517)*x[0]**o+(-0.432795268788)*x[0]+(-0.871263113926)*x[1]**o+(0.843590946949)*x[1]+(-0.653058566267)*x[2]**o+(-0.894366240333)*x[2]
-        arg[3,0,0,0]=(-0.472652289489)*x[0]**o+(0.697119499826)*x[0]+(-0.195781503945)*x[1]**o+(-0.716872496009)*x[1]+(-0.159070341485)*x[2]**o+(-0.700548071467)*x[2]
-        arg[3,0,0,1]=(-0.398674023611)*x[0]**o+(-0.690683017472)*x[0]+(0.957112237189)*x[1]**o+(-0.782702815224)*x[1]+(-0.249336230999)*x[2]**o+(0.22734983387)*x[2]
-        arg[3,0,1,0]=(-0.0216721345971)*x[0]**o+(0.283765576696)*x[0]+(-0.35531833417)*x[1]**o+(0.974402352836)*x[1]+(-0.568820213603)*x[2]**o+(0.957610279127)*x[2]
-        arg[3,0,1,1]=(0.0606265274442)*x[0]**o+(-0.941169961629)*x[0]+(0.804902933622)*x[1]**o+(-0.857158317629)*x[1]+(-0.227167312547)*x[2]**o+(0.945175823328)*x[2]
-        arg[3,0,2,0]=(0.630444608821)*x[0]**o+(-0.192343222551)*x[0]+(0.0342249337232)*x[1]**o+(0.970401334961)*x[1]+(-0.608568046213)*x[2]**o+(-0.539374299133)*x[2]
-        arg[3,0,2,1]=(-0.348127940577)*x[0]**o+(-0.895424161569)*x[0]+(0.918173840926)*x[1]**o+(0.99658998821)*x[1]+(-0.28733372377)*x[2]**o+(-0.516441029544)*x[2]
-        arg[3,1,0,0]=(0.735069593965)*x[0]**o+(-0.727899981109)*x[0]+(-0.325639355247)*x[1]**o+(0.751064830331)*x[1]+(-0.297126073245)*x[2]**o+(-0.673421779764)*x[2]
-        arg[3,1,0,1]=(0.00281719106153)*x[0]**o+(0.246929980679)*x[0]+(-0.48091940116)*x[1]**o+(0.501927059357)*x[1]+(-0.520099802736)*x[2]**o+(-0.902706012118)*x[2]
-        arg[3,1,1,0]=(-0.341732637339)*x[0]**o+(-0.169802234575)*x[0]+(0.156725375114)*x[1]**o+(0.739176104936)*x[1]+(-0.374572295196)*x[2]**o+(-0.436641001832)*x[2]
-        arg[3,1,1,1]=(0.644746847185)*x[0]**o+(-0.992126325722)*x[0]+(0.551602368714)*x[1]**o+(-0.839306768893)*x[1]+(-0.298981617653)*x[2]**o+(0.089795271605)*x[2]
-        arg[3,1,2,0]=(0.382425223801)*x[0]**o+(-0.949095041278)*x[0]+(-0.135997266858)*x[1]**o+(-0.871114033611)*x[1]+(-0.422984170709)*x[2]**o+(-0.698818784989)*x[2]
-        arg[3,1,2,1]=(0.630558573276)*x[0]**o+(0.90644556976)*x[0]+(0.512953870249)*x[1]**o+(-0.58514271049)*x[1]+(-0.0587225891088)*x[2]**o+(-0.390796465925)*x[2]
-        arg[3,2,0,0]=(-0.404884771697)*x[0]**o+(-0.178144326223)*x[0]+(-0.606503995405)*x[1]**o+(0.190025878248)*x[1]+(0.735831203504)*x[2]**o+(-0.567394607398)*x[2]
-        arg[3,2,0,1]=(0.28819895431)*x[0]**o+(0.456573144203)*x[0]+(0.00856899200079)*x[1]**o+(0.547827005333)*x[1]+(0.087428132552)*x[2]**o+(0.759650060552)*x[2]
-        arg[3,2,1,0]=(0.949790710961)*x[0]**o+(-0.685602682574)*x[0]+(0.75278809536)*x[1]**o+(-0.876689834021)*x[1]+(0.0116394079709)*x[2]**o+(0.319113513167)*x[2]
-        arg[3,2,1,1]=(0.619659549755)*x[0]**o+(-0.397388124185)*x[0]+(0.460679661901)*x[1]**o+(-0.507122241204)*x[1]+(0.985741194076)*x[2]**o+(0.916231863626)*x[2]
-        arg[3,2,2,0]=(-0.457269257294)*x[0]**o+(-0.47265466694)*x[0]+(0.900051837969)*x[1]**o+(-0.148802803439)*x[1]+(-0.195540487054)*x[2]**o+(0.0784524130754)*x[2]
-        arg[3,2,2,1]=(0.933553130797)*x[0]**o+(0.617362831046)*x[0]+(0.263616954879)*x[1]**o+(-0.0658887625105)*x[1]+(0.48091174024)*x[2]**o+(0.452935484504)*x[2]
-        arg[3,3,0,0]=(0.825594594128)*x[0]**o+(0.350203407373)*x[0]+(0.211125321741)*x[1]**o+(0.194914147746)*x[1]+(-0.639432220749)*x[2]**o+(-0.678718852935)*x[2]
-        arg[3,3,0,1]=(0.514394313629)*x[0]**o+(-0.595261005308)*x[0]+(-0.0219208527235)*x[1]**o+(-0.77204975709)*x[1]+(-0.483587370025)*x[2]**o+(-0.559464911044)*x[2]
-        arg[3,3,1,0]=(0.821240511475)*x[0]**o+(-0.403492177329)*x[0]+(0.486132478046)*x[1]**o+(-0.0187529457547)*x[1]+(0.73209003456)*x[2]**o+(0.226791335797)*x[2]
-        arg[3,3,1,1]=(-0.644256768839)*x[0]**o+(0.0372588784686)*x[0]+(0.726561650796)*x[1]**o+(0.518003809017)*x[1]+(0.738146681601)*x[2]**o+(-0.256036433171)*x[2]
-        arg[3,3,2,0]=(0.534862520097)*x[0]**o+(0.275559826342)*x[0]+(0.292383677513)*x[1]**o+(-0.448938027415)*x[1]+(0.281053776971)*x[2]**o+(0.0119964402657)*x[2]
-        arg[3,3,2,1]=(0.722071427786)*x[0]**o+(0.150280744346)*x[0]+(-0.0354786178164)*x[1]**o+(-0.703984035201)*x[1]+(0.105365795033)*x[2]**o+(-0.556567650379)*x[2]
-        arg[3,4,0,0]=(0.188625467698)*x[0]**o+(0.737108753179)*x[0]+(0.481952725951)*x[1]**o+(0.841958412185)*x[1]+(-0.329504392569)*x[2]**o+(0.228456367852)*x[2]
-        arg[3,4,0,1]=(0.181430484096)*x[0]**o+(0.307078178179)*x[0]+(0.262079226853)*x[1]**o+(0.111656765153)*x[1]+(0.15340094176)*x[2]**o+(-0.859774252333)*x[2]
-        arg[3,4,1,0]=(0.213491785855)*x[0]**o+(-0.479441582203)*x[0]+(0.0527576231613)*x[1]**o+(0.328465118263)*x[1]+(-0.645719217198)*x[2]**o+(-0.550569446193)*x[2]
-        arg[3,4,1,1]=(-0.401744411188)*x[0]**o+(-0.626446165761)*x[0]+(-0.191670239416)*x[1]**o+(0.866888407009)*x[1]+(-0.341220740645)*x[2]**o+(-0.742685031762)*x[2]
-        arg[3,4,2,0]=(-0.0813611687514)*x[0]**o+(0.318680684889)*x[0]+(-0.780434724843)*x[1]**o+(-0.0902735483921)*x[1]+(0.586108990767)*x[2]**o+(0.934041577436)*x[2]
-        arg[3,4,2,1]=(-0.0991425040958)*x[0]**o+(0.99274076773)*x[0]+(0.924248544389)*x[1]**o+(0.290576034321)*x[1]+(0.452104871421)*x[2]**o+(0.774017129246)*x[2]
-        ref[0,0,0,0]=(-0.445809185937)/(o+1.)+(-0.11049649315)+(0.480896043196)*0.5**o
-        ref[0,0,0,1]=(-0.776476434405)/(o+1.)+(-0.842010629213)+(-0.609632888023)*0.5**o
-        ref[0,0,1,0]=(0.182977545138)/(o+1.)+(-0.124558039762)+(0.205065167181)*0.5**o
-        ref[0,0,1,1]=(-1.17104760039)/(o+1.)+(0.608297882891)+(0.875716461075)*0.5**o
-        ref[0,0,2,0]=(0.647678117252)/(o+1.)+(-0.752248832131)+(0.711372030289)*0.5**o
-        ref[0,0,2,1]=(-0.0424453226222)/(o+1.)+(0.152363855976)+(-0.0536842545617)*0.5**o
-        ref[0,1,0,0]=(-0.97072557194)/(o+1.)+(0.355747795628)+(-0.710091748251)*0.5**o
-        ref[0,1,0,1]=(1.54210036269)/(o+1.)+(-0.0605096710259)+(0.250989366649)*0.5**o
-        ref[0,1,1,0]=(1.33375575444)/(o+1.)+(-0.237134583454)+(0.690360096543)*0.5**o
-        ref[0,1,1,1]=(0.0771949345448)/(o+1.)+(-0.00507329027461)+(-0.815220933301)*0.5**o
-        ref[0,1,2,0]=(-0.149444846314)/(o+1.)+(-0.226886808857)+(0.169442617085)*0.5**o
-        ref[0,1,2,1]=(0.114952830564)/(o+1.)+(-0.613038537369)+(-0.110636656112)*0.5**o
-        ref[0,2,0,0]=(-0.0135089970172)/(o+1.)+(-0.104741016697)+(0.340661037085)*0.5**o
-        ref[0,2,0,1]=(0.877950660854)/(o+1.)+(-0.395230122376)+(0.185282186176)*0.5**o
-        ref[0,2,1,0]=(0.247984803771)/(o+1.)+(-0.35022317362)+(0.238772787004)*0.5**o
-        ref[0,2,1,1]=(0.545513935627)/(o+1.)+(0.499096411763)+(-0.175884373587)*0.5**o
-        ref[0,2,2,0]=(-1.82248899593)/(o+1.)+(0.90641347096)+(-0.615695203188)*0.5**o
-        ref[0,2,2,1]=(0.384039454422)/(o+1.)+(-0.418573857307)+(-0.0992379560876)*0.5**o
-        ref[0,3,0,0]=(0.401014281541)/(o+1.)+(0.0980709839284)+(0.432415072474)*0.5**o
-        ref[0,3,0,1]=(-0.842943301759)/(o+1.)+(0.314943473548)+(-0.656397468061)*0.5**o
-        ref[0,3,1,0]=(0.54561755931)/(o+1.)+(0.00554262549843)+(-0.472896985897)*0.5**o
-        ref[0,3,1,1]=(0.651968521189)/(o+1.)+(0.534519988855)+(-0.515568063685)*0.5**o
-        ref[0,3,2,0]=(1.21411446919)/(o+1.)+(0.334629245453)+(-0.709802317012)*0.5**o
-        ref[0,3,2,1]=(1.57603080404)/(o+1.)+(0.123258042212)+(-0.20057625974)*0.5**o
-        ref[0,4,0,0]=(-0.318228722361)/(o+1.)+(0.248490822109)+(-0.726921583373)*0.5**o
-        ref[0,4,0,1]=(-0.785890130085)/(o+1.)+(-0.445201603538)+(0.765272127757)*0.5**o
-        ref[0,4,1,0]=(-0.926447863334)/(o+1.)+(0.111991361885)+(-0.613269202518)*0.5**o
-        ref[0,4,1,1]=(1.51953463824)/(o+1.)+(-0.283879690312)+(-0.727485674691)*0.5**o
-        ref[0,4,2,0]=(-1.08165630338)/(o+1.)+(0.520653193096)+(-0.663071984573)*0.5**o
-        ref[0,4,2,1]=(1.28376782528)/(o+1.)+(0.135152679989)+(0.893396132015)*0.5**o
-        ref[1,0,0,0]=(0.12071022058)/(o+1.)+(-0.35786297592)+(-0.0771632829864)*0.5**o
-        ref[1,0,0,1]=(-1.72034668123)/(o+1.)+(1.18881923454)+(0.133617787097)*0.5**o
-        ref[1,0,1,0]=(-1.7448609294)/(o+1.)+(-0.110381196284)+(0.174277385391)*0.5**o
-        ref[1,0,1,1]=(-0.906474149485)/(o+1.)+(-0.164529387192)+(0.795443369588)*0.5**o
-        ref[1,0,2,0]=(0.0119437343259)/(o+1.)+(-0.676075658316)+(0.482814141263)*0.5**o
-        ref[1,0,2,1]=(0.411591741576)/(o+1.)+(-0.419934815512)+(0.619359374773)*0.5**o
-        ref[1,1,0,0]=(0.508884440665)/(o+1.)+(-0.858881203437)+(-0.510375454058)*0.5**o
-        ref[1,1,0,1]=(0.519297551522)/(o+1.)+(0.647377411012)+(-0.302705575836)*0.5**o
-        ref[1,1,1,0]=(0.101621725999)/(o+1.)+(0.763621416728)+(0.520882033451)*0.5**o
-        ref[1,1,1,1]=(0.447372581166)/(o+1.)+(-0.27141635646)+(0.624622427594)*0.5**o
-        ref[1,1,2,0]=(1.54807073071)/(o+1.)+(0.865521741121)+(-0.044254701409)*0.5**o
-        ref[1,1,2,1]=(-0.954794849015)/(o+1.)+(0.616890655954)+(-0.240571107795)*0.5**o
-        ref[1,2,0,0]=(-0.0138637151804)/(o+1.)+(-0.23836886811)+(0.0596937021722)*0.5**o
-        ref[1,2,0,1]=(0.587416875871)/(o+1.)+(0.316160501623)+(-0.935541542647)*0.5**o
-        ref[1,2,1,0]=(-0.0269069617163)/(o+1.)+(1.16051668573)+(0.276741406646)*0.5**o
-        ref[1,2,1,1]=(-1.65286742406)/(o+1.)+(0.626473409767)+(0.828731604537)*0.5**o
-        ref[1,2,2,0]=(-0.106399305507)/(o+1.)+(0.156612816333)+(-0.380797583569)*0.5**o
-        ref[1,2,2,1]=(-0.0588949726984)/(o+1.)+(-0.666712330202)+(0.257022926473)*0.5**o
-        ref[1,3,0,0]=(-0.500235779047)/(o+1.)+(-0.278704142234)+(-0.645340088797)*0.5**o
-        ref[1,3,0,1]=(0.100788411199)/(o+1.)+(-0.158633910442)+(0.124132693667)*0.5**o
-        ref[1,3,1,0]=(0.824541289962)/(o+1.)+(0.17530886621)+(-0.7660131868)*0.5**o
-        ref[1,3,1,1]=(-0.331589329951)/(o+1.)+(0.0509573421542)+(-0.150578257351)*0.5**o
-        ref[1,3,2,0]=(-0.224033577887)/(o+1.)+(0.775397193106)+(-0.336661555676)*0.5**o
-        ref[1,3,2,1]=(-0.0921229181433)/(o+1.)+(0.15790296452)+(0.165928745462)*0.5**o
-        ref[1,4,0,0]=(-1.13149949621)/(o+1.)+(-0.0663729445879)+(0.283586653542)*0.5**o
-        ref[1,4,0,1]=(-0.722886434731)/(o+1.)+(0.104888434522)+(-0.772849835334)*0.5**o
-        ref[1,4,1,0]=(-1.44885259324)/(o+1.)+(-0.617668613405)+(-0.718524564964)*0.5**o
-        ref[1,4,1,1]=(-0.725759098745)/(o+1.)+(-0.519223986923)+(-0.771664154234)*0.5**o
-        ref[1,4,2,0]=(0.405592140408)/(o+1.)+(-0.317533868664)+(-0.591902790978)*0.5**o
-        ref[1,4,2,1]=(1.64489233298)/(o+1.)+(-0.145877587744)+(0.303567440092)*0.5**o
-        ref[2,0,0,0]=(1.35080478817)/(o+1.)+(-0.97319571481)+(0.197574550087)*0.5**o
-        ref[2,0,0,1]=(-0.435235416366)/(o+1.)+(-0.0768910013301)+(0.0663499012532)*0.5**o
-        ref[2,0,1,0]=(-0.441064969294)/(o+1.)+(-0.407537083031)+(-0.789090971877)*0.5**o
-        ref[2,0,1,1]=(-0.672223056216)/(o+1.)+(-0.673709465998)+(0.222873274437)*0.5**o
-        ref[2,0,2,0]=(-1.00188202525)/(o+1.)+(0.0497571110368)+(-0.300828039715)*0.5**o
-        ref[2,0,2,1]=(-0.755667412756)/(o+1.)+(0.101155281333)+(-0.501507304569)*0.5**o
-        ref[2,1,0,0]=(-1.03721245191)/(o+1.)+(0.421970845648)+(-0.809237327867)*0.5**o
-        ref[2,1,0,1]=(-0.924064281731)/(o+1.)+(0.748054079897)+(-0.722795722506)*0.5**o
-        ref[2,1,1,0]=(-0.0681656049743)/(o+1.)+(-0.401875028515)+(-0.551325611251)*0.5**o
-        ref[2,1,1,1]=(-1.43246198564)/(o+1.)+(-0.346563453541)+(0.743453045588)*0.5**o
-        ref[2,1,2,0]=(-0.628339309568)/(o+1.)+(0.801336921577)+(-0.033787671958)*0.5**o
-        ref[2,1,2,1]=(0.375615094549)/(o+1.)+(0.362201072648)+(0.127121989623)*0.5**o
-        ref[2,2,0,0]=(0.264583894127)/(o+1.)+(0.163046887519)+(-0.867530011926)*0.5**o
-        ref[2,2,0,1]=(1.11591762161)/(o+1.)+(-0.953567997151)+(-0.00858729113056)*0.5**o
-        ref[2,2,1,0]=(0.811633932744)/(o+1.)+(-0.227190467633)+(-0.982123891355)*0.5**o
-        ref[2,2,1,1]=(-0.0564577617182)/(o+1.)+(0.240301710247)+(-0.415533190881)*0.5**o
-        ref[2,2,2,0]=(0.762093170298)/(o+1.)+(0.072987783836)+(-0.559916632426)*0.5**o
-        ref[2,2,2,1]=(0.202809735486)/(o+1.)+(0.537525887878)+(-0.869055045156)*0.5**o
-        ref[2,3,0,0]=(-0.869552267348)/(o+1.)+(0.0306038908843)+(0.754089271004)*0.5**o
-        ref[2,3,0,1]=(-0.62307943066)/(o+1.)+(0.55807045)+(0.448970570476)*0.5**o
-        ref[2,3,1,0]=(0.781488342534)/(o+1.)+(-0.0325808476221)+(0.737635683404)*0.5**o
-        ref[2,3,1,1]=(0.0346228388027)/(o+1.)+(-0.237622427226)+(0.551348499194)*0.5**o
-        ref[2,3,2,0]=(1.11414404534)/(o+1.)+(-0.211595073582)+(-0.870721462645)*0.5**o
-        ref[2,3,2,1]=(0.767751675637)/(o+1.)+(0.889675459015)+(-0.234260935528)*0.5**o
-        ref[2,4,0,0]=(0.234214813823)/(o+1.)+(-0.675016631329)+(-0.474674316363)*0.5**o
-        ref[2,4,0,1]=(0.588371119514)/(o+1.)+(0.511317945368)+(0.259723799797)*0.5**o
-        ref[2,4,1,0]=(-1.08919560135)/(o+1.)+(0.246634130836)+(-0.960970748682)*0.5**o
-        ref[2,4,1,1]=(0.606856956573)/(o+1.)+(0.459569491406)+(-0.753944077832)*0.5**o
-        ref[2,4,2,0]=(-0.3621696986)/(o+1.)+(-0.599887391364)+(-0.233304828171)*0.5**o
-        ref[2,4,2,1]=(-1.52432168019)/(o+1.)+(-0.241785281086)+(0.341373328517)*0.5**o
-        ref[3,0,0,0]=(-0.35485184543)/(o+1.)+(-0.360150533825)+(-0.472652289489)*0.5**o
-        ref[3,0,0,1]=(0.70777600619)/(o+1.)+(-0.623017999413)+(-0.398674023611)*0.5**o
-        ref[3,0,1,0]=(-0.924138547773)/(o+1.)+(1.10788910433)+(-0.0216721345971)*0.5**o
-        ref[3,0,1,1]=(0.577735621075)/(o+1.)+(-0.426576227965)+(0.0606265274442)*0.5**o
-        ref[3,0,2,0]=(-0.57434311249)/(o+1.)+(0.119341906638)+(0.630444608821)*0.5**o
-        ref[3,0,2,1]=(0.630840117156)/(o+1.)+(-0.207637601452)+(-0.348127940577)*0.5**o
-        ref[3,1,0,0]=(-0.622765428492)/(o+1.)+(-0.32512846527)+(0.735069593965)*0.5**o
-        ref[3,1,0,1]=(-1.0010192039)/(o+1.)+(-0.076924486041)+(0.00281719106153)*0.5**o
-        ref[3,1,1,0]=(-0.217846920082)/(o+1.)+(0.0663664342643)+(-0.341732637339)*0.5**o
-        ref[3,1,1,1]=(0.25262075106)/(o+1.)+(-0.870818911505)+(0.644746847185)*0.5**o
-        ref[3,1,2,0]=(-0.558981437567)/(o+1.)+(-1.25951392994)+(0.382425223801)*0.5**o
-        ref[3,1,2,1]=(0.454231281141)/(o+1.)+(-0.034746803327)+(0.630558573276)*0.5**o
-        ref[3,2,0,0]=(0.129327208099)/(o+1.)+(-0.277756527686)+(-0.404884771697)*0.5**o
-        ref[3,2,0,1]=(0.0959971245528)/(o+1.)+(0.882025105044)+(0.28819895431)*0.5**o
-        ref[3,2,1,0]=(0.764427503331)/(o+1.)+(-0.621589501714)+(0.949790710961)*0.5**o
-        ref[3,2,1,1]=(1.44642085598)/(o+1.)+(0.00586074911794)+(0.619659549755)*0.5**o
-        ref[3,2,2,0]=(0.704511350915)/(o+1.)+(-0.271502528652)+(-0.457269257294)*0.5**o
-        ref[3,2,2,1]=(0.744528695119)/(o+1.)+(0.50220477652)+(0.933553130797)*0.5**o
-        ref[3,3,0,0]=(-0.428306899008)/(o+1.)+(-0.0668006489082)+(0.825594594128)*0.5**o
-        ref[3,3,0,1]=(-0.505508222749)/(o+1.)+(-0.963387836721)+(0.514394313629)*0.5**o
-        ref[3,3,1,0]=(1.21822251261)/(o+1.)+(-0.0977268936434)+(0.821240511475)*0.5**o
-        ref[3,3,1,1]=(1.4647083324)/(o+1.)+(0.149613127157)+(-0.644256768839)*0.5**o
-        ref[3,3,2,0]=(0.573437454483)/(o+1.)+(-0.0806908804035)+(0.534862520097)*0.5**o
-        ref[3,3,2,1]=(0.069887177217)/(o+1.)+(-0.555135470617)+(0.722071427786)*0.5**o
-        ref[3,4,0,0]=(0.152448333383)/(o+1.)+(0.903761766608)+(0.188625467698)*0.5**o
-        ref[3,4,0,1]=(0.415480168613)/(o+1.)+(-0.220519654501)+(0.181430484096)*0.5**o
-        ref[3,4,1,0]=(-0.592961594036)/(o+1.)+(-0.350772955066)+(0.213491785855)*0.5**o
-        ref[3,4,1,1]=(-0.532890980061)/(o+1.)+(-0.251121395257)+(-0.401744411188)*0.5**o
-        ref[3,4,2,0]=(-0.194325734076)/(o+1.)+(0.581224356966)+(-0.0813611687514)*0.5**o
-        ref[3,4,2,1]=(1.37635341581)/(o+1.)+(1.02866696565)+(-0.0991425040958)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.0333010052777)*x[0]**o+(-0.242011298555)*x[0]+(0.686457578633)*x[1]**o+(0.438506741453)*x[1]
-        ref=(0.686457578633)/(o+1.)+(0.0982477214491)+(-0.0333010052777)*0.5**o
-      else:
-        arg=(-0.365813216932)*x[0]**o+(0.969816151161)*x[0]+(0.349995764077)*x[1]**o+(0.867492181692)*x[1]+(-0.866177355796)*x[2]**o+(-0.203219031102)*x[2]
-        ref=(-0.516181591719)/(o+1.)+(0.817044650875)+(-0.365813216932)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.038446371199)*x[0]**o+(0.323075821067)*x[0]+(0.770528210463)*x[1]**o+(0.0434528043023)*x[1]
-        arg[1]=(-0.461876402566)*x[0]**o+(0.746965376214)*x[0]+(0.861234840159)*x[1]**o+(-0.568165009958)*x[1]
-        ref[0]=(0.770528210463)/(o+1.)+(0.183264312685)+(0.038446371199)*0.5**o
-        ref[1]=(0.861234840159)/(o+1.)+(0.0894001831281)+(-0.461876402566)*0.5**o
-      else:
-        arg[0]=(-0.472858663642)*x[0]**o+(-0.680210745369)*x[0]+(0.175425838082)*x[1]**o+(0.0189427039667)*x[1]+(0.0365198456146)*x[2]**o+(0.7840527457)*x[2]
-        arg[1]=(-0.0191775972693)*x[0]**o+(0.19303923194)*x[0]+(0.775528295333)*x[1]**o+(-0.765500708496)*x[1]+(0.351369471606)*x[2]**o+(-0.351587727906)*x[2]
-        ref[0]=(0.211945683696)/(o+1.)+(0.0613923521485)+(-0.472858663642)*0.5**o
-        ref[1]=(1.12689776694)/(o+1.)+(-0.462024602231)+(-0.0191775972693)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.994443255559)*x[0]**o+(-0.403427184912)*x[0]+(-0.889656446862)*x[1]**o+(-0.411934106034)*x[1]
-        arg[0,1]=(-0.864086447061)*x[0]**o+(-0.277489357308)*x[0]+(0.977910864864)*x[1]**o+(-0.0505775488074)*x[1]
-        arg[0,2]=(-0.397179114534)*x[0]**o+(-0.448046821439)*x[0]+(-0.340253609736)*x[1]**o+(0.624988837716)*x[1]
-        arg[0,3]=(-0.9155191116)*x[0]**o+(0.133777450278)*x[0]+(-0.809567026065)*x[1]**o+(-0.815374059364)*x[1]
-        arg[0,4]=(-0.416764684181)*x[0]**o+(0.0965164570638)*x[0]+(0.190191799833)*x[1]**o+(0.0970709424519)*x[1]
-        arg[1,0]=(0.646527294535)*x[0]**o+(-0.337119506636)*x[0]+(0.42669563245)*x[1]**o+(-0.185228568706)*x[1]
-        arg[1,1]=(-0.411532647934)*x[0]**o+(0.178830973832)*x[0]+(-0.904886020892)*x[1]**o+(-0.740623071275)*x[1]
-        arg[1,2]=(0.523024622808)*x[0]**o+(-0.226298848077)*x[0]+(-0.707740568617)*x[1]**o+(0.998182796571)*x[1]
-        arg[1,3]=(0.840649917357)*x[0]**o+(-0.736279151571)*x[0]+(0.996017554392)*x[1]**o+(-0.397833319931)*x[1]
-        arg[1,4]=(0.76711764419)*x[0]**o+(-0.905452991298)*x[0]+(-0.925675237951)*x[1]**o+(-0.982712645237)*x[1]
-        arg[2,0]=(0.198547103682)*x[0]**o+(0.674537682234)*x[0]+(-0.891195618193)*x[1]**o+(0.979109691481)*x[1]
-        arg[2,1]=(0.171629921737)*x[0]**o+(0.0102727001751)*x[0]+(0.467578393374)*x[1]**o+(0.583960984645)*x[1]
-        arg[2,2]=(-0.637526271497)*x[0]**o+(-0.900821073531)*x[0]+(0.61637733965)*x[1]**o+(0.43717505341)*x[1]
-        arg[2,3]=(-0.205861963967)*x[0]**o+(-0.104621062003)*x[0]+(0.582584591946)*x[1]**o+(0.351739662419)*x[1]
-        arg[2,4]=(-0.179355911316)*x[0]**o+(-0.188415282678)*x[0]+(0.598342895007)*x[1]**o+(0.364638908577)*x[1]
-        arg[3,0]=(0.150471526119)*x[0]**o+(-0.940789873202)*x[0]+(-0.524275825864)*x[1]**o+(0.729004683023)*x[1]
-        arg[3,1]=(0.123933417087)*x[0]**o+(0.192413160498)*x[0]+(0.203730760507)*x[1]**o+(0.852010172966)*x[1]
-        arg[3,2]=(-0.297766950847)*x[0]**o+(0.269905131596)*x[0]+(-0.0830931256847)*x[1]**o+(0.26964712569)*x[1]
-        arg[3,3]=(0.96961517265)*x[0]**o+(0.363312967302)*x[0]+(-0.811142762589)*x[1]**o+(-0.420442983537)*x[1]
-        arg[3,4]=(-0.314185602206)*x[0]**o+(-0.0446515646101)*x[0]+(-0.884651038732)*x[1]**o+(-0.166386477611)*x[1]
-        ref[0,0]=(-0.889656446862)/(o+1.)+(-0.407680645473)+(-0.994443255559)*0.5**o
-        ref[0,1]=(0.977910864864)/(o+1.)+(-0.164033453058)+(-0.864086447061)*0.5**o
-        ref[0,2]=(-0.340253609736)/(o+1.)+(0.0884710081389)+(-0.397179114534)*0.5**o
-        ref[0,3]=(-0.809567026065)/(o+1.)+(-0.340798304543)+(-0.9155191116)*0.5**o
-        ref[0,4]=(0.190191799833)/(o+1.)+(0.0967936997578)+(-0.416764684181)*0.5**o
-        ref[1,0]=(0.42669563245)/(o+1.)+(-0.261174037671)+(0.646527294535)*0.5**o
-        ref[1,1]=(-0.904886020892)/(o+1.)+(-0.280896048722)+(-0.411532647934)*0.5**o
-        ref[1,2]=(-0.707740568617)/(o+1.)+(0.385941974247)+(0.523024622808)*0.5**o
-        ref[1,3]=(0.996017554392)/(o+1.)+(-0.567056235751)+(0.840649917357)*0.5**o
-        ref[1,4]=(-0.925675237951)/(o+1.)+(-0.944082818268)+(0.76711764419)*0.5**o
-        ref[2,0]=(-0.891195618193)/(o+1.)+(0.826823686857)+(0.198547103682)*0.5**o
-        ref[2,1]=(0.467578393374)/(o+1.)+(0.29711684241)+(0.171629921737)*0.5**o
-        ref[2,2]=(0.61637733965)/(o+1.)+(-0.231823010061)+(-0.637526271497)*0.5**o
-        ref[2,3]=(0.582584591946)/(o+1.)+(0.123559300208)+(-0.205861963967)*0.5**o
-        ref[2,4]=(0.598342895007)/(o+1.)+(0.0881118129495)+(-0.179355911316)*0.5**o
-        ref[3,0]=(-0.524275825864)/(o+1.)+(-0.105892595089)+(0.150471526119)*0.5**o
-        ref[3,1]=(0.203730760507)/(o+1.)+(0.522211666732)+(0.123933417087)*0.5**o
-        ref[3,2]=(-0.0830931256847)/(o+1.)+(0.269776128643)+(-0.297766950847)*0.5**o
-        ref[3,3]=(-0.811142762589)/(o+1.)+(-0.0285650081177)+(0.96961517265)*0.5**o
-        ref[3,4]=(-0.884651038732)/(o+1.)+(-0.105519021111)+(-0.314185602206)*0.5**o
-      else:
-        arg[0,0]=(0.264691789613)*x[0]**o+(0.816541340997)*x[0]+(-0.402990464667)*x[1]**o+(-0.57479619687)*x[1]+(0.336313666995)*x[2]**o+(-0.353125285536)*x[2]
-        arg[0,1]=(-0.0526559162494)*x[0]**o+(-0.901336706583)*x[0]+(0.237482536727)*x[1]**o+(-0.458564275773)*x[1]+(-0.90715992057)*x[2]**o+(-0.352062856077)*x[2]
-        arg[0,2]=(0.786349112412)*x[0]**o+(-0.395569856472)*x[0]+(-0.996593023157)*x[1]**o+(-0.277001350627)*x[1]+(0.435375913289)*x[2]**o+(0.00380742297736)*x[2]
-        arg[0,3]=(0.3336751197)*x[0]**o+(0.592185657129)*x[0]+(0.148956266814)*x[1]**o+(-0.852264651722)*x[1]+(-0.680249245511)*x[2]**o+(0.238843544413)*x[2]
-        arg[0,4]=(0.875206676786)*x[0]**o+(0.0420423017124)*x[0]+(-0.690488811412)*x[1]**o+(-0.191328696331)*x[1]+(-0.861423624177)*x[2]**o+(0.483925405411)*x[2]
-        arg[1,0]=(-0.573216715158)*x[0]**o+(-0.0668114726198)*x[0]+(0.382097918101)*x[1]**o+(-0.126485626438)*x[1]+(0.37521336616)*x[2]**o+(0.42402066058)*x[2]
-        arg[1,1]=(-0.0919326514467)*x[0]**o+(-0.791351880042)*x[0]+(0.772694542694)*x[1]**o+(-0.537902003787)*x[1]+(0.424413342503)*x[2]**o+(-0.285553230731)*x[2]
-        arg[1,2]=(0.855490362389)*x[0]**o+(0.60428104628)*x[0]+(-0.846565232506)*x[1]**o+(-0.243727717758)*x[1]+(0.900077399935)*x[2]**o+(-0.974305489047)*x[2]
-        arg[1,3]=(-0.90802343526)*x[0]**o+(0.00950587842259)*x[0]+(0.821234711321)*x[1]**o+(-0.0628912085092)*x[1]+(-0.773563396868)*x[2]**o+(-0.403955952419)*x[2]
-        arg[1,4]=(-0.33139358787)*x[0]**o+(-0.901382943687)*x[0]+(-0.981921375707)*x[1]**o+(-0.0654519807133)*x[1]+(0.880069861158)*x[2]**o+(-0.0796172270076)*x[2]
-        arg[2,0]=(-0.202818692518)*x[0]**o+(-0.155436611971)*x[0]+(0.739467305515)*x[1]**o+(-0.12096877475)*x[1]+(0.479644796804)*x[2]**o+(0.0580715322389)*x[2]
-        arg[2,1]=(0.0461326006936)*x[0]**o+(0.122168224674)*x[0]+(0.986788073931)*x[1]**o+(-0.435933938764)*x[1]+(-0.312527130215)*x[2]**o+(0.726805187165)*x[2]
-        arg[2,2]=(-0.539659153805)*x[0]**o+(-0.26082353681)*x[0]+(0.367739719819)*x[1]**o+(0.943584828354)*x[1]+(0.688225221556)*x[2]**o+(-0.121563525696)*x[2]
-        arg[2,3]=(0.861717128203)*x[0]**o+(0.0666983176426)*x[0]+(0.984510848927)*x[1]**o+(-0.321865378029)*x[1]+(0.522584734)*x[2]**o+(0.589527116625)*x[2]
-        arg[2,4]=(0.778575699703)*x[0]**o+(0.515802361664)*x[0]+(0.817655905624)*x[1]**o+(0.883824717911)*x[1]+(0.656833761714)*x[2]**o+(-0.991585145611)*x[2]
-        arg[3,0]=(0.752875513075)*x[0]**o+(0.615136567082)*x[0]+(-0.205265870704)*x[1]**o+(0.483918142728)*x[1]+(-0.0495322147557)*x[2]**o+(-0.132474571954)*x[2]
-        arg[3,1]=(0.0563875061408)*x[0]**o+(-0.603033440119)*x[0]+(-0.0944809376206)*x[1]**o+(0.725330686731)*x[1]+(0.00527671533343)*x[2]**o+(-0.434519675586)*x[2]
-        arg[3,2]=(0.100078550382)*x[0]**o+(-0.340988639989)*x[0]+(-0.392591649097)*x[1]**o+(-0.924705734588)*x[1]+(0.420410192075)*x[2]**o+(-0.94741221593)*x[2]
-        arg[3,3]=(0.536414145801)*x[0]**o+(0.142421640429)*x[0]+(0.213162255423)*x[1]**o+(-0.695193008147)*x[1]+(0.9625091599)*x[2]**o+(0.534409542153)*x[2]
-        arg[3,4]=(0.305683606235)*x[0]**o+(0.340964210305)*x[0]+(0.757807973246)*x[1]**o+(0.11459551493)*x[1]+(-0.81395047506)*x[2]**o+(0.636392281491)*x[2]
-        ref[0,0]=(-0.0666767976714)/(o+1.)+(-0.0556900707042)+(0.264691789613)*0.5**o
-        ref[0,1]=(-0.669677383843)/(o+1.)+(-0.855981919217)+(-0.0526559162494)*0.5**o
-        ref[0,2]=(-0.561217109869)/(o+1.)+(-0.334381892061)+(0.786349112412)*0.5**o
-        ref[0,3]=(-0.531292978697)/(o+1.)+(-0.0106177250896)+(0.3336751197)*0.5**o
-        ref[0,4]=(-1.55191243559)/(o+1.)+(0.167319505396)+(0.875206676786)*0.5**o
-        ref[1,0]=(0.757311284261)/(o+1.)+(0.115361780761)+(-0.573216715158)*0.5**o
-        ref[1,1]=(1.1971078852)/(o+1.)+(-0.80740355728)+(-0.0919326514467)*0.5**o
-        ref[1,2]=(0.0535121674292)/(o+1.)+(-0.306876080263)+(0.855490362389)*0.5**o
-        ref[1,3]=(0.0476713144526)/(o+1.)+(-0.228670641253)+(-0.90802343526)*0.5**o
-        ref[1,4]=(-0.101851514548)/(o+1.)+(-0.523226075704)+(-0.33139358787)*0.5**o
-        ref[2,0]=(1.21911210232)/(o+1.)+(-0.109166927241)+(-0.202818692518)*0.5**o
-        ref[2,1]=(0.674260943716)/(o+1.)+(0.206519736538)+(0.0461326006936)*0.5**o
-        ref[2,2]=(1.05596494137)/(o+1.)+(0.280598882924)+(-0.539659153805)*0.5**o
-        ref[2,3]=(1.50709558293)/(o+1.)+(0.167180028119)+(0.861717128203)*0.5**o
-        ref[2,4]=(1.47448966734)/(o+1.)+(0.204020966982)+(0.778575699703)*0.5**o
-        ref[3,0]=(-0.25479808546)/(o+1.)+(0.483290068928)+(0.752875513075)*0.5**o
-        ref[3,1]=(-0.0892042222872)/(o+1.)+(-0.156111214487)+(0.0563875061408)*0.5**o
-        ref[3,2]=(0.0278185429781)/(o+1.)+(-1.10655329525)+(0.100078550382)*0.5**o
-        ref[3,3]=(1.17567141532)/(o+1.)+(-0.00918091278228)+(0.536414145801)*0.5**o
-        ref[3,4]=(-0.0561425018138)/(o+1.)+(0.545976003363)+(0.305683606235)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.448877659671)*x[0]**o+(0.130599173692)*x[0]+(-0.264185555629)*x[1]**o+(-0.722726040492)*x[1]
-        arg[0,0,1]=(-0.543806308372)*x[0]**o+(-0.685242399166)*x[0]+(0.325336801501)*x[1]**o+(0.572960380228)*x[1]
-        arg[0,1,0]=(-0.893080563297)*x[0]**o+(-0.251553981066)*x[0]+(0.256078388483)*x[1]**o+(-0.926701685259)*x[1]
-        arg[0,1,1]=(0.346088914447)*x[0]**o+(0.166180418696)*x[0]+(0.353024178635)*x[1]**o+(0.731811935721)*x[1]
-        arg[1,0,0]=(0.553083243483)*x[0]**o+(0.976153803522)*x[0]+(-0.260777317634)*x[1]**o+(-0.641936915628)*x[1]
-        arg[1,0,1]=(-0.561076901068)*x[0]**o+(0.837832618302)*x[0]+(-0.638970151828)*x[1]**o+(-0.495169195543)*x[1]
-        arg[1,1,0]=(-0.292805925132)*x[0]**o+(0.670472035586)*x[0]+(-0.752026521307)*x[1]**o+(-0.473087472861)*x[1]
-        arg[1,1,1]=(-0.432857805275)*x[0]**o+(0.495387797249)*x[0]+(0.0579881469257)*x[1]**o+(0.831644440274)*x[1]
-        arg[2,0,0]=(0.413433231384)*x[0]**o+(0.919831571878)*x[0]+(-0.373581626416)*x[1]**o+(0.16423318333)*x[1]
-        arg[2,0,1]=(0.857566619293)*x[0]**o+(0.340454525569)*x[0]+(0.139298007219)*x[1]**o+(0.220542978265)*x[1]
-        arg[2,1,0]=(-0.914184896115)*x[0]**o+(-0.0279186159835)*x[0]+(0.893417478351)*x[1]**o+(-0.108178714604)*x[1]
-        arg[2,1,1]=(-0.749629612712)*x[0]**o+(-0.649957092299)*x[0]+(0.181944194719)*x[1]**o+(-0.988782927329)*x[1]
-        arg[3,0,0]=(0.292013067678)*x[0]**o+(0.491680364317)*x[0]+(0.951144487798)*x[1]**o+(0.980949630108)*x[1]
-        arg[3,0,1]=(0.89779245885)*x[0]**o+(-0.147546711846)*x[0]+(0.0902450198362)*x[1]**o+(-0.669984062969)*x[1]
-        arg[3,1,0]=(0.62590631314)*x[0]**o+(0.329384454978)*x[0]+(-0.676917185409)*x[1]**o+(-0.0903173226074)*x[1]
-        arg[3,1,1]=(-0.668268661271)*x[0]**o+(-0.847167879584)*x[0]+(0.329431843319)*x[1]**o+(-0.989253343115)*x[1]
-        arg[4,0,0]=(-0.675111374291)*x[0]**o+(0.738030423939)*x[0]+(-0.413299452027)*x[1]**o+(0.36859580301)*x[1]
-        arg[4,0,1]=(-0.207625666422)*x[0]**o+(-0.455639256266)*x[0]+(0.554118743878)*x[1]**o+(0.14044849621)*x[1]
-        arg[4,1,0]=(-0.313337039275)*x[0]**o+(-0.451797308521)*x[0]+(0.201296275104)*x[1]**o+(-0.779869953962)*x[1]
-        arg[4,1,1]=(-0.0308697706768)*x[0]**o+(0.214664850788)*x[0]+(-0.824157101269)*x[1]**o+(0.156012836486)*x[1]
-        arg[5,0,0]=(0.277885566309)*x[0]**o+(-0.387820938776)*x[0]+(0.820602896312)*x[1]**o+(0.162715513355)*x[1]
-        arg[5,0,1]=(-0.216951421349)*x[0]**o+(0.906019329549)*x[0]+(-0.330132336808)*x[1]**o+(0.416109194357)*x[1]
-        arg[5,1,0]=(0.923496627826)*x[0]**o+(-0.177644464371)*x[0]+(0.482278717995)*x[1]**o+(-0.362003106154)*x[1]
-        arg[5,1,1]=(0.9109111591)*x[0]**o+(-0.0919782899769)*x[0]+(0.103950387446)*x[1]**o+(0.447452648868)*x[1]
-        ref[0,0,0]=(-0.264185555629)/(o+1.)+(-0.2960634334)+(0.448877659671)*0.5**o
-        ref[0,0,1]=(0.325336801501)/(o+1.)+(-0.0561410094689)+(-0.543806308372)*0.5**o
-        ref[0,1,0]=(0.256078388483)/(o+1.)+(-0.589127833162)+(-0.893080563297)*0.5**o
-        ref[0,1,1]=(0.353024178635)/(o+1.)+(0.448996177208)+(0.346088914447)*0.5**o
-        ref[1,0,0]=(-0.260777317634)/(o+1.)+(0.167108443947)+(0.553083243483)*0.5**o
-        ref[1,0,1]=(-0.638970151828)/(o+1.)+(0.17133171138)+(-0.561076901068)*0.5**o
-        ref[1,1,0]=(-0.752026521307)/(o+1.)+(0.0986922813626)+(-0.292805925132)*0.5**o
-        ref[1,1,1]=(0.0579881469257)/(o+1.)+(0.663516118762)+(-0.432857805275)*0.5**o
-        ref[2,0,0]=(-0.373581626416)/(o+1.)+(0.542032377604)+(0.413433231384)*0.5**o
-        ref[2,0,1]=(0.139298007219)/(o+1.)+(0.280498751917)+(0.857566619293)*0.5**o
-        ref[2,1,0]=(0.893417478351)/(o+1.)+(-0.0680486652939)+(-0.914184896115)*0.5**o
-        ref[2,1,1]=(0.181944194719)/(o+1.)+(-0.819370009814)+(-0.749629612712)*0.5**o
-        ref[3,0,0]=(0.951144487798)/(o+1.)+(0.736314997212)+(0.292013067678)*0.5**o
-        ref[3,0,1]=(0.0902450198362)/(o+1.)+(-0.408765387408)+(0.89779245885)*0.5**o
-        ref[3,1,0]=(-0.676917185409)/(o+1.)+(0.119533566185)+(0.62590631314)*0.5**o
-        ref[3,1,1]=(0.329431843319)/(o+1.)+(-0.91821061135)+(-0.668268661271)*0.5**o
-        ref[4,0,0]=(-0.413299452027)/(o+1.)+(0.553313113475)+(-0.675111374291)*0.5**o
-        ref[4,0,1]=(0.554118743878)/(o+1.)+(-0.157595380028)+(-0.207625666422)*0.5**o
-        ref[4,1,0]=(0.201296275104)/(o+1.)+(-0.615833631241)+(-0.313337039275)*0.5**o
-        ref[4,1,1]=(-0.824157101269)/(o+1.)+(0.185338843637)+(-0.0308697706768)*0.5**o
-        ref[5,0,0]=(0.820602896312)/(o+1.)+(-0.11255271271)+(0.277885566309)*0.5**o
-        ref[5,0,1]=(-0.330132336808)/(o+1.)+(0.661064261953)+(-0.216951421349)*0.5**o
-        ref[5,1,0]=(0.482278717995)/(o+1.)+(-0.269823785262)+(0.923496627826)*0.5**o
-        ref[5,1,1]=(0.103950387446)/(o+1.)+(0.177737179446)+(0.9109111591)*0.5**o
-      else:
-        arg[0,0,0]=(0.843169691966)*x[0]**o+(0.252560741792)*x[0]+(0.0428740803857)*x[1]**o+(-0.702885246223)*x[1]+(0.175406156382)*x[2]**o+(-0.819206174419)*x[2]
-        arg[0,0,1]=(-0.780678250187)*x[0]**o+(-0.628781977796)*x[0]+(0.345241549754)*x[1]**o+(-0.686783366275)*x[1]+(0.298501249797)*x[2]**o+(-0.592222734778)*x[2]
-        arg[0,1,0]=(0.680331984783)*x[0]**o+(0.20945731105)*x[0]+(0.582220641498)*x[1]**o+(0.159144772508)*x[1]+(0.197544685245)*x[2]**o+(-0.542847499692)*x[2]
-        arg[0,1,1]=(0.561649107089)*x[0]**o+(0.409538404439)*x[0]+(0.687461001448)*x[1]**o+(0.327986995905)*x[1]+(0.701007758697)*x[2]**o+(0.95919995454)*x[2]
-        arg[1,0,0]=(0.0620287124894)*x[0]**o+(-0.946536581396)*x[0]+(-0.813637608115)*x[1]**o+(0.0808967031579)*x[1]+(0.545408819059)*x[2]**o+(0.250558134093)*x[2]
-        arg[1,0,1]=(-0.0778300410758)*x[0]**o+(-0.852201314682)*x[0]+(0.712528858815)*x[1]**o+(-0.69009644973)*x[1]+(-0.0836140529567)*x[2]**o+(0.687579338803)*x[2]
-        arg[1,1,0]=(-0.37648103863)*x[0]**o+(-0.264461846666)*x[0]+(-0.45921598716)*x[1]**o+(-0.516551658367)*x[1]+(0.512446750786)*x[2]**o+(0.850266522322)*x[2]
-        arg[1,1,1]=(-0.951741356481)*x[0]**o+(-0.989023540683)*x[0]+(0.338787640816)*x[1]**o+(0.764043925298)*x[1]+(0.524009019713)*x[2]**o+(-0.912507794534)*x[2]
-        arg[2,0,0]=(0.613468181683)*x[0]**o+(-0.357325179573)*x[0]+(0.153221256731)*x[1]**o+(-0.748686771579)*x[1]+(0.364085012368)*x[2]**o+(-0.134535056195)*x[2]
-        arg[2,0,1]=(-0.728948376511)*x[0]**o+(-0.0657162843876)*x[0]+(-0.336013775703)*x[1]**o+(0.299044747397)*x[1]+(-0.712877779871)*x[2]**o+(0.229974926734)*x[2]
-        arg[2,1,0]=(-0.213428159952)*x[0]**o+(0.680250111549)*x[0]+(-0.986942572737)*x[1]**o+(0.549006049647)*x[1]+(0.572921637402)*x[2]**o+(-0.241851127933)*x[2]
-        arg[2,1,1]=(0.0367155018841)*x[0]**o+(-0.768111161527)*x[0]+(-0.748085216726)*x[1]**o+(-0.752536272228)*x[1]+(0.555945063877)*x[2]**o+(0.012687074005)*x[2]
-        arg[3,0,0]=(-0.945391902075)*x[0]**o+(-0.581330133808)*x[0]+(-0.253390460088)*x[1]**o+(-0.885589795648)*x[1]+(-0.555900062171)*x[2]**o+(-0.241006607054)*x[2]
-        arg[3,0,1]=(0.924110231188)*x[0]**o+(0.428520753545)*x[0]+(0.187773835144)*x[1]**o+(-0.53787305121)*x[1]+(0.0970284978901)*x[2]**o+(0.0580212350951)*x[2]
-        arg[3,1,0]=(0.426389283701)*x[0]**o+(-0.0976148877161)*x[0]+(-0.364828466078)*x[1]**o+(-0.536398529197)*x[1]+(0.648605043498)*x[2]**o+(-0.234629706559)*x[2]
-        arg[3,1,1]=(-0.736098543054)*x[0]**o+(0.985014182905)*x[0]+(-0.563513361433)*x[1]**o+(0.589434310221)*x[1]+(-0.360296462891)*x[2]**o+(-0.586591636182)*x[2]
-        arg[4,0,0]=(0.953916732391)*x[0]**o+(-0.835620914249)*x[0]+(0.562803727423)*x[1]**o+(-0.904263689551)*x[1]+(-0.349815820142)*x[2]**o+(-0.156410988081)*x[2]
-        arg[4,0,1]=(-0.236710267891)*x[0]**o+(0.958992060128)*x[0]+(0.711565908363)*x[1]**o+(-0.639771085045)*x[1]+(-0.919042661652)*x[2]**o+(-0.198907436333)*x[2]
-        arg[4,1,0]=(0.275058935551)*x[0]**o+(0.563461500878)*x[0]+(0.438833998471)*x[1]**o+(0.686375712335)*x[1]+(-0.930322605963)*x[2]**o+(0.710777122765)*x[2]
-        arg[4,1,1]=(-0.507845102241)*x[0]**o+(-0.390574086909)*x[0]+(-0.170020669232)*x[1]**o+(-0.107455242464)*x[1]+(-0.97056652533)*x[2]**o+(-0.720180192255)*x[2]
-        arg[5,0,0]=(-0.922597172214)*x[0]**o+(0.229197305733)*x[0]+(-0.943214499543)*x[1]**o+(0.269256599046)*x[1]+(-0.11540537404)*x[2]**o+(0.956940487934)*x[2]
-        arg[5,0,1]=(-0.0350868975578)*x[0]**o+(-0.547620412319)*x[0]+(-0.818344866429)*x[1]**o+(-0.0632082353078)*x[1]+(-0.490536679501)*x[2]**o+(-0.79641747407)*x[2]
-        arg[5,1,0]=(0.877279477171)*x[0]**o+(-0.408752853807)*x[0]+(0.143432191997)*x[1]**o+(0.230679627667)*x[1]+(0.0346230515425)*x[2]**o+(0.357377660033)*x[2]
-        arg[5,1,1]=(0.294375780312)*x[0]**o+(-0.688447065878)*x[0]+(0.213334642918)*x[1]**o+(0.664021137697)*x[1]+(-0.532996065961)*x[2]**o+(0.794315136407)*x[2]
-        ref[0,0,0]=(0.218280236768)/(o+1.)+(-0.634765339425)+(0.843169691966)*0.5**o
-        ref[0,0,1]=(0.64374279955)/(o+1.)+(-0.953894039424)+(-0.780678250187)*0.5**o
-        ref[0,1,0]=(0.779765326742)/(o+1.)+(-0.0871227080671)+(0.680331984783)*0.5**o
-        ref[0,1,1]=(1.38846876015)/(o+1.)+(0.848362677442)+(0.561649107089)*0.5**o
-        ref[1,0,0]=(-0.268228789055)/(o+1.)+(-0.307540872072)+(0.0620287124894)*0.5**o
-        ref[1,0,1]=(0.628914805859)/(o+1.)+(-0.427359212804)+(-0.0778300410758)*0.5**o
-        ref[1,1,0]=(0.0532307636262)/(o+1.)+(0.0346265086445)+(-0.37648103863)*0.5**o
-        ref[1,1,1]=(0.862796660529)/(o+1.)+(-0.56874370496)+(-0.951741356481)*0.5**o
-        ref[2,0,0]=(0.5173062691)/(o+1.)+(-0.620273503673)+(0.613468181683)*0.5**o
-        ref[2,0,1]=(-1.04889155557)/(o+1.)+(0.231651694871)+(-0.728948376511)*0.5**o
-        ref[2,1,0]=(-0.414020935335)/(o+1.)+(0.493702516631)+(-0.213428159952)*0.5**o
-        ref[2,1,1]=(-0.192140152849)/(o+1.)+(-0.753980179875)+(0.0367155018841)*0.5**o
-        ref[3,0,0]=(-0.809290522259)/(o+1.)+(-0.853963268255)+(-0.945391902075)*0.5**o
-        ref[3,0,1]=(0.284802333034)/(o+1.)+(-0.0256655312851)+(0.924110231188)*0.5**o
-        ref[3,1,0]=(0.28377657742)/(o+1.)+(-0.434321561736)+(0.426389283701)*0.5**o
-        ref[3,1,1]=(-0.923809824324)/(o+1.)+(0.493928428472)+(-0.736098543054)*0.5**o
-        ref[4,0,0]=(0.212987907281)/(o+1.)+(-0.948147795941)+(0.953916732391)*0.5**o
-        ref[4,0,1]=(-0.207476753289)/(o+1.)+(0.0601567693744)+(-0.236710267891)*0.5**o
-        ref[4,1,0]=(-0.491488607492)/(o+1.)+(0.980307167989)+(0.275058935551)*0.5**o
-        ref[4,1,1]=(-1.14058719456)/(o+1.)+(-0.609104760814)+(-0.507845102241)*0.5**o
-        ref[5,0,0]=(-1.05861987358)/(o+1.)+(0.727697196357)+(-0.922597172214)*0.5**o
-        ref[5,0,1]=(-1.30888154593)/(o+1.)+(-0.703623060848)+(-0.0350868975578)*0.5**o
-        ref[5,1,0]=(0.17805524354)/(o+1.)+(0.0896522169463)+(0.877279477171)*0.5**o
-        ref[5,1,1]=(-0.319661423044)/(o+1.)+(0.384944604113)+(0.294375780312)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.182956096072)*x[0]**o+(0.857065806542)*x[0]+(-0.0352052809673)*x[1]**o+(0.950661773214)*x[1]
-        arg[0,0,0,1]=(-0.81342189211)*x[0]**o+(0.36137453013)*x[0]+(0.0610373691872)*x[1]**o+(-0.974859653337)*x[1]
-        arg[0,0,1,0]=(-0.149103531408)*x[0]**o+(0.853517194849)*x[0]+(0.623943596759)*x[1]**o+(0.441477983782)*x[1]
-        arg[0,0,1,1]=(0.74912087771)*x[0]**o+(0.935896347068)*x[0]+(0.136600247183)*x[1]**o+(0.915043476739)*x[1]
-        arg[0,0,2,0]=(-0.289042694587)*x[0]**o+(-0.0324580134489)*x[0]+(0.966454801911)*x[1]**o+(0.158747002668)*x[1]
-        arg[0,0,2,1]=(0.0809737838902)*x[0]**o+(0.483125829124)*x[0]+(-0.156074498516)*x[1]**o+(-0.387215102608)*x[1]
-        arg[0,1,0,0]=(0.638822193145)*x[0]**o+(-0.211942445721)*x[0]+(-0.016865109839)*x[1]**o+(-0.596486509057)*x[1]
-        arg[0,1,0,1]=(0.611604473356)*x[0]**o+(-0.330484367791)*x[0]+(-0.897448372147)*x[1]**o+(-0.0188556077191)*x[1]
-        arg[0,1,1,0]=(-0.745407006471)*x[0]**o+(0.547985829362)*x[0]+(-0.229098133178)*x[1]**o+(0.339357994536)*x[1]
-        arg[0,1,1,1]=(0.756528549281)*x[0]**o+(0.0968167016962)*x[0]+(0.481206893907)*x[1]**o+(-0.320299781291)*x[1]
-        arg[0,1,2,0]=(0.335544368565)*x[0]**o+(0.143490409353)*x[0]+(0.367303506039)*x[1]**o+(-0.459001464112)*x[1]
-        arg[0,1,2,1]=(0.669933676654)*x[0]**o+(0.0679909847194)*x[0]+(0.182483888026)*x[1]**o+(-0.382138842505)*x[1]
-        arg[0,2,0,0]=(-0.929163949925)*x[0]**o+(0.670533855076)*x[0]+(0.587675819052)*x[1]**o+(0.221939557678)*x[1]
-        arg[0,2,0,1]=(0.639896773528)*x[0]**o+(-0.166901547286)*x[0]+(-0.83934259298)*x[1]**o+(-0.522536841927)*x[1]
-        arg[0,2,1,0]=(-0.399556357179)*x[0]**o+(0.860582177909)*x[0]+(0.675592435624)*x[1]**o+(0.77480796903)*x[1]
-        arg[0,2,1,1]=(-0.281969675471)*x[0]**o+(-0.250831251067)*x[0]+(0.14396936899)*x[1]**o+(-0.65775670156)*x[1]
-        arg[0,2,2,0]=(0.339204154215)*x[0]**o+(0.125319656279)*x[0]+(0.417557775604)*x[1]**o+(-0.985431777777)*x[1]
-        arg[0,2,2,1]=(-0.655500794874)*x[0]**o+(-0.419889131296)*x[0]+(-0.0763188160723)*x[1]**o+(0.995600932757)*x[1]
-        arg[0,3,0,0]=(-0.483746115201)*x[0]**o+(-0.256632816498)*x[0]+(-0.0533973517656)*x[1]**o+(-0.982541041474)*x[1]
-        arg[0,3,0,1]=(0.446810992304)*x[0]**o+(-0.823523374302)*x[0]+(-0.607238533539)*x[1]**o+(-0.97562384609)*x[1]
-        arg[0,3,1,0]=(-0.0235907627093)*x[0]**o+(-0.0720587626585)*x[0]+(0.930589323947)*x[1]**o+(0.327916365569)*x[1]
-        arg[0,3,1,1]=(0.486342062258)*x[0]**o+(0.430279082913)*x[0]+(0.237445053125)*x[1]**o+(0.577650421809)*x[1]
-        arg[0,3,2,0]=(-0.581025309937)*x[0]**o+(0.97026755344)*x[0]+(0.180505264557)*x[1]**o+(0.289585805796)*x[1]
-        arg[0,3,2,1]=(-0.523356041281)*x[0]**o+(-0.502230606793)*x[0]+(0.915270822508)*x[1]**o+(0.622076448072)*x[1]
-        arg[0,4,0,0]=(-0.584782530121)*x[0]**o+(-0.433761163729)*x[0]+(-0.449731522195)*x[1]**o+(0.392234342377)*x[1]
-        arg[0,4,0,1]=(-0.0724106581167)*x[0]**o+(0.76896002907)*x[0]+(0.0374933582543)*x[1]**o+(-0.417790382045)*x[1]
-        arg[0,4,1,0]=(0.0460360663465)*x[0]**o+(-0.0343116732267)*x[0]+(0.815864788848)*x[1]**o+(-0.922236546574)*x[1]
-        arg[0,4,1,1]=(-0.978584425712)*x[0]**o+(0.249337867126)*x[0]+(-0.822961904166)*x[1]**o+(0.627473480274)*x[1]
-        arg[0,4,2,0]=(-0.267227111945)*x[0]**o+(0.791320996051)*x[0]+(0.721009228711)*x[1]**o+(0.00199546728243)*x[1]
-        arg[0,4,2,1]=(-0.141372777283)*x[0]**o+(-0.996912487736)*x[0]+(0.94281427253)*x[1]**o+(-0.780685413978)*x[1]
-        arg[1,0,0,0]=(-0.721911758033)*x[0]**o+(0.0119756829508)*x[0]+(0.583083015744)*x[1]**o+(0.80826073507)*x[1]
-        arg[1,0,0,1]=(0.929636966638)*x[0]**o+(-0.35107696413)*x[0]+(-0.656523378462)*x[1]**o+(0.610681274197)*x[1]
-        arg[1,0,1,0]=(0.594847872723)*x[0]**o+(-0.15013091781)*x[0]+(-0.562311637909)*x[1]**o+(0.871283992407)*x[1]
-        arg[1,0,1,1]=(0.529274819592)*x[0]**o+(0.998035152453)*x[0]+(-0.265309908189)*x[1]**o+(-0.703391843389)*x[1]
-        arg[1,0,2,0]=(0.2321959905)*x[0]**o+(-0.781602927232)*x[0]+(-0.0509405210126)*x[1]**o+(0.839298348419)*x[1]
-        arg[1,0,2,1]=(0.0811824999287)*x[0]**o+(0.916373714851)*x[0]+(0.817375877796)*x[1]**o+(-0.926274023089)*x[1]
-        arg[1,1,0,0]=(0.418525096774)*x[0]**o+(0.064653235493)*x[0]+(0.15912570069)*x[1]**o+(0.47570489259)*x[1]
-        arg[1,1,0,1]=(0.784138248952)*x[0]**o+(-0.715130508682)*x[0]+(-0.299421222048)*x[1]**o+(-0.816706522916)*x[1]
-        arg[1,1,1,0]=(-0.911449050332)*x[0]**o+(-0.472182975049)*x[0]+(0.935180253062)*x[1]**o+(0.527208406385)*x[1]
-        arg[1,1,1,1]=(-0.378301315644)*x[0]**o+(0.430065353544)*x[0]+(0.827581865806)*x[1]**o+(-0.355263817375)*x[1]
-        arg[1,1,2,0]=(-0.882543004053)*x[0]**o+(0.503794963637)*x[0]+(-0.580086073626)*x[1]**o+(0.545676378283)*x[1]
-        arg[1,1,2,1]=(-0.116197074531)*x[0]**o+(-0.0629871602139)*x[0]+(0.320343551712)*x[1]**o+(0.0552550885696)*x[1]
-        arg[1,2,0,0]=(-0.870347384636)*x[0]**o+(-0.611439594673)*x[0]+(0.707766015783)*x[1]**o+(0.0653036268139)*x[1]
-        arg[1,2,0,1]=(-0.219872666014)*x[0]**o+(-0.435867669656)*x[0]+(0.825489444837)*x[1]**o+(-0.737253859382)*x[1]
-        arg[1,2,1,0]=(-0.963149287055)*x[0]**o+(0.964306345088)*x[0]+(0.502736178959)*x[1]**o+(0.998017404878)*x[1]
-        arg[1,2,1,1]=(-0.586350249194)*x[0]**o+(-0.437455605038)*x[0]+(-0.182719660538)*x[1]**o+(-0.50797820305)*x[1]
-        arg[1,2,2,0]=(-0.423818475166)*x[0]**o+(0.290902418459)*x[0]+(-0.304129806418)*x[1]**o+(-0.67571878331)*x[1]
-        arg[1,2,2,1]=(0.901384945886)*x[0]**o+(0.0526906910209)*x[0]+(0.438755721196)*x[1]**o+(-0.774352941544)*x[1]
-        arg[1,3,0,0]=(-0.797968602257)*x[0]**o+(0.856637297517)*x[0]+(0.427243495756)*x[1]**o+(0.212942988457)*x[1]
-        arg[1,3,0,1]=(-0.696126104381)*x[0]**o+(0.616445534254)*x[0]+(-0.943037028688)*x[1]**o+(0.807265721375)*x[1]
-        arg[1,3,1,0]=(-0.69028368426)*x[0]**o+(-0.652017674488)*x[0]+(-0.772965740874)*x[1]**o+(-0.726830598291)*x[1]
-        arg[1,3,1,1]=(-0.534347181294)*x[0]**o+(-0.861020241321)*x[0]+(-0.250549859157)*x[1]**o+(-0.638289396201)*x[1]
-        arg[1,3,2,0]=(-0.827981962115)*x[0]**o+(-0.427544131008)*x[0]+(-0.516514308221)*x[1]**o+(-0.101906062547)*x[1]
-        arg[1,3,2,1]=(0.864701869194)*x[0]**o+(0.876327129524)*x[0]+(0.806201346091)*x[1]**o+(0.845259832272)*x[1]
-        arg[1,4,0,0]=(-0.589044559231)*x[0]**o+(0.697104039773)*x[0]+(-0.288389617381)*x[1]**o+(0.422618969092)*x[1]
-        arg[1,4,0,1]=(0.814971550967)*x[0]**o+(-0.665151459593)*x[0]+(-0.696145763418)*x[1]**o+(0.906949165457)*x[1]
-        arg[1,4,1,0]=(0.760190450826)*x[0]**o+(-0.883964913626)*x[0]+(-0.507159320061)*x[1]**o+(-0.15707026975)*x[1]
-        arg[1,4,1,1]=(-0.0416603697257)*x[0]**o+(0.560561779164)*x[0]+(0.0153574982122)*x[1]**o+(0.75228872946)*x[1]
-        arg[1,4,2,0]=(0.105929120872)*x[0]**o+(0.130738968719)*x[0]+(-0.0991159921294)*x[1]**o+(0.972627650896)*x[1]
-        arg[1,4,2,1]=(-0.503911541225)*x[0]**o+(-0.00357063650385)*x[0]+(0.377083955928)*x[1]**o+(0.343010153434)*x[1]
-        arg[2,0,0,0]=(0.953733725947)*x[0]**o+(-0.988629842686)*x[0]+(0.196766730386)*x[1]**o+(0.0427993038279)*x[1]
-        arg[2,0,0,1]=(0.491469820597)*x[0]**o+(0.708248604732)*x[0]+(-0.600347310418)*x[1]**o+(-0.0380188651191)*x[1]
-        arg[2,0,1,0]=(0.615118477478)*x[0]**o+(0.832030863133)*x[0]+(0.783037278839)*x[1]**o+(-0.331824170309)*x[1]
-        arg[2,0,1,1]=(-0.806125471265)*x[0]**o+(0.763233458333)*x[0]+(-0.381389710969)*x[1]**o+(0.652974431609)*x[1]
-        arg[2,0,2,0]=(-0.831727679795)*x[0]**o+(0.239296785135)*x[0]+(-0.13737609858)*x[1]**o+(0.583210422723)*x[1]
-        arg[2,0,2,1]=(-0.805843206194)*x[0]**o+(-0.523576669019)*x[0]+(0.159758297984)*x[1]**o+(-0.298308874886)*x[1]
-        arg[2,1,0,0]=(0.589135530105)*x[0]**o+(0.272145879514)*x[0]+(0.325741074892)*x[1]**o+(-0.579782654647)*x[1]
-        arg[2,1,0,1]=(0.106049062774)*x[0]**o+(0.790280056075)*x[0]+(0.0171600098883)*x[1]**o+(-0.419540445094)*x[1]
-        arg[2,1,1,0]=(-0.181511670026)*x[0]**o+(-0.814531462508)*x[0]+(-0.576165158737)*x[1]**o+(0.679678310717)*x[1]
-        arg[2,1,1,1]=(-0.709695453728)*x[0]**o+(-0.489487606257)*x[0]+(-0.424093531654)*x[1]**o+(0.535427169862)*x[1]
-        arg[2,1,2,0]=(0.60069280023)*x[0]**o+(-0.909882731214)*x[0]+(0.640141428017)*x[1]**o+(-0.697396064954)*x[1]
-        arg[2,1,2,1]=(0.896964594562)*x[0]**o+(0.976387328697)*x[0]+(0.144061490066)*x[1]**o+(0.378042869796)*x[1]
-        arg[2,2,0,0]=(0.447633246258)*x[0]**o+(-0.531416367062)*x[0]+(0.199304002742)*x[1]**o+(0.85195706213)*x[1]
-        arg[2,2,0,1]=(-0.683614706554)*x[0]**o+(0.933255565209)*x[0]+(-0.328047392082)*x[1]**o+(-0.0865769137182)*x[1]
-        arg[2,2,1,0]=(0.22474720984)*x[0]**o+(0.0910500178874)*x[0]+(0.449220001922)*x[1]**o+(-0.0406214557829)*x[1]
-        arg[2,2,1,1]=(-0.266419887395)*x[0]**o+(-0.48883285131)*x[0]+(-0.794933934805)*x[1]**o+(0.182439649969)*x[1]
-        arg[2,2,2,0]=(0.949852186215)*x[0]**o+(-0.116121704259)*x[0]+(-0.977131144423)*x[1]**o+(0.698402625747)*x[1]
-        arg[2,2,2,1]=(-0.0446180768654)*x[0]**o+(-0.742263614438)*x[0]+(-0.898675367333)*x[1]**o+(-0.260891146746)*x[1]
-        arg[2,3,0,0]=(0.819774310005)*x[0]**o+(-0.0677371406664)*x[0]+(0.276747165681)*x[1]**o+(-0.42828783)*x[1]
-        arg[2,3,0,1]=(-0.391001671385)*x[0]**o+(0.0558814994728)*x[0]+(-0.624786978129)*x[1]**o+(0.178742280566)*x[1]
-        arg[2,3,1,0]=(0.904597103646)*x[0]**o+(-0.825472271707)*x[0]+(0.112221476422)*x[1]**o+(0.269349199527)*x[1]
-        arg[2,3,1,1]=(-0.190955697638)*x[0]**o+(0.441698994606)*x[0]+(-0.26229840557)*x[1]**o+(0.148974540187)*x[1]
-        arg[2,3,2,0]=(-0.873098622934)*x[0]**o+(-0.624915584376)*x[0]+(-0.151646578512)*x[1]**o+(-0.914878228283)*x[1]
-        arg[2,3,2,1]=(-0.712569947477)*x[0]**o+(-0.72679361801)*x[0]+(-0.0946869166491)*x[1]**o+(-0.580512407933)*x[1]
-        arg[2,4,0,0]=(-0.655752680768)*x[0]**o+(-0.409544975855)*x[0]+(0.865325438086)*x[1]**o+(-0.227397026937)*x[1]
-        arg[2,4,0,1]=(0.670566711209)*x[0]**o+(-0.794343533883)*x[0]+(-0.127116396219)*x[1]**o+(-0.422419866647)*x[1]
-        arg[2,4,1,0]=(0.46903441444)*x[0]**o+(0.0689129759715)*x[0]+(-0.549325647826)*x[1]**o+(0.893700020399)*x[1]
-        arg[2,4,1,1]=(-0.0099246750652)*x[0]**o+(0.446742615509)*x[0]+(0.900251202513)*x[1]**o+(0.221599931055)*x[1]
-        arg[2,4,2,0]=(0.218854380066)*x[0]**o+(0.877849336909)*x[0]+(-0.338211083089)*x[1]**o+(0.746950973063)*x[1]
-        arg[2,4,2,1]=(-0.890762146523)*x[0]**o+(0.439653904008)*x[0]+(0.0802890292215)*x[1]**o+(-0.305233739845)*x[1]
-        arg[3,0,0,0]=(0.284622209957)*x[0]**o+(0.983284338924)*x[0]+(-0.732588048234)*x[1]**o+(0.654066388109)*x[1]
-        arg[3,0,0,1]=(0.379628076244)*x[0]**o+(-0.75362875047)*x[0]+(0.288422119968)*x[1]**o+(0.139197401407)*x[1]
-        arg[3,0,1,0]=(0.0594472092467)*x[0]**o+(-0.391581973307)*x[0]+(-0.898996153568)*x[1]**o+(-2.75165483707e-05)*x[1]
-        arg[3,0,1,1]=(-0.241252797172)*x[0]**o+(-0.87384982932)*x[0]+(0.811628957112)*x[1]**o+(0.0170539509618)*x[1]
-        arg[3,0,2,0]=(0.255617459837)*x[0]**o+(-0.744071491889)*x[0]+(0.745552769828)*x[1]**o+(0.128612266243)*x[1]
-        arg[3,0,2,1]=(0.0725082197254)*x[0]**o+(0.779602587374)*x[0]+(-0.751879287668)*x[1]**o+(0.838360641095)*x[1]
-        arg[3,1,0,0]=(-0.444520674459)*x[0]**o+(-0.811442143542)*x[0]+(-0.485010478999)*x[1]**o+(0.727600464745)*x[1]
-        arg[3,1,0,1]=(0.260061065042)*x[0]**o+(0.932320346965)*x[0]+(0.556377882844)*x[1]**o+(0.284348284894)*x[1]
-        arg[3,1,1,0]=(0.561755002522)*x[0]**o+(-0.842983435746)*x[0]+(0.729209244377)*x[1]**o+(-0.254683846974)*x[1]
-        arg[3,1,1,1]=(-0.949556399673)*x[0]**o+(-0.0804522142379)*x[0]+(0.066141483426)*x[1]**o+(0.78626145966)*x[1]
-        arg[3,1,2,0]=(0.833198651881)*x[0]**o+(-0.297955946153)*x[0]+(-0.561247934789)*x[1]**o+(-0.645124432611)*x[1]
-        arg[3,1,2,1]=(-0.641727656043)*x[0]**o+(0.32981201062)*x[0]+(-0.152588766563)*x[1]**o+(-0.289611460761)*x[1]
-        arg[3,2,0,0]=(0.825643539598)*x[0]**o+(0.924286336436)*x[0]+(0.413089850944)*x[1]**o+(-0.640198886209)*x[1]
-        arg[3,2,0,1]=(0.0855693847128)*x[0]**o+(-0.363881253576)*x[0]+(0.0397854550832)*x[1]**o+(-0.844391996875)*x[1]
-        arg[3,2,1,0]=(-0.8248537795)*x[0]**o+(0.153070857979)*x[0]+(0.970009460355)*x[1]**o+(0.431000028243)*x[1]
-        arg[3,2,1,1]=(-0.978024209918)*x[0]**o+(-0.527494257814)*x[0]+(-0.814691105217)*x[1]**o+(0.458334868681)*x[1]
-        arg[3,2,2,0]=(0.944359157869)*x[0]**o+(-0.868016282191)*x[0]+(0.410849160429)*x[1]**o+(0.480177162607)*x[1]
-        arg[3,2,2,1]=(0.109166287134)*x[0]**o+(0.940100154901)*x[0]+(0.630946061805)*x[1]**o+(0.347160020469)*x[1]
-        arg[3,3,0,0]=(0.364585502975)*x[0]**o+(0.717282598047)*x[0]+(0.517805310585)*x[1]**o+(0.963452728824)*x[1]
-        arg[3,3,0,1]=(0.0373453558524)*x[0]**o+(0.943887402198)*x[0]+(0.983624425071)*x[1]**o+(-0.396242794059)*x[1]
-        arg[3,3,1,0]=(-0.563724031351)*x[0]**o+(0.959753988518)*x[0]+(0.118506885299)*x[1]**o+(-0.587748202342)*x[1]
-        arg[3,3,1,1]=(0.460419807013)*x[0]**o+(0.237753399499)*x[0]+(0.585589833251)*x[1]**o+(0.935177937667)*x[1]
-        arg[3,3,2,0]=(-0.750248086829)*x[0]**o+(-0.561629848994)*x[0]+(-0.919919077536)*x[1]**o+(0.239984179086)*x[1]
-        arg[3,3,2,1]=(-0.0969897163659)*x[0]**o+(0.185433022889)*x[0]+(0.733111631837)*x[1]**o+(-0.508147081928)*x[1]
-        arg[3,4,0,0]=(0.247054568876)*x[0]**o+(0.721751593201)*x[0]+(-0.684740924498)*x[1]**o+(0.28395202476)*x[1]
-        arg[3,4,0,1]=(-0.0949248638736)*x[0]**o+(0.270285273316)*x[0]+(0.850836559464)*x[1]**o+(-0.771085947382)*x[1]
-        arg[3,4,1,0]=(-0.965410502362)*x[0]**o+(-0.582448742001)*x[0]+(-0.90307507827)*x[1]**o+(0.914051445745)*x[1]
-        arg[3,4,1,1]=(0.443340058617)*x[0]**o+(0.434462120769)*x[0]+(0.522015964301)*x[1]**o+(-0.520184389865)*x[1]
-        arg[3,4,2,0]=(-0.961375562593)*x[0]**o+(-0.474630747481)*x[0]+(0.59574636341)*x[1]**o+(0.434190359663)*x[1]
-        arg[3,4,2,1]=(0.174154210501)*x[0]**o+(-0.510858596799)*x[0]+(-0.0279700806065)*x[1]**o+(-0.0401612371912)*x[1]
-        ref[0,0,0,0]=(-0.0352052809673)/(o+1.)+(0.903863789878)+(0.182956096072)*0.5**o
-        ref[0,0,0,1]=(0.0610373691872)/(o+1.)+(-0.306742561603)+(-0.81342189211)*0.5**o
-        ref[0,0,1,0]=(0.623943596759)/(o+1.)+(0.647497589315)+(-0.149103531408)*0.5**o
-        ref[0,0,1,1]=(0.136600247183)/(o+1.)+(0.925469911903)+(0.74912087771)*0.5**o
-        ref[0,0,2,0]=(0.966454801911)/(o+1.)+(0.0631444946098)+(-0.289042694587)*0.5**o
-        ref[0,0,2,1]=(-0.156074498516)/(o+1.)+(0.047955363258)+(0.0809737838902)*0.5**o
-        ref[0,1,0,0]=(-0.016865109839)/(o+1.)+(-0.404214477389)+(0.638822193145)*0.5**o
-        ref[0,1,0,1]=(-0.897448372147)/(o+1.)+(-0.174669987755)+(0.611604473356)*0.5**o
-        ref[0,1,1,0]=(-0.229098133178)/(o+1.)+(0.443671911949)+(-0.745407006471)*0.5**o
-        ref[0,1,1,1]=(0.481206893907)/(o+1.)+(-0.111741539797)+(0.756528549281)*0.5**o
-        ref[0,1,2,0]=(0.367303506039)/(o+1.)+(-0.157755527379)+(0.335544368565)*0.5**o
-        ref[0,1,2,1]=(0.182483888026)/(o+1.)+(-0.157073928893)+(0.669933676654)*0.5**o
-        ref[0,2,0,0]=(0.587675819052)/(o+1.)+(0.446236706377)+(-0.929163949925)*0.5**o
-        ref[0,2,0,1]=(-0.83934259298)/(o+1.)+(-0.344719194607)+(0.639896773528)*0.5**o
-        ref[0,2,1,0]=(0.675592435624)/(o+1.)+(0.81769507347)+(-0.399556357179)*0.5**o
-        ref[0,2,1,1]=(0.14396936899)/(o+1.)+(-0.454293976313)+(-0.281969675471)*0.5**o
-        ref[0,2,2,0]=(0.417557775604)/(o+1.)+(-0.430056060749)+(0.339204154215)*0.5**o
-        ref[0,2,2,1]=(-0.0763188160723)/(o+1.)+(0.28785590073)+(-0.655500794874)*0.5**o
-        ref[0,3,0,0]=(-0.0533973517656)/(o+1.)+(-0.619586928986)+(-0.483746115201)*0.5**o
-        ref[0,3,0,1]=(-0.607238533539)/(o+1.)+(-0.899573610196)+(0.446810992304)*0.5**o
-        ref[0,3,1,0]=(0.930589323947)/(o+1.)+(0.127928801455)+(-0.0235907627093)*0.5**o
-        ref[0,3,1,1]=(0.237445053125)/(o+1.)+(0.503964752361)+(0.486342062258)*0.5**o
-        ref[0,3,2,0]=(0.180505264557)/(o+1.)+(0.629926679618)+(-0.581025309937)*0.5**o
-        ref[0,3,2,1]=(0.915270822508)/(o+1.)+(0.0599229206396)+(-0.523356041281)*0.5**o
-        ref[0,4,0,0]=(-0.449731522195)/(o+1.)+(-0.0207634106763)+(-0.584782530121)*0.5**o
-        ref[0,4,0,1]=(0.0374933582543)/(o+1.)+(0.175584823513)+(-0.0724106581167)*0.5**o
-        ref[0,4,1,0]=(0.815864788848)/(o+1.)+(-0.4782741099)+(0.0460360663465)*0.5**o
-        ref[0,4,1,1]=(-0.822961904166)/(o+1.)+(0.4384056737)+(-0.978584425712)*0.5**o
-        ref[0,4,2,0]=(0.721009228711)/(o+1.)+(0.396658231667)+(-0.267227111945)*0.5**o
-        ref[0,4,2,1]=(0.94281427253)/(o+1.)+(-0.888798950857)+(-0.141372777283)*0.5**o
-        ref[1,0,0,0]=(0.583083015744)/(o+1.)+(0.41011820901)+(-0.721911758033)*0.5**o
-        ref[1,0,0,1]=(-0.656523378462)/(o+1.)+(0.129802155034)+(0.929636966638)*0.5**o
-        ref[1,0,1,0]=(-0.562311637909)/(o+1.)+(0.360576537299)+(0.594847872723)*0.5**o
-        ref[1,0,1,1]=(-0.265309908189)/(o+1.)+(0.147321654532)+(0.529274819592)*0.5**o
-        ref[1,0,2,0]=(-0.0509405210126)/(o+1.)+(0.0288477105933)+(0.2321959905)*0.5**o
-        ref[1,0,2,1]=(0.817375877796)/(o+1.)+(-0.00495015411903)+(0.0811824999287)*0.5**o
-        ref[1,1,0,0]=(0.15912570069)/(o+1.)+(0.270179064041)+(0.418525096774)*0.5**o
-        ref[1,1,0,1]=(-0.299421222048)/(o+1.)+(-0.765918515799)+(0.784138248952)*0.5**o
-        ref[1,1,1,0]=(0.935180253062)/(o+1.)+(0.0275127156677)+(-0.911449050332)*0.5**o
-        ref[1,1,1,1]=(0.827581865806)/(o+1.)+(0.0374007680845)+(-0.378301315644)*0.5**o
-        ref[1,1,2,0]=(-0.580086073626)/(o+1.)+(0.52473567096)+(-0.882543004053)*0.5**o
-        ref[1,1,2,1]=(0.320343551712)/(o+1.)+(-0.00386603582212)+(-0.116197074531)*0.5**o
-        ref[1,2,0,0]=(0.707766015783)/(o+1.)+(-0.273067983929)+(-0.870347384636)*0.5**o
-        ref[1,2,0,1]=(0.825489444837)/(o+1.)+(-0.586560764519)+(-0.219872666014)*0.5**o
-        ref[1,2,1,0]=(0.502736178959)/(o+1.)+(0.981161874983)+(-0.963149287055)*0.5**o
-        ref[1,2,1,1]=(-0.182719660538)/(o+1.)+(-0.472716904044)+(-0.586350249194)*0.5**o
-        ref[1,2,2,0]=(-0.304129806418)/(o+1.)+(-0.192408182425)+(-0.423818475166)*0.5**o
-        ref[1,2,2,1]=(0.438755721196)/(o+1.)+(-0.360831125262)+(0.901384945886)*0.5**o
-        ref[1,3,0,0]=(0.427243495756)/(o+1.)+(0.534790142987)+(-0.797968602257)*0.5**o
-        ref[1,3,0,1]=(-0.943037028688)/(o+1.)+(0.711855627815)+(-0.696126104381)*0.5**o
-        ref[1,3,1,0]=(-0.772965740874)/(o+1.)+(-0.689424136389)+(-0.69028368426)*0.5**o
-        ref[1,3,1,1]=(-0.250549859157)/(o+1.)+(-0.749654818761)+(-0.534347181294)*0.5**o
-        ref[1,3,2,0]=(-0.516514308221)/(o+1.)+(-0.264725096778)+(-0.827981962115)*0.5**o
-        ref[1,3,2,1]=(0.806201346091)/(o+1.)+(0.860793480898)+(0.864701869194)*0.5**o
-        ref[1,4,0,0]=(-0.288389617381)/(o+1.)+(0.559861504432)+(-0.589044559231)*0.5**o
-        ref[1,4,0,1]=(-0.696145763418)/(o+1.)+(0.120898852932)+(0.814971550967)*0.5**o
-        ref[1,4,1,0]=(-0.507159320061)/(o+1.)+(-0.520517591688)+(0.760190450826)*0.5**o
-        ref[1,4,1,1]=(0.0153574982122)/(o+1.)+(0.656425254312)+(-0.0416603697257)*0.5**o
-        ref[1,4,2,0]=(-0.0991159921294)/(o+1.)+(0.551683309807)+(0.105929120872)*0.5**o
-        ref[1,4,2,1]=(0.377083955928)/(o+1.)+(0.169719758465)+(-0.503911541225)*0.5**o
-        ref[2,0,0,0]=(0.196766730386)/(o+1.)+(-0.472915269429)+(0.953733725947)*0.5**o
-        ref[2,0,0,1]=(-0.600347310418)/(o+1.)+(0.335114869806)+(0.491469820597)*0.5**o
-        ref[2,0,1,0]=(0.783037278839)/(o+1.)+(0.250103346412)+(0.615118477478)*0.5**o
-        ref[2,0,1,1]=(-0.381389710969)/(o+1.)+(0.708103944971)+(-0.806125471265)*0.5**o
-        ref[2,0,2,0]=(-0.13737609858)/(o+1.)+(0.411253603929)+(-0.831727679795)*0.5**o
-        ref[2,0,2,1]=(0.159758297984)/(o+1.)+(-0.410942771953)+(-0.805843206194)*0.5**o
-        ref[2,1,0,0]=(0.325741074892)/(o+1.)+(-0.153818387566)+(0.589135530105)*0.5**o
-        ref[2,1,0,1]=(0.0171600098883)/(o+1.)+(0.185369805491)+(0.106049062774)*0.5**o
-        ref[2,1,1,0]=(-0.576165158737)/(o+1.)+(-0.0674265758955)+(-0.181511670026)*0.5**o
-        ref[2,1,1,1]=(-0.424093531654)/(o+1.)+(0.0229697818029)+(-0.709695453728)*0.5**o
-        ref[2,1,2,0]=(0.640141428017)/(o+1.)+(-0.803639398084)+(0.60069280023)*0.5**o
-        ref[2,1,2,1]=(0.144061490066)/(o+1.)+(0.677215099246)+(0.896964594562)*0.5**o
-        ref[2,2,0,0]=(0.199304002742)/(o+1.)+(0.160270347534)+(0.447633246258)*0.5**o
-        ref[2,2,0,1]=(-0.328047392082)/(o+1.)+(0.423339325745)+(-0.683614706554)*0.5**o
-        ref[2,2,1,0]=(0.449220001922)/(o+1.)+(0.0252142810523)+(0.22474720984)*0.5**o
-        ref[2,2,1,1]=(-0.794933934805)/(o+1.)+(-0.153196600671)+(-0.266419887395)*0.5**o
-        ref[2,2,2,0]=(-0.977131144423)/(o+1.)+(0.291140460744)+(0.949852186215)*0.5**o
-        ref[2,2,2,1]=(-0.898675367333)/(o+1.)+(-0.501577380592)+(-0.0446180768654)*0.5**o
-        ref[2,3,0,0]=(0.276747165681)/(o+1.)+(-0.248012485333)+(0.819774310005)*0.5**o
-        ref[2,3,0,1]=(-0.624786978129)/(o+1.)+(0.11731189002)+(-0.391001671385)*0.5**o
-        ref[2,3,1,0]=(0.112221476422)/(o+1.)+(-0.27806153609)+(0.904597103646)*0.5**o
-        ref[2,3,1,1]=(-0.26229840557)/(o+1.)+(0.295336767397)+(-0.190955697638)*0.5**o
-        ref[2,3,2,0]=(-0.151646578512)/(o+1.)+(-0.76989690633)+(-0.873098622934)*0.5**o
-        ref[2,3,2,1]=(-0.0946869166491)/(o+1.)+(-0.653653012971)+(-0.712569947477)*0.5**o
-        ref[2,4,0,0]=(0.865325438086)/(o+1.)+(-0.318471001396)+(-0.655752680768)*0.5**o
-        ref[2,4,0,1]=(-0.127116396219)/(o+1.)+(-0.608381700265)+(0.670566711209)*0.5**o
-        ref[2,4,1,0]=(-0.549325647826)/(o+1.)+(0.481306498185)+(0.46903441444)*0.5**o
-        ref[2,4,1,1]=(0.900251202513)/(o+1.)+(0.334171273282)+(-0.0099246750652)*0.5**o
-        ref[2,4,2,0]=(-0.338211083089)/(o+1.)+(0.812400154986)+(0.218854380066)*0.5**o
-        ref[2,4,2,1]=(0.0802890292215)/(o+1.)+(0.0672100820814)+(-0.890762146523)*0.5**o
-        ref[3,0,0,0]=(-0.732588048234)/(o+1.)+(0.818675363516)+(0.284622209957)*0.5**o
-        ref[3,0,0,1]=(0.288422119968)/(o+1.)+(-0.307215674532)+(0.379628076244)*0.5**o
-        ref[3,0,1,0]=(-0.898996153568)/(o+1.)+(-0.195804744928)+(0.0594472092467)*0.5**o
-        ref[3,0,1,1]=(0.811628957112)/(o+1.)+(-0.428397939179)+(-0.241252797172)*0.5**o
-        ref[3,0,2,0]=(0.745552769828)/(o+1.)+(-0.307729612823)+(0.255617459837)*0.5**o
-        ref[3,0,2,1]=(-0.751879287668)/(o+1.)+(0.808981614234)+(0.0725082197254)*0.5**o
-        ref[3,1,0,0]=(-0.485010478999)/(o+1.)+(-0.0419208393982)+(-0.444520674459)*0.5**o
-        ref[3,1,0,1]=(0.556377882844)/(o+1.)+(0.60833431593)+(0.260061065042)*0.5**o
-        ref[3,1,1,0]=(0.729209244377)/(o+1.)+(-0.54883364136)+(0.561755002522)*0.5**o
-        ref[3,1,1,1]=(0.066141483426)/(o+1.)+(0.352904622711)+(-0.949556399673)*0.5**o
-        ref[3,1,2,0]=(-0.561247934789)/(o+1.)+(-0.471540189382)+(0.833198651881)*0.5**o
-        ref[3,1,2,1]=(-0.152588766563)/(o+1.)+(0.0201002749295)+(-0.641727656043)*0.5**o
-        ref[3,2,0,0]=(0.413089850944)/(o+1.)+(0.142043725114)+(0.825643539598)*0.5**o
-        ref[3,2,0,1]=(0.0397854550832)/(o+1.)+(-0.604136625225)+(0.0855693847128)*0.5**o
-        ref[3,2,1,0]=(0.970009460355)/(o+1.)+(0.292035443111)+(-0.8248537795)*0.5**o
-        ref[3,2,1,1]=(-0.814691105217)/(o+1.)+(-0.0345796945668)+(-0.978024209918)*0.5**o
-        ref[3,2,2,0]=(0.410849160429)/(o+1.)+(-0.193919559792)+(0.944359157869)*0.5**o
-        ref[3,2,2,1]=(0.630946061805)/(o+1.)+(0.643630087685)+(0.109166287134)*0.5**o
-        ref[3,3,0,0]=(0.517805310585)/(o+1.)+(0.840367663435)+(0.364585502975)*0.5**o
-        ref[3,3,0,1]=(0.983624425071)/(o+1.)+(0.273822304069)+(0.0373453558524)*0.5**o
-        ref[3,3,1,0]=(0.118506885299)/(o+1.)+(0.186002893088)+(-0.563724031351)*0.5**o
-        ref[3,3,1,1]=(0.585589833251)/(o+1.)+(0.586465668583)+(0.460419807013)*0.5**o
-        ref[3,3,2,0]=(-0.919919077536)/(o+1.)+(-0.160822834954)+(-0.750248086829)*0.5**o
-        ref[3,3,2,1]=(0.733111631837)/(o+1.)+(-0.161357029519)+(-0.0969897163659)*0.5**o
-        ref[3,4,0,0]=(-0.684740924498)/(o+1.)+(0.50285180898)+(0.247054568876)*0.5**o
-        ref[3,4,0,1]=(0.850836559464)/(o+1.)+(-0.250400337033)+(-0.0949248638736)*0.5**o
-        ref[3,4,1,0]=(-0.90307507827)/(o+1.)+(0.165801351872)+(-0.965410502362)*0.5**o
-        ref[3,4,1,1]=(0.522015964301)/(o+1.)+(-0.0428611345479)+(0.443340058617)*0.5**o
-        ref[3,4,2,0]=(0.59574636341)/(o+1.)+(-0.0202201939092)+(-0.961375562593)*0.5**o
-        ref[3,4,2,1]=(-0.0279700806065)/(o+1.)+(-0.275509916995)+(0.174154210501)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.793251694335)*x[0]**o+(0.616970271582)*x[0]+(-0.805609243189)*x[1]**o+(0.949515692474)*x[1]+(0.484069738431)*x[2]**o+(-0.0407533911672)*x[2]
-        arg[0,0,0,1]=(-0.624206604764)*x[0]**o+(-0.992961148702)*x[0]+(-0.737741763879)*x[1]**o+(0.161544434398)*x[1]+(0.47292947772)*x[2]**o+(0.525538846945)*x[2]
-        arg[0,0,1,0]=(0.115999561481)*x[0]**o+(-0.612694096044)*x[0]+(0.625539443386)*x[1]**o+(0.857353715882)*x[1]+(-0.0811256709155)*x[2]**o+(0.183474706394)*x[2]
-        arg[0,0,1,1]=(-0.972466831671)*x[0]**o+(0.262980887655)*x[0]+(0.920924576059)*x[1]**o+(0.983517658667)*x[1]+(0.579443973505)*x[2]**o+(0.101139612823)*x[2]
-        arg[0,0,2,0]=(0.708180260094)*x[0]**o+(-0.0950913766285)*x[0]+(0.361602191798)*x[1]**o+(-0.880757848201)*x[1]+(0.326272205058)*x[2]**o+(-0.997155694972)*x[2]
-        arg[0,0,2,1]=(0.0282615573045)*x[0]**o+(-0.317851994728)*x[0]+(0.449330147388)*x[1]**o+(-0.156946318079)*x[1]+(0.344196894245)*x[2]**o+(-0.045082290904)*x[2]
-        arg[0,1,0,0]=(0.231621820235)*x[0]**o+(0.0985804817846)*x[0]+(-0.343623333022)*x[1]**o+(0.115043475441)*x[1]+(-0.910742772023)*x[2]**o+(-0.663592068553)*x[2]
-        arg[0,1,0,1]=(0.114056801155)*x[0]**o+(-0.463711315494)*x[0]+(0.380521147429)*x[1]**o+(0.294823684238)*x[1]+(0.510501672453)*x[2]**o+(-0.161234251875)*x[2]
-        arg[0,1,1,0]=(-0.973115195017)*x[0]**o+(-0.0133290715609)*x[0]+(-0.642072931588)*x[1]**o+(-0.580655605735)*x[1]+(-0.191371539061)*x[2]**o+(-0.0513051439064)*x[2]
-        arg[0,1,1,1]=(-0.304758579369)*x[0]**o+(-0.321904612871)*x[0]+(-0.389525877547)*x[1]**o+(-0.0602638359252)*x[1]+(0.199726168523)*x[2]**o+(-0.10313327614)*x[2]
-        arg[0,1,2,0]=(0.0923844967157)*x[0]**o+(-0.369319307184)*x[0]+(-0.614761123101)*x[1]**o+(0.78817430449)*x[1]+(-0.783809995839)*x[2]**o+(-0.701522582246)*x[2]
-        arg[0,1,2,1]=(0.793568921835)*x[0]**o+(0.352244892726)*x[0]+(0.185546719529)*x[1]**o+(0.145969792058)*x[1]+(0.85147546253)*x[2]**o+(-0.862069843156)*x[2]
-        arg[0,2,0,0]=(0.570673248048)*x[0]**o+(0.607924942767)*x[0]+(-0.353952625913)*x[1]**o+(0.111796842318)*x[1]+(-0.765670542263)*x[2]**o+(0.589532724922)*x[2]
-        arg[0,2,0,1]=(0.299061155215)*x[0]**o+(-0.542978954882)*x[0]+(0.0946151623892)*x[1]**o+(0.310266302534)*x[1]+(-0.00880229885823)*x[2]**o+(0.585508874849)*x[2]
-        arg[0,2,1,0]=(0.694725244159)*x[0]**o+(0.530004132186)*x[0]+(-0.32588478629)*x[1]**o+(0.357278329148)*x[1]+(-0.93877612203)*x[2]**o+(0.34973013935)*x[2]
-        arg[0,2,1,1]=(-0.83896527178)*x[0]**o+(0.487231460025)*x[0]+(0.493952010418)*x[1]**o+(0.247442509692)*x[1]+(-0.312456515075)*x[2]**o+(0.90248200924)*x[2]
-        arg[0,2,2,0]=(0.2228052704)*x[0]**o+(0.901373696962)*x[0]+(0.149826948427)*x[1]**o+(0.234013159005)*x[1]+(0.717685535862)*x[2]**o+(-0.42865545543)*x[2]
-        arg[0,2,2,1]=(0.63141216243)*x[0]**o+(0.448446314659)*x[0]+(0.379625538779)*x[1]**o+(-0.807448154272)*x[1]+(0.238724835223)*x[2]**o+(-0.478216911196)*x[2]
-        arg[0,3,0,0]=(0.00698107166168)*x[0]**o+(-0.727207190747)*x[0]+(-0.78731647832)*x[1]**o+(0.885371753974)*x[1]+(-0.0146821479126)*x[2]**o+(-0.763310617205)*x[2]
-        arg[0,3,0,1]=(0.243423742325)*x[0]**o+(0.0587322175837)*x[0]+(-0.453213790216)*x[1]**o+(0.861270481703)*x[1]+(0.867332526083)*x[2]**o+(-0.713187214416)*x[2]
-        arg[0,3,1,0]=(-0.106629554393)*x[0]**o+(0.723693136654)*x[0]+(-0.0276604293602)*x[1]**o+(0.339456904686)*x[1]+(-0.102075459215)*x[2]**o+(-0.0348969356596)*x[2]
-        arg[0,3,1,1]=(0.375143733111)*x[0]**o+(-0.490781234413)*x[0]+(0.168903339622)*x[1]**o+(0.594080859808)*x[1]+(-0.0802336915361)*x[2]**o+(0.472348979787)*x[2]
-        arg[0,3,2,0]=(0.955685455438)*x[0]**o+(0.105142628533)*x[0]+(-0.446384800971)*x[1]**o+(-0.905998305229)*x[1]+(-0.30011637186)*x[2]**o+(0.0218195326037)*x[2]
-        arg[0,3,2,1]=(0.353654445481)*x[0]**o+(-0.0477024594709)*x[0]+(-0.495075817497)*x[1]**o+(-0.425091398447)*x[1]+(-0.571207600446)*x[2]**o+(0.177935012163)*x[2]
-        arg[0,4,0,0]=(0.974759684151)*x[0]**o+(-0.876975976179)*x[0]+(-0.472336406836)*x[1]**o+(0.991410874408)*x[1]+(0.297823444758)*x[2]**o+(-0.161436760659)*x[2]
-        arg[0,4,0,1]=(-0.0799922241539)*x[0]**o+(0.975369691404)*x[0]+(0.302361880712)*x[1]**o+(0.171779641966)*x[1]+(0.878428630413)*x[2]**o+(0.814497247319)*x[2]
-        arg[0,4,1,0]=(0.532633280629)*x[0]**o+(0.902436316468)*x[0]+(-0.676910177358)*x[1]**o+(-0.986029752926)*x[1]+(-0.519990783496)*x[2]**o+(0.430468215617)*x[2]
-        arg[0,4,1,1]=(-0.353243658293)*x[0]**o+(-0.908938062877)*x[0]+(0.922933758125)*x[1]**o+(0.00500161721147)*x[1]+(0.189861558609)*x[2]**o+(-0.623307494462)*x[2]
-        arg[0,4,2,0]=(-0.720840869801)*x[0]**o+(0.0349736577597)*x[0]+(-0.516608060915)*x[1]**o+(0.688756843577)*x[1]+(-0.302494303699)*x[2]**o+(-0.0703783111937)*x[2]
-        arg[0,4,2,1]=(-0.179073400214)*x[0]**o+(0.128485402427)*x[0]+(-0.726789308786)*x[1]**o+(-0.691163482057)*x[1]+(0.329009412577)*x[2]**o+(-0.79293394396)*x[2]
-        arg[1,0,0,0]=(-0.384011553333)*x[0]**o+(0.285271264922)*x[0]+(0.512105930181)*x[1]**o+(0.190321101872)*x[1]+(-0.509334982029)*x[2]**o+(0.128097742502)*x[2]
-        arg[1,0,0,1]=(-0.808211570649)*x[0]**o+(-0.730450956462)*x[0]+(0.92309757237)*x[1]**o+(-0.703749565272)*x[1]+(0.301129716544)*x[2]**o+(0.244379489105)*x[2]
-        arg[1,0,1,0]=(0.0404274840294)*x[0]**o+(-0.483903392253)*x[0]+(0.73680959705)*x[1]**o+(0.190850758522)*x[1]+(0.133136432605)*x[2]**o+(0.910055186498)*x[2]
-        arg[1,0,1,1]=(0.302394139901)*x[0]**o+(0.802524687002)*x[0]+(0.970871728408)*x[1]**o+(0.207348092291)*x[1]+(0.666310912781)*x[2]**o+(0.510392805767)*x[2]
-        arg[1,0,2,0]=(-0.981981997649)*x[0]**o+(-0.465269233707)*x[0]+(0.916146418639)*x[1]**o+(0.143602438774)*x[1]+(-0.947874263512)*x[2]**o+(0.0840394012229)*x[2]
-        arg[1,0,2,1]=(-0.237479805943)*x[0]**o+(-0.89993757244)*x[0]+(-0.759650487895)*x[1]**o+(-0.807139164373)*x[1]+(-0.377055204014)*x[2]**o+(-0.57656201026)*x[2]
-        arg[1,1,0,0]=(-0.543719871098)*x[0]**o+(-0.726308160246)*x[0]+(0.821244616742)*x[1]**o+(0.718112961487)*x[1]+(-0.655445553192)*x[2]**o+(-0.599104608292)*x[2]
-        arg[1,1,0,1]=(-0.2624625471)*x[0]**o+(0.85250071151)*x[0]+(-0.665066081561)*x[1]**o+(-0.566502138196)*x[1]+(-0.572858653628)*x[2]**o+(-0.862890633323)*x[2]
-        arg[1,1,1,0]=(0.88003513115)*x[0]**o+(-0.0150959972442)*x[0]+(-0.698880737368)*x[1]**o+(-0.236909810427)*x[1]+(-0.721315930706)*x[2]**o+(-0.219894530829)*x[2]
-        arg[1,1,1,1]=(0.177746615088)*x[0]**o+(0.205790814183)*x[0]+(-0.216021190604)*x[1]**o+(0.384079010991)*x[1]+(0.61634008905)*x[2]**o+(0.940900776108)*x[2]
-        arg[1,1,2,0]=(0.889070121473)*x[0]**o+(0.68131533527)*x[0]+(0.709207182081)*x[1]**o+(-0.765184991252)*x[1]+(0.506328018952)*x[2]**o+(-0.46041174473)*x[2]
-        arg[1,1,2,1]=(0.951736215954)*x[0]**o+(-0.147499702642)*x[0]+(0.60348358384)*x[1]**o+(0.777404433567)*x[1]+(-0.482441452679)*x[2]**o+(0.714835256434)*x[2]
-        arg[1,2,0,0]=(-0.954701036263)*x[0]**o+(-0.360901887475)*x[0]+(-0.644285028623)*x[1]**o+(0.169271524632)*x[1]+(-0.687047203668)*x[2]**o+(0.205115312108)*x[2]
-        arg[1,2,0,1]=(0.256489282842)*x[0]**o+(0.17406448362)*x[0]+(0.97500243816)*x[1]**o+(0.614577997602)*x[1]+(0.0537536804583)*x[2]**o+(-0.211963274032)*x[2]
-        arg[1,2,1,0]=(-0.94015914517)*x[0]**o+(0.169982490736)*x[0]+(0.482085495724)*x[1]**o+(-0.556994404153)*x[1]+(-0.809311296883)*x[2]**o+(0.719907503024)*x[2]
-        arg[1,2,1,1]=(0.367156421931)*x[0]**o+(0.489648825153)*x[0]+(-0.0398225517816)*x[1]**o+(-0.495726296032)*x[1]+(0.359374061053)*x[2]**o+(0.231991952482)*x[2]
-        arg[1,2,2,0]=(-0.812516694781)*x[0]**o+(-0.631181257391)*x[0]+(-0.723784471687)*x[1]**o+(0.178976877342)*x[1]+(-0.629293758013)*x[2]**o+(-0.313897724608)*x[2]
-        arg[1,2,2,1]=(-0.497461944186)*x[0]**o+(0.268998525103)*x[0]+(-0.478017492026)*x[1]**o+(0.026395792841)*x[1]+(0.581256386137)*x[2]**o+(-0.476961644324)*x[2]
-        arg[1,3,0,0]=(-0.227077550639)*x[0]**o+(0.400407424161)*x[0]+(-0.53529812303)*x[1]**o+(-0.418594299853)*x[1]+(-0.195190916346)*x[2]**o+(-0.624284483774)*x[2]
-        arg[1,3,0,1]=(0.822091021645)*x[0]**o+(-0.31133140026)*x[0]+(0.0665130965049)*x[1]**o+(0.596697216047)*x[1]+(0.466195828646)*x[2]**o+(-0.477988391299)*x[2]
-        arg[1,3,1,0]=(-0.0341577310045)*x[0]**o+(-0.77936644392)*x[0]+(0.954811382784)*x[1]**o+(0.837374830631)*x[1]+(0.738992234768)*x[2]**o+(-0.501187788985)*x[2]
-        arg[1,3,1,1]=(-0.102867224088)*x[0]**o+(0.00829793194765)*x[0]+(0.081790556957)*x[1]**o+(-0.779351210472)*x[1]+(-0.735321115716)*x[2]**o+(0.126919542418)*x[2]
-        arg[1,3,2,0]=(0.556301076488)*x[0]**o+(0.0923434629749)*x[0]+(-0.191048735713)*x[1]**o+(-0.218833028687)*x[1]+(-0.088867516146)*x[2]**o+(-0.247214200389)*x[2]
-        arg[1,3,2,1]=(0.888436531887)*x[0]**o+(-0.79225495914)*x[0]+(0.0154788262219)*x[1]**o+(-0.210622890864)*x[1]+(0.782629134632)*x[2]**o+(0.350772185791)*x[2]
-        arg[1,4,0,0]=(0.651898073685)*x[0]**o+(-0.84098616689)*x[0]+(0.674088959443)*x[1]**o+(-0.658824952898)*x[1]+(-0.423551541558)*x[2]**o+(0.985098530356)*x[2]
-        arg[1,4,0,1]=(-0.149187282052)*x[0]**o+(0.0880370482988)*x[0]+(0.780809276595)*x[1]**o+(-0.610833366472)*x[1]+(0.794946384304)*x[2]**o+(-0.817031796429)*x[2]
-        arg[1,4,1,0]=(-0.285938055108)*x[0]**o+(-0.106165154734)*x[0]+(-0.948376845189)*x[1]**o+(0.874607682056)*x[1]+(-0.100051825909)*x[2]**o+(-0.483640835026)*x[2]
-        arg[1,4,1,1]=(-0.34015136472)*x[0]**o+(0.991331180352)*x[0]+(-0.925796518928)*x[1]**o+(-0.872775691287)*x[1]+(0.953898056819)*x[2]**o+(0.985025365955)*x[2]
-        arg[1,4,2,0]=(-0.464687865356)*x[0]**o+(-0.439271850879)*x[0]+(0.302716649876)*x[1]**o+(0.235186289965)*x[1]+(0.672062761925)*x[2]**o+(-0.793689262392)*x[2]
-        arg[1,4,2,1]=(-0.777967458564)*x[0]**o+(0.0565891925223)*x[0]+(-0.27539733623)*x[1]**o+(0.252329868046)*x[1]+(-0.269529792944)*x[2]**o+(-0.953051723483)*x[2]
-        arg[2,0,0,0]=(0.665321754689)*x[0]**o+(0.00639681939987)*x[0]+(0.262193891905)*x[1]**o+(-0.312800735151)*x[1]+(0.8403244871)*x[2]**o+(-0.607084328204)*x[2]
-        arg[2,0,0,1]=(0.876435018569)*x[0]**o+(-0.388250784543)*x[0]+(-0.799866349878)*x[1]**o+(0.114896594902)*x[1]+(-0.438064877186)*x[2]**o+(-0.458871344685)*x[2]
-        arg[2,0,1,0]=(-0.344552466761)*x[0]**o+(0.967217640605)*x[0]+(-0.00183230845245)*x[1]**o+(-0.861206591247)*x[1]+(0.795588257851)*x[2]**o+(-0.333607767932)*x[2]
-        arg[2,0,1,1]=(0.841069648591)*x[0]**o+(0.580162460873)*x[0]+(-0.0277035983747)*x[1]**o+(-0.404616536792)*x[1]+(-0.403195438454)*x[2]**o+(-0.202877947947)*x[2]
-        arg[2,0,2,0]=(0.192691357169)*x[0]**o+(-0.519968251714)*x[0]+(-0.575397578091)*x[1]**o+(-0.029378989829)*x[1]+(-0.958861195684)*x[2]**o+(0.848705509543)*x[2]
-        arg[2,0,2,1]=(0.556616365284)*x[0]**o+(0.679993071506)*x[0]+(-0.800652717274)*x[1]**o+(0.979182847258)*x[1]+(-0.501953582042)*x[2]**o+(0.127003985335)*x[2]
-        arg[2,1,0,0]=(0.947750123445)*x[0]**o+(-0.0350691553359)*x[0]+(0.0650485999092)*x[1]**o+(-0.131216537555)*x[1]+(0.888782559831)*x[2]**o+(0.0338703818654)*x[2]
-        arg[2,1,0,1]=(0.962918564559)*x[0]**o+(-0.119367421389)*x[0]+(0.43003549616)*x[1]**o+(-0.097883763913)*x[1]+(0.230422206305)*x[2]**o+(0.187273479711)*x[2]
-        arg[2,1,1,0]=(-0.549909211973)*x[0]**o+(0.263443098451)*x[0]+(-0.476703606205)*x[1]**o+(0.216159301182)*x[1]+(-0.561829938323)*x[2]**o+(0.943016557203)*x[2]
-        arg[2,1,1,1]=(0.382867749635)*x[0]**o+(0.404317006935)*x[0]+(0.786117847428)*x[1]**o+(-0.80719258612)*x[1]+(0.471144889777)*x[2]**o+(0.6478813349)*x[2]
-        arg[2,1,2,0]=(0.355742024596)*x[0]**o+(-0.728812391059)*x[0]+(0.766039604734)*x[1]**o+(-0.532629598363)*x[1]+(-0.518284303077)*x[2]**o+(-0.972348067947)*x[2]
-        arg[2,1,2,1]=(-0.882334243081)*x[0]**o+(-0.0940633993231)*x[0]+(-0.00166643832426)*x[1]**o+(-0.971243725495)*x[1]+(-0.0422614083707)*x[2]**o+(-0.547881520447)*x[2]
-        arg[2,2,0,0]=(0.372164678051)*x[0]**o+(-0.0644361811234)*x[0]+(0.886078780084)*x[1]**o+(-0.459054628604)*x[1]+(-0.983880547097)*x[2]**o+(-0.669749873181)*x[2]
-        arg[2,2,0,1]=(0.126650330827)*x[0]**o+(0.375111974063)*x[0]+(-0.759797654917)*x[1]**o+(-0.663216091322)*x[1]+(-0.683191373782)*x[2]**o+(-0.607048449469)*x[2]
-        arg[2,2,1,0]=(-0.805920040628)*x[0]**o+(-0.0144685877057)*x[0]+(0.00875222056291)*x[1]**o+(-0.110000267929)*x[1]+(-0.478201664476)*x[2]**o+(-0.0537439708493)*x[2]
-        arg[2,2,1,1]=(-0.550624517803)*x[0]**o+(0.570407090431)*x[0]+(0.661026826148)*x[1]**o+(0.905189813242)*x[1]+(0.00707531661352)*x[2]**o+(0.711072343064)*x[2]
-        arg[2,2,2,0]=(-0.644276976064)*x[0]**o+(-0.151665972531)*x[0]+(-0.645369927259)*x[1]**o+(0.915967227715)*x[1]+(-0.211750817665)*x[2]**o+(-0.596646212118)*x[2]
-        arg[2,2,2,1]=(0.564688999107)*x[0]**o+(0.635094410913)*x[0]+(0.281863287848)*x[1]**o+(-0.927529659408)*x[1]+(0.581071087484)*x[2]**o+(0.164399277305)*x[2]
-        arg[2,3,0,0]=(0.64754765253)*x[0]**o+(0.176693707964)*x[0]+(0.172801737347)*x[1]**o+(-0.769408746261)*x[1]+(-0.176026486601)*x[2]**o+(0.187304474822)*x[2]
-        arg[2,3,0,1]=(0.365315558093)*x[0]**o+(0.888853264239)*x[0]+(0.0541759434362)*x[1]**o+(0.241489226711)*x[1]+(0.441822201832)*x[2]**o+(0.075541840076)*x[2]
-        arg[2,3,1,0]=(-0.984940830356)*x[0]**o+(0.521596714942)*x[0]+(-0.933671223761)*x[1]**o+(-0.132907654205)*x[1]+(-0.225804727932)*x[2]**o+(0.987334445626)*x[2]
-        arg[2,3,1,1]=(-0.785516613303)*x[0]**o+(0.0324126413814)*x[0]+(-0.084233004699)*x[1]**o+(0.45131442059)*x[1]+(0.36498759129)*x[2]**o+(0.417036982561)*x[2]
-        arg[2,3,2,0]=(-0.310575473358)*x[0]**o+(-0.769219454218)*x[0]+(-0.263431454577)*x[1]**o+(0.474143448264)*x[1]+(-0.490633240671)*x[2]**o+(0.435609988849)*x[2]
-        arg[2,3,2,1]=(0.230960030802)*x[0]**o+(-0.480593443732)*x[0]+(0.547888534735)*x[1]**o+(-0.818842709599)*x[1]+(-0.857141410253)*x[2]**o+(-0.287898487847)*x[2]
-        arg[2,4,0,0]=(-0.811008715357)*x[0]**o+(-0.608505768579)*x[0]+(-0.117642307757)*x[1]**o+(-0.658229045784)*x[1]+(0.246542958193)*x[2]**o+(-0.42783248265)*x[2]
-        arg[2,4,0,1]=(0.817994599948)*x[0]**o+(0.394931907893)*x[0]+(-0.273993145403)*x[1]**o+(0.9572397013)*x[1]+(0.101025833331)*x[2]**o+(-0.925874548613)*x[2]
-        arg[2,4,1,0]=(-0.626152000269)*x[0]**o+(0.821322294557)*x[0]+(0.543761841392)*x[1]**o+(0.112341361443)*x[1]+(-0.395657376418)*x[2]**o+(0.815481187683)*x[2]
-        arg[2,4,1,1]=(0.97134483493)*x[0]**o+(0.303341541402)*x[0]+(-0.270102237344)*x[1]**o+(-0.982452271352)*x[1]+(0.435568243011)*x[2]**o+(-0.200051496445)*x[2]
-        arg[2,4,2,0]=(-0.827528679064)*x[0]**o+(-0.559447627475)*x[0]+(-0.867397899368)*x[1]**o+(0.915539157819)*x[1]+(0.370118757042)*x[2]**o+(0.578366179408)*x[2]
-        arg[2,4,2,1]=(0.685882920875)*x[0]**o+(0.830016468585)*x[0]+(-0.603607199824)*x[1]**o+(0.888619939961)*x[1]+(-0.264173896988)*x[2]**o+(-0.588065135532)*x[2]
-        arg[3,0,0,0]=(0.480000662344)*x[0]**o+(-0.240072007989)*x[0]+(0.252669294205)*x[1]**o+(-0.657466732916)*x[1]+(0.945149322572)*x[2]**o+(0.340592627149)*x[2]
-        arg[3,0,0,1]=(-0.819956304014)*x[0]**o+(0.910408628621)*x[0]+(-0.875714560314)*x[1]**o+(0.653323198674)*x[1]+(0.910127896386)*x[2]**o+(0.21382952806)*x[2]
-        arg[3,0,1,0]=(0.736655857249)*x[0]**o+(-0.982636511328)*x[0]+(0.747965385081)*x[1]**o+(-0.952056699676)*x[1]+(0.143168283422)*x[2]**o+(0.891386576579)*x[2]
-        arg[3,0,1,1]=(0.615723453617)*x[0]**o+(0.57376968582)*x[0]+(0.766802940979)*x[1]**o+(-0.294849095727)*x[1]+(-0.26718123792)*x[2]**o+(-0.979175148343)*x[2]
-        arg[3,0,2,0]=(-0.299975789693)*x[0]**o+(-0.941879795797)*x[0]+(-0.332633604206)*x[1]**o+(0.887589360228)*x[1]+(0.570321438438)*x[2]**o+(0.107180499249)*x[2]
-        arg[3,0,2,1]=(-0.77479605873)*x[0]**o+(0.928359807986)*x[0]+(-0.144170026638)*x[1]**o+(0.533835316696)*x[1]+(0.183938136052)*x[2]**o+(-0.87336340483)*x[2]
-        arg[3,1,0,0]=(-0.121858163593)*x[0]**o+(-0.971122306623)*x[0]+(-0.351891554168)*x[1]**o+(-0.989754547278)*x[1]+(0.48106592456)*x[2]**o+(0.750009716044)*x[2]
-        arg[3,1,0,1]=(-0.332320017719)*x[0]**o+(0.229814969323)*x[0]+(0.950038106614)*x[1]**o+(-0.364221636516)*x[1]+(-0.842684764717)*x[2]**o+(-0.430003876831)*x[2]
-        arg[3,1,1,0]=(0.1036461168)*x[0]**o+(0.243047542195)*x[0]+(-0.189881740385)*x[1]**o+(-0.646948186795)*x[1]+(-0.246523431838)*x[2]**o+(0.0363222140239)*x[2]
-        arg[3,1,1,1]=(0.629747493968)*x[0]**o+(0.257110968013)*x[0]+(-0.594332699815)*x[1]**o+(-0.74041867705)*x[1]+(0.656583120031)*x[2]**o+(0.392776534802)*x[2]
-        arg[3,1,2,0]=(0.997368307137)*x[0]**o+(-0.709004475665)*x[0]+(-0.379447862403)*x[1]**o+(-0.368700793823)*x[1]+(0.293673648471)*x[2]**o+(-0.555545691082)*x[2]
-        arg[3,1,2,1]=(-0.323027033928)*x[0]**o+(0.804640557762)*x[0]+(-0.199434780533)*x[1]**o+(0.604194682736)*x[1]+(0.945516011113)*x[2]**o+(-0.831838977373)*x[2]
-        arg[3,2,0,0]=(0.255071922458)*x[0]**o+(0.261075290259)*x[0]+(0.198792431961)*x[1]**o+(0.987681568369)*x[1]+(-0.257626079249)*x[2]**o+(0.817801578613)*x[2]
-        arg[3,2,0,1]=(-0.732615916833)*x[0]**o+(0.8114347023)*x[0]+(0.308896981216)*x[1]**o+(-0.164981244979)*x[1]+(0.724411853266)*x[2]**o+(-0.647969863039)*x[2]
-        arg[3,2,1,0]=(0.126755528121)*x[0]**o+(0.0203968097627)*x[0]+(0.350888385037)*x[1]**o+(0.765584878761)*x[1]+(0.43521215637)*x[2]**o+(0.5821821143)*x[2]
-        arg[3,2,1,1]=(0.795956472753)*x[0]**o+(0.363631111688)*x[0]+(-0.296417527594)*x[1]**o+(-0.0927953540926)*x[1]+(0.396041397741)*x[2]**o+(0.43932000066)*x[2]
-        arg[3,2,2,0]=(-0.926754341344)*x[0]**o+(-0.688414966522)*x[0]+(-0.660984101932)*x[1]**o+(-0.627883344982)*x[1]+(0.403036784646)*x[2]**o+(0.818277068314)*x[2]
-        arg[3,2,2,1]=(-0.358921307079)*x[0]**o+(0.636847962491)*x[0]+(-0.510050460541)*x[1]**o+(-0.758190944228)*x[1]+(-0.0319326931965)*x[2]**o+(-0.643422203077)*x[2]
-        arg[3,3,0,0]=(-0.930730482483)*x[0]**o+(-0.883991363505)*x[0]+(0.156751809769)*x[1]**o+(0.669949596594)*x[1]+(0.697840698407)*x[2]**o+(0.721622061073)*x[2]
-        arg[3,3,0,1]=(0.108814498453)*x[0]**o+(-0.164024398834)*x[0]+(-0.172084798233)*x[1]**o+(0.031530303081)*x[1]+(-0.985663868487)*x[2]**o+(-0.290224642955)*x[2]
-        arg[3,3,1,0]=(0.690575802875)*x[0]**o+(-0.720428203968)*x[0]+(-0.837111899789)*x[1]**o+(0.140256279088)*x[1]+(0.532813462778)*x[2]**o+(-0.557885762558)*x[2]
-        arg[3,3,1,1]=(-0.0785388159589)*x[0]**o+(-0.40595445804)*x[0]+(-0.691255332383)*x[1]**o+(0.54108326284)*x[1]+(0.737684932212)*x[2]**o+(0.423508847197)*x[2]
-        arg[3,3,2,0]=(-0.589838770269)*x[0]**o+(-0.557133995504)*x[0]+(-0.297626023793)*x[1]**o+(-0.511809000987)*x[1]+(-0.933566600332)*x[2]**o+(-0.21434993446)*x[2]
-        arg[3,3,2,1]=(0.19892263441)*x[0]**o+(0.633952342142)*x[0]+(0.0179400729177)*x[1]**o+(0.154020947355)*x[1]+(-0.620690264897)*x[2]**o+(0.524853027077)*x[2]
-        arg[3,4,0,0]=(0.475231682303)*x[0]**o+(-0.48174419167)*x[0]+(-0.100854189221)*x[1]**o+(0.818166518054)*x[1]+(-0.922566309657)*x[2]**o+(-0.498745068755)*x[2]
-        arg[3,4,0,1]=(0.613982633884)*x[0]**o+(-0.947323459945)*x[0]+(0.17395204013)*x[1]**o+(0.929669087853)*x[1]+(-0.617278089466)*x[2]**o+(0.900537470392)*x[2]
-        arg[3,4,1,0]=(-0.403633510324)*x[0]**o+(0.954097943555)*x[0]+(-0.463422043607)*x[1]**o+(0.843916487223)*x[1]+(-0.5955912138)*x[2]**o+(-0.765444657727)*x[2]
-        arg[3,4,1,1]=(-0.663412886802)*x[0]**o+(-0.547440885077)*x[0]+(-0.479993570508)*x[1]**o+(0.0620303034445)*x[1]+(-0.653759917895)*x[2]**o+(-0.681004441743)*x[2]
-        arg[3,4,2,0]=(-0.994529375243)*x[0]**o+(0.546983479745)*x[0]+(0.17913912435)*x[1]**o+(0.660366383627)*x[1]+(0.0747943517387)*x[2]**o+(-0.321063660452)*x[2]
-        arg[3,4,2,1]=(-0.538074654323)*x[0]**o+(-0.81330034965)*x[0]+(0.660614896398)*x[1]**o+(-0.918192909648)*x[1]+(0.553635166581)*x[2]**o+(-0.918131802189)*x[2]
-        ref[0,0,0,0]=(-0.321539504757)/(o+1.)+(0.762866286444)+(-0.793251694335)*0.5**o
-        ref[0,0,0,1]=(-0.264812286159)/(o+1.)+(-0.15293893368)+(-0.624206604764)*0.5**o
-        ref[0,0,1,0]=(0.54441377247)/(o+1.)+(0.214067163116)+(0.115999561481)*0.5**o
-        ref[0,0,1,1]=(1.50036854956)/(o+1.)+(0.673819079573)+(-0.972466831671)*0.5**o
-        ref[0,0,2,0]=(0.687874396856)/(o+1.)+(-0.986502459901)+(0.708180260094)*0.5**o
-        ref[0,0,2,1]=(0.793527041633)/(o+1.)+(-0.259940301856)+(0.0282615573045)*0.5**o
-        ref[0,1,0,0]=(-1.25436610505)/(o+1.)+(-0.224984055664)+(0.231621820235)*0.5**o
-        ref[0,1,0,1]=(0.891022819882)/(o+1.)+(-0.165060941565)+(0.114056801155)*0.5**o
-        ref[0,1,1,0]=(-0.833444470649)/(o+1.)+(-0.322644910601)+(-0.973115195017)*0.5**o
-        ref[0,1,1,1]=(-0.189799709023)/(o+1.)+(-0.242650862468)+(-0.304758579369)*0.5**o
-        ref[0,1,2,0]=(-1.39857111894)/(o+1.)+(-0.14133379247)+(0.0923844967157)*0.5**o
-        ref[0,1,2,1]=(1.03702218206)/(o+1.)+(-0.181927579186)+(0.793568921835)*0.5**o
-        ref[0,2,0,0]=(-1.11962316818)/(o+1.)+(0.654627255004)+(0.570673248048)*0.5**o
-        ref[0,2,0,1]=(0.085812863531)/(o+1.)+(0.17639811125)+(0.299061155215)*0.5**o
-        ref[0,2,1,0]=(-1.26466090832)/(o+1.)+(0.618506300342)+(0.694725244159)*0.5**o
-        ref[0,2,1,1]=(0.181495495342)/(o+1.)+(0.818577989479)+(-0.83896527178)*0.5**o
-        ref[0,2,2,0]=(0.867512484289)/(o+1.)+(0.353365700269)+(0.2228052704)*0.5**o
-        ref[0,2,2,1]=(0.618350374002)/(o+1.)+(-0.418609375405)+(0.63141216243)*0.5**o
-        ref[0,3,0,0]=(-0.801998626232)/(o+1.)+(-0.302573026989)+(0.00698107166168)*0.5**o
-        ref[0,3,0,1]=(0.414118735868)/(o+1.)+(0.103407742435)+(0.243423742325)*0.5**o
-        ref[0,3,1,0]=(-0.129735888575)/(o+1.)+(0.51412655284)+(-0.106629554393)*0.5**o
-        ref[0,3,1,1]=(0.0886696480864)/(o+1.)+(0.287824302591)+(0.375143733111)*0.5**o
-        ref[0,3,2,0]=(-0.746501172831)/(o+1.)+(-0.389518072046)+(0.955685455438)*0.5**o
-        ref[0,3,2,1]=(-1.06628341794)/(o+1.)+(-0.147429422878)+(0.353654445481)*0.5**o
-        ref[0,4,0,0]=(-0.174512962078)/(o+1.)+(-0.023500931215)+(0.974759684151)*0.5**o
-        ref[0,4,0,1]=(1.18079051113)/(o+1.)+(0.980823290345)+(-0.0799922241539)*0.5**o
-        ref[0,4,1,0]=(-1.19690096085)/(o+1.)+(0.173437389579)+(0.532633280629)*0.5**o
-        ref[0,4,1,1]=(1.11279531673)/(o+1.)+(-0.763621970064)+(-0.353243658293)*0.5**o
-        ref[0,4,2,0]=(-0.819102364613)/(o+1.)+(0.326676095071)+(-0.720840869801)*0.5**o
-        ref[0,4,2,1]=(-0.397779896209)/(o+1.)+(-0.677806011795)+(-0.179073400214)*0.5**o
-        ref[1,0,0,0]=(0.00277094815158)/(o+1.)+(0.301845054648)+(-0.384011553333)*0.5**o
-        ref[1,0,0,1]=(1.22422728891)/(o+1.)+(-0.594910516315)+(-0.808211570649)*0.5**o
-        ref[1,0,1,0]=(0.869946029655)/(o+1.)+(0.308501276384)+(0.0404274840294)*0.5**o
-        ref[1,0,1,1]=(1.63718264119)/(o+1.)+(0.76013279253)+(0.302394139901)*0.5**o
-        ref[1,0,2,0]=(-0.0317278448724)/(o+1.)+(-0.118813696855)+(-0.981981997649)*0.5**o
-        ref[1,0,2,1]=(-1.13670569191)/(o+1.)+(-1.14181937354)+(-0.237479805943)*0.5**o
-        ref[1,1,0,0]=(0.16579906355)/(o+1.)+(-0.303649903525)+(-0.543719871098)*0.5**o
-        ref[1,1,0,1]=(-1.23792473519)/(o+1.)+(-0.288446030005)+(-0.2624625471)*0.5**o
-        ref[1,1,1,0]=(-1.42019666807)/(o+1.)+(-0.23595016925)+(0.88003513115)*0.5**o
-        ref[1,1,1,1]=(0.400318898446)/(o+1.)+(0.765385300641)+(0.177746615088)*0.5**o
-        ref[1,1,2,0]=(1.21553520103)/(o+1.)+(-0.272140700356)+(0.889070121473)*0.5**o
-        ref[1,1,2,1]=(0.121042131161)/(o+1.)+(0.672369993679)+(0.951736215954)*0.5**o
-        ref[1,2,0,0]=(-1.33133223229)/(o+1.)+(0.0067424746325)+(-0.954701036263)*0.5**o
-        ref[1,2,0,1]=(1.02875611862)/(o+1.)+(0.288339603595)+(0.256489282842)*0.5**o
-        ref[1,2,1,0]=(-0.32722580116)/(o+1.)+(0.166447794803)+(-0.94015914517)*0.5**o
-        ref[1,2,1,1]=(0.319551509271)/(o+1.)+(0.112957240802)+(0.367156421931)*0.5**o
-        ref[1,2,2,0]=(-1.3530782297)/(o+1.)+(-0.383051052329)+(-0.812516694781)*0.5**o
-        ref[1,2,2,1]=(0.103238894111)/(o+1.)+(-0.09078366319)+(-0.497461944186)*0.5**o
-        ref[1,3,0,0]=(-0.730489039376)/(o+1.)+(-0.321235679733)+(-0.227077550639)*0.5**o
-        ref[1,3,0,1]=(0.532708925151)/(o+1.)+(-0.0963112877562)+(0.822091021645)*0.5**o
-        ref[1,3,1,0]=(1.69380361755)/(o+1.)+(-0.221589701137)+(-0.0341577310045)*0.5**o
-        ref[1,3,1,1]=(-0.653530558759)/(o+1.)+(-0.322066868053)+(-0.102867224088)*0.5**o
-        ref[1,3,2,0]=(-0.279916251859)/(o+1.)+(-0.18685188305)+(0.556301076488)*0.5**o
-        ref[1,3,2,1]=(0.798107960854)/(o+1.)+(-0.326052832107)+(0.888436531887)*0.5**o
-        ref[1,4,0,0]=(0.250537417885)/(o+1.)+(-0.257356294716)+(0.651898073685)*0.5**o
-        ref[1,4,0,1]=(1.5757556609)/(o+1.)+(-0.669914057301)+(-0.149187282052)*0.5**o
-        ref[1,4,1,0]=(-1.0484286711)/(o+1.)+(0.142400846148)+(-0.285938055108)*0.5**o
-        ref[1,4,1,1]=(0.028101537891)/(o+1.)+(0.55179042751)+(-0.34015136472)*0.5**o
-        ref[1,4,2,0]=(0.974779411801)/(o+1.)+(-0.498887411653)+(-0.464687865356)*0.5**o
-        ref[1,4,2,1]=(-0.544927129174)/(o+1.)+(-0.322066331457)+(-0.777967458564)*0.5**o
-        ref[2,0,0,0]=(1.102518379)/(o+1.)+(-0.456744121978)+(0.665321754689)*0.5**o
-        ref[2,0,0,1]=(-1.23793122706)/(o+1.)+(-0.366112767163)+(0.876435018569)*0.5**o
-        ref[2,0,1,0]=(0.793755949398)/(o+1.)+(-0.113798359287)+(-0.344552466761)*0.5**o
-        ref[2,0,1,1]=(-0.430899036829)/(o+1.)+(-0.0136660119329)+(0.841069648591)*0.5**o
-        ref[2,0,2,0]=(-1.53425877377)/(o+1.)+(0.149679134)+(0.192691357169)*0.5**o
-        ref[2,0,2,1]=(-1.30260629932)/(o+1.)+(0.89308995205)+(0.556616365284)*0.5**o
-        ref[2,1,0,0]=(0.95383115974)/(o+1.)+(-0.0662076555126)+(0.947750123445)*0.5**o
-        ref[2,1,0,1]=(0.660457702465)/(o+1.)+(-0.0149888527952)+(0.962918564559)*0.5**o
-        ref[2,1,1,0]=(-1.03853354453)/(o+1.)+(0.711309478418)+(-0.549909211973)*0.5**o
-        ref[2,1,1,1]=(1.25726273721)/(o+1.)+(0.122502877857)+(0.382867749635)*0.5**o
-        ref[2,1,2,0]=(0.247755301657)/(o+1.)+(-1.11689502868)+(0.355742024596)*0.5**o
-        ref[2,1,2,1]=(-0.043927846695)/(o+1.)+(-0.806594322632)+(-0.882334243081)*0.5**o
-        ref[2,2,0,0]=(-0.0978017670124)/(o+1.)+(-0.596620341454)+(0.372164678051)*0.5**o
-        ref[2,2,0,1]=(-1.4429890287)/(o+1.)+(-0.447576283364)+(0.126650330827)*0.5**o
-        ref[2,2,1,0]=(-0.469449443913)/(o+1.)+(-0.0891064132419)+(-0.805920040628)*0.5**o
-        ref[2,2,1,1]=(0.668102142762)/(o+1.)+(1.09333462337)+(-0.550624517803)*0.5**o
-        ref[2,2,2,0]=(-0.857120744924)/(o+1.)+(0.0838275215328)+(-0.644276976064)*0.5**o
-        ref[2,2,2,1]=(0.862934375332)/(o+1.)+(-0.0640179855954)+(0.564688999107)*0.5**o
-        ref[2,3,0,0]=(-0.00322474925369)/(o+1.)+(-0.202705281737)+(0.64754765253)*0.5**o
-        ref[2,3,0,1]=(0.495998145268)/(o+1.)+(0.602942165513)+(0.365315558093)*0.5**o
-        ref[2,3,1,0]=(-1.15947595169)/(o+1.)+(0.688011753181)+(-0.984940830356)*0.5**o
-        ref[2,3,1,1]=(0.280754586591)/(o+1.)+(0.450382022266)+(-0.785516613303)*0.5**o
-        ref[2,3,2,0]=(-0.754064695248)/(o+1.)+(0.0702669914474)+(-0.310575473358)*0.5**o
-        ref[2,3,2,1]=(-0.309252875518)/(o+1.)+(-0.793667320589)+(0.230960030802)*0.5**o
-        ref[2,4,0,0]=(0.128900650436)/(o+1.)+(-0.847283648506)+(-0.811008715357)*0.5**o
-        ref[2,4,0,1]=(-0.172967312072)/(o+1.)+(0.21314853029)+(0.817994599948)*0.5**o
-        ref[2,4,1,0]=(0.148104464974)/(o+1.)+(0.874572421841)+(-0.626152000269)*0.5**o
-        ref[2,4,1,1]=(0.165466005667)/(o+1.)+(-0.439581113198)+(0.97134483493)*0.5**o
-        ref[2,4,2,0]=(-0.497279142326)/(o+1.)+(0.467228854876)+(-0.827528679064)*0.5**o
-        ref[2,4,2,1]=(-0.867781096812)/(o+1.)+(0.565285636507)+(0.685882920875)*0.5**o
-        ref[3,0,0,0]=(1.19781861678)/(o+1.)+(-0.278473056878)+(0.480000662344)*0.5**o
-        ref[3,0,0,1]=(0.0344133360711)/(o+1.)+(0.888780677678)+(-0.819956304014)*0.5**o
-        ref[3,0,1,0]=(0.891133668503)/(o+1.)+(-0.521653317213)+(0.736655857249)*0.5**o
-        ref[3,0,1,1]=(0.499621703059)/(o+1.)+(-0.350127279125)+(0.615723453617)*0.5**o
-        ref[3,0,2,0]=(0.237687834232)/(o+1.)+(0.0264450318399)+(-0.299975789693)*0.5**o
-        ref[3,0,2,1]=(0.0397681094138)/(o+1.)+(0.294415859926)+(-0.77479605873)*0.5**o
-        ref[3,1,0,0]=(0.129174370391)/(o+1.)+(-0.605433568929)+(-0.121858163593)*0.5**o
-        ref[3,1,0,1]=(0.107353341897)/(o+1.)+(-0.282205272012)+(-0.332320017719)*0.5**o
-        ref[3,1,1,0]=(-0.436405172223)/(o+1.)+(-0.183789215288)+(0.1036461168)*0.5**o
-        ref[3,1,1,1]=(0.0622504202157)/(o+1.)+(-0.0452655871179)+(0.629747493968)*0.5**o
-        ref[3,1,2,0]=(-0.0857742139322)/(o+1.)+(-0.816625480285)+(0.997368307137)*0.5**o
-        ref[3,1,2,1]=(0.746081230581)/(o+1.)+(0.288498131562)+(-0.323027033928)*0.5**o
-        ref[3,2,0,0]=(-0.0588336472879)/(o+1.)+(1.03327921862)+(0.255071922458)*0.5**o
-        ref[3,2,0,1]=(1.03330883448)/(o+1.)+(-0.000758202858916)+(-0.732615916833)*0.5**o
-        ref[3,2,1,0]=(0.786100541406)/(o+1.)+(0.684081901412)+(0.126755528121)*0.5**o
-        ref[3,2,1,1]=(0.099623870147)/(o+1.)+(0.355077879128)+(0.795956472753)*0.5**o
-        ref[3,2,2,0]=(-0.257947317287)/(o+1.)+(-0.249010621595)+(-0.926754341344)*0.5**o
-        ref[3,2,2,1]=(-0.541983153738)/(o+1.)+(-0.382382592407)+(-0.358921307079)*0.5**o
-        ref[3,3,0,0]=(0.854592508176)/(o+1.)+(0.253790147081)+(-0.930730482483)*0.5**o
-        ref[3,3,0,1]=(-1.15774866672)/(o+1.)+(-0.211359369354)+(0.108814498453)*0.5**o
-        ref[3,3,1,0]=(-0.304298437011)/(o+1.)+(-0.569028843719)+(0.690575802875)*0.5**o
-        ref[3,3,1,1]=(0.0464295998283)/(o+1.)+(0.279318825998)+(-0.0785388159589)*0.5**o
-        ref[3,3,2,0]=(-1.23119262412)/(o+1.)+(-0.641646465476)+(-0.589838770269)*0.5**o
-        ref[3,3,2,1]=(-0.60275019198)/(o+1.)+(0.656413158287)+(0.19892263441)*0.5**o
-        ref[3,4,0,0]=(-1.02342049888)/(o+1.)+(-0.0811613711857)+(0.475231682303)*0.5**o
-        ref[3,4,0,1]=(-0.443326049337)/(o+1.)+(0.44144154915)+(0.613982633884)*0.5**o
-        ref[3,4,1,0]=(-1.05901325741)/(o+1.)+(0.516284886526)+(-0.403633510324)*0.5**o
-        ref[3,4,1,1]=(-1.1337534884)/(o+1.)+(-0.583207511688)+(-0.663412886802)*0.5**o
-        ref[3,4,2,0]=(0.253933476088)/(o+1.)+(0.44314310146)+(-0.994529375243)*0.5**o
-        ref[3,4,2,1]=(1.21425006298)/(o+1.)+(-1.32481253074)+(-0.538074654323)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.441098788712)*x[0]**o+(0.082953252724)*x[0]+(-0.97005044508)*x[1]**o+(0.928239302707)*x[1]
-        ref=(-0.97005044508)/(o+1.)+(0.505596277715)+(-0.441098788712)*0.5**o
-      else:
-        arg=(0.384995424392)*x[0]**o+(0.999298118235)*x[0]+(0.144745460948)*x[1]**o+(0.0545198589076)*x[1]+(-0.773375797864)*x[2]**o+(0.145524911495)*x[2]
-        ref=(-0.628630336917)/(o+1.)+(0.599671444318)+(0.384995424392)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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.float_)
-      if dim==2:
-        arg[0]=(0.0745889108767)*x[0]**o+(-0.694812761318)*x[0]+(-0.357791726239)*x[1]**o+(-0.785448350489)*x[1]
-        arg[1]=(0.436006633056)*x[0]**o+(-0.797943632034)*x[0]+(-0.903321835716)*x[1]**o+(0.299527545727)*x[1]
-        ref[0]=(-0.357791726239)/(o+1.)+(-0.740130555904)+(0.0745889108767)*0.5**o
-        ref[1]=(-0.903321835716)/(o+1.)+(-0.249208043154)+(0.436006633056)*0.5**o
-      else:
-        arg[0]=(-0.292048194246)*x[0]**o+(-0.612402340241)*x[0]+(0.830253896674)*x[1]**o+(-0.0173245051245)*x[1]+(-0.105062444571)*x[2]**o+(0.968232377167)*x[2]
-        arg[1]=(0.153118126553)*x[0]**o+(0.958628221601)*x[0]+(-0.326368437133)*x[1]**o+(0.878861879269)*x[1]+(-0.297398071379)*x[2]**o+(0.155202299471)*x[2]
-        ref[0]=(0.725191452103)/(o+1.)+(0.169252765901)+(-0.292048194246)*0.5**o
-        ref[1]=(-0.623766508512)/(o+1.)+(0.99634620017)+(0.153118126553)*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.assertTrue(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 the 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,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.410346849722)*x[0]**o+(0.86102012198)*x[0]+(-0.0143604505833)*x[1]**o+(-0.333268586255)*x[1]
-        arg[0,1]=(-0.104991947387)*x[0]**o+(0.51540973662)*x[0]+(0.449773354197)*x[1]**o+(0.0397236625379)*x[1]
-        arg[0,2]=(0.0010671797269)*x[0]**o+(0.165202831822)*x[0]+(-0.536444395178)*x[1]**o+(0.142112903729)*x[1]
-        arg[0,3]=(0.0655247081801)*x[0]**o+(-0.59093644572)*x[0]+(-0.0135713515051)*x[1]**o+(0.665578431202)*x[1]
-        arg[0,4]=(0.902382714765)*x[0]**o+(-0.358716290301)*x[0]+(-0.504792876433)*x[1]**o+(-0.760982991404)*x[1]
-        arg[1,0]=(0.663815334483)*x[0]**o+(-0.967978720711)*x[0]+(-0.308953852146)*x[1]**o+(-0.250315651366)*x[1]
-        arg[1,1]=(0.602976841368)*x[0]**o+(0.407346455361)*x[0]+(0.820076160142)*x[1]**o+(0.720380314572)*x[1]
-        arg[1,2]=(0.0899286747557)*x[0]**o+(-0.636748133402)*x[0]+(0.615853620374)*x[1]**o+(0.389136375831)*x[1]
-        arg[1,3]=(-0.695859848989)*x[0]**o+(-0.160892907203)*x[0]+(0.972252211687)*x[1]**o+(0.971653054313)*x[1]
-        arg[1,4]=(-0.229141368314)*x[0]**o+(0.434757135281)*x[0]+(0.508751791725)*x[1]**o+(-0.593022987916)*x[1]
-        arg[2,0]=(-0.732297666821)*x[0]**o+(-0.885623150041)*x[0]+(0.355264312146)*x[1]**o+(-0.203582600498)*x[1]
-        arg[2,1]=(-0.0683706126862)*x[0]**o+(0.390953181924)*x[0]+(-0.104115827873)*x[1]**o+(-0.0586349400277)*x[1]
-        arg[2,2]=(0.213052201915)*x[0]**o+(0.813758731408)*x[0]+(-0.927085393446)*x[1]**o+(-0.70884993627)*x[1]
-        arg[2,3]=(-0.11792311156)*x[0]**o+(0.705053056049)*x[0]+(-0.988858028527)*x[1]**o+(-0.532493233644)*x[1]
-        arg[2,4]=(0.643258167584)*x[0]**o+(0.991059864292)*x[0]+(0.466734669253)*x[1]**o+(-0.763209421816)*x[1]
-        arg[3,0]=(-0.686036752646)*x[0]**o+(-0.0152278415398)*x[0]+(0.572818298467)*x[1]**o+(0.0883817883272)*x[1]
-        arg[3,1]=(-0.498088836117)*x[0]**o+(0.413958831603)*x[0]+(-0.788338642889)*x[1]**o+(-0.219412111863)*x[1]
-        arg[3,2]=(0.895103303091)*x[0]**o+(0.967224972282)*x[0]+(0.778129303031)*x[1]**o+(-0.239067231978)*x[1]
-        arg[3,3]=(-0.715385920659)*x[0]**o+(-0.928446013585)*x[0]+(-0.919578735328)*x[1]**o+(0.735438220506)*x[1]
-        arg[3,4]=(0.273825880641)*x[0]**o+(0.602304312788)*x[0]+(-0.788415866411)*x[1]**o+(0.841776933557)*x[1]
-        ref[0,0]=(-0.0143604505833)/(o+1.)+(0.263875767862)+(0.410346849722)*0.5**o
-        ref[0,1]=(0.449773354197)/(o+1.)+(0.277566699579)+(-0.104991947387)*0.5**o
-        ref[0,2]=(-0.536444395178)/(o+1.)+(0.153657867776)+(0.0010671797269)*0.5**o
-        ref[0,3]=(-0.0135713515051)/(o+1.)+(0.0373209927411)+(0.0655247081801)*0.5**o
-        ref[0,4]=(-0.504792876433)/(o+1.)+(-0.559849640852)+(0.902382714765)*0.5**o
-        ref[1,0]=(-0.308953852146)/(o+1.)+(-0.609147186038)+(0.663815334483)*0.5**o
-        ref[1,1]=(0.820076160142)/(o+1.)+(0.563863384966)+(0.602976841368)*0.5**o
-        ref[1,2]=(0.615853620374)/(o+1.)+(-0.123805878786)+(0.0899286747557)*0.5**o
-        ref[1,3]=(0.972252211687)/(o+1.)+(0.405380073555)+(-0.695859848989)*0.5**o
-        ref[1,4]=(0.508751791725)/(o+1.)+(-0.0791329263176)+(-0.229141368314)*0.5**o
-        ref[2,0]=(0.355264312146)/(o+1.)+(-0.544602875269)+(-0.732297666821)*0.5**o
-        ref[2,1]=(-0.104115827873)/(o+1.)+(0.166159120948)+(-0.0683706126862)*0.5**o
-        ref[2,2]=(-0.927085393446)/(o+1.)+(0.0524543975689)+(0.213052201915)*0.5**o
-        ref[2,3]=(-0.988858028527)/(o+1.)+(0.0862799112023)+(-0.11792311156)*0.5**o
-        ref[2,4]=(0.466734669253)/(o+1.)+(0.113925221238)+(0.643258167584)*0.5**o
-        ref[3,0]=(0.572818298467)/(o+1.)+(0.0365769733937)+(-0.686036752646)*0.5**o
-        ref[3,1]=(-0.788338642889)/(o+1.)+(0.0972733598697)+(-0.498088836117)*0.5**o
-        ref[3,2]=(0.778129303031)/(o+1.)+(0.364078870152)+(0.895103303091)*0.5**o
-        ref[3,3]=(-0.919578735328)/(o+1.)+(-0.0965038965398)+(-0.715385920659)*0.5**o
-        ref[3,4]=(-0.788415866411)/(o+1.)+(0.722040623173)+(0.273825880641)*0.5**o
-      else:
-        arg[0,0]=(-0.903197979191)*x[0]**o+(-0.497252911882)*x[0]+(0.5689188153)*x[1]**o+(-0.569434759407)*x[1]+(-0.204533481399)*x[2]**o+(-0.0255207088467)*x[2]
-        arg[0,1]=(-0.0296606374337)*x[0]**o+(0.917552577919)*x[0]+(0.746132694062)*x[1]**o+(0.285568252958)*x[1]+(0.175571603104)*x[2]**o+(0.5701931124)*x[2]
-        arg[0,2]=(0.657981464039)*x[0]**o+(-0.105816675859)*x[0]+(-0.210726712386)*x[1]**o+(-0.457303699577)*x[1]+(-0.225517453595)*x[2]**o+(0.61593257413)*x[2]
-        arg[0,3]=(-0.652766009035)*x[0]**o+(0.538908603782)*x[0]+(0.226594150058)*x[1]**o+(0.691428293374)*x[1]+(-0.210896072508)*x[2]**o+(0.538061905948)*x[2]
-        arg[0,4]=(0.175024193446)*x[0]**o+(0.433285241007)*x[0]+(0.928411521986)*x[1]**o+(-0.241175862661)*x[1]+(-0.779192552542)*x[2]**o+(0.428100531631)*x[2]
-        arg[1,0]=(-0.094230207815)*x[0]**o+(-0.113255272088)*x[0]+(-0.880816596679)*x[1]**o+(0.56261116141)*x[1]+(-0.418606336511)*x[2]**o+(0.858058623759)*x[2]
-        arg[1,1]=(0.08556853498)*x[0]**o+(0.95491440456)*x[0]+(-0.435275492231)*x[1]**o+(0.339105115812)*x[1]+(-0.634101556975)*x[2]**o+(0.357557194572)*x[2]
-        arg[1,2]=(-0.692883812524)*x[0]**o+(0.673540357384)*x[0]+(0.240219465837)*x[1]**o+(0.139957925862)*x[1]+(0.135892430596)*x[2]**o+(0.383465818668)*x[2]
-        arg[1,3]=(-0.892921935206)*x[0]**o+(0.0694647682287)*x[0]+(0.0530888770821)*x[1]**o+(-0.0735398003251)*x[1]+(-0.40702392212)*x[2]**o+(-0.223494881098)*x[2]
-        arg[1,4]=(0.743112585337)*x[0]**o+(-0.12393012942)*x[0]+(-0.660616664197)*x[1]**o+(-0.0334489536139)*x[1]+(-0.0566394013558)*x[2]**o+(-0.0281273872158)*x[2]
-        arg[2,0]=(-0.500500871517)*x[0]**o+(-0.326237506809)*x[0]+(-0.960480146386)*x[1]**o+(0.0901654083154)*x[1]+(0.466124845857)*x[2]**o+(0.6908848619)*x[2]
-        arg[2,1]=(0.120233846989)*x[0]**o+(0.520609850629)*x[0]+(-0.407423400749)*x[1]**o+(0.59145151128)*x[1]+(0.981171407459)*x[2]**o+(-0.703987165108)*x[2]
-        arg[2,2]=(0.811775583161)*x[0]**o+(-0.209650983138)*x[0]+(-0.286223486261)*x[1]**o+(-0.864122954179)*x[1]+(0.609725467363)*x[2]**o+(0.0311464898903)*x[2]
-        arg[2,3]=(-0.325647787579)*x[0]**o+(0.956001955119)*x[0]+(0.637272546129)*x[1]**o+(-0.951109798103)*x[1]+(0.406445558466)*x[2]**o+(-0.930854597943)*x[2]
-        arg[2,4]=(0.0621315789778)*x[0]**o+(-0.917033227802)*x[0]+(-0.179584904974)*x[1]**o+(0.283357518809)*x[1]+(-0.778863909832)*x[2]**o+(-0.524497331838)*x[2]
-        arg[3,0]=(0.140605486894)*x[0]**o+(0.172882849759)*x[0]+(-0.883586756712)*x[1]**o+(-0.160461884399)*x[1]+(-0.718343713337)*x[2]**o+(0.196937721256)*x[2]
-        arg[3,1]=(-0.660232764173)*x[0]**o+(-0.92091042631)*x[0]+(-0.568852134661)*x[1]**o+(-0.331441330509)*x[1]+(-0.220286922375)*x[2]**o+(-0.256407439105)*x[2]
-        arg[3,2]=(0.593940468197)*x[0]**o+(0.527756437117)*x[0]+(0.943980933807)*x[1]**o+(0.749415167795)*x[1]+(0.484043332105)*x[2]**o+(0.40135030381)*x[2]
-        arg[3,3]=(0.870508483705)*x[0]**o+(-0.234209640456)*x[0]+(-0.62692310882)*x[1]**o+(0.352628981854)*x[1]+(-0.24937844453)*x[2]**o+(0.73438735864)*x[2]
-        arg[3,4]=(-0.638437449353)*x[0]**o+(0.308007229542)*x[0]+(0.537590844528)*x[1]**o+(-0.755595388361)*x[1]+(-0.152781228745)*x[2]**o+(-0.450122095362)*x[2]
-        ref[0,0]=(0.364385333901)/(o+1.)+(-0.546104190068)+(-0.903197979191)*0.5**o
-        ref[0,1]=(0.921704297167)/(o+1.)+(0.886656971638)+(-0.0296606374337)*0.5**o
-        ref[0,2]=(-0.436244165981)/(o+1.)+(0.0264060993469)+(0.657981464039)*0.5**o
-        ref[0,3]=(0.0156980775503)/(o+1.)+(0.884199401552)+(-0.652766009035)*0.5**o
-        ref[0,4]=(0.149218969444)/(o+1.)+(0.310104954989)+(0.175024193446)*0.5**o
-        ref[1,0]=(-1.29942293319)/(o+1.)+(0.653707256541)+(-0.094230207815)*0.5**o
-        ref[1,1]=(-1.06937704921)/(o+1.)+(0.825788357473)+(0.08556853498)*0.5**o
-        ref[1,2]=(0.376111896433)/(o+1.)+(0.598482050957)+(-0.692883812524)*0.5**o
-        ref[1,3]=(-0.353935045038)/(o+1.)+(-0.113784956597)+(-0.892921935206)*0.5**o
-        ref[1,4]=(-0.717256065552)/(o+1.)+(-0.0927532351247)+(0.743112585337)*0.5**o
-        ref[2,0]=(-0.494355300528)/(o+1.)+(0.227406381703)+(-0.500500871517)*0.5**o
-        ref[2,1]=(0.57374800671)/(o+1.)+(0.2040370984)+(0.120233846989)*0.5**o
-        ref[2,2]=(0.323501981101)/(o+1.)+(-0.521313723714)+(0.811775583161)*0.5**o
-        ref[2,3]=(1.04371810459)/(o+1.)+(-0.462981220464)+(-0.325647787579)*0.5**o
-        ref[2,4]=(-0.958448814807)/(o+1.)+(-0.579086520416)+(0.0621315789778)*0.5**o
-        ref[3,0]=(-1.60193047005)/(o+1.)+(0.104679343308)+(0.140605486894)*0.5**o
-        ref[3,1]=(-0.789139057035)/(o+1.)+(-0.754379597962)+(-0.660232764173)*0.5**o
-        ref[3,2]=(1.42802426591)/(o+1.)+(0.839260954361)+(0.593940468197)*0.5**o
-        ref[3,3]=(-0.87630155335)/(o+1.)+(0.426403350019)+(0.870508483705)*0.5**o
-        ref[3,4]=(0.384809615783)/(o+1.)+(-0.448855127091)+(-0.638437449353)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.315756069525)*x[0]**o+(0.253240552004)*x[0]+(0.86540335823)*x[1]**o+(-0.616203780065)*x[1]
-        arg[0,0,1]=(-0.948116617977)*x[0]**o+(0.892154336439)*x[0]+(0.136605864823)*x[1]**o+(-0.135599413854)*x[1]
-        arg[0,1,0]=(0.249388669107)*x[0]**o+(-0.299043026617)*x[0]+(0.335963868826)*x[1]**o+(-0.147202749474)*x[1]
-        arg[0,1,1]=(0.649003124445)*x[0]**o+(0.102344972673)*x[0]+(-0.795038258171)*x[1]**o+(0.149716983842)*x[1]
-        arg[1,0,0]=(0.814606374941)*x[0]**o+(-0.949251236145)*x[0]+(0.723727126173)*x[1]**o+(-0.75419822708)*x[1]
-        arg[1,0,1]=(0.043251358201)*x[0]**o+(-0.227748374318)*x[0]+(-0.231556019421)*x[1]**o+(-0.152524439909)*x[1]
-        arg[1,1,0]=(0.565989211326)*x[0]**o+(-0.488248650798)*x[0]+(-0.353077780419)*x[1]**o+(-0.0139123365766)*x[1]
-        arg[1,1,1]=(-0.106085432662)*x[0]**o+(0.627311916563)*x[0]+(-0.496301561324)*x[1]**o+(-0.648448849796)*x[1]
-        arg[2,0,0]=(0.741868098354)*x[0]**o+(-0.486898566862)*x[0]+(0.0461464851414)*x[1]**o+(0.0133916949979)*x[1]
-        arg[2,0,1]=(0.969108066213)*x[0]**o+(-0.688797899381)*x[0]+(0.897017408844)*x[1]**o+(0.807714585761)*x[1]
-        arg[2,1,0]=(-0.138159486947)*x[0]**o+(-0.377759480876)*x[0]+(-0.764484355987)*x[1]**o+(-0.723912265361)*x[1]
-        arg[2,1,1]=(-0.781167132076)*x[0]**o+(0.119512137054)*x[0]+(-0.535230596139)*x[1]**o+(0.441358968417)*x[1]
-        arg[3,0,0]=(-0.663820836909)*x[0]**o+(0.907668749761)*x[0]+(-0.345114213135)*x[1]**o+(0.0580058218243)*x[1]
-        arg[3,0,1]=(-0.359054701663)*x[0]**o+(0.0389188839076)*x[0]+(0.168050801441)*x[1]**o+(-0.695770024565)*x[1]
-        arg[3,1,0]=(0.70118269628)*x[0]**o+(0.87976625188)*x[0]+(0.154503286758)*x[1]**o+(0.807878896951)*x[1]
-        arg[3,1,1]=(-0.143516320927)*x[0]**o+(-0.369452129865)*x[0]+(-0.0392268449697)*x[1]**o+(-0.046104227955)*x[1]
-        arg[4,0,0]=(0.197244254754)*x[0]**o+(-0.580444991466)*x[0]+(0.334036744845)*x[1]**o+(0.000791083620504)*x[1]
-        arg[4,0,1]=(-0.892626226865)*x[0]**o+(0.140042741589)*x[0]+(0.158775259845)*x[1]**o+(-0.308266331028)*x[1]
-        arg[4,1,0]=(0.650374542633)*x[0]**o+(0.586152174865)*x[0]+(0.0201324360301)*x[1]**o+(-0.813221777119)*x[1]
-        arg[4,1,1]=(0.149656968314)*x[0]**o+(0.700641349434)*x[0]+(-0.529780404433)*x[1]**o+(0.512159137234)*x[1]
-        arg[5,0,0]=(0.288664621864)*x[0]**o+(0.119652133593)*x[0]+(-0.599113573241)*x[1]**o+(0.879966724309)*x[1]
-        arg[5,0,1]=(0.861443356689)*x[0]**o+(0.530607121787)*x[0]+(0.240306513701)*x[1]**o+(-0.575772515225)*x[1]
-        arg[5,1,0]=(0.721635890008)*x[0]**o+(-0.109537583449)*x[0]+(0.162041613112)*x[1]**o+(0.229143033467)*x[1]
-        arg[5,1,1]=(-0.876930820494)*x[0]**o+(0.749378811252)*x[0]+(0.886213554632)*x[1]**o+(0.433327797349)*x[1]
-        ref[0,0,0]=(0.86540335823)/(o+1.)+(-0.18148161403)+(-0.315756069525)*0.5**o
-        ref[0,0,1]=(0.136605864823)/(o+1.)+(0.378277461292)+(-0.948116617977)*0.5**o
-        ref[0,1,0]=(0.335963868826)/(o+1.)+(-0.223122888045)+(0.249388669107)*0.5**o
-        ref[0,1,1]=(-0.795038258171)/(o+1.)+(0.126030978258)+(0.649003124445)*0.5**o
-        ref[1,0,0]=(0.723727126173)/(o+1.)+(-0.851724731613)+(0.814606374941)*0.5**o
-        ref[1,0,1]=(-0.231556019421)/(o+1.)+(-0.190136407114)+(0.043251358201)*0.5**o
-        ref[1,1,0]=(-0.353077780419)/(o+1.)+(-0.251080493687)+(0.565989211326)*0.5**o
-        ref[1,1,1]=(-0.496301561324)/(o+1.)+(-0.0105684666165)+(-0.106085432662)*0.5**o
-        ref[2,0,0]=(0.0461464851414)/(o+1.)+(-0.236753435932)+(0.741868098354)*0.5**o
-        ref[2,0,1]=(0.897017408844)/(o+1.)+(0.05945834319)+(0.969108066213)*0.5**o
-        ref[2,1,0]=(-0.764484355987)/(o+1.)+(-0.550835873118)+(-0.138159486947)*0.5**o
-        ref[2,1,1]=(-0.535230596139)/(o+1.)+(0.280435552736)+(-0.781167132076)*0.5**o
-        ref[3,0,0]=(-0.345114213135)/(o+1.)+(0.482837285793)+(-0.663820836909)*0.5**o
-        ref[3,0,1]=(0.168050801441)/(o+1.)+(-0.328425570329)+(-0.359054701663)*0.5**o
-        ref[3,1,0]=(0.154503286758)/(o+1.)+(0.843822574415)+(0.70118269628)*0.5**o
-        ref[3,1,1]=(-0.0392268449697)/(o+1.)+(-0.20777817891)+(-0.143516320927)*0.5**o
-        ref[4,0,0]=(0.334036744845)/(o+1.)+(-0.289826953923)+(0.197244254754)*0.5**o
-        ref[4,0,1]=(0.158775259845)/(o+1.)+(-0.0841117947196)+(-0.892626226865)*0.5**o
-        ref[4,1,0]=(0.0201324360301)/(o+1.)+(-0.113534801127)+(0.650374542633)*0.5**o
-        ref[4,1,1]=(-0.529780404433)/(o+1.)+(0.606400243334)+(0.149656968314)*0.5**o
-        ref[5,0,0]=(-0.599113573241)/(o+1.)+(0.499809428951)+(0.288664621864)*0.5**o
-        ref[5,0,1]=(0.240306513701)/(o+1.)+(-0.022582696719)+(0.861443356689)*0.5**o
-        ref[5,1,0]=(0.162041613112)/(o+1.)+(0.0598027250089)+(0.721635890008)*0.5**o
-        ref[5,1,1]=(0.886213554632)/(o+1.)+(0.5913533043)+(-0.876930820494)*0.5**o
-      else:
-        arg[0,0,0]=(0.804252705823)*x[0]**o+(-0.215722921442)*x[0]+(-0.806316349529)*x[1]**o+(-0.984002993222)*x[1]+(-0.411946014731)*x[2]**o+(-0.526356191855)*x[2]
-        arg[0,0,1]=(-0.845902068304)*x[0]**o+(0.0773568471048)*x[0]+(-0.746877301439)*x[1]**o+(-0.581914187059)*x[1]+(-0.0299873869697)*x[2]**o+(-0.133702230427)*x[2]
-        arg[0,1,0]=(0.0113663840954)*x[0]**o+(-0.155702215771)*x[0]+(-0.134490626112)*x[1]**o+(0.973329917011)*x[1]+(-0.71585624135)*x[2]**o+(-0.840113198085)*x[2]
-        arg[0,1,1]=(0.708589516593)*x[0]**o+(0.40282025998)*x[0]+(0.114498353117)*x[1]**o+(0.117244230433)*x[1]+(0.110135318853)*x[2]**o+(-0.0227879044898)*x[2]
-        arg[1,0,0]=(0.836102144172)*x[0]**o+(0.212564417583)*x[0]+(0.744354739679)*x[1]**o+(-0.265633978841)*x[1]+(0.843108381264)*x[2]**o+(-0.288428427501)*x[2]
-        arg[1,0,1]=(-0.0712209756059)*x[0]**o+(-0.186158140814)*x[0]+(0.184457099888)*x[1]**o+(0.381365494077)*x[1]+(-0.547874738232)*x[2]**o+(0.645124013254)*x[2]
-        arg[1,1,0]=(-0.982992052158)*x[0]**o+(0.259627201342)*x[0]+(-0.885159598031)*x[1]**o+(-0.720754022982)*x[1]+(-0.762444117798)*x[2]**o+(0.737661938668)*x[2]
-        arg[1,1,1]=(0.518426662725)*x[0]**o+(0.718331452733)*x[0]+(0.523870992899)*x[1]**o+(0.527831420124)*x[1]+(0.791634534316)*x[2]**o+(0.17320870773)*x[2]
-        arg[2,0,0]=(-0.0368697940364)*x[0]**o+(-0.101718169515)*x[0]+(0.933712377315)*x[1]**o+(-0.465193151914)*x[1]+(-0.113637506449)*x[2]**o+(0.606619949802)*x[2]
-        arg[2,0,1]=(-0.785633726304)*x[0]**o+(0.526518355588)*x[0]+(0.151859749675)*x[1]**o+(0.805094094642)*x[1]+(-0.881122119524)*x[2]**o+(0.85143600659)*x[2]
-        arg[2,1,0]=(0.969244001518)*x[0]**o+(0.22600349917)*x[0]+(0.404826692149)*x[1]**o+(0.633039564539)*x[1]+(0.470567669552)*x[2]**o+(0.378348877016)*x[2]
-        arg[2,1,1]=(-0.310035929524)*x[0]**o+(0.42632271287)*x[0]+(0.866930472029)*x[1]**o+(-0.124483457934)*x[1]+(0.291920406068)*x[2]**o+(0.573984377154)*x[2]
-        arg[3,0,0]=(0.245553971829)*x[0]**o+(-0.567563766526)*x[0]+(0.326654705159)*x[1]**o+(0.642370867777)*x[1]+(-0.538450732704)*x[2]**o+(0.773349470647)*x[2]
-        arg[3,0,1]=(0.427017913395)*x[0]**o+(0.885132021286)*x[0]+(0.0338747045378)*x[1]**o+(-0.978508839789)*x[1]+(-0.734559666249)*x[2]**o+(0.379991690191)*x[2]
-        arg[3,1,0]=(-0.29533334088)*x[0]**o+(-0.894548834889)*x[0]+(0.537043269081)*x[1]**o+(-0.559173506199)*x[1]+(0.359216600837)*x[2]**o+(0.269563745611)*x[2]
-        arg[3,1,1]=(-0.146152544907)*x[0]**o+(-0.95681567795)*x[0]+(-0.0323978120064)*x[1]**o+(-0.5351716012)*x[1]+(-0.548536561192)*x[2]**o+(0.489675460511)*x[2]
-        arg[4,0,0]=(0.0552991386013)*x[0]**o+(0.772417012152)*x[0]+(-0.298212559744)*x[1]**o+(-0.189934984078)*x[1]+(0.74843296731)*x[2]**o+(-0.00412448772016)*x[2]
-        arg[4,0,1]=(0.577046858044)*x[0]**o+(-0.804142676861)*x[0]+(-0.0703211154568)*x[1]**o+(-0.84092953544)*x[1]+(0.254119640557)*x[2]**o+(-0.765048199333)*x[2]
-        arg[4,1,0]=(-0.358558179011)*x[0]**o+(-0.998072158283)*x[0]+(0.508152998513)*x[1]**o+(-0.0813296609683)*x[1]+(-0.534332816004)*x[2]**o+(-0.189623317277)*x[2]
-        arg[4,1,1]=(0.840098089823)*x[0]**o+(0.966726062679)*x[0]+(0.920079609258)*x[1]**o+(-0.242532131681)*x[1]+(0.429713768025)*x[2]**o+(0.171223902751)*x[2]
-        arg[5,0,0]=(0.695331559401)*x[0]**o+(0.819482211381)*x[0]+(0.550452400412)*x[1]**o+(0.518496496336)*x[1]+(-0.24727850431)*x[2]**o+(-0.796406493488)*x[2]
-        arg[5,0,1]=(0.469488028534)*x[0]**o+(0.457530124732)*x[0]+(0.922206279456)*x[1]**o+(0.678758573006)*x[1]+(0.34102098746)*x[2]**o+(0.108616278675)*x[2]
-        arg[5,1,0]=(0.444799933589)*x[0]**o+(-0.361568786934)*x[0]+(0.470174557338)*x[1]**o+(-0.344557214342)*x[1]+(0.894860467988)*x[2]**o+(-0.347027743579)*x[2]
-        arg[5,1,1]=(0.0304781332872)*x[0]**o+(-0.69046475182)*x[0]+(0.873260975232)*x[1]**o+(-0.705100555993)*x[1]+(0.660057279013)*x[2]**o+(-0.910002146105)*x[2]
-        ref[0,0,0]=(-1.21826236426)/(o+1.)+(-0.863041053259)+(0.804252705823)*0.5**o
-        ref[0,0,1]=(-0.776864688409)/(o+1.)+(-0.31912978519)+(-0.845902068304)*0.5**o
-        ref[0,1,0]=(-0.850346867462)/(o+1.)+(-0.0112427484226)+(0.0113663840954)*0.5**o
-        ref[0,1,1]=(0.22463367197)/(o+1.)+(0.248638292962)+(0.708589516593)*0.5**o
-        ref[1,0,0]=(1.58746312094)/(o+1.)+(-0.17074899438)+(0.836102144172)*0.5**o
-        ref[1,0,1]=(-0.363417638344)/(o+1.)+(0.420165683258)+(-0.0712209756059)*0.5**o
-        ref[1,1,0]=(-1.64760371583)/(o+1.)+(0.138267558514)+(-0.982992052158)*0.5**o
-        ref[1,1,1]=(1.31550552722)/(o+1.)+(0.709685790293)+(0.518426662725)*0.5**o
-        ref[2,0,0]=(0.820074870865)/(o+1.)+(0.0198543141864)+(-0.0368697940364)*0.5**o
-        ref[2,0,1]=(-0.729262369848)/(o+1.)+(1.09152422841)+(-0.785633726304)*0.5**o
-        ref[2,1,0]=(0.875394361701)/(o+1.)+(0.618695970363)+(0.969244001518)*0.5**o
-        ref[2,1,1]=(1.1588508781)/(o+1.)+(0.437911816045)+(-0.310035929524)*0.5**o
-        ref[3,0,0]=(-0.211796027546)/(o+1.)+(0.424078285949)+(0.245553971829)*0.5**o
-        ref[3,0,1]=(-0.700684961711)/(o+1.)+(0.143307435844)+(0.427017913395)*0.5**o
-        ref[3,1,0]=(0.896259869918)/(o+1.)+(-0.592079297738)+(-0.29533334088)*0.5**o
-        ref[3,1,1]=(-0.580934373198)/(o+1.)+(-0.50115590932)+(-0.146152544907)*0.5**o
-        ref[4,0,0]=(0.450220407566)/(o+1.)+(0.289178770177)+(0.0552991386013)*0.5**o
-        ref[4,0,1]=(0.1837985251)/(o+1.)+(-1.20506020582)+(0.577046858044)*0.5**o
-        ref[4,1,0]=(-0.0261798174917)/(o+1.)+(-0.634512568264)+(-0.358558179011)*0.5**o
-        ref[4,1,1]=(1.34979337728)/(o+1.)+(0.447708916874)+(0.840098089823)*0.5**o
-        ref[5,0,0]=(0.303173896103)/(o+1.)+(0.270786107114)+(0.695331559401)*0.5**o
-        ref[5,0,1]=(1.26322726692)/(o+1.)+(0.622452488207)+(0.469488028534)*0.5**o
-        ref[5,1,0]=(1.36503502533)/(o+1.)+(-0.526576872427)+(0.444799933589)*0.5**o
-        ref[5,1,1]=(1.53331825424)/(o+1.)+(-1.15278372696)+(0.0304781332872)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.348972036919)*x[0]**o+(0.123542094911)*x[0]+(-0.596353540657)*x[1]**o+(0.717656729405)*x[1]
-        arg[0,0,0,1]=(0.187733014896)*x[0]**o+(0.76244697815)*x[0]+(0.261409664458)*x[1]**o+(0.0213714031642)*x[1]
-        arg[0,0,1,0]=(0.951655197513)*x[0]**o+(-0.865274104487)*x[0]+(0.59127040848)*x[1]**o+(-0.261622300136)*x[1]
-        arg[0,0,1,1]=(-0.188127934304)*x[0]**o+(-0.513768204254)*x[0]+(0.77162116582)*x[1]**o+(-0.12621176914)*x[1]
-        arg[0,0,2,0]=(0.770717242337)*x[0]**o+(-0.991038362841)*x[0]+(0.908566805373)*x[1]**o+(-0.24890064672)*x[1]
-        arg[0,0,2,1]=(-0.543253359807)*x[0]**o+(-0.0504511921259)*x[0]+(-0.724584621389)*x[1]**o+(0.999965312141)*x[1]
-        arg[0,1,0,0]=(0.986939140609)*x[0]**o+(0.236894127675)*x[0]+(0.520162431169)*x[1]**o+(0.306413415759)*x[1]
-        arg[0,1,0,1]=(-0.171773212929)*x[0]**o+(-0.248436968201)*x[0]+(0.43818378458)*x[1]**o+(-0.495734982435)*x[1]
-        arg[0,1,1,0]=(-0.369350989684)*x[0]**o+(0.59047357584)*x[0]+(0.422340945702)*x[1]**o+(0.326270009775)*x[1]
-        arg[0,1,1,1]=(0.559606389467)*x[0]**o+(-0.0507064379501)*x[0]+(-0.0464190048363)*x[1]**o+(0.18964879235)*x[1]
-        arg[0,1,2,0]=(-0.989408371198)*x[0]**o+(0.108750148268)*x[0]+(-0.347984444559)*x[1]**o+(-0.819590699683)*x[1]
-        arg[0,1,2,1]=(-0.289295900777)*x[0]**o+(-0.579698633174)*x[0]+(-0.124928198101)*x[1]**o+(0.640901698875)*x[1]
-        arg[0,2,0,0]=(0.132599667548)*x[0]**o+(-0.102095433147)*x[0]+(0.446169236302)*x[1]**o+(-0.844062525718)*x[1]
-        arg[0,2,0,1]=(-0.452662917924)*x[0]**o+(-0.0497770418153)*x[0]+(-0.258525519083)*x[1]**o+(-0.0365197858914)*x[1]
-        arg[0,2,1,0]=(0.318740871592)*x[0]**o+(0.562764515639)*x[0]+(-0.209089266173)*x[1]**o+(0.922024900771)*x[1]
-        arg[0,2,1,1]=(-0.825757440563)*x[0]**o+(0.634009249217)*x[0]+(0.954836398565)*x[1]**o+(-0.910652766097)*x[1]
-        arg[0,2,2,0]=(-0.640337007803)*x[0]**o+(0.862625623816)*x[0]+(-0.0327529254483)*x[1]**o+(-0.327305638603)*x[1]
-        arg[0,2,2,1]=(-0.956300293885)*x[0]**o+(0.456116376134)*x[0]+(0.312023159058)*x[1]**o+(0.768546792276)*x[1]
-        arg[0,3,0,0]=(-0.927040285049)*x[0]**o+(-0.614994799603)*x[0]+(-0.431859510779)*x[1]**o+(-0.088774748513)*x[1]
-        arg[0,3,0,1]=(-0.807009561768)*x[0]**o+(0.00323409463398)*x[0]+(0.274814268019)*x[1]**o+(-0.132755038246)*x[1]
-        arg[0,3,1,0]=(0.931774139846)*x[0]**o+(0.665327108449)*x[0]+(0.130437344004)*x[1]**o+(-0.00859025546518)*x[1]
-        arg[0,3,1,1]=(-0.314188008746)*x[0]**o+(0.405251729437)*x[0]+(-0.313484462262)*x[1]**o+(-0.670765905491)*x[1]
-        arg[0,3,2,0]=(0.748691505108)*x[0]**o+(0.717110963353)*x[0]+(-0.451892315269)*x[1]**o+(-0.103930621637)*x[1]
-        arg[0,3,2,1]=(-0.124290384657)*x[0]**o+(0.0761550925153)*x[0]+(0.864166710803)*x[1]**o+(0.050297196468)*x[1]
-        arg[0,4,0,0]=(-0.726606985714)*x[0]**o+(-0.304862755503)*x[0]+(-0.364735884875)*x[1]**o+(0.769999145518)*x[1]
-        arg[0,4,0,1]=(-0.716457484159)*x[0]**o+(0.850185561874)*x[0]+(0.924535166786)*x[1]**o+(0.414539526778)*x[1]
-        arg[0,4,1,0]=(-0.67154700238)*x[0]**o+(-0.0990079744678)*x[0]+(-0.738258048173)*x[1]**o+(-0.105333364414)*x[1]
-        arg[0,4,1,1]=(-0.568569022142)*x[0]**o+(-0.865340476096)*x[0]+(0.592223896873)*x[1]**o+(0.545216501911)*x[1]
-        arg[0,4,2,0]=(0.959619955514)*x[0]**o+(-0.625097978453)*x[0]+(0.447944032533)*x[1]**o+(-0.792670959618)*x[1]
-        arg[0,4,2,1]=(-0.446578795272)*x[0]**o+(0.516341492325)*x[0]+(0.383143400712)*x[1]**o+(-0.339255681885)*x[1]
-        arg[1,0,0,0]=(0.130600745253)*x[0]**o+(-0.225084866063)*x[0]+(-0.871963625443)*x[1]**o+(-0.0741251944735)*x[1]
-        arg[1,0,0,1]=(-0.684630134211)*x[0]**o+(-0.298097256903)*x[0]+(0.511206122216)*x[1]**o+(-0.784104136535)*x[1]
-        arg[1,0,1,0]=(0.624178362847)*x[0]**o+(0.161787148072)*x[0]+(-0.0906465041298)*x[1]**o+(-0.0302149132362)*x[1]
-        arg[1,0,1,1]=(-0.403988173215)*x[0]**o+(-0.423895624882)*x[0]+(-0.0594261878161)*x[1]**o+(0.71753539369)*x[1]
-        arg[1,0,2,0]=(0.411689797339)*x[0]**o+(0.0555768292842)*x[0]+(0.786614145981)*x[1]**o+(-0.701418967065)*x[1]
-        arg[1,0,2,1]=(0.971933572797)*x[0]**o+(0.203165120814)*x[0]+(0.50340688009)*x[1]**o+(-0.443869607992)*x[1]
-        arg[1,1,0,0]=(0.517782412737)*x[0]**o+(-0.233071827503)*x[0]+(0.310115588175)*x[1]**o+(-0.970604318783)*x[1]
-        arg[1,1,0,1]=(0.250379154253)*x[0]**o+(-0.0914513321258)*x[0]+(0.466403827523)*x[1]**o+(-0.454369386353)*x[1]
-        arg[1,1,1,0]=(-0.235520035004)*x[0]**o+(0.0932661387959)*x[0]+(0.0964933173918)*x[1]**o+(0.585245824454)*x[1]
-        arg[1,1,1,1]=(-0.466145341257)*x[0]**o+(0.532910678544)*x[0]+(0.757545184326)*x[1]**o+(-0.488241176428)*x[1]
-        arg[1,1,2,0]=(0.802070127079)*x[0]**o+(0.30227826497)*x[0]+(0.76818718588)*x[1]**o+(-0.966380392422)*x[1]
-        arg[1,1,2,1]=(0.764411747219)*x[0]**o+(0.62151105703)*x[0]+(0.310875960956)*x[1]**o+(0.218417169467)*x[1]
-        arg[1,2,0,0]=(0.627865841486)*x[0]**o+(0.328844171432)*x[0]+(0.47405718918)*x[1]**o+(0.238471462812)*x[1]
-        arg[1,2,0,1]=(-0.890402471541)*x[0]**o+(0.0654874441479)*x[0]+(0.411199516291)*x[1]**o+(0.0669990208336)*x[1]
-        arg[1,2,1,0]=(-0.789401901979)*x[0]**o+(-0.379725885915)*x[0]+(-0.103817842125)*x[1]**o+(0.358055283478)*x[1]
-        arg[1,2,1,1]=(-0.619688531158)*x[0]**o+(0.314022911152)*x[0]+(-0.515963904961)*x[1]**o+(0.807912272743)*x[1]
-        arg[1,2,2,0]=(0.696584946679)*x[0]**o+(-0.156405028983)*x[0]+(0.99374085906)*x[1]**o+(0.692362331558)*x[1]
-        arg[1,2,2,1]=(0.463393460998)*x[0]**o+(-0.0302433372264)*x[0]+(0.243006695756)*x[1]**o+(0.934578685307)*x[1]
-        arg[1,3,0,0]=(-0.760149691585)*x[0]**o+(0.305312987392)*x[0]+(0.478665319824)*x[1]**o+(-0.395734016727)*x[1]
-        arg[1,3,0,1]=(-0.495638457166)*x[0]**o+(-0.352868042523)*x[0]+(0.0577132713041)*x[1]**o+(0.856507718332)*x[1]
-        arg[1,3,1,0]=(-0.588160041725)*x[0]**o+(-0.941242199161)*x[0]+(-0.883563055172)*x[1]**o+(-0.474349426459)*x[1]
-        arg[1,3,1,1]=(-0.822752260982)*x[0]**o+(0.284881595545)*x[0]+(-0.914198363943)*x[1]**o+(0.421107500666)*x[1]
-        arg[1,3,2,0]=(-0.125099230328)*x[0]**o+(-0.0167977306674)*x[0]+(-0.880147366581)*x[1]**o+(0.947650728684)*x[1]
-        arg[1,3,2,1]=(-0.770895899992)*x[0]**o+(-0.121705997003)*x[0]+(-0.0486858273347)*x[1]**o+(0.666179109672)*x[1]
-        arg[1,4,0,0]=(-0.767476534476)*x[0]**o+(0.720013119195)*x[0]+(-0.540220631624)*x[1]**o+(-0.363702385125)*x[1]
-        arg[1,4,0,1]=(0.90195509915)*x[0]**o+(0.104569298687)*x[0]+(0.901816813435)*x[1]**o+(0.421060929159)*x[1]
-        arg[1,4,1,0]=(0.0901631681262)*x[0]**o+(-0.330570875574)*x[0]+(0.892147778885)*x[1]**o+(-0.102976747188)*x[1]
-        arg[1,4,1,1]=(-0.336016437275)*x[0]**o+(-0.00913798206221)*x[0]+(-0.20211674106)*x[1]**o+(-0.0470039081275)*x[1]
-        arg[1,4,2,0]=(0.194383418491)*x[0]**o+(-0.913993330791)*x[0]+(-0.0207457431142)*x[1]**o+(-0.728130242724)*x[1]
-        arg[1,4,2,1]=(-0.285983741049)*x[0]**o+(-0.359824200302)*x[0]+(-0.286913656927)*x[1]**o+(-0.801477464894)*x[1]
-        arg[2,0,0,0]=(-0.266085322677)*x[0]**o+(-0.477036323188)*x[0]+(0.967304544659)*x[1]**o+(-0.843721203165)*x[1]
-        arg[2,0,0,1]=(-0.431692878995)*x[0]**o+(-0.326793076488)*x[0]+(0.478220893643)*x[1]**o+(-0.953607426852)*x[1]
-        arg[2,0,1,0]=(0.800398295672)*x[0]**o+(-0.726923243756)*x[0]+(0.641194491232)*x[1]**o+(0.933755071699)*x[1]
-        arg[2,0,1,1]=(0.778158607269)*x[0]**o+(0.192895772287)*x[0]+(0.160540751687)*x[1]**o+(0.132780133987)*x[1]
-        arg[2,0,2,0]=(0.0700487728725)*x[0]**o+(0.366571342769)*x[0]+(0.213123464402)*x[1]**o+(0.0224970803568)*x[1]
-        arg[2,0,2,1]=(-0.608321696505)*x[0]**o+(0.416761589908)*x[0]+(0.0499280394381)*x[1]**o+(-0.678150075911)*x[1]
-        arg[2,1,0,0]=(-0.580987690899)*x[0]**o+(-0.625951863984)*x[0]+(0.0064094419355)*x[1]**o+(0.646045286912)*x[1]
-        arg[2,1,0,1]=(-0.881255703221)*x[0]**o+(-0.153796152409)*x[0]+(0.320566497467)*x[1]**o+(-0.217827916224)*x[1]
-        arg[2,1,1,0]=(0.981593086009)*x[0]**o+(0.659643450249)*x[0]+(0.824530802391)*x[1]**o+(0.109125926037)*x[1]
-        arg[2,1,1,1]=(-0.79695617371)*x[0]**o+(-0.340030091407)*x[0]+(0.476648191338)*x[1]**o+(-0.751961375342)*x[1]
-        arg[2,1,2,0]=(0.00785807621726)*x[0]**o+(-0.177037931946)*x[0]+(-0.322685883101)*x[1]**o+(0.639485466195)*x[1]
-        arg[2,1,2,1]=(0.386667953213)*x[0]**o+(0.805115373435)*x[0]+(0.489529148574)*x[1]**o+(0.380650996708)*x[1]
-        arg[2,2,0,0]=(-0.205678281473)*x[0]**o+(0.725798252716)*x[0]+(-0.884620261631)*x[1]**o+(0.737678769923)*x[1]
-        arg[2,2,0,1]=(-0.859841848792)*x[0]**o+(0.215497396508)*x[0]+(-0.9231710768)*x[1]**o+(-0.504914651252)*x[1]
-        arg[2,2,1,0]=(-0.0161889255216)*x[0]**o+(0.218150095097)*x[0]+(0.508505799895)*x[1]**o+(0.441270271663)*x[1]
-        arg[2,2,1,1]=(0.645494826531)*x[0]**o+(0.812462584734)*x[0]+(0.498639261012)*x[1]**o+(0.695415642432)*x[1]
-        arg[2,2,2,0]=(-0.855342734108)*x[0]**o+(0.174928383231)*x[0]+(-0.550636347213)*x[1]**o+(0.814295216919)*x[1]
-        arg[2,2,2,1]=(-0.146152468476)*x[0]**o+(-0.810876776267)*x[0]+(0.77444775812)*x[1]**o+(0.758171250375)*x[1]
-        arg[2,3,0,0]=(0.914771099535)*x[0]**o+(-0.801103658802)*x[0]+(-0.339761119169)*x[1]**o+(-0.0697409372498)*x[1]
-        arg[2,3,0,1]=(-0.278017621273)*x[0]**o+(-0.916896227964)*x[0]+(0.0151205004002)*x[1]**o+(-0.36424189479)*x[1]
-        arg[2,3,1,0]=(0.635845368235)*x[0]**o+(-0.286420165946)*x[0]+(-0.547314386502)*x[1]**o+(-0.297882680065)*x[1]
-        arg[2,3,1,1]=(0.236860892332)*x[0]**o+(0.670289851551)*x[0]+(-0.437288046493)*x[1]**o+(0.0610684872034)*x[1]
-        arg[2,3,2,0]=(0.096479176127)*x[0]**o+(-0.992608241155)*x[0]+(0.622650933171)*x[1]**o+(-0.171594052732)*x[1]
-        arg[2,3,2,1]=(0.259913661654)*x[0]**o+(0.521353257934)*x[0]+(0.141212812345)*x[1]**o+(0.0311971708742)*x[1]
-        arg[2,4,0,0]=(0.208498140469)*x[0]**o+(0.914285328223)*x[0]+(-0.368860713612)*x[1]**o+(0.744057640483)*x[1]
-        arg[2,4,0,1]=(-0.0760701135919)*x[0]**o+(-0.0666410245297)*x[0]+(-0.442858585142)*x[1]**o+(-0.869273907698)*x[1]
-        arg[2,4,1,0]=(0.694291134331)*x[0]**o+(0.153487646161)*x[0]+(-0.454726570824)*x[1]**o+(0.12533511793)*x[1]
-        arg[2,4,1,1]=(0.505643124198)*x[0]**o+(0.935208927517)*x[0]+(0.120271053976)*x[1]**o+(0.472499209985)*x[1]
-        arg[2,4,2,0]=(0.458890639035)*x[0]**o+(-0.38125264637)*x[0]+(-0.742525095759)*x[1]**o+(0.0727341692272)*x[1]
-        arg[2,4,2,1]=(-0.228856512525)*x[0]**o+(0.215540806099)*x[0]+(-0.492076254398)*x[1]**o+(0.325121281149)*x[1]
-        arg[3,0,0,0]=(0.791320435019)*x[0]**o+(0.264208069532)*x[0]+(0.105218141263)*x[1]**o+(-0.947073121631)*x[1]
-        arg[3,0,0,1]=(0.384081306848)*x[0]**o+(-0.735420806741)*x[0]+(0.695451719819)*x[1]**o+(-0.104071285853)*x[1]
-        arg[3,0,1,0]=(0.176280431402)*x[0]**o+(0.766248516714)*x[0]+(0.620920827635)*x[1]**o+(0.571778731591)*x[1]
-        arg[3,0,1,1]=(0.895148060637)*x[0]**o+(0.120401904357)*x[0]+(0.500131556768)*x[1]**o+(-0.432523916076)*x[1]
-        arg[3,0,2,0]=(-0.171375065793)*x[0]**o+(0.731777853738)*x[0]+(0.914774635339)*x[1]**o+(-0.329504614878)*x[1]
-        arg[3,0,2,1]=(-0.65523706909)*x[0]**o+(-0.309487164889)*x[0]+(-0.244763521442)*x[1]**o+(0.790744116827)*x[1]
-        arg[3,1,0,0]=(-0.515742288)*x[0]**o+(0.688021032329)*x[0]+(0.744558730681)*x[1]**o+(0.663410706435)*x[1]
-        arg[3,1,0,1]=(0.299920493853)*x[0]**o+(0.221554378219)*x[0]+(-0.262111371211)*x[1]**o+(0.597219370531)*x[1]
-        arg[3,1,1,0]=(-0.491648532317)*x[0]**o+(-0.0763921400417)*x[0]+(0.517994656474)*x[1]**o+(0.690649210498)*x[1]
-        arg[3,1,1,1]=(0.291881729319)*x[0]**o+(0.388296683726)*x[0]+(0.304223657331)*x[1]**o+(-0.17249216188)*x[1]
-        arg[3,1,2,0]=(0.309288981861)*x[0]**o+(-0.638172982762)*x[0]+(-0.566768084047)*x[1]**o+(-0.694439437371)*x[1]
-        arg[3,1,2,1]=(-0.680391436031)*x[0]**o+(0.876096306554)*x[0]+(0.676979754874)*x[1]**o+(0.376507786465)*x[1]
-        arg[3,2,0,0]=(-0.688464200232)*x[0]**o+(0.404140014906)*x[0]+(-0.389359624725)*x[1]**o+(0.218257423404)*x[1]
-        arg[3,2,0,1]=(-0.321661287857)*x[0]**o+(0.305707842777)*x[0]+(0.0488067596906)*x[1]**o+(0.475071042874)*x[1]
-        arg[3,2,1,0]=(-0.172172832131)*x[0]**o+(-0.0589598637728)*x[0]+(0.997578239775)*x[1]**o+(0.0919614884141)*x[1]
-        arg[3,2,1,1]=(0.500590025777)*x[0]**o+(0.258724052781)*x[0]+(0.233819575609)*x[1]**o+(0.787949345995)*x[1]
-        arg[3,2,2,0]=(-0.464931198743)*x[0]**o+(0.689246395117)*x[0]+(0.0701366334357)*x[1]**o+(-0.206391031385)*x[1]
-        arg[3,2,2,1]=(-0.352492545609)*x[0]**o+(-0.160385273073)*x[0]+(0.876791526094)*x[1]**o+(0.748257988817)*x[1]
-        arg[3,3,0,0]=(0.70346530112)*x[0]**o+(-0.351192123239)*x[0]+(-0.985298342079)*x[1]**o+(-0.286817451723)*x[1]
-        arg[3,3,0,1]=(0.841285056577)*x[0]**o+(0.741986440026)*x[0]+(-0.758645627646)*x[1]**o+(-0.914494381783)*x[1]
-        arg[3,3,1,0]=(-0.614293213484)*x[0]**o+(-0.746555667296)*x[0]+(-0.301781252786)*x[1]**o+(-0.721633195357)*x[1]
-        arg[3,3,1,1]=(-0.287510519978)*x[0]**o+(-0.764960517935)*x[0]+(-0.948032248565)*x[1]**o+(-0.548676002552)*x[1]
-        arg[3,3,2,0]=(0.145506943729)*x[0]**o+(-0.353925293653)*x[0]+(0.786904887352)*x[1]**o+(-0.36548133551)*x[1]
-        arg[3,3,2,1]=(0.60782215735)*x[0]**o+(0.872444227513)*x[0]+(-0.237571902274)*x[1]**o+(-0.0559745367747)*x[1]
-        arg[3,4,0,0]=(0.691107698337)*x[0]**o+(0.0800532750053)*x[0]+(-0.847456183316)*x[1]**o+(0.911068576288)*x[1]
-        arg[3,4,0,1]=(-0.00167606578449)*x[0]**o+(-0.697603805697)*x[0]+(-0.362440886816)*x[1]**o+(-0.0604379772766)*x[1]
-        arg[3,4,1,0]=(-0.74026325403)*x[0]**o+(-0.539076677004)*x[0]+(-0.317176913637)*x[1]**o+(0.759776288772)*x[1]
-        arg[3,4,1,1]=(-0.230005454291)*x[0]**o+(-0.929557352119)*x[0]+(-0.435125210116)*x[1]**o+(0.106892135893)*x[1]
-        arg[3,4,2,0]=(-0.638149620463)*x[0]**o+(-0.0511424128986)*x[0]+(0.460436795546)*x[1]**o+(-0.919535518181)*x[1]
-        arg[3,4,2,1]=(-0.793537245531)*x[0]**o+(0.409768940347)*x[0]+(0.632560678557)*x[1]**o+(0.700596370851)*x[1]
-        ref[0,0,0,0]=(-0.596353540657)/(o+1.)+(0.420599412158)+(-0.348972036919)*0.5**o
-        ref[0,0,0,1]=(0.261409664458)/(o+1.)+(0.391909190657)+(0.187733014896)*0.5**o
-        ref[0,0,1,0]=(0.59127040848)/(o+1.)+(-0.563448202311)+(0.951655197513)*0.5**o
-        ref[0,0,1,1]=(0.77162116582)/(o+1.)+(-0.319989986697)+(-0.188127934304)*0.5**o
-        ref[0,0,2,0]=(0.908566805373)/(o+1.)+(-0.619969504781)+(0.770717242337)*0.5**o
-        ref[0,0,2,1]=(-0.724584621389)/(o+1.)+(0.474757060008)+(-0.543253359807)*0.5**o
-        ref[0,1,0,0]=(0.520162431169)/(o+1.)+(0.271653771717)+(0.986939140609)*0.5**o
-        ref[0,1,0,1]=(0.43818378458)/(o+1.)+(-0.372085975318)+(-0.171773212929)*0.5**o
-        ref[0,1,1,0]=(0.422340945702)/(o+1.)+(0.458371792807)+(-0.369350989684)*0.5**o
-        ref[0,1,1,1]=(-0.0464190048363)/(o+1.)+(0.0694711771999)+(0.559606389467)*0.5**o
-        ref[0,1,2,0]=(-0.347984444559)/(o+1.)+(-0.355420275708)+(-0.989408371198)*0.5**o
-        ref[0,1,2,1]=(-0.124928198101)/(o+1.)+(0.0306015328506)+(-0.289295900777)*0.5**o
-        ref[0,2,0,0]=(0.446169236302)/(o+1.)+(-0.473078979432)+(0.132599667548)*0.5**o
-        ref[0,2,0,1]=(-0.258525519083)/(o+1.)+(-0.0431484138534)+(-0.452662917924)*0.5**o
-        ref[0,2,1,0]=(-0.209089266173)/(o+1.)+(0.742394708205)+(0.318740871592)*0.5**o
-        ref[0,2,1,1]=(0.954836398565)/(o+1.)+(-0.13832175844)+(-0.825757440563)*0.5**o
-        ref[0,2,2,0]=(-0.0327529254483)/(o+1.)+(0.267659992607)+(-0.640337007803)*0.5**o
-        ref[0,2,2,1]=(0.312023159058)/(o+1.)+(0.612331584205)+(-0.956300293885)*0.5**o
-        ref[0,3,0,0]=(-0.431859510779)/(o+1.)+(-0.351884774058)+(-0.927040285049)*0.5**o
-        ref[0,3,0,1]=(0.274814268019)/(o+1.)+(-0.064760471806)+(-0.807009561768)*0.5**o
-        ref[0,3,1,0]=(0.130437344004)/(o+1.)+(0.328368426492)+(0.931774139846)*0.5**o
-        ref[0,3,1,1]=(-0.313484462262)/(o+1.)+(-0.132757088027)+(-0.314188008746)*0.5**o
-        ref[0,3,2,0]=(-0.451892315269)/(o+1.)+(0.306590170858)+(0.748691505108)*0.5**o
-        ref[0,3,2,1]=(0.864166710803)/(o+1.)+(0.0632261444916)+(-0.124290384657)*0.5**o
-        ref[0,4,0,0]=(-0.364735884875)/(o+1.)+(0.232568195007)+(-0.726606985714)*0.5**o
-        ref[0,4,0,1]=(0.924535166786)/(o+1.)+(0.632362544326)+(-0.716457484159)*0.5**o
-        ref[0,4,1,0]=(-0.738258048173)/(o+1.)+(-0.102170669441)+(-0.67154700238)*0.5**o
-        ref[0,4,1,1]=(0.592223896873)/(o+1.)+(-0.160061987092)+(-0.568569022142)*0.5**o
-        ref[0,4,2,0]=(0.447944032533)/(o+1.)+(-0.708884469036)+(0.959619955514)*0.5**o
-        ref[0,4,2,1]=(0.383143400712)/(o+1.)+(0.0885429052198)+(-0.446578795272)*0.5**o
-        ref[1,0,0,0]=(-0.871963625443)/(o+1.)+(-0.149605030268)+(0.130600745253)*0.5**o
-        ref[1,0,0,1]=(0.511206122216)/(o+1.)+(-0.541100696719)+(-0.684630134211)*0.5**o
-        ref[1,0,1,0]=(-0.0906465041298)/(o+1.)+(0.065786117418)+(0.624178362847)*0.5**o
-        ref[1,0,1,1]=(-0.0594261878161)/(o+1.)+(0.146819884404)+(-0.403988173215)*0.5**o
-        ref[1,0,2,0]=(0.786614145981)/(o+1.)+(-0.32292106889)+(0.411689797339)*0.5**o
-        ref[1,0,2,1]=(0.50340688009)/(o+1.)+(-0.120352243589)+(0.971933572797)*0.5**o
-        ref[1,1,0,0]=(0.310115588175)/(o+1.)+(-0.601838073143)+(0.517782412737)*0.5**o
-        ref[1,1,0,1]=(0.466403827523)/(o+1.)+(-0.27291035924)+(0.250379154253)*0.5**o
-        ref[1,1,1,0]=(0.0964933173918)/(o+1.)+(0.339255981625)+(-0.235520035004)*0.5**o
-        ref[1,1,1,1]=(0.757545184326)/(o+1.)+(0.0223347510579)+(-0.466145341257)*0.5**o
-        ref[1,1,2,0]=(0.76818718588)/(o+1.)+(-0.332051063726)+(0.802070127079)*0.5**o
-        ref[1,1,2,1]=(0.310875960956)/(o+1.)+(0.419964113249)+(0.764411747219)*0.5**o
-        ref[1,2,0,0]=(0.47405718918)/(o+1.)+(0.283657817122)+(0.627865841486)*0.5**o
-        ref[1,2,0,1]=(0.411199516291)/(o+1.)+(0.0662432324908)+(-0.890402471541)*0.5**o
-        ref[1,2,1,0]=(-0.103817842125)/(o+1.)+(-0.0108353012186)+(-0.789401901979)*0.5**o
-        ref[1,2,1,1]=(-0.515963904961)/(o+1.)+(0.560967591948)+(-0.619688531158)*0.5**o
-        ref[1,2,2,0]=(0.99374085906)/(o+1.)+(0.267978651288)+(0.696584946679)*0.5**o
-        ref[1,2,2,1]=(0.243006695756)/(o+1.)+(0.45216767404)+(0.463393460998)*0.5**o
-        ref[1,3,0,0]=(0.478665319824)/(o+1.)+(-0.0452105146678)+(-0.760149691585)*0.5**o
-        ref[1,3,0,1]=(0.0577132713041)/(o+1.)+(0.251819837904)+(-0.495638457166)*0.5**o
-        ref[1,3,1,0]=(-0.883563055172)/(o+1.)+(-0.70779581281)+(-0.588160041725)*0.5**o
-        ref[1,3,1,1]=(-0.914198363943)/(o+1.)+(0.352994548105)+(-0.822752260982)*0.5**o
-        ref[1,3,2,0]=(-0.880147366581)/(o+1.)+(0.465426499008)+(-0.125099230328)*0.5**o
-        ref[1,3,2,1]=(-0.0486858273347)/(o+1.)+(0.272236556335)+(-0.770895899992)*0.5**o
-        ref[1,4,0,0]=(-0.540220631624)/(o+1.)+(0.178155367035)+(-0.767476534476)*0.5**o
-        ref[1,4,0,1]=(0.901816813435)/(o+1.)+(0.262815113923)+(0.90195509915)*0.5**o
-        ref[1,4,1,0]=(0.892147778885)/(o+1.)+(-0.216773811381)+(0.0901631681262)*0.5**o
-        ref[1,4,1,1]=(-0.20211674106)/(o+1.)+(-0.0280709450949)+(-0.336016437275)*0.5**o
-        ref[1,4,2,0]=(-0.0207457431142)/(o+1.)+(-0.821061786757)+(0.194383418491)*0.5**o
-        ref[1,4,2,1]=(-0.286913656927)/(o+1.)+(-0.580650832598)+(-0.285983741049)*0.5**o
-        ref[2,0,0,0]=(0.967304544659)/(o+1.)+(-0.660378763176)+(-0.266085322677)*0.5**o
-        ref[2,0,0,1]=(0.478220893643)/(o+1.)+(-0.64020025167)+(-0.431692878995)*0.5**o
-        ref[2,0,1,0]=(0.641194491232)/(o+1.)+(0.103415913972)+(0.800398295672)*0.5**o
-        ref[2,0,1,1]=(0.160540751687)/(o+1.)+(0.162837953137)+(0.778158607269)*0.5**o
-        ref[2,0,2,0]=(0.213123464402)/(o+1.)+(0.194534211563)+(0.0700487728725)*0.5**o
-        ref[2,0,2,1]=(0.0499280394381)/(o+1.)+(-0.130694243001)+(-0.608321696505)*0.5**o
-        ref[2,1,0,0]=(0.0064094419355)/(o+1.)+(0.0100467114639)+(-0.580987690899)*0.5**o
-        ref[2,1,0,1]=(0.320566497467)/(o+1.)+(-0.185812034316)+(-0.881255703221)*0.5**o
-        ref[2,1,1,0]=(0.824530802391)/(o+1.)+(0.384384688143)+(0.981593086009)*0.5**o
-        ref[2,1,1,1]=(0.476648191338)/(o+1.)+(-0.545995733375)+(-0.79695617371)*0.5**o
-        ref[2,1,2,0]=(-0.322685883101)/(o+1.)+(0.231223767125)+(0.00785807621726)*0.5**o
-        ref[2,1,2,1]=(0.489529148574)/(o+1.)+(0.592883185071)+(0.386667953213)*0.5**o
-        ref[2,2,0,0]=(-0.884620261631)/(o+1.)+(0.73173851132)+(-0.205678281473)*0.5**o
-        ref[2,2,0,1]=(-0.9231710768)/(o+1.)+(-0.144708627372)+(-0.859841848792)*0.5**o
-        ref[2,2,1,0]=(0.508505799895)/(o+1.)+(0.32971018338)+(-0.0161889255216)*0.5**o
-        ref[2,2,1,1]=(0.498639261012)/(o+1.)+(0.753939113583)+(0.645494826531)*0.5**o
-        ref[2,2,2,0]=(-0.550636347213)/(o+1.)+(0.494611800075)+(-0.855342734108)*0.5**o
-        ref[2,2,2,1]=(0.77444775812)/(o+1.)+(-0.0263527629459)+(-0.146152468476)*0.5**o
-        ref[2,3,0,0]=(-0.339761119169)/(o+1.)+(-0.435422298026)+(0.914771099535)*0.5**o
-        ref[2,3,0,1]=(0.0151205004002)/(o+1.)+(-0.640569061377)+(-0.278017621273)*0.5**o
-        ref[2,3,1,0]=(-0.547314386502)/(o+1.)+(-0.292151423006)+(0.635845368235)*0.5**o
-        ref[2,3,1,1]=(-0.437288046493)/(o+1.)+(0.365679169377)+(0.236860892332)*0.5**o
-        ref[2,3,2,0]=(0.622650933171)/(o+1.)+(-0.582101146943)+(0.096479176127)*0.5**o
-        ref[2,3,2,1]=(0.141212812345)/(o+1.)+(0.276275214404)+(0.259913661654)*0.5**o
-        ref[2,4,0,0]=(-0.368860713612)/(o+1.)+(0.829171484353)+(0.208498140469)*0.5**o
-        ref[2,4,0,1]=(-0.442858585142)/(o+1.)+(-0.467957466114)+(-0.0760701135919)*0.5**o
-        ref[2,4,1,0]=(-0.454726570824)/(o+1.)+(0.139411382046)+(0.694291134331)*0.5**o
-        ref[2,4,1,1]=(0.120271053976)/(o+1.)+(0.703854068751)+(0.505643124198)*0.5**o
-        ref[2,4,2,0]=(-0.742525095759)/(o+1.)+(-0.154259238572)+(0.458890639035)*0.5**o
-        ref[2,4,2,1]=(-0.492076254398)/(o+1.)+(0.270331043624)+(-0.228856512525)*0.5**o
-        ref[3,0,0,0]=(0.105218141263)/(o+1.)+(-0.34143252605)+(0.791320435019)*0.5**o
-        ref[3,0,0,1]=(0.695451719819)/(o+1.)+(-0.419746046297)+(0.384081306848)*0.5**o
-        ref[3,0,1,0]=(0.620920827635)/(o+1.)+(0.669013624153)+(0.176280431402)*0.5**o
-        ref[3,0,1,1]=(0.500131556768)/(o+1.)+(-0.15606100586)+(0.895148060637)*0.5**o
-        ref[3,0,2,0]=(0.914774635339)/(o+1.)+(0.20113661943)+(-0.171375065793)*0.5**o
-        ref[3,0,2,1]=(-0.244763521442)/(o+1.)+(0.240628475969)+(-0.65523706909)*0.5**o
-        ref[3,1,0,0]=(0.744558730681)/(o+1.)+(0.675715869382)+(-0.515742288)*0.5**o
-        ref[3,1,0,1]=(-0.262111371211)/(o+1.)+(0.409386874375)+(0.299920493853)*0.5**o
-        ref[3,1,1,0]=(0.517994656474)/(o+1.)+(0.307128535228)+(-0.491648532317)*0.5**o
-        ref[3,1,1,1]=(0.304223657331)/(o+1.)+(0.107902260923)+(0.291881729319)*0.5**o
-        ref[3,1,2,0]=(-0.566768084047)/(o+1.)+(-0.666306210066)+(0.309288981861)*0.5**o
-        ref[3,1,2,1]=(0.676979754874)/(o+1.)+(0.62630204651)+(-0.680391436031)*0.5**o
-        ref[3,2,0,0]=(-0.389359624725)/(o+1.)+(0.311198719155)+(-0.688464200232)*0.5**o
-        ref[3,2,0,1]=(0.0488067596906)/(o+1.)+(0.390389442826)+(-0.321661287857)*0.5**o
-        ref[3,2,1,0]=(0.997578239775)/(o+1.)+(0.0165008123207)+(-0.172172832131)*0.5**o
-        ref[3,2,1,1]=(0.233819575609)/(o+1.)+(0.523336699388)+(0.500590025777)*0.5**o
-        ref[3,2,2,0]=(0.0701366334357)/(o+1.)+(0.241427681866)+(-0.464931198743)*0.5**o
-        ref[3,2,2,1]=(0.876791526094)/(o+1.)+(0.293936357872)+(-0.352492545609)*0.5**o
-        ref[3,3,0,0]=(-0.985298342079)/(o+1.)+(-0.319004787481)+(0.70346530112)*0.5**o
-        ref[3,3,0,1]=(-0.758645627646)/(o+1.)+(-0.0862539708788)+(0.841285056577)*0.5**o
-        ref[3,3,1,0]=(-0.301781252786)/(o+1.)+(-0.734094431327)+(-0.614293213484)*0.5**o
-        ref[3,3,1,1]=(-0.948032248565)/(o+1.)+(-0.656818260243)+(-0.287510519978)*0.5**o
-        ref[3,3,2,0]=(0.786904887352)/(o+1.)+(-0.359703314582)+(0.145506943729)*0.5**o
-        ref[3,3,2,1]=(-0.237571902274)/(o+1.)+(0.408234845369)+(0.60782215735)*0.5**o
-        ref[3,4,0,0]=(-0.847456183316)/(o+1.)+(0.495560925646)+(0.691107698337)*0.5**o
-        ref[3,4,0,1]=(-0.362440886816)/(o+1.)+(-0.379020891487)+(-0.00167606578449)*0.5**o
-        ref[3,4,1,0]=(-0.317176913637)/(o+1.)+(0.110349805884)+(-0.74026325403)*0.5**o
-        ref[3,4,1,1]=(-0.435125210116)/(o+1.)+(-0.411332608113)+(-0.230005454291)*0.5**o
-        ref[3,4,2,0]=(0.460436795546)/(o+1.)+(-0.48533896554)+(-0.638149620463)*0.5**o
-        ref[3,4,2,1]=(0.632560678557)/(o+1.)+(0.555182655599)+(-0.793537245531)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.816458625566)*x[0]**o+(-0.438180707327)*x[0]+(-0.39836196112)*x[1]**o+(0.641701267855)*x[1]+(0.919064096208)*x[2]**o+(0.0155653082454)*x[2]
-        arg[0,0,0,1]=(-0.709065020122)*x[0]**o+(-0.787938005558)*x[0]+(-0.459829890247)*x[1]**o+(-0.306587811189)*x[1]+(0.648348776519)*x[2]**o+(-0.782857657922)*x[2]
-        arg[0,0,1,0]=(-0.09165636265)*x[0]**o+(-0.215464577259)*x[0]+(-0.445060581145)*x[1]**o+(0.541797069021)*x[1]+(-0.312096860473)*x[2]**o+(0.307061070632)*x[2]
-        arg[0,0,1,1]=(0.900670566988)*x[0]**o+(-0.157226841228)*x[0]+(-0.00514019601556)*x[1]**o+(0.167616993369)*x[1]+(0.331077209212)*x[2]**o+(0.0797784869412)*x[2]
-        arg[0,0,2,0]=(-0.883617789072)*x[0]**o+(-0.233507045302)*x[0]+(0.540311388635)*x[1]**o+(-0.0698351272775)*x[1]+(0.598059668701)*x[2]**o+(-0.842961707358)*x[2]
-        arg[0,0,2,1]=(-0.770041366552)*x[0]**o+(-0.683157969301)*x[0]+(0.235580399076)*x[1]**o+(-0.994177047985)*x[1]+(-0.90074656484)*x[2]**o+(-0.0133600820046)*x[2]
-        arg[0,1,0,0]=(0.90396926296)*x[0]**o+(0.0492056402145)*x[0]+(0.32744155595)*x[1]**o+(0.0162505824727)*x[1]+(0.386607661085)*x[2]**o+(0.759639829913)*x[2]
-        arg[0,1,0,1]=(0.47956310963)*x[0]**o+(0.638067028609)*x[0]+(-0.520596788355)*x[1]**o+(0.476897948019)*x[1]+(0.950320232053)*x[2]**o+(-0.603034001297)*x[2]
-        arg[0,1,1,0]=(-0.75177304495)*x[0]**o+(0.369014786745)*x[0]+(-0.332220011735)*x[1]**o+(-0.835059332186)*x[1]+(0.0494323092557)*x[2]**o+(-0.796200422375)*x[2]
-        arg[0,1,1,1]=(-0.109937058453)*x[0]**o+(0.607637390544)*x[0]+(0.464147925564)*x[1]**o+(0.650325883743)*x[1]+(0.698196425121)*x[2]**o+(0.933002044297)*x[2]
-        arg[0,1,2,0]=(-0.13801307581)*x[0]**o+(0.75768744715)*x[0]+(-0.35990643116)*x[1]**o+(-0.787975707318)*x[1]+(-0.259281382264)*x[2]**o+(0.971003238549)*x[2]
-        arg[0,1,2,1]=(-0.518540484981)*x[0]**o+(0.197912267942)*x[0]+(0.481058074022)*x[1]**o+(0.918189335061)*x[1]+(0.160239271801)*x[2]**o+(0.75950986792)*x[2]
-        arg[0,2,0,0]=(0.286922773164)*x[0]**o+(-0.874592150595)*x[0]+(0.416014232771)*x[1]**o+(-0.492379239759)*x[1]+(0.950640982197)*x[2]**o+(-0.10625158241)*x[2]
-        arg[0,2,0,1]=(-0.116447648923)*x[0]**o+(-0.499481854319)*x[0]+(-0.556602044084)*x[1]**o+(0.753256358343)*x[1]+(0.280780022694)*x[2]**o+(-0.879728755507)*x[2]
-        arg[0,2,1,0]=(-0.322803067618)*x[0]**o+(0.0974878233964)*x[0]+(0.420547949274)*x[1]**o+(0.304839957099)*x[1]+(-0.12605355567)*x[2]**o+(-0.166970509739)*x[2]
-        arg[0,2,1,1]=(0.997823909059)*x[0]**o+(0.76749010767)*x[0]+(0.376351544673)*x[1]**o+(-0.316937252621)*x[1]+(-0.627670639733)*x[2]**o+(0.584121037987)*x[2]
-        arg[0,2,2,0]=(0.516866019209)*x[0]**o+(0.413564799736)*x[0]+(-0.0730736747833)*x[1]**o+(-0.500984764568)*x[1]+(-0.989323894645)*x[2]**o+(-0.261458643035)*x[2]
-        arg[0,2,2,1]=(0.777538237337)*x[0]**o+(-0.0623276952959)*x[0]+(0.167068351133)*x[1]**o+(-0.345550070545)*x[1]+(-0.28166577069)*x[2]**o+(-0.568650037569)*x[2]
-        arg[0,3,0,0]=(-0.622067362782)*x[0]**o+(0.971384323624)*x[0]+(-0.099597286042)*x[1]**o+(-0.265680407306)*x[1]+(-0.446275631545)*x[2]**o+(-0.0637591060995)*x[2]
-        arg[0,3,0,1]=(-0.49698112241)*x[0]**o+(0.766181263321)*x[0]+(-0.977014162391)*x[1]**o+(0.806444170647)*x[1]+(-0.441023882645)*x[2]**o+(-0.919279365683)*x[2]
-        arg[0,3,1,0]=(0.917091542097)*x[0]**o+(-0.67016353228)*x[0]+(0.0468346020734)*x[1]**o+(0.81092419675)*x[1]+(0.174037096652)*x[2]**o+(0.564190407348)*x[2]
-        arg[0,3,1,1]=(-0.437188100982)*x[0]**o+(-0.0857174204982)*x[0]+(-0.971592105442)*x[1]**o+(-0.122352019844)*x[1]+(-0.853225566811)*x[2]**o+(-0.861128476903)*x[2]
-        arg[0,3,2,0]=(-0.841265485658)*x[0]**o+(0.553186811235)*x[0]+(0.414489259007)*x[1]**o+(-0.800997281522)*x[1]+(0.630269543743)*x[2]**o+(0.263584335528)*x[2]
-        arg[0,3,2,1]=(0.383282548921)*x[0]**o+(0.260041562865)*x[0]+(-0.95180999378)*x[1]**o+(0.566954668715)*x[1]+(0.688843907846)*x[2]**o+(-0.166837115553)*x[2]
-        arg[0,4,0,0]=(0.0385891845805)*x[0]**o+(0.324932244772)*x[0]+(-0.946997425504)*x[1]**o+(-0.745439090316)*x[1]+(-0.721657519976)*x[2]**o+(-0.714366519961)*x[2]
-        arg[0,4,0,1]=(-0.387739686761)*x[0]**o+(-0.860915144676)*x[0]+(0.270056169204)*x[1]**o+(-0.914861208322)*x[1]+(-0.453514265988)*x[2]**o+(-0.495768314604)*x[2]
-        arg[0,4,1,0]=(-0.329464483421)*x[0]**o+(0.313424566493)*x[0]+(0.185677682455)*x[1]**o+(-0.720200750426)*x[1]+(0.425742092834)*x[2]**o+(0.505209526425)*x[2]
-        arg[0,4,1,1]=(0.63272559561)*x[0]**o+(-0.026429919604)*x[0]+(-0.14023723263)*x[1]**o+(-0.580805084228)*x[1]+(0.141232832837)*x[2]**o+(0.241327430534)*x[2]
-        arg[0,4,2,0]=(-0.847582850604)*x[0]**o+(0.207270297356)*x[0]+(0.851958035148)*x[1]**o+(0.336594484304)*x[1]+(-0.221434386211)*x[2]**o+(-0.607602400875)*x[2]
-        arg[0,4,2,1]=(-0.722990535113)*x[0]**o+(-0.379964881881)*x[0]+(0.825779173038)*x[1]**o+(-0.285509543358)*x[1]+(-0.518809494335)*x[2]**o+(-0.788507606636)*x[2]
-        arg[1,0,0,0]=(0.0725951752952)*x[0]**o+(-0.282800153416)*x[0]+(-0.0228303688498)*x[1]**o+(-0.863127549259)*x[1]+(-0.383553228278)*x[2]**o+(-0.0151737809185)*x[2]
-        arg[1,0,0,1]=(-0.254920010173)*x[0]**o+(0.160195189848)*x[0]+(0.216407190109)*x[1]**o+(-0.814599655672)*x[1]+(0.771746025302)*x[2]**o+(0.0636221760766)*x[2]
-        arg[1,0,1,0]=(0.486342223622)*x[0]**o+(0.736242651359)*x[0]+(0.720722697611)*x[1]**o+(0.974853194395)*x[1]+(-0.834707965096)*x[2]**o+(-0.947169299038)*x[2]
-        arg[1,0,1,1]=(0.777015150638)*x[0]**o+(-0.228082772046)*x[0]+(-0.51095285588)*x[1]**o+(-0.835057692508)*x[1]+(-0.564012944223)*x[2]**o+(-0.898040787549)*x[2]
-        arg[1,0,2,0]=(0.240813275278)*x[0]**o+(-0.509566588932)*x[0]+(0.247803237451)*x[1]**o+(0.156442781059)*x[1]+(0.618367580757)*x[2]**o+(0.943435734207)*x[2]
-        arg[1,0,2,1]=(-0.670257601629)*x[0]**o+(-0.470716006203)*x[0]+(-0.559207336128)*x[1]**o+(-0.81577896974)*x[1]+(0.0571093198914)*x[2]**o+(0.477103420898)*x[2]
-        arg[1,1,0,0]=(0.985895581872)*x[0]**o+(-0.00359465828149)*x[0]+(0.00739312124399)*x[1]**o+(-0.931299968425)*x[1]+(-0.10047347666)*x[2]**o+(0.410589913002)*x[2]
-        arg[1,1,0,1]=(-0.954132399275)*x[0]**o+(0.159222338169)*x[0]+(-0.865370419503)*x[1]**o+(-0.744696059283)*x[1]+(-0.794993976252)*x[2]**o+(0.961664562839)*x[2]
-        arg[1,1,1,0]=(0.462810965625)*x[0]**o+(0.927378551017)*x[0]+(-0.105005418179)*x[1]**o+(0.282340667975)*x[1]+(-0.443931241323)*x[2]**o+(0.740071617715)*x[2]
-        arg[1,1,1,1]=(0.645629353541)*x[0]**o+(0.848804271896)*x[0]+(-0.882497356826)*x[1]**o+(-0.74661619875)*x[1]+(-0.927133238344)*x[2]**o+(-0.502758459229)*x[2]
-        arg[1,1,2,0]=(-0.554993653726)*x[0]**o+(-0.473286752336)*x[0]+(0.759624773306)*x[1]**o+(0.809169103932)*x[1]+(0.657766085675)*x[2]**o+(0.763913478843)*x[2]
-        arg[1,1,2,1]=(0.1476587556)*x[0]**o+(0.385711162597)*x[0]+(-0.0767252754622)*x[1]**o+(-0.544968629318)*x[1]+(0.16751959089)*x[2]**o+(-0.742697412247)*x[2]
-        arg[1,2,0,0]=(-0.715887407694)*x[0]**o+(0.273818352078)*x[0]+(0.0426629688432)*x[1]**o+(-0.808531265186)*x[1]+(-0.699839650334)*x[2]**o+(-0.332093073009)*x[2]
-        arg[1,2,0,1]=(0.48440337855)*x[0]**o+(0.765443731546)*x[0]+(-0.0761968055499)*x[1]**o+(0.0516389293584)*x[1]+(-0.486224925751)*x[2]**o+(-0.796105709176)*x[2]
-        arg[1,2,1,0]=(0.621562227153)*x[0]**o+(0.907213416636)*x[0]+(0.591392192921)*x[1]**o+(-0.825911160831)*x[1]+(0.690773959314)*x[2]**o+(-0.744144678185)*x[2]
-        arg[1,2,1,1]=(0.472846565983)*x[0]**o+(-0.837395663533)*x[0]+(0.526438435448)*x[1]**o+(0.310053110281)*x[1]+(0.634301291566)*x[2]**o+(0.608270679412)*x[2]
-        arg[1,2,2,0]=(-0.212000572333)*x[0]**o+(0.644218219058)*x[0]+(0.827779140409)*x[1]**o+(0.563968121281)*x[1]+(-0.0556319977635)*x[2]**o+(0.98126338415)*x[2]
-        arg[1,2,2,1]=(-0.632752637148)*x[0]**o+(-0.999490611532)*x[0]+(0.0717950178432)*x[1]**o+(-0.0611949850049)*x[1]+(0.740177288895)*x[2]**o+(0.241010363236)*x[2]
-        arg[1,3,0,0]=(0.390081216336)*x[0]**o+(-0.389460065845)*x[0]+(0.0812808695521)*x[1]**o+(0.0843698990866)*x[1]+(0.672844227186)*x[2]**o+(0.306345015188)*x[2]
-        arg[1,3,0,1]=(-0.402887151891)*x[0]**o+(-0.908615473265)*x[0]+(-0.296307155209)*x[1]**o+(0.228858413043)*x[1]+(0.509401868055)*x[2]**o+(-0.793787805038)*x[2]
-        arg[1,3,1,0]=(0.253947492129)*x[0]**o+(0.401465417831)*x[0]+(-0.942329176703)*x[1]**o+(-0.518371272083)*x[1]+(0.90142806242)*x[2]**o+(0.694084281869)*x[2]
-        arg[1,3,1,1]=(-0.435656267291)*x[0]**o+(-0.743058541536)*x[0]+(-0.22434079396)*x[1]**o+(-0.414125965702)*x[1]+(0.743546448275)*x[2]**o+(0.323188772386)*x[2]
-        arg[1,3,2,0]=(-0.069319863146)*x[0]**o+(-0.0749969565014)*x[0]+(0.29700943253)*x[1]**o+(0.972639470201)*x[1]+(-0.270592469279)*x[2]**o+(-0.355098058901)*x[2]
-        arg[1,3,2,1]=(0.741825647399)*x[0]**o+(0.542055833087)*x[0]+(-0.0684409109262)*x[1]**o+(0.842094761143)*x[1]+(-0.777320219447)*x[2]**o+(0.758570478904)*x[2]
-        arg[1,4,0,0]=(-0.66003338591)*x[0]**o+(-0.393755284573)*x[0]+(0.617154869065)*x[1]**o+(-0.480999198967)*x[1]+(0.350625972066)*x[2]**o+(0.733472524967)*x[2]
-        arg[1,4,0,1]=(-0.0001759210396)*x[0]**o+(-0.0900574950432)*x[0]+(-0.592936627579)*x[1]**o+(-0.647214933825)*x[1]+(-0.43249743908)*x[2]**o+(-0.901387692551)*x[2]
-        arg[1,4,1,0]=(0.052435899043)*x[0]**o+(0.163326392489)*x[0]+(0.433169876656)*x[1]**o+(0.977133611649)*x[1]+(-0.311959404527)*x[2]**o+(0.297218570651)*x[2]
-        arg[1,4,1,1]=(0.00806522196579)*x[0]**o+(-0.121807466189)*x[0]+(-0.176557734776)*x[1]**o+(0.865146379005)*x[1]+(-0.304648040177)*x[2]**o+(0.269150163824)*x[2]
-        arg[1,4,2,0]=(0.440212388104)*x[0]**o+(-0.590292628428)*x[0]+(-0.595359323633)*x[1]**o+(0.606734888384)*x[1]+(-0.951693103773)*x[2]**o+(-0.539741612207)*x[2]
-        arg[1,4,2,1]=(0.346121727918)*x[0]**o+(0.188961570963)*x[0]+(0.402818736255)*x[1]**o+(-0.474029523974)*x[1]+(-0.95972237672)*x[2]**o+(0.983543070357)*x[2]
-        arg[2,0,0,0]=(-0.801941188348)*x[0]**o+(-0.318215868754)*x[0]+(0.322031073259)*x[1]**o+(-0.00368402006147)*x[1]+(0.473846239338)*x[2]**o+(0.512752561753)*x[2]
-        arg[2,0,0,1]=(0.786459471841)*x[0]**o+(0.941049841845)*x[0]+(0.064717660139)*x[1]**o+(-0.891518891268)*x[1]+(-0.317681565962)*x[2]**o+(-0.672310725168)*x[2]
-        arg[2,0,1,0]=(0.813571093948)*x[0]**o+(-0.146551267883)*x[0]+(0.942106359835)*x[1]**o+(0.165543949281)*x[1]+(-0.0301736488709)*x[2]**o+(0.936915469225)*x[2]
-        arg[2,0,1,1]=(-0.0298664722355)*x[0]**o+(-0.596644819792)*x[0]+(-0.306728572634)*x[1]**o+(0.770671782936)*x[1]+(-0.334606536003)*x[2]**o+(0.888940190159)*x[2]
-        arg[2,0,2,0]=(0.688553055025)*x[0]**o+(-0.241541868482)*x[0]+(-0.694609526571)*x[1]**o+(-0.509896457784)*x[1]+(-0.0610272843414)*x[2]**o+(-0.251290389152)*x[2]
-        arg[2,0,2,1]=(-0.959007707329)*x[0]**o+(-0.193856482901)*x[0]+(-0.138697126551)*x[1]**o+(0.768166305153)*x[1]+(0.951006645306)*x[2]**o+(-0.533986863953)*x[2]
-        arg[2,1,0,0]=(0.648021743651)*x[0]**o+(-0.839074631201)*x[0]+(-0.445337118707)*x[1]**o+(0.997475278653)*x[1]+(-0.154475323496)*x[2]**o+(-0.45292992537)*x[2]
-        arg[2,1,0,1]=(-0.134785884326)*x[0]**o+(-0.906738442209)*x[0]+(0.00509900741927)*x[1]**o+(0.489865232888)*x[1]+(0.620823018353)*x[2]**o+(-0.480127263607)*x[2]
-        arg[2,1,1,0]=(-0.210371458935)*x[0]**o+(0.308453655681)*x[0]+(-0.510473100104)*x[1]**o+(-0.0776488834445)*x[1]+(0.58103002434)*x[2]**o+(0.039267622777)*x[2]
-        arg[2,1,1,1]=(-0.124204683462)*x[0]**o+(0.429525935007)*x[0]+(0.183174600008)*x[1]**o+(-0.665914708196)*x[1]+(-0.576713549033)*x[2]**o+(-0.3788567811)*x[2]
-        arg[2,1,2,0]=(-0.864065825608)*x[0]**o+(0.644046059464)*x[0]+(-0.265959280151)*x[1]**o+(0.989465634246)*x[1]+(0.536466956842)*x[2]**o+(0.689999246325)*x[2]
-        arg[2,1,2,1]=(0.37622234855)*x[0]**o+(-0.905554688955)*x[0]+(-0.0258037833143)*x[1]**o+(-0.23415538846)*x[1]+(-0.64461795706)*x[2]**o+(0.262259040646)*x[2]
-        arg[2,2,0,0]=(0.0541619627989)*x[0]**o+(-0.978918782799)*x[0]+(0.478333900479)*x[1]**o+(0.958652455667)*x[1]+(-0.746701804693)*x[2]**o+(-0.557405653804)*x[2]
-        arg[2,2,0,1]=(0.611472347101)*x[0]**o+(-0.409754132769)*x[0]+(0.291274496706)*x[1]**o+(0.901983238042)*x[1]+(-0.102917678824)*x[2]**o+(-0.668205224505)*x[2]
-        arg[2,2,1,0]=(-0.926062469523)*x[0]**o+(0.101032437783)*x[0]+(-0.385485330853)*x[1]**o+(0.0521756546126)*x[1]+(0.132320977758)*x[2]**o+(0.471619572767)*x[2]
-        arg[2,2,1,1]=(0.0689111652346)*x[0]**o+(-0.517070173331)*x[0]+(-0.599184868344)*x[1]**o+(-0.814239996638)*x[1]+(0.97403158037)*x[2]**o+(-0.546843890524)*x[2]
-        arg[2,2,2,0]=(-0.133251706696)*x[0]**o+(-0.0954736405212)*x[0]+(0.780584398494)*x[1]**o+(-0.505305860913)*x[1]+(-0.11518705364)*x[2]**o+(0.0855698333433)*x[2]
-        arg[2,2,2,1]=(-0.567309977436)*x[0]**o+(-0.284182307402)*x[0]+(0.220302202269)*x[1]**o+(-0.252628588826)*x[1]+(-0.368390646272)*x[2]**o+(-0.577499260947)*x[2]
-        arg[2,3,0,0]=(0.477968626266)*x[0]**o+(0.522764690241)*x[0]+(-0.0339165683557)*x[1]**o+(0.623897338329)*x[1]+(-0.169558925831)*x[2]**o+(-0.426663511213)*x[2]
-        arg[2,3,0,1]=(0.185482762361)*x[0]**o+(0.496017413966)*x[0]+(-0.217189284009)*x[1]**o+(0.488205372581)*x[1]+(0.445762454794)*x[2]**o+(-0.423587587222)*x[2]
-        arg[2,3,1,0]=(-0.489549524298)*x[0]**o+(-0.482299084307)*x[0]+(0.567729727254)*x[1]**o+(-0.341933025591)*x[1]+(-0.325429025641)*x[2]**o+(0.476030984261)*x[2]
-        arg[2,3,1,1]=(-0.390754226646)*x[0]**o+(-0.980255652462)*x[0]+(0.109328516217)*x[1]**o+(-0.0141509875662)*x[1]+(0.486458644215)*x[2]**o+(-0.668018419371)*x[2]
-        arg[2,3,2,0]=(0.352912006363)*x[0]**o+(-0.542969561227)*x[0]+(0.512067200296)*x[1]**o+(0.661110389562)*x[1]+(0.289744832231)*x[2]**o+(-0.176943484459)*x[2]
-        arg[2,3,2,1]=(0.535262244127)*x[0]**o+(0.528325019892)*x[0]+(-0.106312276613)*x[1]**o+(-0.484575045858)*x[1]+(-0.407717587021)*x[2]**o+(-0.786366604025)*x[2]
-        arg[2,4,0,0]=(-0.511771630262)*x[0]**o+(-0.590485876141)*x[0]+(0.493685168985)*x[1]**o+(-0.726700517739)*x[1]+(-0.213137223607)*x[2]**o+(-0.566923814015)*x[2]
-        arg[2,4,0,1]=(0.421559088561)*x[0]**o+(0.838784944841)*x[0]+(-0.693654869402)*x[1]**o+(-0.0755493272975)*x[1]+(-0.174245799979)*x[2]**o+(0.242245946157)*x[2]
-        arg[2,4,1,0]=(0.681235817735)*x[0]**o+(-0.313564199551)*x[0]+(0.663598935418)*x[1]**o+(-0.604327253895)*x[1]+(0.698985821444)*x[2]**o+(0.298899431146)*x[2]
-        arg[2,4,1,1]=(0.432866305507)*x[0]**o+(-0.891501121013)*x[0]+(-0.290106178906)*x[1]**o+(0.268152357012)*x[1]+(0.75279498948)*x[2]**o+(0.211312203371)*x[2]
-        arg[2,4,2,0]=(-0.956901622446)*x[0]**o+(0.742548241435)*x[0]+(-0.956209816095)*x[1]**o+(-0.539017080821)*x[1]+(-0.08062797007)*x[2]**o+(0.383843198102)*x[2]
-        arg[2,4,2,1]=(-0.16700370288)*x[0]**o+(0.388837619298)*x[0]+(-0.190586726252)*x[1]**o+(0.916004535916)*x[1]+(0.310254387059)*x[2]**o+(-0.380371301717)*x[2]
-        arg[3,0,0,0]=(0.64046380712)*x[0]**o+(0.254058760972)*x[0]+(-0.829050222873)*x[1]**o+(0.289942284927)*x[1]+(0.196268101069)*x[2]**o+(0.748880970446)*x[2]
-        arg[3,0,0,1]=(-0.226057776579)*x[0]**o+(0.982685008224)*x[0]+(0.819680514589)*x[1]**o+(0.48005222662)*x[1]+(-0.615248069776)*x[2]**o+(-0.0923489923012)*x[2]
-        arg[3,0,1,0]=(-0.358031084019)*x[0]**o+(-0.83941518843)*x[0]+(-0.0687218422525)*x[1]**o+(-0.648976147029)*x[1]+(0.711009285701)*x[2]**o+(0.360758898243)*x[2]
-        arg[3,0,1,1]=(-0.312175299678)*x[0]**o+(0.360877864123)*x[0]+(0.653283960509)*x[1]**o+(0.323527948404)*x[1]+(-0.278454805659)*x[2]**o+(0.0585194127844)*x[2]
-        arg[3,0,2,0]=(0.367207247645)*x[0]**o+(-0.0743547693027)*x[0]+(-0.473358544608)*x[1]**o+(0.332985041128)*x[1]+(-0.899612971909)*x[2]**o+(0.69409768473)*x[2]
-        arg[3,0,2,1]=(-0.806787228991)*x[0]**o+(-0.110344204889)*x[0]+(-0.631610779885)*x[1]**o+(0.0239853435419)*x[1]+(0.83036063388)*x[2]**o+(0.623825256849)*x[2]
-        arg[3,1,0,0]=(-0.268344201624)*x[0]**o+(-0.59230799177)*x[0]+(0.493719194706)*x[1]**o+(-0.128351291806)*x[1]+(0.0584636422077)*x[2]**o+(0.0859725996454)*x[2]
-        arg[3,1,0,1]=(-0.870410307785)*x[0]**o+(-0.917370176071)*x[0]+(0.395701966434)*x[1]**o+(0.694856510628)*x[1]+(-0.748440730513)*x[2]**o+(0.748465450614)*x[2]
-        arg[3,1,1,0]=(-0.178465888488)*x[0]**o+(-0.956884701156)*x[0]+(0.0472790389286)*x[1]**o+(0.946702274722)*x[1]+(-0.200668750878)*x[2]**o+(-0.0104023894447)*x[2]
-        arg[3,1,1,1]=(0.113559334778)*x[0]**o+(0.270505514561)*x[0]+(-0.238008799138)*x[1]**o+(0.533067625871)*x[1]+(-0.586814102301)*x[2]**o+(0.045657074859)*x[2]
-        arg[3,1,2,0]=(-0.574716699633)*x[0]**o+(-0.659499274639)*x[0]+(0.892605757655)*x[1]**o+(-0.39697940457)*x[1]+(0.363011145793)*x[2]**o+(-0.364722526091)*x[2]
-        arg[3,1,2,1]=(-0.0193167048813)*x[0]**o+(0.761104649925)*x[0]+(0.490164183635)*x[1]**o+(0.10693267057)*x[1]+(0.635328989408)*x[2]**o+(-0.353114187925)*x[2]
-        arg[3,2,0,0]=(0.0777423524941)*x[0]**o+(-0.431011355257)*x[0]+(-0.356762042134)*x[1]**o+(-0.94361679144)*x[1]+(-0.716191700456)*x[2]**o+(0.49906825221)*x[2]
-        arg[3,2,0,1]=(0.80859948321)*x[0]**o+(0.542680788872)*x[0]+(-0.626897369633)*x[1]**o+(-0.821877255135)*x[1]+(-0.455575534023)*x[2]**o+(0.317480554025)*x[2]
-        arg[3,2,1,0]=(-0.0144328272818)*x[0]**o+(-0.395367848628)*x[0]+(-0.601042089925)*x[1]**o+(-0.0822921879892)*x[1]+(0.896199761801)*x[2]**o+(-0.215055215166)*x[2]
-        arg[3,2,1,1]=(0.377945289524)*x[0]**o+(-0.580064012583)*x[0]+(0.993926713349)*x[1]**o+(-0.736307101943)*x[1]+(-0.939628422411)*x[2]**o+(-0.923219473393)*x[2]
-        arg[3,2,2,0]=(-0.733150287394)*x[0]**o+(0.692501827859)*x[0]+(0.904655347343)*x[1]**o+(0.310386512564)*x[1]+(-0.93795078156)*x[2]**o+(0.772534565721)*x[2]
-        arg[3,2,2,1]=(-0.155229801255)*x[0]**o+(0.580356480314)*x[0]+(0.0673352927499)*x[1]**o+(-0.274975805243)*x[1]+(0.553818209037)*x[2]**o+(-0.835142674988)*x[2]
-        arg[3,3,0,0]=(0.60752130978)*x[0]**o+(0.847750395856)*x[0]+(0.8635279539)*x[1]**o+(0.16341072973)*x[1]+(0.470011948821)*x[2]**o+(0.41529971393)*x[2]
-        arg[3,3,0,1]=(0.755049219363)*x[0]**o+(0.66080573214)*x[0]+(-0.0256982576552)*x[1]**o+(-0.0311937109251)*x[1]+(-0.028843413794)*x[2]**o+(-0.19345503082)*x[2]
-        arg[3,3,1,0]=(-0.39765237082)*x[0]**o+(-0.746359385218)*x[0]+(0.275396324626)*x[1]**o+(0.064571659107)*x[1]+(0.771289010752)*x[2]**o+(-6.69891594269e-05)*x[2]
-        arg[3,3,1,1]=(0.350497253938)*x[0]**o+(-0.236419516561)*x[0]+(0.673483791847)*x[1]**o+(-0.934644138115)*x[1]+(0.994408125332)*x[2]**o+(-0.398423596854)*x[2]
-        arg[3,3,2,0]=(-0.952544750261)*x[0]**o+(0.24256752245)*x[0]+(0.376782843601)*x[1]**o+(-0.349840168156)*x[1]+(-0.260325141903)*x[2]**o+(-0.452866344447)*x[2]
-        arg[3,3,2,1]=(-0.0232941915849)*x[0]**o+(0.191625715695)*x[0]+(-0.490187753329)*x[1]**o+(-0.823976612466)*x[1]+(0.476804203752)*x[2]**o+(0.61057521184)*x[2]
-        arg[3,4,0,0]=(0.0279130167137)*x[0]**o+(-0.134953133648)*x[0]+(0.0821614836141)*x[1]**o+(-0.894046763697)*x[1]+(-0.497197221983)*x[2]**o+(0.586297244251)*x[2]
-        arg[3,4,0,1]=(0.0423746259802)*x[0]**o+(0.458075512165)*x[0]+(0.855157549678)*x[1]**o+(-0.607654212682)*x[1]+(-0.672693159955)*x[2]**o+(-0.300116892313)*x[2]
-        arg[3,4,1,0]=(-0.695685046398)*x[0]**o+(-0.709807910289)*x[0]+(-0.167879145281)*x[1]**o+(0.524084329764)*x[1]+(0.763706690019)*x[2]**o+(-0.219502671318)*x[2]
-        arg[3,4,1,1]=(0.864599640696)*x[0]**o+(-0.341125612414)*x[0]+(-0.548888211648)*x[1]**o+(0.918497762429)*x[1]+(-0.445600024463)*x[2]**o+(0.221658300325)*x[2]
-        arg[3,4,2,0]=(-0.893419673448)*x[0]**o+(0.653718653341)*x[0]+(0.323868832441)*x[1]**o+(0.905933530129)*x[1]+(0.62045953406)*x[2]**o+(0.145474797235)*x[2]
-        arg[3,4,2,1]=(0.480643160777)*x[0]**o+(-0.15896921521)*x[0]+(-0.329564714008)*x[1]**o+(-0.613303857496)*x[1]+(-0.483827450625)*x[2]**o+(-0.91023336048)*x[2]
-        ref[0,0,0,0]=(0.520702135089)/(o+1.)+(0.109542934387)+(0.816458625566)*0.5**o
-        ref[0,0,0,1]=(0.188518886272)/(o+1.)+(-0.938691737334)+(-0.709065020122)*0.5**o
-        ref[0,0,1,0]=(-0.757157441618)/(o+1.)+(0.316696781197)+(-0.09165636265)*0.5**o
-        ref[0,0,1,1]=(0.325937013197)/(o+1.)+(0.0450843195409)+(0.900670566988)*0.5**o
-        ref[0,0,2,0]=(1.13837105734)/(o+1.)+(-0.573151939969)+(-0.883617789072)*0.5**o
-        ref[0,0,2,1]=(-0.665166165764)/(o+1.)+(-0.845347549645)+(-0.770041366552)*0.5**o
-        ref[0,1,0,0]=(0.714049217035)/(o+1.)+(0.4125480263)+(0.90396926296)*0.5**o
-        ref[0,1,0,1]=(0.429723443697)/(o+1.)+(0.255965487666)+(0.47956310963)*0.5**o
-        ref[0,1,1,0]=(-0.282787702479)/(o+1.)+(-0.631122483908)+(-0.75177304495)*0.5**o
-        ref[0,1,1,1]=(1.16234435068)/(o+1.)+(1.09548265929)+(-0.109937058453)*0.5**o
-        ref[0,1,2,0]=(-0.619187813423)/(o+1.)+(0.47035748919)+(-0.13801307581)*0.5**o
-        ref[0,1,2,1]=(0.641297345823)/(o+1.)+(0.937805735461)+(-0.518540484981)*0.5**o
-        ref[0,2,0,0]=(1.36665521497)/(o+1.)+(-0.736611486382)+(0.286922773164)*0.5**o
-        ref[0,2,0,1]=(-0.27582202139)/(o+1.)+(-0.312977125741)+(-0.116447648923)*0.5**o
-        ref[0,2,1,0]=(0.294494393603)/(o+1.)+(0.117678635379)+(-0.322803067618)*0.5**o
-        ref[0,2,1,1]=(-0.251319095061)/(o+1.)+(0.517336946518)+(0.997823909059)*0.5**o
-        ref[0,2,2,0]=(-1.06239756943)/(o+1.)+(-0.174439303934)+(0.516866019209)*0.5**o
-        ref[0,2,2,1]=(-0.114597419557)/(o+1.)+(-0.488263901705)+(0.777538237337)*0.5**o
-        ref[0,3,0,0]=(-0.545872917587)/(o+1.)+(0.320972405109)+(-0.622067362782)*0.5**o
-        ref[0,3,0,1]=(-1.41803804504)/(o+1.)+(0.326673034142)+(-0.49698112241)*0.5**o
-        ref[0,3,1,0]=(0.220871698725)/(o+1.)+(0.352475535909)+(0.917091542097)*0.5**o
-        ref[0,3,1,1]=(-1.82481767225)/(o+1.)+(-0.534598958622)+(-0.437188100982)*0.5**o
-        ref[0,3,2,0]=(1.04475880275)/(o+1.)+(0.00788693262039)+(-0.841265485658)*0.5**o
-        ref[0,3,2,1]=(-0.262966085934)/(o+1.)+(0.330079558014)+(0.383282548921)*0.5**o
-        ref[0,4,0,0]=(-1.66865494548)/(o+1.)+(-0.567436682752)+(0.0385891845805)*0.5**o
-        ref[0,4,0,1]=(-0.183458096784)/(o+1.)+(-1.1357723338)+(-0.387739686761)*0.5**o
-        ref[0,4,1,0]=(0.611419775289)/(o+1.)+(0.0492166712458)+(-0.329464483421)*0.5**o
-        ref[0,4,1,1]=(0.000995600207189)/(o+1.)+(-0.182953786649)+(0.63272559561)*0.5**o
-        ref[0,4,2,0]=(0.630523648936)/(o+1.)+(-0.0318688096074)+(-0.847582850604)*0.5**o
-        ref[0,4,2,1]=(0.306969678703)/(o+1.)+(-0.726991015938)+(-0.722990535113)*0.5**o
-        ref[1,0,0,0]=(-0.406383597128)/(o+1.)+(-0.580550741796)+(0.0725951752952)*0.5**o
-        ref[1,0,0,1]=(0.988153215411)/(o+1.)+(-0.295391144874)+(-0.254920010173)*0.5**o
-        ref[1,0,1,0]=(-0.113985267485)/(o+1.)+(0.381963273358)+(0.486342223622)*0.5**o
-        ref[1,0,1,1]=(-1.0749658001)/(o+1.)+(-0.980590626052)+(0.777015150638)*0.5**o
-        ref[1,0,2,0]=(0.866170818208)/(o+1.)+(0.295155963167)+(0.240813275278)*0.5**o
-        ref[1,0,2,1]=(-0.502098016236)/(o+1.)+(-0.404695777523)+(-0.670257601629)*0.5**o
-        ref[1,1,0,0]=(-0.0930803554155)/(o+1.)+(-0.262152356852)+(0.985895581872)*0.5**o
-        ref[1,1,0,1]=(-1.66036439576)/(o+1.)+(0.188095420862)+(-0.954132399275)*0.5**o
-        ref[1,1,1,0]=(-0.548936659502)/(o+1.)+(0.974895418354)+(0.462810965625)*0.5**o
-        ref[1,1,1,1]=(-1.80963059517)/(o+1.)+(-0.200285193041)+(0.645629353541)*0.5**o
-        ref[1,1,2,0]=(1.41739085898)/(o+1.)+(0.549897915219)+(-0.554993653726)*0.5**o
-        ref[1,1,2,1]=(0.0907943154278)/(o+1.)+(-0.450977439484)+(0.1476587556)*0.5**o
-        ref[1,2,0,0]=(-0.657176681491)/(o+1.)+(-0.433402993059)+(-0.715887407694)*0.5**o
-        ref[1,2,0,1]=(-0.562421731301)/(o+1.)+(0.0104884758643)+(0.48440337855)*0.5**o
-        ref[1,2,1,0]=(1.28216615223)/(o+1.)+(-0.33142121119)+(0.621562227153)*0.5**o
-        ref[1,2,1,1]=(1.16073972701)/(o+1.)+(0.0404640630801)+(0.472846565983)*0.5**o
-        ref[1,2,2,0]=(0.772147142645)/(o+1.)+(1.09472486224)+(-0.212000572333)*0.5**o
-        ref[1,2,2,1]=(0.811972306738)/(o+1.)+(-0.409837616651)+(-0.632752637148)*0.5**o
-        ref[1,3,0,0]=(0.754125096738)/(o+1.)+(0.000627424214716)+(0.390081216336)*0.5**o
-        ref[1,3,0,1]=(0.213094712846)/(o+1.)+(-0.73677243263)+(-0.402887151891)*0.5**o
-        ref[1,3,1,0]=(-0.0409011142831)/(o+1.)+(0.288589213809)+(0.253947492129)*0.5**o
-        ref[1,3,1,1]=(0.519205654314)/(o+1.)+(-0.416997867426)+(-0.435656267291)*0.5**o
-        ref[1,3,2,0]=(0.0264169632513)/(o+1.)+(0.271272227399)+(-0.069319863146)*0.5**o
-        ref[1,3,2,1]=(-0.845761130374)/(o+1.)+(1.07136053657)+(0.741825647399)*0.5**o
-        ref[1,4,0,0]=(0.967780841131)/(o+1.)+(-0.0706409792865)+(-0.66003338591)*0.5**o
-        ref[1,4,0,1]=(-1.02543406666)/(o+1.)+(-0.81933006071)+(-0.0001759210396)*0.5**o
-        ref[1,4,1,0]=(0.121210472128)/(o+1.)+(0.718839287394)+(0.052435899043)*0.5**o
-        ref[1,4,1,1]=(-0.481205774953)/(o+1.)+(0.50624453832)+(0.00806522196579)*0.5**o
-        ref[1,4,2,0]=(-1.54705242741)/(o+1.)+(-0.261649676126)+(0.440212388104)*0.5**o
-        ref[1,4,2,1]=(-0.556903640465)/(o+1.)+(0.349237558673)+(0.346121727918)*0.5**o
-        ref[2,0,0,0]=(0.795877312597)/(o+1.)+(0.0954263364687)+(-0.801941188348)*0.5**o
-        ref[2,0,0,1]=(-0.252963905823)/(o+1.)+(-0.311389887295)+(0.786459471841)*0.5**o
-        ref[2,0,1,0]=(0.911932710964)/(o+1.)+(0.477954075311)+(0.813571093948)*0.5**o
-        ref[2,0,1,1]=(-0.641335108636)/(o+1.)+(0.531483576652)+(-0.0298664722355)*0.5**o
-        ref[2,0,2,0]=(-0.755636810913)/(o+1.)+(-0.501364357709)+(0.688553055025)*0.5**o
-        ref[2,0,2,1]=(0.812309518755)/(o+1.)+(0.0201614791497)+(-0.959007707329)*0.5**o
-        ref[2,1,0,0]=(-0.599812442203)/(o+1.)+(-0.147264638959)+(0.648021743651)*0.5**o
-        ref[2,1,0,1]=(0.625922025772)/(o+1.)+(-0.448500236464)+(-0.134785884326)*0.5**o
-        ref[2,1,1,0]=(0.0705569242367)/(o+1.)+(0.135036197507)+(-0.210371458935)*0.5**o
-        ref[2,1,1,1]=(-0.393538949024)/(o+1.)+(-0.307622777145)+(-0.124204683462)*0.5**o
-        ref[2,1,2,0]=(0.270507676691)/(o+1.)+(1.16175547002)+(-0.864065825608)*0.5**o
-        ref[2,1,2,1]=(-0.670421740374)/(o+1.)+(-0.438725518385)+(0.37622234855)*0.5**o
-        ref[2,2,0,0]=(-0.268367904213)/(o+1.)+(-0.288835990468)+(0.0541619627989)*0.5**o
-        ref[2,2,0,1]=(0.188356817882)/(o+1.)+(-0.0879880596161)+(0.611472347101)*0.5**o
-        ref[2,2,1,0]=(-0.253164353095)/(o+1.)+(0.312413832582)+(-0.926062469523)*0.5**o
-        ref[2,2,1,1]=(0.374846712027)/(o+1.)+(-0.939077030246)+(0.0689111652346)*0.5**o
-        ref[2,2,2,0]=(0.665397344854)/(o+1.)+(-0.257604834045)+(-0.133251706696)*0.5**o
-        ref[2,2,2,1]=(-0.148088444003)/(o+1.)+(-0.557155078588)+(-0.567309977436)*0.5**o
-        ref[2,3,0,0]=(-0.203475494187)/(o+1.)+(0.359999258678)+(0.477968626266)*0.5**o
-        ref[2,3,0,1]=(0.228573170785)/(o+1.)+(0.280317599662)+(0.185482762361)*0.5**o
-        ref[2,3,1,0]=(0.242300701614)/(o+1.)+(-0.174100562819)+(-0.489549524298)*0.5**o
-        ref[2,3,1,1]=(0.595787160431)/(o+1.)+(-0.8312125297)+(-0.390754226646)*0.5**o
-        ref[2,3,2,0]=(0.801812032527)/(o+1.)+(-0.0294013280621)+(0.352912006363)*0.5**o
-        ref[2,3,2,1]=(-0.514029863634)/(o+1.)+(-0.371308314996)+(0.535262244127)*0.5**o
-        ref[2,4,0,0]=(0.280547945378)/(o+1.)+(-0.942055103948)+(-0.511771630262)*0.5**o
-        ref[2,4,0,1]=(-0.867900669381)/(o+1.)+(0.50274078185)+(0.421559088561)*0.5**o
-        ref[2,4,1,0]=(1.36258475686)/(o+1.)+(-0.30949601115)+(0.681235817735)*0.5**o
-        ref[2,4,1,1]=(0.462688810574)/(o+1.)+(-0.206018280315)+(0.432866305507)*0.5**o
-        ref[2,4,2,0]=(-1.03683778617)/(o+1.)+(0.293687179358)+(-0.956901622446)*0.5**o
-        ref[2,4,2,1]=(0.119667660807)/(o+1.)+(0.462235426749)+(-0.16700370288)*0.5**o
-        ref[3,0,0,0]=(-0.632782121804)/(o+1.)+(0.646441008172)+(0.64046380712)*0.5**o
-        ref[3,0,0,1]=(0.204432444813)/(o+1.)+(0.685194121272)+(-0.226057776579)*0.5**o
-        ref[3,0,1,0]=(0.642287443449)/(o+1.)+(-0.563816218608)+(-0.358031084019)*0.5**o
-        ref[3,0,1,1]=(0.37482915485)/(o+1.)+(0.371462612656)+(-0.312175299678)*0.5**o
-        ref[3,0,2,0]=(-1.37297151652)/(o+1.)+(0.476363978278)+(0.367207247645)*0.5**o
-        ref[3,0,2,1]=(0.198749853995)/(o+1.)+(0.268733197751)+(-0.806787228991)*0.5**o
-        ref[3,1,0,0]=(0.552182836914)/(o+1.)+(-0.317343341965)+(-0.268344201624)*0.5**o
-        ref[3,1,0,1]=(-0.352738764079)/(o+1.)+(0.262975892585)+(-0.870410307785)*0.5**o
-        ref[3,1,1,0]=(-0.153389711949)/(o+1.)+(-0.0102924079393)+(-0.178465888488)*0.5**o
-        ref[3,1,1,1]=(-0.824822901439)/(o+1.)+(0.424615107645)+(0.113559334778)*0.5**o
-        ref[3,1,2,0]=(1.25561690345)/(o+1.)+(-0.71060060265)+(-0.574716699633)*0.5**o
-        ref[3,1,2,1]=(1.12549317304)/(o+1.)+(0.257461566285)+(-0.0193167048813)*0.5**o
-        ref[3,2,0,0]=(-1.07295374259)/(o+1.)+(-0.437779947243)+(0.0777423524941)*0.5**o
-        ref[3,2,0,1]=(-1.08247290366)/(o+1.)+(0.019142043881)+(0.80859948321)*0.5**o
-        ref[3,2,1,0]=(0.295157671875)/(o+1.)+(-0.346357625892)+(-0.0144328272818)*0.5**o
-        ref[3,2,1,1]=(0.054298290938)/(o+1.)+(-1.11979529396)+(0.377945289524)*0.5**o
-        ref[3,2,2,0]=(-0.0332954342171)/(o+1.)+(0.887711453071)+(-0.733150287394)*0.5**o
-        ref[3,2,2,1]=(0.621153501787)/(o+1.)+(-0.264880999958)+(-0.155229801255)*0.5**o
-        ref[3,3,0,0]=(1.33353990272)/(o+1.)+(0.713230419758)+(0.60752130978)*0.5**o
-        ref[3,3,0,1]=(-0.0545416714491)/(o+1.)+(0.218078495198)+(0.755049219363)*0.5**o
-        ref[3,3,1,0]=(1.04668533538)/(o+1.)+(-0.340927357635)+(-0.39765237082)*0.5**o
-        ref[3,3,1,1]=(1.66789191718)/(o+1.)+(-0.784743625765)+(0.350497253938)*0.5**o
-        ref[3,3,2,0]=(0.116457701698)/(o+1.)+(-0.280069495076)+(-0.952544750261)*0.5**o
-        ref[3,3,2,1]=(-0.0133835495768)/(o+1.)+(-0.0108878424651)+(-0.0232941915849)*0.5**o
-        ref[3,4,0,0]=(-0.415035738369)/(o+1.)+(-0.221351326547)+(0.0279130167137)*0.5**o
-        ref[3,4,0,1]=(0.182464389723)/(o+1.)+(-0.224847796415)+(0.0423746259802)*0.5**o
-        ref[3,4,1,0]=(0.595827544738)/(o+1.)+(-0.202613125922)+(-0.695685046398)*0.5**o
-        ref[3,4,1,1]=(-0.99448823611)/(o+1.)+(0.39951522517)+(0.864599640696)*0.5**o
-        ref[3,4,2,0]=(0.944328366501)/(o+1.)+(0.852563490353)+(-0.893419673448)*0.5**o
-        ref[3,4,2,1]=(-0.813392164634)/(o+1.)+(-0.841253216593)+(0.480643160777)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      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.241972460279)*x[0]+(0.539729925673)*x[1]
-        ref=(-0.11832904353)/(o+1.)+(0.649911364492)+(-0.399791299503)*0.5**o
-      else:
-        arg=(0.53919797656)*x[0]+(0.379010664884)*x[1]+(0.274416064529)*x[2]
-        ref=(0.307947301472)/(o+1.)+(0.120674157748)+(0.643329089005)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(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.84849017056)*x[0]+(-0.161962845202)*x[1]
-        arg[1]=(-0.794717919135)*x[0]+(1.16003773358)*x[1]
-        ref[0]=(0.780514448202)/(o+1.)+(-0.34628958021)+(0.598592037576)*0.5**o
-        ref[1]=(0.570158156278)/(o+1.)+(0.241192316704)+(-0.687222975237)*0.5**o
-      else:
-        arg[0]=(-0.637352163634)*x[0]+(1.49477462643)*x[1]+(-0.284018740238)*x[2]
-        arg[1]=(0.125937459904)*x[0]+(-0.206499869891)*x[1]+(-0.342856240345)*x[2]
-        ref[0]=(-0.274486314451)/(o+1.)+(0.379737553853)+(0.0884149293071)*0.5**o
-        ref[1]=(-0.78452814021)/(o+1.)+(-0.122017410137)+(0.605144310151)*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.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.440868762581)*x[0]+(-0.216223666616)*x[1]
-        arg[0,1]=(-1.78807355591)*x[0]+(-0.208278123838)*x[1]
-        arg[0,2]=(-0.448066998103)*x[0]+(-0.819815507826)*x[1]
-        arg[0,3]=(1.27247881689)*x[0]+(0.0653439567221)*x[1]
-        arg[0,4]=(-1.00344990223)*x[0]+(-0.291263790583)*x[1]
-        arg[1,0]=(0.440080423838)*x[0]+(0.0356836558113)*x[1]
-        arg[1,1]=(-1.49545340091)*x[0]+(-0.133615590211)*x[1]
-        arg[1,2]=(1.05947638385)*x[0]+(0.408685904238)*x[1]
-        arg[1,3]=(-0.170309086605)*x[0]+(0.660523970285)*x[1]
-        arg[1,4]=(0.764323678475)*x[0]+(-0.529415080303)*x[1]
-        arg[2,0]=(0.55270081325)*x[0]+(-1.60630146231)*x[1]
-        arg[2,1]=(1.57419330248)*x[0]+(-1.24644288706)*x[1]
-        arg[2,2]=(0.0416757238363)*x[0]+(0.0247379738465)*x[1]
-        arg[2,3]=(1.0200370393)*x[0]+(0.364209137693)*x[1]
-        arg[2,4]=(-1.21858490389)*x[0]+(0.523056254546)*x[1]
-        arg[3,0]=(0.0524205820842)*x[0]+(1.65953217854)*x[1]
-        arg[3,1]=(1.21824883395)*x[0]+(0.905190834998)*x[1]
-        arg[3,2]=(0.226344434525)*x[0]+(-0.735349531462)*x[1]
-        arg[3,3]=(-1.00295245717)*x[0]+(-0.719605376499)*x[1]
-        arg[3,4]=(-0.446228759693)*x[0]+(1.23441974277)*x[1]
-        ref[0,0]=(0.347328582602)/(o+1.)+(-0.520484463519)+(0.0365479152384)*0.5**o
-        ref[0,1]=(-0.274564442352)/(o+1.)+(-0.413557210678)+(-0.894672816039)*0.5**o
-        ref[0,2]=(0.0720644688954)/(o+1.)+(-0.906636966188)+(0.473326957552)*0.5**o
-        ref[0,3]=(-0.747749341777)/(o+1.)+(0.730249972378)+(0.625072170633)*0.5**o
-        ref[0,4]=(-0.194031116169)/(o+1.)+(-0.432063325829)+(-0.236555924983)*0.5**o
-        ref[1,0]=(0.807081538033)/(o+1.)+(-0.612266650007)+(0.893215841629)*0.5**o
-        ref[1,1]=(-0.662516518957)/(o+1.)+(-0.176318925886)+(-0.61391462039)*0.5**o
-        ref[1,2]=(-0.570345636156)/(o+1.)+(0.791877954963)+(0.454752014319)*0.5**o
-        ref[1,3]=(-0.312400910795)/(o+1.)+(0.212935137466)+(0.376745519544)*0.5**o
-        ref[1,4]=(-0.764680414264)/(o+1.)+(0.174215486579)+(0.651158039278)*0.5**o
-        ref[2,0]=(-0.837942771642)/(o+1.)+(-0.187938486702)+(0.160219095985)*0.5**o
-        ref[2,1]=(-0.672421039761)/(o+1.)+(0.17384002882)+(0.652491397549)*0.5**o
-        ref[2,2]=(-0.656187949922)/(o+1.)+(0.559888736121)+(-0.397175824637)*0.5**o
-        ref[2,3]=(0.259558368195)/(o+1.)+(0.55148644978)+(0.0217149092406)*0.5**o
-        ref[2,4]=(-0.188397537901)/(o+1.)+(-0.0561706170512)+(-0.394789877345)*0.5**o
-        ref[3,0]=(0.91055628617)/(o+1.)+(0.574211274098)+(-0.347026073739)*0.5**o
-        ref[3,1]=(0.29225509237)/(o+1.)+(0.64447705482)+(0.542230466941)*0.5**o
-        ref[3,2]=(0.121065624384)/(o+1.)+(0.0316495277836)+(-0.693369776888)*0.5**o
-        ref[3,3]=(-0.943523334976)/(o+1.)+(-0.266302644031)+(-0.246429210629)*0.5**o
-        ref[3,4]=(0.714915399455)/(o+1.)+(0.459963131994)+(-0.846650680369)*0.5**o
-      else:
-        arg[0,0]=(-0.493869713454)*x[0]+(-0.381969413515)*x[1]+(1.59862368848)*x[2]
-        arg[0,1]=(-0.581245543547)*x[0]+(0.961117271889)*x[1]+(-0.158073515343)*x[2]
-        arg[0,2]=(-0.635283143641)*x[0]+(0.695573236987)*x[1]+(-0.719180832278)*x[2]
-        arg[0,3]=(-0.737780596733)*x[0]+(-1.11171283352)*x[1]+(0.459954346315)*x[2]
-        arg[0,4]=(1.12522065074)*x[0]+(-1.08427904854)*x[1]+(-0.715679673556)*x[2]
-        arg[1,0]=(0.972468186181)*x[0]+(-0.211014530435)*x[1]+(-0.734414099002)*x[2]
-        arg[1,1]=(-1.67337704748)*x[0]+(0.871096213089)*x[1]+(1.51063313223)*x[2]
-        arg[1,2]=(-0.222013007834)*x[0]+(1.46474508326)*x[1]+(-0.979243908862)*x[2]
-        arg[1,3]=(1.21195281087)*x[0]+(0.274082389329)*x[1]+(1.56144436465)*x[2]
-        arg[1,4]=(1.35812865884)*x[0]+(1.25819798853)*x[1]+(0.895334048395)*x[2]
-        arg[2,0]=(-0.167404344437)*x[0]+(0.0710591934315)*x[1]+(-0.124469683665)*x[2]
-        arg[2,1]=(-0.492240632996)*x[0]+(-0.317251117382)*x[1]+(0.0195461703529)*x[2]
-        arg[2,2]=(-0.277590266225)*x[0]+(-1.65859476899)*x[1]+(-0.0100216405668)*x[2]
-        arg[2,3]=(-0.0701281298455)*x[0]+(0.502137254703)*x[1]+(0.701220923443)*x[2]
-        arg[2,4]=(-0.72186096407)*x[0]+(-0.900487568179)*x[1]+(-0.735573922826)*x[2]
-        arg[3,0]=(-0.0677324474129)*x[0]+(-0.649963209718)*x[1]+(-0.770861099726)*x[2]
-        arg[3,1]=(0.563588189481)*x[0]+(0.714614932251)*x[1]+(-0.0957764632886)*x[2]
-        arg[3,2]=(1.13337395062)*x[0]+(0.507556316073)*x[1]+(-0.196759085949)*x[2]
-        arg[3,3]=(-1.2636883168)*x[0]+(-0.811660344076)*x[1]+(0.645462052598)*x[2]
-        arg[3,4]=(-0.104175186987)*x[0]+(-0.929176038155)*x[1]+(1.07530379856)*x[2]
-        ref[0,0]=(0.84538674973)/(o+1.)+(0.0569713556632)+(-0.236544899547)*0.5**o
-        ref[0,1]=(-0.307689589699)/(o+1.)+(0.245040337642)+(0.0394071274131)*0.5**o
-        ref[0,2]=(0.955244736357)/(o+1.)+(-0.341771136504)+(-0.930593202281)*0.5**o
-        ref[0,3]=(-0.353490461722)/(o+1.)+(-0.476228433901)+(-0.083591754415)*0.5**o
-        ref[0,4]=(-1.31220485482)/(o+1.)+(0.0466426656676)+(0.544181452128)*0.5**o
-        ref[1,0]=(0.22773475414)/(o+1.)+(-0.488454801654)+(0.776214405914)*0.5**o
-        ref[1,1]=(1.50688678707)/(o+1.)+(0.0851415404695)+(-0.96881757017)*0.5**o
-        ref[1,2]=(0.313471097102)/(o+1.)+(-0.0875594518156)+(0.125135973096)*0.5**o
-        ref[1,3]=(0.269521220179)/(o+1.)+(1.1192007195)+(0.539556905661)*0.5**o
-        ref[1,4]=(1.91499876064)/(o+1.)+(0.509063797893)+(0.578534339343)*0.5**o
-        ref[2,0]=(0.941352651562)/(o+1.)+(-0.966199402186)+(0.770231318139)*0.5**o
-        ref[2,1]=(-0.141490823562)/(o+1.)+(-0.20919987022)+(-0.230055016023)*0.5**o
-        ref[2,2]=(-0.916148047971)/(o+1.)+(-0.371740600192)+(-0.286577427426)*0.5**o
-        ref[2,3]=(0.229516219331)/(o+1.)+(0.274790532736)+(0.354132763498)*0.5**o
-        ref[2,4]=(-1.19120612619)/(o+1.)+(-0.139859859385)+(-0.88699661011)*0.5**o
-        ref[3,0]=(-1.48630121465)/(o+1.)+(0.0744166251063)+(-0.151088792417)*0.5**o
-        ref[3,1]=(-0.335583560513)/(o+1.)+(0.277436410841)+(0.963137397276)*0.5**o
-        ref[3,2]=(-0.673942688644)/(o+1.)+(0.70077509905)+(0.716563671283)*0.5**o
-        ref[3,3]=(-0.148394092795)/(o+1.)+(-0.237190239072)+(-0.807112037336)*0.5**o
-        ref[3,4]=(0.529983886211)/(o+1.)+(-0.371055083588)+(0.254078854382)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.661725715165)*x[0]+(0.219720717581)*x[1]
-        arg[0,0,1]=(-0.642240082304)*x[0]+(-0.279652756776)*x[1]
-        arg[0,1,0]=(0.0204235813151)*x[0]+(-0.374873249933)*x[1]
-        arg[0,1,1]=(1.4418481252)*x[0]+(0.205656834772)*x[1]
-        arg[1,0,0]=(0.65992179951)*x[0]+(-1.04887875458)*x[1]
-        arg[1,0,1]=(-0.195480216199)*x[0]+(-0.373905275039)*x[1]
-        arg[1,1,0]=(0.781251543352)*x[0]+(0.0416248109536)*x[1]
-        arg[1,1,1]=(-0.925751319189)*x[0]+(-0.113992910046)*x[1]
-        arg[2,0,0]=(-0.0767414065227)*x[0]+(-0.156682840973)*x[1]
-        arg[2,0,1]=(0.688457272529)*x[0]+(0.524916336046)*x[1]
-        arg[2,1,0]=(0.753722830084)*x[0]+(-0.890325839466)*x[1]
-        arg[2,1,1]=(0.730789290145)*x[0]+(-0.278986703716)*x[1]
-        arg[3,0,0]=(-0.287376796439)*x[0]+(-0.153987233224)*x[1]
-        arg[3,0,1]=(-1.15687435255)*x[0]+(0.250005890238)*x[1]
-        arg[3,1,0]=(-0.845312830629)*x[0]+(0.256211962352)*x[1]
-        arg[3,1,1]=(-0.574311820519)*x[0]+(-0.440297035998)*x[1]
-        arg[4,0,0]=(-0.360607647308)*x[0]+(-1.29380437557)*x[1]
-        arg[4,0,1]=(1.32019433485)*x[0]+(0.295255956618)*x[1]
-        arg[4,1,0]=(-1.64162941972)*x[0]+(0.117482372162)*x[1]
-        arg[4,1,1]=(-0.303103646619)*x[0]+(-0.88458982681)*x[1]
-        arg[5,0,0]=(-0.666761879038)*x[0]+(-0.735786278877)*x[1]
-        arg[5,0,1]=(0.0892896382617)*x[0]+(-0.45478872773)*x[1]
-        arg[5,1,0]=(-0.50985624415)*x[0]+(-0.400022939567)*x[1]
-        arg[5,1,1]=(1.39240706368)*x[0]+(0.0149740822664)*x[1]
-        ref[0,0,0]=(-0.114834538488)/(o+1.)+(0.240621006484)+(0.515038958264)*0.5**o
-        ref[0,0,1]=(0.588698337077)/(o+1.)+(-0.702256377233)+(-0.10607842169)*0.5**o
-        ref[0,1,0]=(0.13849818224)/(o+1.)+(-0.277555277991)+(0.0621627051247)*0.5**o
-        ref[0,1,1]=(-0.0878009521163)/(o+1.)+(0.630168348947)+(0.474969214192)*0.5**o
-        ref[1,0,0]=(-0.696600538111)/(o+1.)+(-0.343318260912)+(0.994280104861)*0.5**o
-        ref[1,0,1]=(-0.0887026688527)/(o+1.)+(-0.385753227979)+(0.290823633572)*0.5**o
-        ref[1,1,0]=(0.831408608956)/(o+1.)+(-0.242985671853)+(0.477439089057)*0.5**o
-        ref[1,1,1]=(-0.621059053191)/(o+1.)+(-0.0700203481241)+(-0.278644479797)*0.5**o
-        ref[2,0,0]=(0.7890720399)/(o+1.)+(-0.539721196393)+(0.0569461053905)*0.5**o
-        ref[2,0,1]=(-0.228628151401)/(o+1.)+(0.826946074171)+(-0.211890388366)*0.5**o
-        ref[2,1,0]=(-0.837617325493)/(o+1.)+(0.289656653751)+(0.121701008608)*0.5**o
-        ref[2,1,1]=(0.246577988625)/(o+1.)+(0.0512227634376)+(0.102779070928)*0.5**o
-        ref[3,0,0]=(-0.0109584684212)/(o+1.)+(-0.334888666171)+(0.239371771102)*0.5**o
-        ref[3,0,1]=(-0.125987676419)/(o+1.)+(-0.170179004032)+(-0.440522777827)*0.5**o
-        ref[3,1,0]=(-0.354093141636)/(o+1.)+(-0.177294275919)+(0.119580825198)*0.5**o
-        ref[3,1,1]=(-0.746761075412)/(o+1.)+(0.192068760731)+(-0.651985302566)*0.5**o
-        ref[4,0,0]=(-0.42411673219)/(o+1.)+(-0.579162944937)+(-0.0719694008158)*0.5**o
-        ref[4,0,1]=(0.169881169584)/(o+1.)+(0.483614029132)+(0.478341063616)*0.5**o
-        ref[4,1,0]=(0.943567836264)/(o+1.)+(-0.898782941264)+(-0.670149001297)*0.5**o
-        ref[4,1,1]=(-0.703610807936)/(o+1.)+(0.225342628657)+(-0.934767922806)*0.5**o
-        ref[5,0,0]=(-0.788792225213)/(o+1.)+(-0.1768857093)+(-0.259984514102)*0.5**o
-        ref[5,0,1]=(-0.788708879899)/(o+1.)+(-0.202288491141)+(0.827786772711)*0.5**o
-        ref[5,1,0]=(-0.823081809707)/(o+1.)+(0.274720963093)+(-0.636239300197)*0.5**o
-        ref[5,1,1]=(0.498922549807)/(o+1.)+(0.0129388257746)+(0.882580944588)*0.5**o
-      else:
-        arg[0,0,0]=(-0.426613654844)*x[0]+(-1.01433980801)*x[1]+(0.564621874916)*x[2]
-        arg[0,0,1]=(-0.438521968882)*x[0]+(1.6033775267)*x[1]+(0.691349995832)*x[2]
-        arg[0,1,0]=(-0.04337513731)*x[0]+(0.142927668234)*x[1]+(0.506581723199)*x[2]
-        arg[0,1,1]=(-0.120598868162)*x[0]+(-0.213666787813)*x[1]+(-1.04221679332)*x[2]
-        arg[1,0,0]=(0.153696490712)*x[0]+(-0.122516529815)*x[1]+(-1.08837272712)*x[2]
-        arg[1,0,1]=(0.410706464237)*x[0]+(0.720079363315)*x[1]+(-0.767790357539)*x[2]
-        arg[1,1,0]=(-1.03726428173)*x[0]+(-0.316809853003)*x[1]+(-0.780405868082)*x[2]
-        arg[1,1,1]=(-0.427547967216)*x[0]+(-0.897766643609)*x[1]+(-1.56913552404)*x[2]
-        arg[2,0,0]=(-0.282789248898)*x[0]+(-0.110846936031)*x[1]+(-1.4329391906)*x[2]
-        arg[2,0,1]=(1.46866588617)*x[0]+(-1.23022501959)*x[1]+(-0.3123390018)*x[2]
-        arg[2,1,0]=(-0.314115718621)*x[0]+(1.7333934438)*x[1]+(0.833572700726)*x[2]
-        arg[2,1,1]=(0.464246462638)*x[0]+(0.267484068646)*x[1]+(0.342009204787)*x[2]
-        arg[3,0,0]=(0.578853099163)*x[0]+(-0.0453855508465)*x[1]+(-0.0751578475516)*x[2]
-        arg[3,0,1]=(-0.526734485752)*x[0]+(-1.03286310016)*x[1]+(-0.398986583917)*x[2]
-        arg[3,1,0]=(0.0239088277798)*x[0]+(0.205105470192)*x[1]+(-1.04986349166)*x[2]
-        arg[3,1,1]=(0.130893744001)*x[0]+(-0.273702140669)*x[1]+(-0.0804222415128)*x[2]
-        arg[4,0,0]=(-0.822661618584)*x[0]+(-0.267189204519)*x[1]+(-0.290013766971)*x[2]
-        arg[4,0,1]=(-1.46759823734)*x[0]+(0.317465945316)*x[1]+(0.108284317752)*x[2]
-        arg[4,1,0]=(-1.3920990386)*x[0]+(-1.17823778694)*x[1]+(-0.18366434307)*x[2]
-        arg[4,1,1]=(-0.0915496209516)*x[0]+(-0.367624609832)*x[1]+(1.30630257323)*x[2]
-        arg[5,0,0]=(0.117840830455)*x[0]+(-0.667875433194)*x[1]+(-1.59716688455)*x[2]
-        arg[5,0,1]=(-0.818693227605)*x[0]+(0.483842075248)*x[1]+(-0.408373205535)*x[2]
-        arg[5,1,0]=(1.36906770301)*x[0]+(0.494926179999)*x[1]+(0.717041707262)*x[2]
-        arg[5,1,1]=(0.819757116081)*x[0]+(0.0982458749015)*x[1]+(0.275080391599)*x[2]
-        ref[0,0,0]=(0.236560699949)/(o+1.)+(-0.392784388084)+(-0.327323511722)*0.5**o
-        ref[0,0,1]=(1.32491522045)/(o+1.)+(0.525146863711)+(-0.519003394222)*0.5**o
-        ref[0,1,0]=(0.433749865563)/(o+1.)+(0.23007126008)+(-0.287758131599)*0.5**o
-        ref[0,1,1]=(-0.0563021060686)/(o+1.)+(-0.403921160703)+(-0.512338021825)*0.5**o
-        ref[1,0,0]=(-0.170496965963)/(o+1.)+(-0.914421777259)+(0.942147754258)*0.5**o
-        ref[1,0,1]=(-0.372707483726)/(o+1.)+(0.636041158872)+(-0.536379364005)*0.5**o
-        ref[1,1,0]=(-0.211529878364)/(o+1.)+(-0.912151985776)+(-0.0986461529033)*0.5**o
-        ref[1,1,1]=(-1.32533998437)/(o+1.)+(-0.685030198386)+(-0.19904975372)*0.5**o
-        ref[2,0,0]=(0.152048902469)/(o+1.)+(-0.88880590209)+(-0.201012473813)*0.5**o
-        ref[2,0,1]=(-0.748900052246)/(o+1.)+(-0.0226120471998)+(0.720226011425)*0.5**o
-        ref[2,1,0]=(0.77797707941)/(o+1.)+(1.01635055442)+(-0.557827762351)*0.5**o
-        ref[2,1,1]=(1.08969334716)/(o+1.)+(-0.404644728844)+(0.793335846595)*0.5**o
-        ref[3,0,0]=(1.56498448669)/(o+1.)+(-0.699967188685)+(0.293259591449)*0.5**o
-        ref[3,0,1]=(-0.620133427128)/(o+1.)+(-0.550037413688)+(-0.238375915329)*0.5**o
-        ref[3,1,0]=(-0.156380586288)/(o+1.)+(-0.0154369973565)+(-0.633594612687)*0.5**o
-        ref[3,1,1]=(-0.352989559326)/(o+1.)+(-0.290547031627)+(0.710852984398)*0.5**o
-        ref[4,0,0]=(-0.147579361355)/(o+1.)+(-0.615173424765)+(-0.00193837918766)*0.5**o
-        ref[4,0,1]=(0.598152345277)/(o+1.)+(-0.540248606426)+(-0.559503106696)*0.5**o
-        ref[4,1,0]=(-1.17182448825)/(o+1.)+(-0.590551681576)+(-0.401073317208)*0.5**o
-        ref[4,1,1]=(0.837504141173)/(o+1.)+(0.0807414267186)+(-0.15185865216)*0.5**o
-        ref[5,0,0]=(-0.646601115533)/(o+1.)+(-1.20895265273)+(0.9173049337)*0.5**o
-        ref[5,0,1]=(1.26626110052)/(o+1.)+(-0.56471923973)+(-0.880046978955)*0.5**o
-        ref[5,1,0]=(-0.069063169298)/(o+1.)+(0.883536796964)+(0.883025165644)*0.5**o
-        ref[5,1,1]=(1.05999338993)/(o+1.)+(-0.392519102893)+(0.918128198439)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.257898226293)*x[0]+(-0.01230083314)*x[1]
-        arg[0,0,0,1]=(0.0531183070647)*x[0]+(-0.170192287836)*x[1]
-        arg[0,0,1,0]=(-0.364644940864)*x[0]+(1.04227651446)*x[1]
-        arg[0,0,1,1]=(-0.894334108203)*x[0]+(0.151390331211)*x[1]
-        arg[0,0,2,0]=(1.03825401708)*x[0]+(-0.882136097149)*x[1]
-        arg[0,0,2,1]=(-1.05304910155)*x[0]+(1.06866311708)*x[1]
-        arg[0,1,0,0]=(1.54742542159)*x[0]+(0.941778348482)*x[1]
-        arg[0,1,0,1]=(1.1797380956)*x[0]+(-0.296417138234)*x[1]
-        arg[0,1,1,0]=(-1.09196028027)*x[0]+(-0.783377624006)*x[1]
-        arg[0,1,1,1]=(0.370952191443)*x[0]+(-0.0854141858991)*x[1]
-        arg[0,1,2,0]=(-1.23552368139)*x[0]+(1.23848088087)*x[1]
-        arg[0,1,2,1]=(0.216345350114)*x[0]+(-0.136524468427)*x[1]
-        arg[0,2,0,0]=(-1.21206901263)*x[0]+(0.804219582144)*x[1]
-        arg[0,2,0,1]=(0.192956526208)*x[0]+(0.588417678858)*x[1]
-        arg[0,2,1,0]=(-0.940175603742)*x[0]+(0.329047260784)*x[1]
-        arg[0,2,1,1]=(-0.138597387792)*x[0]+(0.398298326223)*x[1]
-        arg[0,2,2,0]=(0.10089766824)*x[0]+(1.25459493298)*x[1]
-        arg[0,2,2,1]=(-0.401163525883)*x[0]+(0.276542765282)*x[1]
-        arg[0,3,0,0]=(0.252156795268)*x[0]+(-0.50223063539)*x[1]
-        arg[0,3,0,1]=(0.466244610905)*x[0]+(-0.587025224301)*x[1]
-        arg[0,3,1,0]=(-0.268082012713)*x[0]+(-1.28874675764)*x[1]
-        arg[0,3,1,1]=(1.10867463519)*x[0]+(-0.165500912864)*x[1]
-        arg[0,3,2,0]=(-1.94681908266)*x[0]+(0.166854108476)*x[1]
-        arg[0,3,2,1]=(-0.537150417922)*x[0]+(0.0872851457131)*x[1]
-        arg[0,4,0,0]=(-0.376548581807)*x[0]+(-0.245201133388)*x[1]
-        arg[0,4,0,1]=(-0.135287690767)*x[0]+(0.750376238942)*x[1]
-        arg[0,4,1,0]=(-0.0240491596907)*x[0]+(-1.21337088424)*x[1]
-        arg[0,4,1,1]=(0.699215733397)*x[0]+(0.0596356032853)*x[1]
-        arg[0,4,2,0]=(-0.521316010702)*x[0]+(-1.75309802615)*x[1]
-        arg[0,4,2,1]=(0.403640172305)*x[0]+(1.41465827077)*x[1]
-        arg[1,0,0,0]=(-1.01538089315)*x[0]+(-1.14785578909)*x[1]
-        arg[1,0,0,1]=(1.10045201832)*x[0]+(0.630761728795)*x[1]
-        arg[1,0,1,0]=(0.137673646147)*x[0]+(-0.387129090253)*x[1]
-        arg[1,0,1,1]=(-1.04588287863)*x[0]+(-1.22433029859)*x[1]
-        arg[1,0,2,0]=(-0.567830263535)*x[0]+(-0.405808616295)*x[1]
-        arg[1,0,2,1]=(0.139326102495)*x[0]+(-1.93153384363)*x[1]
-        arg[1,1,0,0]=(-0.638524762921)*x[0]+(0.506405751653)*x[1]
-        arg[1,1,0,1]=(0.130775153144)*x[0]+(0.531317202208)*x[1]
-        arg[1,1,1,0]=(0.557476206038)*x[0]+(0.447588676184)*x[1]
-        arg[1,1,1,1]=(-0.538795916875)*x[0]+(-0.593869493531)*x[1]
-        arg[1,1,2,0]=(-1.09827483942)*x[0]+(0.376431061876)*x[1]
-        arg[1,1,2,1]=(-0.0074505620387)*x[0]+(-0.798645151486)*x[1]
-        arg[1,2,0,0]=(0.251283911459)*x[0]+(0.194595071813)*x[1]
-        arg[1,2,0,1]=(1.00482763799)*x[0]+(-1.00059863394)*x[1]
-        arg[1,2,1,0]=(-0.453095434684)*x[0]+(-0.513922011418)*x[1]
-        arg[1,2,1,1]=(0.558548837484)*x[0]+(0.0696328406825)*x[1]
-        arg[1,2,2,0]=(-1.20625552545)*x[0]+(-0.151371710692)*x[1]
-        arg[1,2,2,1]=(0.100262209656)*x[0]+(-0.314628804179)*x[1]
-        arg[1,3,0,0]=(0.947063141882)*x[0]+(-0.297271200562)*x[1]
-        arg[1,3,0,1]=(0.0760277251261)*x[0]+(-1.17982146387)*x[1]
-        arg[1,3,1,0]=(-1.46946063969)*x[0]+(-0.615302663567)*x[1]
-        arg[1,3,1,1]=(0.419747293729)*x[0]+(-0.629842531949)*x[1]
-        arg[1,3,2,0]=(-1.44607954917)*x[0]+(0.520024093924)*x[1]
-        arg[1,3,2,1]=(-1.01556392596)*x[0]+(-0.307173811354)*x[1]
-        arg[1,4,0,0]=(-0.164339335244)*x[0]+(0.390736414982)*x[1]
-        arg[1,4,0,1]=(-0.266932380288)*x[0]+(-0.731533848078)*x[1]
-        arg[1,4,1,0]=(-0.903825489055)*x[0]+(-1.81564784421)*x[1]
-        arg[1,4,1,1]=(-0.426008882665)*x[0]+(-1.09792948908)*x[1]
-        arg[1,4,2,0]=(-1.32984927589)*x[0]+(1.58196302541)*x[1]
-        arg[1,4,2,1]=(-0.0581032806145)*x[0]+(-0.323073355302)*x[1]
-        arg[2,0,0,0]=(-0.744014251373)*x[0]+(-0.818253254872)*x[1]
-        arg[2,0,0,1]=(0.368656965396)*x[0]+(-0.0864646380237)*x[1]
-        arg[2,0,1,0]=(-0.112428845773)*x[0]+(0.109170104421)*x[1]
-        arg[2,0,1,1]=(0.0682241548911)*x[0]+(-1.65999482283)*x[1]
-        arg[2,0,2,0]=(0.212777058993)*x[0]+(0.127163480945)*x[1]
-        arg[2,0,2,1]=(-0.256989443356)*x[0]+(0.183206687414)*x[1]
-        arg[2,1,0,0]=(0.578997994373)*x[0]+(0.413087453689)*x[1]
-        arg[2,1,0,1]=(0.886532090807)*x[0]+(0.330645525532)*x[1]
-        arg[2,1,1,0]=(0.18224742814)*x[0]+(-0.713166591262)*x[1]
-        arg[2,1,1,1]=(-0.25218296706)*x[0]+(0.736797897014)*x[1]
-        arg[2,1,2,0]=(0.885270371408)*x[0]+(-1.35641397127)*x[1]
-        arg[2,1,2,1]=(-0.963214290879)*x[0]+(0.348421598509)*x[1]
-        arg[2,2,0,0]=(0.884120745351)*x[0]+(0.956857507884)*x[1]
-        arg[2,2,0,1]=(-0.00795298517561)*x[0]+(0.51243740322)*x[1]
-        arg[2,2,1,0]=(-0.563655252975)*x[0]+(-0.716305131721)*x[1]
-        arg[2,2,1,1]=(0.648243491623)*x[0]+(-0.142239786485)*x[1]
-        arg[2,2,2,0]=(1.50677848542)*x[0]+(-0.359722006818)*x[1]
-        arg[2,2,2,1]=(-0.522592086302)*x[0]+(-0.18544927497)*x[1]
-        arg[2,3,0,0]=(0.0822787762966)*x[0]+(0.196309662733)*x[1]
-        arg[2,3,0,1]=(0.232573258627)*x[0]+(-0.0597976775432)*x[1]
-        arg[2,3,1,0]=(1.50895737052)*x[0]+(0.546625934312)*x[1]
-        arg[2,3,1,1]=(-1.64023373286)*x[0]+(0.220053261777)*x[1]
-        arg[2,3,2,0]=(1.5897208842)*x[0]+(-0.0355885594992)*x[1]
-        arg[2,3,2,1]=(-1.52822349982)*x[0]+(-0.0906934717656)*x[1]
-        arg[2,4,0,0]=(0.496696582601)*x[0]+(-0.303888675059)*x[1]
-        arg[2,4,0,1]=(-0.0819586112177)*x[0]+(-0.0449047294378)*x[1]
-        arg[2,4,1,0]=(-0.678530758513)*x[0]+(-1.2173963447)*x[1]
-        arg[2,4,1,1]=(-0.645450475268)*x[0]+(0.356771113426)*x[1]
-        arg[2,4,2,0]=(-0.486643021867)*x[0]+(0.977763869689)*x[1]
-        arg[2,4,2,1]=(-0.458991807397)*x[0]+(1.80038432923)*x[1]
-        arg[3,0,0,0]=(0.270795948755)*x[0]+(-0.691512096338)*x[1]
-        arg[3,0,0,1]=(-0.756717130099)*x[0]+(1.16189640534)*x[1]
-        arg[3,0,1,0]=(0.967554346699)*x[0]+(-0.272119008963)*x[1]
-        arg[3,0,1,1]=(1.14296491195)*x[0]+(-0.707175662379)*x[1]
-        arg[3,0,2,0]=(1.15665030692)*x[0]+(0.414803389409)*x[1]
-        arg[3,0,2,1]=(1.38997274955)*x[0]+(1.07065568192)*x[1]
-        arg[3,1,0,0]=(-0.623998925511)*x[0]+(0.375545806421)*x[1]
-        arg[3,1,0,1]=(-0.363431948398)*x[0]+(-0.183100417297)*x[1]
-        arg[3,1,1,0]=(0.0435866301729)*x[0]+(-0.557137572068)*x[1]
-        arg[3,1,1,1]=(-0.253225217468)*x[0]+(-0.0657932188329)*x[1]
-        arg[3,1,2,0]=(0.147700921064)*x[0]+(0.681624563015)*x[1]
-        arg[3,1,2,1]=(-0.075394297616)*x[0]+(0.271741245789)*x[1]
-        arg[3,2,0,0]=(1.34803044812)*x[0]+(0.87991065609)*x[1]
-        arg[3,2,0,1]=(0.0529487135353)*x[0]+(0.806480092352)*x[1]
-        arg[3,2,1,0]=(-1.52038624166)*x[0]+(-0.992718138685)*x[1]
-        arg[3,2,1,1]=(0.0859852188749)*x[0]+(1.63512596202)*x[1]
-        arg[3,2,2,0]=(1.46925148575)*x[0]+(-1.60383564005)*x[1]
-        arg[3,2,2,1]=(0.114463395473)*x[0]+(-1.0186377376)*x[1]
-        arg[3,3,0,0]=(-1.02962502658)*x[0]+(-1.06788543146)*x[1]
-        arg[3,3,0,1]=(-0.184391597652)*x[0]+(0.462603936483)*x[1]
-        arg[3,3,1,0]=(0.611113335782)*x[0]+(0.282417397043)*x[1]
-        arg[3,3,1,1]=(-0.193423873796)*x[0]+(-0.56108614964)*x[1]
-        arg[3,3,2,0]=(-0.0290687598224)*x[0]+(-0.460221158417)*x[1]
-        arg[3,3,2,1]=(0.784513522959)*x[0]+(-0.484813129206)*x[1]
-        arg[3,4,0,0]=(0.423780748664)*x[0]+(-0.344020787894)*x[1]
-        arg[3,4,0,1]=(1.10623024451)*x[0]+(-0.775008153301)*x[1]
-        arg[3,4,1,0]=(0.554847534291)*x[0]+(-0.854749107999)*x[1]
-        arg[3,4,1,1]=(-0.639595693597)*x[0]+(-0.966152813212)*x[1]
-        arg[3,4,2,0]=(-0.0172621996023)*x[0]+(0.321815074269)*x[1]
-        arg[3,4,2,1]=(0.39605156824)*x[0]+(-0.499138231749)*x[1]
-        ref[0,0,0,0]=(0.169892838337)/(o+1.)+(-0.323261281472)+(0.722227117759)*0.5**o
-        ref[0,0,0,1]=(-0.899797330597)/(o+1.)+(0.731242549464)+(-0.679761749104)*0.5**o
-        ref[0,0,1,0]=(0.948969615551)/(o+1.)+(-0.173478478707)+(0.0756189154575)*0.5**o
-        ref[0,0,1,1]=(-0.484419525942)/(o+1.)+(0.287761319651)+(-0.834046890353)*0.5**o
-        ref[0,0,2,0]=(-0.275366085384)/(o+1.)+(-0.051636507926)+(0.534757021171)*0.5**o
-        ref[0,0,2,1]=(0.338862631582)/(o+1.)+(0.076489529483)+(-0.47622767501)*0.5**o
-        ref[0,1,0,0]=(0.960885993642)/(o+1.)+(0.36959166751)+(0.789134441414)*0.5**o
-        ref[0,1,0,1]=(-0.101908900511)/(o+1.)+(0.343409131566)+(0.298411594744)*0.5**o
-        ref[0,1,1,0]=(-0.50227382988)/(o+1.)+(-0.431549057432)+(-0.509965959533)*0.5**o
-        ref[0,1,1,1]=(-0.294216689224)/(o+1.)+(0.293114907564)+(-0.00647512035965)*0.5**o
-        ref[0,1,2,0]=(0.330313139948)/(o+1.)+(0.0601559902451)+(-0.447667920962)*0.5**o
-        ref[0,1,2,1]=(-0.855325117375)/(o+1.)+(0.455706690618)+(0.0237326178252)*0.5**o
-        ref[0,2,0,0]=(0.958948557218)/(o+1.)+(-0.307015973897)+(-0.752766039908)*0.5**o
-        ref[0,2,0,1]=(0.622666086232)/(o+1.)+(0.417782845058)+(-0.676857571283)*0.5**o
-        ref[0,2,1,0]=(-0.476269525636)/(o+1.)+(0.203518519787)+(-0.541895856898)*0.5**o
-        ref[0,2,1,1]=(0.396862410812)/(o+1.)+(-0.318442063423)+(0.499722654464)*0.5**o
-        ref[0,2,2,0]=(0.291546173382)/(o+1.)+(0.345688404218)+(0.372569619405)*0.5**o
-        ref[0,2,2,1]=(-0.0863432016899)/(o+1.)+(0.296494638577)+(-0.631266836064)*0.5**o
-        ref[0,3,0,0]=(0.437179077921)/(o+1.)+(-0.340515851088)+(-0.00622121586734)*0.5**o
-        ref[0,3,0,1]=(-0.0670787919003)/(o+1.)+(-0.492735838895)+(0.931769856293)*0.5**o
-        ref[0,3,1,0]=(-0.455620785864)/(o+1.)+(-0.866886545624)+(0.632565106759)*0.5**o
-        ref[0,3,1,1]=(0.769395985412)/(o+1.)+(-0.303642587154)+(0.781062911223)*0.5**o
-        ref[0,3,2,0]=(-0.338160377272)/(o+1.)+(-0.237545833658)+(-0.966712929597)*0.5**o
-        ref[0,3,2,1]=(-0.796435534783)/(o+1.)+(0.544922318125)+(-0.743274373676)*0.5**o
-        ref[0,4,0,0]=(0.452932120968)/(o+1.)+(-0.512874769603)+(-0.048932296957)*0.5**o
-        ref[0,4,0,1]=(0.361579034112)/(o+1.)+(-0.0561290568189)+(0.365767627701)*0.5**o
-        ref[0,4,1,0]=(-0.626053161593)/(o+1.)+(-0.761324946295)+(0.911283010254)*0.5**o
-        ref[0,4,1,1]=(-0.0455977379835)/(o+1.)+(0.292122388548)+(0.22020429757)*0.5**o
-        ref[0,4,2,0]=(-0.881052488675)/(o+1.)+(-0.210171400955)+(-0.973018746263)*0.5**o
-        ref[0,4,2,1]=(0.955475719603)/(o+1.)+(0.367959093676)+(0.126904536122)*0.5**o
-        ref[1,0,0,0]=(-0.314523133291)/(o+1.)+(-0.649561146707)+(-0.54959125554)*0.5**o
-        ref[1,0,0,1]=(0.776726613012)/(o+1.)+(0.0747896120381)+(0.804907910029)*0.5**o
-        ref[1,0,1,0]=(0.416309554773)/(o+1.)+(0.0650606132082)+(-0.795886225295)*0.5**o
-        ref[1,0,1,1]=(-0.642083920221)/(o+1.)+(-0.518812997818)+(-0.590503261366)*0.5**o
-        ref[1,0,2,0]=(0.209400082886)/(o+1.)+(-0.592256267485)+(0.00147357225359)*0.5**o
-        ref[1,0,2,1]=(-0.969945221754)/(o+1.)+(-0.364559871358)+(-0.0931427766681)*0.5**o
-        ref[1,1,0,0]=(0.941138659497)/(o+1.)+(-0.103485523138)+(-0.866286624489)*0.5**o
-        ref[1,1,0,1]=(0.527395399401)/(o+1.)+(0.373358049173)+(-0.612019142395)*0.5**o
-        ref[1,1,1,0]=(-0.276942103917)/(o+1.)+(0.624509599487)+(0.0329877871648)*0.5**o
-        ref[1,1,1,1]=(-0.153477829221)/(o+1.)+(-0.0616268433725)+(-0.85593389444)*0.5**o
-        ref[1,1,2,0]=(0.2685285297)/(o+1.)+(-0.301824551915)+(-0.386723203413)*0.5**o
-        ref[1,1,2,1]=(-0.530960074652)/(o+1.)+(0.248621312801)+(-0.772378264474)*0.5**o
-        ref[1,2,0,0]=(0.745071931955)/(o+1.)+(-0.149268301427)+(-0.000656345828701)*0.5**o
-        ref[1,2,0,1]=(-0.581822428087)/(o+1.)+(0.2315691847)+(0.122913062738)*0.5**o
-        ref[1,2,1,0]=(-0.325165099021)/(o+1.)+(-0.414758139139)+(0.187663931198)*0.5**o
-        ref[1,2,1,1]=(-0.389683593964)/(o+1.)+(0.265985790556)+(0.485893691018)*0.5**o
-        ref[1,2,2,0]=(0.661969003098)/(o+1.)+(-0.514584521701)+(-0.990427195841)*0.5**o
-        ref[1,2,2,1]=(-0.0828384828188)/(o+1.)+(-0.482166570368)+(0.832805029032)*0.5**o
-        ref[1,3,0,0]=(-0.756020671713)/(o+1.)+(0.627704058228)+(0.150404496577)*0.5**o
-        ref[1,3,0,1]=(-0.93648010541)/(o+1.)+(0.11022703478)+(-0.387767702896)*0.5**o
-        ref[1,3,1,0]=(-0.995823513997)/(o+1.)+(-0.242072805569)+(-0.604794178119)*0.5**o
-        ref[1,3,1,1]=(-0.543071878541)/(o+1.)+(-0.160890620667)+(0.654757881656)*0.5**o
-        ref[1,3,2,0]=(0.803184441579)/(o+1.)+(-0.612293875048)+(-0.504652146723)*0.5**o
-        ref[1,3,2,1]=(-0.786714439322)/(o+1.)+(-0.175556007517)+(-0.18491128296)*0.5**o
-        ref[1,4,0,0]=(-0.302928744298)/(o+1.)+(0.476360987754)+(-0.423396151472)*0.5**o
-        ref[1,4,0,1]=(-0.410240602476)/(o+1.)+(-0.49551630458)+(0.40280698327)*0.5**o
-        ref[1,4,1,0]=(-0.820677400346)/(o+1.)+(-0.573037933363)+(-0.752720066188)*0.5**o
-        ref[1,4,1,1]=(-0.492748923658)/(o+1.)+(-0.600739806799)+(0.170290165507)*0.5**o
-        ref[1,4,2,0]=(0.926654770824)/(o+1.)+(0.011282908181)+(-0.697106837662)*0.5**o
-        ref[1,4,2,1]=(-0.958477382611)/(o+1.)+(0.618515858902)+(-0.65973097111)*0.5**o
-        ref[2,0,0,0]=(-0.15636950624)/(o+1.)+(-0.520670547262)+(-0.36455690548)*0.5**o
-        ref[2,0,0,1]=(-0.726424878286)/(o+1.)+(0.697757734621)+(-0.386898263585)*0.5**o
-        ref[2,0,1,0]=(-0.055162393508)/(o+1.)+(0.247015646426)+(-0.442127640696)*0.5**o
-        ref[2,0,1,1]=(-0.769332288875)/(o+1.)+(-0.0917175733456)+(-0.639003232373)*0.5**o
-        ref[2,0,2,0]=(-0.196390038297)/(o+1.)+(0.0977907270548)+(0.340749124126)*0.5**o
-        ref[2,0,2,1]=(0.841927481859)/(o+1.)+(-0.489185426146)+(0.0626606144906)*0.5**o
-        ref[2,1,0,0]=(0.590018249148)/(o+1.)+(0.378476967182)+(-0.354886735451)*0.5**o
-        ref[2,1,0,1]=(0.178495604742)/(o+1.)+(0.233073081069)+(0.572535849459)*0.5**o
-        ref[2,1,1,0]=(-0.762671064919)/(o+1.)+(-0.108539686142)+(0.448831274081)*0.5**o
-        ref[2,1,1,1]=(0.927591406535)/(o+1.)+(0.0441635703243)+(-0.53130361723)*0.5**o
-        ref[2,1,2,0]=(-0.604360706259)/(o+1.)+(-0.134848102332)+(0.402913311063)*0.5**o
-        ref[2,1,2,1]=(0.229727627441)/(o+1.)+(-0.323296604293)+(-0.197927111225)*0.5**o
-        ref[2,2,0,0]=(0.287478356112)/(o+1.)+(0.762635506201)+(0.0282288847209)*0.5**o
-        ref[2,2,0,1]=(0.243518182621)/(o+1.)+(-0.241502069199)+(0.743970373822)*0.5**o
-        ref[2,2,1,0]=(-0.369049760378)/(o+1.)+(-0.21941778965)+(-0.472075045017)*0.5**o
-        ref[2,2,1,1]=(-0.745343658666)/(o+1.)+(0.193375557775)+(0.864596248255)*0.5**o
-        ref[2,2,2,0]=(-0.491769251494)/(o+1.)+(0.442742387618)+(0.753340954862)*0.5**o
-        ref[2,2,2,1]=(0.551196377158)/(o+1.)+(-0.523535406613)+(-0.212166925203)*0.5**o
-        ref[2,3,0,0]=(0.192271522168)/(o+1.)+(-0.0181953944687)+(0.122707705798)*0.5**o
-        ref[2,3,0,1]=(-0.593768738594)/(o+1.)+(0.199088910545)+(0.368366498588)*0.5**o
-        ref[2,3,1,0]=(0.0866211808983)/(o+1.)+(0.723512694127)+(0.521936735685)*0.5**o
-        ref[2,3,1,1]=(-0.453288268254)/(o+1.)+(-0.15580970281)+(-0.655272797205)*0.5**o
-        ref[2,3,2,0]=(0.614105802669)/(o+1.)+(0.0411427694898)+(0.85774098305)*0.5**o
-        ref[2,3,2,1]=(0.263133533654)/(o+1.)+(-0.628776355867)+(-0.624497793507)*0.5**o
-        ref[2,4,0,0]=(-0.809347914722)/(o+1.)+(0.367719412237)+(0.26671699779)*0.5**o
-        ref[2,4,0,1]=(0.773124137566)/(o+1.)+(-0.442496395542)+(-0.0149946871367)*0.5**o
-        ref[2,4,1,0]=(-0.927311525126)/(o+1.)+(-0.0125177466568)+(-0.943580084777)*0.5**o
-        ref[2,4,1,1]=(0.306409665483)/(o+1.)+(0.128569553604)+(-0.852228134533)*0.5**o
-        ref[2,4,2,0]=(0.926185522145)/(o+1.)+(0.0750538146738)+(-0.58517230367)*0.5**o
-        ref[2,4,2,1]=(0.858245470922)/(o+1.)+(0.0125876600893)+(0.457971730734)*0.5**o
-        ref[3,0,0,0]=(-0.74501947953)/(o+1.)+(0.343942243752)+(-0.363581155556)*0.5**o
-        ref[3,0,0,1]=(0.850890737948)/(o+1.)+(0.157997002133)+(-0.761705466968)*0.5**o
-        ref[3,0,1,0]=(-0.0468962248591)/(o+1.)+(0.0297980532763)+(0.682735456043)*0.5**o
-        ref[3,0,1,1]=(0.0126326425456)/(o+1.)+(-0.076115296096)+(0.575387199213)*0.5**o
-        ref[3,0,2,0]=(-0.410549752333)/(o+1.)+(0.85556811978)+(0.270867209104)*0.5**o
-        ref[3,0,2,1]=(0.580487848545)/(o+1.)+(0.59069171729)+(0.698757148346)*0.5**o
-        ref[3,1,0,0]=(0.139052775786)/(o+1.)+(-0.334747475889)+(0.281989056901)*0.5**o
-        ref[3,1,0,1]=(0.591083610998)/(o+1.)+(-0.322680889668)+(-0.492254197357)*0.5**o
-        ref[3,1,1,0]=(0.384713965427)/(o+1.)+(-0.522411606102)+(0.146558304882)*0.5**o
-        ref[3,1,1,1]=(-0.827615582009)/(o+1.)+(-0.00295218575854)+(0.514501517225)*0.5**o
-        ref[3,1,2,0]=(0.84762578765)/(o+1.)+(0.208361555685)+(-0.43502341494)*0.5**o
-        ref[3,1,2,1]=(-0.554668615664)/(o+1.)+(0.825347835483)+(-0.899680107129)*0.5**o
-        ref[3,2,0,0]=(0.652802712143)/(o+1.)+(0.397197582731)+(0.7807432266)*0.5**o
-        ref[3,2,0,1]=(0.421495251937)/(o+1.)+(-0.119571710512)+(0.677076974975)*0.5**o
-        ref[3,2,1,0]=(-0.230439630375)/(o+1.)+(-0.733165339017)+(-0.816334071941)*0.5**o
-        ref[3,2,1,1]=(0.64153308098)/(o+1.)+(0.778374176432)+(-0.477170252948)*0.5**o
-        ref[3,2,2,0]=(-0.987848717403)/(o+1.)+(-0.0606435888479)+(0.974551740798)*0.5**o
-        ref[3,2,2,1]=(-0.318593711859)/(o+1.)+(-0.459904454409)+(0.334228278552)*0.5**o
-        ref[3,3,0,0]=(-0.418115413351)/(o+1.)+(-0.348616063735)+(-0.982162917221)*0.5**o
-        ref[3,3,0,1]=(-0.437684435015)/(o+1.)+(0.804145379606)+(-0.892393985366)*0.5**o
-        ref[3,3,1,0]=(0.944100110135)/(o+1.)+(-0.059994562245)+(0.0694197471801)*0.5**o
-        ref[3,3,1,1]=(-0.860656048613)/(o+1.)+(0.178136109535)+(-0.250126193893)*0.5**o
-        ref[3,3,2,0]=(-0.363631991908)/(o+1.)+(-0.298384287282)+(0.471110648232)*0.5**o
-        ref[3,3,2,1]=(-0.578021736479)/(o+1.)+(0.320913094365)+(0.235895941501)*0.5**o
-        ref[3,4,0,0]=(-0.946995649946)/(o+1.)+(0.0451978887455)+(0.936359833225)*0.5**o
-        ref[3,4,0,1]=(-0.636305818291)/(o+1.)+(0.258932088634)+(0.449663732234)*0.5**o
-        ref[3,4,1,0]=(-0.823421937366)/(o+1.)+(0.112980674356)+(0.297559014947)*0.5**o
-        ref[3,4,1,1]=(-0.441768022626)/(o+1.)+(-0.240840962617)+(-0.682298558949)*0.5**o
-        ref[3,4,2,0]=(-0.258808936822)/(o+1.)+(0.510306577882)+(-0.457251344276)*0.5**o
-        ref[3,4,2,1]=(-0.489365749016)/(o+1.)+(-0.296617385332)+(0.979513856171)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.474247989728)*x[0]+(-0.768689352235)*x[1]+(-1.08527900853)*x[2]
-        arg[0,0,0,1]=(-0.237113797789)*x[0]+(0.0842735741018)*x[1]+(0.203858551029)*x[2]
-        arg[0,0,1,0]=(0.24237127665)*x[0]+(0.421022955803)*x[1]+(-1.52818540927)*x[2]
-        arg[0,0,1,1]=(1.34624865817)*x[0]+(-0.798943272818)*x[1]+(-0.823168386315)*x[2]
-        arg[0,0,2,0]=(-0.906723771267)*x[0]+(0.328893123771)*x[1]+(-0.942770202463)*x[2]
-        arg[0,0,2,1]=(1.54305197694)*x[0]+(0.813063941984)*x[1]+(0.205532727168)*x[2]
-        arg[0,1,0,0]=(0.399159979872)*x[0]+(-1.52089837934)*x[1]+(-1.4064251406)*x[2]
-        arg[0,1,0,1]=(-0.121139354731)*x[0]+(1.12768246422)*x[1]+(0.234299409411)*x[2]
-        arg[0,1,1,0]=(-1.62513899388)*x[0]+(-0.173131700583)*x[1]+(1.24199996799)*x[2]
-        arg[0,1,1,1]=(-0.371929434177)*x[0]+(-0.606278610409)*x[1]+(-0.00600790063066)*x[2]
-        arg[0,1,2,0]=(-0.804531294423)*x[0]+(0.869392248002)*x[1]+(0.840417359943)*x[2]
-        arg[0,1,2,1]=(0.329452946275)*x[0]+(1.1072495446)*x[1]+(-0.213517932323)*x[2]
-        arg[0,2,0,0]=(1.02784887224)*x[0]+(0.435517042337)*x[1]+(1.58767206677)*x[2]
-        arg[0,2,0,1]=(-0.0120997177)*x[0]+(0.430135803314)*x[1]+(-0.717473068956)*x[2]
-        arg[0,2,1,0]=(0.955455517302)*x[0]+(0.712976918968)*x[1]+(-0.624804508641)*x[2]
-        arg[0,2,1,1]=(-1.03293986594)*x[0]+(-0.539062834482)*x[1]+(-1.61172701428)*x[2]
-        arg[0,2,2,0]=(-0.177662810138)*x[0]+(0.553352366127)*x[1]+(0.695417121111)*x[2]
-        arg[0,2,2,1]=(0.318133474679)*x[0]+(-0.452528947926)*x[1]+(0.468602505091)*x[2]
-        arg[0,3,0,0]=(-0.294467725916)*x[0]+(1.67314409894)*x[1]+(0.100736440007)*x[2]
-        arg[0,3,0,1]=(-0.517162349887)*x[0]+(-1.57430191254)*x[1]+(1.24045877402)*x[2]
-        arg[0,3,1,0]=(0.667393640368)*x[0]+(0.340993632212)*x[1]+(-1.09920535559)*x[2]
-        arg[0,3,1,1]=(0.37451406727)*x[0]+(0.37350649326)*x[1]+(0.357440871322)*x[2]
-        arg[0,3,2,0]=(-0.989366398194)*x[0]+(0.596179154759)*x[1]+(-0.573280308087)*x[2]
-        arg[0,3,2,1]=(-0.25561190141)*x[0]+(1.42296905238)*x[1]+(-1.21032031399)*x[2]
-        arg[0,4,0,0]=(-0.41394085285)*x[0]+(-0.751213929646)*x[1]+(-0.68470718293)*x[2]
-        arg[0,4,0,1]=(0.702985204167)*x[0]+(-0.0375821582587)*x[1]+(0.290630803819)*x[2]
-        arg[0,4,1,0]=(0.0558204653441)*x[0]+(1.61940057302)*x[1]+(-0.518863528354)*x[2]
-        arg[0,4,1,1]=(1.25876303604)*x[0]+(-1.40923202908)*x[1]+(1.05202333762)*x[2]
-        arg[0,4,2,0]=(0.0715295483294)*x[0]+(0.883869702529)*x[1]+(-0.463253474408)*x[2]
-        arg[0,4,2,1]=(0.564563789615)*x[0]+(-0.135049742988)*x[1]+(-1.3118878567)*x[2]
-        arg[1,0,0,0]=(0.707267335291)*x[0]+(-0.197244449872)*x[1]+(-0.114362773781)*x[2]
-        arg[1,0,0,1]=(-0.144762815659)*x[0]+(0.434177706452)*x[1]+(0.0754859099691)*x[2]
-        arg[1,0,1,0]=(-0.906934991359)*x[0]+(0.179011995627)*x[1]+(0.823936036469)*x[2]
-        arg[1,0,1,1]=(1.11165724605)*x[0]+(0.48023223731)*x[1]+(0.981353808181)*x[2]
-        arg[1,0,2,0]=(0.499460583481)*x[0]+(0.171586243561)*x[1]+(-0.252474775657)*x[2]
-        arg[1,0,2,1]=(-0.604289370884)*x[0]+(1.11610914086)*x[1]+(0.747439062711)*x[2]
-        arg[1,1,0,0]=(0.696191463882)*x[0]+(0.349547714404)*x[1]+(0.651361019042)*x[2]
-        arg[1,1,0,1]=(0.152679923426)*x[0]+(-0.448442911425)*x[1]+(1.33964371501)*x[2]
-        arg[1,1,1,0]=(-0.74612592015)*x[0]+(-1.27089239786)*x[1]+(-0.261725631736)*x[2]
-        arg[1,1,1,1]=(1.50839493929)*x[0]+(1.93229724987)*x[1]+(-0.963996845831)*x[2]
-        arg[1,1,2,0]=(0.867984447375)*x[0]+(-0.777493811854)*x[1]+(0.847847553133)*x[2]
-        arg[1,1,2,1]=(1.34249389498)*x[0]+(0.776160804062)*x[1]+(-0.295393972199)*x[2]
-        arg[1,2,0,0]=(-0.655771613243)*x[0]+(1.58220214455)*x[1]+(-0.406292477629)*x[2]
-        arg[1,2,0,1]=(0.59294895986)*x[0]+(0.544961164723)*x[1]+(0.634279670948)*x[2]
-        arg[1,2,1,0]=(1.15324179862)*x[0]+(0.645764835217)*x[1]+(0.670364725309)*x[2]
-        arg[1,2,1,1]=(-0.819459106271)*x[0]+(0.024815625404)*x[1]+(0.769753650676)*x[2]
-        arg[1,2,2,0]=(1.19042366161)*x[0]+(0.982020548972)*x[1]+(0.92730609738)*x[2]
-        arg[1,2,2,1]=(-0.742441488349)*x[0]+(-1.3101429812)*x[1]+(-0.198104246324)*x[2]
-        arg[1,3,0,0]=(0.349205030437)*x[0]+(-0.745240339596)*x[1]+(-0.744742092259)*x[2]
-        arg[1,3,0,1]=(0.993101296711)*x[0]+(-1.48331355036)*x[1]+(-1.00616778677)*x[2]
-        arg[1,3,1,0]=(-1.10586442824)*x[0]+(1.71922449779)*x[1]+(-0.943451153259)*x[2]
-        arg[1,3,1,1]=(-1.72393763035)*x[0]+(-1.14113495956)*x[1]+(-0.211909615809)*x[2]
-        arg[1,3,2,0]=(-0.378302963108)*x[0]+(-0.494705322002)*x[1]+(0.940164363332)*x[2]
-        arg[1,3,2,1]=(0.850541148743)*x[0]+(-1.45461945468)*x[1]+(1.20025821328)*x[2]
-        arg[1,4,0,0]=(1.33882463795)*x[0]+(0.475208133119)*x[1]+(0.722686059253)*x[2]
-        arg[1,4,0,1]=(0.0750422155969)*x[0]+(1.29758288845)*x[1]+(-1.41431668738)*x[2]
-        arg[1,4,1,0]=(1.36072344575)*x[0]+(-0.345743547563)*x[1]+(-0.63248018754)*x[2]
-        arg[1,4,1,1]=(0.579049229913)*x[0]+(0.954245074078)*x[1]+(-0.170538926965)*x[2]
-        arg[1,4,2,0]=(1.67615484634)*x[0]+(0.561067019023)*x[1]+(-1.26952326914)*x[2]
-        arg[1,4,2,1]=(0.700910547934)*x[0]+(0.58717328764)*x[1]+(0.795138196965)*x[2]
-        arg[2,0,0,0]=(0.763193592359)*x[0]+(-0.397549328381)*x[1]+(-0.230593559545)*x[2]
-        arg[2,0,0,1]=(0.454026153468)*x[0]+(-1.12464443717)*x[1]+(-0.147462098246)*x[2]
-        arg[2,0,1,0]=(-0.276457034935)*x[0]+(0.118173156654)*x[1]+(0.57296366275)*x[2]
-        arg[2,0,1,1]=(1.31887812253)*x[0]+(-0.544644483254)*x[1]+(0.0013728350582)*x[2]
-        arg[2,0,2,0]=(-0.257589384265)*x[0]+(-0.016005453203)*x[1]+(-0.508836430965)*x[2]
-        arg[2,0,2,1]=(-0.259420301773)*x[0]+(0.122645293168)*x[1]+(0.381613885289)*x[2]
-        arg[2,1,0,0]=(-1.64168512418)*x[0]+(0.025182006192)*x[1]+(0.0268780458975)*x[2]
-        arg[2,1,0,1]=(-0.0885344200898)*x[0]+(0.408795219114)*x[1]+(0.635798801606)*x[2]
-        arg[2,1,1,0]=(-0.959658503283)*x[0]+(1.034415556)*x[1]+(0.725681105748)*x[2]
-        arg[2,1,1,1]=(1.59312707789)*x[0]+(-0.116514952101)*x[1]+(-0.86121633507)*x[2]
-        arg[2,1,2,0]=(-1.44859572067)*x[0]+(-1.28344247275)*x[1]+(0.299296401869)*x[2]
-        arg[2,1,2,1]=(-0.488424372501)*x[0]+(1.23481402288)*x[1]+(0.01702902463)*x[2]
-        arg[2,2,0,0]=(-1.29986951244)*x[0]+(-1.20190912751)*x[1]+(-0.755848291051)*x[2]
-        arg[2,2,0,1]=(-0.52421656312)*x[0]+(-0.335471509689)*x[1]+(-1.01264312499)*x[2]
-        arg[2,2,1,0]=(-1.12066642609)*x[0]+(-1.02138558053)*x[1]+(-1.00777755552)*x[2]
-        arg[2,2,1,1]=(-1.42127024744)*x[0]+(1.63480022479)*x[1]+(0.542244906643)*x[2]
-        arg[2,2,2,0]=(-0.418852880297)*x[0]+(-0.983110436453)*x[1]+(-0.622603673805)*x[2]
-        arg[2,2,2,1]=(0.727366446825)*x[0]+(-0.256324856361)*x[1]+(-0.20608740758)*x[2]
-        arg[2,3,0,0]=(0.548268302883)*x[0]+(0.0102173127665)*x[1]+(0.869833576217)*x[2]
-        arg[2,3,0,1]=(-1.70159091061)*x[0]+(1.15876875083)*x[1]+(-0.234757706773)*x[2]
-        arg[2,3,1,0]=(-1.72817024817)*x[0]+(0.690055132218)*x[1]+(-0.149398998825)*x[2]
-        arg[2,3,1,1]=(1.80829412387)*x[0]+(-0.217899654855)*x[1]+(-0.922672217822)*x[2]
-        arg[2,3,2,0]=(1.23855200328)*x[0]+(0.412795411508)*x[1]+(0.960476191755)*x[2]
-        arg[2,3,2,1]=(-1.43061904621)*x[0]+(-0.766039000745)*x[1]+(-1.25765397361)*x[2]
-        arg[2,4,0,0]=(-0.660872016687)*x[0]+(-0.000405233718708)*x[1]+(-0.178507968219)*x[2]
-        arg[2,4,0,1]=(-0.168526882871)*x[0]+(-1.06936802685)*x[1]+(1.54083857104)*x[2]
-        arg[2,4,1,0]=(0.565807359529)*x[0]+(-1.41401297939)*x[1]+(-1.23254260537)*x[2]
-        arg[2,4,1,1]=(-0.373920075802)*x[0]+(0.407330812903)*x[1]+(-0.204667001328)*x[2]
-        arg[2,4,2,0]=(0.874100879885)*x[0]+(-0.191238094267)*x[1]+(1.54890969328)*x[2]
-        arg[2,4,2,1]=(0.566428125313)*x[0]+(-1.60899595601)*x[1]+(-1.05112529768)*x[2]
-        arg[3,0,0,0]=(-0.688037248111)*x[0]+(-1.56483484784)*x[1]+(0.26782504619)*x[2]
-        arg[3,0,0,1]=(0.418788954459)*x[0]+(-0.670455226092)*x[1]+(-0.0562760591375)*x[2]
-        arg[3,0,1,0]=(-0.2614362754)*x[0]+(0.271050519855)*x[1]+(0.227811982923)*x[2]
-        arg[3,0,1,1]=(-0.873198928647)*x[0]+(-0.483763141395)*x[1]+(0.33532383979)*x[2]
-        arg[3,0,2,0]=(-0.864161938176)*x[0]+(-1.4682754386)*x[1]+(-0.38126411162)*x[2]
-        arg[3,0,2,1]=(0.142827521381)*x[0]+(0.464483940188)*x[1]+(0.214297576606)*x[2]
-        arg[3,1,0,0]=(0.188747079113)*x[0]+(0.590821253713)*x[1]+(0.908850367108)*x[2]
-        arg[3,1,0,1]=(0.0587541582624)*x[0]+(0.955494266151)*x[1]+(1.70822209849)*x[2]
-        arg[3,1,1,0]=(-0.420356861523)*x[0]+(-0.551445918262)*x[1]+(-0.0187114754269)*x[2]
-        arg[3,1,1,1]=(1.07071658401)*x[0]+(-0.589035602194)*x[1]+(0.133725074027)*x[2]
-        arg[3,1,2,0]=(0.370477043767)*x[0]+(0.226262353618)*x[1]+(0.566087784489)*x[2]
-        arg[3,1,2,1]=(1.77828660075)*x[0]+(0.607419742685)*x[1]+(0.0297054744582)*x[2]
-        arg[3,2,0,0]=(-1.19326939474)*x[0]+(1.20875153887)*x[1]+(-0.124756222091)*x[2]
-        arg[3,2,0,1]=(0.0645190914271)*x[0]+(0.357580475716)*x[1]+(-1.59461469718)*x[2]
-        arg[3,2,1,0]=(1.4853619905)*x[0]+(0.751582301648)*x[1]+(0.859363177167)*x[2]
-        arg[3,2,1,1]=(1.36658655075)*x[0]+(-0.776650996613)*x[1]+(0.654743994261)*x[2]
-        arg[3,2,2,0]=(0.406696005677)*x[0]+(-0.528546876384)*x[1]+(-0.439775325396)*x[2]
-        arg[3,2,2,1]=(-0.725198159461)*x[0]+(-0.0933136564416)*x[1]+(-0.720365141393)*x[2]
-        arg[3,3,0,0]=(-0.428669112669)*x[0]+(0.626162511175)*x[1]+(-0.382776233923)*x[2]
-        arg[3,3,0,1]=(0.340474939218)*x[0]+(-0.140550383925)*x[1]+(0.353836983746)*x[2]
-        arg[3,3,1,0]=(0.851646816711)*x[0]+(0.0171684195949)*x[1]+(0.38173044322)*x[2]
-        arg[3,3,1,1]=(0.359647722225)*x[0]+(0.425799941165)*x[1]+(-0.80174052212)*x[2]
-        arg[3,3,2,0]=(0.13012568736)*x[0]+(-0.573735693651)*x[1]+(1.08843730088)*x[2]
-        arg[3,3,2,1]=(-1.01372953294)*x[0]+(0.335282956856)*x[1]+(1.24570512628)*x[2]
-        arg[3,4,0,0]=(-0.05674609039)*x[0]+(-0.814879575064)*x[1]+(-0.169789408264)*x[2]
-        arg[3,4,0,1]=(1.5968230938)*x[0]+(0.0679819277023)*x[1]+(0.892284314512)*x[2]
-        arg[3,4,1,0]=(1.22220298478)*x[0]+(-0.0258417926472)*x[1]+(0.440670138568)*x[2]
-        arg[3,4,1,1]=(0.647072768716)*x[0]+(-0.177651087906)*x[1]+(-0.115553644646)*x[2]
-        arg[3,4,2,0]=(1.29816363306)*x[0]+(-1.18656044167)*x[1]+(-0.465776533157)*x[2]
-        arg[3,4,2,1]=(0.328907496091)*x[0]+(-0.179857937151)*x[1]+(-0.476306938306)*x[2]
-        ref[0,0,0,0]=(-0.530378359482)/(o+1.)+(-0.935143327523)+(0.0724486640358)*0.5**o
-        ref[0,0,0,1]=(1.22837847871)/(o+1.)+(-0.113350954728)+(-0.950658241915)*0.5**o
-        ref[0,0,1,0]=(-0.000414683535449)/(o+1.)+(-0.183158731552)+(-0.49805903018)*0.5**o
-        ref[0,0,1,1]=(-0.882730389132)/(o+1.)+(-0.112174958816)+(0.831217305802)*0.5**o
-        ref[0,0,2,0]=(-1.1913557966)/(o+1.)+(-0.0615750891074)+(-0.206094875146)*0.5**o
-        ref[0,0,2,1]=(0.634536492589)/(o+1.)+(0.649890059464)+(0.627332034578)*0.5**o
-        ref[0,1,0,0]=(-1.38665625775)/(o+1.)+(-1.0210653524)+(0.900623422471)*0.5**o
-        ref[0,1,0,1]=(1.20633678024)/(o+1.)+(0.0888193121856)+(-0.143132885707)*0.5**o
-        ref[0,1,1,0]=(0.452225278035)/(o+1.)+(-0.148926943801)+(-0.710642116901)*0.5**o
-        ref[0,1,1,1]=(-0.244223430204)/(o+1.)+(-0.619607191996)+(0.499221868978)*0.5**o
-        ref[0,1,2,0]=(0.0383849036606)/(o+1.)+(0.759484971644)+(-0.652076533427)*0.5**o
-        ref[0,1,2,1]=(0.207558055759)/(o+1.)+(0.502305382384)+(0.0110157380215)*0.5**o
-        ref[0,2,0,0]=(0.761374280144)/(o+1.)+(0.777616611515)+(0.734430478174)*0.5**o
-        ref[0,2,0,1]=(0.554502862028)/(o+1.)+(-0.409274602016)+(-0.0353906413371)*0.5**o
-        ref[0,2,1,0]=(-0.252543841709)/(o+1.)+(0.386640377894)+(0.522891013551)*0.5**o
-        ref[0,2,1,1]=(-1.52497235887)/(o+1.)+(-0.807603254401)+(-0.0435508470367)*0.5**o
-        ref[0,2,2,0]=(0.172485606257)/(o+1.)+(0.350297526187)+(0.19802601847)*0.5**o
-        ref[0,2,2,1]=(-0.141271359379)/(o+1.)+(0.0509198134622)+(0.373638764298)*0.5**o
-        ref[0,3,0,0]=(1.31278836809)/(o+1.)+(-0.0918739323256)+(0.350372309595)*0.5**o
-        ref[0,3,0,1]=(-0.396933928109)/(o+1.)+(-0.436137805999)+(0.418204051696)*0.5**o
-        ref[0,3,1,0]=(-0.206619840099)/(o+1.)+(-0.118703289798)+(0.353208336689)*0.5**o
-        ref[0,3,1,1]=(-0.595153371293)/(o+1.)+(0.615722581562)+(0.469169640021)*0.5**o
-        ref[0,3,2,0]=(-0.680858997986)/(o+1.)+(-0.0393223937964)+(-0.206963765944)*0.5**o
-        ref[0,3,2,1]=(0.012753264598)/(o+1.)+(0.246188741489)+(-0.548093910595)*0.5**o
-        ref[0,4,0,0]=(-0.40478987122)/(o+1.)+(-0.890399681609)+(0.33572726901)*0.5**o
-        ref[0,4,0,1]=(0.0280062557264)/(o+1.)+(0.0358049413228)+(0.856417711355)*0.5**o
-        ref[0,4,1,0]=(0.181560004565)/(o+1.)+(0.329885369854)+(0.31502676574)*0.5**o
-        ref[0,4,1,1]=(0.0552681276841)/(o+1.)+(0.00372919426319)+(0.838827828375)*0.5**o
-        ref[0,4,2,0]=(0.656057162724)/(o+1.)+(0.179315527684)+(-0.522542441641)*0.5**o
-        ref[0,4,2,1]=(0.126189389317)/(o+1.)+(-0.429452001643)+(-0.149659196108)*0.5**o
-        ref[1,0,0,0]=(1.43443485527)/(o+1.)+(-0.55091754491)+(0.0630603461901)*0.5**o
-        ref[1,0,0,1]=(-0.612191779306)/(o+1.)+(0.604025235381)+(-0.230957890695)*0.5**o
-        ref[1,0,1,0]=(0.373085423681)/(o+1.)+(-0.0817391530697)+(-0.113594076805)*0.5**o
-        ref[1,0,1,1]=(0.761862677657)/(o+1.)+(0.819524484428)+(0.172331645033)*0.5**o
-        ref[1,0,2,0]=(0.929265450746)/(o+1.)+(-0.382585784938)+(0.254478170515)*0.5**o
-        ref[1,0,2,1]=(1.58236203463)/(o+1.)+(-0.280641188811)+(0.238179175679)*0.5**o
-        ref[1,1,0,0]=(-0.117055726312)/(o+1.)+(0.957914090571)+(-0.101672257501)*0.5**o
-        ref[1,1,0,1]=(0.0849062553796)/(o+1.)+(0.0703564566846)+(0.818261558262)*0.5**o
-        ref[1,1,1,0]=(-1.72219113622)/(o+1.)+(-0.357454724939)+(0.15835663635)*0.5**o
-        ref[1,1,1,1]=(0.739078400468)/(o+1.)+(0.532292543169)+(0.673031856531)*0.5**o
-        ref[1,1,2,0]=(0.255023909903)/(o+1.)+(0.229656917655)+(0.22400044344)*0.5**o
-        ref[1,1,2,1]=(0.518856765199)/(o+1.)+(0.380552790125)+(0.543298381396)*0.5**o
-        ref[1,2,0,0]=(0.0321563884831)/(o+1.)+(0.25981567762)+(-0.0316496900482)*0.5**o
-        ref[1,2,0,1]=(1.09318176771)/(o+1.)+(0.0572442907603)+(0.564519446305)*0.5**o
-        ref[1,2,1,0]=(0.756962791387)/(o+1.)+(0.69419429624)+(0.32401997528)*0.5**o
-        ref[1,2,1,1]=(1.28480299241)/(o+1.)+(-0.201990593541)+(-0.905711635518)*0.5**o
-        ref[1,2,2,0]=(1.04969566442)/(o+1.)+(0.72854097372)+(0.592972696101)*0.5**o
-        ref[1,2,2,1]=(-1.77086264775)/(o+1.)+(-0.261914180361)+(0.0440022926066)*0.5**o
-        ref[1,3,0,0]=(-0.477780531124)/(o+1.)+(-0.181354085163)+(-0.300288699967)*0.5**o
-        ref[1,3,0,1]=(-0.797627013456)/(o+1.)+(-0.523163955197)+(0.347574883435)*0.5**o
-        ref[1,3,1,0]=(0.428806106821)/(o+1.)+(-0.0514584302394)+(-0.655980330052)*0.5**o
-        ref[1,3,1,1]=(-0.141740459457)/(o+1.)+(-1.05699960931)+(-0.821242527644)*0.5**o
-        ref[1,3,2,0]=(0.0181810985873)/(o+1.)+(-0.180697139553)+(0.41036925874)*0.5**o
-        ref[1,3,2,1]=(-0.061077367)/(o+1.)+(0.250077446763)+(0.157102380812)*0.5**o
-        ref[1,4,0,0]=(1.14087212913)/(o+1.)+(0.368059029864)+(0.659728641463)*0.5**o
-        ref[1,4,0,1]=(0.365658713316)/(o+1.)+(0.088533821044)+(-0.584417938734)*0.5**o
-        ref[1,4,1,0]=(-1.11681308321)/(o+1.)+(0.438275560627)+(0.622761672604)*0.5**o
-        ref[1,4,1,1]=(1.18893372018)/(o+1.)+(0.172934240923)+(-0.172046824999)*0.5**o
-        ref[1,4,2,0]=(0.16240489493)/(o+1.)+(-0.0145923852256)+(0.834478471749)*0.5**o
-        ref[1,4,2,1]=(0.571355829378)/(o+1.)+(0.526896417749)+(0.458073367663)*0.5**o
-        ref[2,0,0,0]=(-0.489234572937)/(o+1.)+(-0.0135589093901)+(0.65140309615)*0.5**o
-        ref[2,0,0,1]=(-1.55383491931)/(o+1.)+(0.0161644619972)+(0.703425613366)*0.5**o
-        ref[2,0,1,0]=(-0.258604855723)/(o+1.)+(0.0827812678671)+(0.507722104457)*0.5**o
-        ref[2,0,1,1]=(0.0504178529481)/(o+1.)+(0.182991850332)+(0.359204920726)*0.5**o
-        ref[2,0,2,0]=(0.652043479841)/(o+1.)+(-0.443015450013)+(-0.548443848248)*0.5**o
-        ref[2,0,2,1]=(0.340317839857)/(o+1.)+(-0.379565594545)+(0.663652225917)*0.5**o
-        ref[2,1,0,0]=(-0.587863196667)/(o+1.)+(-0.0137797674284)+(-0.974202340562)*0.5**o
-        ref[2,1,0,1]=(1.00030747039)/(o+1.)+(-0.399997754768)+(0.755747639771)*0.5**o
-        ref[2,1,1,0]=(0.703413281036)/(o+1.)+(0.487016208736)+(-0.877007540039)*0.5**o
-        ref[2,1,1,1]=(0.263166830572)/(o+1.)+(-0.157259452849)+(0.666747865841)*0.5**o
-        ref[2,1,2,0]=(0.104532343004)/(o+1.)+(-1.02548001493)+(-0.486314104701)*0.5**o
-        ref[2,1,2,1]=(0.933518655478)/(o+1.)+(0.0369928229139)+(-0.244085626298)*0.5**o
-        ref[2,2,0,0]=(-1.50550384519)/(o+1.)+(-0.590996227594)+(-0.570130630622)*0.5**o
-        ref[2,2,0,1]=(-0.60318683839)/(o+1.)+(-0.38308245528)+(-0.502979448853)*0.5**o
-        ref[2,2,1,0]=(-1.11258910879)/(o+1.)+(-0.518777277969)+(-0.999685897413)*0.5**o
-        ref[2,2,1,1]=(1.84366617107)/(o+1.)+(-0.232866738261)+(-0.622157810558)*0.5**o
-        ref[2,2,2,0]=(-0.620181988585)/(o+1.)+(-0.836162444183)+(0.267939886396)*0.5**o
-        ref[2,2,2,1]=(-0.826647389099)/(o+1.)+(0.0929536518109)+(0.905694268362)*0.5**o
-        ref[2,3,0,0]=(0.184067674443)/(o+1.)+(0.259745858757)+(0.724759799909)*0.5**o
-        ref[2,3,0,1]=(0.0175595303049)/(o+1.)+(0.0560117358912)+(-0.907162868639)*0.5**o
-        ref[2,3,1,0]=(-0.609443154617)/(o+1.)+(0.186540819401)+(-0.951152598958)*0.5**o
-        ref[2,3,1,1]=(-1.61858082094)/(o+1.)+(0.679439858578)+(0.927423354971)*0.5**o
-        ref[2,3,2,0]=(0.44350652486)/(o+1.)+(0.81466177481)+(0.53899353207)*0.5**o
-        ref[2,3,2,1]=(-0.877289862245)/(o+1.)+(-1.05742260849)+(-0.462176941342)*0.5**o
-        ref[2,4,0,0]=(-0.736381416539)/(o+1.)+(-0.0139374259612)+(-0.0755289501641)*0.5**o
-        ref[2,4,0,1]=(0.690429326999)/(o+1.)+(-0.0293644018251)+(-0.328756862036)*0.5**o
-        ref[2,4,1,0]=(-1.57117034002)/(o+1.)+(-0.531463765387)+(0.553349645561)*0.5**o
-        ref[2,4,1,1]=(1.24898175282)/(o+1.)+(-0.452273024959)+(-0.515691967125)*0.5**o
-        ref[2,4,2,0]=(0.239126191643)/(o+1.)+(0.722504563932)+(0.547637159392)*0.5**o
-        ref[2,4,2,1]=(-1.40763254209)/(o+1.)+(-0.809456441012)+(0.932852295739)*0.5**o
-        ref[3,0,0,0]=(-0.416554297686)/(o+1.)+(-0.632193610911)+(-0.304105530258)*0.5**o
-        ref[3,0,0,1]=(-1.02983448036)/(o+1.)+(0.579212231778)+(-0.436532313966)*0.5**o
-        ref[3,0,1,0]=(0.42124133216)/(o+1.)+(0.368290418827)+(-0.920395942436)*0.5**o
-        ref[3,0,1,1]=(0.158195474854)/(o+1.)+(-0.17459474514)+(-0.830644214826)*0.5**o
-        ref[3,0,2,0]=(-1.18749647329)/(o+1.)+(-0.506173996178)+(-0.513857022748)*0.5**o
-        ref[3,0,2,1]=(0.233437753018)/(o+1.)+(0.455705145371)+(-0.323239005586)*0.5**o
-        ref[3,1,0,0]=(1.42991958566)/(o+1.)+(0.053769921022)+(0.150959272234)*0.5**o
-        ref[3,1,0,1]=(1.48423731111)/(o+1.)+(0.964048315997)+(-0.689863420196)*0.5**o
-        ref[3,1,1,0]=(0.868837676765)/(o+1.)+(-1.01261543254)+(0.165878933098)*0.5**o
-        ref[3,1,1,1]=(0.820750307831)/(o+1.)+(-0.300930223821)+(0.396516195659)*0.5**o
-        ref[3,1,2,0]=(0.477077782202)/(o+1.)+(-0.0416336989494)+(0.769016797571)*0.5**o
-        ref[3,1,2,1]=(0.359895440587)/(o+1.)+(0.555322395811)+(0.944871585683)*0.5**o
-        ref[3,2,0,0]=(0.657668315832)/(o+1.)+(-0.240321895174)+(-0.286298603451)*0.5**o
-        ref[3,2,0,1]=(-0.941360568282)/(o+1.)+(-0.0246544136593)+(-0.181845734439)*0.5**o
-        ref[3,2,1,0]=(1.60316834971)/(o+1.)+(0.252291602298)+(0.988555915005)*0.5**o
-        ref[3,2,1,1]=(0.833811957678)/(o+1.)+(-0.111970621871)+(0.634808834458)*0.5**o
-        ref[3,2,2,0]=(-1.38877073784)/(o+1.)+(0.538356636307)+(-0.249568730877)*0.5**o
-        ref[3,2,2,1]=(-0.311839184097)/(o+1.)+(-0.698114103264)+(0.169190433329)*0.5**o
-        ref[3,3,0,0]=(0.743170989696)/(o+1.)+(-0.499224746788)+(0.0699956684628)*0.5**o
-        ref[3,3,0,1]=(-0.293538786051)/(o+1.)+(0.26667992866)+(0.313940467768)*0.5**o
-        ref[3,3,1,0]=(0.951483461345)/(o+1.)+(0.148317904561)+(0.00242640905887)*0.5**o
-        ref[3,3,1,1]=(-0.110753912776)/(o+1.)+(-0.44308689138)+(0.980634836805)*0.5**o
-        ref[3,3,2,0]=(-0.337895223544)/(o+1.)+(0.358941646037)+(0.264839226057)*0.5**o
-        ref[3,3,2,1]=(0.857823611315)/(o+1.)+(0.30404611512)+(-0.898657291359)*0.5**o
-        ref[3,4,0,0]=(0.037944509376)/(o+1.)+(-0.364801700413)+(-0.349756182268)*0.5**o
-        ref[3,4,0,1]=(1.01114399396)/(o+1.)+(0.457103279485)+(0.631738783076)*0.5**o
-        ref[3,4,1,0]=(0.969931913888)/(o+1.)+(-0.165922085756)+(0.998943588321)*0.5**o
-        ref[3,4,1,1]=(1.35441114248)/(o+1.)+(-0.502422727199)+(0.00430234808496)*0.5**o
-        ref[3,4,2,0]=(-0.367201097566)/(o+1.)+(-0.337780780531)+(0.688589316866)*0.5**o
-        ref[3,4,2,1]=(-0.0547905846061)/(o+1.)+(-0.293870420685)+(0.31527404661)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      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.241972460279)*x[0]+(0.539729925673)*x[1]
-        ref=(-0.11832904353)/(o+1.)+(0.649911364492)+(-0.399791299503)*0.5**o
-      else:
-        arg=(0.53919797656)*x[0]+(0.379010664884)*x[1]+(0.274416064529)*x[2]
-        ref=(0.307947301472)/(o+1.)+(0.120674157748)+(0.643329089005)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      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.float_)
-      if dim==2:
-        arg[0]=(0.84849017056)*x[0]+(-0.161962845202)*x[1]
-        arg[1]=(-0.794717919135)*x[0]+(1.16003773358)*x[1]
-        ref[0]=(0.780514448202)/(o+1.)+(-0.34628958021)+(0.598592037576)*0.5**o
-        ref[1]=(0.570158156278)/(o+1.)+(0.241192316704)+(-0.687222975237)*0.5**o
-      else:
-        arg[0]=(-0.637352163634)*x[0]+(1.49477462643)*x[1]+(-0.284018740238)*x[2]
-        arg[1]=(0.125937459904)*x[0]+(-0.206499869891)*x[1]+(-0.342856240345)*x[2]
-        ref[0]=(-0.274486314451)/(o+1.)+(0.379737553853)+(0.0884149293071)*0.5**o
-        ref[1]=(-0.78452814021)/(o+1.)+(-0.122017410137)+(0.605144310151)*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.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(-0.440868762581)*x[0]+(-0.216223666616)*x[1]
-        arg[0,1]=(-1.78807355591)*x[0]+(-0.208278123838)*x[1]
-        arg[0,2]=(-0.448066998103)*x[0]+(-0.819815507826)*x[1]
-        arg[0,3]=(1.27247881689)*x[0]+(0.0653439567221)*x[1]
-        arg[0,4]=(-1.00344990223)*x[0]+(-0.291263790583)*x[1]
-        arg[1,0]=(0.440080423838)*x[0]+(0.0356836558113)*x[1]
-        arg[1,1]=(-1.49545340091)*x[0]+(-0.133615590211)*x[1]
-        arg[1,2]=(1.05947638385)*x[0]+(0.408685904238)*x[1]
-        arg[1,3]=(-0.170309086605)*x[0]+(0.660523970285)*x[1]
-        arg[1,4]=(0.764323678475)*x[0]+(-0.529415080303)*x[1]
-        arg[2,0]=(0.55270081325)*x[0]+(-1.60630146231)*x[1]
-        arg[2,1]=(1.57419330248)*x[0]+(-1.24644288706)*x[1]
-        arg[2,2]=(0.0416757238363)*x[0]+(0.0247379738465)*x[1]
-        arg[2,3]=(1.0200370393)*x[0]+(0.364209137693)*x[1]
-        arg[2,4]=(-1.21858490389)*x[0]+(0.523056254546)*x[1]
-        arg[3,0]=(0.0524205820842)*x[0]+(1.65953217854)*x[1]
-        arg[3,1]=(1.21824883395)*x[0]+(0.905190834998)*x[1]
-        arg[3,2]=(0.226344434525)*x[0]+(-0.735349531462)*x[1]
-        arg[3,3]=(-1.00295245717)*x[0]+(-0.719605376499)*x[1]
-        arg[3,4]=(-0.446228759693)*x[0]+(1.23441974277)*x[1]
-        ref[0,0]=(0.347328582602)/(o+1.)+(-0.520484463519)+(0.0365479152384)*0.5**o
-        ref[0,1]=(-0.274564442352)/(o+1.)+(-0.413557210678)+(-0.894672816039)*0.5**o
-        ref[0,2]=(0.0720644688954)/(o+1.)+(-0.906636966188)+(0.473326957552)*0.5**o
-        ref[0,3]=(-0.747749341777)/(o+1.)+(0.730249972378)+(0.625072170633)*0.5**o
-        ref[0,4]=(-0.194031116169)/(o+1.)+(-0.432063325829)+(-0.236555924983)*0.5**o
-        ref[1,0]=(0.807081538033)/(o+1.)+(-0.612266650007)+(0.893215841629)*0.5**o
-        ref[1,1]=(-0.662516518957)/(o+1.)+(-0.176318925886)+(-0.61391462039)*0.5**o
-        ref[1,2]=(-0.570345636156)/(o+1.)+(0.791877954963)+(0.454752014319)*0.5**o
-        ref[1,3]=(-0.312400910795)/(o+1.)+(0.212935137466)+(0.376745519544)*0.5**o
-        ref[1,4]=(-0.764680414264)/(o+1.)+(0.174215486579)+(0.651158039278)*0.5**o
-        ref[2,0]=(-0.837942771642)/(o+1.)+(-0.187938486702)+(0.160219095985)*0.5**o
-        ref[2,1]=(-0.672421039761)/(o+1.)+(0.17384002882)+(0.652491397549)*0.5**o
-        ref[2,2]=(-0.656187949922)/(o+1.)+(0.559888736121)+(-0.397175824637)*0.5**o
-        ref[2,3]=(0.259558368195)/(o+1.)+(0.55148644978)+(0.0217149092406)*0.5**o
-        ref[2,4]=(-0.188397537901)/(o+1.)+(-0.0561706170512)+(-0.394789877345)*0.5**o
-        ref[3,0]=(0.91055628617)/(o+1.)+(0.574211274098)+(-0.347026073739)*0.5**o
-        ref[3,1]=(0.29225509237)/(o+1.)+(0.64447705482)+(0.542230466941)*0.5**o
-        ref[3,2]=(0.121065624384)/(o+1.)+(0.0316495277836)+(-0.693369776888)*0.5**o
-        ref[3,3]=(-0.943523334976)/(o+1.)+(-0.266302644031)+(-0.246429210629)*0.5**o
-        ref[3,4]=(0.714915399455)/(o+1.)+(0.459963131994)+(-0.846650680369)*0.5**o
-      else:
-        arg[0,0]=(-0.493869713454)*x[0]+(-0.381969413515)*x[1]+(1.59862368848)*x[2]
-        arg[0,1]=(-0.581245543547)*x[0]+(0.961117271889)*x[1]+(-0.158073515343)*x[2]
-        arg[0,2]=(-0.635283143641)*x[0]+(0.695573236987)*x[1]+(-0.719180832278)*x[2]
-        arg[0,3]=(-0.737780596733)*x[0]+(-1.11171283352)*x[1]+(0.459954346315)*x[2]
-        arg[0,4]=(1.12522065074)*x[0]+(-1.08427904854)*x[1]+(-0.715679673556)*x[2]
-        arg[1,0]=(0.972468186181)*x[0]+(-0.211014530435)*x[1]+(-0.734414099002)*x[2]
-        arg[1,1]=(-1.67337704748)*x[0]+(0.871096213089)*x[1]+(1.51063313223)*x[2]
-        arg[1,2]=(-0.222013007834)*x[0]+(1.46474508326)*x[1]+(-0.979243908862)*x[2]
-        arg[1,3]=(1.21195281087)*x[0]+(0.274082389329)*x[1]+(1.56144436465)*x[2]
-        arg[1,4]=(1.35812865884)*x[0]+(1.25819798853)*x[1]+(0.895334048395)*x[2]
-        arg[2,0]=(-0.167404344437)*x[0]+(0.0710591934315)*x[1]+(-0.124469683665)*x[2]
-        arg[2,1]=(-0.492240632996)*x[0]+(-0.317251117382)*x[1]+(0.0195461703529)*x[2]
-        arg[2,2]=(-0.277590266225)*x[0]+(-1.65859476899)*x[1]+(-0.0100216405668)*x[2]
-        arg[2,3]=(-0.0701281298455)*x[0]+(0.502137254703)*x[1]+(0.701220923443)*x[2]
-        arg[2,4]=(-0.72186096407)*x[0]+(-0.900487568179)*x[1]+(-0.735573922826)*x[2]
-        arg[3,0]=(-0.0677324474129)*x[0]+(-0.649963209718)*x[1]+(-0.770861099726)*x[2]
-        arg[3,1]=(0.563588189481)*x[0]+(0.714614932251)*x[1]+(-0.0957764632886)*x[2]
-        arg[3,2]=(1.13337395062)*x[0]+(0.507556316073)*x[1]+(-0.196759085949)*x[2]
-        arg[3,3]=(-1.2636883168)*x[0]+(-0.811660344076)*x[1]+(0.645462052598)*x[2]
-        arg[3,4]=(-0.104175186987)*x[0]+(-0.929176038155)*x[1]+(1.07530379856)*x[2]
-        ref[0,0]=(0.84538674973)/(o+1.)+(0.0569713556632)+(-0.236544899547)*0.5**o
-        ref[0,1]=(-0.307689589699)/(o+1.)+(0.245040337642)+(0.0394071274131)*0.5**o
-        ref[0,2]=(0.955244736357)/(o+1.)+(-0.341771136504)+(-0.930593202281)*0.5**o
-        ref[0,3]=(-0.353490461722)/(o+1.)+(-0.476228433901)+(-0.083591754415)*0.5**o
-        ref[0,4]=(-1.31220485482)/(o+1.)+(0.0466426656676)+(0.544181452128)*0.5**o
-        ref[1,0]=(0.22773475414)/(o+1.)+(-0.488454801654)+(0.776214405914)*0.5**o
-        ref[1,1]=(1.50688678707)/(o+1.)+(0.0851415404695)+(-0.96881757017)*0.5**o
-        ref[1,2]=(0.313471097102)/(o+1.)+(-0.0875594518156)+(0.125135973096)*0.5**o
-        ref[1,3]=(0.269521220179)/(o+1.)+(1.1192007195)+(0.539556905661)*0.5**o
-        ref[1,4]=(1.91499876064)/(o+1.)+(0.509063797893)+(0.578534339343)*0.5**o
-        ref[2,0]=(0.941352651562)/(o+1.)+(-0.966199402186)+(0.770231318139)*0.5**o
-        ref[2,1]=(-0.141490823562)/(o+1.)+(-0.20919987022)+(-0.230055016023)*0.5**o
-        ref[2,2]=(-0.916148047971)/(o+1.)+(-0.371740600192)+(-0.286577427426)*0.5**o
-        ref[2,3]=(0.229516219331)/(o+1.)+(0.274790532736)+(0.354132763498)*0.5**o
-        ref[2,4]=(-1.19120612619)/(o+1.)+(-0.139859859385)+(-0.88699661011)*0.5**o
-        ref[3,0]=(-1.48630121465)/(o+1.)+(0.0744166251063)+(-0.151088792417)*0.5**o
-        ref[3,1]=(-0.335583560513)/(o+1.)+(0.277436410841)+(0.963137397276)*0.5**o
-        ref[3,2]=(-0.673942688644)/(o+1.)+(0.70077509905)+(0.716563671283)*0.5**o
-        ref[3,3]=(-0.148394092795)/(o+1.)+(-0.237190239072)+(-0.807112037336)*0.5**o
-        ref[3,4]=(0.529983886211)/(o+1.)+(-0.371055083588)+(0.254078854382)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(0.661725715165)*x[0]+(0.219720717581)*x[1]
-        arg[0,0,1]=(-0.642240082304)*x[0]+(-0.279652756776)*x[1]
-        arg[0,1,0]=(0.0204235813151)*x[0]+(-0.374873249933)*x[1]
-        arg[0,1,1]=(1.4418481252)*x[0]+(0.205656834772)*x[1]
-        arg[1,0,0]=(0.65992179951)*x[0]+(-1.04887875458)*x[1]
-        arg[1,0,1]=(-0.195480216199)*x[0]+(-0.373905275039)*x[1]
-        arg[1,1,0]=(0.781251543352)*x[0]+(0.0416248109536)*x[1]
-        arg[1,1,1]=(-0.925751319189)*x[0]+(-0.113992910046)*x[1]
-        arg[2,0,0]=(-0.0767414065227)*x[0]+(-0.156682840973)*x[1]
-        arg[2,0,1]=(0.688457272529)*x[0]+(0.524916336046)*x[1]
-        arg[2,1,0]=(0.753722830084)*x[0]+(-0.890325839466)*x[1]
-        arg[2,1,1]=(0.730789290145)*x[0]+(-0.278986703716)*x[1]
-        arg[3,0,0]=(-0.287376796439)*x[0]+(-0.153987233224)*x[1]
-        arg[3,0,1]=(-1.15687435255)*x[0]+(0.250005890238)*x[1]
-        arg[3,1,0]=(-0.845312830629)*x[0]+(0.256211962352)*x[1]
-        arg[3,1,1]=(-0.574311820519)*x[0]+(-0.440297035998)*x[1]
-        arg[4,0,0]=(-0.360607647308)*x[0]+(-1.29380437557)*x[1]
-        arg[4,0,1]=(1.32019433485)*x[0]+(0.295255956618)*x[1]
-        arg[4,1,0]=(-1.64162941972)*x[0]+(0.117482372162)*x[1]
-        arg[4,1,1]=(-0.303103646619)*x[0]+(-0.88458982681)*x[1]
-        arg[5,0,0]=(-0.666761879038)*x[0]+(-0.735786278877)*x[1]
-        arg[5,0,1]=(0.0892896382617)*x[0]+(-0.45478872773)*x[1]
-        arg[5,1,0]=(-0.50985624415)*x[0]+(-0.400022939567)*x[1]
-        arg[5,1,1]=(1.39240706368)*x[0]+(0.0149740822664)*x[1]
-        ref[0,0,0]=(-0.114834538488)/(o+1.)+(0.240621006484)+(0.515038958264)*0.5**o
-        ref[0,0,1]=(0.588698337077)/(o+1.)+(-0.702256377233)+(-0.10607842169)*0.5**o
-        ref[0,1,0]=(0.13849818224)/(o+1.)+(-0.277555277991)+(0.0621627051247)*0.5**o
-        ref[0,1,1]=(-0.0878009521163)/(o+1.)+(0.630168348947)+(0.474969214192)*0.5**o
-        ref[1,0,0]=(-0.696600538111)/(o+1.)+(-0.343318260912)+(0.994280104861)*0.5**o
-        ref[1,0,1]=(-0.0887026688527)/(o+1.)+(-0.385753227979)+(0.290823633572)*0.5**o
-        ref[1,1,0]=(0.831408608956)/(o+1.)+(-0.242985671853)+(0.477439089057)*0.5**o
-        ref[1,1,1]=(-0.621059053191)/(o+1.)+(-0.0700203481241)+(-0.278644479797)*0.5**o
-        ref[2,0,0]=(0.7890720399)/(o+1.)+(-0.539721196393)+(0.0569461053905)*0.5**o
-        ref[2,0,1]=(-0.228628151401)/(o+1.)+(0.826946074171)+(-0.211890388366)*0.5**o
-        ref[2,1,0]=(-0.837617325493)/(o+1.)+(0.289656653751)+(0.121701008608)*0.5**o
-        ref[2,1,1]=(0.246577988625)/(o+1.)+(0.0512227634376)+(0.102779070928)*0.5**o
-        ref[3,0,0]=(-0.0109584684212)/(o+1.)+(-0.334888666171)+(0.239371771102)*0.5**o
-        ref[3,0,1]=(-0.125987676419)/(o+1.)+(-0.170179004032)+(-0.440522777827)*0.5**o
-        ref[3,1,0]=(-0.354093141636)/(o+1.)+(-0.177294275919)+(0.119580825198)*0.5**o
-        ref[3,1,1]=(-0.746761075412)/(o+1.)+(0.192068760731)+(-0.651985302566)*0.5**o
-        ref[4,0,0]=(-0.42411673219)/(o+1.)+(-0.579162944937)+(-0.0719694008158)*0.5**o
-        ref[4,0,1]=(0.169881169584)/(o+1.)+(0.483614029132)+(0.478341063616)*0.5**o
-        ref[4,1,0]=(0.943567836264)/(o+1.)+(-0.898782941264)+(-0.670149001297)*0.5**o
-        ref[4,1,1]=(-0.703610807936)/(o+1.)+(0.225342628657)+(-0.934767922806)*0.5**o
-        ref[5,0,0]=(-0.788792225213)/(o+1.)+(-0.1768857093)+(-0.259984514102)*0.5**o
-        ref[5,0,1]=(-0.788708879899)/(o+1.)+(-0.202288491141)+(0.827786772711)*0.5**o
-        ref[5,1,0]=(-0.823081809707)/(o+1.)+(0.274720963093)+(-0.636239300197)*0.5**o
-        ref[5,1,1]=(0.498922549807)/(o+1.)+(0.0129388257746)+(0.882580944588)*0.5**o
-      else:
-        arg[0,0,0]=(-0.426613654844)*x[0]+(-1.01433980801)*x[1]+(0.564621874916)*x[2]
-        arg[0,0,1]=(-0.438521968882)*x[0]+(1.6033775267)*x[1]+(0.691349995832)*x[2]
-        arg[0,1,0]=(-0.04337513731)*x[0]+(0.142927668234)*x[1]+(0.506581723199)*x[2]
-        arg[0,1,1]=(-0.120598868162)*x[0]+(-0.213666787813)*x[1]+(-1.04221679332)*x[2]
-        arg[1,0,0]=(0.153696490712)*x[0]+(-0.122516529815)*x[1]+(-1.08837272712)*x[2]
-        arg[1,0,1]=(0.410706464237)*x[0]+(0.720079363315)*x[1]+(-0.767790357539)*x[2]
-        arg[1,1,0]=(-1.03726428173)*x[0]+(-0.316809853003)*x[1]+(-0.780405868082)*x[2]
-        arg[1,1,1]=(-0.427547967216)*x[0]+(-0.897766643609)*x[1]+(-1.56913552404)*x[2]
-        arg[2,0,0]=(-0.282789248898)*x[0]+(-0.110846936031)*x[1]+(-1.4329391906)*x[2]
-        arg[2,0,1]=(1.46866588617)*x[0]+(-1.23022501959)*x[1]+(-0.3123390018)*x[2]
-        arg[2,1,0]=(-0.314115718621)*x[0]+(1.7333934438)*x[1]+(0.833572700726)*x[2]
-        arg[2,1,1]=(0.464246462638)*x[0]+(0.267484068646)*x[1]+(0.342009204787)*x[2]
-        arg[3,0,0]=(0.578853099163)*x[0]+(-0.0453855508465)*x[1]+(-0.0751578475516)*x[2]
-        arg[3,0,1]=(-0.526734485752)*x[0]+(-1.03286310016)*x[1]+(-0.398986583917)*x[2]
-        arg[3,1,0]=(0.0239088277798)*x[0]+(0.205105470192)*x[1]+(-1.04986349166)*x[2]
-        arg[3,1,1]=(0.130893744001)*x[0]+(-0.273702140669)*x[1]+(-0.0804222415128)*x[2]
-        arg[4,0,0]=(-0.822661618584)*x[0]+(-0.267189204519)*x[1]+(-0.290013766971)*x[2]
-        arg[4,0,1]=(-1.46759823734)*x[0]+(0.317465945316)*x[1]+(0.108284317752)*x[2]
-        arg[4,1,0]=(-1.3920990386)*x[0]+(-1.17823778694)*x[1]+(-0.18366434307)*x[2]
-        arg[4,1,1]=(-0.0915496209516)*x[0]+(-0.367624609832)*x[1]+(1.30630257323)*x[2]
-        arg[5,0,0]=(0.117840830455)*x[0]+(-0.667875433194)*x[1]+(-1.59716688455)*x[2]
-        arg[5,0,1]=(-0.818693227605)*x[0]+(0.483842075248)*x[1]+(-0.408373205535)*x[2]
-        arg[5,1,0]=(1.36906770301)*x[0]+(0.494926179999)*x[1]+(0.717041707262)*x[2]
-        arg[5,1,1]=(0.819757116081)*x[0]+(0.0982458749015)*x[1]+(0.275080391599)*x[2]
-        ref[0,0,0]=(0.236560699949)/(o+1.)+(-0.392784388084)+(-0.327323511722)*0.5**o
-        ref[0,0,1]=(1.32491522045)/(o+1.)+(0.525146863711)+(-0.519003394222)*0.5**o
-        ref[0,1,0]=(0.433749865563)/(o+1.)+(0.23007126008)+(-0.287758131599)*0.5**o
-        ref[0,1,1]=(-0.0563021060686)/(o+1.)+(-0.403921160703)+(-0.512338021825)*0.5**o
-        ref[1,0,0]=(-0.170496965963)/(o+1.)+(-0.914421777259)+(0.942147754258)*0.5**o
-        ref[1,0,1]=(-0.372707483726)/(o+1.)+(0.636041158872)+(-0.536379364005)*0.5**o
-        ref[1,1,0]=(-0.211529878364)/(o+1.)+(-0.912151985776)+(-0.0986461529033)*0.5**o
-        ref[1,1,1]=(-1.32533998437)/(o+1.)+(-0.685030198386)+(-0.19904975372)*0.5**o
-        ref[2,0,0]=(0.152048902469)/(o+1.)+(-0.88880590209)+(-0.201012473813)*0.5**o
-        ref[2,0,1]=(-0.748900052246)/(o+1.)+(-0.0226120471998)+(0.720226011425)*0.5**o
-        ref[2,1,0]=(0.77797707941)/(o+1.)+(1.01635055442)+(-0.557827762351)*0.5**o
-        ref[2,1,1]=(1.08969334716)/(o+1.)+(-0.404644728844)+(0.793335846595)*0.5**o
-        ref[3,0,0]=(1.56498448669)/(o+1.)+(-0.699967188685)+(0.293259591449)*0.5**o
-        ref[3,0,1]=(-0.620133427128)/(o+1.)+(-0.550037413688)+(-0.238375915329)*0.5**o
-        ref[3,1,0]=(-0.156380586288)/(o+1.)+(-0.0154369973565)+(-0.633594612687)*0.5**o
-        ref[3,1,1]=(-0.352989559326)/(o+1.)+(-0.290547031627)+(0.710852984398)*0.5**o
-        ref[4,0,0]=(-0.147579361355)/(o+1.)+(-0.615173424765)+(-0.00193837918766)*0.5**o
-        ref[4,0,1]=(0.598152345277)/(o+1.)+(-0.540248606426)+(-0.559503106696)*0.5**o
-        ref[4,1,0]=(-1.17182448825)/(o+1.)+(-0.590551681576)+(-0.401073317208)*0.5**o
-        ref[4,1,1]=(0.837504141173)/(o+1.)+(0.0807414267186)+(-0.15185865216)*0.5**o
-        ref[5,0,0]=(-0.646601115533)/(o+1.)+(-1.20895265273)+(0.9173049337)*0.5**o
-        ref[5,0,1]=(1.26626110052)/(o+1.)+(-0.56471923973)+(-0.880046978955)*0.5**o
-        ref[5,1,0]=(-0.069063169298)/(o+1.)+(0.883536796964)+(0.883025165644)*0.5**o
-        ref[5,1,1]=(1.05999338993)/(o+1.)+(-0.392519102893)+(0.918128198439)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports integral on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(0.257898226293)*x[0]+(-0.01230083314)*x[1]
-        arg[0,0,0,1]=(0.0531183070647)*x[0]+(-0.170192287836)*x[1]
-        arg[0,0,1,0]=(-0.364644940864)*x[0]+(1.04227651446)*x[1]
-        arg[0,0,1,1]=(-0.894334108203)*x[0]+(0.151390331211)*x[1]
-        arg[0,0,2,0]=(1.03825401708)*x[0]+(-0.882136097149)*x[1]
-        arg[0,0,2,1]=(-1.05304910155)*x[0]+(1.06866311708)*x[1]
-        arg[0,1,0,0]=(1.54742542159)*x[0]+(0.941778348482)*x[1]
-        arg[0,1,0,1]=(1.1797380956)*x[0]+(-0.296417138234)*x[1]
-        arg[0,1,1,0]=(-1.09196028027)*x[0]+(-0.783377624006)*x[1]
-        arg[0,1,1,1]=(0.370952191443)*x[0]+(-0.0854141858991)*x[1]
-        arg[0,1,2,0]=(-1.23552368139)*x[0]+(1.23848088087)*x[1]
-        arg[0,1,2,1]=(0.216345350114)*x[0]+(-0.136524468427)*x[1]
-        arg[0,2,0,0]=(-1.21206901263)*x[0]+(0.804219582144)*x[1]
-        arg[0,2,0,1]=(0.192956526208)*x[0]+(0.588417678858)*x[1]
-        arg[0,2,1,0]=(-0.940175603742)*x[0]+(0.329047260784)*x[1]
-        arg[0,2,1,1]=(-0.138597387792)*x[0]+(0.398298326223)*x[1]
-        arg[0,2,2,0]=(0.10089766824)*x[0]+(1.25459493298)*x[1]
-        arg[0,2,2,1]=(-0.401163525883)*x[0]+(0.276542765282)*x[1]
-        arg[0,3,0,0]=(0.252156795268)*x[0]+(-0.50223063539)*x[1]
-        arg[0,3,0,1]=(0.466244610905)*x[0]+(-0.587025224301)*x[1]
-        arg[0,3,1,0]=(-0.268082012713)*x[0]+(-1.28874675764)*x[1]
-        arg[0,3,1,1]=(1.10867463519)*x[0]+(-0.165500912864)*x[1]
-        arg[0,3,2,0]=(-1.94681908266)*x[0]+(0.166854108476)*x[1]
-        arg[0,3,2,1]=(-0.537150417922)*x[0]+(0.0872851457131)*x[1]
-        arg[0,4,0,0]=(-0.376548581807)*x[0]+(-0.245201133388)*x[1]
-        arg[0,4,0,1]=(-0.135287690767)*x[0]+(0.750376238942)*x[1]
-        arg[0,4,1,0]=(-0.0240491596907)*x[0]+(-1.21337088424)*x[1]
-        arg[0,4,1,1]=(0.699215733397)*x[0]+(0.0596356032853)*x[1]
-        arg[0,4,2,0]=(-0.521316010702)*x[0]+(-1.75309802615)*x[1]
-        arg[0,4,2,1]=(0.403640172305)*x[0]+(1.41465827077)*x[1]
-        arg[1,0,0,0]=(-1.01538089315)*x[0]+(-1.14785578909)*x[1]
-        arg[1,0,0,1]=(1.10045201832)*x[0]+(0.630761728795)*x[1]
-        arg[1,0,1,0]=(0.137673646147)*x[0]+(-0.387129090253)*x[1]
-        arg[1,0,1,1]=(-1.04588287863)*x[0]+(-1.22433029859)*x[1]
-        arg[1,0,2,0]=(-0.567830263535)*x[0]+(-0.405808616295)*x[1]
-        arg[1,0,2,1]=(0.139326102495)*x[0]+(-1.93153384363)*x[1]
-        arg[1,1,0,0]=(-0.638524762921)*x[0]+(0.506405751653)*x[1]
-        arg[1,1,0,1]=(0.130775153144)*x[0]+(0.531317202208)*x[1]
-        arg[1,1,1,0]=(0.557476206038)*x[0]+(0.447588676184)*x[1]
-        arg[1,1,1,1]=(-0.538795916875)*x[0]+(-0.593869493531)*x[1]
-        arg[1,1,2,0]=(-1.09827483942)*x[0]+(0.376431061876)*x[1]
-        arg[1,1,2,1]=(-0.0074505620387)*x[0]+(-0.798645151486)*x[1]
-        arg[1,2,0,0]=(0.251283911459)*x[0]+(0.194595071813)*x[1]
-        arg[1,2,0,1]=(1.00482763799)*x[0]+(-1.00059863394)*x[1]
-        arg[1,2,1,0]=(-0.453095434684)*x[0]+(-0.513922011418)*x[1]
-        arg[1,2,1,1]=(0.558548837484)*x[0]+(0.0696328406825)*x[1]
-        arg[1,2,2,0]=(-1.20625552545)*x[0]+(-0.151371710692)*x[1]
-        arg[1,2,2,1]=(0.100262209656)*x[0]+(-0.314628804179)*x[1]
-        arg[1,3,0,0]=(0.947063141882)*x[0]+(-0.297271200562)*x[1]
-        arg[1,3,0,1]=(0.0760277251261)*x[0]+(-1.17982146387)*x[1]
-        arg[1,3,1,0]=(-1.46946063969)*x[0]+(-0.615302663567)*x[1]
-        arg[1,3,1,1]=(0.419747293729)*x[0]+(-0.629842531949)*x[1]
-        arg[1,3,2,0]=(-1.44607954917)*x[0]+(0.520024093924)*x[1]
-        arg[1,3,2,1]=(-1.01556392596)*x[0]+(-0.307173811354)*x[1]
-        arg[1,4,0,0]=(-0.164339335244)*x[0]+(0.390736414982)*x[1]
-        arg[1,4,0,1]=(-0.266932380288)*x[0]+(-0.731533848078)*x[1]
-        arg[1,4,1,0]=(-0.903825489055)*x[0]+(-1.81564784421)*x[1]
-        arg[1,4,1,1]=(-0.426008882665)*x[0]+(-1.09792948908)*x[1]
-        arg[1,4,2,0]=(-1.32984927589)*x[0]+(1.58196302541)*x[1]
-        arg[1,4,2,1]=(-0.0581032806145)*x[0]+(-0.323073355302)*x[1]
-        arg[2,0,0,0]=(-0.744014251373)*x[0]+(-0.818253254872)*x[1]
-        arg[2,0,0,1]=(0.368656965396)*x[0]+(-0.0864646380237)*x[1]
-        arg[2,0,1,0]=(-0.112428845773)*x[0]+(0.109170104421)*x[1]
-        arg[2,0,1,1]=(0.0682241548911)*x[0]+(-1.65999482283)*x[1]
-        arg[2,0,2,0]=(0.212777058993)*x[0]+(0.127163480945)*x[1]
-        arg[2,0,2,1]=(-0.256989443356)*x[0]+(0.183206687414)*x[1]
-        arg[2,1,0,0]=(0.578997994373)*x[0]+(0.413087453689)*x[1]
-        arg[2,1,0,1]=(0.886532090807)*x[0]+(0.330645525532)*x[1]
-        arg[2,1,1,0]=(0.18224742814)*x[0]+(-0.713166591262)*x[1]
-        arg[2,1,1,1]=(-0.25218296706)*x[0]+(0.736797897014)*x[1]
-        arg[2,1,2,0]=(0.885270371408)*x[0]+(-1.35641397127)*x[1]
-        arg[2,1,2,1]=(-0.963214290879)*x[0]+(0.348421598509)*x[1]
-        arg[2,2,0,0]=(0.884120745351)*x[0]+(0.956857507884)*x[1]
-        arg[2,2,0,1]=(-0.00795298517561)*x[0]+(0.51243740322)*x[1]
-        arg[2,2,1,0]=(-0.563655252975)*x[0]+(-0.716305131721)*x[1]
-        arg[2,2,1,1]=(0.648243491623)*x[0]+(-0.142239786485)*x[1]
-        arg[2,2,2,0]=(1.50677848542)*x[0]+(-0.359722006818)*x[1]
-        arg[2,2,2,1]=(-0.522592086302)*x[0]+(-0.18544927497)*x[1]
-        arg[2,3,0,0]=(0.0822787762966)*x[0]+(0.196309662733)*x[1]
-        arg[2,3,0,1]=(0.232573258627)*x[0]+(-0.0597976775432)*x[1]
-        arg[2,3,1,0]=(1.50895737052)*x[0]+(0.546625934312)*x[1]
-        arg[2,3,1,1]=(-1.64023373286)*x[0]+(0.220053261777)*x[1]
-        arg[2,3,2,0]=(1.5897208842)*x[0]+(-0.0355885594992)*x[1]
-        arg[2,3,2,1]=(-1.52822349982)*x[0]+(-0.0906934717656)*x[1]
-        arg[2,4,0,0]=(0.496696582601)*x[0]+(-0.303888675059)*x[1]
-        arg[2,4,0,1]=(-0.0819586112177)*x[0]+(-0.0449047294378)*x[1]
-        arg[2,4,1,0]=(-0.678530758513)*x[0]+(-1.2173963447)*x[1]
-        arg[2,4,1,1]=(-0.645450475268)*x[0]+(0.356771113426)*x[1]
-        arg[2,4,2,0]=(-0.486643021867)*x[0]+(0.977763869689)*x[1]
-        arg[2,4,2,1]=(-0.458991807397)*x[0]+(1.80038432923)*x[1]
-        arg[3,0,0,0]=(0.270795948755)*x[0]+(-0.691512096338)*x[1]
-        arg[3,0,0,1]=(-0.756717130099)*x[0]+(1.16189640534)*x[1]
-        arg[3,0,1,0]=(0.967554346699)*x[0]+(-0.272119008963)*x[1]
-        arg[3,0,1,1]=(1.14296491195)*x[0]+(-0.707175662379)*x[1]
-        arg[3,0,2,0]=(1.15665030692)*x[0]+(0.414803389409)*x[1]
-        arg[3,0,2,1]=(1.38997274955)*x[0]+(1.07065568192)*x[1]
-        arg[3,1,0,0]=(-0.623998925511)*x[0]+(0.375545806421)*x[1]
-        arg[3,1,0,1]=(-0.363431948398)*x[0]+(-0.183100417297)*x[1]
-        arg[3,1,1,0]=(0.0435866301729)*x[0]+(-0.557137572068)*x[1]
-        arg[3,1,1,1]=(-0.253225217468)*x[0]+(-0.0657932188329)*x[1]
-        arg[3,1,2,0]=(0.147700921064)*x[0]+(0.681624563015)*x[1]
-        arg[3,1,2,1]=(-0.075394297616)*x[0]+(0.271741245789)*x[1]
-        arg[3,2,0,0]=(1.34803044812)*x[0]+(0.87991065609)*x[1]
-        arg[3,2,0,1]=(0.0529487135353)*x[0]+(0.806480092352)*x[1]
-        arg[3,2,1,0]=(-1.52038624166)*x[0]+(-0.992718138685)*x[1]
-        arg[3,2,1,1]=(0.0859852188749)*x[0]+(1.63512596202)*x[1]
-        arg[3,2,2,0]=(1.46925148575)*x[0]+(-1.60383564005)*x[1]
-        arg[3,2,2,1]=(0.114463395473)*x[0]+(-1.0186377376)*x[1]
-        arg[3,3,0,0]=(-1.02962502658)*x[0]+(-1.06788543146)*x[1]
-        arg[3,3,0,1]=(-0.184391597652)*x[0]+(0.462603936483)*x[1]
-        arg[3,3,1,0]=(0.611113335782)*x[0]+(0.282417397043)*x[1]
-        arg[3,3,1,1]=(-0.193423873796)*x[0]+(-0.56108614964)*x[1]
-        arg[3,3,2,0]=(-0.0290687598224)*x[0]+(-0.460221158417)*x[1]
-        arg[3,3,2,1]=(0.784513522959)*x[0]+(-0.484813129206)*x[1]
-        arg[3,4,0,0]=(0.423780748664)*x[0]+(-0.344020787894)*x[1]
-        arg[3,4,0,1]=(1.10623024451)*x[0]+(-0.775008153301)*x[1]
-        arg[3,4,1,0]=(0.554847534291)*x[0]+(-0.854749107999)*x[1]
-        arg[3,4,1,1]=(-0.639595693597)*x[0]+(-0.966152813212)*x[1]
-        arg[3,4,2,0]=(-0.0172621996023)*x[0]+(0.321815074269)*x[1]
-        arg[3,4,2,1]=(0.39605156824)*x[0]+(-0.499138231749)*x[1]
-        ref[0,0,0,0]=(0.169892838337)/(o+1.)+(-0.323261281472)+(0.722227117759)*0.5**o
-        ref[0,0,0,1]=(-0.899797330597)/(o+1.)+(0.731242549464)+(-0.679761749104)*0.5**o
-        ref[0,0,1,0]=(0.948969615551)/(o+1.)+(-0.173478478707)+(0.0756189154575)*0.5**o
-        ref[0,0,1,1]=(-0.484419525942)/(o+1.)+(0.287761319651)+(-0.834046890353)*0.5**o
-        ref[0,0,2,0]=(-0.275366085384)/(o+1.)+(-0.051636507926)+(0.534757021171)*0.5**o
-        ref[0,0,2,1]=(0.338862631582)/(o+1.)+(0.076489529483)+(-0.47622767501)*0.5**o
-        ref[0,1,0,0]=(0.960885993642)/(o+1.)+(0.36959166751)+(0.789134441414)*0.5**o
-        ref[0,1,0,1]=(-0.101908900511)/(o+1.)+(0.343409131566)+(0.298411594744)*0.5**o
-        ref[0,1,1,0]=(-0.50227382988)/(o+1.)+(-0.431549057432)+(-0.509965959533)*0.5**o
-        ref[0,1,1,1]=(-0.294216689224)/(o+1.)+(0.293114907564)+(-0.00647512035965)*0.5**o
-        ref[0,1,2,0]=(0.330313139948)/(o+1.)+(0.0601559902451)+(-0.447667920962)*0.5**o
-        ref[0,1,2,1]=(-0.855325117375)/(o+1.)+(0.455706690618)+(0.0237326178252)*0.5**o
-        ref[0,2,0,0]=(0.958948557218)/(o+1.)+(-0.307015973897)+(-0.752766039908)*0.5**o
-        ref[0,2,0,1]=(0.622666086232)/(o+1.)+(0.417782845058)+(-0.676857571283)*0.5**o
-        ref[0,2,1,0]=(-0.476269525636)/(o+1.)+(0.203518519787)+(-0.541895856898)*0.5**o
-        ref[0,2,1,1]=(0.396862410812)/(o+1.)+(-0.318442063423)+(0.499722654464)*0.5**o
-        ref[0,2,2,0]=(0.291546173382)/(o+1.)+(0.345688404218)+(0.372569619405)*0.5**o
-        ref[0,2,2,1]=(-0.0863432016899)/(o+1.)+(0.296494638577)+(-0.631266836064)*0.5**o
-        ref[0,3,0,0]=(0.437179077921)/(o+1.)+(-0.340515851088)+(-0.00622121586734)*0.5**o
-        ref[0,3,0,1]=(-0.0670787919003)/(o+1.)+(-0.492735838895)+(0.931769856293)*0.5**o
-        ref[0,3,1,0]=(-0.455620785864)/(o+1.)+(-0.866886545624)+(0.632565106759)*0.5**o
-        ref[0,3,1,1]=(0.769395985412)/(o+1.)+(-0.303642587154)+(0.781062911223)*0.5**o
-        ref[0,3,2,0]=(-0.338160377272)/(o+1.)+(-0.237545833658)+(-0.966712929597)*0.5**o
-        ref[0,3,2,1]=(-0.796435534783)/(o+1.)+(0.544922318125)+(-0.743274373676)*0.5**o
-        ref[0,4,0,0]=(0.452932120968)/(o+1.)+(-0.512874769603)+(-0.048932296957)*0.5**o
-        ref[0,4,0,1]=(0.361579034112)/(o+1.)+(-0.0561290568189)+(0.365767627701)*0.5**o
-        ref[0,4,1,0]=(-0.626053161593)/(o+1.)+(-0.761324946295)+(0.911283010254)*0.5**o
-        ref[0,4,1,1]=(-0.0455977379835)/(o+1.)+(0.292122388548)+(0.22020429757)*0.5**o
-        ref[0,4,2,0]=(-0.881052488675)/(o+1.)+(-0.210171400955)+(-0.973018746263)*0.5**o
-        ref[0,4,2,1]=(0.955475719603)/(o+1.)+(0.367959093676)+(0.126904536122)*0.5**o
-        ref[1,0,0,0]=(-0.314523133291)/(o+1.)+(-0.649561146707)+(-0.54959125554)*0.5**o
-        ref[1,0,0,1]=(0.776726613012)/(o+1.)+(0.0747896120381)+(0.804907910029)*0.5**o
-        ref[1,0,1,0]=(0.416309554773)/(o+1.)+(0.0650606132082)+(-0.795886225295)*0.5**o
-        ref[1,0,1,1]=(-0.642083920221)/(o+1.)+(-0.518812997818)+(-0.590503261366)*0.5**o
-        ref[1,0,2,0]=(0.209400082886)/(o+1.)+(-0.592256267485)+(0.00147357225359)*0.5**o
-        ref[1,0,2,1]=(-0.969945221754)/(o+1.)+(-0.364559871358)+(-0.0931427766681)*0.5**o
-        ref[1,1,0,0]=(0.941138659497)/(o+1.)+(-0.103485523138)+(-0.866286624489)*0.5**o
-        ref[1,1,0,1]=(0.527395399401)/(o+1.)+(0.373358049173)+(-0.612019142395)*0.5**o
-        ref[1,1,1,0]=(-0.276942103917)/(o+1.)+(0.624509599487)+(0.0329877871648)*0.5**o
-        ref[1,1,1,1]=(-0.153477829221)/(o+1.)+(-0.0616268433725)+(-0.85593389444)*0.5**o
-        ref[1,1,2,0]=(0.2685285297)/(o+1.)+(-0.301824551915)+(-0.386723203413)*0.5**o
-        ref[1,1,2,1]=(-0.530960074652)/(o+1.)+(0.248621312801)+(-0.772378264474)*0.5**o
-        ref[1,2,0,0]=(0.745071931955)/(o+1.)+(-0.149268301427)+(-0.000656345828701)*0.5**o
-        ref[1,2,0,1]=(-0.581822428087)/(o+1.)+(0.2315691847)+(0.122913062738)*0.5**o
-        ref[1,2,1,0]=(-0.325165099021)/(o+1.)+(-0.414758139139)+(0.187663931198)*0.5**o
-        ref[1,2,1,1]=(-0.389683593964)/(o+1.)+(0.265985790556)+(0.485893691018)*0.5**o
-        ref[1,2,2,0]=(0.661969003098)/(o+1.)+(-0.514584521701)+(-0.990427195841)*0.5**o
-        ref[1,2,2,1]=(-0.0828384828188)/(o+1.)+(-0.482166570368)+(0.832805029032)*0.5**o
-        ref[1,3,0,0]=(-0.756020671713)/(o+1.)+(0.627704058228)+(0.150404496577)*0.5**o
-        ref[1,3,0,1]=(-0.93648010541)/(o+1.)+(0.11022703478)+(-0.387767702896)*0.5**o
-        ref[1,3,1,0]=(-0.995823513997)/(o+1.)+(-0.242072805569)+(-0.604794178119)*0.5**o
-        ref[1,3,1,1]=(-0.543071878541)/(o+1.)+(-0.160890620667)+(0.654757881656)*0.5**o
-        ref[1,3,2,0]=(0.803184441579)/(o+1.)+(-0.612293875048)+(-0.504652146723)*0.5**o
-        ref[1,3,2,1]=(-0.786714439322)/(o+1.)+(-0.175556007517)+(-0.18491128296)*0.5**o
-        ref[1,4,0,0]=(-0.302928744298)/(o+1.)+(0.476360987754)+(-0.423396151472)*0.5**o
-        ref[1,4,0,1]=(-0.410240602476)/(o+1.)+(-0.49551630458)+(0.40280698327)*0.5**o
-        ref[1,4,1,0]=(-0.820677400346)/(o+1.)+(-0.573037933363)+(-0.752720066188)*0.5**o
-        ref[1,4,1,1]=(-0.492748923658)/(o+1.)+(-0.600739806799)+(0.170290165507)*0.5**o
-        ref[1,4,2,0]=(0.926654770824)/(o+1.)+(0.011282908181)+(-0.697106837662)*0.5**o
-        ref[1,4,2,1]=(-0.958477382611)/(o+1.)+(0.618515858902)+(-0.65973097111)*0.5**o
-        ref[2,0,0,0]=(-0.15636950624)/(o+1.)+(-0.520670547262)+(-0.36455690548)*0.5**o
-        ref[2,0,0,1]=(-0.726424878286)/(o+1.)+(0.697757734621)+(-0.386898263585)*0.5**o
-        ref[2,0,1,0]=(-0.055162393508)/(o+1.)+(0.247015646426)+(-0.442127640696)*0.5**o
-        ref[2,0,1,1]=(-0.769332288875)/(o+1.)+(-0.0917175733456)+(-0.639003232373)*0.5**o
-        ref[2,0,2,0]=(-0.196390038297)/(o+1.)+(0.0977907270548)+(0.340749124126)*0.5**o
-        ref[2,0,2,1]=(0.841927481859)/(o+1.)+(-0.489185426146)+(0.0626606144906)*0.5**o
-        ref[2,1,0,0]=(0.590018249148)/(o+1.)+(0.378476967182)+(-0.354886735451)*0.5**o
-        ref[2,1,0,1]=(0.178495604742)/(o+1.)+(0.233073081069)+(0.572535849459)*0.5**o
-        ref[2,1,1,0]=(-0.762671064919)/(o+1.)+(-0.108539686142)+(0.448831274081)*0.5**o
-        ref[2,1,1,1]=(0.927591406535)/(o+1.)+(0.0441635703243)+(-0.53130361723)*0.5**o
-        ref[2,1,2,0]=(-0.604360706259)/(o+1.)+(-0.134848102332)+(0.402913311063)*0.5**o
-        ref[2,1,2,1]=(0.229727627441)/(o+1.)+(-0.323296604293)+(-0.197927111225)*0.5**o
-        ref[2,2,0,0]=(0.287478356112)/(o+1.)+(0.762635506201)+(0.0282288847209)*0.5**o
-        ref[2,2,0,1]=(0.243518182621)/(o+1.)+(-0.241502069199)+(0.743970373822)*0.5**o
-        ref[2,2,1,0]=(-0.369049760378)/(o+1.)+(-0.21941778965)+(-0.472075045017)*0.5**o
-        ref[2,2,1,1]=(-0.745343658666)/(o+1.)+(0.193375557775)+(0.864596248255)*0.5**o
-        ref[2,2,2,0]=(-0.491769251494)/(o+1.)+(0.442742387618)+(0.753340954862)*0.5**o
-        ref[2,2,2,1]=(0.551196377158)/(o+1.)+(-0.523535406613)+(-0.212166925203)*0.5**o
-        ref[2,3,0,0]=(0.192271522168)/(o+1.)+(-0.0181953944687)+(0.122707705798)*0.5**o
-        ref[2,3,0,1]=(-0.593768738594)/(o+1.)+(0.199088910545)+(0.368366498588)*0.5**o
-        ref[2,3,1,0]=(0.0866211808983)/(o+1.)+(0.723512694127)+(0.521936735685)*0.5**o
-        ref[2,3,1,1]=(-0.453288268254)/(o+1.)+(-0.15580970281)+(-0.655272797205)*0.5**o
-        ref[2,3,2,0]=(0.614105802669)/(o+1.)+(0.0411427694898)+(0.85774098305)*0.5**o
-        ref[2,3,2,1]=(0.263133533654)/(o+1.)+(-0.628776355867)+(-0.624497793507)*0.5**o
-        ref[2,4,0,0]=(-0.809347914722)/(o+1.)+(0.367719412237)+(0.26671699779)*0.5**o
-        ref[2,4,0,1]=(0.773124137566)/(o+1.)+(-0.442496395542)+(-0.0149946871367)*0.5**o
-        ref[2,4,1,0]=(-0.927311525126)/(o+1.)+(-0.0125177466568)+(-0.943580084777)*0.5**o
-        ref[2,4,1,1]=(0.306409665483)/(o+1.)+(0.128569553604)+(-0.852228134533)*0.5**o
-        ref[2,4,2,0]=(0.926185522145)/(o+1.)+(0.0750538146738)+(-0.58517230367)*0.5**o
-        ref[2,4,2,1]=(0.858245470922)/(o+1.)+(0.0125876600893)+(0.457971730734)*0.5**o
-        ref[3,0,0,0]=(-0.74501947953)/(o+1.)+(0.343942243752)+(-0.363581155556)*0.5**o
-        ref[3,0,0,1]=(0.850890737948)/(o+1.)+(0.157997002133)+(-0.761705466968)*0.5**o
-        ref[3,0,1,0]=(-0.0468962248591)/(o+1.)+(0.0297980532763)+(0.682735456043)*0.5**o
-        ref[3,0,1,1]=(0.0126326425456)/(o+1.)+(-0.076115296096)+(0.575387199213)*0.5**o
-        ref[3,0,2,0]=(-0.410549752333)/(o+1.)+(0.85556811978)+(0.270867209104)*0.5**o
-        ref[3,0,2,1]=(0.580487848545)/(o+1.)+(0.59069171729)+(0.698757148346)*0.5**o
-        ref[3,1,0,0]=(0.139052775786)/(o+1.)+(-0.334747475889)+(0.281989056901)*0.5**o
-        ref[3,1,0,1]=(0.591083610998)/(o+1.)+(-0.322680889668)+(-0.492254197357)*0.5**o
-        ref[3,1,1,0]=(0.384713965427)/(o+1.)+(-0.522411606102)+(0.146558304882)*0.5**o
-        ref[3,1,1,1]=(-0.827615582009)/(o+1.)+(-0.00295218575854)+(0.514501517225)*0.5**o
-        ref[3,1,2,0]=(0.84762578765)/(o+1.)+(0.208361555685)+(-0.43502341494)*0.5**o
-        ref[3,1,2,1]=(-0.554668615664)/(o+1.)+(0.825347835483)+(-0.899680107129)*0.5**o
-        ref[3,2,0,0]=(0.652802712143)/(o+1.)+(0.397197582731)+(0.7807432266)*0.5**o
-        ref[3,2,0,1]=(0.421495251937)/(o+1.)+(-0.119571710512)+(0.677076974975)*0.5**o
-        ref[3,2,1,0]=(-0.230439630375)/(o+1.)+(-0.733165339017)+(-0.816334071941)*0.5**o
-        ref[3,2,1,1]=(0.64153308098)/(o+1.)+(0.778374176432)+(-0.477170252948)*0.5**o
-        ref[3,2,2,0]=(-0.987848717403)/(o+1.)+(-0.0606435888479)+(0.974551740798)*0.5**o
-        ref[3,2,2,1]=(-0.318593711859)/(o+1.)+(-0.459904454409)+(0.334228278552)*0.5**o
-        ref[3,3,0,0]=(-0.418115413351)/(o+1.)+(-0.348616063735)+(-0.982162917221)*0.5**o
-        ref[3,3,0,1]=(-0.437684435015)/(o+1.)+(0.804145379606)+(-0.892393985366)*0.5**o
-        ref[3,3,1,0]=(0.944100110135)/(o+1.)+(-0.059994562245)+(0.0694197471801)*0.5**o
-        ref[3,3,1,1]=(-0.860656048613)/(o+1.)+(0.178136109535)+(-0.250126193893)*0.5**o
-        ref[3,3,2,0]=(-0.363631991908)/(o+1.)+(-0.298384287282)+(0.471110648232)*0.5**o
-        ref[3,3,2,1]=(-0.578021736479)/(o+1.)+(0.320913094365)+(0.235895941501)*0.5**o
-        ref[3,4,0,0]=(-0.946995649946)/(o+1.)+(0.0451978887455)+(0.936359833225)*0.5**o
-        ref[3,4,0,1]=(-0.636305818291)/(o+1.)+(0.258932088634)+(0.449663732234)*0.5**o
-        ref[3,4,1,0]=(-0.823421937366)/(o+1.)+(0.112980674356)+(0.297559014947)*0.5**o
-        ref[3,4,1,1]=(-0.441768022626)/(o+1.)+(-0.240840962617)+(-0.682298558949)*0.5**o
-        ref[3,4,2,0]=(-0.258808936822)/(o+1.)+(0.510306577882)+(-0.457251344276)*0.5**o
-        ref[3,4,2,1]=(-0.489365749016)/(o+1.)+(-0.296617385332)+(0.979513856171)*0.5**o
-      else:
-        arg[0,0,0,0]=(-0.474247989728)*x[0]+(-0.768689352235)*x[1]+(-1.08527900853)*x[2]
-        arg[0,0,0,1]=(-0.237113797789)*x[0]+(0.0842735741018)*x[1]+(0.203858551029)*x[2]
-        arg[0,0,1,0]=(0.24237127665)*x[0]+(0.421022955803)*x[1]+(-1.52818540927)*x[2]
-        arg[0,0,1,1]=(1.34624865817)*x[0]+(-0.798943272818)*x[1]+(-0.823168386315)*x[2]
-        arg[0,0,2,0]=(-0.906723771267)*x[0]+(0.328893123771)*x[1]+(-0.942770202463)*x[2]
-        arg[0,0,2,1]=(1.54305197694)*x[0]+(0.813063941984)*x[1]+(0.205532727168)*x[2]
-        arg[0,1,0,0]=(0.399159979872)*x[0]+(-1.52089837934)*x[1]+(-1.4064251406)*x[2]
-        arg[0,1,0,1]=(-0.121139354731)*x[0]+(1.12768246422)*x[1]+(0.234299409411)*x[2]
-        arg[0,1,1,0]=(-1.62513899388)*x[0]+(-0.173131700583)*x[1]+(1.24199996799)*x[2]
-        arg[0,1,1,1]=(-0.371929434177)*x[0]+(-0.606278610409)*x[1]+(-0.00600790063066)*x[2]
-        arg[0,1,2,0]=(-0.804531294423)*x[0]+(0.869392248002)*x[1]+(0.840417359943)*x[2]
-        arg[0,1,2,1]=(0.329452946275)*x[0]+(1.1072495446)*x[1]+(-0.213517932323)*x[2]
-        arg[0,2,0,0]=(1.02784887224)*x[0]+(0.435517042337)*x[1]+(1.58767206677)*x[2]
-        arg[0,2,0,1]=(-0.0120997177)*x[0]+(0.430135803314)*x[1]+(-0.717473068956)*x[2]
-        arg[0,2,1,0]=(0.955455517302)*x[0]+(0.712976918968)*x[1]+(-0.624804508641)*x[2]
-        arg[0,2,1,1]=(-1.03293986594)*x[0]+(-0.539062834482)*x[1]+(-1.61172701428)*x[2]
-        arg[0,2,2,0]=(-0.177662810138)*x[0]+(0.553352366127)*x[1]+(0.695417121111)*x[2]
-        arg[0,2,2,1]=(0.318133474679)*x[0]+(-0.452528947926)*x[1]+(0.468602505091)*x[2]
-        arg[0,3,0,0]=(-0.294467725916)*x[0]+(1.67314409894)*x[1]+(0.100736440007)*x[2]
-        arg[0,3,0,1]=(-0.517162349887)*x[0]+(-1.57430191254)*x[1]+(1.24045877402)*x[2]
-        arg[0,3,1,0]=(0.667393640368)*x[0]+(0.340993632212)*x[1]+(-1.09920535559)*x[2]
-        arg[0,3,1,1]=(0.37451406727)*x[0]+(0.37350649326)*x[1]+(0.357440871322)*x[2]
-        arg[0,3,2,0]=(-0.989366398194)*x[0]+(0.596179154759)*x[1]+(-0.573280308087)*x[2]
-        arg[0,3,2,1]=(-0.25561190141)*x[0]+(1.42296905238)*x[1]+(-1.21032031399)*x[2]
-        arg[0,4,0,0]=(-0.41394085285)*x[0]+(-0.751213929646)*x[1]+(-0.68470718293)*x[2]
-        arg[0,4,0,1]=(0.702985204167)*x[0]+(-0.0375821582587)*x[1]+(0.290630803819)*x[2]
-        arg[0,4,1,0]=(0.0558204653441)*x[0]+(1.61940057302)*x[1]+(-0.518863528354)*x[2]
-        arg[0,4,1,1]=(1.25876303604)*x[0]+(-1.40923202908)*x[1]+(1.05202333762)*x[2]
-        arg[0,4,2,0]=(0.0715295483294)*x[0]+(0.883869702529)*x[1]+(-0.463253474408)*x[2]
-        arg[0,4,2,1]=(0.564563789615)*x[0]+(-0.135049742988)*x[1]+(-1.3118878567)*x[2]
-        arg[1,0,0,0]=(0.707267335291)*x[0]+(-0.197244449872)*x[1]+(-0.114362773781)*x[2]
-        arg[1,0,0,1]=(-0.144762815659)*x[0]+(0.434177706452)*x[1]+(0.0754859099691)*x[2]
-        arg[1,0,1,0]=(-0.906934991359)*x[0]+(0.179011995627)*x[1]+(0.823936036469)*x[2]
-        arg[1,0,1,1]=(1.11165724605)*x[0]+(0.48023223731)*x[1]+(0.981353808181)*x[2]
-        arg[1,0,2,0]=(0.499460583481)*x[0]+(0.171586243561)*x[1]+(-0.252474775657)*x[2]
-        arg[1,0,2,1]=(-0.604289370884)*x[0]+(1.11610914086)*x[1]+(0.747439062711)*x[2]
-        arg[1,1,0,0]=(0.696191463882)*x[0]+(0.349547714404)*x[1]+(0.651361019042)*x[2]
-        arg[1,1,0,1]=(0.152679923426)*x[0]+(-0.448442911425)*x[1]+(1.33964371501)*x[2]
-        arg[1,1,1,0]=(-0.74612592015)*x[0]+(-1.27089239786)*x[1]+(-0.261725631736)*x[2]
-        arg[1,1,1,1]=(1.50839493929)*x[0]+(1.93229724987)*x[1]+(-0.963996845831)*x[2]
-        arg[1,1,2,0]=(0.867984447375)*x[0]+(-0.777493811854)*x[1]+(0.847847553133)*x[2]
-        arg[1,1,2,1]=(1.34249389498)*x[0]+(0.776160804062)*x[1]+(-0.295393972199)*x[2]
-        arg[1,2,0,0]=(-0.655771613243)*x[0]+(1.58220214455)*x[1]+(-0.406292477629)*x[2]
-        arg[1,2,0,1]=(0.59294895986)*x[0]+(0.544961164723)*x[1]+(0.634279670948)*x[2]
-        arg[1,2,1,0]=(1.15324179862)*x[0]+(0.645764835217)*x[1]+(0.670364725309)*x[2]
-        arg[1,2,1,1]=(-0.819459106271)*x[0]+(0.024815625404)*x[1]+(0.769753650676)*x[2]
-        arg[1,2,2,0]=(1.19042366161)*x[0]+(0.982020548972)*x[1]+(0.92730609738)*x[2]
-        arg[1,2,2,1]=(-0.742441488349)*x[0]+(-1.3101429812)*x[1]+(-0.198104246324)*x[2]
-        arg[1,3,0,0]=(0.349205030437)*x[0]+(-0.745240339596)*x[1]+(-0.744742092259)*x[2]
-        arg[1,3,0,1]=(0.993101296711)*x[0]+(-1.48331355036)*x[1]+(-1.00616778677)*x[2]
-        arg[1,3,1,0]=(-1.10586442824)*x[0]+(1.71922449779)*x[1]+(-0.943451153259)*x[2]
-        arg[1,3,1,1]=(-1.72393763035)*x[0]+(-1.14113495956)*x[1]+(-0.211909615809)*x[2]
-        arg[1,3,2,0]=(-0.378302963108)*x[0]+(-0.494705322002)*x[1]+(0.940164363332)*x[2]
-        arg[1,3,2,1]=(0.850541148743)*x[0]+(-1.45461945468)*x[1]+(1.20025821328)*x[2]
-        arg[1,4,0,0]=(1.33882463795)*x[0]+(0.475208133119)*x[1]+(0.722686059253)*x[2]
-        arg[1,4,0,1]=(0.0750422155969)*x[0]+(1.29758288845)*x[1]+(-1.41431668738)*x[2]
-        arg[1,4,1,0]=(1.36072344575)*x[0]+(-0.345743547563)*x[1]+(-0.63248018754)*x[2]
-        arg[1,4,1,1]=(0.579049229913)*x[0]+(0.954245074078)*x[1]+(-0.170538926965)*x[2]
-        arg[1,4,2,0]=(1.67615484634)*x[0]+(0.561067019023)*x[1]+(-1.26952326914)*x[2]
-        arg[1,4,2,1]=(0.700910547934)*x[0]+(0.58717328764)*x[1]+(0.795138196965)*x[2]
-        arg[2,0,0,0]=(0.763193592359)*x[0]+(-0.397549328381)*x[1]+(-0.230593559545)*x[2]
-        arg[2,0,0,1]=(0.454026153468)*x[0]+(-1.12464443717)*x[1]+(-0.147462098246)*x[2]
-        arg[2,0,1,0]=(-0.276457034935)*x[0]+(0.118173156654)*x[1]+(0.57296366275)*x[2]
-        arg[2,0,1,1]=(1.31887812253)*x[0]+(-0.544644483254)*x[1]+(0.0013728350582)*x[2]
-        arg[2,0,2,0]=(-0.257589384265)*x[0]+(-0.016005453203)*x[1]+(-0.508836430965)*x[2]
-        arg[2,0,2,1]=(-0.259420301773)*x[0]+(0.122645293168)*x[1]+(0.381613885289)*x[2]
-        arg[2,1,0,0]=(-1.64168512418)*x[0]+(0.025182006192)*x[1]+(0.0268780458975)*x[2]
-        arg[2,1,0,1]=(-0.0885344200898)*x[0]+(0.408795219114)*x[1]+(0.635798801606)*x[2]
-        arg[2,1,1,0]=(-0.959658503283)*x[0]+(1.034415556)*x[1]+(0.725681105748)*x[2]
-        arg[2,1,1,1]=(1.59312707789)*x[0]+(-0.116514952101)*x[1]+(-0.86121633507)*x[2]
-        arg[2,1,2,0]=(-1.44859572067)*x[0]+(-1.28344247275)*x[1]+(0.299296401869)*x[2]
-        arg[2,1,2,1]=(-0.488424372501)*x[0]+(1.23481402288)*x[1]+(0.01702902463)*x[2]
-        arg[2,2,0,0]=(-1.29986951244)*x[0]+(-1.20190912751)*x[1]+(-0.755848291051)*x[2]
-        arg[2,2,0,1]=(-0.52421656312)*x[0]+(-0.335471509689)*x[1]+(-1.01264312499)*x[2]
-        arg[2,2,1,0]=(-1.12066642609)*x[0]+(-1.02138558053)*x[1]+(-1.00777755552)*x[2]
-        arg[2,2,1,1]=(-1.42127024744)*x[0]+(1.63480022479)*x[1]+(0.542244906643)*x[2]
-        arg[2,2,2,0]=(-0.418852880297)*x[0]+(-0.983110436453)*x[1]+(-0.622603673805)*x[2]
-        arg[2,2,2,1]=(0.727366446825)*x[0]+(-0.256324856361)*x[1]+(-0.20608740758)*x[2]
-        arg[2,3,0,0]=(0.548268302883)*x[0]+(0.0102173127665)*x[1]+(0.869833576217)*x[2]
-        arg[2,3,0,1]=(-1.70159091061)*x[0]+(1.15876875083)*x[1]+(-0.234757706773)*x[2]
-        arg[2,3,1,0]=(-1.72817024817)*x[0]+(0.690055132218)*x[1]+(-0.149398998825)*x[2]
-        arg[2,3,1,1]=(1.80829412387)*x[0]+(-0.217899654855)*x[1]+(-0.922672217822)*x[2]
-        arg[2,3,2,0]=(1.23855200328)*x[0]+(0.412795411508)*x[1]+(0.960476191755)*x[2]
-        arg[2,3,2,1]=(-1.43061904621)*x[0]+(-0.766039000745)*x[1]+(-1.25765397361)*x[2]
-        arg[2,4,0,0]=(-0.660872016687)*x[0]+(-0.000405233718708)*x[1]+(-0.178507968219)*x[2]
-        arg[2,4,0,1]=(-0.168526882871)*x[0]+(-1.06936802685)*x[1]+(1.54083857104)*x[2]
-        arg[2,4,1,0]=(0.565807359529)*x[0]+(-1.41401297939)*x[1]+(-1.23254260537)*x[2]
-        arg[2,4,1,1]=(-0.373920075802)*x[0]+(0.407330812903)*x[1]+(-0.204667001328)*x[2]
-        arg[2,4,2,0]=(0.874100879885)*x[0]+(-0.191238094267)*x[1]+(1.54890969328)*x[2]
-        arg[2,4,2,1]=(0.566428125313)*x[0]+(-1.60899595601)*x[1]+(-1.05112529768)*x[2]
-        arg[3,0,0,0]=(-0.688037248111)*x[0]+(-1.56483484784)*x[1]+(0.26782504619)*x[2]
-        arg[3,0,0,1]=(0.418788954459)*x[0]+(-0.670455226092)*x[1]+(-0.0562760591375)*x[2]
-        arg[3,0,1,0]=(-0.2614362754)*x[0]+(0.271050519855)*x[1]+(0.227811982923)*x[2]
-        arg[3,0,1,1]=(-0.873198928647)*x[0]+(-0.483763141395)*x[1]+(0.33532383979)*x[2]
-        arg[3,0,2,0]=(-0.864161938176)*x[0]+(-1.4682754386)*x[1]+(-0.38126411162)*x[2]
-        arg[3,0,2,1]=(0.142827521381)*x[0]+(0.464483940188)*x[1]+(0.214297576606)*x[2]
-        arg[3,1,0,0]=(0.188747079113)*x[0]+(0.590821253713)*x[1]+(0.908850367108)*x[2]
-        arg[3,1,0,1]=(0.0587541582624)*x[0]+(0.955494266151)*x[1]+(1.70822209849)*x[2]
-        arg[3,1,1,0]=(-0.420356861523)*x[0]+(-0.551445918262)*x[1]+(-0.0187114754269)*x[2]
-        arg[3,1,1,1]=(1.07071658401)*x[0]+(-0.589035602194)*x[1]+(0.133725074027)*x[2]
-        arg[3,1,2,0]=(0.370477043767)*x[0]+(0.226262353618)*x[1]+(0.566087784489)*x[2]
-        arg[3,1,2,1]=(1.77828660075)*x[0]+(0.607419742685)*x[1]+(0.0297054744582)*x[2]
-        arg[3,2,0,0]=(-1.19326939474)*x[0]+(1.20875153887)*x[1]+(-0.124756222091)*x[2]
-        arg[3,2,0,1]=(0.0645190914271)*x[0]+(0.357580475716)*x[1]+(-1.59461469718)*x[2]
-        arg[3,2,1,0]=(1.4853619905)*x[0]+(0.751582301648)*x[1]+(0.859363177167)*x[2]
-        arg[3,2,1,1]=(1.36658655075)*x[0]+(-0.776650996613)*x[1]+(0.654743994261)*x[2]
-        arg[3,2,2,0]=(0.406696005677)*x[0]+(-0.528546876384)*x[1]+(-0.439775325396)*x[2]
-        arg[3,2,2,1]=(-0.725198159461)*x[0]+(-0.0933136564416)*x[1]+(-0.720365141393)*x[2]
-        arg[3,3,0,0]=(-0.428669112669)*x[0]+(0.626162511175)*x[1]+(-0.382776233923)*x[2]
-        arg[3,3,0,1]=(0.340474939218)*x[0]+(-0.140550383925)*x[1]+(0.353836983746)*x[2]
-        arg[3,3,1,0]=(0.851646816711)*x[0]+(0.0171684195949)*x[1]+(0.38173044322)*x[2]
-        arg[3,3,1,1]=(0.359647722225)*x[0]+(0.425799941165)*x[1]+(-0.80174052212)*x[2]
-        arg[3,3,2,0]=(0.13012568736)*x[0]+(-0.573735693651)*x[1]+(1.08843730088)*x[2]
-        arg[3,3,2,1]=(-1.01372953294)*x[0]+(0.335282956856)*x[1]+(1.24570512628)*x[2]
-        arg[3,4,0,0]=(-0.05674609039)*x[0]+(-0.814879575064)*x[1]+(-0.169789408264)*x[2]
-        arg[3,4,0,1]=(1.5968230938)*x[0]+(0.0679819277023)*x[1]+(0.892284314512)*x[2]
-        arg[3,4,1,0]=(1.22220298478)*x[0]+(-0.0258417926472)*x[1]+(0.440670138568)*x[2]
-        arg[3,4,1,1]=(0.647072768716)*x[0]+(-0.177651087906)*x[1]+(-0.115553644646)*x[2]
-        arg[3,4,2,0]=(1.29816363306)*x[0]+(-1.18656044167)*x[1]+(-0.465776533157)*x[2]
-        arg[3,4,2,1]=(0.328907496091)*x[0]+(-0.179857937151)*x[1]+(-0.476306938306)*x[2]
-        ref[0,0,0,0]=(-0.530378359482)/(o+1.)+(-0.935143327523)+(0.0724486640358)*0.5**o
-        ref[0,0,0,1]=(1.22837847871)/(o+1.)+(-0.113350954728)+(-0.950658241915)*0.5**o
-        ref[0,0,1,0]=(-0.000414683535449)/(o+1.)+(-0.183158731552)+(-0.49805903018)*0.5**o
-        ref[0,0,1,1]=(-0.882730389132)/(o+1.)+(-0.112174958816)+(0.831217305802)*0.5**o
-        ref[0,0,2,0]=(-1.1913557966)/(o+1.)+(-0.0615750891074)+(-0.206094875146)*0.5**o
-        ref[0,0,2,1]=(0.634536492589)/(o+1.)+(0.649890059464)+(0.627332034578)*0.5**o
-        ref[0,1,0,0]=(-1.38665625775)/(o+1.)+(-1.0210653524)+(0.900623422471)*0.5**o
-        ref[0,1,0,1]=(1.20633678024)/(o+1.)+(0.0888193121856)+(-0.143132885707)*0.5**o
-        ref[0,1,1,0]=(0.452225278035)/(o+1.)+(-0.148926943801)+(-0.710642116901)*0.5**o
-        ref[0,1,1,1]=(-0.244223430204)/(o+1.)+(-0.619607191996)+(0.499221868978)*0.5**o
-        ref[0,1,2,0]=(0.0383849036606)/(o+1.)+(0.759484971644)+(-0.652076533427)*0.5**o
-        ref[0,1,2,1]=(0.207558055759)/(o+1.)+(0.502305382384)+(0.0110157380215)*0.5**o
-        ref[0,2,0,0]=(0.761374280144)/(o+1.)+(0.777616611515)+(0.734430478174)*0.5**o
-        ref[0,2,0,1]=(0.554502862028)/(o+1.)+(-0.409274602016)+(-0.0353906413371)*0.5**o
-        ref[0,2,1,0]=(-0.252543841709)/(o+1.)+(0.386640377894)+(0.522891013551)*0.5**o
-        ref[0,2,1,1]=(-1.52497235887)/(o+1.)+(-0.807603254401)+(-0.0435508470367)*0.5**o
-        ref[0,2,2,0]=(0.172485606257)/(o+1.)+(0.350297526187)+(0.19802601847)*0.5**o
-        ref[0,2,2,1]=(-0.141271359379)/(o+1.)+(0.0509198134622)+(0.373638764298)*0.5**o
-        ref[0,3,0,0]=(1.31278836809)/(o+1.)+(-0.0918739323256)+(0.350372309595)*0.5**o
-        ref[0,3,0,1]=(-0.396933928109)/(o+1.)+(-0.436137805999)+(0.418204051696)*0.5**o
-        ref[0,3,1,0]=(-0.206619840099)/(o+1.)+(-0.118703289798)+(0.353208336689)*0.5**o
-        ref[0,3,1,1]=(-0.595153371293)/(o+1.)+(0.615722581562)+(0.469169640021)*0.5**o
-        ref[0,3,2,0]=(-0.680858997986)/(o+1.)+(-0.0393223937964)+(-0.206963765944)*0.5**o
-        ref[0,3,2,1]=(0.012753264598)/(o+1.)+(0.246188741489)+(-0.548093910595)*0.5**o
-        ref[0,4,0,0]=(-0.40478987122)/(o+1.)+(-0.890399681609)+(0.33572726901)*0.5**o
-        ref[0,4,0,1]=(0.0280062557264)/(o+1.)+(0.0358049413228)+(0.856417711355)*0.5**o
-        ref[0,4,1,0]=(0.181560004565)/(o+1.)+(0.329885369854)+(0.31502676574)*0.5**o
-        ref[0,4,1,1]=(0.0552681276841)/(o+1.)+(0.00372919426319)+(0.838827828375)*0.5**o
-        ref[0,4,2,0]=(0.656057162724)/(o+1.)+(0.179315527684)+(-0.522542441641)*0.5**o
-        ref[0,4,2,1]=(0.126189389317)/(o+1.)+(-0.429452001643)+(-0.149659196108)*0.5**o
-        ref[1,0,0,0]=(1.43443485527)/(o+1.)+(-0.55091754491)+(0.0630603461901)*0.5**o
-        ref[1,0,0,1]=(-0.612191779306)/(o+1.)+(0.604025235381)+(-0.230957890695)*0.5**o
-        ref[1,0,1,0]=(0.373085423681)/(o+1.)+(-0.0817391530697)+(-0.113594076805)*0.5**o
-        ref[1,0,1,1]=(0.761862677657)/(o+1.)+(0.819524484428)+(0.172331645033)*0.5**o
-        ref[1,0,2,0]=(0.929265450746)/(o+1.)+(-0.382585784938)+(0.254478170515)*0.5**o
-        ref[1,0,2,1]=(1.58236203463)/(o+1.)+(-0.280641188811)+(0.238179175679)*0.5**o
-        ref[1,1,0,0]=(-0.117055726312)/(o+1.)+(0.957914090571)+(-0.101672257501)*0.5**o
-        ref[1,1,0,1]=(0.0849062553796)/(o+1.)+(0.0703564566846)+(0.818261558262)*0.5**o
-        ref[1,1,1,0]=(-1.72219113622)/(o+1.)+(-0.357454724939)+(0.15835663635)*0.5**o
-        ref[1,1,1,1]=(0.739078400468)/(o+1.)+(0.532292543169)+(0.673031856531)*0.5**o
-        ref[1,1,2,0]=(0.255023909903)/(o+1.)+(0.229656917655)+(0.22400044344)*0.5**o
-        ref[1,1,2,1]=(0.518856765199)/(o+1.)+(0.380552790125)+(0.543298381396)*0.5**o
-        ref[1,2,0,0]=(0.0321563884831)/(o+1.)+(0.25981567762)+(-0.0316496900482)*0.5**o
-        ref[1,2,0,1]=(1.09318176771)/(o+1.)+(0.0572442907603)+(0.564519446305)*0.5**o
-        ref[1,2,1,0]=(0.756962791387)/(o+1.)+(0.69419429624)+(0.32401997528)*0.5**o
-        ref[1,2,1,1]=(1.28480299241)/(o+1.)+(-0.201990593541)+(-0.905711635518)*0.5**o
-        ref[1,2,2,0]=(1.04969566442)/(o+1.)+(0.72854097372)+(0.592972696101)*0.5**o
-        ref[1,2,2,1]=(-1.77086264775)/(o+1.)+(-0.261914180361)+(0.0440022926066)*0.5**o
-        ref[1,3,0,0]=(-0.477780531124)/(o+1.)+(-0.181354085163)+(-0.300288699967)*0.5**o
-        ref[1,3,0,1]=(-0.797627013456)/(o+1.)+(-0.523163955197)+(0.347574883435)*0.5**o
-        ref[1,3,1,0]=(0.428806106821)/(o+1.)+(-0.0514584302394)+(-0.655980330052)*0.5**o
-        ref[1,3,1,1]=(-0.141740459457)/(o+1.)+(-1.05699960931)+(-0.821242527644)*0.5**o
-        ref[1,3,2,0]=(0.0181810985873)/(o+1.)+(-0.180697139553)+(0.41036925874)*0.5**o
-        ref[1,3,2,1]=(-0.061077367)/(o+1.)+(0.250077446763)+(0.157102380812)*0.5**o
-        ref[1,4,0,0]=(1.14087212913)/(o+1.)+(0.368059029864)+(0.659728641463)*0.5**o
-        ref[1,4,0,1]=(0.365658713316)/(o+1.)+(0.088533821044)+(-0.584417938734)*0.5**o
-        ref[1,4,1,0]=(-1.11681308321)/(o+1.)+(0.438275560627)+(0.622761672604)*0.5**o
-        ref[1,4,1,1]=(1.18893372018)/(o+1.)+(0.172934240923)+(-0.172046824999)*0.5**o
-        ref[1,4,2,0]=(0.16240489493)/(o+1.)+(-0.0145923852256)+(0.834478471749)*0.5**o
-        ref[1,4,2,1]=(0.571355829378)/(o+1.)+(0.526896417749)+(0.458073367663)*0.5**o
-        ref[2,0,0,0]=(-0.489234572937)/(o+1.)+(-0.0135589093901)+(0.65140309615)*0.5**o
-        ref[2,0,0,1]=(-1.55383491931)/(o+1.)+(0.0161644619972)+(0.703425613366)*0.5**o
-        ref[2,0,1,0]=(-0.258604855723)/(o+1.)+(0.0827812678671)+(0.507722104457)*0.5**o
-        ref[2,0,1,1]=(0.0504178529481)/(o+1.)+(0.182991850332)+(0.359204920726)*0.5**o
-        ref[2,0,2,0]=(0.652043479841)/(o+1.)+(-0.443015450013)+(-0.548443848248)*0.5**o
-        ref[2,0,2,1]=(0.340317839857)/(o+1.)+(-0.379565594545)+(0.663652225917)*0.5**o
-        ref[2,1,0,0]=(-0.587863196667)/(o+1.)+(-0.0137797674284)+(-0.974202340562)*0.5**o
-        ref[2,1,0,1]=(1.00030747039)/(o+1.)+(-0.399997754768)+(0.755747639771)*0.5**o
-        ref[2,1,1,0]=(0.703413281036)/(o+1.)+(0.487016208736)+(-0.877007540039)*0.5**o
-        ref[2,1,1,1]=(0.263166830572)/(o+1.)+(-0.157259452849)+(0.666747865841)*0.5**o
-        ref[2,1,2,0]=(0.104532343004)/(o+1.)+(-1.02548001493)+(-0.486314104701)*0.5**o
-        ref[2,1,2,1]=(0.933518655478)/(o+1.)+(0.0369928229139)+(-0.244085626298)*0.5**o
-        ref[2,2,0,0]=(-1.50550384519)/(o+1.)+(-0.590996227594)+(-0.570130630622)*0.5**o
-        ref[2,2,0,1]=(-0.60318683839)/(o+1.)+(-0.38308245528)+(-0.502979448853)*0.5**o
-        ref[2,2,1,0]=(-1.11258910879)/(o+1.)+(-0.518777277969)+(-0.999685897413)*0.5**o
-        ref[2,2,1,1]=(1.84366617107)/(o+1.)+(-0.232866738261)+(-0.622157810558)*0.5**o
-        ref[2,2,2,0]=(-0.620181988585)/(o+1.)+(-0.836162444183)+(0.267939886396)*0.5**o
-        ref[2,2,2,1]=(-0.826647389099)/(o+1.)+(0.0929536518109)+(0.905694268362)*0.5**o
-        ref[2,3,0,0]=(0.184067674443)/(o+1.)+(0.259745858757)+(0.724759799909)*0.5**o
-        ref[2,3,0,1]=(0.0175595303049)/(o+1.)+(0.0560117358912)+(-0.907162868639)*0.5**o
-        ref[2,3,1,0]=(-0.609443154617)/(o+1.)+(0.186540819401)+(-0.951152598958)*0.5**o
-        ref[2,3,1,1]=(-1.61858082094)/(o+1.)+(0.679439858578)+(0.927423354971)*0.5**o
-        ref[2,3,2,0]=(0.44350652486)/(o+1.)+(0.81466177481)+(0.53899353207)*0.5**o
-        ref[2,3,2,1]=(-0.877289862245)/(o+1.)+(-1.05742260849)+(-0.462176941342)*0.5**o
-        ref[2,4,0,0]=(-0.736381416539)/(o+1.)+(-0.0139374259612)+(-0.0755289501641)*0.5**o
-        ref[2,4,0,1]=(0.690429326999)/(o+1.)+(-0.0293644018251)+(-0.328756862036)*0.5**o
-        ref[2,4,1,0]=(-1.57117034002)/(o+1.)+(-0.531463765387)+(0.553349645561)*0.5**o
-        ref[2,4,1,1]=(1.24898175282)/(o+1.)+(-0.452273024959)+(-0.515691967125)*0.5**o
-        ref[2,4,2,0]=(0.239126191643)/(o+1.)+(0.722504563932)+(0.547637159392)*0.5**o
-        ref[2,4,2,1]=(-1.40763254209)/(o+1.)+(-0.809456441012)+(0.932852295739)*0.5**o
-        ref[3,0,0,0]=(-0.416554297686)/(o+1.)+(-0.632193610911)+(-0.304105530258)*0.5**o
-        ref[3,0,0,1]=(-1.02983448036)/(o+1.)+(0.579212231778)+(-0.436532313966)*0.5**o
-        ref[3,0,1,0]=(0.42124133216)/(o+1.)+(0.368290418827)+(-0.920395942436)*0.5**o
-        ref[3,0,1,1]=(0.158195474854)/(o+1.)+(-0.17459474514)+(-0.830644214826)*0.5**o
-        ref[3,0,2,0]=(-1.18749647329)/(o+1.)+(-0.506173996178)+(-0.513857022748)*0.5**o
-        ref[3,0,2,1]=(0.233437753018)/(o+1.)+(0.455705145371)+(-0.323239005586)*0.5**o
-        ref[3,1,0,0]=(1.42991958566)/(o+1.)+(0.053769921022)+(0.150959272234)*0.5**o
-        ref[3,1,0,1]=(1.48423731111)/(o+1.)+(0.964048315997)+(-0.689863420196)*0.5**o
-        ref[3,1,1,0]=(0.868837676765)/(o+1.)+(-1.01261543254)+(0.165878933098)*0.5**o
-        ref[3,1,1,1]=(0.820750307831)/(o+1.)+(-0.300930223821)+(0.396516195659)*0.5**o
-        ref[3,1,2,0]=(0.477077782202)/(o+1.)+(-0.0416336989494)+(0.769016797571)*0.5**o
-        ref[3,1,2,1]=(0.359895440587)/(o+1.)+(0.555322395811)+(0.944871585683)*0.5**o
-        ref[3,2,0,0]=(0.657668315832)/(o+1.)+(-0.240321895174)+(-0.286298603451)*0.5**o
-        ref[3,2,0,1]=(-0.941360568282)/(o+1.)+(-0.0246544136593)+(-0.181845734439)*0.5**o
-        ref[3,2,1,0]=(1.60316834971)/(o+1.)+(0.252291602298)+(0.988555915005)*0.5**o
-        ref[3,2,1,1]=(0.833811957678)/(o+1.)+(-0.111970621871)+(0.634808834458)*0.5**o
-        ref[3,2,2,0]=(-1.38877073784)/(o+1.)+(0.538356636307)+(-0.249568730877)*0.5**o
-        ref[3,2,2,1]=(-0.311839184097)/(o+1.)+(-0.698114103264)+(0.169190433329)*0.5**o
-        ref[3,3,0,0]=(0.743170989696)/(o+1.)+(-0.499224746788)+(0.0699956684628)*0.5**o
-        ref[3,3,0,1]=(-0.293538786051)/(o+1.)+(0.26667992866)+(0.313940467768)*0.5**o
-        ref[3,3,1,0]=(0.951483461345)/(o+1.)+(0.148317904561)+(0.00242640905887)*0.5**o
-        ref[3,3,1,1]=(-0.110753912776)/(o+1.)+(-0.44308689138)+(0.980634836805)*0.5**o
-        ref[3,3,2,0]=(-0.337895223544)/(o+1.)+(0.358941646037)+(0.264839226057)*0.5**o
-        ref[3,3,2,1]=(0.857823611315)/(o+1.)+(0.30404611512)+(-0.898657291359)*0.5**o
-        ref[3,4,0,0]=(0.037944509376)/(o+1.)+(-0.364801700413)+(-0.349756182268)*0.5**o
-        ref[3,4,0,1]=(1.01114399396)/(o+1.)+(0.457103279485)+(0.631738783076)*0.5**o
-        ref[3,4,1,0]=(0.969931913888)/(o+1.)+(-0.165922085756)+(0.998943588321)*0.5**o
-        ref[3,4,1,1]=(1.35441114248)/(o+1.)+(-0.502422727199)+(0.00430234808496)*0.5**o
-        ref[3,4,2,0]=(-0.367201097566)/(o+1.)+(-0.337780780531)+(0.688589316866)*0.5**o
-        ref[3,4,2,1]=(-0.0547905846061)/(o+1.)+(-0.293870420685)+(0.31527404661)*0.5**o
-      res=integrate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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.311787641998)*x[0]**o+(0.161673282875)*x[0]+(0.32570909237)*x[1]**o+(-0.249404742764)*x[1]
-        ref=(0.32570909237)/(o+1.)+(-0.0438657299447)+(0.311787641998)*0.5**o
-      else:
-        arg=(0.0675036998003)*x[0]**o+(-0.247751392136)*x[0]+(0.791676220029)*x[1]**o+(-0.269015236163)*x[1]+(0.265735156875)*x[2]**o+(0.820319192519)*x[2]
-        ref=(1.0574113769)/(o+1.)+(0.15177628211)+(0.0675036998003)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,float),"wrong type of result.")
-      self.assertTrue(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 the 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,),w)
-      ref=numpy.zeros((2,),numpy.float_)
-      if dim==2:
-        arg[0]=(0.99235950851)*x[0]**o+(0.00867392831518)*x[0]+(-0.598024390869)*x[1]**o+(0.00945232777857)*x[1]
-        arg[1]=(-0.140261338996)*x[0]**o+(-0.166524016889)*x[0]+(0.59850076881)*x[1]**o+(-0.805756215354)*x[1]
-        ref[0]=(-0.598024390869)/(o+1.)+(0.00906312804687)+(0.99235950851)*0.5**o
-        ref[1]=(0.59850076881)/(o+1.)+(-0.486140116122)+(-0.140261338996)*0.5**o
-      else:
-        arg[0]=(-0.158686556523)*x[0]**o+(0.249193164275)*x[0]+(-0.801383648208)*x[1]**o+(-0.439021533504)*x[1]+(-0.112035191366)*x[2]**o+(-0.323385862625)*x[2]
-        arg[1]=(0.392997873484)*x[0]**o+(-0.867468854104)*x[0]+(0.804459243476)*x[1]**o+(0.129028860314)*x[1]+(-0.252715502862)*x[2]**o+(0.457355923469)*x[2]
-        ref[0]=(-0.913418839574)/(o+1.)+(-0.256607115927)+(-0.158686556523)*0.5**o
-        ref[1]=(0.551743740614)/(o+1.)+(-0.140542035161)+(0.392997873484)*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.assertTrue(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 the 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, 5),w)
-      ref=numpy.zeros((4, 5),numpy.float_)
-      if dim==2:
-        arg[0,0]=(0.330520725992)*x[0]**o+(0.160118740246)*x[0]+(-0.178670895269)*x[1]**o+(-0.281660040648)*x[1]
-        arg[0,1]=(-0.871801084852)*x[0]**o+(0.692549035429)*x[0]+(-0.265102051042)*x[1]**o+(-0.799752901882)*x[1]
-        arg[0,2]=(-0.816985024574)*x[0]**o+(0.534242721856)*x[0]+(0.81492666918)*x[1]**o+(0.891189158633)*x[1]
-        arg[0,3]=(-0.20728122917)*x[0]**o+(-0.656873565737)*x[0]+(-0.924660993906)*x[1]**o+(0.453699593426)*x[1]
-        arg[0,4]=(-0.541377726375)*x[0]**o+(0.916287049432)*x[0]+(-0.15879052465)*x[1]**o+(-0.319875161126)*x[1]
-        arg[1,0]=(0.296966289838)*x[0]**o+(0.170347587334)*x[0]+(0.755207250839)*x[1]**o+(0.677658805212)*x[1]
-        arg[1,1]=(-0.507591010573)*x[0]**o+(0.299638021889)*x[0]+(-0.757702071557)*x[1]**o+(-0.194564860748)*x[1]
-        arg[1,2]=(0.821972467197)*x[0]**o+(-0.75902704466)*x[0]+(0.19424332718)*x[1]**o+(-0.070182646035)*x[1]
-        arg[1,3]=(-0.340805687409)*x[0]**o+(0.585961973082)*x[0]+(-0.602942732318)*x[1]**o+(-0.288941395094)*x[1]
-        arg[1,4]=(0.0314374795024)*x[0]**o+(0.293710824013)*x[0]+(0.576509865762)*x[1]**o+(-0.481377812302)*x[1]
-        arg[2,0]=(0.250117528833)*x[0]**o+(-0.318419344173)*x[0]+(-0.793830015706)*x[1]**o+(0.0445553063586)*x[1]
-        arg[2,1]=(-0.347974394766)*x[0]**o+(-0.569347105354)*x[0]+(0.838687005759)*x[1]**o+(0.534306628908)*x[1]
-        arg[2,2]=(0.53063272248)*x[0]**o+(0.426504428158)*x[0]+(0.215398162753)*x[1]**o+(0.324348187788)*x[1]
-        arg[2,3]=(-0.336752121527)*x[0]**o+(0.666074768462)*x[0]+(-0.739123251932)*x[1]**o+(-0.538899653147)*x[1]
-        arg[2,4]=(-0.832783810519)*x[0]**o+(0.558572116384)*x[0]+(0.119988536199)*x[1]**o+(-0.664170918761)*x[1]
-        arg[3,0]=(0.4941356722)*x[0]**o+(-0.403591783006)*x[0]+(0.205050527245)*x[1]**o+(0.351642574939)*x[1]
-        arg[3,1]=(0.12538190695)*x[0]**o+(-0.890722638937)*x[0]+(-0.897011486902)*x[1]**o+(-0.465522770696)*x[1]
-        arg[3,2]=(-0.862829007552)*x[0]**o+(-0.950531038019)*x[0]+(-0.970016379643)*x[1]**o+(-0.500580755888)*x[1]
-        arg[3,3]=(0.131451743264)*x[0]**o+(0.43845495141)*x[0]+(-0.929808474589)*x[1]**o+(-0.104714452616)*x[1]
-        arg[3,4]=(-0.81935224348)*x[0]**o+(-0.53791483312)*x[0]+(-0.714512816761)*x[1]**o+(0.329859667225)*x[1]
-        ref[0,0]=(-0.178670895269)/(o+1.)+(-0.0607706502011)+(0.330520725992)*0.5**o
-        ref[0,1]=(-0.265102051042)/(o+1.)+(-0.0536019332266)+(-0.871801084852)*0.5**o
-        ref[0,2]=(0.81492666918)/(o+1.)+(0.712715940244)+(-0.816985024574)*0.5**o
-        ref[0,3]=(-0.924660993906)/(o+1.)+(-0.101586986156)+(-0.20728122917)*0.5**o
-        ref[0,4]=(-0.15879052465)/(o+1.)+(0.298205944153)+(-0.541377726375)*0.5**o
-        ref[1,0]=(0.755207250839)/(o+1.)+(0.424003196273)+(0.296966289838)*0.5**o
-        ref[1,1]=(-0.757702071557)/(o+1.)+(0.0525365805706)+(-0.507591010573)*0.5**o
-        ref[1,2]=(0.19424332718)/(o+1.)+(-0.414604845348)+(0.821972467197)*0.5**o
-        ref[1,3]=(-0.602942732318)/(o+1.)+(0.148510288994)+(-0.340805687409)*0.5**o
-        ref[1,4]=(0.576509865762)/(o+1.)+(-0.0938334941445)+(0.0314374795024)*0.5**o
-        ref[2,0]=(-0.793830015706)/(o+1.)+(-0.136932018907)+(0.250117528833)*0.5**o
-        ref[2,1]=(0.838687005759)/(o+1.)+(-0.0175202382229)+(-0.347974394766)*0.5**o
-        ref[2,2]=(0.215398162753)/(o+1.)+(0.375426307973)+(0.53063272248)*0.5**o
-        ref[2,3]=(-0.739123251932)/(o+1.)+(0.0635875576574)+(-0.336752121527)*0.5**o
-        ref[2,4]=(0.119988536199)/(o+1.)+(-0.0527994011886)+(-0.832783810519)*0.5**o
-        ref[3,0]=(0.205050527245)/(o+1.)+(-0.0259746040335)+(0.4941356722)*0.5**o
-        ref[3,1]=(-0.897011486902)/(o+1.)+(-0.678122704817)+(0.12538190695)*0.5**o
-        ref[3,2]=(-0.970016379643)/(o+1.)+(-0.725555896953)+(-0.862829007552)*0.5**o
-        ref[3,3]=(-0.929808474589)/(o+1.)+(0.166870249397)+(0.131451743264)*0.5**o
-        ref[3,4]=(-0.714512816761)/(o+1.)+(-0.104027582947)+(-0.81935224348)*0.5**o
-      else:
-        arg[0,0]=(-0.916251178344)*x[0]**o+(0.858306033367)*x[0]+(0.814515071272)*x[1]**o+(-0.31988121358)*x[1]+(-0.973228319626)*x[2]**o+(-0.448894628432)*x[2]
-        arg[0,1]=(0.394307707909)*x[0]**o+(-0.270473398988)*x[0]+(0.904831123674)*x[1]**o+(-0.949869961069)*x[1]+(0.771889549168)*x[2]**o+(0.650652953462)*x[2]
-        arg[0,2]=(-0.0387282383528)*x[0]**o+(0.0292919821249)*x[0]+(-0.165189629855)*x[1]**o+(-0.265182468614)*x[1]+(0.919042632361)*x[2]**o+(0.710368688769)*x[2]
-        arg[0,3]=(0.680006301334)*x[0]**o+(0.96959940913)*x[0]+(0.773153544603)*x[1]**o+(-0.460435754764)*x[1]+(-0.202448514604)*x[2]**o+(-0.495739672831)*x[2]
-        arg[0,4]=(-0.972790915366)*x[0]**o+(-0.14148426268)*x[0]+(0.511995390348)*x[1]**o+(-0.252881217719)*x[1]+(0.255711210131)*x[2]**o+(0.729991325048)*x[2]
-        arg[1,0]=(-0.105824689194)*x[0]**o+(-0.201427239595)*x[0]+(-0.00550922402684)*x[1]**o+(-0.732794556814)*x[1]+(-0.0820953451459)*x[2]**o+(0.289904794134)*x[2]
-        arg[1,1]=(-0.378707957559)*x[0]**o+(0.776904510463)*x[0]+(0.0406721415351)*x[1]**o+(0.159288221237)*x[1]+(0.961004037621)*x[2]**o+(-0.0866180279992)*x[2]
-        arg[1,2]=(-0.0226058491089)*x[0]**o+(-0.569995151391)*x[0]+(-0.0675265986408)*x[1]**o+(-0.141280346236)*x[1]+(0.116098815262)*x[2]**o+(0.654630437206)*x[2]
-        arg[1,3]=(-0.567270755897)*x[0]**o+(0.580139672878)*x[0]+(-0.411816626246)*x[1]**o+(-0.490525831459)*x[1]+(0.9322522728)*x[2]**o+(-0.948230068413)*x[2]
-        arg[1,4]=(0.977251285351)*x[0]**o+(-0.457921996364)*x[0]+(-0.586207130671)*x[1]**o+(0.801370818191)*x[1]+(-0.667233775445)*x[2]**o+(0.277054304674)*x[2]
-        arg[2,0]=(0.997778241906)*x[0]**o+(0.490242237175)*x[0]+(0.406384527224)*x[1]**o+(-0.00724475574186)*x[1]+(-0.59799957401)*x[2]**o+(0.520598391022)*x[2]
-        arg[2,1]=(0.59766081214)*x[0]**o+(-0.144793824209)*x[0]+(-0.191121009265)*x[1]**o+(-0.178016091024)*x[1]+(0.168431462883)*x[2]**o+(-0.766200678925)*x[2]
-        arg[2,2]=(0.633988266946)*x[0]**o+(-0.880495194817)*x[0]+(-0.217502420499)*x[1]**o+(-0.730159316723)*x[1]+(0.255599562732)*x[2]**o+(-0.510511087905)*x[2]
-        arg[2,3]=(0.102332382261)*x[0]**o+(-0.370884332534)*x[0]+(-0.0926186085648)*x[1]**o+(0.86446607832)*x[1]+(0.0643112986026)*x[2]**o+(0.950118360785)*x[2]
-        arg[2,4]=(0.928323090624)*x[0]**o+(0.942943574803)*x[0]+(0.162570981489)*x[1]**o+(-0.971092675635)*x[1]+(0.641489870001)*x[2]**o+(0.695989498774)*x[2]
-        arg[3,0]=(-0.988813741403)*x[0]**o+(0.407960892494)*x[0]+(0.671572481461)*x[1]**o+(0.119756938854)*x[1]+(-0.923671788537)*x[2]**o+(-0.458931381612)*x[2]
-        arg[3,1]=(-0.241202616681)*x[0]**o+(-0.369134099039)*x[0]+(-0.129164268709)*x[1]**o+(-0.469311903775)*x[1]+(0.633909205241)*x[2]**o+(0.564043934538)*x[2]
-        arg[3,2]=(-0.397081811407)*x[0]**o+(0.909387986899)*x[0]+(0.260590665694)*x[1]**o+(-0.371472818152)*x[1]+(-0.0369834262513)*x[2]**o+(-0.887598789153)*x[2]
-        arg[3,3]=(-0.304262529036)*x[0]**o+(0.741316478862)*x[0]+(-0.384317206475)*x[1]**o+(-0.854685760579)*x[1]+(0.502373892581)*x[2]**o+(-0.923561844368)*x[2]
-        arg[3,4]=(-0.720555420423)*x[0]**o+(-0.115786593478)*x[0]+(0.832043243085)*x[1]**o+(-0.912631896773)*x[1]+(-0.583397798668)*x[2]**o+(-0.508174721594)*x[2]
-        ref[0,0]=(-0.158713248354)/(o+1.)+(0.0447650956777)+(-0.916251178344)*0.5**o
-        ref[0,1]=(1.67672067284)/(o+1.)+(-0.284845203298)+(0.394307707909)*0.5**o
-        ref[0,2]=(0.753853002506)/(o+1.)+(0.23723910114)+(-0.0387282383528)*0.5**o
-        ref[0,3]=(0.570705029999)/(o+1.)+(0.00671199076774)+(0.680006301334)*0.5**o
-        ref[0,4]=(0.767706600479)/(o+1.)+(0.167812922325)+(-0.972790915366)*0.5**o
-        ref[1,0]=(-0.0876045691728)/(o+1.)+(-0.322158501138)+(-0.105824689194)*0.5**o
-        ref[1,1]=(1.00167617916)/(o+1.)+(0.42478735185)+(-0.378707957559)*0.5**o
-        ref[1,2]=(0.0485722166212)/(o+1.)+(-0.0283225302105)+(-0.0226058491089)*0.5**o
-        ref[1,3]=(0.520435646554)/(o+1.)+(-0.429308113497)+(-0.567270755897)*0.5**o
-        ref[1,4]=(-1.25344090612)/(o+1.)+(0.31025156325)+(0.977251285351)*0.5**o
-        ref[2,0]=(-0.191615046786)/(o+1.)+(0.501797936227)+(0.997778241906)*0.5**o
-        ref[2,1]=(-0.0226895463818)/(o+1.)+(-0.544505297079)+(0.59766081214)*0.5**o
-        ref[2,2]=(0.0380971422336)/(o+1.)+(-1.06058279972)+(0.633988266946)*0.5**o
-        ref[2,3]=(-0.0283073099622)/(o+1.)+(0.721850053286)+(0.102332382261)*0.5**o
-        ref[2,4]=(0.80406085149)/(o+1.)+(0.333920198971)+(0.928323090624)*0.5**o
-        ref[3,0]=(-0.252099307076)/(o+1.)+(0.0343932248679)+(-0.988813741403)*0.5**o
-        ref[3,1]=(0.504744936532)/(o+1.)+(-0.137201034138)+(-0.241202616681)*0.5**o
-        ref[3,2]=(0.223607239442)/(o+1.)+(-0.174841810203)+(-0.397081811407)*0.5**o
-        ref[3,3]=(0.118056686106)/(o+1.)+(-0.518465563043)+(-0.304262529036)*0.5**o
-        ref[3,4]=(0.248645444416)/(o+1.)+(-0.768296605922)+(-0.720555420423)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5),"wrong shape of result.")
-      self.assertTrue(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 the 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,(6, 2, 2),w)
-      ref=numpy.zeros((6, 2, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0]=(-0.347273720148)*x[0]**o+(0.325185727721)*x[0]+(-0.855515194735)*x[1]**o+(0.825807975597)*x[1]
-        arg[0,0,1]=(0.842054669437)*x[0]**o+(0.353768311241)*x[0]+(0.0148900864182)*x[1]**o+(-0.402154654143)*x[1]
-        arg[0,1,0]=(-0.191525791617)*x[0]**o+(-0.299181220926)*x[0]+(-0.696260869529)*x[1]**o+(0.285645399154)*x[1]
-        arg[0,1,1]=(0.190151633835)*x[0]**o+(0.184074338131)*x[0]+(-0.497689504982)*x[1]**o+(-0.813410371313)*x[1]
-        arg[1,0,0]=(-0.695114302024)*x[0]**o+(0.427133485674)*x[0]+(-0.711899825683)*x[1]**o+(-0.296004734911)*x[1]
-        arg[1,0,1]=(0.37620789583)*x[0]**o+(-0.944850444544)*x[0]+(0.666194812839)*x[1]**o+(-0.0715430628168)*x[1]
-        arg[1,1,0]=(-0.0312291891427)*x[0]**o+(0.403009732443)*x[0]+(-0.378486005359)*x[1]**o+(-0.992729541609)*x[1]
-        arg[1,1,1]=(0.0675984132698)*x[0]**o+(0.241001129867)*x[0]+(0.340546237588)*x[1]**o+(-0.024830810543)*x[1]
-        arg[2,0,0]=(-0.146870758676)*x[0]**o+(-0.170434897147)*x[0]+(-0.579618469996)*x[1]**o+(-0.770817574749)*x[1]
-        arg[2,0,1]=(-0.3029068201)*x[0]**o+(-0.110636302601)*x[0]+(-0.905841665338)*x[1]**o+(-0.280977886629)*x[1]
-        arg[2,1,0]=(0.0547810600344)*x[0]**o+(0.00763321517272)*x[0]+(0.0156822194106)*x[1]**o+(-0.528337857094)*x[1]
-        arg[2,1,1]=(0.12016647407)*x[0]**o+(0.4590743733)*x[0]+(-0.574499998403)*x[1]**o+(0.698871172503)*x[1]
-        arg[3,0,0]=(0.481811757276)*x[0]**o+(0.748356476205)*x[0]+(-0.300272959749)*x[1]**o+(-0.707230263391)*x[1]
-        arg[3,0,1]=(-0.347858576311)*x[0]**o+(-0.177810365974)*x[0]+(0.384658344075)*x[1]**o+(-0.837385668636)*x[1]
-        arg[3,1,0]=(0.943559460135)*x[0]**o+(0.178778474835)*x[0]+(-0.831384000346)*x[1]**o+(-0.474975888568)*x[1]
-        arg[3,1,1]=(-0.589903969401)*x[0]**o+(0.271114795948)*x[0]+(-0.946594221253)*x[1]**o+(-0.964029170264)*x[1]
-        arg[4,0,0]=(0.221077049797)*x[0]**o+(0.986052914095)*x[0]+(-0.392982812685)*x[1]**o+(0.370828365061)*x[1]
-        arg[4,0,1]=(0.463121232737)*x[0]**o+(-0.91920434872)*x[0]+(0.830655891827)*x[1]**o+(0.193876462558)*x[1]
-        arg[4,1,0]=(0.925740559506)*x[0]**o+(0.534342942418)*x[0]+(0.446730463706)*x[1]**o+(0.181095371535)*x[1]
-        arg[4,1,1]=(-0.777093674353)*x[0]**o+(-0.435130879793)*x[0]+(0.134406853212)*x[1]**o+(0.861099956528)*x[1]
-        arg[5,0,0]=(-0.443943796359)*x[0]**o+(0.359190127208)*x[0]+(0.0570788998709)*x[1]**o+(0.548070594378)*x[1]
-        arg[5,0,1]=(0.762962865085)*x[0]**o+(0.969248002849)*x[0]+(0.729222816543)*x[1]**o+(-0.865271983926)*x[1]
-        arg[5,1,0]=(-0.915609563739)*x[0]**o+(-0.338560068696)*x[0]+(0.972145654544)*x[1]**o+(0.0941277349395)*x[1]
-        arg[5,1,1]=(-0.486023356984)*x[0]**o+(-0.426382776921)*x[0]+(-0.114606039743)*x[1]**o+(-0.992152486495)*x[1]
-        ref[0,0,0]=(-0.855515194735)/(o+1.)+(0.575496851659)+(-0.347273720148)*0.5**o
-        ref[0,0,1]=(0.0148900864182)/(o+1.)+(-0.0241931714509)+(0.842054669437)*0.5**o
-        ref[0,1,0]=(-0.696260869529)/(o+1.)+(-0.00676791088595)+(-0.191525791617)*0.5**o
-        ref[0,1,1]=(-0.497689504982)/(o+1.)+(-0.314668016591)+(0.190151633835)*0.5**o
-        ref[1,0,0]=(-0.711899825683)/(o+1.)+(0.0655643753813)+(-0.695114302024)*0.5**o
-        ref[1,0,1]=(0.666194812839)/(o+1.)+(-0.50819675368)+(0.37620789583)*0.5**o
-        ref[1,1,0]=(-0.378486005359)/(o+1.)+(-0.294859904583)+(-0.0312291891427)*0.5**o
-        ref[1,1,1]=(0.340546237588)/(o+1.)+(0.108085159662)+(0.0675984132698)*0.5**o
-        ref[2,0,0]=(-0.579618469996)/(o+1.)+(-0.470626235948)+(-0.146870758676)*0.5**o
-        ref[2,0,1]=(-0.905841665338)/(o+1.)+(-0.195807094615)+(-0.3029068201)*0.5**o
-        ref[2,1,0]=(0.0156822194106)/(o+1.)+(-0.260352320961)+(0.0547810600344)*0.5**o
-        ref[2,1,1]=(-0.574499998403)/(o+1.)+(0.578972772902)+(0.12016647407)*0.5**o
-        ref[3,0,0]=(-0.300272959749)/(o+1.)+(0.0205631064069)+(0.481811757276)*0.5**o
-        ref[3,0,1]=(0.384658344075)/(o+1.)+(-0.507598017305)+(-0.347858576311)*0.5**o
-        ref[3,1,0]=(-0.831384000346)/(o+1.)+(-0.148098706867)+(0.943559460135)*0.5**o
-        ref[3,1,1]=(-0.946594221253)/(o+1.)+(-0.346457187158)+(-0.589903969401)*0.5**o
-        ref[4,0,0]=(-0.392982812685)/(o+1.)+(0.678440639578)+(0.221077049797)*0.5**o
-        ref[4,0,1]=(0.830655891827)/(o+1.)+(-0.362663943081)+(0.463121232737)*0.5**o
-        ref[4,1,0]=(0.446730463706)/(o+1.)+(0.357719156977)+(0.925740559506)*0.5**o
-        ref[4,1,1]=(0.134406853212)/(o+1.)+(0.212984538367)+(-0.777093674353)*0.5**o
-        ref[5,0,0]=(0.0570788998709)/(o+1.)+(0.453630360793)+(-0.443943796359)*0.5**o
-        ref[5,0,1]=(0.729222816543)/(o+1.)+(0.0519880094615)+(0.762962865085)*0.5**o
-        ref[5,1,0]=(0.972145654544)/(o+1.)+(-0.122216166878)+(-0.915609563739)*0.5**o
-        ref[5,1,1]=(-0.114606039743)/(o+1.)+(-0.709267631708)+(-0.486023356984)*0.5**o
-      else:
-        arg[0,0,0]=(0.455440122065)*x[0]**o+(0.911340571887)*x[0]+(0.158409397783)*x[1]**o+(0.353755257124)*x[1]+(-0.392556456322)*x[2]**o+(0.707232271095)*x[2]
-        arg[0,0,1]=(-0.816405087957)*x[0]**o+(0.0691299991887)*x[0]+(0.178677657085)*x[1]**o+(0.526176369634)*x[1]+(-0.159459641444)*x[2]**o+(-0.197907778155)*x[2]
-        arg[0,1,0]=(-0.463418217546)*x[0]**o+(-0.485835567862)*x[0]+(0.760458548482)*x[1]**o+(0.902873590314)*x[1]+(-0.760679635511)*x[2]**o+(-0.483163544794)*x[2]
-        arg[0,1,1]=(0.743029549626)*x[0]**o+(-0.39131913217)*x[0]+(0.488809682734)*x[1]**o+(-0.256115251135)*x[1]+(0.0918611991036)*x[2]**o+(-0.281291060967)*x[2]
-        arg[1,0,0]=(0.794367740289)*x[0]**o+(0.727663222288)*x[0]+(-0.631739003283)*x[1]**o+(0.733862609049)*x[1]+(-0.721230552103)*x[2]**o+(0.787774790111)*x[2]
-        arg[1,0,1]=(0.505578181889)*x[0]**o+(0.616497234291)*x[0]+(-0.616903198005)*x[1]**o+(-0.355969913594)*x[1]+(0.0105854597103)*x[2]**o+(0.510273945857)*x[2]
-        arg[1,1,0]=(0.35370601878)*x[0]**o+(-0.0414232536827)*x[0]+(0.0546619209334)*x[1]**o+(0.0459241421788)*x[1]+(0.796266758386)*x[2]**o+(0.303998757002)*x[2]
-        arg[1,1,1]=(-0.245326163282)*x[0]**o+(0.0893045737315)*x[0]+(0.019401528413)*x[1]**o+(-0.838249399348)*x[1]+(0.510320088517)*x[2]**o+(0.544558918049)*x[2]
-        arg[2,0,0]=(-0.660208039977)*x[0]**o+(-0.224874460802)*x[0]+(-0.0467836584153)*x[1]**o+(-0.463886703951)*x[1]+(-0.0951679104966)*x[2]**o+(-0.735787783779)*x[2]
-        arg[2,0,1]=(-0.588259372806)*x[0]**o+(-0.18950606147)*x[0]+(-0.373439432467)*x[1]**o+(-0.116285718036)*x[1]+(-0.944687791765)*x[2]**o+(-0.243001707318)*x[2]
-        arg[2,1,0]=(0.798498386971)*x[0]**o+(0.500125941024)*x[0]+(0.197339376576)*x[1]**o+(-0.068777545221)*x[1]+(0.36649695624)*x[2]**o+(0.193956440608)*x[2]
-        arg[2,1,1]=(0.27501104189)*x[0]**o+(0.203066488761)*x[0]+(0.379278873515)*x[1]**o+(-0.789154057614)*x[1]+(0.893889499095)*x[2]**o+(0.867881975803)*x[2]
-        arg[3,0,0]=(0.0579414247006)*x[0]**o+(0.661826954985)*x[0]+(0.313969775635)*x[1]**o+(-0.125420102972)*x[1]+(-0.808513922748)*x[2]**o+(0.0301073398588)*x[2]
-        arg[3,0,1]=(-0.254544981247)*x[0]**o+(0.755983567644)*x[0]+(0.129524533092)*x[1]**o+(0.562828535682)*x[1]+(0.712881323083)*x[2]**o+(0.375450604678)*x[2]
-        arg[3,1,0]=(-0.100221176995)*x[0]**o+(-0.470987646782)*x[0]+(-0.444245257427)*x[1]**o+(-0.0112626639353)*x[1]+(-0.516917833845)*x[2]**o+(-0.664158938756)*x[2]
-        arg[3,1,1]=(0.259306174564)*x[0]**o+(0.367178744389)*x[0]+(0.177897569676)*x[1]**o+(-0.355724319562)*x[1]+(-0.809141944951)*x[2]**o+(0.962429694607)*x[2]
-        arg[4,0,0]=(0.351990799011)*x[0]**o+(-0.41657457182)*x[0]+(-0.769748341564)*x[1]**o+(-0.856355494001)*x[1]+(-0.777902936204)*x[2]**o+(-0.388980567423)*x[2]
-        arg[4,0,1]=(0.875307372684)*x[0]**o+(0.061375057221)*x[0]+(-0.262062525469)*x[1]**o+(0.0950324968281)*x[1]+(-0.145145751811)*x[2]**o+(-0.246872045818)*x[2]
-        arg[4,1,0]=(0.115340652181)*x[0]**o+(0.910414483949)*x[0]+(0.347463744624)*x[1]**o+(0.399961393031)*x[1]+(0.0491863598064)*x[2]**o+(-0.992304094864)*x[2]
-        arg[4,1,1]=(-0.125763267852)*x[0]**o+(0.485867057874)*x[0]+(-0.414172783931)*x[1]**o+(0.164145362806)*x[1]+(-0.488738184728)*x[2]**o+(-0.232758639076)*x[2]
-        arg[5,0,0]=(-0.748184063441)*x[0]**o+(-0.252715593115)*x[0]+(0.688609235584)*x[1]**o+(0.0645665122312)*x[1]+(0.365465805991)*x[2]**o+(-0.217347848328)*x[2]
-        arg[5,0,1]=(-0.298018437594)*x[0]**o+(-0.39683066279)*x[0]+(-0.0609074331294)*x[1]**o+(0.146930937933)*x[1]+(-0.00737018012329)*x[2]**o+(-0.700002160047)*x[2]
-        arg[5,1,0]=(0.974781669859)*x[0]**o+(0.0634072121163)*x[0]+(0.0194044697894)*x[1]**o+(-0.919375545742)*x[1]+(-0.779806244021)*x[2]**o+(0.641761171945)*x[2]
-        arg[5,1,1]=(0.485215976154)*x[0]**o+(0.879804212343)*x[0]+(-0.765170516406)*x[1]**o+(-0.205158612954)*x[1]+(-0.586708070331)*x[2]**o+(0.506670980992)*x[2]
-        ref[0,0,0]=(-0.23414705854)/(o+1.)+(0.986164050053)+(0.455440122065)*0.5**o
-        ref[0,0,1]=(0.0192180156412)/(o+1.)+(0.198699295334)+(-0.816405087957)*0.5**o
-        ref[0,1,0]=(-0.000221087029094)/(o+1.)+(-0.0330627611712)+(-0.463418217546)*0.5**o
-        ref[0,1,1]=(0.580670881837)/(o+1.)+(-0.464362722135)+(0.743029549626)*0.5**o
-        ref[1,0,0]=(-1.35296955539)/(o+1.)+(1.12465031072)+(0.794367740289)*0.5**o
-        ref[1,0,1]=(-0.606317738295)/(o+1.)+(0.385400633277)+(0.505578181889)*0.5**o
-        ref[1,1,0]=(0.85092867932)/(o+1.)+(0.154249822749)+(0.35370601878)*0.5**o
-        ref[1,1,1]=(0.52972161693)/(o+1.)+(-0.102192953784)+(-0.245326163282)*0.5**o
-        ref[2,0,0]=(-0.141951568912)/(o+1.)+(-0.712274474266)+(-0.660208039977)*0.5**o
-        ref[2,0,1]=(-1.31812722423)/(o+1.)+(-0.274396743412)+(-0.588259372806)*0.5**o
-        ref[2,1,0]=(0.563836332815)/(o+1.)+(0.312652418205)+(0.798498386971)*0.5**o
-        ref[2,1,1]=(1.27316837261)/(o+1.)+(0.140897203475)+(0.27501104189)*0.5**o
-        ref[3,0,0]=(-0.494544147113)/(o+1.)+(0.283257095936)+(0.0579414247006)*0.5**o
-        ref[3,0,1]=(0.842405856175)/(o+1.)+(0.847131354002)+(-0.254544981247)*0.5**o
-        ref[3,1,0]=(-0.961163091272)/(o+1.)+(-0.573204624737)+(-0.100221176995)*0.5**o
-        ref[3,1,1]=(-0.631244375275)/(o+1.)+(0.486942059717)+(0.259306174564)*0.5**o
-        ref[4,0,0]=(-1.54765127777)/(o+1.)+(-0.830955316622)+(0.351990799011)*0.5**o
-        ref[4,0,1]=(-0.407208277279)/(o+1.)+(-0.0452322458845)+(0.875307372684)*0.5**o
-        ref[4,1,0]=(0.39665010443)/(o+1.)+(0.159035891058)+(0.115340652181)*0.5**o
-        ref[4,1,1]=(-0.902910968659)/(o+1.)+(0.208626890802)+(-0.125763267852)*0.5**o
-        ref[5,0,0]=(1.05407504158)/(o+1.)+(-0.202748464606)+(-0.748184063441)*0.5**o
-        ref[5,0,1]=(-0.0682776132527)/(o+1.)+(-0.474950942452)+(-0.298018437594)*0.5**o
-        ref[5,1,0]=(-0.760401774232)/(o+1.)+(-0.10710358084)+(0.974781669859)*0.5**o
-        ref[5,1,1]=(-1.35187858674)/(o+1.)+(0.590658290191)+(0.485215976154)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(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 the 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, 5, 3, 2),w)
-      ref=numpy.zeros((4, 5, 3, 2),numpy.float_)
-      if dim==2:
-        arg[0,0,0,0]=(-0.177078428867)*x[0]**o+(0.338116995819)*x[0]+(-0.750823220445)*x[1]**o+(0.0630074420245)*x[1]
-        arg[0,0,0,1]=(-0.682838671264)*x[0]**o+(-0.893797611147)*x[0]+(-0.0127659464437)*x[1]**o+(0.144120749888)*x[1]
-        arg[0,0,1,0]=(0.352439319413)*x[0]**o+(0.380064866457)*x[0]+(-0.932452125435)*x[1]**o+(0.914519937443)*x[1]
-        arg[0,0,1,1]=(-0.354033408023)*x[0]**o+(0.771069338542)*x[0]+(-0.702758889809)*x[1]**o+(-0.484485925087)*x[1]
-        arg[0,0,2,0]=(0.706826713479)*x[0]**o+(0.0526230471775)*x[0]+(-0.535244256862)*x[1]**o+(-0.085929844746)*x[1]
-        arg[0,0,2,1]=(-0.893497856528)*x[0]**o+(-0.892309840177)*x[0]+(0.742770093639)*x[1]**o+(0.987917060326)*x[1]
-        arg[0,1,0,0]=(-0.536624329097)*x[0]**o+(-0.569536051343)*x[0]+(-0.7740511254)*x[1]**o+(0.873150177653)*x[1]
-        arg[0,1,0,1]=(0.388396767346)*x[0]**o+(-0.902569510334)*x[0]+(0.196975646933)*x[1]**o+(0.184178333918)*x[1]
-        arg[0,1,1,0]=(-0.125771297178)*x[0]**o+(-0.335093336446)*x[0]+(0.372752949038)*x[1]**o+(-0.883928748878)*x[1]
-        arg[0,1,1,1]=(-0.313637256508)*x[0]**o+(-0.49607955109)*x[0]+(-0.726599229867)*x[1]**o+(0.360837115079)*x[1]
-        arg[0,1,2,0]=(0.92425817047)*x[0]**o+(0.734728600171)*x[0]+(1.60583902129e-05)*x[1]**o+(-0.124600971339)*x[1]
-        arg[0,1,2,1]=(-0.0981827607557)*x[0]**o+(-0.556005942436)*x[0]+(-0.888060617134)*x[1]**o+(0.857508807636)*x[1]
-        arg[0,2,0,0]=(-0.871590768072)*x[0]**o+(-0.208546938841)*x[0]+(-0.228336105988)*x[1]**o+(0.444098195066)*x[1]
-        arg[0,2,0,1]=(-0.628675127006)*x[0]**o+(0.834043549769)*x[0]+(-0.509662470381)*x[1]**o+(-0.801907226651)*x[1]
-        arg[0,2,1,0]=(-0.767528433339)*x[0]**o+(0.305967685996)*x[0]+(-0.587902586916)*x[1]**o+(0.38652781193)*x[1]
-        arg[0,2,1,1]=(0.388984380682)*x[0]**o+(0.490673256209)*x[0]+(-0.78470263647)*x[1]**o+(0.34909383158)*x[1]
-        arg[0,2,2,0]=(-0.910514531543)*x[0]**o+(-0.418810366626)*x[0]+(-0.637159792471)*x[1]**o+(0.794653160897)*x[1]
-        arg[0,2,2,1]=(0.570535552656)*x[0]**o+(-0.590385806831)*x[0]+(-0.298806908011)*x[1]**o+(-0.901531327347)*x[1]
-        arg[0,3,0,0]=(0.916864925136)*x[0]**o+(-0.019733476459)*x[0]+(-0.91370863065)*x[1]**o+(0.291932128733)*x[1]
-        arg[0,3,0,1]=(-0.851147484632)*x[0]**o+(-0.159304969602)*x[0]+(0.699832871063)*x[1]**o+(0.327932729929)*x[1]
-        arg[0,3,1,0]=(0.461273862468)*x[0]**o+(0.40068516653)*x[0]+(0.0203170502559)*x[1]**o+(0.973716167207)*x[1]
-        arg[0,3,1,1]=(0.63984877633)*x[0]**o+(0.580871491133)*x[0]+(-0.00587359808953)*x[1]**o+(-0.104805621161)*x[1]
-        arg[0,3,2,0]=(-0.159416471436)*x[0]**o+(-0.585039922994)*x[0]+(0.689553978928)*x[1]**o+(0.569617375406)*x[1]
-        arg[0,3,2,1]=(0.782397836312)*x[0]**o+(-0.581894025693)*x[0]+(0.0370277809126)*x[1]**o+(0.597309139432)*x[1]
-        arg[0,4,0,0]=(-0.0063433205485)*x[0]**o+(-0.242291627085)*x[0]+(0.110218625254)*x[1]**o+(0.819656578408)*x[1]
-        arg[0,4,0,1]=(-0.128215646666)*x[0]**o+(0.821312510893)*x[0]+(0.910723121611)*x[1]**o+(-0.0174623980585)*x[1]
-        arg[0,4,1,0]=(-0.604528735513)*x[0]**o+(-0.358705990504)*x[0]+(-0.281954207008)*x[1]**o+(0.123469639952)*x[1]
-        arg[0,4,1,1]=(0.65096807032)*x[0]**o+(0.882935341204)*x[0]+(-0.761226249914)*x[1]**o+(-0.830800218214)*x[1]
-        arg[0,4,2,0]=(-0.710718948634)*x[0]**o+(0.452128874613)*x[0]+(-0.780671499903)*x[1]**o+(-0.942033435912)*x[1]
-        arg[0,4,2,1]=(-0.0443187506467)*x[0]**o+(0.513943853321)*x[0]+(0.709902333411)*x[1]**o+(0.755430555318)*x[1]
-        arg[1,0,0,0]=(0.731890221753)*x[0]**o+(-0.821835735249)*x[0]+(-0.713098084853)*x[1]**o+(0.875738077525)*x[1]
-        arg[1,0,0,1]=(-0.130335125365)*x[0]**o+(0.580579210083)*x[0]+(-0.427105331069)*x[1]**o+(0.0435798068353)*x[1]
-        arg[1,0,1,0]=(-0.203908509107)*x[0]**o+(-0.941974700448)*x[0]+(0.344459670502)*x[1]**o+(0.758336135081)*x[1]
-        arg[1,0,1,1]=(0.186770929724)*x[0]**o+(0.348332058705)*x[0]+(-0.0683630778679)*x[1]**o+(0.480425212189)*x[1]
-        arg[1,0,2,0]=(-0.891275312975)*x[0]**o+(0.260630881729)*x[0]+(0.127955472707)*x[1]**o+(-0.554992279729)*x[1]
-        arg[1,0,2,1]=(-0.74620344519)*x[0]**o+(0.944025669845)*x[0]+(-0.052031562679)*x[1]**o+(0.966060927262)*x[1]
-        arg[1,1,0,0]=(0.871423198418)*x[0]**o+(-0.0769723128617)*x[0]+(0.783714758356)*x[1]**o+(0.530209967997)*x[1]
-        arg[1,1,0,1]=(0.943197824902)*x[0]**o+(-0.62624855429)*x[0]+(-0.00888785913795)*x[1]**o+(-0.0408857497082)*x[1]
-        arg[1,1,1,0]=(-0.74971981056)*x[0]**o+(0.925175163834)*x[0]+(0.481063204532)*x[1]**o+(-0.476700447185)*x[1]
-        arg[1,1,1,1]=(-0.431776603043)*x[0]**o+(-0.495358165507)*x[0]+(-0.0110588803484)*x[1]**o+(-0.575147325496)*x[1]
-        arg[1,1,2,0]=(0.578105297721)*x[0]**o+(-0.88169100464)*x[0]+(-0.646224518073)*x[1]**o+(0.465619837803)*x[1]
-        arg[1,1,2,1]=(0.442066689582)*x[0]**o+(0.0937839719519)*x[0]+(-0.101534585934)*x[1]**o+(-0.974003442605)*x[1]
-        arg[1,2,0,0]=(-0.206702379228)*x[0]**o+(0.330161049866)*x[0]+(0.185493587693)*x[1]**o+(0.0391986992855)*x[1]
-        arg[1,2,0,1]=(0.79092697362)*x[0]**o+(0.692054695304)*x[0]+(0.141622971369)*x[1]**o+(0.643869474153)*x[1]
-        arg[1,2,1,0]=(0.914281902407)*x[0]**o+(0.936365302055)*x[0]+(0.249095964198)*x[1]**o+(-0.440892551355)*x[1]
-        arg[1,2,1,1]=(-0.602926709108)*x[0]**o+(0.817198874641)*x[0]+(0.262528290838)*x[1]**o+(0.493607450371)*x[1]
-        arg[1,2,2,0]=(-0.724435531493)*x[0]**o+(-0.455127093687)*x[0]+(0.144972402754)*x[1]**o+(-0.361255031527)*x[1]
-        arg[1,2,2,1]=(-0.611538590545)*x[0]**o+(-0.780730652602)*x[0]+(-0.150439352532)*x[1]**o+(0.450875229163)*x[1]
-        arg[1,3,0,0]=(-0.913553947133)*x[0]**o+(-0.930172924067)*x[0]+(-0.509426399026)*x[1]**o+(0.3953360754)*x[1]
-        arg[1,3,0,1]=(-0.709834132519)*x[0]**o+(0.972632526254)*x[0]+(0.540358729462)*x[1]**o+(-0.0295254269136)*x[1]
-        arg[1,3,1,0]=(-0.30788139278)*x[0]**o+(-0.362561853154)*x[0]+(0.0135015706177)*x[1]**o+(0.558034983013)*x[1]
-        arg[1,3,1,1]=(-0.243327801257)*x[0]**o+(-0.156242539226)*x[0]+(0.076082439418)*x[1]**o+(0.818613998695)*x[1]
-        arg[1,3,2,0]=(-0.0290765899224)*x[0]**o+(-0.108604693002)*x[0]+(-0.0741034599215)*x[1]**o+(0.44467098076)*x[1]
-        arg[1,3,2,1]=(-0.751374584848)*x[0]**o+(0.568700665267)*x[0]+(-0.431665912498)*x[1]**o+(0.881337230634)*x[1]
-        arg[1,4,0,0]=(-0.940864464113)*x[0]**o+(-0.204392585977)*x[0]+(-0.872729326815)*x[1]**o+(0.454069061239)*x[1]
-        arg[1,4,0,1]=(0.620544898911)*x[0]**o+(-0.194050689442)*x[0]+(0.399921161647)*x[1]**o+(0.812456444893)*x[1]
-        arg[1,4,1,0]=(-0.398096053023)*x[0]**o+(-0.521802671926)*x[0]+(-0.525522030503)*x[1]**o+(-0.795276120062)*x[1]
-        arg[1,4,1,1]=(0.277239330261)*x[0]**o+(-0.376159942175)*x[0]+(0.785902674573)*x[1]**o+(-0.00686958652716)*x[1]
-        arg[1,4,2,0]=(-0.469242672532)*x[0]**o+(0.289432797089)*x[0]+(0.728305062026)*x[1]**o+(0.821761742668)*x[1]
-        arg[1,4,2,1]=(0.828113301834)*x[0]**o+(-0.149301261166)*x[0]+(0.279230829643)*x[1]**o+(-0.971944918618)*x[1]
-        arg[2,0,0,0]=(-0.724500208669)*x[0]**o+(-0.761179166402)*x[0]+(0.302409732402)*x[1]**o+(0.509101646177)*x[1]
-        arg[2,0,0,1]=(-0.133300605917)*x[0]**o+(-0.0299057843108)*x[0]+(0.190028790905)*x[1]**o+(-0.668097775221)*x[1]
-        arg[2,0,1,0]=(0.828019154028)*x[0]**o+(-0.446721913762)*x[0]+(0.745204383075)*x[1]**o+(0.363968853359)*x[1]
-        arg[2,0,1,1]=(-0.653962912288)*x[0]**o+(0.753529804971)*x[0]+(-0.104712073949)*x[1]**o+(-0.44152589042)*x[1]
-        arg[2,0,2,0]=(0.21572653818)*x[0]**o+(-0.553685840495)*x[0]+(0.372296357092)*x[1]**o+(-0.23566755183)*x[1]
-        arg[2,0,2,1]=(-0.0943992743407)*x[0]**o+(0.677836956763)*x[0]+(-0.33055202826)*x[1]**o+(0.444414877097)*x[1]
-        arg[2,1,0,0]=(-0.812500024009)*x[0]**o+(0.4856670967)*x[0]+(-0.891481528328)*x[1]**o+(-0.244043957515)*x[1]
-        arg[2,1,0,1]=(-0.958152880518)*x[0]**o+(0.494470945352)*x[0]+(-0.000696143847979)*x[1]**o+(-0.036680781152)*x[1]
-        arg[2,1,1,0]=(-0.81109120479)*x[0]**o+(-0.929246624754)*x[0]+(0.128356074186)*x[1]**o+(0.0107006959497)*x[1]
-        arg[2,1,1,1]=(-0.72470858095)*x[0]**o+(-0.202254265463)*x[0]+(-0.995176229907)*x[1]**o+(-0.752592973024)*x[1]
-        arg[2,1,2,0]=(-0.191810147267)*x[0]**o+(-0.819397723879)*x[0]+(0.306860971474)*x[1]**o+(0.681274705052)*x[1]
-        arg[2,1,2,1]=(-0.867447323913)*x[0]**o+(-0.279148200325)*x[0]+(-0.195907590382)*x[1]**o+(-0.305826952304)*x[1]
-        arg[2,2,0,0]=(0.983782298896)*x[0]**o+(-0.284064487432)*x[0]+(-0.0928333646602)*x[1]**o+(-0.929708520581)*x[1]
-        arg[2,2,0,1]=(0.121619221979)*x[0]**o+(-0.876309915691)*x[0]+(0.455030678927)*x[1]**o+(0.635763125356)*x[1]
-        arg[2,2,1,0]=(0.378726440151)*x[0]**o+(-0.626329947078)*x[0]+(-0.0239503446136)*x[1]**o+(0.32696940295)*x[1]
-        arg[2,2,1,1]=(0.442586981104)*x[0]**o+(-0.427714534417)*x[0]+(0.906235883406)*x[1]**o+(0.819595435756)*x[1]
-        arg[2,2,2,0]=(-0.564560890159)*x[0]**o+(-0.115075498726)*x[0]+(-0.520596320159)*x[1]**o+(-0.368366112222)*x[1]
-        arg[2,2,2,1]=(0.215858165597)*x[0]**o+(-0.575665537635)*x[0]+(0.792289256264)*x[1]**o+(0.215575294284)*x[1]
-        arg[2,3,0,0]=(-0.596335978041)*x[0]**o+(-0.677983108509)*x[0]+(-0.551360906631)*x[1]**o+(-0.874453959198)*x[1]
-        arg[2,3,0,1]=(-0.913806992124)*x[0]**o+(0.192343143898)*x[0]+(0.821070238869)*x[1]**o+(-0.188359117641)*x[1]
-        arg[2,3,1,0]=(-0.0831972104302)*x[0]**o+(-0.927005811846)*x[0]+(-0.43240265235)*x[1]**o+(-0.144332400422)*x[1]
-        arg[2,3,1,1]=(0.643878326697)*x[0]**o+(0.212328499471)*x[0]+(0.72072318435)*x[1]**o+(-0.146144387035)*x[1]
-        arg[2,3,2,0]=(0.843652876743)*x[0]**o+(-0.0386075132797)*x[0]+(0.754511827443)*x[1]**o+(-0.26945353599)*x[1]
-        arg[2,3,2,1]=(0.0413857115672)*x[0]**o+(0.682727309008)*x[0]+(0.261249117327)*x[1]**o+(-0.753970539308)*x[1]
-        arg[2,4,0,0]=(-0.607477693828)*x[0]**o+(-0.5870344058)*x[0]+(-0.0678823396451)*x[1]**o+(0.201869223616)*x[1]
-        arg[2,4,0,1]=(-0.618172945146)*x[0]**o+(0.685084114438)*x[0]+(0.0457149578306)*x[1]**o+(-0.877971038996)*x[1]
-        arg[2,4,1,0]=(0.722668769621)*x[0]**o+(0.302142466253)*x[0]+(0.630735604709)*x[1]**o+(-0.427754766567)*x[1]
-        arg[2,4,1,1]=(-0.847113860795)*x[0]**o+(-0.779747246887)*x[0]+(-0.693659242703)*x[1]**o+(0.897451884568)*x[1]
-        arg[2,4,2,0]=(-0.437578500878)*x[0]**o+(0.399407036331)*x[0]+(0.705207362097)*x[1]**o+(-0.271060427211)*x[1]
-        arg[2,4,2,1]=(0.329570005179)*x[0]**o+(-0.712089906899)*x[0]+(0.860707329294)*x[1]**o+(0.553218273352)*x[1]
-        arg[3,0,0,0]=(0.932602317046)*x[0]**o+(-0.948445141026)*x[0]+(0.549409370786)*x[1]**o+(0.782964260926)*x[1]
-        arg[3,0,0,1]=(0.975116319103)*x[0]**o+(-0.0131313829738)*x[0]+(0.222376331882)*x[1]**o+(0.545375534163)*x[1]
-        arg[3,0,1,0]=(0.019317277942)*x[0]**o+(0.918003018679)*x[0]+(-0.481194397466)*x[1]**o+(0.762780571026)*x[1]
-        arg[3,0,1,1]=(-0.393162543578)*x[0]**o+(0.984304464298)*x[0]+(0.737901448601)*x[1]**o+(-0.890589811376)*x[1]
-        arg[3,0,2,0]=(0.458096711279)*x[0]**o+(0.0343270226524)*x[0]+(0.278242150139)*x[1]**o+(-0.158378755134)*x[1]
-        arg[3,0,2,1]=(0.307111052767)*x[0]**o+(-0.294724312785)*x[0]+(-0.489134379327)*x[1]**o+(-0.211139185303)*x[1]
-        arg[3,1,0,0]=(0.420707084879)*x[0]**o+(-0.998173294986)*x[0]+(0.508808683)*x[1]**o+(-0.189902487212)*x[1]
-        arg[3,1,0,1]=(-0.745253594401)*x[0]**o+(-0.344809947215)*x[0]+(0.198212694401)*x[1]**o+(-0.125428245606)*x[1]
-        arg[3,1,1,0]=(0.535215252931)*x[0]**o+(0.565625295858)*x[0]+(-0.0741524230667)*x[1]**o+(-0.898600294889)*x[1]
-        arg[3,1,1,1]=(0.193417593556)*x[0]**o+(-0.80053921694)*x[0]+(-0.664372557476)*x[1]**o+(0.47786060257)*x[1]
-        arg[3,1,2,0]=(0.553690237434)*x[0]**o+(0.970763166888)*x[0]+(0.408815221365)*x[1]**o+(0.143175119269)*x[1]
-        arg[3,1,2,1]=(-0.211683249218)*x[0]**o+(0.0643055656631)*x[0]+(-0.111028404397)*x[1]**o+(0.506093872018)*x[1]
-        arg[3,2,0,0]=(-0.866119051438)*x[0]**o+(-0.417310807983)*x[0]+(-0.228385234131)*x[1]**o+(0.554977378653)*x[1]
-        arg[3,2,0,1]=(-0.146618266885)*x[0]**o+(0.817733306502)*x[0]+(-0.709059272627)*x[1]**o+(-0.271140815458)*x[1]
-        arg[3,2,1,0]=(0.622973500199)*x[0]**o+(-0.568858605993)*x[0]+(-0.651609755171)*x[1]**o+(-0.866184190672)*x[1]
-        arg[3,2,1,1]=(-0.538565077894)*x[0]**o+(-0.676237465393)*x[0]+(0.106659392436)*x[1]**o+(0.488735158765)*x[1]
-        arg[3,2,2,0]=(-0.325897413686)*x[0]**o+(0.99502293321)*x[0]+(-0.339096900793)*x[1]**o+(0.238083096263)*x[1]
-        arg[3,2,2,1]=(0.861430484293)*x[0]**o+(-0.761739126386)*x[0]+(-0.10651751912)*x[1]**o+(0.688993400068)*x[1]
-        arg[3,3,0,0]=(0.0890838652267)*x[0]**o+(0.151733228604)*x[0]+(0.230063809846)*x[1]**o+(-0.135041740614)*x[1]
-        arg[3,3,0,1]=(-0.969251937403)*x[0]**o+(0.345709865473)*x[0]+(-0.309971427898)*x[1]**o+(-0.262217856737)*x[1]
-        arg[3,3,1,0]=(0.640075232231)*x[0]**o+(-0.00817560718155)*x[0]+(0.55773788655)*x[1]**o+(0.642205213407)*x[1]
-        arg[3,3,1,1]=(-0.350002630494)*x[0]**o+(0.373270925939)*x[0]+(-0.655757122598)*x[1]**o+(-0.74598967873)*x[1]
-        arg[3,3,2,0]=(-0.262399316954)*x[0]**o+(-0.37991094527)*x[0]+(0.310310045807)*x[1]**o+(0.838942372822)*x[1]
-        arg[3,3,2,1]=(-0.977039760257)*x[0]**o+(-0.0804751651971)*x[0]+(-0.844329846245)*x[1]**o+(0.905827257908)*x[1]
-        arg[3,4,0,0]=(0.749594099085)*x[0]**o+(0.382880202285)*x[0]+(0.39699250956)*x[1]**o+(-0.708672318437)*x[1]
-        arg[3,4,0,1]=(0.913703789336)*x[0]**o+(-0.497792024208)*x[0]+(-0.34125011876)*x[1]**o+(-0.657159430634)*x[1]
-        arg[3,4,1,0]=(-0.397439923687)*x[0]**o+(0.595274583577)*x[0]+(-0.292338728991)*x[1]**o+(-0.314101057271)*x[1]
-        arg[3,4,1,1]=(-0.403584993513)*x[0]**o+(-0.758728905384)*x[0]+(-0.182501473325)*x[1]**o+(-0.0942108622967)*x[1]
-        arg[3,4,2,0]=(-0.263608698751)*x[0]**o+(-0.591451983536)*x[0]+(0.620412677389)*x[1]**o+(0.600005456466)*x[1]
-        arg[3,4,2,1]=(-0.633502278259)*x[0]**o+(0.733127573934)*x[0]+(-0.765468966987)*x[1]**o+(-0.24211874772)*x[1]
-        ref[0,0,0,0]=(-0.750823220445)/(o+1.)+(0.200562218922)+(-0.177078428867)*0.5**o
-        ref[0,0,0,1]=(-0.0127659464437)/(o+1.)+(-0.374838430629)+(-0.682838671264)*0.5**o
-        ref[0,0,1,0]=(-0.932452125435)/(o+1.)+(0.64729240195)+(0.352439319413)*0.5**o
-        ref[0,0,1,1]=(-0.702758889809)/(o+1.)+(0.143291706728)+(-0.354033408023)*0.5**o
-        ref[0,0,2,0]=(-0.535244256862)/(o+1.)+(-0.0166533987843)+(0.706826713479)*0.5**o
-        ref[0,0,2,1]=(0.742770093639)/(o+1.)+(0.0478036100749)+(-0.893497856528)*0.5**o
-        ref[0,1,0,0]=(-0.7740511254)/(o+1.)+(0.151807063155)+(-0.536624329097)*0.5**o
-        ref[0,1,0,1]=(0.196975646933)/(o+1.)+(-0.359195588208)+(0.388396767346)*0.5**o
-        ref[0,1,1,0]=(0.372752949038)/(o+1.)+(-0.609511042662)+(-0.125771297178)*0.5**o
-        ref[0,1,1,1]=(-0.726599229867)/(o+1.)+(-0.0676212180057)+(-0.313637256508)*0.5**o
-        ref[0,1,2,0]=(1.60583902129e-05)/(o+1.)+(0.305063814416)+(0.92425817047)*0.5**o
-        ref[0,1,2,1]=(-0.888060617134)/(o+1.)+(0.1507514326)+(-0.0981827607557)*0.5**o
-        ref[0,2,0,0]=(-0.228336105988)/(o+1.)+(0.117775628113)+(-0.871590768072)*0.5**o
-        ref[0,2,0,1]=(-0.509662470381)/(o+1.)+(0.0160681615592)+(-0.628675127006)*0.5**o
-        ref[0,2,1,0]=(-0.587902586916)/(o+1.)+(0.346247748963)+(-0.767528433339)*0.5**o
-        ref[0,2,1,1]=(-0.78470263647)/(o+1.)+(0.419883543895)+(0.388984380682)*0.5**o
-        ref[0,2,2,0]=(-0.637159792471)/(o+1.)+(0.187921397135)+(-0.910514531543)*0.5**o
-        ref[0,2,2,1]=(-0.298806908011)/(o+1.)+(-0.745958567089)+(0.570535552656)*0.5**o
-        ref[0,3,0,0]=(-0.91370863065)/(o+1.)+(0.136099326137)+(0.916864925136)*0.5**o
-        ref[0,3,0,1]=(0.699832871063)/(o+1.)+(0.0843138801635)+(-0.851147484632)*0.5**o
-        ref[0,3,1,0]=(0.0203170502559)/(o+1.)+(0.687200666868)+(0.461273862468)*0.5**o
-        ref[0,3,1,1]=(-0.00587359808953)/(o+1.)+(0.238032934986)+(0.63984877633)*0.5**o
-        ref[0,3,2,0]=(0.689553978928)/(o+1.)+(-0.00771127379434)+(-0.159416471436)*0.5**o
-        ref[0,3,2,1]=(0.0370277809126)/(o+1.)+(0.00770755686953)+(0.782397836312)*0.5**o
-        ref[0,4,0,0]=(0.110218625254)/(o+1.)+(0.288682475662)+(-0.0063433205485)*0.5**o
-        ref[0,4,0,1]=(0.910723121611)/(o+1.)+(0.401925056417)+(-0.128215646666)*0.5**o
-        ref[0,4,1,0]=(-0.281954207008)/(o+1.)+(-0.117618175276)+(-0.604528735513)*0.5**o
-        ref[0,4,1,1]=(-0.761226249914)/(o+1.)+(0.0260675614951)+(0.65096807032)*0.5**o
-        ref[0,4,2,0]=(-0.780671499903)/(o+1.)+(-0.244952280649)+(-0.710718948634)*0.5**o
-        ref[0,4,2,1]=(0.709902333411)/(o+1.)+(0.63468720432)+(-0.0443187506467)*0.5**o
-        ref[1,0,0,0]=(-0.713098084853)/(o+1.)+(0.026951171138)+(0.731890221753)*0.5**o
-        ref[1,0,0,1]=(-0.427105331069)/(o+1.)+(0.312079508459)+(-0.130335125365)*0.5**o
-        ref[1,0,1,0]=(0.344459670502)/(o+1.)+(-0.0918192826838)+(-0.203908509107)*0.5**o
-        ref[1,0,1,1]=(-0.0683630778679)/(o+1.)+(0.414378635447)+(0.186770929724)*0.5**o
-        ref[1,0,2,0]=(0.127955472707)/(o+1.)+(-0.147180699)+(-0.891275312975)*0.5**o
-        ref[1,0,2,1]=(-0.052031562679)/(o+1.)+(0.955043298554)+(-0.74620344519)*0.5**o
-        ref[1,1,0,0]=(0.783714758356)/(o+1.)+(0.226618827568)+(0.871423198418)*0.5**o
-        ref[1,1,0,1]=(-0.00888785913795)/(o+1.)+(-0.333567151999)+(0.943197824902)*0.5**o
-        ref[1,1,1,0]=(0.481063204532)/(o+1.)+(0.224237358325)+(-0.74971981056)*0.5**o
-        ref[1,1,1,1]=(-0.0110588803484)/(o+1.)+(-0.535252745501)+(-0.431776603043)*0.5**o
-        ref[1,1,2,0]=(-0.646224518073)/(o+1.)+(-0.208035583419)+(0.578105297721)*0.5**o
-        ref[1,1,2,1]=(-0.101534585934)/(o+1.)+(-0.440109735326)+(0.442066689582)*0.5**o
-        ref[1,2,0,0]=(0.185493587693)/(o+1.)+(0.184679874576)+(-0.206702379228)*0.5**o
-        ref[1,2,0,1]=(0.141622971369)/(o+1.)+(0.667962084728)+(0.79092697362)*0.5**o
-        ref[1,2,1,0]=(0.249095964198)/(o+1.)+(0.24773637535)+(0.914281902407)*0.5**o
-        ref[1,2,1,1]=(0.262528290838)/(o+1.)+(0.655403162506)+(-0.602926709108)*0.5**o
-        ref[1,2,2,0]=(0.144972402754)/(o+1.)+(-0.408191062607)+(-0.724435531493)*0.5**o
-        ref[1,2,2,1]=(-0.150439352532)/(o+1.)+(-0.16492771172)+(-0.611538590545)*0.5**o
-        ref[1,3,0,0]=(-0.509426399026)/(o+1.)+(-0.267418424334)+(-0.913553947133)*0.5**o
-        ref[1,3,0,1]=(0.540358729462)/(o+1.)+(0.47155354967)+(-0.709834132519)*0.5**o
-        ref[1,3,1,0]=(0.0135015706177)/(o+1.)+(0.0977365649293)+(-0.30788139278)*0.5**o
-        ref[1,3,1,1]=(0.076082439418)/(o+1.)+(0.331185729735)+(-0.243327801257)*0.5**o
-        ref[1,3,2,0]=(-0.0741034599215)/(o+1.)+(0.168033143879)+(-0.0290765899224)*0.5**o
-        ref[1,3,2,1]=(-0.431665912498)/(o+1.)+(0.72501894795)+(-0.751374584848)*0.5**o
-        ref[1,4,0,0]=(-0.872729326815)/(o+1.)+(0.124838237631)+(-0.940864464113)*0.5**o
-        ref[1,4,0,1]=(0.399921161647)/(o+1.)+(0.309202877726)+(0.620544898911)*0.5**o
-        ref[1,4,1,0]=(-0.525522030503)/(o+1.)+(-0.658539395994)+(-0.398096053023)*0.5**o
-        ref[1,4,1,1]=(0.785902674573)/(o+1.)+(-0.191514764351)+(0.277239330261)*0.5**o
-        ref[1,4,2,0]=(0.728305062026)/(o+1.)+(0.555597269878)+(-0.469242672532)*0.5**o
-        ref[1,4,2,1]=(0.279230829643)/(o+1.)+(-0.560623089892)+(0.828113301834)*0.5**o
-        ref[2,0,0,0]=(0.302409732402)/(o+1.)+(-0.126038760113)+(-0.724500208669)*0.5**o
-        ref[2,0,0,1]=(0.190028790905)/(o+1.)+(-0.349001779766)+(-0.133300605917)*0.5**o
-        ref[2,0,1,0]=(0.745204383075)/(o+1.)+(-0.0413765302013)+(0.828019154028)*0.5**o
-        ref[2,0,1,1]=(-0.104712073949)/(o+1.)+(0.156001957276)+(-0.653962912288)*0.5**o
-        ref[2,0,2,0]=(0.372296357092)/(o+1.)+(-0.394676696163)+(0.21572653818)*0.5**o
-        ref[2,0,2,1]=(-0.33055202826)/(o+1.)+(0.56112591693)+(-0.0943992743407)*0.5**o
-        ref[2,1,0,0]=(-0.891481528328)/(o+1.)+(0.120811569592)+(-0.812500024009)*0.5**o
-        ref[2,1,0,1]=(-0.000696143847979)/(o+1.)+(0.2288950821)+(-0.958152880518)*0.5**o
-        ref[2,1,1,0]=(0.128356074186)/(o+1.)+(-0.459272964402)+(-0.81109120479)*0.5**o
-        ref[2,1,1,1]=(-0.995176229907)/(o+1.)+(-0.477423619244)+(-0.72470858095)*0.5**o
-        ref[2,1,2,0]=(0.306860971474)/(o+1.)+(-0.0690615094134)+(-0.191810147267)*0.5**o
-        ref[2,1,2,1]=(-0.195907590382)/(o+1.)+(-0.292487576314)+(-0.867447323913)*0.5**o
-        ref[2,2,0,0]=(-0.0928333646602)/(o+1.)+(-0.606886504006)+(0.983782298896)*0.5**o
-        ref[2,2,0,1]=(0.455030678927)/(o+1.)+(-0.120273395167)+(0.121619221979)*0.5**o
-        ref[2,2,1,0]=(-0.0239503446136)/(o+1.)+(-0.149680272064)+(0.378726440151)*0.5**o
-        ref[2,2,1,1]=(0.906235883406)/(o+1.)+(0.19594045067)+(0.442586981104)*0.5**o
-        ref[2,2,2,0]=(-0.520596320159)/(o+1.)+(-0.241720805474)+(-0.564560890159)*0.5**o
-        ref[2,2,2,1]=(0.792289256264)/(o+1.)+(-0.180045121676)+(0.215858165597)*0.5**o
-        ref[2,3,0,0]=(-0.551360906631)/(o+1.)+(-0.776218533854)+(-0.596335978041)*0.5**o
-        ref[2,3,0,1]=(0.821070238869)/(o+1.)+(0.00199201312847)+(-0.913806992124)*0.5**o
-        ref[2,3,1,0]=(-0.43240265235)/(o+1.)+(-0.535669106134)+(-0.0831972104302)*0.5**o
-        ref[2,3,1,1]=(0.72072318435)/(o+1.)+(0.0330920562179)+(0.643878326697)*0.5**o
-        ref[2,3,2,0]=(0.754511827443)/(o+1.)+(-0.154030524635)+(0.843652876743)*0.5**o
-        ref[2,3,2,1]=(0.261249117327)/(o+1.)+(-0.03562161515)+(0.0413857115672)*0.5**o
-        ref[2,4,0,0]=(-0.0678823396451)/(o+1.)+(-0.192582591092)+(-0.607477693828)*0.5**o
-        ref[2,4,0,1]=(0.0457149578306)/(o+1.)+(-0.0964434622791)+(-0.618172945146)*0.5**o
-        ref[2,4,1,0]=(0.630735604709)/(o+1.)+(-0.0628061501569)+(0.722668769621)*0.5**o
-        ref[2,4,1,1]=(-0.693659242703)/(o+1.)+(0.0588523188405)+(-0.847113860795)*0.5**o
-        ref[2,4,2,0]=(0.705207362097)/(o+1.)+(0.0641733045603)+(-0.437578500878)*0.5**o
-        ref[2,4,2,1]=(0.860707329294)/(o+1.)+(-0.0794358167735)+(0.329570005179)*0.5**o
-        ref[3,0,0,0]=(0.549409370786)/(o+1.)+(-0.0827404400499)+(0.932602317046)*0.5**o
-        ref[3,0,0,1]=(0.222376331882)/(o+1.)+(0.266122075595)+(0.975116319103)*0.5**o
-        ref[3,0,1,0]=(-0.481194397466)/(o+1.)+(0.840391794852)+(0.019317277942)*0.5**o
-        ref[3,0,1,1]=(0.737901448601)/(o+1.)+(0.0468573264614)+(-0.393162543578)*0.5**o
-        ref[3,0,2,0]=(0.278242150139)/(o+1.)+(-0.0620258662406)+(0.458096711279)*0.5**o
-        ref[3,0,2,1]=(-0.489134379327)/(o+1.)+(-0.252931749044)+(0.307111052767)*0.5**o
-        ref[3,1,0,0]=(0.508808683)/(o+1.)+(-0.594037891099)+(0.420707084879)*0.5**o
-        ref[3,1,0,1]=(0.198212694401)/(o+1.)+(-0.23511909641)+(-0.745253594401)*0.5**o
-        ref[3,1,1,0]=(-0.0741524230667)/(o+1.)+(-0.166487499516)+(0.535215252931)*0.5**o
-        ref[3,1,1,1]=(-0.664372557476)/(o+1.)+(-0.161339307185)+(0.193417593556)*0.5**o
-        ref[3,1,2,0]=(0.408815221365)/(o+1.)+(0.556969143078)+(0.553690237434)*0.5**o
-        ref[3,1,2,1]=(-0.111028404397)/(o+1.)+(0.28519971884)+(-0.211683249218)*0.5**o
-        ref[3,2,0,0]=(-0.228385234131)/(o+1.)+(0.068833285335)+(-0.866119051438)*0.5**o
-        ref[3,2,0,1]=(-0.709059272627)/(o+1.)+(0.273296245522)+(-0.146618266885)*0.5**o
-        ref[3,2,1,0]=(-0.651609755171)/(o+1.)+(-0.717521398332)+(0.622973500199)*0.5**o
-        ref[3,2,1,1]=(0.106659392436)/(o+1.)+(-0.0937511533137)+(-0.538565077894)*0.5**o
-        ref[3,2,2,0]=(-0.339096900793)/(o+1.)+(0.616553014737)+(-0.325897413686)*0.5**o
-        ref[3,2,2,1]=(-0.10651751912)/(o+1.)+(-0.0363728631586)+(0.861430484293)*0.5**o
-        ref[3,3,0,0]=(0.230063809846)/(o+1.)+(0.0083457439947)+(0.0890838652267)*0.5**o
-        ref[3,3,0,1]=(-0.309971427898)/(o+1.)+(0.0417460043682)+(-0.969251937403)*0.5**o
-        ref[3,3,1,0]=(0.55773788655)/(o+1.)+(0.317014803113)+(0.640075232231)*0.5**o
-        ref[3,3,1,1]=(-0.655757122598)/(o+1.)+(-0.186359376395)+(-0.350002630494)*0.5**o
-        ref[3,3,2,0]=(0.310310045807)/(o+1.)+(0.229515713776)+(-0.262399316954)*0.5**o
-        ref[3,3,2,1]=(-0.844329846245)/(o+1.)+(0.412676046356)+(-0.977039760257)*0.5**o
-        ref[3,4,0,0]=(0.39699250956)/(o+1.)+(-0.162896058076)+(0.749594099085)*0.5**o
-        ref[3,4,0,1]=(-0.34125011876)/(o+1.)+(-0.577475727421)+(0.913703789336)*0.5**o
-        ref[3,4,1,0]=(-0.292338728991)/(o+1.)+(0.140586763153)+(-0.397439923687)*0.5**o
-        ref[3,4,1,1]=(-0.182501473325)/(o+1.)+(-0.42646988384)+(-0.403584993513)*0.5**o
-        ref[3,4,2,0]=(0.620412677389)/(o+1.)+(0.00427673646471)+(-0.263608698751)*0.5**o
-        ref[3,4,2,1]=(-0.765468966987)/(o+1.)+(0.245504413107)+(-0.633502278259)*0.5**o
-      else:
-        arg[0,0,0,0]=(0.480896043196)*x[0]**o+(0.113355160927)*x[0]+(0.498630339771)*x[1]**o+(0.0149514785179)*x[1]+(-0.944439525708)*x[2]**o+(-0.349299625744)*x[2]
-        arg[0,0,0,1]=(-0.609632888023)*x[0]**o+(-0.576508904483)*x[0]+(-0.0610487008887)*x[1]**o+(-0.844087384492)*x[1]+(-0.715427733517)*x[2]**o+(-0.263424969452)*x[2]
-        arg[0,0,1,0]=(0.205065167181)*x[0]**o+(-0.840225514826)*x[0]+(0.808161497555)*x[1]**o+(0.685902712814)*x[1]+(-0.625183952417)*x[2]**o+(-0.0947932775112)*x[2]
-        arg[0,0,1,1]=(0.875716461075)*x[0]**o+(0.814425331995)*x[0]+(-0.805331622235)*x[1]**o+(-0.287737068993)*x[1]+(-0.365715978159)*x[2]**o+(0.689907502778)*x[2]
-        arg[0,0,2,0]=(0.711372030289)*x[0]**o+(-0.393612062405)*x[0]+(0.642793863702)*x[1]**o+(-0.66636178423)*x[1]+(0.00488425355017)*x[2]**o+(-0.444523817626)*x[2]
-        arg[0,0,2,1]=(-0.0536842545617)*x[0]**o+(-0.714279418499)*x[0]+(-0.487452457649)*x[1]**o+(0.917805820162)*x[1]+(0.445007135027)*x[2]**o+(0.101201310289)*x[2]
-        arg[0,1,0,0]=(-0.710091748251)*x[0]**o+(0.470243562863)*x[0]+(-0.0178862343634)*x[1]**o+(0.393644042332)*x[1]+(-0.952839337577)*x[2]**o+(-0.152392013939)*x[2]
-        arg[0,1,0,1]=(0.250989366649)*x[0]**o+(0.592158236555)*x[0]+(0.698185234877)*x[1]**o+(0.112154263635)*x[1]+(0.843915127813)*x[2]**o+(-0.825331842242)*x[2]
-        arg[0,1,1,0]=(0.690360096543)*x[0]**o+(0.78906430602)*x[0]+(0.596189773531)*x[1]**o+(-0.293452572358)*x[1]+(0.737565980909)*x[2]**o+(-0.96988090057)*x[2]
-        arg[0,1,1,1]=(-0.815220933301)*x[0]**o+(-0.875224889387)*x[0]+(-0.0562950344908)*x[1]**o+(0.56567431969)*x[1]+(0.133489969036)*x[2]**o+(0.299403989148)*x[2]
-        arg[0,1,2,0]=(0.169442617085)*x[0]**o+(-0.413300800662)*x[0]+(0.580773652363)*x[1]**o+(-0.627706012397)*x[1]+(-0.730218498677)*x[2]**o+(0.587233195345)*x[2]
-        arg[0,1,2,1]=(-0.110636656112)*x[0]**o+(-0.302213944624)*x[0]+(0.643229732019)*x[1]**o+(-0.651805494828)*x[1]+(-0.528276901455)*x[2]**o+(-0.272057635286)*x[2]
-        arg[0,2,0,0]=(0.340661037085)*x[0]**o+(-0.672207039496)*x[0]+(0.676291394824)*x[1]**o+(0.596998737167)*x[1]+(-0.689800391841)*x[2]**o+(-0.134273731064)*x[2]
-        arg[0,2,0,1]=(0.185282186176)*x[0]**o+(0.252489447393)*x[0]+(-0.0447305595755)*x[1]**o+(-0.558361084175)*x[1]+(0.922681220429)*x[2]**o+(-0.484588607971)*x[2]
-        arg[0,2,1,0]=(0.238772787004)*x[0]**o+(0.987311136495)*x[0]+(0.215079265839)*x[1]**o+(-0.797762453244)*x[1]+(0.0329055379323)*x[2]**o+(-0.88999503049)*x[2]
-        arg[0,2,1,1]=(-0.175884373587)*x[0]**o+(0.806690051494)*x[0]+(0.0086744009376)*x[1]**o+(0.286131063746)*x[1]+(0.536839534689)*x[2]**o+(-0.0946282917135)*x[2]
-        arg[0,2,2,0]=(-0.615695203188)*x[0]**o+(0.600565627235)*x[0]+(-0.869759996675)*x[1]**o+(0.648192341374)*x[1]+(-0.952728999251)*x[2]**o+(0.564068973312)*x[2]
-        arg[0,2,2,1]=(-0.0992379560876)*x[0]**o+(-0.897179656441)*x[0]+(-0.519600820875)*x[1]**o+(0.70507167679)*x[1]+(0.903640275297)*x[2]**o+(-0.645039734963)*x[2]
-        arg[0,3,0,0]=(0.432415072474)*x[0]**o+(-0.748137008742)*x[0]+(0.875883324091)*x[1]**o+(0.706172632952)*x[1]+(-0.47486904255)*x[2]**o+(0.238106343647)*x[2]
-        arg[0,3,0,1]=(-0.656397468061)*x[0]**o+(-0.530867058489)*x[0]+(-0.904148914114)*x[1]**o+(0.87213389632)*x[1]+(0.0612056123548)*x[2]**o+(0.288620109264)*x[2]
-        arg[0,3,1,0]=(-0.472896985897)*x[0]**o+(0.83328574859)*x[0]+(0.744310819801)*x[1]**o+(0.0601035189502)*x[1]+(-0.198693260491)*x[2]**o+(-0.882304016543)*x[2]
-        arg[0,3,1,1]=(-0.515568063685)*x[0]**o+(0.484765564236)*x[0]+(0.754304059424)*x[1]**o+(0.654790289063)*x[1]+(-0.102335538236)*x[2]**o+(-0.0705158755887)*x[2]
-        arg[0,3,2,0]=(-0.709802317012)*x[0]**o+(-0.346551215683)*x[0]+(0.312943005623)*x[1]**o+(0.476828461567)*x[1]+(0.901171463566)*x[2]**o+(0.538981245022)*x[2]
-        arg[0,3,2,1]=(-0.20057625974)*x[0]**o+(0.0458666109661)*x[0]+(0.909610730794)*x[1]**o+(0.145637065192)*x[1]+(0.666420073244)*x[2]**o+(0.0550124082656)*x[2]
-        arg[0,4,0,0]=(-0.726921583373)*x[0]**o+(0.891306726707)*x[0]+(-0.189151461127)*x[1]**o+(0.479274047923)*x[1]+(-0.129077261233)*x[2]**o+(-0.873599130413)*x[2]
-        arg[0,4,0,1]=(0.765272127757)*x[0]**o+(0.159307695759)*x[0]+(-0.569162341331)*x[1]**o+(-0.530158933095)*x[1]+(-0.216727788754)*x[2]**o+(-0.519551969741)*x[2]
-        arg[0,4,1,0]=(-0.613269202518)*x[0]**o+(0.612846846793)*x[0]+(-0.187285796021)*x[1]**o+(-0.462603518143)*x[1]+(-0.739162067312)*x[2]**o+(0.0737393951189)*x[2]
-        arg[0,4,1,1]=(-0.727485674691)*x[0]**o+(-0.461427895477)*x[0]+(0.917029475887)*x[1]**o+(0.265874989879)*x[1]+(0.602505162351)*x[2]**o+(-0.372206475027)*x[2]
-        arg[0,4,2,0]=(-0.663071984573)*x[0]**o+(0.511217165998)*x[0]+(-0.472765672078)*x[1]**o+(0.814962161218)*x[1]+(-0.608890631297)*x[2]**o+(-0.284872941025)*x[2]
-        arg[0,4,2,1]=(0.893396132015)*x[0]**o+(0.183468149957)*x[0]+(0.647812435076)*x[1]**o+(-0.398672312216)*x[1]+(0.6359553902)*x[2]**o+(0.485509522238)*x[2]
-        arg[1,0,0,0]=(-0.0771632829864)*x[0]**o+(-0.723025089864)*x[0]+(0.486209418481)*x[1]**o+(0.0869704919133)*x[1]+(-0.365499197901)*x[2]**o+(-0.0796713538898)*x[2]
-        arg[1,0,0,1]=(0.133617787097)*x[0]**o+(0.993872304226)*x[0]+(-0.898504795319)*x[1]**o+(0.656793416434)*x[1]+(-0.821841885906)*x[2]**o+(0.726972748423)*x[2]
-        arg[1,0,1,0]=(0.174277385391)*x[0]**o+(-0.301857401564)*x[0]+(-0.846153302312)*x[1]**o+(-0.559076632516)*x[1]+(-0.89870762709)*x[2]**o+(0.640171641512)*x[2]
-        arg[1,0,1,1]=(0.795443369588)*x[0]**o+(-0.346082013333)*x[0]+(-0.439713049567)*x[1]**o+(0.860680213906)*x[1]+(-0.466761099917)*x[2]**o+(-0.843656974958)*x[2]
-        arg[1,0,2,0]=(0.482814141263)*x[0]**o+(0.142978643528)*x[0]+(-0.735291704767)*x[1]**o+(-0.925675892787)*x[1]+(0.747235439093)*x[2]**o+(-0.569454067374)*x[2]
-        arg[1,0,2,1]=(0.619359374773)*x[0]**o+(-0.547172728307)*x[0]+(0.0829642963797)*x[1]**o+(-0.0180882163346)*x[1]+(0.328627445196)*x[2]**o+(-0.274608686384)*x[2]
-        arg[1,1,0,0]=(-0.510375454058)*x[0]**o+(-0.779894165181)*x[0]+(0.656168894408)*x[1]**o+(-0.449484133421)*x[1]+(-0.147284453744)*x[2]**o+(-0.488384108271)*x[2]
-        arg[1,1,0,1]=(-0.302705575836)*x[0]**o+(0.256670307547)*x[0]+(0.110465379068)*x[1]**o+(0.319291387545)*x[1]+(0.408832172454)*x[2]**o+(0.718793126931)*x[2]
-        arg[1,1,1,0]=(0.520882033451)*x[0]**o+(0.412524861348)*x[0]+(0.761080123209)*x[1]**o+(0.401223078157)*x[1]+(-0.65945839721)*x[2]**o+(0.71349489395)*x[2]
-        arg[1,1,1,1]=(0.624622427594)*x[0]**o+(0.847907716976)*x[0]+(0.855268296474)*x[1]**o+(-0.671685662164)*x[1]+(-0.407895715308)*x[2]**o+(-0.719054767733)*x[2]
-        arg[1,1,2,0]=(-0.044254701409)*x[0]**o+(0.72911290175)*x[0]+(0.869467934211)*x[1]**o+(0.613006764744)*x[1]+(0.678602796496)*x[2]**o+(0.388923815748)*x[2]
-        arg[1,1,2,1]=(-0.240571107795)*x[0]**o+(0.838382917252)*x[0]+(0.0342933298383)*x[1]**o+(0.595421789197)*x[1]+(-0.989088178853)*x[2]**o+(-0.20002339454)*x[2]
-        arg[1,2,0,0]=(0.0596937021722)*x[0]**o+(0.196768537308)*x[0]+(0.0834459161806)*x[1]**o+(0.194049508373)*x[1]+(-0.097309631361)*x[2]**o+(-0.867555781902)*x[2]
-        arg[1,2,0,1]=(-0.935541542647)*x[0]**o+(-0.00702430636955)*x[0]+(-0.384657002538)*x[1]**o+(0.186884376746)*x[1]+(0.97207387841)*x[2]**o+(0.452460932869)*x[2]
-        arg[1,2,1,0]=(0.276741406646)*x[0]**o+(0.838348610585)*x[0]+(-0.403054578066)*x[1]**o+(0.655318135938)*x[1]+(0.37614761635)*x[2]**o+(0.82736662494)*x[2]
-        arg[1,2,1,1]=(0.828731604537)*x[0]**o+(0.762067030749)*x[0]+(-0.881827056079)*x[1]**o+(0.250928989647)*x[1]+(-0.771040367979)*x[2]**o+(0.239950799138)*x[2]
-        arg[1,2,2,0]=(-0.380797583569)*x[0]**o+(0.112805267222)*x[0]+(-0.454730562411)*x[1]**o+(0.926061735219)*x[1]+(0.348331256905)*x[2]**o+(-0.725641369775)*x[2]
-        arg[1,2,2,1]=(0.257022926473)*x[0]**o+(0.0160557858816)*x[0]+(-0.291367922966)*x[1]**o+(-0.611341260765)*x[1]+(0.232472950268)*x[2]**o+(-0.738139185521)*x[2]
-        arg[1,3,0,0]=(-0.645340088797)*x[0]**o+(0.480235460274)*x[0]+(0.135346246274)*x[1]**o+(-0.560730820351)*x[1]+(-0.635582025321)*x[2]**o+(-0.476912924392)*x[2]
-        arg[1,3,0,1]=(0.124132693667)*x[0]**o+(-0.813993821983)*x[0]+(-0.108593659227)*x[1]**o+(-0.432186668568)*x[1]+(0.209382070426)*x[2]**o+(0.928912669667)*x[2]
-        arg[1,3,1,0]=(-0.7660131868)*x[0]**o+(-0.30274186797)*x[0]+(0.140498262981)*x[1]**o+(0.993084314471)*x[1]+(0.684043026981)*x[2]**o+(-0.339724714081)*x[2]
-        arg[1,3,1,1]=(-0.150578257351)*x[0]**o+(-0.674840941109)*x[0]+(0.469240334383)*x[1]**o+(0.729963338278)*x[1]+(-0.800829664334)*x[2]**o+(0.0467922871395)*x[2]
-        arg[1,3,2,0]=(-0.336661555676)*x[0]**o+(0.705661383379)*x[0]+(-0.76993460355)*x[1]**o+(0.459144989218)*x[1]+(0.545901025663)*x[2]**o+(0.385988013614)*x[2]
-        arg[1,3,2,1]=(0.165928745462)*x[0]**o+(0.540718600752)*x[0]+(0.172773708803)*x[1]**o+(0.253664803784)*x[1]+(-0.264896626947)*x[2]**o+(-0.478577475495)*x[2]
-        arg[1,4,0,0]=(0.283586653542)*x[0]**o+(-0.104364884571)*x[0]+(-0.840555806526)*x[1]**o+(0.701868415915)*x[1]+(-0.290943689679)*x[2]**o+(-0.73024942052)*x[2]
-        arg[1,4,0,1]=(-0.772849835334)*x[0]**o+(-0.432170589951)*x[0]+(-0.376099423267)*x[1]**o+(0.0215357491826)*x[1]+(-0.346787011464)*x[2]**o+(0.620411709813)*x[2]
-        arg[1,4,1,0]=(-0.718524564964)*x[0]**o+(0.119936682579)*x[0]+(-0.994276256462)*x[1]**o+(-0.839783920473)*x[1]+(-0.454576336782)*x[2]**o+(-0.515489988915)*x[2]
-        arg[1,4,1,1]=(-0.771664154234)*x[0]**o+(-0.584052299067)*x[0]+(-0.0233756210307)*x[1]**o+(-0.174442816636)*x[1]+(-0.702383477714)*x[2]**o+(-0.279952858144)*x[2]
-        arg[1,4,2,0]=(-0.591902790978)*x[0]**o+(-0.151826578123)*x[0]+(0.923906788219)*x[1]**o+(0.301090558476)*x[1]+(-0.518314647811)*x[2]**o+(-0.784331717681)*x[2]
-        arg[1,4,2,1]=(0.303567440092)*x[0]**o+(0.744948852961)*x[0]+(0.719939071212)*x[1]**o+(-0.161138638319)*x[1]+(0.924953261766)*x[2]**o+(-0.875565390131)*x[2]
-        arg[2,0,0,0]=(0.197574550087)*x[0]**o+(-0.962018785397)*x[0]+(0.498378037582)*x[1]**o+(-0.334199169606)*x[1]+(0.852426750588)*x[2]**o+(-0.650173474618)*x[2]
-        arg[2,0,0,1]=(0.0663499012532)*x[0]**o+(0.00812461763474)*x[0]+(0.237233309304)*x[1]**o+(-0.839377881658)*x[1]+(-0.67246872567)*x[2]**o+(0.677471261363)*x[2]
-        arg[2,0,1,0]=(-0.789090971877)*x[0]**o+(-0.387724517273)*x[0]+(0.455954877641)*x[1]**o+(-0.356995254842)*x[1]+(-0.897019846935)*x[2]**o+(-0.0703543939474)*x[2]
-        arg[2,0,1,1]=(0.222873274437)*x[0]**o+(0.405228982254)*x[0]+(-0.532697993554)*x[1]**o+(-0.836340143789)*x[1]+(-0.139525062661)*x[2]**o+(-0.916307770461)*x[2]
-        arg[2,0,2,0]=(-0.300828039715)*x[0]**o+(-0.584457605313)*x[0]+(-0.443125109903)*x[1]**o+(0.292734004842)*x[1]+(-0.55875691535)*x[2]**o+(0.391237822545)*x[2]
-        arg[2,0,2,1]=(-0.501507304569)*x[0]**o+(-0.203549089015)*x[0]+(-0.113050138121)*x[1]**o+(0.712978728546)*x[1]+(-0.642617274635)*x[2]**o+(-0.307119076865)*x[2]
-        arg[2,1,0,0]=(-0.809237327867)*x[0]**o+(0.984684980548)*x[0]+(-0.643310231704)*x[1]**o+(0.759430082065)*x[1]+(-0.393902220205)*x[2]**o+(-0.900173371318)*x[2]
-        arg[2,1,0,1]=(-0.722795722506)*x[0]**o+(0.433309366611)*x[0]+(-0.559871890844)*x[1]**o+(0.417301432603)*x[1]+(-0.364192390887)*x[2]**o+(0.64549736058)*x[2]
-        arg[2,1,1,0]=(-0.551325611251)*x[0]**o+(-0.638520772682)*x[0]+(0.222655558982)*x[1]**o+(-0.230002147207)*x[1]+(-0.290821163957)*x[2]**o+(0.0647728628594)*x[2]
-        arg[2,1,1,1]=(0.743453045588)*x[0]**o+(-0.901163108996)*x[0]+(-0.546031302921)*x[1]**o+(-0.512614476111)*x[1]+(-0.886430682715)*x[2]**o+(0.720650678026)*x[2]
-        arg[2,1,2,0]=(-0.033787671958)*x[0]**o+(0.930927279443)*x[0]+(-0.530482747719)*x[1]**o+(0.714053784656)*x[1]+(-0.0978565618487)*x[2]**o+(-0.0423072209447)*x[2]
-        arg[2,1,2,1]=(0.127121989623)*x[0]**o+(0.809654796091)*x[0]+(0.718533701795)*x[1]**o+(0.542738494557)*x[1]+(-0.342918607246)*x[2]**o+(-0.627991145352)*x[2]
-        arg[2,2,0,0]=(-0.867530011926)*x[0]**o+(0.870295856967)*x[0]+(-0.13043222912)*x[1]**o+(0.2670058777)*x[1]+(0.395016123247)*x[2]**o+(-0.811207959629)*x[2]
-        arg[2,2,0,1]=(-0.00858729113056)*x[0]**o+(-0.885551110851)*x[0]+(0.820441870015)*x[1]**o+(-0.348896120549)*x[1]+(0.295475751596)*x[2]**o+(-0.672688762902)*x[2]
-        arg[2,2,1,0]=(-0.982123891355)*x[0]**o+(0.232770408062)*x[0]+(0.374641341895)*x[1]**o+(-0.21375197203)*x[1]+(0.436992590849)*x[2]**o+(-0.473399371298)*x[2]
-        arg[2,2,1,1]=(-0.415533190881)*x[0]**o+(0.0945615271507)*x[0]+(-0.281959759072)*x[1]**o+(0.0807942449559)*x[1]+(0.225501997354)*x[2]**o+(0.305247648387)*x[2]
-        arg[2,2,2,0]=(-0.559916632426)*x[0]**o+(-0.372679495574)*x[0]+(0.392857820158)*x[1]**o+(0.726824319268)*x[1]+(0.36923535014)*x[2]**o+(-0.208169256022)*x[2]
-        arg[2,2,2,1]=(-0.869055045156)*x[0]**o+(0.359188490398)*x[0]+(0.702110073265)*x[1]**o+(0.668757858248)*x[1]+(-0.499300337779)*x[2]**o+(0.0471054271112)*x[2]
-        arg[2,3,0,0]=(0.754089271004)*x[0]**o+(-0.0240479506036)*x[0]+(-0.0775830745475)*x[1]**o+(0.215564363064)*x[1]+(-0.791969192801)*x[2]**o+(-0.130308630692)*x[2]
-        arg[2,3,0,1]=(0.448970570476)*x[0]**o+(0.510346880872)*x[0]+(-0.561996764085)*x[1]**o+(0.217897696493)*x[1]+(-0.0610826665756)*x[2]**o+(0.387896322636)*x[2]
-        arg[2,3,1,0]=(0.737635683404)*x[0]**o+(-0.35395540781)*x[0]+(0.0419652573208)*x[1]**o+(-0.519735381528)*x[1]+(0.739523085214)*x[2]**o+(0.808529094094)*x[2]
-        arg[2,3,1,1]=(0.551348499194)*x[0]**o+(-0.40145493368)*x[0]+(0.211723169473)*x[1]**o+(-0.762751144824)*x[1]+(-0.17710033067)*x[2]**o+(0.688961224051)*x[2]
-        arg[2,3,2,0]=(-0.870721462645)*x[0]**o+(-0.0356869329313)*x[0]+(0.277142920424)*x[1]**o+(-0.154474999666)*x[1]+(0.837001124911)*x[2]**o+(-0.233028214567)*x[2]
-        arg[2,3,2,1]=(-0.234260935528)*x[0]**o+(0.913718165996)*x[0]+(0.385678747942)*x[1]**o+(0.237966356277)*x[1]+(0.382072927695)*x[2]**o+(0.627666395757)*x[2]
-        arg[2,4,0,0]=(-0.474674316363)*x[0]**o+(-0.575533683959)*x[0]+(0.751489557666)*x[1]**o+(-0.0623565445313)*x[1]+(-0.517274743843)*x[2]**o+(-0.712143034168)*x[2]
-        arg[2,4,0,1]=(0.259723799797)*x[0]**o+(0.345952822815)*x[0]+(0.169940774832)*x[1]**o+(-0.185154259609)*x[1]+(0.418430344681)*x[2]**o+(0.861837327531)*x[2]
-        arg[2,4,1,0]=(-0.960970748682)*x[0]**o+(0.842706511282)*x[0]+(-0.771779045108)*x[1]**o+(-0.63675621795)*x[1]+(-0.317416556239)*x[2]**o+(0.287317968341)*x[2]
-        arg[2,4,1,1]=(-0.753944077832)*x[0]**o+(0.570245260805)*x[0]+(-0.0226797611003)*x[1]**o+(0.0776773843077)*x[1]+(0.629536717673)*x[2]**o+(0.271216337699)*x[2]
-        arg[2,4,2,0]=(-0.233304828171)*x[0]**o+(-0.217436697538)*x[0]+(-0.373618121496)*x[1]**o+(-0.342584906659)*x[1]+(0.0114484228954)*x[2]**o+(-0.639753178531)*x[2]
-        arg[2,4,2,1]=(0.341373328517)*x[0]**o+(-0.432795268788)*x[0]+(-0.871263113926)*x[1]**o+(0.843590946949)*x[1]+(-0.653058566267)*x[2]**o+(-0.894366240333)*x[2]
-        arg[3,0,0,0]=(-0.472652289489)*x[0]**o+(0.697119499826)*x[0]+(-0.195781503945)*x[1]**o+(-0.716872496009)*x[1]+(-0.159070341485)*x[2]**o+(-0.700548071467)*x[2]
-        arg[3,0,0,1]=(-0.398674023611)*x[0]**o+(-0.690683017472)*x[0]+(0.957112237189)*x[1]**o+(-0.782702815224)*x[1]+(-0.249336230999)*x[2]**o+(0.22734983387)*x[2]
-        arg[3,0,1,0]=(-0.0216721345971)*x[0]**o+(0.283765576696)*x[0]+(-0.35531833417)*x[1]**o+(0.974402352836)*x[1]+(-0.568820213603)*x[2]**o+(0.957610279127)*x[2]
-        arg[3,0,1,1]=(0.0606265274442)*x[0]**o+(-0.941169961629)*x[0]+(0.804902933622)*x[1]**o+(-0.857158317629)*x[1]+(-0.227167312547)*x[2]**o+(0.945175823328)*x[2]
-        arg[3,0,2,0]=(0.630444608821)*x[0]**o+(-0.192343222551)*x[0]+(0.0342249337232)*x[1]**o+(0.970401334961)*x[1]+(-0.608568046213)*x[2]**o+(-0.539374299133)*x[2]
-        arg[3,0,2,1]=(-0.348127940577)*x[0]**o+(-0.895424161569)*x[0]+(0.918173840926)*x[1]**o+(0.99658998821)*x[1]+(-0.28733372377)*x[2]**o+(-0.516441029544)*x[2]
-        arg[3,1,0,0]=(0.735069593965)*x[0]**o+(-0.727899981109)*x[0]+(-0.325639355247)*x[1]**o+(0.751064830331)*x[1]+(-0.297126073245)*x[2]**o+(-0.673421779764)*x[2]
-        arg[3,1,0,1]=(0.00281719106153)*x[0]**o+(0.246929980679)*x[0]+(-0.48091940116)*x[1]**o+(0.501927059357)*x[1]+(-0.520099802736)*x[2]**o+(-0.902706012118)*x[2]
-        arg[3,1,1,0]=(-0.341732637339)*x[0]**o+(-0.169802234575)*x[0]+(0.156725375114)*x[1]**o+(0.739176104936)*x[1]+(-0.374572295196)*x[2]**o+(-0.436641001832)*x[2]
-        arg[3,1,1,1]=(0.644746847185)*x[0]**o+(-0.992126325722)*x[0]+(0.551602368714)*x[1]**o+(-0.839306768893)*x[1]+(-0.298981617653)*x[2]**o+(0.089795271605)*x[2]
-        arg[3,1,2,0]=(0.382425223801)*x[0]**o+(-0.949095041278)*x[0]+(-0.135997266858)*x[1]**o+(-0.871114033611)*x[1]+(-0.422984170709)*x[2]**o+(-0.698818784989)*x[2]
-        arg[3,1,2,1]=(0.630558573276)*x[0]**o+(0.90644556976)*x[0]+(0.512953870249)*x[1]**o+(-0.58514271049)*x[1]+(-0.0587225891088)*x[2]**o+(-0.390796465925)*x[2]
-        arg[3,2,0,0]=(-0.404884771697)*x[0]**o+(-0.178144326223)*x[0]+(-0.606503995405)*x[1]**o+(0.190025878248)*x[1]+(0.735831203504)*x[2]**o+(-0.567394607398)*x[2]
-        arg[3,2,0,1]=(0.28819895431)*x[0]**o+(0.456573144203)*x[0]+(0.00856899200079)*x[1]**o+(0.547827005333)*x[1]+(0.087428132552)*x[2]**o+(0.759650060552)*x[2]
-        arg[3,2,1,0]=(0.949790710961)*x[0]**o+(-0.685602682574)*x[0]+(0.75278809536)*x[1]**o+(-0.876689834021)*x[1]+(0.0116394079709)*x[2]**o+(0.319113513167)*x[2]
-        arg[3,2,1,1]=(0.619659549755)*x[0]**o+(-0.397388124185)*x[0]+(0.460679661901)*x[1]**o+(-0.507122241204)*x[1]+(0.985741194076)*x[2]**o+(0.916231863626)*x[2]
-        arg[3,2,2,0]=(-0.457269257294)*x[0]**o+(-0.47265466694)*x[0]+(0.900051837969)*x[1]**o+(-0.148802803439)*x[1]+(-0.195540487054)*x[2]**o+(0.0784524130754)*x[2]
-        arg[3,2,2,1]=(0.933553130797)*x[0]**o+(0.617362831046)*x[0]+(0.263616954879)*x[1]**o+(-0.0658887625105)*x[1]+(0.48091174024)*x[2]**o+(0.452935484504)*x[2]
-        arg[3,3,0,0]=(0.825594594128)*x[0]**o+(0.350203407373)*x[0]+(0.211125321741)*x[1]**o+(0.194914147746)*x[1]+(-0.639432220749)*x[2]**o+(-0.678718852935)*x[2]
-        arg[3,3,0,1]=(0.514394313629)*x[0]**o+(-0.595261005308)*x[0]+(-0.0219208527235)*x[1]**o+(-0.77204975709)*x[1]+(-0.483587370025)*x[2]**o+(-0.559464911044)*x[2]
-        arg[3,3,1,0]=(0.821240511475)*x[0]**o+(-0.403492177329)*x[0]+(0.486132478046)*x[1]**o+(-0.0187529457547)*x[1]+(0.73209003456)*x[2]**o+(0.226791335797)*x[2]
-        arg[3,3,1,1]=(-0.644256768839)*x[0]**o+(0.0372588784686)*x[0]+(0.726561650796)*x[1]**o+(0.518003809017)*x[1]+(0.738146681601)*x[2]**o+(-0.256036433171)*x[2]
-        arg[3,3,2,0]=(0.534862520097)*x[0]**o+(0.275559826342)*x[0]+(0.292383677513)*x[1]**o+(-0.448938027415)*x[1]+(0.281053776971)*x[2]**o+(0.0119964402657)*x[2]
-        arg[3,3,2,1]=(0.722071427786)*x[0]**o+(0.150280744346)*x[0]+(-0.0354786178164)*x[1]**o+(-0.703984035201)*x[1]+(0.105365795033)*x[2]**o+(-0.556567650379)*x[2]
-        arg[3,4,0,0]=(0.188625467698)*x[0]**o+(0.737108753179)*x[0]+(0.481952725951)*x[1]**o+(0.841958412185)*x[1]+(-0.329504392569)*x[2]**o+(0.228456367852)*x[2]
-        arg[3,4,0,1]=(0.181430484096)*x[0]**o+(0.307078178179)*x[0]+(0.262079226853)*x[1]**o+(0.111656765153)*x[1]+(0.15340094176)*x[2]**o+(-0.859774252333)*x[2]
-        arg[3,4,1,0]=(0.213491785855)*x[0]**o+(-0.479441582203)*x[0]+(0.0527576231613)*x[1]**o+(0.328465118263)*x[1]+(-0.645719217198)*x[2]**o+(-0.550569446193)*x[2]
-        arg[3,4,1,1]=(-0.401744411188)*x[0]**o+(-0.626446165761)*x[0]+(-0.191670239416)*x[1]**o+(0.866888407009)*x[1]+(-0.341220740645)*x[2]**o+(-0.742685031762)*x[2]
-        arg[3,4,2,0]=(-0.0813611687514)*x[0]**o+(0.318680684889)*x[0]+(-0.780434724843)*x[1]**o+(-0.0902735483921)*x[1]+(0.586108990767)*x[2]**o+(0.934041577436)*x[2]
-        arg[3,4,2,1]=(-0.0991425040958)*x[0]**o+(0.99274076773)*x[0]+(0.924248544389)*x[1]**o+(0.290576034321)*x[1]+(0.452104871421)*x[2]**o+(0.774017129246)*x[2]
-        ref[0,0,0,0]=(-0.445809185937)/(o+1.)+(-0.11049649315)+(0.480896043196)*0.5**o
-        ref[0,0,0,1]=(-0.776476434405)/(o+1.)+(-0.842010629213)+(-0.609632888023)*0.5**o
-        ref[0,0,1,0]=(0.182977545138)/(o+1.)+(-0.124558039762)+(0.205065167181)*0.5**o
-        ref[0,0,1,1]=(-1.17104760039)/(o+1.)+(0.608297882891)+(0.875716461075)*0.5**o
-        ref[0,0,2,0]=(0.647678117252)/(o+1.)+(-0.752248832131)+(0.711372030289)*0.5**o
-        ref[0,0,2,1]=(-0.0424453226222)/(o+1.)+(0.152363855976)+(-0.0536842545617)*0.5**o
-        ref[0,1,0,0]=(-0.97072557194)/(o+1.)+(0.355747795628)+(-0.710091748251)*0.5**o
-        ref[0,1,0,1]=(1.54210036269)/(o+1.)+(-0.0605096710259)+(0.250989366649)*0.5**o
-        ref[0,1,1,0]=(1.33375575444)/(o+1.)+(-0.237134583454)+(0.690360096543)*0.5**o
-        ref[0,1,1,1]=(0.0771949345448)/(o+1.)+(-0.00507329027461)+(-0.815220933301)*0.5**o
-        ref[0,1,2,0]=(-0.149444846314)/(o+1.)+(-0.226886808857)+(0.169442617085)*0.5**o
-        ref[0,1,2,1]=(0.114952830564)/(o+1.)+(-0.613038537369)+(-0.110636656112)*0.5**o
-        ref[0,2,0,0]=(-0.0135089970172)/(o+1.)+(-0.104741016697)+(0.340661037085)*0.5**o
-        ref[0,2,0,1]=(0.877950660854)/(o+1.)+(-0.395230122376)+(0.185282186176)*0.5**o
-        ref[0,2,1,0]=(0.247984803771)/(o+1.)+(-0.35022317362)+(0.238772787004)*0.5**o
-        ref[0,2,1,1]=(0.545513935627)/(o+1.)+(0.499096411763)+(-0.175884373587)*0.5**o
-        ref[0,2,2,0]=(-1.82248899593)/(o+1.)+(0.90641347096)+(-0.615695203188)*0.5**o
-        ref[0,2,2,1]=(0.384039454422)/(o+1.)+(-0.418573857307)+(-0.0992379560876)*0.5**o
-        ref[0,3,0,0]=(0.401014281541)/(o+1.)+(0.0980709839284)+(0.432415072474)*0.5**o
-        ref[0,3,0,1]=(-0.842943301759)/(o+1.)+(0.314943473548)+(-0.656397468061)*0.5**o
-        ref[0,3,1,0]=(0.54561755931)/(o+1.)+(0.00554262549843)+(-0.472896985897)*0.5**o
-        ref[0,3,1,1]=(0.651968521189)/(o+1.)+(0.534519988855)+(-0.515568063685)*0.5**o
-        ref[0,3,2,0]=(1.21411446919)/(o+1.)+(0.334629245453)+(-0.709802317012)*0.5**o
-        ref[0,3,2,1]=(1.57603080404)/(o+1.)+(0.123258042212)+(-0.20057625974)*0.5**o
-        ref[0,4,0,0]=(-0.318228722361)/(o+1.)+(0.248490822109)+(-0.726921583373)*0.5**o
-        ref[0,4,0,1]=(-0.785890130085)/(o+1.)+(-0.445201603538)+(0.765272127757)*0.5**o
-        ref[0,4,1,0]=(-0.926447863334)/(o+1.)+(0.111991361885)+(-0.613269202518)*0.5**o
-        ref[0,4,1,1]=(1.51953463824)/(o+1.)+(-0.283879690312)+(-0.727485674691)*0.5**o
-        ref[0,4,2,0]=(-1.08165630338)/(o+1.)+(0.520653193096)+(-0.663071984573)*0.5**o
-        ref[0,4,2,1]=(1.28376782528)/(o+1.)+(0.135152679989)+(0.893396132015)*0.5**o
-        ref[1,0,0,0]=(0.12071022058)/(o+1.)+(-0.35786297592)+(-0.0771632829864)*0.5**o
-        ref[1,0,0,1]=(-1.72034668123)/(o+1.)+(1.18881923454)+(0.133617787097)*0.5**o
-        ref[1,0,1,0]=(-1.7448609294)/(o+1.)+(-0.110381196284)+(0.174277385391)*0.5**o
-        ref[1,0,1,1]=(-0.906474149485)/(o+1.)+(-0.164529387192)+(0.795443369588)*0.5**o
-        ref[1,0,2,0]=(0.0119437343259)/(o+1.)+(-0.676075658316)+(0.482814141263)*0.5**o
-        ref[1,0,2,1]=(0.411591741576)/(o+1.)+(-0.419934815512)+(0.619359374773)*0.5**o
-        ref[1,1,0,0]=(0.508884440665)/(o+1.)+(-0.858881203437)+(-0.510375454058)*0.5**o
-        ref[1,1,0,1]=(0.519297551522)/(o+1.)+(0.647377411012)+(-0.302705575836)*0.5**o
-        ref[1,1,1,0]=(0.101621725999)/(o+1.)+(0.763621416728)+(0.520882033451)*0.5**o
-        ref[1,1,1,1]=(0.447372581166)/(o+1.)+(-0.27141635646)+(0.624622427594)*0.5**o
-        ref[1,1,2,0]=(1.54807073071)/(o+1.)+(0.865521741121)+(-0.044254701409)*0.5**o
-        ref[1,1,2,1]=(-0.954794849015)/(o+1.)+(0.616890655954)+(-0.240571107795)*0.5**o
-        ref[1,2,0,0]=(-0.0138637151804)/(o+1.)+(-0.23836886811)+(0.0596937021722)*0.5**o
-        ref[1,2,0,1]=(0.587416875871)/(o+1.)+(0.316160501623)+(-0.935541542647)*0.5**o
-        ref[1,2,1,0]=(-0.0269069617163)/(o+1.)+(1.16051668573)+(0.276741406646)*0.5**o
-        ref[1,2,1,1]=(-1.65286742406)/(o+1.)+(0.626473409767)+(0.828731604537)*0.5**o
-        ref[1,2,2,0]=(-0.106399305507)/(o+1.)+(0.156612816333)+(-0.380797583569)*0.5**o
-        ref[1,2,2,1]=(-0.0588949726984)/(o+1.)+(-0.666712330202)+(0.257022926473)*0.5**o
-        ref[1,3,0,0]=(-0.500235779047)/(o+1.)+(-0.278704142234)+(-0.645340088797)*0.5**o
-        ref[1,3,0,1]=(0.100788411199)/(o+1.)+(-0.158633910442)+(0.124132693667)*0.5**o
-        ref[1,3,1,0]=(0.824541289962)/(o+1.)+(0.17530886621)+(-0.7660131868)*0.5**o
-        ref[1,3,1,1]=(-0.331589329951)/(o+1.)+(0.0509573421542)+(-0.150578257351)*0.5**o
-        ref[1,3,2,0]=(-0.224033577887)/(o+1.)+(0.775397193106)+(-0.336661555676)*0.5**o
-        ref[1,3,2,1]=(-0.0921229181433)/(o+1.)+(0.15790296452)+(0.165928745462)*0.5**o
-        ref[1,4,0,0]=(-1.13149949621)/(o+1.)+(-0.0663729445879)+(0.283586653542)*0.5**o
-        ref[1,4,0,1]=(-0.722886434731)/(o+1.)+(0.104888434522)+(-0.772849835334)*0.5**o
-        ref[1,4,1,0]=(-1.44885259324)/(o+1.)+(-0.617668613405)+(-0.718524564964)*0.5**o
-        ref[1,4,1,1]=(-0.725759098745)/(o+1.)+(-0.519223986923)+(-0.771664154234)*0.5**o
-        ref[1,4,2,0]=(0.405592140408)/(o+1.)+(-0.317533868664)+(-0.591902790978)*0.5**o
-        ref[1,4,2,1]=(1.64489233298)/(o+1.)+(-0.145877587744)+(0.303567440092)*0.5**o
-        ref[2,0,0,0]=(1.35080478817)/(o+1.)+(-0.97319571481)+(0.197574550087)*0.5**o
-        ref[2,0,0,1]=(-0.435235416366)/(o+1.)+(-0.0768910013301)+(0.0663499012532)*0.5**o
-        ref[2,0,1,0]=(-0.441064969294)/(o+1.)+(-0.407537083031)+(-0.789090971877)*0.5**o
-        ref[2,0,1,1]=(-0.672223056216)/(o+1.)+(-0.673709465998)+(0.222873274437)*0.5**o
-        ref[2,0,2,0]=(-1.00188202525)/(o+1.)+(0.0497571110368)+(-0.300828039715)*0.5**o
-        ref[2,0,2,1]=(-0.755667412756)/(o+1.)+(0.101155281333)+(-0.501507304569)*0.5**o
-        ref[2,1,0,0]=(-1.03721245191)/(o+1.)+(0.421970845648)+(-0.809237327867)*0.5**o
-        ref[2,1,0,1]=(-0.924064281731)/(o+1.)+(0.748054079897)+(-0.722795722506)*0.5**o
-        ref[2,1,1,0]=(-0.0681656049743)/(o+1.)+(-0.401875028515)+(-0.551325611251)*0.5**o
-        ref[2,1,1,1]=(-1.43246198564)/(o+1.)+(-0.346563453541)+(0.743453045588)*0.5**o
-        ref[2,1,2,0]=(-0.628339309568)/(o+1.)+(0.801336921577)+(-0.033787671958)*0.5**o
-        ref[2,1,2,1]=(0.375615094549)/(o+1.)+(0.362201072648)+(0.127121989623)*0.5**o
-        ref[2,2,0,0]=(0.264583894127)/(o+1.)+(0.163046887519)+(-0.867530011926)*0.5**o
-        ref[2,2,0,1]=(1.11591762161)/(o+1.)+(-0.953567997151)+(-0.00858729113056)*0.5**o
-        ref[2,2,1,0]=(0.811633932744)/(o+1.)+(-0.227190467633)+(-0.982123891355)*0.5**o
-        ref[2,2,1,1]=(-0.0564577617182)/(o+1.)+(0.240301710247)+(-0.415533190881)*0.5**o
-        ref[2,2,2,0]=(0.762093170298)/(o+1.)+(0.072987783836)+(-0.559916632426)*0.5**o
-        ref[2,2,2,1]=(0.202809735486)/(o+1.)+(0.537525887878)+(-0.869055045156)*0.5**o
-        ref[2,3,0,0]=(-0.869552267348)/(o+1.)+(0.0306038908843)+(0.754089271004)*0.5**o
-        ref[2,3,0,1]=(-0.62307943066)/(o+1.)+(0.55807045)+(0.448970570476)*0.5**o
-        ref[2,3,1,0]=(0.781488342534)/(o+1.)+(-0.0325808476221)+(0.737635683404)*0.5**o
-        ref[2,3,1,1]=(0.0346228388027)/(o+1.)+(-0.237622427226)+(0.551348499194)*0.5**o
-        ref[2,3,2,0]=(1.11414404534)/(o+1.)+(-0.211595073582)+(-0.870721462645)*0.5**o
-        ref[2,3,2,1]=(0.767751675637)/(o+1.)+(0.889675459015)+(-0.234260935528)*0.5**o
-        ref[2,4,0,0]=(0.234214813823)/(o+1.)+(-0.675016631329)+(-0.474674316363)*0.5**o
-        ref[2,4,0,1]=(0.588371119514)/(o+1.)+(0.511317945368)+(0.259723799797)*0.5**o
-        ref[2,4,1,0]=(-1.08919560135)/(o+1.)+(0.246634130836)+(-0.960970748682)*0.5**o
-        ref[2,4,1,1]=(0.606856956573)/(o+1.)+(0.459569491406)+(-0.753944077832)*0.5**o
-        ref[2,4,2,0]=(-0.3621696986)/(o+1.)+(-0.599887391364)+(-0.233304828171)*0.5**o
-        ref[2,4,2,1]=(-1.52432168019)/(o+1.)+(-0.241785281086)+(0.341373328517)*0.5**o
-        ref[3,0,0,0]=(-0.35485184543)/(o+1.)+(-0.360150533825)+(-0.472652289489)*0.5**o
-        ref[3,0,0,1]=(0.70777600619)/(o+1.)+(-0.623017999413)+(-0.398674023611)*0.5**o
-        ref[3,0,1,0]=(-0.924138547773)/(o+1.)+(1.10788910433)+(-0.0216721345971)*0.5**o
-        ref[3,0,1,1]=(0.577735621075)/(o+1.)+(-0.426576227965)+(0.0606265274442)*0.5**o
-        ref[3,0,2,0]=(-0.57434311249)/(o+1.)+(0.119341906638)+(0.630444608821)*0.5**o
-        ref[3,0,2,1]=(0.630840117156)/(o+1.)+(-0.207637601452)+(-0.348127940577)*0.5**o
-        ref[3,1,0,0]=(-0.622765428492)/(o+1.)+(-0.32512846527)+(0.735069593965)*0.5**o
-        ref[3,1,0,1]=(-1.0010192039)/(o+1.)+(-0.076924486041)+(0.00281719106153)*0.5**o
-        ref[3,1,1,0]=(-0.217846920082)/(o+1.)+(0.0663664342643)+(-0.341732637339)*0.5**o
-        ref[3,1,1,1]=(0.25262075106)/(o+1.)+(-0.870818911505)+(0.644746847185)*0.5**o
-        ref[3,1,2,0]=(-0.558981437567)/(o+1.)+(-1.25951392994)+(0.382425223801)*0.5**o
-        ref[3,1,2,1]=(0.454231281141)/(o+1.)+(-0.034746803327)+(0.630558573276)*0.5**o
-        ref[3,2,0,0]=(0.129327208099)/(o+1.)+(-0.277756527686)+(-0.404884771697)*0.5**o
-        ref[3,2,0,1]=(0.0959971245528)/(o+1.)+(0.882025105044)+(0.28819895431)*0.5**o
-        ref[3,2,1,0]=(0.764427503331)/(o+1.)+(-0.621589501714)+(0.949790710961)*0.5**o
-        ref[3,2,1,1]=(1.44642085598)/(o+1.)+(0.00586074911794)+(0.619659549755)*0.5**o
-        ref[3,2,2,0]=(0.704511350915)/(o+1.)+(-0.271502528652)+(-0.457269257294)*0.5**o
-        ref[3,2,2,1]=(0.744528695119)/(o+1.)+(0.50220477652)+(0.933553130797)*0.5**o
-        ref[3,3,0,0]=(-0.428306899008)/(o+1.)+(-0.0668006489082)+(0.825594594128)*0.5**o
-        ref[3,3,0,1]=(-0.505508222749)/(o+1.)+(-0.963387836721)+(0.514394313629)*0.5**o
-        ref[3,3,1,0]=(1.21822251261)/(o+1.)+(-0.0977268936434)+(0.821240511475)*0.5**o
-        ref[3,3,1,1]=(1.4647083324)/(o+1.)+(0.149613127157)+(-0.644256768839)*0.5**o
-        ref[3,3,2,0]=(0.573437454483)/(o+1.)+(-0.0806908804035)+(0.534862520097)*0.5**o
-        ref[3,3,2,1]=(0.069887177217)/(o+1.)+(-0.555135470617)+(0.722071427786)*0.5**o
-        ref[3,4,0,0]=(0.152448333383)/(o+1.)+(0.903761766608)+(0.188625467698)*0.5**o
-        ref[3,4,0,1]=(0.415480168613)/(o+1.)+(-0.220519654501)+(0.181430484096)*0.5**o
-        ref[3,4,1,0]=(-0.592961594036)/(o+1.)+(-0.350772955066)+(0.213491785855)*0.5**o
-        ref[3,4,1,1]=(-0.532890980061)/(o+1.)+(-0.251121395257)+(-0.401744411188)*0.5**o
-        ref[3,4,2,0]=(-0.194325734076)/(o+1.)+(0.581224356966)+(-0.0813611687514)*0.5**o
-        ref[3,4,2,1]=(1.37635341581)/(o+1.)+(1.02866696565)+(-0.0991425040958)*0.5**o
-      res=integrate(arg)
-      self.assertTrue(isinstance(res,numpy.ndarray),"wrong type of result.")
-      self.assertEqual(res.shape,(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.492060381705)*x[0]**o+(0.578791868713)*x[0]+(-0.439849757114)*x[1]**o+(-0.52629328967)*x[1]
-        ref=(0.492060381705)*x_ref[0]**o+(0.578791868713)*x_ref[0]+(-0.439849757114)*x_ref[1]**o+(-0.52629328967)*x_ref[1]
-      else:
-        arg=(0.954737963273)*x[0]**o+(0.452578946878)*x[0]+(0.0471085060698)*x[1]**o+(-0.640169119832)*x[1]+(0.710401490627)*x[2]**o+(-0.382589884739)*x[2]
-        ref=(0.954737963273)*x_ref[0]**o+(0.452578946878)*x_ref[0]+(0.0471085060698)*x_ref[1]**o+(-0.640169119832)*x_ref[1]+(0.710401490627)*x_ref[2]**o+(-0.382589884739)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.59604585527)*x[0]**o+(0.826981169401)*x[0]+(0.227617349484)*x[1]**o+(0.184907819029)*x[1]
-        arg[1]=(-0.424684036731)*x[0]**o+(0.346537997905)*x[0]+(0.891921272597)*x[1]**o+(-0.145924182872)*x[1]
-        ref[0]=(-0.59604585527)*x_ref[0]**o+(0.826981169401)*x_ref[0]+(0.227617349484)*x_ref[1]**o+(0.184907819029)*x_ref[1]
-        ref[1]=(-0.424684036731)*x_ref[0]**o+(0.346537997905)*x_ref[0]+(0.891921272597)*x_ref[1]**o+(-0.145924182872)*x_ref[1]
-      else:
-        arg[0]=(0.777228173978)*x[0]**o+(-0.812215827155)*x[0]+(-0.618922680968)*x[1]**o+(0.0660312103206)*x[1]+(-0.917545504466)*x[2]**o+(0.988524619414)*x[2]
-        arg[1]=(0.110219469565)*x[0]**o+(-0.441866866062)*x[0]+(-0.654447764335)*x[1]**o+(0.230716133289)*x[1]+(0.347487317165)*x[2]**o+(-0.948877903043)*x[2]
-        ref[0]=(0.777228173978)*x_ref[0]**o+(-0.812215827155)*x_ref[0]+(-0.618922680968)*x_ref[1]**o+(0.0660312103206)*x_ref[1]+(-0.917545504466)*x_ref[2]**o+(0.988524619414)*x_ref[2]
-        ref[1]=(0.110219469565)*x_ref[0]**o+(-0.441866866062)*x_ref[0]+(-0.654447764335)*x_ref[1]**o+(0.230716133289)*x_ref[1]+(0.347487317165)*x_ref[2]**o+(-0.948877903043)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.958809754913)*x[0]**o+(-0.844717049041)*x[0]+(0.462564514427)*x[1]**o+(-0.247678335594)*x[1]
-        arg[0,1]=(0.700700054189)*x[0]**o+(-0.653724611457)*x[0]+(0.52659177803)*x[1]**o+(-0.387559446418)*x[1]
-        arg[0,2]=(-0.326124300134)*x[0]**o+(0.115197897152)*x[0]+(-0.876340641846)*x[1]**o+(0.433060472581)*x[1]
-        arg[0,3]=(-0.101215736407)*x[0]**o+(-0.483684510661)*x[0]+(0.0418770907036)*x[1]**o+(-0.845564414421)*x[1]
-        arg[0,4]=(-0.293094855718)*x[0]**o+(0.710954930773)*x[0]+(0.238671713869)*x[1]**o+(0.576638343412)*x[1]
-        arg[1,0]=(0.529861280122)*x[0]**o+(-0.259437904048)*x[0]+(-0.620725288158)*x[1]**o+(0.326787999382)*x[1]
-        arg[1,1]=(0.421245543012)*x[0]**o+(-0.954139636698)*x[0]+(0.0498199734926)*x[1]**o+(0.24010238499)*x[1]
-        arg[1,2]=(0.333362362373)*x[0]**o+(-0.999953175952)*x[0]+(0.866193849246)*x[1]**o+(0.764287410177)*x[1]
-        arg[1,3]=(0.470415957539)*x[0]**o+(-0.133477966871)*x[0]+(-0.0416970809832)*x[1]**o+(-0.416352740444)*x[1]
-        arg[1,4]=(-0.178613018492)*x[0]**o+(-0.967264985978)*x[0]+(-0.297102423687)*x[1]**o+(0.884184973413)*x[1]
-        arg[2,0]=(-0.29363453294)*x[0]**o+(-0.0237360594862)*x[0]+(-0.300776450747)*x[1]**o+(-0.493932721521)*x[1]
-        arg[2,1]=(0.795045745699)*x[0]**o+(0.984956851154)*x[0]+(-0.724208405235)*x[1]**o+(0.59029067239)*x[1]
-        arg[2,2]=(-0.803012112531)*x[0]**o+(-0.831727785428)*x[0]+(0.330295112332)*x[1]**o+(0.0966317908147)*x[1]
-        arg[2,3]=(-0.652332429144)*x[0]**o+(-0.38689457016)*x[0]+(-0.391780825295)*x[1]**o+(-0.444284790848)*x[1]
-        arg[2,4]=(0.416775161398)*x[0]**o+(-0.16281006536)*x[0]+(-0.742938932867)*x[1]**o+(0.456486183714)*x[1]
-        arg[3,0]=(0.506731632086)*x[0]**o+(-0.222468320035)*x[0]+(-0.906398223556)*x[1]**o+(-0.0250630448611)*x[1]
-        arg[3,1]=(-0.39207398783)*x[0]**o+(-0.574739374252)*x[0]+(0.262101584569)*x[1]**o+(0.249587535087)*x[1]
-        arg[3,2]=(-0.252593913503)*x[0]**o+(-0.864294052989)*x[0]+(0.0110434296336)*x[1]**o+(-0.224585040999)*x[1]
-        arg[3,3]=(-0.631704469212)*x[0]**o+(-0.495153785048)*x[0]+(-0.304420746672)*x[1]**o+(-0.254005222021)*x[1]
-        arg[3,4]=(0.775631055421)*x[0]**o+(0.370095409961)*x[0]+(0.894627612994)*x[1]**o+(-0.329716708629)*x[1]
-        ref[0,0]=(-0.958809754913)*x_ref[0]**o+(-0.844717049041)*x_ref[0]+(0.462564514427)*x_ref[1]**o+(-0.247678335594)*x_ref[1]
-        ref[0,1]=(0.700700054189)*x_ref[0]**o+(-0.653724611457)*x_ref[0]+(0.52659177803)*x_ref[1]**o+(-0.387559446418)*x_ref[1]
-        ref[0,2]=(-0.326124300134)*x_ref[0]**o+(0.115197897152)*x_ref[0]+(-0.876340641846)*x_ref[1]**o+(0.433060472581)*x_ref[1]
-        ref[0,3]=(-0.101215736407)*x_ref[0]**o+(-0.483684510661)*x_ref[0]+(0.0418770907036)*x_ref[1]**o+(-0.845564414421)*x_ref[1]
-        ref[0,4]=(-0.293094855718)*x_ref[0]**o+(0.710954930773)*x_ref[0]+(0.238671713869)*x_ref[1]**o+(0.576638343412)*x_ref[1]
-        ref[1,0]=(0.529861280122)*x_ref[0]**o+(-0.259437904048)*x_ref[0]+(-0.620725288158)*x_ref[1]**o+(0.326787999382)*x_ref[1]
-        ref[1,1]=(0.421245543012)*x_ref[0]**o+(-0.954139636698)*x_ref[0]+(0.0498199734926)*x_ref[1]**o+(0.24010238499)*x_ref[1]
-        ref[1,2]=(0.333362362373)*x_ref[0]**o+(-0.999953175952)*x_ref[0]+(0.866193849246)*x_ref[1]**o+(0.764287410177)*x_ref[1]
-        ref[1,3]=(0.470415957539)*x_ref[0]**o+(-0.133477966871)*x_ref[0]+(-0.0416970809832)*x_ref[1]**o+(-0.416352740444)*x_ref[1]
-        ref[1,4]=(-0.178613018492)*x_ref[0]**o+(-0.967264985978)*x_ref[0]+(-0.297102423687)*x_ref[1]**o+(0.884184973413)*x_ref[1]
-        ref[2,0]=(-0.29363453294)*x_ref[0]**o+(-0.0237360594862)*x_ref[0]+(-0.300776450747)*x_ref[1]**o+(-0.493932721521)*x_ref[1]
-        ref[2,1]=(0.795045745699)*x_ref[0]**o+(0.984956851154)*x_ref[0]+(-0.724208405235)*x_ref[1]**o+(0.59029067239)*x_ref[1]
-        ref[2,2]=(-0.803012112531)*x_ref[0]**o+(-0.831727785428)*x_ref[0]+(0.330295112332)*x_ref[1]**o+(0.0966317908147)*x_ref[1]
-        ref[2,3]=(-0.652332429144)*x_ref[0]**o+(-0.38689457016)*x_ref[0]+(-0.391780825295)*x_ref[1]**o+(-0.444284790848)*x_ref[1]
-        ref[2,4]=(0.416775161398)*x_ref[0]**o+(-0.16281006536)*x_ref[0]+(-0.742938932867)*x_ref[1]**o+(0.456486183714)*x_ref[1]
-        ref[3,0]=(0.506731632086)*x_ref[0]**o+(-0.222468320035)*x_ref[0]+(-0.906398223556)*x_ref[1]**o+(-0.0250630448611)*x_ref[1]
-        ref[3,1]=(-0.39207398783)*x_ref[0]**o+(-0.574739374252)*x_ref[0]+(0.262101584569)*x_ref[1]**o+(0.249587535087)*x_ref[1]
-        ref[3,2]=(-0.252593913503)*x_ref[0]**o+(-0.864294052989)*x_ref[0]+(0.0110434296336)*x_ref[1]**o+(-0.224585040999)*x_ref[1]
-        ref[3,3]=(-0.631704469212)*x_ref[0]**o+(-0.495153785048)*x_ref[0]+(-0.304420746672)*x_ref[1]**o+(-0.254005222021)*x_ref[1]
-        ref[3,4]=(0.775631055421)*x_ref[0]**o+(0.370095409961)*x_ref[0]+(0.894627612994)*x_ref[1]**o+(-0.329716708629)*x_ref[1]
-      else:
-        arg[0,0]=(0.392450639899)*x[0]**o+(-0.685488230002)*x[0]+(-0.41545928428)*x[1]**o+(0.244144392379)*x[1]+(0.602642156528)*x[2]**o+(-0.348717378461)*x[2]
-        arg[0,1]=(-0.341243165541)*x[0]**o+(-0.616870164204)*x[0]+(-0.510613066362)*x[1]**o+(-0.81387010212)*x[1]+(0.856239691119)*x[2]**o+(0.0744651854239)*x[2]
-        arg[0,2]=(-0.765983413604)*x[0]**o+(0.474551394174)*x[0]+(-0.939524929765)*x[1]**o+(0.418297898065)*x[1]+(0.00589909539531)*x[2]**o+(0.0889012994897)*x[2]
-        arg[0,3]=(-0.521217563352)*x[0]**o+(-0.256316459647)*x[0]+(-0.0265965098379)*x[1]**o+(-0.597562278966)*x[1]+(0.0389151661339)*x[2]**o+(-0.572109451352)*x[2]
-        arg[0,4]=(-0.853801268491)*x[0]**o+(-0.691274812057)*x[0]+(-0.682435618581)*x[1]**o+(-0.974334375359)*x[1]+(-0.642333316794)*x[2]**o+(0.353816751252)*x[2]
-        arg[1,0]=(-0.657545394322)*x[0]**o+(-0.334172338096)*x[0]+(0.016748279459)*x[1]**o+(-0.294858621125)*x[1]+(-0.49403880046)*x[2]**o+(-0.152416774822)*x[2]
-        arg[1,1]=(-0.602731976042)*x[0]**o+(0.685046816545)*x[0]+(0.750001644716)*x[1]**o+(-0.202076972289)*x[1]+(-0.0232888078434)*x[2]**o+(-0.0774477649878)*x[2]
-        arg[1,2]=(-0.707321785527)*x[0]**o+(0.618526464205)*x[0]+(-0.578548442468)*x[1]**o+(-0.411374744442)*x[1]+(-0.944277708787)*x[2]**o+(0.647856975707)*x[2]
-        arg[1,3]=(-0.222503271022)*x[0]**o+(-0.929428092728)*x[0]+(-0.976553212424)*x[1]**o+(0.0376439617084)*x[1]+(0.0428078568512)*x[2]**o+(-0.441850944272)*x[2]
-        arg[1,4]=(-0.862164898455)*x[0]**o+(-0.989900221991)*x[0]+(0.110610844567)*x[1]**o+(0.419384612236)*x[1]+(-0.00271948841262)*x[2]**o+(0.301635101629)*x[2]
-        arg[2,0]=(-0.0950421881942)*x[0]**o+(-0.741293053909)*x[0]+(-0.461538879874)*x[1]**o+(-0.8199842553)*x[1]+(0.0590344916829)*x[2]**o+(0.352541518434)*x[2]
-        arg[2,1]=(-0.734407995647)*x[0]**o+(-0.726167721992)*x[0]+(0.700521229916)*x[1]**o+(0.753555863428)*x[1]+(-0.891638139696)*x[2]**o+(-0.996550711213)*x[2]
-        arg[2,2]=(0.777110352629)*x[0]**o+(0.309719201157)*x[0]+(0.026816547522)*x[1]**o+(0.33161010287)*x[1]+(0.257929504352)*x[2]**o+(0.71871314654)*x[2]
-        arg[2,3]=(-0.0982522143825)*x[0]**o+(0.0532144836415)*x[0]+(0.155895442381)*x[1]**o+(-0.872222127033)*x[1]+(0.810538165596)*x[2]**o+(-0.917071363009)*x[2]
-        arg[2,4]=(0.882674783877)*x[0]**o+(-0.246439463648)*x[0]+(-0.478821457401)*x[1]**o+(-0.629183697296)*x[1]+(0.833283185393)*x[2]**o+(-0.895796651184)*x[2]
-        arg[3,0]=(0.949019461395)*x[0]**o+(0.437511668107)*x[0]+(0.46679355983)*x[1]**o+(0.375391913775)*x[1]+(0.992336073925)*x[2]**o+(0.784847856608)*x[2]
-        arg[3,1]=(0.10730061928)*x[0]**o+(0.624678931808)*x[0]+(-0.105084917663)*x[1]**o+(-0.0650034223387)*x[1]+(-0.271922353868)*x[2]**o+(-0.182967296038)*x[2]
-        arg[3,2]=(0.115856234055)*x[0]**o+(0.711912354922)*x[0]+(-0.317962972122)*x[1]**o+(0.577856092951)*x[1]+(-0.246833922867)*x[2]**o+(0.354116462218)*x[2]
-        arg[3,3]=(0.40937236699)*x[0]**o+(0.639252679403)*x[0]+(0.540206943219)*x[1]**o+(0.287006139758)*x[1]+(0.123311433598)*x[2]**o+(-0.0300672780213)*x[2]
-        arg[3,4]=(-0.190299257713)*x[0]**o+(-0.022055675261)*x[0]+(-0.640751994447)*x[1]**o+(-0.411801947317)*x[1]+(0.0675008125057)*x[2]**o+(-0.659424255203)*x[2]
-        ref[0,0]=(0.392450639899)*x_ref[0]**o+(-0.685488230002)*x_ref[0]+(-0.41545928428)*x_ref[1]**o+(0.244144392379)*x_ref[1]+(0.602642156528)*x_ref[2]**o+(-0.348717378461)*x_ref[2]
-        ref[0,1]=(-0.341243165541)*x_ref[0]**o+(-0.616870164204)*x_ref[0]+(-0.510613066362)*x_ref[1]**o+(-0.81387010212)*x_ref[1]+(0.856239691119)*x_ref[2]**o+(0.0744651854239)*x_ref[2]
-        ref[0,2]=(-0.765983413604)*x_ref[0]**o+(0.474551394174)*x_ref[0]+(-0.939524929765)*x_ref[1]**o+(0.418297898065)*x_ref[1]+(0.00589909539531)*x_ref[2]**o+(0.0889012994897)*x_ref[2]
-        ref[0,3]=(-0.521217563352)*x_ref[0]**o+(-0.256316459647)*x_ref[0]+(-0.0265965098379)*x_ref[1]**o+(-0.597562278966)*x_ref[1]+(0.0389151661339)*x_ref[2]**o+(-0.572109451352)*x_ref[2]
-        ref[0,4]=(-0.853801268491)*x_ref[0]**o+(-0.691274812057)*x_ref[0]+(-0.682435618581)*x_ref[1]**o+(-0.974334375359)*x_ref[1]+(-0.642333316794)*x_ref[2]**o+(0.353816751252)*x_ref[2]
-        ref[1,0]=(-0.657545394322)*x_ref[0]**o+(-0.334172338096)*x_ref[0]+(0.016748279459)*x_ref[1]**o+(-0.294858621125)*x_ref[1]+(-0.49403880046)*x_ref[2]**o+(-0.152416774822)*x_ref[2]
-        ref[1,1]=(-0.602731976042)*x_ref[0]**o+(0.685046816545)*x_ref[0]+(0.750001644716)*x_ref[1]**o+(-0.202076972289)*x_ref[1]+(-0.0232888078434)*x_ref[2]**o+(-0.0774477649878)*x_ref[2]
-        ref[1,2]=(-0.707321785527)*x_ref[0]**o+(0.618526464205)*x_ref[0]+(-0.578548442468)*x_ref[1]**o+(-0.411374744442)*x_ref[1]+(-0.944277708787)*x_ref[2]**o+(0.647856975707)*x_ref[2]
-        ref[1,3]=(-0.222503271022)*x_ref[0]**o+(-0.929428092728)*x_ref[0]+(-0.976553212424)*x_ref[1]**o+(0.0376439617084)*x_ref[1]+(0.0428078568512)*x_ref[2]**o+(-0.441850944272)*x_ref[2]
-        ref[1,4]=(-0.862164898455)*x_ref[0]**o+(-0.989900221991)*x_ref[0]+(0.110610844567)*x_ref[1]**o+(0.419384612236)*x_ref[1]+(-0.00271948841262)*x_ref[2]**o+(0.301635101629)*x_ref[2]
-        ref[2,0]=(-0.0950421881942)*x_ref[0]**o+(-0.741293053909)*x_ref[0]+(-0.461538879874)*x_ref[1]**o+(-0.8199842553)*x_ref[1]+(0.0590344916829)*x_ref[2]**o+(0.352541518434)*x_ref[2]
-        ref[2,1]=(-0.734407995647)*x_ref[0]**o+(-0.726167721992)*x_ref[0]+(0.700521229916)*x_ref[1]**o+(0.753555863428)*x_ref[1]+(-0.891638139696)*x_ref[2]**o+(-0.996550711213)*x_ref[2]
-        ref[2,2]=(0.777110352629)*x_ref[0]**o+(0.309719201157)*x_ref[0]+(0.026816547522)*x_ref[1]**o+(0.33161010287)*x_ref[1]+(0.257929504352)*x_ref[2]**o+(0.71871314654)*x_ref[2]
-        ref[2,3]=(-0.0982522143825)*x_ref[0]**o+(0.0532144836415)*x_ref[0]+(0.155895442381)*x_ref[1]**o+(-0.872222127033)*x_ref[1]+(0.810538165596)*x_ref[2]**o+(-0.917071363009)*x_ref[2]
-        ref[2,4]=(0.882674783877)*x_ref[0]**o+(-0.246439463648)*x_ref[0]+(-0.478821457401)*x_ref[1]**o+(-0.629183697296)*x_ref[1]+(0.833283185393)*x_ref[2]**o+(-0.895796651184)*x_ref[2]
-        ref[3,0]=(0.949019461395)*x_ref[0]**o+(0.437511668107)*x_ref[0]+(0.46679355983)*x_ref[1]**o+(0.375391913775)*x_ref[1]+(0.992336073925)*x_ref[2]**o+(0.784847856608)*x_ref[2]
-        ref[3,1]=(0.10730061928)*x_ref[0]**o+(0.624678931808)*x_ref[0]+(-0.105084917663)*x_ref[1]**o+(-0.0650034223387)*x_ref[1]+(-0.271922353868)*x_ref[2]**o+(-0.182967296038)*x_ref[2]
-        ref[3,2]=(0.115856234055)*x_ref[0]**o+(0.711912354922)*x_ref[0]+(-0.317962972122)*x_ref[1]**o+(0.577856092951)*x_ref[1]+(-0.246833922867)*x_ref[2]**o+(0.354116462218)*x_ref[2]
-        ref[3,3]=(0.40937236699)*x_ref[0]**o+(0.639252679403)*x_ref[0]+(0.540206943219)*x_ref[1]**o+(0.287006139758)*x_ref[1]+(0.123311433598)*x_ref[2]**o+(-0.0300672780213)*x_ref[2]
-        ref[3,4]=(-0.190299257713)*x_ref[0]**o+(-0.022055675261)*x_ref[0]+(-0.640751994447)*x_ref[1]**o+(-0.411801947317)*x_ref[1]+(0.0675008125057)*x_ref[2]**o+(-0.659424255203)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.697323110242)*x[0]**o+(-0.806494185218)*x[0]+(0.387914602484)*x[1]**o+(0.841835487965)*x[1]
-        arg[0,0,1]=(-0.77670653908)*x[0]**o+(0.311710212706)*x[0]+(-0.0951864020181)*x[1]**o+(-0.14909139946)*x[1]
-        arg[0,1,0]=(0.80933791543)*x[0]**o+(0.72441968276)*x[0]+(-0.446054850085)*x[1]**o+(0.419303534988)*x[1]
-        arg[0,1,1]=(0.174464190017)*x[0]**o+(0.330609661878)*x[0]+(0.798365390058)*x[1]**o+(0.354899223817)*x[1]
-        arg[1,0,0]=(0.36073672839)*x[0]**o+(0.831900846214)*x[0]+(-0.656354645044)*x[1]**o+(0.200645044646)*x[1]
-        arg[1,0,1]=(0.817889801065)*x[0]**o+(0.34052889294)*x[0]+(-0.2416944924)*x[1]**o+(0.0922342148934)*x[1]
-        arg[1,1,0]=(-0.962116509558)*x[0]**o+(-0.0785232077542)*x[0]+(-0.981399563356)*x[1]**o+(0.785509095614)*x[1]
-        arg[1,1,1]=(-0.688444030508)*x[0]**o+(0.651617638972)*x[0]+(0.160584046401)*x[1]**o+(0.253258991923)*x[1]
-        arg[2,0,0]=(0.0728970412574)*x[0]**o+(-0.647328240217)*x[0]+(0.517665494535)*x[1]**o+(-0.416383753573)*x[1]
-        arg[2,0,1]=(0.148104739733)*x[0]**o+(-0.378371639837)*x[0]+(0.848608631336)*x[1]**o+(-0.881516167852)*x[1]
-        arg[2,1,0]=(-0.506376676256)*x[0]**o+(0.234090340446)*x[0]+(-0.737828959566)*x[1]**o+(-0.74093763135)*x[1]
-        arg[2,1,1]=(0.259605354135)*x[0]**o+(0.537424356513)*x[0]+(-0.405718119693)*x[1]**o+(0.120663712044)*x[1]
-        arg[3,0,0]=(-0.609659975269)*x[0]**o+(-0.455923293874)*x[0]+(-0.00765676965971)*x[1]**o+(-0.710899349259)*x[1]
-        arg[3,0,1]=(-0.731011612904)*x[0]**o+(-0.355060765358)*x[0]+(-0.127369372538)*x[1]**o+(0.694265371908)*x[1]
-        arg[3,1,0]=(0.188766337132)*x[0]**o+(-0.194878304215)*x[0]+(-0.963356218109)*x[1]**o+(0.327053372293)*x[1]
-        arg[3,1,1]=(-0.566712779324)*x[0]**o+(-0.251473305071)*x[0]+(0.0181297146138)*x[1]**o+(0.257664697754)*x[1]
-        arg[4,0,0]=(0.574100764569)*x[0]**o+(-0.717776999574)*x[0]+(0.880998124155)*x[1]**o+(-0.810615928848)*x[1]
-        arg[4,0,1]=(0.42552502518)*x[0]**o+(0.456751341147)*x[0]+(-0.484998619005)*x[1]**o+(0.932151187696)*x[1]
-        arg[4,1,0]=(0.56865980485)*x[0]**o+(0.593928872734)*x[0]+(-0.475639894836)*x[1]**o+(-0.990718402693)*x[1]
-        arg[4,1,1]=(0.129586342261)*x[0]**o+(-0.408951830619)*x[0]+(0.132518475289)*x[1]**o+(0.708612820692)*x[1]
-        arg[5,0,0]=(0.0708038739082)*x[0]**o+(0.524270558649)*x[0]+(0.368504533482)*x[1]**o+(0.935828810393)*x[1]
-        arg[5,0,1]=(-0.383650306829)*x[0]**o+(-0.0439362943961)*x[0]+(0.80939275198)*x[1]**o+(-0.61335508023)*x[1]
-        arg[5,1,0]=(-0.621571339247)*x[0]**o+(-0.185069293199)*x[0]+(0.368472011431)*x[1]**o+(-0.388752495932)*x[1]
-        arg[5,1,1]=(-0.263310763174)*x[0]**o+(-0.694616630015)*x[0]+(0.271238274203)*x[1]**o+(-0.477861402347)*x[1]
-        ref[0,0,0]=(-0.697323110242)*x_ref[0]**o+(-0.806494185218)*x_ref[0]+(0.387914602484)*x_ref[1]**o+(0.841835487965)*x_ref[1]
-        ref[0,0,1]=(-0.77670653908)*x_ref[0]**o+(0.311710212706)*x_ref[0]+(-0.0951864020181)*x_ref[1]**o+(-0.14909139946)*x_ref[1]
-        ref[0,1,0]=(0.80933791543)*x_ref[0]**o+(0.72441968276)*x_ref[0]+(-0.446054850085)*x_ref[1]**o+(0.419303534988)*x_ref[1]
-        ref[0,1,1]=(0.174464190017)*x_ref[0]**o+(0.330609661878)*x_ref[0]+(0.798365390058)*x_ref[1]**o+(0.354899223817)*x_ref[1]
-        ref[1,0,0]=(0.36073672839)*x_ref[0]**o+(0.831900846214)*x_ref[0]+(-0.656354645044)*x_ref[1]**o+(0.200645044646)*x_ref[1]
-        ref[1,0,1]=(0.817889801065)*x_ref[0]**o+(0.34052889294)*x_ref[0]+(-0.2416944924)*x_ref[1]**o+(0.0922342148934)*x_ref[1]
-        ref[1,1,0]=(-0.962116509558)*x_ref[0]**o+(-0.0785232077542)*x_ref[0]+(-0.981399563356)*x_ref[1]**o+(0.785509095614)*x_ref[1]
-        ref[1,1,1]=(-0.688444030508)*x_ref[0]**o+(0.651617638972)*x_ref[0]+(0.160584046401)*x_ref[1]**o+(0.253258991923)*x_ref[1]
-        ref[2,0,0]=(0.0728970412574)*x_ref[0]**o+(-0.647328240217)*x_ref[0]+(0.517665494535)*x_ref[1]**o+(-0.416383753573)*x_ref[1]
-        ref[2,0,1]=(0.148104739733)*x_ref[0]**o+(-0.378371639837)*x_ref[0]+(0.848608631336)*x_ref[1]**o+(-0.881516167852)*x_ref[1]
-        ref[2,1,0]=(-0.506376676256)*x_ref[0]**o+(0.234090340446)*x_ref[0]+(-0.737828959566)*x_ref[1]**o+(-0.74093763135)*x_ref[1]
-        ref[2,1,1]=(0.259605354135)*x_ref[0]**o+(0.537424356513)*x_ref[0]+(-0.405718119693)*x_ref[1]**o+(0.120663712044)*x_ref[1]
-        ref[3,0,0]=(-0.609659975269)*x_ref[0]**o+(-0.455923293874)*x_ref[0]+(-0.00765676965971)*x_ref[1]**o+(-0.710899349259)*x_ref[1]
-        ref[3,0,1]=(-0.731011612904)*x_ref[0]**o+(-0.355060765358)*x_ref[0]+(-0.127369372538)*x_ref[1]**o+(0.694265371908)*x_ref[1]
-        ref[3,1,0]=(0.188766337132)*x_ref[0]**o+(-0.194878304215)*x_ref[0]+(-0.963356218109)*x_ref[1]**o+(0.327053372293)*x_ref[1]
-        ref[3,1,1]=(-0.566712779324)*x_ref[0]**o+(-0.251473305071)*x_ref[0]+(0.0181297146138)*x_ref[1]**o+(0.257664697754)*x_ref[1]
-        ref[4,0,0]=(0.574100764569)*x_ref[0]**o+(-0.717776999574)*x_ref[0]+(0.880998124155)*x_ref[1]**o+(-0.810615928848)*x_ref[1]
-        ref[4,0,1]=(0.42552502518)*x_ref[0]**o+(0.456751341147)*x_ref[0]+(-0.484998619005)*x_ref[1]**o+(0.932151187696)*x_ref[1]
-        ref[4,1,0]=(0.56865980485)*x_ref[0]**o+(0.593928872734)*x_ref[0]+(-0.475639894836)*x_ref[1]**o+(-0.990718402693)*x_ref[1]
-        ref[4,1,1]=(0.129586342261)*x_ref[0]**o+(-0.408951830619)*x_ref[0]+(0.132518475289)*x_ref[1]**o+(0.708612820692)*x_ref[1]
-        ref[5,0,0]=(0.0708038739082)*x_ref[0]**o+(0.524270558649)*x_ref[0]+(0.368504533482)*x_ref[1]**o+(0.935828810393)*x_ref[1]
-        ref[5,0,1]=(-0.383650306829)*x_ref[0]**o+(-0.0439362943961)*x_ref[0]+(0.80939275198)*x_ref[1]**o+(-0.61335508023)*x_ref[1]
-        ref[5,1,0]=(-0.621571339247)*x_ref[0]**o+(-0.185069293199)*x_ref[0]+(0.368472011431)*x_ref[1]**o+(-0.388752495932)*x_ref[1]
-        ref[5,1,1]=(-0.263310763174)*x_ref[0]**o+(-0.694616630015)*x_ref[0]+(0.271238274203)*x_ref[1]**o+(-0.477861402347)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.287534645778)*x[0]**o+(0.94865229379)*x[0]+(0.655299232864)*x[1]**o+(0.350034924637)*x[1]+(0.556341391183)*x[2]**o+(0.840643265765)*x[2]
-        arg[0,0,1]=(-0.207213781549)*x[0]**o+(-0.0394497047797)*x[0]+(-0.0236016308575)*x[1]**o+(0.344122299199)*x[1]+(0.389588325996)*x[2]**o+(0.941980468657)*x[2]
-        arg[0,1,0]=(0.00980412235862)*x[0]**o+(0.74862549447)*x[0]+(0.630165284383)*x[1]**o+(0.234711268989)*x[1]+(-0.22509981272)*x[2]**o+(-0.0153888168649)*x[2]
-        arg[0,1,1]=(-0.87309186262)*x[0]**o+(0.833526923917)*x[0]+(0.78785479415)*x[1]**o+(0.823967259171)*x[1]+(0.320244316109)*x[2]**o+(-0.735225854417)*x[2]
-        arg[1,0,0]=(-0.0892232551051)*x[0]**o+(-0.346728833563)*x[0]+(0.422774634671)*x[1]**o+(0.793222381957)*x[1]+(-0.670476677006)*x[2]**o+(0.896884540116)*x[2]
-        arg[1,0,1]=(-0.0023382136345)*x[0]**o+(0.73058281545)*x[0]+(0.11828880374)*x[1]**o+(-0.691839091619)*x[1]+(-0.39086463392)*x[2]**o+(0.66200209782)*x[2]
-        arg[1,1,0]=(-0.924238055558)*x[0]**o+(-0.334208271705)*x[0]+(-0.57106045555)*x[1]**o+(-0.765650999193)*x[1]+(0.0404533468054)*x[2]**o+(-0.225975260777)*x[2]
-        arg[1,1,1]=(-0.351110999108)*x[0]**o+(0.626166346251)*x[0]+(0.385737198467)*x[1]**o+(0.577561466908)*x[1]+(0.708325217242)*x[2]**o+(0.193727923904)*x[2]
-        arg[2,0,0]=(0.278942080997)*x[0]**o+(-0.569761653572)*x[0]+(-0.624879270918)*x[1]**o+(-0.0151754112896)*x[1]+(0.411399083825)*x[2]**o+(-0.846669568641)*x[2]
-        arg[2,0,1]=(-0.543586963879)*x[0]**o+(-0.383959956625)*x[0]+(0.184375944938)*x[1]**o+(-0.104178233562)*x[1]+(-0.223101894662)*x[2]**o+(-0.17221835595)*x[2]
-        arg[2,1,0]=(0.317103921207)*x[0]**o+(-0.919542461354)*x[0]+(0.56666554454)*x[1]**o+(0.895772298847)*x[1]+(0.714550707822)*x[2]**o+(0.634702089556)*x[2]
-        arg[2,1,1]=(0.986576254164)*x[0]**o+(0.544493787633)*x[0]+(0.964620027203)*x[1]**o+(0.259991384678)*x[1]+(-0.577361835739)*x[2]**o+(0.651593456822)*x[2]
-        arg[3,0,0]=(0.362841472614)*x[0]**o+(-0.521771228041)*x[0]+(-0.594530755517)*x[1]**o+(0.700647681241)*x[1]+(-0.131683781311)*x[2]**o+(0.636310189834)*x[2]
-        arg[3,0,1]=(0.885891862321)*x[0]**o+(0.397438320764)*x[0]+(0.711380452937)*x[1]**o+(0.962571325144)*x[1]+(-0.300114113339)*x[2]**o+(0.34700388868)*x[2]
-        arg[3,1,0]=(0.52140726408)*x[0]**o+(-0.0921295295522)*x[0]+(-0.823076091446)*x[1]**o+(0.477401876125)*x[1]+(-0.973057905067)*x[2]**o+(-0.975526794128)*x[2]
-        arg[3,1,1]=(-0.241503887113)*x[0]**o+(0.133988088285)*x[0]+(0.243026393121)*x[1]**o+(0.0848716779473)*x[1]+(0.140349614791)*x[2]**o+(-0.217182025695)*x[2]
-        arg[4,0,0]=(0.680080194053)*x[0]**o+(0.512009633844)*x[0]+(-0.640214066363)*x[1]**o+(0.571800633214)*x[1]+(-0.749395617545)*x[2]**o+(0.448487668786)*x[2]
-        arg[4,0,1]=(-0.792959916349)*x[0]**o+(-0.433770516776)*x[0]+(-0.380980758215)*x[1]**o+(-0.831154769101)*x[1]+(0.277551460651)*x[2]**o+(0.626476984233)*x[2]
-        arg[4,1,0]=(-0.285102566546)*x[0]**o+(0.745636275253)*x[0]+(0.4999427836)*x[1]**o+(0.561343302884)*x[1]+(0.796220302361)*x[2]**o+(-0.830020520143)*x[2]
-        arg[4,1,1]=(0.237420507314)*x[0]**o+(0.327181858092)*x[0]+(-0.895743235593)*x[1]**o+(-0.496964477443)*x[1]+(0.57336428204)*x[2]**o+(-0.154267071287)*x[2]
-        arg[5,0,0]=(0.0401925997607)*x[0]**o+(-0.0155957424748)*x[0]+(-0.658363451239)*x[1]**o+(-0.175223211879)*x[1]+(-0.743729768327)*x[2]**o+(0.391531327128)*x[2]
-        arg[5,0,1]=(0.836239801824)*x[0]**o+(-0.72288085675)*x[0]+(0.177981042887)*x[1]**o+(0.354505260098)*x[1]+(-0.180520504267)*x[2]**o+(-0.380306239974)*x[2]
-        arg[5,1,0]=(-0.65536853024)*x[0]**o+(-0.00573854242476)*x[0]+(-0.261460514314)*x[1]**o+(-0.289771405693)*x[1]+(0.750775397523)*x[2]**o+(-0.333215608562)*x[2]
-        arg[5,1,1]=(-0.579532884024)*x[0]**o+(-0.208677373724)*x[0]+(-0.379612024024)*x[1]**o+(-0.0565813995114)*x[1]+(-0.867913562592)*x[2]**o+(-0.254654298293)*x[2]
-        ref[0,0,0]=(0.287534645778)*x_ref[0]**o+(0.94865229379)*x_ref[0]+(0.655299232864)*x_ref[1]**o+(0.350034924637)*x_ref[1]+(0.556341391183)*x_ref[2]**o+(0.840643265765)*x_ref[2]
-        ref[0,0,1]=(-0.207213781549)*x_ref[0]**o+(-0.0394497047797)*x_ref[0]+(-0.0236016308575)*x_ref[1]**o+(0.344122299199)*x_ref[1]+(0.389588325996)*x_ref[2]**o+(0.941980468657)*x_ref[2]
-        ref[0,1,0]=(0.00980412235862)*x_ref[0]**o+(0.74862549447)*x_ref[0]+(0.630165284383)*x_ref[1]**o+(0.234711268989)*x_ref[1]+(-0.22509981272)*x_ref[2]**o+(-0.0153888168649)*x_ref[2]
-        ref[0,1,1]=(-0.87309186262)*x_ref[0]**o+(0.833526923917)*x_ref[0]+(0.78785479415)*x_ref[1]**o+(0.823967259171)*x_ref[1]+(0.320244316109)*x_ref[2]**o+(-0.735225854417)*x_ref[2]
-        ref[1,0,0]=(-0.0892232551051)*x_ref[0]**o+(-0.346728833563)*x_ref[0]+(0.422774634671)*x_ref[1]**o+(0.793222381957)*x_ref[1]+(-0.670476677006)*x_ref[2]**o+(0.896884540116)*x_ref[2]
-        ref[1,0,1]=(-0.0023382136345)*x_ref[0]**o+(0.73058281545)*x_ref[0]+(0.11828880374)*x_ref[1]**o+(-0.691839091619)*x_ref[1]+(-0.39086463392)*x_ref[2]**o+(0.66200209782)*x_ref[2]
-        ref[1,1,0]=(-0.924238055558)*x_ref[0]**o+(-0.334208271705)*x_ref[0]+(-0.57106045555)*x_ref[1]**o+(-0.765650999193)*x_ref[1]+(0.0404533468054)*x_ref[2]**o+(-0.225975260777)*x_ref[2]
-        ref[1,1,1]=(-0.351110999108)*x_ref[0]**o+(0.626166346251)*x_ref[0]+(0.385737198467)*x_ref[1]**o+(0.577561466908)*x_ref[1]+(0.708325217242)*x_ref[2]**o+(0.193727923904)*x_ref[2]
-        ref[2,0,0]=(0.278942080997)*x_ref[0]**o+(-0.569761653572)*x_ref[0]+(-0.624879270918)*x_ref[1]**o+(-0.0151754112896)*x_ref[1]+(0.411399083825)*x_ref[2]**o+(-0.846669568641)*x_ref[2]
-        ref[2,0,1]=(-0.543586963879)*x_ref[0]**o+(-0.383959956625)*x_ref[0]+(0.184375944938)*x_ref[1]**o+(-0.104178233562)*x_ref[1]+(-0.223101894662)*x_ref[2]**o+(-0.17221835595)*x_ref[2]
-        ref[2,1,0]=(0.317103921207)*x_ref[0]**o+(-0.919542461354)*x_ref[0]+(0.56666554454)*x_ref[1]**o+(0.895772298847)*x_ref[1]+(0.714550707822)*x_ref[2]**o+(0.634702089556)*x_ref[2]
-        ref[2,1,1]=(0.986576254164)*x_ref[0]**o+(0.544493787633)*x_ref[0]+(0.964620027203)*x_ref[1]**o+(0.259991384678)*x_ref[1]+(-0.577361835739)*x_ref[2]**o+(0.651593456822)*x_ref[2]
-        ref[3,0,0]=(0.362841472614)*x_ref[0]**o+(-0.521771228041)*x_ref[0]+(-0.594530755517)*x_ref[1]**o+(0.700647681241)*x_ref[1]+(-0.131683781311)*x_ref[2]**o+(0.636310189834)*x_ref[2]
-        ref[3,0,1]=(0.885891862321)*x_ref[0]**o+(0.397438320764)*x_ref[0]+(0.711380452937)*x_ref[1]**o+(0.962571325144)*x_ref[1]+(-0.300114113339)*x_ref[2]**o+(0.34700388868)*x_ref[2]
-        ref[3,1,0]=(0.52140726408)*x_ref[0]**o+(-0.0921295295522)*x_ref[0]+(-0.823076091446)*x_ref[1]**o+(0.477401876125)*x_ref[1]+(-0.973057905067)*x_ref[2]**o+(-0.975526794128)*x_ref[2]
-        ref[3,1,1]=(-0.241503887113)*x_ref[0]**o+(0.133988088285)*x_ref[0]+(0.243026393121)*x_ref[1]**o+(0.0848716779473)*x_ref[1]+(0.140349614791)*x_ref[2]**o+(-0.217182025695)*x_ref[2]
-        ref[4,0,0]=(0.680080194053)*x_ref[0]**o+(0.512009633844)*x_ref[0]+(-0.640214066363)*x_ref[1]**o+(0.571800633214)*x_ref[1]+(-0.749395617545)*x_ref[2]**o+(0.448487668786)*x_ref[2]
-        ref[4,0,1]=(-0.792959916349)*x_ref[0]**o+(-0.433770516776)*x_ref[0]+(-0.380980758215)*x_ref[1]**o+(-0.831154769101)*x_ref[1]+(0.277551460651)*x_ref[2]**o+(0.626476984233)*x_ref[2]
-        ref[4,1,0]=(-0.285102566546)*x_ref[0]**o+(0.745636275253)*x_ref[0]+(0.4999427836)*x_ref[1]**o+(0.561343302884)*x_ref[1]+(0.796220302361)*x_ref[2]**o+(-0.830020520143)*x_ref[2]
-        ref[4,1,1]=(0.237420507314)*x_ref[0]**o+(0.327181858092)*x_ref[0]+(-0.895743235593)*x_ref[1]**o+(-0.496964477443)*x_ref[1]+(0.57336428204)*x_ref[2]**o+(-0.154267071287)*x_ref[2]
-        ref[5,0,0]=(0.0401925997607)*x_ref[0]**o+(-0.0155957424748)*x_ref[0]+(-0.658363451239)*x_ref[1]**o+(-0.175223211879)*x_ref[1]+(-0.743729768327)*x_ref[2]**o+(0.391531327128)*x_ref[2]
-        ref[5,0,1]=(0.836239801824)*x_ref[0]**o+(-0.72288085675)*x_ref[0]+(0.177981042887)*x_ref[1]**o+(0.354505260098)*x_ref[1]+(-0.180520504267)*x_ref[2]**o+(-0.380306239974)*x_ref[2]
-        ref[5,1,0]=(-0.65536853024)*x_ref[0]**o+(-0.00573854242476)*x_ref[0]+(-0.261460514314)*x_ref[1]**o+(-0.289771405693)*x_ref[1]+(0.750775397523)*x_ref[2]**o+(-0.333215608562)*x_ref[2]
-        ref[5,1,1]=(-0.579532884024)*x_ref[0]**o+(-0.208677373724)*x_ref[0]+(-0.379612024024)*x_ref[1]**o+(-0.0565813995114)*x_ref[1]+(-0.867913562592)*x_ref[2]**o+(-0.254654298293)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.274472293956)*x[0]**o+(-0.293347130929)*x[0]+(0.392586448254)*x[1]**o+(-0.403066854054)*x[1]
-        arg[0,0,0,1]=(0.385933192907)*x[0]**o+(0.484240065867)*x[0]+(0.144565631551)*x[1]**o+(0.882508492739)*x[1]
-        arg[0,0,1,0]=(0.993368905137)*x[0]**o+(0.340349919343)*x[0]+(-0.956806746524)*x[1]**o+(0.990607958001)*x[1]
-        arg[0,0,1,1]=(-0.88610250102)*x[0]**o+(-0.543705587259)*x[0]+(0.170798164924)*x[1]**o+(0.685331195754)*x[1]
-        arg[0,0,2,0]=(-0.922211611143)*x[0]**o+(-0.103640037893)*x[0]+(0.401354703434)*x[1]**o+(-0.117826261635)*x[1]
-        arg[0,0,2,1]=(-0.391601387132)*x[0]**o+(-0.472753344804)*x[0]+(-0.473433838993)*x[1]**o+(-0.173501635989)*x[1]
-        arg[0,1,0,0]=(0.747353274916)*x[0]**o+(-0.960856612086)*x[0]+(-0.54809012978)*x[1]**o+(0.862023893332)*x[1]
-        arg[0,1,0,1]=(-0.256359001149)*x[0]**o+(-0.868975044191)*x[0]+(0.494314269744)*x[1]**o+(0.949957481172)*x[1]
-        arg[0,1,1,0]=(-0.0256658750601)*x[0]**o+(0.145499104203)*x[0]+(-0.68669791629)*x[1]**o+(0.447326207295)*x[1]
-        arg[0,1,1,1]=(0.150617284467)*x[0]**o+(-0.350046088196)*x[0]+(-0.367671302053)*x[1]**o+(0.633220122068)*x[1]
-        arg[0,1,2,0]=(-0.714145362271)*x[0]**o+(-0.957661490758)*x[0]+(0.386253770747)*x[1]**o+(0.982634262634)*x[1]
-        arg[0,1,2,1]=(0.707565096824)*x[0]**o+(0.281758058573)*x[0]+(-0.407791315587)*x[1]**o+(0.86069036983)*x[1]
-        arg[0,2,0,0]=(-0.453860220598)*x[0]**o+(0.944457388061)*x[0]+(-0.903818960162)*x[1]**o+(-0.799423205297)*x[1]
-        arg[0,2,0,1]=(-0.621257500941)*x[0]**o+(0.748963737937)*x[0]+(-0.12660934458)*x[1]**o+(-0.362830639592)*x[1]
-        arg[0,2,1,0]=(-0.702485820037)*x[0]**o+(0.355584898593)*x[0]+(0.657127357751)*x[1]**o+(0.535533390762)*x[1]
-        arg[0,2,1,1]=(0.795733125008)*x[0]**o+(0.983607327249)*x[0]+(-0.463818780644)*x[1]**o+(-0.681831588244)*x[1]
-        arg[0,2,2,0]=(0.335783204138)*x[0]**o+(-0.712225782679)*x[0]+(0.853426644096)*x[1]**o+(-0.143845263686)*x[1]
-        arg[0,2,2,1]=(0.389724375144)*x[0]**o+(0.715176227705)*x[0]+(-0.660690893888)*x[1]**o+(0.428289724709)*x[1]
-        arg[0,3,0,0]=(-0.363836203724)*x[0]**o+(-0.257775427457)*x[0]+(0.407904889098)*x[1]**o+(-0.731273814284)*x[1]
-        arg[0,3,0,1]=(0.402038262494)*x[0]**o+(0.33289103638)*x[0]+(0.444957562329)*x[1]**o+(0.0657971935664)*x[1]
-        arg[0,3,1,0]=(0.979673814602)*x[0]**o+(-0.133405332848)*x[0]+(0.23884689304)*x[1]**o+(0.728464997681)*x[1]
-        arg[0,3,1,1]=(0.724603429246)*x[0]**o+(-0.391040898144)*x[0]+(-0.966816499003)*x[1]**o+(0.0984302578905)*x[1]
-        arg[0,3,2,0]=(-0.986139645754)*x[0]**o+(0.60807351165)*x[0]+(0.799807413231)*x[1]**o+(0.12091479711)*x[1]
-        arg[0,3,2,1]=(0.387453999377)*x[0]**o+(0.212725006628)*x[0]+(-0.120374039139)*x[1]**o+(-0.262304757951)*x[1]
-        arg[0,4,0,0]=(-0.260545986276)*x[0]**o+(0.251085312932)*x[0]+(0.738082708518)*x[1]**o+(-0.0804883797938)*x[1]
-        arg[0,4,0,1]=(-0.190701356138)*x[0]**o+(-0.0205295935522)*x[0]+(0.904261681819)*x[1]**o+(-0.859647709957)*x[1]
-        arg[0,4,1,0]=(-0.945357492849)*x[0]**o+(-0.85298463389)*x[0]+(0.688964336673)*x[1]**o+(-0.672881696932)*x[1]
-        arg[0,4,1,1]=(0.877720258045)*x[0]**o+(-0.361228026805)*x[0]+(-0.326626527006)*x[1]**o+(-0.274100421232)*x[1]
-        arg[0,4,2,0]=(0.202358729084)*x[0]**o+(-0.997571481837)*x[0]+(0.431193711862)*x[1]**o+(0.513561123915)*x[1]
-        arg[0,4,2,1]=(-0.136602954592)*x[0]**o+(-0.40864934437)*x[0]+(0.675945574351)*x[1]**o+(0.728757793536)*x[1]
-        arg[1,0,0,0]=(0.835464261851)*x[0]**o+(-0.131447020601)*x[0]+(0.0810352521446)*x[1]**o+(0.664744750899)*x[1]
-        arg[1,0,0,1]=(0.239716928689)*x[0]**o+(-0.192258999531)*x[0]+(0.615877054036)*x[1]**o+(0.835274774437)*x[1]
-        arg[1,0,1,0]=(0.509342803767)*x[0]**o+(-0.633944481882)*x[0]+(0.262098006086)*x[1]**o+(0.159902070799)*x[1]
-        arg[1,0,1,1]=(0.894432440588)*x[0]**o+(-0.167778431319)*x[0]+(-0.984183148477)*x[1]**o+(-0.554981658632)*x[1]
-        arg[1,0,2,0]=(-0.762472607231)*x[0]**o+(0.405550139256)*x[0]+(0.4051290641)*x[1]**o+(-0.27180186672)*x[1]
-        arg[1,0,2,1]=(0.663869273816)*x[0]**o+(0.867453974628)*x[0]+(-0.279659969132)*x[1]**o+(-0.370539101204)*x[1]
-        arg[1,1,0,0]=(-0.969326778164)*x[0]**o+(0.965471349497)*x[0]+(-0.529983232946)*x[1]**o+(0.714091610977)*x[1]
-        arg[1,1,0,1]=(-0.840360667093)*x[0]**o+(-0.399319808256)*x[0]+(0.568769915582)*x[1]**o+(0.872427494442)*x[1]
-        arg[1,1,1,0]=(0.46099116941)*x[0]**o+(-0.986008874142)*x[0]+(-0.53999023556)*x[1]**o+(-0.549695567855)*x[1]
-        arg[1,1,1,1]=(0.485944918559)*x[0]**o+(0.189773828651)*x[0]+(-0.611654980493)*x[1]**o+(-0.337071911657)*x[1]
-        arg[1,1,2,0]=(0.191663603248)*x[0]**o+(0.0906374965004)*x[0]+(-0.271051598251)*x[1]**o+(0.880507788825)*x[1]
-        arg[1,1,2,1]=(-0.439514997001)*x[0]**o+(0.701230426224)*x[0]+(-0.193231641029)*x[1]**o+(0.950584054332)*x[1]
-        arg[1,2,0,0]=(0.439456565259)*x[0]**o+(-0.25664171484)*x[0]+(-0.653059819329)*x[1]**o+(-0.680544747777)*x[1]
-        arg[1,2,0,1]=(0.34890454443)*x[0]**o+(-0.69851200963)*x[0]+(-0.00159381688549)*x[1]**o+(-0.612359675499)*x[1]
-        arg[1,2,1,0]=(0.132759671375)*x[0]**o+(-0.235126716401)*x[0]+(0.652068885826)*x[1]**o+(0.749698645371)*x[1]
-        arg[1,2,1,1]=(0.934980403627)*x[0]**o+(0.321409273437)*x[0]+(-0.605909929553)*x[1]**o+(0.135554927418)*x[1]
-        arg[1,2,2,0]=(-0.68327709329)*x[0]**o+(-0.0381292756005)*x[0]+(0.710953191114)*x[1]**o+(-0.344522256689)*x[1]
-        arg[1,2,2,1]=(-0.813976235652)*x[0]**o+(0.613879708123)*x[0]+(0.451599277293)*x[1]**o+(-0.6134026375)*x[1]
-        arg[1,3,0,0]=(0.595310128627)*x[0]**o+(-0.247621573131)*x[0]+(0.165607783104)*x[1]**o+(0.578132180805)*x[1]
-        arg[1,3,0,1]=(0.848827238882)*x[0]**o+(0.173154067999)*x[0]+(0.340662419437)*x[1]**o+(-0.389656447251)*x[1]
-        arg[1,3,1,0]=(0.250888415228)*x[0]**o+(-0.278203136198)*x[0]+(-0.693211186734)*x[1]**o+(0.613812194735)*x[1]
-        arg[1,3,1,1]=(0.634533003162)*x[0]**o+(-0.0924665762471)*x[0]+(0.749575894384)*x[1]**o+(-0.737205017415)*x[1]
-        arg[1,3,2,0]=(0.607750966973)*x[0]**o+(0.905016928404)*x[0]+(-0.171049542163)*x[1]**o+(-0.20526244601)*x[1]
-        arg[1,3,2,1]=(0.723946025405)*x[0]**o+(0.0157576743987)*x[0]+(0.190875428312)*x[1]**o+(0.407925899509)*x[1]
-        arg[1,4,0,0]=(-0.561582695803)*x[0]**o+(-0.350262461371)*x[0]+(0.57610409872)*x[1]**o+(0.881780963877)*x[1]
-        arg[1,4,0,1]=(0.077066498695)*x[0]**o+(0.515597802516)*x[0]+(0.332011413016)*x[1]**o+(0.215491334787)*x[1]
-        arg[1,4,1,0]=(0.33858727737)*x[0]**o+(-0.573231800768)*x[0]+(-0.559915809132)*x[1]**o+(0.0240869142176)*x[1]
-        arg[1,4,1,1]=(-0.684581727952)*x[0]**o+(0.365541904201)*x[0]+(0.204252397376)*x[1]**o+(0.149300766054)*x[1]
-        arg[1,4,2,0]=(-0.574225088383)*x[0]**o+(0.0286339776067)*x[0]+(-0.358732122607)*x[1]**o+(-0.416932738957)*x[1]
-        arg[1,4,2,1]=(-0.308460184932)*x[0]**o+(0.389214987836)*x[0]+(-0.358303257031)*x[1]**o+(0.348109483688)*x[1]
-        arg[2,0,0,0]=(-0.811318668804)*x[0]**o+(-0.298028116982)*x[0]+(0.679871523483)*x[1]**o+(0.958042925287)*x[1]
-        arg[2,0,0,1]=(-0.616521818338)*x[0]**o+(-0.0817124854496)*x[0]+(0.403257366893)*x[1]**o+(0.740689710435)*x[1]
-        arg[2,0,1,0]=(0.271046179127)*x[0]**o+(0.814928093947)*x[0]+(0.423722781579)*x[1]**o+(0.925333209811)*x[1]
-        arg[2,0,1,1]=(0.0596651806816)*x[0]**o+(0.493854605359)*x[0]+(0.539998537439)*x[1]**o+(-0.910865639375)*x[1]
-        arg[2,0,2,0]=(0.503267602327)*x[0]**o+(-0.270966471743)*x[0]+(-0.342063366676)*x[1]**o+(-0.975700224705)*x[1]
-        arg[2,0,2,1]=(-0.0362358939195)*x[0]**o+(-0.766033869339)*x[0]+(0.891365100088)*x[1]**o+(0.815025898929)*x[1]
-        arg[2,1,0,0]=(-0.667240459984)*x[0]**o+(0.8659076701)*x[0]+(0.215089397562)*x[1]**o+(0.464769182307)*x[1]
-        arg[2,1,0,1]=(-0.298625221931)*x[0]**o+(-0.504329743472)*x[0]+(0.412472510208)*x[1]**o+(0.241693152889)*x[1]
-        arg[2,1,1,0]=(-0.670730179133)*x[0]**o+(0.0201070113832)*x[0]+(-0.572725898919)*x[1]**o+(0.665609259014)*x[1]
-        arg[2,1,1,1]=(-0.319080984089)*x[0]**o+(0.0299423045224)*x[0]+(0.0152311810613)*x[1]**o+(-0.784646189026)*x[1]
-        arg[2,1,2,0]=(0.153308789716)*x[0]**o+(0.725808150613)*x[0]+(0.62876493338)*x[1]**o+(0.80275284252)*x[1]
-        arg[2,1,2,1]=(0.804698870013)*x[0]**o+(-0.631078773061)*x[0]+(-0.015221975698)*x[1]**o+(-0.954169686746)*x[1]
-        arg[2,2,0,0]=(0.169022797498)*x[0]**o+(0.733025791099)*x[0]+(0.321554996633)*x[1]**o+(0.292173365364)*x[1]
-        arg[2,2,0,1]=(0.327345955109)*x[0]**o+(0.21757823896)*x[0]+(0.873027160446)*x[1]**o+(-0.250192861579)*x[1]
-        arg[2,2,1,0]=(0.394387190832)*x[0]**o+(-0.613661883482)*x[0]+(0.806965291386)*x[1]**o+(0.244513244016)*x[1]
-        arg[2,2,1,1]=(0.043913907536)*x[0]**o+(-0.303567806424)*x[0]+(0.547037093323)*x[1]**o+(-0.598687385328)*x[1]
-        arg[2,2,2,0]=(0.875663154787)*x[0]**o+(-0.34984832772)*x[0]+(0.879143174396)*x[1]**o+(-0.193154051109)*x[1]
-        arg[2,2,2,1]=(0.940311132918)*x[0]**o+(-0.358708743382)*x[0]+(0.117370945146)*x[1]**o+(-0.664208034757)*x[1]
-        arg[2,3,0,0]=(0.0334525660588)*x[0]**o+(0.592805915255)*x[0]+(-0.278216157971)*x[1]**o+(0.894369967671)*x[1]
-        arg[2,3,0,1]=(-0.966591106326)*x[0]**o+(-0.882160390768)*x[0]+(0.843982702732)*x[1]**o+(0.363868921656)*x[1]
-        arg[2,3,1,0]=(-0.246392342771)*x[0]**o+(-0.934459096242)*x[0]+(-0.472771368537)*x[1]**o+(0.148854304706)*x[1]
-        arg[2,3,1,1]=(0.248218424051)*x[0]**o+(0.0980396576111)*x[0]+(0.413322166489)*x[1]**o+(0.429747261346)*x[1]
-        arg[2,3,2,0]=(0.742987565733)*x[0]**o+(-0.213736450136)*x[0]+(0.996975741314)*x[1]**o+(0.960709958665)*x[1]
-        arg[2,3,2,1]=(0.436149490977)*x[0]**o+(0.87632181197)*x[0]+(-0.881934669912)*x[1]**o+(-0.457520504175)*x[1]
-        arg[2,4,0,0]=(-0.519014330693)*x[0]**o+(0.938619608407)*x[0]+(-0.847954563609)*x[1]**o+(0.791774379621)*x[1]
-        arg[2,4,0,1]=(-0.599487299453)*x[0]**o+(0.977867555132)*x[0]+(0.693105630579)*x[1]**o+(-0.688827812942)*x[1]
-        arg[2,4,1,0]=(0.955907964163)*x[0]**o+(0.0724056986172)*x[0]+(0.254773619772)*x[1]**o+(0.0428861146964)*x[1]
-        arg[2,4,1,1]=(-0.422202101998)*x[0]**o+(0.803263223544)*x[0]+(0.456048140785)*x[1]**o+(0.0419133126183)*x[1]
-        arg[2,4,2,0]=(-0.182308704781)*x[0]**o+(0.862282443488)*x[0]+(-0.844027007955)*x[1]**o+(0.586220526376)*x[1]
-        arg[2,4,2,1]=(-0.801542666229)*x[0]**o+(0.903685299455)*x[0]+(0.428926544377)*x[1]**o+(-0.891220471549)*x[1]
-        arg[3,0,0,0]=(0.602917787713)*x[0]**o+(-0.592239549743)*x[0]+(0.761830006718)*x[1]**o+(-0.784264167777)*x[1]
-        arg[3,0,0,1]=(0.819962957732)*x[0]**o+(-0.455126790372)*x[0]+(-0.144898728525)*x[1]**o+(0.121566345339)*x[1]
-        arg[3,0,1,0]=(0.570694941559)*x[0]**o+(-0.505678656386)*x[0]+(0.295536587355)*x[1]**o+(-0.852779737814)*x[1]
-        arg[3,0,1,1]=(-0.226246858753)*x[0]**o+(-0.513900306228)*x[0]+(-0.389483591407)*x[1]**o+(-0.735105335539)*x[1]
-        arg[3,0,2,0]=(0.941877610938)*x[0]**o+(0.93808330298)*x[0]+(0.189785162182)*x[1]**o+(0.546525366304)*x[1]
-        arg[3,0,2,1]=(0.10639100485)*x[0]**o+(-0.773361007972)*x[0]+(-0.470531427579)*x[1]**o+(0.467359342808)*x[1]
-        arg[3,1,0,0]=(0.857725599589)*x[0]**o+(0.0881746413132)*x[0]+(0.040713151152)*x[1]**o+(-0.52070729883)*x[1]
-        arg[3,1,0,1]=(0.266807652146)*x[0]**o+(0.337496673892)*x[0]+(-0.562266297445)*x[1]**o+(0.326015195113)*x[1]
-        arg[3,1,1,0]=(0.177275509465)*x[0]**o+(-0.647855761301)*x[0]+(-0.0963373631995)*x[1]**o+(-0.535256252994)*x[1]
-        arg[3,1,1,1]=(0.430309295606)*x[0]**o+(-0.0894749557428)*x[0]+(0.503470724483)*x[1]**o+(-0.202361122248)*x[1]
-        arg[3,1,2,0]=(0.283995014194)*x[0]**o+(-0.544419907194)*x[0]+(0.78478571712)*x[1]**o+(0.341540664147)*x[1]
-        arg[3,1,2,1]=(-0.281042869936)*x[0]**o+(0.728771766492)*x[0]+(-0.298974388557)*x[1]**o+(-0.836789906985)*x[1]
-        arg[3,2,0,0]=(-0.415323371561)*x[0]**o+(0.583971137371)*x[0]+(-0.265658679489)*x[1]**o+(-0.432447373809)*x[1]
-        arg[3,2,0,1]=(0.690486298855)*x[0]**o+(0.552521632226)*x[0]+(0.237622739042)*x[1]**o+(-0.254513693924)*x[1]
-        arg[3,2,1,0]=(0.453985687207)*x[0]**o+(-0.785385580962)*x[0]+(0.0190987841634)*x[1]**o+(-0.7923288861)*x[1]
-        arg[3,2,1,1]=(-0.964082656379)*x[0]**o+(-0.806315937371)*x[0]+(0.271145420366)*x[1]**o+(-0.839014535945)*x[1]
-        arg[3,2,2,0]=(-0.372062773997)*x[0]**o+(-0.069749560567)*x[0]+(-0.126310395383)*x[1]**o+(0.972025865285)*x[1]
-        arg[3,2,2,1]=(-0.580353020086)*x[0]**o+(-0.152746821477)*x[0]+(0.297553660535)*x[1]**o+(0.444791568145)*x[1]
-        arg[3,3,0,0]=(-0.361520029439)*x[0]**o+(-0.810391070499)*x[0]+(0.462123882642)*x[1]**o+(-0.974534227742)*x[1]
-        arg[3,3,0,1]=(0.113370617837)*x[0]**o+(0.428257355435)*x[0]+(-0.18656623758)*x[1]**o+(0.206503327394)*x[1]
-        arg[3,3,1,0]=(0.341328445689)*x[0]**o+(0.34002947054)*x[0]+(0.997677286362)*x[1]**o+(0.43300073225)*x[1]
-        arg[3,3,1,1]=(-0.513912982823)*x[0]**o+(0.826573827064)*x[0]+(-0.701417864085)*x[1]**o+(0.567078883219)*x[1]
-        arg[3,3,2,0]=(-0.325536866965)*x[0]**o+(0.924405767451)*x[0]+(-0.0481381954346)*x[1]**o+(0.912210617073)*x[1]
-        arg[3,3,2,1]=(0.491532434302)*x[0]**o+(-0.584980848036)*x[0]+(-0.788317530858)*x[1]**o+(-0.900681893172)*x[1]
-        arg[3,4,0,0]=(0.432249855148)*x[0]**o+(-0.673369312552)*x[0]+(0.244704845849)*x[1]**o+(-0.300995595367)*x[1]
-        arg[3,4,0,1]=(0.383037211984)*x[0]**o+(0.299711400488)*x[0]+(0.870584255454)*x[1]**o+(-0.33571823329)*x[1]
-        arg[3,4,1,0]=(0.737134180177)*x[0]**o+(-0.101307090628)*x[0]+(-0.970632061143)*x[1]**o+(-0.449042684137)*x[1]
-        arg[3,4,1,1]=(0.00684250643632)*x[0]**o+(0.676964654022)*x[0]+(0.789069834858)*x[1]**o+(-0.829739508197)*x[1]
-        arg[3,4,2,0]=(0.7279044944)*x[0]**o+(0.215711122038)*x[0]+(0.385631252632)*x[1]**o+(0.629390433529)*x[1]
-        arg[3,4,2,1]=(-0.380750716629)*x[0]**o+(-0.413040692437)*x[0]+(0.26795244639)*x[1]**o+(0.492475504659)*x[1]
-        ref[0,0,0,0]=(-0.274472293956)*x_ref[0]**o+(-0.293347130929)*x_ref[0]+(0.392586448254)*x_ref[1]**o+(-0.403066854054)*x_ref[1]
-        ref[0,0,0,1]=(0.385933192907)*x_ref[0]**o+(0.484240065867)*x_ref[0]+(0.144565631551)*x_ref[1]**o+(0.882508492739)*x_ref[1]
-        ref[0,0,1,0]=(0.993368905137)*x_ref[0]**o+(0.340349919343)*x_ref[0]+(-0.956806746524)*x_ref[1]**o+(0.990607958001)*x_ref[1]
-        ref[0,0,1,1]=(-0.88610250102)*x_ref[0]**o+(-0.543705587259)*x_ref[0]+(0.170798164924)*x_ref[1]**o+(0.685331195754)*x_ref[1]
-        ref[0,0,2,0]=(-0.922211611143)*x_ref[0]**o+(-0.103640037893)*x_ref[0]+(0.401354703434)*x_ref[1]**o+(-0.117826261635)*x_ref[1]
-        ref[0,0,2,1]=(-0.391601387132)*x_ref[0]**o+(-0.472753344804)*x_ref[0]+(-0.473433838993)*x_ref[1]**o+(-0.173501635989)*x_ref[1]
-        ref[0,1,0,0]=(0.747353274916)*x_ref[0]**o+(-0.960856612086)*x_ref[0]+(-0.54809012978)*x_ref[1]**o+(0.862023893332)*x_ref[1]
-        ref[0,1,0,1]=(-0.256359001149)*x_ref[0]**o+(-0.868975044191)*x_ref[0]+(0.494314269744)*x_ref[1]**o+(0.949957481172)*x_ref[1]
-        ref[0,1,1,0]=(-0.0256658750601)*x_ref[0]**o+(0.145499104203)*x_ref[0]+(-0.68669791629)*x_ref[1]**o+(0.447326207295)*x_ref[1]
-        ref[0,1,1,1]=(0.150617284467)*x_ref[0]**o+(-0.350046088196)*x_ref[0]+(-0.367671302053)*x_ref[1]**o+(0.633220122068)*x_ref[1]
-        ref[0,1,2,0]=(-0.714145362271)*x_ref[0]**o+(-0.957661490758)*x_ref[0]+(0.386253770747)*x_ref[1]**o+(0.982634262634)*x_ref[1]
-        ref[0,1,2,1]=(0.707565096824)*x_ref[0]**o+(0.281758058573)*x_ref[0]+(-0.407791315587)*x_ref[1]**o+(0.86069036983)*x_ref[1]
-        ref[0,2,0,0]=(-0.453860220598)*x_ref[0]**o+(0.944457388061)*x_ref[0]+(-0.903818960162)*x_ref[1]**o+(-0.799423205297)*x_ref[1]
-        ref[0,2,0,1]=(-0.621257500941)*x_ref[0]**o+(0.748963737937)*x_ref[0]+(-0.12660934458)*x_ref[1]**o+(-0.362830639592)*x_ref[1]
-        ref[0,2,1,0]=(-0.702485820037)*x_ref[0]**o+(0.355584898593)*x_ref[0]+(0.657127357751)*x_ref[1]**o+(0.535533390762)*x_ref[1]
-        ref[0,2,1,1]=(0.795733125008)*x_ref[0]**o+(0.983607327249)*x_ref[0]+(-0.463818780644)*x_ref[1]**o+(-0.681831588244)*x_ref[1]
-        ref[0,2,2,0]=(0.335783204138)*x_ref[0]**o+(-0.712225782679)*x_ref[0]+(0.853426644096)*x_ref[1]**o+(-0.143845263686)*x_ref[1]
-        ref[0,2,2,1]=(0.389724375144)*x_ref[0]**o+(0.715176227705)*x_ref[0]+(-0.660690893888)*x_ref[1]**o+(0.428289724709)*x_ref[1]
-        ref[0,3,0,0]=(-0.363836203724)*x_ref[0]**o+(-0.257775427457)*x_ref[0]+(0.407904889098)*x_ref[1]**o+(-0.731273814284)*x_ref[1]
-        ref[0,3,0,1]=(0.402038262494)*x_ref[0]**o+(0.33289103638)*x_ref[0]+(0.444957562329)*x_ref[1]**o+(0.0657971935664)*x_ref[1]
-        ref[0,3,1,0]=(0.979673814602)*x_ref[0]**o+(-0.133405332848)*x_ref[0]+(0.23884689304)*x_ref[1]**o+(0.728464997681)*x_ref[1]
-        ref[0,3,1,1]=(0.724603429246)*x_ref[0]**o+(-0.391040898144)*x_ref[0]+(-0.966816499003)*x_ref[1]**o+(0.0984302578905)*x_ref[1]
-        ref[0,3,2,0]=(-0.986139645754)*x_ref[0]**o+(0.60807351165)*x_ref[0]+(0.799807413231)*x_ref[1]**o+(0.12091479711)*x_ref[1]
-        ref[0,3,2,1]=(0.387453999377)*x_ref[0]**o+(0.212725006628)*x_ref[0]+(-0.120374039139)*x_ref[1]**o+(-0.262304757951)*x_ref[1]
-        ref[0,4,0,0]=(-0.260545986276)*x_ref[0]**o+(0.251085312932)*x_ref[0]+(0.738082708518)*x_ref[1]**o+(-0.0804883797938)*x_ref[1]
-        ref[0,4,0,1]=(-0.190701356138)*x_ref[0]**o+(-0.0205295935522)*x_ref[0]+(0.904261681819)*x_ref[1]**o+(-0.859647709957)*x_ref[1]
-        ref[0,4,1,0]=(-0.945357492849)*x_ref[0]**o+(-0.85298463389)*x_ref[0]+(0.688964336673)*x_ref[1]**o+(-0.672881696932)*x_ref[1]
-        ref[0,4,1,1]=(0.877720258045)*x_ref[0]**o+(-0.361228026805)*x_ref[0]+(-0.326626527006)*x_ref[1]**o+(-0.274100421232)*x_ref[1]
-        ref[0,4,2,0]=(0.202358729084)*x_ref[0]**o+(-0.997571481837)*x_ref[0]+(0.431193711862)*x_ref[1]**o+(0.513561123915)*x_ref[1]
-        ref[0,4,2,1]=(-0.136602954592)*x_ref[0]**o+(-0.40864934437)*x_ref[0]+(0.675945574351)*x_ref[1]**o+(0.728757793536)*x_ref[1]
-        ref[1,0,0,0]=(0.835464261851)*x_ref[0]**o+(-0.131447020601)*x_ref[0]+(0.0810352521446)*x_ref[1]**o+(0.664744750899)*x_ref[1]
-        ref[1,0,0,1]=(0.239716928689)*x_ref[0]**o+(-0.192258999531)*x_ref[0]+(0.615877054036)*x_ref[1]**o+(0.835274774437)*x_ref[1]
-        ref[1,0,1,0]=(0.509342803767)*x_ref[0]**o+(-0.633944481882)*x_ref[0]+(0.262098006086)*x_ref[1]**o+(0.159902070799)*x_ref[1]
-        ref[1,0,1,1]=(0.894432440588)*x_ref[0]**o+(-0.167778431319)*x_ref[0]+(-0.984183148477)*x_ref[1]**o+(-0.554981658632)*x_ref[1]
-        ref[1,0,2,0]=(-0.762472607231)*x_ref[0]**o+(0.405550139256)*x_ref[0]+(0.4051290641)*x_ref[1]**o+(-0.27180186672)*x_ref[1]
-        ref[1,0,2,1]=(0.663869273816)*x_ref[0]**o+(0.867453974628)*x_ref[0]+(-0.279659969132)*x_ref[1]**o+(-0.370539101204)*x_ref[1]
-        ref[1,1,0,0]=(-0.969326778164)*x_ref[0]**o+(0.965471349497)*x_ref[0]+(-0.529983232946)*x_ref[1]**o+(0.714091610977)*x_ref[1]
-        ref[1,1,0,1]=(-0.840360667093)*x_ref[0]**o+(-0.399319808256)*x_ref[0]+(0.568769915582)*x_ref[1]**o+(0.872427494442)*x_ref[1]
-        ref[1,1,1,0]=(0.46099116941)*x_ref[0]**o+(-0.986008874142)*x_ref[0]+(-0.53999023556)*x_ref[1]**o+(-0.549695567855)*x_ref[1]
-        ref[1,1,1,1]=(0.485944918559)*x_ref[0]**o+(0.189773828651)*x_ref[0]+(-0.611654980493)*x_ref[1]**o+(-0.337071911657)*x_ref[1]
-        ref[1,1,2,0]=(0.191663603248)*x_ref[0]**o+(0.0906374965004)*x_ref[0]+(-0.271051598251)*x_ref[1]**o+(0.880507788825)*x_ref[1]
-        ref[1,1,2,1]=(-0.439514997001)*x_ref[0]**o+(0.701230426224)*x_ref[0]+(-0.193231641029)*x_ref[1]**o+(0.950584054332)*x_ref[1]
-        ref[1,2,0,0]=(0.439456565259)*x_ref[0]**o+(-0.25664171484)*x_ref[0]+(-0.653059819329)*x_ref[1]**o+(-0.680544747777)*x_ref[1]
-        ref[1,2,0,1]=(0.34890454443)*x_ref[0]**o+(-0.69851200963)*x_ref[0]+(-0.00159381688549)*x_ref[1]**o+(-0.612359675499)*x_ref[1]
-        ref[1,2,1,0]=(0.132759671375)*x_ref[0]**o+(-0.235126716401)*x_ref[0]+(0.652068885826)*x_ref[1]**o+(0.749698645371)*x_ref[1]
-        ref[1,2,1,1]=(0.934980403627)*x_ref[0]**o+(0.321409273437)*x_ref[0]+(-0.605909929553)*x_ref[1]**o+(0.135554927418)*x_ref[1]
-        ref[1,2,2,0]=(-0.68327709329)*x_ref[0]**o+(-0.0381292756005)*x_ref[0]+(0.710953191114)*x_ref[1]**o+(-0.344522256689)*x_ref[1]
-        ref[1,2,2,1]=(-0.813976235652)*x_ref[0]**o+(0.613879708123)*x_ref[0]+(0.451599277293)*x_ref[1]**o+(-0.6134026375)*x_ref[1]
-        ref[1,3,0,0]=(0.595310128627)*x_ref[0]**o+(-0.247621573131)*x_ref[0]+(0.165607783104)*x_ref[1]**o+(0.578132180805)*x_ref[1]
-        ref[1,3,0,1]=(0.848827238882)*x_ref[0]**o+(0.173154067999)*x_ref[0]+(0.340662419437)*x_ref[1]**o+(-0.389656447251)*x_ref[1]
-        ref[1,3,1,0]=(0.250888415228)*x_ref[0]**o+(-0.278203136198)*x_ref[0]+(-0.693211186734)*x_ref[1]**o+(0.613812194735)*x_ref[1]
-        ref[1,3,1,1]=(0.634533003162)*x_ref[0]**o+(-0.0924665762471)*x_ref[0]+(0.749575894384)*x_ref[1]**o+(-0.737205017415)*x_ref[1]
-        ref[1,3,2,0]=(0.607750966973)*x_ref[0]**o+(0.905016928404)*x_ref[0]+(-0.171049542163)*x_ref[1]**o+(-0.20526244601)*x_ref[1]
-        ref[1,3,2,1]=(0.723946025405)*x_ref[0]**o+(0.0157576743987)*x_ref[0]+(0.190875428312)*x_ref[1]**o+(0.407925899509)*x_ref[1]
-        ref[1,4,0,0]=(-0.561582695803)*x_ref[0]**o+(-0.350262461371)*x_ref[0]+(0.57610409872)*x_ref[1]**o+(0.881780963877)*x_ref[1]
-        ref[1,4,0,1]=(0.077066498695)*x_ref[0]**o+(0.515597802516)*x_ref[0]+(0.332011413016)*x_ref[1]**o+(0.215491334787)*x_ref[1]
-        ref[1,4,1,0]=(0.33858727737)*x_ref[0]**o+(-0.573231800768)*x_ref[0]+(-0.559915809132)*x_ref[1]**o+(0.0240869142176)*x_ref[1]
-        ref[1,4,1,1]=(-0.684581727952)*x_ref[0]**o+(0.365541904201)*x_ref[0]+(0.204252397376)*x_ref[1]**o+(0.149300766054)*x_ref[1]
-        ref[1,4,2,0]=(-0.574225088383)*x_ref[0]**o+(0.0286339776067)*x_ref[0]+(-0.358732122607)*x_ref[1]**o+(-0.416932738957)*x_ref[1]
-        ref[1,4,2,1]=(-0.308460184932)*x_ref[0]**o+(0.389214987836)*x_ref[0]+(-0.358303257031)*x_ref[1]**o+(0.348109483688)*x_ref[1]
-        ref[2,0,0,0]=(-0.811318668804)*x_ref[0]**o+(-0.298028116982)*x_ref[0]+(0.679871523483)*x_ref[1]**o+(0.958042925287)*x_ref[1]
-        ref[2,0,0,1]=(-0.616521818338)*x_ref[0]**o+(-0.0817124854496)*x_ref[0]+(0.403257366893)*x_ref[1]**o+(0.740689710435)*x_ref[1]
-        ref[2,0,1,0]=(0.271046179127)*x_ref[0]**o+(0.814928093947)*x_ref[0]+(0.423722781579)*x_ref[1]**o+(0.925333209811)*x_ref[1]
-        ref[2,0,1,1]=(0.0596651806816)*x_ref[0]**o+(0.493854605359)*x_ref[0]+(0.539998537439)*x_ref[1]**o+(-0.910865639375)*x_ref[1]
-        ref[2,0,2,0]=(0.503267602327)*x_ref[0]**o+(-0.270966471743)*x_ref[0]+(-0.342063366676)*x_ref[1]**o+(-0.975700224705)*x_ref[1]
-        ref[2,0,2,1]=(-0.0362358939195)*x_ref[0]**o+(-0.766033869339)*x_ref[0]+(0.891365100088)*x_ref[1]**o+(0.815025898929)*x_ref[1]
-        ref[2,1,0,0]=(-0.667240459984)*x_ref[0]**o+(0.8659076701)*x_ref[0]+(0.215089397562)*x_ref[1]**o+(0.464769182307)*x_ref[1]
-        ref[2,1,0,1]=(-0.298625221931)*x_ref[0]**o+(-0.504329743472)*x_ref[0]+(0.412472510208)*x_ref[1]**o+(0.241693152889)*x_ref[1]
-        ref[2,1,1,0]=(-0.670730179133)*x_ref[0]**o+(0.0201070113832)*x_ref[0]+(-0.572725898919)*x_ref[1]**o+(0.665609259014)*x_ref[1]
-        ref[2,1,1,1]=(-0.319080984089)*x_ref[0]**o+(0.0299423045224)*x_ref[0]+(0.0152311810613)*x_ref[1]**o+(-0.784646189026)*x_ref[1]
-        ref[2,1,2,0]=(0.153308789716)*x_ref[0]**o+(0.725808150613)*x_ref[0]+(0.62876493338)*x_ref[1]**o+(0.80275284252)*x_ref[1]
-        ref[2,1,2,1]=(0.804698870013)*x_ref[0]**o+(-0.631078773061)*x_ref[0]+(-0.015221975698)*x_ref[1]**o+(-0.954169686746)*x_ref[1]
-        ref[2,2,0,0]=(0.169022797498)*x_ref[0]**o+(0.733025791099)*x_ref[0]+(0.321554996633)*x_ref[1]**o+(0.292173365364)*x_ref[1]
-        ref[2,2,0,1]=(0.327345955109)*x_ref[0]**o+(0.21757823896)*x_ref[0]+(0.873027160446)*x_ref[1]**o+(-0.250192861579)*x_ref[1]
-        ref[2,2,1,0]=(0.394387190832)*x_ref[0]**o+(-0.613661883482)*x_ref[0]+(0.806965291386)*x_ref[1]**o+(0.244513244016)*x_ref[1]
-        ref[2,2,1,1]=(0.043913907536)*x_ref[0]**o+(-0.303567806424)*x_ref[0]+(0.547037093323)*x_ref[1]**o+(-0.598687385328)*x_ref[1]
-        ref[2,2,2,0]=(0.875663154787)*x_ref[0]**o+(-0.34984832772)*x_ref[0]+(0.879143174396)*x_ref[1]**o+(-0.193154051109)*x_ref[1]
-        ref[2,2,2,1]=(0.940311132918)*x_ref[0]**o+(-0.358708743382)*x_ref[0]+(0.117370945146)*x_ref[1]**o+(-0.664208034757)*x_ref[1]
-        ref[2,3,0,0]=(0.0334525660588)*x_ref[0]**o+(0.592805915255)*x_ref[0]+(-0.278216157971)*x_ref[1]**o+(0.894369967671)*x_ref[1]
-        ref[2,3,0,1]=(-0.966591106326)*x_ref[0]**o+(-0.882160390768)*x_ref[0]+(0.843982702732)*x_ref[1]**o+(0.363868921656)*x_ref[1]
-        ref[2,3,1,0]=(-0.246392342771)*x_ref[0]**o+(-0.934459096242)*x_ref[0]+(-0.472771368537)*x_ref[1]**o+(0.148854304706)*x_ref[1]
-        ref[2,3,1,1]=(0.248218424051)*x_ref[0]**o+(0.0980396576111)*x_ref[0]+(0.413322166489)*x_ref[1]**o+(0.429747261346)*x_ref[1]
-        ref[2,3,2,0]=(0.742987565733)*x_ref[0]**o+(-0.213736450136)*x_ref[0]+(0.996975741314)*x_ref[1]**o+(0.960709958665)*x_ref[1]
-        ref[2,3,2,1]=(0.436149490977)*x_ref[0]**o+(0.87632181197)*x_ref[0]+(-0.881934669912)*x_ref[1]**o+(-0.457520504175)*x_ref[1]
-        ref[2,4,0,0]=(-0.519014330693)*x_ref[0]**o+(0.938619608407)*x_ref[0]+(-0.847954563609)*x_ref[1]**o+(0.791774379621)*x_ref[1]
-        ref[2,4,0,1]=(-0.599487299453)*x_ref[0]**o+(0.977867555132)*x_ref[0]+(0.693105630579)*x_ref[1]**o+(-0.688827812942)*x_ref[1]
-        ref[2,4,1,0]=(0.955907964163)*x_ref[0]**o+(0.0724056986172)*x_ref[0]+(0.254773619772)*x_ref[1]**o+(0.0428861146964)*x_ref[1]
-        ref[2,4,1,1]=(-0.422202101998)*x_ref[0]**o+(0.803263223544)*x_ref[0]+(0.456048140785)*x_ref[1]**o+(0.0419133126183)*x_ref[1]
-        ref[2,4,2,0]=(-0.182308704781)*x_ref[0]**o+(0.862282443488)*x_ref[0]+(-0.844027007955)*x_ref[1]**o+(0.586220526376)*x_ref[1]
-        ref[2,4,2,1]=(-0.801542666229)*x_ref[0]**o+(0.903685299455)*x_ref[0]+(0.428926544377)*x_ref[1]**o+(-0.891220471549)*x_ref[1]
-        ref[3,0,0,0]=(0.602917787713)*x_ref[0]**o+(-0.592239549743)*x_ref[0]+(0.761830006718)*x_ref[1]**o+(-0.784264167777)*x_ref[1]
-        ref[3,0,0,1]=(0.819962957732)*x_ref[0]**o+(-0.455126790372)*x_ref[0]+(-0.144898728525)*x_ref[1]**o+(0.121566345339)*x_ref[1]
-        ref[3,0,1,0]=(0.570694941559)*x_ref[0]**o+(-0.505678656386)*x_ref[0]+(0.295536587355)*x_ref[1]**o+(-0.852779737814)*x_ref[1]
-        ref[3,0,1,1]=(-0.226246858753)*x_ref[0]**o+(-0.513900306228)*x_ref[0]+(-0.389483591407)*x_ref[1]**o+(-0.735105335539)*x_ref[1]
-        ref[3,0,2,0]=(0.941877610938)*x_ref[0]**o+(0.93808330298)*x_ref[0]+(0.189785162182)*x_ref[1]**o+(0.546525366304)*x_ref[1]
-        ref[3,0,2,1]=(0.10639100485)*x_ref[0]**o+(-0.773361007972)*x_ref[0]+(-0.470531427579)*x_ref[1]**o+(0.467359342808)*x_ref[1]
-        ref[3,1,0,0]=(0.857725599589)*x_ref[0]**o+(0.0881746413132)*x_ref[0]+(0.040713151152)*x_ref[1]**o+(-0.52070729883)*x_ref[1]
-        ref[3,1,0,1]=(0.266807652146)*x_ref[0]**o+(0.337496673892)*x_ref[0]+(-0.562266297445)*x_ref[1]**o+(0.326015195113)*x_ref[1]
-        ref[3,1,1,0]=(0.177275509465)*x_ref[0]**o+(-0.647855761301)*x_ref[0]+(-0.0963373631995)*x_ref[1]**o+(-0.535256252994)*x_ref[1]
-        ref[3,1,1,1]=(0.430309295606)*x_ref[0]**o+(-0.0894749557428)*x_ref[0]+(0.503470724483)*x_ref[1]**o+(-0.202361122248)*x_ref[1]
-        ref[3,1,2,0]=(0.283995014194)*x_ref[0]**o+(-0.544419907194)*x_ref[0]+(0.78478571712)*x_ref[1]**o+(0.341540664147)*x_ref[1]
-        ref[3,1,2,1]=(-0.281042869936)*x_ref[0]**o+(0.728771766492)*x_ref[0]+(-0.298974388557)*x_ref[1]**o+(-0.836789906985)*x_ref[1]
-        ref[3,2,0,0]=(-0.415323371561)*x_ref[0]**o+(0.583971137371)*x_ref[0]+(-0.265658679489)*x_ref[1]**o+(-0.432447373809)*x_ref[1]
-        ref[3,2,0,1]=(0.690486298855)*x_ref[0]**o+(0.552521632226)*x_ref[0]+(0.237622739042)*x_ref[1]**o+(-0.254513693924)*x_ref[1]
-        ref[3,2,1,0]=(0.453985687207)*x_ref[0]**o+(-0.785385580962)*x_ref[0]+(0.0190987841634)*x_ref[1]**o+(-0.7923288861)*x_ref[1]
-        ref[3,2,1,1]=(-0.964082656379)*x_ref[0]**o+(-0.806315937371)*x_ref[0]+(0.271145420366)*x_ref[1]**o+(-0.839014535945)*x_ref[1]
-        ref[3,2,2,0]=(-0.372062773997)*x_ref[0]**o+(-0.069749560567)*x_ref[0]+(-0.126310395383)*x_ref[1]**o+(0.972025865285)*x_ref[1]
-        ref[3,2,2,1]=(-0.580353020086)*x_ref[0]**o+(-0.152746821477)*x_ref[0]+(0.297553660535)*x_ref[1]**o+(0.444791568145)*x_ref[1]
-        ref[3,3,0,0]=(-0.361520029439)*x_ref[0]**o+(-0.810391070499)*x_ref[0]+(0.462123882642)*x_ref[1]**o+(-0.974534227742)*x_ref[1]
-        ref[3,3,0,1]=(0.113370617837)*x_ref[0]**o+(0.428257355435)*x_ref[0]+(-0.18656623758)*x_ref[1]**o+(0.206503327394)*x_ref[1]
-        ref[3,3,1,0]=(0.341328445689)*x_ref[0]**o+(0.34002947054)*x_ref[0]+(0.997677286362)*x_ref[1]**o+(0.43300073225)*x_ref[1]
-        ref[3,3,1,1]=(-0.513912982823)*x_ref[0]**o+(0.826573827064)*x_ref[0]+(-0.701417864085)*x_ref[1]**o+(0.567078883219)*x_ref[1]
-        ref[3,3,2,0]=(-0.325536866965)*x_ref[0]**o+(0.924405767451)*x_ref[0]+(-0.0481381954346)*x_ref[1]**o+(0.912210617073)*x_ref[1]
-        ref[3,3,2,1]=(0.491532434302)*x_ref[0]**o+(-0.584980848036)*x_ref[0]+(-0.788317530858)*x_ref[1]**o+(-0.900681893172)*x_ref[1]
-        ref[3,4,0,0]=(0.432249855148)*x_ref[0]**o+(-0.673369312552)*x_ref[0]+(0.244704845849)*x_ref[1]**o+(-0.300995595367)*x_ref[1]
-        ref[3,4,0,1]=(0.383037211984)*x_ref[0]**o+(0.299711400488)*x_ref[0]+(0.870584255454)*x_ref[1]**o+(-0.33571823329)*x_ref[1]
-        ref[3,4,1,0]=(0.737134180177)*x_ref[0]**o+(-0.101307090628)*x_ref[0]+(-0.970632061143)*x_ref[1]**o+(-0.449042684137)*x_ref[1]
-        ref[3,4,1,1]=(0.00684250643632)*x_ref[0]**o+(0.676964654022)*x_ref[0]+(0.789069834858)*x_ref[1]**o+(-0.829739508197)*x_ref[1]
-        ref[3,4,2,0]=(0.7279044944)*x_ref[0]**o+(0.215711122038)*x_ref[0]+(0.385631252632)*x_ref[1]**o+(0.629390433529)*x_ref[1]
-        ref[3,4,2,1]=(-0.380750716629)*x_ref[0]**o+(-0.413040692437)*x_ref[0]+(0.26795244639)*x_ref[1]**o+(0.492475504659)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.287160004495)*x[0]**o+(0.35112250158)*x[0]+(0.061693427026)*x[1]**o+(-0.752505628029)*x[1]+(-0.57137756028)*x[2]**o+(-0.0397598892504)*x[2]
-        arg[0,0,0,1]=(0.272799584607)*x[0]**o+(-0.569947956933)*x[0]+(0.322189261657)*x[1]**o+(-0.440552272224)*x[1]+(-0.10460241481)*x[2]**o+(-0.884848984752)*x[2]
-        arg[0,0,1,0]=(0.147766301604)*x[0]**o+(0.405651654428)*x[0]+(-0.440827209529)*x[1]**o+(-0.399952864271)*x[1]+(-0.770191009459)*x[2]**o+(-0.789853968049)*x[2]
-        arg[0,0,1,1]=(0.688053165375)*x[0]**o+(-0.154890421924)*x[0]+(0.583684164319)*x[1]**o+(-0.398082068217)*x[1]+(-0.573142923099)*x[2]**o+(-0.205271877337)*x[2]
-        arg[0,0,2,0]=(0.807043275877)*x[0]**o+(0.843046383231)*x[0]+(-0.588146471402)*x[1]**o+(0.157787304557)*x[1]+(-0.771009748568)*x[2]**o+(0.162090791609)*x[2]
-        arg[0,0,2,1]=(-0.0706800489392)*x[0]**o+(0.499961344665)*x[0]+(0.208926178797)*x[1]**o+(-0.7462472769)*x[1]+(-0.105475405648)*x[2]**o+(-0.18670229948)*x[2]
-        arg[0,1,0,0]=(-0.696657281943)*x[0]**o+(-0.0251785345759)*x[0]+(-0.579575530451)*x[1]**o+(-0.0628378665725)*x[1]+(0.668395441302)*x[2]**o+(0.813478105092)*x[2]
-        arg[0,1,0,1]=(-0.574784314876)*x[0]**o+(-0.321268045204)*x[0]+(0.160704464213)*x[1]**o+(-0.676016748103)*x[1]+(0.918971102865)*x[2]**o+(0.252082410081)*x[2]
-        arg[0,1,1,0]=(-0.905062846817)*x[0]**o+(0.788906658477)*x[0]+(-0.408807611936)*x[1]**o+(0.114686186437)*x[1]+(-0.654685568493)*x[2]**o+(0.0879202139254)*x[2]
-        arg[0,1,1,1]=(-0.68020231443)*x[0]**o+(-0.82049202902)*x[0]+(-0.958352740187)*x[1]**o+(-0.33201745802)*x[1]+(0.539810363682)*x[2]**o+(0.744988573087)*x[2]
-        arg[0,1,2,0]=(-0.960884744997)*x[0]**o+(-0.704157132503)*x[0]+(0.282236905414)*x[1]**o+(0.756363456433)*x[1]+(-0.365400101792)*x[2]**o+(0.975735846554)*x[2]
-        arg[0,1,2,1]=(-0.691780076951)*x[0]**o+(-0.952575440059)*x[0]+(-0.921247808098)*x[1]**o+(-0.88872834095)*x[1]+(0.534103013833)*x[2]**o+(-0.602295186104)*x[2]
-        arg[0,2,0,0]=(0.460698415704)*x[0]**o+(0.770243814897)*x[0]+(-0.380381727574)*x[1]**o+(0.476360845668)*x[1]+(-0.681040425102)*x[2]**o+(-0.244369435116)*x[2]
-        arg[0,2,0,1]=(0.251591652281)*x[0]**o+(0.748234919686)*x[0]+(-0.698189037307)*x[1]**o+(-0.292400412508)*x[1]+(0.613850696577)*x[2]**o+(-0.942243226834)*x[2]
-        arg[0,2,1,0]=(-0.718090066328)*x[0]**o+(-0.322499511794)*x[0]+(-0.75105623397)*x[1]**o+(0.526680271832)*x[1]+(-0.186671531793)*x[2]**o+(-0.449273875991)*x[2]
-        arg[0,2,1,1]=(-0.52165552452)*x[0]**o+(0.902446006085)*x[0]+(-0.915575172702)*x[1]**o+(-0.150816194662)*x[1]+(0.596782785689)*x[2]**o+(0.546880865642)*x[2]
-        arg[0,2,2,0]=(-0.104486704816)*x[0]**o+(0.723863699457)*x[0]+(0.758622117279)*x[1]**o+(0.372271580145)*x[1]+(-0.0820570383792)*x[2]**o+(-0.63539781104)*x[2]
-        arg[0,2,2,1]=(0.0355930823603)*x[0]**o+(0.0931942600432)*x[0]+(-0.118096985978)*x[1]**o+(0.296983782212)*x[1]+(-0.864491763712)*x[2]**o+(0.942230663978)*x[2]
-        arg[0,3,0,0]=(0.371153709815)*x[0]**o+(0.0427309083893)*x[0]+(-0.886563919084)*x[1]**o+(-0.14946513404)*x[1]+(0.80903804519)*x[2]**o+(0.69728533073)*x[2]
-        arg[0,3,0,1]=(0.0593930396142)*x[0]**o+(-0.370327974089)*x[0]+(-0.388354464683)*x[1]**o+(-0.367648771812)*x[1]+(-0.573754821458)*x[2]**o+(-0.947499155479)*x[2]
-        arg[0,3,1,0]=(-0.869817317)*x[0]**o+(0.874317772678)*x[0]+(-0.870060178375)*x[1]**o+(0.66571074524)*x[1]+(-0.669052377378)*x[2]**o+(0.940212680575)*x[2]
-        arg[0,3,1,1]=(-0.417445606772)*x[0]**o+(0.942606057619)*x[0]+(-0.133936034409)*x[1]**o+(-0.363274280866)*x[1]+(0.83487439935)*x[2]**o+(-0.108398981461)*x[2]
-        arg[0,3,2,0]=(0.363623383293)*x[0]**o+(0.624267309217)*x[0]+(0.801719984899)*x[1]**o+(0.189212370122)*x[1]+(0.464633630928)*x[2]**o+(-0.979808318438)*x[2]
-        arg[0,3,2,1]=(0.85384408805)*x[0]**o+(-0.889214754116)*x[0]+(0.164915391224)*x[1]**o+(0.0168991405201)*x[1]+(0.097171994236)*x[2]**o+(-0.146094197339)*x[2]
-        arg[0,4,0,0]=(0.778356158972)*x[0]**o+(0.910241265149)*x[0]+(0.123690863272)*x[1]**o+(0.87802121779)*x[1]+(-0.714615668595)*x[2]**o+(-0.437472831583)*x[2]
-        arg[0,4,0,1]=(-0.157185481783)*x[0]**o+(0.352802163968)*x[0]+(0.390184123612)*x[1]**o+(-0.680415093098)*x[1]+(-0.121195042454)*x[2]**o+(-0.713693712117)*x[2]
-        arg[0,4,1,0]=(0.778115668646)*x[0]**o+(-0.111729042892)*x[0]+(0.451518002735)*x[1]**o+(0.232731183374)*x[1]+(-0.764246158086)*x[2]**o+(-0.795525155328)*x[2]
-        arg[0,4,1,1]=(-0.880652367027)*x[0]**o+(-0.314966079126)*x[0]+(-0.640720373065)*x[1]**o+(0.336230541901)*x[1]+(0.566956999526)*x[2]**o+(0.74098258811)*x[2]
-        arg[0,4,2,0]=(0.908657274301)*x[0]**o+(0.636427823614)*x[0]+(0.650137414386)*x[1]**o+(0.695558379005)*x[1]+(-0.489852401087)*x[2]**o+(-0.479227108044)*x[2]
-        arg[0,4,2,1]=(0.015734241525)*x[0]**o+(0.0719884727088)*x[0]+(0.811864895261)*x[1]**o+(0.959127986784)*x[1]+(-0.238146663368)*x[2]**o+(-0.454939322571)*x[2]
-        arg[1,0,0,0]=(-0.918218246559)*x[0]**o+(-0.662787169269)*x[0]+(-0.954035144111)*x[1]**o+(-0.647264685228)*x[1]+(-0.834085960213)*x[2]**o+(-0.167541951024)*x[2]
-        arg[1,0,0,1]=(-0.670950869382)*x[0]**o+(0.826472159989)*x[0]+(0.180410872786)*x[1]**o+(-0.715162871594)*x[1]+(0.653287853169)*x[2]**o+(0.892060529625)*x[2]
-        arg[1,0,1,0]=(0.398789786407)*x[0]**o+(0.689408033554)*x[0]+(0.124338245128)*x[1]**o+(0.748280808587)*x[1]+(0.418357122274)*x[2]**o+(0.230707440075)*x[2]
-        arg[1,0,1,1]=(-0.912778964055)*x[0]**o+(0.904288708694)*x[0]+(-0.874744856901)*x[1]**o+(0.550162195719)*x[1]+(-0.7526423373)*x[2]**o+(0.820993231654)*x[2]
-        arg[1,0,2,0]=(-0.843459684648)*x[0]**o+(-0.579708764091)*x[0]+(-0.876072131849)*x[1]**o+(0.933694599696)*x[1]+(0.507781209021)*x[2]**o+(-0.719729482133)*x[2]
-        arg[1,0,2,1]=(0.594566925796)*x[0]**o+(-0.994301292358)*x[0]+(0.808114389564)*x[1]**o+(-0.970803712864)*x[1]+(0.433544910389)*x[2]**o+(0.260659440299)*x[2]
-        arg[1,1,0,0]=(0.997377553172)*x[0]**o+(0.458428616383)*x[0]+(0.357280778493)*x[1]**o+(0.349837110741)*x[1]+(-0.709592214445)*x[2]**o+(-0.630000739033)*x[2]
-        arg[1,1,0,1]=(0.121595650501)*x[0]**o+(0.40870120924)*x[0]+(0.576917123807)*x[1]**o+(-0.932268308325)*x[1]+(0.710043472116)*x[2]**o+(-0.716528412077)*x[2]
-        arg[1,1,1,0]=(-0.151416035033)*x[0]**o+(0.0255347649787)*x[0]+(-0.752987701889)*x[1]**o+(-0.480969875813)*x[1]+(-0.610514504179)*x[2]**o+(0.959274757402)*x[2]
-        arg[1,1,1,1]=(0.76695706106)*x[0]**o+(-0.0750965975512)*x[0]+(0.846833900735)*x[1]**o+(-0.105838465439)*x[1]+(0.541027486457)*x[2]**o+(0.152543017589)*x[2]
-        arg[1,1,2,0]=(0.0856977181865)*x[0]**o+(-0.188139369706)*x[0]+(0.936071565289)*x[1]**o+(-0.3958713036)*x[1]+(-0.350945878893)*x[2]**o+(0.382302674883)*x[2]
-        arg[1,1,2,1]=(0.873054234789)*x[0]**o+(-0.490869716146)*x[0]+(0.46720526212)*x[1]**o+(-0.334203412334)*x[1]+(-0.81140895636)*x[2]**o+(-0.973858971749)*x[2]
-        arg[1,2,0,0]=(-0.716676352443)*x[0]**o+(0.659821396277)*x[0]+(0.335964292954)*x[1]**o+(0.11609664773)*x[1]+(-0.889186749466)*x[2]**o+(0.454231973946)*x[2]
-        arg[1,2,0,1]=(0.367048872648)*x[0]**o+(0.276083713126)*x[0]+(0.686639128043)*x[1]**o+(-0.991414415293)*x[1]+(0.25360515964)*x[2]**o+(-0.377623315093)*x[2]
-        arg[1,2,1,0]=(-0.723089358777)*x[0]**o+(-0.516690112406)*x[0]+(0.262334273979)*x[1]**o+(0.140773502537)*x[1]+(0.447333972396)*x[2]**o+(-0.551395692966)*x[2]
-        arg[1,2,1,1]=(0.738791182491)*x[0]**o+(-0.978120626668)*x[0]+(-0.217970433713)*x[1]**o+(0.0181011067492)*x[1]+(0.756322867523)*x[2]**o+(0.495269195978)*x[2]
-        arg[1,2,2,0]=(-0.630506449854)*x[0]**o+(-0.0865482364231)*x[0]+(-0.415896403157)*x[1]**o+(-0.712833149895)*x[1]+(-0.180482789777)*x[2]**o+(0.00788290661235)*x[2]
-        arg[1,2,2,1]=(0.0946913865377)*x[0]**o+(0.752854827716)*x[0]+(0.257846220843)*x[1]**o+(-0.953926983578)*x[1]+(-0.388505920682)*x[2]**o+(-0.10751401251)*x[2]
-        arg[1,3,0,0]=(0.694014030611)*x[0]**o+(0.0433103547797)*x[0]+(-0.0805025225569)*x[1]**o+(0.389052254754)*x[1]+(-0.813210939614)*x[2]**o+(-0.593788787896)*x[2]
-        arg[1,3,0,1]=(0.0101606353406)*x[0]**o+(-0.849874258855)*x[0]+(-0.0578973959381)*x[1]**o+(0.942113140424)*x[1]+(0.613716459216)*x[2]**o+(0.72631176833)*x[2]
-        arg[1,3,1,0]=(0.264703608811)*x[0]**o+(0.457962548326)*x[0]+(-0.433795242673)*x[1]**o+(0.650995712848)*x[1]+(0.372471807967)*x[2]**o+(0.00416636841047)*x[2]
-        arg[1,3,1,1]=(-0.73686451669)*x[0]**o+(-0.0425614910776)*x[0]+(-0.587820431311)*x[1]**o+(-0.377628617833)*x[1]+(-0.463964014406)*x[2]**o+(0.283273874989)*x[2]
-        arg[1,3,2,0]=(-0.689341439143)*x[0]**o+(-0.675861918889)*x[0]+(-0.918622662352)*x[1]**o+(0.740990261888)*x[1]+(0.0454007677041)*x[2]**o+(0.513623361074)*x[2]
-        arg[1,3,2,1]=(0.13229101848)*x[0]**o+(0.171873799817)*x[0]+(-0.154491174434)*x[1]**o+(0.897976884089)*x[1]+(-0.598886311821)*x[2]**o+(0.738696710918)*x[2]
-        arg[1,4,0,0]=(0.59403636966)*x[0]**o+(0.93856848969)*x[0]+(0.80164849167)*x[1]**o+(-0.753322979568)*x[1]+(-0.107098073916)*x[2]**o+(-0.623047487973)*x[2]
-        arg[1,4,0,1]=(0.291046099082)*x[0]**o+(-0.437982471049)*x[0]+(0.017395762947)*x[1]**o+(0.852440593923)*x[1]+(0.630825424359)*x[2]**o+(0.419347491727)*x[2]
-        arg[1,4,1,0]=(-0.747962012701)*x[0]**o+(-0.11622032094)*x[0]+(0.324950549781)*x[1]**o+(0.950911398327)*x[1]+(-0.18098990205)*x[2]**o+(-0.676060633522)*x[2]
-        arg[1,4,1,1]=(0.545224363128)*x[0]**o+(0.753376367121)*x[0]+(0.271426695753)*x[1]**o+(-0.139309844675)*x[1]+(-0.923434716375)*x[2]**o+(-0.985988324389)*x[2]
-        arg[1,4,2,0]=(-0.532260822047)*x[0]**o+(0.901407135724)*x[0]+(0.937451330141)*x[1]**o+(0.285217666559)*x[1]+(-0.133028984824)*x[2]**o+(0.993965133696)*x[2]
-        arg[1,4,2,1]=(0.2231815607)*x[0]**o+(0.994845537582)*x[0]+(0.0368727378195)*x[1]**o+(0.511772933777)*x[1]+(-0.871580215976)*x[2]**o+(-0.587010057329)*x[2]
-        arg[2,0,0,0]=(-0.55149411913)*x[0]**o+(-0.905541278559)*x[0]+(0.461217373096)*x[1]**o+(-0.53359853241)*x[1]+(-0.666643290883)*x[2]**o+(0.151495826926)*x[2]
-        arg[2,0,0,1]=(-0.980485062148)*x[0]**o+(0.150165616162)*x[0]+(0.59165725487)*x[1]**o+(-0.243853536017)*x[1]+(0.66816261686)*x[2]**o+(0.2425696131)*x[2]
-        arg[2,0,1,0]=(-0.509337213758)*x[0]**o+(0.652936706687)*x[0]+(-0.849214338091)*x[1]**o+(-0.523354123549)*x[1]+(0.371515689887)*x[2]**o+(0.799989815414)*x[2]
-        arg[2,0,1,1]=(0.461584544541)*x[0]**o+(0.662931355954)*x[0]+(0.744415634786)*x[1]**o+(-0.016743801256)*x[1]+(0.172945846325)*x[2]**o+(-0.0889827089341)*x[2]
-        arg[2,0,2,0]=(0.506514791562)*x[0]**o+(0.974477160694)*x[0]+(-0.968485343167)*x[1]**o+(0.427480013599)*x[1]+(0.0460755879358)*x[2]**o+(0.186500994948)*x[2]
-        arg[2,0,2,1]=(0.259831607993)*x[0]**o+(-0.0141290444125)*x[0]+(-0.968452177682)*x[1]**o+(0.635619125009)*x[1]+(-0.958848431827)*x[2]**o+(-0.0977241523308)*x[2]
-        arg[2,1,0,0]=(0.204233222933)*x[0]**o+(0.834739381877)*x[0]+(0.19961185048)*x[1]**o+(-0.238470380578)*x[1]+(-0.749979713773)*x[2]**o+(-0.268168886251)*x[2]
-        arg[2,1,0,1]=(0.998123643088)*x[0]**o+(0.635823733041)*x[0]+(-0.265447124419)*x[1]**o+(-0.225582751946)*x[1]+(0.91705937439)*x[2]**o+(-0.739461510792)*x[2]
-        arg[2,1,1,0]=(0.0800715288646)*x[0]**o+(-0.37677196659)*x[0]+(-0.0737286350219)*x[1]**o+(0.032076062933)*x[1]+(0.245421912709)*x[2]**o+(-0.8378023935)*x[2]
-        arg[2,1,1,1]=(-0.572376055603)*x[0]**o+(0.8675468469)*x[0]+(-0.533012889867)*x[1]**o+(-0.247215658297)*x[1]+(0.673144564693)*x[2]**o+(-0.749136108985)*x[2]
-        arg[2,1,2,0]=(-0.661188192488)*x[0]**o+(-0.924435593008)*x[0]+(-0.791845808916)*x[1]**o+(0.00133765351092)*x[1]+(0.233676862873)*x[2]**o+(0.981812737962)*x[2]
-        arg[2,1,2,1]=(0.332072445986)*x[0]**o+(-0.909373798588)*x[0]+(0.927025647819)*x[1]**o+(-0.936348942617)*x[1]+(0.251508592152)*x[2]**o+(-0.468147973987)*x[2]
-        arg[2,2,0,0]=(0.892377893841)*x[0]**o+(-0.147933293091)*x[0]+(0.950491102076)*x[1]**o+(0.595250355926)*x[1]+(0.0169764649992)*x[2]**o+(-0.683137752586)*x[2]
-        arg[2,2,0,1]=(0.00579397005645)*x[0]**o+(0.627197373917)*x[0]+(0.663574756196)*x[1]**o+(0.934106767513)*x[1]+(0.105844878022)*x[2]**o+(0.513322917688)*x[2]
-        arg[2,2,1,0]=(-0.168776016133)*x[0]**o+(-0.940071612944)*x[0]+(0.0366053554566)*x[1]**o+(-0.628010909771)*x[1]+(0.250023045906)*x[2]**o+(-0.00327322332166)*x[2]
-        arg[2,2,1,1]=(0.904155764376)*x[0]**o+(-0.258018307306)*x[0]+(0.65862820521)*x[1]**o+(0.434480798515)*x[1]+(0.4089419173)*x[2]**o+(-0.518032695598)*x[2]
-        arg[2,2,2,0]=(-0.41470070958)*x[0]**o+(-0.783186751952)*x[0]+(0.548309561942)*x[1]**o+(0.837130592803)*x[1]+(-0.346808491848)*x[2]**o+(0.165416040985)*x[2]
-        arg[2,2,2,1]=(0.997845909195)*x[0]**o+(0.448428042158)*x[0]+(-0.657050004311)*x[1]**o+(0.493104851747)*x[1]+(0.558315071197)*x[2]**o+(0.206659432923)*x[2]
-        arg[2,3,0,0]=(0.433874360232)*x[0]**o+(-0.0635646197131)*x[0]+(-0.521690521523)*x[1]**o+(-0.298130684888)*x[1]+(-0.131905313644)*x[2]**o+(0.64389451112)*x[2]
-        arg[2,3,0,1]=(0.457729315216)*x[0]**o+(-0.419323242135)*x[0]+(0.614544051135)*x[1]**o+(-0.701671999275)*x[1]+(0.905494300727)*x[2]**o+(-0.565716985337)*x[2]
-        arg[2,3,1,0]=(0.256570728097)*x[0]**o+(0.866349285103)*x[0]+(-0.115768354896)*x[1]**o+(-0.613044456549)*x[1]+(-0.20074185156)*x[2]**o+(-0.188403571776)*x[2]
-        arg[2,3,1,1]=(0.767479943414)*x[0]**o+(0.884066215007)*x[0]+(0.363855420056)*x[1]**o+(0.919698981104)*x[1]+(0.225747762317)*x[2]**o+(-0.220362271104)*x[2]
-        arg[2,3,2,0]=(-0.746469501382)*x[0]**o+(0.680520398001)*x[0]+(0.926950996325)*x[1]**o+(-0.122831303044)*x[1]+(-0.27226561675)*x[2]**o+(0.933304087951)*x[2]
-        arg[2,3,2,1]=(-0.0961434747216)*x[0]**o+(0.987660516767)*x[0]+(0.288175205045)*x[1]**o+(0.683720820403)*x[1]+(0.354403143642)*x[2]**o+(-0.745694089132)*x[2]
-        arg[2,4,0,0]=(0.921750835986)*x[0]**o+(-0.0358861598394)*x[0]+(0.190129645259)*x[1]**o+(0.377067803331)*x[1]+(-0.0188615236582)*x[2]**o+(0.804533888824)*x[2]
-        arg[2,4,0,1]=(-0.256132234484)*x[0]**o+(-0.102661411017)*x[0]+(-0.903465157009)*x[1]**o+(0.50133310168)*x[1]+(-0.0889102598619)*x[2]**o+(-0.0310174238365)*x[2]
-        arg[2,4,1,0]=(0.58483798855)*x[0]**o+(0.967943344305)*x[0]+(-0.0701080005438)*x[1]**o+(0.489476104406)*x[1]+(0.615308427038)*x[2]**o+(-0.38065505709)*x[2]
-        arg[2,4,1,1]=(0.647734130724)*x[0]**o+(-0.930934392719)*x[0]+(0.267370540491)*x[1]**o+(-0.0175019424556)*x[1]+(0.38593657129)*x[2]**o+(-0.985922292359)*x[2]
-        arg[2,4,2,0]=(-0.289971479933)*x[0]**o+(0.882014313157)*x[0]+(0.147321067579)*x[1]**o+(-0.176771838489)*x[1]+(0.710916531544)*x[2]**o+(-0.0856290170401)*x[2]
-        arg[2,4,2,1]=(-0.465930997733)*x[0]**o+(-0.305563942094)*x[0]+(-0.824535262061)*x[1]**o+(-0.917892226972)*x[1]+(0.624462871955)*x[2]**o+(0.544736500065)*x[2]
-        arg[3,0,0,0]=(-0.673230815097)*x[0]**o+(-0.726292712917)*x[0]+(0.0531037021688)*x[1]**o+(-0.467219030159)*x[1]+(-0.0729861369718)*x[2]**o+(-0.440394335015)*x[2]
-        arg[3,0,0,1]=(-0.358235295558)*x[0]**o+(-0.301184713671)*x[0]+(-0.496030649086)*x[1]**o+(-0.125922184777)*x[1]+(0.946715036973)*x[2]**o+(0.846370337893)*x[2]
-        arg[3,0,1,0]=(-0.394175109612)*x[0]**o+(-0.85137582307)*x[0]+(-0.667804785044)*x[1]**o+(0.156762109891)*x[1]+(-0.616444700525)*x[2]**o+(0.0738729399356)*x[2]
-        arg[3,0,1,1]=(-0.652875462534)*x[0]**o+(-0.0605650192541)*x[0]+(0.840539933823)*x[1]**o+(-0.422819423301)*x[1]+(0.113440226819)*x[2]**o+(-0.915154532306)*x[2]
-        arg[3,0,2,0]=(-0.162863352328)*x[0]**o+(-0.364461332292)*x[0]+(-0.222181741398)*x[1]**o+(-0.563668008365)*x[1]+(0.118491770105)*x[2]**o+(0.0809155053022)*x[2]
-        arg[3,0,2,1]=(-0.985278929437)*x[0]**o+(-0.919440760157)*x[0]+(-0.776910686)*x[1]**o+(-0.884270488943)*x[1]+(0.984279010363)*x[2]**o+(-0.489503278582)*x[2]
-        arg[3,1,0,0]=(-0.806565449823)*x[0]**o+(-0.0851385375281)*x[0]+(-0.88851381773)*x[1]**o+(-0.666539867528)*x[1]+(0.154825531411)*x[2]**o+(0.764069849144)*x[2]
-        arg[3,1,0,1]=(-0.222125783918)*x[0]**o+(0.568035675467)*x[0]+(0.470171778932)*x[1]**o+(-0.307608710881)*x[1]+(-0.836083742471)*x[2]**o+(0.553597553381)*x[2]
-        arg[3,1,1,0]=(0.431237389847)*x[0]**o+(-0.141391012471)*x[0]+(0.726895025519)*x[1]**o+(-0.527868751679)*x[1]+(0.711761083137)*x[2]**o+(0.996992864103)*x[2]
-        arg[3,1,1,1]=(-0.123885959924)*x[0]**o+(0.877034475529)*x[0]+(-0.0432492682928)*x[1]**o+(-0.370315494618)*x[1]+(0.243139719071)*x[2]**o+(-0.684318634902)*x[2]
-        arg[3,1,2,0]=(-0.477214489355)*x[0]**o+(0.340808576619)*x[0]+(-0.0991802306558)*x[1]**o+(0.462599821908)*x[1]+(0.091768281564)*x[2]**o+(0.0315552838839)*x[2]
-        arg[3,1,2,1]=(0.676189142894)*x[0]**o+(0.510136386913)*x[0]+(-0.558579041952)*x[1]**o+(0.961615047877)*x[1]+(0.510717386124)*x[2]**o+(0.774430183432)*x[2]
-        arg[3,2,0,0]=(0.158370232444)*x[0]**o+(0.209424855992)*x[0]+(0.691438753013)*x[1]**o+(-0.781594298738)*x[1]+(-0.0188536627517)*x[2]**o+(0.136400798995)*x[2]
-        arg[3,2,0,1]=(-0.440674414328)*x[0]**o+(0.118228612687)*x[0]+(-0.700026492613)*x[1]**o+(-0.981341215714)*x[1]+(-0.172847519578)*x[2]**o+(-0.423095202172)*x[2]
-        arg[3,2,1,0]=(-0.0694960391695)*x[0]**o+(-0.66448610135)*x[0]+(-0.177572703748)*x[1]**o+(-0.060488161727)*x[1]+(0.306021853885)*x[2]**o+(0.0730338716187)*x[2]
-        arg[3,2,1,1]=(-0.360662154547)*x[0]**o+(0.577679359648)*x[0]+(-0.515313534966)*x[1]**o+(0.217352687358)*x[1]+(0.728367577882)*x[2]**o+(0.38505849834)*x[2]
-        arg[3,2,2,0]=(0.568671861232)*x[0]**o+(-0.0792490917882)*x[0]+(0.0188002885229)*x[1]**o+(-0.956862575759)*x[1]+(-0.844332442983)*x[2]**o+(0.670792928042)*x[2]
-        arg[3,2,2,1]=(0.833099204713)*x[0]**o+(0.368482169933)*x[0]+(-0.926002498892)*x[1]**o+(-0.130646446568)*x[1]+(0.81164928914)*x[2]**o+(-0.641079919927)*x[2]
-        arg[3,3,0,0]=(-0.277769350989)*x[0]**o+(0.753452018649)*x[0]+(-0.766322344505)*x[1]**o+(-0.679108224612)*x[1]+(0.0799499795424)*x[2]**o+(0.255751308975)*x[2]
-        arg[3,3,0,1]=(0.429176753733)*x[0]**o+(0.123106050259)*x[0]+(-0.169037728992)*x[1]**o+(0.749245933687)*x[1]+(0.560140859355)*x[2]**o+(-0.937091840021)*x[2]
-        arg[3,3,1,0]=(0.648792557593)*x[0]**o+(-0.057555187513)*x[0]+(0.883290331726)*x[1]**o+(0.539276905995)*x[1]+(0.473614408583)*x[2]**o+(0.723258340333)*x[2]
-        arg[3,3,1,1]=(0.527298833572)*x[0]**o+(0.0753824058279)*x[0]+(0.719196099257)*x[1]**o+(-0.0124603350035)*x[1]+(-0.964484650253)*x[2]**o+(0.404444269694)*x[2]
-        arg[3,3,2,0]=(-0.403640677462)*x[0]**o+(0.906195964766)*x[0]+(-0.561419078404)*x[1]**o+(0.645408717838)*x[1]+(0.671624799609)*x[2]**o+(-0.573901868621)*x[2]
-        arg[3,3,2,1]=(-0.288117182165)*x[0]**o+(-0.391003584945)*x[0]+(-0.555037182038)*x[1]**o+(0.299362209017)*x[1]+(-0.552429724326)*x[2]**o+(-0.416923306774)*x[2]
-        arg[3,4,0,0]=(-0.19594719192)*x[0]**o+(0.150898934692)*x[0]+(0.210935232044)*x[1]**o+(-0.319764293347)*x[1]+(-0.642450751195)*x[2]**o+(0.22231085168)*x[2]
-        arg[3,4,0,1]=(-0.0514589460225)*x[0]**o+(0.0366025646754)*x[0]+(0.416280576691)*x[1]**o+(0.609178063951)*x[1]+(0.835611677062)*x[2]**o+(-0.131630571478)*x[2]
-        arg[3,4,1,0]=(0.171509152214)*x[0]**o+(-0.761188271093)*x[0]+(-0.915951802896)*x[1]**o+(-0.451796709915)*x[1]+(-0.979847828162)*x[2]**o+(0.0566453393315)*x[2]
-        arg[3,4,1,1]=(0.690427998102)*x[0]**o+(-0.358318625695)*x[0]+(0.330270871613)*x[1]**o+(-0.724392522137)*x[1]+(-0.535474623489)*x[2]**o+(-0.12341743885)*x[2]
-        arg[3,4,2,0]=(0.488090753426)*x[0]**o+(-0.352417078372)*x[0]+(0.971988099319)*x[1]**o+(-0.288929516009)*x[1]+(0.612576734094)*x[2]**o+(-0.43799514603)*x[2]
-        arg[3,4,2,1]=(-0.098768101356)*x[0]**o+(0.123300661895)*x[0]+(-0.0489724280789)*x[1]**o+(-0.422508669137)*x[1]+(-0.861483104139)*x[2]**o+(0.950198316001)*x[2]
-        ref[0,0,0,0]=(0.287160004495)*x_ref[0]**o+(0.35112250158)*x_ref[0]+(0.061693427026)*x_ref[1]**o+(-0.752505628029)*x_ref[1]+(-0.57137756028)*x_ref[2]**o+(-0.0397598892504)*x_ref[2]
-        ref[0,0,0,1]=(0.272799584607)*x_ref[0]**o+(-0.569947956933)*x_ref[0]+(0.322189261657)*x_ref[1]**o+(-0.440552272224)*x_ref[1]+(-0.10460241481)*x_ref[2]**o+(-0.884848984752)*x_ref[2]
-        ref[0,0,1,0]=(0.147766301604)*x_ref[0]**o+(0.405651654428)*x_ref[0]+(-0.440827209529)*x_ref[1]**o+(-0.399952864271)*x_ref[1]+(-0.770191009459)*x_ref[2]**o+(-0.789853968049)*x_ref[2]
-        ref[0,0,1,1]=(0.688053165375)*x_ref[0]**o+(-0.154890421924)*x_ref[0]+(0.583684164319)*x_ref[1]**o+(-0.398082068217)*x_ref[1]+(-0.573142923099)*x_ref[2]**o+(-0.205271877337)*x_ref[2]
-        ref[0,0,2,0]=(0.807043275877)*x_ref[0]**o+(0.843046383231)*x_ref[0]+(-0.588146471402)*x_ref[1]**o+(0.157787304557)*x_ref[1]+(-0.771009748568)*x_ref[2]**o+(0.162090791609)*x_ref[2]
-        ref[0,0,2,1]=(-0.0706800489392)*x_ref[0]**o+(0.499961344665)*x_ref[0]+(0.208926178797)*x_ref[1]**o+(-0.7462472769)*x_ref[1]+(-0.105475405648)*x_ref[2]**o+(-0.18670229948)*x_ref[2]
-        ref[0,1,0,0]=(-0.696657281943)*x_ref[0]**o+(-0.0251785345759)*x_ref[0]+(-0.579575530451)*x_ref[1]**o+(-0.0628378665725)*x_ref[1]+(0.668395441302)*x_ref[2]**o+(0.813478105092)*x_ref[2]
-        ref[0,1,0,1]=(-0.574784314876)*x_ref[0]**o+(-0.321268045204)*x_ref[0]+(0.160704464213)*x_ref[1]**o+(-0.676016748103)*x_ref[1]+(0.918971102865)*x_ref[2]**o+(0.252082410081)*x_ref[2]
-        ref[0,1,1,0]=(-0.905062846817)*x_ref[0]**o+(0.788906658477)*x_ref[0]+(-0.408807611936)*x_ref[1]**o+(0.114686186437)*x_ref[1]+(-0.654685568493)*x_ref[2]**o+(0.0879202139254)*x_ref[2]
-        ref[0,1,1,1]=(-0.68020231443)*x_ref[0]**o+(-0.82049202902)*x_ref[0]+(-0.958352740187)*x_ref[1]**o+(-0.33201745802)*x_ref[1]+(0.539810363682)*x_ref[2]**o+(0.744988573087)*x_ref[2]
-        ref[0,1,2,0]=(-0.960884744997)*x_ref[0]**o+(-0.704157132503)*x_ref[0]+(0.282236905414)*x_ref[1]**o+(0.756363456433)*x_ref[1]+(-0.365400101792)*x_ref[2]**o+(0.975735846554)*x_ref[2]
-        ref[0,1,2,1]=(-0.691780076951)*x_ref[0]**o+(-0.952575440059)*x_ref[0]+(-0.921247808098)*x_ref[1]**o+(-0.88872834095)*x_ref[1]+(0.534103013833)*x_ref[2]**o+(-0.602295186104)*x_ref[2]
-        ref[0,2,0,0]=(0.460698415704)*x_ref[0]**o+(0.770243814897)*x_ref[0]+(-0.380381727574)*x_ref[1]**o+(0.476360845668)*x_ref[1]+(-0.681040425102)*x_ref[2]**o+(-0.244369435116)*x_ref[2]
-        ref[0,2,0,1]=(0.251591652281)*x_ref[0]**o+(0.748234919686)*x_ref[0]+(-0.698189037307)*x_ref[1]**o+(-0.292400412508)*x_ref[1]+(0.613850696577)*x_ref[2]**o+(-0.942243226834)*x_ref[2]
-        ref[0,2,1,0]=(-0.718090066328)*x_ref[0]**o+(-0.322499511794)*x_ref[0]+(-0.75105623397)*x_ref[1]**o+(0.526680271832)*x_ref[1]+(-0.186671531793)*x_ref[2]**o+(-0.449273875991)*x_ref[2]
-        ref[0,2,1,1]=(-0.52165552452)*x_ref[0]**o+(0.902446006085)*x_ref[0]+(-0.915575172702)*x_ref[1]**o+(-0.150816194662)*x_ref[1]+(0.596782785689)*x_ref[2]**o+(0.546880865642)*x_ref[2]
-        ref[0,2,2,0]=(-0.104486704816)*x_ref[0]**o+(0.723863699457)*x_ref[0]+(0.758622117279)*x_ref[1]**o+(0.372271580145)*x_ref[1]+(-0.0820570383792)*x_ref[2]**o+(-0.63539781104)*x_ref[2]
-        ref[0,2,2,1]=(0.0355930823603)*x_ref[0]**o+(0.0931942600432)*x_ref[0]+(-0.118096985978)*x_ref[1]**o+(0.296983782212)*x_ref[1]+(-0.864491763712)*x_ref[2]**o+(0.942230663978)*x_ref[2]
-        ref[0,3,0,0]=(0.371153709815)*x_ref[0]**o+(0.0427309083893)*x_ref[0]+(-0.886563919084)*x_ref[1]**o+(-0.14946513404)*x_ref[1]+(0.80903804519)*x_ref[2]**o+(0.69728533073)*x_ref[2]
-        ref[0,3,0,1]=(0.0593930396142)*x_ref[0]**o+(-0.370327974089)*x_ref[0]+(-0.388354464683)*x_ref[1]**o+(-0.367648771812)*x_ref[1]+(-0.573754821458)*x_ref[2]**o+(-0.947499155479)*x_ref[2]
-        ref[0,3,1,0]=(-0.869817317)*x_ref[0]**o+(0.874317772678)*x_ref[0]+(-0.870060178375)*x_ref[1]**o+(0.66571074524)*x_ref[1]+(-0.669052377378)*x_ref[2]**o+(0.940212680575)*x_ref[2]
-        ref[0,3,1,1]=(-0.417445606772)*x_ref[0]**o+(0.942606057619)*x_ref[0]+(-0.133936034409)*x_ref[1]**o+(-0.363274280866)*x_ref[1]+(0.83487439935)*x_ref[2]**o+(-0.108398981461)*x_ref[2]
-        ref[0,3,2,0]=(0.363623383293)*x_ref[0]**o+(0.624267309217)*x_ref[0]+(0.801719984899)*x_ref[1]**o+(0.189212370122)*x_ref[1]+(0.464633630928)*x_ref[2]**o+(-0.979808318438)*x_ref[2]
-        ref[0,3,2,1]=(0.85384408805)*x_ref[0]**o+(-0.889214754116)*x_ref[0]+(0.164915391224)*x_ref[1]**o+(0.0168991405201)*x_ref[1]+(0.097171994236)*x_ref[2]**o+(-0.146094197339)*x_ref[2]
-        ref[0,4,0,0]=(0.778356158972)*x_ref[0]**o+(0.910241265149)*x_ref[0]+(0.123690863272)*x_ref[1]**o+(0.87802121779)*x_ref[1]+(-0.714615668595)*x_ref[2]**o+(-0.437472831583)*x_ref[2]
-        ref[0,4,0,1]=(-0.157185481783)*x_ref[0]**o+(0.352802163968)*x_ref[0]+(0.390184123612)*x_ref[1]**o+(-0.680415093098)*x_ref[1]+(-0.121195042454)*x_ref[2]**o+(-0.713693712117)*x_ref[2]
-        ref[0,4,1,0]=(0.778115668646)*x_ref[0]**o+(-0.111729042892)*x_ref[0]+(0.451518002735)*x_ref[1]**o+(0.232731183374)*x_ref[1]+(-0.764246158086)*x_ref[2]**o+(-0.795525155328)*x_ref[2]
-        ref[0,4,1,1]=(-0.880652367027)*x_ref[0]**o+(-0.314966079126)*x_ref[0]+(-0.640720373065)*x_ref[1]**o+(0.336230541901)*x_ref[1]+(0.566956999526)*x_ref[2]**o+(0.74098258811)*x_ref[2]
-        ref[0,4,2,0]=(0.908657274301)*x_ref[0]**o+(0.636427823614)*x_ref[0]+(0.650137414386)*x_ref[1]**o+(0.695558379005)*x_ref[1]+(-0.489852401087)*x_ref[2]**o+(-0.479227108044)*x_ref[2]
-        ref[0,4,2,1]=(0.015734241525)*x_ref[0]**o+(0.0719884727088)*x_ref[0]+(0.811864895261)*x_ref[1]**o+(0.959127986784)*x_ref[1]+(-0.238146663368)*x_ref[2]**o+(-0.454939322571)*x_ref[2]
-        ref[1,0,0,0]=(-0.918218246559)*x_ref[0]**o+(-0.662787169269)*x_ref[0]+(-0.954035144111)*x_ref[1]**o+(-0.647264685228)*x_ref[1]+(-0.834085960213)*x_ref[2]**o+(-0.167541951024)*x_ref[2]
-        ref[1,0,0,1]=(-0.670950869382)*x_ref[0]**o+(0.826472159989)*x_ref[0]+(0.180410872786)*x_ref[1]**o+(-0.715162871594)*x_ref[1]+(0.653287853169)*x_ref[2]**o+(0.892060529625)*x_ref[2]
-        ref[1,0,1,0]=(0.398789786407)*x_ref[0]**o+(0.689408033554)*x_ref[0]+(0.124338245128)*x_ref[1]**o+(0.748280808587)*x_ref[1]+(0.418357122274)*x_ref[2]**o+(0.230707440075)*x_ref[2]
-        ref[1,0,1,1]=(-0.912778964055)*x_ref[0]**o+(0.904288708694)*x_ref[0]+(-0.874744856901)*x_ref[1]**o+(0.550162195719)*x_ref[1]+(-0.7526423373)*x_ref[2]**o+(0.820993231654)*x_ref[2]
-        ref[1,0,2,0]=(-0.843459684648)*x_ref[0]**o+(-0.579708764091)*x_ref[0]+(-0.876072131849)*x_ref[1]**o+(0.933694599696)*x_ref[1]+(0.507781209021)*x_ref[2]**o+(-0.719729482133)*x_ref[2]
-        ref[1,0,2,1]=(0.594566925796)*x_ref[0]**o+(-0.994301292358)*x_ref[0]+(0.808114389564)*x_ref[1]**o+(-0.970803712864)*x_ref[1]+(0.433544910389)*x_ref[2]**o+(0.260659440299)*x_ref[2]
-        ref[1,1,0,0]=(0.997377553172)*x_ref[0]**o+(0.458428616383)*x_ref[0]+(0.357280778493)*x_ref[1]**o+(0.349837110741)*x_ref[1]+(-0.709592214445)*x_ref[2]**o+(-0.630000739033)*x_ref[2]
-        ref[1,1,0,1]=(0.121595650501)*x_ref[0]**o+(0.40870120924)*x_ref[0]+(0.576917123807)*x_ref[1]**o+(-0.932268308325)*x_ref[1]+(0.710043472116)*x_ref[2]**o+(-0.716528412077)*x_ref[2]
-        ref[1,1,1,0]=(-0.151416035033)*x_ref[0]**o+(0.0255347649787)*x_ref[0]+(-0.752987701889)*x_ref[1]**o+(-0.480969875813)*x_ref[1]+(-0.610514504179)*x_ref[2]**o+(0.959274757402)*x_ref[2]
-        ref[1,1,1,1]=(0.76695706106)*x_ref[0]**o+(-0.0750965975512)*x_ref[0]+(0.846833900735)*x_ref[1]**o+(-0.105838465439)*x_ref[1]+(0.541027486457)*x_ref[2]**o+(0.152543017589)*x_ref[2]
-        ref[1,1,2,0]=(0.0856977181865)*x_ref[0]**o+(-0.188139369706)*x_ref[0]+(0.936071565289)*x_ref[1]**o+(-0.3958713036)*x_ref[1]+(-0.350945878893)*x_ref[2]**o+(0.382302674883)*x_ref[2]
-        ref[1,1,2,1]=(0.873054234789)*x_ref[0]**o+(-0.490869716146)*x_ref[0]+(0.46720526212)*x_ref[1]**o+(-0.334203412334)*x_ref[1]+(-0.81140895636)*x_ref[2]**o+(-0.973858971749)*x_ref[2]
-        ref[1,2,0,0]=(-0.716676352443)*x_ref[0]**o+(0.659821396277)*x_ref[0]+(0.335964292954)*x_ref[1]**o+(0.11609664773)*x_ref[1]+(-0.889186749466)*x_ref[2]**o+(0.454231973946)*x_ref[2]
-        ref[1,2,0,1]=(0.367048872648)*x_ref[0]**o+(0.276083713126)*x_ref[0]+(0.686639128043)*x_ref[1]**o+(-0.991414415293)*x_ref[1]+(0.25360515964)*x_ref[2]**o+(-0.377623315093)*x_ref[2]
-        ref[1,2,1,0]=(-0.723089358777)*x_ref[0]**o+(-0.516690112406)*x_ref[0]+(0.262334273979)*x_ref[1]**o+(0.140773502537)*x_ref[1]+(0.447333972396)*x_ref[2]**o+(-0.551395692966)*x_ref[2]
-        ref[1,2,1,1]=(0.738791182491)*x_ref[0]**o+(-0.978120626668)*x_ref[0]+(-0.217970433713)*x_ref[1]**o+(0.0181011067492)*x_ref[1]+(0.756322867523)*x_ref[2]**o+(0.495269195978)*x_ref[2]
-        ref[1,2,2,0]=(-0.630506449854)*x_ref[0]**o+(-0.0865482364231)*x_ref[0]+(-0.415896403157)*x_ref[1]**o+(-0.712833149895)*x_ref[1]+(-0.180482789777)*x_ref[2]**o+(0.00788290661235)*x_ref[2]
-        ref[1,2,2,1]=(0.0946913865377)*x_ref[0]**o+(0.752854827716)*x_ref[0]+(0.257846220843)*x_ref[1]**o+(-0.953926983578)*x_ref[1]+(-0.388505920682)*x_ref[2]**o+(-0.10751401251)*x_ref[2]
-        ref[1,3,0,0]=(0.694014030611)*x_ref[0]**o+(0.0433103547797)*x_ref[0]+(-0.0805025225569)*x_ref[1]**o+(0.389052254754)*x_ref[1]+(-0.813210939614)*x_ref[2]**o+(-0.593788787896)*x_ref[2]
-        ref[1,3,0,1]=(0.0101606353406)*x_ref[0]**o+(-0.849874258855)*x_ref[0]+(-0.0578973959381)*x_ref[1]**o+(0.942113140424)*x_ref[1]+(0.613716459216)*x_ref[2]**o+(0.72631176833)*x_ref[2]
-        ref[1,3,1,0]=(0.264703608811)*x_ref[0]**o+(0.457962548326)*x_ref[0]+(-0.433795242673)*x_ref[1]**o+(0.650995712848)*x_ref[1]+(0.372471807967)*x_ref[2]**o+(0.00416636841047)*x_ref[2]
-        ref[1,3,1,1]=(-0.73686451669)*x_ref[0]**o+(-0.0425614910776)*x_ref[0]+(-0.587820431311)*x_ref[1]**o+(-0.377628617833)*x_ref[1]+(-0.463964014406)*x_ref[2]**o+(0.283273874989)*x_ref[2]
-        ref[1,3,2,0]=(-0.689341439143)*x_ref[0]**o+(-0.675861918889)*x_ref[0]+(-0.918622662352)*x_ref[1]**o+(0.740990261888)*x_ref[1]+(0.0454007677041)*x_ref[2]**o+(0.513623361074)*x_ref[2]
-        ref[1,3,2,1]=(0.13229101848)*x_ref[0]**o+(0.171873799817)*x_ref[0]+(-0.154491174434)*x_ref[1]**o+(0.897976884089)*x_ref[1]+(-0.598886311821)*x_ref[2]**o+(0.738696710918)*x_ref[2]
-        ref[1,4,0,0]=(0.59403636966)*x_ref[0]**o+(0.93856848969)*x_ref[0]+(0.80164849167)*x_ref[1]**o+(-0.753322979568)*x_ref[1]+(-0.107098073916)*x_ref[2]**o+(-0.623047487973)*x_ref[2]
-        ref[1,4,0,1]=(0.291046099082)*x_ref[0]**o+(-0.437982471049)*x_ref[0]+(0.017395762947)*x_ref[1]**o+(0.852440593923)*x_ref[1]+(0.630825424359)*x_ref[2]**o+(0.419347491727)*x_ref[2]
-        ref[1,4,1,0]=(-0.747962012701)*x_ref[0]**o+(-0.11622032094)*x_ref[0]+(0.324950549781)*x_ref[1]**o+(0.950911398327)*x_ref[1]+(-0.18098990205)*x_ref[2]**o+(-0.676060633522)*x_ref[2]
-        ref[1,4,1,1]=(0.545224363128)*x_ref[0]**o+(0.753376367121)*x_ref[0]+(0.271426695753)*x_ref[1]**o+(-0.139309844675)*x_ref[1]+(-0.923434716375)*x_ref[2]**o+(-0.985988324389)*x_ref[2]
-        ref[1,4,2,0]=(-0.532260822047)*x_ref[0]**o+(0.901407135724)*x_ref[0]+(0.937451330141)*x_ref[1]**o+(0.285217666559)*x_ref[1]+(-0.133028984824)*x_ref[2]**o+(0.993965133696)*x_ref[2]
-        ref[1,4,2,1]=(0.2231815607)*x_ref[0]**o+(0.994845537582)*x_ref[0]+(0.0368727378195)*x_ref[1]**o+(0.511772933777)*x_ref[1]+(-0.871580215976)*x_ref[2]**o+(-0.587010057329)*x_ref[2]
-        ref[2,0,0,0]=(-0.55149411913)*x_ref[0]**o+(-0.905541278559)*x_ref[0]+(0.461217373096)*x_ref[1]**o+(-0.53359853241)*x_ref[1]+(-0.666643290883)*x_ref[2]**o+(0.151495826926)*x_ref[2]
-        ref[2,0,0,1]=(-0.980485062148)*x_ref[0]**o+(0.150165616162)*x_ref[0]+(0.59165725487)*x_ref[1]**o+(-0.243853536017)*x_ref[1]+(0.66816261686)*x_ref[2]**o+(0.2425696131)*x_ref[2]
-        ref[2,0,1,0]=(-0.509337213758)*x_ref[0]**o+(0.652936706687)*x_ref[0]+(-0.849214338091)*x_ref[1]**o+(-0.523354123549)*x_ref[1]+(0.371515689887)*x_ref[2]**o+(0.799989815414)*x_ref[2]
-        ref[2,0,1,1]=(0.461584544541)*x_ref[0]**o+(0.662931355954)*x_ref[0]+(0.744415634786)*x_ref[1]**o+(-0.016743801256)*x_ref[1]+(0.172945846325)*x_ref[2]**o+(-0.0889827089341)*x_ref[2]
-        ref[2,0,2,0]=(0.506514791562)*x_ref[0]**o+(0.974477160694)*x_ref[0]+(-0.968485343167)*x_ref[1]**o+(0.427480013599)*x_ref[1]+(0.0460755879358)*x_ref[2]**o+(0.186500994948)*x_ref[2]
-        ref[2,0,2,1]=(0.259831607993)*x_ref[0]**o+(-0.0141290444125)*x_ref[0]+(-0.968452177682)*x_ref[1]**o+(0.635619125009)*x_ref[1]+(-0.958848431827)*x_ref[2]**o+(-0.0977241523308)*x_ref[2]
-        ref[2,1,0,0]=(0.204233222933)*x_ref[0]**o+(0.834739381877)*x_ref[0]+(0.19961185048)*x_ref[1]**o+(-0.238470380578)*x_ref[1]+(-0.749979713773)*x_ref[2]**o+(-0.268168886251)*x_ref[2]
-        ref[2,1,0,1]=(0.998123643088)*x_ref[0]**o+(0.635823733041)*x_ref[0]+(-0.265447124419)*x_ref[1]**o+(-0.225582751946)*x_ref[1]+(0.91705937439)*x_ref[2]**o+(-0.739461510792)*x_ref[2]
-        ref[2,1,1,0]=(0.0800715288646)*x_ref[0]**o+(-0.37677196659)*x_ref[0]+(-0.0737286350219)*x_ref[1]**o+(0.032076062933)*x_ref[1]+(0.245421912709)*x_ref[2]**o+(-0.8378023935)*x_ref[2]
-        ref[2,1,1,1]=(-0.572376055603)*x_ref[0]**o+(0.8675468469)*x_ref[0]+(-0.533012889867)*x_ref[1]**o+(-0.247215658297)*x_ref[1]+(0.673144564693)*x_ref[2]**o+(-0.749136108985)*x_ref[2]
-        ref[2,1,2,0]=(-0.661188192488)*x_ref[0]**o+(-0.924435593008)*x_ref[0]+(-0.791845808916)*x_ref[1]**o+(0.00133765351092)*x_ref[1]+(0.233676862873)*x_ref[2]**o+(0.981812737962)*x_ref[2]
-        ref[2,1,2,1]=(0.332072445986)*x_ref[0]**o+(-0.909373798588)*x_ref[0]+(0.927025647819)*x_ref[1]**o+(-0.936348942617)*x_ref[1]+(0.251508592152)*x_ref[2]**o+(-0.468147973987)*x_ref[2]
-        ref[2,2,0,0]=(0.892377893841)*x_ref[0]**o+(-0.147933293091)*x_ref[0]+(0.950491102076)*x_ref[1]**o+(0.595250355926)*x_ref[1]+(0.0169764649992)*x_ref[2]**o+(-0.683137752586)*x_ref[2]
-        ref[2,2,0,1]=(0.00579397005645)*x_ref[0]**o+(0.627197373917)*x_ref[0]+(0.663574756196)*x_ref[1]**o+(0.934106767513)*x_ref[1]+(0.105844878022)*x_ref[2]**o+(0.513322917688)*x_ref[2]
-        ref[2,2,1,0]=(-0.168776016133)*x_ref[0]**o+(-0.940071612944)*x_ref[0]+(0.0366053554566)*x_ref[1]**o+(-0.628010909771)*x_ref[1]+(0.250023045906)*x_ref[2]**o+(-0.00327322332166)*x_ref[2]
-        ref[2,2,1,1]=(0.904155764376)*x_ref[0]**o+(-0.258018307306)*x_ref[0]+(0.65862820521)*x_ref[1]**o+(0.434480798515)*x_ref[1]+(0.4089419173)*x_ref[2]**o+(-0.518032695598)*x_ref[2]
-        ref[2,2,2,0]=(-0.41470070958)*x_ref[0]**o+(-0.783186751952)*x_ref[0]+(0.548309561942)*x_ref[1]**o+(0.837130592803)*x_ref[1]+(-0.346808491848)*x_ref[2]**o+(0.165416040985)*x_ref[2]
-        ref[2,2,2,1]=(0.997845909195)*x_ref[0]**o+(0.448428042158)*x_ref[0]+(-0.657050004311)*x_ref[1]**o+(0.493104851747)*x_ref[1]+(0.558315071197)*x_ref[2]**o+(0.206659432923)*x_ref[2]
-        ref[2,3,0,0]=(0.433874360232)*x_ref[0]**o+(-0.0635646197131)*x_ref[0]+(-0.521690521523)*x_ref[1]**o+(-0.298130684888)*x_ref[1]+(-0.131905313644)*x_ref[2]**o+(0.64389451112)*x_ref[2]
-        ref[2,3,0,1]=(0.457729315216)*x_ref[0]**o+(-0.419323242135)*x_ref[0]+(0.614544051135)*x_ref[1]**o+(-0.701671999275)*x_ref[1]+(0.905494300727)*x_ref[2]**o+(-0.565716985337)*x_ref[2]
-        ref[2,3,1,0]=(0.256570728097)*x_ref[0]**o+(0.866349285103)*x_ref[0]+(-0.115768354896)*x_ref[1]**o+(-0.613044456549)*x_ref[1]+(-0.20074185156)*x_ref[2]**o+(-0.188403571776)*x_ref[2]
-        ref[2,3,1,1]=(0.767479943414)*x_ref[0]**o+(0.884066215007)*x_ref[0]+(0.363855420056)*x_ref[1]**o+(0.919698981104)*x_ref[1]+(0.225747762317)*x_ref[2]**o+(-0.220362271104)*x_ref[2]
-        ref[2,3,2,0]=(-0.746469501382)*x_ref[0]**o+(0.680520398001)*x_ref[0]+(0.926950996325)*x_ref[1]**o+(-0.122831303044)*x_ref[1]+(-0.27226561675)*x_ref[2]**o+(0.933304087951)*x_ref[2]
-        ref[2,3,2,1]=(-0.0961434747216)*x_ref[0]**o+(0.987660516767)*x_ref[0]+(0.288175205045)*x_ref[1]**o+(0.683720820403)*x_ref[1]+(0.354403143642)*x_ref[2]**o+(-0.745694089132)*x_ref[2]
-        ref[2,4,0,0]=(0.921750835986)*x_ref[0]**o+(-0.0358861598394)*x_ref[0]+(0.190129645259)*x_ref[1]**o+(0.377067803331)*x_ref[1]+(-0.0188615236582)*x_ref[2]**o+(0.804533888824)*x_ref[2]
-        ref[2,4,0,1]=(-0.256132234484)*x_ref[0]**o+(-0.102661411017)*x_ref[0]+(-0.903465157009)*x_ref[1]**o+(0.50133310168)*x_ref[1]+(-0.0889102598619)*x_ref[2]**o+(-0.0310174238365)*x_ref[2]
-        ref[2,4,1,0]=(0.58483798855)*x_ref[0]**o+(0.967943344305)*x_ref[0]+(-0.0701080005438)*x_ref[1]**o+(0.489476104406)*x_ref[1]+(0.615308427038)*x_ref[2]**o+(-0.38065505709)*x_ref[2]
-        ref[2,4,1,1]=(0.647734130724)*x_ref[0]**o+(-0.930934392719)*x_ref[0]+(0.267370540491)*x_ref[1]**o+(-0.0175019424556)*x_ref[1]+(0.38593657129)*x_ref[2]**o+(-0.985922292359)*x_ref[2]
-        ref[2,4,2,0]=(-0.289971479933)*x_ref[0]**o+(0.882014313157)*x_ref[0]+(0.147321067579)*x_ref[1]**o+(-0.176771838489)*x_ref[1]+(0.710916531544)*x_ref[2]**o+(-0.0856290170401)*x_ref[2]
-        ref[2,4,2,1]=(-0.465930997733)*x_ref[0]**o+(-0.305563942094)*x_ref[0]+(-0.824535262061)*x_ref[1]**o+(-0.917892226972)*x_ref[1]+(0.624462871955)*x_ref[2]**o+(0.544736500065)*x_ref[2]
-        ref[3,0,0,0]=(-0.673230815097)*x_ref[0]**o+(-0.726292712917)*x_ref[0]+(0.0531037021688)*x_ref[1]**o+(-0.467219030159)*x_ref[1]+(-0.0729861369718)*x_ref[2]**o+(-0.440394335015)*x_ref[2]
-        ref[3,0,0,1]=(-0.358235295558)*x_ref[0]**o+(-0.301184713671)*x_ref[0]+(-0.496030649086)*x_ref[1]**o+(-0.125922184777)*x_ref[1]+(0.946715036973)*x_ref[2]**o+(0.846370337893)*x_ref[2]
-        ref[3,0,1,0]=(-0.394175109612)*x_ref[0]**o+(-0.85137582307)*x_ref[0]+(-0.667804785044)*x_ref[1]**o+(0.156762109891)*x_ref[1]+(-0.616444700525)*x_ref[2]**o+(0.0738729399356)*x_ref[2]
-        ref[3,0,1,1]=(-0.652875462534)*x_ref[0]**o+(-0.0605650192541)*x_ref[0]+(0.840539933823)*x_ref[1]**o+(-0.422819423301)*x_ref[1]+(0.113440226819)*x_ref[2]**o+(-0.915154532306)*x_ref[2]
-        ref[3,0,2,0]=(-0.162863352328)*x_ref[0]**o+(-0.364461332292)*x_ref[0]+(-0.222181741398)*x_ref[1]**o+(-0.563668008365)*x_ref[1]+(0.118491770105)*x_ref[2]**o+(0.0809155053022)*x_ref[2]
-        ref[3,0,2,1]=(-0.985278929437)*x_ref[0]**o+(-0.919440760157)*x_ref[0]+(-0.776910686)*x_ref[1]**o+(-0.884270488943)*x_ref[1]+(0.984279010363)*x_ref[2]**o+(-0.489503278582)*x_ref[2]
-        ref[3,1,0,0]=(-0.806565449823)*x_ref[0]**o+(-0.0851385375281)*x_ref[0]+(-0.88851381773)*x_ref[1]**o+(-0.666539867528)*x_ref[1]+(0.154825531411)*x_ref[2]**o+(0.764069849144)*x_ref[2]
-        ref[3,1,0,1]=(-0.222125783918)*x_ref[0]**o+(0.568035675467)*x_ref[0]+(0.470171778932)*x_ref[1]**o+(-0.307608710881)*x_ref[1]+(-0.836083742471)*x_ref[2]**o+(0.553597553381)*x_ref[2]
-        ref[3,1,1,0]=(0.431237389847)*x_ref[0]**o+(-0.141391012471)*x_ref[0]+(0.726895025519)*x_ref[1]**o+(-0.527868751679)*x_ref[1]+(0.711761083137)*x_ref[2]**o+(0.996992864103)*x_ref[2]
-        ref[3,1,1,1]=(-0.123885959924)*x_ref[0]**o+(0.877034475529)*x_ref[0]+(-0.0432492682928)*x_ref[1]**o+(-0.370315494618)*x_ref[1]+(0.243139719071)*x_ref[2]**o+(-0.684318634902)*x_ref[2]
-        ref[3,1,2,0]=(-0.477214489355)*x_ref[0]**o+(0.340808576619)*x_ref[0]+(-0.0991802306558)*x_ref[1]**o+(0.462599821908)*x_ref[1]+(0.091768281564)*x_ref[2]**o+(0.0315552838839)*x_ref[2]
-        ref[3,1,2,1]=(0.676189142894)*x_ref[0]**o+(0.510136386913)*x_ref[0]+(-0.558579041952)*x_ref[1]**o+(0.961615047877)*x_ref[1]+(0.510717386124)*x_ref[2]**o+(0.774430183432)*x_ref[2]
-        ref[3,2,0,0]=(0.158370232444)*x_ref[0]**o+(0.209424855992)*x_ref[0]+(0.691438753013)*x_ref[1]**o+(-0.781594298738)*x_ref[1]+(-0.0188536627517)*x_ref[2]**o+(0.136400798995)*x_ref[2]
-        ref[3,2,0,1]=(-0.440674414328)*x_ref[0]**o+(0.118228612687)*x_ref[0]+(-0.700026492613)*x_ref[1]**o+(-0.981341215714)*x_ref[1]+(-0.172847519578)*x_ref[2]**o+(-0.423095202172)*x_ref[2]
-        ref[3,2,1,0]=(-0.0694960391695)*x_ref[0]**o+(-0.66448610135)*x_ref[0]+(-0.177572703748)*x_ref[1]**o+(-0.060488161727)*x_ref[1]+(0.306021853885)*x_ref[2]**o+(0.0730338716187)*x_ref[2]
-        ref[3,2,1,1]=(-0.360662154547)*x_ref[0]**o+(0.577679359648)*x_ref[0]+(-0.515313534966)*x_ref[1]**o+(0.217352687358)*x_ref[1]+(0.728367577882)*x_ref[2]**o+(0.38505849834)*x_ref[2]
-        ref[3,2,2,0]=(0.568671861232)*x_ref[0]**o+(-0.0792490917882)*x_ref[0]+(0.0188002885229)*x_ref[1]**o+(-0.956862575759)*x_ref[1]+(-0.844332442983)*x_ref[2]**o+(0.670792928042)*x_ref[2]
-        ref[3,2,2,1]=(0.833099204713)*x_ref[0]**o+(0.368482169933)*x_ref[0]+(-0.926002498892)*x_ref[1]**o+(-0.130646446568)*x_ref[1]+(0.81164928914)*x_ref[2]**o+(-0.641079919927)*x_ref[2]
-        ref[3,3,0,0]=(-0.277769350989)*x_ref[0]**o+(0.753452018649)*x_ref[0]+(-0.766322344505)*x_ref[1]**o+(-0.679108224612)*x_ref[1]+(0.0799499795424)*x_ref[2]**o+(0.255751308975)*x_ref[2]
-        ref[3,3,0,1]=(0.429176753733)*x_ref[0]**o+(0.123106050259)*x_ref[0]+(-0.169037728992)*x_ref[1]**o+(0.749245933687)*x_ref[1]+(0.560140859355)*x_ref[2]**o+(-0.937091840021)*x_ref[2]
-        ref[3,3,1,0]=(0.648792557593)*x_ref[0]**o+(-0.057555187513)*x_ref[0]+(0.883290331726)*x_ref[1]**o+(0.539276905995)*x_ref[1]+(0.473614408583)*x_ref[2]**o+(0.723258340333)*x_ref[2]
-        ref[3,3,1,1]=(0.527298833572)*x_ref[0]**o+(0.0753824058279)*x_ref[0]+(0.719196099257)*x_ref[1]**o+(-0.0124603350035)*x_ref[1]+(-0.964484650253)*x_ref[2]**o+(0.404444269694)*x_ref[2]
-        ref[3,3,2,0]=(-0.403640677462)*x_ref[0]**o+(0.906195964766)*x_ref[0]+(-0.561419078404)*x_ref[1]**o+(0.645408717838)*x_ref[1]+(0.671624799609)*x_ref[2]**o+(-0.573901868621)*x_ref[2]
-        ref[3,3,2,1]=(-0.288117182165)*x_ref[0]**o+(-0.391003584945)*x_ref[0]+(-0.555037182038)*x_ref[1]**o+(0.299362209017)*x_ref[1]+(-0.552429724326)*x_ref[2]**o+(-0.416923306774)*x_ref[2]
-        ref[3,4,0,0]=(-0.19594719192)*x_ref[0]**o+(0.150898934692)*x_ref[0]+(0.210935232044)*x_ref[1]**o+(-0.319764293347)*x_ref[1]+(-0.642450751195)*x_ref[2]**o+(0.22231085168)*x_ref[2]
-        ref[3,4,0,1]=(-0.0514589460225)*x_ref[0]**o+(0.0366025646754)*x_ref[0]+(0.416280576691)*x_ref[1]**o+(0.609178063951)*x_ref[1]+(0.835611677062)*x_ref[2]**o+(-0.131630571478)*x_ref[2]
-        ref[3,4,1,0]=(0.171509152214)*x_ref[0]**o+(-0.761188271093)*x_ref[0]+(-0.915951802896)*x_ref[1]**o+(-0.451796709915)*x_ref[1]+(-0.979847828162)*x_ref[2]**o+(0.0566453393315)*x_ref[2]
-        ref[3,4,1,1]=(0.690427998102)*x_ref[0]**o+(-0.358318625695)*x_ref[0]+(0.330270871613)*x_ref[1]**o+(-0.724392522137)*x_ref[1]+(-0.535474623489)*x_ref[2]**o+(-0.12341743885)*x_ref[2]
-        ref[3,4,2,0]=(0.488090753426)*x_ref[0]**o+(-0.352417078372)*x_ref[0]+(0.971988099319)*x_ref[1]**o+(-0.288929516009)*x_ref[1]+(0.612576734094)*x_ref[2]**o+(-0.43799514603)*x_ref[2]
-        ref[3,4,2,1]=(-0.098768101356)*x_ref[0]**o+(0.123300661895)*x_ref[0]+(-0.0489724280789)*x_ref[1]**o+(-0.422508669137)*x_ref[1]+(-0.861483104139)*x_ref[2]**o+(0.950198316001)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.724373964817)*x[0]**o+(-0.0560850774901)*x[0]+(0.201815078281)*x[1]**o+(-0.721683697048)*x[1]
-        ref=(0.724373964817)*x_ref[0]**o+(-0.0560850774901)*x_ref[0]+(0.201815078281)*x_ref[1]**o+(-0.721683697048)*x_ref[1]
-      else:
-        arg=(0.390296010052)*x[0]**o+(-0.279464234123)*x[0]+(-0.791334947488)*x[1]**o+(-0.0210629346704)*x[1]+(0.0816556526012)*x[2]**o+(0.77326269137)*x[2]
-        ref=(0.390296010052)*x_ref[0]**o+(-0.279464234123)*x_ref[0]+(-0.791334947488)*x_ref[1]**o+(-0.0210629346704)*x_ref[1]+(0.0816556526012)*x_ref[2]**o+(0.77326269137)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.645585823917)*x[0]**o+(-0.203443728436)*x[0]+(0.278126891692)*x[1]**o+(0.922093564911)*x[1]
-        arg[1]=(0.23370137029)*x[0]**o+(0.84371173541)*x[0]+(0.99297574548)*x[1]**o+(0.72481785931)*x[1]
-        ref[0]=(0.645585823917)*x_ref[0]**o+(-0.203443728436)*x_ref[0]+(0.278126891692)*x_ref[1]**o+(0.922093564911)*x_ref[1]
-        ref[1]=(0.23370137029)*x_ref[0]**o+(0.84371173541)*x_ref[0]+(0.99297574548)*x_ref[1]**o+(0.72481785931)*x_ref[1]
-      else:
-        arg[0]=(0.159998049951)*x[0]**o+(-0.863367327023)*x[0]+(-0.0628498246638)*x[1]**o+(0.685139358273)*x[1]+(0.783213360641)*x[2]**o+(0.397526421338)*x[2]
-        arg[1]=(0.165519279053)*x[0]**o+(-0.0936018967661)*x[0]+(0.863047696619)*x[1]**o+(0.653118186434)*x[1]+(-0.408224131944)*x[2]**o+(0.82400132854)*x[2]
-        ref[0]=(0.159998049951)*x_ref[0]**o+(-0.863367327023)*x_ref[0]+(-0.0628498246638)*x_ref[1]**o+(0.685139358273)*x_ref[1]+(0.783213360641)*x_ref[2]**o+(0.397526421338)*x_ref[2]
-        ref[1]=(0.165519279053)*x_ref[0]**o+(-0.0936018967661)*x_ref[0]+(0.863047696619)*x_ref[1]**o+(0.653118186434)*x_ref[1]+(-0.408224131944)*x_ref[2]**o+(0.82400132854)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.490709482882)*x[0]**o+(0.518382584887)*x[0]+(-0.940707425885)*x[1]**o+(0.224578726673)*x[1]
-        arg[0,1]=(-0.747621141516)*x[0]**o+(-0.217452489097)*x[0]+(0.929120128008)*x[1]**o+(0.55263700209)*x[1]
-        arg[0,2]=(-0.183545119672)*x[0]**o+(0.148192386895)*x[0]+(-0.22046309708)*x[1]**o+(0.433620446668)*x[1]
-        arg[0,3]=(-0.0724840266959)*x[0]**o+(0.835144620602)*x[0]+(-0.962971534144)*x[1]**o+(-0.149681811534)*x[1]
-        arg[0,4]=(-0.380150192228)*x[0]**o+(-0.309494603814)*x[0]+(-0.217425635182)*x[1]**o+(0.93567286482)*x[1]
-        arg[1,0]=(0.0367921563947)*x[0]**o+(0.220217625576)*x[0]+(-0.120595819238)*x[1]**o+(0.308108793279)*x[1]
-        arg[1,1]=(-0.142860237109)*x[0]**o+(-0.789758888253)*x[0]+(0.748085258229)*x[1]**o+(0.784767485883)*x[1]
-        arg[1,2]=(-0.154690818845)*x[0]**o+(-0.678458370784)*x[0]+(0.750742996193)*x[1]**o+(-0.350199095531)*x[1]
-        arg[1,3]=(-0.893295215013)*x[0]**o+(0.0295805814985)*x[0]+(0.265893730887)*x[1]**o+(0.435487860418)*x[1]
-        arg[1,4]=(-0.302701704727)*x[0]**o+(0.618274652266)*x[0]+(-0.688386407308)*x[1]**o+(-0.832515064466)*x[1]
-        arg[2,0]=(-0.926658745469)*x[0]**o+(0.548174350496)*x[0]+(-0.350700366641)*x[1]**o+(0.530188602011)*x[1]
-        arg[2,1]=(0.900965385167)*x[0]**o+(0.0234051845124)*x[0]+(-0.00783834941699)*x[1]**o+(-0.766352156598)*x[1]
-        arg[2,2]=(0.694733282444)*x[0]**o+(-0.0644519234093)*x[0]+(0.0493475528391)*x[1]**o+(-0.589101546403)*x[1]
-        arg[2,3]=(-0.100333102737)*x[0]**o+(-0.633740106784)*x[0]+(0.408697826034)*x[1]**o+(-0.429059439472)*x[1]
-        arg[2,4]=(0.635563324404)*x[0]**o+(0.955881346028)*x[0]+(0.0755013269452)*x[1]**o+(-0.743681282337)*x[1]
-        arg[3,0]=(0.604891134834)*x[0]**o+(0.942047409702)*x[0]+(-0.00544373299112)*x[1]**o+(0.447523533166)*x[1]
-        arg[3,1]=(-0.980967446837)*x[0]**o+(0.019824933239)*x[0]+(-0.826876930392)*x[1]**o+(0.113548968693)*x[1]
-        arg[3,2]=(-0.731417395373)*x[0]**o+(-0.275072472108)*x[0]+(0.933867711492)*x[1]**o+(-0.444847972819)*x[1]
-        arg[3,3]=(0.00121172413626)*x[0]**o+(-0.171073908218)*x[0]+(0.913182873344)*x[1]**o+(0.960256570926)*x[1]
-        arg[3,4]=(-0.395134372727)*x[0]**o+(0.646385082409)*x[0]+(0.17387019219)*x[1]**o+(-0.287550462397)*x[1]
-        ref[0,0]=(0.490709482882)*x_ref[0]**o+(0.518382584887)*x_ref[0]+(-0.940707425885)*x_ref[1]**o+(0.224578726673)*x_ref[1]
-        ref[0,1]=(-0.747621141516)*x_ref[0]**o+(-0.217452489097)*x_ref[0]+(0.929120128008)*x_ref[1]**o+(0.55263700209)*x_ref[1]
-        ref[0,2]=(-0.183545119672)*x_ref[0]**o+(0.148192386895)*x_ref[0]+(-0.22046309708)*x_ref[1]**o+(0.433620446668)*x_ref[1]
-        ref[0,3]=(-0.0724840266959)*x_ref[0]**o+(0.835144620602)*x_ref[0]+(-0.962971534144)*x_ref[1]**o+(-0.149681811534)*x_ref[1]
-        ref[0,4]=(-0.380150192228)*x_ref[0]**o+(-0.309494603814)*x_ref[0]+(-0.217425635182)*x_ref[1]**o+(0.93567286482)*x_ref[1]
-        ref[1,0]=(0.0367921563947)*x_ref[0]**o+(0.220217625576)*x_ref[0]+(-0.120595819238)*x_ref[1]**o+(0.308108793279)*x_ref[1]
-        ref[1,1]=(-0.142860237109)*x_ref[0]**o+(-0.789758888253)*x_ref[0]+(0.748085258229)*x_ref[1]**o+(0.784767485883)*x_ref[1]
-        ref[1,2]=(-0.154690818845)*x_ref[0]**o+(-0.678458370784)*x_ref[0]+(0.750742996193)*x_ref[1]**o+(-0.350199095531)*x_ref[1]
-        ref[1,3]=(-0.893295215013)*x_ref[0]**o+(0.0295805814985)*x_ref[0]+(0.265893730887)*x_ref[1]**o+(0.435487860418)*x_ref[1]
-        ref[1,4]=(-0.302701704727)*x_ref[0]**o+(0.618274652266)*x_ref[0]+(-0.688386407308)*x_ref[1]**o+(-0.832515064466)*x_ref[1]
-        ref[2,0]=(-0.926658745469)*x_ref[0]**o+(0.548174350496)*x_ref[0]+(-0.350700366641)*x_ref[1]**o+(0.530188602011)*x_ref[1]
-        ref[2,1]=(0.900965385167)*x_ref[0]**o+(0.0234051845124)*x_ref[0]+(-0.00783834941699)*x_ref[1]**o+(-0.766352156598)*x_ref[1]
-        ref[2,2]=(0.694733282444)*x_ref[0]**o+(-0.0644519234093)*x_ref[0]+(0.0493475528391)*x_ref[1]**o+(-0.589101546403)*x_ref[1]
-        ref[2,3]=(-0.100333102737)*x_ref[0]**o+(-0.633740106784)*x_ref[0]+(0.408697826034)*x_ref[1]**o+(-0.429059439472)*x_ref[1]
-        ref[2,4]=(0.635563324404)*x_ref[0]**o+(0.955881346028)*x_ref[0]+(0.0755013269452)*x_ref[1]**o+(-0.743681282337)*x_ref[1]
-        ref[3,0]=(0.604891134834)*x_ref[0]**o+(0.942047409702)*x_ref[0]+(-0.00544373299112)*x_ref[1]**o+(0.447523533166)*x_ref[1]
-        ref[3,1]=(-0.980967446837)*x_ref[0]**o+(0.019824933239)*x_ref[0]+(-0.826876930392)*x_ref[1]**o+(0.113548968693)*x_ref[1]
-        ref[3,2]=(-0.731417395373)*x_ref[0]**o+(-0.275072472108)*x_ref[0]+(0.933867711492)*x_ref[1]**o+(-0.444847972819)*x_ref[1]
-        ref[3,3]=(0.00121172413626)*x_ref[0]**o+(-0.171073908218)*x_ref[0]+(0.913182873344)*x_ref[1]**o+(0.960256570926)*x_ref[1]
-        ref[3,4]=(-0.395134372727)*x_ref[0]**o+(0.646385082409)*x_ref[0]+(0.17387019219)*x_ref[1]**o+(-0.287550462397)*x_ref[1]
-      else:
-        arg[0,0]=(0.386545340192)*x[0]**o+(-0.397636296285)*x[0]+(-0.849437816516)*x[1]**o+(-0.83083406493)*x[1]+(0.479216612031)*x[2]**o+(0.0903787541308)*x[2]
-        arg[0,1]=(-0.331651855726)*x[0]**o+(0.849421626918)*x[0]+(0.528368477362)*x[1]**o+(-0.015122214824)*x[1]+(0.494310578452)*x[2]**o+(0.190239928161)*x[2]
-        arg[0,2]=(-0.662389759646)*x[0]**o+(0.204378343962)*x[0]+(0.486802744897)*x[1]**o+(0.822174784922)*x[1]+(-0.309203812647)*x[2]**o+(-0.101665040799)*x[2]
-        arg[0,3]=(0.609106341828)*x[0]**o+(0.658404088333)*x[0]+(-0.0092991120732)*x[1]**o+(-0.73794934348)*x[1]+(0.270245135914)*x[2]**o+(-0.594067838407)*x[2]
-        arg[0,4]=(-0.291752213357)*x[0]**o+(-0.596751343066)*x[0]+(-0.109196903078)*x[1]**o+(-0.868610307708)*x[1]+(0.622541308544)*x[2]**o+(0.482202762224)*x[2]
-        arg[1,0]=(-0.113988933227)*x[0]**o+(-0.846328804695)*x[0]+(0.691769553626)*x[1]**o+(-0.377441645148)*x[1]+(-0.769857970682)*x[2]**o+(-0.583083729037)*x[2]
-        arg[1,1]=(-0.635333757145)*x[0]**o+(0.194761117849)*x[0]+(-0.268287296731)*x[1]**o+(0.463906930647)*x[1]+(0.768293821029)*x[2]**o+(-0.532824906687)*x[2]
-        arg[1,2]=(0.355380090138)*x[0]**o+(-0.181191575848)*x[0]+(-0.558667766467)*x[1]**o+(0.561707671872)*x[1]+(-0.427004232725)*x[2]**o+(-0.996564299989)*x[2]
-        arg[1,3]=(-0.891638892893)*x[0]**o+(0.0867350850512)*x[0]+(0.880258390584)*x[1]**o+(-0.798123407525)*x[1]+(-0.571505202201)*x[2]**o+(0.35374245063)*x[2]
-        arg[1,4]=(0.543632496941)*x[0]**o+(-0.630363803582)*x[0]+(0.38107312058)*x[1]**o+(0.222401831883)*x[1]+(-0.932212080175)*x[2]**o+(-0.0482899826174)*x[2]
-        arg[2,0]=(0.46514308325)*x[0]**o+(-0.907464652384)*x[0]+(-0.706105595148)*x[1]**o+(0.486989958675)*x[1]+(0.422702683485)*x[2]**o+(0.640916925932)*x[2]
-        arg[2,1]=(0.912808317479)*x[0]**o+(-0.860779312763)*x[0]+(-0.915364956133)*x[1]**o+(-0.314186117224)*x[1]+(-0.860814410035)*x[2]**o+(0.837570442722)*x[2]
-        arg[2,2]=(0.00932917919464)*x[0]**o+(0.393773283049)*x[0]+(0.699998572668)*x[1]**o+(0.153407885795)*x[1]+(-0.166245189281)*x[2]**o+(-0.430541214236)*x[2]
-        arg[2,3]=(-0.00127511229816)*x[0]**o+(-0.327443174924)*x[0]+(0.61881322537)*x[1]**o+(-0.725854102962)*x[1]+(0.650649062427)*x[2]**o+(0.246373184041)*x[2]
-        arg[2,4]=(-0.530580898049)*x[0]**o+(-0.208506132901)*x[0]+(-0.102049332015)*x[1]**o+(-0.537037644189)*x[1]+(0.740113470729)*x[2]**o+(0.12094405264)*x[2]
-        arg[3,0]=(-0.103423602042)*x[0]**o+(-0.535742323666)*x[0]+(0.678663019405)*x[1]**o+(0.579375950057)*x[1]+(0.323627490052)*x[2]**o+(-0.681323301356)*x[2]
-        arg[3,1]=(0.670239087519)*x[0]**o+(0.209657968128)*x[0]+(-0.357490300727)*x[1]**o+(-0.441776782321)*x[1]+(0.00927389037562)*x[2]**o+(0.633527599723)*x[2]
-        arg[3,2]=(0.415569606138)*x[0]**o+(-0.422211616068)*x[0]+(-0.695086235645)*x[1]**o+(0.709158289848)*x[1]+(-0.523450845183)*x[2]**o+(0.555778994398)*x[2]
-        arg[3,3]=(0.0188993892075)*x[0]**o+(0.611088737828)*x[0]+(0.0313795167921)*x[1]**o+(0.0842651755016)*x[1]+(0.288414199415)*x[2]**o+(0.695910780235)*x[2]
-        arg[3,4]=(-0.500338800879)*x[0]**o+(0.0984192369328)*x[0]+(0.71163172992)*x[1]**o+(-0.102123116139)*x[1]+(0.954613955678)*x[2]**o+(0.384872409422)*x[2]
-        ref[0,0]=(0.386545340192)*x_ref[0]**o+(-0.397636296285)*x_ref[0]+(-0.849437816516)*x_ref[1]**o+(-0.83083406493)*x_ref[1]+(0.479216612031)*x_ref[2]**o+(0.0903787541308)*x_ref[2]
-        ref[0,1]=(-0.331651855726)*x_ref[0]**o+(0.849421626918)*x_ref[0]+(0.528368477362)*x_ref[1]**o+(-0.015122214824)*x_ref[1]+(0.494310578452)*x_ref[2]**o+(0.190239928161)*x_ref[2]
-        ref[0,2]=(-0.662389759646)*x_ref[0]**o+(0.204378343962)*x_ref[0]+(0.486802744897)*x_ref[1]**o+(0.822174784922)*x_ref[1]+(-0.309203812647)*x_ref[2]**o+(-0.101665040799)*x_ref[2]
-        ref[0,3]=(0.609106341828)*x_ref[0]**o+(0.658404088333)*x_ref[0]+(-0.0092991120732)*x_ref[1]**o+(-0.73794934348)*x_ref[1]+(0.270245135914)*x_ref[2]**o+(-0.594067838407)*x_ref[2]
-        ref[0,4]=(-0.291752213357)*x_ref[0]**o+(-0.596751343066)*x_ref[0]+(-0.109196903078)*x_ref[1]**o+(-0.868610307708)*x_ref[1]+(0.622541308544)*x_ref[2]**o+(0.482202762224)*x_ref[2]
-        ref[1,0]=(-0.113988933227)*x_ref[0]**o+(-0.846328804695)*x_ref[0]+(0.691769553626)*x_ref[1]**o+(-0.377441645148)*x_ref[1]+(-0.769857970682)*x_ref[2]**o+(-0.583083729037)*x_ref[2]
-        ref[1,1]=(-0.635333757145)*x_ref[0]**o+(0.194761117849)*x_ref[0]+(-0.268287296731)*x_ref[1]**o+(0.463906930647)*x_ref[1]+(0.768293821029)*x_ref[2]**o+(-0.532824906687)*x_ref[2]
-        ref[1,2]=(0.355380090138)*x_ref[0]**o+(-0.181191575848)*x_ref[0]+(-0.558667766467)*x_ref[1]**o+(0.561707671872)*x_ref[1]+(-0.427004232725)*x_ref[2]**o+(-0.996564299989)*x_ref[2]
-        ref[1,3]=(-0.891638892893)*x_ref[0]**o+(0.0867350850512)*x_ref[0]+(0.880258390584)*x_ref[1]**o+(-0.798123407525)*x_ref[1]+(-0.571505202201)*x_ref[2]**o+(0.35374245063)*x_ref[2]
-        ref[1,4]=(0.543632496941)*x_ref[0]**o+(-0.630363803582)*x_ref[0]+(0.38107312058)*x_ref[1]**o+(0.222401831883)*x_ref[1]+(-0.932212080175)*x_ref[2]**o+(-0.0482899826174)*x_ref[2]
-        ref[2,0]=(0.46514308325)*x_ref[0]**o+(-0.907464652384)*x_ref[0]+(-0.706105595148)*x_ref[1]**o+(0.486989958675)*x_ref[1]+(0.422702683485)*x_ref[2]**o+(0.640916925932)*x_ref[2]
-        ref[2,1]=(0.912808317479)*x_ref[0]**o+(-0.860779312763)*x_ref[0]+(-0.915364956133)*x_ref[1]**o+(-0.314186117224)*x_ref[1]+(-0.860814410035)*x_ref[2]**o+(0.837570442722)*x_ref[2]
-        ref[2,2]=(0.00932917919464)*x_ref[0]**o+(0.393773283049)*x_ref[0]+(0.699998572668)*x_ref[1]**o+(0.153407885795)*x_ref[1]+(-0.166245189281)*x_ref[2]**o+(-0.430541214236)*x_ref[2]
-        ref[2,3]=(-0.00127511229816)*x_ref[0]**o+(-0.327443174924)*x_ref[0]+(0.61881322537)*x_ref[1]**o+(-0.725854102962)*x_ref[1]+(0.650649062427)*x_ref[2]**o+(0.246373184041)*x_ref[2]
-        ref[2,4]=(-0.530580898049)*x_ref[0]**o+(-0.208506132901)*x_ref[0]+(-0.102049332015)*x_ref[1]**o+(-0.537037644189)*x_ref[1]+(0.740113470729)*x_ref[2]**o+(0.12094405264)*x_ref[2]
-        ref[3,0]=(-0.103423602042)*x_ref[0]**o+(-0.535742323666)*x_ref[0]+(0.678663019405)*x_ref[1]**o+(0.579375950057)*x_ref[1]+(0.323627490052)*x_ref[2]**o+(-0.681323301356)*x_ref[2]
-        ref[3,1]=(0.670239087519)*x_ref[0]**o+(0.209657968128)*x_ref[0]+(-0.357490300727)*x_ref[1]**o+(-0.441776782321)*x_ref[1]+(0.00927389037562)*x_ref[2]**o+(0.633527599723)*x_ref[2]
-        ref[3,2]=(0.415569606138)*x_ref[0]**o+(-0.422211616068)*x_ref[0]+(-0.695086235645)*x_ref[1]**o+(0.709158289848)*x_ref[1]+(-0.523450845183)*x_ref[2]**o+(0.555778994398)*x_ref[2]
-        ref[3,3]=(0.0188993892075)*x_ref[0]**o+(0.611088737828)*x_ref[0]+(0.0313795167921)*x_ref[1]**o+(0.0842651755016)*x_ref[1]+(0.288414199415)*x_ref[2]**o+(0.695910780235)*x_ref[2]
-        ref[3,4]=(-0.500338800879)*x_ref[0]**o+(0.0984192369328)*x_ref[0]+(0.71163172992)*x_ref[1]**o+(-0.102123116139)*x_ref[1]+(0.954613955678)*x_ref[2]**o+(0.384872409422)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.317274364174)*x[0]**o+(-0.565307843766)*x[0]+(-0.367874638208)*x[1]**o+(0.0029581033546)*x[1]
-        arg[0,0,1]=(0.832728755858)*x[0]**o+(0.245271193641)*x[0]+(-0.727130029377)*x[1]**o+(0.137912975829)*x[1]
-        arg[0,1,0]=(-0.634508968932)*x[0]**o+(-0.864200861637)*x[0]+(-0.566985971867)*x[1]**o+(0.458187145519)*x[1]
-        arg[0,1,1]=(0.133772683885)*x[0]**o+(-0.630800341215)*x[0]+(0.958934971335)*x[1]**o+(-0.15839182257)*x[1]
-        arg[1,0,0]=(-0.0948724752087)*x[0]**o+(-0.25589337469)*x[0]+(-0.315713312867)*x[1]**o+(0.223487524432)*x[1]
-        arg[1,0,1]=(0.794634271698)*x[0]**o+(-0.505797079712)*x[0]+(0.54367349338)*x[1]**o+(0.610149581933)*x[1]
-        arg[1,1,0]=(-0.447039667341)*x[0]**o+(-0.917009838715)*x[0]+(0.525331113522)*x[1]**o+(-0.626176620973)*x[1]
-        arg[1,1,1]=(0.0749028334839)*x[0]**o+(0.106950341725)*x[0]+(-0.375321288987)*x[1]**o+(0.510260762626)*x[1]
-        arg[2,0,0]=(-0.286661970669)*x[0]**o+(0.584169107201)*x[0]+(0.189852415568)*x[1]**o+(-0.685695910848)*x[1]
-        arg[2,0,1]=(-0.689509796724)*x[0]**o+(-0.316067007053)*x[0]+(0.93758916753)*x[1]**o+(0.987368705364)*x[1]
-        arg[2,1,0]=(-0.411695937554)*x[0]**o+(0.858528628791)*x[0]+(-0.579361651418)*x[1]**o+(-0.179617869494)*x[1]
-        arg[2,1,1]=(0.871441175049)*x[0]**o+(0.445176827889)*x[0]+(0.282613647019)*x[1]**o+(-0.0414230375843)*x[1]
-        arg[3,0,0]=(-0.242136375691)*x[0]**o+(-0.91917484201)*x[0]+(-0.88026838607)*x[1]**o+(0.363309786006)*x[1]
-        arg[3,0,1]=(-0.991221762386)*x[0]**o+(-0.0149280738883)*x[0]+(0.420322977563)*x[1]**o+(-0.0533076687981)*x[1]
-        arg[3,1,0]=(-0.889003524303)*x[0]**o+(-0.023519502168)*x[0]+(0.826015855889)*x[1]**o+(0.0568467842617)*x[1]
-        arg[3,1,1]=(0.608567002824)*x[0]**o+(-0.531288593441)*x[0]+(0.0886678034719)*x[1]**o+(-0.732353220319)*x[1]
-        arg[4,0,0]=(-0.0537755786538)*x[0]**o+(-0.475886396481)*x[0]+(-0.153787571145)*x[1]**o+(0.689850737569)*x[1]
-        arg[4,0,1]=(0.413017674549)*x[0]**o+(-0.993353261494)*x[0]+(-0.944597571268)*x[1]**o+(0.566423551758)*x[1]
-        arg[4,1,0]=(-0.716864417268)*x[0]**o+(-0.871574272865)*x[0]+(0.394071572628)*x[1]**o+(0.452903048597)*x[1]
-        arg[4,1,1]=(0.861790785883)*x[0]**o+(-0.511789401943)*x[0]+(-0.272452527007)*x[1]**o+(-0.379021521619)*x[1]
-        arg[5,0,0]=(0.509668147054)*x[0]**o+(0.919355584411)*x[0]+(-0.673215166917)*x[1]**o+(0.766459631931)*x[1]
-        arg[5,0,1]=(0.177006227916)*x[0]**o+(-0.275118477)*x[0]+(0.0302367843701)*x[1]**o+(-0.761226360328)*x[1]
-        arg[5,1,0]=(0.013432534638)*x[0]**o+(-0.911626567027)*x[0]+(-0.710520442529)*x[1]**o+(-0.882317448423)*x[1]
-        arg[5,1,1]=(0.595583093615)*x[0]**o+(0.163527905156)*x[0]+(-0.122165051333)*x[1]**o+(-0.526359288181)*x[1]
-        ref[0,0,0]=(0.317274364174)*x_ref[0]**o+(-0.565307843766)*x_ref[0]+(-0.367874638208)*x_ref[1]**o+(0.0029581033546)*x_ref[1]
-        ref[0,0,1]=(0.832728755858)*x_ref[0]**o+(0.245271193641)*x_ref[0]+(-0.727130029377)*x_ref[1]**o+(0.137912975829)*x_ref[1]
-        ref[0,1,0]=(-0.634508968932)*x_ref[0]**o+(-0.864200861637)*x_ref[0]+(-0.566985971867)*x_ref[1]**o+(0.458187145519)*x_ref[1]
-        ref[0,1,1]=(0.133772683885)*x_ref[0]**o+(-0.630800341215)*x_ref[0]+(0.958934971335)*x_ref[1]**o+(-0.15839182257)*x_ref[1]
-        ref[1,0,0]=(-0.0948724752087)*x_ref[0]**o+(-0.25589337469)*x_ref[0]+(-0.315713312867)*x_ref[1]**o+(0.223487524432)*x_ref[1]
-        ref[1,0,1]=(0.794634271698)*x_ref[0]**o+(-0.505797079712)*x_ref[0]+(0.54367349338)*x_ref[1]**o+(0.610149581933)*x_ref[1]
-        ref[1,1,0]=(-0.447039667341)*x_ref[0]**o+(-0.917009838715)*x_ref[0]+(0.525331113522)*x_ref[1]**o+(-0.626176620973)*x_ref[1]
-        ref[1,1,1]=(0.0749028334839)*x_ref[0]**o+(0.106950341725)*x_ref[0]+(-0.375321288987)*x_ref[1]**o+(0.510260762626)*x_ref[1]
-        ref[2,0,0]=(-0.286661970669)*x_ref[0]**o+(0.584169107201)*x_ref[0]+(0.189852415568)*x_ref[1]**o+(-0.685695910848)*x_ref[1]
-        ref[2,0,1]=(-0.689509796724)*x_ref[0]**o+(-0.316067007053)*x_ref[0]+(0.93758916753)*x_ref[1]**o+(0.987368705364)*x_ref[1]
-        ref[2,1,0]=(-0.411695937554)*x_ref[0]**o+(0.858528628791)*x_ref[0]+(-0.579361651418)*x_ref[1]**o+(-0.179617869494)*x_ref[1]
-        ref[2,1,1]=(0.871441175049)*x_ref[0]**o+(0.445176827889)*x_ref[0]+(0.282613647019)*x_ref[1]**o+(-0.0414230375843)*x_ref[1]
-        ref[3,0,0]=(-0.242136375691)*x_ref[0]**o+(-0.91917484201)*x_ref[0]+(-0.88026838607)*x_ref[1]**o+(0.363309786006)*x_ref[1]
-        ref[3,0,1]=(-0.991221762386)*x_ref[0]**o+(-0.0149280738883)*x_ref[0]+(0.420322977563)*x_ref[1]**o+(-0.0533076687981)*x_ref[1]
-        ref[3,1,0]=(-0.889003524303)*x_ref[0]**o+(-0.023519502168)*x_ref[0]+(0.826015855889)*x_ref[1]**o+(0.0568467842617)*x_ref[1]
-        ref[3,1,1]=(0.608567002824)*x_ref[0]**o+(-0.531288593441)*x_ref[0]+(0.0886678034719)*x_ref[1]**o+(-0.732353220319)*x_ref[1]
-        ref[4,0,0]=(-0.0537755786538)*x_ref[0]**o+(-0.475886396481)*x_ref[0]+(-0.153787571145)*x_ref[1]**o+(0.689850737569)*x_ref[1]
-        ref[4,0,1]=(0.413017674549)*x_ref[0]**o+(-0.993353261494)*x_ref[0]+(-0.944597571268)*x_ref[1]**o+(0.566423551758)*x_ref[1]
-        ref[4,1,0]=(-0.716864417268)*x_ref[0]**o+(-0.871574272865)*x_ref[0]+(0.394071572628)*x_ref[1]**o+(0.452903048597)*x_ref[1]
-        ref[4,1,1]=(0.861790785883)*x_ref[0]**o+(-0.511789401943)*x_ref[0]+(-0.272452527007)*x_ref[1]**o+(-0.379021521619)*x_ref[1]
-        ref[5,0,0]=(0.509668147054)*x_ref[0]**o+(0.919355584411)*x_ref[0]+(-0.673215166917)*x_ref[1]**o+(0.766459631931)*x_ref[1]
-        ref[5,0,1]=(0.177006227916)*x_ref[0]**o+(-0.275118477)*x_ref[0]+(0.0302367843701)*x_ref[1]**o+(-0.761226360328)*x_ref[1]
-        ref[5,1,0]=(0.013432534638)*x_ref[0]**o+(-0.911626567027)*x_ref[0]+(-0.710520442529)*x_ref[1]**o+(-0.882317448423)*x_ref[1]
-        ref[5,1,1]=(0.595583093615)*x_ref[0]**o+(0.163527905156)*x_ref[0]+(-0.122165051333)*x_ref[1]**o+(-0.526359288181)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.230695674262)*x[0]**o+(-0.987212801716)*x[0]+(-0.0599001434987)*x[1]**o+(0.719591259555)*x[1]+(-0.665186369759)*x[2]**o+(-0.563552602515)*x[2]
-        arg[0,0,1]=(-0.775441966131)*x[0]**o+(-0.152166849702)*x[0]+(0.626466789363)*x[1]**o+(0.179356346581)*x[1]+(-0.687406927434)*x[2]**o+(-0.563492313114)*x[2]
-        arg[0,1,0]=(0.749522748133)*x[0]**o+(-0.582456308337)*x[0]+(0.676882643058)*x[1]**o+(0.365363182598)*x[1]+(-0.550867708812)*x[2]**o+(0.777938151183)*x[2]
-        arg[0,1,1]=(0.389788552775)*x[0]**o+(-0.298877489997)*x[0]+(0.560326209269)*x[1]**o+(-0.113249832155)*x[1]+(0.588087510254)*x[2]**o+(-0.593503776461)*x[2]
-        arg[1,0,0]=(-0.354661103909)*x[0]**o+(-0.195375369549)*x[0]+(-0.798795069895)*x[1]**o+(0.0968631048579)*x[1]+(-0.016118190391)*x[2]**o+(-0.903745407705)*x[2]
-        arg[1,0,1]=(-0.383688834784)*x[0]**o+(0.861256231933)*x[0]+(-0.767204834667)*x[1]**o+(0.338875482372)*x[1]+(0.117146310891)*x[2]**o+(-0.302651846083)*x[2]
-        arg[1,1,0]=(0.646263670969)*x[0]**o+(-0.447984008871)*x[0]+(-0.169322492785)*x[1]**o+(-0.570614724481)*x[1]+(-0.848518457618)*x[2]**o+(-0.0750005539216)*x[2]
-        arg[1,1,1]=(-0.232496745304)*x[0]**o+(0.182581173413)*x[0]+(0.8032436357)*x[1]**o+(-0.391266449476)*x[1]+(0.491677629766)*x[2]**o+(-0.188361708708)*x[2]
-        arg[2,0,0]=(-0.571145099091)*x[0]**o+(-0.486855242188)*x[0]+(0.52833582073)*x[1]**o+(0.326716348242)*x[1]+(0.528475192869)*x[2]**o+(0.163280575137)*x[2]
-        arg[2,0,1]=(-0.368889674601)*x[0]**o+(0.601775816775)*x[0]+(0.0281742455403)*x[1]**o+(-0.198869716243)*x[1]+(0.193343065506)*x[2]**o+(-0.0614451571108)*x[2]
-        arg[2,1,0]=(0.724595792492)*x[0]**o+(-0.206983407651)*x[0]+(-0.33966393719)*x[1]**o+(0.929465830796)*x[1]+(-0.938517195863)*x[2]**o+(0.70874077222)*x[2]
-        arg[2,1,1]=(-0.536303362606)*x[0]**o+(-0.430663025812)*x[0]+(-0.0845923469062)*x[1]**o+(0.866655631144)*x[1]+(-0.2378102403)*x[2]**o+(0.969070797268)*x[2]
-        arg[3,0,0]=(0.345137352559)*x[0]**o+(-0.696652518382)*x[0]+(0.914998974008)*x[1]**o+(-0.874935163156)*x[1]+(0.947812661283)*x[2]**o+(0.868611662789)*x[2]
-        arg[3,0,1]=(-0.421640746358)*x[0]**o+(-0.37925991208)*x[0]+(0.468281241452)*x[1]**o+(0.439086689805)*x[1]+(-0.607986317001)*x[2]**o+(0.269488168937)*x[2]
-        arg[3,1,0]=(-0.550485456473)*x[0]**o+(-0.520018714495)*x[0]+(0.439679309654)*x[1]**o+(-0.0652434084668)*x[1]+(-0.584838668708)*x[2]**o+(-0.46047281034)*x[2]
-        arg[3,1,1]=(-0.421746456038)*x[0]**o+(0.370489549278)*x[0]+(-0.683682295105)*x[1]**o+(0.324051718035)*x[1]+(-0.579046430636)*x[2]**o+(0.587623604941)*x[2]
-        arg[4,0,0]=(-0.167582584882)*x[0]**o+(0.524904122243)*x[0]+(0.665109348362)*x[1]**o+(-0.093655366509)*x[1]+(0.704404656254)*x[2]**o+(-0.402602441741)*x[2]
-        arg[4,0,1]=(0.633854964824)*x[0]**o+(-0.836385840194)*x[0]+(-0.0995437996628)*x[1]**o+(-0.200285338869)*x[1]+(0.535023783881)*x[2]**o+(0.884702543593)*x[2]
-        arg[4,1,0]=(-0.953619378208)*x[0]**o+(-0.390518815669)*x[0]+(-0.0590889178236)*x[1]**o+(-0.997225825019)*x[1]+(0.0520418736402)*x[2]**o+(0.484749465262)*x[2]
-        arg[4,1,1]=(-0.440389854756)*x[0]**o+(0.15520431778)*x[0]+(0.346839174513)*x[1]**o+(0.0172676873159)*x[1]+(0.86275919224)*x[2]**o+(0.568069148992)*x[2]
-        arg[5,0,0]=(-0.303687941217)*x[0]**o+(0.516115915687)*x[0]+(-0.750276597519)*x[1]**o+(0.734039058778)*x[1]+(-0.624499210252)*x[2]**o+(-0.926338135421)*x[2]
-        arg[5,0,1]=(-0.472230777895)*x[0]**o+(-0.557827728373)*x[0]+(-0.403783023157)*x[1]**o+(0.70433336955)*x[1]+(-0.0211737454531)*x[2]**o+(0.0774406125836)*x[2]
-        arg[5,1,0]=(0.718149875204)*x[0]**o+(-0.183000739787)*x[0]+(-0.655724252373)*x[1]**o+(-0.634941710776)*x[1]+(-0.26300163323)*x[2]**o+(-0.25105424715)*x[2]
-        arg[5,1,1]=(0.109601904441)*x[0]**o+(-0.00640764631554)*x[0]+(-0.488035610009)*x[1]**o+(0.909668323769)*x[1]+(0.229692168501)*x[2]**o+(-0.739241309497)*x[2]
-        ref[0,0,0]=(0.230695674262)*x_ref[0]**o+(-0.987212801716)*x_ref[0]+(-0.0599001434987)*x_ref[1]**o+(0.719591259555)*x_ref[1]+(-0.665186369759)*x_ref[2]**o+(-0.563552602515)*x_ref[2]
-        ref[0,0,1]=(-0.775441966131)*x_ref[0]**o+(-0.152166849702)*x_ref[0]+(0.626466789363)*x_ref[1]**o+(0.179356346581)*x_ref[1]+(-0.687406927434)*x_ref[2]**o+(-0.563492313114)*x_ref[2]
-        ref[0,1,0]=(0.749522748133)*x_ref[0]**o+(-0.582456308337)*x_ref[0]+(0.676882643058)*x_ref[1]**o+(0.365363182598)*x_ref[1]+(-0.550867708812)*x_ref[2]**o+(0.777938151183)*x_ref[2]
-        ref[0,1,1]=(0.389788552775)*x_ref[0]**o+(-0.298877489997)*x_ref[0]+(0.560326209269)*x_ref[1]**o+(-0.113249832155)*x_ref[1]+(0.588087510254)*x_ref[2]**o+(-0.593503776461)*x_ref[2]
-        ref[1,0,0]=(-0.354661103909)*x_ref[0]**o+(-0.195375369549)*x_ref[0]+(-0.798795069895)*x_ref[1]**o+(0.0968631048579)*x_ref[1]+(-0.016118190391)*x_ref[2]**o+(-0.903745407705)*x_ref[2]
-        ref[1,0,1]=(-0.383688834784)*x_ref[0]**o+(0.861256231933)*x_ref[0]+(-0.767204834667)*x_ref[1]**o+(0.338875482372)*x_ref[1]+(0.117146310891)*x_ref[2]**o+(-0.302651846083)*x_ref[2]
-        ref[1,1,0]=(0.646263670969)*x_ref[0]**o+(-0.447984008871)*x_ref[0]+(-0.169322492785)*x_ref[1]**o+(-0.570614724481)*x_ref[1]+(-0.848518457618)*x_ref[2]**o+(-0.0750005539216)*x_ref[2]
-        ref[1,1,1]=(-0.232496745304)*x_ref[0]**o+(0.182581173413)*x_ref[0]+(0.8032436357)*x_ref[1]**o+(-0.391266449476)*x_ref[1]+(0.491677629766)*x_ref[2]**o+(-0.188361708708)*x_ref[2]
-        ref[2,0,0]=(-0.571145099091)*x_ref[0]**o+(-0.486855242188)*x_ref[0]+(0.52833582073)*x_ref[1]**o+(0.326716348242)*x_ref[1]+(0.528475192869)*x_ref[2]**o+(0.163280575137)*x_ref[2]
-        ref[2,0,1]=(-0.368889674601)*x_ref[0]**o+(0.601775816775)*x_ref[0]+(0.0281742455403)*x_ref[1]**o+(-0.198869716243)*x_ref[1]+(0.193343065506)*x_ref[2]**o+(-0.0614451571108)*x_ref[2]
-        ref[2,1,0]=(0.724595792492)*x_ref[0]**o+(-0.206983407651)*x_ref[0]+(-0.33966393719)*x_ref[1]**o+(0.929465830796)*x_ref[1]+(-0.938517195863)*x_ref[2]**o+(0.70874077222)*x_ref[2]
-        ref[2,1,1]=(-0.536303362606)*x_ref[0]**o+(-0.430663025812)*x_ref[0]+(-0.0845923469062)*x_ref[1]**o+(0.866655631144)*x_ref[1]+(-0.2378102403)*x_ref[2]**o+(0.969070797268)*x_ref[2]
-        ref[3,0,0]=(0.345137352559)*x_ref[0]**o+(-0.696652518382)*x_ref[0]+(0.914998974008)*x_ref[1]**o+(-0.874935163156)*x_ref[1]+(0.947812661283)*x_ref[2]**o+(0.868611662789)*x_ref[2]
-        ref[3,0,1]=(-0.421640746358)*x_ref[0]**o+(-0.37925991208)*x_ref[0]+(0.468281241452)*x_ref[1]**o+(0.439086689805)*x_ref[1]+(-0.607986317001)*x_ref[2]**o+(0.269488168937)*x_ref[2]
-        ref[3,1,0]=(-0.550485456473)*x_ref[0]**o+(-0.520018714495)*x_ref[0]+(0.439679309654)*x_ref[1]**o+(-0.0652434084668)*x_ref[1]+(-0.584838668708)*x_ref[2]**o+(-0.46047281034)*x_ref[2]
-        ref[3,1,1]=(-0.421746456038)*x_ref[0]**o+(0.370489549278)*x_ref[0]+(-0.683682295105)*x_ref[1]**o+(0.324051718035)*x_ref[1]+(-0.579046430636)*x_ref[2]**o+(0.587623604941)*x_ref[2]
-        ref[4,0,0]=(-0.167582584882)*x_ref[0]**o+(0.524904122243)*x_ref[0]+(0.665109348362)*x_ref[1]**o+(-0.093655366509)*x_ref[1]+(0.704404656254)*x_ref[2]**o+(-0.402602441741)*x_ref[2]
-        ref[4,0,1]=(0.633854964824)*x_ref[0]**o+(-0.836385840194)*x_ref[0]+(-0.0995437996628)*x_ref[1]**o+(-0.200285338869)*x_ref[1]+(0.535023783881)*x_ref[2]**o+(0.884702543593)*x_ref[2]
-        ref[4,1,0]=(-0.953619378208)*x_ref[0]**o+(-0.390518815669)*x_ref[0]+(-0.0590889178236)*x_ref[1]**o+(-0.997225825019)*x_ref[1]+(0.0520418736402)*x_ref[2]**o+(0.484749465262)*x_ref[2]
-        ref[4,1,1]=(-0.440389854756)*x_ref[0]**o+(0.15520431778)*x_ref[0]+(0.346839174513)*x_ref[1]**o+(0.0172676873159)*x_ref[1]+(0.86275919224)*x_ref[2]**o+(0.568069148992)*x_ref[2]
-        ref[5,0,0]=(-0.303687941217)*x_ref[0]**o+(0.516115915687)*x_ref[0]+(-0.750276597519)*x_ref[1]**o+(0.734039058778)*x_ref[1]+(-0.624499210252)*x_ref[2]**o+(-0.926338135421)*x_ref[2]
-        ref[5,0,1]=(-0.472230777895)*x_ref[0]**o+(-0.557827728373)*x_ref[0]+(-0.403783023157)*x_ref[1]**o+(0.70433336955)*x_ref[1]+(-0.0211737454531)*x_ref[2]**o+(0.0774406125836)*x_ref[2]
-        ref[5,1,0]=(0.718149875204)*x_ref[0]**o+(-0.183000739787)*x_ref[0]+(-0.655724252373)*x_ref[1]**o+(-0.634941710776)*x_ref[1]+(-0.26300163323)*x_ref[2]**o+(-0.25105424715)*x_ref[2]
-        ref[5,1,1]=(0.109601904441)*x_ref[0]**o+(-0.00640764631554)*x_ref[0]+(-0.488035610009)*x_ref[1]**o+(0.909668323769)*x_ref[1]+(0.229692168501)*x_ref[2]**o+(-0.739241309497)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.912518456494)*x[0]**o+(-0.828176151903)*x[0]+(-0.313940298121)*x[1]**o+(-0.850120336531)*x[1]
-        arg[0,0,0,1]=(0.14415852783)*x[0]**o+(-0.294155246668)*x[0]+(0.562517248232)*x[1]**o+(-0.204505938286)*x[1]
-        arg[0,0,1,0]=(0.555455404368)*x[0]**o+(0.916425343576)*x[0]+(0.547252315693)*x[1]**o+(-0.0992842367479)*x[1]
-        arg[0,0,1,1]=(0.603632473928)*x[0]**o+(0.505571549062)*x[0]+(-0.490402921542)*x[1]**o+(0.908624427316)*x[1]
-        arg[0,0,2,0]=(0.729542308985)*x[0]**o+(-0.654310868638)*x[0]+(0.0845981276245)*x[1]**o+(-0.95231604686)*x[1]
-        arg[0,0,2,1]=(0.0511615606745)*x[0]**o+(-0.939469887975)*x[0]+(-0.206229418155)*x[1]**o+(0.254879844701)*x[1]
-        arg[0,1,0,0]=(0.257917344507)*x[0]**o+(0.860729621288)*x[0]+(0.489966193348)*x[1]**o+(0.174897233858)*x[1]
-        arg[0,1,0,1]=(0.336588362051)*x[0]**o+(-0.690598635114)*x[0]+(-0.0913735300483)*x[1]**o+(-0.932914439004)*x[1]
-        arg[0,1,1,0]=(0.244583093108)*x[0]**o+(-0.827768167758)*x[0]+(0.573065359412)*x[1]**o+(0.176685515596)*x[1]
-        arg[0,1,1,1]=(-0.520550726127)*x[0]**o+(-0.605243177286)*x[0]+(0.130549556226)*x[1]**o+(0.750019884067)*x[1]
-        arg[0,1,2,0]=(-0.680201627614)*x[0]**o+(0.679925324882)*x[0]+(-0.060408604263)*x[1]**o+(0.568125689359)*x[1]
-        arg[0,1,2,1]=(-0.111908859432)*x[0]**o+(0.256521037018)*x[0]+(0.332050616611)*x[1]**o+(-0.0500016397683)*x[1]
-        arg[0,2,0,0]=(-0.484953933663)*x[0]**o+(0.628032211831)*x[0]+(-0.63297141454)*x[1]**o+(0.141016662755)*x[1]
-        arg[0,2,0,1]=(-0.463920680465)*x[0]**o+(-0.868825520511)*x[0]+(-0.36594425006)*x[1]**o+(-0.823052216578)*x[1]
-        arg[0,2,1,0]=(0.972337802357)*x[0]**o+(0.943605157343)*x[0]+(-0.113950717844)*x[1]**o+(-0.839596452897)*x[1]
-        arg[0,2,1,1]=(-0.295562401302)*x[0]**o+(0.735770621017)*x[0]+(-0.183838912348)*x[1]**o+(-0.929365380252)*x[1]
-        arg[0,2,2,0]=(0.912886298388)*x[0]**o+(0.847507982065)*x[0]+(-0.341306036323)*x[1]**o+(0.393627025978)*x[1]
-        arg[0,2,2,1]=(-0.769650638386)*x[0]**o+(-0.619672356488)*x[0]+(-0.126894288906)*x[1]**o+(0.231547632139)*x[1]
-        arg[0,3,0,0]=(-0.884442976834)*x[0]**o+(-0.0194505760676)*x[0]+(-0.338764675072)*x[1]**o+(0.723481600171)*x[1]
-        arg[0,3,0,1]=(0.655973555091)*x[0]**o+(-0.556230649412)*x[0]+(-0.850356832441)*x[1]**o+(0.115267314853)*x[1]
-        arg[0,3,1,0]=(0.659628443559)*x[0]**o+(-0.586677822491)*x[0]+(0.135930588518)*x[1]**o+(0.206866895948)*x[1]
-        arg[0,3,1,1]=(-0.700258957557)*x[0]**o+(-0.699774198764)*x[0]+(-0.294009479186)*x[1]**o+(0.848159666503)*x[1]
-        arg[0,3,2,0]=(-0.927501754488)*x[0]**o+(-0.981178071331)*x[0]+(0.614074194451)*x[1]**o+(0.711549573086)*x[1]
-        arg[0,3,2,1]=(0.312434473198)*x[0]**o+(-0.241506125991)*x[0]+(-0.0840979088912)*x[1]**o+(0.902948463117)*x[1]
-        arg[0,4,0,0]=(-0.892269860242)*x[0]**o+(0.823434435855)*x[0]+(0.50499383365)*x[1]**o+(0.763736541034)*x[1]
-        arg[0,4,0,1]=(-0.606959691191)*x[0]**o+(0.945562536791)*x[0]+(-0.46271929481)*x[1]**o+(0.929514432096)*x[1]
-        arg[0,4,1,0]=(0.953382685939)*x[0]**o+(0.553766359805)*x[0]+(-0.191004010293)*x[1]**o+(0.556369491698)*x[1]
-        arg[0,4,1,1]=(-0.269402649165)*x[0]**o+(-0.158926232076)*x[0]+(-0.390038749681)*x[1]**o+(0.553655192666)*x[1]
-        arg[0,4,2,0]=(0.0785586372006)*x[0]**o+(-0.778452221862)*x[0]+(-0.927627273292)*x[1]**o+(-0.187742405246)*x[1]
-        arg[0,4,2,1]=(-0.965329945447)*x[0]**o+(0.304539006089)*x[0]+(0.213031689568)*x[1]**o+(-0.2807790149)*x[1]
-        arg[1,0,0,0]=(0.981534698569)*x[0]**o+(0.466451685806)*x[0]+(0.845322931856)*x[1]**o+(0.582422032334)*x[1]
-        arg[1,0,0,1]=(-0.0645798740394)*x[0]**o+(0.0475214206619)*x[0]+(-0.687759433076)*x[1]**o+(0.403440938285)*x[1]
-        arg[1,0,1,0]=(-0.317887773392)*x[0]**o+(0.59101163416)*x[0]+(0.658626263291)*x[1]**o+(-0.618167594137)*x[1]
-        arg[1,0,1,1]=(-0.314093092813)*x[0]**o+(0.699933899942)*x[0]+(0.824195260822)*x[1]**o+(-0.42875327345)*x[1]
-        arg[1,0,2,0]=(-0.254254956887)*x[0]**o+(-0.912137080163)*x[0]+(0.360457121452)*x[1]**o+(-0.902596912588)*x[1]
-        arg[1,0,2,1]=(-0.577214593683)*x[0]**o+(-0.419495663008)*x[0]+(-0.803459783331)*x[1]**o+(0.490885513568)*x[1]
-        arg[1,1,0,0]=(0.477947766892)*x[0]**o+(-0.853046971581)*x[0]+(0.576044041601)*x[1]**o+(-0.447007701252)*x[1]
-        arg[1,1,0,1]=(0.5886933409)*x[0]**o+(0.253650778351)*x[0]+(-0.198070684431)*x[1]**o+(0.189479364528)*x[1]
-        arg[1,1,1,0]=(-0.528744478872)*x[0]**o+(-0.504072059557)*x[0]+(-0.0161832474015)*x[1]**o+(0.639592055966)*x[1]
-        arg[1,1,1,1]=(-0.581844827169)*x[0]**o+(0.997883224538)*x[0]+(0.9354364489)*x[1]**o+(0.884060785136)*x[1]
-        arg[1,1,2,0]=(0.858226955817)*x[0]**o+(0.707261698312)*x[0]+(-0.738309111076)*x[1]**o+(-0.644655976448)*x[1]
-        arg[1,1,2,1]=(-0.254976445964)*x[0]**o+(-0.624982185158)*x[0]+(0.304854486996)*x[1]**o+(0.597089811682)*x[1]
-        arg[1,2,0,0]=(-0.625190759215)*x[0]**o+(-0.267820197905)*x[0]+(-0.721452024377)*x[1]**o+(-0.830984245819)*x[1]
-        arg[1,2,0,1]=(-0.972257608766)*x[0]**o+(0.981368890544)*x[0]+(-0.925886510064)*x[1]**o+(-0.337107356862)*x[1]
-        arg[1,2,1,0]=(-0.178932954207)*x[0]**o+(-0.941789507374)*x[0]+(0.360726744794)*x[1]**o+(0.347621863123)*x[1]
-        arg[1,2,1,1]=(-0.59790695611)*x[0]**o+(0.552509013166)*x[0]+(0.592412443998)*x[1]**o+(0.105369637971)*x[1]
-        arg[1,2,2,0]=(0.300713195225)*x[0]**o+(0.814257503574)*x[0]+(-0.281407483492)*x[1]**o+(-0.803431681095)*x[1]
-        arg[1,2,2,1]=(0.80113022942)*x[0]**o+(0.749336171665)*x[0]+(-0.0842928982283)*x[1]**o+(-0.974041792058)*x[1]
-        arg[1,3,0,0]=(0.533118876666)*x[0]**o+(-0.00888178987567)*x[0]+(0.372869213762)*x[1]**o+(-0.652513683144)*x[1]
-        arg[1,3,0,1]=(-0.295090222537)*x[0]**o+(0.772749124303)*x[0]+(-0.00857029468729)*x[1]**o+(0.927794431125)*x[1]
-        arg[1,3,1,0]=(-0.152537465441)*x[0]**o+(0.154900534979)*x[0]+(-0.488743959543)*x[1]**o+(-0.0318497199232)*x[1]
-        arg[1,3,1,1]=(-0.754333787921)*x[0]**o+(-0.0583007358701)*x[0]+(-0.050921106891)*x[1]**o+(0.161426452156)*x[1]
-        arg[1,3,2,0]=(0.387357469451)*x[0]**o+(-0.213640305885)*x[0]+(-0.844609663023)*x[1]**o+(0.0761914594192)*x[1]
-        arg[1,3,2,1]=(0.36964862459)*x[0]**o+(0.887888401952)*x[0]+(-0.933930511093)*x[1]**o+(0.769046614932)*x[1]
-        arg[1,4,0,0]=(0.680878887266)*x[0]**o+(0.62930033679)*x[0]+(0.894793542585)*x[1]**o+(-0.636881609067)*x[1]
-        arg[1,4,0,1]=(-0.346053756598)*x[0]**o+(0.225254433923)*x[0]+(-0.861052985621)*x[1]**o+(0.415123108136)*x[1]
-        arg[1,4,1,0]=(-0.997758408183)*x[0]**o+(-0.265055614341)*x[0]+(-0.7568881617)*x[1]**o+(0.95144584777)*x[1]
-        arg[1,4,1,1]=(0.227777912008)*x[0]**o+(-0.83647660817)*x[0]+(-0.275733410165)*x[1]**o+(-0.971560248343)*x[1]
-        arg[1,4,2,0]=(0.718803859114)*x[0]**o+(-0.978966510682)*x[0]+(0.463102438649)*x[1]**o+(0.987805610534)*x[1]
-        arg[1,4,2,1]=(-0.107543838917)*x[0]**o+(-0.362684018694)*x[0]+(-0.310926939373)*x[1]**o+(-0.571571044712)*x[1]
-        arg[2,0,0,0]=(-0.475977416182)*x[0]**o+(-0.627173002609)*x[0]+(-0.369962970984)*x[1]**o+(-0.245077302537)*x[1]
-        arg[2,0,0,1]=(0.913949611751)*x[0]**o+(0.645611424617)*x[0]+(0.639304734076)*x[1]**o+(-0.12171441998)*x[1]
-        arg[2,0,1,0]=(0.251434098263)*x[0]**o+(-0.119898861407)*x[0]+(-0.365614523709)*x[1]**o+(-0.802928738296)*x[1]
-        arg[2,0,1,1]=(0.756390927006)*x[0]**o+(0.246578936199)*x[0]+(0.714968085461)*x[1]**o+(-0.929428808096)*x[1]
-        arg[2,0,2,0]=(-0.516888361447)*x[0]**o+(0.0344339250886)*x[0]+(-0.383709788774)*x[1]**o+(-0.437344417623)*x[1]
-        arg[2,0,2,1]=(-0.219307162317)*x[0]**o+(0.704909718842)*x[0]+(-0.340454491855)*x[1]**o+(-0.933866231773)*x[1]
-        arg[2,1,0,0]=(-0.0618967891627)*x[0]**o+(-0.0590712030789)*x[0]+(0.116776433077)*x[1]**o+(0.0241239764104)*x[1]
-        arg[2,1,0,1]=(-0.802207645638)*x[0]**o+(0.590732740531)*x[0]+(-0.25990272933)*x[1]**o+(-0.257633805416)*x[1]
-        arg[2,1,1,0]=(0.827623274379)*x[0]**o+(-0.450310573599)*x[0]+(0.213809775826)*x[1]**o+(-0.905410777787)*x[1]
-        arg[2,1,1,1]=(-0.624510830356)*x[0]**o+(-0.705682607787)*x[0]+(0.430105716993)*x[1]**o+(0.975510832521)*x[1]
-        arg[2,1,2,0]=(-0.297562223309)*x[0]**o+(-0.99090348994)*x[0]+(0.548589416291)*x[1]**o+(0.591718478583)*x[1]
-        arg[2,1,2,1]=(-0.531899919376)*x[0]**o+(-0.227453719581)*x[0]+(-0.131664806128)*x[1]**o+(0.0521895817509)*x[1]
-        arg[2,2,0,0]=(-0.592291745786)*x[0]**o+(-0.586879961972)*x[0]+(0.563196552327)*x[1]**o+(0.876989321187)*x[1]
-        arg[2,2,0,1]=(-0.273360445369)*x[0]**o+(-0.714740527775)*x[0]+(-0.647699497837)*x[1]**o+(-0.0405089612762)*x[1]
-        arg[2,2,1,0]=(-0.536629732224)*x[0]**o+(0.72656373966)*x[0]+(0.986630594165)*x[1]**o+(0.0741630711667)*x[1]
-        arg[2,2,1,1]=(0.770746088838)*x[0]**o+(-0.219279833426)*x[0]+(0.875445174779)*x[1]**o+(-0.947889926444)*x[1]
-        arg[2,2,2,0]=(-0.41428815119)*x[0]**o+(-0.696166268903)*x[0]+(-0.96838062553)*x[1]**o+(0.781394205899)*x[1]
-        arg[2,2,2,1]=(-0.810267960752)*x[0]**o+(-0.873632687702)*x[0]+(0.0131971321611)*x[1]**o+(-0.552767192193)*x[1]
-        arg[2,3,0,0]=(-0.216091366291)*x[0]**o+(-0.17824047472)*x[0]+(-0.4644515725)*x[1]**o+(0.135819458957)*x[1]
-        arg[2,3,0,1]=(-0.0823616523105)*x[0]**o+(0.33121362151)*x[0]+(0.926719919839)*x[1]**o+(0.663475641636)*x[1]
-        arg[2,3,1,0]=(-0.278303066047)*x[0]**o+(-0.457286378314)*x[0]+(0.186792859092)*x[1]**o+(-0.734245612464)*x[1]
-        arg[2,3,1,1]=(0.810871459779)*x[0]**o+(-0.706641995324)*x[0]+(-0.287827176091)*x[1]**o+(0.453216090282)*x[1]
-        arg[2,3,2,0]=(0.83826221049)*x[0]**o+(0.556887792111)*x[0]+(-0.000231102245991)*x[1]**o+(-0.440730958954)*x[1]
-        arg[2,3,2,1]=(-0.455087877907)*x[0]**o+(-0.132259634036)*x[0]+(-0.492728335525)*x[1]**o+(-0.880311317777)*x[1]
-        arg[2,4,0,0]=(-0.303141352388)*x[0]**o+(0.426137046804)*x[0]+(0.788934776738)*x[1]**o+(0.157477785179)*x[1]
-        arg[2,4,0,1]=(0.603411288614)*x[0]**o+(-0.533561451987)*x[0]+(-0.901259210942)*x[1]**o+(0.547372624746)*x[1]
-        arg[2,4,1,0]=(0.69517961739)*x[0]**o+(-0.106282888246)*x[0]+(0.257484565681)*x[1]**o+(0.655749633294)*x[1]
-        arg[2,4,1,1]=(-0.072748573118)*x[0]**o+(0.905966560113)*x[0]+(0.433145718123)*x[1]**o+(0.187620401615)*x[1]
-        arg[2,4,2,0]=(-0.0280176325954)*x[0]**o+(0.489610131347)*x[0]+(-0.740554922134)*x[1]**o+(-0.85045302096)*x[1]
-        arg[2,4,2,1]=(-0.158503180709)*x[0]**o+(0.525929643075)*x[0]+(-0.352022652515)*x[1]**o+(-0.706553104932)*x[1]
-        arg[3,0,0,0]=(-0.837316508127)*x[0]**o+(-0.89490181779)*x[0]+(0.510084075291)*x[1]**o+(0.321206310024)*x[1]
-        arg[3,0,0,1]=(-0.325038591079)*x[0]**o+(0.140342922753)*x[0]+(-0.937466403004)*x[1]**o+(0.580557383497)*x[1]
-        arg[3,0,1,0]=(-0.939713654062)*x[0]**o+(-0.394660244166)*x[0]+(0.762376614557)*x[1]**o+(-0.135565547532)*x[1]
-        arg[3,0,1,1]=(0.0275332524464)*x[0]**o+(0.368737701882)*x[0]+(0.983641372218)*x[1]**o+(0.573815516366)*x[1]
-        arg[3,0,2,0]=(0.816957570314)*x[0]**o+(-0.357626892562)*x[0]+(-0.368933149642)*x[1]**o+(-0.692502486914)*x[1]
-        arg[3,0,2,1]=(-0.372408810926)*x[0]**o+(-0.113036390416)*x[0]+(-0.355880297003)*x[1]**o+(0.755478191481)*x[1]
-        arg[3,1,0,0]=(0.0399012900832)*x[0]**o+(-0.879576900086)*x[0]+(-0.660858776134)*x[1]**o+(-0.59837040429)*x[1]
-        arg[3,1,0,1]=(0.569397128496)*x[0]**o+(-0.138333417746)*x[0]+(0.257769147727)*x[1]**o+(0.174737141027)*x[1]
-        arg[3,1,1,0]=(-0.67938408823)*x[0]**o+(0.862731161981)*x[0]+(-0.792538485264)*x[1]**o+(-0.0805197796157)*x[1]
-        arg[3,1,1,1]=(0.0113523229279)*x[0]**o+(0.475393597561)*x[0]+(-0.705748021886)*x[1]**o+(0.00836460135285)*x[1]
-        arg[3,1,2,0]=(0.463839509799)*x[0]**o+(-0.12663544643)*x[0]+(0.353158399738)*x[1]**o+(0.674929537597)*x[1]
-        arg[3,1,2,1]=(-0.6019896019)*x[0]**o+(-0.638280685565)*x[0]+(0.280047072988)*x[1]**o+(0.569239958138)*x[1]
-        arg[3,2,0,0]=(-0.113906500346)*x[0]**o+(-0.493494498501)*x[0]+(-0.686419229162)*x[1]**o+(-0.0727046763516)*x[1]
-        arg[3,2,0,1]=(-0.302092112795)*x[0]**o+(-0.74819167)*x[0]+(-0.478908975282)*x[1]**o+(0.430024789627)*x[1]
-        arg[3,2,1,0]=(0.353535608984)*x[0]**o+(-0.743408549264)*x[0]+(-0.069122881538)*x[1]**o+(-0.0767595089529)*x[1]
-        arg[3,2,1,1]=(-0.629946386234)*x[0]**o+(0.851779590894)*x[0]+(0.728577108695)*x[1]**o+(-0.366983040147)*x[1]
-        arg[3,2,2,0]=(0.1685167508)*x[0]**o+(0.149999747637)*x[0]+(0.709320430374)*x[1]**o+(-0.280950677222)*x[1]
-        arg[3,2,2,1]=(-0.956164974578)*x[0]**o+(0.240460380901)*x[0]+(-0.2820176577)*x[1]**o+(-0.595667156955)*x[1]
-        arg[3,3,0,0]=(-0.0711295055938)*x[0]**o+(-0.314513251791)*x[0]+(-0.41924591293)*x[1]**o+(0.0813197780959)*x[1]
-        arg[3,3,0,1]=(-0.230592584877)*x[0]**o+(-0.488005144715)*x[0]+(-0.450611759976)*x[1]**o+(-0.0571152769768)*x[1]
-        arg[3,3,1,0]=(-0.608255699014)*x[0]**o+(-0.697324108575)*x[0]+(-0.885935900746)*x[1]**o+(-0.884497550016)*x[1]
-        arg[3,3,1,1]=(0.857286225292)*x[0]**o+(0.509954550626)*x[0]+(0.182030821433)*x[1]**o+(-0.268076060316)*x[1]
-        arg[3,3,2,0]=(-0.77322653479)*x[0]**o+(-0.583013210018)*x[0]+(-0.683867300277)*x[1]**o+(0.754530541251)*x[1]
-        arg[3,3,2,1]=(-0.744667985181)*x[0]**o+(0.164165128978)*x[0]+(0.412340155958)*x[1]**o+(-0.38451107118)*x[1]
-        arg[3,4,0,0]=(0.216720755049)*x[0]**o+(-0.347803433722)*x[0]+(0.417376268797)*x[1]**o+(0.475787304652)*x[1]
-        arg[3,4,0,1]=(-0.737038295974)*x[0]**o+(0.579172519178)*x[0]+(-0.900272993672)*x[1]**o+(0.407018603625)*x[1]
-        arg[3,4,1,0]=(-0.898959236474)*x[0]**o+(-0.886636008121)*x[0]+(-0.901972610044)*x[1]**o+(-0.518393782318)*x[1]
-        arg[3,4,1,1]=(0.976342884921)*x[0]**o+(-0.273568319493)*x[0]+(-0.332424980846)*x[1]**o+(-0.0146661731139)*x[1]
-        arg[3,4,2,0]=(0.794792214027)*x[0]**o+(0.846927984413)*x[0]+(0.535818809709)*x[1]**o+(-0.49324400033)*x[1]
-        arg[3,4,2,1]=(0.695766308812)*x[0]**o+(-0.37923153689)*x[0]+(0.0633513026782)*x[1]**o+(0.12334892105)*x[1]
-        ref[0,0,0,0]=(0.912518456494)*x_ref[0]**o+(-0.828176151903)*x_ref[0]+(-0.313940298121)*x_ref[1]**o+(-0.850120336531)*x_ref[1]
-        ref[0,0,0,1]=(0.14415852783)*x_ref[0]**o+(-0.294155246668)*x_ref[0]+(0.562517248232)*x_ref[1]**o+(-0.204505938286)*x_ref[1]
-        ref[0,0,1,0]=(0.555455404368)*x_ref[0]**o+(0.916425343576)*x_ref[0]+(0.547252315693)*x_ref[1]**o+(-0.0992842367479)*x_ref[1]
-        ref[0,0,1,1]=(0.603632473928)*x_ref[0]**o+(0.505571549062)*x_ref[0]+(-0.490402921542)*x_ref[1]**o+(0.908624427316)*x_ref[1]
-        ref[0,0,2,0]=(0.729542308985)*x_ref[0]**o+(-0.654310868638)*x_ref[0]+(0.0845981276245)*x_ref[1]**o+(-0.95231604686)*x_ref[1]
-        ref[0,0,2,1]=(0.0511615606745)*x_ref[0]**o+(-0.939469887975)*x_ref[0]+(-0.206229418155)*x_ref[1]**o+(0.254879844701)*x_ref[1]
-        ref[0,1,0,0]=(0.257917344507)*x_ref[0]**o+(0.860729621288)*x_ref[0]+(0.489966193348)*x_ref[1]**o+(0.174897233858)*x_ref[1]
-        ref[0,1,0,1]=(0.336588362051)*x_ref[0]**o+(-0.690598635114)*x_ref[0]+(-0.0913735300483)*x_ref[1]**o+(-0.932914439004)*x_ref[1]
-        ref[0,1,1,0]=(0.244583093108)*x_ref[0]**o+(-0.827768167758)*x_ref[0]+(0.573065359412)*x_ref[1]**o+(0.176685515596)*x_ref[1]
-        ref[0,1,1,1]=(-0.520550726127)*x_ref[0]**o+(-0.605243177286)*x_ref[0]+(0.130549556226)*x_ref[1]**o+(0.750019884067)*x_ref[1]
-        ref[0,1,2,0]=(-0.680201627614)*x_ref[0]**o+(0.679925324882)*x_ref[0]+(-0.060408604263)*x_ref[1]**o+(0.568125689359)*x_ref[1]
-        ref[0,1,2,1]=(-0.111908859432)*x_ref[0]**o+(0.256521037018)*x_ref[0]+(0.332050616611)*x_ref[1]**o+(-0.0500016397683)*x_ref[1]
-        ref[0,2,0,0]=(-0.484953933663)*x_ref[0]**o+(0.628032211831)*x_ref[0]+(-0.63297141454)*x_ref[1]**o+(0.141016662755)*x_ref[1]
-        ref[0,2,0,1]=(-0.463920680465)*x_ref[0]**o+(-0.868825520511)*x_ref[0]+(-0.36594425006)*x_ref[1]**o+(-0.823052216578)*x_ref[1]
-        ref[0,2,1,0]=(0.972337802357)*x_ref[0]**o+(0.943605157343)*x_ref[0]+(-0.113950717844)*x_ref[1]**o+(-0.839596452897)*x_ref[1]
-        ref[0,2,1,1]=(-0.295562401302)*x_ref[0]**o+(0.735770621017)*x_ref[0]+(-0.183838912348)*x_ref[1]**o+(-0.929365380252)*x_ref[1]
-        ref[0,2,2,0]=(0.912886298388)*x_ref[0]**o+(0.847507982065)*x_ref[0]+(-0.341306036323)*x_ref[1]**o+(0.393627025978)*x_ref[1]
-        ref[0,2,2,1]=(-0.769650638386)*x_ref[0]**o+(-0.619672356488)*x_ref[0]+(-0.126894288906)*x_ref[1]**o+(0.231547632139)*x_ref[1]
-        ref[0,3,0,0]=(-0.884442976834)*x_ref[0]**o+(-0.0194505760676)*x_ref[0]+(-0.338764675072)*x_ref[1]**o+(0.723481600171)*x_ref[1]
-        ref[0,3,0,1]=(0.655973555091)*x_ref[0]**o+(-0.556230649412)*x_ref[0]+(-0.850356832441)*x_ref[1]**o+(0.115267314853)*x_ref[1]
-        ref[0,3,1,0]=(0.659628443559)*x_ref[0]**o+(-0.586677822491)*x_ref[0]+(0.135930588518)*x_ref[1]**o+(0.206866895948)*x_ref[1]
-        ref[0,3,1,1]=(-0.700258957557)*x_ref[0]**o+(-0.699774198764)*x_ref[0]+(-0.294009479186)*x_ref[1]**o+(0.848159666503)*x_ref[1]
-        ref[0,3,2,0]=(-0.927501754488)*x_ref[0]**o+(-0.981178071331)*x_ref[0]+(0.614074194451)*x_ref[1]**o+(0.711549573086)*x_ref[1]
-        ref[0,3,2,1]=(0.312434473198)*x_ref[0]**o+(-0.241506125991)*x_ref[0]+(-0.0840979088912)*x_ref[1]**o+(0.902948463117)*x_ref[1]
-        ref[0,4,0,0]=(-0.892269860242)*x_ref[0]**o+(0.823434435855)*x_ref[0]+(0.50499383365)*x_ref[1]**o+(0.763736541034)*x_ref[1]
-        ref[0,4,0,1]=(-0.606959691191)*x_ref[0]**o+(0.945562536791)*x_ref[0]+(-0.46271929481)*x_ref[1]**o+(0.929514432096)*x_ref[1]
-        ref[0,4,1,0]=(0.953382685939)*x_ref[0]**o+(0.553766359805)*x_ref[0]+(-0.191004010293)*x_ref[1]**o+(0.556369491698)*x_ref[1]
-        ref[0,4,1,1]=(-0.269402649165)*x_ref[0]**o+(-0.158926232076)*x_ref[0]+(-0.390038749681)*x_ref[1]**o+(0.553655192666)*x_ref[1]
-        ref[0,4,2,0]=(0.0785586372006)*x_ref[0]**o+(-0.778452221862)*x_ref[0]+(-0.927627273292)*x_ref[1]**o+(-0.187742405246)*x_ref[1]
-        ref[0,4,2,1]=(-0.965329945447)*x_ref[0]**o+(0.304539006089)*x_ref[0]+(0.213031689568)*x_ref[1]**o+(-0.2807790149)*x_ref[1]
-        ref[1,0,0,0]=(0.981534698569)*x_ref[0]**o+(0.466451685806)*x_ref[0]+(0.845322931856)*x_ref[1]**o+(0.582422032334)*x_ref[1]
-        ref[1,0,0,1]=(-0.0645798740394)*x_ref[0]**o+(0.0475214206619)*x_ref[0]+(-0.687759433076)*x_ref[1]**o+(0.403440938285)*x_ref[1]
-        ref[1,0,1,0]=(-0.317887773392)*x_ref[0]**o+(0.59101163416)*x_ref[0]+(0.658626263291)*x_ref[1]**o+(-0.618167594137)*x_ref[1]
-        ref[1,0,1,1]=(-0.314093092813)*x_ref[0]**o+(0.699933899942)*x_ref[0]+(0.824195260822)*x_ref[1]**o+(-0.42875327345)*x_ref[1]
-        ref[1,0,2,0]=(-0.254254956887)*x_ref[0]**o+(-0.912137080163)*x_ref[0]+(0.360457121452)*x_ref[1]**o+(-0.902596912588)*x_ref[1]
-        ref[1,0,2,1]=(-0.577214593683)*x_ref[0]**o+(-0.419495663008)*x_ref[0]+(-0.803459783331)*x_ref[1]**o+(0.490885513568)*x_ref[1]
-        ref[1,1,0,0]=(0.477947766892)*x_ref[0]**o+(-0.853046971581)*x_ref[0]+(0.576044041601)*x_ref[1]**o+(-0.447007701252)*x_ref[1]
-        ref[1,1,0,1]=(0.5886933409)*x_ref[0]**o+(0.253650778351)*x_ref[0]+(-0.198070684431)*x_ref[1]**o+(0.189479364528)*x_ref[1]
-        ref[1,1,1,0]=(-0.528744478872)*x_ref[0]**o+(-0.504072059557)*x_ref[0]+(-0.0161832474015)*x_ref[1]**o+(0.639592055966)*x_ref[1]
-        ref[1,1,1,1]=(-0.581844827169)*x_ref[0]**o+(0.997883224538)*x_ref[0]+(0.9354364489)*x_ref[1]**o+(0.884060785136)*x_ref[1]
-        ref[1,1,2,0]=(0.858226955817)*x_ref[0]**o+(0.707261698312)*x_ref[0]+(-0.738309111076)*x_ref[1]**o+(-0.644655976448)*x_ref[1]
-        ref[1,1,2,1]=(-0.254976445964)*x_ref[0]**o+(-0.624982185158)*x_ref[0]+(0.304854486996)*x_ref[1]**o+(0.597089811682)*x_ref[1]
-        ref[1,2,0,0]=(-0.625190759215)*x_ref[0]**o+(-0.267820197905)*x_ref[0]+(-0.721452024377)*x_ref[1]**o+(-0.830984245819)*x_ref[1]
-        ref[1,2,0,1]=(-0.972257608766)*x_ref[0]**o+(0.981368890544)*x_ref[0]+(-0.925886510064)*x_ref[1]**o+(-0.337107356862)*x_ref[1]
-        ref[1,2,1,0]=(-0.178932954207)*x_ref[0]**o+(-0.941789507374)*x_ref[0]+(0.360726744794)*x_ref[1]**o+(0.347621863123)*x_ref[1]
-        ref[1,2,1,1]=(-0.59790695611)*x_ref[0]**o+(0.552509013166)*x_ref[0]+(0.592412443998)*x_ref[1]**o+(0.105369637971)*x_ref[1]
-        ref[1,2,2,0]=(0.300713195225)*x_ref[0]**o+(0.814257503574)*x_ref[0]+(-0.281407483492)*x_ref[1]**o+(-0.803431681095)*x_ref[1]
-        ref[1,2,2,1]=(0.80113022942)*x_ref[0]**o+(0.749336171665)*x_ref[0]+(-0.0842928982283)*x_ref[1]**o+(-0.974041792058)*x_ref[1]
-        ref[1,3,0,0]=(0.533118876666)*x_ref[0]**o+(-0.00888178987567)*x_ref[0]+(0.372869213762)*x_ref[1]**o+(-0.652513683144)*x_ref[1]
-        ref[1,3,0,1]=(-0.295090222537)*x_ref[0]**o+(0.772749124303)*x_ref[0]+(-0.00857029468729)*x_ref[1]**o+(0.927794431125)*x_ref[1]
-        ref[1,3,1,0]=(-0.152537465441)*x_ref[0]**o+(0.154900534979)*x_ref[0]+(-0.488743959543)*x_ref[1]**o+(-0.0318497199232)*x_ref[1]
-        ref[1,3,1,1]=(-0.754333787921)*x_ref[0]**o+(-0.0583007358701)*x_ref[0]+(-0.050921106891)*x_ref[1]**o+(0.161426452156)*x_ref[1]
-        ref[1,3,2,0]=(0.387357469451)*x_ref[0]**o+(-0.213640305885)*x_ref[0]+(-0.844609663023)*x_ref[1]**o+(0.0761914594192)*x_ref[1]
-        ref[1,3,2,1]=(0.36964862459)*x_ref[0]**o+(0.887888401952)*x_ref[0]+(-0.933930511093)*x_ref[1]**o+(0.769046614932)*x_ref[1]
-        ref[1,4,0,0]=(0.680878887266)*x_ref[0]**o+(0.62930033679)*x_ref[0]+(0.894793542585)*x_ref[1]**o+(-0.636881609067)*x_ref[1]
-        ref[1,4,0,1]=(-0.346053756598)*x_ref[0]**o+(0.225254433923)*x_ref[0]+(-0.861052985621)*x_ref[1]**o+(0.415123108136)*x_ref[1]
-        ref[1,4,1,0]=(-0.997758408183)*x_ref[0]**o+(-0.265055614341)*x_ref[0]+(-0.7568881617)*x_ref[1]**o+(0.95144584777)*x_ref[1]
-        ref[1,4,1,1]=(0.227777912008)*x_ref[0]**o+(-0.83647660817)*x_ref[0]+(-0.275733410165)*x_ref[1]**o+(-0.971560248343)*x_ref[1]
-        ref[1,4,2,0]=(0.718803859114)*x_ref[0]**o+(-0.978966510682)*x_ref[0]+(0.463102438649)*x_ref[1]**o+(0.987805610534)*x_ref[1]
-        ref[1,4,2,1]=(-0.107543838917)*x_ref[0]**o+(-0.362684018694)*x_ref[0]+(-0.310926939373)*x_ref[1]**o+(-0.571571044712)*x_ref[1]
-        ref[2,0,0,0]=(-0.475977416182)*x_ref[0]**o+(-0.627173002609)*x_ref[0]+(-0.369962970984)*x_ref[1]**o+(-0.245077302537)*x_ref[1]
-        ref[2,0,0,1]=(0.913949611751)*x_ref[0]**o+(0.645611424617)*x_ref[0]+(0.639304734076)*x_ref[1]**o+(-0.12171441998)*x_ref[1]
-        ref[2,0,1,0]=(0.251434098263)*x_ref[0]**o+(-0.119898861407)*x_ref[0]+(-0.365614523709)*x_ref[1]**o+(-0.802928738296)*x_ref[1]
-        ref[2,0,1,1]=(0.756390927006)*x_ref[0]**o+(0.246578936199)*x_ref[0]+(0.714968085461)*x_ref[1]**o+(-0.929428808096)*x_ref[1]
-        ref[2,0,2,0]=(-0.516888361447)*x_ref[0]**o+(0.0344339250886)*x_ref[0]+(-0.383709788774)*x_ref[1]**o+(-0.437344417623)*x_ref[1]
-        ref[2,0,2,1]=(-0.219307162317)*x_ref[0]**o+(0.704909718842)*x_ref[0]+(-0.340454491855)*x_ref[1]**o+(-0.933866231773)*x_ref[1]
-        ref[2,1,0,0]=(-0.0618967891627)*x_ref[0]**o+(-0.0590712030789)*x_ref[0]+(0.116776433077)*x_ref[1]**o+(0.0241239764104)*x_ref[1]
-        ref[2,1,0,1]=(-0.802207645638)*x_ref[0]**o+(0.590732740531)*x_ref[0]+(-0.25990272933)*x_ref[1]**o+(-0.257633805416)*x_ref[1]
-        ref[2,1,1,0]=(0.827623274379)*x_ref[0]**o+(-0.450310573599)*x_ref[0]+(0.213809775826)*x_ref[1]**o+(-0.905410777787)*x_ref[1]
-        ref[2,1,1,1]=(-0.624510830356)*x_ref[0]**o+(-0.705682607787)*x_ref[0]+(0.430105716993)*x_ref[1]**o+(0.975510832521)*x_ref[1]
-        ref[2,1,2,0]=(-0.297562223309)*x_ref[0]**o+(-0.99090348994)*x_ref[0]+(0.548589416291)*x_ref[1]**o+(0.591718478583)*x_ref[1]
-        ref[2,1,2,1]=(-0.531899919376)*x_ref[0]**o+(-0.227453719581)*x_ref[0]+(-0.131664806128)*x_ref[1]**o+(0.0521895817509)*x_ref[1]
-        ref[2,2,0,0]=(-0.592291745786)*x_ref[0]**o+(-0.586879961972)*x_ref[0]+(0.563196552327)*x_ref[1]**o+(0.876989321187)*x_ref[1]
-        ref[2,2,0,1]=(-0.273360445369)*x_ref[0]**o+(-0.714740527775)*x_ref[0]+(-0.647699497837)*x_ref[1]**o+(-0.0405089612762)*x_ref[1]
-        ref[2,2,1,0]=(-0.536629732224)*x_ref[0]**o+(0.72656373966)*x_ref[0]+(0.986630594165)*x_ref[1]**o+(0.0741630711667)*x_ref[1]
-        ref[2,2,1,1]=(0.770746088838)*x_ref[0]**o+(-0.219279833426)*x_ref[0]+(0.875445174779)*x_ref[1]**o+(-0.947889926444)*x_ref[1]
-        ref[2,2,2,0]=(-0.41428815119)*x_ref[0]**o+(-0.696166268903)*x_ref[0]+(-0.96838062553)*x_ref[1]**o+(0.781394205899)*x_ref[1]
-        ref[2,2,2,1]=(-0.810267960752)*x_ref[0]**o+(-0.873632687702)*x_ref[0]+(0.0131971321611)*x_ref[1]**o+(-0.552767192193)*x_ref[1]
-        ref[2,3,0,0]=(-0.216091366291)*x_ref[0]**o+(-0.17824047472)*x_ref[0]+(-0.4644515725)*x_ref[1]**o+(0.135819458957)*x_ref[1]
-        ref[2,3,0,1]=(-0.0823616523105)*x_ref[0]**o+(0.33121362151)*x_ref[0]+(0.926719919839)*x_ref[1]**o+(0.663475641636)*x_ref[1]
-        ref[2,3,1,0]=(-0.278303066047)*x_ref[0]**o+(-0.457286378314)*x_ref[0]+(0.186792859092)*x_ref[1]**o+(-0.734245612464)*x_ref[1]
-        ref[2,3,1,1]=(0.810871459779)*x_ref[0]**o+(-0.706641995324)*x_ref[0]+(-0.287827176091)*x_ref[1]**o+(0.453216090282)*x_ref[1]
-        ref[2,3,2,0]=(0.83826221049)*x_ref[0]**o+(0.556887792111)*x_ref[0]+(-0.000231102245991)*x_ref[1]**o+(-0.440730958954)*x_ref[1]
-        ref[2,3,2,1]=(-0.455087877907)*x_ref[0]**o+(-0.132259634036)*x_ref[0]+(-0.492728335525)*x_ref[1]**o+(-0.880311317777)*x_ref[1]
-        ref[2,4,0,0]=(-0.303141352388)*x_ref[0]**o+(0.426137046804)*x_ref[0]+(0.788934776738)*x_ref[1]**o+(0.157477785179)*x_ref[1]
-        ref[2,4,0,1]=(0.603411288614)*x_ref[0]**o+(-0.533561451987)*x_ref[0]+(-0.901259210942)*x_ref[1]**o+(0.547372624746)*x_ref[1]
-        ref[2,4,1,0]=(0.69517961739)*x_ref[0]**o+(-0.106282888246)*x_ref[0]+(0.257484565681)*x_ref[1]**o+(0.655749633294)*x_ref[1]
-        ref[2,4,1,1]=(-0.072748573118)*x_ref[0]**o+(0.905966560113)*x_ref[0]+(0.433145718123)*x_ref[1]**o+(0.187620401615)*x_ref[1]
-        ref[2,4,2,0]=(-0.0280176325954)*x_ref[0]**o+(0.489610131347)*x_ref[0]+(-0.740554922134)*x_ref[1]**o+(-0.85045302096)*x_ref[1]
-        ref[2,4,2,1]=(-0.158503180709)*x_ref[0]**o+(0.525929643075)*x_ref[0]+(-0.352022652515)*x_ref[1]**o+(-0.706553104932)*x_ref[1]
-        ref[3,0,0,0]=(-0.837316508127)*x_ref[0]**o+(-0.89490181779)*x_ref[0]+(0.510084075291)*x_ref[1]**o+(0.321206310024)*x_ref[1]
-        ref[3,0,0,1]=(-0.325038591079)*x_ref[0]**o+(0.140342922753)*x_ref[0]+(-0.937466403004)*x_ref[1]**o+(0.580557383497)*x_ref[1]
-        ref[3,0,1,0]=(-0.939713654062)*x_ref[0]**o+(-0.394660244166)*x_ref[0]+(0.762376614557)*x_ref[1]**o+(-0.135565547532)*x_ref[1]
-        ref[3,0,1,1]=(0.0275332524464)*x_ref[0]**o+(0.368737701882)*x_ref[0]+(0.983641372218)*x_ref[1]**o+(0.573815516366)*x_ref[1]
-        ref[3,0,2,0]=(0.816957570314)*x_ref[0]**o+(-0.357626892562)*x_ref[0]+(-0.368933149642)*x_ref[1]**o+(-0.692502486914)*x_ref[1]
-        ref[3,0,2,1]=(-0.372408810926)*x_ref[0]**o+(-0.113036390416)*x_ref[0]+(-0.355880297003)*x_ref[1]**o+(0.755478191481)*x_ref[1]
-        ref[3,1,0,0]=(0.0399012900832)*x_ref[0]**o+(-0.879576900086)*x_ref[0]+(-0.660858776134)*x_ref[1]**o+(-0.59837040429)*x_ref[1]
-        ref[3,1,0,1]=(0.569397128496)*x_ref[0]**o+(-0.138333417746)*x_ref[0]+(0.257769147727)*x_ref[1]**o+(0.174737141027)*x_ref[1]
-        ref[3,1,1,0]=(-0.67938408823)*x_ref[0]**o+(0.862731161981)*x_ref[0]+(-0.792538485264)*x_ref[1]**o+(-0.0805197796157)*x_ref[1]
-        ref[3,1,1,1]=(0.0113523229279)*x_ref[0]**o+(0.475393597561)*x_ref[0]+(-0.705748021886)*x_ref[1]**o+(0.00836460135285)*x_ref[1]
-        ref[3,1,2,0]=(0.463839509799)*x_ref[0]**o+(-0.12663544643)*x_ref[0]+(0.353158399738)*x_ref[1]**o+(0.674929537597)*x_ref[1]
-        ref[3,1,2,1]=(-0.6019896019)*x_ref[0]**o+(-0.638280685565)*x_ref[0]+(0.280047072988)*x_ref[1]**o+(0.569239958138)*x_ref[1]
-        ref[3,2,0,0]=(-0.113906500346)*x_ref[0]**o+(-0.493494498501)*x_ref[0]+(-0.686419229162)*x_ref[1]**o+(-0.0727046763516)*x_ref[1]
-        ref[3,2,0,1]=(-0.302092112795)*x_ref[0]**o+(-0.74819167)*x_ref[0]+(-0.478908975282)*x_ref[1]**o+(0.430024789627)*x_ref[1]
-        ref[3,2,1,0]=(0.353535608984)*x_ref[0]**o+(-0.743408549264)*x_ref[0]+(-0.069122881538)*x_ref[1]**o+(-0.0767595089529)*x_ref[1]
-        ref[3,2,1,1]=(-0.629946386234)*x_ref[0]**o+(0.851779590894)*x_ref[0]+(0.728577108695)*x_ref[1]**o+(-0.366983040147)*x_ref[1]
-        ref[3,2,2,0]=(0.1685167508)*x_ref[0]**o+(0.149999747637)*x_ref[0]+(0.709320430374)*x_ref[1]**o+(-0.280950677222)*x_ref[1]
-        ref[3,2,2,1]=(-0.956164974578)*x_ref[0]**o+(0.240460380901)*x_ref[0]+(-0.2820176577)*x_ref[1]**o+(-0.595667156955)*x_ref[1]
-        ref[3,3,0,0]=(-0.0711295055938)*x_ref[0]**o+(-0.314513251791)*x_ref[0]+(-0.41924591293)*x_ref[1]**o+(0.0813197780959)*x_ref[1]
-        ref[3,3,0,1]=(-0.230592584877)*x_ref[0]**o+(-0.488005144715)*x_ref[0]+(-0.450611759976)*x_ref[1]**o+(-0.0571152769768)*x_ref[1]
-        ref[3,3,1,0]=(-0.608255699014)*x_ref[0]**o+(-0.697324108575)*x_ref[0]+(-0.885935900746)*x_ref[1]**o+(-0.884497550016)*x_ref[1]
-        ref[3,3,1,1]=(0.857286225292)*x_ref[0]**o+(0.509954550626)*x_ref[0]+(0.182030821433)*x_ref[1]**o+(-0.268076060316)*x_ref[1]
-        ref[3,3,2,0]=(-0.77322653479)*x_ref[0]**o+(-0.583013210018)*x_ref[0]+(-0.683867300277)*x_ref[1]**o+(0.754530541251)*x_ref[1]
-        ref[3,3,2,1]=(-0.744667985181)*x_ref[0]**o+(0.164165128978)*x_ref[0]+(0.412340155958)*x_ref[1]**o+(-0.38451107118)*x_ref[1]
-        ref[3,4,0,0]=(0.216720755049)*x_ref[0]**o+(-0.347803433722)*x_ref[0]+(0.417376268797)*x_ref[1]**o+(0.475787304652)*x_ref[1]
-        ref[3,4,0,1]=(-0.737038295974)*x_ref[0]**o+(0.579172519178)*x_ref[0]+(-0.900272993672)*x_ref[1]**o+(0.407018603625)*x_ref[1]
-        ref[3,4,1,0]=(-0.898959236474)*x_ref[0]**o+(-0.886636008121)*x_ref[0]+(-0.901972610044)*x_ref[1]**o+(-0.518393782318)*x_ref[1]
-        ref[3,4,1,1]=(0.976342884921)*x_ref[0]**o+(-0.273568319493)*x_ref[0]+(-0.332424980846)*x_ref[1]**o+(-0.0146661731139)*x_ref[1]
-        ref[3,4,2,0]=(0.794792214027)*x_ref[0]**o+(0.846927984413)*x_ref[0]+(0.535818809709)*x_ref[1]**o+(-0.49324400033)*x_ref[1]
-        ref[3,4,2,1]=(0.695766308812)*x_ref[0]**o+(-0.37923153689)*x_ref[0]+(0.0633513026782)*x_ref[1]**o+(0.12334892105)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.401901998082)*x[0]**o+(-0.805091116808)*x[0]+(0.997659882792)*x[1]**o+(-0.953957389492)*x[1]+(-0.450185408289)*x[2]**o+(0.636472207773)*x[2]
-        arg[0,0,0,1]=(-0.786386817128)*x[0]**o+(-0.882559775393)*x[0]+(0.117871400819)*x[1]**o+(-0.625922274774)*x[1]+(0.410431886931)*x[2]**o+(-0.979356501067)*x[2]
-        arg[0,0,1,0]=(0.686025409275)*x[0]**o+(-0.19806907659)*x[0]+(-0.710420224449)*x[1]**o+(-0.839236953983)*x[1]+(-0.79971896093)*x[2]**o+(0.378944111319)*x[2]
-        arg[0,0,1,1]=(0.771205112484)*x[0]**o+(-0.007083192859)*x[0]+(0.672918588001)*x[1]**o+(-0.351652495793)*x[1]+(-0.841767161187)*x[2]**o+(-0.345642373014)*x[2]
-        arg[0,0,2,0]=(0.266930729015)*x[0]**o+(-0.873808152307)*x[0]+(0.206466759135)*x[1]**o+(0.539888649948)*x[1]+(0.17985862191)*x[2]**o+(0.240651460153)*x[2]
-        arg[0,0,2,1]=(-0.232569768041)*x[0]**o+(-0.579841454072)*x[0]+(-0.706956104891)*x[1]**o+(0.822863815698)*x[1]+(0.345774991358)*x[2]**o+(-0.0848567668311)*x[2]
-        arg[0,1,0,0]=(0.51593851507)*x[0]**o+(-0.233342434349)*x[0]+(-0.92498298026)*x[1]**o+(0.164540234829)*x[1]+(0.356559744499)*x[2]**o+(0.483902511717)*x[2]
-        arg[0,1,0,1]=(-0.811509654443)*x[0]**o+(0.73929453189)*x[0]+(0.256205706418)*x[1]**o+(-0.667924913793)*x[1]+(0.266065641257)*x[2]**o+(0.856490258029)*x[2]
-        arg[0,1,1,0]=(0.502051590284)*x[0]**o+(0.927283797128)*x[0]+(0.500854521411)*x[1]**o+(-0.486326996369)*x[1]+(-0.327578523685)*x[2]**o+(-0.28106070397)*x[2]
-        arg[0,1,1,1]=(0.201740014513)*x[0]**o+(-0.166988241759)*x[0]+(-0.513072955566)*x[1]**o+(0.67179532417)*x[1]+(-0.72135980627)*x[2]**o+(0.763548886467)*x[2]
-        arg[0,1,2,0]=(0.3995590338)*x[0]**o+(0.433286929621)*x[0]+(-0.287309453792)*x[1]**o+(-0.0671679443074)*x[1]+(-0.80815399993)*x[2]**o+(-0.398740362114)*x[2]
-        arg[0,1,2,1]=(-0.16314640684)*x[0]**o+(-0.698681697367)*x[0]+(-0.11609738418)*x[1]**o+(-0.798465154739)*x[1]+(-0.169052628971)*x[2]**o+(-0.880316962539)*x[2]
-        arg[0,2,0,0]=(-0.219731279442)*x[0]**o+(0.731464233112)*x[0]+(0.637811533993)*x[1]**o+(0.381218512692)*x[1]+(-0.181357790048)*x[2]**o+(-0.296793024723)*x[2]
-        arg[0,2,0,1]=(0.566451624572)*x[0]**o+(0.302904935559)*x[0]+(-0.771526665232)*x[1]**o+(0.460577683302)*x[1]+(-0.921312455507)*x[2]**o+(0.604299765394)*x[2]
-        arg[0,2,1,0]=(-0.0887516895197)*x[0]**o+(0.872208558285)*x[0]+(-0.306564750999)*x[1]**o+(0.841982500263)*x[1]+(-0.550398737046)*x[2]**o+(-0.869697162427)*x[2]
-        arg[0,2,1,1]=(-0.652471383912)*x[0]**o+(0.634592304393)*x[0]+(0.0709212473167)*x[1]**o+(-0.671330082579)*x[1]+(-0.232895004478)*x[2]**o+(0.479008351165)*x[2]
-        arg[0,2,2,0]=(-0.0764115046136)*x[0]**o+(0.649230346025)*x[0]+(0.544503480999)*x[1]**o+(0.788838981797)*x[1]+(0.416236148267)*x[2]**o+(0.722979541918)*x[2]
-        arg[0,2,2,1]=(-0.0776368628837)*x[0]**o+(0.801984674386)*x[0]+(0.443670313486)*x[1]**o+(0.424676792255)*x[1]+(-0.895989937982)*x[2]**o+(0.0774648143589)*x[2]
-        arg[0,3,0,0]=(-0.39041318438)*x[0]**o+(-0.174335409262)*x[0]+(0.658666482337)*x[1]**o+(0.23060605921)*x[1]+(-0.336603364419)*x[2]**o+(0.871530192198)*x[2]
-        arg[0,3,0,1]=(-0.493104661363)*x[0]**o+(0.590779697499)*x[0]+(-0.903897457443)*x[1]**o+(-0.377640520704)*x[1]+(0.227174544833)*x[2]**o+(-0.860150483539)*x[2]
-        arg[0,3,1,0]=(-0.093367253954)*x[0]**o+(0.159230499811)*x[0]+(-0.731396509936)*x[1]**o+(0.600088148838)*x[1]+(0.829175660147)*x[2]**o+(-0.435878280919)*x[2]
-        arg[0,3,1,1]=(0.665125540711)*x[0]**o+(-0.92128737118)*x[0]+(-0.33260297543)*x[1]**o+(0.682569476816)*x[1]+(0.999761405058)*x[2]**o+(-0.748303702618)*x[2]
-        arg[0,3,2,0]=(-0.430442277525)*x[0]**o+(-0.841437664378)*x[0]+(-0.374267371055)*x[1]**o+(0.667860327373)*x[1]+(0.694185699238)*x[2]**o+(-0.673629629622)*x[2]
-        arg[0,3,2,1]=(0.304808617243)*x[0]**o+(-0.894407776037)*x[0]+(-0.758585281699)*x[1]**o+(0.20519963241)*x[1]+(0.538222015181)*x[2]**o+(-0.792962435573)*x[2]
-        arg[0,4,0,0]=(0.568300300269)*x[0]**o+(0.407455936625)*x[0]+(0.980898344535)*x[1]**o+(0.988220474461)*x[1]+(0.0598892620089)*x[2]**o+(-0.279555207723)*x[2]
-        arg[0,4,0,1]=(-0.208391854989)*x[0]**o+(0.9428019078)*x[0]+(-0.540916877275)*x[1]**o+(-0.427185538555)*x[1]+(-0.879268085857)*x[2]**o+(0.025102321099)*x[2]
-        arg[0,4,1,0]=(0.412690112527)*x[0]**o+(-0.957376863734)*x[0]+(-0.913623139719)*x[1]**o+(-0.462418849979)*x[1]+(0.463336747019)*x[2]**o+(0.330747531293)*x[2]
-        arg[0,4,1,1]=(-0.632140552118)*x[0]**o+(0.830769577671)*x[0]+(-0.888012251479)*x[1]**o+(-0.0560181569699)*x[1]+(-0.70068099248)*x[2]**o+(0.834483253039)*x[2]
-        arg[0,4,2,0]=(0.0429717567385)*x[0]**o+(-0.691784042595)*x[0]+(-0.264988764713)*x[1]**o+(0.359873170931)*x[1]+(-0.116275128437)*x[2]**o+(0.0348873917345)*x[2]
-        arg[0,4,2,1]=(-0.203754358311)*x[0]**o+(0.177896174646)*x[0]+(-0.0785920580727)*x[1]**o+(-0.124905949184)*x[1]+(0.968871355367)*x[2]**o+(-0.0369722247589)*x[2]
-        arg[1,0,0,0]=(0.594851756786)*x[0]**o+(-0.594400822936)*x[0]+(0.868401350949)*x[1]**o+(0.186739616297)*x[1]+(-0.937219946754)*x[2]**o+(-0.248916422131)*x[2]
-        arg[1,0,0,1]=(-0.639865978203)*x[0]**o+(-0.00990375501714)*x[0]+(-0.038266357411)*x[1]**o+(-0.741522380136)*x[1]+(0.460572922772)*x[2]**o+(0.4314205896)*x[2]
-        arg[1,0,1,0]=(-0.460110413486)*x[0]**o+(-0.0964934735182)*x[0]+(0.474209024352)*x[1]**o+(-0.928476110805)*x[1]+(0.598621411487)*x[2]**o+(-0.00858812754345)*x[2]
-        arg[1,0,1,1]=(0.936466172807)*x[0]**o+(-0.363937334197)*x[0]+(-0.540224651799)*x[1]**o+(0.484530722263)*x[1]+(0.675416993296)*x[2]**o+(0.89657344343)*x[2]
-        arg[1,0,2,0]=(-0.713050692555)*x[0]**o+(-0.00851892179229)*x[0]+(0.689494113809)*x[1]**o+(0.633341028044)*x[1]+(0.272726911113)*x[2]**o+(-0.122017566819)*x[2]
-        arg[1,0,2,1]=(0.793152080981)*x[0]**o+(0.287379739639)*x[0]+(0.304047372771)*x[1]**o+(-0.509079361053)*x[1]+(0.888302006985)*x[2]**o+(-0.297023045775)*x[2]
-        arg[1,1,0,0]=(-0.69695118901)*x[0]**o+(0.505182668512)*x[0]+(0.827555590952)*x[1]**o+(-0.777232447056)*x[1]+(-0.460918138036)*x[2]**o+(0.782090206922)*x[2]
-        arg[1,1,0,1]=(-0.435398535566)*x[0]**o+(-0.0997593681984)*x[0]+(0.140250252691)*x[1]**o+(-0.0204469256488)*x[1]+(-0.445836771028)*x[2]**o+(-0.775366037861)*x[2]
-        arg[1,1,1,0]=(0.918015347957)*x[0]**o+(-0.491940111489)*x[0]+(0.793071617663)*x[1]**o+(-0.607035294859)*x[1]+(0.610076618566)*x[2]**o+(0.148116733513)*x[2]
-        arg[1,1,1,1]=(0.224062518811)*x[0]**o+(-0.145897156735)*x[0]+(0.165380866901)*x[1]**o+(0.910562981814)*x[1]+(-0.406620561548)*x[2]**o+(0.528862812468)*x[2]
-        arg[1,1,2,0]=(0.85148444093)*x[0]**o+(0.13210280653)*x[0]+(0.364136256712)*x[1]**o+(0.520388575386)*x[1]+(0.0145641287346)*x[2]**o+(-0.7849036351)*x[2]
-        arg[1,1,2,1]=(0.493837193832)*x[0]**o+(-0.193326176569)*x[0]+(-0.665920972154)*x[1]**o+(-0.321645070095)*x[1]+(0.0209354853869)*x[2]**o+(-0.328315981752)*x[2]
-        arg[1,2,0,0]=(-0.349281164766)*x[0]**o+(-0.318415198113)*x[0]+(-0.687972781234)*x[1]**o+(0.91825998605)*x[1]+(0.396868773798)*x[2]**o+(0.998204458027)*x[2]
-        arg[1,2,0,1]=(-0.967493222935)*x[0]**o+(-0.721128465653)*x[0]+(-0.672178802974)*x[1]**o+(0.0924145224431)*x[1]+(0.114040587594)*x[2]**o+(0.707623895537)*x[2]
-        arg[1,2,1,0]=(-0.253327088773)*x[0]**o+(0.206063827625)*x[0]+(0.355152654895)*x[1]**o+(-0.27339285621)*x[1]+(-0.0135567122291)*x[2]**o+(-0.983990446362)*x[2]
-        arg[1,2,1,1]=(0.98471687132)*x[0]**o+(0.262902745655)*x[0]+(-0.589359138227)*x[1]**o+(-0.0982548958556)*x[1]+(-0.526161200133)*x[2]**o+(-0.850939484752)*x[2]
-        arg[1,2,2,0]=(0.37583596705)*x[0]**o+(0.274845981222)*x[0]+(0.601331110943)*x[1]**o+(0.788294448218)*x[1]+(0.366445166459)*x[2]**o+(-0.554935072394)*x[2]
-        arg[1,2,2,1]=(-0.986387850237)*x[0]**o+(0.68772989781)*x[0]+(0.345166604933)*x[1]**o+(0.930376726384)*x[1]+(0.760974421701)*x[2]**o+(0.261797396808)*x[2]
-        arg[1,3,0,0]=(-0.171005013523)*x[0]**o+(-0.339229596812)*x[0]+(-0.150317419556)*x[1]**o+(-0.0146533427463)*x[1]+(0.957020663875)*x[2]**o+(0.616513940347)*x[2]
-        arg[1,3,0,1]=(-0.0727328269499)*x[0]**o+(-0.635591748073)*x[0]+(-0.502426989774)*x[1]**o+(0.772595119619)*x[1]+(-0.76006511271)*x[2]**o+(-0.665920288084)*x[2]
-        arg[1,3,1,0]=(-0.394284205622)*x[0]**o+(-0.105959165811)*x[0]+(0.72649045701)*x[1]**o+(-0.970276379473)*x[1]+(-0.236520349415)*x[2]**o+(0.994973267783)*x[2]
-        arg[1,3,1,1]=(-0.444149867906)*x[0]**o+(0.748449201475)*x[0]+(0.419604170756)*x[1]**o+(-0.0291702705178)*x[1]+(-0.109580142628)*x[2]**o+(-0.0791870699838)*x[2]
-        arg[1,3,2,0]=(-0.629657820523)*x[0]**o+(-0.995576552624)*x[0]+(0.530135462206)*x[1]**o+(0.197336335845)*x[1]+(0.0224815558807)*x[2]**o+(0.240498463912)*x[2]
-        arg[1,3,2,1]=(0.52933948346)*x[0]**o+(0.98353913011)*x[0]+(0.0217614943138)*x[1]**o+(0.0157778453682)*x[1]+(0.177956932986)*x[2]**o+(0.234629778706)*x[2]
-        arg[1,4,0,0]=(0.593028367137)*x[0]**o+(0.0340892538994)*x[0]+(-0.0295133170051)*x[1]**o+(0.0865921041963)*x[1]+(0.641131718656)*x[2]**o+(0.788858018609)*x[2]
-        arg[1,4,0,1]=(-0.283333820634)*x[0]**o+(0.864482725099)*x[0]+(-0.560218794286)*x[1]**o+(-0.0083115362546)*x[1]+(0.726423285129)*x[2]**o+(0.031531339166)*x[2]
-        arg[1,4,1,0]=(0.801452411554)*x[0]**o+(-0.59916393038)*x[0]+(-0.106568863591)*x[1]**o+(0.357442125133)*x[1]+(-0.203380280132)*x[2]**o+(-0.129031606441)*x[2]
-        arg[1,4,1,1]=(-0.589220928637)*x[0]**o+(-0.308949389428)*x[0]+(0.785549858338)*x[1]**o+(-0.131153853015)*x[1]+(-0.30571855555)*x[2]**o+(-0.329634802588)*x[2]
-        arg[1,4,2,0]=(-0.479686944)*x[0]**o+(-0.707702026873)*x[0]+(0.635894172352)*x[1]**o+(0.370673635069)*x[1]+(0.942862875991)*x[2]**o+(-0.846943456738)*x[2]
-        arg[1,4,2,1]=(-0.403737324968)*x[0]**o+(0.101664426734)*x[0]+(-0.677093482354)*x[1]**o+(-0.36526066745)*x[1]+(-0.0889619136182)*x[2]**o+(-0.772491940844)*x[2]
-        arg[2,0,0,0]=(0.753148325987)*x[0]**o+(-0.342843083128)*x[0]+(0.812661029553)*x[1]**o+(-0.112683035459)*x[1]+(0.900976470275)*x[2]**o+(0.00934086955102)*x[2]
-        arg[2,0,0,1]=(-0.682315007143)*x[0]**o+(-0.694069900861)*x[0]+(-0.469082247747)*x[1]**o+(-0.522165903301)*x[1]+(-0.0997886221924)*x[2]**o+(-0.954161552419)*x[2]
-        arg[2,0,1,0]=(0.780125539705)*x[0]**o+(-0.445331450225)*x[0]+(-0.282765510424)*x[1]**o+(-0.0131898361592)*x[1]+(-0.200186433923)*x[2]**o+(0.715139435696)*x[2]
-        arg[2,0,1,1]=(-0.132310660786)*x[0]**o+(-0.0981344234369)*x[0]+(0.959297529475)*x[1]**o+(-0.85944894515)*x[1]+(-0.396258659619)*x[2]**o+(-0.09672066185)*x[2]
-        arg[2,0,2,0]=(-0.344134014191)*x[0]**o+(0.534345864287)*x[0]+(0.797209509484)*x[1]**o+(0.0479050101499)*x[1]+(0.13620476987)*x[2]**o+(0.82708115383)*x[2]
-        arg[2,0,2,1]=(-0.342509328238)*x[0]**o+(-0.833164493006)*x[0]+(0.472047721532)*x[1]**o+(0.301613158637)*x[1]+(0.858691679638)*x[2]**o+(-0.691744164006)*x[2]
-        arg[2,1,0,0]=(0.498979390299)*x[0]**o+(0.371513881824)*x[0]+(-0.243506167971)*x[1]**o+(-0.245423890439)*x[1]+(-0.0494707840274)*x[2]**o+(0.0965573709928)*x[2]
-        arg[2,1,0,1]=(0.665982455862)*x[0]**o+(-0.409710866336)*x[0]+(0.669257568046)*x[1]**o+(0.711947704788)*x[1]+(-0.0362568635785)*x[2]**o+(-0.30394278188)*x[2]
-        arg[2,1,1,0]=(0.296245249928)*x[0]**o+(0.132631019281)*x[0]+(-0.376880152158)*x[1]**o+(0.303184156241)*x[1]+(0.836046560882)*x[2]**o+(0.195205645106)*x[2]
-        arg[2,1,1,1]=(-0.971045820953)*x[0]**o+(0.154708896467)*x[0]+(-0.663844656602)*x[1]**o+(-0.0873797588245)*x[1]+(0.985123372542)*x[2]**o+(0.349554922131)*x[2]
-        arg[2,1,2,0]=(-0.0117443431348)*x[0]**o+(-0.71980503985)*x[0]+(0.175348078994)*x[1]**o+(-0.883987892161)*x[1]+(0.0587275450458)*x[2]**o+(0.464811715548)*x[2]
-        arg[2,1,2,1]=(-0.309202575765)*x[0]**o+(-0.528513248453)*x[0]+(-0.509298303972)*x[1]**o+(-0.228278863496)*x[1]+(0.933917053676)*x[2]**o+(-0.823678942264)*x[2]
-        arg[2,2,0,0]=(0.374387386929)*x[0]**o+(0.64969993847)*x[0]+(-0.939822635641)*x[1]**o+(0.578249430422)*x[1]+(-0.973412660635)*x[2]**o+(0.484052718386)*x[2]
-        arg[2,2,0,1]=(-0.972635162618)*x[0]**o+(-0.255007433802)*x[0]+(0.134165187097)*x[1]**o+(0.313213615976)*x[1]+(0.143298148686)*x[2]**o+(0.901819440229)*x[2]
-        arg[2,2,1,0]=(0.868173256315)*x[0]**o+(-0.532325343453)*x[0]+(-0.712500880845)*x[1]**o+(0.216943462308)*x[1]+(0.733920091212)*x[2]**o+(0.0992400603383)*x[2]
-        arg[2,2,1,1]=(0.642839350527)*x[0]**o+(0.127721543559)*x[0]+(-0.152686523032)*x[1]**o+(-0.399032361234)*x[1]+(0.317014518842)*x[2]**o+(0.905538790115)*x[2]
-        arg[2,2,2,0]=(0.685267932413)*x[0]**o+(-0.167571547782)*x[0]+(-0.213446144405)*x[1]**o+(0.420270456377)*x[1]+(0.827725350621)*x[2]**o+(-0.920242274399)*x[2]
-        arg[2,2,2,1]=(-0.507424593437)*x[0]**o+(-0.694222840019)*x[0]+(-0.904108970188)*x[1]**o+(-0.750899614966)*x[1]+(0.783997553302)*x[2]**o+(0.196327513447)*x[2]
-        arg[2,3,0,0]=(-0.473900600479)*x[0]**o+(-0.464347097789)*x[0]+(-0.472423358671)*x[1]**o+(0.373786456364)*x[1]+(-0.989371300414)*x[2]**o+(-0.959508065239)*x[2]
-        arg[2,3,0,1]=(0.174375189399)*x[0]**o+(0.925503059886)*x[0]+(-0.647274384723)*x[1]**o+(-0.577149479679)*x[1]+(0.171298877768)*x[2]**o+(-0.936612100882)*x[2]
-        arg[2,3,1,0]=(0.482959343396)*x[0]**o+(0.842243554011)*x[0]+(0.814423633314)*x[1]**o+(-0.989445050315)*x[1]+(0.817933433065)*x[2]**o+(0.552396881404)*x[2]
-        arg[2,3,1,1]=(0.55641736229)*x[0]**o+(0.498094640058)*x[0]+(0.0890113606037)*x[1]**o+(0.36592723553)*x[1]+(0.458607593386)*x[2]**o+(0.603047420063)*x[2]
-        arg[2,3,2,0]=(0.884515080124)*x[0]**o+(-0.561898381022)*x[0]+(-0.292475503834)*x[1]**o+(0.425634423478)*x[1]+(0.65813323252)*x[2]**o+(-0.548850399842)*x[2]
-        arg[2,3,2,1]=(-0.72895566982)*x[0]**o+(-0.569405588005)*x[0]+(0.117770875594)*x[1]**o+(-0.33515735969)*x[1]+(0.102062736382)*x[2]**o+(0.611532417683)*x[2]
-        arg[2,4,0,0]=(-0.669208630424)*x[0]**o+(0.944393014177)*x[0]+(-0.00345511889683)*x[1]**o+(0.0695279595783)*x[1]+(0.496948250833)*x[2]**o+(-0.899750463971)*x[2]
-        arg[2,4,0,1]=(-0.387828717292)*x[0]**o+(0.621172267004)*x[0]+(-0.280632674111)*x[1]**o+(0.401702567575)*x[1]+(-0.65554489378)*x[2]**o+(0.403018047007)*x[2]
-        arg[2,4,1,0]=(-0.0770246925803)*x[0]**o+(0.52913302745)*x[0]+(0.922468724357)*x[1]**o+(-0.304442750439)*x[1]+(-0.556575079059)*x[2]**o+(-0.725790672251)*x[2]
-        arg[2,4,1,1]=(-0.828378342911)*x[0]**o+(-0.0696370821776)*x[0]+(0.394018581667)*x[1]**o+(-0.251099848269)*x[1]+(-0.29878985656)*x[2]**o+(0.925753371056)*x[2]
-        arg[2,4,2,0]=(-0.818277786029)*x[0]**o+(0.225862354706)*x[0]+(-0.629050212595)*x[1]**o+(0.139186107062)*x[1]+(-0.0134835519238)*x[2]**o+(0.301899528641)*x[2]
-        arg[2,4,2,1]=(-0.783053684767)*x[0]**o+(-0.0926938783599)*x[0]+(0.519034210352)*x[1]**o+(-0.494564657126)*x[1]+(0.536117310622)*x[2]**o+(0.6278756634)*x[2]
-        arg[3,0,0,0]=(-0.694353957685)*x[0]**o+(-0.361037363965)*x[0]+(-0.327004091885)*x[1]**o+(-0.765735142884)*x[1]+(-0.810915729713)*x[2]**o+(0.0640539311609)*x[2]
-        arg[3,0,0,1]=(-0.131601548312)*x[0]**o+(0.271587756708)*x[0]+(0.322486168005)*x[1]**o+(0.238086581801)*x[1]+(-0.488081720555)*x[2]**o+(0.607278995635)*x[2]
-        arg[3,0,1,0]=(0.903075418102)*x[0]**o+(-0.738609834848)*x[0]+(-0.165097989126)*x[1]**o+(-0.25967140914)*x[1]+(0.271649887428)*x[2]**o+(-0.786131648727)*x[2]
-        arg[3,0,1,1]=(-0.963442989157)*x[0]**o+(-0.240205602334)*x[0]+(0.102153389731)*x[1]**o+(-0.106402434995)*x[1]+(-0.383097724211)*x[2]**o+(0.680290963195)*x[2]
-        arg[3,0,2,0]=(-0.373162835796)*x[0]**o+(-0.186323761814)*x[0]+(0.661494315705)*x[1]**o+(0.320072189494)*x[1]+(0.0964443431067)*x[2]**o+(0.829015838241)*x[2]
-        arg[3,0,2,1]=(0.527719514862)*x[0]**o+(0.0819948261665)*x[0]+(0.826598712178)*x[1]**o+(-0.588102975125)*x[1]+(-0.632584402292)*x[2]**o+(0.0826992233702)*x[2]
-        arg[3,1,0,0]=(-0.102243686287)*x[0]**o+(-0.497336112929)*x[0]+(0.941827592628)*x[1]**o+(0.68678991944)*x[1]+(-0.508684841667)*x[2]**o+(-0.752939965161)*x[2]
-        arg[3,1,0,1]=(-0.896417523183)*x[0]**o+(0.759224781685)*x[0]+(0.138537695823)*x[1]**o+(0.466727480471)*x[1]+(-0.838380824412)*x[2]**o+(0.285761157398)*x[2]
-        arg[3,1,1,0]=(-0.547853182919)*x[0]**o+(-0.41595413414)*x[0]+(0.76894221584)*x[1]**o+(-0.142394275192)*x[1]+(-0.96349294581)*x[2]**o+(-0.873639964693)*x[2]
-        arg[3,1,1,1]=(-0.151299403888)*x[0]**o+(0.789406063878)*x[0]+(0.163280670253)*x[1]**o+(-0.287315494745)*x[1]+(-0.627764670218)*x[2]**o+(0.842131632598)*x[2]
-        arg[3,1,2,0]=(-0.957096489189)*x[0]**o+(0.0616037805677)*x[0]+(0.255858200166)*x[1]**o+(-0.430555450798)*x[1]+(0.730436930737)*x[2]**o+(0.405094271653)*x[2]
-        arg[3,1,2,1]=(-0.924756832665)*x[0]**o+(0.525754162391)*x[0]+(0.281303228038)*x[1]**o+(-0.479500161878)*x[1]+(0.658416209181)*x[2]**o+(-0.0413881595557)*x[2]
-        arg[3,2,0,0]=(0.516429381997)*x[0]**o+(-0.8387318467)*x[0]+(0.329773978227)*x[1]**o+(0.599641753085)*x[1]+(0.939937743271)*x[2]**o+(-0.247331169626)*x[2]
-        arg[3,2,0,1]=(-0.644982044558)*x[0]**o+(-0.242033352774)*x[0]+(0.531835185779)*x[1]**o+(-0.851565064183)*x[1]+(-0.79213624915)*x[2]**o+(0.0607365690732)*x[2]
-        arg[3,2,1,0]=(0.359781383537)*x[0]**o+(-0.0529212842074)*x[0]+(0.845915169452)*x[1]**o+(-0.323979570458)*x[1]+(0.828909997631)*x[2]**o+(-0.839886339138)*x[2]
-        arg[3,2,1,1]=(0.559476630421)*x[0]**o+(-0.189725214615)*x[0]+(-0.00927446700413)*x[1]**o+(-0.234703720782)*x[1]+(-0.608362806755)*x[2]**o+(0.968571765534)*x[2]
-        arg[3,2,2,0]=(0.924837507913)*x[0]**o+(0.846397611121)*x[0]+(-0.837765472403)*x[1]**o+(0.0225105985057)*x[1]+(-0.834187513844)*x[2]**o+(0.194311845578)*x[2]
-        arg[3,2,2,1]=(-0.183561089961)*x[0]**o+(0.0745071729471)*x[0]+(-0.660415615202)*x[1]**o+(-0.528184997345)*x[1]+(0.205554094557)*x[2]**o+(-0.0309246318944)*x[2]
-        arg[3,3,0,0]=(-0.67124095974)*x[0]**o+(-0.48501497083)*x[0]+(-0.0394345869094)*x[1]**o+(0.586692270429)*x[1]+(-0.593760749687)*x[2]**o+(-0.124979751327)*x[2]
-        arg[3,3,0,1]=(0.778544173855)*x[0]**o+(-0.931466478494)*x[0]+(-0.746894777998)*x[1]**o+(0.806417936297)*x[1]+(0.989460929848)*x[2]**o+(0.666534366369)*x[2]
-        arg[3,3,1,0]=(-0.798870838602)*x[0]**o+(-0.294618868937)*x[0]+(0.275029092968)*x[1]**o+(0.45390580364)*x[1]+(-0.311797818508)*x[2]**o+(0.751606624393)*x[2]
-        arg[3,3,1,1]=(-0.924260987477)*x[0]**o+(0.771970726902)*x[0]+(-0.909099224213)*x[1]**o+(-0.45204206766)*x[1]+(0.630042614017)*x[2]**o+(-0.990915130464)*x[2]
-        arg[3,3,2,0]=(0.734962154852)*x[0]**o+(-0.00621898011475)*x[0]+(-0.786362527189)*x[1]**o+(0.623507947406)*x[1]+(0.867175567104)*x[2]**o+(-0.383283255448)*x[2]
-        arg[3,3,2,1]=(-0.955613156717)*x[0]**o+(0.688013754841)*x[0]+(-0.600559375208)*x[1]**o+(0.453342626645)*x[1]+(-0.864890477961)*x[2]**o+(-0.458029873063)*x[2]
-        arg[3,4,0,0]=(-0.897010884834)*x[0]**o+(-0.251223576458)*x[0]+(-0.0338052047964)*x[1]**o+(-0.903421466132)*x[1]+(0.836864217874)*x[2]**o+(0.660805905175)*x[2]
-        arg[3,4,0,1]=(-0.286025690215)*x[0]**o+(0.746732975604)*x[0]+(0.375810853218)*x[1]**o+(-0.985192974869)*x[1]+(-0.731463214455)*x[2]**o+(-0.465450352444)*x[2]
-        arg[3,4,1,0]=(-0.500910000652)*x[0]**o+(0.387502419727)*x[0]+(0.962369164802)*x[1]**o+(-0.10933824251)*x[1]+(-0.33642703989)*x[2]**o+(0.546851133256)*x[2]
-        arg[3,4,1,1]=(-0.117959459645)*x[0]**o+(0.867699323392)*x[0]+(0.950506403861)*x[1]**o+(0.613806207745)*x[1]+(0.425723173807)*x[2]**o+(-0.906937548619)*x[2]
-        arg[3,4,2,0]=(0.331114892194)*x[0]**o+(-0.168829643424)*x[0]+(-0.855962311982)*x[1]**o+(-0.144202406673)*x[1]+(0.0769985713088)*x[2]**o+(0.856003746423)*x[2]
-        arg[3,4,2,1]=(-0.439397439364)*x[0]**o+(0.686116343481)*x[0]+(0.519883854523)*x[1]**o+(0.716231469289)*x[1]+(0.270098231149)*x[2]**o+(-0.448525436427)*x[2]
-        ref[0,0,0,0]=(-0.401901998082)*x_ref[0]**o+(-0.805091116808)*x_ref[0]+(0.997659882792)*x_ref[1]**o+(-0.953957389492)*x_ref[1]+(-0.450185408289)*x_ref[2]**o+(0.636472207773)*x_ref[2]
-        ref[0,0,0,1]=(-0.786386817128)*x_ref[0]**o+(-0.882559775393)*x_ref[0]+(0.117871400819)*x_ref[1]**o+(-0.625922274774)*x_ref[1]+(0.410431886931)*x_ref[2]**o+(-0.979356501067)*x_ref[2]
-        ref[0,0,1,0]=(0.686025409275)*x_ref[0]**o+(-0.19806907659)*x_ref[0]+(-0.710420224449)*x_ref[1]**o+(-0.839236953983)*x_ref[1]+(-0.79971896093)*x_ref[2]**o+(0.378944111319)*x_ref[2]
-        ref[0,0,1,1]=(0.771205112484)*x_ref[0]**o+(-0.007083192859)*x_ref[0]+(0.672918588001)*x_ref[1]**o+(-0.351652495793)*x_ref[1]+(-0.841767161187)*x_ref[2]**o+(-0.345642373014)*x_ref[2]
-        ref[0,0,2,0]=(0.266930729015)*x_ref[0]**o+(-0.873808152307)*x_ref[0]+(0.206466759135)*x_ref[1]**o+(0.539888649948)*x_ref[1]+(0.17985862191)*x_ref[2]**o+(0.240651460153)*x_ref[2]
-        ref[0,0,2,1]=(-0.232569768041)*x_ref[0]**o+(-0.579841454072)*x_ref[0]+(-0.706956104891)*x_ref[1]**o+(0.822863815698)*x_ref[1]+(0.345774991358)*x_ref[2]**o+(-0.0848567668311)*x_ref[2]
-        ref[0,1,0,0]=(0.51593851507)*x_ref[0]**o+(-0.233342434349)*x_ref[0]+(-0.92498298026)*x_ref[1]**o+(0.164540234829)*x_ref[1]+(0.356559744499)*x_ref[2]**o+(0.483902511717)*x_ref[2]
-        ref[0,1,0,1]=(-0.811509654443)*x_ref[0]**o+(0.73929453189)*x_ref[0]+(0.256205706418)*x_ref[1]**o+(-0.667924913793)*x_ref[1]+(0.266065641257)*x_ref[2]**o+(0.856490258029)*x_ref[2]
-        ref[0,1,1,0]=(0.502051590284)*x_ref[0]**o+(0.927283797128)*x_ref[0]+(0.500854521411)*x_ref[1]**o+(-0.486326996369)*x_ref[1]+(-0.327578523685)*x_ref[2]**o+(-0.28106070397)*x_ref[2]
-        ref[0,1,1,1]=(0.201740014513)*x_ref[0]**o+(-0.166988241759)*x_ref[0]+(-0.513072955566)*x_ref[1]**o+(0.67179532417)*x_ref[1]+(-0.72135980627)*x_ref[2]**o+(0.763548886467)*x_ref[2]
-        ref[0,1,2,0]=(0.3995590338)*x_ref[0]**o+(0.433286929621)*x_ref[0]+(-0.287309453792)*x_ref[1]**o+(-0.0671679443074)*x_ref[1]+(-0.80815399993)*x_ref[2]**o+(-0.398740362114)*x_ref[2]
-        ref[0,1,2,1]=(-0.16314640684)*x_ref[0]**o+(-0.698681697367)*x_ref[0]+(-0.11609738418)*x_ref[1]**o+(-0.798465154739)*x_ref[1]+(-0.169052628971)*x_ref[2]**o+(-0.880316962539)*x_ref[2]
-        ref[0,2,0,0]=(-0.219731279442)*x_ref[0]**o+(0.731464233112)*x_ref[0]+(0.637811533993)*x_ref[1]**o+(0.381218512692)*x_ref[1]+(-0.181357790048)*x_ref[2]**o+(-0.296793024723)*x_ref[2]
-        ref[0,2,0,1]=(0.566451624572)*x_ref[0]**o+(0.302904935559)*x_ref[0]+(-0.771526665232)*x_ref[1]**o+(0.460577683302)*x_ref[1]+(-0.921312455507)*x_ref[2]**o+(0.604299765394)*x_ref[2]
-        ref[0,2,1,0]=(-0.0887516895197)*x_ref[0]**o+(0.872208558285)*x_ref[0]+(-0.306564750999)*x_ref[1]**o+(0.841982500263)*x_ref[1]+(-0.550398737046)*x_ref[2]**o+(-0.869697162427)*x_ref[2]
-        ref[0,2,1,1]=(-0.652471383912)*x_ref[0]**o+(0.634592304393)*x_ref[0]+(0.0709212473167)*x_ref[1]**o+(-0.671330082579)*x_ref[1]+(-0.232895004478)*x_ref[2]**o+(0.479008351165)*x_ref[2]
-        ref[0,2,2,0]=(-0.0764115046136)*x_ref[0]**o+(0.649230346025)*x_ref[0]+(0.544503480999)*x_ref[1]**o+(0.788838981797)*x_ref[1]+(0.416236148267)*x_ref[2]**o+(0.722979541918)*x_ref[2]
-        ref[0,2,2,1]=(-0.0776368628837)*x_ref[0]**o+(0.801984674386)*x_ref[0]+(0.443670313486)*x_ref[1]**o+(0.424676792255)*x_ref[1]+(-0.895989937982)*x_ref[2]**o+(0.0774648143589)*x_ref[2]
-        ref[0,3,0,0]=(-0.39041318438)*x_ref[0]**o+(-0.174335409262)*x_ref[0]+(0.658666482337)*x_ref[1]**o+(0.23060605921)*x_ref[1]+(-0.336603364419)*x_ref[2]**o+(0.871530192198)*x_ref[2]
-        ref[0,3,0,1]=(-0.493104661363)*x_ref[0]**o+(0.590779697499)*x_ref[0]+(-0.903897457443)*x_ref[1]**o+(-0.377640520704)*x_ref[1]+(0.227174544833)*x_ref[2]**o+(-0.860150483539)*x_ref[2]
-        ref[0,3,1,0]=(-0.093367253954)*x_ref[0]**o+(0.159230499811)*x_ref[0]+(-0.731396509936)*x_ref[1]**o+(0.600088148838)*x_ref[1]+(0.829175660147)*x_ref[2]**o+(-0.435878280919)*x_ref[2]
-        ref[0,3,1,1]=(0.665125540711)*x_ref[0]**o+(-0.92128737118)*x_ref[0]+(-0.33260297543)*x_ref[1]**o+(0.682569476816)*x_ref[1]+(0.999761405058)*x_ref[2]**o+(-0.748303702618)*x_ref[2]
-        ref[0,3,2,0]=(-0.430442277525)*x_ref[0]**o+(-0.841437664378)*x_ref[0]+(-0.374267371055)*x_ref[1]**o+(0.667860327373)*x_ref[1]+(0.694185699238)*x_ref[2]**o+(-0.673629629622)*x_ref[2]
-        ref[0,3,2,1]=(0.304808617243)*x_ref[0]**o+(-0.894407776037)*x_ref[0]+(-0.758585281699)*x_ref[1]**o+(0.20519963241)*x_ref[1]+(0.538222015181)*x_ref[2]**o+(-0.792962435573)*x_ref[2]
-        ref[0,4,0,0]=(0.568300300269)*x_ref[0]**o+(0.407455936625)*x_ref[0]+(0.980898344535)*x_ref[1]**o+(0.988220474461)*x_ref[1]+(0.0598892620089)*x_ref[2]**o+(-0.279555207723)*x_ref[2]
-        ref[0,4,0,1]=(-0.208391854989)*x_ref[0]**o+(0.9428019078)*x_ref[0]+(-0.540916877275)*x_ref[1]**o+(-0.427185538555)*x_ref[1]+(-0.879268085857)*x_ref[2]**o+(0.025102321099)*x_ref[2]
-        ref[0,4,1,0]=(0.412690112527)*x_ref[0]**o+(-0.957376863734)*x_ref[0]+(-0.913623139719)*x_ref[1]**o+(-0.462418849979)*x_ref[1]+(0.463336747019)*x_ref[2]**o+(0.330747531293)*x_ref[2]
-        ref[0,4,1,1]=(-0.632140552118)*x_ref[0]**o+(0.830769577671)*x_ref[0]+(-0.888012251479)*x_ref[1]**o+(-0.0560181569699)*x_ref[1]+(-0.70068099248)*x_ref[2]**o+(0.834483253039)*x_ref[2]
-        ref[0,4,2,0]=(0.0429717567385)*x_ref[0]**o+(-0.691784042595)*x_ref[0]+(-0.264988764713)*x_ref[1]**o+(0.359873170931)*x_ref[1]+(-0.116275128437)*x_ref[2]**o+(0.0348873917345)*x_ref[2]
-        ref[0,4,2,1]=(-0.203754358311)*x_ref[0]**o+(0.177896174646)*x_ref[0]+(-0.0785920580727)*x_ref[1]**o+(-0.124905949184)*x_ref[1]+(0.968871355367)*x_ref[2]**o+(-0.0369722247589)*x_ref[2]
-        ref[1,0,0,0]=(0.594851756786)*x_ref[0]**o+(-0.594400822936)*x_ref[0]+(0.868401350949)*x_ref[1]**o+(0.186739616297)*x_ref[1]+(-0.937219946754)*x_ref[2]**o+(-0.248916422131)*x_ref[2]
-        ref[1,0,0,1]=(-0.639865978203)*x_ref[0]**o+(-0.00990375501714)*x_ref[0]+(-0.038266357411)*x_ref[1]**o+(-0.741522380136)*x_ref[1]+(0.460572922772)*x_ref[2]**o+(0.4314205896)*x_ref[2]
-        ref[1,0,1,0]=(-0.460110413486)*x_ref[0]**o+(-0.0964934735182)*x_ref[0]+(0.474209024352)*x_ref[1]**o+(-0.928476110805)*x_ref[1]+(0.598621411487)*x_ref[2]**o+(-0.00858812754345)*x_ref[2]
-        ref[1,0,1,1]=(0.936466172807)*x_ref[0]**o+(-0.363937334197)*x_ref[0]+(-0.540224651799)*x_ref[1]**o+(0.484530722263)*x_ref[1]+(0.675416993296)*x_ref[2]**o+(0.89657344343)*x_ref[2]
-        ref[1,0,2,0]=(-0.713050692555)*x_ref[0]**o+(-0.00851892179229)*x_ref[0]+(0.689494113809)*x_ref[1]**o+(0.633341028044)*x_ref[1]+(0.272726911113)*x_ref[2]**o+(-0.122017566819)*x_ref[2]
-        ref[1,0,2,1]=(0.793152080981)*x_ref[0]**o+(0.287379739639)*x_ref[0]+(0.304047372771)*x_ref[1]**o+(-0.509079361053)*x_ref[1]+(0.888302006985)*x_ref[2]**o+(-0.297023045775)*x_ref[2]
-        ref[1,1,0,0]=(-0.69695118901)*x_ref[0]**o+(0.505182668512)*x_ref[0]+(0.827555590952)*x_ref[1]**o+(-0.777232447056)*x_ref[1]+(-0.460918138036)*x_ref[2]**o+(0.782090206922)*x_ref[2]
-        ref[1,1,0,1]=(-0.435398535566)*x_ref[0]**o+(-0.0997593681984)*x_ref[0]+(0.140250252691)*x_ref[1]**o+(-0.0204469256488)*x_ref[1]+(-0.445836771028)*x_ref[2]**o+(-0.775366037861)*x_ref[2]
-        ref[1,1,1,0]=(0.918015347957)*x_ref[0]**o+(-0.491940111489)*x_ref[0]+(0.793071617663)*x_ref[1]**o+(-0.607035294859)*x_ref[1]+(0.610076618566)*x_ref[2]**o+(0.148116733513)*x_ref[2]
-        ref[1,1,1,1]=(0.224062518811)*x_ref[0]**o+(-0.145897156735)*x_ref[0]+(0.165380866901)*x_ref[1]**o+(0.910562981814)*x_ref[1]+(-0.406620561548)*x_ref[2]**o+(0.528862812468)*x_ref[2]
-        ref[1,1,2,0]=(0.85148444093)*x_ref[0]**o+(0.13210280653)*x_ref[0]+(0.364136256712)*x_ref[1]**o+(0.520388575386)*x_ref[1]+(0.0145641287346)*x_ref[2]**o+(-0.7849036351)*x_ref[2]
-        ref[1,1,2,1]=(0.493837193832)*x_ref[0]**o+(-0.193326176569)*x_ref[0]+(-0.665920972154)*x_ref[1]**o+(-0.321645070095)*x_ref[1]+(0.0209354853869)*x_ref[2]**o+(-0.328315981752)*x_ref[2]
-        ref[1,2,0,0]=(-0.349281164766)*x_ref[0]**o+(-0.318415198113)*x_ref[0]+(-0.687972781234)*x_ref[1]**o+(0.91825998605)*x_ref[1]+(0.396868773798)*x_ref[2]**o+(0.998204458027)*x_ref[2]
-        ref[1,2,0,1]=(-0.967493222935)*x_ref[0]**o+(-0.721128465653)*x_ref[0]+(-0.672178802974)*x_ref[1]**o+(0.0924145224431)*x_ref[1]+(0.114040587594)*x_ref[2]**o+(0.707623895537)*x_ref[2]
-        ref[1,2,1,0]=(-0.253327088773)*x_ref[0]**o+(0.206063827625)*x_ref[0]+(0.355152654895)*x_ref[1]**o+(-0.27339285621)*x_ref[1]+(-0.0135567122291)*x_ref[2]**o+(-0.983990446362)*x_ref[2]
-        ref[1,2,1,1]=(0.98471687132)*x_ref[0]**o+(0.262902745655)*x_ref[0]+(-0.589359138227)*x_ref[1]**o+(-0.0982548958556)*x_ref[1]+(-0.526161200133)*x_ref[2]**o+(-0.850939484752)*x_ref[2]
-        ref[1,2,2,0]=(0.37583596705)*x_ref[0]**o+(0.274845981222)*x_ref[0]+(0.601331110943)*x_ref[1]**o+(0.788294448218)*x_ref[1]+(0.366445166459)*x_ref[2]**o+(-0.554935072394)*x_ref[2]
-        ref[1,2,2,1]=(-0.986387850237)*x_ref[0]**o+(0.68772989781)*x_ref[0]+(0.345166604933)*x_ref[1]**o+(0.930376726384)*x_ref[1]+(0.760974421701)*x_ref[2]**o+(0.261797396808)*x_ref[2]
-        ref[1,3,0,0]=(-0.171005013523)*x_ref[0]**o+(-0.339229596812)*x_ref[0]+(-0.150317419556)*x_ref[1]**o+(-0.0146533427463)*x_ref[1]+(0.957020663875)*x_ref[2]**o+(0.616513940347)*x_ref[2]
-        ref[1,3,0,1]=(-0.0727328269499)*x_ref[0]**o+(-0.635591748073)*x_ref[0]+(-0.502426989774)*x_ref[1]**o+(0.772595119619)*x_ref[1]+(-0.76006511271)*x_ref[2]**o+(-0.665920288084)*x_ref[2]
-        ref[1,3,1,0]=(-0.394284205622)*x_ref[0]**o+(-0.105959165811)*x_ref[0]+(0.72649045701)*x_ref[1]**o+(-0.970276379473)*x_ref[1]+(-0.236520349415)*x_ref[2]**o+(0.994973267783)*x_ref[2]
-        ref[1,3,1,1]=(-0.444149867906)*x_ref[0]**o+(0.748449201475)*x_ref[0]+(0.419604170756)*x_ref[1]**o+(-0.0291702705178)*x_ref[1]+(-0.109580142628)*x_ref[2]**o+(-0.0791870699838)*x_ref[2]
-        ref[1,3,2,0]=(-0.629657820523)*x_ref[0]**o+(-0.995576552624)*x_ref[0]+(0.530135462206)*x_ref[1]**o+(0.197336335845)*x_ref[1]+(0.0224815558807)*x_ref[2]**o+(0.240498463912)*x_ref[2]
-        ref[1,3,2,1]=(0.52933948346)*x_ref[0]**o+(0.98353913011)*x_ref[0]+(0.0217614943138)*x_ref[1]**o+(0.0157778453682)*x_ref[1]+(0.177956932986)*x_ref[2]**o+(0.234629778706)*x_ref[2]
-        ref[1,4,0,0]=(0.593028367137)*x_ref[0]**o+(0.0340892538994)*x_ref[0]+(-0.0295133170051)*x_ref[1]**o+(0.0865921041963)*x_ref[1]+(0.641131718656)*x_ref[2]**o+(0.788858018609)*x_ref[2]
-        ref[1,4,0,1]=(-0.283333820634)*x_ref[0]**o+(0.864482725099)*x_ref[0]+(-0.560218794286)*x_ref[1]**o+(-0.0083115362546)*x_ref[1]+(0.726423285129)*x_ref[2]**o+(0.031531339166)*x_ref[2]
-        ref[1,4,1,0]=(0.801452411554)*x_ref[0]**o+(-0.59916393038)*x_ref[0]+(-0.106568863591)*x_ref[1]**o+(0.357442125133)*x_ref[1]+(-0.203380280132)*x_ref[2]**o+(-0.129031606441)*x_ref[2]
-        ref[1,4,1,1]=(-0.589220928637)*x_ref[0]**o+(-0.308949389428)*x_ref[0]+(0.785549858338)*x_ref[1]**o+(-0.131153853015)*x_ref[1]+(-0.30571855555)*x_ref[2]**o+(-0.329634802588)*x_ref[2]
-        ref[1,4,2,0]=(-0.479686944)*x_ref[0]**o+(-0.707702026873)*x_ref[0]+(0.635894172352)*x_ref[1]**o+(0.370673635069)*x_ref[1]+(0.942862875991)*x_ref[2]**o+(-0.846943456738)*x_ref[2]
-        ref[1,4,2,1]=(-0.403737324968)*x_ref[0]**o+(0.101664426734)*x_ref[0]+(-0.677093482354)*x_ref[1]**o+(-0.36526066745)*x_ref[1]+(-0.0889619136182)*x_ref[2]**o+(-0.772491940844)*x_ref[2]
-        ref[2,0,0,0]=(0.753148325987)*x_ref[0]**o+(-0.342843083128)*x_ref[0]+(0.812661029553)*x_ref[1]**o+(-0.112683035459)*x_ref[1]+(0.900976470275)*x_ref[2]**o+(0.00934086955102)*x_ref[2]
-        ref[2,0,0,1]=(-0.682315007143)*x_ref[0]**o+(-0.694069900861)*x_ref[0]+(-0.469082247747)*x_ref[1]**o+(-0.522165903301)*x_ref[1]+(-0.0997886221924)*x_ref[2]**o+(-0.954161552419)*x_ref[2]
-        ref[2,0,1,0]=(0.780125539705)*x_ref[0]**o+(-0.445331450225)*x_ref[0]+(-0.282765510424)*x_ref[1]**o+(-0.0131898361592)*x_ref[1]+(-0.200186433923)*x_ref[2]**o+(0.715139435696)*x_ref[2]
-        ref[2,0,1,1]=(-0.132310660786)*x_ref[0]**o+(-0.0981344234369)*x_ref[0]+(0.959297529475)*x_ref[1]**o+(-0.85944894515)*x_ref[1]+(-0.396258659619)*x_ref[2]**o+(-0.09672066185)*x_ref[2]
-        ref[2,0,2,0]=(-0.344134014191)*x_ref[0]**o+(0.534345864287)*x_ref[0]+(0.797209509484)*x_ref[1]**o+(0.0479050101499)*x_ref[1]+(0.13620476987)*x_ref[2]**o+(0.82708115383)*x_ref[2]
-        ref[2,0,2,1]=(-0.342509328238)*x_ref[0]**o+(-0.833164493006)*x_ref[0]+(0.472047721532)*x_ref[1]**o+(0.301613158637)*x_ref[1]+(0.858691679638)*x_ref[2]**o+(-0.691744164006)*x_ref[2]
-        ref[2,1,0,0]=(0.498979390299)*x_ref[0]**o+(0.371513881824)*x_ref[0]+(-0.243506167971)*x_ref[1]**o+(-0.245423890439)*x_ref[1]+(-0.0494707840274)*x_ref[2]**o+(0.0965573709928)*x_ref[2]
-        ref[2,1,0,1]=(0.665982455862)*x_ref[0]**o+(-0.409710866336)*x_ref[0]+(0.669257568046)*x_ref[1]**o+(0.711947704788)*x_ref[1]+(-0.0362568635785)*x_ref[2]**o+(-0.30394278188)*x_ref[2]
-        ref[2,1,1,0]=(0.296245249928)*x_ref[0]**o+(0.132631019281)*x_ref[0]+(-0.376880152158)*x_ref[1]**o+(0.303184156241)*x_ref[1]+(0.836046560882)*x_ref[2]**o+(0.195205645106)*x_ref[2]
-        ref[2,1,1,1]=(-0.971045820953)*x_ref[0]**o+(0.154708896467)*x_ref[0]+(-0.663844656602)*x_ref[1]**o+(-0.0873797588245)*x_ref[1]+(0.985123372542)*x_ref[2]**o+(0.349554922131)*x_ref[2]
-        ref[2,1,2,0]=(-0.0117443431348)*x_ref[0]**o+(-0.71980503985)*x_ref[0]+(0.175348078994)*x_ref[1]**o+(-0.883987892161)*x_ref[1]+(0.0587275450458)*x_ref[2]**o+(0.464811715548)*x_ref[2]
-        ref[2,1,2,1]=(-0.309202575765)*x_ref[0]**o+(-0.528513248453)*x_ref[0]+(-0.509298303972)*x_ref[1]**o+(-0.228278863496)*x_ref[1]+(0.933917053676)*x_ref[2]**o+(-0.823678942264)*x_ref[2]
-        ref[2,2,0,0]=(0.374387386929)*x_ref[0]**o+(0.64969993847)*x_ref[0]+(-0.939822635641)*x_ref[1]**o+(0.578249430422)*x_ref[1]+(-0.973412660635)*x_ref[2]**o+(0.484052718386)*x_ref[2]
-        ref[2,2,0,1]=(-0.972635162618)*x_ref[0]**o+(-0.255007433802)*x_ref[0]+(0.134165187097)*x_ref[1]**o+(0.313213615976)*x_ref[1]+(0.143298148686)*x_ref[2]**o+(0.901819440229)*x_ref[2]
-        ref[2,2,1,0]=(0.868173256315)*x_ref[0]**o+(-0.532325343453)*x_ref[0]+(-0.712500880845)*x_ref[1]**o+(0.216943462308)*x_ref[1]+(0.733920091212)*x_ref[2]**o+(0.0992400603383)*x_ref[2]
-        ref[2,2,1,1]=(0.642839350527)*x_ref[0]**o+(0.127721543559)*x_ref[0]+(-0.152686523032)*x_ref[1]**o+(-0.399032361234)*x_ref[1]+(0.317014518842)*x_ref[2]**o+(0.905538790115)*x_ref[2]
-        ref[2,2,2,0]=(0.685267932413)*x_ref[0]**o+(-0.167571547782)*x_ref[0]+(-0.213446144405)*x_ref[1]**o+(0.420270456377)*x_ref[1]+(0.827725350621)*x_ref[2]**o+(-0.920242274399)*x_ref[2]
-        ref[2,2,2,1]=(-0.507424593437)*x_ref[0]**o+(-0.694222840019)*x_ref[0]+(-0.904108970188)*x_ref[1]**o+(-0.750899614966)*x_ref[1]+(0.783997553302)*x_ref[2]**o+(0.196327513447)*x_ref[2]
-        ref[2,3,0,0]=(-0.473900600479)*x_ref[0]**o+(-0.464347097789)*x_ref[0]+(-0.472423358671)*x_ref[1]**o+(0.373786456364)*x_ref[1]+(-0.989371300414)*x_ref[2]**o+(-0.959508065239)*x_ref[2]
-        ref[2,3,0,1]=(0.174375189399)*x_ref[0]**o+(0.925503059886)*x_ref[0]+(-0.647274384723)*x_ref[1]**o+(-0.577149479679)*x_ref[1]+(0.171298877768)*x_ref[2]**o+(-0.936612100882)*x_ref[2]
-        ref[2,3,1,0]=(0.482959343396)*x_ref[0]**o+(0.842243554011)*x_ref[0]+(0.814423633314)*x_ref[1]**o+(-0.989445050315)*x_ref[1]+(0.817933433065)*x_ref[2]**o+(0.552396881404)*x_ref[2]
-        ref[2,3,1,1]=(0.55641736229)*x_ref[0]**o+(0.498094640058)*x_ref[0]+(0.0890113606037)*x_ref[1]**o+(0.36592723553)*x_ref[1]+(0.458607593386)*x_ref[2]**o+(0.603047420063)*x_ref[2]
-        ref[2,3,2,0]=(0.884515080124)*x_ref[0]**o+(-0.561898381022)*x_ref[0]+(-0.292475503834)*x_ref[1]**o+(0.425634423478)*x_ref[1]+(0.65813323252)*x_ref[2]**o+(-0.548850399842)*x_ref[2]
-        ref[2,3,2,1]=(-0.72895566982)*x_ref[0]**o+(-0.569405588005)*x_ref[0]+(0.117770875594)*x_ref[1]**o+(-0.33515735969)*x_ref[1]+(0.102062736382)*x_ref[2]**o+(0.611532417683)*x_ref[2]
-        ref[2,4,0,0]=(-0.669208630424)*x_ref[0]**o+(0.944393014177)*x_ref[0]+(-0.00345511889683)*x_ref[1]**o+(0.0695279595783)*x_ref[1]+(0.496948250833)*x_ref[2]**o+(-0.899750463971)*x_ref[2]
-        ref[2,4,0,1]=(-0.387828717292)*x_ref[0]**o+(0.621172267004)*x_ref[0]+(-0.280632674111)*x_ref[1]**o+(0.401702567575)*x_ref[1]+(-0.65554489378)*x_ref[2]**o+(0.403018047007)*x_ref[2]
-        ref[2,4,1,0]=(-0.0770246925803)*x_ref[0]**o+(0.52913302745)*x_ref[0]+(0.922468724357)*x_ref[1]**o+(-0.304442750439)*x_ref[1]+(-0.556575079059)*x_ref[2]**o+(-0.725790672251)*x_ref[2]
-        ref[2,4,1,1]=(-0.828378342911)*x_ref[0]**o+(-0.0696370821776)*x_ref[0]+(0.394018581667)*x_ref[1]**o+(-0.251099848269)*x_ref[1]+(-0.29878985656)*x_ref[2]**o+(0.925753371056)*x_ref[2]
-        ref[2,4,2,0]=(-0.818277786029)*x_ref[0]**o+(0.225862354706)*x_ref[0]+(-0.629050212595)*x_ref[1]**o+(0.139186107062)*x_ref[1]+(-0.0134835519238)*x_ref[2]**o+(0.301899528641)*x_ref[2]
-        ref[2,4,2,1]=(-0.783053684767)*x_ref[0]**o+(-0.0926938783599)*x_ref[0]+(0.519034210352)*x_ref[1]**o+(-0.494564657126)*x_ref[1]+(0.536117310622)*x_ref[2]**o+(0.6278756634)*x_ref[2]
-        ref[3,0,0,0]=(-0.694353957685)*x_ref[0]**o+(-0.361037363965)*x_ref[0]+(-0.327004091885)*x_ref[1]**o+(-0.765735142884)*x_ref[1]+(-0.810915729713)*x_ref[2]**o+(0.0640539311609)*x_ref[2]
-        ref[3,0,0,1]=(-0.131601548312)*x_ref[0]**o+(0.271587756708)*x_ref[0]+(0.322486168005)*x_ref[1]**o+(0.238086581801)*x_ref[1]+(-0.488081720555)*x_ref[2]**o+(0.607278995635)*x_ref[2]
-        ref[3,0,1,0]=(0.903075418102)*x_ref[0]**o+(-0.738609834848)*x_ref[0]+(-0.165097989126)*x_ref[1]**o+(-0.25967140914)*x_ref[1]+(0.271649887428)*x_ref[2]**o+(-0.786131648727)*x_ref[2]
-        ref[3,0,1,1]=(-0.963442989157)*x_ref[0]**o+(-0.240205602334)*x_ref[0]+(0.102153389731)*x_ref[1]**o+(-0.106402434995)*x_ref[1]+(-0.383097724211)*x_ref[2]**o+(0.680290963195)*x_ref[2]
-        ref[3,0,2,0]=(-0.373162835796)*x_ref[0]**o+(-0.186323761814)*x_ref[0]+(0.661494315705)*x_ref[1]**o+(0.320072189494)*x_ref[1]+(0.0964443431067)*x_ref[2]**o+(0.829015838241)*x_ref[2]
-        ref[3,0,2,1]=(0.527719514862)*x_ref[0]**o+(0.0819948261665)*x_ref[0]+(0.826598712178)*x_ref[1]**o+(-0.588102975125)*x_ref[1]+(-0.632584402292)*x_ref[2]**o+(0.0826992233702)*x_ref[2]
-        ref[3,1,0,0]=(-0.102243686287)*x_ref[0]**o+(-0.497336112929)*x_ref[0]+(0.941827592628)*x_ref[1]**o+(0.68678991944)*x_ref[1]+(-0.508684841667)*x_ref[2]**o+(-0.752939965161)*x_ref[2]
-        ref[3,1,0,1]=(-0.896417523183)*x_ref[0]**o+(0.759224781685)*x_ref[0]+(0.138537695823)*x_ref[1]**o+(0.466727480471)*x_ref[1]+(-0.838380824412)*x_ref[2]**o+(0.285761157398)*x_ref[2]
-        ref[3,1,1,0]=(-0.547853182919)*x_ref[0]**o+(-0.41595413414)*x_ref[0]+(0.76894221584)*x_ref[1]**o+(-0.142394275192)*x_ref[1]+(-0.96349294581)*x_ref[2]**o+(-0.873639964693)*x_ref[2]
-        ref[3,1,1,1]=(-0.151299403888)*x_ref[0]**o+(0.789406063878)*x_ref[0]+(0.163280670253)*x_ref[1]**o+(-0.287315494745)*x_ref[1]+(-0.627764670218)*x_ref[2]**o+(0.842131632598)*x_ref[2]
-        ref[3,1,2,0]=(-0.957096489189)*x_ref[0]**o+(0.0616037805677)*x_ref[0]+(0.255858200166)*x_ref[1]**o+(-0.430555450798)*x_ref[1]+(0.730436930737)*x_ref[2]**o+(0.405094271653)*x_ref[2]
-        ref[3,1,2,1]=(-0.924756832665)*x_ref[0]**o+(0.525754162391)*x_ref[0]+(0.281303228038)*x_ref[1]**o+(-0.479500161878)*x_ref[1]+(0.658416209181)*x_ref[2]**o+(-0.0413881595557)*x_ref[2]
-        ref[3,2,0,0]=(0.516429381997)*x_ref[0]**o+(-0.8387318467)*x_ref[0]+(0.329773978227)*x_ref[1]**o+(0.599641753085)*x_ref[1]+(0.939937743271)*x_ref[2]**o+(-0.247331169626)*x_ref[2]
-        ref[3,2,0,1]=(-0.644982044558)*x_ref[0]**o+(-0.242033352774)*x_ref[0]+(0.531835185779)*x_ref[1]**o+(-0.851565064183)*x_ref[1]+(-0.79213624915)*x_ref[2]**o+(0.0607365690732)*x_ref[2]
-        ref[3,2,1,0]=(0.359781383537)*x_ref[0]**o+(-0.0529212842074)*x_ref[0]+(0.845915169452)*x_ref[1]**o+(-0.323979570458)*x_ref[1]+(0.828909997631)*x_ref[2]**o+(-0.839886339138)*x_ref[2]
-        ref[3,2,1,1]=(0.559476630421)*x_ref[0]**o+(-0.189725214615)*x_ref[0]+(-0.00927446700413)*x_ref[1]**o+(-0.234703720782)*x_ref[1]+(-0.608362806755)*x_ref[2]**o+(0.968571765534)*x_ref[2]
-        ref[3,2,2,0]=(0.924837507913)*x_ref[0]**o+(0.846397611121)*x_ref[0]+(-0.837765472403)*x_ref[1]**o+(0.0225105985057)*x_ref[1]+(-0.834187513844)*x_ref[2]**o+(0.194311845578)*x_ref[2]
-        ref[3,2,2,1]=(-0.183561089961)*x_ref[0]**o+(0.0745071729471)*x_ref[0]+(-0.660415615202)*x_ref[1]**o+(-0.528184997345)*x_ref[1]+(0.205554094557)*x_ref[2]**o+(-0.0309246318944)*x_ref[2]
-        ref[3,3,0,0]=(-0.67124095974)*x_ref[0]**o+(-0.48501497083)*x_ref[0]+(-0.0394345869094)*x_ref[1]**o+(0.586692270429)*x_ref[1]+(-0.593760749687)*x_ref[2]**o+(-0.124979751327)*x_ref[2]
-        ref[3,3,0,1]=(0.778544173855)*x_ref[0]**o+(-0.931466478494)*x_ref[0]+(-0.746894777998)*x_ref[1]**o+(0.806417936297)*x_ref[1]+(0.989460929848)*x_ref[2]**o+(0.666534366369)*x_ref[2]
-        ref[3,3,1,0]=(-0.798870838602)*x_ref[0]**o+(-0.294618868937)*x_ref[0]+(0.275029092968)*x_ref[1]**o+(0.45390580364)*x_ref[1]+(-0.311797818508)*x_ref[2]**o+(0.751606624393)*x_ref[2]
-        ref[3,3,1,1]=(-0.924260987477)*x_ref[0]**o+(0.771970726902)*x_ref[0]+(-0.909099224213)*x_ref[1]**o+(-0.45204206766)*x_ref[1]+(0.630042614017)*x_ref[2]**o+(-0.990915130464)*x_ref[2]
-        ref[3,3,2,0]=(0.734962154852)*x_ref[0]**o+(-0.00621898011475)*x_ref[0]+(-0.786362527189)*x_ref[1]**o+(0.623507947406)*x_ref[1]+(0.867175567104)*x_ref[2]**o+(-0.383283255448)*x_ref[2]
-        ref[3,3,2,1]=(-0.955613156717)*x_ref[0]**o+(0.688013754841)*x_ref[0]+(-0.600559375208)*x_ref[1]**o+(0.453342626645)*x_ref[1]+(-0.864890477961)*x_ref[2]**o+(-0.458029873063)*x_ref[2]
-        ref[3,4,0,0]=(-0.897010884834)*x_ref[0]**o+(-0.251223576458)*x_ref[0]+(-0.0338052047964)*x_ref[1]**o+(-0.903421466132)*x_ref[1]+(0.836864217874)*x_ref[2]**o+(0.660805905175)*x_ref[2]
-        ref[3,4,0,1]=(-0.286025690215)*x_ref[0]**o+(0.746732975604)*x_ref[0]+(0.375810853218)*x_ref[1]**o+(-0.985192974869)*x_ref[1]+(-0.731463214455)*x_ref[2]**o+(-0.465450352444)*x_ref[2]
-        ref[3,4,1,0]=(-0.500910000652)*x_ref[0]**o+(0.387502419727)*x_ref[0]+(0.962369164802)*x_ref[1]**o+(-0.10933824251)*x_ref[1]+(-0.33642703989)*x_ref[2]**o+(0.546851133256)*x_ref[2]
-        ref[3,4,1,1]=(-0.117959459645)*x_ref[0]**o+(0.867699323392)*x_ref[0]+(0.950506403861)*x_ref[1]**o+(0.613806207745)*x_ref[1]+(0.425723173807)*x_ref[2]**o+(-0.906937548619)*x_ref[2]
-        ref[3,4,2,0]=(0.331114892194)*x_ref[0]**o+(-0.168829643424)*x_ref[0]+(-0.855962311982)*x_ref[1]**o+(-0.144202406673)*x_ref[1]+(0.0769985713088)*x_ref[2]**o+(0.856003746423)*x_ref[2]
-        ref[3,4,2,1]=(-0.439397439364)*x_ref[0]**o+(0.686116343481)*x_ref[0]+(0.519883854523)*x_ref[1]**o+(0.716231469289)*x_ref[1]+(0.270098231149)*x_ref[2]**o+(-0.448525436427)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.787646538574)*x[0]+(0.912422904218)*x[1]
-        ref=(-0.787646538574)*x_ref[0]+(0.912422904218)*x_ref[1]
-      else:
-        arg=(0.934044939024)*x[0]+(0.628477728603)*x[1]+(-0.786339405837)*x[2]
-        ref=(0.934044939024)*x_ref[0]+(0.628477728603)*x_ref[1]+(-0.786339405837)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        arg[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-        ref[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        ref[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-      else:
-        arg[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        arg[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-        ref[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        ref[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.797066914479)*x[0]+(-0.0269853164939)*x[1]
-        arg[0,1]=(-1.07443661798)*x[0]+(0.818510216043)*x[1]
-        arg[0,2]=(0.398735262179)*x[0]+(-0.580387872083)*x[1]
-        arg[0,3]=(-0.003185613959)*x[0]+(-0.670506330615)*x[1]
-        arg[0,4]=(0.385009570186)*x[0]+(0.858570512936)*x[1]
-        arg[1,0]=(1.60917176753)*x[0]+(-0.0866362449992)*x[1]
-        arg[1,1]=(-0.883782122452)*x[0]+(-0.402187705578)*x[1]
-        arg[1,2]=(0.153893095122)*x[0]+(-1.19636362644)*x[1]
-        arg[1,3]=(1.92041961031)*x[0]+(0.325857877636)*x[1]
-        arg[1,4]=(-0.0947698843729)*x[0]+(-0.0663785758627)*x[1]
-        arg[2,0]=(0.0232949467051)*x[0]+(1.60134210326)*x[1]
-        arg[2,1]=(-0.521182882924)*x[0]+(-0.507401571343)*x[1]
-        arg[2,2]=(0.833797117616)*x[0]+(-0.268886477194)*x[1]
-        arg[2,3]=(-0.867762611227)*x[0]+(1.03727088566)*x[1]
-        arg[2,4]=(0.380510651918)*x[0]+(0.350246888456)*x[1]
-        arg[3,0]=(-1.10155500839)*x[0]+(0.414683749118)*x[1]
-        arg[3,1]=(-0.0306733233552)*x[0]+(-0.351251014237)*x[1]
-        arg[3,2]=(-0.0708773001498)*x[0]+(-0.326636587948)*x[1]
-        arg[3,3]=(-1.32553119895)*x[0]+(-1.5852157477)*x[1]
-        arg[3,4]=(1.40177154802)*x[0]+(-1.24804787994)*x[1]
-        ref[0,0]=(-0.797066914479)*x_ref[0]+(-0.0269853164939)*x_ref[1]
-        ref[0,1]=(-1.07443661798)*x_ref[0]+(0.818510216043)*x_ref[1]
-        ref[0,2]=(0.398735262179)*x_ref[0]+(-0.580387872083)*x_ref[1]
-        ref[0,3]=(-0.003185613959)*x_ref[0]+(-0.670506330615)*x_ref[1]
-        ref[0,4]=(0.385009570186)*x_ref[0]+(0.858570512936)*x_ref[1]
-        ref[1,0]=(1.60917176753)*x_ref[0]+(-0.0866362449992)*x_ref[1]
-        ref[1,1]=(-0.883782122452)*x_ref[0]+(-0.402187705578)*x_ref[1]
-        ref[1,2]=(0.153893095122)*x_ref[0]+(-1.19636362644)*x_ref[1]
-        ref[1,3]=(1.92041961031)*x_ref[0]+(0.325857877636)*x_ref[1]
-        ref[1,4]=(-0.0947698843729)*x_ref[0]+(-0.0663785758627)*x_ref[1]
-        ref[2,0]=(0.0232949467051)*x_ref[0]+(1.60134210326)*x_ref[1]
-        ref[2,1]=(-0.521182882924)*x_ref[0]+(-0.507401571343)*x_ref[1]
-        ref[2,2]=(0.833797117616)*x_ref[0]+(-0.268886477194)*x_ref[1]
-        ref[2,3]=(-0.867762611227)*x_ref[0]+(1.03727088566)*x_ref[1]
-        ref[2,4]=(0.380510651918)*x_ref[0]+(0.350246888456)*x_ref[1]
-        ref[3,0]=(-1.10155500839)*x_ref[0]+(0.414683749118)*x_ref[1]
-        ref[3,1]=(-0.0306733233552)*x_ref[0]+(-0.351251014237)*x_ref[1]
-        ref[3,2]=(-0.0708773001498)*x_ref[0]+(-0.326636587948)*x_ref[1]
-        ref[3,3]=(-1.32553119895)*x_ref[0]+(-1.5852157477)*x_ref[1]
-        ref[3,4]=(1.40177154802)*x_ref[0]+(-1.24804787994)*x_ref[1]
-      else:
-        arg[0,0]=(0.000362194678523)*x[0]+(-1.63949220671)*x[1]+(-0.176997156562)*x[2]
-        arg[0,1]=(-0.357589049408)*x[0]+(0.828191515325)*x[1]+(-0.269706780136)*x[2]
-        arg[0,2]=(0.886395070544)*x[0]+(0.815688451839)*x[1]+(-0.658412270558)*x[2]
-        arg[0,3]=(-0.222573318026)*x[0]+(0.137763803092)*x[1]+(0.171902150187)*x[2]
-        arg[0,4]=(1.05159741251)*x[0]+(0.923836841038)*x[1]+(-0.426590801731)*x[2]
-        arg[1,0]=(-0.00718419057788)*x[0]+(1.55809964998)*x[1]+(-0.912766657496)*x[2]
-        arg[1,1]=(1.30769045785)*x[0]+(-0.0356609338389)*x[1]+(0.214543084134)*x[2]
-        arg[1,2]=(-1.56763014241)*x[0]+(-0.582970995722)*x[1]+(-0.513972924752)*x[2]
-        arg[1,3]=(0.118027736928)*x[0]+(-0.28795014876)*x[1]+(0.620718623034)*x[2]
-        arg[1,4]=(-0.784496170193)*x[0]+(0.233037866924)*x[1]+(-0.0500718134572)*x[2]
-        arg[2,0]=(0.800851281806)*x[0]+(0.219346484846)*x[1]+(1.19125787701)*x[2]
-        arg[2,1]=(-1.45025879429)*x[0]+(-1.32011538154)*x[1]+(0.47946669308)*x[2]
-        arg[2,2]=(-0.231377110469)*x[0]+(-0.921551695999)*x[1]+(-0.298964635841)*x[2]
-        arg[2,3]=(0.965766335546)*x[0]+(0.424791610089)*x[1]+(1.01860652092)*x[2]
-        arg[2,4]=(0.676247093636)*x[0]+(-1.50802741511)*x[1]+(0.0385960918391)*x[2]
-        arg[3,0]=(0.322378151756)*x[0]+(-0.483633005509)*x[1]+(-0.852371707865)*x[2]
-        arg[3,1]=(-0.241998307153)*x[0]+(-1.08134340082)*x[1]+(-0.849574532537)*x[2]
-        arg[3,2]=(-0.0185751405467)*x[0]+(0.179558416001)*x[1]+(-0.488727308548)*x[2]
-        arg[3,3]=(0.0984555057845)*x[0]+(1.03085967788)*x[1]+(-0.357009094371)*x[2]
-        arg[3,4]=(0.430593980121)*x[0]+(0.689565614489)*x[1]+(-0.0916541808491)*x[2]
-        ref[0,0]=(0.000362194678523)*x_ref[0]+(-1.63949220671)*x_ref[1]+(-0.176997156562)*x_ref[2]
-        ref[0,1]=(-0.357589049408)*x_ref[0]+(0.828191515325)*x_ref[1]+(-0.269706780136)*x_ref[2]
-        ref[0,2]=(0.886395070544)*x_ref[0]+(0.815688451839)*x_ref[1]+(-0.658412270558)*x_ref[2]
-        ref[0,3]=(-0.222573318026)*x_ref[0]+(0.137763803092)*x_ref[1]+(0.171902150187)*x_ref[2]
-        ref[0,4]=(1.05159741251)*x_ref[0]+(0.923836841038)*x_ref[1]+(-0.426590801731)*x_ref[2]
-        ref[1,0]=(-0.00718419057788)*x_ref[0]+(1.55809964998)*x_ref[1]+(-0.912766657496)*x_ref[2]
-        ref[1,1]=(1.30769045785)*x_ref[0]+(-0.0356609338389)*x_ref[1]+(0.214543084134)*x_ref[2]
-        ref[1,2]=(-1.56763014241)*x_ref[0]+(-0.582970995722)*x_ref[1]+(-0.513972924752)*x_ref[2]
-        ref[1,3]=(0.118027736928)*x_ref[0]+(-0.28795014876)*x_ref[1]+(0.620718623034)*x_ref[2]
-        ref[1,4]=(-0.784496170193)*x_ref[0]+(0.233037866924)*x_ref[1]+(-0.0500718134572)*x_ref[2]
-        ref[2,0]=(0.800851281806)*x_ref[0]+(0.219346484846)*x_ref[1]+(1.19125787701)*x_ref[2]
-        ref[2,1]=(-1.45025879429)*x_ref[0]+(-1.32011538154)*x_ref[1]+(0.47946669308)*x_ref[2]
-        ref[2,2]=(-0.231377110469)*x_ref[0]+(-0.921551695999)*x_ref[1]+(-0.298964635841)*x_ref[2]
-        ref[2,3]=(0.965766335546)*x_ref[0]+(0.424791610089)*x_ref[1]+(1.01860652092)*x_ref[2]
-        ref[2,4]=(0.676247093636)*x_ref[0]+(-1.50802741511)*x_ref[1]+(0.0385960918391)*x_ref[2]
-        ref[3,0]=(0.322378151756)*x_ref[0]+(-0.483633005509)*x_ref[1]+(-0.852371707865)*x_ref[2]
-        ref[3,1]=(-0.241998307153)*x_ref[0]+(-1.08134340082)*x_ref[1]+(-0.849574532537)*x_ref[2]
-        ref[3,2]=(-0.0185751405467)*x_ref[0]+(0.179558416001)*x_ref[1]+(-0.488727308548)*x_ref[2]
-        ref[3,3]=(0.0984555057845)*x_ref[0]+(1.03085967788)*x_ref[1]+(-0.357009094371)*x_ref[2]
-        ref[3,4]=(0.430593980121)*x_ref[0]+(0.689565614489)*x_ref[1]+(-0.0916541808491)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0641544023301)*x[0]+(0.364286357763)*x[1]
-        arg[0,0,1]=(-0.858288240411)*x[0]+(-0.847764393559)*x[1]
-        arg[0,1,0]=(-0.656948775029)*x[0]+(1.69748608992)*x[1]
-        arg[0,1,1]=(0.579399191549)*x[0]+(1.48407368783)*x[1]
-        arg[1,0,0]=(-0.35948657403)*x[0]+(0.795436090765)*x[1]
-        arg[1,0,1]=(-1.32807156246)*x[0]+(0.921960610294)*x[1]
-        arg[1,1,0]=(1.0904085219)*x[0]+(-1.41870997296)*x[1]
-        arg[1,1,1]=(-0.677691596793)*x[0]+(-0.395373706333)*x[1]
-        arg[2,0,0]=(0.295591917216)*x[0]+(-1.75550830457)*x[1]
-        arg[2,0,1]=(0.506665326626)*x[0]+(0.273265713965)*x[1]
-        arg[2,1,0]=(0.543899865352)*x[0]+(-0.0678457091657)*x[1]
-        arg[2,1,1]=(-0.887824769535)*x[0]+(0.527475538055)*x[1]
-        arg[3,0,0]=(-0.788511557365)*x[0]+(-0.635972100675)*x[1]
-        arg[3,0,1]=(-1.02799066459)*x[0]+(-0.416241247725)*x[1]
-        arg[3,1,0]=(-0.310072483091)*x[0]+(1.2445160445)*x[1]
-        arg[3,1,1]=(0.912462196567)*x[0]+(0.631855269783)*x[1]
-        arg[4,0,0]=(0.700426861807)*x[0]+(-0.491365913713)*x[1]
-        arg[4,0,1]=(0.628791538338)*x[0]+(0.640767645586)*x[1]
-        arg[4,1,0]=(0.370886720329)*x[0]+(0.823663448834)*x[1]
-        arg[4,1,1]=(1.75857310774)*x[0]+(0.445439424641)*x[1]
-        arg[5,0,0]=(1.39637385066)*x[0]+(-0.812211860169)*x[1]
-        arg[5,0,1]=(0.865050350195)*x[0]+(-1.25983380375)*x[1]
-        arg[5,1,0]=(-0.0429057645445)*x[0]+(-1.08490578934)*x[1]
-        arg[5,1,1]=(1.42851264594)*x[0]+(1.52192971749)*x[1]
-        ref[0,0,0]=(-0.0641544023301)*x_ref[0]+(0.364286357763)*x_ref[1]
-        ref[0,0,1]=(-0.858288240411)*x_ref[0]+(-0.847764393559)*x_ref[1]
-        ref[0,1,0]=(-0.656948775029)*x_ref[0]+(1.69748608992)*x_ref[1]
-        ref[0,1,1]=(0.579399191549)*x_ref[0]+(1.48407368783)*x_ref[1]
-        ref[1,0,0]=(-0.35948657403)*x_ref[0]+(0.795436090765)*x_ref[1]
-        ref[1,0,1]=(-1.32807156246)*x_ref[0]+(0.921960610294)*x_ref[1]
-        ref[1,1,0]=(1.0904085219)*x_ref[0]+(-1.41870997296)*x_ref[1]
-        ref[1,1,1]=(-0.677691596793)*x_ref[0]+(-0.395373706333)*x_ref[1]
-        ref[2,0,0]=(0.295591917216)*x_ref[0]+(-1.75550830457)*x_ref[1]
-        ref[2,0,1]=(0.506665326626)*x_ref[0]+(0.273265713965)*x_ref[1]
-        ref[2,1,0]=(0.543899865352)*x_ref[0]+(-0.0678457091657)*x_ref[1]
-        ref[2,1,1]=(-0.887824769535)*x_ref[0]+(0.527475538055)*x_ref[1]
-        ref[3,0,0]=(-0.788511557365)*x_ref[0]+(-0.635972100675)*x_ref[1]
-        ref[3,0,1]=(-1.02799066459)*x_ref[0]+(-0.416241247725)*x_ref[1]
-        ref[3,1,0]=(-0.310072483091)*x_ref[0]+(1.2445160445)*x_ref[1]
-        ref[3,1,1]=(0.912462196567)*x_ref[0]+(0.631855269783)*x_ref[1]
-        ref[4,0,0]=(0.700426861807)*x_ref[0]+(-0.491365913713)*x_ref[1]
-        ref[4,0,1]=(0.628791538338)*x_ref[0]+(0.640767645586)*x_ref[1]
-        ref[4,1,0]=(0.370886720329)*x_ref[0]+(0.823663448834)*x_ref[1]
-        ref[4,1,1]=(1.75857310774)*x_ref[0]+(0.445439424641)*x_ref[1]
-        ref[5,0,0]=(1.39637385066)*x_ref[0]+(-0.812211860169)*x_ref[1]
-        ref[5,0,1]=(0.865050350195)*x_ref[0]+(-1.25983380375)*x_ref[1]
-        ref[5,1,0]=(-0.0429057645445)*x_ref[0]+(-1.08490578934)*x_ref[1]
-        ref[5,1,1]=(1.42851264594)*x_ref[0]+(1.52192971749)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.731194732468)*x[0]+(-0.0822115660022)*x[1]+(-0.403175091289)*x[2]
-        arg[0,0,1]=(0.39292230307)*x[0]+(1.48598681615)*x[1]+(1.05545374107)*x[2]
-        arg[0,1,0]=(0.306844260706)*x[0]+(0.836496026763)*x[1]+(-0.121120983155)*x[2]
-        arg[0,1,1]=(-0.155245802062)*x[0]+(0.800232934864)*x[1]+(0.373397160636)*x[2]
-        arg[1,0,0]=(0.155941790359)*x[0]+(0.826821969281)*x[1]+(0.849596807425)*x[2]
-        arg[1,0,1]=(-0.0988854656187)*x[0]+(-0.855032499842)*x[1]+(0.141988288566)*x[2]
-        arg[1,1,0]=(-0.761032539296)*x[0]+(-0.0892979073234)*x[1]+(1.93034385132)*x[2]
-        arg[1,1,1]=(-1.08303603558)*x[0]+(-0.487250117659)*x[1]+(0.0358501036173)*x[2]
-        arg[2,0,0]=(0.148391465413)*x[0]+(-0.731963025625)*x[1]+(0.484236965689)*x[2]
-        arg[2,0,1]=(1.06691217722)*x[0]+(-0.638095266244)*x[1]+(-0.971838410779)*x[2]
-        arg[2,1,0]=(-0.377750829061)*x[0]+(-0.101467967263)*x[1]+(-1.54241387349)*x[2]
-        arg[2,1,1]=(0.62210350231)*x[0]+(0.0435334873911)*x[1]+(-0.299303646623)*x[2]
-        arg[3,0,0]=(0.523811147108)*x[0]+(-1.09709839108)*x[1]+(1.83592280935)*x[2]
-        arg[3,0,1]=(0.957738143475)*x[0]+(0.282158440867)*x[1]+(0.621694180522)*x[2]
-        arg[3,1,0]=(0.366557891822)*x[0]+(0.812194047631)*x[1]+(-0.245067876349)*x[2]
-        arg[3,1,1]=(0.604859464982)*x[0]+(1.08415514854)*x[1]+(-1.470128848)*x[2]
-        arg[4,0,0]=(-0.13031502499)*x[0]+(-1.20707238733)*x[1]+(0.108382497552)*x[2]
-        arg[4,0,1]=(1.30453246317)*x[0]+(1.59696612588)*x[1]+(-0.234259043697)*x[2]
-        arg[4,1,0]=(-0.233494640836)*x[0]+(1.10701061816)*x[1]+(-0.409927013674)*x[2]
-        arg[4,1,1]=(0.102708240266)*x[0]+(-0.381598345002)*x[1]+(-1.39077748656)*x[2]
-        arg[5,0,0]=(1.06217404493)*x[0]+(1.1600791444)*x[1]+(-1.45242735389)*x[2]
-        arg[5,0,1]=(-0.423024189506)*x[0]+(-0.0868948651641)*x[1]+(0.0894539043522)*x[2]
-        arg[5,1,0]=(1.17650613067)*x[0]+(0.993832919965)*x[1]+(1.16546768569)*x[2]
-        arg[5,1,1]=(-0.61549132897)*x[0]+(-0.499619662734)*x[1]+(-0.643422281669)*x[2]
-        ref[0,0,0]=(0.731194732468)*x_ref[0]+(-0.0822115660022)*x_ref[1]+(-0.403175091289)*x_ref[2]
-        ref[0,0,1]=(0.39292230307)*x_ref[0]+(1.48598681615)*x_ref[1]+(1.05545374107)*x_ref[2]
-        ref[0,1,0]=(0.306844260706)*x_ref[0]+(0.836496026763)*x_ref[1]+(-0.121120983155)*x_ref[2]
-        ref[0,1,1]=(-0.155245802062)*x_ref[0]+(0.800232934864)*x_ref[1]+(0.373397160636)*x_ref[2]
-        ref[1,0,0]=(0.155941790359)*x_ref[0]+(0.826821969281)*x_ref[1]+(0.849596807425)*x_ref[2]
-        ref[1,0,1]=(-0.0988854656187)*x_ref[0]+(-0.855032499842)*x_ref[1]+(0.141988288566)*x_ref[2]
-        ref[1,1,0]=(-0.761032539296)*x_ref[0]+(-0.0892979073234)*x_ref[1]+(1.93034385132)*x_ref[2]
-        ref[1,1,1]=(-1.08303603558)*x_ref[0]+(-0.487250117659)*x_ref[1]+(0.0358501036173)*x_ref[2]
-        ref[2,0,0]=(0.148391465413)*x_ref[0]+(-0.731963025625)*x_ref[1]+(0.484236965689)*x_ref[2]
-        ref[2,0,1]=(1.06691217722)*x_ref[0]+(-0.638095266244)*x_ref[1]+(-0.971838410779)*x_ref[2]
-        ref[2,1,0]=(-0.377750829061)*x_ref[0]+(-0.101467967263)*x_ref[1]+(-1.54241387349)*x_ref[2]
-        ref[2,1,1]=(0.62210350231)*x_ref[0]+(0.0435334873911)*x_ref[1]+(-0.299303646623)*x_ref[2]
-        ref[3,0,0]=(0.523811147108)*x_ref[0]+(-1.09709839108)*x_ref[1]+(1.83592280935)*x_ref[2]
-        ref[3,0,1]=(0.957738143475)*x_ref[0]+(0.282158440867)*x_ref[1]+(0.621694180522)*x_ref[2]
-        ref[3,1,0]=(0.366557891822)*x_ref[0]+(0.812194047631)*x_ref[1]+(-0.245067876349)*x_ref[2]
-        ref[3,1,1]=(0.604859464982)*x_ref[0]+(1.08415514854)*x_ref[1]+(-1.470128848)*x_ref[2]
-        ref[4,0,0]=(-0.13031502499)*x_ref[0]+(-1.20707238733)*x_ref[1]+(0.108382497552)*x_ref[2]
-        ref[4,0,1]=(1.30453246317)*x_ref[0]+(1.59696612588)*x_ref[1]+(-0.234259043697)*x_ref[2]
-        ref[4,1,0]=(-0.233494640836)*x_ref[0]+(1.10701061816)*x_ref[1]+(-0.409927013674)*x_ref[2]
-        ref[4,1,1]=(0.102708240266)*x_ref[0]+(-0.381598345002)*x_ref[1]+(-1.39077748656)*x_ref[2]
-        ref[5,0,0]=(1.06217404493)*x_ref[0]+(1.1600791444)*x_ref[1]+(-1.45242735389)*x_ref[2]
-        ref[5,0,1]=(-0.423024189506)*x_ref[0]+(-0.0868948651641)*x_ref[1]+(0.0894539043522)*x_ref[2]
-        ref[5,1,0]=(1.17650613067)*x_ref[0]+(0.993832919965)*x_ref[1]+(1.16546768569)*x_ref[2]
-        ref[5,1,1]=(-0.61549132897)*x_ref[0]+(-0.499619662734)*x_ref[1]+(-0.643422281669)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.227969627252)*x[0]+(0.778177350248)*x[1]
-        arg[0,0,0,1]=(-0.684883711494)*x[0]+(-0.574285957132)*x[1]
-        arg[0,0,1,0]=(0.483090608974)*x[0]+(0.0779929087959)*x[1]
-        arg[0,0,1,1]=(-0.293150814932)*x[0]+(1.35368931993)*x[1]
-        arg[0,0,2,0]=(-0.190664734662)*x[0]+(0.910883386754)*x[1]
-        arg[0,0,2,1]=(-1.51255575457)*x[0]+(0.421560181501)*x[1]
-        arg[0,1,0,0]=(-0.833402828032)*x[0]+(-0.400466806781)*x[1]
-        arg[0,1,0,1]=(-0.212099323605)*x[0]+(-0.112478697221)*x[1]
-        arg[0,1,1,0]=(0.57687662926)*x[0]+(0.869758954551)*x[1]
-        arg[0,1,1,1]=(1.37261769917)*x[0]+(1.37855789907)*x[1]
-        arg[0,1,2,0]=(-1.02838589722)*x[0]+(-0.280409246204)*x[1]
-        arg[0,1,2,1]=(1.2333373468)*x[0]+(0.337631183798)*x[1]
-        arg[0,2,0,0]=(-0.249065448772)*x[0]+(0.834483646317)*x[1]
-        arg[0,2,0,1]=(-1.30860297683)*x[0]+(-0.653929967017)*x[1]
-        arg[0,2,1,0]=(-0.0155994484453)*x[0]+(-0.274023166937)*x[1]
-        arg[0,2,1,1]=(0.31458360335)*x[0]+(1.59507700673)*x[1]
-        arg[0,2,2,0]=(-0.11442619553)*x[0]+(1.6577028576)*x[1]
-        arg[0,2,2,1]=(0.274261132032)*x[0]+(1.15236962479)*x[1]
-        arg[0,3,0,0]=(1.91433860239)*x[0]+(-0.316349747811)*x[1]
-        arg[0,3,0,1]=(-1.42457591054)*x[0]+(-0.362812690805)*x[1]
-        arg[0,3,1,0]=(0.572734883096)*x[0]+(0.424724787283)*x[1]
-        arg[0,3,1,1]=(-0.118538376813)*x[0]+(0.25190312527)*x[1]
-        arg[0,3,2,0]=(-0.533409510081)*x[0]+(-0.804349107915)*x[1]
-        arg[0,3,2,1]=(-0.290555363666)*x[0]+(-0.912641477145)*x[1]
-        arg[0,4,0,0]=(-0.469612775918)*x[0]+(-0.0447411310793)*x[1]
-        arg[0,4,0,1]=(0.108538258831)*x[0]+(0.0453962016662)*x[1]
-        arg[0,4,1,0]=(-0.130785944028)*x[0]+(0.0887280914032)*x[1]
-        arg[0,4,1,1]=(0.166412309585)*x[0]+(-0.75130797706)*x[1]
-        arg[0,4,2,0]=(1.22538232455)*x[0]+(0.112925588343)*x[1]
-        arg[0,4,2,1]=(-1.02455171854)*x[0]+(-0.725754942749)*x[1]
-        arg[1,0,0,0]=(-0.869171086952)*x[0]+(-0.948876783682)*x[1]
-        arg[1,0,0,1]=(0.17730673689)*x[0]+(-0.00166180855579)*x[1]
-        arg[1,0,1,0]=(0.482072704433)*x[0]+(0.895847096783)*x[1]
-        arg[1,0,1,1]=(0.695736834617)*x[0]+(0.358082704558)*x[1]
-        arg[1,0,2,0]=(-0.501799636565)*x[0]+(0.363612558025)*x[1]
-        arg[1,0,2,1]=(-1.47204447226)*x[0]+(1.91281426121)*x[1]
-        arg[1,1,0,0]=(0.241893182978)*x[0]+(0.95199758669)*x[1]
-        arg[1,1,0,1]=(-0.68112361827)*x[0]+(-0.241935141301)*x[1]
-        arg[1,1,1,0]=(-0.553030972306)*x[0]+(0.0244503690439)*x[1]
-        arg[1,1,1,1]=(0.278177176896)*x[0]+(1.58693846427)*x[1]
-        arg[1,1,2,0]=(-0.87980015517)*x[0]+(0.315618837123)*x[1]
-        arg[1,1,2,1]=(-0.335783961379)*x[0]+(0.368650136138)*x[1]
-        arg[1,2,0,0]=(-0.903535146802)*x[0]+(1.68182923194)*x[1]
-        arg[1,2,0,1]=(1.06511511382)*x[0]+(-1.08524762302)*x[1]
-        arg[1,2,1,0]=(-0.0455274784681)*x[0]+(-0.519576710661)*x[1]
-        arg[1,2,1,1]=(0.735100217062)*x[0]+(-0.986268682671)*x[1]
-        arg[1,2,2,0]=(-0.544610797462)*x[0]+(0.447237114882)*x[1]
-        arg[1,2,2,1]=(0.385242031153)*x[0]+(-0.960538844247)*x[1]
-        arg[1,3,0,0]=(-0.354927072897)*x[0]+(0.842574324062)*x[1]
-        arg[1,3,0,1]=(0.319036427919)*x[0]+(-0.156282262536)*x[1]
-        arg[1,3,1,0]=(0.587123807717)*x[0]+(1.65277990726)*x[1]
-        arg[1,3,1,1]=(0.791697370298)*x[0]+(-1.5681680344)*x[1]
-        arg[1,3,2,0]=(-1.41931242045)*x[0]+(0.351285136557)*x[1]
-        arg[1,3,2,1]=(0.53175704402)*x[0]+(0.987523241324)*x[1]
-        arg[1,4,0,0]=(0.00533504818465)*x[0]+(-0.158886930817)*x[1]
-        arg[1,4,0,1]=(1.23725297303)*x[0]+(-0.302896452172)*x[1]
-        arg[1,4,1,0]=(0.433953146329)*x[0]+(-0.0721602234887)*x[1]
-        arg[1,4,1,1]=(-0.383499726865)*x[0]+(-0.253834671235)*x[1]
-        arg[1,4,2,0]=(-0.480776695247)*x[0]+(-0.302145524759)*x[1]
-        arg[1,4,2,1]=(1.14113180903)*x[0]+(-1.24304726003)*x[1]
-        arg[2,0,0,0]=(0.513776013893)*x[0]+(-0.16660259885)*x[1]
-        arg[2,0,0,1]=(1.55739209698)*x[0]+(0.0524084654531)*x[1]
-        arg[2,0,1,0]=(0.222567881446)*x[0]+(-0.357158470388)*x[1]
-        arg[2,0,1,1]=(0.0179816596229)*x[0]+(0.231534460784)*x[1]
-        arg[2,0,2,0]=(1.58460345297)*x[0]+(-0.383588433888)*x[1]
-        arg[2,0,2,1]=(-1.73386465536)*x[0]+(-0.743326657544)*x[1]
-        arg[2,1,0,0]=(-0.737976950246)*x[0]+(-1.01053396224)*x[1]
-        arg[2,1,0,1]=(0.926911190393)*x[0]+(0.620251783925)*x[1]
-        arg[2,1,1,0]=(-1.34289630129)*x[0]+(-0.429933681523)*x[1]
-        arg[2,1,1,1]=(1.79530806415)*x[0]+(-0.539783957021)*x[1]
-        arg[2,1,2,0]=(0.237950974938)*x[0]+(1.93783427703)*x[1]
-        arg[2,1,2,1]=(-0.439640741973)*x[0]+(-0.61543984673)*x[1]
-        arg[2,2,0,0]=(-1.66403612438)*x[0]+(1.00839566441)*x[1]
-        arg[2,2,0,1]=(0.249635983351)*x[0]+(-0.722261363675)*x[1]
-        arg[2,2,1,0]=(1.34179674459)*x[0]+(0.502542144188)*x[1]
-        arg[2,2,1,1]=(-0.815862586074)*x[0]+(-0.110688273707)*x[1]
-        arg[2,2,2,0]=(-0.686810719526)*x[0]+(0.500406563421)*x[1]
-        arg[2,2,2,1]=(0.681231089598)*x[0]+(0.605219505613)*x[1]
-        arg[2,3,0,0]=(-0.953299029956)*x[0]+(-0.223725858372)*x[1]
-        arg[2,3,0,1]=(0.831380756684)*x[0]+(-0.0379777076335)*x[1]
-        arg[2,3,1,0]=(-1.63804393157)*x[0]+(0.148235731301)*x[1]
-        arg[2,3,1,1]=(-0.17786458643)*x[0]+(-1.77342152699)*x[1]
-        arg[2,3,2,0]=(0.0210446244192)*x[0]+(1.59778781524)*x[1]
-        arg[2,3,2,1]=(0.877162721214)*x[0]+(0.262990448614)*x[1]
-        arg[2,4,0,0]=(-0.650265970331)*x[0]+(-1.07003604369)*x[1]
-        arg[2,4,0,1]=(1.12940101029)*x[0]+(0.860589290891)*x[1]
-        arg[2,4,1,0]=(0.520056210056)*x[0]+(-1.47691193979)*x[1]
-        arg[2,4,1,1]=(1.26823535235)*x[0]+(0.496811720647)*x[1]
-        arg[2,4,2,0]=(-1.388913443)*x[0]+(0.585343197943)*x[1]
-        arg[2,4,2,1]=(-0.762904547594)*x[0]+(0.503438815917)*x[1]
-        arg[3,0,0,0]=(0.382862686993)*x[0]+(-0.923525513303)*x[1]
-        arg[3,0,0,1]=(-0.54305794485)*x[0]+(0.467513531444)*x[1]
-        arg[3,0,1,0]=(1.24228759776)*x[0]+(-1.65740117421)*x[1]
-        arg[3,0,1,1]=(-0.463045362742)*x[0]+(0.186438587087)*x[1]
-        arg[3,0,2,0]=(0.296881980828)*x[0]+(-0.385878814949)*x[1]
-        arg[3,0,2,1]=(-0.299705899564)*x[0]+(0.490736038538)*x[1]
-        arg[3,1,0,0]=(-0.786851428658)*x[0]+(-0.760593794308)*x[1]
-        arg[3,1,0,1]=(0.506851336483)*x[0]+(0.995163951197)*x[1]
-        arg[3,1,1,0]=(-0.678883937341)*x[0]+(0.56996778248)*x[1]
-        arg[3,1,1,1]=(-0.401483642528)*x[0]+(0.0476797332537)*x[1]
-        arg[3,1,2,0]=(-0.585357955375)*x[0]+(0.330103647539)*x[1]
-        arg[3,1,2,1]=(-0.355539976825)*x[0]+(0.416287924349)*x[1]
-        arg[3,2,0,0]=(-0.662837130286)*x[0]+(-0.26640899674)*x[1]
-        arg[3,2,0,1]=(0.397553900588)*x[0]+(-1.21708620294)*x[1]
-        arg[3,2,1,0]=(0.464963326429)*x[0]+(-0.774515114142)*x[1]
-        arg[3,2,1,1]=(0.834351469791)*x[0]+(0.487629540715)*x[1]
-        arg[3,2,2,0]=(0.27622693716)*x[0]+(0.811338337719)*x[1]
-        arg[3,2,2,1]=(0.0384997772653)*x[0]+(1.03724996578)*x[1]
-        arg[3,3,0,0]=(-0.805491987874)*x[0]+(-0.476384547853)*x[1]
-        arg[3,3,0,1]=(0.615551780195)*x[0]+(-0.312805967691)*x[1]
-        arg[3,3,1,0]=(0.348666798955)*x[0]+(-1.31271156524)*x[1]
-        arg[3,3,1,1]=(-0.423569975374)*x[0]+(0.930713125389)*x[1]
-        arg[3,3,2,0]=(0.325632686234)*x[0]+(-0.166401033259)*x[1]
-        arg[3,3,2,1]=(0.126924861797)*x[0]+(-0.425380897969)*x[1]
-        arg[3,4,0,0]=(0.169532204538)*x[0]+(0.614632525765)*x[1]
-        arg[3,4,0,1]=(-0.938098696851)*x[0]+(0.648854147587)*x[1]
-        arg[3,4,1,0]=(-0.545143970434)*x[0]+(-1.59787515966)*x[1]
-        arg[3,4,1,1]=(-0.711190914978)*x[0]+(0.897331522911)*x[1]
-        arg[3,4,2,0]=(-0.386498124525)*x[0]+(0.299740420711)*x[1]
-        arg[3,4,2,1]=(0.617683032062)*x[0]+(-0.449587703061)*x[1]
-        ref[0,0,0,0]=(0.227969627252)*x_ref[0]+(0.778177350248)*x_ref[1]
-        ref[0,0,0,1]=(-0.684883711494)*x_ref[0]+(-0.574285957132)*x_ref[1]
-        ref[0,0,1,0]=(0.483090608974)*x_ref[0]+(0.0779929087959)*x_ref[1]
-        ref[0,0,1,1]=(-0.293150814932)*x_ref[0]+(1.35368931993)*x_ref[1]
-        ref[0,0,2,0]=(-0.190664734662)*x_ref[0]+(0.910883386754)*x_ref[1]
-        ref[0,0,2,1]=(-1.51255575457)*x_ref[0]+(0.421560181501)*x_ref[1]
-        ref[0,1,0,0]=(-0.833402828032)*x_ref[0]+(-0.400466806781)*x_ref[1]
-        ref[0,1,0,1]=(-0.212099323605)*x_ref[0]+(-0.112478697221)*x_ref[1]
-        ref[0,1,1,0]=(0.57687662926)*x_ref[0]+(0.869758954551)*x_ref[1]
-        ref[0,1,1,1]=(1.37261769917)*x_ref[0]+(1.37855789907)*x_ref[1]
-        ref[0,1,2,0]=(-1.02838589722)*x_ref[0]+(-0.280409246204)*x_ref[1]
-        ref[0,1,2,1]=(1.2333373468)*x_ref[0]+(0.337631183798)*x_ref[1]
-        ref[0,2,0,0]=(-0.249065448772)*x_ref[0]+(0.834483646317)*x_ref[1]
-        ref[0,2,0,1]=(-1.30860297683)*x_ref[0]+(-0.653929967017)*x_ref[1]
-        ref[0,2,1,0]=(-0.0155994484453)*x_ref[0]+(-0.274023166937)*x_ref[1]
-        ref[0,2,1,1]=(0.31458360335)*x_ref[0]+(1.59507700673)*x_ref[1]
-        ref[0,2,2,0]=(-0.11442619553)*x_ref[0]+(1.6577028576)*x_ref[1]
-        ref[0,2,2,1]=(0.274261132032)*x_ref[0]+(1.15236962479)*x_ref[1]
-        ref[0,3,0,0]=(1.91433860239)*x_ref[0]+(-0.316349747811)*x_ref[1]
-        ref[0,3,0,1]=(-1.42457591054)*x_ref[0]+(-0.362812690805)*x_ref[1]
-        ref[0,3,1,0]=(0.572734883096)*x_ref[0]+(0.424724787283)*x_ref[1]
-        ref[0,3,1,1]=(-0.118538376813)*x_ref[0]+(0.25190312527)*x_ref[1]
-        ref[0,3,2,0]=(-0.533409510081)*x_ref[0]+(-0.804349107915)*x_ref[1]
-        ref[0,3,2,1]=(-0.290555363666)*x_ref[0]+(-0.912641477145)*x_ref[1]
-        ref[0,4,0,0]=(-0.469612775918)*x_ref[0]+(-0.0447411310793)*x_ref[1]
-        ref[0,4,0,1]=(0.108538258831)*x_ref[0]+(0.0453962016662)*x_ref[1]
-        ref[0,4,1,0]=(-0.130785944028)*x_ref[0]+(0.0887280914032)*x_ref[1]
-        ref[0,4,1,1]=(0.166412309585)*x_ref[0]+(-0.75130797706)*x_ref[1]
-        ref[0,4,2,0]=(1.22538232455)*x_ref[0]+(0.112925588343)*x_ref[1]
-        ref[0,4,2,1]=(-1.02455171854)*x_ref[0]+(-0.725754942749)*x_ref[1]
-        ref[1,0,0,0]=(-0.869171086952)*x_ref[0]+(-0.948876783682)*x_ref[1]
-        ref[1,0,0,1]=(0.17730673689)*x_ref[0]+(-0.00166180855579)*x_ref[1]
-        ref[1,0,1,0]=(0.482072704433)*x_ref[0]+(0.895847096783)*x_ref[1]
-        ref[1,0,1,1]=(0.695736834617)*x_ref[0]+(0.358082704558)*x_ref[1]
-        ref[1,0,2,0]=(-0.501799636565)*x_ref[0]+(0.363612558025)*x_ref[1]
-        ref[1,0,2,1]=(-1.47204447226)*x_ref[0]+(1.91281426121)*x_ref[1]
-        ref[1,1,0,0]=(0.241893182978)*x_ref[0]+(0.95199758669)*x_ref[1]
-        ref[1,1,0,1]=(-0.68112361827)*x_ref[0]+(-0.241935141301)*x_ref[1]
-        ref[1,1,1,0]=(-0.553030972306)*x_ref[0]+(0.0244503690439)*x_ref[1]
-        ref[1,1,1,1]=(0.278177176896)*x_ref[0]+(1.58693846427)*x_ref[1]
-        ref[1,1,2,0]=(-0.87980015517)*x_ref[0]+(0.315618837123)*x_ref[1]
-        ref[1,1,2,1]=(-0.335783961379)*x_ref[0]+(0.368650136138)*x_ref[1]
-        ref[1,2,0,0]=(-0.903535146802)*x_ref[0]+(1.68182923194)*x_ref[1]
-        ref[1,2,0,1]=(1.06511511382)*x_ref[0]+(-1.08524762302)*x_ref[1]
-        ref[1,2,1,0]=(-0.0455274784681)*x_ref[0]+(-0.519576710661)*x_ref[1]
-        ref[1,2,1,1]=(0.735100217062)*x_ref[0]+(-0.986268682671)*x_ref[1]
-        ref[1,2,2,0]=(-0.544610797462)*x_ref[0]+(0.447237114882)*x_ref[1]
-        ref[1,2,2,1]=(0.385242031153)*x_ref[0]+(-0.960538844247)*x_ref[1]
-        ref[1,3,0,0]=(-0.354927072897)*x_ref[0]+(0.842574324062)*x_ref[1]
-        ref[1,3,0,1]=(0.319036427919)*x_ref[0]+(-0.156282262536)*x_ref[1]
-        ref[1,3,1,0]=(0.587123807717)*x_ref[0]+(1.65277990726)*x_ref[1]
-        ref[1,3,1,1]=(0.791697370298)*x_ref[0]+(-1.5681680344)*x_ref[1]
-        ref[1,3,2,0]=(-1.41931242045)*x_ref[0]+(0.351285136557)*x_ref[1]
-        ref[1,3,2,1]=(0.53175704402)*x_ref[0]+(0.987523241324)*x_ref[1]
-        ref[1,4,0,0]=(0.00533504818465)*x_ref[0]+(-0.158886930817)*x_ref[1]
-        ref[1,4,0,1]=(1.23725297303)*x_ref[0]+(-0.302896452172)*x_ref[1]
-        ref[1,4,1,0]=(0.433953146329)*x_ref[0]+(-0.0721602234887)*x_ref[1]
-        ref[1,4,1,1]=(-0.383499726865)*x_ref[0]+(-0.253834671235)*x_ref[1]
-        ref[1,4,2,0]=(-0.480776695247)*x_ref[0]+(-0.302145524759)*x_ref[1]
-        ref[1,4,2,1]=(1.14113180903)*x_ref[0]+(-1.24304726003)*x_ref[1]
-        ref[2,0,0,0]=(0.513776013893)*x_ref[0]+(-0.16660259885)*x_ref[1]
-        ref[2,0,0,1]=(1.55739209698)*x_ref[0]+(0.0524084654531)*x_ref[1]
-        ref[2,0,1,0]=(0.222567881446)*x_ref[0]+(-0.357158470388)*x_ref[1]
-        ref[2,0,1,1]=(0.0179816596229)*x_ref[0]+(0.231534460784)*x_ref[1]
-        ref[2,0,2,0]=(1.58460345297)*x_ref[0]+(-0.383588433888)*x_ref[1]
-        ref[2,0,2,1]=(-1.73386465536)*x_ref[0]+(-0.743326657544)*x_ref[1]
-        ref[2,1,0,0]=(-0.737976950246)*x_ref[0]+(-1.01053396224)*x_ref[1]
-        ref[2,1,0,1]=(0.926911190393)*x_ref[0]+(0.620251783925)*x_ref[1]
-        ref[2,1,1,0]=(-1.34289630129)*x_ref[0]+(-0.429933681523)*x_ref[1]
-        ref[2,1,1,1]=(1.79530806415)*x_ref[0]+(-0.539783957021)*x_ref[1]
-        ref[2,1,2,0]=(0.237950974938)*x_ref[0]+(1.93783427703)*x_ref[1]
-        ref[2,1,2,1]=(-0.439640741973)*x_ref[0]+(-0.61543984673)*x_ref[1]
-        ref[2,2,0,0]=(-1.66403612438)*x_ref[0]+(1.00839566441)*x_ref[1]
-        ref[2,2,0,1]=(0.249635983351)*x_ref[0]+(-0.722261363675)*x_ref[1]
-        ref[2,2,1,0]=(1.34179674459)*x_ref[0]+(0.502542144188)*x_ref[1]
-        ref[2,2,1,1]=(-0.815862586074)*x_ref[0]+(-0.110688273707)*x_ref[1]
-        ref[2,2,2,0]=(-0.686810719526)*x_ref[0]+(0.500406563421)*x_ref[1]
-        ref[2,2,2,1]=(0.681231089598)*x_ref[0]+(0.605219505613)*x_ref[1]
-        ref[2,3,0,0]=(-0.953299029956)*x_ref[0]+(-0.223725858372)*x_ref[1]
-        ref[2,3,0,1]=(0.831380756684)*x_ref[0]+(-0.0379777076335)*x_ref[1]
-        ref[2,3,1,0]=(-1.63804393157)*x_ref[0]+(0.148235731301)*x_ref[1]
-        ref[2,3,1,1]=(-0.17786458643)*x_ref[0]+(-1.77342152699)*x_ref[1]
-        ref[2,3,2,0]=(0.0210446244192)*x_ref[0]+(1.59778781524)*x_ref[1]
-        ref[2,3,2,1]=(0.877162721214)*x_ref[0]+(0.262990448614)*x_ref[1]
-        ref[2,4,0,0]=(-0.650265970331)*x_ref[0]+(-1.07003604369)*x_ref[1]
-        ref[2,4,0,1]=(1.12940101029)*x_ref[0]+(0.860589290891)*x_ref[1]
-        ref[2,4,1,0]=(0.520056210056)*x_ref[0]+(-1.47691193979)*x_ref[1]
-        ref[2,4,1,1]=(1.26823535235)*x_ref[0]+(0.496811720647)*x_ref[1]
-        ref[2,4,2,0]=(-1.388913443)*x_ref[0]+(0.585343197943)*x_ref[1]
-        ref[2,4,2,1]=(-0.762904547594)*x_ref[0]+(0.503438815917)*x_ref[1]
-        ref[3,0,0,0]=(0.382862686993)*x_ref[0]+(-0.923525513303)*x_ref[1]
-        ref[3,0,0,1]=(-0.54305794485)*x_ref[0]+(0.467513531444)*x_ref[1]
-        ref[3,0,1,0]=(1.24228759776)*x_ref[0]+(-1.65740117421)*x_ref[1]
-        ref[3,0,1,1]=(-0.463045362742)*x_ref[0]+(0.186438587087)*x_ref[1]
-        ref[3,0,2,0]=(0.296881980828)*x_ref[0]+(-0.385878814949)*x_ref[1]
-        ref[3,0,2,1]=(-0.299705899564)*x_ref[0]+(0.490736038538)*x_ref[1]
-        ref[3,1,0,0]=(-0.786851428658)*x_ref[0]+(-0.760593794308)*x_ref[1]
-        ref[3,1,0,1]=(0.506851336483)*x_ref[0]+(0.995163951197)*x_ref[1]
-        ref[3,1,1,0]=(-0.678883937341)*x_ref[0]+(0.56996778248)*x_ref[1]
-        ref[3,1,1,1]=(-0.401483642528)*x_ref[0]+(0.0476797332537)*x_ref[1]
-        ref[3,1,2,0]=(-0.585357955375)*x_ref[0]+(0.330103647539)*x_ref[1]
-        ref[3,1,2,1]=(-0.355539976825)*x_ref[0]+(0.416287924349)*x_ref[1]
-        ref[3,2,0,0]=(-0.662837130286)*x_ref[0]+(-0.26640899674)*x_ref[1]
-        ref[3,2,0,1]=(0.397553900588)*x_ref[0]+(-1.21708620294)*x_ref[1]
-        ref[3,2,1,0]=(0.464963326429)*x_ref[0]+(-0.774515114142)*x_ref[1]
-        ref[3,2,1,1]=(0.834351469791)*x_ref[0]+(0.487629540715)*x_ref[1]
-        ref[3,2,2,0]=(0.27622693716)*x_ref[0]+(0.811338337719)*x_ref[1]
-        ref[3,2,2,1]=(0.0384997772653)*x_ref[0]+(1.03724996578)*x_ref[1]
-        ref[3,3,0,0]=(-0.805491987874)*x_ref[0]+(-0.476384547853)*x_ref[1]
-        ref[3,3,0,1]=(0.615551780195)*x_ref[0]+(-0.312805967691)*x_ref[1]
-        ref[3,3,1,0]=(0.348666798955)*x_ref[0]+(-1.31271156524)*x_ref[1]
-        ref[3,3,1,1]=(-0.423569975374)*x_ref[0]+(0.930713125389)*x_ref[1]
-        ref[3,3,2,0]=(0.325632686234)*x_ref[0]+(-0.166401033259)*x_ref[1]
-        ref[3,3,2,1]=(0.126924861797)*x_ref[0]+(-0.425380897969)*x_ref[1]
-        ref[3,4,0,0]=(0.169532204538)*x_ref[0]+(0.614632525765)*x_ref[1]
-        ref[3,4,0,1]=(-0.938098696851)*x_ref[0]+(0.648854147587)*x_ref[1]
-        ref[3,4,1,0]=(-0.545143970434)*x_ref[0]+(-1.59787515966)*x_ref[1]
-        ref[3,4,1,1]=(-0.711190914978)*x_ref[0]+(0.897331522911)*x_ref[1]
-        ref[3,4,2,0]=(-0.386498124525)*x_ref[0]+(0.299740420711)*x_ref[1]
-        ref[3,4,2,1]=(0.617683032062)*x_ref[0]+(-0.449587703061)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.791620170192)*x[0]+(1.03871460301)*x[1]+(-0.225035657687)*x[2]
-        arg[0,0,0,1]=(-0.464422319203)*x[0]+(0.769454931053)*x[1]+(-0.783260637771)*x[2]
-        arg[0,0,1,0]=(0.72655538215)*x[0]+(-1.65736312015)*x[1]+(1.08402505927)*x[2]
-        arg[0,0,1,1]=(-0.207576709573)*x[0]+(-0.55250594761)*x[1]+(-0.923702938288)*x[2]
-        arg[0,0,2,0]=(-0.701991085516)*x[0]+(-1.76863643107)*x[1]+(0.831382933104)*x[2]
-        arg[0,0,2,1]=(0.0640035527319)*x[0]+(0.425446342976)*x[1]+(1.64626766696)*x[2]
-        arg[0,1,0,0]=(1.01022963801)*x[0]+(-0.0215015059716)*x[1]+(0.849862425592)*x[2]
-        arg[0,1,0,1]=(-0.45776932943)*x[0]+(0.7621342151)*x[1]+(-1.40123018391)*x[2]
-        arg[0,1,1,0]=(0.737485054127)*x[0]+(-0.147513905858)*x[1]+(-0.616928595213)*x[2]
-        arg[0,1,1,1]=(-0.0608005391894)*x[0]+(-0.154978210573)*x[1]+(-1.40322011577)*x[2]
-        arg[0,1,2,0]=(1.59908177714)*x[0]+(-0.378738573932)*x[1]+(1.45285315247)*x[2]
-        arg[0,1,2,1]=(-0.622552157046)*x[0]+(1.19996417516)*x[1]+(0.728842900843)*x[2]
-        arg[0,2,0,0]=(-0.46942034691)*x[0]+(0.333309721372)*x[1]+(-0.280846553832)*x[2]
-        arg[0,2,0,1]=(1.22208788109)*x[0]+(0.369339594285)*x[1]+(1.31078425589)*x[2]
-        arg[0,2,1,0]=(0.0794165004114)*x[0]+(0.44665451846)*x[1]+(-0.814625708916)*x[2]
-        arg[0,2,1,1]=(0.594200807165)*x[0]+(-0.00616720333193)*x[1]+(0.382706175172)*x[2]
-        arg[0,2,2,0]=(0.0372230170459)*x[0]+(0.440339923291)*x[1]+(0.137641070028)*x[2]
-        arg[0,2,2,1]=(-1.29863078274)*x[0]+(0.283142455171)*x[1]+(0.0844540074659)*x[2]
-        arg[0,3,0,0]=(1.72811808036)*x[0]+(0.536456781522)*x[1]+(0.0266737704706)*x[2]
-        arg[0,3,0,1]=(0.148219555101)*x[0]+(-0.6887500275)*x[1]+(-0.405613136632)*x[2]
-        arg[0,3,1,0]=(0.708262537279)*x[0]+(1.16319635773)*x[1]+(-0.030808721674)*x[2]
-        arg[0,3,1,1]=(0.80834615863)*x[0]+(-0.176789000925)*x[1]+(-1.72576120963)*x[2]
-        arg[0,3,2,0]=(0.21128315299)*x[0]+(0.770037046126)*x[1]+(0.988028934422)*x[2]
-        arg[0,3,2,1]=(1.10522136317)*x[0]+(1.6319351743)*x[1]+(-0.784693713387)*x[2]
-        arg[0,4,0,0]=(0.121088121064)*x[0]+(-1.79718067791)*x[1]+(-0.907857173318)*x[2]
-        arg[0,4,0,1]=(-0.695887294217)*x[0]+(-1.24166787807)*x[1]+(-1.24968023856)*x[2]
-        arg[0,4,1,0]=(-0.202510797291)*x[0]+(0.628310156105)*x[1]+(0.605146447822)*x[2]
-        arg[0,4,1,1]=(0.149227458424)*x[0]+(-1.5650392775)*x[1]+(-0.763944892663)*x[2]
-        arg[0,4,2,0]=(-0.393218625872)*x[0]+(0.479145914948)*x[1]+(-0.313960447492)*x[2]
-        arg[0,4,2,1]=(-0.0191807443799)*x[0]+(0.592992659119)*x[1]+(-0.475633115484)*x[2]
-        arg[1,0,0,0]=(-0.964829354261)*x[0]+(0.453014802906)*x[1]+(-0.779502566938)*x[2]
-        arg[1,0,0,1]=(0.0151205739508)*x[0]+(-0.153706429594)*x[1]+(0.00866460475724)*x[2]
-        arg[1,0,1,0]=(0.92592276366)*x[0]+(0.530787400525)*x[1]+(-0.0577912606876)*x[2]
-        arg[1,0,1,1]=(0.948404467077)*x[0]+(-0.265905470751)*x[1]+(0.472349192005)*x[2]
-        arg[1,0,2,0]=(0.0176615383702)*x[0]+(0.679605821761)*x[1]+(-0.0333590911941)*x[2]
-        arg[1,0,2,1]=(-1.15594952629)*x[0]+(0.264868376508)*x[1]+(-0.883690535499)*x[2]
-        arg[1,1,0,0]=(-0.738712703994)*x[0]+(0.545839232808)*x[1]+(0.592474501134)*x[2]
-        arg[1,1,0,1]=(-1.3468960453)*x[0]+(-0.00848202443614)*x[1]+(-0.0124138286126)*x[2]
-        arg[1,1,1,0]=(0.900228409707)*x[0]+(-1.86848082357)*x[1]+(0.421539431142)*x[2]
-        arg[1,1,1,1]=(1.42754013963)*x[0]+(-0.861376440449)*x[1]+(0.0965520362291)*x[2]
-        arg[1,1,2,0]=(-0.35873674515)*x[0]+(0.0862592617941)*x[1]+(-0.536106207025)*x[2]
-        arg[1,1,2,1]=(0.90712910097)*x[0]+(0.974545253055)*x[1]+(0.570708510858)*x[2]
-        arg[1,2,0,0]=(1.19310775669)*x[0]+(0.309414331679)*x[1]+(-0.271298061586)*x[2]
-        arg[1,2,0,1]=(0.551778129545)*x[0]+(0.539028430134)*x[1]+(0.239406239262)*x[2]
-        arg[1,2,1,0]=(-0.810625054344)*x[0]+(-0.241072190233)*x[1]+(-1.58590369097)*x[2]
-        arg[1,2,1,1]=(0.529669075734)*x[0]+(-0.890365024163)*x[1]+(-1.69798509084)*x[2]
-        arg[1,2,2,0]=(0.0437087707448)*x[0]+(0.88372190198)*x[1]+(1.86547747806)*x[2]
-        arg[1,2,2,1]=(1.30739438898)*x[0]+(0.315850112101)*x[1]+(-0.262001133683)*x[2]
-        arg[1,3,0,0]=(-0.143426236837)*x[0]+(-1.1703384826)*x[1]+(0.50608348646)*x[2]
-        arg[1,3,0,1]=(-0.0444408776922)*x[0]+(1.26952782036)*x[1]+(1.67192602934)*x[2]
-        arg[1,3,1,0]=(0.672742824368)*x[0]+(-0.785246676537)*x[1]+(0.716130664056)*x[2]
-        arg[1,3,1,1]=(-0.295182508335)*x[0]+(-1.53658860897)*x[1]+(-1.87133995422)*x[2]
-        arg[1,3,2,0]=(-0.440859530081)*x[0]+(0.0730120015821)*x[1]+(-1.02465537353)*x[2]
-        arg[1,3,2,1]=(0.838320612003)*x[0]+(1.81233688454)*x[1]+(-1.0633876685)*x[2]
-        arg[1,4,0,0]=(0.52440453051)*x[0]+(-0.0182588999022)*x[1]+(1.05556310351)*x[2]
-        arg[1,4,0,1]=(0.766612727495)*x[0]+(1.58987590746)*x[1]+(-0.703801484569)*x[2]
-        arg[1,4,1,0]=(0.373439757535)*x[0]+(-0.0676963704305)*x[1]+(0.0948034094293)*x[2]
-        arg[1,4,1,1]=(-0.542283543375)*x[0]+(-0.454408605761)*x[1]+(-0.398904635316)*x[2]
-        arg[1,4,2,0]=(1.3374871143)*x[0]+(0.0067849394587)*x[1]+(-0.319452094882)*x[2]
-        arg[1,4,2,1]=(0.38530755393)*x[0]+(1.05356462429)*x[1]+(-0.302179447719)*x[2]
-        arg[2,0,0,0]=(-0.123109761583)*x[0]+(0.69223848143)*x[1]+(-1.36903487092)*x[2]
-        arg[2,0,0,1]=(0.121957328459)*x[0]+(0.102229685387)*x[1]+(0.962499974737)*x[2]
-        arg[2,0,1,0]=(0.478614188653)*x[0]+(-1.23058817023)*x[1]+(1.30950997478)*x[2]
-        arg[2,0,1,1]=(-0.529033562461)*x[0]+(0.563030509591)*x[1]+(-0.564939226654)*x[2]
-        arg[2,0,2,0]=(-0.377740282406)*x[0]+(1.20532110343)*x[1]+(1.55615174947)*x[2]
-        arg[2,0,2,1]=(0.539119710703)*x[0]+(1.91771865857)*x[1]+(0.0809882488048)*x[2]
-        arg[2,1,0,0]=(0.00548664737796)*x[0]+(-0.157716099068)*x[1]+(-1.40009044235)*x[2]
-        arg[2,1,0,1]=(0.0667557890666)*x[0]+(0.742484448131)*x[1]+(-0.325246111346)*x[2]
-        arg[2,1,1,0]=(-0.214965474071)*x[0]+(-0.215055151964)*x[1]+(1.15673960537)*x[2]
-        arg[2,1,1,1]=(0.605764831789)*x[0]+(-1.0432964832)*x[1]+(0.645482523161)*x[2]
-        arg[2,1,2,0]=(-1.13098364088)*x[0]+(-0.932044089041)*x[1]+(-0.308053828241)*x[2]
-        arg[2,1,2,1]=(0.481961305459)*x[0]+(-0.101277472029)*x[1]+(-0.17520207974)*x[2]
-        arg[2,2,0,0]=(0.579831852303)*x[0]+(0.538731990254)*x[1]+(-0.0897460374205)*x[2]
-        arg[2,2,0,1]=(-1.8763181434)*x[0]+(-0.132710928569)*x[1]+(1.03169751651)*x[2]
-        arg[2,2,1,0]=(0.56871511431)*x[0]+(0.075333481656)*x[1]+(1.10238818953)*x[2]
-        arg[2,2,1,1]=(1.49347755246)*x[0]+(-1.00500941047)*x[1]+(-0.181733196359)*x[2]
-        arg[2,2,2,0]=(0.532881509971)*x[0]+(-0.364333964659)*x[1]+(1.09633720883)*x[2]
-        arg[2,2,2,1]=(-0.518419048615)*x[0]+(-0.48091100593)*x[1]+(0.724628840153)*x[2]
-        arg[2,3,0,0]=(0.353475859331)*x[0]+(-0.0239879269825)*x[1]+(1.32068893718)*x[2]
-        arg[2,3,0,1]=(0.553999122102)*x[0]+(-0.128530869239)*x[1]+(0.134663336287)*x[2]
-        arg[2,3,1,0]=(-1.59775882569)*x[0]+(-1.07335424785)*x[1]+(1.39223587988)*x[2]
-        arg[2,3,1,1]=(-0.921252080095)*x[0]+(1.46226299067)*x[1]+(-1.13412499932)*x[2]
-        arg[2,3,2,0]=(0.417572910178)*x[0]+(0.0814889599489)*x[1]+(0.292159249719)*x[2]
-        arg[2,3,2,1]=(1.44620228921)*x[0]+(0.767854577367)*x[1]+(-0.0113709806383)*x[2]
-        arg[2,4,0,0]=(-0.156987001681)*x[0]+(-0.922524257833)*x[1]+(0.521128360838)*x[2]
-        arg[2,4,0,1]=(0.154198133354)*x[0]+(0.462020370175)*x[1]+(0.966768653665)*x[2]
-        arg[2,4,1,0]=(0.507836849242)*x[0]+(1.16701911244)*x[1]+(0.264543038211)*x[2]
-        arg[2,4,1,1]=(0.452059436879)*x[0]+(0.409662432778)*x[1]+(-0.403800872595)*x[2]
-        arg[2,4,2,0]=(0.521175521008)*x[0]+(-0.362551578816)*x[1]+(0.0922727331623)*x[2]
-        arg[2,4,2,1]=(-1.0990361823)*x[0]+(1.73655146851)*x[1]+(-0.867917402922)*x[2]
-        arg[3,0,0,0]=(-0.0527010882236)*x[0]+(-1.11528215488)*x[1]+(1.3141906393)*x[2]
-        arg[3,0,0,1]=(0.151284271917)*x[0]+(-0.0159077450668)*x[1]+(1.1798338931)*x[2]
-        arg[3,0,1,0]=(-1.7648963435)*x[0]+(0.229511437402)*x[1]+(0.924415900312)*x[2]
-        arg[3,0,1,1]=(-0.498271821094)*x[0]+(1.58363063019)*x[1]+(1.64871750388)*x[2]
-        arg[3,0,2,0]=(-1.11245170725)*x[0]+(1.27662612569)*x[1]+(0.145950372369)*x[2]
-        arg[3,0,2,1]=(-0.691643924238)*x[0]+(-0.178211874279)*x[1]+(-0.341071050366)*x[2]
-        arg[3,1,0,0]=(-0.929804889461)*x[0]+(0.199087067309)*x[1]+(1.00150168883)*x[2]
-        arg[3,1,0,1]=(-1.25152265093)*x[0]+(0.517076294911)*x[1]+(0.103798312362)*x[2]
-        arg[3,1,1,0]=(0.797316290623)*x[0]+(0.0239285379293)*x[1]+(-0.836519299418)*x[2]
-        arg[3,1,1,1]=(-0.470084592176)*x[0]+(0.844364701728)*x[1]+(-0.027373275093)*x[2]
-        arg[3,1,2,0]=(1.0340279373)*x[0]+(-0.0133951276315)*x[1]+(1.17710546194)*x[2]
-        arg[3,1,2,1]=(0.0325929541496)*x[0]+(1.13784867184)*x[1]+(-0.0529194266769)*x[2]
-        arg[3,2,0,0]=(1.92837561772)*x[0]+(-1.63633468831)*x[1]+(1.4212324281)*x[2]
-        arg[3,2,0,1]=(1.09556054408)*x[0]+(1.43286059545)*x[1]+(1.20005604593)*x[2]
-        arg[3,2,1,0]=(0.308887169169)*x[0]+(-0.149214224208)*x[1]+(-1.13559614877)*x[2]
-        arg[3,2,1,1]=(-0.0648352909004)*x[0]+(-0.5645470596)*x[1]+(-0.525131730514)*x[2]
-        arg[3,2,2,0]=(0.21826829974)*x[0]+(1.5950239996)*x[1]+(0.333592425438)*x[2]
-        arg[3,2,2,1]=(-1.25613956172)*x[0]+(-0.242338679844)*x[1]+(-0.958875577074)*x[2]
-        arg[3,3,0,0]=(1.65005362159)*x[0]+(-1.16713867165)*x[1]+(-0.282495293685)*x[2]
-        arg[3,3,0,1]=(1.04854406427)*x[0]+(0.876270949531)*x[1]+(0.291036304743)*x[2]
-        arg[3,3,1,0]=(-1.66619451175)*x[0]+(0.656275192484)*x[1]+(-1.27104499942)*x[2]
-        arg[3,3,1,1]=(1.55407146907)*x[0]+(-0.322950943159)*x[1]+(-0.287565403896)*x[2]
-        arg[3,3,2,0]=(-1.54760268583)*x[0]+(-1.45847761887)*x[1]+(1.13939567009)*x[2]
-        arg[3,3,2,1]=(1.24632351699)*x[0]+(0.0265500081594)*x[1]+(1.61925095159)*x[2]
-        arg[3,4,0,0]=(-0.0430889433549)*x[0]+(-1.46995559463)*x[1]+(-1.14915159823)*x[2]
-        arg[3,4,0,1]=(0.0392641403409)*x[0]+(0.0603053049639)*x[1]+(0.647321169934)*x[2]
-        arg[3,4,1,0]=(-0.156300985227)*x[0]+(0.79369911928)*x[1]+(-0.413124762507)*x[2]
-        arg[3,4,1,1]=(0.258402059015)*x[0]+(0.00227307988585)*x[1]+(0.70067141295)*x[2]
-        arg[3,4,2,0]=(-1.15131298872)*x[0]+(-0.627449043157)*x[1]+(-0.402268345861)*x[2]
-        arg[3,4,2,1]=(0.455934238179)*x[0]+(-0.951120759108)*x[1]+(-0.280459367131)*x[2]
-        ref[0,0,0,0]=(-0.791620170192)*x_ref[0]+(1.03871460301)*x_ref[1]+(-0.225035657687)*x_ref[2]
-        ref[0,0,0,1]=(-0.464422319203)*x_ref[0]+(0.769454931053)*x_ref[1]+(-0.783260637771)*x_ref[2]
-        ref[0,0,1,0]=(0.72655538215)*x_ref[0]+(-1.65736312015)*x_ref[1]+(1.08402505927)*x_ref[2]
-        ref[0,0,1,1]=(-0.207576709573)*x_ref[0]+(-0.55250594761)*x_ref[1]+(-0.923702938288)*x_ref[2]
-        ref[0,0,2,0]=(-0.701991085516)*x_ref[0]+(-1.76863643107)*x_ref[1]+(0.831382933104)*x_ref[2]
-        ref[0,0,2,1]=(0.0640035527319)*x_ref[0]+(0.425446342976)*x_ref[1]+(1.64626766696)*x_ref[2]
-        ref[0,1,0,0]=(1.01022963801)*x_ref[0]+(-0.0215015059716)*x_ref[1]+(0.849862425592)*x_ref[2]
-        ref[0,1,0,1]=(-0.45776932943)*x_ref[0]+(0.7621342151)*x_ref[1]+(-1.40123018391)*x_ref[2]
-        ref[0,1,1,0]=(0.737485054127)*x_ref[0]+(-0.147513905858)*x_ref[1]+(-0.616928595213)*x_ref[2]
-        ref[0,1,1,1]=(-0.0608005391894)*x_ref[0]+(-0.154978210573)*x_ref[1]+(-1.40322011577)*x_ref[2]
-        ref[0,1,2,0]=(1.59908177714)*x_ref[0]+(-0.378738573932)*x_ref[1]+(1.45285315247)*x_ref[2]
-        ref[0,1,2,1]=(-0.622552157046)*x_ref[0]+(1.19996417516)*x_ref[1]+(0.728842900843)*x_ref[2]
-        ref[0,2,0,0]=(-0.46942034691)*x_ref[0]+(0.333309721372)*x_ref[1]+(-0.280846553832)*x_ref[2]
-        ref[0,2,0,1]=(1.22208788109)*x_ref[0]+(0.369339594285)*x_ref[1]+(1.31078425589)*x_ref[2]
-        ref[0,2,1,0]=(0.0794165004114)*x_ref[0]+(0.44665451846)*x_ref[1]+(-0.814625708916)*x_ref[2]
-        ref[0,2,1,1]=(0.594200807165)*x_ref[0]+(-0.00616720333193)*x_ref[1]+(0.382706175172)*x_ref[2]
-        ref[0,2,2,0]=(0.0372230170459)*x_ref[0]+(0.440339923291)*x_ref[1]+(0.137641070028)*x_ref[2]
-        ref[0,2,2,1]=(-1.29863078274)*x_ref[0]+(0.283142455171)*x_ref[1]+(0.0844540074659)*x_ref[2]
-        ref[0,3,0,0]=(1.72811808036)*x_ref[0]+(0.536456781522)*x_ref[1]+(0.0266737704706)*x_ref[2]
-        ref[0,3,0,1]=(0.148219555101)*x_ref[0]+(-0.6887500275)*x_ref[1]+(-0.405613136632)*x_ref[2]
-        ref[0,3,1,0]=(0.708262537279)*x_ref[0]+(1.16319635773)*x_ref[1]+(-0.030808721674)*x_ref[2]
-        ref[0,3,1,1]=(0.80834615863)*x_ref[0]+(-0.176789000925)*x_ref[1]+(-1.72576120963)*x_ref[2]
-        ref[0,3,2,0]=(0.21128315299)*x_ref[0]+(0.770037046126)*x_ref[1]+(0.988028934422)*x_ref[2]
-        ref[0,3,2,1]=(1.10522136317)*x_ref[0]+(1.6319351743)*x_ref[1]+(-0.784693713387)*x_ref[2]
-        ref[0,4,0,0]=(0.121088121064)*x_ref[0]+(-1.79718067791)*x_ref[1]+(-0.907857173318)*x_ref[2]
-        ref[0,4,0,1]=(-0.695887294217)*x_ref[0]+(-1.24166787807)*x_ref[1]+(-1.24968023856)*x_ref[2]
-        ref[0,4,1,0]=(-0.202510797291)*x_ref[0]+(0.628310156105)*x_ref[1]+(0.605146447822)*x_ref[2]
-        ref[0,4,1,1]=(0.149227458424)*x_ref[0]+(-1.5650392775)*x_ref[1]+(-0.763944892663)*x_ref[2]
-        ref[0,4,2,0]=(-0.393218625872)*x_ref[0]+(0.479145914948)*x_ref[1]+(-0.313960447492)*x_ref[2]
-        ref[0,4,2,1]=(-0.0191807443799)*x_ref[0]+(0.592992659119)*x_ref[1]+(-0.475633115484)*x_ref[2]
-        ref[1,0,0,0]=(-0.964829354261)*x_ref[0]+(0.453014802906)*x_ref[1]+(-0.779502566938)*x_ref[2]
-        ref[1,0,0,1]=(0.0151205739508)*x_ref[0]+(-0.153706429594)*x_ref[1]+(0.00866460475724)*x_ref[2]
-        ref[1,0,1,0]=(0.92592276366)*x_ref[0]+(0.530787400525)*x_ref[1]+(-0.0577912606876)*x_ref[2]
-        ref[1,0,1,1]=(0.948404467077)*x_ref[0]+(-0.265905470751)*x_ref[1]+(0.472349192005)*x_ref[2]
-        ref[1,0,2,0]=(0.0176615383702)*x_ref[0]+(0.679605821761)*x_ref[1]+(-0.0333590911941)*x_ref[2]
-        ref[1,0,2,1]=(-1.15594952629)*x_ref[0]+(0.264868376508)*x_ref[1]+(-0.883690535499)*x_ref[2]
-        ref[1,1,0,0]=(-0.738712703994)*x_ref[0]+(0.545839232808)*x_ref[1]+(0.592474501134)*x_ref[2]
-        ref[1,1,0,1]=(-1.3468960453)*x_ref[0]+(-0.00848202443614)*x_ref[1]+(-0.0124138286126)*x_ref[2]
-        ref[1,1,1,0]=(0.900228409707)*x_ref[0]+(-1.86848082357)*x_ref[1]+(0.421539431142)*x_ref[2]
-        ref[1,1,1,1]=(1.42754013963)*x_ref[0]+(-0.861376440449)*x_ref[1]+(0.0965520362291)*x_ref[2]
-        ref[1,1,2,0]=(-0.35873674515)*x_ref[0]+(0.0862592617941)*x_ref[1]+(-0.536106207025)*x_ref[2]
-        ref[1,1,2,1]=(0.90712910097)*x_ref[0]+(0.974545253055)*x_ref[1]+(0.570708510858)*x_ref[2]
-        ref[1,2,0,0]=(1.19310775669)*x_ref[0]+(0.309414331679)*x_ref[1]+(-0.271298061586)*x_ref[2]
-        ref[1,2,0,1]=(0.551778129545)*x_ref[0]+(0.539028430134)*x_ref[1]+(0.239406239262)*x_ref[2]
-        ref[1,2,1,0]=(-0.810625054344)*x_ref[0]+(-0.241072190233)*x_ref[1]+(-1.58590369097)*x_ref[2]
-        ref[1,2,1,1]=(0.529669075734)*x_ref[0]+(-0.890365024163)*x_ref[1]+(-1.69798509084)*x_ref[2]
-        ref[1,2,2,0]=(0.0437087707448)*x_ref[0]+(0.88372190198)*x_ref[1]+(1.86547747806)*x_ref[2]
-        ref[1,2,2,1]=(1.30739438898)*x_ref[0]+(0.315850112101)*x_ref[1]+(-0.262001133683)*x_ref[2]
-        ref[1,3,0,0]=(-0.143426236837)*x_ref[0]+(-1.1703384826)*x_ref[1]+(0.50608348646)*x_ref[2]
-        ref[1,3,0,1]=(-0.0444408776922)*x_ref[0]+(1.26952782036)*x_ref[1]+(1.67192602934)*x_ref[2]
-        ref[1,3,1,0]=(0.672742824368)*x_ref[0]+(-0.785246676537)*x_ref[1]+(0.716130664056)*x_ref[2]
-        ref[1,3,1,1]=(-0.295182508335)*x_ref[0]+(-1.53658860897)*x_ref[1]+(-1.87133995422)*x_ref[2]
-        ref[1,3,2,0]=(-0.440859530081)*x_ref[0]+(0.0730120015821)*x_ref[1]+(-1.02465537353)*x_ref[2]
-        ref[1,3,2,1]=(0.838320612003)*x_ref[0]+(1.81233688454)*x_ref[1]+(-1.0633876685)*x_ref[2]
-        ref[1,4,0,0]=(0.52440453051)*x_ref[0]+(-0.0182588999022)*x_ref[1]+(1.05556310351)*x_ref[2]
-        ref[1,4,0,1]=(0.766612727495)*x_ref[0]+(1.58987590746)*x_ref[1]+(-0.703801484569)*x_ref[2]
-        ref[1,4,1,0]=(0.373439757535)*x_ref[0]+(-0.0676963704305)*x_ref[1]+(0.0948034094293)*x_ref[2]
-        ref[1,4,1,1]=(-0.542283543375)*x_ref[0]+(-0.454408605761)*x_ref[1]+(-0.398904635316)*x_ref[2]
-        ref[1,4,2,0]=(1.3374871143)*x_ref[0]+(0.0067849394587)*x_ref[1]+(-0.319452094882)*x_ref[2]
-        ref[1,4,2,1]=(0.38530755393)*x_ref[0]+(1.05356462429)*x_ref[1]+(-0.302179447719)*x_ref[2]
-        ref[2,0,0,0]=(-0.123109761583)*x_ref[0]+(0.69223848143)*x_ref[1]+(-1.36903487092)*x_ref[2]
-        ref[2,0,0,1]=(0.121957328459)*x_ref[0]+(0.102229685387)*x_ref[1]+(0.962499974737)*x_ref[2]
-        ref[2,0,1,0]=(0.478614188653)*x_ref[0]+(-1.23058817023)*x_ref[1]+(1.30950997478)*x_ref[2]
-        ref[2,0,1,1]=(-0.529033562461)*x_ref[0]+(0.563030509591)*x_ref[1]+(-0.564939226654)*x_ref[2]
-        ref[2,0,2,0]=(-0.377740282406)*x_ref[0]+(1.20532110343)*x_ref[1]+(1.55615174947)*x_ref[2]
-        ref[2,0,2,1]=(0.539119710703)*x_ref[0]+(1.91771865857)*x_ref[1]+(0.0809882488048)*x_ref[2]
-        ref[2,1,0,0]=(0.00548664737796)*x_ref[0]+(-0.157716099068)*x_ref[1]+(-1.40009044235)*x_ref[2]
-        ref[2,1,0,1]=(0.0667557890666)*x_ref[0]+(0.742484448131)*x_ref[1]+(-0.325246111346)*x_ref[2]
-        ref[2,1,1,0]=(-0.214965474071)*x_ref[0]+(-0.215055151964)*x_ref[1]+(1.15673960537)*x_ref[2]
-        ref[2,1,1,1]=(0.605764831789)*x_ref[0]+(-1.0432964832)*x_ref[1]+(0.645482523161)*x_ref[2]
-        ref[2,1,2,0]=(-1.13098364088)*x_ref[0]+(-0.932044089041)*x_ref[1]+(-0.308053828241)*x_ref[2]
-        ref[2,1,2,1]=(0.481961305459)*x_ref[0]+(-0.101277472029)*x_ref[1]+(-0.17520207974)*x_ref[2]
-        ref[2,2,0,0]=(0.579831852303)*x_ref[0]+(0.538731990254)*x_ref[1]+(-0.0897460374205)*x_ref[2]
-        ref[2,2,0,1]=(-1.8763181434)*x_ref[0]+(-0.132710928569)*x_ref[1]+(1.03169751651)*x_ref[2]
-        ref[2,2,1,0]=(0.56871511431)*x_ref[0]+(0.075333481656)*x_ref[1]+(1.10238818953)*x_ref[2]
-        ref[2,2,1,1]=(1.49347755246)*x_ref[0]+(-1.00500941047)*x_ref[1]+(-0.181733196359)*x_ref[2]
-        ref[2,2,2,0]=(0.532881509971)*x_ref[0]+(-0.364333964659)*x_ref[1]+(1.09633720883)*x_ref[2]
-        ref[2,2,2,1]=(-0.518419048615)*x_ref[0]+(-0.48091100593)*x_ref[1]+(0.724628840153)*x_ref[2]
-        ref[2,3,0,0]=(0.353475859331)*x_ref[0]+(-0.0239879269825)*x_ref[1]+(1.32068893718)*x_ref[2]
-        ref[2,3,0,1]=(0.553999122102)*x_ref[0]+(-0.128530869239)*x_ref[1]+(0.134663336287)*x_ref[2]
-        ref[2,3,1,0]=(-1.59775882569)*x_ref[0]+(-1.07335424785)*x_ref[1]+(1.39223587988)*x_ref[2]
-        ref[2,3,1,1]=(-0.921252080095)*x_ref[0]+(1.46226299067)*x_ref[1]+(-1.13412499932)*x_ref[2]
-        ref[2,3,2,0]=(0.417572910178)*x_ref[0]+(0.0814889599489)*x_ref[1]+(0.292159249719)*x_ref[2]
-        ref[2,3,2,1]=(1.44620228921)*x_ref[0]+(0.767854577367)*x_ref[1]+(-0.0113709806383)*x_ref[2]
-        ref[2,4,0,0]=(-0.156987001681)*x_ref[0]+(-0.922524257833)*x_ref[1]+(0.521128360838)*x_ref[2]
-        ref[2,4,0,1]=(0.154198133354)*x_ref[0]+(0.462020370175)*x_ref[1]+(0.966768653665)*x_ref[2]
-        ref[2,4,1,0]=(0.507836849242)*x_ref[0]+(1.16701911244)*x_ref[1]+(0.264543038211)*x_ref[2]
-        ref[2,4,1,1]=(0.452059436879)*x_ref[0]+(0.409662432778)*x_ref[1]+(-0.403800872595)*x_ref[2]
-        ref[2,4,2,0]=(0.521175521008)*x_ref[0]+(-0.362551578816)*x_ref[1]+(0.0922727331623)*x_ref[2]
-        ref[2,4,2,1]=(-1.0990361823)*x_ref[0]+(1.73655146851)*x_ref[1]+(-0.867917402922)*x_ref[2]
-        ref[3,0,0,0]=(-0.0527010882236)*x_ref[0]+(-1.11528215488)*x_ref[1]+(1.3141906393)*x_ref[2]
-        ref[3,0,0,1]=(0.151284271917)*x_ref[0]+(-0.0159077450668)*x_ref[1]+(1.1798338931)*x_ref[2]
-        ref[3,0,1,0]=(-1.7648963435)*x_ref[0]+(0.229511437402)*x_ref[1]+(0.924415900312)*x_ref[2]
-        ref[3,0,1,1]=(-0.498271821094)*x_ref[0]+(1.58363063019)*x_ref[1]+(1.64871750388)*x_ref[2]
-        ref[3,0,2,0]=(-1.11245170725)*x_ref[0]+(1.27662612569)*x_ref[1]+(0.145950372369)*x_ref[2]
-        ref[3,0,2,1]=(-0.691643924238)*x_ref[0]+(-0.178211874279)*x_ref[1]+(-0.341071050366)*x_ref[2]
-        ref[3,1,0,0]=(-0.929804889461)*x_ref[0]+(0.199087067309)*x_ref[1]+(1.00150168883)*x_ref[2]
-        ref[3,1,0,1]=(-1.25152265093)*x_ref[0]+(0.517076294911)*x_ref[1]+(0.103798312362)*x_ref[2]
-        ref[3,1,1,0]=(0.797316290623)*x_ref[0]+(0.0239285379293)*x_ref[1]+(-0.836519299418)*x_ref[2]
-        ref[3,1,1,1]=(-0.470084592176)*x_ref[0]+(0.844364701728)*x_ref[1]+(-0.027373275093)*x_ref[2]
-        ref[3,1,2,0]=(1.0340279373)*x_ref[0]+(-0.0133951276315)*x_ref[1]+(1.17710546194)*x_ref[2]
-        ref[3,1,2,1]=(0.0325929541496)*x_ref[0]+(1.13784867184)*x_ref[1]+(-0.0529194266769)*x_ref[2]
-        ref[3,2,0,0]=(1.92837561772)*x_ref[0]+(-1.63633468831)*x_ref[1]+(1.4212324281)*x_ref[2]
-        ref[3,2,0,1]=(1.09556054408)*x_ref[0]+(1.43286059545)*x_ref[1]+(1.20005604593)*x_ref[2]
-        ref[3,2,1,0]=(0.308887169169)*x_ref[0]+(-0.149214224208)*x_ref[1]+(-1.13559614877)*x_ref[2]
-        ref[3,2,1,1]=(-0.0648352909004)*x_ref[0]+(-0.5645470596)*x_ref[1]+(-0.525131730514)*x_ref[2]
-        ref[3,2,2,0]=(0.21826829974)*x_ref[0]+(1.5950239996)*x_ref[1]+(0.333592425438)*x_ref[2]
-        ref[3,2,2,1]=(-1.25613956172)*x_ref[0]+(-0.242338679844)*x_ref[1]+(-0.958875577074)*x_ref[2]
-        ref[3,3,0,0]=(1.65005362159)*x_ref[0]+(-1.16713867165)*x_ref[1]+(-0.282495293685)*x_ref[2]
-        ref[3,3,0,1]=(1.04854406427)*x_ref[0]+(0.876270949531)*x_ref[1]+(0.291036304743)*x_ref[2]
-        ref[3,3,1,0]=(-1.66619451175)*x_ref[0]+(0.656275192484)*x_ref[1]+(-1.27104499942)*x_ref[2]
-        ref[3,3,1,1]=(1.55407146907)*x_ref[0]+(-0.322950943159)*x_ref[1]+(-0.287565403896)*x_ref[2]
-        ref[3,3,2,0]=(-1.54760268583)*x_ref[0]+(-1.45847761887)*x_ref[1]+(1.13939567009)*x_ref[2]
-        ref[3,3,2,1]=(1.24632351699)*x_ref[0]+(0.0265500081594)*x_ref[1]+(1.61925095159)*x_ref[2]
-        ref[3,4,0,0]=(-0.0430889433549)*x_ref[0]+(-1.46995559463)*x_ref[1]+(-1.14915159823)*x_ref[2]
-        ref[3,4,0,1]=(0.0392641403409)*x_ref[0]+(0.0603053049639)*x_ref[1]+(0.647321169934)*x_ref[2]
-        ref[3,4,1,0]=(-0.156300985227)*x_ref[0]+(0.79369911928)*x_ref[1]+(-0.413124762507)*x_ref[2]
-        ref[3,4,1,1]=(0.258402059015)*x_ref[0]+(0.00227307988585)*x_ref[1]+(0.70067141295)*x_ref[2]
-        ref[3,4,2,0]=(-1.15131298872)*x_ref[0]+(-0.627449043157)*x_ref[1]+(-0.402268345861)*x_ref[2]
-        ref[3,4,2,1]=(0.455934238179)*x_ref[0]+(-0.951120759108)*x_ref[1]+(-0.280459367131)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.787646538574)*x[0]+(0.912422904218)*x[1]
-        ref=(-0.787646538574)*x_ref[0]+(0.912422904218)*x_ref[1]
-      else:
-        arg=(0.934044939024)*x[0]+(0.628477728603)*x[1]+(-0.786339405837)*x[2]
-        ref=(0.934044939024)*x_ref[0]+(0.628477728603)*x_ref[1]+(-0.786339405837)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        arg[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-        ref[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        ref[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-      else:
-        arg[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        arg[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-        ref[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        ref[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.797066914479)*x[0]+(-0.0269853164939)*x[1]
-        arg[0,1]=(-1.07443661798)*x[0]+(0.818510216043)*x[1]
-        arg[0,2]=(0.398735262179)*x[0]+(-0.580387872083)*x[1]
-        arg[0,3]=(-0.003185613959)*x[0]+(-0.670506330615)*x[1]
-        arg[0,4]=(0.385009570186)*x[0]+(0.858570512936)*x[1]
-        arg[1,0]=(1.60917176753)*x[0]+(-0.0866362449992)*x[1]
-        arg[1,1]=(-0.883782122452)*x[0]+(-0.402187705578)*x[1]
-        arg[1,2]=(0.153893095122)*x[0]+(-1.19636362644)*x[1]
-        arg[1,3]=(1.92041961031)*x[0]+(0.325857877636)*x[1]
-        arg[1,4]=(-0.0947698843729)*x[0]+(-0.0663785758627)*x[1]
-        arg[2,0]=(0.0232949467051)*x[0]+(1.60134210326)*x[1]
-        arg[2,1]=(-0.521182882924)*x[0]+(-0.507401571343)*x[1]
-        arg[2,2]=(0.833797117616)*x[0]+(-0.268886477194)*x[1]
-        arg[2,3]=(-0.867762611227)*x[0]+(1.03727088566)*x[1]
-        arg[2,4]=(0.380510651918)*x[0]+(0.350246888456)*x[1]
-        arg[3,0]=(-1.10155500839)*x[0]+(0.414683749118)*x[1]
-        arg[3,1]=(-0.0306733233552)*x[0]+(-0.351251014237)*x[1]
-        arg[3,2]=(-0.0708773001498)*x[0]+(-0.326636587948)*x[1]
-        arg[3,3]=(-1.32553119895)*x[0]+(-1.5852157477)*x[1]
-        arg[3,4]=(1.40177154802)*x[0]+(-1.24804787994)*x[1]
-        ref[0,0]=(-0.797066914479)*x_ref[0]+(-0.0269853164939)*x_ref[1]
-        ref[0,1]=(-1.07443661798)*x_ref[0]+(0.818510216043)*x_ref[1]
-        ref[0,2]=(0.398735262179)*x_ref[0]+(-0.580387872083)*x_ref[1]
-        ref[0,3]=(-0.003185613959)*x_ref[0]+(-0.670506330615)*x_ref[1]
-        ref[0,4]=(0.385009570186)*x_ref[0]+(0.858570512936)*x_ref[1]
-        ref[1,0]=(1.60917176753)*x_ref[0]+(-0.0866362449992)*x_ref[1]
-        ref[1,1]=(-0.883782122452)*x_ref[0]+(-0.402187705578)*x_ref[1]
-        ref[1,2]=(0.153893095122)*x_ref[0]+(-1.19636362644)*x_ref[1]
-        ref[1,3]=(1.92041961031)*x_ref[0]+(0.325857877636)*x_ref[1]
-        ref[1,4]=(-0.0947698843729)*x_ref[0]+(-0.0663785758627)*x_ref[1]
-        ref[2,0]=(0.0232949467051)*x_ref[0]+(1.60134210326)*x_ref[1]
-        ref[2,1]=(-0.521182882924)*x_ref[0]+(-0.507401571343)*x_ref[1]
-        ref[2,2]=(0.833797117616)*x_ref[0]+(-0.268886477194)*x_ref[1]
-        ref[2,3]=(-0.867762611227)*x_ref[0]+(1.03727088566)*x_ref[1]
-        ref[2,4]=(0.380510651918)*x_ref[0]+(0.350246888456)*x_ref[1]
-        ref[3,0]=(-1.10155500839)*x_ref[0]+(0.414683749118)*x_ref[1]
-        ref[3,1]=(-0.0306733233552)*x_ref[0]+(-0.351251014237)*x_ref[1]
-        ref[3,2]=(-0.0708773001498)*x_ref[0]+(-0.326636587948)*x_ref[1]
-        ref[3,3]=(-1.32553119895)*x_ref[0]+(-1.5852157477)*x_ref[1]
-        ref[3,4]=(1.40177154802)*x_ref[0]+(-1.24804787994)*x_ref[1]
-      else:
-        arg[0,0]=(0.000362194678523)*x[0]+(-1.63949220671)*x[1]+(-0.176997156562)*x[2]
-        arg[0,1]=(-0.357589049408)*x[0]+(0.828191515325)*x[1]+(-0.269706780136)*x[2]
-        arg[0,2]=(0.886395070544)*x[0]+(0.815688451839)*x[1]+(-0.658412270558)*x[2]
-        arg[0,3]=(-0.222573318026)*x[0]+(0.137763803092)*x[1]+(0.171902150187)*x[2]
-        arg[0,4]=(1.05159741251)*x[0]+(0.923836841038)*x[1]+(-0.426590801731)*x[2]
-        arg[1,0]=(-0.00718419057788)*x[0]+(1.55809964998)*x[1]+(-0.912766657496)*x[2]
-        arg[1,1]=(1.30769045785)*x[0]+(-0.0356609338389)*x[1]+(0.214543084134)*x[2]
-        arg[1,2]=(-1.56763014241)*x[0]+(-0.582970995722)*x[1]+(-0.513972924752)*x[2]
-        arg[1,3]=(0.118027736928)*x[0]+(-0.28795014876)*x[1]+(0.620718623034)*x[2]
-        arg[1,4]=(-0.784496170193)*x[0]+(0.233037866924)*x[1]+(-0.0500718134572)*x[2]
-        arg[2,0]=(0.800851281806)*x[0]+(0.219346484846)*x[1]+(1.19125787701)*x[2]
-        arg[2,1]=(-1.45025879429)*x[0]+(-1.32011538154)*x[1]+(0.47946669308)*x[2]
-        arg[2,2]=(-0.231377110469)*x[0]+(-0.921551695999)*x[1]+(-0.298964635841)*x[2]
-        arg[2,3]=(0.965766335546)*x[0]+(0.424791610089)*x[1]+(1.01860652092)*x[2]
-        arg[2,4]=(0.676247093636)*x[0]+(-1.50802741511)*x[1]+(0.0385960918391)*x[2]
-        arg[3,0]=(0.322378151756)*x[0]+(-0.483633005509)*x[1]+(-0.852371707865)*x[2]
-        arg[3,1]=(-0.241998307153)*x[0]+(-1.08134340082)*x[1]+(-0.849574532537)*x[2]
-        arg[3,2]=(-0.0185751405467)*x[0]+(0.179558416001)*x[1]+(-0.488727308548)*x[2]
-        arg[3,3]=(0.0984555057845)*x[0]+(1.03085967788)*x[1]+(-0.357009094371)*x[2]
-        arg[3,4]=(0.430593980121)*x[0]+(0.689565614489)*x[1]+(-0.0916541808491)*x[2]
-        ref[0,0]=(0.000362194678523)*x_ref[0]+(-1.63949220671)*x_ref[1]+(-0.176997156562)*x_ref[2]
-        ref[0,1]=(-0.357589049408)*x_ref[0]+(0.828191515325)*x_ref[1]+(-0.269706780136)*x_ref[2]
-        ref[0,2]=(0.886395070544)*x_ref[0]+(0.815688451839)*x_ref[1]+(-0.658412270558)*x_ref[2]
-        ref[0,3]=(-0.222573318026)*x_ref[0]+(0.137763803092)*x_ref[1]+(0.171902150187)*x_ref[2]
-        ref[0,4]=(1.05159741251)*x_ref[0]+(0.923836841038)*x_ref[1]+(-0.426590801731)*x_ref[2]
-        ref[1,0]=(-0.00718419057788)*x_ref[0]+(1.55809964998)*x_ref[1]+(-0.912766657496)*x_ref[2]
-        ref[1,1]=(1.30769045785)*x_ref[0]+(-0.0356609338389)*x_ref[1]+(0.214543084134)*x_ref[2]
-        ref[1,2]=(-1.56763014241)*x_ref[0]+(-0.582970995722)*x_ref[1]+(-0.513972924752)*x_ref[2]
-        ref[1,3]=(0.118027736928)*x_ref[0]+(-0.28795014876)*x_ref[1]+(0.620718623034)*x_ref[2]
-        ref[1,4]=(-0.784496170193)*x_ref[0]+(0.233037866924)*x_ref[1]+(-0.0500718134572)*x_ref[2]
-        ref[2,0]=(0.800851281806)*x_ref[0]+(0.219346484846)*x_ref[1]+(1.19125787701)*x_ref[2]
-        ref[2,1]=(-1.45025879429)*x_ref[0]+(-1.32011538154)*x_ref[1]+(0.47946669308)*x_ref[2]
-        ref[2,2]=(-0.231377110469)*x_ref[0]+(-0.921551695999)*x_ref[1]+(-0.298964635841)*x_ref[2]
-        ref[2,3]=(0.965766335546)*x_ref[0]+(0.424791610089)*x_ref[1]+(1.01860652092)*x_ref[2]
-        ref[2,4]=(0.676247093636)*x_ref[0]+(-1.50802741511)*x_ref[1]+(0.0385960918391)*x_ref[2]
-        ref[3,0]=(0.322378151756)*x_ref[0]+(-0.483633005509)*x_ref[1]+(-0.852371707865)*x_ref[2]
-        ref[3,1]=(-0.241998307153)*x_ref[0]+(-1.08134340082)*x_ref[1]+(-0.849574532537)*x_ref[2]
-        ref[3,2]=(-0.0185751405467)*x_ref[0]+(0.179558416001)*x_ref[1]+(-0.488727308548)*x_ref[2]
-        ref[3,3]=(0.0984555057845)*x_ref[0]+(1.03085967788)*x_ref[1]+(-0.357009094371)*x_ref[2]
-        ref[3,4]=(0.430593980121)*x_ref[0]+(0.689565614489)*x_ref[1]+(-0.0916541808491)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0641544023301)*x[0]+(0.364286357763)*x[1]
-        arg[0,0,1]=(-0.858288240411)*x[0]+(-0.847764393559)*x[1]
-        arg[0,1,0]=(-0.656948775029)*x[0]+(1.69748608992)*x[1]
-        arg[0,1,1]=(0.579399191549)*x[0]+(1.48407368783)*x[1]
-        arg[1,0,0]=(-0.35948657403)*x[0]+(0.795436090765)*x[1]
-        arg[1,0,1]=(-1.32807156246)*x[0]+(0.921960610294)*x[1]
-        arg[1,1,0]=(1.0904085219)*x[0]+(-1.41870997296)*x[1]
-        arg[1,1,1]=(-0.677691596793)*x[0]+(-0.395373706333)*x[1]
-        arg[2,0,0]=(0.295591917216)*x[0]+(-1.75550830457)*x[1]
-        arg[2,0,1]=(0.506665326626)*x[0]+(0.273265713965)*x[1]
-        arg[2,1,0]=(0.543899865352)*x[0]+(-0.0678457091657)*x[1]
-        arg[2,1,1]=(-0.887824769535)*x[0]+(0.527475538055)*x[1]
-        arg[3,0,0]=(-0.788511557365)*x[0]+(-0.635972100675)*x[1]
-        arg[3,0,1]=(-1.02799066459)*x[0]+(-0.416241247725)*x[1]
-        arg[3,1,0]=(-0.310072483091)*x[0]+(1.2445160445)*x[1]
-        arg[3,1,1]=(0.912462196567)*x[0]+(0.631855269783)*x[1]
-        arg[4,0,0]=(0.700426861807)*x[0]+(-0.491365913713)*x[1]
-        arg[4,0,1]=(0.628791538338)*x[0]+(0.640767645586)*x[1]
-        arg[4,1,0]=(0.370886720329)*x[0]+(0.823663448834)*x[1]
-        arg[4,1,1]=(1.75857310774)*x[0]+(0.445439424641)*x[1]
-        arg[5,0,0]=(1.39637385066)*x[0]+(-0.812211860169)*x[1]
-        arg[5,0,1]=(0.865050350195)*x[0]+(-1.25983380375)*x[1]
-        arg[5,1,0]=(-0.0429057645445)*x[0]+(-1.08490578934)*x[1]
-        arg[5,1,1]=(1.42851264594)*x[0]+(1.52192971749)*x[1]
-        ref[0,0,0]=(-0.0641544023301)*x_ref[0]+(0.364286357763)*x_ref[1]
-        ref[0,0,1]=(-0.858288240411)*x_ref[0]+(-0.847764393559)*x_ref[1]
-        ref[0,1,0]=(-0.656948775029)*x_ref[0]+(1.69748608992)*x_ref[1]
-        ref[0,1,1]=(0.579399191549)*x_ref[0]+(1.48407368783)*x_ref[1]
-        ref[1,0,0]=(-0.35948657403)*x_ref[0]+(0.795436090765)*x_ref[1]
-        ref[1,0,1]=(-1.32807156246)*x_ref[0]+(0.921960610294)*x_ref[1]
-        ref[1,1,0]=(1.0904085219)*x_ref[0]+(-1.41870997296)*x_ref[1]
-        ref[1,1,1]=(-0.677691596793)*x_ref[0]+(-0.395373706333)*x_ref[1]
-        ref[2,0,0]=(0.295591917216)*x_ref[0]+(-1.75550830457)*x_ref[1]
-        ref[2,0,1]=(0.506665326626)*x_ref[0]+(0.273265713965)*x_ref[1]
-        ref[2,1,0]=(0.543899865352)*x_ref[0]+(-0.0678457091657)*x_ref[1]
-        ref[2,1,1]=(-0.887824769535)*x_ref[0]+(0.527475538055)*x_ref[1]
-        ref[3,0,0]=(-0.788511557365)*x_ref[0]+(-0.635972100675)*x_ref[1]
-        ref[3,0,1]=(-1.02799066459)*x_ref[0]+(-0.416241247725)*x_ref[1]
-        ref[3,1,0]=(-0.310072483091)*x_ref[0]+(1.2445160445)*x_ref[1]
-        ref[3,1,1]=(0.912462196567)*x_ref[0]+(0.631855269783)*x_ref[1]
-        ref[4,0,0]=(0.700426861807)*x_ref[0]+(-0.491365913713)*x_ref[1]
-        ref[4,0,1]=(0.628791538338)*x_ref[0]+(0.640767645586)*x_ref[1]
-        ref[4,1,0]=(0.370886720329)*x_ref[0]+(0.823663448834)*x_ref[1]
-        ref[4,1,1]=(1.75857310774)*x_ref[0]+(0.445439424641)*x_ref[1]
-        ref[5,0,0]=(1.39637385066)*x_ref[0]+(-0.812211860169)*x_ref[1]
-        ref[5,0,1]=(0.865050350195)*x_ref[0]+(-1.25983380375)*x_ref[1]
-        ref[5,1,0]=(-0.0429057645445)*x_ref[0]+(-1.08490578934)*x_ref[1]
-        ref[5,1,1]=(1.42851264594)*x_ref[0]+(1.52192971749)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.731194732468)*x[0]+(-0.0822115660022)*x[1]+(-0.403175091289)*x[2]
-        arg[0,0,1]=(0.39292230307)*x[0]+(1.48598681615)*x[1]+(1.05545374107)*x[2]
-        arg[0,1,0]=(0.306844260706)*x[0]+(0.836496026763)*x[1]+(-0.121120983155)*x[2]
-        arg[0,1,1]=(-0.155245802062)*x[0]+(0.800232934864)*x[1]+(0.373397160636)*x[2]
-        arg[1,0,0]=(0.155941790359)*x[0]+(0.826821969281)*x[1]+(0.849596807425)*x[2]
-        arg[1,0,1]=(-0.0988854656187)*x[0]+(-0.855032499842)*x[1]+(0.141988288566)*x[2]
-        arg[1,1,0]=(-0.761032539296)*x[0]+(-0.0892979073234)*x[1]+(1.93034385132)*x[2]
-        arg[1,1,1]=(-1.08303603558)*x[0]+(-0.487250117659)*x[1]+(0.0358501036173)*x[2]
-        arg[2,0,0]=(0.148391465413)*x[0]+(-0.731963025625)*x[1]+(0.484236965689)*x[2]
-        arg[2,0,1]=(1.06691217722)*x[0]+(-0.638095266244)*x[1]+(-0.971838410779)*x[2]
-        arg[2,1,0]=(-0.377750829061)*x[0]+(-0.101467967263)*x[1]+(-1.54241387349)*x[2]
-        arg[2,1,1]=(0.62210350231)*x[0]+(0.0435334873911)*x[1]+(-0.299303646623)*x[2]
-        arg[3,0,0]=(0.523811147108)*x[0]+(-1.09709839108)*x[1]+(1.83592280935)*x[2]
-        arg[3,0,1]=(0.957738143475)*x[0]+(0.282158440867)*x[1]+(0.621694180522)*x[2]
-        arg[3,1,0]=(0.366557891822)*x[0]+(0.812194047631)*x[1]+(-0.245067876349)*x[2]
-        arg[3,1,1]=(0.604859464982)*x[0]+(1.08415514854)*x[1]+(-1.470128848)*x[2]
-        arg[4,0,0]=(-0.13031502499)*x[0]+(-1.20707238733)*x[1]+(0.108382497552)*x[2]
-        arg[4,0,1]=(1.30453246317)*x[0]+(1.59696612588)*x[1]+(-0.234259043697)*x[2]
-        arg[4,1,0]=(-0.233494640836)*x[0]+(1.10701061816)*x[1]+(-0.409927013674)*x[2]
-        arg[4,1,1]=(0.102708240266)*x[0]+(-0.381598345002)*x[1]+(-1.39077748656)*x[2]
-        arg[5,0,0]=(1.06217404493)*x[0]+(1.1600791444)*x[1]+(-1.45242735389)*x[2]
-        arg[5,0,1]=(-0.423024189506)*x[0]+(-0.0868948651641)*x[1]+(0.0894539043522)*x[2]
-        arg[5,1,0]=(1.17650613067)*x[0]+(0.993832919965)*x[1]+(1.16546768569)*x[2]
-        arg[5,1,1]=(-0.61549132897)*x[0]+(-0.499619662734)*x[1]+(-0.643422281669)*x[2]
-        ref[0,0,0]=(0.731194732468)*x_ref[0]+(-0.0822115660022)*x_ref[1]+(-0.403175091289)*x_ref[2]
-        ref[0,0,1]=(0.39292230307)*x_ref[0]+(1.48598681615)*x_ref[1]+(1.05545374107)*x_ref[2]
-        ref[0,1,0]=(0.306844260706)*x_ref[0]+(0.836496026763)*x_ref[1]+(-0.121120983155)*x_ref[2]
-        ref[0,1,1]=(-0.155245802062)*x_ref[0]+(0.800232934864)*x_ref[1]+(0.373397160636)*x_ref[2]
-        ref[1,0,0]=(0.155941790359)*x_ref[0]+(0.826821969281)*x_ref[1]+(0.849596807425)*x_ref[2]
-        ref[1,0,1]=(-0.0988854656187)*x_ref[0]+(-0.855032499842)*x_ref[1]+(0.141988288566)*x_ref[2]
-        ref[1,1,0]=(-0.761032539296)*x_ref[0]+(-0.0892979073234)*x_ref[1]+(1.93034385132)*x_ref[2]
-        ref[1,1,1]=(-1.08303603558)*x_ref[0]+(-0.487250117659)*x_ref[1]+(0.0358501036173)*x_ref[2]
-        ref[2,0,0]=(0.148391465413)*x_ref[0]+(-0.731963025625)*x_ref[1]+(0.484236965689)*x_ref[2]
-        ref[2,0,1]=(1.06691217722)*x_ref[0]+(-0.638095266244)*x_ref[1]+(-0.971838410779)*x_ref[2]
-        ref[2,1,0]=(-0.377750829061)*x_ref[0]+(-0.101467967263)*x_ref[1]+(-1.54241387349)*x_ref[2]
-        ref[2,1,1]=(0.62210350231)*x_ref[0]+(0.0435334873911)*x_ref[1]+(-0.299303646623)*x_ref[2]
-        ref[3,0,0]=(0.523811147108)*x_ref[0]+(-1.09709839108)*x_ref[1]+(1.83592280935)*x_ref[2]
-        ref[3,0,1]=(0.957738143475)*x_ref[0]+(0.282158440867)*x_ref[1]+(0.621694180522)*x_ref[2]
-        ref[3,1,0]=(0.366557891822)*x_ref[0]+(0.812194047631)*x_ref[1]+(-0.245067876349)*x_ref[2]
-        ref[3,1,1]=(0.604859464982)*x_ref[0]+(1.08415514854)*x_ref[1]+(-1.470128848)*x_ref[2]
-        ref[4,0,0]=(-0.13031502499)*x_ref[0]+(-1.20707238733)*x_ref[1]+(0.108382497552)*x_ref[2]
-        ref[4,0,1]=(1.30453246317)*x_ref[0]+(1.59696612588)*x_ref[1]+(-0.234259043697)*x_ref[2]
-        ref[4,1,0]=(-0.233494640836)*x_ref[0]+(1.10701061816)*x_ref[1]+(-0.409927013674)*x_ref[2]
-        ref[4,1,1]=(0.102708240266)*x_ref[0]+(-0.381598345002)*x_ref[1]+(-1.39077748656)*x_ref[2]
-        ref[5,0,0]=(1.06217404493)*x_ref[0]+(1.1600791444)*x_ref[1]+(-1.45242735389)*x_ref[2]
-        ref[5,0,1]=(-0.423024189506)*x_ref[0]+(-0.0868948651641)*x_ref[1]+(0.0894539043522)*x_ref[2]
-        ref[5,1,0]=(1.17650613067)*x_ref[0]+(0.993832919965)*x_ref[1]+(1.16546768569)*x_ref[2]
-        ref[5,1,1]=(-0.61549132897)*x_ref[0]+(-0.499619662734)*x_ref[1]+(-0.643422281669)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.227969627252)*x[0]+(0.778177350248)*x[1]
-        arg[0,0,0,1]=(-0.684883711494)*x[0]+(-0.574285957132)*x[1]
-        arg[0,0,1,0]=(0.483090608974)*x[0]+(0.0779929087959)*x[1]
-        arg[0,0,1,1]=(-0.293150814932)*x[0]+(1.35368931993)*x[1]
-        arg[0,0,2,0]=(-0.190664734662)*x[0]+(0.910883386754)*x[1]
-        arg[0,0,2,1]=(-1.51255575457)*x[0]+(0.421560181501)*x[1]
-        arg[0,1,0,0]=(-0.833402828032)*x[0]+(-0.400466806781)*x[1]
-        arg[0,1,0,1]=(-0.212099323605)*x[0]+(-0.112478697221)*x[1]
-        arg[0,1,1,0]=(0.57687662926)*x[0]+(0.869758954551)*x[1]
-        arg[0,1,1,1]=(1.37261769917)*x[0]+(1.37855789907)*x[1]
-        arg[0,1,2,0]=(-1.02838589722)*x[0]+(-0.280409246204)*x[1]
-        arg[0,1,2,1]=(1.2333373468)*x[0]+(0.337631183798)*x[1]
-        arg[0,2,0,0]=(-0.249065448772)*x[0]+(0.834483646317)*x[1]
-        arg[0,2,0,1]=(-1.30860297683)*x[0]+(-0.653929967017)*x[1]
-        arg[0,2,1,0]=(-0.0155994484453)*x[0]+(-0.274023166937)*x[1]
-        arg[0,2,1,1]=(0.31458360335)*x[0]+(1.59507700673)*x[1]
-        arg[0,2,2,0]=(-0.11442619553)*x[0]+(1.6577028576)*x[1]
-        arg[0,2,2,1]=(0.274261132032)*x[0]+(1.15236962479)*x[1]
-        arg[0,3,0,0]=(1.91433860239)*x[0]+(-0.316349747811)*x[1]
-        arg[0,3,0,1]=(-1.42457591054)*x[0]+(-0.362812690805)*x[1]
-        arg[0,3,1,0]=(0.572734883096)*x[0]+(0.424724787283)*x[1]
-        arg[0,3,1,1]=(-0.118538376813)*x[0]+(0.25190312527)*x[1]
-        arg[0,3,2,0]=(-0.533409510081)*x[0]+(-0.804349107915)*x[1]
-        arg[0,3,2,1]=(-0.290555363666)*x[0]+(-0.912641477145)*x[1]
-        arg[0,4,0,0]=(-0.469612775918)*x[0]+(-0.0447411310793)*x[1]
-        arg[0,4,0,1]=(0.108538258831)*x[0]+(0.0453962016662)*x[1]
-        arg[0,4,1,0]=(-0.130785944028)*x[0]+(0.0887280914032)*x[1]
-        arg[0,4,1,1]=(0.166412309585)*x[0]+(-0.75130797706)*x[1]
-        arg[0,4,2,0]=(1.22538232455)*x[0]+(0.112925588343)*x[1]
-        arg[0,4,2,1]=(-1.02455171854)*x[0]+(-0.725754942749)*x[1]
-        arg[1,0,0,0]=(-0.869171086952)*x[0]+(-0.948876783682)*x[1]
-        arg[1,0,0,1]=(0.17730673689)*x[0]+(-0.00166180855579)*x[1]
-        arg[1,0,1,0]=(0.482072704433)*x[0]+(0.895847096783)*x[1]
-        arg[1,0,1,1]=(0.695736834617)*x[0]+(0.358082704558)*x[1]
-        arg[1,0,2,0]=(-0.501799636565)*x[0]+(0.363612558025)*x[1]
-        arg[1,0,2,1]=(-1.47204447226)*x[0]+(1.91281426121)*x[1]
-        arg[1,1,0,0]=(0.241893182978)*x[0]+(0.95199758669)*x[1]
-        arg[1,1,0,1]=(-0.68112361827)*x[0]+(-0.241935141301)*x[1]
-        arg[1,1,1,0]=(-0.553030972306)*x[0]+(0.0244503690439)*x[1]
-        arg[1,1,1,1]=(0.278177176896)*x[0]+(1.58693846427)*x[1]
-        arg[1,1,2,0]=(-0.87980015517)*x[0]+(0.315618837123)*x[1]
-        arg[1,1,2,1]=(-0.335783961379)*x[0]+(0.368650136138)*x[1]
-        arg[1,2,0,0]=(-0.903535146802)*x[0]+(1.68182923194)*x[1]
-        arg[1,2,0,1]=(1.06511511382)*x[0]+(-1.08524762302)*x[1]
-        arg[1,2,1,0]=(-0.0455274784681)*x[0]+(-0.519576710661)*x[1]
-        arg[1,2,1,1]=(0.735100217062)*x[0]+(-0.986268682671)*x[1]
-        arg[1,2,2,0]=(-0.544610797462)*x[0]+(0.447237114882)*x[1]
-        arg[1,2,2,1]=(0.385242031153)*x[0]+(-0.960538844247)*x[1]
-        arg[1,3,0,0]=(-0.354927072897)*x[0]+(0.842574324062)*x[1]
-        arg[1,3,0,1]=(0.319036427919)*x[0]+(-0.156282262536)*x[1]
-        arg[1,3,1,0]=(0.587123807717)*x[0]+(1.65277990726)*x[1]
-        arg[1,3,1,1]=(0.791697370298)*x[0]+(-1.5681680344)*x[1]
-        arg[1,3,2,0]=(-1.41931242045)*x[0]+(0.351285136557)*x[1]
-        arg[1,3,2,1]=(0.53175704402)*x[0]+(0.987523241324)*x[1]
-        arg[1,4,0,0]=(0.00533504818465)*x[0]+(-0.158886930817)*x[1]
-        arg[1,4,0,1]=(1.23725297303)*x[0]+(-0.302896452172)*x[1]
-        arg[1,4,1,0]=(0.433953146329)*x[0]+(-0.0721602234887)*x[1]
-        arg[1,4,1,1]=(-0.383499726865)*x[0]+(-0.253834671235)*x[1]
-        arg[1,4,2,0]=(-0.480776695247)*x[0]+(-0.302145524759)*x[1]
-        arg[1,4,2,1]=(1.14113180903)*x[0]+(-1.24304726003)*x[1]
-        arg[2,0,0,0]=(0.513776013893)*x[0]+(-0.16660259885)*x[1]
-        arg[2,0,0,1]=(1.55739209698)*x[0]+(0.0524084654531)*x[1]
-        arg[2,0,1,0]=(0.222567881446)*x[0]+(-0.357158470388)*x[1]
-        arg[2,0,1,1]=(0.0179816596229)*x[0]+(0.231534460784)*x[1]
-        arg[2,0,2,0]=(1.58460345297)*x[0]+(-0.383588433888)*x[1]
-        arg[2,0,2,1]=(-1.73386465536)*x[0]+(-0.743326657544)*x[1]
-        arg[2,1,0,0]=(-0.737976950246)*x[0]+(-1.01053396224)*x[1]
-        arg[2,1,0,1]=(0.926911190393)*x[0]+(0.620251783925)*x[1]
-        arg[2,1,1,0]=(-1.34289630129)*x[0]+(-0.429933681523)*x[1]
-        arg[2,1,1,1]=(1.79530806415)*x[0]+(-0.539783957021)*x[1]
-        arg[2,1,2,0]=(0.237950974938)*x[0]+(1.93783427703)*x[1]
-        arg[2,1,2,1]=(-0.439640741973)*x[0]+(-0.61543984673)*x[1]
-        arg[2,2,0,0]=(-1.66403612438)*x[0]+(1.00839566441)*x[1]
-        arg[2,2,0,1]=(0.249635983351)*x[0]+(-0.722261363675)*x[1]
-        arg[2,2,1,0]=(1.34179674459)*x[0]+(0.502542144188)*x[1]
-        arg[2,2,1,1]=(-0.815862586074)*x[0]+(-0.110688273707)*x[1]
-        arg[2,2,2,0]=(-0.686810719526)*x[0]+(0.500406563421)*x[1]
-        arg[2,2,2,1]=(0.681231089598)*x[0]+(0.605219505613)*x[1]
-        arg[2,3,0,0]=(-0.953299029956)*x[0]+(-0.223725858372)*x[1]
-        arg[2,3,0,1]=(0.831380756684)*x[0]+(-0.0379777076335)*x[1]
-        arg[2,3,1,0]=(-1.63804393157)*x[0]+(0.148235731301)*x[1]
-        arg[2,3,1,1]=(-0.17786458643)*x[0]+(-1.77342152699)*x[1]
-        arg[2,3,2,0]=(0.0210446244192)*x[0]+(1.59778781524)*x[1]
-        arg[2,3,2,1]=(0.877162721214)*x[0]+(0.262990448614)*x[1]
-        arg[2,4,0,0]=(-0.650265970331)*x[0]+(-1.07003604369)*x[1]
-        arg[2,4,0,1]=(1.12940101029)*x[0]+(0.860589290891)*x[1]
-        arg[2,4,1,0]=(0.520056210056)*x[0]+(-1.47691193979)*x[1]
-        arg[2,4,1,1]=(1.26823535235)*x[0]+(0.496811720647)*x[1]
-        arg[2,4,2,0]=(-1.388913443)*x[0]+(0.585343197943)*x[1]
-        arg[2,4,2,1]=(-0.762904547594)*x[0]+(0.503438815917)*x[1]
-        arg[3,0,0,0]=(0.382862686993)*x[0]+(-0.923525513303)*x[1]
-        arg[3,0,0,1]=(-0.54305794485)*x[0]+(0.467513531444)*x[1]
-        arg[3,0,1,0]=(1.24228759776)*x[0]+(-1.65740117421)*x[1]
-        arg[3,0,1,1]=(-0.463045362742)*x[0]+(0.186438587087)*x[1]
-        arg[3,0,2,0]=(0.296881980828)*x[0]+(-0.385878814949)*x[1]
-        arg[3,0,2,1]=(-0.299705899564)*x[0]+(0.490736038538)*x[1]
-        arg[3,1,0,0]=(-0.786851428658)*x[0]+(-0.760593794308)*x[1]
-        arg[3,1,0,1]=(0.506851336483)*x[0]+(0.995163951197)*x[1]
-        arg[3,1,1,0]=(-0.678883937341)*x[0]+(0.56996778248)*x[1]
-        arg[3,1,1,1]=(-0.401483642528)*x[0]+(0.0476797332537)*x[1]
-        arg[3,1,2,0]=(-0.585357955375)*x[0]+(0.330103647539)*x[1]
-        arg[3,1,2,1]=(-0.355539976825)*x[0]+(0.416287924349)*x[1]
-        arg[3,2,0,0]=(-0.662837130286)*x[0]+(-0.26640899674)*x[1]
-        arg[3,2,0,1]=(0.397553900588)*x[0]+(-1.21708620294)*x[1]
-        arg[3,2,1,0]=(0.464963326429)*x[0]+(-0.774515114142)*x[1]
-        arg[3,2,1,1]=(0.834351469791)*x[0]+(0.487629540715)*x[1]
-        arg[3,2,2,0]=(0.27622693716)*x[0]+(0.811338337719)*x[1]
-        arg[3,2,2,1]=(0.0384997772653)*x[0]+(1.03724996578)*x[1]
-        arg[3,3,0,0]=(-0.805491987874)*x[0]+(-0.476384547853)*x[1]
-        arg[3,3,0,1]=(0.615551780195)*x[0]+(-0.312805967691)*x[1]
-        arg[3,3,1,0]=(0.348666798955)*x[0]+(-1.31271156524)*x[1]
-        arg[3,3,1,1]=(-0.423569975374)*x[0]+(0.930713125389)*x[1]
-        arg[3,3,2,0]=(0.325632686234)*x[0]+(-0.166401033259)*x[1]
-        arg[3,3,2,1]=(0.126924861797)*x[0]+(-0.425380897969)*x[1]
-        arg[3,4,0,0]=(0.169532204538)*x[0]+(0.614632525765)*x[1]
-        arg[3,4,0,1]=(-0.938098696851)*x[0]+(0.648854147587)*x[1]
-        arg[3,4,1,0]=(-0.545143970434)*x[0]+(-1.59787515966)*x[1]
-        arg[3,4,1,1]=(-0.711190914978)*x[0]+(0.897331522911)*x[1]
-        arg[3,4,2,0]=(-0.386498124525)*x[0]+(0.299740420711)*x[1]
-        arg[3,4,2,1]=(0.617683032062)*x[0]+(-0.449587703061)*x[1]
-        ref[0,0,0,0]=(0.227969627252)*x_ref[0]+(0.778177350248)*x_ref[1]
-        ref[0,0,0,1]=(-0.684883711494)*x_ref[0]+(-0.574285957132)*x_ref[1]
-        ref[0,0,1,0]=(0.483090608974)*x_ref[0]+(0.0779929087959)*x_ref[1]
-        ref[0,0,1,1]=(-0.293150814932)*x_ref[0]+(1.35368931993)*x_ref[1]
-        ref[0,0,2,0]=(-0.190664734662)*x_ref[0]+(0.910883386754)*x_ref[1]
-        ref[0,0,2,1]=(-1.51255575457)*x_ref[0]+(0.421560181501)*x_ref[1]
-        ref[0,1,0,0]=(-0.833402828032)*x_ref[0]+(-0.400466806781)*x_ref[1]
-        ref[0,1,0,1]=(-0.212099323605)*x_ref[0]+(-0.112478697221)*x_ref[1]
-        ref[0,1,1,0]=(0.57687662926)*x_ref[0]+(0.869758954551)*x_ref[1]
-        ref[0,1,1,1]=(1.37261769917)*x_ref[0]+(1.37855789907)*x_ref[1]
-        ref[0,1,2,0]=(-1.02838589722)*x_ref[0]+(-0.280409246204)*x_ref[1]
-        ref[0,1,2,1]=(1.2333373468)*x_ref[0]+(0.337631183798)*x_ref[1]
-        ref[0,2,0,0]=(-0.249065448772)*x_ref[0]+(0.834483646317)*x_ref[1]
-        ref[0,2,0,1]=(-1.30860297683)*x_ref[0]+(-0.653929967017)*x_ref[1]
-        ref[0,2,1,0]=(-0.0155994484453)*x_ref[0]+(-0.274023166937)*x_ref[1]
-        ref[0,2,1,1]=(0.31458360335)*x_ref[0]+(1.59507700673)*x_ref[1]
-        ref[0,2,2,0]=(-0.11442619553)*x_ref[0]+(1.6577028576)*x_ref[1]
-        ref[0,2,2,1]=(0.274261132032)*x_ref[0]+(1.15236962479)*x_ref[1]
-        ref[0,3,0,0]=(1.91433860239)*x_ref[0]+(-0.316349747811)*x_ref[1]
-        ref[0,3,0,1]=(-1.42457591054)*x_ref[0]+(-0.362812690805)*x_ref[1]
-        ref[0,3,1,0]=(0.572734883096)*x_ref[0]+(0.424724787283)*x_ref[1]
-        ref[0,3,1,1]=(-0.118538376813)*x_ref[0]+(0.25190312527)*x_ref[1]
-        ref[0,3,2,0]=(-0.533409510081)*x_ref[0]+(-0.804349107915)*x_ref[1]
-        ref[0,3,2,1]=(-0.290555363666)*x_ref[0]+(-0.912641477145)*x_ref[1]
-        ref[0,4,0,0]=(-0.469612775918)*x_ref[0]+(-0.0447411310793)*x_ref[1]
-        ref[0,4,0,1]=(0.108538258831)*x_ref[0]+(0.0453962016662)*x_ref[1]
-        ref[0,4,1,0]=(-0.130785944028)*x_ref[0]+(0.0887280914032)*x_ref[1]
-        ref[0,4,1,1]=(0.166412309585)*x_ref[0]+(-0.75130797706)*x_ref[1]
-        ref[0,4,2,0]=(1.22538232455)*x_ref[0]+(0.112925588343)*x_ref[1]
-        ref[0,4,2,1]=(-1.02455171854)*x_ref[0]+(-0.725754942749)*x_ref[1]
-        ref[1,0,0,0]=(-0.869171086952)*x_ref[0]+(-0.948876783682)*x_ref[1]
-        ref[1,0,0,1]=(0.17730673689)*x_ref[0]+(-0.00166180855579)*x_ref[1]
-        ref[1,0,1,0]=(0.482072704433)*x_ref[0]+(0.895847096783)*x_ref[1]
-        ref[1,0,1,1]=(0.695736834617)*x_ref[0]+(0.358082704558)*x_ref[1]
-        ref[1,0,2,0]=(-0.501799636565)*x_ref[0]+(0.363612558025)*x_ref[1]
-        ref[1,0,2,1]=(-1.47204447226)*x_ref[0]+(1.91281426121)*x_ref[1]
-        ref[1,1,0,0]=(0.241893182978)*x_ref[0]+(0.95199758669)*x_ref[1]
-        ref[1,1,0,1]=(-0.68112361827)*x_ref[0]+(-0.241935141301)*x_ref[1]
-        ref[1,1,1,0]=(-0.553030972306)*x_ref[0]+(0.0244503690439)*x_ref[1]
-        ref[1,1,1,1]=(0.278177176896)*x_ref[0]+(1.58693846427)*x_ref[1]
-        ref[1,1,2,0]=(-0.87980015517)*x_ref[0]+(0.315618837123)*x_ref[1]
-        ref[1,1,2,1]=(-0.335783961379)*x_ref[0]+(0.368650136138)*x_ref[1]
-        ref[1,2,0,0]=(-0.903535146802)*x_ref[0]+(1.68182923194)*x_ref[1]
-        ref[1,2,0,1]=(1.06511511382)*x_ref[0]+(-1.08524762302)*x_ref[1]
-        ref[1,2,1,0]=(-0.0455274784681)*x_ref[0]+(-0.519576710661)*x_ref[1]
-        ref[1,2,1,1]=(0.735100217062)*x_ref[0]+(-0.986268682671)*x_ref[1]
-        ref[1,2,2,0]=(-0.544610797462)*x_ref[0]+(0.447237114882)*x_ref[1]
-        ref[1,2,2,1]=(0.385242031153)*x_ref[0]+(-0.960538844247)*x_ref[1]
-        ref[1,3,0,0]=(-0.354927072897)*x_ref[0]+(0.842574324062)*x_ref[1]
-        ref[1,3,0,1]=(0.319036427919)*x_ref[0]+(-0.156282262536)*x_ref[1]
-        ref[1,3,1,0]=(0.587123807717)*x_ref[0]+(1.65277990726)*x_ref[1]
-        ref[1,3,1,1]=(0.791697370298)*x_ref[0]+(-1.5681680344)*x_ref[1]
-        ref[1,3,2,0]=(-1.41931242045)*x_ref[0]+(0.351285136557)*x_ref[1]
-        ref[1,3,2,1]=(0.53175704402)*x_ref[0]+(0.987523241324)*x_ref[1]
-        ref[1,4,0,0]=(0.00533504818465)*x_ref[0]+(-0.158886930817)*x_ref[1]
-        ref[1,4,0,1]=(1.23725297303)*x_ref[0]+(-0.302896452172)*x_ref[1]
-        ref[1,4,1,0]=(0.433953146329)*x_ref[0]+(-0.0721602234887)*x_ref[1]
-        ref[1,4,1,1]=(-0.383499726865)*x_ref[0]+(-0.253834671235)*x_ref[1]
-        ref[1,4,2,0]=(-0.480776695247)*x_ref[0]+(-0.302145524759)*x_ref[1]
-        ref[1,4,2,1]=(1.14113180903)*x_ref[0]+(-1.24304726003)*x_ref[1]
-        ref[2,0,0,0]=(0.513776013893)*x_ref[0]+(-0.16660259885)*x_ref[1]
-        ref[2,0,0,1]=(1.55739209698)*x_ref[0]+(0.0524084654531)*x_ref[1]
-        ref[2,0,1,0]=(0.222567881446)*x_ref[0]+(-0.357158470388)*x_ref[1]
-        ref[2,0,1,1]=(0.0179816596229)*x_ref[0]+(0.231534460784)*x_ref[1]
-        ref[2,0,2,0]=(1.58460345297)*x_ref[0]+(-0.383588433888)*x_ref[1]
-        ref[2,0,2,1]=(-1.73386465536)*x_ref[0]+(-0.743326657544)*x_ref[1]
-        ref[2,1,0,0]=(-0.737976950246)*x_ref[0]+(-1.01053396224)*x_ref[1]
-        ref[2,1,0,1]=(0.926911190393)*x_ref[0]+(0.620251783925)*x_ref[1]
-        ref[2,1,1,0]=(-1.34289630129)*x_ref[0]+(-0.429933681523)*x_ref[1]
-        ref[2,1,1,1]=(1.79530806415)*x_ref[0]+(-0.539783957021)*x_ref[1]
-        ref[2,1,2,0]=(0.237950974938)*x_ref[0]+(1.93783427703)*x_ref[1]
-        ref[2,1,2,1]=(-0.439640741973)*x_ref[0]+(-0.61543984673)*x_ref[1]
-        ref[2,2,0,0]=(-1.66403612438)*x_ref[0]+(1.00839566441)*x_ref[1]
-        ref[2,2,0,1]=(0.249635983351)*x_ref[0]+(-0.722261363675)*x_ref[1]
-        ref[2,2,1,0]=(1.34179674459)*x_ref[0]+(0.502542144188)*x_ref[1]
-        ref[2,2,1,1]=(-0.815862586074)*x_ref[0]+(-0.110688273707)*x_ref[1]
-        ref[2,2,2,0]=(-0.686810719526)*x_ref[0]+(0.500406563421)*x_ref[1]
-        ref[2,2,2,1]=(0.681231089598)*x_ref[0]+(0.605219505613)*x_ref[1]
-        ref[2,3,0,0]=(-0.953299029956)*x_ref[0]+(-0.223725858372)*x_ref[1]
-        ref[2,3,0,1]=(0.831380756684)*x_ref[0]+(-0.0379777076335)*x_ref[1]
-        ref[2,3,1,0]=(-1.63804393157)*x_ref[0]+(0.148235731301)*x_ref[1]
-        ref[2,3,1,1]=(-0.17786458643)*x_ref[0]+(-1.77342152699)*x_ref[1]
-        ref[2,3,2,0]=(0.0210446244192)*x_ref[0]+(1.59778781524)*x_ref[1]
-        ref[2,3,2,1]=(0.877162721214)*x_ref[0]+(0.262990448614)*x_ref[1]
-        ref[2,4,0,0]=(-0.650265970331)*x_ref[0]+(-1.07003604369)*x_ref[1]
-        ref[2,4,0,1]=(1.12940101029)*x_ref[0]+(0.860589290891)*x_ref[1]
-        ref[2,4,1,0]=(0.520056210056)*x_ref[0]+(-1.47691193979)*x_ref[1]
-        ref[2,4,1,1]=(1.26823535235)*x_ref[0]+(0.496811720647)*x_ref[1]
-        ref[2,4,2,0]=(-1.388913443)*x_ref[0]+(0.585343197943)*x_ref[1]
-        ref[2,4,2,1]=(-0.762904547594)*x_ref[0]+(0.503438815917)*x_ref[1]
-        ref[3,0,0,0]=(0.382862686993)*x_ref[0]+(-0.923525513303)*x_ref[1]
-        ref[3,0,0,1]=(-0.54305794485)*x_ref[0]+(0.467513531444)*x_ref[1]
-        ref[3,0,1,0]=(1.24228759776)*x_ref[0]+(-1.65740117421)*x_ref[1]
-        ref[3,0,1,1]=(-0.463045362742)*x_ref[0]+(0.186438587087)*x_ref[1]
-        ref[3,0,2,0]=(0.296881980828)*x_ref[0]+(-0.385878814949)*x_ref[1]
-        ref[3,0,2,1]=(-0.299705899564)*x_ref[0]+(0.490736038538)*x_ref[1]
-        ref[3,1,0,0]=(-0.786851428658)*x_ref[0]+(-0.760593794308)*x_ref[1]
-        ref[3,1,0,1]=(0.506851336483)*x_ref[0]+(0.995163951197)*x_ref[1]
-        ref[3,1,1,0]=(-0.678883937341)*x_ref[0]+(0.56996778248)*x_ref[1]
-        ref[3,1,1,1]=(-0.401483642528)*x_ref[0]+(0.0476797332537)*x_ref[1]
-        ref[3,1,2,0]=(-0.585357955375)*x_ref[0]+(0.330103647539)*x_ref[1]
-        ref[3,1,2,1]=(-0.355539976825)*x_ref[0]+(0.416287924349)*x_ref[1]
-        ref[3,2,0,0]=(-0.662837130286)*x_ref[0]+(-0.26640899674)*x_ref[1]
-        ref[3,2,0,1]=(0.397553900588)*x_ref[0]+(-1.21708620294)*x_ref[1]
-        ref[3,2,1,0]=(0.464963326429)*x_ref[0]+(-0.774515114142)*x_ref[1]
-        ref[3,2,1,1]=(0.834351469791)*x_ref[0]+(0.487629540715)*x_ref[1]
-        ref[3,2,2,0]=(0.27622693716)*x_ref[0]+(0.811338337719)*x_ref[1]
-        ref[3,2,2,1]=(0.0384997772653)*x_ref[0]+(1.03724996578)*x_ref[1]
-        ref[3,3,0,0]=(-0.805491987874)*x_ref[0]+(-0.476384547853)*x_ref[1]
-        ref[3,3,0,1]=(0.615551780195)*x_ref[0]+(-0.312805967691)*x_ref[1]
-        ref[3,3,1,0]=(0.348666798955)*x_ref[0]+(-1.31271156524)*x_ref[1]
-        ref[3,3,1,1]=(-0.423569975374)*x_ref[0]+(0.930713125389)*x_ref[1]
-        ref[3,3,2,0]=(0.325632686234)*x_ref[0]+(-0.166401033259)*x_ref[1]
-        ref[3,3,2,1]=(0.126924861797)*x_ref[0]+(-0.425380897969)*x_ref[1]
-        ref[3,4,0,0]=(0.169532204538)*x_ref[0]+(0.614632525765)*x_ref[1]
-        ref[3,4,0,1]=(-0.938098696851)*x_ref[0]+(0.648854147587)*x_ref[1]
-        ref[3,4,1,0]=(-0.545143970434)*x_ref[0]+(-1.59787515966)*x_ref[1]
-        ref[3,4,1,1]=(-0.711190914978)*x_ref[0]+(0.897331522911)*x_ref[1]
-        ref[3,4,2,0]=(-0.386498124525)*x_ref[0]+(0.299740420711)*x_ref[1]
-        ref[3,4,2,1]=(0.617683032062)*x_ref[0]+(-0.449587703061)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.791620170192)*x[0]+(1.03871460301)*x[1]+(-0.225035657687)*x[2]
-        arg[0,0,0,1]=(-0.464422319203)*x[0]+(0.769454931053)*x[1]+(-0.783260637771)*x[2]
-        arg[0,0,1,0]=(0.72655538215)*x[0]+(-1.65736312015)*x[1]+(1.08402505927)*x[2]
-        arg[0,0,1,1]=(-0.207576709573)*x[0]+(-0.55250594761)*x[1]+(-0.923702938288)*x[2]
-        arg[0,0,2,0]=(-0.701991085516)*x[0]+(-1.76863643107)*x[1]+(0.831382933104)*x[2]
-        arg[0,0,2,1]=(0.0640035527319)*x[0]+(0.425446342976)*x[1]+(1.64626766696)*x[2]
-        arg[0,1,0,0]=(1.01022963801)*x[0]+(-0.0215015059716)*x[1]+(0.849862425592)*x[2]
-        arg[0,1,0,1]=(-0.45776932943)*x[0]+(0.7621342151)*x[1]+(-1.40123018391)*x[2]
-        arg[0,1,1,0]=(0.737485054127)*x[0]+(-0.147513905858)*x[1]+(-0.616928595213)*x[2]
-        arg[0,1,1,1]=(-0.0608005391894)*x[0]+(-0.154978210573)*x[1]+(-1.40322011577)*x[2]
-        arg[0,1,2,0]=(1.59908177714)*x[0]+(-0.378738573932)*x[1]+(1.45285315247)*x[2]
-        arg[0,1,2,1]=(-0.622552157046)*x[0]+(1.19996417516)*x[1]+(0.728842900843)*x[2]
-        arg[0,2,0,0]=(-0.46942034691)*x[0]+(0.333309721372)*x[1]+(-0.280846553832)*x[2]
-        arg[0,2,0,1]=(1.22208788109)*x[0]+(0.369339594285)*x[1]+(1.31078425589)*x[2]
-        arg[0,2,1,0]=(0.0794165004114)*x[0]+(0.44665451846)*x[1]+(-0.814625708916)*x[2]
-        arg[0,2,1,1]=(0.594200807165)*x[0]+(-0.00616720333193)*x[1]+(0.382706175172)*x[2]
-        arg[0,2,2,0]=(0.0372230170459)*x[0]+(0.440339923291)*x[1]+(0.137641070028)*x[2]
-        arg[0,2,2,1]=(-1.29863078274)*x[0]+(0.283142455171)*x[1]+(0.0844540074659)*x[2]
-        arg[0,3,0,0]=(1.72811808036)*x[0]+(0.536456781522)*x[1]+(0.0266737704706)*x[2]
-        arg[0,3,0,1]=(0.148219555101)*x[0]+(-0.6887500275)*x[1]+(-0.405613136632)*x[2]
-        arg[0,3,1,0]=(0.708262537279)*x[0]+(1.16319635773)*x[1]+(-0.030808721674)*x[2]
-        arg[0,3,1,1]=(0.80834615863)*x[0]+(-0.176789000925)*x[1]+(-1.72576120963)*x[2]
-        arg[0,3,2,0]=(0.21128315299)*x[0]+(0.770037046126)*x[1]+(0.988028934422)*x[2]
-        arg[0,3,2,1]=(1.10522136317)*x[0]+(1.6319351743)*x[1]+(-0.784693713387)*x[2]
-        arg[0,4,0,0]=(0.121088121064)*x[0]+(-1.79718067791)*x[1]+(-0.907857173318)*x[2]
-        arg[0,4,0,1]=(-0.695887294217)*x[0]+(-1.24166787807)*x[1]+(-1.24968023856)*x[2]
-        arg[0,4,1,0]=(-0.202510797291)*x[0]+(0.628310156105)*x[1]+(0.605146447822)*x[2]
-        arg[0,4,1,1]=(0.149227458424)*x[0]+(-1.5650392775)*x[1]+(-0.763944892663)*x[2]
-        arg[0,4,2,0]=(-0.393218625872)*x[0]+(0.479145914948)*x[1]+(-0.313960447492)*x[2]
-        arg[0,4,2,1]=(-0.0191807443799)*x[0]+(0.592992659119)*x[1]+(-0.475633115484)*x[2]
-        arg[1,0,0,0]=(-0.964829354261)*x[0]+(0.453014802906)*x[1]+(-0.779502566938)*x[2]
-        arg[1,0,0,1]=(0.0151205739508)*x[0]+(-0.153706429594)*x[1]+(0.00866460475724)*x[2]
-        arg[1,0,1,0]=(0.92592276366)*x[0]+(0.530787400525)*x[1]+(-0.0577912606876)*x[2]
-        arg[1,0,1,1]=(0.948404467077)*x[0]+(-0.265905470751)*x[1]+(0.472349192005)*x[2]
-        arg[1,0,2,0]=(0.0176615383702)*x[0]+(0.679605821761)*x[1]+(-0.0333590911941)*x[2]
-        arg[1,0,2,1]=(-1.15594952629)*x[0]+(0.264868376508)*x[1]+(-0.883690535499)*x[2]
-        arg[1,1,0,0]=(-0.738712703994)*x[0]+(0.545839232808)*x[1]+(0.592474501134)*x[2]
-        arg[1,1,0,1]=(-1.3468960453)*x[0]+(-0.00848202443614)*x[1]+(-0.0124138286126)*x[2]
-        arg[1,1,1,0]=(0.900228409707)*x[0]+(-1.86848082357)*x[1]+(0.421539431142)*x[2]
-        arg[1,1,1,1]=(1.42754013963)*x[0]+(-0.861376440449)*x[1]+(0.0965520362291)*x[2]
-        arg[1,1,2,0]=(-0.35873674515)*x[0]+(0.0862592617941)*x[1]+(-0.536106207025)*x[2]
-        arg[1,1,2,1]=(0.90712910097)*x[0]+(0.974545253055)*x[1]+(0.570708510858)*x[2]
-        arg[1,2,0,0]=(1.19310775669)*x[0]+(0.309414331679)*x[1]+(-0.271298061586)*x[2]
-        arg[1,2,0,1]=(0.551778129545)*x[0]+(0.539028430134)*x[1]+(0.239406239262)*x[2]
-        arg[1,2,1,0]=(-0.810625054344)*x[0]+(-0.241072190233)*x[1]+(-1.58590369097)*x[2]
-        arg[1,2,1,1]=(0.529669075734)*x[0]+(-0.890365024163)*x[1]+(-1.69798509084)*x[2]
-        arg[1,2,2,0]=(0.0437087707448)*x[0]+(0.88372190198)*x[1]+(1.86547747806)*x[2]
-        arg[1,2,2,1]=(1.30739438898)*x[0]+(0.315850112101)*x[1]+(-0.262001133683)*x[2]
-        arg[1,3,0,0]=(-0.143426236837)*x[0]+(-1.1703384826)*x[1]+(0.50608348646)*x[2]
-        arg[1,3,0,1]=(-0.0444408776922)*x[0]+(1.26952782036)*x[1]+(1.67192602934)*x[2]
-        arg[1,3,1,0]=(0.672742824368)*x[0]+(-0.785246676537)*x[1]+(0.716130664056)*x[2]
-        arg[1,3,1,1]=(-0.295182508335)*x[0]+(-1.53658860897)*x[1]+(-1.87133995422)*x[2]
-        arg[1,3,2,0]=(-0.440859530081)*x[0]+(0.0730120015821)*x[1]+(-1.02465537353)*x[2]
-        arg[1,3,2,1]=(0.838320612003)*x[0]+(1.81233688454)*x[1]+(-1.0633876685)*x[2]
-        arg[1,4,0,0]=(0.52440453051)*x[0]+(-0.0182588999022)*x[1]+(1.05556310351)*x[2]
-        arg[1,4,0,1]=(0.766612727495)*x[0]+(1.58987590746)*x[1]+(-0.703801484569)*x[2]
-        arg[1,4,1,0]=(0.373439757535)*x[0]+(-0.0676963704305)*x[1]+(0.0948034094293)*x[2]
-        arg[1,4,1,1]=(-0.542283543375)*x[0]+(-0.454408605761)*x[1]+(-0.398904635316)*x[2]
-        arg[1,4,2,0]=(1.3374871143)*x[0]+(0.0067849394587)*x[1]+(-0.319452094882)*x[2]
-        arg[1,4,2,1]=(0.38530755393)*x[0]+(1.05356462429)*x[1]+(-0.302179447719)*x[2]
-        arg[2,0,0,0]=(-0.123109761583)*x[0]+(0.69223848143)*x[1]+(-1.36903487092)*x[2]
-        arg[2,0,0,1]=(0.121957328459)*x[0]+(0.102229685387)*x[1]+(0.962499974737)*x[2]
-        arg[2,0,1,0]=(0.478614188653)*x[0]+(-1.23058817023)*x[1]+(1.30950997478)*x[2]
-        arg[2,0,1,1]=(-0.529033562461)*x[0]+(0.563030509591)*x[1]+(-0.564939226654)*x[2]
-        arg[2,0,2,0]=(-0.377740282406)*x[0]+(1.20532110343)*x[1]+(1.55615174947)*x[2]
-        arg[2,0,2,1]=(0.539119710703)*x[0]+(1.91771865857)*x[1]+(0.0809882488048)*x[2]
-        arg[2,1,0,0]=(0.00548664737796)*x[0]+(-0.157716099068)*x[1]+(-1.40009044235)*x[2]
-        arg[2,1,0,1]=(0.0667557890666)*x[0]+(0.742484448131)*x[1]+(-0.325246111346)*x[2]
-        arg[2,1,1,0]=(-0.214965474071)*x[0]+(-0.215055151964)*x[1]+(1.15673960537)*x[2]
-        arg[2,1,1,1]=(0.605764831789)*x[0]+(-1.0432964832)*x[1]+(0.645482523161)*x[2]
-        arg[2,1,2,0]=(-1.13098364088)*x[0]+(-0.932044089041)*x[1]+(-0.308053828241)*x[2]
-        arg[2,1,2,1]=(0.481961305459)*x[0]+(-0.101277472029)*x[1]+(-0.17520207974)*x[2]
-        arg[2,2,0,0]=(0.579831852303)*x[0]+(0.538731990254)*x[1]+(-0.0897460374205)*x[2]
-        arg[2,2,0,1]=(-1.8763181434)*x[0]+(-0.132710928569)*x[1]+(1.03169751651)*x[2]
-        arg[2,2,1,0]=(0.56871511431)*x[0]+(0.075333481656)*x[1]+(1.10238818953)*x[2]
-        arg[2,2,1,1]=(1.49347755246)*x[0]+(-1.00500941047)*x[1]+(-0.181733196359)*x[2]
-        arg[2,2,2,0]=(0.532881509971)*x[0]+(-0.364333964659)*x[1]+(1.09633720883)*x[2]
-        arg[2,2,2,1]=(-0.518419048615)*x[0]+(-0.48091100593)*x[1]+(0.724628840153)*x[2]
-        arg[2,3,0,0]=(0.353475859331)*x[0]+(-0.0239879269825)*x[1]+(1.32068893718)*x[2]
-        arg[2,3,0,1]=(0.553999122102)*x[0]+(-0.128530869239)*x[1]+(0.134663336287)*x[2]
-        arg[2,3,1,0]=(-1.59775882569)*x[0]+(-1.07335424785)*x[1]+(1.39223587988)*x[2]
-        arg[2,3,1,1]=(-0.921252080095)*x[0]+(1.46226299067)*x[1]+(-1.13412499932)*x[2]
-        arg[2,3,2,0]=(0.417572910178)*x[0]+(0.0814889599489)*x[1]+(0.292159249719)*x[2]
-        arg[2,3,2,1]=(1.44620228921)*x[0]+(0.767854577367)*x[1]+(-0.0113709806383)*x[2]
-        arg[2,4,0,0]=(-0.156987001681)*x[0]+(-0.922524257833)*x[1]+(0.521128360838)*x[2]
-        arg[2,4,0,1]=(0.154198133354)*x[0]+(0.462020370175)*x[1]+(0.966768653665)*x[2]
-        arg[2,4,1,0]=(0.507836849242)*x[0]+(1.16701911244)*x[1]+(0.264543038211)*x[2]
-        arg[2,4,1,1]=(0.452059436879)*x[0]+(0.409662432778)*x[1]+(-0.403800872595)*x[2]
-        arg[2,4,2,0]=(0.521175521008)*x[0]+(-0.362551578816)*x[1]+(0.0922727331623)*x[2]
-        arg[2,4,2,1]=(-1.0990361823)*x[0]+(1.73655146851)*x[1]+(-0.867917402922)*x[2]
-        arg[3,0,0,0]=(-0.0527010882236)*x[0]+(-1.11528215488)*x[1]+(1.3141906393)*x[2]
-        arg[3,0,0,1]=(0.151284271917)*x[0]+(-0.0159077450668)*x[1]+(1.1798338931)*x[2]
-        arg[3,0,1,0]=(-1.7648963435)*x[0]+(0.229511437402)*x[1]+(0.924415900312)*x[2]
-        arg[3,0,1,1]=(-0.498271821094)*x[0]+(1.58363063019)*x[1]+(1.64871750388)*x[2]
-        arg[3,0,2,0]=(-1.11245170725)*x[0]+(1.27662612569)*x[1]+(0.145950372369)*x[2]
-        arg[3,0,2,1]=(-0.691643924238)*x[0]+(-0.178211874279)*x[1]+(-0.341071050366)*x[2]
-        arg[3,1,0,0]=(-0.929804889461)*x[0]+(0.199087067309)*x[1]+(1.00150168883)*x[2]
-        arg[3,1,0,1]=(-1.25152265093)*x[0]+(0.517076294911)*x[1]+(0.103798312362)*x[2]
-        arg[3,1,1,0]=(0.797316290623)*x[0]+(0.0239285379293)*x[1]+(-0.836519299418)*x[2]
-        arg[3,1,1,1]=(-0.470084592176)*x[0]+(0.844364701728)*x[1]+(-0.027373275093)*x[2]
-        arg[3,1,2,0]=(1.0340279373)*x[0]+(-0.0133951276315)*x[1]+(1.17710546194)*x[2]
-        arg[3,1,2,1]=(0.0325929541496)*x[0]+(1.13784867184)*x[1]+(-0.0529194266769)*x[2]
-        arg[3,2,0,0]=(1.92837561772)*x[0]+(-1.63633468831)*x[1]+(1.4212324281)*x[2]
-        arg[3,2,0,1]=(1.09556054408)*x[0]+(1.43286059545)*x[1]+(1.20005604593)*x[2]
-        arg[3,2,1,0]=(0.308887169169)*x[0]+(-0.149214224208)*x[1]+(-1.13559614877)*x[2]
-        arg[3,2,1,1]=(-0.0648352909004)*x[0]+(-0.5645470596)*x[1]+(-0.525131730514)*x[2]
-        arg[3,2,2,0]=(0.21826829974)*x[0]+(1.5950239996)*x[1]+(0.333592425438)*x[2]
-        arg[3,2,2,1]=(-1.25613956172)*x[0]+(-0.242338679844)*x[1]+(-0.958875577074)*x[2]
-        arg[3,3,0,0]=(1.65005362159)*x[0]+(-1.16713867165)*x[1]+(-0.282495293685)*x[2]
-        arg[3,3,0,1]=(1.04854406427)*x[0]+(0.876270949531)*x[1]+(0.291036304743)*x[2]
-        arg[3,3,1,0]=(-1.66619451175)*x[0]+(0.656275192484)*x[1]+(-1.27104499942)*x[2]
-        arg[3,3,1,1]=(1.55407146907)*x[0]+(-0.322950943159)*x[1]+(-0.287565403896)*x[2]
-        arg[3,3,2,0]=(-1.54760268583)*x[0]+(-1.45847761887)*x[1]+(1.13939567009)*x[2]
-        arg[3,3,2,1]=(1.24632351699)*x[0]+(0.0265500081594)*x[1]+(1.61925095159)*x[2]
-        arg[3,4,0,0]=(-0.0430889433549)*x[0]+(-1.46995559463)*x[1]+(-1.14915159823)*x[2]
-        arg[3,4,0,1]=(0.0392641403409)*x[0]+(0.0603053049639)*x[1]+(0.647321169934)*x[2]
-        arg[3,4,1,0]=(-0.156300985227)*x[0]+(0.79369911928)*x[1]+(-0.413124762507)*x[2]
-        arg[3,4,1,1]=(0.258402059015)*x[0]+(0.00227307988585)*x[1]+(0.70067141295)*x[2]
-        arg[3,4,2,0]=(-1.15131298872)*x[0]+(-0.627449043157)*x[1]+(-0.402268345861)*x[2]
-        arg[3,4,2,1]=(0.455934238179)*x[0]+(-0.951120759108)*x[1]+(-0.280459367131)*x[2]
-        ref[0,0,0,0]=(-0.791620170192)*x_ref[0]+(1.03871460301)*x_ref[1]+(-0.225035657687)*x_ref[2]
-        ref[0,0,0,1]=(-0.464422319203)*x_ref[0]+(0.769454931053)*x_ref[1]+(-0.783260637771)*x_ref[2]
-        ref[0,0,1,0]=(0.72655538215)*x_ref[0]+(-1.65736312015)*x_ref[1]+(1.08402505927)*x_ref[2]
-        ref[0,0,1,1]=(-0.207576709573)*x_ref[0]+(-0.55250594761)*x_ref[1]+(-0.923702938288)*x_ref[2]
-        ref[0,0,2,0]=(-0.701991085516)*x_ref[0]+(-1.76863643107)*x_ref[1]+(0.831382933104)*x_ref[2]
-        ref[0,0,2,1]=(0.0640035527319)*x_ref[0]+(0.425446342976)*x_ref[1]+(1.64626766696)*x_ref[2]
-        ref[0,1,0,0]=(1.01022963801)*x_ref[0]+(-0.0215015059716)*x_ref[1]+(0.849862425592)*x_ref[2]
-        ref[0,1,0,1]=(-0.45776932943)*x_ref[0]+(0.7621342151)*x_ref[1]+(-1.40123018391)*x_ref[2]
-        ref[0,1,1,0]=(0.737485054127)*x_ref[0]+(-0.147513905858)*x_ref[1]+(-0.616928595213)*x_ref[2]
-        ref[0,1,1,1]=(-0.0608005391894)*x_ref[0]+(-0.154978210573)*x_ref[1]+(-1.40322011577)*x_ref[2]
-        ref[0,1,2,0]=(1.59908177714)*x_ref[0]+(-0.378738573932)*x_ref[1]+(1.45285315247)*x_ref[2]
-        ref[0,1,2,1]=(-0.622552157046)*x_ref[0]+(1.19996417516)*x_ref[1]+(0.728842900843)*x_ref[2]
-        ref[0,2,0,0]=(-0.46942034691)*x_ref[0]+(0.333309721372)*x_ref[1]+(-0.280846553832)*x_ref[2]
-        ref[0,2,0,1]=(1.22208788109)*x_ref[0]+(0.369339594285)*x_ref[1]+(1.31078425589)*x_ref[2]
-        ref[0,2,1,0]=(0.0794165004114)*x_ref[0]+(0.44665451846)*x_ref[1]+(-0.814625708916)*x_ref[2]
-        ref[0,2,1,1]=(0.594200807165)*x_ref[0]+(-0.00616720333193)*x_ref[1]+(0.382706175172)*x_ref[2]
-        ref[0,2,2,0]=(0.0372230170459)*x_ref[0]+(0.440339923291)*x_ref[1]+(0.137641070028)*x_ref[2]
-        ref[0,2,2,1]=(-1.29863078274)*x_ref[0]+(0.283142455171)*x_ref[1]+(0.0844540074659)*x_ref[2]
-        ref[0,3,0,0]=(1.72811808036)*x_ref[0]+(0.536456781522)*x_ref[1]+(0.0266737704706)*x_ref[2]
-        ref[0,3,0,1]=(0.148219555101)*x_ref[0]+(-0.6887500275)*x_ref[1]+(-0.405613136632)*x_ref[2]
-        ref[0,3,1,0]=(0.708262537279)*x_ref[0]+(1.16319635773)*x_ref[1]+(-0.030808721674)*x_ref[2]
-        ref[0,3,1,1]=(0.80834615863)*x_ref[0]+(-0.176789000925)*x_ref[1]+(-1.72576120963)*x_ref[2]
-        ref[0,3,2,0]=(0.21128315299)*x_ref[0]+(0.770037046126)*x_ref[1]+(0.988028934422)*x_ref[2]
-        ref[0,3,2,1]=(1.10522136317)*x_ref[0]+(1.6319351743)*x_ref[1]+(-0.784693713387)*x_ref[2]
-        ref[0,4,0,0]=(0.121088121064)*x_ref[0]+(-1.79718067791)*x_ref[1]+(-0.907857173318)*x_ref[2]
-        ref[0,4,0,1]=(-0.695887294217)*x_ref[0]+(-1.24166787807)*x_ref[1]+(-1.24968023856)*x_ref[2]
-        ref[0,4,1,0]=(-0.202510797291)*x_ref[0]+(0.628310156105)*x_ref[1]+(0.605146447822)*x_ref[2]
-        ref[0,4,1,1]=(0.149227458424)*x_ref[0]+(-1.5650392775)*x_ref[1]+(-0.763944892663)*x_ref[2]
-        ref[0,4,2,0]=(-0.393218625872)*x_ref[0]+(0.479145914948)*x_ref[1]+(-0.313960447492)*x_ref[2]
-        ref[0,4,2,1]=(-0.0191807443799)*x_ref[0]+(0.592992659119)*x_ref[1]+(-0.475633115484)*x_ref[2]
-        ref[1,0,0,0]=(-0.964829354261)*x_ref[0]+(0.453014802906)*x_ref[1]+(-0.779502566938)*x_ref[2]
-        ref[1,0,0,1]=(0.0151205739508)*x_ref[0]+(-0.153706429594)*x_ref[1]+(0.00866460475724)*x_ref[2]
-        ref[1,0,1,0]=(0.92592276366)*x_ref[0]+(0.530787400525)*x_ref[1]+(-0.0577912606876)*x_ref[2]
-        ref[1,0,1,1]=(0.948404467077)*x_ref[0]+(-0.265905470751)*x_ref[1]+(0.472349192005)*x_ref[2]
-        ref[1,0,2,0]=(0.0176615383702)*x_ref[0]+(0.679605821761)*x_ref[1]+(-0.0333590911941)*x_ref[2]
-        ref[1,0,2,1]=(-1.15594952629)*x_ref[0]+(0.264868376508)*x_ref[1]+(-0.883690535499)*x_ref[2]
-        ref[1,1,0,0]=(-0.738712703994)*x_ref[0]+(0.545839232808)*x_ref[1]+(0.592474501134)*x_ref[2]
-        ref[1,1,0,1]=(-1.3468960453)*x_ref[0]+(-0.00848202443614)*x_ref[1]+(-0.0124138286126)*x_ref[2]
-        ref[1,1,1,0]=(0.900228409707)*x_ref[0]+(-1.86848082357)*x_ref[1]+(0.421539431142)*x_ref[2]
-        ref[1,1,1,1]=(1.42754013963)*x_ref[0]+(-0.861376440449)*x_ref[1]+(0.0965520362291)*x_ref[2]
-        ref[1,1,2,0]=(-0.35873674515)*x_ref[0]+(0.0862592617941)*x_ref[1]+(-0.536106207025)*x_ref[2]
-        ref[1,1,2,1]=(0.90712910097)*x_ref[0]+(0.974545253055)*x_ref[1]+(0.570708510858)*x_ref[2]
-        ref[1,2,0,0]=(1.19310775669)*x_ref[0]+(0.309414331679)*x_ref[1]+(-0.271298061586)*x_ref[2]
-        ref[1,2,0,1]=(0.551778129545)*x_ref[0]+(0.539028430134)*x_ref[1]+(0.239406239262)*x_ref[2]
-        ref[1,2,1,0]=(-0.810625054344)*x_ref[0]+(-0.241072190233)*x_ref[1]+(-1.58590369097)*x_ref[2]
-        ref[1,2,1,1]=(0.529669075734)*x_ref[0]+(-0.890365024163)*x_ref[1]+(-1.69798509084)*x_ref[2]
-        ref[1,2,2,0]=(0.0437087707448)*x_ref[0]+(0.88372190198)*x_ref[1]+(1.86547747806)*x_ref[2]
-        ref[1,2,2,1]=(1.30739438898)*x_ref[0]+(0.315850112101)*x_ref[1]+(-0.262001133683)*x_ref[2]
-        ref[1,3,0,0]=(-0.143426236837)*x_ref[0]+(-1.1703384826)*x_ref[1]+(0.50608348646)*x_ref[2]
-        ref[1,3,0,1]=(-0.0444408776922)*x_ref[0]+(1.26952782036)*x_ref[1]+(1.67192602934)*x_ref[2]
-        ref[1,3,1,0]=(0.672742824368)*x_ref[0]+(-0.785246676537)*x_ref[1]+(0.716130664056)*x_ref[2]
-        ref[1,3,1,1]=(-0.295182508335)*x_ref[0]+(-1.53658860897)*x_ref[1]+(-1.87133995422)*x_ref[2]
-        ref[1,3,2,0]=(-0.440859530081)*x_ref[0]+(0.0730120015821)*x_ref[1]+(-1.02465537353)*x_ref[2]
-        ref[1,3,2,1]=(0.838320612003)*x_ref[0]+(1.81233688454)*x_ref[1]+(-1.0633876685)*x_ref[2]
-        ref[1,4,0,0]=(0.52440453051)*x_ref[0]+(-0.0182588999022)*x_ref[1]+(1.05556310351)*x_ref[2]
-        ref[1,4,0,1]=(0.766612727495)*x_ref[0]+(1.58987590746)*x_ref[1]+(-0.703801484569)*x_ref[2]
-        ref[1,4,1,0]=(0.373439757535)*x_ref[0]+(-0.0676963704305)*x_ref[1]+(0.0948034094293)*x_ref[2]
-        ref[1,4,1,1]=(-0.542283543375)*x_ref[0]+(-0.454408605761)*x_ref[1]+(-0.398904635316)*x_ref[2]
-        ref[1,4,2,0]=(1.3374871143)*x_ref[0]+(0.0067849394587)*x_ref[1]+(-0.319452094882)*x_ref[2]
-        ref[1,4,2,1]=(0.38530755393)*x_ref[0]+(1.05356462429)*x_ref[1]+(-0.302179447719)*x_ref[2]
-        ref[2,0,0,0]=(-0.123109761583)*x_ref[0]+(0.69223848143)*x_ref[1]+(-1.36903487092)*x_ref[2]
-        ref[2,0,0,1]=(0.121957328459)*x_ref[0]+(0.102229685387)*x_ref[1]+(0.962499974737)*x_ref[2]
-        ref[2,0,1,0]=(0.478614188653)*x_ref[0]+(-1.23058817023)*x_ref[1]+(1.30950997478)*x_ref[2]
-        ref[2,0,1,1]=(-0.529033562461)*x_ref[0]+(0.563030509591)*x_ref[1]+(-0.564939226654)*x_ref[2]
-        ref[2,0,2,0]=(-0.377740282406)*x_ref[0]+(1.20532110343)*x_ref[1]+(1.55615174947)*x_ref[2]
-        ref[2,0,2,1]=(0.539119710703)*x_ref[0]+(1.91771865857)*x_ref[1]+(0.0809882488048)*x_ref[2]
-        ref[2,1,0,0]=(0.00548664737796)*x_ref[0]+(-0.157716099068)*x_ref[1]+(-1.40009044235)*x_ref[2]
-        ref[2,1,0,1]=(0.0667557890666)*x_ref[0]+(0.742484448131)*x_ref[1]+(-0.325246111346)*x_ref[2]
-        ref[2,1,1,0]=(-0.214965474071)*x_ref[0]+(-0.215055151964)*x_ref[1]+(1.15673960537)*x_ref[2]
-        ref[2,1,1,1]=(0.605764831789)*x_ref[0]+(-1.0432964832)*x_ref[1]+(0.645482523161)*x_ref[2]
-        ref[2,1,2,0]=(-1.13098364088)*x_ref[0]+(-0.932044089041)*x_ref[1]+(-0.308053828241)*x_ref[2]
-        ref[2,1,2,1]=(0.481961305459)*x_ref[0]+(-0.101277472029)*x_ref[1]+(-0.17520207974)*x_ref[2]
-        ref[2,2,0,0]=(0.579831852303)*x_ref[0]+(0.538731990254)*x_ref[1]+(-0.0897460374205)*x_ref[2]
-        ref[2,2,0,1]=(-1.8763181434)*x_ref[0]+(-0.132710928569)*x_ref[1]+(1.03169751651)*x_ref[2]
-        ref[2,2,1,0]=(0.56871511431)*x_ref[0]+(0.075333481656)*x_ref[1]+(1.10238818953)*x_ref[2]
-        ref[2,2,1,1]=(1.49347755246)*x_ref[0]+(-1.00500941047)*x_ref[1]+(-0.181733196359)*x_ref[2]
-        ref[2,2,2,0]=(0.532881509971)*x_ref[0]+(-0.364333964659)*x_ref[1]+(1.09633720883)*x_ref[2]
-        ref[2,2,2,1]=(-0.518419048615)*x_ref[0]+(-0.48091100593)*x_ref[1]+(0.724628840153)*x_ref[2]
-        ref[2,3,0,0]=(0.353475859331)*x_ref[0]+(-0.0239879269825)*x_ref[1]+(1.32068893718)*x_ref[2]
-        ref[2,3,0,1]=(0.553999122102)*x_ref[0]+(-0.128530869239)*x_ref[1]+(0.134663336287)*x_ref[2]
-        ref[2,3,1,0]=(-1.59775882569)*x_ref[0]+(-1.07335424785)*x_ref[1]+(1.39223587988)*x_ref[2]
-        ref[2,3,1,1]=(-0.921252080095)*x_ref[0]+(1.46226299067)*x_ref[1]+(-1.13412499932)*x_ref[2]
-        ref[2,3,2,0]=(0.417572910178)*x_ref[0]+(0.0814889599489)*x_ref[1]+(0.292159249719)*x_ref[2]
-        ref[2,3,2,1]=(1.44620228921)*x_ref[0]+(0.767854577367)*x_ref[1]+(-0.0113709806383)*x_ref[2]
-        ref[2,4,0,0]=(-0.156987001681)*x_ref[0]+(-0.922524257833)*x_ref[1]+(0.521128360838)*x_ref[2]
-        ref[2,4,0,1]=(0.154198133354)*x_ref[0]+(0.462020370175)*x_ref[1]+(0.966768653665)*x_ref[2]
-        ref[2,4,1,0]=(0.507836849242)*x_ref[0]+(1.16701911244)*x_ref[1]+(0.264543038211)*x_ref[2]
-        ref[2,4,1,1]=(0.452059436879)*x_ref[0]+(0.409662432778)*x_ref[1]+(-0.403800872595)*x_ref[2]
-        ref[2,4,2,0]=(0.521175521008)*x_ref[0]+(-0.362551578816)*x_ref[1]+(0.0922727331623)*x_ref[2]
-        ref[2,4,2,1]=(-1.0990361823)*x_ref[0]+(1.73655146851)*x_ref[1]+(-0.867917402922)*x_ref[2]
-        ref[3,0,0,0]=(-0.0527010882236)*x_ref[0]+(-1.11528215488)*x_ref[1]+(1.3141906393)*x_ref[2]
-        ref[3,0,0,1]=(0.151284271917)*x_ref[0]+(-0.0159077450668)*x_ref[1]+(1.1798338931)*x_ref[2]
-        ref[3,0,1,0]=(-1.7648963435)*x_ref[0]+(0.229511437402)*x_ref[1]+(0.924415900312)*x_ref[2]
-        ref[3,0,1,1]=(-0.498271821094)*x_ref[0]+(1.58363063019)*x_ref[1]+(1.64871750388)*x_ref[2]
-        ref[3,0,2,0]=(-1.11245170725)*x_ref[0]+(1.27662612569)*x_ref[1]+(0.145950372369)*x_ref[2]
-        ref[3,0,2,1]=(-0.691643924238)*x_ref[0]+(-0.178211874279)*x_ref[1]+(-0.341071050366)*x_ref[2]
-        ref[3,1,0,0]=(-0.929804889461)*x_ref[0]+(0.199087067309)*x_ref[1]+(1.00150168883)*x_ref[2]
-        ref[3,1,0,1]=(-1.25152265093)*x_ref[0]+(0.517076294911)*x_ref[1]+(0.103798312362)*x_ref[2]
-        ref[3,1,1,0]=(0.797316290623)*x_ref[0]+(0.0239285379293)*x_ref[1]+(-0.836519299418)*x_ref[2]
-        ref[3,1,1,1]=(-0.470084592176)*x_ref[0]+(0.844364701728)*x_ref[1]+(-0.027373275093)*x_ref[2]
-        ref[3,1,2,0]=(1.0340279373)*x_ref[0]+(-0.0133951276315)*x_ref[1]+(1.17710546194)*x_ref[2]
-        ref[3,1,2,1]=(0.0325929541496)*x_ref[0]+(1.13784867184)*x_ref[1]+(-0.0529194266769)*x_ref[2]
-        ref[3,2,0,0]=(1.92837561772)*x_ref[0]+(-1.63633468831)*x_ref[1]+(1.4212324281)*x_ref[2]
-        ref[3,2,0,1]=(1.09556054408)*x_ref[0]+(1.43286059545)*x_ref[1]+(1.20005604593)*x_ref[2]
-        ref[3,2,1,0]=(0.308887169169)*x_ref[0]+(-0.149214224208)*x_ref[1]+(-1.13559614877)*x_ref[2]
-        ref[3,2,1,1]=(-0.0648352909004)*x_ref[0]+(-0.5645470596)*x_ref[1]+(-0.525131730514)*x_ref[2]
-        ref[3,2,2,0]=(0.21826829974)*x_ref[0]+(1.5950239996)*x_ref[1]+(0.333592425438)*x_ref[2]
-        ref[3,2,2,1]=(-1.25613956172)*x_ref[0]+(-0.242338679844)*x_ref[1]+(-0.958875577074)*x_ref[2]
-        ref[3,3,0,0]=(1.65005362159)*x_ref[0]+(-1.16713867165)*x_ref[1]+(-0.282495293685)*x_ref[2]
-        ref[3,3,0,1]=(1.04854406427)*x_ref[0]+(0.876270949531)*x_ref[1]+(0.291036304743)*x_ref[2]
-        ref[3,3,1,0]=(-1.66619451175)*x_ref[0]+(0.656275192484)*x_ref[1]+(-1.27104499942)*x_ref[2]
-        ref[3,3,1,1]=(1.55407146907)*x_ref[0]+(-0.322950943159)*x_ref[1]+(-0.287565403896)*x_ref[2]
-        ref[3,3,2,0]=(-1.54760268583)*x_ref[0]+(-1.45847761887)*x_ref[1]+(1.13939567009)*x_ref[2]
-        ref[3,3,2,1]=(1.24632351699)*x_ref[0]+(0.0265500081594)*x_ref[1]+(1.61925095159)*x_ref[2]
-        ref[3,4,0,0]=(-0.0430889433549)*x_ref[0]+(-1.46995559463)*x_ref[1]+(-1.14915159823)*x_ref[2]
-        ref[3,4,0,1]=(0.0392641403409)*x_ref[0]+(0.0603053049639)*x_ref[1]+(0.647321169934)*x_ref[2]
-        ref[3,4,1,0]=(-0.156300985227)*x_ref[0]+(0.79369911928)*x_ref[1]+(-0.413124762507)*x_ref[2]
-        ref[3,4,1,1]=(0.258402059015)*x_ref[0]+(0.00227307988585)*x_ref[1]+(0.70067141295)*x_ref[2]
-        ref[3,4,2,0]=(-1.15131298872)*x_ref[0]+(-0.627449043157)*x_ref[1]+(-0.402268345861)*x_ref[2]
-        ref[3,4,2,1]=(0.455934238179)*x_ref[0]+(-0.951120759108)*x_ref[1]+(-0.280459367131)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.203238386406)*x[0]**o+(0.734542238717)*x[0]+(-0.627248060056)*x[1]**o+(0.347224669854)*x[1]
-        ref=(0.203238386406)*x_ref[0]**o+(0.734542238717)*x_ref[0]+(-0.627248060056)*x_ref[1]**o+(0.347224669854)*x_ref[1]
-      else:
-        arg=(-0.387501489724)*x[0]**o+(0.752554332333)*x[0]+(-0.0831588271355)*x[1]**o+(0.615191870812)*x[1]+(-0.264702923622)*x[2]**o+(0.404594629993)*x[2]
-        ref=(-0.387501489724)*x_ref[0]**o+(0.752554332333)*x_ref[0]+(-0.0831588271355)*x_ref[1]**o+(0.615191870812)*x_ref[1]+(-0.264702923622)*x_ref[2]**o+(0.404594629993)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.938444792136)*x[0]**o+(-0.809407040724)*x[0]+(-0.963148615762)*x[1]**o+(-0.257000244129)*x[1]
-        arg[1]=(-0.791280640039)*x[0]**o+(0.293858623095)*x[0]+(0.964942589784)*x[1]**o+(0.522071353081)*x[1]
-        ref[0]=(0.938444792136)*x_ref[0]**o+(-0.809407040724)*x_ref[0]+(-0.963148615762)*x_ref[1]**o+(-0.257000244129)*x_ref[1]
-        ref[1]=(-0.791280640039)*x_ref[0]**o+(0.293858623095)*x_ref[0]+(0.964942589784)*x_ref[1]**o+(0.522071353081)*x_ref[1]
-      else:
-        arg[0]=(0.566110580666)*x[0]**o+(-0.89723913213)*x[0]+(-0.54781629706)*x[1]**o+(-0.0405507445628)*x[1]+(0.435477036501)*x[2]**o+(-0.296404435183)*x[2]
-        arg[1]=(-0.436126359475)*x[0]**o+(0.863706244241)*x[0]+(-0.149818409243)*x[1]**o+(-0.654801920098)*x[1]+(-0.281005092809)*x[2]**o+(-0.0257179420057)*x[2]
-        ref[0]=(0.566110580666)*x_ref[0]**o+(-0.89723913213)*x_ref[0]+(-0.54781629706)*x_ref[1]**o+(-0.0405507445628)*x_ref[1]+(0.435477036501)*x_ref[2]**o+(-0.296404435183)*x_ref[2]
-        ref[1]=(-0.436126359475)*x_ref[0]**o+(0.863706244241)*x_ref[0]+(-0.149818409243)*x_ref[1]**o+(-0.654801920098)*x_ref[1]+(-0.281005092809)*x_ref[2]**o+(-0.0257179420057)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0615713819144)*x[0]**o+(0.325133297443)*x[0]+(-0.529769594257)*x[1]**o+(-0.206126939263)*x[1]
-        arg[0,1]=(0.090956391947)*x[0]**o+(0.105841035331)*x[0]+(-0.537033610998)*x[1]**o+(0.429033781495)*x[1]
-        arg[0,2]=(-0.568216263139)*x[0]**o+(0.698057796806)*x[0]+(-0.0981614063428)*x[1]**o+(-0.952212332523)*x[1]
-        arg[0,3]=(0.128505813477)*x[0]**o+(0.206828305852)*x[0]+(0.938851873532)*x[1]**o+(-0.339234589281)*x[1]
-        arg[0,4]=(0.581805477855)*x[0]**o+(-0.621122347153)*x[0]+(-0.601029625565)*x[1]**o+(0.243084366725)*x[1]
-        arg[1,0]=(-0.342411991491)*x[0]**o+(0.642434320731)*x[0]+(-0.452657094515)*x[1]**o+(-0.899779109444)*x[1]
-        arg[1,1]=(-0.423230603077)*x[0]**o+(0.739600521332)*x[0]+(0.916226480419)*x[1]**o+(0.755264173162)*x[1]
-        arg[1,2]=(0.381864221314)*x[0]**o+(0.806402187902)*x[0]+(0.410055116458)*x[1]**o+(-0.264405213472)*x[1]
-        arg[1,3]=(0.293401427429)*x[0]**o+(-0.439209675154)*x[0]+(0.299588226145)*x[1]**o+(-0.289652201976)*x[1]
-        arg[1,4]=(0.157626502865)*x[0]**o+(0.32264788209)*x[0]+(0.284522039757)*x[1]**o+(-0.460413671191)*x[1]
-        arg[2,0]=(0.486148207)*x[0]**o+(0.0366950072658)*x[0]+(0.315299830901)*x[1]**o+(-0.320405042262)*x[1]
-        arg[2,1]=(0.207440897542)*x[0]**o+(-0.604659890692)*x[0]+(-0.64841431916)*x[1]**o+(0.0881921209641)*x[1]
-        arg[2,2]=(-0.61376840347)*x[0]**o+(0.421837679185)*x[0]+(-0.0445850531916)*x[1]**o+(0.771892018903)*x[1]
-        arg[2,3]=(0.632443182263)*x[0]**o+(-0.965297013012)*x[0]+(-0.029677959681)*x[1]**o+(0.598431910551)*x[1]
-        arg[2,4]=(-0.457656411094)*x[0]**o+(0.122435925199)*x[0]+(0.772690251937)*x[1]**o+(0.954829922926)*x[1]
-        arg[3,0]=(0.929112925461)*x[0]**o+(-0.35689901655)*x[0]+(-0.139192866782)*x[1]**o+(-0.677883436952)*x[1]
-        arg[3,1]=(-0.410318721103)*x[0]**o+(0.370830312699)*x[0]+(0.429011619434)*x[1]**o+(0.81780420854)*x[1]
-        arg[3,2]=(0.312456682985)*x[0]**o+(0.526447664999)*x[0]+(0.763610570932)*x[1]**o+(-0.631887901017)*x[1]
-        arg[3,3]=(0.749121567955)*x[0]**o+(0.168525340464)*x[0]+(-0.838409619895)*x[1]**o+(0.912745137098)*x[1]
-        arg[3,4]=(-0.665336604643)*x[0]**o+(0.638293226479)*x[0]+(0.515957084712)*x[1]**o+(-0.261426720977)*x[1]
-        ref[0,0]=(0.0615713819144)*x_ref[0]**o+(0.325133297443)*x_ref[0]+(-0.529769594257)*x_ref[1]**o+(-0.206126939263)*x_ref[1]
-        ref[0,1]=(0.090956391947)*x_ref[0]**o+(0.105841035331)*x_ref[0]+(-0.537033610998)*x_ref[1]**o+(0.429033781495)*x_ref[1]
-        ref[0,2]=(-0.568216263139)*x_ref[0]**o+(0.698057796806)*x_ref[0]+(-0.0981614063428)*x_ref[1]**o+(-0.952212332523)*x_ref[1]
-        ref[0,3]=(0.128505813477)*x_ref[0]**o+(0.206828305852)*x_ref[0]+(0.938851873532)*x_ref[1]**o+(-0.339234589281)*x_ref[1]
-        ref[0,4]=(0.581805477855)*x_ref[0]**o+(-0.621122347153)*x_ref[0]+(-0.601029625565)*x_ref[1]**o+(0.243084366725)*x_ref[1]
-        ref[1,0]=(-0.342411991491)*x_ref[0]**o+(0.642434320731)*x_ref[0]+(-0.452657094515)*x_ref[1]**o+(-0.899779109444)*x_ref[1]
-        ref[1,1]=(-0.423230603077)*x_ref[0]**o+(0.739600521332)*x_ref[0]+(0.916226480419)*x_ref[1]**o+(0.755264173162)*x_ref[1]
-        ref[1,2]=(0.381864221314)*x_ref[0]**o+(0.806402187902)*x_ref[0]+(0.410055116458)*x_ref[1]**o+(-0.264405213472)*x_ref[1]
-        ref[1,3]=(0.293401427429)*x_ref[0]**o+(-0.439209675154)*x_ref[0]+(0.299588226145)*x_ref[1]**o+(-0.289652201976)*x_ref[1]
-        ref[1,4]=(0.157626502865)*x_ref[0]**o+(0.32264788209)*x_ref[0]+(0.284522039757)*x_ref[1]**o+(-0.460413671191)*x_ref[1]
-        ref[2,0]=(0.486148207)*x_ref[0]**o+(0.0366950072658)*x_ref[0]+(0.315299830901)*x_ref[1]**o+(-0.320405042262)*x_ref[1]
-        ref[2,1]=(0.207440897542)*x_ref[0]**o+(-0.604659890692)*x_ref[0]+(-0.64841431916)*x_ref[1]**o+(0.0881921209641)*x_ref[1]
-        ref[2,2]=(-0.61376840347)*x_ref[0]**o+(0.421837679185)*x_ref[0]+(-0.0445850531916)*x_ref[1]**o+(0.771892018903)*x_ref[1]
-        ref[2,3]=(0.632443182263)*x_ref[0]**o+(-0.965297013012)*x_ref[0]+(-0.029677959681)*x_ref[1]**o+(0.598431910551)*x_ref[1]
-        ref[2,4]=(-0.457656411094)*x_ref[0]**o+(0.122435925199)*x_ref[0]+(0.772690251937)*x_ref[1]**o+(0.954829922926)*x_ref[1]
-        ref[3,0]=(0.929112925461)*x_ref[0]**o+(-0.35689901655)*x_ref[0]+(-0.139192866782)*x_ref[1]**o+(-0.677883436952)*x_ref[1]
-        ref[3,1]=(-0.410318721103)*x_ref[0]**o+(0.370830312699)*x_ref[0]+(0.429011619434)*x_ref[1]**o+(0.81780420854)*x_ref[1]
-        ref[3,2]=(0.312456682985)*x_ref[0]**o+(0.526447664999)*x_ref[0]+(0.763610570932)*x_ref[1]**o+(-0.631887901017)*x_ref[1]
-        ref[3,3]=(0.749121567955)*x_ref[0]**o+(0.168525340464)*x_ref[0]+(-0.838409619895)*x_ref[1]**o+(0.912745137098)*x_ref[1]
-        ref[3,4]=(-0.665336604643)*x_ref[0]**o+(0.638293226479)*x_ref[0]+(0.515957084712)*x_ref[1]**o+(-0.261426720977)*x_ref[1]
-      else:
-        arg[0,0]=(-0.330165086386)*x[0]**o+(0.60381119065)*x[0]+(0.981018763011)*x[1]**o+(0.0487965999608)*x[1]+(-0.389835388349)*x[2]**o+(0.111199857376)*x[2]
-        arg[0,1]=(0.518239033178)*x[0]**o+(0.60358784684)*x[0]+(-0.476990159655)*x[1]**o+(-0.93871565843)*x[1]+(-0.869845295741)*x[2]**o+(0.391409745802)*x[2]
-        arg[0,2]=(0.0927396115951)*x[0]**o+(0.546122822928)*x[0]+(-0.557424056733)*x[1]**o+(0.0623374966436)*x[1]+(-0.414595153536)*x[2]**o+(-0.196069073366)*x[2]
-        arg[0,3]=(-0.678432580882)*x[0]**o+(0.281850265141)*x[0]+(-0.323978960602)*x[1]**o+(0.655558769921)*x[1]+(-0.295747032089)*x[2]**o+(-0.152719838982)*x[2]
-        arg[0,4]=(-0.904177669203)*x[0]**o+(0.750395234205)*x[0]+(0.267431783461)*x[1]**o+(-0.781406235306)*x[1]+(0.856906655757)*x[2]**o+(-0.875554940224)*x[2]
-        arg[1,0]=(-0.243144846569)*x[0]**o+(0.970584922467)*x[0]+(-0.977250652473)*x[1]**o+(0.0239563255869)*x[1]+(-0.769423602851)*x[2]**o+(-0.433896361294)*x[2]
-        arg[1,1]=(0.31104031046)*x[0]**o+(0.899859709831)*x[0]+(0.692351561919)*x[1]**o+(-0.0838870550002)*x[1]+(-0.276105616798)*x[2]**o+(0.115501348248)*x[2]
-        arg[1,2]=(0.56702114595)*x[0]**o+(0.00240284646131)*x[0]+(-0.676314888884)*x[1]**o+(-0.678204346328)*x[1]+(0.472697088984)*x[2]**o+(-0.493949191712)*x[2]
-        arg[1,3]=(-0.242548554067)*x[0]**o+(0.980927507053)*x[0]+(-0.955706390436)*x[1]**o+(0.347031550126)*x[1]+(0.234352268238)*x[2]**o+(0.321126345333)*x[2]
-        arg[1,4]=(-0.390890566228)*x[0]**o+(-0.958497753144)*x[0]+(0.316397716043)*x[1]**o+(0.952289821769)*x[1]+(-0.027182029514)*x[2]**o+(-0.454422377872)*x[2]
-        arg[2,0]=(0.295865166318)*x[0]**o+(-0.301129718468)*x[0]+(-0.748135755269)*x[1]**o+(-0.762413814085)*x[1]+(0.572270067591)*x[2]**o+(-0.393847032684)*x[2]
-        arg[2,1]=(0.20229063622)*x[0]**o+(-0.768444028163)*x[0]+(0.378669775381)*x[1]**o+(-0.703384410944)*x[1]+(0.355653859396)*x[2]**o+(-0.228168949639)*x[2]
-        arg[2,2]=(-0.31725134742)*x[0]**o+(0.525802867508)*x[0]+(0.13375126758)*x[1]**o+(-0.673551491186)*x[1]+(0.498905883728)*x[2]**o+(-0.102794461221)*x[2]
-        arg[2,3]=(-0.396813838168)*x[0]**o+(0.0892605807843)*x[0]+(0.244133298111)*x[1]**o+(0.310900636168)*x[1]+(-0.256807063422)*x[2]**o+(0.565370697688)*x[2]
-        arg[2,4]=(0.42011835881)*x[0]**o+(0.439847594375)*x[0]+(0.0731897272006)*x[1]**o+(-0.373911054753)*x[1]+(-0.50313315963)*x[2]**o+(0.356362677601)*x[2]
-        arg[3,0]=(-0.444672845607)*x[0]**o+(-0.978424347535)*x[0]+(0.421699748442)*x[1]**o+(-0.0111798084161)*x[1]+(0.206042685881)*x[2]**o+(0.990523831215)*x[2]
-        arg[3,1]=(0.942429627068)*x[0]**o+(-0.769989484282)*x[0]+(-0.879916738075)*x[1]**o+(-0.746448112871)*x[1]+(0.280824650861)*x[2]**o+(0.0632084823022)*x[2]
-        arg[3,2]=(0.281070481177)*x[0]**o+(0.628020001876)*x[0]+(0.347767303962)*x[1]**o+(-0.276761252142)*x[1]+(0.950345260734)*x[2]**o+(-0.00148186335195)*x[2]
-        arg[3,3]=(-0.37590210465)*x[0]**o+(0.034147350068)*x[0]+(0.245173418336)*x[1]**o+(0.0564051241759)*x[1]+(-0.157928106127)*x[2]**o+(-0.611677441847)*x[2]
-        arg[3,4]=(-0.279066532276)*x[0]**o+(0.316033119063)*x[0]+(0.655948999472)*x[1]**o+(-0.520504180943)*x[1]+(0.531738158819)*x[2]**o+(0.899490827443)*x[2]
-        ref[0,0]=(-0.330165086386)*x_ref[0]**o+(0.60381119065)*x_ref[0]+(0.981018763011)*x_ref[1]**o+(0.0487965999608)*x_ref[1]+(-0.389835388349)*x_ref[2]**o+(0.111199857376)*x_ref[2]
-        ref[0,1]=(0.518239033178)*x_ref[0]**o+(0.60358784684)*x_ref[0]+(-0.476990159655)*x_ref[1]**o+(-0.93871565843)*x_ref[1]+(-0.869845295741)*x_ref[2]**o+(0.391409745802)*x_ref[2]
-        ref[0,2]=(0.0927396115951)*x_ref[0]**o+(0.546122822928)*x_ref[0]+(-0.557424056733)*x_ref[1]**o+(0.0623374966436)*x_ref[1]+(-0.414595153536)*x_ref[2]**o+(-0.196069073366)*x_ref[2]
-        ref[0,3]=(-0.678432580882)*x_ref[0]**o+(0.281850265141)*x_ref[0]+(-0.323978960602)*x_ref[1]**o+(0.655558769921)*x_ref[1]+(-0.295747032089)*x_ref[2]**o+(-0.152719838982)*x_ref[2]
-        ref[0,4]=(-0.904177669203)*x_ref[0]**o+(0.750395234205)*x_ref[0]+(0.267431783461)*x_ref[1]**o+(-0.781406235306)*x_ref[1]+(0.856906655757)*x_ref[2]**o+(-0.875554940224)*x_ref[2]
-        ref[1,0]=(-0.243144846569)*x_ref[0]**o+(0.970584922467)*x_ref[0]+(-0.977250652473)*x_ref[1]**o+(0.0239563255869)*x_ref[1]+(-0.769423602851)*x_ref[2]**o+(-0.433896361294)*x_ref[2]
-        ref[1,1]=(0.31104031046)*x_ref[0]**o+(0.899859709831)*x_ref[0]+(0.692351561919)*x_ref[1]**o+(-0.0838870550002)*x_ref[1]+(-0.276105616798)*x_ref[2]**o+(0.115501348248)*x_ref[2]
-        ref[1,2]=(0.56702114595)*x_ref[0]**o+(0.00240284646131)*x_ref[0]+(-0.676314888884)*x_ref[1]**o+(-0.678204346328)*x_ref[1]+(0.472697088984)*x_ref[2]**o+(-0.493949191712)*x_ref[2]
-        ref[1,3]=(-0.242548554067)*x_ref[0]**o+(0.980927507053)*x_ref[0]+(-0.955706390436)*x_ref[1]**o+(0.347031550126)*x_ref[1]+(0.234352268238)*x_ref[2]**o+(0.321126345333)*x_ref[2]
-        ref[1,4]=(-0.390890566228)*x_ref[0]**o+(-0.958497753144)*x_ref[0]+(0.316397716043)*x_ref[1]**o+(0.952289821769)*x_ref[1]+(-0.027182029514)*x_ref[2]**o+(-0.454422377872)*x_ref[2]
-        ref[2,0]=(0.295865166318)*x_ref[0]**o+(-0.301129718468)*x_ref[0]+(-0.748135755269)*x_ref[1]**o+(-0.762413814085)*x_ref[1]+(0.572270067591)*x_ref[2]**o+(-0.393847032684)*x_ref[2]
-        ref[2,1]=(0.20229063622)*x_ref[0]**o+(-0.768444028163)*x_ref[0]+(0.378669775381)*x_ref[1]**o+(-0.703384410944)*x_ref[1]+(0.355653859396)*x_ref[2]**o+(-0.228168949639)*x_ref[2]
-        ref[2,2]=(-0.31725134742)*x_ref[0]**o+(0.525802867508)*x_ref[0]+(0.13375126758)*x_ref[1]**o+(-0.673551491186)*x_ref[1]+(0.498905883728)*x_ref[2]**o+(-0.102794461221)*x_ref[2]
-        ref[2,3]=(-0.396813838168)*x_ref[0]**o+(0.0892605807843)*x_ref[0]+(0.244133298111)*x_ref[1]**o+(0.310900636168)*x_ref[1]+(-0.256807063422)*x_ref[2]**o+(0.565370697688)*x_ref[2]
-        ref[2,4]=(0.42011835881)*x_ref[0]**o+(0.439847594375)*x_ref[0]+(0.0731897272006)*x_ref[1]**o+(-0.373911054753)*x_ref[1]+(-0.50313315963)*x_ref[2]**o+(0.356362677601)*x_ref[2]
-        ref[3,0]=(-0.444672845607)*x_ref[0]**o+(-0.978424347535)*x_ref[0]+(0.421699748442)*x_ref[1]**o+(-0.0111798084161)*x_ref[1]+(0.206042685881)*x_ref[2]**o+(0.990523831215)*x_ref[2]
-        ref[3,1]=(0.942429627068)*x_ref[0]**o+(-0.769989484282)*x_ref[0]+(-0.879916738075)*x_ref[1]**o+(-0.746448112871)*x_ref[1]+(0.280824650861)*x_ref[2]**o+(0.0632084823022)*x_ref[2]
-        ref[3,2]=(0.281070481177)*x_ref[0]**o+(0.628020001876)*x_ref[0]+(0.347767303962)*x_ref[1]**o+(-0.276761252142)*x_ref[1]+(0.950345260734)*x_ref[2]**o+(-0.00148186335195)*x_ref[2]
-        ref[3,3]=(-0.37590210465)*x_ref[0]**o+(0.034147350068)*x_ref[0]+(0.245173418336)*x_ref[1]**o+(0.0564051241759)*x_ref[1]+(-0.157928106127)*x_ref[2]**o+(-0.611677441847)*x_ref[2]
-        ref[3,4]=(-0.279066532276)*x_ref[0]**o+(0.316033119063)*x_ref[0]+(0.655948999472)*x_ref[1]**o+(-0.520504180943)*x_ref[1]+(0.531738158819)*x_ref[2]**o+(0.899490827443)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.415438516191)*x[0]**o+(0.374659323173)*x[0]+(0.688470746611)*x[1]**o+(0.498183692176)*x[1]
-        arg[0,0,1]=(-0.846725329522)*x[0]**o+(0.414376816326)*x[0]+(0.651609661615)*x[1]**o+(0.357606396667)*x[1]
-        arg[0,1,0]=(0.728029172023)*x[0]**o+(0.975728459112)*x[0]+(-0.658211371639)*x[1]**o+(0.411894140351)*x[1]
-        arg[0,1,1]=(0.807350281817)*x[0]**o+(-0.369755733522)*x[0]+(-0.519483139314)*x[1]**o+(-0.709353537648)*x[1]
-        arg[1,0,0]=(0.0588259329479)*x[0]**o+(0.218362870441)*x[0]+(-0.0279239318934)*x[1]**o+(-0.75783635329)*x[1]
-        arg[1,0,1]=(-0.429573558505)*x[0]**o+(-0.339046134618)*x[0]+(0.412777825743)*x[1]**o+(-0.306607333437)*x[1]
-        arg[1,1,0]=(0.0222661407543)*x[0]**o+(0.927923674781)*x[0]+(-0.767468570033)*x[1]**o+(-0.0659150590367)*x[1]
-        arg[1,1,1]=(0.372811733787)*x[0]**o+(-0.286500260061)*x[0]+(-0.807504375569)*x[1]**o+(-0.992850148234)*x[1]
-        arg[2,0,0]=(0.368229828596)*x[0]**o+(0.672540290379)*x[0]+(-0.760462595095)*x[1]**o+(-0.761242492425)*x[1]
-        arg[2,0,1]=(0.306249523133)*x[0]**o+(0.769928924717)*x[0]+(0.610293800742)*x[1]**o+(-0.221996271153)*x[1]
-        arg[2,1,0]=(-0.909148832991)*x[0]**o+(-0.0293038712703)*x[0]+(-0.161707473269)*x[1]**o+(-0.534345319122)*x[1]
-        arg[2,1,1]=(-0.146432487737)*x[0]**o+(0.93729266958)*x[0]+(-0.561919238789)*x[1]**o+(-0.449440501171)*x[1]
-        arg[3,0,0]=(0.411711661035)*x[0]**o+(-0.0699878047274)*x[0]+(-0.0227688826645)*x[1]**o+(-0.939787633547)*x[1]
-        arg[3,0,1]=(-0.82108820245)*x[0]**o+(0.225501168847)*x[0]+(0.622921674682)*x[1]**o+(0.61092413094)*x[1]
-        arg[3,1,0]=(0.758116155912)*x[0]**o+(-0.117316615447)*x[0]+(0.0702245119124)*x[1]**o+(-0.275114508561)*x[1]
-        arg[3,1,1]=(-0.32568550821)*x[0]**o+(-0.280144846326)*x[0]+(0.194971187876)*x[1]**o+(-0.728447244746)*x[1]
-        arg[4,0,0]=(0.880042622981)*x[0]**o+(-0.395684607563)*x[0]+(-0.563304061265)*x[1]**o+(0.968663606772)*x[1]
-        arg[4,0,1]=(-0.515392712458)*x[0]**o+(0.820857647342)*x[0]+(-0.476289639495)*x[1]**o+(-0.478062589609)*x[1]
-        arg[4,1,0]=(0.534322425269)*x[0]**o+(0.975618695265)*x[0]+(-0.195764005045)*x[1]**o+(0.561996200643)*x[1]
-        arg[4,1,1]=(-0.906243138672)*x[0]**o+(-0.580985047294)*x[0]+(-0.094609405051)*x[1]**o+(0.734326711649)*x[1]
-        arg[5,0,0]=(-0.0655516121632)*x[0]**o+(0.785493123174)*x[0]+(-0.760068333675)*x[1]**o+(0.693869247554)*x[1]
-        arg[5,0,1]=(-0.931019838892)*x[0]**o+(0.80958291621)*x[0]+(-0.590591206111)*x[1]**o+(-0.800900346601)*x[1]
-        arg[5,1,0]=(0.448779048952)*x[0]**o+(-0.793450503268)*x[0]+(0.161067403301)*x[1]**o+(0.432054043544)*x[1]
-        arg[5,1,1]=(0.0423607361972)*x[0]**o+(-0.664958045702)*x[0]+(-0.174728816918)*x[1]**o+(-0.394390068699)*x[1]
-        ref[0,0,0]=(0.415438516191)*x_ref[0]**o+(0.374659323173)*x_ref[0]+(0.688470746611)*x_ref[1]**o+(0.498183692176)*x_ref[1]
-        ref[0,0,1]=(-0.846725329522)*x_ref[0]**o+(0.414376816326)*x_ref[0]+(0.651609661615)*x_ref[1]**o+(0.357606396667)*x_ref[1]
-        ref[0,1,0]=(0.728029172023)*x_ref[0]**o+(0.975728459112)*x_ref[0]+(-0.658211371639)*x_ref[1]**o+(0.411894140351)*x_ref[1]
-        ref[0,1,1]=(0.807350281817)*x_ref[0]**o+(-0.369755733522)*x_ref[0]+(-0.519483139314)*x_ref[1]**o+(-0.709353537648)*x_ref[1]
-        ref[1,0,0]=(0.0588259329479)*x_ref[0]**o+(0.218362870441)*x_ref[0]+(-0.0279239318934)*x_ref[1]**o+(-0.75783635329)*x_ref[1]
-        ref[1,0,1]=(-0.429573558505)*x_ref[0]**o+(-0.339046134618)*x_ref[0]+(0.412777825743)*x_ref[1]**o+(-0.306607333437)*x_ref[1]
-        ref[1,1,0]=(0.0222661407543)*x_ref[0]**o+(0.927923674781)*x_ref[0]+(-0.767468570033)*x_ref[1]**o+(-0.0659150590367)*x_ref[1]
-        ref[1,1,1]=(0.372811733787)*x_ref[0]**o+(-0.286500260061)*x_ref[0]+(-0.807504375569)*x_ref[1]**o+(-0.992850148234)*x_ref[1]
-        ref[2,0,0]=(0.368229828596)*x_ref[0]**o+(0.672540290379)*x_ref[0]+(-0.760462595095)*x_ref[1]**o+(-0.761242492425)*x_ref[1]
-        ref[2,0,1]=(0.306249523133)*x_ref[0]**o+(0.769928924717)*x_ref[0]+(0.610293800742)*x_ref[1]**o+(-0.221996271153)*x_ref[1]
-        ref[2,1,0]=(-0.909148832991)*x_ref[0]**o+(-0.0293038712703)*x_ref[0]+(-0.161707473269)*x_ref[1]**o+(-0.534345319122)*x_ref[1]
-        ref[2,1,1]=(-0.146432487737)*x_ref[0]**o+(0.93729266958)*x_ref[0]+(-0.561919238789)*x_ref[1]**o+(-0.449440501171)*x_ref[1]
-        ref[3,0,0]=(0.411711661035)*x_ref[0]**o+(-0.0699878047274)*x_ref[0]+(-0.0227688826645)*x_ref[1]**o+(-0.939787633547)*x_ref[1]
-        ref[3,0,1]=(-0.82108820245)*x_ref[0]**o+(0.225501168847)*x_ref[0]+(0.622921674682)*x_ref[1]**o+(0.61092413094)*x_ref[1]
-        ref[3,1,0]=(0.758116155912)*x_ref[0]**o+(-0.117316615447)*x_ref[0]+(0.0702245119124)*x_ref[1]**o+(-0.275114508561)*x_ref[1]
-        ref[3,1,1]=(-0.32568550821)*x_ref[0]**o+(-0.280144846326)*x_ref[0]+(0.194971187876)*x_ref[1]**o+(-0.728447244746)*x_ref[1]
-        ref[4,0,0]=(0.880042622981)*x_ref[0]**o+(-0.395684607563)*x_ref[0]+(-0.563304061265)*x_ref[1]**o+(0.968663606772)*x_ref[1]
-        ref[4,0,1]=(-0.515392712458)*x_ref[0]**o+(0.820857647342)*x_ref[0]+(-0.476289639495)*x_ref[1]**o+(-0.478062589609)*x_ref[1]
-        ref[4,1,0]=(0.534322425269)*x_ref[0]**o+(0.975618695265)*x_ref[0]+(-0.195764005045)*x_ref[1]**o+(0.561996200643)*x_ref[1]
-        ref[4,1,1]=(-0.906243138672)*x_ref[0]**o+(-0.580985047294)*x_ref[0]+(-0.094609405051)*x_ref[1]**o+(0.734326711649)*x_ref[1]
-        ref[5,0,0]=(-0.0655516121632)*x_ref[0]**o+(0.785493123174)*x_ref[0]+(-0.760068333675)*x_ref[1]**o+(0.693869247554)*x_ref[1]
-        ref[5,0,1]=(-0.931019838892)*x_ref[0]**o+(0.80958291621)*x_ref[0]+(-0.590591206111)*x_ref[1]**o+(-0.800900346601)*x_ref[1]
-        ref[5,1,0]=(0.448779048952)*x_ref[0]**o+(-0.793450503268)*x_ref[0]+(0.161067403301)*x_ref[1]**o+(0.432054043544)*x_ref[1]
-        ref[5,1,1]=(0.0423607361972)*x_ref[0]**o+(-0.664958045702)*x_ref[0]+(-0.174728816918)*x_ref[1]**o+(-0.394390068699)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.34355250678)*x[0]**o+(0.554590991175)*x[0]+(0.00673862595967)*x[1]**o+(-0.405764224977)*x[1]+(0.0865564883661)*x[2]**o+(0.102294137607)*x[2]
-        arg[0,0,1]=(0.855234460708)*x[0]**o+(-0.710901486015)*x[0]+(0.546393138087)*x[1]**o+(0.847113479239)*x[1]+(-0.650701604407)*x[2]**o+(-0.914755510262)*x[2]
-        arg[0,1,0]=(0.252544568503)*x[0]**o+(-0.473471976093)*x[0]+(-0.587315274764)*x[1]**o+(-0.269940894375)*x[1]+(0.360340735507)*x[2]**o+(-0.745440004827)*x[2]
-        arg[0,1,1]=(0.11967506555)*x[0]**o+(0.696836453942)*x[0]+(-0.871162187396)*x[1]**o+(-0.315170111067)*x[1]+(0.232066109266)*x[2]**o+(-0.464730524838)*x[2]
-        arg[1,0,0]=(-0.790535662997)*x[0]**o+(-0.964779159884)*x[0]+(-0.689937881374)*x[1]**o+(0.422799231262)*x[1]+(-0.97315874804)*x[2]**o+(-0.532103115205)*x[2]
-        arg[1,0,1]=(-0.0487589554945)*x[0]**o+(-0.622735713658)*x[0]+(-0.520842613265)*x[1]**o+(0.803711422599)*x[1]+(0.440648875556)*x[2]**o+(0.98786672574)*x[2]
-        arg[1,1,0]=(0.811189977538)*x[0]**o+(0.0175150486788)*x[0]+(-0.124328899976)*x[1]**o+(-0.942398680503)*x[1]+(-0.149270209895)*x[2]**o+(-0.853084407696)*x[2]
-        arg[1,1,1]=(0.688378159744)*x[0]**o+(0.408766927878)*x[0]+(0.834128919609)*x[1]**o+(0.253605923886)*x[1]+(0.424992121054)*x[2]**o+(0.21016117963)*x[2]
-        arg[2,0,0]=(0.277469067087)*x[0]**o+(0.539821557611)*x[0]+(0.348679402521)*x[1]**o+(-0.469772506537)*x[1]+(0.454583229137)*x[2]**o+(0.653681481133)*x[2]
-        arg[2,0,1]=(-0.934067178483)*x[0]**o+(-0.172735098497)*x[0]+(-0.0347256850948)*x[1]**o+(-0.459971424944)*x[1]+(0.932661853019)*x[2]**o+(-0.186822590955)*x[2]
-        arg[2,1,0]=(0.71698574321)*x[0]**o+(-0.197244831261)*x[0]+(0.183419576182)*x[1]**o+(-0.871451480853)*x[1]+(-0.349396269955)*x[2]**o+(0.095909246936)*x[2]
-        arg[2,1,1]=(-0.00972985962106)*x[0]**o+(-0.919204152811)*x[0]+(-0.751744404365)*x[1]**o+(0.377096436852)*x[1]+(-0.924228885362)*x[2]**o+(0.451053813959)*x[2]
-        arg[3,0,0]=(0.951119968373)*x[0]**o+(-0.0680027504528)*x[0]+(-0.113660990287)*x[1]**o+(-0.428999453003)*x[1]+(0.171804544103)*x[2]**o+(0.677635036297)*x[2]
-        arg[3,0,1]=(0.62534864581)*x[0]**o+(0.389496246771)*x[0]+(0.621295327948)*x[1]**o+(-0.684165739023)*x[1]+(0.258637161492)*x[2]**o+(0.0441460764076)*x[2]
-        arg[3,1,0]=(0.0348922721145)*x[0]**o+(0.091201286767)*x[0]+(0.421079169132)*x[1]**o+(-0.616504862591)*x[1]+(0.563927673176)*x[2]**o+(-0.183993394822)*x[2]
-        arg[3,1,1]=(0.657959811783)*x[0]**o+(0.229729671382)*x[0]+(0.549853155207)*x[1]**o+(-0.847412930565)*x[1]+(-0.0780682500337)*x[2]**o+(0.574435563406)*x[2]
-        arg[4,0,0]=(-0.679988515344)*x[0]**o+(0.0517331630343)*x[0]+(-0.160281064879)*x[1]**o+(-0.0672405944261)*x[1]+(-0.118968444607)*x[2]**o+(0.00980065834148)*x[2]
-        arg[4,0,1]=(-0.150457972951)*x[0]**o+(0.671586511406)*x[0]+(-0.844112675259)*x[1]**o+(0.42766255101)*x[1]+(-0.22449721018)*x[2]**o+(-0.150416151059)*x[2]
-        arg[4,1,0]=(0.0768992597753)*x[0]**o+(0.0139605476692)*x[0]+(-0.831269554863)*x[1]**o+(-0.279339344511)*x[1]+(0.387318821185)*x[2]**o+(0.967687121678)*x[2]
-        arg[4,1,1]=(-0.670585948598)*x[0]**o+(0.422715818654)*x[0]+(0.623702390878)*x[1]**o+(0.922646081646)*x[1]+(-0.714191287039)*x[2]**o+(-0.99018084869)*x[2]
-        arg[5,0,0]=(0.100273819257)*x[0]**o+(-0.769422291863)*x[0]+(-0.152611272068)*x[1]**o+(-0.396798631305)*x[1]+(0.502251047462)*x[2]**o+(0.993791216449)*x[2]
-        arg[5,0,1]=(-0.0222540900657)*x[0]**o+(-0.339810353987)*x[0]+(0.241665078696)*x[1]**o+(0.111020568564)*x[1]+(0.298147316931)*x[2]**o+(0.391278660594)*x[2]
-        arg[5,1,0]=(0.828297599555)*x[0]**o+(0.237678875371)*x[0]+(0.924551126274)*x[1]**o+(-0.663695049485)*x[1]+(-0.547123493132)*x[2]**o+(-0.788635745118)*x[2]
-        arg[5,1,1]=(0.0726334370982)*x[0]**o+(-0.875688492957)*x[0]+(0.473726235108)*x[1]**o+(0.023025596151)*x[1]+(0.827449396402)*x[2]**o+(-0.154698941604)*x[2]
-        ref[0,0,0]=(0.34355250678)*x_ref[0]**o+(0.554590991175)*x_ref[0]+(0.00673862595967)*x_ref[1]**o+(-0.405764224977)*x_ref[1]+(0.0865564883661)*x_ref[2]**o+(0.102294137607)*x_ref[2]
-        ref[0,0,1]=(0.855234460708)*x_ref[0]**o+(-0.710901486015)*x_ref[0]+(0.546393138087)*x_ref[1]**o+(0.847113479239)*x_ref[1]+(-0.650701604407)*x_ref[2]**o+(-0.914755510262)*x_ref[2]
-        ref[0,1,0]=(0.252544568503)*x_ref[0]**o+(-0.473471976093)*x_ref[0]+(-0.587315274764)*x_ref[1]**o+(-0.269940894375)*x_ref[1]+(0.360340735507)*x_ref[2]**o+(-0.745440004827)*x_ref[2]
-        ref[0,1,1]=(0.11967506555)*x_ref[0]**o+(0.696836453942)*x_ref[0]+(-0.871162187396)*x_ref[1]**o+(-0.315170111067)*x_ref[1]+(0.232066109266)*x_ref[2]**o+(-0.464730524838)*x_ref[2]
-        ref[1,0,0]=(-0.790535662997)*x_ref[0]**o+(-0.964779159884)*x_ref[0]+(-0.689937881374)*x_ref[1]**o+(0.422799231262)*x_ref[1]+(-0.97315874804)*x_ref[2]**o+(-0.532103115205)*x_ref[2]
-        ref[1,0,1]=(-0.0487589554945)*x_ref[0]**o+(-0.622735713658)*x_ref[0]+(-0.520842613265)*x_ref[1]**o+(0.803711422599)*x_ref[1]+(0.440648875556)*x_ref[2]**o+(0.98786672574)*x_ref[2]
-        ref[1,1,0]=(0.811189977538)*x_ref[0]**o+(0.0175150486788)*x_ref[0]+(-0.124328899976)*x_ref[1]**o+(-0.942398680503)*x_ref[1]+(-0.149270209895)*x_ref[2]**o+(-0.853084407696)*x_ref[2]
-        ref[1,1,1]=(0.688378159744)*x_ref[0]**o+(0.408766927878)*x_ref[0]+(0.834128919609)*x_ref[1]**o+(0.253605923886)*x_ref[1]+(0.424992121054)*x_ref[2]**o+(0.21016117963)*x_ref[2]
-        ref[2,0,0]=(0.277469067087)*x_ref[0]**o+(0.539821557611)*x_ref[0]+(0.348679402521)*x_ref[1]**o+(-0.469772506537)*x_ref[1]+(0.454583229137)*x_ref[2]**o+(0.653681481133)*x_ref[2]
-        ref[2,0,1]=(-0.934067178483)*x_ref[0]**o+(-0.172735098497)*x_ref[0]+(-0.0347256850948)*x_ref[1]**o+(-0.459971424944)*x_ref[1]+(0.932661853019)*x_ref[2]**o+(-0.186822590955)*x_ref[2]
-        ref[2,1,0]=(0.71698574321)*x_ref[0]**o+(-0.197244831261)*x_ref[0]+(0.183419576182)*x_ref[1]**o+(-0.871451480853)*x_ref[1]+(-0.349396269955)*x_ref[2]**o+(0.095909246936)*x_ref[2]
-        ref[2,1,1]=(-0.00972985962106)*x_ref[0]**o+(-0.919204152811)*x_ref[0]+(-0.751744404365)*x_ref[1]**o+(0.377096436852)*x_ref[1]+(-0.924228885362)*x_ref[2]**o+(0.451053813959)*x_ref[2]
-        ref[3,0,0]=(0.951119968373)*x_ref[0]**o+(-0.0680027504528)*x_ref[0]+(-0.113660990287)*x_ref[1]**o+(-0.428999453003)*x_ref[1]+(0.171804544103)*x_ref[2]**o+(0.677635036297)*x_ref[2]
-        ref[3,0,1]=(0.62534864581)*x_ref[0]**o+(0.389496246771)*x_ref[0]+(0.621295327948)*x_ref[1]**o+(-0.684165739023)*x_ref[1]+(0.258637161492)*x_ref[2]**o+(0.0441460764076)*x_ref[2]
-        ref[3,1,0]=(0.0348922721145)*x_ref[0]**o+(0.091201286767)*x_ref[0]+(0.421079169132)*x_ref[1]**o+(-0.616504862591)*x_ref[1]+(0.563927673176)*x_ref[2]**o+(-0.183993394822)*x_ref[2]
-        ref[3,1,1]=(0.657959811783)*x_ref[0]**o+(0.229729671382)*x_ref[0]+(0.549853155207)*x_ref[1]**o+(-0.847412930565)*x_ref[1]+(-0.0780682500337)*x_ref[2]**o+(0.574435563406)*x_ref[2]
-        ref[4,0,0]=(-0.679988515344)*x_ref[0]**o+(0.0517331630343)*x_ref[0]+(-0.160281064879)*x_ref[1]**o+(-0.0672405944261)*x_ref[1]+(-0.118968444607)*x_ref[2]**o+(0.00980065834148)*x_ref[2]
-        ref[4,0,1]=(-0.150457972951)*x_ref[0]**o+(0.671586511406)*x_ref[0]+(-0.844112675259)*x_ref[1]**o+(0.42766255101)*x_ref[1]+(-0.22449721018)*x_ref[2]**o+(-0.150416151059)*x_ref[2]
-        ref[4,1,0]=(0.0768992597753)*x_ref[0]**o+(0.0139605476692)*x_ref[0]+(-0.831269554863)*x_ref[1]**o+(-0.279339344511)*x_ref[1]+(0.387318821185)*x_ref[2]**o+(0.967687121678)*x_ref[2]
-        ref[4,1,1]=(-0.670585948598)*x_ref[0]**o+(0.422715818654)*x_ref[0]+(0.623702390878)*x_ref[1]**o+(0.922646081646)*x_ref[1]+(-0.714191287039)*x_ref[2]**o+(-0.99018084869)*x_ref[2]
-        ref[5,0,0]=(0.100273819257)*x_ref[0]**o+(-0.769422291863)*x_ref[0]+(-0.152611272068)*x_ref[1]**o+(-0.396798631305)*x_ref[1]+(0.502251047462)*x_ref[2]**o+(0.993791216449)*x_ref[2]
-        ref[5,0,1]=(-0.0222540900657)*x_ref[0]**o+(-0.339810353987)*x_ref[0]+(0.241665078696)*x_ref[1]**o+(0.111020568564)*x_ref[1]+(0.298147316931)*x_ref[2]**o+(0.391278660594)*x_ref[2]
-        ref[5,1,0]=(0.828297599555)*x_ref[0]**o+(0.237678875371)*x_ref[0]+(0.924551126274)*x_ref[1]**o+(-0.663695049485)*x_ref[1]+(-0.547123493132)*x_ref[2]**o+(-0.788635745118)*x_ref[2]
-        ref[5,1,1]=(0.0726334370982)*x_ref[0]**o+(-0.875688492957)*x_ref[0]+(0.473726235108)*x_ref[1]**o+(0.023025596151)*x_ref[1]+(0.827449396402)*x_ref[2]**o+(-0.154698941604)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0338299192888)*x[0]**o+(-0.114906274359)*x[0]+(0.15010339398)*x[1]**o+(0.625295991328)*x[1]
-        arg[0,0,0,1]=(-0.1311901039)*x[0]**o+(-0.551712861217)*x[0]+(-0.287411404506)*x[1]**o+(0.0242820629572)*x[1]
-        arg[0,0,1,0]=(0.121962094111)*x[0]**o+(0.203169622345)*x[0]+(0.241504218053)*x[1]**o+(-0.0696356239498)*x[1]
-        arg[0,0,1,1]=(0.0461537352329)*x[0]**o+(-0.275908938567)*x[0]+(-0.271184121027)*x[1]**o+(-0.364024729567)*x[1]
-        arg[0,0,2,0]=(0.199272234315)*x[0]**o+(-0.906364258855)*x[0]+(-0.92102930037)*x[1]**o+(0.0718981903454)*x[1]
-        arg[0,0,2,1]=(-0.742950958383)*x[0]**o+(0.0301464847722)*x[0]+(0.466993477687)*x[1]**o+(-0.402131750698)*x[1]
-        arg[0,1,0,0]=(-0.0653776546375)*x[0]**o+(-0.679360612372)*x[0]+(-0.32783837768)*x[1]**o+(-0.113753016428)*x[1]
-        arg[0,1,0,1]=(0.58610119414)*x[0]**o+(0.142613166231)*x[0]+(0.0409105619986)*x[1]**o+(-0.660641663558)*x[1]
-        arg[0,1,1,0]=(0.212172308585)*x[0]**o+(-0.452767768344)*x[0]+(0.963053969889)*x[1]**o+(0.752691773953)*x[1]
-        arg[0,1,1,1]=(-0.514998377887)*x[0]**o+(0.0872464329801)*x[0]+(0.265590295505)*x[1]**o+(0.557238826549)*x[1]
-        arg[0,1,2,0]=(0.360523954724)*x[0]**o+(0.550238402994)*x[0]+(-0.206349415539)*x[1]**o+(0.357304730511)*x[1]
-        arg[0,1,2,1]=(-0.872755217435)*x[0]**o+(0.190943683664)*x[0]+(-0.245454292354)*x[1]**o+(0.507229578506)*x[1]
-        arg[0,2,0,0]=(0.994619505257)*x[0]**o+(0.33482820568)*x[0]+(-0.12721791236)*x[1]**o+(-0.505873171195)*x[1]
-        arg[0,2,0,1]=(0.224805131522)*x[0]**o+(0.332022434603)*x[0]+(0.0583494507268)*x[1]**o+(0.857185410994)*x[1]
-        arg[0,2,1,0]=(-0.425367077516)*x[0]**o+(-0.25207101061)*x[0]+(-0.11164491753)*x[1]**o+(0.44752084285)*x[1]
-        arg[0,2,1,1]=(-0.158725210751)*x[0]**o+(-0.0692363138932)*x[0]+(0.214803128256)*x[1]**o+(0.886699106748)*x[1]
-        arg[0,2,2,0]=(-0.332146331257)*x[0]**o+(0.114845050128)*x[0]+(-0.0781411611124)*x[1]**o+(0.474972057387)*x[1]
-        arg[0,2,2,1]=(-0.481949630694)*x[0]**o+(0.644984972151)*x[0]+(0.171146519527)*x[1]**o+(0.57534803966)*x[1]
-        arg[0,3,0,0]=(0.7580633024)*x[0]**o+(0.0280511776577)*x[0]+(0.375583652078)*x[1]**o+(-0.809112787284)*x[1]
-        arg[0,3,0,1]=(-0.466737159934)*x[0]**o+(0.410032775686)*x[0]+(0.176141189584)*x[1]**o+(-0.228288309456)*x[1]
-        arg[0,3,1,0]=(0.427129582196)*x[0]**o+(-0.718385859483)*x[0]+(-0.172261212989)*x[1]**o+(0.913157476188)*x[1]
-        arg[0,3,1,1]=(0.952506706487)*x[0]**o+(-0.497478163899)*x[0]+(-0.930273038716)*x[1]**o+(0.673573149025)*x[1]
-        arg[0,3,2,0]=(-0.0074302930747)*x[0]**o+(0.226424842035)*x[0]+(0.871190620671)*x[1]**o+(0.277695333679)*x[1]
-        arg[0,3,2,1]=(-0.540820239946)*x[0]**o+(0.33044763211)*x[0]+(-0.772648820924)*x[1]**o+(-0.362410088021)*x[1]
-        arg[0,4,0,0]=(-0.748396039111)*x[0]**o+(0.215131518212)*x[0]+(0.514087824403)*x[1]**o+(0.335563854205)*x[1]
-        arg[0,4,0,1]=(-0.443263590391)*x[0]**o+(-0.523167282542)*x[0]+(0.122612452799)*x[1]**o+(0.216527857615)*x[1]
-        arg[0,4,1,0]=(0.448176296777)*x[0]**o+(0.478292146131)*x[0]+(-0.558921083502)*x[1]**o+(-0.17018258654)*x[1]
-        arg[0,4,1,1]=(-0.912765673953)*x[0]**o+(0.751746623223)*x[0]+(-0.104811579057)*x[1]**o+(0.456436870323)*x[1]
-        arg[0,4,2,0]=(0.157946450932)*x[0]**o+(0.147858587857)*x[0]+(0.775747362874)*x[1]**o+(0.478478862463)*x[1]
-        arg[0,4,2,1]=(-0.819625058185)*x[0]**o+(-0.0231980393919)*x[0]+(-0.186647585522)*x[1]**o+(0.513350371371)*x[1]
-        arg[1,0,0,0]=(-0.942373946995)*x[0]**o+(-0.761326160931)*x[0]+(0.192511867167)*x[1]**o+(-0.50895969579)*x[1]
-        arg[1,0,0,1]=(0.0670813349951)*x[0]**o+(0.55602953512)*x[0]+(0.757621178635)*x[1]**o+(0.741550201759)*x[1]
-        arg[1,0,1,0]=(-0.114642609493)*x[0]**o+(-0.639500048447)*x[0]+(-0.861813039243)*x[1]**o+(0.36413406744)*x[1]
-        arg[1,0,1,1]=(0.126555451594)*x[0]**o+(-0.885172557082)*x[0]+(-0.376073252921)*x[1]**o+(0.166102850653)*x[1]
-        arg[1,0,2,0]=(-0.381517068219)*x[0]**o+(0.94870328267)*x[0]+(-0.129934777755)*x[1]**o+(0.78090715758)*x[1]
-        arg[1,0,2,1]=(-0.535852302247)*x[0]**o+(0.63751039318)*x[0]+(-0.537556159925)*x[1]**o+(0.147766714221)*x[1]
-        arg[1,1,0,0]=(-0.605543047533)*x[0]**o+(-0.366612785372)*x[0]+(0.544900149212)*x[1]**o+(0.722108900447)*x[1]
-        arg[1,1,0,1]=(0.133378561142)*x[0]**o+(-0.227808772494)*x[0]+(-0.729399624175)*x[1]**o+(0.307571743455)*x[1]
-        arg[1,1,1,0]=(0.0458830538139)*x[0]**o+(0.0585044493026)*x[0]+(-0.136630547605)*x[1]**o+(-0.0823288389309)*x[1]
-        arg[1,1,1,1]=(0.339263808784)*x[0]**o+(0.00988917109076)*x[0]+(-0.786591838083)*x[1]**o+(-0.361686799179)*x[1]
-        arg[1,1,2,0]=(0.789942037592)*x[0]**o+(-0.266689758676)*x[0]+(0.464856327495)*x[1]**o+(0.138022774293)*x[1]
-        arg[1,1,2,1]=(-0.723544867217)*x[0]**o+(-0.523023674205)*x[0]+(0.629726026331)*x[1]**o+(-0.867808120997)*x[1]
-        arg[1,2,0,0]=(-0.495589518787)*x[0]**o+(-0.561664880262)*x[0]+(0.0319320417078)*x[1]**o+(-0.153720661498)*x[1]
-        arg[1,2,0,1]=(0.293168114024)*x[0]**o+(-0.344107163981)*x[0]+(-0.275629670068)*x[1]**o+(0.06103653487)*x[1]
-        arg[1,2,1,0]=(0.495640927339)*x[0]**o+(0.596540095043)*x[0]+(0.208792567756)*x[1]**o+(0.886040724145)*x[1]
-        arg[1,2,1,1]=(0.331476398093)*x[0]**o+(-0.472588572455)*x[0]+(-0.455670457285)*x[1]**o+(-0.731223615642)*x[1]
-        arg[1,2,2,0]=(-0.127107829674)*x[0]**o+(-0.21113128456)*x[0]+(-0.733928194168)*x[1]**o+(-0.174127696853)*x[1]
-        arg[1,2,2,1]=(0.521879316151)*x[0]**o+(0.983424557865)*x[0]+(-0.288659660182)*x[1]**o+(-0.431045203113)*x[1]
-        arg[1,3,0,0]=(0.292348765746)*x[0]**o+(0.0730741240915)*x[0]+(0.079624022683)*x[1]**o+(0.237483071633)*x[1]
-        arg[1,3,0,1]=(0.291035771848)*x[0]**o+(-0.482909477855)*x[0]+(-0.999142129615)*x[1]**o+(-0.559723367197)*x[1]
-        arg[1,3,1,0]=(0.747096275653)*x[0]**o+(0.762757649624)*x[0]+(-0.821650889507)*x[1]**o+(0.301128670189)*x[1]
-        arg[1,3,1,1]=(0.82703681414)*x[0]**o+(-0.336570070436)*x[0]+(0.798131952979)*x[1]**o+(0.603562737956)*x[1]
-        arg[1,3,2,0]=(-0.164875914126)*x[0]**o+(0.219409873902)*x[0]+(0.784253160678)*x[1]**o+(0.0219597460707)*x[1]
-        arg[1,3,2,1]=(0.124778899794)*x[0]**o+(0.785367842145)*x[0]+(0.948111125908)*x[1]**o+(-0.887427847089)*x[1]
-        arg[1,4,0,0]=(0.0911816002883)*x[0]**o+(0.645410022441)*x[0]+(0.720551531965)*x[1]**o+(-0.388407683413)*x[1]
-        arg[1,4,0,1]=(-0.0416762613062)*x[0]**o+(-0.548874829834)*x[0]+(-0.377952555557)*x[1]**o+(0.742795234361)*x[1]
-        arg[1,4,1,0]=(-0.896929017971)*x[0]**o+(0.678343686516)*x[0]+(0.711572763082)*x[1]**o+(-0.43397331651)*x[1]
-        arg[1,4,1,1]=(-0.190804421566)*x[0]**o+(-0.0848405124789)*x[0]+(0.36246957905)*x[1]**o+(0.963599086227)*x[1]
-        arg[1,4,2,0]=(-0.0210248567982)*x[0]**o+(0.545977814581)*x[0]+(0.858962864401)*x[1]**o+(0.113792851997)*x[1]
-        arg[1,4,2,1]=(0.229641892622)*x[0]**o+(-0.739561617198)*x[0]+(-0.164372740617)*x[1]**o+(0.537097868843)*x[1]
-        arg[2,0,0,0]=(-0.13321389343)*x[0]**o+(-0.668403350503)*x[0]+(-0.924879105983)*x[1]**o+(-0.5161790717)*x[1]
-        arg[2,0,0,1]=(0.26582844685)*x[0]**o+(0.89048660684)*x[0]+(-0.377225981719)*x[1]**o+(-0.303790710194)*x[1]
-        arg[2,0,1,0]=(0.0997470860283)*x[0]**o+(0.0385427264217)*x[0]+(-0.71387347273)*x[1]**o+(-0.621376499192)*x[1]
-        arg[2,0,1,1]=(0.595544616326)*x[0]**o+(-0.850529503975)*x[0]+(0.602203957938)*x[1]**o+(-0.329484843907)*x[1]
-        arg[2,0,2,0]=(-0.106031967029)*x[0]**o+(-0.165122821622)*x[0]+(0.647473815919)*x[1]**o+(0.28942226062)*x[1]
-        arg[2,0,2,1]=(0.585955875472)*x[0]**o+(0.922667710403)*x[0]+(-0.0710905957841)*x[1]**o+(-0.669138163697)*x[1]
-        arg[2,1,0,0]=(0.461941211081)*x[0]**o+(0.723022466263)*x[0]+(-0.118551893472)*x[1]**o+(0.00445187353637)*x[1]
-        arg[2,1,0,1]=(-0.253168248108)*x[0]**o+(0.476938842605)*x[0]+(0.476641658034)*x[1]**o+(-0.916886387595)*x[1]
-        arg[2,1,1,0]=(0.722029309503)*x[0]**o+(0.0588848593425)*x[0]+(0.84737370043)*x[1]**o+(-0.674604415213)*x[1]
-        arg[2,1,1,1]=(-0.644736759298)*x[0]**o+(-0.212847303893)*x[0]+(0.25394587552)*x[1]**o+(-0.366955175081)*x[1]
-        arg[2,1,2,0]=(-0.657395296801)*x[0]**o+(-0.967570027599)*x[0]+(0.180926628541)*x[1]**o+(-0.940599897942)*x[1]
-        arg[2,1,2,1]=(0.849897328801)*x[0]**o+(-0.299199474051)*x[0]+(0.427221207827)*x[1]**o+(0.212027985441)*x[1]
-        arg[2,2,0,0]=(-0.561573507381)*x[0]**o+(-0.446925224908)*x[0]+(0.132091224948)*x[1]**o+(-0.673375661849)*x[1]
-        arg[2,2,0,1]=(-0.386657291574)*x[0]**o+(0.356784637112)*x[0]+(0.644292006233)*x[1]**o+(0.922937167842)*x[1]
-        arg[2,2,1,0]=(0.484446757285)*x[0]**o+(-0.822469870455)*x[0]+(-0.89605890123)*x[1]**o+(-0.895891500031)*x[1]
-        arg[2,2,1,1]=(-0.0930740520192)*x[0]**o+(0.953356473678)*x[0]+(-0.714418458806)*x[1]**o+(-0.100584950946)*x[1]
-        arg[2,2,2,0]=(0.945572242667)*x[0]**o+(-0.259280849605)*x[0]+(-0.925459846341)*x[1]**o+(0.906002758873)*x[1]
-        arg[2,2,2,1]=(-0.638993332975)*x[0]**o+(-0.668594641703)*x[0]+(0.012666231369)*x[1]**o+(0.89732685856)*x[1]
-        arg[2,3,0,0]=(-0.885061116144)*x[0]**o+(-0.576097536483)*x[0]+(-0.43166075788)*x[1]**o+(0.538821620917)*x[1]
-        arg[2,3,0,1]=(-0.0743638381797)*x[0]**o+(0.251037500035)*x[0]+(-0.905989928076)*x[1]**o+(0.243771000867)*x[1]
-        arg[2,3,1,0]=(-0.016045622351)*x[0]**o+(-0.632944072174)*x[0]+(-0.296175918793)*x[1]**o+(-0.00120123641365)*x[1]
-        arg[2,3,1,1]=(-0.896354921812)*x[0]**o+(-0.331348989027)*x[0]+(-0.450865285201)*x[1]**o+(-0.243268582009)*x[1]
-        arg[2,3,2,0]=(0.609332927431)*x[0]**o+(-0.0815856802115)*x[0]+(0.201924792273)*x[1]**o+(-0.890424451348)*x[1]
-        arg[2,3,2,1]=(0.395090137264)*x[0]**o+(0.294230442573)*x[0]+(-0.345371510364)*x[1]**o+(0.181229663241)*x[1]
-        arg[2,4,0,0]=(-0.823684509034)*x[0]**o+(0.431019301942)*x[0]+(0.554707015054)*x[1]**o+(-0.846322903003)*x[1]
-        arg[2,4,0,1]=(0.862984476658)*x[0]**o+(0.20512500102)*x[0]+(0.0247756159287)*x[1]**o+(-0.374795100946)*x[1]
-        arg[2,4,1,0]=(-0.0849914269517)*x[0]**o+(0.754908200339)*x[0]+(0.593363754807)*x[1]**o+(0.124923961126)*x[1]
-        arg[2,4,1,1]=(-0.691440264234)*x[0]**o+(0.825739298015)*x[0]+(0.426452231478)*x[1]**o+(0.0995610721341)*x[1]
-        arg[2,4,2,0]=(-0.175322750567)*x[0]**o+(0.419750865569)*x[0]+(0.208448987712)*x[1]**o+(0.150584798952)*x[1]
-        arg[2,4,2,1]=(0.931680152344)*x[0]**o+(0.390947206307)*x[0]+(0.388437348378)*x[1]**o+(-0.808413079032)*x[1]
-        arg[3,0,0,0]=(0.58855431402)*x[0]**o+(0.383865913364)*x[0]+(-0.691445323219)*x[1]**o+(-0.443370658523)*x[1]
-        arg[3,0,0,1]=(-0.657371481478)*x[0]**o+(0.746891082673)*x[0]+(-0.829229947773)*x[1]**o+(0.761915670404)*x[1]
-        arg[3,0,1,0]=(-0.431502932714)*x[0]**o+(-0.961472285716)*x[0]+(0.0423384388031)*x[1]**o+(0.339373458118)*x[1]
-        arg[3,0,1,1]=(-0.272831163259)*x[0]**o+(-0.533438904494)*x[0]+(-0.595625384875)*x[1]**o+(0.0366857022323)*x[1]
-        arg[3,0,2,0]=(-0.319684662306)*x[0]**o+(0.672185828912)*x[0]+(0.483126548994)*x[1]**o+(0.745872629604)*x[1]
-        arg[3,0,2,1]=(0.437895277404)*x[0]**o+(-0.337209416963)*x[0]+(0.101080522788)*x[1]**o+(0.892022488644)*x[1]
-        arg[3,1,0,0]=(-0.582325078455)*x[0]**o+(-0.854689347157)*x[0]+(0.0308638312259)*x[1]**o+(0.633382365704)*x[1]
-        arg[3,1,0,1]=(0.319735178376)*x[0]**o+(-0.782764593952)*x[0]+(0.082230132244)*x[1]**o+(-0.946010937852)*x[1]
-        arg[3,1,1,0]=(-0.698490410666)*x[0]**o+(-0.801358802689)*x[0]+(0.20695648235)*x[1]**o+(0.75257523471)*x[1]
-        arg[3,1,1,1]=(0.66321696527)*x[0]**o+(0.704572918868)*x[0]+(0.528208879002)*x[1]**o+(-0.408378325513)*x[1]
-        arg[3,1,2,0]=(-0.925177198417)*x[0]**o+(-0.152427811549)*x[0]+(0.341781993583)*x[1]**o+(-0.589976456377)*x[1]
-        arg[3,1,2,1]=(0.206706628353)*x[0]**o+(0.673777173329)*x[0]+(-0.994138314254)*x[1]**o+(-0.843696565863)*x[1]
-        arg[3,2,0,0]=(-0.588881067333)*x[0]**o+(-0.537572388341)*x[0]+(-0.206570371675)*x[1]**o+(-0.127468554294)*x[1]
-        arg[3,2,0,1]=(0.498638284096)*x[0]**o+(-0.488278831086)*x[0]+(-0.28320874594)*x[1]**o+(-0.638241576615)*x[1]
-        arg[3,2,1,0]=(-0.445780790822)*x[0]**o+(-0.347493953089)*x[0]+(-0.558010086232)*x[1]**o+(-0.0287339307689)*x[1]
-        arg[3,2,1,1]=(-0.361727811272)*x[0]**o+(-0.559565378007)*x[0]+(-0.211685558972)*x[1]**o+(0.330088396811)*x[1]
-        arg[3,2,2,0]=(-0.42600117831)*x[0]**o+(-0.488997111988)*x[0]+(0.127421278051)*x[1]**o+(-0.48233167806)*x[1]
-        arg[3,2,2,1]=(0.120468829686)*x[0]**o+(0.0675603906118)*x[0]+(-0.60674361864)*x[1]**o+(0.639115708258)*x[1]
-        arg[3,3,0,0]=(0.369343033015)*x[0]**o+(0.707735743593)*x[0]+(-0.426275591836)*x[1]**o+(-0.733377765625)*x[1]
-        arg[3,3,0,1]=(-0.931245338156)*x[0]**o+(-0.465861794185)*x[0]+(-0.650664500687)*x[1]**o+(0.103077662402)*x[1]
-        arg[3,3,1,0]=(0.731834744512)*x[0]**o+(0.267840571071)*x[0]+(0.952106457495)*x[1]**o+(-0.943845364366)*x[1]
-        arg[3,3,1,1]=(-0.21692720916)*x[0]**o+(0.580841374997)*x[0]+(-0.412129341223)*x[1]**o+(0.40414445304)*x[1]
-        arg[3,3,2,0]=(-0.447758598726)*x[0]**o+(0.0616926352912)*x[0]+(-0.824624226122)*x[1]**o+(0.19099833104)*x[1]
-        arg[3,3,2,1]=(-0.615519138165)*x[0]**o+(0.233926822164)*x[0]+(-0.969014060236)*x[1]**o+(0.835103627893)*x[1]
-        arg[3,4,0,0]=(0.550778983301)*x[0]**o+(0.0198253530882)*x[0]+(-0.39383849187)*x[1]**o+(0.367721826304)*x[1]
-        arg[3,4,0,1]=(0.444877923149)*x[0]**o+(-0.899159835223)*x[0]+(0.923392540452)*x[1]**o+(0.512905141718)*x[1]
-        arg[3,4,1,0]=(-0.563807675145)*x[0]**o+(0.994405383899)*x[0]+(-0.777352948218)*x[1]**o+(0.865994906227)*x[1]
-        arg[3,4,1,1]=(-0.593800452139)*x[0]**o+(0.613778803237)*x[0]+(0.582200979718)*x[1]**o+(0.448026243271)*x[1]
-        arg[3,4,2,0]=(-0.900331125416)*x[0]**o+(0.234613965424)*x[0]+(0.510400273805)*x[1]**o+(0.0836773641661)*x[1]
-        arg[3,4,2,1]=(0.710999097307)*x[0]**o+(0.886603988265)*x[0]+(-0.405644887679)*x[1]**o+(0.362257258809)*x[1]
-        ref[0,0,0,0]=(-0.0338299192888)*x_ref[0]**o+(-0.114906274359)*x_ref[0]+(0.15010339398)*x_ref[1]**o+(0.625295991328)*x_ref[1]
-        ref[0,0,0,1]=(-0.1311901039)*x_ref[0]**o+(-0.551712861217)*x_ref[0]+(-0.287411404506)*x_ref[1]**o+(0.0242820629572)*x_ref[1]
-        ref[0,0,1,0]=(0.121962094111)*x_ref[0]**o+(0.203169622345)*x_ref[0]+(0.241504218053)*x_ref[1]**o+(-0.0696356239498)*x_ref[1]
-        ref[0,0,1,1]=(0.0461537352329)*x_ref[0]**o+(-0.275908938567)*x_ref[0]+(-0.271184121027)*x_ref[1]**o+(-0.364024729567)*x_ref[1]
-        ref[0,0,2,0]=(0.199272234315)*x_ref[0]**o+(-0.906364258855)*x_ref[0]+(-0.92102930037)*x_ref[1]**o+(0.0718981903454)*x_ref[1]
-        ref[0,0,2,1]=(-0.742950958383)*x_ref[0]**o+(0.0301464847722)*x_ref[0]+(0.466993477687)*x_ref[1]**o+(-0.402131750698)*x_ref[1]
-        ref[0,1,0,0]=(-0.0653776546375)*x_ref[0]**o+(-0.679360612372)*x_ref[0]+(-0.32783837768)*x_ref[1]**o+(-0.113753016428)*x_ref[1]
-        ref[0,1,0,1]=(0.58610119414)*x_ref[0]**o+(0.142613166231)*x_ref[0]+(0.0409105619986)*x_ref[1]**o+(-0.660641663558)*x_ref[1]
-        ref[0,1,1,0]=(0.212172308585)*x_ref[0]**o+(-0.452767768344)*x_ref[0]+(0.963053969889)*x_ref[1]**o+(0.752691773953)*x_ref[1]
-        ref[0,1,1,1]=(-0.514998377887)*x_ref[0]**o+(0.0872464329801)*x_ref[0]+(0.265590295505)*x_ref[1]**o+(0.557238826549)*x_ref[1]
-        ref[0,1,2,0]=(0.360523954724)*x_ref[0]**o+(0.550238402994)*x_ref[0]+(-0.206349415539)*x_ref[1]**o+(0.357304730511)*x_ref[1]
-        ref[0,1,2,1]=(-0.872755217435)*x_ref[0]**o+(0.190943683664)*x_ref[0]+(-0.245454292354)*x_ref[1]**o+(0.507229578506)*x_ref[1]
-        ref[0,2,0,0]=(0.994619505257)*x_ref[0]**o+(0.33482820568)*x_ref[0]+(-0.12721791236)*x_ref[1]**o+(-0.505873171195)*x_ref[1]
-        ref[0,2,0,1]=(0.224805131522)*x_ref[0]**o+(0.332022434603)*x_ref[0]+(0.0583494507268)*x_ref[1]**o+(0.857185410994)*x_ref[1]
-        ref[0,2,1,0]=(-0.425367077516)*x_ref[0]**o+(-0.25207101061)*x_ref[0]+(-0.11164491753)*x_ref[1]**o+(0.44752084285)*x_ref[1]
-        ref[0,2,1,1]=(-0.158725210751)*x_ref[0]**o+(-0.0692363138932)*x_ref[0]+(0.214803128256)*x_ref[1]**o+(0.886699106748)*x_ref[1]
-        ref[0,2,2,0]=(-0.332146331257)*x_ref[0]**o+(0.114845050128)*x_ref[0]+(-0.0781411611124)*x_ref[1]**o+(0.474972057387)*x_ref[1]
-        ref[0,2,2,1]=(-0.481949630694)*x_ref[0]**o+(0.644984972151)*x_ref[0]+(0.171146519527)*x_ref[1]**o+(0.57534803966)*x_ref[1]
-        ref[0,3,0,0]=(0.7580633024)*x_ref[0]**o+(0.0280511776577)*x_ref[0]+(0.375583652078)*x_ref[1]**o+(-0.809112787284)*x_ref[1]
-        ref[0,3,0,1]=(-0.466737159934)*x_ref[0]**o+(0.410032775686)*x_ref[0]+(0.176141189584)*x_ref[1]**o+(-0.228288309456)*x_ref[1]
-        ref[0,3,1,0]=(0.427129582196)*x_ref[0]**o+(-0.718385859483)*x_ref[0]+(-0.172261212989)*x_ref[1]**o+(0.913157476188)*x_ref[1]
-        ref[0,3,1,1]=(0.952506706487)*x_ref[0]**o+(-0.497478163899)*x_ref[0]+(-0.930273038716)*x_ref[1]**o+(0.673573149025)*x_ref[1]
-        ref[0,3,2,0]=(-0.0074302930747)*x_ref[0]**o+(0.226424842035)*x_ref[0]+(0.871190620671)*x_ref[1]**o+(0.277695333679)*x_ref[1]
-        ref[0,3,2,1]=(-0.540820239946)*x_ref[0]**o+(0.33044763211)*x_ref[0]+(-0.772648820924)*x_ref[1]**o+(-0.362410088021)*x_ref[1]
-        ref[0,4,0,0]=(-0.748396039111)*x_ref[0]**o+(0.215131518212)*x_ref[0]+(0.514087824403)*x_ref[1]**o+(0.335563854205)*x_ref[1]
-        ref[0,4,0,1]=(-0.443263590391)*x_ref[0]**o+(-0.523167282542)*x_ref[0]+(0.122612452799)*x_ref[1]**o+(0.216527857615)*x_ref[1]
-        ref[0,4,1,0]=(0.448176296777)*x_ref[0]**o+(0.478292146131)*x_ref[0]+(-0.558921083502)*x_ref[1]**o+(-0.17018258654)*x_ref[1]
-        ref[0,4,1,1]=(-0.912765673953)*x_ref[0]**o+(0.751746623223)*x_ref[0]+(-0.104811579057)*x_ref[1]**o+(0.456436870323)*x_ref[1]
-        ref[0,4,2,0]=(0.157946450932)*x_ref[0]**o+(0.147858587857)*x_ref[0]+(0.775747362874)*x_ref[1]**o+(0.478478862463)*x_ref[1]
-        ref[0,4,2,1]=(-0.819625058185)*x_ref[0]**o+(-0.0231980393919)*x_ref[0]+(-0.186647585522)*x_ref[1]**o+(0.513350371371)*x_ref[1]
-        ref[1,0,0,0]=(-0.942373946995)*x_ref[0]**o+(-0.761326160931)*x_ref[0]+(0.192511867167)*x_ref[1]**o+(-0.50895969579)*x_ref[1]
-        ref[1,0,0,1]=(0.0670813349951)*x_ref[0]**o+(0.55602953512)*x_ref[0]+(0.757621178635)*x_ref[1]**o+(0.741550201759)*x_ref[1]
-        ref[1,0,1,0]=(-0.114642609493)*x_ref[0]**o+(-0.639500048447)*x_ref[0]+(-0.861813039243)*x_ref[1]**o+(0.36413406744)*x_ref[1]
-        ref[1,0,1,1]=(0.126555451594)*x_ref[0]**o+(-0.885172557082)*x_ref[0]+(-0.376073252921)*x_ref[1]**o+(0.166102850653)*x_ref[1]
-        ref[1,0,2,0]=(-0.381517068219)*x_ref[0]**o+(0.94870328267)*x_ref[0]+(-0.129934777755)*x_ref[1]**o+(0.78090715758)*x_ref[1]
-        ref[1,0,2,1]=(-0.535852302247)*x_ref[0]**o+(0.63751039318)*x_ref[0]+(-0.537556159925)*x_ref[1]**o+(0.147766714221)*x_ref[1]
-        ref[1,1,0,0]=(-0.605543047533)*x_ref[0]**o+(-0.366612785372)*x_ref[0]+(0.544900149212)*x_ref[1]**o+(0.722108900447)*x_ref[1]
-        ref[1,1,0,1]=(0.133378561142)*x_ref[0]**o+(-0.227808772494)*x_ref[0]+(-0.729399624175)*x_ref[1]**o+(0.307571743455)*x_ref[1]
-        ref[1,1,1,0]=(0.0458830538139)*x_ref[0]**o+(0.0585044493026)*x_ref[0]+(-0.136630547605)*x_ref[1]**o+(-0.0823288389309)*x_ref[1]
-        ref[1,1,1,1]=(0.339263808784)*x_ref[0]**o+(0.00988917109076)*x_ref[0]+(-0.786591838083)*x_ref[1]**o+(-0.361686799179)*x_ref[1]
-        ref[1,1,2,0]=(0.789942037592)*x_ref[0]**o+(-0.266689758676)*x_ref[0]+(0.464856327495)*x_ref[1]**o+(0.138022774293)*x_ref[1]
-        ref[1,1,2,1]=(-0.723544867217)*x_ref[0]**o+(-0.523023674205)*x_ref[0]+(0.629726026331)*x_ref[1]**o+(-0.867808120997)*x_ref[1]
-        ref[1,2,0,0]=(-0.495589518787)*x_ref[0]**o+(-0.561664880262)*x_ref[0]+(0.0319320417078)*x_ref[1]**o+(-0.153720661498)*x_ref[1]
-        ref[1,2,0,1]=(0.293168114024)*x_ref[0]**o+(-0.344107163981)*x_ref[0]+(-0.275629670068)*x_ref[1]**o+(0.06103653487)*x_ref[1]
-        ref[1,2,1,0]=(0.495640927339)*x_ref[0]**o+(0.596540095043)*x_ref[0]+(0.208792567756)*x_ref[1]**o+(0.886040724145)*x_ref[1]
-        ref[1,2,1,1]=(0.331476398093)*x_ref[0]**o+(-0.472588572455)*x_ref[0]+(-0.455670457285)*x_ref[1]**o+(-0.731223615642)*x_ref[1]
-        ref[1,2,2,0]=(-0.127107829674)*x_ref[0]**o+(-0.21113128456)*x_ref[0]+(-0.733928194168)*x_ref[1]**o+(-0.174127696853)*x_ref[1]
-        ref[1,2,2,1]=(0.521879316151)*x_ref[0]**o+(0.983424557865)*x_ref[0]+(-0.288659660182)*x_ref[1]**o+(-0.431045203113)*x_ref[1]
-        ref[1,3,0,0]=(0.292348765746)*x_ref[0]**o+(0.0730741240915)*x_ref[0]+(0.079624022683)*x_ref[1]**o+(0.237483071633)*x_ref[1]
-        ref[1,3,0,1]=(0.291035771848)*x_ref[0]**o+(-0.482909477855)*x_ref[0]+(-0.999142129615)*x_ref[1]**o+(-0.559723367197)*x_ref[1]
-        ref[1,3,1,0]=(0.747096275653)*x_ref[0]**o+(0.762757649624)*x_ref[0]+(-0.821650889507)*x_ref[1]**o+(0.301128670189)*x_ref[1]
-        ref[1,3,1,1]=(0.82703681414)*x_ref[0]**o+(-0.336570070436)*x_ref[0]+(0.798131952979)*x_ref[1]**o+(0.603562737956)*x_ref[1]
-        ref[1,3,2,0]=(-0.164875914126)*x_ref[0]**o+(0.219409873902)*x_ref[0]+(0.784253160678)*x_ref[1]**o+(0.0219597460707)*x_ref[1]
-        ref[1,3,2,1]=(0.124778899794)*x_ref[0]**o+(0.785367842145)*x_ref[0]+(0.948111125908)*x_ref[1]**o+(-0.887427847089)*x_ref[1]
-        ref[1,4,0,0]=(0.0911816002883)*x_ref[0]**o+(0.645410022441)*x_ref[0]+(0.720551531965)*x_ref[1]**o+(-0.388407683413)*x_ref[1]
-        ref[1,4,0,1]=(-0.0416762613062)*x_ref[0]**o+(-0.548874829834)*x_ref[0]+(-0.377952555557)*x_ref[1]**o+(0.742795234361)*x_ref[1]
-        ref[1,4,1,0]=(-0.896929017971)*x_ref[0]**o+(0.678343686516)*x_ref[0]+(0.711572763082)*x_ref[1]**o+(-0.43397331651)*x_ref[1]
-        ref[1,4,1,1]=(-0.190804421566)*x_ref[0]**o+(-0.0848405124789)*x_ref[0]+(0.36246957905)*x_ref[1]**o+(0.963599086227)*x_ref[1]
-        ref[1,4,2,0]=(-0.0210248567982)*x_ref[0]**o+(0.545977814581)*x_ref[0]+(0.858962864401)*x_ref[1]**o+(0.113792851997)*x_ref[1]
-        ref[1,4,2,1]=(0.229641892622)*x_ref[0]**o+(-0.739561617198)*x_ref[0]+(-0.164372740617)*x_ref[1]**o+(0.537097868843)*x_ref[1]
-        ref[2,0,0,0]=(-0.13321389343)*x_ref[0]**o+(-0.668403350503)*x_ref[0]+(-0.924879105983)*x_ref[1]**o+(-0.5161790717)*x_ref[1]
-        ref[2,0,0,1]=(0.26582844685)*x_ref[0]**o+(0.89048660684)*x_ref[0]+(-0.377225981719)*x_ref[1]**o+(-0.303790710194)*x_ref[1]
-        ref[2,0,1,0]=(0.0997470860283)*x_ref[0]**o+(0.0385427264217)*x_ref[0]+(-0.71387347273)*x_ref[1]**o+(-0.621376499192)*x_ref[1]
-        ref[2,0,1,1]=(0.595544616326)*x_ref[0]**o+(-0.850529503975)*x_ref[0]+(0.602203957938)*x_ref[1]**o+(-0.329484843907)*x_ref[1]
-        ref[2,0,2,0]=(-0.106031967029)*x_ref[0]**o+(-0.165122821622)*x_ref[0]+(0.647473815919)*x_ref[1]**o+(0.28942226062)*x_ref[1]
-        ref[2,0,2,1]=(0.585955875472)*x_ref[0]**o+(0.922667710403)*x_ref[0]+(-0.0710905957841)*x_ref[1]**o+(-0.669138163697)*x_ref[1]
-        ref[2,1,0,0]=(0.461941211081)*x_ref[0]**o+(0.723022466263)*x_ref[0]+(-0.118551893472)*x_ref[1]**o+(0.00445187353637)*x_ref[1]
-        ref[2,1,0,1]=(-0.253168248108)*x_ref[0]**o+(0.476938842605)*x_ref[0]+(0.476641658034)*x_ref[1]**o+(-0.916886387595)*x_ref[1]
-        ref[2,1,1,0]=(0.722029309503)*x_ref[0]**o+(0.0588848593425)*x_ref[0]+(0.84737370043)*x_ref[1]**o+(-0.674604415213)*x_ref[1]
-        ref[2,1,1,1]=(-0.644736759298)*x_ref[0]**o+(-0.212847303893)*x_ref[0]+(0.25394587552)*x_ref[1]**o+(-0.366955175081)*x_ref[1]
-        ref[2,1,2,0]=(-0.657395296801)*x_ref[0]**o+(-0.967570027599)*x_ref[0]+(0.180926628541)*x_ref[1]**o+(-0.940599897942)*x_ref[1]
-        ref[2,1,2,1]=(0.849897328801)*x_ref[0]**o+(-0.299199474051)*x_ref[0]+(0.427221207827)*x_ref[1]**o+(0.212027985441)*x_ref[1]
-        ref[2,2,0,0]=(-0.561573507381)*x_ref[0]**o+(-0.446925224908)*x_ref[0]+(0.132091224948)*x_ref[1]**o+(-0.673375661849)*x_ref[1]
-        ref[2,2,0,1]=(-0.386657291574)*x_ref[0]**o+(0.356784637112)*x_ref[0]+(0.644292006233)*x_ref[1]**o+(0.922937167842)*x_ref[1]
-        ref[2,2,1,0]=(0.484446757285)*x_ref[0]**o+(-0.822469870455)*x_ref[0]+(-0.89605890123)*x_ref[1]**o+(-0.895891500031)*x_ref[1]
-        ref[2,2,1,1]=(-0.0930740520192)*x_ref[0]**o+(0.953356473678)*x_ref[0]+(-0.714418458806)*x_ref[1]**o+(-0.100584950946)*x_ref[1]
-        ref[2,2,2,0]=(0.945572242667)*x_ref[0]**o+(-0.259280849605)*x_ref[0]+(-0.925459846341)*x_ref[1]**o+(0.906002758873)*x_ref[1]
-        ref[2,2,2,1]=(-0.638993332975)*x_ref[0]**o+(-0.668594641703)*x_ref[0]+(0.012666231369)*x_ref[1]**o+(0.89732685856)*x_ref[1]
-        ref[2,3,0,0]=(-0.885061116144)*x_ref[0]**o+(-0.576097536483)*x_ref[0]+(-0.43166075788)*x_ref[1]**o+(0.538821620917)*x_ref[1]
-        ref[2,3,0,1]=(-0.0743638381797)*x_ref[0]**o+(0.251037500035)*x_ref[0]+(-0.905989928076)*x_ref[1]**o+(0.243771000867)*x_ref[1]
-        ref[2,3,1,0]=(-0.016045622351)*x_ref[0]**o+(-0.632944072174)*x_ref[0]+(-0.296175918793)*x_ref[1]**o+(-0.00120123641365)*x_ref[1]
-        ref[2,3,1,1]=(-0.896354921812)*x_ref[0]**o+(-0.331348989027)*x_ref[0]+(-0.450865285201)*x_ref[1]**o+(-0.243268582009)*x_ref[1]
-        ref[2,3,2,0]=(0.609332927431)*x_ref[0]**o+(-0.0815856802115)*x_ref[0]+(0.201924792273)*x_ref[1]**o+(-0.890424451348)*x_ref[1]
-        ref[2,3,2,1]=(0.395090137264)*x_ref[0]**o+(0.294230442573)*x_ref[0]+(-0.345371510364)*x_ref[1]**o+(0.181229663241)*x_ref[1]
-        ref[2,4,0,0]=(-0.823684509034)*x_ref[0]**o+(0.431019301942)*x_ref[0]+(0.554707015054)*x_ref[1]**o+(-0.846322903003)*x_ref[1]
-        ref[2,4,0,1]=(0.862984476658)*x_ref[0]**o+(0.20512500102)*x_ref[0]+(0.0247756159287)*x_ref[1]**o+(-0.374795100946)*x_ref[1]
-        ref[2,4,1,0]=(-0.0849914269517)*x_ref[0]**o+(0.754908200339)*x_ref[0]+(0.593363754807)*x_ref[1]**o+(0.124923961126)*x_ref[1]
-        ref[2,4,1,1]=(-0.691440264234)*x_ref[0]**o+(0.825739298015)*x_ref[0]+(0.426452231478)*x_ref[1]**o+(0.0995610721341)*x_ref[1]
-        ref[2,4,2,0]=(-0.175322750567)*x_ref[0]**o+(0.419750865569)*x_ref[0]+(0.208448987712)*x_ref[1]**o+(0.150584798952)*x_ref[1]
-        ref[2,4,2,1]=(0.931680152344)*x_ref[0]**o+(0.390947206307)*x_ref[0]+(0.388437348378)*x_ref[1]**o+(-0.808413079032)*x_ref[1]
-        ref[3,0,0,0]=(0.58855431402)*x_ref[0]**o+(0.383865913364)*x_ref[0]+(-0.691445323219)*x_ref[1]**o+(-0.443370658523)*x_ref[1]
-        ref[3,0,0,1]=(-0.657371481478)*x_ref[0]**o+(0.746891082673)*x_ref[0]+(-0.829229947773)*x_ref[1]**o+(0.761915670404)*x_ref[1]
-        ref[3,0,1,0]=(-0.431502932714)*x_ref[0]**o+(-0.961472285716)*x_ref[0]+(0.0423384388031)*x_ref[1]**o+(0.339373458118)*x_ref[1]
-        ref[3,0,1,1]=(-0.272831163259)*x_ref[0]**o+(-0.533438904494)*x_ref[0]+(-0.595625384875)*x_ref[1]**o+(0.0366857022323)*x_ref[1]
-        ref[3,0,2,0]=(-0.319684662306)*x_ref[0]**o+(0.672185828912)*x_ref[0]+(0.483126548994)*x_ref[1]**o+(0.745872629604)*x_ref[1]
-        ref[3,0,2,1]=(0.437895277404)*x_ref[0]**o+(-0.337209416963)*x_ref[0]+(0.101080522788)*x_ref[1]**o+(0.892022488644)*x_ref[1]
-        ref[3,1,0,0]=(-0.582325078455)*x_ref[0]**o+(-0.854689347157)*x_ref[0]+(0.0308638312259)*x_ref[1]**o+(0.633382365704)*x_ref[1]
-        ref[3,1,0,1]=(0.319735178376)*x_ref[0]**o+(-0.782764593952)*x_ref[0]+(0.082230132244)*x_ref[1]**o+(-0.946010937852)*x_ref[1]
-        ref[3,1,1,0]=(-0.698490410666)*x_ref[0]**o+(-0.801358802689)*x_ref[0]+(0.20695648235)*x_ref[1]**o+(0.75257523471)*x_ref[1]
-        ref[3,1,1,1]=(0.66321696527)*x_ref[0]**o+(0.704572918868)*x_ref[0]+(0.528208879002)*x_ref[1]**o+(-0.408378325513)*x_ref[1]
-        ref[3,1,2,0]=(-0.925177198417)*x_ref[0]**o+(-0.152427811549)*x_ref[0]+(0.341781993583)*x_ref[1]**o+(-0.589976456377)*x_ref[1]
-        ref[3,1,2,1]=(0.206706628353)*x_ref[0]**o+(0.673777173329)*x_ref[0]+(-0.994138314254)*x_ref[1]**o+(-0.843696565863)*x_ref[1]
-        ref[3,2,0,0]=(-0.588881067333)*x_ref[0]**o+(-0.537572388341)*x_ref[0]+(-0.206570371675)*x_ref[1]**o+(-0.127468554294)*x_ref[1]
-        ref[3,2,0,1]=(0.498638284096)*x_ref[0]**o+(-0.488278831086)*x_ref[0]+(-0.28320874594)*x_ref[1]**o+(-0.638241576615)*x_ref[1]
-        ref[3,2,1,0]=(-0.445780790822)*x_ref[0]**o+(-0.347493953089)*x_ref[0]+(-0.558010086232)*x_ref[1]**o+(-0.0287339307689)*x_ref[1]
-        ref[3,2,1,1]=(-0.361727811272)*x_ref[0]**o+(-0.559565378007)*x_ref[0]+(-0.211685558972)*x_ref[1]**o+(0.330088396811)*x_ref[1]
-        ref[3,2,2,0]=(-0.42600117831)*x_ref[0]**o+(-0.488997111988)*x_ref[0]+(0.127421278051)*x_ref[1]**o+(-0.48233167806)*x_ref[1]
-        ref[3,2,2,1]=(0.120468829686)*x_ref[0]**o+(0.0675603906118)*x_ref[0]+(-0.60674361864)*x_ref[1]**o+(0.639115708258)*x_ref[1]
-        ref[3,3,0,0]=(0.369343033015)*x_ref[0]**o+(0.707735743593)*x_ref[0]+(-0.426275591836)*x_ref[1]**o+(-0.733377765625)*x_ref[1]
-        ref[3,3,0,1]=(-0.931245338156)*x_ref[0]**o+(-0.465861794185)*x_ref[0]+(-0.650664500687)*x_ref[1]**o+(0.103077662402)*x_ref[1]
-        ref[3,3,1,0]=(0.731834744512)*x_ref[0]**o+(0.267840571071)*x_ref[0]+(0.952106457495)*x_ref[1]**o+(-0.943845364366)*x_ref[1]
-        ref[3,3,1,1]=(-0.21692720916)*x_ref[0]**o+(0.580841374997)*x_ref[0]+(-0.412129341223)*x_ref[1]**o+(0.40414445304)*x_ref[1]
-        ref[3,3,2,0]=(-0.447758598726)*x_ref[0]**o+(0.0616926352912)*x_ref[0]+(-0.824624226122)*x_ref[1]**o+(0.19099833104)*x_ref[1]
-        ref[3,3,2,1]=(-0.615519138165)*x_ref[0]**o+(0.233926822164)*x_ref[0]+(-0.969014060236)*x_ref[1]**o+(0.835103627893)*x_ref[1]
-        ref[3,4,0,0]=(0.550778983301)*x_ref[0]**o+(0.0198253530882)*x_ref[0]+(-0.39383849187)*x_ref[1]**o+(0.367721826304)*x_ref[1]
-        ref[3,4,0,1]=(0.444877923149)*x_ref[0]**o+(-0.899159835223)*x_ref[0]+(0.923392540452)*x_ref[1]**o+(0.512905141718)*x_ref[1]
-        ref[3,4,1,0]=(-0.563807675145)*x_ref[0]**o+(0.994405383899)*x_ref[0]+(-0.777352948218)*x_ref[1]**o+(0.865994906227)*x_ref[1]
-        ref[3,4,1,1]=(-0.593800452139)*x_ref[0]**o+(0.613778803237)*x_ref[0]+(0.582200979718)*x_ref[1]**o+(0.448026243271)*x_ref[1]
-        ref[3,4,2,0]=(-0.900331125416)*x_ref[0]**o+(0.234613965424)*x_ref[0]+(0.510400273805)*x_ref[1]**o+(0.0836773641661)*x_ref[1]
-        ref[3,4,2,1]=(0.710999097307)*x_ref[0]**o+(0.886603988265)*x_ref[0]+(-0.405644887679)*x_ref[1]**o+(0.362257258809)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.310272924207)*x[0]**o+(-0.664497806351)*x[0]+(0.741942132609)*x[1]**o+(0.636051298779)*x[1]+(0.76627159146)*x[2]**o+(0.492960732588)*x[2]
-        arg[0,0,0,1]=(-0.513740801773)*x[0]**o+(-0.633330750909)*x[0]+(0.177934618983)*x[1]**o+(-0.323745723166)*x[1]+(0.694167180904)*x[2]**o+(0.441239251435)*x[2]
-        arg[0,0,1,0]=(0.417477695848)*x[0]**o+(-0.923415976002)*x[0]+(0.0765555276662)*x[1]**o+(-0.277290890834)*x[1]+(0.0177191326614)*x[2]**o+(-0.0842520100387)*x[2]
-        arg[0,0,1,1]=(-0.761916249894)*x[0]**o+(0.169673139552)*x[0]+(0.0306290828795)*x[1]**o+(0.842234592613)*x[1]+(-0.350342692669)*x[2]**o+(0.321292270658)*x[2]
-        arg[0,0,2,0]=(-0.707494137624)*x[0]**o+(0.346873490395)*x[0]+(-0.68281925138)*x[1]**o+(-0.830538083274)*x[1]+(0.329372141613)*x[2]**o+(-0.121366157163)*x[2]
-        arg[0,0,2,1]=(-0.708018186507)*x[0]**o+(-0.778051239314)*x[0]+(-0.43106291563)*x[1]**o+(-0.0115914251143)*x[1]+(0.487334215892)*x[2]**o+(-0.289232284658)*x[2]
-        arg[0,1,0,0]=(0.530614704199)*x[0]**o+(0.518622028317)*x[0]+(-0.0143129589551)*x[1]**o+(0.808469352257)*x[1]+(-0.156787373225)*x[2]**o+(0.668887813143)*x[2]
-        arg[0,1,0,1]=(0.953223233706)*x[0]**o+(-0.164323838353)*x[0]+(0.336717320858)*x[1]**o+(-0.520230488172)*x[1]+(0.689960738002)*x[2]**o+(0.487630947578)*x[2]
-        arg[0,1,1,0]=(-0.418095373429)*x[0]**o+(-0.941817844939)*x[0]+(0.88105115607)*x[1]**o+(-0.820502501439)*x[1]+(-0.693858267667)*x[2]**o+(0.530567713127)*x[2]
-        arg[0,1,1,1]=(-0.716861320218)*x[0]**o+(-0.736619859467)*x[0]+(-0.885478605601)*x[1]**o+(-0.129375578967)*x[1]+(-0.0181433907318)*x[2]**o+(0.373255537959)*x[2]
-        arg[0,1,2,0]=(-0.174742583167)*x[0]**o+(-0.0887967480112)*x[0]+(-0.291168698662)*x[1]**o+(-0.188608506769)*x[1]+(0.22479613454)*x[2]**o+(0.34173928582)*x[2]
-        arg[0,1,2,1]=(0.117208929504)*x[0]**o+(-0.420969282079)*x[0]+(0.585298109836)*x[1]**o+(0.771355162745)*x[1]+(-0.51374493747)*x[2]**o+(0.785016548855)*x[2]
-        arg[0,2,0,0]=(0.737394887886)*x[0]**o+(0.966080271342)*x[0]+(-0.373178384492)*x[1]**o+(-0.845505386142)*x[1]+(-0.274654519371)*x[2]**o+(0.709356557887)*x[2]
-        arg[0,2,0,1]=(0.0365864090636)*x[0]**o+(-0.393382479787)*x[0]+(0.018273360977)*x[1]**o+(-0.509201909328)*x[1]+(-0.777852392534)*x[2]**o+(0.0417280247507)*x[2]
-        arg[0,2,1,0]=(0.637829302751)*x[0]**o+(-0.767824790186)*x[0]+(0.843382009511)*x[1]**o+(-0.599633234403)*x[1]+(0.14283138941)*x[2]**o+(-0.354404633991)*x[2]
-        arg[0,2,1,1]=(-0.465258613599)*x[0]**o+(0.09341154383)*x[0]+(-0.629114782988)*x[1]**o+(0.91608655383)*x[1]+(-0.692901135848)*x[2]**o+(-0.707225310667)*x[2]
-        arg[0,2,2,0]=(0.9935958759)*x[0]**o+(-0.385008742466)*x[0]+(0.153885356854)*x[1]**o+(0.146270680656)*x[1]+(0.305838410343)*x[2]**o+(0.141193552717)*x[2]
-        arg[0,2,2,1]=(-0.487538023894)*x[0]**o+(-0.814283442647)*x[0]+(0.166008520199)*x[1]**o+(0.313655774416)*x[1]+(0.282308782973)*x[2]**o+(0.309176062484)*x[2]
-        arg[0,3,0,0]=(0.00203507798913)*x[0]**o+(-0.19902542604)*x[0]+(0.88110918624)*x[1]**o+(0.223549219288)*x[1]+(0.135758952369)*x[2]**o+(0.59116783639)*x[2]
-        arg[0,3,0,1]=(-0.185063700767)*x[0]**o+(0.833862155173)*x[0]+(-0.0939117509645)*x[1]**o+(0.288003692231)*x[1]+(0.580196157839)*x[2]**o+(0.299320177754)*x[2]
-        arg[0,3,1,0]=(-0.039100718826)*x[0]**o+(0.423179869395)*x[0]+(-0.013669578975)*x[1]**o+(-0.355053343085)*x[1]+(0.89285158975)*x[2]**o+(0.392984367877)*x[2]
-        arg[0,3,1,1]=(0.0988989416429)*x[0]**o+(-0.446243235174)*x[0]+(-0.691253313617)*x[1]**o+(0.338823693086)*x[1]+(0.707054126334)*x[2]**o+(0.601121388278)*x[2]
-        arg[0,3,2,0]=(-0.191366770484)*x[0]**o+(0.961791275903)*x[0]+(-0.103547475035)*x[1]**o+(-0.745236510079)*x[1]+(-0.157506981712)*x[2]**o+(0.986229506787)*x[2]
-        arg[0,3,2,1]=(-0.886091883647)*x[0]**o+(0.6979804248)*x[0]+(-0.366575419428)*x[1]**o+(-0.958601153259)*x[1]+(-0.0119724511494)*x[2]**o+(-0.76101132076)*x[2]
-        arg[0,4,0,0]=(0.923290554434)*x[0]**o+(0.411359492198)*x[0]+(-0.977999562875)*x[1]**o+(0.352085161527)*x[1]+(0.955745235349)*x[2]**o+(-0.978885609257)*x[2]
-        arg[0,4,0,1]=(0.226973479105)*x[0]**o+(-0.423881897251)*x[0]+(0.889101969481)*x[1]**o+(-0.994236389028)*x[1]+(0.0159169033361)*x[2]**o+(-0.559935154203)*x[2]
-        arg[0,4,1,0]=(-0.225427291797)*x[0]**o+(-0.557334621848)*x[0]+(-0.486252586142)*x[1]**o+(0.0497120905216)*x[1]+(0.84165736691)*x[2]**o+(-0.185010156797)*x[2]
-        arg[0,4,1,1]=(0.762694602609)*x[0]**o+(-0.447367170727)*x[0]+(-0.61103181818)*x[1]**o+(0.689761057656)*x[1]+(-0.631855120122)*x[2]**o+(0.33274655602)*x[2]
-        arg[0,4,2,0]=(-0.198884868914)*x[0]**o+(0.716371959278)*x[0]+(0.260871768919)*x[1]**o+(0.622241740082)*x[1]+(0.774103524035)*x[2]**o+(0.186132703676)*x[2]
-        arg[0,4,2,1]=(-0.309450645317)*x[0]**o+(0.204754571336)*x[0]+(0.483402810171)*x[1]**o+(0.404620744188)*x[1]+(-0.699137246959)*x[2]**o+(0.467428706196)*x[2]
-        arg[1,0,0,0]=(0.642289506448)*x[0]**o+(0.383990304394)*x[0]+(0.556940973318)*x[1]**o+(0.135219729041)*x[1]+(0.577195836358)*x[2]**o+(-0.338924419674)*x[2]
-        arg[1,0,0,1]=(-0.920873911295)*x[0]**o+(-0.330610192304)*x[0]+(-0.117226803856)*x[1]**o+(0.172482867684)*x[1]+(0.909140902709)*x[2]**o+(-0.590494167913)*x[2]
-        arg[1,0,1,0]=(0.210161538861)*x[0]**o+(-0.83860241761)*x[0]+(0.0257180382661)*x[1]**o+(0.877633854348)*x[1]+(0.26045311754)*x[2]**o+(-0.971349902714)*x[2]
-        arg[1,0,1,1]=(0.70736843125)*x[0]**o+(-0.765121985431)*x[0]+(-0.196525225943)*x[1]**o+(-0.175928729346)*x[1]+(0.945523028748)*x[2]**o+(0.877830322823)*x[2]
-        arg[1,0,2,0]=(-0.963513016065)*x[0]**o+(0.0820537856351)*x[0]+(0.0122070196118)*x[1]**o+(-0.154147449592)*x[1]+(0.323844633268)*x[2]**o+(-0.124897698214)*x[2]
-        arg[1,0,2,1]=(0.656267566405)*x[0]**o+(0.0174786620768)*x[0]+(0.763902435618)*x[1]**o+(-0.986021506043)*x[1]+(0.632625555994)*x[2]**o+(-0.110657743523)*x[2]
-        arg[1,1,0,0]=(0.00354144688732)*x[0]**o+(-0.813515808171)*x[0]+(-0.100717717446)*x[1]**o+(0.0543708163629)*x[1]+(0.785927880762)*x[2]**o+(0.0109166652227)*x[2]
-        arg[1,1,0,1]=(-0.239705688631)*x[0]**o+(0.402915642509)*x[0]+(0.463371068163)*x[1]**o+(-0.507302462928)*x[1]+(-0.0789844128295)*x[2]**o+(0.669144891499)*x[2]
-        arg[1,1,1,0]=(-0.491891367001)*x[0]**o+(-0.524377636928)*x[0]+(0.903091863917)*x[1]**o+(-0.554368807183)*x[1]+(0.332899195339)*x[2]**o+(-0.645216147049)*x[2]
-        arg[1,1,1,1]=(-0.915843941243)*x[0]**o+(-0.233175654748)*x[0]+(0.467730425037)*x[1]**o+(-0.765957936683)*x[1]+(0.726678877276)*x[2]**o+(0.770533947942)*x[2]
-        arg[1,1,2,0]=(0.678071852032)*x[0]**o+(0.266537844237)*x[0]+(0.324335300151)*x[1]**o+(-0.286713971373)*x[1]+(-0.702384414014)*x[2]**o+(0.887198276519)*x[2]
-        arg[1,1,2,1]=(0.0466444959648)*x[0]**o+(0.689162912677)*x[0]+(-0.35033923676)*x[1]**o+(-0.0536380766876)*x[1]+(-0.511833442517)*x[2]**o+(0.125566299829)*x[2]
-        arg[1,2,0,0]=(-0.803170431622)*x[0]**o+(0.476211169752)*x[0]+(-0.170510267953)*x[1]**o+(-0.765945735317)*x[1]+(-0.169966329291)*x[2]**o+(-0.988525918724)*x[2]
-        arg[1,2,0,1]=(0.289618751212)*x[0]**o+(0.294379040976)*x[0]+(-0.922478416838)*x[1]**o+(0.210546495537)*x[1]+(-0.87266381496)*x[2]**o+(-0.865571669577)*x[2]
-        arg[1,2,1,0]=(-0.292811054005)*x[0]**o+(0.651280833746)*x[0]+(-0.625004203736)*x[1]**o+(0.372078169172)*x[1]+(-0.0539099055169)*x[2]**o+(0.0911869270008)*x[2]
-        arg[1,2,1,1]=(0.496217698294)*x[0]**o+(-0.986021787133)*x[0]+(0.246417059532)*x[1]**o+(0.610226802401)*x[1]+(0.991534665298)*x[2]**o+(-0.507441185982)*x[2]
-        arg[1,2,2,0]=(-0.839902565947)*x[0]**o+(-0.279607147278)*x[0]+(0.278212307963)*x[1]**o+(0.609793640036)*x[1]+(0.940471913774)*x[2]**o+(0.21860828705)*x[2]
-        arg[1,2,2,1]=(0.789578112278)*x[0]**o+(-0.0226697818608)*x[0]+(0.216321340291)*x[1]**o+(-0.701818463454)*x[1]+(-0.166689030646)*x[2]**o+(0.966131542292)*x[2]
-        arg[1,3,0,0]=(0.149337042551)*x[0]**o+(-0.785050579674)*x[0]+(0.530219924721)*x[1]**o+(-0.971927239398)*x[1]+(0.950917908603)*x[2]**o+(0.132668077447)*x[2]
-        arg[1,3,0,1]=(0.983081559724)*x[0]**o+(-0.358694498455)*x[0]+(0.181080099281)*x[1]**o+(-0.699756291643)*x[1]+(-0.744335953304)*x[2]**o+(0.00262043221382)*x[2]
-        arg[1,3,1,0]=(0.31776032045)*x[0]**o+(-0.0726184220029)*x[0]+(-0.759883735971)*x[1]**o+(-0.6389710873)*x[1]+(-0.607858499502)*x[2]**o+(-0.397169895784)*x[2]
-        arg[1,3,1,1]=(-0.950468389728)*x[0]**o+(0.831121915521)*x[0]+(0.552857011083)*x[1]**o+(0.848599672594)*x[1]+(0.432183564231)*x[2]**o+(0.57537721362)*x[2]
-        arg[1,3,2,0]=(0.736080143601)*x[0]**o+(-0.804140307747)*x[0]+(-0.163864867884)*x[1]**o+(0.950874042315)*x[1]+(-0.99676139412)*x[2]**o+(0.332320294246)*x[2]
-        arg[1,3,2,1]=(0.119082582041)*x[0]**o+(-0.969740778852)*x[0]+(0.828432583532)*x[1]**o+(0.190324050395)*x[1]+(-0.42639142674)*x[2]**o+(0.315519578192)*x[2]
-        arg[1,4,0,0]=(-0.798465141775)*x[0]**o+(-0.717282977908)*x[0]+(0.935655148713)*x[1]**o+(-0.655752964484)*x[1]+(0.159990149099)*x[2]**o+(-0.537115062687)*x[2]
-        arg[1,4,0,1]=(0.445151775007)*x[0]**o+(-0.867956302051)*x[0]+(-0.809856879825)*x[1]**o+(-0.326897750981)*x[1]+(0.756352311987)*x[2]**o+(0.577585513459)*x[2]
-        arg[1,4,1,0]=(0.294243347591)*x[0]**o+(0.774741656931)*x[0]+(-0.0799985737984)*x[1]**o+(0.179789107412)*x[1]+(-0.612198025189)*x[2]**o+(-0.07086009611)*x[2]
-        arg[1,4,1,1]=(0.0692586287045)*x[0]**o+(-0.671956300122)*x[0]+(-0.948667104683)*x[1]**o+(0.68656246801)*x[1]+(-0.352975297696)*x[2]**o+(0.277952113716)*x[2]
-        arg[1,4,2,0]=(-0.491316095517)*x[0]**o+(0.725899087239)*x[0]+(0.634113963431)*x[1]**o+(0.235694393453)*x[1]+(-0.15600720713)*x[2]**o+(0.954814976539)*x[2]
-        arg[1,4,2,1]=(0.120206996339)*x[0]**o+(-0.86151411823)*x[0]+(-0.137093650097)*x[1]**o+(0.633402978246)*x[1]+(-0.42515364728)*x[2]**o+(-0.987634210617)*x[2]
-        arg[2,0,0,0]=(0.539463971222)*x[0]**o+(-0.03435650579)*x[0]+(-0.884395295544)*x[1]**o+(0.215454879022)*x[1]+(0.842377328246)*x[2]**o+(0.370920136871)*x[2]
-        arg[2,0,0,1]=(-0.411505463039)*x[0]**o+(0.446494039439)*x[0]+(0.0313771969556)*x[1]**o+(0.602893223061)*x[1]+(-0.30383490021)*x[2]**o+(-0.788028756758)*x[2]
-        arg[2,0,1,0]=(0.489009615999)*x[0]**o+(-0.95508248016)*x[0]+(-0.21489475022)*x[1]**o+(-0.857263478431)*x[1]+(-0.123703409045)*x[2]**o+(0.663389562431)*x[2]
-        arg[2,0,1,1]=(-0.0224763310929)*x[0]**o+(-0.315886249237)*x[0]+(-0.318201849695)*x[1]**o+(0.423732682462)*x[1]+(0.396065636381)*x[2]**o+(0.0816717878865)*x[2]
-        arg[2,0,2,0]=(-0.191432618224)*x[0]**o+(0.688389390795)*x[0]+(-0.382948112159)*x[1]**o+(0.562905173818)*x[1]+(-0.118396714029)*x[2]**o+(0.234478642577)*x[2]
-        arg[2,0,2,1]=(-0.348008173171)*x[0]**o+(0.191994166636)*x[0]+(0.450556057147)*x[1]**o+(-0.710821693343)*x[1]+(-0.245119333857)*x[2]**o+(0.262869525239)*x[2]
-        arg[2,1,0,0]=(-0.160444506203)*x[0]**o+(-0.816142837432)*x[0]+(-0.619722480492)*x[1]**o+(-0.989077039675)*x[1]+(-0.0282349103977)*x[2]**o+(-0.629849819691)*x[2]
-        arg[2,1,0,1]=(0.379513765297)*x[0]**o+(0.934652105586)*x[0]+(-0.632636427868)*x[1]**o+(-0.0492550496553)*x[1]+(0.137733572307)*x[2]**o+(0.779782637942)*x[2]
-        arg[2,1,1,0]=(0.469499320417)*x[0]**o+(0.570880924125)*x[0]+(-0.0329833251419)*x[1]**o+(-0.0388751034604)*x[1]+(-0.878520094389)*x[2]**o+(0.992656649048)*x[2]
-        arg[2,1,1,1]=(0.592005181995)*x[0]**o+(-0.553980493526)*x[0]+(0.359837665019)*x[1]**o+(0.811107941179)*x[1]+(-0.441929650912)*x[2]**o+(-0.768618378636)*x[2]
-        arg[2,1,2,0]=(0.741376258816)*x[0]**o+(-0.238909756717)*x[0]+(0.204631082449)*x[1]**o+(0.970501662949)*x[1]+(-0.615638092239)*x[2]**o+(-0.575948750844)*x[2]
-        arg[2,1,2,1]=(0.774050933112)*x[0]**o+(-0.872234076721)*x[0]+(-0.0936189240061)*x[1]**o+(-0.773608756961)*x[1]+(-0.119171907808)*x[2]**o+(-0.256124796845)*x[2]
-        arg[2,2,0,0]=(0.459481754425)*x[0]**o+(0.478364929493)*x[0]+(0.460199733287)*x[1]**o+(0.66880294659)*x[1]+(-0.859525058389)*x[2]**o+(0.77960284414)*x[2]
-        arg[2,2,0,1]=(0.690557835207)*x[0]**o+(-0.812305038592)*x[0]+(0.837924124791)*x[1]**o+(-0.785979206364)*x[1]+(-0.295553949819)*x[2]**o+(0.575096295897)*x[2]
-        arg[2,2,1,0]=(0.443193683205)*x[0]**o+(0.0355033222253)*x[0]+(0.497641002766)*x[1]**o+(-0.636955142451)*x[1]+(-0.265324357454)*x[2]**o+(0.734148569078)*x[2]
-        arg[2,2,1,1]=(-0.088707242599)*x[0]**o+(0.513403518669)*x[0]+(0.337741737651)*x[1]**o+(-0.174843924478)*x[1]+(0.687291255986)*x[2]**o+(0.473850502258)*x[2]
-        arg[2,2,2,0]=(0.5305624642)*x[0]**o+(-0.972997835953)*x[0]+(0.00197107287888)*x[1]**o+(-0.75490872634)*x[1]+(-0.0569624569435)*x[2]**o+(-0.0780532868631)*x[2]
-        arg[2,2,2,1]=(-0.744584471866)*x[0]**o+(0.915494909272)*x[0]+(0.239235050038)*x[1]**o+(-0.192466753187)*x[1]+(0.933556550824)*x[2]**o+(-0.786420251487)*x[2]
-        arg[2,3,0,0]=(0.472114530627)*x[0]**o+(0.0693211807557)*x[0]+(-0.274273425713)*x[1]**o+(0.136242554894)*x[1]+(-0.329240675785)*x[2]**o+(0.0212539247343)*x[2]
-        arg[2,3,0,1]=(-0.780426108099)*x[0]**o+(-0.632382551025)*x[0]+(0.554926949239)*x[1]**o+(0.264204009059)*x[1]+(-0.868007525824)*x[2]**o+(-0.937631120201)*x[2]
-        arg[2,3,1,0]=(-0.826692080947)*x[0]**o+(0.915241858538)*x[0]+(-0.49986160859)*x[1]**o+(0.921686464658)*x[1]+(0.71996666304)*x[2]**o+(0.297609501096)*x[2]
-        arg[2,3,1,1]=(0.991896994614)*x[0]**o+(-0.543310008103)*x[0]+(0.0791899631111)*x[1]**o+(-0.914088200145)*x[1]+(-0.496337624951)*x[2]**o+(0.708950898614)*x[2]
-        arg[2,3,2,0]=(-0.235116966432)*x[0]**o+(-0.492848730207)*x[0]+(0.428728646789)*x[1]**o+(-0.410747634691)*x[1]+(0.705059815458)*x[2]**o+(-0.185604633831)*x[2]
-        arg[2,3,2,1]=(0.838829037117)*x[0]**o+(0.670561147563)*x[0]+(0.621407965075)*x[1]**o+(-0.10624946305)*x[1]+(0.893703402687)*x[2]**o+(0.985504995821)*x[2]
-        arg[2,4,0,0]=(0.635072504682)*x[0]**o+(-0.681962427555)*x[0]+(-0.00774518011081)*x[1]**o+(-0.264996228668)*x[1]+(0.690668403198)*x[2]**o+(0.883573761062)*x[2]
-        arg[2,4,0,1]=(0.545632268651)*x[0]**o+(0.439668519394)*x[0]+(-0.482479808491)*x[1]**o+(0.752028962391)*x[1]+(0.0596773623939)*x[2]**o+(-0.369987181127)*x[2]
-        arg[2,4,1,0]=(0.659005322796)*x[0]**o+(0.503940833428)*x[0]+(0.643633321586)*x[1]**o+(0.927082323252)*x[1]+(0.354072146184)*x[2]**o+(-0.638737560608)*x[2]
-        arg[2,4,1,1]=(-0.443548860913)*x[0]**o+(0.707607048458)*x[0]+(-0.955225746402)*x[1]**o+(0.515995563585)*x[1]+(-0.288406637165)*x[2]**o+(-0.760864937318)*x[2]
-        arg[2,4,2,0]=(0.898146580355)*x[0]**o+(-0.590650787106)*x[0]+(0.036095789753)*x[1]**o+(0.326040260581)*x[1]+(0.680069361306)*x[2]**o+(0.333839099341)*x[2]
-        arg[2,4,2,1]=(-0.151364260271)*x[0]**o+(-0.675198183832)*x[0]+(-0.183626298978)*x[1]**o+(-0.182565217146)*x[1]+(0.0345632129814)*x[2]**o+(-0.581534100763)*x[2]
-        arg[3,0,0,0]=(-0.942351703246)*x[0]**o+(-0.699567649453)*x[0]+(-0.832068665702)*x[1]**o+(0.163439416504)*x[1]+(0.742500339519)*x[2]**o+(-0.492882887489)*x[2]
-        arg[3,0,0,1]=(0.990078296484)*x[0]**o+(-0.999837336587)*x[0]+(0.197589456459)*x[1]**o+(0.431403059019)*x[1]+(0.859864015871)*x[2]**o+(-0.267474829282)*x[2]
-        arg[3,0,1,0]=(-0.776773660723)*x[0]**o+(-0.189048370486)*x[0]+(0.926953856802)*x[1]**o+(-0.72314744652)*x[1]+(0.330064363809)*x[2]**o+(0.188533334359)*x[2]
-        arg[3,0,1,1]=(-0.854830058762)*x[0]**o+(0.832073883276)*x[0]+(-0.425691165124)*x[1]**o+(0.162351500316)*x[1]+(0.370604864512)*x[2]**o+(-0.581907071484)*x[2]
-        arg[3,0,2,0]=(-0.316716909548)*x[0]**o+(0.335417284383)*x[0]+(-0.783061160352)*x[1]**o+(-0.253972519239)*x[1]+(-0.826432933721)*x[2]**o+(0.267368378363)*x[2]
-        arg[3,0,2,1]=(-0.765899705462)*x[0]**o+(-0.0993875861476)*x[0]+(-0.211785004352)*x[1]**o+(-0.635330151497)*x[1]+(0.414575412599)*x[2]**o+(0.586882274623)*x[2]
-        arg[3,1,0,0]=(0.987776377237)*x[0]**o+(0.796660669191)*x[0]+(0.580724891862)*x[1]**o+(-0.24149253995)*x[1]+(-0.633421016909)*x[2]**o+(-0.220110913711)*x[2]
-        arg[3,1,0,1]=(-0.182240918081)*x[0]**o+(-0.290526050572)*x[0]+(0.00283230959976)*x[1]**o+(-0.933282166805)*x[1]+(-0.857893235883)*x[2]**o+(0.551414074127)*x[2]
-        arg[3,1,1,0]=(-0.854435997816)*x[0]**o+(0.706455144263)*x[0]+(0.406237965254)*x[1]**o+(0.192071142415)*x[1]+(0.357966796834)*x[2]**o+(0.887011087987)*x[2]
-        arg[3,1,1,1]=(0.832013396996)*x[0]**o+(0.696133072321)*x[0]+(0.682726968712)*x[1]**o+(0.613316240514)*x[1]+(0.12600339887)*x[2]**o+(-0.620088231382)*x[2]
-        arg[3,1,2,0]=(-0.178681615221)*x[0]**o+(-0.952835986168)*x[0]+(0.299692693746)*x[1]**o+(0.892451908416)*x[1]+(0.202403273634)*x[2]**o+(0.677212897943)*x[2]
-        arg[3,1,2,1]=(0.0592594053342)*x[0]**o+(0.56391153959)*x[0]+(-0.874866627667)*x[1]**o+(0.432102900769)*x[1]+(-0.49073126285)*x[2]**o+(-0.010495860028)*x[2]
-        arg[3,2,0,0]=(0.548006445814)*x[0]**o+(0.667313392202)*x[0]+(0.397805355499)*x[1]**o+(-0.788100267808)*x[1]+(0.869234055258)*x[2]**o+(-0.830241520401)*x[2]
-        arg[3,2,0,1]=(0.72586139216)*x[0]**o+(-0.931878957878)*x[0]+(-0.94119555858)*x[1]**o+(-0.133544806169)*x[1]+(0.754263323382)*x[2]**o+(-0.446604740157)*x[2]
-        arg[3,2,1,0]=(-0.28135830707)*x[0]**o+(-0.478744058518)*x[0]+(0.88219033731)*x[1]**o+(0.460587286945)*x[1]+(-0.849692146096)*x[2]**o+(0.0927701345107)*x[2]
-        arg[3,2,1,1]=(-0.681859641611)*x[0]**o+(-0.670164293088)*x[0]+(0.796366374435)*x[1]**o+(0.837230317054)*x[1]+(-0.413283915904)*x[2]**o+(0.779624227187)*x[2]
-        arg[3,2,2,0]=(-0.803242771255)*x[0]**o+(-0.0687616271776)*x[0]+(-0.948856027999)*x[1]**o+(0.762568790931)*x[1]+(0.937588292604)*x[2]**o+(-0.0224232611283)*x[2]
-        arg[3,2,2,1]=(-0.215752944937)*x[0]**o+(-0.807114296075)*x[0]+(0.970625375964)*x[1]**o+(0.68578124692)*x[1]+(-0.165007047419)*x[2]**o+(0.942718439981)*x[2]
-        arg[3,3,0,0]=(0.152001104716)*x[0]**o+(-0.657242342357)*x[0]+(0.559608661705)*x[1]**o+(0.0764403273251)*x[1]+(0.633414754695)*x[2]**o+(0.430777868344)*x[2]
-        arg[3,3,0,1]=(-0.898109497759)*x[0]**o+(0.736574249406)*x[0]+(-0.569584184574)*x[1]**o+(-0.145501395506)*x[1]+(-0.412424116475)*x[2]**o+(-0.416350923096)*x[2]
-        arg[3,3,1,0]=(0.602022795614)*x[0]**o+(-0.848525569825)*x[0]+(-0.713426287505)*x[1]**o+(-0.829278452687)*x[1]+(-0.491257659316)*x[2]**o+(0.90219908999)*x[2]
-        arg[3,3,1,1]=(-0.769110216066)*x[0]**o+(-0.789464037338)*x[0]+(-0.363686172584)*x[1]**o+(-0.86190787068)*x[1]+(0.275438119232)*x[2]**o+(0.285209834248)*x[2]
-        arg[3,3,2,0]=(0.351662405853)*x[0]**o+(0.8403302307)*x[0]+(-0.449869332519)*x[1]**o+(0.936043614838)*x[1]+(-0.656908777335)*x[2]**o+(-0.231923872531)*x[2]
-        arg[3,3,2,1]=(0.873848945653)*x[0]**o+(0.551429883959)*x[0]+(-0.577942548701)*x[1]**o+(-0.254317163049)*x[1]+(0.64878089878)*x[2]**o+(0.7135339515)*x[2]
-        arg[3,4,0,0]=(0.891435610494)*x[0]**o+(0.598893704498)*x[0]+(0.24682094756)*x[1]**o+(0.0895612710338)*x[1]+(-0.513686244953)*x[2]**o+(0.307205505502)*x[2]
-        arg[3,4,0,1]=(-0.577752944196)*x[0]**o+(-0.458383751623)*x[0]+(-0.913956988143)*x[1]**o+(0.470857602235)*x[1]+(0.631726850665)*x[2]**o+(-0.112962289904)*x[2]
-        arg[3,4,1,0]=(-0.65648177489)*x[0]**o+(-0.843530972747)*x[0]+(-0.0332153723809)*x[1]**o+(0.230484263355)*x[1]+(-0.865687508592)*x[2]**o+(0.122751735082)*x[2]
-        arg[3,4,1,1]=(-0.353502640734)*x[0]**o+(-0.816020900282)*x[0]+(0.943688796868)*x[1]**o+(-0.526707881958)*x[1]+(-0.790258298117)*x[2]**o+(-0.748706809042)*x[2]
-        arg[3,4,2,0]=(-0.596345912175)*x[0]**o+(0.872771121837)*x[0]+(0.100107395575)*x[1]**o+(0.950482249217)*x[1]+(0.0487634582783)*x[2]**o+(-0.0285218097887)*x[2]
-        arg[3,4,2,1]=(-0.827443553933)*x[0]**o+(-0.922564800149)*x[0]+(-0.810354385287)*x[1]**o+(0.630079217293)*x[1]+(-0.316280559723)*x[2]**o+(0.977830435871)*x[2]
-        ref[0,0,0,0]=(0.310272924207)*x_ref[0]**o+(-0.664497806351)*x_ref[0]+(0.741942132609)*x_ref[1]**o+(0.636051298779)*x_ref[1]+(0.76627159146)*x_ref[2]**o+(0.492960732588)*x_ref[2]
-        ref[0,0,0,1]=(-0.513740801773)*x_ref[0]**o+(-0.633330750909)*x_ref[0]+(0.177934618983)*x_ref[1]**o+(-0.323745723166)*x_ref[1]+(0.694167180904)*x_ref[2]**o+(0.441239251435)*x_ref[2]
-        ref[0,0,1,0]=(0.417477695848)*x_ref[0]**o+(-0.923415976002)*x_ref[0]+(0.0765555276662)*x_ref[1]**o+(-0.277290890834)*x_ref[1]+(0.0177191326614)*x_ref[2]**o+(-0.0842520100387)*x_ref[2]
-        ref[0,0,1,1]=(-0.761916249894)*x_ref[0]**o+(0.169673139552)*x_ref[0]+(0.0306290828795)*x_ref[1]**o+(0.842234592613)*x_ref[1]+(-0.350342692669)*x_ref[2]**o+(0.321292270658)*x_ref[2]
-        ref[0,0,2,0]=(-0.707494137624)*x_ref[0]**o+(0.346873490395)*x_ref[0]+(-0.68281925138)*x_ref[1]**o+(-0.830538083274)*x_ref[1]+(0.329372141613)*x_ref[2]**o+(-0.121366157163)*x_ref[2]
-        ref[0,0,2,1]=(-0.708018186507)*x_ref[0]**o+(-0.778051239314)*x_ref[0]+(-0.43106291563)*x_ref[1]**o+(-0.0115914251143)*x_ref[1]+(0.487334215892)*x_ref[2]**o+(-0.289232284658)*x_ref[2]
-        ref[0,1,0,0]=(0.530614704199)*x_ref[0]**o+(0.518622028317)*x_ref[0]+(-0.0143129589551)*x_ref[1]**o+(0.808469352257)*x_ref[1]+(-0.156787373225)*x_ref[2]**o+(0.668887813143)*x_ref[2]
-        ref[0,1,0,1]=(0.953223233706)*x_ref[0]**o+(-0.164323838353)*x_ref[0]+(0.336717320858)*x_ref[1]**o+(-0.520230488172)*x_ref[1]+(0.689960738002)*x_ref[2]**o+(0.487630947578)*x_ref[2]
-        ref[0,1,1,0]=(-0.418095373429)*x_ref[0]**o+(-0.941817844939)*x_ref[0]+(0.88105115607)*x_ref[1]**o+(-0.820502501439)*x_ref[1]+(-0.693858267667)*x_ref[2]**o+(0.530567713127)*x_ref[2]
-        ref[0,1,1,1]=(-0.716861320218)*x_ref[0]**o+(-0.736619859467)*x_ref[0]+(-0.885478605601)*x_ref[1]**o+(-0.129375578967)*x_ref[1]+(-0.0181433907318)*x_ref[2]**o+(0.373255537959)*x_ref[2]
-        ref[0,1,2,0]=(-0.174742583167)*x_ref[0]**o+(-0.0887967480112)*x_ref[0]+(-0.291168698662)*x_ref[1]**o+(-0.188608506769)*x_ref[1]+(0.22479613454)*x_ref[2]**o+(0.34173928582)*x_ref[2]
-        ref[0,1,2,1]=(0.117208929504)*x_ref[0]**o+(-0.420969282079)*x_ref[0]+(0.585298109836)*x_ref[1]**o+(0.771355162745)*x_ref[1]+(-0.51374493747)*x_ref[2]**o+(0.785016548855)*x_ref[2]
-        ref[0,2,0,0]=(0.737394887886)*x_ref[0]**o+(0.966080271342)*x_ref[0]+(-0.373178384492)*x_ref[1]**o+(-0.845505386142)*x_ref[1]+(-0.274654519371)*x_ref[2]**o+(0.709356557887)*x_ref[2]
-        ref[0,2,0,1]=(0.0365864090636)*x_ref[0]**o+(-0.393382479787)*x_ref[0]+(0.018273360977)*x_ref[1]**o+(-0.509201909328)*x_ref[1]+(-0.777852392534)*x_ref[2]**o+(0.0417280247507)*x_ref[2]
-        ref[0,2,1,0]=(0.637829302751)*x_ref[0]**o+(-0.767824790186)*x_ref[0]+(0.843382009511)*x_ref[1]**o+(-0.599633234403)*x_ref[1]+(0.14283138941)*x_ref[2]**o+(-0.354404633991)*x_ref[2]
-        ref[0,2,1,1]=(-0.465258613599)*x_ref[0]**o+(0.09341154383)*x_ref[0]+(-0.629114782988)*x_ref[1]**o+(0.91608655383)*x_ref[1]+(-0.692901135848)*x_ref[2]**o+(-0.707225310667)*x_ref[2]
-        ref[0,2,2,0]=(0.9935958759)*x_ref[0]**o+(-0.385008742466)*x_ref[0]+(0.153885356854)*x_ref[1]**o+(0.146270680656)*x_ref[1]+(0.305838410343)*x_ref[2]**o+(0.141193552717)*x_ref[2]
-        ref[0,2,2,1]=(-0.487538023894)*x_ref[0]**o+(-0.814283442647)*x_ref[0]+(0.166008520199)*x_ref[1]**o+(0.313655774416)*x_ref[1]+(0.282308782973)*x_ref[2]**o+(0.309176062484)*x_ref[2]
-        ref[0,3,0,0]=(0.00203507798913)*x_ref[0]**o+(-0.19902542604)*x_ref[0]+(0.88110918624)*x_ref[1]**o+(0.223549219288)*x_ref[1]+(0.135758952369)*x_ref[2]**o+(0.59116783639)*x_ref[2]
-        ref[0,3,0,1]=(-0.185063700767)*x_ref[0]**o+(0.833862155173)*x_ref[0]+(-0.0939117509645)*x_ref[1]**o+(0.288003692231)*x_ref[1]+(0.580196157839)*x_ref[2]**o+(0.299320177754)*x_ref[2]
-        ref[0,3,1,0]=(-0.039100718826)*x_ref[0]**o+(0.423179869395)*x_ref[0]+(-0.013669578975)*x_ref[1]**o+(-0.355053343085)*x_ref[1]+(0.89285158975)*x_ref[2]**o+(0.392984367877)*x_ref[2]
-        ref[0,3,1,1]=(0.0988989416429)*x_ref[0]**o+(-0.446243235174)*x_ref[0]+(-0.691253313617)*x_ref[1]**o+(0.338823693086)*x_ref[1]+(0.707054126334)*x_ref[2]**o+(0.601121388278)*x_ref[2]
-        ref[0,3,2,0]=(-0.191366770484)*x_ref[0]**o+(0.961791275903)*x_ref[0]+(-0.103547475035)*x_ref[1]**o+(-0.745236510079)*x_ref[1]+(-0.157506981712)*x_ref[2]**o+(0.986229506787)*x_ref[2]
-        ref[0,3,2,1]=(-0.886091883647)*x_ref[0]**o+(0.6979804248)*x_ref[0]+(-0.366575419428)*x_ref[1]**o+(-0.958601153259)*x_ref[1]+(-0.0119724511494)*x_ref[2]**o+(-0.76101132076)*x_ref[2]
-        ref[0,4,0,0]=(0.923290554434)*x_ref[0]**o+(0.411359492198)*x_ref[0]+(-0.977999562875)*x_ref[1]**o+(0.352085161527)*x_ref[1]+(0.955745235349)*x_ref[2]**o+(-0.978885609257)*x_ref[2]
-        ref[0,4,0,1]=(0.226973479105)*x_ref[0]**o+(-0.423881897251)*x_ref[0]+(0.889101969481)*x_ref[1]**o+(-0.994236389028)*x_ref[1]+(0.0159169033361)*x_ref[2]**o+(-0.559935154203)*x_ref[2]
-        ref[0,4,1,0]=(-0.225427291797)*x_ref[0]**o+(-0.557334621848)*x_ref[0]+(-0.486252586142)*x_ref[1]**o+(0.0497120905216)*x_ref[1]+(0.84165736691)*x_ref[2]**o+(-0.185010156797)*x_ref[2]
-        ref[0,4,1,1]=(0.762694602609)*x_ref[0]**o+(-0.447367170727)*x_ref[0]+(-0.61103181818)*x_ref[1]**o+(0.689761057656)*x_ref[1]+(-0.631855120122)*x_ref[2]**o+(0.33274655602)*x_ref[2]
-        ref[0,4,2,0]=(-0.198884868914)*x_ref[0]**o+(0.716371959278)*x_ref[0]+(0.260871768919)*x_ref[1]**o+(0.622241740082)*x_ref[1]+(0.774103524035)*x_ref[2]**o+(0.186132703676)*x_ref[2]
-        ref[0,4,2,1]=(-0.309450645317)*x_ref[0]**o+(0.204754571336)*x_ref[0]+(0.483402810171)*x_ref[1]**o+(0.404620744188)*x_ref[1]+(-0.699137246959)*x_ref[2]**o+(0.467428706196)*x_ref[2]
-        ref[1,0,0,0]=(0.642289506448)*x_ref[0]**o+(0.383990304394)*x_ref[0]+(0.556940973318)*x_ref[1]**o+(0.135219729041)*x_ref[1]+(0.577195836358)*x_ref[2]**o+(-0.338924419674)*x_ref[2]
-        ref[1,0,0,1]=(-0.920873911295)*x_ref[0]**o+(-0.330610192304)*x_ref[0]+(-0.117226803856)*x_ref[1]**o+(0.172482867684)*x_ref[1]+(0.909140902709)*x_ref[2]**o+(-0.590494167913)*x_ref[2]
-        ref[1,0,1,0]=(0.210161538861)*x_ref[0]**o+(-0.83860241761)*x_ref[0]+(0.0257180382661)*x_ref[1]**o+(0.877633854348)*x_ref[1]+(0.26045311754)*x_ref[2]**o+(-0.971349902714)*x_ref[2]
-        ref[1,0,1,1]=(0.70736843125)*x_ref[0]**o+(-0.765121985431)*x_ref[0]+(-0.196525225943)*x_ref[1]**o+(-0.175928729346)*x_ref[1]+(0.945523028748)*x_ref[2]**o+(0.877830322823)*x_ref[2]
-        ref[1,0,2,0]=(-0.963513016065)*x_ref[0]**o+(0.0820537856351)*x_ref[0]+(0.0122070196118)*x_ref[1]**o+(-0.154147449592)*x_ref[1]+(0.323844633268)*x_ref[2]**o+(-0.124897698214)*x_ref[2]
-        ref[1,0,2,1]=(0.656267566405)*x_ref[0]**o+(0.0174786620768)*x_ref[0]+(0.763902435618)*x_ref[1]**o+(-0.986021506043)*x_ref[1]+(0.632625555994)*x_ref[2]**o+(-0.110657743523)*x_ref[2]
-        ref[1,1,0,0]=(0.00354144688732)*x_ref[0]**o+(-0.813515808171)*x_ref[0]+(-0.100717717446)*x_ref[1]**o+(0.0543708163629)*x_ref[1]+(0.785927880762)*x_ref[2]**o+(0.0109166652227)*x_ref[2]
-        ref[1,1,0,1]=(-0.239705688631)*x_ref[0]**o+(0.402915642509)*x_ref[0]+(0.463371068163)*x_ref[1]**o+(-0.507302462928)*x_ref[1]+(-0.0789844128295)*x_ref[2]**o+(0.669144891499)*x_ref[2]
-        ref[1,1,1,0]=(-0.491891367001)*x_ref[0]**o+(-0.524377636928)*x_ref[0]+(0.903091863917)*x_ref[1]**o+(-0.554368807183)*x_ref[1]+(0.332899195339)*x_ref[2]**o+(-0.645216147049)*x_ref[2]
-        ref[1,1,1,1]=(-0.915843941243)*x_ref[0]**o+(-0.233175654748)*x_ref[0]+(0.467730425037)*x_ref[1]**o+(-0.765957936683)*x_ref[1]+(0.726678877276)*x_ref[2]**o+(0.770533947942)*x_ref[2]
-        ref[1,1,2,0]=(0.678071852032)*x_ref[0]**o+(0.266537844237)*x_ref[0]+(0.324335300151)*x_ref[1]**o+(-0.286713971373)*x_ref[1]+(-0.702384414014)*x_ref[2]**o+(0.887198276519)*x_ref[2]
-        ref[1,1,2,1]=(0.0466444959648)*x_ref[0]**o+(0.689162912677)*x_ref[0]+(-0.35033923676)*x_ref[1]**o+(-0.0536380766876)*x_ref[1]+(-0.511833442517)*x_ref[2]**o+(0.125566299829)*x_ref[2]
-        ref[1,2,0,0]=(-0.803170431622)*x_ref[0]**o+(0.476211169752)*x_ref[0]+(-0.170510267953)*x_ref[1]**o+(-0.765945735317)*x_ref[1]+(-0.169966329291)*x_ref[2]**o+(-0.988525918724)*x_ref[2]
-        ref[1,2,0,1]=(0.289618751212)*x_ref[0]**o+(0.294379040976)*x_ref[0]+(-0.922478416838)*x_ref[1]**o+(0.210546495537)*x_ref[1]+(-0.87266381496)*x_ref[2]**o+(-0.865571669577)*x_ref[2]
-        ref[1,2,1,0]=(-0.292811054005)*x_ref[0]**o+(0.651280833746)*x_ref[0]+(-0.625004203736)*x_ref[1]**o+(0.372078169172)*x_ref[1]+(-0.0539099055169)*x_ref[2]**o+(0.0911869270008)*x_ref[2]
-        ref[1,2,1,1]=(0.496217698294)*x_ref[0]**o+(-0.986021787133)*x_ref[0]+(0.246417059532)*x_ref[1]**o+(0.610226802401)*x_ref[1]+(0.991534665298)*x_ref[2]**o+(-0.507441185982)*x_ref[2]
-        ref[1,2,2,0]=(-0.839902565947)*x_ref[0]**o+(-0.279607147278)*x_ref[0]+(0.278212307963)*x_ref[1]**o+(0.609793640036)*x_ref[1]+(0.940471913774)*x_ref[2]**o+(0.21860828705)*x_ref[2]
-        ref[1,2,2,1]=(0.789578112278)*x_ref[0]**o+(-0.0226697818608)*x_ref[0]+(0.216321340291)*x_ref[1]**o+(-0.701818463454)*x_ref[1]+(-0.166689030646)*x_ref[2]**o+(0.966131542292)*x_ref[2]
-        ref[1,3,0,0]=(0.149337042551)*x_ref[0]**o+(-0.785050579674)*x_ref[0]+(0.530219924721)*x_ref[1]**o+(-0.971927239398)*x_ref[1]+(0.950917908603)*x_ref[2]**o+(0.132668077447)*x_ref[2]
-        ref[1,3,0,1]=(0.983081559724)*x_ref[0]**o+(-0.358694498455)*x_ref[0]+(0.181080099281)*x_ref[1]**o+(-0.699756291643)*x_ref[1]+(-0.744335953304)*x_ref[2]**o+(0.00262043221382)*x_ref[2]
-        ref[1,3,1,0]=(0.31776032045)*x_ref[0]**o+(-0.0726184220029)*x_ref[0]+(-0.759883735971)*x_ref[1]**o+(-0.6389710873)*x_ref[1]+(-0.607858499502)*x_ref[2]**o+(-0.397169895784)*x_ref[2]
-        ref[1,3,1,1]=(-0.950468389728)*x_ref[0]**o+(0.831121915521)*x_ref[0]+(0.552857011083)*x_ref[1]**o+(0.848599672594)*x_ref[1]+(0.432183564231)*x_ref[2]**o+(0.57537721362)*x_ref[2]
-        ref[1,3,2,0]=(0.736080143601)*x_ref[0]**o+(-0.804140307747)*x_ref[0]+(-0.163864867884)*x_ref[1]**o+(0.950874042315)*x_ref[1]+(-0.99676139412)*x_ref[2]**o+(0.332320294246)*x_ref[2]
-        ref[1,3,2,1]=(0.119082582041)*x_ref[0]**o+(-0.969740778852)*x_ref[0]+(0.828432583532)*x_ref[1]**o+(0.190324050395)*x_ref[1]+(-0.42639142674)*x_ref[2]**o+(0.315519578192)*x_ref[2]
-        ref[1,4,0,0]=(-0.798465141775)*x_ref[0]**o+(-0.717282977908)*x_ref[0]+(0.935655148713)*x_ref[1]**o+(-0.655752964484)*x_ref[1]+(0.159990149099)*x_ref[2]**o+(-0.537115062687)*x_ref[2]
-        ref[1,4,0,1]=(0.445151775007)*x_ref[0]**o+(-0.867956302051)*x_ref[0]+(-0.809856879825)*x_ref[1]**o+(-0.326897750981)*x_ref[1]+(0.756352311987)*x_ref[2]**o+(0.577585513459)*x_ref[2]
-        ref[1,4,1,0]=(0.294243347591)*x_ref[0]**o+(0.774741656931)*x_ref[0]+(-0.0799985737984)*x_ref[1]**o+(0.179789107412)*x_ref[1]+(-0.612198025189)*x_ref[2]**o+(-0.07086009611)*x_ref[2]
-        ref[1,4,1,1]=(0.0692586287045)*x_ref[0]**o+(-0.671956300122)*x_ref[0]+(-0.948667104683)*x_ref[1]**o+(0.68656246801)*x_ref[1]+(-0.352975297696)*x_ref[2]**o+(0.277952113716)*x_ref[2]
-        ref[1,4,2,0]=(-0.491316095517)*x_ref[0]**o+(0.725899087239)*x_ref[0]+(0.634113963431)*x_ref[1]**o+(0.235694393453)*x_ref[1]+(-0.15600720713)*x_ref[2]**o+(0.954814976539)*x_ref[2]
-        ref[1,4,2,1]=(0.120206996339)*x_ref[0]**o+(-0.86151411823)*x_ref[0]+(-0.137093650097)*x_ref[1]**o+(0.633402978246)*x_ref[1]+(-0.42515364728)*x_ref[2]**o+(-0.987634210617)*x_ref[2]
-        ref[2,0,0,0]=(0.539463971222)*x_ref[0]**o+(-0.03435650579)*x_ref[0]+(-0.884395295544)*x_ref[1]**o+(0.215454879022)*x_ref[1]+(0.842377328246)*x_ref[2]**o+(0.370920136871)*x_ref[2]
-        ref[2,0,0,1]=(-0.411505463039)*x_ref[0]**o+(0.446494039439)*x_ref[0]+(0.0313771969556)*x_ref[1]**o+(0.602893223061)*x_ref[1]+(-0.30383490021)*x_ref[2]**o+(-0.788028756758)*x_ref[2]
-        ref[2,0,1,0]=(0.489009615999)*x_ref[0]**o+(-0.95508248016)*x_ref[0]+(-0.21489475022)*x_ref[1]**o+(-0.857263478431)*x_ref[1]+(-0.123703409045)*x_ref[2]**o+(0.663389562431)*x_ref[2]
-        ref[2,0,1,1]=(-0.0224763310929)*x_ref[0]**o+(-0.315886249237)*x_ref[0]+(-0.318201849695)*x_ref[1]**o+(0.423732682462)*x_ref[1]+(0.396065636381)*x_ref[2]**o+(0.0816717878865)*x_ref[2]
-        ref[2,0,2,0]=(-0.191432618224)*x_ref[0]**o+(0.688389390795)*x_ref[0]+(-0.382948112159)*x_ref[1]**o+(0.562905173818)*x_ref[1]+(-0.118396714029)*x_ref[2]**o+(0.234478642577)*x_ref[2]
-        ref[2,0,2,1]=(-0.348008173171)*x_ref[0]**o+(0.191994166636)*x_ref[0]+(0.450556057147)*x_ref[1]**o+(-0.710821693343)*x_ref[1]+(-0.245119333857)*x_ref[2]**o+(0.262869525239)*x_ref[2]
-        ref[2,1,0,0]=(-0.160444506203)*x_ref[0]**o+(-0.816142837432)*x_ref[0]+(-0.619722480492)*x_ref[1]**o+(-0.989077039675)*x_ref[1]+(-0.0282349103977)*x_ref[2]**o+(-0.629849819691)*x_ref[2]
-        ref[2,1,0,1]=(0.379513765297)*x_ref[0]**o+(0.934652105586)*x_ref[0]+(-0.632636427868)*x_ref[1]**o+(-0.0492550496553)*x_ref[1]+(0.137733572307)*x_ref[2]**o+(0.779782637942)*x_ref[2]
-        ref[2,1,1,0]=(0.469499320417)*x_ref[0]**o+(0.570880924125)*x_ref[0]+(-0.0329833251419)*x_ref[1]**o+(-0.0388751034604)*x_ref[1]+(-0.878520094389)*x_ref[2]**o+(0.992656649048)*x_ref[2]
-        ref[2,1,1,1]=(0.592005181995)*x_ref[0]**o+(-0.553980493526)*x_ref[0]+(0.359837665019)*x_ref[1]**o+(0.811107941179)*x_ref[1]+(-0.441929650912)*x_ref[2]**o+(-0.768618378636)*x_ref[2]
-        ref[2,1,2,0]=(0.741376258816)*x_ref[0]**o+(-0.238909756717)*x_ref[0]+(0.204631082449)*x_ref[1]**o+(0.970501662949)*x_ref[1]+(-0.615638092239)*x_ref[2]**o+(-0.575948750844)*x_ref[2]
-        ref[2,1,2,1]=(0.774050933112)*x_ref[0]**o+(-0.872234076721)*x_ref[0]+(-0.0936189240061)*x_ref[1]**o+(-0.773608756961)*x_ref[1]+(-0.119171907808)*x_ref[2]**o+(-0.256124796845)*x_ref[2]
-        ref[2,2,0,0]=(0.459481754425)*x_ref[0]**o+(0.478364929493)*x_ref[0]+(0.460199733287)*x_ref[1]**o+(0.66880294659)*x_ref[1]+(-0.859525058389)*x_ref[2]**o+(0.77960284414)*x_ref[2]
-        ref[2,2,0,1]=(0.690557835207)*x_ref[0]**o+(-0.812305038592)*x_ref[0]+(0.837924124791)*x_ref[1]**o+(-0.785979206364)*x_ref[1]+(-0.295553949819)*x_ref[2]**o+(0.575096295897)*x_ref[2]
-        ref[2,2,1,0]=(0.443193683205)*x_ref[0]**o+(0.0355033222253)*x_ref[0]+(0.497641002766)*x_ref[1]**o+(-0.636955142451)*x_ref[1]+(-0.265324357454)*x_ref[2]**o+(0.734148569078)*x_ref[2]
-        ref[2,2,1,1]=(-0.088707242599)*x_ref[0]**o+(0.513403518669)*x_ref[0]+(0.337741737651)*x_ref[1]**o+(-0.174843924478)*x_ref[1]+(0.687291255986)*x_ref[2]**o+(0.473850502258)*x_ref[2]
-        ref[2,2,2,0]=(0.5305624642)*x_ref[0]**o+(-0.972997835953)*x_ref[0]+(0.00197107287888)*x_ref[1]**o+(-0.75490872634)*x_ref[1]+(-0.0569624569435)*x_ref[2]**o+(-0.0780532868631)*x_ref[2]
-        ref[2,2,2,1]=(-0.744584471866)*x_ref[0]**o+(0.915494909272)*x_ref[0]+(0.239235050038)*x_ref[1]**o+(-0.192466753187)*x_ref[1]+(0.933556550824)*x_ref[2]**o+(-0.786420251487)*x_ref[2]
-        ref[2,3,0,0]=(0.472114530627)*x_ref[0]**o+(0.0693211807557)*x_ref[0]+(-0.274273425713)*x_ref[1]**o+(0.136242554894)*x_ref[1]+(-0.329240675785)*x_ref[2]**o+(0.0212539247343)*x_ref[2]
-        ref[2,3,0,1]=(-0.780426108099)*x_ref[0]**o+(-0.632382551025)*x_ref[0]+(0.554926949239)*x_ref[1]**o+(0.264204009059)*x_ref[1]+(-0.868007525824)*x_ref[2]**o+(-0.937631120201)*x_ref[2]
-        ref[2,3,1,0]=(-0.826692080947)*x_ref[0]**o+(0.915241858538)*x_ref[0]+(-0.49986160859)*x_ref[1]**o+(0.921686464658)*x_ref[1]+(0.71996666304)*x_ref[2]**o+(0.297609501096)*x_ref[2]
-        ref[2,3,1,1]=(0.991896994614)*x_ref[0]**o+(-0.543310008103)*x_ref[0]+(0.0791899631111)*x_ref[1]**o+(-0.914088200145)*x_ref[1]+(-0.496337624951)*x_ref[2]**o+(0.708950898614)*x_ref[2]
-        ref[2,3,2,0]=(-0.235116966432)*x_ref[0]**o+(-0.492848730207)*x_ref[0]+(0.428728646789)*x_ref[1]**o+(-0.410747634691)*x_ref[1]+(0.705059815458)*x_ref[2]**o+(-0.185604633831)*x_ref[2]
-        ref[2,3,2,1]=(0.838829037117)*x_ref[0]**o+(0.670561147563)*x_ref[0]+(0.621407965075)*x_ref[1]**o+(-0.10624946305)*x_ref[1]+(0.893703402687)*x_ref[2]**o+(0.985504995821)*x_ref[2]
-        ref[2,4,0,0]=(0.635072504682)*x_ref[0]**o+(-0.681962427555)*x_ref[0]+(-0.00774518011081)*x_ref[1]**o+(-0.264996228668)*x_ref[1]+(0.690668403198)*x_ref[2]**o+(0.883573761062)*x_ref[2]
-        ref[2,4,0,1]=(0.545632268651)*x_ref[0]**o+(0.439668519394)*x_ref[0]+(-0.482479808491)*x_ref[1]**o+(0.752028962391)*x_ref[1]+(0.0596773623939)*x_ref[2]**o+(-0.369987181127)*x_ref[2]
-        ref[2,4,1,0]=(0.659005322796)*x_ref[0]**o+(0.503940833428)*x_ref[0]+(0.643633321586)*x_ref[1]**o+(0.927082323252)*x_ref[1]+(0.354072146184)*x_ref[2]**o+(-0.638737560608)*x_ref[2]
-        ref[2,4,1,1]=(-0.443548860913)*x_ref[0]**o+(0.707607048458)*x_ref[0]+(-0.955225746402)*x_ref[1]**o+(0.515995563585)*x_ref[1]+(-0.288406637165)*x_ref[2]**o+(-0.760864937318)*x_ref[2]
-        ref[2,4,2,0]=(0.898146580355)*x_ref[0]**o+(-0.590650787106)*x_ref[0]+(0.036095789753)*x_ref[1]**o+(0.326040260581)*x_ref[1]+(0.680069361306)*x_ref[2]**o+(0.333839099341)*x_ref[2]
-        ref[2,4,2,1]=(-0.151364260271)*x_ref[0]**o+(-0.675198183832)*x_ref[0]+(-0.183626298978)*x_ref[1]**o+(-0.182565217146)*x_ref[1]+(0.0345632129814)*x_ref[2]**o+(-0.581534100763)*x_ref[2]
-        ref[3,0,0,0]=(-0.942351703246)*x_ref[0]**o+(-0.699567649453)*x_ref[0]+(-0.832068665702)*x_ref[1]**o+(0.163439416504)*x_ref[1]+(0.742500339519)*x_ref[2]**o+(-0.492882887489)*x_ref[2]
-        ref[3,0,0,1]=(0.990078296484)*x_ref[0]**o+(-0.999837336587)*x_ref[0]+(0.197589456459)*x_ref[1]**o+(0.431403059019)*x_ref[1]+(0.859864015871)*x_ref[2]**o+(-0.267474829282)*x_ref[2]
-        ref[3,0,1,0]=(-0.776773660723)*x_ref[0]**o+(-0.189048370486)*x_ref[0]+(0.926953856802)*x_ref[1]**o+(-0.72314744652)*x_ref[1]+(0.330064363809)*x_ref[2]**o+(0.188533334359)*x_ref[2]
-        ref[3,0,1,1]=(-0.854830058762)*x_ref[0]**o+(0.832073883276)*x_ref[0]+(-0.425691165124)*x_ref[1]**o+(0.162351500316)*x_ref[1]+(0.370604864512)*x_ref[2]**o+(-0.581907071484)*x_ref[2]
-        ref[3,0,2,0]=(-0.316716909548)*x_ref[0]**o+(0.335417284383)*x_ref[0]+(-0.783061160352)*x_ref[1]**o+(-0.253972519239)*x_ref[1]+(-0.826432933721)*x_ref[2]**o+(0.267368378363)*x_ref[2]
-        ref[3,0,2,1]=(-0.765899705462)*x_ref[0]**o+(-0.0993875861476)*x_ref[0]+(-0.211785004352)*x_ref[1]**o+(-0.635330151497)*x_ref[1]+(0.414575412599)*x_ref[2]**o+(0.586882274623)*x_ref[2]
-        ref[3,1,0,0]=(0.987776377237)*x_ref[0]**o+(0.796660669191)*x_ref[0]+(0.580724891862)*x_ref[1]**o+(-0.24149253995)*x_ref[1]+(-0.633421016909)*x_ref[2]**o+(-0.220110913711)*x_ref[2]
-        ref[3,1,0,1]=(-0.182240918081)*x_ref[0]**o+(-0.290526050572)*x_ref[0]+(0.00283230959976)*x_ref[1]**o+(-0.933282166805)*x_ref[1]+(-0.857893235883)*x_ref[2]**o+(0.551414074127)*x_ref[2]
-        ref[3,1,1,0]=(-0.854435997816)*x_ref[0]**o+(0.706455144263)*x_ref[0]+(0.406237965254)*x_ref[1]**o+(0.192071142415)*x_ref[1]+(0.357966796834)*x_ref[2]**o+(0.887011087987)*x_ref[2]
-        ref[3,1,1,1]=(0.832013396996)*x_ref[0]**o+(0.696133072321)*x_ref[0]+(0.682726968712)*x_ref[1]**o+(0.613316240514)*x_ref[1]+(0.12600339887)*x_ref[2]**o+(-0.620088231382)*x_ref[2]
-        ref[3,1,2,0]=(-0.178681615221)*x_ref[0]**o+(-0.952835986168)*x_ref[0]+(0.299692693746)*x_ref[1]**o+(0.892451908416)*x_ref[1]+(0.202403273634)*x_ref[2]**o+(0.677212897943)*x_ref[2]
-        ref[3,1,2,1]=(0.0592594053342)*x_ref[0]**o+(0.56391153959)*x_ref[0]+(-0.874866627667)*x_ref[1]**o+(0.432102900769)*x_ref[1]+(-0.49073126285)*x_ref[2]**o+(-0.010495860028)*x_ref[2]
-        ref[3,2,0,0]=(0.548006445814)*x_ref[0]**o+(0.667313392202)*x_ref[0]+(0.397805355499)*x_ref[1]**o+(-0.788100267808)*x_ref[1]+(0.869234055258)*x_ref[2]**o+(-0.830241520401)*x_ref[2]
-        ref[3,2,0,1]=(0.72586139216)*x_ref[0]**o+(-0.931878957878)*x_ref[0]+(-0.94119555858)*x_ref[1]**o+(-0.133544806169)*x_ref[1]+(0.754263323382)*x_ref[2]**o+(-0.446604740157)*x_ref[2]
-        ref[3,2,1,0]=(-0.28135830707)*x_ref[0]**o+(-0.478744058518)*x_ref[0]+(0.88219033731)*x_ref[1]**o+(0.460587286945)*x_ref[1]+(-0.849692146096)*x_ref[2]**o+(0.0927701345107)*x_ref[2]
-        ref[3,2,1,1]=(-0.681859641611)*x_ref[0]**o+(-0.670164293088)*x_ref[0]+(0.796366374435)*x_ref[1]**o+(0.837230317054)*x_ref[1]+(-0.413283915904)*x_ref[2]**o+(0.779624227187)*x_ref[2]
-        ref[3,2,2,0]=(-0.803242771255)*x_ref[0]**o+(-0.0687616271776)*x_ref[0]+(-0.948856027999)*x_ref[1]**o+(0.762568790931)*x_ref[1]+(0.937588292604)*x_ref[2]**o+(-0.0224232611283)*x_ref[2]
-        ref[3,2,2,1]=(-0.215752944937)*x_ref[0]**o+(-0.807114296075)*x_ref[0]+(0.970625375964)*x_ref[1]**o+(0.68578124692)*x_ref[1]+(-0.165007047419)*x_ref[2]**o+(0.942718439981)*x_ref[2]
-        ref[3,3,0,0]=(0.152001104716)*x_ref[0]**o+(-0.657242342357)*x_ref[0]+(0.559608661705)*x_ref[1]**o+(0.0764403273251)*x_ref[1]+(0.633414754695)*x_ref[2]**o+(0.430777868344)*x_ref[2]
-        ref[3,3,0,1]=(-0.898109497759)*x_ref[0]**o+(0.736574249406)*x_ref[0]+(-0.569584184574)*x_ref[1]**o+(-0.145501395506)*x_ref[1]+(-0.412424116475)*x_ref[2]**o+(-0.416350923096)*x_ref[2]
-        ref[3,3,1,0]=(0.602022795614)*x_ref[0]**o+(-0.848525569825)*x_ref[0]+(-0.713426287505)*x_ref[1]**o+(-0.829278452687)*x_ref[1]+(-0.491257659316)*x_ref[2]**o+(0.90219908999)*x_ref[2]
-        ref[3,3,1,1]=(-0.769110216066)*x_ref[0]**o+(-0.789464037338)*x_ref[0]+(-0.363686172584)*x_ref[1]**o+(-0.86190787068)*x_ref[1]+(0.275438119232)*x_ref[2]**o+(0.285209834248)*x_ref[2]
-        ref[3,3,2,0]=(0.351662405853)*x_ref[0]**o+(0.8403302307)*x_ref[0]+(-0.449869332519)*x_ref[1]**o+(0.936043614838)*x_ref[1]+(-0.656908777335)*x_ref[2]**o+(-0.231923872531)*x_ref[2]
-        ref[3,3,2,1]=(0.873848945653)*x_ref[0]**o+(0.551429883959)*x_ref[0]+(-0.577942548701)*x_ref[1]**o+(-0.254317163049)*x_ref[1]+(0.64878089878)*x_ref[2]**o+(0.7135339515)*x_ref[2]
-        ref[3,4,0,0]=(0.891435610494)*x_ref[0]**o+(0.598893704498)*x_ref[0]+(0.24682094756)*x_ref[1]**o+(0.0895612710338)*x_ref[1]+(-0.513686244953)*x_ref[2]**o+(0.307205505502)*x_ref[2]
-        ref[3,4,0,1]=(-0.577752944196)*x_ref[0]**o+(-0.458383751623)*x_ref[0]+(-0.913956988143)*x_ref[1]**o+(0.470857602235)*x_ref[1]+(0.631726850665)*x_ref[2]**o+(-0.112962289904)*x_ref[2]
-        ref[3,4,1,0]=(-0.65648177489)*x_ref[0]**o+(-0.843530972747)*x_ref[0]+(-0.0332153723809)*x_ref[1]**o+(0.230484263355)*x_ref[1]+(-0.865687508592)*x_ref[2]**o+(0.122751735082)*x_ref[2]
-        ref[3,4,1,1]=(-0.353502640734)*x_ref[0]**o+(-0.816020900282)*x_ref[0]+(0.943688796868)*x_ref[1]**o+(-0.526707881958)*x_ref[1]+(-0.790258298117)*x_ref[2]**o+(-0.748706809042)*x_ref[2]
-        ref[3,4,2,0]=(-0.596345912175)*x_ref[0]**o+(0.872771121837)*x_ref[0]+(0.100107395575)*x_ref[1]**o+(0.950482249217)*x_ref[1]+(0.0487634582783)*x_ref[2]**o+(-0.0285218097887)*x_ref[2]
-        ref[3,4,2,1]=(-0.827443553933)*x_ref[0]**o+(-0.922564800149)*x_ref[0]+(-0.810354385287)*x_ref[1]**o+(0.630079217293)*x_ref[1]+(-0.316280559723)*x_ref[2]**o+(0.977830435871)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.142445811229)*x[0]**o+(-0.170111870439)*x[0]+(-0.571150729608)*x[1]**o+(-0.799596368319)*x[1]
-        ref=(0.142445811229)*x_ref[0]**o+(-0.170111870439)*x_ref[0]+(-0.571150729608)*x_ref[1]**o+(-0.799596368319)*x_ref[1]
-      else:
-        arg=(0.131269935442)*x[0]**o+(0.67764849927)*x[0]+(0.199946665)*x[1]**o+(0.775678673404)*x[1]+(-0.818505707274)*x[2]**o+(-0.141160005914)*x[2]
-        ref=(0.131269935442)*x_ref[0]**o+(0.67764849927)*x_ref[0]+(0.199946665)*x_ref[1]**o+(0.775678673404)*x_ref[1]+(-0.818505707274)*x_ref[2]**o+(-0.141160005914)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.271030346059)*x[0]**o+(-0.604054986035)*x[0]+(-0.856492962015)*x[1]**o+(0.229582187423)*x[1]
-        arg[1]=(-0.152539485929)*x[0]**o+(0.936634973224)*x[0]+(0.805016132937)*x[1]**o+(-0.6832854412)*x[1]
-        ref[0]=(-0.271030346059)*x_ref[0]**o+(-0.604054986035)*x_ref[0]+(-0.856492962015)*x_ref[1]**o+(0.229582187423)*x_ref[1]
-        ref[1]=(-0.152539485929)*x_ref[0]**o+(0.936634973224)*x_ref[0]+(0.805016132937)*x_ref[1]**o+(-0.6832854412)*x_ref[1]
-      else:
-        arg[0]=(-0.484580515247)*x[0]**o+(-0.134539997002)*x[0]+(0.589742989514)*x[1]**o+(-0.950803827747)*x[1]+(-0.852976687869)*x[2]**o+(0.0999526415345)*x[2]
-        arg[1]=(-0.863620642149)*x[0]**o+(-0.16255544441)*x[0]+(-0.4963232161)*x[1]**o+(0.180988811217)*x[1]+(-0.787186716126)*x[2]**o+(-0.359825851725)*x[2]
-        ref[0]=(-0.484580515247)*x_ref[0]**o+(-0.134539997002)*x_ref[0]+(0.589742989514)*x_ref[1]**o+(-0.950803827747)*x_ref[1]+(-0.852976687869)*x_ref[2]**o+(0.0999526415345)*x_ref[2]
-        ref[1]=(-0.863620642149)*x_ref[0]**o+(-0.16255544441)*x_ref[0]+(-0.4963232161)*x_ref[1]**o+(0.180988811217)*x_ref[1]+(-0.787186716126)*x_ref[2]**o+(-0.359825851725)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.88064835903)*x[0]**o+(-0.140271048585)*x[0]+(-0.363467917345)*x[1]**o+(0.382530733181)*x[1]
-        arg[0,1]=(0.835096280471)*x[0]**o+(0.132077921375)*x[0]+(-0.814392115734)*x[1]**o+(-0.379227781873)*x[1]
-        arg[0,2]=(0.257391174596)*x[0]**o+(-0.135017751364)*x[0]+(-0.462760793484)*x[1]**o+(-0.332510860616)*x[1]
-        arg[0,3]=(0.303541666957)*x[0]**o+(0.729054207976)*x[0]+(-0.0474210800089)*x[1]**o+(0.213859363809)*x[1]
-        arg[0,4]=(0.564466740909)*x[0]**o+(0.684761789227)*x[0]+(0.432934636771)*x[1]**o+(0.261269614075)*x[1]
-        arg[1,0]=(0.83080596334)*x[0]**o+(0.968795153198)*x[0]+(0.835115581928)*x[1]**o+(-0.134688885728)*x[1]
-        arg[1,1]=(-0.876235093042)*x[0]**o+(-0.43923440557)*x[0]+(-0.641186633503)*x[1]**o+(-0.987129244994)*x[1]
-        arg[1,2]=(-0.994007922096)*x[0]**o+(0.534914510762)*x[0]+(0.754420969331)*x[1]**o+(0.241533891038)*x[1]
-        arg[1,3]=(-0.196027247194)*x[0]**o+(0.962231147494)*x[0]+(-0.819146467532)*x[1]**o+(0.966024528731)*x[1]
-        arg[1,4]=(-0.577014723723)*x[0]**o+(0.350310620855)*x[0]+(0.16266475329)*x[1]**o+(-0.926739533525)*x[1]
-        arg[2,0]=(-0.262964780787)*x[0]**o+(-0.824445469277)*x[0]+(-0.982497605841)*x[1]**o+(0.900080022932)*x[1]
-        arg[2,1]=(0.54409272334)*x[0]**o+(0.789421020125)*x[0]+(0.672239490644)*x[1]**o+(-0.0306885937363)*x[1]
-        arg[2,2]=(-0.130272075526)*x[0]**o+(0.51213564573)*x[0]+(-0.819817699321)*x[1]**o+(-0.259068167835)*x[1]
-        arg[2,3]=(-0.61526267092)*x[0]**o+(-0.504362726269)*x[0]+(0.362429515671)*x[1]**o+(-0.0921852465615)*x[1]
-        arg[2,4]=(-0.344772989987)*x[0]**o+(0.260747743828)*x[0]+(0.474457474131)*x[1]**o+(0.436008642452)*x[1]
-        arg[3,0]=(-0.72740499107)*x[0]**o+(-0.297524430077)*x[0]+(-0.809254720524)*x[1]**o+(-0.230695822532)*x[1]
-        arg[3,1]=(-0.0817042383885)*x[0]**o+(-0.324890823023)*x[0]+(0.923635342281)*x[1]**o+(-0.336825317481)*x[1]
-        arg[3,2]=(-0.872954045409)*x[0]**o+(0.242165239629)*x[0]+(0.919264824591)*x[1]**o+(0.424247774945)*x[1]
-        arg[3,3]=(0.146344350418)*x[0]**o+(-0.705285807962)*x[0]+(-0.0735095471635)*x[1]**o+(-0.464180824267)*x[1]
-        arg[3,4]=(0.624085113245)*x[0]**o+(0.719452515121)*x[0]+(0.28331108038)*x[1]**o+(-0.897435702442)*x[1]
-        ref[0,0]=(-0.88064835903)*x_ref[0]**o+(-0.140271048585)*x_ref[0]+(-0.363467917345)*x_ref[1]**o+(0.382530733181)*x_ref[1]
-        ref[0,1]=(0.835096280471)*x_ref[0]**o+(0.132077921375)*x_ref[0]+(-0.814392115734)*x_ref[1]**o+(-0.379227781873)*x_ref[1]
-        ref[0,2]=(0.257391174596)*x_ref[0]**o+(-0.135017751364)*x_ref[0]+(-0.462760793484)*x_ref[1]**o+(-0.332510860616)*x_ref[1]
-        ref[0,3]=(0.303541666957)*x_ref[0]**o+(0.729054207976)*x_ref[0]+(-0.0474210800089)*x_ref[1]**o+(0.213859363809)*x_ref[1]
-        ref[0,4]=(0.564466740909)*x_ref[0]**o+(0.684761789227)*x_ref[0]+(0.432934636771)*x_ref[1]**o+(0.261269614075)*x_ref[1]
-        ref[1,0]=(0.83080596334)*x_ref[0]**o+(0.968795153198)*x_ref[0]+(0.835115581928)*x_ref[1]**o+(-0.134688885728)*x_ref[1]
-        ref[1,1]=(-0.876235093042)*x_ref[0]**o+(-0.43923440557)*x_ref[0]+(-0.641186633503)*x_ref[1]**o+(-0.987129244994)*x_ref[1]
-        ref[1,2]=(-0.994007922096)*x_ref[0]**o+(0.534914510762)*x_ref[0]+(0.754420969331)*x_ref[1]**o+(0.241533891038)*x_ref[1]
-        ref[1,3]=(-0.196027247194)*x_ref[0]**o+(0.962231147494)*x_ref[0]+(-0.819146467532)*x_ref[1]**o+(0.966024528731)*x_ref[1]
-        ref[1,4]=(-0.577014723723)*x_ref[0]**o+(0.350310620855)*x_ref[0]+(0.16266475329)*x_ref[1]**o+(-0.926739533525)*x_ref[1]
-        ref[2,0]=(-0.262964780787)*x_ref[0]**o+(-0.824445469277)*x_ref[0]+(-0.982497605841)*x_ref[1]**o+(0.900080022932)*x_ref[1]
-        ref[2,1]=(0.54409272334)*x_ref[0]**o+(0.789421020125)*x_ref[0]+(0.672239490644)*x_ref[1]**o+(-0.0306885937363)*x_ref[1]
-        ref[2,2]=(-0.130272075526)*x_ref[0]**o+(0.51213564573)*x_ref[0]+(-0.819817699321)*x_ref[1]**o+(-0.259068167835)*x_ref[1]
-        ref[2,3]=(-0.61526267092)*x_ref[0]**o+(-0.504362726269)*x_ref[0]+(0.362429515671)*x_ref[1]**o+(-0.0921852465615)*x_ref[1]
-        ref[2,4]=(-0.344772989987)*x_ref[0]**o+(0.260747743828)*x_ref[0]+(0.474457474131)*x_ref[1]**o+(0.436008642452)*x_ref[1]
-        ref[3,0]=(-0.72740499107)*x_ref[0]**o+(-0.297524430077)*x_ref[0]+(-0.809254720524)*x_ref[1]**o+(-0.230695822532)*x_ref[1]
-        ref[3,1]=(-0.0817042383885)*x_ref[0]**o+(-0.324890823023)*x_ref[0]+(0.923635342281)*x_ref[1]**o+(-0.336825317481)*x_ref[1]
-        ref[3,2]=(-0.872954045409)*x_ref[0]**o+(0.242165239629)*x_ref[0]+(0.919264824591)*x_ref[1]**o+(0.424247774945)*x_ref[1]
-        ref[3,3]=(0.146344350418)*x_ref[0]**o+(-0.705285807962)*x_ref[0]+(-0.0735095471635)*x_ref[1]**o+(-0.464180824267)*x_ref[1]
-        ref[3,4]=(0.624085113245)*x_ref[0]**o+(0.719452515121)*x_ref[0]+(0.28331108038)*x_ref[1]**o+(-0.897435702442)*x_ref[1]
-      else:
-        arg[0,0]=(0.47332206873)*x[0]**o+(0.20564453167)*x[0]+(-0.175485469473)*x[1]**o+(-0.25166656853)*x[1]+(-0.242693318919)*x[2]**o+(-0.773417228526)*x[2]
-        arg[0,1]=(0.788563488587)*x[0]**o+(0.598162739778)*x[0]+(-0.736463777722)*x[1]**o+(-0.161555683484)*x[1]+(0.480782882175)*x[2]**o+(-0.500552084345)*x[2]
-        arg[0,2]=(-0.207893050318)*x[0]**o+(0.206221241577)*x[0]+(0.306329036151)*x[1]**o+(0.585237890094)*x[1]+(0.0276469766188)*x[2]**o+(0.0502503670529)*x[2]
-        arg[0,3]=(0.914950534537)*x[0]**o+(0.401315333176)*x[0]+(0.245224334898)*x[1]**o+(0.526049350134)*x[1]+(-0.735617023846)*x[2]**o+(-0.674692140531)*x[2]
-        arg[0,4]=(-0.359566330106)*x[0]**o+(-0.279627730979)*x[0]+(-0.08398829656)*x[1]**o+(-0.789678621983)*x[1]+(-0.357374658443)*x[2]**o+(0.795724504883)*x[2]
-        arg[1,0]=(-0.0715278193161)*x[0]**o+(-0.562120168502)*x[0]+(0.428614380101)*x[1]**o+(0.115408373591)*x[1]+(-0.154674397872)*x[2]**o+(0.233468972682)*x[2]
-        arg[1,1]=(0.707445640039)*x[0]**o+(-0.719649334705)*x[0]+(-0.349743923514)*x[1]**o+(0.369262203159)*x[1]+(0.712786695739)*x[2]**o+(-0.962450154391)*x[2]
-        arg[1,2]=(-0.306983094408)*x[0]**o+(-0.933322822964)*x[0]+(-0.525515899443)*x[1]**o+(0.642320930433)*x[1]+(-0.950421802297)*x[2]**o+(-0.392142385683)*x[2]
-        arg[1,3]=(-0.765158324235)*x[0]**o+(-0.362010493356)*x[0]+(-0.918673930909)*x[1]**o+(0.72772784184)*x[1]+(-0.392848438408)*x[2]**o+(0.566119231816)*x[2]
-        arg[1,4]=(0.429984662315)*x[0]**o+(-0.165476415697)*x[0]+(0.778539911928)*x[1]**o+(0.411518911472)*x[1]+(0.418323432603)*x[2]**o+(-0.846495913126)*x[2]
-        arg[2,0]=(-0.836556750858)*x[0]**o+(0.976027316021)*x[0]+(-0.556499096672)*x[1]**o+(0.320038395915)*x[1]+(0.377663884516)*x[2]**o+(0.491202727923)*x[2]
-        arg[2,1]=(-0.329597826951)*x[0]**o+(-0.555819984044)*x[0]+(0.110029358927)*x[1]**o+(-0.737070187836)*x[1]+(-0.587142473737)*x[2]**o+(-0.0388834177112)*x[2]
-        arg[2,2]=(0.442251030646)*x[0]**o+(0.285010574287)*x[0]+(0.603267537331)*x[1]**o+(-0.0776884302384)*x[1]+(-0.123541484708)*x[2]**o+(0.44717125529)*x[2]
-        arg[2,3]=(0.474458930313)*x[0]**o+(0.415947401939)*x[0]+(0.381539850696)*x[1]**o+(-0.307590909422)*x[1]+(0.488348451586)*x[2]**o+(0.336883810306)*x[2]
-        arg[2,4]=(0.804466542611)*x[0]**o+(0.891337158669)*x[0]+(-0.599119487307)*x[1]**o+(-0.92047732727)*x[1]+(-0.251489480657)*x[2]**o+(-0.266483991526)*x[2]
-        arg[3,0]=(-0.733633520827)*x[0]**o+(0.494805537624)*x[0]+(-0.117702558274)*x[1]**o+(-0.000461693303442)*x[1]+(-0.102033981202)*x[2]**o+(-0.772865985272)*x[2]
-        arg[3,1]=(-0.636901276465)*x[0]**o+(-0.436330072041)*x[0]+(0.403048850222)*x[1]**o+(-0.94737100009)*x[1]+(0.781059874101)*x[2]**o+(-0.952781516037)*x[2]
-        arg[3,2]=(-0.489372336164)*x[0]**o+(0.221211043152)*x[0]+(0.793975373906)*x[1]**o+(0.424349965288)*x[1]+(0.453332885662)*x[2]**o+(-0.513541753005)*x[2]
-        arg[3,3]=(-0.700899677836)*x[0]**o+(-0.984271896306)*x[0]+(-0.663909486898)*x[1]**o+(0.461302174316)*x[1]+(-0.906457707724)*x[2]**o+(-0.0440003164038)*x[2]
-        arg[3,4]=(0.838326295366)*x[0]**o+(-0.483407593962)*x[0]+(-0.122458752397)*x[1]**o+(0.607337951095)*x[1]+(0.750481384434)*x[2]**o+(-0.677155633204)*x[2]
-        ref[0,0]=(0.47332206873)*x_ref[0]**o+(0.20564453167)*x_ref[0]+(-0.175485469473)*x_ref[1]**o+(-0.25166656853)*x_ref[1]+(-0.242693318919)*x_ref[2]**o+(-0.773417228526)*x_ref[2]
-        ref[0,1]=(0.788563488587)*x_ref[0]**o+(0.598162739778)*x_ref[0]+(-0.736463777722)*x_ref[1]**o+(-0.161555683484)*x_ref[1]+(0.480782882175)*x_ref[2]**o+(-0.500552084345)*x_ref[2]
-        ref[0,2]=(-0.207893050318)*x_ref[0]**o+(0.206221241577)*x_ref[0]+(0.306329036151)*x_ref[1]**o+(0.585237890094)*x_ref[1]+(0.0276469766188)*x_ref[2]**o+(0.0502503670529)*x_ref[2]
-        ref[0,3]=(0.914950534537)*x_ref[0]**o+(0.401315333176)*x_ref[0]+(0.245224334898)*x_ref[1]**o+(0.526049350134)*x_ref[1]+(-0.735617023846)*x_ref[2]**o+(-0.674692140531)*x_ref[2]
-        ref[0,4]=(-0.359566330106)*x_ref[0]**o+(-0.279627730979)*x_ref[0]+(-0.08398829656)*x_ref[1]**o+(-0.789678621983)*x_ref[1]+(-0.357374658443)*x_ref[2]**o+(0.795724504883)*x_ref[2]
-        ref[1,0]=(-0.0715278193161)*x_ref[0]**o+(-0.562120168502)*x_ref[0]+(0.428614380101)*x_ref[1]**o+(0.115408373591)*x_ref[1]+(-0.154674397872)*x_ref[2]**o+(0.233468972682)*x_ref[2]
-        ref[1,1]=(0.707445640039)*x_ref[0]**o+(-0.719649334705)*x_ref[0]+(-0.349743923514)*x_ref[1]**o+(0.369262203159)*x_ref[1]+(0.712786695739)*x_ref[2]**o+(-0.962450154391)*x_ref[2]
-        ref[1,2]=(-0.306983094408)*x_ref[0]**o+(-0.933322822964)*x_ref[0]+(-0.525515899443)*x_ref[1]**o+(0.642320930433)*x_ref[1]+(-0.950421802297)*x_ref[2]**o+(-0.392142385683)*x_ref[2]
-        ref[1,3]=(-0.765158324235)*x_ref[0]**o+(-0.362010493356)*x_ref[0]+(-0.918673930909)*x_ref[1]**o+(0.72772784184)*x_ref[1]+(-0.392848438408)*x_ref[2]**o+(0.566119231816)*x_ref[2]
-        ref[1,4]=(0.429984662315)*x_ref[0]**o+(-0.165476415697)*x_ref[0]+(0.778539911928)*x_ref[1]**o+(0.411518911472)*x_ref[1]+(0.418323432603)*x_ref[2]**o+(-0.846495913126)*x_ref[2]
-        ref[2,0]=(-0.836556750858)*x_ref[0]**o+(0.976027316021)*x_ref[0]+(-0.556499096672)*x_ref[1]**o+(0.320038395915)*x_ref[1]+(0.377663884516)*x_ref[2]**o+(0.491202727923)*x_ref[2]
-        ref[2,1]=(-0.329597826951)*x_ref[0]**o+(-0.555819984044)*x_ref[0]+(0.110029358927)*x_ref[1]**o+(-0.737070187836)*x_ref[1]+(-0.587142473737)*x_ref[2]**o+(-0.0388834177112)*x_ref[2]
-        ref[2,2]=(0.442251030646)*x_ref[0]**o+(0.285010574287)*x_ref[0]+(0.603267537331)*x_ref[1]**o+(-0.0776884302384)*x_ref[1]+(-0.123541484708)*x_ref[2]**o+(0.44717125529)*x_ref[2]
-        ref[2,3]=(0.474458930313)*x_ref[0]**o+(0.415947401939)*x_ref[0]+(0.381539850696)*x_ref[1]**o+(-0.307590909422)*x_ref[1]+(0.488348451586)*x_ref[2]**o+(0.336883810306)*x_ref[2]
-        ref[2,4]=(0.804466542611)*x_ref[0]**o+(0.891337158669)*x_ref[0]+(-0.599119487307)*x_ref[1]**o+(-0.92047732727)*x_ref[1]+(-0.251489480657)*x_ref[2]**o+(-0.266483991526)*x_ref[2]
-        ref[3,0]=(-0.733633520827)*x_ref[0]**o+(0.494805537624)*x_ref[0]+(-0.117702558274)*x_ref[1]**o+(-0.000461693303442)*x_ref[1]+(-0.102033981202)*x_ref[2]**o+(-0.772865985272)*x_ref[2]
-        ref[3,1]=(-0.636901276465)*x_ref[0]**o+(-0.436330072041)*x_ref[0]+(0.403048850222)*x_ref[1]**o+(-0.94737100009)*x_ref[1]+(0.781059874101)*x_ref[2]**o+(-0.952781516037)*x_ref[2]
-        ref[3,2]=(-0.489372336164)*x_ref[0]**o+(0.221211043152)*x_ref[0]+(0.793975373906)*x_ref[1]**o+(0.424349965288)*x_ref[1]+(0.453332885662)*x_ref[2]**o+(-0.513541753005)*x_ref[2]
-        ref[3,3]=(-0.700899677836)*x_ref[0]**o+(-0.984271896306)*x_ref[0]+(-0.663909486898)*x_ref[1]**o+(0.461302174316)*x_ref[1]+(-0.906457707724)*x_ref[2]**o+(-0.0440003164038)*x_ref[2]
-        ref[3,4]=(0.838326295366)*x_ref[0]**o+(-0.483407593962)*x_ref[0]+(-0.122458752397)*x_ref[1]**o+(0.607337951095)*x_ref[1]+(0.750481384434)*x_ref[2]**o+(-0.677155633204)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.111473275114)*x[0]**o+(-0.552264448532)*x[0]+(0.67142534913)*x[1]**o+(-0.642305751076)*x[1]
-        arg[0,0,1]=(-0.431075800974)*x[0]**o+(0.911382078454)*x[0]+(0.546541644612)*x[1]**o+(-0.67679652536)*x[1]
-        arg[0,1,0]=(0.103056292292)*x[0]**o+(-0.640858804416)*x[0]+(0.159596964992)*x[1]**o+(-0.237782007316)*x[1]
-        arg[0,1,1]=(0.975898170389)*x[0]**o+(0.255916326383)*x[0]+(-0.692770462322)*x[1]**o+(0.786355114846)*x[1]
-        arg[1,0,0]=(-0.669378370759)*x[0]**o+(-0.0153788709146)*x[0]+(0.924383188557)*x[1]**o+(0.885037556829)*x[1]
-        arg[1,0,1]=(-0.509891819881)*x[0]**o+(-0.377779514697)*x[0]+(-0.343176473036)*x[1]**o+(-0.39978416725)*x[1]
-        arg[1,1,0]=(0.457959467665)*x[0]**o+(0.786511967341)*x[0]+(0.256561665146)*x[1]**o+(-0.261300099643)*x[1]
-        arg[1,1,1]=(0.219754515189)*x[0]**o+(-0.131747762867)*x[0]+(0.736017818893)*x[1]**o+(-0.450963700533)*x[1]
-        arg[2,0,0]=(-0.182946832789)*x[0]**o+(-0.103064731935)*x[0]+(-0.223584334222)*x[1]**o+(-0.578088201628)*x[1]
-        arg[2,0,1]=(-0.830744157425)*x[0]**o+(0.590627167207)*x[0]+(-0.538048378049)*x[1]**o+(-0.0529793352741)*x[1]
-        arg[2,1,0]=(-0.307908670388)*x[0]**o+(-0.929987734045)*x[0]+(-0.167190563092)*x[1]**o+(0.126466628227)*x[1]
-        arg[2,1,1]=(-0.812045378916)*x[0]**o+(0.676973938072)*x[0]+(0.528243909204)*x[1]**o+(-0.594241387691)*x[1]
-        arg[3,0,0]=(-0.0198606164114)*x[0]**o+(-0.00574708685554)*x[0]+(0.908946312745)*x[1]**o+(0.775054099788)*x[1]
-        arg[3,0,1]=(-0.810078120518)*x[0]**o+(-0.960585888485)*x[0]+(-0.0747272427198)*x[1]**o+(0.164107641817)*x[1]
-        arg[3,1,0]=(-0.535791917139)*x[0]**o+(0.0424226440074)*x[0]+(0.701479263902)*x[1]**o+(0.787745423088)*x[1]
-        arg[3,1,1]=(-0.896532152793)*x[0]**o+(-0.0224566920251)*x[0]+(-0.554655626689)*x[1]**o+(0.41012867952)*x[1]
-        arg[4,0,0]=(0.972433817496)*x[0]**o+(-0.440662536033)*x[0]+(-0.910456530943)*x[1]**o+(-0.333429535028)*x[1]
-        arg[4,0,1]=(-0.415824313942)*x[0]**o+(0.00255557712922)*x[0]+(0.304897639195)*x[1]**o+(-0.866600848052)*x[1]
-        arg[4,1,0]=(-0.866277739076)*x[0]**o+(0.282976169776)*x[0]+(0.477528278501)*x[1]**o+(-0.233506497695)*x[1]
-        arg[4,1,1]=(-0.12729626381)*x[0]**o+(-0.723204796785)*x[0]+(0.0856495713442)*x[1]**o+(-0.214819437731)*x[1]
-        arg[5,0,0]=(0.208133503644)*x[0]**o+(-0.955529202895)*x[0]+(0.0291569127831)*x[1]**o+(0.489913918305)*x[1]
-        arg[5,0,1]=(0.96923667477)*x[0]**o+(0.543776525315)*x[0]+(0.38666450029)*x[1]**o+(-0.193493550272)*x[1]
-        arg[5,1,0]=(-0.0912940016888)*x[0]**o+(-0.477561072681)*x[0]+(0.474816021613)*x[1]**o+(-0.252664229253)*x[1]
-        arg[5,1,1]=(0.748337265159)*x[0]**o+(-0.706194454618)*x[0]+(-0.504466281507)*x[1]**o+(0.582500817679)*x[1]
-        ref[0,0,0]=(0.111473275114)*x_ref[0]**o+(-0.552264448532)*x_ref[0]+(0.67142534913)*x_ref[1]**o+(-0.642305751076)*x_ref[1]
-        ref[0,0,1]=(-0.431075800974)*x_ref[0]**o+(0.911382078454)*x_ref[0]+(0.546541644612)*x_ref[1]**o+(-0.67679652536)*x_ref[1]
-        ref[0,1,0]=(0.103056292292)*x_ref[0]**o+(-0.640858804416)*x_ref[0]+(0.159596964992)*x_ref[1]**o+(-0.237782007316)*x_ref[1]
-        ref[0,1,1]=(0.975898170389)*x_ref[0]**o+(0.255916326383)*x_ref[0]+(-0.692770462322)*x_ref[1]**o+(0.786355114846)*x_ref[1]
-        ref[1,0,0]=(-0.669378370759)*x_ref[0]**o+(-0.0153788709146)*x_ref[0]+(0.924383188557)*x_ref[1]**o+(0.885037556829)*x_ref[1]
-        ref[1,0,1]=(-0.509891819881)*x_ref[0]**o+(-0.377779514697)*x_ref[0]+(-0.343176473036)*x_ref[1]**o+(-0.39978416725)*x_ref[1]
-        ref[1,1,0]=(0.457959467665)*x_ref[0]**o+(0.786511967341)*x_ref[0]+(0.256561665146)*x_ref[1]**o+(-0.261300099643)*x_ref[1]
-        ref[1,1,1]=(0.219754515189)*x_ref[0]**o+(-0.131747762867)*x_ref[0]+(0.736017818893)*x_ref[1]**o+(-0.450963700533)*x_ref[1]
-        ref[2,0,0]=(-0.182946832789)*x_ref[0]**o+(-0.103064731935)*x_ref[0]+(-0.223584334222)*x_ref[1]**o+(-0.578088201628)*x_ref[1]
-        ref[2,0,1]=(-0.830744157425)*x_ref[0]**o+(0.590627167207)*x_ref[0]+(-0.538048378049)*x_ref[1]**o+(-0.0529793352741)*x_ref[1]
-        ref[2,1,0]=(-0.307908670388)*x_ref[0]**o+(-0.929987734045)*x_ref[0]+(-0.167190563092)*x_ref[1]**o+(0.126466628227)*x_ref[1]
-        ref[2,1,1]=(-0.812045378916)*x_ref[0]**o+(0.676973938072)*x_ref[0]+(0.528243909204)*x_ref[1]**o+(-0.594241387691)*x_ref[1]
-        ref[3,0,0]=(-0.0198606164114)*x_ref[0]**o+(-0.00574708685554)*x_ref[0]+(0.908946312745)*x_ref[1]**o+(0.775054099788)*x_ref[1]
-        ref[3,0,1]=(-0.810078120518)*x_ref[0]**o+(-0.960585888485)*x_ref[0]+(-0.0747272427198)*x_ref[1]**o+(0.164107641817)*x_ref[1]
-        ref[3,1,0]=(-0.535791917139)*x_ref[0]**o+(0.0424226440074)*x_ref[0]+(0.701479263902)*x_ref[1]**o+(0.787745423088)*x_ref[1]
-        ref[3,1,1]=(-0.896532152793)*x_ref[0]**o+(-0.0224566920251)*x_ref[0]+(-0.554655626689)*x_ref[1]**o+(0.41012867952)*x_ref[1]
-        ref[4,0,0]=(0.972433817496)*x_ref[0]**o+(-0.440662536033)*x_ref[0]+(-0.910456530943)*x_ref[1]**o+(-0.333429535028)*x_ref[1]
-        ref[4,0,1]=(-0.415824313942)*x_ref[0]**o+(0.00255557712922)*x_ref[0]+(0.304897639195)*x_ref[1]**o+(-0.866600848052)*x_ref[1]
-        ref[4,1,0]=(-0.866277739076)*x_ref[0]**o+(0.282976169776)*x_ref[0]+(0.477528278501)*x_ref[1]**o+(-0.233506497695)*x_ref[1]
-        ref[4,1,1]=(-0.12729626381)*x_ref[0]**o+(-0.723204796785)*x_ref[0]+(0.0856495713442)*x_ref[1]**o+(-0.214819437731)*x_ref[1]
-        ref[5,0,0]=(0.208133503644)*x_ref[0]**o+(-0.955529202895)*x_ref[0]+(0.0291569127831)*x_ref[1]**o+(0.489913918305)*x_ref[1]
-        ref[5,0,1]=(0.96923667477)*x_ref[0]**o+(0.543776525315)*x_ref[0]+(0.38666450029)*x_ref[1]**o+(-0.193493550272)*x_ref[1]
-        ref[5,1,0]=(-0.0912940016888)*x_ref[0]**o+(-0.477561072681)*x_ref[0]+(0.474816021613)*x_ref[1]**o+(-0.252664229253)*x_ref[1]
-        ref[5,1,1]=(0.748337265159)*x_ref[0]**o+(-0.706194454618)*x_ref[0]+(-0.504466281507)*x_ref[1]**o+(0.582500817679)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.179972720095)*x[0]**o+(-0.546715268523)*x[0]+(0.835867431319)*x[1]**o+(0.626798499259)*x[1]+(0.397356013278)*x[2]**o+(0.0771586784158)*x[2]
-        arg[0,0,1]=(0.625676031039)*x[0]**o+(0.65843849475)*x[0]+(0.456469199307)*x[1]**o+(-0.970709759479)*x[1]+(-0.699606143992)*x[2]**o+(0.76429400724)*x[2]
-        arg[0,1,0]=(0.613916424165)*x[0]**o+(0.556778588303)*x[0]+(-0.509658743529)*x[1]**o+(-0.978718968218)*x[1]+(-0.603928369428)*x[2]**o+(-0.550813953692)*x[2]
-        arg[0,1,1]=(-0.935214755436)*x[0]**o+(0.44745901813)*x[0]+(-0.582828846453)*x[1]**o+(-0.181547183233)*x[1]+(-0.183912053485)*x[2]**o+(0.446152494296)*x[2]
-        arg[1,0,0]=(-0.486345219779)*x[0]**o+(0.753529436833)*x[0]+(0.138157856552)*x[1]**o+(-0.874849020539)*x[1]+(0.374396543792)*x[2]**o+(0.26548456046)*x[2]
-        arg[1,0,1]=(0.492908753036)*x[0]**o+(-0.418118685105)*x[0]+(0.880817569823)*x[1]**o+(-0.827691145524)*x[1]+(0.238633156133)*x[2]**o+(-0.463687731341)*x[2]
-        arg[1,1,0]=(-0.397373578442)*x[0]**o+(-0.316321105607)*x[0]+(0.647511225459)*x[1]**o+(-0.82553752195)*x[1]+(-0.715549303171)*x[2]**o+(0.804623957459)*x[2]
-        arg[1,1,1]=(0.414743130234)*x[0]**o+(0.0201794413683)*x[0]+(-0.636337599584)*x[1]**o+(-0.230053616026)*x[1]+(-0.4302153311)*x[2]**o+(-0.387468029626)*x[2]
-        arg[2,0,0]=(0.715100517336)*x[0]**o+(-0.4286120178)*x[0]+(0.0987858542117)*x[1]**o+(0.815093470301)*x[1]+(0.293455353257)*x[2]**o+(0.200576090379)*x[2]
-        arg[2,0,1]=(-0.158330015822)*x[0]**o+(0.363339023457)*x[0]+(-0.796055594971)*x[1]**o+(-0.213299205306)*x[1]+(-0.136620988812)*x[2]**o+(0.10733886947)*x[2]
-        arg[2,1,0]=(-0.258729405118)*x[0]**o+(0.0669553480038)*x[0]+(0.997663166613)*x[1]**o+(0.00398861063931)*x[1]+(-0.989459856803)*x[2]**o+(0.932687384325)*x[2]
-        arg[2,1,1]=(-0.974431322319)*x[0]**o+(-0.486447431804)*x[0]+(0.871784873347)*x[1]**o+(-0.978904038765)*x[1]+(0.647341201506)*x[2]**o+(-0.269683556528)*x[2]
-        arg[3,0,0]=(-0.369507398073)*x[0]**o+(-0.772085607074)*x[0]+(0.417550881937)*x[1]**o+(0.271743719652)*x[1]+(0.881807154737)*x[2]**o+(0.54725428039)*x[2]
-        arg[3,0,1]=(0.440089335941)*x[0]**o+(0.0844171421294)*x[0]+(0.926389704362)*x[1]**o+(-0.0709182998297)*x[1]+(0.903978660317)*x[2]**o+(-0.160556206716)*x[2]
-        arg[3,1,0]=(-0.49936391282)*x[0]**o+(-0.632753931881)*x[0]+(-0.604686084554)*x[1]**o+(-0.954205199531)*x[1]+(-0.535102184845)*x[2]**o+(0.621683814123)*x[2]
-        arg[3,1,1]=(-0.117790973132)*x[0]**o+(-0.649091727896)*x[0]+(0.925682916785)*x[1]**o+(0.852053515469)*x[1]+(-0.479218429897)*x[2]**o+(0.426823478575)*x[2]
-        arg[4,0,0]=(0.454174564319)*x[0]**o+(-0.855975647406)*x[0]+(0.775972969288)*x[1]**o+(0.267900999893)*x[1]+(0.221387501995)*x[2]**o+(-0.26413791201)*x[2]
-        arg[4,0,1]=(0.875191302431)*x[0]**o+(-0.362782502152)*x[0]+(0.24600070339)*x[1]**o+(-0.566709533298)*x[1]+(-0.82187455531)*x[2]**o+(-0.943929640301)*x[2]
-        arg[4,1,0]=(-0.409313259973)*x[0]**o+(-0.784833509001)*x[0]+(-0.939690505056)*x[1]**o+(-0.0736280226974)*x[1]+(0.939072745486)*x[2]**o+(0.611697159959)*x[2]
-        arg[4,1,1]=(0.893374246808)*x[0]**o+(0.36113513561)*x[0]+(0.227899271271)*x[1]**o+(-0.847221657012)*x[1]+(-0.0106368947417)*x[2]**o+(0.0358896817595)*x[2]
-        arg[5,0,0]=(0.0329230524924)*x[0]**o+(0.0565192084014)*x[0]+(-0.68398448658)*x[1]**o+(0.909035618076)*x[1]+(-0.900060440872)*x[2]**o+(-0.481014787833)*x[2]
-        arg[5,0,1]=(0.404966692391)*x[0]**o+(0.647468764373)*x[0]+(-0.723847499346)*x[1]**o+(-0.0740896957606)*x[1]+(-0.00628515079923)*x[2]**o+(0.906667863539)*x[2]
-        arg[5,1,0]=(0.983181781531)*x[0]**o+(-0.297325990236)*x[0]+(0.00489064543352)*x[1]**o+(0.667560767038)*x[1]+(-0.665768141301)*x[2]**o+(0.772761393608)*x[2]
-        arg[5,1,1]=(-0.496581691354)*x[0]**o+(0.0121337979505)*x[0]+(0.492281382726)*x[1]**o+(0.545232714025)*x[1]+(0.418321481532)*x[2]**o+(0.489635969764)*x[2]
-        ref[0,0,0]=(-0.179972720095)*x_ref[0]**o+(-0.546715268523)*x_ref[0]+(0.835867431319)*x_ref[1]**o+(0.626798499259)*x_ref[1]+(0.397356013278)*x_ref[2]**o+(0.0771586784158)*x_ref[2]
-        ref[0,0,1]=(0.625676031039)*x_ref[0]**o+(0.65843849475)*x_ref[0]+(0.456469199307)*x_ref[1]**o+(-0.970709759479)*x_ref[1]+(-0.699606143992)*x_ref[2]**o+(0.76429400724)*x_ref[2]
-        ref[0,1,0]=(0.613916424165)*x_ref[0]**o+(0.556778588303)*x_ref[0]+(-0.509658743529)*x_ref[1]**o+(-0.978718968218)*x_ref[1]+(-0.603928369428)*x_ref[2]**o+(-0.550813953692)*x_ref[2]
-        ref[0,1,1]=(-0.935214755436)*x_ref[0]**o+(0.44745901813)*x_ref[0]+(-0.582828846453)*x_ref[1]**o+(-0.181547183233)*x_ref[1]+(-0.183912053485)*x_ref[2]**o+(0.446152494296)*x_ref[2]
-        ref[1,0,0]=(-0.486345219779)*x_ref[0]**o+(0.753529436833)*x_ref[0]+(0.138157856552)*x_ref[1]**o+(-0.874849020539)*x_ref[1]+(0.374396543792)*x_ref[2]**o+(0.26548456046)*x_ref[2]
-        ref[1,0,1]=(0.492908753036)*x_ref[0]**o+(-0.418118685105)*x_ref[0]+(0.880817569823)*x_ref[1]**o+(-0.827691145524)*x_ref[1]+(0.238633156133)*x_ref[2]**o+(-0.463687731341)*x_ref[2]
-        ref[1,1,0]=(-0.397373578442)*x_ref[0]**o+(-0.316321105607)*x_ref[0]+(0.647511225459)*x_ref[1]**o+(-0.82553752195)*x_ref[1]+(-0.715549303171)*x_ref[2]**o+(0.804623957459)*x_ref[2]
-        ref[1,1,1]=(0.414743130234)*x_ref[0]**o+(0.0201794413683)*x_ref[0]+(-0.636337599584)*x_ref[1]**o+(-0.230053616026)*x_ref[1]+(-0.4302153311)*x_ref[2]**o+(-0.387468029626)*x_ref[2]
-        ref[2,0,0]=(0.715100517336)*x_ref[0]**o+(-0.4286120178)*x_ref[0]+(0.0987858542117)*x_ref[1]**o+(0.815093470301)*x_ref[1]+(0.293455353257)*x_ref[2]**o+(0.200576090379)*x_ref[2]
-        ref[2,0,1]=(-0.158330015822)*x_ref[0]**o+(0.363339023457)*x_ref[0]+(-0.796055594971)*x_ref[1]**o+(-0.213299205306)*x_ref[1]+(-0.136620988812)*x_ref[2]**o+(0.10733886947)*x_ref[2]
-        ref[2,1,0]=(-0.258729405118)*x_ref[0]**o+(0.0669553480038)*x_ref[0]+(0.997663166613)*x_ref[1]**o+(0.00398861063931)*x_ref[1]+(-0.989459856803)*x_ref[2]**o+(0.932687384325)*x_ref[2]
-        ref[2,1,1]=(-0.974431322319)*x_ref[0]**o+(-0.486447431804)*x_ref[0]+(0.871784873347)*x_ref[1]**o+(-0.978904038765)*x_ref[1]+(0.647341201506)*x_ref[2]**o+(-0.269683556528)*x_ref[2]
-        ref[3,0,0]=(-0.369507398073)*x_ref[0]**o+(-0.772085607074)*x_ref[0]+(0.417550881937)*x_ref[1]**o+(0.271743719652)*x_ref[1]+(0.881807154737)*x_ref[2]**o+(0.54725428039)*x_ref[2]
-        ref[3,0,1]=(0.440089335941)*x_ref[0]**o+(0.0844171421294)*x_ref[0]+(0.926389704362)*x_ref[1]**o+(-0.0709182998297)*x_ref[1]+(0.903978660317)*x_ref[2]**o+(-0.160556206716)*x_ref[2]
-        ref[3,1,0]=(-0.49936391282)*x_ref[0]**o+(-0.632753931881)*x_ref[0]+(-0.604686084554)*x_ref[1]**o+(-0.954205199531)*x_ref[1]+(-0.535102184845)*x_ref[2]**o+(0.621683814123)*x_ref[2]
-        ref[3,1,1]=(-0.117790973132)*x_ref[0]**o+(-0.649091727896)*x_ref[0]+(0.925682916785)*x_ref[1]**o+(0.852053515469)*x_ref[1]+(-0.479218429897)*x_ref[2]**o+(0.426823478575)*x_ref[2]
-        ref[4,0,0]=(0.454174564319)*x_ref[0]**o+(-0.855975647406)*x_ref[0]+(0.775972969288)*x_ref[1]**o+(0.267900999893)*x_ref[1]+(0.221387501995)*x_ref[2]**o+(-0.26413791201)*x_ref[2]
-        ref[4,0,1]=(0.875191302431)*x_ref[0]**o+(-0.362782502152)*x_ref[0]+(0.24600070339)*x_ref[1]**o+(-0.566709533298)*x_ref[1]+(-0.82187455531)*x_ref[2]**o+(-0.943929640301)*x_ref[2]
-        ref[4,1,0]=(-0.409313259973)*x_ref[0]**o+(-0.784833509001)*x_ref[0]+(-0.939690505056)*x_ref[1]**o+(-0.0736280226974)*x_ref[1]+(0.939072745486)*x_ref[2]**o+(0.611697159959)*x_ref[2]
-        ref[4,1,1]=(0.893374246808)*x_ref[0]**o+(0.36113513561)*x_ref[0]+(0.227899271271)*x_ref[1]**o+(-0.847221657012)*x_ref[1]+(-0.0106368947417)*x_ref[2]**o+(0.0358896817595)*x_ref[2]
-        ref[5,0,0]=(0.0329230524924)*x_ref[0]**o+(0.0565192084014)*x_ref[0]+(-0.68398448658)*x_ref[1]**o+(0.909035618076)*x_ref[1]+(-0.900060440872)*x_ref[2]**o+(-0.481014787833)*x_ref[2]
-        ref[5,0,1]=(0.404966692391)*x_ref[0]**o+(0.647468764373)*x_ref[0]+(-0.723847499346)*x_ref[1]**o+(-0.0740896957606)*x_ref[1]+(-0.00628515079923)*x_ref[2]**o+(0.906667863539)*x_ref[2]
-        ref[5,1,0]=(0.983181781531)*x_ref[0]**o+(-0.297325990236)*x_ref[0]+(0.00489064543352)*x_ref[1]**o+(0.667560767038)*x_ref[1]+(-0.665768141301)*x_ref[2]**o+(0.772761393608)*x_ref[2]
-        ref[5,1,1]=(-0.496581691354)*x_ref[0]**o+(0.0121337979505)*x_ref[0]+(0.492281382726)*x_ref[1]**o+(0.545232714025)*x_ref[1]+(0.418321481532)*x_ref[2]**o+(0.489635969764)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.282394950702)*x[0]**o+(0.836580157584)*x[0]+(0.337652262648)*x[1]**o+(-0.442694263325)*x[1]
-        arg[0,0,0,1]=(0.85150774028)*x[0]**o+(0.998297296593)*x[0]+(-0.710029954342)*x[1]**o+(0.0816168287837)*x[1]
-        arg[0,0,1,0]=(-0.636435102838)*x[0]**o+(-0.613479863553)*x[0]+(-0.861506513168)*x[1]**o+(-0.242998961478)*x[1]
-        arg[0,0,1,1]=(-0.00671863978521)*x[0]**o+(0.909404084068)*x[0]+(-0.734956067026)*x[1]**o+(0.256530538264)*x[1]
-        arg[0,0,2,0]=(-0.646631608999)*x[0]**o+(-0.521130455843)*x[0]+(-0.44328404557)*x[1]**o+(-0.156860325817)*x[1]
-        arg[0,0,2,1]=(-0.817550008949)*x[0]**o+(0.702414497795)*x[0]+(0.946449680763)*x[1]**o+(-0.61576361925)*x[1]
-        arg[0,1,0,0]=(-0.527206691595)*x[0]**o+(-0.43469216984)*x[0]+(-0.108455901154)*x[1]**o+(0.435646962156)*x[1]
-        arg[0,1,0,1]=(-0.148522219535)*x[0]**o+(0.146912249755)*x[0]+(-0.414934945665)*x[1]**o+(-0.422754988714)*x[1]
-        arg[0,1,1,0]=(0.177760972947)*x[0]**o+(-0.938522530862)*x[0]+(0.566229652264)*x[1]**o+(0.255269743628)*x[1]
-        arg[0,1,1,1]=(-0.317807933792)*x[0]**o+(0.432181451246)*x[0]+(-0.358821513362)*x[1]**o+(-0.470517232585)*x[1]
-        arg[0,1,2,0]=(0.486536430227)*x[0]**o+(-0.533653809349)*x[0]+(-0.126612514045)*x[1]**o+(0.103088115487)*x[1]
-        arg[0,1,2,1]=(-0.995976559589)*x[0]**o+(0.965537167421)*x[0]+(-0.351307699531)*x[1]**o+(-0.684367434666)*x[1]
-        arg[0,2,0,0]=(0.976008613768)*x[0]**o+(-0.890573007002)*x[0]+(-0.440709423944)*x[1]**o+(0.315724459367)*x[1]
-        arg[0,2,0,1]=(-0.595275811962)*x[0]**o+(-0.599634144509)*x[0]+(0.646466002346)*x[1]**o+(-0.94529568651)*x[1]
-        arg[0,2,1,0]=(0.977691521821)*x[0]**o+(-0.0730997643682)*x[0]+(-0.338897498737)*x[1]**o+(0.246308678824)*x[1]
-        arg[0,2,1,1]=(-0.111317410732)*x[0]**o+(-0.574381793398)*x[0]+(-0.0314431899843)*x[1]**o+(0.393105047096)*x[1]
-        arg[0,2,2,0]=(0.886320020757)*x[0]**o+(-0.785042003544)*x[0]+(0.82609269979)*x[1]**o+(-0.677169484337)*x[1]
-        arg[0,2,2,1]=(0.811027138079)*x[0]**o+(-0.375108470948)*x[0]+(0.781472464253)*x[1]**o+(0.217640794143)*x[1]
-        arg[0,3,0,0]=(0.264884117091)*x[0]**o+(0.116591319557)*x[0]+(0.282667679763)*x[1]**o+(0.111123454337)*x[1]
-        arg[0,3,0,1]=(0.0451626985922)*x[0]**o+(-0.93771279728)*x[0]+(0.129171764072)*x[1]**o+(0.598367954162)*x[1]
-        arg[0,3,1,0]=(0.905243511086)*x[0]**o+(0.0837062573586)*x[0]+(0.0657223248433)*x[1]**o+(-0.746644690072)*x[1]
-        arg[0,3,1,1]=(-0.0547856755485)*x[0]**o+(-0.22157806755)*x[0]+(0.124623625108)*x[1]**o+(0.0436590157081)*x[1]
-        arg[0,3,2,0]=(-0.558323744577)*x[0]**o+(-0.646043519007)*x[0]+(0.991885458004)*x[1]**o+(-0.634140808163)*x[1]
-        arg[0,3,2,1]=(-0.27247983028)*x[0]**o+(0.803906404485)*x[0]+(-0.816826609924)*x[1]**o+(-0.969532783336)*x[1]
-        arg[0,4,0,0]=(0.638733842891)*x[0]**o+(-0.972793270208)*x[0]+(0.714611008099)*x[1]**o+(0.586988595847)*x[1]
-        arg[0,4,0,1]=(0.63584760734)*x[0]**o+(-0.653740236747)*x[0]+(-0.596304731446)*x[1]**o+(0.42519786429)*x[1]
-        arg[0,4,1,0]=(0.0665562973529)*x[0]**o+(0.362152092093)*x[0]+(0.732530335739)*x[1]**o+(0.618536326941)*x[1]
-        arg[0,4,1,1]=(0.486060667608)*x[0]**o+(0.59489013279)*x[0]+(-0.547237017498)*x[1]**o+(0.0371894705857)*x[1]
-        arg[0,4,2,0]=(0.395505844397)*x[0]**o+(-0.869090434535)*x[0]+(-0.606640827437)*x[1]**o+(0.269995459083)*x[1]
-        arg[0,4,2,1]=(0.304671547176)*x[0]**o+(-0.515772523849)*x[0]+(0.546114300876)*x[1]**o+(0.530247404341)*x[1]
-        arg[1,0,0,0]=(0.408332677433)*x[0]**o+(-0.0778807359918)*x[0]+(-0.803337489297)*x[1]**o+(-0.123835718422)*x[1]
-        arg[1,0,0,1]=(-0.00441620254944)*x[0]**o+(0.0321259598831)*x[0]+(-0.998381508472)*x[1]**o+(0.800767747511)*x[1]
-        arg[1,0,1,0]=(-0.923683057418)*x[0]**o+(0.579405114902)*x[0]+(-0.939639823585)*x[1]**o+(-0.138423358134)*x[1]
-        arg[1,0,1,1]=(-0.558420234848)*x[0]**o+(0.133316569813)*x[0]+(-0.294134717329)*x[1]**o+(-0.750897749044)*x[1]
-        arg[1,0,2,0]=(0.478951298545)*x[0]**o+(-0.807173978799)*x[0]+(0.852438146763)*x[1]**o+(-0.103814229563)*x[1]
-        arg[1,0,2,1]=(-0.875250726603)*x[0]**o+(-0.934803428491)*x[0]+(0.143352873672)*x[1]**o+(0.600934881206)*x[1]
-        arg[1,1,0,0]=(-0.0539476321018)*x[0]**o+(0.194177663417)*x[0]+(-0.862877991009)*x[1]**o+(-0.438337993664)*x[1]
-        arg[1,1,0,1]=(-0.623379355474)*x[0]**o+(-0.0746994739748)*x[0]+(0.365005438956)*x[1]**o+(-0.431737688205)*x[1]
-        arg[1,1,1,0]=(0.0936054461735)*x[0]**o+(-0.974594269446)*x[0]+(-0.121917598428)*x[1]**o+(-0.84429083727)*x[1]
-        arg[1,1,1,1]=(0.967763348672)*x[0]**o+(0.331698826475)*x[0]+(0.66448515877)*x[1]**o+(0.00214985930661)*x[1]
-        arg[1,1,2,0]=(-0.312146580762)*x[0]**o+(0.998152287706)*x[0]+(-0.474242942777)*x[1]**o+(0.637827347846)*x[1]
-        arg[1,1,2,1]=(-0.556765443436)*x[0]**o+(0.227327929774)*x[0]+(0.739457845569)*x[1]**o+(-0.615070017663)*x[1]
-        arg[1,2,0,0]=(-0.23030660552)*x[0]**o+(0.750479465953)*x[0]+(0.278215408392)*x[1]**o+(-0.640618698224)*x[1]
-        arg[1,2,0,1]=(-0.0713217101129)*x[0]**o+(0.500737477887)*x[0]+(-0.972834770005)*x[1]**o+(-0.420386056033)*x[1]
-        arg[1,2,1,0]=(-0.497322989847)*x[0]**o+(-0.528685124841)*x[0]+(-0.934386348496)*x[1]**o+(0.191930553839)*x[1]
-        arg[1,2,1,1]=(0.124362419781)*x[0]**o+(-0.0457849787456)*x[0]+(-0.360596154712)*x[1]**o+(0.799736253715)*x[1]
-        arg[1,2,2,0]=(-0.346294878893)*x[0]**o+(0.427772309361)*x[0]+(-0.0642666791012)*x[1]**o+(-0.214442238311)*x[1]
-        arg[1,2,2,1]=(0.24434837411)*x[0]**o+(-0.913373159786)*x[0]+(0.158750862391)*x[1]**o+(-0.544328807576)*x[1]
-        arg[1,3,0,0]=(0.870847002687)*x[0]**o+(-0.466884462301)*x[0]+(-0.343358829445)*x[1]**o+(-0.180956419766)*x[1]
-        arg[1,3,0,1]=(-0.813518850863)*x[0]**o+(0.960810467501)*x[0]+(0.35091416904)*x[1]**o+(0.84534544948)*x[1]
-        arg[1,3,1,0]=(-0.284687751218)*x[0]**o+(-0.274583519355)*x[0]+(0.338892764102)*x[1]**o+(-0.145142443753)*x[1]
-        arg[1,3,1,1]=(0.921064262137)*x[0]**o+(0.152552421678)*x[0]+(0.827247693375)*x[1]**o+(-0.569529848619)*x[1]
-        arg[1,3,2,0]=(0.133567630356)*x[0]**o+(-0.0429397358364)*x[0]+(-0.175383170663)*x[1]**o+(0.584407631334)*x[1]
-        arg[1,3,2,1]=(0.203880167371)*x[0]**o+(-0.422978073825)*x[0]+(-0.210109267588)*x[1]**o+(-0.902327373219)*x[1]
-        arg[1,4,0,0]=(-0.566386864876)*x[0]**o+(-0.139795085483)*x[0]+(-0.00852913464238)*x[1]**o+(0.569151381884)*x[1]
-        arg[1,4,0,1]=(-0.937256625212)*x[0]**o+(0.563438253128)*x[0]+(-0.586182238715)*x[1]**o+(-0.566169678723)*x[1]
-        arg[1,4,1,0]=(-0.73296890712)*x[0]**o+(0.359249594406)*x[0]+(0.66050790616)*x[1]**o+(-0.367919797426)*x[1]
-        arg[1,4,1,1]=(-0.81165734248)*x[0]**o+(0.460592817838)*x[0]+(0.953573909492)*x[1]**o+(0.329659021274)*x[1]
-        arg[1,4,2,0]=(0.345994483595)*x[0]**o+(-0.18547324343)*x[0]+(0.669452926238)*x[1]**o+(0.42513249272)*x[1]
-        arg[1,4,2,1]=(0.250677642616)*x[0]**o+(0.466118496803)*x[0]+(-0.776608543595)*x[1]**o+(0.449144243682)*x[1]
-        arg[2,0,0,0]=(0.244172909021)*x[0]**o+(0.0311068322898)*x[0]+(-0.909348039508)*x[1]**o+(0.376500719414)*x[1]
-        arg[2,0,0,1]=(-0.033516640667)*x[0]**o+(0.698424718328)*x[0]+(-0.282814785542)*x[1]**o+(0.61118022947)*x[1]
-        arg[2,0,1,0]=(-0.946672649538)*x[0]**o+(0.814325244591)*x[0]+(-0.353215562825)*x[1]**o+(-0.138150257429)*x[1]
-        arg[2,0,1,1]=(-0.886509051692)*x[0]**o+(-0.0468334385819)*x[0]+(0.71984719189)*x[1]**o+(-0.324744971493)*x[1]
-        arg[2,0,2,0]=(-0.780921647053)*x[0]**o+(-0.401418496932)*x[0]+(0.647847274332)*x[1]**o+(-0.831834322278)*x[1]
-        arg[2,0,2,1]=(0.835155004862)*x[0]**o+(0.684459986902)*x[0]+(-0.301244240677)*x[1]**o+(-0.161292780187)*x[1]
-        arg[2,1,0,0]=(-0.652199398394)*x[0]**o+(0.62480722178)*x[0]+(-0.474535712914)*x[1]**o+(0.926061797766)*x[1]
-        arg[2,1,0,1]=(-0.813365478568)*x[0]**o+(-0.38795792417)*x[0]+(0.378161353697)*x[1]**o+(0.70581806211)*x[1]
-        arg[2,1,1,0]=(0.729265594934)*x[0]**o+(-0.469397842359)*x[0]+(0.642472199926)*x[1]**o+(-0.779527283011)*x[1]
-        arg[2,1,1,1]=(0.0517342917574)*x[0]**o+(-0.414111007917)*x[0]+(-0.89437375241)*x[1]**o+(-0.830119585842)*x[1]
-        arg[2,1,2,0]=(0.769898486257)*x[0]**o+(0.791725624832)*x[0]+(0.297519329396)*x[1]**o+(-0.959462006611)*x[1]
-        arg[2,1,2,1]=(0.817802144251)*x[0]**o+(0.69851258911)*x[0]+(-0.174401735228)*x[1]**o+(0.13449696498)*x[1]
-        arg[2,2,0,0]=(0.547972662256)*x[0]**o+(-0.66491929979)*x[0]+(0.330783041672)*x[1]**o+(0.816196730606)*x[1]
-        arg[2,2,0,1]=(0.245971097763)*x[0]**o+(0.213087481481)*x[0]+(-0.840766291392)*x[1]**o+(0.388414557376)*x[1]
-        arg[2,2,1,0]=(0.523151676444)*x[0]**o+(0.854817486027)*x[0]+(-0.53570188528)*x[1]**o+(-0.68149362242)*x[1]
-        arg[2,2,1,1]=(-0.984200247787)*x[0]**o+(0.83324365092)*x[0]+(-0.896184408816)*x[1]**o+(0.102276243487)*x[1]
-        arg[2,2,2,0]=(-0.216357164308)*x[0]**o+(-0.597984882107)*x[0]+(-0.205435921511)*x[1]**o+(0.484947652759)*x[1]
-        arg[2,2,2,1]=(-0.650046253868)*x[0]**o+(-0.624878186105)*x[0]+(0.786519914406)*x[1]**o+(0.28027273095)*x[1]
-        arg[2,3,0,0]=(-0.0821718346579)*x[0]**o+(-0.687049917467)*x[0]+(0.380792333736)*x[1]**o+(0.151185837715)*x[1]
-        arg[2,3,0,1]=(0.61796113854)*x[0]**o+(0.844624413065)*x[0]+(-0.980619401098)*x[1]**o+(-0.854924862641)*x[1]
-        arg[2,3,1,0]=(0.812293906883)*x[0]**o+(-0.225593208768)*x[0]+(0.964175374163)*x[1]**o+(0.848850064926)*x[1]
-        arg[2,3,1,1]=(0.376453572937)*x[0]**o+(0.994818812059)*x[0]+(0.58872018303)*x[1]**o+(0.68332473361)*x[1]
-        arg[2,3,2,0]=(-0.00948421972234)*x[0]**o+(-0.680685462738)*x[0]+(-0.767076278167)*x[1]**o+(0.210165437284)*x[1]
-        arg[2,3,2,1]=(-0.455199698263)*x[0]**o+(-0.763430401419)*x[0]+(0.183773350212)*x[1]**o+(0.43105940923)*x[1]
-        arg[2,4,0,0]=(-0.673962025988)*x[0]**o+(-0.679073069725)*x[0]+(0.11018431715)*x[1]**o+(0.349020527482)*x[1]
-        arg[2,4,0,1]=(-0.876691282076)*x[0]**o+(0.920902226631)*x[0]+(-0.477417470246)*x[1]**o+(0.836417982216)*x[1]
-        arg[2,4,1,0]=(0.567966851024)*x[0]**o+(0.583241431716)*x[0]+(-0.271851271008)*x[1]**o+(0.678727902863)*x[1]
-        arg[2,4,1,1]=(0.707400094)*x[0]**o+(0.802820856444)*x[0]+(0.84518937616)*x[1]**o+(-0.0267193533403)*x[1]
-        arg[2,4,2,0]=(0.213268920036)*x[0]**o+(0.780721415328)*x[0]+(0.839292948154)*x[1]**o+(-0.0376334744443)*x[1]
-        arg[2,4,2,1]=(0.136255687031)*x[0]**o+(-0.582766278693)*x[0]+(0.257662521321)*x[1]**o+(0.808337521979)*x[1]
-        arg[3,0,0,0]=(-0.524068770822)*x[0]**o+(0.942236878842)*x[0]+(0.889496255793)*x[1]**o+(-0.904810742393)*x[1]
-        arg[3,0,0,1]=(0.780157465475)*x[0]**o+(-0.763811668832)*x[0]+(-0.517482070639)*x[1]**o+(0.662770780676)*x[1]
-        arg[3,0,1,0]=(-0.693227564812)*x[0]**o+(-0.763506211841)*x[0]+(-0.427709881126)*x[1]**o+(0.159109827204)*x[1]
-        arg[3,0,1,1]=(0.644975629084)*x[0]**o+(-0.928112761899)*x[0]+(-0.530772740083)*x[1]**o+(-0.723174790087)*x[1]
-        arg[3,0,2,0]=(-0.923467274097)*x[0]**o+(0.806128117288)*x[0]+(0.177779363207)*x[1]**o+(0.862243885542)*x[1]
-        arg[3,0,2,1]=(-0.0823252901358)*x[0]**o+(0.289022916284)*x[0]+(-0.518508771021)*x[1]**o+(0.174564769845)*x[1]
-        arg[3,1,0,0]=(0.608837578444)*x[0]**o+(0.898216758361)*x[0]+(-0.844730109761)*x[1]**o+(0.745974173207)*x[1]
-        arg[3,1,0,1]=(-0.11776411078)*x[0]**o+(0.186256502356)*x[0]+(0.565289400333)*x[1]**o+(-0.776173716206)*x[1]
-        arg[3,1,1,0]=(-0.170736580152)*x[0]**o+(0.829581661683)*x[0]+(0.310135833859)*x[1]**o+(-0.509629545687)*x[1]
-        arg[3,1,1,1]=(-0.225246122751)*x[0]**o+(0.586754377294)*x[0]+(-0.726064725635)*x[1]**o+(0.136952605704)*x[1]
-        arg[3,1,2,0]=(-0.287932115478)*x[0]**o+(0.858031396153)*x[0]+(-0.493441745353)*x[1]**o+(0.601827664994)*x[1]
-        arg[3,1,2,1]=(0.665503842862)*x[0]**o+(-0.515998970452)*x[0]+(-0.890055558624)*x[1]**o+(-0.0446371451457)*x[1]
-        arg[3,2,0,0]=(-0.33741557585)*x[0]**o+(-0.416183752333)*x[0]+(-0.92430073538)*x[1]**o+(-0.486265090904)*x[1]
-        arg[3,2,0,1]=(0.910860925994)*x[0]**o+(-0.896869755389)*x[0]+(0.0634658185324)*x[1]**o+(-0.383136455739)*x[1]
-        arg[3,2,1,0]=(0.386839297976)*x[0]**o+(-0.190659927071)*x[0]+(-0.304846978185)*x[1]**o+(-0.92705511899)*x[1]
-        arg[3,2,1,1]=(-0.0197812018683)*x[0]**o+(-0.479083095775)*x[0]+(0.502489976089)*x[1]**o+(-0.859440665475)*x[1]
-        arg[3,2,2,0]=(-0.507672045299)*x[0]**o+(0.498689676072)*x[0]+(-0.719735804645)*x[1]**o+(-0.522053306674)*x[1]
-        arg[3,2,2,1]=(0.46207629211)*x[0]**o+(-0.496697066039)*x[0]+(0.994069339904)*x[1]**o+(0.873222754449)*x[1]
-        arg[3,3,0,0]=(0.126410029692)*x[0]**o+(0.51067050196)*x[0]+(-0.978384824088)*x[1]**o+(-0.68606930503)*x[1]
-        arg[3,3,0,1]=(0.376888157008)*x[0]**o+(-0.14015764025)*x[0]+(0.523667700758)*x[1]**o+(0.0277726855258)*x[1]
-        arg[3,3,1,0]=(-0.105865233294)*x[0]**o+(-0.0515230741203)*x[0]+(0.203766525036)*x[1]**o+(-0.0431893014387)*x[1]
-        arg[3,3,1,1]=(-0.404351448486)*x[0]**o+(-0.639161429157)*x[0]+(-0.957341091708)*x[1]**o+(-0.103346466984)*x[1]
-        arg[3,3,2,0]=(-0.0523508780623)*x[0]**o+(-0.563589575544)*x[0]+(0.158487727325)*x[1]**o+(-0.519455492178)*x[1]
-        arg[3,3,2,1]=(-0.823286342218)*x[0]**o+(-0.493663499535)*x[0]+(-0.409825574064)*x[1]**o+(-0.0406101279806)*x[1]
-        arg[3,4,0,0]=(0.926212910387)*x[0]**o+(-0.0944507963)*x[0]+(0.640740499391)*x[1]**o+(-0.106969076047)*x[1]
-        arg[3,4,0,1]=(-0.912044993941)*x[0]**o+(-0.495323777918)*x[0]+(-0.595831845108)*x[1]**o+(-0.313723426318)*x[1]
-        arg[3,4,1,0]=(-0.0730898742548)*x[0]**o+(0.0524008484492)*x[0]+(-0.948232935497)*x[1]**o+(0.952670824572)*x[1]
-        arg[3,4,1,1]=(-0.81869438138)*x[0]**o+(-0.894654266952)*x[0]+(0.414078621872)*x[1]**o+(-0.876690817847)*x[1]
-        arg[3,4,2,0]=(0.00688155078441)*x[0]**o+(0.845964586551)*x[0]+(0.0183149371892)*x[1]**o+(-0.882931394537)*x[1]
-        arg[3,4,2,1]=(-0.734830097149)*x[0]**o+(-0.37824588859)*x[0]+(-0.815402620311)*x[1]**o+(-0.357905685517)*x[1]
-        ref[0,0,0,0]=(-0.282394950702)*x_ref[0]**o+(0.836580157584)*x_ref[0]+(0.337652262648)*x_ref[1]**o+(-0.442694263325)*x_ref[1]
-        ref[0,0,0,1]=(0.85150774028)*x_ref[0]**o+(0.998297296593)*x_ref[0]+(-0.710029954342)*x_ref[1]**o+(0.0816168287837)*x_ref[1]
-        ref[0,0,1,0]=(-0.636435102838)*x_ref[0]**o+(-0.613479863553)*x_ref[0]+(-0.861506513168)*x_ref[1]**o+(-0.242998961478)*x_ref[1]
-        ref[0,0,1,1]=(-0.00671863978521)*x_ref[0]**o+(0.909404084068)*x_ref[0]+(-0.734956067026)*x_ref[1]**o+(0.256530538264)*x_ref[1]
-        ref[0,0,2,0]=(-0.646631608999)*x_ref[0]**o+(-0.521130455843)*x_ref[0]+(-0.44328404557)*x_ref[1]**o+(-0.156860325817)*x_ref[1]
-        ref[0,0,2,1]=(-0.817550008949)*x_ref[0]**o+(0.702414497795)*x_ref[0]+(0.946449680763)*x_ref[1]**o+(-0.61576361925)*x_ref[1]
-        ref[0,1,0,0]=(-0.527206691595)*x_ref[0]**o+(-0.43469216984)*x_ref[0]+(-0.108455901154)*x_ref[1]**o+(0.435646962156)*x_ref[1]
-        ref[0,1,0,1]=(-0.148522219535)*x_ref[0]**o+(0.146912249755)*x_ref[0]+(-0.414934945665)*x_ref[1]**o+(-0.422754988714)*x_ref[1]
-        ref[0,1,1,0]=(0.177760972947)*x_ref[0]**o+(-0.938522530862)*x_ref[0]+(0.566229652264)*x_ref[1]**o+(0.255269743628)*x_ref[1]
-        ref[0,1,1,1]=(-0.317807933792)*x_ref[0]**o+(0.432181451246)*x_ref[0]+(-0.358821513362)*x_ref[1]**o+(-0.470517232585)*x_ref[1]
-        ref[0,1,2,0]=(0.486536430227)*x_ref[0]**o+(-0.533653809349)*x_ref[0]+(-0.126612514045)*x_ref[1]**o+(0.103088115487)*x_ref[1]
-        ref[0,1,2,1]=(-0.995976559589)*x_ref[0]**o+(0.965537167421)*x_ref[0]+(-0.351307699531)*x_ref[1]**o+(-0.684367434666)*x_ref[1]
-        ref[0,2,0,0]=(0.976008613768)*x_ref[0]**o+(-0.890573007002)*x_ref[0]+(-0.440709423944)*x_ref[1]**o+(0.315724459367)*x_ref[1]
-        ref[0,2,0,1]=(-0.595275811962)*x_ref[0]**o+(-0.599634144509)*x_ref[0]+(0.646466002346)*x_ref[1]**o+(-0.94529568651)*x_ref[1]
-        ref[0,2,1,0]=(0.977691521821)*x_ref[0]**o+(-0.0730997643682)*x_ref[0]+(-0.338897498737)*x_ref[1]**o+(0.246308678824)*x_ref[1]
-        ref[0,2,1,1]=(-0.111317410732)*x_ref[0]**o+(-0.574381793398)*x_ref[0]+(-0.0314431899843)*x_ref[1]**o+(0.393105047096)*x_ref[1]
-        ref[0,2,2,0]=(0.886320020757)*x_ref[0]**o+(-0.785042003544)*x_ref[0]+(0.82609269979)*x_ref[1]**o+(-0.677169484337)*x_ref[1]
-        ref[0,2,2,1]=(0.811027138079)*x_ref[0]**o+(-0.375108470948)*x_ref[0]+(0.781472464253)*x_ref[1]**o+(0.217640794143)*x_ref[1]
-        ref[0,3,0,0]=(0.264884117091)*x_ref[0]**o+(0.116591319557)*x_ref[0]+(0.282667679763)*x_ref[1]**o+(0.111123454337)*x_ref[1]
-        ref[0,3,0,1]=(0.0451626985922)*x_ref[0]**o+(-0.93771279728)*x_ref[0]+(0.129171764072)*x_ref[1]**o+(0.598367954162)*x_ref[1]
-        ref[0,3,1,0]=(0.905243511086)*x_ref[0]**o+(0.0837062573586)*x_ref[0]+(0.0657223248433)*x_ref[1]**o+(-0.746644690072)*x_ref[1]
-        ref[0,3,1,1]=(-0.0547856755485)*x_ref[0]**o+(-0.22157806755)*x_ref[0]+(0.124623625108)*x_ref[1]**o+(0.0436590157081)*x_ref[1]
-        ref[0,3,2,0]=(-0.558323744577)*x_ref[0]**o+(-0.646043519007)*x_ref[0]+(0.991885458004)*x_ref[1]**o+(-0.634140808163)*x_ref[1]
-        ref[0,3,2,1]=(-0.27247983028)*x_ref[0]**o+(0.803906404485)*x_ref[0]+(-0.816826609924)*x_ref[1]**o+(-0.969532783336)*x_ref[1]
-        ref[0,4,0,0]=(0.638733842891)*x_ref[0]**o+(-0.972793270208)*x_ref[0]+(0.714611008099)*x_ref[1]**o+(0.586988595847)*x_ref[1]
-        ref[0,4,0,1]=(0.63584760734)*x_ref[0]**o+(-0.653740236747)*x_ref[0]+(-0.596304731446)*x_ref[1]**o+(0.42519786429)*x_ref[1]
-        ref[0,4,1,0]=(0.0665562973529)*x_ref[0]**o+(0.362152092093)*x_ref[0]+(0.732530335739)*x_ref[1]**o+(0.618536326941)*x_ref[1]
-        ref[0,4,1,1]=(0.486060667608)*x_ref[0]**o+(0.59489013279)*x_ref[0]+(-0.547237017498)*x_ref[1]**o+(0.0371894705857)*x_ref[1]
-        ref[0,4,2,0]=(0.395505844397)*x_ref[0]**o+(-0.869090434535)*x_ref[0]+(-0.606640827437)*x_ref[1]**o+(0.269995459083)*x_ref[1]
-        ref[0,4,2,1]=(0.304671547176)*x_ref[0]**o+(-0.515772523849)*x_ref[0]+(0.546114300876)*x_ref[1]**o+(0.530247404341)*x_ref[1]
-        ref[1,0,0,0]=(0.408332677433)*x_ref[0]**o+(-0.0778807359918)*x_ref[0]+(-0.803337489297)*x_ref[1]**o+(-0.123835718422)*x_ref[1]
-        ref[1,0,0,1]=(-0.00441620254944)*x_ref[0]**o+(0.0321259598831)*x_ref[0]+(-0.998381508472)*x_ref[1]**o+(0.800767747511)*x_ref[1]
-        ref[1,0,1,0]=(-0.923683057418)*x_ref[0]**o+(0.579405114902)*x_ref[0]+(-0.939639823585)*x_ref[1]**o+(-0.138423358134)*x_ref[1]
-        ref[1,0,1,1]=(-0.558420234848)*x_ref[0]**o+(0.133316569813)*x_ref[0]+(-0.294134717329)*x_ref[1]**o+(-0.750897749044)*x_ref[1]
-        ref[1,0,2,0]=(0.478951298545)*x_ref[0]**o+(-0.807173978799)*x_ref[0]+(0.852438146763)*x_ref[1]**o+(-0.103814229563)*x_ref[1]
-        ref[1,0,2,1]=(-0.875250726603)*x_ref[0]**o+(-0.934803428491)*x_ref[0]+(0.143352873672)*x_ref[1]**o+(0.600934881206)*x_ref[1]
-        ref[1,1,0,0]=(-0.0539476321018)*x_ref[0]**o+(0.194177663417)*x_ref[0]+(-0.862877991009)*x_ref[1]**o+(-0.438337993664)*x_ref[1]
-        ref[1,1,0,1]=(-0.623379355474)*x_ref[0]**o+(-0.0746994739748)*x_ref[0]+(0.365005438956)*x_ref[1]**o+(-0.431737688205)*x_ref[1]
-        ref[1,1,1,0]=(0.0936054461735)*x_ref[0]**o+(-0.974594269446)*x_ref[0]+(-0.121917598428)*x_ref[1]**o+(-0.84429083727)*x_ref[1]
-        ref[1,1,1,1]=(0.967763348672)*x_ref[0]**o+(0.331698826475)*x_ref[0]+(0.66448515877)*x_ref[1]**o+(0.00214985930661)*x_ref[1]
-        ref[1,1,2,0]=(-0.312146580762)*x_ref[0]**o+(0.998152287706)*x_ref[0]+(-0.474242942777)*x_ref[1]**o+(0.637827347846)*x_ref[1]
-        ref[1,1,2,1]=(-0.556765443436)*x_ref[0]**o+(0.227327929774)*x_ref[0]+(0.739457845569)*x_ref[1]**o+(-0.615070017663)*x_ref[1]
-        ref[1,2,0,0]=(-0.23030660552)*x_ref[0]**o+(0.750479465953)*x_ref[0]+(0.278215408392)*x_ref[1]**o+(-0.640618698224)*x_ref[1]
-        ref[1,2,0,1]=(-0.0713217101129)*x_ref[0]**o+(0.500737477887)*x_ref[0]+(-0.972834770005)*x_ref[1]**o+(-0.420386056033)*x_ref[1]
-        ref[1,2,1,0]=(-0.497322989847)*x_ref[0]**o+(-0.528685124841)*x_ref[0]+(-0.934386348496)*x_ref[1]**o+(0.191930553839)*x_ref[1]
-        ref[1,2,1,1]=(0.124362419781)*x_ref[0]**o+(-0.0457849787456)*x_ref[0]+(-0.360596154712)*x_ref[1]**o+(0.799736253715)*x_ref[1]
-        ref[1,2,2,0]=(-0.346294878893)*x_ref[0]**o+(0.427772309361)*x_ref[0]+(-0.0642666791012)*x_ref[1]**o+(-0.214442238311)*x_ref[1]
-        ref[1,2,2,1]=(0.24434837411)*x_ref[0]**o+(-0.913373159786)*x_ref[0]+(0.158750862391)*x_ref[1]**o+(-0.544328807576)*x_ref[1]
-        ref[1,3,0,0]=(0.870847002687)*x_ref[0]**o+(-0.466884462301)*x_ref[0]+(-0.343358829445)*x_ref[1]**o+(-0.180956419766)*x_ref[1]
-        ref[1,3,0,1]=(-0.813518850863)*x_ref[0]**o+(0.960810467501)*x_ref[0]+(0.35091416904)*x_ref[1]**o+(0.84534544948)*x_ref[1]
-        ref[1,3,1,0]=(-0.284687751218)*x_ref[0]**o+(-0.274583519355)*x_ref[0]+(0.338892764102)*x_ref[1]**o+(-0.145142443753)*x_ref[1]
-        ref[1,3,1,1]=(0.921064262137)*x_ref[0]**o+(0.152552421678)*x_ref[0]+(0.827247693375)*x_ref[1]**o+(-0.569529848619)*x_ref[1]
-        ref[1,3,2,0]=(0.133567630356)*x_ref[0]**o+(-0.0429397358364)*x_ref[0]+(-0.175383170663)*x_ref[1]**o+(0.584407631334)*x_ref[1]
-        ref[1,3,2,1]=(0.203880167371)*x_ref[0]**o+(-0.422978073825)*x_ref[0]+(-0.210109267588)*x_ref[1]**o+(-0.902327373219)*x_ref[1]
-        ref[1,4,0,0]=(-0.566386864876)*x_ref[0]**o+(-0.139795085483)*x_ref[0]+(-0.00852913464238)*x_ref[1]**o+(0.569151381884)*x_ref[1]
-        ref[1,4,0,1]=(-0.937256625212)*x_ref[0]**o+(0.563438253128)*x_ref[0]+(-0.586182238715)*x_ref[1]**o+(-0.566169678723)*x_ref[1]
-        ref[1,4,1,0]=(-0.73296890712)*x_ref[0]**o+(0.359249594406)*x_ref[0]+(0.66050790616)*x_ref[1]**o+(-0.367919797426)*x_ref[1]
-        ref[1,4,1,1]=(-0.81165734248)*x_ref[0]**o+(0.460592817838)*x_ref[0]+(0.953573909492)*x_ref[1]**o+(0.329659021274)*x_ref[1]
-        ref[1,4,2,0]=(0.345994483595)*x_ref[0]**o+(-0.18547324343)*x_ref[0]+(0.669452926238)*x_ref[1]**o+(0.42513249272)*x_ref[1]
-        ref[1,4,2,1]=(0.250677642616)*x_ref[0]**o+(0.466118496803)*x_ref[0]+(-0.776608543595)*x_ref[1]**o+(0.449144243682)*x_ref[1]
-        ref[2,0,0,0]=(0.244172909021)*x_ref[0]**o+(0.0311068322898)*x_ref[0]+(-0.909348039508)*x_ref[1]**o+(0.376500719414)*x_ref[1]
-        ref[2,0,0,1]=(-0.033516640667)*x_ref[0]**o+(0.698424718328)*x_ref[0]+(-0.282814785542)*x_ref[1]**o+(0.61118022947)*x_ref[1]
-        ref[2,0,1,0]=(-0.946672649538)*x_ref[0]**o+(0.814325244591)*x_ref[0]+(-0.353215562825)*x_ref[1]**o+(-0.138150257429)*x_ref[1]
-        ref[2,0,1,1]=(-0.886509051692)*x_ref[0]**o+(-0.0468334385819)*x_ref[0]+(0.71984719189)*x_ref[1]**o+(-0.324744971493)*x_ref[1]
-        ref[2,0,2,0]=(-0.780921647053)*x_ref[0]**o+(-0.401418496932)*x_ref[0]+(0.647847274332)*x_ref[1]**o+(-0.831834322278)*x_ref[1]
-        ref[2,0,2,1]=(0.835155004862)*x_ref[0]**o+(0.684459986902)*x_ref[0]+(-0.301244240677)*x_ref[1]**o+(-0.161292780187)*x_ref[1]
-        ref[2,1,0,0]=(-0.652199398394)*x_ref[0]**o+(0.62480722178)*x_ref[0]+(-0.474535712914)*x_ref[1]**o+(0.926061797766)*x_ref[1]
-        ref[2,1,0,1]=(-0.813365478568)*x_ref[0]**o+(-0.38795792417)*x_ref[0]+(0.378161353697)*x_ref[1]**o+(0.70581806211)*x_ref[1]
-        ref[2,1,1,0]=(0.729265594934)*x_ref[0]**o+(-0.469397842359)*x_ref[0]+(0.642472199926)*x_ref[1]**o+(-0.779527283011)*x_ref[1]
-        ref[2,1,1,1]=(0.0517342917574)*x_ref[0]**o+(-0.414111007917)*x_ref[0]+(-0.89437375241)*x_ref[1]**o+(-0.830119585842)*x_ref[1]
-        ref[2,1,2,0]=(0.769898486257)*x_ref[0]**o+(0.791725624832)*x_ref[0]+(0.297519329396)*x_ref[1]**o+(-0.959462006611)*x_ref[1]
-        ref[2,1,2,1]=(0.817802144251)*x_ref[0]**o+(0.69851258911)*x_ref[0]+(-0.174401735228)*x_ref[1]**o+(0.13449696498)*x_ref[1]
-        ref[2,2,0,0]=(0.547972662256)*x_ref[0]**o+(-0.66491929979)*x_ref[0]+(0.330783041672)*x_ref[1]**o+(0.816196730606)*x_ref[1]
-        ref[2,2,0,1]=(0.245971097763)*x_ref[0]**o+(0.213087481481)*x_ref[0]+(-0.840766291392)*x_ref[1]**o+(0.388414557376)*x_ref[1]
-        ref[2,2,1,0]=(0.523151676444)*x_ref[0]**o+(0.854817486027)*x_ref[0]+(-0.53570188528)*x_ref[1]**o+(-0.68149362242)*x_ref[1]
-        ref[2,2,1,1]=(-0.984200247787)*x_ref[0]**o+(0.83324365092)*x_ref[0]+(-0.896184408816)*x_ref[1]**o+(0.102276243487)*x_ref[1]
-        ref[2,2,2,0]=(-0.216357164308)*x_ref[0]**o+(-0.597984882107)*x_ref[0]+(-0.205435921511)*x_ref[1]**o+(0.484947652759)*x_ref[1]
-        ref[2,2,2,1]=(-0.650046253868)*x_ref[0]**o+(-0.624878186105)*x_ref[0]+(0.786519914406)*x_ref[1]**o+(0.28027273095)*x_ref[1]
-        ref[2,3,0,0]=(-0.0821718346579)*x_ref[0]**o+(-0.687049917467)*x_ref[0]+(0.380792333736)*x_ref[1]**o+(0.151185837715)*x_ref[1]
-        ref[2,3,0,1]=(0.61796113854)*x_ref[0]**o+(0.844624413065)*x_ref[0]+(-0.980619401098)*x_ref[1]**o+(-0.854924862641)*x_ref[1]
-        ref[2,3,1,0]=(0.812293906883)*x_ref[0]**o+(-0.225593208768)*x_ref[0]+(0.964175374163)*x_ref[1]**o+(0.848850064926)*x_ref[1]
-        ref[2,3,1,1]=(0.376453572937)*x_ref[0]**o+(0.994818812059)*x_ref[0]+(0.58872018303)*x_ref[1]**o+(0.68332473361)*x_ref[1]
-        ref[2,3,2,0]=(-0.00948421972234)*x_ref[0]**o+(-0.680685462738)*x_ref[0]+(-0.767076278167)*x_ref[1]**o+(0.210165437284)*x_ref[1]
-        ref[2,3,2,1]=(-0.455199698263)*x_ref[0]**o+(-0.763430401419)*x_ref[0]+(0.183773350212)*x_ref[1]**o+(0.43105940923)*x_ref[1]
-        ref[2,4,0,0]=(-0.673962025988)*x_ref[0]**o+(-0.679073069725)*x_ref[0]+(0.11018431715)*x_ref[1]**o+(0.349020527482)*x_ref[1]
-        ref[2,4,0,1]=(-0.876691282076)*x_ref[0]**o+(0.920902226631)*x_ref[0]+(-0.477417470246)*x_ref[1]**o+(0.836417982216)*x_ref[1]
-        ref[2,4,1,0]=(0.567966851024)*x_ref[0]**o+(0.583241431716)*x_ref[0]+(-0.271851271008)*x_ref[1]**o+(0.678727902863)*x_ref[1]
-        ref[2,4,1,1]=(0.707400094)*x_ref[0]**o+(0.802820856444)*x_ref[0]+(0.84518937616)*x_ref[1]**o+(-0.0267193533403)*x_ref[1]
-        ref[2,4,2,0]=(0.213268920036)*x_ref[0]**o+(0.780721415328)*x_ref[0]+(0.839292948154)*x_ref[1]**o+(-0.0376334744443)*x_ref[1]
-        ref[2,4,2,1]=(0.136255687031)*x_ref[0]**o+(-0.582766278693)*x_ref[0]+(0.257662521321)*x_ref[1]**o+(0.808337521979)*x_ref[1]
-        ref[3,0,0,0]=(-0.524068770822)*x_ref[0]**o+(0.942236878842)*x_ref[0]+(0.889496255793)*x_ref[1]**o+(-0.904810742393)*x_ref[1]
-        ref[3,0,0,1]=(0.780157465475)*x_ref[0]**o+(-0.763811668832)*x_ref[0]+(-0.517482070639)*x_ref[1]**o+(0.662770780676)*x_ref[1]
-        ref[3,0,1,0]=(-0.693227564812)*x_ref[0]**o+(-0.763506211841)*x_ref[0]+(-0.427709881126)*x_ref[1]**o+(0.159109827204)*x_ref[1]
-        ref[3,0,1,1]=(0.644975629084)*x_ref[0]**o+(-0.928112761899)*x_ref[0]+(-0.530772740083)*x_ref[1]**o+(-0.723174790087)*x_ref[1]
-        ref[3,0,2,0]=(-0.923467274097)*x_ref[0]**o+(0.806128117288)*x_ref[0]+(0.177779363207)*x_ref[1]**o+(0.862243885542)*x_ref[1]
-        ref[3,0,2,1]=(-0.0823252901358)*x_ref[0]**o+(0.289022916284)*x_ref[0]+(-0.518508771021)*x_ref[1]**o+(0.174564769845)*x_ref[1]
-        ref[3,1,0,0]=(0.608837578444)*x_ref[0]**o+(0.898216758361)*x_ref[0]+(-0.844730109761)*x_ref[1]**o+(0.745974173207)*x_ref[1]
-        ref[3,1,0,1]=(-0.11776411078)*x_ref[0]**o+(0.186256502356)*x_ref[0]+(0.565289400333)*x_ref[1]**o+(-0.776173716206)*x_ref[1]
-        ref[3,1,1,0]=(-0.170736580152)*x_ref[0]**o+(0.829581661683)*x_ref[0]+(0.310135833859)*x_ref[1]**o+(-0.509629545687)*x_ref[1]
-        ref[3,1,1,1]=(-0.225246122751)*x_ref[0]**o+(0.586754377294)*x_ref[0]+(-0.726064725635)*x_ref[1]**o+(0.136952605704)*x_ref[1]
-        ref[3,1,2,0]=(-0.287932115478)*x_ref[0]**o+(0.858031396153)*x_ref[0]+(-0.493441745353)*x_ref[1]**o+(0.601827664994)*x_ref[1]
-        ref[3,1,2,1]=(0.665503842862)*x_ref[0]**o+(-0.515998970452)*x_ref[0]+(-0.890055558624)*x_ref[1]**o+(-0.0446371451457)*x_ref[1]
-        ref[3,2,0,0]=(-0.33741557585)*x_ref[0]**o+(-0.416183752333)*x_ref[0]+(-0.92430073538)*x_ref[1]**o+(-0.486265090904)*x_ref[1]
-        ref[3,2,0,1]=(0.910860925994)*x_ref[0]**o+(-0.896869755389)*x_ref[0]+(0.0634658185324)*x_ref[1]**o+(-0.383136455739)*x_ref[1]
-        ref[3,2,1,0]=(0.386839297976)*x_ref[0]**o+(-0.190659927071)*x_ref[0]+(-0.304846978185)*x_ref[1]**o+(-0.92705511899)*x_ref[1]
-        ref[3,2,1,1]=(-0.0197812018683)*x_ref[0]**o+(-0.479083095775)*x_ref[0]+(0.502489976089)*x_ref[1]**o+(-0.859440665475)*x_ref[1]
-        ref[3,2,2,0]=(-0.507672045299)*x_ref[0]**o+(0.498689676072)*x_ref[0]+(-0.719735804645)*x_ref[1]**o+(-0.522053306674)*x_ref[1]
-        ref[3,2,2,1]=(0.46207629211)*x_ref[0]**o+(-0.496697066039)*x_ref[0]+(0.994069339904)*x_ref[1]**o+(0.873222754449)*x_ref[1]
-        ref[3,3,0,0]=(0.126410029692)*x_ref[0]**o+(0.51067050196)*x_ref[0]+(-0.978384824088)*x_ref[1]**o+(-0.68606930503)*x_ref[1]
-        ref[3,3,0,1]=(0.376888157008)*x_ref[0]**o+(-0.14015764025)*x_ref[0]+(0.523667700758)*x_ref[1]**o+(0.0277726855258)*x_ref[1]
-        ref[3,3,1,0]=(-0.105865233294)*x_ref[0]**o+(-0.0515230741203)*x_ref[0]+(0.203766525036)*x_ref[1]**o+(-0.0431893014387)*x_ref[1]
-        ref[3,3,1,1]=(-0.404351448486)*x_ref[0]**o+(-0.639161429157)*x_ref[0]+(-0.957341091708)*x_ref[1]**o+(-0.103346466984)*x_ref[1]
-        ref[3,3,2,0]=(-0.0523508780623)*x_ref[0]**o+(-0.563589575544)*x_ref[0]+(0.158487727325)*x_ref[1]**o+(-0.519455492178)*x_ref[1]
-        ref[3,3,2,1]=(-0.823286342218)*x_ref[0]**o+(-0.493663499535)*x_ref[0]+(-0.409825574064)*x_ref[1]**o+(-0.0406101279806)*x_ref[1]
-        ref[3,4,0,0]=(0.926212910387)*x_ref[0]**o+(-0.0944507963)*x_ref[0]+(0.640740499391)*x_ref[1]**o+(-0.106969076047)*x_ref[1]
-        ref[3,4,0,1]=(-0.912044993941)*x_ref[0]**o+(-0.495323777918)*x_ref[0]+(-0.595831845108)*x_ref[1]**o+(-0.313723426318)*x_ref[1]
-        ref[3,4,1,0]=(-0.0730898742548)*x_ref[0]**o+(0.0524008484492)*x_ref[0]+(-0.948232935497)*x_ref[1]**o+(0.952670824572)*x_ref[1]
-        ref[3,4,1,1]=(-0.81869438138)*x_ref[0]**o+(-0.894654266952)*x_ref[0]+(0.414078621872)*x_ref[1]**o+(-0.876690817847)*x_ref[1]
-        ref[3,4,2,0]=(0.00688155078441)*x_ref[0]**o+(0.845964586551)*x_ref[0]+(0.0183149371892)*x_ref[1]**o+(-0.882931394537)*x_ref[1]
-        ref[3,4,2,1]=(-0.734830097149)*x_ref[0]**o+(-0.37824588859)*x_ref[0]+(-0.815402620311)*x_ref[1]**o+(-0.357905685517)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.110519315354)*x[0]**o+(0.904227374292)*x[0]+(0.459005710707)*x[1]**o+(-0.980231422256)*x[1]+(-0.819713355475)*x[2]**o+(-0.93459517989)*x[2]
-        arg[0,0,0,1]=(-0.326902946413)*x[0]**o+(0.489327766219)*x[0]+(-0.965308741061)*x[1]**o+(0.0351399111471)*x[1]+(0.257760096595)*x[2]**o+(0.125123023244)*x[2]
-        arg[0,0,1,0]=(-0.584360710004)*x[0]**o+(0.681892732544)*x[0]+(-0.118257741614)*x[1]**o+(0.839875738892)*x[1]+(0.107934154241)*x[2]**o+(0.279757054665)*x[2]
-        arg[0,0,1,1]=(0.90973214794)*x[0]**o+(-0.776804618826)*x[0]+(-0.910633853381)*x[1]**o+(-0.25678788529)*x[1]+(0.783709363646)*x[2]**o+(-0.922660855915)*x[2]
-        arg[0,0,2,0]=(-0.802273263394)*x[0]**o+(-0.917749665952)*x[0]+(0.796206817226)*x[1]**o+(0.917284637885)*x[1]+(0.219841508893)*x[2]**o+(0.0655848200083)*x[2]
-        arg[0,0,2,1]=(0.550596792343)*x[0]**o+(-0.760207057617)*x[0]+(0.0368469683098)*x[1]**o+(0.509347717331)*x[1]+(0.813780778487)*x[2]**o+(-0.432656298451)*x[2]
-        arg[0,1,0,0]=(-0.238502042941)*x[0]**o+(-0.966632221032)*x[0]+(-0.373745652933)*x[1]**o+(-0.436176336389)*x[1]+(0.124280197699)*x[2]**o+(0.552700562803)*x[2]
-        arg[0,1,0,1]=(-0.19848053276)*x[0]**o+(0.110167634957)*x[0]+(-0.748553857473)*x[1]**o+(0.355932508959)*x[1]+(-0.226987914753)*x[2]**o+(-0.68870238197)*x[2]
-        arg[0,1,1,0]=(0.365822518882)*x[0]**o+(0.327285102897)*x[0]+(0.549212504635)*x[1]**o+(0.918179946504)*x[1]+(0.20644004679)*x[2]**o+(0.821299409756)*x[2]
-        arg[0,1,1,1]=(-0.366167489101)*x[0]**o+(0.529933186572)*x[0]+(-0.604965310967)*x[1]**o+(-0.833093092352)*x[1]+(-0.73593913912)*x[2]**o+(0.872325614453)*x[2]
-        arg[0,1,2,0]=(0.289123646902)*x[0]**o+(0.705862153789)*x[0]+(-0.319756886822)*x[1]**o+(-0.453220232524)*x[1]+(-0.192336374167)*x[2]**o+(0.363575495006)*x[2]
-        arg[0,1,2,1]=(-0.213014833353)*x[0]**o+(-0.0706784230627)*x[0]+(-0.941272982229)*x[1]**o+(-0.96641361036)*x[1]+(0.289919014964)*x[2]**o+(0.57658772066)*x[2]
-        arg[0,2,0,0]=(-0.406683991704)*x[0]**o+(-0.0110042213592)*x[0]+(-0.273148083258)*x[1]**o+(0.054257030447)*x[1]+(0.387598147681)*x[2]**o+(0.480398109069)*x[2]
-        arg[0,2,0,1]=(0.318713057562)*x[0]**o+(-0.449467749585)*x[0]+(0.669991267829)*x[1]**o+(0.237986860249)*x[1]+(0.894370523471)*x[2]**o+(-0.397832436233)*x[2]
-        arg[0,2,1,0]=(-0.858603253642)*x[0]**o+(-0.713122015919)*x[0]+(0.870251906188)*x[1]**o+(-0.781601254578)*x[1]+(-0.504531525822)*x[2]**o+(-0.699819349556)*x[2]
-        arg[0,2,1,1]=(-0.825591116361)*x[0]**o+(-0.552452876394)*x[0]+(-0.262627261618)*x[1]**o+(-0.147127256184)*x[1]+(-0.171485665103)*x[2]**o+(0.823279741501)*x[2]
-        arg[0,2,2,0]=(-0.0416279689068)*x[0]**o+(-0.0903338000001)*x[0]+(0.911673780635)*x[1]**o+(0.86298673049)*x[1]+(-0.60251179847)*x[2]**o+(0.378303877746)*x[2]
-        arg[0,2,2,1]=(0.261384106387)*x[0]**o+(0.0326416199811)*x[0]+(-0.426740102269)*x[1]**o+(-0.445401626921)*x[1]+(-0.388668254526)*x[2]**o+(-0.977942913284)*x[2]
-        arg[0,3,0,0]=(-0.0195053813483)*x[0]**o+(-0.294061998664)*x[0]+(0.790461098426)*x[1]**o+(-0.506334268838)*x[1]+(0.394015541605)*x[2]**o+(-0.562248105432)*x[2]
-        arg[0,3,0,1]=(0.390726516735)*x[0]**o+(-0.757597437859)*x[0]+(0.861882149861)*x[1]**o+(0.621870451314)*x[1]+(0.900777666162)*x[2]**o+(0.271507131938)*x[2]
-        arg[0,3,1,0]=(-0.725635966475)*x[0]**o+(-0.695837548737)*x[0]+(-0.163078176328)*x[1]**o+(-0.0435808418729)*x[1]+(0.0890756544611)*x[2]**o+(-0.270422627949)*x[2]
-        arg[0,3,1,1]=(-0.175498720647)*x[0]**o+(-0.213605441632)*x[0]+(-0.358632620362)*x[1]**o+(-0.193273004152)*x[1]+(0.937704823805)*x[2]**o+(0.861707832291)*x[2]
-        arg[0,3,2,0]=(0.0976010265611)*x[0]**o+(0.995135925341)*x[0]+(0.755339287387)*x[1]**o+(-0.924722068193)*x[1]+(-0.480212181904)*x[2]**o+(-0.40237760439)*x[2]
-        arg[0,3,2,1]=(-0.679215392952)*x[0]**o+(-0.00796096253297)*x[0]+(-0.964972599421)*x[1]**o+(-0.410415435656)*x[1]+(-0.292638067785)*x[2]**o+(-0.950383976561)*x[2]
-        arg[0,4,0,0]=(0.245586594928)*x[0]**o+(-0.593420401896)*x[0]+(0.553450486534)*x[1]**o+(0.173814965689)*x[1]+(0.0719392610563)*x[2]**o+(0.676231437486)*x[2]
-        arg[0,4,0,1]=(0.154382756425)*x[0]**o+(-0.0655740293432)*x[0]+(0.924689745142)*x[1]**o+(-0.246876531175)*x[1]+(-0.241460713543)*x[2]**o+(-0.489840108568)*x[2]
-        arg[0,4,1,0]=(-0.482705840359)*x[0]**o+(-0.392960380114)*x[0]+(-0.503463823972)*x[1]**o+(0.317163204738)*x[1]+(0.775048877356)*x[2]**o+(0.599889732326)*x[2]
-        arg[0,4,1,1]=(-0.122555861716)*x[0]**o+(0.930175770449)*x[0]+(0.483503764941)*x[1]**o+(0.340001033217)*x[1]+(0.672924280979)*x[2]**o+(0.746489359683)*x[2]
-        arg[0,4,2,0]=(-0.339421141033)*x[0]**o+(-0.604966575169)*x[0]+(0.862413017648)*x[1]**o+(0.936752078454)*x[1]+(-0.0549628353285)*x[2]**o+(-0.0858885835314)*x[2]
-        arg[0,4,2,1]=(-0.581767357421)*x[0]**o+(-0.644286027548)*x[0]+(0.76948396865)*x[1]**o+(0.692265904744)*x[1]+(0.955871091531)*x[2]**o+(-0.378888503457)*x[2]
-        arg[1,0,0,0]=(-0.0407846595046)*x[0]**o+(-0.293709943251)*x[0]+(-0.310552931582)*x[1]**o+(-0.696244178466)*x[1]+(0.962985284252)*x[2]**o+(-0.0266457621404)*x[2]
-        arg[1,0,0,1]=(-0.480942811584)*x[0]**o+(-0.400158759679)*x[0]+(0.311171869807)*x[1]**o+(-0.79518809427)*x[1]+(-0.497004450478)*x[2]**o+(-0.639822005752)*x[2]
-        arg[1,0,1,0]=(0.158738648483)*x[0]**o+(0.274859816468)*x[0]+(-0.208677612654)*x[1]**o+(0.911107598366)*x[1]+(-0.400163007778)*x[2]**o+(0.276296890267)*x[2]
-        arg[1,0,1,1]=(0.613312276864)*x[0]**o+(-0.644237218776)*x[0]+(0.81927272895)*x[1]**o+(-0.12971860556)*x[1]+(0.214379406799)*x[2]**o+(0.856335675043)*x[2]
-        arg[1,0,2,0]=(-0.699925173766)*x[0]**o+(-0.560613547952)*x[0]+(-0.355325107637)*x[1]**o+(-0.598747822041)*x[1]+(0.243087037553)*x[2]**o+(-0.484176993015)*x[2]
-        arg[1,0,2,1]=(-0.218912300848)*x[0]**o+(-0.259483312969)*x[0]+(-0.863788186295)*x[1]**o+(0.924423774757)*x[1]+(-0.0823752192204)*x[2]**o+(-0.928377900602)*x[2]
-        arg[1,1,0,0]=(-0.368901144425)*x[0]**o+(0.544104655592)*x[0]+(0.321295151176)*x[1]**o+(0.395692754134)*x[1]+(-0.721319111754)*x[2]**o+(-0.698518442137)*x[2]
-        arg[1,1,0,1]=(-0.592867336047)*x[0]**o+(0.145120231038)*x[0]+(0.110390771366)*x[1]**o+(0.168333368086)*x[1]+(-0.577866419921)*x[2]**o+(0.705027708469)*x[2]
-        arg[1,1,1,0]=(-0.210603428235)*x[0]**o+(-0.250156447116)*x[0]+(-0.397803248976)*x[1]**o+(0.332163380867)*x[1]+(-0.250648216541)*x[2]**o+(-0.0693729055697)*x[2]
-        arg[1,1,1,1]=(0.324927558096)*x[0]**o+(-0.262726116223)*x[0]+(-0.555439758488)*x[1]**o+(-0.865019248609)*x[1]+(-0.0971907425857)*x[2]**o+(-0.742359236711)*x[2]
-        arg[1,1,2,0]=(0.161058869414)*x[0]**o+(0.349191500791)*x[0]+(0.468336473315)*x[1]**o+(-0.856364775995)*x[1]+(0.491736696689)*x[2]**o+(0.352984104173)*x[2]
-        arg[1,1,2,1]=(-0.243275976508)*x[0]**o+(-0.785605388878)*x[0]+(-0.282478919296)*x[1]**o+(-0.728851522341)*x[1]+(0.375134848237)*x[2]**o+(-0.486200561256)*x[2]
-        arg[1,2,0,0]=(-0.172241451405)*x[0]**o+(0.422361498196)*x[0]+(0.464862755164)*x[1]**o+(0.466661717105)*x[1]+(-0.886209677512)*x[2]**o+(-0.43529076789)*x[2]
-        arg[1,2,0,1]=(0.946582222405)*x[0]**o+(0.513640973894)*x[0]+(-0.923788000633)*x[1]**o+(-0.358163567195)*x[1]+(-0.709999132129)*x[2]**o+(-0.761163299694)*x[2]
-        arg[1,2,1,0]=(0.236339981889)*x[0]**o+(0.259874866134)*x[0]+(-0.32460762691)*x[1]**o+(-0.629786950313)*x[1]+(-0.679261685402)*x[2]**o+(0.593069192918)*x[2]
-        arg[1,2,1,1]=(0.11006800009)*x[0]**o+(0.970532991787)*x[0]+(-0.467608188361)*x[1]**o+(-0.959281984552)*x[1]+(0.610396622519)*x[2]**o+(0.282468600058)*x[2]
-        arg[1,2,2,0]=(-0.656419157742)*x[0]**o+(0.234027308171)*x[0]+(-0.67027206978)*x[1]**o+(-0.746034436817)*x[1]+(-0.771894073652)*x[2]**o+(0.949545830287)*x[2]
-        arg[1,2,2,1]=(0.615884236811)*x[0]**o+(-0.670156612555)*x[0]+(0.543165493345)*x[1]**o+(-0.618294277594)*x[1]+(-0.974114255061)*x[2]**o+(-0.762320542298)*x[2]
-        arg[1,3,0,0]=(0.096201957648)*x[0]**o+(0.440870816208)*x[0]+(0.124448859607)*x[1]**o+(0.507919407561)*x[1]+(-0.401666263687)*x[2]**o+(-0.437653713723)*x[2]
-        arg[1,3,0,1]=(0.165129229294)*x[0]**o+(-0.353217428955)*x[0]+(0.473666065504)*x[1]**o+(0.907667166988)*x[1]+(-0.864298533288)*x[2]**o+(0.641505117281)*x[2]
-        arg[1,3,1,0]=(0.381900624425)*x[0]**o+(0.427520178597)*x[0]+(-0.560279540293)*x[1]**o+(0.190814532271)*x[1]+(-0.187947688629)*x[2]**o+(-0.127694148593)*x[2]
-        arg[1,3,1,1]=(-0.903921363895)*x[0]**o+(-0.659942040828)*x[0]+(-0.549460213492)*x[1]**o+(0.869909651895)*x[1]+(-0.962273439484)*x[2]**o+(-0.046365857751)*x[2]
-        arg[1,3,2,0]=(-0.021688482187)*x[0]**o+(-0.209531000717)*x[0]+(0.668564395133)*x[1]**o+(-0.0347978700975)*x[1]+(0.947677147488)*x[2]**o+(-0.0152385052475)*x[2]
-        arg[1,3,2,1]=(0.880839485817)*x[0]**o+(-0.319275929312)*x[0]+(-0.940056657485)*x[1]**o+(0.570855397726)*x[1]+(0.279710812074)*x[2]**o+(0.496622215051)*x[2]
-        arg[1,4,0,0]=(-0.139033645615)*x[0]**o+(-0.271453722366)*x[0]+(-0.268516720244)*x[1]**o+(-0.0467555017438)*x[1]+(-0.41618262265)*x[2]**o+(0.315320363813)*x[2]
-        arg[1,4,0,1]=(0.296108607204)*x[0]**o+(-0.184582165661)*x[0]+(0.121416543744)*x[1]**o+(-0.922284926751)*x[1]+(-0.437600089668)*x[2]**o+(-0.608800626513)*x[2]
-        arg[1,4,1,0]=(0.8942028423)*x[0]**o+(0.673402831188)*x[0]+(-0.622529195562)*x[1]**o+(-0.266052338798)*x[1]+(-0.273167851702)*x[2]**o+(-0.312211982747)*x[2]
-        arg[1,4,1,1]=(-0.102315711178)*x[0]**o+(-0.885515719371)*x[0]+(-0.532910101204)*x[1]**o+(0.798525944348)*x[1]+(0.640586802303)*x[2]**o+(0.36308806536)*x[2]
-        arg[1,4,2,0]=(0.376793506541)*x[0]**o+(-0.667063564875)*x[0]+(0.609591985816)*x[1]**o+(0.28347745142)*x[1]+(-0.751832936302)*x[2]**o+(-0.683738856965)*x[2]
-        arg[1,4,2,1]=(-0.51412252819)*x[0]**o+(0.559560297206)*x[0]+(0.751134603429)*x[1]**o+(-0.0031812310797)*x[1]+(-0.525776122178)*x[2]**o+(0.338471942848)*x[2]
-        arg[2,0,0,0]=(0.937572244905)*x[0]**o+(-0.293020870379)*x[0]+(-0.918591520817)*x[1]**o+(0.622194477261)*x[1]+(0.31641482851)*x[2]**o+(0.276912266864)*x[2]
-        arg[2,0,0,1]=(0.853041599998)*x[0]**o+(-0.0220623724171)*x[0]+(0.89909044296)*x[1]**o+(-0.838782642732)*x[1]+(0.0133197592042)*x[2]**o+(-0.868977618993)*x[2]
-        arg[2,0,1,0]=(-0.325799042976)*x[0]**o+(0.746269971994)*x[0]+(0.882671061757)*x[1]**o+(-0.284133373252)*x[1]+(0.120086549521)*x[2]**o+(-0.397352610969)*x[2]
-        arg[2,0,1,1]=(0.282336934951)*x[0]**o+(-0.339893978547)*x[0]+(-0.0861660125386)*x[1]**o+(0.283063579798)*x[1]+(0.714762478569)*x[2]**o+(-0.497021718549)*x[2]
-        arg[2,0,2,0]=(0.891782779491)*x[0]**o+(-0.817647577644)*x[0]+(0.364088142085)*x[1]**o+(-0.950577637048)*x[1]+(0.4070663557)*x[2]**o+(0.270753179246)*x[2]
-        arg[2,0,2,1]=(0.316594913808)*x[0]**o+(0.310731486851)*x[0]+(0.250421828765)*x[1]**o+(0.772786141458)*x[1]+(0.64843040679)*x[2]**o+(-0.691903332511)*x[2]
-        arg[2,1,0,0]=(0.87180715028)*x[0]**o+(-0.953173230375)*x[0]+(-0.823516344548)*x[1]**o+(0.934653756548)*x[1]+(-0.537124962489)*x[2]**o+(-0.233365939659)*x[2]
-        arg[2,1,0,1]=(-0.407189744631)*x[0]**o+(-0.754425720288)*x[0]+(0.737526767897)*x[1]**o+(0.745393943502)*x[1]+(0.811744293685)*x[2]**o+(-0.459556659177)*x[2]
-        arg[2,1,1,0]=(-0.693529259877)*x[0]**o+(0.580197938048)*x[0]+(0.506055440405)*x[1]**o+(0.122531014759)*x[1]+(0.427736137775)*x[2]**o+(-0.83260140401)*x[2]
-        arg[2,1,1,1]=(0.542621975026)*x[0]**o+(-0.568425713106)*x[0]+(0.303002043446)*x[1]**o+(0.363286261651)*x[1]+(0.2729476289)*x[2]**o+(-0.0113629744659)*x[2]
-        arg[2,1,2,0]=(-0.266750235694)*x[0]**o+(0.10116400306)*x[0]+(0.315977962897)*x[1]**o+(-0.406236201454)*x[1]+(-0.586845072374)*x[2]**o+(0.513937047282)*x[2]
-        arg[2,1,2,1]=(-0.518780811975)*x[0]**o+(0.275053640829)*x[0]+(0.4234970646)*x[1]**o+(0.389585163376)*x[1]+(-0.609771068778)*x[2]**o+(-0.121467061755)*x[2]
-        arg[2,2,0,0]=(0.138823207466)*x[0]**o+(-0.779837455014)*x[0]+(0.70167049555)*x[1]**o+(0.766428813369)*x[1]+(0.114023530366)*x[2]**o+(0.650098536187)*x[2]
-        arg[2,2,0,1]=(0.974998667633)*x[0]**o+(0.958471050654)*x[0]+(0.193515162503)*x[1]**o+(-0.252148167253)*x[1]+(0.495475460125)*x[2]**o+(0.562693347983)*x[2]
-        arg[2,2,1,0]=(-0.552379548988)*x[0]**o+(-0.831399971618)*x[0]+(0.437581216647)*x[1]**o+(-0.775331267696)*x[1]+(0.729041628844)*x[2]**o+(0.633113359893)*x[2]
-        arg[2,2,1,1]=(0.379858437049)*x[0]**o+(0.923586504203)*x[0]+(0.707244783969)*x[1]**o+(-0.293157375059)*x[1]+(-0.368717941876)*x[2]**o+(-0.202610288616)*x[2]
-        arg[2,2,2,0]=(-0.804826108231)*x[0]**o+(-0.0208712096312)*x[0]+(0.0482547072498)*x[1]**o+(0.852366543609)*x[1]+(0.328962500136)*x[2]**o+(-0.132777835512)*x[2]
-        arg[2,2,2,1]=(0.91373752217)*x[0]**o+(-0.792112120729)*x[0]+(-0.0457564087072)*x[1]**o+(0.309694852949)*x[1]+(0.089219285337)*x[2]**o+(-0.516000514614)*x[2]
-        arg[2,3,0,0]=(0.343215129115)*x[0]**o+(0.40804099837)*x[0]+(-0.865942442914)*x[1]**o+(0.842241683043)*x[1]+(0.0727803297601)*x[2]**o+(-0.395225682949)*x[2]
-        arg[2,3,0,1]=(-0.965340522771)*x[0]**o+(-0.897056478677)*x[0]+(-0.305205944062)*x[1]**o+(0.393941789685)*x[1]+(-0.253328379131)*x[2]**o+(0.0951510469271)*x[2]
-        arg[2,3,1,0]=(0.536251514752)*x[0]**o+(0.0629776386779)*x[0]+(-0.706311222379)*x[1]**o+(-0.84362242029)*x[1]+(0.00110678760539)*x[2]**o+(-0.30286059941)*x[2]
-        arg[2,3,1,1]=(0.114584737295)*x[0]**o+(0.0708763738067)*x[0]+(-0.454760062397)*x[1]**o+(0.228742539922)*x[1]+(0.514960810352)*x[2]**o+(-0.815749211085)*x[2]
-        arg[2,3,2,0]=(0.246335688008)*x[0]**o+(-0.239199299885)*x[0]+(-0.447390151659)*x[1]**o+(0.918949356391)*x[1]+(-0.307864840175)*x[2]**o+(0.560139080481)*x[2]
-        arg[2,3,2,1]=(0.118766035723)*x[0]**o+(0.610711164899)*x[0]+(0.336628771776)*x[1]**o+(0.833699268751)*x[1]+(-0.424694647429)*x[2]**o+(-0.639929688104)*x[2]
-        arg[2,4,0,0]=(0.814543506987)*x[0]**o+(-0.797684321368)*x[0]+(0.337242635783)*x[1]**o+(0.278139837072)*x[1]+(0.633511526441)*x[2]**o+(0.372175615028)*x[2]
-        arg[2,4,0,1]=(-0.0590668694094)*x[0]**o+(0.256732067267)*x[0]+(0.519737187577)*x[1]**o+(-0.376391855948)*x[1]+(-0.810934658651)*x[2]**o+(0.826899476928)*x[2]
-        arg[2,4,1,0]=(-0.428976843661)*x[0]**o+(0.672667833313)*x[0]+(0.263194890946)*x[1]**o+(-0.894790773661)*x[1]+(-0.550298557295)*x[2]**o+(-0.00560384035502)*x[2]
-        arg[2,4,1,1]=(-0.818372430144)*x[0]**o+(-0.829920833073)*x[0]+(-0.359560636119)*x[1]**o+(-0.113484563205)*x[1]+(0.586796110365)*x[2]**o+(0.296820898426)*x[2]
-        arg[2,4,2,0]=(-0.691597969566)*x[0]**o+(0.715813153538)*x[0]+(0.954093612503)*x[1]**o+(0.88803420754)*x[1]+(0.697447667765)*x[2]**o+(0.793730496625)*x[2]
-        arg[2,4,2,1]=(0.351099833336)*x[0]**o+(-0.716419272807)*x[0]+(0.318726674998)*x[1]**o+(0.246151914414)*x[1]+(-0.945520673884)*x[2]**o+(-0.489026233954)*x[2]
-        arg[3,0,0,0]=(0.511598022804)*x[0]**o+(0.567617269582)*x[0]+(-0.526293319137)*x[1]**o+(0.333750098146)*x[1]+(-0.0869228849144)*x[2]**o+(-0.204072834867)*x[2]
-        arg[3,0,0,1]=(0.905384007172)*x[0]**o+(-0.661067390314)*x[0]+(-0.470790632295)*x[1]**o+(-0.149608017616)*x[1]+(0.427879278267)*x[2]**o+(0.987040179184)*x[2]
-        arg[3,0,1,0]=(-0.946562006809)*x[0]**o+(0.64141909633)*x[0]+(-0.762076826276)*x[1]**o+(-0.642912850794)*x[1]+(0.712567898559)*x[2]**o+(-0.292128944205)*x[2]
-        arg[3,0,1,1]=(-0.955087949361)*x[0]**o+(0.426588041133)*x[0]+(0.339313104127)*x[1]**o+(-0.375147344045)*x[1]+(0.967259014679)*x[2]**o+(0.504521081858)*x[2]
-        arg[3,0,2,0]=(0.141876598344)*x[0]**o+(-0.335579252825)*x[0]+(0.514552993602)*x[1]**o+(-0.531116948499)*x[1]+(-0.369319413141)*x[2]**o+(0.0374413262362)*x[2]
-        arg[3,0,2,1]=(0.678360463658)*x[0]**o+(-0.357900119646)*x[0]+(0.300750717059)*x[1]**o+(0.516196189448)*x[1]+(0.0535466018203)*x[2]**o+(-0.149961940786)*x[2]
-        arg[3,1,0,0]=(0.0975994351079)*x[0]**o+(0.634544068499)*x[0]+(-0.963217046352)*x[1]**o+(-0.804658091456)*x[1]+(-0.620132720823)*x[2]**o+(0.862250619369)*x[2]
-        arg[3,1,0,1]=(0.210306328879)*x[0]**o+(-0.457341187966)*x[0]+(0.957556084801)*x[1]**o+(0.704073170928)*x[1]+(0.423134492133)*x[2]**o+(-0.167268375412)*x[2]
-        arg[3,1,1,0]=(-0.909228817744)*x[0]**o+(0.110665018921)*x[0]+(0.36275630147)*x[1]**o+(0.346866824763)*x[1]+(-0.535600547489)*x[2]**o+(0.627638814375)*x[2]
-        arg[3,1,1,1]=(0.328780933823)*x[0]**o+(-0.249563994161)*x[0]+(-0.555789062892)*x[1]**o+(-0.917287525036)*x[1]+(0.386191175017)*x[2]**o+(0.123904319061)*x[2]
-        arg[3,1,2,0]=(-0.838409901623)*x[0]**o+(0.673479705393)*x[0]+(0.482921104917)*x[1]**o+(0.136411388588)*x[1]+(0.583674116225)*x[2]**o+(0.305100836877)*x[2]
-        arg[3,1,2,1]=(0.952961008312)*x[0]**o+(-0.0501981079532)*x[0]+(0.661434464642)*x[1]**o+(0.65030469399)*x[1]+(-0.157562001295)*x[2]**o+(-0.249551892917)*x[2]
-        arg[3,2,0,0]=(-0.0232804500286)*x[0]**o+(-0.559229392203)*x[0]+(0.127967930273)*x[1]**o+(-0.635827181645)*x[1]+(-0.0426703224383)*x[2]**o+(0.47720230258)*x[2]
-        arg[3,2,0,1]=(-0.421658996106)*x[0]**o+(-0.468260038077)*x[0]+(0.479083572554)*x[1]**o+(-0.214417881841)*x[1]+(0.372430534261)*x[2]**o+(0.133063789546)*x[2]
-        arg[3,2,1,0]=(0.905811586567)*x[0]**o+(0.245447340384)*x[0]+(-0.337650999146)*x[1]**o+(0.908188235976)*x[1]+(-0.804029751277)*x[2]**o+(0.0512676456643)*x[2]
-        arg[3,2,1,1]=(-0.891486839409)*x[0]**o+(0.20753794329)*x[0]+(0.879183464252)*x[1]**o+(0.902028906992)*x[1]+(0.416776813598)*x[2]**o+(0.491964374373)*x[2]
-        arg[3,2,2,0]=(0.653067027119)*x[0]**o+(0.765293890745)*x[0]+(-0.348902169508)*x[1]**o+(0.324429035849)*x[1]+(-0.363026365065)*x[2]**o+(0.0816186405511)*x[2]
-        arg[3,2,2,1]=(-0.0415375052325)*x[0]**o+(-0.480779075784)*x[0]+(-0.137223552938)*x[1]**o+(-0.915733625512)*x[1]+(0.750199445159)*x[2]**o+(-0.789818945171)*x[2]
-        arg[3,3,0,0]=(0.0744921239083)*x[0]**o+(0.0700589144159)*x[0]+(-0.327105425297)*x[1]**o+(0.469843257765)*x[1]+(-0.170191600844)*x[2]**o+(0.732071534155)*x[2]
-        arg[3,3,0,1]=(0.172643927441)*x[0]**o+(0.848924114383)*x[0]+(-0.79125762228)*x[1]**o+(-0.694725775976)*x[1]+(-0.309710503985)*x[2]**o+(-0.405310234927)*x[2]
-        arg[3,3,1,0]=(-0.465911787595)*x[0]**o+(-0.71080474709)*x[0]+(0.959925934203)*x[1]**o+(-0.111110644825)*x[1]+(-0.145349925218)*x[2]**o+(0.122955165811)*x[2]
-        arg[3,3,1,1]=(-0.769111863754)*x[0]**o+(0.348036938532)*x[0]+(0.485890856474)*x[1]**o+(0.382595218985)*x[1]+(-0.897488692981)*x[2]**o+(0.830822333819)*x[2]
-        arg[3,3,2,0]=(0.341890793681)*x[0]**o+(-0.667145936571)*x[0]+(-0.145094108268)*x[1]**o+(0.771433911212)*x[1]+(-0.299752164325)*x[2]**o+(-0.357856549677)*x[2]
-        arg[3,3,2,1]=(0.26381838796)*x[0]**o+(-0.44474724998)*x[0]+(0.310283988195)*x[1]**o+(0.698675181314)*x[1]+(0.437624133238)*x[2]**o+(0.394916054445)*x[2]
-        arg[3,4,0,0]=(-0.576499406674)*x[0]**o+(0.770936634959)*x[0]+(0.707441735783)*x[1]**o+(-0.794953257043)*x[1]+(-0.535342943209)*x[2]**o+(-0.509446811787)*x[2]
-        arg[3,4,0,1]=(0.161115012113)*x[0]**o+(0.11079092252)*x[0]+(0.0633804181164)*x[1]**o+(-0.406049293019)*x[1]+(-0.824283994336)*x[2]**o+(-0.481107560499)*x[2]
-        arg[3,4,1,0]=(-0.411133810295)*x[0]**o+(0.988486625099)*x[0]+(-0.36050191367)*x[1]**o+(0.469479821965)*x[1]+(-0.431175357325)*x[2]**o+(-0.966295015263)*x[2]
-        arg[3,4,1,1]=(0.233731410367)*x[0]**o+(-0.821900740766)*x[0]+(-0.823123461385)*x[1]**o+(-0.380537914421)*x[1]+(-0.896146300355)*x[2]**o+(-0.775172990257)*x[2]
-        arg[3,4,2,0]=(-0.96323363586)*x[0]**o+(0.0935412405245)*x[0]+(0.929333026259)*x[1]**o+(-0.322236627348)*x[1]+(-0.390898135964)*x[2]**o+(-0.766178290162)*x[2]
-        arg[3,4,2,1]=(-0.773670533268)*x[0]**o+(-0.156975157098)*x[0]+(-0.91512996795)*x[1]**o+(0.0247803682126)*x[1]+(0.995159733782)*x[2]**o+(-0.669224144225)*x[2]
-        ref[0,0,0,0]=(-0.110519315354)*x_ref[0]**o+(0.904227374292)*x_ref[0]+(0.459005710707)*x_ref[1]**o+(-0.980231422256)*x_ref[1]+(-0.819713355475)*x_ref[2]**o+(-0.93459517989)*x_ref[2]
-        ref[0,0,0,1]=(-0.326902946413)*x_ref[0]**o+(0.489327766219)*x_ref[0]+(-0.965308741061)*x_ref[1]**o+(0.0351399111471)*x_ref[1]+(0.257760096595)*x_ref[2]**o+(0.125123023244)*x_ref[2]
-        ref[0,0,1,0]=(-0.584360710004)*x_ref[0]**o+(0.681892732544)*x_ref[0]+(-0.118257741614)*x_ref[1]**o+(0.839875738892)*x_ref[1]+(0.107934154241)*x_ref[2]**o+(0.279757054665)*x_ref[2]
-        ref[0,0,1,1]=(0.90973214794)*x_ref[0]**o+(-0.776804618826)*x_ref[0]+(-0.910633853381)*x_ref[1]**o+(-0.25678788529)*x_ref[1]+(0.783709363646)*x_ref[2]**o+(-0.922660855915)*x_ref[2]
-        ref[0,0,2,0]=(-0.802273263394)*x_ref[0]**o+(-0.917749665952)*x_ref[0]+(0.796206817226)*x_ref[1]**o+(0.917284637885)*x_ref[1]+(0.219841508893)*x_ref[2]**o+(0.0655848200083)*x_ref[2]
-        ref[0,0,2,1]=(0.550596792343)*x_ref[0]**o+(-0.760207057617)*x_ref[0]+(0.0368469683098)*x_ref[1]**o+(0.509347717331)*x_ref[1]+(0.813780778487)*x_ref[2]**o+(-0.432656298451)*x_ref[2]
-        ref[0,1,0,0]=(-0.238502042941)*x_ref[0]**o+(-0.966632221032)*x_ref[0]+(-0.373745652933)*x_ref[1]**o+(-0.436176336389)*x_ref[1]+(0.124280197699)*x_ref[2]**o+(0.552700562803)*x_ref[2]
-        ref[0,1,0,1]=(-0.19848053276)*x_ref[0]**o+(0.110167634957)*x_ref[0]+(-0.748553857473)*x_ref[1]**o+(0.355932508959)*x_ref[1]+(-0.226987914753)*x_ref[2]**o+(-0.68870238197)*x_ref[2]
-        ref[0,1,1,0]=(0.365822518882)*x_ref[0]**o+(0.327285102897)*x_ref[0]+(0.549212504635)*x_ref[1]**o+(0.918179946504)*x_ref[1]+(0.20644004679)*x_ref[2]**o+(0.821299409756)*x_ref[2]
-        ref[0,1,1,1]=(-0.366167489101)*x_ref[0]**o+(0.529933186572)*x_ref[0]+(-0.604965310967)*x_ref[1]**o+(-0.833093092352)*x_ref[1]+(-0.73593913912)*x_ref[2]**o+(0.872325614453)*x_ref[2]
-        ref[0,1,2,0]=(0.289123646902)*x_ref[0]**o+(0.705862153789)*x_ref[0]+(-0.319756886822)*x_ref[1]**o+(-0.453220232524)*x_ref[1]+(-0.192336374167)*x_ref[2]**o+(0.363575495006)*x_ref[2]
-        ref[0,1,2,1]=(-0.213014833353)*x_ref[0]**o+(-0.0706784230627)*x_ref[0]+(-0.941272982229)*x_ref[1]**o+(-0.96641361036)*x_ref[1]+(0.289919014964)*x_ref[2]**o+(0.57658772066)*x_ref[2]
-        ref[0,2,0,0]=(-0.406683991704)*x_ref[0]**o+(-0.0110042213592)*x_ref[0]+(-0.273148083258)*x_ref[1]**o+(0.054257030447)*x_ref[1]+(0.387598147681)*x_ref[2]**o+(0.480398109069)*x_ref[2]
-        ref[0,2,0,1]=(0.318713057562)*x_ref[0]**o+(-0.449467749585)*x_ref[0]+(0.669991267829)*x_ref[1]**o+(0.237986860249)*x_ref[1]+(0.894370523471)*x_ref[2]**o+(-0.397832436233)*x_ref[2]
-        ref[0,2,1,0]=(-0.858603253642)*x_ref[0]**o+(-0.713122015919)*x_ref[0]+(0.870251906188)*x_ref[1]**o+(-0.781601254578)*x_ref[1]+(-0.504531525822)*x_ref[2]**o+(-0.699819349556)*x_ref[2]
-        ref[0,2,1,1]=(-0.825591116361)*x_ref[0]**o+(-0.552452876394)*x_ref[0]+(-0.262627261618)*x_ref[1]**o+(-0.147127256184)*x_ref[1]+(-0.171485665103)*x_ref[2]**o+(0.823279741501)*x_ref[2]
-        ref[0,2,2,0]=(-0.0416279689068)*x_ref[0]**o+(-0.0903338000001)*x_ref[0]+(0.911673780635)*x_ref[1]**o+(0.86298673049)*x_ref[1]+(-0.60251179847)*x_ref[2]**o+(0.378303877746)*x_ref[2]
-        ref[0,2,2,1]=(0.261384106387)*x_ref[0]**o+(0.0326416199811)*x_ref[0]+(-0.426740102269)*x_ref[1]**o+(-0.445401626921)*x_ref[1]+(-0.388668254526)*x_ref[2]**o+(-0.977942913284)*x_ref[2]
-        ref[0,3,0,0]=(-0.0195053813483)*x_ref[0]**o+(-0.294061998664)*x_ref[0]+(0.790461098426)*x_ref[1]**o+(-0.506334268838)*x_ref[1]+(0.394015541605)*x_ref[2]**o+(-0.562248105432)*x_ref[2]
-        ref[0,3,0,1]=(0.390726516735)*x_ref[0]**o+(-0.757597437859)*x_ref[0]+(0.861882149861)*x_ref[1]**o+(0.621870451314)*x_ref[1]+(0.900777666162)*x_ref[2]**o+(0.271507131938)*x_ref[2]
-        ref[0,3,1,0]=(-0.725635966475)*x_ref[0]**o+(-0.695837548737)*x_ref[0]+(-0.163078176328)*x_ref[1]**o+(-0.0435808418729)*x_ref[1]+(0.0890756544611)*x_ref[2]**o+(-0.270422627949)*x_ref[2]
-        ref[0,3,1,1]=(-0.175498720647)*x_ref[0]**o+(-0.213605441632)*x_ref[0]+(-0.358632620362)*x_ref[1]**o+(-0.193273004152)*x_ref[1]+(0.937704823805)*x_ref[2]**o+(0.861707832291)*x_ref[2]
-        ref[0,3,2,0]=(0.0976010265611)*x_ref[0]**o+(0.995135925341)*x_ref[0]+(0.755339287387)*x_ref[1]**o+(-0.924722068193)*x_ref[1]+(-0.480212181904)*x_ref[2]**o+(-0.40237760439)*x_ref[2]
-        ref[0,3,2,1]=(-0.679215392952)*x_ref[0]**o+(-0.00796096253297)*x_ref[0]+(-0.964972599421)*x_ref[1]**o+(-0.410415435656)*x_ref[1]+(-0.292638067785)*x_ref[2]**o+(-0.950383976561)*x_ref[2]
-        ref[0,4,0,0]=(0.245586594928)*x_ref[0]**o+(-0.593420401896)*x_ref[0]+(0.553450486534)*x_ref[1]**o+(0.173814965689)*x_ref[1]+(0.0719392610563)*x_ref[2]**o+(0.676231437486)*x_ref[2]
-        ref[0,4,0,1]=(0.154382756425)*x_ref[0]**o+(-0.0655740293432)*x_ref[0]+(0.924689745142)*x_ref[1]**o+(-0.246876531175)*x_ref[1]+(-0.241460713543)*x_ref[2]**o+(-0.489840108568)*x_ref[2]
-        ref[0,4,1,0]=(-0.482705840359)*x_ref[0]**o+(-0.392960380114)*x_ref[0]+(-0.503463823972)*x_ref[1]**o+(0.317163204738)*x_ref[1]+(0.775048877356)*x_ref[2]**o+(0.599889732326)*x_ref[2]
-        ref[0,4,1,1]=(-0.122555861716)*x_ref[0]**o+(0.930175770449)*x_ref[0]+(0.483503764941)*x_ref[1]**o+(0.340001033217)*x_ref[1]+(0.672924280979)*x_ref[2]**o+(0.746489359683)*x_ref[2]
-        ref[0,4,2,0]=(-0.339421141033)*x_ref[0]**o+(-0.604966575169)*x_ref[0]+(0.862413017648)*x_ref[1]**o+(0.936752078454)*x_ref[1]+(-0.0549628353285)*x_ref[2]**o+(-0.0858885835314)*x_ref[2]
-        ref[0,4,2,1]=(-0.581767357421)*x_ref[0]**o+(-0.644286027548)*x_ref[0]+(0.76948396865)*x_ref[1]**o+(0.692265904744)*x_ref[1]+(0.955871091531)*x_ref[2]**o+(-0.378888503457)*x_ref[2]
-        ref[1,0,0,0]=(-0.0407846595046)*x_ref[0]**o+(-0.293709943251)*x_ref[0]+(-0.310552931582)*x_ref[1]**o+(-0.696244178466)*x_ref[1]+(0.962985284252)*x_ref[2]**o+(-0.0266457621404)*x_ref[2]
-        ref[1,0,0,1]=(-0.480942811584)*x_ref[0]**o+(-0.400158759679)*x_ref[0]+(0.311171869807)*x_ref[1]**o+(-0.79518809427)*x_ref[1]+(-0.497004450478)*x_ref[2]**o+(-0.639822005752)*x_ref[2]
-        ref[1,0,1,0]=(0.158738648483)*x_ref[0]**o+(0.274859816468)*x_ref[0]+(-0.208677612654)*x_ref[1]**o+(0.911107598366)*x_ref[1]+(-0.400163007778)*x_ref[2]**o+(0.276296890267)*x_ref[2]
-        ref[1,0,1,1]=(0.613312276864)*x_ref[0]**o+(-0.644237218776)*x_ref[0]+(0.81927272895)*x_ref[1]**o+(-0.12971860556)*x_ref[1]+(0.214379406799)*x_ref[2]**o+(0.856335675043)*x_ref[2]
-        ref[1,0,2,0]=(-0.699925173766)*x_ref[0]**o+(-0.560613547952)*x_ref[0]+(-0.355325107637)*x_ref[1]**o+(-0.598747822041)*x_ref[1]+(0.243087037553)*x_ref[2]**o+(-0.484176993015)*x_ref[2]
-        ref[1,0,2,1]=(-0.218912300848)*x_ref[0]**o+(-0.259483312969)*x_ref[0]+(-0.863788186295)*x_ref[1]**o+(0.924423774757)*x_ref[1]+(-0.0823752192204)*x_ref[2]**o+(-0.928377900602)*x_ref[2]
-        ref[1,1,0,0]=(-0.368901144425)*x_ref[0]**o+(0.544104655592)*x_ref[0]+(0.321295151176)*x_ref[1]**o+(0.395692754134)*x_ref[1]+(-0.721319111754)*x_ref[2]**o+(-0.698518442137)*x_ref[2]
-        ref[1,1,0,1]=(-0.592867336047)*x_ref[0]**o+(0.145120231038)*x_ref[0]+(0.110390771366)*x_ref[1]**o+(0.168333368086)*x_ref[1]+(-0.577866419921)*x_ref[2]**o+(0.705027708469)*x_ref[2]
-        ref[1,1,1,0]=(-0.210603428235)*x_ref[0]**o+(-0.250156447116)*x_ref[0]+(-0.397803248976)*x_ref[1]**o+(0.332163380867)*x_ref[1]+(-0.250648216541)*x_ref[2]**o+(-0.0693729055697)*x_ref[2]
-        ref[1,1,1,1]=(0.324927558096)*x_ref[0]**o+(-0.262726116223)*x_ref[0]+(-0.555439758488)*x_ref[1]**o+(-0.865019248609)*x_ref[1]+(-0.0971907425857)*x_ref[2]**o+(-0.742359236711)*x_ref[2]
-        ref[1,1,2,0]=(0.161058869414)*x_ref[0]**o+(0.349191500791)*x_ref[0]+(0.468336473315)*x_ref[1]**o+(-0.856364775995)*x_ref[1]+(0.491736696689)*x_ref[2]**o+(0.352984104173)*x_ref[2]
-        ref[1,1,2,1]=(-0.243275976508)*x_ref[0]**o+(-0.785605388878)*x_ref[0]+(-0.282478919296)*x_ref[1]**o+(-0.728851522341)*x_ref[1]+(0.375134848237)*x_ref[2]**o+(-0.486200561256)*x_ref[2]
-        ref[1,2,0,0]=(-0.172241451405)*x_ref[0]**o+(0.422361498196)*x_ref[0]+(0.464862755164)*x_ref[1]**o+(0.466661717105)*x_ref[1]+(-0.886209677512)*x_ref[2]**o+(-0.43529076789)*x_ref[2]
-        ref[1,2,0,1]=(0.946582222405)*x_ref[0]**o+(0.513640973894)*x_ref[0]+(-0.923788000633)*x_ref[1]**o+(-0.358163567195)*x_ref[1]+(-0.709999132129)*x_ref[2]**o+(-0.761163299694)*x_ref[2]
-        ref[1,2,1,0]=(0.236339981889)*x_ref[0]**o+(0.259874866134)*x_ref[0]+(-0.32460762691)*x_ref[1]**o+(-0.629786950313)*x_ref[1]+(-0.679261685402)*x_ref[2]**o+(0.593069192918)*x_ref[2]
-        ref[1,2,1,1]=(0.11006800009)*x_ref[0]**o+(0.970532991787)*x_ref[0]+(-0.467608188361)*x_ref[1]**o+(-0.959281984552)*x_ref[1]+(0.610396622519)*x_ref[2]**o+(0.282468600058)*x_ref[2]
-        ref[1,2,2,0]=(-0.656419157742)*x_ref[0]**o+(0.234027308171)*x_ref[0]+(-0.67027206978)*x_ref[1]**o+(-0.746034436817)*x_ref[1]+(-0.771894073652)*x_ref[2]**o+(0.949545830287)*x_ref[2]
-        ref[1,2,2,1]=(0.615884236811)*x_ref[0]**o+(-0.670156612555)*x_ref[0]+(0.543165493345)*x_ref[1]**o+(-0.618294277594)*x_ref[1]+(-0.974114255061)*x_ref[2]**o+(-0.762320542298)*x_ref[2]
-        ref[1,3,0,0]=(0.096201957648)*x_ref[0]**o+(0.440870816208)*x_ref[0]+(0.124448859607)*x_ref[1]**o+(0.507919407561)*x_ref[1]+(-0.401666263687)*x_ref[2]**o+(-0.437653713723)*x_ref[2]
-        ref[1,3,0,1]=(0.165129229294)*x_ref[0]**o+(-0.353217428955)*x_ref[0]+(0.473666065504)*x_ref[1]**o+(0.907667166988)*x_ref[1]+(-0.864298533288)*x_ref[2]**o+(0.641505117281)*x_ref[2]
-        ref[1,3,1,0]=(0.381900624425)*x_ref[0]**o+(0.427520178597)*x_ref[0]+(-0.560279540293)*x_ref[1]**o+(0.190814532271)*x_ref[1]+(-0.187947688629)*x_ref[2]**o+(-0.127694148593)*x_ref[2]
-        ref[1,3,1,1]=(-0.903921363895)*x_ref[0]**o+(-0.659942040828)*x_ref[0]+(-0.549460213492)*x_ref[1]**o+(0.869909651895)*x_ref[1]+(-0.962273439484)*x_ref[2]**o+(-0.046365857751)*x_ref[2]
-        ref[1,3,2,0]=(-0.021688482187)*x_ref[0]**o+(-0.209531000717)*x_ref[0]+(0.668564395133)*x_ref[1]**o+(-0.0347978700975)*x_ref[1]+(0.947677147488)*x_ref[2]**o+(-0.0152385052475)*x_ref[2]
-        ref[1,3,2,1]=(0.880839485817)*x_ref[0]**o+(-0.319275929312)*x_ref[0]+(-0.940056657485)*x_ref[1]**o+(0.570855397726)*x_ref[1]+(0.279710812074)*x_ref[2]**o+(0.496622215051)*x_ref[2]
-        ref[1,4,0,0]=(-0.139033645615)*x_ref[0]**o+(-0.271453722366)*x_ref[0]+(-0.268516720244)*x_ref[1]**o+(-0.0467555017438)*x_ref[1]+(-0.41618262265)*x_ref[2]**o+(0.315320363813)*x_ref[2]
-        ref[1,4,0,1]=(0.296108607204)*x_ref[0]**o+(-0.184582165661)*x_ref[0]+(0.121416543744)*x_ref[1]**o+(-0.922284926751)*x_ref[1]+(-0.437600089668)*x_ref[2]**o+(-0.608800626513)*x_ref[2]
-        ref[1,4,1,0]=(0.8942028423)*x_ref[0]**o+(0.673402831188)*x_ref[0]+(-0.622529195562)*x_ref[1]**o+(-0.266052338798)*x_ref[1]+(-0.273167851702)*x_ref[2]**o+(-0.312211982747)*x_ref[2]
-        ref[1,4,1,1]=(-0.102315711178)*x_ref[0]**o+(-0.885515719371)*x_ref[0]+(-0.532910101204)*x_ref[1]**o+(0.798525944348)*x_ref[1]+(0.640586802303)*x_ref[2]**o+(0.36308806536)*x_ref[2]
-        ref[1,4,2,0]=(0.376793506541)*x_ref[0]**o+(-0.667063564875)*x_ref[0]+(0.609591985816)*x_ref[1]**o+(0.28347745142)*x_ref[1]+(-0.751832936302)*x_ref[2]**o+(-0.683738856965)*x_ref[2]
-        ref[1,4,2,1]=(-0.51412252819)*x_ref[0]**o+(0.559560297206)*x_ref[0]+(0.751134603429)*x_ref[1]**o+(-0.0031812310797)*x_ref[1]+(-0.525776122178)*x_ref[2]**o+(0.338471942848)*x_ref[2]
-        ref[2,0,0,0]=(0.937572244905)*x_ref[0]**o+(-0.293020870379)*x_ref[0]+(-0.918591520817)*x_ref[1]**o+(0.622194477261)*x_ref[1]+(0.31641482851)*x_ref[2]**o+(0.276912266864)*x_ref[2]
-        ref[2,0,0,1]=(0.853041599998)*x_ref[0]**o+(-0.0220623724171)*x_ref[0]+(0.89909044296)*x_ref[1]**o+(-0.838782642732)*x_ref[1]+(0.0133197592042)*x_ref[2]**o+(-0.868977618993)*x_ref[2]
-        ref[2,0,1,0]=(-0.325799042976)*x_ref[0]**o+(0.746269971994)*x_ref[0]+(0.882671061757)*x_ref[1]**o+(-0.284133373252)*x_ref[1]+(0.120086549521)*x_ref[2]**o+(-0.397352610969)*x_ref[2]
-        ref[2,0,1,1]=(0.282336934951)*x_ref[0]**o+(-0.339893978547)*x_ref[0]+(-0.0861660125386)*x_ref[1]**o+(0.283063579798)*x_ref[1]+(0.714762478569)*x_ref[2]**o+(-0.497021718549)*x_ref[2]
-        ref[2,0,2,0]=(0.891782779491)*x_ref[0]**o+(-0.817647577644)*x_ref[0]+(0.364088142085)*x_ref[1]**o+(-0.950577637048)*x_ref[1]+(0.4070663557)*x_ref[2]**o+(0.270753179246)*x_ref[2]
-        ref[2,0,2,1]=(0.316594913808)*x_ref[0]**o+(0.310731486851)*x_ref[0]+(0.250421828765)*x_ref[1]**o+(0.772786141458)*x_ref[1]+(0.64843040679)*x_ref[2]**o+(-0.691903332511)*x_ref[2]
-        ref[2,1,0,0]=(0.87180715028)*x_ref[0]**o+(-0.953173230375)*x_ref[0]+(-0.823516344548)*x_ref[1]**o+(0.934653756548)*x_ref[1]+(-0.537124962489)*x_ref[2]**o+(-0.233365939659)*x_ref[2]
-        ref[2,1,0,1]=(-0.407189744631)*x_ref[0]**o+(-0.754425720288)*x_ref[0]+(0.737526767897)*x_ref[1]**o+(0.745393943502)*x_ref[1]+(0.811744293685)*x_ref[2]**o+(-0.459556659177)*x_ref[2]
-        ref[2,1,1,0]=(-0.693529259877)*x_ref[0]**o+(0.580197938048)*x_ref[0]+(0.506055440405)*x_ref[1]**o+(0.122531014759)*x_ref[1]+(0.427736137775)*x_ref[2]**o+(-0.83260140401)*x_ref[2]
-        ref[2,1,1,1]=(0.542621975026)*x_ref[0]**o+(-0.568425713106)*x_ref[0]+(0.303002043446)*x_ref[1]**o+(0.363286261651)*x_ref[1]+(0.2729476289)*x_ref[2]**o+(-0.0113629744659)*x_ref[2]
-        ref[2,1,2,0]=(-0.266750235694)*x_ref[0]**o+(0.10116400306)*x_ref[0]+(0.315977962897)*x_ref[1]**o+(-0.406236201454)*x_ref[1]+(-0.586845072374)*x_ref[2]**o+(0.513937047282)*x_ref[2]
-        ref[2,1,2,1]=(-0.518780811975)*x_ref[0]**o+(0.275053640829)*x_ref[0]+(0.4234970646)*x_ref[1]**o+(0.389585163376)*x_ref[1]+(-0.609771068778)*x_ref[2]**o+(-0.121467061755)*x_ref[2]
-        ref[2,2,0,0]=(0.138823207466)*x_ref[0]**o+(-0.779837455014)*x_ref[0]+(0.70167049555)*x_ref[1]**o+(0.766428813369)*x_ref[1]+(0.114023530366)*x_ref[2]**o+(0.650098536187)*x_ref[2]
-        ref[2,2,0,1]=(0.974998667633)*x_ref[0]**o+(0.958471050654)*x_ref[0]+(0.193515162503)*x_ref[1]**o+(-0.252148167253)*x_ref[1]+(0.495475460125)*x_ref[2]**o+(0.562693347983)*x_ref[2]
-        ref[2,2,1,0]=(-0.552379548988)*x_ref[0]**o+(-0.831399971618)*x_ref[0]+(0.437581216647)*x_ref[1]**o+(-0.775331267696)*x_ref[1]+(0.729041628844)*x_ref[2]**o+(0.633113359893)*x_ref[2]
-        ref[2,2,1,1]=(0.379858437049)*x_ref[0]**o+(0.923586504203)*x_ref[0]+(0.707244783969)*x_ref[1]**o+(-0.293157375059)*x_ref[1]+(-0.368717941876)*x_ref[2]**o+(-0.202610288616)*x_ref[2]
-        ref[2,2,2,0]=(-0.804826108231)*x_ref[0]**o+(-0.0208712096312)*x_ref[0]+(0.0482547072498)*x_ref[1]**o+(0.852366543609)*x_ref[1]+(0.328962500136)*x_ref[2]**o+(-0.132777835512)*x_ref[2]
-        ref[2,2,2,1]=(0.91373752217)*x_ref[0]**o+(-0.792112120729)*x_ref[0]+(-0.0457564087072)*x_ref[1]**o+(0.309694852949)*x_ref[1]+(0.089219285337)*x_ref[2]**o+(-0.516000514614)*x_ref[2]
-        ref[2,3,0,0]=(0.343215129115)*x_ref[0]**o+(0.40804099837)*x_ref[0]+(-0.865942442914)*x_ref[1]**o+(0.842241683043)*x_ref[1]+(0.0727803297601)*x_ref[2]**o+(-0.395225682949)*x_ref[2]
-        ref[2,3,0,1]=(-0.965340522771)*x_ref[0]**o+(-0.897056478677)*x_ref[0]+(-0.305205944062)*x_ref[1]**o+(0.393941789685)*x_ref[1]+(-0.253328379131)*x_ref[2]**o+(0.0951510469271)*x_ref[2]
-        ref[2,3,1,0]=(0.536251514752)*x_ref[0]**o+(0.0629776386779)*x_ref[0]+(-0.706311222379)*x_ref[1]**o+(-0.84362242029)*x_ref[1]+(0.00110678760539)*x_ref[2]**o+(-0.30286059941)*x_ref[2]
-        ref[2,3,1,1]=(0.114584737295)*x_ref[0]**o+(0.0708763738067)*x_ref[0]+(-0.454760062397)*x_ref[1]**o+(0.228742539922)*x_ref[1]+(0.514960810352)*x_ref[2]**o+(-0.815749211085)*x_ref[2]
-        ref[2,3,2,0]=(0.246335688008)*x_ref[0]**o+(-0.239199299885)*x_ref[0]+(-0.447390151659)*x_ref[1]**o+(0.918949356391)*x_ref[1]+(-0.307864840175)*x_ref[2]**o+(0.560139080481)*x_ref[2]
-        ref[2,3,2,1]=(0.118766035723)*x_ref[0]**o+(0.610711164899)*x_ref[0]+(0.336628771776)*x_ref[1]**o+(0.833699268751)*x_ref[1]+(-0.424694647429)*x_ref[2]**o+(-0.639929688104)*x_ref[2]
-        ref[2,4,0,0]=(0.814543506987)*x_ref[0]**o+(-0.797684321368)*x_ref[0]+(0.337242635783)*x_ref[1]**o+(0.278139837072)*x_ref[1]+(0.633511526441)*x_ref[2]**o+(0.372175615028)*x_ref[2]
-        ref[2,4,0,1]=(-0.0590668694094)*x_ref[0]**o+(0.256732067267)*x_ref[0]+(0.519737187577)*x_ref[1]**o+(-0.376391855948)*x_ref[1]+(-0.810934658651)*x_ref[2]**o+(0.826899476928)*x_ref[2]
-        ref[2,4,1,0]=(-0.428976843661)*x_ref[0]**o+(0.672667833313)*x_ref[0]+(0.263194890946)*x_ref[1]**o+(-0.894790773661)*x_ref[1]+(-0.550298557295)*x_ref[2]**o+(-0.00560384035502)*x_ref[2]
-        ref[2,4,1,1]=(-0.818372430144)*x_ref[0]**o+(-0.829920833073)*x_ref[0]+(-0.359560636119)*x_ref[1]**o+(-0.113484563205)*x_ref[1]+(0.586796110365)*x_ref[2]**o+(0.296820898426)*x_ref[2]
-        ref[2,4,2,0]=(-0.691597969566)*x_ref[0]**o+(0.715813153538)*x_ref[0]+(0.954093612503)*x_ref[1]**o+(0.88803420754)*x_ref[1]+(0.697447667765)*x_ref[2]**o+(0.793730496625)*x_ref[2]
-        ref[2,4,2,1]=(0.351099833336)*x_ref[0]**o+(-0.716419272807)*x_ref[0]+(0.318726674998)*x_ref[1]**o+(0.246151914414)*x_ref[1]+(-0.945520673884)*x_ref[2]**o+(-0.489026233954)*x_ref[2]
-        ref[3,0,0,0]=(0.511598022804)*x_ref[0]**o+(0.567617269582)*x_ref[0]+(-0.526293319137)*x_ref[1]**o+(0.333750098146)*x_ref[1]+(-0.0869228849144)*x_ref[2]**o+(-0.204072834867)*x_ref[2]
-        ref[3,0,0,1]=(0.905384007172)*x_ref[0]**o+(-0.661067390314)*x_ref[0]+(-0.470790632295)*x_ref[1]**o+(-0.149608017616)*x_ref[1]+(0.427879278267)*x_ref[2]**o+(0.987040179184)*x_ref[2]
-        ref[3,0,1,0]=(-0.946562006809)*x_ref[0]**o+(0.64141909633)*x_ref[0]+(-0.762076826276)*x_ref[1]**o+(-0.642912850794)*x_ref[1]+(0.712567898559)*x_ref[2]**o+(-0.292128944205)*x_ref[2]
-        ref[3,0,1,1]=(-0.955087949361)*x_ref[0]**o+(0.426588041133)*x_ref[0]+(0.339313104127)*x_ref[1]**o+(-0.375147344045)*x_ref[1]+(0.967259014679)*x_ref[2]**o+(0.504521081858)*x_ref[2]
-        ref[3,0,2,0]=(0.141876598344)*x_ref[0]**o+(-0.335579252825)*x_ref[0]+(0.514552993602)*x_ref[1]**o+(-0.531116948499)*x_ref[1]+(-0.369319413141)*x_ref[2]**o+(0.0374413262362)*x_ref[2]
-        ref[3,0,2,1]=(0.678360463658)*x_ref[0]**o+(-0.357900119646)*x_ref[0]+(0.300750717059)*x_ref[1]**o+(0.516196189448)*x_ref[1]+(0.0535466018203)*x_ref[2]**o+(-0.149961940786)*x_ref[2]
-        ref[3,1,0,0]=(0.0975994351079)*x_ref[0]**o+(0.634544068499)*x_ref[0]+(-0.963217046352)*x_ref[1]**o+(-0.804658091456)*x_ref[1]+(-0.620132720823)*x_ref[2]**o+(0.862250619369)*x_ref[2]
-        ref[3,1,0,1]=(0.210306328879)*x_ref[0]**o+(-0.457341187966)*x_ref[0]+(0.957556084801)*x_ref[1]**o+(0.704073170928)*x_ref[1]+(0.423134492133)*x_ref[2]**o+(-0.167268375412)*x_ref[2]
-        ref[3,1,1,0]=(-0.909228817744)*x_ref[0]**o+(0.110665018921)*x_ref[0]+(0.36275630147)*x_ref[1]**o+(0.346866824763)*x_ref[1]+(-0.535600547489)*x_ref[2]**o+(0.627638814375)*x_ref[2]
-        ref[3,1,1,1]=(0.328780933823)*x_ref[0]**o+(-0.249563994161)*x_ref[0]+(-0.555789062892)*x_ref[1]**o+(-0.917287525036)*x_ref[1]+(0.386191175017)*x_ref[2]**o+(0.123904319061)*x_ref[2]
-        ref[3,1,2,0]=(-0.838409901623)*x_ref[0]**o+(0.673479705393)*x_ref[0]+(0.482921104917)*x_ref[1]**o+(0.136411388588)*x_ref[1]+(0.583674116225)*x_ref[2]**o+(0.305100836877)*x_ref[2]
-        ref[3,1,2,1]=(0.952961008312)*x_ref[0]**o+(-0.0501981079532)*x_ref[0]+(0.661434464642)*x_ref[1]**o+(0.65030469399)*x_ref[1]+(-0.157562001295)*x_ref[2]**o+(-0.249551892917)*x_ref[2]
-        ref[3,2,0,0]=(-0.0232804500286)*x_ref[0]**o+(-0.559229392203)*x_ref[0]+(0.127967930273)*x_ref[1]**o+(-0.635827181645)*x_ref[1]+(-0.0426703224383)*x_ref[2]**o+(0.47720230258)*x_ref[2]
-        ref[3,2,0,1]=(-0.421658996106)*x_ref[0]**o+(-0.468260038077)*x_ref[0]+(0.479083572554)*x_ref[1]**o+(-0.214417881841)*x_ref[1]+(0.372430534261)*x_ref[2]**o+(0.133063789546)*x_ref[2]
-        ref[3,2,1,0]=(0.905811586567)*x_ref[0]**o+(0.245447340384)*x_ref[0]+(-0.337650999146)*x_ref[1]**o+(0.908188235976)*x_ref[1]+(-0.804029751277)*x_ref[2]**o+(0.0512676456643)*x_ref[2]
-        ref[3,2,1,1]=(-0.891486839409)*x_ref[0]**o+(0.20753794329)*x_ref[0]+(0.879183464252)*x_ref[1]**o+(0.902028906992)*x_ref[1]+(0.416776813598)*x_ref[2]**o+(0.491964374373)*x_ref[2]
-        ref[3,2,2,0]=(0.653067027119)*x_ref[0]**o+(0.765293890745)*x_ref[0]+(-0.348902169508)*x_ref[1]**o+(0.324429035849)*x_ref[1]+(-0.363026365065)*x_ref[2]**o+(0.0816186405511)*x_ref[2]
-        ref[3,2,2,1]=(-0.0415375052325)*x_ref[0]**o+(-0.480779075784)*x_ref[0]+(-0.137223552938)*x_ref[1]**o+(-0.915733625512)*x_ref[1]+(0.750199445159)*x_ref[2]**o+(-0.789818945171)*x_ref[2]
-        ref[3,3,0,0]=(0.0744921239083)*x_ref[0]**o+(0.0700589144159)*x_ref[0]+(-0.327105425297)*x_ref[1]**o+(0.469843257765)*x_ref[1]+(-0.170191600844)*x_ref[2]**o+(0.732071534155)*x_ref[2]
-        ref[3,3,0,1]=(0.172643927441)*x_ref[0]**o+(0.848924114383)*x_ref[0]+(-0.79125762228)*x_ref[1]**o+(-0.694725775976)*x_ref[1]+(-0.309710503985)*x_ref[2]**o+(-0.405310234927)*x_ref[2]
-        ref[3,3,1,0]=(-0.465911787595)*x_ref[0]**o+(-0.71080474709)*x_ref[0]+(0.959925934203)*x_ref[1]**o+(-0.111110644825)*x_ref[1]+(-0.145349925218)*x_ref[2]**o+(0.122955165811)*x_ref[2]
-        ref[3,3,1,1]=(-0.769111863754)*x_ref[0]**o+(0.348036938532)*x_ref[0]+(0.485890856474)*x_ref[1]**o+(0.382595218985)*x_ref[1]+(-0.897488692981)*x_ref[2]**o+(0.830822333819)*x_ref[2]
-        ref[3,3,2,0]=(0.341890793681)*x_ref[0]**o+(-0.667145936571)*x_ref[0]+(-0.145094108268)*x_ref[1]**o+(0.771433911212)*x_ref[1]+(-0.299752164325)*x_ref[2]**o+(-0.357856549677)*x_ref[2]
-        ref[3,3,2,1]=(0.26381838796)*x_ref[0]**o+(-0.44474724998)*x_ref[0]+(0.310283988195)*x_ref[1]**o+(0.698675181314)*x_ref[1]+(0.437624133238)*x_ref[2]**o+(0.394916054445)*x_ref[2]
-        ref[3,4,0,0]=(-0.576499406674)*x_ref[0]**o+(0.770936634959)*x_ref[0]+(0.707441735783)*x_ref[1]**o+(-0.794953257043)*x_ref[1]+(-0.535342943209)*x_ref[2]**o+(-0.509446811787)*x_ref[2]
-        ref[3,4,0,1]=(0.161115012113)*x_ref[0]**o+(0.11079092252)*x_ref[0]+(0.0633804181164)*x_ref[1]**o+(-0.406049293019)*x_ref[1]+(-0.824283994336)*x_ref[2]**o+(-0.481107560499)*x_ref[2]
-        ref[3,4,1,0]=(-0.411133810295)*x_ref[0]**o+(0.988486625099)*x_ref[0]+(-0.36050191367)*x_ref[1]**o+(0.469479821965)*x_ref[1]+(-0.431175357325)*x_ref[2]**o+(-0.966295015263)*x_ref[2]
-        ref[3,4,1,1]=(0.233731410367)*x_ref[0]**o+(-0.821900740766)*x_ref[0]+(-0.823123461385)*x_ref[1]**o+(-0.380537914421)*x_ref[1]+(-0.896146300355)*x_ref[2]**o+(-0.775172990257)*x_ref[2]
-        ref[3,4,2,0]=(-0.96323363586)*x_ref[0]**o+(0.0935412405245)*x_ref[0]+(0.929333026259)*x_ref[1]**o+(-0.322236627348)*x_ref[1]+(-0.390898135964)*x_ref[2]**o+(-0.766178290162)*x_ref[2]
-        ref[3,4,2,1]=(-0.773670533268)*x_ref[0]**o+(-0.156975157098)*x_ref[0]+(-0.91512996795)*x_ref[1]**o+(0.0247803682126)*x_ref[1]+(0.995159733782)*x_ref[2]**o+(-0.669224144225)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.492060381705)*x[0]**o+(0.578791868713)*x[0]+(-0.439849757114)*x[1]**o+(-0.52629328967)*x[1]
-        ref=(0.492060381705)*x_ref[0]**o+(0.578791868713)*x_ref[0]+(-0.439849757114)*x_ref[1]**o+(-0.52629328967)*x_ref[1]
-      else:
-        arg=(0.954737963273)*x[0]**o+(0.452578946878)*x[0]+(0.0471085060698)*x[1]**o+(-0.640169119832)*x[1]+(0.710401490627)*x[2]**o+(-0.382589884739)*x[2]
-        ref=(0.954737963273)*x_ref[0]**o+(0.452578946878)*x_ref[0]+(0.0471085060698)*x_ref[1]**o+(-0.640169119832)*x_ref[1]+(0.710401490627)*x_ref[2]**o+(-0.382589884739)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.59604585527)*x[0]**o+(0.826981169401)*x[0]+(0.227617349484)*x[1]**o+(0.184907819029)*x[1]
-        arg[1]=(-0.424684036731)*x[0]**o+(0.346537997905)*x[0]+(0.891921272597)*x[1]**o+(-0.145924182872)*x[1]
-        ref[0]=(-0.59604585527)*x_ref[0]**o+(0.826981169401)*x_ref[0]+(0.227617349484)*x_ref[1]**o+(0.184907819029)*x_ref[1]
-        ref[1]=(-0.424684036731)*x_ref[0]**o+(0.346537997905)*x_ref[0]+(0.891921272597)*x_ref[1]**o+(-0.145924182872)*x_ref[1]
-      else:
-        arg[0]=(0.777228173978)*x[0]**o+(-0.812215827155)*x[0]+(-0.618922680968)*x[1]**o+(0.0660312103206)*x[1]+(-0.917545504466)*x[2]**o+(0.988524619414)*x[2]
-        arg[1]=(0.110219469565)*x[0]**o+(-0.441866866062)*x[0]+(-0.654447764335)*x[1]**o+(0.230716133289)*x[1]+(0.347487317165)*x[2]**o+(-0.948877903043)*x[2]
-        ref[0]=(0.777228173978)*x_ref[0]**o+(-0.812215827155)*x_ref[0]+(-0.618922680968)*x_ref[1]**o+(0.0660312103206)*x_ref[1]+(-0.917545504466)*x_ref[2]**o+(0.988524619414)*x_ref[2]
-        ref[1]=(0.110219469565)*x_ref[0]**o+(-0.441866866062)*x_ref[0]+(-0.654447764335)*x_ref[1]**o+(0.230716133289)*x_ref[1]+(0.347487317165)*x_ref[2]**o+(-0.948877903043)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.958809754913)*x[0]**o+(-0.844717049041)*x[0]+(0.462564514427)*x[1]**o+(-0.247678335594)*x[1]
-        arg[0,1]=(0.700700054189)*x[0]**o+(-0.653724611457)*x[0]+(0.52659177803)*x[1]**o+(-0.387559446418)*x[1]
-        arg[0,2]=(-0.326124300134)*x[0]**o+(0.115197897152)*x[0]+(-0.876340641846)*x[1]**o+(0.433060472581)*x[1]
-        arg[0,3]=(-0.101215736407)*x[0]**o+(-0.483684510661)*x[0]+(0.0418770907036)*x[1]**o+(-0.845564414421)*x[1]
-        arg[0,4]=(-0.293094855718)*x[0]**o+(0.710954930773)*x[0]+(0.238671713869)*x[1]**o+(0.576638343412)*x[1]
-        arg[1,0]=(0.529861280122)*x[0]**o+(-0.259437904048)*x[0]+(-0.620725288158)*x[1]**o+(0.326787999382)*x[1]
-        arg[1,1]=(0.421245543012)*x[0]**o+(-0.954139636698)*x[0]+(0.0498199734926)*x[1]**o+(0.24010238499)*x[1]
-        arg[1,2]=(0.333362362373)*x[0]**o+(-0.999953175952)*x[0]+(0.866193849246)*x[1]**o+(0.764287410177)*x[1]
-        arg[1,3]=(0.470415957539)*x[0]**o+(-0.133477966871)*x[0]+(-0.0416970809832)*x[1]**o+(-0.416352740444)*x[1]
-        arg[1,4]=(-0.178613018492)*x[0]**o+(-0.967264985978)*x[0]+(-0.297102423687)*x[1]**o+(0.884184973413)*x[1]
-        arg[2,0]=(-0.29363453294)*x[0]**o+(-0.0237360594862)*x[0]+(-0.300776450747)*x[1]**o+(-0.493932721521)*x[1]
-        arg[2,1]=(0.795045745699)*x[0]**o+(0.984956851154)*x[0]+(-0.724208405235)*x[1]**o+(0.59029067239)*x[1]
-        arg[2,2]=(-0.803012112531)*x[0]**o+(-0.831727785428)*x[0]+(0.330295112332)*x[1]**o+(0.0966317908147)*x[1]
-        arg[2,3]=(-0.652332429144)*x[0]**o+(-0.38689457016)*x[0]+(-0.391780825295)*x[1]**o+(-0.444284790848)*x[1]
-        arg[2,4]=(0.416775161398)*x[0]**o+(-0.16281006536)*x[0]+(-0.742938932867)*x[1]**o+(0.456486183714)*x[1]
-        arg[3,0]=(0.506731632086)*x[0]**o+(-0.222468320035)*x[0]+(-0.906398223556)*x[1]**o+(-0.0250630448611)*x[1]
-        arg[3,1]=(-0.39207398783)*x[0]**o+(-0.574739374252)*x[0]+(0.262101584569)*x[1]**o+(0.249587535087)*x[1]
-        arg[3,2]=(-0.252593913503)*x[0]**o+(-0.864294052989)*x[0]+(0.0110434296336)*x[1]**o+(-0.224585040999)*x[1]
-        arg[3,3]=(-0.631704469212)*x[0]**o+(-0.495153785048)*x[0]+(-0.304420746672)*x[1]**o+(-0.254005222021)*x[1]
-        arg[3,4]=(0.775631055421)*x[0]**o+(0.370095409961)*x[0]+(0.894627612994)*x[1]**o+(-0.329716708629)*x[1]
-        ref[0,0]=(-0.958809754913)*x_ref[0]**o+(-0.844717049041)*x_ref[0]+(0.462564514427)*x_ref[1]**o+(-0.247678335594)*x_ref[1]
-        ref[0,1]=(0.700700054189)*x_ref[0]**o+(-0.653724611457)*x_ref[0]+(0.52659177803)*x_ref[1]**o+(-0.387559446418)*x_ref[1]
-        ref[0,2]=(-0.326124300134)*x_ref[0]**o+(0.115197897152)*x_ref[0]+(-0.876340641846)*x_ref[1]**o+(0.433060472581)*x_ref[1]
-        ref[0,3]=(-0.101215736407)*x_ref[0]**o+(-0.483684510661)*x_ref[0]+(0.0418770907036)*x_ref[1]**o+(-0.845564414421)*x_ref[1]
-        ref[0,4]=(-0.293094855718)*x_ref[0]**o+(0.710954930773)*x_ref[0]+(0.238671713869)*x_ref[1]**o+(0.576638343412)*x_ref[1]
-        ref[1,0]=(0.529861280122)*x_ref[0]**o+(-0.259437904048)*x_ref[0]+(-0.620725288158)*x_ref[1]**o+(0.326787999382)*x_ref[1]
-        ref[1,1]=(0.421245543012)*x_ref[0]**o+(-0.954139636698)*x_ref[0]+(0.0498199734926)*x_ref[1]**o+(0.24010238499)*x_ref[1]
-        ref[1,2]=(0.333362362373)*x_ref[0]**o+(-0.999953175952)*x_ref[0]+(0.866193849246)*x_ref[1]**o+(0.764287410177)*x_ref[1]
-        ref[1,3]=(0.470415957539)*x_ref[0]**o+(-0.133477966871)*x_ref[0]+(-0.0416970809832)*x_ref[1]**o+(-0.416352740444)*x_ref[1]
-        ref[1,4]=(-0.178613018492)*x_ref[0]**o+(-0.967264985978)*x_ref[0]+(-0.297102423687)*x_ref[1]**o+(0.884184973413)*x_ref[1]
-        ref[2,0]=(-0.29363453294)*x_ref[0]**o+(-0.0237360594862)*x_ref[0]+(-0.300776450747)*x_ref[1]**o+(-0.493932721521)*x_ref[1]
-        ref[2,1]=(0.795045745699)*x_ref[0]**o+(0.984956851154)*x_ref[0]+(-0.724208405235)*x_ref[1]**o+(0.59029067239)*x_ref[1]
-        ref[2,2]=(-0.803012112531)*x_ref[0]**o+(-0.831727785428)*x_ref[0]+(0.330295112332)*x_ref[1]**o+(0.0966317908147)*x_ref[1]
-        ref[2,3]=(-0.652332429144)*x_ref[0]**o+(-0.38689457016)*x_ref[0]+(-0.391780825295)*x_ref[1]**o+(-0.444284790848)*x_ref[1]
-        ref[2,4]=(0.416775161398)*x_ref[0]**o+(-0.16281006536)*x_ref[0]+(-0.742938932867)*x_ref[1]**o+(0.456486183714)*x_ref[1]
-        ref[3,0]=(0.506731632086)*x_ref[0]**o+(-0.222468320035)*x_ref[0]+(-0.906398223556)*x_ref[1]**o+(-0.0250630448611)*x_ref[1]
-        ref[3,1]=(-0.39207398783)*x_ref[0]**o+(-0.574739374252)*x_ref[0]+(0.262101584569)*x_ref[1]**o+(0.249587535087)*x_ref[1]
-        ref[3,2]=(-0.252593913503)*x_ref[0]**o+(-0.864294052989)*x_ref[0]+(0.0110434296336)*x_ref[1]**o+(-0.224585040999)*x_ref[1]
-        ref[3,3]=(-0.631704469212)*x_ref[0]**o+(-0.495153785048)*x_ref[0]+(-0.304420746672)*x_ref[1]**o+(-0.254005222021)*x_ref[1]
-        ref[3,4]=(0.775631055421)*x_ref[0]**o+(0.370095409961)*x_ref[0]+(0.894627612994)*x_ref[1]**o+(-0.329716708629)*x_ref[1]
-      else:
-        arg[0,0]=(0.392450639899)*x[0]**o+(-0.685488230002)*x[0]+(-0.41545928428)*x[1]**o+(0.244144392379)*x[1]+(0.602642156528)*x[2]**o+(-0.348717378461)*x[2]
-        arg[0,1]=(-0.341243165541)*x[0]**o+(-0.616870164204)*x[0]+(-0.510613066362)*x[1]**o+(-0.81387010212)*x[1]+(0.856239691119)*x[2]**o+(0.0744651854239)*x[2]
-        arg[0,2]=(-0.765983413604)*x[0]**o+(0.474551394174)*x[0]+(-0.939524929765)*x[1]**o+(0.418297898065)*x[1]+(0.00589909539531)*x[2]**o+(0.0889012994897)*x[2]
-        arg[0,3]=(-0.521217563352)*x[0]**o+(-0.256316459647)*x[0]+(-0.0265965098379)*x[1]**o+(-0.597562278966)*x[1]+(0.0389151661339)*x[2]**o+(-0.572109451352)*x[2]
-        arg[0,4]=(-0.853801268491)*x[0]**o+(-0.691274812057)*x[0]+(-0.682435618581)*x[1]**o+(-0.974334375359)*x[1]+(-0.642333316794)*x[2]**o+(0.353816751252)*x[2]
-        arg[1,0]=(-0.657545394322)*x[0]**o+(-0.334172338096)*x[0]+(0.016748279459)*x[1]**o+(-0.294858621125)*x[1]+(-0.49403880046)*x[2]**o+(-0.152416774822)*x[2]
-        arg[1,1]=(-0.602731976042)*x[0]**o+(0.685046816545)*x[0]+(0.750001644716)*x[1]**o+(-0.202076972289)*x[1]+(-0.0232888078434)*x[2]**o+(-0.0774477649878)*x[2]
-        arg[1,2]=(-0.707321785527)*x[0]**o+(0.618526464205)*x[0]+(-0.578548442468)*x[1]**o+(-0.411374744442)*x[1]+(-0.944277708787)*x[2]**o+(0.647856975707)*x[2]
-        arg[1,3]=(-0.222503271022)*x[0]**o+(-0.929428092728)*x[0]+(-0.976553212424)*x[1]**o+(0.0376439617084)*x[1]+(0.0428078568512)*x[2]**o+(-0.441850944272)*x[2]
-        arg[1,4]=(-0.862164898455)*x[0]**o+(-0.989900221991)*x[0]+(0.110610844567)*x[1]**o+(0.419384612236)*x[1]+(-0.00271948841262)*x[2]**o+(0.301635101629)*x[2]
-        arg[2,0]=(-0.0950421881942)*x[0]**o+(-0.741293053909)*x[0]+(-0.461538879874)*x[1]**o+(-0.8199842553)*x[1]+(0.0590344916829)*x[2]**o+(0.352541518434)*x[2]
-        arg[2,1]=(-0.734407995647)*x[0]**o+(-0.726167721992)*x[0]+(0.700521229916)*x[1]**o+(0.753555863428)*x[1]+(-0.891638139696)*x[2]**o+(-0.996550711213)*x[2]
-        arg[2,2]=(0.777110352629)*x[0]**o+(0.309719201157)*x[0]+(0.026816547522)*x[1]**o+(0.33161010287)*x[1]+(0.257929504352)*x[2]**o+(0.71871314654)*x[2]
-        arg[2,3]=(-0.0982522143825)*x[0]**o+(0.0532144836415)*x[0]+(0.155895442381)*x[1]**o+(-0.872222127033)*x[1]+(0.810538165596)*x[2]**o+(-0.917071363009)*x[2]
-        arg[2,4]=(0.882674783877)*x[0]**o+(-0.246439463648)*x[0]+(-0.478821457401)*x[1]**o+(-0.629183697296)*x[1]+(0.833283185393)*x[2]**o+(-0.895796651184)*x[2]
-        arg[3,0]=(0.949019461395)*x[0]**o+(0.437511668107)*x[0]+(0.46679355983)*x[1]**o+(0.375391913775)*x[1]+(0.992336073925)*x[2]**o+(0.784847856608)*x[2]
-        arg[3,1]=(0.10730061928)*x[0]**o+(0.624678931808)*x[0]+(-0.105084917663)*x[1]**o+(-0.0650034223387)*x[1]+(-0.271922353868)*x[2]**o+(-0.182967296038)*x[2]
-        arg[3,2]=(0.115856234055)*x[0]**o+(0.711912354922)*x[0]+(-0.317962972122)*x[1]**o+(0.577856092951)*x[1]+(-0.246833922867)*x[2]**o+(0.354116462218)*x[2]
-        arg[3,3]=(0.40937236699)*x[0]**o+(0.639252679403)*x[0]+(0.540206943219)*x[1]**o+(0.287006139758)*x[1]+(0.123311433598)*x[2]**o+(-0.0300672780213)*x[2]
-        arg[3,4]=(-0.190299257713)*x[0]**o+(-0.022055675261)*x[0]+(-0.640751994447)*x[1]**o+(-0.411801947317)*x[1]+(0.0675008125057)*x[2]**o+(-0.659424255203)*x[2]
-        ref[0,0]=(0.392450639899)*x_ref[0]**o+(-0.685488230002)*x_ref[0]+(-0.41545928428)*x_ref[1]**o+(0.244144392379)*x_ref[1]+(0.602642156528)*x_ref[2]**o+(-0.348717378461)*x_ref[2]
-        ref[0,1]=(-0.341243165541)*x_ref[0]**o+(-0.616870164204)*x_ref[0]+(-0.510613066362)*x_ref[1]**o+(-0.81387010212)*x_ref[1]+(0.856239691119)*x_ref[2]**o+(0.0744651854239)*x_ref[2]
-        ref[0,2]=(-0.765983413604)*x_ref[0]**o+(0.474551394174)*x_ref[0]+(-0.939524929765)*x_ref[1]**o+(0.418297898065)*x_ref[1]+(0.00589909539531)*x_ref[2]**o+(0.0889012994897)*x_ref[2]
-        ref[0,3]=(-0.521217563352)*x_ref[0]**o+(-0.256316459647)*x_ref[0]+(-0.0265965098379)*x_ref[1]**o+(-0.597562278966)*x_ref[1]+(0.0389151661339)*x_ref[2]**o+(-0.572109451352)*x_ref[2]
-        ref[0,4]=(-0.853801268491)*x_ref[0]**o+(-0.691274812057)*x_ref[0]+(-0.682435618581)*x_ref[1]**o+(-0.974334375359)*x_ref[1]+(-0.642333316794)*x_ref[2]**o+(0.353816751252)*x_ref[2]
-        ref[1,0]=(-0.657545394322)*x_ref[0]**o+(-0.334172338096)*x_ref[0]+(0.016748279459)*x_ref[1]**o+(-0.294858621125)*x_ref[1]+(-0.49403880046)*x_ref[2]**o+(-0.152416774822)*x_ref[2]
-        ref[1,1]=(-0.602731976042)*x_ref[0]**o+(0.685046816545)*x_ref[0]+(0.750001644716)*x_ref[1]**o+(-0.202076972289)*x_ref[1]+(-0.0232888078434)*x_ref[2]**o+(-0.0774477649878)*x_ref[2]
-        ref[1,2]=(-0.707321785527)*x_ref[0]**o+(0.618526464205)*x_ref[0]+(-0.578548442468)*x_ref[1]**o+(-0.411374744442)*x_ref[1]+(-0.944277708787)*x_ref[2]**o+(0.647856975707)*x_ref[2]
-        ref[1,3]=(-0.222503271022)*x_ref[0]**o+(-0.929428092728)*x_ref[0]+(-0.976553212424)*x_ref[1]**o+(0.0376439617084)*x_ref[1]+(0.0428078568512)*x_ref[2]**o+(-0.441850944272)*x_ref[2]
-        ref[1,4]=(-0.862164898455)*x_ref[0]**o+(-0.989900221991)*x_ref[0]+(0.110610844567)*x_ref[1]**o+(0.419384612236)*x_ref[1]+(-0.00271948841262)*x_ref[2]**o+(0.301635101629)*x_ref[2]
-        ref[2,0]=(-0.0950421881942)*x_ref[0]**o+(-0.741293053909)*x_ref[0]+(-0.461538879874)*x_ref[1]**o+(-0.8199842553)*x_ref[1]+(0.0590344916829)*x_ref[2]**o+(0.352541518434)*x_ref[2]
-        ref[2,1]=(-0.734407995647)*x_ref[0]**o+(-0.726167721992)*x_ref[0]+(0.700521229916)*x_ref[1]**o+(0.753555863428)*x_ref[1]+(-0.891638139696)*x_ref[2]**o+(-0.996550711213)*x_ref[2]
-        ref[2,2]=(0.777110352629)*x_ref[0]**o+(0.309719201157)*x_ref[0]+(0.026816547522)*x_ref[1]**o+(0.33161010287)*x_ref[1]+(0.257929504352)*x_ref[2]**o+(0.71871314654)*x_ref[2]
-        ref[2,3]=(-0.0982522143825)*x_ref[0]**o+(0.0532144836415)*x_ref[0]+(0.155895442381)*x_ref[1]**o+(-0.872222127033)*x_ref[1]+(0.810538165596)*x_ref[2]**o+(-0.917071363009)*x_ref[2]
-        ref[2,4]=(0.882674783877)*x_ref[0]**o+(-0.246439463648)*x_ref[0]+(-0.478821457401)*x_ref[1]**o+(-0.629183697296)*x_ref[1]+(0.833283185393)*x_ref[2]**o+(-0.895796651184)*x_ref[2]
-        ref[3,0]=(0.949019461395)*x_ref[0]**o+(0.437511668107)*x_ref[0]+(0.46679355983)*x_ref[1]**o+(0.375391913775)*x_ref[1]+(0.992336073925)*x_ref[2]**o+(0.784847856608)*x_ref[2]
-        ref[3,1]=(0.10730061928)*x_ref[0]**o+(0.624678931808)*x_ref[0]+(-0.105084917663)*x_ref[1]**o+(-0.0650034223387)*x_ref[1]+(-0.271922353868)*x_ref[2]**o+(-0.182967296038)*x_ref[2]
-        ref[3,2]=(0.115856234055)*x_ref[0]**o+(0.711912354922)*x_ref[0]+(-0.317962972122)*x_ref[1]**o+(0.577856092951)*x_ref[1]+(-0.246833922867)*x_ref[2]**o+(0.354116462218)*x_ref[2]
-        ref[3,3]=(0.40937236699)*x_ref[0]**o+(0.639252679403)*x_ref[0]+(0.540206943219)*x_ref[1]**o+(0.287006139758)*x_ref[1]+(0.123311433598)*x_ref[2]**o+(-0.0300672780213)*x_ref[2]
-        ref[3,4]=(-0.190299257713)*x_ref[0]**o+(-0.022055675261)*x_ref[0]+(-0.640751994447)*x_ref[1]**o+(-0.411801947317)*x_ref[1]+(0.0675008125057)*x_ref[2]**o+(-0.659424255203)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.697323110242)*x[0]**o+(-0.806494185218)*x[0]+(0.387914602484)*x[1]**o+(0.841835487965)*x[1]
-        arg[0,0,1]=(-0.77670653908)*x[0]**o+(0.311710212706)*x[0]+(-0.0951864020181)*x[1]**o+(-0.14909139946)*x[1]
-        arg[0,1,0]=(0.80933791543)*x[0]**o+(0.72441968276)*x[0]+(-0.446054850085)*x[1]**o+(0.419303534988)*x[1]
-        arg[0,1,1]=(0.174464190017)*x[0]**o+(0.330609661878)*x[0]+(0.798365390058)*x[1]**o+(0.354899223817)*x[1]
-        arg[1,0,0]=(0.36073672839)*x[0]**o+(0.831900846214)*x[0]+(-0.656354645044)*x[1]**o+(0.200645044646)*x[1]
-        arg[1,0,1]=(0.817889801065)*x[0]**o+(0.34052889294)*x[0]+(-0.2416944924)*x[1]**o+(0.0922342148934)*x[1]
-        arg[1,1,0]=(-0.962116509558)*x[0]**o+(-0.0785232077542)*x[0]+(-0.981399563356)*x[1]**o+(0.785509095614)*x[1]
-        arg[1,1,1]=(-0.688444030508)*x[0]**o+(0.651617638972)*x[0]+(0.160584046401)*x[1]**o+(0.253258991923)*x[1]
-        arg[2,0,0]=(0.0728970412574)*x[0]**o+(-0.647328240217)*x[0]+(0.517665494535)*x[1]**o+(-0.416383753573)*x[1]
-        arg[2,0,1]=(0.148104739733)*x[0]**o+(-0.378371639837)*x[0]+(0.848608631336)*x[1]**o+(-0.881516167852)*x[1]
-        arg[2,1,0]=(-0.506376676256)*x[0]**o+(0.234090340446)*x[0]+(-0.737828959566)*x[1]**o+(-0.74093763135)*x[1]
-        arg[2,1,1]=(0.259605354135)*x[0]**o+(0.537424356513)*x[0]+(-0.405718119693)*x[1]**o+(0.120663712044)*x[1]
-        arg[3,0,0]=(-0.609659975269)*x[0]**o+(-0.455923293874)*x[0]+(-0.00765676965971)*x[1]**o+(-0.710899349259)*x[1]
-        arg[3,0,1]=(-0.731011612904)*x[0]**o+(-0.355060765358)*x[0]+(-0.127369372538)*x[1]**o+(0.694265371908)*x[1]
-        arg[3,1,0]=(0.188766337132)*x[0]**o+(-0.194878304215)*x[0]+(-0.963356218109)*x[1]**o+(0.327053372293)*x[1]
-        arg[3,1,1]=(-0.566712779324)*x[0]**o+(-0.251473305071)*x[0]+(0.0181297146138)*x[1]**o+(0.257664697754)*x[1]
-        arg[4,0,0]=(0.574100764569)*x[0]**o+(-0.717776999574)*x[0]+(0.880998124155)*x[1]**o+(-0.810615928848)*x[1]
-        arg[4,0,1]=(0.42552502518)*x[0]**o+(0.456751341147)*x[0]+(-0.484998619005)*x[1]**o+(0.932151187696)*x[1]
-        arg[4,1,0]=(0.56865980485)*x[0]**o+(0.593928872734)*x[0]+(-0.475639894836)*x[1]**o+(-0.990718402693)*x[1]
-        arg[4,1,1]=(0.129586342261)*x[0]**o+(-0.408951830619)*x[0]+(0.132518475289)*x[1]**o+(0.708612820692)*x[1]
-        arg[5,0,0]=(0.0708038739082)*x[0]**o+(0.524270558649)*x[0]+(0.368504533482)*x[1]**o+(0.935828810393)*x[1]
-        arg[5,0,1]=(-0.383650306829)*x[0]**o+(-0.0439362943961)*x[0]+(0.80939275198)*x[1]**o+(-0.61335508023)*x[1]
-        arg[5,1,0]=(-0.621571339247)*x[0]**o+(-0.185069293199)*x[0]+(0.368472011431)*x[1]**o+(-0.388752495932)*x[1]
-        arg[5,1,1]=(-0.263310763174)*x[0]**o+(-0.694616630015)*x[0]+(0.271238274203)*x[1]**o+(-0.477861402347)*x[1]
-        ref[0,0,0]=(-0.697323110242)*x_ref[0]**o+(-0.806494185218)*x_ref[0]+(0.387914602484)*x_ref[1]**o+(0.841835487965)*x_ref[1]
-        ref[0,0,1]=(-0.77670653908)*x_ref[0]**o+(0.311710212706)*x_ref[0]+(-0.0951864020181)*x_ref[1]**o+(-0.14909139946)*x_ref[1]
-        ref[0,1,0]=(0.80933791543)*x_ref[0]**o+(0.72441968276)*x_ref[0]+(-0.446054850085)*x_ref[1]**o+(0.419303534988)*x_ref[1]
-        ref[0,1,1]=(0.174464190017)*x_ref[0]**o+(0.330609661878)*x_ref[0]+(0.798365390058)*x_ref[1]**o+(0.354899223817)*x_ref[1]
-        ref[1,0,0]=(0.36073672839)*x_ref[0]**o+(0.831900846214)*x_ref[0]+(-0.656354645044)*x_ref[1]**o+(0.200645044646)*x_ref[1]
-        ref[1,0,1]=(0.817889801065)*x_ref[0]**o+(0.34052889294)*x_ref[0]+(-0.2416944924)*x_ref[1]**o+(0.0922342148934)*x_ref[1]
-        ref[1,1,0]=(-0.962116509558)*x_ref[0]**o+(-0.0785232077542)*x_ref[0]+(-0.981399563356)*x_ref[1]**o+(0.785509095614)*x_ref[1]
-        ref[1,1,1]=(-0.688444030508)*x_ref[0]**o+(0.651617638972)*x_ref[0]+(0.160584046401)*x_ref[1]**o+(0.253258991923)*x_ref[1]
-        ref[2,0,0]=(0.0728970412574)*x_ref[0]**o+(-0.647328240217)*x_ref[0]+(0.517665494535)*x_ref[1]**o+(-0.416383753573)*x_ref[1]
-        ref[2,0,1]=(0.148104739733)*x_ref[0]**o+(-0.378371639837)*x_ref[0]+(0.848608631336)*x_ref[1]**o+(-0.881516167852)*x_ref[1]
-        ref[2,1,0]=(-0.506376676256)*x_ref[0]**o+(0.234090340446)*x_ref[0]+(-0.737828959566)*x_ref[1]**o+(-0.74093763135)*x_ref[1]
-        ref[2,1,1]=(0.259605354135)*x_ref[0]**o+(0.537424356513)*x_ref[0]+(-0.405718119693)*x_ref[1]**o+(0.120663712044)*x_ref[1]
-        ref[3,0,0]=(-0.609659975269)*x_ref[0]**o+(-0.455923293874)*x_ref[0]+(-0.00765676965971)*x_ref[1]**o+(-0.710899349259)*x_ref[1]
-        ref[3,0,1]=(-0.731011612904)*x_ref[0]**o+(-0.355060765358)*x_ref[0]+(-0.127369372538)*x_ref[1]**o+(0.694265371908)*x_ref[1]
-        ref[3,1,0]=(0.188766337132)*x_ref[0]**o+(-0.194878304215)*x_ref[0]+(-0.963356218109)*x_ref[1]**o+(0.327053372293)*x_ref[1]
-        ref[3,1,1]=(-0.566712779324)*x_ref[0]**o+(-0.251473305071)*x_ref[0]+(0.0181297146138)*x_ref[1]**o+(0.257664697754)*x_ref[1]
-        ref[4,0,0]=(0.574100764569)*x_ref[0]**o+(-0.717776999574)*x_ref[0]+(0.880998124155)*x_ref[1]**o+(-0.810615928848)*x_ref[1]
-        ref[4,0,1]=(0.42552502518)*x_ref[0]**o+(0.456751341147)*x_ref[0]+(-0.484998619005)*x_ref[1]**o+(0.932151187696)*x_ref[1]
-        ref[4,1,0]=(0.56865980485)*x_ref[0]**o+(0.593928872734)*x_ref[0]+(-0.475639894836)*x_ref[1]**o+(-0.990718402693)*x_ref[1]
-        ref[4,1,1]=(0.129586342261)*x_ref[0]**o+(-0.408951830619)*x_ref[0]+(0.132518475289)*x_ref[1]**o+(0.708612820692)*x_ref[1]
-        ref[5,0,0]=(0.0708038739082)*x_ref[0]**o+(0.524270558649)*x_ref[0]+(0.368504533482)*x_ref[1]**o+(0.935828810393)*x_ref[1]
-        ref[5,0,1]=(-0.383650306829)*x_ref[0]**o+(-0.0439362943961)*x_ref[0]+(0.80939275198)*x_ref[1]**o+(-0.61335508023)*x_ref[1]
-        ref[5,1,0]=(-0.621571339247)*x_ref[0]**o+(-0.185069293199)*x_ref[0]+(0.368472011431)*x_ref[1]**o+(-0.388752495932)*x_ref[1]
-        ref[5,1,1]=(-0.263310763174)*x_ref[0]**o+(-0.694616630015)*x_ref[0]+(0.271238274203)*x_ref[1]**o+(-0.477861402347)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.287534645778)*x[0]**o+(0.94865229379)*x[0]+(0.655299232864)*x[1]**o+(0.350034924637)*x[1]+(0.556341391183)*x[2]**o+(0.840643265765)*x[2]
-        arg[0,0,1]=(-0.207213781549)*x[0]**o+(-0.0394497047797)*x[0]+(-0.0236016308575)*x[1]**o+(0.344122299199)*x[1]+(0.389588325996)*x[2]**o+(0.941980468657)*x[2]
-        arg[0,1,0]=(0.00980412235862)*x[0]**o+(0.74862549447)*x[0]+(0.630165284383)*x[1]**o+(0.234711268989)*x[1]+(-0.22509981272)*x[2]**o+(-0.0153888168649)*x[2]
-        arg[0,1,1]=(-0.87309186262)*x[0]**o+(0.833526923917)*x[0]+(0.78785479415)*x[1]**o+(0.823967259171)*x[1]+(0.320244316109)*x[2]**o+(-0.735225854417)*x[2]
-        arg[1,0,0]=(-0.0892232551051)*x[0]**o+(-0.346728833563)*x[0]+(0.422774634671)*x[1]**o+(0.793222381957)*x[1]+(-0.670476677006)*x[2]**o+(0.896884540116)*x[2]
-        arg[1,0,1]=(-0.0023382136345)*x[0]**o+(0.73058281545)*x[0]+(0.11828880374)*x[1]**o+(-0.691839091619)*x[1]+(-0.39086463392)*x[2]**o+(0.66200209782)*x[2]
-        arg[1,1,0]=(-0.924238055558)*x[0]**o+(-0.334208271705)*x[0]+(-0.57106045555)*x[1]**o+(-0.765650999193)*x[1]+(0.0404533468054)*x[2]**o+(-0.225975260777)*x[2]
-        arg[1,1,1]=(-0.351110999108)*x[0]**o+(0.626166346251)*x[0]+(0.385737198467)*x[1]**o+(0.577561466908)*x[1]+(0.708325217242)*x[2]**o+(0.193727923904)*x[2]
-        arg[2,0,0]=(0.278942080997)*x[0]**o+(-0.569761653572)*x[0]+(-0.624879270918)*x[1]**o+(-0.0151754112896)*x[1]+(0.411399083825)*x[2]**o+(-0.846669568641)*x[2]
-        arg[2,0,1]=(-0.543586963879)*x[0]**o+(-0.383959956625)*x[0]+(0.184375944938)*x[1]**o+(-0.104178233562)*x[1]+(-0.223101894662)*x[2]**o+(-0.17221835595)*x[2]
-        arg[2,1,0]=(0.317103921207)*x[0]**o+(-0.919542461354)*x[0]+(0.56666554454)*x[1]**o+(0.895772298847)*x[1]+(0.714550707822)*x[2]**o+(0.634702089556)*x[2]
-        arg[2,1,1]=(0.986576254164)*x[0]**o+(0.544493787633)*x[0]+(0.964620027203)*x[1]**o+(0.259991384678)*x[1]+(-0.577361835739)*x[2]**o+(0.651593456822)*x[2]
-        arg[3,0,0]=(0.362841472614)*x[0]**o+(-0.521771228041)*x[0]+(-0.594530755517)*x[1]**o+(0.700647681241)*x[1]+(-0.131683781311)*x[2]**o+(0.636310189834)*x[2]
-        arg[3,0,1]=(0.885891862321)*x[0]**o+(0.397438320764)*x[0]+(0.711380452937)*x[1]**o+(0.962571325144)*x[1]+(-0.300114113339)*x[2]**o+(0.34700388868)*x[2]
-        arg[3,1,0]=(0.52140726408)*x[0]**o+(-0.0921295295522)*x[0]+(-0.823076091446)*x[1]**o+(0.477401876125)*x[1]+(-0.973057905067)*x[2]**o+(-0.975526794128)*x[2]
-        arg[3,1,1]=(-0.241503887113)*x[0]**o+(0.133988088285)*x[0]+(0.243026393121)*x[1]**o+(0.0848716779473)*x[1]+(0.140349614791)*x[2]**o+(-0.217182025695)*x[2]
-        arg[4,0,0]=(0.680080194053)*x[0]**o+(0.512009633844)*x[0]+(-0.640214066363)*x[1]**o+(0.571800633214)*x[1]+(-0.749395617545)*x[2]**o+(0.448487668786)*x[2]
-        arg[4,0,1]=(-0.792959916349)*x[0]**o+(-0.433770516776)*x[0]+(-0.380980758215)*x[1]**o+(-0.831154769101)*x[1]+(0.277551460651)*x[2]**o+(0.626476984233)*x[2]
-        arg[4,1,0]=(-0.285102566546)*x[0]**o+(0.745636275253)*x[0]+(0.4999427836)*x[1]**o+(0.561343302884)*x[1]+(0.796220302361)*x[2]**o+(-0.830020520143)*x[2]
-        arg[4,1,1]=(0.237420507314)*x[0]**o+(0.327181858092)*x[0]+(-0.895743235593)*x[1]**o+(-0.496964477443)*x[1]+(0.57336428204)*x[2]**o+(-0.154267071287)*x[2]
-        arg[5,0,0]=(0.0401925997607)*x[0]**o+(-0.0155957424748)*x[0]+(-0.658363451239)*x[1]**o+(-0.175223211879)*x[1]+(-0.743729768327)*x[2]**o+(0.391531327128)*x[2]
-        arg[5,0,1]=(0.836239801824)*x[0]**o+(-0.72288085675)*x[0]+(0.177981042887)*x[1]**o+(0.354505260098)*x[1]+(-0.180520504267)*x[2]**o+(-0.380306239974)*x[2]
-        arg[5,1,0]=(-0.65536853024)*x[0]**o+(-0.00573854242476)*x[0]+(-0.261460514314)*x[1]**o+(-0.289771405693)*x[1]+(0.750775397523)*x[2]**o+(-0.333215608562)*x[2]
-        arg[5,1,1]=(-0.579532884024)*x[0]**o+(-0.208677373724)*x[0]+(-0.379612024024)*x[1]**o+(-0.0565813995114)*x[1]+(-0.867913562592)*x[2]**o+(-0.254654298293)*x[2]
-        ref[0,0,0]=(0.287534645778)*x_ref[0]**o+(0.94865229379)*x_ref[0]+(0.655299232864)*x_ref[1]**o+(0.350034924637)*x_ref[1]+(0.556341391183)*x_ref[2]**o+(0.840643265765)*x_ref[2]
-        ref[0,0,1]=(-0.207213781549)*x_ref[0]**o+(-0.0394497047797)*x_ref[0]+(-0.0236016308575)*x_ref[1]**o+(0.344122299199)*x_ref[1]+(0.389588325996)*x_ref[2]**o+(0.941980468657)*x_ref[2]
-        ref[0,1,0]=(0.00980412235862)*x_ref[0]**o+(0.74862549447)*x_ref[0]+(0.630165284383)*x_ref[1]**o+(0.234711268989)*x_ref[1]+(-0.22509981272)*x_ref[2]**o+(-0.0153888168649)*x_ref[2]
-        ref[0,1,1]=(-0.87309186262)*x_ref[0]**o+(0.833526923917)*x_ref[0]+(0.78785479415)*x_ref[1]**o+(0.823967259171)*x_ref[1]+(0.320244316109)*x_ref[2]**o+(-0.735225854417)*x_ref[2]
-        ref[1,0,0]=(-0.0892232551051)*x_ref[0]**o+(-0.346728833563)*x_ref[0]+(0.422774634671)*x_ref[1]**o+(0.793222381957)*x_ref[1]+(-0.670476677006)*x_ref[2]**o+(0.896884540116)*x_ref[2]
-        ref[1,0,1]=(-0.0023382136345)*x_ref[0]**o+(0.73058281545)*x_ref[0]+(0.11828880374)*x_ref[1]**o+(-0.691839091619)*x_ref[1]+(-0.39086463392)*x_ref[2]**o+(0.66200209782)*x_ref[2]
-        ref[1,1,0]=(-0.924238055558)*x_ref[0]**o+(-0.334208271705)*x_ref[0]+(-0.57106045555)*x_ref[1]**o+(-0.765650999193)*x_ref[1]+(0.0404533468054)*x_ref[2]**o+(-0.225975260777)*x_ref[2]
-        ref[1,1,1]=(-0.351110999108)*x_ref[0]**o+(0.626166346251)*x_ref[0]+(0.385737198467)*x_ref[1]**o+(0.577561466908)*x_ref[1]+(0.708325217242)*x_ref[2]**o+(0.193727923904)*x_ref[2]
-        ref[2,0,0]=(0.278942080997)*x_ref[0]**o+(-0.569761653572)*x_ref[0]+(-0.624879270918)*x_ref[1]**o+(-0.0151754112896)*x_ref[1]+(0.411399083825)*x_ref[2]**o+(-0.846669568641)*x_ref[2]
-        ref[2,0,1]=(-0.543586963879)*x_ref[0]**o+(-0.383959956625)*x_ref[0]+(0.184375944938)*x_ref[1]**o+(-0.104178233562)*x_ref[1]+(-0.223101894662)*x_ref[2]**o+(-0.17221835595)*x_ref[2]
-        ref[2,1,0]=(0.317103921207)*x_ref[0]**o+(-0.919542461354)*x_ref[0]+(0.56666554454)*x_ref[1]**o+(0.895772298847)*x_ref[1]+(0.714550707822)*x_ref[2]**o+(0.634702089556)*x_ref[2]
-        ref[2,1,1]=(0.986576254164)*x_ref[0]**o+(0.544493787633)*x_ref[0]+(0.964620027203)*x_ref[1]**o+(0.259991384678)*x_ref[1]+(-0.577361835739)*x_ref[2]**o+(0.651593456822)*x_ref[2]
-        ref[3,0,0]=(0.362841472614)*x_ref[0]**o+(-0.521771228041)*x_ref[0]+(-0.594530755517)*x_ref[1]**o+(0.700647681241)*x_ref[1]+(-0.131683781311)*x_ref[2]**o+(0.636310189834)*x_ref[2]
-        ref[3,0,1]=(0.885891862321)*x_ref[0]**o+(0.397438320764)*x_ref[0]+(0.711380452937)*x_ref[1]**o+(0.962571325144)*x_ref[1]+(-0.300114113339)*x_ref[2]**o+(0.34700388868)*x_ref[2]
-        ref[3,1,0]=(0.52140726408)*x_ref[0]**o+(-0.0921295295522)*x_ref[0]+(-0.823076091446)*x_ref[1]**o+(0.477401876125)*x_ref[1]+(-0.973057905067)*x_ref[2]**o+(-0.975526794128)*x_ref[2]
-        ref[3,1,1]=(-0.241503887113)*x_ref[0]**o+(0.133988088285)*x_ref[0]+(0.243026393121)*x_ref[1]**o+(0.0848716779473)*x_ref[1]+(0.140349614791)*x_ref[2]**o+(-0.217182025695)*x_ref[2]
-        ref[4,0,0]=(0.680080194053)*x_ref[0]**o+(0.512009633844)*x_ref[0]+(-0.640214066363)*x_ref[1]**o+(0.571800633214)*x_ref[1]+(-0.749395617545)*x_ref[2]**o+(0.448487668786)*x_ref[2]
-        ref[4,0,1]=(-0.792959916349)*x_ref[0]**o+(-0.433770516776)*x_ref[0]+(-0.380980758215)*x_ref[1]**o+(-0.831154769101)*x_ref[1]+(0.277551460651)*x_ref[2]**o+(0.626476984233)*x_ref[2]
-        ref[4,1,0]=(-0.285102566546)*x_ref[0]**o+(0.745636275253)*x_ref[0]+(0.4999427836)*x_ref[1]**o+(0.561343302884)*x_ref[1]+(0.796220302361)*x_ref[2]**o+(-0.830020520143)*x_ref[2]
-        ref[4,1,1]=(0.237420507314)*x_ref[0]**o+(0.327181858092)*x_ref[0]+(-0.895743235593)*x_ref[1]**o+(-0.496964477443)*x_ref[1]+(0.57336428204)*x_ref[2]**o+(-0.154267071287)*x_ref[2]
-        ref[5,0,0]=(0.0401925997607)*x_ref[0]**o+(-0.0155957424748)*x_ref[0]+(-0.658363451239)*x_ref[1]**o+(-0.175223211879)*x_ref[1]+(-0.743729768327)*x_ref[2]**o+(0.391531327128)*x_ref[2]
-        ref[5,0,1]=(0.836239801824)*x_ref[0]**o+(-0.72288085675)*x_ref[0]+(0.177981042887)*x_ref[1]**o+(0.354505260098)*x_ref[1]+(-0.180520504267)*x_ref[2]**o+(-0.380306239974)*x_ref[2]
-        ref[5,1,0]=(-0.65536853024)*x_ref[0]**o+(-0.00573854242476)*x_ref[0]+(-0.261460514314)*x_ref[1]**o+(-0.289771405693)*x_ref[1]+(0.750775397523)*x_ref[2]**o+(-0.333215608562)*x_ref[2]
-        ref[5,1,1]=(-0.579532884024)*x_ref[0]**o+(-0.208677373724)*x_ref[0]+(-0.379612024024)*x_ref[1]**o+(-0.0565813995114)*x_ref[1]+(-0.867913562592)*x_ref[2]**o+(-0.254654298293)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.274472293956)*x[0]**o+(-0.293347130929)*x[0]+(0.392586448254)*x[1]**o+(-0.403066854054)*x[1]
-        arg[0,0,0,1]=(0.385933192907)*x[0]**o+(0.484240065867)*x[0]+(0.144565631551)*x[1]**o+(0.882508492739)*x[1]
-        arg[0,0,1,0]=(0.993368905137)*x[0]**o+(0.340349919343)*x[0]+(-0.956806746524)*x[1]**o+(0.990607958001)*x[1]
-        arg[0,0,1,1]=(-0.88610250102)*x[0]**o+(-0.543705587259)*x[0]+(0.170798164924)*x[1]**o+(0.685331195754)*x[1]
-        arg[0,0,2,0]=(-0.922211611143)*x[0]**o+(-0.103640037893)*x[0]+(0.401354703434)*x[1]**o+(-0.117826261635)*x[1]
-        arg[0,0,2,1]=(-0.391601387132)*x[0]**o+(-0.472753344804)*x[0]+(-0.473433838993)*x[1]**o+(-0.173501635989)*x[1]
-        arg[0,1,0,0]=(0.747353274916)*x[0]**o+(-0.960856612086)*x[0]+(-0.54809012978)*x[1]**o+(0.862023893332)*x[1]
-        arg[0,1,0,1]=(-0.256359001149)*x[0]**o+(-0.868975044191)*x[0]+(0.494314269744)*x[1]**o+(0.949957481172)*x[1]
-        arg[0,1,1,0]=(-0.0256658750601)*x[0]**o+(0.145499104203)*x[0]+(-0.68669791629)*x[1]**o+(0.447326207295)*x[1]
-        arg[0,1,1,1]=(0.150617284467)*x[0]**o+(-0.350046088196)*x[0]+(-0.367671302053)*x[1]**o+(0.633220122068)*x[1]
-        arg[0,1,2,0]=(-0.714145362271)*x[0]**o+(-0.957661490758)*x[0]+(0.386253770747)*x[1]**o+(0.982634262634)*x[1]
-        arg[0,1,2,1]=(0.707565096824)*x[0]**o+(0.281758058573)*x[0]+(-0.407791315587)*x[1]**o+(0.86069036983)*x[1]
-        arg[0,2,0,0]=(-0.453860220598)*x[0]**o+(0.944457388061)*x[0]+(-0.903818960162)*x[1]**o+(-0.799423205297)*x[1]
-        arg[0,2,0,1]=(-0.621257500941)*x[0]**o+(0.748963737937)*x[0]+(-0.12660934458)*x[1]**o+(-0.362830639592)*x[1]
-        arg[0,2,1,0]=(-0.702485820037)*x[0]**o+(0.355584898593)*x[0]+(0.657127357751)*x[1]**o+(0.535533390762)*x[1]
-        arg[0,2,1,1]=(0.795733125008)*x[0]**o+(0.983607327249)*x[0]+(-0.463818780644)*x[1]**o+(-0.681831588244)*x[1]
-        arg[0,2,2,0]=(0.335783204138)*x[0]**o+(-0.712225782679)*x[0]+(0.853426644096)*x[1]**o+(-0.143845263686)*x[1]
-        arg[0,2,2,1]=(0.389724375144)*x[0]**o+(0.715176227705)*x[0]+(-0.660690893888)*x[1]**o+(0.428289724709)*x[1]
-        arg[0,3,0,0]=(-0.363836203724)*x[0]**o+(-0.257775427457)*x[0]+(0.407904889098)*x[1]**o+(-0.731273814284)*x[1]
-        arg[0,3,0,1]=(0.402038262494)*x[0]**o+(0.33289103638)*x[0]+(0.444957562329)*x[1]**o+(0.0657971935664)*x[1]
-        arg[0,3,1,0]=(0.979673814602)*x[0]**o+(-0.133405332848)*x[0]+(0.23884689304)*x[1]**o+(0.728464997681)*x[1]
-        arg[0,3,1,1]=(0.724603429246)*x[0]**o+(-0.391040898144)*x[0]+(-0.966816499003)*x[1]**o+(0.0984302578905)*x[1]
-        arg[0,3,2,0]=(-0.986139645754)*x[0]**o+(0.60807351165)*x[0]+(0.799807413231)*x[1]**o+(0.12091479711)*x[1]
-        arg[0,3,2,1]=(0.387453999377)*x[0]**o+(0.212725006628)*x[0]+(-0.120374039139)*x[1]**o+(-0.262304757951)*x[1]
-        arg[0,4,0,0]=(-0.260545986276)*x[0]**o+(0.251085312932)*x[0]+(0.738082708518)*x[1]**o+(-0.0804883797938)*x[1]
-        arg[0,4,0,1]=(-0.190701356138)*x[0]**o+(-0.0205295935522)*x[0]+(0.904261681819)*x[1]**o+(-0.859647709957)*x[1]
-        arg[0,4,1,0]=(-0.945357492849)*x[0]**o+(-0.85298463389)*x[0]+(0.688964336673)*x[1]**o+(-0.672881696932)*x[1]
-        arg[0,4,1,1]=(0.877720258045)*x[0]**o+(-0.361228026805)*x[0]+(-0.326626527006)*x[1]**o+(-0.274100421232)*x[1]
-        arg[0,4,2,0]=(0.202358729084)*x[0]**o+(-0.997571481837)*x[0]+(0.431193711862)*x[1]**o+(0.513561123915)*x[1]
-        arg[0,4,2,1]=(-0.136602954592)*x[0]**o+(-0.40864934437)*x[0]+(0.675945574351)*x[1]**o+(0.728757793536)*x[1]
-        arg[1,0,0,0]=(0.835464261851)*x[0]**o+(-0.131447020601)*x[0]+(0.0810352521446)*x[1]**o+(0.664744750899)*x[1]
-        arg[1,0,0,1]=(0.239716928689)*x[0]**o+(-0.192258999531)*x[0]+(0.615877054036)*x[1]**o+(0.835274774437)*x[1]
-        arg[1,0,1,0]=(0.509342803767)*x[0]**o+(-0.633944481882)*x[0]+(0.262098006086)*x[1]**o+(0.159902070799)*x[1]
-        arg[1,0,1,1]=(0.894432440588)*x[0]**o+(-0.167778431319)*x[0]+(-0.984183148477)*x[1]**o+(-0.554981658632)*x[1]
-        arg[1,0,2,0]=(-0.762472607231)*x[0]**o+(0.405550139256)*x[0]+(0.4051290641)*x[1]**o+(-0.27180186672)*x[1]
-        arg[1,0,2,1]=(0.663869273816)*x[0]**o+(0.867453974628)*x[0]+(-0.279659969132)*x[1]**o+(-0.370539101204)*x[1]
-        arg[1,1,0,0]=(-0.969326778164)*x[0]**o+(0.965471349497)*x[0]+(-0.529983232946)*x[1]**o+(0.714091610977)*x[1]
-        arg[1,1,0,1]=(-0.840360667093)*x[0]**o+(-0.399319808256)*x[0]+(0.568769915582)*x[1]**o+(0.872427494442)*x[1]
-        arg[1,1,1,0]=(0.46099116941)*x[0]**o+(-0.986008874142)*x[0]+(-0.53999023556)*x[1]**o+(-0.549695567855)*x[1]
-        arg[1,1,1,1]=(0.485944918559)*x[0]**o+(0.189773828651)*x[0]+(-0.611654980493)*x[1]**o+(-0.337071911657)*x[1]
-        arg[1,1,2,0]=(0.191663603248)*x[0]**o+(0.0906374965004)*x[0]+(-0.271051598251)*x[1]**o+(0.880507788825)*x[1]
-        arg[1,1,2,1]=(-0.439514997001)*x[0]**o+(0.701230426224)*x[0]+(-0.193231641029)*x[1]**o+(0.950584054332)*x[1]
-        arg[1,2,0,0]=(0.439456565259)*x[0]**o+(-0.25664171484)*x[0]+(-0.653059819329)*x[1]**o+(-0.680544747777)*x[1]
-        arg[1,2,0,1]=(0.34890454443)*x[0]**o+(-0.69851200963)*x[0]+(-0.00159381688549)*x[1]**o+(-0.612359675499)*x[1]
-        arg[1,2,1,0]=(0.132759671375)*x[0]**o+(-0.235126716401)*x[0]+(0.652068885826)*x[1]**o+(0.749698645371)*x[1]
-        arg[1,2,1,1]=(0.934980403627)*x[0]**o+(0.321409273437)*x[0]+(-0.605909929553)*x[1]**o+(0.135554927418)*x[1]
-        arg[1,2,2,0]=(-0.68327709329)*x[0]**o+(-0.0381292756005)*x[0]+(0.710953191114)*x[1]**o+(-0.344522256689)*x[1]
-        arg[1,2,2,1]=(-0.813976235652)*x[0]**o+(0.613879708123)*x[0]+(0.451599277293)*x[1]**o+(-0.6134026375)*x[1]
-        arg[1,3,0,0]=(0.595310128627)*x[0]**o+(-0.247621573131)*x[0]+(0.165607783104)*x[1]**o+(0.578132180805)*x[1]
-        arg[1,3,0,1]=(0.848827238882)*x[0]**o+(0.173154067999)*x[0]+(0.340662419437)*x[1]**o+(-0.389656447251)*x[1]
-        arg[1,3,1,0]=(0.250888415228)*x[0]**o+(-0.278203136198)*x[0]+(-0.693211186734)*x[1]**o+(0.613812194735)*x[1]
-        arg[1,3,1,1]=(0.634533003162)*x[0]**o+(-0.0924665762471)*x[0]+(0.749575894384)*x[1]**o+(-0.737205017415)*x[1]
-        arg[1,3,2,0]=(0.607750966973)*x[0]**o+(0.905016928404)*x[0]+(-0.171049542163)*x[1]**o+(-0.20526244601)*x[1]
-        arg[1,3,2,1]=(0.723946025405)*x[0]**o+(0.0157576743987)*x[0]+(0.190875428312)*x[1]**o+(0.407925899509)*x[1]
-        arg[1,4,0,0]=(-0.561582695803)*x[0]**o+(-0.350262461371)*x[0]+(0.57610409872)*x[1]**o+(0.881780963877)*x[1]
-        arg[1,4,0,1]=(0.077066498695)*x[0]**o+(0.515597802516)*x[0]+(0.332011413016)*x[1]**o+(0.215491334787)*x[1]
-        arg[1,4,1,0]=(0.33858727737)*x[0]**o+(-0.573231800768)*x[0]+(-0.559915809132)*x[1]**o+(0.0240869142176)*x[1]
-        arg[1,4,1,1]=(-0.684581727952)*x[0]**o+(0.365541904201)*x[0]+(0.204252397376)*x[1]**o+(0.149300766054)*x[1]
-        arg[1,4,2,0]=(-0.574225088383)*x[0]**o+(0.0286339776067)*x[0]+(-0.358732122607)*x[1]**o+(-0.416932738957)*x[1]
-        arg[1,4,2,1]=(-0.308460184932)*x[0]**o+(0.389214987836)*x[0]+(-0.358303257031)*x[1]**o+(0.348109483688)*x[1]
-        arg[2,0,0,0]=(-0.811318668804)*x[0]**o+(-0.298028116982)*x[0]+(0.679871523483)*x[1]**o+(0.958042925287)*x[1]
-        arg[2,0,0,1]=(-0.616521818338)*x[0]**o+(-0.0817124854496)*x[0]+(0.403257366893)*x[1]**o+(0.740689710435)*x[1]
-        arg[2,0,1,0]=(0.271046179127)*x[0]**o+(0.814928093947)*x[0]+(0.423722781579)*x[1]**o+(0.925333209811)*x[1]
-        arg[2,0,1,1]=(0.0596651806816)*x[0]**o+(0.493854605359)*x[0]+(0.539998537439)*x[1]**o+(-0.910865639375)*x[1]
-        arg[2,0,2,0]=(0.503267602327)*x[0]**o+(-0.270966471743)*x[0]+(-0.342063366676)*x[1]**o+(-0.975700224705)*x[1]
-        arg[2,0,2,1]=(-0.0362358939195)*x[0]**o+(-0.766033869339)*x[0]+(0.891365100088)*x[1]**o+(0.815025898929)*x[1]
-        arg[2,1,0,0]=(-0.667240459984)*x[0]**o+(0.8659076701)*x[0]+(0.215089397562)*x[1]**o+(0.464769182307)*x[1]
-        arg[2,1,0,1]=(-0.298625221931)*x[0]**o+(-0.504329743472)*x[0]+(0.412472510208)*x[1]**o+(0.241693152889)*x[1]
-        arg[2,1,1,0]=(-0.670730179133)*x[0]**o+(0.0201070113832)*x[0]+(-0.572725898919)*x[1]**o+(0.665609259014)*x[1]
-        arg[2,1,1,1]=(-0.319080984089)*x[0]**o+(0.0299423045224)*x[0]+(0.0152311810613)*x[1]**o+(-0.784646189026)*x[1]
-        arg[2,1,2,0]=(0.153308789716)*x[0]**o+(0.725808150613)*x[0]+(0.62876493338)*x[1]**o+(0.80275284252)*x[1]
-        arg[2,1,2,1]=(0.804698870013)*x[0]**o+(-0.631078773061)*x[0]+(-0.015221975698)*x[1]**o+(-0.954169686746)*x[1]
-        arg[2,2,0,0]=(0.169022797498)*x[0]**o+(0.733025791099)*x[0]+(0.321554996633)*x[1]**o+(0.292173365364)*x[1]
-        arg[2,2,0,1]=(0.327345955109)*x[0]**o+(0.21757823896)*x[0]+(0.873027160446)*x[1]**o+(-0.250192861579)*x[1]
-        arg[2,2,1,0]=(0.394387190832)*x[0]**o+(-0.613661883482)*x[0]+(0.806965291386)*x[1]**o+(0.244513244016)*x[1]
-        arg[2,2,1,1]=(0.043913907536)*x[0]**o+(-0.303567806424)*x[0]+(0.547037093323)*x[1]**o+(-0.598687385328)*x[1]
-        arg[2,2,2,0]=(0.875663154787)*x[0]**o+(-0.34984832772)*x[0]+(0.879143174396)*x[1]**o+(-0.193154051109)*x[1]
-        arg[2,2,2,1]=(0.940311132918)*x[0]**o+(-0.358708743382)*x[0]+(0.117370945146)*x[1]**o+(-0.664208034757)*x[1]
-        arg[2,3,0,0]=(0.0334525660588)*x[0]**o+(0.592805915255)*x[0]+(-0.278216157971)*x[1]**o+(0.894369967671)*x[1]
-        arg[2,3,0,1]=(-0.966591106326)*x[0]**o+(-0.882160390768)*x[0]+(0.843982702732)*x[1]**o+(0.363868921656)*x[1]
-        arg[2,3,1,0]=(-0.246392342771)*x[0]**o+(-0.934459096242)*x[0]+(-0.472771368537)*x[1]**o+(0.148854304706)*x[1]
-        arg[2,3,1,1]=(0.248218424051)*x[0]**o+(0.0980396576111)*x[0]+(0.413322166489)*x[1]**o+(0.429747261346)*x[1]
-        arg[2,3,2,0]=(0.742987565733)*x[0]**o+(-0.213736450136)*x[0]+(0.996975741314)*x[1]**o+(0.960709958665)*x[1]
-        arg[2,3,2,1]=(0.436149490977)*x[0]**o+(0.87632181197)*x[0]+(-0.881934669912)*x[1]**o+(-0.457520504175)*x[1]
-        arg[2,4,0,0]=(-0.519014330693)*x[0]**o+(0.938619608407)*x[0]+(-0.847954563609)*x[1]**o+(0.791774379621)*x[1]
-        arg[2,4,0,1]=(-0.599487299453)*x[0]**o+(0.977867555132)*x[0]+(0.693105630579)*x[1]**o+(-0.688827812942)*x[1]
-        arg[2,4,1,0]=(0.955907964163)*x[0]**o+(0.0724056986172)*x[0]+(0.254773619772)*x[1]**o+(0.0428861146964)*x[1]
-        arg[2,4,1,1]=(-0.422202101998)*x[0]**o+(0.803263223544)*x[0]+(0.456048140785)*x[1]**o+(0.0419133126183)*x[1]
-        arg[2,4,2,0]=(-0.182308704781)*x[0]**o+(0.862282443488)*x[0]+(-0.844027007955)*x[1]**o+(0.586220526376)*x[1]
-        arg[2,4,2,1]=(-0.801542666229)*x[0]**o+(0.903685299455)*x[0]+(0.428926544377)*x[1]**o+(-0.891220471549)*x[1]
-        arg[3,0,0,0]=(0.602917787713)*x[0]**o+(-0.592239549743)*x[0]+(0.761830006718)*x[1]**o+(-0.784264167777)*x[1]
-        arg[3,0,0,1]=(0.819962957732)*x[0]**o+(-0.455126790372)*x[0]+(-0.144898728525)*x[1]**o+(0.121566345339)*x[1]
-        arg[3,0,1,0]=(0.570694941559)*x[0]**o+(-0.505678656386)*x[0]+(0.295536587355)*x[1]**o+(-0.852779737814)*x[1]
-        arg[3,0,1,1]=(-0.226246858753)*x[0]**o+(-0.513900306228)*x[0]+(-0.389483591407)*x[1]**o+(-0.735105335539)*x[1]
-        arg[3,0,2,0]=(0.941877610938)*x[0]**o+(0.93808330298)*x[0]+(0.189785162182)*x[1]**o+(0.546525366304)*x[1]
-        arg[3,0,2,1]=(0.10639100485)*x[0]**o+(-0.773361007972)*x[0]+(-0.470531427579)*x[1]**o+(0.467359342808)*x[1]
-        arg[3,1,0,0]=(0.857725599589)*x[0]**o+(0.0881746413132)*x[0]+(0.040713151152)*x[1]**o+(-0.52070729883)*x[1]
-        arg[3,1,0,1]=(0.266807652146)*x[0]**o+(0.337496673892)*x[0]+(-0.562266297445)*x[1]**o+(0.326015195113)*x[1]
-        arg[3,1,1,0]=(0.177275509465)*x[0]**o+(-0.647855761301)*x[0]+(-0.0963373631995)*x[1]**o+(-0.535256252994)*x[1]
-        arg[3,1,1,1]=(0.430309295606)*x[0]**o+(-0.0894749557428)*x[0]+(0.503470724483)*x[1]**o+(-0.202361122248)*x[1]
-        arg[3,1,2,0]=(0.283995014194)*x[0]**o+(-0.544419907194)*x[0]+(0.78478571712)*x[1]**o+(0.341540664147)*x[1]
-        arg[3,1,2,1]=(-0.281042869936)*x[0]**o+(0.728771766492)*x[0]+(-0.298974388557)*x[1]**o+(-0.836789906985)*x[1]
-        arg[3,2,0,0]=(-0.415323371561)*x[0]**o+(0.583971137371)*x[0]+(-0.265658679489)*x[1]**o+(-0.432447373809)*x[1]
-        arg[3,2,0,1]=(0.690486298855)*x[0]**o+(0.552521632226)*x[0]+(0.237622739042)*x[1]**o+(-0.254513693924)*x[1]
-        arg[3,2,1,0]=(0.453985687207)*x[0]**o+(-0.785385580962)*x[0]+(0.0190987841634)*x[1]**o+(-0.7923288861)*x[1]
-        arg[3,2,1,1]=(-0.964082656379)*x[0]**o+(-0.806315937371)*x[0]+(0.271145420366)*x[1]**o+(-0.839014535945)*x[1]
-        arg[3,2,2,0]=(-0.372062773997)*x[0]**o+(-0.069749560567)*x[0]+(-0.126310395383)*x[1]**o+(0.972025865285)*x[1]
-        arg[3,2,2,1]=(-0.580353020086)*x[0]**o+(-0.152746821477)*x[0]+(0.297553660535)*x[1]**o+(0.444791568145)*x[1]
-        arg[3,3,0,0]=(-0.361520029439)*x[0]**o+(-0.810391070499)*x[0]+(0.462123882642)*x[1]**o+(-0.974534227742)*x[1]
-        arg[3,3,0,1]=(0.113370617837)*x[0]**o+(0.428257355435)*x[0]+(-0.18656623758)*x[1]**o+(0.206503327394)*x[1]
-        arg[3,3,1,0]=(0.341328445689)*x[0]**o+(0.34002947054)*x[0]+(0.997677286362)*x[1]**o+(0.43300073225)*x[1]
-        arg[3,3,1,1]=(-0.513912982823)*x[0]**o+(0.826573827064)*x[0]+(-0.701417864085)*x[1]**o+(0.567078883219)*x[1]
-        arg[3,3,2,0]=(-0.325536866965)*x[0]**o+(0.924405767451)*x[0]+(-0.0481381954346)*x[1]**o+(0.912210617073)*x[1]
-        arg[3,3,2,1]=(0.491532434302)*x[0]**o+(-0.584980848036)*x[0]+(-0.788317530858)*x[1]**o+(-0.900681893172)*x[1]
-        arg[3,4,0,0]=(0.432249855148)*x[0]**o+(-0.673369312552)*x[0]+(0.244704845849)*x[1]**o+(-0.300995595367)*x[1]
-        arg[3,4,0,1]=(0.383037211984)*x[0]**o+(0.299711400488)*x[0]+(0.870584255454)*x[1]**o+(-0.33571823329)*x[1]
-        arg[3,4,1,0]=(0.737134180177)*x[0]**o+(-0.101307090628)*x[0]+(-0.970632061143)*x[1]**o+(-0.449042684137)*x[1]
-        arg[3,4,1,1]=(0.00684250643632)*x[0]**o+(0.676964654022)*x[0]+(0.789069834858)*x[1]**o+(-0.829739508197)*x[1]
-        arg[3,4,2,0]=(0.7279044944)*x[0]**o+(0.215711122038)*x[0]+(0.385631252632)*x[1]**o+(0.629390433529)*x[1]
-        arg[3,4,2,1]=(-0.380750716629)*x[0]**o+(-0.413040692437)*x[0]+(0.26795244639)*x[1]**o+(0.492475504659)*x[1]
-        ref[0,0,0,0]=(-0.274472293956)*x_ref[0]**o+(-0.293347130929)*x_ref[0]+(0.392586448254)*x_ref[1]**o+(-0.403066854054)*x_ref[1]
-        ref[0,0,0,1]=(0.385933192907)*x_ref[0]**o+(0.484240065867)*x_ref[0]+(0.144565631551)*x_ref[1]**o+(0.882508492739)*x_ref[1]
-        ref[0,0,1,0]=(0.993368905137)*x_ref[0]**o+(0.340349919343)*x_ref[0]+(-0.956806746524)*x_ref[1]**o+(0.990607958001)*x_ref[1]
-        ref[0,0,1,1]=(-0.88610250102)*x_ref[0]**o+(-0.543705587259)*x_ref[0]+(0.170798164924)*x_ref[1]**o+(0.685331195754)*x_ref[1]
-        ref[0,0,2,0]=(-0.922211611143)*x_ref[0]**o+(-0.103640037893)*x_ref[0]+(0.401354703434)*x_ref[1]**o+(-0.117826261635)*x_ref[1]
-        ref[0,0,2,1]=(-0.391601387132)*x_ref[0]**o+(-0.472753344804)*x_ref[0]+(-0.473433838993)*x_ref[1]**o+(-0.173501635989)*x_ref[1]
-        ref[0,1,0,0]=(0.747353274916)*x_ref[0]**o+(-0.960856612086)*x_ref[0]+(-0.54809012978)*x_ref[1]**o+(0.862023893332)*x_ref[1]
-        ref[0,1,0,1]=(-0.256359001149)*x_ref[0]**o+(-0.868975044191)*x_ref[0]+(0.494314269744)*x_ref[1]**o+(0.949957481172)*x_ref[1]
-        ref[0,1,1,0]=(-0.0256658750601)*x_ref[0]**o+(0.145499104203)*x_ref[0]+(-0.68669791629)*x_ref[1]**o+(0.447326207295)*x_ref[1]
-        ref[0,1,1,1]=(0.150617284467)*x_ref[0]**o+(-0.350046088196)*x_ref[0]+(-0.367671302053)*x_ref[1]**o+(0.633220122068)*x_ref[1]
-        ref[0,1,2,0]=(-0.714145362271)*x_ref[0]**o+(-0.957661490758)*x_ref[0]+(0.386253770747)*x_ref[1]**o+(0.982634262634)*x_ref[1]
-        ref[0,1,2,1]=(0.707565096824)*x_ref[0]**o+(0.281758058573)*x_ref[0]+(-0.407791315587)*x_ref[1]**o+(0.86069036983)*x_ref[1]
-        ref[0,2,0,0]=(-0.453860220598)*x_ref[0]**o+(0.944457388061)*x_ref[0]+(-0.903818960162)*x_ref[1]**o+(-0.799423205297)*x_ref[1]
-        ref[0,2,0,1]=(-0.621257500941)*x_ref[0]**o+(0.748963737937)*x_ref[0]+(-0.12660934458)*x_ref[1]**o+(-0.362830639592)*x_ref[1]
-        ref[0,2,1,0]=(-0.702485820037)*x_ref[0]**o+(0.355584898593)*x_ref[0]+(0.657127357751)*x_ref[1]**o+(0.535533390762)*x_ref[1]
-        ref[0,2,1,1]=(0.795733125008)*x_ref[0]**o+(0.983607327249)*x_ref[0]+(-0.463818780644)*x_ref[1]**o+(-0.681831588244)*x_ref[1]
-        ref[0,2,2,0]=(0.335783204138)*x_ref[0]**o+(-0.712225782679)*x_ref[0]+(0.853426644096)*x_ref[1]**o+(-0.143845263686)*x_ref[1]
-        ref[0,2,2,1]=(0.389724375144)*x_ref[0]**o+(0.715176227705)*x_ref[0]+(-0.660690893888)*x_ref[1]**o+(0.428289724709)*x_ref[1]
-        ref[0,3,0,0]=(-0.363836203724)*x_ref[0]**o+(-0.257775427457)*x_ref[0]+(0.407904889098)*x_ref[1]**o+(-0.731273814284)*x_ref[1]
-        ref[0,3,0,1]=(0.402038262494)*x_ref[0]**o+(0.33289103638)*x_ref[0]+(0.444957562329)*x_ref[1]**o+(0.0657971935664)*x_ref[1]
-        ref[0,3,1,0]=(0.979673814602)*x_ref[0]**o+(-0.133405332848)*x_ref[0]+(0.23884689304)*x_ref[1]**o+(0.728464997681)*x_ref[1]
-        ref[0,3,1,1]=(0.724603429246)*x_ref[0]**o+(-0.391040898144)*x_ref[0]+(-0.966816499003)*x_ref[1]**o+(0.0984302578905)*x_ref[1]
-        ref[0,3,2,0]=(-0.986139645754)*x_ref[0]**o+(0.60807351165)*x_ref[0]+(0.799807413231)*x_ref[1]**o+(0.12091479711)*x_ref[1]
-        ref[0,3,2,1]=(0.387453999377)*x_ref[0]**o+(0.212725006628)*x_ref[0]+(-0.120374039139)*x_ref[1]**o+(-0.262304757951)*x_ref[1]
-        ref[0,4,0,0]=(-0.260545986276)*x_ref[0]**o+(0.251085312932)*x_ref[0]+(0.738082708518)*x_ref[1]**o+(-0.0804883797938)*x_ref[1]
-        ref[0,4,0,1]=(-0.190701356138)*x_ref[0]**o+(-0.0205295935522)*x_ref[0]+(0.904261681819)*x_ref[1]**o+(-0.859647709957)*x_ref[1]
-        ref[0,4,1,0]=(-0.945357492849)*x_ref[0]**o+(-0.85298463389)*x_ref[0]+(0.688964336673)*x_ref[1]**o+(-0.672881696932)*x_ref[1]
-        ref[0,4,1,1]=(0.877720258045)*x_ref[0]**o+(-0.361228026805)*x_ref[0]+(-0.326626527006)*x_ref[1]**o+(-0.274100421232)*x_ref[1]
-        ref[0,4,2,0]=(0.202358729084)*x_ref[0]**o+(-0.997571481837)*x_ref[0]+(0.431193711862)*x_ref[1]**o+(0.513561123915)*x_ref[1]
-        ref[0,4,2,1]=(-0.136602954592)*x_ref[0]**o+(-0.40864934437)*x_ref[0]+(0.675945574351)*x_ref[1]**o+(0.728757793536)*x_ref[1]
-        ref[1,0,0,0]=(0.835464261851)*x_ref[0]**o+(-0.131447020601)*x_ref[0]+(0.0810352521446)*x_ref[1]**o+(0.664744750899)*x_ref[1]
-        ref[1,0,0,1]=(0.239716928689)*x_ref[0]**o+(-0.192258999531)*x_ref[0]+(0.615877054036)*x_ref[1]**o+(0.835274774437)*x_ref[1]
-        ref[1,0,1,0]=(0.509342803767)*x_ref[0]**o+(-0.633944481882)*x_ref[0]+(0.262098006086)*x_ref[1]**o+(0.159902070799)*x_ref[1]
-        ref[1,0,1,1]=(0.894432440588)*x_ref[0]**o+(-0.167778431319)*x_ref[0]+(-0.984183148477)*x_ref[1]**o+(-0.554981658632)*x_ref[1]
-        ref[1,0,2,0]=(-0.762472607231)*x_ref[0]**o+(0.405550139256)*x_ref[0]+(0.4051290641)*x_ref[1]**o+(-0.27180186672)*x_ref[1]
-        ref[1,0,2,1]=(0.663869273816)*x_ref[0]**o+(0.867453974628)*x_ref[0]+(-0.279659969132)*x_ref[1]**o+(-0.370539101204)*x_ref[1]
-        ref[1,1,0,0]=(-0.969326778164)*x_ref[0]**o+(0.965471349497)*x_ref[0]+(-0.529983232946)*x_ref[1]**o+(0.714091610977)*x_ref[1]
-        ref[1,1,0,1]=(-0.840360667093)*x_ref[0]**o+(-0.399319808256)*x_ref[0]+(0.568769915582)*x_ref[1]**o+(0.872427494442)*x_ref[1]
-        ref[1,1,1,0]=(0.46099116941)*x_ref[0]**o+(-0.986008874142)*x_ref[0]+(-0.53999023556)*x_ref[1]**o+(-0.549695567855)*x_ref[1]
-        ref[1,1,1,1]=(0.485944918559)*x_ref[0]**o+(0.189773828651)*x_ref[0]+(-0.611654980493)*x_ref[1]**o+(-0.337071911657)*x_ref[1]
-        ref[1,1,2,0]=(0.191663603248)*x_ref[0]**o+(0.0906374965004)*x_ref[0]+(-0.271051598251)*x_ref[1]**o+(0.880507788825)*x_ref[1]
-        ref[1,1,2,1]=(-0.439514997001)*x_ref[0]**o+(0.701230426224)*x_ref[0]+(-0.193231641029)*x_ref[1]**o+(0.950584054332)*x_ref[1]
-        ref[1,2,0,0]=(0.439456565259)*x_ref[0]**o+(-0.25664171484)*x_ref[0]+(-0.653059819329)*x_ref[1]**o+(-0.680544747777)*x_ref[1]
-        ref[1,2,0,1]=(0.34890454443)*x_ref[0]**o+(-0.69851200963)*x_ref[0]+(-0.00159381688549)*x_ref[1]**o+(-0.612359675499)*x_ref[1]
-        ref[1,2,1,0]=(0.132759671375)*x_ref[0]**o+(-0.235126716401)*x_ref[0]+(0.652068885826)*x_ref[1]**o+(0.749698645371)*x_ref[1]
-        ref[1,2,1,1]=(0.934980403627)*x_ref[0]**o+(0.321409273437)*x_ref[0]+(-0.605909929553)*x_ref[1]**o+(0.135554927418)*x_ref[1]
-        ref[1,2,2,0]=(-0.68327709329)*x_ref[0]**o+(-0.0381292756005)*x_ref[0]+(0.710953191114)*x_ref[1]**o+(-0.344522256689)*x_ref[1]
-        ref[1,2,2,1]=(-0.813976235652)*x_ref[0]**o+(0.613879708123)*x_ref[0]+(0.451599277293)*x_ref[1]**o+(-0.6134026375)*x_ref[1]
-        ref[1,3,0,0]=(0.595310128627)*x_ref[0]**o+(-0.247621573131)*x_ref[0]+(0.165607783104)*x_ref[1]**o+(0.578132180805)*x_ref[1]
-        ref[1,3,0,1]=(0.848827238882)*x_ref[0]**o+(0.173154067999)*x_ref[0]+(0.340662419437)*x_ref[1]**o+(-0.389656447251)*x_ref[1]
-        ref[1,3,1,0]=(0.250888415228)*x_ref[0]**o+(-0.278203136198)*x_ref[0]+(-0.693211186734)*x_ref[1]**o+(0.613812194735)*x_ref[1]
-        ref[1,3,1,1]=(0.634533003162)*x_ref[0]**o+(-0.0924665762471)*x_ref[0]+(0.749575894384)*x_ref[1]**o+(-0.737205017415)*x_ref[1]
-        ref[1,3,2,0]=(0.607750966973)*x_ref[0]**o+(0.905016928404)*x_ref[0]+(-0.171049542163)*x_ref[1]**o+(-0.20526244601)*x_ref[1]
-        ref[1,3,2,1]=(0.723946025405)*x_ref[0]**o+(0.0157576743987)*x_ref[0]+(0.190875428312)*x_ref[1]**o+(0.407925899509)*x_ref[1]
-        ref[1,4,0,0]=(-0.561582695803)*x_ref[0]**o+(-0.350262461371)*x_ref[0]+(0.57610409872)*x_ref[1]**o+(0.881780963877)*x_ref[1]
-        ref[1,4,0,1]=(0.077066498695)*x_ref[0]**o+(0.515597802516)*x_ref[0]+(0.332011413016)*x_ref[1]**o+(0.215491334787)*x_ref[1]
-        ref[1,4,1,0]=(0.33858727737)*x_ref[0]**o+(-0.573231800768)*x_ref[0]+(-0.559915809132)*x_ref[1]**o+(0.0240869142176)*x_ref[1]
-        ref[1,4,1,1]=(-0.684581727952)*x_ref[0]**o+(0.365541904201)*x_ref[0]+(0.204252397376)*x_ref[1]**o+(0.149300766054)*x_ref[1]
-        ref[1,4,2,0]=(-0.574225088383)*x_ref[0]**o+(0.0286339776067)*x_ref[0]+(-0.358732122607)*x_ref[1]**o+(-0.416932738957)*x_ref[1]
-        ref[1,4,2,1]=(-0.308460184932)*x_ref[0]**o+(0.389214987836)*x_ref[0]+(-0.358303257031)*x_ref[1]**o+(0.348109483688)*x_ref[1]
-        ref[2,0,0,0]=(-0.811318668804)*x_ref[0]**o+(-0.298028116982)*x_ref[0]+(0.679871523483)*x_ref[1]**o+(0.958042925287)*x_ref[1]
-        ref[2,0,0,1]=(-0.616521818338)*x_ref[0]**o+(-0.0817124854496)*x_ref[0]+(0.403257366893)*x_ref[1]**o+(0.740689710435)*x_ref[1]
-        ref[2,0,1,0]=(0.271046179127)*x_ref[0]**o+(0.814928093947)*x_ref[0]+(0.423722781579)*x_ref[1]**o+(0.925333209811)*x_ref[1]
-        ref[2,0,1,1]=(0.0596651806816)*x_ref[0]**o+(0.493854605359)*x_ref[0]+(0.539998537439)*x_ref[1]**o+(-0.910865639375)*x_ref[1]
-        ref[2,0,2,0]=(0.503267602327)*x_ref[0]**o+(-0.270966471743)*x_ref[0]+(-0.342063366676)*x_ref[1]**o+(-0.975700224705)*x_ref[1]
-        ref[2,0,2,1]=(-0.0362358939195)*x_ref[0]**o+(-0.766033869339)*x_ref[0]+(0.891365100088)*x_ref[1]**o+(0.815025898929)*x_ref[1]
-        ref[2,1,0,0]=(-0.667240459984)*x_ref[0]**o+(0.8659076701)*x_ref[0]+(0.215089397562)*x_ref[1]**o+(0.464769182307)*x_ref[1]
-        ref[2,1,0,1]=(-0.298625221931)*x_ref[0]**o+(-0.504329743472)*x_ref[0]+(0.412472510208)*x_ref[1]**o+(0.241693152889)*x_ref[1]
-        ref[2,1,1,0]=(-0.670730179133)*x_ref[0]**o+(0.0201070113832)*x_ref[0]+(-0.572725898919)*x_ref[1]**o+(0.665609259014)*x_ref[1]
-        ref[2,1,1,1]=(-0.319080984089)*x_ref[0]**o+(0.0299423045224)*x_ref[0]+(0.0152311810613)*x_ref[1]**o+(-0.784646189026)*x_ref[1]
-        ref[2,1,2,0]=(0.153308789716)*x_ref[0]**o+(0.725808150613)*x_ref[0]+(0.62876493338)*x_ref[1]**o+(0.80275284252)*x_ref[1]
-        ref[2,1,2,1]=(0.804698870013)*x_ref[0]**o+(-0.631078773061)*x_ref[0]+(-0.015221975698)*x_ref[1]**o+(-0.954169686746)*x_ref[1]
-        ref[2,2,0,0]=(0.169022797498)*x_ref[0]**o+(0.733025791099)*x_ref[0]+(0.321554996633)*x_ref[1]**o+(0.292173365364)*x_ref[1]
-        ref[2,2,0,1]=(0.327345955109)*x_ref[0]**o+(0.21757823896)*x_ref[0]+(0.873027160446)*x_ref[1]**o+(-0.250192861579)*x_ref[1]
-        ref[2,2,1,0]=(0.394387190832)*x_ref[0]**o+(-0.613661883482)*x_ref[0]+(0.806965291386)*x_ref[1]**o+(0.244513244016)*x_ref[1]
-        ref[2,2,1,1]=(0.043913907536)*x_ref[0]**o+(-0.303567806424)*x_ref[0]+(0.547037093323)*x_ref[1]**o+(-0.598687385328)*x_ref[1]
-        ref[2,2,2,0]=(0.875663154787)*x_ref[0]**o+(-0.34984832772)*x_ref[0]+(0.879143174396)*x_ref[1]**o+(-0.193154051109)*x_ref[1]
-        ref[2,2,2,1]=(0.940311132918)*x_ref[0]**o+(-0.358708743382)*x_ref[0]+(0.117370945146)*x_ref[1]**o+(-0.664208034757)*x_ref[1]
-        ref[2,3,0,0]=(0.0334525660588)*x_ref[0]**o+(0.592805915255)*x_ref[0]+(-0.278216157971)*x_ref[1]**o+(0.894369967671)*x_ref[1]
-        ref[2,3,0,1]=(-0.966591106326)*x_ref[0]**o+(-0.882160390768)*x_ref[0]+(0.843982702732)*x_ref[1]**o+(0.363868921656)*x_ref[1]
-        ref[2,3,1,0]=(-0.246392342771)*x_ref[0]**o+(-0.934459096242)*x_ref[0]+(-0.472771368537)*x_ref[1]**o+(0.148854304706)*x_ref[1]
-        ref[2,3,1,1]=(0.248218424051)*x_ref[0]**o+(0.0980396576111)*x_ref[0]+(0.413322166489)*x_ref[1]**o+(0.429747261346)*x_ref[1]
-        ref[2,3,2,0]=(0.742987565733)*x_ref[0]**o+(-0.213736450136)*x_ref[0]+(0.996975741314)*x_ref[1]**o+(0.960709958665)*x_ref[1]
-        ref[2,3,2,1]=(0.436149490977)*x_ref[0]**o+(0.87632181197)*x_ref[0]+(-0.881934669912)*x_ref[1]**o+(-0.457520504175)*x_ref[1]
-        ref[2,4,0,0]=(-0.519014330693)*x_ref[0]**o+(0.938619608407)*x_ref[0]+(-0.847954563609)*x_ref[1]**o+(0.791774379621)*x_ref[1]
-        ref[2,4,0,1]=(-0.599487299453)*x_ref[0]**o+(0.977867555132)*x_ref[0]+(0.693105630579)*x_ref[1]**o+(-0.688827812942)*x_ref[1]
-        ref[2,4,1,0]=(0.955907964163)*x_ref[0]**o+(0.0724056986172)*x_ref[0]+(0.254773619772)*x_ref[1]**o+(0.0428861146964)*x_ref[1]
-        ref[2,4,1,1]=(-0.422202101998)*x_ref[0]**o+(0.803263223544)*x_ref[0]+(0.456048140785)*x_ref[1]**o+(0.0419133126183)*x_ref[1]
-        ref[2,4,2,0]=(-0.182308704781)*x_ref[0]**o+(0.862282443488)*x_ref[0]+(-0.844027007955)*x_ref[1]**o+(0.586220526376)*x_ref[1]
-        ref[2,4,2,1]=(-0.801542666229)*x_ref[0]**o+(0.903685299455)*x_ref[0]+(0.428926544377)*x_ref[1]**o+(-0.891220471549)*x_ref[1]
-        ref[3,0,0,0]=(0.602917787713)*x_ref[0]**o+(-0.592239549743)*x_ref[0]+(0.761830006718)*x_ref[1]**o+(-0.784264167777)*x_ref[1]
-        ref[3,0,0,1]=(0.819962957732)*x_ref[0]**o+(-0.455126790372)*x_ref[0]+(-0.144898728525)*x_ref[1]**o+(0.121566345339)*x_ref[1]
-        ref[3,0,1,0]=(0.570694941559)*x_ref[0]**o+(-0.505678656386)*x_ref[0]+(0.295536587355)*x_ref[1]**o+(-0.852779737814)*x_ref[1]
-        ref[3,0,1,1]=(-0.226246858753)*x_ref[0]**o+(-0.513900306228)*x_ref[0]+(-0.389483591407)*x_ref[1]**o+(-0.735105335539)*x_ref[1]
-        ref[3,0,2,0]=(0.941877610938)*x_ref[0]**o+(0.93808330298)*x_ref[0]+(0.189785162182)*x_ref[1]**o+(0.546525366304)*x_ref[1]
-        ref[3,0,2,1]=(0.10639100485)*x_ref[0]**o+(-0.773361007972)*x_ref[0]+(-0.470531427579)*x_ref[1]**o+(0.467359342808)*x_ref[1]
-        ref[3,1,0,0]=(0.857725599589)*x_ref[0]**o+(0.0881746413132)*x_ref[0]+(0.040713151152)*x_ref[1]**o+(-0.52070729883)*x_ref[1]
-        ref[3,1,0,1]=(0.266807652146)*x_ref[0]**o+(0.337496673892)*x_ref[0]+(-0.562266297445)*x_ref[1]**o+(0.326015195113)*x_ref[1]
-        ref[3,1,1,0]=(0.177275509465)*x_ref[0]**o+(-0.647855761301)*x_ref[0]+(-0.0963373631995)*x_ref[1]**o+(-0.535256252994)*x_ref[1]
-        ref[3,1,1,1]=(0.430309295606)*x_ref[0]**o+(-0.0894749557428)*x_ref[0]+(0.503470724483)*x_ref[1]**o+(-0.202361122248)*x_ref[1]
-        ref[3,1,2,0]=(0.283995014194)*x_ref[0]**o+(-0.544419907194)*x_ref[0]+(0.78478571712)*x_ref[1]**o+(0.341540664147)*x_ref[1]
-        ref[3,1,2,1]=(-0.281042869936)*x_ref[0]**o+(0.728771766492)*x_ref[0]+(-0.298974388557)*x_ref[1]**o+(-0.836789906985)*x_ref[1]
-        ref[3,2,0,0]=(-0.415323371561)*x_ref[0]**o+(0.583971137371)*x_ref[0]+(-0.265658679489)*x_ref[1]**o+(-0.432447373809)*x_ref[1]
-        ref[3,2,0,1]=(0.690486298855)*x_ref[0]**o+(0.552521632226)*x_ref[0]+(0.237622739042)*x_ref[1]**o+(-0.254513693924)*x_ref[1]
-        ref[3,2,1,0]=(0.453985687207)*x_ref[0]**o+(-0.785385580962)*x_ref[0]+(0.0190987841634)*x_ref[1]**o+(-0.7923288861)*x_ref[1]
-        ref[3,2,1,1]=(-0.964082656379)*x_ref[0]**o+(-0.806315937371)*x_ref[0]+(0.271145420366)*x_ref[1]**o+(-0.839014535945)*x_ref[1]
-        ref[3,2,2,0]=(-0.372062773997)*x_ref[0]**o+(-0.069749560567)*x_ref[0]+(-0.126310395383)*x_ref[1]**o+(0.972025865285)*x_ref[1]
-        ref[3,2,2,1]=(-0.580353020086)*x_ref[0]**o+(-0.152746821477)*x_ref[0]+(0.297553660535)*x_ref[1]**o+(0.444791568145)*x_ref[1]
-        ref[3,3,0,0]=(-0.361520029439)*x_ref[0]**o+(-0.810391070499)*x_ref[0]+(0.462123882642)*x_ref[1]**o+(-0.974534227742)*x_ref[1]
-        ref[3,3,0,1]=(0.113370617837)*x_ref[0]**o+(0.428257355435)*x_ref[0]+(-0.18656623758)*x_ref[1]**o+(0.206503327394)*x_ref[1]
-        ref[3,3,1,0]=(0.341328445689)*x_ref[0]**o+(0.34002947054)*x_ref[0]+(0.997677286362)*x_ref[1]**o+(0.43300073225)*x_ref[1]
-        ref[3,3,1,1]=(-0.513912982823)*x_ref[0]**o+(0.826573827064)*x_ref[0]+(-0.701417864085)*x_ref[1]**o+(0.567078883219)*x_ref[1]
-        ref[3,3,2,0]=(-0.325536866965)*x_ref[0]**o+(0.924405767451)*x_ref[0]+(-0.0481381954346)*x_ref[1]**o+(0.912210617073)*x_ref[1]
-        ref[3,3,2,1]=(0.491532434302)*x_ref[0]**o+(-0.584980848036)*x_ref[0]+(-0.788317530858)*x_ref[1]**o+(-0.900681893172)*x_ref[1]
-        ref[3,4,0,0]=(0.432249855148)*x_ref[0]**o+(-0.673369312552)*x_ref[0]+(0.244704845849)*x_ref[1]**o+(-0.300995595367)*x_ref[1]
-        ref[3,4,0,1]=(0.383037211984)*x_ref[0]**o+(0.299711400488)*x_ref[0]+(0.870584255454)*x_ref[1]**o+(-0.33571823329)*x_ref[1]
-        ref[3,4,1,0]=(0.737134180177)*x_ref[0]**o+(-0.101307090628)*x_ref[0]+(-0.970632061143)*x_ref[1]**o+(-0.449042684137)*x_ref[1]
-        ref[3,4,1,1]=(0.00684250643632)*x_ref[0]**o+(0.676964654022)*x_ref[0]+(0.789069834858)*x_ref[1]**o+(-0.829739508197)*x_ref[1]
-        ref[3,4,2,0]=(0.7279044944)*x_ref[0]**o+(0.215711122038)*x_ref[0]+(0.385631252632)*x_ref[1]**o+(0.629390433529)*x_ref[1]
-        ref[3,4,2,1]=(-0.380750716629)*x_ref[0]**o+(-0.413040692437)*x_ref[0]+(0.26795244639)*x_ref[1]**o+(0.492475504659)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.287160004495)*x[0]**o+(0.35112250158)*x[0]+(0.061693427026)*x[1]**o+(-0.752505628029)*x[1]+(-0.57137756028)*x[2]**o+(-0.0397598892504)*x[2]
-        arg[0,0,0,1]=(0.272799584607)*x[0]**o+(-0.569947956933)*x[0]+(0.322189261657)*x[1]**o+(-0.440552272224)*x[1]+(-0.10460241481)*x[2]**o+(-0.884848984752)*x[2]
-        arg[0,0,1,0]=(0.147766301604)*x[0]**o+(0.405651654428)*x[0]+(-0.440827209529)*x[1]**o+(-0.399952864271)*x[1]+(-0.770191009459)*x[2]**o+(-0.789853968049)*x[2]
-        arg[0,0,1,1]=(0.688053165375)*x[0]**o+(-0.154890421924)*x[0]+(0.583684164319)*x[1]**o+(-0.398082068217)*x[1]+(-0.573142923099)*x[2]**o+(-0.205271877337)*x[2]
-        arg[0,0,2,0]=(0.807043275877)*x[0]**o+(0.843046383231)*x[0]+(-0.588146471402)*x[1]**o+(0.157787304557)*x[1]+(-0.771009748568)*x[2]**o+(0.162090791609)*x[2]
-        arg[0,0,2,1]=(-0.0706800489392)*x[0]**o+(0.499961344665)*x[0]+(0.208926178797)*x[1]**o+(-0.7462472769)*x[1]+(-0.105475405648)*x[2]**o+(-0.18670229948)*x[2]
-        arg[0,1,0,0]=(-0.696657281943)*x[0]**o+(-0.0251785345759)*x[0]+(-0.579575530451)*x[1]**o+(-0.0628378665725)*x[1]+(0.668395441302)*x[2]**o+(0.813478105092)*x[2]
-        arg[0,1,0,1]=(-0.574784314876)*x[0]**o+(-0.321268045204)*x[0]+(0.160704464213)*x[1]**o+(-0.676016748103)*x[1]+(0.918971102865)*x[2]**o+(0.252082410081)*x[2]
-        arg[0,1,1,0]=(-0.905062846817)*x[0]**o+(0.788906658477)*x[0]+(-0.408807611936)*x[1]**o+(0.114686186437)*x[1]+(-0.654685568493)*x[2]**o+(0.0879202139254)*x[2]
-        arg[0,1,1,1]=(-0.68020231443)*x[0]**o+(-0.82049202902)*x[0]+(-0.958352740187)*x[1]**o+(-0.33201745802)*x[1]+(0.539810363682)*x[2]**o+(0.744988573087)*x[2]
-        arg[0,1,2,0]=(-0.960884744997)*x[0]**o+(-0.704157132503)*x[0]+(0.282236905414)*x[1]**o+(0.756363456433)*x[1]+(-0.365400101792)*x[2]**o+(0.975735846554)*x[2]
-        arg[0,1,2,1]=(-0.691780076951)*x[0]**o+(-0.952575440059)*x[0]+(-0.921247808098)*x[1]**o+(-0.88872834095)*x[1]+(0.534103013833)*x[2]**o+(-0.602295186104)*x[2]
-        arg[0,2,0,0]=(0.460698415704)*x[0]**o+(0.770243814897)*x[0]+(-0.380381727574)*x[1]**o+(0.476360845668)*x[1]+(-0.681040425102)*x[2]**o+(-0.244369435116)*x[2]
-        arg[0,2,0,1]=(0.251591652281)*x[0]**o+(0.748234919686)*x[0]+(-0.698189037307)*x[1]**o+(-0.292400412508)*x[1]+(0.613850696577)*x[2]**o+(-0.942243226834)*x[2]
-        arg[0,2,1,0]=(-0.718090066328)*x[0]**o+(-0.322499511794)*x[0]+(-0.75105623397)*x[1]**o+(0.526680271832)*x[1]+(-0.186671531793)*x[2]**o+(-0.449273875991)*x[2]
-        arg[0,2,1,1]=(-0.52165552452)*x[0]**o+(0.902446006085)*x[0]+(-0.915575172702)*x[1]**o+(-0.150816194662)*x[1]+(0.596782785689)*x[2]**o+(0.546880865642)*x[2]
-        arg[0,2,2,0]=(-0.104486704816)*x[0]**o+(0.723863699457)*x[0]+(0.758622117279)*x[1]**o+(0.372271580145)*x[1]+(-0.0820570383792)*x[2]**o+(-0.63539781104)*x[2]
-        arg[0,2,2,1]=(0.0355930823603)*x[0]**o+(0.0931942600432)*x[0]+(-0.118096985978)*x[1]**o+(0.296983782212)*x[1]+(-0.864491763712)*x[2]**o+(0.942230663978)*x[2]
-        arg[0,3,0,0]=(0.371153709815)*x[0]**o+(0.0427309083893)*x[0]+(-0.886563919084)*x[1]**o+(-0.14946513404)*x[1]+(0.80903804519)*x[2]**o+(0.69728533073)*x[2]
-        arg[0,3,0,1]=(0.0593930396142)*x[0]**o+(-0.370327974089)*x[0]+(-0.388354464683)*x[1]**o+(-0.367648771812)*x[1]+(-0.573754821458)*x[2]**o+(-0.947499155479)*x[2]
-        arg[0,3,1,0]=(-0.869817317)*x[0]**o+(0.874317772678)*x[0]+(-0.870060178375)*x[1]**o+(0.66571074524)*x[1]+(-0.669052377378)*x[2]**o+(0.940212680575)*x[2]
-        arg[0,3,1,1]=(-0.417445606772)*x[0]**o+(0.942606057619)*x[0]+(-0.133936034409)*x[1]**o+(-0.363274280866)*x[1]+(0.83487439935)*x[2]**o+(-0.108398981461)*x[2]
-        arg[0,3,2,0]=(0.363623383293)*x[0]**o+(0.624267309217)*x[0]+(0.801719984899)*x[1]**o+(0.189212370122)*x[1]+(0.464633630928)*x[2]**o+(-0.979808318438)*x[2]
-        arg[0,3,2,1]=(0.85384408805)*x[0]**o+(-0.889214754116)*x[0]+(0.164915391224)*x[1]**o+(0.0168991405201)*x[1]+(0.097171994236)*x[2]**o+(-0.146094197339)*x[2]
-        arg[0,4,0,0]=(0.778356158972)*x[0]**o+(0.910241265149)*x[0]+(0.123690863272)*x[1]**o+(0.87802121779)*x[1]+(-0.714615668595)*x[2]**o+(-0.437472831583)*x[2]
-        arg[0,4,0,1]=(-0.157185481783)*x[0]**o+(0.352802163968)*x[0]+(0.390184123612)*x[1]**o+(-0.680415093098)*x[1]+(-0.121195042454)*x[2]**o+(-0.713693712117)*x[2]
-        arg[0,4,1,0]=(0.778115668646)*x[0]**o+(-0.111729042892)*x[0]+(0.451518002735)*x[1]**o+(0.232731183374)*x[1]+(-0.764246158086)*x[2]**o+(-0.795525155328)*x[2]
-        arg[0,4,1,1]=(-0.880652367027)*x[0]**o+(-0.314966079126)*x[0]+(-0.640720373065)*x[1]**o+(0.336230541901)*x[1]+(0.566956999526)*x[2]**o+(0.74098258811)*x[2]
-        arg[0,4,2,0]=(0.908657274301)*x[0]**o+(0.636427823614)*x[0]+(0.650137414386)*x[1]**o+(0.695558379005)*x[1]+(-0.489852401087)*x[2]**o+(-0.479227108044)*x[2]
-        arg[0,4,2,1]=(0.015734241525)*x[0]**o+(0.0719884727088)*x[0]+(0.811864895261)*x[1]**o+(0.959127986784)*x[1]+(-0.238146663368)*x[2]**o+(-0.454939322571)*x[2]
-        arg[1,0,0,0]=(-0.918218246559)*x[0]**o+(-0.662787169269)*x[0]+(-0.954035144111)*x[1]**o+(-0.647264685228)*x[1]+(-0.834085960213)*x[2]**o+(-0.167541951024)*x[2]
-        arg[1,0,0,1]=(-0.670950869382)*x[0]**o+(0.826472159989)*x[0]+(0.180410872786)*x[1]**o+(-0.715162871594)*x[1]+(0.653287853169)*x[2]**o+(0.892060529625)*x[2]
-        arg[1,0,1,0]=(0.398789786407)*x[0]**o+(0.689408033554)*x[0]+(0.124338245128)*x[1]**o+(0.748280808587)*x[1]+(0.418357122274)*x[2]**o+(0.230707440075)*x[2]
-        arg[1,0,1,1]=(-0.912778964055)*x[0]**o+(0.904288708694)*x[0]+(-0.874744856901)*x[1]**o+(0.550162195719)*x[1]+(-0.7526423373)*x[2]**o+(0.820993231654)*x[2]
-        arg[1,0,2,0]=(-0.843459684648)*x[0]**o+(-0.579708764091)*x[0]+(-0.876072131849)*x[1]**o+(0.933694599696)*x[1]+(0.507781209021)*x[2]**o+(-0.719729482133)*x[2]
-        arg[1,0,2,1]=(0.594566925796)*x[0]**o+(-0.994301292358)*x[0]+(0.808114389564)*x[1]**o+(-0.970803712864)*x[1]+(0.433544910389)*x[2]**o+(0.260659440299)*x[2]
-        arg[1,1,0,0]=(0.997377553172)*x[0]**o+(0.458428616383)*x[0]+(0.357280778493)*x[1]**o+(0.349837110741)*x[1]+(-0.709592214445)*x[2]**o+(-0.630000739033)*x[2]
-        arg[1,1,0,1]=(0.121595650501)*x[0]**o+(0.40870120924)*x[0]+(0.576917123807)*x[1]**o+(-0.932268308325)*x[1]+(0.710043472116)*x[2]**o+(-0.716528412077)*x[2]
-        arg[1,1,1,0]=(-0.151416035033)*x[0]**o+(0.0255347649787)*x[0]+(-0.752987701889)*x[1]**o+(-0.480969875813)*x[1]+(-0.610514504179)*x[2]**o+(0.959274757402)*x[2]
-        arg[1,1,1,1]=(0.76695706106)*x[0]**o+(-0.0750965975512)*x[0]+(0.846833900735)*x[1]**o+(-0.105838465439)*x[1]+(0.541027486457)*x[2]**o+(0.152543017589)*x[2]
-        arg[1,1,2,0]=(0.0856977181865)*x[0]**o+(-0.188139369706)*x[0]+(0.936071565289)*x[1]**o+(-0.3958713036)*x[1]+(-0.350945878893)*x[2]**o+(0.382302674883)*x[2]
-        arg[1,1,2,1]=(0.873054234789)*x[0]**o+(-0.490869716146)*x[0]+(0.46720526212)*x[1]**o+(-0.334203412334)*x[1]+(-0.81140895636)*x[2]**o+(-0.973858971749)*x[2]
-        arg[1,2,0,0]=(-0.716676352443)*x[0]**o+(0.659821396277)*x[0]+(0.335964292954)*x[1]**o+(0.11609664773)*x[1]+(-0.889186749466)*x[2]**o+(0.454231973946)*x[2]
-        arg[1,2,0,1]=(0.367048872648)*x[0]**o+(0.276083713126)*x[0]+(0.686639128043)*x[1]**o+(-0.991414415293)*x[1]+(0.25360515964)*x[2]**o+(-0.377623315093)*x[2]
-        arg[1,2,1,0]=(-0.723089358777)*x[0]**o+(-0.516690112406)*x[0]+(0.262334273979)*x[1]**o+(0.140773502537)*x[1]+(0.447333972396)*x[2]**o+(-0.551395692966)*x[2]
-        arg[1,2,1,1]=(0.738791182491)*x[0]**o+(-0.978120626668)*x[0]+(-0.217970433713)*x[1]**o+(0.0181011067492)*x[1]+(0.756322867523)*x[2]**o+(0.495269195978)*x[2]
-        arg[1,2,2,0]=(-0.630506449854)*x[0]**o+(-0.0865482364231)*x[0]+(-0.415896403157)*x[1]**o+(-0.712833149895)*x[1]+(-0.180482789777)*x[2]**o+(0.00788290661235)*x[2]
-        arg[1,2,2,1]=(0.0946913865377)*x[0]**o+(0.752854827716)*x[0]+(0.257846220843)*x[1]**o+(-0.953926983578)*x[1]+(-0.388505920682)*x[2]**o+(-0.10751401251)*x[2]
-        arg[1,3,0,0]=(0.694014030611)*x[0]**o+(0.0433103547797)*x[0]+(-0.0805025225569)*x[1]**o+(0.389052254754)*x[1]+(-0.813210939614)*x[2]**o+(-0.593788787896)*x[2]
-        arg[1,3,0,1]=(0.0101606353406)*x[0]**o+(-0.849874258855)*x[0]+(-0.0578973959381)*x[1]**o+(0.942113140424)*x[1]+(0.613716459216)*x[2]**o+(0.72631176833)*x[2]
-        arg[1,3,1,0]=(0.264703608811)*x[0]**o+(0.457962548326)*x[0]+(-0.433795242673)*x[1]**o+(0.650995712848)*x[1]+(0.372471807967)*x[2]**o+(0.00416636841047)*x[2]
-        arg[1,3,1,1]=(-0.73686451669)*x[0]**o+(-0.0425614910776)*x[0]+(-0.587820431311)*x[1]**o+(-0.377628617833)*x[1]+(-0.463964014406)*x[2]**o+(0.283273874989)*x[2]
-        arg[1,3,2,0]=(-0.689341439143)*x[0]**o+(-0.675861918889)*x[0]+(-0.918622662352)*x[1]**o+(0.740990261888)*x[1]+(0.0454007677041)*x[2]**o+(0.513623361074)*x[2]
-        arg[1,3,2,1]=(0.13229101848)*x[0]**o+(0.171873799817)*x[0]+(-0.154491174434)*x[1]**o+(0.897976884089)*x[1]+(-0.598886311821)*x[2]**o+(0.738696710918)*x[2]
-        arg[1,4,0,0]=(0.59403636966)*x[0]**o+(0.93856848969)*x[0]+(0.80164849167)*x[1]**o+(-0.753322979568)*x[1]+(-0.107098073916)*x[2]**o+(-0.623047487973)*x[2]
-        arg[1,4,0,1]=(0.291046099082)*x[0]**o+(-0.437982471049)*x[0]+(0.017395762947)*x[1]**o+(0.852440593923)*x[1]+(0.630825424359)*x[2]**o+(0.419347491727)*x[2]
-        arg[1,4,1,0]=(-0.747962012701)*x[0]**o+(-0.11622032094)*x[0]+(0.324950549781)*x[1]**o+(0.950911398327)*x[1]+(-0.18098990205)*x[2]**o+(-0.676060633522)*x[2]
-        arg[1,4,1,1]=(0.545224363128)*x[0]**o+(0.753376367121)*x[0]+(0.271426695753)*x[1]**o+(-0.139309844675)*x[1]+(-0.923434716375)*x[2]**o+(-0.985988324389)*x[2]
-        arg[1,4,2,0]=(-0.532260822047)*x[0]**o+(0.901407135724)*x[0]+(0.937451330141)*x[1]**o+(0.285217666559)*x[1]+(-0.133028984824)*x[2]**o+(0.993965133696)*x[2]
-        arg[1,4,2,1]=(0.2231815607)*x[0]**o+(0.994845537582)*x[0]+(0.0368727378195)*x[1]**o+(0.511772933777)*x[1]+(-0.871580215976)*x[2]**o+(-0.587010057329)*x[2]
-        arg[2,0,0,0]=(-0.55149411913)*x[0]**o+(-0.905541278559)*x[0]+(0.461217373096)*x[1]**o+(-0.53359853241)*x[1]+(-0.666643290883)*x[2]**o+(0.151495826926)*x[2]
-        arg[2,0,0,1]=(-0.980485062148)*x[0]**o+(0.150165616162)*x[0]+(0.59165725487)*x[1]**o+(-0.243853536017)*x[1]+(0.66816261686)*x[2]**o+(0.2425696131)*x[2]
-        arg[2,0,1,0]=(-0.509337213758)*x[0]**o+(0.652936706687)*x[0]+(-0.849214338091)*x[1]**o+(-0.523354123549)*x[1]+(0.371515689887)*x[2]**o+(0.799989815414)*x[2]
-        arg[2,0,1,1]=(0.461584544541)*x[0]**o+(0.662931355954)*x[0]+(0.744415634786)*x[1]**o+(-0.016743801256)*x[1]+(0.172945846325)*x[2]**o+(-0.0889827089341)*x[2]
-        arg[2,0,2,0]=(0.506514791562)*x[0]**o+(0.974477160694)*x[0]+(-0.968485343167)*x[1]**o+(0.427480013599)*x[1]+(0.0460755879358)*x[2]**o+(0.186500994948)*x[2]
-        arg[2,0,2,1]=(0.259831607993)*x[0]**o+(-0.0141290444125)*x[0]+(-0.968452177682)*x[1]**o+(0.635619125009)*x[1]+(-0.958848431827)*x[2]**o+(-0.0977241523308)*x[2]
-        arg[2,1,0,0]=(0.204233222933)*x[0]**o+(0.834739381877)*x[0]+(0.19961185048)*x[1]**o+(-0.238470380578)*x[1]+(-0.749979713773)*x[2]**o+(-0.268168886251)*x[2]
-        arg[2,1,0,1]=(0.998123643088)*x[0]**o+(0.635823733041)*x[0]+(-0.265447124419)*x[1]**o+(-0.225582751946)*x[1]+(0.91705937439)*x[2]**o+(-0.739461510792)*x[2]
-        arg[2,1,1,0]=(0.0800715288646)*x[0]**o+(-0.37677196659)*x[0]+(-0.0737286350219)*x[1]**o+(0.032076062933)*x[1]+(0.245421912709)*x[2]**o+(-0.8378023935)*x[2]
-        arg[2,1,1,1]=(-0.572376055603)*x[0]**o+(0.8675468469)*x[0]+(-0.533012889867)*x[1]**o+(-0.247215658297)*x[1]+(0.673144564693)*x[2]**o+(-0.749136108985)*x[2]
-        arg[2,1,2,0]=(-0.661188192488)*x[0]**o+(-0.924435593008)*x[0]+(-0.791845808916)*x[1]**o+(0.00133765351092)*x[1]+(0.233676862873)*x[2]**o+(0.981812737962)*x[2]
-        arg[2,1,2,1]=(0.332072445986)*x[0]**o+(-0.909373798588)*x[0]+(0.927025647819)*x[1]**o+(-0.936348942617)*x[1]+(0.251508592152)*x[2]**o+(-0.468147973987)*x[2]
-        arg[2,2,0,0]=(0.892377893841)*x[0]**o+(-0.147933293091)*x[0]+(0.950491102076)*x[1]**o+(0.595250355926)*x[1]+(0.0169764649992)*x[2]**o+(-0.683137752586)*x[2]
-        arg[2,2,0,1]=(0.00579397005645)*x[0]**o+(0.627197373917)*x[0]+(0.663574756196)*x[1]**o+(0.934106767513)*x[1]+(0.105844878022)*x[2]**o+(0.513322917688)*x[2]
-        arg[2,2,1,0]=(-0.168776016133)*x[0]**o+(-0.940071612944)*x[0]+(0.0366053554566)*x[1]**o+(-0.628010909771)*x[1]+(0.250023045906)*x[2]**o+(-0.00327322332166)*x[2]
-        arg[2,2,1,1]=(0.904155764376)*x[0]**o+(-0.258018307306)*x[0]+(0.65862820521)*x[1]**o+(0.434480798515)*x[1]+(0.4089419173)*x[2]**o+(-0.518032695598)*x[2]
-        arg[2,2,2,0]=(-0.41470070958)*x[0]**o+(-0.783186751952)*x[0]+(0.548309561942)*x[1]**o+(0.837130592803)*x[1]+(-0.346808491848)*x[2]**o+(0.165416040985)*x[2]
-        arg[2,2,2,1]=(0.997845909195)*x[0]**o+(0.448428042158)*x[0]+(-0.657050004311)*x[1]**o+(0.493104851747)*x[1]+(0.558315071197)*x[2]**o+(0.206659432923)*x[2]
-        arg[2,3,0,0]=(0.433874360232)*x[0]**o+(-0.0635646197131)*x[0]+(-0.521690521523)*x[1]**o+(-0.298130684888)*x[1]+(-0.131905313644)*x[2]**o+(0.64389451112)*x[2]
-        arg[2,3,0,1]=(0.457729315216)*x[0]**o+(-0.419323242135)*x[0]+(0.614544051135)*x[1]**o+(-0.701671999275)*x[1]+(0.905494300727)*x[2]**o+(-0.565716985337)*x[2]
-        arg[2,3,1,0]=(0.256570728097)*x[0]**o+(0.866349285103)*x[0]+(-0.115768354896)*x[1]**o+(-0.613044456549)*x[1]+(-0.20074185156)*x[2]**o+(-0.188403571776)*x[2]
-        arg[2,3,1,1]=(0.767479943414)*x[0]**o+(0.884066215007)*x[0]+(0.363855420056)*x[1]**o+(0.919698981104)*x[1]+(0.225747762317)*x[2]**o+(-0.220362271104)*x[2]
-        arg[2,3,2,0]=(-0.746469501382)*x[0]**o+(0.680520398001)*x[0]+(0.926950996325)*x[1]**o+(-0.122831303044)*x[1]+(-0.27226561675)*x[2]**o+(0.933304087951)*x[2]
-        arg[2,3,2,1]=(-0.0961434747216)*x[0]**o+(0.987660516767)*x[0]+(0.288175205045)*x[1]**o+(0.683720820403)*x[1]+(0.354403143642)*x[2]**o+(-0.745694089132)*x[2]
-        arg[2,4,0,0]=(0.921750835986)*x[0]**o+(-0.0358861598394)*x[0]+(0.190129645259)*x[1]**o+(0.377067803331)*x[1]+(-0.0188615236582)*x[2]**o+(0.804533888824)*x[2]
-        arg[2,4,0,1]=(-0.256132234484)*x[0]**o+(-0.102661411017)*x[0]+(-0.903465157009)*x[1]**o+(0.50133310168)*x[1]+(-0.0889102598619)*x[2]**o+(-0.0310174238365)*x[2]
-        arg[2,4,1,0]=(0.58483798855)*x[0]**o+(0.967943344305)*x[0]+(-0.0701080005438)*x[1]**o+(0.489476104406)*x[1]+(0.615308427038)*x[2]**o+(-0.38065505709)*x[2]
-        arg[2,4,1,1]=(0.647734130724)*x[0]**o+(-0.930934392719)*x[0]+(0.267370540491)*x[1]**o+(-0.0175019424556)*x[1]+(0.38593657129)*x[2]**o+(-0.985922292359)*x[2]
-        arg[2,4,2,0]=(-0.289971479933)*x[0]**o+(0.882014313157)*x[0]+(0.147321067579)*x[1]**o+(-0.176771838489)*x[1]+(0.710916531544)*x[2]**o+(-0.0856290170401)*x[2]
-        arg[2,4,2,1]=(-0.465930997733)*x[0]**o+(-0.305563942094)*x[0]+(-0.824535262061)*x[1]**o+(-0.917892226972)*x[1]+(0.624462871955)*x[2]**o+(0.544736500065)*x[2]
-        arg[3,0,0,0]=(-0.673230815097)*x[0]**o+(-0.726292712917)*x[0]+(0.0531037021688)*x[1]**o+(-0.467219030159)*x[1]+(-0.0729861369718)*x[2]**o+(-0.440394335015)*x[2]
-        arg[3,0,0,1]=(-0.358235295558)*x[0]**o+(-0.301184713671)*x[0]+(-0.496030649086)*x[1]**o+(-0.125922184777)*x[1]+(0.946715036973)*x[2]**o+(0.846370337893)*x[2]
-        arg[3,0,1,0]=(-0.394175109612)*x[0]**o+(-0.85137582307)*x[0]+(-0.667804785044)*x[1]**o+(0.156762109891)*x[1]+(-0.616444700525)*x[2]**o+(0.0738729399356)*x[2]
-        arg[3,0,1,1]=(-0.652875462534)*x[0]**o+(-0.0605650192541)*x[0]+(0.840539933823)*x[1]**o+(-0.422819423301)*x[1]+(0.113440226819)*x[2]**o+(-0.915154532306)*x[2]
-        arg[3,0,2,0]=(-0.162863352328)*x[0]**o+(-0.364461332292)*x[0]+(-0.222181741398)*x[1]**o+(-0.563668008365)*x[1]+(0.118491770105)*x[2]**o+(0.0809155053022)*x[2]
-        arg[3,0,2,1]=(-0.985278929437)*x[0]**o+(-0.919440760157)*x[0]+(-0.776910686)*x[1]**o+(-0.884270488943)*x[1]+(0.984279010363)*x[2]**o+(-0.489503278582)*x[2]
-        arg[3,1,0,0]=(-0.806565449823)*x[0]**o+(-0.0851385375281)*x[0]+(-0.88851381773)*x[1]**o+(-0.666539867528)*x[1]+(0.154825531411)*x[2]**o+(0.764069849144)*x[2]
-        arg[3,1,0,1]=(-0.222125783918)*x[0]**o+(0.568035675467)*x[0]+(0.470171778932)*x[1]**o+(-0.307608710881)*x[1]+(-0.836083742471)*x[2]**o+(0.553597553381)*x[2]
-        arg[3,1,1,0]=(0.431237389847)*x[0]**o+(-0.141391012471)*x[0]+(0.726895025519)*x[1]**o+(-0.527868751679)*x[1]+(0.711761083137)*x[2]**o+(0.996992864103)*x[2]
-        arg[3,1,1,1]=(-0.123885959924)*x[0]**o+(0.877034475529)*x[0]+(-0.0432492682928)*x[1]**o+(-0.370315494618)*x[1]+(0.243139719071)*x[2]**o+(-0.684318634902)*x[2]
-        arg[3,1,2,0]=(-0.477214489355)*x[0]**o+(0.340808576619)*x[0]+(-0.0991802306558)*x[1]**o+(0.462599821908)*x[1]+(0.091768281564)*x[2]**o+(0.0315552838839)*x[2]
-        arg[3,1,2,1]=(0.676189142894)*x[0]**o+(0.510136386913)*x[0]+(-0.558579041952)*x[1]**o+(0.961615047877)*x[1]+(0.510717386124)*x[2]**o+(0.774430183432)*x[2]
-        arg[3,2,0,0]=(0.158370232444)*x[0]**o+(0.209424855992)*x[0]+(0.691438753013)*x[1]**o+(-0.781594298738)*x[1]+(-0.0188536627517)*x[2]**o+(0.136400798995)*x[2]
-        arg[3,2,0,1]=(-0.440674414328)*x[0]**o+(0.118228612687)*x[0]+(-0.700026492613)*x[1]**o+(-0.981341215714)*x[1]+(-0.172847519578)*x[2]**o+(-0.423095202172)*x[2]
-        arg[3,2,1,0]=(-0.0694960391695)*x[0]**o+(-0.66448610135)*x[0]+(-0.177572703748)*x[1]**o+(-0.060488161727)*x[1]+(0.306021853885)*x[2]**o+(0.0730338716187)*x[2]
-        arg[3,2,1,1]=(-0.360662154547)*x[0]**o+(0.577679359648)*x[0]+(-0.515313534966)*x[1]**o+(0.217352687358)*x[1]+(0.728367577882)*x[2]**o+(0.38505849834)*x[2]
-        arg[3,2,2,0]=(0.568671861232)*x[0]**o+(-0.0792490917882)*x[0]+(0.0188002885229)*x[1]**o+(-0.956862575759)*x[1]+(-0.844332442983)*x[2]**o+(0.670792928042)*x[2]
-        arg[3,2,2,1]=(0.833099204713)*x[0]**o+(0.368482169933)*x[0]+(-0.926002498892)*x[1]**o+(-0.130646446568)*x[1]+(0.81164928914)*x[2]**o+(-0.641079919927)*x[2]
-        arg[3,3,0,0]=(-0.277769350989)*x[0]**o+(0.753452018649)*x[0]+(-0.766322344505)*x[1]**o+(-0.679108224612)*x[1]+(0.0799499795424)*x[2]**o+(0.255751308975)*x[2]
-        arg[3,3,0,1]=(0.429176753733)*x[0]**o+(0.123106050259)*x[0]+(-0.169037728992)*x[1]**o+(0.749245933687)*x[1]+(0.560140859355)*x[2]**o+(-0.937091840021)*x[2]
-        arg[3,3,1,0]=(0.648792557593)*x[0]**o+(-0.057555187513)*x[0]+(0.883290331726)*x[1]**o+(0.539276905995)*x[1]+(0.473614408583)*x[2]**o+(0.723258340333)*x[2]
-        arg[3,3,1,1]=(0.527298833572)*x[0]**o+(0.0753824058279)*x[0]+(0.719196099257)*x[1]**o+(-0.0124603350035)*x[1]+(-0.964484650253)*x[2]**o+(0.404444269694)*x[2]
-        arg[3,3,2,0]=(-0.403640677462)*x[0]**o+(0.906195964766)*x[0]+(-0.561419078404)*x[1]**o+(0.645408717838)*x[1]+(0.671624799609)*x[2]**o+(-0.573901868621)*x[2]
-        arg[3,3,2,1]=(-0.288117182165)*x[0]**o+(-0.391003584945)*x[0]+(-0.555037182038)*x[1]**o+(0.299362209017)*x[1]+(-0.552429724326)*x[2]**o+(-0.416923306774)*x[2]
-        arg[3,4,0,0]=(-0.19594719192)*x[0]**o+(0.150898934692)*x[0]+(0.210935232044)*x[1]**o+(-0.319764293347)*x[1]+(-0.642450751195)*x[2]**o+(0.22231085168)*x[2]
-        arg[3,4,0,1]=(-0.0514589460225)*x[0]**o+(0.0366025646754)*x[0]+(0.416280576691)*x[1]**o+(0.609178063951)*x[1]+(0.835611677062)*x[2]**o+(-0.131630571478)*x[2]
-        arg[3,4,1,0]=(0.171509152214)*x[0]**o+(-0.761188271093)*x[0]+(-0.915951802896)*x[1]**o+(-0.451796709915)*x[1]+(-0.979847828162)*x[2]**o+(0.0566453393315)*x[2]
-        arg[3,4,1,1]=(0.690427998102)*x[0]**o+(-0.358318625695)*x[0]+(0.330270871613)*x[1]**o+(-0.724392522137)*x[1]+(-0.535474623489)*x[2]**o+(-0.12341743885)*x[2]
-        arg[3,4,2,0]=(0.488090753426)*x[0]**o+(-0.352417078372)*x[0]+(0.971988099319)*x[1]**o+(-0.288929516009)*x[1]+(0.612576734094)*x[2]**o+(-0.43799514603)*x[2]
-        arg[3,4,2,1]=(-0.098768101356)*x[0]**o+(0.123300661895)*x[0]+(-0.0489724280789)*x[1]**o+(-0.422508669137)*x[1]+(-0.861483104139)*x[2]**o+(0.950198316001)*x[2]
-        ref[0,0,0,0]=(0.287160004495)*x_ref[0]**o+(0.35112250158)*x_ref[0]+(0.061693427026)*x_ref[1]**o+(-0.752505628029)*x_ref[1]+(-0.57137756028)*x_ref[2]**o+(-0.0397598892504)*x_ref[2]
-        ref[0,0,0,1]=(0.272799584607)*x_ref[0]**o+(-0.569947956933)*x_ref[0]+(0.322189261657)*x_ref[1]**o+(-0.440552272224)*x_ref[1]+(-0.10460241481)*x_ref[2]**o+(-0.884848984752)*x_ref[2]
-        ref[0,0,1,0]=(0.147766301604)*x_ref[0]**o+(0.405651654428)*x_ref[0]+(-0.440827209529)*x_ref[1]**o+(-0.399952864271)*x_ref[1]+(-0.770191009459)*x_ref[2]**o+(-0.789853968049)*x_ref[2]
-        ref[0,0,1,1]=(0.688053165375)*x_ref[0]**o+(-0.154890421924)*x_ref[0]+(0.583684164319)*x_ref[1]**o+(-0.398082068217)*x_ref[1]+(-0.573142923099)*x_ref[2]**o+(-0.205271877337)*x_ref[2]
-        ref[0,0,2,0]=(0.807043275877)*x_ref[0]**o+(0.843046383231)*x_ref[0]+(-0.588146471402)*x_ref[1]**o+(0.157787304557)*x_ref[1]+(-0.771009748568)*x_ref[2]**o+(0.162090791609)*x_ref[2]
-        ref[0,0,2,1]=(-0.0706800489392)*x_ref[0]**o+(0.499961344665)*x_ref[0]+(0.208926178797)*x_ref[1]**o+(-0.7462472769)*x_ref[1]+(-0.105475405648)*x_ref[2]**o+(-0.18670229948)*x_ref[2]
-        ref[0,1,0,0]=(-0.696657281943)*x_ref[0]**o+(-0.0251785345759)*x_ref[0]+(-0.579575530451)*x_ref[1]**o+(-0.0628378665725)*x_ref[1]+(0.668395441302)*x_ref[2]**o+(0.813478105092)*x_ref[2]
-        ref[0,1,0,1]=(-0.574784314876)*x_ref[0]**o+(-0.321268045204)*x_ref[0]+(0.160704464213)*x_ref[1]**o+(-0.676016748103)*x_ref[1]+(0.918971102865)*x_ref[2]**o+(0.252082410081)*x_ref[2]
-        ref[0,1,1,0]=(-0.905062846817)*x_ref[0]**o+(0.788906658477)*x_ref[0]+(-0.408807611936)*x_ref[1]**o+(0.114686186437)*x_ref[1]+(-0.654685568493)*x_ref[2]**o+(0.0879202139254)*x_ref[2]
-        ref[0,1,1,1]=(-0.68020231443)*x_ref[0]**o+(-0.82049202902)*x_ref[0]+(-0.958352740187)*x_ref[1]**o+(-0.33201745802)*x_ref[1]+(0.539810363682)*x_ref[2]**o+(0.744988573087)*x_ref[2]
-        ref[0,1,2,0]=(-0.960884744997)*x_ref[0]**o+(-0.704157132503)*x_ref[0]+(0.282236905414)*x_ref[1]**o+(0.756363456433)*x_ref[1]+(-0.365400101792)*x_ref[2]**o+(0.975735846554)*x_ref[2]
-        ref[0,1,2,1]=(-0.691780076951)*x_ref[0]**o+(-0.952575440059)*x_ref[0]+(-0.921247808098)*x_ref[1]**o+(-0.88872834095)*x_ref[1]+(0.534103013833)*x_ref[2]**o+(-0.602295186104)*x_ref[2]
-        ref[0,2,0,0]=(0.460698415704)*x_ref[0]**o+(0.770243814897)*x_ref[0]+(-0.380381727574)*x_ref[1]**o+(0.476360845668)*x_ref[1]+(-0.681040425102)*x_ref[2]**o+(-0.244369435116)*x_ref[2]
-        ref[0,2,0,1]=(0.251591652281)*x_ref[0]**o+(0.748234919686)*x_ref[0]+(-0.698189037307)*x_ref[1]**o+(-0.292400412508)*x_ref[1]+(0.613850696577)*x_ref[2]**o+(-0.942243226834)*x_ref[2]
-        ref[0,2,1,0]=(-0.718090066328)*x_ref[0]**o+(-0.322499511794)*x_ref[0]+(-0.75105623397)*x_ref[1]**o+(0.526680271832)*x_ref[1]+(-0.186671531793)*x_ref[2]**o+(-0.449273875991)*x_ref[2]
-        ref[0,2,1,1]=(-0.52165552452)*x_ref[0]**o+(0.902446006085)*x_ref[0]+(-0.915575172702)*x_ref[1]**o+(-0.150816194662)*x_ref[1]+(0.596782785689)*x_ref[2]**o+(0.546880865642)*x_ref[2]
-        ref[0,2,2,0]=(-0.104486704816)*x_ref[0]**o+(0.723863699457)*x_ref[0]+(0.758622117279)*x_ref[1]**o+(0.372271580145)*x_ref[1]+(-0.0820570383792)*x_ref[2]**o+(-0.63539781104)*x_ref[2]
-        ref[0,2,2,1]=(0.0355930823603)*x_ref[0]**o+(0.0931942600432)*x_ref[0]+(-0.118096985978)*x_ref[1]**o+(0.296983782212)*x_ref[1]+(-0.864491763712)*x_ref[2]**o+(0.942230663978)*x_ref[2]
-        ref[0,3,0,0]=(0.371153709815)*x_ref[0]**o+(0.0427309083893)*x_ref[0]+(-0.886563919084)*x_ref[1]**o+(-0.14946513404)*x_ref[1]+(0.80903804519)*x_ref[2]**o+(0.69728533073)*x_ref[2]
-        ref[0,3,0,1]=(0.0593930396142)*x_ref[0]**o+(-0.370327974089)*x_ref[0]+(-0.388354464683)*x_ref[1]**o+(-0.367648771812)*x_ref[1]+(-0.573754821458)*x_ref[2]**o+(-0.947499155479)*x_ref[2]
-        ref[0,3,1,0]=(-0.869817317)*x_ref[0]**o+(0.874317772678)*x_ref[0]+(-0.870060178375)*x_ref[1]**o+(0.66571074524)*x_ref[1]+(-0.669052377378)*x_ref[2]**o+(0.940212680575)*x_ref[2]
-        ref[0,3,1,1]=(-0.417445606772)*x_ref[0]**o+(0.942606057619)*x_ref[0]+(-0.133936034409)*x_ref[1]**o+(-0.363274280866)*x_ref[1]+(0.83487439935)*x_ref[2]**o+(-0.108398981461)*x_ref[2]
-        ref[0,3,2,0]=(0.363623383293)*x_ref[0]**o+(0.624267309217)*x_ref[0]+(0.801719984899)*x_ref[1]**o+(0.189212370122)*x_ref[1]+(0.464633630928)*x_ref[2]**o+(-0.979808318438)*x_ref[2]
-        ref[0,3,2,1]=(0.85384408805)*x_ref[0]**o+(-0.889214754116)*x_ref[0]+(0.164915391224)*x_ref[1]**o+(0.0168991405201)*x_ref[1]+(0.097171994236)*x_ref[2]**o+(-0.146094197339)*x_ref[2]
-        ref[0,4,0,0]=(0.778356158972)*x_ref[0]**o+(0.910241265149)*x_ref[0]+(0.123690863272)*x_ref[1]**o+(0.87802121779)*x_ref[1]+(-0.714615668595)*x_ref[2]**o+(-0.437472831583)*x_ref[2]
-        ref[0,4,0,1]=(-0.157185481783)*x_ref[0]**o+(0.352802163968)*x_ref[0]+(0.390184123612)*x_ref[1]**o+(-0.680415093098)*x_ref[1]+(-0.121195042454)*x_ref[2]**o+(-0.713693712117)*x_ref[2]
-        ref[0,4,1,0]=(0.778115668646)*x_ref[0]**o+(-0.111729042892)*x_ref[0]+(0.451518002735)*x_ref[1]**o+(0.232731183374)*x_ref[1]+(-0.764246158086)*x_ref[2]**o+(-0.795525155328)*x_ref[2]
-        ref[0,4,1,1]=(-0.880652367027)*x_ref[0]**o+(-0.314966079126)*x_ref[0]+(-0.640720373065)*x_ref[1]**o+(0.336230541901)*x_ref[1]+(0.566956999526)*x_ref[2]**o+(0.74098258811)*x_ref[2]
-        ref[0,4,2,0]=(0.908657274301)*x_ref[0]**o+(0.636427823614)*x_ref[0]+(0.650137414386)*x_ref[1]**o+(0.695558379005)*x_ref[1]+(-0.489852401087)*x_ref[2]**o+(-0.479227108044)*x_ref[2]
-        ref[0,4,2,1]=(0.015734241525)*x_ref[0]**o+(0.0719884727088)*x_ref[0]+(0.811864895261)*x_ref[1]**o+(0.959127986784)*x_ref[1]+(-0.238146663368)*x_ref[2]**o+(-0.454939322571)*x_ref[2]
-        ref[1,0,0,0]=(-0.918218246559)*x_ref[0]**o+(-0.662787169269)*x_ref[0]+(-0.954035144111)*x_ref[1]**o+(-0.647264685228)*x_ref[1]+(-0.834085960213)*x_ref[2]**o+(-0.167541951024)*x_ref[2]
-        ref[1,0,0,1]=(-0.670950869382)*x_ref[0]**o+(0.826472159989)*x_ref[0]+(0.180410872786)*x_ref[1]**o+(-0.715162871594)*x_ref[1]+(0.653287853169)*x_ref[2]**o+(0.892060529625)*x_ref[2]
-        ref[1,0,1,0]=(0.398789786407)*x_ref[0]**o+(0.689408033554)*x_ref[0]+(0.124338245128)*x_ref[1]**o+(0.748280808587)*x_ref[1]+(0.418357122274)*x_ref[2]**o+(0.230707440075)*x_ref[2]
-        ref[1,0,1,1]=(-0.912778964055)*x_ref[0]**o+(0.904288708694)*x_ref[0]+(-0.874744856901)*x_ref[1]**o+(0.550162195719)*x_ref[1]+(-0.7526423373)*x_ref[2]**o+(0.820993231654)*x_ref[2]
-        ref[1,0,2,0]=(-0.843459684648)*x_ref[0]**o+(-0.579708764091)*x_ref[0]+(-0.876072131849)*x_ref[1]**o+(0.933694599696)*x_ref[1]+(0.507781209021)*x_ref[2]**o+(-0.719729482133)*x_ref[2]
-        ref[1,0,2,1]=(0.594566925796)*x_ref[0]**o+(-0.994301292358)*x_ref[0]+(0.808114389564)*x_ref[1]**o+(-0.970803712864)*x_ref[1]+(0.433544910389)*x_ref[2]**o+(0.260659440299)*x_ref[2]
-        ref[1,1,0,0]=(0.997377553172)*x_ref[0]**o+(0.458428616383)*x_ref[0]+(0.357280778493)*x_ref[1]**o+(0.349837110741)*x_ref[1]+(-0.709592214445)*x_ref[2]**o+(-0.630000739033)*x_ref[2]
-        ref[1,1,0,1]=(0.121595650501)*x_ref[0]**o+(0.40870120924)*x_ref[0]+(0.576917123807)*x_ref[1]**o+(-0.932268308325)*x_ref[1]+(0.710043472116)*x_ref[2]**o+(-0.716528412077)*x_ref[2]
-        ref[1,1,1,0]=(-0.151416035033)*x_ref[0]**o+(0.0255347649787)*x_ref[0]+(-0.752987701889)*x_ref[1]**o+(-0.480969875813)*x_ref[1]+(-0.610514504179)*x_ref[2]**o+(0.959274757402)*x_ref[2]
-        ref[1,1,1,1]=(0.76695706106)*x_ref[0]**o+(-0.0750965975512)*x_ref[0]+(0.846833900735)*x_ref[1]**o+(-0.105838465439)*x_ref[1]+(0.541027486457)*x_ref[2]**o+(0.152543017589)*x_ref[2]
-        ref[1,1,2,0]=(0.0856977181865)*x_ref[0]**o+(-0.188139369706)*x_ref[0]+(0.936071565289)*x_ref[1]**o+(-0.3958713036)*x_ref[1]+(-0.350945878893)*x_ref[2]**o+(0.382302674883)*x_ref[2]
-        ref[1,1,2,1]=(0.873054234789)*x_ref[0]**o+(-0.490869716146)*x_ref[0]+(0.46720526212)*x_ref[1]**o+(-0.334203412334)*x_ref[1]+(-0.81140895636)*x_ref[2]**o+(-0.973858971749)*x_ref[2]
-        ref[1,2,0,0]=(-0.716676352443)*x_ref[0]**o+(0.659821396277)*x_ref[0]+(0.335964292954)*x_ref[1]**o+(0.11609664773)*x_ref[1]+(-0.889186749466)*x_ref[2]**o+(0.454231973946)*x_ref[2]
-        ref[1,2,0,1]=(0.367048872648)*x_ref[0]**o+(0.276083713126)*x_ref[0]+(0.686639128043)*x_ref[1]**o+(-0.991414415293)*x_ref[1]+(0.25360515964)*x_ref[2]**o+(-0.377623315093)*x_ref[2]
-        ref[1,2,1,0]=(-0.723089358777)*x_ref[0]**o+(-0.516690112406)*x_ref[0]+(0.262334273979)*x_ref[1]**o+(0.140773502537)*x_ref[1]+(0.447333972396)*x_ref[2]**o+(-0.551395692966)*x_ref[2]
-        ref[1,2,1,1]=(0.738791182491)*x_ref[0]**o+(-0.978120626668)*x_ref[0]+(-0.217970433713)*x_ref[1]**o+(0.0181011067492)*x_ref[1]+(0.756322867523)*x_ref[2]**o+(0.495269195978)*x_ref[2]
-        ref[1,2,2,0]=(-0.630506449854)*x_ref[0]**o+(-0.0865482364231)*x_ref[0]+(-0.415896403157)*x_ref[1]**o+(-0.712833149895)*x_ref[1]+(-0.180482789777)*x_ref[2]**o+(0.00788290661235)*x_ref[2]
-        ref[1,2,2,1]=(0.0946913865377)*x_ref[0]**o+(0.752854827716)*x_ref[0]+(0.257846220843)*x_ref[1]**o+(-0.953926983578)*x_ref[1]+(-0.388505920682)*x_ref[2]**o+(-0.10751401251)*x_ref[2]
-        ref[1,3,0,0]=(0.694014030611)*x_ref[0]**o+(0.0433103547797)*x_ref[0]+(-0.0805025225569)*x_ref[1]**o+(0.389052254754)*x_ref[1]+(-0.813210939614)*x_ref[2]**o+(-0.593788787896)*x_ref[2]
-        ref[1,3,0,1]=(0.0101606353406)*x_ref[0]**o+(-0.849874258855)*x_ref[0]+(-0.0578973959381)*x_ref[1]**o+(0.942113140424)*x_ref[1]+(0.613716459216)*x_ref[2]**o+(0.72631176833)*x_ref[2]
-        ref[1,3,1,0]=(0.264703608811)*x_ref[0]**o+(0.457962548326)*x_ref[0]+(-0.433795242673)*x_ref[1]**o+(0.650995712848)*x_ref[1]+(0.372471807967)*x_ref[2]**o+(0.00416636841047)*x_ref[2]
-        ref[1,3,1,1]=(-0.73686451669)*x_ref[0]**o+(-0.0425614910776)*x_ref[0]+(-0.587820431311)*x_ref[1]**o+(-0.377628617833)*x_ref[1]+(-0.463964014406)*x_ref[2]**o+(0.283273874989)*x_ref[2]
-        ref[1,3,2,0]=(-0.689341439143)*x_ref[0]**o+(-0.675861918889)*x_ref[0]+(-0.918622662352)*x_ref[1]**o+(0.740990261888)*x_ref[1]+(0.0454007677041)*x_ref[2]**o+(0.513623361074)*x_ref[2]
-        ref[1,3,2,1]=(0.13229101848)*x_ref[0]**o+(0.171873799817)*x_ref[0]+(-0.154491174434)*x_ref[1]**o+(0.897976884089)*x_ref[1]+(-0.598886311821)*x_ref[2]**o+(0.738696710918)*x_ref[2]
-        ref[1,4,0,0]=(0.59403636966)*x_ref[0]**o+(0.93856848969)*x_ref[0]+(0.80164849167)*x_ref[1]**o+(-0.753322979568)*x_ref[1]+(-0.107098073916)*x_ref[2]**o+(-0.623047487973)*x_ref[2]
-        ref[1,4,0,1]=(0.291046099082)*x_ref[0]**o+(-0.437982471049)*x_ref[0]+(0.017395762947)*x_ref[1]**o+(0.852440593923)*x_ref[1]+(0.630825424359)*x_ref[2]**o+(0.419347491727)*x_ref[2]
-        ref[1,4,1,0]=(-0.747962012701)*x_ref[0]**o+(-0.11622032094)*x_ref[0]+(0.324950549781)*x_ref[1]**o+(0.950911398327)*x_ref[1]+(-0.18098990205)*x_ref[2]**o+(-0.676060633522)*x_ref[2]
-        ref[1,4,1,1]=(0.545224363128)*x_ref[0]**o+(0.753376367121)*x_ref[0]+(0.271426695753)*x_ref[1]**o+(-0.139309844675)*x_ref[1]+(-0.923434716375)*x_ref[2]**o+(-0.985988324389)*x_ref[2]
-        ref[1,4,2,0]=(-0.532260822047)*x_ref[0]**o+(0.901407135724)*x_ref[0]+(0.937451330141)*x_ref[1]**o+(0.285217666559)*x_ref[1]+(-0.133028984824)*x_ref[2]**o+(0.993965133696)*x_ref[2]
-        ref[1,4,2,1]=(0.2231815607)*x_ref[0]**o+(0.994845537582)*x_ref[0]+(0.0368727378195)*x_ref[1]**o+(0.511772933777)*x_ref[1]+(-0.871580215976)*x_ref[2]**o+(-0.587010057329)*x_ref[2]
-        ref[2,0,0,0]=(-0.55149411913)*x_ref[0]**o+(-0.905541278559)*x_ref[0]+(0.461217373096)*x_ref[1]**o+(-0.53359853241)*x_ref[1]+(-0.666643290883)*x_ref[2]**o+(0.151495826926)*x_ref[2]
-        ref[2,0,0,1]=(-0.980485062148)*x_ref[0]**o+(0.150165616162)*x_ref[0]+(0.59165725487)*x_ref[1]**o+(-0.243853536017)*x_ref[1]+(0.66816261686)*x_ref[2]**o+(0.2425696131)*x_ref[2]
-        ref[2,0,1,0]=(-0.509337213758)*x_ref[0]**o+(0.652936706687)*x_ref[0]+(-0.849214338091)*x_ref[1]**o+(-0.523354123549)*x_ref[1]+(0.371515689887)*x_ref[2]**o+(0.799989815414)*x_ref[2]
-        ref[2,0,1,1]=(0.461584544541)*x_ref[0]**o+(0.662931355954)*x_ref[0]+(0.744415634786)*x_ref[1]**o+(-0.016743801256)*x_ref[1]+(0.172945846325)*x_ref[2]**o+(-0.0889827089341)*x_ref[2]
-        ref[2,0,2,0]=(0.506514791562)*x_ref[0]**o+(0.974477160694)*x_ref[0]+(-0.968485343167)*x_ref[1]**o+(0.427480013599)*x_ref[1]+(0.0460755879358)*x_ref[2]**o+(0.186500994948)*x_ref[2]
-        ref[2,0,2,1]=(0.259831607993)*x_ref[0]**o+(-0.0141290444125)*x_ref[0]+(-0.968452177682)*x_ref[1]**o+(0.635619125009)*x_ref[1]+(-0.958848431827)*x_ref[2]**o+(-0.0977241523308)*x_ref[2]
-        ref[2,1,0,0]=(0.204233222933)*x_ref[0]**o+(0.834739381877)*x_ref[0]+(0.19961185048)*x_ref[1]**o+(-0.238470380578)*x_ref[1]+(-0.749979713773)*x_ref[2]**o+(-0.268168886251)*x_ref[2]
-        ref[2,1,0,1]=(0.998123643088)*x_ref[0]**o+(0.635823733041)*x_ref[0]+(-0.265447124419)*x_ref[1]**o+(-0.225582751946)*x_ref[1]+(0.91705937439)*x_ref[2]**o+(-0.739461510792)*x_ref[2]
-        ref[2,1,1,0]=(0.0800715288646)*x_ref[0]**o+(-0.37677196659)*x_ref[0]+(-0.0737286350219)*x_ref[1]**o+(0.032076062933)*x_ref[1]+(0.245421912709)*x_ref[2]**o+(-0.8378023935)*x_ref[2]
-        ref[2,1,1,1]=(-0.572376055603)*x_ref[0]**o+(0.8675468469)*x_ref[0]+(-0.533012889867)*x_ref[1]**o+(-0.247215658297)*x_ref[1]+(0.673144564693)*x_ref[2]**o+(-0.749136108985)*x_ref[2]
-        ref[2,1,2,0]=(-0.661188192488)*x_ref[0]**o+(-0.924435593008)*x_ref[0]+(-0.791845808916)*x_ref[1]**o+(0.00133765351092)*x_ref[1]+(0.233676862873)*x_ref[2]**o+(0.981812737962)*x_ref[2]
-        ref[2,1,2,1]=(0.332072445986)*x_ref[0]**o+(-0.909373798588)*x_ref[0]+(0.927025647819)*x_ref[1]**o+(-0.936348942617)*x_ref[1]+(0.251508592152)*x_ref[2]**o+(-0.468147973987)*x_ref[2]
-        ref[2,2,0,0]=(0.892377893841)*x_ref[0]**o+(-0.147933293091)*x_ref[0]+(0.950491102076)*x_ref[1]**o+(0.595250355926)*x_ref[1]+(0.0169764649992)*x_ref[2]**o+(-0.683137752586)*x_ref[2]
-        ref[2,2,0,1]=(0.00579397005645)*x_ref[0]**o+(0.627197373917)*x_ref[0]+(0.663574756196)*x_ref[1]**o+(0.934106767513)*x_ref[1]+(0.105844878022)*x_ref[2]**o+(0.513322917688)*x_ref[2]
-        ref[2,2,1,0]=(-0.168776016133)*x_ref[0]**o+(-0.940071612944)*x_ref[0]+(0.0366053554566)*x_ref[1]**o+(-0.628010909771)*x_ref[1]+(0.250023045906)*x_ref[2]**o+(-0.00327322332166)*x_ref[2]
-        ref[2,2,1,1]=(0.904155764376)*x_ref[0]**o+(-0.258018307306)*x_ref[0]+(0.65862820521)*x_ref[1]**o+(0.434480798515)*x_ref[1]+(0.4089419173)*x_ref[2]**o+(-0.518032695598)*x_ref[2]
-        ref[2,2,2,0]=(-0.41470070958)*x_ref[0]**o+(-0.783186751952)*x_ref[0]+(0.548309561942)*x_ref[1]**o+(0.837130592803)*x_ref[1]+(-0.346808491848)*x_ref[2]**o+(0.165416040985)*x_ref[2]
-        ref[2,2,2,1]=(0.997845909195)*x_ref[0]**o+(0.448428042158)*x_ref[0]+(-0.657050004311)*x_ref[1]**o+(0.493104851747)*x_ref[1]+(0.558315071197)*x_ref[2]**o+(0.206659432923)*x_ref[2]
-        ref[2,3,0,0]=(0.433874360232)*x_ref[0]**o+(-0.0635646197131)*x_ref[0]+(-0.521690521523)*x_ref[1]**o+(-0.298130684888)*x_ref[1]+(-0.131905313644)*x_ref[2]**o+(0.64389451112)*x_ref[2]
-        ref[2,3,0,1]=(0.457729315216)*x_ref[0]**o+(-0.419323242135)*x_ref[0]+(0.614544051135)*x_ref[1]**o+(-0.701671999275)*x_ref[1]+(0.905494300727)*x_ref[2]**o+(-0.565716985337)*x_ref[2]
-        ref[2,3,1,0]=(0.256570728097)*x_ref[0]**o+(0.866349285103)*x_ref[0]+(-0.115768354896)*x_ref[1]**o+(-0.613044456549)*x_ref[1]+(-0.20074185156)*x_ref[2]**o+(-0.188403571776)*x_ref[2]
-        ref[2,3,1,1]=(0.767479943414)*x_ref[0]**o+(0.884066215007)*x_ref[0]+(0.363855420056)*x_ref[1]**o+(0.919698981104)*x_ref[1]+(0.225747762317)*x_ref[2]**o+(-0.220362271104)*x_ref[2]
-        ref[2,3,2,0]=(-0.746469501382)*x_ref[0]**o+(0.680520398001)*x_ref[0]+(0.926950996325)*x_ref[1]**o+(-0.122831303044)*x_ref[1]+(-0.27226561675)*x_ref[2]**o+(0.933304087951)*x_ref[2]
-        ref[2,3,2,1]=(-0.0961434747216)*x_ref[0]**o+(0.987660516767)*x_ref[0]+(0.288175205045)*x_ref[1]**o+(0.683720820403)*x_ref[1]+(0.354403143642)*x_ref[2]**o+(-0.745694089132)*x_ref[2]
-        ref[2,4,0,0]=(0.921750835986)*x_ref[0]**o+(-0.0358861598394)*x_ref[0]+(0.190129645259)*x_ref[1]**o+(0.377067803331)*x_ref[1]+(-0.0188615236582)*x_ref[2]**o+(0.804533888824)*x_ref[2]
-        ref[2,4,0,1]=(-0.256132234484)*x_ref[0]**o+(-0.102661411017)*x_ref[0]+(-0.903465157009)*x_ref[1]**o+(0.50133310168)*x_ref[1]+(-0.0889102598619)*x_ref[2]**o+(-0.0310174238365)*x_ref[2]
-        ref[2,4,1,0]=(0.58483798855)*x_ref[0]**o+(0.967943344305)*x_ref[0]+(-0.0701080005438)*x_ref[1]**o+(0.489476104406)*x_ref[1]+(0.615308427038)*x_ref[2]**o+(-0.38065505709)*x_ref[2]
-        ref[2,4,1,1]=(0.647734130724)*x_ref[0]**o+(-0.930934392719)*x_ref[0]+(0.267370540491)*x_ref[1]**o+(-0.0175019424556)*x_ref[1]+(0.38593657129)*x_ref[2]**o+(-0.985922292359)*x_ref[2]
-        ref[2,4,2,0]=(-0.289971479933)*x_ref[0]**o+(0.882014313157)*x_ref[0]+(0.147321067579)*x_ref[1]**o+(-0.176771838489)*x_ref[1]+(0.710916531544)*x_ref[2]**o+(-0.0856290170401)*x_ref[2]
-        ref[2,4,2,1]=(-0.465930997733)*x_ref[0]**o+(-0.305563942094)*x_ref[0]+(-0.824535262061)*x_ref[1]**o+(-0.917892226972)*x_ref[1]+(0.624462871955)*x_ref[2]**o+(0.544736500065)*x_ref[2]
-        ref[3,0,0,0]=(-0.673230815097)*x_ref[0]**o+(-0.726292712917)*x_ref[0]+(0.0531037021688)*x_ref[1]**o+(-0.467219030159)*x_ref[1]+(-0.0729861369718)*x_ref[2]**o+(-0.440394335015)*x_ref[2]
-        ref[3,0,0,1]=(-0.358235295558)*x_ref[0]**o+(-0.301184713671)*x_ref[0]+(-0.496030649086)*x_ref[1]**o+(-0.125922184777)*x_ref[1]+(0.946715036973)*x_ref[2]**o+(0.846370337893)*x_ref[2]
-        ref[3,0,1,0]=(-0.394175109612)*x_ref[0]**o+(-0.85137582307)*x_ref[0]+(-0.667804785044)*x_ref[1]**o+(0.156762109891)*x_ref[1]+(-0.616444700525)*x_ref[2]**o+(0.0738729399356)*x_ref[2]
-        ref[3,0,1,1]=(-0.652875462534)*x_ref[0]**o+(-0.0605650192541)*x_ref[0]+(0.840539933823)*x_ref[1]**o+(-0.422819423301)*x_ref[1]+(0.113440226819)*x_ref[2]**o+(-0.915154532306)*x_ref[2]
-        ref[3,0,2,0]=(-0.162863352328)*x_ref[0]**o+(-0.364461332292)*x_ref[0]+(-0.222181741398)*x_ref[1]**o+(-0.563668008365)*x_ref[1]+(0.118491770105)*x_ref[2]**o+(0.0809155053022)*x_ref[2]
-        ref[3,0,2,1]=(-0.985278929437)*x_ref[0]**o+(-0.919440760157)*x_ref[0]+(-0.776910686)*x_ref[1]**o+(-0.884270488943)*x_ref[1]+(0.984279010363)*x_ref[2]**o+(-0.489503278582)*x_ref[2]
-        ref[3,1,0,0]=(-0.806565449823)*x_ref[0]**o+(-0.0851385375281)*x_ref[0]+(-0.88851381773)*x_ref[1]**o+(-0.666539867528)*x_ref[1]+(0.154825531411)*x_ref[2]**o+(0.764069849144)*x_ref[2]
-        ref[3,1,0,1]=(-0.222125783918)*x_ref[0]**o+(0.568035675467)*x_ref[0]+(0.470171778932)*x_ref[1]**o+(-0.307608710881)*x_ref[1]+(-0.836083742471)*x_ref[2]**o+(0.553597553381)*x_ref[2]
-        ref[3,1,1,0]=(0.431237389847)*x_ref[0]**o+(-0.141391012471)*x_ref[0]+(0.726895025519)*x_ref[1]**o+(-0.527868751679)*x_ref[1]+(0.711761083137)*x_ref[2]**o+(0.996992864103)*x_ref[2]
-        ref[3,1,1,1]=(-0.123885959924)*x_ref[0]**o+(0.877034475529)*x_ref[0]+(-0.0432492682928)*x_ref[1]**o+(-0.370315494618)*x_ref[1]+(0.243139719071)*x_ref[2]**o+(-0.684318634902)*x_ref[2]
-        ref[3,1,2,0]=(-0.477214489355)*x_ref[0]**o+(0.340808576619)*x_ref[0]+(-0.0991802306558)*x_ref[1]**o+(0.462599821908)*x_ref[1]+(0.091768281564)*x_ref[2]**o+(0.0315552838839)*x_ref[2]
-        ref[3,1,2,1]=(0.676189142894)*x_ref[0]**o+(0.510136386913)*x_ref[0]+(-0.558579041952)*x_ref[1]**o+(0.961615047877)*x_ref[1]+(0.510717386124)*x_ref[2]**o+(0.774430183432)*x_ref[2]
-        ref[3,2,0,0]=(0.158370232444)*x_ref[0]**o+(0.209424855992)*x_ref[0]+(0.691438753013)*x_ref[1]**o+(-0.781594298738)*x_ref[1]+(-0.0188536627517)*x_ref[2]**o+(0.136400798995)*x_ref[2]
-        ref[3,2,0,1]=(-0.440674414328)*x_ref[0]**o+(0.118228612687)*x_ref[0]+(-0.700026492613)*x_ref[1]**o+(-0.981341215714)*x_ref[1]+(-0.172847519578)*x_ref[2]**o+(-0.423095202172)*x_ref[2]
-        ref[3,2,1,0]=(-0.0694960391695)*x_ref[0]**o+(-0.66448610135)*x_ref[0]+(-0.177572703748)*x_ref[1]**o+(-0.060488161727)*x_ref[1]+(0.306021853885)*x_ref[2]**o+(0.0730338716187)*x_ref[2]
-        ref[3,2,1,1]=(-0.360662154547)*x_ref[0]**o+(0.577679359648)*x_ref[0]+(-0.515313534966)*x_ref[1]**o+(0.217352687358)*x_ref[1]+(0.728367577882)*x_ref[2]**o+(0.38505849834)*x_ref[2]
-        ref[3,2,2,0]=(0.568671861232)*x_ref[0]**o+(-0.0792490917882)*x_ref[0]+(0.0188002885229)*x_ref[1]**o+(-0.956862575759)*x_ref[1]+(-0.844332442983)*x_ref[2]**o+(0.670792928042)*x_ref[2]
-        ref[3,2,2,1]=(0.833099204713)*x_ref[0]**o+(0.368482169933)*x_ref[0]+(-0.926002498892)*x_ref[1]**o+(-0.130646446568)*x_ref[1]+(0.81164928914)*x_ref[2]**o+(-0.641079919927)*x_ref[2]
-        ref[3,3,0,0]=(-0.277769350989)*x_ref[0]**o+(0.753452018649)*x_ref[0]+(-0.766322344505)*x_ref[1]**o+(-0.679108224612)*x_ref[1]+(0.0799499795424)*x_ref[2]**o+(0.255751308975)*x_ref[2]
-        ref[3,3,0,1]=(0.429176753733)*x_ref[0]**o+(0.123106050259)*x_ref[0]+(-0.169037728992)*x_ref[1]**o+(0.749245933687)*x_ref[1]+(0.560140859355)*x_ref[2]**o+(-0.937091840021)*x_ref[2]
-        ref[3,3,1,0]=(0.648792557593)*x_ref[0]**o+(-0.057555187513)*x_ref[0]+(0.883290331726)*x_ref[1]**o+(0.539276905995)*x_ref[1]+(0.473614408583)*x_ref[2]**o+(0.723258340333)*x_ref[2]
-        ref[3,3,1,1]=(0.527298833572)*x_ref[0]**o+(0.0753824058279)*x_ref[0]+(0.719196099257)*x_ref[1]**o+(-0.0124603350035)*x_ref[1]+(-0.964484650253)*x_ref[2]**o+(0.404444269694)*x_ref[2]
-        ref[3,3,2,0]=(-0.403640677462)*x_ref[0]**o+(0.906195964766)*x_ref[0]+(-0.561419078404)*x_ref[1]**o+(0.645408717838)*x_ref[1]+(0.671624799609)*x_ref[2]**o+(-0.573901868621)*x_ref[2]
-        ref[3,3,2,1]=(-0.288117182165)*x_ref[0]**o+(-0.391003584945)*x_ref[0]+(-0.555037182038)*x_ref[1]**o+(0.299362209017)*x_ref[1]+(-0.552429724326)*x_ref[2]**o+(-0.416923306774)*x_ref[2]
-        ref[3,4,0,0]=(-0.19594719192)*x_ref[0]**o+(0.150898934692)*x_ref[0]+(0.210935232044)*x_ref[1]**o+(-0.319764293347)*x_ref[1]+(-0.642450751195)*x_ref[2]**o+(0.22231085168)*x_ref[2]
-        ref[3,4,0,1]=(-0.0514589460225)*x_ref[0]**o+(0.0366025646754)*x_ref[0]+(0.416280576691)*x_ref[1]**o+(0.609178063951)*x_ref[1]+(0.835611677062)*x_ref[2]**o+(-0.131630571478)*x_ref[2]
-        ref[3,4,1,0]=(0.171509152214)*x_ref[0]**o+(-0.761188271093)*x_ref[0]+(-0.915951802896)*x_ref[1]**o+(-0.451796709915)*x_ref[1]+(-0.979847828162)*x_ref[2]**o+(0.0566453393315)*x_ref[2]
-        ref[3,4,1,1]=(0.690427998102)*x_ref[0]**o+(-0.358318625695)*x_ref[0]+(0.330270871613)*x_ref[1]**o+(-0.724392522137)*x_ref[1]+(-0.535474623489)*x_ref[2]**o+(-0.12341743885)*x_ref[2]
-        ref[3,4,2,0]=(0.488090753426)*x_ref[0]**o+(-0.352417078372)*x_ref[0]+(0.971988099319)*x_ref[1]**o+(-0.288929516009)*x_ref[1]+(0.612576734094)*x_ref[2]**o+(-0.43799514603)*x_ref[2]
-        ref[3,4,2,1]=(-0.098768101356)*x_ref[0]**o+(0.123300661895)*x_ref[0]+(-0.0489724280789)*x_ref[1]**o+(-0.422508669137)*x_ref[1]+(-0.861483104139)*x_ref[2]**o+(0.950198316001)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.724373964817)*x[0]**o+(-0.0560850774901)*x[0]+(0.201815078281)*x[1]**o+(-0.721683697048)*x[1]
-        ref=(0.724373964817)*x_ref[0]**o+(-0.0560850774901)*x_ref[0]+(0.201815078281)*x_ref[1]**o+(-0.721683697048)*x_ref[1]
-      else:
-        arg=(0.390296010052)*x[0]**o+(-0.279464234123)*x[0]+(-0.791334947488)*x[1]**o+(-0.0210629346704)*x[1]+(0.0816556526012)*x[2]**o+(0.77326269137)*x[2]
-        ref=(0.390296010052)*x_ref[0]**o+(-0.279464234123)*x_ref[0]+(-0.791334947488)*x_ref[1]**o+(-0.0210629346704)*x_ref[1]+(0.0816556526012)*x_ref[2]**o+(0.77326269137)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.645585823917)*x[0]**o+(-0.203443728436)*x[0]+(0.278126891692)*x[1]**o+(0.922093564911)*x[1]
-        arg[1]=(0.23370137029)*x[0]**o+(0.84371173541)*x[0]+(0.99297574548)*x[1]**o+(0.72481785931)*x[1]
-        ref[0]=(0.645585823917)*x_ref[0]**o+(-0.203443728436)*x_ref[0]+(0.278126891692)*x_ref[1]**o+(0.922093564911)*x_ref[1]
-        ref[1]=(0.23370137029)*x_ref[0]**o+(0.84371173541)*x_ref[0]+(0.99297574548)*x_ref[1]**o+(0.72481785931)*x_ref[1]
-      else:
-        arg[0]=(0.159998049951)*x[0]**o+(-0.863367327023)*x[0]+(-0.0628498246638)*x[1]**o+(0.685139358273)*x[1]+(0.783213360641)*x[2]**o+(0.397526421338)*x[2]
-        arg[1]=(0.165519279053)*x[0]**o+(-0.0936018967661)*x[0]+(0.863047696619)*x[1]**o+(0.653118186434)*x[1]+(-0.408224131944)*x[2]**o+(0.82400132854)*x[2]
-        ref[0]=(0.159998049951)*x_ref[0]**o+(-0.863367327023)*x_ref[0]+(-0.0628498246638)*x_ref[1]**o+(0.685139358273)*x_ref[1]+(0.783213360641)*x_ref[2]**o+(0.397526421338)*x_ref[2]
-        ref[1]=(0.165519279053)*x_ref[0]**o+(-0.0936018967661)*x_ref[0]+(0.863047696619)*x_ref[1]**o+(0.653118186434)*x_ref[1]+(-0.408224131944)*x_ref[2]**o+(0.82400132854)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.490709482882)*x[0]**o+(0.518382584887)*x[0]+(-0.940707425885)*x[1]**o+(0.224578726673)*x[1]
-        arg[0,1]=(-0.747621141516)*x[0]**o+(-0.217452489097)*x[0]+(0.929120128008)*x[1]**o+(0.55263700209)*x[1]
-        arg[0,2]=(-0.183545119672)*x[0]**o+(0.148192386895)*x[0]+(-0.22046309708)*x[1]**o+(0.433620446668)*x[1]
-        arg[0,3]=(-0.0724840266959)*x[0]**o+(0.835144620602)*x[0]+(-0.962971534144)*x[1]**o+(-0.149681811534)*x[1]
-        arg[0,4]=(-0.380150192228)*x[0]**o+(-0.309494603814)*x[0]+(-0.217425635182)*x[1]**o+(0.93567286482)*x[1]
-        arg[1,0]=(0.0367921563947)*x[0]**o+(0.220217625576)*x[0]+(-0.120595819238)*x[1]**o+(0.308108793279)*x[1]
-        arg[1,1]=(-0.142860237109)*x[0]**o+(-0.789758888253)*x[0]+(0.748085258229)*x[1]**o+(0.784767485883)*x[1]
-        arg[1,2]=(-0.154690818845)*x[0]**o+(-0.678458370784)*x[0]+(0.750742996193)*x[1]**o+(-0.350199095531)*x[1]
-        arg[1,3]=(-0.893295215013)*x[0]**o+(0.0295805814985)*x[0]+(0.265893730887)*x[1]**o+(0.435487860418)*x[1]
-        arg[1,4]=(-0.302701704727)*x[0]**o+(0.618274652266)*x[0]+(-0.688386407308)*x[1]**o+(-0.832515064466)*x[1]
-        arg[2,0]=(-0.926658745469)*x[0]**o+(0.548174350496)*x[0]+(-0.350700366641)*x[1]**o+(0.530188602011)*x[1]
-        arg[2,1]=(0.900965385167)*x[0]**o+(0.0234051845124)*x[0]+(-0.00783834941699)*x[1]**o+(-0.766352156598)*x[1]
-        arg[2,2]=(0.694733282444)*x[0]**o+(-0.0644519234093)*x[0]+(0.0493475528391)*x[1]**o+(-0.589101546403)*x[1]
-        arg[2,3]=(-0.100333102737)*x[0]**o+(-0.633740106784)*x[0]+(0.408697826034)*x[1]**o+(-0.429059439472)*x[1]
-        arg[2,4]=(0.635563324404)*x[0]**o+(0.955881346028)*x[0]+(0.0755013269452)*x[1]**o+(-0.743681282337)*x[1]
-        arg[3,0]=(0.604891134834)*x[0]**o+(0.942047409702)*x[0]+(-0.00544373299112)*x[1]**o+(0.447523533166)*x[1]
-        arg[3,1]=(-0.980967446837)*x[0]**o+(0.019824933239)*x[0]+(-0.826876930392)*x[1]**o+(0.113548968693)*x[1]
-        arg[3,2]=(-0.731417395373)*x[0]**o+(-0.275072472108)*x[0]+(0.933867711492)*x[1]**o+(-0.444847972819)*x[1]
-        arg[3,3]=(0.00121172413626)*x[0]**o+(-0.171073908218)*x[0]+(0.913182873344)*x[1]**o+(0.960256570926)*x[1]
-        arg[3,4]=(-0.395134372727)*x[0]**o+(0.646385082409)*x[0]+(0.17387019219)*x[1]**o+(-0.287550462397)*x[1]
-        ref[0,0]=(0.490709482882)*x_ref[0]**o+(0.518382584887)*x_ref[0]+(-0.940707425885)*x_ref[1]**o+(0.224578726673)*x_ref[1]
-        ref[0,1]=(-0.747621141516)*x_ref[0]**o+(-0.217452489097)*x_ref[0]+(0.929120128008)*x_ref[1]**o+(0.55263700209)*x_ref[1]
-        ref[0,2]=(-0.183545119672)*x_ref[0]**o+(0.148192386895)*x_ref[0]+(-0.22046309708)*x_ref[1]**o+(0.433620446668)*x_ref[1]
-        ref[0,3]=(-0.0724840266959)*x_ref[0]**o+(0.835144620602)*x_ref[0]+(-0.962971534144)*x_ref[1]**o+(-0.149681811534)*x_ref[1]
-        ref[0,4]=(-0.380150192228)*x_ref[0]**o+(-0.309494603814)*x_ref[0]+(-0.217425635182)*x_ref[1]**o+(0.93567286482)*x_ref[1]
-        ref[1,0]=(0.0367921563947)*x_ref[0]**o+(0.220217625576)*x_ref[0]+(-0.120595819238)*x_ref[1]**o+(0.308108793279)*x_ref[1]
-        ref[1,1]=(-0.142860237109)*x_ref[0]**o+(-0.789758888253)*x_ref[0]+(0.748085258229)*x_ref[1]**o+(0.784767485883)*x_ref[1]
-        ref[1,2]=(-0.154690818845)*x_ref[0]**o+(-0.678458370784)*x_ref[0]+(0.750742996193)*x_ref[1]**o+(-0.350199095531)*x_ref[1]
-        ref[1,3]=(-0.893295215013)*x_ref[0]**o+(0.0295805814985)*x_ref[0]+(0.265893730887)*x_ref[1]**o+(0.435487860418)*x_ref[1]
-        ref[1,4]=(-0.302701704727)*x_ref[0]**o+(0.618274652266)*x_ref[0]+(-0.688386407308)*x_ref[1]**o+(-0.832515064466)*x_ref[1]
-        ref[2,0]=(-0.926658745469)*x_ref[0]**o+(0.548174350496)*x_ref[0]+(-0.350700366641)*x_ref[1]**o+(0.530188602011)*x_ref[1]
-        ref[2,1]=(0.900965385167)*x_ref[0]**o+(0.0234051845124)*x_ref[0]+(-0.00783834941699)*x_ref[1]**o+(-0.766352156598)*x_ref[1]
-        ref[2,2]=(0.694733282444)*x_ref[0]**o+(-0.0644519234093)*x_ref[0]+(0.0493475528391)*x_ref[1]**o+(-0.589101546403)*x_ref[1]
-        ref[2,3]=(-0.100333102737)*x_ref[0]**o+(-0.633740106784)*x_ref[0]+(0.408697826034)*x_ref[1]**o+(-0.429059439472)*x_ref[1]
-        ref[2,4]=(0.635563324404)*x_ref[0]**o+(0.955881346028)*x_ref[0]+(0.0755013269452)*x_ref[1]**o+(-0.743681282337)*x_ref[1]
-        ref[3,0]=(0.604891134834)*x_ref[0]**o+(0.942047409702)*x_ref[0]+(-0.00544373299112)*x_ref[1]**o+(0.447523533166)*x_ref[1]
-        ref[3,1]=(-0.980967446837)*x_ref[0]**o+(0.019824933239)*x_ref[0]+(-0.826876930392)*x_ref[1]**o+(0.113548968693)*x_ref[1]
-        ref[3,2]=(-0.731417395373)*x_ref[0]**o+(-0.275072472108)*x_ref[0]+(0.933867711492)*x_ref[1]**o+(-0.444847972819)*x_ref[1]
-        ref[3,3]=(0.00121172413626)*x_ref[0]**o+(-0.171073908218)*x_ref[0]+(0.913182873344)*x_ref[1]**o+(0.960256570926)*x_ref[1]
-        ref[3,4]=(-0.395134372727)*x_ref[0]**o+(0.646385082409)*x_ref[0]+(0.17387019219)*x_ref[1]**o+(-0.287550462397)*x_ref[1]
-      else:
-        arg[0,0]=(0.386545340192)*x[0]**o+(-0.397636296285)*x[0]+(-0.849437816516)*x[1]**o+(-0.83083406493)*x[1]+(0.479216612031)*x[2]**o+(0.0903787541308)*x[2]
-        arg[0,1]=(-0.331651855726)*x[0]**o+(0.849421626918)*x[0]+(0.528368477362)*x[1]**o+(-0.015122214824)*x[1]+(0.494310578452)*x[2]**o+(0.190239928161)*x[2]
-        arg[0,2]=(-0.662389759646)*x[0]**o+(0.204378343962)*x[0]+(0.486802744897)*x[1]**o+(0.822174784922)*x[1]+(-0.309203812647)*x[2]**o+(-0.101665040799)*x[2]
-        arg[0,3]=(0.609106341828)*x[0]**o+(0.658404088333)*x[0]+(-0.0092991120732)*x[1]**o+(-0.73794934348)*x[1]+(0.270245135914)*x[2]**o+(-0.594067838407)*x[2]
-        arg[0,4]=(-0.291752213357)*x[0]**o+(-0.596751343066)*x[0]+(-0.109196903078)*x[1]**o+(-0.868610307708)*x[1]+(0.622541308544)*x[2]**o+(0.482202762224)*x[2]
-        arg[1,0]=(-0.113988933227)*x[0]**o+(-0.846328804695)*x[0]+(0.691769553626)*x[1]**o+(-0.377441645148)*x[1]+(-0.769857970682)*x[2]**o+(-0.583083729037)*x[2]
-        arg[1,1]=(-0.635333757145)*x[0]**o+(0.194761117849)*x[0]+(-0.268287296731)*x[1]**o+(0.463906930647)*x[1]+(0.768293821029)*x[2]**o+(-0.532824906687)*x[2]
-        arg[1,2]=(0.355380090138)*x[0]**o+(-0.181191575848)*x[0]+(-0.558667766467)*x[1]**o+(0.561707671872)*x[1]+(-0.427004232725)*x[2]**o+(-0.996564299989)*x[2]
-        arg[1,3]=(-0.891638892893)*x[0]**o+(0.0867350850512)*x[0]+(0.880258390584)*x[1]**o+(-0.798123407525)*x[1]+(-0.571505202201)*x[2]**o+(0.35374245063)*x[2]
-        arg[1,4]=(0.543632496941)*x[0]**o+(-0.630363803582)*x[0]+(0.38107312058)*x[1]**o+(0.222401831883)*x[1]+(-0.932212080175)*x[2]**o+(-0.0482899826174)*x[2]
-        arg[2,0]=(0.46514308325)*x[0]**o+(-0.907464652384)*x[0]+(-0.706105595148)*x[1]**o+(0.486989958675)*x[1]+(0.422702683485)*x[2]**o+(0.640916925932)*x[2]
-        arg[2,1]=(0.912808317479)*x[0]**o+(-0.860779312763)*x[0]+(-0.915364956133)*x[1]**o+(-0.314186117224)*x[1]+(-0.860814410035)*x[2]**o+(0.837570442722)*x[2]
-        arg[2,2]=(0.00932917919464)*x[0]**o+(0.393773283049)*x[0]+(0.699998572668)*x[1]**o+(0.153407885795)*x[1]+(-0.166245189281)*x[2]**o+(-0.430541214236)*x[2]
-        arg[2,3]=(-0.00127511229816)*x[0]**o+(-0.327443174924)*x[0]+(0.61881322537)*x[1]**o+(-0.725854102962)*x[1]+(0.650649062427)*x[2]**o+(0.246373184041)*x[2]
-        arg[2,4]=(-0.530580898049)*x[0]**o+(-0.208506132901)*x[0]+(-0.102049332015)*x[1]**o+(-0.537037644189)*x[1]+(0.740113470729)*x[2]**o+(0.12094405264)*x[2]
-        arg[3,0]=(-0.103423602042)*x[0]**o+(-0.535742323666)*x[0]+(0.678663019405)*x[1]**o+(0.579375950057)*x[1]+(0.323627490052)*x[2]**o+(-0.681323301356)*x[2]
-        arg[3,1]=(0.670239087519)*x[0]**o+(0.209657968128)*x[0]+(-0.357490300727)*x[1]**o+(-0.441776782321)*x[1]+(0.00927389037562)*x[2]**o+(0.633527599723)*x[2]
-        arg[3,2]=(0.415569606138)*x[0]**o+(-0.422211616068)*x[0]+(-0.695086235645)*x[1]**o+(0.709158289848)*x[1]+(-0.523450845183)*x[2]**o+(0.555778994398)*x[2]
-        arg[3,3]=(0.0188993892075)*x[0]**o+(0.611088737828)*x[0]+(0.0313795167921)*x[1]**o+(0.0842651755016)*x[1]+(0.288414199415)*x[2]**o+(0.695910780235)*x[2]
-        arg[3,4]=(-0.500338800879)*x[0]**o+(0.0984192369328)*x[0]+(0.71163172992)*x[1]**o+(-0.102123116139)*x[1]+(0.954613955678)*x[2]**o+(0.384872409422)*x[2]
-        ref[0,0]=(0.386545340192)*x_ref[0]**o+(-0.397636296285)*x_ref[0]+(-0.849437816516)*x_ref[1]**o+(-0.83083406493)*x_ref[1]+(0.479216612031)*x_ref[2]**o+(0.0903787541308)*x_ref[2]
-        ref[0,1]=(-0.331651855726)*x_ref[0]**o+(0.849421626918)*x_ref[0]+(0.528368477362)*x_ref[1]**o+(-0.015122214824)*x_ref[1]+(0.494310578452)*x_ref[2]**o+(0.190239928161)*x_ref[2]
-        ref[0,2]=(-0.662389759646)*x_ref[0]**o+(0.204378343962)*x_ref[0]+(0.486802744897)*x_ref[1]**o+(0.822174784922)*x_ref[1]+(-0.309203812647)*x_ref[2]**o+(-0.101665040799)*x_ref[2]
-        ref[0,3]=(0.609106341828)*x_ref[0]**o+(0.658404088333)*x_ref[0]+(-0.0092991120732)*x_ref[1]**o+(-0.73794934348)*x_ref[1]+(0.270245135914)*x_ref[2]**o+(-0.594067838407)*x_ref[2]
-        ref[0,4]=(-0.291752213357)*x_ref[0]**o+(-0.596751343066)*x_ref[0]+(-0.109196903078)*x_ref[1]**o+(-0.868610307708)*x_ref[1]+(0.622541308544)*x_ref[2]**o+(0.482202762224)*x_ref[2]
-        ref[1,0]=(-0.113988933227)*x_ref[0]**o+(-0.846328804695)*x_ref[0]+(0.691769553626)*x_ref[1]**o+(-0.377441645148)*x_ref[1]+(-0.769857970682)*x_ref[2]**o+(-0.583083729037)*x_ref[2]
-        ref[1,1]=(-0.635333757145)*x_ref[0]**o+(0.194761117849)*x_ref[0]+(-0.268287296731)*x_ref[1]**o+(0.463906930647)*x_ref[1]+(0.768293821029)*x_ref[2]**o+(-0.532824906687)*x_ref[2]
-        ref[1,2]=(0.355380090138)*x_ref[0]**o+(-0.181191575848)*x_ref[0]+(-0.558667766467)*x_ref[1]**o+(0.561707671872)*x_ref[1]+(-0.427004232725)*x_ref[2]**o+(-0.996564299989)*x_ref[2]
-        ref[1,3]=(-0.891638892893)*x_ref[0]**o+(0.0867350850512)*x_ref[0]+(0.880258390584)*x_ref[1]**o+(-0.798123407525)*x_ref[1]+(-0.571505202201)*x_ref[2]**o+(0.35374245063)*x_ref[2]
-        ref[1,4]=(0.543632496941)*x_ref[0]**o+(-0.630363803582)*x_ref[0]+(0.38107312058)*x_ref[1]**o+(0.222401831883)*x_ref[1]+(-0.932212080175)*x_ref[2]**o+(-0.0482899826174)*x_ref[2]
-        ref[2,0]=(0.46514308325)*x_ref[0]**o+(-0.907464652384)*x_ref[0]+(-0.706105595148)*x_ref[1]**o+(0.486989958675)*x_ref[1]+(0.422702683485)*x_ref[2]**o+(0.640916925932)*x_ref[2]
-        ref[2,1]=(0.912808317479)*x_ref[0]**o+(-0.860779312763)*x_ref[0]+(-0.915364956133)*x_ref[1]**o+(-0.314186117224)*x_ref[1]+(-0.860814410035)*x_ref[2]**o+(0.837570442722)*x_ref[2]
-        ref[2,2]=(0.00932917919464)*x_ref[0]**o+(0.393773283049)*x_ref[0]+(0.699998572668)*x_ref[1]**o+(0.153407885795)*x_ref[1]+(-0.166245189281)*x_ref[2]**o+(-0.430541214236)*x_ref[2]
-        ref[2,3]=(-0.00127511229816)*x_ref[0]**o+(-0.327443174924)*x_ref[0]+(0.61881322537)*x_ref[1]**o+(-0.725854102962)*x_ref[1]+(0.650649062427)*x_ref[2]**o+(0.246373184041)*x_ref[2]
-        ref[2,4]=(-0.530580898049)*x_ref[0]**o+(-0.208506132901)*x_ref[0]+(-0.102049332015)*x_ref[1]**o+(-0.537037644189)*x_ref[1]+(0.740113470729)*x_ref[2]**o+(0.12094405264)*x_ref[2]
-        ref[3,0]=(-0.103423602042)*x_ref[0]**o+(-0.535742323666)*x_ref[0]+(0.678663019405)*x_ref[1]**o+(0.579375950057)*x_ref[1]+(0.323627490052)*x_ref[2]**o+(-0.681323301356)*x_ref[2]
-        ref[3,1]=(0.670239087519)*x_ref[0]**o+(0.209657968128)*x_ref[0]+(-0.357490300727)*x_ref[1]**o+(-0.441776782321)*x_ref[1]+(0.00927389037562)*x_ref[2]**o+(0.633527599723)*x_ref[2]
-        ref[3,2]=(0.415569606138)*x_ref[0]**o+(-0.422211616068)*x_ref[0]+(-0.695086235645)*x_ref[1]**o+(0.709158289848)*x_ref[1]+(-0.523450845183)*x_ref[2]**o+(0.555778994398)*x_ref[2]
-        ref[3,3]=(0.0188993892075)*x_ref[0]**o+(0.611088737828)*x_ref[0]+(0.0313795167921)*x_ref[1]**o+(0.0842651755016)*x_ref[1]+(0.288414199415)*x_ref[2]**o+(0.695910780235)*x_ref[2]
-        ref[3,4]=(-0.500338800879)*x_ref[0]**o+(0.0984192369328)*x_ref[0]+(0.71163172992)*x_ref[1]**o+(-0.102123116139)*x_ref[1]+(0.954613955678)*x_ref[2]**o+(0.384872409422)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.317274364174)*x[0]**o+(-0.565307843766)*x[0]+(-0.367874638208)*x[1]**o+(0.0029581033546)*x[1]
-        arg[0,0,1]=(0.832728755858)*x[0]**o+(0.245271193641)*x[0]+(-0.727130029377)*x[1]**o+(0.137912975829)*x[1]
-        arg[0,1,0]=(-0.634508968932)*x[0]**o+(-0.864200861637)*x[0]+(-0.566985971867)*x[1]**o+(0.458187145519)*x[1]
-        arg[0,1,1]=(0.133772683885)*x[0]**o+(-0.630800341215)*x[0]+(0.958934971335)*x[1]**o+(-0.15839182257)*x[1]
-        arg[1,0,0]=(-0.0948724752087)*x[0]**o+(-0.25589337469)*x[0]+(-0.315713312867)*x[1]**o+(0.223487524432)*x[1]
-        arg[1,0,1]=(0.794634271698)*x[0]**o+(-0.505797079712)*x[0]+(0.54367349338)*x[1]**o+(0.610149581933)*x[1]
-        arg[1,1,0]=(-0.447039667341)*x[0]**o+(-0.917009838715)*x[0]+(0.525331113522)*x[1]**o+(-0.626176620973)*x[1]
-        arg[1,1,1]=(0.0749028334839)*x[0]**o+(0.106950341725)*x[0]+(-0.375321288987)*x[1]**o+(0.510260762626)*x[1]
-        arg[2,0,0]=(-0.286661970669)*x[0]**o+(0.584169107201)*x[0]+(0.189852415568)*x[1]**o+(-0.685695910848)*x[1]
-        arg[2,0,1]=(-0.689509796724)*x[0]**o+(-0.316067007053)*x[0]+(0.93758916753)*x[1]**o+(0.987368705364)*x[1]
-        arg[2,1,0]=(-0.411695937554)*x[0]**o+(0.858528628791)*x[0]+(-0.579361651418)*x[1]**o+(-0.179617869494)*x[1]
-        arg[2,1,1]=(0.871441175049)*x[0]**o+(0.445176827889)*x[0]+(0.282613647019)*x[1]**o+(-0.0414230375843)*x[1]
-        arg[3,0,0]=(-0.242136375691)*x[0]**o+(-0.91917484201)*x[0]+(-0.88026838607)*x[1]**o+(0.363309786006)*x[1]
-        arg[3,0,1]=(-0.991221762386)*x[0]**o+(-0.0149280738883)*x[0]+(0.420322977563)*x[1]**o+(-0.0533076687981)*x[1]
-        arg[3,1,0]=(-0.889003524303)*x[0]**o+(-0.023519502168)*x[0]+(0.826015855889)*x[1]**o+(0.0568467842617)*x[1]
-        arg[3,1,1]=(0.608567002824)*x[0]**o+(-0.531288593441)*x[0]+(0.0886678034719)*x[1]**o+(-0.732353220319)*x[1]
-        arg[4,0,0]=(-0.0537755786538)*x[0]**o+(-0.475886396481)*x[0]+(-0.153787571145)*x[1]**o+(0.689850737569)*x[1]
-        arg[4,0,1]=(0.413017674549)*x[0]**o+(-0.993353261494)*x[0]+(-0.944597571268)*x[1]**o+(0.566423551758)*x[1]
-        arg[4,1,0]=(-0.716864417268)*x[0]**o+(-0.871574272865)*x[0]+(0.394071572628)*x[1]**o+(0.452903048597)*x[1]
-        arg[4,1,1]=(0.861790785883)*x[0]**o+(-0.511789401943)*x[0]+(-0.272452527007)*x[1]**o+(-0.379021521619)*x[1]
-        arg[5,0,0]=(0.509668147054)*x[0]**o+(0.919355584411)*x[0]+(-0.673215166917)*x[1]**o+(0.766459631931)*x[1]
-        arg[5,0,1]=(0.177006227916)*x[0]**o+(-0.275118477)*x[0]+(0.0302367843701)*x[1]**o+(-0.761226360328)*x[1]
-        arg[5,1,0]=(0.013432534638)*x[0]**o+(-0.911626567027)*x[0]+(-0.710520442529)*x[1]**o+(-0.882317448423)*x[1]
-        arg[5,1,1]=(0.595583093615)*x[0]**o+(0.163527905156)*x[0]+(-0.122165051333)*x[1]**o+(-0.526359288181)*x[1]
-        ref[0,0,0]=(0.317274364174)*x_ref[0]**o+(-0.565307843766)*x_ref[0]+(-0.367874638208)*x_ref[1]**o+(0.0029581033546)*x_ref[1]
-        ref[0,0,1]=(0.832728755858)*x_ref[0]**o+(0.245271193641)*x_ref[0]+(-0.727130029377)*x_ref[1]**o+(0.137912975829)*x_ref[1]
-        ref[0,1,0]=(-0.634508968932)*x_ref[0]**o+(-0.864200861637)*x_ref[0]+(-0.566985971867)*x_ref[1]**o+(0.458187145519)*x_ref[1]
-        ref[0,1,1]=(0.133772683885)*x_ref[0]**o+(-0.630800341215)*x_ref[0]+(0.958934971335)*x_ref[1]**o+(-0.15839182257)*x_ref[1]
-        ref[1,0,0]=(-0.0948724752087)*x_ref[0]**o+(-0.25589337469)*x_ref[0]+(-0.315713312867)*x_ref[1]**o+(0.223487524432)*x_ref[1]
-        ref[1,0,1]=(0.794634271698)*x_ref[0]**o+(-0.505797079712)*x_ref[0]+(0.54367349338)*x_ref[1]**o+(0.610149581933)*x_ref[1]
-        ref[1,1,0]=(-0.447039667341)*x_ref[0]**o+(-0.917009838715)*x_ref[0]+(0.525331113522)*x_ref[1]**o+(-0.626176620973)*x_ref[1]
-        ref[1,1,1]=(0.0749028334839)*x_ref[0]**o+(0.106950341725)*x_ref[0]+(-0.375321288987)*x_ref[1]**o+(0.510260762626)*x_ref[1]
-        ref[2,0,0]=(-0.286661970669)*x_ref[0]**o+(0.584169107201)*x_ref[0]+(0.189852415568)*x_ref[1]**o+(-0.685695910848)*x_ref[1]
-        ref[2,0,1]=(-0.689509796724)*x_ref[0]**o+(-0.316067007053)*x_ref[0]+(0.93758916753)*x_ref[1]**o+(0.987368705364)*x_ref[1]
-        ref[2,1,0]=(-0.411695937554)*x_ref[0]**o+(0.858528628791)*x_ref[0]+(-0.579361651418)*x_ref[1]**o+(-0.179617869494)*x_ref[1]
-        ref[2,1,1]=(0.871441175049)*x_ref[0]**o+(0.445176827889)*x_ref[0]+(0.282613647019)*x_ref[1]**o+(-0.0414230375843)*x_ref[1]
-        ref[3,0,0]=(-0.242136375691)*x_ref[0]**o+(-0.91917484201)*x_ref[0]+(-0.88026838607)*x_ref[1]**o+(0.363309786006)*x_ref[1]
-        ref[3,0,1]=(-0.991221762386)*x_ref[0]**o+(-0.0149280738883)*x_ref[0]+(0.420322977563)*x_ref[1]**o+(-0.0533076687981)*x_ref[1]
-        ref[3,1,0]=(-0.889003524303)*x_ref[0]**o+(-0.023519502168)*x_ref[0]+(0.826015855889)*x_ref[1]**o+(0.0568467842617)*x_ref[1]
-        ref[3,1,1]=(0.608567002824)*x_ref[0]**o+(-0.531288593441)*x_ref[0]+(0.0886678034719)*x_ref[1]**o+(-0.732353220319)*x_ref[1]
-        ref[4,0,0]=(-0.0537755786538)*x_ref[0]**o+(-0.475886396481)*x_ref[0]+(-0.153787571145)*x_ref[1]**o+(0.689850737569)*x_ref[1]
-        ref[4,0,1]=(0.413017674549)*x_ref[0]**o+(-0.993353261494)*x_ref[0]+(-0.944597571268)*x_ref[1]**o+(0.566423551758)*x_ref[1]
-        ref[4,1,0]=(-0.716864417268)*x_ref[0]**o+(-0.871574272865)*x_ref[0]+(0.394071572628)*x_ref[1]**o+(0.452903048597)*x_ref[1]
-        ref[4,1,1]=(0.861790785883)*x_ref[0]**o+(-0.511789401943)*x_ref[0]+(-0.272452527007)*x_ref[1]**o+(-0.379021521619)*x_ref[1]
-        ref[5,0,0]=(0.509668147054)*x_ref[0]**o+(0.919355584411)*x_ref[0]+(-0.673215166917)*x_ref[1]**o+(0.766459631931)*x_ref[1]
-        ref[5,0,1]=(0.177006227916)*x_ref[0]**o+(-0.275118477)*x_ref[0]+(0.0302367843701)*x_ref[1]**o+(-0.761226360328)*x_ref[1]
-        ref[5,1,0]=(0.013432534638)*x_ref[0]**o+(-0.911626567027)*x_ref[0]+(-0.710520442529)*x_ref[1]**o+(-0.882317448423)*x_ref[1]
-        ref[5,1,1]=(0.595583093615)*x_ref[0]**o+(0.163527905156)*x_ref[0]+(-0.122165051333)*x_ref[1]**o+(-0.526359288181)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.230695674262)*x[0]**o+(-0.987212801716)*x[0]+(-0.0599001434987)*x[1]**o+(0.719591259555)*x[1]+(-0.665186369759)*x[2]**o+(-0.563552602515)*x[2]
-        arg[0,0,1]=(-0.775441966131)*x[0]**o+(-0.152166849702)*x[0]+(0.626466789363)*x[1]**o+(0.179356346581)*x[1]+(-0.687406927434)*x[2]**o+(-0.563492313114)*x[2]
-        arg[0,1,0]=(0.749522748133)*x[0]**o+(-0.582456308337)*x[0]+(0.676882643058)*x[1]**o+(0.365363182598)*x[1]+(-0.550867708812)*x[2]**o+(0.777938151183)*x[2]
-        arg[0,1,1]=(0.389788552775)*x[0]**o+(-0.298877489997)*x[0]+(0.560326209269)*x[1]**o+(-0.113249832155)*x[1]+(0.588087510254)*x[2]**o+(-0.593503776461)*x[2]
-        arg[1,0,0]=(-0.354661103909)*x[0]**o+(-0.195375369549)*x[0]+(-0.798795069895)*x[1]**o+(0.0968631048579)*x[1]+(-0.016118190391)*x[2]**o+(-0.903745407705)*x[2]
-        arg[1,0,1]=(-0.383688834784)*x[0]**o+(0.861256231933)*x[0]+(-0.767204834667)*x[1]**o+(0.338875482372)*x[1]+(0.117146310891)*x[2]**o+(-0.302651846083)*x[2]
-        arg[1,1,0]=(0.646263670969)*x[0]**o+(-0.447984008871)*x[0]+(-0.169322492785)*x[1]**o+(-0.570614724481)*x[1]+(-0.848518457618)*x[2]**o+(-0.0750005539216)*x[2]
-        arg[1,1,1]=(-0.232496745304)*x[0]**o+(0.182581173413)*x[0]+(0.8032436357)*x[1]**o+(-0.391266449476)*x[1]+(0.491677629766)*x[2]**o+(-0.188361708708)*x[2]
-        arg[2,0,0]=(-0.571145099091)*x[0]**o+(-0.486855242188)*x[0]+(0.52833582073)*x[1]**o+(0.326716348242)*x[1]+(0.528475192869)*x[2]**o+(0.163280575137)*x[2]
-        arg[2,0,1]=(-0.368889674601)*x[0]**o+(0.601775816775)*x[0]+(0.0281742455403)*x[1]**o+(-0.198869716243)*x[1]+(0.193343065506)*x[2]**o+(-0.0614451571108)*x[2]
-        arg[2,1,0]=(0.724595792492)*x[0]**o+(-0.206983407651)*x[0]+(-0.33966393719)*x[1]**o+(0.929465830796)*x[1]+(-0.938517195863)*x[2]**o+(0.70874077222)*x[2]
-        arg[2,1,1]=(-0.536303362606)*x[0]**o+(-0.430663025812)*x[0]+(-0.0845923469062)*x[1]**o+(0.866655631144)*x[1]+(-0.2378102403)*x[2]**o+(0.969070797268)*x[2]
-        arg[3,0,0]=(0.345137352559)*x[0]**o+(-0.696652518382)*x[0]+(0.914998974008)*x[1]**o+(-0.874935163156)*x[1]+(0.947812661283)*x[2]**o+(0.868611662789)*x[2]
-        arg[3,0,1]=(-0.421640746358)*x[0]**o+(-0.37925991208)*x[0]+(0.468281241452)*x[1]**o+(0.439086689805)*x[1]+(-0.607986317001)*x[2]**o+(0.269488168937)*x[2]
-        arg[3,1,0]=(-0.550485456473)*x[0]**o+(-0.520018714495)*x[0]+(0.439679309654)*x[1]**o+(-0.0652434084668)*x[1]+(-0.584838668708)*x[2]**o+(-0.46047281034)*x[2]
-        arg[3,1,1]=(-0.421746456038)*x[0]**o+(0.370489549278)*x[0]+(-0.683682295105)*x[1]**o+(0.324051718035)*x[1]+(-0.579046430636)*x[2]**o+(0.587623604941)*x[2]
-        arg[4,0,0]=(-0.167582584882)*x[0]**o+(0.524904122243)*x[0]+(0.665109348362)*x[1]**o+(-0.093655366509)*x[1]+(0.704404656254)*x[2]**o+(-0.402602441741)*x[2]
-        arg[4,0,1]=(0.633854964824)*x[0]**o+(-0.836385840194)*x[0]+(-0.0995437996628)*x[1]**o+(-0.200285338869)*x[1]+(0.535023783881)*x[2]**o+(0.884702543593)*x[2]
-        arg[4,1,0]=(-0.953619378208)*x[0]**o+(-0.390518815669)*x[0]+(-0.0590889178236)*x[1]**o+(-0.997225825019)*x[1]+(0.0520418736402)*x[2]**o+(0.484749465262)*x[2]
-        arg[4,1,1]=(-0.440389854756)*x[0]**o+(0.15520431778)*x[0]+(0.346839174513)*x[1]**o+(0.0172676873159)*x[1]+(0.86275919224)*x[2]**o+(0.568069148992)*x[2]
-        arg[5,0,0]=(-0.303687941217)*x[0]**o+(0.516115915687)*x[0]+(-0.750276597519)*x[1]**o+(0.734039058778)*x[1]+(-0.624499210252)*x[2]**o+(-0.926338135421)*x[2]
-        arg[5,0,1]=(-0.472230777895)*x[0]**o+(-0.557827728373)*x[0]+(-0.403783023157)*x[1]**o+(0.70433336955)*x[1]+(-0.0211737454531)*x[2]**o+(0.0774406125836)*x[2]
-        arg[5,1,0]=(0.718149875204)*x[0]**o+(-0.183000739787)*x[0]+(-0.655724252373)*x[1]**o+(-0.634941710776)*x[1]+(-0.26300163323)*x[2]**o+(-0.25105424715)*x[2]
-        arg[5,1,1]=(0.109601904441)*x[0]**o+(-0.00640764631554)*x[0]+(-0.488035610009)*x[1]**o+(0.909668323769)*x[1]+(0.229692168501)*x[2]**o+(-0.739241309497)*x[2]
-        ref[0,0,0]=(0.230695674262)*x_ref[0]**o+(-0.987212801716)*x_ref[0]+(-0.0599001434987)*x_ref[1]**o+(0.719591259555)*x_ref[1]+(-0.665186369759)*x_ref[2]**o+(-0.563552602515)*x_ref[2]
-        ref[0,0,1]=(-0.775441966131)*x_ref[0]**o+(-0.152166849702)*x_ref[0]+(0.626466789363)*x_ref[1]**o+(0.179356346581)*x_ref[1]+(-0.687406927434)*x_ref[2]**o+(-0.563492313114)*x_ref[2]
-        ref[0,1,0]=(0.749522748133)*x_ref[0]**o+(-0.582456308337)*x_ref[0]+(0.676882643058)*x_ref[1]**o+(0.365363182598)*x_ref[1]+(-0.550867708812)*x_ref[2]**o+(0.777938151183)*x_ref[2]
-        ref[0,1,1]=(0.389788552775)*x_ref[0]**o+(-0.298877489997)*x_ref[0]+(0.560326209269)*x_ref[1]**o+(-0.113249832155)*x_ref[1]+(0.588087510254)*x_ref[2]**o+(-0.593503776461)*x_ref[2]
-        ref[1,0,0]=(-0.354661103909)*x_ref[0]**o+(-0.195375369549)*x_ref[0]+(-0.798795069895)*x_ref[1]**o+(0.0968631048579)*x_ref[1]+(-0.016118190391)*x_ref[2]**o+(-0.903745407705)*x_ref[2]
-        ref[1,0,1]=(-0.383688834784)*x_ref[0]**o+(0.861256231933)*x_ref[0]+(-0.767204834667)*x_ref[1]**o+(0.338875482372)*x_ref[1]+(0.117146310891)*x_ref[2]**o+(-0.302651846083)*x_ref[2]
-        ref[1,1,0]=(0.646263670969)*x_ref[0]**o+(-0.447984008871)*x_ref[0]+(-0.169322492785)*x_ref[1]**o+(-0.570614724481)*x_ref[1]+(-0.848518457618)*x_ref[2]**o+(-0.0750005539216)*x_ref[2]
-        ref[1,1,1]=(-0.232496745304)*x_ref[0]**o+(0.182581173413)*x_ref[0]+(0.8032436357)*x_ref[1]**o+(-0.391266449476)*x_ref[1]+(0.491677629766)*x_ref[2]**o+(-0.188361708708)*x_ref[2]
-        ref[2,0,0]=(-0.571145099091)*x_ref[0]**o+(-0.486855242188)*x_ref[0]+(0.52833582073)*x_ref[1]**o+(0.326716348242)*x_ref[1]+(0.528475192869)*x_ref[2]**o+(0.163280575137)*x_ref[2]
-        ref[2,0,1]=(-0.368889674601)*x_ref[0]**o+(0.601775816775)*x_ref[0]+(0.0281742455403)*x_ref[1]**o+(-0.198869716243)*x_ref[1]+(0.193343065506)*x_ref[2]**o+(-0.0614451571108)*x_ref[2]
-        ref[2,1,0]=(0.724595792492)*x_ref[0]**o+(-0.206983407651)*x_ref[0]+(-0.33966393719)*x_ref[1]**o+(0.929465830796)*x_ref[1]+(-0.938517195863)*x_ref[2]**o+(0.70874077222)*x_ref[2]
-        ref[2,1,1]=(-0.536303362606)*x_ref[0]**o+(-0.430663025812)*x_ref[0]+(-0.0845923469062)*x_ref[1]**o+(0.866655631144)*x_ref[1]+(-0.2378102403)*x_ref[2]**o+(0.969070797268)*x_ref[2]
-        ref[3,0,0]=(0.345137352559)*x_ref[0]**o+(-0.696652518382)*x_ref[0]+(0.914998974008)*x_ref[1]**o+(-0.874935163156)*x_ref[1]+(0.947812661283)*x_ref[2]**o+(0.868611662789)*x_ref[2]
-        ref[3,0,1]=(-0.421640746358)*x_ref[0]**o+(-0.37925991208)*x_ref[0]+(0.468281241452)*x_ref[1]**o+(0.439086689805)*x_ref[1]+(-0.607986317001)*x_ref[2]**o+(0.269488168937)*x_ref[2]
-        ref[3,1,0]=(-0.550485456473)*x_ref[0]**o+(-0.520018714495)*x_ref[0]+(0.439679309654)*x_ref[1]**o+(-0.0652434084668)*x_ref[1]+(-0.584838668708)*x_ref[2]**o+(-0.46047281034)*x_ref[2]
-        ref[3,1,1]=(-0.421746456038)*x_ref[0]**o+(0.370489549278)*x_ref[0]+(-0.683682295105)*x_ref[1]**o+(0.324051718035)*x_ref[1]+(-0.579046430636)*x_ref[2]**o+(0.587623604941)*x_ref[2]
-        ref[4,0,0]=(-0.167582584882)*x_ref[0]**o+(0.524904122243)*x_ref[0]+(0.665109348362)*x_ref[1]**o+(-0.093655366509)*x_ref[1]+(0.704404656254)*x_ref[2]**o+(-0.402602441741)*x_ref[2]
-        ref[4,0,1]=(0.633854964824)*x_ref[0]**o+(-0.836385840194)*x_ref[0]+(-0.0995437996628)*x_ref[1]**o+(-0.200285338869)*x_ref[1]+(0.535023783881)*x_ref[2]**o+(0.884702543593)*x_ref[2]
-        ref[4,1,0]=(-0.953619378208)*x_ref[0]**o+(-0.390518815669)*x_ref[0]+(-0.0590889178236)*x_ref[1]**o+(-0.997225825019)*x_ref[1]+(0.0520418736402)*x_ref[2]**o+(0.484749465262)*x_ref[2]
-        ref[4,1,1]=(-0.440389854756)*x_ref[0]**o+(0.15520431778)*x_ref[0]+(0.346839174513)*x_ref[1]**o+(0.0172676873159)*x_ref[1]+(0.86275919224)*x_ref[2]**o+(0.568069148992)*x_ref[2]
-        ref[5,0,0]=(-0.303687941217)*x_ref[0]**o+(0.516115915687)*x_ref[0]+(-0.750276597519)*x_ref[1]**o+(0.734039058778)*x_ref[1]+(-0.624499210252)*x_ref[2]**o+(-0.926338135421)*x_ref[2]
-        ref[5,0,1]=(-0.472230777895)*x_ref[0]**o+(-0.557827728373)*x_ref[0]+(-0.403783023157)*x_ref[1]**o+(0.70433336955)*x_ref[1]+(-0.0211737454531)*x_ref[2]**o+(0.0774406125836)*x_ref[2]
-        ref[5,1,0]=(0.718149875204)*x_ref[0]**o+(-0.183000739787)*x_ref[0]+(-0.655724252373)*x_ref[1]**o+(-0.634941710776)*x_ref[1]+(-0.26300163323)*x_ref[2]**o+(-0.25105424715)*x_ref[2]
-        ref[5,1,1]=(0.109601904441)*x_ref[0]**o+(-0.00640764631554)*x_ref[0]+(-0.488035610009)*x_ref[1]**o+(0.909668323769)*x_ref[1]+(0.229692168501)*x_ref[2]**o+(-0.739241309497)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.912518456494)*x[0]**o+(-0.828176151903)*x[0]+(-0.313940298121)*x[1]**o+(-0.850120336531)*x[1]
-        arg[0,0,0,1]=(0.14415852783)*x[0]**o+(-0.294155246668)*x[0]+(0.562517248232)*x[1]**o+(-0.204505938286)*x[1]
-        arg[0,0,1,0]=(0.555455404368)*x[0]**o+(0.916425343576)*x[0]+(0.547252315693)*x[1]**o+(-0.0992842367479)*x[1]
-        arg[0,0,1,1]=(0.603632473928)*x[0]**o+(0.505571549062)*x[0]+(-0.490402921542)*x[1]**o+(0.908624427316)*x[1]
-        arg[0,0,2,0]=(0.729542308985)*x[0]**o+(-0.654310868638)*x[0]+(0.0845981276245)*x[1]**o+(-0.95231604686)*x[1]
-        arg[0,0,2,1]=(0.0511615606745)*x[0]**o+(-0.939469887975)*x[0]+(-0.206229418155)*x[1]**o+(0.254879844701)*x[1]
-        arg[0,1,0,0]=(0.257917344507)*x[0]**o+(0.860729621288)*x[0]+(0.489966193348)*x[1]**o+(0.174897233858)*x[1]
-        arg[0,1,0,1]=(0.336588362051)*x[0]**o+(-0.690598635114)*x[0]+(-0.0913735300483)*x[1]**o+(-0.932914439004)*x[1]
-        arg[0,1,1,0]=(0.244583093108)*x[0]**o+(-0.827768167758)*x[0]+(0.573065359412)*x[1]**o+(0.176685515596)*x[1]
-        arg[0,1,1,1]=(-0.520550726127)*x[0]**o+(-0.605243177286)*x[0]+(0.130549556226)*x[1]**o+(0.750019884067)*x[1]
-        arg[0,1,2,0]=(-0.680201627614)*x[0]**o+(0.679925324882)*x[0]+(-0.060408604263)*x[1]**o+(0.568125689359)*x[1]
-        arg[0,1,2,1]=(-0.111908859432)*x[0]**o+(0.256521037018)*x[0]+(0.332050616611)*x[1]**o+(-0.0500016397683)*x[1]
-        arg[0,2,0,0]=(-0.484953933663)*x[0]**o+(0.628032211831)*x[0]+(-0.63297141454)*x[1]**o+(0.141016662755)*x[1]
-        arg[0,2,0,1]=(-0.463920680465)*x[0]**o+(-0.868825520511)*x[0]+(-0.36594425006)*x[1]**o+(-0.823052216578)*x[1]
-        arg[0,2,1,0]=(0.972337802357)*x[0]**o+(0.943605157343)*x[0]+(-0.113950717844)*x[1]**o+(-0.839596452897)*x[1]
-        arg[0,2,1,1]=(-0.295562401302)*x[0]**o+(0.735770621017)*x[0]+(-0.183838912348)*x[1]**o+(-0.929365380252)*x[1]
-        arg[0,2,2,0]=(0.912886298388)*x[0]**o+(0.847507982065)*x[0]+(-0.341306036323)*x[1]**o+(0.393627025978)*x[1]
-        arg[0,2,2,1]=(-0.769650638386)*x[0]**o+(-0.619672356488)*x[0]+(-0.126894288906)*x[1]**o+(0.231547632139)*x[1]
-        arg[0,3,0,0]=(-0.884442976834)*x[0]**o+(-0.0194505760676)*x[0]+(-0.338764675072)*x[1]**o+(0.723481600171)*x[1]
-        arg[0,3,0,1]=(0.655973555091)*x[0]**o+(-0.556230649412)*x[0]+(-0.850356832441)*x[1]**o+(0.115267314853)*x[1]
-        arg[0,3,1,0]=(0.659628443559)*x[0]**o+(-0.586677822491)*x[0]+(0.135930588518)*x[1]**o+(0.206866895948)*x[1]
-        arg[0,3,1,1]=(-0.700258957557)*x[0]**o+(-0.699774198764)*x[0]+(-0.294009479186)*x[1]**o+(0.848159666503)*x[1]
-        arg[0,3,2,0]=(-0.927501754488)*x[0]**o+(-0.981178071331)*x[0]+(0.614074194451)*x[1]**o+(0.711549573086)*x[1]
-        arg[0,3,2,1]=(0.312434473198)*x[0]**o+(-0.241506125991)*x[0]+(-0.0840979088912)*x[1]**o+(0.902948463117)*x[1]
-        arg[0,4,0,0]=(-0.892269860242)*x[0]**o+(0.823434435855)*x[0]+(0.50499383365)*x[1]**o+(0.763736541034)*x[1]
-        arg[0,4,0,1]=(-0.606959691191)*x[0]**o+(0.945562536791)*x[0]+(-0.46271929481)*x[1]**o+(0.929514432096)*x[1]
-        arg[0,4,1,0]=(0.953382685939)*x[0]**o+(0.553766359805)*x[0]+(-0.191004010293)*x[1]**o+(0.556369491698)*x[1]
-        arg[0,4,1,1]=(-0.269402649165)*x[0]**o+(-0.158926232076)*x[0]+(-0.390038749681)*x[1]**o+(0.553655192666)*x[1]
-        arg[0,4,2,0]=(0.0785586372006)*x[0]**o+(-0.778452221862)*x[0]+(-0.927627273292)*x[1]**o+(-0.187742405246)*x[1]
-        arg[0,4,2,1]=(-0.965329945447)*x[0]**o+(0.304539006089)*x[0]+(0.213031689568)*x[1]**o+(-0.2807790149)*x[1]
-        arg[1,0,0,0]=(0.981534698569)*x[0]**o+(0.466451685806)*x[0]+(0.845322931856)*x[1]**o+(0.582422032334)*x[1]
-        arg[1,0,0,1]=(-0.0645798740394)*x[0]**o+(0.0475214206619)*x[0]+(-0.687759433076)*x[1]**o+(0.403440938285)*x[1]
-        arg[1,0,1,0]=(-0.317887773392)*x[0]**o+(0.59101163416)*x[0]+(0.658626263291)*x[1]**o+(-0.618167594137)*x[1]
-        arg[1,0,1,1]=(-0.314093092813)*x[0]**o+(0.699933899942)*x[0]+(0.824195260822)*x[1]**o+(-0.42875327345)*x[1]
-        arg[1,0,2,0]=(-0.254254956887)*x[0]**o+(-0.912137080163)*x[0]+(0.360457121452)*x[1]**o+(-0.902596912588)*x[1]
-        arg[1,0,2,1]=(-0.577214593683)*x[0]**o+(-0.419495663008)*x[0]+(-0.803459783331)*x[1]**o+(0.490885513568)*x[1]
-        arg[1,1,0,0]=(0.477947766892)*x[0]**o+(-0.853046971581)*x[0]+(0.576044041601)*x[1]**o+(-0.447007701252)*x[1]
-        arg[1,1,0,1]=(0.5886933409)*x[0]**o+(0.253650778351)*x[0]+(-0.198070684431)*x[1]**o+(0.189479364528)*x[1]
-        arg[1,1,1,0]=(-0.528744478872)*x[0]**o+(-0.504072059557)*x[0]+(-0.0161832474015)*x[1]**o+(0.639592055966)*x[1]
-        arg[1,1,1,1]=(-0.581844827169)*x[0]**o+(0.997883224538)*x[0]+(0.9354364489)*x[1]**o+(0.884060785136)*x[1]
-        arg[1,1,2,0]=(0.858226955817)*x[0]**o+(0.707261698312)*x[0]+(-0.738309111076)*x[1]**o+(-0.644655976448)*x[1]
-        arg[1,1,2,1]=(-0.254976445964)*x[0]**o+(-0.624982185158)*x[0]+(0.304854486996)*x[1]**o+(0.597089811682)*x[1]
-        arg[1,2,0,0]=(-0.625190759215)*x[0]**o+(-0.267820197905)*x[0]+(-0.721452024377)*x[1]**o+(-0.830984245819)*x[1]
-        arg[1,2,0,1]=(-0.972257608766)*x[0]**o+(0.981368890544)*x[0]+(-0.925886510064)*x[1]**o+(-0.337107356862)*x[1]
-        arg[1,2,1,0]=(-0.178932954207)*x[0]**o+(-0.941789507374)*x[0]+(0.360726744794)*x[1]**o+(0.347621863123)*x[1]
-        arg[1,2,1,1]=(-0.59790695611)*x[0]**o+(0.552509013166)*x[0]+(0.592412443998)*x[1]**o+(0.105369637971)*x[1]
-        arg[1,2,2,0]=(0.300713195225)*x[0]**o+(0.814257503574)*x[0]+(-0.281407483492)*x[1]**o+(-0.803431681095)*x[1]
-        arg[1,2,2,1]=(0.80113022942)*x[0]**o+(0.749336171665)*x[0]+(-0.0842928982283)*x[1]**o+(-0.974041792058)*x[1]
-        arg[1,3,0,0]=(0.533118876666)*x[0]**o+(-0.00888178987567)*x[0]+(0.372869213762)*x[1]**o+(-0.652513683144)*x[1]
-        arg[1,3,0,1]=(-0.295090222537)*x[0]**o+(0.772749124303)*x[0]+(-0.00857029468729)*x[1]**o+(0.927794431125)*x[1]
-        arg[1,3,1,0]=(-0.152537465441)*x[0]**o+(0.154900534979)*x[0]+(-0.488743959543)*x[1]**o+(-0.0318497199232)*x[1]
-        arg[1,3,1,1]=(-0.754333787921)*x[0]**o+(-0.0583007358701)*x[0]+(-0.050921106891)*x[1]**o+(0.161426452156)*x[1]
-        arg[1,3,2,0]=(0.387357469451)*x[0]**o+(-0.213640305885)*x[0]+(-0.844609663023)*x[1]**o+(0.0761914594192)*x[1]
-        arg[1,3,2,1]=(0.36964862459)*x[0]**o+(0.887888401952)*x[0]+(-0.933930511093)*x[1]**o+(0.769046614932)*x[1]
-        arg[1,4,0,0]=(0.680878887266)*x[0]**o+(0.62930033679)*x[0]+(0.894793542585)*x[1]**o+(-0.636881609067)*x[1]
-        arg[1,4,0,1]=(-0.346053756598)*x[0]**o+(0.225254433923)*x[0]+(-0.861052985621)*x[1]**o+(0.415123108136)*x[1]
-        arg[1,4,1,0]=(-0.997758408183)*x[0]**o+(-0.265055614341)*x[0]+(-0.7568881617)*x[1]**o+(0.95144584777)*x[1]
-        arg[1,4,1,1]=(0.227777912008)*x[0]**o+(-0.83647660817)*x[0]+(-0.275733410165)*x[1]**o+(-0.971560248343)*x[1]
-        arg[1,4,2,0]=(0.718803859114)*x[0]**o+(-0.978966510682)*x[0]+(0.463102438649)*x[1]**o+(0.987805610534)*x[1]
-        arg[1,4,2,1]=(-0.107543838917)*x[0]**o+(-0.362684018694)*x[0]+(-0.310926939373)*x[1]**o+(-0.571571044712)*x[1]
-        arg[2,0,0,0]=(-0.475977416182)*x[0]**o+(-0.627173002609)*x[0]+(-0.369962970984)*x[1]**o+(-0.245077302537)*x[1]
-        arg[2,0,0,1]=(0.913949611751)*x[0]**o+(0.645611424617)*x[0]+(0.639304734076)*x[1]**o+(-0.12171441998)*x[1]
-        arg[2,0,1,0]=(0.251434098263)*x[0]**o+(-0.119898861407)*x[0]+(-0.365614523709)*x[1]**o+(-0.802928738296)*x[1]
-        arg[2,0,1,1]=(0.756390927006)*x[0]**o+(0.246578936199)*x[0]+(0.714968085461)*x[1]**o+(-0.929428808096)*x[1]
-        arg[2,0,2,0]=(-0.516888361447)*x[0]**o+(0.0344339250886)*x[0]+(-0.383709788774)*x[1]**o+(-0.437344417623)*x[1]
-        arg[2,0,2,1]=(-0.219307162317)*x[0]**o+(0.704909718842)*x[0]+(-0.340454491855)*x[1]**o+(-0.933866231773)*x[1]
-        arg[2,1,0,0]=(-0.0618967891627)*x[0]**o+(-0.0590712030789)*x[0]+(0.116776433077)*x[1]**o+(0.0241239764104)*x[1]
-        arg[2,1,0,1]=(-0.802207645638)*x[0]**o+(0.590732740531)*x[0]+(-0.25990272933)*x[1]**o+(-0.257633805416)*x[1]
-        arg[2,1,1,0]=(0.827623274379)*x[0]**o+(-0.450310573599)*x[0]+(0.213809775826)*x[1]**o+(-0.905410777787)*x[1]
-        arg[2,1,1,1]=(-0.624510830356)*x[0]**o+(-0.705682607787)*x[0]+(0.430105716993)*x[1]**o+(0.975510832521)*x[1]
-        arg[2,1,2,0]=(-0.297562223309)*x[0]**o+(-0.99090348994)*x[0]+(0.548589416291)*x[1]**o+(0.591718478583)*x[1]
-        arg[2,1,2,1]=(-0.531899919376)*x[0]**o+(-0.227453719581)*x[0]+(-0.131664806128)*x[1]**o+(0.0521895817509)*x[1]
-        arg[2,2,0,0]=(-0.592291745786)*x[0]**o+(-0.586879961972)*x[0]+(0.563196552327)*x[1]**o+(0.876989321187)*x[1]
-        arg[2,2,0,1]=(-0.273360445369)*x[0]**o+(-0.714740527775)*x[0]+(-0.647699497837)*x[1]**o+(-0.0405089612762)*x[1]
-        arg[2,2,1,0]=(-0.536629732224)*x[0]**o+(0.72656373966)*x[0]+(0.986630594165)*x[1]**o+(0.0741630711667)*x[1]
-        arg[2,2,1,1]=(0.770746088838)*x[0]**o+(-0.219279833426)*x[0]+(0.875445174779)*x[1]**o+(-0.947889926444)*x[1]
-        arg[2,2,2,0]=(-0.41428815119)*x[0]**o+(-0.696166268903)*x[0]+(-0.96838062553)*x[1]**o+(0.781394205899)*x[1]
-        arg[2,2,2,1]=(-0.810267960752)*x[0]**o+(-0.873632687702)*x[0]+(0.0131971321611)*x[1]**o+(-0.552767192193)*x[1]
-        arg[2,3,0,0]=(-0.216091366291)*x[0]**o+(-0.17824047472)*x[0]+(-0.4644515725)*x[1]**o+(0.135819458957)*x[1]
-        arg[2,3,0,1]=(-0.0823616523105)*x[0]**o+(0.33121362151)*x[0]+(0.926719919839)*x[1]**o+(0.663475641636)*x[1]
-        arg[2,3,1,0]=(-0.278303066047)*x[0]**o+(-0.457286378314)*x[0]+(0.186792859092)*x[1]**o+(-0.734245612464)*x[1]
-        arg[2,3,1,1]=(0.810871459779)*x[0]**o+(-0.706641995324)*x[0]+(-0.287827176091)*x[1]**o+(0.453216090282)*x[1]
-        arg[2,3,2,0]=(0.83826221049)*x[0]**o+(0.556887792111)*x[0]+(-0.000231102245991)*x[1]**o+(-0.440730958954)*x[1]
-        arg[2,3,2,1]=(-0.455087877907)*x[0]**o+(-0.132259634036)*x[0]+(-0.492728335525)*x[1]**o+(-0.880311317777)*x[1]
-        arg[2,4,0,0]=(-0.303141352388)*x[0]**o+(0.426137046804)*x[0]+(0.788934776738)*x[1]**o+(0.157477785179)*x[1]
-        arg[2,4,0,1]=(0.603411288614)*x[0]**o+(-0.533561451987)*x[0]+(-0.901259210942)*x[1]**o+(0.547372624746)*x[1]
-        arg[2,4,1,0]=(0.69517961739)*x[0]**o+(-0.106282888246)*x[0]+(0.257484565681)*x[1]**o+(0.655749633294)*x[1]
-        arg[2,4,1,1]=(-0.072748573118)*x[0]**o+(0.905966560113)*x[0]+(0.433145718123)*x[1]**o+(0.187620401615)*x[1]
-        arg[2,4,2,0]=(-0.0280176325954)*x[0]**o+(0.489610131347)*x[0]+(-0.740554922134)*x[1]**o+(-0.85045302096)*x[1]
-        arg[2,4,2,1]=(-0.158503180709)*x[0]**o+(0.525929643075)*x[0]+(-0.352022652515)*x[1]**o+(-0.706553104932)*x[1]
-        arg[3,0,0,0]=(-0.837316508127)*x[0]**o+(-0.89490181779)*x[0]+(0.510084075291)*x[1]**o+(0.321206310024)*x[1]
-        arg[3,0,0,1]=(-0.325038591079)*x[0]**o+(0.140342922753)*x[0]+(-0.937466403004)*x[1]**o+(0.580557383497)*x[1]
-        arg[3,0,1,0]=(-0.939713654062)*x[0]**o+(-0.394660244166)*x[0]+(0.762376614557)*x[1]**o+(-0.135565547532)*x[1]
-        arg[3,0,1,1]=(0.0275332524464)*x[0]**o+(0.368737701882)*x[0]+(0.983641372218)*x[1]**o+(0.573815516366)*x[1]
-        arg[3,0,2,0]=(0.816957570314)*x[0]**o+(-0.357626892562)*x[0]+(-0.368933149642)*x[1]**o+(-0.692502486914)*x[1]
-        arg[3,0,2,1]=(-0.372408810926)*x[0]**o+(-0.113036390416)*x[0]+(-0.355880297003)*x[1]**o+(0.755478191481)*x[1]
-        arg[3,1,0,0]=(0.0399012900832)*x[0]**o+(-0.879576900086)*x[0]+(-0.660858776134)*x[1]**o+(-0.59837040429)*x[1]
-        arg[3,1,0,1]=(0.569397128496)*x[0]**o+(-0.138333417746)*x[0]+(0.257769147727)*x[1]**o+(0.174737141027)*x[1]
-        arg[3,1,1,0]=(-0.67938408823)*x[0]**o+(0.862731161981)*x[0]+(-0.792538485264)*x[1]**o+(-0.0805197796157)*x[1]
-        arg[3,1,1,1]=(0.0113523229279)*x[0]**o+(0.475393597561)*x[0]+(-0.705748021886)*x[1]**o+(0.00836460135285)*x[1]
-        arg[3,1,2,0]=(0.463839509799)*x[0]**o+(-0.12663544643)*x[0]+(0.353158399738)*x[1]**o+(0.674929537597)*x[1]
-        arg[3,1,2,1]=(-0.6019896019)*x[0]**o+(-0.638280685565)*x[0]+(0.280047072988)*x[1]**o+(0.569239958138)*x[1]
-        arg[3,2,0,0]=(-0.113906500346)*x[0]**o+(-0.493494498501)*x[0]+(-0.686419229162)*x[1]**o+(-0.0727046763516)*x[1]
-        arg[3,2,0,1]=(-0.302092112795)*x[0]**o+(-0.74819167)*x[0]+(-0.478908975282)*x[1]**o+(0.430024789627)*x[1]
-        arg[3,2,1,0]=(0.353535608984)*x[0]**o+(-0.743408549264)*x[0]+(-0.069122881538)*x[1]**o+(-0.0767595089529)*x[1]
-        arg[3,2,1,1]=(-0.629946386234)*x[0]**o+(0.851779590894)*x[0]+(0.728577108695)*x[1]**o+(-0.366983040147)*x[1]
-        arg[3,2,2,0]=(0.1685167508)*x[0]**o+(0.149999747637)*x[0]+(0.709320430374)*x[1]**o+(-0.280950677222)*x[1]
-        arg[3,2,2,1]=(-0.956164974578)*x[0]**o+(0.240460380901)*x[0]+(-0.2820176577)*x[1]**o+(-0.595667156955)*x[1]
-        arg[3,3,0,0]=(-0.0711295055938)*x[0]**o+(-0.314513251791)*x[0]+(-0.41924591293)*x[1]**o+(0.0813197780959)*x[1]
-        arg[3,3,0,1]=(-0.230592584877)*x[0]**o+(-0.488005144715)*x[0]+(-0.450611759976)*x[1]**o+(-0.0571152769768)*x[1]
-        arg[3,3,1,0]=(-0.608255699014)*x[0]**o+(-0.697324108575)*x[0]+(-0.885935900746)*x[1]**o+(-0.884497550016)*x[1]
-        arg[3,3,1,1]=(0.857286225292)*x[0]**o+(0.509954550626)*x[0]+(0.182030821433)*x[1]**o+(-0.268076060316)*x[1]
-        arg[3,3,2,0]=(-0.77322653479)*x[0]**o+(-0.583013210018)*x[0]+(-0.683867300277)*x[1]**o+(0.754530541251)*x[1]
-        arg[3,3,2,1]=(-0.744667985181)*x[0]**o+(0.164165128978)*x[0]+(0.412340155958)*x[1]**o+(-0.38451107118)*x[1]
-        arg[3,4,0,0]=(0.216720755049)*x[0]**o+(-0.347803433722)*x[0]+(0.417376268797)*x[1]**o+(0.475787304652)*x[1]
-        arg[3,4,0,1]=(-0.737038295974)*x[0]**o+(0.579172519178)*x[0]+(-0.900272993672)*x[1]**o+(0.407018603625)*x[1]
-        arg[3,4,1,0]=(-0.898959236474)*x[0]**o+(-0.886636008121)*x[0]+(-0.901972610044)*x[1]**o+(-0.518393782318)*x[1]
-        arg[3,4,1,1]=(0.976342884921)*x[0]**o+(-0.273568319493)*x[0]+(-0.332424980846)*x[1]**o+(-0.0146661731139)*x[1]
-        arg[3,4,2,0]=(0.794792214027)*x[0]**o+(0.846927984413)*x[0]+(0.535818809709)*x[1]**o+(-0.49324400033)*x[1]
-        arg[3,4,2,1]=(0.695766308812)*x[0]**o+(-0.37923153689)*x[0]+(0.0633513026782)*x[1]**o+(0.12334892105)*x[1]
-        ref[0,0,0,0]=(0.912518456494)*x_ref[0]**o+(-0.828176151903)*x_ref[0]+(-0.313940298121)*x_ref[1]**o+(-0.850120336531)*x_ref[1]
-        ref[0,0,0,1]=(0.14415852783)*x_ref[0]**o+(-0.294155246668)*x_ref[0]+(0.562517248232)*x_ref[1]**o+(-0.204505938286)*x_ref[1]
-        ref[0,0,1,0]=(0.555455404368)*x_ref[0]**o+(0.916425343576)*x_ref[0]+(0.547252315693)*x_ref[1]**o+(-0.0992842367479)*x_ref[1]
-        ref[0,0,1,1]=(0.603632473928)*x_ref[0]**o+(0.505571549062)*x_ref[0]+(-0.490402921542)*x_ref[1]**o+(0.908624427316)*x_ref[1]
-        ref[0,0,2,0]=(0.729542308985)*x_ref[0]**o+(-0.654310868638)*x_ref[0]+(0.0845981276245)*x_ref[1]**o+(-0.95231604686)*x_ref[1]
-        ref[0,0,2,1]=(0.0511615606745)*x_ref[0]**o+(-0.939469887975)*x_ref[0]+(-0.206229418155)*x_ref[1]**o+(0.254879844701)*x_ref[1]
-        ref[0,1,0,0]=(0.257917344507)*x_ref[0]**o+(0.860729621288)*x_ref[0]+(0.489966193348)*x_ref[1]**o+(0.174897233858)*x_ref[1]
-        ref[0,1,0,1]=(0.336588362051)*x_ref[0]**o+(-0.690598635114)*x_ref[0]+(-0.0913735300483)*x_ref[1]**o+(-0.932914439004)*x_ref[1]
-        ref[0,1,1,0]=(0.244583093108)*x_ref[0]**o+(-0.827768167758)*x_ref[0]+(0.573065359412)*x_ref[1]**o+(0.176685515596)*x_ref[1]
-        ref[0,1,1,1]=(-0.520550726127)*x_ref[0]**o+(-0.605243177286)*x_ref[0]+(0.130549556226)*x_ref[1]**o+(0.750019884067)*x_ref[1]
-        ref[0,1,2,0]=(-0.680201627614)*x_ref[0]**o+(0.679925324882)*x_ref[0]+(-0.060408604263)*x_ref[1]**o+(0.568125689359)*x_ref[1]
-        ref[0,1,2,1]=(-0.111908859432)*x_ref[0]**o+(0.256521037018)*x_ref[0]+(0.332050616611)*x_ref[1]**o+(-0.0500016397683)*x_ref[1]
-        ref[0,2,0,0]=(-0.484953933663)*x_ref[0]**o+(0.628032211831)*x_ref[0]+(-0.63297141454)*x_ref[1]**o+(0.141016662755)*x_ref[1]
-        ref[0,2,0,1]=(-0.463920680465)*x_ref[0]**o+(-0.868825520511)*x_ref[0]+(-0.36594425006)*x_ref[1]**o+(-0.823052216578)*x_ref[1]
-        ref[0,2,1,0]=(0.972337802357)*x_ref[0]**o+(0.943605157343)*x_ref[0]+(-0.113950717844)*x_ref[1]**o+(-0.839596452897)*x_ref[1]
-        ref[0,2,1,1]=(-0.295562401302)*x_ref[0]**o+(0.735770621017)*x_ref[0]+(-0.183838912348)*x_ref[1]**o+(-0.929365380252)*x_ref[1]
-        ref[0,2,2,0]=(0.912886298388)*x_ref[0]**o+(0.847507982065)*x_ref[0]+(-0.341306036323)*x_ref[1]**o+(0.393627025978)*x_ref[1]
-        ref[0,2,2,1]=(-0.769650638386)*x_ref[0]**o+(-0.619672356488)*x_ref[0]+(-0.126894288906)*x_ref[1]**o+(0.231547632139)*x_ref[1]
-        ref[0,3,0,0]=(-0.884442976834)*x_ref[0]**o+(-0.0194505760676)*x_ref[0]+(-0.338764675072)*x_ref[1]**o+(0.723481600171)*x_ref[1]
-        ref[0,3,0,1]=(0.655973555091)*x_ref[0]**o+(-0.556230649412)*x_ref[0]+(-0.850356832441)*x_ref[1]**o+(0.115267314853)*x_ref[1]
-        ref[0,3,1,0]=(0.659628443559)*x_ref[0]**o+(-0.586677822491)*x_ref[0]+(0.135930588518)*x_ref[1]**o+(0.206866895948)*x_ref[1]
-        ref[0,3,1,1]=(-0.700258957557)*x_ref[0]**o+(-0.699774198764)*x_ref[0]+(-0.294009479186)*x_ref[1]**o+(0.848159666503)*x_ref[1]
-        ref[0,3,2,0]=(-0.927501754488)*x_ref[0]**o+(-0.981178071331)*x_ref[0]+(0.614074194451)*x_ref[1]**o+(0.711549573086)*x_ref[1]
-        ref[0,3,2,1]=(0.312434473198)*x_ref[0]**o+(-0.241506125991)*x_ref[0]+(-0.0840979088912)*x_ref[1]**o+(0.902948463117)*x_ref[1]
-        ref[0,4,0,0]=(-0.892269860242)*x_ref[0]**o+(0.823434435855)*x_ref[0]+(0.50499383365)*x_ref[1]**o+(0.763736541034)*x_ref[1]
-        ref[0,4,0,1]=(-0.606959691191)*x_ref[0]**o+(0.945562536791)*x_ref[0]+(-0.46271929481)*x_ref[1]**o+(0.929514432096)*x_ref[1]
-        ref[0,4,1,0]=(0.953382685939)*x_ref[0]**o+(0.553766359805)*x_ref[0]+(-0.191004010293)*x_ref[1]**o+(0.556369491698)*x_ref[1]
-        ref[0,4,1,1]=(-0.269402649165)*x_ref[0]**o+(-0.158926232076)*x_ref[0]+(-0.390038749681)*x_ref[1]**o+(0.553655192666)*x_ref[1]
-        ref[0,4,2,0]=(0.0785586372006)*x_ref[0]**o+(-0.778452221862)*x_ref[0]+(-0.927627273292)*x_ref[1]**o+(-0.187742405246)*x_ref[1]
-        ref[0,4,2,1]=(-0.965329945447)*x_ref[0]**o+(0.304539006089)*x_ref[0]+(0.213031689568)*x_ref[1]**o+(-0.2807790149)*x_ref[1]
-        ref[1,0,0,0]=(0.981534698569)*x_ref[0]**o+(0.466451685806)*x_ref[0]+(0.845322931856)*x_ref[1]**o+(0.582422032334)*x_ref[1]
-        ref[1,0,0,1]=(-0.0645798740394)*x_ref[0]**o+(0.0475214206619)*x_ref[0]+(-0.687759433076)*x_ref[1]**o+(0.403440938285)*x_ref[1]
-        ref[1,0,1,0]=(-0.317887773392)*x_ref[0]**o+(0.59101163416)*x_ref[0]+(0.658626263291)*x_ref[1]**o+(-0.618167594137)*x_ref[1]
-        ref[1,0,1,1]=(-0.314093092813)*x_ref[0]**o+(0.699933899942)*x_ref[0]+(0.824195260822)*x_ref[1]**o+(-0.42875327345)*x_ref[1]
-        ref[1,0,2,0]=(-0.254254956887)*x_ref[0]**o+(-0.912137080163)*x_ref[0]+(0.360457121452)*x_ref[1]**o+(-0.902596912588)*x_ref[1]
-        ref[1,0,2,1]=(-0.577214593683)*x_ref[0]**o+(-0.419495663008)*x_ref[0]+(-0.803459783331)*x_ref[1]**o+(0.490885513568)*x_ref[1]
-        ref[1,1,0,0]=(0.477947766892)*x_ref[0]**o+(-0.853046971581)*x_ref[0]+(0.576044041601)*x_ref[1]**o+(-0.447007701252)*x_ref[1]
-        ref[1,1,0,1]=(0.5886933409)*x_ref[0]**o+(0.253650778351)*x_ref[0]+(-0.198070684431)*x_ref[1]**o+(0.189479364528)*x_ref[1]
-        ref[1,1,1,0]=(-0.528744478872)*x_ref[0]**o+(-0.504072059557)*x_ref[0]+(-0.0161832474015)*x_ref[1]**o+(0.639592055966)*x_ref[1]
-        ref[1,1,1,1]=(-0.581844827169)*x_ref[0]**o+(0.997883224538)*x_ref[0]+(0.9354364489)*x_ref[1]**o+(0.884060785136)*x_ref[1]
-        ref[1,1,2,0]=(0.858226955817)*x_ref[0]**o+(0.707261698312)*x_ref[0]+(-0.738309111076)*x_ref[1]**o+(-0.644655976448)*x_ref[1]
-        ref[1,1,2,1]=(-0.254976445964)*x_ref[0]**o+(-0.624982185158)*x_ref[0]+(0.304854486996)*x_ref[1]**o+(0.597089811682)*x_ref[1]
-        ref[1,2,0,0]=(-0.625190759215)*x_ref[0]**o+(-0.267820197905)*x_ref[0]+(-0.721452024377)*x_ref[1]**o+(-0.830984245819)*x_ref[1]
-        ref[1,2,0,1]=(-0.972257608766)*x_ref[0]**o+(0.981368890544)*x_ref[0]+(-0.925886510064)*x_ref[1]**o+(-0.337107356862)*x_ref[1]
-        ref[1,2,1,0]=(-0.178932954207)*x_ref[0]**o+(-0.941789507374)*x_ref[0]+(0.360726744794)*x_ref[1]**o+(0.347621863123)*x_ref[1]
-        ref[1,2,1,1]=(-0.59790695611)*x_ref[0]**o+(0.552509013166)*x_ref[0]+(0.592412443998)*x_ref[1]**o+(0.105369637971)*x_ref[1]
-        ref[1,2,2,0]=(0.300713195225)*x_ref[0]**o+(0.814257503574)*x_ref[0]+(-0.281407483492)*x_ref[1]**o+(-0.803431681095)*x_ref[1]
-        ref[1,2,2,1]=(0.80113022942)*x_ref[0]**o+(0.749336171665)*x_ref[0]+(-0.0842928982283)*x_ref[1]**o+(-0.974041792058)*x_ref[1]
-        ref[1,3,0,0]=(0.533118876666)*x_ref[0]**o+(-0.00888178987567)*x_ref[0]+(0.372869213762)*x_ref[1]**o+(-0.652513683144)*x_ref[1]
-        ref[1,3,0,1]=(-0.295090222537)*x_ref[0]**o+(0.772749124303)*x_ref[0]+(-0.00857029468729)*x_ref[1]**o+(0.927794431125)*x_ref[1]
-        ref[1,3,1,0]=(-0.152537465441)*x_ref[0]**o+(0.154900534979)*x_ref[0]+(-0.488743959543)*x_ref[1]**o+(-0.0318497199232)*x_ref[1]
-        ref[1,3,1,1]=(-0.754333787921)*x_ref[0]**o+(-0.0583007358701)*x_ref[0]+(-0.050921106891)*x_ref[1]**o+(0.161426452156)*x_ref[1]
-        ref[1,3,2,0]=(0.387357469451)*x_ref[0]**o+(-0.213640305885)*x_ref[0]+(-0.844609663023)*x_ref[1]**o+(0.0761914594192)*x_ref[1]
-        ref[1,3,2,1]=(0.36964862459)*x_ref[0]**o+(0.887888401952)*x_ref[0]+(-0.933930511093)*x_ref[1]**o+(0.769046614932)*x_ref[1]
-        ref[1,4,0,0]=(0.680878887266)*x_ref[0]**o+(0.62930033679)*x_ref[0]+(0.894793542585)*x_ref[1]**o+(-0.636881609067)*x_ref[1]
-        ref[1,4,0,1]=(-0.346053756598)*x_ref[0]**o+(0.225254433923)*x_ref[0]+(-0.861052985621)*x_ref[1]**o+(0.415123108136)*x_ref[1]
-        ref[1,4,1,0]=(-0.997758408183)*x_ref[0]**o+(-0.265055614341)*x_ref[0]+(-0.7568881617)*x_ref[1]**o+(0.95144584777)*x_ref[1]
-        ref[1,4,1,1]=(0.227777912008)*x_ref[0]**o+(-0.83647660817)*x_ref[0]+(-0.275733410165)*x_ref[1]**o+(-0.971560248343)*x_ref[1]
-        ref[1,4,2,0]=(0.718803859114)*x_ref[0]**o+(-0.978966510682)*x_ref[0]+(0.463102438649)*x_ref[1]**o+(0.987805610534)*x_ref[1]
-        ref[1,4,2,1]=(-0.107543838917)*x_ref[0]**o+(-0.362684018694)*x_ref[0]+(-0.310926939373)*x_ref[1]**o+(-0.571571044712)*x_ref[1]
-        ref[2,0,0,0]=(-0.475977416182)*x_ref[0]**o+(-0.627173002609)*x_ref[0]+(-0.369962970984)*x_ref[1]**o+(-0.245077302537)*x_ref[1]
-        ref[2,0,0,1]=(0.913949611751)*x_ref[0]**o+(0.645611424617)*x_ref[0]+(0.639304734076)*x_ref[1]**o+(-0.12171441998)*x_ref[1]
-        ref[2,0,1,0]=(0.251434098263)*x_ref[0]**o+(-0.119898861407)*x_ref[0]+(-0.365614523709)*x_ref[1]**o+(-0.802928738296)*x_ref[1]
-        ref[2,0,1,1]=(0.756390927006)*x_ref[0]**o+(0.246578936199)*x_ref[0]+(0.714968085461)*x_ref[1]**o+(-0.929428808096)*x_ref[1]
-        ref[2,0,2,0]=(-0.516888361447)*x_ref[0]**o+(0.0344339250886)*x_ref[0]+(-0.383709788774)*x_ref[1]**o+(-0.437344417623)*x_ref[1]
-        ref[2,0,2,1]=(-0.219307162317)*x_ref[0]**o+(0.704909718842)*x_ref[0]+(-0.340454491855)*x_ref[1]**o+(-0.933866231773)*x_ref[1]
-        ref[2,1,0,0]=(-0.0618967891627)*x_ref[0]**o+(-0.0590712030789)*x_ref[0]+(0.116776433077)*x_ref[1]**o+(0.0241239764104)*x_ref[1]
-        ref[2,1,0,1]=(-0.802207645638)*x_ref[0]**o+(0.590732740531)*x_ref[0]+(-0.25990272933)*x_ref[1]**o+(-0.257633805416)*x_ref[1]
-        ref[2,1,1,0]=(0.827623274379)*x_ref[0]**o+(-0.450310573599)*x_ref[0]+(0.213809775826)*x_ref[1]**o+(-0.905410777787)*x_ref[1]
-        ref[2,1,1,1]=(-0.624510830356)*x_ref[0]**o+(-0.705682607787)*x_ref[0]+(0.430105716993)*x_ref[1]**o+(0.975510832521)*x_ref[1]
-        ref[2,1,2,0]=(-0.297562223309)*x_ref[0]**o+(-0.99090348994)*x_ref[0]+(0.548589416291)*x_ref[1]**o+(0.591718478583)*x_ref[1]
-        ref[2,1,2,1]=(-0.531899919376)*x_ref[0]**o+(-0.227453719581)*x_ref[0]+(-0.131664806128)*x_ref[1]**o+(0.0521895817509)*x_ref[1]
-        ref[2,2,0,0]=(-0.592291745786)*x_ref[0]**o+(-0.586879961972)*x_ref[0]+(0.563196552327)*x_ref[1]**o+(0.876989321187)*x_ref[1]
-        ref[2,2,0,1]=(-0.273360445369)*x_ref[0]**o+(-0.714740527775)*x_ref[0]+(-0.647699497837)*x_ref[1]**o+(-0.0405089612762)*x_ref[1]
-        ref[2,2,1,0]=(-0.536629732224)*x_ref[0]**o+(0.72656373966)*x_ref[0]+(0.986630594165)*x_ref[1]**o+(0.0741630711667)*x_ref[1]
-        ref[2,2,1,1]=(0.770746088838)*x_ref[0]**o+(-0.219279833426)*x_ref[0]+(0.875445174779)*x_ref[1]**o+(-0.947889926444)*x_ref[1]
-        ref[2,2,2,0]=(-0.41428815119)*x_ref[0]**o+(-0.696166268903)*x_ref[0]+(-0.96838062553)*x_ref[1]**o+(0.781394205899)*x_ref[1]
-        ref[2,2,2,1]=(-0.810267960752)*x_ref[0]**o+(-0.873632687702)*x_ref[0]+(0.0131971321611)*x_ref[1]**o+(-0.552767192193)*x_ref[1]
-        ref[2,3,0,0]=(-0.216091366291)*x_ref[0]**o+(-0.17824047472)*x_ref[0]+(-0.4644515725)*x_ref[1]**o+(0.135819458957)*x_ref[1]
-        ref[2,3,0,1]=(-0.0823616523105)*x_ref[0]**o+(0.33121362151)*x_ref[0]+(0.926719919839)*x_ref[1]**o+(0.663475641636)*x_ref[1]
-        ref[2,3,1,0]=(-0.278303066047)*x_ref[0]**o+(-0.457286378314)*x_ref[0]+(0.186792859092)*x_ref[1]**o+(-0.734245612464)*x_ref[1]
-        ref[2,3,1,1]=(0.810871459779)*x_ref[0]**o+(-0.706641995324)*x_ref[0]+(-0.287827176091)*x_ref[1]**o+(0.453216090282)*x_ref[1]
-        ref[2,3,2,0]=(0.83826221049)*x_ref[0]**o+(0.556887792111)*x_ref[0]+(-0.000231102245991)*x_ref[1]**o+(-0.440730958954)*x_ref[1]
-        ref[2,3,2,1]=(-0.455087877907)*x_ref[0]**o+(-0.132259634036)*x_ref[0]+(-0.492728335525)*x_ref[1]**o+(-0.880311317777)*x_ref[1]
-        ref[2,4,0,0]=(-0.303141352388)*x_ref[0]**o+(0.426137046804)*x_ref[0]+(0.788934776738)*x_ref[1]**o+(0.157477785179)*x_ref[1]
-        ref[2,4,0,1]=(0.603411288614)*x_ref[0]**o+(-0.533561451987)*x_ref[0]+(-0.901259210942)*x_ref[1]**o+(0.547372624746)*x_ref[1]
-        ref[2,4,1,0]=(0.69517961739)*x_ref[0]**o+(-0.106282888246)*x_ref[0]+(0.257484565681)*x_ref[1]**o+(0.655749633294)*x_ref[1]
-        ref[2,4,1,1]=(-0.072748573118)*x_ref[0]**o+(0.905966560113)*x_ref[0]+(0.433145718123)*x_ref[1]**o+(0.187620401615)*x_ref[1]
-        ref[2,4,2,0]=(-0.0280176325954)*x_ref[0]**o+(0.489610131347)*x_ref[0]+(-0.740554922134)*x_ref[1]**o+(-0.85045302096)*x_ref[1]
-        ref[2,4,2,1]=(-0.158503180709)*x_ref[0]**o+(0.525929643075)*x_ref[0]+(-0.352022652515)*x_ref[1]**o+(-0.706553104932)*x_ref[1]
-        ref[3,0,0,0]=(-0.837316508127)*x_ref[0]**o+(-0.89490181779)*x_ref[0]+(0.510084075291)*x_ref[1]**o+(0.321206310024)*x_ref[1]
-        ref[3,0,0,1]=(-0.325038591079)*x_ref[0]**o+(0.140342922753)*x_ref[0]+(-0.937466403004)*x_ref[1]**o+(0.580557383497)*x_ref[1]
-        ref[3,0,1,0]=(-0.939713654062)*x_ref[0]**o+(-0.394660244166)*x_ref[0]+(0.762376614557)*x_ref[1]**o+(-0.135565547532)*x_ref[1]
-        ref[3,0,1,1]=(0.0275332524464)*x_ref[0]**o+(0.368737701882)*x_ref[0]+(0.983641372218)*x_ref[1]**o+(0.573815516366)*x_ref[1]
-        ref[3,0,2,0]=(0.816957570314)*x_ref[0]**o+(-0.357626892562)*x_ref[0]+(-0.368933149642)*x_ref[1]**o+(-0.692502486914)*x_ref[1]
-        ref[3,0,2,1]=(-0.372408810926)*x_ref[0]**o+(-0.113036390416)*x_ref[0]+(-0.355880297003)*x_ref[1]**o+(0.755478191481)*x_ref[1]
-        ref[3,1,0,0]=(0.0399012900832)*x_ref[0]**o+(-0.879576900086)*x_ref[0]+(-0.660858776134)*x_ref[1]**o+(-0.59837040429)*x_ref[1]
-        ref[3,1,0,1]=(0.569397128496)*x_ref[0]**o+(-0.138333417746)*x_ref[0]+(0.257769147727)*x_ref[1]**o+(0.174737141027)*x_ref[1]
-        ref[3,1,1,0]=(-0.67938408823)*x_ref[0]**o+(0.862731161981)*x_ref[0]+(-0.792538485264)*x_ref[1]**o+(-0.0805197796157)*x_ref[1]
-        ref[3,1,1,1]=(0.0113523229279)*x_ref[0]**o+(0.475393597561)*x_ref[0]+(-0.705748021886)*x_ref[1]**o+(0.00836460135285)*x_ref[1]
-        ref[3,1,2,0]=(0.463839509799)*x_ref[0]**o+(-0.12663544643)*x_ref[0]+(0.353158399738)*x_ref[1]**o+(0.674929537597)*x_ref[1]
-        ref[3,1,2,1]=(-0.6019896019)*x_ref[0]**o+(-0.638280685565)*x_ref[0]+(0.280047072988)*x_ref[1]**o+(0.569239958138)*x_ref[1]
-        ref[3,2,0,0]=(-0.113906500346)*x_ref[0]**o+(-0.493494498501)*x_ref[0]+(-0.686419229162)*x_ref[1]**o+(-0.0727046763516)*x_ref[1]
-        ref[3,2,0,1]=(-0.302092112795)*x_ref[0]**o+(-0.74819167)*x_ref[0]+(-0.478908975282)*x_ref[1]**o+(0.430024789627)*x_ref[1]
-        ref[3,2,1,0]=(0.353535608984)*x_ref[0]**o+(-0.743408549264)*x_ref[0]+(-0.069122881538)*x_ref[1]**o+(-0.0767595089529)*x_ref[1]
-        ref[3,2,1,1]=(-0.629946386234)*x_ref[0]**o+(0.851779590894)*x_ref[0]+(0.728577108695)*x_ref[1]**o+(-0.366983040147)*x_ref[1]
-        ref[3,2,2,0]=(0.1685167508)*x_ref[0]**o+(0.149999747637)*x_ref[0]+(0.709320430374)*x_ref[1]**o+(-0.280950677222)*x_ref[1]
-        ref[3,2,2,1]=(-0.956164974578)*x_ref[0]**o+(0.240460380901)*x_ref[0]+(-0.2820176577)*x_ref[1]**o+(-0.595667156955)*x_ref[1]
-        ref[3,3,0,0]=(-0.0711295055938)*x_ref[0]**o+(-0.314513251791)*x_ref[0]+(-0.41924591293)*x_ref[1]**o+(0.0813197780959)*x_ref[1]
-        ref[3,3,0,1]=(-0.230592584877)*x_ref[0]**o+(-0.488005144715)*x_ref[0]+(-0.450611759976)*x_ref[1]**o+(-0.0571152769768)*x_ref[1]
-        ref[3,3,1,0]=(-0.608255699014)*x_ref[0]**o+(-0.697324108575)*x_ref[0]+(-0.885935900746)*x_ref[1]**o+(-0.884497550016)*x_ref[1]
-        ref[3,3,1,1]=(0.857286225292)*x_ref[0]**o+(0.509954550626)*x_ref[0]+(0.182030821433)*x_ref[1]**o+(-0.268076060316)*x_ref[1]
-        ref[3,3,2,0]=(-0.77322653479)*x_ref[0]**o+(-0.583013210018)*x_ref[0]+(-0.683867300277)*x_ref[1]**o+(0.754530541251)*x_ref[1]
-        ref[3,3,2,1]=(-0.744667985181)*x_ref[0]**o+(0.164165128978)*x_ref[0]+(0.412340155958)*x_ref[1]**o+(-0.38451107118)*x_ref[1]
-        ref[3,4,0,0]=(0.216720755049)*x_ref[0]**o+(-0.347803433722)*x_ref[0]+(0.417376268797)*x_ref[1]**o+(0.475787304652)*x_ref[1]
-        ref[3,4,0,1]=(-0.737038295974)*x_ref[0]**o+(0.579172519178)*x_ref[0]+(-0.900272993672)*x_ref[1]**o+(0.407018603625)*x_ref[1]
-        ref[3,4,1,0]=(-0.898959236474)*x_ref[0]**o+(-0.886636008121)*x_ref[0]+(-0.901972610044)*x_ref[1]**o+(-0.518393782318)*x_ref[1]
-        ref[3,4,1,1]=(0.976342884921)*x_ref[0]**o+(-0.273568319493)*x_ref[0]+(-0.332424980846)*x_ref[1]**o+(-0.0146661731139)*x_ref[1]
-        ref[3,4,2,0]=(0.794792214027)*x_ref[0]**o+(0.846927984413)*x_ref[0]+(0.535818809709)*x_ref[1]**o+(-0.49324400033)*x_ref[1]
-        ref[3,4,2,1]=(0.695766308812)*x_ref[0]**o+(-0.37923153689)*x_ref[0]+(0.0633513026782)*x_ref[1]**o+(0.12334892105)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.401901998082)*x[0]**o+(-0.805091116808)*x[0]+(0.997659882792)*x[1]**o+(-0.953957389492)*x[1]+(-0.450185408289)*x[2]**o+(0.636472207773)*x[2]
-        arg[0,0,0,1]=(-0.786386817128)*x[0]**o+(-0.882559775393)*x[0]+(0.117871400819)*x[1]**o+(-0.625922274774)*x[1]+(0.410431886931)*x[2]**o+(-0.979356501067)*x[2]
-        arg[0,0,1,0]=(0.686025409275)*x[0]**o+(-0.19806907659)*x[0]+(-0.710420224449)*x[1]**o+(-0.839236953983)*x[1]+(-0.79971896093)*x[2]**o+(0.378944111319)*x[2]
-        arg[0,0,1,1]=(0.771205112484)*x[0]**o+(-0.007083192859)*x[0]+(0.672918588001)*x[1]**o+(-0.351652495793)*x[1]+(-0.841767161187)*x[2]**o+(-0.345642373014)*x[2]
-        arg[0,0,2,0]=(0.266930729015)*x[0]**o+(-0.873808152307)*x[0]+(0.206466759135)*x[1]**o+(0.539888649948)*x[1]+(0.17985862191)*x[2]**o+(0.240651460153)*x[2]
-        arg[0,0,2,1]=(-0.232569768041)*x[0]**o+(-0.579841454072)*x[0]+(-0.706956104891)*x[1]**o+(0.822863815698)*x[1]+(0.345774991358)*x[2]**o+(-0.0848567668311)*x[2]
-        arg[0,1,0,0]=(0.51593851507)*x[0]**o+(-0.233342434349)*x[0]+(-0.92498298026)*x[1]**o+(0.164540234829)*x[1]+(0.356559744499)*x[2]**o+(0.483902511717)*x[2]
-        arg[0,1,0,1]=(-0.811509654443)*x[0]**o+(0.73929453189)*x[0]+(0.256205706418)*x[1]**o+(-0.667924913793)*x[1]+(0.266065641257)*x[2]**o+(0.856490258029)*x[2]
-        arg[0,1,1,0]=(0.502051590284)*x[0]**o+(0.927283797128)*x[0]+(0.500854521411)*x[1]**o+(-0.486326996369)*x[1]+(-0.327578523685)*x[2]**o+(-0.28106070397)*x[2]
-        arg[0,1,1,1]=(0.201740014513)*x[0]**o+(-0.166988241759)*x[0]+(-0.513072955566)*x[1]**o+(0.67179532417)*x[1]+(-0.72135980627)*x[2]**o+(0.763548886467)*x[2]
-        arg[0,1,2,0]=(0.3995590338)*x[0]**o+(0.433286929621)*x[0]+(-0.287309453792)*x[1]**o+(-0.0671679443074)*x[1]+(-0.80815399993)*x[2]**o+(-0.398740362114)*x[2]
-        arg[0,1,2,1]=(-0.16314640684)*x[0]**o+(-0.698681697367)*x[0]+(-0.11609738418)*x[1]**o+(-0.798465154739)*x[1]+(-0.169052628971)*x[2]**o+(-0.880316962539)*x[2]
-        arg[0,2,0,0]=(-0.219731279442)*x[0]**o+(0.731464233112)*x[0]+(0.637811533993)*x[1]**o+(0.381218512692)*x[1]+(-0.181357790048)*x[2]**o+(-0.296793024723)*x[2]
-        arg[0,2,0,1]=(0.566451624572)*x[0]**o+(0.302904935559)*x[0]+(-0.771526665232)*x[1]**o+(0.460577683302)*x[1]+(-0.921312455507)*x[2]**o+(0.604299765394)*x[2]
-        arg[0,2,1,0]=(-0.0887516895197)*x[0]**o+(0.872208558285)*x[0]+(-0.306564750999)*x[1]**o+(0.841982500263)*x[1]+(-0.550398737046)*x[2]**o+(-0.869697162427)*x[2]
-        arg[0,2,1,1]=(-0.652471383912)*x[0]**o+(0.634592304393)*x[0]+(0.0709212473167)*x[1]**o+(-0.671330082579)*x[1]+(-0.232895004478)*x[2]**o+(0.479008351165)*x[2]
-        arg[0,2,2,0]=(-0.0764115046136)*x[0]**o+(0.649230346025)*x[0]+(0.544503480999)*x[1]**o+(0.788838981797)*x[1]+(0.416236148267)*x[2]**o+(0.722979541918)*x[2]
-        arg[0,2,2,1]=(-0.0776368628837)*x[0]**o+(0.801984674386)*x[0]+(0.443670313486)*x[1]**o+(0.424676792255)*x[1]+(-0.895989937982)*x[2]**o+(0.0774648143589)*x[2]
-        arg[0,3,0,0]=(-0.39041318438)*x[0]**o+(-0.174335409262)*x[0]+(0.658666482337)*x[1]**o+(0.23060605921)*x[1]+(-0.336603364419)*x[2]**o+(0.871530192198)*x[2]
-        arg[0,3,0,1]=(-0.493104661363)*x[0]**o+(0.590779697499)*x[0]+(-0.903897457443)*x[1]**o+(-0.377640520704)*x[1]+(0.227174544833)*x[2]**o+(-0.860150483539)*x[2]
-        arg[0,3,1,0]=(-0.093367253954)*x[0]**o+(0.159230499811)*x[0]+(-0.731396509936)*x[1]**o+(0.600088148838)*x[1]+(0.829175660147)*x[2]**o+(-0.435878280919)*x[2]
-        arg[0,3,1,1]=(0.665125540711)*x[0]**o+(-0.92128737118)*x[0]+(-0.33260297543)*x[1]**o+(0.682569476816)*x[1]+(0.999761405058)*x[2]**o+(-0.748303702618)*x[2]
-        arg[0,3,2,0]=(-0.430442277525)*x[0]**o+(-0.841437664378)*x[0]+(-0.374267371055)*x[1]**o+(0.667860327373)*x[1]+(0.694185699238)*x[2]**o+(-0.673629629622)*x[2]
-        arg[0,3,2,1]=(0.304808617243)*x[0]**o+(-0.894407776037)*x[0]+(-0.758585281699)*x[1]**o+(0.20519963241)*x[1]+(0.538222015181)*x[2]**o+(-0.792962435573)*x[2]
-        arg[0,4,0,0]=(0.568300300269)*x[0]**o+(0.407455936625)*x[0]+(0.980898344535)*x[1]**o+(0.988220474461)*x[1]+(0.0598892620089)*x[2]**o+(-0.279555207723)*x[2]
-        arg[0,4,0,1]=(-0.208391854989)*x[0]**o+(0.9428019078)*x[0]+(-0.540916877275)*x[1]**o+(-0.427185538555)*x[1]+(-0.879268085857)*x[2]**o+(0.025102321099)*x[2]
-        arg[0,4,1,0]=(0.412690112527)*x[0]**o+(-0.957376863734)*x[0]+(-0.913623139719)*x[1]**o+(-0.462418849979)*x[1]+(0.463336747019)*x[2]**o+(0.330747531293)*x[2]
-        arg[0,4,1,1]=(-0.632140552118)*x[0]**o+(0.830769577671)*x[0]+(-0.888012251479)*x[1]**o+(-0.0560181569699)*x[1]+(-0.70068099248)*x[2]**o+(0.834483253039)*x[2]
-        arg[0,4,2,0]=(0.0429717567385)*x[0]**o+(-0.691784042595)*x[0]+(-0.264988764713)*x[1]**o+(0.359873170931)*x[1]+(-0.116275128437)*x[2]**o+(0.0348873917345)*x[2]
-        arg[0,4,2,1]=(-0.203754358311)*x[0]**o+(0.177896174646)*x[0]+(-0.0785920580727)*x[1]**o+(-0.124905949184)*x[1]+(0.968871355367)*x[2]**o+(-0.0369722247589)*x[2]
-        arg[1,0,0,0]=(0.594851756786)*x[0]**o+(-0.594400822936)*x[0]+(0.868401350949)*x[1]**o+(0.186739616297)*x[1]+(-0.937219946754)*x[2]**o+(-0.248916422131)*x[2]
-        arg[1,0,0,1]=(-0.639865978203)*x[0]**o+(-0.00990375501714)*x[0]+(-0.038266357411)*x[1]**o+(-0.741522380136)*x[1]+(0.460572922772)*x[2]**o+(0.4314205896)*x[2]
-        arg[1,0,1,0]=(-0.460110413486)*x[0]**o+(-0.0964934735182)*x[0]+(0.474209024352)*x[1]**o+(-0.928476110805)*x[1]+(0.598621411487)*x[2]**o+(-0.00858812754345)*x[2]
-        arg[1,0,1,1]=(0.936466172807)*x[0]**o+(-0.363937334197)*x[0]+(-0.540224651799)*x[1]**o+(0.484530722263)*x[1]+(0.675416993296)*x[2]**o+(0.89657344343)*x[2]
-        arg[1,0,2,0]=(-0.713050692555)*x[0]**o+(-0.00851892179229)*x[0]+(0.689494113809)*x[1]**o+(0.633341028044)*x[1]+(0.272726911113)*x[2]**o+(-0.122017566819)*x[2]
-        arg[1,0,2,1]=(0.793152080981)*x[0]**o+(0.287379739639)*x[0]+(0.304047372771)*x[1]**o+(-0.509079361053)*x[1]+(0.888302006985)*x[2]**o+(-0.297023045775)*x[2]
-        arg[1,1,0,0]=(-0.69695118901)*x[0]**o+(0.505182668512)*x[0]+(0.827555590952)*x[1]**o+(-0.777232447056)*x[1]+(-0.460918138036)*x[2]**o+(0.782090206922)*x[2]
-        arg[1,1,0,1]=(-0.435398535566)*x[0]**o+(-0.0997593681984)*x[0]+(0.140250252691)*x[1]**o+(-0.0204469256488)*x[1]+(-0.445836771028)*x[2]**o+(-0.775366037861)*x[2]
-        arg[1,1,1,0]=(0.918015347957)*x[0]**o+(-0.491940111489)*x[0]+(0.793071617663)*x[1]**o+(-0.607035294859)*x[1]+(0.610076618566)*x[2]**o+(0.148116733513)*x[2]
-        arg[1,1,1,1]=(0.224062518811)*x[0]**o+(-0.145897156735)*x[0]+(0.165380866901)*x[1]**o+(0.910562981814)*x[1]+(-0.406620561548)*x[2]**o+(0.528862812468)*x[2]
-        arg[1,1,2,0]=(0.85148444093)*x[0]**o+(0.13210280653)*x[0]+(0.364136256712)*x[1]**o+(0.520388575386)*x[1]+(0.0145641287346)*x[2]**o+(-0.7849036351)*x[2]
-        arg[1,1,2,1]=(0.493837193832)*x[0]**o+(-0.193326176569)*x[0]+(-0.665920972154)*x[1]**o+(-0.321645070095)*x[1]+(0.0209354853869)*x[2]**o+(-0.328315981752)*x[2]
-        arg[1,2,0,0]=(-0.349281164766)*x[0]**o+(-0.318415198113)*x[0]+(-0.687972781234)*x[1]**o+(0.91825998605)*x[1]+(0.396868773798)*x[2]**o+(0.998204458027)*x[2]
-        arg[1,2,0,1]=(-0.967493222935)*x[0]**o+(-0.721128465653)*x[0]+(-0.672178802974)*x[1]**o+(0.0924145224431)*x[1]+(0.114040587594)*x[2]**o+(0.707623895537)*x[2]
-        arg[1,2,1,0]=(-0.253327088773)*x[0]**o+(0.206063827625)*x[0]+(0.355152654895)*x[1]**o+(-0.27339285621)*x[1]+(-0.0135567122291)*x[2]**o+(-0.983990446362)*x[2]
-        arg[1,2,1,1]=(0.98471687132)*x[0]**o+(0.262902745655)*x[0]+(-0.589359138227)*x[1]**o+(-0.0982548958556)*x[1]+(-0.526161200133)*x[2]**o+(-0.850939484752)*x[2]
-        arg[1,2,2,0]=(0.37583596705)*x[0]**o+(0.274845981222)*x[0]+(0.601331110943)*x[1]**o+(0.788294448218)*x[1]+(0.366445166459)*x[2]**o+(-0.554935072394)*x[2]
-        arg[1,2,2,1]=(-0.986387850237)*x[0]**o+(0.68772989781)*x[0]+(0.345166604933)*x[1]**o+(0.930376726384)*x[1]+(0.760974421701)*x[2]**o+(0.261797396808)*x[2]
-        arg[1,3,0,0]=(-0.171005013523)*x[0]**o+(-0.339229596812)*x[0]+(-0.150317419556)*x[1]**o+(-0.0146533427463)*x[1]+(0.957020663875)*x[2]**o+(0.616513940347)*x[2]
-        arg[1,3,0,1]=(-0.0727328269499)*x[0]**o+(-0.635591748073)*x[0]+(-0.502426989774)*x[1]**o+(0.772595119619)*x[1]+(-0.76006511271)*x[2]**o+(-0.665920288084)*x[2]
-        arg[1,3,1,0]=(-0.394284205622)*x[0]**o+(-0.105959165811)*x[0]+(0.72649045701)*x[1]**o+(-0.970276379473)*x[1]+(-0.236520349415)*x[2]**o+(0.994973267783)*x[2]
-        arg[1,3,1,1]=(-0.444149867906)*x[0]**o+(0.748449201475)*x[0]+(0.419604170756)*x[1]**o+(-0.0291702705178)*x[1]+(-0.109580142628)*x[2]**o+(-0.0791870699838)*x[2]
-        arg[1,3,2,0]=(-0.629657820523)*x[0]**o+(-0.995576552624)*x[0]+(0.530135462206)*x[1]**o+(0.197336335845)*x[1]+(0.0224815558807)*x[2]**o+(0.240498463912)*x[2]
-        arg[1,3,2,1]=(0.52933948346)*x[0]**o+(0.98353913011)*x[0]+(0.0217614943138)*x[1]**o+(0.0157778453682)*x[1]+(0.177956932986)*x[2]**o+(0.234629778706)*x[2]
-        arg[1,4,0,0]=(0.593028367137)*x[0]**o+(0.0340892538994)*x[0]+(-0.0295133170051)*x[1]**o+(0.0865921041963)*x[1]+(0.641131718656)*x[2]**o+(0.788858018609)*x[2]
-        arg[1,4,0,1]=(-0.283333820634)*x[0]**o+(0.864482725099)*x[0]+(-0.560218794286)*x[1]**o+(-0.0083115362546)*x[1]+(0.726423285129)*x[2]**o+(0.031531339166)*x[2]
-        arg[1,4,1,0]=(0.801452411554)*x[0]**o+(-0.59916393038)*x[0]+(-0.106568863591)*x[1]**o+(0.357442125133)*x[1]+(-0.203380280132)*x[2]**o+(-0.129031606441)*x[2]
-        arg[1,4,1,1]=(-0.589220928637)*x[0]**o+(-0.308949389428)*x[0]+(0.785549858338)*x[1]**o+(-0.131153853015)*x[1]+(-0.30571855555)*x[2]**o+(-0.329634802588)*x[2]
-        arg[1,4,2,0]=(-0.479686944)*x[0]**o+(-0.707702026873)*x[0]+(0.635894172352)*x[1]**o+(0.370673635069)*x[1]+(0.942862875991)*x[2]**o+(-0.846943456738)*x[2]
-        arg[1,4,2,1]=(-0.403737324968)*x[0]**o+(0.101664426734)*x[0]+(-0.677093482354)*x[1]**o+(-0.36526066745)*x[1]+(-0.0889619136182)*x[2]**o+(-0.772491940844)*x[2]
-        arg[2,0,0,0]=(0.753148325987)*x[0]**o+(-0.342843083128)*x[0]+(0.812661029553)*x[1]**o+(-0.112683035459)*x[1]+(0.900976470275)*x[2]**o+(0.00934086955102)*x[2]
-        arg[2,0,0,1]=(-0.682315007143)*x[0]**o+(-0.694069900861)*x[0]+(-0.469082247747)*x[1]**o+(-0.522165903301)*x[1]+(-0.0997886221924)*x[2]**o+(-0.954161552419)*x[2]
-        arg[2,0,1,0]=(0.780125539705)*x[0]**o+(-0.445331450225)*x[0]+(-0.282765510424)*x[1]**o+(-0.0131898361592)*x[1]+(-0.200186433923)*x[2]**o+(0.715139435696)*x[2]
-        arg[2,0,1,1]=(-0.132310660786)*x[0]**o+(-0.0981344234369)*x[0]+(0.959297529475)*x[1]**o+(-0.85944894515)*x[1]+(-0.396258659619)*x[2]**o+(-0.09672066185)*x[2]
-        arg[2,0,2,0]=(-0.344134014191)*x[0]**o+(0.534345864287)*x[0]+(0.797209509484)*x[1]**o+(0.0479050101499)*x[1]+(0.13620476987)*x[2]**o+(0.82708115383)*x[2]
-        arg[2,0,2,1]=(-0.342509328238)*x[0]**o+(-0.833164493006)*x[0]+(0.472047721532)*x[1]**o+(0.301613158637)*x[1]+(0.858691679638)*x[2]**o+(-0.691744164006)*x[2]
-        arg[2,1,0,0]=(0.498979390299)*x[0]**o+(0.371513881824)*x[0]+(-0.243506167971)*x[1]**o+(-0.245423890439)*x[1]+(-0.0494707840274)*x[2]**o+(0.0965573709928)*x[2]
-        arg[2,1,0,1]=(0.665982455862)*x[0]**o+(-0.409710866336)*x[0]+(0.669257568046)*x[1]**o+(0.711947704788)*x[1]+(-0.0362568635785)*x[2]**o+(-0.30394278188)*x[2]
-        arg[2,1,1,0]=(0.296245249928)*x[0]**o+(0.132631019281)*x[0]+(-0.376880152158)*x[1]**o+(0.303184156241)*x[1]+(0.836046560882)*x[2]**o+(0.195205645106)*x[2]
-        arg[2,1,1,1]=(-0.971045820953)*x[0]**o+(0.154708896467)*x[0]+(-0.663844656602)*x[1]**o+(-0.0873797588245)*x[1]+(0.985123372542)*x[2]**o+(0.349554922131)*x[2]
-        arg[2,1,2,0]=(-0.0117443431348)*x[0]**o+(-0.71980503985)*x[0]+(0.175348078994)*x[1]**o+(-0.883987892161)*x[1]+(0.0587275450458)*x[2]**o+(0.464811715548)*x[2]
-        arg[2,1,2,1]=(-0.309202575765)*x[0]**o+(-0.528513248453)*x[0]+(-0.509298303972)*x[1]**o+(-0.228278863496)*x[1]+(0.933917053676)*x[2]**o+(-0.823678942264)*x[2]
-        arg[2,2,0,0]=(0.374387386929)*x[0]**o+(0.64969993847)*x[0]+(-0.939822635641)*x[1]**o+(0.578249430422)*x[1]+(-0.973412660635)*x[2]**o+(0.484052718386)*x[2]
-        arg[2,2,0,1]=(-0.972635162618)*x[0]**o+(-0.255007433802)*x[0]+(0.134165187097)*x[1]**o+(0.313213615976)*x[1]+(0.143298148686)*x[2]**o+(0.901819440229)*x[2]
-        arg[2,2,1,0]=(0.868173256315)*x[0]**o+(-0.532325343453)*x[0]+(-0.712500880845)*x[1]**o+(0.216943462308)*x[1]+(0.733920091212)*x[2]**o+(0.0992400603383)*x[2]
-        arg[2,2,1,1]=(0.642839350527)*x[0]**o+(0.127721543559)*x[0]+(-0.152686523032)*x[1]**o+(-0.399032361234)*x[1]+(0.317014518842)*x[2]**o+(0.905538790115)*x[2]
-        arg[2,2,2,0]=(0.685267932413)*x[0]**o+(-0.167571547782)*x[0]+(-0.213446144405)*x[1]**o+(0.420270456377)*x[1]+(0.827725350621)*x[2]**o+(-0.920242274399)*x[2]
-        arg[2,2,2,1]=(-0.507424593437)*x[0]**o+(-0.694222840019)*x[0]+(-0.904108970188)*x[1]**o+(-0.750899614966)*x[1]+(0.783997553302)*x[2]**o+(0.196327513447)*x[2]
-        arg[2,3,0,0]=(-0.473900600479)*x[0]**o+(-0.464347097789)*x[0]+(-0.472423358671)*x[1]**o+(0.373786456364)*x[1]+(-0.989371300414)*x[2]**o+(-0.959508065239)*x[2]
-        arg[2,3,0,1]=(0.174375189399)*x[0]**o+(0.925503059886)*x[0]+(-0.647274384723)*x[1]**o+(-0.577149479679)*x[1]+(0.171298877768)*x[2]**o+(-0.936612100882)*x[2]
-        arg[2,3,1,0]=(0.482959343396)*x[0]**o+(0.842243554011)*x[0]+(0.814423633314)*x[1]**o+(-0.989445050315)*x[1]+(0.817933433065)*x[2]**o+(0.552396881404)*x[2]
-        arg[2,3,1,1]=(0.55641736229)*x[0]**o+(0.498094640058)*x[0]+(0.0890113606037)*x[1]**o+(0.36592723553)*x[1]+(0.458607593386)*x[2]**o+(0.603047420063)*x[2]
-        arg[2,3,2,0]=(0.884515080124)*x[0]**o+(-0.561898381022)*x[0]+(-0.292475503834)*x[1]**o+(0.425634423478)*x[1]+(0.65813323252)*x[2]**o+(-0.548850399842)*x[2]
-        arg[2,3,2,1]=(-0.72895566982)*x[0]**o+(-0.569405588005)*x[0]+(0.117770875594)*x[1]**o+(-0.33515735969)*x[1]+(0.102062736382)*x[2]**o+(0.611532417683)*x[2]
-        arg[2,4,0,0]=(-0.669208630424)*x[0]**o+(0.944393014177)*x[0]+(-0.00345511889683)*x[1]**o+(0.0695279595783)*x[1]+(0.496948250833)*x[2]**o+(-0.899750463971)*x[2]
-        arg[2,4,0,1]=(-0.387828717292)*x[0]**o+(0.621172267004)*x[0]+(-0.280632674111)*x[1]**o+(0.401702567575)*x[1]+(-0.65554489378)*x[2]**o+(0.403018047007)*x[2]
-        arg[2,4,1,0]=(-0.0770246925803)*x[0]**o+(0.52913302745)*x[0]+(0.922468724357)*x[1]**o+(-0.304442750439)*x[1]+(-0.556575079059)*x[2]**o+(-0.725790672251)*x[2]
-        arg[2,4,1,1]=(-0.828378342911)*x[0]**o+(-0.0696370821776)*x[0]+(0.394018581667)*x[1]**o+(-0.251099848269)*x[1]+(-0.29878985656)*x[2]**o+(0.925753371056)*x[2]
-        arg[2,4,2,0]=(-0.818277786029)*x[0]**o+(0.225862354706)*x[0]+(-0.629050212595)*x[1]**o+(0.139186107062)*x[1]+(-0.0134835519238)*x[2]**o+(0.301899528641)*x[2]
-        arg[2,4,2,1]=(-0.783053684767)*x[0]**o+(-0.0926938783599)*x[0]+(0.519034210352)*x[1]**o+(-0.494564657126)*x[1]+(0.536117310622)*x[2]**o+(0.6278756634)*x[2]
-        arg[3,0,0,0]=(-0.694353957685)*x[0]**o+(-0.361037363965)*x[0]+(-0.327004091885)*x[1]**o+(-0.765735142884)*x[1]+(-0.810915729713)*x[2]**o+(0.0640539311609)*x[2]
-        arg[3,0,0,1]=(-0.131601548312)*x[0]**o+(0.271587756708)*x[0]+(0.322486168005)*x[1]**o+(0.238086581801)*x[1]+(-0.488081720555)*x[2]**o+(0.607278995635)*x[2]
-        arg[3,0,1,0]=(0.903075418102)*x[0]**o+(-0.738609834848)*x[0]+(-0.165097989126)*x[1]**o+(-0.25967140914)*x[1]+(0.271649887428)*x[2]**o+(-0.786131648727)*x[2]
-        arg[3,0,1,1]=(-0.963442989157)*x[0]**o+(-0.240205602334)*x[0]+(0.102153389731)*x[1]**o+(-0.106402434995)*x[1]+(-0.383097724211)*x[2]**o+(0.680290963195)*x[2]
-        arg[3,0,2,0]=(-0.373162835796)*x[0]**o+(-0.186323761814)*x[0]+(0.661494315705)*x[1]**o+(0.320072189494)*x[1]+(0.0964443431067)*x[2]**o+(0.829015838241)*x[2]
-        arg[3,0,2,1]=(0.527719514862)*x[0]**o+(0.0819948261665)*x[0]+(0.826598712178)*x[1]**o+(-0.588102975125)*x[1]+(-0.632584402292)*x[2]**o+(0.0826992233702)*x[2]
-        arg[3,1,0,0]=(-0.102243686287)*x[0]**o+(-0.497336112929)*x[0]+(0.941827592628)*x[1]**o+(0.68678991944)*x[1]+(-0.508684841667)*x[2]**o+(-0.752939965161)*x[2]
-        arg[3,1,0,1]=(-0.896417523183)*x[0]**o+(0.759224781685)*x[0]+(0.138537695823)*x[1]**o+(0.466727480471)*x[1]+(-0.838380824412)*x[2]**o+(0.285761157398)*x[2]
-        arg[3,1,1,0]=(-0.547853182919)*x[0]**o+(-0.41595413414)*x[0]+(0.76894221584)*x[1]**o+(-0.142394275192)*x[1]+(-0.96349294581)*x[2]**o+(-0.873639964693)*x[2]
-        arg[3,1,1,1]=(-0.151299403888)*x[0]**o+(0.789406063878)*x[0]+(0.163280670253)*x[1]**o+(-0.287315494745)*x[1]+(-0.627764670218)*x[2]**o+(0.842131632598)*x[2]
-        arg[3,1,2,0]=(-0.957096489189)*x[0]**o+(0.0616037805677)*x[0]+(0.255858200166)*x[1]**o+(-0.430555450798)*x[1]+(0.730436930737)*x[2]**o+(0.405094271653)*x[2]
-        arg[3,1,2,1]=(-0.924756832665)*x[0]**o+(0.525754162391)*x[0]+(0.281303228038)*x[1]**o+(-0.479500161878)*x[1]+(0.658416209181)*x[2]**o+(-0.0413881595557)*x[2]
-        arg[3,2,0,0]=(0.516429381997)*x[0]**o+(-0.8387318467)*x[0]+(0.329773978227)*x[1]**o+(0.599641753085)*x[1]+(0.939937743271)*x[2]**o+(-0.247331169626)*x[2]
-        arg[3,2,0,1]=(-0.644982044558)*x[0]**o+(-0.242033352774)*x[0]+(0.531835185779)*x[1]**o+(-0.851565064183)*x[1]+(-0.79213624915)*x[2]**o+(0.0607365690732)*x[2]
-        arg[3,2,1,0]=(0.359781383537)*x[0]**o+(-0.0529212842074)*x[0]+(0.845915169452)*x[1]**o+(-0.323979570458)*x[1]+(0.828909997631)*x[2]**o+(-0.839886339138)*x[2]
-        arg[3,2,1,1]=(0.559476630421)*x[0]**o+(-0.189725214615)*x[0]+(-0.00927446700413)*x[1]**o+(-0.234703720782)*x[1]+(-0.608362806755)*x[2]**o+(0.968571765534)*x[2]
-        arg[3,2,2,0]=(0.924837507913)*x[0]**o+(0.846397611121)*x[0]+(-0.837765472403)*x[1]**o+(0.0225105985057)*x[1]+(-0.834187513844)*x[2]**o+(0.194311845578)*x[2]
-        arg[3,2,2,1]=(-0.183561089961)*x[0]**o+(0.0745071729471)*x[0]+(-0.660415615202)*x[1]**o+(-0.528184997345)*x[1]+(0.205554094557)*x[2]**o+(-0.0309246318944)*x[2]
-        arg[3,3,0,0]=(-0.67124095974)*x[0]**o+(-0.48501497083)*x[0]+(-0.0394345869094)*x[1]**o+(0.586692270429)*x[1]+(-0.593760749687)*x[2]**o+(-0.124979751327)*x[2]
-        arg[3,3,0,1]=(0.778544173855)*x[0]**o+(-0.931466478494)*x[0]+(-0.746894777998)*x[1]**o+(0.806417936297)*x[1]+(0.989460929848)*x[2]**o+(0.666534366369)*x[2]
-        arg[3,3,1,0]=(-0.798870838602)*x[0]**o+(-0.294618868937)*x[0]+(0.275029092968)*x[1]**o+(0.45390580364)*x[1]+(-0.311797818508)*x[2]**o+(0.751606624393)*x[2]
-        arg[3,3,1,1]=(-0.924260987477)*x[0]**o+(0.771970726902)*x[0]+(-0.909099224213)*x[1]**o+(-0.45204206766)*x[1]+(0.630042614017)*x[2]**o+(-0.990915130464)*x[2]
-        arg[3,3,2,0]=(0.734962154852)*x[0]**o+(-0.00621898011475)*x[0]+(-0.786362527189)*x[1]**o+(0.623507947406)*x[1]+(0.867175567104)*x[2]**o+(-0.383283255448)*x[2]
-        arg[3,3,2,1]=(-0.955613156717)*x[0]**o+(0.688013754841)*x[0]+(-0.600559375208)*x[1]**o+(0.453342626645)*x[1]+(-0.864890477961)*x[2]**o+(-0.458029873063)*x[2]
-        arg[3,4,0,0]=(-0.897010884834)*x[0]**o+(-0.251223576458)*x[0]+(-0.0338052047964)*x[1]**o+(-0.903421466132)*x[1]+(0.836864217874)*x[2]**o+(0.660805905175)*x[2]
-        arg[3,4,0,1]=(-0.286025690215)*x[0]**o+(0.746732975604)*x[0]+(0.375810853218)*x[1]**o+(-0.985192974869)*x[1]+(-0.731463214455)*x[2]**o+(-0.465450352444)*x[2]
-        arg[3,4,1,0]=(-0.500910000652)*x[0]**o+(0.387502419727)*x[0]+(0.962369164802)*x[1]**o+(-0.10933824251)*x[1]+(-0.33642703989)*x[2]**o+(0.546851133256)*x[2]
-        arg[3,4,1,1]=(-0.117959459645)*x[0]**o+(0.867699323392)*x[0]+(0.950506403861)*x[1]**o+(0.613806207745)*x[1]+(0.425723173807)*x[2]**o+(-0.906937548619)*x[2]
-        arg[3,4,2,0]=(0.331114892194)*x[0]**o+(-0.168829643424)*x[0]+(-0.855962311982)*x[1]**o+(-0.144202406673)*x[1]+(0.0769985713088)*x[2]**o+(0.856003746423)*x[2]
-        arg[3,4,2,1]=(-0.439397439364)*x[0]**o+(0.686116343481)*x[0]+(0.519883854523)*x[1]**o+(0.716231469289)*x[1]+(0.270098231149)*x[2]**o+(-0.448525436427)*x[2]
-        ref[0,0,0,0]=(-0.401901998082)*x_ref[0]**o+(-0.805091116808)*x_ref[0]+(0.997659882792)*x_ref[1]**o+(-0.953957389492)*x_ref[1]+(-0.450185408289)*x_ref[2]**o+(0.636472207773)*x_ref[2]
-        ref[0,0,0,1]=(-0.786386817128)*x_ref[0]**o+(-0.882559775393)*x_ref[0]+(0.117871400819)*x_ref[1]**o+(-0.625922274774)*x_ref[1]+(0.410431886931)*x_ref[2]**o+(-0.979356501067)*x_ref[2]
-        ref[0,0,1,0]=(0.686025409275)*x_ref[0]**o+(-0.19806907659)*x_ref[0]+(-0.710420224449)*x_ref[1]**o+(-0.839236953983)*x_ref[1]+(-0.79971896093)*x_ref[2]**o+(0.378944111319)*x_ref[2]
-        ref[0,0,1,1]=(0.771205112484)*x_ref[0]**o+(-0.007083192859)*x_ref[0]+(0.672918588001)*x_ref[1]**o+(-0.351652495793)*x_ref[1]+(-0.841767161187)*x_ref[2]**o+(-0.345642373014)*x_ref[2]
-        ref[0,0,2,0]=(0.266930729015)*x_ref[0]**o+(-0.873808152307)*x_ref[0]+(0.206466759135)*x_ref[1]**o+(0.539888649948)*x_ref[1]+(0.17985862191)*x_ref[2]**o+(0.240651460153)*x_ref[2]
-        ref[0,0,2,1]=(-0.232569768041)*x_ref[0]**o+(-0.579841454072)*x_ref[0]+(-0.706956104891)*x_ref[1]**o+(0.822863815698)*x_ref[1]+(0.345774991358)*x_ref[2]**o+(-0.0848567668311)*x_ref[2]
-        ref[0,1,0,0]=(0.51593851507)*x_ref[0]**o+(-0.233342434349)*x_ref[0]+(-0.92498298026)*x_ref[1]**o+(0.164540234829)*x_ref[1]+(0.356559744499)*x_ref[2]**o+(0.483902511717)*x_ref[2]
-        ref[0,1,0,1]=(-0.811509654443)*x_ref[0]**o+(0.73929453189)*x_ref[0]+(0.256205706418)*x_ref[1]**o+(-0.667924913793)*x_ref[1]+(0.266065641257)*x_ref[2]**o+(0.856490258029)*x_ref[2]
-        ref[0,1,1,0]=(0.502051590284)*x_ref[0]**o+(0.927283797128)*x_ref[0]+(0.500854521411)*x_ref[1]**o+(-0.486326996369)*x_ref[1]+(-0.327578523685)*x_ref[2]**o+(-0.28106070397)*x_ref[2]
-        ref[0,1,1,1]=(0.201740014513)*x_ref[0]**o+(-0.166988241759)*x_ref[0]+(-0.513072955566)*x_ref[1]**o+(0.67179532417)*x_ref[1]+(-0.72135980627)*x_ref[2]**o+(0.763548886467)*x_ref[2]
-        ref[0,1,2,0]=(0.3995590338)*x_ref[0]**o+(0.433286929621)*x_ref[0]+(-0.287309453792)*x_ref[1]**o+(-0.0671679443074)*x_ref[1]+(-0.80815399993)*x_ref[2]**o+(-0.398740362114)*x_ref[2]
-        ref[0,1,2,1]=(-0.16314640684)*x_ref[0]**o+(-0.698681697367)*x_ref[0]+(-0.11609738418)*x_ref[1]**o+(-0.798465154739)*x_ref[1]+(-0.169052628971)*x_ref[2]**o+(-0.880316962539)*x_ref[2]
-        ref[0,2,0,0]=(-0.219731279442)*x_ref[0]**o+(0.731464233112)*x_ref[0]+(0.637811533993)*x_ref[1]**o+(0.381218512692)*x_ref[1]+(-0.181357790048)*x_ref[2]**o+(-0.296793024723)*x_ref[2]
-        ref[0,2,0,1]=(0.566451624572)*x_ref[0]**o+(0.302904935559)*x_ref[0]+(-0.771526665232)*x_ref[1]**o+(0.460577683302)*x_ref[1]+(-0.921312455507)*x_ref[2]**o+(0.604299765394)*x_ref[2]
-        ref[0,2,1,0]=(-0.0887516895197)*x_ref[0]**o+(0.872208558285)*x_ref[0]+(-0.306564750999)*x_ref[1]**o+(0.841982500263)*x_ref[1]+(-0.550398737046)*x_ref[2]**o+(-0.869697162427)*x_ref[2]
-        ref[0,2,1,1]=(-0.652471383912)*x_ref[0]**o+(0.634592304393)*x_ref[0]+(0.0709212473167)*x_ref[1]**o+(-0.671330082579)*x_ref[1]+(-0.232895004478)*x_ref[2]**o+(0.479008351165)*x_ref[2]
-        ref[0,2,2,0]=(-0.0764115046136)*x_ref[0]**o+(0.649230346025)*x_ref[0]+(0.544503480999)*x_ref[1]**o+(0.788838981797)*x_ref[1]+(0.416236148267)*x_ref[2]**o+(0.722979541918)*x_ref[2]
-        ref[0,2,2,1]=(-0.0776368628837)*x_ref[0]**o+(0.801984674386)*x_ref[0]+(0.443670313486)*x_ref[1]**o+(0.424676792255)*x_ref[1]+(-0.895989937982)*x_ref[2]**o+(0.0774648143589)*x_ref[2]
-        ref[0,3,0,0]=(-0.39041318438)*x_ref[0]**o+(-0.174335409262)*x_ref[0]+(0.658666482337)*x_ref[1]**o+(0.23060605921)*x_ref[1]+(-0.336603364419)*x_ref[2]**o+(0.871530192198)*x_ref[2]
-        ref[0,3,0,1]=(-0.493104661363)*x_ref[0]**o+(0.590779697499)*x_ref[0]+(-0.903897457443)*x_ref[1]**o+(-0.377640520704)*x_ref[1]+(0.227174544833)*x_ref[2]**o+(-0.860150483539)*x_ref[2]
-        ref[0,3,1,0]=(-0.093367253954)*x_ref[0]**o+(0.159230499811)*x_ref[0]+(-0.731396509936)*x_ref[1]**o+(0.600088148838)*x_ref[1]+(0.829175660147)*x_ref[2]**o+(-0.435878280919)*x_ref[2]
-        ref[0,3,1,1]=(0.665125540711)*x_ref[0]**o+(-0.92128737118)*x_ref[0]+(-0.33260297543)*x_ref[1]**o+(0.682569476816)*x_ref[1]+(0.999761405058)*x_ref[2]**o+(-0.748303702618)*x_ref[2]
-        ref[0,3,2,0]=(-0.430442277525)*x_ref[0]**o+(-0.841437664378)*x_ref[0]+(-0.374267371055)*x_ref[1]**o+(0.667860327373)*x_ref[1]+(0.694185699238)*x_ref[2]**o+(-0.673629629622)*x_ref[2]
-        ref[0,3,2,1]=(0.304808617243)*x_ref[0]**o+(-0.894407776037)*x_ref[0]+(-0.758585281699)*x_ref[1]**o+(0.20519963241)*x_ref[1]+(0.538222015181)*x_ref[2]**o+(-0.792962435573)*x_ref[2]
-        ref[0,4,0,0]=(0.568300300269)*x_ref[0]**o+(0.407455936625)*x_ref[0]+(0.980898344535)*x_ref[1]**o+(0.988220474461)*x_ref[1]+(0.0598892620089)*x_ref[2]**o+(-0.279555207723)*x_ref[2]
-        ref[0,4,0,1]=(-0.208391854989)*x_ref[0]**o+(0.9428019078)*x_ref[0]+(-0.540916877275)*x_ref[1]**o+(-0.427185538555)*x_ref[1]+(-0.879268085857)*x_ref[2]**o+(0.025102321099)*x_ref[2]
-        ref[0,4,1,0]=(0.412690112527)*x_ref[0]**o+(-0.957376863734)*x_ref[0]+(-0.913623139719)*x_ref[1]**o+(-0.462418849979)*x_ref[1]+(0.463336747019)*x_ref[2]**o+(0.330747531293)*x_ref[2]
-        ref[0,4,1,1]=(-0.632140552118)*x_ref[0]**o+(0.830769577671)*x_ref[0]+(-0.888012251479)*x_ref[1]**o+(-0.0560181569699)*x_ref[1]+(-0.70068099248)*x_ref[2]**o+(0.834483253039)*x_ref[2]
-        ref[0,4,2,0]=(0.0429717567385)*x_ref[0]**o+(-0.691784042595)*x_ref[0]+(-0.264988764713)*x_ref[1]**o+(0.359873170931)*x_ref[1]+(-0.116275128437)*x_ref[2]**o+(0.0348873917345)*x_ref[2]
-        ref[0,4,2,1]=(-0.203754358311)*x_ref[0]**o+(0.177896174646)*x_ref[0]+(-0.0785920580727)*x_ref[1]**o+(-0.124905949184)*x_ref[1]+(0.968871355367)*x_ref[2]**o+(-0.0369722247589)*x_ref[2]
-        ref[1,0,0,0]=(0.594851756786)*x_ref[0]**o+(-0.594400822936)*x_ref[0]+(0.868401350949)*x_ref[1]**o+(0.186739616297)*x_ref[1]+(-0.937219946754)*x_ref[2]**o+(-0.248916422131)*x_ref[2]
-        ref[1,0,0,1]=(-0.639865978203)*x_ref[0]**o+(-0.00990375501714)*x_ref[0]+(-0.038266357411)*x_ref[1]**o+(-0.741522380136)*x_ref[1]+(0.460572922772)*x_ref[2]**o+(0.4314205896)*x_ref[2]
-        ref[1,0,1,0]=(-0.460110413486)*x_ref[0]**o+(-0.0964934735182)*x_ref[0]+(0.474209024352)*x_ref[1]**o+(-0.928476110805)*x_ref[1]+(0.598621411487)*x_ref[2]**o+(-0.00858812754345)*x_ref[2]
-        ref[1,0,1,1]=(0.936466172807)*x_ref[0]**o+(-0.363937334197)*x_ref[0]+(-0.540224651799)*x_ref[1]**o+(0.484530722263)*x_ref[1]+(0.675416993296)*x_ref[2]**o+(0.89657344343)*x_ref[2]
-        ref[1,0,2,0]=(-0.713050692555)*x_ref[0]**o+(-0.00851892179229)*x_ref[0]+(0.689494113809)*x_ref[1]**o+(0.633341028044)*x_ref[1]+(0.272726911113)*x_ref[2]**o+(-0.122017566819)*x_ref[2]
-        ref[1,0,2,1]=(0.793152080981)*x_ref[0]**o+(0.287379739639)*x_ref[0]+(0.304047372771)*x_ref[1]**o+(-0.509079361053)*x_ref[1]+(0.888302006985)*x_ref[2]**o+(-0.297023045775)*x_ref[2]
-        ref[1,1,0,0]=(-0.69695118901)*x_ref[0]**o+(0.505182668512)*x_ref[0]+(0.827555590952)*x_ref[1]**o+(-0.777232447056)*x_ref[1]+(-0.460918138036)*x_ref[2]**o+(0.782090206922)*x_ref[2]
-        ref[1,1,0,1]=(-0.435398535566)*x_ref[0]**o+(-0.0997593681984)*x_ref[0]+(0.140250252691)*x_ref[1]**o+(-0.0204469256488)*x_ref[1]+(-0.445836771028)*x_ref[2]**o+(-0.775366037861)*x_ref[2]
-        ref[1,1,1,0]=(0.918015347957)*x_ref[0]**o+(-0.491940111489)*x_ref[0]+(0.793071617663)*x_ref[1]**o+(-0.607035294859)*x_ref[1]+(0.610076618566)*x_ref[2]**o+(0.148116733513)*x_ref[2]
-        ref[1,1,1,1]=(0.224062518811)*x_ref[0]**o+(-0.145897156735)*x_ref[0]+(0.165380866901)*x_ref[1]**o+(0.910562981814)*x_ref[1]+(-0.406620561548)*x_ref[2]**o+(0.528862812468)*x_ref[2]
-        ref[1,1,2,0]=(0.85148444093)*x_ref[0]**o+(0.13210280653)*x_ref[0]+(0.364136256712)*x_ref[1]**o+(0.520388575386)*x_ref[1]+(0.0145641287346)*x_ref[2]**o+(-0.7849036351)*x_ref[2]
-        ref[1,1,2,1]=(0.493837193832)*x_ref[0]**o+(-0.193326176569)*x_ref[0]+(-0.665920972154)*x_ref[1]**o+(-0.321645070095)*x_ref[1]+(0.0209354853869)*x_ref[2]**o+(-0.328315981752)*x_ref[2]
-        ref[1,2,0,0]=(-0.349281164766)*x_ref[0]**o+(-0.318415198113)*x_ref[0]+(-0.687972781234)*x_ref[1]**o+(0.91825998605)*x_ref[1]+(0.396868773798)*x_ref[2]**o+(0.998204458027)*x_ref[2]
-        ref[1,2,0,1]=(-0.967493222935)*x_ref[0]**o+(-0.721128465653)*x_ref[0]+(-0.672178802974)*x_ref[1]**o+(0.0924145224431)*x_ref[1]+(0.114040587594)*x_ref[2]**o+(0.707623895537)*x_ref[2]
-        ref[1,2,1,0]=(-0.253327088773)*x_ref[0]**o+(0.206063827625)*x_ref[0]+(0.355152654895)*x_ref[1]**o+(-0.27339285621)*x_ref[1]+(-0.0135567122291)*x_ref[2]**o+(-0.983990446362)*x_ref[2]
-        ref[1,2,1,1]=(0.98471687132)*x_ref[0]**o+(0.262902745655)*x_ref[0]+(-0.589359138227)*x_ref[1]**o+(-0.0982548958556)*x_ref[1]+(-0.526161200133)*x_ref[2]**o+(-0.850939484752)*x_ref[2]
-        ref[1,2,2,0]=(0.37583596705)*x_ref[0]**o+(0.274845981222)*x_ref[0]+(0.601331110943)*x_ref[1]**o+(0.788294448218)*x_ref[1]+(0.366445166459)*x_ref[2]**o+(-0.554935072394)*x_ref[2]
-        ref[1,2,2,1]=(-0.986387850237)*x_ref[0]**o+(0.68772989781)*x_ref[0]+(0.345166604933)*x_ref[1]**o+(0.930376726384)*x_ref[1]+(0.760974421701)*x_ref[2]**o+(0.261797396808)*x_ref[2]
-        ref[1,3,0,0]=(-0.171005013523)*x_ref[0]**o+(-0.339229596812)*x_ref[0]+(-0.150317419556)*x_ref[1]**o+(-0.0146533427463)*x_ref[1]+(0.957020663875)*x_ref[2]**o+(0.616513940347)*x_ref[2]
-        ref[1,3,0,1]=(-0.0727328269499)*x_ref[0]**o+(-0.635591748073)*x_ref[0]+(-0.502426989774)*x_ref[1]**o+(0.772595119619)*x_ref[1]+(-0.76006511271)*x_ref[2]**o+(-0.665920288084)*x_ref[2]
-        ref[1,3,1,0]=(-0.394284205622)*x_ref[0]**o+(-0.105959165811)*x_ref[0]+(0.72649045701)*x_ref[1]**o+(-0.970276379473)*x_ref[1]+(-0.236520349415)*x_ref[2]**o+(0.994973267783)*x_ref[2]
-        ref[1,3,1,1]=(-0.444149867906)*x_ref[0]**o+(0.748449201475)*x_ref[0]+(0.419604170756)*x_ref[1]**o+(-0.0291702705178)*x_ref[1]+(-0.109580142628)*x_ref[2]**o+(-0.0791870699838)*x_ref[2]
-        ref[1,3,2,0]=(-0.629657820523)*x_ref[0]**o+(-0.995576552624)*x_ref[0]+(0.530135462206)*x_ref[1]**o+(0.197336335845)*x_ref[1]+(0.0224815558807)*x_ref[2]**o+(0.240498463912)*x_ref[2]
-        ref[1,3,2,1]=(0.52933948346)*x_ref[0]**o+(0.98353913011)*x_ref[0]+(0.0217614943138)*x_ref[1]**o+(0.0157778453682)*x_ref[1]+(0.177956932986)*x_ref[2]**o+(0.234629778706)*x_ref[2]
-        ref[1,4,0,0]=(0.593028367137)*x_ref[0]**o+(0.0340892538994)*x_ref[0]+(-0.0295133170051)*x_ref[1]**o+(0.0865921041963)*x_ref[1]+(0.641131718656)*x_ref[2]**o+(0.788858018609)*x_ref[2]
-        ref[1,4,0,1]=(-0.283333820634)*x_ref[0]**o+(0.864482725099)*x_ref[0]+(-0.560218794286)*x_ref[1]**o+(-0.0083115362546)*x_ref[1]+(0.726423285129)*x_ref[2]**o+(0.031531339166)*x_ref[2]
-        ref[1,4,1,0]=(0.801452411554)*x_ref[0]**o+(-0.59916393038)*x_ref[0]+(-0.106568863591)*x_ref[1]**o+(0.357442125133)*x_ref[1]+(-0.203380280132)*x_ref[2]**o+(-0.129031606441)*x_ref[2]
-        ref[1,4,1,1]=(-0.589220928637)*x_ref[0]**o+(-0.308949389428)*x_ref[0]+(0.785549858338)*x_ref[1]**o+(-0.131153853015)*x_ref[1]+(-0.30571855555)*x_ref[2]**o+(-0.329634802588)*x_ref[2]
-        ref[1,4,2,0]=(-0.479686944)*x_ref[0]**o+(-0.707702026873)*x_ref[0]+(0.635894172352)*x_ref[1]**o+(0.370673635069)*x_ref[1]+(0.942862875991)*x_ref[2]**o+(-0.846943456738)*x_ref[2]
-        ref[1,4,2,1]=(-0.403737324968)*x_ref[0]**o+(0.101664426734)*x_ref[0]+(-0.677093482354)*x_ref[1]**o+(-0.36526066745)*x_ref[1]+(-0.0889619136182)*x_ref[2]**o+(-0.772491940844)*x_ref[2]
-        ref[2,0,0,0]=(0.753148325987)*x_ref[0]**o+(-0.342843083128)*x_ref[0]+(0.812661029553)*x_ref[1]**o+(-0.112683035459)*x_ref[1]+(0.900976470275)*x_ref[2]**o+(0.00934086955102)*x_ref[2]
-        ref[2,0,0,1]=(-0.682315007143)*x_ref[0]**o+(-0.694069900861)*x_ref[0]+(-0.469082247747)*x_ref[1]**o+(-0.522165903301)*x_ref[1]+(-0.0997886221924)*x_ref[2]**o+(-0.954161552419)*x_ref[2]
-        ref[2,0,1,0]=(0.780125539705)*x_ref[0]**o+(-0.445331450225)*x_ref[0]+(-0.282765510424)*x_ref[1]**o+(-0.0131898361592)*x_ref[1]+(-0.200186433923)*x_ref[2]**o+(0.715139435696)*x_ref[2]
-        ref[2,0,1,1]=(-0.132310660786)*x_ref[0]**o+(-0.0981344234369)*x_ref[0]+(0.959297529475)*x_ref[1]**o+(-0.85944894515)*x_ref[1]+(-0.396258659619)*x_ref[2]**o+(-0.09672066185)*x_ref[2]
-        ref[2,0,2,0]=(-0.344134014191)*x_ref[0]**o+(0.534345864287)*x_ref[0]+(0.797209509484)*x_ref[1]**o+(0.0479050101499)*x_ref[1]+(0.13620476987)*x_ref[2]**o+(0.82708115383)*x_ref[2]
-        ref[2,0,2,1]=(-0.342509328238)*x_ref[0]**o+(-0.833164493006)*x_ref[0]+(0.472047721532)*x_ref[1]**o+(0.301613158637)*x_ref[1]+(0.858691679638)*x_ref[2]**o+(-0.691744164006)*x_ref[2]
-        ref[2,1,0,0]=(0.498979390299)*x_ref[0]**o+(0.371513881824)*x_ref[0]+(-0.243506167971)*x_ref[1]**o+(-0.245423890439)*x_ref[1]+(-0.0494707840274)*x_ref[2]**o+(0.0965573709928)*x_ref[2]
-        ref[2,1,0,1]=(0.665982455862)*x_ref[0]**o+(-0.409710866336)*x_ref[0]+(0.669257568046)*x_ref[1]**o+(0.711947704788)*x_ref[1]+(-0.0362568635785)*x_ref[2]**o+(-0.30394278188)*x_ref[2]
-        ref[2,1,1,0]=(0.296245249928)*x_ref[0]**o+(0.132631019281)*x_ref[0]+(-0.376880152158)*x_ref[1]**o+(0.303184156241)*x_ref[1]+(0.836046560882)*x_ref[2]**o+(0.195205645106)*x_ref[2]
-        ref[2,1,1,1]=(-0.971045820953)*x_ref[0]**o+(0.154708896467)*x_ref[0]+(-0.663844656602)*x_ref[1]**o+(-0.0873797588245)*x_ref[1]+(0.985123372542)*x_ref[2]**o+(0.349554922131)*x_ref[2]
-        ref[2,1,2,0]=(-0.0117443431348)*x_ref[0]**o+(-0.71980503985)*x_ref[0]+(0.175348078994)*x_ref[1]**o+(-0.883987892161)*x_ref[1]+(0.0587275450458)*x_ref[2]**o+(0.464811715548)*x_ref[2]
-        ref[2,1,2,1]=(-0.309202575765)*x_ref[0]**o+(-0.528513248453)*x_ref[0]+(-0.509298303972)*x_ref[1]**o+(-0.228278863496)*x_ref[1]+(0.933917053676)*x_ref[2]**o+(-0.823678942264)*x_ref[2]
-        ref[2,2,0,0]=(0.374387386929)*x_ref[0]**o+(0.64969993847)*x_ref[0]+(-0.939822635641)*x_ref[1]**o+(0.578249430422)*x_ref[1]+(-0.973412660635)*x_ref[2]**o+(0.484052718386)*x_ref[2]
-        ref[2,2,0,1]=(-0.972635162618)*x_ref[0]**o+(-0.255007433802)*x_ref[0]+(0.134165187097)*x_ref[1]**o+(0.313213615976)*x_ref[1]+(0.143298148686)*x_ref[2]**o+(0.901819440229)*x_ref[2]
-        ref[2,2,1,0]=(0.868173256315)*x_ref[0]**o+(-0.532325343453)*x_ref[0]+(-0.712500880845)*x_ref[1]**o+(0.216943462308)*x_ref[1]+(0.733920091212)*x_ref[2]**o+(0.0992400603383)*x_ref[2]
-        ref[2,2,1,1]=(0.642839350527)*x_ref[0]**o+(0.127721543559)*x_ref[0]+(-0.152686523032)*x_ref[1]**o+(-0.399032361234)*x_ref[1]+(0.317014518842)*x_ref[2]**o+(0.905538790115)*x_ref[2]
-        ref[2,2,2,0]=(0.685267932413)*x_ref[0]**o+(-0.167571547782)*x_ref[0]+(-0.213446144405)*x_ref[1]**o+(0.420270456377)*x_ref[1]+(0.827725350621)*x_ref[2]**o+(-0.920242274399)*x_ref[2]
-        ref[2,2,2,1]=(-0.507424593437)*x_ref[0]**o+(-0.694222840019)*x_ref[0]+(-0.904108970188)*x_ref[1]**o+(-0.750899614966)*x_ref[1]+(0.783997553302)*x_ref[2]**o+(0.196327513447)*x_ref[2]
-        ref[2,3,0,0]=(-0.473900600479)*x_ref[0]**o+(-0.464347097789)*x_ref[0]+(-0.472423358671)*x_ref[1]**o+(0.373786456364)*x_ref[1]+(-0.989371300414)*x_ref[2]**o+(-0.959508065239)*x_ref[2]
-        ref[2,3,0,1]=(0.174375189399)*x_ref[0]**o+(0.925503059886)*x_ref[0]+(-0.647274384723)*x_ref[1]**o+(-0.577149479679)*x_ref[1]+(0.171298877768)*x_ref[2]**o+(-0.936612100882)*x_ref[2]
-        ref[2,3,1,0]=(0.482959343396)*x_ref[0]**o+(0.842243554011)*x_ref[0]+(0.814423633314)*x_ref[1]**o+(-0.989445050315)*x_ref[1]+(0.817933433065)*x_ref[2]**o+(0.552396881404)*x_ref[2]
-        ref[2,3,1,1]=(0.55641736229)*x_ref[0]**o+(0.498094640058)*x_ref[0]+(0.0890113606037)*x_ref[1]**o+(0.36592723553)*x_ref[1]+(0.458607593386)*x_ref[2]**o+(0.603047420063)*x_ref[2]
-        ref[2,3,2,0]=(0.884515080124)*x_ref[0]**o+(-0.561898381022)*x_ref[0]+(-0.292475503834)*x_ref[1]**o+(0.425634423478)*x_ref[1]+(0.65813323252)*x_ref[2]**o+(-0.548850399842)*x_ref[2]
-        ref[2,3,2,1]=(-0.72895566982)*x_ref[0]**o+(-0.569405588005)*x_ref[0]+(0.117770875594)*x_ref[1]**o+(-0.33515735969)*x_ref[1]+(0.102062736382)*x_ref[2]**o+(0.611532417683)*x_ref[2]
-        ref[2,4,0,0]=(-0.669208630424)*x_ref[0]**o+(0.944393014177)*x_ref[0]+(-0.00345511889683)*x_ref[1]**o+(0.0695279595783)*x_ref[1]+(0.496948250833)*x_ref[2]**o+(-0.899750463971)*x_ref[2]
-        ref[2,4,0,1]=(-0.387828717292)*x_ref[0]**o+(0.621172267004)*x_ref[0]+(-0.280632674111)*x_ref[1]**o+(0.401702567575)*x_ref[1]+(-0.65554489378)*x_ref[2]**o+(0.403018047007)*x_ref[2]
-        ref[2,4,1,0]=(-0.0770246925803)*x_ref[0]**o+(0.52913302745)*x_ref[0]+(0.922468724357)*x_ref[1]**o+(-0.304442750439)*x_ref[1]+(-0.556575079059)*x_ref[2]**o+(-0.725790672251)*x_ref[2]
-        ref[2,4,1,1]=(-0.828378342911)*x_ref[0]**o+(-0.0696370821776)*x_ref[0]+(0.394018581667)*x_ref[1]**o+(-0.251099848269)*x_ref[1]+(-0.29878985656)*x_ref[2]**o+(0.925753371056)*x_ref[2]
-        ref[2,4,2,0]=(-0.818277786029)*x_ref[0]**o+(0.225862354706)*x_ref[0]+(-0.629050212595)*x_ref[1]**o+(0.139186107062)*x_ref[1]+(-0.0134835519238)*x_ref[2]**o+(0.301899528641)*x_ref[2]
-        ref[2,4,2,1]=(-0.783053684767)*x_ref[0]**o+(-0.0926938783599)*x_ref[0]+(0.519034210352)*x_ref[1]**o+(-0.494564657126)*x_ref[1]+(0.536117310622)*x_ref[2]**o+(0.6278756634)*x_ref[2]
-        ref[3,0,0,0]=(-0.694353957685)*x_ref[0]**o+(-0.361037363965)*x_ref[0]+(-0.327004091885)*x_ref[1]**o+(-0.765735142884)*x_ref[1]+(-0.810915729713)*x_ref[2]**o+(0.0640539311609)*x_ref[2]
-        ref[3,0,0,1]=(-0.131601548312)*x_ref[0]**o+(0.271587756708)*x_ref[0]+(0.322486168005)*x_ref[1]**o+(0.238086581801)*x_ref[1]+(-0.488081720555)*x_ref[2]**o+(0.607278995635)*x_ref[2]
-        ref[3,0,1,0]=(0.903075418102)*x_ref[0]**o+(-0.738609834848)*x_ref[0]+(-0.165097989126)*x_ref[1]**o+(-0.25967140914)*x_ref[1]+(0.271649887428)*x_ref[2]**o+(-0.786131648727)*x_ref[2]
-        ref[3,0,1,1]=(-0.963442989157)*x_ref[0]**o+(-0.240205602334)*x_ref[0]+(0.102153389731)*x_ref[1]**o+(-0.106402434995)*x_ref[1]+(-0.383097724211)*x_ref[2]**o+(0.680290963195)*x_ref[2]
-        ref[3,0,2,0]=(-0.373162835796)*x_ref[0]**o+(-0.186323761814)*x_ref[0]+(0.661494315705)*x_ref[1]**o+(0.320072189494)*x_ref[1]+(0.0964443431067)*x_ref[2]**o+(0.829015838241)*x_ref[2]
-        ref[3,0,2,1]=(0.527719514862)*x_ref[0]**o+(0.0819948261665)*x_ref[0]+(0.826598712178)*x_ref[1]**o+(-0.588102975125)*x_ref[1]+(-0.632584402292)*x_ref[2]**o+(0.0826992233702)*x_ref[2]
-        ref[3,1,0,0]=(-0.102243686287)*x_ref[0]**o+(-0.497336112929)*x_ref[0]+(0.941827592628)*x_ref[1]**o+(0.68678991944)*x_ref[1]+(-0.508684841667)*x_ref[2]**o+(-0.752939965161)*x_ref[2]
-        ref[3,1,0,1]=(-0.896417523183)*x_ref[0]**o+(0.759224781685)*x_ref[0]+(0.138537695823)*x_ref[1]**o+(0.466727480471)*x_ref[1]+(-0.838380824412)*x_ref[2]**o+(0.285761157398)*x_ref[2]
-        ref[3,1,1,0]=(-0.547853182919)*x_ref[0]**o+(-0.41595413414)*x_ref[0]+(0.76894221584)*x_ref[1]**o+(-0.142394275192)*x_ref[1]+(-0.96349294581)*x_ref[2]**o+(-0.873639964693)*x_ref[2]
-        ref[3,1,1,1]=(-0.151299403888)*x_ref[0]**o+(0.789406063878)*x_ref[0]+(0.163280670253)*x_ref[1]**o+(-0.287315494745)*x_ref[1]+(-0.627764670218)*x_ref[2]**o+(0.842131632598)*x_ref[2]
-        ref[3,1,2,0]=(-0.957096489189)*x_ref[0]**o+(0.0616037805677)*x_ref[0]+(0.255858200166)*x_ref[1]**o+(-0.430555450798)*x_ref[1]+(0.730436930737)*x_ref[2]**o+(0.405094271653)*x_ref[2]
-        ref[3,1,2,1]=(-0.924756832665)*x_ref[0]**o+(0.525754162391)*x_ref[0]+(0.281303228038)*x_ref[1]**o+(-0.479500161878)*x_ref[1]+(0.658416209181)*x_ref[2]**o+(-0.0413881595557)*x_ref[2]
-        ref[3,2,0,0]=(0.516429381997)*x_ref[0]**o+(-0.8387318467)*x_ref[0]+(0.329773978227)*x_ref[1]**o+(0.599641753085)*x_ref[1]+(0.939937743271)*x_ref[2]**o+(-0.247331169626)*x_ref[2]
-        ref[3,2,0,1]=(-0.644982044558)*x_ref[0]**o+(-0.242033352774)*x_ref[0]+(0.531835185779)*x_ref[1]**o+(-0.851565064183)*x_ref[1]+(-0.79213624915)*x_ref[2]**o+(0.0607365690732)*x_ref[2]
-        ref[3,2,1,0]=(0.359781383537)*x_ref[0]**o+(-0.0529212842074)*x_ref[0]+(0.845915169452)*x_ref[1]**o+(-0.323979570458)*x_ref[1]+(0.828909997631)*x_ref[2]**o+(-0.839886339138)*x_ref[2]
-        ref[3,2,1,1]=(0.559476630421)*x_ref[0]**o+(-0.189725214615)*x_ref[0]+(-0.00927446700413)*x_ref[1]**o+(-0.234703720782)*x_ref[1]+(-0.608362806755)*x_ref[2]**o+(0.968571765534)*x_ref[2]
-        ref[3,2,2,0]=(0.924837507913)*x_ref[0]**o+(0.846397611121)*x_ref[0]+(-0.837765472403)*x_ref[1]**o+(0.0225105985057)*x_ref[1]+(-0.834187513844)*x_ref[2]**o+(0.194311845578)*x_ref[2]
-        ref[3,2,2,1]=(-0.183561089961)*x_ref[0]**o+(0.0745071729471)*x_ref[0]+(-0.660415615202)*x_ref[1]**o+(-0.528184997345)*x_ref[1]+(0.205554094557)*x_ref[2]**o+(-0.0309246318944)*x_ref[2]
-        ref[3,3,0,0]=(-0.67124095974)*x_ref[0]**o+(-0.48501497083)*x_ref[0]+(-0.0394345869094)*x_ref[1]**o+(0.586692270429)*x_ref[1]+(-0.593760749687)*x_ref[2]**o+(-0.124979751327)*x_ref[2]
-        ref[3,3,0,1]=(0.778544173855)*x_ref[0]**o+(-0.931466478494)*x_ref[0]+(-0.746894777998)*x_ref[1]**o+(0.806417936297)*x_ref[1]+(0.989460929848)*x_ref[2]**o+(0.666534366369)*x_ref[2]
-        ref[3,3,1,0]=(-0.798870838602)*x_ref[0]**o+(-0.294618868937)*x_ref[0]+(0.275029092968)*x_ref[1]**o+(0.45390580364)*x_ref[1]+(-0.311797818508)*x_ref[2]**o+(0.751606624393)*x_ref[2]
-        ref[3,3,1,1]=(-0.924260987477)*x_ref[0]**o+(0.771970726902)*x_ref[0]+(-0.909099224213)*x_ref[1]**o+(-0.45204206766)*x_ref[1]+(0.630042614017)*x_ref[2]**o+(-0.990915130464)*x_ref[2]
-        ref[3,3,2,0]=(0.734962154852)*x_ref[0]**o+(-0.00621898011475)*x_ref[0]+(-0.786362527189)*x_ref[1]**o+(0.623507947406)*x_ref[1]+(0.867175567104)*x_ref[2]**o+(-0.383283255448)*x_ref[2]
-        ref[3,3,2,1]=(-0.955613156717)*x_ref[0]**o+(0.688013754841)*x_ref[0]+(-0.600559375208)*x_ref[1]**o+(0.453342626645)*x_ref[1]+(-0.864890477961)*x_ref[2]**o+(-0.458029873063)*x_ref[2]
-        ref[3,4,0,0]=(-0.897010884834)*x_ref[0]**o+(-0.251223576458)*x_ref[0]+(-0.0338052047964)*x_ref[1]**o+(-0.903421466132)*x_ref[1]+(0.836864217874)*x_ref[2]**o+(0.660805905175)*x_ref[2]
-        ref[3,4,0,1]=(-0.286025690215)*x_ref[0]**o+(0.746732975604)*x_ref[0]+(0.375810853218)*x_ref[1]**o+(-0.985192974869)*x_ref[1]+(-0.731463214455)*x_ref[2]**o+(-0.465450352444)*x_ref[2]
-        ref[3,4,1,0]=(-0.500910000652)*x_ref[0]**o+(0.387502419727)*x_ref[0]+(0.962369164802)*x_ref[1]**o+(-0.10933824251)*x_ref[1]+(-0.33642703989)*x_ref[2]**o+(0.546851133256)*x_ref[2]
-        ref[3,4,1,1]=(-0.117959459645)*x_ref[0]**o+(0.867699323392)*x_ref[0]+(0.950506403861)*x_ref[1]**o+(0.613806207745)*x_ref[1]+(0.425723173807)*x_ref[2]**o+(-0.906937548619)*x_ref[2]
-        ref[3,4,2,0]=(0.331114892194)*x_ref[0]**o+(-0.168829643424)*x_ref[0]+(-0.855962311982)*x_ref[1]**o+(-0.144202406673)*x_ref[1]+(0.0769985713088)*x_ref[2]**o+(0.856003746423)*x_ref[2]
-        ref[3,4,2,1]=(-0.439397439364)*x_ref[0]**o+(0.686116343481)*x_ref[0]+(0.519883854523)*x_ref[1]**o+(0.716231469289)*x_ref[1]+(0.270098231149)*x_ref[2]**o+(-0.448525436427)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.787646538574)*x[0]+(0.912422904218)*x[1]
-        ref=(-0.787646538574)*x_ref[0]+(0.912422904218)*x_ref[1]
-      else:
-        arg=(0.934044939024)*x[0]+(0.628477728603)*x[1]+(-0.786339405837)*x[2]
-        ref=(0.934044939024)*x_ref[0]+(0.628477728603)*x_ref[1]+(-0.786339405837)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        arg[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-        ref[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        ref[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-      else:
-        arg[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        arg[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-        ref[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        ref[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.797066914479)*x[0]+(-0.0269853164939)*x[1]
-        arg[0,1]=(-1.07443661798)*x[0]+(0.818510216043)*x[1]
-        arg[0,2]=(0.398735262179)*x[0]+(-0.580387872083)*x[1]
-        arg[0,3]=(-0.003185613959)*x[0]+(-0.670506330615)*x[1]
-        arg[0,4]=(0.385009570186)*x[0]+(0.858570512936)*x[1]
-        arg[1,0]=(1.60917176753)*x[0]+(-0.0866362449992)*x[1]
-        arg[1,1]=(-0.883782122452)*x[0]+(-0.402187705578)*x[1]
-        arg[1,2]=(0.153893095122)*x[0]+(-1.19636362644)*x[1]
-        arg[1,3]=(1.92041961031)*x[0]+(0.325857877636)*x[1]
-        arg[1,4]=(-0.0947698843729)*x[0]+(-0.0663785758627)*x[1]
-        arg[2,0]=(0.0232949467051)*x[0]+(1.60134210326)*x[1]
-        arg[2,1]=(-0.521182882924)*x[0]+(-0.507401571343)*x[1]
-        arg[2,2]=(0.833797117616)*x[0]+(-0.268886477194)*x[1]
-        arg[2,3]=(-0.867762611227)*x[0]+(1.03727088566)*x[1]
-        arg[2,4]=(0.380510651918)*x[0]+(0.350246888456)*x[1]
-        arg[3,0]=(-1.10155500839)*x[0]+(0.414683749118)*x[1]
-        arg[3,1]=(-0.0306733233552)*x[0]+(-0.351251014237)*x[1]
-        arg[3,2]=(-0.0708773001498)*x[0]+(-0.326636587948)*x[1]
-        arg[3,3]=(-1.32553119895)*x[0]+(-1.5852157477)*x[1]
-        arg[3,4]=(1.40177154802)*x[0]+(-1.24804787994)*x[1]
-        ref[0,0]=(-0.797066914479)*x_ref[0]+(-0.0269853164939)*x_ref[1]
-        ref[0,1]=(-1.07443661798)*x_ref[0]+(0.818510216043)*x_ref[1]
-        ref[0,2]=(0.398735262179)*x_ref[0]+(-0.580387872083)*x_ref[1]
-        ref[0,3]=(-0.003185613959)*x_ref[0]+(-0.670506330615)*x_ref[1]
-        ref[0,4]=(0.385009570186)*x_ref[0]+(0.858570512936)*x_ref[1]
-        ref[1,0]=(1.60917176753)*x_ref[0]+(-0.0866362449992)*x_ref[1]
-        ref[1,1]=(-0.883782122452)*x_ref[0]+(-0.402187705578)*x_ref[1]
-        ref[1,2]=(0.153893095122)*x_ref[0]+(-1.19636362644)*x_ref[1]
-        ref[1,3]=(1.92041961031)*x_ref[0]+(0.325857877636)*x_ref[1]
-        ref[1,4]=(-0.0947698843729)*x_ref[0]+(-0.0663785758627)*x_ref[1]
-        ref[2,0]=(0.0232949467051)*x_ref[0]+(1.60134210326)*x_ref[1]
-        ref[2,1]=(-0.521182882924)*x_ref[0]+(-0.507401571343)*x_ref[1]
-        ref[2,2]=(0.833797117616)*x_ref[0]+(-0.268886477194)*x_ref[1]
-        ref[2,3]=(-0.867762611227)*x_ref[0]+(1.03727088566)*x_ref[1]
-        ref[2,4]=(0.380510651918)*x_ref[0]+(0.350246888456)*x_ref[1]
-        ref[3,0]=(-1.10155500839)*x_ref[0]+(0.414683749118)*x_ref[1]
-        ref[3,1]=(-0.0306733233552)*x_ref[0]+(-0.351251014237)*x_ref[1]
-        ref[3,2]=(-0.0708773001498)*x_ref[0]+(-0.326636587948)*x_ref[1]
-        ref[3,3]=(-1.32553119895)*x_ref[0]+(-1.5852157477)*x_ref[1]
-        ref[3,4]=(1.40177154802)*x_ref[0]+(-1.24804787994)*x_ref[1]
-      else:
-        arg[0,0]=(0.000362194678523)*x[0]+(-1.63949220671)*x[1]+(-0.176997156562)*x[2]
-        arg[0,1]=(-0.357589049408)*x[0]+(0.828191515325)*x[1]+(-0.269706780136)*x[2]
-        arg[0,2]=(0.886395070544)*x[0]+(0.815688451839)*x[1]+(-0.658412270558)*x[2]
-        arg[0,3]=(-0.222573318026)*x[0]+(0.137763803092)*x[1]+(0.171902150187)*x[2]
-        arg[0,4]=(1.05159741251)*x[0]+(0.923836841038)*x[1]+(-0.426590801731)*x[2]
-        arg[1,0]=(-0.00718419057788)*x[0]+(1.55809964998)*x[1]+(-0.912766657496)*x[2]
-        arg[1,1]=(1.30769045785)*x[0]+(-0.0356609338389)*x[1]+(0.214543084134)*x[2]
-        arg[1,2]=(-1.56763014241)*x[0]+(-0.582970995722)*x[1]+(-0.513972924752)*x[2]
-        arg[1,3]=(0.118027736928)*x[0]+(-0.28795014876)*x[1]+(0.620718623034)*x[2]
-        arg[1,4]=(-0.784496170193)*x[0]+(0.233037866924)*x[1]+(-0.0500718134572)*x[2]
-        arg[2,0]=(0.800851281806)*x[0]+(0.219346484846)*x[1]+(1.19125787701)*x[2]
-        arg[2,1]=(-1.45025879429)*x[0]+(-1.32011538154)*x[1]+(0.47946669308)*x[2]
-        arg[2,2]=(-0.231377110469)*x[0]+(-0.921551695999)*x[1]+(-0.298964635841)*x[2]
-        arg[2,3]=(0.965766335546)*x[0]+(0.424791610089)*x[1]+(1.01860652092)*x[2]
-        arg[2,4]=(0.676247093636)*x[0]+(-1.50802741511)*x[1]+(0.0385960918391)*x[2]
-        arg[3,0]=(0.322378151756)*x[0]+(-0.483633005509)*x[1]+(-0.852371707865)*x[2]
-        arg[3,1]=(-0.241998307153)*x[0]+(-1.08134340082)*x[1]+(-0.849574532537)*x[2]
-        arg[3,2]=(-0.0185751405467)*x[0]+(0.179558416001)*x[1]+(-0.488727308548)*x[2]
-        arg[3,3]=(0.0984555057845)*x[0]+(1.03085967788)*x[1]+(-0.357009094371)*x[2]
-        arg[3,4]=(0.430593980121)*x[0]+(0.689565614489)*x[1]+(-0.0916541808491)*x[2]
-        ref[0,0]=(0.000362194678523)*x_ref[0]+(-1.63949220671)*x_ref[1]+(-0.176997156562)*x_ref[2]
-        ref[0,1]=(-0.357589049408)*x_ref[0]+(0.828191515325)*x_ref[1]+(-0.269706780136)*x_ref[2]
-        ref[0,2]=(0.886395070544)*x_ref[0]+(0.815688451839)*x_ref[1]+(-0.658412270558)*x_ref[2]
-        ref[0,3]=(-0.222573318026)*x_ref[0]+(0.137763803092)*x_ref[1]+(0.171902150187)*x_ref[2]
-        ref[0,4]=(1.05159741251)*x_ref[0]+(0.923836841038)*x_ref[1]+(-0.426590801731)*x_ref[2]
-        ref[1,0]=(-0.00718419057788)*x_ref[0]+(1.55809964998)*x_ref[1]+(-0.912766657496)*x_ref[2]
-        ref[1,1]=(1.30769045785)*x_ref[0]+(-0.0356609338389)*x_ref[1]+(0.214543084134)*x_ref[2]
-        ref[1,2]=(-1.56763014241)*x_ref[0]+(-0.582970995722)*x_ref[1]+(-0.513972924752)*x_ref[2]
-        ref[1,3]=(0.118027736928)*x_ref[0]+(-0.28795014876)*x_ref[1]+(0.620718623034)*x_ref[2]
-        ref[1,4]=(-0.784496170193)*x_ref[0]+(0.233037866924)*x_ref[1]+(-0.0500718134572)*x_ref[2]
-        ref[2,0]=(0.800851281806)*x_ref[0]+(0.219346484846)*x_ref[1]+(1.19125787701)*x_ref[2]
-        ref[2,1]=(-1.45025879429)*x_ref[0]+(-1.32011538154)*x_ref[1]+(0.47946669308)*x_ref[2]
-        ref[2,2]=(-0.231377110469)*x_ref[0]+(-0.921551695999)*x_ref[1]+(-0.298964635841)*x_ref[2]
-        ref[2,3]=(0.965766335546)*x_ref[0]+(0.424791610089)*x_ref[1]+(1.01860652092)*x_ref[2]
-        ref[2,4]=(0.676247093636)*x_ref[0]+(-1.50802741511)*x_ref[1]+(0.0385960918391)*x_ref[2]
-        ref[3,0]=(0.322378151756)*x_ref[0]+(-0.483633005509)*x_ref[1]+(-0.852371707865)*x_ref[2]
-        ref[3,1]=(-0.241998307153)*x_ref[0]+(-1.08134340082)*x_ref[1]+(-0.849574532537)*x_ref[2]
-        ref[3,2]=(-0.0185751405467)*x_ref[0]+(0.179558416001)*x_ref[1]+(-0.488727308548)*x_ref[2]
-        ref[3,3]=(0.0984555057845)*x_ref[0]+(1.03085967788)*x_ref[1]+(-0.357009094371)*x_ref[2]
-        ref[3,4]=(0.430593980121)*x_ref[0]+(0.689565614489)*x_ref[1]+(-0.0916541808491)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0641544023301)*x[0]+(0.364286357763)*x[1]
-        arg[0,0,1]=(-0.858288240411)*x[0]+(-0.847764393559)*x[1]
-        arg[0,1,0]=(-0.656948775029)*x[0]+(1.69748608992)*x[1]
-        arg[0,1,1]=(0.579399191549)*x[0]+(1.48407368783)*x[1]
-        arg[1,0,0]=(-0.35948657403)*x[0]+(0.795436090765)*x[1]
-        arg[1,0,1]=(-1.32807156246)*x[0]+(0.921960610294)*x[1]
-        arg[1,1,0]=(1.0904085219)*x[0]+(-1.41870997296)*x[1]
-        arg[1,1,1]=(-0.677691596793)*x[0]+(-0.395373706333)*x[1]
-        arg[2,0,0]=(0.295591917216)*x[0]+(-1.75550830457)*x[1]
-        arg[2,0,1]=(0.506665326626)*x[0]+(0.273265713965)*x[1]
-        arg[2,1,0]=(0.543899865352)*x[0]+(-0.0678457091657)*x[1]
-        arg[2,1,1]=(-0.887824769535)*x[0]+(0.527475538055)*x[1]
-        arg[3,0,0]=(-0.788511557365)*x[0]+(-0.635972100675)*x[1]
-        arg[3,0,1]=(-1.02799066459)*x[0]+(-0.416241247725)*x[1]
-        arg[3,1,0]=(-0.310072483091)*x[0]+(1.2445160445)*x[1]
-        arg[3,1,1]=(0.912462196567)*x[0]+(0.631855269783)*x[1]
-        arg[4,0,0]=(0.700426861807)*x[0]+(-0.491365913713)*x[1]
-        arg[4,0,1]=(0.628791538338)*x[0]+(0.640767645586)*x[1]
-        arg[4,1,0]=(0.370886720329)*x[0]+(0.823663448834)*x[1]
-        arg[4,1,1]=(1.75857310774)*x[0]+(0.445439424641)*x[1]
-        arg[5,0,0]=(1.39637385066)*x[0]+(-0.812211860169)*x[1]
-        arg[5,0,1]=(0.865050350195)*x[0]+(-1.25983380375)*x[1]
-        arg[5,1,0]=(-0.0429057645445)*x[0]+(-1.08490578934)*x[1]
-        arg[5,1,1]=(1.42851264594)*x[0]+(1.52192971749)*x[1]
-        ref[0,0,0]=(-0.0641544023301)*x_ref[0]+(0.364286357763)*x_ref[1]
-        ref[0,0,1]=(-0.858288240411)*x_ref[0]+(-0.847764393559)*x_ref[1]
-        ref[0,1,0]=(-0.656948775029)*x_ref[0]+(1.69748608992)*x_ref[1]
-        ref[0,1,1]=(0.579399191549)*x_ref[0]+(1.48407368783)*x_ref[1]
-        ref[1,0,0]=(-0.35948657403)*x_ref[0]+(0.795436090765)*x_ref[1]
-        ref[1,0,1]=(-1.32807156246)*x_ref[0]+(0.921960610294)*x_ref[1]
-        ref[1,1,0]=(1.0904085219)*x_ref[0]+(-1.41870997296)*x_ref[1]
-        ref[1,1,1]=(-0.677691596793)*x_ref[0]+(-0.395373706333)*x_ref[1]
-        ref[2,0,0]=(0.295591917216)*x_ref[0]+(-1.75550830457)*x_ref[1]
-        ref[2,0,1]=(0.506665326626)*x_ref[0]+(0.273265713965)*x_ref[1]
-        ref[2,1,0]=(0.543899865352)*x_ref[0]+(-0.0678457091657)*x_ref[1]
-        ref[2,1,1]=(-0.887824769535)*x_ref[0]+(0.527475538055)*x_ref[1]
-        ref[3,0,0]=(-0.788511557365)*x_ref[0]+(-0.635972100675)*x_ref[1]
-        ref[3,0,1]=(-1.02799066459)*x_ref[0]+(-0.416241247725)*x_ref[1]
-        ref[3,1,0]=(-0.310072483091)*x_ref[0]+(1.2445160445)*x_ref[1]
-        ref[3,1,1]=(0.912462196567)*x_ref[0]+(0.631855269783)*x_ref[1]
-        ref[4,0,0]=(0.700426861807)*x_ref[0]+(-0.491365913713)*x_ref[1]
-        ref[4,0,1]=(0.628791538338)*x_ref[0]+(0.640767645586)*x_ref[1]
-        ref[4,1,0]=(0.370886720329)*x_ref[0]+(0.823663448834)*x_ref[1]
-        ref[4,1,1]=(1.75857310774)*x_ref[0]+(0.445439424641)*x_ref[1]
-        ref[5,0,0]=(1.39637385066)*x_ref[0]+(-0.812211860169)*x_ref[1]
-        ref[5,0,1]=(0.865050350195)*x_ref[0]+(-1.25983380375)*x_ref[1]
-        ref[5,1,0]=(-0.0429057645445)*x_ref[0]+(-1.08490578934)*x_ref[1]
-        ref[5,1,1]=(1.42851264594)*x_ref[0]+(1.52192971749)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.731194732468)*x[0]+(-0.0822115660022)*x[1]+(-0.403175091289)*x[2]
-        arg[0,0,1]=(0.39292230307)*x[0]+(1.48598681615)*x[1]+(1.05545374107)*x[2]
-        arg[0,1,0]=(0.306844260706)*x[0]+(0.836496026763)*x[1]+(-0.121120983155)*x[2]
-        arg[0,1,1]=(-0.155245802062)*x[0]+(0.800232934864)*x[1]+(0.373397160636)*x[2]
-        arg[1,0,0]=(0.155941790359)*x[0]+(0.826821969281)*x[1]+(0.849596807425)*x[2]
-        arg[1,0,1]=(-0.0988854656187)*x[0]+(-0.855032499842)*x[1]+(0.141988288566)*x[2]
-        arg[1,1,0]=(-0.761032539296)*x[0]+(-0.0892979073234)*x[1]+(1.93034385132)*x[2]
-        arg[1,1,1]=(-1.08303603558)*x[0]+(-0.487250117659)*x[1]+(0.0358501036173)*x[2]
-        arg[2,0,0]=(0.148391465413)*x[0]+(-0.731963025625)*x[1]+(0.484236965689)*x[2]
-        arg[2,0,1]=(1.06691217722)*x[0]+(-0.638095266244)*x[1]+(-0.971838410779)*x[2]
-        arg[2,1,0]=(-0.377750829061)*x[0]+(-0.101467967263)*x[1]+(-1.54241387349)*x[2]
-        arg[2,1,1]=(0.62210350231)*x[0]+(0.0435334873911)*x[1]+(-0.299303646623)*x[2]
-        arg[3,0,0]=(0.523811147108)*x[0]+(-1.09709839108)*x[1]+(1.83592280935)*x[2]
-        arg[3,0,1]=(0.957738143475)*x[0]+(0.282158440867)*x[1]+(0.621694180522)*x[2]
-        arg[3,1,0]=(0.366557891822)*x[0]+(0.812194047631)*x[1]+(-0.245067876349)*x[2]
-        arg[3,1,1]=(0.604859464982)*x[0]+(1.08415514854)*x[1]+(-1.470128848)*x[2]
-        arg[4,0,0]=(-0.13031502499)*x[0]+(-1.20707238733)*x[1]+(0.108382497552)*x[2]
-        arg[4,0,1]=(1.30453246317)*x[0]+(1.59696612588)*x[1]+(-0.234259043697)*x[2]
-        arg[4,1,0]=(-0.233494640836)*x[0]+(1.10701061816)*x[1]+(-0.409927013674)*x[2]
-        arg[4,1,1]=(0.102708240266)*x[0]+(-0.381598345002)*x[1]+(-1.39077748656)*x[2]
-        arg[5,0,0]=(1.06217404493)*x[0]+(1.1600791444)*x[1]+(-1.45242735389)*x[2]
-        arg[5,0,1]=(-0.423024189506)*x[0]+(-0.0868948651641)*x[1]+(0.0894539043522)*x[2]
-        arg[5,1,0]=(1.17650613067)*x[0]+(0.993832919965)*x[1]+(1.16546768569)*x[2]
-        arg[5,1,1]=(-0.61549132897)*x[0]+(-0.499619662734)*x[1]+(-0.643422281669)*x[2]
-        ref[0,0,0]=(0.731194732468)*x_ref[0]+(-0.0822115660022)*x_ref[1]+(-0.403175091289)*x_ref[2]
-        ref[0,0,1]=(0.39292230307)*x_ref[0]+(1.48598681615)*x_ref[1]+(1.05545374107)*x_ref[2]
-        ref[0,1,0]=(0.306844260706)*x_ref[0]+(0.836496026763)*x_ref[1]+(-0.121120983155)*x_ref[2]
-        ref[0,1,1]=(-0.155245802062)*x_ref[0]+(0.800232934864)*x_ref[1]+(0.373397160636)*x_ref[2]
-        ref[1,0,0]=(0.155941790359)*x_ref[0]+(0.826821969281)*x_ref[1]+(0.849596807425)*x_ref[2]
-        ref[1,0,1]=(-0.0988854656187)*x_ref[0]+(-0.855032499842)*x_ref[1]+(0.141988288566)*x_ref[2]
-        ref[1,1,0]=(-0.761032539296)*x_ref[0]+(-0.0892979073234)*x_ref[1]+(1.93034385132)*x_ref[2]
-        ref[1,1,1]=(-1.08303603558)*x_ref[0]+(-0.487250117659)*x_ref[1]+(0.0358501036173)*x_ref[2]
-        ref[2,0,0]=(0.148391465413)*x_ref[0]+(-0.731963025625)*x_ref[1]+(0.484236965689)*x_ref[2]
-        ref[2,0,1]=(1.06691217722)*x_ref[0]+(-0.638095266244)*x_ref[1]+(-0.971838410779)*x_ref[2]
-        ref[2,1,0]=(-0.377750829061)*x_ref[0]+(-0.101467967263)*x_ref[1]+(-1.54241387349)*x_ref[2]
-        ref[2,1,1]=(0.62210350231)*x_ref[0]+(0.0435334873911)*x_ref[1]+(-0.299303646623)*x_ref[2]
-        ref[3,0,0]=(0.523811147108)*x_ref[0]+(-1.09709839108)*x_ref[1]+(1.83592280935)*x_ref[2]
-        ref[3,0,1]=(0.957738143475)*x_ref[0]+(0.282158440867)*x_ref[1]+(0.621694180522)*x_ref[2]
-        ref[3,1,0]=(0.366557891822)*x_ref[0]+(0.812194047631)*x_ref[1]+(-0.245067876349)*x_ref[2]
-        ref[3,1,1]=(0.604859464982)*x_ref[0]+(1.08415514854)*x_ref[1]+(-1.470128848)*x_ref[2]
-        ref[4,0,0]=(-0.13031502499)*x_ref[0]+(-1.20707238733)*x_ref[1]+(0.108382497552)*x_ref[2]
-        ref[4,0,1]=(1.30453246317)*x_ref[0]+(1.59696612588)*x_ref[1]+(-0.234259043697)*x_ref[2]
-        ref[4,1,0]=(-0.233494640836)*x_ref[0]+(1.10701061816)*x_ref[1]+(-0.409927013674)*x_ref[2]
-        ref[4,1,1]=(0.102708240266)*x_ref[0]+(-0.381598345002)*x_ref[1]+(-1.39077748656)*x_ref[2]
-        ref[5,0,0]=(1.06217404493)*x_ref[0]+(1.1600791444)*x_ref[1]+(-1.45242735389)*x_ref[2]
-        ref[5,0,1]=(-0.423024189506)*x_ref[0]+(-0.0868948651641)*x_ref[1]+(0.0894539043522)*x_ref[2]
-        ref[5,1,0]=(1.17650613067)*x_ref[0]+(0.993832919965)*x_ref[1]+(1.16546768569)*x_ref[2]
-        ref[5,1,1]=(-0.61549132897)*x_ref[0]+(-0.499619662734)*x_ref[1]+(-0.643422281669)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.227969627252)*x[0]+(0.778177350248)*x[1]
-        arg[0,0,0,1]=(-0.684883711494)*x[0]+(-0.574285957132)*x[1]
-        arg[0,0,1,0]=(0.483090608974)*x[0]+(0.0779929087959)*x[1]
-        arg[0,0,1,1]=(-0.293150814932)*x[0]+(1.35368931993)*x[1]
-        arg[0,0,2,0]=(-0.190664734662)*x[0]+(0.910883386754)*x[1]
-        arg[0,0,2,1]=(-1.51255575457)*x[0]+(0.421560181501)*x[1]
-        arg[0,1,0,0]=(-0.833402828032)*x[0]+(-0.400466806781)*x[1]
-        arg[0,1,0,1]=(-0.212099323605)*x[0]+(-0.112478697221)*x[1]
-        arg[0,1,1,0]=(0.57687662926)*x[0]+(0.869758954551)*x[1]
-        arg[0,1,1,1]=(1.37261769917)*x[0]+(1.37855789907)*x[1]
-        arg[0,1,2,0]=(-1.02838589722)*x[0]+(-0.280409246204)*x[1]
-        arg[0,1,2,1]=(1.2333373468)*x[0]+(0.337631183798)*x[1]
-        arg[0,2,0,0]=(-0.249065448772)*x[0]+(0.834483646317)*x[1]
-        arg[0,2,0,1]=(-1.30860297683)*x[0]+(-0.653929967017)*x[1]
-        arg[0,2,1,0]=(-0.0155994484453)*x[0]+(-0.274023166937)*x[1]
-        arg[0,2,1,1]=(0.31458360335)*x[0]+(1.59507700673)*x[1]
-        arg[0,2,2,0]=(-0.11442619553)*x[0]+(1.6577028576)*x[1]
-        arg[0,2,2,1]=(0.274261132032)*x[0]+(1.15236962479)*x[1]
-        arg[0,3,0,0]=(1.91433860239)*x[0]+(-0.316349747811)*x[1]
-        arg[0,3,0,1]=(-1.42457591054)*x[0]+(-0.362812690805)*x[1]
-        arg[0,3,1,0]=(0.572734883096)*x[0]+(0.424724787283)*x[1]
-        arg[0,3,1,1]=(-0.118538376813)*x[0]+(0.25190312527)*x[1]
-        arg[0,3,2,0]=(-0.533409510081)*x[0]+(-0.804349107915)*x[1]
-        arg[0,3,2,1]=(-0.290555363666)*x[0]+(-0.912641477145)*x[1]
-        arg[0,4,0,0]=(-0.469612775918)*x[0]+(-0.0447411310793)*x[1]
-        arg[0,4,0,1]=(0.108538258831)*x[0]+(0.0453962016662)*x[1]
-        arg[0,4,1,0]=(-0.130785944028)*x[0]+(0.0887280914032)*x[1]
-        arg[0,4,1,1]=(0.166412309585)*x[0]+(-0.75130797706)*x[1]
-        arg[0,4,2,0]=(1.22538232455)*x[0]+(0.112925588343)*x[1]
-        arg[0,4,2,1]=(-1.02455171854)*x[0]+(-0.725754942749)*x[1]
-        arg[1,0,0,0]=(-0.869171086952)*x[0]+(-0.948876783682)*x[1]
-        arg[1,0,0,1]=(0.17730673689)*x[0]+(-0.00166180855579)*x[1]
-        arg[1,0,1,0]=(0.482072704433)*x[0]+(0.895847096783)*x[1]
-        arg[1,0,1,1]=(0.695736834617)*x[0]+(0.358082704558)*x[1]
-        arg[1,0,2,0]=(-0.501799636565)*x[0]+(0.363612558025)*x[1]
-        arg[1,0,2,1]=(-1.47204447226)*x[0]+(1.91281426121)*x[1]
-        arg[1,1,0,0]=(0.241893182978)*x[0]+(0.95199758669)*x[1]
-        arg[1,1,0,1]=(-0.68112361827)*x[0]+(-0.241935141301)*x[1]
-        arg[1,1,1,0]=(-0.553030972306)*x[0]+(0.0244503690439)*x[1]
-        arg[1,1,1,1]=(0.278177176896)*x[0]+(1.58693846427)*x[1]
-        arg[1,1,2,0]=(-0.87980015517)*x[0]+(0.315618837123)*x[1]
-        arg[1,1,2,1]=(-0.335783961379)*x[0]+(0.368650136138)*x[1]
-        arg[1,2,0,0]=(-0.903535146802)*x[0]+(1.68182923194)*x[1]
-        arg[1,2,0,1]=(1.06511511382)*x[0]+(-1.08524762302)*x[1]
-        arg[1,2,1,0]=(-0.0455274784681)*x[0]+(-0.519576710661)*x[1]
-        arg[1,2,1,1]=(0.735100217062)*x[0]+(-0.986268682671)*x[1]
-        arg[1,2,2,0]=(-0.544610797462)*x[0]+(0.447237114882)*x[1]
-        arg[1,2,2,1]=(0.385242031153)*x[0]+(-0.960538844247)*x[1]
-        arg[1,3,0,0]=(-0.354927072897)*x[0]+(0.842574324062)*x[1]
-        arg[1,3,0,1]=(0.319036427919)*x[0]+(-0.156282262536)*x[1]
-        arg[1,3,1,0]=(0.587123807717)*x[0]+(1.65277990726)*x[1]
-        arg[1,3,1,1]=(0.791697370298)*x[0]+(-1.5681680344)*x[1]
-        arg[1,3,2,0]=(-1.41931242045)*x[0]+(0.351285136557)*x[1]
-        arg[1,3,2,1]=(0.53175704402)*x[0]+(0.987523241324)*x[1]
-        arg[1,4,0,0]=(0.00533504818465)*x[0]+(-0.158886930817)*x[1]
-        arg[1,4,0,1]=(1.23725297303)*x[0]+(-0.302896452172)*x[1]
-        arg[1,4,1,0]=(0.433953146329)*x[0]+(-0.0721602234887)*x[1]
-        arg[1,4,1,1]=(-0.383499726865)*x[0]+(-0.253834671235)*x[1]
-        arg[1,4,2,0]=(-0.480776695247)*x[0]+(-0.302145524759)*x[1]
-        arg[1,4,2,1]=(1.14113180903)*x[0]+(-1.24304726003)*x[1]
-        arg[2,0,0,0]=(0.513776013893)*x[0]+(-0.16660259885)*x[1]
-        arg[2,0,0,1]=(1.55739209698)*x[0]+(0.0524084654531)*x[1]
-        arg[2,0,1,0]=(0.222567881446)*x[0]+(-0.357158470388)*x[1]
-        arg[2,0,1,1]=(0.0179816596229)*x[0]+(0.231534460784)*x[1]
-        arg[2,0,2,0]=(1.58460345297)*x[0]+(-0.383588433888)*x[1]
-        arg[2,0,2,1]=(-1.73386465536)*x[0]+(-0.743326657544)*x[1]
-        arg[2,1,0,0]=(-0.737976950246)*x[0]+(-1.01053396224)*x[1]
-        arg[2,1,0,1]=(0.926911190393)*x[0]+(0.620251783925)*x[1]
-        arg[2,1,1,0]=(-1.34289630129)*x[0]+(-0.429933681523)*x[1]
-        arg[2,1,1,1]=(1.79530806415)*x[0]+(-0.539783957021)*x[1]
-        arg[2,1,2,0]=(0.237950974938)*x[0]+(1.93783427703)*x[1]
-        arg[2,1,2,1]=(-0.439640741973)*x[0]+(-0.61543984673)*x[1]
-        arg[2,2,0,0]=(-1.66403612438)*x[0]+(1.00839566441)*x[1]
-        arg[2,2,0,1]=(0.249635983351)*x[0]+(-0.722261363675)*x[1]
-        arg[2,2,1,0]=(1.34179674459)*x[0]+(0.502542144188)*x[1]
-        arg[2,2,1,1]=(-0.815862586074)*x[0]+(-0.110688273707)*x[1]
-        arg[2,2,2,0]=(-0.686810719526)*x[0]+(0.500406563421)*x[1]
-        arg[2,2,2,1]=(0.681231089598)*x[0]+(0.605219505613)*x[1]
-        arg[2,3,0,0]=(-0.953299029956)*x[0]+(-0.223725858372)*x[1]
-        arg[2,3,0,1]=(0.831380756684)*x[0]+(-0.0379777076335)*x[1]
-        arg[2,3,1,0]=(-1.63804393157)*x[0]+(0.148235731301)*x[1]
-        arg[2,3,1,1]=(-0.17786458643)*x[0]+(-1.77342152699)*x[1]
-        arg[2,3,2,0]=(0.0210446244192)*x[0]+(1.59778781524)*x[1]
-        arg[2,3,2,1]=(0.877162721214)*x[0]+(0.262990448614)*x[1]
-        arg[2,4,0,0]=(-0.650265970331)*x[0]+(-1.07003604369)*x[1]
-        arg[2,4,0,1]=(1.12940101029)*x[0]+(0.860589290891)*x[1]
-        arg[2,4,1,0]=(0.520056210056)*x[0]+(-1.47691193979)*x[1]
-        arg[2,4,1,1]=(1.26823535235)*x[0]+(0.496811720647)*x[1]
-        arg[2,4,2,0]=(-1.388913443)*x[0]+(0.585343197943)*x[1]
-        arg[2,4,2,1]=(-0.762904547594)*x[0]+(0.503438815917)*x[1]
-        arg[3,0,0,0]=(0.382862686993)*x[0]+(-0.923525513303)*x[1]
-        arg[3,0,0,1]=(-0.54305794485)*x[0]+(0.467513531444)*x[1]
-        arg[3,0,1,0]=(1.24228759776)*x[0]+(-1.65740117421)*x[1]
-        arg[3,0,1,1]=(-0.463045362742)*x[0]+(0.186438587087)*x[1]
-        arg[3,0,2,0]=(0.296881980828)*x[0]+(-0.385878814949)*x[1]
-        arg[3,0,2,1]=(-0.299705899564)*x[0]+(0.490736038538)*x[1]
-        arg[3,1,0,0]=(-0.786851428658)*x[0]+(-0.760593794308)*x[1]
-        arg[3,1,0,1]=(0.506851336483)*x[0]+(0.995163951197)*x[1]
-        arg[3,1,1,0]=(-0.678883937341)*x[0]+(0.56996778248)*x[1]
-        arg[3,1,1,1]=(-0.401483642528)*x[0]+(0.0476797332537)*x[1]
-        arg[3,1,2,0]=(-0.585357955375)*x[0]+(0.330103647539)*x[1]
-        arg[3,1,2,1]=(-0.355539976825)*x[0]+(0.416287924349)*x[1]
-        arg[3,2,0,0]=(-0.662837130286)*x[0]+(-0.26640899674)*x[1]
-        arg[3,2,0,1]=(0.397553900588)*x[0]+(-1.21708620294)*x[1]
-        arg[3,2,1,0]=(0.464963326429)*x[0]+(-0.774515114142)*x[1]
-        arg[3,2,1,1]=(0.834351469791)*x[0]+(0.487629540715)*x[1]
-        arg[3,2,2,0]=(0.27622693716)*x[0]+(0.811338337719)*x[1]
-        arg[3,2,2,1]=(0.0384997772653)*x[0]+(1.03724996578)*x[1]
-        arg[3,3,0,0]=(-0.805491987874)*x[0]+(-0.476384547853)*x[1]
-        arg[3,3,0,1]=(0.615551780195)*x[0]+(-0.312805967691)*x[1]
-        arg[3,3,1,0]=(0.348666798955)*x[0]+(-1.31271156524)*x[1]
-        arg[3,3,1,1]=(-0.423569975374)*x[0]+(0.930713125389)*x[1]
-        arg[3,3,2,0]=(0.325632686234)*x[0]+(-0.166401033259)*x[1]
-        arg[3,3,2,1]=(0.126924861797)*x[0]+(-0.425380897969)*x[1]
-        arg[3,4,0,0]=(0.169532204538)*x[0]+(0.614632525765)*x[1]
-        arg[3,4,0,1]=(-0.938098696851)*x[0]+(0.648854147587)*x[1]
-        arg[3,4,1,0]=(-0.545143970434)*x[0]+(-1.59787515966)*x[1]
-        arg[3,4,1,1]=(-0.711190914978)*x[0]+(0.897331522911)*x[1]
-        arg[3,4,2,0]=(-0.386498124525)*x[0]+(0.299740420711)*x[1]
-        arg[3,4,2,1]=(0.617683032062)*x[0]+(-0.449587703061)*x[1]
-        ref[0,0,0,0]=(0.227969627252)*x_ref[0]+(0.778177350248)*x_ref[1]
-        ref[0,0,0,1]=(-0.684883711494)*x_ref[0]+(-0.574285957132)*x_ref[1]
-        ref[0,0,1,0]=(0.483090608974)*x_ref[0]+(0.0779929087959)*x_ref[1]
-        ref[0,0,1,1]=(-0.293150814932)*x_ref[0]+(1.35368931993)*x_ref[1]
-        ref[0,0,2,0]=(-0.190664734662)*x_ref[0]+(0.910883386754)*x_ref[1]
-        ref[0,0,2,1]=(-1.51255575457)*x_ref[0]+(0.421560181501)*x_ref[1]
-        ref[0,1,0,0]=(-0.833402828032)*x_ref[0]+(-0.400466806781)*x_ref[1]
-        ref[0,1,0,1]=(-0.212099323605)*x_ref[0]+(-0.112478697221)*x_ref[1]
-        ref[0,1,1,0]=(0.57687662926)*x_ref[0]+(0.869758954551)*x_ref[1]
-        ref[0,1,1,1]=(1.37261769917)*x_ref[0]+(1.37855789907)*x_ref[1]
-        ref[0,1,2,0]=(-1.02838589722)*x_ref[0]+(-0.280409246204)*x_ref[1]
-        ref[0,1,2,1]=(1.2333373468)*x_ref[0]+(0.337631183798)*x_ref[1]
-        ref[0,2,0,0]=(-0.249065448772)*x_ref[0]+(0.834483646317)*x_ref[1]
-        ref[0,2,0,1]=(-1.30860297683)*x_ref[0]+(-0.653929967017)*x_ref[1]
-        ref[0,2,1,0]=(-0.0155994484453)*x_ref[0]+(-0.274023166937)*x_ref[1]
-        ref[0,2,1,1]=(0.31458360335)*x_ref[0]+(1.59507700673)*x_ref[1]
-        ref[0,2,2,0]=(-0.11442619553)*x_ref[0]+(1.6577028576)*x_ref[1]
-        ref[0,2,2,1]=(0.274261132032)*x_ref[0]+(1.15236962479)*x_ref[1]
-        ref[0,3,0,0]=(1.91433860239)*x_ref[0]+(-0.316349747811)*x_ref[1]
-        ref[0,3,0,1]=(-1.42457591054)*x_ref[0]+(-0.362812690805)*x_ref[1]
-        ref[0,3,1,0]=(0.572734883096)*x_ref[0]+(0.424724787283)*x_ref[1]
-        ref[0,3,1,1]=(-0.118538376813)*x_ref[0]+(0.25190312527)*x_ref[1]
-        ref[0,3,2,0]=(-0.533409510081)*x_ref[0]+(-0.804349107915)*x_ref[1]
-        ref[0,3,2,1]=(-0.290555363666)*x_ref[0]+(-0.912641477145)*x_ref[1]
-        ref[0,4,0,0]=(-0.469612775918)*x_ref[0]+(-0.0447411310793)*x_ref[1]
-        ref[0,4,0,1]=(0.108538258831)*x_ref[0]+(0.0453962016662)*x_ref[1]
-        ref[0,4,1,0]=(-0.130785944028)*x_ref[0]+(0.0887280914032)*x_ref[1]
-        ref[0,4,1,1]=(0.166412309585)*x_ref[0]+(-0.75130797706)*x_ref[1]
-        ref[0,4,2,0]=(1.22538232455)*x_ref[0]+(0.112925588343)*x_ref[1]
-        ref[0,4,2,1]=(-1.02455171854)*x_ref[0]+(-0.725754942749)*x_ref[1]
-        ref[1,0,0,0]=(-0.869171086952)*x_ref[0]+(-0.948876783682)*x_ref[1]
-        ref[1,0,0,1]=(0.17730673689)*x_ref[0]+(-0.00166180855579)*x_ref[1]
-        ref[1,0,1,0]=(0.482072704433)*x_ref[0]+(0.895847096783)*x_ref[1]
-        ref[1,0,1,1]=(0.695736834617)*x_ref[0]+(0.358082704558)*x_ref[1]
-        ref[1,0,2,0]=(-0.501799636565)*x_ref[0]+(0.363612558025)*x_ref[1]
-        ref[1,0,2,1]=(-1.47204447226)*x_ref[0]+(1.91281426121)*x_ref[1]
-        ref[1,1,0,0]=(0.241893182978)*x_ref[0]+(0.95199758669)*x_ref[1]
-        ref[1,1,0,1]=(-0.68112361827)*x_ref[0]+(-0.241935141301)*x_ref[1]
-        ref[1,1,1,0]=(-0.553030972306)*x_ref[0]+(0.0244503690439)*x_ref[1]
-        ref[1,1,1,1]=(0.278177176896)*x_ref[0]+(1.58693846427)*x_ref[1]
-        ref[1,1,2,0]=(-0.87980015517)*x_ref[0]+(0.315618837123)*x_ref[1]
-        ref[1,1,2,1]=(-0.335783961379)*x_ref[0]+(0.368650136138)*x_ref[1]
-        ref[1,2,0,0]=(-0.903535146802)*x_ref[0]+(1.68182923194)*x_ref[1]
-        ref[1,2,0,1]=(1.06511511382)*x_ref[0]+(-1.08524762302)*x_ref[1]
-        ref[1,2,1,0]=(-0.0455274784681)*x_ref[0]+(-0.519576710661)*x_ref[1]
-        ref[1,2,1,1]=(0.735100217062)*x_ref[0]+(-0.986268682671)*x_ref[1]
-        ref[1,2,2,0]=(-0.544610797462)*x_ref[0]+(0.447237114882)*x_ref[1]
-        ref[1,2,2,1]=(0.385242031153)*x_ref[0]+(-0.960538844247)*x_ref[1]
-        ref[1,3,0,0]=(-0.354927072897)*x_ref[0]+(0.842574324062)*x_ref[1]
-        ref[1,3,0,1]=(0.319036427919)*x_ref[0]+(-0.156282262536)*x_ref[1]
-        ref[1,3,1,0]=(0.587123807717)*x_ref[0]+(1.65277990726)*x_ref[1]
-        ref[1,3,1,1]=(0.791697370298)*x_ref[0]+(-1.5681680344)*x_ref[1]
-        ref[1,3,2,0]=(-1.41931242045)*x_ref[0]+(0.351285136557)*x_ref[1]
-        ref[1,3,2,1]=(0.53175704402)*x_ref[0]+(0.987523241324)*x_ref[1]
-        ref[1,4,0,0]=(0.00533504818465)*x_ref[0]+(-0.158886930817)*x_ref[1]
-        ref[1,4,0,1]=(1.23725297303)*x_ref[0]+(-0.302896452172)*x_ref[1]
-        ref[1,4,1,0]=(0.433953146329)*x_ref[0]+(-0.0721602234887)*x_ref[1]
-        ref[1,4,1,1]=(-0.383499726865)*x_ref[0]+(-0.253834671235)*x_ref[1]
-        ref[1,4,2,0]=(-0.480776695247)*x_ref[0]+(-0.302145524759)*x_ref[1]
-        ref[1,4,2,1]=(1.14113180903)*x_ref[0]+(-1.24304726003)*x_ref[1]
-        ref[2,0,0,0]=(0.513776013893)*x_ref[0]+(-0.16660259885)*x_ref[1]
-        ref[2,0,0,1]=(1.55739209698)*x_ref[0]+(0.0524084654531)*x_ref[1]
-        ref[2,0,1,0]=(0.222567881446)*x_ref[0]+(-0.357158470388)*x_ref[1]
-        ref[2,0,1,1]=(0.0179816596229)*x_ref[0]+(0.231534460784)*x_ref[1]
-        ref[2,0,2,0]=(1.58460345297)*x_ref[0]+(-0.383588433888)*x_ref[1]
-        ref[2,0,2,1]=(-1.73386465536)*x_ref[0]+(-0.743326657544)*x_ref[1]
-        ref[2,1,0,0]=(-0.737976950246)*x_ref[0]+(-1.01053396224)*x_ref[1]
-        ref[2,1,0,1]=(0.926911190393)*x_ref[0]+(0.620251783925)*x_ref[1]
-        ref[2,1,1,0]=(-1.34289630129)*x_ref[0]+(-0.429933681523)*x_ref[1]
-        ref[2,1,1,1]=(1.79530806415)*x_ref[0]+(-0.539783957021)*x_ref[1]
-        ref[2,1,2,0]=(0.237950974938)*x_ref[0]+(1.93783427703)*x_ref[1]
-        ref[2,1,2,1]=(-0.439640741973)*x_ref[0]+(-0.61543984673)*x_ref[1]
-        ref[2,2,0,0]=(-1.66403612438)*x_ref[0]+(1.00839566441)*x_ref[1]
-        ref[2,2,0,1]=(0.249635983351)*x_ref[0]+(-0.722261363675)*x_ref[1]
-        ref[2,2,1,0]=(1.34179674459)*x_ref[0]+(0.502542144188)*x_ref[1]
-        ref[2,2,1,1]=(-0.815862586074)*x_ref[0]+(-0.110688273707)*x_ref[1]
-        ref[2,2,2,0]=(-0.686810719526)*x_ref[0]+(0.500406563421)*x_ref[1]
-        ref[2,2,2,1]=(0.681231089598)*x_ref[0]+(0.605219505613)*x_ref[1]
-        ref[2,3,0,0]=(-0.953299029956)*x_ref[0]+(-0.223725858372)*x_ref[1]
-        ref[2,3,0,1]=(0.831380756684)*x_ref[0]+(-0.0379777076335)*x_ref[1]
-        ref[2,3,1,0]=(-1.63804393157)*x_ref[0]+(0.148235731301)*x_ref[1]
-        ref[2,3,1,1]=(-0.17786458643)*x_ref[0]+(-1.77342152699)*x_ref[1]
-        ref[2,3,2,0]=(0.0210446244192)*x_ref[0]+(1.59778781524)*x_ref[1]
-        ref[2,3,2,1]=(0.877162721214)*x_ref[0]+(0.262990448614)*x_ref[1]
-        ref[2,4,0,0]=(-0.650265970331)*x_ref[0]+(-1.07003604369)*x_ref[1]
-        ref[2,4,0,1]=(1.12940101029)*x_ref[0]+(0.860589290891)*x_ref[1]
-        ref[2,4,1,0]=(0.520056210056)*x_ref[0]+(-1.47691193979)*x_ref[1]
-        ref[2,4,1,1]=(1.26823535235)*x_ref[0]+(0.496811720647)*x_ref[1]
-        ref[2,4,2,0]=(-1.388913443)*x_ref[0]+(0.585343197943)*x_ref[1]
-        ref[2,4,2,1]=(-0.762904547594)*x_ref[0]+(0.503438815917)*x_ref[1]
-        ref[3,0,0,0]=(0.382862686993)*x_ref[0]+(-0.923525513303)*x_ref[1]
-        ref[3,0,0,1]=(-0.54305794485)*x_ref[0]+(0.467513531444)*x_ref[1]
-        ref[3,0,1,0]=(1.24228759776)*x_ref[0]+(-1.65740117421)*x_ref[1]
-        ref[3,0,1,1]=(-0.463045362742)*x_ref[0]+(0.186438587087)*x_ref[1]
-        ref[3,0,2,0]=(0.296881980828)*x_ref[0]+(-0.385878814949)*x_ref[1]
-        ref[3,0,2,1]=(-0.299705899564)*x_ref[0]+(0.490736038538)*x_ref[1]
-        ref[3,1,0,0]=(-0.786851428658)*x_ref[0]+(-0.760593794308)*x_ref[1]
-        ref[3,1,0,1]=(0.506851336483)*x_ref[0]+(0.995163951197)*x_ref[1]
-        ref[3,1,1,0]=(-0.678883937341)*x_ref[0]+(0.56996778248)*x_ref[1]
-        ref[3,1,1,1]=(-0.401483642528)*x_ref[0]+(0.0476797332537)*x_ref[1]
-        ref[3,1,2,0]=(-0.585357955375)*x_ref[0]+(0.330103647539)*x_ref[1]
-        ref[3,1,2,1]=(-0.355539976825)*x_ref[0]+(0.416287924349)*x_ref[1]
-        ref[3,2,0,0]=(-0.662837130286)*x_ref[0]+(-0.26640899674)*x_ref[1]
-        ref[3,2,0,1]=(0.397553900588)*x_ref[0]+(-1.21708620294)*x_ref[1]
-        ref[3,2,1,0]=(0.464963326429)*x_ref[0]+(-0.774515114142)*x_ref[1]
-        ref[3,2,1,1]=(0.834351469791)*x_ref[0]+(0.487629540715)*x_ref[1]
-        ref[3,2,2,0]=(0.27622693716)*x_ref[0]+(0.811338337719)*x_ref[1]
-        ref[3,2,2,1]=(0.0384997772653)*x_ref[0]+(1.03724996578)*x_ref[1]
-        ref[3,3,0,0]=(-0.805491987874)*x_ref[0]+(-0.476384547853)*x_ref[1]
-        ref[3,3,0,1]=(0.615551780195)*x_ref[0]+(-0.312805967691)*x_ref[1]
-        ref[3,3,1,0]=(0.348666798955)*x_ref[0]+(-1.31271156524)*x_ref[1]
-        ref[3,3,1,1]=(-0.423569975374)*x_ref[0]+(0.930713125389)*x_ref[1]
-        ref[3,3,2,0]=(0.325632686234)*x_ref[0]+(-0.166401033259)*x_ref[1]
-        ref[3,3,2,1]=(0.126924861797)*x_ref[0]+(-0.425380897969)*x_ref[1]
-        ref[3,4,0,0]=(0.169532204538)*x_ref[0]+(0.614632525765)*x_ref[1]
-        ref[3,4,0,1]=(-0.938098696851)*x_ref[0]+(0.648854147587)*x_ref[1]
-        ref[3,4,1,0]=(-0.545143970434)*x_ref[0]+(-1.59787515966)*x_ref[1]
-        ref[3,4,1,1]=(-0.711190914978)*x_ref[0]+(0.897331522911)*x_ref[1]
-        ref[3,4,2,0]=(-0.386498124525)*x_ref[0]+(0.299740420711)*x_ref[1]
-        ref[3,4,2,1]=(0.617683032062)*x_ref[0]+(-0.449587703061)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.791620170192)*x[0]+(1.03871460301)*x[1]+(-0.225035657687)*x[2]
-        arg[0,0,0,1]=(-0.464422319203)*x[0]+(0.769454931053)*x[1]+(-0.783260637771)*x[2]
-        arg[0,0,1,0]=(0.72655538215)*x[0]+(-1.65736312015)*x[1]+(1.08402505927)*x[2]
-        arg[0,0,1,1]=(-0.207576709573)*x[0]+(-0.55250594761)*x[1]+(-0.923702938288)*x[2]
-        arg[0,0,2,0]=(-0.701991085516)*x[0]+(-1.76863643107)*x[1]+(0.831382933104)*x[2]
-        arg[0,0,2,1]=(0.0640035527319)*x[0]+(0.425446342976)*x[1]+(1.64626766696)*x[2]
-        arg[0,1,0,0]=(1.01022963801)*x[0]+(-0.0215015059716)*x[1]+(0.849862425592)*x[2]
-        arg[0,1,0,1]=(-0.45776932943)*x[0]+(0.7621342151)*x[1]+(-1.40123018391)*x[2]
-        arg[0,1,1,0]=(0.737485054127)*x[0]+(-0.147513905858)*x[1]+(-0.616928595213)*x[2]
-        arg[0,1,1,1]=(-0.0608005391894)*x[0]+(-0.154978210573)*x[1]+(-1.40322011577)*x[2]
-        arg[0,1,2,0]=(1.59908177714)*x[0]+(-0.378738573932)*x[1]+(1.45285315247)*x[2]
-        arg[0,1,2,1]=(-0.622552157046)*x[0]+(1.19996417516)*x[1]+(0.728842900843)*x[2]
-        arg[0,2,0,0]=(-0.46942034691)*x[0]+(0.333309721372)*x[1]+(-0.280846553832)*x[2]
-        arg[0,2,0,1]=(1.22208788109)*x[0]+(0.369339594285)*x[1]+(1.31078425589)*x[2]
-        arg[0,2,1,0]=(0.0794165004114)*x[0]+(0.44665451846)*x[1]+(-0.814625708916)*x[2]
-        arg[0,2,1,1]=(0.594200807165)*x[0]+(-0.00616720333193)*x[1]+(0.382706175172)*x[2]
-        arg[0,2,2,0]=(0.0372230170459)*x[0]+(0.440339923291)*x[1]+(0.137641070028)*x[2]
-        arg[0,2,2,1]=(-1.29863078274)*x[0]+(0.283142455171)*x[1]+(0.0844540074659)*x[2]
-        arg[0,3,0,0]=(1.72811808036)*x[0]+(0.536456781522)*x[1]+(0.0266737704706)*x[2]
-        arg[0,3,0,1]=(0.148219555101)*x[0]+(-0.6887500275)*x[1]+(-0.405613136632)*x[2]
-        arg[0,3,1,0]=(0.708262537279)*x[0]+(1.16319635773)*x[1]+(-0.030808721674)*x[2]
-        arg[0,3,1,1]=(0.80834615863)*x[0]+(-0.176789000925)*x[1]+(-1.72576120963)*x[2]
-        arg[0,3,2,0]=(0.21128315299)*x[0]+(0.770037046126)*x[1]+(0.988028934422)*x[2]
-        arg[0,3,2,1]=(1.10522136317)*x[0]+(1.6319351743)*x[1]+(-0.784693713387)*x[2]
-        arg[0,4,0,0]=(0.121088121064)*x[0]+(-1.79718067791)*x[1]+(-0.907857173318)*x[2]
-        arg[0,4,0,1]=(-0.695887294217)*x[0]+(-1.24166787807)*x[1]+(-1.24968023856)*x[2]
-        arg[0,4,1,0]=(-0.202510797291)*x[0]+(0.628310156105)*x[1]+(0.605146447822)*x[2]
-        arg[0,4,1,1]=(0.149227458424)*x[0]+(-1.5650392775)*x[1]+(-0.763944892663)*x[2]
-        arg[0,4,2,0]=(-0.393218625872)*x[0]+(0.479145914948)*x[1]+(-0.313960447492)*x[2]
-        arg[0,4,2,1]=(-0.0191807443799)*x[0]+(0.592992659119)*x[1]+(-0.475633115484)*x[2]
-        arg[1,0,0,0]=(-0.964829354261)*x[0]+(0.453014802906)*x[1]+(-0.779502566938)*x[2]
-        arg[1,0,0,1]=(0.0151205739508)*x[0]+(-0.153706429594)*x[1]+(0.00866460475724)*x[2]
-        arg[1,0,1,0]=(0.92592276366)*x[0]+(0.530787400525)*x[1]+(-0.0577912606876)*x[2]
-        arg[1,0,1,1]=(0.948404467077)*x[0]+(-0.265905470751)*x[1]+(0.472349192005)*x[2]
-        arg[1,0,2,0]=(0.0176615383702)*x[0]+(0.679605821761)*x[1]+(-0.0333590911941)*x[2]
-        arg[1,0,2,1]=(-1.15594952629)*x[0]+(0.264868376508)*x[1]+(-0.883690535499)*x[2]
-        arg[1,1,0,0]=(-0.738712703994)*x[0]+(0.545839232808)*x[1]+(0.592474501134)*x[2]
-        arg[1,1,0,1]=(-1.3468960453)*x[0]+(-0.00848202443614)*x[1]+(-0.0124138286126)*x[2]
-        arg[1,1,1,0]=(0.900228409707)*x[0]+(-1.86848082357)*x[1]+(0.421539431142)*x[2]
-        arg[1,1,1,1]=(1.42754013963)*x[0]+(-0.861376440449)*x[1]+(0.0965520362291)*x[2]
-        arg[1,1,2,0]=(-0.35873674515)*x[0]+(0.0862592617941)*x[1]+(-0.536106207025)*x[2]
-        arg[1,1,2,1]=(0.90712910097)*x[0]+(0.974545253055)*x[1]+(0.570708510858)*x[2]
-        arg[1,2,0,0]=(1.19310775669)*x[0]+(0.309414331679)*x[1]+(-0.271298061586)*x[2]
-        arg[1,2,0,1]=(0.551778129545)*x[0]+(0.539028430134)*x[1]+(0.239406239262)*x[2]
-        arg[1,2,1,0]=(-0.810625054344)*x[0]+(-0.241072190233)*x[1]+(-1.58590369097)*x[2]
-        arg[1,2,1,1]=(0.529669075734)*x[0]+(-0.890365024163)*x[1]+(-1.69798509084)*x[2]
-        arg[1,2,2,0]=(0.0437087707448)*x[0]+(0.88372190198)*x[1]+(1.86547747806)*x[2]
-        arg[1,2,2,1]=(1.30739438898)*x[0]+(0.315850112101)*x[1]+(-0.262001133683)*x[2]
-        arg[1,3,0,0]=(-0.143426236837)*x[0]+(-1.1703384826)*x[1]+(0.50608348646)*x[2]
-        arg[1,3,0,1]=(-0.0444408776922)*x[0]+(1.26952782036)*x[1]+(1.67192602934)*x[2]
-        arg[1,3,1,0]=(0.672742824368)*x[0]+(-0.785246676537)*x[1]+(0.716130664056)*x[2]
-        arg[1,3,1,1]=(-0.295182508335)*x[0]+(-1.53658860897)*x[1]+(-1.87133995422)*x[2]
-        arg[1,3,2,0]=(-0.440859530081)*x[0]+(0.0730120015821)*x[1]+(-1.02465537353)*x[2]
-        arg[1,3,2,1]=(0.838320612003)*x[0]+(1.81233688454)*x[1]+(-1.0633876685)*x[2]
-        arg[1,4,0,0]=(0.52440453051)*x[0]+(-0.0182588999022)*x[1]+(1.05556310351)*x[2]
-        arg[1,4,0,1]=(0.766612727495)*x[0]+(1.58987590746)*x[1]+(-0.703801484569)*x[2]
-        arg[1,4,1,0]=(0.373439757535)*x[0]+(-0.0676963704305)*x[1]+(0.0948034094293)*x[2]
-        arg[1,4,1,1]=(-0.542283543375)*x[0]+(-0.454408605761)*x[1]+(-0.398904635316)*x[2]
-        arg[1,4,2,0]=(1.3374871143)*x[0]+(0.0067849394587)*x[1]+(-0.319452094882)*x[2]
-        arg[1,4,2,1]=(0.38530755393)*x[0]+(1.05356462429)*x[1]+(-0.302179447719)*x[2]
-        arg[2,0,0,0]=(-0.123109761583)*x[0]+(0.69223848143)*x[1]+(-1.36903487092)*x[2]
-        arg[2,0,0,1]=(0.121957328459)*x[0]+(0.102229685387)*x[1]+(0.962499974737)*x[2]
-        arg[2,0,1,0]=(0.478614188653)*x[0]+(-1.23058817023)*x[1]+(1.30950997478)*x[2]
-        arg[2,0,1,1]=(-0.529033562461)*x[0]+(0.563030509591)*x[1]+(-0.564939226654)*x[2]
-        arg[2,0,2,0]=(-0.377740282406)*x[0]+(1.20532110343)*x[1]+(1.55615174947)*x[2]
-        arg[2,0,2,1]=(0.539119710703)*x[0]+(1.91771865857)*x[1]+(0.0809882488048)*x[2]
-        arg[2,1,0,0]=(0.00548664737796)*x[0]+(-0.157716099068)*x[1]+(-1.40009044235)*x[2]
-        arg[2,1,0,1]=(0.0667557890666)*x[0]+(0.742484448131)*x[1]+(-0.325246111346)*x[2]
-        arg[2,1,1,0]=(-0.214965474071)*x[0]+(-0.215055151964)*x[1]+(1.15673960537)*x[2]
-        arg[2,1,1,1]=(0.605764831789)*x[0]+(-1.0432964832)*x[1]+(0.645482523161)*x[2]
-        arg[2,1,2,0]=(-1.13098364088)*x[0]+(-0.932044089041)*x[1]+(-0.308053828241)*x[2]
-        arg[2,1,2,1]=(0.481961305459)*x[0]+(-0.101277472029)*x[1]+(-0.17520207974)*x[2]
-        arg[2,2,0,0]=(0.579831852303)*x[0]+(0.538731990254)*x[1]+(-0.0897460374205)*x[2]
-        arg[2,2,0,1]=(-1.8763181434)*x[0]+(-0.132710928569)*x[1]+(1.03169751651)*x[2]
-        arg[2,2,1,0]=(0.56871511431)*x[0]+(0.075333481656)*x[1]+(1.10238818953)*x[2]
-        arg[2,2,1,1]=(1.49347755246)*x[0]+(-1.00500941047)*x[1]+(-0.181733196359)*x[2]
-        arg[2,2,2,0]=(0.532881509971)*x[0]+(-0.364333964659)*x[1]+(1.09633720883)*x[2]
-        arg[2,2,2,1]=(-0.518419048615)*x[0]+(-0.48091100593)*x[1]+(0.724628840153)*x[2]
-        arg[2,3,0,0]=(0.353475859331)*x[0]+(-0.0239879269825)*x[1]+(1.32068893718)*x[2]
-        arg[2,3,0,1]=(0.553999122102)*x[0]+(-0.128530869239)*x[1]+(0.134663336287)*x[2]
-        arg[2,3,1,0]=(-1.59775882569)*x[0]+(-1.07335424785)*x[1]+(1.39223587988)*x[2]
-        arg[2,3,1,1]=(-0.921252080095)*x[0]+(1.46226299067)*x[1]+(-1.13412499932)*x[2]
-        arg[2,3,2,0]=(0.417572910178)*x[0]+(0.0814889599489)*x[1]+(0.292159249719)*x[2]
-        arg[2,3,2,1]=(1.44620228921)*x[0]+(0.767854577367)*x[1]+(-0.0113709806383)*x[2]
-        arg[2,4,0,0]=(-0.156987001681)*x[0]+(-0.922524257833)*x[1]+(0.521128360838)*x[2]
-        arg[2,4,0,1]=(0.154198133354)*x[0]+(0.462020370175)*x[1]+(0.966768653665)*x[2]
-        arg[2,4,1,0]=(0.507836849242)*x[0]+(1.16701911244)*x[1]+(0.264543038211)*x[2]
-        arg[2,4,1,1]=(0.452059436879)*x[0]+(0.409662432778)*x[1]+(-0.403800872595)*x[2]
-        arg[2,4,2,0]=(0.521175521008)*x[0]+(-0.362551578816)*x[1]+(0.0922727331623)*x[2]
-        arg[2,4,2,1]=(-1.0990361823)*x[0]+(1.73655146851)*x[1]+(-0.867917402922)*x[2]
-        arg[3,0,0,0]=(-0.0527010882236)*x[0]+(-1.11528215488)*x[1]+(1.3141906393)*x[2]
-        arg[3,0,0,1]=(0.151284271917)*x[0]+(-0.0159077450668)*x[1]+(1.1798338931)*x[2]
-        arg[3,0,1,0]=(-1.7648963435)*x[0]+(0.229511437402)*x[1]+(0.924415900312)*x[2]
-        arg[3,0,1,1]=(-0.498271821094)*x[0]+(1.58363063019)*x[1]+(1.64871750388)*x[2]
-        arg[3,0,2,0]=(-1.11245170725)*x[0]+(1.27662612569)*x[1]+(0.145950372369)*x[2]
-        arg[3,0,2,1]=(-0.691643924238)*x[0]+(-0.178211874279)*x[1]+(-0.341071050366)*x[2]
-        arg[3,1,0,0]=(-0.929804889461)*x[0]+(0.199087067309)*x[1]+(1.00150168883)*x[2]
-        arg[3,1,0,1]=(-1.25152265093)*x[0]+(0.517076294911)*x[1]+(0.103798312362)*x[2]
-        arg[3,1,1,0]=(0.797316290623)*x[0]+(0.0239285379293)*x[1]+(-0.836519299418)*x[2]
-        arg[3,1,1,1]=(-0.470084592176)*x[0]+(0.844364701728)*x[1]+(-0.027373275093)*x[2]
-        arg[3,1,2,0]=(1.0340279373)*x[0]+(-0.0133951276315)*x[1]+(1.17710546194)*x[2]
-        arg[3,1,2,1]=(0.0325929541496)*x[0]+(1.13784867184)*x[1]+(-0.0529194266769)*x[2]
-        arg[3,2,0,0]=(1.92837561772)*x[0]+(-1.63633468831)*x[1]+(1.4212324281)*x[2]
-        arg[3,2,0,1]=(1.09556054408)*x[0]+(1.43286059545)*x[1]+(1.20005604593)*x[2]
-        arg[3,2,1,0]=(0.308887169169)*x[0]+(-0.149214224208)*x[1]+(-1.13559614877)*x[2]
-        arg[3,2,1,1]=(-0.0648352909004)*x[0]+(-0.5645470596)*x[1]+(-0.525131730514)*x[2]
-        arg[3,2,2,0]=(0.21826829974)*x[0]+(1.5950239996)*x[1]+(0.333592425438)*x[2]
-        arg[3,2,2,1]=(-1.25613956172)*x[0]+(-0.242338679844)*x[1]+(-0.958875577074)*x[2]
-        arg[3,3,0,0]=(1.65005362159)*x[0]+(-1.16713867165)*x[1]+(-0.282495293685)*x[2]
-        arg[3,3,0,1]=(1.04854406427)*x[0]+(0.876270949531)*x[1]+(0.291036304743)*x[2]
-        arg[3,3,1,0]=(-1.66619451175)*x[0]+(0.656275192484)*x[1]+(-1.27104499942)*x[2]
-        arg[3,3,1,1]=(1.55407146907)*x[0]+(-0.322950943159)*x[1]+(-0.287565403896)*x[2]
-        arg[3,3,2,0]=(-1.54760268583)*x[0]+(-1.45847761887)*x[1]+(1.13939567009)*x[2]
-        arg[3,3,2,1]=(1.24632351699)*x[0]+(0.0265500081594)*x[1]+(1.61925095159)*x[2]
-        arg[3,4,0,0]=(-0.0430889433549)*x[0]+(-1.46995559463)*x[1]+(-1.14915159823)*x[2]
-        arg[3,4,0,1]=(0.0392641403409)*x[0]+(0.0603053049639)*x[1]+(0.647321169934)*x[2]
-        arg[3,4,1,0]=(-0.156300985227)*x[0]+(0.79369911928)*x[1]+(-0.413124762507)*x[2]
-        arg[3,4,1,1]=(0.258402059015)*x[0]+(0.00227307988585)*x[1]+(0.70067141295)*x[2]
-        arg[3,4,2,0]=(-1.15131298872)*x[0]+(-0.627449043157)*x[1]+(-0.402268345861)*x[2]
-        arg[3,4,2,1]=(0.455934238179)*x[0]+(-0.951120759108)*x[1]+(-0.280459367131)*x[2]
-        ref[0,0,0,0]=(-0.791620170192)*x_ref[0]+(1.03871460301)*x_ref[1]+(-0.225035657687)*x_ref[2]
-        ref[0,0,0,1]=(-0.464422319203)*x_ref[0]+(0.769454931053)*x_ref[1]+(-0.783260637771)*x_ref[2]
-        ref[0,0,1,0]=(0.72655538215)*x_ref[0]+(-1.65736312015)*x_ref[1]+(1.08402505927)*x_ref[2]
-        ref[0,0,1,1]=(-0.207576709573)*x_ref[0]+(-0.55250594761)*x_ref[1]+(-0.923702938288)*x_ref[2]
-        ref[0,0,2,0]=(-0.701991085516)*x_ref[0]+(-1.76863643107)*x_ref[1]+(0.831382933104)*x_ref[2]
-        ref[0,0,2,1]=(0.0640035527319)*x_ref[0]+(0.425446342976)*x_ref[1]+(1.64626766696)*x_ref[2]
-        ref[0,1,0,0]=(1.01022963801)*x_ref[0]+(-0.0215015059716)*x_ref[1]+(0.849862425592)*x_ref[2]
-        ref[0,1,0,1]=(-0.45776932943)*x_ref[0]+(0.7621342151)*x_ref[1]+(-1.40123018391)*x_ref[2]
-        ref[0,1,1,0]=(0.737485054127)*x_ref[0]+(-0.147513905858)*x_ref[1]+(-0.616928595213)*x_ref[2]
-        ref[0,1,1,1]=(-0.0608005391894)*x_ref[0]+(-0.154978210573)*x_ref[1]+(-1.40322011577)*x_ref[2]
-        ref[0,1,2,0]=(1.59908177714)*x_ref[0]+(-0.378738573932)*x_ref[1]+(1.45285315247)*x_ref[2]
-        ref[0,1,2,1]=(-0.622552157046)*x_ref[0]+(1.19996417516)*x_ref[1]+(0.728842900843)*x_ref[2]
-        ref[0,2,0,0]=(-0.46942034691)*x_ref[0]+(0.333309721372)*x_ref[1]+(-0.280846553832)*x_ref[2]
-        ref[0,2,0,1]=(1.22208788109)*x_ref[0]+(0.369339594285)*x_ref[1]+(1.31078425589)*x_ref[2]
-        ref[0,2,1,0]=(0.0794165004114)*x_ref[0]+(0.44665451846)*x_ref[1]+(-0.814625708916)*x_ref[2]
-        ref[0,2,1,1]=(0.594200807165)*x_ref[0]+(-0.00616720333193)*x_ref[1]+(0.382706175172)*x_ref[2]
-        ref[0,2,2,0]=(0.0372230170459)*x_ref[0]+(0.440339923291)*x_ref[1]+(0.137641070028)*x_ref[2]
-        ref[0,2,2,1]=(-1.29863078274)*x_ref[0]+(0.283142455171)*x_ref[1]+(0.0844540074659)*x_ref[2]
-        ref[0,3,0,0]=(1.72811808036)*x_ref[0]+(0.536456781522)*x_ref[1]+(0.0266737704706)*x_ref[2]
-        ref[0,3,0,1]=(0.148219555101)*x_ref[0]+(-0.6887500275)*x_ref[1]+(-0.405613136632)*x_ref[2]
-        ref[0,3,1,0]=(0.708262537279)*x_ref[0]+(1.16319635773)*x_ref[1]+(-0.030808721674)*x_ref[2]
-        ref[0,3,1,1]=(0.80834615863)*x_ref[0]+(-0.176789000925)*x_ref[1]+(-1.72576120963)*x_ref[2]
-        ref[0,3,2,0]=(0.21128315299)*x_ref[0]+(0.770037046126)*x_ref[1]+(0.988028934422)*x_ref[2]
-        ref[0,3,2,1]=(1.10522136317)*x_ref[0]+(1.6319351743)*x_ref[1]+(-0.784693713387)*x_ref[2]
-        ref[0,4,0,0]=(0.121088121064)*x_ref[0]+(-1.79718067791)*x_ref[1]+(-0.907857173318)*x_ref[2]
-        ref[0,4,0,1]=(-0.695887294217)*x_ref[0]+(-1.24166787807)*x_ref[1]+(-1.24968023856)*x_ref[2]
-        ref[0,4,1,0]=(-0.202510797291)*x_ref[0]+(0.628310156105)*x_ref[1]+(0.605146447822)*x_ref[2]
-        ref[0,4,1,1]=(0.149227458424)*x_ref[0]+(-1.5650392775)*x_ref[1]+(-0.763944892663)*x_ref[2]
-        ref[0,4,2,0]=(-0.393218625872)*x_ref[0]+(0.479145914948)*x_ref[1]+(-0.313960447492)*x_ref[2]
-        ref[0,4,2,1]=(-0.0191807443799)*x_ref[0]+(0.592992659119)*x_ref[1]+(-0.475633115484)*x_ref[2]
-        ref[1,0,0,0]=(-0.964829354261)*x_ref[0]+(0.453014802906)*x_ref[1]+(-0.779502566938)*x_ref[2]
-        ref[1,0,0,1]=(0.0151205739508)*x_ref[0]+(-0.153706429594)*x_ref[1]+(0.00866460475724)*x_ref[2]
-        ref[1,0,1,0]=(0.92592276366)*x_ref[0]+(0.530787400525)*x_ref[1]+(-0.0577912606876)*x_ref[2]
-        ref[1,0,1,1]=(0.948404467077)*x_ref[0]+(-0.265905470751)*x_ref[1]+(0.472349192005)*x_ref[2]
-        ref[1,0,2,0]=(0.0176615383702)*x_ref[0]+(0.679605821761)*x_ref[1]+(-0.0333590911941)*x_ref[2]
-        ref[1,0,2,1]=(-1.15594952629)*x_ref[0]+(0.264868376508)*x_ref[1]+(-0.883690535499)*x_ref[2]
-        ref[1,1,0,0]=(-0.738712703994)*x_ref[0]+(0.545839232808)*x_ref[1]+(0.592474501134)*x_ref[2]
-        ref[1,1,0,1]=(-1.3468960453)*x_ref[0]+(-0.00848202443614)*x_ref[1]+(-0.0124138286126)*x_ref[2]
-        ref[1,1,1,0]=(0.900228409707)*x_ref[0]+(-1.86848082357)*x_ref[1]+(0.421539431142)*x_ref[2]
-        ref[1,1,1,1]=(1.42754013963)*x_ref[0]+(-0.861376440449)*x_ref[1]+(0.0965520362291)*x_ref[2]
-        ref[1,1,2,0]=(-0.35873674515)*x_ref[0]+(0.0862592617941)*x_ref[1]+(-0.536106207025)*x_ref[2]
-        ref[1,1,2,1]=(0.90712910097)*x_ref[0]+(0.974545253055)*x_ref[1]+(0.570708510858)*x_ref[2]
-        ref[1,2,0,0]=(1.19310775669)*x_ref[0]+(0.309414331679)*x_ref[1]+(-0.271298061586)*x_ref[2]
-        ref[1,2,0,1]=(0.551778129545)*x_ref[0]+(0.539028430134)*x_ref[1]+(0.239406239262)*x_ref[2]
-        ref[1,2,1,0]=(-0.810625054344)*x_ref[0]+(-0.241072190233)*x_ref[1]+(-1.58590369097)*x_ref[2]
-        ref[1,2,1,1]=(0.529669075734)*x_ref[0]+(-0.890365024163)*x_ref[1]+(-1.69798509084)*x_ref[2]
-        ref[1,2,2,0]=(0.0437087707448)*x_ref[0]+(0.88372190198)*x_ref[1]+(1.86547747806)*x_ref[2]
-        ref[1,2,2,1]=(1.30739438898)*x_ref[0]+(0.315850112101)*x_ref[1]+(-0.262001133683)*x_ref[2]
-        ref[1,3,0,0]=(-0.143426236837)*x_ref[0]+(-1.1703384826)*x_ref[1]+(0.50608348646)*x_ref[2]
-        ref[1,3,0,1]=(-0.0444408776922)*x_ref[0]+(1.26952782036)*x_ref[1]+(1.67192602934)*x_ref[2]
-        ref[1,3,1,0]=(0.672742824368)*x_ref[0]+(-0.785246676537)*x_ref[1]+(0.716130664056)*x_ref[2]
-        ref[1,3,1,1]=(-0.295182508335)*x_ref[0]+(-1.53658860897)*x_ref[1]+(-1.87133995422)*x_ref[2]
-        ref[1,3,2,0]=(-0.440859530081)*x_ref[0]+(0.0730120015821)*x_ref[1]+(-1.02465537353)*x_ref[2]
-        ref[1,3,2,1]=(0.838320612003)*x_ref[0]+(1.81233688454)*x_ref[1]+(-1.0633876685)*x_ref[2]
-        ref[1,4,0,0]=(0.52440453051)*x_ref[0]+(-0.0182588999022)*x_ref[1]+(1.05556310351)*x_ref[2]
-        ref[1,4,0,1]=(0.766612727495)*x_ref[0]+(1.58987590746)*x_ref[1]+(-0.703801484569)*x_ref[2]
-        ref[1,4,1,0]=(0.373439757535)*x_ref[0]+(-0.0676963704305)*x_ref[1]+(0.0948034094293)*x_ref[2]
-        ref[1,4,1,1]=(-0.542283543375)*x_ref[0]+(-0.454408605761)*x_ref[1]+(-0.398904635316)*x_ref[2]
-        ref[1,4,2,0]=(1.3374871143)*x_ref[0]+(0.0067849394587)*x_ref[1]+(-0.319452094882)*x_ref[2]
-        ref[1,4,2,1]=(0.38530755393)*x_ref[0]+(1.05356462429)*x_ref[1]+(-0.302179447719)*x_ref[2]
-        ref[2,0,0,0]=(-0.123109761583)*x_ref[0]+(0.69223848143)*x_ref[1]+(-1.36903487092)*x_ref[2]
-        ref[2,0,0,1]=(0.121957328459)*x_ref[0]+(0.102229685387)*x_ref[1]+(0.962499974737)*x_ref[2]
-        ref[2,0,1,0]=(0.478614188653)*x_ref[0]+(-1.23058817023)*x_ref[1]+(1.30950997478)*x_ref[2]
-        ref[2,0,1,1]=(-0.529033562461)*x_ref[0]+(0.563030509591)*x_ref[1]+(-0.564939226654)*x_ref[2]
-        ref[2,0,2,0]=(-0.377740282406)*x_ref[0]+(1.20532110343)*x_ref[1]+(1.55615174947)*x_ref[2]
-        ref[2,0,2,1]=(0.539119710703)*x_ref[0]+(1.91771865857)*x_ref[1]+(0.0809882488048)*x_ref[2]
-        ref[2,1,0,0]=(0.00548664737796)*x_ref[0]+(-0.157716099068)*x_ref[1]+(-1.40009044235)*x_ref[2]
-        ref[2,1,0,1]=(0.0667557890666)*x_ref[0]+(0.742484448131)*x_ref[1]+(-0.325246111346)*x_ref[2]
-        ref[2,1,1,0]=(-0.214965474071)*x_ref[0]+(-0.215055151964)*x_ref[1]+(1.15673960537)*x_ref[2]
-        ref[2,1,1,1]=(0.605764831789)*x_ref[0]+(-1.0432964832)*x_ref[1]+(0.645482523161)*x_ref[2]
-        ref[2,1,2,0]=(-1.13098364088)*x_ref[0]+(-0.932044089041)*x_ref[1]+(-0.308053828241)*x_ref[2]
-        ref[2,1,2,1]=(0.481961305459)*x_ref[0]+(-0.101277472029)*x_ref[1]+(-0.17520207974)*x_ref[2]
-        ref[2,2,0,0]=(0.579831852303)*x_ref[0]+(0.538731990254)*x_ref[1]+(-0.0897460374205)*x_ref[2]
-        ref[2,2,0,1]=(-1.8763181434)*x_ref[0]+(-0.132710928569)*x_ref[1]+(1.03169751651)*x_ref[2]
-        ref[2,2,1,0]=(0.56871511431)*x_ref[0]+(0.075333481656)*x_ref[1]+(1.10238818953)*x_ref[2]
-        ref[2,2,1,1]=(1.49347755246)*x_ref[0]+(-1.00500941047)*x_ref[1]+(-0.181733196359)*x_ref[2]
-        ref[2,2,2,0]=(0.532881509971)*x_ref[0]+(-0.364333964659)*x_ref[1]+(1.09633720883)*x_ref[2]
-        ref[2,2,2,1]=(-0.518419048615)*x_ref[0]+(-0.48091100593)*x_ref[1]+(0.724628840153)*x_ref[2]
-        ref[2,3,0,0]=(0.353475859331)*x_ref[0]+(-0.0239879269825)*x_ref[1]+(1.32068893718)*x_ref[2]
-        ref[2,3,0,1]=(0.553999122102)*x_ref[0]+(-0.128530869239)*x_ref[1]+(0.134663336287)*x_ref[2]
-        ref[2,3,1,0]=(-1.59775882569)*x_ref[0]+(-1.07335424785)*x_ref[1]+(1.39223587988)*x_ref[2]
-        ref[2,3,1,1]=(-0.921252080095)*x_ref[0]+(1.46226299067)*x_ref[1]+(-1.13412499932)*x_ref[2]
-        ref[2,3,2,0]=(0.417572910178)*x_ref[0]+(0.0814889599489)*x_ref[1]+(0.292159249719)*x_ref[2]
-        ref[2,3,2,1]=(1.44620228921)*x_ref[0]+(0.767854577367)*x_ref[1]+(-0.0113709806383)*x_ref[2]
-        ref[2,4,0,0]=(-0.156987001681)*x_ref[0]+(-0.922524257833)*x_ref[1]+(0.521128360838)*x_ref[2]
-        ref[2,4,0,1]=(0.154198133354)*x_ref[0]+(0.462020370175)*x_ref[1]+(0.966768653665)*x_ref[2]
-        ref[2,4,1,0]=(0.507836849242)*x_ref[0]+(1.16701911244)*x_ref[1]+(0.264543038211)*x_ref[2]
-        ref[2,4,1,1]=(0.452059436879)*x_ref[0]+(0.409662432778)*x_ref[1]+(-0.403800872595)*x_ref[2]
-        ref[2,4,2,0]=(0.521175521008)*x_ref[0]+(-0.362551578816)*x_ref[1]+(0.0922727331623)*x_ref[2]
-        ref[2,4,2,1]=(-1.0990361823)*x_ref[0]+(1.73655146851)*x_ref[1]+(-0.867917402922)*x_ref[2]
-        ref[3,0,0,0]=(-0.0527010882236)*x_ref[0]+(-1.11528215488)*x_ref[1]+(1.3141906393)*x_ref[2]
-        ref[3,0,0,1]=(0.151284271917)*x_ref[0]+(-0.0159077450668)*x_ref[1]+(1.1798338931)*x_ref[2]
-        ref[3,0,1,0]=(-1.7648963435)*x_ref[0]+(0.229511437402)*x_ref[1]+(0.924415900312)*x_ref[2]
-        ref[3,0,1,1]=(-0.498271821094)*x_ref[0]+(1.58363063019)*x_ref[1]+(1.64871750388)*x_ref[2]
-        ref[3,0,2,0]=(-1.11245170725)*x_ref[0]+(1.27662612569)*x_ref[1]+(0.145950372369)*x_ref[2]
-        ref[3,0,2,1]=(-0.691643924238)*x_ref[0]+(-0.178211874279)*x_ref[1]+(-0.341071050366)*x_ref[2]
-        ref[3,1,0,0]=(-0.929804889461)*x_ref[0]+(0.199087067309)*x_ref[1]+(1.00150168883)*x_ref[2]
-        ref[3,1,0,1]=(-1.25152265093)*x_ref[0]+(0.517076294911)*x_ref[1]+(0.103798312362)*x_ref[2]
-        ref[3,1,1,0]=(0.797316290623)*x_ref[0]+(0.0239285379293)*x_ref[1]+(-0.836519299418)*x_ref[2]
-        ref[3,1,1,1]=(-0.470084592176)*x_ref[0]+(0.844364701728)*x_ref[1]+(-0.027373275093)*x_ref[2]
-        ref[3,1,2,0]=(1.0340279373)*x_ref[0]+(-0.0133951276315)*x_ref[1]+(1.17710546194)*x_ref[2]
-        ref[3,1,2,1]=(0.0325929541496)*x_ref[0]+(1.13784867184)*x_ref[1]+(-0.0529194266769)*x_ref[2]
-        ref[3,2,0,0]=(1.92837561772)*x_ref[0]+(-1.63633468831)*x_ref[1]+(1.4212324281)*x_ref[2]
-        ref[3,2,0,1]=(1.09556054408)*x_ref[0]+(1.43286059545)*x_ref[1]+(1.20005604593)*x_ref[2]
-        ref[3,2,1,0]=(0.308887169169)*x_ref[0]+(-0.149214224208)*x_ref[1]+(-1.13559614877)*x_ref[2]
-        ref[3,2,1,1]=(-0.0648352909004)*x_ref[0]+(-0.5645470596)*x_ref[1]+(-0.525131730514)*x_ref[2]
-        ref[3,2,2,0]=(0.21826829974)*x_ref[0]+(1.5950239996)*x_ref[1]+(0.333592425438)*x_ref[2]
-        ref[3,2,2,1]=(-1.25613956172)*x_ref[0]+(-0.242338679844)*x_ref[1]+(-0.958875577074)*x_ref[2]
-        ref[3,3,0,0]=(1.65005362159)*x_ref[0]+(-1.16713867165)*x_ref[1]+(-0.282495293685)*x_ref[2]
-        ref[3,3,0,1]=(1.04854406427)*x_ref[0]+(0.876270949531)*x_ref[1]+(0.291036304743)*x_ref[2]
-        ref[3,3,1,0]=(-1.66619451175)*x_ref[0]+(0.656275192484)*x_ref[1]+(-1.27104499942)*x_ref[2]
-        ref[3,3,1,1]=(1.55407146907)*x_ref[0]+(-0.322950943159)*x_ref[1]+(-0.287565403896)*x_ref[2]
-        ref[3,3,2,0]=(-1.54760268583)*x_ref[0]+(-1.45847761887)*x_ref[1]+(1.13939567009)*x_ref[2]
-        ref[3,3,2,1]=(1.24632351699)*x_ref[0]+(0.0265500081594)*x_ref[1]+(1.61925095159)*x_ref[2]
-        ref[3,4,0,0]=(-0.0430889433549)*x_ref[0]+(-1.46995559463)*x_ref[1]+(-1.14915159823)*x_ref[2]
-        ref[3,4,0,1]=(0.0392641403409)*x_ref[0]+(0.0603053049639)*x_ref[1]+(0.647321169934)*x_ref[2]
-        ref[3,4,1,0]=(-0.156300985227)*x_ref[0]+(0.79369911928)*x_ref[1]+(-0.413124762507)*x_ref[2]
-        ref[3,4,1,1]=(0.258402059015)*x_ref[0]+(0.00227307988585)*x_ref[1]+(0.70067141295)*x_ref[2]
-        ref[3,4,2,0]=(-1.15131298872)*x_ref[0]+(-0.627449043157)*x_ref[1]+(-0.402268345861)*x_ref[2]
-        ref[3,4,2,1]=(0.455934238179)*x_ref[0]+(-0.951120759108)*x_ref[1]+(-0.280459367131)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.787646538574)*x[0]+(0.912422904218)*x[1]
-        ref=(-0.787646538574)*x_ref[0]+(0.912422904218)*x_ref[1]
-      else:
-        arg=(0.934044939024)*x[0]+(0.628477728603)*x[1]+(-0.786339405837)*x[2]
-        ref=(0.934044939024)*x_ref[0]+(0.628477728603)*x_ref[1]+(-0.786339405837)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        arg[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-        ref[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        ref[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-      else:
-        arg[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        arg[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-        ref[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        ref[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.797066914479)*x[0]+(-0.0269853164939)*x[1]
-        arg[0,1]=(-1.07443661798)*x[0]+(0.818510216043)*x[1]
-        arg[0,2]=(0.398735262179)*x[0]+(-0.580387872083)*x[1]
-        arg[0,3]=(-0.003185613959)*x[0]+(-0.670506330615)*x[1]
-        arg[0,4]=(0.385009570186)*x[0]+(0.858570512936)*x[1]
-        arg[1,0]=(1.60917176753)*x[0]+(-0.0866362449992)*x[1]
-        arg[1,1]=(-0.883782122452)*x[0]+(-0.402187705578)*x[1]
-        arg[1,2]=(0.153893095122)*x[0]+(-1.19636362644)*x[1]
-        arg[1,3]=(1.92041961031)*x[0]+(0.325857877636)*x[1]
-        arg[1,4]=(-0.0947698843729)*x[0]+(-0.0663785758627)*x[1]
-        arg[2,0]=(0.0232949467051)*x[0]+(1.60134210326)*x[1]
-        arg[2,1]=(-0.521182882924)*x[0]+(-0.507401571343)*x[1]
-        arg[2,2]=(0.833797117616)*x[0]+(-0.268886477194)*x[1]
-        arg[2,3]=(-0.867762611227)*x[0]+(1.03727088566)*x[1]
-        arg[2,4]=(0.380510651918)*x[0]+(0.350246888456)*x[1]
-        arg[3,0]=(-1.10155500839)*x[0]+(0.414683749118)*x[1]
-        arg[3,1]=(-0.0306733233552)*x[0]+(-0.351251014237)*x[1]
-        arg[3,2]=(-0.0708773001498)*x[0]+(-0.326636587948)*x[1]
-        arg[3,3]=(-1.32553119895)*x[0]+(-1.5852157477)*x[1]
-        arg[3,4]=(1.40177154802)*x[0]+(-1.24804787994)*x[1]
-        ref[0,0]=(-0.797066914479)*x_ref[0]+(-0.0269853164939)*x_ref[1]
-        ref[0,1]=(-1.07443661798)*x_ref[0]+(0.818510216043)*x_ref[1]
-        ref[0,2]=(0.398735262179)*x_ref[0]+(-0.580387872083)*x_ref[1]
-        ref[0,3]=(-0.003185613959)*x_ref[0]+(-0.670506330615)*x_ref[1]
-        ref[0,4]=(0.385009570186)*x_ref[0]+(0.858570512936)*x_ref[1]
-        ref[1,0]=(1.60917176753)*x_ref[0]+(-0.0866362449992)*x_ref[1]
-        ref[1,1]=(-0.883782122452)*x_ref[0]+(-0.402187705578)*x_ref[1]
-        ref[1,2]=(0.153893095122)*x_ref[0]+(-1.19636362644)*x_ref[1]
-        ref[1,3]=(1.92041961031)*x_ref[0]+(0.325857877636)*x_ref[1]
-        ref[1,4]=(-0.0947698843729)*x_ref[0]+(-0.0663785758627)*x_ref[1]
-        ref[2,0]=(0.0232949467051)*x_ref[0]+(1.60134210326)*x_ref[1]
-        ref[2,1]=(-0.521182882924)*x_ref[0]+(-0.507401571343)*x_ref[1]
-        ref[2,2]=(0.833797117616)*x_ref[0]+(-0.268886477194)*x_ref[1]
-        ref[2,3]=(-0.867762611227)*x_ref[0]+(1.03727088566)*x_ref[1]
-        ref[2,4]=(0.380510651918)*x_ref[0]+(0.350246888456)*x_ref[1]
-        ref[3,0]=(-1.10155500839)*x_ref[0]+(0.414683749118)*x_ref[1]
-        ref[3,1]=(-0.0306733233552)*x_ref[0]+(-0.351251014237)*x_ref[1]
-        ref[3,2]=(-0.0708773001498)*x_ref[0]+(-0.326636587948)*x_ref[1]
-        ref[3,3]=(-1.32553119895)*x_ref[0]+(-1.5852157477)*x_ref[1]
-        ref[3,4]=(1.40177154802)*x_ref[0]+(-1.24804787994)*x_ref[1]
-      else:
-        arg[0,0]=(0.000362194678523)*x[0]+(-1.63949220671)*x[1]+(-0.176997156562)*x[2]
-        arg[0,1]=(-0.357589049408)*x[0]+(0.828191515325)*x[1]+(-0.269706780136)*x[2]
-        arg[0,2]=(0.886395070544)*x[0]+(0.815688451839)*x[1]+(-0.658412270558)*x[2]
-        arg[0,3]=(-0.222573318026)*x[0]+(0.137763803092)*x[1]+(0.171902150187)*x[2]
-        arg[0,4]=(1.05159741251)*x[0]+(0.923836841038)*x[1]+(-0.426590801731)*x[2]
-        arg[1,0]=(-0.00718419057788)*x[0]+(1.55809964998)*x[1]+(-0.912766657496)*x[2]
-        arg[1,1]=(1.30769045785)*x[0]+(-0.0356609338389)*x[1]+(0.214543084134)*x[2]
-        arg[1,2]=(-1.56763014241)*x[0]+(-0.582970995722)*x[1]+(-0.513972924752)*x[2]
-        arg[1,3]=(0.118027736928)*x[0]+(-0.28795014876)*x[1]+(0.620718623034)*x[2]
-        arg[1,4]=(-0.784496170193)*x[0]+(0.233037866924)*x[1]+(-0.0500718134572)*x[2]
-        arg[2,0]=(0.800851281806)*x[0]+(0.219346484846)*x[1]+(1.19125787701)*x[2]
-        arg[2,1]=(-1.45025879429)*x[0]+(-1.32011538154)*x[1]+(0.47946669308)*x[2]
-        arg[2,2]=(-0.231377110469)*x[0]+(-0.921551695999)*x[1]+(-0.298964635841)*x[2]
-        arg[2,3]=(0.965766335546)*x[0]+(0.424791610089)*x[1]+(1.01860652092)*x[2]
-        arg[2,4]=(0.676247093636)*x[0]+(-1.50802741511)*x[1]+(0.0385960918391)*x[2]
-        arg[3,0]=(0.322378151756)*x[0]+(-0.483633005509)*x[1]+(-0.852371707865)*x[2]
-        arg[3,1]=(-0.241998307153)*x[0]+(-1.08134340082)*x[1]+(-0.849574532537)*x[2]
-        arg[3,2]=(-0.0185751405467)*x[0]+(0.179558416001)*x[1]+(-0.488727308548)*x[2]
-        arg[3,3]=(0.0984555057845)*x[0]+(1.03085967788)*x[1]+(-0.357009094371)*x[2]
-        arg[3,4]=(0.430593980121)*x[0]+(0.689565614489)*x[1]+(-0.0916541808491)*x[2]
-        ref[0,0]=(0.000362194678523)*x_ref[0]+(-1.63949220671)*x_ref[1]+(-0.176997156562)*x_ref[2]
-        ref[0,1]=(-0.357589049408)*x_ref[0]+(0.828191515325)*x_ref[1]+(-0.269706780136)*x_ref[2]
-        ref[0,2]=(0.886395070544)*x_ref[0]+(0.815688451839)*x_ref[1]+(-0.658412270558)*x_ref[2]
-        ref[0,3]=(-0.222573318026)*x_ref[0]+(0.137763803092)*x_ref[1]+(0.171902150187)*x_ref[2]
-        ref[0,4]=(1.05159741251)*x_ref[0]+(0.923836841038)*x_ref[1]+(-0.426590801731)*x_ref[2]
-        ref[1,0]=(-0.00718419057788)*x_ref[0]+(1.55809964998)*x_ref[1]+(-0.912766657496)*x_ref[2]
-        ref[1,1]=(1.30769045785)*x_ref[0]+(-0.0356609338389)*x_ref[1]+(0.214543084134)*x_ref[2]
-        ref[1,2]=(-1.56763014241)*x_ref[0]+(-0.582970995722)*x_ref[1]+(-0.513972924752)*x_ref[2]
-        ref[1,3]=(0.118027736928)*x_ref[0]+(-0.28795014876)*x_ref[1]+(0.620718623034)*x_ref[2]
-        ref[1,4]=(-0.784496170193)*x_ref[0]+(0.233037866924)*x_ref[1]+(-0.0500718134572)*x_ref[2]
-        ref[2,0]=(0.800851281806)*x_ref[0]+(0.219346484846)*x_ref[1]+(1.19125787701)*x_ref[2]
-        ref[2,1]=(-1.45025879429)*x_ref[0]+(-1.32011538154)*x_ref[1]+(0.47946669308)*x_ref[2]
-        ref[2,2]=(-0.231377110469)*x_ref[0]+(-0.921551695999)*x_ref[1]+(-0.298964635841)*x_ref[2]
-        ref[2,3]=(0.965766335546)*x_ref[0]+(0.424791610089)*x_ref[1]+(1.01860652092)*x_ref[2]
-        ref[2,4]=(0.676247093636)*x_ref[0]+(-1.50802741511)*x_ref[1]+(0.0385960918391)*x_ref[2]
-        ref[3,0]=(0.322378151756)*x_ref[0]+(-0.483633005509)*x_ref[1]+(-0.852371707865)*x_ref[2]
-        ref[3,1]=(-0.241998307153)*x_ref[0]+(-1.08134340082)*x_ref[1]+(-0.849574532537)*x_ref[2]
-        ref[3,2]=(-0.0185751405467)*x_ref[0]+(0.179558416001)*x_ref[1]+(-0.488727308548)*x_ref[2]
-        ref[3,3]=(0.0984555057845)*x_ref[0]+(1.03085967788)*x_ref[1]+(-0.357009094371)*x_ref[2]
-        ref[3,4]=(0.430593980121)*x_ref[0]+(0.689565614489)*x_ref[1]+(-0.0916541808491)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0641544023301)*x[0]+(0.364286357763)*x[1]
-        arg[0,0,1]=(-0.858288240411)*x[0]+(-0.847764393559)*x[1]
-        arg[0,1,0]=(-0.656948775029)*x[0]+(1.69748608992)*x[1]
-        arg[0,1,1]=(0.579399191549)*x[0]+(1.48407368783)*x[1]
-        arg[1,0,0]=(-0.35948657403)*x[0]+(0.795436090765)*x[1]
-        arg[1,0,1]=(-1.32807156246)*x[0]+(0.921960610294)*x[1]
-        arg[1,1,0]=(1.0904085219)*x[0]+(-1.41870997296)*x[1]
-        arg[1,1,1]=(-0.677691596793)*x[0]+(-0.395373706333)*x[1]
-        arg[2,0,0]=(0.295591917216)*x[0]+(-1.75550830457)*x[1]
-        arg[2,0,1]=(0.506665326626)*x[0]+(0.273265713965)*x[1]
-        arg[2,1,0]=(0.543899865352)*x[0]+(-0.0678457091657)*x[1]
-        arg[2,1,1]=(-0.887824769535)*x[0]+(0.527475538055)*x[1]
-        arg[3,0,0]=(-0.788511557365)*x[0]+(-0.635972100675)*x[1]
-        arg[3,0,1]=(-1.02799066459)*x[0]+(-0.416241247725)*x[1]
-        arg[3,1,0]=(-0.310072483091)*x[0]+(1.2445160445)*x[1]
-        arg[3,1,1]=(0.912462196567)*x[0]+(0.631855269783)*x[1]
-        arg[4,0,0]=(0.700426861807)*x[0]+(-0.491365913713)*x[1]
-        arg[4,0,1]=(0.628791538338)*x[0]+(0.640767645586)*x[1]
-        arg[4,1,0]=(0.370886720329)*x[0]+(0.823663448834)*x[1]
-        arg[4,1,1]=(1.75857310774)*x[0]+(0.445439424641)*x[1]
-        arg[5,0,0]=(1.39637385066)*x[0]+(-0.812211860169)*x[1]
-        arg[5,0,1]=(0.865050350195)*x[0]+(-1.25983380375)*x[1]
-        arg[5,1,0]=(-0.0429057645445)*x[0]+(-1.08490578934)*x[1]
-        arg[5,1,1]=(1.42851264594)*x[0]+(1.52192971749)*x[1]
-        ref[0,0,0]=(-0.0641544023301)*x_ref[0]+(0.364286357763)*x_ref[1]
-        ref[0,0,1]=(-0.858288240411)*x_ref[0]+(-0.847764393559)*x_ref[1]
-        ref[0,1,0]=(-0.656948775029)*x_ref[0]+(1.69748608992)*x_ref[1]
-        ref[0,1,1]=(0.579399191549)*x_ref[0]+(1.48407368783)*x_ref[1]
-        ref[1,0,0]=(-0.35948657403)*x_ref[0]+(0.795436090765)*x_ref[1]
-        ref[1,0,1]=(-1.32807156246)*x_ref[0]+(0.921960610294)*x_ref[1]
-        ref[1,1,0]=(1.0904085219)*x_ref[0]+(-1.41870997296)*x_ref[1]
-        ref[1,1,1]=(-0.677691596793)*x_ref[0]+(-0.395373706333)*x_ref[1]
-        ref[2,0,0]=(0.295591917216)*x_ref[0]+(-1.75550830457)*x_ref[1]
-        ref[2,0,1]=(0.506665326626)*x_ref[0]+(0.273265713965)*x_ref[1]
-        ref[2,1,0]=(0.543899865352)*x_ref[0]+(-0.0678457091657)*x_ref[1]
-        ref[2,1,1]=(-0.887824769535)*x_ref[0]+(0.527475538055)*x_ref[1]
-        ref[3,0,0]=(-0.788511557365)*x_ref[0]+(-0.635972100675)*x_ref[1]
-        ref[3,0,1]=(-1.02799066459)*x_ref[0]+(-0.416241247725)*x_ref[1]
-        ref[3,1,0]=(-0.310072483091)*x_ref[0]+(1.2445160445)*x_ref[1]
-        ref[3,1,1]=(0.912462196567)*x_ref[0]+(0.631855269783)*x_ref[1]
-        ref[4,0,0]=(0.700426861807)*x_ref[0]+(-0.491365913713)*x_ref[1]
-        ref[4,0,1]=(0.628791538338)*x_ref[0]+(0.640767645586)*x_ref[1]
-        ref[4,1,0]=(0.370886720329)*x_ref[0]+(0.823663448834)*x_ref[1]
-        ref[4,1,1]=(1.75857310774)*x_ref[0]+(0.445439424641)*x_ref[1]
-        ref[5,0,0]=(1.39637385066)*x_ref[0]+(-0.812211860169)*x_ref[1]
-        ref[5,0,1]=(0.865050350195)*x_ref[0]+(-1.25983380375)*x_ref[1]
-        ref[5,1,0]=(-0.0429057645445)*x_ref[0]+(-1.08490578934)*x_ref[1]
-        ref[5,1,1]=(1.42851264594)*x_ref[0]+(1.52192971749)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.731194732468)*x[0]+(-0.0822115660022)*x[1]+(-0.403175091289)*x[2]
-        arg[0,0,1]=(0.39292230307)*x[0]+(1.48598681615)*x[1]+(1.05545374107)*x[2]
-        arg[0,1,0]=(0.306844260706)*x[0]+(0.836496026763)*x[1]+(-0.121120983155)*x[2]
-        arg[0,1,1]=(-0.155245802062)*x[0]+(0.800232934864)*x[1]+(0.373397160636)*x[2]
-        arg[1,0,0]=(0.155941790359)*x[0]+(0.826821969281)*x[1]+(0.849596807425)*x[2]
-        arg[1,0,1]=(-0.0988854656187)*x[0]+(-0.855032499842)*x[1]+(0.141988288566)*x[2]
-        arg[1,1,0]=(-0.761032539296)*x[0]+(-0.0892979073234)*x[1]+(1.93034385132)*x[2]
-        arg[1,1,1]=(-1.08303603558)*x[0]+(-0.487250117659)*x[1]+(0.0358501036173)*x[2]
-        arg[2,0,0]=(0.148391465413)*x[0]+(-0.731963025625)*x[1]+(0.484236965689)*x[2]
-        arg[2,0,1]=(1.06691217722)*x[0]+(-0.638095266244)*x[1]+(-0.971838410779)*x[2]
-        arg[2,1,0]=(-0.377750829061)*x[0]+(-0.101467967263)*x[1]+(-1.54241387349)*x[2]
-        arg[2,1,1]=(0.62210350231)*x[0]+(0.0435334873911)*x[1]+(-0.299303646623)*x[2]
-        arg[3,0,0]=(0.523811147108)*x[0]+(-1.09709839108)*x[1]+(1.83592280935)*x[2]
-        arg[3,0,1]=(0.957738143475)*x[0]+(0.282158440867)*x[1]+(0.621694180522)*x[2]
-        arg[3,1,0]=(0.366557891822)*x[0]+(0.812194047631)*x[1]+(-0.245067876349)*x[2]
-        arg[3,1,1]=(0.604859464982)*x[0]+(1.08415514854)*x[1]+(-1.470128848)*x[2]
-        arg[4,0,0]=(-0.13031502499)*x[0]+(-1.20707238733)*x[1]+(0.108382497552)*x[2]
-        arg[4,0,1]=(1.30453246317)*x[0]+(1.59696612588)*x[1]+(-0.234259043697)*x[2]
-        arg[4,1,0]=(-0.233494640836)*x[0]+(1.10701061816)*x[1]+(-0.409927013674)*x[2]
-        arg[4,1,1]=(0.102708240266)*x[0]+(-0.381598345002)*x[1]+(-1.39077748656)*x[2]
-        arg[5,0,0]=(1.06217404493)*x[0]+(1.1600791444)*x[1]+(-1.45242735389)*x[2]
-        arg[5,0,1]=(-0.423024189506)*x[0]+(-0.0868948651641)*x[1]+(0.0894539043522)*x[2]
-        arg[5,1,0]=(1.17650613067)*x[0]+(0.993832919965)*x[1]+(1.16546768569)*x[2]
-        arg[5,1,1]=(-0.61549132897)*x[0]+(-0.499619662734)*x[1]+(-0.643422281669)*x[2]
-        ref[0,0,0]=(0.731194732468)*x_ref[0]+(-0.0822115660022)*x_ref[1]+(-0.403175091289)*x_ref[2]
-        ref[0,0,1]=(0.39292230307)*x_ref[0]+(1.48598681615)*x_ref[1]+(1.05545374107)*x_ref[2]
-        ref[0,1,0]=(0.306844260706)*x_ref[0]+(0.836496026763)*x_ref[1]+(-0.121120983155)*x_ref[2]
-        ref[0,1,1]=(-0.155245802062)*x_ref[0]+(0.800232934864)*x_ref[1]+(0.373397160636)*x_ref[2]
-        ref[1,0,0]=(0.155941790359)*x_ref[0]+(0.826821969281)*x_ref[1]+(0.849596807425)*x_ref[2]
-        ref[1,0,1]=(-0.0988854656187)*x_ref[0]+(-0.855032499842)*x_ref[1]+(0.141988288566)*x_ref[2]
-        ref[1,1,0]=(-0.761032539296)*x_ref[0]+(-0.0892979073234)*x_ref[1]+(1.93034385132)*x_ref[2]
-        ref[1,1,1]=(-1.08303603558)*x_ref[0]+(-0.487250117659)*x_ref[1]+(0.0358501036173)*x_ref[2]
-        ref[2,0,0]=(0.148391465413)*x_ref[0]+(-0.731963025625)*x_ref[1]+(0.484236965689)*x_ref[2]
-        ref[2,0,1]=(1.06691217722)*x_ref[0]+(-0.638095266244)*x_ref[1]+(-0.971838410779)*x_ref[2]
-        ref[2,1,0]=(-0.377750829061)*x_ref[0]+(-0.101467967263)*x_ref[1]+(-1.54241387349)*x_ref[2]
-        ref[2,1,1]=(0.62210350231)*x_ref[0]+(0.0435334873911)*x_ref[1]+(-0.299303646623)*x_ref[2]
-        ref[3,0,0]=(0.523811147108)*x_ref[0]+(-1.09709839108)*x_ref[1]+(1.83592280935)*x_ref[2]
-        ref[3,0,1]=(0.957738143475)*x_ref[0]+(0.282158440867)*x_ref[1]+(0.621694180522)*x_ref[2]
-        ref[3,1,0]=(0.366557891822)*x_ref[0]+(0.812194047631)*x_ref[1]+(-0.245067876349)*x_ref[2]
-        ref[3,1,1]=(0.604859464982)*x_ref[0]+(1.08415514854)*x_ref[1]+(-1.470128848)*x_ref[2]
-        ref[4,0,0]=(-0.13031502499)*x_ref[0]+(-1.20707238733)*x_ref[1]+(0.108382497552)*x_ref[2]
-        ref[4,0,1]=(1.30453246317)*x_ref[0]+(1.59696612588)*x_ref[1]+(-0.234259043697)*x_ref[2]
-        ref[4,1,0]=(-0.233494640836)*x_ref[0]+(1.10701061816)*x_ref[1]+(-0.409927013674)*x_ref[2]
-        ref[4,1,1]=(0.102708240266)*x_ref[0]+(-0.381598345002)*x_ref[1]+(-1.39077748656)*x_ref[2]
-        ref[5,0,0]=(1.06217404493)*x_ref[0]+(1.1600791444)*x_ref[1]+(-1.45242735389)*x_ref[2]
-        ref[5,0,1]=(-0.423024189506)*x_ref[0]+(-0.0868948651641)*x_ref[1]+(0.0894539043522)*x_ref[2]
-        ref[5,1,0]=(1.17650613067)*x_ref[0]+(0.993832919965)*x_ref[1]+(1.16546768569)*x_ref[2]
-        ref[5,1,1]=(-0.61549132897)*x_ref[0]+(-0.499619662734)*x_ref[1]+(-0.643422281669)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.227969627252)*x[0]+(0.778177350248)*x[1]
-        arg[0,0,0,1]=(-0.684883711494)*x[0]+(-0.574285957132)*x[1]
-        arg[0,0,1,0]=(0.483090608974)*x[0]+(0.0779929087959)*x[1]
-        arg[0,0,1,1]=(-0.293150814932)*x[0]+(1.35368931993)*x[1]
-        arg[0,0,2,0]=(-0.190664734662)*x[0]+(0.910883386754)*x[1]
-        arg[0,0,2,1]=(-1.51255575457)*x[0]+(0.421560181501)*x[1]
-        arg[0,1,0,0]=(-0.833402828032)*x[0]+(-0.400466806781)*x[1]
-        arg[0,1,0,1]=(-0.212099323605)*x[0]+(-0.112478697221)*x[1]
-        arg[0,1,1,0]=(0.57687662926)*x[0]+(0.869758954551)*x[1]
-        arg[0,1,1,1]=(1.37261769917)*x[0]+(1.37855789907)*x[1]
-        arg[0,1,2,0]=(-1.02838589722)*x[0]+(-0.280409246204)*x[1]
-        arg[0,1,2,1]=(1.2333373468)*x[0]+(0.337631183798)*x[1]
-        arg[0,2,0,0]=(-0.249065448772)*x[0]+(0.834483646317)*x[1]
-        arg[0,2,0,1]=(-1.30860297683)*x[0]+(-0.653929967017)*x[1]
-        arg[0,2,1,0]=(-0.0155994484453)*x[0]+(-0.274023166937)*x[1]
-        arg[0,2,1,1]=(0.31458360335)*x[0]+(1.59507700673)*x[1]
-        arg[0,2,2,0]=(-0.11442619553)*x[0]+(1.6577028576)*x[1]
-        arg[0,2,2,1]=(0.274261132032)*x[0]+(1.15236962479)*x[1]
-        arg[0,3,0,0]=(1.91433860239)*x[0]+(-0.316349747811)*x[1]
-        arg[0,3,0,1]=(-1.42457591054)*x[0]+(-0.362812690805)*x[1]
-        arg[0,3,1,0]=(0.572734883096)*x[0]+(0.424724787283)*x[1]
-        arg[0,3,1,1]=(-0.118538376813)*x[0]+(0.25190312527)*x[1]
-        arg[0,3,2,0]=(-0.533409510081)*x[0]+(-0.804349107915)*x[1]
-        arg[0,3,2,1]=(-0.290555363666)*x[0]+(-0.912641477145)*x[1]
-        arg[0,4,0,0]=(-0.469612775918)*x[0]+(-0.0447411310793)*x[1]
-        arg[0,4,0,1]=(0.108538258831)*x[0]+(0.0453962016662)*x[1]
-        arg[0,4,1,0]=(-0.130785944028)*x[0]+(0.0887280914032)*x[1]
-        arg[0,4,1,1]=(0.166412309585)*x[0]+(-0.75130797706)*x[1]
-        arg[0,4,2,0]=(1.22538232455)*x[0]+(0.112925588343)*x[1]
-        arg[0,4,2,1]=(-1.02455171854)*x[0]+(-0.725754942749)*x[1]
-        arg[1,0,0,0]=(-0.869171086952)*x[0]+(-0.948876783682)*x[1]
-        arg[1,0,0,1]=(0.17730673689)*x[0]+(-0.00166180855579)*x[1]
-        arg[1,0,1,0]=(0.482072704433)*x[0]+(0.895847096783)*x[1]
-        arg[1,0,1,1]=(0.695736834617)*x[0]+(0.358082704558)*x[1]
-        arg[1,0,2,0]=(-0.501799636565)*x[0]+(0.363612558025)*x[1]
-        arg[1,0,2,1]=(-1.47204447226)*x[0]+(1.91281426121)*x[1]
-        arg[1,1,0,0]=(0.241893182978)*x[0]+(0.95199758669)*x[1]
-        arg[1,1,0,1]=(-0.68112361827)*x[0]+(-0.241935141301)*x[1]
-        arg[1,1,1,0]=(-0.553030972306)*x[0]+(0.0244503690439)*x[1]
-        arg[1,1,1,1]=(0.278177176896)*x[0]+(1.58693846427)*x[1]
-        arg[1,1,2,0]=(-0.87980015517)*x[0]+(0.315618837123)*x[1]
-        arg[1,1,2,1]=(-0.335783961379)*x[0]+(0.368650136138)*x[1]
-        arg[1,2,0,0]=(-0.903535146802)*x[0]+(1.68182923194)*x[1]
-        arg[1,2,0,1]=(1.06511511382)*x[0]+(-1.08524762302)*x[1]
-        arg[1,2,1,0]=(-0.0455274784681)*x[0]+(-0.519576710661)*x[1]
-        arg[1,2,1,1]=(0.735100217062)*x[0]+(-0.986268682671)*x[1]
-        arg[1,2,2,0]=(-0.544610797462)*x[0]+(0.447237114882)*x[1]
-        arg[1,2,2,1]=(0.385242031153)*x[0]+(-0.960538844247)*x[1]
-        arg[1,3,0,0]=(-0.354927072897)*x[0]+(0.842574324062)*x[1]
-        arg[1,3,0,1]=(0.319036427919)*x[0]+(-0.156282262536)*x[1]
-        arg[1,3,1,0]=(0.587123807717)*x[0]+(1.65277990726)*x[1]
-        arg[1,3,1,1]=(0.791697370298)*x[0]+(-1.5681680344)*x[1]
-        arg[1,3,2,0]=(-1.41931242045)*x[0]+(0.351285136557)*x[1]
-        arg[1,3,2,1]=(0.53175704402)*x[0]+(0.987523241324)*x[1]
-        arg[1,4,0,0]=(0.00533504818465)*x[0]+(-0.158886930817)*x[1]
-        arg[1,4,0,1]=(1.23725297303)*x[0]+(-0.302896452172)*x[1]
-        arg[1,4,1,0]=(0.433953146329)*x[0]+(-0.0721602234887)*x[1]
-        arg[1,4,1,1]=(-0.383499726865)*x[0]+(-0.253834671235)*x[1]
-        arg[1,4,2,0]=(-0.480776695247)*x[0]+(-0.302145524759)*x[1]
-        arg[1,4,2,1]=(1.14113180903)*x[0]+(-1.24304726003)*x[1]
-        arg[2,0,0,0]=(0.513776013893)*x[0]+(-0.16660259885)*x[1]
-        arg[2,0,0,1]=(1.55739209698)*x[0]+(0.0524084654531)*x[1]
-        arg[2,0,1,0]=(0.222567881446)*x[0]+(-0.357158470388)*x[1]
-        arg[2,0,1,1]=(0.0179816596229)*x[0]+(0.231534460784)*x[1]
-        arg[2,0,2,0]=(1.58460345297)*x[0]+(-0.383588433888)*x[1]
-        arg[2,0,2,1]=(-1.73386465536)*x[0]+(-0.743326657544)*x[1]
-        arg[2,1,0,0]=(-0.737976950246)*x[0]+(-1.01053396224)*x[1]
-        arg[2,1,0,1]=(0.926911190393)*x[0]+(0.620251783925)*x[1]
-        arg[2,1,1,0]=(-1.34289630129)*x[0]+(-0.429933681523)*x[1]
-        arg[2,1,1,1]=(1.79530806415)*x[0]+(-0.539783957021)*x[1]
-        arg[2,1,2,0]=(0.237950974938)*x[0]+(1.93783427703)*x[1]
-        arg[2,1,2,1]=(-0.439640741973)*x[0]+(-0.61543984673)*x[1]
-        arg[2,2,0,0]=(-1.66403612438)*x[0]+(1.00839566441)*x[1]
-        arg[2,2,0,1]=(0.249635983351)*x[0]+(-0.722261363675)*x[1]
-        arg[2,2,1,0]=(1.34179674459)*x[0]+(0.502542144188)*x[1]
-        arg[2,2,1,1]=(-0.815862586074)*x[0]+(-0.110688273707)*x[1]
-        arg[2,2,2,0]=(-0.686810719526)*x[0]+(0.500406563421)*x[1]
-        arg[2,2,2,1]=(0.681231089598)*x[0]+(0.605219505613)*x[1]
-        arg[2,3,0,0]=(-0.953299029956)*x[0]+(-0.223725858372)*x[1]
-        arg[2,3,0,1]=(0.831380756684)*x[0]+(-0.0379777076335)*x[1]
-        arg[2,3,1,0]=(-1.63804393157)*x[0]+(0.148235731301)*x[1]
-        arg[2,3,1,1]=(-0.17786458643)*x[0]+(-1.77342152699)*x[1]
-        arg[2,3,2,0]=(0.0210446244192)*x[0]+(1.59778781524)*x[1]
-        arg[2,3,2,1]=(0.877162721214)*x[0]+(0.262990448614)*x[1]
-        arg[2,4,0,0]=(-0.650265970331)*x[0]+(-1.07003604369)*x[1]
-        arg[2,4,0,1]=(1.12940101029)*x[0]+(0.860589290891)*x[1]
-        arg[2,4,1,0]=(0.520056210056)*x[0]+(-1.47691193979)*x[1]
-        arg[2,4,1,1]=(1.26823535235)*x[0]+(0.496811720647)*x[1]
-        arg[2,4,2,0]=(-1.388913443)*x[0]+(0.585343197943)*x[1]
-        arg[2,4,2,1]=(-0.762904547594)*x[0]+(0.503438815917)*x[1]
-        arg[3,0,0,0]=(0.382862686993)*x[0]+(-0.923525513303)*x[1]
-        arg[3,0,0,1]=(-0.54305794485)*x[0]+(0.467513531444)*x[1]
-        arg[3,0,1,0]=(1.24228759776)*x[0]+(-1.65740117421)*x[1]
-        arg[3,0,1,1]=(-0.463045362742)*x[0]+(0.186438587087)*x[1]
-        arg[3,0,2,0]=(0.296881980828)*x[0]+(-0.385878814949)*x[1]
-        arg[3,0,2,1]=(-0.299705899564)*x[0]+(0.490736038538)*x[1]
-        arg[3,1,0,0]=(-0.786851428658)*x[0]+(-0.760593794308)*x[1]
-        arg[3,1,0,1]=(0.506851336483)*x[0]+(0.995163951197)*x[1]
-        arg[3,1,1,0]=(-0.678883937341)*x[0]+(0.56996778248)*x[1]
-        arg[3,1,1,1]=(-0.401483642528)*x[0]+(0.0476797332537)*x[1]
-        arg[3,1,2,0]=(-0.585357955375)*x[0]+(0.330103647539)*x[1]
-        arg[3,1,2,1]=(-0.355539976825)*x[0]+(0.416287924349)*x[1]
-        arg[3,2,0,0]=(-0.662837130286)*x[0]+(-0.26640899674)*x[1]
-        arg[3,2,0,1]=(0.397553900588)*x[0]+(-1.21708620294)*x[1]
-        arg[3,2,1,0]=(0.464963326429)*x[0]+(-0.774515114142)*x[1]
-        arg[3,2,1,1]=(0.834351469791)*x[0]+(0.487629540715)*x[1]
-        arg[3,2,2,0]=(0.27622693716)*x[0]+(0.811338337719)*x[1]
-        arg[3,2,2,1]=(0.0384997772653)*x[0]+(1.03724996578)*x[1]
-        arg[3,3,0,0]=(-0.805491987874)*x[0]+(-0.476384547853)*x[1]
-        arg[3,3,0,1]=(0.615551780195)*x[0]+(-0.312805967691)*x[1]
-        arg[3,3,1,0]=(0.348666798955)*x[0]+(-1.31271156524)*x[1]
-        arg[3,3,1,1]=(-0.423569975374)*x[0]+(0.930713125389)*x[1]
-        arg[3,3,2,0]=(0.325632686234)*x[0]+(-0.166401033259)*x[1]
-        arg[3,3,2,1]=(0.126924861797)*x[0]+(-0.425380897969)*x[1]
-        arg[3,4,0,0]=(0.169532204538)*x[0]+(0.614632525765)*x[1]
-        arg[3,4,0,1]=(-0.938098696851)*x[0]+(0.648854147587)*x[1]
-        arg[3,4,1,0]=(-0.545143970434)*x[0]+(-1.59787515966)*x[1]
-        arg[3,4,1,1]=(-0.711190914978)*x[0]+(0.897331522911)*x[1]
-        arg[3,4,2,0]=(-0.386498124525)*x[0]+(0.299740420711)*x[1]
-        arg[3,4,2,1]=(0.617683032062)*x[0]+(-0.449587703061)*x[1]
-        ref[0,0,0,0]=(0.227969627252)*x_ref[0]+(0.778177350248)*x_ref[1]
-        ref[0,0,0,1]=(-0.684883711494)*x_ref[0]+(-0.574285957132)*x_ref[1]
-        ref[0,0,1,0]=(0.483090608974)*x_ref[0]+(0.0779929087959)*x_ref[1]
-        ref[0,0,1,1]=(-0.293150814932)*x_ref[0]+(1.35368931993)*x_ref[1]
-        ref[0,0,2,0]=(-0.190664734662)*x_ref[0]+(0.910883386754)*x_ref[1]
-        ref[0,0,2,1]=(-1.51255575457)*x_ref[0]+(0.421560181501)*x_ref[1]
-        ref[0,1,0,0]=(-0.833402828032)*x_ref[0]+(-0.400466806781)*x_ref[1]
-        ref[0,1,0,1]=(-0.212099323605)*x_ref[0]+(-0.112478697221)*x_ref[1]
-        ref[0,1,1,0]=(0.57687662926)*x_ref[0]+(0.869758954551)*x_ref[1]
-        ref[0,1,1,1]=(1.37261769917)*x_ref[0]+(1.37855789907)*x_ref[1]
-        ref[0,1,2,0]=(-1.02838589722)*x_ref[0]+(-0.280409246204)*x_ref[1]
-        ref[0,1,2,1]=(1.2333373468)*x_ref[0]+(0.337631183798)*x_ref[1]
-        ref[0,2,0,0]=(-0.249065448772)*x_ref[0]+(0.834483646317)*x_ref[1]
-        ref[0,2,0,1]=(-1.30860297683)*x_ref[0]+(-0.653929967017)*x_ref[1]
-        ref[0,2,1,0]=(-0.0155994484453)*x_ref[0]+(-0.274023166937)*x_ref[1]
-        ref[0,2,1,1]=(0.31458360335)*x_ref[0]+(1.59507700673)*x_ref[1]
-        ref[0,2,2,0]=(-0.11442619553)*x_ref[0]+(1.6577028576)*x_ref[1]
-        ref[0,2,2,1]=(0.274261132032)*x_ref[0]+(1.15236962479)*x_ref[1]
-        ref[0,3,0,0]=(1.91433860239)*x_ref[0]+(-0.316349747811)*x_ref[1]
-        ref[0,3,0,1]=(-1.42457591054)*x_ref[0]+(-0.362812690805)*x_ref[1]
-        ref[0,3,1,0]=(0.572734883096)*x_ref[0]+(0.424724787283)*x_ref[1]
-        ref[0,3,1,1]=(-0.118538376813)*x_ref[0]+(0.25190312527)*x_ref[1]
-        ref[0,3,2,0]=(-0.533409510081)*x_ref[0]+(-0.804349107915)*x_ref[1]
-        ref[0,3,2,1]=(-0.290555363666)*x_ref[0]+(-0.912641477145)*x_ref[1]
-        ref[0,4,0,0]=(-0.469612775918)*x_ref[0]+(-0.0447411310793)*x_ref[1]
-        ref[0,4,0,1]=(0.108538258831)*x_ref[0]+(0.0453962016662)*x_ref[1]
-        ref[0,4,1,0]=(-0.130785944028)*x_ref[0]+(0.0887280914032)*x_ref[1]
-        ref[0,4,1,1]=(0.166412309585)*x_ref[0]+(-0.75130797706)*x_ref[1]
-        ref[0,4,2,0]=(1.22538232455)*x_ref[0]+(0.112925588343)*x_ref[1]
-        ref[0,4,2,1]=(-1.02455171854)*x_ref[0]+(-0.725754942749)*x_ref[1]
-        ref[1,0,0,0]=(-0.869171086952)*x_ref[0]+(-0.948876783682)*x_ref[1]
-        ref[1,0,0,1]=(0.17730673689)*x_ref[0]+(-0.00166180855579)*x_ref[1]
-        ref[1,0,1,0]=(0.482072704433)*x_ref[0]+(0.895847096783)*x_ref[1]
-        ref[1,0,1,1]=(0.695736834617)*x_ref[0]+(0.358082704558)*x_ref[1]
-        ref[1,0,2,0]=(-0.501799636565)*x_ref[0]+(0.363612558025)*x_ref[1]
-        ref[1,0,2,1]=(-1.47204447226)*x_ref[0]+(1.91281426121)*x_ref[1]
-        ref[1,1,0,0]=(0.241893182978)*x_ref[0]+(0.95199758669)*x_ref[1]
-        ref[1,1,0,1]=(-0.68112361827)*x_ref[0]+(-0.241935141301)*x_ref[1]
-        ref[1,1,1,0]=(-0.553030972306)*x_ref[0]+(0.0244503690439)*x_ref[1]
-        ref[1,1,1,1]=(0.278177176896)*x_ref[0]+(1.58693846427)*x_ref[1]
-        ref[1,1,2,0]=(-0.87980015517)*x_ref[0]+(0.315618837123)*x_ref[1]
-        ref[1,1,2,1]=(-0.335783961379)*x_ref[0]+(0.368650136138)*x_ref[1]
-        ref[1,2,0,0]=(-0.903535146802)*x_ref[0]+(1.68182923194)*x_ref[1]
-        ref[1,2,0,1]=(1.06511511382)*x_ref[0]+(-1.08524762302)*x_ref[1]
-        ref[1,2,1,0]=(-0.0455274784681)*x_ref[0]+(-0.519576710661)*x_ref[1]
-        ref[1,2,1,1]=(0.735100217062)*x_ref[0]+(-0.986268682671)*x_ref[1]
-        ref[1,2,2,0]=(-0.544610797462)*x_ref[0]+(0.447237114882)*x_ref[1]
-        ref[1,2,2,1]=(0.385242031153)*x_ref[0]+(-0.960538844247)*x_ref[1]
-        ref[1,3,0,0]=(-0.354927072897)*x_ref[0]+(0.842574324062)*x_ref[1]
-        ref[1,3,0,1]=(0.319036427919)*x_ref[0]+(-0.156282262536)*x_ref[1]
-        ref[1,3,1,0]=(0.587123807717)*x_ref[0]+(1.65277990726)*x_ref[1]
-        ref[1,3,1,1]=(0.791697370298)*x_ref[0]+(-1.5681680344)*x_ref[1]
-        ref[1,3,2,0]=(-1.41931242045)*x_ref[0]+(0.351285136557)*x_ref[1]
-        ref[1,3,2,1]=(0.53175704402)*x_ref[0]+(0.987523241324)*x_ref[1]
-        ref[1,4,0,0]=(0.00533504818465)*x_ref[0]+(-0.158886930817)*x_ref[1]
-        ref[1,4,0,1]=(1.23725297303)*x_ref[0]+(-0.302896452172)*x_ref[1]
-        ref[1,4,1,0]=(0.433953146329)*x_ref[0]+(-0.0721602234887)*x_ref[1]
-        ref[1,4,1,1]=(-0.383499726865)*x_ref[0]+(-0.253834671235)*x_ref[1]
-        ref[1,4,2,0]=(-0.480776695247)*x_ref[0]+(-0.302145524759)*x_ref[1]
-        ref[1,4,2,1]=(1.14113180903)*x_ref[0]+(-1.24304726003)*x_ref[1]
-        ref[2,0,0,0]=(0.513776013893)*x_ref[0]+(-0.16660259885)*x_ref[1]
-        ref[2,0,0,1]=(1.55739209698)*x_ref[0]+(0.0524084654531)*x_ref[1]
-        ref[2,0,1,0]=(0.222567881446)*x_ref[0]+(-0.357158470388)*x_ref[1]
-        ref[2,0,1,1]=(0.0179816596229)*x_ref[0]+(0.231534460784)*x_ref[1]
-        ref[2,0,2,0]=(1.58460345297)*x_ref[0]+(-0.383588433888)*x_ref[1]
-        ref[2,0,2,1]=(-1.73386465536)*x_ref[0]+(-0.743326657544)*x_ref[1]
-        ref[2,1,0,0]=(-0.737976950246)*x_ref[0]+(-1.01053396224)*x_ref[1]
-        ref[2,1,0,1]=(0.926911190393)*x_ref[0]+(0.620251783925)*x_ref[1]
-        ref[2,1,1,0]=(-1.34289630129)*x_ref[0]+(-0.429933681523)*x_ref[1]
-        ref[2,1,1,1]=(1.79530806415)*x_ref[0]+(-0.539783957021)*x_ref[1]
-        ref[2,1,2,0]=(0.237950974938)*x_ref[0]+(1.93783427703)*x_ref[1]
-        ref[2,1,2,1]=(-0.439640741973)*x_ref[0]+(-0.61543984673)*x_ref[1]
-        ref[2,2,0,0]=(-1.66403612438)*x_ref[0]+(1.00839566441)*x_ref[1]
-        ref[2,2,0,1]=(0.249635983351)*x_ref[0]+(-0.722261363675)*x_ref[1]
-        ref[2,2,1,0]=(1.34179674459)*x_ref[0]+(0.502542144188)*x_ref[1]
-        ref[2,2,1,1]=(-0.815862586074)*x_ref[0]+(-0.110688273707)*x_ref[1]
-        ref[2,2,2,0]=(-0.686810719526)*x_ref[0]+(0.500406563421)*x_ref[1]
-        ref[2,2,2,1]=(0.681231089598)*x_ref[0]+(0.605219505613)*x_ref[1]
-        ref[2,3,0,0]=(-0.953299029956)*x_ref[0]+(-0.223725858372)*x_ref[1]
-        ref[2,3,0,1]=(0.831380756684)*x_ref[0]+(-0.0379777076335)*x_ref[1]
-        ref[2,3,1,0]=(-1.63804393157)*x_ref[0]+(0.148235731301)*x_ref[1]
-        ref[2,3,1,1]=(-0.17786458643)*x_ref[0]+(-1.77342152699)*x_ref[1]
-        ref[2,3,2,0]=(0.0210446244192)*x_ref[0]+(1.59778781524)*x_ref[1]
-        ref[2,3,2,1]=(0.877162721214)*x_ref[0]+(0.262990448614)*x_ref[1]
-        ref[2,4,0,0]=(-0.650265970331)*x_ref[0]+(-1.07003604369)*x_ref[1]
-        ref[2,4,0,1]=(1.12940101029)*x_ref[0]+(0.860589290891)*x_ref[1]
-        ref[2,4,1,0]=(0.520056210056)*x_ref[0]+(-1.47691193979)*x_ref[1]
-        ref[2,4,1,1]=(1.26823535235)*x_ref[0]+(0.496811720647)*x_ref[1]
-        ref[2,4,2,0]=(-1.388913443)*x_ref[0]+(0.585343197943)*x_ref[1]
-        ref[2,4,2,1]=(-0.762904547594)*x_ref[0]+(0.503438815917)*x_ref[1]
-        ref[3,0,0,0]=(0.382862686993)*x_ref[0]+(-0.923525513303)*x_ref[1]
-        ref[3,0,0,1]=(-0.54305794485)*x_ref[0]+(0.467513531444)*x_ref[1]
-        ref[3,0,1,0]=(1.24228759776)*x_ref[0]+(-1.65740117421)*x_ref[1]
-        ref[3,0,1,1]=(-0.463045362742)*x_ref[0]+(0.186438587087)*x_ref[1]
-        ref[3,0,2,0]=(0.296881980828)*x_ref[0]+(-0.385878814949)*x_ref[1]
-        ref[3,0,2,1]=(-0.299705899564)*x_ref[0]+(0.490736038538)*x_ref[1]
-        ref[3,1,0,0]=(-0.786851428658)*x_ref[0]+(-0.760593794308)*x_ref[1]
-        ref[3,1,0,1]=(0.506851336483)*x_ref[0]+(0.995163951197)*x_ref[1]
-        ref[3,1,1,0]=(-0.678883937341)*x_ref[0]+(0.56996778248)*x_ref[1]
-        ref[3,1,1,1]=(-0.401483642528)*x_ref[0]+(0.0476797332537)*x_ref[1]
-        ref[3,1,2,0]=(-0.585357955375)*x_ref[0]+(0.330103647539)*x_ref[1]
-        ref[3,1,2,1]=(-0.355539976825)*x_ref[0]+(0.416287924349)*x_ref[1]
-        ref[3,2,0,0]=(-0.662837130286)*x_ref[0]+(-0.26640899674)*x_ref[1]
-        ref[3,2,0,1]=(0.397553900588)*x_ref[0]+(-1.21708620294)*x_ref[1]
-        ref[3,2,1,0]=(0.464963326429)*x_ref[0]+(-0.774515114142)*x_ref[1]
-        ref[3,2,1,1]=(0.834351469791)*x_ref[0]+(0.487629540715)*x_ref[1]
-        ref[3,2,2,0]=(0.27622693716)*x_ref[0]+(0.811338337719)*x_ref[1]
-        ref[3,2,2,1]=(0.0384997772653)*x_ref[0]+(1.03724996578)*x_ref[1]
-        ref[3,3,0,0]=(-0.805491987874)*x_ref[0]+(-0.476384547853)*x_ref[1]
-        ref[3,3,0,1]=(0.615551780195)*x_ref[0]+(-0.312805967691)*x_ref[1]
-        ref[3,3,1,0]=(0.348666798955)*x_ref[0]+(-1.31271156524)*x_ref[1]
-        ref[3,3,1,1]=(-0.423569975374)*x_ref[0]+(0.930713125389)*x_ref[1]
-        ref[3,3,2,0]=(0.325632686234)*x_ref[0]+(-0.166401033259)*x_ref[1]
-        ref[3,3,2,1]=(0.126924861797)*x_ref[0]+(-0.425380897969)*x_ref[1]
-        ref[3,4,0,0]=(0.169532204538)*x_ref[0]+(0.614632525765)*x_ref[1]
-        ref[3,4,0,1]=(-0.938098696851)*x_ref[0]+(0.648854147587)*x_ref[1]
-        ref[3,4,1,0]=(-0.545143970434)*x_ref[0]+(-1.59787515966)*x_ref[1]
-        ref[3,4,1,1]=(-0.711190914978)*x_ref[0]+(0.897331522911)*x_ref[1]
-        ref[3,4,2,0]=(-0.386498124525)*x_ref[0]+(0.299740420711)*x_ref[1]
-        ref[3,4,2,1]=(0.617683032062)*x_ref[0]+(-0.449587703061)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.791620170192)*x[0]+(1.03871460301)*x[1]+(-0.225035657687)*x[2]
-        arg[0,0,0,1]=(-0.464422319203)*x[0]+(0.769454931053)*x[1]+(-0.783260637771)*x[2]
-        arg[0,0,1,0]=(0.72655538215)*x[0]+(-1.65736312015)*x[1]+(1.08402505927)*x[2]
-        arg[0,0,1,1]=(-0.207576709573)*x[0]+(-0.55250594761)*x[1]+(-0.923702938288)*x[2]
-        arg[0,0,2,0]=(-0.701991085516)*x[0]+(-1.76863643107)*x[1]+(0.831382933104)*x[2]
-        arg[0,0,2,1]=(0.0640035527319)*x[0]+(0.425446342976)*x[1]+(1.64626766696)*x[2]
-        arg[0,1,0,0]=(1.01022963801)*x[0]+(-0.0215015059716)*x[1]+(0.849862425592)*x[2]
-        arg[0,1,0,1]=(-0.45776932943)*x[0]+(0.7621342151)*x[1]+(-1.40123018391)*x[2]
-        arg[0,1,1,0]=(0.737485054127)*x[0]+(-0.147513905858)*x[1]+(-0.616928595213)*x[2]
-        arg[0,1,1,1]=(-0.0608005391894)*x[0]+(-0.154978210573)*x[1]+(-1.40322011577)*x[2]
-        arg[0,1,2,0]=(1.59908177714)*x[0]+(-0.378738573932)*x[1]+(1.45285315247)*x[2]
-        arg[0,1,2,1]=(-0.622552157046)*x[0]+(1.19996417516)*x[1]+(0.728842900843)*x[2]
-        arg[0,2,0,0]=(-0.46942034691)*x[0]+(0.333309721372)*x[1]+(-0.280846553832)*x[2]
-        arg[0,2,0,1]=(1.22208788109)*x[0]+(0.369339594285)*x[1]+(1.31078425589)*x[2]
-        arg[0,2,1,0]=(0.0794165004114)*x[0]+(0.44665451846)*x[1]+(-0.814625708916)*x[2]
-        arg[0,2,1,1]=(0.594200807165)*x[0]+(-0.00616720333193)*x[1]+(0.382706175172)*x[2]
-        arg[0,2,2,0]=(0.0372230170459)*x[0]+(0.440339923291)*x[1]+(0.137641070028)*x[2]
-        arg[0,2,2,1]=(-1.29863078274)*x[0]+(0.283142455171)*x[1]+(0.0844540074659)*x[2]
-        arg[0,3,0,0]=(1.72811808036)*x[0]+(0.536456781522)*x[1]+(0.0266737704706)*x[2]
-        arg[0,3,0,1]=(0.148219555101)*x[0]+(-0.6887500275)*x[1]+(-0.405613136632)*x[2]
-        arg[0,3,1,0]=(0.708262537279)*x[0]+(1.16319635773)*x[1]+(-0.030808721674)*x[2]
-        arg[0,3,1,1]=(0.80834615863)*x[0]+(-0.176789000925)*x[1]+(-1.72576120963)*x[2]
-        arg[0,3,2,0]=(0.21128315299)*x[0]+(0.770037046126)*x[1]+(0.988028934422)*x[2]
-        arg[0,3,2,1]=(1.10522136317)*x[0]+(1.6319351743)*x[1]+(-0.784693713387)*x[2]
-        arg[0,4,0,0]=(0.121088121064)*x[0]+(-1.79718067791)*x[1]+(-0.907857173318)*x[2]
-        arg[0,4,0,1]=(-0.695887294217)*x[0]+(-1.24166787807)*x[1]+(-1.24968023856)*x[2]
-        arg[0,4,1,0]=(-0.202510797291)*x[0]+(0.628310156105)*x[1]+(0.605146447822)*x[2]
-        arg[0,4,1,1]=(0.149227458424)*x[0]+(-1.5650392775)*x[1]+(-0.763944892663)*x[2]
-        arg[0,4,2,0]=(-0.393218625872)*x[0]+(0.479145914948)*x[1]+(-0.313960447492)*x[2]
-        arg[0,4,2,1]=(-0.0191807443799)*x[0]+(0.592992659119)*x[1]+(-0.475633115484)*x[2]
-        arg[1,0,0,0]=(-0.964829354261)*x[0]+(0.453014802906)*x[1]+(-0.779502566938)*x[2]
-        arg[1,0,0,1]=(0.0151205739508)*x[0]+(-0.153706429594)*x[1]+(0.00866460475724)*x[2]
-        arg[1,0,1,0]=(0.92592276366)*x[0]+(0.530787400525)*x[1]+(-0.0577912606876)*x[2]
-        arg[1,0,1,1]=(0.948404467077)*x[0]+(-0.265905470751)*x[1]+(0.472349192005)*x[2]
-        arg[1,0,2,0]=(0.0176615383702)*x[0]+(0.679605821761)*x[1]+(-0.0333590911941)*x[2]
-        arg[1,0,2,1]=(-1.15594952629)*x[0]+(0.264868376508)*x[1]+(-0.883690535499)*x[2]
-        arg[1,1,0,0]=(-0.738712703994)*x[0]+(0.545839232808)*x[1]+(0.592474501134)*x[2]
-        arg[1,1,0,1]=(-1.3468960453)*x[0]+(-0.00848202443614)*x[1]+(-0.0124138286126)*x[2]
-        arg[1,1,1,0]=(0.900228409707)*x[0]+(-1.86848082357)*x[1]+(0.421539431142)*x[2]
-        arg[1,1,1,1]=(1.42754013963)*x[0]+(-0.861376440449)*x[1]+(0.0965520362291)*x[2]
-        arg[1,1,2,0]=(-0.35873674515)*x[0]+(0.0862592617941)*x[1]+(-0.536106207025)*x[2]
-        arg[1,1,2,1]=(0.90712910097)*x[0]+(0.974545253055)*x[1]+(0.570708510858)*x[2]
-        arg[1,2,0,0]=(1.19310775669)*x[0]+(0.309414331679)*x[1]+(-0.271298061586)*x[2]
-        arg[1,2,0,1]=(0.551778129545)*x[0]+(0.539028430134)*x[1]+(0.239406239262)*x[2]
-        arg[1,2,1,0]=(-0.810625054344)*x[0]+(-0.241072190233)*x[1]+(-1.58590369097)*x[2]
-        arg[1,2,1,1]=(0.529669075734)*x[0]+(-0.890365024163)*x[1]+(-1.69798509084)*x[2]
-        arg[1,2,2,0]=(0.0437087707448)*x[0]+(0.88372190198)*x[1]+(1.86547747806)*x[2]
-        arg[1,2,2,1]=(1.30739438898)*x[0]+(0.315850112101)*x[1]+(-0.262001133683)*x[2]
-        arg[1,3,0,0]=(-0.143426236837)*x[0]+(-1.1703384826)*x[1]+(0.50608348646)*x[2]
-        arg[1,3,0,1]=(-0.0444408776922)*x[0]+(1.26952782036)*x[1]+(1.67192602934)*x[2]
-        arg[1,3,1,0]=(0.672742824368)*x[0]+(-0.785246676537)*x[1]+(0.716130664056)*x[2]
-        arg[1,3,1,1]=(-0.295182508335)*x[0]+(-1.53658860897)*x[1]+(-1.87133995422)*x[2]
-        arg[1,3,2,0]=(-0.440859530081)*x[0]+(0.0730120015821)*x[1]+(-1.02465537353)*x[2]
-        arg[1,3,2,1]=(0.838320612003)*x[0]+(1.81233688454)*x[1]+(-1.0633876685)*x[2]
-        arg[1,4,0,0]=(0.52440453051)*x[0]+(-0.0182588999022)*x[1]+(1.05556310351)*x[2]
-        arg[1,4,0,1]=(0.766612727495)*x[0]+(1.58987590746)*x[1]+(-0.703801484569)*x[2]
-        arg[1,4,1,0]=(0.373439757535)*x[0]+(-0.0676963704305)*x[1]+(0.0948034094293)*x[2]
-        arg[1,4,1,1]=(-0.542283543375)*x[0]+(-0.454408605761)*x[1]+(-0.398904635316)*x[2]
-        arg[1,4,2,0]=(1.3374871143)*x[0]+(0.0067849394587)*x[1]+(-0.319452094882)*x[2]
-        arg[1,4,2,1]=(0.38530755393)*x[0]+(1.05356462429)*x[1]+(-0.302179447719)*x[2]
-        arg[2,0,0,0]=(-0.123109761583)*x[0]+(0.69223848143)*x[1]+(-1.36903487092)*x[2]
-        arg[2,0,0,1]=(0.121957328459)*x[0]+(0.102229685387)*x[1]+(0.962499974737)*x[2]
-        arg[2,0,1,0]=(0.478614188653)*x[0]+(-1.23058817023)*x[1]+(1.30950997478)*x[2]
-        arg[2,0,1,1]=(-0.529033562461)*x[0]+(0.563030509591)*x[1]+(-0.564939226654)*x[2]
-        arg[2,0,2,0]=(-0.377740282406)*x[0]+(1.20532110343)*x[1]+(1.55615174947)*x[2]
-        arg[2,0,2,1]=(0.539119710703)*x[0]+(1.91771865857)*x[1]+(0.0809882488048)*x[2]
-        arg[2,1,0,0]=(0.00548664737796)*x[0]+(-0.157716099068)*x[1]+(-1.40009044235)*x[2]
-        arg[2,1,0,1]=(0.0667557890666)*x[0]+(0.742484448131)*x[1]+(-0.325246111346)*x[2]
-        arg[2,1,1,0]=(-0.214965474071)*x[0]+(-0.215055151964)*x[1]+(1.15673960537)*x[2]
-        arg[2,1,1,1]=(0.605764831789)*x[0]+(-1.0432964832)*x[1]+(0.645482523161)*x[2]
-        arg[2,1,2,0]=(-1.13098364088)*x[0]+(-0.932044089041)*x[1]+(-0.308053828241)*x[2]
-        arg[2,1,2,1]=(0.481961305459)*x[0]+(-0.101277472029)*x[1]+(-0.17520207974)*x[2]
-        arg[2,2,0,0]=(0.579831852303)*x[0]+(0.538731990254)*x[1]+(-0.0897460374205)*x[2]
-        arg[2,2,0,1]=(-1.8763181434)*x[0]+(-0.132710928569)*x[1]+(1.03169751651)*x[2]
-        arg[2,2,1,0]=(0.56871511431)*x[0]+(0.075333481656)*x[1]+(1.10238818953)*x[2]
-        arg[2,2,1,1]=(1.49347755246)*x[0]+(-1.00500941047)*x[1]+(-0.181733196359)*x[2]
-        arg[2,2,2,0]=(0.532881509971)*x[0]+(-0.364333964659)*x[1]+(1.09633720883)*x[2]
-        arg[2,2,2,1]=(-0.518419048615)*x[0]+(-0.48091100593)*x[1]+(0.724628840153)*x[2]
-        arg[2,3,0,0]=(0.353475859331)*x[0]+(-0.0239879269825)*x[1]+(1.32068893718)*x[2]
-        arg[2,3,0,1]=(0.553999122102)*x[0]+(-0.128530869239)*x[1]+(0.134663336287)*x[2]
-        arg[2,3,1,0]=(-1.59775882569)*x[0]+(-1.07335424785)*x[1]+(1.39223587988)*x[2]
-        arg[2,3,1,1]=(-0.921252080095)*x[0]+(1.46226299067)*x[1]+(-1.13412499932)*x[2]
-        arg[2,3,2,0]=(0.417572910178)*x[0]+(0.0814889599489)*x[1]+(0.292159249719)*x[2]
-        arg[2,3,2,1]=(1.44620228921)*x[0]+(0.767854577367)*x[1]+(-0.0113709806383)*x[2]
-        arg[2,4,0,0]=(-0.156987001681)*x[0]+(-0.922524257833)*x[1]+(0.521128360838)*x[2]
-        arg[2,4,0,1]=(0.154198133354)*x[0]+(0.462020370175)*x[1]+(0.966768653665)*x[2]
-        arg[2,4,1,0]=(0.507836849242)*x[0]+(1.16701911244)*x[1]+(0.264543038211)*x[2]
-        arg[2,4,1,1]=(0.452059436879)*x[0]+(0.409662432778)*x[1]+(-0.403800872595)*x[2]
-        arg[2,4,2,0]=(0.521175521008)*x[0]+(-0.362551578816)*x[1]+(0.0922727331623)*x[2]
-        arg[2,4,2,1]=(-1.0990361823)*x[0]+(1.73655146851)*x[1]+(-0.867917402922)*x[2]
-        arg[3,0,0,0]=(-0.0527010882236)*x[0]+(-1.11528215488)*x[1]+(1.3141906393)*x[2]
-        arg[3,0,0,1]=(0.151284271917)*x[0]+(-0.0159077450668)*x[1]+(1.1798338931)*x[2]
-        arg[3,0,1,0]=(-1.7648963435)*x[0]+(0.229511437402)*x[1]+(0.924415900312)*x[2]
-        arg[3,0,1,1]=(-0.498271821094)*x[0]+(1.58363063019)*x[1]+(1.64871750388)*x[2]
-        arg[3,0,2,0]=(-1.11245170725)*x[0]+(1.27662612569)*x[1]+(0.145950372369)*x[2]
-        arg[3,0,2,1]=(-0.691643924238)*x[0]+(-0.178211874279)*x[1]+(-0.341071050366)*x[2]
-        arg[3,1,0,0]=(-0.929804889461)*x[0]+(0.199087067309)*x[1]+(1.00150168883)*x[2]
-        arg[3,1,0,1]=(-1.25152265093)*x[0]+(0.517076294911)*x[1]+(0.103798312362)*x[2]
-        arg[3,1,1,0]=(0.797316290623)*x[0]+(0.0239285379293)*x[1]+(-0.836519299418)*x[2]
-        arg[3,1,1,1]=(-0.470084592176)*x[0]+(0.844364701728)*x[1]+(-0.027373275093)*x[2]
-        arg[3,1,2,0]=(1.0340279373)*x[0]+(-0.0133951276315)*x[1]+(1.17710546194)*x[2]
-        arg[3,1,2,1]=(0.0325929541496)*x[0]+(1.13784867184)*x[1]+(-0.0529194266769)*x[2]
-        arg[3,2,0,0]=(1.92837561772)*x[0]+(-1.63633468831)*x[1]+(1.4212324281)*x[2]
-        arg[3,2,0,1]=(1.09556054408)*x[0]+(1.43286059545)*x[1]+(1.20005604593)*x[2]
-        arg[3,2,1,0]=(0.308887169169)*x[0]+(-0.149214224208)*x[1]+(-1.13559614877)*x[2]
-        arg[3,2,1,1]=(-0.0648352909004)*x[0]+(-0.5645470596)*x[1]+(-0.525131730514)*x[2]
-        arg[3,2,2,0]=(0.21826829974)*x[0]+(1.5950239996)*x[1]+(0.333592425438)*x[2]
-        arg[3,2,2,1]=(-1.25613956172)*x[0]+(-0.242338679844)*x[1]+(-0.958875577074)*x[2]
-        arg[3,3,0,0]=(1.65005362159)*x[0]+(-1.16713867165)*x[1]+(-0.282495293685)*x[2]
-        arg[3,3,0,1]=(1.04854406427)*x[0]+(0.876270949531)*x[1]+(0.291036304743)*x[2]
-        arg[3,3,1,0]=(-1.66619451175)*x[0]+(0.656275192484)*x[1]+(-1.27104499942)*x[2]
-        arg[3,3,1,1]=(1.55407146907)*x[0]+(-0.322950943159)*x[1]+(-0.287565403896)*x[2]
-        arg[3,3,2,0]=(-1.54760268583)*x[0]+(-1.45847761887)*x[1]+(1.13939567009)*x[2]
-        arg[3,3,2,1]=(1.24632351699)*x[0]+(0.0265500081594)*x[1]+(1.61925095159)*x[2]
-        arg[3,4,0,0]=(-0.0430889433549)*x[0]+(-1.46995559463)*x[1]+(-1.14915159823)*x[2]
-        arg[3,4,0,1]=(0.0392641403409)*x[0]+(0.0603053049639)*x[1]+(0.647321169934)*x[2]
-        arg[3,4,1,0]=(-0.156300985227)*x[0]+(0.79369911928)*x[1]+(-0.413124762507)*x[2]
-        arg[3,4,1,1]=(0.258402059015)*x[0]+(0.00227307988585)*x[1]+(0.70067141295)*x[2]
-        arg[3,4,2,0]=(-1.15131298872)*x[0]+(-0.627449043157)*x[1]+(-0.402268345861)*x[2]
-        arg[3,4,2,1]=(0.455934238179)*x[0]+(-0.951120759108)*x[1]+(-0.280459367131)*x[2]
-        ref[0,0,0,0]=(-0.791620170192)*x_ref[0]+(1.03871460301)*x_ref[1]+(-0.225035657687)*x_ref[2]
-        ref[0,0,0,1]=(-0.464422319203)*x_ref[0]+(0.769454931053)*x_ref[1]+(-0.783260637771)*x_ref[2]
-        ref[0,0,1,0]=(0.72655538215)*x_ref[0]+(-1.65736312015)*x_ref[1]+(1.08402505927)*x_ref[2]
-        ref[0,0,1,1]=(-0.207576709573)*x_ref[0]+(-0.55250594761)*x_ref[1]+(-0.923702938288)*x_ref[2]
-        ref[0,0,2,0]=(-0.701991085516)*x_ref[0]+(-1.76863643107)*x_ref[1]+(0.831382933104)*x_ref[2]
-        ref[0,0,2,1]=(0.0640035527319)*x_ref[0]+(0.425446342976)*x_ref[1]+(1.64626766696)*x_ref[2]
-        ref[0,1,0,0]=(1.01022963801)*x_ref[0]+(-0.0215015059716)*x_ref[1]+(0.849862425592)*x_ref[2]
-        ref[0,1,0,1]=(-0.45776932943)*x_ref[0]+(0.7621342151)*x_ref[1]+(-1.40123018391)*x_ref[2]
-        ref[0,1,1,0]=(0.737485054127)*x_ref[0]+(-0.147513905858)*x_ref[1]+(-0.616928595213)*x_ref[2]
-        ref[0,1,1,1]=(-0.0608005391894)*x_ref[0]+(-0.154978210573)*x_ref[1]+(-1.40322011577)*x_ref[2]
-        ref[0,1,2,0]=(1.59908177714)*x_ref[0]+(-0.378738573932)*x_ref[1]+(1.45285315247)*x_ref[2]
-        ref[0,1,2,1]=(-0.622552157046)*x_ref[0]+(1.19996417516)*x_ref[1]+(0.728842900843)*x_ref[2]
-        ref[0,2,0,0]=(-0.46942034691)*x_ref[0]+(0.333309721372)*x_ref[1]+(-0.280846553832)*x_ref[2]
-        ref[0,2,0,1]=(1.22208788109)*x_ref[0]+(0.369339594285)*x_ref[1]+(1.31078425589)*x_ref[2]
-        ref[0,2,1,0]=(0.0794165004114)*x_ref[0]+(0.44665451846)*x_ref[1]+(-0.814625708916)*x_ref[2]
-        ref[0,2,1,1]=(0.594200807165)*x_ref[0]+(-0.00616720333193)*x_ref[1]+(0.382706175172)*x_ref[2]
-        ref[0,2,2,0]=(0.0372230170459)*x_ref[0]+(0.440339923291)*x_ref[1]+(0.137641070028)*x_ref[2]
-        ref[0,2,2,1]=(-1.29863078274)*x_ref[0]+(0.283142455171)*x_ref[1]+(0.0844540074659)*x_ref[2]
-        ref[0,3,0,0]=(1.72811808036)*x_ref[0]+(0.536456781522)*x_ref[1]+(0.0266737704706)*x_ref[2]
-        ref[0,3,0,1]=(0.148219555101)*x_ref[0]+(-0.6887500275)*x_ref[1]+(-0.405613136632)*x_ref[2]
-        ref[0,3,1,0]=(0.708262537279)*x_ref[0]+(1.16319635773)*x_ref[1]+(-0.030808721674)*x_ref[2]
-        ref[0,3,1,1]=(0.80834615863)*x_ref[0]+(-0.176789000925)*x_ref[1]+(-1.72576120963)*x_ref[2]
-        ref[0,3,2,0]=(0.21128315299)*x_ref[0]+(0.770037046126)*x_ref[1]+(0.988028934422)*x_ref[2]
-        ref[0,3,2,1]=(1.10522136317)*x_ref[0]+(1.6319351743)*x_ref[1]+(-0.784693713387)*x_ref[2]
-        ref[0,4,0,0]=(0.121088121064)*x_ref[0]+(-1.79718067791)*x_ref[1]+(-0.907857173318)*x_ref[2]
-        ref[0,4,0,1]=(-0.695887294217)*x_ref[0]+(-1.24166787807)*x_ref[1]+(-1.24968023856)*x_ref[2]
-        ref[0,4,1,0]=(-0.202510797291)*x_ref[0]+(0.628310156105)*x_ref[1]+(0.605146447822)*x_ref[2]
-        ref[0,4,1,1]=(0.149227458424)*x_ref[0]+(-1.5650392775)*x_ref[1]+(-0.763944892663)*x_ref[2]
-        ref[0,4,2,0]=(-0.393218625872)*x_ref[0]+(0.479145914948)*x_ref[1]+(-0.313960447492)*x_ref[2]
-        ref[0,4,2,1]=(-0.0191807443799)*x_ref[0]+(0.592992659119)*x_ref[1]+(-0.475633115484)*x_ref[2]
-        ref[1,0,0,0]=(-0.964829354261)*x_ref[0]+(0.453014802906)*x_ref[1]+(-0.779502566938)*x_ref[2]
-        ref[1,0,0,1]=(0.0151205739508)*x_ref[0]+(-0.153706429594)*x_ref[1]+(0.00866460475724)*x_ref[2]
-        ref[1,0,1,0]=(0.92592276366)*x_ref[0]+(0.530787400525)*x_ref[1]+(-0.0577912606876)*x_ref[2]
-        ref[1,0,1,1]=(0.948404467077)*x_ref[0]+(-0.265905470751)*x_ref[1]+(0.472349192005)*x_ref[2]
-        ref[1,0,2,0]=(0.0176615383702)*x_ref[0]+(0.679605821761)*x_ref[1]+(-0.0333590911941)*x_ref[2]
-        ref[1,0,2,1]=(-1.15594952629)*x_ref[0]+(0.264868376508)*x_ref[1]+(-0.883690535499)*x_ref[2]
-        ref[1,1,0,0]=(-0.738712703994)*x_ref[0]+(0.545839232808)*x_ref[1]+(0.592474501134)*x_ref[2]
-        ref[1,1,0,1]=(-1.3468960453)*x_ref[0]+(-0.00848202443614)*x_ref[1]+(-0.0124138286126)*x_ref[2]
-        ref[1,1,1,0]=(0.900228409707)*x_ref[0]+(-1.86848082357)*x_ref[1]+(0.421539431142)*x_ref[2]
-        ref[1,1,1,1]=(1.42754013963)*x_ref[0]+(-0.861376440449)*x_ref[1]+(0.0965520362291)*x_ref[2]
-        ref[1,1,2,0]=(-0.35873674515)*x_ref[0]+(0.0862592617941)*x_ref[1]+(-0.536106207025)*x_ref[2]
-        ref[1,1,2,1]=(0.90712910097)*x_ref[0]+(0.974545253055)*x_ref[1]+(0.570708510858)*x_ref[2]
-        ref[1,2,0,0]=(1.19310775669)*x_ref[0]+(0.309414331679)*x_ref[1]+(-0.271298061586)*x_ref[2]
-        ref[1,2,0,1]=(0.551778129545)*x_ref[0]+(0.539028430134)*x_ref[1]+(0.239406239262)*x_ref[2]
-        ref[1,2,1,0]=(-0.810625054344)*x_ref[0]+(-0.241072190233)*x_ref[1]+(-1.58590369097)*x_ref[2]
-        ref[1,2,1,1]=(0.529669075734)*x_ref[0]+(-0.890365024163)*x_ref[1]+(-1.69798509084)*x_ref[2]
-        ref[1,2,2,0]=(0.0437087707448)*x_ref[0]+(0.88372190198)*x_ref[1]+(1.86547747806)*x_ref[2]
-        ref[1,2,2,1]=(1.30739438898)*x_ref[0]+(0.315850112101)*x_ref[1]+(-0.262001133683)*x_ref[2]
-        ref[1,3,0,0]=(-0.143426236837)*x_ref[0]+(-1.1703384826)*x_ref[1]+(0.50608348646)*x_ref[2]
-        ref[1,3,0,1]=(-0.0444408776922)*x_ref[0]+(1.26952782036)*x_ref[1]+(1.67192602934)*x_ref[2]
-        ref[1,3,1,0]=(0.672742824368)*x_ref[0]+(-0.785246676537)*x_ref[1]+(0.716130664056)*x_ref[2]
-        ref[1,3,1,1]=(-0.295182508335)*x_ref[0]+(-1.53658860897)*x_ref[1]+(-1.87133995422)*x_ref[2]
-        ref[1,3,2,0]=(-0.440859530081)*x_ref[0]+(0.0730120015821)*x_ref[1]+(-1.02465537353)*x_ref[2]
-        ref[1,3,2,1]=(0.838320612003)*x_ref[0]+(1.81233688454)*x_ref[1]+(-1.0633876685)*x_ref[2]
-        ref[1,4,0,0]=(0.52440453051)*x_ref[0]+(-0.0182588999022)*x_ref[1]+(1.05556310351)*x_ref[2]
-        ref[1,4,0,1]=(0.766612727495)*x_ref[0]+(1.58987590746)*x_ref[1]+(-0.703801484569)*x_ref[2]
-        ref[1,4,1,0]=(0.373439757535)*x_ref[0]+(-0.0676963704305)*x_ref[1]+(0.0948034094293)*x_ref[2]
-        ref[1,4,1,1]=(-0.542283543375)*x_ref[0]+(-0.454408605761)*x_ref[1]+(-0.398904635316)*x_ref[2]
-        ref[1,4,2,0]=(1.3374871143)*x_ref[0]+(0.0067849394587)*x_ref[1]+(-0.319452094882)*x_ref[2]
-        ref[1,4,2,1]=(0.38530755393)*x_ref[0]+(1.05356462429)*x_ref[1]+(-0.302179447719)*x_ref[2]
-        ref[2,0,0,0]=(-0.123109761583)*x_ref[0]+(0.69223848143)*x_ref[1]+(-1.36903487092)*x_ref[2]
-        ref[2,0,0,1]=(0.121957328459)*x_ref[0]+(0.102229685387)*x_ref[1]+(0.962499974737)*x_ref[2]
-        ref[2,0,1,0]=(0.478614188653)*x_ref[0]+(-1.23058817023)*x_ref[1]+(1.30950997478)*x_ref[2]
-        ref[2,0,1,1]=(-0.529033562461)*x_ref[0]+(0.563030509591)*x_ref[1]+(-0.564939226654)*x_ref[2]
-        ref[2,0,2,0]=(-0.377740282406)*x_ref[0]+(1.20532110343)*x_ref[1]+(1.55615174947)*x_ref[2]
-        ref[2,0,2,1]=(0.539119710703)*x_ref[0]+(1.91771865857)*x_ref[1]+(0.0809882488048)*x_ref[2]
-        ref[2,1,0,0]=(0.00548664737796)*x_ref[0]+(-0.157716099068)*x_ref[1]+(-1.40009044235)*x_ref[2]
-        ref[2,1,0,1]=(0.0667557890666)*x_ref[0]+(0.742484448131)*x_ref[1]+(-0.325246111346)*x_ref[2]
-        ref[2,1,1,0]=(-0.214965474071)*x_ref[0]+(-0.215055151964)*x_ref[1]+(1.15673960537)*x_ref[2]
-        ref[2,1,1,1]=(0.605764831789)*x_ref[0]+(-1.0432964832)*x_ref[1]+(0.645482523161)*x_ref[2]
-        ref[2,1,2,0]=(-1.13098364088)*x_ref[0]+(-0.932044089041)*x_ref[1]+(-0.308053828241)*x_ref[2]
-        ref[2,1,2,1]=(0.481961305459)*x_ref[0]+(-0.101277472029)*x_ref[1]+(-0.17520207974)*x_ref[2]
-        ref[2,2,0,0]=(0.579831852303)*x_ref[0]+(0.538731990254)*x_ref[1]+(-0.0897460374205)*x_ref[2]
-        ref[2,2,0,1]=(-1.8763181434)*x_ref[0]+(-0.132710928569)*x_ref[1]+(1.03169751651)*x_ref[2]
-        ref[2,2,1,0]=(0.56871511431)*x_ref[0]+(0.075333481656)*x_ref[1]+(1.10238818953)*x_ref[2]
-        ref[2,2,1,1]=(1.49347755246)*x_ref[0]+(-1.00500941047)*x_ref[1]+(-0.181733196359)*x_ref[2]
-        ref[2,2,2,0]=(0.532881509971)*x_ref[0]+(-0.364333964659)*x_ref[1]+(1.09633720883)*x_ref[2]
-        ref[2,2,2,1]=(-0.518419048615)*x_ref[0]+(-0.48091100593)*x_ref[1]+(0.724628840153)*x_ref[2]
-        ref[2,3,0,0]=(0.353475859331)*x_ref[0]+(-0.0239879269825)*x_ref[1]+(1.32068893718)*x_ref[2]
-        ref[2,3,0,1]=(0.553999122102)*x_ref[0]+(-0.128530869239)*x_ref[1]+(0.134663336287)*x_ref[2]
-        ref[2,3,1,0]=(-1.59775882569)*x_ref[0]+(-1.07335424785)*x_ref[1]+(1.39223587988)*x_ref[2]
-        ref[2,3,1,1]=(-0.921252080095)*x_ref[0]+(1.46226299067)*x_ref[1]+(-1.13412499932)*x_ref[2]
-        ref[2,3,2,0]=(0.417572910178)*x_ref[0]+(0.0814889599489)*x_ref[1]+(0.292159249719)*x_ref[2]
-        ref[2,3,2,1]=(1.44620228921)*x_ref[0]+(0.767854577367)*x_ref[1]+(-0.0113709806383)*x_ref[2]
-        ref[2,4,0,0]=(-0.156987001681)*x_ref[0]+(-0.922524257833)*x_ref[1]+(0.521128360838)*x_ref[2]
-        ref[2,4,0,1]=(0.154198133354)*x_ref[0]+(0.462020370175)*x_ref[1]+(0.966768653665)*x_ref[2]
-        ref[2,4,1,0]=(0.507836849242)*x_ref[0]+(1.16701911244)*x_ref[1]+(0.264543038211)*x_ref[2]
-        ref[2,4,1,1]=(0.452059436879)*x_ref[0]+(0.409662432778)*x_ref[1]+(-0.403800872595)*x_ref[2]
-        ref[2,4,2,0]=(0.521175521008)*x_ref[0]+(-0.362551578816)*x_ref[1]+(0.0922727331623)*x_ref[2]
-        ref[2,4,2,1]=(-1.0990361823)*x_ref[0]+(1.73655146851)*x_ref[1]+(-0.867917402922)*x_ref[2]
-        ref[3,0,0,0]=(-0.0527010882236)*x_ref[0]+(-1.11528215488)*x_ref[1]+(1.3141906393)*x_ref[2]
-        ref[3,0,0,1]=(0.151284271917)*x_ref[0]+(-0.0159077450668)*x_ref[1]+(1.1798338931)*x_ref[2]
-        ref[3,0,1,0]=(-1.7648963435)*x_ref[0]+(0.229511437402)*x_ref[1]+(0.924415900312)*x_ref[2]
-        ref[3,0,1,1]=(-0.498271821094)*x_ref[0]+(1.58363063019)*x_ref[1]+(1.64871750388)*x_ref[2]
-        ref[3,0,2,0]=(-1.11245170725)*x_ref[0]+(1.27662612569)*x_ref[1]+(0.145950372369)*x_ref[2]
-        ref[3,0,2,1]=(-0.691643924238)*x_ref[0]+(-0.178211874279)*x_ref[1]+(-0.341071050366)*x_ref[2]
-        ref[3,1,0,0]=(-0.929804889461)*x_ref[0]+(0.199087067309)*x_ref[1]+(1.00150168883)*x_ref[2]
-        ref[3,1,0,1]=(-1.25152265093)*x_ref[0]+(0.517076294911)*x_ref[1]+(0.103798312362)*x_ref[2]
-        ref[3,1,1,0]=(0.797316290623)*x_ref[0]+(0.0239285379293)*x_ref[1]+(-0.836519299418)*x_ref[2]
-        ref[3,1,1,1]=(-0.470084592176)*x_ref[0]+(0.844364701728)*x_ref[1]+(-0.027373275093)*x_ref[2]
-        ref[3,1,2,0]=(1.0340279373)*x_ref[0]+(-0.0133951276315)*x_ref[1]+(1.17710546194)*x_ref[2]
-        ref[3,1,2,1]=(0.0325929541496)*x_ref[0]+(1.13784867184)*x_ref[1]+(-0.0529194266769)*x_ref[2]
-        ref[3,2,0,0]=(1.92837561772)*x_ref[0]+(-1.63633468831)*x_ref[1]+(1.4212324281)*x_ref[2]
-        ref[3,2,0,1]=(1.09556054408)*x_ref[0]+(1.43286059545)*x_ref[1]+(1.20005604593)*x_ref[2]
-        ref[3,2,1,0]=(0.308887169169)*x_ref[0]+(-0.149214224208)*x_ref[1]+(-1.13559614877)*x_ref[2]
-        ref[3,2,1,1]=(-0.0648352909004)*x_ref[0]+(-0.5645470596)*x_ref[1]+(-0.525131730514)*x_ref[2]
-        ref[3,2,2,0]=(0.21826829974)*x_ref[0]+(1.5950239996)*x_ref[1]+(0.333592425438)*x_ref[2]
-        ref[3,2,2,1]=(-1.25613956172)*x_ref[0]+(-0.242338679844)*x_ref[1]+(-0.958875577074)*x_ref[2]
-        ref[3,3,0,0]=(1.65005362159)*x_ref[0]+(-1.16713867165)*x_ref[1]+(-0.282495293685)*x_ref[2]
-        ref[3,3,0,1]=(1.04854406427)*x_ref[0]+(0.876270949531)*x_ref[1]+(0.291036304743)*x_ref[2]
-        ref[3,3,1,0]=(-1.66619451175)*x_ref[0]+(0.656275192484)*x_ref[1]+(-1.27104499942)*x_ref[2]
-        ref[3,3,1,1]=(1.55407146907)*x_ref[0]+(-0.322950943159)*x_ref[1]+(-0.287565403896)*x_ref[2]
-        ref[3,3,2,0]=(-1.54760268583)*x_ref[0]+(-1.45847761887)*x_ref[1]+(1.13939567009)*x_ref[2]
-        ref[3,3,2,1]=(1.24632351699)*x_ref[0]+(0.0265500081594)*x_ref[1]+(1.61925095159)*x_ref[2]
-        ref[3,4,0,0]=(-0.0430889433549)*x_ref[0]+(-1.46995559463)*x_ref[1]+(-1.14915159823)*x_ref[2]
-        ref[3,4,0,1]=(0.0392641403409)*x_ref[0]+(0.0603053049639)*x_ref[1]+(0.647321169934)*x_ref[2]
-        ref[3,4,1,0]=(-0.156300985227)*x_ref[0]+(0.79369911928)*x_ref[1]+(-0.413124762507)*x_ref[2]
-        ref[3,4,1,1]=(0.258402059015)*x_ref[0]+(0.00227307988585)*x_ref[1]+(0.70067141295)*x_ref[2]
-        ref[3,4,2,0]=(-1.15131298872)*x_ref[0]+(-0.627449043157)*x_ref[1]+(-0.402268345861)*x_ref[2]
-        ref[3,4,2,1]=(0.455934238179)*x_ref[0]+(-0.951120759108)*x_ref[1]+(-0.280459367131)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.203238386406)*x[0]**o+(0.734542238717)*x[0]+(-0.627248060056)*x[1]**o+(0.347224669854)*x[1]
-        ref=(0.203238386406)*x_ref[0]**o+(0.734542238717)*x_ref[0]+(-0.627248060056)*x_ref[1]**o+(0.347224669854)*x_ref[1]
-      else:
-        arg=(-0.387501489724)*x[0]**o+(0.752554332333)*x[0]+(-0.0831588271355)*x[1]**o+(0.615191870812)*x[1]+(-0.264702923622)*x[2]**o+(0.404594629993)*x[2]
-        ref=(-0.387501489724)*x_ref[0]**o+(0.752554332333)*x_ref[0]+(-0.0831588271355)*x_ref[1]**o+(0.615191870812)*x_ref[1]+(-0.264702923622)*x_ref[2]**o+(0.404594629993)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.938444792136)*x[0]**o+(-0.809407040724)*x[0]+(-0.963148615762)*x[1]**o+(-0.257000244129)*x[1]
-        arg[1]=(-0.791280640039)*x[0]**o+(0.293858623095)*x[0]+(0.964942589784)*x[1]**o+(0.522071353081)*x[1]
-        ref[0]=(0.938444792136)*x_ref[0]**o+(-0.809407040724)*x_ref[0]+(-0.963148615762)*x_ref[1]**o+(-0.257000244129)*x_ref[1]
-        ref[1]=(-0.791280640039)*x_ref[0]**o+(0.293858623095)*x_ref[0]+(0.964942589784)*x_ref[1]**o+(0.522071353081)*x_ref[1]
-      else:
-        arg[0]=(0.566110580666)*x[0]**o+(-0.89723913213)*x[0]+(-0.54781629706)*x[1]**o+(-0.0405507445628)*x[1]+(0.435477036501)*x[2]**o+(-0.296404435183)*x[2]
-        arg[1]=(-0.436126359475)*x[0]**o+(0.863706244241)*x[0]+(-0.149818409243)*x[1]**o+(-0.654801920098)*x[1]+(-0.281005092809)*x[2]**o+(-0.0257179420057)*x[2]
-        ref[0]=(0.566110580666)*x_ref[0]**o+(-0.89723913213)*x_ref[0]+(-0.54781629706)*x_ref[1]**o+(-0.0405507445628)*x_ref[1]+(0.435477036501)*x_ref[2]**o+(-0.296404435183)*x_ref[2]
-        ref[1]=(-0.436126359475)*x_ref[0]**o+(0.863706244241)*x_ref[0]+(-0.149818409243)*x_ref[1]**o+(-0.654801920098)*x_ref[1]+(-0.281005092809)*x_ref[2]**o+(-0.0257179420057)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0615713819144)*x[0]**o+(0.325133297443)*x[0]+(-0.529769594257)*x[1]**o+(-0.206126939263)*x[1]
-        arg[0,1]=(0.090956391947)*x[0]**o+(0.105841035331)*x[0]+(-0.537033610998)*x[1]**o+(0.429033781495)*x[1]
-        arg[0,2]=(-0.568216263139)*x[0]**o+(0.698057796806)*x[0]+(-0.0981614063428)*x[1]**o+(-0.952212332523)*x[1]
-        arg[0,3]=(0.128505813477)*x[0]**o+(0.206828305852)*x[0]+(0.938851873532)*x[1]**o+(-0.339234589281)*x[1]
-        arg[0,4]=(0.581805477855)*x[0]**o+(-0.621122347153)*x[0]+(-0.601029625565)*x[1]**o+(0.243084366725)*x[1]
-        arg[1,0]=(-0.342411991491)*x[0]**o+(0.642434320731)*x[0]+(-0.452657094515)*x[1]**o+(-0.899779109444)*x[1]
-        arg[1,1]=(-0.423230603077)*x[0]**o+(0.739600521332)*x[0]+(0.916226480419)*x[1]**o+(0.755264173162)*x[1]
-        arg[1,2]=(0.381864221314)*x[0]**o+(0.806402187902)*x[0]+(0.410055116458)*x[1]**o+(-0.264405213472)*x[1]
-        arg[1,3]=(0.293401427429)*x[0]**o+(-0.439209675154)*x[0]+(0.299588226145)*x[1]**o+(-0.289652201976)*x[1]
-        arg[1,4]=(0.157626502865)*x[0]**o+(0.32264788209)*x[0]+(0.284522039757)*x[1]**o+(-0.460413671191)*x[1]
-        arg[2,0]=(0.486148207)*x[0]**o+(0.0366950072658)*x[0]+(0.315299830901)*x[1]**o+(-0.320405042262)*x[1]
-        arg[2,1]=(0.207440897542)*x[0]**o+(-0.604659890692)*x[0]+(-0.64841431916)*x[1]**o+(0.0881921209641)*x[1]
-        arg[2,2]=(-0.61376840347)*x[0]**o+(0.421837679185)*x[0]+(-0.0445850531916)*x[1]**o+(0.771892018903)*x[1]
-        arg[2,3]=(0.632443182263)*x[0]**o+(-0.965297013012)*x[0]+(-0.029677959681)*x[1]**o+(0.598431910551)*x[1]
-        arg[2,4]=(-0.457656411094)*x[0]**o+(0.122435925199)*x[0]+(0.772690251937)*x[1]**o+(0.954829922926)*x[1]
-        arg[3,0]=(0.929112925461)*x[0]**o+(-0.35689901655)*x[0]+(-0.139192866782)*x[1]**o+(-0.677883436952)*x[1]
-        arg[3,1]=(-0.410318721103)*x[0]**o+(0.370830312699)*x[0]+(0.429011619434)*x[1]**o+(0.81780420854)*x[1]
-        arg[3,2]=(0.312456682985)*x[0]**o+(0.526447664999)*x[0]+(0.763610570932)*x[1]**o+(-0.631887901017)*x[1]
-        arg[3,3]=(0.749121567955)*x[0]**o+(0.168525340464)*x[0]+(-0.838409619895)*x[1]**o+(0.912745137098)*x[1]
-        arg[3,4]=(-0.665336604643)*x[0]**o+(0.638293226479)*x[0]+(0.515957084712)*x[1]**o+(-0.261426720977)*x[1]
-        ref[0,0]=(0.0615713819144)*x_ref[0]**o+(0.325133297443)*x_ref[0]+(-0.529769594257)*x_ref[1]**o+(-0.206126939263)*x_ref[1]
-        ref[0,1]=(0.090956391947)*x_ref[0]**o+(0.105841035331)*x_ref[0]+(-0.537033610998)*x_ref[1]**o+(0.429033781495)*x_ref[1]
-        ref[0,2]=(-0.568216263139)*x_ref[0]**o+(0.698057796806)*x_ref[0]+(-0.0981614063428)*x_ref[1]**o+(-0.952212332523)*x_ref[1]
-        ref[0,3]=(0.128505813477)*x_ref[0]**o+(0.206828305852)*x_ref[0]+(0.938851873532)*x_ref[1]**o+(-0.339234589281)*x_ref[1]
-        ref[0,4]=(0.581805477855)*x_ref[0]**o+(-0.621122347153)*x_ref[0]+(-0.601029625565)*x_ref[1]**o+(0.243084366725)*x_ref[1]
-        ref[1,0]=(-0.342411991491)*x_ref[0]**o+(0.642434320731)*x_ref[0]+(-0.452657094515)*x_ref[1]**o+(-0.899779109444)*x_ref[1]
-        ref[1,1]=(-0.423230603077)*x_ref[0]**o+(0.739600521332)*x_ref[0]+(0.916226480419)*x_ref[1]**o+(0.755264173162)*x_ref[1]
-        ref[1,2]=(0.381864221314)*x_ref[0]**o+(0.806402187902)*x_ref[0]+(0.410055116458)*x_ref[1]**o+(-0.264405213472)*x_ref[1]
-        ref[1,3]=(0.293401427429)*x_ref[0]**o+(-0.439209675154)*x_ref[0]+(0.299588226145)*x_ref[1]**o+(-0.289652201976)*x_ref[1]
-        ref[1,4]=(0.157626502865)*x_ref[0]**o+(0.32264788209)*x_ref[0]+(0.284522039757)*x_ref[1]**o+(-0.460413671191)*x_ref[1]
-        ref[2,0]=(0.486148207)*x_ref[0]**o+(0.0366950072658)*x_ref[0]+(0.315299830901)*x_ref[1]**o+(-0.320405042262)*x_ref[1]
-        ref[2,1]=(0.207440897542)*x_ref[0]**o+(-0.604659890692)*x_ref[0]+(-0.64841431916)*x_ref[1]**o+(0.0881921209641)*x_ref[1]
-        ref[2,2]=(-0.61376840347)*x_ref[0]**o+(0.421837679185)*x_ref[0]+(-0.0445850531916)*x_ref[1]**o+(0.771892018903)*x_ref[1]
-        ref[2,3]=(0.632443182263)*x_ref[0]**o+(-0.965297013012)*x_ref[0]+(-0.029677959681)*x_ref[1]**o+(0.598431910551)*x_ref[1]
-        ref[2,4]=(-0.457656411094)*x_ref[0]**o+(0.122435925199)*x_ref[0]+(0.772690251937)*x_ref[1]**o+(0.954829922926)*x_ref[1]
-        ref[3,0]=(0.929112925461)*x_ref[0]**o+(-0.35689901655)*x_ref[0]+(-0.139192866782)*x_ref[1]**o+(-0.677883436952)*x_ref[1]
-        ref[3,1]=(-0.410318721103)*x_ref[0]**o+(0.370830312699)*x_ref[0]+(0.429011619434)*x_ref[1]**o+(0.81780420854)*x_ref[1]
-        ref[3,2]=(0.312456682985)*x_ref[0]**o+(0.526447664999)*x_ref[0]+(0.763610570932)*x_ref[1]**o+(-0.631887901017)*x_ref[1]
-        ref[3,3]=(0.749121567955)*x_ref[0]**o+(0.168525340464)*x_ref[0]+(-0.838409619895)*x_ref[1]**o+(0.912745137098)*x_ref[1]
-        ref[3,4]=(-0.665336604643)*x_ref[0]**o+(0.638293226479)*x_ref[0]+(0.515957084712)*x_ref[1]**o+(-0.261426720977)*x_ref[1]
-      else:
-        arg[0,0]=(-0.330165086386)*x[0]**o+(0.60381119065)*x[0]+(0.981018763011)*x[1]**o+(0.0487965999608)*x[1]+(-0.389835388349)*x[2]**o+(0.111199857376)*x[2]
-        arg[0,1]=(0.518239033178)*x[0]**o+(0.60358784684)*x[0]+(-0.476990159655)*x[1]**o+(-0.93871565843)*x[1]+(-0.869845295741)*x[2]**o+(0.391409745802)*x[2]
-        arg[0,2]=(0.0927396115951)*x[0]**o+(0.546122822928)*x[0]+(-0.557424056733)*x[1]**o+(0.0623374966436)*x[1]+(-0.414595153536)*x[2]**o+(-0.196069073366)*x[2]
-        arg[0,3]=(-0.678432580882)*x[0]**o+(0.281850265141)*x[0]+(-0.323978960602)*x[1]**o+(0.655558769921)*x[1]+(-0.295747032089)*x[2]**o+(-0.152719838982)*x[2]
-        arg[0,4]=(-0.904177669203)*x[0]**o+(0.750395234205)*x[0]+(0.267431783461)*x[1]**o+(-0.781406235306)*x[1]+(0.856906655757)*x[2]**o+(-0.875554940224)*x[2]
-        arg[1,0]=(-0.243144846569)*x[0]**o+(0.970584922467)*x[0]+(-0.977250652473)*x[1]**o+(0.0239563255869)*x[1]+(-0.769423602851)*x[2]**o+(-0.433896361294)*x[2]
-        arg[1,1]=(0.31104031046)*x[0]**o+(0.899859709831)*x[0]+(0.692351561919)*x[1]**o+(-0.0838870550002)*x[1]+(-0.276105616798)*x[2]**o+(0.115501348248)*x[2]
-        arg[1,2]=(0.56702114595)*x[0]**o+(0.00240284646131)*x[0]+(-0.676314888884)*x[1]**o+(-0.678204346328)*x[1]+(0.472697088984)*x[2]**o+(-0.493949191712)*x[2]
-        arg[1,3]=(-0.242548554067)*x[0]**o+(0.980927507053)*x[0]+(-0.955706390436)*x[1]**o+(0.347031550126)*x[1]+(0.234352268238)*x[2]**o+(0.321126345333)*x[2]
-        arg[1,4]=(-0.390890566228)*x[0]**o+(-0.958497753144)*x[0]+(0.316397716043)*x[1]**o+(0.952289821769)*x[1]+(-0.027182029514)*x[2]**o+(-0.454422377872)*x[2]
-        arg[2,0]=(0.295865166318)*x[0]**o+(-0.301129718468)*x[0]+(-0.748135755269)*x[1]**o+(-0.762413814085)*x[1]+(0.572270067591)*x[2]**o+(-0.393847032684)*x[2]
-        arg[2,1]=(0.20229063622)*x[0]**o+(-0.768444028163)*x[0]+(0.378669775381)*x[1]**o+(-0.703384410944)*x[1]+(0.355653859396)*x[2]**o+(-0.228168949639)*x[2]
-        arg[2,2]=(-0.31725134742)*x[0]**o+(0.525802867508)*x[0]+(0.13375126758)*x[1]**o+(-0.673551491186)*x[1]+(0.498905883728)*x[2]**o+(-0.102794461221)*x[2]
-        arg[2,3]=(-0.396813838168)*x[0]**o+(0.0892605807843)*x[0]+(0.244133298111)*x[1]**o+(0.310900636168)*x[1]+(-0.256807063422)*x[2]**o+(0.565370697688)*x[2]
-        arg[2,4]=(0.42011835881)*x[0]**o+(0.439847594375)*x[0]+(0.0731897272006)*x[1]**o+(-0.373911054753)*x[1]+(-0.50313315963)*x[2]**o+(0.356362677601)*x[2]
-        arg[3,0]=(-0.444672845607)*x[0]**o+(-0.978424347535)*x[0]+(0.421699748442)*x[1]**o+(-0.0111798084161)*x[1]+(0.206042685881)*x[2]**o+(0.990523831215)*x[2]
-        arg[3,1]=(0.942429627068)*x[0]**o+(-0.769989484282)*x[0]+(-0.879916738075)*x[1]**o+(-0.746448112871)*x[1]+(0.280824650861)*x[2]**o+(0.0632084823022)*x[2]
-        arg[3,2]=(0.281070481177)*x[0]**o+(0.628020001876)*x[0]+(0.347767303962)*x[1]**o+(-0.276761252142)*x[1]+(0.950345260734)*x[2]**o+(-0.00148186335195)*x[2]
-        arg[3,3]=(-0.37590210465)*x[0]**o+(0.034147350068)*x[0]+(0.245173418336)*x[1]**o+(0.0564051241759)*x[1]+(-0.157928106127)*x[2]**o+(-0.611677441847)*x[2]
-        arg[3,4]=(-0.279066532276)*x[0]**o+(0.316033119063)*x[0]+(0.655948999472)*x[1]**o+(-0.520504180943)*x[1]+(0.531738158819)*x[2]**o+(0.899490827443)*x[2]
-        ref[0,0]=(-0.330165086386)*x_ref[0]**o+(0.60381119065)*x_ref[0]+(0.981018763011)*x_ref[1]**o+(0.0487965999608)*x_ref[1]+(-0.389835388349)*x_ref[2]**o+(0.111199857376)*x_ref[2]
-        ref[0,1]=(0.518239033178)*x_ref[0]**o+(0.60358784684)*x_ref[0]+(-0.476990159655)*x_ref[1]**o+(-0.93871565843)*x_ref[1]+(-0.869845295741)*x_ref[2]**o+(0.391409745802)*x_ref[2]
-        ref[0,2]=(0.0927396115951)*x_ref[0]**o+(0.546122822928)*x_ref[0]+(-0.557424056733)*x_ref[1]**o+(0.0623374966436)*x_ref[1]+(-0.414595153536)*x_ref[2]**o+(-0.196069073366)*x_ref[2]
-        ref[0,3]=(-0.678432580882)*x_ref[0]**o+(0.281850265141)*x_ref[0]+(-0.323978960602)*x_ref[1]**o+(0.655558769921)*x_ref[1]+(-0.295747032089)*x_ref[2]**o+(-0.152719838982)*x_ref[2]
-        ref[0,4]=(-0.904177669203)*x_ref[0]**o+(0.750395234205)*x_ref[0]+(0.267431783461)*x_ref[1]**o+(-0.781406235306)*x_ref[1]+(0.856906655757)*x_ref[2]**o+(-0.875554940224)*x_ref[2]
-        ref[1,0]=(-0.243144846569)*x_ref[0]**o+(0.970584922467)*x_ref[0]+(-0.977250652473)*x_ref[1]**o+(0.0239563255869)*x_ref[1]+(-0.769423602851)*x_ref[2]**o+(-0.433896361294)*x_ref[2]
-        ref[1,1]=(0.31104031046)*x_ref[0]**o+(0.899859709831)*x_ref[0]+(0.692351561919)*x_ref[1]**o+(-0.0838870550002)*x_ref[1]+(-0.276105616798)*x_ref[2]**o+(0.115501348248)*x_ref[2]
-        ref[1,2]=(0.56702114595)*x_ref[0]**o+(0.00240284646131)*x_ref[0]+(-0.676314888884)*x_ref[1]**o+(-0.678204346328)*x_ref[1]+(0.472697088984)*x_ref[2]**o+(-0.493949191712)*x_ref[2]
-        ref[1,3]=(-0.242548554067)*x_ref[0]**o+(0.980927507053)*x_ref[0]+(-0.955706390436)*x_ref[1]**o+(0.347031550126)*x_ref[1]+(0.234352268238)*x_ref[2]**o+(0.321126345333)*x_ref[2]
-        ref[1,4]=(-0.390890566228)*x_ref[0]**o+(-0.958497753144)*x_ref[0]+(0.316397716043)*x_ref[1]**o+(0.952289821769)*x_ref[1]+(-0.027182029514)*x_ref[2]**o+(-0.454422377872)*x_ref[2]
-        ref[2,0]=(0.295865166318)*x_ref[0]**o+(-0.301129718468)*x_ref[0]+(-0.748135755269)*x_ref[1]**o+(-0.762413814085)*x_ref[1]+(0.572270067591)*x_ref[2]**o+(-0.393847032684)*x_ref[2]
-        ref[2,1]=(0.20229063622)*x_ref[0]**o+(-0.768444028163)*x_ref[0]+(0.378669775381)*x_ref[1]**o+(-0.703384410944)*x_ref[1]+(0.355653859396)*x_ref[2]**o+(-0.228168949639)*x_ref[2]
-        ref[2,2]=(-0.31725134742)*x_ref[0]**o+(0.525802867508)*x_ref[0]+(0.13375126758)*x_ref[1]**o+(-0.673551491186)*x_ref[1]+(0.498905883728)*x_ref[2]**o+(-0.102794461221)*x_ref[2]
-        ref[2,3]=(-0.396813838168)*x_ref[0]**o+(0.0892605807843)*x_ref[0]+(0.244133298111)*x_ref[1]**o+(0.310900636168)*x_ref[1]+(-0.256807063422)*x_ref[2]**o+(0.565370697688)*x_ref[2]
-        ref[2,4]=(0.42011835881)*x_ref[0]**o+(0.439847594375)*x_ref[0]+(0.0731897272006)*x_ref[1]**o+(-0.373911054753)*x_ref[1]+(-0.50313315963)*x_ref[2]**o+(0.356362677601)*x_ref[2]
-        ref[3,0]=(-0.444672845607)*x_ref[0]**o+(-0.978424347535)*x_ref[0]+(0.421699748442)*x_ref[1]**o+(-0.0111798084161)*x_ref[1]+(0.206042685881)*x_ref[2]**o+(0.990523831215)*x_ref[2]
-        ref[3,1]=(0.942429627068)*x_ref[0]**o+(-0.769989484282)*x_ref[0]+(-0.879916738075)*x_ref[1]**o+(-0.746448112871)*x_ref[1]+(0.280824650861)*x_ref[2]**o+(0.0632084823022)*x_ref[2]
-        ref[3,2]=(0.281070481177)*x_ref[0]**o+(0.628020001876)*x_ref[0]+(0.347767303962)*x_ref[1]**o+(-0.276761252142)*x_ref[1]+(0.950345260734)*x_ref[2]**o+(-0.00148186335195)*x_ref[2]
-        ref[3,3]=(-0.37590210465)*x_ref[0]**o+(0.034147350068)*x_ref[0]+(0.245173418336)*x_ref[1]**o+(0.0564051241759)*x_ref[1]+(-0.157928106127)*x_ref[2]**o+(-0.611677441847)*x_ref[2]
-        ref[3,4]=(-0.279066532276)*x_ref[0]**o+(0.316033119063)*x_ref[0]+(0.655948999472)*x_ref[1]**o+(-0.520504180943)*x_ref[1]+(0.531738158819)*x_ref[2]**o+(0.899490827443)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.415438516191)*x[0]**o+(0.374659323173)*x[0]+(0.688470746611)*x[1]**o+(0.498183692176)*x[1]
-        arg[0,0,1]=(-0.846725329522)*x[0]**o+(0.414376816326)*x[0]+(0.651609661615)*x[1]**o+(0.357606396667)*x[1]
-        arg[0,1,0]=(0.728029172023)*x[0]**o+(0.975728459112)*x[0]+(-0.658211371639)*x[1]**o+(0.411894140351)*x[1]
-        arg[0,1,1]=(0.807350281817)*x[0]**o+(-0.369755733522)*x[0]+(-0.519483139314)*x[1]**o+(-0.709353537648)*x[1]
-        arg[1,0,0]=(0.0588259329479)*x[0]**o+(0.218362870441)*x[0]+(-0.0279239318934)*x[1]**o+(-0.75783635329)*x[1]
-        arg[1,0,1]=(-0.429573558505)*x[0]**o+(-0.339046134618)*x[0]+(0.412777825743)*x[1]**o+(-0.306607333437)*x[1]
-        arg[1,1,0]=(0.0222661407543)*x[0]**o+(0.927923674781)*x[0]+(-0.767468570033)*x[1]**o+(-0.0659150590367)*x[1]
-        arg[1,1,1]=(0.372811733787)*x[0]**o+(-0.286500260061)*x[0]+(-0.807504375569)*x[1]**o+(-0.992850148234)*x[1]
-        arg[2,0,0]=(0.368229828596)*x[0]**o+(0.672540290379)*x[0]+(-0.760462595095)*x[1]**o+(-0.761242492425)*x[1]
-        arg[2,0,1]=(0.306249523133)*x[0]**o+(0.769928924717)*x[0]+(0.610293800742)*x[1]**o+(-0.221996271153)*x[1]
-        arg[2,1,0]=(-0.909148832991)*x[0]**o+(-0.0293038712703)*x[0]+(-0.161707473269)*x[1]**o+(-0.534345319122)*x[1]
-        arg[2,1,1]=(-0.146432487737)*x[0]**o+(0.93729266958)*x[0]+(-0.561919238789)*x[1]**o+(-0.449440501171)*x[1]
-        arg[3,0,0]=(0.411711661035)*x[0]**o+(-0.0699878047274)*x[0]+(-0.0227688826645)*x[1]**o+(-0.939787633547)*x[1]
-        arg[3,0,1]=(-0.82108820245)*x[0]**o+(0.225501168847)*x[0]+(0.622921674682)*x[1]**o+(0.61092413094)*x[1]
-        arg[3,1,0]=(0.758116155912)*x[0]**o+(-0.117316615447)*x[0]+(0.0702245119124)*x[1]**o+(-0.275114508561)*x[1]
-        arg[3,1,1]=(-0.32568550821)*x[0]**o+(-0.280144846326)*x[0]+(0.194971187876)*x[1]**o+(-0.728447244746)*x[1]
-        arg[4,0,0]=(0.880042622981)*x[0]**o+(-0.395684607563)*x[0]+(-0.563304061265)*x[1]**o+(0.968663606772)*x[1]
-        arg[4,0,1]=(-0.515392712458)*x[0]**o+(0.820857647342)*x[0]+(-0.476289639495)*x[1]**o+(-0.478062589609)*x[1]
-        arg[4,1,0]=(0.534322425269)*x[0]**o+(0.975618695265)*x[0]+(-0.195764005045)*x[1]**o+(0.561996200643)*x[1]
-        arg[4,1,1]=(-0.906243138672)*x[0]**o+(-0.580985047294)*x[0]+(-0.094609405051)*x[1]**o+(0.734326711649)*x[1]
-        arg[5,0,0]=(-0.0655516121632)*x[0]**o+(0.785493123174)*x[0]+(-0.760068333675)*x[1]**o+(0.693869247554)*x[1]
-        arg[5,0,1]=(-0.931019838892)*x[0]**o+(0.80958291621)*x[0]+(-0.590591206111)*x[1]**o+(-0.800900346601)*x[1]
-        arg[5,1,0]=(0.448779048952)*x[0]**o+(-0.793450503268)*x[0]+(0.161067403301)*x[1]**o+(0.432054043544)*x[1]
-        arg[5,1,1]=(0.0423607361972)*x[0]**o+(-0.664958045702)*x[0]+(-0.174728816918)*x[1]**o+(-0.394390068699)*x[1]
-        ref[0,0,0]=(0.415438516191)*x_ref[0]**o+(0.374659323173)*x_ref[0]+(0.688470746611)*x_ref[1]**o+(0.498183692176)*x_ref[1]
-        ref[0,0,1]=(-0.846725329522)*x_ref[0]**o+(0.414376816326)*x_ref[0]+(0.651609661615)*x_ref[1]**o+(0.357606396667)*x_ref[1]
-        ref[0,1,0]=(0.728029172023)*x_ref[0]**o+(0.975728459112)*x_ref[0]+(-0.658211371639)*x_ref[1]**o+(0.411894140351)*x_ref[1]
-        ref[0,1,1]=(0.807350281817)*x_ref[0]**o+(-0.369755733522)*x_ref[0]+(-0.519483139314)*x_ref[1]**o+(-0.709353537648)*x_ref[1]
-        ref[1,0,0]=(0.0588259329479)*x_ref[0]**o+(0.218362870441)*x_ref[0]+(-0.0279239318934)*x_ref[1]**o+(-0.75783635329)*x_ref[1]
-        ref[1,0,1]=(-0.429573558505)*x_ref[0]**o+(-0.339046134618)*x_ref[0]+(0.412777825743)*x_ref[1]**o+(-0.306607333437)*x_ref[1]
-        ref[1,1,0]=(0.0222661407543)*x_ref[0]**o+(0.927923674781)*x_ref[0]+(-0.767468570033)*x_ref[1]**o+(-0.0659150590367)*x_ref[1]
-        ref[1,1,1]=(0.372811733787)*x_ref[0]**o+(-0.286500260061)*x_ref[0]+(-0.807504375569)*x_ref[1]**o+(-0.992850148234)*x_ref[1]
-        ref[2,0,0]=(0.368229828596)*x_ref[0]**o+(0.672540290379)*x_ref[0]+(-0.760462595095)*x_ref[1]**o+(-0.761242492425)*x_ref[1]
-        ref[2,0,1]=(0.306249523133)*x_ref[0]**o+(0.769928924717)*x_ref[0]+(0.610293800742)*x_ref[1]**o+(-0.221996271153)*x_ref[1]
-        ref[2,1,0]=(-0.909148832991)*x_ref[0]**o+(-0.0293038712703)*x_ref[0]+(-0.161707473269)*x_ref[1]**o+(-0.534345319122)*x_ref[1]
-        ref[2,1,1]=(-0.146432487737)*x_ref[0]**o+(0.93729266958)*x_ref[0]+(-0.561919238789)*x_ref[1]**o+(-0.449440501171)*x_ref[1]
-        ref[3,0,0]=(0.411711661035)*x_ref[0]**o+(-0.0699878047274)*x_ref[0]+(-0.0227688826645)*x_ref[1]**o+(-0.939787633547)*x_ref[1]
-        ref[3,0,1]=(-0.82108820245)*x_ref[0]**o+(0.225501168847)*x_ref[0]+(0.622921674682)*x_ref[1]**o+(0.61092413094)*x_ref[1]
-        ref[3,1,0]=(0.758116155912)*x_ref[0]**o+(-0.117316615447)*x_ref[0]+(0.0702245119124)*x_ref[1]**o+(-0.275114508561)*x_ref[1]
-        ref[3,1,1]=(-0.32568550821)*x_ref[0]**o+(-0.280144846326)*x_ref[0]+(0.194971187876)*x_ref[1]**o+(-0.728447244746)*x_ref[1]
-        ref[4,0,0]=(0.880042622981)*x_ref[0]**o+(-0.395684607563)*x_ref[0]+(-0.563304061265)*x_ref[1]**o+(0.968663606772)*x_ref[1]
-        ref[4,0,1]=(-0.515392712458)*x_ref[0]**o+(0.820857647342)*x_ref[0]+(-0.476289639495)*x_ref[1]**o+(-0.478062589609)*x_ref[1]
-        ref[4,1,0]=(0.534322425269)*x_ref[0]**o+(0.975618695265)*x_ref[0]+(-0.195764005045)*x_ref[1]**o+(0.561996200643)*x_ref[1]
-        ref[4,1,1]=(-0.906243138672)*x_ref[0]**o+(-0.580985047294)*x_ref[0]+(-0.094609405051)*x_ref[1]**o+(0.734326711649)*x_ref[1]
-        ref[5,0,0]=(-0.0655516121632)*x_ref[0]**o+(0.785493123174)*x_ref[0]+(-0.760068333675)*x_ref[1]**o+(0.693869247554)*x_ref[1]
-        ref[5,0,1]=(-0.931019838892)*x_ref[0]**o+(0.80958291621)*x_ref[0]+(-0.590591206111)*x_ref[1]**o+(-0.800900346601)*x_ref[1]
-        ref[5,1,0]=(0.448779048952)*x_ref[0]**o+(-0.793450503268)*x_ref[0]+(0.161067403301)*x_ref[1]**o+(0.432054043544)*x_ref[1]
-        ref[5,1,1]=(0.0423607361972)*x_ref[0]**o+(-0.664958045702)*x_ref[0]+(-0.174728816918)*x_ref[1]**o+(-0.394390068699)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.34355250678)*x[0]**o+(0.554590991175)*x[0]+(0.00673862595967)*x[1]**o+(-0.405764224977)*x[1]+(0.0865564883661)*x[2]**o+(0.102294137607)*x[2]
-        arg[0,0,1]=(0.855234460708)*x[0]**o+(-0.710901486015)*x[0]+(0.546393138087)*x[1]**o+(0.847113479239)*x[1]+(-0.650701604407)*x[2]**o+(-0.914755510262)*x[2]
-        arg[0,1,0]=(0.252544568503)*x[0]**o+(-0.473471976093)*x[0]+(-0.587315274764)*x[1]**o+(-0.269940894375)*x[1]+(0.360340735507)*x[2]**o+(-0.745440004827)*x[2]
-        arg[0,1,1]=(0.11967506555)*x[0]**o+(0.696836453942)*x[0]+(-0.871162187396)*x[1]**o+(-0.315170111067)*x[1]+(0.232066109266)*x[2]**o+(-0.464730524838)*x[2]
-        arg[1,0,0]=(-0.790535662997)*x[0]**o+(-0.964779159884)*x[0]+(-0.689937881374)*x[1]**o+(0.422799231262)*x[1]+(-0.97315874804)*x[2]**o+(-0.532103115205)*x[2]
-        arg[1,0,1]=(-0.0487589554945)*x[0]**o+(-0.622735713658)*x[0]+(-0.520842613265)*x[1]**o+(0.803711422599)*x[1]+(0.440648875556)*x[2]**o+(0.98786672574)*x[2]
-        arg[1,1,0]=(0.811189977538)*x[0]**o+(0.0175150486788)*x[0]+(-0.124328899976)*x[1]**o+(-0.942398680503)*x[1]+(-0.149270209895)*x[2]**o+(-0.853084407696)*x[2]
-        arg[1,1,1]=(0.688378159744)*x[0]**o+(0.408766927878)*x[0]+(0.834128919609)*x[1]**o+(0.253605923886)*x[1]+(0.424992121054)*x[2]**o+(0.21016117963)*x[2]
-        arg[2,0,0]=(0.277469067087)*x[0]**o+(0.539821557611)*x[0]+(0.348679402521)*x[1]**o+(-0.469772506537)*x[1]+(0.454583229137)*x[2]**o+(0.653681481133)*x[2]
-        arg[2,0,1]=(-0.934067178483)*x[0]**o+(-0.172735098497)*x[0]+(-0.0347256850948)*x[1]**o+(-0.459971424944)*x[1]+(0.932661853019)*x[2]**o+(-0.186822590955)*x[2]
-        arg[2,1,0]=(0.71698574321)*x[0]**o+(-0.197244831261)*x[0]+(0.183419576182)*x[1]**o+(-0.871451480853)*x[1]+(-0.349396269955)*x[2]**o+(0.095909246936)*x[2]
-        arg[2,1,1]=(-0.00972985962106)*x[0]**o+(-0.919204152811)*x[0]+(-0.751744404365)*x[1]**o+(0.377096436852)*x[1]+(-0.924228885362)*x[2]**o+(0.451053813959)*x[2]
-        arg[3,0,0]=(0.951119968373)*x[0]**o+(-0.0680027504528)*x[0]+(-0.113660990287)*x[1]**o+(-0.428999453003)*x[1]+(0.171804544103)*x[2]**o+(0.677635036297)*x[2]
-        arg[3,0,1]=(0.62534864581)*x[0]**o+(0.389496246771)*x[0]+(0.621295327948)*x[1]**o+(-0.684165739023)*x[1]+(0.258637161492)*x[2]**o+(0.0441460764076)*x[2]
-        arg[3,1,0]=(0.0348922721145)*x[0]**o+(0.091201286767)*x[0]+(0.421079169132)*x[1]**o+(-0.616504862591)*x[1]+(0.563927673176)*x[2]**o+(-0.183993394822)*x[2]
-        arg[3,1,1]=(0.657959811783)*x[0]**o+(0.229729671382)*x[0]+(0.549853155207)*x[1]**o+(-0.847412930565)*x[1]+(-0.0780682500337)*x[2]**o+(0.574435563406)*x[2]
-        arg[4,0,0]=(-0.679988515344)*x[0]**o+(0.0517331630343)*x[0]+(-0.160281064879)*x[1]**o+(-0.0672405944261)*x[1]+(-0.118968444607)*x[2]**o+(0.00980065834148)*x[2]
-        arg[4,0,1]=(-0.150457972951)*x[0]**o+(0.671586511406)*x[0]+(-0.844112675259)*x[1]**o+(0.42766255101)*x[1]+(-0.22449721018)*x[2]**o+(-0.150416151059)*x[2]
-        arg[4,1,0]=(0.0768992597753)*x[0]**o+(0.0139605476692)*x[0]+(-0.831269554863)*x[1]**o+(-0.279339344511)*x[1]+(0.387318821185)*x[2]**o+(0.967687121678)*x[2]
-        arg[4,1,1]=(-0.670585948598)*x[0]**o+(0.422715818654)*x[0]+(0.623702390878)*x[1]**o+(0.922646081646)*x[1]+(-0.714191287039)*x[2]**o+(-0.99018084869)*x[2]
-        arg[5,0,0]=(0.100273819257)*x[0]**o+(-0.769422291863)*x[0]+(-0.152611272068)*x[1]**o+(-0.396798631305)*x[1]+(0.502251047462)*x[2]**o+(0.993791216449)*x[2]
-        arg[5,0,1]=(-0.0222540900657)*x[0]**o+(-0.339810353987)*x[0]+(0.241665078696)*x[1]**o+(0.111020568564)*x[1]+(0.298147316931)*x[2]**o+(0.391278660594)*x[2]
-        arg[5,1,0]=(0.828297599555)*x[0]**o+(0.237678875371)*x[0]+(0.924551126274)*x[1]**o+(-0.663695049485)*x[1]+(-0.547123493132)*x[2]**o+(-0.788635745118)*x[2]
-        arg[5,1,1]=(0.0726334370982)*x[0]**o+(-0.875688492957)*x[0]+(0.473726235108)*x[1]**o+(0.023025596151)*x[1]+(0.827449396402)*x[2]**o+(-0.154698941604)*x[2]
-        ref[0,0,0]=(0.34355250678)*x_ref[0]**o+(0.554590991175)*x_ref[0]+(0.00673862595967)*x_ref[1]**o+(-0.405764224977)*x_ref[1]+(0.0865564883661)*x_ref[2]**o+(0.102294137607)*x_ref[2]
-        ref[0,0,1]=(0.855234460708)*x_ref[0]**o+(-0.710901486015)*x_ref[0]+(0.546393138087)*x_ref[1]**o+(0.847113479239)*x_ref[1]+(-0.650701604407)*x_ref[2]**o+(-0.914755510262)*x_ref[2]
-        ref[0,1,0]=(0.252544568503)*x_ref[0]**o+(-0.473471976093)*x_ref[0]+(-0.587315274764)*x_ref[1]**o+(-0.269940894375)*x_ref[1]+(0.360340735507)*x_ref[2]**o+(-0.745440004827)*x_ref[2]
-        ref[0,1,1]=(0.11967506555)*x_ref[0]**o+(0.696836453942)*x_ref[0]+(-0.871162187396)*x_ref[1]**o+(-0.315170111067)*x_ref[1]+(0.232066109266)*x_ref[2]**o+(-0.464730524838)*x_ref[2]
-        ref[1,0,0]=(-0.790535662997)*x_ref[0]**o+(-0.964779159884)*x_ref[0]+(-0.689937881374)*x_ref[1]**o+(0.422799231262)*x_ref[1]+(-0.97315874804)*x_ref[2]**o+(-0.532103115205)*x_ref[2]
-        ref[1,0,1]=(-0.0487589554945)*x_ref[0]**o+(-0.622735713658)*x_ref[0]+(-0.520842613265)*x_ref[1]**o+(0.803711422599)*x_ref[1]+(0.440648875556)*x_ref[2]**o+(0.98786672574)*x_ref[2]
-        ref[1,1,0]=(0.811189977538)*x_ref[0]**o+(0.0175150486788)*x_ref[0]+(-0.124328899976)*x_ref[1]**o+(-0.942398680503)*x_ref[1]+(-0.149270209895)*x_ref[2]**o+(-0.853084407696)*x_ref[2]
-        ref[1,1,1]=(0.688378159744)*x_ref[0]**o+(0.408766927878)*x_ref[0]+(0.834128919609)*x_ref[1]**o+(0.253605923886)*x_ref[1]+(0.424992121054)*x_ref[2]**o+(0.21016117963)*x_ref[2]
-        ref[2,0,0]=(0.277469067087)*x_ref[0]**o+(0.539821557611)*x_ref[0]+(0.348679402521)*x_ref[1]**o+(-0.469772506537)*x_ref[1]+(0.454583229137)*x_ref[2]**o+(0.653681481133)*x_ref[2]
-        ref[2,0,1]=(-0.934067178483)*x_ref[0]**o+(-0.172735098497)*x_ref[0]+(-0.0347256850948)*x_ref[1]**o+(-0.459971424944)*x_ref[1]+(0.932661853019)*x_ref[2]**o+(-0.186822590955)*x_ref[2]
-        ref[2,1,0]=(0.71698574321)*x_ref[0]**o+(-0.197244831261)*x_ref[0]+(0.183419576182)*x_ref[1]**o+(-0.871451480853)*x_ref[1]+(-0.349396269955)*x_ref[2]**o+(0.095909246936)*x_ref[2]
-        ref[2,1,1]=(-0.00972985962106)*x_ref[0]**o+(-0.919204152811)*x_ref[0]+(-0.751744404365)*x_ref[1]**o+(0.377096436852)*x_ref[1]+(-0.924228885362)*x_ref[2]**o+(0.451053813959)*x_ref[2]
-        ref[3,0,0]=(0.951119968373)*x_ref[0]**o+(-0.0680027504528)*x_ref[0]+(-0.113660990287)*x_ref[1]**o+(-0.428999453003)*x_ref[1]+(0.171804544103)*x_ref[2]**o+(0.677635036297)*x_ref[2]
-        ref[3,0,1]=(0.62534864581)*x_ref[0]**o+(0.389496246771)*x_ref[0]+(0.621295327948)*x_ref[1]**o+(-0.684165739023)*x_ref[1]+(0.258637161492)*x_ref[2]**o+(0.0441460764076)*x_ref[2]
-        ref[3,1,0]=(0.0348922721145)*x_ref[0]**o+(0.091201286767)*x_ref[0]+(0.421079169132)*x_ref[1]**o+(-0.616504862591)*x_ref[1]+(0.563927673176)*x_ref[2]**o+(-0.183993394822)*x_ref[2]
-        ref[3,1,1]=(0.657959811783)*x_ref[0]**o+(0.229729671382)*x_ref[0]+(0.549853155207)*x_ref[1]**o+(-0.847412930565)*x_ref[1]+(-0.0780682500337)*x_ref[2]**o+(0.574435563406)*x_ref[2]
-        ref[4,0,0]=(-0.679988515344)*x_ref[0]**o+(0.0517331630343)*x_ref[0]+(-0.160281064879)*x_ref[1]**o+(-0.0672405944261)*x_ref[1]+(-0.118968444607)*x_ref[2]**o+(0.00980065834148)*x_ref[2]
-        ref[4,0,1]=(-0.150457972951)*x_ref[0]**o+(0.671586511406)*x_ref[0]+(-0.844112675259)*x_ref[1]**o+(0.42766255101)*x_ref[1]+(-0.22449721018)*x_ref[2]**o+(-0.150416151059)*x_ref[2]
-        ref[4,1,0]=(0.0768992597753)*x_ref[0]**o+(0.0139605476692)*x_ref[0]+(-0.831269554863)*x_ref[1]**o+(-0.279339344511)*x_ref[1]+(0.387318821185)*x_ref[2]**o+(0.967687121678)*x_ref[2]
-        ref[4,1,1]=(-0.670585948598)*x_ref[0]**o+(0.422715818654)*x_ref[0]+(0.623702390878)*x_ref[1]**o+(0.922646081646)*x_ref[1]+(-0.714191287039)*x_ref[2]**o+(-0.99018084869)*x_ref[2]
-        ref[5,0,0]=(0.100273819257)*x_ref[0]**o+(-0.769422291863)*x_ref[0]+(-0.152611272068)*x_ref[1]**o+(-0.396798631305)*x_ref[1]+(0.502251047462)*x_ref[2]**o+(0.993791216449)*x_ref[2]
-        ref[5,0,1]=(-0.0222540900657)*x_ref[0]**o+(-0.339810353987)*x_ref[0]+(0.241665078696)*x_ref[1]**o+(0.111020568564)*x_ref[1]+(0.298147316931)*x_ref[2]**o+(0.391278660594)*x_ref[2]
-        ref[5,1,0]=(0.828297599555)*x_ref[0]**o+(0.237678875371)*x_ref[0]+(0.924551126274)*x_ref[1]**o+(-0.663695049485)*x_ref[1]+(-0.547123493132)*x_ref[2]**o+(-0.788635745118)*x_ref[2]
-        ref[5,1,1]=(0.0726334370982)*x_ref[0]**o+(-0.875688492957)*x_ref[0]+(0.473726235108)*x_ref[1]**o+(0.023025596151)*x_ref[1]+(0.827449396402)*x_ref[2]**o+(-0.154698941604)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0338299192888)*x[0]**o+(-0.114906274359)*x[0]+(0.15010339398)*x[1]**o+(0.625295991328)*x[1]
-        arg[0,0,0,1]=(-0.1311901039)*x[0]**o+(-0.551712861217)*x[0]+(-0.287411404506)*x[1]**o+(0.0242820629572)*x[1]
-        arg[0,0,1,0]=(0.121962094111)*x[0]**o+(0.203169622345)*x[0]+(0.241504218053)*x[1]**o+(-0.0696356239498)*x[1]
-        arg[0,0,1,1]=(0.0461537352329)*x[0]**o+(-0.275908938567)*x[0]+(-0.271184121027)*x[1]**o+(-0.364024729567)*x[1]
-        arg[0,0,2,0]=(0.199272234315)*x[0]**o+(-0.906364258855)*x[0]+(-0.92102930037)*x[1]**o+(0.0718981903454)*x[1]
-        arg[0,0,2,1]=(-0.742950958383)*x[0]**o+(0.0301464847722)*x[0]+(0.466993477687)*x[1]**o+(-0.402131750698)*x[1]
-        arg[0,1,0,0]=(-0.0653776546375)*x[0]**o+(-0.679360612372)*x[0]+(-0.32783837768)*x[1]**o+(-0.113753016428)*x[1]
-        arg[0,1,0,1]=(0.58610119414)*x[0]**o+(0.142613166231)*x[0]+(0.0409105619986)*x[1]**o+(-0.660641663558)*x[1]
-        arg[0,1,1,0]=(0.212172308585)*x[0]**o+(-0.452767768344)*x[0]+(0.963053969889)*x[1]**o+(0.752691773953)*x[1]
-        arg[0,1,1,1]=(-0.514998377887)*x[0]**o+(0.0872464329801)*x[0]+(0.265590295505)*x[1]**o+(0.557238826549)*x[1]
-        arg[0,1,2,0]=(0.360523954724)*x[0]**o+(0.550238402994)*x[0]+(-0.206349415539)*x[1]**o+(0.357304730511)*x[1]
-        arg[0,1,2,1]=(-0.872755217435)*x[0]**o+(0.190943683664)*x[0]+(-0.245454292354)*x[1]**o+(0.507229578506)*x[1]
-        arg[0,2,0,0]=(0.994619505257)*x[0]**o+(0.33482820568)*x[0]+(-0.12721791236)*x[1]**o+(-0.505873171195)*x[1]
-        arg[0,2,0,1]=(0.224805131522)*x[0]**o+(0.332022434603)*x[0]+(0.0583494507268)*x[1]**o+(0.857185410994)*x[1]
-        arg[0,2,1,0]=(-0.425367077516)*x[0]**o+(-0.25207101061)*x[0]+(-0.11164491753)*x[1]**o+(0.44752084285)*x[1]
-        arg[0,2,1,1]=(-0.158725210751)*x[0]**o+(-0.0692363138932)*x[0]+(0.214803128256)*x[1]**o+(0.886699106748)*x[1]
-        arg[0,2,2,0]=(-0.332146331257)*x[0]**o+(0.114845050128)*x[0]+(-0.0781411611124)*x[1]**o+(0.474972057387)*x[1]
-        arg[0,2,2,1]=(-0.481949630694)*x[0]**o+(0.644984972151)*x[0]+(0.171146519527)*x[1]**o+(0.57534803966)*x[1]
-        arg[0,3,0,0]=(0.7580633024)*x[0]**o+(0.0280511776577)*x[0]+(0.375583652078)*x[1]**o+(-0.809112787284)*x[1]
-        arg[0,3,0,1]=(-0.466737159934)*x[0]**o+(0.410032775686)*x[0]+(0.176141189584)*x[1]**o+(-0.228288309456)*x[1]
-        arg[0,3,1,0]=(0.427129582196)*x[0]**o+(-0.718385859483)*x[0]+(-0.172261212989)*x[1]**o+(0.913157476188)*x[1]
-        arg[0,3,1,1]=(0.952506706487)*x[0]**o+(-0.497478163899)*x[0]+(-0.930273038716)*x[1]**o+(0.673573149025)*x[1]
-        arg[0,3,2,0]=(-0.0074302930747)*x[0]**o+(0.226424842035)*x[0]+(0.871190620671)*x[1]**o+(0.277695333679)*x[1]
-        arg[0,3,2,1]=(-0.540820239946)*x[0]**o+(0.33044763211)*x[0]+(-0.772648820924)*x[1]**o+(-0.362410088021)*x[1]
-        arg[0,4,0,0]=(-0.748396039111)*x[0]**o+(0.215131518212)*x[0]+(0.514087824403)*x[1]**o+(0.335563854205)*x[1]
-        arg[0,4,0,1]=(-0.443263590391)*x[0]**o+(-0.523167282542)*x[0]+(0.122612452799)*x[1]**o+(0.216527857615)*x[1]
-        arg[0,4,1,0]=(0.448176296777)*x[0]**o+(0.478292146131)*x[0]+(-0.558921083502)*x[1]**o+(-0.17018258654)*x[1]
-        arg[0,4,1,1]=(-0.912765673953)*x[0]**o+(0.751746623223)*x[0]+(-0.104811579057)*x[1]**o+(0.456436870323)*x[1]
-        arg[0,4,2,0]=(0.157946450932)*x[0]**o+(0.147858587857)*x[0]+(0.775747362874)*x[1]**o+(0.478478862463)*x[1]
-        arg[0,4,2,1]=(-0.819625058185)*x[0]**o+(-0.0231980393919)*x[0]+(-0.186647585522)*x[1]**o+(0.513350371371)*x[1]
-        arg[1,0,0,0]=(-0.942373946995)*x[0]**o+(-0.761326160931)*x[0]+(0.192511867167)*x[1]**o+(-0.50895969579)*x[1]
-        arg[1,0,0,1]=(0.0670813349951)*x[0]**o+(0.55602953512)*x[0]+(0.757621178635)*x[1]**o+(0.741550201759)*x[1]
-        arg[1,0,1,0]=(-0.114642609493)*x[0]**o+(-0.639500048447)*x[0]+(-0.861813039243)*x[1]**o+(0.36413406744)*x[1]
-        arg[1,0,1,1]=(0.126555451594)*x[0]**o+(-0.885172557082)*x[0]+(-0.376073252921)*x[1]**o+(0.166102850653)*x[1]
-        arg[1,0,2,0]=(-0.381517068219)*x[0]**o+(0.94870328267)*x[0]+(-0.129934777755)*x[1]**o+(0.78090715758)*x[1]
-        arg[1,0,2,1]=(-0.535852302247)*x[0]**o+(0.63751039318)*x[0]+(-0.537556159925)*x[1]**o+(0.147766714221)*x[1]
-        arg[1,1,0,0]=(-0.605543047533)*x[0]**o+(-0.366612785372)*x[0]+(0.544900149212)*x[1]**o+(0.722108900447)*x[1]
-        arg[1,1,0,1]=(0.133378561142)*x[0]**o+(-0.227808772494)*x[0]+(-0.729399624175)*x[1]**o+(0.307571743455)*x[1]
-        arg[1,1,1,0]=(0.0458830538139)*x[0]**o+(0.0585044493026)*x[0]+(-0.136630547605)*x[1]**o+(-0.0823288389309)*x[1]
-        arg[1,1,1,1]=(0.339263808784)*x[0]**o+(0.00988917109076)*x[0]+(-0.786591838083)*x[1]**o+(-0.361686799179)*x[1]
-        arg[1,1,2,0]=(0.789942037592)*x[0]**o+(-0.266689758676)*x[0]+(0.464856327495)*x[1]**o+(0.138022774293)*x[1]
-        arg[1,1,2,1]=(-0.723544867217)*x[0]**o+(-0.523023674205)*x[0]+(0.629726026331)*x[1]**o+(-0.867808120997)*x[1]
-        arg[1,2,0,0]=(-0.495589518787)*x[0]**o+(-0.561664880262)*x[0]+(0.0319320417078)*x[1]**o+(-0.153720661498)*x[1]
-        arg[1,2,0,1]=(0.293168114024)*x[0]**o+(-0.344107163981)*x[0]+(-0.275629670068)*x[1]**o+(0.06103653487)*x[1]
-        arg[1,2,1,0]=(0.495640927339)*x[0]**o+(0.596540095043)*x[0]+(0.208792567756)*x[1]**o+(0.886040724145)*x[1]
-        arg[1,2,1,1]=(0.331476398093)*x[0]**o+(-0.472588572455)*x[0]+(-0.455670457285)*x[1]**o+(-0.731223615642)*x[1]
-        arg[1,2,2,0]=(-0.127107829674)*x[0]**o+(-0.21113128456)*x[0]+(-0.733928194168)*x[1]**o+(-0.174127696853)*x[1]
-        arg[1,2,2,1]=(0.521879316151)*x[0]**o+(0.983424557865)*x[0]+(-0.288659660182)*x[1]**o+(-0.431045203113)*x[1]
-        arg[1,3,0,0]=(0.292348765746)*x[0]**o+(0.0730741240915)*x[0]+(0.079624022683)*x[1]**o+(0.237483071633)*x[1]
-        arg[1,3,0,1]=(0.291035771848)*x[0]**o+(-0.482909477855)*x[0]+(-0.999142129615)*x[1]**o+(-0.559723367197)*x[1]
-        arg[1,3,1,0]=(0.747096275653)*x[0]**o+(0.762757649624)*x[0]+(-0.821650889507)*x[1]**o+(0.301128670189)*x[1]
-        arg[1,3,1,1]=(0.82703681414)*x[0]**o+(-0.336570070436)*x[0]+(0.798131952979)*x[1]**o+(0.603562737956)*x[1]
-        arg[1,3,2,0]=(-0.164875914126)*x[0]**o+(0.219409873902)*x[0]+(0.784253160678)*x[1]**o+(0.0219597460707)*x[1]
-        arg[1,3,2,1]=(0.124778899794)*x[0]**o+(0.785367842145)*x[0]+(0.948111125908)*x[1]**o+(-0.887427847089)*x[1]
-        arg[1,4,0,0]=(0.0911816002883)*x[0]**o+(0.645410022441)*x[0]+(0.720551531965)*x[1]**o+(-0.388407683413)*x[1]
-        arg[1,4,0,1]=(-0.0416762613062)*x[0]**o+(-0.548874829834)*x[0]+(-0.377952555557)*x[1]**o+(0.742795234361)*x[1]
-        arg[1,4,1,0]=(-0.896929017971)*x[0]**o+(0.678343686516)*x[0]+(0.711572763082)*x[1]**o+(-0.43397331651)*x[1]
-        arg[1,4,1,1]=(-0.190804421566)*x[0]**o+(-0.0848405124789)*x[0]+(0.36246957905)*x[1]**o+(0.963599086227)*x[1]
-        arg[1,4,2,0]=(-0.0210248567982)*x[0]**o+(0.545977814581)*x[0]+(0.858962864401)*x[1]**o+(0.113792851997)*x[1]
-        arg[1,4,2,1]=(0.229641892622)*x[0]**o+(-0.739561617198)*x[0]+(-0.164372740617)*x[1]**o+(0.537097868843)*x[1]
-        arg[2,0,0,0]=(-0.13321389343)*x[0]**o+(-0.668403350503)*x[0]+(-0.924879105983)*x[1]**o+(-0.5161790717)*x[1]
-        arg[2,0,0,1]=(0.26582844685)*x[0]**o+(0.89048660684)*x[0]+(-0.377225981719)*x[1]**o+(-0.303790710194)*x[1]
-        arg[2,0,1,0]=(0.0997470860283)*x[0]**o+(0.0385427264217)*x[0]+(-0.71387347273)*x[1]**o+(-0.621376499192)*x[1]
-        arg[2,0,1,1]=(0.595544616326)*x[0]**o+(-0.850529503975)*x[0]+(0.602203957938)*x[1]**o+(-0.329484843907)*x[1]
-        arg[2,0,2,0]=(-0.106031967029)*x[0]**o+(-0.165122821622)*x[0]+(0.647473815919)*x[1]**o+(0.28942226062)*x[1]
-        arg[2,0,2,1]=(0.585955875472)*x[0]**o+(0.922667710403)*x[0]+(-0.0710905957841)*x[1]**o+(-0.669138163697)*x[1]
-        arg[2,1,0,0]=(0.461941211081)*x[0]**o+(0.723022466263)*x[0]+(-0.118551893472)*x[1]**o+(0.00445187353637)*x[1]
-        arg[2,1,0,1]=(-0.253168248108)*x[0]**o+(0.476938842605)*x[0]+(0.476641658034)*x[1]**o+(-0.916886387595)*x[1]
-        arg[2,1,1,0]=(0.722029309503)*x[0]**o+(0.0588848593425)*x[0]+(0.84737370043)*x[1]**o+(-0.674604415213)*x[1]
-        arg[2,1,1,1]=(-0.644736759298)*x[0]**o+(-0.212847303893)*x[0]+(0.25394587552)*x[1]**o+(-0.366955175081)*x[1]
-        arg[2,1,2,0]=(-0.657395296801)*x[0]**o+(-0.967570027599)*x[0]+(0.180926628541)*x[1]**o+(-0.940599897942)*x[1]
-        arg[2,1,2,1]=(0.849897328801)*x[0]**o+(-0.299199474051)*x[0]+(0.427221207827)*x[1]**o+(0.212027985441)*x[1]
-        arg[2,2,0,0]=(-0.561573507381)*x[0]**o+(-0.446925224908)*x[0]+(0.132091224948)*x[1]**o+(-0.673375661849)*x[1]
-        arg[2,2,0,1]=(-0.386657291574)*x[0]**o+(0.356784637112)*x[0]+(0.644292006233)*x[1]**o+(0.922937167842)*x[1]
-        arg[2,2,1,0]=(0.484446757285)*x[0]**o+(-0.822469870455)*x[0]+(-0.89605890123)*x[1]**o+(-0.895891500031)*x[1]
-        arg[2,2,1,1]=(-0.0930740520192)*x[0]**o+(0.953356473678)*x[0]+(-0.714418458806)*x[1]**o+(-0.100584950946)*x[1]
-        arg[2,2,2,0]=(0.945572242667)*x[0]**o+(-0.259280849605)*x[0]+(-0.925459846341)*x[1]**o+(0.906002758873)*x[1]
-        arg[2,2,2,1]=(-0.638993332975)*x[0]**o+(-0.668594641703)*x[0]+(0.012666231369)*x[1]**o+(0.89732685856)*x[1]
-        arg[2,3,0,0]=(-0.885061116144)*x[0]**o+(-0.576097536483)*x[0]+(-0.43166075788)*x[1]**o+(0.538821620917)*x[1]
-        arg[2,3,0,1]=(-0.0743638381797)*x[0]**o+(0.251037500035)*x[0]+(-0.905989928076)*x[1]**o+(0.243771000867)*x[1]
-        arg[2,3,1,0]=(-0.016045622351)*x[0]**o+(-0.632944072174)*x[0]+(-0.296175918793)*x[1]**o+(-0.00120123641365)*x[1]
-        arg[2,3,1,1]=(-0.896354921812)*x[0]**o+(-0.331348989027)*x[0]+(-0.450865285201)*x[1]**o+(-0.243268582009)*x[1]
-        arg[2,3,2,0]=(0.609332927431)*x[0]**o+(-0.0815856802115)*x[0]+(0.201924792273)*x[1]**o+(-0.890424451348)*x[1]
-        arg[2,3,2,1]=(0.395090137264)*x[0]**o+(0.294230442573)*x[0]+(-0.345371510364)*x[1]**o+(0.181229663241)*x[1]
-        arg[2,4,0,0]=(-0.823684509034)*x[0]**o+(0.431019301942)*x[0]+(0.554707015054)*x[1]**o+(-0.846322903003)*x[1]
-        arg[2,4,0,1]=(0.862984476658)*x[0]**o+(0.20512500102)*x[0]+(0.0247756159287)*x[1]**o+(-0.374795100946)*x[1]
-        arg[2,4,1,0]=(-0.0849914269517)*x[0]**o+(0.754908200339)*x[0]+(0.593363754807)*x[1]**o+(0.124923961126)*x[1]
-        arg[2,4,1,1]=(-0.691440264234)*x[0]**o+(0.825739298015)*x[0]+(0.426452231478)*x[1]**o+(0.0995610721341)*x[1]
-        arg[2,4,2,0]=(-0.175322750567)*x[0]**o+(0.419750865569)*x[0]+(0.208448987712)*x[1]**o+(0.150584798952)*x[1]
-        arg[2,4,2,1]=(0.931680152344)*x[0]**o+(0.390947206307)*x[0]+(0.388437348378)*x[1]**o+(-0.808413079032)*x[1]
-        arg[3,0,0,0]=(0.58855431402)*x[0]**o+(0.383865913364)*x[0]+(-0.691445323219)*x[1]**o+(-0.443370658523)*x[1]
-        arg[3,0,0,1]=(-0.657371481478)*x[0]**o+(0.746891082673)*x[0]+(-0.829229947773)*x[1]**o+(0.761915670404)*x[1]
-        arg[3,0,1,0]=(-0.431502932714)*x[0]**o+(-0.961472285716)*x[0]+(0.0423384388031)*x[1]**o+(0.339373458118)*x[1]
-        arg[3,0,1,1]=(-0.272831163259)*x[0]**o+(-0.533438904494)*x[0]+(-0.595625384875)*x[1]**o+(0.0366857022323)*x[1]
-        arg[3,0,2,0]=(-0.319684662306)*x[0]**o+(0.672185828912)*x[0]+(0.483126548994)*x[1]**o+(0.745872629604)*x[1]
-        arg[3,0,2,1]=(0.437895277404)*x[0]**o+(-0.337209416963)*x[0]+(0.101080522788)*x[1]**o+(0.892022488644)*x[1]
-        arg[3,1,0,0]=(-0.582325078455)*x[0]**o+(-0.854689347157)*x[0]+(0.0308638312259)*x[1]**o+(0.633382365704)*x[1]
-        arg[3,1,0,1]=(0.319735178376)*x[0]**o+(-0.782764593952)*x[0]+(0.082230132244)*x[1]**o+(-0.946010937852)*x[1]
-        arg[3,1,1,0]=(-0.698490410666)*x[0]**o+(-0.801358802689)*x[0]+(0.20695648235)*x[1]**o+(0.75257523471)*x[1]
-        arg[3,1,1,1]=(0.66321696527)*x[0]**o+(0.704572918868)*x[0]+(0.528208879002)*x[1]**o+(-0.408378325513)*x[1]
-        arg[3,1,2,0]=(-0.925177198417)*x[0]**o+(-0.152427811549)*x[0]+(0.341781993583)*x[1]**o+(-0.589976456377)*x[1]
-        arg[3,1,2,1]=(0.206706628353)*x[0]**o+(0.673777173329)*x[0]+(-0.994138314254)*x[1]**o+(-0.843696565863)*x[1]
-        arg[3,2,0,0]=(-0.588881067333)*x[0]**o+(-0.537572388341)*x[0]+(-0.206570371675)*x[1]**o+(-0.127468554294)*x[1]
-        arg[3,2,0,1]=(0.498638284096)*x[0]**o+(-0.488278831086)*x[0]+(-0.28320874594)*x[1]**o+(-0.638241576615)*x[1]
-        arg[3,2,1,0]=(-0.445780790822)*x[0]**o+(-0.347493953089)*x[0]+(-0.558010086232)*x[1]**o+(-0.0287339307689)*x[1]
-        arg[3,2,1,1]=(-0.361727811272)*x[0]**o+(-0.559565378007)*x[0]+(-0.211685558972)*x[1]**o+(0.330088396811)*x[1]
-        arg[3,2,2,0]=(-0.42600117831)*x[0]**o+(-0.488997111988)*x[0]+(0.127421278051)*x[1]**o+(-0.48233167806)*x[1]
-        arg[3,2,2,1]=(0.120468829686)*x[0]**o+(0.0675603906118)*x[0]+(-0.60674361864)*x[1]**o+(0.639115708258)*x[1]
-        arg[3,3,0,0]=(0.369343033015)*x[0]**o+(0.707735743593)*x[0]+(-0.426275591836)*x[1]**o+(-0.733377765625)*x[1]
-        arg[3,3,0,1]=(-0.931245338156)*x[0]**o+(-0.465861794185)*x[0]+(-0.650664500687)*x[1]**o+(0.103077662402)*x[1]
-        arg[3,3,1,0]=(0.731834744512)*x[0]**o+(0.267840571071)*x[0]+(0.952106457495)*x[1]**o+(-0.943845364366)*x[1]
-        arg[3,3,1,1]=(-0.21692720916)*x[0]**o+(0.580841374997)*x[0]+(-0.412129341223)*x[1]**o+(0.40414445304)*x[1]
-        arg[3,3,2,0]=(-0.447758598726)*x[0]**o+(0.0616926352912)*x[0]+(-0.824624226122)*x[1]**o+(0.19099833104)*x[1]
-        arg[3,3,2,1]=(-0.615519138165)*x[0]**o+(0.233926822164)*x[0]+(-0.969014060236)*x[1]**o+(0.835103627893)*x[1]
-        arg[3,4,0,0]=(0.550778983301)*x[0]**o+(0.0198253530882)*x[0]+(-0.39383849187)*x[1]**o+(0.367721826304)*x[1]
-        arg[3,4,0,1]=(0.444877923149)*x[0]**o+(-0.899159835223)*x[0]+(0.923392540452)*x[1]**o+(0.512905141718)*x[1]
-        arg[3,4,1,0]=(-0.563807675145)*x[0]**o+(0.994405383899)*x[0]+(-0.777352948218)*x[1]**o+(0.865994906227)*x[1]
-        arg[3,4,1,1]=(-0.593800452139)*x[0]**o+(0.613778803237)*x[0]+(0.582200979718)*x[1]**o+(0.448026243271)*x[1]
-        arg[3,4,2,0]=(-0.900331125416)*x[0]**o+(0.234613965424)*x[0]+(0.510400273805)*x[1]**o+(0.0836773641661)*x[1]
-        arg[3,4,2,1]=(0.710999097307)*x[0]**o+(0.886603988265)*x[0]+(-0.405644887679)*x[1]**o+(0.362257258809)*x[1]
-        ref[0,0,0,0]=(-0.0338299192888)*x_ref[0]**o+(-0.114906274359)*x_ref[0]+(0.15010339398)*x_ref[1]**o+(0.625295991328)*x_ref[1]
-        ref[0,0,0,1]=(-0.1311901039)*x_ref[0]**o+(-0.551712861217)*x_ref[0]+(-0.287411404506)*x_ref[1]**o+(0.0242820629572)*x_ref[1]
-        ref[0,0,1,0]=(0.121962094111)*x_ref[0]**o+(0.203169622345)*x_ref[0]+(0.241504218053)*x_ref[1]**o+(-0.0696356239498)*x_ref[1]
-        ref[0,0,1,1]=(0.0461537352329)*x_ref[0]**o+(-0.275908938567)*x_ref[0]+(-0.271184121027)*x_ref[1]**o+(-0.364024729567)*x_ref[1]
-        ref[0,0,2,0]=(0.199272234315)*x_ref[0]**o+(-0.906364258855)*x_ref[0]+(-0.92102930037)*x_ref[1]**o+(0.0718981903454)*x_ref[1]
-        ref[0,0,2,1]=(-0.742950958383)*x_ref[0]**o+(0.0301464847722)*x_ref[0]+(0.466993477687)*x_ref[1]**o+(-0.402131750698)*x_ref[1]
-        ref[0,1,0,0]=(-0.0653776546375)*x_ref[0]**o+(-0.679360612372)*x_ref[0]+(-0.32783837768)*x_ref[1]**o+(-0.113753016428)*x_ref[1]
-        ref[0,1,0,1]=(0.58610119414)*x_ref[0]**o+(0.142613166231)*x_ref[0]+(0.0409105619986)*x_ref[1]**o+(-0.660641663558)*x_ref[1]
-        ref[0,1,1,0]=(0.212172308585)*x_ref[0]**o+(-0.452767768344)*x_ref[0]+(0.963053969889)*x_ref[1]**o+(0.752691773953)*x_ref[1]
-        ref[0,1,1,1]=(-0.514998377887)*x_ref[0]**o+(0.0872464329801)*x_ref[0]+(0.265590295505)*x_ref[1]**o+(0.557238826549)*x_ref[1]
-        ref[0,1,2,0]=(0.360523954724)*x_ref[0]**o+(0.550238402994)*x_ref[0]+(-0.206349415539)*x_ref[1]**o+(0.357304730511)*x_ref[1]
-        ref[0,1,2,1]=(-0.872755217435)*x_ref[0]**o+(0.190943683664)*x_ref[0]+(-0.245454292354)*x_ref[1]**o+(0.507229578506)*x_ref[1]
-        ref[0,2,0,0]=(0.994619505257)*x_ref[0]**o+(0.33482820568)*x_ref[0]+(-0.12721791236)*x_ref[1]**o+(-0.505873171195)*x_ref[1]
-        ref[0,2,0,1]=(0.224805131522)*x_ref[0]**o+(0.332022434603)*x_ref[0]+(0.0583494507268)*x_ref[1]**o+(0.857185410994)*x_ref[1]
-        ref[0,2,1,0]=(-0.425367077516)*x_ref[0]**o+(-0.25207101061)*x_ref[0]+(-0.11164491753)*x_ref[1]**o+(0.44752084285)*x_ref[1]
-        ref[0,2,1,1]=(-0.158725210751)*x_ref[0]**o+(-0.0692363138932)*x_ref[0]+(0.214803128256)*x_ref[1]**o+(0.886699106748)*x_ref[1]
-        ref[0,2,2,0]=(-0.332146331257)*x_ref[0]**o+(0.114845050128)*x_ref[0]+(-0.0781411611124)*x_ref[1]**o+(0.474972057387)*x_ref[1]
-        ref[0,2,2,1]=(-0.481949630694)*x_ref[0]**o+(0.644984972151)*x_ref[0]+(0.171146519527)*x_ref[1]**o+(0.57534803966)*x_ref[1]
-        ref[0,3,0,0]=(0.7580633024)*x_ref[0]**o+(0.0280511776577)*x_ref[0]+(0.375583652078)*x_ref[1]**o+(-0.809112787284)*x_ref[1]
-        ref[0,3,0,1]=(-0.466737159934)*x_ref[0]**o+(0.410032775686)*x_ref[0]+(0.176141189584)*x_ref[1]**o+(-0.228288309456)*x_ref[1]
-        ref[0,3,1,0]=(0.427129582196)*x_ref[0]**o+(-0.718385859483)*x_ref[0]+(-0.172261212989)*x_ref[1]**o+(0.913157476188)*x_ref[1]
-        ref[0,3,1,1]=(0.952506706487)*x_ref[0]**o+(-0.497478163899)*x_ref[0]+(-0.930273038716)*x_ref[1]**o+(0.673573149025)*x_ref[1]
-        ref[0,3,2,0]=(-0.0074302930747)*x_ref[0]**o+(0.226424842035)*x_ref[0]+(0.871190620671)*x_ref[1]**o+(0.277695333679)*x_ref[1]
-        ref[0,3,2,1]=(-0.540820239946)*x_ref[0]**o+(0.33044763211)*x_ref[0]+(-0.772648820924)*x_ref[1]**o+(-0.362410088021)*x_ref[1]
-        ref[0,4,0,0]=(-0.748396039111)*x_ref[0]**o+(0.215131518212)*x_ref[0]+(0.514087824403)*x_ref[1]**o+(0.335563854205)*x_ref[1]
-        ref[0,4,0,1]=(-0.443263590391)*x_ref[0]**o+(-0.523167282542)*x_ref[0]+(0.122612452799)*x_ref[1]**o+(0.216527857615)*x_ref[1]
-        ref[0,4,1,0]=(0.448176296777)*x_ref[0]**o+(0.478292146131)*x_ref[0]+(-0.558921083502)*x_ref[1]**o+(-0.17018258654)*x_ref[1]
-        ref[0,4,1,1]=(-0.912765673953)*x_ref[0]**o+(0.751746623223)*x_ref[0]+(-0.104811579057)*x_ref[1]**o+(0.456436870323)*x_ref[1]
-        ref[0,4,2,0]=(0.157946450932)*x_ref[0]**o+(0.147858587857)*x_ref[0]+(0.775747362874)*x_ref[1]**o+(0.478478862463)*x_ref[1]
-        ref[0,4,2,1]=(-0.819625058185)*x_ref[0]**o+(-0.0231980393919)*x_ref[0]+(-0.186647585522)*x_ref[1]**o+(0.513350371371)*x_ref[1]
-        ref[1,0,0,0]=(-0.942373946995)*x_ref[0]**o+(-0.761326160931)*x_ref[0]+(0.192511867167)*x_ref[1]**o+(-0.50895969579)*x_ref[1]
-        ref[1,0,0,1]=(0.0670813349951)*x_ref[0]**o+(0.55602953512)*x_ref[0]+(0.757621178635)*x_ref[1]**o+(0.741550201759)*x_ref[1]
-        ref[1,0,1,0]=(-0.114642609493)*x_ref[0]**o+(-0.639500048447)*x_ref[0]+(-0.861813039243)*x_ref[1]**o+(0.36413406744)*x_ref[1]
-        ref[1,0,1,1]=(0.126555451594)*x_ref[0]**o+(-0.885172557082)*x_ref[0]+(-0.376073252921)*x_ref[1]**o+(0.166102850653)*x_ref[1]
-        ref[1,0,2,0]=(-0.381517068219)*x_ref[0]**o+(0.94870328267)*x_ref[0]+(-0.129934777755)*x_ref[1]**o+(0.78090715758)*x_ref[1]
-        ref[1,0,2,1]=(-0.535852302247)*x_ref[0]**o+(0.63751039318)*x_ref[0]+(-0.537556159925)*x_ref[1]**o+(0.147766714221)*x_ref[1]
-        ref[1,1,0,0]=(-0.605543047533)*x_ref[0]**o+(-0.366612785372)*x_ref[0]+(0.544900149212)*x_ref[1]**o+(0.722108900447)*x_ref[1]
-        ref[1,1,0,1]=(0.133378561142)*x_ref[0]**o+(-0.227808772494)*x_ref[0]+(-0.729399624175)*x_ref[1]**o+(0.307571743455)*x_ref[1]
-        ref[1,1,1,0]=(0.0458830538139)*x_ref[0]**o+(0.0585044493026)*x_ref[0]+(-0.136630547605)*x_ref[1]**o+(-0.0823288389309)*x_ref[1]
-        ref[1,1,1,1]=(0.339263808784)*x_ref[0]**o+(0.00988917109076)*x_ref[0]+(-0.786591838083)*x_ref[1]**o+(-0.361686799179)*x_ref[1]
-        ref[1,1,2,0]=(0.789942037592)*x_ref[0]**o+(-0.266689758676)*x_ref[0]+(0.464856327495)*x_ref[1]**o+(0.138022774293)*x_ref[1]
-        ref[1,1,2,1]=(-0.723544867217)*x_ref[0]**o+(-0.523023674205)*x_ref[0]+(0.629726026331)*x_ref[1]**o+(-0.867808120997)*x_ref[1]
-        ref[1,2,0,0]=(-0.495589518787)*x_ref[0]**o+(-0.561664880262)*x_ref[0]+(0.0319320417078)*x_ref[1]**o+(-0.153720661498)*x_ref[1]
-        ref[1,2,0,1]=(0.293168114024)*x_ref[0]**o+(-0.344107163981)*x_ref[0]+(-0.275629670068)*x_ref[1]**o+(0.06103653487)*x_ref[1]
-        ref[1,2,1,0]=(0.495640927339)*x_ref[0]**o+(0.596540095043)*x_ref[0]+(0.208792567756)*x_ref[1]**o+(0.886040724145)*x_ref[1]
-        ref[1,2,1,1]=(0.331476398093)*x_ref[0]**o+(-0.472588572455)*x_ref[0]+(-0.455670457285)*x_ref[1]**o+(-0.731223615642)*x_ref[1]
-        ref[1,2,2,0]=(-0.127107829674)*x_ref[0]**o+(-0.21113128456)*x_ref[0]+(-0.733928194168)*x_ref[1]**o+(-0.174127696853)*x_ref[1]
-        ref[1,2,2,1]=(0.521879316151)*x_ref[0]**o+(0.983424557865)*x_ref[0]+(-0.288659660182)*x_ref[1]**o+(-0.431045203113)*x_ref[1]
-        ref[1,3,0,0]=(0.292348765746)*x_ref[0]**o+(0.0730741240915)*x_ref[0]+(0.079624022683)*x_ref[1]**o+(0.237483071633)*x_ref[1]
-        ref[1,3,0,1]=(0.291035771848)*x_ref[0]**o+(-0.482909477855)*x_ref[0]+(-0.999142129615)*x_ref[1]**o+(-0.559723367197)*x_ref[1]
-        ref[1,3,1,0]=(0.747096275653)*x_ref[0]**o+(0.762757649624)*x_ref[0]+(-0.821650889507)*x_ref[1]**o+(0.301128670189)*x_ref[1]
-        ref[1,3,1,1]=(0.82703681414)*x_ref[0]**o+(-0.336570070436)*x_ref[0]+(0.798131952979)*x_ref[1]**o+(0.603562737956)*x_ref[1]
-        ref[1,3,2,0]=(-0.164875914126)*x_ref[0]**o+(0.219409873902)*x_ref[0]+(0.784253160678)*x_ref[1]**o+(0.0219597460707)*x_ref[1]
-        ref[1,3,2,1]=(0.124778899794)*x_ref[0]**o+(0.785367842145)*x_ref[0]+(0.948111125908)*x_ref[1]**o+(-0.887427847089)*x_ref[1]
-        ref[1,4,0,0]=(0.0911816002883)*x_ref[0]**o+(0.645410022441)*x_ref[0]+(0.720551531965)*x_ref[1]**o+(-0.388407683413)*x_ref[1]
-        ref[1,4,0,1]=(-0.0416762613062)*x_ref[0]**o+(-0.548874829834)*x_ref[0]+(-0.377952555557)*x_ref[1]**o+(0.742795234361)*x_ref[1]
-        ref[1,4,1,0]=(-0.896929017971)*x_ref[0]**o+(0.678343686516)*x_ref[0]+(0.711572763082)*x_ref[1]**o+(-0.43397331651)*x_ref[1]
-        ref[1,4,1,1]=(-0.190804421566)*x_ref[0]**o+(-0.0848405124789)*x_ref[0]+(0.36246957905)*x_ref[1]**o+(0.963599086227)*x_ref[1]
-        ref[1,4,2,0]=(-0.0210248567982)*x_ref[0]**o+(0.545977814581)*x_ref[0]+(0.858962864401)*x_ref[1]**o+(0.113792851997)*x_ref[1]
-        ref[1,4,2,1]=(0.229641892622)*x_ref[0]**o+(-0.739561617198)*x_ref[0]+(-0.164372740617)*x_ref[1]**o+(0.537097868843)*x_ref[1]
-        ref[2,0,0,0]=(-0.13321389343)*x_ref[0]**o+(-0.668403350503)*x_ref[0]+(-0.924879105983)*x_ref[1]**o+(-0.5161790717)*x_ref[1]
-        ref[2,0,0,1]=(0.26582844685)*x_ref[0]**o+(0.89048660684)*x_ref[0]+(-0.377225981719)*x_ref[1]**o+(-0.303790710194)*x_ref[1]
-        ref[2,0,1,0]=(0.0997470860283)*x_ref[0]**o+(0.0385427264217)*x_ref[0]+(-0.71387347273)*x_ref[1]**o+(-0.621376499192)*x_ref[1]
-        ref[2,0,1,1]=(0.595544616326)*x_ref[0]**o+(-0.850529503975)*x_ref[0]+(0.602203957938)*x_ref[1]**o+(-0.329484843907)*x_ref[1]
-        ref[2,0,2,0]=(-0.106031967029)*x_ref[0]**o+(-0.165122821622)*x_ref[0]+(0.647473815919)*x_ref[1]**o+(0.28942226062)*x_ref[1]
-        ref[2,0,2,1]=(0.585955875472)*x_ref[0]**o+(0.922667710403)*x_ref[0]+(-0.0710905957841)*x_ref[1]**o+(-0.669138163697)*x_ref[1]
-        ref[2,1,0,0]=(0.461941211081)*x_ref[0]**o+(0.723022466263)*x_ref[0]+(-0.118551893472)*x_ref[1]**o+(0.00445187353637)*x_ref[1]
-        ref[2,1,0,1]=(-0.253168248108)*x_ref[0]**o+(0.476938842605)*x_ref[0]+(0.476641658034)*x_ref[1]**o+(-0.916886387595)*x_ref[1]
-        ref[2,1,1,0]=(0.722029309503)*x_ref[0]**o+(0.0588848593425)*x_ref[0]+(0.84737370043)*x_ref[1]**o+(-0.674604415213)*x_ref[1]
-        ref[2,1,1,1]=(-0.644736759298)*x_ref[0]**o+(-0.212847303893)*x_ref[0]+(0.25394587552)*x_ref[1]**o+(-0.366955175081)*x_ref[1]
-        ref[2,1,2,0]=(-0.657395296801)*x_ref[0]**o+(-0.967570027599)*x_ref[0]+(0.180926628541)*x_ref[1]**o+(-0.940599897942)*x_ref[1]
-        ref[2,1,2,1]=(0.849897328801)*x_ref[0]**o+(-0.299199474051)*x_ref[0]+(0.427221207827)*x_ref[1]**o+(0.212027985441)*x_ref[1]
-        ref[2,2,0,0]=(-0.561573507381)*x_ref[0]**o+(-0.446925224908)*x_ref[0]+(0.132091224948)*x_ref[1]**o+(-0.673375661849)*x_ref[1]
-        ref[2,2,0,1]=(-0.386657291574)*x_ref[0]**o+(0.356784637112)*x_ref[0]+(0.644292006233)*x_ref[1]**o+(0.922937167842)*x_ref[1]
-        ref[2,2,1,0]=(0.484446757285)*x_ref[0]**o+(-0.822469870455)*x_ref[0]+(-0.89605890123)*x_ref[1]**o+(-0.895891500031)*x_ref[1]
-        ref[2,2,1,1]=(-0.0930740520192)*x_ref[0]**o+(0.953356473678)*x_ref[0]+(-0.714418458806)*x_ref[1]**o+(-0.100584950946)*x_ref[1]
-        ref[2,2,2,0]=(0.945572242667)*x_ref[0]**o+(-0.259280849605)*x_ref[0]+(-0.925459846341)*x_ref[1]**o+(0.906002758873)*x_ref[1]
-        ref[2,2,2,1]=(-0.638993332975)*x_ref[0]**o+(-0.668594641703)*x_ref[0]+(0.012666231369)*x_ref[1]**o+(0.89732685856)*x_ref[1]
-        ref[2,3,0,0]=(-0.885061116144)*x_ref[0]**o+(-0.576097536483)*x_ref[0]+(-0.43166075788)*x_ref[1]**o+(0.538821620917)*x_ref[1]
-        ref[2,3,0,1]=(-0.0743638381797)*x_ref[0]**o+(0.251037500035)*x_ref[0]+(-0.905989928076)*x_ref[1]**o+(0.243771000867)*x_ref[1]
-        ref[2,3,1,0]=(-0.016045622351)*x_ref[0]**o+(-0.632944072174)*x_ref[0]+(-0.296175918793)*x_ref[1]**o+(-0.00120123641365)*x_ref[1]
-        ref[2,3,1,1]=(-0.896354921812)*x_ref[0]**o+(-0.331348989027)*x_ref[0]+(-0.450865285201)*x_ref[1]**o+(-0.243268582009)*x_ref[1]
-        ref[2,3,2,0]=(0.609332927431)*x_ref[0]**o+(-0.0815856802115)*x_ref[0]+(0.201924792273)*x_ref[1]**o+(-0.890424451348)*x_ref[1]
-        ref[2,3,2,1]=(0.395090137264)*x_ref[0]**o+(0.294230442573)*x_ref[0]+(-0.345371510364)*x_ref[1]**o+(0.181229663241)*x_ref[1]
-        ref[2,4,0,0]=(-0.823684509034)*x_ref[0]**o+(0.431019301942)*x_ref[0]+(0.554707015054)*x_ref[1]**o+(-0.846322903003)*x_ref[1]
-        ref[2,4,0,1]=(0.862984476658)*x_ref[0]**o+(0.20512500102)*x_ref[0]+(0.0247756159287)*x_ref[1]**o+(-0.374795100946)*x_ref[1]
-        ref[2,4,1,0]=(-0.0849914269517)*x_ref[0]**o+(0.754908200339)*x_ref[0]+(0.593363754807)*x_ref[1]**o+(0.124923961126)*x_ref[1]
-        ref[2,4,1,1]=(-0.691440264234)*x_ref[0]**o+(0.825739298015)*x_ref[0]+(0.426452231478)*x_ref[1]**o+(0.0995610721341)*x_ref[1]
-        ref[2,4,2,0]=(-0.175322750567)*x_ref[0]**o+(0.419750865569)*x_ref[0]+(0.208448987712)*x_ref[1]**o+(0.150584798952)*x_ref[1]
-        ref[2,4,2,1]=(0.931680152344)*x_ref[0]**o+(0.390947206307)*x_ref[0]+(0.388437348378)*x_ref[1]**o+(-0.808413079032)*x_ref[1]
-        ref[3,0,0,0]=(0.58855431402)*x_ref[0]**o+(0.383865913364)*x_ref[0]+(-0.691445323219)*x_ref[1]**o+(-0.443370658523)*x_ref[1]
-        ref[3,0,0,1]=(-0.657371481478)*x_ref[0]**o+(0.746891082673)*x_ref[0]+(-0.829229947773)*x_ref[1]**o+(0.761915670404)*x_ref[1]
-        ref[3,0,1,0]=(-0.431502932714)*x_ref[0]**o+(-0.961472285716)*x_ref[0]+(0.0423384388031)*x_ref[1]**o+(0.339373458118)*x_ref[1]
-        ref[3,0,1,1]=(-0.272831163259)*x_ref[0]**o+(-0.533438904494)*x_ref[0]+(-0.595625384875)*x_ref[1]**o+(0.0366857022323)*x_ref[1]
-        ref[3,0,2,0]=(-0.319684662306)*x_ref[0]**o+(0.672185828912)*x_ref[0]+(0.483126548994)*x_ref[1]**o+(0.745872629604)*x_ref[1]
-        ref[3,0,2,1]=(0.437895277404)*x_ref[0]**o+(-0.337209416963)*x_ref[0]+(0.101080522788)*x_ref[1]**o+(0.892022488644)*x_ref[1]
-        ref[3,1,0,0]=(-0.582325078455)*x_ref[0]**o+(-0.854689347157)*x_ref[0]+(0.0308638312259)*x_ref[1]**o+(0.633382365704)*x_ref[1]
-        ref[3,1,0,1]=(0.319735178376)*x_ref[0]**o+(-0.782764593952)*x_ref[0]+(0.082230132244)*x_ref[1]**o+(-0.946010937852)*x_ref[1]
-        ref[3,1,1,0]=(-0.698490410666)*x_ref[0]**o+(-0.801358802689)*x_ref[0]+(0.20695648235)*x_ref[1]**o+(0.75257523471)*x_ref[1]
-        ref[3,1,1,1]=(0.66321696527)*x_ref[0]**o+(0.704572918868)*x_ref[0]+(0.528208879002)*x_ref[1]**o+(-0.408378325513)*x_ref[1]
-        ref[3,1,2,0]=(-0.925177198417)*x_ref[0]**o+(-0.152427811549)*x_ref[0]+(0.341781993583)*x_ref[1]**o+(-0.589976456377)*x_ref[1]
-        ref[3,1,2,1]=(0.206706628353)*x_ref[0]**o+(0.673777173329)*x_ref[0]+(-0.994138314254)*x_ref[1]**o+(-0.843696565863)*x_ref[1]
-        ref[3,2,0,0]=(-0.588881067333)*x_ref[0]**o+(-0.537572388341)*x_ref[0]+(-0.206570371675)*x_ref[1]**o+(-0.127468554294)*x_ref[1]
-        ref[3,2,0,1]=(0.498638284096)*x_ref[0]**o+(-0.488278831086)*x_ref[0]+(-0.28320874594)*x_ref[1]**o+(-0.638241576615)*x_ref[1]
-        ref[3,2,1,0]=(-0.445780790822)*x_ref[0]**o+(-0.347493953089)*x_ref[0]+(-0.558010086232)*x_ref[1]**o+(-0.0287339307689)*x_ref[1]
-        ref[3,2,1,1]=(-0.361727811272)*x_ref[0]**o+(-0.559565378007)*x_ref[0]+(-0.211685558972)*x_ref[1]**o+(0.330088396811)*x_ref[1]
-        ref[3,2,2,0]=(-0.42600117831)*x_ref[0]**o+(-0.488997111988)*x_ref[0]+(0.127421278051)*x_ref[1]**o+(-0.48233167806)*x_ref[1]
-        ref[3,2,2,1]=(0.120468829686)*x_ref[0]**o+(0.0675603906118)*x_ref[0]+(-0.60674361864)*x_ref[1]**o+(0.639115708258)*x_ref[1]
-        ref[3,3,0,0]=(0.369343033015)*x_ref[0]**o+(0.707735743593)*x_ref[0]+(-0.426275591836)*x_ref[1]**o+(-0.733377765625)*x_ref[1]
-        ref[3,3,0,1]=(-0.931245338156)*x_ref[0]**o+(-0.465861794185)*x_ref[0]+(-0.650664500687)*x_ref[1]**o+(0.103077662402)*x_ref[1]
-        ref[3,3,1,0]=(0.731834744512)*x_ref[0]**o+(0.267840571071)*x_ref[0]+(0.952106457495)*x_ref[1]**o+(-0.943845364366)*x_ref[1]
-        ref[3,3,1,1]=(-0.21692720916)*x_ref[0]**o+(0.580841374997)*x_ref[0]+(-0.412129341223)*x_ref[1]**o+(0.40414445304)*x_ref[1]
-        ref[3,3,2,0]=(-0.447758598726)*x_ref[0]**o+(0.0616926352912)*x_ref[0]+(-0.824624226122)*x_ref[1]**o+(0.19099833104)*x_ref[1]
-        ref[3,3,2,1]=(-0.615519138165)*x_ref[0]**o+(0.233926822164)*x_ref[0]+(-0.969014060236)*x_ref[1]**o+(0.835103627893)*x_ref[1]
-        ref[3,4,0,0]=(0.550778983301)*x_ref[0]**o+(0.0198253530882)*x_ref[0]+(-0.39383849187)*x_ref[1]**o+(0.367721826304)*x_ref[1]
-        ref[3,4,0,1]=(0.444877923149)*x_ref[0]**o+(-0.899159835223)*x_ref[0]+(0.923392540452)*x_ref[1]**o+(0.512905141718)*x_ref[1]
-        ref[3,4,1,0]=(-0.563807675145)*x_ref[0]**o+(0.994405383899)*x_ref[0]+(-0.777352948218)*x_ref[1]**o+(0.865994906227)*x_ref[1]
-        ref[3,4,1,1]=(-0.593800452139)*x_ref[0]**o+(0.613778803237)*x_ref[0]+(0.582200979718)*x_ref[1]**o+(0.448026243271)*x_ref[1]
-        ref[3,4,2,0]=(-0.900331125416)*x_ref[0]**o+(0.234613965424)*x_ref[0]+(0.510400273805)*x_ref[1]**o+(0.0836773641661)*x_ref[1]
-        ref[3,4,2,1]=(0.710999097307)*x_ref[0]**o+(0.886603988265)*x_ref[0]+(-0.405644887679)*x_ref[1]**o+(0.362257258809)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.310272924207)*x[0]**o+(-0.664497806351)*x[0]+(0.741942132609)*x[1]**o+(0.636051298779)*x[1]+(0.76627159146)*x[2]**o+(0.492960732588)*x[2]
-        arg[0,0,0,1]=(-0.513740801773)*x[0]**o+(-0.633330750909)*x[0]+(0.177934618983)*x[1]**o+(-0.323745723166)*x[1]+(0.694167180904)*x[2]**o+(0.441239251435)*x[2]
-        arg[0,0,1,0]=(0.417477695848)*x[0]**o+(-0.923415976002)*x[0]+(0.0765555276662)*x[1]**o+(-0.277290890834)*x[1]+(0.0177191326614)*x[2]**o+(-0.0842520100387)*x[2]
-        arg[0,0,1,1]=(-0.761916249894)*x[0]**o+(0.169673139552)*x[0]+(0.0306290828795)*x[1]**o+(0.842234592613)*x[1]+(-0.350342692669)*x[2]**o+(0.321292270658)*x[2]
-        arg[0,0,2,0]=(-0.707494137624)*x[0]**o+(0.346873490395)*x[0]+(-0.68281925138)*x[1]**o+(-0.830538083274)*x[1]+(0.329372141613)*x[2]**o+(-0.121366157163)*x[2]
-        arg[0,0,2,1]=(-0.708018186507)*x[0]**o+(-0.778051239314)*x[0]+(-0.43106291563)*x[1]**o+(-0.0115914251143)*x[1]+(0.487334215892)*x[2]**o+(-0.289232284658)*x[2]
-        arg[0,1,0,0]=(0.530614704199)*x[0]**o+(0.518622028317)*x[0]+(-0.0143129589551)*x[1]**o+(0.808469352257)*x[1]+(-0.156787373225)*x[2]**o+(0.668887813143)*x[2]
-        arg[0,1,0,1]=(0.953223233706)*x[0]**o+(-0.164323838353)*x[0]+(0.336717320858)*x[1]**o+(-0.520230488172)*x[1]+(0.689960738002)*x[2]**o+(0.487630947578)*x[2]
-        arg[0,1,1,0]=(-0.418095373429)*x[0]**o+(-0.941817844939)*x[0]+(0.88105115607)*x[1]**o+(-0.820502501439)*x[1]+(-0.693858267667)*x[2]**o+(0.530567713127)*x[2]
-        arg[0,1,1,1]=(-0.716861320218)*x[0]**o+(-0.736619859467)*x[0]+(-0.885478605601)*x[1]**o+(-0.129375578967)*x[1]+(-0.0181433907318)*x[2]**o+(0.373255537959)*x[2]
-        arg[0,1,2,0]=(-0.174742583167)*x[0]**o+(-0.0887967480112)*x[0]+(-0.291168698662)*x[1]**o+(-0.188608506769)*x[1]+(0.22479613454)*x[2]**o+(0.34173928582)*x[2]
-        arg[0,1,2,1]=(0.117208929504)*x[0]**o+(-0.420969282079)*x[0]+(0.585298109836)*x[1]**o+(0.771355162745)*x[1]+(-0.51374493747)*x[2]**o+(0.785016548855)*x[2]
-        arg[0,2,0,0]=(0.737394887886)*x[0]**o+(0.966080271342)*x[0]+(-0.373178384492)*x[1]**o+(-0.845505386142)*x[1]+(-0.274654519371)*x[2]**o+(0.709356557887)*x[2]
-        arg[0,2,0,1]=(0.0365864090636)*x[0]**o+(-0.393382479787)*x[0]+(0.018273360977)*x[1]**o+(-0.509201909328)*x[1]+(-0.777852392534)*x[2]**o+(0.0417280247507)*x[2]
-        arg[0,2,1,0]=(0.637829302751)*x[0]**o+(-0.767824790186)*x[0]+(0.843382009511)*x[1]**o+(-0.599633234403)*x[1]+(0.14283138941)*x[2]**o+(-0.354404633991)*x[2]
-        arg[0,2,1,1]=(-0.465258613599)*x[0]**o+(0.09341154383)*x[0]+(-0.629114782988)*x[1]**o+(0.91608655383)*x[1]+(-0.692901135848)*x[2]**o+(-0.707225310667)*x[2]
-        arg[0,2,2,0]=(0.9935958759)*x[0]**o+(-0.385008742466)*x[0]+(0.153885356854)*x[1]**o+(0.146270680656)*x[1]+(0.305838410343)*x[2]**o+(0.141193552717)*x[2]
-        arg[0,2,2,1]=(-0.487538023894)*x[0]**o+(-0.814283442647)*x[0]+(0.166008520199)*x[1]**o+(0.313655774416)*x[1]+(0.282308782973)*x[2]**o+(0.309176062484)*x[2]
-        arg[0,3,0,0]=(0.00203507798913)*x[0]**o+(-0.19902542604)*x[0]+(0.88110918624)*x[1]**o+(0.223549219288)*x[1]+(0.135758952369)*x[2]**o+(0.59116783639)*x[2]
-        arg[0,3,0,1]=(-0.185063700767)*x[0]**o+(0.833862155173)*x[0]+(-0.0939117509645)*x[1]**o+(0.288003692231)*x[1]+(0.580196157839)*x[2]**o+(0.299320177754)*x[2]
-        arg[0,3,1,0]=(-0.039100718826)*x[0]**o+(0.423179869395)*x[0]+(-0.013669578975)*x[1]**o+(-0.355053343085)*x[1]+(0.89285158975)*x[2]**o+(0.392984367877)*x[2]
-        arg[0,3,1,1]=(0.0988989416429)*x[0]**o+(-0.446243235174)*x[0]+(-0.691253313617)*x[1]**o+(0.338823693086)*x[1]+(0.707054126334)*x[2]**o+(0.601121388278)*x[2]
-        arg[0,3,2,0]=(-0.191366770484)*x[0]**o+(0.961791275903)*x[0]+(-0.103547475035)*x[1]**o+(-0.745236510079)*x[1]+(-0.157506981712)*x[2]**o+(0.986229506787)*x[2]
-        arg[0,3,2,1]=(-0.886091883647)*x[0]**o+(0.6979804248)*x[0]+(-0.366575419428)*x[1]**o+(-0.958601153259)*x[1]+(-0.0119724511494)*x[2]**o+(-0.76101132076)*x[2]
-        arg[0,4,0,0]=(0.923290554434)*x[0]**o+(0.411359492198)*x[0]+(-0.977999562875)*x[1]**o+(0.352085161527)*x[1]+(0.955745235349)*x[2]**o+(-0.978885609257)*x[2]
-        arg[0,4,0,1]=(0.226973479105)*x[0]**o+(-0.423881897251)*x[0]+(0.889101969481)*x[1]**o+(-0.994236389028)*x[1]+(0.0159169033361)*x[2]**o+(-0.559935154203)*x[2]
-        arg[0,4,1,0]=(-0.225427291797)*x[0]**o+(-0.557334621848)*x[0]+(-0.486252586142)*x[1]**o+(0.0497120905216)*x[1]+(0.84165736691)*x[2]**o+(-0.185010156797)*x[2]
-        arg[0,4,1,1]=(0.762694602609)*x[0]**o+(-0.447367170727)*x[0]+(-0.61103181818)*x[1]**o+(0.689761057656)*x[1]+(-0.631855120122)*x[2]**o+(0.33274655602)*x[2]
-        arg[0,4,2,0]=(-0.198884868914)*x[0]**o+(0.716371959278)*x[0]+(0.260871768919)*x[1]**o+(0.622241740082)*x[1]+(0.774103524035)*x[2]**o+(0.186132703676)*x[2]
-        arg[0,4,2,1]=(-0.309450645317)*x[0]**o+(0.204754571336)*x[0]+(0.483402810171)*x[1]**o+(0.404620744188)*x[1]+(-0.699137246959)*x[2]**o+(0.467428706196)*x[2]
-        arg[1,0,0,0]=(0.642289506448)*x[0]**o+(0.383990304394)*x[0]+(0.556940973318)*x[1]**o+(0.135219729041)*x[1]+(0.577195836358)*x[2]**o+(-0.338924419674)*x[2]
-        arg[1,0,0,1]=(-0.920873911295)*x[0]**o+(-0.330610192304)*x[0]+(-0.117226803856)*x[1]**o+(0.172482867684)*x[1]+(0.909140902709)*x[2]**o+(-0.590494167913)*x[2]
-        arg[1,0,1,0]=(0.210161538861)*x[0]**o+(-0.83860241761)*x[0]+(0.0257180382661)*x[1]**o+(0.877633854348)*x[1]+(0.26045311754)*x[2]**o+(-0.971349902714)*x[2]
-        arg[1,0,1,1]=(0.70736843125)*x[0]**o+(-0.765121985431)*x[0]+(-0.196525225943)*x[1]**o+(-0.175928729346)*x[1]+(0.945523028748)*x[2]**o+(0.877830322823)*x[2]
-        arg[1,0,2,0]=(-0.963513016065)*x[0]**o+(0.0820537856351)*x[0]+(0.0122070196118)*x[1]**o+(-0.154147449592)*x[1]+(0.323844633268)*x[2]**o+(-0.124897698214)*x[2]
-        arg[1,0,2,1]=(0.656267566405)*x[0]**o+(0.0174786620768)*x[0]+(0.763902435618)*x[1]**o+(-0.986021506043)*x[1]+(0.632625555994)*x[2]**o+(-0.110657743523)*x[2]
-        arg[1,1,0,0]=(0.00354144688732)*x[0]**o+(-0.813515808171)*x[0]+(-0.100717717446)*x[1]**o+(0.0543708163629)*x[1]+(0.785927880762)*x[2]**o+(0.0109166652227)*x[2]
-        arg[1,1,0,1]=(-0.239705688631)*x[0]**o+(0.402915642509)*x[0]+(0.463371068163)*x[1]**o+(-0.507302462928)*x[1]+(-0.0789844128295)*x[2]**o+(0.669144891499)*x[2]
-        arg[1,1,1,0]=(-0.491891367001)*x[0]**o+(-0.524377636928)*x[0]+(0.903091863917)*x[1]**o+(-0.554368807183)*x[1]+(0.332899195339)*x[2]**o+(-0.645216147049)*x[2]
-        arg[1,1,1,1]=(-0.915843941243)*x[0]**o+(-0.233175654748)*x[0]+(0.467730425037)*x[1]**o+(-0.765957936683)*x[1]+(0.726678877276)*x[2]**o+(0.770533947942)*x[2]
-        arg[1,1,2,0]=(0.678071852032)*x[0]**o+(0.266537844237)*x[0]+(0.324335300151)*x[1]**o+(-0.286713971373)*x[1]+(-0.702384414014)*x[2]**o+(0.887198276519)*x[2]
-        arg[1,1,2,1]=(0.0466444959648)*x[0]**o+(0.689162912677)*x[0]+(-0.35033923676)*x[1]**o+(-0.0536380766876)*x[1]+(-0.511833442517)*x[2]**o+(0.125566299829)*x[2]
-        arg[1,2,0,0]=(-0.803170431622)*x[0]**o+(0.476211169752)*x[0]+(-0.170510267953)*x[1]**o+(-0.765945735317)*x[1]+(-0.169966329291)*x[2]**o+(-0.988525918724)*x[2]
-        arg[1,2,0,1]=(0.289618751212)*x[0]**o+(0.294379040976)*x[0]+(-0.922478416838)*x[1]**o+(0.210546495537)*x[1]+(-0.87266381496)*x[2]**o+(-0.865571669577)*x[2]
-        arg[1,2,1,0]=(-0.292811054005)*x[0]**o+(0.651280833746)*x[0]+(-0.625004203736)*x[1]**o+(0.372078169172)*x[1]+(-0.0539099055169)*x[2]**o+(0.0911869270008)*x[2]
-        arg[1,2,1,1]=(0.496217698294)*x[0]**o+(-0.986021787133)*x[0]+(0.246417059532)*x[1]**o+(0.610226802401)*x[1]+(0.991534665298)*x[2]**o+(-0.507441185982)*x[2]
-        arg[1,2,2,0]=(-0.839902565947)*x[0]**o+(-0.279607147278)*x[0]+(0.278212307963)*x[1]**o+(0.609793640036)*x[1]+(0.940471913774)*x[2]**o+(0.21860828705)*x[2]
-        arg[1,2,2,1]=(0.789578112278)*x[0]**o+(-0.0226697818608)*x[0]+(0.216321340291)*x[1]**o+(-0.701818463454)*x[1]+(-0.166689030646)*x[2]**o+(0.966131542292)*x[2]
-        arg[1,3,0,0]=(0.149337042551)*x[0]**o+(-0.785050579674)*x[0]+(0.530219924721)*x[1]**o+(-0.971927239398)*x[1]+(0.950917908603)*x[2]**o+(0.132668077447)*x[2]
-        arg[1,3,0,1]=(0.983081559724)*x[0]**o+(-0.358694498455)*x[0]+(0.181080099281)*x[1]**o+(-0.699756291643)*x[1]+(-0.744335953304)*x[2]**o+(0.00262043221382)*x[2]
-        arg[1,3,1,0]=(0.31776032045)*x[0]**o+(-0.0726184220029)*x[0]+(-0.759883735971)*x[1]**o+(-0.6389710873)*x[1]+(-0.607858499502)*x[2]**o+(-0.397169895784)*x[2]
-        arg[1,3,1,1]=(-0.950468389728)*x[0]**o+(0.831121915521)*x[0]+(0.552857011083)*x[1]**o+(0.848599672594)*x[1]+(0.432183564231)*x[2]**o+(0.57537721362)*x[2]
-        arg[1,3,2,0]=(0.736080143601)*x[0]**o+(-0.804140307747)*x[0]+(-0.163864867884)*x[1]**o+(0.950874042315)*x[1]+(-0.99676139412)*x[2]**o+(0.332320294246)*x[2]
-        arg[1,3,2,1]=(0.119082582041)*x[0]**o+(-0.969740778852)*x[0]+(0.828432583532)*x[1]**o+(0.190324050395)*x[1]+(-0.42639142674)*x[2]**o+(0.315519578192)*x[2]
-        arg[1,4,0,0]=(-0.798465141775)*x[0]**o+(-0.717282977908)*x[0]+(0.935655148713)*x[1]**o+(-0.655752964484)*x[1]+(0.159990149099)*x[2]**o+(-0.537115062687)*x[2]
-        arg[1,4,0,1]=(0.445151775007)*x[0]**o+(-0.867956302051)*x[0]+(-0.809856879825)*x[1]**o+(-0.326897750981)*x[1]+(0.756352311987)*x[2]**o+(0.577585513459)*x[2]
-        arg[1,4,1,0]=(0.294243347591)*x[0]**o+(0.774741656931)*x[0]+(-0.0799985737984)*x[1]**o+(0.179789107412)*x[1]+(-0.612198025189)*x[2]**o+(-0.07086009611)*x[2]
-        arg[1,4,1,1]=(0.0692586287045)*x[0]**o+(-0.671956300122)*x[0]+(-0.948667104683)*x[1]**o+(0.68656246801)*x[1]+(-0.352975297696)*x[2]**o+(0.277952113716)*x[2]
-        arg[1,4,2,0]=(-0.491316095517)*x[0]**o+(0.725899087239)*x[0]+(0.634113963431)*x[1]**o+(0.235694393453)*x[1]+(-0.15600720713)*x[2]**o+(0.954814976539)*x[2]
-        arg[1,4,2,1]=(0.120206996339)*x[0]**o+(-0.86151411823)*x[0]+(-0.137093650097)*x[1]**o+(0.633402978246)*x[1]+(-0.42515364728)*x[2]**o+(-0.987634210617)*x[2]
-        arg[2,0,0,0]=(0.539463971222)*x[0]**o+(-0.03435650579)*x[0]+(-0.884395295544)*x[1]**o+(0.215454879022)*x[1]+(0.842377328246)*x[2]**o+(0.370920136871)*x[2]
-        arg[2,0,0,1]=(-0.411505463039)*x[0]**o+(0.446494039439)*x[0]+(0.0313771969556)*x[1]**o+(0.602893223061)*x[1]+(-0.30383490021)*x[2]**o+(-0.788028756758)*x[2]
-        arg[2,0,1,0]=(0.489009615999)*x[0]**o+(-0.95508248016)*x[0]+(-0.21489475022)*x[1]**o+(-0.857263478431)*x[1]+(-0.123703409045)*x[2]**o+(0.663389562431)*x[2]
-        arg[2,0,1,1]=(-0.0224763310929)*x[0]**o+(-0.315886249237)*x[0]+(-0.318201849695)*x[1]**o+(0.423732682462)*x[1]+(0.396065636381)*x[2]**o+(0.0816717878865)*x[2]
-        arg[2,0,2,0]=(-0.191432618224)*x[0]**o+(0.688389390795)*x[0]+(-0.382948112159)*x[1]**o+(0.562905173818)*x[1]+(-0.118396714029)*x[2]**o+(0.234478642577)*x[2]
-        arg[2,0,2,1]=(-0.348008173171)*x[0]**o+(0.191994166636)*x[0]+(0.450556057147)*x[1]**o+(-0.710821693343)*x[1]+(-0.245119333857)*x[2]**o+(0.262869525239)*x[2]
-        arg[2,1,0,0]=(-0.160444506203)*x[0]**o+(-0.816142837432)*x[0]+(-0.619722480492)*x[1]**o+(-0.989077039675)*x[1]+(-0.0282349103977)*x[2]**o+(-0.629849819691)*x[2]
-        arg[2,1,0,1]=(0.379513765297)*x[0]**o+(0.934652105586)*x[0]+(-0.632636427868)*x[1]**o+(-0.0492550496553)*x[1]+(0.137733572307)*x[2]**o+(0.779782637942)*x[2]
-        arg[2,1,1,0]=(0.469499320417)*x[0]**o+(0.570880924125)*x[0]+(-0.0329833251419)*x[1]**o+(-0.0388751034604)*x[1]+(-0.878520094389)*x[2]**o+(0.992656649048)*x[2]
-        arg[2,1,1,1]=(0.592005181995)*x[0]**o+(-0.553980493526)*x[0]+(0.359837665019)*x[1]**o+(0.811107941179)*x[1]+(-0.441929650912)*x[2]**o+(-0.768618378636)*x[2]
-        arg[2,1,2,0]=(0.741376258816)*x[0]**o+(-0.238909756717)*x[0]+(0.204631082449)*x[1]**o+(0.970501662949)*x[1]+(-0.615638092239)*x[2]**o+(-0.575948750844)*x[2]
-        arg[2,1,2,1]=(0.774050933112)*x[0]**o+(-0.872234076721)*x[0]+(-0.0936189240061)*x[1]**o+(-0.773608756961)*x[1]+(-0.119171907808)*x[2]**o+(-0.256124796845)*x[2]
-        arg[2,2,0,0]=(0.459481754425)*x[0]**o+(0.478364929493)*x[0]+(0.460199733287)*x[1]**o+(0.66880294659)*x[1]+(-0.859525058389)*x[2]**o+(0.77960284414)*x[2]
-        arg[2,2,0,1]=(0.690557835207)*x[0]**o+(-0.812305038592)*x[0]+(0.837924124791)*x[1]**o+(-0.785979206364)*x[1]+(-0.295553949819)*x[2]**o+(0.575096295897)*x[2]
-        arg[2,2,1,0]=(0.443193683205)*x[0]**o+(0.0355033222253)*x[0]+(0.497641002766)*x[1]**o+(-0.636955142451)*x[1]+(-0.265324357454)*x[2]**o+(0.734148569078)*x[2]
-        arg[2,2,1,1]=(-0.088707242599)*x[0]**o+(0.513403518669)*x[0]+(0.337741737651)*x[1]**o+(-0.174843924478)*x[1]+(0.687291255986)*x[2]**o+(0.473850502258)*x[2]
-        arg[2,2,2,0]=(0.5305624642)*x[0]**o+(-0.972997835953)*x[0]+(0.00197107287888)*x[1]**o+(-0.75490872634)*x[1]+(-0.0569624569435)*x[2]**o+(-0.0780532868631)*x[2]
-        arg[2,2,2,1]=(-0.744584471866)*x[0]**o+(0.915494909272)*x[0]+(0.239235050038)*x[1]**o+(-0.192466753187)*x[1]+(0.933556550824)*x[2]**o+(-0.786420251487)*x[2]
-        arg[2,3,0,0]=(0.472114530627)*x[0]**o+(0.0693211807557)*x[0]+(-0.274273425713)*x[1]**o+(0.136242554894)*x[1]+(-0.329240675785)*x[2]**o+(0.0212539247343)*x[2]
-        arg[2,3,0,1]=(-0.780426108099)*x[0]**o+(-0.632382551025)*x[0]+(0.554926949239)*x[1]**o+(0.264204009059)*x[1]+(-0.868007525824)*x[2]**o+(-0.937631120201)*x[2]
-        arg[2,3,1,0]=(-0.826692080947)*x[0]**o+(0.915241858538)*x[0]+(-0.49986160859)*x[1]**o+(0.921686464658)*x[1]+(0.71996666304)*x[2]**o+(0.297609501096)*x[2]
-        arg[2,3,1,1]=(0.991896994614)*x[0]**o+(-0.543310008103)*x[0]+(0.0791899631111)*x[1]**o+(-0.914088200145)*x[1]+(-0.496337624951)*x[2]**o+(0.708950898614)*x[2]
-        arg[2,3,2,0]=(-0.235116966432)*x[0]**o+(-0.492848730207)*x[0]+(0.428728646789)*x[1]**o+(-0.410747634691)*x[1]+(0.705059815458)*x[2]**o+(-0.185604633831)*x[2]
-        arg[2,3,2,1]=(0.838829037117)*x[0]**o+(0.670561147563)*x[0]+(0.621407965075)*x[1]**o+(-0.10624946305)*x[1]+(0.893703402687)*x[2]**o+(0.985504995821)*x[2]
-        arg[2,4,0,0]=(0.635072504682)*x[0]**o+(-0.681962427555)*x[0]+(-0.00774518011081)*x[1]**o+(-0.264996228668)*x[1]+(0.690668403198)*x[2]**o+(0.883573761062)*x[2]
-        arg[2,4,0,1]=(0.545632268651)*x[0]**o+(0.439668519394)*x[0]+(-0.482479808491)*x[1]**o+(0.752028962391)*x[1]+(0.0596773623939)*x[2]**o+(-0.369987181127)*x[2]
-        arg[2,4,1,0]=(0.659005322796)*x[0]**o+(0.503940833428)*x[0]+(0.643633321586)*x[1]**o+(0.927082323252)*x[1]+(0.354072146184)*x[2]**o+(-0.638737560608)*x[2]
-        arg[2,4,1,1]=(-0.443548860913)*x[0]**o+(0.707607048458)*x[0]+(-0.955225746402)*x[1]**o+(0.515995563585)*x[1]+(-0.288406637165)*x[2]**o+(-0.760864937318)*x[2]
-        arg[2,4,2,0]=(0.898146580355)*x[0]**o+(-0.590650787106)*x[0]+(0.036095789753)*x[1]**o+(0.326040260581)*x[1]+(0.680069361306)*x[2]**o+(0.333839099341)*x[2]
-        arg[2,4,2,1]=(-0.151364260271)*x[0]**o+(-0.675198183832)*x[0]+(-0.183626298978)*x[1]**o+(-0.182565217146)*x[1]+(0.0345632129814)*x[2]**o+(-0.581534100763)*x[2]
-        arg[3,0,0,0]=(-0.942351703246)*x[0]**o+(-0.699567649453)*x[0]+(-0.832068665702)*x[1]**o+(0.163439416504)*x[1]+(0.742500339519)*x[2]**o+(-0.492882887489)*x[2]
-        arg[3,0,0,1]=(0.990078296484)*x[0]**o+(-0.999837336587)*x[0]+(0.197589456459)*x[1]**o+(0.431403059019)*x[1]+(0.859864015871)*x[2]**o+(-0.267474829282)*x[2]
-        arg[3,0,1,0]=(-0.776773660723)*x[0]**o+(-0.189048370486)*x[0]+(0.926953856802)*x[1]**o+(-0.72314744652)*x[1]+(0.330064363809)*x[2]**o+(0.188533334359)*x[2]
-        arg[3,0,1,1]=(-0.854830058762)*x[0]**o+(0.832073883276)*x[0]+(-0.425691165124)*x[1]**o+(0.162351500316)*x[1]+(0.370604864512)*x[2]**o+(-0.581907071484)*x[2]
-        arg[3,0,2,0]=(-0.316716909548)*x[0]**o+(0.335417284383)*x[0]+(-0.783061160352)*x[1]**o+(-0.253972519239)*x[1]+(-0.826432933721)*x[2]**o+(0.267368378363)*x[2]
-        arg[3,0,2,1]=(-0.765899705462)*x[0]**o+(-0.0993875861476)*x[0]+(-0.211785004352)*x[1]**o+(-0.635330151497)*x[1]+(0.414575412599)*x[2]**o+(0.586882274623)*x[2]
-        arg[3,1,0,0]=(0.987776377237)*x[0]**o+(0.796660669191)*x[0]+(0.580724891862)*x[1]**o+(-0.24149253995)*x[1]+(-0.633421016909)*x[2]**o+(-0.220110913711)*x[2]
-        arg[3,1,0,1]=(-0.182240918081)*x[0]**o+(-0.290526050572)*x[0]+(0.00283230959976)*x[1]**o+(-0.933282166805)*x[1]+(-0.857893235883)*x[2]**o+(0.551414074127)*x[2]
-        arg[3,1,1,0]=(-0.854435997816)*x[0]**o+(0.706455144263)*x[0]+(0.406237965254)*x[1]**o+(0.192071142415)*x[1]+(0.357966796834)*x[2]**o+(0.887011087987)*x[2]
-        arg[3,1,1,1]=(0.832013396996)*x[0]**o+(0.696133072321)*x[0]+(0.682726968712)*x[1]**o+(0.613316240514)*x[1]+(0.12600339887)*x[2]**o+(-0.620088231382)*x[2]
-        arg[3,1,2,0]=(-0.178681615221)*x[0]**o+(-0.952835986168)*x[0]+(0.299692693746)*x[1]**o+(0.892451908416)*x[1]+(0.202403273634)*x[2]**o+(0.677212897943)*x[2]
-        arg[3,1,2,1]=(0.0592594053342)*x[0]**o+(0.56391153959)*x[0]+(-0.874866627667)*x[1]**o+(0.432102900769)*x[1]+(-0.49073126285)*x[2]**o+(-0.010495860028)*x[2]
-        arg[3,2,0,0]=(0.548006445814)*x[0]**o+(0.667313392202)*x[0]+(0.397805355499)*x[1]**o+(-0.788100267808)*x[1]+(0.869234055258)*x[2]**o+(-0.830241520401)*x[2]
-        arg[3,2,0,1]=(0.72586139216)*x[0]**o+(-0.931878957878)*x[0]+(-0.94119555858)*x[1]**o+(-0.133544806169)*x[1]+(0.754263323382)*x[2]**o+(-0.446604740157)*x[2]
-        arg[3,2,1,0]=(-0.28135830707)*x[0]**o+(-0.478744058518)*x[0]+(0.88219033731)*x[1]**o+(0.460587286945)*x[1]+(-0.849692146096)*x[2]**o+(0.0927701345107)*x[2]
-        arg[3,2,1,1]=(-0.681859641611)*x[0]**o+(-0.670164293088)*x[0]+(0.796366374435)*x[1]**o+(0.837230317054)*x[1]+(-0.413283915904)*x[2]**o+(0.779624227187)*x[2]
-        arg[3,2,2,0]=(-0.803242771255)*x[0]**o+(-0.0687616271776)*x[0]+(-0.948856027999)*x[1]**o+(0.762568790931)*x[1]+(0.937588292604)*x[2]**o+(-0.0224232611283)*x[2]
-        arg[3,2,2,1]=(-0.215752944937)*x[0]**o+(-0.807114296075)*x[0]+(0.970625375964)*x[1]**o+(0.68578124692)*x[1]+(-0.165007047419)*x[2]**o+(0.942718439981)*x[2]
-        arg[3,3,0,0]=(0.152001104716)*x[0]**o+(-0.657242342357)*x[0]+(0.559608661705)*x[1]**o+(0.0764403273251)*x[1]+(0.633414754695)*x[2]**o+(0.430777868344)*x[2]
-        arg[3,3,0,1]=(-0.898109497759)*x[0]**o+(0.736574249406)*x[0]+(-0.569584184574)*x[1]**o+(-0.145501395506)*x[1]+(-0.412424116475)*x[2]**o+(-0.416350923096)*x[2]
-        arg[3,3,1,0]=(0.602022795614)*x[0]**o+(-0.848525569825)*x[0]+(-0.713426287505)*x[1]**o+(-0.829278452687)*x[1]+(-0.491257659316)*x[2]**o+(0.90219908999)*x[2]
-        arg[3,3,1,1]=(-0.769110216066)*x[0]**o+(-0.789464037338)*x[0]+(-0.363686172584)*x[1]**o+(-0.86190787068)*x[1]+(0.275438119232)*x[2]**o+(0.285209834248)*x[2]
-        arg[3,3,2,0]=(0.351662405853)*x[0]**o+(0.8403302307)*x[0]+(-0.449869332519)*x[1]**o+(0.936043614838)*x[1]+(-0.656908777335)*x[2]**o+(-0.231923872531)*x[2]
-        arg[3,3,2,1]=(0.873848945653)*x[0]**o+(0.551429883959)*x[0]+(-0.577942548701)*x[1]**o+(-0.254317163049)*x[1]+(0.64878089878)*x[2]**o+(0.7135339515)*x[2]
-        arg[3,4,0,0]=(0.891435610494)*x[0]**o+(0.598893704498)*x[0]+(0.24682094756)*x[1]**o+(0.0895612710338)*x[1]+(-0.513686244953)*x[2]**o+(0.307205505502)*x[2]
-        arg[3,4,0,1]=(-0.577752944196)*x[0]**o+(-0.458383751623)*x[0]+(-0.913956988143)*x[1]**o+(0.470857602235)*x[1]+(0.631726850665)*x[2]**o+(-0.112962289904)*x[2]
-        arg[3,4,1,0]=(-0.65648177489)*x[0]**o+(-0.843530972747)*x[0]+(-0.0332153723809)*x[1]**o+(0.230484263355)*x[1]+(-0.865687508592)*x[2]**o+(0.122751735082)*x[2]
-        arg[3,4,1,1]=(-0.353502640734)*x[0]**o+(-0.816020900282)*x[0]+(0.943688796868)*x[1]**o+(-0.526707881958)*x[1]+(-0.790258298117)*x[2]**o+(-0.748706809042)*x[2]
-        arg[3,4,2,0]=(-0.596345912175)*x[0]**o+(0.872771121837)*x[0]+(0.100107395575)*x[1]**o+(0.950482249217)*x[1]+(0.0487634582783)*x[2]**o+(-0.0285218097887)*x[2]
-        arg[3,4,2,1]=(-0.827443553933)*x[0]**o+(-0.922564800149)*x[0]+(-0.810354385287)*x[1]**o+(0.630079217293)*x[1]+(-0.316280559723)*x[2]**o+(0.977830435871)*x[2]
-        ref[0,0,0,0]=(0.310272924207)*x_ref[0]**o+(-0.664497806351)*x_ref[0]+(0.741942132609)*x_ref[1]**o+(0.636051298779)*x_ref[1]+(0.76627159146)*x_ref[2]**o+(0.492960732588)*x_ref[2]
-        ref[0,0,0,1]=(-0.513740801773)*x_ref[0]**o+(-0.633330750909)*x_ref[0]+(0.177934618983)*x_ref[1]**o+(-0.323745723166)*x_ref[1]+(0.694167180904)*x_ref[2]**o+(0.441239251435)*x_ref[2]
-        ref[0,0,1,0]=(0.417477695848)*x_ref[0]**o+(-0.923415976002)*x_ref[0]+(0.0765555276662)*x_ref[1]**o+(-0.277290890834)*x_ref[1]+(0.0177191326614)*x_ref[2]**o+(-0.0842520100387)*x_ref[2]
-        ref[0,0,1,1]=(-0.761916249894)*x_ref[0]**o+(0.169673139552)*x_ref[0]+(0.0306290828795)*x_ref[1]**o+(0.842234592613)*x_ref[1]+(-0.350342692669)*x_ref[2]**o+(0.321292270658)*x_ref[2]
-        ref[0,0,2,0]=(-0.707494137624)*x_ref[0]**o+(0.346873490395)*x_ref[0]+(-0.68281925138)*x_ref[1]**o+(-0.830538083274)*x_ref[1]+(0.329372141613)*x_ref[2]**o+(-0.121366157163)*x_ref[2]
-        ref[0,0,2,1]=(-0.708018186507)*x_ref[0]**o+(-0.778051239314)*x_ref[0]+(-0.43106291563)*x_ref[1]**o+(-0.0115914251143)*x_ref[1]+(0.487334215892)*x_ref[2]**o+(-0.289232284658)*x_ref[2]
-        ref[0,1,0,0]=(0.530614704199)*x_ref[0]**o+(0.518622028317)*x_ref[0]+(-0.0143129589551)*x_ref[1]**o+(0.808469352257)*x_ref[1]+(-0.156787373225)*x_ref[2]**o+(0.668887813143)*x_ref[2]
-        ref[0,1,0,1]=(0.953223233706)*x_ref[0]**o+(-0.164323838353)*x_ref[0]+(0.336717320858)*x_ref[1]**o+(-0.520230488172)*x_ref[1]+(0.689960738002)*x_ref[2]**o+(0.487630947578)*x_ref[2]
-        ref[0,1,1,0]=(-0.418095373429)*x_ref[0]**o+(-0.941817844939)*x_ref[0]+(0.88105115607)*x_ref[1]**o+(-0.820502501439)*x_ref[1]+(-0.693858267667)*x_ref[2]**o+(0.530567713127)*x_ref[2]
-        ref[0,1,1,1]=(-0.716861320218)*x_ref[0]**o+(-0.736619859467)*x_ref[0]+(-0.885478605601)*x_ref[1]**o+(-0.129375578967)*x_ref[1]+(-0.0181433907318)*x_ref[2]**o+(0.373255537959)*x_ref[2]
-        ref[0,1,2,0]=(-0.174742583167)*x_ref[0]**o+(-0.0887967480112)*x_ref[0]+(-0.291168698662)*x_ref[1]**o+(-0.188608506769)*x_ref[1]+(0.22479613454)*x_ref[2]**o+(0.34173928582)*x_ref[2]
-        ref[0,1,2,1]=(0.117208929504)*x_ref[0]**o+(-0.420969282079)*x_ref[0]+(0.585298109836)*x_ref[1]**o+(0.771355162745)*x_ref[1]+(-0.51374493747)*x_ref[2]**o+(0.785016548855)*x_ref[2]
-        ref[0,2,0,0]=(0.737394887886)*x_ref[0]**o+(0.966080271342)*x_ref[0]+(-0.373178384492)*x_ref[1]**o+(-0.845505386142)*x_ref[1]+(-0.274654519371)*x_ref[2]**o+(0.709356557887)*x_ref[2]
-        ref[0,2,0,1]=(0.0365864090636)*x_ref[0]**o+(-0.393382479787)*x_ref[0]+(0.018273360977)*x_ref[1]**o+(-0.509201909328)*x_ref[1]+(-0.777852392534)*x_ref[2]**o+(0.0417280247507)*x_ref[2]
-        ref[0,2,1,0]=(0.637829302751)*x_ref[0]**o+(-0.767824790186)*x_ref[0]+(0.843382009511)*x_ref[1]**o+(-0.599633234403)*x_ref[1]+(0.14283138941)*x_ref[2]**o+(-0.354404633991)*x_ref[2]
-        ref[0,2,1,1]=(-0.465258613599)*x_ref[0]**o+(0.09341154383)*x_ref[0]+(-0.629114782988)*x_ref[1]**o+(0.91608655383)*x_ref[1]+(-0.692901135848)*x_ref[2]**o+(-0.707225310667)*x_ref[2]
-        ref[0,2,2,0]=(0.9935958759)*x_ref[0]**o+(-0.385008742466)*x_ref[0]+(0.153885356854)*x_ref[1]**o+(0.146270680656)*x_ref[1]+(0.305838410343)*x_ref[2]**o+(0.141193552717)*x_ref[2]
-        ref[0,2,2,1]=(-0.487538023894)*x_ref[0]**o+(-0.814283442647)*x_ref[0]+(0.166008520199)*x_ref[1]**o+(0.313655774416)*x_ref[1]+(0.282308782973)*x_ref[2]**o+(0.309176062484)*x_ref[2]
-        ref[0,3,0,0]=(0.00203507798913)*x_ref[0]**o+(-0.19902542604)*x_ref[0]+(0.88110918624)*x_ref[1]**o+(0.223549219288)*x_ref[1]+(0.135758952369)*x_ref[2]**o+(0.59116783639)*x_ref[2]
-        ref[0,3,0,1]=(-0.185063700767)*x_ref[0]**o+(0.833862155173)*x_ref[0]+(-0.0939117509645)*x_ref[1]**o+(0.288003692231)*x_ref[1]+(0.580196157839)*x_ref[2]**o+(0.299320177754)*x_ref[2]
-        ref[0,3,1,0]=(-0.039100718826)*x_ref[0]**o+(0.423179869395)*x_ref[0]+(-0.013669578975)*x_ref[1]**o+(-0.355053343085)*x_ref[1]+(0.89285158975)*x_ref[2]**o+(0.392984367877)*x_ref[2]
-        ref[0,3,1,1]=(0.0988989416429)*x_ref[0]**o+(-0.446243235174)*x_ref[0]+(-0.691253313617)*x_ref[1]**o+(0.338823693086)*x_ref[1]+(0.707054126334)*x_ref[2]**o+(0.601121388278)*x_ref[2]
-        ref[0,3,2,0]=(-0.191366770484)*x_ref[0]**o+(0.961791275903)*x_ref[0]+(-0.103547475035)*x_ref[1]**o+(-0.745236510079)*x_ref[1]+(-0.157506981712)*x_ref[2]**o+(0.986229506787)*x_ref[2]
-        ref[0,3,2,1]=(-0.886091883647)*x_ref[0]**o+(0.6979804248)*x_ref[0]+(-0.366575419428)*x_ref[1]**o+(-0.958601153259)*x_ref[1]+(-0.0119724511494)*x_ref[2]**o+(-0.76101132076)*x_ref[2]
-        ref[0,4,0,0]=(0.923290554434)*x_ref[0]**o+(0.411359492198)*x_ref[0]+(-0.977999562875)*x_ref[1]**o+(0.352085161527)*x_ref[1]+(0.955745235349)*x_ref[2]**o+(-0.978885609257)*x_ref[2]
-        ref[0,4,0,1]=(0.226973479105)*x_ref[0]**o+(-0.423881897251)*x_ref[0]+(0.889101969481)*x_ref[1]**o+(-0.994236389028)*x_ref[1]+(0.0159169033361)*x_ref[2]**o+(-0.559935154203)*x_ref[2]
-        ref[0,4,1,0]=(-0.225427291797)*x_ref[0]**o+(-0.557334621848)*x_ref[0]+(-0.486252586142)*x_ref[1]**o+(0.0497120905216)*x_ref[1]+(0.84165736691)*x_ref[2]**o+(-0.185010156797)*x_ref[2]
-        ref[0,4,1,1]=(0.762694602609)*x_ref[0]**o+(-0.447367170727)*x_ref[0]+(-0.61103181818)*x_ref[1]**o+(0.689761057656)*x_ref[1]+(-0.631855120122)*x_ref[2]**o+(0.33274655602)*x_ref[2]
-        ref[0,4,2,0]=(-0.198884868914)*x_ref[0]**o+(0.716371959278)*x_ref[0]+(0.260871768919)*x_ref[1]**o+(0.622241740082)*x_ref[1]+(0.774103524035)*x_ref[2]**o+(0.186132703676)*x_ref[2]
-        ref[0,4,2,1]=(-0.309450645317)*x_ref[0]**o+(0.204754571336)*x_ref[0]+(0.483402810171)*x_ref[1]**o+(0.404620744188)*x_ref[1]+(-0.699137246959)*x_ref[2]**o+(0.467428706196)*x_ref[2]
-        ref[1,0,0,0]=(0.642289506448)*x_ref[0]**o+(0.383990304394)*x_ref[0]+(0.556940973318)*x_ref[1]**o+(0.135219729041)*x_ref[1]+(0.577195836358)*x_ref[2]**o+(-0.338924419674)*x_ref[2]
-        ref[1,0,0,1]=(-0.920873911295)*x_ref[0]**o+(-0.330610192304)*x_ref[0]+(-0.117226803856)*x_ref[1]**o+(0.172482867684)*x_ref[1]+(0.909140902709)*x_ref[2]**o+(-0.590494167913)*x_ref[2]
-        ref[1,0,1,0]=(0.210161538861)*x_ref[0]**o+(-0.83860241761)*x_ref[0]+(0.0257180382661)*x_ref[1]**o+(0.877633854348)*x_ref[1]+(0.26045311754)*x_ref[2]**o+(-0.971349902714)*x_ref[2]
-        ref[1,0,1,1]=(0.70736843125)*x_ref[0]**o+(-0.765121985431)*x_ref[0]+(-0.196525225943)*x_ref[1]**o+(-0.175928729346)*x_ref[1]+(0.945523028748)*x_ref[2]**o+(0.877830322823)*x_ref[2]
-        ref[1,0,2,0]=(-0.963513016065)*x_ref[0]**o+(0.0820537856351)*x_ref[0]+(0.0122070196118)*x_ref[1]**o+(-0.154147449592)*x_ref[1]+(0.323844633268)*x_ref[2]**o+(-0.124897698214)*x_ref[2]
-        ref[1,0,2,1]=(0.656267566405)*x_ref[0]**o+(0.0174786620768)*x_ref[0]+(0.763902435618)*x_ref[1]**o+(-0.986021506043)*x_ref[1]+(0.632625555994)*x_ref[2]**o+(-0.110657743523)*x_ref[2]
-        ref[1,1,0,0]=(0.00354144688732)*x_ref[0]**o+(-0.813515808171)*x_ref[0]+(-0.100717717446)*x_ref[1]**o+(0.0543708163629)*x_ref[1]+(0.785927880762)*x_ref[2]**o+(0.0109166652227)*x_ref[2]
-        ref[1,1,0,1]=(-0.239705688631)*x_ref[0]**o+(0.402915642509)*x_ref[0]+(0.463371068163)*x_ref[1]**o+(-0.507302462928)*x_ref[1]+(-0.0789844128295)*x_ref[2]**o+(0.669144891499)*x_ref[2]
-        ref[1,1,1,0]=(-0.491891367001)*x_ref[0]**o+(-0.524377636928)*x_ref[0]+(0.903091863917)*x_ref[1]**o+(-0.554368807183)*x_ref[1]+(0.332899195339)*x_ref[2]**o+(-0.645216147049)*x_ref[2]
-        ref[1,1,1,1]=(-0.915843941243)*x_ref[0]**o+(-0.233175654748)*x_ref[0]+(0.467730425037)*x_ref[1]**o+(-0.765957936683)*x_ref[1]+(0.726678877276)*x_ref[2]**o+(0.770533947942)*x_ref[2]
-        ref[1,1,2,0]=(0.678071852032)*x_ref[0]**o+(0.266537844237)*x_ref[0]+(0.324335300151)*x_ref[1]**o+(-0.286713971373)*x_ref[1]+(-0.702384414014)*x_ref[2]**o+(0.887198276519)*x_ref[2]
-        ref[1,1,2,1]=(0.0466444959648)*x_ref[0]**o+(0.689162912677)*x_ref[0]+(-0.35033923676)*x_ref[1]**o+(-0.0536380766876)*x_ref[1]+(-0.511833442517)*x_ref[2]**o+(0.125566299829)*x_ref[2]
-        ref[1,2,0,0]=(-0.803170431622)*x_ref[0]**o+(0.476211169752)*x_ref[0]+(-0.170510267953)*x_ref[1]**o+(-0.765945735317)*x_ref[1]+(-0.169966329291)*x_ref[2]**o+(-0.988525918724)*x_ref[2]
-        ref[1,2,0,1]=(0.289618751212)*x_ref[0]**o+(0.294379040976)*x_ref[0]+(-0.922478416838)*x_ref[1]**o+(0.210546495537)*x_ref[1]+(-0.87266381496)*x_ref[2]**o+(-0.865571669577)*x_ref[2]
-        ref[1,2,1,0]=(-0.292811054005)*x_ref[0]**o+(0.651280833746)*x_ref[0]+(-0.625004203736)*x_ref[1]**o+(0.372078169172)*x_ref[1]+(-0.0539099055169)*x_ref[2]**o+(0.0911869270008)*x_ref[2]
-        ref[1,2,1,1]=(0.496217698294)*x_ref[0]**o+(-0.986021787133)*x_ref[0]+(0.246417059532)*x_ref[1]**o+(0.610226802401)*x_ref[1]+(0.991534665298)*x_ref[2]**o+(-0.507441185982)*x_ref[2]
-        ref[1,2,2,0]=(-0.839902565947)*x_ref[0]**o+(-0.279607147278)*x_ref[0]+(0.278212307963)*x_ref[1]**o+(0.609793640036)*x_ref[1]+(0.940471913774)*x_ref[2]**o+(0.21860828705)*x_ref[2]
-        ref[1,2,2,1]=(0.789578112278)*x_ref[0]**o+(-0.0226697818608)*x_ref[0]+(0.216321340291)*x_ref[1]**o+(-0.701818463454)*x_ref[1]+(-0.166689030646)*x_ref[2]**o+(0.966131542292)*x_ref[2]
-        ref[1,3,0,0]=(0.149337042551)*x_ref[0]**o+(-0.785050579674)*x_ref[0]+(0.530219924721)*x_ref[1]**o+(-0.971927239398)*x_ref[1]+(0.950917908603)*x_ref[2]**o+(0.132668077447)*x_ref[2]
-        ref[1,3,0,1]=(0.983081559724)*x_ref[0]**o+(-0.358694498455)*x_ref[0]+(0.181080099281)*x_ref[1]**o+(-0.699756291643)*x_ref[1]+(-0.744335953304)*x_ref[2]**o+(0.00262043221382)*x_ref[2]
-        ref[1,3,1,0]=(0.31776032045)*x_ref[0]**o+(-0.0726184220029)*x_ref[0]+(-0.759883735971)*x_ref[1]**o+(-0.6389710873)*x_ref[1]+(-0.607858499502)*x_ref[2]**o+(-0.397169895784)*x_ref[2]
-        ref[1,3,1,1]=(-0.950468389728)*x_ref[0]**o+(0.831121915521)*x_ref[0]+(0.552857011083)*x_ref[1]**o+(0.848599672594)*x_ref[1]+(0.432183564231)*x_ref[2]**o+(0.57537721362)*x_ref[2]
-        ref[1,3,2,0]=(0.736080143601)*x_ref[0]**o+(-0.804140307747)*x_ref[0]+(-0.163864867884)*x_ref[1]**o+(0.950874042315)*x_ref[1]+(-0.99676139412)*x_ref[2]**o+(0.332320294246)*x_ref[2]
-        ref[1,3,2,1]=(0.119082582041)*x_ref[0]**o+(-0.969740778852)*x_ref[0]+(0.828432583532)*x_ref[1]**o+(0.190324050395)*x_ref[1]+(-0.42639142674)*x_ref[2]**o+(0.315519578192)*x_ref[2]
-        ref[1,4,0,0]=(-0.798465141775)*x_ref[0]**o+(-0.717282977908)*x_ref[0]+(0.935655148713)*x_ref[1]**o+(-0.655752964484)*x_ref[1]+(0.159990149099)*x_ref[2]**o+(-0.537115062687)*x_ref[2]
-        ref[1,4,0,1]=(0.445151775007)*x_ref[0]**o+(-0.867956302051)*x_ref[0]+(-0.809856879825)*x_ref[1]**o+(-0.326897750981)*x_ref[1]+(0.756352311987)*x_ref[2]**o+(0.577585513459)*x_ref[2]
-        ref[1,4,1,0]=(0.294243347591)*x_ref[0]**o+(0.774741656931)*x_ref[0]+(-0.0799985737984)*x_ref[1]**o+(0.179789107412)*x_ref[1]+(-0.612198025189)*x_ref[2]**o+(-0.07086009611)*x_ref[2]
-        ref[1,4,1,1]=(0.0692586287045)*x_ref[0]**o+(-0.671956300122)*x_ref[0]+(-0.948667104683)*x_ref[1]**o+(0.68656246801)*x_ref[1]+(-0.352975297696)*x_ref[2]**o+(0.277952113716)*x_ref[2]
-        ref[1,4,2,0]=(-0.491316095517)*x_ref[0]**o+(0.725899087239)*x_ref[0]+(0.634113963431)*x_ref[1]**o+(0.235694393453)*x_ref[1]+(-0.15600720713)*x_ref[2]**o+(0.954814976539)*x_ref[2]
-        ref[1,4,2,1]=(0.120206996339)*x_ref[0]**o+(-0.86151411823)*x_ref[0]+(-0.137093650097)*x_ref[1]**o+(0.633402978246)*x_ref[1]+(-0.42515364728)*x_ref[2]**o+(-0.987634210617)*x_ref[2]
-        ref[2,0,0,0]=(0.539463971222)*x_ref[0]**o+(-0.03435650579)*x_ref[0]+(-0.884395295544)*x_ref[1]**o+(0.215454879022)*x_ref[1]+(0.842377328246)*x_ref[2]**o+(0.370920136871)*x_ref[2]
-        ref[2,0,0,1]=(-0.411505463039)*x_ref[0]**o+(0.446494039439)*x_ref[0]+(0.0313771969556)*x_ref[1]**o+(0.602893223061)*x_ref[1]+(-0.30383490021)*x_ref[2]**o+(-0.788028756758)*x_ref[2]
-        ref[2,0,1,0]=(0.489009615999)*x_ref[0]**o+(-0.95508248016)*x_ref[0]+(-0.21489475022)*x_ref[1]**o+(-0.857263478431)*x_ref[1]+(-0.123703409045)*x_ref[2]**o+(0.663389562431)*x_ref[2]
-        ref[2,0,1,1]=(-0.0224763310929)*x_ref[0]**o+(-0.315886249237)*x_ref[0]+(-0.318201849695)*x_ref[1]**o+(0.423732682462)*x_ref[1]+(0.396065636381)*x_ref[2]**o+(0.0816717878865)*x_ref[2]
-        ref[2,0,2,0]=(-0.191432618224)*x_ref[0]**o+(0.688389390795)*x_ref[0]+(-0.382948112159)*x_ref[1]**o+(0.562905173818)*x_ref[1]+(-0.118396714029)*x_ref[2]**o+(0.234478642577)*x_ref[2]
-        ref[2,0,2,1]=(-0.348008173171)*x_ref[0]**o+(0.191994166636)*x_ref[0]+(0.450556057147)*x_ref[1]**o+(-0.710821693343)*x_ref[1]+(-0.245119333857)*x_ref[2]**o+(0.262869525239)*x_ref[2]
-        ref[2,1,0,0]=(-0.160444506203)*x_ref[0]**o+(-0.816142837432)*x_ref[0]+(-0.619722480492)*x_ref[1]**o+(-0.989077039675)*x_ref[1]+(-0.0282349103977)*x_ref[2]**o+(-0.629849819691)*x_ref[2]
-        ref[2,1,0,1]=(0.379513765297)*x_ref[0]**o+(0.934652105586)*x_ref[0]+(-0.632636427868)*x_ref[1]**o+(-0.0492550496553)*x_ref[1]+(0.137733572307)*x_ref[2]**o+(0.779782637942)*x_ref[2]
-        ref[2,1,1,0]=(0.469499320417)*x_ref[0]**o+(0.570880924125)*x_ref[0]+(-0.0329833251419)*x_ref[1]**o+(-0.0388751034604)*x_ref[1]+(-0.878520094389)*x_ref[2]**o+(0.992656649048)*x_ref[2]
-        ref[2,1,1,1]=(0.592005181995)*x_ref[0]**o+(-0.553980493526)*x_ref[0]+(0.359837665019)*x_ref[1]**o+(0.811107941179)*x_ref[1]+(-0.441929650912)*x_ref[2]**o+(-0.768618378636)*x_ref[2]
-        ref[2,1,2,0]=(0.741376258816)*x_ref[0]**o+(-0.238909756717)*x_ref[0]+(0.204631082449)*x_ref[1]**o+(0.970501662949)*x_ref[1]+(-0.615638092239)*x_ref[2]**o+(-0.575948750844)*x_ref[2]
-        ref[2,1,2,1]=(0.774050933112)*x_ref[0]**o+(-0.872234076721)*x_ref[0]+(-0.0936189240061)*x_ref[1]**o+(-0.773608756961)*x_ref[1]+(-0.119171907808)*x_ref[2]**o+(-0.256124796845)*x_ref[2]
-        ref[2,2,0,0]=(0.459481754425)*x_ref[0]**o+(0.478364929493)*x_ref[0]+(0.460199733287)*x_ref[1]**o+(0.66880294659)*x_ref[1]+(-0.859525058389)*x_ref[2]**o+(0.77960284414)*x_ref[2]
-        ref[2,2,0,1]=(0.690557835207)*x_ref[0]**o+(-0.812305038592)*x_ref[0]+(0.837924124791)*x_ref[1]**o+(-0.785979206364)*x_ref[1]+(-0.295553949819)*x_ref[2]**o+(0.575096295897)*x_ref[2]
-        ref[2,2,1,0]=(0.443193683205)*x_ref[0]**o+(0.0355033222253)*x_ref[0]+(0.497641002766)*x_ref[1]**o+(-0.636955142451)*x_ref[1]+(-0.265324357454)*x_ref[2]**o+(0.734148569078)*x_ref[2]
-        ref[2,2,1,1]=(-0.088707242599)*x_ref[0]**o+(0.513403518669)*x_ref[0]+(0.337741737651)*x_ref[1]**o+(-0.174843924478)*x_ref[1]+(0.687291255986)*x_ref[2]**o+(0.473850502258)*x_ref[2]
-        ref[2,2,2,0]=(0.5305624642)*x_ref[0]**o+(-0.972997835953)*x_ref[0]+(0.00197107287888)*x_ref[1]**o+(-0.75490872634)*x_ref[1]+(-0.0569624569435)*x_ref[2]**o+(-0.0780532868631)*x_ref[2]
-        ref[2,2,2,1]=(-0.744584471866)*x_ref[0]**o+(0.915494909272)*x_ref[0]+(0.239235050038)*x_ref[1]**o+(-0.192466753187)*x_ref[1]+(0.933556550824)*x_ref[2]**o+(-0.786420251487)*x_ref[2]
-        ref[2,3,0,0]=(0.472114530627)*x_ref[0]**o+(0.0693211807557)*x_ref[0]+(-0.274273425713)*x_ref[1]**o+(0.136242554894)*x_ref[1]+(-0.329240675785)*x_ref[2]**o+(0.0212539247343)*x_ref[2]
-        ref[2,3,0,1]=(-0.780426108099)*x_ref[0]**o+(-0.632382551025)*x_ref[0]+(0.554926949239)*x_ref[1]**o+(0.264204009059)*x_ref[1]+(-0.868007525824)*x_ref[2]**o+(-0.937631120201)*x_ref[2]
-        ref[2,3,1,0]=(-0.826692080947)*x_ref[0]**o+(0.915241858538)*x_ref[0]+(-0.49986160859)*x_ref[1]**o+(0.921686464658)*x_ref[1]+(0.71996666304)*x_ref[2]**o+(0.297609501096)*x_ref[2]
-        ref[2,3,1,1]=(0.991896994614)*x_ref[0]**o+(-0.543310008103)*x_ref[0]+(0.0791899631111)*x_ref[1]**o+(-0.914088200145)*x_ref[1]+(-0.496337624951)*x_ref[2]**o+(0.708950898614)*x_ref[2]
-        ref[2,3,2,0]=(-0.235116966432)*x_ref[0]**o+(-0.492848730207)*x_ref[0]+(0.428728646789)*x_ref[1]**o+(-0.410747634691)*x_ref[1]+(0.705059815458)*x_ref[2]**o+(-0.185604633831)*x_ref[2]
-        ref[2,3,2,1]=(0.838829037117)*x_ref[0]**o+(0.670561147563)*x_ref[0]+(0.621407965075)*x_ref[1]**o+(-0.10624946305)*x_ref[1]+(0.893703402687)*x_ref[2]**o+(0.985504995821)*x_ref[2]
-        ref[2,4,0,0]=(0.635072504682)*x_ref[0]**o+(-0.681962427555)*x_ref[0]+(-0.00774518011081)*x_ref[1]**o+(-0.264996228668)*x_ref[1]+(0.690668403198)*x_ref[2]**o+(0.883573761062)*x_ref[2]
-        ref[2,4,0,1]=(0.545632268651)*x_ref[0]**o+(0.439668519394)*x_ref[0]+(-0.482479808491)*x_ref[1]**o+(0.752028962391)*x_ref[1]+(0.0596773623939)*x_ref[2]**o+(-0.369987181127)*x_ref[2]
-        ref[2,4,1,0]=(0.659005322796)*x_ref[0]**o+(0.503940833428)*x_ref[0]+(0.643633321586)*x_ref[1]**o+(0.927082323252)*x_ref[1]+(0.354072146184)*x_ref[2]**o+(-0.638737560608)*x_ref[2]
-        ref[2,4,1,1]=(-0.443548860913)*x_ref[0]**o+(0.707607048458)*x_ref[0]+(-0.955225746402)*x_ref[1]**o+(0.515995563585)*x_ref[1]+(-0.288406637165)*x_ref[2]**o+(-0.760864937318)*x_ref[2]
-        ref[2,4,2,0]=(0.898146580355)*x_ref[0]**o+(-0.590650787106)*x_ref[0]+(0.036095789753)*x_ref[1]**o+(0.326040260581)*x_ref[1]+(0.680069361306)*x_ref[2]**o+(0.333839099341)*x_ref[2]
-        ref[2,4,2,1]=(-0.151364260271)*x_ref[0]**o+(-0.675198183832)*x_ref[0]+(-0.183626298978)*x_ref[1]**o+(-0.182565217146)*x_ref[1]+(0.0345632129814)*x_ref[2]**o+(-0.581534100763)*x_ref[2]
-        ref[3,0,0,0]=(-0.942351703246)*x_ref[0]**o+(-0.699567649453)*x_ref[0]+(-0.832068665702)*x_ref[1]**o+(0.163439416504)*x_ref[1]+(0.742500339519)*x_ref[2]**o+(-0.492882887489)*x_ref[2]
-        ref[3,0,0,1]=(0.990078296484)*x_ref[0]**o+(-0.999837336587)*x_ref[0]+(0.197589456459)*x_ref[1]**o+(0.431403059019)*x_ref[1]+(0.859864015871)*x_ref[2]**o+(-0.267474829282)*x_ref[2]
-        ref[3,0,1,0]=(-0.776773660723)*x_ref[0]**o+(-0.189048370486)*x_ref[0]+(0.926953856802)*x_ref[1]**o+(-0.72314744652)*x_ref[1]+(0.330064363809)*x_ref[2]**o+(0.188533334359)*x_ref[2]
-        ref[3,0,1,1]=(-0.854830058762)*x_ref[0]**o+(0.832073883276)*x_ref[0]+(-0.425691165124)*x_ref[1]**o+(0.162351500316)*x_ref[1]+(0.370604864512)*x_ref[2]**o+(-0.581907071484)*x_ref[2]
-        ref[3,0,2,0]=(-0.316716909548)*x_ref[0]**o+(0.335417284383)*x_ref[0]+(-0.783061160352)*x_ref[1]**o+(-0.253972519239)*x_ref[1]+(-0.826432933721)*x_ref[2]**o+(0.267368378363)*x_ref[2]
-        ref[3,0,2,1]=(-0.765899705462)*x_ref[0]**o+(-0.0993875861476)*x_ref[0]+(-0.211785004352)*x_ref[1]**o+(-0.635330151497)*x_ref[1]+(0.414575412599)*x_ref[2]**o+(0.586882274623)*x_ref[2]
-        ref[3,1,0,0]=(0.987776377237)*x_ref[0]**o+(0.796660669191)*x_ref[0]+(0.580724891862)*x_ref[1]**o+(-0.24149253995)*x_ref[1]+(-0.633421016909)*x_ref[2]**o+(-0.220110913711)*x_ref[2]
-        ref[3,1,0,1]=(-0.182240918081)*x_ref[0]**o+(-0.290526050572)*x_ref[0]+(0.00283230959976)*x_ref[1]**o+(-0.933282166805)*x_ref[1]+(-0.857893235883)*x_ref[2]**o+(0.551414074127)*x_ref[2]
-        ref[3,1,1,0]=(-0.854435997816)*x_ref[0]**o+(0.706455144263)*x_ref[0]+(0.406237965254)*x_ref[1]**o+(0.192071142415)*x_ref[1]+(0.357966796834)*x_ref[2]**o+(0.887011087987)*x_ref[2]
-        ref[3,1,1,1]=(0.832013396996)*x_ref[0]**o+(0.696133072321)*x_ref[0]+(0.682726968712)*x_ref[1]**o+(0.613316240514)*x_ref[1]+(0.12600339887)*x_ref[2]**o+(-0.620088231382)*x_ref[2]
-        ref[3,1,2,0]=(-0.178681615221)*x_ref[0]**o+(-0.952835986168)*x_ref[0]+(0.299692693746)*x_ref[1]**o+(0.892451908416)*x_ref[1]+(0.202403273634)*x_ref[2]**o+(0.677212897943)*x_ref[2]
-        ref[3,1,2,1]=(0.0592594053342)*x_ref[0]**o+(0.56391153959)*x_ref[0]+(-0.874866627667)*x_ref[1]**o+(0.432102900769)*x_ref[1]+(-0.49073126285)*x_ref[2]**o+(-0.010495860028)*x_ref[2]
-        ref[3,2,0,0]=(0.548006445814)*x_ref[0]**o+(0.667313392202)*x_ref[0]+(0.397805355499)*x_ref[1]**o+(-0.788100267808)*x_ref[1]+(0.869234055258)*x_ref[2]**o+(-0.830241520401)*x_ref[2]
-        ref[3,2,0,1]=(0.72586139216)*x_ref[0]**o+(-0.931878957878)*x_ref[0]+(-0.94119555858)*x_ref[1]**o+(-0.133544806169)*x_ref[1]+(0.754263323382)*x_ref[2]**o+(-0.446604740157)*x_ref[2]
-        ref[3,2,1,0]=(-0.28135830707)*x_ref[0]**o+(-0.478744058518)*x_ref[0]+(0.88219033731)*x_ref[1]**o+(0.460587286945)*x_ref[1]+(-0.849692146096)*x_ref[2]**o+(0.0927701345107)*x_ref[2]
-        ref[3,2,1,1]=(-0.681859641611)*x_ref[0]**o+(-0.670164293088)*x_ref[0]+(0.796366374435)*x_ref[1]**o+(0.837230317054)*x_ref[1]+(-0.413283915904)*x_ref[2]**o+(0.779624227187)*x_ref[2]
-        ref[3,2,2,0]=(-0.803242771255)*x_ref[0]**o+(-0.0687616271776)*x_ref[0]+(-0.948856027999)*x_ref[1]**o+(0.762568790931)*x_ref[1]+(0.937588292604)*x_ref[2]**o+(-0.0224232611283)*x_ref[2]
-        ref[3,2,2,1]=(-0.215752944937)*x_ref[0]**o+(-0.807114296075)*x_ref[0]+(0.970625375964)*x_ref[1]**o+(0.68578124692)*x_ref[1]+(-0.165007047419)*x_ref[2]**o+(0.942718439981)*x_ref[2]
-        ref[3,3,0,0]=(0.152001104716)*x_ref[0]**o+(-0.657242342357)*x_ref[0]+(0.559608661705)*x_ref[1]**o+(0.0764403273251)*x_ref[1]+(0.633414754695)*x_ref[2]**o+(0.430777868344)*x_ref[2]
-        ref[3,3,0,1]=(-0.898109497759)*x_ref[0]**o+(0.736574249406)*x_ref[0]+(-0.569584184574)*x_ref[1]**o+(-0.145501395506)*x_ref[1]+(-0.412424116475)*x_ref[2]**o+(-0.416350923096)*x_ref[2]
-        ref[3,3,1,0]=(0.602022795614)*x_ref[0]**o+(-0.848525569825)*x_ref[0]+(-0.713426287505)*x_ref[1]**o+(-0.829278452687)*x_ref[1]+(-0.491257659316)*x_ref[2]**o+(0.90219908999)*x_ref[2]
-        ref[3,3,1,1]=(-0.769110216066)*x_ref[0]**o+(-0.789464037338)*x_ref[0]+(-0.363686172584)*x_ref[1]**o+(-0.86190787068)*x_ref[1]+(0.275438119232)*x_ref[2]**o+(0.285209834248)*x_ref[2]
-        ref[3,3,2,0]=(0.351662405853)*x_ref[0]**o+(0.8403302307)*x_ref[0]+(-0.449869332519)*x_ref[1]**o+(0.936043614838)*x_ref[1]+(-0.656908777335)*x_ref[2]**o+(-0.231923872531)*x_ref[2]
-        ref[3,3,2,1]=(0.873848945653)*x_ref[0]**o+(0.551429883959)*x_ref[0]+(-0.577942548701)*x_ref[1]**o+(-0.254317163049)*x_ref[1]+(0.64878089878)*x_ref[2]**o+(0.7135339515)*x_ref[2]
-        ref[3,4,0,0]=(0.891435610494)*x_ref[0]**o+(0.598893704498)*x_ref[0]+(0.24682094756)*x_ref[1]**o+(0.0895612710338)*x_ref[1]+(-0.513686244953)*x_ref[2]**o+(0.307205505502)*x_ref[2]
-        ref[3,4,0,1]=(-0.577752944196)*x_ref[0]**o+(-0.458383751623)*x_ref[0]+(-0.913956988143)*x_ref[1]**o+(0.470857602235)*x_ref[1]+(0.631726850665)*x_ref[2]**o+(-0.112962289904)*x_ref[2]
-        ref[3,4,1,0]=(-0.65648177489)*x_ref[0]**o+(-0.843530972747)*x_ref[0]+(-0.0332153723809)*x_ref[1]**o+(0.230484263355)*x_ref[1]+(-0.865687508592)*x_ref[2]**o+(0.122751735082)*x_ref[2]
-        ref[3,4,1,1]=(-0.353502640734)*x_ref[0]**o+(-0.816020900282)*x_ref[0]+(0.943688796868)*x_ref[1]**o+(-0.526707881958)*x_ref[1]+(-0.790258298117)*x_ref[2]**o+(-0.748706809042)*x_ref[2]
-        ref[3,4,2,0]=(-0.596345912175)*x_ref[0]**o+(0.872771121837)*x_ref[0]+(0.100107395575)*x_ref[1]**o+(0.950482249217)*x_ref[1]+(0.0487634582783)*x_ref[2]**o+(-0.0285218097887)*x_ref[2]
-        ref[3,4,2,1]=(-0.827443553933)*x_ref[0]**o+(-0.922564800149)*x_ref[0]+(-0.810354385287)*x_ref[1]**o+(0.630079217293)*x_ref[1]+(-0.316280559723)*x_ref[2]**o+(0.977830435871)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.142445811229)*x[0]**o+(-0.170111870439)*x[0]+(-0.571150729608)*x[1]**o+(-0.799596368319)*x[1]
-        ref=(0.142445811229)*x_ref[0]**o+(-0.170111870439)*x_ref[0]+(-0.571150729608)*x_ref[1]**o+(-0.799596368319)*x_ref[1]
-      else:
-        arg=(0.131269935442)*x[0]**o+(0.67764849927)*x[0]+(0.199946665)*x[1]**o+(0.775678673404)*x[1]+(-0.818505707274)*x[2]**o+(-0.141160005914)*x[2]
-        ref=(0.131269935442)*x_ref[0]**o+(0.67764849927)*x_ref[0]+(0.199946665)*x_ref[1]**o+(0.775678673404)*x_ref[1]+(-0.818505707274)*x_ref[2]**o+(-0.141160005914)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.271030346059)*x[0]**o+(-0.604054986035)*x[0]+(-0.856492962015)*x[1]**o+(0.229582187423)*x[1]
-        arg[1]=(-0.152539485929)*x[0]**o+(0.936634973224)*x[0]+(0.805016132937)*x[1]**o+(-0.6832854412)*x[1]
-        ref[0]=(-0.271030346059)*x_ref[0]**o+(-0.604054986035)*x_ref[0]+(-0.856492962015)*x_ref[1]**o+(0.229582187423)*x_ref[1]
-        ref[1]=(-0.152539485929)*x_ref[0]**o+(0.936634973224)*x_ref[0]+(0.805016132937)*x_ref[1]**o+(-0.6832854412)*x_ref[1]
-      else:
-        arg[0]=(-0.484580515247)*x[0]**o+(-0.134539997002)*x[0]+(0.589742989514)*x[1]**o+(-0.950803827747)*x[1]+(-0.852976687869)*x[2]**o+(0.0999526415345)*x[2]
-        arg[1]=(-0.863620642149)*x[0]**o+(-0.16255544441)*x[0]+(-0.4963232161)*x[1]**o+(0.180988811217)*x[1]+(-0.787186716126)*x[2]**o+(-0.359825851725)*x[2]
-        ref[0]=(-0.484580515247)*x_ref[0]**o+(-0.134539997002)*x_ref[0]+(0.589742989514)*x_ref[1]**o+(-0.950803827747)*x_ref[1]+(-0.852976687869)*x_ref[2]**o+(0.0999526415345)*x_ref[2]
-        ref[1]=(-0.863620642149)*x_ref[0]**o+(-0.16255544441)*x_ref[0]+(-0.4963232161)*x_ref[1]**o+(0.180988811217)*x_ref[1]+(-0.787186716126)*x_ref[2]**o+(-0.359825851725)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.88064835903)*x[0]**o+(-0.140271048585)*x[0]+(-0.363467917345)*x[1]**o+(0.382530733181)*x[1]
-        arg[0,1]=(0.835096280471)*x[0]**o+(0.132077921375)*x[0]+(-0.814392115734)*x[1]**o+(-0.379227781873)*x[1]
-        arg[0,2]=(0.257391174596)*x[0]**o+(-0.135017751364)*x[0]+(-0.462760793484)*x[1]**o+(-0.332510860616)*x[1]
-        arg[0,3]=(0.303541666957)*x[0]**o+(0.729054207976)*x[0]+(-0.0474210800089)*x[1]**o+(0.213859363809)*x[1]
-        arg[0,4]=(0.564466740909)*x[0]**o+(0.684761789227)*x[0]+(0.432934636771)*x[1]**o+(0.261269614075)*x[1]
-        arg[1,0]=(0.83080596334)*x[0]**o+(0.968795153198)*x[0]+(0.835115581928)*x[1]**o+(-0.134688885728)*x[1]
-        arg[1,1]=(-0.876235093042)*x[0]**o+(-0.43923440557)*x[0]+(-0.641186633503)*x[1]**o+(-0.987129244994)*x[1]
-        arg[1,2]=(-0.994007922096)*x[0]**o+(0.534914510762)*x[0]+(0.754420969331)*x[1]**o+(0.241533891038)*x[1]
-        arg[1,3]=(-0.196027247194)*x[0]**o+(0.962231147494)*x[0]+(-0.819146467532)*x[1]**o+(0.966024528731)*x[1]
-        arg[1,4]=(-0.577014723723)*x[0]**o+(0.350310620855)*x[0]+(0.16266475329)*x[1]**o+(-0.926739533525)*x[1]
-        arg[2,0]=(-0.262964780787)*x[0]**o+(-0.824445469277)*x[0]+(-0.982497605841)*x[1]**o+(0.900080022932)*x[1]
-        arg[2,1]=(0.54409272334)*x[0]**o+(0.789421020125)*x[0]+(0.672239490644)*x[1]**o+(-0.0306885937363)*x[1]
-        arg[2,2]=(-0.130272075526)*x[0]**o+(0.51213564573)*x[0]+(-0.819817699321)*x[1]**o+(-0.259068167835)*x[1]
-        arg[2,3]=(-0.61526267092)*x[0]**o+(-0.504362726269)*x[0]+(0.362429515671)*x[1]**o+(-0.0921852465615)*x[1]
-        arg[2,4]=(-0.344772989987)*x[0]**o+(0.260747743828)*x[0]+(0.474457474131)*x[1]**o+(0.436008642452)*x[1]
-        arg[3,0]=(-0.72740499107)*x[0]**o+(-0.297524430077)*x[0]+(-0.809254720524)*x[1]**o+(-0.230695822532)*x[1]
-        arg[3,1]=(-0.0817042383885)*x[0]**o+(-0.324890823023)*x[0]+(0.923635342281)*x[1]**o+(-0.336825317481)*x[1]
-        arg[3,2]=(-0.872954045409)*x[0]**o+(0.242165239629)*x[0]+(0.919264824591)*x[1]**o+(0.424247774945)*x[1]
-        arg[3,3]=(0.146344350418)*x[0]**o+(-0.705285807962)*x[0]+(-0.0735095471635)*x[1]**o+(-0.464180824267)*x[1]
-        arg[3,4]=(0.624085113245)*x[0]**o+(0.719452515121)*x[0]+(0.28331108038)*x[1]**o+(-0.897435702442)*x[1]
-        ref[0,0]=(-0.88064835903)*x_ref[0]**o+(-0.140271048585)*x_ref[0]+(-0.363467917345)*x_ref[1]**o+(0.382530733181)*x_ref[1]
-        ref[0,1]=(0.835096280471)*x_ref[0]**o+(0.132077921375)*x_ref[0]+(-0.814392115734)*x_ref[1]**o+(-0.379227781873)*x_ref[1]
-        ref[0,2]=(0.257391174596)*x_ref[0]**o+(-0.135017751364)*x_ref[0]+(-0.462760793484)*x_ref[1]**o+(-0.332510860616)*x_ref[1]
-        ref[0,3]=(0.303541666957)*x_ref[0]**o+(0.729054207976)*x_ref[0]+(-0.0474210800089)*x_ref[1]**o+(0.213859363809)*x_ref[1]
-        ref[0,4]=(0.564466740909)*x_ref[0]**o+(0.684761789227)*x_ref[0]+(0.432934636771)*x_ref[1]**o+(0.261269614075)*x_ref[1]
-        ref[1,0]=(0.83080596334)*x_ref[0]**o+(0.968795153198)*x_ref[0]+(0.835115581928)*x_ref[1]**o+(-0.134688885728)*x_ref[1]
-        ref[1,1]=(-0.876235093042)*x_ref[0]**o+(-0.43923440557)*x_ref[0]+(-0.641186633503)*x_ref[1]**o+(-0.987129244994)*x_ref[1]
-        ref[1,2]=(-0.994007922096)*x_ref[0]**o+(0.534914510762)*x_ref[0]+(0.754420969331)*x_ref[1]**o+(0.241533891038)*x_ref[1]
-        ref[1,3]=(-0.196027247194)*x_ref[0]**o+(0.962231147494)*x_ref[0]+(-0.819146467532)*x_ref[1]**o+(0.966024528731)*x_ref[1]
-        ref[1,4]=(-0.577014723723)*x_ref[0]**o+(0.350310620855)*x_ref[0]+(0.16266475329)*x_ref[1]**o+(-0.926739533525)*x_ref[1]
-        ref[2,0]=(-0.262964780787)*x_ref[0]**o+(-0.824445469277)*x_ref[0]+(-0.982497605841)*x_ref[1]**o+(0.900080022932)*x_ref[1]
-        ref[2,1]=(0.54409272334)*x_ref[0]**o+(0.789421020125)*x_ref[0]+(0.672239490644)*x_ref[1]**o+(-0.0306885937363)*x_ref[1]
-        ref[2,2]=(-0.130272075526)*x_ref[0]**o+(0.51213564573)*x_ref[0]+(-0.819817699321)*x_ref[1]**o+(-0.259068167835)*x_ref[1]
-        ref[2,3]=(-0.61526267092)*x_ref[0]**o+(-0.504362726269)*x_ref[0]+(0.362429515671)*x_ref[1]**o+(-0.0921852465615)*x_ref[1]
-        ref[2,4]=(-0.344772989987)*x_ref[0]**o+(0.260747743828)*x_ref[0]+(0.474457474131)*x_ref[1]**o+(0.436008642452)*x_ref[1]
-        ref[3,0]=(-0.72740499107)*x_ref[0]**o+(-0.297524430077)*x_ref[0]+(-0.809254720524)*x_ref[1]**o+(-0.230695822532)*x_ref[1]
-        ref[3,1]=(-0.0817042383885)*x_ref[0]**o+(-0.324890823023)*x_ref[0]+(0.923635342281)*x_ref[1]**o+(-0.336825317481)*x_ref[1]
-        ref[3,2]=(-0.872954045409)*x_ref[0]**o+(0.242165239629)*x_ref[0]+(0.919264824591)*x_ref[1]**o+(0.424247774945)*x_ref[1]
-        ref[3,3]=(0.146344350418)*x_ref[0]**o+(-0.705285807962)*x_ref[0]+(-0.0735095471635)*x_ref[1]**o+(-0.464180824267)*x_ref[1]
-        ref[3,4]=(0.624085113245)*x_ref[0]**o+(0.719452515121)*x_ref[0]+(0.28331108038)*x_ref[1]**o+(-0.897435702442)*x_ref[1]
-      else:
-        arg[0,0]=(0.47332206873)*x[0]**o+(0.20564453167)*x[0]+(-0.175485469473)*x[1]**o+(-0.25166656853)*x[1]+(-0.242693318919)*x[2]**o+(-0.773417228526)*x[2]
-        arg[0,1]=(0.788563488587)*x[0]**o+(0.598162739778)*x[0]+(-0.736463777722)*x[1]**o+(-0.161555683484)*x[1]+(0.480782882175)*x[2]**o+(-0.500552084345)*x[2]
-        arg[0,2]=(-0.207893050318)*x[0]**o+(0.206221241577)*x[0]+(0.306329036151)*x[1]**o+(0.585237890094)*x[1]+(0.0276469766188)*x[2]**o+(0.0502503670529)*x[2]
-        arg[0,3]=(0.914950534537)*x[0]**o+(0.401315333176)*x[0]+(0.245224334898)*x[1]**o+(0.526049350134)*x[1]+(-0.735617023846)*x[2]**o+(-0.674692140531)*x[2]
-        arg[0,4]=(-0.359566330106)*x[0]**o+(-0.279627730979)*x[0]+(-0.08398829656)*x[1]**o+(-0.789678621983)*x[1]+(-0.357374658443)*x[2]**o+(0.795724504883)*x[2]
-        arg[1,0]=(-0.0715278193161)*x[0]**o+(-0.562120168502)*x[0]+(0.428614380101)*x[1]**o+(0.115408373591)*x[1]+(-0.154674397872)*x[2]**o+(0.233468972682)*x[2]
-        arg[1,1]=(0.707445640039)*x[0]**o+(-0.719649334705)*x[0]+(-0.349743923514)*x[1]**o+(0.369262203159)*x[1]+(0.712786695739)*x[2]**o+(-0.962450154391)*x[2]
-        arg[1,2]=(-0.306983094408)*x[0]**o+(-0.933322822964)*x[0]+(-0.525515899443)*x[1]**o+(0.642320930433)*x[1]+(-0.950421802297)*x[2]**o+(-0.392142385683)*x[2]
-        arg[1,3]=(-0.765158324235)*x[0]**o+(-0.362010493356)*x[0]+(-0.918673930909)*x[1]**o+(0.72772784184)*x[1]+(-0.392848438408)*x[2]**o+(0.566119231816)*x[2]
-        arg[1,4]=(0.429984662315)*x[0]**o+(-0.165476415697)*x[0]+(0.778539911928)*x[1]**o+(0.411518911472)*x[1]+(0.418323432603)*x[2]**o+(-0.846495913126)*x[2]
-        arg[2,0]=(-0.836556750858)*x[0]**o+(0.976027316021)*x[0]+(-0.556499096672)*x[1]**o+(0.320038395915)*x[1]+(0.377663884516)*x[2]**o+(0.491202727923)*x[2]
-        arg[2,1]=(-0.329597826951)*x[0]**o+(-0.555819984044)*x[0]+(0.110029358927)*x[1]**o+(-0.737070187836)*x[1]+(-0.587142473737)*x[2]**o+(-0.0388834177112)*x[2]
-        arg[2,2]=(0.442251030646)*x[0]**o+(0.285010574287)*x[0]+(0.603267537331)*x[1]**o+(-0.0776884302384)*x[1]+(-0.123541484708)*x[2]**o+(0.44717125529)*x[2]
-        arg[2,3]=(0.474458930313)*x[0]**o+(0.415947401939)*x[0]+(0.381539850696)*x[1]**o+(-0.307590909422)*x[1]+(0.488348451586)*x[2]**o+(0.336883810306)*x[2]
-        arg[2,4]=(0.804466542611)*x[0]**o+(0.891337158669)*x[0]+(-0.599119487307)*x[1]**o+(-0.92047732727)*x[1]+(-0.251489480657)*x[2]**o+(-0.266483991526)*x[2]
-        arg[3,0]=(-0.733633520827)*x[0]**o+(0.494805537624)*x[0]+(-0.117702558274)*x[1]**o+(-0.000461693303442)*x[1]+(-0.102033981202)*x[2]**o+(-0.772865985272)*x[2]
-        arg[3,1]=(-0.636901276465)*x[0]**o+(-0.436330072041)*x[0]+(0.403048850222)*x[1]**o+(-0.94737100009)*x[1]+(0.781059874101)*x[2]**o+(-0.952781516037)*x[2]
-        arg[3,2]=(-0.489372336164)*x[0]**o+(0.221211043152)*x[0]+(0.793975373906)*x[1]**o+(0.424349965288)*x[1]+(0.453332885662)*x[2]**o+(-0.513541753005)*x[2]
-        arg[3,3]=(-0.700899677836)*x[0]**o+(-0.984271896306)*x[0]+(-0.663909486898)*x[1]**o+(0.461302174316)*x[1]+(-0.906457707724)*x[2]**o+(-0.0440003164038)*x[2]
-        arg[3,4]=(0.838326295366)*x[0]**o+(-0.483407593962)*x[0]+(-0.122458752397)*x[1]**o+(0.607337951095)*x[1]+(0.750481384434)*x[2]**o+(-0.677155633204)*x[2]
-        ref[0,0]=(0.47332206873)*x_ref[0]**o+(0.20564453167)*x_ref[0]+(-0.175485469473)*x_ref[1]**o+(-0.25166656853)*x_ref[1]+(-0.242693318919)*x_ref[2]**o+(-0.773417228526)*x_ref[2]
-        ref[0,1]=(0.788563488587)*x_ref[0]**o+(0.598162739778)*x_ref[0]+(-0.736463777722)*x_ref[1]**o+(-0.161555683484)*x_ref[1]+(0.480782882175)*x_ref[2]**o+(-0.500552084345)*x_ref[2]
-        ref[0,2]=(-0.207893050318)*x_ref[0]**o+(0.206221241577)*x_ref[0]+(0.306329036151)*x_ref[1]**o+(0.585237890094)*x_ref[1]+(0.0276469766188)*x_ref[2]**o+(0.0502503670529)*x_ref[2]
-        ref[0,3]=(0.914950534537)*x_ref[0]**o+(0.401315333176)*x_ref[0]+(0.245224334898)*x_ref[1]**o+(0.526049350134)*x_ref[1]+(-0.735617023846)*x_ref[2]**o+(-0.674692140531)*x_ref[2]
-        ref[0,4]=(-0.359566330106)*x_ref[0]**o+(-0.279627730979)*x_ref[0]+(-0.08398829656)*x_ref[1]**o+(-0.789678621983)*x_ref[1]+(-0.357374658443)*x_ref[2]**o+(0.795724504883)*x_ref[2]
-        ref[1,0]=(-0.0715278193161)*x_ref[0]**o+(-0.562120168502)*x_ref[0]+(0.428614380101)*x_ref[1]**o+(0.115408373591)*x_ref[1]+(-0.154674397872)*x_ref[2]**o+(0.233468972682)*x_ref[2]
-        ref[1,1]=(0.707445640039)*x_ref[0]**o+(-0.719649334705)*x_ref[0]+(-0.349743923514)*x_ref[1]**o+(0.369262203159)*x_ref[1]+(0.712786695739)*x_ref[2]**o+(-0.962450154391)*x_ref[2]
-        ref[1,2]=(-0.306983094408)*x_ref[0]**o+(-0.933322822964)*x_ref[0]+(-0.525515899443)*x_ref[1]**o+(0.642320930433)*x_ref[1]+(-0.950421802297)*x_ref[2]**o+(-0.392142385683)*x_ref[2]
-        ref[1,3]=(-0.765158324235)*x_ref[0]**o+(-0.362010493356)*x_ref[0]+(-0.918673930909)*x_ref[1]**o+(0.72772784184)*x_ref[1]+(-0.392848438408)*x_ref[2]**o+(0.566119231816)*x_ref[2]
-        ref[1,4]=(0.429984662315)*x_ref[0]**o+(-0.165476415697)*x_ref[0]+(0.778539911928)*x_ref[1]**o+(0.411518911472)*x_ref[1]+(0.418323432603)*x_ref[2]**o+(-0.846495913126)*x_ref[2]
-        ref[2,0]=(-0.836556750858)*x_ref[0]**o+(0.976027316021)*x_ref[0]+(-0.556499096672)*x_ref[1]**o+(0.320038395915)*x_ref[1]+(0.377663884516)*x_ref[2]**o+(0.491202727923)*x_ref[2]
-        ref[2,1]=(-0.329597826951)*x_ref[0]**o+(-0.555819984044)*x_ref[0]+(0.110029358927)*x_ref[1]**o+(-0.737070187836)*x_ref[1]+(-0.587142473737)*x_ref[2]**o+(-0.0388834177112)*x_ref[2]
-        ref[2,2]=(0.442251030646)*x_ref[0]**o+(0.285010574287)*x_ref[0]+(0.603267537331)*x_ref[1]**o+(-0.0776884302384)*x_ref[1]+(-0.123541484708)*x_ref[2]**o+(0.44717125529)*x_ref[2]
-        ref[2,3]=(0.474458930313)*x_ref[0]**o+(0.415947401939)*x_ref[0]+(0.381539850696)*x_ref[1]**o+(-0.307590909422)*x_ref[1]+(0.488348451586)*x_ref[2]**o+(0.336883810306)*x_ref[2]
-        ref[2,4]=(0.804466542611)*x_ref[0]**o+(0.891337158669)*x_ref[0]+(-0.599119487307)*x_ref[1]**o+(-0.92047732727)*x_ref[1]+(-0.251489480657)*x_ref[2]**o+(-0.266483991526)*x_ref[2]
-        ref[3,0]=(-0.733633520827)*x_ref[0]**o+(0.494805537624)*x_ref[0]+(-0.117702558274)*x_ref[1]**o+(-0.000461693303442)*x_ref[1]+(-0.102033981202)*x_ref[2]**o+(-0.772865985272)*x_ref[2]
-        ref[3,1]=(-0.636901276465)*x_ref[0]**o+(-0.436330072041)*x_ref[0]+(0.403048850222)*x_ref[1]**o+(-0.94737100009)*x_ref[1]+(0.781059874101)*x_ref[2]**o+(-0.952781516037)*x_ref[2]
-        ref[3,2]=(-0.489372336164)*x_ref[0]**o+(0.221211043152)*x_ref[0]+(0.793975373906)*x_ref[1]**o+(0.424349965288)*x_ref[1]+(0.453332885662)*x_ref[2]**o+(-0.513541753005)*x_ref[2]
-        ref[3,3]=(-0.700899677836)*x_ref[0]**o+(-0.984271896306)*x_ref[0]+(-0.663909486898)*x_ref[1]**o+(0.461302174316)*x_ref[1]+(-0.906457707724)*x_ref[2]**o+(-0.0440003164038)*x_ref[2]
-        ref[3,4]=(0.838326295366)*x_ref[0]**o+(-0.483407593962)*x_ref[0]+(-0.122458752397)*x_ref[1]**o+(0.607337951095)*x_ref[1]+(0.750481384434)*x_ref[2]**o+(-0.677155633204)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.111473275114)*x[0]**o+(-0.552264448532)*x[0]+(0.67142534913)*x[1]**o+(-0.642305751076)*x[1]
-        arg[0,0,1]=(-0.431075800974)*x[0]**o+(0.911382078454)*x[0]+(0.546541644612)*x[1]**o+(-0.67679652536)*x[1]
-        arg[0,1,0]=(0.103056292292)*x[0]**o+(-0.640858804416)*x[0]+(0.159596964992)*x[1]**o+(-0.237782007316)*x[1]
-        arg[0,1,1]=(0.975898170389)*x[0]**o+(0.255916326383)*x[0]+(-0.692770462322)*x[1]**o+(0.786355114846)*x[1]
-        arg[1,0,0]=(-0.669378370759)*x[0]**o+(-0.0153788709146)*x[0]+(0.924383188557)*x[1]**o+(0.885037556829)*x[1]
-        arg[1,0,1]=(-0.509891819881)*x[0]**o+(-0.377779514697)*x[0]+(-0.343176473036)*x[1]**o+(-0.39978416725)*x[1]
-        arg[1,1,0]=(0.457959467665)*x[0]**o+(0.786511967341)*x[0]+(0.256561665146)*x[1]**o+(-0.261300099643)*x[1]
-        arg[1,1,1]=(0.219754515189)*x[0]**o+(-0.131747762867)*x[0]+(0.736017818893)*x[1]**o+(-0.450963700533)*x[1]
-        arg[2,0,0]=(-0.182946832789)*x[0]**o+(-0.103064731935)*x[0]+(-0.223584334222)*x[1]**o+(-0.578088201628)*x[1]
-        arg[2,0,1]=(-0.830744157425)*x[0]**o+(0.590627167207)*x[0]+(-0.538048378049)*x[1]**o+(-0.0529793352741)*x[1]
-        arg[2,1,0]=(-0.307908670388)*x[0]**o+(-0.929987734045)*x[0]+(-0.167190563092)*x[1]**o+(0.126466628227)*x[1]
-        arg[2,1,1]=(-0.812045378916)*x[0]**o+(0.676973938072)*x[0]+(0.528243909204)*x[1]**o+(-0.594241387691)*x[1]
-        arg[3,0,0]=(-0.0198606164114)*x[0]**o+(-0.00574708685554)*x[0]+(0.908946312745)*x[1]**o+(0.775054099788)*x[1]
-        arg[3,0,1]=(-0.810078120518)*x[0]**o+(-0.960585888485)*x[0]+(-0.0747272427198)*x[1]**o+(0.164107641817)*x[1]
-        arg[3,1,0]=(-0.535791917139)*x[0]**o+(0.0424226440074)*x[0]+(0.701479263902)*x[1]**o+(0.787745423088)*x[1]
-        arg[3,1,1]=(-0.896532152793)*x[0]**o+(-0.0224566920251)*x[0]+(-0.554655626689)*x[1]**o+(0.41012867952)*x[1]
-        arg[4,0,0]=(0.972433817496)*x[0]**o+(-0.440662536033)*x[0]+(-0.910456530943)*x[1]**o+(-0.333429535028)*x[1]
-        arg[4,0,1]=(-0.415824313942)*x[0]**o+(0.00255557712922)*x[0]+(0.304897639195)*x[1]**o+(-0.866600848052)*x[1]
-        arg[4,1,0]=(-0.866277739076)*x[0]**o+(0.282976169776)*x[0]+(0.477528278501)*x[1]**o+(-0.233506497695)*x[1]
-        arg[4,1,1]=(-0.12729626381)*x[0]**o+(-0.723204796785)*x[0]+(0.0856495713442)*x[1]**o+(-0.214819437731)*x[1]
-        arg[5,0,0]=(0.208133503644)*x[0]**o+(-0.955529202895)*x[0]+(0.0291569127831)*x[1]**o+(0.489913918305)*x[1]
-        arg[5,0,1]=(0.96923667477)*x[0]**o+(0.543776525315)*x[0]+(0.38666450029)*x[1]**o+(-0.193493550272)*x[1]
-        arg[5,1,0]=(-0.0912940016888)*x[0]**o+(-0.477561072681)*x[0]+(0.474816021613)*x[1]**o+(-0.252664229253)*x[1]
-        arg[5,1,1]=(0.748337265159)*x[0]**o+(-0.706194454618)*x[0]+(-0.504466281507)*x[1]**o+(0.582500817679)*x[1]
-        ref[0,0,0]=(0.111473275114)*x_ref[0]**o+(-0.552264448532)*x_ref[0]+(0.67142534913)*x_ref[1]**o+(-0.642305751076)*x_ref[1]
-        ref[0,0,1]=(-0.431075800974)*x_ref[0]**o+(0.911382078454)*x_ref[0]+(0.546541644612)*x_ref[1]**o+(-0.67679652536)*x_ref[1]
-        ref[0,1,0]=(0.103056292292)*x_ref[0]**o+(-0.640858804416)*x_ref[0]+(0.159596964992)*x_ref[1]**o+(-0.237782007316)*x_ref[1]
-        ref[0,1,1]=(0.975898170389)*x_ref[0]**o+(0.255916326383)*x_ref[0]+(-0.692770462322)*x_ref[1]**o+(0.786355114846)*x_ref[1]
-        ref[1,0,0]=(-0.669378370759)*x_ref[0]**o+(-0.0153788709146)*x_ref[0]+(0.924383188557)*x_ref[1]**o+(0.885037556829)*x_ref[1]
-        ref[1,0,1]=(-0.509891819881)*x_ref[0]**o+(-0.377779514697)*x_ref[0]+(-0.343176473036)*x_ref[1]**o+(-0.39978416725)*x_ref[1]
-        ref[1,1,0]=(0.457959467665)*x_ref[0]**o+(0.786511967341)*x_ref[0]+(0.256561665146)*x_ref[1]**o+(-0.261300099643)*x_ref[1]
-        ref[1,1,1]=(0.219754515189)*x_ref[0]**o+(-0.131747762867)*x_ref[0]+(0.736017818893)*x_ref[1]**o+(-0.450963700533)*x_ref[1]
-        ref[2,0,0]=(-0.182946832789)*x_ref[0]**o+(-0.103064731935)*x_ref[0]+(-0.223584334222)*x_ref[1]**o+(-0.578088201628)*x_ref[1]
-        ref[2,0,1]=(-0.830744157425)*x_ref[0]**o+(0.590627167207)*x_ref[0]+(-0.538048378049)*x_ref[1]**o+(-0.0529793352741)*x_ref[1]
-        ref[2,1,0]=(-0.307908670388)*x_ref[0]**o+(-0.929987734045)*x_ref[0]+(-0.167190563092)*x_ref[1]**o+(0.126466628227)*x_ref[1]
-        ref[2,1,1]=(-0.812045378916)*x_ref[0]**o+(0.676973938072)*x_ref[0]+(0.528243909204)*x_ref[1]**o+(-0.594241387691)*x_ref[1]
-        ref[3,0,0]=(-0.0198606164114)*x_ref[0]**o+(-0.00574708685554)*x_ref[0]+(0.908946312745)*x_ref[1]**o+(0.775054099788)*x_ref[1]
-        ref[3,0,1]=(-0.810078120518)*x_ref[0]**o+(-0.960585888485)*x_ref[0]+(-0.0747272427198)*x_ref[1]**o+(0.164107641817)*x_ref[1]
-        ref[3,1,0]=(-0.535791917139)*x_ref[0]**o+(0.0424226440074)*x_ref[0]+(0.701479263902)*x_ref[1]**o+(0.787745423088)*x_ref[1]
-        ref[3,1,1]=(-0.896532152793)*x_ref[0]**o+(-0.0224566920251)*x_ref[0]+(-0.554655626689)*x_ref[1]**o+(0.41012867952)*x_ref[1]
-        ref[4,0,0]=(0.972433817496)*x_ref[0]**o+(-0.440662536033)*x_ref[0]+(-0.910456530943)*x_ref[1]**o+(-0.333429535028)*x_ref[1]
-        ref[4,0,1]=(-0.415824313942)*x_ref[0]**o+(0.00255557712922)*x_ref[0]+(0.304897639195)*x_ref[1]**o+(-0.866600848052)*x_ref[1]
-        ref[4,1,0]=(-0.866277739076)*x_ref[0]**o+(0.282976169776)*x_ref[0]+(0.477528278501)*x_ref[1]**o+(-0.233506497695)*x_ref[1]
-        ref[4,1,1]=(-0.12729626381)*x_ref[0]**o+(-0.723204796785)*x_ref[0]+(0.0856495713442)*x_ref[1]**o+(-0.214819437731)*x_ref[1]
-        ref[5,0,0]=(0.208133503644)*x_ref[0]**o+(-0.955529202895)*x_ref[0]+(0.0291569127831)*x_ref[1]**o+(0.489913918305)*x_ref[1]
-        ref[5,0,1]=(0.96923667477)*x_ref[0]**o+(0.543776525315)*x_ref[0]+(0.38666450029)*x_ref[1]**o+(-0.193493550272)*x_ref[1]
-        ref[5,1,0]=(-0.0912940016888)*x_ref[0]**o+(-0.477561072681)*x_ref[0]+(0.474816021613)*x_ref[1]**o+(-0.252664229253)*x_ref[1]
-        ref[5,1,1]=(0.748337265159)*x_ref[0]**o+(-0.706194454618)*x_ref[0]+(-0.504466281507)*x_ref[1]**o+(0.582500817679)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.179972720095)*x[0]**o+(-0.546715268523)*x[0]+(0.835867431319)*x[1]**o+(0.626798499259)*x[1]+(0.397356013278)*x[2]**o+(0.0771586784158)*x[2]
-        arg[0,0,1]=(0.625676031039)*x[0]**o+(0.65843849475)*x[0]+(0.456469199307)*x[1]**o+(-0.970709759479)*x[1]+(-0.699606143992)*x[2]**o+(0.76429400724)*x[2]
-        arg[0,1,0]=(0.613916424165)*x[0]**o+(0.556778588303)*x[0]+(-0.509658743529)*x[1]**o+(-0.978718968218)*x[1]+(-0.603928369428)*x[2]**o+(-0.550813953692)*x[2]
-        arg[0,1,1]=(-0.935214755436)*x[0]**o+(0.44745901813)*x[0]+(-0.582828846453)*x[1]**o+(-0.181547183233)*x[1]+(-0.183912053485)*x[2]**o+(0.446152494296)*x[2]
-        arg[1,0,0]=(-0.486345219779)*x[0]**o+(0.753529436833)*x[0]+(0.138157856552)*x[1]**o+(-0.874849020539)*x[1]+(0.374396543792)*x[2]**o+(0.26548456046)*x[2]
-        arg[1,0,1]=(0.492908753036)*x[0]**o+(-0.418118685105)*x[0]+(0.880817569823)*x[1]**o+(-0.827691145524)*x[1]+(0.238633156133)*x[2]**o+(-0.463687731341)*x[2]
-        arg[1,1,0]=(-0.397373578442)*x[0]**o+(-0.316321105607)*x[0]+(0.647511225459)*x[1]**o+(-0.82553752195)*x[1]+(-0.715549303171)*x[2]**o+(0.804623957459)*x[2]
-        arg[1,1,1]=(0.414743130234)*x[0]**o+(0.0201794413683)*x[0]+(-0.636337599584)*x[1]**o+(-0.230053616026)*x[1]+(-0.4302153311)*x[2]**o+(-0.387468029626)*x[2]
-        arg[2,0,0]=(0.715100517336)*x[0]**o+(-0.4286120178)*x[0]+(0.0987858542117)*x[1]**o+(0.815093470301)*x[1]+(0.293455353257)*x[2]**o+(0.200576090379)*x[2]
-        arg[2,0,1]=(-0.158330015822)*x[0]**o+(0.363339023457)*x[0]+(-0.796055594971)*x[1]**o+(-0.213299205306)*x[1]+(-0.136620988812)*x[2]**o+(0.10733886947)*x[2]
-        arg[2,1,0]=(-0.258729405118)*x[0]**o+(0.0669553480038)*x[0]+(0.997663166613)*x[1]**o+(0.00398861063931)*x[1]+(-0.989459856803)*x[2]**o+(0.932687384325)*x[2]
-        arg[2,1,1]=(-0.974431322319)*x[0]**o+(-0.486447431804)*x[0]+(0.871784873347)*x[1]**o+(-0.978904038765)*x[1]+(0.647341201506)*x[2]**o+(-0.269683556528)*x[2]
-        arg[3,0,0]=(-0.369507398073)*x[0]**o+(-0.772085607074)*x[0]+(0.417550881937)*x[1]**o+(0.271743719652)*x[1]+(0.881807154737)*x[2]**o+(0.54725428039)*x[2]
-        arg[3,0,1]=(0.440089335941)*x[0]**o+(0.0844171421294)*x[0]+(0.926389704362)*x[1]**o+(-0.0709182998297)*x[1]+(0.903978660317)*x[2]**o+(-0.160556206716)*x[2]
-        arg[3,1,0]=(-0.49936391282)*x[0]**o+(-0.632753931881)*x[0]+(-0.604686084554)*x[1]**o+(-0.954205199531)*x[1]+(-0.535102184845)*x[2]**o+(0.621683814123)*x[2]
-        arg[3,1,1]=(-0.117790973132)*x[0]**o+(-0.649091727896)*x[0]+(0.925682916785)*x[1]**o+(0.852053515469)*x[1]+(-0.479218429897)*x[2]**o+(0.426823478575)*x[2]
-        arg[4,0,0]=(0.454174564319)*x[0]**o+(-0.855975647406)*x[0]+(0.775972969288)*x[1]**o+(0.267900999893)*x[1]+(0.221387501995)*x[2]**o+(-0.26413791201)*x[2]
-        arg[4,0,1]=(0.875191302431)*x[0]**o+(-0.362782502152)*x[0]+(0.24600070339)*x[1]**o+(-0.566709533298)*x[1]+(-0.82187455531)*x[2]**o+(-0.943929640301)*x[2]
-        arg[4,1,0]=(-0.409313259973)*x[0]**o+(-0.784833509001)*x[0]+(-0.939690505056)*x[1]**o+(-0.0736280226974)*x[1]+(0.939072745486)*x[2]**o+(0.611697159959)*x[2]
-        arg[4,1,1]=(0.893374246808)*x[0]**o+(0.36113513561)*x[0]+(0.227899271271)*x[1]**o+(-0.847221657012)*x[1]+(-0.0106368947417)*x[2]**o+(0.0358896817595)*x[2]
-        arg[5,0,0]=(0.0329230524924)*x[0]**o+(0.0565192084014)*x[0]+(-0.68398448658)*x[1]**o+(0.909035618076)*x[1]+(-0.900060440872)*x[2]**o+(-0.481014787833)*x[2]
-        arg[5,0,1]=(0.404966692391)*x[0]**o+(0.647468764373)*x[0]+(-0.723847499346)*x[1]**o+(-0.0740896957606)*x[1]+(-0.00628515079923)*x[2]**o+(0.906667863539)*x[2]
-        arg[5,1,0]=(0.983181781531)*x[0]**o+(-0.297325990236)*x[0]+(0.00489064543352)*x[1]**o+(0.667560767038)*x[1]+(-0.665768141301)*x[2]**o+(0.772761393608)*x[2]
-        arg[5,1,1]=(-0.496581691354)*x[0]**o+(0.0121337979505)*x[0]+(0.492281382726)*x[1]**o+(0.545232714025)*x[1]+(0.418321481532)*x[2]**o+(0.489635969764)*x[2]
-        ref[0,0,0]=(-0.179972720095)*x_ref[0]**o+(-0.546715268523)*x_ref[0]+(0.835867431319)*x_ref[1]**o+(0.626798499259)*x_ref[1]+(0.397356013278)*x_ref[2]**o+(0.0771586784158)*x_ref[2]
-        ref[0,0,1]=(0.625676031039)*x_ref[0]**o+(0.65843849475)*x_ref[0]+(0.456469199307)*x_ref[1]**o+(-0.970709759479)*x_ref[1]+(-0.699606143992)*x_ref[2]**o+(0.76429400724)*x_ref[2]
-        ref[0,1,0]=(0.613916424165)*x_ref[0]**o+(0.556778588303)*x_ref[0]+(-0.509658743529)*x_ref[1]**o+(-0.978718968218)*x_ref[1]+(-0.603928369428)*x_ref[2]**o+(-0.550813953692)*x_ref[2]
-        ref[0,1,1]=(-0.935214755436)*x_ref[0]**o+(0.44745901813)*x_ref[0]+(-0.582828846453)*x_ref[1]**o+(-0.181547183233)*x_ref[1]+(-0.183912053485)*x_ref[2]**o+(0.446152494296)*x_ref[2]
-        ref[1,0,0]=(-0.486345219779)*x_ref[0]**o+(0.753529436833)*x_ref[0]+(0.138157856552)*x_ref[1]**o+(-0.874849020539)*x_ref[1]+(0.374396543792)*x_ref[2]**o+(0.26548456046)*x_ref[2]
-        ref[1,0,1]=(0.492908753036)*x_ref[0]**o+(-0.418118685105)*x_ref[0]+(0.880817569823)*x_ref[1]**o+(-0.827691145524)*x_ref[1]+(0.238633156133)*x_ref[2]**o+(-0.463687731341)*x_ref[2]
-        ref[1,1,0]=(-0.397373578442)*x_ref[0]**o+(-0.316321105607)*x_ref[0]+(0.647511225459)*x_ref[1]**o+(-0.82553752195)*x_ref[1]+(-0.715549303171)*x_ref[2]**o+(0.804623957459)*x_ref[2]
-        ref[1,1,1]=(0.414743130234)*x_ref[0]**o+(0.0201794413683)*x_ref[0]+(-0.636337599584)*x_ref[1]**o+(-0.230053616026)*x_ref[1]+(-0.4302153311)*x_ref[2]**o+(-0.387468029626)*x_ref[2]
-        ref[2,0,0]=(0.715100517336)*x_ref[0]**o+(-0.4286120178)*x_ref[0]+(0.0987858542117)*x_ref[1]**o+(0.815093470301)*x_ref[1]+(0.293455353257)*x_ref[2]**o+(0.200576090379)*x_ref[2]
-        ref[2,0,1]=(-0.158330015822)*x_ref[0]**o+(0.363339023457)*x_ref[0]+(-0.796055594971)*x_ref[1]**o+(-0.213299205306)*x_ref[1]+(-0.136620988812)*x_ref[2]**o+(0.10733886947)*x_ref[2]
-        ref[2,1,0]=(-0.258729405118)*x_ref[0]**o+(0.0669553480038)*x_ref[0]+(0.997663166613)*x_ref[1]**o+(0.00398861063931)*x_ref[1]+(-0.989459856803)*x_ref[2]**o+(0.932687384325)*x_ref[2]
-        ref[2,1,1]=(-0.974431322319)*x_ref[0]**o+(-0.486447431804)*x_ref[0]+(0.871784873347)*x_ref[1]**o+(-0.978904038765)*x_ref[1]+(0.647341201506)*x_ref[2]**o+(-0.269683556528)*x_ref[2]
-        ref[3,0,0]=(-0.369507398073)*x_ref[0]**o+(-0.772085607074)*x_ref[0]+(0.417550881937)*x_ref[1]**o+(0.271743719652)*x_ref[1]+(0.881807154737)*x_ref[2]**o+(0.54725428039)*x_ref[2]
-        ref[3,0,1]=(0.440089335941)*x_ref[0]**o+(0.0844171421294)*x_ref[0]+(0.926389704362)*x_ref[1]**o+(-0.0709182998297)*x_ref[1]+(0.903978660317)*x_ref[2]**o+(-0.160556206716)*x_ref[2]
-        ref[3,1,0]=(-0.49936391282)*x_ref[0]**o+(-0.632753931881)*x_ref[0]+(-0.604686084554)*x_ref[1]**o+(-0.954205199531)*x_ref[1]+(-0.535102184845)*x_ref[2]**o+(0.621683814123)*x_ref[2]
-        ref[3,1,1]=(-0.117790973132)*x_ref[0]**o+(-0.649091727896)*x_ref[0]+(0.925682916785)*x_ref[1]**o+(0.852053515469)*x_ref[1]+(-0.479218429897)*x_ref[2]**o+(0.426823478575)*x_ref[2]
-        ref[4,0,0]=(0.454174564319)*x_ref[0]**o+(-0.855975647406)*x_ref[0]+(0.775972969288)*x_ref[1]**o+(0.267900999893)*x_ref[1]+(0.221387501995)*x_ref[2]**o+(-0.26413791201)*x_ref[2]
-        ref[4,0,1]=(0.875191302431)*x_ref[0]**o+(-0.362782502152)*x_ref[0]+(0.24600070339)*x_ref[1]**o+(-0.566709533298)*x_ref[1]+(-0.82187455531)*x_ref[2]**o+(-0.943929640301)*x_ref[2]
-        ref[4,1,0]=(-0.409313259973)*x_ref[0]**o+(-0.784833509001)*x_ref[0]+(-0.939690505056)*x_ref[1]**o+(-0.0736280226974)*x_ref[1]+(0.939072745486)*x_ref[2]**o+(0.611697159959)*x_ref[2]
-        ref[4,1,1]=(0.893374246808)*x_ref[0]**o+(0.36113513561)*x_ref[0]+(0.227899271271)*x_ref[1]**o+(-0.847221657012)*x_ref[1]+(-0.0106368947417)*x_ref[2]**o+(0.0358896817595)*x_ref[2]
-        ref[5,0,0]=(0.0329230524924)*x_ref[0]**o+(0.0565192084014)*x_ref[0]+(-0.68398448658)*x_ref[1]**o+(0.909035618076)*x_ref[1]+(-0.900060440872)*x_ref[2]**o+(-0.481014787833)*x_ref[2]
-        ref[5,0,1]=(0.404966692391)*x_ref[0]**o+(0.647468764373)*x_ref[0]+(-0.723847499346)*x_ref[1]**o+(-0.0740896957606)*x_ref[1]+(-0.00628515079923)*x_ref[2]**o+(0.906667863539)*x_ref[2]
-        ref[5,1,0]=(0.983181781531)*x_ref[0]**o+(-0.297325990236)*x_ref[0]+(0.00489064543352)*x_ref[1]**o+(0.667560767038)*x_ref[1]+(-0.665768141301)*x_ref[2]**o+(0.772761393608)*x_ref[2]
-        ref[5,1,1]=(-0.496581691354)*x_ref[0]**o+(0.0121337979505)*x_ref[0]+(0.492281382726)*x_ref[1]**o+(0.545232714025)*x_ref[1]+(0.418321481532)*x_ref[2]**o+(0.489635969764)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.282394950702)*x[0]**o+(0.836580157584)*x[0]+(0.337652262648)*x[1]**o+(-0.442694263325)*x[1]
-        arg[0,0,0,1]=(0.85150774028)*x[0]**o+(0.998297296593)*x[0]+(-0.710029954342)*x[1]**o+(0.0816168287837)*x[1]
-        arg[0,0,1,0]=(-0.636435102838)*x[0]**o+(-0.613479863553)*x[0]+(-0.861506513168)*x[1]**o+(-0.242998961478)*x[1]
-        arg[0,0,1,1]=(-0.00671863978521)*x[0]**o+(0.909404084068)*x[0]+(-0.734956067026)*x[1]**o+(0.256530538264)*x[1]
-        arg[0,0,2,0]=(-0.646631608999)*x[0]**o+(-0.521130455843)*x[0]+(-0.44328404557)*x[1]**o+(-0.156860325817)*x[1]
-        arg[0,0,2,1]=(-0.817550008949)*x[0]**o+(0.702414497795)*x[0]+(0.946449680763)*x[1]**o+(-0.61576361925)*x[1]
-        arg[0,1,0,0]=(-0.527206691595)*x[0]**o+(-0.43469216984)*x[0]+(-0.108455901154)*x[1]**o+(0.435646962156)*x[1]
-        arg[0,1,0,1]=(-0.148522219535)*x[0]**o+(0.146912249755)*x[0]+(-0.414934945665)*x[1]**o+(-0.422754988714)*x[1]
-        arg[0,1,1,0]=(0.177760972947)*x[0]**o+(-0.938522530862)*x[0]+(0.566229652264)*x[1]**o+(0.255269743628)*x[1]
-        arg[0,1,1,1]=(-0.317807933792)*x[0]**o+(0.432181451246)*x[0]+(-0.358821513362)*x[1]**o+(-0.470517232585)*x[1]
-        arg[0,1,2,0]=(0.486536430227)*x[0]**o+(-0.533653809349)*x[0]+(-0.126612514045)*x[1]**o+(0.103088115487)*x[1]
-        arg[0,1,2,1]=(-0.995976559589)*x[0]**o+(0.965537167421)*x[0]+(-0.351307699531)*x[1]**o+(-0.684367434666)*x[1]
-        arg[0,2,0,0]=(0.976008613768)*x[0]**o+(-0.890573007002)*x[0]+(-0.440709423944)*x[1]**o+(0.315724459367)*x[1]
-        arg[0,2,0,1]=(-0.595275811962)*x[0]**o+(-0.599634144509)*x[0]+(0.646466002346)*x[1]**o+(-0.94529568651)*x[1]
-        arg[0,2,1,0]=(0.977691521821)*x[0]**o+(-0.0730997643682)*x[0]+(-0.338897498737)*x[1]**o+(0.246308678824)*x[1]
-        arg[0,2,1,1]=(-0.111317410732)*x[0]**o+(-0.574381793398)*x[0]+(-0.0314431899843)*x[1]**o+(0.393105047096)*x[1]
-        arg[0,2,2,0]=(0.886320020757)*x[0]**o+(-0.785042003544)*x[0]+(0.82609269979)*x[1]**o+(-0.677169484337)*x[1]
-        arg[0,2,2,1]=(0.811027138079)*x[0]**o+(-0.375108470948)*x[0]+(0.781472464253)*x[1]**o+(0.217640794143)*x[1]
-        arg[0,3,0,0]=(0.264884117091)*x[0]**o+(0.116591319557)*x[0]+(0.282667679763)*x[1]**o+(0.111123454337)*x[1]
-        arg[0,3,0,1]=(0.0451626985922)*x[0]**o+(-0.93771279728)*x[0]+(0.129171764072)*x[1]**o+(0.598367954162)*x[1]
-        arg[0,3,1,0]=(0.905243511086)*x[0]**o+(0.0837062573586)*x[0]+(0.0657223248433)*x[1]**o+(-0.746644690072)*x[1]
-        arg[0,3,1,1]=(-0.0547856755485)*x[0]**o+(-0.22157806755)*x[0]+(0.124623625108)*x[1]**o+(0.0436590157081)*x[1]
-        arg[0,3,2,0]=(-0.558323744577)*x[0]**o+(-0.646043519007)*x[0]+(0.991885458004)*x[1]**o+(-0.634140808163)*x[1]
-        arg[0,3,2,1]=(-0.27247983028)*x[0]**o+(0.803906404485)*x[0]+(-0.816826609924)*x[1]**o+(-0.969532783336)*x[1]
-        arg[0,4,0,0]=(0.638733842891)*x[0]**o+(-0.972793270208)*x[0]+(0.714611008099)*x[1]**o+(0.586988595847)*x[1]
-        arg[0,4,0,1]=(0.63584760734)*x[0]**o+(-0.653740236747)*x[0]+(-0.596304731446)*x[1]**o+(0.42519786429)*x[1]
-        arg[0,4,1,0]=(0.0665562973529)*x[0]**o+(0.362152092093)*x[0]+(0.732530335739)*x[1]**o+(0.618536326941)*x[1]
-        arg[0,4,1,1]=(0.486060667608)*x[0]**o+(0.59489013279)*x[0]+(-0.547237017498)*x[1]**o+(0.0371894705857)*x[1]
-        arg[0,4,2,0]=(0.395505844397)*x[0]**o+(-0.869090434535)*x[0]+(-0.606640827437)*x[1]**o+(0.269995459083)*x[1]
-        arg[0,4,2,1]=(0.304671547176)*x[0]**o+(-0.515772523849)*x[0]+(0.546114300876)*x[1]**o+(0.530247404341)*x[1]
-        arg[1,0,0,0]=(0.408332677433)*x[0]**o+(-0.0778807359918)*x[0]+(-0.803337489297)*x[1]**o+(-0.123835718422)*x[1]
-        arg[1,0,0,1]=(-0.00441620254944)*x[0]**o+(0.0321259598831)*x[0]+(-0.998381508472)*x[1]**o+(0.800767747511)*x[1]
-        arg[1,0,1,0]=(-0.923683057418)*x[0]**o+(0.579405114902)*x[0]+(-0.939639823585)*x[1]**o+(-0.138423358134)*x[1]
-        arg[1,0,1,1]=(-0.558420234848)*x[0]**o+(0.133316569813)*x[0]+(-0.294134717329)*x[1]**o+(-0.750897749044)*x[1]
-        arg[1,0,2,0]=(0.478951298545)*x[0]**o+(-0.807173978799)*x[0]+(0.852438146763)*x[1]**o+(-0.103814229563)*x[1]
-        arg[1,0,2,1]=(-0.875250726603)*x[0]**o+(-0.934803428491)*x[0]+(0.143352873672)*x[1]**o+(0.600934881206)*x[1]
-        arg[1,1,0,0]=(-0.0539476321018)*x[0]**o+(0.194177663417)*x[0]+(-0.862877991009)*x[1]**o+(-0.438337993664)*x[1]
-        arg[1,1,0,1]=(-0.623379355474)*x[0]**o+(-0.0746994739748)*x[0]+(0.365005438956)*x[1]**o+(-0.431737688205)*x[1]
-        arg[1,1,1,0]=(0.0936054461735)*x[0]**o+(-0.974594269446)*x[0]+(-0.121917598428)*x[1]**o+(-0.84429083727)*x[1]
-        arg[1,1,1,1]=(0.967763348672)*x[0]**o+(0.331698826475)*x[0]+(0.66448515877)*x[1]**o+(0.00214985930661)*x[1]
-        arg[1,1,2,0]=(-0.312146580762)*x[0]**o+(0.998152287706)*x[0]+(-0.474242942777)*x[1]**o+(0.637827347846)*x[1]
-        arg[1,1,2,1]=(-0.556765443436)*x[0]**o+(0.227327929774)*x[0]+(0.739457845569)*x[1]**o+(-0.615070017663)*x[1]
-        arg[1,2,0,0]=(-0.23030660552)*x[0]**o+(0.750479465953)*x[0]+(0.278215408392)*x[1]**o+(-0.640618698224)*x[1]
-        arg[1,2,0,1]=(-0.0713217101129)*x[0]**o+(0.500737477887)*x[0]+(-0.972834770005)*x[1]**o+(-0.420386056033)*x[1]
-        arg[1,2,1,0]=(-0.497322989847)*x[0]**o+(-0.528685124841)*x[0]+(-0.934386348496)*x[1]**o+(0.191930553839)*x[1]
-        arg[1,2,1,1]=(0.124362419781)*x[0]**o+(-0.0457849787456)*x[0]+(-0.360596154712)*x[1]**o+(0.799736253715)*x[1]
-        arg[1,2,2,0]=(-0.346294878893)*x[0]**o+(0.427772309361)*x[0]+(-0.0642666791012)*x[1]**o+(-0.214442238311)*x[1]
-        arg[1,2,2,1]=(0.24434837411)*x[0]**o+(-0.913373159786)*x[0]+(0.158750862391)*x[1]**o+(-0.544328807576)*x[1]
-        arg[1,3,0,0]=(0.870847002687)*x[0]**o+(-0.466884462301)*x[0]+(-0.343358829445)*x[1]**o+(-0.180956419766)*x[1]
-        arg[1,3,0,1]=(-0.813518850863)*x[0]**o+(0.960810467501)*x[0]+(0.35091416904)*x[1]**o+(0.84534544948)*x[1]
-        arg[1,3,1,0]=(-0.284687751218)*x[0]**o+(-0.274583519355)*x[0]+(0.338892764102)*x[1]**o+(-0.145142443753)*x[1]
-        arg[1,3,1,1]=(0.921064262137)*x[0]**o+(0.152552421678)*x[0]+(0.827247693375)*x[1]**o+(-0.569529848619)*x[1]
-        arg[1,3,2,0]=(0.133567630356)*x[0]**o+(-0.0429397358364)*x[0]+(-0.175383170663)*x[1]**o+(0.584407631334)*x[1]
-        arg[1,3,2,1]=(0.203880167371)*x[0]**o+(-0.422978073825)*x[0]+(-0.210109267588)*x[1]**o+(-0.902327373219)*x[1]
-        arg[1,4,0,0]=(-0.566386864876)*x[0]**o+(-0.139795085483)*x[0]+(-0.00852913464238)*x[1]**o+(0.569151381884)*x[1]
-        arg[1,4,0,1]=(-0.937256625212)*x[0]**o+(0.563438253128)*x[0]+(-0.586182238715)*x[1]**o+(-0.566169678723)*x[1]
-        arg[1,4,1,0]=(-0.73296890712)*x[0]**o+(0.359249594406)*x[0]+(0.66050790616)*x[1]**o+(-0.367919797426)*x[1]
-        arg[1,4,1,1]=(-0.81165734248)*x[0]**o+(0.460592817838)*x[0]+(0.953573909492)*x[1]**o+(0.329659021274)*x[1]
-        arg[1,4,2,0]=(0.345994483595)*x[0]**o+(-0.18547324343)*x[0]+(0.669452926238)*x[1]**o+(0.42513249272)*x[1]
-        arg[1,4,2,1]=(0.250677642616)*x[0]**o+(0.466118496803)*x[0]+(-0.776608543595)*x[1]**o+(0.449144243682)*x[1]
-        arg[2,0,0,0]=(0.244172909021)*x[0]**o+(0.0311068322898)*x[0]+(-0.909348039508)*x[1]**o+(0.376500719414)*x[1]
-        arg[2,0,0,1]=(-0.033516640667)*x[0]**o+(0.698424718328)*x[0]+(-0.282814785542)*x[1]**o+(0.61118022947)*x[1]
-        arg[2,0,1,0]=(-0.946672649538)*x[0]**o+(0.814325244591)*x[0]+(-0.353215562825)*x[1]**o+(-0.138150257429)*x[1]
-        arg[2,0,1,1]=(-0.886509051692)*x[0]**o+(-0.0468334385819)*x[0]+(0.71984719189)*x[1]**o+(-0.324744971493)*x[1]
-        arg[2,0,2,0]=(-0.780921647053)*x[0]**o+(-0.401418496932)*x[0]+(0.647847274332)*x[1]**o+(-0.831834322278)*x[1]
-        arg[2,0,2,1]=(0.835155004862)*x[0]**o+(0.684459986902)*x[0]+(-0.301244240677)*x[1]**o+(-0.161292780187)*x[1]
-        arg[2,1,0,0]=(-0.652199398394)*x[0]**o+(0.62480722178)*x[0]+(-0.474535712914)*x[1]**o+(0.926061797766)*x[1]
-        arg[2,1,0,1]=(-0.813365478568)*x[0]**o+(-0.38795792417)*x[0]+(0.378161353697)*x[1]**o+(0.70581806211)*x[1]
-        arg[2,1,1,0]=(0.729265594934)*x[0]**o+(-0.469397842359)*x[0]+(0.642472199926)*x[1]**o+(-0.779527283011)*x[1]
-        arg[2,1,1,1]=(0.0517342917574)*x[0]**o+(-0.414111007917)*x[0]+(-0.89437375241)*x[1]**o+(-0.830119585842)*x[1]
-        arg[2,1,2,0]=(0.769898486257)*x[0]**o+(0.791725624832)*x[0]+(0.297519329396)*x[1]**o+(-0.959462006611)*x[1]
-        arg[2,1,2,1]=(0.817802144251)*x[0]**o+(0.69851258911)*x[0]+(-0.174401735228)*x[1]**o+(0.13449696498)*x[1]
-        arg[2,2,0,0]=(0.547972662256)*x[0]**o+(-0.66491929979)*x[0]+(0.330783041672)*x[1]**o+(0.816196730606)*x[1]
-        arg[2,2,0,1]=(0.245971097763)*x[0]**o+(0.213087481481)*x[0]+(-0.840766291392)*x[1]**o+(0.388414557376)*x[1]
-        arg[2,2,1,0]=(0.523151676444)*x[0]**o+(0.854817486027)*x[0]+(-0.53570188528)*x[1]**o+(-0.68149362242)*x[1]
-        arg[2,2,1,1]=(-0.984200247787)*x[0]**o+(0.83324365092)*x[0]+(-0.896184408816)*x[1]**o+(0.102276243487)*x[1]
-        arg[2,2,2,0]=(-0.216357164308)*x[0]**o+(-0.597984882107)*x[0]+(-0.205435921511)*x[1]**o+(0.484947652759)*x[1]
-        arg[2,2,2,1]=(-0.650046253868)*x[0]**o+(-0.624878186105)*x[0]+(0.786519914406)*x[1]**o+(0.28027273095)*x[1]
-        arg[2,3,0,0]=(-0.0821718346579)*x[0]**o+(-0.687049917467)*x[0]+(0.380792333736)*x[1]**o+(0.151185837715)*x[1]
-        arg[2,3,0,1]=(0.61796113854)*x[0]**o+(0.844624413065)*x[0]+(-0.980619401098)*x[1]**o+(-0.854924862641)*x[1]
-        arg[2,3,1,0]=(0.812293906883)*x[0]**o+(-0.225593208768)*x[0]+(0.964175374163)*x[1]**o+(0.848850064926)*x[1]
-        arg[2,3,1,1]=(0.376453572937)*x[0]**o+(0.994818812059)*x[0]+(0.58872018303)*x[1]**o+(0.68332473361)*x[1]
-        arg[2,3,2,0]=(-0.00948421972234)*x[0]**o+(-0.680685462738)*x[0]+(-0.767076278167)*x[1]**o+(0.210165437284)*x[1]
-        arg[2,3,2,1]=(-0.455199698263)*x[0]**o+(-0.763430401419)*x[0]+(0.183773350212)*x[1]**o+(0.43105940923)*x[1]
-        arg[2,4,0,0]=(-0.673962025988)*x[0]**o+(-0.679073069725)*x[0]+(0.11018431715)*x[1]**o+(0.349020527482)*x[1]
-        arg[2,4,0,1]=(-0.876691282076)*x[0]**o+(0.920902226631)*x[0]+(-0.477417470246)*x[1]**o+(0.836417982216)*x[1]
-        arg[2,4,1,0]=(0.567966851024)*x[0]**o+(0.583241431716)*x[0]+(-0.271851271008)*x[1]**o+(0.678727902863)*x[1]
-        arg[2,4,1,1]=(0.707400094)*x[0]**o+(0.802820856444)*x[0]+(0.84518937616)*x[1]**o+(-0.0267193533403)*x[1]
-        arg[2,4,2,0]=(0.213268920036)*x[0]**o+(0.780721415328)*x[0]+(0.839292948154)*x[1]**o+(-0.0376334744443)*x[1]
-        arg[2,4,2,1]=(0.136255687031)*x[0]**o+(-0.582766278693)*x[0]+(0.257662521321)*x[1]**o+(0.808337521979)*x[1]
-        arg[3,0,0,0]=(-0.524068770822)*x[0]**o+(0.942236878842)*x[0]+(0.889496255793)*x[1]**o+(-0.904810742393)*x[1]
-        arg[3,0,0,1]=(0.780157465475)*x[0]**o+(-0.763811668832)*x[0]+(-0.517482070639)*x[1]**o+(0.662770780676)*x[1]
-        arg[3,0,1,0]=(-0.693227564812)*x[0]**o+(-0.763506211841)*x[0]+(-0.427709881126)*x[1]**o+(0.159109827204)*x[1]
-        arg[3,0,1,1]=(0.644975629084)*x[0]**o+(-0.928112761899)*x[0]+(-0.530772740083)*x[1]**o+(-0.723174790087)*x[1]
-        arg[3,0,2,0]=(-0.923467274097)*x[0]**o+(0.806128117288)*x[0]+(0.177779363207)*x[1]**o+(0.862243885542)*x[1]
-        arg[3,0,2,1]=(-0.0823252901358)*x[0]**o+(0.289022916284)*x[0]+(-0.518508771021)*x[1]**o+(0.174564769845)*x[1]
-        arg[3,1,0,0]=(0.608837578444)*x[0]**o+(0.898216758361)*x[0]+(-0.844730109761)*x[1]**o+(0.745974173207)*x[1]
-        arg[3,1,0,1]=(-0.11776411078)*x[0]**o+(0.186256502356)*x[0]+(0.565289400333)*x[1]**o+(-0.776173716206)*x[1]
-        arg[3,1,1,0]=(-0.170736580152)*x[0]**o+(0.829581661683)*x[0]+(0.310135833859)*x[1]**o+(-0.509629545687)*x[1]
-        arg[3,1,1,1]=(-0.225246122751)*x[0]**o+(0.586754377294)*x[0]+(-0.726064725635)*x[1]**o+(0.136952605704)*x[1]
-        arg[3,1,2,0]=(-0.287932115478)*x[0]**o+(0.858031396153)*x[0]+(-0.493441745353)*x[1]**o+(0.601827664994)*x[1]
-        arg[3,1,2,1]=(0.665503842862)*x[0]**o+(-0.515998970452)*x[0]+(-0.890055558624)*x[1]**o+(-0.0446371451457)*x[1]
-        arg[3,2,0,0]=(-0.33741557585)*x[0]**o+(-0.416183752333)*x[0]+(-0.92430073538)*x[1]**o+(-0.486265090904)*x[1]
-        arg[3,2,0,1]=(0.910860925994)*x[0]**o+(-0.896869755389)*x[0]+(0.0634658185324)*x[1]**o+(-0.383136455739)*x[1]
-        arg[3,2,1,0]=(0.386839297976)*x[0]**o+(-0.190659927071)*x[0]+(-0.304846978185)*x[1]**o+(-0.92705511899)*x[1]
-        arg[3,2,1,1]=(-0.0197812018683)*x[0]**o+(-0.479083095775)*x[0]+(0.502489976089)*x[1]**o+(-0.859440665475)*x[1]
-        arg[3,2,2,0]=(-0.507672045299)*x[0]**o+(0.498689676072)*x[0]+(-0.719735804645)*x[1]**o+(-0.522053306674)*x[1]
-        arg[3,2,2,1]=(0.46207629211)*x[0]**o+(-0.496697066039)*x[0]+(0.994069339904)*x[1]**o+(0.873222754449)*x[1]
-        arg[3,3,0,0]=(0.126410029692)*x[0]**o+(0.51067050196)*x[0]+(-0.978384824088)*x[1]**o+(-0.68606930503)*x[1]
-        arg[3,3,0,1]=(0.376888157008)*x[0]**o+(-0.14015764025)*x[0]+(0.523667700758)*x[1]**o+(0.0277726855258)*x[1]
-        arg[3,3,1,0]=(-0.105865233294)*x[0]**o+(-0.0515230741203)*x[0]+(0.203766525036)*x[1]**o+(-0.0431893014387)*x[1]
-        arg[3,3,1,1]=(-0.404351448486)*x[0]**o+(-0.639161429157)*x[0]+(-0.957341091708)*x[1]**o+(-0.103346466984)*x[1]
-        arg[3,3,2,0]=(-0.0523508780623)*x[0]**o+(-0.563589575544)*x[0]+(0.158487727325)*x[1]**o+(-0.519455492178)*x[1]
-        arg[3,3,2,1]=(-0.823286342218)*x[0]**o+(-0.493663499535)*x[0]+(-0.409825574064)*x[1]**o+(-0.0406101279806)*x[1]
-        arg[3,4,0,0]=(0.926212910387)*x[0]**o+(-0.0944507963)*x[0]+(0.640740499391)*x[1]**o+(-0.106969076047)*x[1]
-        arg[3,4,0,1]=(-0.912044993941)*x[0]**o+(-0.495323777918)*x[0]+(-0.595831845108)*x[1]**o+(-0.313723426318)*x[1]
-        arg[3,4,1,0]=(-0.0730898742548)*x[0]**o+(0.0524008484492)*x[0]+(-0.948232935497)*x[1]**o+(0.952670824572)*x[1]
-        arg[3,4,1,1]=(-0.81869438138)*x[0]**o+(-0.894654266952)*x[0]+(0.414078621872)*x[1]**o+(-0.876690817847)*x[1]
-        arg[3,4,2,0]=(0.00688155078441)*x[0]**o+(0.845964586551)*x[0]+(0.0183149371892)*x[1]**o+(-0.882931394537)*x[1]
-        arg[3,4,2,1]=(-0.734830097149)*x[0]**o+(-0.37824588859)*x[0]+(-0.815402620311)*x[1]**o+(-0.357905685517)*x[1]
-        ref[0,0,0,0]=(-0.282394950702)*x_ref[0]**o+(0.836580157584)*x_ref[0]+(0.337652262648)*x_ref[1]**o+(-0.442694263325)*x_ref[1]
-        ref[0,0,0,1]=(0.85150774028)*x_ref[0]**o+(0.998297296593)*x_ref[0]+(-0.710029954342)*x_ref[1]**o+(0.0816168287837)*x_ref[1]
-        ref[0,0,1,0]=(-0.636435102838)*x_ref[0]**o+(-0.613479863553)*x_ref[0]+(-0.861506513168)*x_ref[1]**o+(-0.242998961478)*x_ref[1]
-        ref[0,0,1,1]=(-0.00671863978521)*x_ref[0]**o+(0.909404084068)*x_ref[0]+(-0.734956067026)*x_ref[1]**o+(0.256530538264)*x_ref[1]
-        ref[0,0,2,0]=(-0.646631608999)*x_ref[0]**o+(-0.521130455843)*x_ref[0]+(-0.44328404557)*x_ref[1]**o+(-0.156860325817)*x_ref[1]
-        ref[0,0,2,1]=(-0.817550008949)*x_ref[0]**o+(0.702414497795)*x_ref[0]+(0.946449680763)*x_ref[1]**o+(-0.61576361925)*x_ref[1]
-        ref[0,1,0,0]=(-0.527206691595)*x_ref[0]**o+(-0.43469216984)*x_ref[0]+(-0.108455901154)*x_ref[1]**o+(0.435646962156)*x_ref[1]
-        ref[0,1,0,1]=(-0.148522219535)*x_ref[0]**o+(0.146912249755)*x_ref[0]+(-0.414934945665)*x_ref[1]**o+(-0.422754988714)*x_ref[1]
-        ref[0,1,1,0]=(0.177760972947)*x_ref[0]**o+(-0.938522530862)*x_ref[0]+(0.566229652264)*x_ref[1]**o+(0.255269743628)*x_ref[1]
-        ref[0,1,1,1]=(-0.317807933792)*x_ref[0]**o+(0.432181451246)*x_ref[0]+(-0.358821513362)*x_ref[1]**o+(-0.470517232585)*x_ref[1]
-        ref[0,1,2,0]=(0.486536430227)*x_ref[0]**o+(-0.533653809349)*x_ref[0]+(-0.126612514045)*x_ref[1]**o+(0.103088115487)*x_ref[1]
-        ref[0,1,2,1]=(-0.995976559589)*x_ref[0]**o+(0.965537167421)*x_ref[0]+(-0.351307699531)*x_ref[1]**o+(-0.684367434666)*x_ref[1]
-        ref[0,2,0,0]=(0.976008613768)*x_ref[0]**o+(-0.890573007002)*x_ref[0]+(-0.440709423944)*x_ref[1]**o+(0.315724459367)*x_ref[1]
-        ref[0,2,0,1]=(-0.595275811962)*x_ref[0]**o+(-0.599634144509)*x_ref[0]+(0.646466002346)*x_ref[1]**o+(-0.94529568651)*x_ref[1]
-        ref[0,2,1,0]=(0.977691521821)*x_ref[0]**o+(-0.0730997643682)*x_ref[0]+(-0.338897498737)*x_ref[1]**o+(0.246308678824)*x_ref[1]
-        ref[0,2,1,1]=(-0.111317410732)*x_ref[0]**o+(-0.574381793398)*x_ref[0]+(-0.0314431899843)*x_ref[1]**o+(0.393105047096)*x_ref[1]
-        ref[0,2,2,0]=(0.886320020757)*x_ref[0]**o+(-0.785042003544)*x_ref[0]+(0.82609269979)*x_ref[1]**o+(-0.677169484337)*x_ref[1]
-        ref[0,2,2,1]=(0.811027138079)*x_ref[0]**o+(-0.375108470948)*x_ref[0]+(0.781472464253)*x_ref[1]**o+(0.217640794143)*x_ref[1]
-        ref[0,3,0,0]=(0.264884117091)*x_ref[0]**o+(0.116591319557)*x_ref[0]+(0.282667679763)*x_ref[1]**o+(0.111123454337)*x_ref[1]
-        ref[0,3,0,1]=(0.0451626985922)*x_ref[0]**o+(-0.93771279728)*x_ref[0]+(0.129171764072)*x_ref[1]**o+(0.598367954162)*x_ref[1]
-        ref[0,3,1,0]=(0.905243511086)*x_ref[0]**o+(0.0837062573586)*x_ref[0]+(0.0657223248433)*x_ref[1]**o+(-0.746644690072)*x_ref[1]
-        ref[0,3,1,1]=(-0.0547856755485)*x_ref[0]**o+(-0.22157806755)*x_ref[0]+(0.124623625108)*x_ref[1]**o+(0.0436590157081)*x_ref[1]
-        ref[0,3,2,0]=(-0.558323744577)*x_ref[0]**o+(-0.646043519007)*x_ref[0]+(0.991885458004)*x_ref[1]**o+(-0.634140808163)*x_ref[1]
-        ref[0,3,2,1]=(-0.27247983028)*x_ref[0]**o+(0.803906404485)*x_ref[0]+(-0.816826609924)*x_ref[1]**o+(-0.969532783336)*x_ref[1]
-        ref[0,4,0,0]=(0.638733842891)*x_ref[0]**o+(-0.972793270208)*x_ref[0]+(0.714611008099)*x_ref[1]**o+(0.586988595847)*x_ref[1]
-        ref[0,4,0,1]=(0.63584760734)*x_ref[0]**o+(-0.653740236747)*x_ref[0]+(-0.596304731446)*x_ref[1]**o+(0.42519786429)*x_ref[1]
-        ref[0,4,1,0]=(0.0665562973529)*x_ref[0]**o+(0.362152092093)*x_ref[0]+(0.732530335739)*x_ref[1]**o+(0.618536326941)*x_ref[1]
-        ref[0,4,1,1]=(0.486060667608)*x_ref[0]**o+(0.59489013279)*x_ref[0]+(-0.547237017498)*x_ref[1]**o+(0.0371894705857)*x_ref[1]
-        ref[0,4,2,0]=(0.395505844397)*x_ref[0]**o+(-0.869090434535)*x_ref[0]+(-0.606640827437)*x_ref[1]**o+(0.269995459083)*x_ref[1]
-        ref[0,4,2,1]=(0.304671547176)*x_ref[0]**o+(-0.515772523849)*x_ref[0]+(0.546114300876)*x_ref[1]**o+(0.530247404341)*x_ref[1]
-        ref[1,0,0,0]=(0.408332677433)*x_ref[0]**o+(-0.0778807359918)*x_ref[0]+(-0.803337489297)*x_ref[1]**o+(-0.123835718422)*x_ref[1]
-        ref[1,0,0,1]=(-0.00441620254944)*x_ref[0]**o+(0.0321259598831)*x_ref[0]+(-0.998381508472)*x_ref[1]**o+(0.800767747511)*x_ref[1]
-        ref[1,0,1,0]=(-0.923683057418)*x_ref[0]**o+(0.579405114902)*x_ref[0]+(-0.939639823585)*x_ref[1]**o+(-0.138423358134)*x_ref[1]
-        ref[1,0,1,1]=(-0.558420234848)*x_ref[0]**o+(0.133316569813)*x_ref[0]+(-0.294134717329)*x_ref[1]**o+(-0.750897749044)*x_ref[1]
-        ref[1,0,2,0]=(0.478951298545)*x_ref[0]**o+(-0.807173978799)*x_ref[0]+(0.852438146763)*x_ref[1]**o+(-0.103814229563)*x_ref[1]
-        ref[1,0,2,1]=(-0.875250726603)*x_ref[0]**o+(-0.934803428491)*x_ref[0]+(0.143352873672)*x_ref[1]**o+(0.600934881206)*x_ref[1]
-        ref[1,1,0,0]=(-0.0539476321018)*x_ref[0]**o+(0.194177663417)*x_ref[0]+(-0.862877991009)*x_ref[1]**o+(-0.438337993664)*x_ref[1]
-        ref[1,1,0,1]=(-0.623379355474)*x_ref[0]**o+(-0.0746994739748)*x_ref[0]+(0.365005438956)*x_ref[1]**o+(-0.431737688205)*x_ref[1]
-        ref[1,1,1,0]=(0.0936054461735)*x_ref[0]**o+(-0.974594269446)*x_ref[0]+(-0.121917598428)*x_ref[1]**o+(-0.84429083727)*x_ref[1]
-        ref[1,1,1,1]=(0.967763348672)*x_ref[0]**o+(0.331698826475)*x_ref[0]+(0.66448515877)*x_ref[1]**o+(0.00214985930661)*x_ref[1]
-        ref[1,1,2,0]=(-0.312146580762)*x_ref[0]**o+(0.998152287706)*x_ref[0]+(-0.474242942777)*x_ref[1]**o+(0.637827347846)*x_ref[1]
-        ref[1,1,2,1]=(-0.556765443436)*x_ref[0]**o+(0.227327929774)*x_ref[0]+(0.739457845569)*x_ref[1]**o+(-0.615070017663)*x_ref[1]
-        ref[1,2,0,0]=(-0.23030660552)*x_ref[0]**o+(0.750479465953)*x_ref[0]+(0.278215408392)*x_ref[1]**o+(-0.640618698224)*x_ref[1]
-        ref[1,2,0,1]=(-0.0713217101129)*x_ref[0]**o+(0.500737477887)*x_ref[0]+(-0.972834770005)*x_ref[1]**o+(-0.420386056033)*x_ref[1]
-        ref[1,2,1,0]=(-0.497322989847)*x_ref[0]**o+(-0.528685124841)*x_ref[0]+(-0.934386348496)*x_ref[1]**o+(0.191930553839)*x_ref[1]
-        ref[1,2,1,1]=(0.124362419781)*x_ref[0]**o+(-0.0457849787456)*x_ref[0]+(-0.360596154712)*x_ref[1]**o+(0.799736253715)*x_ref[1]
-        ref[1,2,2,0]=(-0.346294878893)*x_ref[0]**o+(0.427772309361)*x_ref[0]+(-0.0642666791012)*x_ref[1]**o+(-0.214442238311)*x_ref[1]
-        ref[1,2,2,1]=(0.24434837411)*x_ref[0]**o+(-0.913373159786)*x_ref[0]+(0.158750862391)*x_ref[1]**o+(-0.544328807576)*x_ref[1]
-        ref[1,3,0,0]=(0.870847002687)*x_ref[0]**o+(-0.466884462301)*x_ref[0]+(-0.343358829445)*x_ref[1]**o+(-0.180956419766)*x_ref[1]
-        ref[1,3,0,1]=(-0.813518850863)*x_ref[0]**o+(0.960810467501)*x_ref[0]+(0.35091416904)*x_ref[1]**o+(0.84534544948)*x_ref[1]
-        ref[1,3,1,0]=(-0.284687751218)*x_ref[0]**o+(-0.274583519355)*x_ref[0]+(0.338892764102)*x_ref[1]**o+(-0.145142443753)*x_ref[1]
-        ref[1,3,1,1]=(0.921064262137)*x_ref[0]**o+(0.152552421678)*x_ref[0]+(0.827247693375)*x_ref[1]**o+(-0.569529848619)*x_ref[1]
-        ref[1,3,2,0]=(0.133567630356)*x_ref[0]**o+(-0.0429397358364)*x_ref[0]+(-0.175383170663)*x_ref[1]**o+(0.584407631334)*x_ref[1]
-        ref[1,3,2,1]=(0.203880167371)*x_ref[0]**o+(-0.422978073825)*x_ref[0]+(-0.210109267588)*x_ref[1]**o+(-0.902327373219)*x_ref[1]
-        ref[1,4,0,0]=(-0.566386864876)*x_ref[0]**o+(-0.139795085483)*x_ref[0]+(-0.00852913464238)*x_ref[1]**o+(0.569151381884)*x_ref[1]
-        ref[1,4,0,1]=(-0.937256625212)*x_ref[0]**o+(0.563438253128)*x_ref[0]+(-0.586182238715)*x_ref[1]**o+(-0.566169678723)*x_ref[1]
-        ref[1,4,1,0]=(-0.73296890712)*x_ref[0]**o+(0.359249594406)*x_ref[0]+(0.66050790616)*x_ref[1]**o+(-0.367919797426)*x_ref[1]
-        ref[1,4,1,1]=(-0.81165734248)*x_ref[0]**o+(0.460592817838)*x_ref[0]+(0.953573909492)*x_ref[1]**o+(0.329659021274)*x_ref[1]
-        ref[1,4,2,0]=(0.345994483595)*x_ref[0]**o+(-0.18547324343)*x_ref[0]+(0.669452926238)*x_ref[1]**o+(0.42513249272)*x_ref[1]
-        ref[1,4,2,1]=(0.250677642616)*x_ref[0]**o+(0.466118496803)*x_ref[0]+(-0.776608543595)*x_ref[1]**o+(0.449144243682)*x_ref[1]
-        ref[2,0,0,0]=(0.244172909021)*x_ref[0]**o+(0.0311068322898)*x_ref[0]+(-0.909348039508)*x_ref[1]**o+(0.376500719414)*x_ref[1]
-        ref[2,0,0,1]=(-0.033516640667)*x_ref[0]**o+(0.698424718328)*x_ref[0]+(-0.282814785542)*x_ref[1]**o+(0.61118022947)*x_ref[1]
-        ref[2,0,1,0]=(-0.946672649538)*x_ref[0]**o+(0.814325244591)*x_ref[0]+(-0.353215562825)*x_ref[1]**o+(-0.138150257429)*x_ref[1]
-        ref[2,0,1,1]=(-0.886509051692)*x_ref[0]**o+(-0.0468334385819)*x_ref[0]+(0.71984719189)*x_ref[1]**o+(-0.324744971493)*x_ref[1]
-        ref[2,0,2,0]=(-0.780921647053)*x_ref[0]**o+(-0.401418496932)*x_ref[0]+(0.647847274332)*x_ref[1]**o+(-0.831834322278)*x_ref[1]
-        ref[2,0,2,1]=(0.835155004862)*x_ref[0]**o+(0.684459986902)*x_ref[0]+(-0.301244240677)*x_ref[1]**o+(-0.161292780187)*x_ref[1]
-        ref[2,1,0,0]=(-0.652199398394)*x_ref[0]**o+(0.62480722178)*x_ref[0]+(-0.474535712914)*x_ref[1]**o+(0.926061797766)*x_ref[1]
-        ref[2,1,0,1]=(-0.813365478568)*x_ref[0]**o+(-0.38795792417)*x_ref[0]+(0.378161353697)*x_ref[1]**o+(0.70581806211)*x_ref[1]
-        ref[2,1,1,0]=(0.729265594934)*x_ref[0]**o+(-0.469397842359)*x_ref[0]+(0.642472199926)*x_ref[1]**o+(-0.779527283011)*x_ref[1]
-        ref[2,1,1,1]=(0.0517342917574)*x_ref[0]**o+(-0.414111007917)*x_ref[0]+(-0.89437375241)*x_ref[1]**o+(-0.830119585842)*x_ref[1]
-        ref[2,1,2,0]=(0.769898486257)*x_ref[0]**o+(0.791725624832)*x_ref[0]+(0.297519329396)*x_ref[1]**o+(-0.959462006611)*x_ref[1]
-        ref[2,1,2,1]=(0.817802144251)*x_ref[0]**o+(0.69851258911)*x_ref[0]+(-0.174401735228)*x_ref[1]**o+(0.13449696498)*x_ref[1]
-        ref[2,2,0,0]=(0.547972662256)*x_ref[0]**o+(-0.66491929979)*x_ref[0]+(0.330783041672)*x_ref[1]**o+(0.816196730606)*x_ref[1]
-        ref[2,2,0,1]=(0.245971097763)*x_ref[0]**o+(0.213087481481)*x_ref[0]+(-0.840766291392)*x_ref[1]**o+(0.388414557376)*x_ref[1]
-        ref[2,2,1,0]=(0.523151676444)*x_ref[0]**o+(0.854817486027)*x_ref[0]+(-0.53570188528)*x_ref[1]**o+(-0.68149362242)*x_ref[1]
-        ref[2,2,1,1]=(-0.984200247787)*x_ref[0]**o+(0.83324365092)*x_ref[0]+(-0.896184408816)*x_ref[1]**o+(0.102276243487)*x_ref[1]
-        ref[2,2,2,0]=(-0.216357164308)*x_ref[0]**o+(-0.597984882107)*x_ref[0]+(-0.205435921511)*x_ref[1]**o+(0.484947652759)*x_ref[1]
-        ref[2,2,2,1]=(-0.650046253868)*x_ref[0]**o+(-0.624878186105)*x_ref[0]+(0.786519914406)*x_ref[1]**o+(0.28027273095)*x_ref[1]
-        ref[2,3,0,0]=(-0.0821718346579)*x_ref[0]**o+(-0.687049917467)*x_ref[0]+(0.380792333736)*x_ref[1]**o+(0.151185837715)*x_ref[1]
-        ref[2,3,0,1]=(0.61796113854)*x_ref[0]**o+(0.844624413065)*x_ref[0]+(-0.980619401098)*x_ref[1]**o+(-0.854924862641)*x_ref[1]
-        ref[2,3,1,0]=(0.812293906883)*x_ref[0]**o+(-0.225593208768)*x_ref[0]+(0.964175374163)*x_ref[1]**o+(0.848850064926)*x_ref[1]
-        ref[2,3,1,1]=(0.376453572937)*x_ref[0]**o+(0.994818812059)*x_ref[0]+(0.58872018303)*x_ref[1]**o+(0.68332473361)*x_ref[1]
-        ref[2,3,2,0]=(-0.00948421972234)*x_ref[0]**o+(-0.680685462738)*x_ref[0]+(-0.767076278167)*x_ref[1]**o+(0.210165437284)*x_ref[1]
-        ref[2,3,2,1]=(-0.455199698263)*x_ref[0]**o+(-0.763430401419)*x_ref[0]+(0.183773350212)*x_ref[1]**o+(0.43105940923)*x_ref[1]
-        ref[2,4,0,0]=(-0.673962025988)*x_ref[0]**o+(-0.679073069725)*x_ref[0]+(0.11018431715)*x_ref[1]**o+(0.349020527482)*x_ref[1]
-        ref[2,4,0,1]=(-0.876691282076)*x_ref[0]**o+(0.920902226631)*x_ref[0]+(-0.477417470246)*x_ref[1]**o+(0.836417982216)*x_ref[1]
-        ref[2,4,1,0]=(0.567966851024)*x_ref[0]**o+(0.583241431716)*x_ref[0]+(-0.271851271008)*x_ref[1]**o+(0.678727902863)*x_ref[1]
-        ref[2,4,1,1]=(0.707400094)*x_ref[0]**o+(0.802820856444)*x_ref[0]+(0.84518937616)*x_ref[1]**o+(-0.0267193533403)*x_ref[1]
-        ref[2,4,2,0]=(0.213268920036)*x_ref[0]**o+(0.780721415328)*x_ref[0]+(0.839292948154)*x_ref[1]**o+(-0.0376334744443)*x_ref[1]
-        ref[2,4,2,1]=(0.136255687031)*x_ref[0]**o+(-0.582766278693)*x_ref[0]+(0.257662521321)*x_ref[1]**o+(0.808337521979)*x_ref[1]
-        ref[3,0,0,0]=(-0.524068770822)*x_ref[0]**o+(0.942236878842)*x_ref[0]+(0.889496255793)*x_ref[1]**o+(-0.904810742393)*x_ref[1]
-        ref[3,0,0,1]=(0.780157465475)*x_ref[0]**o+(-0.763811668832)*x_ref[0]+(-0.517482070639)*x_ref[1]**o+(0.662770780676)*x_ref[1]
-        ref[3,0,1,0]=(-0.693227564812)*x_ref[0]**o+(-0.763506211841)*x_ref[0]+(-0.427709881126)*x_ref[1]**o+(0.159109827204)*x_ref[1]
-        ref[3,0,1,1]=(0.644975629084)*x_ref[0]**o+(-0.928112761899)*x_ref[0]+(-0.530772740083)*x_ref[1]**o+(-0.723174790087)*x_ref[1]
-        ref[3,0,2,0]=(-0.923467274097)*x_ref[0]**o+(0.806128117288)*x_ref[0]+(0.177779363207)*x_ref[1]**o+(0.862243885542)*x_ref[1]
-        ref[3,0,2,1]=(-0.0823252901358)*x_ref[0]**o+(0.289022916284)*x_ref[0]+(-0.518508771021)*x_ref[1]**o+(0.174564769845)*x_ref[1]
-        ref[3,1,0,0]=(0.608837578444)*x_ref[0]**o+(0.898216758361)*x_ref[0]+(-0.844730109761)*x_ref[1]**o+(0.745974173207)*x_ref[1]
-        ref[3,1,0,1]=(-0.11776411078)*x_ref[0]**o+(0.186256502356)*x_ref[0]+(0.565289400333)*x_ref[1]**o+(-0.776173716206)*x_ref[1]
-        ref[3,1,1,0]=(-0.170736580152)*x_ref[0]**o+(0.829581661683)*x_ref[0]+(0.310135833859)*x_ref[1]**o+(-0.509629545687)*x_ref[1]
-        ref[3,1,1,1]=(-0.225246122751)*x_ref[0]**o+(0.586754377294)*x_ref[0]+(-0.726064725635)*x_ref[1]**o+(0.136952605704)*x_ref[1]
-        ref[3,1,2,0]=(-0.287932115478)*x_ref[0]**o+(0.858031396153)*x_ref[0]+(-0.493441745353)*x_ref[1]**o+(0.601827664994)*x_ref[1]
-        ref[3,1,2,1]=(0.665503842862)*x_ref[0]**o+(-0.515998970452)*x_ref[0]+(-0.890055558624)*x_ref[1]**o+(-0.0446371451457)*x_ref[1]
-        ref[3,2,0,0]=(-0.33741557585)*x_ref[0]**o+(-0.416183752333)*x_ref[0]+(-0.92430073538)*x_ref[1]**o+(-0.486265090904)*x_ref[1]
-        ref[3,2,0,1]=(0.910860925994)*x_ref[0]**o+(-0.896869755389)*x_ref[0]+(0.0634658185324)*x_ref[1]**o+(-0.383136455739)*x_ref[1]
-        ref[3,2,1,0]=(0.386839297976)*x_ref[0]**o+(-0.190659927071)*x_ref[0]+(-0.304846978185)*x_ref[1]**o+(-0.92705511899)*x_ref[1]
-        ref[3,2,1,1]=(-0.0197812018683)*x_ref[0]**o+(-0.479083095775)*x_ref[0]+(0.502489976089)*x_ref[1]**o+(-0.859440665475)*x_ref[1]
-        ref[3,2,2,0]=(-0.507672045299)*x_ref[0]**o+(0.498689676072)*x_ref[0]+(-0.719735804645)*x_ref[1]**o+(-0.522053306674)*x_ref[1]
-        ref[3,2,2,1]=(0.46207629211)*x_ref[0]**o+(-0.496697066039)*x_ref[0]+(0.994069339904)*x_ref[1]**o+(0.873222754449)*x_ref[1]
-        ref[3,3,0,0]=(0.126410029692)*x_ref[0]**o+(0.51067050196)*x_ref[0]+(-0.978384824088)*x_ref[1]**o+(-0.68606930503)*x_ref[1]
-        ref[3,3,0,1]=(0.376888157008)*x_ref[0]**o+(-0.14015764025)*x_ref[0]+(0.523667700758)*x_ref[1]**o+(0.0277726855258)*x_ref[1]
-        ref[3,3,1,0]=(-0.105865233294)*x_ref[0]**o+(-0.0515230741203)*x_ref[0]+(0.203766525036)*x_ref[1]**o+(-0.0431893014387)*x_ref[1]
-        ref[3,3,1,1]=(-0.404351448486)*x_ref[0]**o+(-0.639161429157)*x_ref[0]+(-0.957341091708)*x_ref[1]**o+(-0.103346466984)*x_ref[1]
-        ref[3,3,2,0]=(-0.0523508780623)*x_ref[0]**o+(-0.563589575544)*x_ref[0]+(0.158487727325)*x_ref[1]**o+(-0.519455492178)*x_ref[1]
-        ref[3,3,2,1]=(-0.823286342218)*x_ref[0]**o+(-0.493663499535)*x_ref[0]+(-0.409825574064)*x_ref[1]**o+(-0.0406101279806)*x_ref[1]
-        ref[3,4,0,0]=(0.926212910387)*x_ref[0]**o+(-0.0944507963)*x_ref[0]+(0.640740499391)*x_ref[1]**o+(-0.106969076047)*x_ref[1]
-        ref[3,4,0,1]=(-0.912044993941)*x_ref[0]**o+(-0.495323777918)*x_ref[0]+(-0.595831845108)*x_ref[1]**o+(-0.313723426318)*x_ref[1]
-        ref[3,4,1,0]=(-0.0730898742548)*x_ref[0]**o+(0.0524008484492)*x_ref[0]+(-0.948232935497)*x_ref[1]**o+(0.952670824572)*x_ref[1]
-        ref[3,4,1,1]=(-0.81869438138)*x_ref[0]**o+(-0.894654266952)*x_ref[0]+(0.414078621872)*x_ref[1]**o+(-0.876690817847)*x_ref[1]
-        ref[3,4,2,0]=(0.00688155078441)*x_ref[0]**o+(0.845964586551)*x_ref[0]+(0.0183149371892)*x_ref[1]**o+(-0.882931394537)*x_ref[1]
-        ref[3,4,2,1]=(-0.734830097149)*x_ref[0]**o+(-0.37824588859)*x_ref[0]+(-0.815402620311)*x_ref[1]**o+(-0.357905685517)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.110519315354)*x[0]**o+(0.904227374292)*x[0]+(0.459005710707)*x[1]**o+(-0.980231422256)*x[1]+(-0.819713355475)*x[2]**o+(-0.93459517989)*x[2]
-        arg[0,0,0,1]=(-0.326902946413)*x[0]**o+(0.489327766219)*x[0]+(-0.965308741061)*x[1]**o+(0.0351399111471)*x[1]+(0.257760096595)*x[2]**o+(0.125123023244)*x[2]
-        arg[0,0,1,0]=(-0.584360710004)*x[0]**o+(0.681892732544)*x[0]+(-0.118257741614)*x[1]**o+(0.839875738892)*x[1]+(0.107934154241)*x[2]**o+(0.279757054665)*x[2]
-        arg[0,0,1,1]=(0.90973214794)*x[0]**o+(-0.776804618826)*x[0]+(-0.910633853381)*x[1]**o+(-0.25678788529)*x[1]+(0.783709363646)*x[2]**o+(-0.922660855915)*x[2]
-        arg[0,0,2,0]=(-0.802273263394)*x[0]**o+(-0.917749665952)*x[0]+(0.796206817226)*x[1]**o+(0.917284637885)*x[1]+(0.219841508893)*x[2]**o+(0.0655848200083)*x[2]
-        arg[0,0,2,1]=(0.550596792343)*x[0]**o+(-0.760207057617)*x[0]+(0.0368469683098)*x[1]**o+(0.509347717331)*x[1]+(0.813780778487)*x[2]**o+(-0.432656298451)*x[2]
-        arg[0,1,0,0]=(-0.238502042941)*x[0]**o+(-0.966632221032)*x[0]+(-0.373745652933)*x[1]**o+(-0.436176336389)*x[1]+(0.124280197699)*x[2]**o+(0.552700562803)*x[2]
-        arg[0,1,0,1]=(-0.19848053276)*x[0]**o+(0.110167634957)*x[0]+(-0.748553857473)*x[1]**o+(0.355932508959)*x[1]+(-0.226987914753)*x[2]**o+(-0.68870238197)*x[2]
-        arg[0,1,1,0]=(0.365822518882)*x[0]**o+(0.327285102897)*x[0]+(0.549212504635)*x[1]**o+(0.918179946504)*x[1]+(0.20644004679)*x[2]**o+(0.821299409756)*x[2]
-        arg[0,1,1,1]=(-0.366167489101)*x[0]**o+(0.529933186572)*x[0]+(-0.604965310967)*x[1]**o+(-0.833093092352)*x[1]+(-0.73593913912)*x[2]**o+(0.872325614453)*x[2]
-        arg[0,1,2,0]=(0.289123646902)*x[0]**o+(0.705862153789)*x[0]+(-0.319756886822)*x[1]**o+(-0.453220232524)*x[1]+(-0.192336374167)*x[2]**o+(0.363575495006)*x[2]
-        arg[0,1,2,1]=(-0.213014833353)*x[0]**o+(-0.0706784230627)*x[0]+(-0.941272982229)*x[1]**o+(-0.96641361036)*x[1]+(0.289919014964)*x[2]**o+(0.57658772066)*x[2]
-        arg[0,2,0,0]=(-0.406683991704)*x[0]**o+(-0.0110042213592)*x[0]+(-0.273148083258)*x[1]**o+(0.054257030447)*x[1]+(0.387598147681)*x[2]**o+(0.480398109069)*x[2]
-        arg[0,2,0,1]=(0.318713057562)*x[0]**o+(-0.449467749585)*x[0]+(0.669991267829)*x[1]**o+(0.237986860249)*x[1]+(0.894370523471)*x[2]**o+(-0.397832436233)*x[2]
-        arg[0,2,1,0]=(-0.858603253642)*x[0]**o+(-0.713122015919)*x[0]+(0.870251906188)*x[1]**o+(-0.781601254578)*x[1]+(-0.504531525822)*x[2]**o+(-0.699819349556)*x[2]
-        arg[0,2,1,1]=(-0.825591116361)*x[0]**o+(-0.552452876394)*x[0]+(-0.262627261618)*x[1]**o+(-0.147127256184)*x[1]+(-0.171485665103)*x[2]**o+(0.823279741501)*x[2]
-        arg[0,2,2,0]=(-0.0416279689068)*x[0]**o+(-0.0903338000001)*x[0]+(0.911673780635)*x[1]**o+(0.86298673049)*x[1]+(-0.60251179847)*x[2]**o+(0.378303877746)*x[2]
-        arg[0,2,2,1]=(0.261384106387)*x[0]**o+(0.0326416199811)*x[0]+(-0.426740102269)*x[1]**o+(-0.445401626921)*x[1]+(-0.388668254526)*x[2]**o+(-0.977942913284)*x[2]
-        arg[0,3,0,0]=(-0.0195053813483)*x[0]**o+(-0.294061998664)*x[0]+(0.790461098426)*x[1]**o+(-0.506334268838)*x[1]+(0.394015541605)*x[2]**o+(-0.562248105432)*x[2]
-        arg[0,3,0,1]=(0.390726516735)*x[0]**o+(-0.757597437859)*x[0]+(0.861882149861)*x[1]**o+(0.621870451314)*x[1]+(0.900777666162)*x[2]**o+(0.271507131938)*x[2]
-        arg[0,3,1,0]=(-0.725635966475)*x[0]**o+(-0.695837548737)*x[0]+(-0.163078176328)*x[1]**o+(-0.0435808418729)*x[1]+(0.0890756544611)*x[2]**o+(-0.270422627949)*x[2]
-        arg[0,3,1,1]=(-0.175498720647)*x[0]**o+(-0.213605441632)*x[0]+(-0.358632620362)*x[1]**o+(-0.193273004152)*x[1]+(0.937704823805)*x[2]**o+(0.861707832291)*x[2]
-        arg[0,3,2,0]=(0.0976010265611)*x[0]**o+(0.995135925341)*x[0]+(0.755339287387)*x[1]**o+(-0.924722068193)*x[1]+(-0.480212181904)*x[2]**o+(-0.40237760439)*x[2]
-        arg[0,3,2,1]=(-0.679215392952)*x[0]**o+(-0.00796096253297)*x[0]+(-0.964972599421)*x[1]**o+(-0.410415435656)*x[1]+(-0.292638067785)*x[2]**o+(-0.950383976561)*x[2]
-        arg[0,4,0,0]=(0.245586594928)*x[0]**o+(-0.593420401896)*x[0]+(0.553450486534)*x[1]**o+(0.173814965689)*x[1]+(0.0719392610563)*x[2]**o+(0.676231437486)*x[2]
-        arg[0,4,0,1]=(0.154382756425)*x[0]**o+(-0.0655740293432)*x[0]+(0.924689745142)*x[1]**o+(-0.246876531175)*x[1]+(-0.241460713543)*x[2]**o+(-0.489840108568)*x[2]
-        arg[0,4,1,0]=(-0.482705840359)*x[0]**o+(-0.392960380114)*x[0]+(-0.503463823972)*x[1]**o+(0.317163204738)*x[1]+(0.775048877356)*x[2]**o+(0.599889732326)*x[2]
-        arg[0,4,1,1]=(-0.122555861716)*x[0]**o+(0.930175770449)*x[0]+(0.483503764941)*x[1]**o+(0.340001033217)*x[1]+(0.672924280979)*x[2]**o+(0.746489359683)*x[2]
-        arg[0,4,2,0]=(-0.339421141033)*x[0]**o+(-0.604966575169)*x[0]+(0.862413017648)*x[1]**o+(0.936752078454)*x[1]+(-0.0549628353285)*x[2]**o+(-0.0858885835314)*x[2]
-        arg[0,4,2,1]=(-0.581767357421)*x[0]**o+(-0.644286027548)*x[0]+(0.76948396865)*x[1]**o+(0.692265904744)*x[1]+(0.955871091531)*x[2]**o+(-0.378888503457)*x[2]
-        arg[1,0,0,0]=(-0.0407846595046)*x[0]**o+(-0.293709943251)*x[0]+(-0.310552931582)*x[1]**o+(-0.696244178466)*x[1]+(0.962985284252)*x[2]**o+(-0.0266457621404)*x[2]
-        arg[1,0,0,1]=(-0.480942811584)*x[0]**o+(-0.400158759679)*x[0]+(0.311171869807)*x[1]**o+(-0.79518809427)*x[1]+(-0.497004450478)*x[2]**o+(-0.639822005752)*x[2]
-        arg[1,0,1,0]=(0.158738648483)*x[0]**o+(0.274859816468)*x[0]+(-0.208677612654)*x[1]**o+(0.911107598366)*x[1]+(-0.400163007778)*x[2]**o+(0.276296890267)*x[2]
-        arg[1,0,1,1]=(0.613312276864)*x[0]**o+(-0.644237218776)*x[0]+(0.81927272895)*x[1]**o+(-0.12971860556)*x[1]+(0.214379406799)*x[2]**o+(0.856335675043)*x[2]
-        arg[1,0,2,0]=(-0.699925173766)*x[0]**o+(-0.560613547952)*x[0]+(-0.355325107637)*x[1]**o+(-0.598747822041)*x[1]+(0.243087037553)*x[2]**o+(-0.484176993015)*x[2]
-        arg[1,0,2,1]=(-0.218912300848)*x[0]**o+(-0.259483312969)*x[0]+(-0.863788186295)*x[1]**o+(0.924423774757)*x[1]+(-0.0823752192204)*x[2]**o+(-0.928377900602)*x[2]
-        arg[1,1,0,0]=(-0.368901144425)*x[0]**o+(0.544104655592)*x[0]+(0.321295151176)*x[1]**o+(0.395692754134)*x[1]+(-0.721319111754)*x[2]**o+(-0.698518442137)*x[2]
-        arg[1,1,0,1]=(-0.592867336047)*x[0]**o+(0.145120231038)*x[0]+(0.110390771366)*x[1]**o+(0.168333368086)*x[1]+(-0.577866419921)*x[2]**o+(0.705027708469)*x[2]
-        arg[1,1,1,0]=(-0.210603428235)*x[0]**o+(-0.250156447116)*x[0]+(-0.397803248976)*x[1]**o+(0.332163380867)*x[1]+(-0.250648216541)*x[2]**o+(-0.0693729055697)*x[2]
-        arg[1,1,1,1]=(0.324927558096)*x[0]**o+(-0.262726116223)*x[0]+(-0.555439758488)*x[1]**o+(-0.865019248609)*x[1]+(-0.0971907425857)*x[2]**o+(-0.742359236711)*x[2]
-        arg[1,1,2,0]=(0.161058869414)*x[0]**o+(0.349191500791)*x[0]+(0.468336473315)*x[1]**o+(-0.856364775995)*x[1]+(0.491736696689)*x[2]**o+(0.352984104173)*x[2]
-        arg[1,1,2,1]=(-0.243275976508)*x[0]**o+(-0.785605388878)*x[0]+(-0.282478919296)*x[1]**o+(-0.728851522341)*x[1]+(0.375134848237)*x[2]**o+(-0.486200561256)*x[2]
-        arg[1,2,0,0]=(-0.172241451405)*x[0]**o+(0.422361498196)*x[0]+(0.464862755164)*x[1]**o+(0.466661717105)*x[1]+(-0.886209677512)*x[2]**o+(-0.43529076789)*x[2]
-        arg[1,2,0,1]=(0.946582222405)*x[0]**o+(0.513640973894)*x[0]+(-0.923788000633)*x[1]**o+(-0.358163567195)*x[1]+(-0.709999132129)*x[2]**o+(-0.761163299694)*x[2]
-        arg[1,2,1,0]=(0.236339981889)*x[0]**o+(0.259874866134)*x[0]+(-0.32460762691)*x[1]**o+(-0.629786950313)*x[1]+(-0.679261685402)*x[2]**o+(0.593069192918)*x[2]
-        arg[1,2,1,1]=(0.11006800009)*x[0]**o+(0.970532991787)*x[0]+(-0.467608188361)*x[1]**o+(-0.959281984552)*x[1]+(0.610396622519)*x[2]**o+(0.282468600058)*x[2]
-        arg[1,2,2,0]=(-0.656419157742)*x[0]**o+(0.234027308171)*x[0]+(-0.67027206978)*x[1]**o+(-0.746034436817)*x[1]+(-0.771894073652)*x[2]**o+(0.949545830287)*x[2]
-        arg[1,2,2,1]=(0.615884236811)*x[0]**o+(-0.670156612555)*x[0]+(0.543165493345)*x[1]**o+(-0.618294277594)*x[1]+(-0.974114255061)*x[2]**o+(-0.762320542298)*x[2]
-        arg[1,3,0,0]=(0.096201957648)*x[0]**o+(0.440870816208)*x[0]+(0.124448859607)*x[1]**o+(0.507919407561)*x[1]+(-0.401666263687)*x[2]**o+(-0.437653713723)*x[2]
-        arg[1,3,0,1]=(0.165129229294)*x[0]**o+(-0.353217428955)*x[0]+(0.473666065504)*x[1]**o+(0.907667166988)*x[1]+(-0.864298533288)*x[2]**o+(0.641505117281)*x[2]
-        arg[1,3,1,0]=(0.381900624425)*x[0]**o+(0.427520178597)*x[0]+(-0.560279540293)*x[1]**o+(0.190814532271)*x[1]+(-0.187947688629)*x[2]**o+(-0.127694148593)*x[2]
-        arg[1,3,1,1]=(-0.903921363895)*x[0]**o+(-0.659942040828)*x[0]+(-0.549460213492)*x[1]**o+(0.869909651895)*x[1]+(-0.962273439484)*x[2]**o+(-0.046365857751)*x[2]
-        arg[1,3,2,0]=(-0.021688482187)*x[0]**o+(-0.209531000717)*x[0]+(0.668564395133)*x[1]**o+(-0.0347978700975)*x[1]+(0.947677147488)*x[2]**o+(-0.0152385052475)*x[2]
-        arg[1,3,2,1]=(0.880839485817)*x[0]**o+(-0.319275929312)*x[0]+(-0.940056657485)*x[1]**o+(0.570855397726)*x[1]+(0.279710812074)*x[2]**o+(0.496622215051)*x[2]
-        arg[1,4,0,0]=(-0.139033645615)*x[0]**o+(-0.271453722366)*x[0]+(-0.268516720244)*x[1]**o+(-0.0467555017438)*x[1]+(-0.41618262265)*x[2]**o+(0.315320363813)*x[2]
-        arg[1,4,0,1]=(0.296108607204)*x[0]**o+(-0.184582165661)*x[0]+(0.121416543744)*x[1]**o+(-0.922284926751)*x[1]+(-0.437600089668)*x[2]**o+(-0.608800626513)*x[2]
-        arg[1,4,1,0]=(0.8942028423)*x[0]**o+(0.673402831188)*x[0]+(-0.622529195562)*x[1]**o+(-0.266052338798)*x[1]+(-0.273167851702)*x[2]**o+(-0.312211982747)*x[2]
-        arg[1,4,1,1]=(-0.102315711178)*x[0]**o+(-0.885515719371)*x[0]+(-0.532910101204)*x[1]**o+(0.798525944348)*x[1]+(0.640586802303)*x[2]**o+(0.36308806536)*x[2]
-        arg[1,4,2,0]=(0.376793506541)*x[0]**o+(-0.667063564875)*x[0]+(0.609591985816)*x[1]**o+(0.28347745142)*x[1]+(-0.751832936302)*x[2]**o+(-0.683738856965)*x[2]
-        arg[1,4,2,1]=(-0.51412252819)*x[0]**o+(0.559560297206)*x[0]+(0.751134603429)*x[1]**o+(-0.0031812310797)*x[1]+(-0.525776122178)*x[2]**o+(0.338471942848)*x[2]
-        arg[2,0,0,0]=(0.937572244905)*x[0]**o+(-0.293020870379)*x[0]+(-0.918591520817)*x[1]**o+(0.622194477261)*x[1]+(0.31641482851)*x[2]**o+(0.276912266864)*x[2]
-        arg[2,0,0,1]=(0.853041599998)*x[0]**o+(-0.0220623724171)*x[0]+(0.89909044296)*x[1]**o+(-0.838782642732)*x[1]+(0.0133197592042)*x[2]**o+(-0.868977618993)*x[2]
-        arg[2,0,1,0]=(-0.325799042976)*x[0]**o+(0.746269971994)*x[0]+(0.882671061757)*x[1]**o+(-0.284133373252)*x[1]+(0.120086549521)*x[2]**o+(-0.397352610969)*x[2]
-        arg[2,0,1,1]=(0.282336934951)*x[0]**o+(-0.339893978547)*x[0]+(-0.0861660125386)*x[1]**o+(0.283063579798)*x[1]+(0.714762478569)*x[2]**o+(-0.497021718549)*x[2]
-        arg[2,0,2,0]=(0.891782779491)*x[0]**o+(-0.817647577644)*x[0]+(0.364088142085)*x[1]**o+(-0.950577637048)*x[1]+(0.4070663557)*x[2]**o+(0.270753179246)*x[2]
-        arg[2,0,2,1]=(0.316594913808)*x[0]**o+(0.310731486851)*x[0]+(0.250421828765)*x[1]**o+(0.772786141458)*x[1]+(0.64843040679)*x[2]**o+(-0.691903332511)*x[2]
-        arg[2,1,0,0]=(0.87180715028)*x[0]**o+(-0.953173230375)*x[0]+(-0.823516344548)*x[1]**o+(0.934653756548)*x[1]+(-0.537124962489)*x[2]**o+(-0.233365939659)*x[2]
-        arg[2,1,0,1]=(-0.407189744631)*x[0]**o+(-0.754425720288)*x[0]+(0.737526767897)*x[1]**o+(0.745393943502)*x[1]+(0.811744293685)*x[2]**o+(-0.459556659177)*x[2]
-        arg[2,1,1,0]=(-0.693529259877)*x[0]**o+(0.580197938048)*x[0]+(0.506055440405)*x[1]**o+(0.122531014759)*x[1]+(0.427736137775)*x[2]**o+(-0.83260140401)*x[2]
-        arg[2,1,1,1]=(0.542621975026)*x[0]**o+(-0.568425713106)*x[0]+(0.303002043446)*x[1]**o+(0.363286261651)*x[1]+(0.2729476289)*x[2]**o+(-0.0113629744659)*x[2]
-        arg[2,1,2,0]=(-0.266750235694)*x[0]**o+(0.10116400306)*x[0]+(0.315977962897)*x[1]**o+(-0.406236201454)*x[1]+(-0.586845072374)*x[2]**o+(0.513937047282)*x[2]
-        arg[2,1,2,1]=(-0.518780811975)*x[0]**o+(0.275053640829)*x[0]+(0.4234970646)*x[1]**o+(0.389585163376)*x[1]+(-0.609771068778)*x[2]**o+(-0.121467061755)*x[2]
-        arg[2,2,0,0]=(0.138823207466)*x[0]**o+(-0.779837455014)*x[0]+(0.70167049555)*x[1]**o+(0.766428813369)*x[1]+(0.114023530366)*x[2]**o+(0.650098536187)*x[2]
-        arg[2,2,0,1]=(0.974998667633)*x[0]**o+(0.958471050654)*x[0]+(0.193515162503)*x[1]**o+(-0.252148167253)*x[1]+(0.495475460125)*x[2]**o+(0.562693347983)*x[2]
-        arg[2,2,1,0]=(-0.552379548988)*x[0]**o+(-0.831399971618)*x[0]+(0.437581216647)*x[1]**o+(-0.775331267696)*x[1]+(0.729041628844)*x[2]**o+(0.633113359893)*x[2]
-        arg[2,2,1,1]=(0.379858437049)*x[0]**o+(0.923586504203)*x[0]+(0.707244783969)*x[1]**o+(-0.293157375059)*x[1]+(-0.368717941876)*x[2]**o+(-0.202610288616)*x[2]
-        arg[2,2,2,0]=(-0.804826108231)*x[0]**o+(-0.0208712096312)*x[0]+(0.0482547072498)*x[1]**o+(0.852366543609)*x[1]+(0.328962500136)*x[2]**o+(-0.132777835512)*x[2]
-        arg[2,2,2,1]=(0.91373752217)*x[0]**o+(-0.792112120729)*x[0]+(-0.0457564087072)*x[1]**o+(0.309694852949)*x[1]+(0.089219285337)*x[2]**o+(-0.516000514614)*x[2]
-        arg[2,3,0,0]=(0.343215129115)*x[0]**o+(0.40804099837)*x[0]+(-0.865942442914)*x[1]**o+(0.842241683043)*x[1]+(0.0727803297601)*x[2]**o+(-0.395225682949)*x[2]
-        arg[2,3,0,1]=(-0.965340522771)*x[0]**o+(-0.897056478677)*x[0]+(-0.305205944062)*x[1]**o+(0.393941789685)*x[1]+(-0.253328379131)*x[2]**o+(0.0951510469271)*x[2]
-        arg[2,3,1,0]=(0.536251514752)*x[0]**o+(0.0629776386779)*x[0]+(-0.706311222379)*x[1]**o+(-0.84362242029)*x[1]+(0.00110678760539)*x[2]**o+(-0.30286059941)*x[2]
-        arg[2,3,1,1]=(0.114584737295)*x[0]**o+(0.0708763738067)*x[0]+(-0.454760062397)*x[1]**o+(0.228742539922)*x[1]+(0.514960810352)*x[2]**o+(-0.815749211085)*x[2]
-        arg[2,3,2,0]=(0.246335688008)*x[0]**o+(-0.239199299885)*x[0]+(-0.447390151659)*x[1]**o+(0.918949356391)*x[1]+(-0.307864840175)*x[2]**o+(0.560139080481)*x[2]
-        arg[2,3,2,1]=(0.118766035723)*x[0]**o+(0.610711164899)*x[0]+(0.336628771776)*x[1]**o+(0.833699268751)*x[1]+(-0.424694647429)*x[2]**o+(-0.639929688104)*x[2]
-        arg[2,4,0,0]=(0.814543506987)*x[0]**o+(-0.797684321368)*x[0]+(0.337242635783)*x[1]**o+(0.278139837072)*x[1]+(0.633511526441)*x[2]**o+(0.372175615028)*x[2]
-        arg[2,4,0,1]=(-0.0590668694094)*x[0]**o+(0.256732067267)*x[0]+(0.519737187577)*x[1]**o+(-0.376391855948)*x[1]+(-0.810934658651)*x[2]**o+(0.826899476928)*x[2]
-        arg[2,4,1,0]=(-0.428976843661)*x[0]**o+(0.672667833313)*x[0]+(0.263194890946)*x[1]**o+(-0.894790773661)*x[1]+(-0.550298557295)*x[2]**o+(-0.00560384035502)*x[2]
-        arg[2,4,1,1]=(-0.818372430144)*x[0]**o+(-0.829920833073)*x[0]+(-0.359560636119)*x[1]**o+(-0.113484563205)*x[1]+(0.586796110365)*x[2]**o+(0.296820898426)*x[2]
-        arg[2,4,2,0]=(-0.691597969566)*x[0]**o+(0.715813153538)*x[0]+(0.954093612503)*x[1]**o+(0.88803420754)*x[1]+(0.697447667765)*x[2]**o+(0.793730496625)*x[2]
-        arg[2,4,2,1]=(0.351099833336)*x[0]**o+(-0.716419272807)*x[0]+(0.318726674998)*x[1]**o+(0.246151914414)*x[1]+(-0.945520673884)*x[2]**o+(-0.489026233954)*x[2]
-        arg[3,0,0,0]=(0.511598022804)*x[0]**o+(0.567617269582)*x[0]+(-0.526293319137)*x[1]**o+(0.333750098146)*x[1]+(-0.0869228849144)*x[2]**o+(-0.204072834867)*x[2]
-        arg[3,0,0,1]=(0.905384007172)*x[0]**o+(-0.661067390314)*x[0]+(-0.470790632295)*x[1]**o+(-0.149608017616)*x[1]+(0.427879278267)*x[2]**o+(0.987040179184)*x[2]
-        arg[3,0,1,0]=(-0.946562006809)*x[0]**o+(0.64141909633)*x[0]+(-0.762076826276)*x[1]**o+(-0.642912850794)*x[1]+(0.712567898559)*x[2]**o+(-0.292128944205)*x[2]
-        arg[3,0,1,1]=(-0.955087949361)*x[0]**o+(0.426588041133)*x[0]+(0.339313104127)*x[1]**o+(-0.375147344045)*x[1]+(0.967259014679)*x[2]**o+(0.504521081858)*x[2]
-        arg[3,0,2,0]=(0.141876598344)*x[0]**o+(-0.335579252825)*x[0]+(0.514552993602)*x[1]**o+(-0.531116948499)*x[1]+(-0.369319413141)*x[2]**o+(0.0374413262362)*x[2]
-        arg[3,0,2,1]=(0.678360463658)*x[0]**o+(-0.357900119646)*x[0]+(0.300750717059)*x[1]**o+(0.516196189448)*x[1]+(0.0535466018203)*x[2]**o+(-0.149961940786)*x[2]
-        arg[3,1,0,0]=(0.0975994351079)*x[0]**o+(0.634544068499)*x[0]+(-0.963217046352)*x[1]**o+(-0.804658091456)*x[1]+(-0.620132720823)*x[2]**o+(0.862250619369)*x[2]
-        arg[3,1,0,1]=(0.210306328879)*x[0]**o+(-0.457341187966)*x[0]+(0.957556084801)*x[1]**o+(0.704073170928)*x[1]+(0.423134492133)*x[2]**o+(-0.167268375412)*x[2]
-        arg[3,1,1,0]=(-0.909228817744)*x[0]**o+(0.110665018921)*x[0]+(0.36275630147)*x[1]**o+(0.346866824763)*x[1]+(-0.535600547489)*x[2]**o+(0.627638814375)*x[2]
-        arg[3,1,1,1]=(0.328780933823)*x[0]**o+(-0.249563994161)*x[0]+(-0.555789062892)*x[1]**o+(-0.917287525036)*x[1]+(0.386191175017)*x[2]**o+(0.123904319061)*x[2]
-        arg[3,1,2,0]=(-0.838409901623)*x[0]**o+(0.673479705393)*x[0]+(0.482921104917)*x[1]**o+(0.136411388588)*x[1]+(0.583674116225)*x[2]**o+(0.305100836877)*x[2]
-        arg[3,1,2,1]=(0.952961008312)*x[0]**o+(-0.0501981079532)*x[0]+(0.661434464642)*x[1]**o+(0.65030469399)*x[1]+(-0.157562001295)*x[2]**o+(-0.249551892917)*x[2]
-        arg[3,2,0,0]=(-0.0232804500286)*x[0]**o+(-0.559229392203)*x[0]+(0.127967930273)*x[1]**o+(-0.635827181645)*x[1]+(-0.0426703224383)*x[2]**o+(0.47720230258)*x[2]
-        arg[3,2,0,1]=(-0.421658996106)*x[0]**o+(-0.468260038077)*x[0]+(0.479083572554)*x[1]**o+(-0.214417881841)*x[1]+(0.372430534261)*x[2]**o+(0.133063789546)*x[2]
-        arg[3,2,1,0]=(0.905811586567)*x[0]**o+(0.245447340384)*x[0]+(-0.337650999146)*x[1]**o+(0.908188235976)*x[1]+(-0.804029751277)*x[2]**o+(0.0512676456643)*x[2]
-        arg[3,2,1,1]=(-0.891486839409)*x[0]**o+(0.20753794329)*x[0]+(0.879183464252)*x[1]**o+(0.902028906992)*x[1]+(0.416776813598)*x[2]**o+(0.491964374373)*x[2]
-        arg[3,2,2,0]=(0.653067027119)*x[0]**o+(0.765293890745)*x[0]+(-0.348902169508)*x[1]**o+(0.324429035849)*x[1]+(-0.363026365065)*x[2]**o+(0.0816186405511)*x[2]
-        arg[3,2,2,1]=(-0.0415375052325)*x[0]**o+(-0.480779075784)*x[0]+(-0.137223552938)*x[1]**o+(-0.915733625512)*x[1]+(0.750199445159)*x[2]**o+(-0.789818945171)*x[2]
-        arg[3,3,0,0]=(0.0744921239083)*x[0]**o+(0.0700589144159)*x[0]+(-0.327105425297)*x[1]**o+(0.469843257765)*x[1]+(-0.170191600844)*x[2]**o+(0.732071534155)*x[2]
-        arg[3,3,0,1]=(0.172643927441)*x[0]**o+(0.848924114383)*x[0]+(-0.79125762228)*x[1]**o+(-0.694725775976)*x[1]+(-0.309710503985)*x[2]**o+(-0.405310234927)*x[2]
-        arg[3,3,1,0]=(-0.465911787595)*x[0]**o+(-0.71080474709)*x[0]+(0.959925934203)*x[1]**o+(-0.111110644825)*x[1]+(-0.145349925218)*x[2]**o+(0.122955165811)*x[2]
-        arg[3,3,1,1]=(-0.769111863754)*x[0]**o+(0.348036938532)*x[0]+(0.485890856474)*x[1]**o+(0.382595218985)*x[1]+(-0.897488692981)*x[2]**o+(0.830822333819)*x[2]
-        arg[3,3,2,0]=(0.341890793681)*x[0]**o+(-0.667145936571)*x[0]+(-0.145094108268)*x[1]**o+(0.771433911212)*x[1]+(-0.299752164325)*x[2]**o+(-0.357856549677)*x[2]
-        arg[3,3,2,1]=(0.26381838796)*x[0]**o+(-0.44474724998)*x[0]+(0.310283988195)*x[1]**o+(0.698675181314)*x[1]+(0.437624133238)*x[2]**o+(0.394916054445)*x[2]
-        arg[3,4,0,0]=(-0.576499406674)*x[0]**o+(0.770936634959)*x[0]+(0.707441735783)*x[1]**o+(-0.794953257043)*x[1]+(-0.535342943209)*x[2]**o+(-0.509446811787)*x[2]
-        arg[3,4,0,1]=(0.161115012113)*x[0]**o+(0.11079092252)*x[0]+(0.0633804181164)*x[1]**o+(-0.406049293019)*x[1]+(-0.824283994336)*x[2]**o+(-0.481107560499)*x[2]
-        arg[3,4,1,0]=(-0.411133810295)*x[0]**o+(0.988486625099)*x[0]+(-0.36050191367)*x[1]**o+(0.469479821965)*x[1]+(-0.431175357325)*x[2]**o+(-0.966295015263)*x[2]
-        arg[3,4,1,1]=(0.233731410367)*x[0]**o+(-0.821900740766)*x[0]+(-0.823123461385)*x[1]**o+(-0.380537914421)*x[1]+(-0.896146300355)*x[2]**o+(-0.775172990257)*x[2]
-        arg[3,4,2,0]=(-0.96323363586)*x[0]**o+(0.0935412405245)*x[0]+(0.929333026259)*x[1]**o+(-0.322236627348)*x[1]+(-0.390898135964)*x[2]**o+(-0.766178290162)*x[2]
-        arg[3,4,2,1]=(-0.773670533268)*x[0]**o+(-0.156975157098)*x[0]+(-0.91512996795)*x[1]**o+(0.0247803682126)*x[1]+(0.995159733782)*x[2]**o+(-0.669224144225)*x[2]
-        ref[0,0,0,0]=(-0.110519315354)*x_ref[0]**o+(0.904227374292)*x_ref[0]+(0.459005710707)*x_ref[1]**o+(-0.980231422256)*x_ref[1]+(-0.819713355475)*x_ref[2]**o+(-0.93459517989)*x_ref[2]
-        ref[0,0,0,1]=(-0.326902946413)*x_ref[0]**o+(0.489327766219)*x_ref[0]+(-0.965308741061)*x_ref[1]**o+(0.0351399111471)*x_ref[1]+(0.257760096595)*x_ref[2]**o+(0.125123023244)*x_ref[2]
-        ref[0,0,1,0]=(-0.584360710004)*x_ref[0]**o+(0.681892732544)*x_ref[0]+(-0.118257741614)*x_ref[1]**o+(0.839875738892)*x_ref[1]+(0.107934154241)*x_ref[2]**o+(0.279757054665)*x_ref[2]
-        ref[0,0,1,1]=(0.90973214794)*x_ref[0]**o+(-0.776804618826)*x_ref[0]+(-0.910633853381)*x_ref[1]**o+(-0.25678788529)*x_ref[1]+(0.783709363646)*x_ref[2]**o+(-0.922660855915)*x_ref[2]
-        ref[0,0,2,0]=(-0.802273263394)*x_ref[0]**o+(-0.917749665952)*x_ref[0]+(0.796206817226)*x_ref[1]**o+(0.917284637885)*x_ref[1]+(0.219841508893)*x_ref[2]**o+(0.0655848200083)*x_ref[2]
-        ref[0,0,2,1]=(0.550596792343)*x_ref[0]**o+(-0.760207057617)*x_ref[0]+(0.0368469683098)*x_ref[1]**o+(0.509347717331)*x_ref[1]+(0.813780778487)*x_ref[2]**o+(-0.432656298451)*x_ref[2]
-        ref[0,1,0,0]=(-0.238502042941)*x_ref[0]**o+(-0.966632221032)*x_ref[0]+(-0.373745652933)*x_ref[1]**o+(-0.436176336389)*x_ref[1]+(0.124280197699)*x_ref[2]**o+(0.552700562803)*x_ref[2]
-        ref[0,1,0,1]=(-0.19848053276)*x_ref[0]**o+(0.110167634957)*x_ref[0]+(-0.748553857473)*x_ref[1]**o+(0.355932508959)*x_ref[1]+(-0.226987914753)*x_ref[2]**o+(-0.68870238197)*x_ref[2]
-        ref[0,1,1,0]=(0.365822518882)*x_ref[0]**o+(0.327285102897)*x_ref[0]+(0.549212504635)*x_ref[1]**o+(0.918179946504)*x_ref[1]+(0.20644004679)*x_ref[2]**o+(0.821299409756)*x_ref[2]
-        ref[0,1,1,1]=(-0.366167489101)*x_ref[0]**o+(0.529933186572)*x_ref[0]+(-0.604965310967)*x_ref[1]**o+(-0.833093092352)*x_ref[1]+(-0.73593913912)*x_ref[2]**o+(0.872325614453)*x_ref[2]
-        ref[0,1,2,0]=(0.289123646902)*x_ref[0]**o+(0.705862153789)*x_ref[0]+(-0.319756886822)*x_ref[1]**o+(-0.453220232524)*x_ref[1]+(-0.192336374167)*x_ref[2]**o+(0.363575495006)*x_ref[2]
-        ref[0,1,2,1]=(-0.213014833353)*x_ref[0]**o+(-0.0706784230627)*x_ref[0]+(-0.941272982229)*x_ref[1]**o+(-0.96641361036)*x_ref[1]+(0.289919014964)*x_ref[2]**o+(0.57658772066)*x_ref[2]
-        ref[0,2,0,0]=(-0.406683991704)*x_ref[0]**o+(-0.0110042213592)*x_ref[0]+(-0.273148083258)*x_ref[1]**o+(0.054257030447)*x_ref[1]+(0.387598147681)*x_ref[2]**o+(0.480398109069)*x_ref[2]
-        ref[0,2,0,1]=(0.318713057562)*x_ref[0]**o+(-0.449467749585)*x_ref[0]+(0.669991267829)*x_ref[1]**o+(0.237986860249)*x_ref[1]+(0.894370523471)*x_ref[2]**o+(-0.397832436233)*x_ref[2]
-        ref[0,2,1,0]=(-0.858603253642)*x_ref[0]**o+(-0.713122015919)*x_ref[0]+(0.870251906188)*x_ref[1]**o+(-0.781601254578)*x_ref[1]+(-0.504531525822)*x_ref[2]**o+(-0.699819349556)*x_ref[2]
-        ref[0,2,1,1]=(-0.825591116361)*x_ref[0]**o+(-0.552452876394)*x_ref[0]+(-0.262627261618)*x_ref[1]**o+(-0.147127256184)*x_ref[1]+(-0.171485665103)*x_ref[2]**o+(0.823279741501)*x_ref[2]
-        ref[0,2,2,0]=(-0.0416279689068)*x_ref[0]**o+(-0.0903338000001)*x_ref[0]+(0.911673780635)*x_ref[1]**o+(0.86298673049)*x_ref[1]+(-0.60251179847)*x_ref[2]**o+(0.378303877746)*x_ref[2]
-        ref[0,2,2,1]=(0.261384106387)*x_ref[0]**o+(0.0326416199811)*x_ref[0]+(-0.426740102269)*x_ref[1]**o+(-0.445401626921)*x_ref[1]+(-0.388668254526)*x_ref[2]**o+(-0.977942913284)*x_ref[2]
-        ref[0,3,0,0]=(-0.0195053813483)*x_ref[0]**o+(-0.294061998664)*x_ref[0]+(0.790461098426)*x_ref[1]**o+(-0.506334268838)*x_ref[1]+(0.394015541605)*x_ref[2]**o+(-0.562248105432)*x_ref[2]
-        ref[0,3,0,1]=(0.390726516735)*x_ref[0]**o+(-0.757597437859)*x_ref[0]+(0.861882149861)*x_ref[1]**o+(0.621870451314)*x_ref[1]+(0.900777666162)*x_ref[2]**o+(0.271507131938)*x_ref[2]
-        ref[0,3,1,0]=(-0.725635966475)*x_ref[0]**o+(-0.695837548737)*x_ref[0]+(-0.163078176328)*x_ref[1]**o+(-0.0435808418729)*x_ref[1]+(0.0890756544611)*x_ref[2]**o+(-0.270422627949)*x_ref[2]
-        ref[0,3,1,1]=(-0.175498720647)*x_ref[0]**o+(-0.213605441632)*x_ref[0]+(-0.358632620362)*x_ref[1]**o+(-0.193273004152)*x_ref[1]+(0.937704823805)*x_ref[2]**o+(0.861707832291)*x_ref[2]
-        ref[0,3,2,0]=(0.0976010265611)*x_ref[0]**o+(0.995135925341)*x_ref[0]+(0.755339287387)*x_ref[1]**o+(-0.924722068193)*x_ref[1]+(-0.480212181904)*x_ref[2]**o+(-0.40237760439)*x_ref[2]
-        ref[0,3,2,1]=(-0.679215392952)*x_ref[0]**o+(-0.00796096253297)*x_ref[0]+(-0.964972599421)*x_ref[1]**o+(-0.410415435656)*x_ref[1]+(-0.292638067785)*x_ref[2]**o+(-0.950383976561)*x_ref[2]
-        ref[0,4,0,0]=(0.245586594928)*x_ref[0]**o+(-0.593420401896)*x_ref[0]+(0.553450486534)*x_ref[1]**o+(0.173814965689)*x_ref[1]+(0.0719392610563)*x_ref[2]**o+(0.676231437486)*x_ref[2]
-        ref[0,4,0,1]=(0.154382756425)*x_ref[0]**o+(-0.0655740293432)*x_ref[0]+(0.924689745142)*x_ref[1]**o+(-0.246876531175)*x_ref[1]+(-0.241460713543)*x_ref[2]**o+(-0.489840108568)*x_ref[2]
-        ref[0,4,1,0]=(-0.482705840359)*x_ref[0]**o+(-0.392960380114)*x_ref[0]+(-0.503463823972)*x_ref[1]**o+(0.317163204738)*x_ref[1]+(0.775048877356)*x_ref[2]**o+(0.599889732326)*x_ref[2]
-        ref[0,4,1,1]=(-0.122555861716)*x_ref[0]**o+(0.930175770449)*x_ref[0]+(0.483503764941)*x_ref[1]**o+(0.340001033217)*x_ref[1]+(0.672924280979)*x_ref[2]**o+(0.746489359683)*x_ref[2]
-        ref[0,4,2,0]=(-0.339421141033)*x_ref[0]**o+(-0.604966575169)*x_ref[0]+(0.862413017648)*x_ref[1]**o+(0.936752078454)*x_ref[1]+(-0.0549628353285)*x_ref[2]**o+(-0.0858885835314)*x_ref[2]
-        ref[0,4,2,1]=(-0.581767357421)*x_ref[0]**o+(-0.644286027548)*x_ref[0]+(0.76948396865)*x_ref[1]**o+(0.692265904744)*x_ref[1]+(0.955871091531)*x_ref[2]**o+(-0.378888503457)*x_ref[2]
-        ref[1,0,0,0]=(-0.0407846595046)*x_ref[0]**o+(-0.293709943251)*x_ref[0]+(-0.310552931582)*x_ref[1]**o+(-0.696244178466)*x_ref[1]+(0.962985284252)*x_ref[2]**o+(-0.0266457621404)*x_ref[2]
-        ref[1,0,0,1]=(-0.480942811584)*x_ref[0]**o+(-0.400158759679)*x_ref[0]+(0.311171869807)*x_ref[1]**o+(-0.79518809427)*x_ref[1]+(-0.497004450478)*x_ref[2]**o+(-0.639822005752)*x_ref[2]
-        ref[1,0,1,0]=(0.158738648483)*x_ref[0]**o+(0.274859816468)*x_ref[0]+(-0.208677612654)*x_ref[1]**o+(0.911107598366)*x_ref[1]+(-0.400163007778)*x_ref[2]**o+(0.276296890267)*x_ref[2]
-        ref[1,0,1,1]=(0.613312276864)*x_ref[0]**o+(-0.644237218776)*x_ref[0]+(0.81927272895)*x_ref[1]**o+(-0.12971860556)*x_ref[1]+(0.214379406799)*x_ref[2]**o+(0.856335675043)*x_ref[2]
-        ref[1,0,2,0]=(-0.699925173766)*x_ref[0]**o+(-0.560613547952)*x_ref[0]+(-0.355325107637)*x_ref[1]**o+(-0.598747822041)*x_ref[1]+(0.243087037553)*x_ref[2]**o+(-0.484176993015)*x_ref[2]
-        ref[1,0,2,1]=(-0.218912300848)*x_ref[0]**o+(-0.259483312969)*x_ref[0]+(-0.863788186295)*x_ref[1]**o+(0.924423774757)*x_ref[1]+(-0.0823752192204)*x_ref[2]**o+(-0.928377900602)*x_ref[2]
-        ref[1,1,0,0]=(-0.368901144425)*x_ref[0]**o+(0.544104655592)*x_ref[0]+(0.321295151176)*x_ref[1]**o+(0.395692754134)*x_ref[1]+(-0.721319111754)*x_ref[2]**o+(-0.698518442137)*x_ref[2]
-        ref[1,1,0,1]=(-0.592867336047)*x_ref[0]**o+(0.145120231038)*x_ref[0]+(0.110390771366)*x_ref[1]**o+(0.168333368086)*x_ref[1]+(-0.577866419921)*x_ref[2]**o+(0.705027708469)*x_ref[2]
-        ref[1,1,1,0]=(-0.210603428235)*x_ref[0]**o+(-0.250156447116)*x_ref[0]+(-0.397803248976)*x_ref[1]**o+(0.332163380867)*x_ref[1]+(-0.250648216541)*x_ref[2]**o+(-0.0693729055697)*x_ref[2]
-        ref[1,1,1,1]=(0.324927558096)*x_ref[0]**o+(-0.262726116223)*x_ref[0]+(-0.555439758488)*x_ref[1]**o+(-0.865019248609)*x_ref[1]+(-0.0971907425857)*x_ref[2]**o+(-0.742359236711)*x_ref[2]
-        ref[1,1,2,0]=(0.161058869414)*x_ref[0]**o+(0.349191500791)*x_ref[0]+(0.468336473315)*x_ref[1]**o+(-0.856364775995)*x_ref[1]+(0.491736696689)*x_ref[2]**o+(0.352984104173)*x_ref[2]
-        ref[1,1,2,1]=(-0.243275976508)*x_ref[0]**o+(-0.785605388878)*x_ref[0]+(-0.282478919296)*x_ref[1]**o+(-0.728851522341)*x_ref[1]+(0.375134848237)*x_ref[2]**o+(-0.486200561256)*x_ref[2]
-        ref[1,2,0,0]=(-0.172241451405)*x_ref[0]**o+(0.422361498196)*x_ref[0]+(0.464862755164)*x_ref[1]**o+(0.466661717105)*x_ref[1]+(-0.886209677512)*x_ref[2]**o+(-0.43529076789)*x_ref[2]
-        ref[1,2,0,1]=(0.946582222405)*x_ref[0]**o+(0.513640973894)*x_ref[0]+(-0.923788000633)*x_ref[1]**o+(-0.358163567195)*x_ref[1]+(-0.709999132129)*x_ref[2]**o+(-0.761163299694)*x_ref[2]
-        ref[1,2,1,0]=(0.236339981889)*x_ref[0]**o+(0.259874866134)*x_ref[0]+(-0.32460762691)*x_ref[1]**o+(-0.629786950313)*x_ref[1]+(-0.679261685402)*x_ref[2]**o+(0.593069192918)*x_ref[2]
-        ref[1,2,1,1]=(0.11006800009)*x_ref[0]**o+(0.970532991787)*x_ref[0]+(-0.467608188361)*x_ref[1]**o+(-0.959281984552)*x_ref[1]+(0.610396622519)*x_ref[2]**o+(0.282468600058)*x_ref[2]
-        ref[1,2,2,0]=(-0.656419157742)*x_ref[0]**o+(0.234027308171)*x_ref[0]+(-0.67027206978)*x_ref[1]**o+(-0.746034436817)*x_ref[1]+(-0.771894073652)*x_ref[2]**o+(0.949545830287)*x_ref[2]
-        ref[1,2,2,1]=(0.615884236811)*x_ref[0]**o+(-0.670156612555)*x_ref[0]+(0.543165493345)*x_ref[1]**o+(-0.618294277594)*x_ref[1]+(-0.974114255061)*x_ref[2]**o+(-0.762320542298)*x_ref[2]
-        ref[1,3,0,0]=(0.096201957648)*x_ref[0]**o+(0.440870816208)*x_ref[0]+(0.124448859607)*x_ref[1]**o+(0.507919407561)*x_ref[1]+(-0.401666263687)*x_ref[2]**o+(-0.437653713723)*x_ref[2]
-        ref[1,3,0,1]=(0.165129229294)*x_ref[0]**o+(-0.353217428955)*x_ref[0]+(0.473666065504)*x_ref[1]**o+(0.907667166988)*x_ref[1]+(-0.864298533288)*x_ref[2]**o+(0.641505117281)*x_ref[2]
-        ref[1,3,1,0]=(0.381900624425)*x_ref[0]**o+(0.427520178597)*x_ref[0]+(-0.560279540293)*x_ref[1]**o+(0.190814532271)*x_ref[1]+(-0.187947688629)*x_ref[2]**o+(-0.127694148593)*x_ref[2]
-        ref[1,3,1,1]=(-0.903921363895)*x_ref[0]**o+(-0.659942040828)*x_ref[0]+(-0.549460213492)*x_ref[1]**o+(0.869909651895)*x_ref[1]+(-0.962273439484)*x_ref[2]**o+(-0.046365857751)*x_ref[2]
-        ref[1,3,2,0]=(-0.021688482187)*x_ref[0]**o+(-0.209531000717)*x_ref[0]+(0.668564395133)*x_ref[1]**o+(-0.0347978700975)*x_ref[1]+(0.947677147488)*x_ref[2]**o+(-0.0152385052475)*x_ref[2]
-        ref[1,3,2,1]=(0.880839485817)*x_ref[0]**o+(-0.319275929312)*x_ref[0]+(-0.940056657485)*x_ref[1]**o+(0.570855397726)*x_ref[1]+(0.279710812074)*x_ref[2]**o+(0.496622215051)*x_ref[2]
-        ref[1,4,0,0]=(-0.139033645615)*x_ref[0]**o+(-0.271453722366)*x_ref[0]+(-0.268516720244)*x_ref[1]**o+(-0.0467555017438)*x_ref[1]+(-0.41618262265)*x_ref[2]**o+(0.315320363813)*x_ref[2]
-        ref[1,4,0,1]=(0.296108607204)*x_ref[0]**o+(-0.184582165661)*x_ref[0]+(0.121416543744)*x_ref[1]**o+(-0.922284926751)*x_ref[1]+(-0.437600089668)*x_ref[2]**o+(-0.608800626513)*x_ref[2]
-        ref[1,4,1,0]=(0.8942028423)*x_ref[0]**o+(0.673402831188)*x_ref[0]+(-0.622529195562)*x_ref[1]**o+(-0.266052338798)*x_ref[1]+(-0.273167851702)*x_ref[2]**o+(-0.312211982747)*x_ref[2]
-        ref[1,4,1,1]=(-0.102315711178)*x_ref[0]**o+(-0.885515719371)*x_ref[0]+(-0.532910101204)*x_ref[1]**o+(0.798525944348)*x_ref[1]+(0.640586802303)*x_ref[2]**o+(0.36308806536)*x_ref[2]
-        ref[1,4,2,0]=(0.376793506541)*x_ref[0]**o+(-0.667063564875)*x_ref[0]+(0.609591985816)*x_ref[1]**o+(0.28347745142)*x_ref[1]+(-0.751832936302)*x_ref[2]**o+(-0.683738856965)*x_ref[2]
-        ref[1,4,2,1]=(-0.51412252819)*x_ref[0]**o+(0.559560297206)*x_ref[0]+(0.751134603429)*x_ref[1]**o+(-0.0031812310797)*x_ref[1]+(-0.525776122178)*x_ref[2]**o+(0.338471942848)*x_ref[2]
-        ref[2,0,0,0]=(0.937572244905)*x_ref[0]**o+(-0.293020870379)*x_ref[0]+(-0.918591520817)*x_ref[1]**o+(0.622194477261)*x_ref[1]+(0.31641482851)*x_ref[2]**o+(0.276912266864)*x_ref[2]
-        ref[2,0,0,1]=(0.853041599998)*x_ref[0]**o+(-0.0220623724171)*x_ref[0]+(0.89909044296)*x_ref[1]**o+(-0.838782642732)*x_ref[1]+(0.0133197592042)*x_ref[2]**o+(-0.868977618993)*x_ref[2]
-        ref[2,0,1,0]=(-0.325799042976)*x_ref[0]**o+(0.746269971994)*x_ref[0]+(0.882671061757)*x_ref[1]**o+(-0.284133373252)*x_ref[1]+(0.120086549521)*x_ref[2]**o+(-0.397352610969)*x_ref[2]
-        ref[2,0,1,1]=(0.282336934951)*x_ref[0]**o+(-0.339893978547)*x_ref[0]+(-0.0861660125386)*x_ref[1]**o+(0.283063579798)*x_ref[1]+(0.714762478569)*x_ref[2]**o+(-0.497021718549)*x_ref[2]
-        ref[2,0,2,0]=(0.891782779491)*x_ref[0]**o+(-0.817647577644)*x_ref[0]+(0.364088142085)*x_ref[1]**o+(-0.950577637048)*x_ref[1]+(0.4070663557)*x_ref[2]**o+(0.270753179246)*x_ref[2]
-        ref[2,0,2,1]=(0.316594913808)*x_ref[0]**o+(0.310731486851)*x_ref[0]+(0.250421828765)*x_ref[1]**o+(0.772786141458)*x_ref[1]+(0.64843040679)*x_ref[2]**o+(-0.691903332511)*x_ref[2]
-        ref[2,1,0,0]=(0.87180715028)*x_ref[0]**o+(-0.953173230375)*x_ref[0]+(-0.823516344548)*x_ref[1]**o+(0.934653756548)*x_ref[1]+(-0.537124962489)*x_ref[2]**o+(-0.233365939659)*x_ref[2]
-        ref[2,1,0,1]=(-0.407189744631)*x_ref[0]**o+(-0.754425720288)*x_ref[0]+(0.737526767897)*x_ref[1]**o+(0.745393943502)*x_ref[1]+(0.811744293685)*x_ref[2]**o+(-0.459556659177)*x_ref[2]
-        ref[2,1,1,0]=(-0.693529259877)*x_ref[0]**o+(0.580197938048)*x_ref[0]+(0.506055440405)*x_ref[1]**o+(0.122531014759)*x_ref[1]+(0.427736137775)*x_ref[2]**o+(-0.83260140401)*x_ref[2]
-        ref[2,1,1,1]=(0.542621975026)*x_ref[0]**o+(-0.568425713106)*x_ref[0]+(0.303002043446)*x_ref[1]**o+(0.363286261651)*x_ref[1]+(0.2729476289)*x_ref[2]**o+(-0.0113629744659)*x_ref[2]
-        ref[2,1,2,0]=(-0.266750235694)*x_ref[0]**o+(0.10116400306)*x_ref[0]+(0.315977962897)*x_ref[1]**o+(-0.406236201454)*x_ref[1]+(-0.586845072374)*x_ref[2]**o+(0.513937047282)*x_ref[2]
-        ref[2,1,2,1]=(-0.518780811975)*x_ref[0]**o+(0.275053640829)*x_ref[0]+(0.4234970646)*x_ref[1]**o+(0.389585163376)*x_ref[1]+(-0.609771068778)*x_ref[2]**o+(-0.121467061755)*x_ref[2]
-        ref[2,2,0,0]=(0.138823207466)*x_ref[0]**o+(-0.779837455014)*x_ref[0]+(0.70167049555)*x_ref[1]**o+(0.766428813369)*x_ref[1]+(0.114023530366)*x_ref[2]**o+(0.650098536187)*x_ref[2]
-        ref[2,2,0,1]=(0.974998667633)*x_ref[0]**o+(0.958471050654)*x_ref[0]+(0.193515162503)*x_ref[1]**o+(-0.252148167253)*x_ref[1]+(0.495475460125)*x_ref[2]**o+(0.562693347983)*x_ref[2]
-        ref[2,2,1,0]=(-0.552379548988)*x_ref[0]**o+(-0.831399971618)*x_ref[0]+(0.437581216647)*x_ref[1]**o+(-0.775331267696)*x_ref[1]+(0.729041628844)*x_ref[2]**o+(0.633113359893)*x_ref[2]
-        ref[2,2,1,1]=(0.379858437049)*x_ref[0]**o+(0.923586504203)*x_ref[0]+(0.707244783969)*x_ref[1]**o+(-0.293157375059)*x_ref[1]+(-0.368717941876)*x_ref[2]**o+(-0.202610288616)*x_ref[2]
-        ref[2,2,2,0]=(-0.804826108231)*x_ref[0]**o+(-0.0208712096312)*x_ref[0]+(0.0482547072498)*x_ref[1]**o+(0.852366543609)*x_ref[1]+(0.328962500136)*x_ref[2]**o+(-0.132777835512)*x_ref[2]
-        ref[2,2,2,1]=(0.91373752217)*x_ref[0]**o+(-0.792112120729)*x_ref[0]+(-0.0457564087072)*x_ref[1]**o+(0.309694852949)*x_ref[1]+(0.089219285337)*x_ref[2]**o+(-0.516000514614)*x_ref[2]
-        ref[2,3,0,0]=(0.343215129115)*x_ref[0]**o+(0.40804099837)*x_ref[0]+(-0.865942442914)*x_ref[1]**o+(0.842241683043)*x_ref[1]+(0.0727803297601)*x_ref[2]**o+(-0.395225682949)*x_ref[2]
-        ref[2,3,0,1]=(-0.965340522771)*x_ref[0]**o+(-0.897056478677)*x_ref[0]+(-0.305205944062)*x_ref[1]**o+(0.393941789685)*x_ref[1]+(-0.253328379131)*x_ref[2]**o+(0.0951510469271)*x_ref[2]
-        ref[2,3,1,0]=(0.536251514752)*x_ref[0]**o+(0.0629776386779)*x_ref[0]+(-0.706311222379)*x_ref[1]**o+(-0.84362242029)*x_ref[1]+(0.00110678760539)*x_ref[2]**o+(-0.30286059941)*x_ref[2]
-        ref[2,3,1,1]=(0.114584737295)*x_ref[0]**o+(0.0708763738067)*x_ref[0]+(-0.454760062397)*x_ref[1]**o+(0.228742539922)*x_ref[1]+(0.514960810352)*x_ref[2]**o+(-0.815749211085)*x_ref[2]
-        ref[2,3,2,0]=(0.246335688008)*x_ref[0]**o+(-0.239199299885)*x_ref[0]+(-0.447390151659)*x_ref[1]**o+(0.918949356391)*x_ref[1]+(-0.307864840175)*x_ref[2]**o+(0.560139080481)*x_ref[2]
-        ref[2,3,2,1]=(0.118766035723)*x_ref[0]**o+(0.610711164899)*x_ref[0]+(0.336628771776)*x_ref[1]**o+(0.833699268751)*x_ref[1]+(-0.424694647429)*x_ref[2]**o+(-0.639929688104)*x_ref[2]
-        ref[2,4,0,0]=(0.814543506987)*x_ref[0]**o+(-0.797684321368)*x_ref[0]+(0.337242635783)*x_ref[1]**o+(0.278139837072)*x_ref[1]+(0.633511526441)*x_ref[2]**o+(0.372175615028)*x_ref[2]
-        ref[2,4,0,1]=(-0.0590668694094)*x_ref[0]**o+(0.256732067267)*x_ref[0]+(0.519737187577)*x_ref[1]**o+(-0.376391855948)*x_ref[1]+(-0.810934658651)*x_ref[2]**o+(0.826899476928)*x_ref[2]
-        ref[2,4,1,0]=(-0.428976843661)*x_ref[0]**o+(0.672667833313)*x_ref[0]+(0.263194890946)*x_ref[1]**o+(-0.894790773661)*x_ref[1]+(-0.550298557295)*x_ref[2]**o+(-0.00560384035502)*x_ref[2]
-        ref[2,4,1,1]=(-0.818372430144)*x_ref[0]**o+(-0.829920833073)*x_ref[0]+(-0.359560636119)*x_ref[1]**o+(-0.113484563205)*x_ref[1]+(0.586796110365)*x_ref[2]**o+(0.296820898426)*x_ref[2]
-        ref[2,4,2,0]=(-0.691597969566)*x_ref[0]**o+(0.715813153538)*x_ref[0]+(0.954093612503)*x_ref[1]**o+(0.88803420754)*x_ref[1]+(0.697447667765)*x_ref[2]**o+(0.793730496625)*x_ref[2]
-        ref[2,4,2,1]=(0.351099833336)*x_ref[0]**o+(-0.716419272807)*x_ref[0]+(0.318726674998)*x_ref[1]**o+(0.246151914414)*x_ref[1]+(-0.945520673884)*x_ref[2]**o+(-0.489026233954)*x_ref[2]
-        ref[3,0,0,0]=(0.511598022804)*x_ref[0]**o+(0.567617269582)*x_ref[0]+(-0.526293319137)*x_ref[1]**o+(0.333750098146)*x_ref[1]+(-0.0869228849144)*x_ref[2]**o+(-0.204072834867)*x_ref[2]
-        ref[3,0,0,1]=(0.905384007172)*x_ref[0]**o+(-0.661067390314)*x_ref[0]+(-0.470790632295)*x_ref[1]**o+(-0.149608017616)*x_ref[1]+(0.427879278267)*x_ref[2]**o+(0.987040179184)*x_ref[2]
-        ref[3,0,1,0]=(-0.946562006809)*x_ref[0]**o+(0.64141909633)*x_ref[0]+(-0.762076826276)*x_ref[1]**o+(-0.642912850794)*x_ref[1]+(0.712567898559)*x_ref[2]**o+(-0.292128944205)*x_ref[2]
-        ref[3,0,1,1]=(-0.955087949361)*x_ref[0]**o+(0.426588041133)*x_ref[0]+(0.339313104127)*x_ref[1]**o+(-0.375147344045)*x_ref[1]+(0.967259014679)*x_ref[2]**o+(0.504521081858)*x_ref[2]
-        ref[3,0,2,0]=(0.141876598344)*x_ref[0]**o+(-0.335579252825)*x_ref[0]+(0.514552993602)*x_ref[1]**o+(-0.531116948499)*x_ref[1]+(-0.369319413141)*x_ref[2]**o+(0.0374413262362)*x_ref[2]
-        ref[3,0,2,1]=(0.678360463658)*x_ref[0]**o+(-0.357900119646)*x_ref[0]+(0.300750717059)*x_ref[1]**o+(0.516196189448)*x_ref[1]+(0.0535466018203)*x_ref[2]**o+(-0.149961940786)*x_ref[2]
-        ref[3,1,0,0]=(0.0975994351079)*x_ref[0]**o+(0.634544068499)*x_ref[0]+(-0.963217046352)*x_ref[1]**o+(-0.804658091456)*x_ref[1]+(-0.620132720823)*x_ref[2]**o+(0.862250619369)*x_ref[2]
-        ref[3,1,0,1]=(0.210306328879)*x_ref[0]**o+(-0.457341187966)*x_ref[0]+(0.957556084801)*x_ref[1]**o+(0.704073170928)*x_ref[1]+(0.423134492133)*x_ref[2]**o+(-0.167268375412)*x_ref[2]
-        ref[3,1,1,0]=(-0.909228817744)*x_ref[0]**o+(0.110665018921)*x_ref[0]+(0.36275630147)*x_ref[1]**o+(0.346866824763)*x_ref[1]+(-0.535600547489)*x_ref[2]**o+(0.627638814375)*x_ref[2]
-        ref[3,1,1,1]=(0.328780933823)*x_ref[0]**o+(-0.249563994161)*x_ref[0]+(-0.555789062892)*x_ref[1]**o+(-0.917287525036)*x_ref[1]+(0.386191175017)*x_ref[2]**o+(0.123904319061)*x_ref[2]
-        ref[3,1,2,0]=(-0.838409901623)*x_ref[0]**o+(0.673479705393)*x_ref[0]+(0.482921104917)*x_ref[1]**o+(0.136411388588)*x_ref[1]+(0.583674116225)*x_ref[2]**o+(0.305100836877)*x_ref[2]
-        ref[3,1,2,1]=(0.952961008312)*x_ref[0]**o+(-0.0501981079532)*x_ref[0]+(0.661434464642)*x_ref[1]**o+(0.65030469399)*x_ref[1]+(-0.157562001295)*x_ref[2]**o+(-0.249551892917)*x_ref[2]
-        ref[3,2,0,0]=(-0.0232804500286)*x_ref[0]**o+(-0.559229392203)*x_ref[0]+(0.127967930273)*x_ref[1]**o+(-0.635827181645)*x_ref[1]+(-0.0426703224383)*x_ref[2]**o+(0.47720230258)*x_ref[2]
-        ref[3,2,0,1]=(-0.421658996106)*x_ref[0]**o+(-0.468260038077)*x_ref[0]+(0.479083572554)*x_ref[1]**o+(-0.214417881841)*x_ref[1]+(0.372430534261)*x_ref[2]**o+(0.133063789546)*x_ref[2]
-        ref[3,2,1,0]=(0.905811586567)*x_ref[0]**o+(0.245447340384)*x_ref[0]+(-0.337650999146)*x_ref[1]**o+(0.908188235976)*x_ref[1]+(-0.804029751277)*x_ref[2]**o+(0.0512676456643)*x_ref[2]
-        ref[3,2,1,1]=(-0.891486839409)*x_ref[0]**o+(0.20753794329)*x_ref[0]+(0.879183464252)*x_ref[1]**o+(0.902028906992)*x_ref[1]+(0.416776813598)*x_ref[2]**o+(0.491964374373)*x_ref[2]
-        ref[3,2,2,0]=(0.653067027119)*x_ref[0]**o+(0.765293890745)*x_ref[0]+(-0.348902169508)*x_ref[1]**o+(0.324429035849)*x_ref[1]+(-0.363026365065)*x_ref[2]**o+(0.0816186405511)*x_ref[2]
-        ref[3,2,2,1]=(-0.0415375052325)*x_ref[0]**o+(-0.480779075784)*x_ref[0]+(-0.137223552938)*x_ref[1]**o+(-0.915733625512)*x_ref[1]+(0.750199445159)*x_ref[2]**o+(-0.789818945171)*x_ref[2]
-        ref[3,3,0,0]=(0.0744921239083)*x_ref[0]**o+(0.0700589144159)*x_ref[0]+(-0.327105425297)*x_ref[1]**o+(0.469843257765)*x_ref[1]+(-0.170191600844)*x_ref[2]**o+(0.732071534155)*x_ref[2]
-        ref[3,3,0,1]=(0.172643927441)*x_ref[0]**o+(0.848924114383)*x_ref[0]+(-0.79125762228)*x_ref[1]**o+(-0.694725775976)*x_ref[1]+(-0.309710503985)*x_ref[2]**o+(-0.405310234927)*x_ref[2]
-        ref[3,3,1,0]=(-0.465911787595)*x_ref[0]**o+(-0.71080474709)*x_ref[0]+(0.959925934203)*x_ref[1]**o+(-0.111110644825)*x_ref[1]+(-0.145349925218)*x_ref[2]**o+(0.122955165811)*x_ref[2]
-        ref[3,3,1,1]=(-0.769111863754)*x_ref[0]**o+(0.348036938532)*x_ref[0]+(0.485890856474)*x_ref[1]**o+(0.382595218985)*x_ref[1]+(-0.897488692981)*x_ref[2]**o+(0.830822333819)*x_ref[2]
-        ref[3,3,2,0]=(0.341890793681)*x_ref[0]**o+(-0.667145936571)*x_ref[0]+(-0.145094108268)*x_ref[1]**o+(0.771433911212)*x_ref[1]+(-0.299752164325)*x_ref[2]**o+(-0.357856549677)*x_ref[2]
-        ref[3,3,2,1]=(0.26381838796)*x_ref[0]**o+(-0.44474724998)*x_ref[0]+(0.310283988195)*x_ref[1]**o+(0.698675181314)*x_ref[1]+(0.437624133238)*x_ref[2]**o+(0.394916054445)*x_ref[2]
-        ref[3,4,0,0]=(-0.576499406674)*x_ref[0]**o+(0.770936634959)*x_ref[0]+(0.707441735783)*x_ref[1]**o+(-0.794953257043)*x_ref[1]+(-0.535342943209)*x_ref[2]**o+(-0.509446811787)*x_ref[2]
-        ref[3,4,0,1]=(0.161115012113)*x_ref[0]**o+(0.11079092252)*x_ref[0]+(0.0633804181164)*x_ref[1]**o+(-0.406049293019)*x_ref[1]+(-0.824283994336)*x_ref[2]**o+(-0.481107560499)*x_ref[2]
-        ref[3,4,1,0]=(-0.411133810295)*x_ref[0]**o+(0.988486625099)*x_ref[0]+(-0.36050191367)*x_ref[1]**o+(0.469479821965)*x_ref[1]+(-0.431175357325)*x_ref[2]**o+(-0.966295015263)*x_ref[2]
-        ref[3,4,1,1]=(0.233731410367)*x_ref[0]**o+(-0.821900740766)*x_ref[0]+(-0.823123461385)*x_ref[1]**o+(-0.380537914421)*x_ref[1]+(-0.896146300355)*x_ref[2]**o+(-0.775172990257)*x_ref[2]
-        ref[3,4,2,0]=(-0.96323363586)*x_ref[0]**o+(0.0935412405245)*x_ref[0]+(0.929333026259)*x_ref[1]**o+(-0.322236627348)*x_ref[1]+(-0.390898135964)*x_ref[2]**o+(-0.766178290162)*x_ref[2]
-        ref[3,4,2,1]=(-0.773670533268)*x_ref[0]**o+(-0.156975157098)*x_ref[0]+(-0.91512996795)*x_ref[1]**o+(0.0247803682126)*x_ref[1]+(0.995159733782)*x_ref[2]**o+(-0.669224144225)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.0071553637759)*x[0]**o+(0.357615094637)*x[0]+(0.980385970972)*x[1]**o+(0.423505273491)*x[1]
-        ref=(-0.0071553637759)*x_ref[0]**o+(0.357615094637)*x_ref[0]+(0.980385970972)*x_ref[1]**o+(0.423505273491)*x_ref[1]
-      else:
-        arg=(0.546251547514)*x[0]**o+(-0.530405447164)*x[0]+(-0.901465213708)*x[1]**o+(-0.986019835171)*x[1]+(-0.731836172089)*x[2]**o+(0.377317674082)*x[2]
-        ref=(0.546251547514)*x_ref[0]**o+(-0.530405447164)*x_ref[0]+(-0.901465213708)*x_ref[1]**o+(-0.986019835171)*x_ref[1]+(-0.731836172089)*x_ref[2]**o+(0.377317674082)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.138216822552)*x[0]**o+(0.908302047805)*x[0]+(-0.247600939209)*x[1]**o+(0.776239000167)*x[1]
-        arg[1]=(-0.577926899073)*x[0]**o+(0.714263102346)*x[0]+(-0.343808625475)*x[1]**o+(0.786295563423)*x[1]
-        ref[0]=(-0.138216822552)*x_ref[0]**o+(0.908302047805)*x_ref[0]+(-0.247600939209)*x_ref[1]**o+(0.776239000167)*x_ref[1]
-        ref[1]=(-0.577926899073)*x_ref[0]**o+(0.714263102346)*x_ref[0]+(-0.343808625475)*x_ref[1]**o+(0.786295563423)*x_ref[1]
-      else:
-        arg[0]=(0.020232467504)*x[0]**o+(-0.0449727381653)*x[0]+(0.00132143537494)*x[1]**o+(-0.870292414095)*x[1]+(-0.926731511382)*x[2]**o+(-0.398915622332)*x[2]
-        arg[1]=(0.203864545604)*x[0]**o+(0.150501673382)*x[0]+(0.132132290114)*x[1]**o+(-0.720617456803)*x[1]+(0.673909788445)*x[2]**o+(0.145376368499)*x[2]
-        ref[0]=(0.020232467504)*x_ref[0]**o+(-0.0449727381653)*x_ref[0]+(0.00132143537494)*x_ref[1]**o+(-0.870292414095)*x_ref[1]+(-0.926731511382)*x_ref[2]**o+(-0.398915622332)*x_ref[2]
-        ref[1]=(0.203864545604)*x_ref[0]**o+(0.150501673382)*x_ref[0]+(0.132132290114)*x_ref[1]**o+(-0.720617456803)*x_ref[1]+(0.673909788445)*x_ref[2]**o+(0.145376368499)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.344685653483)*x[0]**o+(-0.618443209029)*x[0]+(-0.338246837583)*x[1]**o+(-0.709311881709)*x[1]
-        arg[0,1]=(-0.176341370817)*x[0]**o+(-0.230030832268)*x[0]+(-0.335163038431)*x[1]**o+(0.278627093006)*x[1]
-        arg[0,2]=(0.376270607923)*x[0]**o+(0.895822309578)*x[0]+(0.418316736671)*x[1]**o+(-0.951461687587)*x[1]
-        arg[0,3]=(0.69925470532)*x[0]**o+(-0.829917904706)*x[0]+(0.60851481091)*x[1]**o+(-0.880924691692)*x[1]
-        arg[0,4]=(0.537570501499)*x[0]**o+(0.584091505535)*x[0]+(-0.0045669307163)*x[1]**o+(0.162714723047)*x[1]
-        arg[1,0]=(-0.244615538677)*x[0]**o+(-0.0168359545772)*x[0]+(-0.511097014251)*x[1]**o+(-0.476830089968)*x[1]
-        arg[1,1]=(0.350953788855)*x[0]**o+(0.0859931352733)*x[0]+(-0.565664846934)*x[1]**o+(-0.230383210864)*x[1]
-        arg[1,2]=(0.787537227138)*x[0]**o+(-0.97589028834)*x[0]+(0.978870857538)*x[1]**o+(0.436540016432)*x[1]
-        arg[1,3]=(-0.806777674064)*x[0]**o+(-0.384971723467)*x[0]+(-0.423836322283)*x[1]**o+(0.470609842503)*x[1]
-        arg[1,4]=(0.288422170494)*x[0]**o+(-0.467670464119)*x[0]+(-0.616952048135)*x[1]**o+(0.604831335817)*x[1]
-        arg[2,0]=(0.0461969205986)*x[0]**o+(0.663083190578)*x[0]+(-0.673597938582)*x[1]**o+(0.217389040208)*x[1]
-        arg[2,1]=(-0.32008443048)*x[0]**o+(-0.970854886309)*x[0]+(0.630220968872)*x[1]**o+(0.827824011117)*x[1]
-        arg[2,2]=(-0.232867522682)*x[0]**o+(-0.17921445933)*x[0]+(-0.565289194319)*x[1]**o+(0.0251729876325)*x[1]
-        arg[2,3]=(-0.862002880133)*x[0]**o+(0.64790108714)*x[0]+(-0.469428882373)*x[1]**o+(0.50581485158)*x[1]
-        arg[2,4]=(-0.957389923449)*x[0]**o+(-0.716972488151)*x[0]+(0.848168933491)*x[1]**o+(0.78614576485)*x[1]
-        arg[3,0]=(0.417890378265)*x[0]**o+(-0.128884271967)*x[0]+(0.981251819451)*x[1]**o+(0.837945499182)*x[1]
-        arg[3,1]=(-0.296791907211)*x[0]**o+(0.913966659909)*x[0]+(0.0171079547828)*x[1]**o+(0.472922286638)*x[1]
-        arg[3,2]=(-0.549504779354)*x[0]**o+(0.356989069435)*x[0]+(-0.0978494385269)*x[1]**o+(0.59354694599)*x[1]
-        arg[3,3]=(0.0272055308458)*x[0]**o+(0.560184544705)*x[0]+(-0.825452907104)*x[1]**o+(0.701919616153)*x[1]
-        arg[3,4]=(-0.33094753848)*x[0]**o+(0.877723269108)*x[0]+(-0.491915661514)*x[1]**o+(-0.98784807255)*x[1]
-        ref[0,0]=(-0.344685653483)*x_ref[0]**o+(-0.618443209029)*x_ref[0]+(-0.338246837583)*x_ref[1]**o+(-0.709311881709)*x_ref[1]
-        ref[0,1]=(-0.176341370817)*x_ref[0]**o+(-0.230030832268)*x_ref[0]+(-0.335163038431)*x_ref[1]**o+(0.278627093006)*x_ref[1]
-        ref[0,2]=(0.376270607923)*x_ref[0]**o+(0.895822309578)*x_ref[0]+(0.418316736671)*x_ref[1]**o+(-0.951461687587)*x_ref[1]
-        ref[0,3]=(0.69925470532)*x_ref[0]**o+(-0.829917904706)*x_ref[0]+(0.60851481091)*x_ref[1]**o+(-0.880924691692)*x_ref[1]
-        ref[0,4]=(0.537570501499)*x_ref[0]**o+(0.584091505535)*x_ref[0]+(-0.0045669307163)*x_ref[1]**o+(0.162714723047)*x_ref[1]
-        ref[1,0]=(-0.244615538677)*x_ref[0]**o+(-0.0168359545772)*x_ref[0]+(-0.511097014251)*x_ref[1]**o+(-0.476830089968)*x_ref[1]
-        ref[1,1]=(0.350953788855)*x_ref[0]**o+(0.0859931352733)*x_ref[0]+(-0.565664846934)*x_ref[1]**o+(-0.230383210864)*x_ref[1]
-        ref[1,2]=(0.787537227138)*x_ref[0]**o+(-0.97589028834)*x_ref[0]+(0.978870857538)*x_ref[1]**o+(0.436540016432)*x_ref[1]
-        ref[1,3]=(-0.806777674064)*x_ref[0]**o+(-0.384971723467)*x_ref[0]+(-0.423836322283)*x_ref[1]**o+(0.470609842503)*x_ref[1]
-        ref[1,4]=(0.288422170494)*x_ref[0]**o+(-0.467670464119)*x_ref[0]+(-0.616952048135)*x_ref[1]**o+(0.604831335817)*x_ref[1]
-        ref[2,0]=(0.0461969205986)*x_ref[0]**o+(0.663083190578)*x_ref[0]+(-0.673597938582)*x_ref[1]**o+(0.217389040208)*x_ref[1]
-        ref[2,1]=(-0.32008443048)*x_ref[0]**o+(-0.970854886309)*x_ref[0]+(0.630220968872)*x_ref[1]**o+(0.827824011117)*x_ref[1]
-        ref[2,2]=(-0.232867522682)*x_ref[0]**o+(-0.17921445933)*x_ref[0]+(-0.565289194319)*x_ref[1]**o+(0.0251729876325)*x_ref[1]
-        ref[2,3]=(-0.862002880133)*x_ref[0]**o+(0.64790108714)*x_ref[0]+(-0.469428882373)*x_ref[1]**o+(0.50581485158)*x_ref[1]
-        ref[2,4]=(-0.957389923449)*x_ref[0]**o+(-0.716972488151)*x_ref[0]+(0.848168933491)*x_ref[1]**o+(0.78614576485)*x_ref[1]
-        ref[3,0]=(0.417890378265)*x_ref[0]**o+(-0.128884271967)*x_ref[0]+(0.981251819451)*x_ref[1]**o+(0.837945499182)*x_ref[1]
-        ref[3,1]=(-0.296791907211)*x_ref[0]**o+(0.913966659909)*x_ref[0]+(0.0171079547828)*x_ref[1]**o+(0.472922286638)*x_ref[1]
-        ref[3,2]=(-0.549504779354)*x_ref[0]**o+(0.356989069435)*x_ref[0]+(-0.0978494385269)*x_ref[1]**o+(0.59354694599)*x_ref[1]
-        ref[3,3]=(0.0272055308458)*x_ref[0]**o+(0.560184544705)*x_ref[0]+(-0.825452907104)*x_ref[1]**o+(0.701919616153)*x_ref[1]
-        ref[3,4]=(-0.33094753848)*x_ref[0]**o+(0.877723269108)*x_ref[0]+(-0.491915661514)*x_ref[1]**o+(-0.98784807255)*x_ref[1]
-      else:
-        arg[0,0]=(-0.434721514594)*x[0]**o+(-0.28074158231)*x[0]+(0.102692621316)*x[1]**o+(0.399677492352)*x[1]+(0.39799987301)*x[2]**o+(-0.134547332796)*x[2]
-        arg[0,1]=(-0.814630031471)*x[0]**o+(-0.0722898377573)*x[0]+(0.356831166041)*x[1]**o+(0.0556663518903)*x[1]+(-0.335764152958)*x[2]**o+(0.344564519072)*x[2]
-        arg[0,2]=(-0.881698115197)*x[0]**o+(-0.030759288922)*x[0]+(-0.23126177081)*x[1]**o+(0.865011678258)*x[1]+(0.961867471932)*x[2]**o+(-0.04809978604)*x[2]
-        arg[0,3]=(-0.931319970946)*x[0]**o+(0.807195614255)*x[0]+(0.116305510032)*x[1]**o+(0.337873586448)*x[1]+(0.523766276637)*x[2]**o+(-0.890502808117)*x[2]
-        arg[0,4]=(0.952369561411)*x[0]**o+(0.518186569223)*x[0]+(0.184454818734)*x[1]**o+(-0.198618411156)*x[1]+(0.891317797589)*x[2]**o+(-0.312268228065)*x[2]
-        arg[1,0]=(-0.770379397538)*x[0]**o+(0.11068893635)*x[0]+(0.435574518842)*x[1]**o+(-0.895094805657)*x[1]+(0.719886389608)*x[2]**o+(0.617254266829)*x[2]
-        arg[1,1]=(-0.968566082536)*x[0]**o+(0.70331821608)*x[0]+(-0.256092697223)*x[1]**o+(0.214482838048)*x[1]+(-0.20817108493)*x[2]**o+(-0.741961694045)*x[2]
-        arg[1,2]=(0.928194134464)*x[0]**o+(0.748278982508)*x[0]+(0.459001496702)*x[1]**o+(-0.333954496033)*x[1]+(0.0451659439418)*x[2]**o+(0.0355669781059)*x[2]
-        arg[1,3]=(-0.285564661682)*x[0]**o+(-0.780972389596)*x[0]+(0.20442278849)*x[1]**o+(-0.425673038027)*x[1]+(-0.886021022849)*x[2]**o+(0.2231241391)*x[2]
-        arg[1,4]=(0.48756511391)*x[0]**o+(0.904219456651)*x[0]+(-0.723245954496)*x[1]**o+(-0.876483077689)*x[1]+(0.454913273237)*x[2]**o+(0.907651543551)*x[2]
-        arg[2,0]=(-0.490623674798)*x[0]**o+(0.179561344392)*x[0]+(-0.257796709265)*x[1]**o+(0.470216680739)*x[1]+(-0.334946805819)*x[2]**o+(-0.295308708488)*x[2]
-        arg[2,1]=(-0.0753731003603)*x[0]**o+(0.848622766023)*x[0]+(-0.168762035291)*x[1]**o+(-0.132048839333)*x[1]+(0.229089231051)*x[2]**o+(0.280032186468)*x[2]
-        arg[2,2]=(0.601432167354)*x[0]**o+(-0.0857688429764)*x[0]+(0.556763499853)*x[1]**o+(-0.0953568285359)*x[1]+(-0.396589175262)*x[2]**o+(0.437257052414)*x[2]
-        arg[2,3]=(0.239710792478)*x[0]**o+(0.255863660922)*x[0]+(-0.860831814227)*x[1]**o+(0.416057968294)*x[1]+(0.284515440811)*x[2]**o+(-0.0737992548315)*x[2]
-        arg[2,4]=(-0.86884373286)*x[0]**o+(0.306811019609)*x[0]+(0.955007347168)*x[1]**o+(0.731959544948)*x[1]+(0.326947842619)*x[2]**o+(0.430618227986)*x[2]
-        arg[3,0]=(0.450341287007)*x[0]**o+(-0.0318463261779)*x[0]+(-0.755083793007)*x[1]**o+(0.427706480425)*x[1]+(0.224383931841)*x[2]**o+(-0.801200151542)*x[2]
-        arg[3,1]=(-0.750405028813)*x[0]**o+(-0.531057162102)*x[0]+(0.120116357521)*x[1]**o+(-0.247640504917)*x[1]+(-0.360494371461)*x[2]**o+(-0.496404068337)*x[2]
-        arg[3,2]=(-0.202775617449)*x[0]**o+(0.833337604045)*x[0]+(0.551285270602)*x[1]**o+(0.266630410234)*x[1]+(0.903041333927)*x[2]**o+(0.527233939028)*x[2]
-        arg[3,3]=(0.12892683791)*x[0]**o+(-0.486726243104)*x[0]+(-0.340728397711)*x[1]**o+(-0.670692588507)*x[1]+(0.832250132781)*x[2]**o+(0.276897913372)*x[2]
-        arg[3,4]=(0.839441639419)*x[0]**o+(0.362150671815)*x[0]+(0.728370029046)*x[1]**o+(0.149540296968)*x[1]+(-0.0418719598944)*x[2]**o+(-0.331805297414)*x[2]
-        ref[0,0]=(-0.434721514594)*x_ref[0]**o+(-0.28074158231)*x_ref[0]+(0.102692621316)*x_ref[1]**o+(0.399677492352)*x_ref[1]+(0.39799987301)*x_ref[2]**o+(-0.134547332796)*x_ref[2]
-        ref[0,1]=(-0.814630031471)*x_ref[0]**o+(-0.0722898377573)*x_ref[0]+(0.356831166041)*x_ref[1]**o+(0.0556663518903)*x_ref[1]+(-0.335764152958)*x_ref[2]**o+(0.344564519072)*x_ref[2]
-        ref[0,2]=(-0.881698115197)*x_ref[0]**o+(-0.030759288922)*x_ref[0]+(-0.23126177081)*x_ref[1]**o+(0.865011678258)*x_ref[1]+(0.961867471932)*x_ref[2]**o+(-0.04809978604)*x_ref[2]
-        ref[0,3]=(-0.931319970946)*x_ref[0]**o+(0.807195614255)*x_ref[0]+(0.116305510032)*x_ref[1]**o+(0.337873586448)*x_ref[1]+(0.523766276637)*x_ref[2]**o+(-0.890502808117)*x_ref[2]
-        ref[0,4]=(0.952369561411)*x_ref[0]**o+(0.518186569223)*x_ref[0]+(0.184454818734)*x_ref[1]**o+(-0.198618411156)*x_ref[1]+(0.891317797589)*x_ref[2]**o+(-0.312268228065)*x_ref[2]
-        ref[1,0]=(-0.770379397538)*x_ref[0]**o+(0.11068893635)*x_ref[0]+(0.435574518842)*x_ref[1]**o+(-0.895094805657)*x_ref[1]+(0.719886389608)*x_ref[2]**o+(0.617254266829)*x_ref[2]
-        ref[1,1]=(-0.968566082536)*x_ref[0]**o+(0.70331821608)*x_ref[0]+(-0.256092697223)*x_ref[1]**o+(0.214482838048)*x_ref[1]+(-0.20817108493)*x_ref[2]**o+(-0.741961694045)*x_ref[2]
-        ref[1,2]=(0.928194134464)*x_ref[0]**o+(0.748278982508)*x_ref[0]+(0.459001496702)*x_ref[1]**o+(-0.333954496033)*x_ref[1]+(0.0451659439418)*x_ref[2]**o+(0.0355669781059)*x_ref[2]
-        ref[1,3]=(-0.285564661682)*x_ref[0]**o+(-0.780972389596)*x_ref[0]+(0.20442278849)*x_ref[1]**o+(-0.425673038027)*x_ref[1]+(-0.886021022849)*x_ref[2]**o+(0.2231241391)*x_ref[2]
-        ref[1,4]=(0.48756511391)*x_ref[0]**o+(0.904219456651)*x_ref[0]+(-0.723245954496)*x_ref[1]**o+(-0.876483077689)*x_ref[1]+(0.454913273237)*x_ref[2]**o+(0.907651543551)*x_ref[2]
-        ref[2,0]=(-0.490623674798)*x_ref[0]**o+(0.179561344392)*x_ref[0]+(-0.257796709265)*x_ref[1]**o+(0.470216680739)*x_ref[1]+(-0.334946805819)*x_ref[2]**o+(-0.295308708488)*x_ref[2]
-        ref[2,1]=(-0.0753731003603)*x_ref[0]**o+(0.848622766023)*x_ref[0]+(-0.168762035291)*x_ref[1]**o+(-0.132048839333)*x_ref[1]+(0.229089231051)*x_ref[2]**o+(0.280032186468)*x_ref[2]
-        ref[2,2]=(0.601432167354)*x_ref[0]**o+(-0.0857688429764)*x_ref[0]+(0.556763499853)*x_ref[1]**o+(-0.0953568285359)*x_ref[1]+(-0.396589175262)*x_ref[2]**o+(0.437257052414)*x_ref[2]
-        ref[2,3]=(0.239710792478)*x_ref[0]**o+(0.255863660922)*x_ref[0]+(-0.860831814227)*x_ref[1]**o+(0.416057968294)*x_ref[1]+(0.284515440811)*x_ref[2]**o+(-0.0737992548315)*x_ref[2]
-        ref[2,4]=(-0.86884373286)*x_ref[0]**o+(0.306811019609)*x_ref[0]+(0.955007347168)*x_ref[1]**o+(0.731959544948)*x_ref[1]+(0.326947842619)*x_ref[2]**o+(0.430618227986)*x_ref[2]
-        ref[3,0]=(0.450341287007)*x_ref[0]**o+(-0.0318463261779)*x_ref[0]+(-0.755083793007)*x_ref[1]**o+(0.427706480425)*x_ref[1]+(0.224383931841)*x_ref[2]**o+(-0.801200151542)*x_ref[2]
-        ref[3,1]=(-0.750405028813)*x_ref[0]**o+(-0.531057162102)*x_ref[0]+(0.120116357521)*x_ref[1]**o+(-0.247640504917)*x_ref[1]+(-0.360494371461)*x_ref[2]**o+(-0.496404068337)*x_ref[2]
-        ref[3,2]=(-0.202775617449)*x_ref[0]**o+(0.833337604045)*x_ref[0]+(0.551285270602)*x_ref[1]**o+(0.266630410234)*x_ref[1]+(0.903041333927)*x_ref[2]**o+(0.527233939028)*x_ref[2]
-        ref[3,3]=(0.12892683791)*x_ref[0]**o+(-0.486726243104)*x_ref[0]+(-0.340728397711)*x_ref[1]**o+(-0.670692588507)*x_ref[1]+(0.832250132781)*x_ref[2]**o+(0.276897913372)*x_ref[2]
-        ref[3,4]=(0.839441639419)*x_ref[0]**o+(0.362150671815)*x_ref[0]+(0.728370029046)*x_ref[1]**o+(0.149540296968)*x_ref[1]+(-0.0418719598944)*x_ref[2]**o+(-0.331805297414)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.475615092269)*x[0]**o+(-0.0893751722575)*x[0]+(0.595881277166)*x[1]**o+(0.397900173915)*x[1]
-        arg[0,0,1]=(-0.552614805712)*x[0]**o+(0.14072435445)*x[0]+(0.290231845094)*x[1]**o+(0.573878059041)*x[1]
-        arg[0,1,0]=(-0.226148312038)*x[0]**o+(-0.737524507359)*x[0]+(-0.704362709293)*x[1]**o+(-0.197223346266)*x[1]
-        arg[0,1,1]=(0.844313529642)*x[0]**o+(-0.948514286846)*x[0]+(0.383754990882)*x[1]**o+(0.629819148632)*x[1]
-        arg[1,0,0]=(-0.519122333314)*x[0]**o+(-0.895333584981)*x[0]+(-0.941503934561)*x[1]**o+(0.574440495425)*x[1]
-        arg[1,0,1]=(0.34967649382)*x[0]**o+(-0.332598318229)*x[0]+(0.0587818420974)*x[1]**o+(0.0848419508498)*x[1]
-        arg[1,1,0]=(0.126943263196)*x[0]**o+(0.20287950383)*x[0]+(-0.305454685691)*x[1]**o+(-0.357695790052)*x[1]
-        arg[1,1,1]=(0.104154708153)*x[0]**o+(0.867435765411)*x[0]+(0.656946071961)*x[1]**o+(0.96433811362)*x[1]
-        arg[2,0,0]=(-0.407362949457)*x[0]**o+(-0.171021521273)*x[0]+(0.901342300398)*x[1]**o+(-0.0360476097399)*x[1]
-        arg[2,0,1]=(-0.709421035652)*x[0]**o+(0.949318093375)*x[0]+(0.155061840049)*x[1]**o+(0.828999317354)*x[1]
-        arg[2,1,0]=(-0.573031939083)*x[0]**o+(-0.766186602896)*x[0]+(-0.0483071013367)*x[1]**o+(0.741988754559)*x[1]
-        arg[2,1,1]=(-0.826747727748)*x[0]**o+(0.481970220735)*x[0]+(0.735617076451)*x[1]**o+(-0.64482586429)*x[1]
-        arg[3,0,0]=(0.0834619008603)*x[0]**o+(-0.122260004323)*x[0]+(-0.193792114997)*x[1]**o+(0.635792828013)*x[1]
-        arg[3,0,1]=(0.868630978759)*x[0]**o+(0.54474614716)*x[0]+(-0.514377753448)*x[1]**o+(0.58889412844)*x[1]
-        arg[3,1,0]=(-0.233744744882)*x[0]**o+(0.883601383004)*x[0]+(0.575012113003)*x[1]**o+(0.185704140149)*x[1]
-        arg[3,1,1]=(-0.948893544046)*x[0]**o+(0.851870038501)*x[0]+(-0.591835259957)*x[1]**o+(-0.958375628808)*x[1]
-        arg[4,0,0]=(0.981685480559)*x[0]**o+(0.718249744763)*x[0]+(0.589534430546)*x[1]**o+(0.72294148429)*x[1]
-        arg[4,0,1]=(-0.603601154465)*x[0]**o+(0.293688738803)*x[0]+(0.151726724518)*x[1]**o+(0.56316377967)*x[1]
-        arg[4,1,0]=(0.539033109011)*x[0]**o+(0.791686885872)*x[0]+(0.878973377358)*x[1]**o+(0.869606341625)*x[1]
-        arg[4,1,1]=(-0.0920873290752)*x[0]**o+(-0.132682060309)*x[0]+(0.34023826981)*x[1]**o+(0.585476816741)*x[1]
-        arg[5,0,0]=(-0.430989548175)*x[0]**o+(-0.525387682044)*x[0]+(-0.996483829778)*x[1]**o+(-0.564503119535)*x[1]
-        arg[5,0,1]=(0.602911018749)*x[0]**o+(-0.348972500704)*x[0]+(0.174681048071)*x[1]**o+(-0.94551825287)*x[1]
-        arg[5,1,0]=(0.780926392259)*x[0]**o+(-0.164977652547)*x[0]+(0.224726701017)*x[1]**o+(-0.779109318124)*x[1]
-        arg[5,1,1]=(0.470928696402)*x[0]**o+(-0.505871268699)*x[0]+(0.407158974816)*x[1]**o+(0.392856659954)*x[1]
-        ref[0,0,0]=(-0.475615092269)*x_ref[0]**o+(-0.0893751722575)*x_ref[0]+(0.595881277166)*x_ref[1]**o+(0.397900173915)*x_ref[1]
-        ref[0,0,1]=(-0.552614805712)*x_ref[0]**o+(0.14072435445)*x_ref[0]+(0.290231845094)*x_ref[1]**o+(0.573878059041)*x_ref[1]
-        ref[0,1,0]=(-0.226148312038)*x_ref[0]**o+(-0.737524507359)*x_ref[0]+(-0.704362709293)*x_ref[1]**o+(-0.197223346266)*x_ref[1]
-        ref[0,1,1]=(0.844313529642)*x_ref[0]**o+(-0.948514286846)*x_ref[0]+(0.383754990882)*x_ref[1]**o+(0.629819148632)*x_ref[1]
-        ref[1,0,0]=(-0.519122333314)*x_ref[0]**o+(-0.895333584981)*x_ref[0]+(-0.941503934561)*x_ref[1]**o+(0.574440495425)*x_ref[1]
-        ref[1,0,1]=(0.34967649382)*x_ref[0]**o+(-0.332598318229)*x_ref[0]+(0.0587818420974)*x_ref[1]**o+(0.0848419508498)*x_ref[1]
-        ref[1,1,0]=(0.126943263196)*x_ref[0]**o+(0.20287950383)*x_ref[0]+(-0.305454685691)*x_ref[1]**o+(-0.357695790052)*x_ref[1]
-        ref[1,1,1]=(0.104154708153)*x_ref[0]**o+(0.867435765411)*x_ref[0]+(0.656946071961)*x_ref[1]**o+(0.96433811362)*x_ref[1]
-        ref[2,0,0]=(-0.407362949457)*x_ref[0]**o+(-0.171021521273)*x_ref[0]+(0.901342300398)*x_ref[1]**o+(-0.0360476097399)*x_ref[1]
-        ref[2,0,1]=(-0.709421035652)*x_ref[0]**o+(0.949318093375)*x_ref[0]+(0.155061840049)*x_ref[1]**o+(0.828999317354)*x_ref[1]
-        ref[2,1,0]=(-0.573031939083)*x_ref[0]**o+(-0.766186602896)*x_ref[0]+(-0.0483071013367)*x_ref[1]**o+(0.741988754559)*x_ref[1]
-        ref[2,1,1]=(-0.826747727748)*x_ref[0]**o+(0.481970220735)*x_ref[0]+(0.735617076451)*x_ref[1]**o+(-0.64482586429)*x_ref[1]
-        ref[3,0,0]=(0.0834619008603)*x_ref[0]**o+(-0.122260004323)*x_ref[0]+(-0.193792114997)*x_ref[1]**o+(0.635792828013)*x_ref[1]
-        ref[3,0,1]=(0.868630978759)*x_ref[0]**o+(0.54474614716)*x_ref[0]+(-0.514377753448)*x_ref[1]**o+(0.58889412844)*x_ref[1]
-        ref[3,1,0]=(-0.233744744882)*x_ref[0]**o+(0.883601383004)*x_ref[0]+(0.575012113003)*x_ref[1]**o+(0.185704140149)*x_ref[1]
-        ref[3,1,1]=(-0.948893544046)*x_ref[0]**o+(0.851870038501)*x_ref[0]+(-0.591835259957)*x_ref[1]**o+(-0.958375628808)*x_ref[1]
-        ref[4,0,0]=(0.981685480559)*x_ref[0]**o+(0.718249744763)*x_ref[0]+(0.589534430546)*x_ref[1]**o+(0.72294148429)*x_ref[1]
-        ref[4,0,1]=(-0.603601154465)*x_ref[0]**o+(0.293688738803)*x_ref[0]+(0.151726724518)*x_ref[1]**o+(0.56316377967)*x_ref[1]
-        ref[4,1,0]=(0.539033109011)*x_ref[0]**o+(0.791686885872)*x_ref[0]+(0.878973377358)*x_ref[1]**o+(0.869606341625)*x_ref[1]
-        ref[4,1,1]=(-0.0920873290752)*x_ref[0]**o+(-0.132682060309)*x_ref[0]+(0.34023826981)*x_ref[1]**o+(0.585476816741)*x_ref[1]
-        ref[5,0,0]=(-0.430989548175)*x_ref[0]**o+(-0.525387682044)*x_ref[0]+(-0.996483829778)*x_ref[1]**o+(-0.564503119535)*x_ref[1]
-        ref[5,0,1]=(0.602911018749)*x_ref[0]**o+(-0.348972500704)*x_ref[0]+(0.174681048071)*x_ref[1]**o+(-0.94551825287)*x_ref[1]
-        ref[5,1,0]=(0.780926392259)*x_ref[0]**o+(-0.164977652547)*x_ref[0]+(0.224726701017)*x_ref[1]**o+(-0.779109318124)*x_ref[1]
-        ref[5,1,1]=(0.470928696402)*x_ref[0]**o+(-0.505871268699)*x_ref[0]+(0.407158974816)*x_ref[1]**o+(0.392856659954)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.759590374826)*x[0]**o+(-0.776182110267)*x[0]+(0.713871101133)*x[1]**o+(-0.0991655752543)*x[1]+(0.339491998788)*x[2]**o+(-0.624141085669)*x[2]
-        arg[0,0,1]=(-0.948679111098)*x[0]**o+(0.0918139408797)*x[0]+(-0.519481784001)*x[1]**o+(-0.480754367303)*x[1]+(0.996421472879)*x[2]**o+(-0.933032853651)*x[2]
-        arg[0,1,0]=(-0.824750788431)*x[0]**o+(0.846735099726)*x[0]+(-0.436835905895)*x[1]**o+(-0.732363323611)*x[1]+(-0.865610972073)*x[2]**o+(0.754759759319)*x[2]
-        arg[0,1,1]=(-0.403783782613)*x[0]**o+(0.918875237045)*x[0]+(0.0934155750366)*x[1]**o+(0.832477256884)*x[1]+(0.615080190605)*x[2]**o+(0.000920074523901)*x[2]
-        arg[1,0,0]=(0.260531941775)*x[0]**o+(-0.514647294043)*x[0]+(0.237113978946)*x[1]**o+(-0.116626766689)*x[1]+(-0.670422853592)*x[2]**o+(0.574941151693)*x[2]
-        arg[1,0,1]=(-0.0133773984155)*x[0]**o+(0.286273972547)*x[0]+(0.0493985332233)*x[1]**o+(-0.567835671454)*x[1]+(0.508314781519)*x[2]**o+(-0.603506084784)*x[2]
-        arg[1,1,0]=(0.0237413792908)*x[0]**o+(-0.758893281773)*x[0]+(0.150670689461)*x[1]**o+(0.136386516616)*x[1]+(-0.440203817756)*x[2]**o+(0.796610908529)*x[2]
-        arg[1,1,1]=(-0.223549634917)*x[0]**o+(0.396472946824)*x[0]+(0.47830083818)*x[1]**o+(0.059933592631)*x[1]+(0.709371074379)*x[2]**o+(-0.129442424949)*x[2]
-        arg[2,0,0]=(0.686170679191)*x[0]**o+(-0.118668021586)*x[0]+(0.033954449978)*x[1]**o+(-0.0508661210104)*x[1]+(0.352824724076)*x[2]**o+(-0.772874133692)*x[2]
-        arg[2,0,1]=(0.434879772789)*x[0]**o+(-0.148309931356)*x[0]+(-0.013792688421)*x[1]**o+(0.597899709109)*x[1]+(-0.280336465565)*x[2]**o+(-0.177134087728)*x[2]
-        arg[2,1,0]=(-0.636844238715)*x[0]**o+(-0.646269255495)*x[0]+(0.243236542558)*x[1]**o+(0.203480511801)*x[1]+(0.693290035164)*x[2]**o+(0.773354114662)*x[2]
-        arg[2,1,1]=(-0.161998867128)*x[0]**o+(0.193608078775)*x[0]+(0.607954851405)*x[1]**o+(0.648078354644)*x[1]+(-0.488891750936)*x[2]**o+(0.912860597431)*x[2]
-        arg[3,0,0]=(-0.696909279028)*x[0]**o+(0.039558795649)*x[0]+(0.441121646773)*x[1]**o+(-0.0681790925087)*x[1]+(-0.792437910441)*x[2]**o+(-0.512942395878)*x[2]
-        arg[3,0,1]=(-0.264832490825)*x[0]**o+(-0.955976365474)*x[0]+(-0.884641387524)*x[1]**o+(-0.736970630699)*x[1]+(-0.0525378155791)*x[2]**o+(0.149164361449)*x[2]
-        arg[3,1,0]=(0.434888951175)*x[0]**o+(-0.218511432369)*x[0]+(0.564377624401)*x[1]**o+(-0.0978716780106)*x[1]+(0.447857191989)*x[2]**o+(-0.466572586856)*x[2]
-        arg[3,1,1]=(0.457689985738)*x[0]**o+(0.00322996620178)*x[0]+(0.307787601144)*x[1]**o+(-0.119455639704)*x[1]+(0.70367723461)*x[2]**o+(0.561913096313)*x[2]
-        arg[4,0,0]=(-0.759802700221)*x[0]**o+(0.469649690329)*x[0]+(0.0913972297116)*x[1]**o+(0.310277900593)*x[1]+(-0.590266889319)*x[2]**o+(-0.89711266859)*x[2]
-        arg[4,0,1]=(0.85506147544)*x[0]**o+(-0.357476737069)*x[0]+(-0.646898911915)*x[1]**o+(-0.674811608049)*x[1]+(0.865265982147)*x[2]**o+(0.720153126392)*x[2]
-        arg[4,1,0]=(0.848146446583)*x[0]**o+(0.868166234685)*x[0]+(0.0477110054774)*x[1]**o+(-0.0338098833736)*x[1]+(-0.360024439914)*x[2]**o+(-0.634359083766)*x[2]
-        arg[4,1,1]=(-0.672530624126)*x[0]**o+(0.354170615043)*x[0]+(0.486028226561)*x[1]**o+(0.857532578327)*x[1]+(0.15798171243)*x[2]**o+(0.0579857791862)*x[2]
-        arg[5,0,0]=(0.653171799956)*x[0]**o+(0.605427034155)*x[0]+(0.7414424011)*x[1]**o+(-0.807505211605)*x[1]+(-0.0411776868808)*x[2]**o+(0.24301961063)*x[2]
-        arg[5,0,1]=(-0.336860102074)*x[0]**o+(0.235697646908)*x[0]+(-0.173217953629)*x[1]**o+(0.989643649714)*x[1]+(0.977460054831)*x[2]**o+(-0.743825027125)*x[2]
-        arg[5,1,0]=(0.794904875581)*x[0]**o+(0.607548574046)*x[0]+(0.603180304387)*x[1]**o+(0.276995429843)*x[1]+(0.698731315308)*x[2]**o+(-0.966744108727)*x[2]
-        arg[5,1,1]=(-0.0230004766002)*x[0]**o+(0.489585418104)*x[0]+(0.382764947116)*x[1]**o+(0.143873532935)*x[1]+(0.932000957196)*x[2]**o+(0.739975795806)*x[2]
-        ref[0,0,0]=(0.759590374826)*x_ref[0]**o+(-0.776182110267)*x_ref[0]+(0.713871101133)*x_ref[1]**o+(-0.0991655752543)*x_ref[1]+(0.339491998788)*x_ref[2]**o+(-0.624141085669)*x_ref[2]
-        ref[0,0,1]=(-0.948679111098)*x_ref[0]**o+(0.0918139408797)*x_ref[0]+(-0.519481784001)*x_ref[1]**o+(-0.480754367303)*x_ref[1]+(0.996421472879)*x_ref[2]**o+(-0.933032853651)*x_ref[2]
-        ref[0,1,0]=(-0.824750788431)*x_ref[0]**o+(0.846735099726)*x_ref[0]+(-0.436835905895)*x_ref[1]**o+(-0.732363323611)*x_ref[1]+(-0.865610972073)*x_ref[2]**o+(0.754759759319)*x_ref[2]
-        ref[0,1,1]=(-0.403783782613)*x_ref[0]**o+(0.918875237045)*x_ref[0]+(0.0934155750366)*x_ref[1]**o+(0.832477256884)*x_ref[1]+(0.615080190605)*x_ref[2]**o+(0.000920074523901)*x_ref[2]
-        ref[1,0,0]=(0.260531941775)*x_ref[0]**o+(-0.514647294043)*x_ref[0]+(0.237113978946)*x_ref[1]**o+(-0.116626766689)*x_ref[1]+(-0.670422853592)*x_ref[2]**o+(0.574941151693)*x_ref[2]
-        ref[1,0,1]=(-0.0133773984155)*x_ref[0]**o+(0.286273972547)*x_ref[0]+(0.0493985332233)*x_ref[1]**o+(-0.567835671454)*x_ref[1]+(0.508314781519)*x_ref[2]**o+(-0.603506084784)*x_ref[2]
-        ref[1,1,0]=(0.0237413792908)*x_ref[0]**o+(-0.758893281773)*x_ref[0]+(0.150670689461)*x_ref[1]**o+(0.136386516616)*x_ref[1]+(-0.440203817756)*x_ref[2]**o+(0.796610908529)*x_ref[2]
-        ref[1,1,1]=(-0.223549634917)*x_ref[0]**o+(0.396472946824)*x_ref[0]+(0.47830083818)*x_ref[1]**o+(0.059933592631)*x_ref[1]+(0.709371074379)*x_ref[2]**o+(-0.129442424949)*x_ref[2]
-        ref[2,0,0]=(0.686170679191)*x_ref[0]**o+(-0.118668021586)*x_ref[0]+(0.033954449978)*x_ref[1]**o+(-0.0508661210104)*x_ref[1]+(0.352824724076)*x_ref[2]**o+(-0.772874133692)*x_ref[2]
-        ref[2,0,1]=(0.434879772789)*x_ref[0]**o+(-0.148309931356)*x_ref[0]+(-0.013792688421)*x_ref[1]**o+(0.597899709109)*x_ref[1]+(-0.280336465565)*x_ref[2]**o+(-0.177134087728)*x_ref[2]
-        ref[2,1,0]=(-0.636844238715)*x_ref[0]**o+(-0.646269255495)*x_ref[0]+(0.243236542558)*x_ref[1]**o+(0.203480511801)*x_ref[1]+(0.693290035164)*x_ref[2]**o+(0.773354114662)*x_ref[2]
-        ref[2,1,1]=(-0.161998867128)*x_ref[0]**o+(0.193608078775)*x_ref[0]+(0.607954851405)*x_ref[1]**o+(0.648078354644)*x_ref[1]+(-0.488891750936)*x_ref[2]**o+(0.912860597431)*x_ref[2]
-        ref[3,0,0]=(-0.696909279028)*x_ref[0]**o+(0.039558795649)*x_ref[0]+(0.441121646773)*x_ref[1]**o+(-0.0681790925087)*x_ref[1]+(-0.792437910441)*x_ref[2]**o+(-0.512942395878)*x_ref[2]
-        ref[3,0,1]=(-0.264832490825)*x_ref[0]**o+(-0.955976365474)*x_ref[0]+(-0.884641387524)*x_ref[1]**o+(-0.736970630699)*x_ref[1]+(-0.0525378155791)*x_ref[2]**o+(0.149164361449)*x_ref[2]
-        ref[3,1,0]=(0.434888951175)*x_ref[0]**o+(-0.218511432369)*x_ref[0]+(0.564377624401)*x_ref[1]**o+(-0.0978716780106)*x_ref[1]+(0.447857191989)*x_ref[2]**o+(-0.466572586856)*x_ref[2]
-        ref[3,1,1]=(0.457689985738)*x_ref[0]**o+(0.00322996620178)*x_ref[0]+(0.307787601144)*x_ref[1]**o+(-0.119455639704)*x_ref[1]+(0.70367723461)*x_ref[2]**o+(0.561913096313)*x_ref[2]
-        ref[4,0,0]=(-0.759802700221)*x_ref[0]**o+(0.469649690329)*x_ref[0]+(0.0913972297116)*x_ref[1]**o+(0.310277900593)*x_ref[1]+(-0.590266889319)*x_ref[2]**o+(-0.89711266859)*x_ref[2]
-        ref[4,0,1]=(0.85506147544)*x_ref[0]**o+(-0.357476737069)*x_ref[0]+(-0.646898911915)*x_ref[1]**o+(-0.674811608049)*x_ref[1]+(0.865265982147)*x_ref[2]**o+(0.720153126392)*x_ref[2]
-        ref[4,1,0]=(0.848146446583)*x_ref[0]**o+(0.868166234685)*x_ref[0]+(0.0477110054774)*x_ref[1]**o+(-0.0338098833736)*x_ref[1]+(-0.360024439914)*x_ref[2]**o+(-0.634359083766)*x_ref[2]
-        ref[4,1,1]=(-0.672530624126)*x_ref[0]**o+(0.354170615043)*x_ref[0]+(0.486028226561)*x_ref[1]**o+(0.857532578327)*x_ref[1]+(0.15798171243)*x_ref[2]**o+(0.0579857791862)*x_ref[2]
-        ref[5,0,0]=(0.653171799956)*x_ref[0]**o+(0.605427034155)*x_ref[0]+(0.7414424011)*x_ref[1]**o+(-0.807505211605)*x_ref[1]+(-0.0411776868808)*x_ref[2]**o+(0.24301961063)*x_ref[2]
-        ref[5,0,1]=(-0.336860102074)*x_ref[0]**o+(0.235697646908)*x_ref[0]+(-0.173217953629)*x_ref[1]**o+(0.989643649714)*x_ref[1]+(0.977460054831)*x_ref[2]**o+(-0.743825027125)*x_ref[2]
-        ref[5,1,0]=(0.794904875581)*x_ref[0]**o+(0.607548574046)*x_ref[0]+(0.603180304387)*x_ref[1]**o+(0.276995429843)*x_ref[1]+(0.698731315308)*x_ref[2]**o+(-0.966744108727)*x_ref[2]
-        ref[5,1,1]=(-0.0230004766002)*x_ref[0]**o+(0.489585418104)*x_ref[0]+(0.382764947116)*x_ref[1]**o+(0.143873532935)*x_ref[1]+(0.932000957196)*x_ref[2]**o+(0.739975795806)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.922177773381)*x[0]**o+(0.37324175781)*x[0]+(-0.169208776011)*x[1]**o+(0.72134249236)*x[1]
-        arg[0,0,0,1]=(0.85312270129)*x[0]**o+(0.0512919651836)*x[0]+(0.968880249675)*x[1]**o+(0.740058819096)*x[1]
-        arg[0,0,1,0]=(-0.018205657901)*x[0]**o+(0.601838710779)*x[0]+(0.211002282731)*x[1]**o+(0.801382123792)*x[1]
-        arg[0,0,1,1]=(-0.249128714489)*x[0]**o+(-0.408809542089)*x[0]+(-0.684434920261)*x[1]**o+(0.223674849818)*x[1]
-        arg[0,0,2,0]=(0.396627551183)*x[0]**o+(-0.223592778052)*x[0]+(0.227333834259)*x[1]**o+(0.66580805616)*x[1]
-        arg[0,0,2,1]=(0.365216692731)*x[0]**o+(-0.670947594503)*x[0]+(0.400260365509)*x[1]**o+(0.10903299253)*x[1]
-        arg[0,1,0,0]=(0.823297765985)*x[0]**o+(0.60337946486)*x[0]+(-0.314265083693)*x[1]**o+(-0.00636816227929)*x[1]
-        arg[0,1,0,1]=(-0.26216625982)*x[0]**o+(0.767412606588)*x[0]+(-0.284917238441)*x[1]**o+(0.56385025143)*x[1]
-        arg[0,1,1,0]=(-0.732326448281)*x[0]**o+(-0.669197323856)*x[0]+(-0.608751752289)*x[1]**o+(-0.853458985188)*x[1]
-        arg[0,1,1,1]=(0.637275594334)*x[0]**o+(0.696570850488)*x[0]+(0.012026820657)*x[1]**o+(0.558317439186)*x[1]
-        arg[0,1,2,0]=(0.925899092402)*x[0]**o+(0.568045453255)*x[0]+(-0.766701931715)*x[1]**o+(-0.95082586036)*x[1]
-        arg[0,1,2,1]=(0.127524211574)*x[0]**o+(-0.65150542164)*x[0]+(-0.365773940068)*x[1]**o+(0.990465711754)*x[1]
-        arg[0,2,0,0]=(0.456469052217)*x[0]**o+(0.403391798397)*x[0]+(-0.21921915949)*x[1]**o+(0.171493695945)*x[1]
-        arg[0,2,0,1]=(-0.980242506743)*x[0]**o+(0.880225959645)*x[0]+(0.682653186307)*x[1]**o+(-0.561867916377)*x[1]
-        arg[0,2,1,0]=(-0.329881998938)*x[0]**o+(0.464976480407)*x[0]+(-0.812583693347)*x[1]**o+(0.0103356333568)*x[1]
-        arg[0,2,1,1]=(-0.710350374606)*x[0]**o+(-0.445981415127)*x[0]+(-0.159054554695)*x[1]**o+(-0.0306514318922)*x[1]
-        arg[0,2,2,0]=(0.0903142465124)*x[0]**o+(0.872680271888)*x[0]+(0.230242338668)*x[1]**o+(0.557126778217)*x[1]
-        arg[0,2,2,1]=(-0.842046475241)*x[0]**o+(0.350544067128)*x[0]+(0.486186516633)*x[1]**o+(-0.550801066658)*x[1]
-        arg[0,3,0,0]=(0.740313870334)*x[0]**o+(-0.177105021967)*x[0]+(0.00114640526837)*x[1]**o+(0.349602955151)*x[1]
-        arg[0,3,0,1]=(0.898906724506)*x[0]**o+(-0.882729119203)*x[0]+(0.000278645863091)*x[1]**o+(-0.450247260284)*x[1]
-        arg[0,3,1,0]=(0.411917691981)*x[0]**o+(0.0461900014479)*x[0]+(0.1608400364)*x[1]**o+(0.130550626888)*x[1]
-        arg[0,3,1,1]=(0.610378099059)*x[0]**o+(-0.903971943528)*x[0]+(-0.0170960427518)*x[1]**o+(0.765729630725)*x[1]
-        arg[0,3,2,0]=(-0.811421756909)*x[0]**o+(-0.220065414196)*x[0]+(0.529467921065)*x[1]**o+(0.13896086667)*x[1]
-        arg[0,3,2,1]=(-0.621021589728)*x[0]**o+(0.181903892108)*x[0]+(0.724296638902)*x[1]**o+(0.651705107858)*x[1]
-        arg[0,4,0,0]=(0.323254788695)*x[0]**o+(0.758728125147)*x[0]+(0.0719056895797)*x[1]**o+(-0.486299017994)*x[1]
-        arg[0,4,0,1]=(-0.426525215977)*x[0]**o+(-0.70344592953)*x[0]+(-0.467799544116)*x[1]**o+(0.0394017649712)*x[1]
-        arg[0,4,1,0]=(-0.559984242808)*x[0]**o+(-0.963639424043)*x[0]+(0.884232194806)*x[1]**o+(0.948111505594)*x[1]
-        arg[0,4,1,1]=(-0.825627656302)*x[0]**o+(0.167871540452)*x[0]+(0.0969950885663)*x[1]**o+(-0.477024385485)*x[1]
-        arg[0,4,2,0]=(-0.890191205005)*x[0]**o+(-0.291891624031)*x[0]+(-0.924812934321)*x[1]**o+(-0.898567598264)*x[1]
-        arg[0,4,2,1]=(0.0552241756422)*x[0]**o+(-0.47878688784)*x[0]+(-0.208893161197)*x[1]**o+(-0.671733441515)*x[1]
-        arg[1,0,0,0]=(0.609961055126)*x[0]**o+(0.389225845794)*x[0]+(0.147977819654)*x[1]**o+(-0.75096024248)*x[1]
-        arg[1,0,0,1]=(-0.407376527411)*x[0]**o+(-0.696660373977)*x[0]+(-0.803862178008)*x[1]**o+(-0.367087112506)*x[1]
-        arg[1,0,1,0]=(0.89146134332)*x[0]**o+(0.388607608477)*x[0]+(0.763190367241)*x[1]**o+(0.169275499463)*x[1]
-        arg[1,0,1,1]=(-0.870871474063)*x[0]**o+(-0.21526798243)*x[0]+(0.159168404985)*x[1]**o+(0.715049896538)*x[1]
-        arg[1,0,2,0]=(-0.842978554795)*x[0]**o+(0.209649486001)*x[0]+(-0.767629750054)*x[1]**o+(-0.126634026874)*x[1]
-        arg[1,0,2,1]=(-0.728571756044)*x[0]**o+(-0.247852313042)*x[0]+(0.818809803616)*x[1]**o+(0.736163163331)*x[1]
-        arg[1,1,0,0]=(-0.670608139072)*x[0]**o+(0.330167259903)*x[0]+(0.275974484086)*x[1]**o+(0.492110644529)*x[1]
-        arg[1,1,0,1]=(0.724664287226)*x[0]**o+(0.738855592065)*x[0]+(0.511369798951)*x[1]**o+(0.455794112842)*x[1]
-        arg[1,1,1,0]=(0.783504599076)*x[0]**o+(-0.558579246854)*x[0]+(0.608044912637)*x[1]**o+(-0.401058633268)*x[1]
-        arg[1,1,1,1]=(0.406697861117)*x[0]**o+(-0.31302718156)*x[0]+(-0.999553049864)*x[1]**o+(0.647698243869)*x[1]
-        arg[1,1,2,0]=(-0.788346252365)*x[0]**o+(-0.809895265253)*x[0]+(0.441738551485)*x[1]**o+(-0.686785865679)*x[1]
-        arg[1,1,2,1]=(0.794571346519)*x[0]**o+(-0.552071697712)*x[0]+(0.77260218173)*x[1]**o+(-0.969584549528)*x[1]
-        arg[1,2,0,0]=(-0.867948229325)*x[0]**o+(-0.582387320474)*x[0]+(0.0387726756335)*x[1]**o+(0.4143770831)*x[1]
-        arg[1,2,0,1]=(-0.913557875303)*x[0]**o+(-0.517970834439)*x[0]+(-0.922517499063)*x[1]**o+(0.858552054359)*x[1]
-        arg[1,2,1,0]=(0.409302016181)*x[0]**o+(-0.684529177441)*x[0]+(0.818122023218)*x[1]**o+(-0.583589419623)*x[1]
-        arg[1,2,1,1]=(0.750795883056)*x[0]**o+(-0.710882726624)*x[0]+(0.915210035315)*x[1]**o+(0.802588664027)*x[1]
-        arg[1,2,2,0]=(0.639216566804)*x[0]**o+(-0.300954214125)*x[0]+(-0.26724393342)*x[1]**o+(0.426742851293)*x[1]
-        arg[1,2,2,1]=(-0.00337538020121)*x[0]**o+(0.283012169215)*x[0]+(0.725040731001)*x[1]**o+(-0.708238265029)*x[1]
-        arg[1,3,0,0]=(0.217404922432)*x[0]**o+(-0.590883003502)*x[0]+(0.451142849723)*x[1]**o+(0.624698767392)*x[1]
-        arg[1,3,0,1]=(0.0351258739828)*x[0]**o+(-0.784068492686)*x[0]+(0.469956184167)*x[1]**o+(0.634124784387)*x[1]
-        arg[1,3,1,0]=(0.998414775431)*x[0]**o+(0.388202946918)*x[0]+(-0.849223443255)*x[1]**o+(-0.804590028218)*x[1]
-        arg[1,3,1,1]=(0.0219748851856)*x[0]**o+(0.464069403336)*x[0]+(-0.470759541095)*x[1]**o+(-0.21773573235)*x[1]
-        arg[1,3,2,0]=(-0.879175905661)*x[0]**o+(0.100238280861)*x[0]+(0.331472085056)*x[1]**o+(0.0310947651268)*x[1]
-        arg[1,3,2,1]=(-0.195155740038)*x[0]**o+(0.532078676231)*x[0]+(-0.863288082011)*x[1]**o+(-0.0905878788265)*x[1]
-        arg[1,4,0,0]=(0.470883637487)*x[0]**o+(0.0291028245963)*x[0]+(-0.152462235474)*x[1]**o+(0.890883963301)*x[1]
-        arg[1,4,0,1]=(-0.0780797534409)*x[0]**o+(-0.999649003413)*x[0]+(-0.79446765004)*x[1]**o+(-0.820520881428)*x[1]
-        arg[1,4,1,0]=(-0.82479629638)*x[0]**o+(-0.28924829922)*x[0]+(-0.960430867949)*x[1]**o+(-0.514730558673)*x[1]
-        arg[1,4,1,1]=(-0.0853911110391)*x[0]**o+(0.726747270178)*x[0]+(-0.70925711586)*x[1]**o+(-0.331433386035)*x[1]
-        arg[1,4,2,0]=(-0.434350343402)*x[0]**o+(0.335341284415)*x[0]+(0.496818240476)*x[1]**o+(-0.925006191184)*x[1]
-        arg[1,4,2,1]=(0.0753516047957)*x[0]**o+(0.171090641529)*x[0]+(-0.836002762987)*x[1]**o+(-0.753836171615)*x[1]
-        arg[2,0,0,0]=(-0.331008073553)*x[0]**o+(-0.299051880715)*x[0]+(-0.84520124413)*x[1]**o+(0.780471473975)*x[1]
-        arg[2,0,0,1]=(-0.947973851318)*x[0]**o+(0.579142212501)*x[0]+(0.137317760268)*x[1]**o+(-0.379509530229)*x[1]
-        arg[2,0,1,0]=(-0.741320730287)*x[0]**o+(0.642110710824)*x[0]+(-0.632595944259)*x[1]**o+(0.944980046528)*x[1]
-        arg[2,0,1,1]=(0.616943682269)*x[0]**o+(-0.348189507611)*x[0]+(-0.414080070092)*x[1]**o+(-0.733041081362)*x[1]
-        arg[2,0,2,0]=(-0.021261659709)*x[0]**o+(0.790041129031)*x[0]+(0.788378634137)*x[1]**o+(0.391057560074)*x[1]
-        arg[2,0,2,1]=(0.563737321295)*x[0]**o+(-0.110516278477)*x[0]+(0.383563652425)*x[1]**o+(-0.857100387101)*x[1]
-        arg[2,1,0,0]=(-0.0839346911978)*x[0]**o+(0.699255867073)*x[0]+(-0.698488781835)*x[1]**o+(0.225940657322)*x[1]
-        arg[2,1,0,1]=(0.93638601214)*x[0]**o+(-0.593516691147)*x[0]+(-0.445863239521)*x[1]**o+(0.601067357746)*x[1]
-        arg[2,1,1,0]=(0.114814804735)*x[0]**o+(0.717600499991)*x[0]+(0.7371911818)*x[1]**o+(0.136012416552)*x[1]
-        arg[2,1,1,1]=(0.794499830148)*x[0]**o+(0.0581947415855)*x[0]+(0.626382859976)*x[1]**o+(-0.668272098674)*x[1]
-        arg[2,1,2,0]=(0.564628771073)*x[0]**o+(0.102820241267)*x[0]+(0.397960234363)*x[1]**o+(0.379632827896)*x[1]
-        arg[2,1,2,1]=(-0.0880639775913)*x[0]**o+(0.325978376801)*x[0]+(-0.505498229733)*x[1]**o+(-0.595922646655)*x[1]
-        arg[2,2,0,0]=(-0.132672737928)*x[0]**o+(-0.0291240195523)*x[0]+(-0.00825944211706)*x[1]**o+(0.985993963145)*x[1]
-        arg[2,2,0,1]=(0.244321497515)*x[0]**o+(-0.111329005236)*x[0]+(0.769353471123)*x[1]**o+(-0.174257027136)*x[1]
-        arg[2,2,1,0]=(0.252286330282)*x[0]**o+(0.450975615825)*x[0]+(-0.515016578606)*x[1]**o+(0.834736757555)*x[1]
-        arg[2,2,1,1]=(0.0588273338962)*x[0]**o+(-0.865406338788)*x[0]+(0.482095645149)*x[1]**o+(-0.595126490156)*x[1]
-        arg[2,2,2,0]=(0.244580063555)*x[0]**o+(0.576709884892)*x[0]+(-0.212616562122)*x[1]**o+(-0.407508050723)*x[1]
-        arg[2,2,2,1]=(0.416825783755)*x[0]**o+(0.430959078988)*x[0]+(-0.398840301481)*x[1]**o+(0.889105964295)*x[1]
-        arg[2,3,0,0]=(-0.731872136283)*x[0]**o+(0.237034931745)*x[0]+(0.547737117698)*x[1]**o+(0.364733861661)*x[1]
-        arg[2,3,0,1]=(0.971716549689)*x[0]**o+(0.466300970081)*x[0]+(-0.51802162747)*x[1]**o+(-0.859910778018)*x[1]
-        arg[2,3,1,0]=(-0.562918219893)*x[0]**o+(-0.0532549959391)*x[0]+(0.842033495359)*x[1]**o+(-0.708554283815)*x[1]
-        arg[2,3,1,1]=(0.437125534104)*x[0]**o+(-0.376751615116)*x[0]+(-0.330889383623)*x[1]**o+(0.958884035289)*x[1]
-        arg[2,3,2,0]=(-0.194290501566)*x[0]**o+(-0.368131904292)*x[0]+(0.802917650409)*x[1]**o+(0.628603987906)*x[1]
-        arg[2,3,2,1]=(0.70219875881)*x[0]**o+(0.822181339005)*x[0]+(0.768635447234)*x[1]**o+(0.871676010439)*x[1]
-        arg[2,4,0,0]=(-0.654498700662)*x[0]**o+(0.851143676147)*x[0]+(0.468468395415)*x[1]**o+(-0.447240713576)*x[1]
-        arg[2,4,0,1]=(0.893177052112)*x[0]**o+(0.652743480988)*x[0]+(0.726646163682)*x[1]**o+(-0.854895731892)*x[1]
-        arg[2,4,1,0]=(0.0540542301334)*x[0]**o+(-0.208654443984)*x[0]+(0.925127576853)*x[1]**o+(-0.932489814868)*x[1]
-        arg[2,4,1,1]=(-0.460268214104)*x[0]**o+(-0.303569308977)*x[0]+(-0.381458880316)*x[1]**o+(0.690537661673)*x[1]
-        arg[2,4,2,0]=(0.401012366366)*x[0]**o+(-0.970993441679)*x[0]+(0.0249535421254)*x[1]**o+(-0.499737254014)*x[1]
-        arg[2,4,2,1]=(-0.692604790859)*x[0]**o+(-0.685292098725)*x[0]+(0.22550357354)*x[1]**o+(0.908152783462)*x[1]
-        arg[3,0,0,0]=(-0.634246407254)*x[0]**o+(-0.571223033336)*x[0]+(0.0574319920181)*x[1]**o+(0.123763929908)*x[1]
-        arg[3,0,0,1]=(-0.569358219213)*x[0]**o+(-0.107237509632)*x[0]+(0.97672999497)*x[1]**o+(-0.114939366813)*x[1]
-        arg[3,0,1,0]=(-0.767885152479)*x[0]**o+(-0.105924102555)*x[0]+(0.539361607398)*x[1]**o+(0.546186446469)*x[1]
-        arg[3,0,1,1]=(-0.58818696897)*x[0]**o+(0.629371516566)*x[0]+(-0.598173904376)*x[1]**o+(0.959043112088)*x[1]
-        arg[3,0,2,0]=(0.751165393927)*x[0]**o+(0.732151619397)*x[0]+(-0.435276735735)*x[1]**o+(0.947142140722)*x[1]
-        arg[3,0,2,1]=(0.463904349547)*x[0]**o+(-0.947270841014)*x[0]+(0.304239969784)*x[1]**o+(-0.233566944292)*x[1]
-        arg[3,1,0,0]=(0.961122232395)*x[0]**o+(-0.989040215156)*x[0]+(0.833186746232)*x[1]**o+(0.226673105305)*x[1]
-        arg[3,1,0,1]=(-0.156957616578)*x[0]**o+(-0.361665587314)*x[0]+(0.987490273947)*x[1]**o+(-0.890271058746)*x[1]
-        arg[3,1,1,0]=(-0.259959222953)*x[0]**o+(-0.696135598749)*x[0]+(0.234411151165)*x[1]**o+(0.783105897256)*x[1]
-        arg[3,1,1,1]=(0.020886322199)*x[0]**o+(0.887445555864)*x[0]+(0.709489180254)*x[1]**o+(0.990590112507)*x[1]
-        arg[3,1,2,0]=(-0.963790247866)*x[0]**o+(-0.417180971158)*x[0]+(0.303859261646)*x[1]**o+(0.745552024399)*x[1]
-        arg[3,1,2,1]=(-0.364448135641)*x[0]**o+(0.760841571414)*x[0]+(-0.0283374186763)*x[1]**o+(-0.491433855748)*x[1]
-        arg[3,2,0,0]=(-0.649766142291)*x[0]**o+(-0.177410238297)*x[0]+(0.137316641289)*x[1]**o+(-0.40890299152)*x[1]
-        arg[3,2,0,1]=(0.282922984657)*x[0]**o+(-0.660238152943)*x[0]+(0.481726052488)*x[1]**o+(0.976011254218)*x[1]
-        arg[3,2,1,0]=(0.989761520473)*x[0]**o+(0.194082255647)*x[0]+(-0.648435682551)*x[1]**o+(-0.721569599311)*x[1]
-        arg[3,2,1,1]=(0.734634540883)*x[0]**o+(0.524638529049)*x[0]+(-0.737636791717)*x[1]**o+(-0.995904525822)*x[1]
-        arg[3,2,2,0]=(0.422396808663)*x[0]**o+(-0.820639154105)*x[0]+(-0.566207315373)*x[1]**o+(-0.224174711984)*x[1]
-        arg[3,2,2,1]=(0.719145374997)*x[0]**o+(-0.885860499468)*x[0]+(0.184062878609)*x[1]**o+(0.47660543007)*x[1]
-        arg[3,3,0,0]=(-0.0122290849915)*x[0]**o+(-0.0314298339876)*x[0]+(0.937255407134)*x[1]**o+(-0.754858547072)*x[1]
-        arg[3,3,0,1]=(-0.507826956669)*x[0]**o+(0.951205020689)*x[0]+(0.837096245109)*x[1]**o+(-0.576692399518)*x[1]
-        arg[3,3,1,0]=(0.602119808238)*x[0]**o+(-0.943937134298)*x[0]+(-0.244250254626)*x[1]**o+(-0.814103542727)*x[1]
-        arg[3,3,1,1]=(-0.51811661822)*x[0]**o+(-0.188969078762)*x[0]+(-0.697470816837)*x[1]**o+(-0.741593014841)*x[1]
-        arg[3,3,2,0]=(-0.673948933786)*x[0]**o+(0.816404336566)*x[0]+(0.339239090092)*x[1]**o+(-0.0173550947113)*x[1]
-        arg[3,3,2,1]=(0.499109852716)*x[0]**o+(0.515501552893)*x[0]+(0.926442939974)*x[1]**o+(0.157227173254)*x[1]
-        arg[3,4,0,0]=(-0.1837389273)*x[0]**o+(0.78490229721)*x[0]+(-0.248033788374)*x[1]**o+(0.735136386405)*x[1]
-        arg[3,4,0,1]=(0.121169550194)*x[0]**o+(-0.854027732077)*x[0]+(0.937680848475)*x[1]**o+(-0.447184197264)*x[1]
-        arg[3,4,1,0]=(-0.788610934694)*x[0]**o+(-0.397825388144)*x[0]+(0.604421361449)*x[1]**o+(0.937184552821)*x[1]
-        arg[3,4,1,1]=(-0.493380143496)*x[0]**o+(0.958197000398)*x[0]+(0.282372561751)*x[1]**o+(-0.55322669826)*x[1]
-        arg[3,4,2,0]=(0.11333865923)*x[0]**o+(-0.542805511569)*x[0]+(-0.640646701928)*x[1]**o+(-0.342030716597)*x[1]
-        arg[3,4,2,1]=(0.505356266297)*x[0]**o+(-0.107422782294)*x[0]+(0.542833447968)*x[1]**o+(-0.615275716592)*x[1]
-        ref[0,0,0,0]=(0.922177773381)*x_ref[0]**o+(0.37324175781)*x_ref[0]+(-0.169208776011)*x_ref[1]**o+(0.72134249236)*x_ref[1]
-        ref[0,0,0,1]=(0.85312270129)*x_ref[0]**o+(0.0512919651836)*x_ref[0]+(0.968880249675)*x_ref[1]**o+(0.740058819096)*x_ref[1]
-        ref[0,0,1,0]=(-0.018205657901)*x_ref[0]**o+(0.601838710779)*x_ref[0]+(0.211002282731)*x_ref[1]**o+(0.801382123792)*x_ref[1]
-        ref[0,0,1,1]=(-0.249128714489)*x_ref[0]**o+(-0.408809542089)*x_ref[0]+(-0.684434920261)*x_ref[1]**o+(0.223674849818)*x_ref[1]
-        ref[0,0,2,0]=(0.396627551183)*x_ref[0]**o+(-0.223592778052)*x_ref[0]+(0.227333834259)*x_ref[1]**o+(0.66580805616)*x_ref[1]
-        ref[0,0,2,1]=(0.365216692731)*x_ref[0]**o+(-0.670947594503)*x_ref[0]+(0.400260365509)*x_ref[1]**o+(0.10903299253)*x_ref[1]
-        ref[0,1,0,0]=(0.823297765985)*x_ref[0]**o+(0.60337946486)*x_ref[0]+(-0.314265083693)*x_ref[1]**o+(-0.00636816227929)*x_ref[1]
-        ref[0,1,0,1]=(-0.26216625982)*x_ref[0]**o+(0.767412606588)*x_ref[0]+(-0.284917238441)*x_ref[1]**o+(0.56385025143)*x_ref[1]
-        ref[0,1,1,0]=(-0.732326448281)*x_ref[0]**o+(-0.669197323856)*x_ref[0]+(-0.608751752289)*x_ref[1]**o+(-0.853458985188)*x_ref[1]
-        ref[0,1,1,1]=(0.637275594334)*x_ref[0]**o+(0.696570850488)*x_ref[0]+(0.012026820657)*x_ref[1]**o+(0.558317439186)*x_ref[1]
-        ref[0,1,2,0]=(0.925899092402)*x_ref[0]**o+(0.568045453255)*x_ref[0]+(-0.766701931715)*x_ref[1]**o+(-0.95082586036)*x_ref[1]
-        ref[0,1,2,1]=(0.127524211574)*x_ref[0]**o+(-0.65150542164)*x_ref[0]+(-0.365773940068)*x_ref[1]**o+(0.990465711754)*x_ref[1]
-        ref[0,2,0,0]=(0.456469052217)*x_ref[0]**o+(0.403391798397)*x_ref[0]+(-0.21921915949)*x_ref[1]**o+(0.171493695945)*x_ref[1]
-        ref[0,2,0,1]=(-0.980242506743)*x_ref[0]**o+(0.880225959645)*x_ref[0]+(0.682653186307)*x_ref[1]**o+(-0.561867916377)*x_ref[1]
-        ref[0,2,1,0]=(-0.329881998938)*x_ref[0]**o+(0.464976480407)*x_ref[0]+(-0.812583693347)*x_ref[1]**o+(0.0103356333568)*x_ref[1]
-        ref[0,2,1,1]=(-0.710350374606)*x_ref[0]**o+(-0.445981415127)*x_ref[0]+(-0.159054554695)*x_ref[1]**o+(-0.0306514318922)*x_ref[1]
-        ref[0,2,2,0]=(0.0903142465124)*x_ref[0]**o+(0.872680271888)*x_ref[0]+(0.230242338668)*x_ref[1]**o+(0.557126778217)*x_ref[1]
-        ref[0,2,2,1]=(-0.842046475241)*x_ref[0]**o+(0.350544067128)*x_ref[0]+(0.486186516633)*x_ref[1]**o+(-0.550801066658)*x_ref[1]
-        ref[0,3,0,0]=(0.740313870334)*x_ref[0]**o+(-0.177105021967)*x_ref[0]+(0.00114640526837)*x_ref[1]**o+(0.349602955151)*x_ref[1]
-        ref[0,3,0,1]=(0.898906724506)*x_ref[0]**o+(-0.882729119203)*x_ref[0]+(0.000278645863091)*x_ref[1]**o+(-0.450247260284)*x_ref[1]
-        ref[0,3,1,0]=(0.411917691981)*x_ref[0]**o+(0.0461900014479)*x_ref[0]+(0.1608400364)*x_ref[1]**o+(0.130550626888)*x_ref[1]
-        ref[0,3,1,1]=(0.610378099059)*x_ref[0]**o+(-0.903971943528)*x_ref[0]+(-0.0170960427518)*x_ref[1]**o+(0.765729630725)*x_ref[1]
-        ref[0,3,2,0]=(-0.811421756909)*x_ref[0]**o+(-0.220065414196)*x_ref[0]+(0.529467921065)*x_ref[1]**o+(0.13896086667)*x_ref[1]
-        ref[0,3,2,1]=(-0.621021589728)*x_ref[0]**o+(0.181903892108)*x_ref[0]+(0.724296638902)*x_ref[1]**o+(0.651705107858)*x_ref[1]
-        ref[0,4,0,0]=(0.323254788695)*x_ref[0]**o+(0.758728125147)*x_ref[0]+(0.0719056895797)*x_ref[1]**o+(-0.486299017994)*x_ref[1]
-        ref[0,4,0,1]=(-0.426525215977)*x_ref[0]**o+(-0.70344592953)*x_ref[0]+(-0.467799544116)*x_ref[1]**o+(0.0394017649712)*x_ref[1]
-        ref[0,4,1,0]=(-0.559984242808)*x_ref[0]**o+(-0.963639424043)*x_ref[0]+(0.884232194806)*x_ref[1]**o+(0.948111505594)*x_ref[1]
-        ref[0,4,1,1]=(-0.825627656302)*x_ref[0]**o+(0.167871540452)*x_ref[0]+(0.0969950885663)*x_ref[1]**o+(-0.477024385485)*x_ref[1]
-        ref[0,4,2,0]=(-0.890191205005)*x_ref[0]**o+(-0.291891624031)*x_ref[0]+(-0.924812934321)*x_ref[1]**o+(-0.898567598264)*x_ref[1]
-        ref[0,4,2,1]=(0.0552241756422)*x_ref[0]**o+(-0.47878688784)*x_ref[0]+(-0.208893161197)*x_ref[1]**o+(-0.671733441515)*x_ref[1]
-        ref[1,0,0,0]=(0.609961055126)*x_ref[0]**o+(0.389225845794)*x_ref[0]+(0.147977819654)*x_ref[1]**o+(-0.75096024248)*x_ref[1]
-        ref[1,0,0,1]=(-0.407376527411)*x_ref[0]**o+(-0.696660373977)*x_ref[0]+(-0.803862178008)*x_ref[1]**o+(-0.367087112506)*x_ref[1]
-        ref[1,0,1,0]=(0.89146134332)*x_ref[0]**o+(0.388607608477)*x_ref[0]+(0.763190367241)*x_ref[1]**o+(0.169275499463)*x_ref[1]
-        ref[1,0,1,1]=(-0.870871474063)*x_ref[0]**o+(-0.21526798243)*x_ref[0]+(0.159168404985)*x_ref[1]**o+(0.715049896538)*x_ref[1]
-        ref[1,0,2,0]=(-0.842978554795)*x_ref[0]**o+(0.209649486001)*x_ref[0]+(-0.767629750054)*x_ref[1]**o+(-0.126634026874)*x_ref[1]
-        ref[1,0,2,1]=(-0.728571756044)*x_ref[0]**o+(-0.247852313042)*x_ref[0]+(0.818809803616)*x_ref[1]**o+(0.736163163331)*x_ref[1]
-        ref[1,1,0,0]=(-0.670608139072)*x_ref[0]**o+(0.330167259903)*x_ref[0]+(0.275974484086)*x_ref[1]**o+(0.492110644529)*x_ref[1]
-        ref[1,1,0,1]=(0.724664287226)*x_ref[0]**o+(0.738855592065)*x_ref[0]+(0.511369798951)*x_ref[1]**o+(0.455794112842)*x_ref[1]
-        ref[1,1,1,0]=(0.783504599076)*x_ref[0]**o+(-0.558579246854)*x_ref[0]+(0.608044912637)*x_ref[1]**o+(-0.401058633268)*x_ref[1]
-        ref[1,1,1,1]=(0.406697861117)*x_ref[0]**o+(-0.31302718156)*x_ref[0]+(-0.999553049864)*x_ref[1]**o+(0.647698243869)*x_ref[1]
-        ref[1,1,2,0]=(-0.788346252365)*x_ref[0]**o+(-0.809895265253)*x_ref[0]+(0.441738551485)*x_ref[1]**o+(-0.686785865679)*x_ref[1]
-        ref[1,1,2,1]=(0.794571346519)*x_ref[0]**o+(-0.552071697712)*x_ref[0]+(0.77260218173)*x_ref[1]**o+(-0.969584549528)*x_ref[1]
-        ref[1,2,0,0]=(-0.867948229325)*x_ref[0]**o+(-0.582387320474)*x_ref[0]+(0.0387726756335)*x_ref[1]**o+(0.4143770831)*x_ref[1]
-        ref[1,2,0,1]=(-0.913557875303)*x_ref[0]**o+(-0.517970834439)*x_ref[0]+(-0.922517499063)*x_ref[1]**o+(0.858552054359)*x_ref[1]
-        ref[1,2,1,0]=(0.409302016181)*x_ref[0]**o+(-0.684529177441)*x_ref[0]+(0.818122023218)*x_ref[1]**o+(-0.583589419623)*x_ref[1]
-        ref[1,2,1,1]=(0.750795883056)*x_ref[0]**o+(-0.710882726624)*x_ref[0]+(0.915210035315)*x_ref[1]**o+(0.802588664027)*x_ref[1]
-        ref[1,2,2,0]=(0.639216566804)*x_ref[0]**o+(-0.300954214125)*x_ref[0]+(-0.26724393342)*x_ref[1]**o+(0.426742851293)*x_ref[1]
-        ref[1,2,2,1]=(-0.00337538020121)*x_ref[0]**o+(0.283012169215)*x_ref[0]+(0.725040731001)*x_ref[1]**o+(-0.708238265029)*x_ref[1]
-        ref[1,3,0,0]=(0.217404922432)*x_ref[0]**o+(-0.590883003502)*x_ref[0]+(0.451142849723)*x_ref[1]**o+(0.624698767392)*x_ref[1]
-        ref[1,3,0,1]=(0.0351258739828)*x_ref[0]**o+(-0.784068492686)*x_ref[0]+(0.469956184167)*x_ref[1]**o+(0.634124784387)*x_ref[1]
-        ref[1,3,1,0]=(0.998414775431)*x_ref[0]**o+(0.388202946918)*x_ref[0]+(-0.849223443255)*x_ref[1]**o+(-0.804590028218)*x_ref[1]
-        ref[1,3,1,1]=(0.0219748851856)*x_ref[0]**o+(0.464069403336)*x_ref[0]+(-0.470759541095)*x_ref[1]**o+(-0.21773573235)*x_ref[1]
-        ref[1,3,2,0]=(-0.879175905661)*x_ref[0]**o+(0.100238280861)*x_ref[0]+(0.331472085056)*x_ref[1]**o+(0.0310947651268)*x_ref[1]
-        ref[1,3,2,1]=(-0.195155740038)*x_ref[0]**o+(0.532078676231)*x_ref[0]+(-0.863288082011)*x_ref[1]**o+(-0.0905878788265)*x_ref[1]
-        ref[1,4,0,0]=(0.470883637487)*x_ref[0]**o+(0.0291028245963)*x_ref[0]+(-0.152462235474)*x_ref[1]**o+(0.890883963301)*x_ref[1]
-        ref[1,4,0,1]=(-0.0780797534409)*x_ref[0]**o+(-0.999649003413)*x_ref[0]+(-0.79446765004)*x_ref[1]**o+(-0.820520881428)*x_ref[1]
-        ref[1,4,1,0]=(-0.82479629638)*x_ref[0]**o+(-0.28924829922)*x_ref[0]+(-0.960430867949)*x_ref[1]**o+(-0.514730558673)*x_ref[1]
-        ref[1,4,1,1]=(-0.0853911110391)*x_ref[0]**o+(0.726747270178)*x_ref[0]+(-0.70925711586)*x_ref[1]**o+(-0.331433386035)*x_ref[1]
-        ref[1,4,2,0]=(-0.434350343402)*x_ref[0]**o+(0.335341284415)*x_ref[0]+(0.496818240476)*x_ref[1]**o+(-0.925006191184)*x_ref[1]
-        ref[1,4,2,1]=(0.0753516047957)*x_ref[0]**o+(0.171090641529)*x_ref[0]+(-0.836002762987)*x_ref[1]**o+(-0.753836171615)*x_ref[1]
-        ref[2,0,0,0]=(-0.331008073553)*x_ref[0]**o+(-0.299051880715)*x_ref[0]+(-0.84520124413)*x_ref[1]**o+(0.780471473975)*x_ref[1]
-        ref[2,0,0,1]=(-0.947973851318)*x_ref[0]**o+(0.579142212501)*x_ref[0]+(0.137317760268)*x_ref[1]**o+(-0.379509530229)*x_ref[1]
-        ref[2,0,1,0]=(-0.741320730287)*x_ref[0]**o+(0.642110710824)*x_ref[0]+(-0.632595944259)*x_ref[1]**o+(0.944980046528)*x_ref[1]
-        ref[2,0,1,1]=(0.616943682269)*x_ref[0]**o+(-0.348189507611)*x_ref[0]+(-0.414080070092)*x_ref[1]**o+(-0.733041081362)*x_ref[1]
-        ref[2,0,2,0]=(-0.021261659709)*x_ref[0]**o+(0.790041129031)*x_ref[0]+(0.788378634137)*x_ref[1]**o+(0.391057560074)*x_ref[1]
-        ref[2,0,2,1]=(0.563737321295)*x_ref[0]**o+(-0.110516278477)*x_ref[0]+(0.383563652425)*x_ref[1]**o+(-0.857100387101)*x_ref[1]
-        ref[2,1,0,0]=(-0.0839346911978)*x_ref[0]**o+(0.699255867073)*x_ref[0]+(-0.698488781835)*x_ref[1]**o+(0.225940657322)*x_ref[1]
-        ref[2,1,0,1]=(0.93638601214)*x_ref[0]**o+(-0.593516691147)*x_ref[0]+(-0.445863239521)*x_ref[1]**o+(0.601067357746)*x_ref[1]
-        ref[2,1,1,0]=(0.114814804735)*x_ref[0]**o+(0.717600499991)*x_ref[0]+(0.7371911818)*x_ref[1]**o+(0.136012416552)*x_ref[1]
-        ref[2,1,1,1]=(0.794499830148)*x_ref[0]**o+(0.0581947415855)*x_ref[0]+(0.626382859976)*x_ref[1]**o+(-0.668272098674)*x_ref[1]
-        ref[2,1,2,0]=(0.564628771073)*x_ref[0]**o+(0.102820241267)*x_ref[0]+(0.397960234363)*x_ref[1]**o+(0.379632827896)*x_ref[1]
-        ref[2,1,2,1]=(-0.0880639775913)*x_ref[0]**o+(0.325978376801)*x_ref[0]+(-0.505498229733)*x_ref[1]**o+(-0.595922646655)*x_ref[1]
-        ref[2,2,0,0]=(-0.132672737928)*x_ref[0]**o+(-0.0291240195523)*x_ref[0]+(-0.00825944211706)*x_ref[1]**o+(0.985993963145)*x_ref[1]
-        ref[2,2,0,1]=(0.244321497515)*x_ref[0]**o+(-0.111329005236)*x_ref[0]+(0.769353471123)*x_ref[1]**o+(-0.174257027136)*x_ref[1]
-        ref[2,2,1,0]=(0.252286330282)*x_ref[0]**o+(0.450975615825)*x_ref[0]+(-0.515016578606)*x_ref[1]**o+(0.834736757555)*x_ref[1]
-        ref[2,2,1,1]=(0.0588273338962)*x_ref[0]**o+(-0.865406338788)*x_ref[0]+(0.482095645149)*x_ref[1]**o+(-0.595126490156)*x_ref[1]
-        ref[2,2,2,0]=(0.244580063555)*x_ref[0]**o+(0.576709884892)*x_ref[0]+(-0.212616562122)*x_ref[1]**o+(-0.407508050723)*x_ref[1]
-        ref[2,2,2,1]=(0.416825783755)*x_ref[0]**o+(0.430959078988)*x_ref[0]+(-0.398840301481)*x_ref[1]**o+(0.889105964295)*x_ref[1]
-        ref[2,3,0,0]=(-0.731872136283)*x_ref[0]**o+(0.237034931745)*x_ref[0]+(0.547737117698)*x_ref[1]**o+(0.364733861661)*x_ref[1]
-        ref[2,3,0,1]=(0.971716549689)*x_ref[0]**o+(0.466300970081)*x_ref[0]+(-0.51802162747)*x_ref[1]**o+(-0.859910778018)*x_ref[1]
-        ref[2,3,1,0]=(-0.562918219893)*x_ref[0]**o+(-0.0532549959391)*x_ref[0]+(0.842033495359)*x_ref[1]**o+(-0.708554283815)*x_ref[1]
-        ref[2,3,1,1]=(0.437125534104)*x_ref[0]**o+(-0.376751615116)*x_ref[0]+(-0.330889383623)*x_ref[1]**o+(0.958884035289)*x_ref[1]
-        ref[2,3,2,0]=(-0.194290501566)*x_ref[0]**o+(-0.368131904292)*x_ref[0]+(0.802917650409)*x_ref[1]**o+(0.628603987906)*x_ref[1]
-        ref[2,3,2,1]=(0.70219875881)*x_ref[0]**o+(0.822181339005)*x_ref[0]+(0.768635447234)*x_ref[1]**o+(0.871676010439)*x_ref[1]
-        ref[2,4,0,0]=(-0.654498700662)*x_ref[0]**o+(0.851143676147)*x_ref[0]+(0.468468395415)*x_ref[1]**o+(-0.447240713576)*x_ref[1]
-        ref[2,4,0,1]=(0.893177052112)*x_ref[0]**o+(0.652743480988)*x_ref[0]+(0.726646163682)*x_ref[1]**o+(-0.854895731892)*x_ref[1]
-        ref[2,4,1,0]=(0.0540542301334)*x_ref[0]**o+(-0.208654443984)*x_ref[0]+(0.925127576853)*x_ref[1]**o+(-0.932489814868)*x_ref[1]
-        ref[2,4,1,1]=(-0.460268214104)*x_ref[0]**o+(-0.303569308977)*x_ref[0]+(-0.381458880316)*x_ref[1]**o+(0.690537661673)*x_ref[1]
-        ref[2,4,2,0]=(0.401012366366)*x_ref[0]**o+(-0.970993441679)*x_ref[0]+(0.0249535421254)*x_ref[1]**o+(-0.499737254014)*x_ref[1]
-        ref[2,4,2,1]=(-0.692604790859)*x_ref[0]**o+(-0.685292098725)*x_ref[0]+(0.22550357354)*x_ref[1]**o+(0.908152783462)*x_ref[1]
-        ref[3,0,0,0]=(-0.634246407254)*x_ref[0]**o+(-0.571223033336)*x_ref[0]+(0.0574319920181)*x_ref[1]**o+(0.123763929908)*x_ref[1]
-        ref[3,0,0,1]=(-0.569358219213)*x_ref[0]**o+(-0.107237509632)*x_ref[0]+(0.97672999497)*x_ref[1]**o+(-0.114939366813)*x_ref[1]
-        ref[3,0,1,0]=(-0.767885152479)*x_ref[0]**o+(-0.105924102555)*x_ref[0]+(0.539361607398)*x_ref[1]**o+(0.546186446469)*x_ref[1]
-        ref[3,0,1,1]=(-0.58818696897)*x_ref[0]**o+(0.629371516566)*x_ref[0]+(-0.598173904376)*x_ref[1]**o+(0.959043112088)*x_ref[1]
-        ref[3,0,2,0]=(0.751165393927)*x_ref[0]**o+(0.732151619397)*x_ref[0]+(-0.435276735735)*x_ref[1]**o+(0.947142140722)*x_ref[1]
-        ref[3,0,2,1]=(0.463904349547)*x_ref[0]**o+(-0.947270841014)*x_ref[0]+(0.304239969784)*x_ref[1]**o+(-0.233566944292)*x_ref[1]
-        ref[3,1,0,0]=(0.961122232395)*x_ref[0]**o+(-0.989040215156)*x_ref[0]+(0.833186746232)*x_ref[1]**o+(0.226673105305)*x_ref[1]
-        ref[3,1,0,1]=(-0.156957616578)*x_ref[0]**o+(-0.361665587314)*x_ref[0]+(0.987490273947)*x_ref[1]**o+(-0.890271058746)*x_ref[1]
-        ref[3,1,1,0]=(-0.259959222953)*x_ref[0]**o+(-0.696135598749)*x_ref[0]+(0.234411151165)*x_ref[1]**o+(0.783105897256)*x_ref[1]
-        ref[3,1,1,1]=(0.020886322199)*x_ref[0]**o+(0.887445555864)*x_ref[0]+(0.709489180254)*x_ref[1]**o+(0.990590112507)*x_ref[1]
-        ref[3,1,2,0]=(-0.963790247866)*x_ref[0]**o+(-0.417180971158)*x_ref[0]+(0.303859261646)*x_ref[1]**o+(0.745552024399)*x_ref[1]
-        ref[3,1,2,1]=(-0.364448135641)*x_ref[0]**o+(0.760841571414)*x_ref[0]+(-0.0283374186763)*x_ref[1]**o+(-0.491433855748)*x_ref[1]
-        ref[3,2,0,0]=(-0.649766142291)*x_ref[0]**o+(-0.177410238297)*x_ref[0]+(0.137316641289)*x_ref[1]**o+(-0.40890299152)*x_ref[1]
-        ref[3,2,0,1]=(0.282922984657)*x_ref[0]**o+(-0.660238152943)*x_ref[0]+(0.481726052488)*x_ref[1]**o+(0.976011254218)*x_ref[1]
-        ref[3,2,1,0]=(0.989761520473)*x_ref[0]**o+(0.194082255647)*x_ref[0]+(-0.648435682551)*x_ref[1]**o+(-0.721569599311)*x_ref[1]
-        ref[3,2,1,1]=(0.734634540883)*x_ref[0]**o+(0.524638529049)*x_ref[0]+(-0.737636791717)*x_ref[1]**o+(-0.995904525822)*x_ref[1]
-        ref[3,2,2,0]=(0.422396808663)*x_ref[0]**o+(-0.820639154105)*x_ref[0]+(-0.566207315373)*x_ref[1]**o+(-0.224174711984)*x_ref[1]
-        ref[3,2,2,1]=(0.719145374997)*x_ref[0]**o+(-0.885860499468)*x_ref[0]+(0.184062878609)*x_ref[1]**o+(0.47660543007)*x_ref[1]
-        ref[3,3,0,0]=(-0.0122290849915)*x_ref[0]**o+(-0.0314298339876)*x_ref[0]+(0.937255407134)*x_ref[1]**o+(-0.754858547072)*x_ref[1]
-        ref[3,3,0,1]=(-0.507826956669)*x_ref[0]**o+(0.951205020689)*x_ref[0]+(0.837096245109)*x_ref[1]**o+(-0.576692399518)*x_ref[1]
-        ref[3,3,1,0]=(0.602119808238)*x_ref[0]**o+(-0.943937134298)*x_ref[0]+(-0.244250254626)*x_ref[1]**o+(-0.814103542727)*x_ref[1]
-        ref[3,3,1,1]=(-0.51811661822)*x_ref[0]**o+(-0.188969078762)*x_ref[0]+(-0.697470816837)*x_ref[1]**o+(-0.741593014841)*x_ref[1]
-        ref[3,3,2,0]=(-0.673948933786)*x_ref[0]**o+(0.816404336566)*x_ref[0]+(0.339239090092)*x_ref[1]**o+(-0.0173550947113)*x_ref[1]
-        ref[3,3,2,1]=(0.499109852716)*x_ref[0]**o+(0.515501552893)*x_ref[0]+(0.926442939974)*x_ref[1]**o+(0.157227173254)*x_ref[1]
-        ref[3,4,0,0]=(-0.1837389273)*x_ref[0]**o+(0.78490229721)*x_ref[0]+(-0.248033788374)*x_ref[1]**o+(0.735136386405)*x_ref[1]
-        ref[3,4,0,1]=(0.121169550194)*x_ref[0]**o+(-0.854027732077)*x_ref[0]+(0.937680848475)*x_ref[1]**o+(-0.447184197264)*x_ref[1]
-        ref[3,4,1,0]=(-0.788610934694)*x_ref[0]**o+(-0.397825388144)*x_ref[0]+(0.604421361449)*x_ref[1]**o+(0.937184552821)*x_ref[1]
-        ref[3,4,1,1]=(-0.493380143496)*x_ref[0]**o+(0.958197000398)*x_ref[0]+(0.282372561751)*x_ref[1]**o+(-0.55322669826)*x_ref[1]
-        ref[3,4,2,0]=(0.11333865923)*x_ref[0]**o+(-0.542805511569)*x_ref[0]+(-0.640646701928)*x_ref[1]**o+(-0.342030716597)*x_ref[1]
-        ref[3,4,2,1]=(0.505356266297)*x_ref[0]**o+(-0.107422782294)*x_ref[0]+(0.542833447968)*x_ref[1]**o+(-0.615275716592)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.507422888369)*x[0]**o+(0.808798513305)*x[0]+(0.51493073805)*x[1]**o+(-0.928527686947)*x[1]+(-0.788010447498)*x[2]**o+(-0.378389833131)*x[2]
-        arg[0,0,0,1]=(-0.475851243177)*x[0]**o+(0.746578446988)*x[0]+(0.504778622494)*x[1]**o+(-0.677770398899)*x[1]+(-0.862535648403)*x[2]**o+(0.620414141691)*x[2]
-        arg[0,0,1,0]=(-0.361726879582)*x[0]**o+(0.554584127587)*x[0]+(0.436610414772)*x[1]**o+(-0.686534492717)*x[1]+(0.757226061419)*x[2]**o+(0.0948537725389)*x[2]
-        arg[0,0,1,1]=(-0.362160696355)*x[0]**o+(0.766524051703)*x[0]+(0.209980857795)*x[1]**o+(-0.478398061437)*x[1]+(-0.410960179122)*x[2]**o+(-0.213272138462)*x[2]
-        arg[0,0,2,0]=(0.87154872554)*x[0]**o+(-0.727915301904)*x[0]+(0.683580698056)*x[1]**o+(0.215052521277)*x[1]+(0.267231507898)*x[2]**o+(-0.0124189912449)*x[2]
-        arg[0,0,2,1]=(0.631400944876)*x[0]**o+(0.537293628606)*x[0]+(0.944754350994)*x[1]**o+(0.108068908012)*x[1]+(0.890117096365)*x[2]**o+(0.164706867235)*x[2]
-        arg[0,1,0,0]=(-0.935871759207)*x[0]**o+(0.350133758077)*x[0]+(-0.966482181015)*x[1]**o+(0.440902701528)*x[1]+(-0.893329541322)*x[2]**o+(0.350317827938)*x[2]
-        arg[0,1,0,1]=(0.465305203601)*x[0]**o+(0.711131797928)*x[0]+(0.104091536498)*x[1]**o+(0.484811628127)*x[1]+(0.676878954516)*x[2]**o+(-0.99327016995)*x[2]
-        arg[0,1,1,0]=(-0.361189016151)*x[0]**o+(0.962468573492)*x[0]+(-0.158571122564)*x[1]**o+(-0.293583660912)*x[1]+(-0.713699173608)*x[2]**o+(-0.507430163361)*x[2]
-        arg[0,1,1,1]=(0.172564527054)*x[0]**o+(0.273438145027)*x[0]+(0.137378266239)*x[1]**o+(-0.675788606841)*x[1]+(-0.362143416121)*x[2]**o+(0.0703897749775)*x[2]
-        arg[0,1,2,0]=(-0.941374717271)*x[0]**o+(0.289433165458)*x[0]+(0.318615227028)*x[1]**o+(0.524362568204)*x[1]+(-0.612590305095)*x[2]**o+(-0.117555538957)*x[2]
-        arg[0,1,2,1]=(-0.442920825551)*x[0]**o+(-0.454982146579)*x[0]+(0.355353737589)*x[1]**o+(-0.729623917004)*x[1]+(-0.567220335937)*x[2]**o+(0.977652639976)*x[2]
-        arg[0,2,0,0]=(0.942485930373)*x[0]**o+(-0.605823961033)*x[0]+(-0.143465779338)*x[1]**o+(0.327354308987)*x[1]+(0.691900417542)*x[2]**o+(-0.514165213849)*x[2]
-        arg[0,2,0,1]=(0.018029272977)*x[0]**o+(-0.209992705469)*x[0]+(-0.224614727554)*x[1]**o+(-0.862697462048)*x[1]+(0.274791387928)*x[2]**o+(-0.907445869506)*x[2]
-        arg[0,2,1,0]=(0.862755248265)*x[0]**o+(0.020831641939)*x[0]+(0.496662599261)*x[1]**o+(0.79318975953)*x[1]+(0.0912166895541)*x[2]**o+(0.556337610316)*x[2]
-        arg[0,2,1,1]=(-0.09652997071)*x[0]**o+(-0.954279421394)*x[0]+(-0.601053524018)*x[1]**o+(0.642528012068)*x[1]+(0.295748113888)*x[2]**o+(-0.318166346186)*x[2]
-        arg[0,2,2,0]=(-0.914878854129)*x[0]**o+(0.159201123642)*x[0]+(0.589819056368)*x[1]**o+(-0.715763226823)*x[1]+(-0.444572583567)*x[2]**o+(-0.487866651367)*x[2]
-        arg[0,2,2,1]=(-0.71271969175)*x[0]**o+(0.454616308594)*x[0]+(0.510270095021)*x[1]**o+(-0.0385822967955)*x[1]+(-0.519736540313)*x[2]**o+(0.0556733091556)*x[2]
-        arg[0,3,0,0]=(0.355768034846)*x[0]**o+(0.152240594627)*x[0]+(-0.81081131843)*x[1]**o+(-0.913373483156)*x[1]+(-0.319859744799)*x[2]**o+(-0.306218435393)*x[2]
-        arg[0,3,0,1]=(-0.656932063693)*x[0]**o+(0.832886861783)*x[0]+(-0.417112750683)*x[1]**o+(-0.388190265957)*x[1]+(0.246534947096)*x[2]**o+(-0.896822839189)*x[2]
-        arg[0,3,1,0]=(0.204713418891)*x[0]**o+(-0.150097488817)*x[0]+(0.806578426941)*x[1]**o+(-0.590052708995)*x[1]+(-0.758958608419)*x[2]**o+(-0.221973528232)*x[2]
-        arg[0,3,1,1]=(-0.854308184618)*x[0]**o+(-0.292526203646)*x[0]+(-0.662403504833)*x[1]**o+(0.0955657982227)*x[1]+(0.69471076173)*x[2]**o+(0.384077309264)*x[2]
-        arg[0,3,2,0]=(0.982057200864)*x[0]**o+(-0.64758727704)*x[0]+(0.15941493222)*x[1]**o+(-0.17745437115)*x[1]+(-0.72953252955)*x[2]**o+(0.986979270802)*x[2]
-        arg[0,3,2,1]=(0.764526698779)*x[0]**o+(0.22809521115)*x[0]+(-0.0762092087998)*x[1]**o+(0.415212410471)*x[1]+(-0.263638988463)*x[2]**o+(-0.934669942336)*x[2]
-        arg[0,4,0,0]=(0.0812656932707)*x[0]**o+(0.0397235062518)*x[0]+(-0.0496912823983)*x[1]**o+(0.189891585189)*x[1]+(0.243537823293)*x[2]**o+(0.461256134208)*x[2]
-        arg[0,4,0,1]=(0.167596358861)*x[0]**o+(0.441650690481)*x[0]+(0.638100632205)*x[1]**o+(-0.69240615765)*x[1]+(-0.501855369512)*x[2]**o+(0.769465683782)*x[2]
-        arg[0,4,1,0]=(-0.137149398927)*x[0]**o+(-0.186548325285)*x[0]+(-0.504656948352)*x[1]**o+(0.228896656134)*x[1]+(-0.472425358061)*x[2]**o+(-0.0769834754996)*x[2]
-        arg[0,4,1,1]=(0.311655648626)*x[0]**o+(0.856513683959)*x[0]+(0.47173626537)*x[1]**o+(0.245497333467)*x[1]+(-0.513727691305)*x[2]**o+(-0.588614785682)*x[2]
-        arg[0,4,2,0]=(-0.152907854625)*x[0]**o+(-0.86229950575)*x[0]+(-0.931356414564)*x[1]**o+(-0.915667991864)*x[1]+(0.322316118527)*x[2]**o+(-0.987559462539)*x[2]
-        arg[0,4,2,1]=(-0.705947769164)*x[0]**o+(0.104081366627)*x[0]+(-0.540454644392)*x[1]**o+(0.404522880836)*x[1]+(0.146464264141)*x[2]**o+(0.586755030006)*x[2]
-        arg[1,0,0,0]=(-0.466614768106)*x[0]**o+(0.482681414943)*x[0]+(-0.176553738108)*x[1]**o+(-0.39162272813)*x[1]+(0.74312023324)*x[2]**o+(0.824538905894)*x[2]
-        arg[1,0,0,1]=(-0.9351073631)*x[0]**o+(-0.640226640449)*x[0]+(0.966208762054)*x[1]**o+(0.101792167944)*x[1]+(-0.732983657038)*x[2]**o+(-0.112313375937)*x[2]
-        arg[1,0,1,0]=(-0.305403470434)*x[0]**o+(-0.414397930347)*x[0]+(0.356093254322)*x[1]**o+(-0.52607560749)*x[1]+(-0.70070674473)*x[2]**o+(-0.0192901616015)*x[2]
-        arg[1,0,1,1]=(0.450046989211)*x[0]**o+(0.602770057268)*x[0]+(0.0193812509113)*x[1]**o+(-0.275615149191)*x[1]+(0.0180468267836)*x[2]**o+(-0.81388255113)*x[2]
-        arg[1,0,2,0]=(0.913651483249)*x[0]**o+(-0.92188313743)*x[0]+(0.680007150195)*x[1]**o+(-0.300145584708)*x[1]+(-0.398883520002)*x[2]**o+(-0.752781496463)*x[2]
-        arg[1,0,2,1]=(-0.265749827845)*x[0]**o+(0.594379728352)*x[0]+(0.463409943587)*x[1]**o+(-0.85840420426)*x[1]+(-0.705963756674)*x[2]**o+(0.251711112887)*x[2]
-        arg[1,1,0,0]=(-0.28895690781)*x[0]**o+(0.476461656166)*x[0]+(0.0692567954597)*x[1]**o+(0.88763437878)*x[1]+(0.0872256197554)*x[2]**o+(0.19467039694)*x[2]
-        arg[1,1,0,1]=(0.741045418981)*x[0]**o+(-0.726935151332)*x[0]+(0.899418662131)*x[1]**o+(0.27516497286)*x[1]+(-0.715927474971)*x[2]**o+(-0.709283098732)*x[2]
-        arg[1,1,1,0]=(0.991407130174)*x[0]**o+(-0.163484265852)*x[0]+(-0.983254548659)*x[1]**o+(0.0568443855477)*x[1]+(0.309664644588)*x[2]**o+(0.904334718845)*x[2]
-        arg[1,1,1,1]=(0.237261672833)*x[0]**o+(0.0861047746345)*x[0]+(-0.494898018662)*x[1]**o+(-0.433075334646)*x[1]+(0.588597346505)*x[2]**o+(-0.185559567553)*x[2]
-        arg[1,1,2,0]=(-0.969384091709)*x[0]**o+(-0.0229777223491)*x[0]+(0.0945623059666)*x[1]**o+(0.303543647034)*x[1]+(0.659000135381)*x[2]**o+(0.00873791711254)*x[2]
-        arg[1,1,2,1]=(-0.421406731882)*x[0]**o+(-0.5017394377)*x[0]+(0.027747130694)*x[1]**o+(0.327278873996)*x[1]+(-0.754133439304)*x[2]**o+(0.673525803845)*x[2]
-        arg[1,2,0,0]=(-0.104620319685)*x[0]**o+(-0.685602393278)*x[0]+(0.972173717014)*x[1]**o+(-0.440573017063)*x[1]+(-0.709529395743)*x[2]**o+(0.634170741457)*x[2]
-        arg[1,2,0,1]=(-0.560386754264)*x[0]**o+(0.570894623654)*x[0]+(-0.455122833362)*x[1]**o+(-0.00322505937935)*x[1]+(0.959400336149)*x[2]**o+(0.64014859954)*x[2]
-        arg[1,2,1,0]=(0.100585233221)*x[0]**o+(0.939532360957)*x[0]+(-0.900301955112)*x[1]**o+(-0.776375896786)*x[1]+(-0.779373294746)*x[2]**o+(0.546157461116)*x[2]
-        arg[1,2,1,1]=(-0.680457315071)*x[0]**o+(-0.0278844539208)*x[0]+(-0.629673590044)*x[1]**o+(0.813218376348)*x[1]+(-0.449484131841)*x[2]**o+(0.641682150048)*x[2]
-        arg[1,2,2,0]=(0.60056954386)*x[0]**o+(-0.763169434657)*x[0]+(-0.672890915035)*x[1]**o+(-0.368711154571)*x[1]+(0.476810195318)*x[2]**o+(-0.935071124382)*x[2]
-        arg[1,2,2,1]=(0.994100148333)*x[0]**o+(0.471647033381)*x[0]+(0.341677296654)*x[1]**o+(0.466442262068)*x[1]+(-0.0634919249117)*x[2]**o+(0.0637348830912)*x[2]
-        arg[1,3,0,0]=(-0.120744286726)*x[0]**o+(0.630378984537)*x[0]+(0.0837817796507)*x[1]**o+(-0.850115274881)*x[1]+(0.574342626561)*x[2]**o+(-0.705409915626)*x[2]
-        arg[1,3,0,1]=(-0.51181061391)*x[0]**o+(0.711479747616)*x[0]+(-0.00800928076734)*x[1]**o+(-0.703424580277)*x[1]+(-0.925935026157)*x[2]**o+(0.488175992827)*x[2]
-        arg[1,3,1,0]=(0.531879615751)*x[0]**o+(-0.214270521934)*x[0]+(-0.432344726015)*x[1]**o+(-0.107660826449)*x[1]+(0.763406427398)*x[2]**o+(-0.511000150429)*x[2]
-        arg[1,3,1,1]=(-0.867467568206)*x[0]**o+(-0.738425961596)*x[0]+(-0.925337667706)*x[1]**o+(-0.586227765107)*x[1]+(0.909987211462)*x[2]**o+(0.533347022582)*x[2]
-        arg[1,3,2,0]=(-0.47713113862)*x[0]**o+(-0.130876138883)*x[0]+(-0.607996835981)*x[1]**o+(-0.0306261551172)*x[1]+(0.956207500475)*x[2]**o+(-0.287731719382)*x[2]
-        arg[1,3,2,1]=(0.179479486943)*x[0]**o+(0.361266562479)*x[0]+(0.374904472267)*x[1]**o+(0.00788379106301)*x[1]+(-0.34090684265)*x[2]**o+(-0.190875910791)*x[2]
-        arg[1,4,0,0]=(0.685464203729)*x[0]**o+(0.0634561930987)*x[0]+(-0.662534110385)*x[1]**o+(0.383849898086)*x[1]+(0.948230524205)*x[2]**o+(-0.347042281976)*x[2]
-        arg[1,4,0,1]=(-0.484499755322)*x[0]**o+(-0.765655349243)*x[0]+(0.805331514606)*x[1]**o+(-0.0635912547496)*x[1]+(-0.139457134772)*x[2]**o+(0.227446734221)*x[2]
-        arg[1,4,1,0]=(-0.913971229647)*x[0]**o+(0.042531889985)*x[0]+(0.143956410289)*x[1]**o+(0.597990264168)*x[1]+(-0.85926903006)*x[2]**o+(0.205900361792)*x[2]
-        arg[1,4,1,1]=(-0.955540264653)*x[0]**o+(0.983439073814)*x[0]+(0.246870351555)*x[1]**o+(-0.610917180843)*x[1]+(-0.0418134447092)*x[2]**o+(-0.58407787472)*x[2]
-        arg[1,4,2,0]=(0.787274711453)*x[0]**o+(-0.899651339467)*x[0]+(-0.62195254225)*x[1]**o+(-0.516447289251)*x[1]+(0.267082643601)*x[2]**o+(0.0408186039688)*x[2]
-        arg[1,4,2,1]=(-0.485773801895)*x[0]**o+(0.663478067655)*x[0]+(0.928973237869)*x[1]**o+(0.353735145156)*x[1]+(0.128409748978)*x[2]**o+(-0.476479648592)*x[2]
-        arg[2,0,0,0]=(0.491574821811)*x[0]**o+(0.455303820526)*x[0]+(-0.747773112075)*x[1]**o+(-0.653255987137)*x[1]+(-0.738293040346)*x[2]**o+(0.948070477272)*x[2]
-        arg[2,0,0,1]=(-0.697412782403)*x[0]**o+(-0.738389544586)*x[0]+(0.231728579935)*x[1]**o+(0.248503931032)*x[1]+(-0.561155590703)*x[2]**o+(0.324682113147)*x[2]
-        arg[2,0,1,0]=(-0.00507638382064)*x[0]**o+(-0.983105866448)*x[0]+(-0.253141627484)*x[1]**o+(-0.0664178091069)*x[1]+(0.194460220144)*x[2]**o+(-0.174257469198)*x[2]
-        arg[2,0,1,1]=(-0.644447560463)*x[0]**o+(0.658703761133)*x[0]+(-0.685392825104)*x[1]**o+(-0.766295260796)*x[1]+(-0.922004388493)*x[2]**o+(-0.0745707720923)*x[2]
-        arg[2,0,2,0]=(-0.69924009606)*x[0]**o+(-0.398212597328)*x[0]+(-0.364991550186)*x[1]**o+(0.243474288977)*x[1]+(0.129545162767)*x[2]**o+(0.920611954845)*x[2]
-        arg[2,0,2,1]=(-0.494476126875)*x[0]**o+(-0.131503103148)*x[0]+(-0.241670500874)*x[1]**o+(0.40439125905)*x[1]+(0.134166779399)*x[2]**o+(-0.507385751809)*x[2]
-        arg[2,1,0,0]=(0.301148115913)*x[0]**o+(0.189635133395)*x[0]+(0.744167404774)*x[1]**o+(0.995754344203)*x[1]+(-0.334760662218)*x[2]**o+(-0.182462923741)*x[2]
-        arg[2,1,0,1]=(0.523500022508)*x[0]**o+(-0.257042661558)*x[0]+(-0.940233100381)*x[1]**o+(-0.202431731891)*x[1]+(-0.653480190287)*x[2]**o+(0.993156915081)*x[2]
-        arg[2,1,1,0]=(-0.502452234661)*x[0]**o+(-0.711581805303)*x[0]+(0.696450091152)*x[1]**o+(0.436746953802)*x[1]+(0.695969418438)*x[2]**o+(-0.671400022595)*x[2]
-        arg[2,1,1,1]=(0.0705944125182)*x[0]**o+(-0.865755834485)*x[0]+(0.921555996641)*x[1]**o+(-0.567855814858)*x[1]+(-0.213455192388)*x[2]**o+(0.820868399259)*x[2]
-        arg[2,1,2,0]=(0.744232126707)*x[0]**o+(0.336969176485)*x[0]+(0.339407729288)*x[1]**o+(-0.465154968917)*x[1]+(0.389524167202)*x[2]**o+(0.645394954477)*x[2]
-        arg[2,1,2,1]=(-0.299085687516)*x[0]**o+(0.220795864743)*x[0]+(-0.19353913538)*x[1]**o+(0.445131396297)*x[1]+(-0.779605318636)*x[2]**o+(-0.76707264371)*x[2]
-        arg[2,2,0,0]=(-0.357585997171)*x[0]**o+(-0.248795296406)*x[0]+(0.0876364714478)*x[1]**o+(-0.682833482179)*x[1]+(0.497052575986)*x[2]**o+(0.893378007889)*x[2]
-        arg[2,2,0,1]=(0.38067999218)*x[0]**o+(-0.857246232026)*x[0]+(0.0785818284359)*x[1]**o+(-0.473287028123)*x[1]+(-0.763041318956)*x[2]**o+(-0.1119710251)*x[2]
-        arg[2,2,1,0]=(-0.0278856926369)*x[0]**o+(0.435955626553)*x[0]+(-0.676274741782)*x[1]**o+(-0.719721825467)*x[1]+(0.195007734703)*x[2]**o+(0.504771278902)*x[2]
-        arg[2,2,1,1]=(0.459547475772)*x[0]**o+(-0.669041681613)*x[0]+(-0.741957874364)*x[1]**o+(0.604585337407)*x[1]+(-0.886718742046)*x[2]**o+(0.338113237761)*x[2]
-        arg[2,2,2,0]=(0.392926733678)*x[0]**o+(-0.923680589861)*x[0]+(-0.425503328457)*x[1]**o+(-0.0902669250117)*x[1]+(-0.346726072703)*x[2]**o+(0.541482976709)*x[2]
-        arg[2,2,2,1]=(0.134867023616)*x[0]**o+(0.478349607348)*x[0]+(-0.334617836366)*x[1]**o+(-0.74587411744)*x[1]+(-0.880365937567)*x[2]**o+(0.820743064452)*x[2]
-        arg[2,3,0,0]=(0.081184173895)*x[0]**o+(0.315011929905)*x[0]+(-0.137083926616)*x[1]**o+(0.103926223299)*x[1]+(0.363270989968)*x[2]**o+(-0.454075563606)*x[2]
-        arg[2,3,0,1]=(0.457730701321)*x[0]**o+(0.922345625691)*x[0]+(-0.412933933474)*x[1]**o+(-0.546359655103)*x[1]+(0.719101029933)*x[2]**o+(-0.790522859322)*x[2]
-        arg[2,3,1,0]=(-0.811816419841)*x[0]**o+(0.0379298408788)*x[0]+(-0.852643125131)*x[1]**o+(0.76881274254)*x[1]+(0.75214553496)*x[2]**o+(0.800382814403)*x[2]
-        arg[2,3,1,1]=(0.524802143618)*x[0]**o+(-0.717457078371)*x[0]+(0.389026887965)*x[1]**o+(-0.231912558721)*x[1]+(-0.394705562333)*x[2]**o+(-0.794723802655)*x[2]
-        arg[2,3,2,0]=(-0.232215520303)*x[0]**o+(0.994932250617)*x[0]+(-0.760425274222)*x[1]**o+(0.0910727760744)*x[1]+(0.621642024132)*x[2]**o+(0.263978719304)*x[2]
-        arg[2,3,2,1]=(0.515269404424)*x[0]**o+(-0.998266958288)*x[0]+(-0.485078033534)*x[1]**o+(-0.960043247553)*x[1]+(-0.926562413314)*x[2]**o+(0.612710762712)*x[2]
-        arg[2,4,0,0]=(0.419808446591)*x[0]**o+(0.132792190191)*x[0]+(-0.690603562736)*x[1]**o+(0.45137757885)*x[1]+(-0.262249041567)*x[2]**o+(-0.432995254783)*x[2]
-        arg[2,4,0,1]=(0.62413323935)*x[0]**o+(0.963559148607)*x[0]+(-0.879044261015)*x[1]**o+(-0.504981574957)*x[1]+(-0.575204029973)*x[2]**o+(0.066855791448)*x[2]
-        arg[2,4,1,0]=(0.321218662791)*x[0]**o+(0.975103526588)*x[0]+(0.783716185844)*x[1]**o+(-0.816368139389)*x[1]+(0.778169798128)*x[2]**o+(-0.527443068085)*x[2]
-        arg[2,4,1,1]=(-0.8801082648)*x[0]**o+(-0.0313845929272)*x[0]+(0.485262237838)*x[1]**o+(0.0778888535573)*x[1]+(-0.900948214929)*x[2]**o+(-0.98830300089)*x[2]
-        arg[2,4,2,0]=(-0.996395042226)*x[0]**o+(0.253635852642)*x[0]+(0.180965173659)*x[1]**o+(-0.488294662459)*x[1]+(-0.144583511741)*x[2]**o+(0.285854081388)*x[2]
-        arg[2,4,2,1]=(0.00988506292061)*x[0]**o+(-0.00192786315452)*x[0]+(0.720775470647)*x[1]**o+(-0.587673311506)*x[1]+(0.313836238675)*x[2]**o+(0.45975125457)*x[2]
-        arg[3,0,0,0]=(-0.822049489749)*x[0]**o+(-0.989589435175)*x[0]+(-0.0943830434118)*x[1]**o+(-0.789229900035)*x[1]+(0.311382619317)*x[2]**o+(-0.316646938685)*x[2]
-        arg[3,0,0,1]=(0.501517916677)*x[0]**o+(-0.704502365436)*x[0]+(0.913184728006)*x[1]**o+(-0.843712848791)*x[1]+(0.901479696878)*x[2]**o+(-0.713893336542)*x[2]
-        arg[3,0,1,0]=(0.0771592811086)*x[0]**o+(0.796038032206)*x[0]+(0.566256212871)*x[1]**o+(0.394136659986)*x[1]+(-0.794422065388)*x[2]**o+(0.662174992848)*x[2]
-        arg[3,0,1,1]=(0.180225115167)*x[0]**o+(0.366965867971)*x[0]+(-0.244015756153)*x[1]**o+(0.433571067335)*x[1]+(0.129075150185)*x[2]**o+(-0.216304414605)*x[2]
-        arg[3,0,2,0]=(0.100277967034)*x[0]**o+(-0.590583546786)*x[0]+(-0.595553697152)*x[1]**o+(0.923573252239)*x[1]+(0.578966663184)*x[2]**o+(-0.411082913097)*x[2]
-        arg[3,0,2,1]=(-0.575315696811)*x[0]**o+(0.608760285918)*x[0]+(-0.3592074605)*x[1]**o+(0.515119945308)*x[1]+(-0.4000138306)*x[2]**o+(0.477685324937)*x[2]
-        arg[3,1,0,0]=(0.0780014276919)*x[0]**o+(-0.0932830671471)*x[0]+(0.39477236642)*x[1]**o+(0.406673135556)*x[1]+(-0.235480707568)*x[2]**o+(-0.872302257144)*x[2]
-        arg[3,1,0,1]=(0.170573072646)*x[0]**o+(0.868146561326)*x[0]+(0.262136343896)*x[1]**o+(0.192343529912)*x[1]+(0.157400965693)*x[2]**o+(-0.932981619473)*x[2]
-        arg[3,1,1,0]=(0.891433179291)*x[0]**o+(-0.281396449997)*x[0]+(-0.0803173619772)*x[1]**o+(-0.378460054356)*x[1]+(-0.581578656014)*x[2]**o+(-0.65856067509)*x[2]
-        arg[3,1,1,1]=(0.343599956626)*x[0]**o+(-0.92063694125)*x[0]+(0.440698102072)*x[1]**o+(0.767124166388)*x[1]+(0.050964317543)*x[2]**o+(1.35605562239e-05)*x[2]
-        arg[3,1,2,0]=(-0.614268150987)*x[0]**o+(0.363806471556)*x[0]+(0.92193457905)*x[1]**o+(0.157919580642)*x[1]+(-0.955575321124)*x[2]**o+(-0.984808437666)*x[2]
-        arg[3,1,2,1]=(0.030099648966)*x[0]**o+(-0.375999369491)*x[0]+(-0.0992643926008)*x[1]**o+(0.109209161093)*x[1]+(-0.974043780088)*x[2]**o+(0.908049658745)*x[2]
-        arg[3,2,0,0]=(0.297771341106)*x[0]**o+(-0.637802228169)*x[0]+(0.398100441783)*x[1]**o+(-0.0643425181651)*x[1]+(0.662775339033)*x[2]**o+(0.744835182052)*x[2]
-        arg[3,2,0,1]=(0.312026420583)*x[0]**o+(0.865855052574)*x[0]+(0.0195001783165)*x[1]**o+(0.537899238473)*x[1]+(0.554893357481)*x[2]**o+(0.71555610145)*x[2]
-        arg[3,2,1,0]=(-0.199138146186)*x[0]**o+(0.827546489855)*x[0]+(-0.480965464736)*x[1]**o+(-0.473796093187)*x[1]+(0.880264675049)*x[2]**o+(0.544506670844)*x[2]
-        arg[3,2,1,1]=(0.773798005008)*x[0]**o+(0.744945241634)*x[0]+(0.548170564608)*x[1]**o+(-0.560503692823)*x[1]+(-0.435630215427)*x[2]**o+(0.080015730707)*x[2]
-        arg[3,2,2,0]=(0.36735714937)*x[0]**o+(-0.867071557873)*x[0]+(0.936135650431)*x[1]**o+(-0.432533600524)*x[1]+(-0.0224430204069)*x[2]**o+(0.218590302621)*x[2]
-        arg[3,2,2,1]=(0.932808382499)*x[0]**o+(-0.0970016713319)*x[0]+(0.458943467579)*x[1]**o+(-0.134338789898)*x[1]+(-0.426892557314)*x[2]**o+(0.627071826863)*x[2]
-        arg[3,3,0,0]=(-0.623804149075)*x[0]**o+(0.910423590172)*x[0]+(0.465938181097)*x[1]**o+(0.495479245391)*x[1]+(0.693745442185)*x[2]**o+(-0.437014226757)*x[2]
-        arg[3,3,0,1]=(0.598807017496)*x[0]**o+(-0.112361840211)*x[0]+(-0.550899685213)*x[1]**o+(-0.0478222019564)*x[1]+(-0.0110129517693)*x[2]**o+(-0.059534786374)*x[2]
-        arg[3,3,1,0]=(-0.561155633409)*x[0]**o+(-0.463563057636)*x[0]+(-0.170463996009)*x[1]**o+(-0.214509204942)*x[1]+(0.851200198666)*x[2]**o+(-0.721036329689)*x[2]
-        arg[3,3,1,1]=(0.608666240405)*x[0]**o+(0.814232455115)*x[0]+(-0.604645629689)*x[1]**o+(0.960976509673)*x[1]+(0.365807996219)*x[2]**o+(-0.87491909238)*x[2]
-        arg[3,3,2,0]=(0.120126988418)*x[0]**o+(-0.745687314825)*x[0]+(-0.332697826984)*x[1]**o+(-0.823683406516)*x[1]+(0.305444079613)*x[2]**o+(0.901972115441)*x[2]
-        arg[3,3,2,1]=(0.0470293848904)*x[0]**o+(-0.195496754814)*x[0]+(0.671870114105)*x[1]**o+(0.170273146371)*x[1]+(-0.851927986188)*x[2]**o+(0.772192863973)*x[2]
-        arg[3,4,0,0]=(-0.95392341727)*x[0]**o+(-0.665694215521)*x[0]+(-0.0247396499378)*x[1]**o+(0.441352857387)*x[1]+(0.767156547791)*x[2]**o+(-0.14696372018)*x[2]
-        arg[3,4,0,1]=(0.209761166815)*x[0]**o+(0.978934473425)*x[0]+(0.943806891053)*x[1]**o+(-0.756619917601)*x[1]+(0.635699949764)*x[2]**o+(-0.345248269568)*x[2]
-        arg[3,4,1,0]=(0.748020785785)*x[0]**o+(0.311104549542)*x[0]+(0.739127551248)*x[1]**o+(-0.635238575859)*x[1]+(0.623898875653)*x[2]**o+(0.343407392068)*x[2]
-        arg[3,4,1,1]=(-0.422500892471)*x[0]**o+(0.0688495013346)*x[0]+(-0.919653906232)*x[1]**o+(0.531036586396)*x[1]+(-0.22487910672)*x[2]**o+(-0.848225994541)*x[2]
-        arg[3,4,2,0]=(0.723965744673)*x[0]**o+(0.558602959224)*x[0]+(0.699539243308)*x[1]**o+(-0.597426541715)*x[1]+(-0.0128675070522)*x[2]**o+(-0.874796626242)*x[2]
-        arg[3,4,2,1]=(-0.962970021216)*x[0]**o+(0.532886481874)*x[0]+(-0.523159705965)*x[1]**o+(-0.82887407638)*x[1]+(0.874288116843)*x[2]**o+(0.520024515804)*x[2]
-        ref[0,0,0,0]=(0.507422888369)*x_ref[0]**o+(0.808798513305)*x_ref[0]+(0.51493073805)*x_ref[1]**o+(-0.928527686947)*x_ref[1]+(-0.788010447498)*x_ref[2]**o+(-0.378389833131)*x_ref[2]
-        ref[0,0,0,1]=(-0.475851243177)*x_ref[0]**o+(0.746578446988)*x_ref[0]+(0.504778622494)*x_ref[1]**o+(-0.677770398899)*x_ref[1]+(-0.862535648403)*x_ref[2]**o+(0.620414141691)*x_ref[2]
-        ref[0,0,1,0]=(-0.361726879582)*x_ref[0]**o+(0.554584127587)*x_ref[0]+(0.436610414772)*x_ref[1]**o+(-0.686534492717)*x_ref[1]+(0.757226061419)*x_ref[2]**o+(0.0948537725389)*x_ref[2]
-        ref[0,0,1,1]=(-0.362160696355)*x_ref[0]**o+(0.766524051703)*x_ref[0]+(0.209980857795)*x_ref[1]**o+(-0.478398061437)*x_ref[1]+(-0.410960179122)*x_ref[2]**o+(-0.213272138462)*x_ref[2]
-        ref[0,0,2,0]=(0.87154872554)*x_ref[0]**o+(-0.727915301904)*x_ref[0]+(0.683580698056)*x_ref[1]**o+(0.215052521277)*x_ref[1]+(0.267231507898)*x_ref[2]**o+(-0.0124189912449)*x_ref[2]
-        ref[0,0,2,1]=(0.631400944876)*x_ref[0]**o+(0.537293628606)*x_ref[0]+(0.944754350994)*x_ref[1]**o+(0.108068908012)*x_ref[1]+(0.890117096365)*x_ref[2]**o+(0.164706867235)*x_ref[2]
-        ref[0,1,0,0]=(-0.935871759207)*x_ref[0]**o+(0.350133758077)*x_ref[0]+(-0.966482181015)*x_ref[1]**o+(0.440902701528)*x_ref[1]+(-0.893329541322)*x_ref[2]**o+(0.350317827938)*x_ref[2]
-        ref[0,1,0,1]=(0.465305203601)*x_ref[0]**o+(0.711131797928)*x_ref[0]+(0.104091536498)*x_ref[1]**o+(0.484811628127)*x_ref[1]+(0.676878954516)*x_ref[2]**o+(-0.99327016995)*x_ref[2]
-        ref[0,1,1,0]=(-0.361189016151)*x_ref[0]**o+(0.962468573492)*x_ref[0]+(-0.158571122564)*x_ref[1]**o+(-0.293583660912)*x_ref[1]+(-0.713699173608)*x_ref[2]**o+(-0.507430163361)*x_ref[2]
-        ref[0,1,1,1]=(0.172564527054)*x_ref[0]**o+(0.273438145027)*x_ref[0]+(0.137378266239)*x_ref[1]**o+(-0.675788606841)*x_ref[1]+(-0.362143416121)*x_ref[2]**o+(0.0703897749775)*x_ref[2]
-        ref[0,1,2,0]=(-0.941374717271)*x_ref[0]**o+(0.289433165458)*x_ref[0]+(0.318615227028)*x_ref[1]**o+(0.524362568204)*x_ref[1]+(-0.612590305095)*x_ref[2]**o+(-0.117555538957)*x_ref[2]
-        ref[0,1,2,1]=(-0.442920825551)*x_ref[0]**o+(-0.454982146579)*x_ref[0]+(0.355353737589)*x_ref[1]**o+(-0.729623917004)*x_ref[1]+(-0.567220335937)*x_ref[2]**o+(0.977652639976)*x_ref[2]
-        ref[0,2,0,0]=(0.942485930373)*x_ref[0]**o+(-0.605823961033)*x_ref[0]+(-0.143465779338)*x_ref[1]**o+(0.327354308987)*x_ref[1]+(0.691900417542)*x_ref[2]**o+(-0.514165213849)*x_ref[2]
-        ref[0,2,0,1]=(0.018029272977)*x_ref[0]**o+(-0.209992705469)*x_ref[0]+(-0.224614727554)*x_ref[1]**o+(-0.862697462048)*x_ref[1]+(0.274791387928)*x_ref[2]**o+(-0.907445869506)*x_ref[2]
-        ref[0,2,1,0]=(0.862755248265)*x_ref[0]**o+(0.020831641939)*x_ref[0]+(0.496662599261)*x_ref[1]**o+(0.79318975953)*x_ref[1]+(0.0912166895541)*x_ref[2]**o+(0.556337610316)*x_ref[2]
-        ref[0,2,1,1]=(-0.09652997071)*x_ref[0]**o+(-0.954279421394)*x_ref[0]+(-0.601053524018)*x_ref[1]**o+(0.642528012068)*x_ref[1]+(0.295748113888)*x_ref[2]**o+(-0.318166346186)*x_ref[2]
-        ref[0,2,2,0]=(-0.914878854129)*x_ref[0]**o+(0.159201123642)*x_ref[0]+(0.589819056368)*x_ref[1]**o+(-0.715763226823)*x_ref[1]+(-0.444572583567)*x_ref[2]**o+(-0.487866651367)*x_ref[2]
-        ref[0,2,2,1]=(-0.71271969175)*x_ref[0]**o+(0.454616308594)*x_ref[0]+(0.510270095021)*x_ref[1]**o+(-0.0385822967955)*x_ref[1]+(-0.519736540313)*x_ref[2]**o+(0.0556733091556)*x_ref[2]
-        ref[0,3,0,0]=(0.355768034846)*x_ref[0]**o+(0.152240594627)*x_ref[0]+(-0.81081131843)*x_ref[1]**o+(-0.913373483156)*x_ref[1]+(-0.319859744799)*x_ref[2]**o+(-0.306218435393)*x_ref[2]
-        ref[0,3,0,1]=(-0.656932063693)*x_ref[0]**o+(0.832886861783)*x_ref[0]+(-0.417112750683)*x_ref[1]**o+(-0.388190265957)*x_ref[1]+(0.246534947096)*x_ref[2]**o+(-0.896822839189)*x_ref[2]
-        ref[0,3,1,0]=(0.204713418891)*x_ref[0]**o+(-0.150097488817)*x_ref[0]+(0.806578426941)*x_ref[1]**o+(-0.590052708995)*x_ref[1]+(-0.758958608419)*x_ref[2]**o+(-0.221973528232)*x_ref[2]
-        ref[0,3,1,1]=(-0.854308184618)*x_ref[0]**o+(-0.292526203646)*x_ref[0]+(-0.662403504833)*x_ref[1]**o+(0.0955657982227)*x_ref[1]+(0.69471076173)*x_ref[2]**o+(0.384077309264)*x_ref[2]
-        ref[0,3,2,0]=(0.982057200864)*x_ref[0]**o+(-0.64758727704)*x_ref[0]+(0.15941493222)*x_ref[1]**o+(-0.17745437115)*x_ref[1]+(-0.72953252955)*x_ref[2]**o+(0.986979270802)*x_ref[2]
-        ref[0,3,2,1]=(0.764526698779)*x_ref[0]**o+(0.22809521115)*x_ref[0]+(-0.0762092087998)*x_ref[1]**o+(0.415212410471)*x_ref[1]+(-0.263638988463)*x_ref[2]**o+(-0.934669942336)*x_ref[2]
-        ref[0,4,0,0]=(0.0812656932707)*x_ref[0]**o+(0.0397235062518)*x_ref[0]+(-0.0496912823983)*x_ref[1]**o+(0.189891585189)*x_ref[1]+(0.243537823293)*x_ref[2]**o+(0.461256134208)*x_ref[2]
-        ref[0,4,0,1]=(0.167596358861)*x_ref[0]**o+(0.441650690481)*x_ref[0]+(0.638100632205)*x_ref[1]**o+(-0.69240615765)*x_ref[1]+(-0.501855369512)*x_ref[2]**o+(0.769465683782)*x_ref[2]
-        ref[0,4,1,0]=(-0.137149398927)*x_ref[0]**o+(-0.186548325285)*x_ref[0]+(-0.504656948352)*x_ref[1]**o+(0.228896656134)*x_ref[1]+(-0.472425358061)*x_ref[2]**o+(-0.0769834754996)*x_ref[2]
-        ref[0,4,1,1]=(0.311655648626)*x_ref[0]**o+(0.856513683959)*x_ref[0]+(0.47173626537)*x_ref[1]**o+(0.245497333467)*x_ref[1]+(-0.513727691305)*x_ref[2]**o+(-0.588614785682)*x_ref[2]
-        ref[0,4,2,0]=(-0.152907854625)*x_ref[0]**o+(-0.86229950575)*x_ref[0]+(-0.931356414564)*x_ref[1]**o+(-0.915667991864)*x_ref[1]+(0.322316118527)*x_ref[2]**o+(-0.987559462539)*x_ref[2]
-        ref[0,4,2,1]=(-0.705947769164)*x_ref[0]**o+(0.104081366627)*x_ref[0]+(-0.540454644392)*x_ref[1]**o+(0.404522880836)*x_ref[1]+(0.146464264141)*x_ref[2]**o+(0.586755030006)*x_ref[2]
-        ref[1,0,0,0]=(-0.466614768106)*x_ref[0]**o+(0.482681414943)*x_ref[0]+(-0.176553738108)*x_ref[1]**o+(-0.39162272813)*x_ref[1]+(0.74312023324)*x_ref[2]**o+(0.824538905894)*x_ref[2]
-        ref[1,0,0,1]=(-0.9351073631)*x_ref[0]**o+(-0.640226640449)*x_ref[0]+(0.966208762054)*x_ref[1]**o+(0.101792167944)*x_ref[1]+(-0.732983657038)*x_ref[2]**o+(-0.112313375937)*x_ref[2]
-        ref[1,0,1,0]=(-0.305403470434)*x_ref[0]**o+(-0.414397930347)*x_ref[0]+(0.356093254322)*x_ref[1]**o+(-0.52607560749)*x_ref[1]+(-0.70070674473)*x_ref[2]**o+(-0.0192901616015)*x_ref[2]
-        ref[1,0,1,1]=(0.450046989211)*x_ref[0]**o+(0.602770057268)*x_ref[0]+(0.0193812509113)*x_ref[1]**o+(-0.275615149191)*x_ref[1]+(0.0180468267836)*x_ref[2]**o+(-0.81388255113)*x_ref[2]
-        ref[1,0,2,0]=(0.913651483249)*x_ref[0]**o+(-0.92188313743)*x_ref[0]+(0.680007150195)*x_ref[1]**o+(-0.300145584708)*x_ref[1]+(-0.398883520002)*x_ref[2]**o+(-0.752781496463)*x_ref[2]
-        ref[1,0,2,1]=(-0.265749827845)*x_ref[0]**o+(0.594379728352)*x_ref[0]+(0.463409943587)*x_ref[1]**o+(-0.85840420426)*x_ref[1]+(-0.705963756674)*x_ref[2]**o+(0.251711112887)*x_ref[2]
-        ref[1,1,0,0]=(-0.28895690781)*x_ref[0]**o+(0.476461656166)*x_ref[0]+(0.0692567954597)*x_ref[1]**o+(0.88763437878)*x_ref[1]+(0.0872256197554)*x_ref[2]**o+(0.19467039694)*x_ref[2]
-        ref[1,1,0,1]=(0.741045418981)*x_ref[0]**o+(-0.726935151332)*x_ref[0]+(0.899418662131)*x_ref[1]**o+(0.27516497286)*x_ref[1]+(-0.715927474971)*x_ref[2]**o+(-0.709283098732)*x_ref[2]
-        ref[1,1,1,0]=(0.991407130174)*x_ref[0]**o+(-0.163484265852)*x_ref[0]+(-0.983254548659)*x_ref[1]**o+(0.0568443855477)*x_ref[1]+(0.309664644588)*x_ref[2]**o+(0.904334718845)*x_ref[2]
-        ref[1,1,1,1]=(0.237261672833)*x_ref[0]**o+(0.0861047746345)*x_ref[0]+(-0.494898018662)*x_ref[1]**o+(-0.433075334646)*x_ref[1]+(0.588597346505)*x_ref[2]**o+(-0.185559567553)*x_ref[2]
-        ref[1,1,2,0]=(-0.969384091709)*x_ref[0]**o+(-0.0229777223491)*x_ref[0]+(0.0945623059666)*x_ref[1]**o+(0.303543647034)*x_ref[1]+(0.659000135381)*x_ref[2]**o+(0.00873791711254)*x_ref[2]
-        ref[1,1,2,1]=(-0.421406731882)*x_ref[0]**o+(-0.5017394377)*x_ref[0]+(0.027747130694)*x_ref[1]**o+(0.327278873996)*x_ref[1]+(-0.754133439304)*x_ref[2]**o+(0.673525803845)*x_ref[2]
-        ref[1,2,0,0]=(-0.104620319685)*x_ref[0]**o+(-0.685602393278)*x_ref[0]+(0.972173717014)*x_ref[1]**o+(-0.440573017063)*x_ref[1]+(-0.709529395743)*x_ref[2]**o+(0.634170741457)*x_ref[2]
-        ref[1,2,0,1]=(-0.560386754264)*x_ref[0]**o+(0.570894623654)*x_ref[0]+(-0.455122833362)*x_ref[1]**o+(-0.00322505937935)*x_ref[1]+(0.959400336149)*x_ref[2]**o+(0.64014859954)*x_ref[2]
-        ref[1,2,1,0]=(0.100585233221)*x_ref[0]**o+(0.939532360957)*x_ref[0]+(-0.900301955112)*x_ref[1]**o+(-0.776375896786)*x_ref[1]+(-0.779373294746)*x_ref[2]**o+(0.546157461116)*x_ref[2]
-        ref[1,2,1,1]=(-0.680457315071)*x_ref[0]**o+(-0.0278844539208)*x_ref[0]+(-0.629673590044)*x_ref[1]**o+(0.813218376348)*x_ref[1]+(-0.449484131841)*x_ref[2]**o+(0.641682150048)*x_ref[2]
-        ref[1,2,2,0]=(0.60056954386)*x_ref[0]**o+(-0.763169434657)*x_ref[0]+(-0.672890915035)*x_ref[1]**o+(-0.368711154571)*x_ref[1]+(0.476810195318)*x_ref[2]**o+(-0.935071124382)*x_ref[2]
-        ref[1,2,2,1]=(0.994100148333)*x_ref[0]**o+(0.471647033381)*x_ref[0]+(0.341677296654)*x_ref[1]**o+(0.466442262068)*x_ref[1]+(-0.0634919249117)*x_ref[2]**o+(0.0637348830912)*x_ref[2]
-        ref[1,3,0,0]=(-0.120744286726)*x_ref[0]**o+(0.630378984537)*x_ref[0]+(0.0837817796507)*x_ref[1]**o+(-0.850115274881)*x_ref[1]+(0.574342626561)*x_ref[2]**o+(-0.705409915626)*x_ref[2]
-        ref[1,3,0,1]=(-0.51181061391)*x_ref[0]**o+(0.711479747616)*x_ref[0]+(-0.00800928076734)*x_ref[1]**o+(-0.703424580277)*x_ref[1]+(-0.925935026157)*x_ref[2]**o+(0.488175992827)*x_ref[2]
-        ref[1,3,1,0]=(0.531879615751)*x_ref[0]**o+(-0.214270521934)*x_ref[0]+(-0.432344726015)*x_ref[1]**o+(-0.107660826449)*x_ref[1]+(0.763406427398)*x_ref[2]**o+(-0.511000150429)*x_ref[2]
-        ref[1,3,1,1]=(-0.867467568206)*x_ref[0]**o+(-0.738425961596)*x_ref[0]+(-0.925337667706)*x_ref[1]**o+(-0.586227765107)*x_ref[1]+(0.909987211462)*x_ref[2]**o+(0.533347022582)*x_ref[2]
-        ref[1,3,2,0]=(-0.47713113862)*x_ref[0]**o+(-0.130876138883)*x_ref[0]+(-0.607996835981)*x_ref[1]**o+(-0.0306261551172)*x_ref[1]+(0.956207500475)*x_ref[2]**o+(-0.287731719382)*x_ref[2]
-        ref[1,3,2,1]=(0.179479486943)*x_ref[0]**o+(0.361266562479)*x_ref[0]+(0.374904472267)*x_ref[1]**o+(0.00788379106301)*x_ref[1]+(-0.34090684265)*x_ref[2]**o+(-0.190875910791)*x_ref[2]
-        ref[1,4,0,0]=(0.685464203729)*x_ref[0]**o+(0.0634561930987)*x_ref[0]+(-0.662534110385)*x_ref[1]**o+(0.383849898086)*x_ref[1]+(0.948230524205)*x_ref[2]**o+(-0.347042281976)*x_ref[2]
-        ref[1,4,0,1]=(-0.484499755322)*x_ref[0]**o+(-0.765655349243)*x_ref[0]+(0.805331514606)*x_ref[1]**o+(-0.0635912547496)*x_ref[1]+(-0.139457134772)*x_ref[2]**o+(0.227446734221)*x_ref[2]
-        ref[1,4,1,0]=(-0.913971229647)*x_ref[0]**o+(0.042531889985)*x_ref[0]+(0.143956410289)*x_ref[1]**o+(0.597990264168)*x_ref[1]+(-0.85926903006)*x_ref[2]**o+(0.205900361792)*x_ref[2]
-        ref[1,4,1,1]=(-0.955540264653)*x_ref[0]**o+(0.983439073814)*x_ref[0]+(0.246870351555)*x_ref[1]**o+(-0.610917180843)*x_ref[1]+(-0.0418134447092)*x_ref[2]**o+(-0.58407787472)*x_ref[2]
-        ref[1,4,2,0]=(0.787274711453)*x_ref[0]**o+(-0.899651339467)*x_ref[0]+(-0.62195254225)*x_ref[1]**o+(-0.516447289251)*x_ref[1]+(0.267082643601)*x_ref[2]**o+(0.0408186039688)*x_ref[2]
-        ref[1,4,2,1]=(-0.485773801895)*x_ref[0]**o+(0.663478067655)*x_ref[0]+(0.928973237869)*x_ref[1]**o+(0.353735145156)*x_ref[1]+(0.128409748978)*x_ref[2]**o+(-0.476479648592)*x_ref[2]
-        ref[2,0,0,0]=(0.491574821811)*x_ref[0]**o+(0.455303820526)*x_ref[0]+(-0.747773112075)*x_ref[1]**o+(-0.653255987137)*x_ref[1]+(-0.738293040346)*x_ref[2]**o+(0.948070477272)*x_ref[2]
-        ref[2,0,0,1]=(-0.697412782403)*x_ref[0]**o+(-0.738389544586)*x_ref[0]+(0.231728579935)*x_ref[1]**o+(0.248503931032)*x_ref[1]+(-0.561155590703)*x_ref[2]**o+(0.324682113147)*x_ref[2]
-        ref[2,0,1,0]=(-0.00507638382064)*x_ref[0]**o+(-0.983105866448)*x_ref[0]+(-0.253141627484)*x_ref[1]**o+(-0.0664178091069)*x_ref[1]+(0.194460220144)*x_ref[2]**o+(-0.174257469198)*x_ref[2]
-        ref[2,0,1,1]=(-0.644447560463)*x_ref[0]**o+(0.658703761133)*x_ref[0]+(-0.685392825104)*x_ref[1]**o+(-0.766295260796)*x_ref[1]+(-0.922004388493)*x_ref[2]**o+(-0.0745707720923)*x_ref[2]
-        ref[2,0,2,0]=(-0.69924009606)*x_ref[0]**o+(-0.398212597328)*x_ref[0]+(-0.364991550186)*x_ref[1]**o+(0.243474288977)*x_ref[1]+(0.129545162767)*x_ref[2]**o+(0.920611954845)*x_ref[2]
-        ref[2,0,2,1]=(-0.494476126875)*x_ref[0]**o+(-0.131503103148)*x_ref[0]+(-0.241670500874)*x_ref[1]**o+(0.40439125905)*x_ref[1]+(0.134166779399)*x_ref[2]**o+(-0.507385751809)*x_ref[2]
-        ref[2,1,0,0]=(0.301148115913)*x_ref[0]**o+(0.189635133395)*x_ref[0]+(0.744167404774)*x_ref[1]**o+(0.995754344203)*x_ref[1]+(-0.334760662218)*x_ref[2]**o+(-0.182462923741)*x_ref[2]
-        ref[2,1,0,1]=(0.523500022508)*x_ref[0]**o+(-0.257042661558)*x_ref[0]+(-0.940233100381)*x_ref[1]**o+(-0.202431731891)*x_ref[1]+(-0.653480190287)*x_ref[2]**o+(0.993156915081)*x_ref[2]
-        ref[2,1,1,0]=(-0.502452234661)*x_ref[0]**o+(-0.711581805303)*x_ref[0]+(0.696450091152)*x_ref[1]**o+(0.436746953802)*x_ref[1]+(0.695969418438)*x_ref[2]**o+(-0.671400022595)*x_ref[2]
-        ref[2,1,1,1]=(0.0705944125182)*x_ref[0]**o+(-0.865755834485)*x_ref[0]+(0.921555996641)*x_ref[1]**o+(-0.567855814858)*x_ref[1]+(-0.213455192388)*x_ref[2]**o+(0.820868399259)*x_ref[2]
-        ref[2,1,2,0]=(0.744232126707)*x_ref[0]**o+(0.336969176485)*x_ref[0]+(0.339407729288)*x_ref[1]**o+(-0.465154968917)*x_ref[1]+(0.389524167202)*x_ref[2]**o+(0.645394954477)*x_ref[2]
-        ref[2,1,2,1]=(-0.299085687516)*x_ref[0]**o+(0.220795864743)*x_ref[0]+(-0.19353913538)*x_ref[1]**o+(0.445131396297)*x_ref[1]+(-0.779605318636)*x_ref[2]**o+(-0.76707264371)*x_ref[2]
-        ref[2,2,0,0]=(-0.357585997171)*x_ref[0]**o+(-0.248795296406)*x_ref[0]+(0.0876364714478)*x_ref[1]**o+(-0.682833482179)*x_ref[1]+(0.497052575986)*x_ref[2]**o+(0.893378007889)*x_ref[2]
-        ref[2,2,0,1]=(0.38067999218)*x_ref[0]**o+(-0.857246232026)*x_ref[0]+(0.0785818284359)*x_ref[1]**o+(-0.473287028123)*x_ref[1]+(-0.763041318956)*x_ref[2]**o+(-0.1119710251)*x_ref[2]
-        ref[2,2,1,0]=(-0.0278856926369)*x_ref[0]**o+(0.435955626553)*x_ref[0]+(-0.676274741782)*x_ref[1]**o+(-0.719721825467)*x_ref[1]+(0.195007734703)*x_ref[2]**o+(0.504771278902)*x_ref[2]
-        ref[2,2,1,1]=(0.459547475772)*x_ref[0]**o+(-0.669041681613)*x_ref[0]+(-0.741957874364)*x_ref[1]**o+(0.604585337407)*x_ref[1]+(-0.886718742046)*x_ref[2]**o+(0.338113237761)*x_ref[2]
-        ref[2,2,2,0]=(0.392926733678)*x_ref[0]**o+(-0.923680589861)*x_ref[0]+(-0.425503328457)*x_ref[1]**o+(-0.0902669250117)*x_ref[1]+(-0.346726072703)*x_ref[2]**o+(0.541482976709)*x_ref[2]
-        ref[2,2,2,1]=(0.134867023616)*x_ref[0]**o+(0.478349607348)*x_ref[0]+(-0.334617836366)*x_ref[1]**o+(-0.74587411744)*x_ref[1]+(-0.880365937567)*x_ref[2]**o+(0.820743064452)*x_ref[2]
-        ref[2,3,0,0]=(0.081184173895)*x_ref[0]**o+(0.315011929905)*x_ref[0]+(-0.137083926616)*x_ref[1]**o+(0.103926223299)*x_ref[1]+(0.363270989968)*x_ref[2]**o+(-0.454075563606)*x_ref[2]
-        ref[2,3,0,1]=(0.457730701321)*x_ref[0]**o+(0.922345625691)*x_ref[0]+(-0.412933933474)*x_ref[1]**o+(-0.546359655103)*x_ref[1]+(0.719101029933)*x_ref[2]**o+(-0.790522859322)*x_ref[2]
-        ref[2,3,1,0]=(-0.811816419841)*x_ref[0]**o+(0.0379298408788)*x_ref[0]+(-0.852643125131)*x_ref[1]**o+(0.76881274254)*x_ref[1]+(0.75214553496)*x_ref[2]**o+(0.800382814403)*x_ref[2]
-        ref[2,3,1,1]=(0.524802143618)*x_ref[0]**o+(-0.717457078371)*x_ref[0]+(0.389026887965)*x_ref[1]**o+(-0.231912558721)*x_ref[1]+(-0.394705562333)*x_ref[2]**o+(-0.794723802655)*x_ref[2]
-        ref[2,3,2,0]=(-0.232215520303)*x_ref[0]**o+(0.994932250617)*x_ref[0]+(-0.760425274222)*x_ref[1]**o+(0.0910727760744)*x_ref[1]+(0.621642024132)*x_ref[2]**o+(0.263978719304)*x_ref[2]
-        ref[2,3,2,1]=(0.515269404424)*x_ref[0]**o+(-0.998266958288)*x_ref[0]+(-0.485078033534)*x_ref[1]**o+(-0.960043247553)*x_ref[1]+(-0.926562413314)*x_ref[2]**o+(0.612710762712)*x_ref[2]
-        ref[2,4,0,0]=(0.419808446591)*x_ref[0]**o+(0.132792190191)*x_ref[0]+(-0.690603562736)*x_ref[1]**o+(0.45137757885)*x_ref[1]+(-0.262249041567)*x_ref[2]**o+(-0.432995254783)*x_ref[2]
-        ref[2,4,0,1]=(0.62413323935)*x_ref[0]**o+(0.963559148607)*x_ref[0]+(-0.879044261015)*x_ref[1]**o+(-0.504981574957)*x_ref[1]+(-0.575204029973)*x_ref[2]**o+(0.066855791448)*x_ref[2]
-        ref[2,4,1,0]=(0.321218662791)*x_ref[0]**o+(0.975103526588)*x_ref[0]+(0.783716185844)*x_ref[1]**o+(-0.816368139389)*x_ref[1]+(0.778169798128)*x_ref[2]**o+(-0.527443068085)*x_ref[2]
-        ref[2,4,1,1]=(-0.8801082648)*x_ref[0]**o+(-0.0313845929272)*x_ref[0]+(0.485262237838)*x_ref[1]**o+(0.0778888535573)*x_ref[1]+(-0.900948214929)*x_ref[2]**o+(-0.98830300089)*x_ref[2]
-        ref[2,4,2,0]=(-0.996395042226)*x_ref[0]**o+(0.253635852642)*x_ref[0]+(0.180965173659)*x_ref[1]**o+(-0.488294662459)*x_ref[1]+(-0.144583511741)*x_ref[2]**o+(0.285854081388)*x_ref[2]
-        ref[2,4,2,1]=(0.00988506292061)*x_ref[0]**o+(-0.00192786315452)*x_ref[0]+(0.720775470647)*x_ref[1]**o+(-0.587673311506)*x_ref[1]+(0.313836238675)*x_ref[2]**o+(0.45975125457)*x_ref[2]
-        ref[3,0,0,0]=(-0.822049489749)*x_ref[0]**o+(-0.989589435175)*x_ref[0]+(-0.0943830434118)*x_ref[1]**o+(-0.789229900035)*x_ref[1]+(0.311382619317)*x_ref[2]**o+(-0.316646938685)*x_ref[2]
-        ref[3,0,0,1]=(0.501517916677)*x_ref[0]**o+(-0.704502365436)*x_ref[0]+(0.913184728006)*x_ref[1]**o+(-0.843712848791)*x_ref[1]+(0.901479696878)*x_ref[2]**o+(-0.713893336542)*x_ref[2]
-        ref[3,0,1,0]=(0.0771592811086)*x_ref[0]**o+(0.796038032206)*x_ref[0]+(0.566256212871)*x_ref[1]**o+(0.394136659986)*x_ref[1]+(-0.794422065388)*x_ref[2]**o+(0.662174992848)*x_ref[2]
-        ref[3,0,1,1]=(0.180225115167)*x_ref[0]**o+(0.366965867971)*x_ref[0]+(-0.244015756153)*x_ref[1]**o+(0.433571067335)*x_ref[1]+(0.129075150185)*x_ref[2]**o+(-0.216304414605)*x_ref[2]
-        ref[3,0,2,0]=(0.100277967034)*x_ref[0]**o+(-0.590583546786)*x_ref[0]+(-0.595553697152)*x_ref[1]**o+(0.923573252239)*x_ref[1]+(0.578966663184)*x_ref[2]**o+(-0.411082913097)*x_ref[2]
-        ref[3,0,2,1]=(-0.575315696811)*x_ref[0]**o+(0.608760285918)*x_ref[0]+(-0.3592074605)*x_ref[1]**o+(0.515119945308)*x_ref[1]+(-0.4000138306)*x_ref[2]**o+(0.477685324937)*x_ref[2]
-        ref[3,1,0,0]=(0.0780014276919)*x_ref[0]**o+(-0.0932830671471)*x_ref[0]+(0.39477236642)*x_ref[1]**o+(0.406673135556)*x_ref[1]+(-0.235480707568)*x_ref[2]**o+(-0.872302257144)*x_ref[2]
-        ref[3,1,0,1]=(0.170573072646)*x_ref[0]**o+(0.868146561326)*x_ref[0]+(0.262136343896)*x_ref[1]**o+(0.192343529912)*x_ref[1]+(0.157400965693)*x_ref[2]**o+(-0.932981619473)*x_ref[2]
-        ref[3,1,1,0]=(0.891433179291)*x_ref[0]**o+(-0.281396449997)*x_ref[0]+(-0.0803173619772)*x_ref[1]**o+(-0.378460054356)*x_ref[1]+(-0.581578656014)*x_ref[2]**o+(-0.65856067509)*x_ref[2]
-        ref[3,1,1,1]=(0.343599956626)*x_ref[0]**o+(-0.92063694125)*x_ref[0]+(0.440698102072)*x_ref[1]**o+(0.767124166388)*x_ref[1]+(0.050964317543)*x_ref[2]**o+(1.35605562239e-05)*x_ref[2]
-        ref[3,1,2,0]=(-0.614268150987)*x_ref[0]**o+(0.363806471556)*x_ref[0]+(0.92193457905)*x_ref[1]**o+(0.157919580642)*x_ref[1]+(-0.955575321124)*x_ref[2]**o+(-0.984808437666)*x_ref[2]
-        ref[3,1,2,1]=(0.030099648966)*x_ref[0]**o+(-0.375999369491)*x_ref[0]+(-0.0992643926008)*x_ref[1]**o+(0.109209161093)*x_ref[1]+(-0.974043780088)*x_ref[2]**o+(0.908049658745)*x_ref[2]
-        ref[3,2,0,0]=(0.297771341106)*x_ref[0]**o+(-0.637802228169)*x_ref[0]+(0.398100441783)*x_ref[1]**o+(-0.0643425181651)*x_ref[1]+(0.662775339033)*x_ref[2]**o+(0.744835182052)*x_ref[2]
-        ref[3,2,0,1]=(0.312026420583)*x_ref[0]**o+(0.865855052574)*x_ref[0]+(0.0195001783165)*x_ref[1]**o+(0.537899238473)*x_ref[1]+(0.554893357481)*x_ref[2]**o+(0.71555610145)*x_ref[2]
-        ref[3,2,1,0]=(-0.199138146186)*x_ref[0]**o+(0.827546489855)*x_ref[0]+(-0.480965464736)*x_ref[1]**o+(-0.473796093187)*x_ref[1]+(0.880264675049)*x_ref[2]**o+(0.544506670844)*x_ref[2]
-        ref[3,2,1,1]=(0.773798005008)*x_ref[0]**o+(0.744945241634)*x_ref[0]+(0.548170564608)*x_ref[1]**o+(-0.560503692823)*x_ref[1]+(-0.435630215427)*x_ref[2]**o+(0.080015730707)*x_ref[2]
-        ref[3,2,2,0]=(0.36735714937)*x_ref[0]**o+(-0.867071557873)*x_ref[0]+(0.936135650431)*x_ref[1]**o+(-0.432533600524)*x_ref[1]+(-0.0224430204069)*x_ref[2]**o+(0.218590302621)*x_ref[2]
-        ref[3,2,2,1]=(0.932808382499)*x_ref[0]**o+(-0.0970016713319)*x_ref[0]+(0.458943467579)*x_ref[1]**o+(-0.134338789898)*x_ref[1]+(-0.426892557314)*x_ref[2]**o+(0.627071826863)*x_ref[2]
-        ref[3,3,0,0]=(-0.623804149075)*x_ref[0]**o+(0.910423590172)*x_ref[0]+(0.465938181097)*x_ref[1]**o+(0.495479245391)*x_ref[1]+(0.693745442185)*x_ref[2]**o+(-0.437014226757)*x_ref[2]
-        ref[3,3,0,1]=(0.598807017496)*x_ref[0]**o+(-0.112361840211)*x_ref[0]+(-0.550899685213)*x_ref[1]**o+(-0.0478222019564)*x_ref[1]+(-0.0110129517693)*x_ref[2]**o+(-0.059534786374)*x_ref[2]
-        ref[3,3,1,0]=(-0.561155633409)*x_ref[0]**o+(-0.463563057636)*x_ref[0]+(-0.170463996009)*x_ref[1]**o+(-0.214509204942)*x_ref[1]+(0.851200198666)*x_ref[2]**o+(-0.721036329689)*x_ref[2]
-        ref[3,3,1,1]=(0.608666240405)*x_ref[0]**o+(0.814232455115)*x_ref[0]+(-0.604645629689)*x_ref[1]**o+(0.960976509673)*x_ref[1]+(0.365807996219)*x_ref[2]**o+(-0.87491909238)*x_ref[2]
-        ref[3,3,2,0]=(0.120126988418)*x_ref[0]**o+(-0.745687314825)*x_ref[0]+(-0.332697826984)*x_ref[1]**o+(-0.823683406516)*x_ref[1]+(0.305444079613)*x_ref[2]**o+(0.901972115441)*x_ref[2]
-        ref[3,3,2,1]=(0.0470293848904)*x_ref[0]**o+(-0.195496754814)*x_ref[0]+(0.671870114105)*x_ref[1]**o+(0.170273146371)*x_ref[1]+(-0.851927986188)*x_ref[2]**o+(0.772192863973)*x_ref[2]
-        ref[3,4,0,0]=(-0.95392341727)*x_ref[0]**o+(-0.665694215521)*x_ref[0]+(-0.0247396499378)*x_ref[1]**o+(0.441352857387)*x_ref[1]+(0.767156547791)*x_ref[2]**o+(-0.14696372018)*x_ref[2]
-        ref[3,4,0,1]=(0.209761166815)*x_ref[0]**o+(0.978934473425)*x_ref[0]+(0.943806891053)*x_ref[1]**o+(-0.756619917601)*x_ref[1]+(0.635699949764)*x_ref[2]**o+(-0.345248269568)*x_ref[2]
-        ref[3,4,1,0]=(0.748020785785)*x_ref[0]**o+(0.311104549542)*x_ref[0]+(0.739127551248)*x_ref[1]**o+(-0.635238575859)*x_ref[1]+(0.623898875653)*x_ref[2]**o+(0.343407392068)*x_ref[2]
-        ref[3,4,1,1]=(-0.422500892471)*x_ref[0]**o+(0.0688495013346)*x_ref[0]+(-0.919653906232)*x_ref[1]**o+(0.531036586396)*x_ref[1]+(-0.22487910672)*x_ref[2]**o+(-0.848225994541)*x_ref[2]
-        ref[3,4,2,0]=(0.723965744673)*x_ref[0]**o+(0.558602959224)*x_ref[0]+(0.699539243308)*x_ref[1]**o+(-0.597426541715)*x_ref[1]+(-0.0128675070522)*x_ref[2]**o+(-0.874796626242)*x_ref[2]
-        ref[3,4,2,1]=(-0.962970021216)*x_ref[0]**o+(0.532886481874)*x_ref[0]+(-0.523159705965)*x_ref[1]**o+(-0.82887407638)*x_ref[1]+(0.874288116843)*x_ref[2]**o+(0.520024515804)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.0603413935246)*x[0]**o+(-0.70184894912)*x[0]+(-0.206341392562)*x[1]**o+(0.892585857385)*x[1]
-        ref=(-0.0603413935246)*x_ref[0]**o+(-0.70184894912)*x_ref[0]+(-0.206341392562)*x_ref[1]**o+(0.892585857385)*x_ref[1]
-      else:
-        arg=(0.120763612793)*x[0]**o+(-0.298506957699)*x[0]+(0.0620633729217)*x[1]**o+(0.807000465544)*x[1]+(-0.564443939995)*x[2]**o+(0.820783035273)*x[2]
-        ref=(0.120763612793)*x_ref[0]**o+(-0.298506957699)*x_ref[0]+(0.0620633729217)*x_ref[1]**o+(0.807000465544)*x_ref[1]+(-0.564443939995)*x_ref[2]**o+(0.820783035273)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.69193390973)*x[0]**o+(-0.768888031033)*x[0]+(-0.813493496124)*x[1]**o+(-0.767059499773)*x[1]
-        arg[1]=(0.111870073987)*x[0]**o+(-0.196406293238)*x[0]+(-0.10683601134)*x[1]**o+(0.69972228684)*x[1]
-        ref[0]=(-0.69193390973)*x_ref[0]**o+(-0.768888031033)*x_ref[0]+(-0.813493496124)*x_ref[1]**o+(-0.767059499773)*x_ref[1]
-        ref[1]=(0.111870073987)*x_ref[0]**o+(-0.196406293238)*x_ref[0]+(-0.10683601134)*x_ref[1]**o+(0.69972228684)*x_ref[1]
-      else:
-        arg[0]=(-0.20606732369)*x[0]**o+(0.773916734719)*x[0]+(-0.915594370888)*x[1]**o+(-0.684202475504)*x[1]+(0.161644377631)*x[2]**o+(-0.834568364942)*x[2]
-        arg[1]=(-0.475848931399)*x[0]**o+(-0.967325026091)*x[0]+(0.371032251427)*x[1]**o+(0.976933923378)*x[1]+(0.326121409381)*x[2]**o+(0.880666151318)*x[2]
-        ref[0]=(-0.20606732369)*x_ref[0]**o+(0.773916734719)*x_ref[0]+(-0.915594370888)*x_ref[1]**o+(-0.684202475504)*x_ref[1]+(0.161644377631)*x_ref[2]**o+(-0.834568364942)*x_ref[2]
-        ref[1]=(-0.475848931399)*x_ref[0]**o+(-0.967325026091)*x_ref[0]+(0.371032251427)*x_ref[1]**o+(0.976933923378)*x_ref[1]+(0.326121409381)*x_ref[2]**o+(0.880666151318)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.664616598004)*x[0]**o+(0.159791014359)*x[0]+(-0.3747223278)*x[1]**o+(0.302802720584)*x[1]
-        arg[0,1]=(-0.334311194265)*x[0]**o+(0.865855840771)*x[0]+(-0.0184933229609)*x[1]**o+(0.589277746683)*x[1]
-        arg[0,2]=(0.685266031246)*x[0]**o+(0.846357835994)*x[0]+(0.233422031025)*x[1]**o+(0.391225449794)*x[1]
-        arg[0,3]=(-0.889412463645)*x[0]**o+(0.336985584587)*x[0]+(-0.311629085429)*x[1]**o+(-0.574756125055)*x[1]
-        arg[0,4]=(-0.786434255596)*x[0]**o+(0.897529643329)*x[0]+(0.112631455142)*x[1]**o+(0.501957817255)*x[1]
-        arg[1,0]=(-0.841995669352)*x[0]**o+(-0.372241861224)*x[0]+(0.669429619157)*x[1]**o+(0.913007793035)*x[1]
-        arg[1,1]=(-0.965486931849)*x[0]**o+(-0.163330142621)*x[0]+(0.302996628649)*x[1]**o+(-0.214176383433)*x[1]
-        arg[1,2]=(-0.717841677595)*x[0]**o+(-0.560453345617)*x[0]+(0.885221610478)*x[1]**o+(0.0925933897521)*x[1]
-        arg[1,3]=(0.827380987548)*x[0]**o+(-0.185460343082)*x[0]+(-0.618848726331)*x[1]**o+(-0.25427152262)*x[1]
-        arg[1,4]=(-0.232848766689)*x[0]**o+(-0.812427149527)*x[0]+(-0.6328125174)*x[1]**o+(0.377849173478)*x[1]
-        arg[2,0]=(0.725568000689)*x[0]**o+(-0.0119648722611)*x[0]+(0.0551179058345)*x[1]**o+(-0.313601095535)*x[1]
-        arg[2,1]=(-0.371331280463)*x[0]**o+(0.164812693414)*x[0]+(0.140689113041)*x[1]**o+(0.866863122864)*x[1]
-        arg[2,2]=(0.445443472696)*x[0]**o+(0.885420986537)*x[0]+(0.434326737693)*x[1]**o+(0.013677800309)*x[1]
-        arg[2,3]=(0.186221146816)*x[0]**o+(0.919506151782)*x[0]+(-0.163957717851)*x[1]**o+(-0.533309231769)*x[1]
-        arg[2,4]=(0.137164729623)*x[0]**o+(0.561715777859)*x[0]+(0.33724606372)*x[1]**o+(-0.554531877504)*x[1]
-        arg[3,0]=(-0.0632399630146)*x[0]**o+(0.712014652956)*x[0]+(0.107109261787)*x[1]**o+(0.228670262705)*x[1]
-        arg[3,1]=(-0.973793135038)*x[0]**o+(0.923465546039)*x[0]+(0.189825544105)*x[1]**o+(-0.33784496447)*x[1]
-        arg[3,2]=(-0.12686258826)*x[0]**o+(-0.582653698893)*x[0]+(0.860503162549)*x[1]**o+(-0.477305983221)*x[1]
-        arg[3,3]=(-0.407988306429)*x[0]**o+(-0.174396602789)*x[0]+(0.646815890222)*x[1]**o+(-0.450974163079)*x[1]
-        arg[3,4]=(0.162458379489)*x[0]**o+(-0.0569354582388)*x[0]+(0.0463216806125)*x[1]**o+(-0.381777259635)*x[1]
-        ref[0,0]=(-0.664616598004)*x_ref[0]**o+(0.159791014359)*x_ref[0]+(-0.3747223278)*x_ref[1]**o+(0.302802720584)*x_ref[1]
-        ref[0,1]=(-0.334311194265)*x_ref[0]**o+(0.865855840771)*x_ref[0]+(-0.0184933229609)*x_ref[1]**o+(0.589277746683)*x_ref[1]
-        ref[0,2]=(0.685266031246)*x_ref[0]**o+(0.846357835994)*x_ref[0]+(0.233422031025)*x_ref[1]**o+(0.391225449794)*x_ref[1]
-        ref[0,3]=(-0.889412463645)*x_ref[0]**o+(0.336985584587)*x_ref[0]+(-0.311629085429)*x_ref[1]**o+(-0.574756125055)*x_ref[1]
-        ref[0,4]=(-0.786434255596)*x_ref[0]**o+(0.897529643329)*x_ref[0]+(0.112631455142)*x_ref[1]**o+(0.501957817255)*x_ref[1]
-        ref[1,0]=(-0.841995669352)*x_ref[0]**o+(-0.372241861224)*x_ref[0]+(0.669429619157)*x_ref[1]**o+(0.913007793035)*x_ref[1]
-        ref[1,1]=(-0.965486931849)*x_ref[0]**o+(-0.163330142621)*x_ref[0]+(0.302996628649)*x_ref[1]**o+(-0.214176383433)*x_ref[1]
-        ref[1,2]=(-0.717841677595)*x_ref[0]**o+(-0.560453345617)*x_ref[0]+(0.885221610478)*x_ref[1]**o+(0.0925933897521)*x_ref[1]
-        ref[1,3]=(0.827380987548)*x_ref[0]**o+(-0.185460343082)*x_ref[0]+(-0.618848726331)*x_ref[1]**o+(-0.25427152262)*x_ref[1]
-        ref[1,4]=(-0.232848766689)*x_ref[0]**o+(-0.812427149527)*x_ref[0]+(-0.6328125174)*x_ref[1]**o+(0.377849173478)*x_ref[1]
-        ref[2,0]=(0.725568000689)*x_ref[0]**o+(-0.0119648722611)*x_ref[0]+(0.0551179058345)*x_ref[1]**o+(-0.313601095535)*x_ref[1]
-        ref[2,1]=(-0.371331280463)*x_ref[0]**o+(0.164812693414)*x_ref[0]+(0.140689113041)*x_ref[1]**o+(0.866863122864)*x_ref[1]
-        ref[2,2]=(0.445443472696)*x_ref[0]**o+(0.885420986537)*x_ref[0]+(0.434326737693)*x_ref[1]**o+(0.013677800309)*x_ref[1]
-        ref[2,3]=(0.186221146816)*x_ref[0]**o+(0.919506151782)*x_ref[0]+(-0.163957717851)*x_ref[1]**o+(-0.533309231769)*x_ref[1]
-        ref[2,4]=(0.137164729623)*x_ref[0]**o+(0.561715777859)*x_ref[0]+(0.33724606372)*x_ref[1]**o+(-0.554531877504)*x_ref[1]
-        ref[3,0]=(-0.0632399630146)*x_ref[0]**o+(0.712014652956)*x_ref[0]+(0.107109261787)*x_ref[1]**o+(0.228670262705)*x_ref[1]
-        ref[3,1]=(-0.973793135038)*x_ref[0]**o+(0.923465546039)*x_ref[0]+(0.189825544105)*x_ref[1]**o+(-0.33784496447)*x_ref[1]
-        ref[3,2]=(-0.12686258826)*x_ref[0]**o+(-0.582653698893)*x_ref[0]+(0.860503162549)*x_ref[1]**o+(-0.477305983221)*x_ref[1]
-        ref[3,3]=(-0.407988306429)*x_ref[0]**o+(-0.174396602789)*x_ref[0]+(0.646815890222)*x_ref[1]**o+(-0.450974163079)*x_ref[1]
-        ref[3,4]=(0.162458379489)*x_ref[0]**o+(-0.0569354582388)*x_ref[0]+(0.0463216806125)*x_ref[1]**o+(-0.381777259635)*x_ref[1]
-      else:
-        arg[0,0]=(0.865079887449)*x[0]**o+(-0.833757275547)*x[0]+(-0.967658088049)*x[1]**o+(-0.168314490396)*x[1]+(0.151618201772)*x[2]**o+(-0.251062354355)*x[2]
-        arg[0,1]=(0.110207997589)*x[0]**o+(-0.510994295641)*x[0]+(0.855215902178)*x[1]**o+(0.941502315255)*x[1]+(-0.794874945971)*x[2]**o+(-0.309190709938)*x[2]
-        arg[0,2]=(0.71701217173)*x[0]**o+(-0.221333357165)*x[0]+(0.689963224026)*x[1]**o+(0.221517236085)*x[1]+(-0.52608140393)*x[2]**o+(0.371488496481)*x[2]
-        arg[0,3]=(0.618194041415)*x[0]**o+(0.454387091678)*x[0]+(-0.707329629946)*x[1]**o+(0.41972715681)*x[1]+(0.0180789814415)*x[2]**o+(-0.176487980225)*x[2]
-        arg[0,4]=(0.329275243989)*x[0]**o+(-0.679005993002)*x[0]+(-0.261017436418)*x[1]**o+(0.151780687062)*x[1]+(-0.480936330475)*x[2]**o+(-0.697077234587)*x[2]
-        arg[1,0]=(0.720913763906)*x[0]**o+(0.283486705277)*x[0]+(0.498289077088)*x[1]**o+(0.657543220863)*x[1]+(-0.666293219679)*x[2]**o+(0.901456618353)*x[2]
-        arg[1,1]=(-0.984526350563)*x[0]**o+(0.677118292603)*x[0]+(0.614707818107)*x[1]**o+(0.272173514554)*x[1]+(0.41492971828)*x[2]**o+(0.274511869871)*x[2]
-        arg[1,2]=(0.322224985373)*x[0]**o+(0.567272204545)*x[0]+(-0.437313912332)*x[1]**o+(0.847486025896)*x[1]+(0.769434908781)*x[2]**o+(0.325917607497)*x[2]
-        arg[1,3]=(0.709357837264)*x[0]**o+(0.927425103914)*x[0]+(-0.622876388501)*x[1]**o+(-0.296141603555)*x[1]+(-0.038448878923)*x[2]**o+(-0.320692580169)*x[2]
-        arg[1,4]=(-0.27890333885)*x[0]**o+(0.803346569394)*x[0]+(0.00665934218255)*x[1]**o+(-0.89057979428)*x[1]+(-0.727135553706)*x[2]**o+(0.892946022497)*x[2]
-        arg[2,0]=(0.579951394388)*x[0]**o+(0.0406506913385)*x[0]+(0.363944368798)*x[1]**o+(0.582732756951)*x[1]+(0.542548838027)*x[2]**o+(0.365742797343)*x[2]
-        arg[2,1]=(0.253260777874)*x[0]**o+(-0.69077350875)*x[0]+(0.458080700492)*x[1]**o+(-0.79224006672)*x[1]+(-0.504865679524)*x[2]**o+(0.681425632809)*x[2]
-        arg[2,2]=(0.600427718261)*x[0]**o+(0.91761242151)*x[0]+(0.602316047463)*x[1]**o+(0.890383614185)*x[1]+(-0.386691039525)*x[2]**o+(0.688659949109)*x[2]
-        arg[2,3]=(-0.181338810914)*x[0]**o+(0.933744241999)*x[0]+(0.0212774093137)*x[1]**o+(0.284972854884)*x[1]+(-0.150219922419)*x[2]**o+(0.0878011402107)*x[2]
-        arg[2,4]=(-0.848985879538)*x[0]**o+(0.298962025531)*x[0]+(0.593300576179)*x[1]**o+(0.301509253541)*x[1]+(0.971171084219)*x[2]**o+(-0.973386482857)*x[2]
-        arg[3,0]=(-0.735608389534)*x[0]**o+(0.44902436426)*x[0]+(0.0536456095512)*x[1]**o+(0.208969935548)*x[1]+(-0.787609300211)*x[2]**o+(0.726024812477)*x[2]
-        arg[3,1]=(0.200882171943)*x[0]**o+(-0.644461780745)*x[0]+(-0.0995704510264)*x[1]**o+(-0.857730241944)*x[1]+(-0.372302969302)*x[2]**o+(-0.171367954739)*x[2]
-        arg[3,2]=(-0.673606332627)*x[0]**o+(-0.828183678442)*x[0]+(-0.236856099365)*x[1]**o+(-0.266339053288)*x[1]+(-0.972034740204)*x[2]**o+(-0.33151750348)*x[2]
-        arg[3,3]=(-0.312470720017)*x[0]**o+(-0.657433718629)*x[0]+(-0.984940036612)*x[1]**o+(0.197707053145)*x[1]+(0.512009064643)*x[2]**o+(0.855601033248)*x[2]
-        arg[3,4]=(-0.674854508228)*x[0]**o+(-0.394035682831)*x[0]+(-0.749446232511)*x[1]**o+(0.866992763518)*x[1]+(-0.945837361158)*x[2]**o+(0.593490782481)*x[2]
-        ref[0,0]=(0.865079887449)*x_ref[0]**o+(-0.833757275547)*x_ref[0]+(-0.967658088049)*x_ref[1]**o+(-0.168314490396)*x_ref[1]+(0.151618201772)*x_ref[2]**o+(-0.251062354355)*x_ref[2]
-        ref[0,1]=(0.110207997589)*x_ref[0]**o+(-0.510994295641)*x_ref[0]+(0.855215902178)*x_ref[1]**o+(0.941502315255)*x_ref[1]+(-0.794874945971)*x_ref[2]**o+(-0.309190709938)*x_ref[2]
-        ref[0,2]=(0.71701217173)*x_ref[0]**o+(-0.221333357165)*x_ref[0]+(0.689963224026)*x_ref[1]**o+(0.221517236085)*x_ref[1]+(-0.52608140393)*x_ref[2]**o+(0.371488496481)*x_ref[2]
-        ref[0,3]=(0.618194041415)*x_ref[0]**o+(0.454387091678)*x_ref[0]+(-0.707329629946)*x_ref[1]**o+(0.41972715681)*x_ref[1]+(0.0180789814415)*x_ref[2]**o+(-0.176487980225)*x_ref[2]
-        ref[0,4]=(0.329275243989)*x_ref[0]**o+(-0.679005993002)*x_ref[0]+(-0.261017436418)*x_ref[1]**o+(0.151780687062)*x_ref[1]+(-0.480936330475)*x_ref[2]**o+(-0.697077234587)*x_ref[2]
-        ref[1,0]=(0.720913763906)*x_ref[0]**o+(0.283486705277)*x_ref[0]+(0.498289077088)*x_ref[1]**o+(0.657543220863)*x_ref[1]+(-0.666293219679)*x_ref[2]**o+(0.901456618353)*x_ref[2]
-        ref[1,1]=(-0.984526350563)*x_ref[0]**o+(0.677118292603)*x_ref[0]+(0.614707818107)*x_ref[1]**o+(0.272173514554)*x_ref[1]+(0.41492971828)*x_ref[2]**o+(0.274511869871)*x_ref[2]
-        ref[1,2]=(0.322224985373)*x_ref[0]**o+(0.567272204545)*x_ref[0]+(-0.437313912332)*x_ref[1]**o+(0.847486025896)*x_ref[1]+(0.769434908781)*x_ref[2]**o+(0.325917607497)*x_ref[2]
-        ref[1,3]=(0.709357837264)*x_ref[0]**o+(0.927425103914)*x_ref[0]+(-0.622876388501)*x_ref[1]**o+(-0.296141603555)*x_ref[1]+(-0.038448878923)*x_ref[2]**o+(-0.320692580169)*x_ref[2]
-        ref[1,4]=(-0.27890333885)*x_ref[0]**o+(0.803346569394)*x_ref[0]+(0.00665934218255)*x_ref[1]**o+(-0.89057979428)*x_ref[1]+(-0.727135553706)*x_ref[2]**o+(0.892946022497)*x_ref[2]
-        ref[2,0]=(0.579951394388)*x_ref[0]**o+(0.0406506913385)*x_ref[0]+(0.363944368798)*x_ref[1]**o+(0.582732756951)*x_ref[1]+(0.542548838027)*x_ref[2]**o+(0.365742797343)*x_ref[2]
-        ref[2,1]=(0.253260777874)*x_ref[0]**o+(-0.69077350875)*x_ref[0]+(0.458080700492)*x_ref[1]**o+(-0.79224006672)*x_ref[1]+(-0.504865679524)*x_ref[2]**o+(0.681425632809)*x_ref[2]
-        ref[2,2]=(0.600427718261)*x_ref[0]**o+(0.91761242151)*x_ref[0]+(0.602316047463)*x_ref[1]**o+(0.890383614185)*x_ref[1]+(-0.386691039525)*x_ref[2]**o+(0.688659949109)*x_ref[2]
-        ref[2,3]=(-0.181338810914)*x_ref[0]**o+(0.933744241999)*x_ref[0]+(0.0212774093137)*x_ref[1]**o+(0.284972854884)*x_ref[1]+(-0.150219922419)*x_ref[2]**o+(0.0878011402107)*x_ref[2]
-        ref[2,4]=(-0.848985879538)*x_ref[0]**o+(0.298962025531)*x_ref[0]+(0.593300576179)*x_ref[1]**o+(0.301509253541)*x_ref[1]+(0.971171084219)*x_ref[2]**o+(-0.973386482857)*x_ref[2]
-        ref[3,0]=(-0.735608389534)*x_ref[0]**o+(0.44902436426)*x_ref[0]+(0.0536456095512)*x_ref[1]**o+(0.208969935548)*x_ref[1]+(-0.787609300211)*x_ref[2]**o+(0.726024812477)*x_ref[2]
-        ref[3,1]=(0.200882171943)*x_ref[0]**o+(-0.644461780745)*x_ref[0]+(-0.0995704510264)*x_ref[1]**o+(-0.857730241944)*x_ref[1]+(-0.372302969302)*x_ref[2]**o+(-0.171367954739)*x_ref[2]
-        ref[3,2]=(-0.673606332627)*x_ref[0]**o+(-0.828183678442)*x_ref[0]+(-0.236856099365)*x_ref[1]**o+(-0.266339053288)*x_ref[1]+(-0.972034740204)*x_ref[2]**o+(-0.33151750348)*x_ref[2]
-        ref[3,3]=(-0.312470720017)*x_ref[0]**o+(-0.657433718629)*x_ref[0]+(-0.984940036612)*x_ref[1]**o+(0.197707053145)*x_ref[1]+(0.512009064643)*x_ref[2]**o+(0.855601033248)*x_ref[2]
-        ref[3,4]=(-0.674854508228)*x_ref[0]**o+(-0.394035682831)*x_ref[0]+(-0.749446232511)*x_ref[1]**o+(0.866992763518)*x_ref[1]+(-0.945837361158)*x_ref[2]**o+(0.593490782481)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.511844892619)*x[0]**o+(0.72447480361)*x[0]+(-0.415725587152)*x[1]**o+(-0.495233818217)*x[1]
-        arg[0,0,1]=(0.513861713949)*x[0]**o+(-0.918192893835)*x[0]+(0.563871531176)*x[1]**o+(0.885768393284)*x[1]
-        arg[0,1,0]=(-0.412320762031)*x[0]**o+(0.576776422795)*x[0]+(0.0103535112247)*x[1]**o+(-0.738144219037)*x[1]
-        arg[0,1,1]=(0.69941105604)*x[0]**o+(0.923470022558)*x[0]+(0.568449180547)*x[1]**o+(0.361429609343)*x[1]
-        arg[1,0,0]=(-0.574139432427)*x[0]**o+(0.968980609212)*x[0]+(-0.198809151818)*x[1]**o+(0.751623099192)*x[1]
-        arg[1,0,1]=(-0.743433955873)*x[0]**o+(-0.608013190658)*x[0]+(-0.0625473402572)*x[1]**o+(0.168418241981)*x[1]
-        arg[1,1,0]=(-0.632180449517)*x[0]**o+(-0.892666803222)*x[0]+(-0.558127678438)*x[1]**o+(0.212462582041)*x[1]
-        arg[1,1,1]=(-0.666381769622)*x[0]**o+(-0.0299308846938)*x[0]+(-0.450221481906)*x[1]**o+(0.701099654576)*x[1]
-        arg[2,0,0]=(-0.927832262778)*x[0]**o+(0.901665098705)*x[0]+(-0.0462955000541)*x[1]**o+(-0.92139600993)*x[1]
-        arg[2,0,1]=(-0.813732112672)*x[0]**o+(0.569194058283)*x[0]+(-0.527298120198)*x[1]**o+(-0.531607593369)*x[1]
-        arg[2,1,0]=(-0.760238058111)*x[0]**o+(0.628718839289)*x[0]+(-0.420066582474)*x[1]**o+(-0.205537665056)*x[1]
-        arg[2,1,1]=(0.421784629744)*x[0]**o+(-0.781451031751)*x[0]+(-0.0401156726902)*x[1]**o+(0.437044655245)*x[1]
-        arg[3,0,0]=(0.324136561188)*x[0]**o+(-0.920235828584)*x[0]+(0.677675509043)*x[1]**o+(0.322337884254)*x[1]
-        arg[3,0,1]=(-0.0711813236306)*x[0]**o+(0.0770312838088)*x[0]+(0.259613502243)*x[1]**o+(0.508154611576)*x[1]
-        arg[3,1,0]=(0.944048224599)*x[0]**o+(0.039954080407)*x[0]+(-0.503309434151)*x[1]**o+(0.747109874504)*x[1]
-        arg[3,1,1]=(0.692616323513)*x[0]**o+(0.0114568310884)*x[0]+(0.0708318026263)*x[1]**o+(0.822167043168)*x[1]
-        arg[4,0,0]=(0.392645136008)*x[0]**o+(0.160054219263)*x[0]+(-0.32320145108)*x[1]**o+(0.598963113077)*x[1]
-        arg[4,0,1]=(0.124778736846)*x[0]**o+(0.949589553291)*x[0]+(0.0985585514202)*x[1]**o+(-0.536684039884)*x[1]
-        arg[4,1,0]=(-0.983690591076)*x[0]**o+(-0.115321512368)*x[0]+(0.0875590878092)*x[1]**o+(0.992162964289)*x[1]
-        arg[4,1,1]=(-0.89264628952)*x[0]**o+(0.414589880453)*x[0]+(-0.40959764673)*x[1]**o+(-0.261016337239)*x[1]
-        arg[5,0,0]=(-0.613553175002)*x[0]**o+(0.320685999723)*x[0]+(-0.523099455238)*x[1]**o+(0.855780524769)*x[1]
-        arg[5,0,1]=(-0.45911360029)*x[0]**o+(-0.285942390871)*x[0]+(0.7279702976)*x[1]**o+(0.981483922949)*x[1]
-        arg[5,1,0]=(0.577254626037)*x[0]**o+(0.146911866492)*x[0]+(-0.414545328014)*x[1]**o+(-0.979179708006)*x[1]
-        arg[5,1,1]=(-0.838392720256)*x[0]**o+(-0.51717223091)*x[0]+(0.635616756614)*x[1]**o+(0.112711970543)*x[1]
-        ref[0,0,0]=(-0.511844892619)*x_ref[0]**o+(0.72447480361)*x_ref[0]+(-0.415725587152)*x_ref[1]**o+(-0.495233818217)*x_ref[1]
-        ref[0,0,1]=(0.513861713949)*x_ref[0]**o+(-0.918192893835)*x_ref[0]+(0.563871531176)*x_ref[1]**o+(0.885768393284)*x_ref[1]
-        ref[0,1,0]=(-0.412320762031)*x_ref[0]**o+(0.576776422795)*x_ref[0]+(0.0103535112247)*x_ref[1]**o+(-0.738144219037)*x_ref[1]
-        ref[0,1,1]=(0.69941105604)*x_ref[0]**o+(0.923470022558)*x_ref[0]+(0.568449180547)*x_ref[1]**o+(0.361429609343)*x_ref[1]
-        ref[1,0,0]=(-0.574139432427)*x_ref[0]**o+(0.968980609212)*x_ref[0]+(-0.198809151818)*x_ref[1]**o+(0.751623099192)*x_ref[1]
-        ref[1,0,1]=(-0.743433955873)*x_ref[0]**o+(-0.608013190658)*x_ref[0]+(-0.0625473402572)*x_ref[1]**o+(0.168418241981)*x_ref[1]
-        ref[1,1,0]=(-0.632180449517)*x_ref[0]**o+(-0.892666803222)*x_ref[0]+(-0.558127678438)*x_ref[1]**o+(0.212462582041)*x_ref[1]
-        ref[1,1,1]=(-0.666381769622)*x_ref[0]**o+(-0.0299308846938)*x_ref[0]+(-0.450221481906)*x_ref[1]**o+(0.701099654576)*x_ref[1]
-        ref[2,0,0]=(-0.927832262778)*x_ref[0]**o+(0.901665098705)*x_ref[0]+(-0.0462955000541)*x_ref[1]**o+(-0.92139600993)*x_ref[1]
-        ref[2,0,1]=(-0.813732112672)*x_ref[0]**o+(0.569194058283)*x_ref[0]+(-0.527298120198)*x_ref[1]**o+(-0.531607593369)*x_ref[1]
-        ref[2,1,0]=(-0.760238058111)*x_ref[0]**o+(0.628718839289)*x_ref[0]+(-0.420066582474)*x_ref[1]**o+(-0.205537665056)*x_ref[1]
-        ref[2,1,1]=(0.421784629744)*x_ref[0]**o+(-0.781451031751)*x_ref[0]+(-0.0401156726902)*x_ref[1]**o+(0.437044655245)*x_ref[1]
-        ref[3,0,0]=(0.324136561188)*x_ref[0]**o+(-0.920235828584)*x_ref[0]+(0.677675509043)*x_ref[1]**o+(0.322337884254)*x_ref[1]
-        ref[3,0,1]=(-0.0711813236306)*x_ref[0]**o+(0.0770312838088)*x_ref[0]+(0.259613502243)*x_ref[1]**o+(0.508154611576)*x_ref[1]
-        ref[3,1,0]=(0.944048224599)*x_ref[0]**o+(0.039954080407)*x_ref[0]+(-0.503309434151)*x_ref[1]**o+(0.747109874504)*x_ref[1]
-        ref[3,1,1]=(0.692616323513)*x_ref[0]**o+(0.0114568310884)*x_ref[0]+(0.0708318026263)*x_ref[1]**o+(0.822167043168)*x_ref[1]
-        ref[4,0,0]=(0.392645136008)*x_ref[0]**o+(0.160054219263)*x_ref[0]+(-0.32320145108)*x_ref[1]**o+(0.598963113077)*x_ref[1]
-        ref[4,0,1]=(0.124778736846)*x_ref[0]**o+(0.949589553291)*x_ref[0]+(0.0985585514202)*x_ref[1]**o+(-0.536684039884)*x_ref[1]
-        ref[4,1,0]=(-0.983690591076)*x_ref[0]**o+(-0.115321512368)*x_ref[0]+(0.0875590878092)*x_ref[1]**o+(0.992162964289)*x_ref[1]
-        ref[4,1,1]=(-0.89264628952)*x_ref[0]**o+(0.414589880453)*x_ref[0]+(-0.40959764673)*x_ref[1]**o+(-0.261016337239)*x_ref[1]
-        ref[5,0,0]=(-0.613553175002)*x_ref[0]**o+(0.320685999723)*x_ref[0]+(-0.523099455238)*x_ref[1]**o+(0.855780524769)*x_ref[1]
-        ref[5,0,1]=(-0.45911360029)*x_ref[0]**o+(-0.285942390871)*x_ref[0]+(0.7279702976)*x_ref[1]**o+(0.981483922949)*x_ref[1]
-        ref[5,1,0]=(0.577254626037)*x_ref[0]**o+(0.146911866492)*x_ref[0]+(-0.414545328014)*x_ref[1]**o+(-0.979179708006)*x_ref[1]
-        ref[5,1,1]=(-0.838392720256)*x_ref[0]**o+(-0.51717223091)*x_ref[0]+(0.635616756614)*x_ref[1]**o+(0.112711970543)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.807360140818)*x[0]**o+(-0.399141641865)*x[0]+(0.752910658124)*x[1]**o+(0.0998734354996)*x[1]+(-0.146785318133)*x[2]**o+(-0.393796605729)*x[2]
-        arg[0,0,1]=(-0.502209573844)*x[0]**o+(0.501684846477)*x[0]+(0.634537290794)*x[1]**o+(0.481836589517)*x[1]+(-0.0221536339712)*x[2]**o+(-0.868693970024)*x[2]
-        arg[0,1,0]=(-0.268854282014)*x[0]**o+(0.0516535086968)*x[0]+(-0.505997013698)*x[1]**o+(0.414205349613)*x[1]+(0.0119995662599)*x[2]**o+(0.584354222675)*x[2]
-        arg[0,1,1]=(0.81923283939)*x[0]**o+(-0.174637610292)*x[0]+(0.283785251937)*x[1]**o+(0.716260504685)*x[1]+(-0.957279283093)*x[2]**o+(0.632750238692)*x[2]
-        arg[1,0,0]=(0.601003888536)*x[0]**o+(-0.575011763358)*x[0]+(0.095159775614)*x[1]**o+(0.141200996742)*x[1]+(0.0173869440863)*x[2]**o+(0.478733688259)*x[2]
-        arg[1,0,1]=(-0.783826426764)*x[0]**o+(-0.40604430175)*x[0]+(-0.4574879786)*x[1]**o+(0.020222886424)*x[1]+(0.225419750344)*x[2]**o+(-0.530026190372)*x[2]
-        arg[1,1,0]=(0.542744341911)*x[0]**o+(-0.501169367089)*x[0]+(0.447661946532)*x[1]**o+(0.384528043888)*x[1]+(-0.599271261928)*x[2]**o+(-0.535447844217)*x[2]
-        arg[1,1,1]=(-0.457163465824)*x[0]**o+(0.0475382663524)*x[0]+(0.369626614251)*x[1]**o+(0.1125159395)*x[1]+(-0.252442923096)*x[2]**o+(0.0717205095822)*x[2]
-        arg[2,0,0]=(0.341536174626)*x[0]**o+(0.4408059057)*x[0]+(0.196877383546)*x[1]**o+(0.903072917866)*x[1]+(0.423403716275)*x[2]**o+(-0.521563534689)*x[2]
-        arg[2,0,1]=(0.553187361262)*x[0]**o+(-0.539057536895)*x[0]+(-0.814990210449)*x[1]**o+(-0.418614789609)*x[1]+(0.857298489434)*x[2]**o+(0.629708672)*x[2]
-        arg[2,1,0]=(0.494803348038)*x[0]**o+(0.143644562028)*x[0]+(-0.0425813919235)*x[1]**o+(-0.818562153097)*x[1]+(-0.730690839032)*x[2]**o+(-0.569426137866)*x[2]
-        arg[2,1,1]=(-0.573254727715)*x[0]**o+(-0.536459946225)*x[0]+(-0.244717967781)*x[1]**o+(-0.67463285343)*x[1]+(-0.383959754049)*x[2]**o+(-0.87595126443)*x[2]
-        arg[3,0,0]=(0.758065154533)*x[0]**o+(0.634049823109)*x[0]+(0.851352543082)*x[1]**o+(0.302790462394)*x[1]+(-0.920790730269)*x[2]**o+(0.460419670912)*x[2]
-        arg[3,0,1]=(0.415682634939)*x[0]**o+(-0.664821834506)*x[0]+(-0.314068887264)*x[1]**o+(-0.322413102029)*x[1]+(-0.498768865759)*x[2]**o+(-0.165338012626)*x[2]
-        arg[3,1,0]=(-0.398599595126)*x[0]**o+(0.744397086526)*x[0]+(-0.02321839482)*x[1]**o+(0.989743131098)*x[1]+(0.0713981107777)*x[2]**o+(-0.7862942966)*x[2]
-        arg[3,1,1]=(0.90835870295)*x[0]**o+(0.285965355995)*x[0]+(-0.302780058578)*x[1]**o+(0.396923771953)*x[1]+(0.717312324488)*x[2]**o+(0.967488138744)*x[2]
-        arg[4,0,0]=(-0.286827561624)*x[0]**o+(0.67973673275)*x[0]+(0.325169520671)*x[1]**o+(0.482002981846)*x[1]+(-0.826037251282)*x[2]**o+(-0.0567054906659)*x[2]
-        arg[4,0,1]=(-0.667297458554)*x[0]**o+(-0.207369757609)*x[0]+(-0.982746021703)*x[1]**o+(0.963677089363)*x[1]+(0.917328237047)*x[2]**o+(-0.684386577728)*x[2]
-        arg[4,1,0]=(-0.835525763762)*x[0]**o+(-0.113324184435)*x[0]+(0.465855661969)*x[1]**o+(0.656047307997)*x[1]+(0.331675778117)*x[2]**o+(-0.686067177565)*x[2]
-        arg[4,1,1]=(-0.468668496499)*x[0]**o+(0.295197251458)*x[0]+(0.065102699741)*x[1]**o+(-0.378381176309)*x[1]+(0.933627973066)*x[2]**o+(-0.91462136931)*x[2]
-        arg[5,0,0]=(-0.161916994488)*x[0]**o+(0.3070005414)*x[0]+(0.195946524325)*x[1]**o+(-0.453290146527)*x[1]+(0.751532065651)*x[2]**o+(0.82676125654)*x[2]
-        arg[5,0,1]=(-0.925362363492)*x[0]**o+(-0.0295351854097)*x[0]+(0.533980764998)*x[1]**o+(0.128080489262)*x[1]+(0.502858052015)*x[2]**o+(0.813196540163)*x[2]
-        arg[5,1,0]=(-0.740146099318)*x[0]**o+(0.27623528724)*x[0]+(-0.361620073401)*x[1]**o+(-0.310534085108)*x[1]+(-0.0363428185757)*x[2]**o+(-0.145397849357)*x[2]
-        arg[5,1,1]=(0.362089087335)*x[0]**o+(0.539359659929)*x[0]+(0.00904990097799)*x[1]**o+(-0.150401175722)*x[1]+(-0.20465882105)*x[2]**o+(-0.519331232192)*x[2]
-        ref[0,0,0]=(0.807360140818)*x_ref[0]**o+(-0.399141641865)*x_ref[0]+(0.752910658124)*x_ref[1]**o+(0.0998734354996)*x_ref[1]+(-0.146785318133)*x_ref[2]**o+(-0.393796605729)*x_ref[2]
-        ref[0,0,1]=(-0.502209573844)*x_ref[0]**o+(0.501684846477)*x_ref[0]+(0.634537290794)*x_ref[1]**o+(0.481836589517)*x_ref[1]+(-0.0221536339712)*x_ref[2]**o+(-0.868693970024)*x_ref[2]
-        ref[0,1,0]=(-0.268854282014)*x_ref[0]**o+(0.0516535086968)*x_ref[0]+(-0.505997013698)*x_ref[1]**o+(0.414205349613)*x_ref[1]+(0.0119995662599)*x_ref[2]**o+(0.584354222675)*x_ref[2]
-        ref[0,1,1]=(0.81923283939)*x_ref[0]**o+(-0.174637610292)*x_ref[0]+(0.283785251937)*x_ref[1]**o+(0.716260504685)*x_ref[1]+(-0.957279283093)*x_ref[2]**o+(0.632750238692)*x_ref[2]
-        ref[1,0,0]=(0.601003888536)*x_ref[0]**o+(-0.575011763358)*x_ref[0]+(0.095159775614)*x_ref[1]**o+(0.141200996742)*x_ref[1]+(0.0173869440863)*x_ref[2]**o+(0.478733688259)*x_ref[2]
-        ref[1,0,1]=(-0.783826426764)*x_ref[0]**o+(-0.40604430175)*x_ref[0]+(-0.4574879786)*x_ref[1]**o+(0.020222886424)*x_ref[1]+(0.225419750344)*x_ref[2]**o+(-0.530026190372)*x_ref[2]
-        ref[1,1,0]=(0.542744341911)*x_ref[0]**o+(-0.501169367089)*x_ref[0]+(0.447661946532)*x_ref[1]**o+(0.384528043888)*x_ref[1]+(-0.599271261928)*x_ref[2]**o+(-0.535447844217)*x_ref[2]
-        ref[1,1,1]=(-0.457163465824)*x_ref[0]**o+(0.0475382663524)*x_ref[0]+(0.369626614251)*x_ref[1]**o+(0.1125159395)*x_ref[1]+(-0.252442923096)*x_ref[2]**o+(0.0717205095822)*x_ref[2]
-        ref[2,0,0]=(0.341536174626)*x_ref[0]**o+(0.4408059057)*x_ref[0]+(0.196877383546)*x_ref[1]**o+(0.903072917866)*x_ref[1]+(0.423403716275)*x_ref[2]**o+(-0.521563534689)*x_ref[2]
-        ref[2,0,1]=(0.553187361262)*x_ref[0]**o+(-0.539057536895)*x_ref[0]+(-0.814990210449)*x_ref[1]**o+(-0.418614789609)*x_ref[1]+(0.857298489434)*x_ref[2]**o+(0.629708672)*x_ref[2]
-        ref[2,1,0]=(0.494803348038)*x_ref[0]**o+(0.143644562028)*x_ref[0]+(-0.0425813919235)*x_ref[1]**o+(-0.818562153097)*x_ref[1]+(-0.730690839032)*x_ref[2]**o+(-0.569426137866)*x_ref[2]
-        ref[2,1,1]=(-0.573254727715)*x_ref[0]**o+(-0.536459946225)*x_ref[0]+(-0.244717967781)*x_ref[1]**o+(-0.67463285343)*x_ref[1]+(-0.383959754049)*x_ref[2]**o+(-0.87595126443)*x_ref[2]
-        ref[3,0,0]=(0.758065154533)*x_ref[0]**o+(0.634049823109)*x_ref[0]+(0.851352543082)*x_ref[1]**o+(0.302790462394)*x_ref[1]+(-0.920790730269)*x_ref[2]**o+(0.460419670912)*x_ref[2]
-        ref[3,0,1]=(0.415682634939)*x_ref[0]**o+(-0.664821834506)*x_ref[0]+(-0.314068887264)*x_ref[1]**o+(-0.322413102029)*x_ref[1]+(-0.498768865759)*x_ref[2]**o+(-0.165338012626)*x_ref[2]
-        ref[3,1,0]=(-0.398599595126)*x_ref[0]**o+(0.744397086526)*x_ref[0]+(-0.02321839482)*x_ref[1]**o+(0.989743131098)*x_ref[1]+(0.0713981107777)*x_ref[2]**o+(-0.7862942966)*x_ref[2]
-        ref[3,1,1]=(0.90835870295)*x_ref[0]**o+(0.285965355995)*x_ref[0]+(-0.302780058578)*x_ref[1]**o+(0.396923771953)*x_ref[1]+(0.717312324488)*x_ref[2]**o+(0.967488138744)*x_ref[2]
-        ref[4,0,0]=(-0.286827561624)*x_ref[0]**o+(0.67973673275)*x_ref[0]+(0.325169520671)*x_ref[1]**o+(0.482002981846)*x_ref[1]+(-0.826037251282)*x_ref[2]**o+(-0.0567054906659)*x_ref[2]
-        ref[4,0,1]=(-0.667297458554)*x_ref[0]**o+(-0.207369757609)*x_ref[0]+(-0.982746021703)*x_ref[1]**o+(0.963677089363)*x_ref[1]+(0.917328237047)*x_ref[2]**o+(-0.684386577728)*x_ref[2]
-        ref[4,1,0]=(-0.835525763762)*x_ref[0]**o+(-0.113324184435)*x_ref[0]+(0.465855661969)*x_ref[1]**o+(0.656047307997)*x_ref[1]+(0.331675778117)*x_ref[2]**o+(-0.686067177565)*x_ref[2]
-        ref[4,1,1]=(-0.468668496499)*x_ref[0]**o+(0.295197251458)*x_ref[0]+(0.065102699741)*x_ref[1]**o+(-0.378381176309)*x_ref[1]+(0.933627973066)*x_ref[2]**o+(-0.91462136931)*x_ref[2]
-        ref[5,0,0]=(-0.161916994488)*x_ref[0]**o+(0.3070005414)*x_ref[0]+(0.195946524325)*x_ref[1]**o+(-0.453290146527)*x_ref[1]+(0.751532065651)*x_ref[2]**o+(0.82676125654)*x_ref[2]
-        ref[5,0,1]=(-0.925362363492)*x_ref[0]**o+(-0.0295351854097)*x_ref[0]+(0.533980764998)*x_ref[1]**o+(0.128080489262)*x_ref[1]+(0.502858052015)*x_ref[2]**o+(0.813196540163)*x_ref[2]
-        ref[5,1,0]=(-0.740146099318)*x_ref[0]**o+(0.27623528724)*x_ref[0]+(-0.361620073401)*x_ref[1]**o+(-0.310534085108)*x_ref[1]+(-0.0363428185757)*x_ref[2]**o+(-0.145397849357)*x_ref[2]
-        ref[5,1,1]=(0.362089087335)*x_ref[0]**o+(0.539359659929)*x_ref[0]+(0.00904990097799)*x_ref[1]**o+(-0.150401175722)*x_ref[1]+(-0.20465882105)*x_ref[2]**o+(-0.519331232192)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.14016992168)*x[0]**o+(-0.396856222091)*x[0]+(0.747446299477)*x[1]**o+(-0.299063042467)*x[1]
-        arg[0,0,0,1]=(0.126297805139)*x[0]**o+(0.317089000483)*x[0]+(0.0418478916266)*x[1]**o+(-0.892825689806)*x[1]
-        arg[0,0,1,0]=(0.127263485532)*x[0]**o+(0.400880552184)*x[0]+(-0.858713979216)*x[1]**o+(0.238693631738)*x[1]
-        arg[0,0,1,1]=(-0.985703521737)*x[0]**o+(-0.0192845851979)*x[0]+(-0.442493677109)*x[1]**o+(0.188038174612)*x[1]
-        arg[0,0,2,0]=(0.814303535641)*x[0]**o+(-0.201938227136)*x[0]+(-0.134135136581)*x[1]**o+(0.939272592089)*x[1]
-        arg[0,0,2,1]=(-0.609570412575)*x[0]**o+(0.181669701944)*x[0]+(0.882708213835)*x[1]**o+(0.315561722535)*x[1]
-        arg[0,1,0,0]=(0.180272217085)*x[0]**o+(-0.921231698951)*x[0]+(-0.670170775864)*x[1]**o+(0.36959006719)*x[1]
-        arg[0,1,0,1]=(-0.907447754449)*x[0]**o+(0.984356686322)*x[0]+(0.300621254386)*x[1]**o+(0.491995830235)*x[1]
-        arg[0,1,1,0]=(-0.535808887861)*x[0]**o+(0.991647965865)*x[0]+(-0.505667913884)*x[1]**o+(-0.403245981754)*x[1]
-        arg[0,1,1,1]=(-0.315687983887)*x[0]**o+(-0.570118136173)*x[0]+(0.327842038508)*x[1]**o+(-0.475833876716)*x[1]
-        arg[0,1,2,0]=(0.598143043008)*x[0]**o+(0.119789453354)*x[0]+(-0.307994361027)*x[1]**o+(-0.747443620209)*x[1]
-        arg[0,1,2,1]=(-0.384576138426)*x[0]**o+(-0.21431195392)*x[0]+(0.622157923623)*x[1]**o+(-0.535976986322)*x[1]
-        arg[0,2,0,0]=(-0.823640169824)*x[0]**o+(-0.946436729867)*x[0]+(0.158819942161)*x[1]**o+(-0.175783146941)*x[1]
-        arg[0,2,0,1]=(0.31586435609)*x[0]**o+(0.480823809413)*x[0]+(-0.155590673671)*x[1]**o+(-0.283774897002)*x[1]
-        arg[0,2,1,0]=(0.973677960338)*x[0]**o+(-0.42119441385)*x[0]+(0.936434159723)*x[1]**o+(-0.271328279678)*x[1]
-        arg[0,2,1,1]=(0.995977746066)*x[0]**o+(0.115566554312)*x[0]+(0.6023712777)*x[1]**o+(0.523708594385)*x[1]
-        arg[0,2,2,0]=(0.690331991941)*x[0]**o+(0.708864222789)*x[0]+(-0.0209681974418)*x[1]**o+(-0.402664547241)*x[1]
-        arg[0,2,2,1]=(0.793403379571)*x[0]**o+(-0.44195907862)*x[0]+(-0.750943552401)*x[1]**o+(0.87817105061)*x[1]
-        arg[0,3,0,0]=(-0.960650344452)*x[0]**o+(0.918969286865)*x[0]+(-0.788611475275)*x[1]**o+(-0.917265819096)*x[1]
-        arg[0,3,0,1]=(0.379234695969)*x[0]**o+(0.288784268667)*x[0]+(-0.231788371542)*x[1]**o+(-0.521488838978)*x[1]
-        arg[0,3,1,0]=(-0.482353410226)*x[0]**o+(0.666269361063)*x[0]+(0.207628082266)*x[1]**o+(0.890536697637)*x[1]
-        arg[0,3,1,1]=(-0.256826971067)*x[0]**o+(0.244573109457)*x[0]+(0.435182409565)*x[1]**o+(-0.98882467576)*x[1]
-        arg[0,3,2,0]=(0.727681501266)*x[0]**o+(0.174117939756)*x[0]+(0.626998345198)*x[1]**o+(0.666518756047)*x[1]
-        arg[0,3,2,1]=(-0.125855300157)*x[0]**o+(-0.750291117974)*x[0]+(0.840722993443)*x[1]**o+(0.0798848819291)*x[1]
-        arg[0,4,0,0]=(-0.156808480304)*x[0]**o+(-0.864855000875)*x[0]+(-0.825786767174)*x[1]**o+(-0.563999207624)*x[1]
-        arg[0,4,0,1]=(-0.890116284779)*x[0]**o+(0.795471417269)*x[0]+(0.326454331959)*x[1]**o+(-0.376644334859)*x[1]
-        arg[0,4,1,0]=(-0.453181887597)*x[0]**o+(0.488149970589)*x[0]+(0.506352954527)*x[1]**o+(0.971016325918)*x[1]
-        arg[0,4,1,1]=(0.156976484311)*x[0]**o+(0.988818166411)*x[0]+(0.948579296281)*x[1]**o+(-0.80303322078)*x[1]
-        arg[0,4,2,0]=(-0.0625333956516)*x[0]**o+(0.357609677642)*x[0]+(0.00245182913993)*x[1]**o+(-0.162058851234)*x[1]
-        arg[0,4,2,1]=(0.645504631508)*x[0]**o+(-0.0107543576265)*x[0]+(0.15490632437)*x[1]**o+(0.841985786269)*x[1]
-        arg[1,0,0,0]=(0.703923364197)*x[0]**o+(-0.424818178123)*x[0]+(-0.744399116071)*x[1]**o+(0.303429987787)*x[1]
-        arg[1,0,0,1]=(-0.92849671168)*x[0]**o+(0.050597602551)*x[0]+(0.91000243103)*x[1]**o+(-0.742775174195)*x[1]
-        arg[1,0,1,0]=(0.281218131435)*x[0]**o+(0.171029842909)*x[0]+(-0.65806576709)*x[1]**o+(-0.718069456213)*x[1]
-        arg[1,0,1,1]=(0.312255067232)*x[0]**o+(0.566401030665)*x[0]+(-0.941709776271)*x[1]**o+(0.0111896041808)*x[1]
-        arg[1,0,2,0]=(-0.886019321094)*x[0]**o+(-0.688815756004)*x[0]+(-0.595491288141)*x[1]**o+(0.343402495621)*x[1]
-        arg[1,0,2,1]=(-0.681063845863)*x[0]**o+(-0.676550403066)*x[0]+(0.186106532969)*x[1]**o+(0.181779537727)*x[1]
-        arg[1,1,0,0]=(0.128588939989)*x[0]**o+(0.477711214734)*x[0]+(-0.17697460919)*x[1]**o+(0.0217208670244)*x[1]
-        arg[1,1,0,1]=(-0.652028522296)*x[0]**o+(-0.503146425209)*x[0]+(-0.427973128189)*x[1]**o+(-0.182775422425)*x[1]
-        arg[1,1,1,0]=(-0.0499349942904)*x[0]**o+(-0.0183804745613)*x[0]+(-0.912604094211)*x[1]**o+(-0.949181938689)*x[1]
-        arg[1,1,1,1]=(-0.472737626621)*x[0]**o+(-0.142195314687)*x[0]+(0.580775749383)*x[1]**o+(-0.832549796746)*x[1]
-        arg[1,1,2,0]=(-0.288756468146)*x[0]**o+(-0.50657056474)*x[0]+(-0.809713268333)*x[1]**o+(0.598450102365)*x[1]
-        arg[1,1,2,1]=(-0.259779636241)*x[0]**o+(-0.227925001879)*x[0]+(-0.0752800702413)*x[1]**o+(-0.438841969161)*x[1]
-        arg[1,2,0,0]=(-0.617835522076)*x[0]**o+(-0.969275786274)*x[0]+(0.899717033555)*x[1]**o+(0.77648944909)*x[1]
-        arg[1,2,0,1]=(-0.0619395581419)*x[0]**o+(0.926394874574)*x[0]+(0.984605961354)*x[1]**o+(0.253347734181)*x[1]
-        arg[1,2,1,0]=(0.748474342269)*x[0]**o+(0.0794003341104)*x[0]+(-0.244607682532)*x[1]**o+(-0.228787873564)*x[1]
-        arg[1,2,1,1]=(-0.266853205536)*x[0]**o+(0.529714058158)*x[0]+(-0.421599080872)*x[1]**o+(-0.595557599245)*x[1]
-        arg[1,2,2,0]=(-0.377962443753)*x[0]**o+(0.609550409525)*x[0]+(0.951904771097)*x[1]**o+(-0.123551801933)*x[1]
-        arg[1,2,2,1]=(0.3262671136)*x[0]**o+(-0.574281078833)*x[0]+(0.308261022622)*x[1]**o+(-0.784762723843)*x[1]
-        arg[1,3,0,0]=(-0.419601410829)*x[0]**o+(-0.576064062071)*x[0]+(-0.431574278091)*x[1]**o+(-0.264303418881)*x[1]
-        arg[1,3,0,1]=(0.176058414693)*x[0]**o+(0.672752046411)*x[0]+(-0.8579992002)*x[1]**o+(-0.135904959185)*x[1]
-        arg[1,3,1,0]=(0.84480795105)*x[0]**o+(0.846846799225)*x[0]+(0.134417432017)*x[1]**o+(-0.725316162128)*x[1]
-        arg[1,3,1,1]=(-0.102162279538)*x[0]**o+(0.451180031789)*x[0]+(0.490175190736)*x[1]**o+(0.811823281177)*x[1]
-        arg[1,3,2,0]=(-0.582177348293)*x[0]**o+(-0.74631626712)*x[0]+(-0.275524221012)*x[1]**o+(-0.658276720144)*x[1]
-        arg[1,3,2,1]=(0.304511057297)*x[0]**o+(-0.354531411968)*x[0]+(0.0944491594546)*x[1]**o+(0.619039121597)*x[1]
-        arg[1,4,0,0]=(0.754898520324)*x[0]**o+(-0.28914218119)*x[0]+(0.8660675945)*x[1]**o+(0.526777161228)*x[1]
-        arg[1,4,0,1]=(-0.820150637429)*x[0]**o+(-0.399203443857)*x[0]+(0.118863382167)*x[1]**o+(0.269335037373)*x[1]
-        arg[1,4,1,0]=(-0.669389232967)*x[0]**o+(-0.119080399209)*x[0]+(0.999919873616)*x[1]**o+(0.733390578378)*x[1]
-        arg[1,4,1,1]=(-0.85147101348)*x[0]**o+(-0.0453996523642)*x[0]+(0.00891698330334)*x[1]**o+(-0.27128670805)*x[1]
-        arg[1,4,2,0]=(-0.946558097166)*x[0]**o+(0.0141300604882)*x[0]+(0.04075090617)*x[1]**o+(-0.141095386138)*x[1]
-        arg[1,4,2,1]=(0.613700159605)*x[0]**o+(0.115107829201)*x[0]+(0.907429968641)*x[1]**o+(0.901820725424)*x[1]
-        arg[2,0,0,0]=(-0.629486588984)*x[0]**o+(-0.590908868493)*x[0]+(0.689333052519)*x[1]**o+(0.22096464697)*x[1]
-        arg[2,0,0,1]=(-0.475364708492)*x[0]**o+(-0.3195126467)*x[0]+(-0.688082519853)*x[1]**o+(-0.889722517035)*x[1]
-        arg[2,0,1,0]=(0.931261765284)*x[0]**o+(0.399101548845)*x[0]+(-0.185342345742)*x[1]**o+(0.188927724838)*x[1]
-        arg[2,0,1,1]=(-0.195889209768)*x[0]**o+(-0.0878952476483)*x[0]+(0.636980893598)*x[1]**o+(0.827709469156)*x[1]
-        arg[2,0,2,0]=(0.644658731705)*x[0]**o+(0.275771474382)*x[0]+(0.0802903363405)*x[1]**o+(-0.157785300253)*x[1]
-        arg[2,0,2,1]=(0.324153739483)*x[0]**o+(-0.978043993375)*x[0]+(0.440060321393)*x[1]**o+(0.103952166755)*x[1]
-        arg[2,1,0,0]=(-0.233567312787)*x[0]**o+(0.139529308019)*x[0]+(-0.200168759944)*x[1]**o+(-0.629057762953)*x[1]
-        arg[2,1,0,1]=(-0.407808993281)*x[0]**o+(-0.208049914815)*x[0]+(0.676817990818)*x[1]**o+(-0.27174220248)*x[1]
-        arg[2,1,1,0]=(-0.159113456499)*x[0]**o+(0.586749846436)*x[0]+(0.112658884741)*x[1]**o+(0.521917298039)*x[1]
-        arg[2,1,1,1]=(-0.377986619436)*x[0]**o+(0.920912593255)*x[0]+(0.61285598265)*x[1]**o+(0.491316381102)*x[1]
-        arg[2,1,2,0]=(-0.594573349393)*x[0]**o+(-0.784940398408)*x[0]+(0.0602427709094)*x[1]**o+(0.381334187216)*x[1]
-        arg[2,1,2,1]=(-0.359402310466)*x[0]**o+(0.243014104221)*x[0]+(0.960587701667)*x[1]**o+(0.653124687952)*x[1]
-        arg[2,2,0,0]=(0.667031182369)*x[0]**o+(0.099374903559)*x[0]+(0.00279841725989)*x[1]**o+(-0.413751543412)*x[1]
-        arg[2,2,0,1]=(0.793557898241)*x[0]**o+(0.146572317359)*x[0]+(0.812964170008)*x[1]**o+(-0.988110793397)*x[1]
-        arg[2,2,1,0]=(0.900661246137)*x[0]**o+(-0.997975978586)*x[0]+(0.63300171387)*x[1]**o+(-0.103878548778)*x[1]
-        arg[2,2,1,1]=(-0.456464050469)*x[0]**o+(0.830699811714)*x[0]+(-0.186689927425)*x[1]**o+(-0.100170151164)*x[1]
-        arg[2,2,2,0]=(0.732282428164)*x[0]**o+(0.928947589228)*x[0]+(-0.282773641579)*x[1]**o+(-0.927533112027)*x[1]
-        arg[2,2,2,1]=(0.768111868708)*x[0]**o+(-0.308231472858)*x[0]+(0.890807565689)*x[1]**o+(-0.731196891492)*x[1]
-        arg[2,3,0,0]=(0.559658559574)*x[0]**o+(0.104536615096)*x[0]+(-0.162594824125)*x[1]**o+(-0.172859200721)*x[1]
-        arg[2,3,0,1]=(0.769297853152)*x[0]**o+(0.346598673904)*x[0]+(0.0313124779153)*x[1]**o+(-0.751767979251)*x[1]
-        arg[2,3,1,0]=(0.870887050816)*x[0]**o+(0.593904859463)*x[0]+(-0.108083837899)*x[1]**o+(0.5467383682)*x[1]
-        arg[2,3,1,1]=(0.244253227645)*x[0]**o+(0.911176738654)*x[0]+(-0.497855487714)*x[1]**o+(0.226443212585)*x[1]
-        arg[2,3,2,0]=(-0.599893560596)*x[0]**o+(-0.893030581717)*x[0]+(-0.745249903413)*x[1]**o+(0.563740068619)*x[1]
-        arg[2,3,2,1]=(-0.198088241103)*x[0]**o+(-0.171306730647)*x[0]+(-0.917417138299)*x[1]**o+(0.233920617125)*x[1]
-        arg[2,4,0,0]=(0.804585270618)*x[0]**o+(0.3784879961)*x[0]+(0.621076476928)*x[1]**o+(-0.534671153952)*x[1]
-        arg[2,4,0,1]=(0.380555159947)*x[0]**o+(-0.630487045841)*x[0]+(0.917413683072)*x[1]**o+(0.491925783834)*x[1]
-        arg[2,4,1,0]=(0.946642644964)*x[0]**o+(-0.236438579482)*x[0]+(0.525585953739)*x[1]**o+(0.499940951133)*x[1]
-        arg[2,4,1,1]=(0.827450889548)*x[0]**o+(-0.73264543626)*x[0]+(0.0626492901072)*x[1]**o+(-0.882759632862)*x[1]
-        arg[2,4,2,0]=(-0.0671814496498)*x[0]**o+(0.108634446052)*x[0]+(-0.421081640868)*x[1]**o+(-0.546455336395)*x[1]
-        arg[2,4,2,1]=(-0.601339784479)*x[0]**o+(-0.206937965916)*x[0]+(-0.849120792543)*x[1]**o+(0.615842037441)*x[1]
-        arg[3,0,0,0]=(0.640466650913)*x[0]**o+(-0.936176165762)*x[0]+(0.12758686525)*x[1]**o+(-0.104771286099)*x[1]
-        arg[3,0,0,1]=(-0.868109993006)*x[0]**o+(0.470815003671)*x[0]+(-0.301208743474)*x[1]**o+(-0.296271408095)*x[1]
-        arg[3,0,1,0]=(0.66584252787)*x[0]**o+(-0.889549573986)*x[0]+(-0.0876076820512)*x[1]**o+(-0.249000029178)*x[1]
-        arg[3,0,1,1]=(0.289388044606)*x[0]**o+(0.674519856916)*x[0]+(-0.721031236925)*x[1]**o+(0.093281544052)*x[1]
-        arg[3,0,2,0]=(-0.0558863543119)*x[0]**o+(-0.367544430651)*x[0]+(-0.85580152565)*x[1]**o+(-0.140166367203)*x[1]
-        arg[3,0,2,1]=(0.600709511675)*x[0]**o+(0.286322916564)*x[0]+(-0.544094007372)*x[1]**o+(0.470305833347)*x[1]
-        arg[3,1,0,0]=(-0.828780197168)*x[0]**o+(-0.568096532278)*x[0]+(0.435127414299)*x[1]**o+(0.96890877255)*x[1]
-        arg[3,1,0,1]=(0.191455614175)*x[0]**o+(-0.99507613827)*x[0]+(0.0735829936134)*x[1]**o+(0.635849313153)*x[1]
-        arg[3,1,1,0]=(-0.839049013591)*x[0]**o+(-0.718731394184)*x[0]+(0.575853740085)*x[1]**o+(-0.57924857477)*x[1]
-        arg[3,1,1,1]=(0.116876810453)*x[0]**o+(0.145727923885)*x[0]+(0.0155069936368)*x[1]**o+(0.223214885433)*x[1]
-        arg[3,1,2,0]=(-0.674811720223)*x[0]**o+(0.651640807063)*x[0]+(-0.652022625703)*x[1]**o+(-0.119110788344)*x[1]
-        arg[3,1,2,1]=(-0.544748794193)*x[0]**o+(-0.689440165483)*x[0]+(0.936900319026)*x[1]**o+(-0.337287311564)*x[1]
-        arg[3,2,0,0]=(-0.355059804554)*x[0]**o+(0.458306329535)*x[0]+(0.172261907494)*x[1]**o+(0.498548138594)*x[1]
-        arg[3,2,0,1]=(0.624420187129)*x[0]**o+(0.808931844722)*x[0]+(-0.690635894194)*x[1]**o+(-0.156122444554)*x[1]
-        arg[3,2,1,0]=(-0.190029529776)*x[0]**o+(0.925600418137)*x[0]+(0.601040324953)*x[1]**o+(0.615485749173)*x[1]
-        arg[3,2,1,1]=(0.679796674662)*x[0]**o+(0.879285148869)*x[0]+(0.0476373514288)*x[1]**o+(0.37655760501)*x[1]
-        arg[3,2,2,0]=(0.231748550393)*x[0]**o+(0.209858138221)*x[0]+(-0.88372579866)*x[1]**o+(0.30534744967)*x[1]
-        arg[3,2,2,1]=(-0.772177697671)*x[0]**o+(0.012439044435)*x[0]+(-0.293218976284)*x[1]**o+(0.306955066595)*x[1]
-        arg[3,3,0,0]=(0.387256929042)*x[0]**o+(-0.434015953267)*x[0]+(-0.098736946868)*x[1]**o+(-0.0837712534186)*x[1]
-        arg[3,3,0,1]=(0.396246252967)*x[0]**o+(-0.338955181605)*x[0]+(-0.353504371554)*x[1]**o+(-0.969811402293)*x[1]
-        arg[3,3,1,0]=(-0.336508964723)*x[0]**o+(-0.411882233342)*x[0]+(-0.603965321132)*x[1]**o+(0.177221705416)*x[1]
-        arg[3,3,1,1]=(0.786971174387)*x[0]**o+(0.759003522166)*x[0]+(-0.0961289050409)*x[1]**o+(-0.0811258682982)*x[1]
-        arg[3,3,2,0]=(0.526266925685)*x[0]**o+(-0.113145219611)*x[0]+(-0.208427816884)*x[1]**o+(0.291484710079)*x[1]
-        arg[3,3,2,1]=(-0.591153907468)*x[0]**o+(-0.342892047641)*x[0]+(0.865954283634)*x[1]**o+(-0.22112030903)*x[1]
-        arg[3,4,0,0]=(0.755162128186)*x[0]**o+(0.494457469003)*x[0]+(0.889254517137)*x[1]**o+(0.880654056969)*x[1]
-        arg[3,4,0,1]=(0.450983401629)*x[0]**o+(-0.0855489110466)*x[0]+(0.0601625202676)*x[1]**o+(-0.0730383237708)*x[1]
-        arg[3,4,1,0]=(0.495514588456)*x[0]**o+(-0.0895269876334)*x[0]+(-0.89729630673)*x[1]**o+(0.759465768614)*x[1]
-        arg[3,4,1,1]=(-0.666472982468)*x[0]**o+(-0.251715028171)*x[0]+(-0.0623287375223)*x[1]**o+(-0.895663326995)*x[1]
-        arg[3,4,2,0]=(0.489737923112)*x[0]**o+(0.868066981889)*x[0]+(0.0371747456704)*x[1]**o+(-0.528951636028)*x[1]
-        arg[3,4,2,1]=(0.556312598455)*x[0]**o+(-0.0979773350236)*x[0]+(-0.82785928691)*x[1]**o+(-0.567596765858)*x[1]
-        ref[0,0,0,0]=(0.14016992168)*x_ref[0]**o+(-0.396856222091)*x_ref[0]+(0.747446299477)*x_ref[1]**o+(-0.299063042467)*x_ref[1]
-        ref[0,0,0,1]=(0.126297805139)*x_ref[0]**o+(0.317089000483)*x_ref[0]+(0.0418478916266)*x_ref[1]**o+(-0.892825689806)*x_ref[1]
-        ref[0,0,1,0]=(0.127263485532)*x_ref[0]**o+(0.400880552184)*x_ref[0]+(-0.858713979216)*x_ref[1]**o+(0.238693631738)*x_ref[1]
-        ref[0,0,1,1]=(-0.985703521737)*x_ref[0]**o+(-0.0192845851979)*x_ref[0]+(-0.442493677109)*x_ref[1]**o+(0.188038174612)*x_ref[1]
-        ref[0,0,2,0]=(0.814303535641)*x_ref[0]**o+(-0.201938227136)*x_ref[0]+(-0.134135136581)*x_ref[1]**o+(0.939272592089)*x_ref[1]
-        ref[0,0,2,1]=(-0.609570412575)*x_ref[0]**o+(0.181669701944)*x_ref[0]+(0.882708213835)*x_ref[1]**o+(0.315561722535)*x_ref[1]
-        ref[0,1,0,0]=(0.180272217085)*x_ref[0]**o+(-0.921231698951)*x_ref[0]+(-0.670170775864)*x_ref[1]**o+(0.36959006719)*x_ref[1]
-        ref[0,1,0,1]=(-0.907447754449)*x_ref[0]**o+(0.984356686322)*x_ref[0]+(0.300621254386)*x_ref[1]**o+(0.491995830235)*x_ref[1]
-        ref[0,1,1,0]=(-0.535808887861)*x_ref[0]**o+(0.991647965865)*x_ref[0]+(-0.505667913884)*x_ref[1]**o+(-0.403245981754)*x_ref[1]
-        ref[0,1,1,1]=(-0.315687983887)*x_ref[0]**o+(-0.570118136173)*x_ref[0]+(0.327842038508)*x_ref[1]**o+(-0.475833876716)*x_ref[1]
-        ref[0,1,2,0]=(0.598143043008)*x_ref[0]**o+(0.119789453354)*x_ref[0]+(-0.307994361027)*x_ref[1]**o+(-0.747443620209)*x_ref[1]
-        ref[0,1,2,1]=(-0.384576138426)*x_ref[0]**o+(-0.21431195392)*x_ref[0]+(0.622157923623)*x_ref[1]**o+(-0.535976986322)*x_ref[1]
-        ref[0,2,0,0]=(-0.823640169824)*x_ref[0]**o+(-0.946436729867)*x_ref[0]+(0.158819942161)*x_ref[1]**o+(-0.175783146941)*x_ref[1]
-        ref[0,2,0,1]=(0.31586435609)*x_ref[0]**o+(0.480823809413)*x_ref[0]+(-0.155590673671)*x_ref[1]**o+(-0.283774897002)*x_ref[1]
-        ref[0,2,1,0]=(0.973677960338)*x_ref[0]**o+(-0.42119441385)*x_ref[0]+(0.936434159723)*x_ref[1]**o+(-0.271328279678)*x_ref[1]
-        ref[0,2,1,1]=(0.995977746066)*x_ref[0]**o+(0.115566554312)*x_ref[0]+(0.6023712777)*x_ref[1]**o+(0.523708594385)*x_ref[1]
-        ref[0,2,2,0]=(0.690331991941)*x_ref[0]**o+(0.708864222789)*x_ref[0]+(-0.0209681974418)*x_ref[1]**o+(-0.402664547241)*x_ref[1]
-        ref[0,2,2,1]=(0.793403379571)*x_ref[0]**o+(-0.44195907862)*x_ref[0]+(-0.750943552401)*x_ref[1]**o+(0.87817105061)*x_ref[1]
-        ref[0,3,0,0]=(-0.960650344452)*x_ref[0]**o+(0.918969286865)*x_ref[0]+(-0.788611475275)*x_ref[1]**o+(-0.917265819096)*x_ref[1]
-        ref[0,3,0,1]=(0.379234695969)*x_ref[0]**o+(0.288784268667)*x_ref[0]+(-0.231788371542)*x_ref[1]**o+(-0.521488838978)*x_ref[1]
-        ref[0,3,1,0]=(-0.482353410226)*x_ref[0]**o+(0.666269361063)*x_ref[0]+(0.207628082266)*x_ref[1]**o+(0.890536697637)*x_ref[1]
-        ref[0,3,1,1]=(-0.256826971067)*x_ref[0]**o+(0.244573109457)*x_ref[0]+(0.435182409565)*x_ref[1]**o+(-0.98882467576)*x_ref[1]
-        ref[0,3,2,0]=(0.727681501266)*x_ref[0]**o+(0.174117939756)*x_ref[0]+(0.626998345198)*x_ref[1]**o+(0.666518756047)*x_ref[1]
-        ref[0,3,2,1]=(-0.125855300157)*x_ref[0]**o+(-0.750291117974)*x_ref[0]+(0.840722993443)*x_ref[1]**o+(0.0798848819291)*x_ref[1]
-        ref[0,4,0,0]=(-0.156808480304)*x_ref[0]**o+(-0.864855000875)*x_ref[0]+(-0.825786767174)*x_ref[1]**o+(-0.563999207624)*x_ref[1]
-        ref[0,4,0,1]=(-0.890116284779)*x_ref[0]**o+(0.795471417269)*x_ref[0]+(0.326454331959)*x_ref[1]**o+(-0.376644334859)*x_ref[1]
-        ref[0,4,1,0]=(-0.453181887597)*x_ref[0]**o+(0.488149970589)*x_ref[0]+(0.506352954527)*x_ref[1]**o+(0.971016325918)*x_ref[1]
-        ref[0,4,1,1]=(0.156976484311)*x_ref[0]**o+(0.988818166411)*x_ref[0]+(0.948579296281)*x_ref[1]**o+(-0.80303322078)*x_ref[1]
-        ref[0,4,2,0]=(-0.0625333956516)*x_ref[0]**o+(0.357609677642)*x_ref[0]+(0.00245182913993)*x_ref[1]**o+(-0.162058851234)*x_ref[1]
-        ref[0,4,2,1]=(0.645504631508)*x_ref[0]**o+(-0.0107543576265)*x_ref[0]+(0.15490632437)*x_ref[1]**o+(0.841985786269)*x_ref[1]
-        ref[1,0,0,0]=(0.703923364197)*x_ref[0]**o+(-0.424818178123)*x_ref[0]+(-0.744399116071)*x_ref[1]**o+(0.303429987787)*x_ref[1]
-        ref[1,0,0,1]=(-0.92849671168)*x_ref[0]**o+(0.050597602551)*x_ref[0]+(0.91000243103)*x_ref[1]**o+(-0.742775174195)*x_ref[1]
-        ref[1,0,1,0]=(0.281218131435)*x_ref[0]**o+(0.171029842909)*x_ref[0]+(-0.65806576709)*x_ref[1]**o+(-0.718069456213)*x_ref[1]
-        ref[1,0,1,1]=(0.312255067232)*x_ref[0]**o+(0.566401030665)*x_ref[0]+(-0.941709776271)*x_ref[1]**o+(0.0111896041808)*x_ref[1]
-        ref[1,0,2,0]=(-0.886019321094)*x_ref[0]**o+(-0.688815756004)*x_ref[0]+(-0.595491288141)*x_ref[1]**o+(0.343402495621)*x_ref[1]
-        ref[1,0,2,1]=(-0.681063845863)*x_ref[0]**o+(-0.676550403066)*x_ref[0]+(0.186106532969)*x_ref[1]**o+(0.181779537727)*x_ref[1]
-        ref[1,1,0,0]=(0.128588939989)*x_ref[0]**o+(0.477711214734)*x_ref[0]+(-0.17697460919)*x_ref[1]**o+(0.0217208670244)*x_ref[1]
-        ref[1,1,0,1]=(-0.652028522296)*x_ref[0]**o+(-0.503146425209)*x_ref[0]+(-0.427973128189)*x_ref[1]**o+(-0.182775422425)*x_ref[1]
-        ref[1,1,1,0]=(-0.0499349942904)*x_ref[0]**o+(-0.0183804745613)*x_ref[0]+(-0.912604094211)*x_ref[1]**o+(-0.949181938689)*x_ref[1]
-        ref[1,1,1,1]=(-0.472737626621)*x_ref[0]**o+(-0.142195314687)*x_ref[0]+(0.580775749383)*x_ref[1]**o+(-0.832549796746)*x_ref[1]
-        ref[1,1,2,0]=(-0.288756468146)*x_ref[0]**o+(-0.50657056474)*x_ref[0]+(-0.809713268333)*x_ref[1]**o+(0.598450102365)*x_ref[1]
-        ref[1,1,2,1]=(-0.259779636241)*x_ref[0]**o+(-0.227925001879)*x_ref[0]+(-0.0752800702413)*x_ref[1]**o+(-0.438841969161)*x_ref[1]
-        ref[1,2,0,0]=(-0.617835522076)*x_ref[0]**o+(-0.969275786274)*x_ref[0]+(0.899717033555)*x_ref[1]**o+(0.77648944909)*x_ref[1]
-        ref[1,2,0,1]=(-0.0619395581419)*x_ref[0]**o+(0.926394874574)*x_ref[0]+(0.984605961354)*x_ref[1]**o+(0.253347734181)*x_ref[1]
-        ref[1,2,1,0]=(0.748474342269)*x_ref[0]**o+(0.0794003341104)*x_ref[0]+(-0.244607682532)*x_ref[1]**o+(-0.228787873564)*x_ref[1]
-        ref[1,2,1,1]=(-0.266853205536)*x_ref[0]**o+(0.529714058158)*x_ref[0]+(-0.421599080872)*x_ref[1]**o+(-0.595557599245)*x_ref[1]
-        ref[1,2,2,0]=(-0.377962443753)*x_ref[0]**o+(0.609550409525)*x_ref[0]+(0.951904771097)*x_ref[1]**o+(-0.123551801933)*x_ref[1]
-        ref[1,2,2,1]=(0.3262671136)*x_ref[0]**o+(-0.574281078833)*x_ref[0]+(0.308261022622)*x_ref[1]**o+(-0.784762723843)*x_ref[1]
-        ref[1,3,0,0]=(-0.419601410829)*x_ref[0]**o+(-0.576064062071)*x_ref[0]+(-0.431574278091)*x_ref[1]**o+(-0.264303418881)*x_ref[1]
-        ref[1,3,0,1]=(0.176058414693)*x_ref[0]**o+(0.672752046411)*x_ref[0]+(-0.8579992002)*x_ref[1]**o+(-0.135904959185)*x_ref[1]
-        ref[1,3,1,0]=(0.84480795105)*x_ref[0]**o+(0.846846799225)*x_ref[0]+(0.134417432017)*x_ref[1]**o+(-0.725316162128)*x_ref[1]
-        ref[1,3,1,1]=(-0.102162279538)*x_ref[0]**o+(0.451180031789)*x_ref[0]+(0.490175190736)*x_ref[1]**o+(0.811823281177)*x_ref[1]
-        ref[1,3,2,0]=(-0.582177348293)*x_ref[0]**o+(-0.74631626712)*x_ref[0]+(-0.275524221012)*x_ref[1]**o+(-0.658276720144)*x_ref[1]
-        ref[1,3,2,1]=(0.304511057297)*x_ref[0]**o+(-0.354531411968)*x_ref[0]+(0.0944491594546)*x_ref[1]**o+(0.619039121597)*x_ref[1]
-        ref[1,4,0,0]=(0.754898520324)*x_ref[0]**o+(-0.28914218119)*x_ref[0]+(0.8660675945)*x_ref[1]**o+(0.526777161228)*x_ref[1]
-        ref[1,4,0,1]=(-0.820150637429)*x_ref[0]**o+(-0.399203443857)*x_ref[0]+(0.118863382167)*x_ref[1]**o+(0.269335037373)*x_ref[1]
-        ref[1,4,1,0]=(-0.669389232967)*x_ref[0]**o+(-0.119080399209)*x_ref[0]+(0.999919873616)*x_ref[1]**o+(0.733390578378)*x_ref[1]
-        ref[1,4,1,1]=(-0.85147101348)*x_ref[0]**o+(-0.0453996523642)*x_ref[0]+(0.00891698330334)*x_ref[1]**o+(-0.27128670805)*x_ref[1]
-        ref[1,4,2,0]=(-0.946558097166)*x_ref[0]**o+(0.0141300604882)*x_ref[0]+(0.04075090617)*x_ref[1]**o+(-0.141095386138)*x_ref[1]
-        ref[1,4,2,1]=(0.613700159605)*x_ref[0]**o+(0.115107829201)*x_ref[0]+(0.907429968641)*x_ref[1]**o+(0.901820725424)*x_ref[1]
-        ref[2,0,0,0]=(-0.629486588984)*x_ref[0]**o+(-0.590908868493)*x_ref[0]+(0.689333052519)*x_ref[1]**o+(0.22096464697)*x_ref[1]
-        ref[2,0,0,1]=(-0.475364708492)*x_ref[0]**o+(-0.3195126467)*x_ref[0]+(-0.688082519853)*x_ref[1]**o+(-0.889722517035)*x_ref[1]
-        ref[2,0,1,0]=(0.931261765284)*x_ref[0]**o+(0.399101548845)*x_ref[0]+(-0.185342345742)*x_ref[1]**o+(0.188927724838)*x_ref[1]
-        ref[2,0,1,1]=(-0.195889209768)*x_ref[0]**o+(-0.0878952476483)*x_ref[0]+(0.636980893598)*x_ref[1]**o+(0.827709469156)*x_ref[1]
-        ref[2,0,2,0]=(0.644658731705)*x_ref[0]**o+(0.275771474382)*x_ref[0]+(0.0802903363405)*x_ref[1]**o+(-0.157785300253)*x_ref[1]
-        ref[2,0,2,1]=(0.324153739483)*x_ref[0]**o+(-0.978043993375)*x_ref[0]+(0.440060321393)*x_ref[1]**o+(0.103952166755)*x_ref[1]
-        ref[2,1,0,0]=(-0.233567312787)*x_ref[0]**o+(0.139529308019)*x_ref[0]+(-0.200168759944)*x_ref[1]**o+(-0.629057762953)*x_ref[1]
-        ref[2,1,0,1]=(-0.407808993281)*x_ref[0]**o+(-0.208049914815)*x_ref[0]+(0.676817990818)*x_ref[1]**o+(-0.27174220248)*x_ref[1]
-        ref[2,1,1,0]=(-0.159113456499)*x_ref[0]**o+(0.586749846436)*x_ref[0]+(0.112658884741)*x_ref[1]**o+(0.521917298039)*x_ref[1]
-        ref[2,1,1,1]=(-0.377986619436)*x_ref[0]**o+(0.920912593255)*x_ref[0]+(0.61285598265)*x_ref[1]**o+(0.491316381102)*x_ref[1]
-        ref[2,1,2,0]=(-0.594573349393)*x_ref[0]**o+(-0.784940398408)*x_ref[0]+(0.0602427709094)*x_ref[1]**o+(0.381334187216)*x_ref[1]
-        ref[2,1,2,1]=(-0.359402310466)*x_ref[0]**o+(0.243014104221)*x_ref[0]+(0.960587701667)*x_ref[1]**o+(0.653124687952)*x_ref[1]
-        ref[2,2,0,0]=(0.667031182369)*x_ref[0]**o+(0.099374903559)*x_ref[0]+(0.00279841725989)*x_ref[1]**o+(-0.413751543412)*x_ref[1]
-        ref[2,2,0,1]=(0.793557898241)*x_ref[0]**o+(0.146572317359)*x_ref[0]+(0.812964170008)*x_ref[1]**o+(-0.988110793397)*x_ref[1]
-        ref[2,2,1,0]=(0.900661246137)*x_ref[0]**o+(-0.997975978586)*x_ref[0]+(0.63300171387)*x_ref[1]**o+(-0.103878548778)*x_ref[1]
-        ref[2,2,1,1]=(-0.456464050469)*x_ref[0]**o+(0.830699811714)*x_ref[0]+(-0.186689927425)*x_ref[1]**o+(-0.100170151164)*x_ref[1]
-        ref[2,2,2,0]=(0.732282428164)*x_ref[0]**o+(0.928947589228)*x_ref[0]+(-0.282773641579)*x_ref[1]**o+(-0.927533112027)*x_ref[1]
-        ref[2,2,2,1]=(0.768111868708)*x_ref[0]**o+(-0.308231472858)*x_ref[0]+(0.890807565689)*x_ref[1]**o+(-0.731196891492)*x_ref[1]
-        ref[2,3,0,0]=(0.559658559574)*x_ref[0]**o+(0.104536615096)*x_ref[0]+(-0.162594824125)*x_ref[1]**o+(-0.172859200721)*x_ref[1]
-        ref[2,3,0,1]=(0.769297853152)*x_ref[0]**o+(0.346598673904)*x_ref[0]+(0.0313124779153)*x_ref[1]**o+(-0.751767979251)*x_ref[1]
-        ref[2,3,1,0]=(0.870887050816)*x_ref[0]**o+(0.593904859463)*x_ref[0]+(-0.108083837899)*x_ref[1]**o+(0.5467383682)*x_ref[1]
-        ref[2,3,1,1]=(0.244253227645)*x_ref[0]**o+(0.911176738654)*x_ref[0]+(-0.497855487714)*x_ref[1]**o+(0.226443212585)*x_ref[1]
-        ref[2,3,2,0]=(-0.599893560596)*x_ref[0]**o+(-0.893030581717)*x_ref[0]+(-0.745249903413)*x_ref[1]**o+(0.563740068619)*x_ref[1]
-        ref[2,3,2,1]=(-0.198088241103)*x_ref[0]**o+(-0.171306730647)*x_ref[0]+(-0.917417138299)*x_ref[1]**o+(0.233920617125)*x_ref[1]
-        ref[2,4,0,0]=(0.804585270618)*x_ref[0]**o+(0.3784879961)*x_ref[0]+(0.621076476928)*x_ref[1]**o+(-0.534671153952)*x_ref[1]
-        ref[2,4,0,1]=(0.380555159947)*x_ref[0]**o+(-0.630487045841)*x_ref[0]+(0.917413683072)*x_ref[1]**o+(0.491925783834)*x_ref[1]
-        ref[2,4,1,0]=(0.946642644964)*x_ref[0]**o+(-0.236438579482)*x_ref[0]+(0.525585953739)*x_ref[1]**o+(0.499940951133)*x_ref[1]
-        ref[2,4,1,1]=(0.827450889548)*x_ref[0]**o+(-0.73264543626)*x_ref[0]+(0.0626492901072)*x_ref[1]**o+(-0.882759632862)*x_ref[1]
-        ref[2,4,2,0]=(-0.0671814496498)*x_ref[0]**o+(0.108634446052)*x_ref[0]+(-0.421081640868)*x_ref[1]**o+(-0.546455336395)*x_ref[1]
-        ref[2,4,2,1]=(-0.601339784479)*x_ref[0]**o+(-0.206937965916)*x_ref[0]+(-0.849120792543)*x_ref[1]**o+(0.615842037441)*x_ref[1]
-        ref[3,0,0,0]=(0.640466650913)*x_ref[0]**o+(-0.936176165762)*x_ref[0]+(0.12758686525)*x_ref[1]**o+(-0.104771286099)*x_ref[1]
-        ref[3,0,0,1]=(-0.868109993006)*x_ref[0]**o+(0.470815003671)*x_ref[0]+(-0.301208743474)*x_ref[1]**o+(-0.296271408095)*x_ref[1]
-        ref[3,0,1,0]=(0.66584252787)*x_ref[0]**o+(-0.889549573986)*x_ref[0]+(-0.0876076820512)*x_ref[1]**o+(-0.249000029178)*x_ref[1]
-        ref[3,0,1,1]=(0.289388044606)*x_ref[0]**o+(0.674519856916)*x_ref[0]+(-0.721031236925)*x_ref[1]**o+(0.093281544052)*x_ref[1]
-        ref[3,0,2,0]=(-0.0558863543119)*x_ref[0]**o+(-0.367544430651)*x_ref[0]+(-0.85580152565)*x_ref[1]**o+(-0.140166367203)*x_ref[1]
-        ref[3,0,2,1]=(0.600709511675)*x_ref[0]**o+(0.286322916564)*x_ref[0]+(-0.544094007372)*x_ref[1]**o+(0.470305833347)*x_ref[1]
-        ref[3,1,0,0]=(-0.828780197168)*x_ref[0]**o+(-0.568096532278)*x_ref[0]+(0.435127414299)*x_ref[1]**o+(0.96890877255)*x_ref[1]
-        ref[3,1,0,1]=(0.191455614175)*x_ref[0]**o+(-0.99507613827)*x_ref[0]+(0.0735829936134)*x_ref[1]**o+(0.635849313153)*x_ref[1]
-        ref[3,1,1,0]=(-0.839049013591)*x_ref[0]**o+(-0.718731394184)*x_ref[0]+(0.575853740085)*x_ref[1]**o+(-0.57924857477)*x_ref[1]
-        ref[3,1,1,1]=(0.116876810453)*x_ref[0]**o+(0.145727923885)*x_ref[0]+(0.0155069936368)*x_ref[1]**o+(0.223214885433)*x_ref[1]
-        ref[3,1,2,0]=(-0.674811720223)*x_ref[0]**o+(0.651640807063)*x_ref[0]+(-0.652022625703)*x_ref[1]**o+(-0.119110788344)*x_ref[1]
-        ref[3,1,2,1]=(-0.544748794193)*x_ref[0]**o+(-0.689440165483)*x_ref[0]+(0.936900319026)*x_ref[1]**o+(-0.337287311564)*x_ref[1]
-        ref[3,2,0,0]=(-0.355059804554)*x_ref[0]**o+(0.458306329535)*x_ref[0]+(0.172261907494)*x_ref[1]**o+(0.498548138594)*x_ref[1]
-        ref[3,2,0,1]=(0.624420187129)*x_ref[0]**o+(0.808931844722)*x_ref[0]+(-0.690635894194)*x_ref[1]**o+(-0.156122444554)*x_ref[1]
-        ref[3,2,1,0]=(-0.190029529776)*x_ref[0]**o+(0.925600418137)*x_ref[0]+(0.601040324953)*x_ref[1]**o+(0.615485749173)*x_ref[1]
-        ref[3,2,1,1]=(0.679796674662)*x_ref[0]**o+(0.879285148869)*x_ref[0]+(0.0476373514288)*x_ref[1]**o+(0.37655760501)*x_ref[1]
-        ref[3,2,2,0]=(0.231748550393)*x_ref[0]**o+(0.209858138221)*x_ref[0]+(-0.88372579866)*x_ref[1]**o+(0.30534744967)*x_ref[1]
-        ref[3,2,2,1]=(-0.772177697671)*x_ref[0]**o+(0.012439044435)*x_ref[0]+(-0.293218976284)*x_ref[1]**o+(0.306955066595)*x_ref[1]
-        ref[3,3,0,0]=(0.387256929042)*x_ref[0]**o+(-0.434015953267)*x_ref[0]+(-0.098736946868)*x_ref[1]**o+(-0.0837712534186)*x_ref[1]
-        ref[3,3,0,1]=(0.396246252967)*x_ref[0]**o+(-0.338955181605)*x_ref[0]+(-0.353504371554)*x_ref[1]**o+(-0.969811402293)*x_ref[1]
-        ref[3,3,1,0]=(-0.336508964723)*x_ref[0]**o+(-0.411882233342)*x_ref[0]+(-0.603965321132)*x_ref[1]**o+(0.177221705416)*x_ref[1]
-        ref[3,3,1,1]=(0.786971174387)*x_ref[0]**o+(0.759003522166)*x_ref[0]+(-0.0961289050409)*x_ref[1]**o+(-0.0811258682982)*x_ref[1]
-        ref[3,3,2,0]=(0.526266925685)*x_ref[0]**o+(-0.113145219611)*x_ref[0]+(-0.208427816884)*x_ref[1]**o+(0.291484710079)*x_ref[1]
-        ref[3,3,2,1]=(-0.591153907468)*x_ref[0]**o+(-0.342892047641)*x_ref[0]+(0.865954283634)*x_ref[1]**o+(-0.22112030903)*x_ref[1]
-        ref[3,4,0,0]=(0.755162128186)*x_ref[0]**o+(0.494457469003)*x_ref[0]+(0.889254517137)*x_ref[1]**o+(0.880654056969)*x_ref[1]
-        ref[3,4,0,1]=(0.450983401629)*x_ref[0]**o+(-0.0855489110466)*x_ref[0]+(0.0601625202676)*x_ref[1]**o+(-0.0730383237708)*x_ref[1]
-        ref[3,4,1,0]=(0.495514588456)*x_ref[0]**o+(-0.0895269876334)*x_ref[0]+(-0.89729630673)*x_ref[1]**o+(0.759465768614)*x_ref[1]
-        ref[3,4,1,1]=(-0.666472982468)*x_ref[0]**o+(-0.251715028171)*x_ref[0]+(-0.0623287375223)*x_ref[1]**o+(-0.895663326995)*x_ref[1]
-        ref[3,4,2,0]=(0.489737923112)*x_ref[0]**o+(0.868066981889)*x_ref[0]+(0.0371747456704)*x_ref[1]**o+(-0.528951636028)*x_ref[1]
-        ref[3,4,2,1]=(0.556312598455)*x_ref[0]**o+(-0.0979773350236)*x_ref[0]+(-0.82785928691)*x_ref[1]**o+(-0.567596765858)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.952750275738)*x[0]**o+(0.971489204087)*x[0]+(-0.320706487584)*x[1]**o+(-0.853260471578)*x[1]+(-0.696434862068)*x[2]**o+(0.641824397433)*x[2]
-        arg[0,0,0,1]=(0.115484192786)*x[0]**o+(0.147813687309)*x[0]+(-0.998010548186)*x[1]**o+(0.0274712088882)*x[1]+(0.136937971489)*x[2]**o+(-0.657986135444)*x[2]
-        arg[0,0,1,0]=(0.805857504779)*x[0]**o+(0.196278916938)*x[0]+(-0.969340785263)*x[1]**o+(-0.543890174888)*x[1]+(0.49118423357)*x[2]**o+(-0.883493800593)*x[2]
-        arg[0,0,1,1]=(-0.808802136474)*x[0]**o+(-0.866039395649)*x[0]+(0.0339207025941)*x[1]**o+(-0.441368773534)*x[1]+(0.673688211653)*x[2]**o+(0.917894389398)*x[2]
-        arg[0,0,2,0]=(0.0459902210078)*x[0]**o+(0.862332666528)*x[0]+(-0.547792306389)*x[1]**o+(0.722176431732)*x[1]+(-0.511278989032)*x[2]**o+(-0.692775336577)*x[2]
-        arg[0,0,2,1]=(-0.641904406513)*x[0]**o+(-0.854450656063)*x[0]+(0.81138894849)*x[1]**o+(0.328886625074)*x[1]+(0.400935831363)*x[2]**o+(-0.25184059766)*x[2]
-        arg[0,1,0,0]=(0.69922840942)*x[0]**o+(-0.798085508443)*x[0]+(-0.85191383431)*x[1]**o+(-0.162940829331)*x[1]+(0.504020642931)*x[2]**o+(0.0950957436173)*x[2]
-        arg[0,1,0,1]=(0.28901429037)*x[0]**o+(-0.624508745729)*x[0]+(0.921288077478)*x[1]**o+(-0.769207901119)*x[1]+(0.0852374599763)*x[2]**o+(-0.402583033986)*x[2]
-        arg[0,1,1,0]=(0.715817282215)*x[0]**o+(0.68735256665)*x[0]+(0.610212058649)*x[1]**o+(0.53560824609)*x[1]+(-0.238908897264)*x[2]**o+(0.619799158474)*x[2]
-        arg[0,1,1,1]=(-0.371797414191)*x[0]**o+(0.106263350514)*x[0]+(0.583768355362)*x[1]**o+(0.818797667369)*x[1]+(0.0567571152493)*x[2]**o+(-0.242244867169)*x[2]
-        arg[0,1,2,0]=(0.190480659729)*x[0]**o+(-0.632415604771)*x[0]+(0.252513826138)*x[1]**o+(0.874732840469)*x[1]+(-0.367769326078)*x[2]**o+(0.364453292404)*x[2]
-        arg[0,1,2,1]=(-0.704507136581)*x[0]**o+(-0.614211737547)*x[0]+(0.533383507313)*x[1]**o+(-0.940007583478)*x[1]+(0.558260002746)*x[2]**o+(0.742565692751)*x[2]
-        arg[0,2,0,0]=(0.132581156766)*x[0]**o+(0.671793183183)*x[0]+(-0.308255110769)*x[1]**o+(-0.956002957061)*x[1]+(0.300091541301)*x[2]**o+(-0.714260746791)*x[2]
-        arg[0,2,0,1]=(-0.836648080859)*x[0]**o+(0.123813861017)*x[0]+(0.866569934894)*x[1]**o+(-0.957824572351)*x[1]+(-0.904478410952)*x[2]**o+(0.691673758521)*x[2]
-        arg[0,2,1,0]=(0.411624721878)*x[0]**o+(0.594054722352)*x[0]+(0.150177701135)*x[1]**o+(0.945855261084)*x[1]+(0.295930158817)*x[2]**o+(-0.607980954424)*x[2]
-        arg[0,2,1,1]=(-0.0777741308373)*x[0]**o+(0.697501295655)*x[0]+(0.981797797329)*x[1]**o+(-0.671827077949)*x[1]+(0.292310146229)*x[2]**o+(0.484652357857)*x[2]
-        arg[0,2,2,0]=(0.194910469807)*x[0]**o+(-0.70008515623)*x[0]+(0.192808336639)*x[1]**o+(-0.962764477371)*x[1]+(-0.34292240753)*x[2]**o+(0.525470829202)*x[2]
-        arg[0,2,2,1]=(0.850368420228)*x[0]**o+(-0.516355386368)*x[0]+(0.395764367873)*x[1]**o+(0.320830752607)*x[1]+(-0.26288679044)*x[2]**o+(0.174457723191)*x[2]
-        arg[0,3,0,0]=(-0.713987556845)*x[0]**o+(0.0391066248253)*x[0]+(-0.63911733479)*x[1]**o+(-0.119953032121)*x[1]+(0.697879836447)*x[2]**o+(-0.474957057702)*x[2]
-        arg[0,3,0,1]=(-0.128614897423)*x[0]**o+(0.7166036403)*x[0]+(0.678415978447)*x[1]**o+(-0.191453169618)*x[1]+(-0.755261361956)*x[2]**o+(-0.839956004196)*x[2]
-        arg[0,3,1,0]=(0.258158740934)*x[0]**o+(-0.412199346967)*x[0]+(-0.781106341272)*x[1]**o+(-0.561162823101)*x[1]+(-0.59549864377)*x[2]**o+(-0.748038415721)*x[2]
-        arg[0,3,1,1]=(0.68950222305)*x[0]**o+(-0.904027774445)*x[0]+(0.769744453441)*x[1]**o+(-0.265549152752)*x[1]+(-0.375978837131)*x[2]**o+(-0.387010981761)*x[2]
-        arg[0,3,2,0]=(0.46852681319)*x[0]**o+(-0.887650258615)*x[0]+(-0.780275624319)*x[1]**o+(0.527897372599)*x[1]+(0.889281778411)*x[2]**o+(0.82538563877)*x[2]
-        arg[0,3,2,1]=(-0.817514448184)*x[0]**o+(-0.230190768519)*x[0]+(-0.101550849344)*x[1]**o+(0.1654885857)*x[1]+(-0.231317749498)*x[2]**o+(0.580153306395)*x[2]
-        arg[0,4,0,0]=(0.394993007242)*x[0]**o+(0.305948764395)*x[0]+(-0.66853441368)*x[1]**o+(0.279027498094)*x[1]+(0.161366934709)*x[2]**o+(-0.742002471552)*x[2]
-        arg[0,4,0,1]=(-0.661214709471)*x[0]**o+(0.548880317935)*x[0]+(0.472682748503)*x[1]**o+(0.266797505699)*x[1]+(0.405618413683)*x[2]**o+(-0.0539677542667)*x[2]
-        arg[0,4,1,0]=(-0.713892424429)*x[0]**o+(0.568075831592)*x[0]+(-0.956180895599)*x[1]**o+(0.63618957695)*x[1]+(0.983696160047)*x[2]**o+(-0.308157929002)*x[2]
-        arg[0,4,1,1]=(-0.666582919353)*x[0]**o+(0.0816884254484)*x[0]+(0.190810048896)*x[1]**o+(0.482322905132)*x[1]+(-0.576597070954)*x[2]**o+(-0.722381611553)*x[2]
-        arg[0,4,2,0]=(-0.0229650731041)*x[0]**o+(-0.0867816754979)*x[0]+(0.0905042102365)*x[1]**o+(-0.994963424765)*x[1]+(0.74504757815)*x[2]**o+(0.71462549644)*x[2]
-        arg[0,4,2,1]=(-0.0464278496147)*x[0]**o+(0.122501026996)*x[0]+(-0.049450141901)*x[1]**o+(-0.388739464086)*x[1]+(-0.151389885067)*x[2]**o+(-0.0316948088803)*x[2]
-        arg[1,0,0,0]=(-0.303653386851)*x[0]**o+(-0.435866753659)*x[0]+(-0.419078175082)*x[1]**o+(-0.907595244917)*x[1]+(0.442156528837)*x[2]**o+(-0.76481785523)*x[2]
-        arg[1,0,0,1]=(0.879454551618)*x[0]**o+(-0.530789858588)*x[0]+(0.942203776542)*x[1]**o+(0.864362935436)*x[1]+(-0.252832164588)*x[2]**o+(0.00758252581015)*x[2]
-        arg[1,0,1,0]=(0.522433142898)*x[0]**o+(0.564002257569)*x[0]+(0.149811689377)*x[1]**o+(-0.757726948165)*x[1]+(-0.767052869719)*x[2]**o+(0.743541806001)*x[2]
-        arg[1,0,1,1]=(0.535612198186)*x[0]**o+(0.0874480088401)*x[0]+(0.913151292296)*x[1]**o+(-0.495024655308)*x[1]+(-0.42308905182)*x[2]**o+(-0.983623551153)*x[2]
-        arg[1,0,2,0]=(0.587221456352)*x[0]**o+(0.0384438535009)*x[0]+(0.301554087927)*x[1]**o+(-0.944074061806)*x[1]+(0.808195432991)*x[2]**o+(-0.46545743768)*x[2]
-        arg[1,0,2,1]=(0.136251169669)*x[0]**o+(0.772190271875)*x[0]+(-0.490981224022)*x[1]**o+(-0.191915588448)*x[1]+(0.792617864405)*x[2]**o+(0.139425359773)*x[2]
-        arg[1,1,0,0]=(0.0440493146329)*x[0]**o+(-0.948951787109)*x[0]+(-0.564104026105)*x[1]**o+(0.177457883377)*x[1]+(0.578169345377)*x[2]**o+(0.35574407049)*x[2]
-        arg[1,1,0,1]=(-0.740305651819)*x[0]**o+(-0.340976006932)*x[0]+(-0.657257828033)*x[1]**o+(-0.456240473558)*x[1]+(0.526236681039)*x[2]**o+(0.804762801115)*x[2]
-        arg[1,1,1,0]=(-0.753480536304)*x[0]**o+(0.424080516297)*x[0]+(-0.97529611006)*x[1]**o+(-0.511450162624)*x[1]+(-0.248982226385)*x[2]**o+(0.497803766242)*x[2]
-        arg[1,1,1,1]=(-0.273280180629)*x[0]**o+(0.798945176097)*x[0]+(0.552152546131)*x[1]**o+(0.737594404744)*x[1]+(0.0339269287984)*x[2]**o+(-0.773791176515)*x[2]
-        arg[1,1,2,0]=(0.553404075378)*x[0]**o+(-0.630969888585)*x[0]+(0.455072287913)*x[1]**o+(0.145928503781)*x[1]+(0.632480470504)*x[2]**o+(0.363815684296)*x[2]
-        arg[1,1,2,1]=(-0.426756293656)*x[0]**o+(-0.449867410734)*x[0]+(-0.875891527959)*x[1]**o+(-0.125243159763)*x[1]+(0.887344501669)*x[2]**o+(-0.0569005112264)*x[2]
-        arg[1,2,0,0]=(0.762313320036)*x[0]**o+(-0.514266376348)*x[0]+(-0.915248032301)*x[1]**o+(0.50418081892)*x[1]+(-0.867662577318)*x[2]**o+(0.731635970592)*x[2]
-        arg[1,2,0,1]=(-0.0866106252969)*x[0]**o+(0.063250309716)*x[0]+(0.598723588976)*x[1]**o+(0.317235331686)*x[1]+(-0.412892601258)*x[2]**o+(0.771147670726)*x[2]
-        arg[1,2,1,0]=(0.57639148624)*x[0]**o+(0.773916349481)*x[0]+(0.401319543026)*x[1]**o+(-0.510387398986)*x[1]+(-0.796773375436)*x[2]**o+(-0.765544756429)*x[2]
-        arg[1,2,1,1]=(-0.686952109389)*x[0]**o+(0.428892331428)*x[0]+(-0.139971762047)*x[1]**o+(-0.747581454837)*x[1]+(0.152196734461)*x[2]**o+(-0.778424993847)*x[2]
-        arg[1,2,2,0]=(0.729199771391)*x[0]**o+(0.185870258363)*x[0]+(0.996198489286)*x[1]**o+(0.0343703739018)*x[1]+(-0.6637833208)*x[2]**o+(-0.738510210409)*x[2]
-        arg[1,2,2,1]=(0.705773326438)*x[0]**o+(-0.633406525448)*x[0]+(0.252620923822)*x[1]**o+(-0.760785834478)*x[1]+(0.995411456622)*x[2]**o+(-0.365718663741)*x[2]
-        arg[1,3,0,0]=(0.826142335301)*x[0]**o+(-0.869335317945)*x[0]+(0.660360312658)*x[1]**o+(0.96157015332)*x[1]+(-0.268246324116)*x[2]**o+(-0.575288823295)*x[2]
-        arg[1,3,0,1]=(0.620117943072)*x[0]**o+(0.51267609202)*x[0]+(-0.882468485772)*x[1]**o+(0.771021246475)*x[1]+(0.398548927211)*x[2]**o+(0.275983192446)*x[2]
-        arg[1,3,1,0]=(0.716523839796)*x[0]**o+(-0.0868143348547)*x[0]+(-0.456384710114)*x[1]**o+(-0.646489063979)*x[1]+(0.594500214771)*x[2]**o+(-0.299956296467)*x[2]
-        arg[1,3,1,1]=(-0.453257208906)*x[0]**o+(0.583260425119)*x[0]+(0.263463648634)*x[1]**o+(0.493693446665)*x[1]+(-0.529884773858)*x[2]**o+(0.220733486264)*x[2]
-        arg[1,3,2,0]=(0.669052014654)*x[0]**o+(-0.247902780475)*x[0]+(0.44071786167)*x[1]**o+(-0.21199653848)*x[1]+(-0.0713603448391)*x[2]**o+(-0.66681439981)*x[2]
-        arg[1,3,2,1]=(-0.341533813758)*x[0]**o+(0.770581995272)*x[0]+(0.03376913861)*x[1]**o+(0.000270719073091)*x[1]+(-0.774936686899)*x[2]**o+(-0.0196300167016)*x[2]
-        arg[1,4,0,0]=(-0.869695667108)*x[0]**o+(0.515676789402)*x[0]+(0.67731822534)*x[1]**o+(0.126887846346)*x[1]+(0.843200966455)*x[2]**o+(-0.59930363301)*x[2]
-        arg[1,4,0,1]=(0.909369352728)*x[0]**o+(-0.110828876636)*x[0]+(-0.65561953478)*x[1]**o+(0.598491879954)*x[1]+(-0.557567770163)*x[2]**o+(-0.391108926502)*x[2]
-        arg[1,4,1,0]=(0.320646291934)*x[0]**o+(0.164062007697)*x[0]+(-0.546323998218)*x[1]**o+(0.72651711346)*x[1]+(-0.613496738898)*x[2]**o+(0.430761082137)*x[2]
-        arg[1,4,1,1]=(-0.721651561555)*x[0]**o+(-0.0647310624509)*x[0]+(-0.360525345485)*x[1]**o+(0.408239277468)*x[1]+(0.600551705094)*x[2]**o+(0.506237401392)*x[2]
-        arg[1,4,2,0]=(-0.391702965605)*x[0]**o+(-0.574470582913)*x[0]+(-0.729724609696)*x[1]**o+(0.91381180302)*x[1]+(-0.544328104929)*x[2]**o+(-0.516992534607)*x[2]
-        arg[1,4,2,1]=(-0.0409666962711)*x[0]**o+(-0.524913112823)*x[0]+(-0.677030607856)*x[1]**o+(-0.530859496807)*x[1]+(0.137890059737)*x[2]**o+(0.0669856870322)*x[2]
-        arg[2,0,0,0]=(0.10369318023)*x[0]**o+(0.345691611083)*x[0]+(-0.222795950561)*x[1]**o+(-0.797690270935)*x[1]+(-0.703457203234)*x[2]**o+(-0.751193209871)*x[2]
-        arg[2,0,0,1]=(0.166457278787)*x[0]**o+(-0.0304766240065)*x[0]+(0.159987374581)*x[1]**o+(0.828012214748)*x[1]+(0.0670696566332)*x[2]**o+(-0.498252024306)*x[2]
-        arg[2,0,1,0]=(0.901095992383)*x[0]**o+(0.400296735981)*x[0]+(0.394687295672)*x[1]**o+(-0.986496611224)*x[1]+(-0.768945602918)*x[2]**o+(-0.782762026735)*x[2]
-        arg[2,0,1,1]=(0.47969549703)*x[0]**o+(0.981251232699)*x[0]+(-0.69807700503)*x[1]**o+(-0.813549271424)*x[1]+(-0.135970806025)*x[2]**o+(0.288738861745)*x[2]
-        arg[2,0,2,0]=(0.315262113284)*x[0]**o+(0.0380265323361)*x[0]+(0.259894600802)*x[1]**o+(0.538712801332)*x[1]+(-0.385783597257)*x[2]**o+(0.666670257561)*x[2]
-        arg[2,0,2,1]=(-0.756715539091)*x[0]**o+(-0.823809574081)*x[0]+(-0.283842954238)*x[1]**o+(-0.640166311159)*x[1]+(-0.39947011053)*x[2]**o+(-0.393543798757)*x[2]
-        arg[2,1,0,0]=(-0.292033523499)*x[0]**o+(-0.940246412652)*x[0]+(-0.327571437608)*x[1]**o+(0.837077706655)*x[1]+(0.446471499818)*x[2]**o+(-0.747249149016)*x[2]
-        arg[2,1,0,1]=(-0.867504469067)*x[0]**o+(0.635684140727)*x[0]+(0.488043128661)*x[1]**o+(-0.163389002402)*x[1]+(0.0440527250714)*x[2]**o+(0.605766722432)*x[2]
-        arg[2,1,1,0]=(-0.0622304802635)*x[0]**o+(0.607299318698)*x[0]+(0.974933906045)*x[1]**o+(0.0632442428777)*x[1]+(0.0672808299851)*x[2]**o+(-0.555700803374)*x[2]
-        arg[2,1,1,1]=(-0.350438453721)*x[0]**o+(-0.826289294567)*x[0]+(-0.473764081208)*x[1]**o+(-0.247804269494)*x[1]+(0.834301955859)*x[2]**o+(0.443058363661)*x[2]
-        arg[2,1,2,0]=(0.5046026606)*x[0]**o+(0.305502438052)*x[0]+(-0.201816724695)*x[1]**o+(-0.101544576856)*x[1]+(0.729817329051)*x[2]**o+(-0.851479834334)*x[2]
-        arg[2,1,2,1]=(0.917039424926)*x[0]**o+(0.260565966637)*x[0]+(-0.595846674057)*x[1]**o+(0.654773238108)*x[1]+(0.544664592565)*x[2]**o+(0.363343885358)*x[2]
-        arg[2,2,0,0]=(0.243879200917)*x[0]**o+(0.335612613868)*x[0]+(-0.287066716076)*x[1]**o+(0.506206687739)*x[1]+(-0.902513036448)*x[2]**o+(-0.427017746025)*x[2]
-        arg[2,2,0,1]=(0.965102871162)*x[0]**o+(0.161476912964)*x[0]+(0.97007160306)*x[1]**o+(0.870104939402)*x[1]+(0.552404991536)*x[2]**o+(-0.319082395552)*x[2]
-        arg[2,2,1,0]=(0.17611459545)*x[0]**o+(-0.457419791602)*x[0]+(-0.00217752259743)*x[1]**o+(-0.632177103931)*x[1]+(0.521123797224)*x[2]**o+(0.427935307605)*x[2]
-        arg[2,2,1,1]=(-0.993298850316)*x[0]**o+(0.277763727112)*x[0]+(0.849464768611)*x[1]**o+(0.890919639607)*x[1]+(0.01030894969)*x[2]**o+(-0.76051772768)*x[2]
-        arg[2,2,2,0]=(-0.622887788117)*x[0]**o+(0.40187802561)*x[0]+(0.836685367934)*x[1]**o+(0.700379534201)*x[1]+(0.683627950354)*x[2]**o+(0.445351804296)*x[2]
-        arg[2,2,2,1]=(0.124965536288)*x[0]**o+(-0.198462168996)*x[0]+(-0.657084126986)*x[1]**o+(-0.420469996385)*x[1]+(0.237164091597)*x[2]**o+(0.161926160295)*x[2]
-        arg[2,3,0,0]=(-0.622682941897)*x[0]**o+(-0.6279729398)*x[0]+(0.189086870792)*x[1]**o+(-0.350822257394)*x[1]+(-0.505481371359)*x[2]**o+(0.812944216714)*x[2]
-        arg[2,3,0,1]=(-0.246704719057)*x[0]**o+(0.513716384141)*x[0]+(-0.264914192193)*x[1]**o+(-0.32984984663)*x[1]+(-0.80409813849)*x[2]**o+(-0.825568736974)*x[2]
-        arg[2,3,1,0]=(-0.534782640399)*x[0]**o+(-0.917823259622)*x[0]+(0.691827074405)*x[1]**o+(-0.818629872154)*x[1]+(0.870046992385)*x[2]**o+(0.00423218787803)*x[2]
-        arg[2,3,1,1]=(0.633068676613)*x[0]**o+(-0.895613811402)*x[0]+(0.62242069294)*x[1]**o+(-0.272136050955)*x[1]+(-0.199008776357)*x[2]**o+(0.836119124508)*x[2]
-        arg[2,3,2,0]=(0.335884106464)*x[0]**o+(-0.857917873801)*x[0]+(-0.42653278071)*x[1]**o+(0.375200781448)*x[1]+(0.378427453722)*x[2]**o+(0.398603623445)*x[2]
-        arg[2,3,2,1]=(0.0602499604703)*x[0]**o+(-0.921459358089)*x[0]+(0.558180675902)*x[1]**o+(0.0863734870743)*x[1]+(0.215167095483)*x[2]**o+(-0.37908830738)*x[2]
-        arg[2,4,0,0]=(0.866321987007)*x[0]**o+(0.81950553744)*x[0]+(0.0422552872889)*x[1]**o+(0.369328458453)*x[1]+(0.0547909452885)*x[2]**o+(-0.396367133883)*x[2]
-        arg[2,4,0,1]=(0.438824337571)*x[0]**o+(0.211435787811)*x[0]+(-0.801273340861)*x[1]**o+(-0.181654271172)*x[1]+(0.374171148243)*x[2]**o+(0.945633108881)*x[2]
-        arg[2,4,1,0]=(0.588044951473)*x[0]**o+(0.401384824924)*x[0]+(-0.191996429616)*x[1]**o+(0.0472579697166)*x[1]+(0.470962958517)*x[2]**o+(0.52718875619)*x[2]
-        arg[2,4,1,1]=(0.371613549998)*x[0]**o+(-0.414998926249)*x[0]+(-0.762013182749)*x[1]**o+(0.796144230249)*x[1]+(-0.555041053148)*x[2]**o+(-0.595298275916)*x[2]
-        arg[2,4,2,0]=(-0.992527136862)*x[0]**o+(-0.995041267483)*x[0]+(-0.730305990844)*x[1]**o+(-0.52470798566)*x[1]+(-0.938945944067)*x[2]**o+(0.33396135548)*x[2]
-        arg[2,4,2,1]=(0.0333921786723)*x[0]**o+(0.707990374515)*x[0]+(-0.106667413755)*x[1]**o+(0.282989655082)*x[1]+(-0.152535982788)*x[2]**o+(-0.75130096727)*x[2]
-        arg[3,0,0,0]=(-0.822675771493)*x[0]**o+(0.726468488157)*x[0]+(0.972567560814)*x[1]**o+(0.308266449093)*x[1]+(0.71069864654)*x[2]**o+(-0.683195491271)*x[2]
-        arg[3,0,0,1]=(-0.505155072199)*x[0]**o+(0.339013729552)*x[0]+(-0.81565931012)*x[1]**o+(0.362458680494)*x[1]+(0.960221320064)*x[2]**o+(-0.17234580875)*x[2]
-        arg[3,0,1,0]=(0.67972657926)*x[0]**o+(0.143085543693)*x[0]+(-0.699516563264)*x[1]**o+(-0.892226133751)*x[1]+(-0.898541541049)*x[2]**o+(-0.736249681714)*x[2]
-        arg[3,0,1,1]=(-0.144423319215)*x[0]**o+(-0.509713525676)*x[0]+(0.347584762861)*x[1]**o+(0.666169972794)*x[1]+(0.691734080163)*x[2]**o+(0.9338062148)*x[2]
-        arg[3,0,2,0]=(-0.47323843589)*x[0]**o+(0.0819655059363)*x[0]+(0.0863030211133)*x[1]**o+(0.127803089307)*x[1]+(-0.155852489756)*x[2]**o+(-0.00470398386987)*x[2]
-        arg[3,0,2,1]=(0.372452726232)*x[0]**o+(0.133808609857)*x[0]+(0.962945642209)*x[1]**o+(0.0446609213929)*x[1]+(-0.446207951293)*x[2]**o+(0.0400733439868)*x[2]
-        arg[3,1,0,0]=(-0.668575734235)*x[0]**o+(0.905913572459)*x[0]+(-0.321327880802)*x[1]**o+(0.0263209456188)*x[1]+(-0.0355325780368)*x[2]**o+(-0.624130395105)*x[2]
-        arg[3,1,0,1]=(0.859810828483)*x[0]**o+(-0.235372125226)*x[0]+(-0.16715244612)*x[1]**o+(-0.793399872713)*x[1]+(0.303973795556)*x[2]**o+(0.176740655638)*x[2]
-        arg[3,1,1,0]=(0.736448874258)*x[0]**o+(-0.448956585466)*x[0]+(0.782095902992)*x[1]**o+(0.796524196866)*x[1]+(-0.732812289541)*x[2]**o+(0.687089667291)*x[2]
-        arg[3,1,1,1]=(-0.797708068194)*x[0]**o+(-0.691308116296)*x[0]+(-0.644065410151)*x[1]**o+(-0.929624672017)*x[1]+(0.265040940279)*x[2]**o+(0.424929324889)*x[2]
-        arg[3,1,2,0]=(0.555032482777)*x[0]**o+(-0.564617314931)*x[0]+(-0.612721853869)*x[1]**o+(-0.048466699593)*x[1]+(0.753265037897)*x[2]**o+(0.913086239874)*x[2]
-        arg[3,1,2,1]=(0.580881807771)*x[0]**o+(0.970973128604)*x[0]+(-0.603610563753)*x[1]**o+(0.979985814438)*x[1]+(-0.639531987694)*x[2]**o+(-0.773094138073)*x[2]
-        arg[3,2,0,0]=(0.574306840544)*x[0]**o+(0.449094769988)*x[0]+(-0.406303076614)*x[1]**o+(-0.776648781906)*x[1]+(-0.59829476647)*x[2]**o+(0.257632446666)*x[2]
-        arg[3,2,0,1]=(0.689106127051)*x[0]**o+(0.717184851708)*x[0]+(-0.495581943615)*x[1]**o+(-0.30329139788)*x[1]+(0.901753128535)*x[2]**o+(0.48496505727)*x[2]
-        arg[3,2,1,0]=(0.252050902256)*x[0]**o+(-0.0414281706943)*x[0]+(-0.284125627654)*x[1]**o+(0.477450554269)*x[1]+(0.849202242148)*x[2]**o+(0.211826565889)*x[2]
-        arg[3,2,1,1]=(-0.319900673571)*x[0]**o+(0.965993723739)*x[0]+(0.671360092314)*x[1]**o+(-0.652805407934)*x[1]+(-0.0352316646853)*x[2]**o+(-0.442493499306)*x[2]
-        arg[3,2,2,0]=(0.525577660439)*x[0]**o+(0.660882378915)*x[0]+(-0.419826738105)*x[1]**o+(-0.798251889077)*x[1]+(-0.430382393461)*x[2]**o+(0.714357242496)*x[2]
-        arg[3,2,2,1]=(-0.200634944034)*x[0]**o+(0.211086366034)*x[0]+(0.116289218188)*x[1]**o+(-0.785792860501)*x[1]+(0.763320327438)*x[2]**o+(-0.457355826175)*x[2]
-        arg[3,3,0,0]=(-0.890873783782)*x[0]**o+(0.322610697657)*x[0]+(-0.351437390332)*x[1]**o+(-0.720698169708)*x[1]+(-0.664444440194)*x[2]**o+(0.274865394829)*x[2]
-        arg[3,3,0,1]=(-0.384885652342)*x[0]**o+(-0.409799972422)*x[0]+(0.679315041587)*x[1]**o+(0.0859788488759)*x[1]+(-0.136173937432)*x[2]**o+(-0.136591429212)*x[2]
-        arg[3,3,1,0]=(0.147934741321)*x[0]**o+(0.246941956666)*x[0]+(0.696831123708)*x[1]**o+(-0.905966322958)*x[1]+(0.672705695255)*x[2]**o+(-0.776017262395)*x[2]
-        arg[3,3,1,1]=(0.933982654679)*x[0]**o+(-0.367246348547)*x[0]+(-0.254076834401)*x[1]**o+(0.148617981234)*x[1]+(-0.486881004358)*x[2]**o+(0.636371570082)*x[2]
-        arg[3,3,2,0]=(-0.536125392071)*x[0]**o+(-0.663380779479)*x[0]+(0.0655694689011)*x[1]**o+(0.0390002326894)*x[1]+(-0.731730129742)*x[2]**o+(-0.578791485067)*x[2]
-        arg[3,3,2,1]=(0.705873902409)*x[0]**o+(-0.0444303506955)*x[0]+(-0.978519191225)*x[1]**o+(-0.0280878186958)*x[1]+(0.182378726121)*x[2]**o+(-0.555345919696)*x[2]
-        arg[3,4,0,0]=(0.945945862395)*x[0]**o+(-0.448487950632)*x[0]+(-0.477570573229)*x[1]**o+(0.313871838624)*x[1]+(0.237944220287)*x[2]**o+(-0.218095130482)*x[2]
-        arg[3,4,0,1]=(-0.758647277269)*x[0]**o+(-0.550604667208)*x[0]+(-0.262944399053)*x[1]**o+(0.994302652859)*x[1]+(0.363440310008)*x[2]**o+(-0.127863970613)*x[2]
-        arg[3,4,1,0]=(0.667202433965)*x[0]**o+(0.954901068821)*x[0]+(0.719745510318)*x[1]**o+(-0.763882742007)*x[1]+(0.880927476123)*x[2]**o+(0.102034630893)*x[2]
-        arg[3,4,1,1]=(-0.684644024456)*x[0]**o+(0.88037275093)*x[0]+(-0.772213766289)*x[1]**o+(-0.702615214094)*x[1]+(-0.25661708053)*x[2]**o+(0.126779040694)*x[2]
-        arg[3,4,2,0]=(-0.589611385303)*x[0]**o+(0.638712635252)*x[0]+(0.745450741856)*x[1]**o+(0.399494092815)*x[1]+(-0.717293809038)*x[2]**o+(0.305662737751)*x[2]
-        arg[3,4,2,1]=(0.0572426997796)*x[0]**o+(-0.764600144578)*x[0]+(0.482545219565)*x[1]**o+(0.525883069411)*x[1]+(-0.612224327195)*x[2]**o+(0.354344820256)*x[2]
-        ref[0,0,0,0]=(0.952750275738)*x_ref[0]**o+(0.971489204087)*x_ref[0]+(-0.320706487584)*x_ref[1]**o+(-0.853260471578)*x_ref[1]+(-0.696434862068)*x_ref[2]**o+(0.641824397433)*x_ref[2]
-        ref[0,0,0,1]=(0.115484192786)*x_ref[0]**o+(0.147813687309)*x_ref[0]+(-0.998010548186)*x_ref[1]**o+(0.0274712088882)*x_ref[1]+(0.136937971489)*x_ref[2]**o+(-0.657986135444)*x_ref[2]
-        ref[0,0,1,0]=(0.805857504779)*x_ref[0]**o+(0.196278916938)*x_ref[0]+(-0.969340785263)*x_ref[1]**o+(-0.543890174888)*x_ref[1]+(0.49118423357)*x_ref[2]**o+(-0.883493800593)*x_ref[2]
-        ref[0,0,1,1]=(-0.808802136474)*x_ref[0]**o+(-0.866039395649)*x_ref[0]+(0.0339207025941)*x_ref[1]**o+(-0.441368773534)*x_ref[1]+(0.673688211653)*x_ref[2]**o+(0.917894389398)*x_ref[2]
-        ref[0,0,2,0]=(0.0459902210078)*x_ref[0]**o+(0.862332666528)*x_ref[0]+(-0.547792306389)*x_ref[1]**o+(0.722176431732)*x_ref[1]+(-0.511278989032)*x_ref[2]**o+(-0.692775336577)*x_ref[2]
-        ref[0,0,2,1]=(-0.641904406513)*x_ref[0]**o+(-0.854450656063)*x_ref[0]+(0.81138894849)*x_ref[1]**o+(0.328886625074)*x_ref[1]+(0.400935831363)*x_ref[2]**o+(-0.25184059766)*x_ref[2]
-        ref[0,1,0,0]=(0.69922840942)*x_ref[0]**o+(-0.798085508443)*x_ref[0]+(-0.85191383431)*x_ref[1]**o+(-0.162940829331)*x_ref[1]+(0.504020642931)*x_ref[2]**o+(0.0950957436173)*x_ref[2]
-        ref[0,1,0,1]=(0.28901429037)*x_ref[0]**o+(-0.624508745729)*x_ref[0]+(0.921288077478)*x_ref[1]**o+(-0.769207901119)*x_ref[1]+(0.0852374599763)*x_ref[2]**o+(-0.402583033986)*x_ref[2]
-        ref[0,1,1,0]=(0.715817282215)*x_ref[0]**o+(0.68735256665)*x_ref[0]+(0.610212058649)*x_ref[1]**o+(0.53560824609)*x_ref[1]+(-0.238908897264)*x_ref[2]**o+(0.619799158474)*x_ref[2]
-        ref[0,1,1,1]=(-0.371797414191)*x_ref[0]**o+(0.106263350514)*x_ref[0]+(0.583768355362)*x_ref[1]**o+(0.818797667369)*x_ref[1]+(0.0567571152493)*x_ref[2]**o+(-0.242244867169)*x_ref[2]
-        ref[0,1,2,0]=(0.190480659729)*x_ref[0]**o+(-0.632415604771)*x_ref[0]+(0.252513826138)*x_ref[1]**o+(0.874732840469)*x_ref[1]+(-0.367769326078)*x_ref[2]**o+(0.364453292404)*x_ref[2]
-        ref[0,1,2,1]=(-0.704507136581)*x_ref[0]**o+(-0.614211737547)*x_ref[0]+(0.533383507313)*x_ref[1]**o+(-0.940007583478)*x_ref[1]+(0.558260002746)*x_ref[2]**o+(0.742565692751)*x_ref[2]
-        ref[0,2,0,0]=(0.132581156766)*x_ref[0]**o+(0.671793183183)*x_ref[0]+(-0.308255110769)*x_ref[1]**o+(-0.956002957061)*x_ref[1]+(0.300091541301)*x_ref[2]**o+(-0.714260746791)*x_ref[2]
-        ref[0,2,0,1]=(-0.836648080859)*x_ref[0]**o+(0.123813861017)*x_ref[0]+(0.866569934894)*x_ref[1]**o+(-0.957824572351)*x_ref[1]+(-0.904478410952)*x_ref[2]**o+(0.691673758521)*x_ref[2]
-        ref[0,2,1,0]=(0.411624721878)*x_ref[0]**o+(0.594054722352)*x_ref[0]+(0.150177701135)*x_ref[1]**o+(0.945855261084)*x_ref[1]+(0.295930158817)*x_ref[2]**o+(-0.607980954424)*x_ref[2]
-        ref[0,2,1,1]=(-0.0777741308373)*x_ref[0]**o+(0.697501295655)*x_ref[0]+(0.981797797329)*x_ref[1]**o+(-0.671827077949)*x_ref[1]+(0.292310146229)*x_ref[2]**o+(0.484652357857)*x_ref[2]
-        ref[0,2,2,0]=(0.194910469807)*x_ref[0]**o+(-0.70008515623)*x_ref[0]+(0.192808336639)*x_ref[1]**o+(-0.962764477371)*x_ref[1]+(-0.34292240753)*x_ref[2]**o+(0.525470829202)*x_ref[2]
-        ref[0,2,2,1]=(0.850368420228)*x_ref[0]**o+(-0.516355386368)*x_ref[0]+(0.395764367873)*x_ref[1]**o+(0.320830752607)*x_ref[1]+(-0.26288679044)*x_ref[2]**o+(0.174457723191)*x_ref[2]
-        ref[0,3,0,0]=(-0.713987556845)*x_ref[0]**o+(0.0391066248253)*x_ref[0]+(-0.63911733479)*x_ref[1]**o+(-0.119953032121)*x_ref[1]+(0.697879836447)*x_ref[2]**o+(-0.474957057702)*x_ref[2]
-        ref[0,3,0,1]=(-0.128614897423)*x_ref[0]**o+(0.7166036403)*x_ref[0]+(0.678415978447)*x_ref[1]**o+(-0.191453169618)*x_ref[1]+(-0.755261361956)*x_ref[2]**o+(-0.839956004196)*x_ref[2]
-        ref[0,3,1,0]=(0.258158740934)*x_ref[0]**o+(-0.412199346967)*x_ref[0]+(-0.781106341272)*x_ref[1]**o+(-0.561162823101)*x_ref[1]+(-0.59549864377)*x_ref[2]**o+(-0.748038415721)*x_ref[2]
-        ref[0,3,1,1]=(0.68950222305)*x_ref[0]**o+(-0.904027774445)*x_ref[0]+(0.769744453441)*x_ref[1]**o+(-0.265549152752)*x_ref[1]+(-0.375978837131)*x_ref[2]**o+(-0.387010981761)*x_ref[2]
-        ref[0,3,2,0]=(0.46852681319)*x_ref[0]**o+(-0.887650258615)*x_ref[0]+(-0.780275624319)*x_ref[1]**o+(0.527897372599)*x_ref[1]+(0.889281778411)*x_ref[2]**o+(0.82538563877)*x_ref[2]
-        ref[0,3,2,1]=(-0.817514448184)*x_ref[0]**o+(-0.230190768519)*x_ref[0]+(-0.101550849344)*x_ref[1]**o+(0.1654885857)*x_ref[1]+(-0.231317749498)*x_ref[2]**o+(0.580153306395)*x_ref[2]
-        ref[0,4,0,0]=(0.394993007242)*x_ref[0]**o+(0.305948764395)*x_ref[0]+(-0.66853441368)*x_ref[1]**o+(0.279027498094)*x_ref[1]+(0.161366934709)*x_ref[2]**o+(-0.742002471552)*x_ref[2]
-        ref[0,4,0,1]=(-0.661214709471)*x_ref[0]**o+(0.548880317935)*x_ref[0]+(0.472682748503)*x_ref[1]**o+(0.266797505699)*x_ref[1]+(0.405618413683)*x_ref[2]**o+(-0.0539677542667)*x_ref[2]
-        ref[0,4,1,0]=(-0.713892424429)*x_ref[0]**o+(0.568075831592)*x_ref[0]+(-0.956180895599)*x_ref[1]**o+(0.63618957695)*x_ref[1]+(0.983696160047)*x_ref[2]**o+(-0.308157929002)*x_ref[2]
-        ref[0,4,1,1]=(-0.666582919353)*x_ref[0]**o+(0.0816884254484)*x_ref[0]+(0.190810048896)*x_ref[1]**o+(0.482322905132)*x_ref[1]+(-0.576597070954)*x_ref[2]**o+(-0.722381611553)*x_ref[2]
-        ref[0,4,2,0]=(-0.0229650731041)*x_ref[0]**o+(-0.0867816754979)*x_ref[0]+(0.0905042102365)*x_ref[1]**o+(-0.994963424765)*x_ref[1]+(0.74504757815)*x_ref[2]**o+(0.71462549644)*x_ref[2]
-        ref[0,4,2,1]=(-0.0464278496147)*x_ref[0]**o+(0.122501026996)*x_ref[0]+(-0.049450141901)*x_ref[1]**o+(-0.388739464086)*x_ref[1]+(-0.151389885067)*x_ref[2]**o+(-0.0316948088803)*x_ref[2]
-        ref[1,0,0,0]=(-0.303653386851)*x_ref[0]**o+(-0.435866753659)*x_ref[0]+(-0.419078175082)*x_ref[1]**o+(-0.907595244917)*x_ref[1]+(0.442156528837)*x_ref[2]**o+(-0.76481785523)*x_ref[2]
-        ref[1,0,0,1]=(0.879454551618)*x_ref[0]**o+(-0.530789858588)*x_ref[0]+(0.942203776542)*x_ref[1]**o+(0.864362935436)*x_ref[1]+(-0.252832164588)*x_ref[2]**o+(0.00758252581015)*x_ref[2]
-        ref[1,0,1,0]=(0.522433142898)*x_ref[0]**o+(0.564002257569)*x_ref[0]+(0.149811689377)*x_ref[1]**o+(-0.757726948165)*x_ref[1]+(-0.767052869719)*x_ref[2]**o+(0.743541806001)*x_ref[2]
-        ref[1,0,1,1]=(0.535612198186)*x_ref[0]**o+(0.0874480088401)*x_ref[0]+(0.913151292296)*x_ref[1]**o+(-0.495024655308)*x_ref[1]+(-0.42308905182)*x_ref[2]**o+(-0.983623551153)*x_ref[2]
-        ref[1,0,2,0]=(0.587221456352)*x_ref[0]**o+(0.0384438535009)*x_ref[0]+(0.301554087927)*x_ref[1]**o+(-0.944074061806)*x_ref[1]+(0.808195432991)*x_ref[2]**o+(-0.46545743768)*x_ref[2]
-        ref[1,0,2,1]=(0.136251169669)*x_ref[0]**o+(0.772190271875)*x_ref[0]+(-0.490981224022)*x_ref[1]**o+(-0.191915588448)*x_ref[1]+(0.792617864405)*x_ref[2]**o+(0.139425359773)*x_ref[2]
-        ref[1,1,0,0]=(0.0440493146329)*x_ref[0]**o+(-0.948951787109)*x_ref[0]+(-0.564104026105)*x_ref[1]**o+(0.177457883377)*x_ref[1]+(0.578169345377)*x_ref[2]**o+(0.35574407049)*x_ref[2]
-        ref[1,1,0,1]=(-0.740305651819)*x_ref[0]**o+(-0.340976006932)*x_ref[0]+(-0.657257828033)*x_ref[1]**o+(-0.456240473558)*x_ref[1]+(0.526236681039)*x_ref[2]**o+(0.804762801115)*x_ref[2]
-        ref[1,1,1,0]=(-0.753480536304)*x_ref[0]**o+(0.424080516297)*x_ref[0]+(-0.97529611006)*x_ref[1]**o+(-0.511450162624)*x_ref[1]+(-0.248982226385)*x_ref[2]**o+(0.497803766242)*x_ref[2]
-        ref[1,1,1,1]=(-0.273280180629)*x_ref[0]**o+(0.798945176097)*x_ref[0]+(0.552152546131)*x_ref[1]**o+(0.737594404744)*x_ref[1]+(0.0339269287984)*x_ref[2]**o+(-0.773791176515)*x_ref[2]
-        ref[1,1,2,0]=(0.553404075378)*x_ref[0]**o+(-0.630969888585)*x_ref[0]+(0.455072287913)*x_ref[1]**o+(0.145928503781)*x_ref[1]+(0.632480470504)*x_ref[2]**o+(0.363815684296)*x_ref[2]
-        ref[1,1,2,1]=(-0.426756293656)*x_ref[0]**o+(-0.449867410734)*x_ref[0]+(-0.875891527959)*x_ref[1]**o+(-0.125243159763)*x_ref[1]+(0.887344501669)*x_ref[2]**o+(-0.0569005112264)*x_ref[2]
-        ref[1,2,0,0]=(0.762313320036)*x_ref[0]**o+(-0.514266376348)*x_ref[0]+(-0.915248032301)*x_ref[1]**o+(0.50418081892)*x_ref[1]+(-0.867662577318)*x_ref[2]**o+(0.731635970592)*x_ref[2]
-        ref[1,2,0,1]=(-0.0866106252969)*x_ref[0]**o+(0.063250309716)*x_ref[0]+(0.598723588976)*x_ref[1]**o+(0.317235331686)*x_ref[1]+(-0.412892601258)*x_ref[2]**o+(0.771147670726)*x_ref[2]
-        ref[1,2,1,0]=(0.57639148624)*x_ref[0]**o+(0.773916349481)*x_ref[0]+(0.401319543026)*x_ref[1]**o+(-0.510387398986)*x_ref[1]+(-0.796773375436)*x_ref[2]**o+(-0.765544756429)*x_ref[2]
-        ref[1,2,1,1]=(-0.686952109389)*x_ref[0]**o+(0.428892331428)*x_ref[0]+(-0.139971762047)*x_ref[1]**o+(-0.747581454837)*x_ref[1]+(0.152196734461)*x_ref[2]**o+(-0.778424993847)*x_ref[2]
-        ref[1,2,2,0]=(0.729199771391)*x_ref[0]**o+(0.185870258363)*x_ref[0]+(0.996198489286)*x_ref[1]**o+(0.0343703739018)*x_ref[1]+(-0.6637833208)*x_ref[2]**o+(-0.738510210409)*x_ref[2]
-        ref[1,2,2,1]=(0.705773326438)*x_ref[0]**o+(-0.633406525448)*x_ref[0]+(0.252620923822)*x_ref[1]**o+(-0.760785834478)*x_ref[1]+(0.995411456622)*x_ref[2]**o+(-0.365718663741)*x_ref[2]
-        ref[1,3,0,0]=(0.826142335301)*x_ref[0]**o+(-0.869335317945)*x_ref[0]+(0.660360312658)*x_ref[1]**o+(0.96157015332)*x_ref[1]+(-0.268246324116)*x_ref[2]**o+(-0.575288823295)*x_ref[2]
-        ref[1,3,0,1]=(0.620117943072)*x_ref[0]**o+(0.51267609202)*x_ref[0]+(-0.882468485772)*x_ref[1]**o+(0.771021246475)*x_ref[1]+(0.398548927211)*x_ref[2]**o+(0.275983192446)*x_ref[2]
-        ref[1,3,1,0]=(0.716523839796)*x_ref[0]**o+(-0.0868143348547)*x_ref[0]+(-0.456384710114)*x_ref[1]**o+(-0.646489063979)*x_ref[1]+(0.594500214771)*x_ref[2]**o+(-0.299956296467)*x_ref[2]
-        ref[1,3,1,1]=(-0.453257208906)*x_ref[0]**o+(0.583260425119)*x_ref[0]+(0.263463648634)*x_ref[1]**o+(0.493693446665)*x_ref[1]+(-0.529884773858)*x_ref[2]**o+(0.220733486264)*x_ref[2]
-        ref[1,3,2,0]=(0.669052014654)*x_ref[0]**o+(-0.247902780475)*x_ref[0]+(0.44071786167)*x_ref[1]**o+(-0.21199653848)*x_ref[1]+(-0.0713603448391)*x_ref[2]**o+(-0.66681439981)*x_ref[2]
-        ref[1,3,2,1]=(-0.341533813758)*x_ref[0]**o+(0.770581995272)*x_ref[0]+(0.03376913861)*x_ref[1]**o+(0.000270719073091)*x_ref[1]+(-0.774936686899)*x_ref[2]**o+(-0.0196300167016)*x_ref[2]
-        ref[1,4,0,0]=(-0.869695667108)*x_ref[0]**o+(0.515676789402)*x_ref[0]+(0.67731822534)*x_ref[1]**o+(0.126887846346)*x_ref[1]+(0.843200966455)*x_ref[2]**o+(-0.59930363301)*x_ref[2]
-        ref[1,4,0,1]=(0.909369352728)*x_ref[0]**o+(-0.110828876636)*x_ref[0]+(-0.65561953478)*x_ref[1]**o+(0.598491879954)*x_ref[1]+(-0.557567770163)*x_ref[2]**o+(-0.391108926502)*x_ref[2]
-        ref[1,4,1,0]=(0.320646291934)*x_ref[0]**o+(0.164062007697)*x_ref[0]+(-0.546323998218)*x_ref[1]**o+(0.72651711346)*x_ref[1]+(-0.613496738898)*x_ref[2]**o+(0.430761082137)*x_ref[2]
-        ref[1,4,1,1]=(-0.721651561555)*x_ref[0]**o+(-0.0647310624509)*x_ref[0]+(-0.360525345485)*x_ref[1]**o+(0.408239277468)*x_ref[1]+(0.600551705094)*x_ref[2]**o+(0.506237401392)*x_ref[2]
-        ref[1,4,2,0]=(-0.391702965605)*x_ref[0]**o+(-0.574470582913)*x_ref[0]+(-0.729724609696)*x_ref[1]**o+(0.91381180302)*x_ref[1]+(-0.544328104929)*x_ref[2]**o+(-0.516992534607)*x_ref[2]
-        ref[1,4,2,1]=(-0.0409666962711)*x_ref[0]**o+(-0.524913112823)*x_ref[0]+(-0.677030607856)*x_ref[1]**o+(-0.530859496807)*x_ref[1]+(0.137890059737)*x_ref[2]**o+(0.0669856870322)*x_ref[2]
-        ref[2,0,0,0]=(0.10369318023)*x_ref[0]**o+(0.345691611083)*x_ref[0]+(-0.222795950561)*x_ref[1]**o+(-0.797690270935)*x_ref[1]+(-0.703457203234)*x_ref[2]**o+(-0.751193209871)*x_ref[2]
-        ref[2,0,0,1]=(0.166457278787)*x_ref[0]**o+(-0.0304766240065)*x_ref[0]+(0.159987374581)*x_ref[1]**o+(0.828012214748)*x_ref[1]+(0.0670696566332)*x_ref[2]**o+(-0.498252024306)*x_ref[2]
-        ref[2,0,1,0]=(0.901095992383)*x_ref[0]**o+(0.400296735981)*x_ref[0]+(0.394687295672)*x_ref[1]**o+(-0.986496611224)*x_ref[1]+(-0.768945602918)*x_ref[2]**o+(-0.782762026735)*x_ref[2]
-        ref[2,0,1,1]=(0.47969549703)*x_ref[0]**o+(0.981251232699)*x_ref[0]+(-0.69807700503)*x_ref[1]**o+(-0.813549271424)*x_ref[1]+(-0.135970806025)*x_ref[2]**o+(0.288738861745)*x_ref[2]
-        ref[2,0,2,0]=(0.315262113284)*x_ref[0]**o+(0.0380265323361)*x_ref[0]+(0.259894600802)*x_ref[1]**o+(0.538712801332)*x_ref[1]+(-0.385783597257)*x_ref[2]**o+(0.666670257561)*x_ref[2]
-        ref[2,0,2,1]=(-0.756715539091)*x_ref[0]**o+(-0.823809574081)*x_ref[0]+(-0.283842954238)*x_ref[1]**o+(-0.640166311159)*x_ref[1]+(-0.39947011053)*x_ref[2]**o+(-0.393543798757)*x_ref[2]
-        ref[2,1,0,0]=(-0.292033523499)*x_ref[0]**o+(-0.940246412652)*x_ref[0]+(-0.327571437608)*x_ref[1]**o+(0.837077706655)*x_ref[1]+(0.446471499818)*x_ref[2]**o+(-0.747249149016)*x_ref[2]
-        ref[2,1,0,1]=(-0.867504469067)*x_ref[0]**o+(0.635684140727)*x_ref[0]+(0.488043128661)*x_ref[1]**o+(-0.163389002402)*x_ref[1]+(0.0440527250714)*x_ref[2]**o+(0.605766722432)*x_ref[2]
-        ref[2,1,1,0]=(-0.0622304802635)*x_ref[0]**o+(0.607299318698)*x_ref[0]+(0.974933906045)*x_ref[1]**o+(0.0632442428777)*x_ref[1]+(0.0672808299851)*x_ref[2]**o+(-0.555700803374)*x_ref[2]
-        ref[2,1,1,1]=(-0.350438453721)*x_ref[0]**o+(-0.826289294567)*x_ref[0]+(-0.473764081208)*x_ref[1]**o+(-0.247804269494)*x_ref[1]+(0.834301955859)*x_ref[2]**o+(0.443058363661)*x_ref[2]
-        ref[2,1,2,0]=(0.5046026606)*x_ref[0]**o+(0.305502438052)*x_ref[0]+(-0.201816724695)*x_ref[1]**o+(-0.101544576856)*x_ref[1]+(0.729817329051)*x_ref[2]**o+(-0.851479834334)*x_ref[2]
-        ref[2,1,2,1]=(0.917039424926)*x_ref[0]**o+(0.260565966637)*x_ref[0]+(-0.595846674057)*x_ref[1]**o+(0.654773238108)*x_ref[1]+(0.544664592565)*x_ref[2]**o+(0.363343885358)*x_ref[2]
-        ref[2,2,0,0]=(0.243879200917)*x_ref[0]**o+(0.335612613868)*x_ref[0]+(-0.287066716076)*x_ref[1]**o+(0.506206687739)*x_ref[1]+(-0.902513036448)*x_ref[2]**o+(-0.427017746025)*x_ref[2]
-        ref[2,2,0,1]=(0.965102871162)*x_ref[0]**o+(0.161476912964)*x_ref[0]+(0.97007160306)*x_ref[1]**o+(0.870104939402)*x_ref[1]+(0.552404991536)*x_ref[2]**o+(-0.319082395552)*x_ref[2]
-        ref[2,2,1,0]=(0.17611459545)*x_ref[0]**o+(-0.457419791602)*x_ref[0]+(-0.00217752259743)*x_ref[1]**o+(-0.632177103931)*x_ref[1]+(0.521123797224)*x_ref[2]**o+(0.427935307605)*x_ref[2]
-        ref[2,2,1,1]=(-0.993298850316)*x_ref[0]**o+(0.277763727112)*x_ref[0]+(0.849464768611)*x_ref[1]**o+(0.890919639607)*x_ref[1]+(0.01030894969)*x_ref[2]**o+(-0.76051772768)*x_ref[2]
-        ref[2,2,2,0]=(-0.622887788117)*x_ref[0]**o+(0.40187802561)*x_ref[0]+(0.836685367934)*x_ref[1]**o+(0.700379534201)*x_ref[1]+(0.683627950354)*x_ref[2]**o+(0.445351804296)*x_ref[2]
-        ref[2,2,2,1]=(0.124965536288)*x_ref[0]**o+(-0.198462168996)*x_ref[0]+(-0.657084126986)*x_ref[1]**o+(-0.420469996385)*x_ref[1]+(0.237164091597)*x_ref[2]**o+(0.161926160295)*x_ref[2]
-        ref[2,3,0,0]=(-0.622682941897)*x_ref[0]**o+(-0.6279729398)*x_ref[0]+(0.189086870792)*x_ref[1]**o+(-0.350822257394)*x_ref[1]+(-0.505481371359)*x_ref[2]**o+(0.812944216714)*x_ref[2]
-        ref[2,3,0,1]=(-0.246704719057)*x_ref[0]**o+(0.513716384141)*x_ref[0]+(-0.264914192193)*x_ref[1]**o+(-0.32984984663)*x_ref[1]+(-0.80409813849)*x_ref[2]**o+(-0.825568736974)*x_ref[2]
-        ref[2,3,1,0]=(-0.534782640399)*x_ref[0]**o+(-0.917823259622)*x_ref[0]+(0.691827074405)*x_ref[1]**o+(-0.818629872154)*x_ref[1]+(0.870046992385)*x_ref[2]**o+(0.00423218787803)*x_ref[2]
-        ref[2,3,1,1]=(0.633068676613)*x_ref[0]**o+(-0.895613811402)*x_ref[0]+(0.62242069294)*x_ref[1]**o+(-0.272136050955)*x_ref[1]+(-0.199008776357)*x_ref[2]**o+(0.836119124508)*x_ref[2]
-        ref[2,3,2,0]=(0.335884106464)*x_ref[0]**o+(-0.857917873801)*x_ref[0]+(-0.42653278071)*x_ref[1]**o+(0.375200781448)*x_ref[1]+(0.378427453722)*x_ref[2]**o+(0.398603623445)*x_ref[2]
-        ref[2,3,2,1]=(0.0602499604703)*x_ref[0]**o+(-0.921459358089)*x_ref[0]+(0.558180675902)*x_ref[1]**o+(0.0863734870743)*x_ref[1]+(0.215167095483)*x_ref[2]**o+(-0.37908830738)*x_ref[2]
-        ref[2,4,0,0]=(0.866321987007)*x_ref[0]**o+(0.81950553744)*x_ref[0]+(0.0422552872889)*x_ref[1]**o+(0.369328458453)*x_ref[1]+(0.0547909452885)*x_ref[2]**o+(-0.396367133883)*x_ref[2]
-        ref[2,4,0,1]=(0.438824337571)*x_ref[0]**o+(0.211435787811)*x_ref[0]+(-0.801273340861)*x_ref[1]**o+(-0.181654271172)*x_ref[1]+(0.374171148243)*x_ref[2]**o+(0.945633108881)*x_ref[2]
-        ref[2,4,1,0]=(0.588044951473)*x_ref[0]**o+(0.401384824924)*x_ref[0]+(-0.191996429616)*x_ref[1]**o+(0.0472579697166)*x_ref[1]+(0.470962958517)*x_ref[2]**o+(0.52718875619)*x_ref[2]
-        ref[2,4,1,1]=(0.371613549998)*x_ref[0]**o+(-0.414998926249)*x_ref[0]+(-0.762013182749)*x_ref[1]**o+(0.796144230249)*x_ref[1]+(-0.555041053148)*x_ref[2]**o+(-0.595298275916)*x_ref[2]
-        ref[2,4,2,0]=(-0.992527136862)*x_ref[0]**o+(-0.995041267483)*x_ref[0]+(-0.730305990844)*x_ref[1]**o+(-0.52470798566)*x_ref[1]+(-0.938945944067)*x_ref[2]**o+(0.33396135548)*x_ref[2]
-        ref[2,4,2,1]=(0.0333921786723)*x_ref[0]**o+(0.707990374515)*x_ref[0]+(-0.106667413755)*x_ref[1]**o+(0.282989655082)*x_ref[1]+(-0.152535982788)*x_ref[2]**o+(-0.75130096727)*x_ref[2]
-        ref[3,0,0,0]=(-0.822675771493)*x_ref[0]**o+(0.726468488157)*x_ref[0]+(0.972567560814)*x_ref[1]**o+(0.308266449093)*x_ref[1]+(0.71069864654)*x_ref[2]**o+(-0.683195491271)*x_ref[2]
-        ref[3,0,0,1]=(-0.505155072199)*x_ref[0]**o+(0.339013729552)*x_ref[0]+(-0.81565931012)*x_ref[1]**o+(0.362458680494)*x_ref[1]+(0.960221320064)*x_ref[2]**o+(-0.17234580875)*x_ref[2]
-        ref[3,0,1,0]=(0.67972657926)*x_ref[0]**o+(0.143085543693)*x_ref[0]+(-0.699516563264)*x_ref[1]**o+(-0.892226133751)*x_ref[1]+(-0.898541541049)*x_ref[2]**o+(-0.736249681714)*x_ref[2]
-        ref[3,0,1,1]=(-0.144423319215)*x_ref[0]**o+(-0.509713525676)*x_ref[0]+(0.347584762861)*x_ref[1]**o+(0.666169972794)*x_ref[1]+(0.691734080163)*x_ref[2]**o+(0.9338062148)*x_ref[2]
-        ref[3,0,2,0]=(-0.47323843589)*x_ref[0]**o+(0.0819655059363)*x_ref[0]+(0.0863030211133)*x_ref[1]**o+(0.127803089307)*x_ref[1]+(-0.155852489756)*x_ref[2]**o+(-0.00470398386987)*x_ref[2]
-        ref[3,0,2,1]=(0.372452726232)*x_ref[0]**o+(0.133808609857)*x_ref[0]+(0.962945642209)*x_ref[1]**o+(0.0446609213929)*x_ref[1]+(-0.446207951293)*x_ref[2]**o+(0.0400733439868)*x_ref[2]
-        ref[3,1,0,0]=(-0.668575734235)*x_ref[0]**o+(0.905913572459)*x_ref[0]+(-0.321327880802)*x_ref[1]**o+(0.0263209456188)*x_ref[1]+(-0.0355325780368)*x_ref[2]**o+(-0.624130395105)*x_ref[2]
-        ref[3,1,0,1]=(0.859810828483)*x_ref[0]**o+(-0.235372125226)*x_ref[0]+(-0.16715244612)*x_ref[1]**o+(-0.793399872713)*x_ref[1]+(0.303973795556)*x_ref[2]**o+(0.176740655638)*x_ref[2]
-        ref[3,1,1,0]=(0.736448874258)*x_ref[0]**o+(-0.448956585466)*x_ref[0]+(0.782095902992)*x_ref[1]**o+(0.796524196866)*x_ref[1]+(-0.732812289541)*x_ref[2]**o+(0.687089667291)*x_ref[2]
-        ref[3,1,1,1]=(-0.797708068194)*x_ref[0]**o+(-0.691308116296)*x_ref[0]+(-0.644065410151)*x_ref[1]**o+(-0.929624672017)*x_ref[1]+(0.265040940279)*x_ref[2]**o+(0.424929324889)*x_ref[2]
-        ref[3,1,2,0]=(0.555032482777)*x_ref[0]**o+(-0.564617314931)*x_ref[0]+(-0.612721853869)*x_ref[1]**o+(-0.048466699593)*x_ref[1]+(0.753265037897)*x_ref[2]**o+(0.913086239874)*x_ref[2]
-        ref[3,1,2,1]=(0.580881807771)*x_ref[0]**o+(0.970973128604)*x_ref[0]+(-0.603610563753)*x_ref[1]**o+(0.979985814438)*x_ref[1]+(-0.639531987694)*x_ref[2]**o+(-0.773094138073)*x_ref[2]
-        ref[3,2,0,0]=(0.574306840544)*x_ref[0]**o+(0.449094769988)*x_ref[0]+(-0.406303076614)*x_ref[1]**o+(-0.776648781906)*x_ref[1]+(-0.59829476647)*x_ref[2]**o+(0.257632446666)*x_ref[2]
-        ref[3,2,0,1]=(0.689106127051)*x_ref[0]**o+(0.717184851708)*x_ref[0]+(-0.495581943615)*x_ref[1]**o+(-0.30329139788)*x_ref[1]+(0.901753128535)*x_ref[2]**o+(0.48496505727)*x_ref[2]
-        ref[3,2,1,0]=(0.252050902256)*x_ref[0]**o+(-0.0414281706943)*x_ref[0]+(-0.284125627654)*x_ref[1]**o+(0.477450554269)*x_ref[1]+(0.849202242148)*x_ref[2]**o+(0.211826565889)*x_ref[2]
-        ref[3,2,1,1]=(-0.319900673571)*x_ref[0]**o+(0.965993723739)*x_ref[0]+(0.671360092314)*x_ref[1]**o+(-0.652805407934)*x_ref[1]+(-0.0352316646853)*x_ref[2]**o+(-0.442493499306)*x_ref[2]
-        ref[3,2,2,0]=(0.525577660439)*x_ref[0]**o+(0.660882378915)*x_ref[0]+(-0.419826738105)*x_ref[1]**o+(-0.798251889077)*x_ref[1]+(-0.430382393461)*x_ref[2]**o+(0.714357242496)*x_ref[2]
-        ref[3,2,2,1]=(-0.200634944034)*x_ref[0]**o+(0.211086366034)*x_ref[0]+(0.116289218188)*x_ref[1]**o+(-0.785792860501)*x_ref[1]+(0.763320327438)*x_ref[2]**o+(-0.457355826175)*x_ref[2]
-        ref[3,3,0,0]=(-0.890873783782)*x_ref[0]**o+(0.322610697657)*x_ref[0]+(-0.351437390332)*x_ref[1]**o+(-0.720698169708)*x_ref[1]+(-0.664444440194)*x_ref[2]**o+(0.274865394829)*x_ref[2]
-        ref[3,3,0,1]=(-0.384885652342)*x_ref[0]**o+(-0.409799972422)*x_ref[0]+(0.679315041587)*x_ref[1]**o+(0.0859788488759)*x_ref[1]+(-0.136173937432)*x_ref[2]**o+(-0.136591429212)*x_ref[2]
-        ref[3,3,1,0]=(0.147934741321)*x_ref[0]**o+(0.246941956666)*x_ref[0]+(0.696831123708)*x_ref[1]**o+(-0.905966322958)*x_ref[1]+(0.672705695255)*x_ref[2]**o+(-0.776017262395)*x_ref[2]
-        ref[3,3,1,1]=(0.933982654679)*x_ref[0]**o+(-0.367246348547)*x_ref[0]+(-0.254076834401)*x_ref[1]**o+(0.148617981234)*x_ref[1]+(-0.486881004358)*x_ref[2]**o+(0.636371570082)*x_ref[2]
-        ref[3,3,2,0]=(-0.536125392071)*x_ref[0]**o+(-0.663380779479)*x_ref[0]+(0.0655694689011)*x_ref[1]**o+(0.0390002326894)*x_ref[1]+(-0.731730129742)*x_ref[2]**o+(-0.578791485067)*x_ref[2]
-        ref[3,3,2,1]=(0.705873902409)*x_ref[0]**o+(-0.0444303506955)*x_ref[0]+(-0.978519191225)*x_ref[1]**o+(-0.0280878186958)*x_ref[1]+(0.182378726121)*x_ref[2]**o+(-0.555345919696)*x_ref[2]
-        ref[3,4,0,0]=(0.945945862395)*x_ref[0]**o+(-0.448487950632)*x_ref[0]+(-0.477570573229)*x_ref[1]**o+(0.313871838624)*x_ref[1]+(0.237944220287)*x_ref[2]**o+(-0.218095130482)*x_ref[2]
-        ref[3,4,0,1]=(-0.758647277269)*x_ref[0]**o+(-0.550604667208)*x_ref[0]+(-0.262944399053)*x_ref[1]**o+(0.994302652859)*x_ref[1]+(0.363440310008)*x_ref[2]**o+(-0.127863970613)*x_ref[2]
-        ref[3,4,1,0]=(0.667202433965)*x_ref[0]**o+(0.954901068821)*x_ref[0]+(0.719745510318)*x_ref[1]**o+(-0.763882742007)*x_ref[1]+(0.880927476123)*x_ref[2]**o+(0.102034630893)*x_ref[2]
-        ref[3,4,1,1]=(-0.684644024456)*x_ref[0]**o+(0.88037275093)*x_ref[0]+(-0.772213766289)*x_ref[1]**o+(-0.702615214094)*x_ref[1]+(-0.25661708053)*x_ref[2]**o+(0.126779040694)*x_ref[2]
-        ref[3,4,2,0]=(-0.589611385303)*x_ref[0]**o+(0.638712635252)*x_ref[0]+(0.745450741856)*x_ref[1]**o+(0.399494092815)*x_ref[1]+(-0.717293809038)*x_ref[2]**o+(0.305662737751)*x_ref[2]
-        ref[3,4,2,1]=(0.0572426997796)*x_ref[0]**o+(-0.764600144578)*x_ref[0]+(0.482545219565)*x_ref[1]**o+(0.525883069411)*x_ref[1]+(-0.612224327195)*x_ref[2]**o+(0.354344820256)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.100067148208)*x[0]+(-0.8375743725)*x[1]
-        ref=(-0.100067148208)*x_ref[0]+(-0.8375743725)*x_ref[1]
-      else:
-        arg=(-0.247343416726)*x[0]+(0.604193484164)*x[1]+(-0.219899438287)*x[2]
-        ref=(-0.247343416726)*x_ref[0]+(0.604193484164)*x_ref[1]+(-0.219899438287)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        arg[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-        ref[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        ref[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-      else:
-        arg[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        arg[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-        ref[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        ref[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.00153698933322)*x[0]+(0.392281645764)*x[1]
-        arg[0,1]=(-1.2794655544)*x[0]+(-0.373519639818)*x[1]
-        arg[0,2]=(0.30127033321)*x[0]+(-0.0996865853738)*x[1]
-        arg[0,3]=(1.23405799349)*x[0]+(0.498558200339)*x[1]
-        arg[0,4]=(0.85519350742)*x[0]+(-0.19188046135)*x[1]
-        arg[1,0]=(0.417367834962)*x[0]+(0.992318201639)*x[1]
-        arg[1,1]=(-0.646432128833)*x[0]+(-0.872750321582)*x[1]
-        arg[1,2]=(-0.806117185061)*x[0]+(-0.89396408325)*x[1]
-        arg[1,3]=(0.768017237627)*x[0]+(-1.2904111912)*x[1]
-        arg[1,4]=(-0.0159685523188)*x[0]+(0.401410193169)*x[1]
-        arg[2,0]=(-0.844501716181)*x[0]+(-0.123115343819)*x[1]
-        arg[2,1]=(1.08441909409)*x[0]+(0.152432282539)*x[1]
-        arg[2,2]=(-0.60551037413)*x[0]+(1.15692828826)*x[1]
-        arg[2,3]=(-1.21509168541)*x[0]+(1.03683236377)*x[1]
-        arg[2,4]=(1.16850730134)*x[0]+(0.162202615909)*x[1]
-        arg[3,0]=(0.727772166897)*x[0]+(-0.296815840935)*x[1]
-        arg[3,1]=(-0.0880577151489)*x[0]+(1.66427691426)*x[1]
-        arg[3,2]=(0.415144534458)*x[0]+(-0.555833723295)*x[1]
-        arg[3,3]=(1.09444635829)*x[0]+(-0.335209417536)*x[1]
-        arg[3,4]=(-1.05047769585)*x[0]+(0.684427039986)*x[1]
-        ref[0,0]=(0.00153698933322)*x_ref[0]+(0.392281645764)*x_ref[1]
-        ref[0,1]=(-1.2794655544)*x_ref[0]+(-0.373519639818)*x_ref[1]
-        ref[0,2]=(0.30127033321)*x_ref[0]+(-0.0996865853738)*x_ref[1]
-        ref[0,3]=(1.23405799349)*x_ref[0]+(0.498558200339)*x_ref[1]
-        ref[0,4]=(0.85519350742)*x_ref[0]+(-0.19188046135)*x_ref[1]
-        ref[1,0]=(0.417367834962)*x_ref[0]+(0.992318201639)*x_ref[1]
-        ref[1,1]=(-0.646432128833)*x_ref[0]+(-0.872750321582)*x_ref[1]
-        ref[1,2]=(-0.806117185061)*x_ref[0]+(-0.89396408325)*x_ref[1]
-        ref[1,3]=(0.768017237627)*x_ref[0]+(-1.2904111912)*x_ref[1]
-        ref[1,4]=(-0.0159685523188)*x_ref[0]+(0.401410193169)*x_ref[1]
-        ref[2,0]=(-0.844501716181)*x_ref[0]+(-0.123115343819)*x_ref[1]
-        ref[2,1]=(1.08441909409)*x_ref[0]+(0.152432282539)*x_ref[1]
-        ref[2,2]=(-0.60551037413)*x_ref[0]+(1.15692828826)*x_ref[1]
-        ref[2,3]=(-1.21509168541)*x_ref[0]+(1.03683236377)*x_ref[1]
-        ref[2,4]=(1.16850730134)*x_ref[0]+(0.162202615909)*x_ref[1]
-        ref[3,0]=(0.727772166897)*x_ref[0]+(-0.296815840935)*x_ref[1]
-        ref[3,1]=(-0.0880577151489)*x_ref[0]+(1.66427691426)*x_ref[1]
-        ref[3,2]=(0.415144534458)*x_ref[0]+(-0.555833723295)*x_ref[1]
-        ref[3,3]=(1.09444635829)*x_ref[0]+(-0.335209417536)*x_ref[1]
-        ref[3,4]=(-1.05047769585)*x_ref[0]+(0.684427039986)*x_ref[1]
-      else:
-        arg[0,0]=(-0.611607640773)*x[0]+(0.584485971628)*x[1]+(0.0090316337643)*x[2]
-        arg[0,1]=(0.905278285857)*x[0]+(0.332523151242)*x[1]+(0.9909841807)*x[2]
-        arg[0,2]=(-1.06629333132)*x[0]+(-0.38478180064)*x[1]+(-0.63309211256)*x[2]
-        arg[0,3]=(0.122436386344)*x[0]+(-0.218752671204)*x[1]+(-0.746695172216)*x[2]
-        arg[0,4]=(1.03152124874)*x[0]+(-1.11327271563)*x[1]+(-0.257591112135)*x[2]
-        arg[1,0]=(0.969019600299)*x[0]+(-0.320279309689)*x[1]+(0.327767746545)*x[2]
-        arg[1,1]=(0.291023069052)*x[0]+(0.78112901064)*x[1]+(0.879257239042)*x[2]
-        arg[1,2]=(-0.131262891536)*x[0]+(-0.0109690229153)*x[1]+(-0.171900332406)*x[2]
-        arg[1,3]=(-1.32272684486)*x[0]+(-0.256869536085)*x[1]+(0.0308524567462)*x[2]
-        arg[1,4]=(1.30707061279)*x[0]+(0.972866282634)*x[1]+(-0.474948537882)*x[2]
-        arg[2,0]=(0.169034210421)*x[0]+(-1.08714896226)*x[1]+(-0.636838450708)*x[2]
-        arg[2,1]=(-0.470752780773)*x[0]+(-0.695286088059)*x[1]+(-1.19197058712)*x[2]
-        arg[2,2]=(0.701403721228)*x[0]+(0.551002482436)*x[1]+(-0.295853851234)*x[2]
-        arg[2,3]=(-0.796431361745)*x[0]+(0.0581884766856)*x[1]+(-1.13668563089)*x[2]
-        arg[2,4]=(-0.733185798017)*x[0]+(0.178900103735)*x[1]+(-0.845671526781)*x[2]
-        arg[3,0]=(-1.47064927107)*x[0]+(1.33393324965)*x[1]+(-0.767393460937)*x[2]
-        arg[3,1]=(1.36784513226)*x[0]+(0.100008910431)*x[1]+(-1.09210256713)*x[2]
-        arg[3,2]=(-0.873076669977)*x[0]+(0.367213631778)*x[1]+(0.0698296920039)*x[2]
-        arg[3,3]=(-1.76609214158)*x[0]+(-1.26186286566)*x[1]+(0.377817035113)*x[2]
-        arg[3,4]=(-1.28261709396)*x[0]+(0.240480767533)*x[1]+(0.307813279357)*x[2]
-        ref[0,0]=(-0.611607640773)*x_ref[0]+(0.584485971628)*x_ref[1]+(0.0090316337643)*x_ref[2]
-        ref[0,1]=(0.905278285857)*x_ref[0]+(0.332523151242)*x_ref[1]+(0.9909841807)*x_ref[2]
-        ref[0,2]=(-1.06629333132)*x_ref[0]+(-0.38478180064)*x_ref[1]+(-0.63309211256)*x_ref[2]
-        ref[0,3]=(0.122436386344)*x_ref[0]+(-0.218752671204)*x_ref[1]+(-0.746695172216)*x_ref[2]
-        ref[0,4]=(1.03152124874)*x_ref[0]+(-1.11327271563)*x_ref[1]+(-0.257591112135)*x_ref[2]
-        ref[1,0]=(0.969019600299)*x_ref[0]+(-0.320279309689)*x_ref[1]+(0.327767746545)*x_ref[2]
-        ref[1,1]=(0.291023069052)*x_ref[0]+(0.78112901064)*x_ref[1]+(0.879257239042)*x_ref[2]
-        ref[1,2]=(-0.131262891536)*x_ref[0]+(-0.0109690229153)*x_ref[1]+(-0.171900332406)*x_ref[2]
-        ref[1,3]=(-1.32272684486)*x_ref[0]+(-0.256869536085)*x_ref[1]+(0.0308524567462)*x_ref[2]
-        ref[1,4]=(1.30707061279)*x_ref[0]+(0.972866282634)*x_ref[1]+(-0.474948537882)*x_ref[2]
-        ref[2,0]=(0.169034210421)*x_ref[0]+(-1.08714896226)*x_ref[1]+(-0.636838450708)*x_ref[2]
-        ref[2,1]=(-0.470752780773)*x_ref[0]+(-0.695286088059)*x_ref[1]+(-1.19197058712)*x_ref[2]
-        ref[2,2]=(0.701403721228)*x_ref[0]+(0.551002482436)*x_ref[1]+(-0.295853851234)*x_ref[2]
-        ref[2,3]=(-0.796431361745)*x_ref[0]+(0.0581884766856)*x_ref[1]+(-1.13668563089)*x_ref[2]
-        ref[2,4]=(-0.733185798017)*x_ref[0]+(0.178900103735)*x_ref[1]+(-0.845671526781)*x_ref[2]
-        ref[3,0]=(-1.47064927107)*x_ref[0]+(1.33393324965)*x_ref[1]+(-0.767393460937)*x_ref[2]
-        ref[3,1]=(1.36784513226)*x_ref[0]+(0.100008910431)*x_ref[1]+(-1.09210256713)*x_ref[2]
-        ref[3,2]=(-0.873076669977)*x_ref[0]+(0.367213631778)*x_ref[1]+(0.0698296920039)*x_ref[2]
-        ref[3,3]=(-1.76609214158)*x_ref[0]+(-1.26186286566)*x_ref[1]+(0.377817035113)*x_ref[2]
-        ref[3,4]=(-1.28261709396)*x_ref[0]+(0.240480767533)*x_ref[1]+(0.307813279357)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.423505169404)*x[0]+(-1.10390334264)*x[1]
-        arg[0,0,1]=(-0.181820089254)*x[0]+(-0.374602268791)*x[1]
-        arg[0,1,0]=(-1.36906917075)*x[0]+(0.26554385908)*x[1]
-        arg[0,1,1]=(-0.280661572374)*x[0]+(-0.239232524287)*x[1]
-        arg[1,0,0]=(-1.25670251934)*x[0]+(-0.429353977735)*x[1]
-        arg[1,0,1]=(-0.747928970735)*x[0]+(1.17874317611)*x[1]
-        arg[1,1,0]=(-0.548814611802)*x[0]+(-0.0249315764285)*x[1]
-        arg[1,1,1]=(-0.481123117522)*x[0]+(1.23402203879)*x[1]
-        arg[2,0,0]=(-0.0639512689884)*x[0]+(-0.0278213371376)*x[1]
-        arg[2,0,1]=(-1.17292797621)*x[0]+(0.42140600304)*x[1]
-        arg[2,1,0]=(-0.358052601083)*x[0]+(-1.66807880791)*x[1]
-        arg[2,1,1]=(-0.291433251349)*x[0]+(0.111473162108)*x[1]
-        arg[3,0,0]=(0.742643625989)*x[0]+(-1.29214106228)*x[1]
-        arg[3,0,1]=(0.319887321826)*x[0]+(-0.40213369238)*x[1]
-        arg[3,1,0]=(-0.449412064097)*x[0]+(-1.10654262009)*x[1]
-        arg[3,1,1]=(1.19722227632)*x[0]+(1.3455799026)*x[1]
-        arg[4,0,0]=(-1.77453188487)*x[0]+(0.634838793872)*x[1]
-        arg[4,0,1]=(-0.215461066907)*x[0]+(1.11635233844)*x[1]
-        arg[4,1,0]=(0.835816652592)*x[0]+(0.668378554214)*x[1]
-        arg[4,1,1]=(-1.22133225406)*x[0]+(-0.148780252398)*x[1]
-        arg[5,0,0]=(0.320245409639)*x[0]+(-1.08828513776)*x[1]
-        arg[5,0,1]=(-0.1865835417)*x[0]+(-0.353282061874)*x[1]
-        arg[5,1,0]=(1.38858040685)*x[0]+(0.166398261098)*x[1]
-        arg[5,1,1]=(0.947718875755)*x[0]+(-1.06171934302)*x[1]
-        ref[0,0,0]=(-0.423505169404)*x_ref[0]+(-1.10390334264)*x_ref[1]
-        ref[0,0,1]=(-0.181820089254)*x_ref[0]+(-0.374602268791)*x_ref[1]
-        ref[0,1,0]=(-1.36906917075)*x_ref[0]+(0.26554385908)*x_ref[1]
-        ref[0,1,1]=(-0.280661572374)*x_ref[0]+(-0.239232524287)*x_ref[1]
-        ref[1,0,0]=(-1.25670251934)*x_ref[0]+(-0.429353977735)*x_ref[1]
-        ref[1,0,1]=(-0.747928970735)*x_ref[0]+(1.17874317611)*x_ref[1]
-        ref[1,1,0]=(-0.548814611802)*x_ref[0]+(-0.0249315764285)*x_ref[1]
-        ref[1,1,1]=(-0.481123117522)*x_ref[0]+(1.23402203879)*x_ref[1]
-        ref[2,0,0]=(-0.0639512689884)*x_ref[0]+(-0.0278213371376)*x_ref[1]
-        ref[2,0,1]=(-1.17292797621)*x_ref[0]+(0.42140600304)*x_ref[1]
-        ref[2,1,0]=(-0.358052601083)*x_ref[0]+(-1.66807880791)*x_ref[1]
-        ref[2,1,1]=(-0.291433251349)*x_ref[0]+(0.111473162108)*x_ref[1]
-        ref[3,0,0]=(0.742643625989)*x_ref[0]+(-1.29214106228)*x_ref[1]
-        ref[3,0,1]=(0.319887321826)*x_ref[0]+(-0.40213369238)*x_ref[1]
-        ref[3,1,0]=(-0.449412064097)*x_ref[0]+(-1.10654262009)*x_ref[1]
-        ref[3,1,1]=(1.19722227632)*x_ref[0]+(1.3455799026)*x_ref[1]
-        ref[4,0,0]=(-1.77453188487)*x_ref[0]+(0.634838793872)*x_ref[1]
-        ref[4,0,1]=(-0.215461066907)*x_ref[0]+(1.11635233844)*x_ref[1]
-        ref[4,1,0]=(0.835816652592)*x_ref[0]+(0.668378554214)*x_ref[1]
-        ref[4,1,1]=(-1.22133225406)*x_ref[0]+(-0.148780252398)*x_ref[1]
-        ref[5,0,0]=(0.320245409639)*x_ref[0]+(-1.08828513776)*x_ref[1]
-        ref[5,0,1]=(-0.1865835417)*x_ref[0]+(-0.353282061874)*x_ref[1]
-        ref[5,1,0]=(1.38858040685)*x_ref[0]+(0.166398261098)*x_ref[1]
-        ref[5,1,1]=(0.947718875755)*x_ref[0]+(-1.06171934302)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.892096322478)*x[0]+(0.720363183451)*x[1]+(0.600609272191)*x[2]
-        arg[0,0,1]=(-0.418024461935)*x[0]+(-0.819275292035)*x[1]+(0.134962557692)*x[2]
-        arg[0,1,0]=(-0.449783838361)*x[0]+(0.943677173533)*x[1]+(0.209424190991)*x[2]
-        arg[0,1,1]=(-0.424386775004)*x[0]+(-0.213024388094)*x[1]+(-1.05927943384)*x[2]
-        arg[1,0,0]=(-0.699504096539)*x[0]+(-0.153570308377)*x[1]+(0.576902392658)*x[2]
-        arg[1,0,1]=(-0.426914055661)*x[0]+(-0.330405267059)*x[1]+(1.07656632155)*x[2]
-        arg[1,1,0]=(0.775238005352)*x[0]+(1.11012072575)*x[1]+(0.764627098603)*x[2]
-        arg[1,1,1]=(0.0130424708408)*x[0]+(-0.671778102107)*x[1]+(0.780684368983)*x[2]
-        arg[2,0,0]=(-0.0512224258498)*x[0]+(-1.50515803984)*x[1]+(0.342824143946)*x[2]
-        arg[2,0,1]=(0.117541624176)*x[0]+(0.372415524552)*x[1]+(0.255218095016)*x[2]
-        arg[2,1,0]=(-0.574508895703)*x[0]+(0.345217292359)*x[1]+(0.209211956821)*x[2]
-        arg[2,1,1]=(0.93643587147)*x[0]+(-0.096209009902)*x[1]+(0.205150859527)*x[2]
-        arg[3,0,0]=(1.7541929884)*x[0]+(0.169061478447)*x[1]+(0.534746695515)*x[2]
-        arg[3,0,1]=(0.442329266782)*x[0]+(0.334971710414)*x[1]+(1.66892557698)*x[2]
-        arg[3,1,0]=(0.316436716758)*x[0]+(-1.25442030987)*x[1]+(0.372183105374)*x[2]
-        arg[3,1,1]=(-0.254157820265)*x[0]+(0.287381300023)*x[1]+(0.0574117423352)*x[2]
-        arg[4,0,0]=(-1.08380257521)*x[0]+(-1.31461890032)*x[1]+(-0.503802775099)*x[2]
-        arg[4,0,1]=(-0.558293486798)*x[0]+(0.702317635925)*x[1]+(0.463814829137)*x[2]
-        arg[4,1,0]=(-0.677160971974)*x[0]+(-0.14921275312)*x[1]+(-1.6501459435)*x[2]
-        arg[4,1,1]=(-0.176672532474)*x[0]+(0.945017605811)*x[1]+(-0.790342939788)*x[2]
-        arg[5,0,0]=(-1.45668070675)*x[0]+(-0.404957129204)*x[1]+(1.37383065954)*x[2]
-        arg[5,0,1]=(0.53829326756)*x[0]+(0.543333031479)*x[1]+(-0.854057296362)*x[2]
-        arg[5,1,0]=(0.805864283921)*x[0]+(-0.00186634953513)*x[1]+(-1.97111362539)*x[2]
-        arg[5,1,1]=(-0.387746238967)*x[0]+(-0.739158353882)*x[1]+(-0.134082808118)*x[2]
-        ref[0,0,0]=(-0.892096322478)*x_ref[0]+(0.720363183451)*x_ref[1]+(0.600609272191)*x_ref[2]
-        ref[0,0,1]=(-0.418024461935)*x_ref[0]+(-0.819275292035)*x_ref[1]+(0.134962557692)*x_ref[2]
-        ref[0,1,0]=(-0.449783838361)*x_ref[0]+(0.943677173533)*x_ref[1]+(0.209424190991)*x_ref[2]
-        ref[0,1,1]=(-0.424386775004)*x_ref[0]+(-0.213024388094)*x_ref[1]+(-1.05927943384)*x_ref[2]
-        ref[1,0,0]=(-0.699504096539)*x_ref[0]+(-0.153570308377)*x_ref[1]+(0.576902392658)*x_ref[2]
-        ref[1,0,1]=(-0.426914055661)*x_ref[0]+(-0.330405267059)*x_ref[1]+(1.07656632155)*x_ref[2]
-        ref[1,1,0]=(0.775238005352)*x_ref[0]+(1.11012072575)*x_ref[1]+(0.764627098603)*x_ref[2]
-        ref[1,1,1]=(0.0130424708408)*x_ref[0]+(-0.671778102107)*x_ref[1]+(0.780684368983)*x_ref[2]
-        ref[2,0,0]=(-0.0512224258498)*x_ref[0]+(-1.50515803984)*x_ref[1]+(0.342824143946)*x_ref[2]
-        ref[2,0,1]=(0.117541624176)*x_ref[0]+(0.372415524552)*x_ref[1]+(0.255218095016)*x_ref[2]
-        ref[2,1,0]=(-0.574508895703)*x_ref[0]+(0.345217292359)*x_ref[1]+(0.209211956821)*x_ref[2]
-        ref[2,1,1]=(0.93643587147)*x_ref[0]+(-0.096209009902)*x_ref[1]+(0.205150859527)*x_ref[2]
-        ref[3,0,0]=(1.7541929884)*x_ref[0]+(0.169061478447)*x_ref[1]+(0.534746695515)*x_ref[2]
-        ref[3,0,1]=(0.442329266782)*x_ref[0]+(0.334971710414)*x_ref[1]+(1.66892557698)*x_ref[2]
-        ref[3,1,0]=(0.316436716758)*x_ref[0]+(-1.25442030987)*x_ref[1]+(0.372183105374)*x_ref[2]
-        ref[3,1,1]=(-0.254157820265)*x_ref[0]+(0.287381300023)*x_ref[1]+(0.0574117423352)*x_ref[2]
-        ref[4,0,0]=(-1.08380257521)*x_ref[0]+(-1.31461890032)*x_ref[1]+(-0.503802775099)*x_ref[2]
-        ref[4,0,1]=(-0.558293486798)*x_ref[0]+(0.702317635925)*x_ref[1]+(0.463814829137)*x_ref[2]
-        ref[4,1,0]=(-0.677160971974)*x_ref[0]+(-0.14921275312)*x_ref[1]+(-1.6501459435)*x_ref[2]
-        ref[4,1,1]=(-0.176672532474)*x_ref[0]+(0.945017605811)*x_ref[1]+(-0.790342939788)*x_ref[2]
-        ref[5,0,0]=(-1.45668070675)*x_ref[0]+(-0.404957129204)*x_ref[1]+(1.37383065954)*x_ref[2]
-        ref[5,0,1]=(0.53829326756)*x_ref[0]+(0.543333031479)*x_ref[1]+(-0.854057296362)*x_ref[2]
-        ref[5,1,0]=(0.805864283921)*x_ref[0]+(-0.00186634953513)*x_ref[1]+(-1.97111362539)*x_ref[2]
-        ref[5,1,1]=(-0.387746238967)*x_ref[0]+(-0.739158353882)*x_ref[1]+(-0.134082808118)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.754311658086)*x[0]+(0.235157034342)*x[1]
-        arg[0,0,0,1]=(-1.33786315024)*x[0]+(0.243349279742)*x[1]
-        arg[0,0,1,0]=(1.48657750088)*x[0]+(1.09853108305)*x[1]
-        arg[0,0,1,1]=(1.4501362266)*x[0]+(0.824811567155)*x[1]
-        arg[0,0,2,0]=(1.12567566082)*x[0]+(0.663525681174)*x[1]
-        arg[0,0,2,1]=(1.48991565019)*x[0]+(-0.680795365011)*x[1]
-        arg[0,1,0,0]=(0.268571449528)*x[0]+(0.818595834672)*x[1]
-        arg[0,1,0,1]=(-1.55490945555)*x[0]+(0.783595197888)*x[1]
-        arg[0,1,1,0]=(0.913201382585)*x[0]+(0.855491379376)*x[1]
-        arg[0,1,1,1]=(-0.179192075116)*x[0]+(-0.690415079523)*x[1]
-        arg[0,1,2,0]=(-0.0393574502912)*x[0]+(-0.690157650634)*x[1]
-        arg[0,1,2,1]=(0.784216863217)*x[0]+(0.498735486159)*x[1]
-        arg[0,2,0,0]=(0.137939554165)*x[0]+(-1.33961519113)*x[1]
-        arg[0,2,0,1]=(-1.03897311736)*x[0]+(-1.37797405312)*x[1]
-        arg[0,2,1,0]=(0.199812003756)*x[0]+(-0.0388499674037)*x[1]
-        arg[0,2,1,1]=(1.15530534202)*x[0]+(-1.28280869078)*x[1]
-        arg[0,2,2,0]=(0.836447791155)*x[0]+(1.2627066026)*x[1]
-        arg[0,2,2,1]=(-0.584608492688)*x[0]+(-1.55305974305)*x[1]
-        arg[0,3,0,0]=(-0.661952381799)*x[0]+(-1.27062403778)*x[1]
-        arg[0,3,0,1]=(-1.47789532259)*x[0]+(-0.279583524936)*x[1]
-        arg[0,3,1,0]=(1.40729771357)*x[0]+(0.0971284144528)*x[1]
-        arg[0,3,1,1]=(-0.459167955911)*x[0]+(-1.29033281524)*x[1]
-        arg[0,3,2,0]=(-1.63189436824)*x[0]+(0.75729808422)*x[1]
-        arg[0,3,2,1]=(0.522479828718)*x[0]+(-0.0231299515383)*x[1]
-        arg[0,4,0,0]=(0.241891446615)*x[0]+(0.803327107651)*x[1]
-        arg[0,4,0,1]=(0.273613502836)*x[0]+(-0.0115180464171)*x[1]
-        arg[0,4,1,0]=(1.96219818696)*x[0]+(-0.349137094743)*x[1]
-        arg[0,4,1,1]=(0.365690821719)*x[0]+(-1.6943347181)*x[1]
-        arg[0,4,2,0]=(-0.283970779872)*x[0]+(-0.258537179804)*x[1]
-        arg[0,4,2,1]=(-0.973333430598)*x[0]+(1.48706276212)*x[1]
-        arg[1,0,0,0]=(1.18757466971)*x[0]+(0.838804656357)*x[1]
-        arg[1,0,0,1]=(0.840859904702)*x[0]+(1.09955195682)*x[1]
-        arg[1,0,1,0]=(1.46190513227)*x[0]+(-0.596959830422)*x[1]
-        arg[1,0,1,1]=(0.718689296745)*x[0]+(-0.628074620222)*x[1]
-        arg[1,0,2,0]=(0.440761293041)*x[0]+(0.115800854194)*x[1]
-        arg[1,0,2,1]=(1.34891146904)*x[0]+(0.813690260652)*x[1]
-        arg[1,1,0,0]=(0.183071638098)*x[0]+(-1.37996210755)*x[1]
-        arg[1,1,0,1]=(0.258142115988)*x[0]+(-0.757709381529)*x[1]
-        arg[1,1,1,0]=(1.72392829309)*x[0]+(0.444995102781)*x[1]
-        arg[1,1,1,1]=(-0.380898209988)*x[0]+(-0.0950246860347)*x[1]
-        arg[1,1,2,0]=(0.203007226016)*x[0]+(1.09786001832)*x[1]
-        arg[1,1,2,1]=(-0.502500865341)*x[0]+(-0.629980527995)*x[1]
-        arg[1,2,0,0]=(0.482549518436)*x[0]+(0.565840824146)*x[1]
-        arg[1,2,0,1]=(0.355818565068)*x[0]+(-0.78273295574)*x[1]
-        arg[1,2,1,0]=(1.79204033071)*x[0]+(-0.698040851585)*x[1]
-        arg[1,2,1,1]=(-0.534827741044)*x[0]+(0.00943131627498)*x[1]
-        arg[1,2,2,0]=(-1.00663524444)*x[0]+(0.0207854553456)*x[1]
-        arg[1,2,2,1]=(-0.338048040159)*x[0]+(-0.380607406217)*x[1]
-        arg[1,3,0,0]=(0.586310549044)*x[0]+(0.276326798805)*x[1]
-        arg[1,3,0,1]=(-0.260482580702)*x[0]+(-0.349279395321)*x[1]
-        arg[1,3,1,0]=(-0.196533829895)*x[0]+(0.614805272738)*x[1]
-        arg[1,3,1,1]=(-0.363176483895)*x[0]+(-0.925817017731)*x[1]
-        arg[1,3,2,0]=(-1.24182075421)*x[0]+(0.215966446013)*x[1]
-        arg[1,3,2,1]=(1.07546652642)*x[0]+(0.383803991974)*x[1]
-        arg[1,4,0,0]=(0.199312303525)*x[0]+(-0.314520883859)*x[1]
-        arg[1,4,0,1]=(-1.56890826152)*x[0]+(-0.133086662241)*x[1]
-        arg[1,4,1,0]=(1.1307241936)*x[0]+(-1.32905744984)*x[1]
-        arg[1,4,1,1]=(-0.385991455298)*x[0]+(0.292913024507)*x[1]
-        arg[1,4,2,0]=(1.14561678056)*x[0]+(-0.662696162276)*x[1]
-        arg[1,4,2,1]=(-1.49533948954)*x[0]+(1.43396138744)*x[1]
-        arg[2,0,0,0]=(-0.63160396493)*x[0]+(0.813120998776)*x[1]
-        arg[2,0,0,1]=(0.65598998434)*x[0]+(-1.02445537553)*x[1]
-        arg[2,0,1,0]=(-1.13473104075)*x[0]+(0.057331183449)*x[1]
-        arg[2,0,1,1]=(-0.154892482107)*x[0]+(0.481969957579)*x[1]
-        arg[2,0,2,0]=(0.521916671496)*x[0]+(0.546676943059)*x[1]
-        arg[2,0,2,1]=(-1.68919379028)*x[0]+(1.08292038981)*x[1]
-        arg[2,1,0,0]=(-0.643846595888)*x[0]+(0.528306097755)*x[1]
-        arg[2,1,0,1]=(1.3745090497)*x[0]+(-0.0801648509184)*x[1]
-        arg[2,1,1,0]=(0.129096817054)*x[0]+(0.90750370855)*x[1]
-        arg[2,1,1,1]=(0.539309513305)*x[0]+(1.34949470961)*x[1]
-        arg[2,1,2,0]=(1.4189703896)*x[0]+(-1.75011201893)*x[1]
-        arg[2,1,2,1]=(-1.09325548386)*x[0]+(0.148279301716)*x[1]
-        arg[2,2,0,0]=(-1.25785133743)*x[0]+(0.275071306594)*x[1]
-        arg[2,2,0,1]=(-0.550152068761)*x[0]+(-1.20422484275)*x[1]
-        arg[2,2,1,0]=(-0.102062863668)*x[0]+(-1.34431887541)*x[1]
-        arg[2,2,1,1]=(0.103354724169)*x[0]+(-0.941952180446)*x[1]
-        arg[2,2,2,0]=(1.2090339604)*x[0]+(-0.330357976796)*x[1]
-        arg[2,2,2,1]=(0.203162449188)*x[0]+(-1.03640702014)*x[1]
-        arg[2,3,0,0]=(-0.324576353514)*x[0]+(0.582614539267)*x[1]
-        arg[2,3,0,1]=(-0.213823136215)*x[0]+(-0.473199105214)*x[1]
-        arg[2,3,1,0]=(0.395144702599)*x[0]+(0.0358194467152)*x[1]
-        arg[2,3,1,1]=(1.32860563396)*x[0]+(-0.577308310732)*x[1]
-        arg[2,3,2,0]=(0.994205029432)*x[0]+(1.13433517636)*x[1]
-        arg[2,3,2,1]=(-0.488499286742)*x[0]+(0.224253820738)*x[1]
-        arg[2,4,0,0]=(1.48035663008)*x[0]+(-1.09697986914)*x[1]
-        arg[2,4,0,1]=(-1.09991915151)*x[0]+(-0.557951199985)*x[1]
-        arg[2,4,1,0]=(-1.23862699804)*x[0]+(-0.230602187713)*x[1]
-        arg[2,4,1,1]=(-0.922609370448)*x[0]+(1.76673953413)*x[1]
-        arg[2,4,2,0]=(0.731769419709)*x[0]+(-1.1094516608)*x[1]
-        arg[2,4,2,1]=(-0.145672504805)*x[0]+(0.168194421355)*x[1]
-        arg[3,0,0,0]=(1.02559707602)*x[0]+(0.260431368523)*x[1]
-        arg[3,0,0,1]=(0.111899568824)*x[0]+(-0.90725475423)*x[1]
-        arg[3,0,1,0]=(-0.226547745683)*x[0]+(-0.232830393372)*x[1]
-        arg[3,0,1,1]=(0.347004318471)*x[0]+(-0.196130970001)*x[1]
-        arg[3,0,2,0]=(-1.72155871442)*x[0]+(-1.28372407452)*x[1]
-        arg[3,0,2,1]=(1.43817914693)*x[0]+(-0.354093253684)*x[1]
-        arg[3,1,0,0]=(-0.293939245102)*x[0]+(0.0255562139103)*x[1]
-        arg[3,1,0,1]=(0.139306213018)*x[0]+(0.595062226642)*x[1]
-        arg[3,1,1,0]=(-0.670339920672)*x[0]+(0.387520583192)*x[1]
-        arg[3,1,1,1]=(-0.0323325470954)*x[0]+(-0.681162999279)*x[1]
-        arg[3,1,2,0]=(0.235275048739)*x[0]+(0.144725473773)*x[1]
-        arg[3,1,2,1]=(0.132211795214)*x[0]+(0.262780216845)*x[1]
-        arg[3,2,0,0]=(0.590514326163)*x[0]+(-0.84273677918)*x[1]
-        arg[3,2,0,1]=(-0.925181556185)*x[0]+(-0.300244447001)*x[1]
-        arg[3,2,1,0]=(-0.0509700795112)*x[0]+(-1.31919389616)*x[1]
-        arg[3,2,1,1]=(1.50577291846)*x[0]+(-0.219284607769)*x[1]
-        arg[3,2,2,0]=(-0.0460616673346)*x[0]+(-0.690312685466)*x[1]
-        arg[3,2,2,1]=(-0.673765477936)*x[0]+(-0.0965860475641)*x[1]
-        arg[3,3,0,0]=(-0.6577594174)*x[0]+(0.171886277016)*x[1]
-        arg[3,3,0,1]=(-1.08810434718)*x[0]+(0.333153250183)*x[1]
-        arg[3,3,1,0]=(0.150968371983)*x[0]+(0.290859317391)*x[1]
-        arg[3,3,1,1]=(1.62096265131)*x[0]+(-1.10309602741)*x[1]
-        arg[3,3,2,0]=(-0.932063639972)*x[0]+(-0.897131561126)*x[1]
-        arg[3,3,2,1]=(-0.819110834345)*x[0]+(1.59159109562)*x[1]
-        arg[3,4,0,0]=(0.272662931155)*x[0]+(0.69026285756)*x[1]
-        arg[3,4,0,1]=(-0.600556370757)*x[0]+(-0.0853533546302)*x[1]
-        arg[3,4,1,0]=(1.18544735281)*x[0]+(0.217751189034)*x[1]
-        arg[3,4,1,1]=(-0.594609531358)*x[0]+(0.882158349788)*x[1]
-        arg[3,4,2,0]=(1.18876765552)*x[0]+(-0.411481586979)*x[1]
-        arg[3,4,2,1]=(-1.093067792)*x[0]+(-0.266744260768)*x[1]
-        ref[0,0,0,0]=(-0.754311658086)*x_ref[0]+(0.235157034342)*x_ref[1]
-        ref[0,0,0,1]=(-1.33786315024)*x_ref[0]+(0.243349279742)*x_ref[1]
-        ref[0,0,1,0]=(1.48657750088)*x_ref[0]+(1.09853108305)*x_ref[1]
-        ref[0,0,1,1]=(1.4501362266)*x_ref[0]+(0.824811567155)*x_ref[1]
-        ref[0,0,2,0]=(1.12567566082)*x_ref[0]+(0.663525681174)*x_ref[1]
-        ref[0,0,2,1]=(1.48991565019)*x_ref[0]+(-0.680795365011)*x_ref[1]
-        ref[0,1,0,0]=(0.268571449528)*x_ref[0]+(0.818595834672)*x_ref[1]
-        ref[0,1,0,1]=(-1.55490945555)*x_ref[0]+(0.783595197888)*x_ref[1]
-        ref[0,1,1,0]=(0.913201382585)*x_ref[0]+(0.855491379376)*x_ref[1]
-        ref[0,1,1,1]=(-0.179192075116)*x_ref[0]+(-0.690415079523)*x_ref[1]
-        ref[0,1,2,0]=(-0.0393574502912)*x_ref[0]+(-0.690157650634)*x_ref[1]
-        ref[0,1,2,1]=(0.784216863217)*x_ref[0]+(0.498735486159)*x_ref[1]
-        ref[0,2,0,0]=(0.137939554165)*x_ref[0]+(-1.33961519113)*x_ref[1]
-        ref[0,2,0,1]=(-1.03897311736)*x_ref[0]+(-1.37797405312)*x_ref[1]
-        ref[0,2,1,0]=(0.199812003756)*x_ref[0]+(-0.0388499674037)*x_ref[1]
-        ref[0,2,1,1]=(1.15530534202)*x_ref[0]+(-1.28280869078)*x_ref[1]
-        ref[0,2,2,0]=(0.836447791155)*x_ref[0]+(1.2627066026)*x_ref[1]
-        ref[0,2,2,1]=(-0.584608492688)*x_ref[0]+(-1.55305974305)*x_ref[1]
-        ref[0,3,0,0]=(-0.661952381799)*x_ref[0]+(-1.27062403778)*x_ref[1]
-        ref[0,3,0,1]=(-1.47789532259)*x_ref[0]+(-0.279583524936)*x_ref[1]
-        ref[0,3,1,0]=(1.40729771357)*x_ref[0]+(0.0971284144528)*x_ref[1]
-        ref[0,3,1,1]=(-0.459167955911)*x_ref[0]+(-1.29033281524)*x_ref[1]
-        ref[0,3,2,0]=(-1.63189436824)*x_ref[0]+(0.75729808422)*x_ref[1]
-        ref[0,3,2,1]=(0.522479828718)*x_ref[0]+(-0.0231299515383)*x_ref[1]
-        ref[0,4,0,0]=(0.241891446615)*x_ref[0]+(0.803327107651)*x_ref[1]
-        ref[0,4,0,1]=(0.273613502836)*x_ref[0]+(-0.0115180464171)*x_ref[1]
-        ref[0,4,1,0]=(1.96219818696)*x_ref[0]+(-0.349137094743)*x_ref[1]
-        ref[0,4,1,1]=(0.365690821719)*x_ref[0]+(-1.6943347181)*x_ref[1]
-        ref[0,4,2,0]=(-0.283970779872)*x_ref[0]+(-0.258537179804)*x_ref[1]
-        ref[0,4,2,1]=(-0.973333430598)*x_ref[0]+(1.48706276212)*x_ref[1]
-        ref[1,0,0,0]=(1.18757466971)*x_ref[0]+(0.838804656357)*x_ref[1]
-        ref[1,0,0,1]=(0.840859904702)*x_ref[0]+(1.09955195682)*x_ref[1]
-        ref[1,0,1,0]=(1.46190513227)*x_ref[0]+(-0.596959830422)*x_ref[1]
-        ref[1,0,1,1]=(0.718689296745)*x_ref[0]+(-0.628074620222)*x_ref[1]
-        ref[1,0,2,0]=(0.440761293041)*x_ref[0]+(0.115800854194)*x_ref[1]
-        ref[1,0,2,1]=(1.34891146904)*x_ref[0]+(0.813690260652)*x_ref[1]
-        ref[1,1,0,0]=(0.183071638098)*x_ref[0]+(-1.37996210755)*x_ref[1]
-        ref[1,1,0,1]=(0.258142115988)*x_ref[0]+(-0.757709381529)*x_ref[1]
-        ref[1,1,1,0]=(1.72392829309)*x_ref[0]+(0.444995102781)*x_ref[1]
-        ref[1,1,1,1]=(-0.380898209988)*x_ref[0]+(-0.0950246860347)*x_ref[1]
-        ref[1,1,2,0]=(0.203007226016)*x_ref[0]+(1.09786001832)*x_ref[1]
-        ref[1,1,2,1]=(-0.502500865341)*x_ref[0]+(-0.629980527995)*x_ref[1]
-        ref[1,2,0,0]=(0.482549518436)*x_ref[0]+(0.565840824146)*x_ref[1]
-        ref[1,2,0,1]=(0.355818565068)*x_ref[0]+(-0.78273295574)*x_ref[1]
-        ref[1,2,1,0]=(1.79204033071)*x_ref[0]+(-0.698040851585)*x_ref[1]
-        ref[1,2,1,1]=(-0.534827741044)*x_ref[0]+(0.00943131627498)*x_ref[1]
-        ref[1,2,2,0]=(-1.00663524444)*x_ref[0]+(0.0207854553456)*x_ref[1]
-        ref[1,2,2,1]=(-0.338048040159)*x_ref[0]+(-0.380607406217)*x_ref[1]
-        ref[1,3,0,0]=(0.586310549044)*x_ref[0]+(0.276326798805)*x_ref[1]
-        ref[1,3,0,1]=(-0.260482580702)*x_ref[0]+(-0.349279395321)*x_ref[1]
-        ref[1,3,1,0]=(-0.196533829895)*x_ref[0]+(0.614805272738)*x_ref[1]
-        ref[1,3,1,1]=(-0.363176483895)*x_ref[0]+(-0.925817017731)*x_ref[1]
-        ref[1,3,2,0]=(-1.24182075421)*x_ref[0]+(0.215966446013)*x_ref[1]
-        ref[1,3,2,1]=(1.07546652642)*x_ref[0]+(0.383803991974)*x_ref[1]
-        ref[1,4,0,0]=(0.199312303525)*x_ref[0]+(-0.314520883859)*x_ref[1]
-        ref[1,4,0,1]=(-1.56890826152)*x_ref[0]+(-0.133086662241)*x_ref[1]
-        ref[1,4,1,0]=(1.1307241936)*x_ref[0]+(-1.32905744984)*x_ref[1]
-        ref[1,4,1,1]=(-0.385991455298)*x_ref[0]+(0.292913024507)*x_ref[1]
-        ref[1,4,2,0]=(1.14561678056)*x_ref[0]+(-0.662696162276)*x_ref[1]
-        ref[1,4,2,1]=(-1.49533948954)*x_ref[0]+(1.43396138744)*x_ref[1]
-        ref[2,0,0,0]=(-0.63160396493)*x_ref[0]+(0.813120998776)*x_ref[1]
-        ref[2,0,0,1]=(0.65598998434)*x_ref[0]+(-1.02445537553)*x_ref[1]
-        ref[2,0,1,0]=(-1.13473104075)*x_ref[0]+(0.057331183449)*x_ref[1]
-        ref[2,0,1,1]=(-0.154892482107)*x_ref[0]+(0.481969957579)*x_ref[1]
-        ref[2,0,2,0]=(0.521916671496)*x_ref[0]+(0.546676943059)*x_ref[1]
-        ref[2,0,2,1]=(-1.68919379028)*x_ref[0]+(1.08292038981)*x_ref[1]
-        ref[2,1,0,0]=(-0.643846595888)*x_ref[0]+(0.528306097755)*x_ref[1]
-        ref[2,1,0,1]=(1.3745090497)*x_ref[0]+(-0.0801648509184)*x_ref[1]
-        ref[2,1,1,0]=(0.129096817054)*x_ref[0]+(0.90750370855)*x_ref[1]
-        ref[2,1,1,1]=(0.539309513305)*x_ref[0]+(1.34949470961)*x_ref[1]
-        ref[2,1,2,0]=(1.4189703896)*x_ref[0]+(-1.75011201893)*x_ref[1]
-        ref[2,1,2,1]=(-1.09325548386)*x_ref[0]+(0.148279301716)*x_ref[1]
-        ref[2,2,0,0]=(-1.25785133743)*x_ref[0]+(0.275071306594)*x_ref[1]
-        ref[2,2,0,1]=(-0.550152068761)*x_ref[0]+(-1.20422484275)*x_ref[1]
-        ref[2,2,1,0]=(-0.102062863668)*x_ref[0]+(-1.34431887541)*x_ref[1]
-        ref[2,2,1,1]=(0.103354724169)*x_ref[0]+(-0.941952180446)*x_ref[1]
-        ref[2,2,2,0]=(1.2090339604)*x_ref[0]+(-0.330357976796)*x_ref[1]
-        ref[2,2,2,1]=(0.203162449188)*x_ref[0]+(-1.03640702014)*x_ref[1]
-        ref[2,3,0,0]=(-0.324576353514)*x_ref[0]+(0.582614539267)*x_ref[1]
-        ref[2,3,0,1]=(-0.213823136215)*x_ref[0]+(-0.473199105214)*x_ref[1]
-        ref[2,3,1,0]=(0.395144702599)*x_ref[0]+(0.0358194467152)*x_ref[1]
-        ref[2,3,1,1]=(1.32860563396)*x_ref[0]+(-0.577308310732)*x_ref[1]
-        ref[2,3,2,0]=(0.994205029432)*x_ref[0]+(1.13433517636)*x_ref[1]
-        ref[2,3,2,1]=(-0.488499286742)*x_ref[0]+(0.224253820738)*x_ref[1]
-        ref[2,4,0,0]=(1.48035663008)*x_ref[0]+(-1.09697986914)*x_ref[1]
-        ref[2,4,0,1]=(-1.09991915151)*x_ref[0]+(-0.557951199985)*x_ref[1]
-        ref[2,4,1,0]=(-1.23862699804)*x_ref[0]+(-0.230602187713)*x_ref[1]
-        ref[2,4,1,1]=(-0.922609370448)*x_ref[0]+(1.76673953413)*x_ref[1]
-        ref[2,4,2,0]=(0.731769419709)*x_ref[0]+(-1.1094516608)*x_ref[1]
-        ref[2,4,2,1]=(-0.145672504805)*x_ref[0]+(0.168194421355)*x_ref[1]
-        ref[3,0,0,0]=(1.02559707602)*x_ref[0]+(0.260431368523)*x_ref[1]
-        ref[3,0,0,1]=(0.111899568824)*x_ref[0]+(-0.90725475423)*x_ref[1]
-        ref[3,0,1,0]=(-0.226547745683)*x_ref[0]+(-0.232830393372)*x_ref[1]
-        ref[3,0,1,1]=(0.347004318471)*x_ref[0]+(-0.196130970001)*x_ref[1]
-        ref[3,0,2,0]=(-1.72155871442)*x_ref[0]+(-1.28372407452)*x_ref[1]
-        ref[3,0,2,1]=(1.43817914693)*x_ref[0]+(-0.354093253684)*x_ref[1]
-        ref[3,1,0,0]=(-0.293939245102)*x_ref[0]+(0.0255562139103)*x_ref[1]
-        ref[3,1,0,1]=(0.139306213018)*x_ref[0]+(0.595062226642)*x_ref[1]
-        ref[3,1,1,0]=(-0.670339920672)*x_ref[0]+(0.387520583192)*x_ref[1]
-        ref[3,1,1,1]=(-0.0323325470954)*x_ref[0]+(-0.681162999279)*x_ref[1]
-        ref[3,1,2,0]=(0.235275048739)*x_ref[0]+(0.144725473773)*x_ref[1]
-        ref[3,1,2,1]=(0.132211795214)*x_ref[0]+(0.262780216845)*x_ref[1]
-        ref[3,2,0,0]=(0.590514326163)*x_ref[0]+(-0.84273677918)*x_ref[1]
-        ref[3,2,0,1]=(-0.925181556185)*x_ref[0]+(-0.300244447001)*x_ref[1]
-        ref[3,2,1,0]=(-0.0509700795112)*x_ref[0]+(-1.31919389616)*x_ref[1]
-        ref[3,2,1,1]=(1.50577291846)*x_ref[0]+(-0.219284607769)*x_ref[1]
-        ref[3,2,2,0]=(-0.0460616673346)*x_ref[0]+(-0.690312685466)*x_ref[1]
-        ref[3,2,2,1]=(-0.673765477936)*x_ref[0]+(-0.0965860475641)*x_ref[1]
-        ref[3,3,0,0]=(-0.6577594174)*x_ref[0]+(0.171886277016)*x_ref[1]
-        ref[3,3,0,1]=(-1.08810434718)*x_ref[0]+(0.333153250183)*x_ref[1]
-        ref[3,3,1,0]=(0.150968371983)*x_ref[0]+(0.290859317391)*x_ref[1]
-        ref[3,3,1,1]=(1.62096265131)*x_ref[0]+(-1.10309602741)*x_ref[1]
-        ref[3,3,2,0]=(-0.932063639972)*x_ref[0]+(-0.897131561126)*x_ref[1]
-        ref[3,3,2,1]=(-0.819110834345)*x_ref[0]+(1.59159109562)*x_ref[1]
-        ref[3,4,0,0]=(0.272662931155)*x_ref[0]+(0.69026285756)*x_ref[1]
-        ref[3,4,0,1]=(-0.600556370757)*x_ref[0]+(-0.0853533546302)*x_ref[1]
-        ref[3,4,1,0]=(1.18544735281)*x_ref[0]+(0.217751189034)*x_ref[1]
-        ref[3,4,1,1]=(-0.594609531358)*x_ref[0]+(0.882158349788)*x_ref[1]
-        ref[3,4,2,0]=(1.18876765552)*x_ref[0]+(-0.411481586979)*x_ref[1]
-        ref[3,4,2,1]=(-1.093067792)*x_ref[0]+(-0.266744260768)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.29218217256)*x[0]+(-0.382937892213)*x[1]+(0.14363896447)*x[2]
-        arg[0,0,0,1]=(1.39856942421)*x[0]+(0.302082267835)*x[1]+(-0.40870736584)*x[2]
-        arg[0,0,1,0]=(0.523846108043)*x[0]+(1.19961531204)*x[1]+(0.838881761349)*x[2]
-        arg[0,0,1,1]=(0.634542282764)*x[0]+(-0.475514686466)*x[1]+(-1.68745428486)*x[2]
-        arg[0,0,2,0]=(1.16379585731)*x[0]+(-0.928037595416)*x[1]+(0.998857178353)*x[2]
-        arg[0,0,2,1]=(-0.804515607022)*x[0]+(-0.915469493439)*x[1]+(-0.143888000623)*x[2]
-        arg[0,1,0,0]=(0.925843155486)*x[0]+(-0.168243418953)*x[1]+(-0.887839555187)*x[2]
-        arg[0,1,0,1]=(-0.913103105329)*x[0]+(1.38011681732)*x[1]+(-0.992478793291)*x[2]
-        arg[0,1,1,0]=(0.759685289903)*x[0]+(-0.579481939982)*x[1]+(0.577682929138)*x[2]
-        arg[0,1,1,1]=(0.813155548228)*x[0]+(-0.178317843217)*x[1]+(-0.0460113194526)*x[2]
-        arg[0,1,2,0]=(-0.195764860141)*x[0]+(1.44256979628)*x[1]+(0.283992441343)*x[2]
-        arg[0,1,2,1]=(-0.921229459072)*x[0]+(-1.19295761547)*x[1]+(0.215736801944)*x[2]
-        arg[0,2,0,0]=(-0.741726331752)*x[0]+(-0.225585937382)*x[1]+(1.12654556466)*x[2]
-        arg[0,2,0,1]=(-0.709656162421)*x[0]+(0.298862010425)*x[1]+(-0.502443284827)*x[2]
-        arg[0,2,1,0]=(-1.01166188669)*x[0]+(-1.43763408953)*x[1]+(-0.835160398488)*x[2]
-        arg[0,2,1,1]=(1.80968424545)*x[0]+(-0.802666103495)*x[1]+(0.290283606115)*x[2]
-        arg[0,2,2,0]=(0.346481981585)*x[0]+(-0.444176962215)*x[1]+(0.689127612227)*x[2]
-        arg[0,2,2,1]=(1.06925494095)*x[0]+(0.452854988449)*x[1]+(-1.19974690364)*x[2]
-        arg[0,3,0,0]=(-0.534896036328)*x[0]+(-0.312000770615)*x[1]+(-0.440033746693)*x[2]
-        arg[0,3,0,1]=(0.580351431838)*x[0]+(-0.36623848451)*x[1]+(-0.507837490037)*x[2]
-        arg[0,3,1,0]=(0.383180910522)*x[0]+(-0.0907152443563)*x[1]+(-0.200103743943)*x[2]
-        arg[0,3,1,1]=(0.0160194687513)*x[0]+(0.862509612939)*x[1]+(-1.14643594474)*x[2]
-        arg[0,3,2,0]=(-0.224390850199)*x[0]+(-0.176927715447)*x[1]+(0.213480525831)*x[2]
-        arg[0,3,2,1]=(-0.0508511448148)*x[0]+(-1.28943467389)*x[1]+(0.902285302487)*x[2]
-        arg[0,4,0,0]=(-0.633106625232)*x[0]+(-0.430651917485)*x[1]+(0.583149841952)*x[2]
-        arg[0,4,0,1]=(0.579035528956)*x[0]+(0.159439682519)*x[1]+(-0.0926277063021)*x[2]
-        arg[0,4,1,0]=(0.00484756366973)*x[0]+(0.0324822270755)*x[1]+(1.20052413378)*x[2]
-        arg[0,4,1,1]=(-0.337383994688)*x[0]+(0.902076367981)*x[1]+(-0.1956377395)*x[2]
-        arg[0,4,2,0]=(0.928434343456)*x[0]+(0.0376569884355)*x[1]+(-0.155274118568)*x[2]
-        arg[0,4,2,1]=(-0.541990213238)*x[0]+(-0.0165076697829)*x[1]+(-0.210319224859)*x[2]
-        arg[1,0,0,0]=(-1.67762025181)*x[0]+(1.61434755579)*x[1]+(0.357272049999)*x[2]
-        arg[1,0,0,1]=(-1.62532544549)*x[0]+(-0.271426231027)*x[1]+(0.338680991778)*x[2]
-        arg[1,0,1,0]=(1.73523408033)*x[0]+(1.11987092368)*x[1]+(0.126769364273)*x[2]
-        arg[1,0,1,1]=(-1.49220786558)*x[0]+(1.51915566092)*x[1]+(1.24788192157)*x[2]
-        arg[1,0,2,0]=(-0.687808766765)*x[0]+(-1.02318754737)*x[1]+(0.590653972416)*x[2]
-        arg[1,0,2,1]=(0.756067354802)*x[0]+(-0.66964706965)*x[1]+(-1.18986499158)*x[2]
-        arg[1,1,0,0]=(0.371345732177)*x[0]+(0.212739617115)*x[1]+(-1.13439047405)*x[2]
-        arg[1,1,0,1]=(0.525761804111)*x[0]+(0.144130399691)*x[1]+(0.715517587677)*x[2]
-        arg[1,1,1,0]=(-0.376160293215)*x[0]+(-0.469964935263)*x[1]+(0.413518194707)*x[2]
-        arg[1,1,1,1]=(-0.787748398144)*x[0]+(-0.810090402237)*x[1]+(-0.50127109256)*x[2]
-        arg[1,1,2,0]=(0.654555083692)*x[0]+(-0.142134700515)*x[1]+(-1.55891930521)*x[2]
-        arg[1,1,2,1]=(-0.423058885456)*x[0]+(-0.65930158641)*x[1]+(0.94440057744)*x[2]
-        arg[1,2,0,0]=(-0.924832007053)*x[0]+(1.0154890382)*x[1]+(0.11938079748)*x[2]
-        arg[1,2,0,1]=(0.134642686931)*x[0]+(-1.30908067998)*x[1]+(0.367206139074)*x[2]
-        arg[1,2,1,0]=(1.55524055201)*x[0]+(0.727208660637)*x[1]+(0.809810917377)*x[2]
-        arg[1,2,1,1]=(0.94813391462)*x[0]+(-1.49402524308)*x[1]+(0.367824542434)*x[2]
-        arg[1,2,2,0]=(-0.608295798731)*x[0]+(-0.142302252814)*x[1]+(-0.986529251308)*x[2]
-        arg[1,2,2,1]=(0.0259394619607)*x[0]+(-1.60728202467)*x[1]+(0.312534656619)*x[2]
-        arg[1,3,0,0]=(-1.34063373729)*x[0]+(-0.268499839329)*x[1]+(-0.335125886299)*x[2]
-        arg[1,3,0,1]=(1.53280698072)*x[0]+(1.24369684711)*x[1]+(0.766369156132)*x[2]
-        arg[1,3,1,0]=(0.902067176876)*x[0]+(0.791102994814)*x[1]+(-0.89266430493)*x[2]
-        arg[1,3,1,1]=(0.704997629232)*x[0]+(-0.551611360332)*x[1]+(1.39134537491)*x[2]
-        arg[1,3,2,0]=(-0.151690675211)*x[0]+(-1.01762975893)*x[1]+(-0.627493214284)*x[2]
-        arg[1,3,2,1]=(1.00936645922)*x[0]+(0.0322458997248)*x[1]+(1.45039938194)*x[2]
-        arg[1,4,0,0]=(-0.0916390388904)*x[0]+(-0.783111746469)*x[1]+(0.389725342225)*x[2]
-        arg[1,4,0,1]=(1.18859328243)*x[0]+(0.871689661558)*x[1]+(-0.775464713448)*x[2]
-        arg[1,4,1,0]=(0.913118342488)*x[0]+(1.53285648884)*x[1]+(0.0947365101243)*x[2]
-        arg[1,4,1,1]=(-1.00735841224)*x[0]+(-1.12544193607)*x[1]+(0.267347229372)*x[2]
-        arg[1,4,2,0]=(0.285943438284)*x[0]+(-1.0889389244)*x[1]+(-1.03054842327)*x[2]
-        arg[1,4,2,1]=(-1.5768940139)*x[0]+(0.91237754587)*x[1]+(1.30220394199)*x[2]
-        arg[2,0,0,0]=(-0.0634935883277)*x[0]+(0.157304131712)*x[1]+(-1.2995042074)*x[2]
-        arg[2,0,0,1]=(-0.802705266871)*x[0]+(0.238233162774)*x[1]+(1.29463414013)*x[2]
-        arg[2,0,1,0]=(-0.925468462671)*x[0]+(0.870960795966)*x[1]+(0.156522765713)*x[2]
-        arg[2,0,1,1]=(-0.546666833309)*x[0]+(-1.14649607995)*x[1]+(-1.53906505048)*x[2]
-        arg[2,0,2,0]=(0.464952910857)*x[0]+(0.408605786027)*x[1]+(-0.886974881114)*x[2]
-        arg[2,0,2,1]=(0.491723247948)*x[0]+(0.194616420077)*x[1]+(0.409049782749)*x[2]
-        arg[2,1,0,0]=(-1.19836883114)*x[0]+(1.0622722337)*x[1]+(-0.109193867727)*x[2]
-        arg[2,1,0,1]=(1.01973600383)*x[0]+(-0.154482220539)*x[1]+(0.378696371956)*x[2]
-        arg[2,1,1,0]=(-0.0812015296246)*x[0]+(-1.10252794568)*x[1]+(-0.00585426581857)*x[2]
-        arg[2,1,1,1]=(0.536042665272)*x[0]+(0.685507117255)*x[1]+(-0.179652683139)*x[2]
-        arg[2,1,2,0]=(-0.36750467811)*x[0]+(-1.23674550869)*x[1]+(-0.762905702801)*x[2]
-        arg[2,1,2,1]=(0.329665965651)*x[0]+(0.101195810737)*x[1]+(-0.610015052375)*x[2]
-        arg[2,2,0,0]=(-0.81644635185)*x[0]+(-0.604578476306)*x[1]+(0.0440925706991)*x[2]
-        arg[2,2,0,1]=(-0.958241437971)*x[0]+(0.38563498206)*x[1]+(0.913406762318)*x[2]
-        arg[2,2,1,0]=(1.22027492224)*x[0]+(-1.00726209939)*x[1]+(-1.05083068303)*x[2]
-        arg[2,2,1,1]=(-1.47561192645)*x[0]+(-0.903549355608)*x[1]+(0.236771324671)*x[2]
-        arg[2,2,2,0]=(0.284995864449)*x[0]+(-0.175760829921)*x[1]+(-0.720607220001)*x[2]
-        arg[2,2,2,1]=(-0.535894515963)*x[0]+(-0.821302957162)*x[1]+(-1.75141540241)*x[2]
-        arg[2,3,0,0]=(-0.333082106674)*x[0]+(0.579471826412)*x[1]+(0.561184138108)*x[2]
-        arg[2,3,0,1]=(1.34803519557)*x[0]+(-0.441299088849)*x[1]+(-1.04945951616)*x[2]
-        arg[2,3,1,0]=(0.299011096602)*x[0]+(1.32726458235)*x[1]+(-0.196298687359)*x[2]
-        arg[2,3,1,1]=(1.48698834204)*x[0]+(0.527221496971)*x[1]+(0.0819813519422)*x[2]
-        arg[2,3,2,0]=(0.681680955153)*x[0]+(0.503653972357)*x[1]+(0.434669347891)*x[2]
-        arg[2,3,2,1]=(-0.152586789311)*x[0]+(-0.765242635579)*x[1]+(0.712663994387)*x[2]
-        arg[2,4,0,0]=(0.630152300463)*x[0]+(1.12366733588)*x[1]+(-0.662966700638)*x[2]
-        arg[2,4,0,1]=(1.02796709755)*x[0]+(-0.24093881584)*x[1]+(1.79445417019)*x[2]
-        arg[2,4,1,0]=(-0.954575760758)*x[0]+(0.16331782608)*x[1]+(1.38309921277)*x[2]
-        arg[2,4,1,1]=(0.536092514281)*x[0]+(-0.276364952673)*x[1]+(0.779619701528)*x[2]
-        arg[2,4,2,0]=(0.267270444141)*x[0]+(-0.810746424331)*x[1]+(-0.733877853264)*x[2]
-        arg[2,4,2,1]=(-0.0641688847923)*x[0]+(-0.386279280667)*x[1]+(0.0637571595255)*x[2]
-        arg[3,0,0,0]=(0.469903180687)*x[0]+(-0.793812397342)*x[1]+(1.60841921779)*x[2]
-        arg[3,0,0,1]=(0.720057600102)*x[0]+(0.502582253261)*x[1]+(0.460147791003)*x[2]
-        arg[3,0,1,0]=(0.0327862564137)*x[0]+(-1.142962965)*x[1]+(0.114799131894)*x[2]
-        arg[3,0,1,1]=(-0.997412656978)*x[0]+(-0.678175468576)*x[1]+(-0.152663147682)*x[2]
-        arg[3,0,2,0]=(0.810424599078)*x[0]+(0.75522727786)*x[1]+(-0.205880941501)*x[2]
-        arg[3,0,2,1]=(0.353601949476)*x[0]+(0.0963200813379)*x[1]+(0.0578829287146)*x[2]
-        arg[3,1,0,0]=(0.346590730062)*x[0]+(1.07953790092)*x[1]+(0.647586851217)*x[2]
-        arg[3,1,0,1]=(0.889879195334)*x[0]+(-0.352788186249)*x[1]+(0.434900135803)*x[2]
-        arg[3,1,1,0]=(-0.721742734959)*x[0]+(0.166066672134)*x[1]+(-0.489266924809)*x[2]
-        arg[3,1,1,1]=(-0.810487755181)*x[0]+(0.0354916979253)*x[1]+(0.0735520654395)*x[2]
-        arg[3,1,2,0]=(1.02414338939)*x[0]+(-0.851076284556)*x[1]+(-0.232174494405)*x[2]
-        arg[3,1,2,1]=(-0.327246566026)*x[0]+(-0.0499396023605)*x[1]+(0.611585402379)*x[2]
-        arg[3,2,0,0]=(-0.365757628557)*x[0]+(0.868697342115)*x[1]+(-1.102545972)*x[2]
-        arg[3,2,0,1]=(0.628592129227)*x[0]+(1.25545515311)*x[1]+(-1.0577476264)*x[2]
-        arg[3,2,1,0]=(0.160995978044)*x[0]+(-0.947389499556)*x[1]+(-0.870476160656)*x[2]
-        arg[3,2,1,1]=(0.910787139938)*x[0]+(-0.0681493345139)*x[1]+(-0.561910153781)*x[2]
-        arg[3,2,2,0]=(0.0761644634428)*x[0]+(-0.700940967343)*x[1]+(1.19407210904)*x[2]
-        arg[3,2,2,1]=(1.75717437065)*x[0]+(-0.144457317494)*x[1]+(-0.523233453079)*x[2]
-        arg[3,3,0,0]=(0.448782872606)*x[0]+(0.650464256547)*x[1]+(1.19476547456)*x[2]
-        arg[3,3,0,1]=(0.118586027201)*x[0]+(0.449971816918)*x[1]+(-0.510812733389)*x[2]
-        arg[3,3,1,0]=(-0.330032265081)*x[0]+(-0.13657534891)*x[1]+(0.456365289556)*x[2]
-        arg[3,3,1,1]=(0.697584212635)*x[0]+(0.897604241724)*x[1]+(1.31517116663)*x[2]
-        arg[3,3,2,0]=(-0.940538707365)*x[0]+(-0.334862221665)*x[1]+(0.0969742096754)*x[2]
-        arg[3,3,2,1]=(-0.985788813516)*x[0]+(0.348389725548)*x[1]+(-0.260816590361)*x[2]
-        arg[3,4,0,0]=(0.754692421417)*x[0]+(0.775985781769)*x[1]+(-0.0866159222457)*x[2]
-        arg[3,4,0,1]=(-1.17670502429)*x[0]+(1.12268279393)*x[1]+(-1.1279822095)*x[2]
-        arg[3,4,1,0]=(-1.48674370666)*x[0]+(1.26685445713)*x[1]+(-0.0522828809306)*x[2]
-        arg[3,4,1,1]=(0.401760689843)*x[0]+(-1.35707797971)*x[1]+(-0.0580654273828)*x[2]
-        arg[3,4,2,0]=(-1.40697830852)*x[0]+(0.933923369958)*x[1]+(0.230152169159)*x[2]
-        arg[3,4,2,1]=(-1.21242130555)*x[0]+(0.858316339663)*x[1]+(-0.839747078526)*x[2]
-        ref[0,0,0,0]=(-1.29218217256)*x_ref[0]+(-0.382937892213)*x_ref[1]+(0.14363896447)*x_ref[2]
-        ref[0,0,0,1]=(1.39856942421)*x_ref[0]+(0.302082267835)*x_ref[1]+(-0.40870736584)*x_ref[2]
-        ref[0,0,1,0]=(0.523846108043)*x_ref[0]+(1.19961531204)*x_ref[1]+(0.838881761349)*x_ref[2]
-        ref[0,0,1,1]=(0.634542282764)*x_ref[0]+(-0.475514686466)*x_ref[1]+(-1.68745428486)*x_ref[2]
-        ref[0,0,2,0]=(1.16379585731)*x_ref[0]+(-0.928037595416)*x_ref[1]+(0.998857178353)*x_ref[2]
-        ref[0,0,2,1]=(-0.804515607022)*x_ref[0]+(-0.915469493439)*x_ref[1]+(-0.143888000623)*x_ref[2]
-        ref[0,1,0,0]=(0.925843155486)*x_ref[0]+(-0.168243418953)*x_ref[1]+(-0.887839555187)*x_ref[2]
-        ref[0,1,0,1]=(-0.913103105329)*x_ref[0]+(1.38011681732)*x_ref[1]+(-0.992478793291)*x_ref[2]
-        ref[0,1,1,0]=(0.759685289903)*x_ref[0]+(-0.579481939982)*x_ref[1]+(0.577682929138)*x_ref[2]
-        ref[0,1,1,1]=(0.813155548228)*x_ref[0]+(-0.178317843217)*x_ref[1]+(-0.0460113194526)*x_ref[2]
-        ref[0,1,2,0]=(-0.195764860141)*x_ref[0]+(1.44256979628)*x_ref[1]+(0.283992441343)*x_ref[2]
-        ref[0,1,2,1]=(-0.921229459072)*x_ref[0]+(-1.19295761547)*x_ref[1]+(0.215736801944)*x_ref[2]
-        ref[0,2,0,0]=(-0.741726331752)*x_ref[0]+(-0.225585937382)*x_ref[1]+(1.12654556466)*x_ref[2]
-        ref[0,2,0,1]=(-0.709656162421)*x_ref[0]+(0.298862010425)*x_ref[1]+(-0.502443284827)*x_ref[2]
-        ref[0,2,1,0]=(-1.01166188669)*x_ref[0]+(-1.43763408953)*x_ref[1]+(-0.835160398488)*x_ref[2]
-        ref[0,2,1,1]=(1.80968424545)*x_ref[0]+(-0.802666103495)*x_ref[1]+(0.290283606115)*x_ref[2]
-        ref[0,2,2,0]=(0.346481981585)*x_ref[0]+(-0.444176962215)*x_ref[1]+(0.689127612227)*x_ref[2]
-        ref[0,2,2,1]=(1.06925494095)*x_ref[0]+(0.452854988449)*x_ref[1]+(-1.19974690364)*x_ref[2]
-        ref[0,3,0,0]=(-0.534896036328)*x_ref[0]+(-0.312000770615)*x_ref[1]+(-0.440033746693)*x_ref[2]
-        ref[0,3,0,1]=(0.580351431838)*x_ref[0]+(-0.36623848451)*x_ref[1]+(-0.507837490037)*x_ref[2]
-        ref[0,3,1,0]=(0.383180910522)*x_ref[0]+(-0.0907152443563)*x_ref[1]+(-0.200103743943)*x_ref[2]
-        ref[0,3,1,1]=(0.0160194687513)*x_ref[0]+(0.862509612939)*x_ref[1]+(-1.14643594474)*x_ref[2]
-        ref[0,3,2,0]=(-0.224390850199)*x_ref[0]+(-0.176927715447)*x_ref[1]+(0.213480525831)*x_ref[2]
-        ref[0,3,2,1]=(-0.0508511448148)*x_ref[0]+(-1.28943467389)*x_ref[1]+(0.902285302487)*x_ref[2]
-        ref[0,4,0,0]=(-0.633106625232)*x_ref[0]+(-0.430651917485)*x_ref[1]+(0.583149841952)*x_ref[2]
-        ref[0,4,0,1]=(0.579035528956)*x_ref[0]+(0.159439682519)*x_ref[1]+(-0.0926277063021)*x_ref[2]
-        ref[0,4,1,0]=(0.00484756366973)*x_ref[0]+(0.0324822270755)*x_ref[1]+(1.20052413378)*x_ref[2]
-        ref[0,4,1,1]=(-0.337383994688)*x_ref[0]+(0.902076367981)*x_ref[1]+(-0.1956377395)*x_ref[2]
-        ref[0,4,2,0]=(0.928434343456)*x_ref[0]+(0.0376569884355)*x_ref[1]+(-0.155274118568)*x_ref[2]
-        ref[0,4,2,1]=(-0.541990213238)*x_ref[0]+(-0.0165076697829)*x_ref[1]+(-0.210319224859)*x_ref[2]
-        ref[1,0,0,0]=(-1.67762025181)*x_ref[0]+(1.61434755579)*x_ref[1]+(0.357272049999)*x_ref[2]
-        ref[1,0,0,1]=(-1.62532544549)*x_ref[0]+(-0.271426231027)*x_ref[1]+(0.338680991778)*x_ref[2]
-        ref[1,0,1,0]=(1.73523408033)*x_ref[0]+(1.11987092368)*x_ref[1]+(0.126769364273)*x_ref[2]
-        ref[1,0,1,1]=(-1.49220786558)*x_ref[0]+(1.51915566092)*x_ref[1]+(1.24788192157)*x_ref[2]
-        ref[1,0,2,0]=(-0.687808766765)*x_ref[0]+(-1.02318754737)*x_ref[1]+(0.590653972416)*x_ref[2]
-        ref[1,0,2,1]=(0.756067354802)*x_ref[0]+(-0.66964706965)*x_ref[1]+(-1.18986499158)*x_ref[2]
-        ref[1,1,0,0]=(0.371345732177)*x_ref[0]+(0.212739617115)*x_ref[1]+(-1.13439047405)*x_ref[2]
-        ref[1,1,0,1]=(0.525761804111)*x_ref[0]+(0.144130399691)*x_ref[1]+(0.715517587677)*x_ref[2]
-        ref[1,1,1,0]=(-0.376160293215)*x_ref[0]+(-0.469964935263)*x_ref[1]+(0.413518194707)*x_ref[2]
-        ref[1,1,1,1]=(-0.787748398144)*x_ref[0]+(-0.810090402237)*x_ref[1]+(-0.50127109256)*x_ref[2]
-        ref[1,1,2,0]=(0.654555083692)*x_ref[0]+(-0.142134700515)*x_ref[1]+(-1.55891930521)*x_ref[2]
-        ref[1,1,2,1]=(-0.423058885456)*x_ref[0]+(-0.65930158641)*x_ref[1]+(0.94440057744)*x_ref[2]
-        ref[1,2,0,0]=(-0.924832007053)*x_ref[0]+(1.0154890382)*x_ref[1]+(0.11938079748)*x_ref[2]
-        ref[1,2,0,1]=(0.134642686931)*x_ref[0]+(-1.30908067998)*x_ref[1]+(0.367206139074)*x_ref[2]
-        ref[1,2,1,0]=(1.55524055201)*x_ref[0]+(0.727208660637)*x_ref[1]+(0.809810917377)*x_ref[2]
-        ref[1,2,1,1]=(0.94813391462)*x_ref[0]+(-1.49402524308)*x_ref[1]+(0.367824542434)*x_ref[2]
-        ref[1,2,2,0]=(-0.608295798731)*x_ref[0]+(-0.142302252814)*x_ref[1]+(-0.986529251308)*x_ref[2]
-        ref[1,2,2,1]=(0.0259394619607)*x_ref[0]+(-1.60728202467)*x_ref[1]+(0.312534656619)*x_ref[2]
-        ref[1,3,0,0]=(-1.34063373729)*x_ref[0]+(-0.268499839329)*x_ref[1]+(-0.335125886299)*x_ref[2]
-        ref[1,3,0,1]=(1.53280698072)*x_ref[0]+(1.24369684711)*x_ref[1]+(0.766369156132)*x_ref[2]
-        ref[1,3,1,0]=(0.902067176876)*x_ref[0]+(0.791102994814)*x_ref[1]+(-0.89266430493)*x_ref[2]
-        ref[1,3,1,1]=(0.704997629232)*x_ref[0]+(-0.551611360332)*x_ref[1]+(1.39134537491)*x_ref[2]
-        ref[1,3,2,0]=(-0.151690675211)*x_ref[0]+(-1.01762975893)*x_ref[1]+(-0.627493214284)*x_ref[2]
-        ref[1,3,2,1]=(1.00936645922)*x_ref[0]+(0.0322458997248)*x_ref[1]+(1.45039938194)*x_ref[2]
-        ref[1,4,0,0]=(-0.0916390388904)*x_ref[0]+(-0.783111746469)*x_ref[1]+(0.389725342225)*x_ref[2]
-        ref[1,4,0,1]=(1.18859328243)*x_ref[0]+(0.871689661558)*x_ref[1]+(-0.775464713448)*x_ref[2]
-        ref[1,4,1,0]=(0.913118342488)*x_ref[0]+(1.53285648884)*x_ref[1]+(0.0947365101243)*x_ref[2]
-        ref[1,4,1,1]=(-1.00735841224)*x_ref[0]+(-1.12544193607)*x_ref[1]+(0.267347229372)*x_ref[2]
-        ref[1,4,2,0]=(0.285943438284)*x_ref[0]+(-1.0889389244)*x_ref[1]+(-1.03054842327)*x_ref[2]
-        ref[1,4,2,1]=(-1.5768940139)*x_ref[0]+(0.91237754587)*x_ref[1]+(1.30220394199)*x_ref[2]
-        ref[2,0,0,0]=(-0.0634935883277)*x_ref[0]+(0.157304131712)*x_ref[1]+(-1.2995042074)*x_ref[2]
-        ref[2,0,0,1]=(-0.802705266871)*x_ref[0]+(0.238233162774)*x_ref[1]+(1.29463414013)*x_ref[2]
-        ref[2,0,1,0]=(-0.925468462671)*x_ref[0]+(0.870960795966)*x_ref[1]+(0.156522765713)*x_ref[2]
-        ref[2,0,1,1]=(-0.546666833309)*x_ref[0]+(-1.14649607995)*x_ref[1]+(-1.53906505048)*x_ref[2]
-        ref[2,0,2,0]=(0.464952910857)*x_ref[0]+(0.408605786027)*x_ref[1]+(-0.886974881114)*x_ref[2]
-        ref[2,0,2,1]=(0.491723247948)*x_ref[0]+(0.194616420077)*x_ref[1]+(0.409049782749)*x_ref[2]
-        ref[2,1,0,0]=(-1.19836883114)*x_ref[0]+(1.0622722337)*x_ref[1]+(-0.109193867727)*x_ref[2]
-        ref[2,1,0,1]=(1.01973600383)*x_ref[0]+(-0.154482220539)*x_ref[1]+(0.378696371956)*x_ref[2]
-        ref[2,1,1,0]=(-0.0812015296246)*x_ref[0]+(-1.10252794568)*x_ref[1]+(-0.00585426581857)*x_ref[2]
-        ref[2,1,1,1]=(0.536042665272)*x_ref[0]+(0.685507117255)*x_ref[1]+(-0.179652683139)*x_ref[2]
-        ref[2,1,2,0]=(-0.36750467811)*x_ref[0]+(-1.23674550869)*x_ref[1]+(-0.762905702801)*x_ref[2]
-        ref[2,1,2,1]=(0.329665965651)*x_ref[0]+(0.101195810737)*x_ref[1]+(-0.610015052375)*x_ref[2]
-        ref[2,2,0,0]=(-0.81644635185)*x_ref[0]+(-0.604578476306)*x_ref[1]+(0.0440925706991)*x_ref[2]
-        ref[2,2,0,1]=(-0.958241437971)*x_ref[0]+(0.38563498206)*x_ref[1]+(0.913406762318)*x_ref[2]
-        ref[2,2,1,0]=(1.22027492224)*x_ref[0]+(-1.00726209939)*x_ref[1]+(-1.05083068303)*x_ref[2]
-        ref[2,2,1,1]=(-1.47561192645)*x_ref[0]+(-0.903549355608)*x_ref[1]+(0.236771324671)*x_ref[2]
-        ref[2,2,2,0]=(0.284995864449)*x_ref[0]+(-0.175760829921)*x_ref[1]+(-0.720607220001)*x_ref[2]
-        ref[2,2,2,1]=(-0.535894515963)*x_ref[0]+(-0.821302957162)*x_ref[1]+(-1.75141540241)*x_ref[2]
-        ref[2,3,0,0]=(-0.333082106674)*x_ref[0]+(0.579471826412)*x_ref[1]+(0.561184138108)*x_ref[2]
-        ref[2,3,0,1]=(1.34803519557)*x_ref[0]+(-0.441299088849)*x_ref[1]+(-1.04945951616)*x_ref[2]
-        ref[2,3,1,0]=(0.299011096602)*x_ref[0]+(1.32726458235)*x_ref[1]+(-0.196298687359)*x_ref[2]
-        ref[2,3,1,1]=(1.48698834204)*x_ref[0]+(0.527221496971)*x_ref[1]+(0.0819813519422)*x_ref[2]
-        ref[2,3,2,0]=(0.681680955153)*x_ref[0]+(0.503653972357)*x_ref[1]+(0.434669347891)*x_ref[2]
-        ref[2,3,2,1]=(-0.152586789311)*x_ref[0]+(-0.765242635579)*x_ref[1]+(0.712663994387)*x_ref[2]
-        ref[2,4,0,0]=(0.630152300463)*x_ref[0]+(1.12366733588)*x_ref[1]+(-0.662966700638)*x_ref[2]
-        ref[2,4,0,1]=(1.02796709755)*x_ref[0]+(-0.24093881584)*x_ref[1]+(1.79445417019)*x_ref[2]
-        ref[2,4,1,0]=(-0.954575760758)*x_ref[0]+(0.16331782608)*x_ref[1]+(1.38309921277)*x_ref[2]
-        ref[2,4,1,1]=(0.536092514281)*x_ref[0]+(-0.276364952673)*x_ref[1]+(0.779619701528)*x_ref[2]
-        ref[2,4,2,0]=(0.267270444141)*x_ref[0]+(-0.810746424331)*x_ref[1]+(-0.733877853264)*x_ref[2]
-        ref[2,4,2,1]=(-0.0641688847923)*x_ref[0]+(-0.386279280667)*x_ref[1]+(0.0637571595255)*x_ref[2]
-        ref[3,0,0,0]=(0.469903180687)*x_ref[0]+(-0.793812397342)*x_ref[1]+(1.60841921779)*x_ref[2]
-        ref[3,0,0,1]=(0.720057600102)*x_ref[0]+(0.502582253261)*x_ref[1]+(0.460147791003)*x_ref[2]
-        ref[3,0,1,0]=(0.0327862564137)*x_ref[0]+(-1.142962965)*x_ref[1]+(0.114799131894)*x_ref[2]
-        ref[3,0,1,1]=(-0.997412656978)*x_ref[0]+(-0.678175468576)*x_ref[1]+(-0.152663147682)*x_ref[2]
-        ref[3,0,2,0]=(0.810424599078)*x_ref[0]+(0.75522727786)*x_ref[1]+(-0.205880941501)*x_ref[2]
-        ref[3,0,2,1]=(0.353601949476)*x_ref[0]+(0.0963200813379)*x_ref[1]+(0.0578829287146)*x_ref[2]
-        ref[3,1,0,0]=(0.346590730062)*x_ref[0]+(1.07953790092)*x_ref[1]+(0.647586851217)*x_ref[2]
-        ref[3,1,0,1]=(0.889879195334)*x_ref[0]+(-0.352788186249)*x_ref[1]+(0.434900135803)*x_ref[2]
-        ref[3,1,1,0]=(-0.721742734959)*x_ref[0]+(0.166066672134)*x_ref[1]+(-0.489266924809)*x_ref[2]
-        ref[3,1,1,1]=(-0.810487755181)*x_ref[0]+(0.0354916979253)*x_ref[1]+(0.0735520654395)*x_ref[2]
-        ref[3,1,2,0]=(1.02414338939)*x_ref[0]+(-0.851076284556)*x_ref[1]+(-0.232174494405)*x_ref[2]
-        ref[3,1,2,1]=(-0.327246566026)*x_ref[0]+(-0.0499396023605)*x_ref[1]+(0.611585402379)*x_ref[2]
-        ref[3,2,0,0]=(-0.365757628557)*x_ref[0]+(0.868697342115)*x_ref[1]+(-1.102545972)*x_ref[2]
-        ref[3,2,0,1]=(0.628592129227)*x_ref[0]+(1.25545515311)*x_ref[1]+(-1.0577476264)*x_ref[2]
-        ref[3,2,1,0]=(0.160995978044)*x_ref[0]+(-0.947389499556)*x_ref[1]+(-0.870476160656)*x_ref[2]
-        ref[3,2,1,1]=(0.910787139938)*x_ref[0]+(-0.0681493345139)*x_ref[1]+(-0.561910153781)*x_ref[2]
-        ref[3,2,2,0]=(0.0761644634428)*x_ref[0]+(-0.700940967343)*x_ref[1]+(1.19407210904)*x_ref[2]
-        ref[3,2,2,1]=(1.75717437065)*x_ref[0]+(-0.144457317494)*x_ref[1]+(-0.523233453079)*x_ref[2]
-        ref[3,3,0,0]=(0.448782872606)*x_ref[0]+(0.650464256547)*x_ref[1]+(1.19476547456)*x_ref[2]
-        ref[3,3,0,1]=(0.118586027201)*x_ref[0]+(0.449971816918)*x_ref[1]+(-0.510812733389)*x_ref[2]
-        ref[3,3,1,0]=(-0.330032265081)*x_ref[0]+(-0.13657534891)*x_ref[1]+(0.456365289556)*x_ref[2]
-        ref[3,3,1,1]=(0.697584212635)*x_ref[0]+(0.897604241724)*x_ref[1]+(1.31517116663)*x_ref[2]
-        ref[3,3,2,0]=(-0.940538707365)*x_ref[0]+(-0.334862221665)*x_ref[1]+(0.0969742096754)*x_ref[2]
-        ref[3,3,2,1]=(-0.985788813516)*x_ref[0]+(0.348389725548)*x_ref[1]+(-0.260816590361)*x_ref[2]
-        ref[3,4,0,0]=(0.754692421417)*x_ref[0]+(0.775985781769)*x_ref[1]+(-0.0866159222457)*x_ref[2]
-        ref[3,4,0,1]=(-1.17670502429)*x_ref[0]+(1.12268279393)*x_ref[1]+(-1.1279822095)*x_ref[2]
-        ref[3,4,1,0]=(-1.48674370666)*x_ref[0]+(1.26685445713)*x_ref[1]+(-0.0522828809306)*x_ref[2]
-        ref[3,4,1,1]=(0.401760689843)*x_ref[0]+(-1.35707797971)*x_ref[1]+(-0.0580654273828)*x_ref[2]
-        ref[3,4,2,0]=(-1.40697830852)*x_ref[0]+(0.933923369958)*x_ref[1]+(0.230152169159)*x_ref[2]
-        ref[3,4,2,1]=(-1.21242130555)*x_ref[0]+(0.858316339663)*x_ref[1]+(-0.839747078526)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.100067148208)*x[0]+(-0.8375743725)*x[1]
-        ref=(-0.100067148208)*x_ref[0]+(-0.8375743725)*x_ref[1]
-      else:
-        arg=(-0.247343416726)*x[0]+(0.604193484164)*x[1]+(-0.219899438287)*x[2]
-        ref=(-0.247343416726)*x_ref[0]+(0.604193484164)*x_ref[1]+(-0.219899438287)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        arg[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-        ref[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        ref[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-      else:
-        arg[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        arg[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-        ref[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        ref[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.00153698933322)*x[0]+(0.392281645764)*x[1]
-        arg[0,1]=(-1.2794655544)*x[0]+(-0.373519639818)*x[1]
-        arg[0,2]=(0.30127033321)*x[0]+(-0.0996865853738)*x[1]
-        arg[0,3]=(1.23405799349)*x[0]+(0.498558200339)*x[1]
-        arg[0,4]=(0.85519350742)*x[0]+(-0.19188046135)*x[1]
-        arg[1,0]=(0.417367834962)*x[0]+(0.992318201639)*x[1]
-        arg[1,1]=(-0.646432128833)*x[0]+(-0.872750321582)*x[1]
-        arg[1,2]=(-0.806117185061)*x[0]+(-0.89396408325)*x[1]
-        arg[1,3]=(0.768017237627)*x[0]+(-1.2904111912)*x[1]
-        arg[1,4]=(-0.0159685523188)*x[0]+(0.401410193169)*x[1]
-        arg[2,0]=(-0.844501716181)*x[0]+(-0.123115343819)*x[1]
-        arg[2,1]=(1.08441909409)*x[0]+(0.152432282539)*x[1]
-        arg[2,2]=(-0.60551037413)*x[0]+(1.15692828826)*x[1]
-        arg[2,3]=(-1.21509168541)*x[0]+(1.03683236377)*x[1]
-        arg[2,4]=(1.16850730134)*x[0]+(0.162202615909)*x[1]
-        arg[3,0]=(0.727772166897)*x[0]+(-0.296815840935)*x[1]
-        arg[3,1]=(-0.0880577151489)*x[0]+(1.66427691426)*x[1]
-        arg[3,2]=(0.415144534458)*x[0]+(-0.555833723295)*x[1]
-        arg[3,3]=(1.09444635829)*x[0]+(-0.335209417536)*x[1]
-        arg[3,4]=(-1.05047769585)*x[0]+(0.684427039986)*x[1]
-        ref[0,0]=(0.00153698933322)*x_ref[0]+(0.392281645764)*x_ref[1]
-        ref[0,1]=(-1.2794655544)*x_ref[0]+(-0.373519639818)*x_ref[1]
-        ref[0,2]=(0.30127033321)*x_ref[0]+(-0.0996865853738)*x_ref[1]
-        ref[0,3]=(1.23405799349)*x_ref[0]+(0.498558200339)*x_ref[1]
-        ref[0,4]=(0.85519350742)*x_ref[0]+(-0.19188046135)*x_ref[1]
-        ref[1,0]=(0.417367834962)*x_ref[0]+(0.992318201639)*x_ref[1]
-        ref[1,1]=(-0.646432128833)*x_ref[0]+(-0.872750321582)*x_ref[1]
-        ref[1,2]=(-0.806117185061)*x_ref[0]+(-0.89396408325)*x_ref[1]
-        ref[1,3]=(0.768017237627)*x_ref[0]+(-1.2904111912)*x_ref[1]
-        ref[1,4]=(-0.0159685523188)*x_ref[0]+(0.401410193169)*x_ref[1]
-        ref[2,0]=(-0.844501716181)*x_ref[0]+(-0.123115343819)*x_ref[1]
-        ref[2,1]=(1.08441909409)*x_ref[0]+(0.152432282539)*x_ref[1]
-        ref[2,2]=(-0.60551037413)*x_ref[0]+(1.15692828826)*x_ref[1]
-        ref[2,3]=(-1.21509168541)*x_ref[0]+(1.03683236377)*x_ref[1]
-        ref[2,4]=(1.16850730134)*x_ref[0]+(0.162202615909)*x_ref[1]
-        ref[3,0]=(0.727772166897)*x_ref[0]+(-0.296815840935)*x_ref[1]
-        ref[3,1]=(-0.0880577151489)*x_ref[0]+(1.66427691426)*x_ref[1]
-        ref[3,2]=(0.415144534458)*x_ref[0]+(-0.555833723295)*x_ref[1]
-        ref[3,3]=(1.09444635829)*x_ref[0]+(-0.335209417536)*x_ref[1]
-        ref[3,4]=(-1.05047769585)*x_ref[0]+(0.684427039986)*x_ref[1]
-      else:
-        arg[0,0]=(-0.611607640773)*x[0]+(0.584485971628)*x[1]+(0.0090316337643)*x[2]
-        arg[0,1]=(0.905278285857)*x[0]+(0.332523151242)*x[1]+(0.9909841807)*x[2]
-        arg[0,2]=(-1.06629333132)*x[0]+(-0.38478180064)*x[1]+(-0.63309211256)*x[2]
-        arg[0,3]=(0.122436386344)*x[0]+(-0.218752671204)*x[1]+(-0.746695172216)*x[2]
-        arg[0,4]=(1.03152124874)*x[0]+(-1.11327271563)*x[1]+(-0.257591112135)*x[2]
-        arg[1,0]=(0.969019600299)*x[0]+(-0.320279309689)*x[1]+(0.327767746545)*x[2]
-        arg[1,1]=(0.291023069052)*x[0]+(0.78112901064)*x[1]+(0.879257239042)*x[2]
-        arg[1,2]=(-0.131262891536)*x[0]+(-0.0109690229153)*x[1]+(-0.171900332406)*x[2]
-        arg[1,3]=(-1.32272684486)*x[0]+(-0.256869536085)*x[1]+(0.0308524567462)*x[2]
-        arg[1,4]=(1.30707061279)*x[0]+(0.972866282634)*x[1]+(-0.474948537882)*x[2]
-        arg[2,0]=(0.169034210421)*x[0]+(-1.08714896226)*x[1]+(-0.636838450708)*x[2]
-        arg[2,1]=(-0.470752780773)*x[0]+(-0.695286088059)*x[1]+(-1.19197058712)*x[2]
-        arg[2,2]=(0.701403721228)*x[0]+(0.551002482436)*x[1]+(-0.295853851234)*x[2]
-        arg[2,3]=(-0.796431361745)*x[0]+(0.0581884766856)*x[1]+(-1.13668563089)*x[2]
-        arg[2,4]=(-0.733185798017)*x[0]+(0.178900103735)*x[1]+(-0.845671526781)*x[2]
-        arg[3,0]=(-1.47064927107)*x[0]+(1.33393324965)*x[1]+(-0.767393460937)*x[2]
-        arg[3,1]=(1.36784513226)*x[0]+(0.100008910431)*x[1]+(-1.09210256713)*x[2]
-        arg[3,2]=(-0.873076669977)*x[0]+(0.367213631778)*x[1]+(0.0698296920039)*x[2]
-        arg[3,3]=(-1.76609214158)*x[0]+(-1.26186286566)*x[1]+(0.377817035113)*x[2]
-        arg[3,4]=(-1.28261709396)*x[0]+(0.240480767533)*x[1]+(0.307813279357)*x[2]
-        ref[0,0]=(-0.611607640773)*x_ref[0]+(0.584485971628)*x_ref[1]+(0.0090316337643)*x_ref[2]
-        ref[0,1]=(0.905278285857)*x_ref[0]+(0.332523151242)*x_ref[1]+(0.9909841807)*x_ref[2]
-        ref[0,2]=(-1.06629333132)*x_ref[0]+(-0.38478180064)*x_ref[1]+(-0.63309211256)*x_ref[2]
-        ref[0,3]=(0.122436386344)*x_ref[0]+(-0.218752671204)*x_ref[1]+(-0.746695172216)*x_ref[2]
-        ref[0,4]=(1.03152124874)*x_ref[0]+(-1.11327271563)*x_ref[1]+(-0.257591112135)*x_ref[2]
-        ref[1,0]=(0.969019600299)*x_ref[0]+(-0.320279309689)*x_ref[1]+(0.327767746545)*x_ref[2]
-        ref[1,1]=(0.291023069052)*x_ref[0]+(0.78112901064)*x_ref[1]+(0.879257239042)*x_ref[2]
-        ref[1,2]=(-0.131262891536)*x_ref[0]+(-0.0109690229153)*x_ref[1]+(-0.171900332406)*x_ref[2]
-        ref[1,3]=(-1.32272684486)*x_ref[0]+(-0.256869536085)*x_ref[1]+(0.0308524567462)*x_ref[2]
-        ref[1,4]=(1.30707061279)*x_ref[0]+(0.972866282634)*x_ref[1]+(-0.474948537882)*x_ref[2]
-        ref[2,0]=(0.169034210421)*x_ref[0]+(-1.08714896226)*x_ref[1]+(-0.636838450708)*x_ref[2]
-        ref[2,1]=(-0.470752780773)*x_ref[0]+(-0.695286088059)*x_ref[1]+(-1.19197058712)*x_ref[2]
-        ref[2,2]=(0.701403721228)*x_ref[0]+(0.551002482436)*x_ref[1]+(-0.295853851234)*x_ref[2]
-        ref[2,3]=(-0.796431361745)*x_ref[0]+(0.0581884766856)*x_ref[1]+(-1.13668563089)*x_ref[2]
-        ref[2,4]=(-0.733185798017)*x_ref[0]+(0.178900103735)*x_ref[1]+(-0.845671526781)*x_ref[2]
-        ref[3,0]=(-1.47064927107)*x_ref[0]+(1.33393324965)*x_ref[1]+(-0.767393460937)*x_ref[2]
-        ref[3,1]=(1.36784513226)*x_ref[0]+(0.100008910431)*x_ref[1]+(-1.09210256713)*x_ref[2]
-        ref[3,2]=(-0.873076669977)*x_ref[0]+(0.367213631778)*x_ref[1]+(0.0698296920039)*x_ref[2]
-        ref[3,3]=(-1.76609214158)*x_ref[0]+(-1.26186286566)*x_ref[1]+(0.377817035113)*x_ref[2]
-        ref[3,4]=(-1.28261709396)*x_ref[0]+(0.240480767533)*x_ref[1]+(0.307813279357)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.423505169404)*x[0]+(-1.10390334264)*x[1]
-        arg[0,0,1]=(-0.181820089254)*x[0]+(-0.374602268791)*x[1]
-        arg[0,1,0]=(-1.36906917075)*x[0]+(0.26554385908)*x[1]
-        arg[0,1,1]=(-0.280661572374)*x[0]+(-0.239232524287)*x[1]
-        arg[1,0,0]=(-1.25670251934)*x[0]+(-0.429353977735)*x[1]
-        arg[1,0,1]=(-0.747928970735)*x[0]+(1.17874317611)*x[1]
-        arg[1,1,0]=(-0.548814611802)*x[0]+(-0.0249315764285)*x[1]
-        arg[1,1,1]=(-0.481123117522)*x[0]+(1.23402203879)*x[1]
-        arg[2,0,0]=(-0.0639512689884)*x[0]+(-0.0278213371376)*x[1]
-        arg[2,0,1]=(-1.17292797621)*x[0]+(0.42140600304)*x[1]
-        arg[2,1,0]=(-0.358052601083)*x[0]+(-1.66807880791)*x[1]
-        arg[2,1,1]=(-0.291433251349)*x[0]+(0.111473162108)*x[1]
-        arg[3,0,0]=(0.742643625989)*x[0]+(-1.29214106228)*x[1]
-        arg[3,0,1]=(0.319887321826)*x[0]+(-0.40213369238)*x[1]
-        arg[3,1,0]=(-0.449412064097)*x[0]+(-1.10654262009)*x[1]
-        arg[3,1,1]=(1.19722227632)*x[0]+(1.3455799026)*x[1]
-        arg[4,0,0]=(-1.77453188487)*x[0]+(0.634838793872)*x[1]
-        arg[4,0,1]=(-0.215461066907)*x[0]+(1.11635233844)*x[1]
-        arg[4,1,0]=(0.835816652592)*x[0]+(0.668378554214)*x[1]
-        arg[4,1,1]=(-1.22133225406)*x[0]+(-0.148780252398)*x[1]
-        arg[5,0,0]=(0.320245409639)*x[0]+(-1.08828513776)*x[1]
-        arg[5,0,1]=(-0.1865835417)*x[0]+(-0.353282061874)*x[1]
-        arg[5,1,0]=(1.38858040685)*x[0]+(0.166398261098)*x[1]
-        arg[5,1,1]=(0.947718875755)*x[0]+(-1.06171934302)*x[1]
-        ref[0,0,0]=(-0.423505169404)*x_ref[0]+(-1.10390334264)*x_ref[1]
-        ref[0,0,1]=(-0.181820089254)*x_ref[0]+(-0.374602268791)*x_ref[1]
-        ref[0,1,0]=(-1.36906917075)*x_ref[0]+(0.26554385908)*x_ref[1]
-        ref[0,1,1]=(-0.280661572374)*x_ref[0]+(-0.239232524287)*x_ref[1]
-        ref[1,0,0]=(-1.25670251934)*x_ref[0]+(-0.429353977735)*x_ref[1]
-        ref[1,0,1]=(-0.747928970735)*x_ref[0]+(1.17874317611)*x_ref[1]
-        ref[1,1,0]=(-0.548814611802)*x_ref[0]+(-0.0249315764285)*x_ref[1]
-        ref[1,1,1]=(-0.481123117522)*x_ref[0]+(1.23402203879)*x_ref[1]
-        ref[2,0,0]=(-0.0639512689884)*x_ref[0]+(-0.0278213371376)*x_ref[1]
-        ref[2,0,1]=(-1.17292797621)*x_ref[0]+(0.42140600304)*x_ref[1]
-        ref[2,1,0]=(-0.358052601083)*x_ref[0]+(-1.66807880791)*x_ref[1]
-        ref[2,1,1]=(-0.291433251349)*x_ref[0]+(0.111473162108)*x_ref[1]
-        ref[3,0,0]=(0.742643625989)*x_ref[0]+(-1.29214106228)*x_ref[1]
-        ref[3,0,1]=(0.319887321826)*x_ref[0]+(-0.40213369238)*x_ref[1]
-        ref[3,1,0]=(-0.449412064097)*x_ref[0]+(-1.10654262009)*x_ref[1]
-        ref[3,1,1]=(1.19722227632)*x_ref[0]+(1.3455799026)*x_ref[1]
-        ref[4,0,0]=(-1.77453188487)*x_ref[0]+(0.634838793872)*x_ref[1]
-        ref[4,0,1]=(-0.215461066907)*x_ref[0]+(1.11635233844)*x_ref[1]
-        ref[4,1,0]=(0.835816652592)*x_ref[0]+(0.668378554214)*x_ref[1]
-        ref[4,1,1]=(-1.22133225406)*x_ref[0]+(-0.148780252398)*x_ref[1]
-        ref[5,0,0]=(0.320245409639)*x_ref[0]+(-1.08828513776)*x_ref[1]
-        ref[5,0,1]=(-0.1865835417)*x_ref[0]+(-0.353282061874)*x_ref[1]
-        ref[5,1,0]=(1.38858040685)*x_ref[0]+(0.166398261098)*x_ref[1]
-        ref[5,1,1]=(0.947718875755)*x_ref[0]+(-1.06171934302)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.892096322478)*x[0]+(0.720363183451)*x[1]+(0.600609272191)*x[2]
-        arg[0,0,1]=(-0.418024461935)*x[0]+(-0.819275292035)*x[1]+(0.134962557692)*x[2]
-        arg[0,1,0]=(-0.449783838361)*x[0]+(0.943677173533)*x[1]+(0.209424190991)*x[2]
-        arg[0,1,1]=(-0.424386775004)*x[0]+(-0.213024388094)*x[1]+(-1.05927943384)*x[2]
-        arg[1,0,0]=(-0.699504096539)*x[0]+(-0.153570308377)*x[1]+(0.576902392658)*x[2]
-        arg[1,0,1]=(-0.426914055661)*x[0]+(-0.330405267059)*x[1]+(1.07656632155)*x[2]
-        arg[1,1,0]=(0.775238005352)*x[0]+(1.11012072575)*x[1]+(0.764627098603)*x[2]
-        arg[1,1,1]=(0.0130424708408)*x[0]+(-0.671778102107)*x[1]+(0.780684368983)*x[2]
-        arg[2,0,0]=(-0.0512224258498)*x[0]+(-1.50515803984)*x[1]+(0.342824143946)*x[2]
-        arg[2,0,1]=(0.117541624176)*x[0]+(0.372415524552)*x[1]+(0.255218095016)*x[2]
-        arg[2,1,0]=(-0.574508895703)*x[0]+(0.345217292359)*x[1]+(0.209211956821)*x[2]
-        arg[2,1,1]=(0.93643587147)*x[0]+(-0.096209009902)*x[1]+(0.205150859527)*x[2]
-        arg[3,0,0]=(1.7541929884)*x[0]+(0.169061478447)*x[1]+(0.534746695515)*x[2]
-        arg[3,0,1]=(0.442329266782)*x[0]+(0.334971710414)*x[1]+(1.66892557698)*x[2]
-        arg[3,1,0]=(0.316436716758)*x[0]+(-1.25442030987)*x[1]+(0.372183105374)*x[2]
-        arg[3,1,1]=(-0.254157820265)*x[0]+(0.287381300023)*x[1]+(0.0574117423352)*x[2]
-        arg[4,0,0]=(-1.08380257521)*x[0]+(-1.31461890032)*x[1]+(-0.503802775099)*x[2]
-        arg[4,0,1]=(-0.558293486798)*x[0]+(0.702317635925)*x[1]+(0.463814829137)*x[2]
-        arg[4,1,0]=(-0.677160971974)*x[0]+(-0.14921275312)*x[1]+(-1.6501459435)*x[2]
-        arg[4,1,1]=(-0.176672532474)*x[0]+(0.945017605811)*x[1]+(-0.790342939788)*x[2]
-        arg[5,0,0]=(-1.45668070675)*x[0]+(-0.404957129204)*x[1]+(1.37383065954)*x[2]
-        arg[5,0,1]=(0.53829326756)*x[0]+(0.543333031479)*x[1]+(-0.854057296362)*x[2]
-        arg[5,1,0]=(0.805864283921)*x[0]+(-0.00186634953513)*x[1]+(-1.97111362539)*x[2]
-        arg[5,1,1]=(-0.387746238967)*x[0]+(-0.739158353882)*x[1]+(-0.134082808118)*x[2]
-        ref[0,0,0]=(-0.892096322478)*x_ref[0]+(0.720363183451)*x_ref[1]+(0.600609272191)*x_ref[2]
-        ref[0,0,1]=(-0.418024461935)*x_ref[0]+(-0.819275292035)*x_ref[1]+(0.134962557692)*x_ref[2]
-        ref[0,1,0]=(-0.449783838361)*x_ref[0]+(0.943677173533)*x_ref[1]+(0.209424190991)*x_ref[2]
-        ref[0,1,1]=(-0.424386775004)*x_ref[0]+(-0.213024388094)*x_ref[1]+(-1.05927943384)*x_ref[2]
-        ref[1,0,0]=(-0.699504096539)*x_ref[0]+(-0.153570308377)*x_ref[1]+(0.576902392658)*x_ref[2]
-        ref[1,0,1]=(-0.426914055661)*x_ref[0]+(-0.330405267059)*x_ref[1]+(1.07656632155)*x_ref[2]
-        ref[1,1,0]=(0.775238005352)*x_ref[0]+(1.11012072575)*x_ref[1]+(0.764627098603)*x_ref[2]
-        ref[1,1,1]=(0.0130424708408)*x_ref[0]+(-0.671778102107)*x_ref[1]+(0.780684368983)*x_ref[2]
-        ref[2,0,0]=(-0.0512224258498)*x_ref[0]+(-1.50515803984)*x_ref[1]+(0.342824143946)*x_ref[2]
-        ref[2,0,1]=(0.117541624176)*x_ref[0]+(0.372415524552)*x_ref[1]+(0.255218095016)*x_ref[2]
-        ref[2,1,0]=(-0.574508895703)*x_ref[0]+(0.345217292359)*x_ref[1]+(0.209211956821)*x_ref[2]
-        ref[2,1,1]=(0.93643587147)*x_ref[0]+(-0.096209009902)*x_ref[1]+(0.205150859527)*x_ref[2]
-        ref[3,0,0]=(1.7541929884)*x_ref[0]+(0.169061478447)*x_ref[1]+(0.534746695515)*x_ref[2]
-        ref[3,0,1]=(0.442329266782)*x_ref[0]+(0.334971710414)*x_ref[1]+(1.66892557698)*x_ref[2]
-        ref[3,1,0]=(0.316436716758)*x_ref[0]+(-1.25442030987)*x_ref[1]+(0.372183105374)*x_ref[2]
-        ref[3,1,1]=(-0.254157820265)*x_ref[0]+(0.287381300023)*x_ref[1]+(0.0574117423352)*x_ref[2]
-        ref[4,0,0]=(-1.08380257521)*x_ref[0]+(-1.31461890032)*x_ref[1]+(-0.503802775099)*x_ref[2]
-        ref[4,0,1]=(-0.558293486798)*x_ref[0]+(0.702317635925)*x_ref[1]+(0.463814829137)*x_ref[2]
-        ref[4,1,0]=(-0.677160971974)*x_ref[0]+(-0.14921275312)*x_ref[1]+(-1.6501459435)*x_ref[2]
-        ref[4,1,1]=(-0.176672532474)*x_ref[0]+(0.945017605811)*x_ref[1]+(-0.790342939788)*x_ref[2]
-        ref[5,0,0]=(-1.45668070675)*x_ref[0]+(-0.404957129204)*x_ref[1]+(1.37383065954)*x_ref[2]
-        ref[5,0,1]=(0.53829326756)*x_ref[0]+(0.543333031479)*x_ref[1]+(-0.854057296362)*x_ref[2]
-        ref[5,1,0]=(0.805864283921)*x_ref[0]+(-0.00186634953513)*x_ref[1]+(-1.97111362539)*x_ref[2]
-        ref[5,1,1]=(-0.387746238967)*x_ref[0]+(-0.739158353882)*x_ref[1]+(-0.134082808118)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.754311658086)*x[0]+(0.235157034342)*x[1]
-        arg[0,0,0,1]=(-1.33786315024)*x[0]+(0.243349279742)*x[1]
-        arg[0,0,1,0]=(1.48657750088)*x[0]+(1.09853108305)*x[1]
-        arg[0,0,1,1]=(1.4501362266)*x[0]+(0.824811567155)*x[1]
-        arg[0,0,2,0]=(1.12567566082)*x[0]+(0.663525681174)*x[1]
-        arg[0,0,2,1]=(1.48991565019)*x[0]+(-0.680795365011)*x[1]
-        arg[0,1,0,0]=(0.268571449528)*x[0]+(0.818595834672)*x[1]
-        arg[0,1,0,1]=(-1.55490945555)*x[0]+(0.783595197888)*x[1]
-        arg[0,1,1,0]=(0.913201382585)*x[0]+(0.855491379376)*x[1]
-        arg[0,1,1,1]=(-0.179192075116)*x[0]+(-0.690415079523)*x[1]
-        arg[0,1,2,0]=(-0.0393574502912)*x[0]+(-0.690157650634)*x[1]
-        arg[0,1,2,1]=(0.784216863217)*x[0]+(0.498735486159)*x[1]
-        arg[0,2,0,0]=(0.137939554165)*x[0]+(-1.33961519113)*x[1]
-        arg[0,2,0,1]=(-1.03897311736)*x[0]+(-1.37797405312)*x[1]
-        arg[0,2,1,0]=(0.199812003756)*x[0]+(-0.0388499674037)*x[1]
-        arg[0,2,1,1]=(1.15530534202)*x[0]+(-1.28280869078)*x[1]
-        arg[0,2,2,0]=(0.836447791155)*x[0]+(1.2627066026)*x[1]
-        arg[0,2,2,1]=(-0.584608492688)*x[0]+(-1.55305974305)*x[1]
-        arg[0,3,0,0]=(-0.661952381799)*x[0]+(-1.27062403778)*x[1]
-        arg[0,3,0,1]=(-1.47789532259)*x[0]+(-0.279583524936)*x[1]
-        arg[0,3,1,0]=(1.40729771357)*x[0]+(0.0971284144528)*x[1]
-        arg[0,3,1,1]=(-0.459167955911)*x[0]+(-1.29033281524)*x[1]
-        arg[0,3,2,0]=(-1.63189436824)*x[0]+(0.75729808422)*x[1]
-        arg[0,3,2,1]=(0.522479828718)*x[0]+(-0.0231299515383)*x[1]
-        arg[0,4,0,0]=(0.241891446615)*x[0]+(0.803327107651)*x[1]
-        arg[0,4,0,1]=(0.273613502836)*x[0]+(-0.0115180464171)*x[1]
-        arg[0,4,1,0]=(1.96219818696)*x[0]+(-0.349137094743)*x[1]
-        arg[0,4,1,1]=(0.365690821719)*x[0]+(-1.6943347181)*x[1]
-        arg[0,4,2,0]=(-0.283970779872)*x[0]+(-0.258537179804)*x[1]
-        arg[0,4,2,1]=(-0.973333430598)*x[0]+(1.48706276212)*x[1]
-        arg[1,0,0,0]=(1.18757466971)*x[0]+(0.838804656357)*x[1]
-        arg[1,0,0,1]=(0.840859904702)*x[0]+(1.09955195682)*x[1]
-        arg[1,0,1,0]=(1.46190513227)*x[0]+(-0.596959830422)*x[1]
-        arg[1,0,1,1]=(0.718689296745)*x[0]+(-0.628074620222)*x[1]
-        arg[1,0,2,0]=(0.440761293041)*x[0]+(0.115800854194)*x[1]
-        arg[1,0,2,1]=(1.34891146904)*x[0]+(0.813690260652)*x[1]
-        arg[1,1,0,0]=(0.183071638098)*x[0]+(-1.37996210755)*x[1]
-        arg[1,1,0,1]=(0.258142115988)*x[0]+(-0.757709381529)*x[1]
-        arg[1,1,1,0]=(1.72392829309)*x[0]+(0.444995102781)*x[1]
-        arg[1,1,1,1]=(-0.380898209988)*x[0]+(-0.0950246860347)*x[1]
-        arg[1,1,2,0]=(0.203007226016)*x[0]+(1.09786001832)*x[1]
-        arg[1,1,2,1]=(-0.502500865341)*x[0]+(-0.629980527995)*x[1]
-        arg[1,2,0,0]=(0.482549518436)*x[0]+(0.565840824146)*x[1]
-        arg[1,2,0,1]=(0.355818565068)*x[0]+(-0.78273295574)*x[1]
-        arg[1,2,1,0]=(1.79204033071)*x[0]+(-0.698040851585)*x[1]
-        arg[1,2,1,1]=(-0.534827741044)*x[0]+(0.00943131627498)*x[1]
-        arg[1,2,2,0]=(-1.00663524444)*x[0]+(0.0207854553456)*x[1]
-        arg[1,2,2,1]=(-0.338048040159)*x[0]+(-0.380607406217)*x[1]
-        arg[1,3,0,0]=(0.586310549044)*x[0]+(0.276326798805)*x[1]
-        arg[1,3,0,1]=(-0.260482580702)*x[0]+(-0.349279395321)*x[1]
-        arg[1,3,1,0]=(-0.196533829895)*x[0]+(0.614805272738)*x[1]
-        arg[1,3,1,1]=(-0.363176483895)*x[0]+(-0.925817017731)*x[1]
-        arg[1,3,2,0]=(-1.24182075421)*x[0]+(0.215966446013)*x[1]
-        arg[1,3,2,1]=(1.07546652642)*x[0]+(0.383803991974)*x[1]
-        arg[1,4,0,0]=(0.199312303525)*x[0]+(-0.314520883859)*x[1]
-        arg[1,4,0,1]=(-1.56890826152)*x[0]+(-0.133086662241)*x[1]
-        arg[1,4,1,0]=(1.1307241936)*x[0]+(-1.32905744984)*x[1]
-        arg[1,4,1,1]=(-0.385991455298)*x[0]+(0.292913024507)*x[1]
-        arg[1,4,2,0]=(1.14561678056)*x[0]+(-0.662696162276)*x[1]
-        arg[1,4,2,1]=(-1.49533948954)*x[0]+(1.43396138744)*x[1]
-        arg[2,0,0,0]=(-0.63160396493)*x[0]+(0.813120998776)*x[1]
-        arg[2,0,0,1]=(0.65598998434)*x[0]+(-1.02445537553)*x[1]
-        arg[2,0,1,0]=(-1.13473104075)*x[0]+(0.057331183449)*x[1]
-        arg[2,0,1,1]=(-0.154892482107)*x[0]+(0.481969957579)*x[1]
-        arg[2,0,2,0]=(0.521916671496)*x[0]+(0.546676943059)*x[1]
-        arg[2,0,2,1]=(-1.68919379028)*x[0]+(1.08292038981)*x[1]
-        arg[2,1,0,0]=(-0.643846595888)*x[0]+(0.528306097755)*x[1]
-        arg[2,1,0,1]=(1.3745090497)*x[0]+(-0.0801648509184)*x[1]
-        arg[2,1,1,0]=(0.129096817054)*x[0]+(0.90750370855)*x[1]
-        arg[2,1,1,1]=(0.539309513305)*x[0]+(1.34949470961)*x[1]
-        arg[2,1,2,0]=(1.4189703896)*x[0]+(-1.75011201893)*x[1]
-        arg[2,1,2,1]=(-1.09325548386)*x[0]+(0.148279301716)*x[1]
-        arg[2,2,0,0]=(-1.25785133743)*x[0]+(0.275071306594)*x[1]
-        arg[2,2,0,1]=(-0.550152068761)*x[0]+(-1.20422484275)*x[1]
-        arg[2,2,1,0]=(-0.102062863668)*x[0]+(-1.34431887541)*x[1]
-        arg[2,2,1,1]=(0.103354724169)*x[0]+(-0.941952180446)*x[1]
-        arg[2,2,2,0]=(1.2090339604)*x[0]+(-0.330357976796)*x[1]
-        arg[2,2,2,1]=(0.203162449188)*x[0]+(-1.03640702014)*x[1]
-        arg[2,3,0,0]=(-0.324576353514)*x[0]+(0.582614539267)*x[1]
-        arg[2,3,0,1]=(-0.213823136215)*x[0]+(-0.473199105214)*x[1]
-        arg[2,3,1,0]=(0.395144702599)*x[0]+(0.0358194467152)*x[1]
-        arg[2,3,1,1]=(1.32860563396)*x[0]+(-0.577308310732)*x[1]
-        arg[2,3,2,0]=(0.994205029432)*x[0]+(1.13433517636)*x[1]
-        arg[2,3,2,1]=(-0.488499286742)*x[0]+(0.224253820738)*x[1]
-        arg[2,4,0,0]=(1.48035663008)*x[0]+(-1.09697986914)*x[1]
-        arg[2,4,0,1]=(-1.09991915151)*x[0]+(-0.557951199985)*x[1]
-        arg[2,4,1,0]=(-1.23862699804)*x[0]+(-0.230602187713)*x[1]
-        arg[2,4,1,1]=(-0.922609370448)*x[0]+(1.76673953413)*x[1]
-        arg[2,4,2,0]=(0.731769419709)*x[0]+(-1.1094516608)*x[1]
-        arg[2,4,2,1]=(-0.145672504805)*x[0]+(0.168194421355)*x[1]
-        arg[3,0,0,0]=(1.02559707602)*x[0]+(0.260431368523)*x[1]
-        arg[3,0,0,1]=(0.111899568824)*x[0]+(-0.90725475423)*x[1]
-        arg[3,0,1,0]=(-0.226547745683)*x[0]+(-0.232830393372)*x[1]
-        arg[3,0,1,1]=(0.347004318471)*x[0]+(-0.196130970001)*x[1]
-        arg[3,0,2,0]=(-1.72155871442)*x[0]+(-1.28372407452)*x[1]
-        arg[3,0,2,1]=(1.43817914693)*x[0]+(-0.354093253684)*x[1]
-        arg[3,1,0,0]=(-0.293939245102)*x[0]+(0.0255562139103)*x[1]
-        arg[3,1,0,1]=(0.139306213018)*x[0]+(0.595062226642)*x[1]
-        arg[3,1,1,0]=(-0.670339920672)*x[0]+(0.387520583192)*x[1]
-        arg[3,1,1,1]=(-0.0323325470954)*x[0]+(-0.681162999279)*x[1]
-        arg[3,1,2,0]=(0.235275048739)*x[0]+(0.144725473773)*x[1]
-        arg[3,1,2,1]=(0.132211795214)*x[0]+(0.262780216845)*x[1]
-        arg[3,2,0,0]=(0.590514326163)*x[0]+(-0.84273677918)*x[1]
-        arg[3,2,0,1]=(-0.925181556185)*x[0]+(-0.300244447001)*x[1]
-        arg[3,2,1,0]=(-0.0509700795112)*x[0]+(-1.31919389616)*x[1]
-        arg[3,2,1,1]=(1.50577291846)*x[0]+(-0.219284607769)*x[1]
-        arg[3,2,2,0]=(-0.0460616673346)*x[0]+(-0.690312685466)*x[1]
-        arg[3,2,2,1]=(-0.673765477936)*x[0]+(-0.0965860475641)*x[1]
-        arg[3,3,0,0]=(-0.6577594174)*x[0]+(0.171886277016)*x[1]
-        arg[3,3,0,1]=(-1.08810434718)*x[0]+(0.333153250183)*x[1]
-        arg[3,3,1,0]=(0.150968371983)*x[0]+(0.290859317391)*x[1]
-        arg[3,3,1,1]=(1.62096265131)*x[0]+(-1.10309602741)*x[1]
-        arg[3,3,2,0]=(-0.932063639972)*x[0]+(-0.897131561126)*x[1]
-        arg[3,3,2,1]=(-0.819110834345)*x[0]+(1.59159109562)*x[1]
-        arg[3,4,0,0]=(0.272662931155)*x[0]+(0.69026285756)*x[1]
-        arg[3,4,0,1]=(-0.600556370757)*x[0]+(-0.0853533546302)*x[1]
-        arg[3,4,1,0]=(1.18544735281)*x[0]+(0.217751189034)*x[1]
-        arg[3,4,1,1]=(-0.594609531358)*x[0]+(0.882158349788)*x[1]
-        arg[3,4,2,0]=(1.18876765552)*x[0]+(-0.411481586979)*x[1]
-        arg[3,4,2,1]=(-1.093067792)*x[0]+(-0.266744260768)*x[1]
-        ref[0,0,0,0]=(-0.754311658086)*x_ref[0]+(0.235157034342)*x_ref[1]
-        ref[0,0,0,1]=(-1.33786315024)*x_ref[0]+(0.243349279742)*x_ref[1]
-        ref[0,0,1,0]=(1.48657750088)*x_ref[0]+(1.09853108305)*x_ref[1]
-        ref[0,0,1,1]=(1.4501362266)*x_ref[0]+(0.824811567155)*x_ref[1]
-        ref[0,0,2,0]=(1.12567566082)*x_ref[0]+(0.663525681174)*x_ref[1]
-        ref[0,0,2,1]=(1.48991565019)*x_ref[0]+(-0.680795365011)*x_ref[1]
-        ref[0,1,0,0]=(0.268571449528)*x_ref[0]+(0.818595834672)*x_ref[1]
-        ref[0,1,0,1]=(-1.55490945555)*x_ref[0]+(0.783595197888)*x_ref[1]
-        ref[0,1,1,0]=(0.913201382585)*x_ref[0]+(0.855491379376)*x_ref[1]
-        ref[0,1,1,1]=(-0.179192075116)*x_ref[0]+(-0.690415079523)*x_ref[1]
-        ref[0,1,2,0]=(-0.0393574502912)*x_ref[0]+(-0.690157650634)*x_ref[1]
-        ref[0,1,2,1]=(0.784216863217)*x_ref[0]+(0.498735486159)*x_ref[1]
-        ref[0,2,0,0]=(0.137939554165)*x_ref[0]+(-1.33961519113)*x_ref[1]
-        ref[0,2,0,1]=(-1.03897311736)*x_ref[0]+(-1.37797405312)*x_ref[1]
-        ref[0,2,1,0]=(0.199812003756)*x_ref[0]+(-0.0388499674037)*x_ref[1]
-        ref[0,2,1,1]=(1.15530534202)*x_ref[0]+(-1.28280869078)*x_ref[1]
-        ref[0,2,2,0]=(0.836447791155)*x_ref[0]+(1.2627066026)*x_ref[1]
-        ref[0,2,2,1]=(-0.584608492688)*x_ref[0]+(-1.55305974305)*x_ref[1]
-        ref[0,3,0,0]=(-0.661952381799)*x_ref[0]+(-1.27062403778)*x_ref[1]
-        ref[0,3,0,1]=(-1.47789532259)*x_ref[0]+(-0.279583524936)*x_ref[1]
-        ref[0,3,1,0]=(1.40729771357)*x_ref[0]+(0.0971284144528)*x_ref[1]
-        ref[0,3,1,1]=(-0.459167955911)*x_ref[0]+(-1.29033281524)*x_ref[1]
-        ref[0,3,2,0]=(-1.63189436824)*x_ref[0]+(0.75729808422)*x_ref[1]
-        ref[0,3,2,1]=(0.522479828718)*x_ref[0]+(-0.0231299515383)*x_ref[1]
-        ref[0,4,0,0]=(0.241891446615)*x_ref[0]+(0.803327107651)*x_ref[1]
-        ref[0,4,0,1]=(0.273613502836)*x_ref[0]+(-0.0115180464171)*x_ref[1]
-        ref[0,4,1,0]=(1.96219818696)*x_ref[0]+(-0.349137094743)*x_ref[1]
-        ref[0,4,1,1]=(0.365690821719)*x_ref[0]+(-1.6943347181)*x_ref[1]
-        ref[0,4,2,0]=(-0.283970779872)*x_ref[0]+(-0.258537179804)*x_ref[1]
-        ref[0,4,2,1]=(-0.973333430598)*x_ref[0]+(1.48706276212)*x_ref[1]
-        ref[1,0,0,0]=(1.18757466971)*x_ref[0]+(0.838804656357)*x_ref[1]
-        ref[1,0,0,1]=(0.840859904702)*x_ref[0]+(1.09955195682)*x_ref[1]
-        ref[1,0,1,0]=(1.46190513227)*x_ref[0]+(-0.596959830422)*x_ref[1]
-        ref[1,0,1,1]=(0.718689296745)*x_ref[0]+(-0.628074620222)*x_ref[1]
-        ref[1,0,2,0]=(0.440761293041)*x_ref[0]+(0.115800854194)*x_ref[1]
-        ref[1,0,2,1]=(1.34891146904)*x_ref[0]+(0.813690260652)*x_ref[1]
-        ref[1,1,0,0]=(0.183071638098)*x_ref[0]+(-1.37996210755)*x_ref[1]
-        ref[1,1,0,1]=(0.258142115988)*x_ref[0]+(-0.757709381529)*x_ref[1]
-        ref[1,1,1,0]=(1.72392829309)*x_ref[0]+(0.444995102781)*x_ref[1]
-        ref[1,1,1,1]=(-0.380898209988)*x_ref[0]+(-0.0950246860347)*x_ref[1]
-        ref[1,1,2,0]=(0.203007226016)*x_ref[0]+(1.09786001832)*x_ref[1]
-        ref[1,1,2,1]=(-0.502500865341)*x_ref[0]+(-0.629980527995)*x_ref[1]
-        ref[1,2,0,0]=(0.482549518436)*x_ref[0]+(0.565840824146)*x_ref[1]
-        ref[1,2,0,1]=(0.355818565068)*x_ref[0]+(-0.78273295574)*x_ref[1]
-        ref[1,2,1,0]=(1.79204033071)*x_ref[0]+(-0.698040851585)*x_ref[1]
-        ref[1,2,1,1]=(-0.534827741044)*x_ref[0]+(0.00943131627498)*x_ref[1]
-        ref[1,2,2,0]=(-1.00663524444)*x_ref[0]+(0.0207854553456)*x_ref[1]
-        ref[1,2,2,1]=(-0.338048040159)*x_ref[0]+(-0.380607406217)*x_ref[1]
-        ref[1,3,0,0]=(0.586310549044)*x_ref[0]+(0.276326798805)*x_ref[1]
-        ref[1,3,0,1]=(-0.260482580702)*x_ref[0]+(-0.349279395321)*x_ref[1]
-        ref[1,3,1,0]=(-0.196533829895)*x_ref[0]+(0.614805272738)*x_ref[1]
-        ref[1,3,1,1]=(-0.363176483895)*x_ref[0]+(-0.925817017731)*x_ref[1]
-        ref[1,3,2,0]=(-1.24182075421)*x_ref[0]+(0.215966446013)*x_ref[1]
-        ref[1,3,2,1]=(1.07546652642)*x_ref[0]+(0.383803991974)*x_ref[1]
-        ref[1,4,0,0]=(0.199312303525)*x_ref[0]+(-0.314520883859)*x_ref[1]
-        ref[1,4,0,1]=(-1.56890826152)*x_ref[0]+(-0.133086662241)*x_ref[1]
-        ref[1,4,1,0]=(1.1307241936)*x_ref[0]+(-1.32905744984)*x_ref[1]
-        ref[1,4,1,1]=(-0.385991455298)*x_ref[0]+(0.292913024507)*x_ref[1]
-        ref[1,4,2,0]=(1.14561678056)*x_ref[0]+(-0.662696162276)*x_ref[1]
-        ref[1,4,2,1]=(-1.49533948954)*x_ref[0]+(1.43396138744)*x_ref[1]
-        ref[2,0,0,0]=(-0.63160396493)*x_ref[0]+(0.813120998776)*x_ref[1]
-        ref[2,0,0,1]=(0.65598998434)*x_ref[0]+(-1.02445537553)*x_ref[1]
-        ref[2,0,1,0]=(-1.13473104075)*x_ref[0]+(0.057331183449)*x_ref[1]
-        ref[2,0,1,1]=(-0.154892482107)*x_ref[0]+(0.481969957579)*x_ref[1]
-        ref[2,0,2,0]=(0.521916671496)*x_ref[0]+(0.546676943059)*x_ref[1]
-        ref[2,0,2,1]=(-1.68919379028)*x_ref[0]+(1.08292038981)*x_ref[1]
-        ref[2,1,0,0]=(-0.643846595888)*x_ref[0]+(0.528306097755)*x_ref[1]
-        ref[2,1,0,1]=(1.3745090497)*x_ref[0]+(-0.0801648509184)*x_ref[1]
-        ref[2,1,1,0]=(0.129096817054)*x_ref[0]+(0.90750370855)*x_ref[1]
-        ref[2,1,1,1]=(0.539309513305)*x_ref[0]+(1.34949470961)*x_ref[1]
-        ref[2,1,2,0]=(1.4189703896)*x_ref[0]+(-1.75011201893)*x_ref[1]
-        ref[2,1,2,1]=(-1.09325548386)*x_ref[0]+(0.148279301716)*x_ref[1]
-        ref[2,2,0,0]=(-1.25785133743)*x_ref[0]+(0.275071306594)*x_ref[1]
-        ref[2,2,0,1]=(-0.550152068761)*x_ref[0]+(-1.20422484275)*x_ref[1]
-        ref[2,2,1,0]=(-0.102062863668)*x_ref[0]+(-1.34431887541)*x_ref[1]
-        ref[2,2,1,1]=(0.103354724169)*x_ref[0]+(-0.941952180446)*x_ref[1]
-        ref[2,2,2,0]=(1.2090339604)*x_ref[0]+(-0.330357976796)*x_ref[1]
-        ref[2,2,2,1]=(0.203162449188)*x_ref[0]+(-1.03640702014)*x_ref[1]
-        ref[2,3,0,0]=(-0.324576353514)*x_ref[0]+(0.582614539267)*x_ref[1]
-        ref[2,3,0,1]=(-0.213823136215)*x_ref[0]+(-0.473199105214)*x_ref[1]
-        ref[2,3,1,0]=(0.395144702599)*x_ref[0]+(0.0358194467152)*x_ref[1]
-        ref[2,3,1,1]=(1.32860563396)*x_ref[0]+(-0.577308310732)*x_ref[1]
-        ref[2,3,2,0]=(0.994205029432)*x_ref[0]+(1.13433517636)*x_ref[1]
-        ref[2,3,2,1]=(-0.488499286742)*x_ref[0]+(0.224253820738)*x_ref[1]
-        ref[2,4,0,0]=(1.48035663008)*x_ref[0]+(-1.09697986914)*x_ref[1]
-        ref[2,4,0,1]=(-1.09991915151)*x_ref[0]+(-0.557951199985)*x_ref[1]
-        ref[2,4,1,0]=(-1.23862699804)*x_ref[0]+(-0.230602187713)*x_ref[1]
-        ref[2,4,1,1]=(-0.922609370448)*x_ref[0]+(1.76673953413)*x_ref[1]
-        ref[2,4,2,0]=(0.731769419709)*x_ref[0]+(-1.1094516608)*x_ref[1]
-        ref[2,4,2,1]=(-0.145672504805)*x_ref[0]+(0.168194421355)*x_ref[1]
-        ref[3,0,0,0]=(1.02559707602)*x_ref[0]+(0.260431368523)*x_ref[1]
-        ref[3,0,0,1]=(0.111899568824)*x_ref[0]+(-0.90725475423)*x_ref[1]
-        ref[3,0,1,0]=(-0.226547745683)*x_ref[0]+(-0.232830393372)*x_ref[1]
-        ref[3,0,1,1]=(0.347004318471)*x_ref[0]+(-0.196130970001)*x_ref[1]
-        ref[3,0,2,0]=(-1.72155871442)*x_ref[0]+(-1.28372407452)*x_ref[1]
-        ref[3,0,2,1]=(1.43817914693)*x_ref[0]+(-0.354093253684)*x_ref[1]
-        ref[3,1,0,0]=(-0.293939245102)*x_ref[0]+(0.0255562139103)*x_ref[1]
-        ref[3,1,0,1]=(0.139306213018)*x_ref[0]+(0.595062226642)*x_ref[1]
-        ref[3,1,1,0]=(-0.670339920672)*x_ref[0]+(0.387520583192)*x_ref[1]
-        ref[3,1,1,1]=(-0.0323325470954)*x_ref[0]+(-0.681162999279)*x_ref[1]
-        ref[3,1,2,0]=(0.235275048739)*x_ref[0]+(0.144725473773)*x_ref[1]
-        ref[3,1,2,1]=(0.132211795214)*x_ref[0]+(0.262780216845)*x_ref[1]
-        ref[3,2,0,0]=(0.590514326163)*x_ref[0]+(-0.84273677918)*x_ref[1]
-        ref[3,2,0,1]=(-0.925181556185)*x_ref[0]+(-0.300244447001)*x_ref[1]
-        ref[3,2,1,0]=(-0.0509700795112)*x_ref[0]+(-1.31919389616)*x_ref[1]
-        ref[3,2,1,1]=(1.50577291846)*x_ref[0]+(-0.219284607769)*x_ref[1]
-        ref[3,2,2,0]=(-0.0460616673346)*x_ref[0]+(-0.690312685466)*x_ref[1]
-        ref[3,2,2,1]=(-0.673765477936)*x_ref[0]+(-0.0965860475641)*x_ref[1]
-        ref[3,3,0,0]=(-0.6577594174)*x_ref[0]+(0.171886277016)*x_ref[1]
-        ref[3,3,0,1]=(-1.08810434718)*x_ref[0]+(0.333153250183)*x_ref[1]
-        ref[3,3,1,0]=(0.150968371983)*x_ref[0]+(0.290859317391)*x_ref[1]
-        ref[3,3,1,1]=(1.62096265131)*x_ref[0]+(-1.10309602741)*x_ref[1]
-        ref[3,3,2,0]=(-0.932063639972)*x_ref[0]+(-0.897131561126)*x_ref[1]
-        ref[3,3,2,1]=(-0.819110834345)*x_ref[0]+(1.59159109562)*x_ref[1]
-        ref[3,4,0,0]=(0.272662931155)*x_ref[0]+(0.69026285756)*x_ref[1]
-        ref[3,4,0,1]=(-0.600556370757)*x_ref[0]+(-0.0853533546302)*x_ref[1]
-        ref[3,4,1,0]=(1.18544735281)*x_ref[0]+(0.217751189034)*x_ref[1]
-        ref[3,4,1,1]=(-0.594609531358)*x_ref[0]+(0.882158349788)*x_ref[1]
-        ref[3,4,2,0]=(1.18876765552)*x_ref[0]+(-0.411481586979)*x_ref[1]
-        ref[3,4,2,1]=(-1.093067792)*x_ref[0]+(-0.266744260768)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.29218217256)*x[0]+(-0.382937892213)*x[1]+(0.14363896447)*x[2]
-        arg[0,0,0,1]=(1.39856942421)*x[0]+(0.302082267835)*x[1]+(-0.40870736584)*x[2]
-        arg[0,0,1,0]=(0.523846108043)*x[0]+(1.19961531204)*x[1]+(0.838881761349)*x[2]
-        arg[0,0,1,1]=(0.634542282764)*x[0]+(-0.475514686466)*x[1]+(-1.68745428486)*x[2]
-        arg[0,0,2,0]=(1.16379585731)*x[0]+(-0.928037595416)*x[1]+(0.998857178353)*x[2]
-        arg[0,0,2,1]=(-0.804515607022)*x[0]+(-0.915469493439)*x[1]+(-0.143888000623)*x[2]
-        arg[0,1,0,0]=(0.925843155486)*x[0]+(-0.168243418953)*x[1]+(-0.887839555187)*x[2]
-        arg[0,1,0,1]=(-0.913103105329)*x[0]+(1.38011681732)*x[1]+(-0.992478793291)*x[2]
-        arg[0,1,1,0]=(0.759685289903)*x[0]+(-0.579481939982)*x[1]+(0.577682929138)*x[2]
-        arg[0,1,1,1]=(0.813155548228)*x[0]+(-0.178317843217)*x[1]+(-0.0460113194526)*x[2]
-        arg[0,1,2,0]=(-0.195764860141)*x[0]+(1.44256979628)*x[1]+(0.283992441343)*x[2]
-        arg[0,1,2,1]=(-0.921229459072)*x[0]+(-1.19295761547)*x[1]+(0.215736801944)*x[2]
-        arg[0,2,0,0]=(-0.741726331752)*x[0]+(-0.225585937382)*x[1]+(1.12654556466)*x[2]
-        arg[0,2,0,1]=(-0.709656162421)*x[0]+(0.298862010425)*x[1]+(-0.502443284827)*x[2]
-        arg[0,2,1,0]=(-1.01166188669)*x[0]+(-1.43763408953)*x[1]+(-0.835160398488)*x[2]
-        arg[0,2,1,1]=(1.80968424545)*x[0]+(-0.802666103495)*x[1]+(0.290283606115)*x[2]
-        arg[0,2,2,0]=(0.346481981585)*x[0]+(-0.444176962215)*x[1]+(0.689127612227)*x[2]
-        arg[0,2,2,1]=(1.06925494095)*x[0]+(0.452854988449)*x[1]+(-1.19974690364)*x[2]
-        arg[0,3,0,0]=(-0.534896036328)*x[0]+(-0.312000770615)*x[1]+(-0.440033746693)*x[2]
-        arg[0,3,0,1]=(0.580351431838)*x[0]+(-0.36623848451)*x[1]+(-0.507837490037)*x[2]
-        arg[0,3,1,0]=(0.383180910522)*x[0]+(-0.0907152443563)*x[1]+(-0.200103743943)*x[2]
-        arg[0,3,1,1]=(0.0160194687513)*x[0]+(0.862509612939)*x[1]+(-1.14643594474)*x[2]
-        arg[0,3,2,0]=(-0.224390850199)*x[0]+(-0.176927715447)*x[1]+(0.213480525831)*x[2]
-        arg[0,3,2,1]=(-0.0508511448148)*x[0]+(-1.28943467389)*x[1]+(0.902285302487)*x[2]
-        arg[0,4,0,0]=(-0.633106625232)*x[0]+(-0.430651917485)*x[1]+(0.583149841952)*x[2]
-        arg[0,4,0,1]=(0.579035528956)*x[0]+(0.159439682519)*x[1]+(-0.0926277063021)*x[2]
-        arg[0,4,1,0]=(0.00484756366973)*x[0]+(0.0324822270755)*x[1]+(1.20052413378)*x[2]
-        arg[0,4,1,1]=(-0.337383994688)*x[0]+(0.902076367981)*x[1]+(-0.1956377395)*x[2]
-        arg[0,4,2,0]=(0.928434343456)*x[0]+(0.0376569884355)*x[1]+(-0.155274118568)*x[2]
-        arg[0,4,2,1]=(-0.541990213238)*x[0]+(-0.0165076697829)*x[1]+(-0.210319224859)*x[2]
-        arg[1,0,0,0]=(-1.67762025181)*x[0]+(1.61434755579)*x[1]+(0.357272049999)*x[2]
-        arg[1,0,0,1]=(-1.62532544549)*x[0]+(-0.271426231027)*x[1]+(0.338680991778)*x[2]
-        arg[1,0,1,0]=(1.73523408033)*x[0]+(1.11987092368)*x[1]+(0.126769364273)*x[2]
-        arg[1,0,1,1]=(-1.49220786558)*x[0]+(1.51915566092)*x[1]+(1.24788192157)*x[2]
-        arg[1,0,2,0]=(-0.687808766765)*x[0]+(-1.02318754737)*x[1]+(0.590653972416)*x[2]
-        arg[1,0,2,1]=(0.756067354802)*x[0]+(-0.66964706965)*x[1]+(-1.18986499158)*x[2]
-        arg[1,1,0,0]=(0.371345732177)*x[0]+(0.212739617115)*x[1]+(-1.13439047405)*x[2]
-        arg[1,1,0,1]=(0.525761804111)*x[0]+(0.144130399691)*x[1]+(0.715517587677)*x[2]
-        arg[1,1,1,0]=(-0.376160293215)*x[0]+(-0.469964935263)*x[1]+(0.413518194707)*x[2]
-        arg[1,1,1,1]=(-0.787748398144)*x[0]+(-0.810090402237)*x[1]+(-0.50127109256)*x[2]
-        arg[1,1,2,0]=(0.654555083692)*x[0]+(-0.142134700515)*x[1]+(-1.55891930521)*x[2]
-        arg[1,1,2,1]=(-0.423058885456)*x[0]+(-0.65930158641)*x[1]+(0.94440057744)*x[2]
-        arg[1,2,0,0]=(-0.924832007053)*x[0]+(1.0154890382)*x[1]+(0.11938079748)*x[2]
-        arg[1,2,0,1]=(0.134642686931)*x[0]+(-1.30908067998)*x[1]+(0.367206139074)*x[2]
-        arg[1,2,1,0]=(1.55524055201)*x[0]+(0.727208660637)*x[1]+(0.809810917377)*x[2]
-        arg[1,2,1,1]=(0.94813391462)*x[0]+(-1.49402524308)*x[1]+(0.367824542434)*x[2]
-        arg[1,2,2,0]=(-0.608295798731)*x[0]+(-0.142302252814)*x[1]+(-0.986529251308)*x[2]
-        arg[1,2,2,1]=(0.0259394619607)*x[0]+(-1.60728202467)*x[1]+(0.312534656619)*x[2]
-        arg[1,3,0,0]=(-1.34063373729)*x[0]+(-0.268499839329)*x[1]+(-0.335125886299)*x[2]
-        arg[1,3,0,1]=(1.53280698072)*x[0]+(1.24369684711)*x[1]+(0.766369156132)*x[2]
-        arg[1,3,1,0]=(0.902067176876)*x[0]+(0.791102994814)*x[1]+(-0.89266430493)*x[2]
-        arg[1,3,1,1]=(0.704997629232)*x[0]+(-0.551611360332)*x[1]+(1.39134537491)*x[2]
-        arg[1,3,2,0]=(-0.151690675211)*x[0]+(-1.01762975893)*x[1]+(-0.627493214284)*x[2]
-        arg[1,3,2,1]=(1.00936645922)*x[0]+(0.0322458997248)*x[1]+(1.45039938194)*x[2]
-        arg[1,4,0,0]=(-0.0916390388904)*x[0]+(-0.783111746469)*x[1]+(0.389725342225)*x[2]
-        arg[1,4,0,1]=(1.18859328243)*x[0]+(0.871689661558)*x[1]+(-0.775464713448)*x[2]
-        arg[1,4,1,0]=(0.913118342488)*x[0]+(1.53285648884)*x[1]+(0.0947365101243)*x[2]
-        arg[1,4,1,1]=(-1.00735841224)*x[0]+(-1.12544193607)*x[1]+(0.267347229372)*x[2]
-        arg[1,4,2,0]=(0.285943438284)*x[0]+(-1.0889389244)*x[1]+(-1.03054842327)*x[2]
-        arg[1,4,2,1]=(-1.5768940139)*x[0]+(0.91237754587)*x[1]+(1.30220394199)*x[2]
-        arg[2,0,0,0]=(-0.0634935883277)*x[0]+(0.157304131712)*x[1]+(-1.2995042074)*x[2]
-        arg[2,0,0,1]=(-0.802705266871)*x[0]+(0.238233162774)*x[1]+(1.29463414013)*x[2]
-        arg[2,0,1,0]=(-0.925468462671)*x[0]+(0.870960795966)*x[1]+(0.156522765713)*x[2]
-        arg[2,0,1,1]=(-0.546666833309)*x[0]+(-1.14649607995)*x[1]+(-1.53906505048)*x[2]
-        arg[2,0,2,0]=(0.464952910857)*x[0]+(0.408605786027)*x[1]+(-0.886974881114)*x[2]
-        arg[2,0,2,1]=(0.491723247948)*x[0]+(0.194616420077)*x[1]+(0.409049782749)*x[2]
-        arg[2,1,0,0]=(-1.19836883114)*x[0]+(1.0622722337)*x[1]+(-0.109193867727)*x[2]
-        arg[2,1,0,1]=(1.01973600383)*x[0]+(-0.154482220539)*x[1]+(0.378696371956)*x[2]
-        arg[2,1,1,0]=(-0.0812015296246)*x[0]+(-1.10252794568)*x[1]+(-0.00585426581857)*x[2]
-        arg[2,1,1,1]=(0.536042665272)*x[0]+(0.685507117255)*x[1]+(-0.179652683139)*x[2]
-        arg[2,1,2,0]=(-0.36750467811)*x[0]+(-1.23674550869)*x[1]+(-0.762905702801)*x[2]
-        arg[2,1,2,1]=(0.329665965651)*x[0]+(0.101195810737)*x[1]+(-0.610015052375)*x[2]
-        arg[2,2,0,0]=(-0.81644635185)*x[0]+(-0.604578476306)*x[1]+(0.0440925706991)*x[2]
-        arg[2,2,0,1]=(-0.958241437971)*x[0]+(0.38563498206)*x[1]+(0.913406762318)*x[2]
-        arg[2,2,1,0]=(1.22027492224)*x[0]+(-1.00726209939)*x[1]+(-1.05083068303)*x[2]
-        arg[2,2,1,1]=(-1.47561192645)*x[0]+(-0.903549355608)*x[1]+(0.236771324671)*x[2]
-        arg[2,2,2,0]=(0.284995864449)*x[0]+(-0.175760829921)*x[1]+(-0.720607220001)*x[2]
-        arg[2,2,2,1]=(-0.535894515963)*x[0]+(-0.821302957162)*x[1]+(-1.75141540241)*x[2]
-        arg[2,3,0,0]=(-0.333082106674)*x[0]+(0.579471826412)*x[1]+(0.561184138108)*x[2]
-        arg[2,3,0,1]=(1.34803519557)*x[0]+(-0.441299088849)*x[1]+(-1.04945951616)*x[2]
-        arg[2,3,1,0]=(0.299011096602)*x[0]+(1.32726458235)*x[1]+(-0.196298687359)*x[2]
-        arg[2,3,1,1]=(1.48698834204)*x[0]+(0.527221496971)*x[1]+(0.0819813519422)*x[2]
-        arg[2,3,2,0]=(0.681680955153)*x[0]+(0.503653972357)*x[1]+(0.434669347891)*x[2]
-        arg[2,3,2,1]=(-0.152586789311)*x[0]+(-0.765242635579)*x[1]+(0.712663994387)*x[2]
-        arg[2,4,0,0]=(0.630152300463)*x[0]+(1.12366733588)*x[1]+(-0.662966700638)*x[2]
-        arg[2,4,0,1]=(1.02796709755)*x[0]+(-0.24093881584)*x[1]+(1.79445417019)*x[2]
-        arg[2,4,1,0]=(-0.954575760758)*x[0]+(0.16331782608)*x[1]+(1.38309921277)*x[2]
-        arg[2,4,1,1]=(0.536092514281)*x[0]+(-0.276364952673)*x[1]+(0.779619701528)*x[2]
-        arg[2,4,2,0]=(0.267270444141)*x[0]+(-0.810746424331)*x[1]+(-0.733877853264)*x[2]
-        arg[2,4,2,1]=(-0.0641688847923)*x[0]+(-0.386279280667)*x[1]+(0.0637571595255)*x[2]
-        arg[3,0,0,0]=(0.469903180687)*x[0]+(-0.793812397342)*x[1]+(1.60841921779)*x[2]
-        arg[3,0,0,1]=(0.720057600102)*x[0]+(0.502582253261)*x[1]+(0.460147791003)*x[2]
-        arg[3,0,1,0]=(0.0327862564137)*x[0]+(-1.142962965)*x[1]+(0.114799131894)*x[2]
-        arg[3,0,1,1]=(-0.997412656978)*x[0]+(-0.678175468576)*x[1]+(-0.152663147682)*x[2]
-        arg[3,0,2,0]=(0.810424599078)*x[0]+(0.75522727786)*x[1]+(-0.205880941501)*x[2]
-        arg[3,0,2,1]=(0.353601949476)*x[0]+(0.0963200813379)*x[1]+(0.0578829287146)*x[2]
-        arg[3,1,0,0]=(0.346590730062)*x[0]+(1.07953790092)*x[1]+(0.647586851217)*x[2]
-        arg[3,1,0,1]=(0.889879195334)*x[0]+(-0.352788186249)*x[1]+(0.434900135803)*x[2]
-        arg[3,1,1,0]=(-0.721742734959)*x[0]+(0.166066672134)*x[1]+(-0.489266924809)*x[2]
-        arg[3,1,1,1]=(-0.810487755181)*x[0]+(0.0354916979253)*x[1]+(0.0735520654395)*x[2]
-        arg[3,1,2,0]=(1.02414338939)*x[0]+(-0.851076284556)*x[1]+(-0.232174494405)*x[2]
-        arg[3,1,2,1]=(-0.327246566026)*x[0]+(-0.0499396023605)*x[1]+(0.611585402379)*x[2]
-        arg[3,2,0,0]=(-0.365757628557)*x[0]+(0.868697342115)*x[1]+(-1.102545972)*x[2]
-        arg[3,2,0,1]=(0.628592129227)*x[0]+(1.25545515311)*x[1]+(-1.0577476264)*x[2]
-        arg[3,2,1,0]=(0.160995978044)*x[0]+(-0.947389499556)*x[1]+(-0.870476160656)*x[2]
-        arg[3,2,1,1]=(0.910787139938)*x[0]+(-0.0681493345139)*x[1]+(-0.561910153781)*x[2]
-        arg[3,2,2,0]=(0.0761644634428)*x[0]+(-0.700940967343)*x[1]+(1.19407210904)*x[2]
-        arg[3,2,2,1]=(1.75717437065)*x[0]+(-0.144457317494)*x[1]+(-0.523233453079)*x[2]
-        arg[3,3,0,0]=(0.448782872606)*x[0]+(0.650464256547)*x[1]+(1.19476547456)*x[2]
-        arg[3,3,0,1]=(0.118586027201)*x[0]+(0.449971816918)*x[1]+(-0.510812733389)*x[2]
-        arg[3,3,1,0]=(-0.330032265081)*x[0]+(-0.13657534891)*x[1]+(0.456365289556)*x[2]
-        arg[3,3,1,1]=(0.697584212635)*x[0]+(0.897604241724)*x[1]+(1.31517116663)*x[2]
-        arg[3,3,2,0]=(-0.940538707365)*x[0]+(-0.334862221665)*x[1]+(0.0969742096754)*x[2]
-        arg[3,3,2,1]=(-0.985788813516)*x[0]+(0.348389725548)*x[1]+(-0.260816590361)*x[2]
-        arg[3,4,0,0]=(0.754692421417)*x[0]+(0.775985781769)*x[1]+(-0.0866159222457)*x[2]
-        arg[3,4,0,1]=(-1.17670502429)*x[0]+(1.12268279393)*x[1]+(-1.1279822095)*x[2]
-        arg[3,4,1,0]=(-1.48674370666)*x[0]+(1.26685445713)*x[1]+(-0.0522828809306)*x[2]
-        arg[3,4,1,1]=(0.401760689843)*x[0]+(-1.35707797971)*x[1]+(-0.0580654273828)*x[2]
-        arg[3,4,2,0]=(-1.40697830852)*x[0]+(0.933923369958)*x[1]+(0.230152169159)*x[2]
-        arg[3,4,2,1]=(-1.21242130555)*x[0]+(0.858316339663)*x[1]+(-0.839747078526)*x[2]
-        ref[0,0,0,0]=(-1.29218217256)*x_ref[0]+(-0.382937892213)*x_ref[1]+(0.14363896447)*x_ref[2]
-        ref[0,0,0,1]=(1.39856942421)*x_ref[0]+(0.302082267835)*x_ref[1]+(-0.40870736584)*x_ref[2]
-        ref[0,0,1,0]=(0.523846108043)*x_ref[0]+(1.19961531204)*x_ref[1]+(0.838881761349)*x_ref[2]
-        ref[0,0,1,1]=(0.634542282764)*x_ref[0]+(-0.475514686466)*x_ref[1]+(-1.68745428486)*x_ref[2]
-        ref[0,0,2,0]=(1.16379585731)*x_ref[0]+(-0.928037595416)*x_ref[1]+(0.998857178353)*x_ref[2]
-        ref[0,0,2,1]=(-0.804515607022)*x_ref[0]+(-0.915469493439)*x_ref[1]+(-0.143888000623)*x_ref[2]
-        ref[0,1,0,0]=(0.925843155486)*x_ref[0]+(-0.168243418953)*x_ref[1]+(-0.887839555187)*x_ref[2]
-        ref[0,1,0,1]=(-0.913103105329)*x_ref[0]+(1.38011681732)*x_ref[1]+(-0.992478793291)*x_ref[2]
-        ref[0,1,1,0]=(0.759685289903)*x_ref[0]+(-0.579481939982)*x_ref[1]+(0.577682929138)*x_ref[2]
-        ref[0,1,1,1]=(0.813155548228)*x_ref[0]+(-0.178317843217)*x_ref[1]+(-0.0460113194526)*x_ref[2]
-        ref[0,1,2,0]=(-0.195764860141)*x_ref[0]+(1.44256979628)*x_ref[1]+(0.283992441343)*x_ref[2]
-        ref[0,1,2,1]=(-0.921229459072)*x_ref[0]+(-1.19295761547)*x_ref[1]+(0.215736801944)*x_ref[2]
-        ref[0,2,0,0]=(-0.741726331752)*x_ref[0]+(-0.225585937382)*x_ref[1]+(1.12654556466)*x_ref[2]
-        ref[0,2,0,1]=(-0.709656162421)*x_ref[0]+(0.298862010425)*x_ref[1]+(-0.502443284827)*x_ref[2]
-        ref[0,2,1,0]=(-1.01166188669)*x_ref[0]+(-1.43763408953)*x_ref[1]+(-0.835160398488)*x_ref[2]
-        ref[0,2,1,1]=(1.80968424545)*x_ref[0]+(-0.802666103495)*x_ref[1]+(0.290283606115)*x_ref[2]
-        ref[0,2,2,0]=(0.346481981585)*x_ref[0]+(-0.444176962215)*x_ref[1]+(0.689127612227)*x_ref[2]
-        ref[0,2,2,1]=(1.06925494095)*x_ref[0]+(0.452854988449)*x_ref[1]+(-1.19974690364)*x_ref[2]
-        ref[0,3,0,0]=(-0.534896036328)*x_ref[0]+(-0.312000770615)*x_ref[1]+(-0.440033746693)*x_ref[2]
-        ref[0,3,0,1]=(0.580351431838)*x_ref[0]+(-0.36623848451)*x_ref[1]+(-0.507837490037)*x_ref[2]
-        ref[0,3,1,0]=(0.383180910522)*x_ref[0]+(-0.0907152443563)*x_ref[1]+(-0.200103743943)*x_ref[2]
-        ref[0,3,1,1]=(0.0160194687513)*x_ref[0]+(0.862509612939)*x_ref[1]+(-1.14643594474)*x_ref[2]
-        ref[0,3,2,0]=(-0.224390850199)*x_ref[0]+(-0.176927715447)*x_ref[1]+(0.213480525831)*x_ref[2]
-        ref[0,3,2,1]=(-0.0508511448148)*x_ref[0]+(-1.28943467389)*x_ref[1]+(0.902285302487)*x_ref[2]
-        ref[0,4,0,0]=(-0.633106625232)*x_ref[0]+(-0.430651917485)*x_ref[1]+(0.583149841952)*x_ref[2]
-        ref[0,4,0,1]=(0.579035528956)*x_ref[0]+(0.159439682519)*x_ref[1]+(-0.0926277063021)*x_ref[2]
-        ref[0,4,1,0]=(0.00484756366973)*x_ref[0]+(0.0324822270755)*x_ref[1]+(1.20052413378)*x_ref[2]
-        ref[0,4,1,1]=(-0.337383994688)*x_ref[0]+(0.902076367981)*x_ref[1]+(-0.1956377395)*x_ref[2]
-        ref[0,4,2,0]=(0.928434343456)*x_ref[0]+(0.0376569884355)*x_ref[1]+(-0.155274118568)*x_ref[2]
-        ref[0,4,2,1]=(-0.541990213238)*x_ref[0]+(-0.0165076697829)*x_ref[1]+(-0.210319224859)*x_ref[2]
-        ref[1,0,0,0]=(-1.67762025181)*x_ref[0]+(1.61434755579)*x_ref[1]+(0.357272049999)*x_ref[2]
-        ref[1,0,0,1]=(-1.62532544549)*x_ref[0]+(-0.271426231027)*x_ref[1]+(0.338680991778)*x_ref[2]
-        ref[1,0,1,0]=(1.73523408033)*x_ref[0]+(1.11987092368)*x_ref[1]+(0.126769364273)*x_ref[2]
-        ref[1,0,1,1]=(-1.49220786558)*x_ref[0]+(1.51915566092)*x_ref[1]+(1.24788192157)*x_ref[2]
-        ref[1,0,2,0]=(-0.687808766765)*x_ref[0]+(-1.02318754737)*x_ref[1]+(0.590653972416)*x_ref[2]
-        ref[1,0,2,1]=(0.756067354802)*x_ref[0]+(-0.66964706965)*x_ref[1]+(-1.18986499158)*x_ref[2]
-        ref[1,1,0,0]=(0.371345732177)*x_ref[0]+(0.212739617115)*x_ref[1]+(-1.13439047405)*x_ref[2]
-        ref[1,1,0,1]=(0.525761804111)*x_ref[0]+(0.144130399691)*x_ref[1]+(0.715517587677)*x_ref[2]
-        ref[1,1,1,0]=(-0.376160293215)*x_ref[0]+(-0.469964935263)*x_ref[1]+(0.413518194707)*x_ref[2]
-        ref[1,1,1,1]=(-0.787748398144)*x_ref[0]+(-0.810090402237)*x_ref[1]+(-0.50127109256)*x_ref[2]
-        ref[1,1,2,0]=(0.654555083692)*x_ref[0]+(-0.142134700515)*x_ref[1]+(-1.55891930521)*x_ref[2]
-        ref[1,1,2,1]=(-0.423058885456)*x_ref[0]+(-0.65930158641)*x_ref[1]+(0.94440057744)*x_ref[2]
-        ref[1,2,0,0]=(-0.924832007053)*x_ref[0]+(1.0154890382)*x_ref[1]+(0.11938079748)*x_ref[2]
-        ref[1,2,0,1]=(0.134642686931)*x_ref[0]+(-1.30908067998)*x_ref[1]+(0.367206139074)*x_ref[2]
-        ref[1,2,1,0]=(1.55524055201)*x_ref[0]+(0.727208660637)*x_ref[1]+(0.809810917377)*x_ref[2]
-        ref[1,2,1,1]=(0.94813391462)*x_ref[0]+(-1.49402524308)*x_ref[1]+(0.367824542434)*x_ref[2]
-        ref[1,2,2,0]=(-0.608295798731)*x_ref[0]+(-0.142302252814)*x_ref[1]+(-0.986529251308)*x_ref[2]
-        ref[1,2,2,1]=(0.0259394619607)*x_ref[0]+(-1.60728202467)*x_ref[1]+(0.312534656619)*x_ref[2]
-        ref[1,3,0,0]=(-1.34063373729)*x_ref[0]+(-0.268499839329)*x_ref[1]+(-0.335125886299)*x_ref[2]
-        ref[1,3,0,1]=(1.53280698072)*x_ref[0]+(1.24369684711)*x_ref[1]+(0.766369156132)*x_ref[2]
-        ref[1,3,1,0]=(0.902067176876)*x_ref[0]+(0.791102994814)*x_ref[1]+(-0.89266430493)*x_ref[2]
-        ref[1,3,1,1]=(0.704997629232)*x_ref[0]+(-0.551611360332)*x_ref[1]+(1.39134537491)*x_ref[2]
-        ref[1,3,2,0]=(-0.151690675211)*x_ref[0]+(-1.01762975893)*x_ref[1]+(-0.627493214284)*x_ref[2]
-        ref[1,3,2,1]=(1.00936645922)*x_ref[0]+(0.0322458997248)*x_ref[1]+(1.45039938194)*x_ref[2]
-        ref[1,4,0,0]=(-0.0916390388904)*x_ref[0]+(-0.783111746469)*x_ref[1]+(0.389725342225)*x_ref[2]
-        ref[1,4,0,1]=(1.18859328243)*x_ref[0]+(0.871689661558)*x_ref[1]+(-0.775464713448)*x_ref[2]
-        ref[1,4,1,0]=(0.913118342488)*x_ref[0]+(1.53285648884)*x_ref[1]+(0.0947365101243)*x_ref[2]
-        ref[1,4,1,1]=(-1.00735841224)*x_ref[0]+(-1.12544193607)*x_ref[1]+(0.267347229372)*x_ref[2]
-        ref[1,4,2,0]=(0.285943438284)*x_ref[0]+(-1.0889389244)*x_ref[1]+(-1.03054842327)*x_ref[2]
-        ref[1,4,2,1]=(-1.5768940139)*x_ref[0]+(0.91237754587)*x_ref[1]+(1.30220394199)*x_ref[2]
-        ref[2,0,0,0]=(-0.0634935883277)*x_ref[0]+(0.157304131712)*x_ref[1]+(-1.2995042074)*x_ref[2]
-        ref[2,0,0,1]=(-0.802705266871)*x_ref[0]+(0.238233162774)*x_ref[1]+(1.29463414013)*x_ref[2]
-        ref[2,0,1,0]=(-0.925468462671)*x_ref[0]+(0.870960795966)*x_ref[1]+(0.156522765713)*x_ref[2]
-        ref[2,0,1,1]=(-0.546666833309)*x_ref[0]+(-1.14649607995)*x_ref[1]+(-1.53906505048)*x_ref[2]
-        ref[2,0,2,0]=(0.464952910857)*x_ref[0]+(0.408605786027)*x_ref[1]+(-0.886974881114)*x_ref[2]
-        ref[2,0,2,1]=(0.491723247948)*x_ref[0]+(0.194616420077)*x_ref[1]+(0.409049782749)*x_ref[2]
-        ref[2,1,0,0]=(-1.19836883114)*x_ref[0]+(1.0622722337)*x_ref[1]+(-0.109193867727)*x_ref[2]
-        ref[2,1,0,1]=(1.01973600383)*x_ref[0]+(-0.154482220539)*x_ref[1]+(0.378696371956)*x_ref[2]
-        ref[2,1,1,0]=(-0.0812015296246)*x_ref[0]+(-1.10252794568)*x_ref[1]+(-0.00585426581857)*x_ref[2]
-        ref[2,1,1,1]=(0.536042665272)*x_ref[0]+(0.685507117255)*x_ref[1]+(-0.179652683139)*x_ref[2]
-        ref[2,1,2,0]=(-0.36750467811)*x_ref[0]+(-1.23674550869)*x_ref[1]+(-0.762905702801)*x_ref[2]
-        ref[2,1,2,1]=(0.329665965651)*x_ref[0]+(0.101195810737)*x_ref[1]+(-0.610015052375)*x_ref[2]
-        ref[2,2,0,0]=(-0.81644635185)*x_ref[0]+(-0.604578476306)*x_ref[1]+(0.0440925706991)*x_ref[2]
-        ref[2,2,0,1]=(-0.958241437971)*x_ref[0]+(0.38563498206)*x_ref[1]+(0.913406762318)*x_ref[2]
-        ref[2,2,1,0]=(1.22027492224)*x_ref[0]+(-1.00726209939)*x_ref[1]+(-1.05083068303)*x_ref[2]
-        ref[2,2,1,1]=(-1.47561192645)*x_ref[0]+(-0.903549355608)*x_ref[1]+(0.236771324671)*x_ref[2]
-        ref[2,2,2,0]=(0.284995864449)*x_ref[0]+(-0.175760829921)*x_ref[1]+(-0.720607220001)*x_ref[2]
-        ref[2,2,2,1]=(-0.535894515963)*x_ref[0]+(-0.821302957162)*x_ref[1]+(-1.75141540241)*x_ref[2]
-        ref[2,3,0,0]=(-0.333082106674)*x_ref[0]+(0.579471826412)*x_ref[1]+(0.561184138108)*x_ref[2]
-        ref[2,3,0,1]=(1.34803519557)*x_ref[0]+(-0.441299088849)*x_ref[1]+(-1.04945951616)*x_ref[2]
-        ref[2,3,1,0]=(0.299011096602)*x_ref[0]+(1.32726458235)*x_ref[1]+(-0.196298687359)*x_ref[2]
-        ref[2,3,1,1]=(1.48698834204)*x_ref[0]+(0.527221496971)*x_ref[1]+(0.0819813519422)*x_ref[2]
-        ref[2,3,2,0]=(0.681680955153)*x_ref[0]+(0.503653972357)*x_ref[1]+(0.434669347891)*x_ref[2]
-        ref[2,3,2,1]=(-0.152586789311)*x_ref[0]+(-0.765242635579)*x_ref[1]+(0.712663994387)*x_ref[2]
-        ref[2,4,0,0]=(0.630152300463)*x_ref[0]+(1.12366733588)*x_ref[1]+(-0.662966700638)*x_ref[2]
-        ref[2,4,0,1]=(1.02796709755)*x_ref[0]+(-0.24093881584)*x_ref[1]+(1.79445417019)*x_ref[2]
-        ref[2,4,1,0]=(-0.954575760758)*x_ref[0]+(0.16331782608)*x_ref[1]+(1.38309921277)*x_ref[2]
-        ref[2,4,1,1]=(0.536092514281)*x_ref[0]+(-0.276364952673)*x_ref[1]+(0.779619701528)*x_ref[2]
-        ref[2,4,2,0]=(0.267270444141)*x_ref[0]+(-0.810746424331)*x_ref[1]+(-0.733877853264)*x_ref[2]
-        ref[2,4,2,1]=(-0.0641688847923)*x_ref[0]+(-0.386279280667)*x_ref[1]+(0.0637571595255)*x_ref[2]
-        ref[3,0,0,0]=(0.469903180687)*x_ref[0]+(-0.793812397342)*x_ref[1]+(1.60841921779)*x_ref[2]
-        ref[3,0,0,1]=(0.720057600102)*x_ref[0]+(0.502582253261)*x_ref[1]+(0.460147791003)*x_ref[2]
-        ref[3,0,1,0]=(0.0327862564137)*x_ref[0]+(-1.142962965)*x_ref[1]+(0.114799131894)*x_ref[2]
-        ref[3,0,1,1]=(-0.997412656978)*x_ref[0]+(-0.678175468576)*x_ref[1]+(-0.152663147682)*x_ref[2]
-        ref[3,0,2,0]=(0.810424599078)*x_ref[0]+(0.75522727786)*x_ref[1]+(-0.205880941501)*x_ref[2]
-        ref[3,0,2,1]=(0.353601949476)*x_ref[0]+(0.0963200813379)*x_ref[1]+(0.0578829287146)*x_ref[2]
-        ref[3,1,0,0]=(0.346590730062)*x_ref[0]+(1.07953790092)*x_ref[1]+(0.647586851217)*x_ref[2]
-        ref[3,1,0,1]=(0.889879195334)*x_ref[0]+(-0.352788186249)*x_ref[1]+(0.434900135803)*x_ref[2]
-        ref[3,1,1,0]=(-0.721742734959)*x_ref[0]+(0.166066672134)*x_ref[1]+(-0.489266924809)*x_ref[2]
-        ref[3,1,1,1]=(-0.810487755181)*x_ref[0]+(0.0354916979253)*x_ref[1]+(0.0735520654395)*x_ref[2]
-        ref[3,1,2,0]=(1.02414338939)*x_ref[0]+(-0.851076284556)*x_ref[1]+(-0.232174494405)*x_ref[2]
-        ref[3,1,2,1]=(-0.327246566026)*x_ref[0]+(-0.0499396023605)*x_ref[1]+(0.611585402379)*x_ref[2]
-        ref[3,2,0,0]=(-0.365757628557)*x_ref[0]+(0.868697342115)*x_ref[1]+(-1.102545972)*x_ref[2]
-        ref[3,2,0,1]=(0.628592129227)*x_ref[0]+(1.25545515311)*x_ref[1]+(-1.0577476264)*x_ref[2]
-        ref[3,2,1,0]=(0.160995978044)*x_ref[0]+(-0.947389499556)*x_ref[1]+(-0.870476160656)*x_ref[2]
-        ref[3,2,1,1]=(0.910787139938)*x_ref[0]+(-0.0681493345139)*x_ref[1]+(-0.561910153781)*x_ref[2]
-        ref[3,2,2,0]=(0.0761644634428)*x_ref[0]+(-0.700940967343)*x_ref[1]+(1.19407210904)*x_ref[2]
-        ref[3,2,2,1]=(1.75717437065)*x_ref[0]+(-0.144457317494)*x_ref[1]+(-0.523233453079)*x_ref[2]
-        ref[3,3,0,0]=(0.448782872606)*x_ref[0]+(0.650464256547)*x_ref[1]+(1.19476547456)*x_ref[2]
-        ref[3,3,0,1]=(0.118586027201)*x_ref[0]+(0.449971816918)*x_ref[1]+(-0.510812733389)*x_ref[2]
-        ref[3,3,1,0]=(-0.330032265081)*x_ref[0]+(-0.13657534891)*x_ref[1]+(0.456365289556)*x_ref[2]
-        ref[3,3,1,1]=(0.697584212635)*x_ref[0]+(0.897604241724)*x_ref[1]+(1.31517116663)*x_ref[2]
-        ref[3,3,2,0]=(-0.940538707365)*x_ref[0]+(-0.334862221665)*x_ref[1]+(0.0969742096754)*x_ref[2]
-        ref[3,3,2,1]=(-0.985788813516)*x_ref[0]+(0.348389725548)*x_ref[1]+(-0.260816590361)*x_ref[2]
-        ref[3,4,0,0]=(0.754692421417)*x_ref[0]+(0.775985781769)*x_ref[1]+(-0.0866159222457)*x_ref[2]
-        ref[3,4,0,1]=(-1.17670502429)*x_ref[0]+(1.12268279393)*x_ref[1]+(-1.1279822095)*x_ref[2]
-        ref[3,4,1,0]=(-1.48674370666)*x_ref[0]+(1.26685445713)*x_ref[1]+(-0.0522828809306)*x_ref[2]
-        ref[3,4,1,1]=(0.401760689843)*x_ref[0]+(-1.35707797971)*x_ref[1]+(-0.0580654273828)*x_ref[2]
-        ref[3,4,2,0]=(-1.40697830852)*x_ref[0]+(0.933923369958)*x_ref[1]+(0.230152169159)*x_ref[2]
-        ref[3,4,2,1]=(-1.21242130555)*x_ref[0]+(0.858316339663)*x_ref[1]+(-0.839747078526)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.485106931655)*x[0]**o+(-0.45911691249)*x[0]+(-0.780654139819)*x[1]**o+(-0.496275334303)*x[1]
-        ref=(-0.485106931655)*x_ref[0]**o+(-0.45911691249)*x_ref[0]+(-0.780654139819)*x_ref[1]**o+(-0.496275334303)*x_ref[1]
-      else:
-        arg=(-0.312233545328)*x[0]**o+(0.386652391857)*x[0]+(0.893938213685)*x[1]**o+(-0.109836308832)*x[1]+(0.293419600866)*x[2]**o+(-0.802363407879)*x[2]
-        ref=(-0.312233545328)*x_ref[0]**o+(0.386652391857)*x_ref[0]+(0.893938213685)*x_ref[1]**o+(-0.109836308832)*x_ref[1]+(0.293419600866)*x_ref[2]**o+(-0.802363407879)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.383147346126)*x[0]**o+(-0.103098043084)*x[0]+(0.389581571033)*x[1]**o+(0.647441523744)*x[1]
-        arg[1]=(-0.0718078186662)*x[0]**o+(-0.975209175853)*x[0]+(-0.62913306056)*x[1]**o+(0.648038487393)*x[1]
-        ref[0]=(0.383147346126)*x_ref[0]**o+(-0.103098043084)*x_ref[0]+(0.389581571033)*x_ref[1]**o+(0.647441523744)*x_ref[1]
-        ref[1]=(-0.0718078186662)*x_ref[0]**o+(-0.975209175853)*x_ref[0]+(-0.62913306056)*x_ref[1]**o+(0.648038487393)*x_ref[1]
-      else:
-        arg[0]=(-0.392958184101)*x[0]**o+(-0.529709692826)*x[0]+(-0.834422900831)*x[1]**o+(0.52562214773)*x[1]+(-0.726762801989)*x[2]**o+(-0.329225625652)*x[2]
-        arg[1]=(-0.388486489727)*x[0]**o+(0.62353995706)*x[0]+(0.0198506797091)*x[1]**o+(0.744336375443)*x[1]+(0.115966573066)*x[2]**o+(-0.195838697299)*x[2]
-        ref[0]=(-0.392958184101)*x_ref[0]**o+(-0.529709692826)*x_ref[0]+(-0.834422900831)*x_ref[1]**o+(0.52562214773)*x_ref[1]+(-0.726762801989)*x_ref[2]**o+(-0.329225625652)*x_ref[2]
-        ref[1]=(-0.388486489727)*x_ref[0]**o+(0.62353995706)*x_ref[0]+(0.0198506797091)*x_ref[1]**o+(0.744336375443)*x_ref[1]+(0.115966573066)*x_ref[2]**o+(-0.195838697299)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.657915437562)*x[0]**o+(-0.545113889022)*x[0]+(0.531900702747)*x[1]**o+(0.593791195717)*x[1]
-        arg[0,1]=(0.051080053648)*x[0]**o+(-0.693135614033)*x[0]+(0.132124625293)*x[1]**o+(0.790120778986)*x[1]
-        arg[0,2]=(-0.474326324304)*x[0]**o+(0.844119715746)*x[0]+(-0.107139623866)*x[1]**o+(0.456623369855)*x[1]
-        arg[0,3]=(-0.582421376463)*x[0]**o+(0.972810074845)*x[0]+(0.875278994526)*x[1]**o+(-0.382656553829)*x[1]
-        arg[0,4]=(-0.904956623057)*x[0]**o+(0.701968065151)*x[0]+(-0.710231782855)*x[1]**o+(-0.123456684979)*x[1]
-        arg[1,0]=(0.361017539866)*x[0]**o+(0.865249575899)*x[0]+(0.529515655309)*x[1]**o+(0.161402780958)*x[1]
-        arg[1,1]=(0.813945406612)*x[0]**o+(0.801153720706)*x[0]+(-0.254227034266)*x[1]**o+(-0.422848409284)*x[1]
-        arg[1,2]=(0.56207473833)*x[0]**o+(-0.831638855484)*x[0]+(-0.584619648965)*x[1]**o+(0.453944553892)*x[1]
-        arg[1,3]=(0.25526821881)*x[0]**o+(-0.436135120045)*x[0]+(0.524842439137)*x[1]**o+(0.568007117728)*x[1]
-        arg[1,4]=(-0.0587551077421)*x[0]**o+(-0.434635762185)*x[0]+(-0.592094375986)*x[1]**o+(0.873123434395)*x[1]
-        arg[2,0]=(0.266819439236)*x[0]**o+(-0.45156140915)*x[0]+(0.436756372775)*x[1]**o+(0.12295128383)*x[1]
-        arg[2,1]=(0.347128677451)*x[0]**o+(-0.0983169467916)*x[0]+(-0.414573209624)*x[1]**o+(-0.171300108487)*x[1]
-        arg[2,2]=(-0.279695154296)*x[0]**o+(-0.911450144779)*x[0]+(0.5055340448)*x[1]**o+(-0.858058864152)*x[1]
-        arg[2,3]=(-0.53768906863)*x[0]**o+(-0.0626923004303)*x[0]+(0.72295545269)*x[1]**o+(-0.77070425804)*x[1]
-        arg[2,4]=(0.18215032008)*x[0]**o+(-0.965014882526)*x[0]+(0.596564813119)*x[1]**o+(0.0817024840554)*x[1]
-        arg[3,0]=(-0.572404596368)*x[0]**o+(0.488365635829)*x[0]+(0.145439800826)*x[1]**o+(-0.337589667899)*x[1]
-        arg[3,1]=(-0.628977426654)*x[0]**o+(0.22731945375)*x[0]+(0.989224773975)*x[1]**o+(0.0691553279499)*x[1]
-        arg[3,2]=(-0.43609079916)*x[0]**o+(0.966113801416)*x[0]+(-0.853136416278)*x[1]**o+(-0.0125151911906)*x[1]
-        arg[3,3]=(0.340159347855)*x[0]**o+(-0.254775013843)*x[0]+(0.795261224144)*x[1]**o+(-0.692255020659)*x[1]
-        arg[3,4]=(-0.153521724504)*x[0]**o+(-0.681779299881)*x[0]+(0.693860779041)*x[1]**o+(0.882012604794)*x[1]
-        ref[0,0]=(-0.657915437562)*x_ref[0]**o+(-0.545113889022)*x_ref[0]+(0.531900702747)*x_ref[1]**o+(0.593791195717)*x_ref[1]
-        ref[0,1]=(0.051080053648)*x_ref[0]**o+(-0.693135614033)*x_ref[0]+(0.132124625293)*x_ref[1]**o+(0.790120778986)*x_ref[1]
-        ref[0,2]=(-0.474326324304)*x_ref[0]**o+(0.844119715746)*x_ref[0]+(-0.107139623866)*x_ref[1]**o+(0.456623369855)*x_ref[1]
-        ref[0,3]=(-0.582421376463)*x_ref[0]**o+(0.972810074845)*x_ref[0]+(0.875278994526)*x_ref[1]**o+(-0.382656553829)*x_ref[1]
-        ref[0,4]=(-0.904956623057)*x_ref[0]**o+(0.701968065151)*x_ref[0]+(-0.710231782855)*x_ref[1]**o+(-0.123456684979)*x_ref[1]
-        ref[1,0]=(0.361017539866)*x_ref[0]**o+(0.865249575899)*x_ref[0]+(0.529515655309)*x_ref[1]**o+(0.161402780958)*x_ref[1]
-        ref[1,1]=(0.813945406612)*x_ref[0]**o+(0.801153720706)*x_ref[0]+(-0.254227034266)*x_ref[1]**o+(-0.422848409284)*x_ref[1]
-        ref[1,2]=(0.56207473833)*x_ref[0]**o+(-0.831638855484)*x_ref[0]+(-0.584619648965)*x_ref[1]**o+(0.453944553892)*x_ref[1]
-        ref[1,3]=(0.25526821881)*x_ref[0]**o+(-0.436135120045)*x_ref[0]+(0.524842439137)*x_ref[1]**o+(0.568007117728)*x_ref[1]
-        ref[1,4]=(-0.0587551077421)*x_ref[0]**o+(-0.434635762185)*x_ref[0]+(-0.592094375986)*x_ref[1]**o+(0.873123434395)*x_ref[1]
-        ref[2,0]=(0.266819439236)*x_ref[0]**o+(-0.45156140915)*x_ref[0]+(0.436756372775)*x_ref[1]**o+(0.12295128383)*x_ref[1]
-        ref[2,1]=(0.347128677451)*x_ref[0]**o+(-0.0983169467916)*x_ref[0]+(-0.414573209624)*x_ref[1]**o+(-0.171300108487)*x_ref[1]
-        ref[2,2]=(-0.279695154296)*x_ref[0]**o+(-0.911450144779)*x_ref[0]+(0.5055340448)*x_ref[1]**o+(-0.858058864152)*x_ref[1]
-        ref[2,3]=(-0.53768906863)*x_ref[0]**o+(-0.0626923004303)*x_ref[0]+(0.72295545269)*x_ref[1]**o+(-0.77070425804)*x_ref[1]
-        ref[2,4]=(0.18215032008)*x_ref[0]**o+(-0.965014882526)*x_ref[0]+(0.596564813119)*x_ref[1]**o+(0.0817024840554)*x_ref[1]
-        ref[3,0]=(-0.572404596368)*x_ref[0]**o+(0.488365635829)*x_ref[0]+(0.145439800826)*x_ref[1]**o+(-0.337589667899)*x_ref[1]
-        ref[3,1]=(-0.628977426654)*x_ref[0]**o+(0.22731945375)*x_ref[0]+(0.989224773975)*x_ref[1]**o+(0.0691553279499)*x_ref[1]
-        ref[3,2]=(-0.43609079916)*x_ref[0]**o+(0.966113801416)*x_ref[0]+(-0.853136416278)*x_ref[1]**o+(-0.0125151911906)*x_ref[1]
-        ref[3,3]=(0.340159347855)*x_ref[0]**o+(-0.254775013843)*x_ref[0]+(0.795261224144)*x_ref[1]**o+(-0.692255020659)*x_ref[1]
-        ref[3,4]=(-0.153521724504)*x_ref[0]**o+(-0.681779299881)*x_ref[0]+(0.693860779041)*x_ref[1]**o+(0.882012604794)*x_ref[1]
-      else:
-        arg[0,0]=(-0.0201751669244)*x[0]**o+(0.337967826628)*x[0]+(0.262482967798)*x[1]**o+(-0.192863458488)*x[1]+(-0.696822606165)*x[2]**o+(-0.476556518002)*x[2]
-        arg[0,1]=(-0.546277895941)*x[0]**o+(-0.118793125394)*x[0]+(0.987786322041)*x[1]**o+(-0.241472898602)*x[1]+(-0.454308453322)*x[2]**o+(-0.27057260464)*x[2]
-        arg[0,2]=(0.383631846628)*x[0]**o+(0.979909217026)*x[0]+(-0.0503694684178)*x[1]**o+(-0.748153155067)*x[1]+(-0.721832849635)*x[2]**o+(0.144937710994)*x[2]
-        arg[0,3]=(-0.540144273345)*x[0]**o+(-0.986853732479)*x[0]+(-0.14527387031)*x[1]**o+(0.329815126012)*x[1]+(0.566431907689)*x[2]**o+(-0.323179211167)*x[2]
-        arg[0,4]=(-0.448624394254)*x[0]**o+(-0.272742080619)*x[0]+(-0.451405020267)*x[1]**o+(0.173204890481)*x[1]+(-0.0122463571841)*x[2]**o+(-0.595932249794)*x[2]
-        arg[1,0]=(0.984160677776)*x[0]**o+(-0.243512460216)*x[0]+(0.82590496761)*x[1]**o+(-0.448270326787)*x[1]+(0.286008153265)*x[2]**o+(0.804229889769)*x[2]
-        arg[1,1]=(0.531762548093)*x[0]**o+(0.211455783615)*x[0]+(0.836058347792)*x[1]**o+(0.806904570574)*x[1]+(-0.052512287992)*x[2]**o+(0.998679219355)*x[2]
-        arg[1,2]=(0.462615968956)*x[0]**o+(0.960862689218)*x[0]+(-0.693932866844)*x[1]**o+(0.881110014782)*x[1]+(0.976329091354)*x[2]**o+(-0.647483316997)*x[2]
-        arg[1,3]=(-0.764181748932)*x[0]**o+(-0.962197871121)*x[0]+(-0.143747029438)*x[1]**o+(0.913962833322)*x[1]+(0.165013597835)*x[2]**o+(0.166877976184)*x[2]
-        arg[1,4]=(0.687688905493)*x[0]**o+(-0.152816071208)*x[0]+(-0.277974702822)*x[1]**o+(-0.389918839086)*x[1]+(0.229658530129)*x[2]**o+(-0.69924627348)*x[2]
-        arg[2,0]=(0.0598215047949)*x[0]**o+(0.592389000293)*x[0]+(0.00886573296364)*x[1]**o+(0.339086619934)*x[1]+(0.476600446349)*x[2]**o+(0.767524427684)*x[2]
-        arg[2,1]=(0.525936212445)*x[0]**o+(0.44607860423)*x[0]+(0.0397184541609)*x[1]**o+(-0.424118244789)*x[1]+(-0.273077104391)*x[2]**o+(0.435027185784)*x[2]
-        arg[2,2]=(0.672992314995)*x[0]**o+(0.993339100191)*x[0]+(0.488983819898)*x[1]**o+(0.568579529177)*x[1]+(-0.321282052211)*x[2]**o+(-0.268847753649)*x[2]
-        arg[2,3]=(-0.0536748741467)*x[0]**o+(-0.195658514433)*x[0]+(-0.931652264383)*x[1]**o+(-0.89957282695)*x[1]+(-0.811088135231)*x[2]**o+(0.0699177832759)*x[2]
-        arg[2,4]=(-0.707875141752)*x[0]**o+(-0.00297935832343)*x[0]+(-0.959580991547)*x[1]**o+(0.0787110832272)*x[1]+(-0.754646316678)*x[2]**o+(-0.432731727467)*x[2]
-        arg[3,0]=(0.728853463111)*x[0]**o+(-0.681375546727)*x[0]+(-0.283722278591)*x[1]**o+(0.950522890527)*x[1]+(0.608194817491)*x[2]**o+(0.571156129477)*x[2]
-        arg[3,1]=(-0.0208969501228)*x[0]**o+(0.572596028151)*x[0]+(0.811179009214)*x[1]**o+(0.519098352581)*x[1]+(0.154527510954)*x[2]**o+(-0.21413742337)*x[2]
-        arg[3,2]=(0.347209642455)*x[0]**o+(-0.114911324326)*x[0]+(-0.104561779357)*x[1]**o+(0.848703366841)*x[1]+(0.680312939858)*x[2]**o+(-0.680566404979)*x[2]
-        arg[3,3]=(0.342687985669)*x[0]**o+(0.443470953221)*x[0]+(-0.849668173915)*x[1]**o+(0.337689225078)*x[1]+(-0.35083505383)*x[2]**o+(-0.284627678739)*x[2]
-        arg[3,4]=(0.661690111131)*x[0]**o+(-0.0918926979359)*x[0]+(-0.587753600932)*x[1]**o+(-0.383115718043)*x[1]+(-0.0696588695623)*x[2]**o+(-0.799630628972)*x[2]
-        ref[0,0]=(-0.0201751669244)*x_ref[0]**o+(0.337967826628)*x_ref[0]+(0.262482967798)*x_ref[1]**o+(-0.192863458488)*x_ref[1]+(-0.696822606165)*x_ref[2]**o+(-0.476556518002)*x_ref[2]
-        ref[0,1]=(-0.546277895941)*x_ref[0]**o+(-0.118793125394)*x_ref[0]+(0.987786322041)*x_ref[1]**o+(-0.241472898602)*x_ref[1]+(-0.454308453322)*x_ref[2]**o+(-0.27057260464)*x_ref[2]
-        ref[0,2]=(0.383631846628)*x_ref[0]**o+(0.979909217026)*x_ref[0]+(-0.0503694684178)*x_ref[1]**o+(-0.748153155067)*x_ref[1]+(-0.721832849635)*x_ref[2]**o+(0.144937710994)*x_ref[2]
-        ref[0,3]=(-0.540144273345)*x_ref[0]**o+(-0.986853732479)*x_ref[0]+(-0.14527387031)*x_ref[1]**o+(0.329815126012)*x_ref[1]+(0.566431907689)*x_ref[2]**o+(-0.323179211167)*x_ref[2]
-        ref[0,4]=(-0.448624394254)*x_ref[0]**o+(-0.272742080619)*x_ref[0]+(-0.451405020267)*x_ref[1]**o+(0.173204890481)*x_ref[1]+(-0.0122463571841)*x_ref[2]**o+(-0.595932249794)*x_ref[2]
-        ref[1,0]=(0.984160677776)*x_ref[0]**o+(-0.243512460216)*x_ref[0]+(0.82590496761)*x_ref[1]**o+(-0.448270326787)*x_ref[1]+(0.286008153265)*x_ref[2]**o+(0.804229889769)*x_ref[2]
-        ref[1,1]=(0.531762548093)*x_ref[0]**o+(0.211455783615)*x_ref[0]+(0.836058347792)*x_ref[1]**o+(0.806904570574)*x_ref[1]+(-0.052512287992)*x_ref[2]**o+(0.998679219355)*x_ref[2]
-        ref[1,2]=(0.462615968956)*x_ref[0]**o+(0.960862689218)*x_ref[0]+(-0.693932866844)*x_ref[1]**o+(0.881110014782)*x_ref[1]+(0.976329091354)*x_ref[2]**o+(-0.647483316997)*x_ref[2]
-        ref[1,3]=(-0.764181748932)*x_ref[0]**o+(-0.962197871121)*x_ref[0]+(-0.143747029438)*x_ref[1]**o+(0.913962833322)*x_ref[1]+(0.165013597835)*x_ref[2]**o+(0.166877976184)*x_ref[2]
-        ref[1,4]=(0.687688905493)*x_ref[0]**o+(-0.152816071208)*x_ref[0]+(-0.277974702822)*x_ref[1]**o+(-0.389918839086)*x_ref[1]+(0.229658530129)*x_ref[2]**o+(-0.69924627348)*x_ref[2]
-        ref[2,0]=(0.0598215047949)*x_ref[0]**o+(0.592389000293)*x_ref[0]+(0.00886573296364)*x_ref[1]**o+(0.339086619934)*x_ref[1]+(0.476600446349)*x_ref[2]**o+(0.767524427684)*x_ref[2]
-        ref[2,1]=(0.525936212445)*x_ref[0]**o+(0.44607860423)*x_ref[0]+(0.0397184541609)*x_ref[1]**o+(-0.424118244789)*x_ref[1]+(-0.273077104391)*x_ref[2]**o+(0.435027185784)*x_ref[2]
-        ref[2,2]=(0.672992314995)*x_ref[0]**o+(0.993339100191)*x_ref[0]+(0.488983819898)*x_ref[1]**o+(0.568579529177)*x_ref[1]+(-0.321282052211)*x_ref[2]**o+(-0.268847753649)*x_ref[2]
-        ref[2,3]=(-0.0536748741467)*x_ref[0]**o+(-0.195658514433)*x_ref[0]+(-0.931652264383)*x_ref[1]**o+(-0.89957282695)*x_ref[1]+(-0.811088135231)*x_ref[2]**o+(0.0699177832759)*x_ref[2]
-        ref[2,4]=(-0.707875141752)*x_ref[0]**o+(-0.00297935832343)*x_ref[0]+(-0.959580991547)*x_ref[1]**o+(0.0787110832272)*x_ref[1]+(-0.754646316678)*x_ref[2]**o+(-0.432731727467)*x_ref[2]
-        ref[3,0]=(0.728853463111)*x_ref[0]**o+(-0.681375546727)*x_ref[0]+(-0.283722278591)*x_ref[1]**o+(0.950522890527)*x_ref[1]+(0.608194817491)*x_ref[2]**o+(0.571156129477)*x_ref[2]
-        ref[3,1]=(-0.0208969501228)*x_ref[0]**o+(0.572596028151)*x_ref[0]+(0.811179009214)*x_ref[1]**o+(0.519098352581)*x_ref[1]+(0.154527510954)*x_ref[2]**o+(-0.21413742337)*x_ref[2]
-        ref[3,2]=(0.347209642455)*x_ref[0]**o+(-0.114911324326)*x_ref[0]+(-0.104561779357)*x_ref[1]**o+(0.848703366841)*x_ref[1]+(0.680312939858)*x_ref[2]**o+(-0.680566404979)*x_ref[2]
-        ref[3,3]=(0.342687985669)*x_ref[0]**o+(0.443470953221)*x_ref[0]+(-0.849668173915)*x_ref[1]**o+(0.337689225078)*x_ref[1]+(-0.35083505383)*x_ref[2]**o+(-0.284627678739)*x_ref[2]
-        ref[3,4]=(0.661690111131)*x_ref[0]**o+(-0.0918926979359)*x_ref[0]+(-0.587753600932)*x_ref[1]**o+(-0.383115718043)*x_ref[1]+(-0.0696588695623)*x_ref[2]**o+(-0.799630628972)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.906705618142)*x[0]**o+(0.458982439103)*x[0]+(0.556464353903)*x[1]**o+(0.733236686234)*x[1]
-        arg[0,0,1]=(-0.192889954523)*x[0]**o+(-0.814332539133)*x[0]+(0.446164214282)*x[1]**o+(0.032291315446)*x[1]
-        arg[0,1,0]=(0.757081929199)*x[0]**o+(-0.3938524931)*x[0]+(-0.458060132115)*x[1]**o+(0.471831491182)*x[1]
-        arg[0,1,1]=(0.459868785407)*x[0]**o+(0.513707183316)*x[0]+(-0.9682413377)*x[1]**o+(-0.49496265187)*x[1]
-        arg[1,0,0]=(0.546655212697)*x[0]**o+(-0.296125788768)*x[0]+(0.570033305927)*x[1]**o+(-0.818919094317)*x[1]
-        arg[1,0,1]=(-0.954422252892)*x[0]**o+(-0.925035286684)*x[0]+(0.171311127546)*x[1]**o+(-0.584606597796)*x[1]
-        arg[1,1,0]=(-0.203956024883)*x[0]**o+(-0.933117428128)*x[0]+(-0.745101180472)*x[1]**o+(0.0390208509919)*x[1]
-        arg[1,1,1]=(-0.67467593628)*x[0]**o+(0.42281003355)*x[0]+(-0.495401176467)*x[1]**o+(0.993257306842)*x[1]
-        arg[2,0,0]=(-0.204011890956)*x[0]**o+(0.730452092671)*x[0]+(-0.0486718200506)*x[1]**o+(0.691928726795)*x[1]
-        arg[2,0,1]=(0.381571380631)*x[0]**o+(0.504896621541)*x[0]+(-0.229805983176)*x[1]**o+(0.281401365705)*x[1]
-        arg[2,1,0]=(0.578852751326)*x[0]**o+(-0.38588684985)*x[0]+(-0.630908284751)*x[1]**o+(0.237972319424)*x[1]
-        arg[2,1,1]=(-0.928366568501)*x[0]**o+(0.254484026833)*x[0]+(0.903931940538)*x[1]**o+(-0.370818194785)*x[1]
-        arg[3,0,0]=(-0.216012465475)*x[0]**o+(-0.938274177001)*x[0]+(0.0674408710328)*x[1]**o+(-0.731594784098)*x[1]
-        arg[3,0,1]=(-0.156790905207)*x[0]**o+(0.284403081253)*x[0]+(0.3754228052)*x[1]**o+(-0.772758808958)*x[1]
-        arg[3,1,0]=(0.89987768188)*x[0]**o+(0.0177886564195)*x[0]+(0.102329016274)*x[1]**o+(0.474039949682)*x[1]
-        arg[3,1,1]=(0.0416243959618)*x[0]**o+(0.739593496294)*x[0]+(-0.0215969068381)*x[1]**o+(0.203954403681)*x[1]
-        arg[4,0,0]=(-0.479380091881)*x[0]**o+(0.973630227471)*x[0]+(0.372617682727)*x[1]**o+(0.721993565094)*x[1]
-        arg[4,0,1]=(0.360211306746)*x[0]**o+(0.260993313325)*x[0]+(0.252635752916)*x[1]**o+(0.534875843061)*x[1]
-        arg[4,1,0]=(-0.609695114069)*x[0]**o+(0.283865161572)*x[0]+(-0.607441168016)*x[1]**o+(-0.838279309054)*x[1]
-        arg[4,1,1]=(0.984921561958)*x[0]**o+(-0.352255390774)*x[0]+(-0.770706841576)*x[1]**o+(0.456415771191)*x[1]
-        arg[5,0,0]=(0.903410389973)*x[0]**o+(0.609651342058)*x[0]+(-0.0890705788805)*x[1]**o+(0.613493629434)*x[1]
-        arg[5,0,1]=(-0.977979577058)*x[0]**o+(-0.121665631763)*x[0]+(0.466897174395)*x[1]**o+(-0.438819940752)*x[1]
-        arg[5,1,0]=(-0.537313389905)*x[0]**o+(-0.0401503571218)*x[0]+(-0.454563705252)*x[1]**o+(-0.728276295145)*x[1]
-        arg[5,1,1]=(0.858855332454)*x[0]**o+(0.378938106473)*x[0]+(0.908957690039)*x[1]**o+(0.989040980713)*x[1]
-        ref[0,0,0]=(-0.906705618142)*x_ref[0]**o+(0.458982439103)*x_ref[0]+(0.556464353903)*x_ref[1]**o+(0.733236686234)*x_ref[1]
-        ref[0,0,1]=(-0.192889954523)*x_ref[0]**o+(-0.814332539133)*x_ref[0]+(0.446164214282)*x_ref[1]**o+(0.032291315446)*x_ref[1]
-        ref[0,1,0]=(0.757081929199)*x_ref[0]**o+(-0.3938524931)*x_ref[0]+(-0.458060132115)*x_ref[1]**o+(0.471831491182)*x_ref[1]
-        ref[0,1,1]=(0.459868785407)*x_ref[0]**o+(0.513707183316)*x_ref[0]+(-0.9682413377)*x_ref[1]**o+(-0.49496265187)*x_ref[1]
-        ref[1,0,0]=(0.546655212697)*x_ref[0]**o+(-0.296125788768)*x_ref[0]+(0.570033305927)*x_ref[1]**o+(-0.818919094317)*x_ref[1]
-        ref[1,0,1]=(-0.954422252892)*x_ref[0]**o+(-0.925035286684)*x_ref[0]+(0.171311127546)*x_ref[1]**o+(-0.584606597796)*x_ref[1]
-        ref[1,1,0]=(-0.203956024883)*x_ref[0]**o+(-0.933117428128)*x_ref[0]+(-0.745101180472)*x_ref[1]**o+(0.0390208509919)*x_ref[1]
-        ref[1,1,1]=(-0.67467593628)*x_ref[0]**o+(0.42281003355)*x_ref[0]+(-0.495401176467)*x_ref[1]**o+(0.993257306842)*x_ref[1]
-        ref[2,0,0]=(-0.204011890956)*x_ref[0]**o+(0.730452092671)*x_ref[0]+(-0.0486718200506)*x_ref[1]**o+(0.691928726795)*x_ref[1]
-        ref[2,0,1]=(0.381571380631)*x_ref[0]**o+(0.504896621541)*x_ref[0]+(-0.229805983176)*x_ref[1]**o+(0.281401365705)*x_ref[1]
-        ref[2,1,0]=(0.578852751326)*x_ref[0]**o+(-0.38588684985)*x_ref[0]+(-0.630908284751)*x_ref[1]**o+(0.237972319424)*x_ref[1]
-        ref[2,1,1]=(-0.928366568501)*x_ref[0]**o+(0.254484026833)*x_ref[0]+(0.903931940538)*x_ref[1]**o+(-0.370818194785)*x_ref[1]
-        ref[3,0,0]=(-0.216012465475)*x_ref[0]**o+(-0.938274177001)*x_ref[0]+(0.0674408710328)*x_ref[1]**o+(-0.731594784098)*x_ref[1]
-        ref[3,0,1]=(-0.156790905207)*x_ref[0]**o+(0.284403081253)*x_ref[0]+(0.3754228052)*x_ref[1]**o+(-0.772758808958)*x_ref[1]
-        ref[3,1,0]=(0.89987768188)*x_ref[0]**o+(0.0177886564195)*x_ref[0]+(0.102329016274)*x_ref[1]**o+(0.474039949682)*x_ref[1]
-        ref[3,1,1]=(0.0416243959618)*x_ref[0]**o+(0.739593496294)*x_ref[0]+(-0.0215969068381)*x_ref[1]**o+(0.203954403681)*x_ref[1]
-        ref[4,0,0]=(-0.479380091881)*x_ref[0]**o+(0.973630227471)*x_ref[0]+(0.372617682727)*x_ref[1]**o+(0.721993565094)*x_ref[1]
-        ref[4,0,1]=(0.360211306746)*x_ref[0]**o+(0.260993313325)*x_ref[0]+(0.252635752916)*x_ref[1]**o+(0.534875843061)*x_ref[1]
-        ref[4,1,0]=(-0.609695114069)*x_ref[0]**o+(0.283865161572)*x_ref[0]+(-0.607441168016)*x_ref[1]**o+(-0.838279309054)*x_ref[1]
-        ref[4,1,1]=(0.984921561958)*x_ref[0]**o+(-0.352255390774)*x_ref[0]+(-0.770706841576)*x_ref[1]**o+(0.456415771191)*x_ref[1]
-        ref[5,0,0]=(0.903410389973)*x_ref[0]**o+(0.609651342058)*x_ref[0]+(-0.0890705788805)*x_ref[1]**o+(0.613493629434)*x_ref[1]
-        ref[5,0,1]=(-0.977979577058)*x_ref[0]**o+(-0.121665631763)*x_ref[0]+(0.466897174395)*x_ref[1]**o+(-0.438819940752)*x_ref[1]
-        ref[5,1,0]=(-0.537313389905)*x_ref[0]**o+(-0.0401503571218)*x_ref[0]+(-0.454563705252)*x_ref[1]**o+(-0.728276295145)*x_ref[1]
-        ref[5,1,1]=(0.858855332454)*x_ref[0]**o+(0.378938106473)*x_ref[0]+(0.908957690039)*x_ref[1]**o+(0.989040980713)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.550852990025)*x[0]**o+(0.578705971531)*x[0]+(0.9533401901)*x[1]**o+(0.233181910221)*x[1]+(-0.143544272432)*x[2]**o+(-0.986513253736)*x[2]
-        arg[0,0,1]=(-0.326417636931)*x[0]**o+(0.0910236969351)*x[0]+(-0.8240642668)*x[1]**o+(-0.242359389714)*x[1]+(0.266813299647)*x[2]**o+(-0.364956839435)*x[2]
-        arg[0,1,0]=(-0.777107068999)*x[0]**o+(0.201120303703)*x[0]+(-0.684906707463)*x[1]**o+(-0.9620762843)*x[1]+(-0.314789913974)*x[2]**o+(-0.70682592319)*x[2]
-        arg[0,1,1]=(-0.980292769796)*x[0]**o+(-0.827763529178)*x[0]+(0.256770279946)*x[1]**o+(0.619665292369)*x[1]+(0.014752087873)*x[2]**o+(-0.810044916486)*x[2]
-        arg[1,0,0]=(-0.51164541516)*x[0]**o+(-0.429646605692)*x[0]+(-0.844516540906)*x[1]**o+(-0.0334629941654)*x[1]+(0.942164301071)*x[2]**o+(0.129008643344)*x[2]
-        arg[1,0,1]=(-0.545329352463)*x[0]**o+(-0.0601985885543)*x[0]+(0.959752895562)*x[1]**o+(-0.617790988468)*x[1]+(-0.352323774737)*x[2]**o+(0.0854549755648)*x[2]
-        arg[1,1,0]=(0.163270290732)*x[0]**o+(0.715418689409)*x[0]+(-0.892736094727)*x[1]**o+(-0.250085969902)*x[1]+(-0.323686607391)*x[2]**o+(-0.808822044566)*x[2]
-        arg[1,1,1]=(-0.582858228848)*x[0]**o+(0.245356494646)*x[0]+(0.253867860186)*x[1]**o+(0.294533212339)*x[1]+(0.802766375942)*x[2]**o+(-0.142246487978)*x[2]
-        arg[2,0,0]=(0.559682931749)*x[0]**o+(0.349781768104)*x[0]+(-0.903942828138)*x[1]**o+(0.285790428402)*x[1]+(0.334765408827)*x[2]**o+(-0.319553167552)*x[2]
-        arg[2,0,1]=(-0.33958138616)*x[0]**o+(-0.476356251551)*x[0]+(0.222685919591)*x[1]**o+(0.947677379274)*x[1]+(-0.238198083505)*x[2]**o+(-0.158835521934)*x[2]
-        arg[2,1,0]=(0.233005925554)*x[0]**o+(-0.0885827512025)*x[0]+(0.99298235997)*x[1]**o+(-0.972864413346)*x[1]+(-0.328337965331)*x[2]**o+(0.548449226427)*x[2]
-        arg[2,1,1]=(-0.682434615287)*x[0]**o+(-0.681560497743)*x[0]+(-0.0427998840708)*x[1]**o+(-0.640532507401)*x[1]+(0.0600572641903)*x[2]**o+(0.580127097835)*x[2]
-        arg[3,0,0]=(0.627556962303)*x[0]**o+(-0.2282646452)*x[0]+(0.201159933134)*x[1]**o+(-0.0874921144181)*x[1]+(0.487026890349)*x[2]**o+(-0.044256665504)*x[2]
-        arg[3,0,1]=(-0.202969525043)*x[0]**o+(0.0445621391034)*x[0]+(-0.763479658456)*x[1]**o+(-0.600818445386)*x[1]+(-0.442800171339)*x[2]**o+(0.0422443400421)*x[2]
-        arg[3,1,0]=(-0.422348404642)*x[0]**o+(0.723277196982)*x[0]+(0.882658191301)*x[1]**o+(-0.415218341669)*x[1]+(0.834911332561)*x[2]**o+(-0.843638850779)*x[2]
-        arg[3,1,1]=(-0.685037113836)*x[0]**o+(0.119526696821)*x[0]+(0.732784440424)*x[1]**o+(0.156993935952)*x[1]+(-0.565837827825)*x[2]**o+(0.667635603478)*x[2]
-        arg[4,0,0]=(-0.18210082527)*x[0]**o+(-0.00639006601355)*x[0]+(0.633771301081)*x[1]**o+(0.765450011643)*x[1]+(-0.323701472535)*x[2]**o+(0.841246809469)*x[2]
-        arg[4,0,1]=(0.345847635107)*x[0]**o+(0.910917657816)*x[0]+(0.329667803527)*x[1]**o+(-0.0638797846725)*x[1]+(-0.705758696202)*x[2]**o+(0.39567870447)*x[2]
-        arg[4,1,0]=(0.700805557734)*x[0]**o+(0.215376719066)*x[0]+(0.057212023986)*x[1]**o+(-0.601972647211)*x[1]+(-0.0163323501628)*x[2]**o+(-0.182314452762)*x[2]
-        arg[4,1,1]=(-0.25633784052)*x[0]**o+(-0.36128209808)*x[0]+(-0.580660119759)*x[1]**o+(-0.718361413439)*x[1]+(0.294752937469)*x[2]**o+(0.479425008353)*x[2]
-        arg[5,0,0]=(0.0250768411622)*x[0]**o+(-0.954437161073)*x[0]+(0.314623130846)*x[1]**o+(-0.915911802082)*x[1]+(-0.293481557155)*x[2]**o+(0.193040417512)*x[2]
-        arg[5,0,1]=(-0.260552760825)*x[0]**o+(-0.993318746791)*x[0]+(-0.0888187740235)*x[1]**o+(0.228899511722)*x[1]+(0.667467747688)*x[2]**o+(0.210051895803)*x[2]
-        arg[5,1,0]=(-0.925551425372)*x[0]**o+(-0.051063099903)*x[0]+(0.0607054862843)*x[1]**o+(0.778043999849)*x[1]+(-0.393429559505)*x[2]**o+(0.235480458425)*x[2]
-        arg[5,1,1]=(0.00188621198193)*x[0]**o+(-0.529444982511)*x[0]+(0.766032106394)*x[1]**o+(-0.554844276584)*x[1]+(0.793956883291)*x[2]**o+(0.221253426455)*x[2]
-        ref[0,0,0]=(-0.550852990025)*x_ref[0]**o+(0.578705971531)*x_ref[0]+(0.9533401901)*x_ref[1]**o+(0.233181910221)*x_ref[1]+(-0.143544272432)*x_ref[2]**o+(-0.986513253736)*x_ref[2]
-        ref[0,0,1]=(-0.326417636931)*x_ref[0]**o+(0.0910236969351)*x_ref[0]+(-0.8240642668)*x_ref[1]**o+(-0.242359389714)*x_ref[1]+(0.266813299647)*x_ref[2]**o+(-0.364956839435)*x_ref[2]
-        ref[0,1,0]=(-0.777107068999)*x_ref[0]**o+(0.201120303703)*x_ref[0]+(-0.684906707463)*x_ref[1]**o+(-0.9620762843)*x_ref[1]+(-0.314789913974)*x_ref[2]**o+(-0.70682592319)*x_ref[2]
-        ref[0,1,1]=(-0.980292769796)*x_ref[0]**o+(-0.827763529178)*x_ref[0]+(0.256770279946)*x_ref[1]**o+(0.619665292369)*x_ref[1]+(0.014752087873)*x_ref[2]**o+(-0.810044916486)*x_ref[2]
-        ref[1,0,0]=(-0.51164541516)*x_ref[0]**o+(-0.429646605692)*x_ref[0]+(-0.844516540906)*x_ref[1]**o+(-0.0334629941654)*x_ref[1]+(0.942164301071)*x_ref[2]**o+(0.129008643344)*x_ref[2]
-        ref[1,0,1]=(-0.545329352463)*x_ref[0]**o+(-0.0601985885543)*x_ref[0]+(0.959752895562)*x_ref[1]**o+(-0.617790988468)*x_ref[1]+(-0.352323774737)*x_ref[2]**o+(0.0854549755648)*x_ref[2]
-        ref[1,1,0]=(0.163270290732)*x_ref[0]**o+(0.715418689409)*x_ref[0]+(-0.892736094727)*x_ref[1]**o+(-0.250085969902)*x_ref[1]+(-0.323686607391)*x_ref[2]**o+(-0.808822044566)*x_ref[2]
-        ref[1,1,1]=(-0.582858228848)*x_ref[0]**o+(0.245356494646)*x_ref[0]+(0.253867860186)*x_ref[1]**o+(0.294533212339)*x_ref[1]+(0.802766375942)*x_ref[2]**o+(-0.142246487978)*x_ref[2]
-        ref[2,0,0]=(0.559682931749)*x_ref[0]**o+(0.349781768104)*x_ref[0]+(-0.903942828138)*x_ref[1]**o+(0.285790428402)*x_ref[1]+(0.334765408827)*x_ref[2]**o+(-0.319553167552)*x_ref[2]
-        ref[2,0,1]=(-0.33958138616)*x_ref[0]**o+(-0.476356251551)*x_ref[0]+(0.222685919591)*x_ref[1]**o+(0.947677379274)*x_ref[1]+(-0.238198083505)*x_ref[2]**o+(-0.158835521934)*x_ref[2]
-        ref[2,1,0]=(0.233005925554)*x_ref[0]**o+(-0.0885827512025)*x_ref[0]+(0.99298235997)*x_ref[1]**o+(-0.972864413346)*x_ref[1]+(-0.328337965331)*x_ref[2]**o+(0.548449226427)*x_ref[2]
-        ref[2,1,1]=(-0.682434615287)*x_ref[0]**o+(-0.681560497743)*x_ref[0]+(-0.0427998840708)*x_ref[1]**o+(-0.640532507401)*x_ref[1]+(0.0600572641903)*x_ref[2]**o+(0.580127097835)*x_ref[2]
-        ref[3,0,0]=(0.627556962303)*x_ref[0]**o+(-0.2282646452)*x_ref[0]+(0.201159933134)*x_ref[1]**o+(-0.0874921144181)*x_ref[1]+(0.487026890349)*x_ref[2]**o+(-0.044256665504)*x_ref[2]
-        ref[3,0,1]=(-0.202969525043)*x_ref[0]**o+(0.0445621391034)*x_ref[0]+(-0.763479658456)*x_ref[1]**o+(-0.600818445386)*x_ref[1]+(-0.442800171339)*x_ref[2]**o+(0.0422443400421)*x_ref[2]
-        ref[3,1,0]=(-0.422348404642)*x_ref[0]**o+(0.723277196982)*x_ref[0]+(0.882658191301)*x_ref[1]**o+(-0.415218341669)*x_ref[1]+(0.834911332561)*x_ref[2]**o+(-0.843638850779)*x_ref[2]
-        ref[3,1,1]=(-0.685037113836)*x_ref[0]**o+(0.119526696821)*x_ref[0]+(0.732784440424)*x_ref[1]**o+(0.156993935952)*x_ref[1]+(-0.565837827825)*x_ref[2]**o+(0.667635603478)*x_ref[2]
-        ref[4,0,0]=(-0.18210082527)*x_ref[0]**o+(-0.00639006601355)*x_ref[0]+(0.633771301081)*x_ref[1]**o+(0.765450011643)*x_ref[1]+(-0.323701472535)*x_ref[2]**o+(0.841246809469)*x_ref[2]
-        ref[4,0,1]=(0.345847635107)*x_ref[0]**o+(0.910917657816)*x_ref[0]+(0.329667803527)*x_ref[1]**o+(-0.0638797846725)*x_ref[1]+(-0.705758696202)*x_ref[2]**o+(0.39567870447)*x_ref[2]
-        ref[4,1,0]=(0.700805557734)*x_ref[0]**o+(0.215376719066)*x_ref[0]+(0.057212023986)*x_ref[1]**o+(-0.601972647211)*x_ref[1]+(-0.0163323501628)*x_ref[2]**o+(-0.182314452762)*x_ref[2]
-        ref[4,1,1]=(-0.25633784052)*x_ref[0]**o+(-0.36128209808)*x_ref[0]+(-0.580660119759)*x_ref[1]**o+(-0.718361413439)*x_ref[1]+(0.294752937469)*x_ref[2]**o+(0.479425008353)*x_ref[2]
-        ref[5,0,0]=(0.0250768411622)*x_ref[0]**o+(-0.954437161073)*x_ref[0]+(0.314623130846)*x_ref[1]**o+(-0.915911802082)*x_ref[1]+(-0.293481557155)*x_ref[2]**o+(0.193040417512)*x_ref[2]
-        ref[5,0,1]=(-0.260552760825)*x_ref[0]**o+(-0.993318746791)*x_ref[0]+(-0.0888187740235)*x_ref[1]**o+(0.228899511722)*x_ref[1]+(0.667467747688)*x_ref[2]**o+(0.210051895803)*x_ref[2]
-        ref[5,1,0]=(-0.925551425372)*x_ref[0]**o+(-0.051063099903)*x_ref[0]+(0.0607054862843)*x_ref[1]**o+(0.778043999849)*x_ref[1]+(-0.393429559505)*x_ref[2]**o+(0.235480458425)*x_ref[2]
-        ref[5,1,1]=(0.00188621198193)*x_ref[0]**o+(-0.529444982511)*x_ref[0]+(0.766032106394)*x_ref[1]**o+(-0.554844276584)*x_ref[1]+(0.793956883291)*x_ref[2]**o+(0.221253426455)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.358768976574)*x[0]**o+(-0.231637053165)*x[0]+(0.798891506345)*x[1]**o+(0.292325388353)*x[1]
-        arg[0,0,0,1]=(0.53301689922)*x[0]**o+(-0.761786870664)*x[0]+(0.284067900826)*x[1]**o+(-0.688662082205)*x[1]
-        arg[0,0,1,0]=(-0.721988036113)*x[0]**o+(-0.743892757815)*x[0]+(-0.796787022375)*x[1]**o+(-0.499468412523)*x[1]
-        arg[0,0,1,1]=(0.0710691488306)*x[0]**o+(0.0210385141456)*x[0]+(-0.709342417683)*x[1]**o+(0.901794071115)*x[1]
-        arg[0,0,2,0]=(-0.800537263339)*x[0]**o+(0.583114786539)*x[0]+(0.422752622522)*x[1]**o+(-0.0954981460748)*x[1]
-        arg[0,0,2,1]=(-0.0805357065445)*x[0]**o+(0.476377895547)*x[0]+(0.242203912566)*x[1]**o+(-0.479971540043)*x[1]
-        arg[0,1,0,0]=(-0.476356823162)*x[0]**o+(-0.438853622252)*x[0]+(-0.937228141746)*x[1]**o+(0.366496742588)*x[1]
-        arg[0,1,0,1]=(-0.496918253956)*x[0]**o+(-0.0227549061268)*x[0]+(0.830195584768)*x[1]**o+(-0.114624902423)*x[1]
-        arg[0,1,1,0]=(0.431291036997)*x[0]**o+(0.807713720258)*x[0]+(0.730057543333)*x[1]**o+(0.635171725232)*x[1]
-        arg[0,1,1,1]=(0.784425995411)*x[0]**o+(-0.397510494899)*x[0]+(-0.579911740115)*x[1]**o+(0.130426014607)*x[1]
-        arg[0,1,2,0]=(0.473613650641)*x[0]**o+(-0.155617741177)*x[0]+(0.873237852103)*x[1]**o+(-0.749395152414)*x[1]
-        arg[0,1,2,1]=(0.367649559431)*x[0]**o+(0.830181309644)*x[0]+(0.87726968147)*x[1]**o+(-0.450304793682)*x[1]
-        arg[0,2,0,0]=(-0.700522876654)*x[0]**o+(-0.998187126003)*x[0]+(0.732491610173)*x[1]**o+(0.648679267)*x[1]
-        arg[0,2,0,1]=(0.499746141285)*x[0]**o+(-0.730090975806)*x[0]+(-0.525566438654)*x[1]**o+(0.212469850421)*x[1]
-        arg[0,2,1,0]=(-0.847752916298)*x[0]**o+(0.43510472619)*x[0]+(0.815305936548)*x[1]**o+(-0.143802676552)*x[1]
-        arg[0,2,1,1]=(-0.453572376958)*x[0]**o+(-0.913023531929)*x[0]+(0.743328127665)*x[1]**o+(0.152586122591)*x[1]
-        arg[0,2,2,0]=(0.526939334508)*x[0]**o+(0.247268722057)*x[0]+(-0.176432621481)*x[1]**o+(-0.510110202196)*x[1]
-        arg[0,2,2,1]=(0.139685732003)*x[0]**o+(0.278304455867)*x[0]+(0.517953769616)*x[1]**o+(-0.272384261701)*x[1]
-        arg[0,3,0,0]=(-0.38867907688)*x[0]**o+(-0.73043975055)*x[0]+(-0.14293243901)*x[1]**o+(0.0601042854043)*x[1]
-        arg[0,3,0,1]=(-0.163055949188)*x[0]**o+(-0.035877062482)*x[0]+(0.0396615423106)*x[1]**o+(-0.870062303275)*x[1]
-        arg[0,3,1,0]=(0.283839779914)*x[0]**o+(-0.519316925197)*x[0]+(-0.437401973959)*x[1]**o+(-0.823707232663)*x[1]
-        arg[0,3,1,1]=(0.700305425892)*x[0]**o+(0.0299761521094)*x[0]+(-0.993032151025)*x[1]**o+(0.633293413221)*x[1]
-        arg[0,3,2,0]=(-0.745357256365)*x[0]**o+(-0.451553456961)*x[0]+(0.05789646302)*x[1]**o+(-0.755901155251)*x[1]
-        arg[0,3,2,1]=(-0.57330840403)*x[0]**o+(-0.589361483751)*x[0]+(-0.038677123513)*x[1]**o+(0.417332032168)*x[1]
-        arg[0,4,0,0]=(0.759655161531)*x[0]**o+(0.737483461328)*x[0]+(0.573158629937)*x[1]**o+(-0.454191109106)*x[1]
-        arg[0,4,0,1]=(-0.232982406645)*x[0]**o+(-0.926030038179)*x[0]+(-0.504256834465)*x[1]**o+(-0.107703527058)*x[1]
-        arg[0,4,1,0]=(0.898411697016)*x[0]**o+(0.642045536742)*x[0]+(-0.953059791895)*x[1]**o+(-0.67501710093)*x[1]
-        arg[0,4,1,1]=(0.300380574165)*x[0]**o+(0.204591960115)*x[0]+(-0.308849697562)*x[1]**o+(-0.489495887357)*x[1]
-        arg[0,4,2,0]=(-0.814560286716)*x[0]**o+(0.154235599953)*x[0]+(0.279329273498)*x[1]**o+(-0.674063978926)*x[1]
-        arg[0,4,2,1]=(-0.718018870365)*x[0]**o+(-0.735982858424)*x[0]+(-0.0132197132926)*x[1]**o+(0.398939587543)*x[1]
-        arg[1,0,0,0]=(0.0559995351725)*x[0]**o+(-0.164549619892)*x[0]+(-0.794242529408)*x[1]**o+(0.0927822314785)*x[1]
-        arg[1,0,0,1]=(-0.894238542341)*x[0]**o+(0.378559247473)*x[0]+(-0.183957272639)*x[1]**o+(0.486358968942)*x[1]
-        arg[1,0,1,0]=(0.931288801001)*x[0]**o+(0.223815769968)*x[0]+(-0.719591906328)*x[1]**o+(-0.743644741105)*x[1]
-        arg[1,0,1,1]=(0.156646029123)*x[0]**o+(0.306942879419)*x[0]+(0.747006830674)*x[1]**o+(-0.876534912274)*x[1]
-        arg[1,0,2,0]=(-0.496819081999)*x[0]**o+(-0.939227402425)*x[0]+(0.0566331712182)*x[1]**o+(0.565724364661)*x[1]
-        arg[1,0,2,1]=(0.903706429954)*x[0]**o+(0.667947320307)*x[0]+(0.97140855373)*x[1]**o+(0.924095235752)*x[1]
-        arg[1,1,0,0]=(0.526180197299)*x[0]**o+(0.435493351674)*x[0]+(0.400107077848)*x[1]**o+(-0.704760833758)*x[1]
-        arg[1,1,0,1]=(0.0723740015004)*x[0]**o+(-0.405859051371)*x[0]+(0.200787757511)*x[1]**o+(0.41819184563)*x[1]
-        arg[1,1,1,0]=(-0.0320951655627)*x[0]**o+(0.235068445821)*x[0]+(0.450383349599)*x[1]**o+(-0.801487424765)*x[1]
-        arg[1,1,1,1]=(-0.52478892744)*x[0]**o+(-0.449111297125)*x[0]+(0.731062182014)*x[1]**o+(0.533619608577)*x[1]
-        arg[1,1,2,0]=(0.0889794057057)*x[0]**o+(-0.971856981571)*x[0]+(0.662216408922)*x[1]**o+(0.164089024468)*x[1]
-        arg[1,1,2,1]=(-0.196374963647)*x[0]**o+(-0.739360211802)*x[0]+(0.916611650753)*x[1]**o+(-0.260102318115)*x[1]
-        arg[1,2,0,0]=(0.627763572103)*x[0]**o+(-0.893900847319)*x[0]+(0.907548446417)*x[1]**o+(0.0687906203663)*x[1]
-        arg[1,2,0,1]=(0.59755498682)*x[0]**o+(-0.457108009787)*x[0]+(0.71562139654)*x[1]**o+(-0.300872832559)*x[1]
-        arg[1,2,1,0]=(-0.479641829834)*x[0]**o+(0.297188513722)*x[0]+(0.0227730978493)*x[1]**o+(0.199329665406)*x[1]
-        arg[1,2,1,1]=(0.918974940101)*x[0]**o+(0.595194981816)*x[0]+(0.760030152554)*x[1]**o+(-0.798899878486)*x[1]
-        arg[1,2,2,0]=(-0.878334511842)*x[0]**o+(0.910857236287)*x[0]+(0.0164747567997)*x[1]**o+(-0.876970888445)*x[1]
-        arg[1,2,2,1]=(0.29445809181)*x[0]**o+(0.837849454931)*x[0]+(0.0759054371211)*x[1]**o+(0.501243080372)*x[1]
-        arg[1,3,0,0]=(-0.529006436258)*x[0]**o+(-0.932325855538)*x[0]+(-0.561472972374)*x[1]**o+(0.845125736656)*x[1]
-        arg[1,3,0,1]=(-0.843008257488)*x[0]**o+(0.614118623012)*x[0]+(-0.167015137447)*x[1]**o+(0.158701952625)*x[1]
-        arg[1,3,1,0]=(-0.662966916148)*x[0]**o+(-0.443297576512)*x[0]+(0.295988608077)*x[1]**o+(0.059506908615)*x[1]
-        arg[1,3,1,1]=(0.864199978014)*x[0]**o+(0.138723519602)*x[0]+(0.144964839302)*x[1]**o+(0.239863709389)*x[1]
-        arg[1,3,2,0]=(0.479006097431)*x[0]**o+(0.542168797821)*x[0]+(0.561074562163)*x[1]**o+(-0.133365787275)*x[1]
-        arg[1,3,2,1]=(-0.901033449452)*x[0]**o+(-0.620245150074)*x[0]+(0.598461569697)*x[1]**o+(-0.2213246854)*x[1]
-        arg[1,4,0,0]=(-0.577067401348)*x[0]**o+(0.486154324874)*x[0]+(0.809205150442)*x[1]**o+(-0.218206418459)*x[1]
-        arg[1,4,0,1]=(0.726556862066)*x[0]**o+(0.0293695509867)*x[0]+(0.601938348193)*x[1]**o+(0.967332697531)*x[1]
-        arg[1,4,1,0]=(-0.675624388054)*x[0]**o+(-0.871613723214)*x[0]+(0.605519387693)*x[1]**o+(0.287186894411)*x[1]
-        arg[1,4,1,1]=(-0.689904898214)*x[0]**o+(-0.918236705665)*x[0]+(-0.892168622177)*x[1]**o+(0.507441662612)*x[1]
-        arg[1,4,2,0]=(0.845768980712)*x[0]**o+(-0.458467508114)*x[0]+(-0.518185249391)*x[1]**o+(0.829945330327)*x[1]
-        arg[1,4,2,1]=(0.776852312178)*x[0]**o+(-0.268810999469)*x[0]+(-0.576757148841)*x[1]**o+(-0.50628294802)*x[1]
-        arg[2,0,0,0]=(-0.686840219939)*x[0]**o+(0.6861172847)*x[0]+(0.240362263052)*x[1]**o+(0.962361523884)*x[1]
-        arg[2,0,0,1]=(-0.943837188119)*x[0]**o+(0.829832768268)*x[0]+(0.377590124133)*x[1]**o+(-0.171714144962)*x[1]
-        arg[2,0,1,0]=(0.862809148447)*x[0]**o+(0.0573402136489)*x[0]+(-0.743311826013)*x[1]**o+(0.427809313437)*x[1]
-        arg[2,0,1,1]=(0.377380819576)*x[0]**o+(-0.223280285041)*x[0]+(0.178628658562)*x[1]**o+(0.121964611877)*x[1]
-        arg[2,0,2,0]=(0.41723758689)*x[0]**o+(0.256039203883)*x[0]+(0.255358776676)*x[1]**o+(-0.881665964974)*x[1]
-        arg[2,0,2,1]=(-0.0797103024499)*x[0]**o+(0.128068931414)*x[0]+(-0.758317834409)*x[1]**o+(0.654657809183)*x[1]
-        arg[2,1,0,0]=(0.603648218133)*x[0]**o+(-0.286780270729)*x[0]+(-0.341108067214)*x[1]**o+(-0.769667356087)*x[1]
-        arg[2,1,0,1]=(0.844044270035)*x[0]**o+(0.0585907857764)*x[0]+(-0.578232785252)*x[1]**o+(-0.40959017859)*x[1]
-        arg[2,1,1,0]=(0.599709567393)*x[0]**o+(0.307092449739)*x[0]+(-0.402950586215)*x[1]**o+(0.0674239470451)*x[1]
-        arg[2,1,1,1]=(0.182608249961)*x[0]**o+(0.373533584601)*x[0]+(0.40949869082)*x[1]**o+(0.696333617699)*x[1]
-        arg[2,1,2,0]=(0.0462891111054)*x[0]**o+(0.371258293292)*x[0]+(0.782976187716)*x[1]**o+(0.117976017999)*x[1]
-        arg[2,1,2,1]=(0.891841121526)*x[0]**o+(-0.998971173204)*x[0]+(0.0286712507928)*x[1]**o+(-0.0198507022516)*x[1]
-        arg[2,2,0,0]=(0.284620902703)*x[0]**o+(0.936231203073)*x[0]+(0.829209752046)*x[1]**o+(-0.94940982125)*x[1]
-        arg[2,2,0,1]=(-0.647956027376)*x[0]**o+(0.923690718922)*x[0]+(-0.0322423837346)*x[1]**o+(0.124962508606)*x[1]
-        arg[2,2,1,0]=(-0.0696010411705)*x[0]**o+(-0.161672936739)*x[0]+(-0.997445762186)*x[1]**o+(0.177962302014)*x[1]
-        arg[2,2,1,1]=(-0.897657700296)*x[0]**o+(-0.467866721175)*x[0]+(-0.560034332007)*x[1]**o+(-0.861509898295)*x[1]
-        arg[2,2,2,0]=(-0.100880174048)*x[0]**o+(0.678568254695)*x[0]+(-0.83289411684)*x[1]**o+(0.680564393149)*x[1]
-        arg[2,2,2,1]=(0.546159181491)*x[0]**o+(0.720296622966)*x[0]+(0.939046941118)*x[1]**o+(-0.716147554733)*x[1]
-        arg[2,3,0,0]=(-0.921073162235)*x[0]**o+(0.979925882289)*x[0]+(-0.0938642966949)*x[1]**o+(0.482093047223)*x[1]
-        arg[2,3,0,1]=(0.0709940956822)*x[0]**o+(-0.691401017243)*x[0]+(0.447000814029)*x[1]**o+(0.0575856240533)*x[1]
-        arg[2,3,1,0]=(0.562800393365)*x[0]**o+(0.657646549915)*x[0]+(-0.835326361689)*x[1]**o+(0.3487960687)*x[1]
-        arg[2,3,1,1]=(0.106668867409)*x[0]**o+(0.436327240765)*x[0]+(-0.585051261259)*x[1]**o+(0.616655338667)*x[1]
-        arg[2,3,2,0]=(-0.501849628176)*x[0]**o+(-0.284722503916)*x[0]+(-0.892470199837)*x[1]**o+(-0.979942541795)*x[1]
-        arg[2,3,2,1]=(0.236759540073)*x[0]**o+(-0.806931113769)*x[0]+(-0.225220003475)*x[1]**o+(-0.95183239844)*x[1]
-        arg[2,4,0,0]=(-0.684823909581)*x[0]**o+(0.445615228059)*x[0]+(-0.638879895767)*x[1]**o+(-0.335505874088)*x[1]
-        arg[2,4,0,1]=(-0.196708460612)*x[0]**o+(0.981592996809)*x[0]+(0.435774317028)*x[1]**o+(-0.0952200663109)*x[1]
-        arg[2,4,1,0]=(-0.552759474764)*x[0]**o+(-0.614031173545)*x[0]+(0.304375542871)*x[1]**o+(-0.285131901533)*x[1]
-        arg[2,4,1,1]=(0.147812951421)*x[0]**o+(-0.78533487681)*x[0]+(0.942205524401)*x[1]**o+(0.166280215075)*x[1]
-        arg[2,4,2,0]=(0.843067982563)*x[0]**o+(0.0116520710289)*x[0]+(0.927948889059)*x[1]**o+(-0.395251919577)*x[1]
-        arg[2,4,2,1]=(-0.316538010007)*x[0]**o+(-0.139262497126)*x[0]+(0.645409249217)*x[1]**o+(0.192949521992)*x[1]
-        arg[3,0,0,0]=(0.88179290666)*x[0]**o+(0.337853287365)*x[0]+(-0.590219587193)*x[1]**o+(-0.827051504196)*x[1]
-        arg[3,0,0,1]=(-0.104526336997)*x[0]**o+(0.299097012282)*x[0]+(-0.348493995853)*x[1]**o+(-0.780034322304)*x[1]
-        arg[3,0,1,0]=(0.358724159445)*x[0]**o+(-0.0338089482488)*x[0]+(-0.0423054506456)*x[1]**o+(0.67180489557)*x[1]
-        arg[3,0,1,1]=(-0.778880095665)*x[0]**o+(-0.448812173928)*x[0]+(-0.823686122382)*x[1]**o+(0.636028922656)*x[1]
-        arg[3,0,2,0]=(0.146891002069)*x[0]**o+(-0.368903199628)*x[0]+(-0.596272077557)*x[1]**o+(0.703510683225)*x[1]
-        arg[3,0,2,1]=(0.357416423547)*x[0]**o+(-0.103754905142)*x[0]+(0.32026011189)*x[1]**o+(0.755648597627)*x[1]
-        arg[3,1,0,0]=(0.399082464238)*x[0]**o+(-0.12611921797)*x[0]+(0.426552225948)*x[1]**o+(-0.228714297286)*x[1]
-        arg[3,1,0,1]=(-0.638411026717)*x[0]**o+(-0.342143922306)*x[0]+(-0.502107802626)*x[1]**o+(-0.881045304848)*x[1]
-        arg[3,1,1,0]=(0.411134247295)*x[0]**o+(-0.216585727086)*x[0]+(0.270013339156)*x[1]**o+(0.251581243494)*x[1]
-        arg[3,1,1,1]=(0.788758848294)*x[0]**o+(0.345181621902)*x[0]+(0.102843710598)*x[1]**o+(0.0561071077516)*x[1]
-        arg[3,1,2,0]=(0.232441162347)*x[0]**o+(-0.687544250386)*x[0]+(0.369065746372)*x[1]**o+(0.628109564412)*x[1]
-        arg[3,1,2,1]=(-0.912295044312)*x[0]**o+(0.847830497468)*x[0]+(0.776648618003)*x[1]**o+(0.522638388084)*x[1]
-        arg[3,2,0,0]=(0.779333120942)*x[0]**o+(-0.0747119967046)*x[0]+(-0.594363282198)*x[1]**o+(0.513922159444)*x[1]
-        arg[3,2,0,1]=(0.877492427404)*x[0]**o+(-0.191727825399)*x[0]+(0.0881296554818)*x[1]**o+(-0.408407503067)*x[1]
-        arg[3,2,1,0]=(0.29696771215)*x[0]**o+(-0.914882727138)*x[0]+(0.684156831385)*x[1]**o+(0.142293411327)*x[1]
-        arg[3,2,1,1]=(0.105927449304)*x[0]**o+(-0.863339661598)*x[0]+(-0.815550662607)*x[1]**o+(-0.261034715274)*x[1]
-        arg[3,2,2,0]=(0.944082529871)*x[0]**o+(-0.449259627627)*x[0]+(-0.560526159016)*x[1]**o+(0.609050500798)*x[1]
-        arg[3,2,2,1]=(0.529508870267)*x[0]**o+(0.627216712239)*x[0]+(-0.0148122228382)*x[1]**o+(0.0743274653452)*x[1]
-        arg[3,3,0,0]=(-0.30609697448)*x[0]**o+(0.910972095956)*x[0]+(0.256274444924)*x[1]**o+(0.229096821635)*x[1]
-        arg[3,3,0,1]=(-0.510323627078)*x[0]**o+(0.308418491165)*x[0]+(0.786418296678)*x[1]**o+(-0.248788086479)*x[1]
-        arg[3,3,1,0]=(-0.981107944688)*x[0]**o+(-0.331637054173)*x[0]+(-0.972981902152)*x[1]**o+(-0.389364980465)*x[1]
-        arg[3,3,1,1]=(-0.839880147367)*x[0]**o+(-0.911569972467)*x[0]+(0.209642332468)*x[1]**o+(0.0926875442137)*x[1]
-        arg[3,3,2,0]=(-0.22724314378)*x[0]**o+(-0.0396604383619)*x[0]+(0.906829234649)*x[1]**o+(-0.862410550066)*x[1]
-        arg[3,3,2,1]=(-0.412816401935)*x[0]**o+(-0.848442294241)*x[0]+(-0.599302206188)*x[1]**o+(0.719403009819)*x[1]
-        arg[3,4,0,0]=(0.259283054664)*x[0]**o+(0.0983272120339)*x[0]+(-0.538373082787)*x[1]**o+(0.950164435617)*x[1]
-        arg[3,4,0,1]=(0.633594236794)*x[0]**o+(0.120984469179)*x[0]+(0.472771297982)*x[1]**o+(0.873015785724)*x[1]
-        arg[3,4,1,0]=(0.913524970057)*x[0]**o+(0.106590018424)*x[0]+(0.124026494061)*x[1]**o+(-0.254989594971)*x[1]
-        arg[3,4,1,1]=(0.945528885492)*x[0]**o+(-0.323205519576)*x[0]+(-0.467294290307)*x[1]**o+(-0.557033486306)*x[1]
-        arg[3,4,2,0]=(-0.268364682764)*x[0]**o+(0.0289685280025)*x[0]+(0.0493964636013)*x[1]**o+(0.872120137365)*x[1]
-        arg[3,4,2,1]=(-0.266698796897)*x[0]**o+(-0.679148300702)*x[0]+(0.337653394795)*x[1]**o+(0.186866149716)*x[1]
-        ref[0,0,0,0]=(0.358768976574)*x_ref[0]**o+(-0.231637053165)*x_ref[0]+(0.798891506345)*x_ref[1]**o+(0.292325388353)*x_ref[1]
-        ref[0,0,0,1]=(0.53301689922)*x_ref[0]**o+(-0.761786870664)*x_ref[0]+(0.284067900826)*x_ref[1]**o+(-0.688662082205)*x_ref[1]
-        ref[0,0,1,0]=(-0.721988036113)*x_ref[0]**o+(-0.743892757815)*x_ref[0]+(-0.796787022375)*x_ref[1]**o+(-0.499468412523)*x_ref[1]
-        ref[0,0,1,1]=(0.0710691488306)*x_ref[0]**o+(0.0210385141456)*x_ref[0]+(-0.709342417683)*x_ref[1]**o+(0.901794071115)*x_ref[1]
-        ref[0,0,2,0]=(-0.800537263339)*x_ref[0]**o+(0.583114786539)*x_ref[0]+(0.422752622522)*x_ref[1]**o+(-0.0954981460748)*x_ref[1]
-        ref[0,0,2,1]=(-0.0805357065445)*x_ref[0]**o+(0.476377895547)*x_ref[0]+(0.242203912566)*x_ref[1]**o+(-0.479971540043)*x_ref[1]
-        ref[0,1,0,0]=(-0.476356823162)*x_ref[0]**o+(-0.438853622252)*x_ref[0]+(-0.937228141746)*x_ref[1]**o+(0.366496742588)*x_ref[1]
-        ref[0,1,0,1]=(-0.496918253956)*x_ref[0]**o+(-0.0227549061268)*x_ref[0]+(0.830195584768)*x_ref[1]**o+(-0.114624902423)*x_ref[1]
-        ref[0,1,1,0]=(0.431291036997)*x_ref[0]**o+(0.807713720258)*x_ref[0]+(0.730057543333)*x_ref[1]**o+(0.635171725232)*x_ref[1]
-        ref[0,1,1,1]=(0.784425995411)*x_ref[0]**o+(-0.397510494899)*x_ref[0]+(-0.579911740115)*x_ref[1]**o+(0.130426014607)*x_ref[1]
-        ref[0,1,2,0]=(0.473613650641)*x_ref[0]**o+(-0.155617741177)*x_ref[0]+(0.873237852103)*x_ref[1]**o+(-0.749395152414)*x_ref[1]
-        ref[0,1,2,1]=(0.367649559431)*x_ref[0]**o+(0.830181309644)*x_ref[0]+(0.87726968147)*x_ref[1]**o+(-0.450304793682)*x_ref[1]
-        ref[0,2,0,0]=(-0.700522876654)*x_ref[0]**o+(-0.998187126003)*x_ref[0]+(0.732491610173)*x_ref[1]**o+(0.648679267)*x_ref[1]
-        ref[0,2,0,1]=(0.499746141285)*x_ref[0]**o+(-0.730090975806)*x_ref[0]+(-0.525566438654)*x_ref[1]**o+(0.212469850421)*x_ref[1]
-        ref[0,2,1,0]=(-0.847752916298)*x_ref[0]**o+(0.43510472619)*x_ref[0]+(0.815305936548)*x_ref[1]**o+(-0.143802676552)*x_ref[1]
-        ref[0,2,1,1]=(-0.453572376958)*x_ref[0]**o+(-0.913023531929)*x_ref[0]+(0.743328127665)*x_ref[1]**o+(0.152586122591)*x_ref[1]
-        ref[0,2,2,0]=(0.526939334508)*x_ref[0]**o+(0.247268722057)*x_ref[0]+(-0.176432621481)*x_ref[1]**o+(-0.510110202196)*x_ref[1]
-        ref[0,2,2,1]=(0.139685732003)*x_ref[0]**o+(0.278304455867)*x_ref[0]+(0.517953769616)*x_ref[1]**o+(-0.272384261701)*x_ref[1]
-        ref[0,3,0,0]=(-0.38867907688)*x_ref[0]**o+(-0.73043975055)*x_ref[0]+(-0.14293243901)*x_ref[1]**o+(0.0601042854043)*x_ref[1]
-        ref[0,3,0,1]=(-0.163055949188)*x_ref[0]**o+(-0.035877062482)*x_ref[0]+(0.0396615423106)*x_ref[1]**o+(-0.870062303275)*x_ref[1]
-        ref[0,3,1,0]=(0.283839779914)*x_ref[0]**o+(-0.519316925197)*x_ref[0]+(-0.437401973959)*x_ref[1]**o+(-0.823707232663)*x_ref[1]
-        ref[0,3,1,1]=(0.700305425892)*x_ref[0]**o+(0.0299761521094)*x_ref[0]+(-0.993032151025)*x_ref[1]**o+(0.633293413221)*x_ref[1]
-        ref[0,3,2,0]=(-0.745357256365)*x_ref[0]**o+(-0.451553456961)*x_ref[0]+(0.05789646302)*x_ref[1]**o+(-0.755901155251)*x_ref[1]
-        ref[0,3,2,1]=(-0.57330840403)*x_ref[0]**o+(-0.589361483751)*x_ref[0]+(-0.038677123513)*x_ref[1]**o+(0.417332032168)*x_ref[1]
-        ref[0,4,0,0]=(0.759655161531)*x_ref[0]**o+(0.737483461328)*x_ref[0]+(0.573158629937)*x_ref[1]**o+(-0.454191109106)*x_ref[1]
-        ref[0,4,0,1]=(-0.232982406645)*x_ref[0]**o+(-0.926030038179)*x_ref[0]+(-0.504256834465)*x_ref[1]**o+(-0.107703527058)*x_ref[1]
-        ref[0,4,1,0]=(0.898411697016)*x_ref[0]**o+(0.642045536742)*x_ref[0]+(-0.953059791895)*x_ref[1]**o+(-0.67501710093)*x_ref[1]
-        ref[0,4,1,1]=(0.300380574165)*x_ref[0]**o+(0.204591960115)*x_ref[0]+(-0.308849697562)*x_ref[1]**o+(-0.489495887357)*x_ref[1]
-        ref[0,4,2,0]=(-0.814560286716)*x_ref[0]**o+(0.154235599953)*x_ref[0]+(0.279329273498)*x_ref[1]**o+(-0.674063978926)*x_ref[1]
-        ref[0,4,2,1]=(-0.718018870365)*x_ref[0]**o+(-0.735982858424)*x_ref[0]+(-0.0132197132926)*x_ref[1]**o+(0.398939587543)*x_ref[1]
-        ref[1,0,0,0]=(0.0559995351725)*x_ref[0]**o+(-0.164549619892)*x_ref[0]+(-0.794242529408)*x_ref[1]**o+(0.0927822314785)*x_ref[1]
-        ref[1,0,0,1]=(-0.894238542341)*x_ref[0]**o+(0.378559247473)*x_ref[0]+(-0.183957272639)*x_ref[1]**o+(0.486358968942)*x_ref[1]
-        ref[1,0,1,0]=(0.931288801001)*x_ref[0]**o+(0.223815769968)*x_ref[0]+(-0.719591906328)*x_ref[1]**o+(-0.743644741105)*x_ref[1]
-        ref[1,0,1,1]=(0.156646029123)*x_ref[0]**o+(0.306942879419)*x_ref[0]+(0.747006830674)*x_ref[1]**o+(-0.876534912274)*x_ref[1]
-        ref[1,0,2,0]=(-0.496819081999)*x_ref[0]**o+(-0.939227402425)*x_ref[0]+(0.0566331712182)*x_ref[1]**o+(0.565724364661)*x_ref[1]
-        ref[1,0,2,1]=(0.903706429954)*x_ref[0]**o+(0.667947320307)*x_ref[0]+(0.97140855373)*x_ref[1]**o+(0.924095235752)*x_ref[1]
-        ref[1,1,0,0]=(0.526180197299)*x_ref[0]**o+(0.435493351674)*x_ref[0]+(0.400107077848)*x_ref[1]**o+(-0.704760833758)*x_ref[1]
-        ref[1,1,0,1]=(0.0723740015004)*x_ref[0]**o+(-0.405859051371)*x_ref[0]+(0.200787757511)*x_ref[1]**o+(0.41819184563)*x_ref[1]
-        ref[1,1,1,0]=(-0.0320951655627)*x_ref[0]**o+(0.235068445821)*x_ref[0]+(0.450383349599)*x_ref[1]**o+(-0.801487424765)*x_ref[1]
-        ref[1,1,1,1]=(-0.52478892744)*x_ref[0]**o+(-0.449111297125)*x_ref[0]+(0.731062182014)*x_ref[1]**o+(0.533619608577)*x_ref[1]
-        ref[1,1,2,0]=(0.0889794057057)*x_ref[0]**o+(-0.971856981571)*x_ref[0]+(0.662216408922)*x_ref[1]**o+(0.164089024468)*x_ref[1]
-        ref[1,1,2,1]=(-0.196374963647)*x_ref[0]**o+(-0.739360211802)*x_ref[0]+(0.916611650753)*x_ref[1]**o+(-0.260102318115)*x_ref[1]
-        ref[1,2,0,0]=(0.627763572103)*x_ref[0]**o+(-0.893900847319)*x_ref[0]+(0.907548446417)*x_ref[1]**o+(0.0687906203663)*x_ref[1]
-        ref[1,2,0,1]=(0.59755498682)*x_ref[0]**o+(-0.457108009787)*x_ref[0]+(0.71562139654)*x_ref[1]**o+(-0.300872832559)*x_ref[1]
-        ref[1,2,1,0]=(-0.479641829834)*x_ref[0]**o+(0.297188513722)*x_ref[0]+(0.0227730978493)*x_ref[1]**o+(0.199329665406)*x_ref[1]
-        ref[1,2,1,1]=(0.918974940101)*x_ref[0]**o+(0.595194981816)*x_ref[0]+(0.760030152554)*x_ref[1]**o+(-0.798899878486)*x_ref[1]
-        ref[1,2,2,0]=(-0.878334511842)*x_ref[0]**o+(0.910857236287)*x_ref[0]+(0.0164747567997)*x_ref[1]**o+(-0.876970888445)*x_ref[1]
-        ref[1,2,2,1]=(0.29445809181)*x_ref[0]**o+(0.837849454931)*x_ref[0]+(0.0759054371211)*x_ref[1]**o+(0.501243080372)*x_ref[1]
-        ref[1,3,0,0]=(-0.529006436258)*x_ref[0]**o+(-0.932325855538)*x_ref[0]+(-0.561472972374)*x_ref[1]**o+(0.845125736656)*x_ref[1]
-        ref[1,3,0,1]=(-0.843008257488)*x_ref[0]**o+(0.614118623012)*x_ref[0]+(-0.167015137447)*x_ref[1]**o+(0.158701952625)*x_ref[1]
-        ref[1,3,1,0]=(-0.662966916148)*x_ref[0]**o+(-0.443297576512)*x_ref[0]+(0.295988608077)*x_ref[1]**o+(0.059506908615)*x_ref[1]
-        ref[1,3,1,1]=(0.864199978014)*x_ref[0]**o+(0.138723519602)*x_ref[0]+(0.144964839302)*x_ref[1]**o+(0.239863709389)*x_ref[1]
-        ref[1,3,2,0]=(0.479006097431)*x_ref[0]**o+(0.542168797821)*x_ref[0]+(0.561074562163)*x_ref[1]**o+(-0.133365787275)*x_ref[1]
-        ref[1,3,2,1]=(-0.901033449452)*x_ref[0]**o+(-0.620245150074)*x_ref[0]+(0.598461569697)*x_ref[1]**o+(-0.2213246854)*x_ref[1]
-        ref[1,4,0,0]=(-0.577067401348)*x_ref[0]**o+(0.486154324874)*x_ref[0]+(0.809205150442)*x_ref[1]**o+(-0.218206418459)*x_ref[1]
-        ref[1,4,0,1]=(0.726556862066)*x_ref[0]**o+(0.0293695509867)*x_ref[0]+(0.601938348193)*x_ref[1]**o+(0.967332697531)*x_ref[1]
-        ref[1,4,1,0]=(-0.675624388054)*x_ref[0]**o+(-0.871613723214)*x_ref[0]+(0.605519387693)*x_ref[1]**o+(0.287186894411)*x_ref[1]
-        ref[1,4,1,1]=(-0.689904898214)*x_ref[0]**o+(-0.918236705665)*x_ref[0]+(-0.892168622177)*x_ref[1]**o+(0.507441662612)*x_ref[1]
-        ref[1,4,2,0]=(0.845768980712)*x_ref[0]**o+(-0.458467508114)*x_ref[0]+(-0.518185249391)*x_ref[1]**o+(0.829945330327)*x_ref[1]
-        ref[1,4,2,1]=(0.776852312178)*x_ref[0]**o+(-0.268810999469)*x_ref[0]+(-0.576757148841)*x_ref[1]**o+(-0.50628294802)*x_ref[1]
-        ref[2,0,0,0]=(-0.686840219939)*x_ref[0]**o+(0.6861172847)*x_ref[0]+(0.240362263052)*x_ref[1]**o+(0.962361523884)*x_ref[1]
-        ref[2,0,0,1]=(-0.943837188119)*x_ref[0]**o+(0.829832768268)*x_ref[0]+(0.377590124133)*x_ref[1]**o+(-0.171714144962)*x_ref[1]
-        ref[2,0,1,0]=(0.862809148447)*x_ref[0]**o+(0.0573402136489)*x_ref[0]+(-0.743311826013)*x_ref[1]**o+(0.427809313437)*x_ref[1]
-        ref[2,0,1,1]=(0.377380819576)*x_ref[0]**o+(-0.223280285041)*x_ref[0]+(0.178628658562)*x_ref[1]**o+(0.121964611877)*x_ref[1]
-        ref[2,0,2,0]=(0.41723758689)*x_ref[0]**o+(0.256039203883)*x_ref[0]+(0.255358776676)*x_ref[1]**o+(-0.881665964974)*x_ref[1]
-        ref[2,0,2,1]=(-0.0797103024499)*x_ref[0]**o+(0.128068931414)*x_ref[0]+(-0.758317834409)*x_ref[1]**o+(0.654657809183)*x_ref[1]
-        ref[2,1,0,0]=(0.603648218133)*x_ref[0]**o+(-0.286780270729)*x_ref[0]+(-0.341108067214)*x_ref[1]**o+(-0.769667356087)*x_ref[1]
-        ref[2,1,0,1]=(0.844044270035)*x_ref[0]**o+(0.0585907857764)*x_ref[0]+(-0.578232785252)*x_ref[1]**o+(-0.40959017859)*x_ref[1]
-        ref[2,1,1,0]=(0.599709567393)*x_ref[0]**o+(0.307092449739)*x_ref[0]+(-0.402950586215)*x_ref[1]**o+(0.0674239470451)*x_ref[1]
-        ref[2,1,1,1]=(0.182608249961)*x_ref[0]**o+(0.373533584601)*x_ref[0]+(0.40949869082)*x_ref[1]**o+(0.696333617699)*x_ref[1]
-        ref[2,1,2,0]=(0.0462891111054)*x_ref[0]**o+(0.371258293292)*x_ref[0]+(0.782976187716)*x_ref[1]**o+(0.117976017999)*x_ref[1]
-        ref[2,1,2,1]=(0.891841121526)*x_ref[0]**o+(-0.998971173204)*x_ref[0]+(0.0286712507928)*x_ref[1]**o+(-0.0198507022516)*x_ref[1]
-        ref[2,2,0,0]=(0.284620902703)*x_ref[0]**o+(0.936231203073)*x_ref[0]+(0.829209752046)*x_ref[1]**o+(-0.94940982125)*x_ref[1]
-        ref[2,2,0,1]=(-0.647956027376)*x_ref[0]**o+(0.923690718922)*x_ref[0]+(-0.0322423837346)*x_ref[1]**o+(0.124962508606)*x_ref[1]
-        ref[2,2,1,0]=(-0.0696010411705)*x_ref[0]**o+(-0.161672936739)*x_ref[0]+(-0.997445762186)*x_ref[1]**o+(0.177962302014)*x_ref[1]
-        ref[2,2,1,1]=(-0.897657700296)*x_ref[0]**o+(-0.467866721175)*x_ref[0]+(-0.560034332007)*x_ref[1]**o+(-0.861509898295)*x_ref[1]
-        ref[2,2,2,0]=(-0.100880174048)*x_ref[0]**o+(0.678568254695)*x_ref[0]+(-0.83289411684)*x_ref[1]**o+(0.680564393149)*x_ref[1]
-        ref[2,2,2,1]=(0.546159181491)*x_ref[0]**o+(0.720296622966)*x_ref[0]+(0.939046941118)*x_ref[1]**o+(-0.716147554733)*x_ref[1]
-        ref[2,3,0,0]=(-0.921073162235)*x_ref[0]**o+(0.979925882289)*x_ref[0]+(-0.0938642966949)*x_ref[1]**o+(0.482093047223)*x_ref[1]
-        ref[2,3,0,1]=(0.0709940956822)*x_ref[0]**o+(-0.691401017243)*x_ref[0]+(0.447000814029)*x_ref[1]**o+(0.0575856240533)*x_ref[1]
-        ref[2,3,1,0]=(0.562800393365)*x_ref[0]**o+(0.657646549915)*x_ref[0]+(-0.835326361689)*x_ref[1]**o+(0.3487960687)*x_ref[1]
-        ref[2,3,1,1]=(0.106668867409)*x_ref[0]**o+(0.436327240765)*x_ref[0]+(-0.585051261259)*x_ref[1]**o+(0.616655338667)*x_ref[1]
-        ref[2,3,2,0]=(-0.501849628176)*x_ref[0]**o+(-0.284722503916)*x_ref[0]+(-0.892470199837)*x_ref[1]**o+(-0.979942541795)*x_ref[1]
-        ref[2,3,2,1]=(0.236759540073)*x_ref[0]**o+(-0.806931113769)*x_ref[0]+(-0.225220003475)*x_ref[1]**o+(-0.95183239844)*x_ref[1]
-        ref[2,4,0,0]=(-0.684823909581)*x_ref[0]**o+(0.445615228059)*x_ref[0]+(-0.638879895767)*x_ref[1]**o+(-0.335505874088)*x_ref[1]
-        ref[2,4,0,1]=(-0.196708460612)*x_ref[0]**o+(0.981592996809)*x_ref[0]+(0.435774317028)*x_ref[1]**o+(-0.0952200663109)*x_ref[1]
-        ref[2,4,1,0]=(-0.552759474764)*x_ref[0]**o+(-0.614031173545)*x_ref[0]+(0.304375542871)*x_ref[1]**o+(-0.285131901533)*x_ref[1]
-        ref[2,4,1,1]=(0.147812951421)*x_ref[0]**o+(-0.78533487681)*x_ref[0]+(0.942205524401)*x_ref[1]**o+(0.166280215075)*x_ref[1]
-        ref[2,4,2,0]=(0.843067982563)*x_ref[0]**o+(0.0116520710289)*x_ref[0]+(0.927948889059)*x_ref[1]**o+(-0.395251919577)*x_ref[1]
-        ref[2,4,2,1]=(-0.316538010007)*x_ref[0]**o+(-0.139262497126)*x_ref[0]+(0.645409249217)*x_ref[1]**o+(0.192949521992)*x_ref[1]
-        ref[3,0,0,0]=(0.88179290666)*x_ref[0]**o+(0.337853287365)*x_ref[0]+(-0.590219587193)*x_ref[1]**o+(-0.827051504196)*x_ref[1]
-        ref[3,0,0,1]=(-0.104526336997)*x_ref[0]**o+(0.299097012282)*x_ref[0]+(-0.348493995853)*x_ref[1]**o+(-0.780034322304)*x_ref[1]
-        ref[3,0,1,0]=(0.358724159445)*x_ref[0]**o+(-0.0338089482488)*x_ref[0]+(-0.0423054506456)*x_ref[1]**o+(0.67180489557)*x_ref[1]
-        ref[3,0,1,1]=(-0.778880095665)*x_ref[0]**o+(-0.448812173928)*x_ref[0]+(-0.823686122382)*x_ref[1]**o+(0.636028922656)*x_ref[1]
-        ref[3,0,2,0]=(0.146891002069)*x_ref[0]**o+(-0.368903199628)*x_ref[0]+(-0.596272077557)*x_ref[1]**o+(0.703510683225)*x_ref[1]
-        ref[3,0,2,1]=(0.357416423547)*x_ref[0]**o+(-0.103754905142)*x_ref[0]+(0.32026011189)*x_ref[1]**o+(0.755648597627)*x_ref[1]
-        ref[3,1,0,0]=(0.399082464238)*x_ref[0]**o+(-0.12611921797)*x_ref[0]+(0.426552225948)*x_ref[1]**o+(-0.228714297286)*x_ref[1]
-        ref[3,1,0,1]=(-0.638411026717)*x_ref[0]**o+(-0.342143922306)*x_ref[0]+(-0.502107802626)*x_ref[1]**o+(-0.881045304848)*x_ref[1]
-        ref[3,1,1,0]=(0.411134247295)*x_ref[0]**o+(-0.216585727086)*x_ref[0]+(0.270013339156)*x_ref[1]**o+(0.251581243494)*x_ref[1]
-        ref[3,1,1,1]=(0.788758848294)*x_ref[0]**o+(0.345181621902)*x_ref[0]+(0.102843710598)*x_ref[1]**o+(0.0561071077516)*x_ref[1]
-        ref[3,1,2,0]=(0.232441162347)*x_ref[0]**o+(-0.687544250386)*x_ref[0]+(0.369065746372)*x_ref[1]**o+(0.628109564412)*x_ref[1]
-        ref[3,1,2,1]=(-0.912295044312)*x_ref[0]**o+(0.847830497468)*x_ref[0]+(0.776648618003)*x_ref[1]**o+(0.522638388084)*x_ref[1]
-        ref[3,2,0,0]=(0.779333120942)*x_ref[0]**o+(-0.0747119967046)*x_ref[0]+(-0.594363282198)*x_ref[1]**o+(0.513922159444)*x_ref[1]
-        ref[3,2,0,1]=(0.877492427404)*x_ref[0]**o+(-0.191727825399)*x_ref[0]+(0.0881296554818)*x_ref[1]**o+(-0.408407503067)*x_ref[1]
-        ref[3,2,1,0]=(0.29696771215)*x_ref[0]**o+(-0.914882727138)*x_ref[0]+(0.684156831385)*x_ref[1]**o+(0.142293411327)*x_ref[1]
-        ref[3,2,1,1]=(0.105927449304)*x_ref[0]**o+(-0.863339661598)*x_ref[0]+(-0.815550662607)*x_ref[1]**o+(-0.261034715274)*x_ref[1]
-        ref[3,2,2,0]=(0.944082529871)*x_ref[0]**o+(-0.449259627627)*x_ref[0]+(-0.560526159016)*x_ref[1]**o+(0.609050500798)*x_ref[1]
-        ref[3,2,2,1]=(0.529508870267)*x_ref[0]**o+(0.627216712239)*x_ref[0]+(-0.0148122228382)*x_ref[1]**o+(0.0743274653452)*x_ref[1]
-        ref[3,3,0,0]=(-0.30609697448)*x_ref[0]**o+(0.910972095956)*x_ref[0]+(0.256274444924)*x_ref[1]**o+(0.229096821635)*x_ref[1]
-        ref[3,3,0,1]=(-0.510323627078)*x_ref[0]**o+(0.308418491165)*x_ref[0]+(0.786418296678)*x_ref[1]**o+(-0.248788086479)*x_ref[1]
-        ref[3,3,1,0]=(-0.981107944688)*x_ref[0]**o+(-0.331637054173)*x_ref[0]+(-0.972981902152)*x_ref[1]**o+(-0.389364980465)*x_ref[1]
-        ref[3,3,1,1]=(-0.839880147367)*x_ref[0]**o+(-0.911569972467)*x_ref[0]+(0.209642332468)*x_ref[1]**o+(0.0926875442137)*x_ref[1]
-        ref[3,3,2,0]=(-0.22724314378)*x_ref[0]**o+(-0.0396604383619)*x_ref[0]+(0.906829234649)*x_ref[1]**o+(-0.862410550066)*x_ref[1]
-        ref[3,3,2,1]=(-0.412816401935)*x_ref[0]**o+(-0.848442294241)*x_ref[0]+(-0.599302206188)*x_ref[1]**o+(0.719403009819)*x_ref[1]
-        ref[3,4,0,0]=(0.259283054664)*x_ref[0]**o+(0.0983272120339)*x_ref[0]+(-0.538373082787)*x_ref[1]**o+(0.950164435617)*x_ref[1]
-        ref[3,4,0,1]=(0.633594236794)*x_ref[0]**o+(0.120984469179)*x_ref[0]+(0.472771297982)*x_ref[1]**o+(0.873015785724)*x_ref[1]
-        ref[3,4,1,0]=(0.913524970057)*x_ref[0]**o+(0.106590018424)*x_ref[0]+(0.124026494061)*x_ref[1]**o+(-0.254989594971)*x_ref[1]
-        ref[3,4,1,1]=(0.945528885492)*x_ref[0]**o+(-0.323205519576)*x_ref[0]+(-0.467294290307)*x_ref[1]**o+(-0.557033486306)*x_ref[1]
-        ref[3,4,2,0]=(-0.268364682764)*x_ref[0]**o+(0.0289685280025)*x_ref[0]+(0.0493964636013)*x_ref[1]**o+(0.872120137365)*x_ref[1]
-        ref[3,4,2,1]=(-0.266698796897)*x_ref[0]**o+(-0.679148300702)*x_ref[0]+(0.337653394795)*x_ref[1]**o+(0.186866149716)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.928996629952)*x[0]**o+(-0.171383074114)*x[0]+(-0.324423798901)*x[1]**o+(-0.801354053962)*x[1]+(0.365256142808)*x[2]**o+(0.126262208857)*x[2]
-        arg[0,0,0,1]=(0.326024843626)*x[0]**o+(-0.0091566240426)*x[0]+(-0.0396235158589)*x[1]**o+(-0.753302577837)*x[1]+(-0.38709916587)*x[2]**o+(-0.28660316595)*x[2]
-        arg[0,0,1,0]=(0.755338255506)*x[0]**o+(0.851895434343)*x[0]+(0.419119464402)*x[1]**o+(0.670733085023)*x[1]+(0.819398310958)*x[2]**o+(0.476185335773)*x[2]
-        arg[0,0,1,1]=(-0.981416259131)*x[0]**o+(-0.97000252267)*x[0]+(-0.132624451699)*x[1]**o+(-0.261428370649)*x[1]+(-0.349245951727)*x[2]**o+(-0.717343195877)*x[2]
-        arg[0,0,2,0]=(-0.874826075266)*x[0]**o+(-0.399307905707)*x[0]+(0.350873599317)*x[1]**o+(0.15861651992)*x[1]+(0.396279933216)*x[2]**o+(0.92332515708)*x[2]
-        arg[0,0,2,1]=(-0.183596683527)*x[0]**o+(-0.115194639348)*x[0]+(0.616111723618)*x[1]**o+(-0.402157657669)*x[1]+(0.44145594193)*x[2]**o+(0.686052407784)*x[2]
-        arg[0,1,0,0]=(-0.669169178244)*x[0]**o+(0.835937801609)*x[0]+(0.468805302181)*x[1]**o+(-0.627292634023)*x[1]+(-0.674361231979)*x[2]**o+(-0.00929181785129)*x[2]
-        arg[0,1,0,1]=(-0.568131655705)*x[0]**o+(0.690366535852)*x[0]+(-0.212524396914)*x[1]**o+(-0.767983769407)*x[1]+(0.477500128569)*x[2]**o+(-0.0190887598644)*x[2]
-        arg[0,1,1,0]=(-0.374170635822)*x[0]**o+(0.0169009974558)*x[0]+(-0.162519103357)*x[1]**o+(0.786991144449)*x[1]+(0.0590294918131)*x[2]**o+(-0.213442509309)*x[2]
-        arg[0,1,1,1]=(-0.558268657439)*x[0]**o+(0.584734933669)*x[0]+(-0.650790013689)*x[1]**o+(-0.192849048407)*x[1]+(0.505458636714)*x[2]**o+(-0.585174281371)*x[2]
-        arg[0,1,2,0]=(-0.933243590775)*x[0]**o+(0.528060249767)*x[0]+(-0.763255746252)*x[1]**o+(0.771589118163)*x[1]+(-0.641287604338)*x[2]**o+(0.379566401585)*x[2]
-        arg[0,1,2,1]=(-0.836976373935)*x[0]**o+(-0.969434110974)*x[0]+(0.758148372888)*x[1]**o+(-0.89212062535)*x[1]+(0.788693820015)*x[2]**o+(-0.620704367414)*x[2]
-        arg[0,2,0,0]=(0.0163117360814)*x[0]**o+(-0.390867752068)*x[0]+(-0.725068297982)*x[1]**o+(-0.680312496646)*x[1]+(0.069273494969)*x[2]**o+(-0.576122275696)*x[2]
-        arg[0,2,0,1]=(0.461771197614)*x[0]**o+(-0.767541404109)*x[0]+(-0.694279263622)*x[1]**o+(-0.721448812749)*x[1]+(0.248787896584)*x[2]**o+(0.237075401327)*x[2]
-        arg[0,2,1,0]=(0.381987012965)*x[0]**o+(-0.288236233238)*x[0]+(-0.519012025084)*x[1]**o+(-0.256658293082)*x[1]+(0.807322167368)*x[2]**o+(-0.261916179859)*x[2]
-        arg[0,2,1,1]=(0.257241267407)*x[0]**o+(-0.470612990721)*x[0]+(-0.208612656448)*x[1]**o+(0.839646962914)*x[1]+(0.916675150494)*x[2]**o+(-0.165468351005)*x[2]
-        arg[0,2,2,0]=(0.92569232521)*x[0]**o+(0.809982458308)*x[0]+(-0.860530305336)*x[1]**o+(0.261687622817)*x[1]+(0.948003684651)*x[2]**o+(-0.473133742361)*x[2]
-        arg[0,2,2,1]=(-0.113846814874)*x[0]**o+(0.680846459377)*x[0]+(0.920219149741)*x[1]**o+(0.172027554503)*x[1]+(0.475330041115)*x[2]**o+(-0.176218891429)*x[2]
-        arg[0,3,0,0]=(-0.948638294297)*x[0]**o+(-0.0411621070703)*x[0]+(-0.294759271027)*x[1]**o+(-0.903733455086)*x[1]+(-0.995253733593)*x[2]**o+(0.106726960462)*x[2]
-        arg[0,3,0,1]=(0.1592709614)*x[0]**o+(0.0683266445293)*x[0]+(0.336092506745)*x[1]**o+(-0.209047739881)*x[1]+(-0.330417243459)*x[2]**o+(-0.809242647755)*x[2]
-        arg[0,3,1,0]=(-0.680637516359)*x[0]**o+(-0.713405815404)*x[0]+(-0.484624435043)*x[1]**o+(-0.279314462332)*x[1]+(-0.458856066504)*x[2]**o+(0.0588111305227)*x[2]
-        arg[0,3,1,1]=(-0.853676338655)*x[0]**o+(-0.651539814195)*x[0]+(-0.109727277725)*x[1]**o+(0.0139006407942)*x[1]+(0.231943245426)*x[2]**o+(0.42972517233)*x[2]
-        arg[0,3,2,0]=(-0.60799269765)*x[0]**o+(-0.802413269128)*x[0]+(0.151362498863)*x[1]**o+(-0.678226252875)*x[1]+(-0.867117685659)*x[2]**o+(-0.711982116071)*x[2]
-        arg[0,3,2,1]=(-0.243012743941)*x[0]**o+(-0.692614579016)*x[0]+(0.0986817641914)*x[1]**o+(-0.495735862695)*x[1]+(-0.430040681653)*x[2]**o+(0.0108928722284)*x[2]
-        arg[0,4,0,0]=(0.0989402181558)*x[0]**o+(-0.60096719882)*x[0]+(-0.324253928432)*x[1]**o+(-0.862723687559)*x[1]+(-0.34745416427)*x[2]**o+(0.936559074873)*x[2]
-        arg[0,4,0,1]=(0.711021967566)*x[0]**o+(-0.939408401113)*x[0]+(-0.218100921633)*x[1]**o+(0.92835194875)*x[1]+(-0.353936913865)*x[2]**o+(-0.547266090928)*x[2]
-        arg[0,4,1,0]=(0.172231614188)*x[0]**o+(-0.734622090671)*x[0]+(0.432686916647)*x[1]**o+(0.552595350492)*x[1]+(0.779662641076)*x[2]**o+(-0.0933220492779)*x[2]
-        arg[0,4,1,1]=(0.996776716866)*x[0]**o+(-0.340786520686)*x[0]+(0.260075214171)*x[1]**o+(0.00385504852496)*x[1]+(0.377516772127)*x[2]**o+(-0.341751634181)*x[2]
-        arg[0,4,2,0]=(-0.655642896664)*x[0]**o+(-0.840525173737)*x[0]+(-0.855343721564)*x[1]**o+(0.253558571524)*x[1]+(0.0463733059925)*x[2]**o+(-0.116359866912)*x[2]
-        arg[0,4,2,1]=(0.131619661414)*x[0]**o+(-0.162067255954)*x[0]+(0.562536831367)*x[1]**o+(-0.940412472035)*x[1]+(-0.282265762783)*x[2]**o+(0.634711607923)*x[2]
-        arg[1,0,0,0]=(0.484071808097)*x[0]**o+(0.566763524691)*x[0]+(-0.658614173653)*x[1]**o+(-0.140192232895)*x[1]+(-0.310114236409)*x[2]**o+(-0.918532401595)*x[2]
-        arg[1,0,0,1]=(-0.81190380441)*x[0]**o+(0.644439878497)*x[0]+(0.479583403289)*x[1]**o+(-0.493318882779)*x[1]+(-0.424704492175)*x[2]**o+(0.700624317732)*x[2]
-        arg[1,0,1,0]=(0.766650182435)*x[0]**o+(0.226365545129)*x[0]+(0.510828945971)*x[1]**o+(0.283221954498)*x[1]+(0.817303877886)*x[2]**o+(-0.245709044628)*x[2]
-        arg[1,0,1,1]=(0.194787112664)*x[0]**o+(-0.879306736922)*x[0]+(0.185381291627)*x[1]**o+(-0.510692743975)*x[1]+(-0.422555014055)*x[2]**o+(0.556629919959)*x[2]
-        arg[1,0,2,0]=(-0.958345828895)*x[0]**o+(-0.667735551013)*x[0]+(0.278271284225)*x[1]**o+(-0.0847995194757)*x[1]+(0.902184171441)*x[2]**o+(0.763125168854)*x[2]
-        arg[1,0,2,1]=(-0.0766429670195)*x[0]**o+(0.894421139029)*x[0]+(-0.331560314101)*x[1]**o+(-0.0253297623997)*x[1]+(0.13406045967)*x[2]**o+(-0.326681111625)*x[2]
-        arg[1,1,0,0]=(-0.979406855838)*x[0]**o+(0.528849909402)*x[0]+(-0.0486159476737)*x[1]**o+(-0.898392512695)*x[1]+(-0.678328327407)*x[2]**o+(0.644201802057)*x[2]
-        arg[1,1,0,1]=(-0.977485554605)*x[0]**o+(0.794799941538)*x[0]+(-0.00237183848504)*x[1]**o+(-0.633497483149)*x[1]+(0.746593853568)*x[2]**o+(0.197741126365)*x[2]
-        arg[1,1,1,0]=(0.379985506182)*x[0]**o+(0.69889144234)*x[0]+(-0.507293887409)*x[1]**o+(-0.727675545291)*x[1]+(-0.467064531693)*x[2]**o+(0.130273930089)*x[2]
-        arg[1,1,1,1]=(-0.330627830819)*x[0]**o+(-0.0311542935889)*x[0]+(-0.0671494148749)*x[1]**o+(0.583605469163)*x[1]+(-0.172083996069)*x[2]**o+(0.666718011074)*x[2]
-        arg[1,1,2,0]=(0.539618381063)*x[0]**o+(-0.546796237888)*x[0]+(0.857911750392)*x[1]**o+(0.119552731463)*x[1]+(0.329286820109)*x[2]**o+(0.637240649087)*x[2]
-        arg[1,1,2,1]=(-0.828603071334)*x[0]**o+(0.861799149065)*x[0]+(0.615224040538)*x[1]**o+(-0.0868985543263)*x[1]+(-0.206168997809)*x[2]**o+(0.311103719286)*x[2]
-        arg[1,2,0,0]=(0.695106867715)*x[0]**o+(-0.533303418727)*x[0]+(-0.393936955207)*x[1]**o+(-0.407635261686)*x[1]+(0.604346269147)*x[2]**o+(-0.10213061533)*x[2]
-        arg[1,2,0,1]=(0.338035309929)*x[0]**o+(0.517135412671)*x[0]+(0.277863735829)*x[1]**o+(-0.703417079398)*x[1]+(0.369398635984)*x[2]**o+(-0.952905070601)*x[2]
-        arg[1,2,1,0]=(0.937866603297)*x[0]**o+(0.436121631708)*x[0]+(0.568362098461)*x[1]**o+(0.223837722984)*x[1]+(-0.236896910941)*x[2]**o+(0.316114408308)*x[2]
-        arg[1,2,1,1]=(0.285714491932)*x[0]**o+(0.633321537987)*x[0]+(0.953737237202)*x[1]**o+(0.732065555924)*x[1]+(-0.515759068197)*x[2]**o+(-0.519775334889)*x[2]
-        arg[1,2,2,0]=(-0.0610222303479)*x[0]**o+(0.135974983944)*x[0]+(0.450213393447)*x[1]**o+(-0.44747541715)*x[1]+(-0.640660207187)*x[2]**o+(0.348457261119)*x[2]
-        arg[1,2,2,1]=(0.131753033369)*x[0]**o+(-0.311359549998)*x[0]+(0.445707767235)*x[1]**o+(-0.710795569938)*x[1]+(-0.746038648477)*x[2]**o+(-0.210414773188)*x[2]
-        arg[1,3,0,0]=(-0.323684061289)*x[0]**o+(-0.0937091220282)*x[0]+(-0.827884898323)*x[1]**o+(0.604442907568)*x[1]+(0.620923596379)*x[2]**o+(0.851758170763)*x[2]
-        arg[1,3,0,1]=(-0.269239872573)*x[0]**o+(-0.603248280988)*x[0]+(0.603804530326)*x[1]**o+(-0.331910095046)*x[1]+(-0.653877236308)*x[2]**o+(0.115434865132)*x[2]
-        arg[1,3,1,0]=(0.0531798412869)*x[0]**o+(0.292950346899)*x[0]+(-0.634376081823)*x[1]**o+(-0.775427771578)*x[1]+(-0.987113467149)*x[2]**o+(0.757980444447)*x[2]
-        arg[1,3,1,1]=(0.757807292214)*x[0]**o+(0.81778478971)*x[0]+(-0.619873148405)*x[1]**o+(0.0129855659138)*x[1]+(-0.282861093681)*x[2]**o+(0.667211104045)*x[2]
-        arg[1,3,2,0]=(-0.915205606853)*x[0]**o+(0.918704643459)*x[0]+(0.143238155504)*x[1]**o+(0.0285686377214)*x[1]+(-0.848712843243)*x[2]**o+(0.058647124862)*x[2]
-        arg[1,3,2,1]=(0.441487712831)*x[0]**o+(-0.626878272507)*x[0]+(-0.862579662295)*x[1]**o+(0.204629243832)*x[1]+(0.964143347265)*x[2]**o+(-0.399125844282)*x[2]
-        arg[1,4,0,0]=(-0.349791275126)*x[0]**o+(-0.140293844776)*x[0]+(-0.693879671138)*x[1]**o+(0.429290435637)*x[1]+(-0.892670314048)*x[2]**o+(-0.380777380409)*x[2]
-        arg[1,4,0,1]=(0.528712424647)*x[0]**o+(0.449268002671)*x[0]+(-0.202472214961)*x[1]**o+(-0.374762208851)*x[1]+(-0.625590920648)*x[2]**o+(-0.000776205555531)*x[2]
-        arg[1,4,1,0]=(0.00425881397184)*x[0]**o+(0.265831686248)*x[0]+(0.757626547866)*x[1]**o+(-0.934207064756)*x[1]+(0.541356932538)*x[2]**o+(0.217841597089)*x[2]
-        arg[1,4,1,1]=(-0.02422207106)*x[0]**o+(-0.807018149115)*x[0]+(-0.402347046418)*x[1]**o+(-0.0548851919048)*x[1]+(0.850202044077)*x[2]**o+(-0.889576261979)*x[2]
-        arg[1,4,2,0]=(0.487059068561)*x[0]**o+(0.338254525003)*x[0]+(-0.387019663154)*x[1]**o+(-0.436969552236)*x[1]+(-0.747690766603)*x[2]**o+(0.265854907003)*x[2]
-        arg[1,4,2,1]=(0.687562221132)*x[0]**o+(0.4755782976)*x[0]+(-0.456287111804)*x[1]**o+(0.412138123928)*x[1]+(0.637920334647)*x[2]**o+(0.817007725525)*x[2]
-        arg[2,0,0,0]=(-0.728166422776)*x[0]**o+(0.108904177195)*x[0]+(0.383848108635)*x[1]**o+(-0.19252707292)*x[1]+(-0.279319122495)*x[2]**o+(-0.0530727745585)*x[2]
-        arg[2,0,0,1]=(0.380827452272)*x[0]**o+(-0.133776280687)*x[0]+(-0.174731551283)*x[1]**o+(-0.369231086652)*x[1]+(-0.0190771818046)*x[2]**o+(-0.331873068919)*x[2]
-        arg[2,0,1,0]=(0.653644298826)*x[0]**o+(-0.916110182689)*x[0]+(0.0510855252492)*x[1]**o+(-0.934192949208)*x[1]+(0.572048462784)*x[2]**o+(-0.451401856863)*x[2]
-        arg[2,0,1,1]=(-0.394958497502)*x[0]**o+(-0.690752972227)*x[0]+(-0.436352069349)*x[1]**o+(0.933524576573)*x[1]+(-0.524344161699)*x[2]**o+(0.526748792776)*x[2]
-        arg[2,0,2,0]=(0.845649523782)*x[0]**o+(0.63927747558)*x[0]+(-0.534192218216)*x[1]**o+(0.714500925459)*x[1]+(0.156077814898)*x[2]**o+(-0.193712778792)*x[2]
-        arg[2,0,2,1]=(0.809636640413)*x[0]**o+(-0.930654037481)*x[0]+(0.509441692942)*x[1]**o+(0.881563824585)*x[1]+(0.101333749057)*x[2]**o+(0.418791722704)*x[2]
-        arg[2,1,0,0]=(0.289481281745)*x[0]**o+(-0.98279193802)*x[0]+(-0.443382747319)*x[1]**o+(-0.281710992472)*x[1]+(0.426349350391)*x[2]**o+(-0.870192121251)*x[2]
-        arg[2,1,0,1]=(0.837046002753)*x[0]**o+(-0.0254166983371)*x[0]+(0.30178635814)*x[1]**o+(0.973915444924)*x[1]+(0.298631524734)*x[2]**o+(-0.422490970248)*x[2]
-        arg[2,1,1,0]=(0.869799082394)*x[0]**o+(0.376436513628)*x[0]+(-0.74735679118)*x[1]**o+(0.477184335901)*x[1]+(-0.797472924916)*x[2]**o+(-0.568827873964)*x[2]
-        arg[2,1,1,1]=(0.993441009779)*x[0]**o+(-0.264888299493)*x[0]+(0.861197560367)*x[1]**o+(-0.769058084144)*x[1]+(-0.86221947415)*x[2]**o+(-0.617024169672)*x[2]
-        arg[2,1,2,0]=(-0.89303691749)*x[0]**o+(-0.390287412175)*x[0]+(-0.312883084291)*x[1]**o+(-0.432368502641)*x[1]+(-0.121476666357)*x[2]**o+(0.416361314288)*x[2]
-        arg[2,1,2,1]=(-0.622214426504)*x[0]**o+(-0.595279134338)*x[0]+(0.000927173498715)*x[1]**o+(0.783001179117)*x[1]+(-0.956003738061)*x[2]**o+(0.482321214492)*x[2]
-        arg[2,2,0,0]=(-0.0047994639068)*x[0]**o+(0.478805093492)*x[0]+(0.747825846519)*x[1]**o+(0.0756064430807)*x[1]+(-0.470534826525)*x[2]**o+(-0.421524571831)*x[2]
-        arg[2,2,0,1]=(-0.0569198078126)*x[0]**o+(-0.36284856463)*x[0]+(-0.374343856016)*x[1]**o+(0.193470734451)*x[1]+(0.425350990791)*x[2]**o+(-0.903309757487)*x[2]
-        arg[2,2,1,0]=(0.602075251229)*x[0]**o+(-0.558163518701)*x[0]+(-0.00146699467501)*x[1]**o+(0.437116756605)*x[1]+(-0.252696658318)*x[2]**o+(0.154017654456)*x[2]
-        arg[2,2,1,1]=(0.226970288166)*x[0]**o+(0.844076458869)*x[0]+(0.231874137232)*x[1]**o+(-0.270233945335)*x[1]+(0.365979082276)*x[2]**o+(-0.937144802776)*x[2]
-        arg[2,2,2,0]=(0.662440813722)*x[0]**o+(-0.600830429698)*x[0]+(0.248436486724)*x[1]**o+(0.73439963812)*x[1]+(-0.406317484259)*x[2]**o+(-0.406641354653)*x[2]
-        arg[2,2,2,1]=(0.948630940404)*x[0]**o+(-0.695098513788)*x[0]+(-0.819843883615)*x[1]**o+(0.0479609386435)*x[1]+(-0.968033045837)*x[2]**o+(0.199490071238)*x[2]
-        arg[2,3,0,0]=(0.967996364186)*x[0]**o+(0.562562580668)*x[0]+(0.660658005197)*x[1]**o+(-0.00126241998808)*x[1]+(-0.0188273819622)*x[2]**o+(-0.798370566647)*x[2]
-        arg[2,3,0,1]=(0.108137383906)*x[0]**o+(0.230815090379)*x[0]+(-0.0817434914408)*x[1]**o+(0.256977068172)*x[1]+(0.323454379512)*x[2]**o+(0.0382049771532)*x[2]
-        arg[2,3,1,0]=(-0.279443973124)*x[0]**o+(-0.948014830608)*x[0]+(-0.237787814838)*x[1]**o+(-0.880632864876)*x[1]+(0.305230465688)*x[2]**o+(0.722139326346)*x[2]
-        arg[2,3,1,1]=(-0.192752669063)*x[0]**o+(0.763575125553)*x[0]+(-0.317096602795)*x[1]**o+(-0.241479822867)*x[1]+(0.643154065804)*x[2]**o+(0.903250562165)*x[2]
-        arg[2,3,2,0]=(0.58153852366)*x[0]**o+(-0.131284078682)*x[0]+(0.803022288461)*x[1]**o+(0.862074208938)*x[1]+(0.934648335783)*x[2]**o+(0.720337200812)*x[2]
-        arg[2,3,2,1]=(-0.866755142782)*x[0]**o+(0.299995782189)*x[0]+(0.830022439718)*x[1]**o+(0.787775630269)*x[1]+(-0.436980900353)*x[2]**o+(0.436719598692)*x[2]
-        arg[2,4,0,0]=(-0.416946111972)*x[0]**o+(-0.342692819134)*x[0]+(-0.265712927184)*x[1]**o+(-0.503154497528)*x[1]+(0.436447837569)*x[2]**o+(-0.514226068117)*x[2]
-        arg[2,4,0,1]=(-0.915995315837)*x[0]**o+(-0.562870475868)*x[0]+(0.158881525561)*x[1]**o+(-0.458461594412)*x[1]+(-0.117927681987)*x[2]**o+(-0.697751714189)*x[2]
-        arg[2,4,1,0]=(-0.961291698815)*x[0]**o+(0.457487466485)*x[0]+(0.170987701633)*x[1]**o+(-0.14226156627)*x[1]+(-0.663462703057)*x[2]**o+(-0.0307934454283)*x[2]
-        arg[2,4,1,1]=(0.588162542138)*x[0]**o+(-0.761783611043)*x[0]+(0.510241246326)*x[1]**o+(0.805053446677)*x[1]+(-0.851391511147)*x[2]**o+(-0.0976037736598)*x[2]
-        arg[2,4,2,0]=(0.649047985858)*x[0]**o+(0.677435498282)*x[0]+(-0.620777977748)*x[1]**o+(-0.209440794016)*x[1]+(0.58009322661)*x[2]**o+(0.56317180284)*x[2]
-        arg[2,4,2,1]=(-0.975596464331)*x[0]**o+(0.759364271658)*x[0]+(0.43142780149)*x[1]**o+(-0.701043203786)*x[1]+(-0.648159388134)*x[2]**o+(-0.129618261144)*x[2]
-        arg[3,0,0,0]=(-0.0207100058532)*x[0]**o+(-0.829637327952)*x[0]+(-0.0326040806041)*x[1]**o+(0.652320712227)*x[1]+(-0.509435869246)*x[2]**o+(-0.66044392521)*x[2]
-        arg[3,0,0,1]=(-0.312677151974)*x[0]**o+(0.0204494340128)*x[0]+(-0.989457740146)*x[1]**o+(-0.0606077687298)*x[1]+(-0.527267756606)*x[2]**o+(0.496006274201)*x[2]
-        arg[3,0,1,0]=(0.842871894549)*x[0]**o+(-0.577687338895)*x[0]+(0.414019506131)*x[1]**o+(0.0410521331015)*x[1]+(-0.830482660184)*x[2]**o+(0.688692187619)*x[2]
-        arg[3,0,1,1]=(-0.920070939376)*x[0]**o+(0.632972952755)*x[0]+(0.944186412149)*x[1]**o+(0.620319712728)*x[1]+(-0.171433727161)*x[2]**o+(0.267125744191)*x[2]
-        arg[3,0,2,0]=(-0.0669535338492)*x[0]**o+(0.249181230746)*x[0]+(-0.147448553328)*x[1]**o+(-0.459701695839)*x[1]+(0.378458172384)*x[2]**o+(0.916594147889)*x[2]
-        arg[3,0,2,1]=(0.0720111269432)*x[0]**o+(-0.390032127319)*x[0]+(-0.115565740734)*x[1]**o+(0.501210832815)*x[1]+(0.568129023658)*x[2]**o+(-0.303909080042)*x[2]
-        arg[3,1,0,0]=(0.205675480731)*x[0]**o+(-0.843093328795)*x[0]+(-0.812415573635)*x[1]**o+(-0.706806177394)*x[1]+(-0.158442718286)*x[2]**o+(0.15187176613)*x[2]
-        arg[3,1,0,1]=(0.149669308017)*x[0]**o+(0.487445503149)*x[0]+(-0.27973905833)*x[1]**o+(-0.504992462225)*x[1]+(-0.728166691522)*x[2]**o+(0.734846267391)*x[2]
-        arg[3,1,1,0]=(0.0410578015251)*x[0]**o+(-0.525001495676)*x[0]+(-0.512685697472)*x[1]**o+(-0.284314686987)*x[1]+(0.888112049081)*x[2]**o+(0.425466793802)*x[2]
-        arg[3,1,1,1]=(-0.374237047043)*x[0]**o+(-0.00078724690461)*x[0]+(0.849952487348)*x[1]**o+(-0.654945893799)*x[1]+(-0.536739132177)*x[2]**o+(0.20919294066)*x[2]
-        arg[3,1,2,0]=(0.685749084068)*x[0]**o+(-0.730378478543)*x[0]+(-0.918072746761)*x[1]**o+(-0.706713872062)*x[1]+(-0.486100957526)*x[2]**o+(0.95736939257)*x[2]
-        arg[3,1,2,1]=(-0.287859736321)*x[0]**o+(-0.271882215207)*x[0]+(-0.673357024623)*x[1]**o+(0.702867457627)*x[1]+(0.78445294416)*x[2]**o+(0.613888365259)*x[2]
-        arg[3,2,0,0]=(0.568506008135)*x[0]**o+(-0.825947283734)*x[0]+(0.687369924271)*x[1]**o+(-0.866597782569)*x[1]+(-0.332810902355)*x[2]**o+(0.499502049139)*x[2]
-        arg[3,2,0,1]=(0.757251773732)*x[0]**o+(0.293337812465)*x[0]+(0.686709285382)*x[1]**o+(-0.084997189402)*x[1]+(-0.338903817381)*x[2]**o+(-0.787646799698)*x[2]
-        arg[3,2,1,0]=(-0.580327419983)*x[0]**o+(-0.603952498996)*x[0]+(0.523057988618)*x[1]**o+(-0.0835187394107)*x[1]+(0.459827887147)*x[2]**o+(0.689021201042)*x[2]
-        arg[3,2,1,1]=(-0.41923416619)*x[0]**o+(0.0406426957237)*x[0]+(-0.908041008186)*x[1]**o+(0.382097138462)*x[1]+(0.66835706849)*x[2]**o+(0.355849275378)*x[2]
-        arg[3,2,2,0]=(-0.133756767108)*x[0]**o+(-0.233743496333)*x[0]+(-0.661420120856)*x[1]**o+(0.788722576584)*x[1]+(-0.131764585707)*x[2]**o+(-0.781004479871)*x[2]
-        arg[3,2,2,1]=(0.0308645139784)*x[0]**o+(-0.194986246344)*x[0]+(-0.267418187303)*x[1]**o+(0.332143733168)*x[1]+(0.513266431894)*x[2]**o+(0.594016981473)*x[2]
-        arg[3,3,0,0]=(0.644314102613)*x[0]**o+(-0.977355279476)*x[0]+(0.516452323667)*x[1]**o+(0.172873579919)*x[1]+(0.778904819969)*x[2]**o+(0.559689750425)*x[2]
-        arg[3,3,0,1]=(0.736135986201)*x[0]**o+(0.366918250826)*x[0]+(-0.0547007988818)*x[1]**o+(-0.830174436433)*x[1]+(0.613440124338)*x[2]**o+(0.574992469591)*x[2]
-        arg[3,3,1,0]=(0.324504938146)*x[0]**o+(-0.915240176689)*x[0]+(-0.398105336249)*x[1]**o+(-0.526498343533)*x[1]+(0.43264573336)*x[2]**o+(0.393008086529)*x[2]
-        arg[3,3,1,1]=(0.926367438323)*x[0]**o+(0.526364305462)*x[0]+(0.15596582236)*x[1]**o+(0.165158439711)*x[1]+(-0.508505348973)*x[2]**o+(-0.603637833992)*x[2]
-        arg[3,3,2,0]=(0.661333046004)*x[0]**o+(0.425320373512)*x[0]+(-0.810809051016)*x[1]**o+(0.20446843023)*x[1]+(0.685136412413)*x[2]**o+(-0.0281127019894)*x[2]
-        arg[3,3,2,1]=(0.851742499007)*x[0]**o+(-0.405506974975)*x[0]+(-0.296768983731)*x[1]**o+(0.389557354929)*x[1]+(0.335108341463)*x[2]**o+(0.0313094433351)*x[2]
-        arg[3,4,0,0]=(0.0415035498649)*x[0]**o+(0.827106496882)*x[0]+(-0.481831487377)*x[1]**o+(-0.14935685817)*x[1]+(0.354765095566)*x[2]**o+(0.521898910137)*x[2]
-        arg[3,4,0,1]=(-0.36328099035)*x[0]**o+(-0.243342386595)*x[0]+(0.0475935188475)*x[1]**o+(0.845308417697)*x[1]+(0.315259620082)*x[2]**o+(0.541313742759)*x[2]
-        arg[3,4,1,0]=(-0.66364149672)*x[0]**o+(0.987505978353)*x[0]+(-0.337659775957)*x[1]**o+(0.197277151989)*x[1]+(-0.431260870605)*x[2]**o+(-0.803375909471)*x[2]
-        arg[3,4,1,1]=(0.722104365428)*x[0]**o+(0.168416682879)*x[0]+(-0.415740544748)*x[1]**o+(-0.437836696476)*x[1]+(-0.280581752598)*x[2]**o+(0.434326371762)*x[2]
-        arg[3,4,2,0]=(0.673144889684)*x[0]**o+(-0.0628529591764)*x[0]+(0.0161458704408)*x[1]**o+(-0.439966404278)*x[1]+(-0.963402070447)*x[2]**o+(0.308312287021)*x[2]
-        arg[3,4,2,1]=(0.649131384887)*x[0]**o+(-0.825086043001)*x[0]+(0.204615530143)*x[1]**o+(0.00801105023644)*x[1]+(-0.234754758061)*x[2]**o+(0.659650083864)*x[2]
-        ref[0,0,0,0]=(-0.928996629952)*x_ref[0]**o+(-0.171383074114)*x_ref[0]+(-0.324423798901)*x_ref[1]**o+(-0.801354053962)*x_ref[1]+(0.365256142808)*x_ref[2]**o+(0.126262208857)*x_ref[2]
-        ref[0,0,0,1]=(0.326024843626)*x_ref[0]**o+(-0.0091566240426)*x_ref[0]+(-0.0396235158589)*x_ref[1]**o+(-0.753302577837)*x_ref[1]+(-0.38709916587)*x_ref[2]**o+(-0.28660316595)*x_ref[2]
-        ref[0,0,1,0]=(0.755338255506)*x_ref[0]**o+(0.851895434343)*x_ref[0]+(0.419119464402)*x_ref[1]**o+(0.670733085023)*x_ref[1]+(0.819398310958)*x_ref[2]**o+(0.476185335773)*x_ref[2]
-        ref[0,0,1,1]=(-0.981416259131)*x_ref[0]**o+(-0.97000252267)*x_ref[0]+(-0.132624451699)*x_ref[1]**o+(-0.261428370649)*x_ref[1]+(-0.349245951727)*x_ref[2]**o+(-0.717343195877)*x_ref[2]
-        ref[0,0,2,0]=(-0.874826075266)*x_ref[0]**o+(-0.399307905707)*x_ref[0]+(0.350873599317)*x_ref[1]**o+(0.15861651992)*x_ref[1]+(0.396279933216)*x_ref[2]**o+(0.92332515708)*x_ref[2]
-        ref[0,0,2,1]=(-0.183596683527)*x_ref[0]**o+(-0.115194639348)*x_ref[0]+(0.616111723618)*x_ref[1]**o+(-0.402157657669)*x_ref[1]+(0.44145594193)*x_ref[2]**o+(0.686052407784)*x_ref[2]
-        ref[0,1,0,0]=(-0.669169178244)*x_ref[0]**o+(0.835937801609)*x_ref[0]+(0.468805302181)*x_ref[1]**o+(-0.627292634023)*x_ref[1]+(-0.674361231979)*x_ref[2]**o+(-0.00929181785129)*x_ref[2]
-        ref[0,1,0,1]=(-0.568131655705)*x_ref[0]**o+(0.690366535852)*x_ref[0]+(-0.212524396914)*x_ref[1]**o+(-0.767983769407)*x_ref[1]+(0.477500128569)*x_ref[2]**o+(-0.0190887598644)*x_ref[2]
-        ref[0,1,1,0]=(-0.374170635822)*x_ref[0]**o+(0.0169009974558)*x_ref[0]+(-0.162519103357)*x_ref[1]**o+(0.786991144449)*x_ref[1]+(0.0590294918131)*x_ref[2]**o+(-0.213442509309)*x_ref[2]
-        ref[0,1,1,1]=(-0.558268657439)*x_ref[0]**o+(0.584734933669)*x_ref[0]+(-0.650790013689)*x_ref[1]**o+(-0.192849048407)*x_ref[1]+(0.505458636714)*x_ref[2]**o+(-0.585174281371)*x_ref[2]
-        ref[0,1,2,0]=(-0.933243590775)*x_ref[0]**o+(0.528060249767)*x_ref[0]+(-0.763255746252)*x_ref[1]**o+(0.771589118163)*x_ref[1]+(-0.641287604338)*x_ref[2]**o+(0.379566401585)*x_ref[2]
-        ref[0,1,2,1]=(-0.836976373935)*x_ref[0]**o+(-0.969434110974)*x_ref[0]+(0.758148372888)*x_ref[1]**o+(-0.89212062535)*x_ref[1]+(0.788693820015)*x_ref[2]**o+(-0.620704367414)*x_ref[2]
-        ref[0,2,0,0]=(0.0163117360814)*x_ref[0]**o+(-0.390867752068)*x_ref[0]+(-0.725068297982)*x_ref[1]**o+(-0.680312496646)*x_ref[1]+(0.069273494969)*x_ref[2]**o+(-0.576122275696)*x_ref[2]
-        ref[0,2,0,1]=(0.461771197614)*x_ref[0]**o+(-0.767541404109)*x_ref[0]+(-0.694279263622)*x_ref[1]**o+(-0.721448812749)*x_ref[1]+(0.248787896584)*x_ref[2]**o+(0.237075401327)*x_ref[2]
-        ref[0,2,1,0]=(0.381987012965)*x_ref[0]**o+(-0.288236233238)*x_ref[0]+(-0.519012025084)*x_ref[1]**o+(-0.256658293082)*x_ref[1]+(0.807322167368)*x_ref[2]**o+(-0.261916179859)*x_ref[2]
-        ref[0,2,1,1]=(0.257241267407)*x_ref[0]**o+(-0.470612990721)*x_ref[0]+(-0.208612656448)*x_ref[1]**o+(0.839646962914)*x_ref[1]+(0.916675150494)*x_ref[2]**o+(-0.165468351005)*x_ref[2]
-        ref[0,2,2,0]=(0.92569232521)*x_ref[0]**o+(0.809982458308)*x_ref[0]+(-0.860530305336)*x_ref[1]**o+(0.261687622817)*x_ref[1]+(0.948003684651)*x_ref[2]**o+(-0.473133742361)*x_ref[2]
-        ref[0,2,2,1]=(-0.113846814874)*x_ref[0]**o+(0.680846459377)*x_ref[0]+(0.920219149741)*x_ref[1]**o+(0.172027554503)*x_ref[1]+(0.475330041115)*x_ref[2]**o+(-0.176218891429)*x_ref[2]
-        ref[0,3,0,0]=(-0.948638294297)*x_ref[0]**o+(-0.0411621070703)*x_ref[0]+(-0.294759271027)*x_ref[1]**o+(-0.903733455086)*x_ref[1]+(-0.995253733593)*x_ref[2]**o+(0.106726960462)*x_ref[2]
-        ref[0,3,0,1]=(0.1592709614)*x_ref[0]**o+(0.0683266445293)*x_ref[0]+(0.336092506745)*x_ref[1]**o+(-0.209047739881)*x_ref[1]+(-0.330417243459)*x_ref[2]**o+(-0.809242647755)*x_ref[2]
-        ref[0,3,1,0]=(-0.680637516359)*x_ref[0]**o+(-0.713405815404)*x_ref[0]+(-0.484624435043)*x_ref[1]**o+(-0.279314462332)*x_ref[1]+(-0.458856066504)*x_ref[2]**o+(0.0588111305227)*x_ref[2]
-        ref[0,3,1,1]=(-0.853676338655)*x_ref[0]**o+(-0.651539814195)*x_ref[0]+(-0.109727277725)*x_ref[1]**o+(0.0139006407942)*x_ref[1]+(0.231943245426)*x_ref[2]**o+(0.42972517233)*x_ref[2]
-        ref[0,3,2,0]=(-0.60799269765)*x_ref[0]**o+(-0.802413269128)*x_ref[0]+(0.151362498863)*x_ref[1]**o+(-0.678226252875)*x_ref[1]+(-0.867117685659)*x_ref[2]**o+(-0.711982116071)*x_ref[2]
-        ref[0,3,2,1]=(-0.243012743941)*x_ref[0]**o+(-0.692614579016)*x_ref[0]+(0.0986817641914)*x_ref[1]**o+(-0.495735862695)*x_ref[1]+(-0.430040681653)*x_ref[2]**o+(0.0108928722284)*x_ref[2]
-        ref[0,4,0,0]=(0.0989402181558)*x_ref[0]**o+(-0.60096719882)*x_ref[0]+(-0.324253928432)*x_ref[1]**o+(-0.862723687559)*x_ref[1]+(-0.34745416427)*x_ref[2]**o+(0.936559074873)*x_ref[2]
-        ref[0,4,0,1]=(0.711021967566)*x_ref[0]**o+(-0.939408401113)*x_ref[0]+(-0.218100921633)*x_ref[1]**o+(0.92835194875)*x_ref[1]+(-0.353936913865)*x_ref[2]**o+(-0.547266090928)*x_ref[2]
-        ref[0,4,1,0]=(0.172231614188)*x_ref[0]**o+(-0.734622090671)*x_ref[0]+(0.432686916647)*x_ref[1]**o+(0.552595350492)*x_ref[1]+(0.779662641076)*x_ref[2]**o+(-0.0933220492779)*x_ref[2]
-        ref[0,4,1,1]=(0.996776716866)*x_ref[0]**o+(-0.340786520686)*x_ref[0]+(0.260075214171)*x_ref[1]**o+(0.00385504852496)*x_ref[1]+(0.377516772127)*x_ref[2]**o+(-0.341751634181)*x_ref[2]
-        ref[0,4,2,0]=(-0.655642896664)*x_ref[0]**o+(-0.840525173737)*x_ref[0]+(-0.855343721564)*x_ref[1]**o+(0.253558571524)*x_ref[1]+(0.0463733059925)*x_ref[2]**o+(-0.116359866912)*x_ref[2]
-        ref[0,4,2,1]=(0.131619661414)*x_ref[0]**o+(-0.162067255954)*x_ref[0]+(0.562536831367)*x_ref[1]**o+(-0.940412472035)*x_ref[1]+(-0.282265762783)*x_ref[2]**o+(0.634711607923)*x_ref[2]
-        ref[1,0,0,0]=(0.484071808097)*x_ref[0]**o+(0.566763524691)*x_ref[0]+(-0.658614173653)*x_ref[1]**o+(-0.140192232895)*x_ref[1]+(-0.310114236409)*x_ref[2]**o+(-0.918532401595)*x_ref[2]
-        ref[1,0,0,1]=(-0.81190380441)*x_ref[0]**o+(0.644439878497)*x_ref[0]+(0.479583403289)*x_ref[1]**o+(-0.493318882779)*x_ref[1]+(-0.424704492175)*x_ref[2]**o+(0.700624317732)*x_ref[2]
-        ref[1,0,1,0]=(0.766650182435)*x_ref[0]**o+(0.226365545129)*x_ref[0]+(0.510828945971)*x_ref[1]**o+(0.283221954498)*x_ref[1]+(0.817303877886)*x_ref[2]**o+(-0.245709044628)*x_ref[2]
-        ref[1,0,1,1]=(0.194787112664)*x_ref[0]**o+(-0.879306736922)*x_ref[0]+(0.185381291627)*x_ref[1]**o+(-0.510692743975)*x_ref[1]+(-0.422555014055)*x_ref[2]**o+(0.556629919959)*x_ref[2]
-        ref[1,0,2,0]=(-0.958345828895)*x_ref[0]**o+(-0.667735551013)*x_ref[0]+(0.278271284225)*x_ref[1]**o+(-0.0847995194757)*x_ref[1]+(0.902184171441)*x_ref[2]**o+(0.763125168854)*x_ref[2]
-        ref[1,0,2,1]=(-0.0766429670195)*x_ref[0]**o+(0.894421139029)*x_ref[0]+(-0.331560314101)*x_ref[1]**o+(-0.0253297623997)*x_ref[1]+(0.13406045967)*x_ref[2]**o+(-0.326681111625)*x_ref[2]
-        ref[1,1,0,0]=(-0.979406855838)*x_ref[0]**o+(0.528849909402)*x_ref[0]+(-0.0486159476737)*x_ref[1]**o+(-0.898392512695)*x_ref[1]+(-0.678328327407)*x_ref[2]**o+(0.644201802057)*x_ref[2]
-        ref[1,1,0,1]=(-0.977485554605)*x_ref[0]**o+(0.794799941538)*x_ref[0]+(-0.00237183848504)*x_ref[1]**o+(-0.633497483149)*x_ref[1]+(0.746593853568)*x_ref[2]**o+(0.197741126365)*x_ref[2]
-        ref[1,1,1,0]=(0.379985506182)*x_ref[0]**o+(0.69889144234)*x_ref[0]+(-0.507293887409)*x_ref[1]**o+(-0.727675545291)*x_ref[1]+(-0.467064531693)*x_ref[2]**o+(0.130273930089)*x_ref[2]
-        ref[1,1,1,1]=(-0.330627830819)*x_ref[0]**o+(-0.0311542935889)*x_ref[0]+(-0.0671494148749)*x_ref[1]**o+(0.583605469163)*x_ref[1]+(-0.172083996069)*x_ref[2]**o+(0.666718011074)*x_ref[2]
-        ref[1,1,2,0]=(0.539618381063)*x_ref[0]**o+(-0.546796237888)*x_ref[0]+(0.857911750392)*x_ref[1]**o+(0.119552731463)*x_ref[1]+(0.329286820109)*x_ref[2]**o+(0.637240649087)*x_ref[2]
-        ref[1,1,2,1]=(-0.828603071334)*x_ref[0]**o+(0.861799149065)*x_ref[0]+(0.615224040538)*x_ref[1]**o+(-0.0868985543263)*x_ref[1]+(-0.206168997809)*x_ref[2]**o+(0.311103719286)*x_ref[2]
-        ref[1,2,0,0]=(0.695106867715)*x_ref[0]**o+(-0.533303418727)*x_ref[0]+(-0.393936955207)*x_ref[1]**o+(-0.407635261686)*x_ref[1]+(0.604346269147)*x_ref[2]**o+(-0.10213061533)*x_ref[2]
-        ref[1,2,0,1]=(0.338035309929)*x_ref[0]**o+(0.517135412671)*x_ref[0]+(0.277863735829)*x_ref[1]**o+(-0.703417079398)*x_ref[1]+(0.369398635984)*x_ref[2]**o+(-0.952905070601)*x_ref[2]
-        ref[1,2,1,0]=(0.937866603297)*x_ref[0]**o+(0.436121631708)*x_ref[0]+(0.568362098461)*x_ref[1]**o+(0.223837722984)*x_ref[1]+(-0.236896910941)*x_ref[2]**o+(0.316114408308)*x_ref[2]
-        ref[1,2,1,1]=(0.285714491932)*x_ref[0]**o+(0.633321537987)*x_ref[0]+(0.953737237202)*x_ref[1]**o+(0.732065555924)*x_ref[1]+(-0.515759068197)*x_ref[2]**o+(-0.519775334889)*x_ref[2]
-        ref[1,2,2,0]=(-0.0610222303479)*x_ref[0]**o+(0.135974983944)*x_ref[0]+(0.450213393447)*x_ref[1]**o+(-0.44747541715)*x_ref[1]+(-0.640660207187)*x_ref[2]**o+(0.348457261119)*x_ref[2]
-        ref[1,2,2,1]=(0.131753033369)*x_ref[0]**o+(-0.311359549998)*x_ref[0]+(0.445707767235)*x_ref[1]**o+(-0.710795569938)*x_ref[1]+(-0.746038648477)*x_ref[2]**o+(-0.210414773188)*x_ref[2]
-        ref[1,3,0,0]=(-0.323684061289)*x_ref[0]**o+(-0.0937091220282)*x_ref[0]+(-0.827884898323)*x_ref[1]**o+(0.604442907568)*x_ref[1]+(0.620923596379)*x_ref[2]**o+(0.851758170763)*x_ref[2]
-        ref[1,3,0,1]=(-0.269239872573)*x_ref[0]**o+(-0.603248280988)*x_ref[0]+(0.603804530326)*x_ref[1]**o+(-0.331910095046)*x_ref[1]+(-0.653877236308)*x_ref[2]**o+(0.115434865132)*x_ref[2]
-        ref[1,3,1,0]=(0.0531798412869)*x_ref[0]**o+(0.292950346899)*x_ref[0]+(-0.634376081823)*x_ref[1]**o+(-0.775427771578)*x_ref[1]+(-0.987113467149)*x_ref[2]**o+(0.757980444447)*x_ref[2]
-        ref[1,3,1,1]=(0.757807292214)*x_ref[0]**o+(0.81778478971)*x_ref[0]+(-0.619873148405)*x_ref[1]**o+(0.0129855659138)*x_ref[1]+(-0.282861093681)*x_ref[2]**o+(0.667211104045)*x_ref[2]
-        ref[1,3,2,0]=(-0.915205606853)*x_ref[0]**o+(0.918704643459)*x_ref[0]+(0.143238155504)*x_ref[1]**o+(0.0285686377214)*x_ref[1]+(-0.848712843243)*x_ref[2]**o+(0.058647124862)*x_ref[2]
-        ref[1,3,2,1]=(0.441487712831)*x_ref[0]**o+(-0.626878272507)*x_ref[0]+(-0.862579662295)*x_ref[1]**o+(0.204629243832)*x_ref[1]+(0.964143347265)*x_ref[2]**o+(-0.399125844282)*x_ref[2]
-        ref[1,4,0,0]=(-0.349791275126)*x_ref[0]**o+(-0.140293844776)*x_ref[0]+(-0.693879671138)*x_ref[1]**o+(0.429290435637)*x_ref[1]+(-0.892670314048)*x_ref[2]**o+(-0.380777380409)*x_ref[2]
-        ref[1,4,0,1]=(0.528712424647)*x_ref[0]**o+(0.449268002671)*x_ref[0]+(-0.202472214961)*x_ref[1]**o+(-0.374762208851)*x_ref[1]+(-0.625590920648)*x_ref[2]**o+(-0.000776205555531)*x_ref[2]
-        ref[1,4,1,0]=(0.00425881397184)*x_ref[0]**o+(0.265831686248)*x_ref[0]+(0.757626547866)*x_ref[1]**o+(-0.934207064756)*x_ref[1]+(0.541356932538)*x_ref[2]**o+(0.217841597089)*x_ref[2]
-        ref[1,4,1,1]=(-0.02422207106)*x_ref[0]**o+(-0.807018149115)*x_ref[0]+(-0.402347046418)*x_ref[1]**o+(-0.0548851919048)*x_ref[1]+(0.850202044077)*x_ref[2]**o+(-0.889576261979)*x_ref[2]
-        ref[1,4,2,0]=(0.487059068561)*x_ref[0]**o+(0.338254525003)*x_ref[0]+(-0.387019663154)*x_ref[1]**o+(-0.436969552236)*x_ref[1]+(-0.747690766603)*x_ref[2]**o+(0.265854907003)*x_ref[2]
-        ref[1,4,2,1]=(0.687562221132)*x_ref[0]**o+(0.4755782976)*x_ref[0]+(-0.456287111804)*x_ref[1]**o+(0.412138123928)*x_ref[1]+(0.637920334647)*x_ref[2]**o+(0.817007725525)*x_ref[2]
-        ref[2,0,0,0]=(-0.728166422776)*x_ref[0]**o+(0.108904177195)*x_ref[0]+(0.383848108635)*x_ref[1]**o+(-0.19252707292)*x_ref[1]+(-0.279319122495)*x_ref[2]**o+(-0.0530727745585)*x_ref[2]
-        ref[2,0,0,1]=(0.380827452272)*x_ref[0]**o+(-0.133776280687)*x_ref[0]+(-0.174731551283)*x_ref[1]**o+(-0.369231086652)*x_ref[1]+(-0.0190771818046)*x_ref[2]**o+(-0.331873068919)*x_ref[2]
-        ref[2,0,1,0]=(0.653644298826)*x_ref[0]**o+(-0.916110182689)*x_ref[0]+(0.0510855252492)*x_ref[1]**o+(-0.934192949208)*x_ref[1]+(0.572048462784)*x_ref[2]**o+(-0.451401856863)*x_ref[2]
-        ref[2,0,1,1]=(-0.394958497502)*x_ref[0]**o+(-0.690752972227)*x_ref[0]+(-0.436352069349)*x_ref[1]**o+(0.933524576573)*x_ref[1]+(-0.524344161699)*x_ref[2]**o+(0.526748792776)*x_ref[2]
-        ref[2,0,2,0]=(0.845649523782)*x_ref[0]**o+(0.63927747558)*x_ref[0]+(-0.534192218216)*x_ref[1]**o+(0.714500925459)*x_ref[1]+(0.156077814898)*x_ref[2]**o+(-0.193712778792)*x_ref[2]
-        ref[2,0,2,1]=(0.809636640413)*x_ref[0]**o+(-0.930654037481)*x_ref[0]+(0.509441692942)*x_ref[1]**o+(0.881563824585)*x_ref[1]+(0.101333749057)*x_ref[2]**o+(0.418791722704)*x_ref[2]
-        ref[2,1,0,0]=(0.289481281745)*x_ref[0]**o+(-0.98279193802)*x_ref[0]+(-0.443382747319)*x_ref[1]**o+(-0.281710992472)*x_ref[1]+(0.426349350391)*x_ref[2]**o+(-0.870192121251)*x_ref[2]
-        ref[2,1,0,1]=(0.837046002753)*x_ref[0]**o+(-0.0254166983371)*x_ref[0]+(0.30178635814)*x_ref[1]**o+(0.973915444924)*x_ref[1]+(0.298631524734)*x_ref[2]**o+(-0.422490970248)*x_ref[2]
-        ref[2,1,1,0]=(0.869799082394)*x_ref[0]**o+(0.376436513628)*x_ref[0]+(-0.74735679118)*x_ref[1]**o+(0.477184335901)*x_ref[1]+(-0.797472924916)*x_ref[2]**o+(-0.568827873964)*x_ref[2]
-        ref[2,1,1,1]=(0.993441009779)*x_ref[0]**o+(-0.264888299493)*x_ref[0]+(0.861197560367)*x_ref[1]**o+(-0.769058084144)*x_ref[1]+(-0.86221947415)*x_ref[2]**o+(-0.617024169672)*x_ref[2]
-        ref[2,1,2,0]=(-0.89303691749)*x_ref[0]**o+(-0.390287412175)*x_ref[0]+(-0.312883084291)*x_ref[1]**o+(-0.432368502641)*x_ref[1]+(-0.121476666357)*x_ref[2]**o+(0.416361314288)*x_ref[2]
-        ref[2,1,2,1]=(-0.622214426504)*x_ref[0]**o+(-0.595279134338)*x_ref[0]+(0.000927173498715)*x_ref[1]**o+(0.783001179117)*x_ref[1]+(-0.956003738061)*x_ref[2]**o+(0.482321214492)*x_ref[2]
-        ref[2,2,0,0]=(-0.0047994639068)*x_ref[0]**o+(0.478805093492)*x_ref[0]+(0.747825846519)*x_ref[1]**o+(0.0756064430807)*x_ref[1]+(-0.470534826525)*x_ref[2]**o+(-0.421524571831)*x_ref[2]
-        ref[2,2,0,1]=(-0.0569198078126)*x_ref[0]**o+(-0.36284856463)*x_ref[0]+(-0.374343856016)*x_ref[1]**o+(0.193470734451)*x_ref[1]+(0.425350990791)*x_ref[2]**o+(-0.903309757487)*x_ref[2]
-        ref[2,2,1,0]=(0.602075251229)*x_ref[0]**o+(-0.558163518701)*x_ref[0]+(-0.00146699467501)*x_ref[1]**o+(0.437116756605)*x_ref[1]+(-0.252696658318)*x_ref[2]**o+(0.154017654456)*x_ref[2]
-        ref[2,2,1,1]=(0.226970288166)*x_ref[0]**o+(0.844076458869)*x_ref[0]+(0.231874137232)*x_ref[1]**o+(-0.270233945335)*x_ref[1]+(0.365979082276)*x_ref[2]**o+(-0.937144802776)*x_ref[2]
-        ref[2,2,2,0]=(0.662440813722)*x_ref[0]**o+(-0.600830429698)*x_ref[0]+(0.248436486724)*x_ref[1]**o+(0.73439963812)*x_ref[1]+(-0.406317484259)*x_ref[2]**o+(-0.406641354653)*x_ref[2]
-        ref[2,2,2,1]=(0.948630940404)*x_ref[0]**o+(-0.695098513788)*x_ref[0]+(-0.819843883615)*x_ref[1]**o+(0.0479609386435)*x_ref[1]+(-0.968033045837)*x_ref[2]**o+(0.199490071238)*x_ref[2]
-        ref[2,3,0,0]=(0.967996364186)*x_ref[0]**o+(0.562562580668)*x_ref[0]+(0.660658005197)*x_ref[1]**o+(-0.00126241998808)*x_ref[1]+(-0.0188273819622)*x_ref[2]**o+(-0.798370566647)*x_ref[2]
-        ref[2,3,0,1]=(0.108137383906)*x_ref[0]**o+(0.230815090379)*x_ref[0]+(-0.0817434914408)*x_ref[1]**o+(0.256977068172)*x_ref[1]+(0.323454379512)*x_ref[2]**o+(0.0382049771532)*x_ref[2]
-        ref[2,3,1,0]=(-0.279443973124)*x_ref[0]**o+(-0.948014830608)*x_ref[0]+(-0.237787814838)*x_ref[1]**o+(-0.880632864876)*x_ref[1]+(0.305230465688)*x_ref[2]**o+(0.722139326346)*x_ref[2]
-        ref[2,3,1,1]=(-0.192752669063)*x_ref[0]**o+(0.763575125553)*x_ref[0]+(-0.317096602795)*x_ref[1]**o+(-0.241479822867)*x_ref[1]+(0.643154065804)*x_ref[2]**o+(0.903250562165)*x_ref[2]
-        ref[2,3,2,0]=(0.58153852366)*x_ref[0]**o+(-0.131284078682)*x_ref[0]+(0.803022288461)*x_ref[1]**o+(0.862074208938)*x_ref[1]+(0.934648335783)*x_ref[2]**o+(0.720337200812)*x_ref[2]
-        ref[2,3,2,1]=(-0.866755142782)*x_ref[0]**o+(0.299995782189)*x_ref[0]+(0.830022439718)*x_ref[1]**o+(0.787775630269)*x_ref[1]+(-0.436980900353)*x_ref[2]**o+(0.436719598692)*x_ref[2]
-        ref[2,4,0,0]=(-0.416946111972)*x_ref[0]**o+(-0.342692819134)*x_ref[0]+(-0.265712927184)*x_ref[1]**o+(-0.503154497528)*x_ref[1]+(0.436447837569)*x_ref[2]**o+(-0.514226068117)*x_ref[2]
-        ref[2,4,0,1]=(-0.915995315837)*x_ref[0]**o+(-0.562870475868)*x_ref[0]+(0.158881525561)*x_ref[1]**o+(-0.458461594412)*x_ref[1]+(-0.117927681987)*x_ref[2]**o+(-0.697751714189)*x_ref[2]
-        ref[2,4,1,0]=(-0.961291698815)*x_ref[0]**o+(0.457487466485)*x_ref[0]+(0.170987701633)*x_ref[1]**o+(-0.14226156627)*x_ref[1]+(-0.663462703057)*x_ref[2]**o+(-0.0307934454283)*x_ref[2]
-        ref[2,4,1,1]=(0.588162542138)*x_ref[0]**o+(-0.761783611043)*x_ref[0]+(0.510241246326)*x_ref[1]**o+(0.805053446677)*x_ref[1]+(-0.851391511147)*x_ref[2]**o+(-0.0976037736598)*x_ref[2]
-        ref[2,4,2,0]=(0.649047985858)*x_ref[0]**o+(0.677435498282)*x_ref[0]+(-0.620777977748)*x_ref[1]**o+(-0.209440794016)*x_ref[1]+(0.58009322661)*x_ref[2]**o+(0.56317180284)*x_ref[2]
-        ref[2,4,2,1]=(-0.975596464331)*x_ref[0]**o+(0.759364271658)*x_ref[0]+(0.43142780149)*x_ref[1]**o+(-0.701043203786)*x_ref[1]+(-0.648159388134)*x_ref[2]**o+(-0.129618261144)*x_ref[2]
-        ref[3,0,0,0]=(-0.0207100058532)*x_ref[0]**o+(-0.829637327952)*x_ref[0]+(-0.0326040806041)*x_ref[1]**o+(0.652320712227)*x_ref[1]+(-0.509435869246)*x_ref[2]**o+(-0.66044392521)*x_ref[2]
-        ref[3,0,0,1]=(-0.312677151974)*x_ref[0]**o+(0.0204494340128)*x_ref[0]+(-0.989457740146)*x_ref[1]**o+(-0.0606077687298)*x_ref[1]+(-0.527267756606)*x_ref[2]**o+(0.496006274201)*x_ref[2]
-        ref[3,0,1,0]=(0.842871894549)*x_ref[0]**o+(-0.577687338895)*x_ref[0]+(0.414019506131)*x_ref[1]**o+(0.0410521331015)*x_ref[1]+(-0.830482660184)*x_ref[2]**o+(0.688692187619)*x_ref[2]
-        ref[3,0,1,1]=(-0.920070939376)*x_ref[0]**o+(0.632972952755)*x_ref[0]+(0.944186412149)*x_ref[1]**o+(0.620319712728)*x_ref[1]+(-0.171433727161)*x_ref[2]**o+(0.267125744191)*x_ref[2]
-        ref[3,0,2,0]=(-0.0669535338492)*x_ref[0]**o+(0.249181230746)*x_ref[0]+(-0.147448553328)*x_ref[1]**o+(-0.459701695839)*x_ref[1]+(0.378458172384)*x_ref[2]**o+(0.916594147889)*x_ref[2]
-        ref[3,0,2,1]=(0.0720111269432)*x_ref[0]**o+(-0.390032127319)*x_ref[0]+(-0.115565740734)*x_ref[1]**o+(0.501210832815)*x_ref[1]+(0.568129023658)*x_ref[2]**o+(-0.303909080042)*x_ref[2]
-        ref[3,1,0,0]=(0.205675480731)*x_ref[0]**o+(-0.843093328795)*x_ref[0]+(-0.812415573635)*x_ref[1]**o+(-0.706806177394)*x_ref[1]+(-0.158442718286)*x_ref[2]**o+(0.15187176613)*x_ref[2]
-        ref[3,1,0,1]=(0.149669308017)*x_ref[0]**o+(0.487445503149)*x_ref[0]+(-0.27973905833)*x_ref[1]**o+(-0.504992462225)*x_ref[1]+(-0.728166691522)*x_ref[2]**o+(0.734846267391)*x_ref[2]
-        ref[3,1,1,0]=(0.0410578015251)*x_ref[0]**o+(-0.525001495676)*x_ref[0]+(-0.512685697472)*x_ref[1]**o+(-0.284314686987)*x_ref[1]+(0.888112049081)*x_ref[2]**o+(0.425466793802)*x_ref[2]
-        ref[3,1,1,1]=(-0.374237047043)*x_ref[0]**o+(-0.00078724690461)*x_ref[0]+(0.849952487348)*x_ref[1]**o+(-0.654945893799)*x_ref[1]+(-0.536739132177)*x_ref[2]**o+(0.20919294066)*x_ref[2]
-        ref[3,1,2,0]=(0.685749084068)*x_ref[0]**o+(-0.730378478543)*x_ref[0]+(-0.918072746761)*x_ref[1]**o+(-0.706713872062)*x_ref[1]+(-0.486100957526)*x_ref[2]**o+(0.95736939257)*x_ref[2]
-        ref[3,1,2,1]=(-0.287859736321)*x_ref[0]**o+(-0.271882215207)*x_ref[0]+(-0.673357024623)*x_ref[1]**o+(0.702867457627)*x_ref[1]+(0.78445294416)*x_ref[2]**o+(0.613888365259)*x_ref[2]
-        ref[3,2,0,0]=(0.568506008135)*x_ref[0]**o+(-0.825947283734)*x_ref[0]+(0.687369924271)*x_ref[1]**o+(-0.866597782569)*x_ref[1]+(-0.332810902355)*x_ref[2]**o+(0.499502049139)*x_ref[2]
-        ref[3,2,0,1]=(0.757251773732)*x_ref[0]**o+(0.293337812465)*x_ref[0]+(0.686709285382)*x_ref[1]**o+(-0.084997189402)*x_ref[1]+(-0.338903817381)*x_ref[2]**o+(-0.787646799698)*x_ref[2]
-        ref[3,2,1,0]=(-0.580327419983)*x_ref[0]**o+(-0.603952498996)*x_ref[0]+(0.523057988618)*x_ref[1]**o+(-0.0835187394107)*x_ref[1]+(0.459827887147)*x_ref[2]**o+(0.689021201042)*x_ref[2]
-        ref[3,2,1,1]=(-0.41923416619)*x_ref[0]**o+(0.0406426957237)*x_ref[0]+(-0.908041008186)*x_ref[1]**o+(0.382097138462)*x_ref[1]+(0.66835706849)*x_ref[2]**o+(0.355849275378)*x_ref[2]
-        ref[3,2,2,0]=(-0.133756767108)*x_ref[0]**o+(-0.233743496333)*x_ref[0]+(-0.661420120856)*x_ref[1]**o+(0.788722576584)*x_ref[1]+(-0.131764585707)*x_ref[2]**o+(-0.781004479871)*x_ref[2]
-        ref[3,2,2,1]=(0.0308645139784)*x_ref[0]**o+(-0.194986246344)*x_ref[0]+(-0.267418187303)*x_ref[1]**o+(0.332143733168)*x_ref[1]+(0.513266431894)*x_ref[2]**o+(0.594016981473)*x_ref[2]
-        ref[3,3,0,0]=(0.644314102613)*x_ref[0]**o+(-0.977355279476)*x_ref[0]+(0.516452323667)*x_ref[1]**o+(0.172873579919)*x_ref[1]+(0.778904819969)*x_ref[2]**o+(0.559689750425)*x_ref[2]
-        ref[3,3,0,1]=(0.736135986201)*x_ref[0]**o+(0.366918250826)*x_ref[0]+(-0.0547007988818)*x_ref[1]**o+(-0.830174436433)*x_ref[1]+(0.613440124338)*x_ref[2]**o+(0.574992469591)*x_ref[2]
-        ref[3,3,1,0]=(0.324504938146)*x_ref[0]**o+(-0.915240176689)*x_ref[0]+(-0.398105336249)*x_ref[1]**o+(-0.526498343533)*x_ref[1]+(0.43264573336)*x_ref[2]**o+(0.393008086529)*x_ref[2]
-        ref[3,3,1,1]=(0.926367438323)*x_ref[0]**o+(0.526364305462)*x_ref[0]+(0.15596582236)*x_ref[1]**o+(0.165158439711)*x_ref[1]+(-0.508505348973)*x_ref[2]**o+(-0.603637833992)*x_ref[2]
-        ref[3,3,2,0]=(0.661333046004)*x_ref[0]**o+(0.425320373512)*x_ref[0]+(-0.810809051016)*x_ref[1]**o+(0.20446843023)*x_ref[1]+(0.685136412413)*x_ref[2]**o+(-0.0281127019894)*x_ref[2]
-        ref[3,3,2,1]=(0.851742499007)*x_ref[0]**o+(-0.405506974975)*x_ref[0]+(-0.296768983731)*x_ref[1]**o+(0.389557354929)*x_ref[1]+(0.335108341463)*x_ref[2]**o+(0.0313094433351)*x_ref[2]
-        ref[3,4,0,0]=(0.0415035498649)*x_ref[0]**o+(0.827106496882)*x_ref[0]+(-0.481831487377)*x_ref[1]**o+(-0.14935685817)*x_ref[1]+(0.354765095566)*x_ref[2]**o+(0.521898910137)*x_ref[2]
-        ref[3,4,0,1]=(-0.36328099035)*x_ref[0]**o+(-0.243342386595)*x_ref[0]+(0.0475935188475)*x_ref[1]**o+(0.845308417697)*x_ref[1]+(0.315259620082)*x_ref[2]**o+(0.541313742759)*x_ref[2]
-        ref[3,4,1,0]=(-0.66364149672)*x_ref[0]**o+(0.987505978353)*x_ref[0]+(-0.337659775957)*x_ref[1]**o+(0.197277151989)*x_ref[1]+(-0.431260870605)*x_ref[2]**o+(-0.803375909471)*x_ref[2]
-        ref[3,4,1,1]=(0.722104365428)*x_ref[0]**o+(0.168416682879)*x_ref[0]+(-0.415740544748)*x_ref[1]**o+(-0.437836696476)*x_ref[1]+(-0.280581752598)*x_ref[2]**o+(0.434326371762)*x_ref[2]
-        ref[3,4,2,0]=(0.673144889684)*x_ref[0]**o+(-0.0628529591764)*x_ref[0]+(0.0161458704408)*x_ref[1]**o+(-0.439966404278)*x_ref[1]+(-0.963402070447)*x_ref[2]**o+(0.308312287021)*x_ref[2]
-        ref[3,4,2,1]=(0.649131384887)*x_ref[0]**o+(-0.825086043001)*x_ref[0]+(0.204615530143)*x_ref[1]**o+(0.00801105023644)*x_ref[1]+(-0.234754758061)*x_ref[2]**o+(0.659650083864)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.935068705503)*x[0]**o+(-0.843768568975)*x[0]+(0.220151879481)*x[1]**o+(0.629247769917)*x[1]
-        ref=(-0.935068705503)*x_ref[0]**o+(-0.843768568975)*x_ref[0]+(0.220151879481)*x_ref[1]**o+(0.629247769917)*x_ref[1]
-      else:
-        arg=(0.204715133488)*x[0]**o+(-0.933589384176)*x[0]+(-0.651477613601)*x[1]**o+(-0.128099401086)*x[1]+(0.0507915334433)*x[2]**o+(0.63225604515)*x[2]
-        ref=(0.204715133488)*x_ref[0]**o+(-0.933589384176)*x_ref[0]+(-0.651477613601)*x_ref[1]**o+(-0.128099401086)*x_ref[1]+(0.0507915334433)*x_ref[2]**o+(0.63225604515)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.693671772608)*x[0]**o+(0.260200526395)*x[0]+(-0.99202032752)*x[1]**o+(0.698503413133)*x[1]
-        arg[1]=(-0.549448913905)*x[0]**o+(-0.728769679965)*x[0]+(0.415132041969)*x[1]**o+(-0.106391482954)*x[1]
-        ref[0]=(0.693671772608)*x_ref[0]**o+(0.260200526395)*x_ref[0]+(-0.99202032752)*x_ref[1]**o+(0.698503413133)*x_ref[1]
-        ref[1]=(-0.549448913905)*x_ref[0]**o+(-0.728769679965)*x_ref[0]+(0.415132041969)*x_ref[1]**o+(-0.106391482954)*x_ref[1]
-      else:
-        arg[0]=(0.479813279739)*x[0]**o+(0.940795516779)*x[0]+(-0.671143421639)*x[1]**o+(-0.485412476854)*x[1]+(-0.962114397463)*x[2]**o+(0.0250734884375)*x[2]
-        arg[1]=(0.703481492279)*x[0]**o+(0.298972367312)*x[0]+(0.22386003834)*x[1]**o+(-0.726486516907)*x[1]+(0.0556568111911)*x[2]**o+(-0.603711754869)*x[2]
-        ref[0]=(0.479813279739)*x_ref[0]**o+(0.940795516779)*x_ref[0]+(-0.671143421639)*x_ref[1]**o+(-0.485412476854)*x_ref[1]+(-0.962114397463)*x_ref[2]**o+(0.0250734884375)*x_ref[2]
-        ref[1]=(0.703481492279)*x_ref[0]**o+(0.298972367312)*x_ref[0]+(0.22386003834)*x_ref[1]**o+(-0.726486516907)*x_ref[1]+(0.0556568111911)*x_ref[2]**o+(-0.603711754869)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.436439283545)*x[0]**o+(0.705849609672)*x[0]+(-0.261476237133)*x[1]**o+(-0.10504570237)*x[1]
-        arg[0,1]=(0.035208834696)*x[0]**o+(0.590058421274)*x[0]+(-0.532905126944)*x[1]**o+(0.126572388319)*x[1]
-        arg[0,2]=(0.985266120604)*x[0]**o+(-0.465951670003)*x[0]+(0.855881157118)*x[1]**o+(0.00932326399668)*x[1]
-        arg[0,3]=(0.867525798771)*x[0]**o+(-0.480556561488)*x[0]+(-0.958556900472)*x[1]**o+(-0.764939529718)*x[1]
-        arg[0,4]=(-0.51062937871)*x[0]**o+(-0.135415437913)*x[0]+(0.340077694039)*x[1]**o+(0.874347806916)*x[1]
-        arg[1,0]=(0.636810684661)*x[0]**o+(0.774651780754)*x[0]+(-0.314130997812)*x[1]**o+(-0.422706240721)*x[1]
-        arg[1,1]=(0.495122166216)*x[0]**o+(0.757099858142)*x[0]+(-0.25861054515)*x[1]**o+(0.612180732826)*x[1]
-        arg[1,2]=(-0.909636123949)*x[0]**o+(-0.0434375137409)*x[0]+(0.100612174358)*x[1]**o+(0.787104124194)*x[1]
-        arg[1,3]=(-0.499307726848)*x[0]**o+(0.013205984499)*x[0]+(0.858074302957)*x[1]**o+(-0.630926261217)*x[1]
-        arg[1,4]=(-0.410815849264)*x[0]**o+(0.820939326325)*x[0]+(-0.415370205615)*x[1]**o+(0.0602438669371)*x[1]
-        arg[2,0]=(0.642545275281)*x[0]**o+(0.872239548588)*x[0]+(0.446294659843)*x[1]**o+(0.929350720888)*x[1]
-        arg[2,1]=(0.182218495486)*x[0]**o+(-0.393184556589)*x[0]+(0.42311545961)*x[1]**o+(-0.479636250878)*x[1]
-        arg[2,2]=(0.874574618473)*x[0]**o+(0.879031610251)*x[0]+(0.686157301617)*x[1]**o+(0.706917527697)*x[1]
-        arg[2,3]=(0.614189029029)*x[0]**o+(0.0973950074653)*x[0]+(0.626052996278)*x[1]**o+(0.75043535006)*x[1]
-        arg[2,4]=(0.386209196978)*x[0]**o+(0.644169312279)*x[0]+(-0.554562346917)*x[1]**o+(-0.474292025255)*x[1]
-        arg[3,0]=(0.015012073686)*x[0]**o+(-0.665804159938)*x[0]+(-0.849030247328)*x[1]**o+(-0.936779648988)*x[1]
-        arg[3,1]=(-0.818194334698)*x[0]**o+(-0.569993362998)*x[0]+(-0.806235611766)*x[1]**o+(0.35347475408)*x[1]
-        arg[3,2]=(-0.227117779134)*x[0]**o+(-0.981285175536)*x[0]+(-0.226804205345)*x[1]**o+(-0.0134258740334)*x[1]
-        arg[3,3]=(0.126716245369)*x[0]**o+(0.135476076345)*x[0]+(-0.641421845681)*x[1]**o+(0.0595388928019)*x[1]
-        arg[3,4]=(-0.658260624128)*x[0]**o+(0.124989215683)*x[0]+(-0.949146047463)*x[1]**o+(0.805277938593)*x[1]
-        ref[0,0]=(0.436439283545)*x_ref[0]**o+(0.705849609672)*x_ref[0]+(-0.261476237133)*x_ref[1]**o+(-0.10504570237)*x_ref[1]
-        ref[0,1]=(0.035208834696)*x_ref[0]**o+(0.590058421274)*x_ref[0]+(-0.532905126944)*x_ref[1]**o+(0.126572388319)*x_ref[1]
-        ref[0,2]=(0.985266120604)*x_ref[0]**o+(-0.465951670003)*x_ref[0]+(0.855881157118)*x_ref[1]**o+(0.00932326399668)*x_ref[1]
-        ref[0,3]=(0.867525798771)*x_ref[0]**o+(-0.480556561488)*x_ref[0]+(-0.958556900472)*x_ref[1]**o+(-0.764939529718)*x_ref[1]
-        ref[0,4]=(-0.51062937871)*x_ref[0]**o+(-0.135415437913)*x_ref[0]+(0.340077694039)*x_ref[1]**o+(0.874347806916)*x_ref[1]
-        ref[1,0]=(0.636810684661)*x_ref[0]**o+(0.774651780754)*x_ref[0]+(-0.314130997812)*x_ref[1]**o+(-0.422706240721)*x_ref[1]
-        ref[1,1]=(0.495122166216)*x_ref[0]**o+(0.757099858142)*x_ref[0]+(-0.25861054515)*x_ref[1]**o+(0.612180732826)*x_ref[1]
-        ref[1,2]=(-0.909636123949)*x_ref[0]**o+(-0.0434375137409)*x_ref[0]+(0.100612174358)*x_ref[1]**o+(0.787104124194)*x_ref[1]
-        ref[1,3]=(-0.499307726848)*x_ref[0]**o+(0.013205984499)*x_ref[0]+(0.858074302957)*x_ref[1]**o+(-0.630926261217)*x_ref[1]
-        ref[1,4]=(-0.410815849264)*x_ref[0]**o+(0.820939326325)*x_ref[0]+(-0.415370205615)*x_ref[1]**o+(0.0602438669371)*x_ref[1]
-        ref[2,0]=(0.642545275281)*x_ref[0]**o+(0.872239548588)*x_ref[0]+(0.446294659843)*x_ref[1]**o+(0.929350720888)*x_ref[1]
-        ref[2,1]=(0.182218495486)*x_ref[0]**o+(-0.393184556589)*x_ref[0]+(0.42311545961)*x_ref[1]**o+(-0.479636250878)*x_ref[1]
-        ref[2,2]=(0.874574618473)*x_ref[0]**o+(0.879031610251)*x_ref[0]+(0.686157301617)*x_ref[1]**o+(0.706917527697)*x_ref[1]
-        ref[2,3]=(0.614189029029)*x_ref[0]**o+(0.0973950074653)*x_ref[0]+(0.626052996278)*x_ref[1]**o+(0.75043535006)*x_ref[1]
-        ref[2,4]=(0.386209196978)*x_ref[0]**o+(0.644169312279)*x_ref[0]+(-0.554562346917)*x_ref[1]**o+(-0.474292025255)*x_ref[1]
-        ref[3,0]=(0.015012073686)*x_ref[0]**o+(-0.665804159938)*x_ref[0]+(-0.849030247328)*x_ref[1]**o+(-0.936779648988)*x_ref[1]
-        ref[3,1]=(-0.818194334698)*x_ref[0]**o+(-0.569993362998)*x_ref[0]+(-0.806235611766)*x_ref[1]**o+(0.35347475408)*x_ref[1]
-        ref[3,2]=(-0.227117779134)*x_ref[0]**o+(-0.981285175536)*x_ref[0]+(-0.226804205345)*x_ref[1]**o+(-0.0134258740334)*x_ref[1]
-        ref[3,3]=(0.126716245369)*x_ref[0]**o+(0.135476076345)*x_ref[0]+(-0.641421845681)*x_ref[1]**o+(0.0595388928019)*x_ref[1]
-        ref[3,4]=(-0.658260624128)*x_ref[0]**o+(0.124989215683)*x_ref[0]+(-0.949146047463)*x_ref[1]**o+(0.805277938593)*x_ref[1]
-      else:
-        arg[0,0]=(-0.859332605724)*x[0]**o+(-0.239005430756)*x[0]+(-0.52959833033)*x[1]**o+(0.725877930655)*x[1]+(-0.0348436114161)*x[2]**o+(0.47287744745)*x[2]
-        arg[0,1]=(-0.0816886854463)*x[0]**o+(-0.626507446322)*x[0]+(-0.93804868959)*x[1]**o+(-0.450134311929)*x[1]+(0.0957946938715)*x[2]**o+(-0.236994496198)*x[2]
-        arg[0,2]=(-0.669441310039)*x[0]**o+(-0.406451428536)*x[0]+(-0.292718530458)*x[1]**o+(-0.0948016380336)*x[1]+(-0.0943083566957)*x[2]**o+(0.747978324024)*x[2]
-        arg[0,3]=(-0.0350228116485)*x[0]**o+(-0.967728170529)*x[0]+(-0.16425180976)*x[1]**o+(-0.141334783297)*x[1]+(0.179458630309)*x[2]**o+(0.45080506919)*x[2]
-        arg[0,4]=(0.909578721407)*x[0]**o+(-0.341028350711)*x[0]+(-0.937703389458)*x[1]**o+(-0.845025015446)*x[1]+(-0.762836324997)*x[2]**o+(0.772817997464)*x[2]
-        arg[1,0]=(0.75675349915)*x[0]**o+(-0.208827138169)*x[0]+(-0.0146742840091)*x[1]**o+(-0.1486215734)*x[1]+(0.205344647252)*x[2]**o+(-0.409293867732)*x[2]
-        arg[1,1]=(-0.215359027624)*x[0]**o+(0.220661567012)*x[0]+(0.122954614324)*x[1]**o+(-0.888828539035)*x[1]+(-0.860535003713)*x[2]**o+(-0.582396229154)*x[2]
-        arg[1,2]=(-0.252703089432)*x[0]**o+(0.294168447756)*x[0]+(0.323290819691)*x[1]**o+(-0.0440370164755)*x[1]+(0.487110700327)*x[2]**o+(-0.269109129573)*x[2]
-        arg[1,3]=(0.0653521784751)*x[0]**o+(0.328048279094)*x[0]+(-0.414467594535)*x[1]**o+(0.436061182815)*x[1]+(0.483513283452)*x[2]**o+(-0.744560862926)*x[2]
-        arg[1,4]=(0.0102955000926)*x[0]**o+(-0.636994970624)*x[0]+(0.83732393089)*x[1]**o+(0.914683806871)*x[1]+(0.574439856221)*x[2]**o+(-0.096821482591)*x[2]
-        arg[2,0]=(-0.129692996812)*x[0]**o+(-0.617534967242)*x[0]+(0.299770969796)*x[1]**o+(0.93870530376)*x[1]+(-0.864448551767)*x[2]**o+(0.755129965839)*x[2]
-        arg[2,1]=(-0.354122778719)*x[0]**o+(0.576654786045)*x[0]+(-0.965116346607)*x[1]**o+(0.0705856628847)*x[1]+(0.817059960545)*x[2]**o+(-0.597731384232)*x[2]
-        arg[2,2]=(-0.705190107591)*x[0]**o+(0.876019062019)*x[0]+(-0.732733986501)*x[1]**o+(0.505334922081)*x[1]+(-0.616601928994)*x[2]**o+(-0.332268983863)*x[2]
-        arg[2,3]=(0.663768017414)*x[0]**o+(-0.431682444208)*x[0]+(0.186159158088)*x[1]**o+(-0.689766933274)*x[1]+(-0.765854811539)*x[2]**o+(-0.402774599632)*x[2]
-        arg[2,4]=(-0.698031877485)*x[0]**o+(0.914418269242)*x[0]+(-0.693564630363)*x[1]**o+(-0.18289238868)*x[1]+(0.988158500287)*x[2]**o+(-0.33952288549)*x[2]
-        arg[3,0]=(-0.188499634873)*x[0]**o+(-0.10427816897)*x[0]+(-0.772866404794)*x[1]**o+(0.841928986479)*x[1]+(-0.866955639695)*x[2]**o+(-0.152515560713)*x[2]
-        arg[3,1]=(0.937695460564)*x[0]**o+(-0.551079526492)*x[0]+(0.353043727721)*x[1]**o+(-0.604814667118)*x[1]+(0.200913251642)*x[2]**o+(-0.0497427852682)*x[2]
-        arg[3,2]=(-0.49130784927)*x[0]**o+(0.537445967432)*x[0]+(-0.408371200391)*x[1]**o+(0.945593173362)*x[1]+(-0.0956969348675)*x[2]**o+(-0.174133549441)*x[2]
-        arg[3,3]=(0.847790369559)*x[0]**o+(0.743993523287)*x[0]+(-0.810126540693)*x[1]**o+(-0.775699501886)*x[1]+(-0.479687101313)*x[2]**o+(0.627116825116)*x[2]
-        arg[3,4]=(0.352455163407)*x[0]**o+(0.86343850667)*x[0]+(0.126742974996)*x[1]**o+(0.0175699888323)*x[1]+(0.964899127449)*x[2]**o+(-0.206749046822)*x[2]
-        ref[0,0]=(-0.859332605724)*x_ref[0]**o+(-0.239005430756)*x_ref[0]+(-0.52959833033)*x_ref[1]**o+(0.725877930655)*x_ref[1]+(-0.0348436114161)*x_ref[2]**o+(0.47287744745)*x_ref[2]
-        ref[0,1]=(-0.0816886854463)*x_ref[0]**o+(-0.626507446322)*x_ref[0]+(-0.93804868959)*x_ref[1]**o+(-0.450134311929)*x_ref[1]+(0.0957946938715)*x_ref[2]**o+(-0.236994496198)*x_ref[2]
-        ref[0,2]=(-0.669441310039)*x_ref[0]**o+(-0.406451428536)*x_ref[0]+(-0.292718530458)*x_ref[1]**o+(-0.0948016380336)*x_ref[1]+(-0.0943083566957)*x_ref[2]**o+(0.747978324024)*x_ref[2]
-        ref[0,3]=(-0.0350228116485)*x_ref[0]**o+(-0.967728170529)*x_ref[0]+(-0.16425180976)*x_ref[1]**o+(-0.141334783297)*x_ref[1]+(0.179458630309)*x_ref[2]**o+(0.45080506919)*x_ref[2]
-        ref[0,4]=(0.909578721407)*x_ref[0]**o+(-0.341028350711)*x_ref[0]+(-0.937703389458)*x_ref[1]**o+(-0.845025015446)*x_ref[1]+(-0.762836324997)*x_ref[2]**o+(0.772817997464)*x_ref[2]
-        ref[1,0]=(0.75675349915)*x_ref[0]**o+(-0.208827138169)*x_ref[0]+(-0.0146742840091)*x_ref[1]**o+(-0.1486215734)*x_ref[1]+(0.205344647252)*x_ref[2]**o+(-0.409293867732)*x_ref[2]
-        ref[1,1]=(-0.215359027624)*x_ref[0]**o+(0.220661567012)*x_ref[0]+(0.122954614324)*x_ref[1]**o+(-0.888828539035)*x_ref[1]+(-0.860535003713)*x_ref[2]**o+(-0.582396229154)*x_ref[2]
-        ref[1,2]=(-0.252703089432)*x_ref[0]**o+(0.294168447756)*x_ref[0]+(0.323290819691)*x_ref[1]**o+(-0.0440370164755)*x_ref[1]+(0.487110700327)*x_ref[2]**o+(-0.269109129573)*x_ref[2]
-        ref[1,3]=(0.0653521784751)*x_ref[0]**o+(0.328048279094)*x_ref[0]+(-0.414467594535)*x_ref[1]**o+(0.436061182815)*x_ref[1]+(0.483513283452)*x_ref[2]**o+(-0.744560862926)*x_ref[2]
-        ref[1,4]=(0.0102955000926)*x_ref[0]**o+(-0.636994970624)*x_ref[0]+(0.83732393089)*x_ref[1]**o+(0.914683806871)*x_ref[1]+(0.574439856221)*x_ref[2]**o+(-0.096821482591)*x_ref[2]
-        ref[2,0]=(-0.129692996812)*x_ref[0]**o+(-0.617534967242)*x_ref[0]+(0.299770969796)*x_ref[1]**o+(0.93870530376)*x_ref[1]+(-0.864448551767)*x_ref[2]**o+(0.755129965839)*x_ref[2]
-        ref[2,1]=(-0.354122778719)*x_ref[0]**o+(0.576654786045)*x_ref[0]+(-0.965116346607)*x_ref[1]**o+(0.0705856628847)*x_ref[1]+(0.817059960545)*x_ref[2]**o+(-0.597731384232)*x_ref[2]
-        ref[2,2]=(-0.705190107591)*x_ref[0]**o+(0.876019062019)*x_ref[0]+(-0.732733986501)*x_ref[1]**o+(0.505334922081)*x_ref[1]+(-0.616601928994)*x_ref[2]**o+(-0.332268983863)*x_ref[2]
-        ref[2,3]=(0.663768017414)*x_ref[0]**o+(-0.431682444208)*x_ref[0]+(0.186159158088)*x_ref[1]**o+(-0.689766933274)*x_ref[1]+(-0.765854811539)*x_ref[2]**o+(-0.402774599632)*x_ref[2]
-        ref[2,4]=(-0.698031877485)*x_ref[0]**o+(0.914418269242)*x_ref[0]+(-0.693564630363)*x_ref[1]**o+(-0.18289238868)*x_ref[1]+(0.988158500287)*x_ref[2]**o+(-0.33952288549)*x_ref[2]
-        ref[3,0]=(-0.188499634873)*x_ref[0]**o+(-0.10427816897)*x_ref[0]+(-0.772866404794)*x_ref[1]**o+(0.841928986479)*x_ref[1]+(-0.866955639695)*x_ref[2]**o+(-0.152515560713)*x_ref[2]
-        ref[3,1]=(0.937695460564)*x_ref[0]**o+(-0.551079526492)*x_ref[0]+(0.353043727721)*x_ref[1]**o+(-0.604814667118)*x_ref[1]+(0.200913251642)*x_ref[2]**o+(-0.0497427852682)*x_ref[2]
-        ref[3,2]=(-0.49130784927)*x_ref[0]**o+(0.537445967432)*x_ref[0]+(-0.408371200391)*x_ref[1]**o+(0.945593173362)*x_ref[1]+(-0.0956969348675)*x_ref[2]**o+(-0.174133549441)*x_ref[2]
-        ref[3,3]=(0.847790369559)*x_ref[0]**o+(0.743993523287)*x_ref[0]+(-0.810126540693)*x_ref[1]**o+(-0.775699501886)*x_ref[1]+(-0.479687101313)*x_ref[2]**o+(0.627116825116)*x_ref[2]
-        ref[3,4]=(0.352455163407)*x_ref[0]**o+(0.86343850667)*x_ref[0]+(0.126742974996)*x_ref[1]**o+(0.0175699888323)*x_ref[1]+(0.964899127449)*x_ref[2]**o+(-0.206749046822)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.396745847367)*x[0]**o+(-0.700719490691)*x[0]+(0.117558242545)*x[1]**o+(-0.161976142849)*x[1]
-        arg[0,0,1]=(-0.490732277107)*x[0]**o+(0.526833149216)*x[0]+(-0.136309303122)*x[1]**o+(0.629465649533)*x[1]
-        arg[0,1,0]=(-0.242474968121)*x[0]**o+(-0.76270698332)*x[0]+(-0.0979504547153)*x[1]**o+(-0.0743521177641)*x[1]
-        arg[0,1,1]=(0.641246476843)*x[0]**o+(0.0158147797433)*x[0]+(-0.213898399703)*x[1]**o+(-0.378401519675)*x[1]
-        arg[1,0,0]=(0.603700544573)*x[0]**o+(-0.993751144334)*x[0]+(0.466222025692)*x[1]**o+(0.457689495241)*x[1]
-        arg[1,0,1]=(-0.727287858841)*x[0]**o+(-0.177841994955)*x[0]+(0.720237448692)*x[1]**o+(0.716175629178)*x[1]
-        arg[1,1,0]=(0.784514682242)*x[0]**o+(0.681214612353)*x[0]+(0.404266860166)*x[1]**o+(0.871218157219)*x[1]
-        arg[1,1,1]=(-0.918634586367)*x[0]**o+(-0.722365105889)*x[0]+(-0.0337202979587)*x[1]**o+(-0.487790376172)*x[1]
-        arg[2,0,0]=(0.159515902499)*x[0]**o+(-0.0650417831188)*x[0]+(0.107260481333)*x[1]**o+(0.469096212511)*x[1]
-        arg[2,0,1]=(0.0436003865409)*x[0]**o+(-0.67488837592)*x[0]+(0.547761443272)*x[1]**o+(-0.69222031017)*x[1]
-        arg[2,1,0]=(-0.153636036391)*x[0]**o+(0.0415911821723)*x[0]+(0.421990370678)*x[1]**o+(-0.128883832414)*x[1]
-        arg[2,1,1]=(0.513420393955)*x[0]**o+(-0.769636964711)*x[0]+(0.874383588901)*x[1]**o+(-0.357923227767)*x[1]
-        arg[3,0,0]=(0.943275907357)*x[0]**o+(0.372378913231)*x[0]+(0.559656674007)*x[1]**o+(-0.878007664293)*x[1]
-        arg[3,0,1]=(-0.541535388034)*x[0]**o+(-0.0510200932939)*x[0]+(-0.448618747155)*x[1]**o+(0.693514427768)*x[1]
-        arg[3,1,0]=(-0.287622342268)*x[0]**o+(0.8333134988)*x[0]+(-0.691930501782)*x[1]**o+(-0.659618596505)*x[1]
-        arg[3,1,1]=(0.44446133556)*x[0]**o+(0.697704081094)*x[0]+(0.0679863572322)*x[1]**o+(-0.949443102916)*x[1]
-        arg[4,0,0]=(0.546245770076)*x[0]**o+(-0.466891879347)*x[0]+(-0.608261901126)*x[1]**o+(0.669561643667)*x[1]
-        arg[4,0,1]=(-0.522497485476)*x[0]**o+(0.70886716903)*x[0]+(-0.296815361132)*x[1]**o+(0.500540583082)*x[1]
-        arg[4,1,0]=(-0.841653490079)*x[0]**o+(0.400589086976)*x[0]+(0.865994660457)*x[1]**o+(0.0205817210969)*x[1]
-        arg[4,1,1]=(-0.64369513787)*x[0]**o+(0.883032618928)*x[0]+(-0.178766897224)*x[1]**o+(0.748041632322)*x[1]
-        arg[5,0,0]=(0.471810615096)*x[0]**o+(-0.140340964274)*x[0]+(-0.7063314968)*x[1]**o+(0.0524231879837)*x[1]
-        arg[5,0,1]=(-0.51339482213)*x[0]**o+(-0.81447661092)*x[0]+(0.437085868301)*x[1]**o+(0.862678017842)*x[1]
-        arg[5,1,0]=(-0.752858172473)*x[0]**o+(0.325827525243)*x[0]+(-0.702286757187)*x[1]**o+(-0.467810951898)*x[1]
-        arg[5,1,1]=(-0.256879797442)*x[0]**o+(0.257067666229)*x[0]+(0.912308244411)*x[1]**o+(0.0620337856352)*x[1]
-        ref[0,0,0]=(-0.396745847367)*x_ref[0]**o+(-0.700719490691)*x_ref[0]+(0.117558242545)*x_ref[1]**o+(-0.161976142849)*x_ref[1]
-        ref[0,0,1]=(-0.490732277107)*x_ref[0]**o+(0.526833149216)*x_ref[0]+(-0.136309303122)*x_ref[1]**o+(0.629465649533)*x_ref[1]
-        ref[0,1,0]=(-0.242474968121)*x_ref[0]**o+(-0.76270698332)*x_ref[0]+(-0.0979504547153)*x_ref[1]**o+(-0.0743521177641)*x_ref[1]
-        ref[0,1,1]=(0.641246476843)*x_ref[0]**o+(0.0158147797433)*x_ref[0]+(-0.213898399703)*x_ref[1]**o+(-0.378401519675)*x_ref[1]
-        ref[1,0,0]=(0.603700544573)*x_ref[0]**o+(-0.993751144334)*x_ref[0]+(0.466222025692)*x_ref[1]**o+(0.457689495241)*x_ref[1]
-        ref[1,0,1]=(-0.727287858841)*x_ref[0]**o+(-0.177841994955)*x_ref[0]+(0.720237448692)*x_ref[1]**o+(0.716175629178)*x_ref[1]
-        ref[1,1,0]=(0.784514682242)*x_ref[0]**o+(0.681214612353)*x_ref[0]+(0.404266860166)*x_ref[1]**o+(0.871218157219)*x_ref[1]
-        ref[1,1,1]=(-0.918634586367)*x_ref[0]**o+(-0.722365105889)*x_ref[0]+(-0.0337202979587)*x_ref[1]**o+(-0.487790376172)*x_ref[1]
-        ref[2,0,0]=(0.159515902499)*x_ref[0]**o+(-0.0650417831188)*x_ref[0]+(0.107260481333)*x_ref[1]**o+(0.469096212511)*x_ref[1]
-        ref[2,0,1]=(0.0436003865409)*x_ref[0]**o+(-0.67488837592)*x_ref[0]+(0.547761443272)*x_ref[1]**o+(-0.69222031017)*x_ref[1]
-        ref[2,1,0]=(-0.153636036391)*x_ref[0]**o+(0.0415911821723)*x_ref[0]+(0.421990370678)*x_ref[1]**o+(-0.128883832414)*x_ref[1]
-        ref[2,1,1]=(0.513420393955)*x_ref[0]**o+(-0.769636964711)*x_ref[0]+(0.874383588901)*x_ref[1]**o+(-0.357923227767)*x_ref[1]
-        ref[3,0,0]=(0.943275907357)*x_ref[0]**o+(0.372378913231)*x_ref[0]+(0.559656674007)*x_ref[1]**o+(-0.878007664293)*x_ref[1]
-        ref[3,0,1]=(-0.541535388034)*x_ref[0]**o+(-0.0510200932939)*x_ref[0]+(-0.448618747155)*x_ref[1]**o+(0.693514427768)*x_ref[1]
-        ref[3,1,0]=(-0.287622342268)*x_ref[0]**o+(0.8333134988)*x_ref[0]+(-0.691930501782)*x_ref[1]**o+(-0.659618596505)*x_ref[1]
-        ref[3,1,1]=(0.44446133556)*x_ref[0]**o+(0.697704081094)*x_ref[0]+(0.0679863572322)*x_ref[1]**o+(-0.949443102916)*x_ref[1]
-        ref[4,0,0]=(0.546245770076)*x_ref[0]**o+(-0.466891879347)*x_ref[0]+(-0.608261901126)*x_ref[1]**o+(0.669561643667)*x_ref[1]
-        ref[4,0,1]=(-0.522497485476)*x_ref[0]**o+(0.70886716903)*x_ref[0]+(-0.296815361132)*x_ref[1]**o+(0.500540583082)*x_ref[1]
-        ref[4,1,0]=(-0.841653490079)*x_ref[0]**o+(0.400589086976)*x_ref[0]+(0.865994660457)*x_ref[1]**o+(0.0205817210969)*x_ref[1]
-        ref[4,1,1]=(-0.64369513787)*x_ref[0]**o+(0.883032618928)*x_ref[0]+(-0.178766897224)*x_ref[1]**o+(0.748041632322)*x_ref[1]
-        ref[5,0,0]=(0.471810615096)*x_ref[0]**o+(-0.140340964274)*x_ref[0]+(-0.7063314968)*x_ref[1]**o+(0.0524231879837)*x_ref[1]
-        ref[5,0,1]=(-0.51339482213)*x_ref[0]**o+(-0.81447661092)*x_ref[0]+(0.437085868301)*x_ref[1]**o+(0.862678017842)*x_ref[1]
-        ref[5,1,0]=(-0.752858172473)*x_ref[0]**o+(0.325827525243)*x_ref[0]+(-0.702286757187)*x_ref[1]**o+(-0.467810951898)*x_ref[1]
-        ref[5,1,1]=(-0.256879797442)*x_ref[0]**o+(0.257067666229)*x_ref[0]+(0.912308244411)*x_ref[1]**o+(0.0620337856352)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.564502533309)*x[0]**o+(-0.237721559752)*x[0]+(0.225601658644)*x[1]**o+(0.967190188292)*x[1]+(0.471760897542)*x[2]**o+(0.79404420728)*x[2]
-        arg[0,0,1]=(-0.373762346136)*x[0]**o+(-0.643766021731)*x[0]+(0.088028383792)*x[1]**o+(-0.541163410313)*x[1]+(0.463315911637)*x[2]**o+(-0.596740807595)*x[2]
-        arg[0,1,0]=(-0.526694453842)*x[0]**o+(0.405010889931)*x[0]+(-0.0153807962972)*x[1]**o+(-0.0446620712949)*x[1]+(0.00553918668197)*x[2]**o+(0.72170514564)*x[2]
-        arg[0,1,1]=(-0.00750073616089)*x[0]**o+(-0.60431903208)*x[0]+(0.790032415931)*x[1]**o+(0.272709398336)*x[1]+(0.228539600712)*x[2]**o+(0.62284140325)*x[2]
-        arg[1,0,0]=(-0.892797595418)*x[0]**o+(-0.151608141828)*x[0]+(0.313142074823)*x[1]**o+(0.80280439466)*x[1]+(-0.593056273594)*x[2]**o+(-0.41551679707)*x[2]
-        arg[1,0,1]=(-0.385715092974)*x[0]**o+(-0.77884107065)*x[0]+(-0.0804019137225)*x[1]**o+(-0.240129932101)*x[1]+(0.238145788042)*x[2]**o+(-0.806337666628)*x[2]
-        arg[1,1,0]=(0.940492459417)*x[0]**o+(-0.0054460073194)*x[0]+(-0.697916565168)*x[1]**o+(-0.949456184725)*x[1]+(-0.115461214789)*x[2]**o+(-0.403742409948)*x[2]
-        arg[1,1,1]=(-0.711716124415)*x[0]**o+(0.586131021871)*x[0]+(0.625988666837)*x[1]**o+(0.638433219635)*x[1]+(0.971169174015)*x[2]**o+(-0.064949626884)*x[2]
-        arg[2,0,0]=(-0.891973333325)*x[0]**o+(0.76090478364)*x[0]+(0.439956136239)*x[1]**o+(-0.74807071296)*x[1]+(-0.209999803467)*x[2]**o+(0.404396254503)*x[2]
-        arg[2,0,1]=(0.559776288735)*x[0]**o+(0.284643618707)*x[0]+(0.0527799359967)*x[1]**o+(-0.201660204363)*x[1]+(0.590722655898)*x[2]**o+(-0.24940757474)*x[2]
-        arg[2,1,0]=(-0.747588234432)*x[0]**o+(0.0196702046746)*x[0]+(0.0454238912973)*x[1]**o+(0.174053915643)*x[1]+(-0.868554688657)*x[2]**o+(-0.127425849813)*x[2]
-        arg[2,1,1]=(-0.324276984008)*x[0]**o+(-0.494912096003)*x[0]+(-0.780953487415)*x[1]**o+(0.225787179491)*x[1]+(-0.760330660035)*x[2]**o+(0.0440722700759)*x[2]
-        arg[3,0,0]=(0.37479028021)*x[0]**o+(-0.869009335783)*x[0]+(0.811673580204)*x[1]**o+(0.521877505351)*x[1]+(-0.508710979256)*x[2]**o+(0.558085136638)*x[2]
-        arg[3,0,1]=(0.815143535066)*x[0]**o+(0.867977183071)*x[0]+(0.0315543942614)*x[1]**o+(0.786379597601)*x[1]+(0.0433279381339)*x[2]**o+(-0.56554445624)*x[2]
-        arg[3,1,0]=(-0.948224238625)*x[0]**o+(-0.759282528831)*x[0]+(0.511802336753)*x[1]**o+(0.331073342499)*x[1]+(0.295241697427)*x[2]**o+(0.154864664771)*x[2]
-        arg[3,1,1]=(-0.982634132939)*x[0]**o+(-0.0762014431695)*x[0]+(-0.0797462613351)*x[1]**o+(-0.512305271957)*x[1]+(-0.348883505418)*x[2]**o+(0.00580412526927)*x[2]
-        arg[4,0,0]=(0.186597109908)*x[0]**o+(0.051957206238)*x[0]+(0.572882754553)*x[1]**o+(-0.114338954084)*x[1]+(-0.517239439578)*x[2]**o+(-0.298287404607)*x[2]
-        arg[4,0,1]=(0.637628569107)*x[0]**o+(0.228562669958)*x[0]+(0.053657321561)*x[1]**o+(0.762909608846)*x[1]+(0.873936819574)*x[2]**o+(-0.20000969514)*x[2]
-        arg[4,1,0]=(-0.717459489066)*x[0]**o+(-0.462174191129)*x[0]+(-0.70491180102)*x[1]**o+(-0.406072010622)*x[1]+(-0.903872259447)*x[2]**o+(0.487491537826)*x[2]
-        arg[4,1,1]=(0.947654286923)*x[0]**o+(-0.228830597313)*x[0]+(-0.501442713655)*x[1]**o+(0.282437368749)*x[1]+(0.543592950002)*x[2]**o+(0.5400198247)*x[2]
-        arg[5,0,0]=(0.144349494033)*x[0]**o+(-0.635328703132)*x[0]+(-0.797851162499)*x[1]**o+(0.356874780185)*x[1]+(-0.205725457569)*x[2]**o+(-0.674962512018)*x[2]
-        arg[5,0,1]=(-0.728948504419)*x[0]**o+(0.944337871242)*x[0]+(-0.790388944678)*x[1]**o+(0.59119693076)*x[1]+(0.9569152246)*x[2]**o+(-0.205404245177)*x[2]
-        arg[5,1,0]=(0.477597678348)*x[0]**o+(-0.318993929605)*x[0]+(0.481029970286)*x[1]**o+(0.708696918395)*x[1]+(0.0531716082887)*x[2]**o+(-0.847697491061)*x[2]
-        arg[5,1,1]=(-0.458572001979)*x[0]**o+(0.582048244354)*x[0]+(-0.040756132547)*x[1]**o+(-0.953201198076)*x[1]+(-0.971859723822)*x[2]**o+(-0.796426143181)*x[2]
-        ref[0,0,0]=(0.564502533309)*x_ref[0]**o+(-0.237721559752)*x_ref[0]+(0.225601658644)*x_ref[1]**o+(0.967190188292)*x_ref[1]+(0.471760897542)*x_ref[2]**o+(0.79404420728)*x_ref[2]
-        ref[0,0,1]=(-0.373762346136)*x_ref[0]**o+(-0.643766021731)*x_ref[0]+(0.088028383792)*x_ref[1]**o+(-0.541163410313)*x_ref[1]+(0.463315911637)*x_ref[2]**o+(-0.596740807595)*x_ref[2]
-        ref[0,1,0]=(-0.526694453842)*x_ref[0]**o+(0.405010889931)*x_ref[0]+(-0.0153807962972)*x_ref[1]**o+(-0.0446620712949)*x_ref[1]+(0.00553918668197)*x_ref[2]**o+(0.72170514564)*x_ref[2]
-        ref[0,1,1]=(-0.00750073616089)*x_ref[0]**o+(-0.60431903208)*x_ref[0]+(0.790032415931)*x_ref[1]**o+(0.272709398336)*x_ref[1]+(0.228539600712)*x_ref[2]**o+(0.62284140325)*x_ref[2]
-        ref[1,0,0]=(-0.892797595418)*x_ref[0]**o+(-0.151608141828)*x_ref[0]+(0.313142074823)*x_ref[1]**o+(0.80280439466)*x_ref[1]+(-0.593056273594)*x_ref[2]**o+(-0.41551679707)*x_ref[2]
-        ref[1,0,1]=(-0.385715092974)*x_ref[0]**o+(-0.77884107065)*x_ref[0]+(-0.0804019137225)*x_ref[1]**o+(-0.240129932101)*x_ref[1]+(0.238145788042)*x_ref[2]**o+(-0.806337666628)*x_ref[2]
-        ref[1,1,0]=(0.940492459417)*x_ref[0]**o+(-0.0054460073194)*x_ref[0]+(-0.697916565168)*x_ref[1]**o+(-0.949456184725)*x_ref[1]+(-0.115461214789)*x_ref[2]**o+(-0.403742409948)*x_ref[2]
-        ref[1,1,1]=(-0.711716124415)*x_ref[0]**o+(0.586131021871)*x_ref[0]+(0.625988666837)*x_ref[1]**o+(0.638433219635)*x_ref[1]+(0.971169174015)*x_ref[2]**o+(-0.064949626884)*x_ref[2]
-        ref[2,0,0]=(-0.891973333325)*x_ref[0]**o+(0.76090478364)*x_ref[0]+(0.439956136239)*x_ref[1]**o+(-0.74807071296)*x_ref[1]+(-0.209999803467)*x_ref[2]**o+(0.404396254503)*x_ref[2]
-        ref[2,0,1]=(0.559776288735)*x_ref[0]**o+(0.284643618707)*x_ref[0]+(0.0527799359967)*x_ref[1]**o+(-0.201660204363)*x_ref[1]+(0.590722655898)*x_ref[2]**o+(-0.24940757474)*x_ref[2]
-        ref[2,1,0]=(-0.747588234432)*x_ref[0]**o+(0.0196702046746)*x_ref[0]+(0.0454238912973)*x_ref[1]**o+(0.174053915643)*x_ref[1]+(-0.868554688657)*x_ref[2]**o+(-0.127425849813)*x_ref[2]
-        ref[2,1,1]=(-0.324276984008)*x_ref[0]**o+(-0.494912096003)*x_ref[0]+(-0.780953487415)*x_ref[1]**o+(0.225787179491)*x_ref[1]+(-0.760330660035)*x_ref[2]**o+(0.0440722700759)*x_ref[2]
-        ref[3,0,0]=(0.37479028021)*x_ref[0]**o+(-0.869009335783)*x_ref[0]+(0.811673580204)*x_ref[1]**o+(0.521877505351)*x_ref[1]+(-0.508710979256)*x_ref[2]**o+(0.558085136638)*x_ref[2]
-        ref[3,0,1]=(0.815143535066)*x_ref[0]**o+(0.867977183071)*x_ref[0]+(0.0315543942614)*x_ref[1]**o+(0.786379597601)*x_ref[1]+(0.0433279381339)*x_ref[2]**o+(-0.56554445624)*x_ref[2]
-        ref[3,1,0]=(-0.948224238625)*x_ref[0]**o+(-0.759282528831)*x_ref[0]+(0.511802336753)*x_ref[1]**o+(0.331073342499)*x_ref[1]+(0.295241697427)*x_ref[2]**o+(0.154864664771)*x_ref[2]
-        ref[3,1,1]=(-0.982634132939)*x_ref[0]**o+(-0.0762014431695)*x_ref[0]+(-0.0797462613351)*x_ref[1]**o+(-0.512305271957)*x_ref[1]+(-0.348883505418)*x_ref[2]**o+(0.00580412526927)*x_ref[2]
-        ref[4,0,0]=(0.186597109908)*x_ref[0]**o+(0.051957206238)*x_ref[0]+(0.572882754553)*x_ref[1]**o+(-0.114338954084)*x_ref[1]+(-0.517239439578)*x_ref[2]**o+(-0.298287404607)*x_ref[2]
-        ref[4,0,1]=(0.637628569107)*x_ref[0]**o+(0.228562669958)*x_ref[0]+(0.053657321561)*x_ref[1]**o+(0.762909608846)*x_ref[1]+(0.873936819574)*x_ref[2]**o+(-0.20000969514)*x_ref[2]
-        ref[4,1,0]=(-0.717459489066)*x_ref[0]**o+(-0.462174191129)*x_ref[0]+(-0.70491180102)*x_ref[1]**o+(-0.406072010622)*x_ref[1]+(-0.903872259447)*x_ref[2]**o+(0.487491537826)*x_ref[2]
-        ref[4,1,1]=(0.947654286923)*x_ref[0]**o+(-0.228830597313)*x_ref[0]+(-0.501442713655)*x_ref[1]**o+(0.282437368749)*x_ref[1]+(0.543592950002)*x_ref[2]**o+(0.5400198247)*x_ref[2]
-        ref[5,0,0]=(0.144349494033)*x_ref[0]**o+(-0.635328703132)*x_ref[0]+(-0.797851162499)*x_ref[1]**o+(0.356874780185)*x_ref[1]+(-0.205725457569)*x_ref[2]**o+(-0.674962512018)*x_ref[2]
-        ref[5,0,1]=(-0.728948504419)*x_ref[0]**o+(0.944337871242)*x_ref[0]+(-0.790388944678)*x_ref[1]**o+(0.59119693076)*x_ref[1]+(0.9569152246)*x_ref[2]**o+(-0.205404245177)*x_ref[2]
-        ref[5,1,0]=(0.477597678348)*x_ref[0]**o+(-0.318993929605)*x_ref[0]+(0.481029970286)*x_ref[1]**o+(0.708696918395)*x_ref[1]+(0.0531716082887)*x_ref[2]**o+(-0.847697491061)*x_ref[2]
-        ref[5,1,1]=(-0.458572001979)*x_ref[0]**o+(0.582048244354)*x_ref[0]+(-0.040756132547)*x_ref[1]**o+(-0.953201198076)*x_ref[1]+(-0.971859723822)*x_ref[2]**o+(-0.796426143181)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.937777610663)*x[0]**o+(-0.0228520946632)*x[0]+(0.642385396583)*x[1]**o+(-0.803821945812)*x[1]
-        arg[0,0,0,1]=(-0.398785307492)*x[0]**o+(0.0450288952883)*x[0]+(-0.777780548133)*x[1]**o+(0.0273772099414)*x[1]
-        arg[0,0,1,0]=(-0.667280086925)*x[0]**o+(-0.934642710274)*x[0]+(0.565327494491)*x[1]**o+(0.988521769056)*x[1]
-        arg[0,0,1,1]=(-0.225562383498)*x[0]**o+(-0.280566031134)*x[0]+(-0.295768954831)*x[1]**o+(0.102759013802)*x[1]
-        arg[0,0,2,0]=(-0.179577502546)*x[0]**o+(-0.156932777074)*x[0]+(-0.145616153633)*x[1]**o+(0.971876899135)*x[1]
-        arg[0,0,2,1]=(-0.840266409118)*x[0]**o+(0.704356785022)*x[0]+(0.740091470711)*x[1]**o+(0.708478499023)*x[1]
-        arg[0,1,0,0]=(-0.487161662806)*x[0]**o+(0.565313908399)*x[0]+(-0.33708697293)*x[1]**o+(0.731675966546)*x[1]
-        arg[0,1,0,1]=(-0.135615857963)*x[0]**o+(0.265408777025)*x[0]+(-0.168207260227)*x[1]**o+(-0.598974659317)*x[1]
-        arg[0,1,1,0]=(0.0533944010258)*x[0]**o+(0.819248906738)*x[0]+(-0.837005251524)*x[1]**o+(0.119613618595)*x[1]
-        arg[0,1,1,1]=(-0.257520627047)*x[0]**o+(0.339264545713)*x[0]+(0.137721228188)*x[1]**o+(-0.512251030979)*x[1]
-        arg[0,1,2,0]=(-0.797070396749)*x[0]**o+(0.690173285077)*x[0]+(-0.213206187271)*x[1]**o+(-0.873999125945)*x[1]
-        arg[0,1,2,1]=(-0.847662300367)*x[0]**o+(0.785781114266)*x[0]+(-0.456918398811)*x[1]**o+(0.458881079947)*x[1]
-        arg[0,2,0,0]=(-0.385269163334)*x[0]**o+(0.135941228964)*x[0]+(0.233245620648)*x[1]**o+(-0.246282209626)*x[1]
-        arg[0,2,0,1]=(0.372914636218)*x[0]**o+(-0.160283657003)*x[0]+(0.0565043889781)*x[1]**o+(0.199715522021)*x[1]
-        arg[0,2,1,0]=(0.676198390598)*x[0]**o+(0.938025122014)*x[0]+(0.161074696651)*x[1]**o+(-0.155495646964)*x[1]
-        arg[0,2,1,1]=(-0.709286924155)*x[0]**o+(-0.173716284776)*x[0]+(0.0576435484694)*x[1]**o+(0.673924697832)*x[1]
-        arg[0,2,2,0]=(-0.436468652969)*x[0]**o+(0.117279009082)*x[0]+(-0.731436369191)*x[1]**o+(0.919578503469)*x[1]
-        arg[0,2,2,1]=(-0.691042646151)*x[0]**o+(-0.606293725574)*x[0]+(0.657291692759)*x[1]**o+(-0.0146398994729)*x[1]
-        arg[0,3,0,0]=(0.365939313719)*x[0]**o+(-0.221236913792)*x[0]+(-0.729594967883)*x[1]**o+(0.0179024719114)*x[1]
-        arg[0,3,0,1]=(0.135892133258)*x[0]**o+(0.728069461936)*x[0]+(-0.365691795279)*x[1]**o+(0.877708599922)*x[1]
-        arg[0,3,1,0]=(-0.853312456817)*x[0]**o+(-0.713031969049)*x[0]+(0.274755827464)*x[1]**o+(-0.527330699033)*x[1]
-        arg[0,3,1,1]=(-0.30358584687)*x[0]**o+(0.871629391968)*x[0]+(0.906915162645)*x[1]**o+(0.499955429041)*x[1]
-        arg[0,3,2,0]=(-0.880532587427)*x[0]**o+(0.265729672258)*x[0]+(0.528677136349)*x[1]**o+(-0.224602964925)*x[1]
-        arg[0,3,2,1]=(0.158632463532)*x[0]**o+(-0.665418329643)*x[0]+(0.957661069067)*x[1]**o+(-0.23771309434)*x[1]
-        arg[0,4,0,0]=(-0.128073514905)*x[0]**o+(-0.452543798055)*x[0]+(0.303808626277)*x[1]**o+(0.841041779759)*x[1]
-        arg[0,4,0,1]=(0.0219309964781)*x[0]**o+(-0.949488393443)*x[0]+(0.0436905404663)*x[1]**o+(-0.304527242795)*x[1]
-        arg[0,4,1,0]=(-0.792275137775)*x[0]**o+(0.450079829644)*x[0]+(0.162879981637)*x[1]**o+(-0.185839015805)*x[1]
-        arg[0,4,1,1]=(0.761932713893)*x[0]**o+(0.932601232945)*x[0]+(-0.606328305783)*x[1]**o+(-0.123973545682)*x[1]
-        arg[0,4,2,0]=(-0.514088304908)*x[0]**o+(0.987668774807)*x[0]+(0.866078887168)*x[1]**o+(-0.608518224484)*x[1]
-        arg[0,4,2,1]=(-0.427564608028)*x[0]**o+(0.231599614445)*x[0]+(-0.406862229819)*x[1]**o+(0.358456864265)*x[1]
-        arg[1,0,0,0]=(0.342092171801)*x[0]**o+(-0.264522675185)*x[0]+(-0.37976917867)*x[1]**o+(0.778596602561)*x[1]
-        arg[1,0,0,1]=(0.672156473235)*x[0]**o+(0.320317500856)*x[0]+(0.514206881296)*x[1]**o+(0.602594631705)*x[1]
-        arg[1,0,1,0]=(0.914472920293)*x[0]**o+(0.525647943447)*x[0]+(0.685613621597)*x[1]**o+(0.482308039231)*x[1]
-        arg[1,0,1,1]=(-0.727982874425)*x[0]**o+(-0.417964463065)*x[0]+(0.825853988063)*x[1]**o+(0.236134760252)*x[1]
-        arg[1,0,2,0]=(0.922186381756)*x[0]**o+(-0.140522762044)*x[0]+(-0.282169431666)*x[1]**o+(0.778383988397)*x[1]
-        arg[1,0,2,1]=(0.307296736289)*x[0]**o+(0.589844868569)*x[0]+(0.64571457752)*x[1]**o+(0.749333079485)*x[1]
-        arg[1,1,0,0]=(0.908345176703)*x[0]**o+(-0.476053147164)*x[0]+(0.0828501189289)*x[1]**o+(0.280657117705)*x[1]
-        arg[1,1,0,1]=(0.396128814097)*x[0]**o+(0.368821575482)*x[0]+(-0.916584602334)*x[1]**o+(-0.149377992159)*x[1]
-        arg[1,1,1,0]=(-0.38468474313)*x[0]**o+(0.304742499301)*x[0]+(0.638083865846)*x[1]**o+(-0.332046460663)*x[1]
-        arg[1,1,1,1]=(0.845097787138)*x[0]**o+(-0.34949498164)*x[0]+(0.229157202572)*x[1]**o+(0.677584672856)*x[1]
-        arg[1,1,2,0]=(0.0280692825358)*x[0]**o+(0.567451370107)*x[0]+(0.66934188305)*x[1]**o+(-0.477197213188)*x[1]
-        arg[1,1,2,1]=(0.375411487264)*x[0]**o+(0.55086548839)*x[0]+(-0.392135351366)*x[1]**o+(0.91971334589)*x[1]
-        arg[1,2,0,0]=(-0.7659270368)*x[0]**o+(-0.338082792509)*x[0]+(-0.26272975232)*x[1]**o+(0.267936454568)*x[1]
-        arg[1,2,0,1]=(0.918125455771)*x[0]**o+(0.182896655906)*x[0]+(0.525396835337)*x[1]**o+(0.201918789801)*x[1]
-        arg[1,2,1,0]=(-0.54472490266)*x[0]**o+(0.693714832775)*x[0]+(0.898278265794)*x[1]**o+(0.345095187159)*x[1]
-        arg[1,2,1,1]=(-0.498607752195)*x[0]**o+(0.84678344253)*x[0]+(0.678992455984)*x[1]**o+(-0.597396262326)*x[1]
-        arg[1,2,2,0]=(0.215267998554)*x[0]**o+(0.384479388838)*x[0]+(-0.09078862662)*x[1]**o+(-0.0162185695524)*x[1]
-        arg[1,2,2,1]=(-0.335574750173)*x[0]**o+(-0.439933690512)*x[0]+(0.194601817488)*x[1]**o+(0.795181445633)*x[1]
-        arg[1,3,0,0]=(0.862180273604)*x[0]**o+(0.276662657248)*x[0]+(-0.908827123328)*x[1]**o+(0.290406540669)*x[1]
-        arg[1,3,0,1]=(-0.620441636176)*x[0]**o+(0.448236189204)*x[0]+(-0.503817375869)*x[1]**o+(0.689447469467)*x[1]
-        arg[1,3,1,0]=(0.126327572417)*x[0]**o+(-0.476552913848)*x[0]+(0.362273273226)*x[1]**o+(-0.816228830372)*x[1]
-        arg[1,3,1,1]=(-0.65091977023)*x[0]**o+(0.0316560718061)*x[0]+(-0.922906273452)*x[1]**o+(-0.584811809954)*x[1]
-        arg[1,3,2,0]=(-0.675982262546)*x[0]**o+(0.23518662745)*x[0]+(-0.270229269162)*x[1]**o+(-0.00300656227686)*x[1]
-        arg[1,3,2,1]=(0.55691633063)*x[0]**o+(-0.0643123929496)*x[0]+(0.212825067376)*x[1]**o+(-0.0807098593265)*x[1]
-        arg[1,4,0,0]=(0.199100268435)*x[0]**o+(-0.358028564112)*x[0]+(0.130301315926)*x[1]**o+(-0.255752658178)*x[1]
-        arg[1,4,0,1]=(0.821720568968)*x[0]**o+(0.193634063182)*x[0]+(0.862353589302)*x[1]**o+(-0.42971617129)*x[1]
-        arg[1,4,1,0]=(0.51160977767)*x[0]**o+(0.326743318954)*x[0]+(-0.866878934278)*x[1]**o+(-0.927585776234)*x[1]
-        arg[1,4,1,1]=(0.299835915861)*x[0]**o+(-0.969027084981)*x[0]+(-0.589772230832)*x[1]**o+(0.382433302029)*x[1]
-        arg[1,4,2,0]=(0.473101160384)*x[0]**o+(-0.591124830283)*x[0]+(0.0929141413982)*x[1]**o+(-0.529811769054)*x[1]
-        arg[1,4,2,1]=(-0.712363897962)*x[0]**o+(-0.259229026597)*x[0]+(0.00983651162685)*x[1]**o+(-0.329312308231)*x[1]
-        arg[2,0,0,0]=(-0.507414918232)*x[0]**o+(0.668167664289)*x[0]+(0.654870826953)*x[1]**o+(-0.411963068213)*x[1]
-        arg[2,0,0,1]=(-0.894915678458)*x[0]**o+(0.647579368695)*x[0]+(0.222274441569)*x[1]**o+(0.737972296743)*x[1]
-        arg[2,0,1,0]=(-0.457176106717)*x[0]**o+(0.99997698232)*x[0]+(0.524381951875)*x[1]**o+(0.796302331418)*x[1]
-        arg[2,0,1,1]=(-0.761912711581)*x[0]**o+(-0.995235985398)*x[0]+(-0.371926591709)*x[1]**o+(-0.37949019966)*x[1]
-        arg[2,0,2,0]=(0.402826798397)*x[0]**o+(0.473547871218)*x[0]+(0.801636706721)*x[1]**o+(0.314221308918)*x[1]
-        arg[2,0,2,1]=(0.0416846902183)*x[0]**o+(0.815306853966)*x[0]+(-0.526315166764)*x[1]**o+(-0.327935702076)*x[1]
-        arg[2,1,0,0]=(-0.53829655239)*x[0]**o+(-0.467914397053)*x[0]+(0.392659650792)*x[1]**o+(0.309531884089)*x[1]
-        arg[2,1,0,1]=(-0.768324371377)*x[0]**o+(0.136336455054)*x[0]+(0.0653485752909)*x[1]**o+(-0.0181923467911)*x[1]
-        arg[2,1,1,0]=(0.121561771322)*x[0]**o+(-0.794575616334)*x[0]+(0.038194779569)*x[1]**o+(-0.695864614551)*x[1]
-        arg[2,1,1,1]=(0.941872575674)*x[0]**o+(0.322067879395)*x[0]+(0.176873583908)*x[1]**o+(0.266964433323)*x[1]
-        arg[2,1,2,0]=(0.324335817101)*x[0]**o+(0.609048475305)*x[0]+(0.350973789003)*x[1]**o+(-0.284995830372)*x[1]
-        arg[2,1,2,1]=(0.939941132515)*x[0]**o+(0.782468124836)*x[0]+(-0.238539378134)*x[1]**o+(-0.515203802574)*x[1]
-        arg[2,2,0,0]=(0.080179317168)*x[0]**o+(-0.555769741953)*x[0]+(0.283304726007)*x[1]**o+(0.844935300942)*x[1]
-        arg[2,2,0,1]=(0.52001819752)*x[0]**o+(-0.105912273152)*x[0]+(-0.360523424917)*x[1]**o+(-0.179135541646)*x[1]
-        arg[2,2,1,0]=(0.719593478448)*x[0]**o+(-0.722945454687)*x[0]+(0.0316404625439)*x[1]**o+(0.154290328891)*x[1]
-        arg[2,2,1,1]=(0.906382302919)*x[0]**o+(-0.137753840588)*x[0]+(-0.626417865101)*x[1]**o+(-0.890642745149)*x[1]
-        arg[2,2,2,0]=(0.618763086671)*x[0]**o+(-0.267876013516)*x[0]+(0.582353922702)*x[1]**o+(-0.190278788501)*x[1]
-        arg[2,2,2,1]=(0.778824546516)*x[0]**o+(-0.00837218512008)*x[0]+(0.576376019084)*x[1]**o+(-0.173470710629)*x[1]
-        arg[2,3,0,0]=(0.351742111948)*x[0]**o+(-0.641801256932)*x[0]+(-0.979232109277)*x[1]**o+(0.973197715414)*x[1]
-        arg[2,3,0,1]=(-0.194493570182)*x[0]**o+(-0.24088269914)*x[0]+(-0.594521666623)*x[1]**o+(0.442357460052)*x[1]
-        arg[2,3,1,0]=(-0.0677209625916)*x[0]**o+(-0.329246651504)*x[0]+(-0.200109031557)*x[1]**o+(0.0666064469254)*x[1]
-        arg[2,3,1,1]=(-0.31026797404)*x[0]**o+(-0.0420778789656)*x[0]+(-0.534104800904)*x[1]**o+(0.940011883171)*x[1]
-        arg[2,3,2,0]=(0.572825859789)*x[0]**o+(-0.439819027899)*x[0]+(-0.641214796724)*x[1]**o+(0.281317897435)*x[1]
-        arg[2,3,2,1]=(0.410920070755)*x[0]**o+(-0.517259918184)*x[0]+(0.436420469387)*x[1]**o+(0.212276585342)*x[1]
-        arg[2,4,0,0]=(0.0537540090315)*x[0]**o+(-0.362577123782)*x[0]+(-0.0134992480023)*x[1]**o+(0.59055317928)*x[1]
-        arg[2,4,0,1]=(0.894896469792)*x[0]**o+(-0.594219811149)*x[0]+(0.755490579022)*x[1]**o+(-0.222913251691)*x[1]
-        arg[2,4,1,0]=(-0.95471806813)*x[0]**o+(0.364260591437)*x[0]+(-0.51232745259)*x[1]**o+(-0.874795288001)*x[1]
-        arg[2,4,1,1]=(-0.146483465086)*x[0]**o+(0.182495641134)*x[0]+(-0.132211746968)*x[1]**o+(0.39915899917)*x[1]
-        arg[2,4,2,0]=(0.630856642463)*x[0]**o+(0.568438094437)*x[0]+(0.283670966088)*x[1]**o+(0.200206672418)*x[1]
-        arg[2,4,2,1]=(-0.181938802717)*x[0]**o+(0.850684926475)*x[0]+(-0.765889361148)*x[1]**o+(0.750762858672)*x[1]
-        arg[3,0,0,0]=(0.618955933151)*x[0]**o+(0.0280502885803)*x[0]+(-0.518282623282)*x[1]**o+(-0.741257199588)*x[1]
-        arg[3,0,0,1]=(0.122462861306)*x[0]**o+(-0.103190806023)*x[0]+(0.647959918767)*x[1]**o+(0.531727405032)*x[1]
-        arg[3,0,1,0]=(-0.129468664704)*x[0]**o+(0.342288003693)*x[0]+(-0.0268246756133)*x[1]**o+(0.671147920273)*x[1]
-        arg[3,0,1,1]=(-0.99153395274)*x[0]**o+(0.584874556271)*x[0]+(-0.29273067599)*x[1]**o+(-0.802100630404)*x[1]
-        arg[3,0,2,0]=(0.406033817569)*x[0]**o+(-0.664112618189)*x[0]+(0.970253482906)*x[1]**o+(0.979709129918)*x[1]
-        arg[3,0,2,1]=(-0.708798148641)*x[0]**o+(-0.574259437301)*x[0]+(0.305353886124)*x[1]**o+(0.90520799029)*x[1]
-        arg[3,1,0,0]=(-0.296777292529)*x[0]**o+(0.788817860427)*x[0]+(-0.817934426475)*x[1]**o+(-0.480405944642)*x[1]
-        arg[3,1,0,1]=(0.382866653892)*x[0]**o+(-0.0911340124698)*x[0]+(0.449555911305)*x[1]**o+(0.972590525904)*x[1]
-        arg[3,1,1,0]=(0.150349675921)*x[0]**o+(0.316401916978)*x[0]+(0.176755455021)*x[1]**o+(-0.895165552576)*x[1]
-        arg[3,1,1,1]=(-0.334194603044)*x[0]**o+(0.40353334527)*x[0]+(0.510619331296)*x[1]**o+(-0.423857458769)*x[1]
-        arg[3,1,2,0]=(0.876266380991)*x[0]**o+(-0.1146693887)*x[0]+(0.0388933985336)*x[1]**o+(0.537276050219)*x[1]
-        arg[3,1,2,1]=(0.953489127278)*x[0]**o+(-0.40088917811)*x[0]+(0.322112015322)*x[1]**o+(0.570451651396)*x[1]
-        arg[3,2,0,0]=(-0.392674815471)*x[0]**o+(0.805725364633)*x[0]+(-0.550131544344)*x[1]**o+(-0.902042986324)*x[1]
-        arg[3,2,0,1]=(0.996009652754)*x[0]**o+(0.534022968708)*x[0]+(-0.251810035763)*x[1]**o+(-0.324231235105)*x[1]
-        arg[3,2,1,0]=(-0.280691594637)*x[0]**o+(0.716441336919)*x[0]+(0.444717298591)*x[1]**o+(-0.417682576675)*x[1]
-        arg[3,2,1,1]=(-0.528033696021)*x[0]**o+(0.105118392268)*x[0]+(0.219345332231)*x[1]**o+(-0.554011705858)*x[1]
-        arg[3,2,2,0]=(0.869967952526)*x[0]**o+(-0.285204973916)*x[0]+(0.676958471189)*x[1]**o+(-0.109813007662)*x[1]
-        arg[3,2,2,1]=(-0.183338615818)*x[0]**o+(0.124214512553)*x[0]+(-0.00262420395052)*x[1]**o+(0.505099322191)*x[1]
-        arg[3,3,0,0]=(-0.77019083751)*x[0]**o+(-0.288304317474)*x[0]+(-0.674724525333)*x[1]**o+(0.6230658909)*x[1]
-        arg[3,3,0,1]=(0.4027332007)*x[0]**o+(0.0181383553658)*x[0]+(0.0346834190431)*x[1]**o+(-0.343302420746)*x[1]
-        arg[3,3,1,0]=(0.0907452191096)*x[0]**o+(-0.734197819823)*x[0]+(-0.262536956938)*x[1]**o+(-0.838964523281)*x[1]
-        arg[3,3,1,1]=(0.362001847336)*x[0]**o+(-0.99196319473)*x[0]+(-0.544565811529)*x[1]**o+(0.0460139495686)*x[1]
-        arg[3,3,2,0]=(0.43659913886)*x[0]**o+(-0.42986865456)*x[0]+(-0.298749218949)*x[1]**o+(0.927334871957)*x[1]
-        arg[3,3,2,1]=(0.400272592051)*x[0]**o+(0.332756541456)*x[0]+(0.971127734155)*x[1]**o+(0.653965425034)*x[1]
-        arg[3,4,0,0]=(0.663781122153)*x[0]**o+(0.697898766724)*x[0]+(0.157432061303)*x[1]**o+(-0.0526003145497)*x[1]
-        arg[3,4,0,1]=(-0.463791084222)*x[0]**o+(0.384914785855)*x[0]+(-0.996485418809)*x[1]**o+(-0.519106290889)*x[1]
-        arg[3,4,1,0]=(-0.598068247392)*x[0]**o+(0.553482523952)*x[0]+(0.202485340343)*x[1]**o+(-0.540515409196)*x[1]
-        arg[3,4,1,1]=(0.134764979841)*x[0]**o+(0.0141136152488)*x[0]+(-0.536476467366)*x[1]**o+(0.323150057577)*x[1]
-        arg[3,4,2,0]=(-0.73096888708)*x[0]**o+(0.485529166207)*x[0]+(-0.541219829073)*x[1]**o+(0.471443044424)*x[1]
-        arg[3,4,2,1]=(-0.815808733094)*x[0]**o+(0.694490460113)*x[0]+(0.292301816313)*x[1]**o+(0.700014734893)*x[1]
-        ref[0,0,0,0]=(-0.937777610663)*x_ref[0]**o+(-0.0228520946632)*x_ref[0]+(0.642385396583)*x_ref[1]**o+(-0.803821945812)*x_ref[1]
-        ref[0,0,0,1]=(-0.398785307492)*x_ref[0]**o+(0.0450288952883)*x_ref[0]+(-0.777780548133)*x_ref[1]**o+(0.0273772099414)*x_ref[1]
-        ref[0,0,1,0]=(-0.667280086925)*x_ref[0]**o+(-0.934642710274)*x_ref[0]+(0.565327494491)*x_ref[1]**o+(0.988521769056)*x_ref[1]
-        ref[0,0,1,1]=(-0.225562383498)*x_ref[0]**o+(-0.280566031134)*x_ref[0]+(-0.295768954831)*x_ref[1]**o+(0.102759013802)*x_ref[1]
-        ref[0,0,2,0]=(-0.179577502546)*x_ref[0]**o+(-0.156932777074)*x_ref[0]+(-0.145616153633)*x_ref[1]**o+(0.971876899135)*x_ref[1]
-        ref[0,0,2,1]=(-0.840266409118)*x_ref[0]**o+(0.704356785022)*x_ref[0]+(0.740091470711)*x_ref[1]**o+(0.708478499023)*x_ref[1]
-        ref[0,1,0,0]=(-0.487161662806)*x_ref[0]**o+(0.565313908399)*x_ref[0]+(-0.33708697293)*x_ref[1]**o+(0.731675966546)*x_ref[1]
-        ref[0,1,0,1]=(-0.135615857963)*x_ref[0]**o+(0.265408777025)*x_ref[0]+(-0.168207260227)*x_ref[1]**o+(-0.598974659317)*x_ref[1]
-        ref[0,1,1,0]=(0.0533944010258)*x_ref[0]**o+(0.819248906738)*x_ref[0]+(-0.837005251524)*x_ref[1]**o+(0.119613618595)*x_ref[1]
-        ref[0,1,1,1]=(-0.257520627047)*x_ref[0]**o+(0.339264545713)*x_ref[0]+(0.137721228188)*x_ref[1]**o+(-0.512251030979)*x_ref[1]
-        ref[0,1,2,0]=(-0.797070396749)*x_ref[0]**o+(0.690173285077)*x_ref[0]+(-0.213206187271)*x_ref[1]**o+(-0.873999125945)*x_ref[1]
-        ref[0,1,2,1]=(-0.847662300367)*x_ref[0]**o+(0.785781114266)*x_ref[0]+(-0.456918398811)*x_ref[1]**o+(0.458881079947)*x_ref[1]
-        ref[0,2,0,0]=(-0.385269163334)*x_ref[0]**o+(0.135941228964)*x_ref[0]+(0.233245620648)*x_ref[1]**o+(-0.246282209626)*x_ref[1]
-        ref[0,2,0,1]=(0.372914636218)*x_ref[0]**o+(-0.160283657003)*x_ref[0]+(0.0565043889781)*x_ref[1]**o+(0.199715522021)*x_ref[1]
-        ref[0,2,1,0]=(0.676198390598)*x_ref[0]**o+(0.938025122014)*x_ref[0]+(0.161074696651)*x_ref[1]**o+(-0.155495646964)*x_ref[1]
-        ref[0,2,1,1]=(-0.709286924155)*x_ref[0]**o+(-0.173716284776)*x_ref[0]+(0.0576435484694)*x_ref[1]**o+(0.673924697832)*x_ref[1]
-        ref[0,2,2,0]=(-0.436468652969)*x_ref[0]**o+(0.117279009082)*x_ref[0]+(-0.731436369191)*x_ref[1]**o+(0.919578503469)*x_ref[1]
-        ref[0,2,2,1]=(-0.691042646151)*x_ref[0]**o+(-0.606293725574)*x_ref[0]+(0.657291692759)*x_ref[1]**o+(-0.0146398994729)*x_ref[1]
-        ref[0,3,0,0]=(0.365939313719)*x_ref[0]**o+(-0.221236913792)*x_ref[0]+(-0.729594967883)*x_ref[1]**o+(0.0179024719114)*x_ref[1]
-        ref[0,3,0,1]=(0.135892133258)*x_ref[0]**o+(0.728069461936)*x_ref[0]+(-0.365691795279)*x_ref[1]**o+(0.877708599922)*x_ref[1]
-        ref[0,3,1,0]=(-0.853312456817)*x_ref[0]**o+(-0.713031969049)*x_ref[0]+(0.274755827464)*x_ref[1]**o+(-0.527330699033)*x_ref[1]
-        ref[0,3,1,1]=(-0.30358584687)*x_ref[0]**o+(0.871629391968)*x_ref[0]+(0.906915162645)*x_ref[1]**o+(0.499955429041)*x_ref[1]
-        ref[0,3,2,0]=(-0.880532587427)*x_ref[0]**o+(0.265729672258)*x_ref[0]+(0.528677136349)*x_ref[1]**o+(-0.224602964925)*x_ref[1]
-        ref[0,3,2,1]=(0.158632463532)*x_ref[0]**o+(-0.665418329643)*x_ref[0]+(0.957661069067)*x_ref[1]**o+(-0.23771309434)*x_ref[1]
-        ref[0,4,0,0]=(-0.128073514905)*x_ref[0]**o+(-0.452543798055)*x_ref[0]+(0.303808626277)*x_ref[1]**o+(0.841041779759)*x_ref[1]
-        ref[0,4,0,1]=(0.0219309964781)*x_ref[0]**o+(-0.949488393443)*x_ref[0]+(0.0436905404663)*x_ref[1]**o+(-0.304527242795)*x_ref[1]
-        ref[0,4,1,0]=(-0.792275137775)*x_ref[0]**o+(0.450079829644)*x_ref[0]+(0.162879981637)*x_ref[1]**o+(-0.185839015805)*x_ref[1]
-        ref[0,4,1,1]=(0.761932713893)*x_ref[0]**o+(0.932601232945)*x_ref[0]+(-0.606328305783)*x_ref[1]**o+(-0.123973545682)*x_ref[1]
-        ref[0,4,2,0]=(-0.514088304908)*x_ref[0]**o+(0.987668774807)*x_ref[0]+(0.866078887168)*x_ref[1]**o+(-0.608518224484)*x_ref[1]
-        ref[0,4,2,1]=(-0.427564608028)*x_ref[0]**o+(0.231599614445)*x_ref[0]+(-0.406862229819)*x_ref[1]**o+(0.358456864265)*x_ref[1]
-        ref[1,0,0,0]=(0.342092171801)*x_ref[0]**o+(-0.264522675185)*x_ref[0]+(-0.37976917867)*x_ref[1]**o+(0.778596602561)*x_ref[1]
-        ref[1,0,0,1]=(0.672156473235)*x_ref[0]**o+(0.320317500856)*x_ref[0]+(0.514206881296)*x_ref[1]**o+(0.602594631705)*x_ref[1]
-        ref[1,0,1,0]=(0.914472920293)*x_ref[0]**o+(0.525647943447)*x_ref[0]+(0.685613621597)*x_ref[1]**o+(0.482308039231)*x_ref[1]
-        ref[1,0,1,1]=(-0.727982874425)*x_ref[0]**o+(-0.417964463065)*x_ref[0]+(0.825853988063)*x_ref[1]**o+(0.236134760252)*x_ref[1]
-        ref[1,0,2,0]=(0.922186381756)*x_ref[0]**o+(-0.140522762044)*x_ref[0]+(-0.282169431666)*x_ref[1]**o+(0.778383988397)*x_ref[1]
-        ref[1,0,2,1]=(0.307296736289)*x_ref[0]**o+(0.589844868569)*x_ref[0]+(0.64571457752)*x_ref[1]**o+(0.749333079485)*x_ref[1]
-        ref[1,1,0,0]=(0.908345176703)*x_ref[0]**o+(-0.476053147164)*x_ref[0]+(0.0828501189289)*x_ref[1]**o+(0.280657117705)*x_ref[1]
-        ref[1,1,0,1]=(0.396128814097)*x_ref[0]**o+(0.368821575482)*x_ref[0]+(-0.916584602334)*x_ref[1]**o+(-0.149377992159)*x_ref[1]
-        ref[1,1,1,0]=(-0.38468474313)*x_ref[0]**o+(0.304742499301)*x_ref[0]+(0.638083865846)*x_ref[1]**o+(-0.332046460663)*x_ref[1]
-        ref[1,1,1,1]=(0.845097787138)*x_ref[0]**o+(-0.34949498164)*x_ref[0]+(0.229157202572)*x_ref[1]**o+(0.677584672856)*x_ref[1]
-        ref[1,1,2,0]=(0.0280692825358)*x_ref[0]**o+(0.567451370107)*x_ref[0]+(0.66934188305)*x_ref[1]**o+(-0.477197213188)*x_ref[1]
-        ref[1,1,2,1]=(0.375411487264)*x_ref[0]**o+(0.55086548839)*x_ref[0]+(-0.392135351366)*x_ref[1]**o+(0.91971334589)*x_ref[1]
-        ref[1,2,0,0]=(-0.7659270368)*x_ref[0]**o+(-0.338082792509)*x_ref[0]+(-0.26272975232)*x_ref[1]**o+(0.267936454568)*x_ref[1]
-        ref[1,2,0,1]=(0.918125455771)*x_ref[0]**o+(0.182896655906)*x_ref[0]+(0.525396835337)*x_ref[1]**o+(0.201918789801)*x_ref[1]
-        ref[1,2,1,0]=(-0.54472490266)*x_ref[0]**o+(0.693714832775)*x_ref[0]+(0.898278265794)*x_ref[1]**o+(0.345095187159)*x_ref[1]
-        ref[1,2,1,1]=(-0.498607752195)*x_ref[0]**o+(0.84678344253)*x_ref[0]+(0.678992455984)*x_ref[1]**o+(-0.597396262326)*x_ref[1]
-        ref[1,2,2,0]=(0.215267998554)*x_ref[0]**o+(0.384479388838)*x_ref[0]+(-0.09078862662)*x_ref[1]**o+(-0.0162185695524)*x_ref[1]
-        ref[1,2,2,1]=(-0.335574750173)*x_ref[0]**o+(-0.439933690512)*x_ref[0]+(0.194601817488)*x_ref[1]**o+(0.795181445633)*x_ref[1]
-        ref[1,3,0,0]=(0.862180273604)*x_ref[0]**o+(0.276662657248)*x_ref[0]+(-0.908827123328)*x_ref[1]**o+(0.290406540669)*x_ref[1]
-        ref[1,3,0,1]=(-0.620441636176)*x_ref[0]**o+(0.448236189204)*x_ref[0]+(-0.503817375869)*x_ref[1]**o+(0.689447469467)*x_ref[1]
-        ref[1,3,1,0]=(0.126327572417)*x_ref[0]**o+(-0.476552913848)*x_ref[0]+(0.362273273226)*x_ref[1]**o+(-0.816228830372)*x_ref[1]
-        ref[1,3,1,1]=(-0.65091977023)*x_ref[0]**o+(0.0316560718061)*x_ref[0]+(-0.922906273452)*x_ref[1]**o+(-0.584811809954)*x_ref[1]
-        ref[1,3,2,0]=(-0.675982262546)*x_ref[0]**o+(0.23518662745)*x_ref[0]+(-0.270229269162)*x_ref[1]**o+(-0.00300656227686)*x_ref[1]
-        ref[1,3,2,1]=(0.55691633063)*x_ref[0]**o+(-0.0643123929496)*x_ref[0]+(0.212825067376)*x_ref[1]**o+(-0.0807098593265)*x_ref[1]
-        ref[1,4,0,0]=(0.199100268435)*x_ref[0]**o+(-0.358028564112)*x_ref[0]+(0.130301315926)*x_ref[1]**o+(-0.255752658178)*x_ref[1]
-        ref[1,4,0,1]=(0.821720568968)*x_ref[0]**o+(0.193634063182)*x_ref[0]+(0.862353589302)*x_ref[1]**o+(-0.42971617129)*x_ref[1]
-        ref[1,4,1,0]=(0.51160977767)*x_ref[0]**o+(0.326743318954)*x_ref[0]+(-0.866878934278)*x_ref[1]**o+(-0.927585776234)*x_ref[1]
-        ref[1,4,1,1]=(0.299835915861)*x_ref[0]**o+(-0.969027084981)*x_ref[0]+(-0.589772230832)*x_ref[1]**o+(0.382433302029)*x_ref[1]
-        ref[1,4,2,0]=(0.473101160384)*x_ref[0]**o+(-0.591124830283)*x_ref[0]+(0.0929141413982)*x_ref[1]**o+(-0.529811769054)*x_ref[1]
-        ref[1,4,2,1]=(-0.712363897962)*x_ref[0]**o+(-0.259229026597)*x_ref[0]+(0.00983651162685)*x_ref[1]**o+(-0.329312308231)*x_ref[1]
-        ref[2,0,0,0]=(-0.507414918232)*x_ref[0]**o+(0.668167664289)*x_ref[0]+(0.654870826953)*x_ref[1]**o+(-0.411963068213)*x_ref[1]
-        ref[2,0,0,1]=(-0.894915678458)*x_ref[0]**o+(0.647579368695)*x_ref[0]+(0.222274441569)*x_ref[1]**o+(0.737972296743)*x_ref[1]
-        ref[2,0,1,0]=(-0.457176106717)*x_ref[0]**o+(0.99997698232)*x_ref[0]+(0.524381951875)*x_ref[1]**o+(0.796302331418)*x_ref[1]
-        ref[2,0,1,1]=(-0.761912711581)*x_ref[0]**o+(-0.995235985398)*x_ref[0]+(-0.371926591709)*x_ref[1]**o+(-0.37949019966)*x_ref[1]
-        ref[2,0,2,0]=(0.402826798397)*x_ref[0]**o+(0.473547871218)*x_ref[0]+(0.801636706721)*x_ref[1]**o+(0.314221308918)*x_ref[1]
-        ref[2,0,2,1]=(0.0416846902183)*x_ref[0]**o+(0.815306853966)*x_ref[0]+(-0.526315166764)*x_ref[1]**o+(-0.327935702076)*x_ref[1]
-        ref[2,1,0,0]=(-0.53829655239)*x_ref[0]**o+(-0.467914397053)*x_ref[0]+(0.392659650792)*x_ref[1]**o+(0.309531884089)*x_ref[1]
-        ref[2,1,0,1]=(-0.768324371377)*x_ref[0]**o+(0.136336455054)*x_ref[0]+(0.0653485752909)*x_ref[1]**o+(-0.0181923467911)*x_ref[1]
-        ref[2,1,1,0]=(0.121561771322)*x_ref[0]**o+(-0.794575616334)*x_ref[0]+(0.038194779569)*x_ref[1]**o+(-0.695864614551)*x_ref[1]
-        ref[2,1,1,1]=(0.941872575674)*x_ref[0]**o+(0.322067879395)*x_ref[0]+(0.176873583908)*x_ref[1]**o+(0.266964433323)*x_ref[1]
-        ref[2,1,2,0]=(0.324335817101)*x_ref[0]**o+(0.609048475305)*x_ref[0]+(0.350973789003)*x_ref[1]**o+(-0.284995830372)*x_ref[1]
-        ref[2,1,2,1]=(0.939941132515)*x_ref[0]**o+(0.782468124836)*x_ref[0]+(-0.238539378134)*x_ref[1]**o+(-0.515203802574)*x_ref[1]
-        ref[2,2,0,0]=(0.080179317168)*x_ref[0]**o+(-0.555769741953)*x_ref[0]+(0.283304726007)*x_ref[1]**o+(0.844935300942)*x_ref[1]
-        ref[2,2,0,1]=(0.52001819752)*x_ref[0]**o+(-0.105912273152)*x_ref[0]+(-0.360523424917)*x_ref[1]**o+(-0.179135541646)*x_ref[1]
-        ref[2,2,1,0]=(0.719593478448)*x_ref[0]**o+(-0.722945454687)*x_ref[0]+(0.0316404625439)*x_ref[1]**o+(0.154290328891)*x_ref[1]
-        ref[2,2,1,1]=(0.906382302919)*x_ref[0]**o+(-0.137753840588)*x_ref[0]+(-0.626417865101)*x_ref[1]**o+(-0.890642745149)*x_ref[1]
-        ref[2,2,2,0]=(0.618763086671)*x_ref[0]**o+(-0.267876013516)*x_ref[0]+(0.582353922702)*x_ref[1]**o+(-0.190278788501)*x_ref[1]
-        ref[2,2,2,1]=(0.778824546516)*x_ref[0]**o+(-0.00837218512008)*x_ref[0]+(0.576376019084)*x_ref[1]**o+(-0.173470710629)*x_ref[1]
-        ref[2,3,0,0]=(0.351742111948)*x_ref[0]**o+(-0.641801256932)*x_ref[0]+(-0.979232109277)*x_ref[1]**o+(0.973197715414)*x_ref[1]
-        ref[2,3,0,1]=(-0.194493570182)*x_ref[0]**o+(-0.24088269914)*x_ref[0]+(-0.594521666623)*x_ref[1]**o+(0.442357460052)*x_ref[1]
-        ref[2,3,1,0]=(-0.0677209625916)*x_ref[0]**o+(-0.329246651504)*x_ref[0]+(-0.200109031557)*x_ref[1]**o+(0.0666064469254)*x_ref[1]
-        ref[2,3,1,1]=(-0.31026797404)*x_ref[0]**o+(-0.0420778789656)*x_ref[0]+(-0.534104800904)*x_ref[1]**o+(0.940011883171)*x_ref[1]
-        ref[2,3,2,0]=(0.572825859789)*x_ref[0]**o+(-0.439819027899)*x_ref[0]+(-0.641214796724)*x_ref[1]**o+(0.281317897435)*x_ref[1]
-        ref[2,3,2,1]=(0.410920070755)*x_ref[0]**o+(-0.517259918184)*x_ref[0]+(0.436420469387)*x_ref[1]**o+(0.212276585342)*x_ref[1]
-        ref[2,4,0,0]=(0.0537540090315)*x_ref[0]**o+(-0.362577123782)*x_ref[0]+(-0.0134992480023)*x_ref[1]**o+(0.59055317928)*x_ref[1]
-        ref[2,4,0,1]=(0.894896469792)*x_ref[0]**o+(-0.594219811149)*x_ref[0]+(0.755490579022)*x_ref[1]**o+(-0.222913251691)*x_ref[1]
-        ref[2,4,1,0]=(-0.95471806813)*x_ref[0]**o+(0.364260591437)*x_ref[0]+(-0.51232745259)*x_ref[1]**o+(-0.874795288001)*x_ref[1]
-        ref[2,4,1,1]=(-0.146483465086)*x_ref[0]**o+(0.182495641134)*x_ref[0]+(-0.132211746968)*x_ref[1]**o+(0.39915899917)*x_ref[1]
-        ref[2,4,2,0]=(0.630856642463)*x_ref[0]**o+(0.568438094437)*x_ref[0]+(0.283670966088)*x_ref[1]**o+(0.200206672418)*x_ref[1]
-        ref[2,4,2,1]=(-0.181938802717)*x_ref[0]**o+(0.850684926475)*x_ref[0]+(-0.765889361148)*x_ref[1]**o+(0.750762858672)*x_ref[1]
-        ref[3,0,0,0]=(0.618955933151)*x_ref[0]**o+(0.0280502885803)*x_ref[0]+(-0.518282623282)*x_ref[1]**o+(-0.741257199588)*x_ref[1]
-        ref[3,0,0,1]=(0.122462861306)*x_ref[0]**o+(-0.103190806023)*x_ref[0]+(0.647959918767)*x_ref[1]**o+(0.531727405032)*x_ref[1]
-        ref[3,0,1,0]=(-0.129468664704)*x_ref[0]**o+(0.342288003693)*x_ref[0]+(-0.0268246756133)*x_ref[1]**o+(0.671147920273)*x_ref[1]
-        ref[3,0,1,1]=(-0.99153395274)*x_ref[0]**o+(0.584874556271)*x_ref[0]+(-0.29273067599)*x_ref[1]**o+(-0.802100630404)*x_ref[1]
-        ref[3,0,2,0]=(0.406033817569)*x_ref[0]**o+(-0.664112618189)*x_ref[0]+(0.970253482906)*x_ref[1]**o+(0.979709129918)*x_ref[1]
-        ref[3,0,2,1]=(-0.708798148641)*x_ref[0]**o+(-0.574259437301)*x_ref[0]+(0.305353886124)*x_ref[1]**o+(0.90520799029)*x_ref[1]
-        ref[3,1,0,0]=(-0.296777292529)*x_ref[0]**o+(0.788817860427)*x_ref[0]+(-0.817934426475)*x_ref[1]**o+(-0.480405944642)*x_ref[1]
-        ref[3,1,0,1]=(0.382866653892)*x_ref[0]**o+(-0.0911340124698)*x_ref[0]+(0.449555911305)*x_ref[1]**o+(0.972590525904)*x_ref[1]
-        ref[3,1,1,0]=(0.150349675921)*x_ref[0]**o+(0.316401916978)*x_ref[0]+(0.176755455021)*x_ref[1]**o+(-0.895165552576)*x_ref[1]
-        ref[3,1,1,1]=(-0.334194603044)*x_ref[0]**o+(0.40353334527)*x_ref[0]+(0.510619331296)*x_ref[1]**o+(-0.423857458769)*x_ref[1]
-        ref[3,1,2,0]=(0.876266380991)*x_ref[0]**o+(-0.1146693887)*x_ref[0]+(0.0388933985336)*x_ref[1]**o+(0.537276050219)*x_ref[1]
-        ref[3,1,2,1]=(0.953489127278)*x_ref[0]**o+(-0.40088917811)*x_ref[0]+(0.322112015322)*x_ref[1]**o+(0.570451651396)*x_ref[1]
-        ref[3,2,0,0]=(-0.392674815471)*x_ref[0]**o+(0.805725364633)*x_ref[0]+(-0.550131544344)*x_ref[1]**o+(-0.902042986324)*x_ref[1]
-        ref[3,2,0,1]=(0.996009652754)*x_ref[0]**o+(0.534022968708)*x_ref[0]+(-0.251810035763)*x_ref[1]**o+(-0.324231235105)*x_ref[1]
-        ref[3,2,1,0]=(-0.280691594637)*x_ref[0]**o+(0.716441336919)*x_ref[0]+(0.444717298591)*x_ref[1]**o+(-0.417682576675)*x_ref[1]
-        ref[3,2,1,1]=(-0.528033696021)*x_ref[0]**o+(0.105118392268)*x_ref[0]+(0.219345332231)*x_ref[1]**o+(-0.554011705858)*x_ref[1]
-        ref[3,2,2,0]=(0.869967952526)*x_ref[0]**o+(-0.285204973916)*x_ref[0]+(0.676958471189)*x_ref[1]**o+(-0.109813007662)*x_ref[1]
-        ref[3,2,2,1]=(-0.183338615818)*x_ref[0]**o+(0.124214512553)*x_ref[0]+(-0.00262420395052)*x_ref[1]**o+(0.505099322191)*x_ref[1]
-        ref[3,3,0,0]=(-0.77019083751)*x_ref[0]**o+(-0.288304317474)*x_ref[0]+(-0.674724525333)*x_ref[1]**o+(0.6230658909)*x_ref[1]
-        ref[3,3,0,1]=(0.4027332007)*x_ref[0]**o+(0.0181383553658)*x_ref[0]+(0.0346834190431)*x_ref[1]**o+(-0.343302420746)*x_ref[1]
-        ref[3,3,1,0]=(0.0907452191096)*x_ref[0]**o+(-0.734197819823)*x_ref[0]+(-0.262536956938)*x_ref[1]**o+(-0.838964523281)*x_ref[1]
-        ref[3,3,1,1]=(0.362001847336)*x_ref[0]**o+(-0.99196319473)*x_ref[0]+(-0.544565811529)*x_ref[1]**o+(0.0460139495686)*x_ref[1]
-        ref[3,3,2,0]=(0.43659913886)*x_ref[0]**o+(-0.42986865456)*x_ref[0]+(-0.298749218949)*x_ref[1]**o+(0.927334871957)*x_ref[1]
-        ref[3,3,2,1]=(0.400272592051)*x_ref[0]**o+(0.332756541456)*x_ref[0]+(0.971127734155)*x_ref[1]**o+(0.653965425034)*x_ref[1]
-        ref[3,4,0,0]=(0.663781122153)*x_ref[0]**o+(0.697898766724)*x_ref[0]+(0.157432061303)*x_ref[1]**o+(-0.0526003145497)*x_ref[1]
-        ref[3,4,0,1]=(-0.463791084222)*x_ref[0]**o+(0.384914785855)*x_ref[0]+(-0.996485418809)*x_ref[1]**o+(-0.519106290889)*x_ref[1]
-        ref[3,4,1,0]=(-0.598068247392)*x_ref[0]**o+(0.553482523952)*x_ref[0]+(0.202485340343)*x_ref[1]**o+(-0.540515409196)*x_ref[1]
-        ref[3,4,1,1]=(0.134764979841)*x_ref[0]**o+(0.0141136152488)*x_ref[0]+(-0.536476467366)*x_ref[1]**o+(0.323150057577)*x_ref[1]
-        ref[3,4,2,0]=(-0.73096888708)*x_ref[0]**o+(0.485529166207)*x_ref[0]+(-0.541219829073)*x_ref[1]**o+(0.471443044424)*x_ref[1]
-        ref[3,4,2,1]=(-0.815808733094)*x_ref[0]**o+(0.694490460113)*x_ref[0]+(0.292301816313)*x_ref[1]**o+(0.700014734893)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.244520699379)*x[0]**o+(-0.125771252842)*x[0]+(0.654557798928)*x[1]**o+(0.438110948503)*x[1]+(0.399996169353)*x[2]**o+(0.37037141324)*x[2]
-        arg[0,0,0,1]=(0.019693348021)*x[0]**o+(-0.509938412509)*x[0]+(-0.425852907243)*x[1]**o+(0.351462945072)*x[1]+(0.628410872426)*x[2]**o+(0.4769252017)*x[2]
-        arg[0,0,1,0]=(0.623813767602)*x[0]**o+(-0.940818977456)*x[0]+(-0.00111063869285)*x[1]**o+(-0.577558081394)*x[1]+(-0.30810971068)*x[2]**o+(-0.660149007373)*x[2]
-        arg[0,0,1,1]=(0.994105796371)*x[0]**o+(0.199970906966)*x[0]+(0.961509001434)*x[1]**o+(-0.783069602127)*x[1]+(-0.179922863021)*x[2]**o+(-0.386974503089)*x[2]
-        arg[0,0,2,0]=(0.932745137122)*x[0]**o+(0.627995830114)*x[0]+(-0.334344490736)*x[1]**o+(0.733210590815)*x[1]+(-0.23424959051)*x[2]**o+(0.140644214958)*x[2]
-        arg[0,0,2,1]=(-0.282836519247)*x[0]**o+(-0.744077669768)*x[0]+(0.123898574243)*x[1]**o+(0.562384289004)*x[1]+(0.0757927394637)*x[2]**o+(0.767684067921)*x[2]
-        arg[0,1,0,0]=(0.212366202901)*x[0]**o+(-0.679228304269)*x[0]+(0.829706652419)*x[1]**o+(0.24389996073)*x[1]+(0.909367025978)*x[2]**o+(0.280617790407)*x[2]
-        arg[0,1,0,1]=(0.760070952632)*x[0]**o+(-0.678309252372)*x[0]+(0.0372281910363)*x[1]**o+(0.0284582814297)*x[1]+(-0.092349250941)*x[2]**o+(0.347713645921)*x[2]
-        arg[0,1,1,0]=(0.248410230191)*x[0]**o+(-0.833983202295)*x[0]+(-0.759357278899)*x[1]**o+(0.880038285893)*x[1]+(-0.734799540652)*x[2]**o+(0.493330231104)*x[2]
-        arg[0,1,1,1]=(0.0359919724228)*x[0]**o+(-0.0393899014057)*x[0]+(0.185155782488)*x[1]**o+(-0.92692925719)*x[1]+(0.74718037404)*x[2]**o+(-0.283900681763)*x[2]
-        arg[0,1,2,0]=(-0.208643544667)*x[0]**o+(0.368200149096)*x[0]+(-0.327032725172)*x[1]**o+(-0.245547905792)*x[1]+(0.0886488214242)*x[2]**o+(0.179139897691)*x[2]
-        arg[0,1,2,1]=(-0.0618762861459)*x[0]**o+(0.253419217897)*x[0]+(0.840270125508)*x[1]**o+(0.0223556878387)*x[1]+(0.0560904700176)*x[2]**o+(-0.646231049424)*x[2]
-        arg[0,2,0,0]=(0.568966969865)*x[0]**o+(0.786776511348)*x[0]+(0.150595926116)*x[1]**o+(-0.780164417762)*x[1]+(0.510149831242)*x[2]**o+(-0.902871929903)*x[2]
-        arg[0,2,0,1]=(-0.817062669957)*x[0]**o+(0.626805486868)*x[0]+(-0.566129786829)*x[1]**o+(0.248418548905)*x[1]+(-0.273995326019)*x[2]**o+(0.402023521018)*x[2]
-        arg[0,2,1,0]=(-0.160276235113)*x[0]**o+(-0.0732543937053)*x[0]+(-0.0651595982698)*x[1]**o+(-0.529463476237)*x[1]+(0.346098812945)*x[2]**o+(0.418367016439)*x[2]
-        arg[0,2,1,1]=(0.736907408498)*x[0]**o+(-0.123612748157)*x[0]+(0.000834659108651)*x[1]**o+(0.568833761363)*x[1]+(-0.542676953582)*x[2]**o+(0.026182553484)*x[2]
-        arg[0,2,2,0]=(0.320985918151)*x[0]**o+(0.0512654311644)*x[0]+(-0.0313412913713)*x[1]**o+(0.295659930913)*x[1]+(-0.989560405329)*x[2]**o+(-0.107344246298)*x[2]
-        arg[0,2,2,1]=(-0.957793939949)*x[0]**o+(-0.177591880789)*x[0]+(0.0785829772689)*x[1]**o+(0.121445956612)*x[1]+(-0.384134176508)*x[2]**o+(-0.775433914622)*x[2]
-        arg[0,3,0,0]=(-0.130620609021)*x[0]**o+(0.268283814564)*x[0]+(-0.192835222037)*x[1]**o+(0.235341688541)*x[1]+(0.957069315916)*x[2]**o+(-0.708853567529)*x[2]
-        arg[0,3,0,1]=(-0.377028600614)*x[0]**o+(-0.858446162753)*x[0]+(-0.850630580491)*x[1]**o+(-0.810676898206)*x[1]+(-0.613330062817)*x[2]**o+(0.714335738947)*x[2]
-        arg[0,3,1,0]=(-0.602336649415)*x[0]**o+(-0.166667559558)*x[0]+(0.962948866081)*x[1]**o+(0.939531483467)*x[1]+(0.267767294244)*x[2]**o+(0.247155872428)*x[2]
-        arg[0,3,1,1]=(0.838505391049)*x[0]**o+(0.115204438919)*x[0]+(0.989010581013)*x[1]**o+(-0.649789818418)*x[1]+(0.757328444925)*x[2]**o+(0.825158129449)*x[2]
-        arg[0,3,2,0]=(0.724488034506)*x[0]**o+(0.0333093325925)*x[0]+(0.864643652652)*x[1]**o+(-0.557517585925)*x[1]+(-0.340534672063)*x[2]**o+(-0.00425705176271)*x[2]
-        arg[0,3,2,1]=(-0.366459483792)*x[0]**o+(0.257706980646)*x[0]+(0.821731531023)*x[1]**o+(-0.212501303617)*x[1]+(-0.128977067795)*x[2]**o+(-0.931439847041)*x[2]
-        arg[0,4,0,0]=(0.398430239547)*x[0]**o+(-0.00991917699933)*x[0]+(-0.182471763172)*x[1]**o+(0.218327764946)*x[1]+(-0.484510127696)*x[2]**o+(-0.360678193996)*x[2]
-        arg[0,4,0,1]=(0.0640680415135)*x[0]**o+(0.671150063087)*x[0]+(0.208610130381)*x[1]**o+(-0.441252393083)*x[1]+(0.365150146582)*x[2]**o+(-0.228346558142)*x[2]
-        arg[0,4,1,0]=(-0.852694824303)*x[0]**o+(0.181041494463)*x[0]+(0.898413617086)*x[1]**o+(-0.918988862595)*x[1]+(0.169010143324)*x[2]**o+(0.540458809834)*x[2]
-        arg[0,4,1,1]=(-0.213782550366)*x[0]**o+(-0.180557891041)*x[0]+(0.23144059382)*x[1]**o+(0.0609482143429)*x[1]+(0.89256221946)*x[2]**o+(0.977857158982)*x[2]
-        arg[0,4,2,0]=(0.320772898841)*x[0]**o+(0.371610189518)*x[0]+(0.692264150983)*x[1]**o+(-0.751154935415)*x[1]+(-0.163272902772)*x[2]**o+(0.0635386628764)*x[2]
-        arg[0,4,2,1]=(-0.316885908577)*x[0]**o+(0.476104431241)*x[0]+(-0.647713072489)*x[1]**o+(0.683813449908)*x[1]+(0.699293342945)*x[2]**o+(-0.0373906770097)*x[2]
-        arg[1,0,0,0]=(-0.030329265733)*x[0]**o+(-0.0115761157375)*x[0]+(-0.30993823088)*x[1]**o+(0.628877975389)*x[1]+(-0.582940961417)*x[2]**o+(0.154786570457)*x[2]
-        arg[1,0,0,1]=(-0.593610753495)*x[0]**o+(-0.822232097764)*x[0]+(-0.465144000698)*x[1]**o+(-0.62576868204)*x[1]+(-0.53588531407)*x[2]**o+(0.119119578421)*x[2]
-        arg[1,0,1,0]=(-0.15668734059)*x[0]**o+(-0.950658811047)*x[0]+(-0.267969935748)*x[1]**o+(0.0919415340304)*x[1]+(-0.0445382452662)*x[2]**o+(0.949984936459)*x[2]
-        arg[1,0,1,1]=(-0.762474809436)*x[0]**o+(0.794314442281)*x[0]+(0.617742930372)*x[1]**o+(-0.502057530669)*x[1]+(0.42532154189)*x[2]**o+(0.343417687179)*x[2]
-        arg[1,0,2,0]=(0.259583418084)*x[0]**o+(0.460122326434)*x[0]+(0.875185242587)*x[1]**o+(-0.621232091699)*x[1]+(0.922536397008)*x[2]**o+(-0.494729334323)*x[2]
-        arg[1,0,2,1]=(0.79625863156)*x[0]**o+(-0.980360881506)*x[0]+(0.947721778185)*x[1]**o+(-0.234201025597)*x[1]+(-0.974251961452)*x[2]**o+(-0.300484605111)*x[2]
-        arg[1,1,0,0]=(0.719927358834)*x[0]**o+(-0.296944527139)*x[0]+(0.970290716632)*x[1]**o+(0.45656092862)*x[1]+(0.657023751979)*x[2]**o+(-0.703898365316)*x[2]
-        arg[1,1,0,1]=(-0.0600633107738)*x[0]**o+(0.525293730667)*x[0]+(0.17955637601)*x[1]**o+(-0.625782540859)*x[1]+(0.205255859488)*x[2]**o+(-0.963128832741)*x[2]
-        arg[1,1,1,0]=(0.119721921725)*x[0]**o+(0.957918016103)*x[0]+(-0.574883179285)*x[1]**o+(0.915580622743)*x[1]+(-0.432538225757)*x[2]**o+(-0.937539574986)*x[2]
-        arg[1,1,1,1]=(-0.295639299942)*x[0]**o+(-0.703954000058)*x[0]+(-0.185001166055)*x[1]**o+(-0.943933820897)*x[1]+(-0.12692007135)*x[2]**o+(0.476481616585)*x[2]
-        arg[1,1,2,0]=(0.247892010246)*x[0]**o+(0.901198196531)*x[0]+(-0.586162224974)*x[1]**o+(-0.934177552379)*x[1]+(0.704265144051)*x[2]**o+(-0.688632953989)*x[2]
-        arg[1,1,2,1]=(-0.116039842334)*x[0]**o+(-0.300373025101)*x[0]+(-0.286684372551)*x[1]**o+(-0.452337760059)*x[1]+(0.883210026596)*x[2]**o+(-0.319739612634)*x[2]
-        arg[1,2,0,0]=(-0.0326555626249)*x[0]**o+(-0.0933559852573)*x[0]+(0.807443822382)*x[1]**o+(-0.148842350195)*x[1]+(-0.118904471983)*x[2]**o+(-0.740440145747)*x[2]
-        arg[1,2,0,1]=(0.313623768488)*x[0]**o+(0.524958399998)*x[0]+(0.876747001712)*x[1]**o+(-0.468458894694)*x[1]+(0.52118935613)*x[2]**o+(-0.776405429712)*x[2]
-        arg[1,2,1,0]=(0.1328367779)*x[0]**o+(-0.959628068869)*x[0]+(0.746000325891)*x[1]**o+(-0.454705589649)*x[1]+(0.08534697763)*x[2]**o+(0.174892567303)*x[2]
-        arg[1,2,1,1]=(-0.482594997843)*x[0]**o+(0.765628170342)*x[0]+(0.103333249513)*x[1]**o+(0.840778499017)*x[1]+(0.136748193255)*x[2]**o+(0.771613240623)*x[2]
-        arg[1,2,2,0]=(-0.305745376076)*x[0]**o+(-0.0464234361529)*x[0]+(-0.163528204043)*x[1]**o+(0.80782719974)*x[1]+(0.131046315567)*x[2]**o+(0.0849217124905)*x[2]
-        arg[1,2,2,1]=(0.564915635291)*x[0]**o+(-0.162467524139)*x[0]+(-0.696721556806)*x[1]**o+(0.0172839552576)*x[1]+(-0.630040402586)*x[2]**o+(-0.181232689117)*x[2]
-        arg[1,3,0,0]=(-0.768631958549)*x[0]**o+(0.537076196504)*x[0]+(-0.403489871013)*x[1]**o+(0.831966318632)*x[1]+(0.602387061638)*x[2]**o+(0.330495470463)*x[2]
-        arg[1,3,0,1]=(0.770878177942)*x[0]**o+(-0.678609489017)*x[0]+(-0.895200519099)*x[1]**o+(0.935093561205)*x[1]+(0.0497551733469)*x[2]**o+(0.820432808383)*x[2]
-        arg[1,3,1,0]=(0.052867263447)*x[0]**o+(0.566167926663)*x[0]+(-0.00397870350455)*x[1]**o+(-0.780374460006)*x[1]+(-0.166645199933)*x[2]**o+(-0.867274057327)*x[2]
-        arg[1,3,1,1]=(0.0573446476183)*x[0]**o+(-0.699343104682)*x[0]+(0.428624411932)*x[1]**o+(-0.400834963806)*x[1]+(-0.722750021776)*x[2]**o+(0.386821944027)*x[2]
-        arg[1,3,2,0]=(0.390777333115)*x[0]**o+(0.191564882434)*x[0]+(-0.774547811812)*x[1]**o+(0.747678394063)*x[1]+(0.662273739757)*x[2]**o+(-0.295629568405)*x[2]
-        arg[1,3,2,1]=(-0.160077661734)*x[0]**o+(-0.512286879466)*x[0]+(0.616824388099)*x[1]**o+(0.0257995114324)*x[1]+(0.644270949659)*x[2]**o+(0.243520087896)*x[2]
-        arg[1,4,0,0]=(-0.980501571755)*x[0]**o+(0.844184850883)*x[0]+(-0.608509998911)*x[1]**o+(-0.347687895783)*x[1]+(-0.536534228926)*x[2]**o+(0.632821444072)*x[2]
-        arg[1,4,0,1]=(-0.881676821515)*x[0]**o+(-0.858728104026)*x[0]+(-0.576516592622)*x[1]**o+(0.695748958418)*x[1]+(0.856547670877)*x[2]**o+(-0.932960091743)*x[2]
-        arg[1,4,1,0]=(-0.451435812217)*x[0]**o+(0.963886330308)*x[0]+(0.888532771273)*x[1]**o+(0.807924978471)*x[1]+(0.789117121354)*x[2]**o+(0.577647188972)*x[2]
-        arg[1,4,1,1]=(-0.315320308371)*x[0]**o+(0.182798184972)*x[0]+(0.936963228212)*x[1]**o+(-0.634429372225)*x[1]+(0.634343556662)*x[2]**o+(0.975851394002)*x[2]
-        arg[1,4,2,0]=(0.858246326961)*x[0]**o+(0.0955812000864)*x[0]+(0.16143064785)*x[1]**o+(0.397013086552)*x[1]+(-0.507188929963)*x[2]**o+(0.49789827039)*x[2]
-        arg[1,4,2,1]=(-0.524634529078)*x[0]**o+(0.675491034226)*x[0]+(0.858857975014)*x[1]**o+(-0.57874207047)*x[1]+(0.476551353232)*x[2]**o+(-0.622601386038)*x[2]
-        arg[2,0,0,0]=(0.976563609)*x[0]**o+(0.127133211238)*x[0]+(-0.410155025204)*x[1]**o+(-0.909032700787)*x[1]+(-0.197014506331)*x[2]**o+(0.557171133933)*x[2]
-        arg[2,0,0,1]=(0.434874625301)*x[0]**o+(-0.576955025374)*x[0]+(-0.466686136319)*x[1]**o+(-0.359616702831)*x[1]+(-0.916050768111)*x[2]**o+(0.900510057507)*x[2]
-        arg[2,0,1,0]=(0.615259852986)*x[0]**o+(-0.685399646912)*x[0]+(-0.222742007887)*x[1]**o+(-0.487739486778)*x[1]+(-0.675225266903)*x[2]**o+(0.494623157154)*x[2]
-        arg[2,0,1,1]=(-0.89129010918)*x[0]**o+(0.0051571255592)*x[0]+(0.681003954208)*x[1]**o+(0.634041720719)*x[1]+(-0.308587458722)*x[2]**o+(-0.107801539193)*x[2]
-        arg[2,0,2,0]=(-0.660496698398)*x[0]**o+(-0.889315862375)*x[0]+(0.64248433679)*x[1]**o+(-0.941990511222)*x[1]+(-0.173668816201)*x[2]**o+(0.237812802184)*x[2]
-        arg[2,0,2,1]=(0.847365004226)*x[0]**o+(0.802449170085)*x[0]+(0.504737931993)*x[1]**o+(-0.695546680342)*x[1]+(0.0742668699455)*x[2]**o+(0.396565506083)*x[2]
-        arg[2,1,0,0]=(0.812115742561)*x[0]**o+(-0.528091349418)*x[0]+(-0.442834134691)*x[1]**o+(-0.574414379092)*x[1]+(-0.734077338221)*x[2]**o+(0.159306515061)*x[2]
-        arg[2,1,0,1]=(-0.259422255041)*x[0]**o+(-0.104016445541)*x[0]+(0.3560854635)*x[1]**o+(0.997015276785)*x[1]+(-0.707278312293)*x[2]**o+(-0.975235879836)*x[2]
-        arg[2,1,1,0]=(0.402099188227)*x[0]**o+(0.0320354114274)*x[0]+(0.203384927114)*x[1]**o+(-0.847804170327)*x[1]+(-0.898459903546)*x[2]**o+(0.639388498254)*x[2]
-        arg[2,1,1,1]=(-0.0477209380768)*x[0]**o+(0.531574667575)*x[0]+(0.280889682833)*x[1]**o+(-0.444963671116)*x[1]+(0.33935324652)*x[2]**o+(0.943089036339)*x[2]
-        arg[2,1,2,0]=(0.396038211375)*x[0]**o+(-0.54994373568)*x[0]+(0.851017234687)*x[1]**o+(-0.739787661885)*x[1]+(-0.368325897478)*x[2]**o+(-0.449096507837)*x[2]
-        arg[2,1,2,1]=(0.857714720302)*x[0]**o+(-0.750668366832)*x[0]+(-0.587901076381)*x[1]**o+(-0.24906126763)*x[1]+(0.131707530536)*x[2]**o+(0.900975507373)*x[2]
-        arg[2,2,0,0]=(0.783919932392)*x[0]**o+(-0.967669966647)*x[0]+(0.82052580972)*x[1]**o+(-0.711919131449)*x[1]+(-0.396059626351)*x[2]**o+(-0.265805391355)*x[2]
-        arg[2,2,0,1]=(-0.0398160197307)*x[0]**o+(-0.238193541)*x[0]+(0.282277679599)*x[1]**o+(-0.0526835304963)*x[1]+(0.590871489195)*x[2]**o+(-0.925835585742)*x[2]
-        arg[2,2,1,0]=(-0.825757767738)*x[0]**o+(0.238488063696)*x[0]+(0.109616380527)*x[1]**o+(-0.942941715764)*x[1]+(0.632013079754)*x[2]**o+(0.0517997920543)*x[2]
-        arg[2,2,1,1]=(-0.85343230326)*x[0]**o+(0.225247381624)*x[0]+(0.43171428489)*x[1]**o+(0.0937487532231)*x[1]+(0.894064129869)*x[2]**o+(-0.0876265498234)*x[2]
-        arg[2,2,2,0]=(0.349294373111)*x[0]**o+(-0.734159680014)*x[0]+(0.0489227393033)*x[1]**o+(-0.245284468757)*x[1]+(-0.346469825649)*x[2]**o+(0.547054093324)*x[2]
-        arg[2,2,2,1]=(-0.0478095998047)*x[0]**o+(0.440261344405)*x[0]+(-0.590330499679)*x[1]**o+(-0.961009986328)*x[1]+(0.546190002905)*x[2]**o+(-0.027965996519)*x[2]
-        arg[2,3,0,0]=(0.148563550644)*x[0]**o+(0.576704219545)*x[0]+(-0.782168581109)*x[1]**o+(-0.8301245678)*x[1]+(0.937936245682)*x[2]**o+(0.846740948371)*x[2]
-        arg[2,3,0,1]=(-0.447832058524)*x[0]**o+(0.385431388609)*x[0]+(0.193985676964)*x[1]**o+(-0.91717180275)*x[1]+(-0.408732230908)*x[2]**o+(0.548173152118)*x[2]
-        arg[2,3,1,0]=(0.197592567864)*x[0]**o+(-0.77657127384)*x[0]+(0.266355135001)*x[1]**o+(0.604009981584)*x[1]+(-0.379930450459)*x[2]**o+(0.46952844479)*x[2]
-        arg[2,3,1,1]=(0.996803794962)*x[0]**o+(0.319115676981)*x[0]+(0.255552997875)*x[1]**o+(0.21834578367)*x[1]+(0.389966036243)*x[2]**o+(-0.115308080726)*x[2]
-        arg[2,3,2,0]=(-0.0244303880675)*x[0]**o+(-0.128929049017)*x[0]+(-0.350933414406)*x[1]**o+(-0.341716440852)*x[1]+(-0.724579076377)*x[2]**o+(0.21963465519)*x[2]
-        arg[2,3,2,1]=(-0.92899971478)*x[0]**o+(-0.304496074717)*x[0]+(0.568151427024)*x[1]**o+(0.504629517922)*x[1]+(0.846158711477)*x[2]**o+(0.35936792568)*x[2]
-        arg[2,4,0,0]=(-0.350964834352)*x[0]**o+(0.387667833884)*x[0]+(0.547101274223)*x[1]**o+(0.257218757373)*x[1]+(-0.00316748527841)*x[2]**o+(0.314561238615)*x[2]
-        arg[2,4,0,1]=(0.408941739151)*x[0]**o+(0.819113792537)*x[0]+(0.532891848781)*x[1]**o+(-0.30688659725)*x[1]+(-0.736611937618)*x[2]**o+(-0.875783706051)*x[2]
-        arg[2,4,1,0]=(-0.730885165985)*x[0]**o+(0.453908506302)*x[0]+(-0.617385752505)*x[1]**o+(0.357459789592)*x[1]+(0.286323175805)*x[2]**o+(-0.448879127031)*x[2]
-        arg[2,4,1,1]=(-0.295377341281)*x[0]**o+(0.423424371051)*x[0]+(0.524695076927)*x[1]**o+(-0.698499625038)*x[1]+(0.617308008395)*x[2]**o+(-0.423469866581)*x[2]
-        arg[2,4,2,0]=(0.104251379635)*x[0]**o+(0.989709098795)*x[0]+(-0.422075396624)*x[1]**o+(-0.254328561231)*x[1]+(-0.502052795074)*x[2]**o+(-0.0851411652168)*x[2]
-        arg[2,4,2,1]=(0.379332842082)*x[0]**o+(-0.707504861783)*x[0]+(0.00855075647146)*x[1]**o+(0.792851159033)*x[1]+(-0.692042160791)*x[2]**o+(-0.18327165243)*x[2]
-        arg[3,0,0,0]=(0.310700158718)*x[0]**o+(0.285647240187)*x[0]+(0.817947571838)*x[1]**o+(0.808698040916)*x[1]+(0.844184006443)*x[2]**o+(-0.310383215636)*x[2]
-        arg[3,0,0,1]=(-0.0173109952616)*x[0]**o+(0.672034452037)*x[0]+(-0.464572256298)*x[1]**o+(0.205799523299)*x[1]+(-0.971979841338)*x[2]**o+(0.261515966001)*x[2]
-        arg[3,0,1,0]=(0.0329384377028)*x[0]**o+(0.571501185072)*x[0]+(-0.902222556642)*x[1]**o+(-0.528317784373)*x[1]+(0.331989640881)*x[2]**o+(0.0427505624318)*x[2]
-        arg[3,0,1,1]=(0.964350410761)*x[0]**o+(-0.327198989999)*x[0]+(-0.195271523191)*x[1]**o+(0.534663014601)*x[1]+(-0.0208261208706)*x[2]**o+(-0.158019249052)*x[2]
-        arg[3,0,2,0]=(-0.622082726008)*x[0]**o+(0.559463883442)*x[0]+(0.841439693313)*x[1]**o+(-0.196363987516)*x[1]+(-0.0143926547396)*x[2]**o+(0.144732603689)*x[2]
-        arg[3,0,2,1]=(-0.149531653278)*x[0]**o+(0.354229138322)*x[0]+(-0.507916088829)*x[1]**o+(0.221251580047)*x[1]+(0.197213706274)*x[2]**o+(-0.555645149276)*x[2]
-        arg[3,1,0,0]=(0.331020785374)*x[0]**o+(-0.377647773513)*x[0]+(0.563355928949)*x[1]**o+(0.789309216711)*x[1]+(0.203663383875)*x[2]**o+(-0.0333894540645)*x[2]
-        arg[3,1,0,1]=(-0.0965613913882)*x[0]**o+(0.18656484323)*x[0]+(-0.138245941339)*x[1]**o+(-0.34549538745)*x[1]+(0.827173403167)*x[2]**o+(-0.873380503939)*x[2]
-        arg[3,1,1,0]=(0.932940890033)*x[0]**o+(-0.564883830288)*x[0]+(-0.505052725295)*x[1]**o+(-0.669420210206)*x[1]+(-0.799638096039)*x[2]**o+(0.469400233749)*x[2]
-        arg[3,1,1,1]=(-0.9741761069)*x[0]**o+(-0.748125328781)*x[0]+(0.664448241931)*x[1]**o+(0.0957643296979)*x[1]+(0.112211322019)*x[2]**o+(-0.131870290434)*x[2]
-        arg[3,1,2,0]=(-0.438609127704)*x[0]**o+(-0.36618286515)*x[0]+(-0.376420011115)*x[1]**o+(-0.67084624599)*x[1]+(0.821679796644)*x[2]**o+(0.80111319897)*x[2]
-        arg[3,1,2,1]=(-0.409859432085)*x[0]**o+(0.848767816929)*x[0]+(0.382358459835)*x[1]**o+(-0.750139843631)*x[1]+(0.587152586559)*x[2]**o+(-0.26162952001)*x[2]
-        arg[3,2,0,0]=(-0.506329785074)*x[0]**o+(-0.0967745752004)*x[0]+(-0.163316795268)*x[1]**o+(0.0628481921732)*x[1]+(0.395355494367)*x[2]**o+(0.0978901916332)*x[2]
-        arg[3,2,0,1]=(0.803590309587)*x[0]**o+(0.470388053389)*x[0]+(0.674942922168)*x[1]**o+(0.223472834762)*x[1]+(0.552332209028)*x[2]**o+(-0.396443498843)*x[2]
-        arg[3,2,1,0]=(-0.312384723839)*x[0]**o+(0.392213828608)*x[0]+(0.449465316671)*x[1]**o+(-0.249103089401)*x[1]+(0.601412913458)*x[2]**o+(0.209899368039)*x[2]
-        arg[3,2,1,1]=(-0.583776179557)*x[0]**o+(0.485007047754)*x[0]+(-0.0354153633589)*x[1]**o+(-0.898630969916)*x[1]+(-0.266581492795)*x[2]**o+(0.822086680281)*x[2]
-        arg[3,2,2,0]=(0.944617094397)*x[0]**o+(-0.173057994833)*x[0]+(0.927832160048)*x[1]**o+(-0.218599594252)*x[1]+(0.349957755011)*x[2]**o+(0.392602744545)*x[2]
-        arg[3,2,2,1]=(0.461648084674)*x[0]**o+(0.826213376949)*x[0]+(0.143429054731)*x[1]**o+(-0.214265128007)*x[1]+(0.0317208127607)*x[2]**o+(-0.858361078381)*x[2]
-        arg[3,3,0,0]=(0.306607920368)*x[0]**o+(0.147692891688)*x[0]+(-0.562661766456)*x[1]**o+(0.448595564727)*x[1]+(-0.707178218373)*x[2]**o+(0.0655554587866)*x[2]
-        arg[3,3,0,1]=(0.135475820362)*x[0]**o+(0.51420718793)*x[0]+(0.343291220736)*x[1]**o+(-0.797532312602)*x[1]+(-0.273431011273)*x[2]**o+(0.135307779253)*x[2]
-        arg[3,3,1,0]=(0.488028231073)*x[0]**o+(0.542021806829)*x[0]+(0.91916268609)*x[1]**o+(0.317368273365)*x[1]+(0.314807039395)*x[2]**o+(-0.841583308025)*x[2]
-        arg[3,3,1,1]=(-0.182783814917)*x[0]**o+(0.250863481201)*x[0]+(0.755551457003)*x[1]**o+(0.946171548529)*x[1]+(0.0350225436682)*x[2]**o+(0.776059830052)*x[2]
-        arg[3,3,2,0]=(-0.116707124994)*x[0]**o+(-0.727010280588)*x[0]+(0.172065389268)*x[1]**o+(0.754164564639)*x[1]+(0.803777635621)*x[2]**o+(0.293490264417)*x[2]
-        arg[3,3,2,1]=(0.154235982797)*x[0]**o+(-0.124286021486)*x[0]+(-0.737324748116)*x[1]**o+(-0.136803541581)*x[1]+(-0.608370191604)*x[2]**o+(-0.933599034128)*x[2]
-        arg[3,4,0,0]=(0.818061677328)*x[0]**o+(-0.771719613166)*x[0]+(0.742772795251)*x[1]**o+(0.0359285091312)*x[1]+(-0.985656851837)*x[2]**o+(-0.884598206512)*x[2]
-        arg[3,4,0,1]=(0.198371732741)*x[0]**o+(0.646496618681)*x[0]+(0.232912446494)*x[1]**o+(0.945619492023)*x[1]+(-0.344370341731)*x[2]**o+(0.31156840357)*x[2]
-        arg[3,4,1,0]=(-0.609298834606)*x[0]**o+(0.784697392412)*x[0]+(0.996065619079)*x[1]**o+(-0.284498300043)*x[1]+(-0.652795706803)*x[2]**o+(-0.254746840396)*x[2]
-        arg[3,4,1,1]=(-0.0083632822507)*x[0]**o+(0.200923618933)*x[0]+(0.353883930064)*x[1]**o+(0.153257380179)*x[1]+(0.843965464205)*x[2]**o+(0.0418501400703)*x[2]
-        arg[3,4,2,0]=(-0.226055622191)*x[0]**o+(-0.701789166696)*x[0]+(0.274080957143)*x[1]**o+(0.0596744660556)*x[1]+(-0.342083152987)*x[2]**o+(0.593518464697)*x[2]
-        arg[3,4,2,1]=(-0.288168945023)*x[0]**o+(-0.742841678774)*x[0]+(0.972629532424)*x[1]**o+(0.892100560733)*x[1]+(0.803880474721)*x[2]**o+(-0.0638336211224)*x[2]
-        ref[0,0,0,0]=(0.244520699379)*x_ref[0]**o+(-0.125771252842)*x_ref[0]+(0.654557798928)*x_ref[1]**o+(0.438110948503)*x_ref[1]+(0.399996169353)*x_ref[2]**o+(0.37037141324)*x_ref[2]
-        ref[0,0,0,1]=(0.019693348021)*x_ref[0]**o+(-0.509938412509)*x_ref[0]+(-0.425852907243)*x_ref[1]**o+(0.351462945072)*x_ref[1]+(0.628410872426)*x_ref[2]**o+(0.4769252017)*x_ref[2]
-        ref[0,0,1,0]=(0.623813767602)*x_ref[0]**o+(-0.940818977456)*x_ref[0]+(-0.00111063869285)*x_ref[1]**o+(-0.577558081394)*x_ref[1]+(-0.30810971068)*x_ref[2]**o+(-0.660149007373)*x_ref[2]
-        ref[0,0,1,1]=(0.994105796371)*x_ref[0]**o+(0.199970906966)*x_ref[0]+(0.961509001434)*x_ref[1]**o+(-0.783069602127)*x_ref[1]+(-0.179922863021)*x_ref[2]**o+(-0.386974503089)*x_ref[2]
-        ref[0,0,2,0]=(0.932745137122)*x_ref[0]**o+(0.627995830114)*x_ref[0]+(-0.334344490736)*x_ref[1]**o+(0.733210590815)*x_ref[1]+(-0.23424959051)*x_ref[2]**o+(0.140644214958)*x_ref[2]
-        ref[0,0,2,1]=(-0.282836519247)*x_ref[0]**o+(-0.744077669768)*x_ref[0]+(0.123898574243)*x_ref[1]**o+(0.562384289004)*x_ref[1]+(0.0757927394637)*x_ref[2]**o+(0.767684067921)*x_ref[2]
-        ref[0,1,0,0]=(0.212366202901)*x_ref[0]**o+(-0.679228304269)*x_ref[0]+(0.829706652419)*x_ref[1]**o+(0.24389996073)*x_ref[1]+(0.909367025978)*x_ref[2]**o+(0.280617790407)*x_ref[2]
-        ref[0,1,0,1]=(0.760070952632)*x_ref[0]**o+(-0.678309252372)*x_ref[0]+(0.0372281910363)*x_ref[1]**o+(0.0284582814297)*x_ref[1]+(-0.092349250941)*x_ref[2]**o+(0.347713645921)*x_ref[2]
-        ref[0,1,1,0]=(0.248410230191)*x_ref[0]**o+(-0.833983202295)*x_ref[0]+(-0.759357278899)*x_ref[1]**o+(0.880038285893)*x_ref[1]+(-0.734799540652)*x_ref[2]**o+(0.493330231104)*x_ref[2]
-        ref[0,1,1,1]=(0.0359919724228)*x_ref[0]**o+(-0.0393899014057)*x_ref[0]+(0.185155782488)*x_ref[1]**o+(-0.92692925719)*x_ref[1]+(0.74718037404)*x_ref[2]**o+(-0.283900681763)*x_ref[2]
-        ref[0,1,2,0]=(-0.208643544667)*x_ref[0]**o+(0.368200149096)*x_ref[0]+(-0.327032725172)*x_ref[1]**o+(-0.245547905792)*x_ref[1]+(0.0886488214242)*x_ref[2]**o+(0.179139897691)*x_ref[2]
-        ref[0,1,2,1]=(-0.0618762861459)*x_ref[0]**o+(0.253419217897)*x_ref[0]+(0.840270125508)*x_ref[1]**o+(0.0223556878387)*x_ref[1]+(0.0560904700176)*x_ref[2]**o+(-0.646231049424)*x_ref[2]
-        ref[0,2,0,0]=(0.568966969865)*x_ref[0]**o+(0.786776511348)*x_ref[0]+(0.150595926116)*x_ref[1]**o+(-0.780164417762)*x_ref[1]+(0.510149831242)*x_ref[2]**o+(-0.902871929903)*x_ref[2]
-        ref[0,2,0,1]=(-0.817062669957)*x_ref[0]**o+(0.626805486868)*x_ref[0]+(-0.566129786829)*x_ref[1]**o+(0.248418548905)*x_ref[1]+(-0.273995326019)*x_ref[2]**o+(0.402023521018)*x_ref[2]
-        ref[0,2,1,0]=(-0.160276235113)*x_ref[0]**o+(-0.0732543937053)*x_ref[0]+(-0.0651595982698)*x_ref[1]**o+(-0.529463476237)*x_ref[1]+(0.346098812945)*x_ref[2]**o+(0.418367016439)*x_ref[2]
-        ref[0,2,1,1]=(0.736907408498)*x_ref[0]**o+(-0.123612748157)*x_ref[0]+(0.000834659108651)*x_ref[1]**o+(0.568833761363)*x_ref[1]+(-0.542676953582)*x_ref[2]**o+(0.026182553484)*x_ref[2]
-        ref[0,2,2,0]=(0.320985918151)*x_ref[0]**o+(0.0512654311644)*x_ref[0]+(-0.0313412913713)*x_ref[1]**o+(0.295659930913)*x_ref[1]+(-0.989560405329)*x_ref[2]**o+(-0.107344246298)*x_ref[2]
-        ref[0,2,2,1]=(-0.957793939949)*x_ref[0]**o+(-0.177591880789)*x_ref[0]+(0.0785829772689)*x_ref[1]**o+(0.121445956612)*x_ref[1]+(-0.384134176508)*x_ref[2]**o+(-0.775433914622)*x_ref[2]
-        ref[0,3,0,0]=(-0.130620609021)*x_ref[0]**o+(0.268283814564)*x_ref[0]+(-0.192835222037)*x_ref[1]**o+(0.235341688541)*x_ref[1]+(0.957069315916)*x_ref[2]**o+(-0.708853567529)*x_ref[2]
-        ref[0,3,0,1]=(-0.377028600614)*x_ref[0]**o+(-0.858446162753)*x_ref[0]+(-0.850630580491)*x_ref[1]**o+(-0.810676898206)*x_ref[1]+(-0.613330062817)*x_ref[2]**o+(0.714335738947)*x_ref[2]
-        ref[0,3,1,0]=(-0.602336649415)*x_ref[0]**o+(-0.166667559558)*x_ref[0]+(0.962948866081)*x_ref[1]**o+(0.939531483467)*x_ref[1]+(0.267767294244)*x_ref[2]**o+(0.247155872428)*x_ref[2]
-        ref[0,3,1,1]=(0.838505391049)*x_ref[0]**o+(0.115204438919)*x_ref[0]+(0.989010581013)*x_ref[1]**o+(-0.649789818418)*x_ref[1]+(0.757328444925)*x_ref[2]**o+(0.825158129449)*x_ref[2]
-        ref[0,3,2,0]=(0.724488034506)*x_ref[0]**o+(0.0333093325925)*x_ref[0]+(0.864643652652)*x_ref[1]**o+(-0.557517585925)*x_ref[1]+(-0.340534672063)*x_ref[2]**o+(-0.00425705176271)*x_ref[2]
-        ref[0,3,2,1]=(-0.366459483792)*x_ref[0]**o+(0.257706980646)*x_ref[0]+(0.821731531023)*x_ref[1]**o+(-0.212501303617)*x_ref[1]+(-0.128977067795)*x_ref[2]**o+(-0.931439847041)*x_ref[2]
-        ref[0,4,0,0]=(0.398430239547)*x_ref[0]**o+(-0.00991917699933)*x_ref[0]+(-0.182471763172)*x_ref[1]**o+(0.218327764946)*x_ref[1]+(-0.484510127696)*x_ref[2]**o+(-0.360678193996)*x_ref[2]
-        ref[0,4,0,1]=(0.0640680415135)*x_ref[0]**o+(0.671150063087)*x_ref[0]+(0.208610130381)*x_ref[1]**o+(-0.441252393083)*x_ref[1]+(0.365150146582)*x_ref[2]**o+(-0.228346558142)*x_ref[2]
-        ref[0,4,1,0]=(-0.852694824303)*x_ref[0]**o+(0.181041494463)*x_ref[0]+(0.898413617086)*x_ref[1]**o+(-0.918988862595)*x_ref[1]+(0.169010143324)*x_ref[2]**o+(0.540458809834)*x_ref[2]
-        ref[0,4,1,1]=(-0.213782550366)*x_ref[0]**o+(-0.180557891041)*x_ref[0]+(0.23144059382)*x_ref[1]**o+(0.0609482143429)*x_ref[1]+(0.89256221946)*x_ref[2]**o+(0.977857158982)*x_ref[2]
-        ref[0,4,2,0]=(0.320772898841)*x_ref[0]**o+(0.371610189518)*x_ref[0]+(0.692264150983)*x_ref[1]**o+(-0.751154935415)*x_ref[1]+(-0.163272902772)*x_ref[2]**o+(0.0635386628764)*x_ref[2]
-        ref[0,4,2,1]=(-0.316885908577)*x_ref[0]**o+(0.476104431241)*x_ref[0]+(-0.647713072489)*x_ref[1]**o+(0.683813449908)*x_ref[1]+(0.699293342945)*x_ref[2]**o+(-0.0373906770097)*x_ref[2]
-        ref[1,0,0,0]=(-0.030329265733)*x_ref[0]**o+(-0.0115761157375)*x_ref[0]+(-0.30993823088)*x_ref[1]**o+(0.628877975389)*x_ref[1]+(-0.582940961417)*x_ref[2]**o+(0.154786570457)*x_ref[2]
-        ref[1,0,0,1]=(-0.593610753495)*x_ref[0]**o+(-0.822232097764)*x_ref[0]+(-0.465144000698)*x_ref[1]**o+(-0.62576868204)*x_ref[1]+(-0.53588531407)*x_ref[2]**o+(0.119119578421)*x_ref[2]
-        ref[1,0,1,0]=(-0.15668734059)*x_ref[0]**o+(-0.950658811047)*x_ref[0]+(-0.267969935748)*x_ref[1]**o+(0.0919415340304)*x_ref[1]+(-0.0445382452662)*x_ref[2]**o+(0.949984936459)*x_ref[2]
-        ref[1,0,1,1]=(-0.762474809436)*x_ref[0]**o+(0.794314442281)*x_ref[0]+(0.617742930372)*x_ref[1]**o+(-0.502057530669)*x_ref[1]+(0.42532154189)*x_ref[2]**o+(0.343417687179)*x_ref[2]
-        ref[1,0,2,0]=(0.259583418084)*x_ref[0]**o+(0.460122326434)*x_ref[0]+(0.875185242587)*x_ref[1]**o+(-0.621232091699)*x_ref[1]+(0.922536397008)*x_ref[2]**o+(-0.494729334323)*x_ref[2]
-        ref[1,0,2,1]=(0.79625863156)*x_ref[0]**o+(-0.980360881506)*x_ref[0]+(0.947721778185)*x_ref[1]**o+(-0.234201025597)*x_ref[1]+(-0.974251961452)*x_ref[2]**o+(-0.300484605111)*x_ref[2]
-        ref[1,1,0,0]=(0.719927358834)*x_ref[0]**o+(-0.296944527139)*x_ref[0]+(0.970290716632)*x_ref[1]**o+(0.45656092862)*x_ref[1]+(0.657023751979)*x_ref[2]**o+(-0.703898365316)*x_ref[2]
-        ref[1,1,0,1]=(-0.0600633107738)*x_ref[0]**o+(0.525293730667)*x_ref[0]+(0.17955637601)*x_ref[1]**o+(-0.625782540859)*x_ref[1]+(0.205255859488)*x_ref[2]**o+(-0.963128832741)*x_ref[2]
-        ref[1,1,1,0]=(0.119721921725)*x_ref[0]**o+(0.957918016103)*x_ref[0]+(-0.574883179285)*x_ref[1]**o+(0.915580622743)*x_ref[1]+(-0.432538225757)*x_ref[2]**o+(-0.937539574986)*x_ref[2]
-        ref[1,1,1,1]=(-0.295639299942)*x_ref[0]**o+(-0.703954000058)*x_ref[0]+(-0.185001166055)*x_ref[1]**o+(-0.943933820897)*x_ref[1]+(-0.12692007135)*x_ref[2]**o+(0.476481616585)*x_ref[2]
-        ref[1,1,2,0]=(0.247892010246)*x_ref[0]**o+(0.901198196531)*x_ref[0]+(-0.586162224974)*x_ref[1]**o+(-0.934177552379)*x_ref[1]+(0.704265144051)*x_ref[2]**o+(-0.688632953989)*x_ref[2]
-        ref[1,1,2,1]=(-0.116039842334)*x_ref[0]**o+(-0.300373025101)*x_ref[0]+(-0.286684372551)*x_ref[1]**o+(-0.452337760059)*x_ref[1]+(0.883210026596)*x_ref[2]**o+(-0.319739612634)*x_ref[2]
-        ref[1,2,0,0]=(-0.0326555626249)*x_ref[0]**o+(-0.0933559852573)*x_ref[0]+(0.807443822382)*x_ref[1]**o+(-0.148842350195)*x_ref[1]+(-0.118904471983)*x_ref[2]**o+(-0.740440145747)*x_ref[2]
-        ref[1,2,0,1]=(0.313623768488)*x_ref[0]**o+(0.524958399998)*x_ref[0]+(0.876747001712)*x_ref[1]**o+(-0.468458894694)*x_ref[1]+(0.52118935613)*x_ref[2]**o+(-0.776405429712)*x_ref[2]
-        ref[1,2,1,0]=(0.1328367779)*x_ref[0]**o+(-0.959628068869)*x_ref[0]+(0.746000325891)*x_ref[1]**o+(-0.454705589649)*x_ref[1]+(0.08534697763)*x_ref[2]**o+(0.174892567303)*x_ref[2]
-        ref[1,2,1,1]=(-0.482594997843)*x_ref[0]**o+(0.765628170342)*x_ref[0]+(0.103333249513)*x_ref[1]**o+(0.840778499017)*x_ref[1]+(0.136748193255)*x_ref[2]**o+(0.771613240623)*x_ref[2]
-        ref[1,2,2,0]=(-0.305745376076)*x_ref[0]**o+(-0.0464234361529)*x_ref[0]+(-0.163528204043)*x_ref[1]**o+(0.80782719974)*x_ref[1]+(0.131046315567)*x_ref[2]**o+(0.0849217124905)*x_ref[2]
-        ref[1,2,2,1]=(0.564915635291)*x_ref[0]**o+(-0.162467524139)*x_ref[0]+(-0.696721556806)*x_ref[1]**o+(0.0172839552576)*x_ref[1]+(-0.630040402586)*x_ref[2]**o+(-0.181232689117)*x_ref[2]
-        ref[1,3,0,0]=(-0.768631958549)*x_ref[0]**o+(0.537076196504)*x_ref[0]+(-0.403489871013)*x_ref[1]**o+(0.831966318632)*x_ref[1]+(0.602387061638)*x_ref[2]**o+(0.330495470463)*x_ref[2]
-        ref[1,3,0,1]=(0.770878177942)*x_ref[0]**o+(-0.678609489017)*x_ref[0]+(-0.895200519099)*x_ref[1]**o+(0.935093561205)*x_ref[1]+(0.0497551733469)*x_ref[2]**o+(0.820432808383)*x_ref[2]
-        ref[1,3,1,0]=(0.052867263447)*x_ref[0]**o+(0.566167926663)*x_ref[0]+(-0.00397870350455)*x_ref[1]**o+(-0.780374460006)*x_ref[1]+(-0.166645199933)*x_ref[2]**o+(-0.867274057327)*x_ref[2]
-        ref[1,3,1,1]=(0.0573446476183)*x_ref[0]**o+(-0.699343104682)*x_ref[0]+(0.428624411932)*x_ref[1]**o+(-0.400834963806)*x_ref[1]+(-0.722750021776)*x_ref[2]**o+(0.386821944027)*x_ref[2]
-        ref[1,3,2,0]=(0.390777333115)*x_ref[0]**o+(0.191564882434)*x_ref[0]+(-0.774547811812)*x_ref[1]**o+(0.747678394063)*x_ref[1]+(0.662273739757)*x_ref[2]**o+(-0.295629568405)*x_ref[2]
-        ref[1,3,2,1]=(-0.160077661734)*x_ref[0]**o+(-0.512286879466)*x_ref[0]+(0.616824388099)*x_ref[1]**o+(0.0257995114324)*x_ref[1]+(0.644270949659)*x_ref[2]**o+(0.243520087896)*x_ref[2]
-        ref[1,4,0,0]=(-0.980501571755)*x_ref[0]**o+(0.844184850883)*x_ref[0]+(-0.608509998911)*x_ref[1]**o+(-0.347687895783)*x_ref[1]+(-0.536534228926)*x_ref[2]**o+(0.632821444072)*x_ref[2]
-        ref[1,4,0,1]=(-0.881676821515)*x_ref[0]**o+(-0.858728104026)*x_ref[0]+(-0.576516592622)*x_ref[1]**o+(0.695748958418)*x_ref[1]+(0.856547670877)*x_ref[2]**o+(-0.932960091743)*x_ref[2]
-        ref[1,4,1,0]=(-0.451435812217)*x_ref[0]**o+(0.963886330308)*x_ref[0]+(0.888532771273)*x_ref[1]**o+(0.807924978471)*x_ref[1]+(0.789117121354)*x_ref[2]**o+(0.577647188972)*x_ref[2]
-        ref[1,4,1,1]=(-0.315320308371)*x_ref[0]**o+(0.182798184972)*x_ref[0]+(0.936963228212)*x_ref[1]**o+(-0.634429372225)*x_ref[1]+(0.634343556662)*x_ref[2]**o+(0.975851394002)*x_ref[2]
-        ref[1,4,2,0]=(0.858246326961)*x_ref[0]**o+(0.0955812000864)*x_ref[0]+(0.16143064785)*x_ref[1]**o+(0.397013086552)*x_ref[1]+(-0.507188929963)*x_ref[2]**o+(0.49789827039)*x_ref[2]
-        ref[1,4,2,1]=(-0.524634529078)*x_ref[0]**o+(0.675491034226)*x_ref[0]+(0.858857975014)*x_ref[1]**o+(-0.57874207047)*x_ref[1]+(0.476551353232)*x_ref[2]**o+(-0.622601386038)*x_ref[2]
-        ref[2,0,0,0]=(0.976563609)*x_ref[0]**o+(0.127133211238)*x_ref[0]+(-0.410155025204)*x_ref[1]**o+(-0.909032700787)*x_ref[1]+(-0.197014506331)*x_ref[2]**o+(0.557171133933)*x_ref[2]
-        ref[2,0,0,1]=(0.434874625301)*x_ref[0]**o+(-0.576955025374)*x_ref[0]+(-0.466686136319)*x_ref[1]**o+(-0.359616702831)*x_ref[1]+(-0.916050768111)*x_ref[2]**o+(0.900510057507)*x_ref[2]
-        ref[2,0,1,0]=(0.615259852986)*x_ref[0]**o+(-0.685399646912)*x_ref[0]+(-0.222742007887)*x_ref[1]**o+(-0.487739486778)*x_ref[1]+(-0.675225266903)*x_ref[2]**o+(0.494623157154)*x_ref[2]
-        ref[2,0,1,1]=(-0.89129010918)*x_ref[0]**o+(0.0051571255592)*x_ref[0]+(0.681003954208)*x_ref[1]**o+(0.634041720719)*x_ref[1]+(-0.308587458722)*x_ref[2]**o+(-0.107801539193)*x_ref[2]
-        ref[2,0,2,0]=(-0.660496698398)*x_ref[0]**o+(-0.889315862375)*x_ref[0]+(0.64248433679)*x_ref[1]**o+(-0.941990511222)*x_ref[1]+(-0.173668816201)*x_ref[2]**o+(0.237812802184)*x_ref[2]
-        ref[2,0,2,1]=(0.847365004226)*x_ref[0]**o+(0.802449170085)*x_ref[0]+(0.504737931993)*x_ref[1]**o+(-0.695546680342)*x_ref[1]+(0.0742668699455)*x_ref[2]**o+(0.396565506083)*x_ref[2]
-        ref[2,1,0,0]=(0.812115742561)*x_ref[0]**o+(-0.528091349418)*x_ref[0]+(-0.442834134691)*x_ref[1]**o+(-0.574414379092)*x_ref[1]+(-0.734077338221)*x_ref[2]**o+(0.159306515061)*x_ref[2]
-        ref[2,1,0,1]=(-0.259422255041)*x_ref[0]**o+(-0.104016445541)*x_ref[0]+(0.3560854635)*x_ref[1]**o+(0.997015276785)*x_ref[1]+(-0.707278312293)*x_ref[2]**o+(-0.975235879836)*x_ref[2]
-        ref[2,1,1,0]=(0.402099188227)*x_ref[0]**o+(0.0320354114274)*x_ref[0]+(0.203384927114)*x_ref[1]**o+(-0.847804170327)*x_ref[1]+(-0.898459903546)*x_ref[2]**o+(0.639388498254)*x_ref[2]
-        ref[2,1,1,1]=(-0.0477209380768)*x_ref[0]**o+(0.531574667575)*x_ref[0]+(0.280889682833)*x_ref[1]**o+(-0.444963671116)*x_ref[1]+(0.33935324652)*x_ref[2]**o+(0.943089036339)*x_ref[2]
-        ref[2,1,2,0]=(0.396038211375)*x_ref[0]**o+(-0.54994373568)*x_ref[0]+(0.851017234687)*x_ref[1]**o+(-0.739787661885)*x_ref[1]+(-0.368325897478)*x_ref[2]**o+(-0.449096507837)*x_ref[2]
-        ref[2,1,2,1]=(0.857714720302)*x_ref[0]**o+(-0.750668366832)*x_ref[0]+(-0.587901076381)*x_ref[1]**o+(-0.24906126763)*x_ref[1]+(0.131707530536)*x_ref[2]**o+(0.900975507373)*x_ref[2]
-        ref[2,2,0,0]=(0.783919932392)*x_ref[0]**o+(-0.967669966647)*x_ref[0]+(0.82052580972)*x_ref[1]**o+(-0.711919131449)*x_ref[1]+(-0.396059626351)*x_ref[2]**o+(-0.265805391355)*x_ref[2]
-        ref[2,2,0,1]=(-0.0398160197307)*x_ref[0]**o+(-0.238193541)*x_ref[0]+(0.282277679599)*x_ref[1]**o+(-0.0526835304963)*x_ref[1]+(0.590871489195)*x_ref[2]**o+(-0.925835585742)*x_ref[2]
-        ref[2,2,1,0]=(-0.825757767738)*x_ref[0]**o+(0.238488063696)*x_ref[0]+(0.109616380527)*x_ref[1]**o+(-0.942941715764)*x_ref[1]+(0.632013079754)*x_ref[2]**o+(0.0517997920543)*x_ref[2]
-        ref[2,2,1,1]=(-0.85343230326)*x_ref[0]**o+(0.225247381624)*x_ref[0]+(0.43171428489)*x_ref[1]**o+(0.0937487532231)*x_ref[1]+(0.894064129869)*x_ref[2]**o+(-0.0876265498234)*x_ref[2]
-        ref[2,2,2,0]=(0.349294373111)*x_ref[0]**o+(-0.734159680014)*x_ref[0]+(0.0489227393033)*x_ref[1]**o+(-0.245284468757)*x_ref[1]+(-0.346469825649)*x_ref[2]**o+(0.547054093324)*x_ref[2]
-        ref[2,2,2,1]=(-0.0478095998047)*x_ref[0]**o+(0.440261344405)*x_ref[0]+(-0.590330499679)*x_ref[1]**o+(-0.961009986328)*x_ref[1]+(0.546190002905)*x_ref[2]**o+(-0.027965996519)*x_ref[2]
-        ref[2,3,0,0]=(0.148563550644)*x_ref[0]**o+(0.576704219545)*x_ref[0]+(-0.782168581109)*x_ref[1]**o+(-0.8301245678)*x_ref[1]+(0.937936245682)*x_ref[2]**o+(0.846740948371)*x_ref[2]
-        ref[2,3,0,1]=(-0.447832058524)*x_ref[0]**o+(0.385431388609)*x_ref[0]+(0.193985676964)*x_ref[1]**o+(-0.91717180275)*x_ref[1]+(-0.408732230908)*x_ref[2]**o+(0.548173152118)*x_ref[2]
-        ref[2,3,1,0]=(0.197592567864)*x_ref[0]**o+(-0.77657127384)*x_ref[0]+(0.266355135001)*x_ref[1]**o+(0.604009981584)*x_ref[1]+(-0.379930450459)*x_ref[2]**o+(0.46952844479)*x_ref[2]
-        ref[2,3,1,1]=(0.996803794962)*x_ref[0]**o+(0.319115676981)*x_ref[0]+(0.255552997875)*x_ref[1]**o+(0.21834578367)*x_ref[1]+(0.389966036243)*x_ref[2]**o+(-0.115308080726)*x_ref[2]
-        ref[2,3,2,0]=(-0.0244303880675)*x_ref[0]**o+(-0.128929049017)*x_ref[0]+(-0.350933414406)*x_ref[1]**o+(-0.341716440852)*x_ref[1]+(-0.724579076377)*x_ref[2]**o+(0.21963465519)*x_ref[2]
-        ref[2,3,2,1]=(-0.92899971478)*x_ref[0]**o+(-0.304496074717)*x_ref[0]+(0.568151427024)*x_ref[1]**o+(0.504629517922)*x_ref[1]+(0.846158711477)*x_ref[2]**o+(0.35936792568)*x_ref[2]
-        ref[2,4,0,0]=(-0.350964834352)*x_ref[0]**o+(0.387667833884)*x_ref[0]+(0.547101274223)*x_ref[1]**o+(0.257218757373)*x_ref[1]+(-0.00316748527841)*x_ref[2]**o+(0.314561238615)*x_ref[2]
-        ref[2,4,0,1]=(0.408941739151)*x_ref[0]**o+(0.819113792537)*x_ref[0]+(0.532891848781)*x_ref[1]**o+(-0.30688659725)*x_ref[1]+(-0.736611937618)*x_ref[2]**o+(-0.875783706051)*x_ref[2]
-        ref[2,4,1,0]=(-0.730885165985)*x_ref[0]**o+(0.453908506302)*x_ref[0]+(-0.617385752505)*x_ref[1]**o+(0.357459789592)*x_ref[1]+(0.286323175805)*x_ref[2]**o+(-0.448879127031)*x_ref[2]
-        ref[2,4,1,1]=(-0.295377341281)*x_ref[0]**o+(0.423424371051)*x_ref[0]+(0.524695076927)*x_ref[1]**o+(-0.698499625038)*x_ref[1]+(0.617308008395)*x_ref[2]**o+(-0.423469866581)*x_ref[2]
-        ref[2,4,2,0]=(0.104251379635)*x_ref[0]**o+(0.989709098795)*x_ref[0]+(-0.422075396624)*x_ref[1]**o+(-0.254328561231)*x_ref[1]+(-0.502052795074)*x_ref[2]**o+(-0.0851411652168)*x_ref[2]
-        ref[2,4,2,1]=(0.379332842082)*x_ref[0]**o+(-0.707504861783)*x_ref[0]+(0.00855075647146)*x_ref[1]**o+(0.792851159033)*x_ref[1]+(-0.692042160791)*x_ref[2]**o+(-0.18327165243)*x_ref[2]
-        ref[3,0,0,0]=(0.310700158718)*x_ref[0]**o+(0.285647240187)*x_ref[0]+(0.817947571838)*x_ref[1]**o+(0.808698040916)*x_ref[1]+(0.844184006443)*x_ref[2]**o+(-0.310383215636)*x_ref[2]
-        ref[3,0,0,1]=(-0.0173109952616)*x_ref[0]**o+(0.672034452037)*x_ref[0]+(-0.464572256298)*x_ref[1]**o+(0.205799523299)*x_ref[1]+(-0.971979841338)*x_ref[2]**o+(0.261515966001)*x_ref[2]
-        ref[3,0,1,0]=(0.0329384377028)*x_ref[0]**o+(0.571501185072)*x_ref[0]+(-0.902222556642)*x_ref[1]**o+(-0.528317784373)*x_ref[1]+(0.331989640881)*x_ref[2]**o+(0.0427505624318)*x_ref[2]
-        ref[3,0,1,1]=(0.964350410761)*x_ref[0]**o+(-0.327198989999)*x_ref[0]+(-0.195271523191)*x_ref[1]**o+(0.534663014601)*x_ref[1]+(-0.0208261208706)*x_ref[2]**o+(-0.158019249052)*x_ref[2]
-        ref[3,0,2,0]=(-0.622082726008)*x_ref[0]**o+(0.559463883442)*x_ref[0]+(0.841439693313)*x_ref[1]**o+(-0.196363987516)*x_ref[1]+(-0.0143926547396)*x_ref[2]**o+(0.144732603689)*x_ref[2]
-        ref[3,0,2,1]=(-0.149531653278)*x_ref[0]**o+(0.354229138322)*x_ref[0]+(-0.507916088829)*x_ref[1]**o+(0.221251580047)*x_ref[1]+(0.197213706274)*x_ref[2]**o+(-0.555645149276)*x_ref[2]
-        ref[3,1,0,0]=(0.331020785374)*x_ref[0]**o+(-0.377647773513)*x_ref[0]+(0.563355928949)*x_ref[1]**o+(0.789309216711)*x_ref[1]+(0.203663383875)*x_ref[2]**o+(-0.0333894540645)*x_ref[2]
-        ref[3,1,0,1]=(-0.0965613913882)*x_ref[0]**o+(0.18656484323)*x_ref[0]+(-0.138245941339)*x_ref[1]**o+(-0.34549538745)*x_ref[1]+(0.827173403167)*x_ref[2]**o+(-0.873380503939)*x_ref[2]
-        ref[3,1,1,0]=(0.932940890033)*x_ref[0]**o+(-0.564883830288)*x_ref[0]+(-0.505052725295)*x_ref[1]**o+(-0.669420210206)*x_ref[1]+(-0.799638096039)*x_ref[2]**o+(0.469400233749)*x_ref[2]
-        ref[3,1,1,1]=(-0.9741761069)*x_ref[0]**o+(-0.748125328781)*x_ref[0]+(0.664448241931)*x_ref[1]**o+(0.0957643296979)*x_ref[1]+(0.112211322019)*x_ref[2]**o+(-0.131870290434)*x_ref[2]
-        ref[3,1,2,0]=(-0.438609127704)*x_ref[0]**o+(-0.36618286515)*x_ref[0]+(-0.376420011115)*x_ref[1]**o+(-0.67084624599)*x_ref[1]+(0.821679796644)*x_ref[2]**o+(0.80111319897)*x_ref[2]
-        ref[3,1,2,1]=(-0.409859432085)*x_ref[0]**o+(0.848767816929)*x_ref[0]+(0.382358459835)*x_ref[1]**o+(-0.750139843631)*x_ref[1]+(0.587152586559)*x_ref[2]**o+(-0.26162952001)*x_ref[2]
-        ref[3,2,0,0]=(-0.506329785074)*x_ref[0]**o+(-0.0967745752004)*x_ref[0]+(-0.163316795268)*x_ref[1]**o+(0.0628481921732)*x_ref[1]+(0.395355494367)*x_ref[2]**o+(0.0978901916332)*x_ref[2]
-        ref[3,2,0,1]=(0.803590309587)*x_ref[0]**o+(0.470388053389)*x_ref[0]+(0.674942922168)*x_ref[1]**o+(0.223472834762)*x_ref[1]+(0.552332209028)*x_ref[2]**o+(-0.396443498843)*x_ref[2]
-        ref[3,2,1,0]=(-0.312384723839)*x_ref[0]**o+(0.392213828608)*x_ref[0]+(0.449465316671)*x_ref[1]**o+(-0.249103089401)*x_ref[1]+(0.601412913458)*x_ref[2]**o+(0.209899368039)*x_ref[2]
-        ref[3,2,1,1]=(-0.583776179557)*x_ref[0]**o+(0.485007047754)*x_ref[0]+(-0.0354153633589)*x_ref[1]**o+(-0.898630969916)*x_ref[1]+(-0.266581492795)*x_ref[2]**o+(0.822086680281)*x_ref[2]
-        ref[3,2,2,0]=(0.944617094397)*x_ref[0]**o+(-0.173057994833)*x_ref[0]+(0.927832160048)*x_ref[1]**o+(-0.218599594252)*x_ref[1]+(0.349957755011)*x_ref[2]**o+(0.392602744545)*x_ref[2]
-        ref[3,2,2,1]=(0.461648084674)*x_ref[0]**o+(0.826213376949)*x_ref[0]+(0.143429054731)*x_ref[1]**o+(-0.214265128007)*x_ref[1]+(0.0317208127607)*x_ref[2]**o+(-0.858361078381)*x_ref[2]
-        ref[3,3,0,0]=(0.306607920368)*x_ref[0]**o+(0.147692891688)*x_ref[0]+(-0.562661766456)*x_ref[1]**o+(0.448595564727)*x_ref[1]+(-0.707178218373)*x_ref[2]**o+(0.0655554587866)*x_ref[2]
-        ref[3,3,0,1]=(0.135475820362)*x_ref[0]**o+(0.51420718793)*x_ref[0]+(0.343291220736)*x_ref[1]**o+(-0.797532312602)*x_ref[1]+(-0.273431011273)*x_ref[2]**o+(0.135307779253)*x_ref[2]
-        ref[3,3,1,0]=(0.488028231073)*x_ref[0]**o+(0.542021806829)*x_ref[0]+(0.91916268609)*x_ref[1]**o+(0.317368273365)*x_ref[1]+(0.314807039395)*x_ref[2]**o+(-0.841583308025)*x_ref[2]
-        ref[3,3,1,1]=(-0.182783814917)*x_ref[0]**o+(0.250863481201)*x_ref[0]+(0.755551457003)*x_ref[1]**o+(0.946171548529)*x_ref[1]+(0.0350225436682)*x_ref[2]**o+(0.776059830052)*x_ref[2]
-        ref[3,3,2,0]=(-0.116707124994)*x_ref[0]**o+(-0.727010280588)*x_ref[0]+(0.172065389268)*x_ref[1]**o+(0.754164564639)*x_ref[1]+(0.803777635621)*x_ref[2]**o+(0.293490264417)*x_ref[2]
-        ref[3,3,2,1]=(0.154235982797)*x_ref[0]**o+(-0.124286021486)*x_ref[0]+(-0.737324748116)*x_ref[1]**o+(-0.136803541581)*x_ref[1]+(-0.608370191604)*x_ref[2]**o+(-0.933599034128)*x_ref[2]
-        ref[3,4,0,0]=(0.818061677328)*x_ref[0]**o+(-0.771719613166)*x_ref[0]+(0.742772795251)*x_ref[1]**o+(0.0359285091312)*x_ref[1]+(-0.985656851837)*x_ref[2]**o+(-0.884598206512)*x_ref[2]
-        ref[3,4,0,1]=(0.198371732741)*x_ref[0]**o+(0.646496618681)*x_ref[0]+(0.232912446494)*x_ref[1]**o+(0.945619492023)*x_ref[1]+(-0.344370341731)*x_ref[2]**o+(0.31156840357)*x_ref[2]
-        ref[3,4,1,0]=(-0.609298834606)*x_ref[0]**o+(0.784697392412)*x_ref[0]+(0.996065619079)*x_ref[1]**o+(-0.284498300043)*x_ref[1]+(-0.652795706803)*x_ref[2]**o+(-0.254746840396)*x_ref[2]
-        ref[3,4,1,1]=(-0.0083632822507)*x_ref[0]**o+(0.200923618933)*x_ref[0]+(0.353883930064)*x_ref[1]**o+(0.153257380179)*x_ref[1]+(0.843965464205)*x_ref[2]**o+(0.0418501400703)*x_ref[2]
-        ref[3,4,2,0]=(-0.226055622191)*x_ref[0]**o+(-0.701789166696)*x_ref[0]+(0.274080957143)*x_ref[1]**o+(0.0596744660556)*x_ref[1]+(-0.342083152987)*x_ref[2]**o+(0.593518464697)*x_ref[2]
-        ref[3,4,2,1]=(-0.288168945023)*x_ref[0]**o+(-0.742841678774)*x_ref[0]+(0.972629532424)*x_ref[1]**o+(0.892100560733)*x_ref[1]+(0.803880474721)*x_ref[2]**o+(-0.0638336211224)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.492060381705)*x[0]**o+(0.578791868713)*x[0]+(-0.439849757114)*x[1]**o+(-0.52629328967)*x[1]
-        ref=(0.492060381705)*x_ref[0]**o+(0.578791868713)*x_ref[0]+(-0.439849757114)*x_ref[1]**o+(-0.52629328967)*x_ref[1]
-      else:
-        arg=(0.954737963273)*x[0]**o+(0.452578946878)*x[0]+(0.0471085060698)*x[1]**o+(-0.640169119832)*x[1]+(0.710401490627)*x[2]**o+(-0.382589884739)*x[2]
-        ref=(0.954737963273)*x_ref[0]**o+(0.452578946878)*x_ref[0]+(0.0471085060698)*x_ref[1]**o+(-0.640169119832)*x_ref[1]+(0.710401490627)*x_ref[2]**o+(-0.382589884739)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.59604585527)*x[0]**o+(0.826981169401)*x[0]+(0.227617349484)*x[1]**o+(0.184907819029)*x[1]
-        arg[1]=(-0.424684036731)*x[0]**o+(0.346537997905)*x[0]+(0.891921272597)*x[1]**o+(-0.145924182872)*x[1]
-        ref[0]=(-0.59604585527)*x_ref[0]**o+(0.826981169401)*x_ref[0]+(0.227617349484)*x_ref[1]**o+(0.184907819029)*x_ref[1]
-        ref[1]=(-0.424684036731)*x_ref[0]**o+(0.346537997905)*x_ref[0]+(0.891921272597)*x_ref[1]**o+(-0.145924182872)*x_ref[1]
-      else:
-        arg[0]=(0.777228173978)*x[0]**o+(-0.812215827155)*x[0]+(-0.618922680968)*x[1]**o+(0.0660312103206)*x[1]+(-0.917545504466)*x[2]**o+(0.988524619414)*x[2]
-        arg[1]=(0.110219469565)*x[0]**o+(-0.441866866062)*x[0]+(-0.654447764335)*x[1]**o+(0.230716133289)*x[1]+(0.347487317165)*x[2]**o+(-0.948877903043)*x[2]
-        ref[0]=(0.777228173978)*x_ref[0]**o+(-0.812215827155)*x_ref[0]+(-0.618922680968)*x_ref[1]**o+(0.0660312103206)*x_ref[1]+(-0.917545504466)*x_ref[2]**o+(0.988524619414)*x_ref[2]
-        ref[1]=(0.110219469565)*x_ref[0]**o+(-0.441866866062)*x_ref[0]+(-0.654447764335)*x_ref[1]**o+(0.230716133289)*x_ref[1]+(0.347487317165)*x_ref[2]**o+(-0.948877903043)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.958809754913)*x[0]**o+(-0.844717049041)*x[0]+(0.462564514427)*x[1]**o+(-0.247678335594)*x[1]
-        arg[0,1]=(0.700700054189)*x[0]**o+(-0.653724611457)*x[0]+(0.52659177803)*x[1]**o+(-0.387559446418)*x[1]
-        arg[0,2]=(-0.326124300134)*x[0]**o+(0.115197897152)*x[0]+(-0.876340641846)*x[1]**o+(0.433060472581)*x[1]
-        arg[0,3]=(-0.101215736407)*x[0]**o+(-0.483684510661)*x[0]+(0.0418770907036)*x[1]**o+(-0.845564414421)*x[1]
-        arg[0,4]=(-0.293094855718)*x[0]**o+(0.710954930773)*x[0]+(0.238671713869)*x[1]**o+(0.576638343412)*x[1]
-        arg[1,0]=(0.529861280122)*x[0]**o+(-0.259437904048)*x[0]+(-0.620725288158)*x[1]**o+(0.326787999382)*x[1]
-        arg[1,1]=(0.421245543012)*x[0]**o+(-0.954139636698)*x[0]+(0.0498199734926)*x[1]**o+(0.24010238499)*x[1]
-        arg[1,2]=(0.333362362373)*x[0]**o+(-0.999953175952)*x[0]+(0.866193849246)*x[1]**o+(0.764287410177)*x[1]
-        arg[1,3]=(0.470415957539)*x[0]**o+(-0.133477966871)*x[0]+(-0.0416970809832)*x[1]**o+(-0.416352740444)*x[1]
-        arg[1,4]=(-0.178613018492)*x[0]**o+(-0.967264985978)*x[0]+(-0.297102423687)*x[1]**o+(0.884184973413)*x[1]
-        arg[2,0]=(-0.29363453294)*x[0]**o+(-0.0237360594862)*x[0]+(-0.300776450747)*x[1]**o+(-0.493932721521)*x[1]
-        arg[2,1]=(0.795045745699)*x[0]**o+(0.984956851154)*x[0]+(-0.724208405235)*x[1]**o+(0.59029067239)*x[1]
-        arg[2,2]=(-0.803012112531)*x[0]**o+(-0.831727785428)*x[0]+(0.330295112332)*x[1]**o+(0.0966317908147)*x[1]
-        arg[2,3]=(-0.652332429144)*x[0]**o+(-0.38689457016)*x[0]+(-0.391780825295)*x[1]**o+(-0.444284790848)*x[1]
-        arg[2,4]=(0.416775161398)*x[0]**o+(-0.16281006536)*x[0]+(-0.742938932867)*x[1]**o+(0.456486183714)*x[1]
-        arg[3,0]=(0.506731632086)*x[0]**o+(-0.222468320035)*x[0]+(-0.906398223556)*x[1]**o+(-0.0250630448611)*x[1]
-        arg[3,1]=(-0.39207398783)*x[0]**o+(-0.574739374252)*x[0]+(0.262101584569)*x[1]**o+(0.249587535087)*x[1]
-        arg[3,2]=(-0.252593913503)*x[0]**o+(-0.864294052989)*x[0]+(0.0110434296336)*x[1]**o+(-0.224585040999)*x[1]
-        arg[3,3]=(-0.631704469212)*x[0]**o+(-0.495153785048)*x[0]+(-0.304420746672)*x[1]**o+(-0.254005222021)*x[1]
-        arg[3,4]=(0.775631055421)*x[0]**o+(0.370095409961)*x[0]+(0.894627612994)*x[1]**o+(-0.329716708629)*x[1]
-        ref[0,0]=(-0.958809754913)*x_ref[0]**o+(-0.844717049041)*x_ref[0]+(0.462564514427)*x_ref[1]**o+(-0.247678335594)*x_ref[1]
-        ref[0,1]=(0.700700054189)*x_ref[0]**o+(-0.653724611457)*x_ref[0]+(0.52659177803)*x_ref[1]**o+(-0.387559446418)*x_ref[1]
-        ref[0,2]=(-0.326124300134)*x_ref[0]**o+(0.115197897152)*x_ref[0]+(-0.876340641846)*x_ref[1]**o+(0.433060472581)*x_ref[1]
-        ref[0,3]=(-0.101215736407)*x_ref[0]**o+(-0.483684510661)*x_ref[0]+(0.0418770907036)*x_ref[1]**o+(-0.845564414421)*x_ref[1]
-        ref[0,4]=(-0.293094855718)*x_ref[0]**o+(0.710954930773)*x_ref[0]+(0.238671713869)*x_ref[1]**o+(0.576638343412)*x_ref[1]
-        ref[1,0]=(0.529861280122)*x_ref[0]**o+(-0.259437904048)*x_ref[0]+(-0.620725288158)*x_ref[1]**o+(0.326787999382)*x_ref[1]
-        ref[1,1]=(0.421245543012)*x_ref[0]**o+(-0.954139636698)*x_ref[0]+(0.0498199734926)*x_ref[1]**o+(0.24010238499)*x_ref[1]
-        ref[1,2]=(0.333362362373)*x_ref[0]**o+(-0.999953175952)*x_ref[0]+(0.866193849246)*x_ref[1]**o+(0.764287410177)*x_ref[1]
-        ref[1,3]=(0.470415957539)*x_ref[0]**o+(-0.133477966871)*x_ref[0]+(-0.0416970809832)*x_ref[1]**o+(-0.416352740444)*x_ref[1]
-        ref[1,4]=(-0.178613018492)*x_ref[0]**o+(-0.967264985978)*x_ref[0]+(-0.297102423687)*x_ref[1]**o+(0.884184973413)*x_ref[1]
-        ref[2,0]=(-0.29363453294)*x_ref[0]**o+(-0.0237360594862)*x_ref[0]+(-0.300776450747)*x_ref[1]**o+(-0.493932721521)*x_ref[1]
-        ref[2,1]=(0.795045745699)*x_ref[0]**o+(0.984956851154)*x_ref[0]+(-0.724208405235)*x_ref[1]**o+(0.59029067239)*x_ref[1]
-        ref[2,2]=(-0.803012112531)*x_ref[0]**o+(-0.831727785428)*x_ref[0]+(0.330295112332)*x_ref[1]**o+(0.0966317908147)*x_ref[1]
-        ref[2,3]=(-0.652332429144)*x_ref[0]**o+(-0.38689457016)*x_ref[0]+(-0.391780825295)*x_ref[1]**o+(-0.444284790848)*x_ref[1]
-        ref[2,4]=(0.416775161398)*x_ref[0]**o+(-0.16281006536)*x_ref[0]+(-0.742938932867)*x_ref[1]**o+(0.456486183714)*x_ref[1]
-        ref[3,0]=(0.506731632086)*x_ref[0]**o+(-0.222468320035)*x_ref[0]+(-0.906398223556)*x_ref[1]**o+(-0.0250630448611)*x_ref[1]
-        ref[3,1]=(-0.39207398783)*x_ref[0]**o+(-0.574739374252)*x_ref[0]+(0.262101584569)*x_ref[1]**o+(0.249587535087)*x_ref[1]
-        ref[3,2]=(-0.252593913503)*x_ref[0]**o+(-0.864294052989)*x_ref[0]+(0.0110434296336)*x_ref[1]**o+(-0.224585040999)*x_ref[1]
-        ref[3,3]=(-0.631704469212)*x_ref[0]**o+(-0.495153785048)*x_ref[0]+(-0.304420746672)*x_ref[1]**o+(-0.254005222021)*x_ref[1]
-        ref[3,4]=(0.775631055421)*x_ref[0]**o+(0.370095409961)*x_ref[0]+(0.894627612994)*x_ref[1]**o+(-0.329716708629)*x_ref[1]
-      else:
-        arg[0,0]=(0.392450639899)*x[0]**o+(-0.685488230002)*x[0]+(-0.41545928428)*x[1]**o+(0.244144392379)*x[1]+(0.602642156528)*x[2]**o+(-0.348717378461)*x[2]
-        arg[0,1]=(-0.341243165541)*x[0]**o+(-0.616870164204)*x[0]+(-0.510613066362)*x[1]**o+(-0.81387010212)*x[1]+(0.856239691119)*x[2]**o+(0.0744651854239)*x[2]
-        arg[0,2]=(-0.765983413604)*x[0]**o+(0.474551394174)*x[0]+(-0.939524929765)*x[1]**o+(0.418297898065)*x[1]+(0.00589909539531)*x[2]**o+(0.0889012994897)*x[2]
-        arg[0,3]=(-0.521217563352)*x[0]**o+(-0.256316459647)*x[0]+(-0.0265965098379)*x[1]**o+(-0.597562278966)*x[1]+(0.0389151661339)*x[2]**o+(-0.572109451352)*x[2]
-        arg[0,4]=(-0.853801268491)*x[0]**o+(-0.691274812057)*x[0]+(-0.682435618581)*x[1]**o+(-0.974334375359)*x[1]+(-0.642333316794)*x[2]**o+(0.353816751252)*x[2]
-        arg[1,0]=(-0.657545394322)*x[0]**o+(-0.334172338096)*x[0]+(0.016748279459)*x[1]**o+(-0.294858621125)*x[1]+(-0.49403880046)*x[2]**o+(-0.152416774822)*x[2]
-        arg[1,1]=(-0.602731976042)*x[0]**o+(0.685046816545)*x[0]+(0.750001644716)*x[1]**o+(-0.202076972289)*x[1]+(-0.0232888078434)*x[2]**o+(-0.0774477649878)*x[2]
-        arg[1,2]=(-0.707321785527)*x[0]**o+(0.618526464205)*x[0]+(-0.578548442468)*x[1]**o+(-0.411374744442)*x[1]+(-0.944277708787)*x[2]**o+(0.647856975707)*x[2]
-        arg[1,3]=(-0.222503271022)*x[0]**o+(-0.929428092728)*x[0]+(-0.976553212424)*x[1]**o+(0.0376439617084)*x[1]+(0.0428078568512)*x[2]**o+(-0.441850944272)*x[2]
-        arg[1,4]=(-0.862164898455)*x[0]**o+(-0.989900221991)*x[0]+(0.110610844567)*x[1]**o+(0.419384612236)*x[1]+(-0.00271948841262)*x[2]**o+(0.301635101629)*x[2]
-        arg[2,0]=(-0.0950421881942)*x[0]**o+(-0.741293053909)*x[0]+(-0.461538879874)*x[1]**o+(-0.8199842553)*x[1]+(0.0590344916829)*x[2]**o+(0.352541518434)*x[2]
-        arg[2,1]=(-0.734407995647)*x[0]**o+(-0.726167721992)*x[0]+(0.700521229916)*x[1]**o+(0.753555863428)*x[1]+(-0.891638139696)*x[2]**o+(-0.996550711213)*x[2]
-        arg[2,2]=(0.777110352629)*x[0]**o+(0.309719201157)*x[0]+(0.026816547522)*x[1]**o+(0.33161010287)*x[1]+(0.257929504352)*x[2]**o+(0.71871314654)*x[2]
-        arg[2,3]=(-0.0982522143825)*x[0]**o+(0.0532144836415)*x[0]+(0.155895442381)*x[1]**o+(-0.872222127033)*x[1]+(0.810538165596)*x[2]**o+(-0.917071363009)*x[2]
-        arg[2,4]=(0.882674783877)*x[0]**o+(-0.246439463648)*x[0]+(-0.478821457401)*x[1]**o+(-0.629183697296)*x[1]+(0.833283185393)*x[2]**o+(-0.895796651184)*x[2]
-        arg[3,0]=(0.949019461395)*x[0]**o+(0.437511668107)*x[0]+(0.46679355983)*x[1]**o+(0.375391913775)*x[1]+(0.992336073925)*x[2]**o+(0.784847856608)*x[2]
-        arg[3,1]=(0.10730061928)*x[0]**o+(0.624678931808)*x[0]+(-0.105084917663)*x[1]**o+(-0.0650034223387)*x[1]+(-0.271922353868)*x[2]**o+(-0.182967296038)*x[2]
-        arg[3,2]=(0.115856234055)*x[0]**o+(0.711912354922)*x[0]+(-0.317962972122)*x[1]**o+(0.577856092951)*x[1]+(-0.246833922867)*x[2]**o+(0.354116462218)*x[2]
-        arg[3,3]=(0.40937236699)*x[0]**o+(0.639252679403)*x[0]+(0.540206943219)*x[1]**o+(0.287006139758)*x[1]+(0.123311433598)*x[2]**o+(-0.0300672780213)*x[2]
-        arg[3,4]=(-0.190299257713)*x[0]**o+(-0.022055675261)*x[0]+(-0.640751994447)*x[1]**o+(-0.411801947317)*x[1]+(0.0675008125057)*x[2]**o+(-0.659424255203)*x[2]
-        ref[0,0]=(0.392450639899)*x_ref[0]**o+(-0.685488230002)*x_ref[0]+(-0.41545928428)*x_ref[1]**o+(0.244144392379)*x_ref[1]+(0.602642156528)*x_ref[2]**o+(-0.348717378461)*x_ref[2]
-        ref[0,1]=(-0.341243165541)*x_ref[0]**o+(-0.616870164204)*x_ref[0]+(-0.510613066362)*x_ref[1]**o+(-0.81387010212)*x_ref[1]+(0.856239691119)*x_ref[2]**o+(0.0744651854239)*x_ref[2]
-        ref[0,2]=(-0.765983413604)*x_ref[0]**o+(0.474551394174)*x_ref[0]+(-0.939524929765)*x_ref[1]**o+(0.418297898065)*x_ref[1]+(0.00589909539531)*x_ref[2]**o+(0.0889012994897)*x_ref[2]
-        ref[0,3]=(-0.521217563352)*x_ref[0]**o+(-0.256316459647)*x_ref[0]+(-0.0265965098379)*x_ref[1]**o+(-0.597562278966)*x_ref[1]+(0.0389151661339)*x_ref[2]**o+(-0.572109451352)*x_ref[2]
-        ref[0,4]=(-0.853801268491)*x_ref[0]**o+(-0.691274812057)*x_ref[0]+(-0.682435618581)*x_ref[1]**o+(-0.974334375359)*x_ref[1]+(-0.642333316794)*x_ref[2]**o+(0.353816751252)*x_ref[2]
-        ref[1,0]=(-0.657545394322)*x_ref[0]**o+(-0.334172338096)*x_ref[0]+(0.016748279459)*x_ref[1]**o+(-0.294858621125)*x_ref[1]+(-0.49403880046)*x_ref[2]**o+(-0.152416774822)*x_ref[2]
-        ref[1,1]=(-0.602731976042)*x_ref[0]**o+(0.685046816545)*x_ref[0]+(0.750001644716)*x_ref[1]**o+(-0.202076972289)*x_ref[1]+(-0.0232888078434)*x_ref[2]**o+(-0.0774477649878)*x_ref[2]
-        ref[1,2]=(-0.707321785527)*x_ref[0]**o+(0.618526464205)*x_ref[0]+(-0.578548442468)*x_ref[1]**o+(-0.411374744442)*x_ref[1]+(-0.944277708787)*x_ref[2]**o+(0.647856975707)*x_ref[2]
-        ref[1,3]=(-0.222503271022)*x_ref[0]**o+(-0.929428092728)*x_ref[0]+(-0.976553212424)*x_ref[1]**o+(0.0376439617084)*x_ref[1]+(0.0428078568512)*x_ref[2]**o+(-0.441850944272)*x_ref[2]
-        ref[1,4]=(-0.862164898455)*x_ref[0]**o+(-0.989900221991)*x_ref[0]+(0.110610844567)*x_ref[1]**o+(0.419384612236)*x_ref[1]+(-0.00271948841262)*x_ref[2]**o+(0.301635101629)*x_ref[2]
-        ref[2,0]=(-0.0950421881942)*x_ref[0]**o+(-0.741293053909)*x_ref[0]+(-0.461538879874)*x_ref[1]**o+(-0.8199842553)*x_ref[1]+(0.0590344916829)*x_ref[2]**o+(0.352541518434)*x_ref[2]
-        ref[2,1]=(-0.734407995647)*x_ref[0]**o+(-0.726167721992)*x_ref[0]+(0.700521229916)*x_ref[1]**o+(0.753555863428)*x_ref[1]+(-0.891638139696)*x_ref[2]**o+(-0.996550711213)*x_ref[2]
-        ref[2,2]=(0.777110352629)*x_ref[0]**o+(0.309719201157)*x_ref[0]+(0.026816547522)*x_ref[1]**o+(0.33161010287)*x_ref[1]+(0.257929504352)*x_ref[2]**o+(0.71871314654)*x_ref[2]
-        ref[2,3]=(-0.0982522143825)*x_ref[0]**o+(0.0532144836415)*x_ref[0]+(0.155895442381)*x_ref[1]**o+(-0.872222127033)*x_ref[1]+(0.810538165596)*x_ref[2]**o+(-0.917071363009)*x_ref[2]
-        ref[2,4]=(0.882674783877)*x_ref[0]**o+(-0.246439463648)*x_ref[0]+(-0.478821457401)*x_ref[1]**o+(-0.629183697296)*x_ref[1]+(0.833283185393)*x_ref[2]**o+(-0.895796651184)*x_ref[2]
-        ref[3,0]=(0.949019461395)*x_ref[0]**o+(0.437511668107)*x_ref[0]+(0.46679355983)*x_ref[1]**o+(0.375391913775)*x_ref[1]+(0.992336073925)*x_ref[2]**o+(0.784847856608)*x_ref[2]
-        ref[3,1]=(0.10730061928)*x_ref[0]**o+(0.624678931808)*x_ref[0]+(-0.105084917663)*x_ref[1]**o+(-0.0650034223387)*x_ref[1]+(-0.271922353868)*x_ref[2]**o+(-0.182967296038)*x_ref[2]
-        ref[3,2]=(0.115856234055)*x_ref[0]**o+(0.711912354922)*x_ref[0]+(-0.317962972122)*x_ref[1]**o+(0.577856092951)*x_ref[1]+(-0.246833922867)*x_ref[2]**o+(0.354116462218)*x_ref[2]
-        ref[3,3]=(0.40937236699)*x_ref[0]**o+(0.639252679403)*x_ref[0]+(0.540206943219)*x_ref[1]**o+(0.287006139758)*x_ref[1]+(0.123311433598)*x_ref[2]**o+(-0.0300672780213)*x_ref[2]
-        ref[3,4]=(-0.190299257713)*x_ref[0]**o+(-0.022055675261)*x_ref[0]+(-0.640751994447)*x_ref[1]**o+(-0.411801947317)*x_ref[1]+(0.0675008125057)*x_ref[2]**o+(-0.659424255203)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.697323110242)*x[0]**o+(-0.806494185218)*x[0]+(0.387914602484)*x[1]**o+(0.841835487965)*x[1]
-        arg[0,0,1]=(-0.77670653908)*x[0]**o+(0.311710212706)*x[0]+(-0.0951864020181)*x[1]**o+(-0.14909139946)*x[1]
-        arg[0,1,0]=(0.80933791543)*x[0]**o+(0.72441968276)*x[0]+(-0.446054850085)*x[1]**o+(0.419303534988)*x[1]
-        arg[0,1,1]=(0.174464190017)*x[0]**o+(0.330609661878)*x[0]+(0.798365390058)*x[1]**o+(0.354899223817)*x[1]
-        arg[1,0,0]=(0.36073672839)*x[0]**o+(0.831900846214)*x[0]+(-0.656354645044)*x[1]**o+(0.200645044646)*x[1]
-        arg[1,0,1]=(0.817889801065)*x[0]**o+(0.34052889294)*x[0]+(-0.2416944924)*x[1]**o+(0.0922342148934)*x[1]
-        arg[1,1,0]=(-0.962116509558)*x[0]**o+(-0.0785232077542)*x[0]+(-0.981399563356)*x[1]**o+(0.785509095614)*x[1]
-        arg[1,1,1]=(-0.688444030508)*x[0]**o+(0.651617638972)*x[0]+(0.160584046401)*x[1]**o+(0.253258991923)*x[1]
-        arg[2,0,0]=(0.0728970412574)*x[0]**o+(-0.647328240217)*x[0]+(0.517665494535)*x[1]**o+(-0.416383753573)*x[1]
-        arg[2,0,1]=(0.148104739733)*x[0]**o+(-0.378371639837)*x[0]+(0.848608631336)*x[1]**o+(-0.881516167852)*x[1]
-        arg[2,1,0]=(-0.506376676256)*x[0]**o+(0.234090340446)*x[0]+(-0.737828959566)*x[1]**o+(-0.74093763135)*x[1]
-        arg[2,1,1]=(0.259605354135)*x[0]**o+(0.537424356513)*x[0]+(-0.405718119693)*x[1]**o+(0.120663712044)*x[1]
-        arg[3,0,0]=(-0.609659975269)*x[0]**o+(-0.455923293874)*x[0]+(-0.00765676965971)*x[1]**o+(-0.710899349259)*x[1]
-        arg[3,0,1]=(-0.731011612904)*x[0]**o+(-0.355060765358)*x[0]+(-0.127369372538)*x[1]**o+(0.694265371908)*x[1]
-        arg[3,1,0]=(0.188766337132)*x[0]**o+(-0.194878304215)*x[0]+(-0.963356218109)*x[1]**o+(0.327053372293)*x[1]
-        arg[3,1,1]=(-0.566712779324)*x[0]**o+(-0.251473305071)*x[0]+(0.0181297146138)*x[1]**o+(0.257664697754)*x[1]
-        arg[4,0,0]=(0.574100764569)*x[0]**o+(-0.717776999574)*x[0]+(0.880998124155)*x[1]**o+(-0.810615928848)*x[1]
-        arg[4,0,1]=(0.42552502518)*x[0]**o+(0.456751341147)*x[0]+(-0.484998619005)*x[1]**o+(0.932151187696)*x[1]
-        arg[4,1,0]=(0.56865980485)*x[0]**o+(0.593928872734)*x[0]+(-0.475639894836)*x[1]**o+(-0.990718402693)*x[1]
-        arg[4,1,1]=(0.129586342261)*x[0]**o+(-0.408951830619)*x[0]+(0.132518475289)*x[1]**o+(0.708612820692)*x[1]
-        arg[5,0,0]=(0.0708038739082)*x[0]**o+(0.524270558649)*x[0]+(0.368504533482)*x[1]**o+(0.935828810393)*x[1]
-        arg[5,0,1]=(-0.383650306829)*x[0]**o+(-0.0439362943961)*x[0]+(0.80939275198)*x[1]**o+(-0.61335508023)*x[1]
-        arg[5,1,0]=(-0.621571339247)*x[0]**o+(-0.185069293199)*x[0]+(0.368472011431)*x[1]**o+(-0.388752495932)*x[1]
-        arg[5,1,1]=(-0.263310763174)*x[0]**o+(-0.694616630015)*x[0]+(0.271238274203)*x[1]**o+(-0.477861402347)*x[1]
-        ref[0,0,0]=(-0.697323110242)*x_ref[0]**o+(-0.806494185218)*x_ref[0]+(0.387914602484)*x_ref[1]**o+(0.841835487965)*x_ref[1]
-        ref[0,0,1]=(-0.77670653908)*x_ref[0]**o+(0.311710212706)*x_ref[0]+(-0.0951864020181)*x_ref[1]**o+(-0.14909139946)*x_ref[1]
-        ref[0,1,0]=(0.80933791543)*x_ref[0]**o+(0.72441968276)*x_ref[0]+(-0.446054850085)*x_ref[1]**o+(0.419303534988)*x_ref[1]
-        ref[0,1,1]=(0.174464190017)*x_ref[0]**o+(0.330609661878)*x_ref[0]+(0.798365390058)*x_ref[1]**o+(0.354899223817)*x_ref[1]
-        ref[1,0,0]=(0.36073672839)*x_ref[0]**o+(0.831900846214)*x_ref[0]+(-0.656354645044)*x_ref[1]**o+(0.200645044646)*x_ref[1]
-        ref[1,0,1]=(0.817889801065)*x_ref[0]**o+(0.34052889294)*x_ref[0]+(-0.2416944924)*x_ref[1]**o+(0.0922342148934)*x_ref[1]
-        ref[1,1,0]=(-0.962116509558)*x_ref[0]**o+(-0.0785232077542)*x_ref[0]+(-0.981399563356)*x_ref[1]**o+(0.785509095614)*x_ref[1]
-        ref[1,1,1]=(-0.688444030508)*x_ref[0]**o+(0.651617638972)*x_ref[0]+(0.160584046401)*x_ref[1]**o+(0.253258991923)*x_ref[1]
-        ref[2,0,0]=(0.0728970412574)*x_ref[0]**o+(-0.647328240217)*x_ref[0]+(0.517665494535)*x_ref[1]**o+(-0.416383753573)*x_ref[1]
-        ref[2,0,1]=(0.148104739733)*x_ref[0]**o+(-0.378371639837)*x_ref[0]+(0.848608631336)*x_ref[1]**o+(-0.881516167852)*x_ref[1]
-        ref[2,1,0]=(-0.506376676256)*x_ref[0]**o+(0.234090340446)*x_ref[0]+(-0.737828959566)*x_ref[1]**o+(-0.74093763135)*x_ref[1]
-        ref[2,1,1]=(0.259605354135)*x_ref[0]**o+(0.537424356513)*x_ref[0]+(-0.405718119693)*x_ref[1]**o+(0.120663712044)*x_ref[1]
-        ref[3,0,0]=(-0.609659975269)*x_ref[0]**o+(-0.455923293874)*x_ref[0]+(-0.00765676965971)*x_ref[1]**o+(-0.710899349259)*x_ref[1]
-        ref[3,0,1]=(-0.731011612904)*x_ref[0]**o+(-0.355060765358)*x_ref[0]+(-0.127369372538)*x_ref[1]**o+(0.694265371908)*x_ref[1]
-        ref[3,1,0]=(0.188766337132)*x_ref[0]**o+(-0.194878304215)*x_ref[0]+(-0.963356218109)*x_ref[1]**o+(0.327053372293)*x_ref[1]
-        ref[3,1,1]=(-0.566712779324)*x_ref[0]**o+(-0.251473305071)*x_ref[0]+(0.0181297146138)*x_ref[1]**o+(0.257664697754)*x_ref[1]
-        ref[4,0,0]=(0.574100764569)*x_ref[0]**o+(-0.717776999574)*x_ref[0]+(0.880998124155)*x_ref[1]**o+(-0.810615928848)*x_ref[1]
-        ref[4,0,1]=(0.42552502518)*x_ref[0]**o+(0.456751341147)*x_ref[0]+(-0.484998619005)*x_ref[1]**o+(0.932151187696)*x_ref[1]
-        ref[4,1,0]=(0.56865980485)*x_ref[0]**o+(0.593928872734)*x_ref[0]+(-0.475639894836)*x_ref[1]**o+(-0.990718402693)*x_ref[1]
-        ref[4,1,1]=(0.129586342261)*x_ref[0]**o+(-0.408951830619)*x_ref[0]+(0.132518475289)*x_ref[1]**o+(0.708612820692)*x_ref[1]
-        ref[5,0,0]=(0.0708038739082)*x_ref[0]**o+(0.524270558649)*x_ref[0]+(0.368504533482)*x_ref[1]**o+(0.935828810393)*x_ref[1]
-        ref[5,0,1]=(-0.383650306829)*x_ref[0]**o+(-0.0439362943961)*x_ref[0]+(0.80939275198)*x_ref[1]**o+(-0.61335508023)*x_ref[1]
-        ref[5,1,0]=(-0.621571339247)*x_ref[0]**o+(-0.185069293199)*x_ref[0]+(0.368472011431)*x_ref[1]**o+(-0.388752495932)*x_ref[1]
-        ref[5,1,1]=(-0.263310763174)*x_ref[0]**o+(-0.694616630015)*x_ref[0]+(0.271238274203)*x_ref[1]**o+(-0.477861402347)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.287534645778)*x[0]**o+(0.94865229379)*x[0]+(0.655299232864)*x[1]**o+(0.350034924637)*x[1]+(0.556341391183)*x[2]**o+(0.840643265765)*x[2]
-        arg[0,0,1]=(-0.207213781549)*x[0]**o+(-0.0394497047797)*x[0]+(-0.0236016308575)*x[1]**o+(0.344122299199)*x[1]+(0.389588325996)*x[2]**o+(0.941980468657)*x[2]
-        arg[0,1,0]=(0.00980412235862)*x[0]**o+(0.74862549447)*x[0]+(0.630165284383)*x[1]**o+(0.234711268989)*x[1]+(-0.22509981272)*x[2]**o+(-0.0153888168649)*x[2]
-        arg[0,1,1]=(-0.87309186262)*x[0]**o+(0.833526923917)*x[0]+(0.78785479415)*x[1]**o+(0.823967259171)*x[1]+(0.320244316109)*x[2]**o+(-0.735225854417)*x[2]
-        arg[1,0,0]=(-0.0892232551051)*x[0]**o+(-0.346728833563)*x[0]+(0.422774634671)*x[1]**o+(0.793222381957)*x[1]+(-0.670476677006)*x[2]**o+(0.896884540116)*x[2]
-        arg[1,0,1]=(-0.0023382136345)*x[0]**o+(0.73058281545)*x[0]+(0.11828880374)*x[1]**o+(-0.691839091619)*x[1]+(-0.39086463392)*x[2]**o+(0.66200209782)*x[2]
-        arg[1,1,0]=(-0.924238055558)*x[0]**o+(-0.334208271705)*x[0]+(-0.57106045555)*x[1]**o+(-0.765650999193)*x[1]+(0.0404533468054)*x[2]**o+(-0.225975260777)*x[2]
-        arg[1,1,1]=(-0.351110999108)*x[0]**o+(0.626166346251)*x[0]+(0.385737198467)*x[1]**o+(0.577561466908)*x[1]+(0.708325217242)*x[2]**o+(0.193727923904)*x[2]
-        arg[2,0,0]=(0.278942080997)*x[0]**o+(-0.569761653572)*x[0]+(-0.624879270918)*x[1]**o+(-0.0151754112896)*x[1]+(0.411399083825)*x[2]**o+(-0.846669568641)*x[2]
-        arg[2,0,1]=(-0.543586963879)*x[0]**o+(-0.383959956625)*x[0]+(0.184375944938)*x[1]**o+(-0.104178233562)*x[1]+(-0.223101894662)*x[2]**o+(-0.17221835595)*x[2]
-        arg[2,1,0]=(0.317103921207)*x[0]**o+(-0.919542461354)*x[0]+(0.56666554454)*x[1]**o+(0.895772298847)*x[1]+(0.714550707822)*x[2]**o+(0.634702089556)*x[2]
-        arg[2,1,1]=(0.986576254164)*x[0]**o+(0.544493787633)*x[0]+(0.964620027203)*x[1]**o+(0.259991384678)*x[1]+(-0.577361835739)*x[2]**o+(0.651593456822)*x[2]
-        arg[3,0,0]=(0.362841472614)*x[0]**o+(-0.521771228041)*x[0]+(-0.594530755517)*x[1]**o+(0.700647681241)*x[1]+(-0.131683781311)*x[2]**o+(0.636310189834)*x[2]
-        arg[3,0,1]=(0.885891862321)*x[0]**o+(0.397438320764)*x[0]+(0.711380452937)*x[1]**o+(0.962571325144)*x[1]+(-0.300114113339)*x[2]**o+(0.34700388868)*x[2]
-        arg[3,1,0]=(0.52140726408)*x[0]**o+(-0.0921295295522)*x[0]+(-0.823076091446)*x[1]**o+(0.477401876125)*x[1]+(-0.973057905067)*x[2]**o+(-0.975526794128)*x[2]
-        arg[3,1,1]=(-0.241503887113)*x[0]**o+(0.133988088285)*x[0]+(0.243026393121)*x[1]**o+(0.0848716779473)*x[1]+(0.140349614791)*x[2]**o+(-0.217182025695)*x[2]
-        arg[4,0,0]=(0.680080194053)*x[0]**o+(0.512009633844)*x[0]+(-0.640214066363)*x[1]**o+(0.571800633214)*x[1]+(-0.749395617545)*x[2]**o+(0.448487668786)*x[2]
-        arg[4,0,1]=(-0.792959916349)*x[0]**o+(-0.433770516776)*x[0]+(-0.380980758215)*x[1]**o+(-0.831154769101)*x[1]+(0.277551460651)*x[2]**o+(0.626476984233)*x[2]
-        arg[4,1,0]=(-0.285102566546)*x[0]**o+(0.745636275253)*x[0]+(0.4999427836)*x[1]**o+(0.561343302884)*x[1]+(0.796220302361)*x[2]**o+(-0.830020520143)*x[2]
-        arg[4,1,1]=(0.237420507314)*x[0]**o+(0.327181858092)*x[0]+(-0.895743235593)*x[1]**o+(-0.496964477443)*x[1]+(0.57336428204)*x[2]**o+(-0.154267071287)*x[2]
-        arg[5,0,0]=(0.0401925997607)*x[0]**o+(-0.0155957424748)*x[0]+(-0.658363451239)*x[1]**o+(-0.175223211879)*x[1]+(-0.743729768327)*x[2]**o+(0.391531327128)*x[2]
-        arg[5,0,1]=(0.836239801824)*x[0]**o+(-0.72288085675)*x[0]+(0.177981042887)*x[1]**o+(0.354505260098)*x[1]+(-0.180520504267)*x[2]**o+(-0.380306239974)*x[2]
-        arg[5,1,0]=(-0.65536853024)*x[0]**o+(-0.00573854242476)*x[0]+(-0.261460514314)*x[1]**o+(-0.289771405693)*x[1]+(0.750775397523)*x[2]**o+(-0.333215608562)*x[2]
-        arg[5,1,1]=(-0.579532884024)*x[0]**o+(-0.208677373724)*x[0]+(-0.379612024024)*x[1]**o+(-0.0565813995114)*x[1]+(-0.867913562592)*x[2]**o+(-0.254654298293)*x[2]
-        ref[0,0,0]=(0.287534645778)*x_ref[0]**o+(0.94865229379)*x_ref[0]+(0.655299232864)*x_ref[1]**o+(0.350034924637)*x_ref[1]+(0.556341391183)*x_ref[2]**o+(0.840643265765)*x_ref[2]
-        ref[0,0,1]=(-0.207213781549)*x_ref[0]**o+(-0.0394497047797)*x_ref[0]+(-0.0236016308575)*x_ref[1]**o+(0.344122299199)*x_ref[1]+(0.389588325996)*x_ref[2]**o+(0.941980468657)*x_ref[2]
-        ref[0,1,0]=(0.00980412235862)*x_ref[0]**o+(0.74862549447)*x_ref[0]+(0.630165284383)*x_ref[1]**o+(0.234711268989)*x_ref[1]+(-0.22509981272)*x_ref[2]**o+(-0.0153888168649)*x_ref[2]
-        ref[0,1,1]=(-0.87309186262)*x_ref[0]**o+(0.833526923917)*x_ref[0]+(0.78785479415)*x_ref[1]**o+(0.823967259171)*x_ref[1]+(0.320244316109)*x_ref[2]**o+(-0.735225854417)*x_ref[2]
-        ref[1,0,0]=(-0.0892232551051)*x_ref[0]**o+(-0.346728833563)*x_ref[0]+(0.422774634671)*x_ref[1]**o+(0.793222381957)*x_ref[1]+(-0.670476677006)*x_ref[2]**o+(0.896884540116)*x_ref[2]
-        ref[1,0,1]=(-0.0023382136345)*x_ref[0]**o+(0.73058281545)*x_ref[0]+(0.11828880374)*x_ref[1]**o+(-0.691839091619)*x_ref[1]+(-0.39086463392)*x_ref[2]**o+(0.66200209782)*x_ref[2]
-        ref[1,1,0]=(-0.924238055558)*x_ref[0]**o+(-0.334208271705)*x_ref[0]+(-0.57106045555)*x_ref[1]**o+(-0.765650999193)*x_ref[1]+(0.0404533468054)*x_ref[2]**o+(-0.225975260777)*x_ref[2]
-        ref[1,1,1]=(-0.351110999108)*x_ref[0]**o+(0.626166346251)*x_ref[0]+(0.385737198467)*x_ref[1]**o+(0.577561466908)*x_ref[1]+(0.708325217242)*x_ref[2]**o+(0.193727923904)*x_ref[2]
-        ref[2,0,0]=(0.278942080997)*x_ref[0]**o+(-0.569761653572)*x_ref[0]+(-0.624879270918)*x_ref[1]**o+(-0.0151754112896)*x_ref[1]+(0.411399083825)*x_ref[2]**o+(-0.846669568641)*x_ref[2]
-        ref[2,0,1]=(-0.543586963879)*x_ref[0]**o+(-0.383959956625)*x_ref[0]+(0.184375944938)*x_ref[1]**o+(-0.104178233562)*x_ref[1]+(-0.223101894662)*x_ref[2]**o+(-0.17221835595)*x_ref[2]
-        ref[2,1,0]=(0.317103921207)*x_ref[0]**o+(-0.919542461354)*x_ref[0]+(0.56666554454)*x_ref[1]**o+(0.895772298847)*x_ref[1]+(0.714550707822)*x_ref[2]**o+(0.634702089556)*x_ref[2]
-        ref[2,1,1]=(0.986576254164)*x_ref[0]**o+(0.544493787633)*x_ref[0]+(0.964620027203)*x_ref[1]**o+(0.259991384678)*x_ref[1]+(-0.577361835739)*x_ref[2]**o+(0.651593456822)*x_ref[2]
-        ref[3,0,0]=(0.362841472614)*x_ref[0]**o+(-0.521771228041)*x_ref[0]+(-0.594530755517)*x_ref[1]**o+(0.700647681241)*x_ref[1]+(-0.131683781311)*x_ref[2]**o+(0.636310189834)*x_ref[2]
-        ref[3,0,1]=(0.885891862321)*x_ref[0]**o+(0.397438320764)*x_ref[0]+(0.711380452937)*x_ref[1]**o+(0.962571325144)*x_ref[1]+(-0.300114113339)*x_ref[2]**o+(0.34700388868)*x_ref[2]
-        ref[3,1,0]=(0.52140726408)*x_ref[0]**o+(-0.0921295295522)*x_ref[0]+(-0.823076091446)*x_ref[1]**o+(0.477401876125)*x_ref[1]+(-0.973057905067)*x_ref[2]**o+(-0.975526794128)*x_ref[2]
-        ref[3,1,1]=(-0.241503887113)*x_ref[0]**o+(0.133988088285)*x_ref[0]+(0.243026393121)*x_ref[1]**o+(0.0848716779473)*x_ref[1]+(0.140349614791)*x_ref[2]**o+(-0.217182025695)*x_ref[2]
-        ref[4,0,0]=(0.680080194053)*x_ref[0]**o+(0.512009633844)*x_ref[0]+(-0.640214066363)*x_ref[1]**o+(0.571800633214)*x_ref[1]+(-0.749395617545)*x_ref[2]**o+(0.448487668786)*x_ref[2]
-        ref[4,0,1]=(-0.792959916349)*x_ref[0]**o+(-0.433770516776)*x_ref[0]+(-0.380980758215)*x_ref[1]**o+(-0.831154769101)*x_ref[1]+(0.277551460651)*x_ref[2]**o+(0.626476984233)*x_ref[2]
-        ref[4,1,0]=(-0.285102566546)*x_ref[0]**o+(0.745636275253)*x_ref[0]+(0.4999427836)*x_ref[1]**o+(0.561343302884)*x_ref[1]+(0.796220302361)*x_ref[2]**o+(-0.830020520143)*x_ref[2]
-        ref[4,1,1]=(0.237420507314)*x_ref[0]**o+(0.327181858092)*x_ref[0]+(-0.895743235593)*x_ref[1]**o+(-0.496964477443)*x_ref[1]+(0.57336428204)*x_ref[2]**o+(-0.154267071287)*x_ref[2]
-        ref[5,0,0]=(0.0401925997607)*x_ref[0]**o+(-0.0155957424748)*x_ref[0]+(-0.658363451239)*x_ref[1]**o+(-0.175223211879)*x_ref[1]+(-0.743729768327)*x_ref[2]**o+(0.391531327128)*x_ref[2]
-        ref[5,0,1]=(0.836239801824)*x_ref[0]**o+(-0.72288085675)*x_ref[0]+(0.177981042887)*x_ref[1]**o+(0.354505260098)*x_ref[1]+(-0.180520504267)*x_ref[2]**o+(-0.380306239974)*x_ref[2]
-        ref[5,1,0]=(-0.65536853024)*x_ref[0]**o+(-0.00573854242476)*x_ref[0]+(-0.261460514314)*x_ref[1]**o+(-0.289771405693)*x_ref[1]+(0.750775397523)*x_ref[2]**o+(-0.333215608562)*x_ref[2]
-        ref[5,1,1]=(-0.579532884024)*x_ref[0]**o+(-0.208677373724)*x_ref[0]+(-0.379612024024)*x_ref[1]**o+(-0.0565813995114)*x_ref[1]+(-0.867913562592)*x_ref[2]**o+(-0.254654298293)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.274472293956)*x[0]**o+(-0.293347130929)*x[0]+(0.392586448254)*x[1]**o+(-0.403066854054)*x[1]
-        arg[0,0,0,1]=(0.385933192907)*x[0]**o+(0.484240065867)*x[0]+(0.144565631551)*x[1]**o+(0.882508492739)*x[1]
-        arg[0,0,1,0]=(0.993368905137)*x[0]**o+(0.340349919343)*x[0]+(-0.956806746524)*x[1]**o+(0.990607958001)*x[1]
-        arg[0,0,1,1]=(-0.88610250102)*x[0]**o+(-0.543705587259)*x[0]+(0.170798164924)*x[1]**o+(0.685331195754)*x[1]
-        arg[0,0,2,0]=(-0.922211611143)*x[0]**o+(-0.103640037893)*x[0]+(0.401354703434)*x[1]**o+(-0.117826261635)*x[1]
-        arg[0,0,2,1]=(-0.391601387132)*x[0]**o+(-0.472753344804)*x[0]+(-0.473433838993)*x[1]**o+(-0.173501635989)*x[1]
-        arg[0,1,0,0]=(0.747353274916)*x[0]**o+(-0.960856612086)*x[0]+(-0.54809012978)*x[1]**o+(0.862023893332)*x[1]
-        arg[0,1,0,1]=(-0.256359001149)*x[0]**o+(-0.868975044191)*x[0]+(0.494314269744)*x[1]**o+(0.949957481172)*x[1]
-        arg[0,1,1,0]=(-0.0256658750601)*x[0]**o+(0.145499104203)*x[0]+(-0.68669791629)*x[1]**o+(0.447326207295)*x[1]
-        arg[0,1,1,1]=(0.150617284467)*x[0]**o+(-0.350046088196)*x[0]+(-0.367671302053)*x[1]**o+(0.633220122068)*x[1]
-        arg[0,1,2,0]=(-0.714145362271)*x[0]**o+(-0.957661490758)*x[0]+(0.386253770747)*x[1]**o+(0.982634262634)*x[1]
-        arg[0,1,2,1]=(0.707565096824)*x[0]**o+(0.281758058573)*x[0]+(-0.407791315587)*x[1]**o+(0.86069036983)*x[1]
-        arg[0,2,0,0]=(-0.453860220598)*x[0]**o+(0.944457388061)*x[0]+(-0.903818960162)*x[1]**o+(-0.799423205297)*x[1]
-        arg[0,2,0,1]=(-0.621257500941)*x[0]**o+(0.748963737937)*x[0]+(-0.12660934458)*x[1]**o+(-0.362830639592)*x[1]
-        arg[0,2,1,0]=(-0.702485820037)*x[0]**o+(0.355584898593)*x[0]+(0.657127357751)*x[1]**o+(0.535533390762)*x[1]
-        arg[0,2,1,1]=(0.795733125008)*x[0]**o+(0.983607327249)*x[0]+(-0.463818780644)*x[1]**o+(-0.681831588244)*x[1]
-        arg[0,2,2,0]=(0.335783204138)*x[0]**o+(-0.712225782679)*x[0]+(0.853426644096)*x[1]**o+(-0.143845263686)*x[1]
-        arg[0,2,2,1]=(0.389724375144)*x[0]**o+(0.715176227705)*x[0]+(-0.660690893888)*x[1]**o+(0.428289724709)*x[1]
-        arg[0,3,0,0]=(-0.363836203724)*x[0]**o+(-0.257775427457)*x[0]+(0.407904889098)*x[1]**o+(-0.731273814284)*x[1]
-        arg[0,3,0,1]=(0.402038262494)*x[0]**o+(0.33289103638)*x[0]+(0.444957562329)*x[1]**o+(0.0657971935664)*x[1]
-        arg[0,3,1,0]=(0.979673814602)*x[0]**o+(-0.133405332848)*x[0]+(0.23884689304)*x[1]**o+(0.728464997681)*x[1]
-        arg[0,3,1,1]=(0.724603429246)*x[0]**o+(-0.391040898144)*x[0]+(-0.966816499003)*x[1]**o+(0.0984302578905)*x[1]
-        arg[0,3,2,0]=(-0.986139645754)*x[0]**o+(0.60807351165)*x[0]+(0.799807413231)*x[1]**o+(0.12091479711)*x[1]
-        arg[0,3,2,1]=(0.387453999377)*x[0]**o+(0.212725006628)*x[0]+(-0.120374039139)*x[1]**o+(-0.262304757951)*x[1]
-        arg[0,4,0,0]=(-0.260545986276)*x[0]**o+(0.251085312932)*x[0]+(0.738082708518)*x[1]**o+(-0.0804883797938)*x[1]
-        arg[0,4,0,1]=(-0.190701356138)*x[0]**o+(-0.0205295935522)*x[0]+(0.904261681819)*x[1]**o+(-0.859647709957)*x[1]
-        arg[0,4,1,0]=(-0.945357492849)*x[0]**o+(-0.85298463389)*x[0]+(0.688964336673)*x[1]**o+(-0.672881696932)*x[1]
-        arg[0,4,1,1]=(0.877720258045)*x[0]**o+(-0.361228026805)*x[0]+(-0.326626527006)*x[1]**o+(-0.274100421232)*x[1]
-        arg[0,4,2,0]=(0.202358729084)*x[0]**o+(-0.997571481837)*x[0]+(0.431193711862)*x[1]**o+(0.513561123915)*x[1]
-        arg[0,4,2,1]=(-0.136602954592)*x[0]**o+(-0.40864934437)*x[0]+(0.675945574351)*x[1]**o+(0.728757793536)*x[1]
-        arg[1,0,0,0]=(0.835464261851)*x[0]**o+(-0.131447020601)*x[0]+(0.0810352521446)*x[1]**o+(0.664744750899)*x[1]
-        arg[1,0,0,1]=(0.239716928689)*x[0]**o+(-0.192258999531)*x[0]+(0.615877054036)*x[1]**o+(0.835274774437)*x[1]
-        arg[1,0,1,0]=(0.509342803767)*x[0]**o+(-0.633944481882)*x[0]+(0.262098006086)*x[1]**o+(0.159902070799)*x[1]
-        arg[1,0,1,1]=(0.894432440588)*x[0]**o+(-0.167778431319)*x[0]+(-0.984183148477)*x[1]**o+(-0.554981658632)*x[1]
-        arg[1,0,2,0]=(-0.762472607231)*x[0]**o+(0.405550139256)*x[0]+(0.4051290641)*x[1]**o+(-0.27180186672)*x[1]
-        arg[1,0,2,1]=(0.663869273816)*x[0]**o+(0.867453974628)*x[0]+(-0.279659969132)*x[1]**o+(-0.370539101204)*x[1]
-        arg[1,1,0,0]=(-0.969326778164)*x[0]**o+(0.965471349497)*x[0]+(-0.529983232946)*x[1]**o+(0.714091610977)*x[1]
-        arg[1,1,0,1]=(-0.840360667093)*x[0]**o+(-0.399319808256)*x[0]+(0.568769915582)*x[1]**o+(0.872427494442)*x[1]
-        arg[1,1,1,0]=(0.46099116941)*x[0]**o+(-0.986008874142)*x[0]+(-0.53999023556)*x[1]**o+(-0.549695567855)*x[1]
-        arg[1,1,1,1]=(0.485944918559)*x[0]**o+(0.189773828651)*x[0]+(-0.611654980493)*x[1]**o+(-0.337071911657)*x[1]
-        arg[1,1,2,0]=(0.191663603248)*x[0]**o+(0.0906374965004)*x[0]+(-0.271051598251)*x[1]**o+(0.880507788825)*x[1]
-        arg[1,1,2,1]=(-0.439514997001)*x[0]**o+(0.701230426224)*x[0]+(-0.193231641029)*x[1]**o+(0.950584054332)*x[1]
-        arg[1,2,0,0]=(0.439456565259)*x[0]**o+(-0.25664171484)*x[0]+(-0.653059819329)*x[1]**o+(-0.680544747777)*x[1]
-        arg[1,2,0,1]=(0.34890454443)*x[0]**o+(-0.69851200963)*x[0]+(-0.00159381688549)*x[1]**o+(-0.612359675499)*x[1]
-        arg[1,2,1,0]=(0.132759671375)*x[0]**o+(-0.235126716401)*x[0]+(0.652068885826)*x[1]**o+(0.749698645371)*x[1]
-        arg[1,2,1,1]=(0.934980403627)*x[0]**o+(0.321409273437)*x[0]+(-0.605909929553)*x[1]**o+(0.135554927418)*x[1]
-        arg[1,2,2,0]=(-0.68327709329)*x[0]**o+(-0.0381292756005)*x[0]+(0.710953191114)*x[1]**o+(-0.344522256689)*x[1]
-        arg[1,2,2,1]=(-0.813976235652)*x[0]**o+(0.613879708123)*x[0]+(0.451599277293)*x[1]**o+(-0.6134026375)*x[1]
-        arg[1,3,0,0]=(0.595310128627)*x[0]**o+(-0.247621573131)*x[0]+(0.165607783104)*x[1]**o+(0.578132180805)*x[1]
-        arg[1,3,0,1]=(0.848827238882)*x[0]**o+(0.173154067999)*x[0]+(0.340662419437)*x[1]**o+(-0.389656447251)*x[1]
-        arg[1,3,1,0]=(0.250888415228)*x[0]**o+(-0.278203136198)*x[0]+(-0.693211186734)*x[1]**o+(0.613812194735)*x[1]
-        arg[1,3,1,1]=(0.634533003162)*x[0]**o+(-0.0924665762471)*x[0]+(0.749575894384)*x[1]**o+(-0.737205017415)*x[1]
-        arg[1,3,2,0]=(0.607750966973)*x[0]**o+(0.905016928404)*x[0]+(-0.171049542163)*x[1]**o+(-0.20526244601)*x[1]
-        arg[1,3,2,1]=(0.723946025405)*x[0]**o+(0.0157576743987)*x[0]+(0.190875428312)*x[1]**o+(0.407925899509)*x[1]
-        arg[1,4,0,0]=(-0.561582695803)*x[0]**o+(-0.350262461371)*x[0]+(0.57610409872)*x[1]**o+(0.881780963877)*x[1]
-        arg[1,4,0,1]=(0.077066498695)*x[0]**o+(0.515597802516)*x[0]+(0.332011413016)*x[1]**o+(0.215491334787)*x[1]
-        arg[1,4,1,0]=(0.33858727737)*x[0]**o+(-0.573231800768)*x[0]+(-0.559915809132)*x[1]**o+(0.0240869142176)*x[1]
-        arg[1,4,1,1]=(-0.684581727952)*x[0]**o+(0.365541904201)*x[0]+(0.204252397376)*x[1]**o+(0.149300766054)*x[1]
-        arg[1,4,2,0]=(-0.574225088383)*x[0]**o+(0.0286339776067)*x[0]+(-0.358732122607)*x[1]**o+(-0.416932738957)*x[1]
-        arg[1,4,2,1]=(-0.308460184932)*x[0]**o+(0.389214987836)*x[0]+(-0.358303257031)*x[1]**o+(0.348109483688)*x[1]
-        arg[2,0,0,0]=(-0.811318668804)*x[0]**o+(-0.298028116982)*x[0]+(0.679871523483)*x[1]**o+(0.958042925287)*x[1]
-        arg[2,0,0,1]=(-0.616521818338)*x[0]**o+(-0.0817124854496)*x[0]+(0.403257366893)*x[1]**o+(0.740689710435)*x[1]
-        arg[2,0,1,0]=(0.271046179127)*x[0]**o+(0.814928093947)*x[0]+(0.423722781579)*x[1]**o+(0.925333209811)*x[1]
-        arg[2,0,1,1]=(0.0596651806816)*x[0]**o+(0.493854605359)*x[0]+(0.539998537439)*x[1]**o+(-0.910865639375)*x[1]
-        arg[2,0,2,0]=(0.503267602327)*x[0]**o+(-0.270966471743)*x[0]+(-0.342063366676)*x[1]**o+(-0.975700224705)*x[1]
-        arg[2,0,2,1]=(-0.0362358939195)*x[0]**o+(-0.766033869339)*x[0]+(0.891365100088)*x[1]**o+(0.815025898929)*x[1]
-        arg[2,1,0,0]=(-0.667240459984)*x[0]**o+(0.8659076701)*x[0]+(0.215089397562)*x[1]**o+(0.464769182307)*x[1]
-        arg[2,1,0,1]=(-0.298625221931)*x[0]**o+(-0.504329743472)*x[0]+(0.412472510208)*x[1]**o+(0.241693152889)*x[1]
-        arg[2,1,1,0]=(-0.670730179133)*x[0]**o+(0.0201070113832)*x[0]+(-0.572725898919)*x[1]**o+(0.665609259014)*x[1]
-        arg[2,1,1,1]=(-0.319080984089)*x[0]**o+(0.0299423045224)*x[0]+(0.0152311810613)*x[1]**o+(-0.784646189026)*x[1]
-        arg[2,1,2,0]=(0.153308789716)*x[0]**o+(0.725808150613)*x[0]+(0.62876493338)*x[1]**o+(0.80275284252)*x[1]
-        arg[2,1,2,1]=(0.804698870013)*x[0]**o+(-0.631078773061)*x[0]+(-0.015221975698)*x[1]**o+(-0.954169686746)*x[1]
-        arg[2,2,0,0]=(0.169022797498)*x[0]**o+(0.733025791099)*x[0]+(0.321554996633)*x[1]**o+(0.292173365364)*x[1]
-        arg[2,2,0,1]=(0.327345955109)*x[0]**o+(0.21757823896)*x[0]+(0.873027160446)*x[1]**o+(-0.250192861579)*x[1]
-        arg[2,2,1,0]=(0.394387190832)*x[0]**o+(-0.613661883482)*x[0]+(0.806965291386)*x[1]**o+(0.244513244016)*x[1]
-        arg[2,2,1,1]=(0.043913907536)*x[0]**o+(-0.303567806424)*x[0]+(0.547037093323)*x[1]**o+(-0.598687385328)*x[1]
-        arg[2,2,2,0]=(0.875663154787)*x[0]**o+(-0.34984832772)*x[0]+(0.879143174396)*x[1]**o+(-0.193154051109)*x[1]
-        arg[2,2,2,1]=(0.940311132918)*x[0]**o+(-0.358708743382)*x[0]+(0.117370945146)*x[1]**o+(-0.664208034757)*x[1]
-        arg[2,3,0,0]=(0.0334525660588)*x[0]**o+(0.592805915255)*x[0]+(-0.278216157971)*x[1]**o+(0.894369967671)*x[1]
-        arg[2,3,0,1]=(-0.966591106326)*x[0]**o+(-0.882160390768)*x[0]+(0.843982702732)*x[1]**o+(0.363868921656)*x[1]
-        arg[2,3,1,0]=(-0.246392342771)*x[0]**o+(-0.934459096242)*x[0]+(-0.472771368537)*x[1]**o+(0.148854304706)*x[1]
-        arg[2,3,1,1]=(0.248218424051)*x[0]**o+(0.0980396576111)*x[0]+(0.413322166489)*x[1]**o+(0.429747261346)*x[1]
-        arg[2,3,2,0]=(0.742987565733)*x[0]**o+(-0.213736450136)*x[0]+(0.996975741314)*x[1]**o+(0.960709958665)*x[1]
-        arg[2,3,2,1]=(0.436149490977)*x[0]**o+(0.87632181197)*x[0]+(-0.881934669912)*x[1]**o+(-0.457520504175)*x[1]
-        arg[2,4,0,0]=(-0.519014330693)*x[0]**o+(0.938619608407)*x[0]+(-0.847954563609)*x[1]**o+(0.791774379621)*x[1]
-        arg[2,4,0,1]=(-0.599487299453)*x[0]**o+(0.977867555132)*x[0]+(0.693105630579)*x[1]**o+(-0.688827812942)*x[1]
-        arg[2,4,1,0]=(0.955907964163)*x[0]**o+(0.0724056986172)*x[0]+(0.254773619772)*x[1]**o+(0.0428861146964)*x[1]
-        arg[2,4,1,1]=(-0.422202101998)*x[0]**o+(0.803263223544)*x[0]+(0.456048140785)*x[1]**o+(0.0419133126183)*x[1]
-        arg[2,4,2,0]=(-0.182308704781)*x[0]**o+(0.862282443488)*x[0]+(-0.844027007955)*x[1]**o+(0.586220526376)*x[1]
-        arg[2,4,2,1]=(-0.801542666229)*x[0]**o+(0.903685299455)*x[0]+(0.428926544377)*x[1]**o+(-0.891220471549)*x[1]
-        arg[3,0,0,0]=(0.602917787713)*x[0]**o+(-0.592239549743)*x[0]+(0.761830006718)*x[1]**o+(-0.784264167777)*x[1]
-        arg[3,0,0,1]=(0.819962957732)*x[0]**o+(-0.455126790372)*x[0]+(-0.144898728525)*x[1]**o+(0.121566345339)*x[1]
-        arg[3,0,1,0]=(0.570694941559)*x[0]**o+(-0.505678656386)*x[0]+(0.295536587355)*x[1]**o+(-0.852779737814)*x[1]
-        arg[3,0,1,1]=(-0.226246858753)*x[0]**o+(-0.513900306228)*x[0]+(-0.389483591407)*x[1]**o+(-0.735105335539)*x[1]
-        arg[3,0,2,0]=(0.941877610938)*x[0]**o+(0.93808330298)*x[0]+(0.189785162182)*x[1]**o+(0.546525366304)*x[1]
-        arg[3,0,2,1]=(0.10639100485)*x[0]**o+(-0.773361007972)*x[0]+(-0.470531427579)*x[1]**o+(0.467359342808)*x[1]
-        arg[3,1,0,0]=(0.857725599589)*x[0]**o+(0.0881746413132)*x[0]+(0.040713151152)*x[1]**o+(-0.52070729883)*x[1]
-        arg[3,1,0,1]=(0.266807652146)*x[0]**o+(0.337496673892)*x[0]+(-0.562266297445)*x[1]**o+(0.326015195113)*x[1]
-        arg[3,1,1,0]=(0.177275509465)*x[0]**o+(-0.647855761301)*x[0]+(-0.0963373631995)*x[1]**o+(-0.535256252994)*x[1]
-        arg[3,1,1,1]=(0.430309295606)*x[0]**o+(-0.0894749557428)*x[0]+(0.503470724483)*x[1]**o+(-0.202361122248)*x[1]
-        arg[3,1,2,0]=(0.283995014194)*x[0]**o+(-0.544419907194)*x[0]+(0.78478571712)*x[1]**o+(0.341540664147)*x[1]
-        arg[3,1,2,1]=(-0.281042869936)*x[0]**o+(0.728771766492)*x[0]+(-0.298974388557)*x[1]**o+(-0.836789906985)*x[1]
-        arg[3,2,0,0]=(-0.415323371561)*x[0]**o+(0.583971137371)*x[0]+(-0.265658679489)*x[1]**o+(-0.432447373809)*x[1]
-        arg[3,2,0,1]=(0.690486298855)*x[0]**o+(0.552521632226)*x[0]+(0.237622739042)*x[1]**o+(-0.254513693924)*x[1]
-        arg[3,2,1,0]=(0.453985687207)*x[0]**o+(-0.785385580962)*x[0]+(0.0190987841634)*x[1]**o+(-0.7923288861)*x[1]
-        arg[3,2,1,1]=(-0.964082656379)*x[0]**o+(-0.806315937371)*x[0]+(0.271145420366)*x[1]**o+(-0.839014535945)*x[1]
-        arg[3,2,2,0]=(-0.372062773997)*x[0]**o+(-0.069749560567)*x[0]+(-0.126310395383)*x[1]**o+(0.972025865285)*x[1]
-        arg[3,2,2,1]=(-0.580353020086)*x[0]**o+(-0.152746821477)*x[0]+(0.297553660535)*x[1]**o+(0.444791568145)*x[1]
-        arg[3,3,0,0]=(-0.361520029439)*x[0]**o+(-0.810391070499)*x[0]+(0.462123882642)*x[1]**o+(-0.974534227742)*x[1]
-        arg[3,3,0,1]=(0.113370617837)*x[0]**o+(0.428257355435)*x[0]+(-0.18656623758)*x[1]**o+(0.206503327394)*x[1]
-        arg[3,3,1,0]=(0.341328445689)*x[0]**o+(0.34002947054)*x[0]+(0.997677286362)*x[1]**o+(0.43300073225)*x[1]
-        arg[3,3,1,1]=(-0.513912982823)*x[0]**o+(0.826573827064)*x[0]+(-0.701417864085)*x[1]**o+(0.567078883219)*x[1]
-        arg[3,3,2,0]=(-0.325536866965)*x[0]**o+(0.924405767451)*x[0]+(-0.0481381954346)*x[1]**o+(0.912210617073)*x[1]
-        arg[3,3,2,1]=(0.491532434302)*x[0]**o+(-0.584980848036)*x[0]+(-0.788317530858)*x[1]**o+(-0.900681893172)*x[1]
-        arg[3,4,0,0]=(0.432249855148)*x[0]**o+(-0.673369312552)*x[0]+(0.244704845849)*x[1]**o+(-0.300995595367)*x[1]
-        arg[3,4,0,1]=(0.383037211984)*x[0]**o+(0.299711400488)*x[0]+(0.870584255454)*x[1]**o+(-0.33571823329)*x[1]
-        arg[3,4,1,0]=(0.737134180177)*x[0]**o+(-0.101307090628)*x[0]+(-0.970632061143)*x[1]**o+(-0.449042684137)*x[1]
-        arg[3,4,1,1]=(0.00684250643632)*x[0]**o+(0.676964654022)*x[0]+(0.789069834858)*x[1]**o+(-0.829739508197)*x[1]
-        arg[3,4,2,0]=(0.7279044944)*x[0]**o+(0.215711122038)*x[0]+(0.385631252632)*x[1]**o+(0.629390433529)*x[1]
-        arg[3,4,2,1]=(-0.380750716629)*x[0]**o+(-0.413040692437)*x[0]+(0.26795244639)*x[1]**o+(0.492475504659)*x[1]
-        ref[0,0,0,0]=(-0.274472293956)*x_ref[0]**o+(-0.293347130929)*x_ref[0]+(0.392586448254)*x_ref[1]**o+(-0.403066854054)*x_ref[1]
-        ref[0,0,0,1]=(0.385933192907)*x_ref[0]**o+(0.484240065867)*x_ref[0]+(0.144565631551)*x_ref[1]**o+(0.882508492739)*x_ref[1]
-        ref[0,0,1,0]=(0.993368905137)*x_ref[0]**o+(0.340349919343)*x_ref[0]+(-0.956806746524)*x_ref[1]**o+(0.990607958001)*x_ref[1]
-        ref[0,0,1,1]=(-0.88610250102)*x_ref[0]**o+(-0.543705587259)*x_ref[0]+(0.170798164924)*x_ref[1]**o+(0.685331195754)*x_ref[1]
-        ref[0,0,2,0]=(-0.922211611143)*x_ref[0]**o+(-0.103640037893)*x_ref[0]+(0.401354703434)*x_ref[1]**o+(-0.117826261635)*x_ref[1]
-        ref[0,0,2,1]=(-0.391601387132)*x_ref[0]**o+(-0.472753344804)*x_ref[0]+(-0.473433838993)*x_ref[1]**o+(-0.173501635989)*x_ref[1]
-        ref[0,1,0,0]=(0.747353274916)*x_ref[0]**o+(-0.960856612086)*x_ref[0]+(-0.54809012978)*x_ref[1]**o+(0.862023893332)*x_ref[1]
-        ref[0,1,0,1]=(-0.256359001149)*x_ref[0]**o+(-0.868975044191)*x_ref[0]+(0.494314269744)*x_ref[1]**o+(0.949957481172)*x_ref[1]
-        ref[0,1,1,0]=(-0.0256658750601)*x_ref[0]**o+(0.145499104203)*x_ref[0]+(-0.68669791629)*x_ref[1]**o+(0.447326207295)*x_ref[1]
-        ref[0,1,1,1]=(0.150617284467)*x_ref[0]**o+(-0.350046088196)*x_ref[0]+(-0.367671302053)*x_ref[1]**o+(0.633220122068)*x_ref[1]
-        ref[0,1,2,0]=(-0.714145362271)*x_ref[0]**o+(-0.957661490758)*x_ref[0]+(0.386253770747)*x_ref[1]**o+(0.982634262634)*x_ref[1]
-        ref[0,1,2,1]=(0.707565096824)*x_ref[0]**o+(0.281758058573)*x_ref[0]+(-0.407791315587)*x_ref[1]**o+(0.86069036983)*x_ref[1]
-        ref[0,2,0,0]=(-0.453860220598)*x_ref[0]**o+(0.944457388061)*x_ref[0]+(-0.903818960162)*x_ref[1]**o+(-0.799423205297)*x_ref[1]
-        ref[0,2,0,1]=(-0.621257500941)*x_ref[0]**o+(0.748963737937)*x_ref[0]+(-0.12660934458)*x_ref[1]**o+(-0.362830639592)*x_ref[1]
-        ref[0,2,1,0]=(-0.702485820037)*x_ref[0]**o+(0.355584898593)*x_ref[0]+(0.657127357751)*x_ref[1]**o+(0.535533390762)*x_ref[1]
-        ref[0,2,1,1]=(0.795733125008)*x_ref[0]**o+(0.983607327249)*x_ref[0]+(-0.463818780644)*x_ref[1]**o+(-0.681831588244)*x_ref[1]
-        ref[0,2,2,0]=(0.335783204138)*x_ref[0]**o+(-0.712225782679)*x_ref[0]+(0.853426644096)*x_ref[1]**o+(-0.143845263686)*x_ref[1]
-        ref[0,2,2,1]=(0.389724375144)*x_ref[0]**o+(0.715176227705)*x_ref[0]+(-0.660690893888)*x_ref[1]**o+(0.428289724709)*x_ref[1]
-        ref[0,3,0,0]=(-0.363836203724)*x_ref[0]**o+(-0.257775427457)*x_ref[0]+(0.407904889098)*x_ref[1]**o+(-0.731273814284)*x_ref[1]
-        ref[0,3,0,1]=(0.402038262494)*x_ref[0]**o+(0.33289103638)*x_ref[0]+(0.444957562329)*x_ref[1]**o+(0.0657971935664)*x_ref[1]
-        ref[0,3,1,0]=(0.979673814602)*x_ref[0]**o+(-0.133405332848)*x_ref[0]+(0.23884689304)*x_ref[1]**o+(0.728464997681)*x_ref[1]
-        ref[0,3,1,1]=(0.724603429246)*x_ref[0]**o+(-0.391040898144)*x_ref[0]+(-0.966816499003)*x_ref[1]**o+(0.0984302578905)*x_ref[1]
-        ref[0,3,2,0]=(-0.986139645754)*x_ref[0]**o+(0.60807351165)*x_ref[0]+(0.799807413231)*x_ref[1]**o+(0.12091479711)*x_ref[1]
-        ref[0,3,2,1]=(0.387453999377)*x_ref[0]**o+(0.212725006628)*x_ref[0]+(-0.120374039139)*x_ref[1]**o+(-0.262304757951)*x_ref[1]
-        ref[0,4,0,0]=(-0.260545986276)*x_ref[0]**o+(0.251085312932)*x_ref[0]+(0.738082708518)*x_ref[1]**o+(-0.0804883797938)*x_ref[1]
-        ref[0,4,0,1]=(-0.190701356138)*x_ref[0]**o+(-0.0205295935522)*x_ref[0]+(0.904261681819)*x_ref[1]**o+(-0.859647709957)*x_ref[1]
-        ref[0,4,1,0]=(-0.945357492849)*x_ref[0]**o+(-0.85298463389)*x_ref[0]+(0.688964336673)*x_ref[1]**o+(-0.672881696932)*x_ref[1]
-        ref[0,4,1,1]=(0.877720258045)*x_ref[0]**o+(-0.361228026805)*x_ref[0]+(-0.326626527006)*x_ref[1]**o+(-0.274100421232)*x_ref[1]
-        ref[0,4,2,0]=(0.202358729084)*x_ref[0]**o+(-0.997571481837)*x_ref[0]+(0.431193711862)*x_ref[1]**o+(0.513561123915)*x_ref[1]
-        ref[0,4,2,1]=(-0.136602954592)*x_ref[0]**o+(-0.40864934437)*x_ref[0]+(0.675945574351)*x_ref[1]**o+(0.728757793536)*x_ref[1]
-        ref[1,0,0,0]=(0.835464261851)*x_ref[0]**o+(-0.131447020601)*x_ref[0]+(0.0810352521446)*x_ref[1]**o+(0.664744750899)*x_ref[1]
-        ref[1,0,0,1]=(0.239716928689)*x_ref[0]**o+(-0.192258999531)*x_ref[0]+(0.615877054036)*x_ref[1]**o+(0.835274774437)*x_ref[1]
-        ref[1,0,1,0]=(0.509342803767)*x_ref[0]**o+(-0.633944481882)*x_ref[0]+(0.262098006086)*x_ref[1]**o+(0.159902070799)*x_ref[1]
-        ref[1,0,1,1]=(0.894432440588)*x_ref[0]**o+(-0.167778431319)*x_ref[0]+(-0.984183148477)*x_ref[1]**o+(-0.554981658632)*x_ref[1]
-        ref[1,0,2,0]=(-0.762472607231)*x_ref[0]**o+(0.405550139256)*x_ref[0]+(0.4051290641)*x_ref[1]**o+(-0.27180186672)*x_ref[1]
-        ref[1,0,2,1]=(0.663869273816)*x_ref[0]**o+(0.867453974628)*x_ref[0]+(-0.279659969132)*x_ref[1]**o+(-0.370539101204)*x_ref[1]
-        ref[1,1,0,0]=(-0.969326778164)*x_ref[0]**o+(0.965471349497)*x_ref[0]+(-0.529983232946)*x_ref[1]**o+(0.714091610977)*x_ref[1]
-        ref[1,1,0,1]=(-0.840360667093)*x_ref[0]**o+(-0.399319808256)*x_ref[0]+(0.568769915582)*x_ref[1]**o+(0.872427494442)*x_ref[1]
-        ref[1,1,1,0]=(0.46099116941)*x_ref[0]**o+(-0.986008874142)*x_ref[0]+(-0.53999023556)*x_ref[1]**o+(-0.549695567855)*x_ref[1]
-        ref[1,1,1,1]=(0.485944918559)*x_ref[0]**o+(0.189773828651)*x_ref[0]+(-0.611654980493)*x_ref[1]**o+(-0.337071911657)*x_ref[1]
-        ref[1,1,2,0]=(0.191663603248)*x_ref[0]**o+(0.0906374965004)*x_ref[0]+(-0.271051598251)*x_ref[1]**o+(0.880507788825)*x_ref[1]
-        ref[1,1,2,1]=(-0.439514997001)*x_ref[0]**o+(0.701230426224)*x_ref[0]+(-0.193231641029)*x_ref[1]**o+(0.950584054332)*x_ref[1]
-        ref[1,2,0,0]=(0.439456565259)*x_ref[0]**o+(-0.25664171484)*x_ref[0]+(-0.653059819329)*x_ref[1]**o+(-0.680544747777)*x_ref[1]
-        ref[1,2,0,1]=(0.34890454443)*x_ref[0]**o+(-0.69851200963)*x_ref[0]+(-0.00159381688549)*x_ref[1]**o+(-0.612359675499)*x_ref[1]
-        ref[1,2,1,0]=(0.132759671375)*x_ref[0]**o+(-0.235126716401)*x_ref[0]+(0.652068885826)*x_ref[1]**o+(0.749698645371)*x_ref[1]
-        ref[1,2,1,1]=(0.934980403627)*x_ref[0]**o+(0.321409273437)*x_ref[0]+(-0.605909929553)*x_ref[1]**o+(0.135554927418)*x_ref[1]
-        ref[1,2,2,0]=(-0.68327709329)*x_ref[0]**o+(-0.0381292756005)*x_ref[0]+(0.710953191114)*x_ref[1]**o+(-0.344522256689)*x_ref[1]
-        ref[1,2,2,1]=(-0.813976235652)*x_ref[0]**o+(0.613879708123)*x_ref[0]+(0.451599277293)*x_ref[1]**o+(-0.6134026375)*x_ref[1]
-        ref[1,3,0,0]=(0.595310128627)*x_ref[0]**o+(-0.247621573131)*x_ref[0]+(0.165607783104)*x_ref[1]**o+(0.578132180805)*x_ref[1]
-        ref[1,3,0,1]=(0.848827238882)*x_ref[0]**o+(0.173154067999)*x_ref[0]+(0.340662419437)*x_ref[1]**o+(-0.389656447251)*x_ref[1]
-        ref[1,3,1,0]=(0.250888415228)*x_ref[0]**o+(-0.278203136198)*x_ref[0]+(-0.693211186734)*x_ref[1]**o+(0.613812194735)*x_ref[1]
-        ref[1,3,1,1]=(0.634533003162)*x_ref[0]**o+(-0.0924665762471)*x_ref[0]+(0.749575894384)*x_ref[1]**o+(-0.737205017415)*x_ref[1]
-        ref[1,3,2,0]=(0.607750966973)*x_ref[0]**o+(0.905016928404)*x_ref[0]+(-0.171049542163)*x_ref[1]**o+(-0.20526244601)*x_ref[1]
-        ref[1,3,2,1]=(0.723946025405)*x_ref[0]**o+(0.0157576743987)*x_ref[0]+(0.190875428312)*x_ref[1]**o+(0.407925899509)*x_ref[1]
-        ref[1,4,0,0]=(-0.561582695803)*x_ref[0]**o+(-0.350262461371)*x_ref[0]+(0.57610409872)*x_ref[1]**o+(0.881780963877)*x_ref[1]
-        ref[1,4,0,1]=(0.077066498695)*x_ref[0]**o+(0.515597802516)*x_ref[0]+(0.332011413016)*x_ref[1]**o+(0.215491334787)*x_ref[1]
-        ref[1,4,1,0]=(0.33858727737)*x_ref[0]**o+(-0.573231800768)*x_ref[0]+(-0.559915809132)*x_ref[1]**o+(0.0240869142176)*x_ref[1]
-        ref[1,4,1,1]=(-0.684581727952)*x_ref[0]**o+(0.365541904201)*x_ref[0]+(0.204252397376)*x_ref[1]**o+(0.149300766054)*x_ref[1]
-        ref[1,4,2,0]=(-0.574225088383)*x_ref[0]**o+(0.0286339776067)*x_ref[0]+(-0.358732122607)*x_ref[1]**o+(-0.416932738957)*x_ref[1]
-        ref[1,4,2,1]=(-0.308460184932)*x_ref[0]**o+(0.389214987836)*x_ref[0]+(-0.358303257031)*x_ref[1]**o+(0.348109483688)*x_ref[1]
-        ref[2,0,0,0]=(-0.811318668804)*x_ref[0]**o+(-0.298028116982)*x_ref[0]+(0.679871523483)*x_ref[1]**o+(0.958042925287)*x_ref[1]
-        ref[2,0,0,1]=(-0.616521818338)*x_ref[0]**o+(-0.0817124854496)*x_ref[0]+(0.403257366893)*x_ref[1]**o+(0.740689710435)*x_ref[1]
-        ref[2,0,1,0]=(0.271046179127)*x_ref[0]**o+(0.814928093947)*x_ref[0]+(0.423722781579)*x_ref[1]**o+(0.925333209811)*x_ref[1]
-        ref[2,0,1,1]=(0.0596651806816)*x_ref[0]**o+(0.493854605359)*x_ref[0]+(0.539998537439)*x_ref[1]**o+(-0.910865639375)*x_ref[1]
-        ref[2,0,2,0]=(0.503267602327)*x_ref[0]**o+(-0.270966471743)*x_ref[0]+(-0.342063366676)*x_ref[1]**o+(-0.975700224705)*x_ref[1]
-        ref[2,0,2,1]=(-0.0362358939195)*x_ref[0]**o+(-0.766033869339)*x_ref[0]+(0.891365100088)*x_ref[1]**o+(0.815025898929)*x_ref[1]
-        ref[2,1,0,0]=(-0.667240459984)*x_ref[0]**o+(0.8659076701)*x_ref[0]+(0.215089397562)*x_ref[1]**o+(0.464769182307)*x_ref[1]
-        ref[2,1,0,1]=(-0.298625221931)*x_ref[0]**o+(-0.504329743472)*x_ref[0]+(0.412472510208)*x_ref[1]**o+(0.241693152889)*x_ref[1]
-        ref[2,1,1,0]=(-0.670730179133)*x_ref[0]**o+(0.0201070113832)*x_ref[0]+(-0.572725898919)*x_ref[1]**o+(0.665609259014)*x_ref[1]
-        ref[2,1,1,1]=(-0.319080984089)*x_ref[0]**o+(0.0299423045224)*x_ref[0]+(0.0152311810613)*x_ref[1]**o+(-0.784646189026)*x_ref[1]
-        ref[2,1,2,0]=(0.153308789716)*x_ref[0]**o+(0.725808150613)*x_ref[0]+(0.62876493338)*x_ref[1]**o+(0.80275284252)*x_ref[1]
-        ref[2,1,2,1]=(0.804698870013)*x_ref[0]**o+(-0.631078773061)*x_ref[0]+(-0.015221975698)*x_ref[1]**o+(-0.954169686746)*x_ref[1]
-        ref[2,2,0,0]=(0.169022797498)*x_ref[0]**o+(0.733025791099)*x_ref[0]+(0.321554996633)*x_ref[1]**o+(0.292173365364)*x_ref[1]
-        ref[2,2,0,1]=(0.327345955109)*x_ref[0]**o+(0.21757823896)*x_ref[0]+(0.873027160446)*x_ref[1]**o+(-0.250192861579)*x_ref[1]
-        ref[2,2,1,0]=(0.394387190832)*x_ref[0]**o+(-0.613661883482)*x_ref[0]+(0.806965291386)*x_ref[1]**o+(0.244513244016)*x_ref[1]
-        ref[2,2,1,1]=(0.043913907536)*x_ref[0]**o+(-0.303567806424)*x_ref[0]+(0.547037093323)*x_ref[1]**o+(-0.598687385328)*x_ref[1]
-        ref[2,2,2,0]=(0.875663154787)*x_ref[0]**o+(-0.34984832772)*x_ref[0]+(0.879143174396)*x_ref[1]**o+(-0.193154051109)*x_ref[1]
-        ref[2,2,2,1]=(0.940311132918)*x_ref[0]**o+(-0.358708743382)*x_ref[0]+(0.117370945146)*x_ref[1]**o+(-0.664208034757)*x_ref[1]
-        ref[2,3,0,0]=(0.0334525660588)*x_ref[0]**o+(0.592805915255)*x_ref[0]+(-0.278216157971)*x_ref[1]**o+(0.894369967671)*x_ref[1]
-        ref[2,3,0,1]=(-0.966591106326)*x_ref[0]**o+(-0.882160390768)*x_ref[0]+(0.843982702732)*x_ref[1]**o+(0.363868921656)*x_ref[1]
-        ref[2,3,1,0]=(-0.246392342771)*x_ref[0]**o+(-0.934459096242)*x_ref[0]+(-0.472771368537)*x_ref[1]**o+(0.148854304706)*x_ref[1]
-        ref[2,3,1,1]=(0.248218424051)*x_ref[0]**o+(0.0980396576111)*x_ref[0]+(0.413322166489)*x_ref[1]**o+(0.429747261346)*x_ref[1]
-        ref[2,3,2,0]=(0.742987565733)*x_ref[0]**o+(-0.213736450136)*x_ref[0]+(0.996975741314)*x_ref[1]**o+(0.960709958665)*x_ref[1]
-        ref[2,3,2,1]=(0.436149490977)*x_ref[0]**o+(0.87632181197)*x_ref[0]+(-0.881934669912)*x_ref[1]**o+(-0.457520504175)*x_ref[1]
-        ref[2,4,0,0]=(-0.519014330693)*x_ref[0]**o+(0.938619608407)*x_ref[0]+(-0.847954563609)*x_ref[1]**o+(0.791774379621)*x_ref[1]
-        ref[2,4,0,1]=(-0.599487299453)*x_ref[0]**o+(0.977867555132)*x_ref[0]+(0.693105630579)*x_ref[1]**o+(-0.688827812942)*x_ref[1]
-        ref[2,4,1,0]=(0.955907964163)*x_ref[0]**o+(0.0724056986172)*x_ref[0]+(0.254773619772)*x_ref[1]**o+(0.0428861146964)*x_ref[1]
-        ref[2,4,1,1]=(-0.422202101998)*x_ref[0]**o+(0.803263223544)*x_ref[0]+(0.456048140785)*x_ref[1]**o+(0.0419133126183)*x_ref[1]
-        ref[2,4,2,0]=(-0.182308704781)*x_ref[0]**o+(0.862282443488)*x_ref[0]+(-0.844027007955)*x_ref[1]**o+(0.586220526376)*x_ref[1]
-        ref[2,4,2,1]=(-0.801542666229)*x_ref[0]**o+(0.903685299455)*x_ref[0]+(0.428926544377)*x_ref[1]**o+(-0.891220471549)*x_ref[1]
-        ref[3,0,0,0]=(0.602917787713)*x_ref[0]**o+(-0.592239549743)*x_ref[0]+(0.761830006718)*x_ref[1]**o+(-0.784264167777)*x_ref[1]
-        ref[3,0,0,1]=(0.819962957732)*x_ref[0]**o+(-0.455126790372)*x_ref[0]+(-0.144898728525)*x_ref[1]**o+(0.121566345339)*x_ref[1]
-        ref[3,0,1,0]=(0.570694941559)*x_ref[0]**o+(-0.505678656386)*x_ref[0]+(0.295536587355)*x_ref[1]**o+(-0.852779737814)*x_ref[1]
-        ref[3,0,1,1]=(-0.226246858753)*x_ref[0]**o+(-0.513900306228)*x_ref[0]+(-0.389483591407)*x_ref[1]**o+(-0.735105335539)*x_ref[1]
-        ref[3,0,2,0]=(0.941877610938)*x_ref[0]**o+(0.93808330298)*x_ref[0]+(0.189785162182)*x_ref[1]**o+(0.546525366304)*x_ref[1]
-        ref[3,0,2,1]=(0.10639100485)*x_ref[0]**o+(-0.773361007972)*x_ref[0]+(-0.470531427579)*x_ref[1]**o+(0.467359342808)*x_ref[1]
-        ref[3,1,0,0]=(0.857725599589)*x_ref[0]**o+(0.0881746413132)*x_ref[0]+(0.040713151152)*x_ref[1]**o+(-0.52070729883)*x_ref[1]
-        ref[3,1,0,1]=(0.266807652146)*x_ref[0]**o+(0.337496673892)*x_ref[0]+(-0.562266297445)*x_ref[1]**o+(0.326015195113)*x_ref[1]
-        ref[3,1,1,0]=(0.177275509465)*x_ref[0]**o+(-0.647855761301)*x_ref[0]+(-0.0963373631995)*x_ref[1]**o+(-0.535256252994)*x_ref[1]
-        ref[3,1,1,1]=(0.430309295606)*x_ref[0]**o+(-0.0894749557428)*x_ref[0]+(0.503470724483)*x_ref[1]**o+(-0.202361122248)*x_ref[1]
-        ref[3,1,2,0]=(0.283995014194)*x_ref[0]**o+(-0.544419907194)*x_ref[0]+(0.78478571712)*x_ref[1]**o+(0.341540664147)*x_ref[1]
-        ref[3,1,2,1]=(-0.281042869936)*x_ref[0]**o+(0.728771766492)*x_ref[0]+(-0.298974388557)*x_ref[1]**o+(-0.836789906985)*x_ref[1]
-        ref[3,2,0,0]=(-0.415323371561)*x_ref[0]**o+(0.583971137371)*x_ref[0]+(-0.265658679489)*x_ref[1]**o+(-0.432447373809)*x_ref[1]
-        ref[3,2,0,1]=(0.690486298855)*x_ref[0]**o+(0.552521632226)*x_ref[0]+(0.237622739042)*x_ref[1]**o+(-0.254513693924)*x_ref[1]
-        ref[3,2,1,0]=(0.453985687207)*x_ref[0]**o+(-0.785385580962)*x_ref[0]+(0.0190987841634)*x_ref[1]**o+(-0.7923288861)*x_ref[1]
-        ref[3,2,1,1]=(-0.964082656379)*x_ref[0]**o+(-0.806315937371)*x_ref[0]+(0.271145420366)*x_ref[1]**o+(-0.839014535945)*x_ref[1]
-        ref[3,2,2,0]=(-0.372062773997)*x_ref[0]**o+(-0.069749560567)*x_ref[0]+(-0.126310395383)*x_ref[1]**o+(0.972025865285)*x_ref[1]
-        ref[3,2,2,1]=(-0.580353020086)*x_ref[0]**o+(-0.152746821477)*x_ref[0]+(0.297553660535)*x_ref[1]**o+(0.444791568145)*x_ref[1]
-        ref[3,3,0,0]=(-0.361520029439)*x_ref[0]**o+(-0.810391070499)*x_ref[0]+(0.462123882642)*x_ref[1]**o+(-0.974534227742)*x_ref[1]
-        ref[3,3,0,1]=(0.113370617837)*x_ref[0]**o+(0.428257355435)*x_ref[0]+(-0.18656623758)*x_ref[1]**o+(0.206503327394)*x_ref[1]
-        ref[3,3,1,0]=(0.341328445689)*x_ref[0]**o+(0.34002947054)*x_ref[0]+(0.997677286362)*x_ref[1]**o+(0.43300073225)*x_ref[1]
-        ref[3,3,1,1]=(-0.513912982823)*x_ref[0]**o+(0.826573827064)*x_ref[0]+(-0.701417864085)*x_ref[1]**o+(0.567078883219)*x_ref[1]
-        ref[3,3,2,0]=(-0.325536866965)*x_ref[0]**o+(0.924405767451)*x_ref[0]+(-0.0481381954346)*x_ref[1]**o+(0.912210617073)*x_ref[1]
-        ref[3,3,2,1]=(0.491532434302)*x_ref[0]**o+(-0.584980848036)*x_ref[0]+(-0.788317530858)*x_ref[1]**o+(-0.900681893172)*x_ref[1]
-        ref[3,4,0,0]=(0.432249855148)*x_ref[0]**o+(-0.673369312552)*x_ref[0]+(0.244704845849)*x_ref[1]**o+(-0.300995595367)*x_ref[1]
-        ref[3,4,0,1]=(0.383037211984)*x_ref[0]**o+(0.299711400488)*x_ref[0]+(0.870584255454)*x_ref[1]**o+(-0.33571823329)*x_ref[1]
-        ref[3,4,1,0]=(0.737134180177)*x_ref[0]**o+(-0.101307090628)*x_ref[0]+(-0.970632061143)*x_ref[1]**o+(-0.449042684137)*x_ref[1]
-        ref[3,4,1,1]=(0.00684250643632)*x_ref[0]**o+(0.676964654022)*x_ref[0]+(0.789069834858)*x_ref[1]**o+(-0.829739508197)*x_ref[1]
-        ref[3,4,2,0]=(0.7279044944)*x_ref[0]**o+(0.215711122038)*x_ref[0]+(0.385631252632)*x_ref[1]**o+(0.629390433529)*x_ref[1]
-        ref[3,4,2,1]=(-0.380750716629)*x_ref[0]**o+(-0.413040692437)*x_ref[0]+(0.26795244639)*x_ref[1]**o+(0.492475504659)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.287160004495)*x[0]**o+(0.35112250158)*x[0]+(0.061693427026)*x[1]**o+(-0.752505628029)*x[1]+(-0.57137756028)*x[2]**o+(-0.0397598892504)*x[2]
-        arg[0,0,0,1]=(0.272799584607)*x[0]**o+(-0.569947956933)*x[0]+(0.322189261657)*x[1]**o+(-0.440552272224)*x[1]+(-0.10460241481)*x[2]**o+(-0.884848984752)*x[2]
-        arg[0,0,1,0]=(0.147766301604)*x[0]**o+(0.405651654428)*x[0]+(-0.440827209529)*x[1]**o+(-0.399952864271)*x[1]+(-0.770191009459)*x[2]**o+(-0.789853968049)*x[2]
-        arg[0,0,1,1]=(0.688053165375)*x[0]**o+(-0.154890421924)*x[0]+(0.583684164319)*x[1]**o+(-0.398082068217)*x[1]+(-0.573142923099)*x[2]**o+(-0.205271877337)*x[2]
-        arg[0,0,2,0]=(0.807043275877)*x[0]**o+(0.843046383231)*x[0]+(-0.588146471402)*x[1]**o+(0.157787304557)*x[1]+(-0.771009748568)*x[2]**o+(0.162090791609)*x[2]
-        arg[0,0,2,1]=(-0.0706800489392)*x[0]**o+(0.499961344665)*x[0]+(0.208926178797)*x[1]**o+(-0.7462472769)*x[1]+(-0.105475405648)*x[2]**o+(-0.18670229948)*x[2]
-        arg[0,1,0,0]=(-0.696657281943)*x[0]**o+(-0.0251785345759)*x[0]+(-0.579575530451)*x[1]**o+(-0.0628378665725)*x[1]+(0.668395441302)*x[2]**o+(0.813478105092)*x[2]
-        arg[0,1,0,1]=(-0.574784314876)*x[0]**o+(-0.321268045204)*x[0]+(0.160704464213)*x[1]**o+(-0.676016748103)*x[1]+(0.918971102865)*x[2]**o+(0.252082410081)*x[2]
-        arg[0,1,1,0]=(-0.905062846817)*x[0]**o+(0.788906658477)*x[0]+(-0.408807611936)*x[1]**o+(0.114686186437)*x[1]+(-0.654685568493)*x[2]**o+(0.0879202139254)*x[2]
-        arg[0,1,1,1]=(-0.68020231443)*x[0]**o+(-0.82049202902)*x[0]+(-0.958352740187)*x[1]**o+(-0.33201745802)*x[1]+(0.539810363682)*x[2]**o+(0.744988573087)*x[2]
-        arg[0,1,2,0]=(-0.960884744997)*x[0]**o+(-0.704157132503)*x[0]+(0.282236905414)*x[1]**o+(0.756363456433)*x[1]+(-0.365400101792)*x[2]**o+(0.975735846554)*x[2]
-        arg[0,1,2,1]=(-0.691780076951)*x[0]**o+(-0.952575440059)*x[0]+(-0.921247808098)*x[1]**o+(-0.88872834095)*x[1]+(0.534103013833)*x[2]**o+(-0.602295186104)*x[2]
-        arg[0,2,0,0]=(0.460698415704)*x[0]**o+(0.770243814897)*x[0]+(-0.380381727574)*x[1]**o+(0.476360845668)*x[1]+(-0.681040425102)*x[2]**o+(-0.244369435116)*x[2]
-        arg[0,2,0,1]=(0.251591652281)*x[0]**o+(0.748234919686)*x[0]+(-0.698189037307)*x[1]**o+(-0.292400412508)*x[1]+(0.613850696577)*x[2]**o+(-0.942243226834)*x[2]
-        arg[0,2,1,0]=(-0.718090066328)*x[0]**o+(-0.322499511794)*x[0]+(-0.75105623397)*x[1]**o+(0.526680271832)*x[1]+(-0.186671531793)*x[2]**o+(-0.449273875991)*x[2]
-        arg[0,2,1,1]=(-0.52165552452)*x[0]**o+(0.902446006085)*x[0]+(-0.915575172702)*x[1]**o+(-0.150816194662)*x[1]+(0.596782785689)*x[2]**o+(0.546880865642)*x[2]
-        arg[0,2,2,0]=(-0.104486704816)*x[0]**o+(0.723863699457)*x[0]+(0.758622117279)*x[1]**o+(0.372271580145)*x[1]+(-0.0820570383792)*x[2]**o+(-0.63539781104)*x[2]
-        arg[0,2,2,1]=(0.0355930823603)*x[0]**o+(0.0931942600432)*x[0]+(-0.118096985978)*x[1]**o+(0.296983782212)*x[1]+(-0.864491763712)*x[2]**o+(0.942230663978)*x[2]
-        arg[0,3,0,0]=(0.371153709815)*x[0]**o+(0.0427309083893)*x[0]+(-0.886563919084)*x[1]**o+(-0.14946513404)*x[1]+(0.80903804519)*x[2]**o+(0.69728533073)*x[2]
-        arg[0,3,0,1]=(0.0593930396142)*x[0]**o+(-0.370327974089)*x[0]+(-0.388354464683)*x[1]**o+(-0.367648771812)*x[1]+(-0.573754821458)*x[2]**o+(-0.947499155479)*x[2]
-        arg[0,3,1,0]=(-0.869817317)*x[0]**o+(0.874317772678)*x[0]+(-0.870060178375)*x[1]**o+(0.66571074524)*x[1]+(-0.669052377378)*x[2]**o+(0.940212680575)*x[2]
-        arg[0,3,1,1]=(-0.417445606772)*x[0]**o+(0.942606057619)*x[0]+(-0.133936034409)*x[1]**o+(-0.363274280866)*x[1]+(0.83487439935)*x[2]**o+(-0.108398981461)*x[2]
-        arg[0,3,2,0]=(0.363623383293)*x[0]**o+(0.624267309217)*x[0]+(0.801719984899)*x[1]**o+(0.189212370122)*x[1]+(0.464633630928)*x[2]**o+(-0.979808318438)*x[2]
-        arg[0,3,2,1]=(0.85384408805)*x[0]**o+(-0.889214754116)*x[0]+(0.164915391224)*x[1]**o+(0.0168991405201)*x[1]+(0.097171994236)*x[2]**o+(-0.146094197339)*x[2]
-        arg[0,4,0,0]=(0.778356158972)*x[0]**o+(0.910241265149)*x[0]+(0.123690863272)*x[1]**o+(0.87802121779)*x[1]+(-0.714615668595)*x[2]**o+(-0.437472831583)*x[2]
-        arg[0,4,0,1]=(-0.157185481783)*x[0]**o+(0.352802163968)*x[0]+(0.390184123612)*x[1]**o+(-0.680415093098)*x[1]+(-0.121195042454)*x[2]**o+(-0.713693712117)*x[2]
-        arg[0,4,1,0]=(0.778115668646)*x[0]**o+(-0.111729042892)*x[0]+(0.451518002735)*x[1]**o+(0.232731183374)*x[1]+(-0.764246158086)*x[2]**o+(-0.795525155328)*x[2]
-        arg[0,4,1,1]=(-0.880652367027)*x[0]**o+(-0.314966079126)*x[0]+(-0.640720373065)*x[1]**o+(0.336230541901)*x[1]+(0.566956999526)*x[2]**o+(0.74098258811)*x[2]
-        arg[0,4,2,0]=(0.908657274301)*x[0]**o+(0.636427823614)*x[0]+(0.650137414386)*x[1]**o+(0.695558379005)*x[1]+(-0.489852401087)*x[2]**o+(-0.479227108044)*x[2]
-        arg[0,4,2,1]=(0.015734241525)*x[0]**o+(0.0719884727088)*x[0]+(0.811864895261)*x[1]**o+(0.959127986784)*x[1]+(-0.238146663368)*x[2]**o+(-0.454939322571)*x[2]
-        arg[1,0,0,0]=(-0.918218246559)*x[0]**o+(-0.662787169269)*x[0]+(-0.954035144111)*x[1]**o+(-0.647264685228)*x[1]+(-0.834085960213)*x[2]**o+(-0.167541951024)*x[2]
-        arg[1,0,0,1]=(-0.670950869382)*x[0]**o+(0.826472159989)*x[0]+(0.180410872786)*x[1]**o+(-0.715162871594)*x[1]+(0.653287853169)*x[2]**o+(0.892060529625)*x[2]
-        arg[1,0,1,0]=(0.398789786407)*x[0]**o+(0.689408033554)*x[0]+(0.124338245128)*x[1]**o+(0.748280808587)*x[1]+(0.418357122274)*x[2]**o+(0.230707440075)*x[2]
-        arg[1,0,1,1]=(-0.912778964055)*x[0]**o+(0.904288708694)*x[0]+(-0.874744856901)*x[1]**o+(0.550162195719)*x[1]+(-0.7526423373)*x[2]**o+(0.820993231654)*x[2]
-        arg[1,0,2,0]=(-0.843459684648)*x[0]**o+(-0.579708764091)*x[0]+(-0.876072131849)*x[1]**o+(0.933694599696)*x[1]+(0.507781209021)*x[2]**o+(-0.719729482133)*x[2]
-        arg[1,0,2,1]=(0.594566925796)*x[0]**o+(-0.994301292358)*x[0]+(0.808114389564)*x[1]**o+(-0.970803712864)*x[1]+(0.433544910389)*x[2]**o+(0.260659440299)*x[2]
-        arg[1,1,0,0]=(0.997377553172)*x[0]**o+(0.458428616383)*x[0]+(0.357280778493)*x[1]**o+(0.349837110741)*x[1]+(-0.709592214445)*x[2]**o+(-0.630000739033)*x[2]
-        arg[1,1,0,1]=(0.121595650501)*x[0]**o+(0.40870120924)*x[0]+(0.576917123807)*x[1]**o+(-0.932268308325)*x[1]+(0.710043472116)*x[2]**o+(-0.716528412077)*x[2]
-        arg[1,1,1,0]=(-0.151416035033)*x[0]**o+(0.0255347649787)*x[0]+(-0.752987701889)*x[1]**o+(-0.480969875813)*x[1]+(-0.610514504179)*x[2]**o+(0.959274757402)*x[2]
-        arg[1,1,1,1]=(0.76695706106)*x[0]**o+(-0.0750965975512)*x[0]+(0.846833900735)*x[1]**o+(-0.105838465439)*x[1]+(0.541027486457)*x[2]**o+(0.152543017589)*x[2]
-        arg[1,1,2,0]=(0.0856977181865)*x[0]**o+(-0.188139369706)*x[0]+(0.936071565289)*x[1]**o+(-0.3958713036)*x[1]+(-0.350945878893)*x[2]**o+(0.382302674883)*x[2]
-        arg[1,1,2,1]=(0.873054234789)*x[0]**o+(-0.490869716146)*x[0]+(0.46720526212)*x[1]**o+(-0.334203412334)*x[1]+(-0.81140895636)*x[2]**o+(-0.973858971749)*x[2]
-        arg[1,2,0,0]=(-0.716676352443)*x[0]**o+(0.659821396277)*x[0]+(0.335964292954)*x[1]**o+(0.11609664773)*x[1]+(-0.889186749466)*x[2]**o+(0.454231973946)*x[2]
-        arg[1,2,0,1]=(0.367048872648)*x[0]**o+(0.276083713126)*x[0]+(0.686639128043)*x[1]**o+(-0.991414415293)*x[1]+(0.25360515964)*x[2]**o+(-0.377623315093)*x[2]
-        arg[1,2,1,0]=(-0.723089358777)*x[0]**o+(-0.516690112406)*x[0]+(0.262334273979)*x[1]**o+(0.140773502537)*x[1]+(0.447333972396)*x[2]**o+(-0.551395692966)*x[2]
-        arg[1,2,1,1]=(0.738791182491)*x[0]**o+(-0.978120626668)*x[0]+(-0.217970433713)*x[1]**o+(0.0181011067492)*x[1]+(0.756322867523)*x[2]**o+(0.495269195978)*x[2]
-        arg[1,2,2,0]=(-0.630506449854)*x[0]**o+(-0.0865482364231)*x[0]+(-0.415896403157)*x[1]**o+(-0.712833149895)*x[1]+(-0.180482789777)*x[2]**o+(0.00788290661235)*x[2]
-        arg[1,2,2,1]=(0.0946913865377)*x[0]**o+(0.752854827716)*x[0]+(0.257846220843)*x[1]**o+(-0.953926983578)*x[1]+(-0.388505920682)*x[2]**o+(-0.10751401251)*x[2]
-        arg[1,3,0,0]=(0.694014030611)*x[0]**o+(0.0433103547797)*x[0]+(-0.0805025225569)*x[1]**o+(0.389052254754)*x[1]+(-0.813210939614)*x[2]**o+(-0.593788787896)*x[2]
-        arg[1,3,0,1]=(0.0101606353406)*x[0]**o+(-0.849874258855)*x[0]+(-0.0578973959381)*x[1]**o+(0.942113140424)*x[1]+(0.613716459216)*x[2]**o+(0.72631176833)*x[2]
-        arg[1,3,1,0]=(0.264703608811)*x[0]**o+(0.457962548326)*x[0]+(-0.433795242673)*x[1]**o+(0.650995712848)*x[1]+(0.372471807967)*x[2]**o+(0.00416636841047)*x[2]
-        arg[1,3,1,1]=(-0.73686451669)*x[0]**o+(-0.0425614910776)*x[0]+(-0.587820431311)*x[1]**o+(-0.377628617833)*x[1]+(-0.463964014406)*x[2]**o+(0.283273874989)*x[2]
-        arg[1,3,2,0]=(-0.689341439143)*x[0]**o+(-0.675861918889)*x[0]+(-0.918622662352)*x[1]**o+(0.740990261888)*x[1]+(0.0454007677041)*x[2]**o+(0.513623361074)*x[2]
-        arg[1,3,2,1]=(0.13229101848)*x[0]**o+(0.171873799817)*x[0]+(-0.154491174434)*x[1]**o+(0.897976884089)*x[1]+(-0.598886311821)*x[2]**o+(0.738696710918)*x[2]
-        arg[1,4,0,0]=(0.59403636966)*x[0]**o+(0.93856848969)*x[0]+(0.80164849167)*x[1]**o+(-0.753322979568)*x[1]+(-0.107098073916)*x[2]**o+(-0.623047487973)*x[2]
-        arg[1,4,0,1]=(0.291046099082)*x[0]**o+(-0.437982471049)*x[0]+(0.017395762947)*x[1]**o+(0.852440593923)*x[1]+(0.630825424359)*x[2]**o+(0.419347491727)*x[2]
-        arg[1,4,1,0]=(-0.747962012701)*x[0]**o+(-0.11622032094)*x[0]+(0.324950549781)*x[1]**o+(0.950911398327)*x[1]+(-0.18098990205)*x[2]**o+(-0.676060633522)*x[2]
-        arg[1,4,1,1]=(0.545224363128)*x[0]**o+(0.753376367121)*x[0]+(0.271426695753)*x[1]**o+(-0.139309844675)*x[1]+(-0.923434716375)*x[2]**o+(-0.985988324389)*x[2]
-        arg[1,4,2,0]=(-0.532260822047)*x[0]**o+(0.901407135724)*x[0]+(0.937451330141)*x[1]**o+(0.285217666559)*x[1]+(-0.133028984824)*x[2]**o+(0.993965133696)*x[2]
-        arg[1,4,2,1]=(0.2231815607)*x[0]**o+(0.994845537582)*x[0]+(0.0368727378195)*x[1]**o+(0.511772933777)*x[1]+(-0.871580215976)*x[2]**o+(-0.587010057329)*x[2]
-        arg[2,0,0,0]=(-0.55149411913)*x[0]**o+(-0.905541278559)*x[0]+(0.461217373096)*x[1]**o+(-0.53359853241)*x[1]+(-0.666643290883)*x[2]**o+(0.151495826926)*x[2]
-        arg[2,0,0,1]=(-0.980485062148)*x[0]**o+(0.150165616162)*x[0]+(0.59165725487)*x[1]**o+(-0.243853536017)*x[1]+(0.66816261686)*x[2]**o+(0.2425696131)*x[2]
-        arg[2,0,1,0]=(-0.509337213758)*x[0]**o+(0.652936706687)*x[0]+(-0.849214338091)*x[1]**o+(-0.523354123549)*x[1]+(0.371515689887)*x[2]**o+(0.799989815414)*x[2]
-        arg[2,0,1,1]=(0.461584544541)*x[0]**o+(0.662931355954)*x[0]+(0.744415634786)*x[1]**o+(-0.016743801256)*x[1]+(0.172945846325)*x[2]**o+(-0.0889827089341)*x[2]
-        arg[2,0,2,0]=(0.506514791562)*x[0]**o+(0.974477160694)*x[0]+(-0.968485343167)*x[1]**o+(0.427480013599)*x[1]+(0.0460755879358)*x[2]**o+(0.186500994948)*x[2]
-        arg[2,0,2,1]=(0.259831607993)*x[0]**o+(-0.0141290444125)*x[0]+(-0.968452177682)*x[1]**o+(0.635619125009)*x[1]+(-0.958848431827)*x[2]**o+(-0.0977241523308)*x[2]
-        arg[2,1,0,0]=(0.204233222933)*x[0]**o+(0.834739381877)*x[0]+(0.19961185048)*x[1]**o+(-0.238470380578)*x[1]+(-0.749979713773)*x[2]**o+(-0.268168886251)*x[2]
-        arg[2,1,0,1]=(0.998123643088)*x[0]**o+(0.635823733041)*x[0]+(-0.265447124419)*x[1]**o+(-0.225582751946)*x[1]+(0.91705937439)*x[2]**o+(-0.739461510792)*x[2]
-        arg[2,1,1,0]=(0.0800715288646)*x[0]**o+(-0.37677196659)*x[0]+(-0.0737286350219)*x[1]**o+(0.032076062933)*x[1]+(0.245421912709)*x[2]**o+(-0.8378023935)*x[2]
-        arg[2,1,1,1]=(-0.572376055603)*x[0]**o+(0.8675468469)*x[0]+(-0.533012889867)*x[1]**o+(-0.247215658297)*x[1]+(0.673144564693)*x[2]**o+(-0.749136108985)*x[2]
-        arg[2,1,2,0]=(-0.661188192488)*x[0]**o+(-0.924435593008)*x[0]+(-0.791845808916)*x[1]**o+(0.00133765351092)*x[1]+(0.233676862873)*x[2]**o+(0.981812737962)*x[2]
-        arg[2,1,2,1]=(0.332072445986)*x[0]**o+(-0.909373798588)*x[0]+(0.927025647819)*x[1]**o+(-0.936348942617)*x[1]+(0.251508592152)*x[2]**o+(-0.468147973987)*x[2]
-        arg[2,2,0,0]=(0.892377893841)*x[0]**o+(-0.147933293091)*x[0]+(0.950491102076)*x[1]**o+(0.595250355926)*x[1]+(0.0169764649992)*x[2]**o+(-0.683137752586)*x[2]
-        arg[2,2,0,1]=(0.00579397005645)*x[0]**o+(0.627197373917)*x[0]+(0.663574756196)*x[1]**o+(0.934106767513)*x[1]+(0.105844878022)*x[2]**o+(0.513322917688)*x[2]
-        arg[2,2,1,0]=(-0.168776016133)*x[0]**o+(-0.940071612944)*x[0]+(0.0366053554566)*x[1]**o+(-0.628010909771)*x[1]+(0.250023045906)*x[2]**o+(-0.00327322332166)*x[2]
-        arg[2,2,1,1]=(0.904155764376)*x[0]**o+(-0.258018307306)*x[0]+(0.65862820521)*x[1]**o+(0.434480798515)*x[1]+(0.4089419173)*x[2]**o+(-0.518032695598)*x[2]
-        arg[2,2,2,0]=(-0.41470070958)*x[0]**o+(-0.783186751952)*x[0]+(0.548309561942)*x[1]**o+(0.837130592803)*x[1]+(-0.346808491848)*x[2]**o+(0.165416040985)*x[2]
-        arg[2,2,2,1]=(0.997845909195)*x[0]**o+(0.448428042158)*x[0]+(-0.657050004311)*x[1]**o+(0.493104851747)*x[1]+(0.558315071197)*x[2]**o+(0.206659432923)*x[2]
-        arg[2,3,0,0]=(0.433874360232)*x[0]**o+(-0.0635646197131)*x[0]+(-0.521690521523)*x[1]**o+(-0.298130684888)*x[1]+(-0.131905313644)*x[2]**o+(0.64389451112)*x[2]
-        arg[2,3,0,1]=(0.457729315216)*x[0]**o+(-0.419323242135)*x[0]+(0.614544051135)*x[1]**o+(-0.701671999275)*x[1]+(0.905494300727)*x[2]**o+(-0.565716985337)*x[2]
-        arg[2,3,1,0]=(0.256570728097)*x[0]**o+(0.866349285103)*x[0]+(-0.115768354896)*x[1]**o+(-0.613044456549)*x[1]+(-0.20074185156)*x[2]**o+(-0.188403571776)*x[2]
-        arg[2,3,1,1]=(0.767479943414)*x[0]**o+(0.884066215007)*x[0]+(0.363855420056)*x[1]**o+(0.919698981104)*x[1]+(0.225747762317)*x[2]**o+(-0.220362271104)*x[2]
-        arg[2,3,2,0]=(-0.746469501382)*x[0]**o+(0.680520398001)*x[0]+(0.926950996325)*x[1]**o+(-0.122831303044)*x[1]+(-0.27226561675)*x[2]**o+(0.933304087951)*x[2]
-        arg[2,3,2,1]=(-0.0961434747216)*x[0]**o+(0.987660516767)*x[0]+(0.288175205045)*x[1]**o+(0.683720820403)*x[1]+(0.354403143642)*x[2]**o+(-0.745694089132)*x[2]
-        arg[2,4,0,0]=(0.921750835986)*x[0]**o+(-0.0358861598394)*x[0]+(0.190129645259)*x[1]**o+(0.377067803331)*x[1]+(-0.0188615236582)*x[2]**o+(0.804533888824)*x[2]
-        arg[2,4,0,1]=(-0.256132234484)*x[0]**o+(-0.102661411017)*x[0]+(-0.903465157009)*x[1]**o+(0.50133310168)*x[1]+(-0.0889102598619)*x[2]**o+(-0.0310174238365)*x[2]
-        arg[2,4,1,0]=(0.58483798855)*x[0]**o+(0.967943344305)*x[0]+(-0.0701080005438)*x[1]**o+(0.489476104406)*x[1]+(0.615308427038)*x[2]**o+(-0.38065505709)*x[2]
-        arg[2,4,1,1]=(0.647734130724)*x[0]**o+(-0.930934392719)*x[0]+(0.267370540491)*x[1]**o+(-0.0175019424556)*x[1]+(0.38593657129)*x[2]**o+(-0.985922292359)*x[2]
-        arg[2,4,2,0]=(-0.289971479933)*x[0]**o+(0.882014313157)*x[0]+(0.147321067579)*x[1]**o+(-0.176771838489)*x[1]+(0.710916531544)*x[2]**o+(-0.0856290170401)*x[2]
-        arg[2,4,2,1]=(-0.465930997733)*x[0]**o+(-0.305563942094)*x[0]+(-0.824535262061)*x[1]**o+(-0.917892226972)*x[1]+(0.624462871955)*x[2]**o+(0.544736500065)*x[2]
-        arg[3,0,0,0]=(-0.673230815097)*x[0]**o+(-0.726292712917)*x[0]+(0.0531037021688)*x[1]**o+(-0.467219030159)*x[1]+(-0.0729861369718)*x[2]**o+(-0.440394335015)*x[2]
-        arg[3,0,0,1]=(-0.358235295558)*x[0]**o+(-0.301184713671)*x[0]+(-0.496030649086)*x[1]**o+(-0.125922184777)*x[1]+(0.946715036973)*x[2]**o+(0.846370337893)*x[2]
-        arg[3,0,1,0]=(-0.394175109612)*x[0]**o+(-0.85137582307)*x[0]+(-0.667804785044)*x[1]**o+(0.156762109891)*x[1]+(-0.616444700525)*x[2]**o+(0.0738729399356)*x[2]
-        arg[3,0,1,1]=(-0.652875462534)*x[0]**o+(-0.0605650192541)*x[0]+(0.840539933823)*x[1]**o+(-0.422819423301)*x[1]+(0.113440226819)*x[2]**o+(-0.915154532306)*x[2]
-        arg[3,0,2,0]=(-0.162863352328)*x[0]**o+(-0.364461332292)*x[0]+(-0.222181741398)*x[1]**o+(-0.563668008365)*x[1]+(0.118491770105)*x[2]**o+(0.0809155053022)*x[2]
-        arg[3,0,2,1]=(-0.985278929437)*x[0]**o+(-0.919440760157)*x[0]+(-0.776910686)*x[1]**o+(-0.884270488943)*x[1]+(0.984279010363)*x[2]**o+(-0.489503278582)*x[2]
-        arg[3,1,0,0]=(-0.806565449823)*x[0]**o+(-0.0851385375281)*x[0]+(-0.88851381773)*x[1]**o+(-0.666539867528)*x[1]+(0.154825531411)*x[2]**o+(0.764069849144)*x[2]
-        arg[3,1,0,1]=(-0.222125783918)*x[0]**o+(0.568035675467)*x[0]+(0.470171778932)*x[1]**o+(-0.307608710881)*x[1]+(-0.836083742471)*x[2]**o+(0.553597553381)*x[2]
-        arg[3,1,1,0]=(0.431237389847)*x[0]**o+(-0.141391012471)*x[0]+(0.726895025519)*x[1]**o+(-0.527868751679)*x[1]+(0.711761083137)*x[2]**o+(0.996992864103)*x[2]
-        arg[3,1,1,1]=(-0.123885959924)*x[0]**o+(0.877034475529)*x[0]+(-0.0432492682928)*x[1]**o+(-0.370315494618)*x[1]+(0.243139719071)*x[2]**o+(-0.684318634902)*x[2]
-        arg[3,1,2,0]=(-0.477214489355)*x[0]**o+(0.340808576619)*x[0]+(-0.0991802306558)*x[1]**o+(0.462599821908)*x[1]+(0.091768281564)*x[2]**o+(0.0315552838839)*x[2]
-        arg[3,1,2,1]=(0.676189142894)*x[0]**o+(0.510136386913)*x[0]+(-0.558579041952)*x[1]**o+(0.961615047877)*x[1]+(0.510717386124)*x[2]**o+(0.774430183432)*x[2]
-        arg[3,2,0,0]=(0.158370232444)*x[0]**o+(0.209424855992)*x[0]+(0.691438753013)*x[1]**o+(-0.781594298738)*x[1]+(-0.0188536627517)*x[2]**o+(0.136400798995)*x[2]
-        arg[3,2,0,1]=(-0.440674414328)*x[0]**o+(0.118228612687)*x[0]+(-0.700026492613)*x[1]**o+(-0.981341215714)*x[1]+(-0.172847519578)*x[2]**o+(-0.423095202172)*x[2]
-        arg[3,2,1,0]=(-0.0694960391695)*x[0]**o+(-0.66448610135)*x[0]+(-0.177572703748)*x[1]**o+(-0.060488161727)*x[1]+(0.306021853885)*x[2]**o+(0.0730338716187)*x[2]
-        arg[3,2,1,1]=(-0.360662154547)*x[0]**o+(0.577679359648)*x[0]+(-0.515313534966)*x[1]**o+(0.217352687358)*x[1]+(0.728367577882)*x[2]**o+(0.38505849834)*x[2]
-        arg[3,2,2,0]=(0.568671861232)*x[0]**o+(-0.0792490917882)*x[0]+(0.0188002885229)*x[1]**o+(-0.956862575759)*x[1]+(-0.844332442983)*x[2]**o+(0.670792928042)*x[2]
-        arg[3,2,2,1]=(0.833099204713)*x[0]**o+(0.368482169933)*x[0]+(-0.926002498892)*x[1]**o+(-0.130646446568)*x[1]+(0.81164928914)*x[2]**o+(-0.641079919927)*x[2]
-        arg[3,3,0,0]=(-0.277769350989)*x[0]**o+(0.753452018649)*x[0]+(-0.766322344505)*x[1]**o+(-0.679108224612)*x[1]+(0.0799499795424)*x[2]**o+(0.255751308975)*x[2]
-        arg[3,3,0,1]=(0.429176753733)*x[0]**o+(0.123106050259)*x[0]+(-0.169037728992)*x[1]**o+(0.749245933687)*x[1]+(0.560140859355)*x[2]**o+(-0.937091840021)*x[2]
-        arg[3,3,1,0]=(0.648792557593)*x[0]**o+(-0.057555187513)*x[0]+(0.883290331726)*x[1]**o+(0.539276905995)*x[1]+(0.473614408583)*x[2]**o+(0.723258340333)*x[2]
-        arg[3,3,1,1]=(0.527298833572)*x[0]**o+(0.0753824058279)*x[0]+(0.719196099257)*x[1]**o+(-0.0124603350035)*x[1]+(-0.964484650253)*x[2]**o+(0.404444269694)*x[2]
-        arg[3,3,2,0]=(-0.403640677462)*x[0]**o+(0.906195964766)*x[0]+(-0.561419078404)*x[1]**o+(0.645408717838)*x[1]+(0.671624799609)*x[2]**o+(-0.573901868621)*x[2]
-        arg[3,3,2,1]=(-0.288117182165)*x[0]**o+(-0.391003584945)*x[0]+(-0.555037182038)*x[1]**o+(0.299362209017)*x[1]+(-0.552429724326)*x[2]**o+(-0.416923306774)*x[2]
-        arg[3,4,0,0]=(-0.19594719192)*x[0]**o+(0.150898934692)*x[0]+(0.210935232044)*x[1]**o+(-0.319764293347)*x[1]+(-0.642450751195)*x[2]**o+(0.22231085168)*x[2]
-        arg[3,4,0,1]=(-0.0514589460225)*x[0]**o+(0.0366025646754)*x[0]+(0.416280576691)*x[1]**o+(0.609178063951)*x[1]+(0.835611677062)*x[2]**o+(-0.131630571478)*x[2]
-        arg[3,4,1,0]=(0.171509152214)*x[0]**o+(-0.761188271093)*x[0]+(-0.915951802896)*x[1]**o+(-0.451796709915)*x[1]+(-0.979847828162)*x[2]**o+(0.0566453393315)*x[2]
-        arg[3,4,1,1]=(0.690427998102)*x[0]**o+(-0.358318625695)*x[0]+(0.330270871613)*x[1]**o+(-0.724392522137)*x[1]+(-0.535474623489)*x[2]**o+(-0.12341743885)*x[2]
-        arg[3,4,2,0]=(0.488090753426)*x[0]**o+(-0.352417078372)*x[0]+(0.971988099319)*x[1]**o+(-0.288929516009)*x[1]+(0.612576734094)*x[2]**o+(-0.43799514603)*x[2]
-        arg[3,4,2,1]=(-0.098768101356)*x[0]**o+(0.123300661895)*x[0]+(-0.0489724280789)*x[1]**o+(-0.422508669137)*x[1]+(-0.861483104139)*x[2]**o+(0.950198316001)*x[2]
-        ref[0,0,0,0]=(0.287160004495)*x_ref[0]**o+(0.35112250158)*x_ref[0]+(0.061693427026)*x_ref[1]**o+(-0.752505628029)*x_ref[1]+(-0.57137756028)*x_ref[2]**o+(-0.0397598892504)*x_ref[2]
-        ref[0,0,0,1]=(0.272799584607)*x_ref[0]**o+(-0.569947956933)*x_ref[0]+(0.322189261657)*x_ref[1]**o+(-0.440552272224)*x_ref[1]+(-0.10460241481)*x_ref[2]**o+(-0.884848984752)*x_ref[2]
-        ref[0,0,1,0]=(0.147766301604)*x_ref[0]**o+(0.405651654428)*x_ref[0]+(-0.440827209529)*x_ref[1]**o+(-0.399952864271)*x_ref[1]+(-0.770191009459)*x_ref[2]**o+(-0.789853968049)*x_ref[2]
-        ref[0,0,1,1]=(0.688053165375)*x_ref[0]**o+(-0.154890421924)*x_ref[0]+(0.583684164319)*x_ref[1]**o+(-0.398082068217)*x_ref[1]+(-0.573142923099)*x_ref[2]**o+(-0.205271877337)*x_ref[2]
-        ref[0,0,2,0]=(0.807043275877)*x_ref[0]**o+(0.843046383231)*x_ref[0]+(-0.588146471402)*x_ref[1]**o+(0.157787304557)*x_ref[1]+(-0.771009748568)*x_ref[2]**o+(0.162090791609)*x_ref[2]
-        ref[0,0,2,1]=(-0.0706800489392)*x_ref[0]**o+(0.499961344665)*x_ref[0]+(0.208926178797)*x_ref[1]**o+(-0.7462472769)*x_ref[1]+(-0.105475405648)*x_ref[2]**o+(-0.18670229948)*x_ref[2]
-        ref[0,1,0,0]=(-0.696657281943)*x_ref[0]**o+(-0.0251785345759)*x_ref[0]+(-0.579575530451)*x_ref[1]**o+(-0.0628378665725)*x_ref[1]+(0.668395441302)*x_ref[2]**o+(0.813478105092)*x_ref[2]
-        ref[0,1,0,1]=(-0.574784314876)*x_ref[0]**o+(-0.321268045204)*x_ref[0]+(0.160704464213)*x_ref[1]**o+(-0.676016748103)*x_ref[1]+(0.918971102865)*x_ref[2]**o+(0.252082410081)*x_ref[2]
-        ref[0,1,1,0]=(-0.905062846817)*x_ref[0]**o+(0.788906658477)*x_ref[0]+(-0.408807611936)*x_ref[1]**o+(0.114686186437)*x_ref[1]+(-0.654685568493)*x_ref[2]**o+(0.0879202139254)*x_ref[2]
-        ref[0,1,1,1]=(-0.68020231443)*x_ref[0]**o+(-0.82049202902)*x_ref[0]+(-0.958352740187)*x_ref[1]**o+(-0.33201745802)*x_ref[1]+(0.539810363682)*x_ref[2]**o+(0.744988573087)*x_ref[2]
-        ref[0,1,2,0]=(-0.960884744997)*x_ref[0]**o+(-0.704157132503)*x_ref[0]+(0.282236905414)*x_ref[1]**o+(0.756363456433)*x_ref[1]+(-0.365400101792)*x_ref[2]**o+(0.975735846554)*x_ref[2]
-        ref[0,1,2,1]=(-0.691780076951)*x_ref[0]**o+(-0.952575440059)*x_ref[0]+(-0.921247808098)*x_ref[1]**o+(-0.88872834095)*x_ref[1]+(0.534103013833)*x_ref[2]**o+(-0.602295186104)*x_ref[2]
-        ref[0,2,0,0]=(0.460698415704)*x_ref[0]**o+(0.770243814897)*x_ref[0]+(-0.380381727574)*x_ref[1]**o+(0.476360845668)*x_ref[1]+(-0.681040425102)*x_ref[2]**o+(-0.244369435116)*x_ref[2]
-        ref[0,2,0,1]=(0.251591652281)*x_ref[0]**o+(0.748234919686)*x_ref[0]+(-0.698189037307)*x_ref[1]**o+(-0.292400412508)*x_ref[1]+(0.613850696577)*x_ref[2]**o+(-0.942243226834)*x_ref[2]
-        ref[0,2,1,0]=(-0.718090066328)*x_ref[0]**o+(-0.322499511794)*x_ref[0]+(-0.75105623397)*x_ref[1]**o+(0.526680271832)*x_ref[1]+(-0.186671531793)*x_ref[2]**o+(-0.449273875991)*x_ref[2]
-        ref[0,2,1,1]=(-0.52165552452)*x_ref[0]**o+(0.902446006085)*x_ref[0]+(-0.915575172702)*x_ref[1]**o+(-0.150816194662)*x_ref[1]+(0.596782785689)*x_ref[2]**o+(0.546880865642)*x_ref[2]
-        ref[0,2,2,0]=(-0.104486704816)*x_ref[0]**o+(0.723863699457)*x_ref[0]+(0.758622117279)*x_ref[1]**o+(0.372271580145)*x_ref[1]+(-0.0820570383792)*x_ref[2]**o+(-0.63539781104)*x_ref[2]
-        ref[0,2,2,1]=(0.0355930823603)*x_ref[0]**o+(0.0931942600432)*x_ref[0]+(-0.118096985978)*x_ref[1]**o+(0.296983782212)*x_ref[1]+(-0.864491763712)*x_ref[2]**o+(0.942230663978)*x_ref[2]
-        ref[0,3,0,0]=(0.371153709815)*x_ref[0]**o+(0.0427309083893)*x_ref[0]+(-0.886563919084)*x_ref[1]**o+(-0.14946513404)*x_ref[1]+(0.80903804519)*x_ref[2]**o+(0.69728533073)*x_ref[2]
-        ref[0,3,0,1]=(0.0593930396142)*x_ref[0]**o+(-0.370327974089)*x_ref[0]+(-0.388354464683)*x_ref[1]**o+(-0.367648771812)*x_ref[1]+(-0.573754821458)*x_ref[2]**o+(-0.947499155479)*x_ref[2]
-        ref[0,3,1,0]=(-0.869817317)*x_ref[0]**o+(0.874317772678)*x_ref[0]+(-0.870060178375)*x_ref[1]**o+(0.66571074524)*x_ref[1]+(-0.669052377378)*x_ref[2]**o+(0.940212680575)*x_ref[2]
-        ref[0,3,1,1]=(-0.417445606772)*x_ref[0]**o+(0.942606057619)*x_ref[0]+(-0.133936034409)*x_ref[1]**o+(-0.363274280866)*x_ref[1]+(0.83487439935)*x_ref[2]**o+(-0.108398981461)*x_ref[2]
-        ref[0,3,2,0]=(0.363623383293)*x_ref[0]**o+(0.624267309217)*x_ref[0]+(0.801719984899)*x_ref[1]**o+(0.189212370122)*x_ref[1]+(0.464633630928)*x_ref[2]**o+(-0.979808318438)*x_ref[2]
-        ref[0,3,2,1]=(0.85384408805)*x_ref[0]**o+(-0.889214754116)*x_ref[0]+(0.164915391224)*x_ref[1]**o+(0.0168991405201)*x_ref[1]+(0.097171994236)*x_ref[2]**o+(-0.146094197339)*x_ref[2]
-        ref[0,4,0,0]=(0.778356158972)*x_ref[0]**o+(0.910241265149)*x_ref[0]+(0.123690863272)*x_ref[1]**o+(0.87802121779)*x_ref[1]+(-0.714615668595)*x_ref[2]**o+(-0.437472831583)*x_ref[2]
-        ref[0,4,0,1]=(-0.157185481783)*x_ref[0]**o+(0.352802163968)*x_ref[0]+(0.390184123612)*x_ref[1]**o+(-0.680415093098)*x_ref[1]+(-0.121195042454)*x_ref[2]**o+(-0.713693712117)*x_ref[2]
-        ref[0,4,1,0]=(0.778115668646)*x_ref[0]**o+(-0.111729042892)*x_ref[0]+(0.451518002735)*x_ref[1]**o+(0.232731183374)*x_ref[1]+(-0.764246158086)*x_ref[2]**o+(-0.795525155328)*x_ref[2]
-        ref[0,4,1,1]=(-0.880652367027)*x_ref[0]**o+(-0.314966079126)*x_ref[0]+(-0.640720373065)*x_ref[1]**o+(0.336230541901)*x_ref[1]+(0.566956999526)*x_ref[2]**o+(0.74098258811)*x_ref[2]
-        ref[0,4,2,0]=(0.908657274301)*x_ref[0]**o+(0.636427823614)*x_ref[0]+(0.650137414386)*x_ref[1]**o+(0.695558379005)*x_ref[1]+(-0.489852401087)*x_ref[2]**o+(-0.479227108044)*x_ref[2]
-        ref[0,4,2,1]=(0.015734241525)*x_ref[0]**o+(0.0719884727088)*x_ref[0]+(0.811864895261)*x_ref[1]**o+(0.959127986784)*x_ref[1]+(-0.238146663368)*x_ref[2]**o+(-0.454939322571)*x_ref[2]
-        ref[1,0,0,0]=(-0.918218246559)*x_ref[0]**o+(-0.662787169269)*x_ref[0]+(-0.954035144111)*x_ref[1]**o+(-0.647264685228)*x_ref[1]+(-0.834085960213)*x_ref[2]**o+(-0.167541951024)*x_ref[2]
-        ref[1,0,0,1]=(-0.670950869382)*x_ref[0]**o+(0.826472159989)*x_ref[0]+(0.180410872786)*x_ref[1]**o+(-0.715162871594)*x_ref[1]+(0.653287853169)*x_ref[2]**o+(0.892060529625)*x_ref[2]
-        ref[1,0,1,0]=(0.398789786407)*x_ref[0]**o+(0.689408033554)*x_ref[0]+(0.124338245128)*x_ref[1]**o+(0.748280808587)*x_ref[1]+(0.418357122274)*x_ref[2]**o+(0.230707440075)*x_ref[2]
-        ref[1,0,1,1]=(-0.912778964055)*x_ref[0]**o+(0.904288708694)*x_ref[0]+(-0.874744856901)*x_ref[1]**o+(0.550162195719)*x_ref[1]+(-0.7526423373)*x_ref[2]**o+(0.820993231654)*x_ref[2]
-        ref[1,0,2,0]=(-0.843459684648)*x_ref[0]**o+(-0.579708764091)*x_ref[0]+(-0.876072131849)*x_ref[1]**o+(0.933694599696)*x_ref[1]+(0.507781209021)*x_ref[2]**o+(-0.719729482133)*x_ref[2]
-        ref[1,0,2,1]=(0.594566925796)*x_ref[0]**o+(-0.994301292358)*x_ref[0]+(0.808114389564)*x_ref[1]**o+(-0.970803712864)*x_ref[1]+(0.433544910389)*x_ref[2]**o+(0.260659440299)*x_ref[2]
-        ref[1,1,0,0]=(0.997377553172)*x_ref[0]**o+(0.458428616383)*x_ref[0]+(0.357280778493)*x_ref[1]**o+(0.349837110741)*x_ref[1]+(-0.709592214445)*x_ref[2]**o+(-0.630000739033)*x_ref[2]
-        ref[1,1,0,1]=(0.121595650501)*x_ref[0]**o+(0.40870120924)*x_ref[0]+(0.576917123807)*x_ref[1]**o+(-0.932268308325)*x_ref[1]+(0.710043472116)*x_ref[2]**o+(-0.716528412077)*x_ref[2]
-        ref[1,1,1,0]=(-0.151416035033)*x_ref[0]**o+(0.0255347649787)*x_ref[0]+(-0.752987701889)*x_ref[1]**o+(-0.480969875813)*x_ref[1]+(-0.610514504179)*x_ref[2]**o+(0.959274757402)*x_ref[2]
-        ref[1,1,1,1]=(0.76695706106)*x_ref[0]**o+(-0.0750965975512)*x_ref[0]+(0.846833900735)*x_ref[1]**o+(-0.105838465439)*x_ref[1]+(0.541027486457)*x_ref[2]**o+(0.152543017589)*x_ref[2]
-        ref[1,1,2,0]=(0.0856977181865)*x_ref[0]**o+(-0.188139369706)*x_ref[0]+(0.936071565289)*x_ref[1]**o+(-0.3958713036)*x_ref[1]+(-0.350945878893)*x_ref[2]**o+(0.382302674883)*x_ref[2]
-        ref[1,1,2,1]=(0.873054234789)*x_ref[0]**o+(-0.490869716146)*x_ref[0]+(0.46720526212)*x_ref[1]**o+(-0.334203412334)*x_ref[1]+(-0.81140895636)*x_ref[2]**o+(-0.973858971749)*x_ref[2]
-        ref[1,2,0,0]=(-0.716676352443)*x_ref[0]**o+(0.659821396277)*x_ref[0]+(0.335964292954)*x_ref[1]**o+(0.11609664773)*x_ref[1]+(-0.889186749466)*x_ref[2]**o+(0.454231973946)*x_ref[2]
-        ref[1,2,0,1]=(0.367048872648)*x_ref[0]**o+(0.276083713126)*x_ref[0]+(0.686639128043)*x_ref[1]**o+(-0.991414415293)*x_ref[1]+(0.25360515964)*x_ref[2]**o+(-0.377623315093)*x_ref[2]
-        ref[1,2,1,0]=(-0.723089358777)*x_ref[0]**o+(-0.516690112406)*x_ref[0]+(0.262334273979)*x_ref[1]**o+(0.140773502537)*x_ref[1]+(0.447333972396)*x_ref[2]**o+(-0.551395692966)*x_ref[2]
-        ref[1,2,1,1]=(0.738791182491)*x_ref[0]**o+(-0.978120626668)*x_ref[0]+(-0.217970433713)*x_ref[1]**o+(0.0181011067492)*x_ref[1]+(0.756322867523)*x_ref[2]**o+(0.495269195978)*x_ref[2]
-        ref[1,2,2,0]=(-0.630506449854)*x_ref[0]**o+(-0.0865482364231)*x_ref[0]+(-0.415896403157)*x_ref[1]**o+(-0.712833149895)*x_ref[1]+(-0.180482789777)*x_ref[2]**o+(0.00788290661235)*x_ref[2]
-        ref[1,2,2,1]=(0.0946913865377)*x_ref[0]**o+(0.752854827716)*x_ref[0]+(0.257846220843)*x_ref[1]**o+(-0.953926983578)*x_ref[1]+(-0.388505920682)*x_ref[2]**o+(-0.10751401251)*x_ref[2]
-        ref[1,3,0,0]=(0.694014030611)*x_ref[0]**o+(0.0433103547797)*x_ref[0]+(-0.0805025225569)*x_ref[1]**o+(0.389052254754)*x_ref[1]+(-0.813210939614)*x_ref[2]**o+(-0.593788787896)*x_ref[2]
-        ref[1,3,0,1]=(0.0101606353406)*x_ref[0]**o+(-0.849874258855)*x_ref[0]+(-0.0578973959381)*x_ref[1]**o+(0.942113140424)*x_ref[1]+(0.613716459216)*x_ref[2]**o+(0.72631176833)*x_ref[2]
-        ref[1,3,1,0]=(0.264703608811)*x_ref[0]**o+(0.457962548326)*x_ref[0]+(-0.433795242673)*x_ref[1]**o+(0.650995712848)*x_ref[1]+(0.372471807967)*x_ref[2]**o+(0.00416636841047)*x_ref[2]
-        ref[1,3,1,1]=(-0.73686451669)*x_ref[0]**o+(-0.0425614910776)*x_ref[0]+(-0.587820431311)*x_ref[1]**o+(-0.377628617833)*x_ref[1]+(-0.463964014406)*x_ref[2]**o+(0.283273874989)*x_ref[2]
-        ref[1,3,2,0]=(-0.689341439143)*x_ref[0]**o+(-0.675861918889)*x_ref[0]+(-0.918622662352)*x_ref[1]**o+(0.740990261888)*x_ref[1]+(0.0454007677041)*x_ref[2]**o+(0.513623361074)*x_ref[2]
-        ref[1,3,2,1]=(0.13229101848)*x_ref[0]**o+(0.171873799817)*x_ref[0]+(-0.154491174434)*x_ref[1]**o+(0.897976884089)*x_ref[1]+(-0.598886311821)*x_ref[2]**o+(0.738696710918)*x_ref[2]
-        ref[1,4,0,0]=(0.59403636966)*x_ref[0]**o+(0.93856848969)*x_ref[0]+(0.80164849167)*x_ref[1]**o+(-0.753322979568)*x_ref[1]+(-0.107098073916)*x_ref[2]**o+(-0.623047487973)*x_ref[2]
-        ref[1,4,0,1]=(0.291046099082)*x_ref[0]**o+(-0.437982471049)*x_ref[0]+(0.017395762947)*x_ref[1]**o+(0.852440593923)*x_ref[1]+(0.630825424359)*x_ref[2]**o+(0.419347491727)*x_ref[2]
-        ref[1,4,1,0]=(-0.747962012701)*x_ref[0]**o+(-0.11622032094)*x_ref[0]+(0.324950549781)*x_ref[1]**o+(0.950911398327)*x_ref[1]+(-0.18098990205)*x_ref[2]**o+(-0.676060633522)*x_ref[2]
-        ref[1,4,1,1]=(0.545224363128)*x_ref[0]**o+(0.753376367121)*x_ref[0]+(0.271426695753)*x_ref[1]**o+(-0.139309844675)*x_ref[1]+(-0.923434716375)*x_ref[2]**o+(-0.985988324389)*x_ref[2]
-        ref[1,4,2,0]=(-0.532260822047)*x_ref[0]**o+(0.901407135724)*x_ref[0]+(0.937451330141)*x_ref[1]**o+(0.285217666559)*x_ref[1]+(-0.133028984824)*x_ref[2]**o+(0.993965133696)*x_ref[2]
-        ref[1,4,2,1]=(0.2231815607)*x_ref[0]**o+(0.994845537582)*x_ref[0]+(0.0368727378195)*x_ref[1]**o+(0.511772933777)*x_ref[1]+(-0.871580215976)*x_ref[2]**o+(-0.587010057329)*x_ref[2]
-        ref[2,0,0,0]=(-0.55149411913)*x_ref[0]**o+(-0.905541278559)*x_ref[0]+(0.461217373096)*x_ref[1]**o+(-0.53359853241)*x_ref[1]+(-0.666643290883)*x_ref[2]**o+(0.151495826926)*x_ref[2]
-        ref[2,0,0,1]=(-0.980485062148)*x_ref[0]**o+(0.150165616162)*x_ref[0]+(0.59165725487)*x_ref[1]**o+(-0.243853536017)*x_ref[1]+(0.66816261686)*x_ref[2]**o+(0.2425696131)*x_ref[2]
-        ref[2,0,1,0]=(-0.509337213758)*x_ref[0]**o+(0.652936706687)*x_ref[0]+(-0.849214338091)*x_ref[1]**o+(-0.523354123549)*x_ref[1]+(0.371515689887)*x_ref[2]**o+(0.799989815414)*x_ref[2]
-        ref[2,0,1,1]=(0.461584544541)*x_ref[0]**o+(0.662931355954)*x_ref[0]+(0.744415634786)*x_ref[1]**o+(-0.016743801256)*x_ref[1]+(0.172945846325)*x_ref[2]**o+(-0.0889827089341)*x_ref[2]
-        ref[2,0,2,0]=(0.506514791562)*x_ref[0]**o+(0.974477160694)*x_ref[0]+(-0.968485343167)*x_ref[1]**o+(0.427480013599)*x_ref[1]+(0.0460755879358)*x_ref[2]**o+(0.186500994948)*x_ref[2]
-        ref[2,0,2,1]=(0.259831607993)*x_ref[0]**o+(-0.0141290444125)*x_ref[0]+(-0.968452177682)*x_ref[1]**o+(0.635619125009)*x_ref[1]+(-0.958848431827)*x_ref[2]**o+(-0.0977241523308)*x_ref[2]
-        ref[2,1,0,0]=(0.204233222933)*x_ref[0]**o+(0.834739381877)*x_ref[0]+(0.19961185048)*x_ref[1]**o+(-0.238470380578)*x_ref[1]+(-0.749979713773)*x_ref[2]**o+(-0.268168886251)*x_ref[2]
-        ref[2,1,0,1]=(0.998123643088)*x_ref[0]**o+(0.635823733041)*x_ref[0]+(-0.265447124419)*x_ref[1]**o+(-0.225582751946)*x_ref[1]+(0.91705937439)*x_ref[2]**o+(-0.739461510792)*x_ref[2]
-        ref[2,1,1,0]=(0.0800715288646)*x_ref[0]**o+(-0.37677196659)*x_ref[0]+(-0.0737286350219)*x_ref[1]**o+(0.032076062933)*x_ref[1]+(0.245421912709)*x_ref[2]**o+(-0.8378023935)*x_ref[2]
-        ref[2,1,1,1]=(-0.572376055603)*x_ref[0]**o+(0.8675468469)*x_ref[0]+(-0.533012889867)*x_ref[1]**o+(-0.247215658297)*x_ref[1]+(0.673144564693)*x_ref[2]**o+(-0.749136108985)*x_ref[2]
-        ref[2,1,2,0]=(-0.661188192488)*x_ref[0]**o+(-0.924435593008)*x_ref[0]+(-0.791845808916)*x_ref[1]**o+(0.00133765351092)*x_ref[1]+(0.233676862873)*x_ref[2]**o+(0.981812737962)*x_ref[2]
-        ref[2,1,2,1]=(0.332072445986)*x_ref[0]**o+(-0.909373798588)*x_ref[0]+(0.927025647819)*x_ref[1]**o+(-0.936348942617)*x_ref[1]+(0.251508592152)*x_ref[2]**o+(-0.468147973987)*x_ref[2]
-        ref[2,2,0,0]=(0.892377893841)*x_ref[0]**o+(-0.147933293091)*x_ref[0]+(0.950491102076)*x_ref[1]**o+(0.595250355926)*x_ref[1]+(0.0169764649992)*x_ref[2]**o+(-0.683137752586)*x_ref[2]
-        ref[2,2,0,1]=(0.00579397005645)*x_ref[0]**o+(0.627197373917)*x_ref[0]+(0.663574756196)*x_ref[1]**o+(0.934106767513)*x_ref[1]+(0.105844878022)*x_ref[2]**o+(0.513322917688)*x_ref[2]
-        ref[2,2,1,0]=(-0.168776016133)*x_ref[0]**o+(-0.940071612944)*x_ref[0]+(0.0366053554566)*x_ref[1]**o+(-0.628010909771)*x_ref[1]+(0.250023045906)*x_ref[2]**o+(-0.00327322332166)*x_ref[2]
-        ref[2,2,1,1]=(0.904155764376)*x_ref[0]**o+(-0.258018307306)*x_ref[0]+(0.65862820521)*x_ref[1]**o+(0.434480798515)*x_ref[1]+(0.4089419173)*x_ref[2]**o+(-0.518032695598)*x_ref[2]
-        ref[2,2,2,0]=(-0.41470070958)*x_ref[0]**o+(-0.783186751952)*x_ref[0]+(0.548309561942)*x_ref[1]**o+(0.837130592803)*x_ref[1]+(-0.346808491848)*x_ref[2]**o+(0.165416040985)*x_ref[2]
-        ref[2,2,2,1]=(0.997845909195)*x_ref[0]**o+(0.448428042158)*x_ref[0]+(-0.657050004311)*x_ref[1]**o+(0.493104851747)*x_ref[1]+(0.558315071197)*x_ref[2]**o+(0.206659432923)*x_ref[2]
-        ref[2,3,0,0]=(0.433874360232)*x_ref[0]**o+(-0.0635646197131)*x_ref[0]+(-0.521690521523)*x_ref[1]**o+(-0.298130684888)*x_ref[1]+(-0.131905313644)*x_ref[2]**o+(0.64389451112)*x_ref[2]
-        ref[2,3,0,1]=(0.457729315216)*x_ref[0]**o+(-0.419323242135)*x_ref[0]+(0.614544051135)*x_ref[1]**o+(-0.701671999275)*x_ref[1]+(0.905494300727)*x_ref[2]**o+(-0.565716985337)*x_ref[2]
-        ref[2,3,1,0]=(0.256570728097)*x_ref[0]**o+(0.866349285103)*x_ref[0]+(-0.115768354896)*x_ref[1]**o+(-0.613044456549)*x_ref[1]+(-0.20074185156)*x_ref[2]**o+(-0.188403571776)*x_ref[2]
-        ref[2,3,1,1]=(0.767479943414)*x_ref[0]**o+(0.884066215007)*x_ref[0]+(0.363855420056)*x_ref[1]**o+(0.919698981104)*x_ref[1]+(0.225747762317)*x_ref[2]**o+(-0.220362271104)*x_ref[2]
-        ref[2,3,2,0]=(-0.746469501382)*x_ref[0]**o+(0.680520398001)*x_ref[0]+(0.926950996325)*x_ref[1]**o+(-0.122831303044)*x_ref[1]+(-0.27226561675)*x_ref[2]**o+(0.933304087951)*x_ref[2]
-        ref[2,3,2,1]=(-0.0961434747216)*x_ref[0]**o+(0.987660516767)*x_ref[0]+(0.288175205045)*x_ref[1]**o+(0.683720820403)*x_ref[1]+(0.354403143642)*x_ref[2]**o+(-0.745694089132)*x_ref[2]
-        ref[2,4,0,0]=(0.921750835986)*x_ref[0]**o+(-0.0358861598394)*x_ref[0]+(0.190129645259)*x_ref[1]**o+(0.377067803331)*x_ref[1]+(-0.0188615236582)*x_ref[2]**o+(0.804533888824)*x_ref[2]
-        ref[2,4,0,1]=(-0.256132234484)*x_ref[0]**o+(-0.102661411017)*x_ref[0]+(-0.903465157009)*x_ref[1]**o+(0.50133310168)*x_ref[1]+(-0.0889102598619)*x_ref[2]**o+(-0.0310174238365)*x_ref[2]
-        ref[2,4,1,0]=(0.58483798855)*x_ref[0]**o+(0.967943344305)*x_ref[0]+(-0.0701080005438)*x_ref[1]**o+(0.489476104406)*x_ref[1]+(0.615308427038)*x_ref[2]**o+(-0.38065505709)*x_ref[2]
-        ref[2,4,1,1]=(0.647734130724)*x_ref[0]**o+(-0.930934392719)*x_ref[0]+(0.267370540491)*x_ref[1]**o+(-0.0175019424556)*x_ref[1]+(0.38593657129)*x_ref[2]**o+(-0.985922292359)*x_ref[2]
-        ref[2,4,2,0]=(-0.289971479933)*x_ref[0]**o+(0.882014313157)*x_ref[0]+(0.147321067579)*x_ref[1]**o+(-0.176771838489)*x_ref[1]+(0.710916531544)*x_ref[2]**o+(-0.0856290170401)*x_ref[2]
-        ref[2,4,2,1]=(-0.465930997733)*x_ref[0]**o+(-0.305563942094)*x_ref[0]+(-0.824535262061)*x_ref[1]**o+(-0.917892226972)*x_ref[1]+(0.624462871955)*x_ref[2]**o+(0.544736500065)*x_ref[2]
-        ref[3,0,0,0]=(-0.673230815097)*x_ref[0]**o+(-0.726292712917)*x_ref[0]+(0.0531037021688)*x_ref[1]**o+(-0.467219030159)*x_ref[1]+(-0.0729861369718)*x_ref[2]**o+(-0.440394335015)*x_ref[2]
-        ref[3,0,0,1]=(-0.358235295558)*x_ref[0]**o+(-0.301184713671)*x_ref[0]+(-0.496030649086)*x_ref[1]**o+(-0.125922184777)*x_ref[1]+(0.946715036973)*x_ref[2]**o+(0.846370337893)*x_ref[2]
-        ref[3,0,1,0]=(-0.394175109612)*x_ref[0]**o+(-0.85137582307)*x_ref[0]+(-0.667804785044)*x_ref[1]**o+(0.156762109891)*x_ref[1]+(-0.616444700525)*x_ref[2]**o+(0.0738729399356)*x_ref[2]
-        ref[3,0,1,1]=(-0.652875462534)*x_ref[0]**o+(-0.0605650192541)*x_ref[0]+(0.840539933823)*x_ref[1]**o+(-0.422819423301)*x_ref[1]+(0.113440226819)*x_ref[2]**o+(-0.915154532306)*x_ref[2]
-        ref[3,0,2,0]=(-0.162863352328)*x_ref[0]**o+(-0.364461332292)*x_ref[0]+(-0.222181741398)*x_ref[1]**o+(-0.563668008365)*x_ref[1]+(0.118491770105)*x_ref[2]**o+(0.0809155053022)*x_ref[2]
-        ref[3,0,2,1]=(-0.985278929437)*x_ref[0]**o+(-0.919440760157)*x_ref[0]+(-0.776910686)*x_ref[1]**o+(-0.884270488943)*x_ref[1]+(0.984279010363)*x_ref[2]**o+(-0.489503278582)*x_ref[2]
-        ref[3,1,0,0]=(-0.806565449823)*x_ref[0]**o+(-0.0851385375281)*x_ref[0]+(-0.88851381773)*x_ref[1]**o+(-0.666539867528)*x_ref[1]+(0.154825531411)*x_ref[2]**o+(0.764069849144)*x_ref[2]
-        ref[3,1,0,1]=(-0.222125783918)*x_ref[0]**o+(0.568035675467)*x_ref[0]+(0.470171778932)*x_ref[1]**o+(-0.307608710881)*x_ref[1]+(-0.836083742471)*x_ref[2]**o+(0.553597553381)*x_ref[2]
-        ref[3,1,1,0]=(0.431237389847)*x_ref[0]**o+(-0.141391012471)*x_ref[0]+(0.726895025519)*x_ref[1]**o+(-0.527868751679)*x_ref[1]+(0.711761083137)*x_ref[2]**o+(0.996992864103)*x_ref[2]
-        ref[3,1,1,1]=(-0.123885959924)*x_ref[0]**o+(0.877034475529)*x_ref[0]+(-0.0432492682928)*x_ref[1]**o+(-0.370315494618)*x_ref[1]+(0.243139719071)*x_ref[2]**o+(-0.684318634902)*x_ref[2]
-        ref[3,1,2,0]=(-0.477214489355)*x_ref[0]**o+(0.340808576619)*x_ref[0]+(-0.0991802306558)*x_ref[1]**o+(0.462599821908)*x_ref[1]+(0.091768281564)*x_ref[2]**o+(0.0315552838839)*x_ref[2]
-        ref[3,1,2,1]=(0.676189142894)*x_ref[0]**o+(0.510136386913)*x_ref[0]+(-0.558579041952)*x_ref[1]**o+(0.961615047877)*x_ref[1]+(0.510717386124)*x_ref[2]**o+(0.774430183432)*x_ref[2]
-        ref[3,2,0,0]=(0.158370232444)*x_ref[0]**o+(0.209424855992)*x_ref[0]+(0.691438753013)*x_ref[1]**o+(-0.781594298738)*x_ref[1]+(-0.0188536627517)*x_ref[2]**o+(0.136400798995)*x_ref[2]
-        ref[3,2,0,1]=(-0.440674414328)*x_ref[0]**o+(0.118228612687)*x_ref[0]+(-0.700026492613)*x_ref[1]**o+(-0.981341215714)*x_ref[1]+(-0.172847519578)*x_ref[2]**o+(-0.423095202172)*x_ref[2]
-        ref[3,2,1,0]=(-0.0694960391695)*x_ref[0]**o+(-0.66448610135)*x_ref[0]+(-0.177572703748)*x_ref[1]**o+(-0.060488161727)*x_ref[1]+(0.306021853885)*x_ref[2]**o+(0.0730338716187)*x_ref[2]
-        ref[3,2,1,1]=(-0.360662154547)*x_ref[0]**o+(0.577679359648)*x_ref[0]+(-0.515313534966)*x_ref[1]**o+(0.217352687358)*x_ref[1]+(0.728367577882)*x_ref[2]**o+(0.38505849834)*x_ref[2]
-        ref[3,2,2,0]=(0.568671861232)*x_ref[0]**o+(-0.0792490917882)*x_ref[0]+(0.0188002885229)*x_ref[1]**o+(-0.956862575759)*x_ref[1]+(-0.844332442983)*x_ref[2]**o+(0.670792928042)*x_ref[2]
-        ref[3,2,2,1]=(0.833099204713)*x_ref[0]**o+(0.368482169933)*x_ref[0]+(-0.926002498892)*x_ref[1]**o+(-0.130646446568)*x_ref[1]+(0.81164928914)*x_ref[2]**o+(-0.641079919927)*x_ref[2]
-        ref[3,3,0,0]=(-0.277769350989)*x_ref[0]**o+(0.753452018649)*x_ref[0]+(-0.766322344505)*x_ref[1]**o+(-0.679108224612)*x_ref[1]+(0.0799499795424)*x_ref[2]**o+(0.255751308975)*x_ref[2]
-        ref[3,3,0,1]=(0.429176753733)*x_ref[0]**o+(0.123106050259)*x_ref[0]+(-0.169037728992)*x_ref[1]**o+(0.749245933687)*x_ref[1]+(0.560140859355)*x_ref[2]**o+(-0.937091840021)*x_ref[2]
-        ref[3,3,1,0]=(0.648792557593)*x_ref[0]**o+(-0.057555187513)*x_ref[0]+(0.883290331726)*x_ref[1]**o+(0.539276905995)*x_ref[1]+(0.473614408583)*x_ref[2]**o+(0.723258340333)*x_ref[2]
-        ref[3,3,1,1]=(0.527298833572)*x_ref[0]**o+(0.0753824058279)*x_ref[0]+(0.719196099257)*x_ref[1]**o+(-0.0124603350035)*x_ref[1]+(-0.964484650253)*x_ref[2]**o+(0.404444269694)*x_ref[2]
-        ref[3,3,2,0]=(-0.403640677462)*x_ref[0]**o+(0.906195964766)*x_ref[0]+(-0.561419078404)*x_ref[1]**o+(0.645408717838)*x_ref[1]+(0.671624799609)*x_ref[2]**o+(-0.573901868621)*x_ref[2]
-        ref[3,3,2,1]=(-0.288117182165)*x_ref[0]**o+(-0.391003584945)*x_ref[0]+(-0.555037182038)*x_ref[1]**o+(0.299362209017)*x_ref[1]+(-0.552429724326)*x_ref[2]**o+(-0.416923306774)*x_ref[2]
-        ref[3,4,0,0]=(-0.19594719192)*x_ref[0]**o+(0.150898934692)*x_ref[0]+(0.210935232044)*x_ref[1]**o+(-0.319764293347)*x_ref[1]+(-0.642450751195)*x_ref[2]**o+(0.22231085168)*x_ref[2]
-        ref[3,4,0,1]=(-0.0514589460225)*x_ref[0]**o+(0.0366025646754)*x_ref[0]+(0.416280576691)*x_ref[1]**o+(0.609178063951)*x_ref[1]+(0.835611677062)*x_ref[2]**o+(-0.131630571478)*x_ref[2]
-        ref[3,4,1,0]=(0.171509152214)*x_ref[0]**o+(-0.761188271093)*x_ref[0]+(-0.915951802896)*x_ref[1]**o+(-0.451796709915)*x_ref[1]+(-0.979847828162)*x_ref[2]**o+(0.0566453393315)*x_ref[2]
-        ref[3,4,1,1]=(0.690427998102)*x_ref[0]**o+(-0.358318625695)*x_ref[0]+(0.330270871613)*x_ref[1]**o+(-0.724392522137)*x_ref[1]+(-0.535474623489)*x_ref[2]**o+(-0.12341743885)*x_ref[2]
-        ref[3,4,2,0]=(0.488090753426)*x_ref[0]**o+(-0.352417078372)*x_ref[0]+(0.971988099319)*x_ref[1]**o+(-0.288929516009)*x_ref[1]+(0.612576734094)*x_ref[2]**o+(-0.43799514603)*x_ref[2]
-        ref[3,4,2,1]=(-0.098768101356)*x_ref[0]**o+(0.123300661895)*x_ref[0]+(-0.0489724280789)*x_ref[1]**o+(-0.422508669137)*x_ref[1]+(-0.861483104139)*x_ref[2]**o+(0.950198316001)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.724373964817)*x[0]**o+(-0.0560850774901)*x[0]+(0.201815078281)*x[1]**o+(-0.721683697048)*x[1]
-        ref=(0.724373964817)*x_ref[0]**o+(-0.0560850774901)*x_ref[0]+(0.201815078281)*x_ref[1]**o+(-0.721683697048)*x_ref[1]
-      else:
-        arg=(0.390296010052)*x[0]**o+(-0.279464234123)*x[0]+(-0.791334947488)*x[1]**o+(-0.0210629346704)*x[1]+(0.0816556526012)*x[2]**o+(0.77326269137)*x[2]
-        ref=(0.390296010052)*x_ref[0]**o+(-0.279464234123)*x_ref[0]+(-0.791334947488)*x_ref[1]**o+(-0.0210629346704)*x_ref[1]+(0.0816556526012)*x_ref[2]**o+(0.77326269137)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.645585823917)*x[0]**o+(-0.203443728436)*x[0]+(0.278126891692)*x[1]**o+(0.922093564911)*x[1]
-        arg[1]=(0.23370137029)*x[0]**o+(0.84371173541)*x[0]+(0.99297574548)*x[1]**o+(0.72481785931)*x[1]
-        ref[0]=(0.645585823917)*x_ref[0]**o+(-0.203443728436)*x_ref[0]+(0.278126891692)*x_ref[1]**o+(0.922093564911)*x_ref[1]
-        ref[1]=(0.23370137029)*x_ref[0]**o+(0.84371173541)*x_ref[0]+(0.99297574548)*x_ref[1]**o+(0.72481785931)*x_ref[1]
-      else:
-        arg[0]=(0.159998049951)*x[0]**o+(-0.863367327023)*x[0]+(-0.0628498246638)*x[1]**o+(0.685139358273)*x[1]+(0.783213360641)*x[2]**o+(0.397526421338)*x[2]
-        arg[1]=(0.165519279053)*x[0]**o+(-0.0936018967661)*x[0]+(0.863047696619)*x[1]**o+(0.653118186434)*x[1]+(-0.408224131944)*x[2]**o+(0.82400132854)*x[2]
-        ref[0]=(0.159998049951)*x_ref[0]**o+(-0.863367327023)*x_ref[0]+(-0.0628498246638)*x_ref[1]**o+(0.685139358273)*x_ref[1]+(0.783213360641)*x_ref[2]**o+(0.397526421338)*x_ref[2]
-        ref[1]=(0.165519279053)*x_ref[0]**o+(-0.0936018967661)*x_ref[0]+(0.863047696619)*x_ref[1]**o+(0.653118186434)*x_ref[1]+(-0.408224131944)*x_ref[2]**o+(0.82400132854)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.490709482882)*x[0]**o+(0.518382584887)*x[0]+(-0.940707425885)*x[1]**o+(0.224578726673)*x[1]
-        arg[0,1]=(-0.747621141516)*x[0]**o+(-0.217452489097)*x[0]+(0.929120128008)*x[1]**o+(0.55263700209)*x[1]
-        arg[0,2]=(-0.183545119672)*x[0]**o+(0.148192386895)*x[0]+(-0.22046309708)*x[1]**o+(0.433620446668)*x[1]
-        arg[0,3]=(-0.0724840266959)*x[0]**o+(0.835144620602)*x[0]+(-0.962971534144)*x[1]**o+(-0.149681811534)*x[1]
-        arg[0,4]=(-0.380150192228)*x[0]**o+(-0.309494603814)*x[0]+(-0.217425635182)*x[1]**o+(0.93567286482)*x[1]
-        arg[1,0]=(0.0367921563947)*x[0]**o+(0.220217625576)*x[0]+(-0.120595819238)*x[1]**o+(0.308108793279)*x[1]
-        arg[1,1]=(-0.142860237109)*x[0]**o+(-0.789758888253)*x[0]+(0.748085258229)*x[1]**o+(0.784767485883)*x[1]
-        arg[1,2]=(-0.154690818845)*x[0]**o+(-0.678458370784)*x[0]+(0.750742996193)*x[1]**o+(-0.350199095531)*x[1]
-        arg[1,3]=(-0.893295215013)*x[0]**o+(0.0295805814985)*x[0]+(0.265893730887)*x[1]**o+(0.435487860418)*x[1]
-        arg[1,4]=(-0.302701704727)*x[0]**o+(0.618274652266)*x[0]+(-0.688386407308)*x[1]**o+(-0.832515064466)*x[1]
-        arg[2,0]=(-0.926658745469)*x[0]**o+(0.548174350496)*x[0]+(-0.350700366641)*x[1]**o+(0.530188602011)*x[1]
-        arg[2,1]=(0.900965385167)*x[0]**o+(0.0234051845124)*x[0]+(-0.00783834941699)*x[1]**o+(-0.766352156598)*x[1]
-        arg[2,2]=(0.694733282444)*x[0]**o+(-0.0644519234093)*x[0]+(0.0493475528391)*x[1]**o+(-0.589101546403)*x[1]
-        arg[2,3]=(-0.100333102737)*x[0]**o+(-0.633740106784)*x[0]+(0.408697826034)*x[1]**o+(-0.429059439472)*x[1]
-        arg[2,4]=(0.635563324404)*x[0]**o+(0.955881346028)*x[0]+(0.0755013269452)*x[1]**o+(-0.743681282337)*x[1]
-        arg[3,0]=(0.604891134834)*x[0]**o+(0.942047409702)*x[0]+(-0.00544373299112)*x[1]**o+(0.447523533166)*x[1]
-        arg[3,1]=(-0.980967446837)*x[0]**o+(0.019824933239)*x[0]+(-0.826876930392)*x[1]**o+(0.113548968693)*x[1]
-        arg[3,2]=(-0.731417395373)*x[0]**o+(-0.275072472108)*x[0]+(0.933867711492)*x[1]**o+(-0.444847972819)*x[1]
-        arg[3,3]=(0.00121172413626)*x[0]**o+(-0.171073908218)*x[0]+(0.913182873344)*x[1]**o+(0.960256570926)*x[1]
-        arg[3,4]=(-0.395134372727)*x[0]**o+(0.646385082409)*x[0]+(0.17387019219)*x[1]**o+(-0.287550462397)*x[1]
-        ref[0,0]=(0.490709482882)*x_ref[0]**o+(0.518382584887)*x_ref[0]+(-0.940707425885)*x_ref[1]**o+(0.224578726673)*x_ref[1]
-        ref[0,1]=(-0.747621141516)*x_ref[0]**o+(-0.217452489097)*x_ref[0]+(0.929120128008)*x_ref[1]**o+(0.55263700209)*x_ref[1]
-        ref[0,2]=(-0.183545119672)*x_ref[0]**o+(0.148192386895)*x_ref[0]+(-0.22046309708)*x_ref[1]**o+(0.433620446668)*x_ref[1]
-        ref[0,3]=(-0.0724840266959)*x_ref[0]**o+(0.835144620602)*x_ref[0]+(-0.962971534144)*x_ref[1]**o+(-0.149681811534)*x_ref[1]
-        ref[0,4]=(-0.380150192228)*x_ref[0]**o+(-0.309494603814)*x_ref[0]+(-0.217425635182)*x_ref[1]**o+(0.93567286482)*x_ref[1]
-        ref[1,0]=(0.0367921563947)*x_ref[0]**o+(0.220217625576)*x_ref[0]+(-0.120595819238)*x_ref[1]**o+(0.308108793279)*x_ref[1]
-        ref[1,1]=(-0.142860237109)*x_ref[0]**o+(-0.789758888253)*x_ref[0]+(0.748085258229)*x_ref[1]**o+(0.784767485883)*x_ref[1]
-        ref[1,2]=(-0.154690818845)*x_ref[0]**o+(-0.678458370784)*x_ref[0]+(0.750742996193)*x_ref[1]**o+(-0.350199095531)*x_ref[1]
-        ref[1,3]=(-0.893295215013)*x_ref[0]**o+(0.0295805814985)*x_ref[0]+(0.265893730887)*x_ref[1]**o+(0.435487860418)*x_ref[1]
-        ref[1,4]=(-0.302701704727)*x_ref[0]**o+(0.618274652266)*x_ref[0]+(-0.688386407308)*x_ref[1]**o+(-0.832515064466)*x_ref[1]
-        ref[2,0]=(-0.926658745469)*x_ref[0]**o+(0.548174350496)*x_ref[0]+(-0.350700366641)*x_ref[1]**o+(0.530188602011)*x_ref[1]
-        ref[2,1]=(0.900965385167)*x_ref[0]**o+(0.0234051845124)*x_ref[0]+(-0.00783834941699)*x_ref[1]**o+(-0.766352156598)*x_ref[1]
-        ref[2,2]=(0.694733282444)*x_ref[0]**o+(-0.0644519234093)*x_ref[0]+(0.0493475528391)*x_ref[1]**o+(-0.589101546403)*x_ref[1]
-        ref[2,3]=(-0.100333102737)*x_ref[0]**o+(-0.633740106784)*x_ref[0]+(0.408697826034)*x_ref[1]**o+(-0.429059439472)*x_ref[1]
-        ref[2,4]=(0.635563324404)*x_ref[0]**o+(0.955881346028)*x_ref[0]+(0.0755013269452)*x_ref[1]**o+(-0.743681282337)*x_ref[1]
-        ref[3,0]=(0.604891134834)*x_ref[0]**o+(0.942047409702)*x_ref[0]+(-0.00544373299112)*x_ref[1]**o+(0.447523533166)*x_ref[1]
-        ref[3,1]=(-0.980967446837)*x_ref[0]**o+(0.019824933239)*x_ref[0]+(-0.826876930392)*x_ref[1]**o+(0.113548968693)*x_ref[1]
-        ref[3,2]=(-0.731417395373)*x_ref[0]**o+(-0.275072472108)*x_ref[0]+(0.933867711492)*x_ref[1]**o+(-0.444847972819)*x_ref[1]
-        ref[3,3]=(0.00121172413626)*x_ref[0]**o+(-0.171073908218)*x_ref[0]+(0.913182873344)*x_ref[1]**o+(0.960256570926)*x_ref[1]
-        ref[3,4]=(-0.395134372727)*x_ref[0]**o+(0.646385082409)*x_ref[0]+(0.17387019219)*x_ref[1]**o+(-0.287550462397)*x_ref[1]
-      else:
-        arg[0,0]=(0.386545340192)*x[0]**o+(-0.397636296285)*x[0]+(-0.849437816516)*x[1]**o+(-0.83083406493)*x[1]+(0.479216612031)*x[2]**o+(0.0903787541308)*x[2]
-        arg[0,1]=(-0.331651855726)*x[0]**o+(0.849421626918)*x[0]+(0.528368477362)*x[1]**o+(-0.015122214824)*x[1]+(0.494310578452)*x[2]**o+(0.190239928161)*x[2]
-        arg[0,2]=(-0.662389759646)*x[0]**o+(0.204378343962)*x[0]+(0.486802744897)*x[1]**o+(0.822174784922)*x[1]+(-0.309203812647)*x[2]**o+(-0.101665040799)*x[2]
-        arg[0,3]=(0.609106341828)*x[0]**o+(0.658404088333)*x[0]+(-0.0092991120732)*x[1]**o+(-0.73794934348)*x[1]+(0.270245135914)*x[2]**o+(-0.594067838407)*x[2]
-        arg[0,4]=(-0.291752213357)*x[0]**o+(-0.596751343066)*x[0]+(-0.109196903078)*x[1]**o+(-0.868610307708)*x[1]+(0.622541308544)*x[2]**o+(0.482202762224)*x[2]
-        arg[1,0]=(-0.113988933227)*x[0]**o+(-0.846328804695)*x[0]+(0.691769553626)*x[1]**o+(-0.377441645148)*x[1]+(-0.769857970682)*x[2]**o+(-0.583083729037)*x[2]
-        arg[1,1]=(-0.635333757145)*x[0]**o+(0.194761117849)*x[0]+(-0.268287296731)*x[1]**o+(0.463906930647)*x[1]+(0.768293821029)*x[2]**o+(-0.532824906687)*x[2]
-        arg[1,2]=(0.355380090138)*x[0]**o+(-0.181191575848)*x[0]+(-0.558667766467)*x[1]**o+(0.561707671872)*x[1]+(-0.427004232725)*x[2]**o+(-0.996564299989)*x[2]
-        arg[1,3]=(-0.891638892893)*x[0]**o+(0.0867350850512)*x[0]+(0.880258390584)*x[1]**o+(-0.798123407525)*x[1]+(-0.571505202201)*x[2]**o+(0.35374245063)*x[2]
-        arg[1,4]=(0.543632496941)*x[0]**o+(-0.630363803582)*x[0]+(0.38107312058)*x[1]**o+(0.222401831883)*x[1]+(-0.932212080175)*x[2]**o+(-0.0482899826174)*x[2]
-        arg[2,0]=(0.46514308325)*x[0]**o+(-0.907464652384)*x[0]+(-0.706105595148)*x[1]**o+(0.486989958675)*x[1]+(0.422702683485)*x[2]**o+(0.640916925932)*x[2]
-        arg[2,1]=(0.912808317479)*x[0]**o+(-0.860779312763)*x[0]+(-0.915364956133)*x[1]**o+(-0.314186117224)*x[1]+(-0.860814410035)*x[2]**o+(0.837570442722)*x[2]
-        arg[2,2]=(0.00932917919464)*x[0]**o+(0.393773283049)*x[0]+(0.699998572668)*x[1]**o+(0.153407885795)*x[1]+(-0.166245189281)*x[2]**o+(-0.430541214236)*x[2]
-        arg[2,3]=(-0.00127511229816)*x[0]**o+(-0.327443174924)*x[0]+(0.61881322537)*x[1]**o+(-0.725854102962)*x[1]+(0.650649062427)*x[2]**o+(0.246373184041)*x[2]
-        arg[2,4]=(-0.530580898049)*x[0]**o+(-0.208506132901)*x[0]+(-0.102049332015)*x[1]**o+(-0.537037644189)*x[1]+(0.740113470729)*x[2]**o+(0.12094405264)*x[2]
-        arg[3,0]=(-0.103423602042)*x[0]**o+(-0.535742323666)*x[0]+(0.678663019405)*x[1]**o+(0.579375950057)*x[1]+(0.323627490052)*x[2]**o+(-0.681323301356)*x[2]
-        arg[3,1]=(0.670239087519)*x[0]**o+(0.209657968128)*x[0]+(-0.357490300727)*x[1]**o+(-0.441776782321)*x[1]+(0.00927389037562)*x[2]**o+(0.633527599723)*x[2]
-        arg[3,2]=(0.415569606138)*x[0]**o+(-0.422211616068)*x[0]+(-0.695086235645)*x[1]**o+(0.709158289848)*x[1]+(-0.523450845183)*x[2]**o+(0.555778994398)*x[2]
-        arg[3,3]=(0.0188993892075)*x[0]**o+(0.611088737828)*x[0]+(0.0313795167921)*x[1]**o+(0.0842651755016)*x[1]+(0.288414199415)*x[2]**o+(0.695910780235)*x[2]
-        arg[3,4]=(-0.500338800879)*x[0]**o+(0.0984192369328)*x[0]+(0.71163172992)*x[1]**o+(-0.102123116139)*x[1]+(0.954613955678)*x[2]**o+(0.384872409422)*x[2]
-        ref[0,0]=(0.386545340192)*x_ref[0]**o+(-0.397636296285)*x_ref[0]+(-0.849437816516)*x_ref[1]**o+(-0.83083406493)*x_ref[1]+(0.479216612031)*x_ref[2]**o+(0.0903787541308)*x_ref[2]
-        ref[0,1]=(-0.331651855726)*x_ref[0]**o+(0.849421626918)*x_ref[0]+(0.528368477362)*x_ref[1]**o+(-0.015122214824)*x_ref[1]+(0.494310578452)*x_ref[2]**o+(0.190239928161)*x_ref[2]
-        ref[0,2]=(-0.662389759646)*x_ref[0]**o+(0.204378343962)*x_ref[0]+(0.486802744897)*x_ref[1]**o+(0.822174784922)*x_ref[1]+(-0.309203812647)*x_ref[2]**o+(-0.101665040799)*x_ref[2]
-        ref[0,3]=(0.609106341828)*x_ref[0]**o+(0.658404088333)*x_ref[0]+(-0.0092991120732)*x_ref[1]**o+(-0.73794934348)*x_ref[1]+(0.270245135914)*x_ref[2]**o+(-0.594067838407)*x_ref[2]
-        ref[0,4]=(-0.291752213357)*x_ref[0]**o+(-0.596751343066)*x_ref[0]+(-0.109196903078)*x_ref[1]**o+(-0.868610307708)*x_ref[1]+(0.622541308544)*x_ref[2]**o+(0.482202762224)*x_ref[2]
-        ref[1,0]=(-0.113988933227)*x_ref[0]**o+(-0.846328804695)*x_ref[0]+(0.691769553626)*x_ref[1]**o+(-0.377441645148)*x_ref[1]+(-0.769857970682)*x_ref[2]**o+(-0.583083729037)*x_ref[2]
-        ref[1,1]=(-0.635333757145)*x_ref[0]**o+(0.194761117849)*x_ref[0]+(-0.268287296731)*x_ref[1]**o+(0.463906930647)*x_ref[1]+(0.768293821029)*x_ref[2]**o+(-0.532824906687)*x_ref[2]
-        ref[1,2]=(0.355380090138)*x_ref[0]**o+(-0.181191575848)*x_ref[0]+(-0.558667766467)*x_ref[1]**o+(0.561707671872)*x_ref[1]+(-0.427004232725)*x_ref[2]**o+(-0.996564299989)*x_ref[2]
-        ref[1,3]=(-0.891638892893)*x_ref[0]**o+(0.0867350850512)*x_ref[0]+(0.880258390584)*x_ref[1]**o+(-0.798123407525)*x_ref[1]+(-0.571505202201)*x_ref[2]**o+(0.35374245063)*x_ref[2]
-        ref[1,4]=(0.543632496941)*x_ref[0]**o+(-0.630363803582)*x_ref[0]+(0.38107312058)*x_ref[1]**o+(0.222401831883)*x_ref[1]+(-0.932212080175)*x_ref[2]**o+(-0.0482899826174)*x_ref[2]
-        ref[2,0]=(0.46514308325)*x_ref[0]**o+(-0.907464652384)*x_ref[0]+(-0.706105595148)*x_ref[1]**o+(0.486989958675)*x_ref[1]+(0.422702683485)*x_ref[2]**o+(0.640916925932)*x_ref[2]
-        ref[2,1]=(0.912808317479)*x_ref[0]**o+(-0.860779312763)*x_ref[0]+(-0.915364956133)*x_ref[1]**o+(-0.314186117224)*x_ref[1]+(-0.860814410035)*x_ref[2]**o+(0.837570442722)*x_ref[2]
-        ref[2,2]=(0.00932917919464)*x_ref[0]**o+(0.393773283049)*x_ref[0]+(0.699998572668)*x_ref[1]**o+(0.153407885795)*x_ref[1]+(-0.166245189281)*x_ref[2]**o+(-0.430541214236)*x_ref[2]
-        ref[2,3]=(-0.00127511229816)*x_ref[0]**o+(-0.327443174924)*x_ref[0]+(0.61881322537)*x_ref[1]**o+(-0.725854102962)*x_ref[1]+(0.650649062427)*x_ref[2]**o+(0.246373184041)*x_ref[2]
-        ref[2,4]=(-0.530580898049)*x_ref[0]**o+(-0.208506132901)*x_ref[0]+(-0.102049332015)*x_ref[1]**o+(-0.537037644189)*x_ref[1]+(0.740113470729)*x_ref[2]**o+(0.12094405264)*x_ref[2]
-        ref[3,0]=(-0.103423602042)*x_ref[0]**o+(-0.535742323666)*x_ref[0]+(0.678663019405)*x_ref[1]**o+(0.579375950057)*x_ref[1]+(0.323627490052)*x_ref[2]**o+(-0.681323301356)*x_ref[2]
-        ref[3,1]=(0.670239087519)*x_ref[0]**o+(0.209657968128)*x_ref[0]+(-0.357490300727)*x_ref[1]**o+(-0.441776782321)*x_ref[1]+(0.00927389037562)*x_ref[2]**o+(0.633527599723)*x_ref[2]
-        ref[3,2]=(0.415569606138)*x_ref[0]**o+(-0.422211616068)*x_ref[0]+(-0.695086235645)*x_ref[1]**o+(0.709158289848)*x_ref[1]+(-0.523450845183)*x_ref[2]**o+(0.555778994398)*x_ref[2]
-        ref[3,3]=(0.0188993892075)*x_ref[0]**o+(0.611088737828)*x_ref[0]+(0.0313795167921)*x_ref[1]**o+(0.0842651755016)*x_ref[1]+(0.288414199415)*x_ref[2]**o+(0.695910780235)*x_ref[2]
-        ref[3,4]=(-0.500338800879)*x_ref[0]**o+(0.0984192369328)*x_ref[0]+(0.71163172992)*x_ref[1]**o+(-0.102123116139)*x_ref[1]+(0.954613955678)*x_ref[2]**o+(0.384872409422)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.317274364174)*x[0]**o+(-0.565307843766)*x[0]+(-0.367874638208)*x[1]**o+(0.0029581033546)*x[1]
-        arg[0,0,1]=(0.832728755858)*x[0]**o+(0.245271193641)*x[0]+(-0.727130029377)*x[1]**o+(0.137912975829)*x[1]
-        arg[0,1,0]=(-0.634508968932)*x[0]**o+(-0.864200861637)*x[0]+(-0.566985971867)*x[1]**o+(0.458187145519)*x[1]
-        arg[0,1,1]=(0.133772683885)*x[0]**o+(-0.630800341215)*x[0]+(0.958934971335)*x[1]**o+(-0.15839182257)*x[1]
-        arg[1,0,0]=(-0.0948724752087)*x[0]**o+(-0.25589337469)*x[0]+(-0.315713312867)*x[1]**o+(0.223487524432)*x[1]
-        arg[1,0,1]=(0.794634271698)*x[0]**o+(-0.505797079712)*x[0]+(0.54367349338)*x[1]**o+(0.610149581933)*x[1]
-        arg[1,1,0]=(-0.447039667341)*x[0]**o+(-0.917009838715)*x[0]+(0.525331113522)*x[1]**o+(-0.626176620973)*x[1]
-        arg[1,1,1]=(0.0749028334839)*x[0]**o+(0.106950341725)*x[0]+(-0.375321288987)*x[1]**o+(0.510260762626)*x[1]
-        arg[2,0,0]=(-0.286661970669)*x[0]**o+(0.584169107201)*x[0]+(0.189852415568)*x[1]**o+(-0.685695910848)*x[1]
-        arg[2,0,1]=(-0.689509796724)*x[0]**o+(-0.316067007053)*x[0]+(0.93758916753)*x[1]**o+(0.987368705364)*x[1]
-        arg[2,1,0]=(-0.411695937554)*x[0]**o+(0.858528628791)*x[0]+(-0.579361651418)*x[1]**o+(-0.179617869494)*x[1]
-        arg[2,1,1]=(0.871441175049)*x[0]**o+(0.445176827889)*x[0]+(0.282613647019)*x[1]**o+(-0.0414230375843)*x[1]
-        arg[3,0,0]=(-0.242136375691)*x[0]**o+(-0.91917484201)*x[0]+(-0.88026838607)*x[1]**o+(0.363309786006)*x[1]
-        arg[3,0,1]=(-0.991221762386)*x[0]**o+(-0.0149280738883)*x[0]+(0.420322977563)*x[1]**o+(-0.0533076687981)*x[1]
-        arg[3,1,0]=(-0.889003524303)*x[0]**o+(-0.023519502168)*x[0]+(0.826015855889)*x[1]**o+(0.0568467842617)*x[1]
-        arg[3,1,1]=(0.608567002824)*x[0]**o+(-0.531288593441)*x[0]+(0.0886678034719)*x[1]**o+(-0.732353220319)*x[1]
-        arg[4,0,0]=(-0.0537755786538)*x[0]**o+(-0.475886396481)*x[0]+(-0.153787571145)*x[1]**o+(0.689850737569)*x[1]
-        arg[4,0,1]=(0.413017674549)*x[0]**o+(-0.993353261494)*x[0]+(-0.944597571268)*x[1]**o+(0.566423551758)*x[1]
-        arg[4,1,0]=(-0.716864417268)*x[0]**o+(-0.871574272865)*x[0]+(0.394071572628)*x[1]**o+(0.452903048597)*x[1]
-        arg[4,1,1]=(0.861790785883)*x[0]**o+(-0.511789401943)*x[0]+(-0.272452527007)*x[1]**o+(-0.379021521619)*x[1]
-        arg[5,0,0]=(0.509668147054)*x[0]**o+(0.919355584411)*x[0]+(-0.673215166917)*x[1]**o+(0.766459631931)*x[1]
-        arg[5,0,1]=(0.177006227916)*x[0]**o+(-0.275118477)*x[0]+(0.0302367843701)*x[1]**o+(-0.761226360328)*x[1]
-        arg[5,1,0]=(0.013432534638)*x[0]**o+(-0.911626567027)*x[0]+(-0.710520442529)*x[1]**o+(-0.882317448423)*x[1]
-        arg[5,1,1]=(0.595583093615)*x[0]**o+(0.163527905156)*x[0]+(-0.122165051333)*x[1]**o+(-0.526359288181)*x[1]
-        ref[0,0,0]=(0.317274364174)*x_ref[0]**o+(-0.565307843766)*x_ref[0]+(-0.367874638208)*x_ref[1]**o+(0.0029581033546)*x_ref[1]
-        ref[0,0,1]=(0.832728755858)*x_ref[0]**o+(0.245271193641)*x_ref[0]+(-0.727130029377)*x_ref[1]**o+(0.137912975829)*x_ref[1]
-        ref[0,1,0]=(-0.634508968932)*x_ref[0]**o+(-0.864200861637)*x_ref[0]+(-0.566985971867)*x_ref[1]**o+(0.458187145519)*x_ref[1]
-        ref[0,1,1]=(0.133772683885)*x_ref[0]**o+(-0.630800341215)*x_ref[0]+(0.958934971335)*x_ref[1]**o+(-0.15839182257)*x_ref[1]
-        ref[1,0,0]=(-0.0948724752087)*x_ref[0]**o+(-0.25589337469)*x_ref[0]+(-0.315713312867)*x_ref[1]**o+(0.223487524432)*x_ref[1]
-        ref[1,0,1]=(0.794634271698)*x_ref[0]**o+(-0.505797079712)*x_ref[0]+(0.54367349338)*x_ref[1]**o+(0.610149581933)*x_ref[1]
-        ref[1,1,0]=(-0.447039667341)*x_ref[0]**o+(-0.917009838715)*x_ref[0]+(0.525331113522)*x_ref[1]**o+(-0.626176620973)*x_ref[1]
-        ref[1,1,1]=(0.0749028334839)*x_ref[0]**o+(0.106950341725)*x_ref[0]+(-0.375321288987)*x_ref[1]**o+(0.510260762626)*x_ref[1]
-        ref[2,0,0]=(-0.286661970669)*x_ref[0]**o+(0.584169107201)*x_ref[0]+(0.189852415568)*x_ref[1]**o+(-0.685695910848)*x_ref[1]
-        ref[2,0,1]=(-0.689509796724)*x_ref[0]**o+(-0.316067007053)*x_ref[0]+(0.93758916753)*x_ref[1]**o+(0.987368705364)*x_ref[1]
-        ref[2,1,0]=(-0.411695937554)*x_ref[0]**o+(0.858528628791)*x_ref[0]+(-0.579361651418)*x_ref[1]**o+(-0.179617869494)*x_ref[1]
-        ref[2,1,1]=(0.871441175049)*x_ref[0]**o+(0.445176827889)*x_ref[0]+(0.282613647019)*x_ref[1]**o+(-0.0414230375843)*x_ref[1]
-        ref[3,0,0]=(-0.242136375691)*x_ref[0]**o+(-0.91917484201)*x_ref[0]+(-0.88026838607)*x_ref[1]**o+(0.363309786006)*x_ref[1]
-        ref[3,0,1]=(-0.991221762386)*x_ref[0]**o+(-0.0149280738883)*x_ref[0]+(0.420322977563)*x_ref[1]**o+(-0.0533076687981)*x_ref[1]
-        ref[3,1,0]=(-0.889003524303)*x_ref[0]**o+(-0.023519502168)*x_ref[0]+(0.826015855889)*x_ref[1]**o+(0.0568467842617)*x_ref[1]
-        ref[3,1,1]=(0.608567002824)*x_ref[0]**o+(-0.531288593441)*x_ref[0]+(0.0886678034719)*x_ref[1]**o+(-0.732353220319)*x_ref[1]
-        ref[4,0,0]=(-0.0537755786538)*x_ref[0]**o+(-0.475886396481)*x_ref[0]+(-0.153787571145)*x_ref[1]**o+(0.689850737569)*x_ref[1]
-        ref[4,0,1]=(0.413017674549)*x_ref[0]**o+(-0.993353261494)*x_ref[0]+(-0.944597571268)*x_ref[1]**o+(0.566423551758)*x_ref[1]
-        ref[4,1,0]=(-0.716864417268)*x_ref[0]**o+(-0.871574272865)*x_ref[0]+(0.394071572628)*x_ref[1]**o+(0.452903048597)*x_ref[1]
-        ref[4,1,1]=(0.861790785883)*x_ref[0]**o+(-0.511789401943)*x_ref[0]+(-0.272452527007)*x_ref[1]**o+(-0.379021521619)*x_ref[1]
-        ref[5,0,0]=(0.509668147054)*x_ref[0]**o+(0.919355584411)*x_ref[0]+(-0.673215166917)*x_ref[1]**o+(0.766459631931)*x_ref[1]
-        ref[5,0,1]=(0.177006227916)*x_ref[0]**o+(-0.275118477)*x_ref[0]+(0.0302367843701)*x_ref[1]**o+(-0.761226360328)*x_ref[1]
-        ref[5,1,0]=(0.013432534638)*x_ref[0]**o+(-0.911626567027)*x_ref[0]+(-0.710520442529)*x_ref[1]**o+(-0.882317448423)*x_ref[1]
-        ref[5,1,1]=(0.595583093615)*x_ref[0]**o+(0.163527905156)*x_ref[0]+(-0.122165051333)*x_ref[1]**o+(-0.526359288181)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.230695674262)*x[0]**o+(-0.987212801716)*x[0]+(-0.0599001434987)*x[1]**o+(0.719591259555)*x[1]+(-0.665186369759)*x[2]**o+(-0.563552602515)*x[2]
-        arg[0,0,1]=(-0.775441966131)*x[0]**o+(-0.152166849702)*x[0]+(0.626466789363)*x[1]**o+(0.179356346581)*x[1]+(-0.687406927434)*x[2]**o+(-0.563492313114)*x[2]
-        arg[0,1,0]=(0.749522748133)*x[0]**o+(-0.582456308337)*x[0]+(0.676882643058)*x[1]**o+(0.365363182598)*x[1]+(-0.550867708812)*x[2]**o+(0.777938151183)*x[2]
-        arg[0,1,1]=(0.389788552775)*x[0]**o+(-0.298877489997)*x[0]+(0.560326209269)*x[1]**o+(-0.113249832155)*x[1]+(0.588087510254)*x[2]**o+(-0.593503776461)*x[2]
-        arg[1,0,0]=(-0.354661103909)*x[0]**o+(-0.195375369549)*x[0]+(-0.798795069895)*x[1]**o+(0.0968631048579)*x[1]+(-0.016118190391)*x[2]**o+(-0.903745407705)*x[2]
-        arg[1,0,1]=(-0.383688834784)*x[0]**o+(0.861256231933)*x[0]+(-0.767204834667)*x[1]**o+(0.338875482372)*x[1]+(0.117146310891)*x[2]**o+(-0.302651846083)*x[2]
-        arg[1,1,0]=(0.646263670969)*x[0]**o+(-0.447984008871)*x[0]+(-0.169322492785)*x[1]**o+(-0.570614724481)*x[1]+(-0.848518457618)*x[2]**o+(-0.0750005539216)*x[2]
-        arg[1,1,1]=(-0.232496745304)*x[0]**o+(0.182581173413)*x[0]+(0.8032436357)*x[1]**o+(-0.391266449476)*x[1]+(0.491677629766)*x[2]**o+(-0.188361708708)*x[2]
-        arg[2,0,0]=(-0.571145099091)*x[0]**o+(-0.486855242188)*x[0]+(0.52833582073)*x[1]**o+(0.326716348242)*x[1]+(0.528475192869)*x[2]**o+(0.163280575137)*x[2]
-        arg[2,0,1]=(-0.368889674601)*x[0]**o+(0.601775816775)*x[0]+(0.0281742455403)*x[1]**o+(-0.198869716243)*x[1]+(0.193343065506)*x[2]**o+(-0.0614451571108)*x[2]
-        arg[2,1,0]=(0.724595792492)*x[0]**o+(-0.206983407651)*x[0]+(-0.33966393719)*x[1]**o+(0.929465830796)*x[1]+(-0.938517195863)*x[2]**o+(0.70874077222)*x[2]
-        arg[2,1,1]=(-0.536303362606)*x[0]**o+(-0.430663025812)*x[0]+(-0.0845923469062)*x[1]**o+(0.866655631144)*x[1]+(-0.2378102403)*x[2]**o+(0.969070797268)*x[2]
-        arg[3,0,0]=(0.345137352559)*x[0]**o+(-0.696652518382)*x[0]+(0.914998974008)*x[1]**o+(-0.874935163156)*x[1]+(0.947812661283)*x[2]**o+(0.868611662789)*x[2]
-        arg[3,0,1]=(-0.421640746358)*x[0]**o+(-0.37925991208)*x[0]+(0.468281241452)*x[1]**o+(0.439086689805)*x[1]+(-0.607986317001)*x[2]**o+(0.269488168937)*x[2]
-        arg[3,1,0]=(-0.550485456473)*x[0]**o+(-0.520018714495)*x[0]+(0.439679309654)*x[1]**o+(-0.0652434084668)*x[1]+(-0.584838668708)*x[2]**o+(-0.46047281034)*x[2]
-        arg[3,1,1]=(-0.421746456038)*x[0]**o+(0.370489549278)*x[0]+(-0.683682295105)*x[1]**o+(0.324051718035)*x[1]+(-0.579046430636)*x[2]**o+(0.587623604941)*x[2]
-        arg[4,0,0]=(-0.167582584882)*x[0]**o+(0.524904122243)*x[0]+(0.665109348362)*x[1]**o+(-0.093655366509)*x[1]+(0.704404656254)*x[2]**o+(-0.402602441741)*x[2]
-        arg[4,0,1]=(0.633854964824)*x[0]**o+(-0.836385840194)*x[0]+(-0.0995437996628)*x[1]**o+(-0.200285338869)*x[1]+(0.535023783881)*x[2]**o+(0.884702543593)*x[2]
-        arg[4,1,0]=(-0.953619378208)*x[0]**o+(-0.390518815669)*x[0]+(-0.0590889178236)*x[1]**o+(-0.997225825019)*x[1]+(0.0520418736402)*x[2]**o+(0.484749465262)*x[2]
-        arg[4,1,1]=(-0.440389854756)*x[0]**o+(0.15520431778)*x[0]+(0.346839174513)*x[1]**o+(0.0172676873159)*x[1]+(0.86275919224)*x[2]**o+(0.568069148992)*x[2]
-        arg[5,0,0]=(-0.303687941217)*x[0]**o+(0.516115915687)*x[0]+(-0.750276597519)*x[1]**o+(0.734039058778)*x[1]+(-0.624499210252)*x[2]**o+(-0.926338135421)*x[2]
-        arg[5,0,1]=(-0.472230777895)*x[0]**o+(-0.557827728373)*x[0]+(-0.403783023157)*x[1]**o+(0.70433336955)*x[1]+(-0.0211737454531)*x[2]**o+(0.0774406125836)*x[2]
-        arg[5,1,0]=(0.718149875204)*x[0]**o+(-0.183000739787)*x[0]+(-0.655724252373)*x[1]**o+(-0.634941710776)*x[1]+(-0.26300163323)*x[2]**o+(-0.25105424715)*x[2]
-        arg[5,1,1]=(0.109601904441)*x[0]**o+(-0.00640764631554)*x[0]+(-0.488035610009)*x[1]**o+(0.909668323769)*x[1]+(0.229692168501)*x[2]**o+(-0.739241309497)*x[2]
-        ref[0,0,0]=(0.230695674262)*x_ref[0]**o+(-0.987212801716)*x_ref[0]+(-0.0599001434987)*x_ref[1]**o+(0.719591259555)*x_ref[1]+(-0.665186369759)*x_ref[2]**o+(-0.563552602515)*x_ref[2]
-        ref[0,0,1]=(-0.775441966131)*x_ref[0]**o+(-0.152166849702)*x_ref[0]+(0.626466789363)*x_ref[1]**o+(0.179356346581)*x_ref[1]+(-0.687406927434)*x_ref[2]**o+(-0.563492313114)*x_ref[2]
-        ref[0,1,0]=(0.749522748133)*x_ref[0]**o+(-0.582456308337)*x_ref[0]+(0.676882643058)*x_ref[1]**o+(0.365363182598)*x_ref[1]+(-0.550867708812)*x_ref[2]**o+(0.777938151183)*x_ref[2]
-        ref[0,1,1]=(0.389788552775)*x_ref[0]**o+(-0.298877489997)*x_ref[0]+(0.560326209269)*x_ref[1]**o+(-0.113249832155)*x_ref[1]+(0.588087510254)*x_ref[2]**o+(-0.593503776461)*x_ref[2]
-        ref[1,0,0]=(-0.354661103909)*x_ref[0]**o+(-0.195375369549)*x_ref[0]+(-0.798795069895)*x_ref[1]**o+(0.0968631048579)*x_ref[1]+(-0.016118190391)*x_ref[2]**o+(-0.903745407705)*x_ref[2]
-        ref[1,0,1]=(-0.383688834784)*x_ref[0]**o+(0.861256231933)*x_ref[0]+(-0.767204834667)*x_ref[1]**o+(0.338875482372)*x_ref[1]+(0.117146310891)*x_ref[2]**o+(-0.302651846083)*x_ref[2]
-        ref[1,1,0]=(0.646263670969)*x_ref[0]**o+(-0.447984008871)*x_ref[0]+(-0.169322492785)*x_ref[1]**o+(-0.570614724481)*x_ref[1]+(-0.848518457618)*x_ref[2]**o+(-0.0750005539216)*x_ref[2]
-        ref[1,1,1]=(-0.232496745304)*x_ref[0]**o+(0.182581173413)*x_ref[0]+(0.8032436357)*x_ref[1]**o+(-0.391266449476)*x_ref[1]+(0.491677629766)*x_ref[2]**o+(-0.188361708708)*x_ref[2]
-        ref[2,0,0]=(-0.571145099091)*x_ref[0]**o+(-0.486855242188)*x_ref[0]+(0.52833582073)*x_ref[1]**o+(0.326716348242)*x_ref[1]+(0.528475192869)*x_ref[2]**o+(0.163280575137)*x_ref[2]
-        ref[2,0,1]=(-0.368889674601)*x_ref[0]**o+(0.601775816775)*x_ref[0]+(0.0281742455403)*x_ref[1]**o+(-0.198869716243)*x_ref[1]+(0.193343065506)*x_ref[2]**o+(-0.0614451571108)*x_ref[2]
-        ref[2,1,0]=(0.724595792492)*x_ref[0]**o+(-0.206983407651)*x_ref[0]+(-0.33966393719)*x_ref[1]**o+(0.929465830796)*x_ref[1]+(-0.938517195863)*x_ref[2]**o+(0.70874077222)*x_ref[2]
-        ref[2,1,1]=(-0.536303362606)*x_ref[0]**o+(-0.430663025812)*x_ref[0]+(-0.0845923469062)*x_ref[1]**o+(0.866655631144)*x_ref[1]+(-0.2378102403)*x_ref[2]**o+(0.969070797268)*x_ref[2]
-        ref[3,0,0]=(0.345137352559)*x_ref[0]**o+(-0.696652518382)*x_ref[0]+(0.914998974008)*x_ref[1]**o+(-0.874935163156)*x_ref[1]+(0.947812661283)*x_ref[2]**o+(0.868611662789)*x_ref[2]
-        ref[3,0,1]=(-0.421640746358)*x_ref[0]**o+(-0.37925991208)*x_ref[0]+(0.468281241452)*x_ref[1]**o+(0.439086689805)*x_ref[1]+(-0.607986317001)*x_ref[2]**o+(0.269488168937)*x_ref[2]
-        ref[3,1,0]=(-0.550485456473)*x_ref[0]**o+(-0.520018714495)*x_ref[0]+(0.439679309654)*x_ref[1]**o+(-0.0652434084668)*x_ref[1]+(-0.584838668708)*x_ref[2]**o+(-0.46047281034)*x_ref[2]
-        ref[3,1,1]=(-0.421746456038)*x_ref[0]**o+(0.370489549278)*x_ref[0]+(-0.683682295105)*x_ref[1]**o+(0.324051718035)*x_ref[1]+(-0.579046430636)*x_ref[2]**o+(0.587623604941)*x_ref[2]
-        ref[4,0,0]=(-0.167582584882)*x_ref[0]**o+(0.524904122243)*x_ref[0]+(0.665109348362)*x_ref[1]**o+(-0.093655366509)*x_ref[1]+(0.704404656254)*x_ref[2]**o+(-0.402602441741)*x_ref[2]
-        ref[4,0,1]=(0.633854964824)*x_ref[0]**o+(-0.836385840194)*x_ref[0]+(-0.0995437996628)*x_ref[1]**o+(-0.200285338869)*x_ref[1]+(0.535023783881)*x_ref[2]**o+(0.884702543593)*x_ref[2]
-        ref[4,1,0]=(-0.953619378208)*x_ref[0]**o+(-0.390518815669)*x_ref[0]+(-0.0590889178236)*x_ref[1]**o+(-0.997225825019)*x_ref[1]+(0.0520418736402)*x_ref[2]**o+(0.484749465262)*x_ref[2]
-        ref[4,1,1]=(-0.440389854756)*x_ref[0]**o+(0.15520431778)*x_ref[0]+(0.346839174513)*x_ref[1]**o+(0.0172676873159)*x_ref[1]+(0.86275919224)*x_ref[2]**o+(0.568069148992)*x_ref[2]
-        ref[5,0,0]=(-0.303687941217)*x_ref[0]**o+(0.516115915687)*x_ref[0]+(-0.750276597519)*x_ref[1]**o+(0.734039058778)*x_ref[1]+(-0.624499210252)*x_ref[2]**o+(-0.926338135421)*x_ref[2]
-        ref[5,0,1]=(-0.472230777895)*x_ref[0]**o+(-0.557827728373)*x_ref[0]+(-0.403783023157)*x_ref[1]**o+(0.70433336955)*x_ref[1]+(-0.0211737454531)*x_ref[2]**o+(0.0774406125836)*x_ref[2]
-        ref[5,1,0]=(0.718149875204)*x_ref[0]**o+(-0.183000739787)*x_ref[0]+(-0.655724252373)*x_ref[1]**o+(-0.634941710776)*x_ref[1]+(-0.26300163323)*x_ref[2]**o+(-0.25105424715)*x_ref[2]
-        ref[5,1,1]=(0.109601904441)*x_ref[0]**o+(-0.00640764631554)*x_ref[0]+(-0.488035610009)*x_ref[1]**o+(0.909668323769)*x_ref[1]+(0.229692168501)*x_ref[2]**o+(-0.739241309497)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.912518456494)*x[0]**o+(-0.828176151903)*x[0]+(-0.313940298121)*x[1]**o+(-0.850120336531)*x[1]
-        arg[0,0,0,1]=(0.14415852783)*x[0]**o+(-0.294155246668)*x[0]+(0.562517248232)*x[1]**o+(-0.204505938286)*x[1]
-        arg[0,0,1,0]=(0.555455404368)*x[0]**o+(0.916425343576)*x[0]+(0.547252315693)*x[1]**o+(-0.0992842367479)*x[1]
-        arg[0,0,1,1]=(0.603632473928)*x[0]**o+(0.505571549062)*x[0]+(-0.490402921542)*x[1]**o+(0.908624427316)*x[1]
-        arg[0,0,2,0]=(0.729542308985)*x[0]**o+(-0.654310868638)*x[0]+(0.0845981276245)*x[1]**o+(-0.95231604686)*x[1]
-        arg[0,0,2,1]=(0.0511615606745)*x[0]**o+(-0.939469887975)*x[0]+(-0.206229418155)*x[1]**o+(0.254879844701)*x[1]
-        arg[0,1,0,0]=(0.257917344507)*x[0]**o+(0.860729621288)*x[0]+(0.489966193348)*x[1]**o+(0.174897233858)*x[1]
-        arg[0,1,0,1]=(0.336588362051)*x[0]**o+(-0.690598635114)*x[0]+(-0.0913735300483)*x[1]**o+(-0.932914439004)*x[1]
-        arg[0,1,1,0]=(0.244583093108)*x[0]**o+(-0.827768167758)*x[0]+(0.573065359412)*x[1]**o+(0.176685515596)*x[1]
-        arg[0,1,1,1]=(-0.520550726127)*x[0]**o+(-0.605243177286)*x[0]+(0.130549556226)*x[1]**o+(0.750019884067)*x[1]
-        arg[0,1,2,0]=(-0.680201627614)*x[0]**o+(0.679925324882)*x[0]+(-0.060408604263)*x[1]**o+(0.568125689359)*x[1]
-        arg[0,1,2,1]=(-0.111908859432)*x[0]**o+(0.256521037018)*x[0]+(0.332050616611)*x[1]**o+(-0.0500016397683)*x[1]
-        arg[0,2,0,0]=(-0.484953933663)*x[0]**o+(0.628032211831)*x[0]+(-0.63297141454)*x[1]**o+(0.141016662755)*x[1]
-        arg[0,2,0,1]=(-0.463920680465)*x[0]**o+(-0.868825520511)*x[0]+(-0.36594425006)*x[1]**o+(-0.823052216578)*x[1]
-        arg[0,2,1,0]=(0.972337802357)*x[0]**o+(0.943605157343)*x[0]+(-0.113950717844)*x[1]**o+(-0.839596452897)*x[1]
-        arg[0,2,1,1]=(-0.295562401302)*x[0]**o+(0.735770621017)*x[0]+(-0.183838912348)*x[1]**o+(-0.929365380252)*x[1]
-        arg[0,2,2,0]=(0.912886298388)*x[0]**o+(0.847507982065)*x[0]+(-0.341306036323)*x[1]**o+(0.393627025978)*x[1]
-        arg[0,2,2,1]=(-0.769650638386)*x[0]**o+(-0.619672356488)*x[0]+(-0.126894288906)*x[1]**o+(0.231547632139)*x[1]
-        arg[0,3,0,0]=(-0.884442976834)*x[0]**o+(-0.0194505760676)*x[0]+(-0.338764675072)*x[1]**o+(0.723481600171)*x[1]
-        arg[0,3,0,1]=(0.655973555091)*x[0]**o+(-0.556230649412)*x[0]+(-0.850356832441)*x[1]**o+(0.115267314853)*x[1]
-        arg[0,3,1,0]=(0.659628443559)*x[0]**o+(-0.586677822491)*x[0]+(0.135930588518)*x[1]**o+(0.206866895948)*x[1]
-        arg[0,3,1,1]=(-0.700258957557)*x[0]**o+(-0.699774198764)*x[0]+(-0.294009479186)*x[1]**o+(0.848159666503)*x[1]
-        arg[0,3,2,0]=(-0.927501754488)*x[0]**o+(-0.981178071331)*x[0]+(0.614074194451)*x[1]**o+(0.711549573086)*x[1]
-        arg[0,3,2,1]=(0.312434473198)*x[0]**o+(-0.241506125991)*x[0]+(-0.0840979088912)*x[1]**o+(0.902948463117)*x[1]
-        arg[0,4,0,0]=(-0.892269860242)*x[0]**o+(0.823434435855)*x[0]+(0.50499383365)*x[1]**o+(0.763736541034)*x[1]
-        arg[0,4,0,1]=(-0.606959691191)*x[0]**o+(0.945562536791)*x[0]+(-0.46271929481)*x[1]**o+(0.929514432096)*x[1]
-        arg[0,4,1,0]=(0.953382685939)*x[0]**o+(0.553766359805)*x[0]+(-0.191004010293)*x[1]**o+(0.556369491698)*x[1]
-        arg[0,4,1,1]=(-0.269402649165)*x[0]**o+(-0.158926232076)*x[0]+(-0.390038749681)*x[1]**o+(0.553655192666)*x[1]
-        arg[0,4,2,0]=(0.0785586372006)*x[0]**o+(-0.778452221862)*x[0]+(-0.927627273292)*x[1]**o+(-0.187742405246)*x[1]
-        arg[0,4,2,1]=(-0.965329945447)*x[0]**o+(0.304539006089)*x[0]+(0.213031689568)*x[1]**o+(-0.2807790149)*x[1]
-        arg[1,0,0,0]=(0.981534698569)*x[0]**o+(0.466451685806)*x[0]+(0.845322931856)*x[1]**o+(0.582422032334)*x[1]
-        arg[1,0,0,1]=(-0.0645798740394)*x[0]**o+(0.0475214206619)*x[0]+(-0.687759433076)*x[1]**o+(0.403440938285)*x[1]
-        arg[1,0,1,0]=(-0.317887773392)*x[0]**o+(0.59101163416)*x[0]+(0.658626263291)*x[1]**o+(-0.618167594137)*x[1]
-        arg[1,0,1,1]=(-0.314093092813)*x[0]**o+(0.699933899942)*x[0]+(0.824195260822)*x[1]**o+(-0.42875327345)*x[1]
-        arg[1,0,2,0]=(-0.254254956887)*x[0]**o+(-0.912137080163)*x[0]+(0.360457121452)*x[1]**o+(-0.902596912588)*x[1]
-        arg[1,0,2,1]=(-0.577214593683)*x[0]**o+(-0.419495663008)*x[0]+(-0.803459783331)*x[1]**o+(0.490885513568)*x[1]
-        arg[1,1,0,0]=(0.477947766892)*x[0]**o+(-0.853046971581)*x[0]+(0.576044041601)*x[1]**o+(-0.447007701252)*x[1]
-        arg[1,1,0,1]=(0.5886933409)*x[0]**o+(0.253650778351)*x[0]+(-0.198070684431)*x[1]**o+(0.189479364528)*x[1]
-        arg[1,1,1,0]=(-0.528744478872)*x[0]**o+(-0.504072059557)*x[0]+(-0.0161832474015)*x[1]**o+(0.639592055966)*x[1]
-        arg[1,1,1,1]=(-0.581844827169)*x[0]**o+(0.997883224538)*x[0]+(0.9354364489)*x[1]**o+(0.884060785136)*x[1]
-        arg[1,1,2,0]=(0.858226955817)*x[0]**o+(0.707261698312)*x[0]+(-0.738309111076)*x[1]**o+(-0.644655976448)*x[1]
-        arg[1,1,2,1]=(-0.254976445964)*x[0]**o+(-0.624982185158)*x[0]+(0.304854486996)*x[1]**o+(0.597089811682)*x[1]
-        arg[1,2,0,0]=(-0.625190759215)*x[0]**o+(-0.267820197905)*x[0]+(-0.721452024377)*x[1]**o+(-0.830984245819)*x[1]
-        arg[1,2,0,1]=(-0.972257608766)*x[0]**o+(0.981368890544)*x[0]+(-0.925886510064)*x[1]**o+(-0.337107356862)*x[1]
-        arg[1,2,1,0]=(-0.178932954207)*x[0]**o+(-0.941789507374)*x[0]+(0.360726744794)*x[1]**o+(0.347621863123)*x[1]
-        arg[1,2,1,1]=(-0.59790695611)*x[0]**o+(0.552509013166)*x[0]+(0.592412443998)*x[1]**o+(0.105369637971)*x[1]
-        arg[1,2,2,0]=(0.300713195225)*x[0]**o+(0.814257503574)*x[0]+(-0.281407483492)*x[1]**o+(-0.803431681095)*x[1]
-        arg[1,2,2,1]=(0.80113022942)*x[0]**o+(0.749336171665)*x[0]+(-0.0842928982283)*x[1]**o+(-0.974041792058)*x[1]
-        arg[1,3,0,0]=(0.533118876666)*x[0]**o+(-0.00888178987567)*x[0]+(0.372869213762)*x[1]**o+(-0.652513683144)*x[1]
-        arg[1,3,0,1]=(-0.295090222537)*x[0]**o+(0.772749124303)*x[0]+(-0.00857029468729)*x[1]**o+(0.927794431125)*x[1]
-        arg[1,3,1,0]=(-0.152537465441)*x[0]**o+(0.154900534979)*x[0]+(-0.488743959543)*x[1]**o+(-0.0318497199232)*x[1]
-        arg[1,3,1,1]=(-0.754333787921)*x[0]**o+(-0.0583007358701)*x[0]+(-0.050921106891)*x[1]**o+(0.161426452156)*x[1]
-        arg[1,3,2,0]=(0.387357469451)*x[0]**o+(-0.213640305885)*x[0]+(-0.844609663023)*x[1]**o+(0.0761914594192)*x[1]
-        arg[1,3,2,1]=(0.36964862459)*x[0]**o+(0.887888401952)*x[0]+(-0.933930511093)*x[1]**o+(0.769046614932)*x[1]
-        arg[1,4,0,0]=(0.680878887266)*x[0]**o+(0.62930033679)*x[0]+(0.894793542585)*x[1]**o+(-0.636881609067)*x[1]
-        arg[1,4,0,1]=(-0.346053756598)*x[0]**o+(0.225254433923)*x[0]+(-0.861052985621)*x[1]**o+(0.415123108136)*x[1]
-        arg[1,4,1,0]=(-0.997758408183)*x[0]**o+(-0.265055614341)*x[0]+(-0.7568881617)*x[1]**o+(0.95144584777)*x[1]
-        arg[1,4,1,1]=(0.227777912008)*x[0]**o+(-0.83647660817)*x[0]+(-0.275733410165)*x[1]**o+(-0.971560248343)*x[1]
-        arg[1,4,2,0]=(0.718803859114)*x[0]**o+(-0.978966510682)*x[0]+(0.463102438649)*x[1]**o+(0.987805610534)*x[1]
-        arg[1,4,2,1]=(-0.107543838917)*x[0]**o+(-0.362684018694)*x[0]+(-0.310926939373)*x[1]**o+(-0.571571044712)*x[1]
-        arg[2,0,0,0]=(-0.475977416182)*x[0]**o+(-0.627173002609)*x[0]+(-0.369962970984)*x[1]**o+(-0.245077302537)*x[1]
-        arg[2,0,0,1]=(0.913949611751)*x[0]**o+(0.645611424617)*x[0]+(0.639304734076)*x[1]**o+(-0.12171441998)*x[1]
-        arg[2,0,1,0]=(0.251434098263)*x[0]**o+(-0.119898861407)*x[0]+(-0.365614523709)*x[1]**o+(-0.802928738296)*x[1]
-        arg[2,0,1,1]=(0.756390927006)*x[0]**o+(0.246578936199)*x[0]+(0.714968085461)*x[1]**o+(-0.929428808096)*x[1]
-        arg[2,0,2,0]=(-0.516888361447)*x[0]**o+(0.0344339250886)*x[0]+(-0.383709788774)*x[1]**o+(-0.437344417623)*x[1]
-        arg[2,0,2,1]=(-0.219307162317)*x[0]**o+(0.704909718842)*x[0]+(-0.340454491855)*x[1]**o+(-0.933866231773)*x[1]
-        arg[2,1,0,0]=(-0.0618967891627)*x[0]**o+(-0.0590712030789)*x[0]+(0.116776433077)*x[1]**o+(0.0241239764104)*x[1]
-        arg[2,1,0,1]=(-0.802207645638)*x[0]**o+(0.590732740531)*x[0]+(-0.25990272933)*x[1]**o+(-0.257633805416)*x[1]
-        arg[2,1,1,0]=(0.827623274379)*x[0]**o+(-0.450310573599)*x[0]+(0.213809775826)*x[1]**o+(-0.905410777787)*x[1]
-        arg[2,1,1,1]=(-0.624510830356)*x[0]**o+(-0.705682607787)*x[0]+(0.430105716993)*x[1]**o+(0.975510832521)*x[1]
-        arg[2,1,2,0]=(-0.297562223309)*x[0]**o+(-0.99090348994)*x[0]+(0.548589416291)*x[1]**o+(0.591718478583)*x[1]
-        arg[2,1,2,1]=(-0.531899919376)*x[0]**o+(-0.227453719581)*x[0]+(-0.131664806128)*x[1]**o+(0.0521895817509)*x[1]
-        arg[2,2,0,0]=(-0.592291745786)*x[0]**o+(-0.586879961972)*x[0]+(0.563196552327)*x[1]**o+(0.876989321187)*x[1]
-        arg[2,2,0,1]=(-0.273360445369)*x[0]**o+(-0.714740527775)*x[0]+(-0.647699497837)*x[1]**o+(-0.0405089612762)*x[1]
-        arg[2,2,1,0]=(-0.536629732224)*x[0]**o+(0.72656373966)*x[0]+(0.986630594165)*x[1]**o+(0.0741630711667)*x[1]
-        arg[2,2,1,1]=(0.770746088838)*x[0]**o+(-0.219279833426)*x[0]+(0.875445174779)*x[1]**o+(-0.947889926444)*x[1]
-        arg[2,2,2,0]=(-0.41428815119)*x[0]**o+(-0.696166268903)*x[0]+(-0.96838062553)*x[1]**o+(0.781394205899)*x[1]
-        arg[2,2,2,1]=(-0.810267960752)*x[0]**o+(-0.873632687702)*x[0]+(0.0131971321611)*x[1]**o+(-0.552767192193)*x[1]
-        arg[2,3,0,0]=(-0.216091366291)*x[0]**o+(-0.17824047472)*x[0]+(-0.4644515725)*x[1]**o+(0.135819458957)*x[1]
-        arg[2,3,0,1]=(-0.0823616523105)*x[0]**o+(0.33121362151)*x[0]+(0.926719919839)*x[1]**o+(0.663475641636)*x[1]
-        arg[2,3,1,0]=(-0.278303066047)*x[0]**o+(-0.457286378314)*x[0]+(0.186792859092)*x[1]**o+(-0.734245612464)*x[1]
-        arg[2,3,1,1]=(0.810871459779)*x[0]**o+(-0.706641995324)*x[0]+(-0.287827176091)*x[1]**o+(0.453216090282)*x[1]
-        arg[2,3,2,0]=(0.83826221049)*x[0]**o+(0.556887792111)*x[0]+(-0.000231102245991)*x[1]**o+(-0.440730958954)*x[1]
-        arg[2,3,2,1]=(-0.455087877907)*x[0]**o+(-0.132259634036)*x[0]+(-0.492728335525)*x[1]**o+(-0.880311317777)*x[1]
-        arg[2,4,0,0]=(-0.303141352388)*x[0]**o+(0.426137046804)*x[0]+(0.788934776738)*x[1]**o+(0.157477785179)*x[1]
-        arg[2,4,0,1]=(0.603411288614)*x[0]**o+(-0.533561451987)*x[0]+(-0.901259210942)*x[1]**o+(0.547372624746)*x[1]
-        arg[2,4,1,0]=(0.69517961739)*x[0]**o+(-0.106282888246)*x[0]+(0.257484565681)*x[1]**o+(0.655749633294)*x[1]
-        arg[2,4,1,1]=(-0.072748573118)*x[0]**o+(0.905966560113)*x[0]+(0.433145718123)*x[1]**o+(0.187620401615)*x[1]
-        arg[2,4,2,0]=(-0.0280176325954)*x[0]**o+(0.489610131347)*x[0]+(-0.740554922134)*x[1]**o+(-0.85045302096)*x[1]
-        arg[2,4,2,1]=(-0.158503180709)*x[0]**o+(0.525929643075)*x[0]+(-0.352022652515)*x[1]**o+(-0.706553104932)*x[1]
-        arg[3,0,0,0]=(-0.837316508127)*x[0]**o+(-0.89490181779)*x[0]+(0.510084075291)*x[1]**o+(0.321206310024)*x[1]
-        arg[3,0,0,1]=(-0.325038591079)*x[0]**o+(0.140342922753)*x[0]+(-0.937466403004)*x[1]**o+(0.580557383497)*x[1]
-        arg[3,0,1,0]=(-0.939713654062)*x[0]**o+(-0.394660244166)*x[0]+(0.762376614557)*x[1]**o+(-0.135565547532)*x[1]
-        arg[3,0,1,1]=(0.0275332524464)*x[0]**o+(0.368737701882)*x[0]+(0.983641372218)*x[1]**o+(0.573815516366)*x[1]
-        arg[3,0,2,0]=(0.816957570314)*x[0]**o+(-0.357626892562)*x[0]+(-0.368933149642)*x[1]**o+(-0.692502486914)*x[1]
-        arg[3,0,2,1]=(-0.372408810926)*x[0]**o+(-0.113036390416)*x[0]+(-0.355880297003)*x[1]**o+(0.755478191481)*x[1]
-        arg[3,1,0,0]=(0.0399012900832)*x[0]**o+(-0.879576900086)*x[0]+(-0.660858776134)*x[1]**o+(-0.59837040429)*x[1]
-        arg[3,1,0,1]=(0.569397128496)*x[0]**o+(-0.138333417746)*x[0]+(0.257769147727)*x[1]**o+(0.174737141027)*x[1]
-        arg[3,1,1,0]=(-0.67938408823)*x[0]**o+(0.862731161981)*x[0]+(-0.792538485264)*x[1]**o+(-0.0805197796157)*x[1]
-        arg[3,1,1,1]=(0.0113523229279)*x[0]**o+(0.475393597561)*x[0]+(-0.705748021886)*x[1]**o+(0.00836460135285)*x[1]
-        arg[3,1,2,0]=(0.463839509799)*x[0]**o+(-0.12663544643)*x[0]+(0.353158399738)*x[1]**o+(0.674929537597)*x[1]
-        arg[3,1,2,1]=(-0.6019896019)*x[0]**o+(-0.638280685565)*x[0]+(0.280047072988)*x[1]**o+(0.569239958138)*x[1]
-        arg[3,2,0,0]=(-0.113906500346)*x[0]**o+(-0.493494498501)*x[0]+(-0.686419229162)*x[1]**o+(-0.0727046763516)*x[1]
-        arg[3,2,0,1]=(-0.302092112795)*x[0]**o+(-0.74819167)*x[0]+(-0.478908975282)*x[1]**o+(0.430024789627)*x[1]
-        arg[3,2,1,0]=(0.353535608984)*x[0]**o+(-0.743408549264)*x[0]+(-0.069122881538)*x[1]**o+(-0.0767595089529)*x[1]
-        arg[3,2,1,1]=(-0.629946386234)*x[0]**o+(0.851779590894)*x[0]+(0.728577108695)*x[1]**o+(-0.366983040147)*x[1]
-        arg[3,2,2,0]=(0.1685167508)*x[0]**o+(0.149999747637)*x[0]+(0.709320430374)*x[1]**o+(-0.280950677222)*x[1]
-        arg[3,2,2,1]=(-0.956164974578)*x[0]**o+(0.240460380901)*x[0]+(-0.2820176577)*x[1]**o+(-0.595667156955)*x[1]
-        arg[3,3,0,0]=(-0.0711295055938)*x[0]**o+(-0.314513251791)*x[0]+(-0.41924591293)*x[1]**o+(0.0813197780959)*x[1]
-        arg[3,3,0,1]=(-0.230592584877)*x[0]**o+(-0.488005144715)*x[0]+(-0.450611759976)*x[1]**o+(-0.0571152769768)*x[1]
-        arg[3,3,1,0]=(-0.608255699014)*x[0]**o+(-0.697324108575)*x[0]+(-0.885935900746)*x[1]**o+(-0.884497550016)*x[1]
-        arg[3,3,1,1]=(0.857286225292)*x[0]**o+(0.509954550626)*x[0]+(0.182030821433)*x[1]**o+(-0.268076060316)*x[1]
-        arg[3,3,2,0]=(-0.77322653479)*x[0]**o+(-0.583013210018)*x[0]+(-0.683867300277)*x[1]**o+(0.754530541251)*x[1]
-        arg[3,3,2,1]=(-0.744667985181)*x[0]**o+(0.164165128978)*x[0]+(0.412340155958)*x[1]**o+(-0.38451107118)*x[1]
-        arg[3,4,0,0]=(0.216720755049)*x[0]**o+(-0.347803433722)*x[0]+(0.417376268797)*x[1]**o+(0.475787304652)*x[1]
-        arg[3,4,0,1]=(-0.737038295974)*x[0]**o+(0.579172519178)*x[0]+(-0.900272993672)*x[1]**o+(0.407018603625)*x[1]
-        arg[3,4,1,0]=(-0.898959236474)*x[0]**o+(-0.886636008121)*x[0]+(-0.901972610044)*x[1]**o+(-0.518393782318)*x[1]
-        arg[3,4,1,1]=(0.976342884921)*x[0]**o+(-0.273568319493)*x[0]+(-0.332424980846)*x[1]**o+(-0.0146661731139)*x[1]
-        arg[3,4,2,0]=(0.794792214027)*x[0]**o+(0.846927984413)*x[0]+(0.535818809709)*x[1]**o+(-0.49324400033)*x[1]
-        arg[3,4,2,1]=(0.695766308812)*x[0]**o+(-0.37923153689)*x[0]+(0.0633513026782)*x[1]**o+(0.12334892105)*x[1]
-        ref[0,0,0,0]=(0.912518456494)*x_ref[0]**o+(-0.828176151903)*x_ref[0]+(-0.313940298121)*x_ref[1]**o+(-0.850120336531)*x_ref[1]
-        ref[0,0,0,1]=(0.14415852783)*x_ref[0]**o+(-0.294155246668)*x_ref[0]+(0.562517248232)*x_ref[1]**o+(-0.204505938286)*x_ref[1]
-        ref[0,0,1,0]=(0.555455404368)*x_ref[0]**o+(0.916425343576)*x_ref[0]+(0.547252315693)*x_ref[1]**o+(-0.0992842367479)*x_ref[1]
-        ref[0,0,1,1]=(0.603632473928)*x_ref[0]**o+(0.505571549062)*x_ref[0]+(-0.490402921542)*x_ref[1]**o+(0.908624427316)*x_ref[1]
-        ref[0,0,2,0]=(0.729542308985)*x_ref[0]**o+(-0.654310868638)*x_ref[0]+(0.0845981276245)*x_ref[1]**o+(-0.95231604686)*x_ref[1]
-        ref[0,0,2,1]=(0.0511615606745)*x_ref[0]**o+(-0.939469887975)*x_ref[0]+(-0.206229418155)*x_ref[1]**o+(0.254879844701)*x_ref[1]
-        ref[0,1,0,0]=(0.257917344507)*x_ref[0]**o+(0.860729621288)*x_ref[0]+(0.489966193348)*x_ref[1]**o+(0.174897233858)*x_ref[1]
-        ref[0,1,0,1]=(0.336588362051)*x_ref[0]**o+(-0.690598635114)*x_ref[0]+(-0.0913735300483)*x_ref[1]**o+(-0.932914439004)*x_ref[1]
-        ref[0,1,1,0]=(0.244583093108)*x_ref[0]**o+(-0.827768167758)*x_ref[0]+(0.573065359412)*x_ref[1]**o+(0.176685515596)*x_ref[1]
-        ref[0,1,1,1]=(-0.520550726127)*x_ref[0]**o+(-0.605243177286)*x_ref[0]+(0.130549556226)*x_ref[1]**o+(0.750019884067)*x_ref[1]
-        ref[0,1,2,0]=(-0.680201627614)*x_ref[0]**o+(0.679925324882)*x_ref[0]+(-0.060408604263)*x_ref[1]**o+(0.568125689359)*x_ref[1]
-        ref[0,1,2,1]=(-0.111908859432)*x_ref[0]**o+(0.256521037018)*x_ref[0]+(0.332050616611)*x_ref[1]**o+(-0.0500016397683)*x_ref[1]
-        ref[0,2,0,0]=(-0.484953933663)*x_ref[0]**o+(0.628032211831)*x_ref[0]+(-0.63297141454)*x_ref[1]**o+(0.141016662755)*x_ref[1]
-        ref[0,2,0,1]=(-0.463920680465)*x_ref[0]**o+(-0.868825520511)*x_ref[0]+(-0.36594425006)*x_ref[1]**o+(-0.823052216578)*x_ref[1]
-        ref[0,2,1,0]=(0.972337802357)*x_ref[0]**o+(0.943605157343)*x_ref[0]+(-0.113950717844)*x_ref[1]**o+(-0.839596452897)*x_ref[1]
-        ref[0,2,1,1]=(-0.295562401302)*x_ref[0]**o+(0.735770621017)*x_ref[0]+(-0.183838912348)*x_ref[1]**o+(-0.929365380252)*x_ref[1]
-        ref[0,2,2,0]=(0.912886298388)*x_ref[0]**o+(0.847507982065)*x_ref[0]+(-0.341306036323)*x_ref[1]**o+(0.393627025978)*x_ref[1]
-        ref[0,2,2,1]=(-0.769650638386)*x_ref[0]**o+(-0.619672356488)*x_ref[0]+(-0.126894288906)*x_ref[1]**o+(0.231547632139)*x_ref[1]
-        ref[0,3,0,0]=(-0.884442976834)*x_ref[0]**o+(-0.0194505760676)*x_ref[0]+(-0.338764675072)*x_ref[1]**o+(0.723481600171)*x_ref[1]
-        ref[0,3,0,1]=(0.655973555091)*x_ref[0]**o+(-0.556230649412)*x_ref[0]+(-0.850356832441)*x_ref[1]**o+(0.115267314853)*x_ref[1]
-        ref[0,3,1,0]=(0.659628443559)*x_ref[0]**o+(-0.586677822491)*x_ref[0]+(0.135930588518)*x_ref[1]**o+(0.206866895948)*x_ref[1]
-        ref[0,3,1,1]=(-0.700258957557)*x_ref[0]**o+(-0.699774198764)*x_ref[0]+(-0.294009479186)*x_ref[1]**o+(0.848159666503)*x_ref[1]
-        ref[0,3,2,0]=(-0.927501754488)*x_ref[0]**o+(-0.981178071331)*x_ref[0]+(0.614074194451)*x_ref[1]**o+(0.711549573086)*x_ref[1]
-        ref[0,3,2,1]=(0.312434473198)*x_ref[0]**o+(-0.241506125991)*x_ref[0]+(-0.0840979088912)*x_ref[1]**o+(0.902948463117)*x_ref[1]
-        ref[0,4,0,0]=(-0.892269860242)*x_ref[0]**o+(0.823434435855)*x_ref[0]+(0.50499383365)*x_ref[1]**o+(0.763736541034)*x_ref[1]
-        ref[0,4,0,1]=(-0.606959691191)*x_ref[0]**o+(0.945562536791)*x_ref[0]+(-0.46271929481)*x_ref[1]**o+(0.929514432096)*x_ref[1]
-        ref[0,4,1,0]=(0.953382685939)*x_ref[0]**o+(0.553766359805)*x_ref[0]+(-0.191004010293)*x_ref[1]**o+(0.556369491698)*x_ref[1]
-        ref[0,4,1,1]=(-0.269402649165)*x_ref[0]**o+(-0.158926232076)*x_ref[0]+(-0.390038749681)*x_ref[1]**o+(0.553655192666)*x_ref[1]
-        ref[0,4,2,0]=(0.0785586372006)*x_ref[0]**o+(-0.778452221862)*x_ref[0]+(-0.927627273292)*x_ref[1]**o+(-0.187742405246)*x_ref[1]
-        ref[0,4,2,1]=(-0.965329945447)*x_ref[0]**o+(0.304539006089)*x_ref[0]+(0.213031689568)*x_ref[1]**o+(-0.2807790149)*x_ref[1]
-        ref[1,0,0,0]=(0.981534698569)*x_ref[0]**o+(0.466451685806)*x_ref[0]+(0.845322931856)*x_ref[1]**o+(0.582422032334)*x_ref[1]
-        ref[1,0,0,1]=(-0.0645798740394)*x_ref[0]**o+(0.0475214206619)*x_ref[0]+(-0.687759433076)*x_ref[1]**o+(0.403440938285)*x_ref[1]
-        ref[1,0,1,0]=(-0.317887773392)*x_ref[0]**o+(0.59101163416)*x_ref[0]+(0.658626263291)*x_ref[1]**o+(-0.618167594137)*x_ref[1]
-        ref[1,0,1,1]=(-0.314093092813)*x_ref[0]**o+(0.699933899942)*x_ref[0]+(0.824195260822)*x_ref[1]**o+(-0.42875327345)*x_ref[1]
-        ref[1,0,2,0]=(-0.254254956887)*x_ref[0]**o+(-0.912137080163)*x_ref[0]+(0.360457121452)*x_ref[1]**o+(-0.902596912588)*x_ref[1]
-        ref[1,0,2,1]=(-0.577214593683)*x_ref[0]**o+(-0.419495663008)*x_ref[0]+(-0.803459783331)*x_ref[1]**o+(0.490885513568)*x_ref[1]
-        ref[1,1,0,0]=(0.477947766892)*x_ref[0]**o+(-0.853046971581)*x_ref[0]+(0.576044041601)*x_ref[1]**o+(-0.447007701252)*x_ref[1]
-        ref[1,1,0,1]=(0.5886933409)*x_ref[0]**o+(0.253650778351)*x_ref[0]+(-0.198070684431)*x_ref[1]**o+(0.189479364528)*x_ref[1]
-        ref[1,1,1,0]=(-0.528744478872)*x_ref[0]**o+(-0.504072059557)*x_ref[0]+(-0.0161832474015)*x_ref[1]**o+(0.639592055966)*x_ref[1]
-        ref[1,1,1,1]=(-0.581844827169)*x_ref[0]**o+(0.997883224538)*x_ref[0]+(0.9354364489)*x_ref[1]**o+(0.884060785136)*x_ref[1]
-        ref[1,1,2,0]=(0.858226955817)*x_ref[0]**o+(0.707261698312)*x_ref[0]+(-0.738309111076)*x_ref[1]**o+(-0.644655976448)*x_ref[1]
-        ref[1,1,2,1]=(-0.254976445964)*x_ref[0]**o+(-0.624982185158)*x_ref[0]+(0.304854486996)*x_ref[1]**o+(0.597089811682)*x_ref[1]
-        ref[1,2,0,0]=(-0.625190759215)*x_ref[0]**o+(-0.267820197905)*x_ref[0]+(-0.721452024377)*x_ref[1]**o+(-0.830984245819)*x_ref[1]
-        ref[1,2,0,1]=(-0.972257608766)*x_ref[0]**o+(0.981368890544)*x_ref[0]+(-0.925886510064)*x_ref[1]**o+(-0.337107356862)*x_ref[1]
-        ref[1,2,1,0]=(-0.178932954207)*x_ref[0]**o+(-0.941789507374)*x_ref[0]+(0.360726744794)*x_ref[1]**o+(0.347621863123)*x_ref[1]
-        ref[1,2,1,1]=(-0.59790695611)*x_ref[0]**o+(0.552509013166)*x_ref[0]+(0.592412443998)*x_ref[1]**o+(0.105369637971)*x_ref[1]
-        ref[1,2,2,0]=(0.300713195225)*x_ref[0]**o+(0.814257503574)*x_ref[0]+(-0.281407483492)*x_ref[1]**o+(-0.803431681095)*x_ref[1]
-        ref[1,2,2,1]=(0.80113022942)*x_ref[0]**o+(0.749336171665)*x_ref[0]+(-0.0842928982283)*x_ref[1]**o+(-0.974041792058)*x_ref[1]
-        ref[1,3,0,0]=(0.533118876666)*x_ref[0]**o+(-0.00888178987567)*x_ref[0]+(0.372869213762)*x_ref[1]**o+(-0.652513683144)*x_ref[1]
-        ref[1,3,0,1]=(-0.295090222537)*x_ref[0]**o+(0.772749124303)*x_ref[0]+(-0.00857029468729)*x_ref[1]**o+(0.927794431125)*x_ref[1]
-        ref[1,3,1,0]=(-0.152537465441)*x_ref[0]**o+(0.154900534979)*x_ref[0]+(-0.488743959543)*x_ref[1]**o+(-0.0318497199232)*x_ref[1]
-        ref[1,3,1,1]=(-0.754333787921)*x_ref[0]**o+(-0.0583007358701)*x_ref[0]+(-0.050921106891)*x_ref[1]**o+(0.161426452156)*x_ref[1]
-        ref[1,3,2,0]=(0.387357469451)*x_ref[0]**o+(-0.213640305885)*x_ref[0]+(-0.844609663023)*x_ref[1]**o+(0.0761914594192)*x_ref[1]
-        ref[1,3,2,1]=(0.36964862459)*x_ref[0]**o+(0.887888401952)*x_ref[0]+(-0.933930511093)*x_ref[1]**o+(0.769046614932)*x_ref[1]
-        ref[1,4,0,0]=(0.680878887266)*x_ref[0]**o+(0.62930033679)*x_ref[0]+(0.894793542585)*x_ref[1]**o+(-0.636881609067)*x_ref[1]
-        ref[1,4,0,1]=(-0.346053756598)*x_ref[0]**o+(0.225254433923)*x_ref[0]+(-0.861052985621)*x_ref[1]**o+(0.415123108136)*x_ref[1]
-        ref[1,4,1,0]=(-0.997758408183)*x_ref[0]**o+(-0.265055614341)*x_ref[0]+(-0.7568881617)*x_ref[1]**o+(0.95144584777)*x_ref[1]
-        ref[1,4,1,1]=(0.227777912008)*x_ref[0]**o+(-0.83647660817)*x_ref[0]+(-0.275733410165)*x_ref[1]**o+(-0.971560248343)*x_ref[1]
-        ref[1,4,2,0]=(0.718803859114)*x_ref[0]**o+(-0.978966510682)*x_ref[0]+(0.463102438649)*x_ref[1]**o+(0.987805610534)*x_ref[1]
-        ref[1,4,2,1]=(-0.107543838917)*x_ref[0]**o+(-0.362684018694)*x_ref[0]+(-0.310926939373)*x_ref[1]**o+(-0.571571044712)*x_ref[1]
-        ref[2,0,0,0]=(-0.475977416182)*x_ref[0]**o+(-0.627173002609)*x_ref[0]+(-0.369962970984)*x_ref[1]**o+(-0.245077302537)*x_ref[1]
-        ref[2,0,0,1]=(0.913949611751)*x_ref[0]**o+(0.645611424617)*x_ref[0]+(0.639304734076)*x_ref[1]**o+(-0.12171441998)*x_ref[1]
-        ref[2,0,1,0]=(0.251434098263)*x_ref[0]**o+(-0.119898861407)*x_ref[0]+(-0.365614523709)*x_ref[1]**o+(-0.802928738296)*x_ref[1]
-        ref[2,0,1,1]=(0.756390927006)*x_ref[0]**o+(0.246578936199)*x_ref[0]+(0.714968085461)*x_ref[1]**o+(-0.929428808096)*x_ref[1]
-        ref[2,0,2,0]=(-0.516888361447)*x_ref[0]**o+(0.0344339250886)*x_ref[0]+(-0.383709788774)*x_ref[1]**o+(-0.437344417623)*x_ref[1]
-        ref[2,0,2,1]=(-0.219307162317)*x_ref[0]**o+(0.704909718842)*x_ref[0]+(-0.340454491855)*x_ref[1]**o+(-0.933866231773)*x_ref[1]
-        ref[2,1,0,0]=(-0.0618967891627)*x_ref[0]**o+(-0.0590712030789)*x_ref[0]+(0.116776433077)*x_ref[1]**o+(0.0241239764104)*x_ref[1]
-        ref[2,1,0,1]=(-0.802207645638)*x_ref[0]**o+(0.590732740531)*x_ref[0]+(-0.25990272933)*x_ref[1]**o+(-0.257633805416)*x_ref[1]
-        ref[2,1,1,0]=(0.827623274379)*x_ref[0]**o+(-0.450310573599)*x_ref[0]+(0.213809775826)*x_ref[1]**o+(-0.905410777787)*x_ref[1]
-        ref[2,1,1,1]=(-0.624510830356)*x_ref[0]**o+(-0.705682607787)*x_ref[0]+(0.430105716993)*x_ref[1]**o+(0.975510832521)*x_ref[1]
-        ref[2,1,2,0]=(-0.297562223309)*x_ref[0]**o+(-0.99090348994)*x_ref[0]+(0.548589416291)*x_ref[1]**o+(0.591718478583)*x_ref[1]
-        ref[2,1,2,1]=(-0.531899919376)*x_ref[0]**o+(-0.227453719581)*x_ref[0]+(-0.131664806128)*x_ref[1]**o+(0.0521895817509)*x_ref[1]
-        ref[2,2,0,0]=(-0.592291745786)*x_ref[0]**o+(-0.586879961972)*x_ref[0]+(0.563196552327)*x_ref[1]**o+(0.876989321187)*x_ref[1]
-        ref[2,2,0,1]=(-0.273360445369)*x_ref[0]**o+(-0.714740527775)*x_ref[0]+(-0.647699497837)*x_ref[1]**o+(-0.0405089612762)*x_ref[1]
-        ref[2,2,1,0]=(-0.536629732224)*x_ref[0]**o+(0.72656373966)*x_ref[0]+(0.986630594165)*x_ref[1]**o+(0.0741630711667)*x_ref[1]
-        ref[2,2,1,1]=(0.770746088838)*x_ref[0]**o+(-0.219279833426)*x_ref[0]+(0.875445174779)*x_ref[1]**o+(-0.947889926444)*x_ref[1]
-        ref[2,2,2,0]=(-0.41428815119)*x_ref[0]**o+(-0.696166268903)*x_ref[0]+(-0.96838062553)*x_ref[1]**o+(0.781394205899)*x_ref[1]
-        ref[2,2,2,1]=(-0.810267960752)*x_ref[0]**o+(-0.873632687702)*x_ref[0]+(0.0131971321611)*x_ref[1]**o+(-0.552767192193)*x_ref[1]
-        ref[2,3,0,0]=(-0.216091366291)*x_ref[0]**o+(-0.17824047472)*x_ref[0]+(-0.4644515725)*x_ref[1]**o+(0.135819458957)*x_ref[1]
-        ref[2,3,0,1]=(-0.0823616523105)*x_ref[0]**o+(0.33121362151)*x_ref[0]+(0.926719919839)*x_ref[1]**o+(0.663475641636)*x_ref[1]
-        ref[2,3,1,0]=(-0.278303066047)*x_ref[0]**o+(-0.457286378314)*x_ref[0]+(0.186792859092)*x_ref[1]**o+(-0.734245612464)*x_ref[1]
-        ref[2,3,1,1]=(0.810871459779)*x_ref[0]**o+(-0.706641995324)*x_ref[0]+(-0.287827176091)*x_ref[1]**o+(0.453216090282)*x_ref[1]
-        ref[2,3,2,0]=(0.83826221049)*x_ref[0]**o+(0.556887792111)*x_ref[0]+(-0.000231102245991)*x_ref[1]**o+(-0.440730958954)*x_ref[1]
-        ref[2,3,2,1]=(-0.455087877907)*x_ref[0]**o+(-0.132259634036)*x_ref[0]+(-0.492728335525)*x_ref[1]**o+(-0.880311317777)*x_ref[1]
-        ref[2,4,0,0]=(-0.303141352388)*x_ref[0]**o+(0.426137046804)*x_ref[0]+(0.788934776738)*x_ref[1]**o+(0.157477785179)*x_ref[1]
-        ref[2,4,0,1]=(0.603411288614)*x_ref[0]**o+(-0.533561451987)*x_ref[0]+(-0.901259210942)*x_ref[1]**o+(0.547372624746)*x_ref[1]
-        ref[2,4,1,0]=(0.69517961739)*x_ref[0]**o+(-0.106282888246)*x_ref[0]+(0.257484565681)*x_ref[1]**o+(0.655749633294)*x_ref[1]
-        ref[2,4,1,1]=(-0.072748573118)*x_ref[0]**o+(0.905966560113)*x_ref[0]+(0.433145718123)*x_ref[1]**o+(0.187620401615)*x_ref[1]
-        ref[2,4,2,0]=(-0.0280176325954)*x_ref[0]**o+(0.489610131347)*x_ref[0]+(-0.740554922134)*x_ref[1]**o+(-0.85045302096)*x_ref[1]
-        ref[2,4,2,1]=(-0.158503180709)*x_ref[0]**o+(0.525929643075)*x_ref[0]+(-0.352022652515)*x_ref[1]**o+(-0.706553104932)*x_ref[1]
-        ref[3,0,0,0]=(-0.837316508127)*x_ref[0]**o+(-0.89490181779)*x_ref[0]+(0.510084075291)*x_ref[1]**o+(0.321206310024)*x_ref[1]
-        ref[3,0,0,1]=(-0.325038591079)*x_ref[0]**o+(0.140342922753)*x_ref[0]+(-0.937466403004)*x_ref[1]**o+(0.580557383497)*x_ref[1]
-        ref[3,0,1,0]=(-0.939713654062)*x_ref[0]**o+(-0.394660244166)*x_ref[0]+(0.762376614557)*x_ref[1]**o+(-0.135565547532)*x_ref[1]
-        ref[3,0,1,1]=(0.0275332524464)*x_ref[0]**o+(0.368737701882)*x_ref[0]+(0.983641372218)*x_ref[1]**o+(0.573815516366)*x_ref[1]
-        ref[3,0,2,0]=(0.816957570314)*x_ref[0]**o+(-0.357626892562)*x_ref[0]+(-0.368933149642)*x_ref[1]**o+(-0.692502486914)*x_ref[1]
-        ref[3,0,2,1]=(-0.372408810926)*x_ref[0]**o+(-0.113036390416)*x_ref[0]+(-0.355880297003)*x_ref[1]**o+(0.755478191481)*x_ref[1]
-        ref[3,1,0,0]=(0.0399012900832)*x_ref[0]**o+(-0.879576900086)*x_ref[0]+(-0.660858776134)*x_ref[1]**o+(-0.59837040429)*x_ref[1]
-        ref[3,1,0,1]=(0.569397128496)*x_ref[0]**o+(-0.138333417746)*x_ref[0]+(0.257769147727)*x_ref[1]**o+(0.174737141027)*x_ref[1]
-        ref[3,1,1,0]=(-0.67938408823)*x_ref[0]**o+(0.862731161981)*x_ref[0]+(-0.792538485264)*x_ref[1]**o+(-0.0805197796157)*x_ref[1]
-        ref[3,1,1,1]=(0.0113523229279)*x_ref[0]**o+(0.475393597561)*x_ref[0]+(-0.705748021886)*x_ref[1]**o+(0.00836460135285)*x_ref[1]
-        ref[3,1,2,0]=(0.463839509799)*x_ref[0]**o+(-0.12663544643)*x_ref[0]+(0.353158399738)*x_ref[1]**o+(0.674929537597)*x_ref[1]
-        ref[3,1,2,1]=(-0.6019896019)*x_ref[0]**o+(-0.638280685565)*x_ref[0]+(0.280047072988)*x_ref[1]**o+(0.569239958138)*x_ref[1]
-        ref[3,2,0,0]=(-0.113906500346)*x_ref[0]**o+(-0.493494498501)*x_ref[0]+(-0.686419229162)*x_ref[1]**o+(-0.0727046763516)*x_ref[1]
-        ref[3,2,0,1]=(-0.302092112795)*x_ref[0]**o+(-0.74819167)*x_ref[0]+(-0.478908975282)*x_ref[1]**o+(0.430024789627)*x_ref[1]
-        ref[3,2,1,0]=(0.353535608984)*x_ref[0]**o+(-0.743408549264)*x_ref[0]+(-0.069122881538)*x_ref[1]**o+(-0.0767595089529)*x_ref[1]
-        ref[3,2,1,1]=(-0.629946386234)*x_ref[0]**o+(0.851779590894)*x_ref[0]+(0.728577108695)*x_ref[1]**o+(-0.366983040147)*x_ref[1]
-        ref[3,2,2,0]=(0.1685167508)*x_ref[0]**o+(0.149999747637)*x_ref[0]+(0.709320430374)*x_ref[1]**o+(-0.280950677222)*x_ref[1]
-        ref[3,2,2,1]=(-0.956164974578)*x_ref[0]**o+(0.240460380901)*x_ref[0]+(-0.2820176577)*x_ref[1]**o+(-0.595667156955)*x_ref[1]
-        ref[3,3,0,0]=(-0.0711295055938)*x_ref[0]**o+(-0.314513251791)*x_ref[0]+(-0.41924591293)*x_ref[1]**o+(0.0813197780959)*x_ref[1]
-        ref[3,3,0,1]=(-0.230592584877)*x_ref[0]**o+(-0.488005144715)*x_ref[0]+(-0.450611759976)*x_ref[1]**o+(-0.0571152769768)*x_ref[1]
-        ref[3,3,1,0]=(-0.608255699014)*x_ref[0]**o+(-0.697324108575)*x_ref[0]+(-0.885935900746)*x_ref[1]**o+(-0.884497550016)*x_ref[1]
-        ref[3,3,1,1]=(0.857286225292)*x_ref[0]**o+(0.509954550626)*x_ref[0]+(0.182030821433)*x_ref[1]**o+(-0.268076060316)*x_ref[1]
-        ref[3,3,2,0]=(-0.77322653479)*x_ref[0]**o+(-0.583013210018)*x_ref[0]+(-0.683867300277)*x_ref[1]**o+(0.754530541251)*x_ref[1]
-        ref[3,3,2,1]=(-0.744667985181)*x_ref[0]**o+(0.164165128978)*x_ref[0]+(0.412340155958)*x_ref[1]**o+(-0.38451107118)*x_ref[1]
-        ref[3,4,0,0]=(0.216720755049)*x_ref[0]**o+(-0.347803433722)*x_ref[0]+(0.417376268797)*x_ref[1]**o+(0.475787304652)*x_ref[1]
-        ref[3,4,0,1]=(-0.737038295974)*x_ref[0]**o+(0.579172519178)*x_ref[0]+(-0.900272993672)*x_ref[1]**o+(0.407018603625)*x_ref[1]
-        ref[3,4,1,0]=(-0.898959236474)*x_ref[0]**o+(-0.886636008121)*x_ref[0]+(-0.901972610044)*x_ref[1]**o+(-0.518393782318)*x_ref[1]
-        ref[3,4,1,1]=(0.976342884921)*x_ref[0]**o+(-0.273568319493)*x_ref[0]+(-0.332424980846)*x_ref[1]**o+(-0.0146661731139)*x_ref[1]
-        ref[3,4,2,0]=(0.794792214027)*x_ref[0]**o+(0.846927984413)*x_ref[0]+(0.535818809709)*x_ref[1]**o+(-0.49324400033)*x_ref[1]
-        ref[3,4,2,1]=(0.695766308812)*x_ref[0]**o+(-0.37923153689)*x_ref[0]+(0.0633513026782)*x_ref[1]**o+(0.12334892105)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.401901998082)*x[0]**o+(-0.805091116808)*x[0]+(0.997659882792)*x[1]**o+(-0.953957389492)*x[1]+(-0.450185408289)*x[2]**o+(0.636472207773)*x[2]
-        arg[0,0,0,1]=(-0.786386817128)*x[0]**o+(-0.882559775393)*x[0]+(0.117871400819)*x[1]**o+(-0.625922274774)*x[1]+(0.410431886931)*x[2]**o+(-0.979356501067)*x[2]
-        arg[0,0,1,0]=(0.686025409275)*x[0]**o+(-0.19806907659)*x[0]+(-0.710420224449)*x[1]**o+(-0.839236953983)*x[1]+(-0.79971896093)*x[2]**o+(0.378944111319)*x[2]
-        arg[0,0,1,1]=(0.771205112484)*x[0]**o+(-0.007083192859)*x[0]+(0.672918588001)*x[1]**o+(-0.351652495793)*x[1]+(-0.841767161187)*x[2]**o+(-0.345642373014)*x[2]
-        arg[0,0,2,0]=(0.266930729015)*x[0]**o+(-0.873808152307)*x[0]+(0.206466759135)*x[1]**o+(0.539888649948)*x[1]+(0.17985862191)*x[2]**o+(0.240651460153)*x[2]
-        arg[0,0,2,1]=(-0.232569768041)*x[0]**o+(-0.579841454072)*x[0]+(-0.706956104891)*x[1]**o+(0.822863815698)*x[1]+(0.345774991358)*x[2]**o+(-0.0848567668311)*x[2]
-        arg[0,1,0,0]=(0.51593851507)*x[0]**o+(-0.233342434349)*x[0]+(-0.92498298026)*x[1]**o+(0.164540234829)*x[1]+(0.356559744499)*x[2]**o+(0.483902511717)*x[2]
-        arg[0,1,0,1]=(-0.811509654443)*x[0]**o+(0.73929453189)*x[0]+(0.256205706418)*x[1]**o+(-0.667924913793)*x[1]+(0.266065641257)*x[2]**o+(0.856490258029)*x[2]
-        arg[0,1,1,0]=(0.502051590284)*x[0]**o+(0.927283797128)*x[0]+(0.500854521411)*x[1]**o+(-0.486326996369)*x[1]+(-0.327578523685)*x[2]**o+(-0.28106070397)*x[2]
-        arg[0,1,1,1]=(0.201740014513)*x[0]**o+(-0.166988241759)*x[0]+(-0.513072955566)*x[1]**o+(0.67179532417)*x[1]+(-0.72135980627)*x[2]**o+(0.763548886467)*x[2]
-        arg[0,1,2,0]=(0.3995590338)*x[0]**o+(0.433286929621)*x[0]+(-0.287309453792)*x[1]**o+(-0.0671679443074)*x[1]+(-0.80815399993)*x[2]**o+(-0.398740362114)*x[2]
-        arg[0,1,2,1]=(-0.16314640684)*x[0]**o+(-0.698681697367)*x[0]+(-0.11609738418)*x[1]**o+(-0.798465154739)*x[1]+(-0.169052628971)*x[2]**o+(-0.880316962539)*x[2]
-        arg[0,2,0,0]=(-0.219731279442)*x[0]**o+(0.731464233112)*x[0]+(0.637811533993)*x[1]**o+(0.381218512692)*x[1]+(-0.181357790048)*x[2]**o+(-0.296793024723)*x[2]
-        arg[0,2,0,1]=(0.566451624572)*x[0]**o+(0.302904935559)*x[0]+(-0.771526665232)*x[1]**o+(0.460577683302)*x[1]+(-0.921312455507)*x[2]**o+(0.604299765394)*x[2]
-        arg[0,2,1,0]=(-0.0887516895197)*x[0]**o+(0.872208558285)*x[0]+(-0.306564750999)*x[1]**o+(0.841982500263)*x[1]+(-0.550398737046)*x[2]**o+(-0.869697162427)*x[2]
-        arg[0,2,1,1]=(-0.652471383912)*x[0]**o+(0.634592304393)*x[0]+(0.0709212473167)*x[1]**o+(-0.671330082579)*x[1]+(-0.232895004478)*x[2]**o+(0.479008351165)*x[2]
-        arg[0,2,2,0]=(-0.0764115046136)*x[0]**o+(0.649230346025)*x[0]+(0.544503480999)*x[1]**o+(0.788838981797)*x[1]+(0.416236148267)*x[2]**o+(0.722979541918)*x[2]
-        arg[0,2,2,1]=(-0.0776368628837)*x[0]**o+(0.801984674386)*x[0]+(0.443670313486)*x[1]**o+(0.424676792255)*x[1]+(-0.895989937982)*x[2]**o+(0.0774648143589)*x[2]
-        arg[0,3,0,0]=(-0.39041318438)*x[0]**o+(-0.174335409262)*x[0]+(0.658666482337)*x[1]**o+(0.23060605921)*x[1]+(-0.336603364419)*x[2]**o+(0.871530192198)*x[2]
-        arg[0,3,0,1]=(-0.493104661363)*x[0]**o+(0.590779697499)*x[0]+(-0.903897457443)*x[1]**o+(-0.377640520704)*x[1]+(0.227174544833)*x[2]**o+(-0.860150483539)*x[2]
-        arg[0,3,1,0]=(-0.093367253954)*x[0]**o+(0.159230499811)*x[0]+(-0.731396509936)*x[1]**o+(0.600088148838)*x[1]+(0.829175660147)*x[2]**o+(-0.435878280919)*x[2]
-        arg[0,3,1,1]=(0.665125540711)*x[0]**o+(-0.92128737118)*x[0]+(-0.33260297543)*x[1]**o+(0.682569476816)*x[1]+(0.999761405058)*x[2]**o+(-0.748303702618)*x[2]
-        arg[0,3,2,0]=(-0.430442277525)*x[0]**o+(-0.841437664378)*x[0]+(-0.374267371055)*x[1]**o+(0.667860327373)*x[1]+(0.694185699238)*x[2]**o+(-0.673629629622)*x[2]
-        arg[0,3,2,1]=(0.304808617243)*x[0]**o+(-0.894407776037)*x[0]+(-0.758585281699)*x[1]**o+(0.20519963241)*x[1]+(0.538222015181)*x[2]**o+(-0.792962435573)*x[2]
-        arg[0,4,0,0]=(0.568300300269)*x[0]**o+(0.407455936625)*x[0]+(0.980898344535)*x[1]**o+(0.988220474461)*x[1]+(0.0598892620089)*x[2]**o+(-0.279555207723)*x[2]
-        arg[0,4,0,1]=(-0.208391854989)*x[0]**o+(0.9428019078)*x[0]+(-0.540916877275)*x[1]**o+(-0.427185538555)*x[1]+(-0.879268085857)*x[2]**o+(0.025102321099)*x[2]
-        arg[0,4,1,0]=(0.412690112527)*x[0]**o+(-0.957376863734)*x[0]+(-0.913623139719)*x[1]**o+(-0.462418849979)*x[1]+(0.463336747019)*x[2]**o+(0.330747531293)*x[2]
-        arg[0,4,1,1]=(-0.632140552118)*x[0]**o+(0.830769577671)*x[0]+(-0.888012251479)*x[1]**o+(-0.0560181569699)*x[1]+(-0.70068099248)*x[2]**o+(0.834483253039)*x[2]
-        arg[0,4,2,0]=(0.0429717567385)*x[0]**o+(-0.691784042595)*x[0]+(-0.264988764713)*x[1]**o+(0.359873170931)*x[1]+(-0.116275128437)*x[2]**o+(0.0348873917345)*x[2]
-        arg[0,4,2,1]=(-0.203754358311)*x[0]**o+(0.177896174646)*x[0]+(-0.0785920580727)*x[1]**o+(-0.124905949184)*x[1]+(0.968871355367)*x[2]**o+(-0.0369722247589)*x[2]
-        arg[1,0,0,0]=(0.594851756786)*x[0]**o+(-0.594400822936)*x[0]+(0.868401350949)*x[1]**o+(0.186739616297)*x[1]+(-0.937219946754)*x[2]**o+(-0.248916422131)*x[2]
-        arg[1,0,0,1]=(-0.639865978203)*x[0]**o+(-0.00990375501714)*x[0]+(-0.038266357411)*x[1]**o+(-0.741522380136)*x[1]+(0.460572922772)*x[2]**o+(0.4314205896)*x[2]
-        arg[1,0,1,0]=(-0.460110413486)*x[0]**o+(-0.0964934735182)*x[0]+(0.474209024352)*x[1]**o+(-0.928476110805)*x[1]+(0.598621411487)*x[2]**o+(-0.00858812754345)*x[2]
-        arg[1,0,1,1]=(0.936466172807)*x[0]**o+(-0.363937334197)*x[0]+(-0.540224651799)*x[1]**o+(0.484530722263)*x[1]+(0.675416993296)*x[2]**o+(0.89657344343)*x[2]
-        arg[1,0,2,0]=(-0.713050692555)*x[0]**o+(-0.00851892179229)*x[0]+(0.689494113809)*x[1]**o+(0.633341028044)*x[1]+(0.272726911113)*x[2]**o+(-0.122017566819)*x[2]
-        arg[1,0,2,1]=(0.793152080981)*x[0]**o+(0.287379739639)*x[0]+(0.304047372771)*x[1]**o+(-0.509079361053)*x[1]+(0.888302006985)*x[2]**o+(-0.297023045775)*x[2]
-        arg[1,1,0,0]=(-0.69695118901)*x[0]**o+(0.505182668512)*x[0]+(0.827555590952)*x[1]**o+(-0.777232447056)*x[1]+(-0.460918138036)*x[2]**o+(0.782090206922)*x[2]
-        arg[1,1,0,1]=(-0.435398535566)*x[0]**o+(-0.0997593681984)*x[0]+(0.140250252691)*x[1]**o+(-0.0204469256488)*x[1]+(-0.445836771028)*x[2]**o+(-0.775366037861)*x[2]
-        arg[1,1,1,0]=(0.918015347957)*x[0]**o+(-0.491940111489)*x[0]+(0.793071617663)*x[1]**o+(-0.607035294859)*x[1]+(0.610076618566)*x[2]**o+(0.148116733513)*x[2]
-        arg[1,1,1,1]=(0.224062518811)*x[0]**o+(-0.145897156735)*x[0]+(0.165380866901)*x[1]**o+(0.910562981814)*x[1]+(-0.406620561548)*x[2]**o+(0.528862812468)*x[2]
-        arg[1,1,2,0]=(0.85148444093)*x[0]**o+(0.13210280653)*x[0]+(0.364136256712)*x[1]**o+(0.520388575386)*x[1]+(0.0145641287346)*x[2]**o+(-0.7849036351)*x[2]
-        arg[1,1,2,1]=(0.493837193832)*x[0]**o+(-0.193326176569)*x[0]+(-0.665920972154)*x[1]**o+(-0.321645070095)*x[1]+(0.0209354853869)*x[2]**o+(-0.328315981752)*x[2]
-        arg[1,2,0,0]=(-0.349281164766)*x[0]**o+(-0.318415198113)*x[0]+(-0.687972781234)*x[1]**o+(0.91825998605)*x[1]+(0.396868773798)*x[2]**o+(0.998204458027)*x[2]
-        arg[1,2,0,1]=(-0.967493222935)*x[0]**o+(-0.721128465653)*x[0]+(-0.672178802974)*x[1]**o+(0.0924145224431)*x[1]+(0.114040587594)*x[2]**o+(0.707623895537)*x[2]
-        arg[1,2,1,0]=(-0.253327088773)*x[0]**o+(0.206063827625)*x[0]+(0.355152654895)*x[1]**o+(-0.27339285621)*x[1]+(-0.0135567122291)*x[2]**o+(-0.983990446362)*x[2]
-        arg[1,2,1,1]=(0.98471687132)*x[0]**o+(0.262902745655)*x[0]+(-0.589359138227)*x[1]**o+(-0.0982548958556)*x[1]+(-0.526161200133)*x[2]**o+(-0.850939484752)*x[2]
-        arg[1,2,2,0]=(0.37583596705)*x[0]**o+(0.274845981222)*x[0]+(0.601331110943)*x[1]**o+(0.788294448218)*x[1]+(0.366445166459)*x[2]**o+(-0.554935072394)*x[2]
-        arg[1,2,2,1]=(-0.986387850237)*x[0]**o+(0.68772989781)*x[0]+(0.345166604933)*x[1]**o+(0.930376726384)*x[1]+(0.760974421701)*x[2]**o+(0.261797396808)*x[2]
-        arg[1,3,0,0]=(-0.171005013523)*x[0]**o+(-0.339229596812)*x[0]+(-0.150317419556)*x[1]**o+(-0.0146533427463)*x[1]+(0.957020663875)*x[2]**o+(0.616513940347)*x[2]
-        arg[1,3,0,1]=(-0.0727328269499)*x[0]**o+(-0.635591748073)*x[0]+(-0.502426989774)*x[1]**o+(0.772595119619)*x[1]+(-0.76006511271)*x[2]**o+(-0.665920288084)*x[2]
-        arg[1,3,1,0]=(-0.394284205622)*x[0]**o+(-0.105959165811)*x[0]+(0.72649045701)*x[1]**o+(-0.970276379473)*x[1]+(-0.236520349415)*x[2]**o+(0.994973267783)*x[2]
-        arg[1,3,1,1]=(-0.444149867906)*x[0]**o+(0.748449201475)*x[0]+(0.419604170756)*x[1]**o+(-0.0291702705178)*x[1]+(-0.109580142628)*x[2]**o+(-0.0791870699838)*x[2]
-        arg[1,3,2,0]=(-0.629657820523)*x[0]**o+(-0.995576552624)*x[0]+(0.530135462206)*x[1]**o+(0.197336335845)*x[1]+(0.0224815558807)*x[2]**o+(0.240498463912)*x[2]
-        arg[1,3,2,1]=(0.52933948346)*x[0]**o+(0.98353913011)*x[0]+(0.0217614943138)*x[1]**o+(0.0157778453682)*x[1]+(0.177956932986)*x[2]**o+(0.234629778706)*x[2]
-        arg[1,4,0,0]=(0.593028367137)*x[0]**o+(0.0340892538994)*x[0]+(-0.0295133170051)*x[1]**o+(0.0865921041963)*x[1]+(0.641131718656)*x[2]**o+(0.788858018609)*x[2]
-        arg[1,4,0,1]=(-0.283333820634)*x[0]**o+(0.864482725099)*x[0]+(-0.560218794286)*x[1]**o+(-0.0083115362546)*x[1]+(0.726423285129)*x[2]**o+(0.031531339166)*x[2]
-        arg[1,4,1,0]=(0.801452411554)*x[0]**o+(-0.59916393038)*x[0]+(-0.106568863591)*x[1]**o+(0.357442125133)*x[1]+(-0.203380280132)*x[2]**o+(-0.129031606441)*x[2]
-        arg[1,4,1,1]=(-0.589220928637)*x[0]**o+(-0.308949389428)*x[0]+(0.785549858338)*x[1]**o+(-0.131153853015)*x[1]+(-0.30571855555)*x[2]**o+(-0.329634802588)*x[2]
-        arg[1,4,2,0]=(-0.479686944)*x[0]**o+(-0.707702026873)*x[0]+(0.635894172352)*x[1]**o+(0.370673635069)*x[1]+(0.942862875991)*x[2]**o+(-0.846943456738)*x[2]
-        arg[1,4,2,1]=(-0.403737324968)*x[0]**o+(0.101664426734)*x[0]+(-0.677093482354)*x[1]**o+(-0.36526066745)*x[1]+(-0.0889619136182)*x[2]**o+(-0.772491940844)*x[2]
-        arg[2,0,0,0]=(0.753148325987)*x[0]**o+(-0.342843083128)*x[0]+(0.812661029553)*x[1]**o+(-0.112683035459)*x[1]+(0.900976470275)*x[2]**o+(0.00934086955102)*x[2]
-        arg[2,0,0,1]=(-0.682315007143)*x[0]**o+(-0.694069900861)*x[0]+(-0.469082247747)*x[1]**o+(-0.522165903301)*x[1]+(-0.0997886221924)*x[2]**o+(-0.954161552419)*x[2]
-        arg[2,0,1,0]=(0.780125539705)*x[0]**o+(-0.445331450225)*x[0]+(-0.282765510424)*x[1]**o+(-0.0131898361592)*x[1]+(-0.200186433923)*x[2]**o+(0.715139435696)*x[2]
-        arg[2,0,1,1]=(-0.132310660786)*x[0]**o+(-0.0981344234369)*x[0]+(0.959297529475)*x[1]**o+(-0.85944894515)*x[1]+(-0.396258659619)*x[2]**o+(-0.09672066185)*x[2]
-        arg[2,0,2,0]=(-0.344134014191)*x[0]**o+(0.534345864287)*x[0]+(0.797209509484)*x[1]**o+(0.0479050101499)*x[1]+(0.13620476987)*x[2]**o+(0.82708115383)*x[2]
-        arg[2,0,2,1]=(-0.342509328238)*x[0]**o+(-0.833164493006)*x[0]+(0.472047721532)*x[1]**o+(0.301613158637)*x[1]+(0.858691679638)*x[2]**o+(-0.691744164006)*x[2]
-        arg[2,1,0,0]=(0.498979390299)*x[0]**o+(0.371513881824)*x[0]+(-0.243506167971)*x[1]**o+(-0.245423890439)*x[1]+(-0.0494707840274)*x[2]**o+(0.0965573709928)*x[2]
-        arg[2,1,0,1]=(0.665982455862)*x[0]**o+(-0.409710866336)*x[0]+(0.669257568046)*x[1]**o+(0.711947704788)*x[1]+(-0.0362568635785)*x[2]**o+(-0.30394278188)*x[2]
-        arg[2,1,1,0]=(0.296245249928)*x[0]**o+(0.132631019281)*x[0]+(-0.376880152158)*x[1]**o+(0.303184156241)*x[1]+(0.836046560882)*x[2]**o+(0.195205645106)*x[2]
-        arg[2,1,1,1]=(-0.971045820953)*x[0]**o+(0.154708896467)*x[0]+(-0.663844656602)*x[1]**o+(-0.0873797588245)*x[1]+(0.985123372542)*x[2]**o+(0.349554922131)*x[2]
-        arg[2,1,2,0]=(-0.0117443431348)*x[0]**o+(-0.71980503985)*x[0]+(0.175348078994)*x[1]**o+(-0.883987892161)*x[1]+(0.0587275450458)*x[2]**o+(0.464811715548)*x[2]
-        arg[2,1,2,1]=(-0.309202575765)*x[0]**o+(-0.528513248453)*x[0]+(-0.509298303972)*x[1]**o+(-0.228278863496)*x[1]+(0.933917053676)*x[2]**o+(-0.823678942264)*x[2]
-        arg[2,2,0,0]=(0.374387386929)*x[0]**o+(0.64969993847)*x[0]+(-0.939822635641)*x[1]**o+(0.578249430422)*x[1]+(-0.973412660635)*x[2]**o+(0.484052718386)*x[2]
-        arg[2,2,0,1]=(-0.972635162618)*x[0]**o+(-0.255007433802)*x[0]+(0.134165187097)*x[1]**o+(0.313213615976)*x[1]+(0.143298148686)*x[2]**o+(0.901819440229)*x[2]
-        arg[2,2,1,0]=(0.868173256315)*x[0]**o+(-0.532325343453)*x[0]+(-0.712500880845)*x[1]**o+(0.216943462308)*x[1]+(0.733920091212)*x[2]**o+(0.0992400603383)*x[2]
-        arg[2,2,1,1]=(0.642839350527)*x[0]**o+(0.127721543559)*x[0]+(-0.152686523032)*x[1]**o+(-0.399032361234)*x[1]+(0.317014518842)*x[2]**o+(0.905538790115)*x[2]
-        arg[2,2,2,0]=(0.685267932413)*x[0]**o+(-0.167571547782)*x[0]+(-0.213446144405)*x[1]**o+(0.420270456377)*x[1]+(0.827725350621)*x[2]**o+(-0.920242274399)*x[2]
-        arg[2,2,2,1]=(-0.507424593437)*x[0]**o+(-0.694222840019)*x[0]+(-0.904108970188)*x[1]**o+(-0.750899614966)*x[1]+(0.783997553302)*x[2]**o+(0.196327513447)*x[2]
-        arg[2,3,0,0]=(-0.473900600479)*x[0]**o+(-0.464347097789)*x[0]+(-0.472423358671)*x[1]**o+(0.373786456364)*x[1]+(-0.989371300414)*x[2]**o+(-0.959508065239)*x[2]
-        arg[2,3,0,1]=(0.174375189399)*x[0]**o+(0.925503059886)*x[0]+(-0.647274384723)*x[1]**o+(-0.577149479679)*x[1]+(0.171298877768)*x[2]**o+(-0.936612100882)*x[2]
-        arg[2,3,1,0]=(0.482959343396)*x[0]**o+(0.842243554011)*x[0]+(0.814423633314)*x[1]**o+(-0.989445050315)*x[1]+(0.817933433065)*x[2]**o+(0.552396881404)*x[2]
-        arg[2,3,1,1]=(0.55641736229)*x[0]**o+(0.498094640058)*x[0]+(0.0890113606037)*x[1]**o+(0.36592723553)*x[1]+(0.458607593386)*x[2]**o+(0.603047420063)*x[2]
-        arg[2,3,2,0]=(0.884515080124)*x[0]**o+(-0.561898381022)*x[0]+(-0.292475503834)*x[1]**o+(0.425634423478)*x[1]+(0.65813323252)*x[2]**o+(-0.548850399842)*x[2]
-        arg[2,3,2,1]=(-0.72895566982)*x[0]**o+(-0.569405588005)*x[0]+(0.117770875594)*x[1]**o+(-0.33515735969)*x[1]+(0.102062736382)*x[2]**o+(0.611532417683)*x[2]
-        arg[2,4,0,0]=(-0.669208630424)*x[0]**o+(0.944393014177)*x[0]+(-0.00345511889683)*x[1]**o+(0.0695279595783)*x[1]+(0.496948250833)*x[2]**o+(-0.899750463971)*x[2]
-        arg[2,4,0,1]=(-0.387828717292)*x[0]**o+(0.621172267004)*x[0]+(-0.280632674111)*x[1]**o+(0.401702567575)*x[1]+(-0.65554489378)*x[2]**o+(0.403018047007)*x[2]
-        arg[2,4,1,0]=(-0.0770246925803)*x[0]**o+(0.52913302745)*x[0]+(0.922468724357)*x[1]**o+(-0.304442750439)*x[1]+(-0.556575079059)*x[2]**o+(-0.725790672251)*x[2]
-        arg[2,4,1,1]=(-0.828378342911)*x[0]**o+(-0.0696370821776)*x[0]+(0.394018581667)*x[1]**o+(-0.251099848269)*x[1]+(-0.29878985656)*x[2]**o+(0.925753371056)*x[2]
-        arg[2,4,2,0]=(-0.818277786029)*x[0]**o+(0.225862354706)*x[0]+(-0.629050212595)*x[1]**o+(0.139186107062)*x[1]+(-0.0134835519238)*x[2]**o+(0.301899528641)*x[2]
-        arg[2,4,2,1]=(-0.783053684767)*x[0]**o+(-0.0926938783599)*x[0]+(0.519034210352)*x[1]**o+(-0.494564657126)*x[1]+(0.536117310622)*x[2]**o+(0.6278756634)*x[2]
-        arg[3,0,0,0]=(-0.694353957685)*x[0]**o+(-0.361037363965)*x[0]+(-0.327004091885)*x[1]**o+(-0.765735142884)*x[1]+(-0.810915729713)*x[2]**o+(0.0640539311609)*x[2]
-        arg[3,0,0,1]=(-0.131601548312)*x[0]**o+(0.271587756708)*x[0]+(0.322486168005)*x[1]**o+(0.238086581801)*x[1]+(-0.488081720555)*x[2]**o+(0.607278995635)*x[2]
-        arg[3,0,1,0]=(0.903075418102)*x[0]**o+(-0.738609834848)*x[0]+(-0.165097989126)*x[1]**o+(-0.25967140914)*x[1]+(0.271649887428)*x[2]**o+(-0.786131648727)*x[2]
-        arg[3,0,1,1]=(-0.963442989157)*x[0]**o+(-0.240205602334)*x[0]+(0.102153389731)*x[1]**o+(-0.106402434995)*x[1]+(-0.383097724211)*x[2]**o+(0.680290963195)*x[2]
-        arg[3,0,2,0]=(-0.373162835796)*x[0]**o+(-0.186323761814)*x[0]+(0.661494315705)*x[1]**o+(0.320072189494)*x[1]+(0.0964443431067)*x[2]**o+(0.829015838241)*x[2]
-        arg[3,0,2,1]=(0.527719514862)*x[0]**o+(0.0819948261665)*x[0]+(0.826598712178)*x[1]**o+(-0.588102975125)*x[1]+(-0.632584402292)*x[2]**o+(0.0826992233702)*x[2]
-        arg[3,1,0,0]=(-0.102243686287)*x[0]**o+(-0.497336112929)*x[0]+(0.941827592628)*x[1]**o+(0.68678991944)*x[1]+(-0.508684841667)*x[2]**o+(-0.752939965161)*x[2]
-        arg[3,1,0,1]=(-0.896417523183)*x[0]**o+(0.759224781685)*x[0]+(0.138537695823)*x[1]**o+(0.466727480471)*x[1]+(-0.838380824412)*x[2]**o+(0.285761157398)*x[2]
-        arg[3,1,1,0]=(-0.547853182919)*x[0]**o+(-0.41595413414)*x[0]+(0.76894221584)*x[1]**o+(-0.142394275192)*x[1]+(-0.96349294581)*x[2]**o+(-0.873639964693)*x[2]
-        arg[3,1,1,1]=(-0.151299403888)*x[0]**o+(0.789406063878)*x[0]+(0.163280670253)*x[1]**o+(-0.287315494745)*x[1]+(-0.627764670218)*x[2]**o+(0.842131632598)*x[2]
-        arg[3,1,2,0]=(-0.957096489189)*x[0]**o+(0.0616037805677)*x[0]+(0.255858200166)*x[1]**o+(-0.430555450798)*x[1]+(0.730436930737)*x[2]**o+(0.405094271653)*x[2]
-        arg[3,1,2,1]=(-0.924756832665)*x[0]**o+(0.525754162391)*x[0]+(0.281303228038)*x[1]**o+(-0.479500161878)*x[1]+(0.658416209181)*x[2]**o+(-0.0413881595557)*x[2]
-        arg[3,2,0,0]=(0.516429381997)*x[0]**o+(-0.8387318467)*x[0]+(0.329773978227)*x[1]**o+(0.599641753085)*x[1]+(0.939937743271)*x[2]**o+(-0.247331169626)*x[2]
-        arg[3,2,0,1]=(-0.644982044558)*x[0]**o+(-0.242033352774)*x[0]+(0.531835185779)*x[1]**o+(-0.851565064183)*x[1]+(-0.79213624915)*x[2]**o+(0.0607365690732)*x[2]
-        arg[3,2,1,0]=(0.359781383537)*x[0]**o+(-0.0529212842074)*x[0]+(0.845915169452)*x[1]**o+(-0.323979570458)*x[1]+(0.828909997631)*x[2]**o+(-0.839886339138)*x[2]
-        arg[3,2,1,1]=(0.559476630421)*x[0]**o+(-0.189725214615)*x[0]+(-0.00927446700413)*x[1]**o+(-0.234703720782)*x[1]+(-0.608362806755)*x[2]**o+(0.968571765534)*x[2]
-        arg[3,2,2,0]=(0.924837507913)*x[0]**o+(0.846397611121)*x[0]+(-0.837765472403)*x[1]**o+(0.0225105985057)*x[1]+(-0.834187513844)*x[2]**o+(0.194311845578)*x[2]
-        arg[3,2,2,1]=(-0.183561089961)*x[0]**o+(0.0745071729471)*x[0]+(-0.660415615202)*x[1]**o+(-0.528184997345)*x[1]+(0.205554094557)*x[2]**o+(-0.0309246318944)*x[2]
-        arg[3,3,0,0]=(-0.67124095974)*x[0]**o+(-0.48501497083)*x[0]+(-0.0394345869094)*x[1]**o+(0.586692270429)*x[1]+(-0.593760749687)*x[2]**o+(-0.124979751327)*x[2]
-        arg[3,3,0,1]=(0.778544173855)*x[0]**o+(-0.931466478494)*x[0]+(-0.746894777998)*x[1]**o+(0.806417936297)*x[1]+(0.989460929848)*x[2]**o+(0.666534366369)*x[2]
-        arg[3,3,1,0]=(-0.798870838602)*x[0]**o+(-0.294618868937)*x[0]+(0.275029092968)*x[1]**o+(0.45390580364)*x[1]+(-0.311797818508)*x[2]**o+(0.751606624393)*x[2]
-        arg[3,3,1,1]=(-0.924260987477)*x[0]**o+(0.771970726902)*x[0]+(-0.909099224213)*x[1]**o+(-0.45204206766)*x[1]+(0.630042614017)*x[2]**o+(-0.990915130464)*x[2]
-        arg[3,3,2,0]=(0.734962154852)*x[0]**o+(-0.00621898011475)*x[0]+(-0.786362527189)*x[1]**o+(0.623507947406)*x[1]+(0.867175567104)*x[2]**o+(-0.383283255448)*x[2]
-        arg[3,3,2,1]=(-0.955613156717)*x[0]**o+(0.688013754841)*x[0]+(-0.600559375208)*x[1]**o+(0.453342626645)*x[1]+(-0.864890477961)*x[2]**o+(-0.458029873063)*x[2]
-        arg[3,4,0,0]=(-0.897010884834)*x[0]**o+(-0.251223576458)*x[0]+(-0.0338052047964)*x[1]**o+(-0.903421466132)*x[1]+(0.836864217874)*x[2]**o+(0.660805905175)*x[2]
-        arg[3,4,0,1]=(-0.286025690215)*x[0]**o+(0.746732975604)*x[0]+(0.375810853218)*x[1]**o+(-0.985192974869)*x[1]+(-0.731463214455)*x[2]**o+(-0.465450352444)*x[2]
-        arg[3,4,1,0]=(-0.500910000652)*x[0]**o+(0.387502419727)*x[0]+(0.962369164802)*x[1]**o+(-0.10933824251)*x[1]+(-0.33642703989)*x[2]**o+(0.546851133256)*x[2]
-        arg[3,4,1,1]=(-0.117959459645)*x[0]**o+(0.867699323392)*x[0]+(0.950506403861)*x[1]**o+(0.613806207745)*x[1]+(0.425723173807)*x[2]**o+(-0.906937548619)*x[2]
-        arg[3,4,2,0]=(0.331114892194)*x[0]**o+(-0.168829643424)*x[0]+(-0.855962311982)*x[1]**o+(-0.144202406673)*x[1]+(0.0769985713088)*x[2]**o+(0.856003746423)*x[2]
-        arg[3,4,2,1]=(-0.439397439364)*x[0]**o+(0.686116343481)*x[0]+(0.519883854523)*x[1]**o+(0.716231469289)*x[1]+(0.270098231149)*x[2]**o+(-0.448525436427)*x[2]
-        ref[0,0,0,0]=(-0.401901998082)*x_ref[0]**o+(-0.805091116808)*x_ref[0]+(0.997659882792)*x_ref[1]**o+(-0.953957389492)*x_ref[1]+(-0.450185408289)*x_ref[2]**o+(0.636472207773)*x_ref[2]
-        ref[0,0,0,1]=(-0.786386817128)*x_ref[0]**o+(-0.882559775393)*x_ref[0]+(0.117871400819)*x_ref[1]**o+(-0.625922274774)*x_ref[1]+(0.410431886931)*x_ref[2]**o+(-0.979356501067)*x_ref[2]
-        ref[0,0,1,0]=(0.686025409275)*x_ref[0]**o+(-0.19806907659)*x_ref[0]+(-0.710420224449)*x_ref[1]**o+(-0.839236953983)*x_ref[1]+(-0.79971896093)*x_ref[2]**o+(0.378944111319)*x_ref[2]
-        ref[0,0,1,1]=(0.771205112484)*x_ref[0]**o+(-0.007083192859)*x_ref[0]+(0.672918588001)*x_ref[1]**o+(-0.351652495793)*x_ref[1]+(-0.841767161187)*x_ref[2]**o+(-0.345642373014)*x_ref[2]
-        ref[0,0,2,0]=(0.266930729015)*x_ref[0]**o+(-0.873808152307)*x_ref[0]+(0.206466759135)*x_ref[1]**o+(0.539888649948)*x_ref[1]+(0.17985862191)*x_ref[2]**o+(0.240651460153)*x_ref[2]
-        ref[0,0,2,1]=(-0.232569768041)*x_ref[0]**o+(-0.579841454072)*x_ref[0]+(-0.706956104891)*x_ref[1]**o+(0.822863815698)*x_ref[1]+(0.345774991358)*x_ref[2]**o+(-0.0848567668311)*x_ref[2]
-        ref[0,1,0,0]=(0.51593851507)*x_ref[0]**o+(-0.233342434349)*x_ref[0]+(-0.92498298026)*x_ref[1]**o+(0.164540234829)*x_ref[1]+(0.356559744499)*x_ref[2]**o+(0.483902511717)*x_ref[2]
-        ref[0,1,0,1]=(-0.811509654443)*x_ref[0]**o+(0.73929453189)*x_ref[0]+(0.256205706418)*x_ref[1]**o+(-0.667924913793)*x_ref[1]+(0.266065641257)*x_ref[2]**o+(0.856490258029)*x_ref[2]
-        ref[0,1,1,0]=(0.502051590284)*x_ref[0]**o+(0.927283797128)*x_ref[0]+(0.500854521411)*x_ref[1]**o+(-0.486326996369)*x_ref[1]+(-0.327578523685)*x_ref[2]**o+(-0.28106070397)*x_ref[2]
-        ref[0,1,1,1]=(0.201740014513)*x_ref[0]**o+(-0.166988241759)*x_ref[0]+(-0.513072955566)*x_ref[1]**o+(0.67179532417)*x_ref[1]+(-0.72135980627)*x_ref[2]**o+(0.763548886467)*x_ref[2]
-        ref[0,1,2,0]=(0.3995590338)*x_ref[0]**o+(0.433286929621)*x_ref[0]+(-0.287309453792)*x_ref[1]**o+(-0.0671679443074)*x_ref[1]+(-0.80815399993)*x_ref[2]**o+(-0.398740362114)*x_ref[2]
-        ref[0,1,2,1]=(-0.16314640684)*x_ref[0]**o+(-0.698681697367)*x_ref[0]+(-0.11609738418)*x_ref[1]**o+(-0.798465154739)*x_ref[1]+(-0.169052628971)*x_ref[2]**o+(-0.880316962539)*x_ref[2]
-        ref[0,2,0,0]=(-0.219731279442)*x_ref[0]**o+(0.731464233112)*x_ref[0]+(0.637811533993)*x_ref[1]**o+(0.381218512692)*x_ref[1]+(-0.181357790048)*x_ref[2]**o+(-0.296793024723)*x_ref[2]
-        ref[0,2,0,1]=(0.566451624572)*x_ref[0]**o+(0.302904935559)*x_ref[0]+(-0.771526665232)*x_ref[1]**o+(0.460577683302)*x_ref[1]+(-0.921312455507)*x_ref[2]**o+(0.604299765394)*x_ref[2]
-        ref[0,2,1,0]=(-0.0887516895197)*x_ref[0]**o+(0.872208558285)*x_ref[0]+(-0.306564750999)*x_ref[1]**o+(0.841982500263)*x_ref[1]+(-0.550398737046)*x_ref[2]**o+(-0.869697162427)*x_ref[2]
-        ref[0,2,1,1]=(-0.652471383912)*x_ref[0]**o+(0.634592304393)*x_ref[0]+(0.0709212473167)*x_ref[1]**o+(-0.671330082579)*x_ref[1]+(-0.232895004478)*x_ref[2]**o+(0.479008351165)*x_ref[2]
-        ref[0,2,2,0]=(-0.0764115046136)*x_ref[0]**o+(0.649230346025)*x_ref[0]+(0.544503480999)*x_ref[1]**o+(0.788838981797)*x_ref[1]+(0.416236148267)*x_ref[2]**o+(0.722979541918)*x_ref[2]
-        ref[0,2,2,1]=(-0.0776368628837)*x_ref[0]**o+(0.801984674386)*x_ref[0]+(0.443670313486)*x_ref[1]**o+(0.424676792255)*x_ref[1]+(-0.895989937982)*x_ref[2]**o+(0.0774648143589)*x_ref[2]
-        ref[0,3,0,0]=(-0.39041318438)*x_ref[0]**o+(-0.174335409262)*x_ref[0]+(0.658666482337)*x_ref[1]**o+(0.23060605921)*x_ref[1]+(-0.336603364419)*x_ref[2]**o+(0.871530192198)*x_ref[2]
-        ref[0,3,0,1]=(-0.493104661363)*x_ref[0]**o+(0.590779697499)*x_ref[0]+(-0.903897457443)*x_ref[1]**o+(-0.377640520704)*x_ref[1]+(0.227174544833)*x_ref[2]**o+(-0.860150483539)*x_ref[2]
-        ref[0,3,1,0]=(-0.093367253954)*x_ref[0]**o+(0.159230499811)*x_ref[0]+(-0.731396509936)*x_ref[1]**o+(0.600088148838)*x_ref[1]+(0.829175660147)*x_ref[2]**o+(-0.435878280919)*x_ref[2]
-        ref[0,3,1,1]=(0.665125540711)*x_ref[0]**o+(-0.92128737118)*x_ref[0]+(-0.33260297543)*x_ref[1]**o+(0.682569476816)*x_ref[1]+(0.999761405058)*x_ref[2]**o+(-0.748303702618)*x_ref[2]
-        ref[0,3,2,0]=(-0.430442277525)*x_ref[0]**o+(-0.841437664378)*x_ref[0]+(-0.374267371055)*x_ref[1]**o+(0.667860327373)*x_ref[1]+(0.694185699238)*x_ref[2]**o+(-0.673629629622)*x_ref[2]
-        ref[0,3,2,1]=(0.304808617243)*x_ref[0]**o+(-0.894407776037)*x_ref[0]+(-0.758585281699)*x_ref[1]**o+(0.20519963241)*x_ref[1]+(0.538222015181)*x_ref[2]**o+(-0.792962435573)*x_ref[2]
-        ref[0,4,0,0]=(0.568300300269)*x_ref[0]**o+(0.407455936625)*x_ref[0]+(0.980898344535)*x_ref[1]**o+(0.988220474461)*x_ref[1]+(0.0598892620089)*x_ref[2]**o+(-0.279555207723)*x_ref[2]
-        ref[0,4,0,1]=(-0.208391854989)*x_ref[0]**o+(0.9428019078)*x_ref[0]+(-0.540916877275)*x_ref[1]**o+(-0.427185538555)*x_ref[1]+(-0.879268085857)*x_ref[2]**o+(0.025102321099)*x_ref[2]
-        ref[0,4,1,0]=(0.412690112527)*x_ref[0]**o+(-0.957376863734)*x_ref[0]+(-0.913623139719)*x_ref[1]**o+(-0.462418849979)*x_ref[1]+(0.463336747019)*x_ref[2]**o+(0.330747531293)*x_ref[2]
-        ref[0,4,1,1]=(-0.632140552118)*x_ref[0]**o+(0.830769577671)*x_ref[0]+(-0.888012251479)*x_ref[1]**o+(-0.0560181569699)*x_ref[1]+(-0.70068099248)*x_ref[2]**o+(0.834483253039)*x_ref[2]
-        ref[0,4,2,0]=(0.0429717567385)*x_ref[0]**o+(-0.691784042595)*x_ref[0]+(-0.264988764713)*x_ref[1]**o+(0.359873170931)*x_ref[1]+(-0.116275128437)*x_ref[2]**o+(0.0348873917345)*x_ref[2]
-        ref[0,4,2,1]=(-0.203754358311)*x_ref[0]**o+(0.177896174646)*x_ref[0]+(-0.0785920580727)*x_ref[1]**o+(-0.124905949184)*x_ref[1]+(0.968871355367)*x_ref[2]**o+(-0.0369722247589)*x_ref[2]
-        ref[1,0,0,0]=(0.594851756786)*x_ref[0]**o+(-0.594400822936)*x_ref[0]+(0.868401350949)*x_ref[1]**o+(0.186739616297)*x_ref[1]+(-0.937219946754)*x_ref[2]**o+(-0.248916422131)*x_ref[2]
-        ref[1,0,0,1]=(-0.639865978203)*x_ref[0]**o+(-0.00990375501714)*x_ref[0]+(-0.038266357411)*x_ref[1]**o+(-0.741522380136)*x_ref[1]+(0.460572922772)*x_ref[2]**o+(0.4314205896)*x_ref[2]
-        ref[1,0,1,0]=(-0.460110413486)*x_ref[0]**o+(-0.0964934735182)*x_ref[0]+(0.474209024352)*x_ref[1]**o+(-0.928476110805)*x_ref[1]+(0.598621411487)*x_ref[2]**o+(-0.00858812754345)*x_ref[2]
-        ref[1,0,1,1]=(0.936466172807)*x_ref[0]**o+(-0.363937334197)*x_ref[0]+(-0.540224651799)*x_ref[1]**o+(0.484530722263)*x_ref[1]+(0.675416993296)*x_ref[2]**o+(0.89657344343)*x_ref[2]
-        ref[1,0,2,0]=(-0.713050692555)*x_ref[0]**o+(-0.00851892179229)*x_ref[0]+(0.689494113809)*x_ref[1]**o+(0.633341028044)*x_ref[1]+(0.272726911113)*x_ref[2]**o+(-0.122017566819)*x_ref[2]
-        ref[1,0,2,1]=(0.793152080981)*x_ref[0]**o+(0.287379739639)*x_ref[0]+(0.304047372771)*x_ref[1]**o+(-0.509079361053)*x_ref[1]+(0.888302006985)*x_ref[2]**o+(-0.297023045775)*x_ref[2]
-        ref[1,1,0,0]=(-0.69695118901)*x_ref[0]**o+(0.505182668512)*x_ref[0]+(0.827555590952)*x_ref[1]**o+(-0.777232447056)*x_ref[1]+(-0.460918138036)*x_ref[2]**o+(0.782090206922)*x_ref[2]
-        ref[1,1,0,1]=(-0.435398535566)*x_ref[0]**o+(-0.0997593681984)*x_ref[0]+(0.140250252691)*x_ref[1]**o+(-0.0204469256488)*x_ref[1]+(-0.445836771028)*x_ref[2]**o+(-0.775366037861)*x_ref[2]
-        ref[1,1,1,0]=(0.918015347957)*x_ref[0]**o+(-0.491940111489)*x_ref[0]+(0.793071617663)*x_ref[1]**o+(-0.607035294859)*x_ref[1]+(0.610076618566)*x_ref[2]**o+(0.148116733513)*x_ref[2]
-        ref[1,1,1,1]=(0.224062518811)*x_ref[0]**o+(-0.145897156735)*x_ref[0]+(0.165380866901)*x_ref[1]**o+(0.910562981814)*x_ref[1]+(-0.406620561548)*x_ref[2]**o+(0.528862812468)*x_ref[2]
-        ref[1,1,2,0]=(0.85148444093)*x_ref[0]**o+(0.13210280653)*x_ref[0]+(0.364136256712)*x_ref[1]**o+(0.520388575386)*x_ref[1]+(0.0145641287346)*x_ref[2]**o+(-0.7849036351)*x_ref[2]
-        ref[1,1,2,1]=(0.493837193832)*x_ref[0]**o+(-0.193326176569)*x_ref[0]+(-0.665920972154)*x_ref[1]**o+(-0.321645070095)*x_ref[1]+(0.0209354853869)*x_ref[2]**o+(-0.328315981752)*x_ref[2]
-        ref[1,2,0,0]=(-0.349281164766)*x_ref[0]**o+(-0.318415198113)*x_ref[0]+(-0.687972781234)*x_ref[1]**o+(0.91825998605)*x_ref[1]+(0.396868773798)*x_ref[2]**o+(0.998204458027)*x_ref[2]
-        ref[1,2,0,1]=(-0.967493222935)*x_ref[0]**o+(-0.721128465653)*x_ref[0]+(-0.672178802974)*x_ref[1]**o+(0.0924145224431)*x_ref[1]+(0.114040587594)*x_ref[2]**o+(0.707623895537)*x_ref[2]
-        ref[1,2,1,0]=(-0.253327088773)*x_ref[0]**o+(0.206063827625)*x_ref[0]+(0.355152654895)*x_ref[1]**o+(-0.27339285621)*x_ref[1]+(-0.0135567122291)*x_ref[2]**o+(-0.983990446362)*x_ref[2]
-        ref[1,2,1,1]=(0.98471687132)*x_ref[0]**o+(0.262902745655)*x_ref[0]+(-0.589359138227)*x_ref[1]**o+(-0.0982548958556)*x_ref[1]+(-0.526161200133)*x_ref[2]**o+(-0.850939484752)*x_ref[2]
-        ref[1,2,2,0]=(0.37583596705)*x_ref[0]**o+(0.274845981222)*x_ref[0]+(0.601331110943)*x_ref[1]**o+(0.788294448218)*x_ref[1]+(0.366445166459)*x_ref[2]**o+(-0.554935072394)*x_ref[2]
-        ref[1,2,2,1]=(-0.986387850237)*x_ref[0]**o+(0.68772989781)*x_ref[0]+(0.345166604933)*x_ref[1]**o+(0.930376726384)*x_ref[1]+(0.760974421701)*x_ref[2]**o+(0.261797396808)*x_ref[2]
-        ref[1,3,0,0]=(-0.171005013523)*x_ref[0]**o+(-0.339229596812)*x_ref[0]+(-0.150317419556)*x_ref[1]**o+(-0.0146533427463)*x_ref[1]+(0.957020663875)*x_ref[2]**o+(0.616513940347)*x_ref[2]
-        ref[1,3,0,1]=(-0.0727328269499)*x_ref[0]**o+(-0.635591748073)*x_ref[0]+(-0.502426989774)*x_ref[1]**o+(0.772595119619)*x_ref[1]+(-0.76006511271)*x_ref[2]**o+(-0.665920288084)*x_ref[2]
-        ref[1,3,1,0]=(-0.394284205622)*x_ref[0]**o+(-0.105959165811)*x_ref[0]+(0.72649045701)*x_ref[1]**o+(-0.970276379473)*x_ref[1]+(-0.236520349415)*x_ref[2]**o+(0.994973267783)*x_ref[2]
-        ref[1,3,1,1]=(-0.444149867906)*x_ref[0]**o+(0.748449201475)*x_ref[0]+(0.419604170756)*x_ref[1]**o+(-0.0291702705178)*x_ref[1]+(-0.109580142628)*x_ref[2]**o+(-0.0791870699838)*x_ref[2]
-        ref[1,3,2,0]=(-0.629657820523)*x_ref[0]**o+(-0.995576552624)*x_ref[0]+(0.530135462206)*x_ref[1]**o+(0.197336335845)*x_ref[1]+(0.0224815558807)*x_ref[2]**o+(0.240498463912)*x_ref[2]
-        ref[1,3,2,1]=(0.52933948346)*x_ref[0]**o+(0.98353913011)*x_ref[0]+(0.0217614943138)*x_ref[1]**o+(0.0157778453682)*x_ref[1]+(0.177956932986)*x_ref[2]**o+(0.234629778706)*x_ref[2]
-        ref[1,4,0,0]=(0.593028367137)*x_ref[0]**o+(0.0340892538994)*x_ref[0]+(-0.0295133170051)*x_ref[1]**o+(0.0865921041963)*x_ref[1]+(0.641131718656)*x_ref[2]**o+(0.788858018609)*x_ref[2]
-        ref[1,4,0,1]=(-0.283333820634)*x_ref[0]**o+(0.864482725099)*x_ref[0]+(-0.560218794286)*x_ref[1]**o+(-0.0083115362546)*x_ref[1]+(0.726423285129)*x_ref[2]**o+(0.031531339166)*x_ref[2]
-        ref[1,4,1,0]=(0.801452411554)*x_ref[0]**o+(-0.59916393038)*x_ref[0]+(-0.106568863591)*x_ref[1]**o+(0.357442125133)*x_ref[1]+(-0.203380280132)*x_ref[2]**o+(-0.129031606441)*x_ref[2]
-        ref[1,4,1,1]=(-0.589220928637)*x_ref[0]**o+(-0.308949389428)*x_ref[0]+(0.785549858338)*x_ref[1]**o+(-0.131153853015)*x_ref[1]+(-0.30571855555)*x_ref[2]**o+(-0.329634802588)*x_ref[2]
-        ref[1,4,2,0]=(-0.479686944)*x_ref[0]**o+(-0.707702026873)*x_ref[0]+(0.635894172352)*x_ref[1]**o+(0.370673635069)*x_ref[1]+(0.942862875991)*x_ref[2]**o+(-0.846943456738)*x_ref[2]
-        ref[1,4,2,1]=(-0.403737324968)*x_ref[0]**o+(0.101664426734)*x_ref[0]+(-0.677093482354)*x_ref[1]**o+(-0.36526066745)*x_ref[1]+(-0.0889619136182)*x_ref[2]**o+(-0.772491940844)*x_ref[2]
-        ref[2,0,0,0]=(0.753148325987)*x_ref[0]**o+(-0.342843083128)*x_ref[0]+(0.812661029553)*x_ref[1]**o+(-0.112683035459)*x_ref[1]+(0.900976470275)*x_ref[2]**o+(0.00934086955102)*x_ref[2]
-        ref[2,0,0,1]=(-0.682315007143)*x_ref[0]**o+(-0.694069900861)*x_ref[0]+(-0.469082247747)*x_ref[1]**o+(-0.522165903301)*x_ref[1]+(-0.0997886221924)*x_ref[2]**o+(-0.954161552419)*x_ref[2]
-        ref[2,0,1,0]=(0.780125539705)*x_ref[0]**o+(-0.445331450225)*x_ref[0]+(-0.282765510424)*x_ref[1]**o+(-0.0131898361592)*x_ref[1]+(-0.200186433923)*x_ref[2]**o+(0.715139435696)*x_ref[2]
-        ref[2,0,1,1]=(-0.132310660786)*x_ref[0]**o+(-0.0981344234369)*x_ref[0]+(0.959297529475)*x_ref[1]**o+(-0.85944894515)*x_ref[1]+(-0.396258659619)*x_ref[2]**o+(-0.09672066185)*x_ref[2]
-        ref[2,0,2,0]=(-0.344134014191)*x_ref[0]**o+(0.534345864287)*x_ref[0]+(0.797209509484)*x_ref[1]**o+(0.0479050101499)*x_ref[1]+(0.13620476987)*x_ref[2]**o+(0.82708115383)*x_ref[2]
-        ref[2,0,2,1]=(-0.342509328238)*x_ref[0]**o+(-0.833164493006)*x_ref[0]+(0.472047721532)*x_ref[1]**o+(0.301613158637)*x_ref[1]+(0.858691679638)*x_ref[2]**o+(-0.691744164006)*x_ref[2]
-        ref[2,1,0,0]=(0.498979390299)*x_ref[0]**o+(0.371513881824)*x_ref[0]+(-0.243506167971)*x_ref[1]**o+(-0.245423890439)*x_ref[1]+(-0.0494707840274)*x_ref[2]**o+(0.0965573709928)*x_ref[2]
-        ref[2,1,0,1]=(0.665982455862)*x_ref[0]**o+(-0.409710866336)*x_ref[0]+(0.669257568046)*x_ref[1]**o+(0.711947704788)*x_ref[1]+(-0.0362568635785)*x_ref[2]**o+(-0.30394278188)*x_ref[2]
-        ref[2,1,1,0]=(0.296245249928)*x_ref[0]**o+(0.132631019281)*x_ref[0]+(-0.376880152158)*x_ref[1]**o+(0.303184156241)*x_ref[1]+(0.836046560882)*x_ref[2]**o+(0.195205645106)*x_ref[2]
-        ref[2,1,1,1]=(-0.971045820953)*x_ref[0]**o+(0.154708896467)*x_ref[0]+(-0.663844656602)*x_ref[1]**o+(-0.0873797588245)*x_ref[1]+(0.985123372542)*x_ref[2]**o+(0.349554922131)*x_ref[2]
-        ref[2,1,2,0]=(-0.0117443431348)*x_ref[0]**o+(-0.71980503985)*x_ref[0]+(0.175348078994)*x_ref[1]**o+(-0.883987892161)*x_ref[1]+(0.0587275450458)*x_ref[2]**o+(0.464811715548)*x_ref[2]
-        ref[2,1,2,1]=(-0.309202575765)*x_ref[0]**o+(-0.528513248453)*x_ref[0]+(-0.509298303972)*x_ref[1]**o+(-0.228278863496)*x_ref[1]+(0.933917053676)*x_ref[2]**o+(-0.823678942264)*x_ref[2]
-        ref[2,2,0,0]=(0.374387386929)*x_ref[0]**o+(0.64969993847)*x_ref[0]+(-0.939822635641)*x_ref[1]**o+(0.578249430422)*x_ref[1]+(-0.973412660635)*x_ref[2]**o+(0.484052718386)*x_ref[2]
-        ref[2,2,0,1]=(-0.972635162618)*x_ref[0]**o+(-0.255007433802)*x_ref[0]+(0.134165187097)*x_ref[1]**o+(0.313213615976)*x_ref[1]+(0.143298148686)*x_ref[2]**o+(0.901819440229)*x_ref[2]
-        ref[2,2,1,0]=(0.868173256315)*x_ref[0]**o+(-0.532325343453)*x_ref[0]+(-0.712500880845)*x_ref[1]**o+(0.216943462308)*x_ref[1]+(0.733920091212)*x_ref[2]**o+(0.0992400603383)*x_ref[2]
-        ref[2,2,1,1]=(0.642839350527)*x_ref[0]**o+(0.127721543559)*x_ref[0]+(-0.152686523032)*x_ref[1]**o+(-0.399032361234)*x_ref[1]+(0.317014518842)*x_ref[2]**o+(0.905538790115)*x_ref[2]
-        ref[2,2,2,0]=(0.685267932413)*x_ref[0]**o+(-0.167571547782)*x_ref[0]+(-0.213446144405)*x_ref[1]**o+(0.420270456377)*x_ref[1]+(0.827725350621)*x_ref[2]**o+(-0.920242274399)*x_ref[2]
-        ref[2,2,2,1]=(-0.507424593437)*x_ref[0]**o+(-0.694222840019)*x_ref[0]+(-0.904108970188)*x_ref[1]**o+(-0.750899614966)*x_ref[1]+(0.783997553302)*x_ref[2]**o+(0.196327513447)*x_ref[2]
-        ref[2,3,0,0]=(-0.473900600479)*x_ref[0]**o+(-0.464347097789)*x_ref[0]+(-0.472423358671)*x_ref[1]**o+(0.373786456364)*x_ref[1]+(-0.989371300414)*x_ref[2]**o+(-0.959508065239)*x_ref[2]
-        ref[2,3,0,1]=(0.174375189399)*x_ref[0]**o+(0.925503059886)*x_ref[0]+(-0.647274384723)*x_ref[1]**o+(-0.577149479679)*x_ref[1]+(0.171298877768)*x_ref[2]**o+(-0.936612100882)*x_ref[2]
-        ref[2,3,1,0]=(0.482959343396)*x_ref[0]**o+(0.842243554011)*x_ref[0]+(0.814423633314)*x_ref[1]**o+(-0.989445050315)*x_ref[1]+(0.817933433065)*x_ref[2]**o+(0.552396881404)*x_ref[2]
-        ref[2,3,1,1]=(0.55641736229)*x_ref[0]**o+(0.498094640058)*x_ref[0]+(0.0890113606037)*x_ref[1]**o+(0.36592723553)*x_ref[1]+(0.458607593386)*x_ref[2]**o+(0.603047420063)*x_ref[2]
-        ref[2,3,2,0]=(0.884515080124)*x_ref[0]**o+(-0.561898381022)*x_ref[0]+(-0.292475503834)*x_ref[1]**o+(0.425634423478)*x_ref[1]+(0.65813323252)*x_ref[2]**o+(-0.548850399842)*x_ref[2]
-        ref[2,3,2,1]=(-0.72895566982)*x_ref[0]**o+(-0.569405588005)*x_ref[0]+(0.117770875594)*x_ref[1]**o+(-0.33515735969)*x_ref[1]+(0.102062736382)*x_ref[2]**o+(0.611532417683)*x_ref[2]
-        ref[2,4,0,0]=(-0.669208630424)*x_ref[0]**o+(0.944393014177)*x_ref[0]+(-0.00345511889683)*x_ref[1]**o+(0.0695279595783)*x_ref[1]+(0.496948250833)*x_ref[2]**o+(-0.899750463971)*x_ref[2]
-        ref[2,4,0,1]=(-0.387828717292)*x_ref[0]**o+(0.621172267004)*x_ref[0]+(-0.280632674111)*x_ref[1]**o+(0.401702567575)*x_ref[1]+(-0.65554489378)*x_ref[2]**o+(0.403018047007)*x_ref[2]
-        ref[2,4,1,0]=(-0.0770246925803)*x_ref[0]**o+(0.52913302745)*x_ref[0]+(0.922468724357)*x_ref[1]**o+(-0.304442750439)*x_ref[1]+(-0.556575079059)*x_ref[2]**o+(-0.725790672251)*x_ref[2]
-        ref[2,4,1,1]=(-0.828378342911)*x_ref[0]**o+(-0.0696370821776)*x_ref[0]+(0.394018581667)*x_ref[1]**o+(-0.251099848269)*x_ref[1]+(-0.29878985656)*x_ref[2]**o+(0.925753371056)*x_ref[2]
-        ref[2,4,2,0]=(-0.818277786029)*x_ref[0]**o+(0.225862354706)*x_ref[0]+(-0.629050212595)*x_ref[1]**o+(0.139186107062)*x_ref[1]+(-0.0134835519238)*x_ref[2]**o+(0.301899528641)*x_ref[2]
-        ref[2,4,2,1]=(-0.783053684767)*x_ref[0]**o+(-0.0926938783599)*x_ref[0]+(0.519034210352)*x_ref[1]**o+(-0.494564657126)*x_ref[1]+(0.536117310622)*x_ref[2]**o+(0.6278756634)*x_ref[2]
-        ref[3,0,0,0]=(-0.694353957685)*x_ref[0]**o+(-0.361037363965)*x_ref[0]+(-0.327004091885)*x_ref[1]**o+(-0.765735142884)*x_ref[1]+(-0.810915729713)*x_ref[2]**o+(0.0640539311609)*x_ref[2]
-        ref[3,0,0,1]=(-0.131601548312)*x_ref[0]**o+(0.271587756708)*x_ref[0]+(0.322486168005)*x_ref[1]**o+(0.238086581801)*x_ref[1]+(-0.488081720555)*x_ref[2]**o+(0.607278995635)*x_ref[2]
-        ref[3,0,1,0]=(0.903075418102)*x_ref[0]**o+(-0.738609834848)*x_ref[0]+(-0.165097989126)*x_ref[1]**o+(-0.25967140914)*x_ref[1]+(0.271649887428)*x_ref[2]**o+(-0.786131648727)*x_ref[2]
-        ref[3,0,1,1]=(-0.963442989157)*x_ref[0]**o+(-0.240205602334)*x_ref[0]+(0.102153389731)*x_ref[1]**o+(-0.106402434995)*x_ref[1]+(-0.383097724211)*x_ref[2]**o+(0.680290963195)*x_ref[2]
-        ref[3,0,2,0]=(-0.373162835796)*x_ref[0]**o+(-0.186323761814)*x_ref[0]+(0.661494315705)*x_ref[1]**o+(0.320072189494)*x_ref[1]+(0.0964443431067)*x_ref[2]**o+(0.829015838241)*x_ref[2]
-        ref[3,0,2,1]=(0.527719514862)*x_ref[0]**o+(0.0819948261665)*x_ref[0]+(0.826598712178)*x_ref[1]**o+(-0.588102975125)*x_ref[1]+(-0.632584402292)*x_ref[2]**o+(0.0826992233702)*x_ref[2]
-        ref[3,1,0,0]=(-0.102243686287)*x_ref[0]**o+(-0.497336112929)*x_ref[0]+(0.941827592628)*x_ref[1]**o+(0.68678991944)*x_ref[1]+(-0.508684841667)*x_ref[2]**o+(-0.752939965161)*x_ref[2]
-        ref[3,1,0,1]=(-0.896417523183)*x_ref[0]**o+(0.759224781685)*x_ref[0]+(0.138537695823)*x_ref[1]**o+(0.466727480471)*x_ref[1]+(-0.838380824412)*x_ref[2]**o+(0.285761157398)*x_ref[2]
-        ref[3,1,1,0]=(-0.547853182919)*x_ref[0]**o+(-0.41595413414)*x_ref[0]+(0.76894221584)*x_ref[1]**o+(-0.142394275192)*x_ref[1]+(-0.96349294581)*x_ref[2]**o+(-0.873639964693)*x_ref[2]
-        ref[3,1,1,1]=(-0.151299403888)*x_ref[0]**o+(0.789406063878)*x_ref[0]+(0.163280670253)*x_ref[1]**o+(-0.287315494745)*x_ref[1]+(-0.627764670218)*x_ref[2]**o+(0.842131632598)*x_ref[2]
-        ref[3,1,2,0]=(-0.957096489189)*x_ref[0]**o+(0.0616037805677)*x_ref[0]+(0.255858200166)*x_ref[1]**o+(-0.430555450798)*x_ref[1]+(0.730436930737)*x_ref[2]**o+(0.405094271653)*x_ref[2]
-        ref[3,1,2,1]=(-0.924756832665)*x_ref[0]**o+(0.525754162391)*x_ref[0]+(0.281303228038)*x_ref[1]**o+(-0.479500161878)*x_ref[1]+(0.658416209181)*x_ref[2]**o+(-0.0413881595557)*x_ref[2]
-        ref[3,2,0,0]=(0.516429381997)*x_ref[0]**o+(-0.8387318467)*x_ref[0]+(0.329773978227)*x_ref[1]**o+(0.599641753085)*x_ref[1]+(0.939937743271)*x_ref[2]**o+(-0.247331169626)*x_ref[2]
-        ref[3,2,0,1]=(-0.644982044558)*x_ref[0]**o+(-0.242033352774)*x_ref[0]+(0.531835185779)*x_ref[1]**o+(-0.851565064183)*x_ref[1]+(-0.79213624915)*x_ref[2]**o+(0.0607365690732)*x_ref[2]
-        ref[3,2,1,0]=(0.359781383537)*x_ref[0]**o+(-0.0529212842074)*x_ref[0]+(0.845915169452)*x_ref[1]**o+(-0.323979570458)*x_ref[1]+(0.828909997631)*x_ref[2]**o+(-0.839886339138)*x_ref[2]
-        ref[3,2,1,1]=(0.559476630421)*x_ref[0]**o+(-0.189725214615)*x_ref[0]+(-0.00927446700413)*x_ref[1]**o+(-0.234703720782)*x_ref[1]+(-0.608362806755)*x_ref[2]**o+(0.968571765534)*x_ref[2]
-        ref[3,2,2,0]=(0.924837507913)*x_ref[0]**o+(0.846397611121)*x_ref[0]+(-0.837765472403)*x_ref[1]**o+(0.0225105985057)*x_ref[1]+(-0.834187513844)*x_ref[2]**o+(0.194311845578)*x_ref[2]
-        ref[3,2,2,1]=(-0.183561089961)*x_ref[0]**o+(0.0745071729471)*x_ref[0]+(-0.660415615202)*x_ref[1]**o+(-0.528184997345)*x_ref[1]+(0.205554094557)*x_ref[2]**o+(-0.0309246318944)*x_ref[2]
-        ref[3,3,0,0]=(-0.67124095974)*x_ref[0]**o+(-0.48501497083)*x_ref[0]+(-0.0394345869094)*x_ref[1]**o+(0.586692270429)*x_ref[1]+(-0.593760749687)*x_ref[2]**o+(-0.124979751327)*x_ref[2]
-        ref[3,3,0,1]=(0.778544173855)*x_ref[0]**o+(-0.931466478494)*x_ref[0]+(-0.746894777998)*x_ref[1]**o+(0.806417936297)*x_ref[1]+(0.989460929848)*x_ref[2]**o+(0.666534366369)*x_ref[2]
-        ref[3,3,1,0]=(-0.798870838602)*x_ref[0]**o+(-0.294618868937)*x_ref[0]+(0.275029092968)*x_ref[1]**o+(0.45390580364)*x_ref[1]+(-0.311797818508)*x_ref[2]**o+(0.751606624393)*x_ref[2]
-        ref[3,3,1,1]=(-0.924260987477)*x_ref[0]**o+(0.771970726902)*x_ref[0]+(-0.909099224213)*x_ref[1]**o+(-0.45204206766)*x_ref[1]+(0.630042614017)*x_ref[2]**o+(-0.990915130464)*x_ref[2]
-        ref[3,3,2,0]=(0.734962154852)*x_ref[0]**o+(-0.00621898011475)*x_ref[0]+(-0.786362527189)*x_ref[1]**o+(0.623507947406)*x_ref[1]+(0.867175567104)*x_ref[2]**o+(-0.383283255448)*x_ref[2]
-        ref[3,3,2,1]=(-0.955613156717)*x_ref[0]**o+(0.688013754841)*x_ref[0]+(-0.600559375208)*x_ref[1]**o+(0.453342626645)*x_ref[1]+(-0.864890477961)*x_ref[2]**o+(-0.458029873063)*x_ref[2]
-        ref[3,4,0,0]=(-0.897010884834)*x_ref[0]**o+(-0.251223576458)*x_ref[0]+(-0.0338052047964)*x_ref[1]**o+(-0.903421466132)*x_ref[1]+(0.836864217874)*x_ref[2]**o+(0.660805905175)*x_ref[2]
-        ref[3,4,0,1]=(-0.286025690215)*x_ref[0]**o+(0.746732975604)*x_ref[0]+(0.375810853218)*x_ref[1]**o+(-0.985192974869)*x_ref[1]+(-0.731463214455)*x_ref[2]**o+(-0.465450352444)*x_ref[2]
-        ref[3,4,1,0]=(-0.500910000652)*x_ref[0]**o+(0.387502419727)*x_ref[0]+(0.962369164802)*x_ref[1]**o+(-0.10933824251)*x_ref[1]+(-0.33642703989)*x_ref[2]**o+(0.546851133256)*x_ref[2]
-        ref[3,4,1,1]=(-0.117959459645)*x_ref[0]**o+(0.867699323392)*x_ref[0]+(0.950506403861)*x_ref[1]**o+(0.613806207745)*x_ref[1]+(0.425723173807)*x_ref[2]**o+(-0.906937548619)*x_ref[2]
-        ref[3,4,2,0]=(0.331114892194)*x_ref[0]**o+(-0.168829643424)*x_ref[0]+(-0.855962311982)*x_ref[1]**o+(-0.144202406673)*x_ref[1]+(0.0769985713088)*x_ref[2]**o+(0.856003746423)*x_ref[2]
-        ref[3,4,2,1]=(-0.439397439364)*x_ref[0]**o+(0.686116343481)*x_ref[0]+(0.519883854523)*x_ref[1]**o+(0.716231469289)*x_ref[1]+(0.270098231149)*x_ref[2]**o+(-0.448525436427)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.787646538574)*x[0]+(0.912422904218)*x[1]
-        ref=(-0.787646538574)*x_ref[0]+(0.912422904218)*x_ref[1]
-      else:
-        arg=(0.934044939024)*x[0]+(0.628477728603)*x[1]+(-0.786339405837)*x[2]
-        ref=(0.934044939024)*x_ref[0]+(0.628477728603)*x_ref[1]+(-0.786339405837)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        arg[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-        ref[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        ref[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-      else:
-        arg[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        arg[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-        ref[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        ref[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.797066914479)*x[0]+(-0.0269853164939)*x[1]
-        arg[0,1]=(-1.07443661798)*x[0]+(0.818510216043)*x[1]
-        arg[0,2]=(0.398735262179)*x[0]+(-0.580387872083)*x[1]
-        arg[0,3]=(-0.003185613959)*x[0]+(-0.670506330615)*x[1]
-        arg[0,4]=(0.385009570186)*x[0]+(0.858570512936)*x[1]
-        arg[1,0]=(1.60917176753)*x[0]+(-0.0866362449992)*x[1]
-        arg[1,1]=(-0.883782122452)*x[0]+(-0.402187705578)*x[1]
-        arg[1,2]=(0.153893095122)*x[0]+(-1.19636362644)*x[1]
-        arg[1,3]=(1.92041961031)*x[0]+(0.325857877636)*x[1]
-        arg[1,4]=(-0.0947698843729)*x[0]+(-0.0663785758627)*x[1]
-        arg[2,0]=(0.0232949467051)*x[0]+(1.60134210326)*x[1]
-        arg[2,1]=(-0.521182882924)*x[0]+(-0.507401571343)*x[1]
-        arg[2,2]=(0.833797117616)*x[0]+(-0.268886477194)*x[1]
-        arg[2,3]=(-0.867762611227)*x[0]+(1.03727088566)*x[1]
-        arg[2,4]=(0.380510651918)*x[0]+(0.350246888456)*x[1]
-        arg[3,0]=(-1.10155500839)*x[0]+(0.414683749118)*x[1]
-        arg[3,1]=(-0.0306733233552)*x[0]+(-0.351251014237)*x[1]
-        arg[3,2]=(-0.0708773001498)*x[0]+(-0.326636587948)*x[1]
-        arg[3,3]=(-1.32553119895)*x[0]+(-1.5852157477)*x[1]
-        arg[3,4]=(1.40177154802)*x[0]+(-1.24804787994)*x[1]
-        ref[0,0]=(-0.797066914479)*x_ref[0]+(-0.0269853164939)*x_ref[1]
-        ref[0,1]=(-1.07443661798)*x_ref[0]+(0.818510216043)*x_ref[1]
-        ref[0,2]=(0.398735262179)*x_ref[0]+(-0.580387872083)*x_ref[1]
-        ref[0,3]=(-0.003185613959)*x_ref[0]+(-0.670506330615)*x_ref[1]
-        ref[0,4]=(0.385009570186)*x_ref[0]+(0.858570512936)*x_ref[1]
-        ref[1,0]=(1.60917176753)*x_ref[0]+(-0.0866362449992)*x_ref[1]
-        ref[1,1]=(-0.883782122452)*x_ref[0]+(-0.402187705578)*x_ref[1]
-        ref[1,2]=(0.153893095122)*x_ref[0]+(-1.19636362644)*x_ref[1]
-        ref[1,3]=(1.92041961031)*x_ref[0]+(0.325857877636)*x_ref[1]
-        ref[1,4]=(-0.0947698843729)*x_ref[0]+(-0.0663785758627)*x_ref[1]
-        ref[2,0]=(0.0232949467051)*x_ref[0]+(1.60134210326)*x_ref[1]
-        ref[2,1]=(-0.521182882924)*x_ref[0]+(-0.507401571343)*x_ref[1]
-        ref[2,2]=(0.833797117616)*x_ref[0]+(-0.268886477194)*x_ref[1]
-        ref[2,3]=(-0.867762611227)*x_ref[0]+(1.03727088566)*x_ref[1]
-        ref[2,4]=(0.380510651918)*x_ref[0]+(0.350246888456)*x_ref[1]
-        ref[3,0]=(-1.10155500839)*x_ref[0]+(0.414683749118)*x_ref[1]
-        ref[3,1]=(-0.0306733233552)*x_ref[0]+(-0.351251014237)*x_ref[1]
-        ref[3,2]=(-0.0708773001498)*x_ref[0]+(-0.326636587948)*x_ref[1]
-        ref[3,3]=(-1.32553119895)*x_ref[0]+(-1.5852157477)*x_ref[1]
-        ref[3,4]=(1.40177154802)*x_ref[0]+(-1.24804787994)*x_ref[1]
-      else:
-        arg[0,0]=(0.000362194678523)*x[0]+(-1.63949220671)*x[1]+(-0.176997156562)*x[2]
-        arg[0,1]=(-0.357589049408)*x[0]+(0.828191515325)*x[1]+(-0.269706780136)*x[2]
-        arg[0,2]=(0.886395070544)*x[0]+(0.815688451839)*x[1]+(-0.658412270558)*x[2]
-        arg[0,3]=(-0.222573318026)*x[0]+(0.137763803092)*x[1]+(0.171902150187)*x[2]
-        arg[0,4]=(1.05159741251)*x[0]+(0.923836841038)*x[1]+(-0.426590801731)*x[2]
-        arg[1,0]=(-0.00718419057788)*x[0]+(1.55809964998)*x[1]+(-0.912766657496)*x[2]
-        arg[1,1]=(1.30769045785)*x[0]+(-0.0356609338389)*x[1]+(0.214543084134)*x[2]
-        arg[1,2]=(-1.56763014241)*x[0]+(-0.582970995722)*x[1]+(-0.513972924752)*x[2]
-        arg[1,3]=(0.118027736928)*x[0]+(-0.28795014876)*x[1]+(0.620718623034)*x[2]
-        arg[1,4]=(-0.784496170193)*x[0]+(0.233037866924)*x[1]+(-0.0500718134572)*x[2]
-        arg[2,0]=(0.800851281806)*x[0]+(0.219346484846)*x[1]+(1.19125787701)*x[2]
-        arg[2,1]=(-1.45025879429)*x[0]+(-1.32011538154)*x[1]+(0.47946669308)*x[2]
-        arg[2,2]=(-0.231377110469)*x[0]+(-0.921551695999)*x[1]+(-0.298964635841)*x[2]
-        arg[2,3]=(0.965766335546)*x[0]+(0.424791610089)*x[1]+(1.01860652092)*x[2]
-        arg[2,4]=(0.676247093636)*x[0]+(-1.50802741511)*x[1]+(0.0385960918391)*x[2]
-        arg[3,0]=(0.322378151756)*x[0]+(-0.483633005509)*x[1]+(-0.852371707865)*x[2]
-        arg[3,1]=(-0.241998307153)*x[0]+(-1.08134340082)*x[1]+(-0.849574532537)*x[2]
-        arg[3,2]=(-0.0185751405467)*x[0]+(0.179558416001)*x[1]+(-0.488727308548)*x[2]
-        arg[3,3]=(0.0984555057845)*x[0]+(1.03085967788)*x[1]+(-0.357009094371)*x[2]
-        arg[3,4]=(0.430593980121)*x[0]+(0.689565614489)*x[1]+(-0.0916541808491)*x[2]
-        ref[0,0]=(0.000362194678523)*x_ref[0]+(-1.63949220671)*x_ref[1]+(-0.176997156562)*x_ref[2]
-        ref[0,1]=(-0.357589049408)*x_ref[0]+(0.828191515325)*x_ref[1]+(-0.269706780136)*x_ref[2]
-        ref[0,2]=(0.886395070544)*x_ref[0]+(0.815688451839)*x_ref[1]+(-0.658412270558)*x_ref[2]
-        ref[0,3]=(-0.222573318026)*x_ref[0]+(0.137763803092)*x_ref[1]+(0.171902150187)*x_ref[2]
-        ref[0,4]=(1.05159741251)*x_ref[0]+(0.923836841038)*x_ref[1]+(-0.426590801731)*x_ref[2]
-        ref[1,0]=(-0.00718419057788)*x_ref[0]+(1.55809964998)*x_ref[1]+(-0.912766657496)*x_ref[2]
-        ref[1,1]=(1.30769045785)*x_ref[0]+(-0.0356609338389)*x_ref[1]+(0.214543084134)*x_ref[2]
-        ref[1,2]=(-1.56763014241)*x_ref[0]+(-0.582970995722)*x_ref[1]+(-0.513972924752)*x_ref[2]
-        ref[1,3]=(0.118027736928)*x_ref[0]+(-0.28795014876)*x_ref[1]+(0.620718623034)*x_ref[2]
-        ref[1,4]=(-0.784496170193)*x_ref[0]+(0.233037866924)*x_ref[1]+(-0.0500718134572)*x_ref[2]
-        ref[2,0]=(0.800851281806)*x_ref[0]+(0.219346484846)*x_ref[1]+(1.19125787701)*x_ref[2]
-        ref[2,1]=(-1.45025879429)*x_ref[0]+(-1.32011538154)*x_ref[1]+(0.47946669308)*x_ref[2]
-        ref[2,2]=(-0.231377110469)*x_ref[0]+(-0.921551695999)*x_ref[1]+(-0.298964635841)*x_ref[2]
-        ref[2,3]=(0.965766335546)*x_ref[0]+(0.424791610089)*x_ref[1]+(1.01860652092)*x_ref[2]
-        ref[2,4]=(0.676247093636)*x_ref[0]+(-1.50802741511)*x_ref[1]+(0.0385960918391)*x_ref[2]
-        ref[3,0]=(0.322378151756)*x_ref[0]+(-0.483633005509)*x_ref[1]+(-0.852371707865)*x_ref[2]
-        ref[3,1]=(-0.241998307153)*x_ref[0]+(-1.08134340082)*x_ref[1]+(-0.849574532537)*x_ref[2]
-        ref[3,2]=(-0.0185751405467)*x_ref[0]+(0.179558416001)*x_ref[1]+(-0.488727308548)*x_ref[2]
-        ref[3,3]=(0.0984555057845)*x_ref[0]+(1.03085967788)*x_ref[1]+(-0.357009094371)*x_ref[2]
-        ref[3,4]=(0.430593980121)*x_ref[0]+(0.689565614489)*x_ref[1]+(-0.0916541808491)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0641544023301)*x[0]+(0.364286357763)*x[1]
-        arg[0,0,1]=(-0.858288240411)*x[0]+(-0.847764393559)*x[1]
-        arg[0,1,0]=(-0.656948775029)*x[0]+(1.69748608992)*x[1]
-        arg[0,1,1]=(0.579399191549)*x[0]+(1.48407368783)*x[1]
-        arg[1,0,0]=(-0.35948657403)*x[0]+(0.795436090765)*x[1]
-        arg[1,0,1]=(-1.32807156246)*x[0]+(0.921960610294)*x[1]
-        arg[1,1,0]=(1.0904085219)*x[0]+(-1.41870997296)*x[1]
-        arg[1,1,1]=(-0.677691596793)*x[0]+(-0.395373706333)*x[1]
-        arg[2,0,0]=(0.295591917216)*x[0]+(-1.75550830457)*x[1]
-        arg[2,0,1]=(0.506665326626)*x[0]+(0.273265713965)*x[1]
-        arg[2,1,0]=(0.543899865352)*x[0]+(-0.0678457091657)*x[1]
-        arg[2,1,1]=(-0.887824769535)*x[0]+(0.527475538055)*x[1]
-        arg[3,0,0]=(-0.788511557365)*x[0]+(-0.635972100675)*x[1]
-        arg[3,0,1]=(-1.02799066459)*x[0]+(-0.416241247725)*x[1]
-        arg[3,1,0]=(-0.310072483091)*x[0]+(1.2445160445)*x[1]
-        arg[3,1,1]=(0.912462196567)*x[0]+(0.631855269783)*x[1]
-        arg[4,0,0]=(0.700426861807)*x[0]+(-0.491365913713)*x[1]
-        arg[4,0,1]=(0.628791538338)*x[0]+(0.640767645586)*x[1]
-        arg[4,1,0]=(0.370886720329)*x[0]+(0.823663448834)*x[1]
-        arg[4,1,1]=(1.75857310774)*x[0]+(0.445439424641)*x[1]
-        arg[5,0,0]=(1.39637385066)*x[0]+(-0.812211860169)*x[1]
-        arg[5,0,1]=(0.865050350195)*x[0]+(-1.25983380375)*x[1]
-        arg[5,1,0]=(-0.0429057645445)*x[0]+(-1.08490578934)*x[1]
-        arg[5,1,1]=(1.42851264594)*x[0]+(1.52192971749)*x[1]
-        ref[0,0,0]=(-0.0641544023301)*x_ref[0]+(0.364286357763)*x_ref[1]
-        ref[0,0,1]=(-0.858288240411)*x_ref[0]+(-0.847764393559)*x_ref[1]
-        ref[0,1,0]=(-0.656948775029)*x_ref[0]+(1.69748608992)*x_ref[1]
-        ref[0,1,1]=(0.579399191549)*x_ref[0]+(1.48407368783)*x_ref[1]
-        ref[1,0,0]=(-0.35948657403)*x_ref[0]+(0.795436090765)*x_ref[1]
-        ref[1,0,1]=(-1.32807156246)*x_ref[0]+(0.921960610294)*x_ref[1]
-        ref[1,1,0]=(1.0904085219)*x_ref[0]+(-1.41870997296)*x_ref[1]
-        ref[1,1,1]=(-0.677691596793)*x_ref[0]+(-0.395373706333)*x_ref[1]
-        ref[2,0,0]=(0.295591917216)*x_ref[0]+(-1.75550830457)*x_ref[1]
-        ref[2,0,1]=(0.506665326626)*x_ref[0]+(0.273265713965)*x_ref[1]
-        ref[2,1,0]=(0.543899865352)*x_ref[0]+(-0.0678457091657)*x_ref[1]
-        ref[2,1,1]=(-0.887824769535)*x_ref[0]+(0.527475538055)*x_ref[1]
-        ref[3,0,0]=(-0.788511557365)*x_ref[0]+(-0.635972100675)*x_ref[1]
-        ref[3,0,1]=(-1.02799066459)*x_ref[0]+(-0.416241247725)*x_ref[1]
-        ref[3,1,0]=(-0.310072483091)*x_ref[0]+(1.2445160445)*x_ref[1]
-        ref[3,1,1]=(0.912462196567)*x_ref[0]+(0.631855269783)*x_ref[1]
-        ref[4,0,0]=(0.700426861807)*x_ref[0]+(-0.491365913713)*x_ref[1]
-        ref[4,0,1]=(0.628791538338)*x_ref[0]+(0.640767645586)*x_ref[1]
-        ref[4,1,0]=(0.370886720329)*x_ref[0]+(0.823663448834)*x_ref[1]
-        ref[4,1,1]=(1.75857310774)*x_ref[0]+(0.445439424641)*x_ref[1]
-        ref[5,0,0]=(1.39637385066)*x_ref[0]+(-0.812211860169)*x_ref[1]
-        ref[5,0,1]=(0.865050350195)*x_ref[0]+(-1.25983380375)*x_ref[1]
-        ref[5,1,0]=(-0.0429057645445)*x_ref[0]+(-1.08490578934)*x_ref[1]
-        ref[5,1,1]=(1.42851264594)*x_ref[0]+(1.52192971749)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.731194732468)*x[0]+(-0.0822115660022)*x[1]+(-0.403175091289)*x[2]
-        arg[0,0,1]=(0.39292230307)*x[0]+(1.48598681615)*x[1]+(1.05545374107)*x[2]
-        arg[0,1,0]=(0.306844260706)*x[0]+(0.836496026763)*x[1]+(-0.121120983155)*x[2]
-        arg[0,1,1]=(-0.155245802062)*x[0]+(0.800232934864)*x[1]+(0.373397160636)*x[2]
-        arg[1,0,0]=(0.155941790359)*x[0]+(0.826821969281)*x[1]+(0.849596807425)*x[2]
-        arg[1,0,1]=(-0.0988854656187)*x[0]+(-0.855032499842)*x[1]+(0.141988288566)*x[2]
-        arg[1,1,0]=(-0.761032539296)*x[0]+(-0.0892979073234)*x[1]+(1.93034385132)*x[2]
-        arg[1,1,1]=(-1.08303603558)*x[0]+(-0.487250117659)*x[1]+(0.0358501036173)*x[2]
-        arg[2,0,0]=(0.148391465413)*x[0]+(-0.731963025625)*x[1]+(0.484236965689)*x[2]
-        arg[2,0,1]=(1.06691217722)*x[0]+(-0.638095266244)*x[1]+(-0.971838410779)*x[2]
-        arg[2,1,0]=(-0.377750829061)*x[0]+(-0.101467967263)*x[1]+(-1.54241387349)*x[2]
-        arg[2,1,1]=(0.62210350231)*x[0]+(0.0435334873911)*x[1]+(-0.299303646623)*x[2]
-        arg[3,0,0]=(0.523811147108)*x[0]+(-1.09709839108)*x[1]+(1.83592280935)*x[2]
-        arg[3,0,1]=(0.957738143475)*x[0]+(0.282158440867)*x[1]+(0.621694180522)*x[2]
-        arg[3,1,0]=(0.366557891822)*x[0]+(0.812194047631)*x[1]+(-0.245067876349)*x[2]
-        arg[3,1,1]=(0.604859464982)*x[0]+(1.08415514854)*x[1]+(-1.470128848)*x[2]
-        arg[4,0,0]=(-0.13031502499)*x[0]+(-1.20707238733)*x[1]+(0.108382497552)*x[2]
-        arg[4,0,1]=(1.30453246317)*x[0]+(1.59696612588)*x[1]+(-0.234259043697)*x[2]
-        arg[4,1,0]=(-0.233494640836)*x[0]+(1.10701061816)*x[1]+(-0.409927013674)*x[2]
-        arg[4,1,1]=(0.102708240266)*x[0]+(-0.381598345002)*x[1]+(-1.39077748656)*x[2]
-        arg[5,0,0]=(1.06217404493)*x[0]+(1.1600791444)*x[1]+(-1.45242735389)*x[2]
-        arg[5,0,1]=(-0.423024189506)*x[0]+(-0.0868948651641)*x[1]+(0.0894539043522)*x[2]
-        arg[5,1,0]=(1.17650613067)*x[0]+(0.993832919965)*x[1]+(1.16546768569)*x[2]
-        arg[5,1,1]=(-0.61549132897)*x[0]+(-0.499619662734)*x[1]+(-0.643422281669)*x[2]
-        ref[0,0,0]=(0.731194732468)*x_ref[0]+(-0.0822115660022)*x_ref[1]+(-0.403175091289)*x_ref[2]
-        ref[0,0,1]=(0.39292230307)*x_ref[0]+(1.48598681615)*x_ref[1]+(1.05545374107)*x_ref[2]
-        ref[0,1,0]=(0.306844260706)*x_ref[0]+(0.836496026763)*x_ref[1]+(-0.121120983155)*x_ref[2]
-        ref[0,1,1]=(-0.155245802062)*x_ref[0]+(0.800232934864)*x_ref[1]+(0.373397160636)*x_ref[2]
-        ref[1,0,0]=(0.155941790359)*x_ref[0]+(0.826821969281)*x_ref[1]+(0.849596807425)*x_ref[2]
-        ref[1,0,1]=(-0.0988854656187)*x_ref[0]+(-0.855032499842)*x_ref[1]+(0.141988288566)*x_ref[2]
-        ref[1,1,0]=(-0.761032539296)*x_ref[0]+(-0.0892979073234)*x_ref[1]+(1.93034385132)*x_ref[2]
-        ref[1,1,1]=(-1.08303603558)*x_ref[0]+(-0.487250117659)*x_ref[1]+(0.0358501036173)*x_ref[2]
-        ref[2,0,0]=(0.148391465413)*x_ref[0]+(-0.731963025625)*x_ref[1]+(0.484236965689)*x_ref[2]
-        ref[2,0,1]=(1.06691217722)*x_ref[0]+(-0.638095266244)*x_ref[1]+(-0.971838410779)*x_ref[2]
-        ref[2,1,0]=(-0.377750829061)*x_ref[0]+(-0.101467967263)*x_ref[1]+(-1.54241387349)*x_ref[2]
-        ref[2,1,1]=(0.62210350231)*x_ref[0]+(0.0435334873911)*x_ref[1]+(-0.299303646623)*x_ref[2]
-        ref[3,0,0]=(0.523811147108)*x_ref[0]+(-1.09709839108)*x_ref[1]+(1.83592280935)*x_ref[2]
-        ref[3,0,1]=(0.957738143475)*x_ref[0]+(0.282158440867)*x_ref[1]+(0.621694180522)*x_ref[2]
-        ref[3,1,0]=(0.366557891822)*x_ref[0]+(0.812194047631)*x_ref[1]+(-0.245067876349)*x_ref[2]
-        ref[3,1,1]=(0.604859464982)*x_ref[0]+(1.08415514854)*x_ref[1]+(-1.470128848)*x_ref[2]
-        ref[4,0,0]=(-0.13031502499)*x_ref[0]+(-1.20707238733)*x_ref[1]+(0.108382497552)*x_ref[2]
-        ref[4,0,1]=(1.30453246317)*x_ref[0]+(1.59696612588)*x_ref[1]+(-0.234259043697)*x_ref[2]
-        ref[4,1,0]=(-0.233494640836)*x_ref[0]+(1.10701061816)*x_ref[1]+(-0.409927013674)*x_ref[2]
-        ref[4,1,1]=(0.102708240266)*x_ref[0]+(-0.381598345002)*x_ref[1]+(-1.39077748656)*x_ref[2]
-        ref[5,0,0]=(1.06217404493)*x_ref[0]+(1.1600791444)*x_ref[1]+(-1.45242735389)*x_ref[2]
-        ref[5,0,1]=(-0.423024189506)*x_ref[0]+(-0.0868948651641)*x_ref[1]+(0.0894539043522)*x_ref[2]
-        ref[5,1,0]=(1.17650613067)*x_ref[0]+(0.993832919965)*x_ref[1]+(1.16546768569)*x_ref[2]
-        ref[5,1,1]=(-0.61549132897)*x_ref[0]+(-0.499619662734)*x_ref[1]+(-0.643422281669)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.227969627252)*x[0]+(0.778177350248)*x[1]
-        arg[0,0,0,1]=(-0.684883711494)*x[0]+(-0.574285957132)*x[1]
-        arg[0,0,1,0]=(0.483090608974)*x[0]+(0.0779929087959)*x[1]
-        arg[0,0,1,1]=(-0.293150814932)*x[0]+(1.35368931993)*x[1]
-        arg[0,0,2,0]=(-0.190664734662)*x[0]+(0.910883386754)*x[1]
-        arg[0,0,2,1]=(-1.51255575457)*x[0]+(0.421560181501)*x[1]
-        arg[0,1,0,0]=(-0.833402828032)*x[0]+(-0.400466806781)*x[1]
-        arg[0,1,0,1]=(-0.212099323605)*x[0]+(-0.112478697221)*x[1]
-        arg[0,1,1,0]=(0.57687662926)*x[0]+(0.869758954551)*x[1]
-        arg[0,1,1,1]=(1.37261769917)*x[0]+(1.37855789907)*x[1]
-        arg[0,1,2,0]=(-1.02838589722)*x[0]+(-0.280409246204)*x[1]
-        arg[0,1,2,1]=(1.2333373468)*x[0]+(0.337631183798)*x[1]
-        arg[0,2,0,0]=(-0.249065448772)*x[0]+(0.834483646317)*x[1]
-        arg[0,2,0,1]=(-1.30860297683)*x[0]+(-0.653929967017)*x[1]
-        arg[0,2,1,0]=(-0.0155994484453)*x[0]+(-0.274023166937)*x[1]
-        arg[0,2,1,1]=(0.31458360335)*x[0]+(1.59507700673)*x[1]
-        arg[0,2,2,0]=(-0.11442619553)*x[0]+(1.6577028576)*x[1]
-        arg[0,2,2,1]=(0.274261132032)*x[0]+(1.15236962479)*x[1]
-        arg[0,3,0,0]=(1.91433860239)*x[0]+(-0.316349747811)*x[1]
-        arg[0,3,0,1]=(-1.42457591054)*x[0]+(-0.362812690805)*x[1]
-        arg[0,3,1,0]=(0.572734883096)*x[0]+(0.424724787283)*x[1]
-        arg[0,3,1,1]=(-0.118538376813)*x[0]+(0.25190312527)*x[1]
-        arg[0,3,2,0]=(-0.533409510081)*x[0]+(-0.804349107915)*x[1]
-        arg[0,3,2,1]=(-0.290555363666)*x[0]+(-0.912641477145)*x[1]
-        arg[0,4,0,0]=(-0.469612775918)*x[0]+(-0.0447411310793)*x[1]
-        arg[0,4,0,1]=(0.108538258831)*x[0]+(0.0453962016662)*x[1]
-        arg[0,4,1,0]=(-0.130785944028)*x[0]+(0.0887280914032)*x[1]
-        arg[0,4,1,1]=(0.166412309585)*x[0]+(-0.75130797706)*x[1]
-        arg[0,4,2,0]=(1.22538232455)*x[0]+(0.112925588343)*x[1]
-        arg[0,4,2,1]=(-1.02455171854)*x[0]+(-0.725754942749)*x[1]
-        arg[1,0,0,0]=(-0.869171086952)*x[0]+(-0.948876783682)*x[1]
-        arg[1,0,0,1]=(0.17730673689)*x[0]+(-0.00166180855579)*x[1]
-        arg[1,0,1,0]=(0.482072704433)*x[0]+(0.895847096783)*x[1]
-        arg[1,0,1,1]=(0.695736834617)*x[0]+(0.358082704558)*x[1]
-        arg[1,0,2,0]=(-0.501799636565)*x[0]+(0.363612558025)*x[1]
-        arg[1,0,2,1]=(-1.47204447226)*x[0]+(1.91281426121)*x[1]
-        arg[1,1,0,0]=(0.241893182978)*x[0]+(0.95199758669)*x[1]
-        arg[1,1,0,1]=(-0.68112361827)*x[0]+(-0.241935141301)*x[1]
-        arg[1,1,1,0]=(-0.553030972306)*x[0]+(0.0244503690439)*x[1]
-        arg[1,1,1,1]=(0.278177176896)*x[0]+(1.58693846427)*x[1]
-        arg[1,1,2,0]=(-0.87980015517)*x[0]+(0.315618837123)*x[1]
-        arg[1,1,2,1]=(-0.335783961379)*x[0]+(0.368650136138)*x[1]
-        arg[1,2,0,0]=(-0.903535146802)*x[0]+(1.68182923194)*x[1]
-        arg[1,2,0,1]=(1.06511511382)*x[0]+(-1.08524762302)*x[1]
-        arg[1,2,1,0]=(-0.0455274784681)*x[0]+(-0.519576710661)*x[1]
-        arg[1,2,1,1]=(0.735100217062)*x[0]+(-0.986268682671)*x[1]
-        arg[1,2,2,0]=(-0.544610797462)*x[0]+(0.447237114882)*x[1]
-        arg[1,2,2,1]=(0.385242031153)*x[0]+(-0.960538844247)*x[1]
-        arg[1,3,0,0]=(-0.354927072897)*x[0]+(0.842574324062)*x[1]
-        arg[1,3,0,1]=(0.319036427919)*x[0]+(-0.156282262536)*x[1]
-        arg[1,3,1,0]=(0.587123807717)*x[0]+(1.65277990726)*x[1]
-        arg[1,3,1,1]=(0.791697370298)*x[0]+(-1.5681680344)*x[1]
-        arg[1,3,2,0]=(-1.41931242045)*x[0]+(0.351285136557)*x[1]
-        arg[1,3,2,1]=(0.53175704402)*x[0]+(0.987523241324)*x[1]
-        arg[1,4,0,0]=(0.00533504818465)*x[0]+(-0.158886930817)*x[1]
-        arg[1,4,0,1]=(1.23725297303)*x[0]+(-0.302896452172)*x[1]
-        arg[1,4,1,0]=(0.433953146329)*x[0]+(-0.0721602234887)*x[1]
-        arg[1,4,1,1]=(-0.383499726865)*x[0]+(-0.253834671235)*x[1]
-        arg[1,4,2,0]=(-0.480776695247)*x[0]+(-0.302145524759)*x[1]
-        arg[1,4,2,1]=(1.14113180903)*x[0]+(-1.24304726003)*x[1]
-        arg[2,0,0,0]=(0.513776013893)*x[0]+(-0.16660259885)*x[1]
-        arg[2,0,0,1]=(1.55739209698)*x[0]+(0.0524084654531)*x[1]
-        arg[2,0,1,0]=(0.222567881446)*x[0]+(-0.357158470388)*x[1]
-        arg[2,0,1,1]=(0.0179816596229)*x[0]+(0.231534460784)*x[1]
-        arg[2,0,2,0]=(1.58460345297)*x[0]+(-0.383588433888)*x[1]
-        arg[2,0,2,1]=(-1.73386465536)*x[0]+(-0.743326657544)*x[1]
-        arg[2,1,0,0]=(-0.737976950246)*x[0]+(-1.01053396224)*x[1]
-        arg[2,1,0,1]=(0.926911190393)*x[0]+(0.620251783925)*x[1]
-        arg[2,1,1,0]=(-1.34289630129)*x[0]+(-0.429933681523)*x[1]
-        arg[2,1,1,1]=(1.79530806415)*x[0]+(-0.539783957021)*x[1]
-        arg[2,1,2,0]=(0.237950974938)*x[0]+(1.93783427703)*x[1]
-        arg[2,1,2,1]=(-0.439640741973)*x[0]+(-0.61543984673)*x[1]
-        arg[2,2,0,0]=(-1.66403612438)*x[0]+(1.00839566441)*x[1]
-        arg[2,2,0,1]=(0.249635983351)*x[0]+(-0.722261363675)*x[1]
-        arg[2,2,1,0]=(1.34179674459)*x[0]+(0.502542144188)*x[1]
-        arg[2,2,1,1]=(-0.815862586074)*x[0]+(-0.110688273707)*x[1]
-        arg[2,2,2,0]=(-0.686810719526)*x[0]+(0.500406563421)*x[1]
-        arg[2,2,2,1]=(0.681231089598)*x[0]+(0.605219505613)*x[1]
-        arg[2,3,0,0]=(-0.953299029956)*x[0]+(-0.223725858372)*x[1]
-        arg[2,3,0,1]=(0.831380756684)*x[0]+(-0.0379777076335)*x[1]
-        arg[2,3,1,0]=(-1.63804393157)*x[0]+(0.148235731301)*x[1]
-        arg[2,3,1,1]=(-0.17786458643)*x[0]+(-1.77342152699)*x[1]
-        arg[2,3,2,0]=(0.0210446244192)*x[0]+(1.59778781524)*x[1]
-        arg[2,3,2,1]=(0.877162721214)*x[0]+(0.262990448614)*x[1]
-        arg[2,4,0,0]=(-0.650265970331)*x[0]+(-1.07003604369)*x[1]
-        arg[2,4,0,1]=(1.12940101029)*x[0]+(0.860589290891)*x[1]
-        arg[2,4,1,0]=(0.520056210056)*x[0]+(-1.47691193979)*x[1]
-        arg[2,4,1,1]=(1.26823535235)*x[0]+(0.496811720647)*x[1]
-        arg[2,4,2,0]=(-1.388913443)*x[0]+(0.585343197943)*x[1]
-        arg[2,4,2,1]=(-0.762904547594)*x[0]+(0.503438815917)*x[1]
-        arg[3,0,0,0]=(0.382862686993)*x[0]+(-0.923525513303)*x[1]
-        arg[3,0,0,1]=(-0.54305794485)*x[0]+(0.467513531444)*x[1]
-        arg[3,0,1,0]=(1.24228759776)*x[0]+(-1.65740117421)*x[1]
-        arg[3,0,1,1]=(-0.463045362742)*x[0]+(0.186438587087)*x[1]
-        arg[3,0,2,0]=(0.296881980828)*x[0]+(-0.385878814949)*x[1]
-        arg[3,0,2,1]=(-0.299705899564)*x[0]+(0.490736038538)*x[1]
-        arg[3,1,0,0]=(-0.786851428658)*x[0]+(-0.760593794308)*x[1]
-        arg[3,1,0,1]=(0.506851336483)*x[0]+(0.995163951197)*x[1]
-        arg[3,1,1,0]=(-0.678883937341)*x[0]+(0.56996778248)*x[1]
-        arg[3,1,1,1]=(-0.401483642528)*x[0]+(0.0476797332537)*x[1]
-        arg[3,1,2,0]=(-0.585357955375)*x[0]+(0.330103647539)*x[1]
-        arg[3,1,2,1]=(-0.355539976825)*x[0]+(0.416287924349)*x[1]
-        arg[3,2,0,0]=(-0.662837130286)*x[0]+(-0.26640899674)*x[1]
-        arg[3,2,0,1]=(0.397553900588)*x[0]+(-1.21708620294)*x[1]
-        arg[3,2,1,0]=(0.464963326429)*x[0]+(-0.774515114142)*x[1]
-        arg[3,2,1,1]=(0.834351469791)*x[0]+(0.487629540715)*x[1]
-        arg[3,2,2,0]=(0.27622693716)*x[0]+(0.811338337719)*x[1]
-        arg[3,2,2,1]=(0.0384997772653)*x[0]+(1.03724996578)*x[1]
-        arg[3,3,0,0]=(-0.805491987874)*x[0]+(-0.476384547853)*x[1]
-        arg[3,3,0,1]=(0.615551780195)*x[0]+(-0.312805967691)*x[1]
-        arg[3,3,1,0]=(0.348666798955)*x[0]+(-1.31271156524)*x[1]
-        arg[3,3,1,1]=(-0.423569975374)*x[0]+(0.930713125389)*x[1]
-        arg[3,3,2,0]=(0.325632686234)*x[0]+(-0.166401033259)*x[1]
-        arg[3,3,2,1]=(0.126924861797)*x[0]+(-0.425380897969)*x[1]
-        arg[3,4,0,0]=(0.169532204538)*x[0]+(0.614632525765)*x[1]
-        arg[3,4,0,1]=(-0.938098696851)*x[0]+(0.648854147587)*x[1]
-        arg[3,4,1,0]=(-0.545143970434)*x[0]+(-1.59787515966)*x[1]
-        arg[3,4,1,1]=(-0.711190914978)*x[0]+(0.897331522911)*x[1]
-        arg[3,4,2,0]=(-0.386498124525)*x[0]+(0.299740420711)*x[1]
-        arg[3,4,2,1]=(0.617683032062)*x[0]+(-0.449587703061)*x[1]
-        ref[0,0,0,0]=(0.227969627252)*x_ref[0]+(0.778177350248)*x_ref[1]
-        ref[0,0,0,1]=(-0.684883711494)*x_ref[0]+(-0.574285957132)*x_ref[1]
-        ref[0,0,1,0]=(0.483090608974)*x_ref[0]+(0.0779929087959)*x_ref[1]
-        ref[0,0,1,1]=(-0.293150814932)*x_ref[0]+(1.35368931993)*x_ref[1]
-        ref[0,0,2,0]=(-0.190664734662)*x_ref[0]+(0.910883386754)*x_ref[1]
-        ref[0,0,2,1]=(-1.51255575457)*x_ref[0]+(0.421560181501)*x_ref[1]
-        ref[0,1,0,0]=(-0.833402828032)*x_ref[0]+(-0.400466806781)*x_ref[1]
-        ref[0,1,0,1]=(-0.212099323605)*x_ref[0]+(-0.112478697221)*x_ref[1]
-        ref[0,1,1,0]=(0.57687662926)*x_ref[0]+(0.869758954551)*x_ref[1]
-        ref[0,1,1,1]=(1.37261769917)*x_ref[0]+(1.37855789907)*x_ref[1]
-        ref[0,1,2,0]=(-1.02838589722)*x_ref[0]+(-0.280409246204)*x_ref[1]
-        ref[0,1,2,1]=(1.2333373468)*x_ref[0]+(0.337631183798)*x_ref[1]
-        ref[0,2,0,0]=(-0.249065448772)*x_ref[0]+(0.834483646317)*x_ref[1]
-        ref[0,2,0,1]=(-1.30860297683)*x_ref[0]+(-0.653929967017)*x_ref[1]
-        ref[0,2,1,0]=(-0.0155994484453)*x_ref[0]+(-0.274023166937)*x_ref[1]
-        ref[0,2,1,1]=(0.31458360335)*x_ref[0]+(1.59507700673)*x_ref[1]
-        ref[0,2,2,0]=(-0.11442619553)*x_ref[0]+(1.6577028576)*x_ref[1]
-        ref[0,2,2,1]=(0.274261132032)*x_ref[0]+(1.15236962479)*x_ref[1]
-        ref[0,3,0,0]=(1.91433860239)*x_ref[0]+(-0.316349747811)*x_ref[1]
-        ref[0,3,0,1]=(-1.42457591054)*x_ref[0]+(-0.362812690805)*x_ref[1]
-        ref[0,3,1,0]=(0.572734883096)*x_ref[0]+(0.424724787283)*x_ref[1]
-        ref[0,3,1,1]=(-0.118538376813)*x_ref[0]+(0.25190312527)*x_ref[1]
-        ref[0,3,2,0]=(-0.533409510081)*x_ref[0]+(-0.804349107915)*x_ref[1]
-        ref[0,3,2,1]=(-0.290555363666)*x_ref[0]+(-0.912641477145)*x_ref[1]
-        ref[0,4,0,0]=(-0.469612775918)*x_ref[0]+(-0.0447411310793)*x_ref[1]
-        ref[0,4,0,1]=(0.108538258831)*x_ref[0]+(0.0453962016662)*x_ref[1]
-        ref[0,4,1,0]=(-0.130785944028)*x_ref[0]+(0.0887280914032)*x_ref[1]
-        ref[0,4,1,1]=(0.166412309585)*x_ref[0]+(-0.75130797706)*x_ref[1]
-        ref[0,4,2,0]=(1.22538232455)*x_ref[0]+(0.112925588343)*x_ref[1]
-        ref[0,4,2,1]=(-1.02455171854)*x_ref[0]+(-0.725754942749)*x_ref[1]
-        ref[1,0,0,0]=(-0.869171086952)*x_ref[0]+(-0.948876783682)*x_ref[1]
-        ref[1,0,0,1]=(0.17730673689)*x_ref[0]+(-0.00166180855579)*x_ref[1]
-        ref[1,0,1,0]=(0.482072704433)*x_ref[0]+(0.895847096783)*x_ref[1]
-        ref[1,0,1,1]=(0.695736834617)*x_ref[0]+(0.358082704558)*x_ref[1]
-        ref[1,0,2,0]=(-0.501799636565)*x_ref[0]+(0.363612558025)*x_ref[1]
-        ref[1,0,2,1]=(-1.47204447226)*x_ref[0]+(1.91281426121)*x_ref[1]
-        ref[1,1,0,0]=(0.241893182978)*x_ref[0]+(0.95199758669)*x_ref[1]
-        ref[1,1,0,1]=(-0.68112361827)*x_ref[0]+(-0.241935141301)*x_ref[1]
-        ref[1,1,1,0]=(-0.553030972306)*x_ref[0]+(0.0244503690439)*x_ref[1]
-        ref[1,1,1,1]=(0.278177176896)*x_ref[0]+(1.58693846427)*x_ref[1]
-        ref[1,1,2,0]=(-0.87980015517)*x_ref[0]+(0.315618837123)*x_ref[1]
-        ref[1,1,2,1]=(-0.335783961379)*x_ref[0]+(0.368650136138)*x_ref[1]
-        ref[1,2,0,0]=(-0.903535146802)*x_ref[0]+(1.68182923194)*x_ref[1]
-        ref[1,2,0,1]=(1.06511511382)*x_ref[0]+(-1.08524762302)*x_ref[1]
-        ref[1,2,1,0]=(-0.0455274784681)*x_ref[0]+(-0.519576710661)*x_ref[1]
-        ref[1,2,1,1]=(0.735100217062)*x_ref[0]+(-0.986268682671)*x_ref[1]
-        ref[1,2,2,0]=(-0.544610797462)*x_ref[0]+(0.447237114882)*x_ref[1]
-        ref[1,2,2,1]=(0.385242031153)*x_ref[0]+(-0.960538844247)*x_ref[1]
-        ref[1,3,0,0]=(-0.354927072897)*x_ref[0]+(0.842574324062)*x_ref[1]
-        ref[1,3,0,1]=(0.319036427919)*x_ref[0]+(-0.156282262536)*x_ref[1]
-        ref[1,3,1,0]=(0.587123807717)*x_ref[0]+(1.65277990726)*x_ref[1]
-        ref[1,3,1,1]=(0.791697370298)*x_ref[0]+(-1.5681680344)*x_ref[1]
-        ref[1,3,2,0]=(-1.41931242045)*x_ref[0]+(0.351285136557)*x_ref[1]
-        ref[1,3,2,1]=(0.53175704402)*x_ref[0]+(0.987523241324)*x_ref[1]
-        ref[1,4,0,0]=(0.00533504818465)*x_ref[0]+(-0.158886930817)*x_ref[1]
-        ref[1,4,0,1]=(1.23725297303)*x_ref[0]+(-0.302896452172)*x_ref[1]
-        ref[1,4,1,0]=(0.433953146329)*x_ref[0]+(-0.0721602234887)*x_ref[1]
-        ref[1,4,1,1]=(-0.383499726865)*x_ref[0]+(-0.253834671235)*x_ref[1]
-        ref[1,4,2,0]=(-0.480776695247)*x_ref[0]+(-0.302145524759)*x_ref[1]
-        ref[1,4,2,1]=(1.14113180903)*x_ref[0]+(-1.24304726003)*x_ref[1]
-        ref[2,0,0,0]=(0.513776013893)*x_ref[0]+(-0.16660259885)*x_ref[1]
-        ref[2,0,0,1]=(1.55739209698)*x_ref[0]+(0.0524084654531)*x_ref[1]
-        ref[2,0,1,0]=(0.222567881446)*x_ref[0]+(-0.357158470388)*x_ref[1]
-        ref[2,0,1,1]=(0.0179816596229)*x_ref[0]+(0.231534460784)*x_ref[1]
-        ref[2,0,2,0]=(1.58460345297)*x_ref[0]+(-0.383588433888)*x_ref[1]
-        ref[2,0,2,1]=(-1.73386465536)*x_ref[0]+(-0.743326657544)*x_ref[1]
-        ref[2,1,0,0]=(-0.737976950246)*x_ref[0]+(-1.01053396224)*x_ref[1]
-        ref[2,1,0,1]=(0.926911190393)*x_ref[0]+(0.620251783925)*x_ref[1]
-        ref[2,1,1,0]=(-1.34289630129)*x_ref[0]+(-0.429933681523)*x_ref[1]
-        ref[2,1,1,1]=(1.79530806415)*x_ref[0]+(-0.539783957021)*x_ref[1]
-        ref[2,1,2,0]=(0.237950974938)*x_ref[0]+(1.93783427703)*x_ref[1]
-        ref[2,1,2,1]=(-0.439640741973)*x_ref[0]+(-0.61543984673)*x_ref[1]
-        ref[2,2,0,0]=(-1.66403612438)*x_ref[0]+(1.00839566441)*x_ref[1]
-        ref[2,2,0,1]=(0.249635983351)*x_ref[0]+(-0.722261363675)*x_ref[1]
-        ref[2,2,1,0]=(1.34179674459)*x_ref[0]+(0.502542144188)*x_ref[1]
-        ref[2,2,1,1]=(-0.815862586074)*x_ref[0]+(-0.110688273707)*x_ref[1]
-        ref[2,2,2,0]=(-0.686810719526)*x_ref[0]+(0.500406563421)*x_ref[1]
-        ref[2,2,2,1]=(0.681231089598)*x_ref[0]+(0.605219505613)*x_ref[1]
-        ref[2,3,0,0]=(-0.953299029956)*x_ref[0]+(-0.223725858372)*x_ref[1]
-        ref[2,3,0,1]=(0.831380756684)*x_ref[0]+(-0.0379777076335)*x_ref[1]
-        ref[2,3,1,0]=(-1.63804393157)*x_ref[0]+(0.148235731301)*x_ref[1]
-        ref[2,3,1,1]=(-0.17786458643)*x_ref[0]+(-1.77342152699)*x_ref[1]
-        ref[2,3,2,0]=(0.0210446244192)*x_ref[0]+(1.59778781524)*x_ref[1]
-        ref[2,3,2,1]=(0.877162721214)*x_ref[0]+(0.262990448614)*x_ref[1]
-        ref[2,4,0,0]=(-0.650265970331)*x_ref[0]+(-1.07003604369)*x_ref[1]
-        ref[2,4,0,1]=(1.12940101029)*x_ref[0]+(0.860589290891)*x_ref[1]
-        ref[2,4,1,0]=(0.520056210056)*x_ref[0]+(-1.47691193979)*x_ref[1]
-        ref[2,4,1,1]=(1.26823535235)*x_ref[0]+(0.496811720647)*x_ref[1]
-        ref[2,4,2,0]=(-1.388913443)*x_ref[0]+(0.585343197943)*x_ref[1]
-        ref[2,4,2,1]=(-0.762904547594)*x_ref[0]+(0.503438815917)*x_ref[1]
-        ref[3,0,0,0]=(0.382862686993)*x_ref[0]+(-0.923525513303)*x_ref[1]
-        ref[3,0,0,1]=(-0.54305794485)*x_ref[0]+(0.467513531444)*x_ref[1]
-        ref[3,0,1,0]=(1.24228759776)*x_ref[0]+(-1.65740117421)*x_ref[1]
-        ref[3,0,1,1]=(-0.463045362742)*x_ref[0]+(0.186438587087)*x_ref[1]
-        ref[3,0,2,0]=(0.296881980828)*x_ref[0]+(-0.385878814949)*x_ref[1]
-        ref[3,0,2,1]=(-0.299705899564)*x_ref[0]+(0.490736038538)*x_ref[1]
-        ref[3,1,0,0]=(-0.786851428658)*x_ref[0]+(-0.760593794308)*x_ref[1]
-        ref[3,1,0,1]=(0.506851336483)*x_ref[0]+(0.995163951197)*x_ref[1]
-        ref[3,1,1,0]=(-0.678883937341)*x_ref[0]+(0.56996778248)*x_ref[1]
-        ref[3,1,1,1]=(-0.401483642528)*x_ref[0]+(0.0476797332537)*x_ref[1]
-        ref[3,1,2,0]=(-0.585357955375)*x_ref[0]+(0.330103647539)*x_ref[1]
-        ref[3,1,2,1]=(-0.355539976825)*x_ref[0]+(0.416287924349)*x_ref[1]
-        ref[3,2,0,0]=(-0.662837130286)*x_ref[0]+(-0.26640899674)*x_ref[1]
-        ref[3,2,0,1]=(0.397553900588)*x_ref[0]+(-1.21708620294)*x_ref[1]
-        ref[3,2,1,0]=(0.464963326429)*x_ref[0]+(-0.774515114142)*x_ref[1]
-        ref[3,2,1,1]=(0.834351469791)*x_ref[0]+(0.487629540715)*x_ref[1]
-        ref[3,2,2,0]=(0.27622693716)*x_ref[0]+(0.811338337719)*x_ref[1]
-        ref[3,2,2,1]=(0.0384997772653)*x_ref[0]+(1.03724996578)*x_ref[1]
-        ref[3,3,0,0]=(-0.805491987874)*x_ref[0]+(-0.476384547853)*x_ref[1]
-        ref[3,3,0,1]=(0.615551780195)*x_ref[0]+(-0.312805967691)*x_ref[1]
-        ref[3,3,1,0]=(0.348666798955)*x_ref[0]+(-1.31271156524)*x_ref[1]
-        ref[3,3,1,1]=(-0.423569975374)*x_ref[0]+(0.930713125389)*x_ref[1]
-        ref[3,3,2,0]=(0.325632686234)*x_ref[0]+(-0.166401033259)*x_ref[1]
-        ref[3,3,2,1]=(0.126924861797)*x_ref[0]+(-0.425380897969)*x_ref[1]
-        ref[3,4,0,0]=(0.169532204538)*x_ref[0]+(0.614632525765)*x_ref[1]
-        ref[3,4,0,1]=(-0.938098696851)*x_ref[0]+(0.648854147587)*x_ref[1]
-        ref[3,4,1,0]=(-0.545143970434)*x_ref[0]+(-1.59787515966)*x_ref[1]
-        ref[3,4,1,1]=(-0.711190914978)*x_ref[0]+(0.897331522911)*x_ref[1]
-        ref[3,4,2,0]=(-0.386498124525)*x_ref[0]+(0.299740420711)*x_ref[1]
-        ref[3,4,2,1]=(0.617683032062)*x_ref[0]+(-0.449587703061)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.791620170192)*x[0]+(1.03871460301)*x[1]+(-0.225035657687)*x[2]
-        arg[0,0,0,1]=(-0.464422319203)*x[0]+(0.769454931053)*x[1]+(-0.783260637771)*x[2]
-        arg[0,0,1,0]=(0.72655538215)*x[0]+(-1.65736312015)*x[1]+(1.08402505927)*x[2]
-        arg[0,0,1,1]=(-0.207576709573)*x[0]+(-0.55250594761)*x[1]+(-0.923702938288)*x[2]
-        arg[0,0,2,0]=(-0.701991085516)*x[0]+(-1.76863643107)*x[1]+(0.831382933104)*x[2]
-        arg[0,0,2,1]=(0.0640035527319)*x[0]+(0.425446342976)*x[1]+(1.64626766696)*x[2]
-        arg[0,1,0,0]=(1.01022963801)*x[0]+(-0.0215015059716)*x[1]+(0.849862425592)*x[2]
-        arg[0,1,0,1]=(-0.45776932943)*x[0]+(0.7621342151)*x[1]+(-1.40123018391)*x[2]
-        arg[0,1,1,0]=(0.737485054127)*x[0]+(-0.147513905858)*x[1]+(-0.616928595213)*x[2]
-        arg[0,1,1,1]=(-0.0608005391894)*x[0]+(-0.154978210573)*x[1]+(-1.40322011577)*x[2]
-        arg[0,1,2,0]=(1.59908177714)*x[0]+(-0.378738573932)*x[1]+(1.45285315247)*x[2]
-        arg[0,1,2,1]=(-0.622552157046)*x[0]+(1.19996417516)*x[1]+(0.728842900843)*x[2]
-        arg[0,2,0,0]=(-0.46942034691)*x[0]+(0.333309721372)*x[1]+(-0.280846553832)*x[2]
-        arg[0,2,0,1]=(1.22208788109)*x[0]+(0.369339594285)*x[1]+(1.31078425589)*x[2]
-        arg[0,2,1,0]=(0.0794165004114)*x[0]+(0.44665451846)*x[1]+(-0.814625708916)*x[2]
-        arg[0,2,1,1]=(0.594200807165)*x[0]+(-0.00616720333193)*x[1]+(0.382706175172)*x[2]
-        arg[0,2,2,0]=(0.0372230170459)*x[0]+(0.440339923291)*x[1]+(0.137641070028)*x[2]
-        arg[0,2,2,1]=(-1.29863078274)*x[0]+(0.283142455171)*x[1]+(0.0844540074659)*x[2]
-        arg[0,3,0,0]=(1.72811808036)*x[0]+(0.536456781522)*x[1]+(0.0266737704706)*x[2]
-        arg[0,3,0,1]=(0.148219555101)*x[0]+(-0.6887500275)*x[1]+(-0.405613136632)*x[2]
-        arg[0,3,1,0]=(0.708262537279)*x[0]+(1.16319635773)*x[1]+(-0.030808721674)*x[2]
-        arg[0,3,1,1]=(0.80834615863)*x[0]+(-0.176789000925)*x[1]+(-1.72576120963)*x[2]
-        arg[0,3,2,0]=(0.21128315299)*x[0]+(0.770037046126)*x[1]+(0.988028934422)*x[2]
-        arg[0,3,2,1]=(1.10522136317)*x[0]+(1.6319351743)*x[1]+(-0.784693713387)*x[2]
-        arg[0,4,0,0]=(0.121088121064)*x[0]+(-1.79718067791)*x[1]+(-0.907857173318)*x[2]
-        arg[0,4,0,1]=(-0.695887294217)*x[0]+(-1.24166787807)*x[1]+(-1.24968023856)*x[2]
-        arg[0,4,1,0]=(-0.202510797291)*x[0]+(0.628310156105)*x[1]+(0.605146447822)*x[2]
-        arg[0,4,1,1]=(0.149227458424)*x[0]+(-1.5650392775)*x[1]+(-0.763944892663)*x[2]
-        arg[0,4,2,0]=(-0.393218625872)*x[0]+(0.479145914948)*x[1]+(-0.313960447492)*x[2]
-        arg[0,4,2,1]=(-0.0191807443799)*x[0]+(0.592992659119)*x[1]+(-0.475633115484)*x[2]
-        arg[1,0,0,0]=(-0.964829354261)*x[0]+(0.453014802906)*x[1]+(-0.779502566938)*x[2]
-        arg[1,0,0,1]=(0.0151205739508)*x[0]+(-0.153706429594)*x[1]+(0.00866460475724)*x[2]
-        arg[1,0,1,0]=(0.92592276366)*x[0]+(0.530787400525)*x[1]+(-0.0577912606876)*x[2]
-        arg[1,0,1,1]=(0.948404467077)*x[0]+(-0.265905470751)*x[1]+(0.472349192005)*x[2]
-        arg[1,0,2,0]=(0.0176615383702)*x[0]+(0.679605821761)*x[1]+(-0.0333590911941)*x[2]
-        arg[1,0,2,1]=(-1.15594952629)*x[0]+(0.264868376508)*x[1]+(-0.883690535499)*x[2]
-        arg[1,1,0,0]=(-0.738712703994)*x[0]+(0.545839232808)*x[1]+(0.592474501134)*x[2]
-        arg[1,1,0,1]=(-1.3468960453)*x[0]+(-0.00848202443614)*x[1]+(-0.0124138286126)*x[2]
-        arg[1,1,1,0]=(0.900228409707)*x[0]+(-1.86848082357)*x[1]+(0.421539431142)*x[2]
-        arg[1,1,1,1]=(1.42754013963)*x[0]+(-0.861376440449)*x[1]+(0.0965520362291)*x[2]
-        arg[1,1,2,0]=(-0.35873674515)*x[0]+(0.0862592617941)*x[1]+(-0.536106207025)*x[2]
-        arg[1,1,2,1]=(0.90712910097)*x[0]+(0.974545253055)*x[1]+(0.570708510858)*x[2]
-        arg[1,2,0,0]=(1.19310775669)*x[0]+(0.309414331679)*x[1]+(-0.271298061586)*x[2]
-        arg[1,2,0,1]=(0.551778129545)*x[0]+(0.539028430134)*x[1]+(0.239406239262)*x[2]
-        arg[1,2,1,0]=(-0.810625054344)*x[0]+(-0.241072190233)*x[1]+(-1.58590369097)*x[2]
-        arg[1,2,1,1]=(0.529669075734)*x[0]+(-0.890365024163)*x[1]+(-1.69798509084)*x[2]
-        arg[1,2,2,0]=(0.0437087707448)*x[0]+(0.88372190198)*x[1]+(1.86547747806)*x[2]
-        arg[1,2,2,1]=(1.30739438898)*x[0]+(0.315850112101)*x[1]+(-0.262001133683)*x[2]
-        arg[1,3,0,0]=(-0.143426236837)*x[0]+(-1.1703384826)*x[1]+(0.50608348646)*x[2]
-        arg[1,3,0,1]=(-0.0444408776922)*x[0]+(1.26952782036)*x[1]+(1.67192602934)*x[2]
-        arg[1,3,1,0]=(0.672742824368)*x[0]+(-0.785246676537)*x[1]+(0.716130664056)*x[2]
-        arg[1,3,1,1]=(-0.295182508335)*x[0]+(-1.53658860897)*x[1]+(-1.87133995422)*x[2]
-        arg[1,3,2,0]=(-0.440859530081)*x[0]+(0.0730120015821)*x[1]+(-1.02465537353)*x[2]
-        arg[1,3,2,1]=(0.838320612003)*x[0]+(1.81233688454)*x[1]+(-1.0633876685)*x[2]
-        arg[1,4,0,0]=(0.52440453051)*x[0]+(-0.0182588999022)*x[1]+(1.05556310351)*x[2]
-        arg[1,4,0,1]=(0.766612727495)*x[0]+(1.58987590746)*x[1]+(-0.703801484569)*x[2]
-        arg[1,4,1,0]=(0.373439757535)*x[0]+(-0.0676963704305)*x[1]+(0.0948034094293)*x[2]
-        arg[1,4,1,1]=(-0.542283543375)*x[0]+(-0.454408605761)*x[1]+(-0.398904635316)*x[2]
-        arg[1,4,2,0]=(1.3374871143)*x[0]+(0.0067849394587)*x[1]+(-0.319452094882)*x[2]
-        arg[1,4,2,1]=(0.38530755393)*x[0]+(1.05356462429)*x[1]+(-0.302179447719)*x[2]
-        arg[2,0,0,0]=(-0.123109761583)*x[0]+(0.69223848143)*x[1]+(-1.36903487092)*x[2]
-        arg[2,0,0,1]=(0.121957328459)*x[0]+(0.102229685387)*x[1]+(0.962499974737)*x[2]
-        arg[2,0,1,0]=(0.478614188653)*x[0]+(-1.23058817023)*x[1]+(1.30950997478)*x[2]
-        arg[2,0,1,1]=(-0.529033562461)*x[0]+(0.563030509591)*x[1]+(-0.564939226654)*x[2]
-        arg[2,0,2,0]=(-0.377740282406)*x[0]+(1.20532110343)*x[1]+(1.55615174947)*x[2]
-        arg[2,0,2,1]=(0.539119710703)*x[0]+(1.91771865857)*x[1]+(0.0809882488048)*x[2]
-        arg[2,1,0,0]=(0.00548664737796)*x[0]+(-0.157716099068)*x[1]+(-1.40009044235)*x[2]
-        arg[2,1,0,1]=(0.0667557890666)*x[0]+(0.742484448131)*x[1]+(-0.325246111346)*x[2]
-        arg[2,1,1,0]=(-0.214965474071)*x[0]+(-0.215055151964)*x[1]+(1.15673960537)*x[2]
-        arg[2,1,1,1]=(0.605764831789)*x[0]+(-1.0432964832)*x[1]+(0.645482523161)*x[2]
-        arg[2,1,2,0]=(-1.13098364088)*x[0]+(-0.932044089041)*x[1]+(-0.308053828241)*x[2]
-        arg[2,1,2,1]=(0.481961305459)*x[0]+(-0.101277472029)*x[1]+(-0.17520207974)*x[2]
-        arg[2,2,0,0]=(0.579831852303)*x[0]+(0.538731990254)*x[1]+(-0.0897460374205)*x[2]
-        arg[2,2,0,1]=(-1.8763181434)*x[0]+(-0.132710928569)*x[1]+(1.03169751651)*x[2]
-        arg[2,2,1,0]=(0.56871511431)*x[0]+(0.075333481656)*x[1]+(1.10238818953)*x[2]
-        arg[2,2,1,1]=(1.49347755246)*x[0]+(-1.00500941047)*x[1]+(-0.181733196359)*x[2]
-        arg[2,2,2,0]=(0.532881509971)*x[0]+(-0.364333964659)*x[1]+(1.09633720883)*x[2]
-        arg[2,2,2,1]=(-0.518419048615)*x[0]+(-0.48091100593)*x[1]+(0.724628840153)*x[2]
-        arg[2,3,0,0]=(0.353475859331)*x[0]+(-0.0239879269825)*x[1]+(1.32068893718)*x[2]
-        arg[2,3,0,1]=(0.553999122102)*x[0]+(-0.128530869239)*x[1]+(0.134663336287)*x[2]
-        arg[2,3,1,0]=(-1.59775882569)*x[0]+(-1.07335424785)*x[1]+(1.39223587988)*x[2]
-        arg[2,3,1,1]=(-0.921252080095)*x[0]+(1.46226299067)*x[1]+(-1.13412499932)*x[2]
-        arg[2,3,2,0]=(0.417572910178)*x[0]+(0.0814889599489)*x[1]+(0.292159249719)*x[2]
-        arg[2,3,2,1]=(1.44620228921)*x[0]+(0.767854577367)*x[1]+(-0.0113709806383)*x[2]
-        arg[2,4,0,0]=(-0.156987001681)*x[0]+(-0.922524257833)*x[1]+(0.521128360838)*x[2]
-        arg[2,4,0,1]=(0.154198133354)*x[0]+(0.462020370175)*x[1]+(0.966768653665)*x[2]
-        arg[2,4,1,0]=(0.507836849242)*x[0]+(1.16701911244)*x[1]+(0.264543038211)*x[2]
-        arg[2,4,1,1]=(0.452059436879)*x[0]+(0.409662432778)*x[1]+(-0.403800872595)*x[2]
-        arg[2,4,2,0]=(0.521175521008)*x[0]+(-0.362551578816)*x[1]+(0.0922727331623)*x[2]
-        arg[2,4,2,1]=(-1.0990361823)*x[0]+(1.73655146851)*x[1]+(-0.867917402922)*x[2]
-        arg[3,0,0,0]=(-0.0527010882236)*x[0]+(-1.11528215488)*x[1]+(1.3141906393)*x[2]
-        arg[3,0,0,1]=(0.151284271917)*x[0]+(-0.0159077450668)*x[1]+(1.1798338931)*x[2]
-        arg[3,0,1,0]=(-1.7648963435)*x[0]+(0.229511437402)*x[1]+(0.924415900312)*x[2]
-        arg[3,0,1,1]=(-0.498271821094)*x[0]+(1.58363063019)*x[1]+(1.64871750388)*x[2]
-        arg[3,0,2,0]=(-1.11245170725)*x[0]+(1.27662612569)*x[1]+(0.145950372369)*x[2]
-        arg[3,0,2,1]=(-0.691643924238)*x[0]+(-0.178211874279)*x[1]+(-0.341071050366)*x[2]
-        arg[3,1,0,0]=(-0.929804889461)*x[0]+(0.199087067309)*x[1]+(1.00150168883)*x[2]
-        arg[3,1,0,1]=(-1.25152265093)*x[0]+(0.517076294911)*x[1]+(0.103798312362)*x[2]
-        arg[3,1,1,0]=(0.797316290623)*x[0]+(0.0239285379293)*x[1]+(-0.836519299418)*x[2]
-        arg[3,1,1,1]=(-0.470084592176)*x[0]+(0.844364701728)*x[1]+(-0.027373275093)*x[2]
-        arg[3,1,2,0]=(1.0340279373)*x[0]+(-0.0133951276315)*x[1]+(1.17710546194)*x[2]
-        arg[3,1,2,1]=(0.0325929541496)*x[0]+(1.13784867184)*x[1]+(-0.0529194266769)*x[2]
-        arg[3,2,0,0]=(1.92837561772)*x[0]+(-1.63633468831)*x[1]+(1.4212324281)*x[2]
-        arg[3,2,0,1]=(1.09556054408)*x[0]+(1.43286059545)*x[1]+(1.20005604593)*x[2]
-        arg[3,2,1,0]=(0.308887169169)*x[0]+(-0.149214224208)*x[1]+(-1.13559614877)*x[2]
-        arg[3,2,1,1]=(-0.0648352909004)*x[0]+(-0.5645470596)*x[1]+(-0.525131730514)*x[2]
-        arg[3,2,2,0]=(0.21826829974)*x[0]+(1.5950239996)*x[1]+(0.333592425438)*x[2]
-        arg[3,2,2,1]=(-1.25613956172)*x[0]+(-0.242338679844)*x[1]+(-0.958875577074)*x[2]
-        arg[3,3,0,0]=(1.65005362159)*x[0]+(-1.16713867165)*x[1]+(-0.282495293685)*x[2]
-        arg[3,3,0,1]=(1.04854406427)*x[0]+(0.876270949531)*x[1]+(0.291036304743)*x[2]
-        arg[3,3,1,0]=(-1.66619451175)*x[0]+(0.656275192484)*x[1]+(-1.27104499942)*x[2]
-        arg[3,3,1,1]=(1.55407146907)*x[0]+(-0.322950943159)*x[1]+(-0.287565403896)*x[2]
-        arg[3,3,2,0]=(-1.54760268583)*x[0]+(-1.45847761887)*x[1]+(1.13939567009)*x[2]
-        arg[3,3,2,1]=(1.24632351699)*x[0]+(0.0265500081594)*x[1]+(1.61925095159)*x[2]
-        arg[3,4,0,0]=(-0.0430889433549)*x[0]+(-1.46995559463)*x[1]+(-1.14915159823)*x[2]
-        arg[3,4,0,1]=(0.0392641403409)*x[0]+(0.0603053049639)*x[1]+(0.647321169934)*x[2]
-        arg[3,4,1,0]=(-0.156300985227)*x[0]+(0.79369911928)*x[1]+(-0.413124762507)*x[2]
-        arg[3,4,1,1]=(0.258402059015)*x[0]+(0.00227307988585)*x[1]+(0.70067141295)*x[2]
-        arg[3,4,2,0]=(-1.15131298872)*x[0]+(-0.627449043157)*x[1]+(-0.402268345861)*x[2]
-        arg[3,4,2,1]=(0.455934238179)*x[0]+(-0.951120759108)*x[1]+(-0.280459367131)*x[2]
-        ref[0,0,0,0]=(-0.791620170192)*x_ref[0]+(1.03871460301)*x_ref[1]+(-0.225035657687)*x_ref[2]
-        ref[0,0,0,1]=(-0.464422319203)*x_ref[0]+(0.769454931053)*x_ref[1]+(-0.783260637771)*x_ref[2]
-        ref[0,0,1,0]=(0.72655538215)*x_ref[0]+(-1.65736312015)*x_ref[1]+(1.08402505927)*x_ref[2]
-        ref[0,0,1,1]=(-0.207576709573)*x_ref[0]+(-0.55250594761)*x_ref[1]+(-0.923702938288)*x_ref[2]
-        ref[0,0,2,0]=(-0.701991085516)*x_ref[0]+(-1.76863643107)*x_ref[1]+(0.831382933104)*x_ref[2]
-        ref[0,0,2,1]=(0.0640035527319)*x_ref[0]+(0.425446342976)*x_ref[1]+(1.64626766696)*x_ref[2]
-        ref[0,1,0,0]=(1.01022963801)*x_ref[0]+(-0.0215015059716)*x_ref[1]+(0.849862425592)*x_ref[2]
-        ref[0,1,0,1]=(-0.45776932943)*x_ref[0]+(0.7621342151)*x_ref[1]+(-1.40123018391)*x_ref[2]
-        ref[0,1,1,0]=(0.737485054127)*x_ref[0]+(-0.147513905858)*x_ref[1]+(-0.616928595213)*x_ref[2]
-        ref[0,1,1,1]=(-0.0608005391894)*x_ref[0]+(-0.154978210573)*x_ref[1]+(-1.40322011577)*x_ref[2]
-        ref[0,1,2,0]=(1.59908177714)*x_ref[0]+(-0.378738573932)*x_ref[1]+(1.45285315247)*x_ref[2]
-        ref[0,1,2,1]=(-0.622552157046)*x_ref[0]+(1.19996417516)*x_ref[1]+(0.728842900843)*x_ref[2]
-        ref[0,2,0,0]=(-0.46942034691)*x_ref[0]+(0.333309721372)*x_ref[1]+(-0.280846553832)*x_ref[2]
-        ref[0,2,0,1]=(1.22208788109)*x_ref[0]+(0.369339594285)*x_ref[1]+(1.31078425589)*x_ref[2]
-        ref[0,2,1,0]=(0.0794165004114)*x_ref[0]+(0.44665451846)*x_ref[1]+(-0.814625708916)*x_ref[2]
-        ref[0,2,1,1]=(0.594200807165)*x_ref[0]+(-0.00616720333193)*x_ref[1]+(0.382706175172)*x_ref[2]
-        ref[0,2,2,0]=(0.0372230170459)*x_ref[0]+(0.440339923291)*x_ref[1]+(0.137641070028)*x_ref[2]
-        ref[0,2,2,1]=(-1.29863078274)*x_ref[0]+(0.283142455171)*x_ref[1]+(0.0844540074659)*x_ref[2]
-        ref[0,3,0,0]=(1.72811808036)*x_ref[0]+(0.536456781522)*x_ref[1]+(0.0266737704706)*x_ref[2]
-        ref[0,3,0,1]=(0.148219555101)*x_ref[0]+(-0.6887500275)*x_ref[1]+(-0.405613136632)*x_ref[2]
-        ref[0,3,1,0]=(0.708262537279)*x_ref[0]+(1.16319635773)*x_ref[1]+(-0.030808721674)*x_ref[2]
-        ref[0,3,1,1]=(0.80834615863)*x_ref[0]+(-0.176789000925)*x_ref[1]+(-1.72576120963)*x_ref[2]
-        ref[0,3,2,0]=(0.21128315299)*x_ref[0]+(0.770037046126)*x_ref[1]+(0.988028934422)*x_ref[2]
-        ref[0,3,2,1]=(1.10522136317)*x_ref[0]+(1.6319351743)*x_ref[1]+(-0.784693713387)*x_ref[2]
-        ref[0,4,0,0]=(0.121088121064)*x_ref[0]+(-1.79718067791)*x_ref[1]+(-0.907857173318)*x_ref[2]
-        ref[0,4,0,1]=(-0.695887294217)*x_ref[0]+(-1.24166787807)*x_ref[1]+(-1.24968023856)*x_ref[2]
-        ref[0,4,1,0]=(-0.202510797291)*x_ref[0]+(0.628310156105)*x_ref[1]+(0.605146447822)*x_ref[2]
-        ref[0,4,1,1]=(0.149227458424)*x_ref[0]+(-1.5650392775)*x_ref[1]+(-0.763944892663)*x_ref[2]
-        ref[0,4,2,0]=(-0.393218625872)*x_ref[0]+(0.479145914948)*x_ref[1]+(-0.313960447492)*x_ref[2]
-        ref[0,4,2,1]=(-0.0191807443799)*x_ref[0]+(0.592992659119)*x_ref[1]+(-0.475633115484)*x_ref[2]
-        ref[1,0,0,0]=(-0.964829354261)*x_ref[0]+(0.453014802906)*x_ref[1]+(-0.779502566938)*x_ref[2]
-        ref[1,0,0,1]=(0.0151205739508)*x_ref[0]+(-0.153706429594)*x_ref[1]+(0.00866460475724)*x_ref[2]
-        ref[1,0,1,0]=(0.92592276366)*x_ref[0]+(0.530787400525)*x_ref[1]+(-0.0577912606876)*x_ref[2]
-        ref[1,0,1,1]=(0.948404467077)*x_ref[0]+(-0.265905470751)*x_ref[1]+(0.472349192005)*x_ref[2]
-        ref[1,0,2,0]=(0.0176615383702)*x_ref[0]+(0.679605821761)*x_ref[1]+(-0.0333590911941)*x_ref[2]
-        ref[1,0,2,1]=(-1.15594952629)*x_ref[0]+(0.264868376508)*x_ref[1]+(-0.883690535499)*x_ref[2]
-        ref[1,1,0,0]=(-0.738712703994)*x_ref[0]+(0.545839232808)*x_ref[1]+(0.592474501134)*x_ref[2]
-        ref[1,1,0,1]=(-1.3468960453)*x_ref[0]+(-0.00848202443614)*x_ref[1]+(-0.0124138286126)*x_ref[2]
-        ref[1,1,1,0]=(0.900228409707)*x_ref[0]+(-1.86848082357)*x_ref[1]+(0.421539431142)*x_ref[2]
-        ref[1,1,1,1]=(1.42754013963)*x_ref[0]+(-0.861376440449)*x_ref[1]+(0.0965520362291)*x_ref[2]
-        ref[1,1,2,0]=(-0.35873674515)*x_ref[0]+(0.0862592617941)*x_ref[1]+(-0.536106207025)*x_ref[2]
-        ref[1,1,2,1]=(0.90712910097)*x_ref[0]+(0.974545253055)*x_ref[1]+(0.570708510858)*x_ref[2]
-        ref[1,2,0,0]=(1.19310775669)*x_ref[0]+(0.309414331679)*x_ref[1]+(-0.271298061586)*x_ref[2]
-        ref[1,2,0,1]=(0.551778129545)*x_ref[0]+(0.539028430134)*x_ref[1]+(0.239406239262)*x_ref[2]
-        ref[1,2,1,0]=(-0.810625054344)*x_ref[0]+(-0.241072190233)*x_ref[1]+(-1.58590369097)*x_ref[2]
-        ref[1,2,1,1]=(0.529669075734)*x_ref[0]+(-0.890365024163)*x_ref[1]+(-1.69798509084)*x_ref[2]
-        ref[1,2,2,0]=(0.0437087707448)*x_ref[0]+(0.88372190198)*x_ref[1]+(1.86547747806)*x_ref[2]
-        ref[1,2,2,1]=(1.30739438898)*x_ref[0]+(0.315850112101)*x_ref[1]+(-0.262001133683)*x_ref[2]
-        ref[1,3,0,0]=(-0.143426236837)*x_ref[0]+(-1.1703384826)*x_ref[1]+(0.50608348646)*x_ref[2]
-        ref[1,3,0,1]=(-0.0444408776922)*x_ref[0]+(1.26952782036)*x_ref[1]+(1.67192602934)*x_ref[2]
-        ref[1,3,1,0]=(0.672742824368)*x_ref[0]+(-0.785246676537)*x_ref[1]+(0.716130664056)*x_ref[2]
-        ref[1,3,1,1]=(-0.295182508335)*x_ref[0]+(-1.53658860897)*x_ref[1]+(-1.87133995422)*x_ref[2]
-        ref[1,3,2,0]=(-0.440859530081)*x_ref[0]+(0.0730120015821)*x_ref[1]+(-1.02465537353)*x_ref[2]
-        ref[1,3,2,1]=(0.838320612003)*x_ref[0]+(1.81233688454)*x_ref[1]+(-1.0633876685)*x_ref[2]
-        ref[1,4,0,0]=(0.52440453051)*x_ref[0]+(-0.0182588999022)*x_ref[1]+(1.05556310351)*x_ref[2]
-        ref[1,4,0,1]=(0.766612727495)*x_ref[0]+(1.58987590746)*x_ref[1]+(-0.703801484569)*x_ref[2]
-        ref[1,4,1,0]=(0.373439757535)*x_ref[0]+(-0.0676963704305)*x_ref[1]+(0.0948034094293)*x_ref[2]
-        ref[1,4,1,1]=(-0.542283543375)*x_ref[0]+(-0.454408605761)*x_ref[1]+(-0.398904635316)*x_ref[2]
-        ref[1,4,2,0]=(1.3374871143)*x_ref[0]+(0.0067849394587)*x_ref[1]+(-0.319452094882)*x_ref[2]
-        ref[1,4,2,1]=(0.38530755393)*x_ref[0]+(1.05356462429)*x_ref[1]+(-0.302179447719)*x_ref[2]
-        ref[2,0,0,0]=(-0.123109761583)*x_ref[0]+(0.69223848143)*x_ref[1]+(-1.36903487092)*x_ref[2]
-        ref[2,0,0,1]=(0.121957328459)*x_ref[0]+(0.102229685387)*x_ref[1]+(0.962499974737)*x_ref[2]
-        ref[2,0,1,0]=(0.478614188653)*x_ref[0]+(-1.23058817023)*x_ref[1]+(1.30950997478)*x_ref[2]
-        ref[2,0,1,1]=(-0.529033562461)*x_ref[0]+(0.563030509591)*x_ref[1]+(-0.564939226654)*x_ref[2]
-        ref[2,0,2,0]=(-0.377740282406)*x_ref[0]+(1.20532110343)*x_ref[1]+(1.55615174947)*x_ref[2]
-        ref[2,0,2,1]=(0.539119710703)*x_ref[0]+(1.91771865857)*x_ref[1]+(0.0809882488048)*x_ref[2]
-        ref[2,1,0,0]=(0.00548664737796)*x_ref[0]+(-0.157716099068)*x_ref[1]+(-1.40009044235)*x_ref[2]
-        ref[2,1,0,1]=(0.0667557890666)*x_ref[0]+(0.742484448131)*x_ref[1]+(-0.325246111346)*x_ref[2]
-        ref[2,1,1,0]=(-0.214965474071)*x_ref[0]+(-0.215055151964)*x_ref[1]+(1.15673960537)*x_ref[2]
-        ref[2,1,1,1]=(0.605764831789)*x_ref[0]+(-1.0432964832)*x_ref[1]+(0.645482523161)*x_ref[2]
-        ref[2,1,2,0]=(-1.13098364088)*x_ref[0]+(-0.932044089041)*x_ref[1]+(-0.308053828241)*x_ref[2]
-        ref[2,1,2,1]=(0.481961305459)*x_ref[0]+(-0.101277472029)*x_ref[1]+(-0.17520207974)*x_ref[2]
-        ref[2,2,0,0]=(0.579831852303)*x_ref[0]+(0.538731990254)*x_ref[1]+(-0.0897460374205)*x_ref[2]
-        ref[2,2,0,1]=(-1.8763181434)*x_ref[0]+(-0.132710928569)*x_ref[1]+(1.03169751651)*x_ref[2]
-        ref[2,2,1,0]=(0.56871511431)*x_ref[0]+(0.075333481656)*x_ref[1]+(1.10238818953)*x_ref[2]
-        ref[2,2,1,1]=(1.49347755246)*x_ref[0]+(-1.00500941047)*x_ref[1]+(-0.181733196359)*x_ref[2]
-        ref[2,2,2,0]=(0.532881509971)*x_ref[0]+(-0.364333964659)*x_ref[1]+(1.09633720883)*x_ref[2]
-        ref[2,2,2,1]=(-0.518419048615)*x_ref[0]+(-0.48091100593)*x_ref[1]+(0.724628840153)*x_ref[2]
-        ref[2,3,0,0]=(0.353475859331)*x_ref[0]+(-0.0239879269825)*x_ref[1]+(1.32068893718)*x_ref[2]
-        ref[2,3,0,1]=(0.553999122102)*x_ref[0]+(-0.128530869239)*x_ref[1]+(0.134663336287)*x_ref[2]
-        ref[2,3,1,0]=(-1.59775882569)*x_ref[0]+(-1.07335424785)*x_ref[1]+(1.39223587988)*x_ref[2]
-        ref[2,3,1,1]=(-0.921252080095)*x_ref[0]+(1.46226299067)*x_ref[1]+(-1.13412499932)*x_ref[2]
-        ref[2,3,2,0]=(0.417572910178)*x_ref[0]+(0.0814889599489)*x_ref[1]+(0.292159249719)*x_ref[2]
-        ref[2,3,2,1]=(1.44620228921)*x_ref[0]+(0.767854577367)*x_ref[1]+(-0.0113709806383)*x_ref[2]
-        ref[2,4,0,0]=(-0.156987001681)*x_ref[0]+(-0.922524257833)*x_ref[1]+(0.521128360838)*x_ref[2]
-        ref[2,4,0,1]=(0.154198133354)*x_ref[0]+(0.462020370175)*x_ref[1]+(0.966768653665)*x_ref[2]
-        ref[2,4,1,0]=(0.507836849242)*x_ref[0]+(1.16701911244)*x_ref[1]+(0.264543038211)*x_ref[2]
-        ref[2,4,1,1]=(0.452059436879)*x_ref[0]+(0.409662432778)*x_ref[1]+(-0.403800872595)*x_ref[2]
-        ref[2,4,2,0]=(0.521175521008)*x_ref[0]+(-0.362551578816)*x_ref[1]+(0.0922727331623)*x_ref[2]
-        ref[2,4,2,1]=(-1.0990361823)*x_ref[0]+(1.73655146851)*x_ref[1]+(-0.867917402922)*x_ref[2]
-        ref[3,0,0,0]=(-0.0527010882236)*x_ref[0]+(-1.11528215488)*x_ref[1]+(1.3141906393)*x_ref[2]
-        ref[3,0,0,1]=(0.151284271917)*x_ref[0]+(-0.0159077450668)*x_ref[1]+(1.1798338931)*x_ref[2]
-        ref[3,0,1,0]=(-1.7648963435)*x_ref[0]+(0.229511437402)*x_ref[1]+(0.924415900312)*x_ref[2]
-        ref[3,0,1,1]=(-0.498271821094)*x_ref[0]+(1.58363063019)*x_ref[1]+(1.64871750388)*x_ref[2]
-        ref[3,0,2,0]=(-1.11245170725)*x_ref[0]+(1.27662612569)*x_ref[1]+(0.145950372369)*x_ref[2]
-        ref[3,0,2,1]=(-0.691643924238)*x_ref[0]+(-0.178211874279)*x_ref[1]+(-0.341071050366)*x_ref[2]
-        ref[3,1,0,0]=(-0.929804889461)*x_ref[0]+(0.199087067309)*x_ref[1]+(1.00150168883)*x_ref[2]
-        ref[3,1,0,1]=(-1.25152265093)*x_ref[0]+(0.517076294911)*x_ref[1]+(0.103798312362)*x_ref[2]
-        ref[3,1,1,0]=(0.797316290623)*x_ref[0]+(0.0239285379293)*x_ref[1]+(-0.836519299418)*x_ref[2]
-        ref[3,1,1,1]=(-0.470084592176)*x_ref[0]+(0.844364701728)*x_ref[1]+(-0.027373275093)*x_ref[2]
-        ref[3,1,2,0]=(1.0340279373)*x_ref[0]+(-0.0133951276315)*x_ref[1]+(1.17710546194)*x_ref[2]
-        ref[3,1,2,1]=(0.0325929541496)*x_ref[0]+(1.13784867184)*x_ref[1]+(-0.0529194266769)*x_ref[2]
-        ref[3,2,0,0]=(1.92837561772)*x_ref[0]+(-1.63633468831)*x_ref[1]+(1.4212324281)*x_ref[2]
-        ref[3,2,0,1]=(1.09556054408)*x_ref[0]+(1.43286059545)*x_ref[1]+(1.20005604593)*x_ref[2]
-        ref[3,2,1,0]=(0.308887169169)*x_ref[0]+(-0.149214224208)*x_ref[1]+(-1.13559614877)*x_ref[2]
-        ref[3,2,1,1]=(-0.0648352909004)*x_ref[0]+(-0.5645470596)*x_ref[1]+(-0.525131730514)*x_ref[2]
-        ref[3,2,2,0]=(0.21826829974)*x_ref[0]+(1.5950239996)*x_ref[1]+(0.333592425438)*x_ref[2]
-        ref[3,2,2,1]=(-1.25613956172)*x_ref[0]+(-0.242338679844)*x_ref[1]+(-0.958875577074)*x_ref[2]
-        ref[3,3,0,0]=(1.65005362159)*x_ref[0]+(-1.16713867165)*x_ref[1]+(-0.282495293685)*x_ref[2]
-        ref[3,3,0,1]=(1.04854406427)*x_ref[0]+(0.876270949531)*x_ref[1]+(0.291036304743)*x_ref[2]
-        ref[3,3,1,0]=(-1.66619451175)*x_ref[0]+(0.656275192484)*x_ref[1]+(-1.27104499942)*x_ref[2]
-        ref[3,3,1,1]=(1.55407146907)*x_ref[0]+(-0.322950943159)*x_ref[1]+(-0.287565403896)*x_ref[2]
-        ref[3,3,2,0]=(-1.54760268583)*x_ref[0]+(-1.45847761887)*x_ref[1]+(1.13939567009)*x_ref[2]
-        ref[3,3,2,1]=(1.24632351699)*x_ref[0]+(0.0265500081594)*x_ref[1]+(1.61925095159)*x_ref[2]
-        ref[3,4,0,0]=(-0.0430889433549)*x_ref[0]+(-1.46995559463)*x_ref[1]+(-1.14915159823)*x_ref[2]
-        ref[3,4,0,1]=(0.0392641403409)*x_ref[0]+(0.0603053049639)*x_ref[1]+(0.647321169934)*x_ref[2]
-        ref[3,4,1,0]=(-0.156300985227)*x_ref[0]+(0.79369911928)*x_ref[1]+(-0.413124762507)*x_ref[2]
-        ref[3,4,1,1]=(0.258402059015)*x_ref[0]+(0.00227307988585)*x_ref[1]+(0.70067141295)*x_ref[2]
-        ref[3,4,2,0]=(-1.15131298872)*x_ref[0]+(-0.627449043157)*x_ref[1]+(-0.402268345861)*x_ref[2]
-        ref[3,4,2,1]=(0.455934238179)*x_ref[0]+(-0.951120759108)*x_ref[1]+(-0.280459367131)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.787646538574)*x[0]+(0.912422904218)*x[1]
-        ref=(-0.787646538574)*x_ref[0]+(0.912422904218)*x_ref[1]
-      else:
-        arg=(0.934044939024)*x[0]+(0.628477728603)*x[1]+(-0.786339405837)*x[2]
-        ref=(0.934044939024)*x_ref[0]+(0.628477728603)*x_ref[1]+(-0.786339405837)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        arg[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-        ref[0]=(-0.588326094839)*x[0]+(1.56296941343)*x[1]
-        ref[1]=(-0.802191222185)*x[0]+(-1.13471016062)*x[1]
-      else:
-        arg[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        arg[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-        ref[0]=(0.160702771321)*x[0]+(-0.0784425374814)*x[1]+(1.65226639722)*x[2]
-        ref[1]=(0.745050820919)*x[0]+(-0.183859360073)*x[1]+(0.399813139488)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.797066914479)*x[0]+(-0.0269853164939)*x[1]
-        arg[0,1]=(-1.07443661798)*x[0]+(0.818510216043)*x[1]
-        arg[0,2]=(0.398735262179)*x[0]+(-0.580387872083)*x[1]
-        arg[0,3]=(-0.003185613959)*x[0]+(-0.670506330615)*x[1]
-        arg[0,4]=(0.385009570186)*x[0]+(0.858570512936)*x[1]
-        arg[1,0]=(1.60917176753)*x[0]+(-0.0866362449992)*x[1]
-        arg[1,1]=(-0.883782122452)*x[0]+(-0.402187705578)*x[1]
-        arg[1,2]=(0.153893095122)*x[0]+(-1.19636362644)*x[1]
-        arg[1,3]=(1.92041961031)*x[0]+(0.325857877636)*x[1]
-        arg[1,4]=(-0.0947698843729)*x[0]+(-0.0663785758627)*x[1]
-        arg[2,0]=(0.0232949467051)*x[0]+(1.60134210326)*x[1]
-        arg[2,1]=(-0.521182882924)*x[0]+(-0.507401571343)*x[1]
-        arg[2,2]=(0.833797117616)*x[0]+(-0.268886477194)*x[1]
-        arg[2,3]=(-0.867762611227)*x[0]+(1.03727088566)*x[1]
-        arg[2,4]=(0.380510651918)*x[0]+(0.350246888456)*x[1]
-        arg[3,0]=(-1.10155500839)*x[0]+(0.414683749118)*x[1]
-        arg[3,1]=(-0.0306733233552)*x[0]+(-0.351251014237)*x[1]
-        arg[3,2]=(-0.0708773001498)*x[0]+(-0.326636587948)*x[1]
-        arg[3,3]=(-1.32553119895)*x[0]+(-1.5852157477)*x[1]
-        arg[3,4]=(1.40177154802)*x[0]+(-1.24804787994)*x[1]
-        ref[0,0]=(-0.797066914479)*x_ref[0]+(-0.0269853164939)*x_ref[1]
-        ref[0,1]=(-1.07443661798)*x_ref[0]+(0.818510216043)*x_ref[1]
-        ref[0,2]=(0.398735262179)*x_ref[0]+(-0.580387872083)*x_ref[1]
-        ref[0,3]=(-0.003185613959)*x_ref[0]+(-0.670506330615)*x_ref[1]
-        ref[0,4]=(0.385009570186)*x_ref[0]+(0.858570512936)*x_ref[1]
-        ref[1,0]=(1.60917176753)*x_ref[0]+(-0.0866362449992)*x_ref[1]
-        ref[1,1]=(-0.883782122452)*x_ref[0]+(-0.402187705578)*x_ref[1]
-        ref[1,2]=(0.153893095122)*x_ref[0]+(-1.19636362644)*x_ref[1]
-        ref[1,3]=(1.92041961031)*x_ref[0]+(0.325857877636)*x_ref[1]
-        ref[1,4]=(-0.0947698843729)*x_ref[0]+(-0.0663785758627)*x_ref[1]
-        ref[2,0]=(0.0232949467051)*x_ref[0]+(1.60134210326)*x_ref[1]
-        ref[2,1]=(-0.521182882924)*x_ref[0]+(-0.507401571343)*x_ref[1]
-        ref[2,2]=(0.833797117616)*x_ref[0]+(-0.268886477194)*x_ref[1]
-        ref[2,3]=(-0.867762611227)*x_ref[0]+(1.03727088566)*x_ref[1]
-        ref[2,4]=(0.380510651918)*x_ref[0]+(0.350246888456)*x_ref[1]
-        ref[3,0]=(-1.10155500839)*x_ref[0]+(0.414683749118)*x_ref[1]
-        ref[3,1]=(-0.0306733233552)*x_ref[0]+(-0.351251014237)*x_ref[1]
-        ref[3,2]=(-0.0708773001498)*x_ref[0]+(-0.326636587948)*x_ref[1]
-        ref[3,3]=(-1.32553119895)*x_ref[0]+(-1.5852157477)*x_ref[1]
-        ref[3,4]=(1.40177154802)*x_ref[0]+(-1.24804787994)*x_ref[1]
-      else:
-        arg[0,0]=(0.000362194678523)*x[0]+(-1.63949220671)*x[1]+(-0.176997156562)*x[2]
-        arg[0,1]=(-0.357589049408)*x[0]+(0.828191515325)*x[1]+(-0.269706780136)*x[2]
-        arg[0,2]=(0.886395070544)*x[0]+(0.815688451839)*x[1]+(-0.658412270558)*x[2]
-        arg[0,3]=(-0.222573318026)*x[0]+(0.137763803092)*x[1]+(0.171902150187)*x[2]
-        arg[0,4]=(1.05159741251)*x[0]+(0.923836841038)*x[1]+(-0.426590801731)*x[2]
-        arg[1,0]=(-0.00718419057788)*x[0]+(1.55809964998)*x[1]+(-0.912766657496)*x[2]
-        arg[1,1]=(1.30769045785)*x[0]+(-0.0356609338389)*x[1]+(0.214543084134)*x[2]
-        arg[1,2]=(-1.56763014241)*x[0]+(-0.582970995722)*x[1]+(-0.513972924752)*x[2]
-        arg[1,3]=(0.118027736928)*x[0]+(-0.28795014876)*x[1]+(0.620718623034)*x[2]
-        arg[1,4]=(-0.784496170193)*x[0]+(0.233037866924)*x[1]+(-0.0500718134572)*x[2]
-        arg[2,0]=(0.800851281806)*x[0]+(0.219346484846)*x[1]+(1.19125787701)*x[2]
-        arg[2,1]=(-1.45025879429)*x[0]+(-1.32011538154)*x[1]+(0.47946669308)*x[2]
-        arg[2,2]=(-0.231377110469)*x[0]+(-0.921551695999)*x[1]+(-0.298964635841)*x[2]
-        arg[2,3]=(0.965766335546)*x[0]+(0.424791610089)*x[1]+(1.01860652092)*x[2]
-        arg[2,4]=(0.676247093636)*x[0]+(-1.50802741511)*x[1]+(0.0385960918391)*x[2]
-        arg[3,0]=(0.322378151756)*x[0]+(-0.483633005509)*x[1]+(-0.852371707865)*x[2]
-        arg[3,1]=(-0.241998307153)*x[0]+(-1.08134340082)*x[1]+(-0.849574532537)*x[2]
-        arg[3,2]=(-0.0185751405467)*x[0]+(0.179558416001)*x[1]+(-0.488727308548)*x[2]
-        arg[3,3]=(0.0984555057845)*x[0]+(1.03085967788)*x[1]+(-0.357009094371)*x[2]
-        arg[3,4]=(0.430593980121)*x[0]+(0.689565614489)*x[1]+(-0.0916541808491)*x[2]
-        ref[0,0]=(0.000362194678523)*x_ref[0]+(-1.63949220671)*x_ref[1]+(-0.176997156562)*x_ref[2]
-        ref[0,1]=(-0.357589049408)*x_ref[0]+(0.828191515325)*x_ref[1]+(-0.269706780136)*x_ref[2]
-        ref[0,2]=(0.886395070544)*x_ref[0]+(0.815688451839)*x_ref[1]+(-0.658412270558)*x_ref[2]
-        ref[0,3]=(-0.222573318026)*x_ref[0]+(0.137763803092)*x_ref[1]+(0.171902150187)*x_ref[2]
-        ref[0,4]=(1.05159741251)*x_ref[0]+(0.923836841038)*x_ref[1]+(-0.426590801731)*x_ref[2]
-        ref[1,0]=(-0.00718419057788)*x_ref[0]+(1.55809964998)*x_ref[1]+(-0.912766657496)*x_ref[2]
-        ref[1,1]=(1.30769045785)*x_ref[0]+(-0.0356609338389)*x_ref[1]+(0.214543084134)*x_ref[2]
-        ref[1,2]=(-1.56763014241)*x_ref[0]+(-0.582970995722)*x_ref[1]+(-0.513972924752)*x_ref[2]
-        ref[1,3]=(0.118027736928)*x_ref[0]+(-0.28795014876)*x_ref[1]+(0.620718623034)*x_ref[2]
-        ref[1,4]=(-0.784496170193)*x_ref[0]+(0.233037866924)*x_ref[1]+(-0.0500718134572)*x_ref[2]
-        ref[2,0]=(0.800851281806)*x_ref[0]+(0.219346484846)*x_ref[1]+(1.19125787701)*x_ref[2]
-        ref[2,1]=(-1.45025879429)*x_ref[0]+(-1.32011538154)*x_ref[1]+(0.47946669308)*x_ref[2]
-        ref[2,2]=(-0.231377110469)*x_ref[0]+(-0.921551695999)*x_ref[1]+(-0.298964635841)*x_ref[2]
-        ref[2,3]=(0.965766335546)*x_ref[0]+(0.424791610089)*x_ref[1]+(1.01860652092)*x_ref[2]
-        ref[2,4]=(0.676247093636)*x_ref[0]+(-1.50802741511)*x_ref[1]+(0.0385960918391)*x_ref[2]
-        ref[3,0]=(0.322378151756)*x_ref[0]+(-0.483633005509)*x_ref[1]+(-0.852371707865)*x_ref[2]
-        ref[3,1]=(-0.241998307153)*x_ref[0]+(-1.08134340082)*x_ref[1]+(-0.849574532537)*x_ref[2]
-        ref[3,2]=(-0.0185751405467)*x_ref[0]+(0.179558416001)*x_ref[1]+(-0.488727308548)*x_ref[2]
-        ref[3,3]=(0.0984555057845)*x_ref[0]+(1.03085967788)*x_ref[1]+(-0.357009094371)*x_ref[2]
-        ref[3,4]=(0.430593980121)*x_ref[0]+(0.689565614489)*x_ref[1]+(-0.0916541808491)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.0641544023301)*x[0]+(0.364286357763)*x[1]
-        arg[0,0,1]=(-0.858288240411)*x[0]+(-0.847764393559)*x[1]
-        arg[0,1,0]=(-0.656948775029)*x[0]+(1.69748608992)*x[1]
-        arg[0,1,1]=(0.579399191549)*x[0]+(1.48407368783)*x[1]
-        arg[1,0,0]=(-0.35948657403)*x[0]+(0.795436090765)*x[1]
-        arg[1,0,1]=(-1.32807156246)*x[0]+(0.921960610294)*x[1]
-        arg[1,1,0]=(1.0904085219)*x[0]+(-1.41870997296)*x[1]
-        arg[1,1,1]=(-0.677691596793)*x[0]+(-0.395373706333)*x[1]
-        arg[2,0,0]=(0.295591917216)*x[0]+(-1.75550830457)*x[1]
-        arg[2,0,1]=(0.506665326626)*x[0]+(0.273265713965)*x[1]
-        arg[2,1,0]=(0.543899865352)*x[0]+(-0.0678457091657)*x[1]
-        arg[2,1,1]=(-0.887824769535)*x[0]+(0.527475538055)*x[1]
-        arg[3,0,0]=(-0.788511557365)*x[0]+(-0.635972100675)*x[1]
-        arg[3,0,1]=(-1.02799066459)*x[0]+(-0.416241247725)*x[1]
-        arg[3,1,0]=(-0.310072483091)*x[0]+(1.2445160445)*x[1]
-        arg[3,1,1]=(0.912462196567)*x[0]+(0.631855269783)*x[1]
-        arg[4,0,0]=(0.700426861807)*x[0]+(-0.491365913713)*x[1]
-        arg[4,0,1]=(0.628791538338)*x[0]+(0.640767645586)*x[1]
-        arg[4,1,0]=(0.370886720329)*x[0]+(0.823663448834)*x[1]
-        arg[4,1,1]=(1.75857310774)*x[0]+(0.445439424641)*x[1]
-        arg[5,0,0]=(1.39637385066)*x[0]+(-0.812211860169)*x[1]
-        arg[5,0,1]=(0.865050350195)*x[0]+(-1.25983380375)*x[1]
-        arg[5,1,0]=(-0.0429057645445)*x[0]+(-1.08490578934)*x[1]
-        arg[5,1,1]=(1.42851264594)*x[0]+(1.52192971749)*x[1]
-        ref[0,0,0]=(-0.0641544023301)*x_ref[0]+(0.364286357763)*x_ref[1]
-        ref[0,0,1]=(-0.858288240411)*x_ref[0]+(-0.847764393559)*x_ref[1]
-        ref[0,1,0]=(-0.656948775029)*x_ref[0]+(1.69748608992)*x_ref[1]
-        ref[0,1,1]=(0.579399191549)*x_ref[0]+(1.48407368783)*x_ref[1]
-        ref[1,0,0]=(-0.35948657403)*x_ref[0]+(0.795436090765)*x_ref[1]
-        ref[1,0,1]=(-1.32807156246)*x_ref[0]+(0.921960610294)*x_ref[1]
-        ref[1,1,0]=(1.0904085219)*x_ref[0]+(-1.41870997296)*x_ref[1]
-        ref[1,1,1]=(-0.677691596793)*x_ref[0]+(-0.395373706333)*x_ref[1]
-        ref[2,0,0]=(0.295591917216)*x_ref[0]+(-1.75550830457)*x_ref[1]
-        ref[2,0,1]=(0.506665326626)*x_ref[0]+(0.273265713965)*x_ref[1]
-        ref[2,1,0]=(0.543899865352)*x_ref[0]+(-0.0678457091657)*x_ref[1]
-        ref[2,1,1]=(-0.887824769535)*x_ref[0]+(0.527475538055)*x_ref[1]
-        ref[3,0,0]=(-0.788511557365)*x_ref[0]+(-0.635972100675)*x_ref[1]
-        ref[3,0,1]=(-1.02799066459)*x_ref[0]+(-0.416241247725)*x_ref[1]
-        ref[3,1,0]=(-0.310072483091)*x_ref[0]+(1.2445160445)*x_ref[1]
-        ref[3,1,1]=(0.912462196567)*x_ref[0]+(0.631855269783)*x_ref[1]
-        ref[4,0,0]=(0.700426861807)*x_ref[0]+(-0.491365913713)*x_ref[1]
-        ref[4,0,1]=(0.628791538338)*x_ref[0]+(0.640767645586)*x_ref[1]
-        ref[4,1,0]=(0.370886720329)*x_ref[0]+(0.823663448834)*x_ref[1]
-        ref[4,1,1]=(1.75857310774)*x_ref[0]+(0.445439424641)*x_ref[1]
-        ref[5,0,0]=(1.39637385066)*x_ref[0]+(-0.812211860169)*x_ref[1]
-        ref[5,0,1]=(0.865050350195)*x_ref[0]+(-1.25983380375)*x_ref[1]
-        ref[5,1,0]=(-0.0429057645445)*x_ref[0]+(-1.08490578934)*x_ref[1]
-        ref[5,1,1]=(1.42851264594)*x_ref[0]+(1.52192971749)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.731194732468)*x[0]+(-0.0822115660022)*x[1]+(-0.403175091289)*x[2]
-        arg[0,0,1]=(0.39292230307)*x[0]+(1.48598681615)*x[1]+(1.05545374107)*x[2]
-        arg[0,1,0]=(0.306844260706)*x[0]+(0.836496026763)*x[1]+(-0.121120983155)*x[2]
-        arg[0,1,1]=(-0.155245802062)*x[0]+(0.800232934864)*x[1]+(0.373397160636)*x[2]
-        arg[1,0,0]=(0.155941790359)*x[0]+(0.826821969281)*x[1]+(0.849596807425)*x[2]
-        arg[1,0,1]=(-0.0988854656187)*x[0]+(-0.855032499842)*x[1]+(0.141988288566)*x[2]
-        arg[1,1,0]=(-0.761032539296)*x[0]+(-0.0892979073234)*x[1]+(1.93034385132)*x[2]
-        arg[1,1,1]=(-1.08303603558)*x[0]+(-0.487250117659)*x[1]+(0.0358501036173)*x[2]
-        arg[2,0,0]=(0.148391465413)*x[0]+(-0.731963025625)*x[1]+(0.484236965689)*x[2]
-        arg[2,0,1]=(1.06691217722)*x[0]+(-0.638095266244)*x[1]+(-0.971838410779)*x[2]
-        arg[2,1,0]=(-0.377750829061)*x[0]+(-0.101467967263)*x[1]+(-1.54241387349)*x[2]
-        arg[2,1,1]=(0.62210350231)*x[0]+(0.0435334873911)*x[1]+(-0.299303646623)*x[2]
-        arg[3,0,0]=(0.523811147108)*x[0]+(-1.09709839108)*x[1]+(1.83592280935)*x[2]
-        arg[3,0,1]=(0.957738143475)*x[0]+(0.282158440867)*x[1]+(0.621694180522)*x[2]
-        arg[3,1,0]=(0.366557891822)*x[0]+(0.812194047631)*x[1]+(-0.245067876349)*x[2]
-        arg[3,1,1]=(0.604859464982)*x[0]+(1.08415514854)*x[1]+(-1.470128848)*x[2]
-        arg[4,0,0]=(-0.13031502499)*x[0]+(-1.20707238733)*x[1]+(0.108382497552)*x[2]
-        arg[4,0,1]=(1.30453246317)*x[0]+(1.59696612588)*x[1]+(-0.234259043697)*x[2]
-        arg[4,1,0]=(-0.233494640836)*x[0]+(1.10701061816)*x[1]+(-0.409927013674)*x[2]
-        arg[4,1,1]=(0.102708240266)*x[0]+(-0.381598345002)*x[1]+(-1.39077748656)*x[2]
-        arg[5,0,0]=(1.06217404493)*x[0]+(1.1600791444)*x[1]+(-1.45242735389)*x[2]
-        arg[5,0,1]=(-0.423024189506)*x[0]+(-0.0868948651641)*x[1]+(0.0894539043522)*x[2]
-        arg[5,1,0]=(1.17650613067)*x[0]+(0.993832919965)*x[1]+(1.16546768569)*x[2]
-        arg[5,1,1]=(-0.61549132897)*x[0]+(-0.499619662734)*x[1]+(-0.643422281669)*x[2]
-        ref[0,0,0]=(0.731194732468)*x_ref[0]+(-0.0822115660022)*x_ref[1]+(-0.403175091289)*x_ref[2]
-        ref[0,0,1]=(0.39292230307)*x_ref[0]+(1.48598681615)*x_ref[1]+(1.05545374107)*x_ref[2]
-        ref[0,1,0]=(0.306844260706)*x_ref[0]+(0.836496026763)*x_ref[1]+(-0.121120983155)*x_ref[2]
-        ref[0,1,1]=(-0.155245802062)*x_ref[0]+(0.800232934864)*x_ref[1]+(0.373397160636)*x_ref[2]
-        ref[1,0,0]=(0.155941790359)*x_ref[0]+(0.826821969281)*x_ref[1]+(0.849596807425)*x_ref[2]
-        ref[1,0,1]=(-0.0988854656187)*x_ref[0]+(-0.855032499842)*x_ref[1]+(0.141988288566)*x_ref[2]
-        ref[1,1,0]=(-0.761032539296)*x_ref[0]+(-0.0892979073234)*x_ref[1]+(1.93034385132)*x_ref[2]
-        ref[1,1,1]=(-1.08303603558)*x_ref[0]+(-0.487250117659)*x_ref[1]+(0.0358501036173)*x_ref[2]
-        ref[2,0,0]=(0.148391465413)*x_ref[0]+(-0.731963025625)*x_ref[1]+(0.484236965689)*x_ref[2]
-        ref[2,0,1]=(1.06691217722)*x_ref[0]+(-0.638095266244)*x_ref[1]+(-0.971838410779)*x_ref[2]
-        ref[2,1,0]=(-0.377750829061)*x_ref[0]+(-0.101467967263)*x_ref[1]+(-1.54241387349)*x_ref[2]
-        ref[2,1,1]=(0.62210350231)*x_ref[0]+(0.0435334873911)*x_ref[1]+(-0.299303646623)*x_ref[2]
-        ref[3,0,0]=(0.523811147108)*x_ref[0]+(-1.09709839108)*x_ref[1]+(1.83592280935)*x_ref[2]
-        ref[3,0,1]=(0.957738143475)*x_ref[0]+(0.282158440867)*x_ref[1]+(0.621694180522)*x_ref[2]
-        ref[3,1,0]=(0.366557891822)*x_ref[0]+(0.812194047631)*x_ref[1]+(-0.245067876349)*x_ref[2]
-        ref[3,1,1]=(0.604859464982)*x_ref[0]+(1.08415514854)*x_ref[1]+(-1.470128848)*x_ref[2]
-        ref[4,0,0]=(-0.13031502499)*x_ref[0]+(-1.20707238733)*x_ref[1]+(0.108382497552)*x_ref[2]
-        ref[4,0,1]=(1.30453246317)*x_ref[0]+(1.59696612588)*x_ref[1]+(-0.234259043697)*x_ref[2]
-        ref[4,1,0]=(-0.233494640836)*x_ref[0]+(1.10701061816)*x_ref[1]+(-0.409927013674)*x_ref[2]
-        ref[4,1,1]=(0.102708240266)*x_ref[0]+(-0.381598345002)*x_ref[1]+(-1.39077748656)*x_ref[2]
-        ref[5,0,0]=(1.06217404493)*x_ref[0]+(1.1600791444)*x_ref[1]+(-1.45242735389)*x_ref[2]
-        ref[5,0,1]=(-0.423024189506)*x_ref[0]+(-0.0868948651641)*x_ref[1]+(0.0894539043522)*x_ref[2]
-        ref[5,1,0]=(1.17650613067)*x_ref[0]+(0.993832919965)*x_ref[1]+(1.16546768569)*x_ref[2]
-        ref[5,1,1]=(-0.61549132897)*x_ref[0]+(-0.499619662734)*x_ref[1]+(-0.643422281669)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.227969627252)*x[0]+(0.778177350248)*x[1]
-        arg[0,0,0,1]=(-0.684883711494)*x[0]+(-0.574285957132)*x[1]
-        arg[0,0,1,0]=(0.483090608974)*x[0]+(0.0779929087959)*x[1]
-        arg[0,0,1,1]=(-0.293150814932)*x[0]+(1.35368931993)*x[1]
-        arg[0,0,2,0]=(-0.190664734662)*x[0]+(0.910883386754)*x[1]
-        arg[0,0,2,1]=(-1.51255575457)*x[0]+(0.421560181501)*x[1]
-        arg[0,1,0,0]=(-0.833402828032)*x[0]+(-0.400466806781)*x[1]
-        arg[0,1,0,1]=(-0.212099323605)*x[0]+(-0.112478697221)*x[1]
-        arg[0,1,1,0]=(0.57687662926)*x[0]+(0.869758954551)*x[1]
-        arg[0,1,1,1]=(1.37261769917)*x[0]+(1.37855789907)*x[1]
-        arg[0,1,2,0]=(-1.02838589722)*x[0]+(-0.280409246204)*x[1]
-        arg[0,1,2,1]=(1.2333373468)*x[0]+(0.337631183798)*x[1]
-        arg[0,2,0,0]=(-0.249065448772)*x[0]+(0.834483646317)*x[1]
-        arg[0,2,0,1]=(-1.30860297683)*x[0]+(-0.653929967017)*x[1]
-        arg[0,2,1,0]=(-0.0155994484453)*x[0]+(-0.274023166937)*x[1]
-        arg[0,2,1,1]=(0.31458360335)*x[0]+(1.59507700673)*x[1]
-        arg[0,2,2,0]=(-0.11442619553)*x[0]+(1.6577028576)*x[1]
-        arg[0,2,2,1]=(0.274261132032)*x[0]+(1.15236962479)*x[1]
-        arg[0,3,0,0]=(1.91433860239)*x[0]+(-0.316349747811)*x[1]
-        arg[0,3,0,1]=(-1.42457591054)*x[0]+(-0.362812690805)*x[1]
-        arg[0,3,1,0]=(0.572734883096)*x[0]+(0.424724787283)*x[1]
-        arg[0,3,1,1]=(-0.118538376813)*x[0]+(0.25190312527)*x[1]
-        arg[0,3,2,0]=(-0.533409510081)*x[0]+(-0.804349107915)*x[1]
-        arg[0,3,2,1]=(-0.290555363666)*x[0]+(-0.912641477145)*x[1]
-        arg[0,4,0,0]=(-0.469612775918)*x[0]+(-0.0447411310793)*x[1]
-        arg[0,4,0,1]=(0.108538258831)*x[0]+(0.0453962016662)*x[1]
-        arg[0,4,1,0]=(-0.130785944028)*x[0]+(0.0887280914032)*x[1]
-        arg[0,4,1,1]=(0.166412309585)*x[0]+(-0.75130797706)*x[1]
-        arg[0,4,2,0]=(1.22538232455)*x[0]+(0.112925588343)*x[1]
-        arg[0,4,2,1]=(-1.02455171854)*x[0]+(-0.725754942749)*x[1]
-        arg[1,0,0,0]=(-0.869171086952)*x[0]+(-0.948876783682)*x[1]
-        arg[1,0,0,1]=(0.17730673689)*x[0]+(-0.00166180855579)*x[1]
-        arg[1,0,1,0]=(0.482072704433)*x[0]+(0.895847096783)*x[1]
-        arg[1,0,1,1]=(0.695736834617)*x[0]+(0.358082704558)*x[1]
-        arg[1,0,2,0]=(-0.501799636565)*x[0]+(0.363612558025)*x[1]
-        arg[1,0,2,1]=(-1.47204447226)*x[0]+(1.91281426121)*x[1]
-        arg[1,1,0,0]=(0.241893182978)*x[0]+(0.95199758669)*x[1]
-        arg[1,1,0,1]=(-0.68112361827)*x[0]+(-0.241935141301)*x[1]
-        arg[1,1,1,0]=(-0.553030972306)*x[0]+(0.0244503690439)*x[1]
-        arg[1,1,1,1]=(0.278177176896)*x[0]+(1.58693846427)*x[1]
-        arg[1,1,2,0]=(-0.87980015517)*x[0]+(0.315618837123)*x[1]
-        arg[1,1,2,1]=(-0.335783961379)*x[0]+(0.368650136138)*x[1]
-        arg[1,2,0,0]=(-0.903535146802)*x[0]+(1.68182923194)*x[1]
-        arg[1,2,0,1]=(1.06511511382)*x[0]+(-1.08524762302)*x[1]
-        arg[1,2,1,0]=(-0.0455274784681)*x[0]+(-0.519576710661)*x[1]
-        arg[1,2,1,1]=(0.735100217062)*x[0]+(-0.986268682671)*x[1]
-        arg[1,2,2,0]=(-0.544610797462)*x[0]+(0.447237114882)*x[1]
-        arg[1,2,2,1]=(0.385242031153)*x[0]+(-0.960538844247)*x[1]
-        arg[1,3,0,0]=(-0.354927072897)*x[0]+(0.842574324062)*x[1]
-        arg[1,3,0,1]=(0.319036427919)*x[0]+(-0.156282262536)*x[1]
-        arg[1,3,1,0]=(0.587123807717)*x[0]+(1.65277990726)*x[1]
-        arg[1,3,1,1]=(0.791697370298)*x[0]+(-1.5681680344)*x[1]
-        arg[1,3,2,0]=(-1.41931242045)*x[0]+(0.351285136557)*x[1]
-        arg[1,3,2,1]=(0.53175704402)*x[0]+(0.987523241324)*x[1]
-        arg[1,4,0,0]=(0.00533504818465)*x[0]+(-0.158886930817)*x[1]
-        arg[1,4,0,1]=(1.23725297303)*x[0]+(-0.302896452172)*x[1]
-        arg[1,4,1,0]=(0.433953146329)*x[0]+(-0.0721602234887)*x[1]
-        arg[1,4,1,1]=(-0.383499726865)*x[0]+(-0.253834671235)*x[1]
-        arg[1,4,2,0]=(-0.480776695247)*x[0]+(-0.302145524759)*x[1]
-        arg[1,4,2,1]=(1.14113180903)*x[0]+(-1.24304726003)*x[1]
-        arg[2,0,0,0]=(0.513776013893)*x[0]+(-0.16660259885)*x[1]
-        arg[2,0,0,1]=(1.55739209698)*x[0]+(0.0524084654531)*x[1]
-        arg[2,0,1,0]=(0.222567881446)*x[0]+(-0.357158470388)*x[1]
-        arg[2,0,1,1]=(0.0179816596229)*x[0]+(0.231534460784)*x[1]
-        arg[2,0,2,0]=(1.58460345297)*x[0]+(-0.383588433888)*x[1]
-        arg[2,0,2,1]=(-1.73386465536)*x[0]+(-0.743326657544)*x[1]
-        arg[2,1,0,0]=(-0.737976950246)*x[0]+(-1.01053396224)*x[1]
-        arg[2,1,0,1]=(0.926911190393)*x[0]+(0.620251783925)*x[1]
-        arg[2,1,1,0]=(-1.34289630129)*x[0]+(-0.429933681523)*x[1]
-        arg[2,1,1,1]=(1.79530806415)*x[0]+(-0.539783957021)*x[1]
-        arg[2,1,2,0]=(0.237950974938)*x[0]+(1.93783427703)*x[1]
-        arg[2,1,2,1]=(-0.439640741973)*x[0]+(-0.61543984673)*x[1]
-        arg[2,2,0,0]=(-1.66403612438)*x[0]+(1.00839566441)*x[1]
-        arg[2,2,0,1]=(0.249635983351)*x[0]+(-0.722261363675)*x[1]
-        arg[2,2,1,0]=(1.34179674459)*x[0]+(0.502542144188)*x[1]
-        arg[2,2,1,1]=(-0.815862586074)*x[0]+(-0.110688273707)*x[1]
-        arg[2,2,2,0]=(-0.686810719526)*x[0]+(0.500406563421)*x[1]
-        arg[2,2,2,1]=(0.681231089598)*x[0]+(0.605219505613)*x[1]
-        arg[2,3,0,0]=(-0.953299029956)*x[0]+(-0.223725858372)*x[1]
-        arg[2,3,0,1]=(0.831380756684)*x[0]+(-0.0379777076335)*x[1]
-        arg[2,3,1,0]=(-1.63804393157)*x[0]+(0.148235731301)*x[1]
-        arg[2,3,1,1]=(-0.17786458643)*x[0]+(-1.77342152699)*x[1]
-        arg[2,3,2,0]=(0.0210446244192)*x[0]+(1.59778781524)*x[1]
-        arg[2,3,2,1]=(0.877162721214)*x[0]+(0.262990448614)*x[1]
-        arg[2,4,0,0]=(-0.650265970331)*x[0]+(-1.07003604369)*x[1]
-        arg[2,4,0,1]=(1.12940101029)*x[0]+(0.860589290891)*x[1]
-        arg[2,4,1,0]=(0.520056210056)*x[0]+(-1.47691193979)*x[1]
-        arg[2,4,1,1]=(1.26823535235)*x[0]+(0.496811720647)*x[1]
-        arg[2,4,2,0]=(-1.388913443)*x[0]+(0.585343197943)*x[1]
-        arg[2,4,2,1]=(-0.762904547594)*x[0]+(0.503438815917)*x[1]
-        arg[3,0,0,0]=(0.382862686993)*x[0]+(-0.923525513303)*x[1]
-        arg[3,0,0,1]=(-0.54305794485)*x[0]+(0.467513531444)*x[1]
-        arg[3,0,1,0]=(1.24228759776)*x[0]+(-1.65740117421)*x[1]
-        arg[3,0,1,1]=(-0.463045362742)*x[0]+(0.186438587087)*x[1]
-        arg[3,0,2,0]=(0.296881980828)*x[0]+(-0.385878814949)*x[1]
-        arg[3,0,2,1]=(-0.299705899564)*x[0]+(0.490736038538)*x[1]
-        arg[3,1,0,0]=(-0.786851428658)*x[0]+(-0.760593794308)*x[1]
-        arg[3,1,0,1]=(0.506851336483)*x[0]+(0.995163951197)*x[1]
-        arg[3,1,1,0]=(-0.678883937341)*x[0]+(0.56996778248)*x[1]
-        arg[3,1,1,1]=(-0.401483642528)*x[0]+(0.0476797332537)*x[1]
-        arg[3,1,2,0]=(-0.585357955375)*x[0]+(0.330103647539)*x[1]
-        arg[3,1,2,1]=(-0.355539976825)*x[0]+(0.416287924349)*x[1]
-        arg[3,2,0,0]=(-0.662837130286)*x[0]+(-0.26640899674)*x[1]
-        arg[3,2,0,1]=(0.397553900588)*x[0]+(-1.21708620294)*x[1]
-        arg[3,2,1,0]=(0.464963326429)*x[0]+(-0.774515114142)*x[1]
-        arg[3,2,1,1]=(0.834351469791)*x[0]+(0.487629540715)*x[1]
-        arg[3,2,2,0]=(0.27622693716)*x[0]+(0.811338337719)*x[1]
-        arg[3,2,2,1]=(0.0384997772653)*x[0]+(1.03724996578)*x[1]
-        arg[3,3,0,0]=(-0.805491987874)*x[0]+(-0.476384547853)*x[1]
-        arg[3,3,0,1]=(0.615551780195)*x[0]+(-0.312805967691)*x[1]
-        arg[3,3,1,0]=(0.348666798955)*x[0]+(-1.31271156524)*x[1]
-        arg[3,3,1,1]=(-0.423569975374)*x[0]+(0.930713125389)*x[1]
-        arg[3,3,2,0]=(0.325632686234)*x[0]+(-0.166401033259)*x[1]
-        arg[3,3,2,1]=(0.126924861797)*x[0]+(-0.425380897969)*x[1]
-        arg[3,4,0,0]=(0.169532204538)*x[0]+(0.614632525765)*x[1]
-        arg[3,4,0,1]=(-0.938098696851)*x[0]+(0.648854147587)*x[1]
-        arg[3,4,1,0]=(-0.545143970434)*x[0]+(-1.59787515966)*x[1]
-        arg[3,4,1,1]=(-0.711190914978)*x[0]+(0.897331522911)*x[1]
-        arg[3,4,2,0]=(-0.386498124525)*x[0]+(0.299740420711)*x[1]
-        arg[3,4,2,1]=(0.617683032062)*x[0]+(-0.449587703061)*x[1]
-        ref[0,0,0,0]=(0.227969627252)*x_ref[0]+(0.778177350248)*x_ref[1]
-        ref[0,0,0,1]=(-0.684883711494)*x_ref[0]+(-0.574285957132)*x_ref[1]
-        ref[0,0,1,0]=(0.483090608974)*x_ref[0]+(0.0779929087959)*x_ref[1]
-        ref[0,0,1,1]=(-0.293150814932)*x_ref[0]+(1.35368931993)*x_ref[1]
-        ref[0,0,2,0]=(-0.190664734662)*x_ref[0]+(0.910883386754)*x_ref[1]
-        ref[0,0,2,1]=(-1.51255575457)*x_ref[0]+(0.421560181501)*x_ref[1]
-        ref[0,1,0,0]=(-0.833402828032)*x_ref[0]+(-0.400466806781)*x_ref[1]
-        ref[0,1,0,1]=(-0.212099323605)*x_ref[0]+(-0.112478697221)*x_ref[1]
-        ref[0,1,1,0]=(0.57687662926)*x_ref[0]+(0.869758954551)*x_ref[1]
-        ref[0,1,1,1]=(1.37261769917)*x_ref[0]+(1.37855789907)*x_ref[1]
-        ref[0,1,2,0]=(-1.02838589722)*x_ref[0]+(-0.280409246204)*x_ref[1]
-        ref[0,1,2,1]=(1.2333373468)*x_ref[0]+(0.337631183798)*x_ref[1]
-        ref[0,2,0,0]=(-0.249065448772)*x_ref[0]+(0.834483646317)*x_ref[1]
-        ref[0,2,0,1]=(-1.30860297683)*x_ref[0]+(-0.653929967017)*x_ref[1]
-        ref[0,2,1,0]=(-0.0155994484453)*x_ref[0]+(-0.274023166937)*x_ref[1]
-        ref[0,2,1,1]=(0.31458360335)*x_ref[0]+(1.59507700673)*x_ref[1]
-        ref[0,2,2,0]=(-0.11442619553)*x_ref[0]+(1.6577028576)*x_ref[1]
-        ref[0,2,2,1]=(0.274261132032)*x_ref[0]+(1.15236962479)*x_ref[1]
-        ref[0,3,0,0]=(1.91433860239)*x_ref[0]+(-0.316349747811)*x_ref[1]
-        ref[0,3,0,1]=(-1.42457591054)*x_ref[0]+(-0.362812690805)*x_ref[1]
-        ref[0,3,1,0]=(0.572734883096)*x_ref[0]+(0.424724787283)*x_ref[1]
-        ref[0,3,1,1]=(-0.118538376813)*x_ref[0]+(0.25190312527)*x_ref[1]
-        ref[0,3,2,0]=(-0.533409510081)*x_ref[0]+(-0.804349107915)*x_ref[1]
-        ref[0,3,2,1]=(-0.290555363666)*x_ref[0]+(-0.912641477145)*x_ref[1]
-        ref[0,4,0,0]=(-0.469612775918)*x_ref[0]+(-0.0447411310793)*x_ref[1]
-        ref[0,4,0,1]=(0.108538258831)*x_ref[0]+(0.0453962016662)*x_ref[1]
-        ref[0,4,1,0]=(-0.130785944028)*x_ref[0]+(0.0887280914032)*x_ref[1]
-        ref[0,4,1,1]=(0.166412309585)*x_ref[0]+(-0.75130797706)*x_ref[1]
-        ref[0,4,2,0]=(1.22538232455)*x_ref[0]+(0.112925588343)*x_ref[1]
-        ref[0,4,2,1]=(-1.02455171854)*x_ref[0]+(-0.725754942749)*x_ref[1]
-        ref[1,0,0,0]=(-0.869171086952)*x_ref[0]+(-0.948876783682)*x_ref[1]
-        ref[1,0,0,1]=(0.17730673689)*x_ref[0]+(-0.00166180855579)*x_ref[1]
-        ref[1,0,1,0]=(0.482072704433)*x_ref[0]+(0.895847096783)*x_ref[1]
-        ref[1,0,1,1]=(0.695736834617)*x_ref[0]+(0.358082704558)*x_ref[1]
-        ref[1,0,2,0]=(-0.501799636565)*x_ref[0]+(0.363612558025)*x_ref[1]
-        ref[1,0,2,1]=(-1.47204447226)*x_ref[0]+(1.91281426121)*x_ref[1]
-        ref[1,1,0,0]=(0.241893182978)*x_ref[0]+(0.95199758669)*x_ref[1]
-        ref[1,1,0,1]=(-0.68112361827)*x_ref[0]+(-0.241935141301)*x_ref[1]
-        ref[1,1,1,0]=(-0.553030972306)*x_ref[0]+(0.0244503690439)*x_ref[1]
-        ref[1,1,1,1]=(0.278177176896)*x_ref[0]+(1.58693846427)*x_ref[1]
-        ref[1,1,2,0]=(-0.87980015517)*x_ref[0]+(0.315618837123)*x_ref[1]
-        ref[1,1,2,1]=(-0.335783961379)*x_ref[0]+(0.368650136138)*x_ref[1]
-        ref[1,2,0,0]=(-0.903535146802)*x_ref[0]+(1.68182923194)*x_ref[1]
-        ref[1,2,0,1]=(1.06511511382)*x_ref[0]+(-1.08524762302)*x_ref[1]
-        ref[1,2,1,0]=(-0.0455274784681)*x_ref[0]+(-0.519576710661)*x_ref[1]
-        ref[1,2,1,1]=(0.735100217062)*x_ref[0]+(-0.986268682671)*x_ref[1]
-        ref[1,2,2,0]=(-0.544610797462)*x_ref[0]+(0.447237114882)*x_ref[1]
-        ref[1,2,2,1]=(0.385242031153)*x_ref[0]+(-0.960538844247)*x_ref[1]
-        ref[1,3,0,0]=(-0.354927072897)*x_ref[0]+(0.842574324062)*x_ref[1]
-        ref[1,3,0,1]=(0.319036427919)*x_ref[0]+(-0.156282262536)*x_ref[1]
-        ref[1,3,1,0]=(0.587123807717)*x_ref[0]+(1.65277990726)*x_ref[1]
-        ref[1,3,1,1]=(0.791697370298)*x_ref[0]+(-1.5681680344)*x_ref[1]
-        ref[1,3,2,0]=(-1.41931242045)*x_ref[0]+(0.351285136557)*x_ref[1]
-        ref[1,3,2,1]=(0.53175704402)*x_ref[0]+(0.987523241324)*x_ref[1]
-        ref[1,4,0,0]=(0.00533504818465)*x_ref[0]+(-0.158886930817)*x_ref[1]
-        ref[1,4,0,1]=(1.23725297303)*x_ref[0]+(-0.302896452172)*x_ref[1]
-        ref[1,4,1,0]=(0.433953146329)*x_ref[0]+(-0.0721602234887)*x_ref[1]
-        ref[1,4,1,1]=(-0.383499726865)*x_ref[0]+(-0.253834671235)*x_ref[1]
-        ref[1,4,2,0]=(-0.480776695247)*x_ref[0]+(-0.302145524759)*x_ref[1]
-        ref[1,4,2,1]=(1.14113180903)*x_ref[0]+(-1.24304726003)*x_ref[1]
-        ref[2,0,0,0]=(0.513776013893)*x_ref[0]+(-0.16660259885)*x_ref[1]
-        ref[2,0,0,1]=(1.55739209698)*x_ref[0]+(0.0524084654531)*x_ref[1]
-        ref[2,0,1,0]=(0.222567881446)*x_ref[0]+(-0.357158470388)*x_ref[1]
-        ref[2,0,1,1]=(0.0179816596229)*x_ref[0]+(0.231534460784)*x_ref[1]
-        ref[2,0,2,0]=(1.58460345297)*x_ref[0]+(-0.383588433888)*x_ref[1]
-        ref[2,0,2,1]=(-1.73386465536)*x_ref[0]+(-0.743326657544)*x_ref[1]
-        ref[2,1,0,0]=(-0.737976950246)*x_ref[0]+(-1.01053396224)*x_ref[1]
-        ref[2,1,0,1]=(0.926911190393)*x_ref[0]+(0.620251783925)*x_ref[1]
-        ref[2,1,1,0]=(-1.34289630129)*x_ref[0]+(-0.429933681523)*x_ref[1]
-        ref[2,1,1,1]=(1.79530806415)*x_ref[0]+(-0.539783957021)*x_ref[1]
-        ref[2,1,2,0]=(0.237950974938)*x_ref[0]+(1.93783427703)*x_ref[1]
-        ref[2,1,2,1]=(-0.439640741973)*x_ref[0]+(-0.61543984673)*x_ref[1]
-        ref[2,2,0,0]=(-1.66403612438)*x_ref[0]+(1.00839566441)*x_ref[1]
-        ref[2,2,0,1]=(0.249635983351)*x_ref[0]+(-0.722261363675)*x_ref[1]
-        ref[2,2,1,0]=(1.34179674459)*x_ref[0]+(0.502542144188)*x_ref[1]
-        ref[2,2,1,1]=(-0.815862586074)*x_ref[0]+(-0.110688273707)*x_ref[1]
-        ref[2,2,2,0]=(-0.686810719526)*x_ref[0]+(0.500406563421)*x_ref[1]
-        ref[2,2,2,1]=(0.681231089598)*x_ref[0]+(0.605219505613)*x_ref[1]
-        ref[2,3,0,0]=(-0.953299029956)*x_ref[0]+(-0.223725858372)*x_ref[1]
-        ref[2,3,0,1]=(0.831380756684)*x_ref[0]+(-0.0379777076335)*x_ref[1]
-        ref[2,3,1,0]=(-1.63804393157)*x_ref[0]+(0.148235731301)*x_ref[1]
-        ref[2,3,1,1]=(-0.17786458643)*x_ref[0]+(-1.77342152699)*x_ref[1]
-        ref[2,3,2,0]=(0.0210446244192)*x_ref[0]+(1.59778781524)*x_ref[1]
-        ref[2,3,2,1]=(0.877162721214)*x_ref[0]+(0.262990448614)*x_ref[1]
-        ref[2,4,0,0]=(-0.650265970331)*x_ref[0]+(-1.07003604369)*x_ref[1]
-        ref[2,4,0,1]=(1.12940101029)*x_ref[0]+(0.860589290891)*x_ref[1]
-        ref[2,4,1,0]=(0.520056210056)*x_ref[0]+(-1.47691193979)*x_ref[1]
-        ref[2,4,1,1]=(1.26823535235)*x_ref[0]+(0.496811720647)*x_ref[1]
-        ref[2,4,2,0]=(-1.388913443)*x_ref[0]+(0.585343197943)*x_ref[1]
-        ref[2,4,2,1]=(-0.762904547594)*x_ref[0]+(0.503438815917)*x_ref[1]
-        ref[3,0,0,0]=(0.382862686993)*x_ref[0]+(-0.923525513303)*x_ref[1]
-        ref[3,0,0,1]=(-0.54305794485)*x_ref[0]+(0.467513531444)*x_ref[1]
-        ref[3,0,1,0]=(1.24228759776)*x_ref[0]+(-1.65740117421)*x_ref[1]
-        ref[3,0,1,1]=(-0.463045362742)*x_ref[0]+(0.186438587087)*x_ref[1]
-        ref[3,0,2,0]=(0.296881980828)*x_ref[0]+(-0.385878814949)*x_ref[1]
-        ref[3,0,2,1]=(-0.299705899564)*x_ref[0]+(0.490736038538)*x_ref[1]
-        ref[3,1,0,0]=(-0.786851428658)*x_ref[0]+(-0.760593794308)*x_ref[1]
-        ref[3,1,0,1]=(0.506851336483)*x_ref[0]+(0.995163951197)*x_ref[1]
-        ref[3,1,1,0]=(-0.678883937341)*x_ref[0]+(0.56996778248)*x_ref[1]
-        ref[3,1,1,1]=(-0.401483642528)*x_ref[0]+(0.0476797332537)*x_ref[1]
-        ref[3,1,2,0]=(-0.585357955375)*x_ref[0]+(0.330103647539)*x_ref[1]
-        ref[3,1,2,1]=(-0.355539976825)*x_ref[0]+(0.416287924349)*x_ref[1]
-        ref[3,2,0,0]=(-0.662837130286)*x_ref[0]+(-0.26640899674)*x_ref[1]
-        ref[3,2,0,1]=(0.397553900588)*x_ref[0]+(-1.21708620294)*x_ref[1]
-        ref[3,2,1,0]=(0.464963326429)*x_ref[0]+(-0.774515114142)*x_ref[1]
-        ref[3,2,1,1]=(0.834351469791)*x_ref[0]+(0.487629540715)*x_ref[1]
-        ref[3,2,2,0]=(0.27622693716)*x_ref[0]+(0.811338337719)*x_ref[1]
-        ref[3,2,2,1]=(0.0384997772653)*x_ref[0]+(1.03724996578)*x_ref[1]
-        ref[3,3,0,0]=(-0.805491987874)*x_ref[0]+(-0.476384547853)*x_ref[1]
-        ref[3,3,0,1]=(0.615551780195)*x_ref[0]+(-0.312805967691)*x_ref[1]
-        ref[3,3,1,0]=(0.348666798955)*x_ref[0]+(-1.31271156524)*x_ref[1]
-        ref[3,3,1,1]=(-0.423569975374)*x_ref[0]+(0.930713125389)*x_ref[1]
-        ref[3,3,2,0]=(0.325632686234)*x_ref[0]+(-0.166401033259)*x_ref[1]
-        ref[3,3,2,1]=(0.126924861797)*x_ref[0]+(-0.425380897969)*x_ref[1]
-        ref[3,4,0,0]=(0.169532204538)*x_ref[0]+(0.614632525765)*x_ref[1]
-        ref[3,4,0,1]=(-0.938098696851)*x_ref[0]+(0.648854147587)*x_ref[1]
-        ref[3,4,1,0]=(-0.545143970434)*x_ref[0]+(-1.59787515966)*x_ref[1]
-        ref[3,4,1,1]=(-0.711190914978)*x_ref[0]+(0.897331522911)*x_ref[1]
-        ref[3,4,2,0]=(-0.386498124525)*x_ref[0]+(0.299740420711)*x_ref[1]
-        ref[3,4,2,1]=(0.617683032062)*x_ref[0]+(-0.449587703061)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.791620170192)*x[0]+(1.03871460301)*x[1]+(-0.225035657687)*x[2]
-        arg[0,0,0,1]=(-0.464422319203)*x[0]+(0.769454931053)*x[1]+(-0.783260637771)*x[2]
-        arg[0,0,1,0]=(0.72655538215)*x[0]+(-1.65736312015)*x[1]+(1.08402505927)*x[2]
-        arg[0,0,1,1]=(-0.207576709573)*x[0]+(-0.55250594761)*x[1]+(-0.923702938288)*x[2]
-        arg[0,0,2,0]=(-0.701991085516)*x[0]+(-1.76863643107)*x[1]+(0.831382933104)*x[2]
-        arg[0,0,2,1]=(0.0640035527319)*x[0]+(0.425446342976)*x[1]+(1.64626766696)*x[2]
-        arg[0,1,0,0]=(1.01022963801)*x[0]+(-0.0215015059716)*x[1]+(0.849862425592)*x[2]
-        arg[0,1,0,1]=(-0.45776932943)*x[0]+(0.7621342151)*x[1]+(-1.40123018391)*x[2]
-        arg[0,1,1,0]=(0.737485054127)*x[0]+(-0.147513905858)*x[1]+(-0.616928595213)*x[2]
-        arg[0,1,1,1]=(-0.0608005391894)*x[0]+(-0.154978210573)*x[1]+(-1.40322011577)*x[2]
-        arg[0,1,2,0]=(1.59908177714)*x[0]+(-0.378738573932)*x[1]+(1.45285315247)*x[2]
-        arg[0,1,2,1]=(-0.622552157046)*x[0]+(1.19996417516)*x[1]+(0.728842900843)*x[2]
-        arg[0,2,0,0]=(-0.46942034691)*x[0]+(0.333309721372)*x[1]+(-0.280846553832)*x[2]
-        arg[0,2,0,1]=(1.22208788109)*x[0]+(0.369339594285)*x[1]+(1.31078425589)*x[2]
-        arg[0,2,1,0]=(0.0794165004114)*x[0]+(0.44665451846)*x[1]+(-0.814625708916)*x[2]
-        arg[0,2,1,1]=(0.594200807165)*x[0]+(-0.00616720333193)*x[1]+(0.382706175172)*x[2]
-        arg[0,2,2,0]=(0.0372230170459)*x[0]+(0.440339923291)*x[1]+(0.137641070028)*x[2]
-        arg[0,2,2,1]=(-1.29863078274)*x[0]+(0.283142455171)*x[1]+(0.0844540074659)*x[2]
-        arg[0,3,0,0]=(1.72811808036)*x[0]+(0.536456781522)*x[1]+(0.0266737704706)*x[2]
-        arg[0,3,0,1]=(0.148219555101)*x[0]+(-0.6887500275)*x[1]+(-0.405613136632)*x[2]
-        arg[0,3,1,0]=(0.708262537279)*x[0]+(1.16319635773)*x[1]+(-0.030808721674)*x[2]
-        arg[0,3,1,1]=(0.80834615863)*x[0]+(-0.176789000925)*x[1]+(-1.72576120963)*x[2]
-        arg[0,3,2,0]=(0.21128315299)*x[0]+(0.770037046126)*x[1]+(0.988028934422)*x[2]
-        arg[0,3,2,1]=(1.10522136317)*x[0]+(1.6319351743)*x[1]+(-0.784693713387)*x[2]
-        arg[0,4,0,0]=(0.121088121064)*x[0]+(-1.79718067791)*x[1]+(-0.907857173318)*x[2]
-        arg[0,4,0,1]=(-0.695887294217)*x[0]+(-1.24166787807)*x[1]+(-1.24968023856)*x[2]
-        arg[0,4,1,0]=(-0.202510797291)*x[0]+(0.628310156105)*x[1]+(0.605146447822)*x[2]
-        arg[0,4,1,1]=(0.149227458424)*x[0]+(-1.5650392775)*x[1]+(-0.763944892663)*x[2]
-        arg[0,4,2,0]=(-0.393218625872)*x[0]+(0.479145914948)*x[1]+(-0.313960447492)*x[2]
-        arg[0,4,2,1]=(-0.0191807443799)*x[0]+(0.592992659119)*x[1]+(-0.475633115484)*x[2]
-        arg[1,0,0,0]=(-0.964829354261)*x[0]+(0.453014802906)*x[1]+(-0.779502566938)*x[2]
-        arg[1,0,0,1]=(0.0151205739508)*x[0]+(-0.153706429594)*x[1]+(0.00866460475724)*x[2]
-        arg[1,0,1,0]=(0.92592276366)*x[0]+(0.530787400525)*x[1]+(-0.0577912606876)*x[2]
-        arg[1,0,1,1]=(0.948404467077)*x[0]+(-0.265905470751)*x[1]+(0.472349192005)*x[2]
-        arg[1,0,2,0]=(0.0176615383702)*x[0]+(0.679605821761)*x[1]+(-0.0333590911941)*x[2]
-        arg[1,0,2,1]=(-1.15594952629)*x[0]+(0.264868376508)*x[1]+(-0.883690535499)*x[2]
-        arg[1,1,0,0]=(-0.738712703994)*x[0]+(0.545839232808)*x[1]+(0.592474501134)*x[2]
-        arg[1,1,0,1]=(-1.3468960453)*x[0]+(-0.00848202443614)*x[1]+(-0.0124138286126)*x[2]
-        arg[1,1,1,0]=(0.900228409707)*x[0]+(-1.86848082357)*x[1]+(0.421539431142)*x[2]
-        arg[1,1,1,1]=(1.42754013963)*x[0]+(-0.861376440449)*x[1]+(0.0965520362291)*x[2]
-        arg[1,1,2,0]=(-0.35873674515)*x[0]+(0.0862592617941)*x[1]+(-0.536106207025)*x[2]
-        arg[1,1,2,1]=(0.90712910097)*x[0]+(0.974545253055)*x[1]+(0.570708510858)*x[2]
-        arg[1,2,0,0]=(1.19310775669)*x[0]+(0.309414331679)*x[1]+(-0.271298061586)*x[2]
-        arg[1,2,0,1]=(0.551778129545)*x[0]+(0.539028430134)*x[1]+(0.239406239262)*x[2]
-        arg[1,2,1,0]=(-0.810625054344)*x[0]+(-0.241072190233)*x[1]+(-1.58590369097)*x[2]
-        arg[1,2,1,1]=(0.529669075734)*x[0]+(-0.890365024163)*x[1]+(-1.69798509084)*x[2]
-        arg[1,2,2,0]=(0.0437087707448)*x[0]+(0.88372190198)*x[1]+(1.86547747806)*x[2]
-        arg[1,2,2,1]=(1.30739438898)*x[0]+(0.315850112101)*x[1]+(-0.262001133683)*x[2]
-        arg[1,3,0,0]=(-0.143426236837)*x[0]+(-1.1703384826)*x[1]+(0.50608348646)*x[2]
-        arg[1,3,0,1]=(-0.0444408776922)*x[0]+(1.26952782036)*x[1]+(1.67192602934)*x[2]
-        arg[1,3,1,0]=(0.672742824368)*x[0]+(-0.785246676537)*x[1]+(0.716130664056)*x[2]
-        arg[1,3,1,1]=(-0.295182508335)*x[0]+(-1.53658860897)*x[1]+(-1.87133995422)*x[2]
-        arg[1,3,2,0]=(-0.440859530081)*x[0]+(0.0730120015821)*x[1]+(-1.02465537353)*x[2]
-        arg[1,3,2,1]=(0.838320612003)*x[0]+(1.81233688454)*x[1]+(-1.0633876685)*x[2]
-        arg[1,4,0,0]=(0.52440453051)*x[0]+(-0.0182588999022)*x[1]+(1.05556310351)*x[2]
-        arg[1,4,0,1]=(0.766612727495)*x[0]+(1.58987590746)*x[1]+(-0.703801484569)*x[2]
-        arg[1,4,1,0]=(0.373439757535)*x[0]+(-0.0676963704305)*x[1]+(0.0948034094293)*x[2]
-        arg[1,4,1,1]=(-0.542283543375)*x[0]+(-0.454408605761)*x[1]+(-0.398904635316)*x[2]
-        arg[1,4,2,0]=(1.3374871143)*x[0]+(0.0067849394587)*x[1]+(-0.319452094882)*x[2]
-        arg[1,4,2,1]=(0.38530755393)*x[0]+(1.05356462429)*x[1]+(-0.302179447719)*x[2]
-        arg[2,0,0,0]=(-0.123109761583)*x[0]+(0.69223848143)*x[1]+(-1.36903487092)*x[2]
-        arg[2,0,0,1]=(0.121957328459)*x[0]+(0.102229685387)*x[1]+(0.962499974737)*x[2]
-        arg[2,0,1,0]=(0.478614188653)*x[0]+(-1.23058817023)*x[1]+(1.30950997478)*x[2]
-        arg[2,0,1,1]=(-0.529033562461)*x[0]+(0.563030509591)*x[1]+(-0.564939226654)*x[2]
-        arg[2,0,2,0]=(-0.377740282406)*x[0]+(1.20532110343)*x[1]+(1.55615174947)*x[2]
-        arg[2,0,2,1]=(0.539119710703)*x[0]+(1.91771865857)*x[1]+(0.0809882488048)*x[2]
-        arg[2,1,0,0]=(0.00548664737796)*x[0]+(-0.157716099068)*x[1]+(-1.40009044235)*x[2]
-        arg[2,1,0,1]=(0.0667557890666)*x[0]+(0.742484448131)*x[1]+(-0.325246111346)*x[2]
-        arg[2,1,1,0]=(-0.214965474071)*x[0]+(-0.215055151964)*x[1]+(1.15673960537)*x[2]
-        arg[2,1,1,1]=(0.605764831789)*x[0]+(-1.0432964832)*x[1]+(0.645482523161)*x[2]
-        arg[2,1,2,0]=(-1.13098364088)*x[0]+(-0.932044089041)*x[1]+(-0.308053828241)*x[2]
-        arg[2,1,2,1]=(0.481961305459)*x[0]+(-0.101277472029)*x[1]+(-0.17520207974)*x[2]
-        arg[2,2,0,0]=(0.579831852303)*x[0]+(0.538731990254)*x[1]+(-0.0897460374205)*x[2]
-        arg[2,2,0,1]=(-1.8763181434)*x[0]+(-0.132710928569)*x[1]+(1.03169751651)*x[2]
-        arg[2,2,1,0]=(0.56871511431)*x[0]+(0.075333481656)*x[1]+(1.10238818953)*x[2]
-        arg[2,2,1,1]=(1.49347755246)*x[0]+(-1.00500941047)*x[1]+(-0.181733196359)*x[2]
-        arg[2,2,2,0]=(0.532881509971)*x[0]+(-0.364333964659)*x[1]+(1.09633720883)*x[2]
-        arg[2,2,2,1]=(-0.518419048615)*x[0]+(-0.48091100593)*x[1]+(0.724628840153)*x[2]
-        arg[2,3,0,0]=(0.353475859331)*x[0]+(-0.0239879269825)*x[1]+(1.32068893718)*x[2]
-        arg[2,3,0,1]=(0.553999122102)*x[0]+(-0.128530869239)*x[1]+(0.134663336287)*x[2]
-        arg[2,3,1,0]=(-1.59775882569)*x[0]+(-1.07335424785)*x[1]+(1.39223587988)*x[2]
-        arg[2,3,1,1]=(-0.921252080095)*x[0]+(1.46226299067)*x[1]+(-1.13412499932)*x[2]
-        arg[2,3,2,0]=(0.417572910178)*x[0]+(0.0814889599489)*x[1]+(0.292159249719)*x[2]
-        arg[2,3,2,1]=(1.44620228921)*x[0]+(0.767854577367)*x[1]+(-0.0113709806383)*x[2]
-        arg[2,4,0,0]=(-0.156987001681)*x[0]+(-0.922524257833)*x[1]+(0.521128360838)*x[2]
-        arg[2,4,0,1]=(0.154198133354)*x[0]+(0.462020370175)*x[1]+(0.966768653665)*x[2]
-        arg[2,4,1,0]=(0.507836849242)*x[0]+(1.16701911244)*x[1]+(0.264543038211)*x[2]
-        arg[2,4,1,1]=(0.452059436879)*x[0]+(0.409662432778)*x[1]+(-0.403800872595)*x[2]
-        arg[2,4,2,0]=(0.521175521008)*x[0]+(-0.362551578816)*x[1]+(0.0922727331623)*x[2]
-        arg[2,4,2,1]=(-1.0990361823)*x[0]+(1.73655146851)*x[1]+(-0.867917402922)*x[2]
-        arg[3,0,0,0]=(-0.0527010882236)*x[0]+(-1.11528215488)*x[1]+(1.3141906393)*x[2]
-        arg[3,0,0,1]=(0.151284271917)*x[0]+(-0.0159077450668)*x[1]+(1.1798338931)*x[2]
-        arg[3,0,1,0]=(-1.7648963435)*x[0]+(0.229511437402)*x[1]+(0.924415900312)*x[2]
-        arg[3,0,1,1]=(-0.498271821094)*x[0]+(1.58363063019)*x[1]+(1.64871750388)*x[2]
-        arg[3,0,2,0]=(-1.11245170725)*x[0]+(1.27662612569)*x[1]+(0.145950372369)*x[2]
-        arg[3,0,2,1]=(-0.691643924238)*x[0]+(-0.178211874279)*x[1]+(-0.341071050366)*x[2]
-        arg[3,1,0,0]=(-0.929804889461)*x[0]+(0.199087067309)*x[1]+(1.00150168883)*x[2]
-        arg[3,1,0,1]=(-1.25152265093)*x[0]+(0.517076294911)*x[1]+(0.103798312362)*x[2]
-        arg[3,1,1,0]=(0.797316290623)*x[0]+(0.0239285379293)*x[1]+(-0.836519299418)*x[2]
-        arg[3,1,1,1]=(-0.470084592176)*x[0]+(0.844364701728)*x[1]+(-0.027373275093)*x[2]
-        arg[3,1,2,0]=(1.0340279373)*x[0]+(-0.0133951276315)*x[1]+(1.17710546194)*x[2]
-        arg[3,1,2,1]=(0.0325929541496)*x[0]+(1.13784867184)*x[1]+(-0.0529194266769)*x[2]
-        arg[3,2,0,0]=(1.92837561772)*x[0]+(-1.63633468831)*x[1]+(1.4212324281)*x[2]
-        arg[3,2,0,1]=(1.09556054408)*x[0]+(1.43286059545)*x[1]+(1.20005604593)*x[2]
-        arg[3,2,1,0]=(0.308887169169)*x[0]+(-0.149214224208)*x[1]+(-1.13559614877)*x[2]
-        arg[3,2,1,1]=(-0.0648352909004)*x[0]+(-0.5645470596)*x[1]+(-0.525131730514)*x[2]
-        arg[3,2,2,0]=(0.21826829974)*x[0]+(1.5950239996)*x[1]+(0.333592425438)*x[2]
-        arg[3,2,2,1]=(-1.25613956172)*x[0]+(-0.242338679844)*x[1]+(-0.958875577074)*x[2]
-        arg[3,3,0,0]=(1.65005362159)*x[0]+(-1.16713867165)*x[1]+(-0.282495293685)*x[2]
-        arg[3,3,0,1]=(1.04854406427)*x[0]+(0.876270949531)*x[1]+(0.291036304743)*x[2]
-        arg[3,3,1,0]=(-1.66619451175)*x[0]+(0.656275192484)*x[1]+(-1.27104499942)*x[2]
-        arg[3,3,1,1]=(1.55407146907)*x[0]+(-0.322950943159)*x[1]+(-0.287565403896)*x[2]
-        arg[3,3,2,0]=(-1.54760268583)*x[0]+(-1.45847761887)*x[1]+(1.13939567009)*x[2]
-        arg[3,3,2,1]=(1.24632351699)*x[0]+(0.0265500081594)*x[1]+(1.61925095159)*x[2]
-        arg[3,4,0,0]=(-0.0430889433549)*x[0]+(-1.46995559463)*x[1]+(-1.14915159823)*x[2]
-        arg[3,4,0,1]=(0.0392641403409)*x[0]+(0.0603053049639)*x[1]+(0.647321169934)*x[2]
-        arg[3,4,1,0]=(-0.156300985227)*x[0]+(0.79369911928)*x[1]+(-0.413124762507)*x[2]
-        arg[3,4,1,1]=(0.258402059015)*x[0]+(0.00227307988585)*x[1]+(0.70067141295)*x[2]
-        arg[3,4,2,0]=(-1.15131298872)*x[0]+(-0.627449043157)*x[1]+(-0.402268345861)*x[2]
-        arg[3,4,2,1]=(0.455934238179)*x[0]+(-0.951120759108)*x[1]+(-0.280459367131)*x[2]
-        ref[0,0,0,0]=(-0.791620170192)*x_ref[0]+(1.03871460301)*x_ref[1]+(-0.225035657687)*x_ref[2]
-        ref[0,0,0,1]=(-0.464422319203)*x_ref[0]+(0.769454931053)*x_ref[1]+(-0.783260637771)*x_ref[2]
-        ref[0,0,1,0]=(0.72655538215)*x_ref[0]+(-1.65736312015)*x_ref[1]+(1.08402505927)*x_ref[2]
-        ref[0,0,1,1]=(-0.207576709573)*x_ref[0]+(-0.55250594761)*x_ref[1]+(-0.923702938288)*x_ref[2]
-        ref[0,0,2,0]=(-0.701991085516)*x_ref[0]+(-1.76863643107)*x_ref[1]+(0.831382933104)*x_ref[2]
-        ref[0,0,2,1]=(0.0640035527319)*x_ref[0]+(0.425446342976)*x_ref[1]+(1.64626766696)*x_ref[2]
-        ref[0,1,0,0]=(1.01022963801)*x_ref[0]+(-0.0215015059716)*x_ref[1]+(0.849862425592)*x_ref[2]
-        ref[0,1,0,1]=(-0.45776932943)*x_ref[0]+(0.7621342151)*x_ref[1]+(-1.40123018391)*x_ref[2]
-        ref[0,1,1,0]=(0.737485054127)*x_ref[0]+(-0.147513905858)*x_ref[1]+(-0.616928595213)*x_ref[2]
-        ref[0,1,1,1]=(-0.0608005391894)*x_ref[0]+(-0.154978210573)*x_ref[1]+(-1.40322011577)*x_ref[2]
-        ref[0,1,2,0]=(1.59908177714)*x_ref[0]+(-0.378738573932)*x_ref[1]+(1.45285315247)*x_ref[2]
-        ref[0,1,2,1]=(-0.622552157046)*x_ref[0]+(1.19996417516)*x_ref[1]+(0.728842900843)*x_ref[2]
-        ref[0,2,0,0]=(-0.46942034691)*x_ref[0]+(0.333309721372)*x_ref[1]+(-0.280846553832)*x_ref[2]
-        ref[0,2,0,1]=(1.22208788109)*x_ref[0]+(0.369339594285)*x_ref[1]+(1.31078425589)*x_ref[2]
-        ref[0,2,1,0]=(0.0794165004114)*x_ref[0]+(0.44665451846)*x_ref[1]+(-0.814625708916)*x_ref[2]
-        ref[0,2,1,1]=(0.594200807165)*x_ref[0]+(-0.00616720333193)*x_ref[1]+(0.382706175172)*x_ref[2]
-        ref[0,2,2,0]=(0.0372230170459)*x_ref[0]+(0.440339923291)*x_ref[1]+(0.137641070028)*x_ref[2]
-        ref[0,2,2,1]=(-1.29863078274)*x_ref[0]+(0.283142455171)*x_ref[1]+(0.0844540074659)*x_ref[2]
-        ref[0,3,0,0]=(1.72811808036)*x_ref[0]+(0.536456781522)*x_ref[1]+(0.0266737704706)*x_ref[2]
-        ref[0,3,0,1]=(0.148219555101)*x_ref[0]+(-0.6887500275)*x_ref[1]+(-0.405613136632)*x_ref[2]
-        ref[0,3,1,0]=(0.708262537279)*x_ref[0]+(1.16319635773)*x_ref[1]+(-0.030808721674)*x_ref[2]
-        ref[0,3,1,1]=(0.80834615863)*x_ref[0]+(-0.176789000925)*x_ref[1]+(-1.72576120963)*x_ref[2]
-        ref[0,3,2,0]=(0.21128315299)*x_ref[0]+(0.770037046126)*x_ref[1]+(0.988028934422)*x_ref[2]
-        ref[0,3,2,1]=(1.10522136317)*x_ref[0]+(1.6319351743)*x_ref[1]+(-0.784693713387)*x_ref[2]
-        ref[0,4,0,0]=(0.121088121064)*x_ref[0]+(-1.79718067791)*x_ref[1]+(-0.907857173318)*x_ref[2]
-        ref[0,4,0,1]=(-0.695887294217)*x_ref[0]+(-1.24166787807)*x_ref[1]+(-1.24968023856)*x_ref[2]
-        ref[0,4,1,0]=(-0.202510797291)*x_ref[0]+(0.628310156105)*x_ref[1]+(0.605146447822)*x_ref[2]
-        ref[0,4,1,1]=(0.149227458424)*x_ref[0]+(-1.5650392775)*x_ref[1]+(-0.763944892663)*x_ref[2]
-        ref[0,4,2,0]=(-0.393218625872)*x_ref[0]+(0.479145914948)*x_ref[1]+(-0.313960447492)*x_ref[2]
-        ref[0,4,2,1]=(-0.0191807443799)*x_ref[0]+(0.592992659119)*x_ref[1]+(-0.475633115484)*x_ref[2]
-        ref[1,0,0,0]=(-0.964829354261)*x_ref[0]+(0.453014802906)*x_ref[1]+(-0.779502566938)*x_ref[2]
-        ref[1,0,0,1]=(0.0151205739508)*x_ref[0]+(-0.153706429594)*x_ref[1]+(0.00866460475724)*x_ref[2]
-        ref[1,0,1,0]=(0.92592276366)*x_ref[0]+(0.530787400525)*x_ref[1]+(-0.0577912606876)*x_ref[2]
-        ref[1,0,1,1]=(0.948404467077)*x_ref[0]+(-0.265905470751)*x_ref[1]+(0.472349192005)*x_ref[2]
-        ref[1,0,2,0]=(0.0176615383702)*x_ref[0]+(0.679605821761)*x_ref[1]+(-0.0333590911941)*x_ref[2]
-        ref[1,0,2,1]=(-1.15594952629)*x_ref[0]+(0.264868376508)*x_ref[1]+(-0.883690535499)*x_ref[2]
-        ref[1,1,0,0]=(-0.738712703994)*x_ref[0]+(0.545839232808)*x_ref[1]+(0.592474501134)*x_ref[2]
-        ref[1,1,0,1]=(-1.3468960453)*x_ref[0]+(-0.00848202443614)*x_ref[1]+(-0.0124138286126)*x_ref[2]
-        ref[1,1,1,0]=(0.900228409707)*x_ref[0]+(-1.86848082357)*x_ref[1]+(0.421539431142)*x_ref[2]
-        ref[1,1,1,1]=(1.42754013963)*x_ref[0]+(-0.861376440449)*x_ref[1]+(0.0965520362291)*x_ref[2]
-        ref[1,1,2,0]=(-0.35873674515)*x_ref[0]+(0.0862592617941)*x_ref[1]+(-0.536106207025)*x_ref[2]
-        ref[1,1,2,1]=(0.90712910097)*x_ref[0]+(0.974545253055)*x_ref[1]+(0.570708510858)*x_ref[2]
-        ref[1,2,0,0]=(1.19310775669)*x_ref[0]+(0.309414331679)*x_ref[1]+(-0.271298061586)*x_ref[2]
-        ref[1,2,0,1]=(0.551778129545)*x_ref[0]+(0.539028430134)*x_ref[1]+(0.239406239262)*x_ref[2]
-        ref[1,2,1,0]=(-0.810625054344)*x_ref[0]+(-0.241072190233)*x_ref[1]+(-1.58590369097)*x_ref[2]
-        ref[1,2,1,1]=(0.529669075734)*x_ref[0]+(-0.890365024163)*x_ref[1]+(-1.69798509084)*x_ref[2]
-        ref[1,2,2,0]=(0.0437087707448)*x_ref[0]+(0.88372190198)*x_ref[1]+(1.86547747806)*x_ref[2]
-        ref[1,2,2,1]=(1.30739438898)*x_ref[0]+(0.315850112101)*x_ref[1]+(-0.262001133683)*x_ref[2]
-        ref[1,3,0,0]=(-0.143426236837)*x_ref[0]+(-1.1703384826)*x_ref[1]+(0.50608348646)*x_ref[2]
-        ref[1,3,0,1]=(-0.0444408776922)*x_ref[0]+(1.26952782036)*x_ref[1]+(1.67192602934)*x_ref[2]
-        ref[1,3,1,0]=(0.672742824368)*x_ref[0]+(-0.785246676537)*x_ref[1]+(0.716130664056)*x_ref[2]
-        ref[1,3,1,1]=(-0.295182508335)*x_ref[0]+(-1.53658860897)*x_ref[1]+(-1.87133995422)*x_ref[2]
-        ref[1,3,2,0]=(-0.440859530081)*x_ref[0]+(0.0730120015821)*x_ref[1]+(-1.02465537353)*x_ref[2]
-        ref[1,3,2,1]=(0.838320612003)*x_ref[0]+(1.81233688454)*x_ref[1]+(-1.0633876685)*x_ref[2]
-        ref[1,4,0,0]=(0.52440453051)*x_ref[0]+(-0.0182588999022)*x_ref[1]+(1.05556310351)*x_ref[2]
-        ref[1,4,0,1]=(0.766612727495)*x_ref[0]+(1.58987590746)*x_ref[1]+(-0.703801484569)*x_ref[2]
-        ref[1,4,1,0]=(0.373439757535)*x_ref[0]+(-0.0676963704305)*x_ref[1]+(0.0948034094293)*x_ref[2]
-        ref[1,4,1,1]=(-0.542283543375)*x_ref[0]+(-0.454408605761)*x_ref[1]+(-0.398904635316)*x_ref[2]
-        ref[1,4,2,0]=(1.3374871143)*x_ref[0]+(0.0067849394587)*x_ref[1]+(-0.319452094882)*x_ref[2]
-        ref[1,4,2,1]=(0.38530755393)*x_ref[0]+(1.05356462429)*x_ref[1]+(-0.302179447719)*x_ref[2]
-        ref[2,0,0,0]=(-0.123109761583)*x_ref[0]+(0.69223848143)*x_ref[1]+(-1.36903487092)*x_ref[2]
-        ref[2,0,0,1]=(0.121957328459)*x_ref[0]+(0.102229685387)*x_ref[1]+(0.962499974737)*x_ref[2]
-        ref[2,0,1,0]=(0.478614188653)*x_ref[0]+(-1.23058817023)*x_ref[1]+(1.30950997478)*x_ref[2]
-        ref[2,0,1,1]=(-0.529033562461)*x_ref[0]+(0.563030509591)*x_ref[1]+(-0.564939226654)*x_ref[2]
-        ref[2,0,2,0]=(-0.377740282406)*x_ref[0]+(1.20532110343)*x_ref[1]+(1.55615174947)*x_ref[2]
-        ref[2,0,2,1]=(0.539119710703)*x_ref[0]+(1.91771865857)*x_ref[1]+(0.0809882488048)*x_ref[2]
-        ref[2,1,0,0]=(0.00548664737796)*x_ref[0]+(-0.157716099068)*x_ref[1]+(-1.40009044235)*x_ref[2]
-        ref[2,1,0,1]=(0.0667557890666)*x_ref[0]+(0.742484448131)*x_ref[1]+(-0.325246111346)*x_ref[2]
-        ref[2,1,1,0]=(-0.214965474071)*x_ref[0]+(-0.215055151964)*x_ref[1]+(1.15673960537)*x_ref[2]
-        ref[2,1,1,1]=(0.605764831789)*x_ref[0]+(-1.0432964832)*x_ref[1]+(0.645482523161)*x_ref[2]
-        ref[2,1,2,0]=(-1.13098364088)*x_ref[0]+(-0.932044089041)*x_ref[1]+(-0.308053828241)*x_ref[2]
-        ref[2,1,2,1]=(0.481961305459)*x_ref[0]+(-0.101277472029)*x_ref[1]+(-0.17520207974)*x_ref[2]
-        ref[2,2,0,0]=(0.579831852303)*x_ref[0]+(0.538731990254)*x_ref[1]+(-0.0897460374205)*x_ref[2]
-        ref[2,2,0,1]=(-1.8763181434)*x_ref[0]+(-0.132710928569)*x_ref[1]+(1.03169751651)*x_ref[2]
-        ref[2,2,1,0]=(0.56871511431)*x_ref[0]+(0.075333481656)*x_ref[1]+(1.10238818953)*x_ref[2]
-        ref[2,2,1,1]=(1.49347755246)*x_ref[0]+(-1.00500941047)*x_ref[1]+(-0.181733196359)*x_ref[2]
-        ref[2,2,2,0]=(0.532881509971)*x_ref[0]+(-0.364333964659)*x_ref[1]+(1.09633720883)*x_ref[2]
-        ref[2,2,2,1]=(-0.518419048615)*x_ref[0]+(-0.48091100593)*x_ref[1]+(0.724628840153)*x_ref[2]
-        ref[2,3,0,0]=(0.353475859331)*x_ref[0]+(-0.0239879269825)*x_ref[1]+(1.32068893718)*x_ref[2]
-        ref[2,3,0,1]=(0.553999122102)*x_ref[0]+(-0.128530869239)*x_ref[1]+(0.134663336287)*x_ref[2]
-        ref[2,3,1,0]=(-1.59775882569)*x_ref[0]+(-1.07335424785)*x_ref[1]+(1.39223587988)*x_ref[2]
-        ref[2,3,1,1]=(-0.921252080095)*x_ref[0]+(1.46226299067)*x_ref[1]+(-1.13412499932)*x_ref[2]
-        ref[2,3,2,0]=(0.417572910178)*x_ref[0]+(0.0814889599489)*x_ref[1]+(0.292159249719)*x_ref[2]
-        ref[2,3,2,1]=(1.44620228921)*x_ref[0]+(0.767854577367)*x_ref[1]+(-0.0113709806383)*x_ref[2]
-        ref[2,4,0,0]=(-0.156987001681)*x_ref[0]+(-0.922524257833)*x_ref[1]+(0.521128360838)*x_ref[2]
-        ref[2,4,0,1]=(0.154198133354)*x_ref[0]+(0.462020370175)*x_ref[1]+(0.966768653665)*x_ref[2]
-        ref[2,4,1,0]=(0.507836849242)*x_ref[0]+(1.16701911244)*x_ref[1]+(0.264543038211)*x_ref[2]
-        ref[2,4,1,1]=(0.452059436879)*x_ref[0]+(0.409662432778)*x_ref[1]+(-0.403800872595)*x_ref[2]
-        ref[2,4,2,0]=(0.521175521008)*x_ref[0]+(-0.362551578816)*x_ref[1]+(0.0922727331623)*x_ref[2]
-        ref[2,4,2,1]=(-1.0990361823)*x_ref[0]+(1.73655146851)*x_ref[1]+(-0.867917402922)*x_ref[2]
-        ref[3,0,0,0]=(-0.0527010882236)*x_ref[0]+(-1.11528215488)*x_ref[1]+(1.3141906393)*x_ref[2]
-        ref[3,0,0,1]=(0.151284271917)*x_ref[0]+(-0.0159077450668)*x_ref[1]+(1.1798338931)*x_ref[2]
-        ref[3,0,1,0]=(-1.7648963435)*x_ref[0]+(0.229511437402)*x_ref[1]+(0.924415900312)*x_ref[2]
-        ref[3,0,1,1]=(-0.498271821094)*x_ref[0]+(1.58363063019)*x_ref[1]+(1.64871750388)*x_ref[2]
-        ref[3,0,2,0]=(-1.11245170725)*x_ref[0]+(1.27662612569)*x_ref[1]+(0.145950372369)*x_ref[2]
-        ref[3,0,2,1]=(-0.691643924238)*x_ref[0]+(-0.178211874279)*x_ref[1]+(-0.341071050366)*x_ref[2]
-        ref[3,1,0,0]=(-0.929804889461)*x_ref[0]+(0.199087067309)*x_ref[1]+(1.00150168883)*x_ref[2]
-        ref[3,1,0,1]=(-1.25152265093)*x_ref[0]+(0.517076294911)*x_ref[1]+(0.103798312362)*x_ref[2]
-        ref[3,1,1,0]=(0.797316290623)*x_ref[0]+(0.0239285379293)*x_ref[1]+(-0.836519299418)*x_ref[2]
-        ref[3,1,1,1]=(-0.470084592176)*x_ref[0]+(0.844364701728)*x_ref[1]+(-0.027373275093)*x_ref[2]
-        ref[3,1,2,0]=(1.0340279373)*x_ref[0]+(-0.0133951276315)*x_ref[1]+(1.17710546194)*x_ref[2]
-        ref[3,1,2,1]=(0.0325929541496)*x_ref[0]+(1.13784867184)*x_ref[1]+(-0.0529194266769)*x_ref[2]
-        ref[3,2,0,0]=(1.92837561772)*x_ref[0]+(-1.63633468831)*x_ref[1]+(1.4212324281)*x_ref[2]
-        ref[3,2,0,1]=(1.09556054408)*x_ref[0]+(1.43286059545)*x_ref[1]+(1.20005604593)*x_ref[2]
-        ref[3,2,1,0]=(0.308887169169)*x_ref[0]+(-0.149214224208)*x_ref[1]+(-1.13559614877)*x_ref[2]
-        ref[3,2,1,1]=(-0.0648352909004)*x_ref[0]+(-0.5645470596)*x_ref[1]+(-0.525131730514)*x_ref[2]
-        ref[3,2,2,0]=(0.21826829974)*x_ref[0]+(1.5950239996)*x_ref[1]+(0.333592425438)*x_ref[2]
-        ref[3,2,2,1]=(-1.25613956172)*x_ref[0]+(-0.242338679844)*x_ref[1]+(-0.958875577074)*x_ref[2]
-        ref[3,3,0,0]=(1.65005362159)*x_ref[0]+(-1.16713867165)*x_ref[1]+(-0.282495293685)*x_ref[2]
-        ref[3,3,0,1]=(1.04854406427)*x_ref[0]+(0.876270949531)*x_ref[1]+(0.291036304743)*x_ref[2]
-        ref[3,3,1,0]=(-1.66619451175)*x_ref[0]+(0.656275192484)*x_ref[1]+(-1.27104499942)*x_ref[2]
-        ref[3,3,1,1]=(1.55407146907)*x_ref[0]+(-0.322950943159)*x_ref[1]+(-0.287565403896)*x_ref[2]
-        ref[3,3,2,0]=(-1.54760268583)*x_ref[0]+(-1.45847761887)*x_ref[1]+(1.13939567009)*x_ref[2]
-        ref[3,3,2,1]=(1.24632351699)*x_ref[0]+(0.0265500081594)*x_ref[1]+(1.61925095159)*x_ref[2]
-        ref[3,4,0,0]=(-0.0430889433549)*x_ref[0]+(-1.46995559463)*x_ref[1]+(-1.14915159823)*x_ref[2]
-        ref[3,4,0,1]=(0.0392641403409)*x_ref[0]+(0.0603053049639)*x_ref[1]+(0.647321169934)*x_ref[2]
-        ref[3,4,1,0]=(-0.156300985227)*x_ref[0]+(0.79369911928)*x_ref[1]+(-0.413124762507)*x_ref[2]
-        ref[3,4,1,1]=(0.258402059015)*x_ref[0]+(0.00227307988585)*x_ref[1]+(0.70067141295)*x_ref[2]
-        ref[3,4,2,0]=(-1.15131298872)*x_ref[0]+(-0.627449043157)*x_ref[1]+(-0.402268345861)*x_ref[2]
-        ref[3,4,2,1]=(0.455934238179)*x_ref[0]+(-0.951120759108)*x_ref[1]+(-0.280459367131)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.203238386406)*x[0]**o+(0.734542238717)*x[0]+(-0.627248060056)*x[1]**o+(0.347224669854)*x[1]
-        ref=(0.203238386406)*x_ref[0]**o+(0.734542238717)*x_ref[0]+(-0.627248060056)*x_ref[1]**o+(0.347224669854)*x_ref[1]
-      else:
-        arg=(-0.387501489724)*x[0]**o+(0.752554332333)*x[0]+(-0.0831588271355)*x[1]**o+(0.615191870812)*x[1]+(-0.264702923622)*x[2]**o+(0.404594629993)*x[2]
-        ref=(-0.387501489724)*x_ref[0]**o+(0.752554332333)*x_ref[0]+(-0.0831588271355)*x_ref[1]**o+(0.615191870812)*x_ref[1]+(-0.264702923622)*x_ref[2]**o+(0.404594629993)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.938444792136)*x[0]**o+(-0.809407040724)*x[0]+(-0.963148615762)*x[1]**o+(-0.257000244129)*x[1]
-        arg[1]=(-0.791280640039)*x[0]**o+(0.293858623095)*x[0]+(0.964942589784)*x[1]**o+(0.522071353081)*x[1]
-        ref[0]=(0.938444792136)*x_ref[0]**o+(-0.809407040724)*x_ref[0]+(-0.963148615762)*x_ref[1]**o+(-0.257000244129)*x_ref[1]
-        ref[1]=(-0.791280640039)*x_ref[0]**o+(0.293858623095)*x_ref[0]+(0.964942589784)*x_ref[1]**o+(0.522071353081)*x_ref[1]
-      else:
-        arg[0]=(0.566110580666)*x[0]**o+(-0.89723913213)*x[0]+(-0.54781629706)*x[1]**o+(-0.0405507445628)*x[1]+(0.435477036501)*x[2]**o+(-0.296404435183)*x[2]
-        arg[1]=(-0.436126359475)*x[0]**o+(0.863706244241)*x[0]+(-0.149818409243)*x[1]**o+(-0.654801920098)*x[1]+(-0.281005092809)*x[2]**o+(-0.0257179420057)*x[2]
-        ref[0]=(0.566110580666)*x_ref[0]**o+(-0.89723913213)*x_ref[0]+(-0.54781629706)*x_ref[1]**o+(-0.0405507445628)*x_ref[1]+(0.435477036501)*x_ref[2]**o+(-0.296404435183)*x_ref[2]
-        ref[1]=(-0.436126359475)*x_ref[0]**o+(0.863706244241)*x_ref[0]+(-0.149818409243)*x_ref[1]**o+(-0.654801920098)*x_ref[1]+(-0.281005092809)*x_ref[2]**o+(-0.0257179420057)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0615713819144)*x[0]**o+(0.325133297443)*x[0]+(-0.529769594257)*x[1]**o+(-0.206126939263)*x[1]
-        arg[0,1]=(0.090956391947)*x[0]**o+(0.105841035331)*x[0]+(-0.537033610998)*x[1]**o+(0.429033781495)*x[1]
-        arg[0,2]=(-0.568216263139)*x[0]**o+(0.698057796806)*x[0]+(-0.0981614063428)*x[1]**o+(-0.952212332523)*x[1]
-        arg[0,3]=(0.128505813477)*x[0]**o+(0.206828305852)*x[0]+(0.938851873532)*x[1]**o+(-0.339234589281)*x[1]
-        arg[0,4]=(0.581805477855)*x[0]**o+(-0.621122347153)*x[0]+(-0.601029625565)*x[1]**o+(0.243084366725)*x[1]
-        arg[1,0]=(-0.342411991491)*x[0]**o+(0.642434320731)*x[0]+(-0.452657094515)*x[1]**o+(-0.899779109444)*x[1]
-        arg[1,1]=(-0.423230603077)*x[0]**o+(0.739600521332)*x[0]+(0.916226480419)*x[1]**o+(0.755264173162)*x[1]
-        arg[1,2]=(0.381864221314)*x[0]**o+(0.806402187902)*x[0]+(0.410055116458)*x[1]**o+(-0.264405213472)*x[1]
-        arg[1,3]=(0.293401427429)*x[0]**o+(-0.439209675154)*x[0]+(0.299588226145)*x[1]**o+(-0.289652201976)*x[1]
-        arg[1,4]=(0.157626502865)*x[0]**o+(0.32264788209)*x[0]+(0.284522039757)*x[1]**o+(-0.460413671191)*x[1]
-        arg[2,0]=(0.486148207)*x[0]**o+(0.0366950072658)*x[0]+(0.315299830901)*x[1]**o+(-0.320405042262)*x[1]
-        arg[2,1]=(0.207440897542)*x[0]**o+(-0.604659890692)*x[0]+(-0.64841431916)*x[1]**o+(0.0881921209641)*x[1]
-        arg[2,2]=(-0.61376840347)*x[0]**o+(0.421837679185)*x[0]+(-0.0445850531916)*x[1]**o+(0.771892018903)*x[1]
-        arg[2,3]=(0.632443182263)*x[0]**o+(-0.965297013012)*x[0]+(-0.029677959681)*x[1]**o+(0.598431910551)*x[1]
-        arg[2,4]=(-0.457656411094)*x[0]**o+(0.122435925199)*x[0]+(0.772690251937)*x[1]**o+(0.954829922926)*x[1]
-        arg[3,0]=(0.929112925461)*x[0]**o+(-0.35689901655)*x[0]+(-0.139192866782)*x[1]**o+(-0.677883436952)*x[1]
-        arg[3,1]=(-0.410318721103)*x[0]**o+(0.370830312699)*x[0]+(0.429011619434)*x[1]**o+(0.81780420854)*x[1]
-        arg[3,2]=(0.312456682985)*x[0]**o+(0.526447664999)*x[0]+(0.763610570932)*x[1]**o+(-0.631887901017)*x[1]
-        arg[3,3]=(0.749121567955)*x[0]**o+(0.168525340464)*x[0]+(-0.838409619895)*x[1]**o+(0.912745137098)*x[1]
-        arg[3,4]=(-0.665336604643)*x[0]**o+(0.638293226479)*x[0]+(0.515957084712)*x[1]**o+(-0.261426720977)*x[1]
-        ref[0,0]=(0.0615713819144)*x_ref[0]**o+(0.325133297443)*x_ref[0]+(-0.529769594257)*x_ref[1]**o+(-0.206126939263)*x_ref[1]
-        ref[0,1]=(0.090956391947)*x_ref[0]**o+(0.105841035331)*x_ref[0]+(-0.537033610998)*x_ref[1]**o+(0.429033781495)*x_ref[1]
-        ref[0,2]=(-0.568216263139)*x_ref[0]**o+(0.698057796806)*x_ref[0]+(-0.0981614063428)*x_ref[1]**o+(-0.952212332523)*x_ref[1]
-        ref[0,3]=(0.128505813477)*x_ref[0]**o+(0.206828305852)*x_ref[0]+(0.938851873532)*x_ref[1]**o+(-0.339234589281)*x_ref[1]
-        ref[0,4]=(0.581805477855)*x_ref[0]**o+(-0.621122347153)*x_ref[0]+(-0.601029625565)*x_ref[1]**o+(0.243084366725)*x_ref[1]
-        ref[1,0]=(-0.342411991491)*x_ref[0]**o+(0.642434320731)*x_ref[0]+(-0.452657094515)*x_ref[1]**o+(-0.899779109444)*x_ref[1]
-        ref[1,1]=(-0.423230603077)*x_ref[0]**o+(0.739600521332)*x_ref[0]+(0.916226480419)*x_ref[1]**o+(0.755264173162)*x_ref[1]
-        ref[1,2]=(0.381864221314)*x_ref[0]**o+(0.806402187902)*x_ref[0]+(0.410055116458)*x_ref[1]**o+(-0.264405213472)*x_ref[1]
-        ref[1,3]=(0.293401427429)*x_ref[0]**o+(-0.439209675154)*x_ref[0]+(0.299588226145)*x_ref[1]**o+(-0.289652201976)*x_ref[1]
-        ref[1,4]=(0.157626502865)*x_ref[0]**o+(0.32264788209)*x_ref[0]+(0.284522039757)*x_ref[1]**o+(-0.460413671191)*x_ref[1]
-        ref[2,0]=(0.486148207)*x_ref[0]**o+(0.0366950072658)*x_ref[0]+(0.315299830901)*x_ref[1]**o+(-0.320405042262)*x_ref[1]
-        ref[2,1]=(0.207440897542)*x_ref[0]**o+(-0.604659890692)*x_ref[0]+(-0.64841431916)*x_ref[1]**o+(0.0881921209641)*x_ref[1]
-        ref[2,2]=(-0.61376840347)*x_ref[0]**o+(0.421837679185)*x_ref[0]+(-0.0445850531916)*x_ref[1]**o+(0.771892018903)*x_ref[1]
-        ref[2,3]=(0.632443182263)*x_ref[0]**o+(-0.965297013012)*x_ref[0]+(-0.029677959681)*x_ref[1]**o+(0.598431910551)*x_ref[1]
-        ref[2,4]=(-0.457656411094)*x_ref[0]**o+(0.122435925199)*x_ref[0]+(0.772690251937)*x_ref[1]**o+(0.954829922926)*x_ref[1]
-        ref[3,0]=(0.929112925461)*x_ref[0]**o+(-0.35689901655)*x_ref[0]+(-0.139192866782)*x_ref[1]**o+(-0.677883436952)*x_ref[1]
-        ref[3,1]=(-0.410318721103)*x_ref[0]**o+(0.370830312699)*x_ref[0]+(0.429011619434)*x_ref[1]**o+(0.81780420854)*x_ref[1]
-        ref[3,2]=(0.312456682985)*x_ref[0]**o+(0.526447664999)*x_ref[0]+(0.763610570932)*x_ref[1]**o+(-0.631887901017)*x_ref[1]
-        ref[3,3]=(0.749121567955)*x_ref[0]**o+(0.168525340464)*x_ref[0]+(-0.838409619895)*x_ref[1]**o+(0.912745137098)*x_ref[1]
-        ref[3,4]=(-0.665336604643)*x_ref[0]**o+(0.638293226479)*x_ref[0]+(0.515957084712)*x_ref[1]**o+(-0.261426720977)*x_ref[1]
-      else:
-        arg[0,0]=(-0.330165086386)*x[0]**o+(0.60381119065)*x[0]+(0.981018763011)*x[1]**o+(0.0487965999608)*x[1]+(-0.389835388349)*x[2]**o+(0.111199857376)*x[2]
-        arg[0,1]=(0.518239033178)*x[0]**o+(0.60358784684)*x[0]+(-0.476990159655)*x[1]**o+(-0.93871565843)*x[1]+(-0.869845295741)*x[2]**o+(0.391409745802)*x[2]
-        arg[0,2]=(0.0927396115951)*x[0]**o+(0.546122822928)*x[0]+(-0.557424056733)*x[1]**o+(0.0623374966436)*x[1]+(-0.414595153536)*x[2]**o+(-0.196069073366)*x[2]
-        arg[0,3]=(-0.678432580882)*x[0]**o+(0.281850265141)*x[0]+(-0.323978960602)*x[1]**o+(0.655558769921)*x[1]+(-0.295747032089)*x[2]**o+(-0.152719838982)*x[2]
-        arg[0,4]=(-0.904177669203)*x[0]**o+(0.750395234205)*x[0]+(0.267431783461)*x[1]**o+(-0.781406235306)*x[1]+(0.856906655757)*x[2]**o+(-0.875554940224)*x[2]
-        arg[1,0]=(-0.243144846569)*x[0]**o+(0.970584922467)*x[0]+(-0.977250652473)*x[1]**o+(0.0239563255869)*x[1]+(-0.769423602851)*x[2]**o+(-0.433896361294)*x[2]
-        arg[1,1]=(0.31104031046)*x[0]**o+(0.899859709831)*x[0]+(0.692351561919)*x[1]**o+(-0.0838870550002)*x[1]+(-0.276105616798)*x[2]**o+(0.115501348248)*x[2]
-        arg[1,2]=(0.56702114595)*x[0]**o+(0.00240284646131)*x[0]+(-0.676314888884)*x[1]**o+(-0.678204346328)*x[1]+(0.472697088984)*x[2]**o+(-0.493949191712)*x[2]
-        arg[1,3]=(-0.242548554067)*x[0]**o+(0.980927507053)*x[0]+(-0.955706390436)*x[1]**o+(0.347031550126)*x[1]+(0.234352268238)*x[2]**o+(0.321126345333)*x[2]
-        arg[1,4]=(-0.390890566228)*x[0]**o+(-0.958497753144)*x[0]+(0.316397716043)*x[1]**o+(0.952289821769)*x[1]+(-0.027182029514)*x[2]**o+(-0.454422377872)*x[2]
-        arg[2,0]=(0.295865166318)*x[0]**o+(-0.301129718468)*x[0]+(-0.748135755269)*x[1]**o+(-0.762413814085)*x[1]+(0.572270067591)*x[2]**o+(-0.393847032684)*x[2]
-        arg[2,1]=(0.20229063622)*x[0]**o+(-0.768444028163)*x[0]+(0.378669775381)*x[1]**o+(-0.703384410944)*x[1]+(0.355653859396)*x[2]**o+(-0.228168949639)*x[2]
-        arg[2,2]=(-0.31725134742)*x[0]**o+(0.525802867508)*x[0]+(0.13375126758)*x[1]**o+(-0.673551491186)*x[1]+(0.498905883728)*x[2]**o+(-0.102794461221)*x[2]
-        arg[2,3]=(-0.396813838168)*x[0]**o+(0.0892605807843)*x[0]+(0.244133298111)*x[1]**o+(0.310900636168)*x[1]+(-0.256807063422)*x[2]**o+(0.565370697688)*x[2]
-        arg[2,4]=(0.42011835881)*x[0]**o+(0.439847594375)*x[0]+(0.0731897272006)*x[1]**o+(-0.373911054753)*x[1]+(-0.50313315963)*x[2]**o+(0.356362677601)*x[2]
-        arg[3,0]=(-0.444672845607)*x[0]**o+(-0.978424347535)*x[0]+(0.421699748442)*x[1]**o+(-0.0111798084161)*x[1]+(0.206042685881)*x[2]**o+(0.990523831215)*x[2]
-        arg[3,1]=(0.942429627068)*x[0]**o+(-0.769989484282)*x[0]+(-0.879916738075)*x[1]**o+(-0.746448112871)*x[1]+(0.280824650861)*x[2]**o+(0.0632084823022)*x[2]
-        arg[3,2]=(0.281070481177)*x[0]**o+(0.628020001876)*x[0]+(0.347767303962)*x[1]**o+(-0.276761252142)*x[1]+(0.950345260734)*x[2]**o+(-0.00148186335195)*x[2]
-        arg[3,3]=(-0.37590210465)*x[0]**o+(0.034147350068)*x[0]+(0.245173418336)*x[1]**o+(0.0564051241759)*x[1]+(-0.157928106127)*x[2]**o+(-0.611677441847)*x[2]
-        arg[3,4]=(-0.279066532276)*x[0]**o+(0.316033119063)*x[0]+(0.655948999472)*x[1]**o+(-0.520504180943)*x[1]+(0.531738158819)*x[2]**o+(0.899490827443)*x[2]
-        ref[0,0]=(-0.330165086386)*x_ref[0]**o+(0.60381119065)*x_ref[0]+(0.981018763011)*x_ref[1]**o+(0.0487965999608)*x_ref[1]+(-0.389835388349)*x_ref[2]**o+(0.111199857376)*x_ref[2]
-        ref[0,1]=(0.518239033178)*x_ref[0]**o+(0.60358784684)*x_ref[0]+(-0.476990159655)*x_ref[1]**o+(-0.93871565843)*x_ref[1]+(-0.869845295741)*x_ref[2]**o+(0.391409745802)*x_ref[2]
-        ref[0,2]=(0.0927396115951)*x_ref[0]**o+(0.546122822928)*x_ref[0]+(-0.557424056733)*x_ref[1]**o+(0.0623374966436)*x_ref[1]+(-0.414595153536)*x_ref[2]**o+(-0.196069073366)*x_ref[2]
-        ref[0,3]=(-0.678432580882)*x_ref[0]**o+(0.281850265141)*x_ref[0]+(-0.323978960602)*x_ref[1]**o+(0.655558769921)*x_ref[1]+(-0.295747032089)*x_ref[2]**o+(-0.152719838982)*x_ref[2]
-        ref[0,4]=(-0.904177669203)*x_ref[0]**o+(0.750395234205)*x_ref[0]+(0.267431783461)*x_ref[1]**o+(-0.781406235306)*x_ref[1]+(0.856906655757)*x_ref[2]**o+(-0.875554940224)*x_ref[2]
-        ref[1,0]=(-0.243144846569)*x_ref[0]**o+(0.970584922467)*x_ref[0]+(-0.977250652473)*x_ref[1]**o+(0.0239563255869)*x_ref[1]+(-0.769423602851)*x_ref[2]**o+(-0.433896361294)*x_ref[2]
-        ref[1,1]=(0.31104031046)*x_ref[0]**o+(0.899859709831)*x_ref[0]+(0.692351561919)*x_ref[1]**o+(-0.0838870550002)*x_ref[1]+(-0.276105616798)*x_ref[2]**o+(0.115501348248)*x_ref[2]
-        ref[1,2]=(0.56702114595)*x_ref[0]**o+(0.00240284646131)*x_ref[0]+(-0.676314888884)*x_ref[1]**o+(-0.678204346328)*x_ref[1]+(0.472697088984)*x_ref[2]**o+(-0.493949191712)*x_ref[2]
-        ref[1,3]=(-0.242548554067)*x_ref[0]**o+(0.980927507053)*x_ref[0]+(-0.955706390436)*x_ref[1]**o+(0.347031550126)*x_ref[1]+(0.234352268238)*x_ref[2]**o+(0.321126345333)*x_ref[2]
-        ref[1,4]=(-0.390890566228)*x_ref[0]**o+(-0.958497753144)*x_ref[0]+(0.316397716043)*x_ref[1]**o+(0.952289821769)*x_ref[1]+(-0.027182029514)*x_ref[2]**o+(-0.454422377872)*x_ref[2]
-        ref[2,0]=(0.295865166318)*x_ref[0]**o+(-0.301129718468)*x_ref[0]+(-0.748135755269)*x_ref[1]**o+(-0.762413814085)*x_ref[1]+(0.572270067591)*x_ref[2]**o+(-0.393847032684)*x_ref[2]
-        ref[2,1]=(0.20229063622)*x_ref[0]**o+(-0.768444028163)*x_ref[0]+(0.378669775381)*x_ref[1]**o+(-0.703384410944)*x_ref[1]+(0.355653859396)*x_ref[2]**o+(-0.228168949639)*x_ref[2]
-        ref[2,2]=(-0.31725134742)*x_ref[0]**o+(0.525802867508)*x_ref[0]+(0.13375126758)*x_ref[1]**o+(-0.673551491186)*x_ref[1]+(0.498905883728)*x_ref[2]**o+(-0.102794461221)*x_ref[2]
-        ref[2,3]=(-0.396813838168)*x_ref[0]**o+(0.0892605807843)*x_ref[0]+(0.244133298111)*x_ref[1]**o+(0.310900636168)*x_ref[1]+(-0.256807063422)*x_ref[2]**o+(0.565370697688)*x_ref[2]
-        ref[2,4]=(0.42011835881)*x_ref[0]**o+(0.439847594375)*x_ref[0]+(0.0731897272006)*x_ref[1]**o+(-0.373911054753)*x_ref[1]+(-0.50313315963)*x_ref[2]**o+(0.356362677601)*x_ref[2]
-        ref[3,0]=(-0.444672845607)*x_ref[0]**o+(-0.978424347535)*x_ref[0]+(0.421699748442)*x_ref[1]**o+(-0.0111798084161)*x_ref[1]+(0.206042685881)*x_ref[2]**o+(0.990523831215)*x_ref[2]
-        ref[3,1]=(0.942429627068)*x_ref[0]**o+(-0.769989484282)*x_ref[0]+(-0.879916738075)*x_ref[1]**o+(-0.746448112871)*x_ref[1]+(0.280824650861)*x_ref[2]**o+(0.0632084823022)*x_ref[2]
-        ref[3,2]=(0.281070481177)*x_ref[0]**o+(0.628020001876)*x_ref[0]+(0.347767303962)*x_ref[1]**o+(-0.276761252142)*x_ref[1]+(0.950345260734)*x_ref[2]**o+(-0.00148186335195)*x_ref[2]
-        ref[3,3]=(-0.37590210465)*x_ref[0]**o+(0.034147350068)*x_ref[0]+(0.245173418336)*x_ref[1]**o+(0.0564051241759)*x_ref[1]+(-0.157928106127)*x_ref[2]**o+(-0.611677441847)*x_ref[2]
-        ref[3,4]=(-0.279066532276)*x_ref[0]**o+(0.316033119063)*x_ref[0]+(0.655948999472)*x_ref[1]**o+(-0.520504180943)*x_ref[1]+(0.531738158819)*x_ref[2]**o+(0.899490827443)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.415438516191)*x[0]**o+(0.374659323173)*x[0]+(0.688470746611)*x[1]**o+(0.498183692176)*x[1]
-        arg[0,0,1]=(-0.846725329522)*x[0]**o+(0.414376816326)*x[0]+(0.651609661615)*x[1]**o+(0.357606396667)*x[1]
-        arg[0,1,0]=(0.728029172023)*x[0]**o+(0.975728459112)*x[0]+(-0.658211371639)*x[1]**o+(0.411894140351)*x[1]
-        arg[0,1,1]=(0.807350281817)*x[0]**o+(-0.369755733522)*x[0]+(-0.519483139314)*x[1]**o+(-0.709353537648)*x[1]
-        arg[1,0,0]=(0.0588259329479)*x[0]**o+(0.218362870441)*x[0]+(-0.0279239318934)*x[1]**o+(-0.75783635329)*x[1]
-        arg[1,0,1]=(-0.429573558505)*x[0]**o+(-0.339046134618)*x[0]+(0.412777825743)*x[1]**o+(-0.306607333437)*x[1]
-        arg[1,1,0]=(0.0222661407543)*x[0]**o+(0.927923674781)*x[0]+(-0.767468570033)*x[1]**o+(-0.0659150590367)*x[1]
-        arg[1,1,1]=(0.372811733787)*x[0]**o+(-0.286500260061)*x[0]+(-0.807504375569)*x[1]**o+(-0.992850148234)*x[1]
-        arg[2,0,0]=(0.368229828596)*x[0]**o+(0.672540290379)*x[0]+(-0.760462595095)*x[1]**o+(-0.761242492425)*x[1]
-        arg[2,0,1]=(0.306249523133)*x[0]**o+(0.769928924717)*x[0]+(0.610293800742)*x[1]**o+(-0.221996271153)*x[1]
-        arg[2,1,0]=(-0.909148832991)*x[0]**o+(-0.0293038712703)*x[0]+(-0.161707473269)*x[1]**o+(-0.534345319122)*x[1]
-        arg[2,1,1]=(-0.146432487737)*x[0]**o+(0.93729266958)*x[0]+(-0.561919238789)*x[1]**o+(-0.449440501171)*x[1]
-        arg[3,0,0]=(0.411711661035)*x[0]**o+(-0.0699878047274)*x[0]+(-0.0227688826645)*x[1]**o+(-0.939787633547)*x[1]
-        arg[3,0,1]=(-0.82108820245)*x[0]**o+(0.225501168847)*x[0]+(0.622921674682)*x[1]**o+(0.61092413094)*x[1]
-        arg[3,1,0]=(0.758116155912)*x[0]**o+(-0.117316615447)*x[0]+(0.0702245119124)*x[1]**o+(-0.275114508561)*x[1]
-        arg[3,1,1]=(-0.32568550821)*x[0]**o+(-0.280144846326)*x[0]+(0.194971187876)*x[1]**o+(-0.728447244746)*x[1]
-        arg[4,0,0]=(0.880042622981)*x[0]**o+(-0.395684607563)*x[0]+(-0.563304061265)*x[1]**o+(0.968663606772)*x[1]
-        arg[4,0,1]=(-0.515392712458)*x[0]**o+(0.820857647342)*x[0]+(-0.476289639495)*x[1]**o+(-0.478062589609)*x[1]
-        arg[4,1,0]=(0.534322425269)*x[0]**o+(0.975618695265)*x[0]+(-0.195764005045)*x[1]**o+(0.561996200643)*x[1]
-        arg[4,1,1]=(-0.906243138672)*x[0]**o+(-0.580985047294)*x[0]+(-0.094609405051)*x[1]**o+(0.734326711649)*x[1]
-        arg[5,0,0]=(-0.0655516121632)*x[0]**o+(0.785493123174)*x[0]+(-0.760068333675)*x[1]**o+(0.693869247554)*x[1]
-        arg[5,0,1]=(-0.931019838892)*x[0]**o+(0.80958291621)*x[0]+(-0.590591206111)*x[1]**o+(-0.800900346601)*x[1]
-        arg[5,1,0]=(0.448779048952)*x[0]**o+(-0.793450503268)*x[0]+(0.161067403301)*x[1]**o+(0.432054043544)*x[1]
-        arg[5,1,1]=(0.0423607361972)*x[0]**o+(-0.664958045702)*x[0]+(-0.174728816918)*x[1]**o+(-0.394390068699)*x[1]
-        ref[0,0,0]=(0.415438516191)*x_ref[0]**o+(0.374659323173)*x_ref[0]+(0.688470746611)*x_ref[1]**o+(0.498183692176)*x_ref[1]
-        ref[0,0,1]=(-0.846725329522)*x_ref[0]**o+(0.414376816326)*x_ref[0]+(0.651609661615)*x_ref[1]**o+(0.357606396667)*x_ref[1]
-        ref[0,1,0]=(0.728029172023)*x_ref[0]**o+(0.975728459112)*x_ref[0]+(-0.658211371639)*x_ref[1]**o+(0.411894140351)*x_ref[1]
-        ref[0,1,1]=(0.807350281817)*x_ref[0]**o+(-0.369755733522)*x_ref[0]+(-0.519483139314)*x_ref[1]**o+(-0.709353537648)*x_ref[1]
-        ref[1,0,0]=(0.0588259329479)*x_ref[0]**o+(0.218362870441)*x_ref[0]+(-0.0279239318934)*x_ref[1]**o+(-0.75783635329)*x_ref[1]
-        ref[1,0,1]=(-0.429573558505)*x_ref[0]**o+(-0.339046134618)*x_ref[0]+(0.412777825743)*x_ref[1]**o+(-0.306607333437)*x_ref[1]
-        ref[1,1,0]=(0.0222661407543)*x_ref[0]**o+(0.927923674781)*x_ref[0]+(-0.767468570033)*x_ref[1]**o+(-0.0659150590367)*x_ref[1]
-        ref[1,1,1]=(0.372811733787)*x_ref[0]**o+(-0.286500260061)*x_ref[0]+(-0.807504375569)*x_ref[1]**o+(-0.992850148234)*x_ref[1]
-        ref[2,0,0]=(0.368229828596)*x_ref[0]**o+(0.672540290379)*x_ref[0]+(-0.760462595095)*x_ref[1]**o+(-0.761242492425)*x_ref[1]
-        ref[2,0,1]=(0.306249523133)*x_ref[0]**o+(0.769928924717)*x_ref[0]+(0.610293800742)*x_ref[1]**o+(-0.221996271153)*x_ref[1]
-        ref[2,1,0]=(-0.909148832991)*x_ref[0]**o+(-0.0293038712703)*x_ref[0]+(-0.161707473269)*x_ref[1]**o+(-0.534345319122)*x_ref[1]
-        ref[2,1,1]=(-0.146432487737)*x_ref[0]**o+(0.93729266958)*x_ref[0]+(-0.561919238789)*x_ref[1]**o+(-0.449440501171)*x_ref[1]
-        ref[3,0,0]=(0.411711661035)*x_ref[0]**o+(-0.0699878047274)*x_ref[0]+(-0.0227688826645)*x_ref[1]**o+(-0.939787633547)*x_ref[1]
-        ref[3,0,1]=(-0.82108820245)*x_ref[0]**o+(0.225501168847)*x_ref[0]+(0.622921674682)*x_ref[1]**o+(0.61092413094)*x_ref[1]
-        ref[3,1,0]=(0.758116155912)*x_ref[0]**o+(-0.117316615447)*x_ref[0]+(0.0702245119124)*x_ref[1]**o+(-0.275114508561)*x_ref[1]
-        ref[3,1,1]=(-0.32568550821)*x_ref[0]**o+(-0.280144846326)*x_ref[0]+(0.194971187876)*x_ref[1]**o+(-0.728447244746)*x_ref[1]
-        ref[4,0,0]=(0.880042622981)*x_ref[0]**o+(-0.395684607563)*x_ref[0]+(-0.563304061265)*x_ref[1]**o+(0.968663606772)*x_ref[1]
-        ref[4,0,1]=(-0.515392712458)*x_ref[0]**o+(0.820857647342)*x_ref[0]+(-0.476289639495)*x_ref[1]**o+(-0.478062589609)*x_ref[1]
-        ref[4,1,0]=(0.534322425269)*x_ref[0]**o+(0.975618695265)*x_ref[0]+(-0.195764005045)*x_ref[1]**o+(0.561996200643)*x_ref[1]
-        ref[4,1,1]=(-0.906243138672)*x_ref[0]**o+(-0.580985047294)*x_ref[0]+(-0.094609405051)*x_ref[1]**o+(0.734326711649)*x_ref[1]
-        ref[5,0,0]=(-0.0655516121632)*x_ref[0]**o+(0.785493123174)*x_ref[0]+(-0.760068333675)*x_ref[1]**o+(0.693869247554)*x_ref[1]
-        ref[5,0,1]=(-0.931019838892)*x_ref[0]**o+(0.80958291621)*x_ref[0]+(-0.590591206111)*x_ref[1]**o+(-0.800900346601)*x_ref[1]
-        ref[5,1,0]=(0.448779048952)*x_ref[0]**o+(-0.793450503268)*x_ref[0]+(0.161067403301)*x_ref[1]**o+(0.432054043544)*x_ref[1]
-        ref[5,1,1]=(0.0423607361972)*x_ref[0]**o+(-0.664958045702)*x_ref[0]+(-0.174728816918)*x_ref[1]**o+(-0.394390068699)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.34355250678)*x[0]**o+(0.554590991175)*x[0]+(0.00673862595967)*x[1]**o+(-0.405764224977)*x[1]+(0.0865564883661)*x[2]**o+(0.102294137607)*x[2]
-        arg[0,0,1]=(0.855234460708)*x[0]**o+(-0.710901486015)*x[0]+(0.546393138087)*x[1]**o+(0.847113479239)*x[1]+(-0.650701604407)*x[2]**o+(-0.914755510262)*x[2]
-        arg[0,1,0]=(0.252544568503)*x[0]**o+(-0.473471976093)*x[0]+(-0.587315274764)*x[1]**o+(-0.269940894375)*x[1]+(0.360340735507)*x[2]**o+(-0.745440004827)*x[2]
-        arg[0,1,1]=(0.11967506555)*x[0]**o+(0.696836453942)*x[0]+(-0.871162187396)*x[1]**o+(-0.315170111067)*x[1]+(0.232066109266)*x[2]**o+(-0.464730524838)*x[2]
-        arg[1,0,0]=(-0.790535662997)*x[0]**o+(-0.964779159884)*x[0]+(-0.689937881374)*x[1]**o+(0.422799231262)*x[1]+(-0.97315874804)*x[2]**o+(-0.532103115205)*x[2]
-        arg[1,0,1]=(-0.0487589554945)*x[0]**o+(-0.622735713658)*x[0]+(-0.520842613265)*x[1]**o+(0.803711422599)*x[1]+(0.440648875556)*x[2]**o+(0.98786672574)*x[2]
-        arg[1,1,0]=(0.811189977538)*x[0]**o+(0.0175150486788)*x[0]+(-0.124328899976)*x[1]**o+(-0.942398680503)*x[1]+(-0.149270209895)*x[2]**o+(-0.853084407696)*x[2]
-        arg[1,1,1]=(0.688378159744)*x[0]**o+(0.408766927878)*x[0]+(0.834128919609)*x[1]**o+(0.253605923886)*x[1]+(0.424992121054)*x[2]**o+(0.21016117963)*x[2]
-        arg[2,0,0]=(0.277469067087)*x[0]**o+(0.539821557611)*x[0]+(0.348679402521)*x[1]**o+(-0.469772506537)*x[1]+(0.454583229137)*x[2]**o+(0.653681481133)*x[2]
-        arg[2,0,1]=(-0.934067178483)*x[0]**o+(-0.172735098497)*x[0]+(-0.0347256850948)*x[1]**o+(-0.459971424944)*x[1]+(0.932661853019)*x[2]**o+(-0.186822590955)*x[2]
-        arg[2,1,0]=(0.71698574321)*x[0]**o+(-0.197244831261)*x[0]+(0.183419576182)*x[1]**o+(-0.871451480853)*x[1]+(-0.349396269955)*x[2]**o+(0.095909246936)*x[2]
-        arg[2,1,1]=(-0.00972985962106)*x[0]**o+(-0.919204152811)*x[0]+(-0.751744404365)*x[1]**o+(0.377096436852)*x[1]+(-0.924228885362)*x[2]**o+(0.451053813959)*x[2]
-        arg[3,0,0]=(0.951119968373)*x[0]**o+(-0.0680027504528)*x[0]+(-0.113660990287)*x[1]**o+(-0.428999453003)*x[1]+(0.171804544103)*x[2]**o+(0.677635036297)*x[2]
-        arg[3,0,1]=(0.62534864581)*x[0]**o+(0.389496246771)*x[0]+(0.621295327948)*x[1]**o+(-0.684165739023)*x[1]+(0.258637161492)*x[2]**o+(0.0441460764076)*x[2]
-        arg[3,1,0]=(0.0348922721145)*x[0]**o+(0.091201286767)*x[0]+(0.421079169132)*x[1]**o+(-0.616504862591)*x[1]+(0.563927673176)*x[2]**o+(-0.183993394822)*x[2]
-        arg[3,1,1]=(0.657959811783)*x[0]**o+(0.229729671382)*x[0]+(0.549853155207)*x[1]**o+(-0.847412930565)*x[1]+(-0.0780682500337)*x[2]**o+(0.574435563406)*x[2]
-        arg[4,0,0]=(-0.679988515344)*x[0]**o+(0.0517331630343)*x[0]+(-0.160281064879)*x[1]**o+(-0.0672405944261)*x[1]+(-0.118968444607)*x[2]**o+(0.00980065834148)*x[2]
-        arg[4,0,1]=(-0.150457972951)*x[0]**o+(0.671586511406)*x[0]+(-0.844112675259)*x[1]**o+(0.42766255101)*x[1]+(-0.22449721018)*x[2]**o+(-0.150416151059)*x[2]
-        arg[4,1,0]=(0.0768992597753)*x[0]**o+(0.0139605476692)*x[0]+(-0.831269554863)*x[1]**o+(-0.279339344511)*x[1]+(0.387318821185)*x[2]**o+(0.967687121678)*x[2]
-        arg[4,1,1]=(-0.670585948598)*x[0]**o+(0.422715818654)*x[0]+(0.623702390878)*x[1]**o+(0.922646081646)*x[1]+(-0.714191287039)*x[2]**o+(-0.99018084869)*x[2]
-        arg[5,0,0]=(0.100273819257)*x[0]**o+(-0.769422291863)*x[0]+(-0.152611272068)*x[1]**o+(-0.396798631305)*x[1]+(0.502251047462)*x[2]**o+(0.993791216449)*x[2]
-        arg[5,0,1]=(-0.0222540900657)*x[0]**o+(-0.339810353987)*x[0]+(0.241665078696)*x[1]**o+(0.111020568564)*x[1]+(0.298147316931)*x[2]**o+(0.391278660594)*x[2]
-        arg[5,1,0]=(0.828297599555)*x[0]**o+(0.237678875371)*x[0]+(0.924551126274)*x[1]**o+(-0.663695049485)*x[1]+(-0.547123493132)*x[2]**o+(-0.788635745118)*x[2]
-        arg[5,1,1]=(0.0726334370982)*x[0]**o+(-0.875688492957)*x[0]+(0.473726235108)*x[1]**o+(0.023025596151)*x[1]+(0.827449396402)*x[2]**o+(-0.154698941604)*x[2]
-        ref[0,0,0]=(0.34355250678)*x_ref[0]**o+(0.554590991175)*x_ref[0]+(0.00673862595967)*x_ref[1]**o+(-0.405764224977)*x_ref[1]+(0.0865564883661)*x_ref[2]**o+(0.102294137607)*x_ref[2]
-        ref[0,0,1]=(0.855234460708)*x_ref[0]**o+(-0.710901486015)*x_ref[0]+(0.546393138087)*x_ref[1]**o+(0.847113479239)*x_ref[1]+(-0.650701604407)*x_ref[2]**o+(-0.914755510262)*x_ref[2]
-        ref[0,1,0]=(0.252544568503)*x_ref[0]**o+(-0.473471976093)*x_ref[0]+(-0.587315274764)*x_ref[1]**o+(-0.269940894375)*x_ref[1]+(0.360340735507)*x_ref[2]**o+(-0.745440004827)*x_ref[2]
-        ref[0,1,1]=(0.11967506555)*x_ref[0]**o+(0.696836453942)*x_ref[0]+(-0.871162187396)*x_ref[1]**o+(-0.315170111067)*x_ref[1]+(0.232066109266)*x_ref[2]**o+(-0.464730524838)*x_ref[2]
-        ref[1,0,0]=(-0.790535662997)*x_ref[0]**o+(-0.964779159884)*x_ref[0]+(-0.689937881374)*x_ref[1]**o+(0.422799231262)*x_ref[1]+(-0.97315874804)*x_ref[2]**o+(-0.532103115205)*x_ref[2]
-        ref[1,0,1]=(-0.0487589554945)*x_ref[0]**o+(-0.622735713658)*x_ref[0]+(-0.520842613265)*x_ref[1]**o+(0.803711422599)*x_ref[1]+(0.440648875556)*x_ref[2]**o+(0.98786672574)*x_ref[2]
-        ref[1,1,0]=(0.811189977538)*x_ref[0]**o+(0.0175150486788)*x_ref[0]+(-0.124328899976)*x_ref[1]**o+(-0.942398680503)*x_ref[1]+(-0.149270209895)*x_ref[2]**o+(-0.853084407696)*x_ref[2]
-        ref[1,1,1]=(0.688378159744)*x_ref[0]**o+(0.408766927878)*x_ref[0]+(0.834128919609)*x_ref[1]**o+(0.253605923886)*x_ref[1]+(0.424992121054)*x_ref[2]**o+(0.21016117963)*x_ref[2]
-        ref[2,0,0]=(0.277469067087)*x_ref[0]**o+(0.539821557611)*x_ref[0]+(0.348679402521)*x_ref[1]**o+(-0.469772506537)*x_ref[1]+(0.454583229137)*x_ref[2]**o+(0.653681481133)*x_ref[2]
-        ref[2,0,1]=(-0.934067178483)*x_ref[0]**o+(-0.172735098497)*x_ref[0]+(-0.0347256850948)*x_ref[1]**o+(-0.459971424944)*x_ref[1]+(0.932661853019)*x_ref[2]**o+(-0.186822590955)*x_ref[2]
-        ref[2,1,0]=(0.71698574321)*x_ref[0]**o+(-0.197244831261)*x_ref[0]+(0.183419576182)*x_ref[1]**o+(-0.871451480853)*x_ref[1]+(-0.349396269955)*x_ref[2]**o+(0.095909246936)*x_ref[2]
-        ref[2,1,1]=(-0.00972985962106)*x_ref[0]**o+(-0.919204152811)*x_ref[0]+(-0.751744404365)*x_ref[1]**o+(0.377096436852)*x_ref[1]+(-0.924228885362)*x_ref[2]**o+(0.451053813959)*x_ref[2]
-        ref[3,0,0]=(0.951119968373)*x_ref[0]**o+(-0.0680027504528)*x_ref[0]+(-0.113660990287)*x_ref[1]**o+(-0.428999453003)*x_ref[1]+(0.171804544103)*x_ref[2]**o+(0.677635036297)*x_ref[2]
-        ref[3,0,1]=(0.62534864581)*x_ref[0]**o+(0.389496246771)*x_ref[0]+(0.621295327948)*x_ref[1]**o+(-0.684165739023)*x_ref[1]+(0.258637161492)*x_ref[2]**o+(0.0441460764076)*x_ref[2]
-        ref[3,1,0]=(0.0348922721145)*x_ref[0]**o+(0.091201286767)*x_ref[0]+(0.421079169132)*x_ref[1]**o+(-0.616504862591)*x_ref[1]+(0.563927673176)*x_ref[2]**o+(-0.183993394822)*x_ref[2]
-        ref[3,1,1]=(0.657959811783)*x_ref[0]**o+(0.229729671382)*x_ref[0]+(0.549853155207)*x_ref[1]**o+(-0.847412930565)*x_ref[1]+(-0.0780682500337)*x_ref[2]**o+(0.574435563406)*x_ref[2]
-        ref[4,0,0]=(-0.679988515344)*x_ref[0]**o+(0.0517331630343)*x_ref[0]+(-0.160281064879)*x_ref[1]**o+(-0.0672405944261)*x_ref[1]+(-0.118968444607)*x_ref[2]**o+(0.00980065834148)*x_ref[2]
-        ref[4,0,1]=(-0.150457972951)*x_ref[0]**o+(0.671586511406)*x_ref[0]+(-0.844112675259)*x_ref[1]**o+(0.42766255101)*x_ref[1]+(-0.22449721018)*x_ref[2]**o+(-0.150416151059)*x_ref[2]
-        ref[4,1,0]=(0.0768992597753)*x_ref[0]**o+(0.0139605476692)*x_ref[0]+(-0.831269554863)*x_ref[1]**o+(-0.279339344511)*x_ref[1]+(0.387318821185)*x_ref[2]**o+(0.967687121678)*x_ref[2]
-        ref[4,1,1]=(-0.670585948598)*x_ref[0]**o+(0.422715818654)*x_ref[0]+(0.623702390878)*x_ref[1]**o+(0.922646081646)*x_ref[1]+(-0.714191287039)*x_ref[2]**o+(-0.99018084869)*x_ref[2]
-        ref[5,0,0]=(0.100273819257)*x_ref[0]**o+(-0.769422291863)*x_ref[0]+(-0.152611272068)*x_ref[1]**o+(-0.396798631305)*x_ref[1]+(0.502251047462)*x_ref[2]**o+(0.993791216449)*x_ref[2]
-        ref[5,0,1]=(-0.0222540900657)*x_ref[0]**o+(-0.339810353987)*x_ref[0]+(0.241665078696)*x_ref[1]**o+(0.111020568564)*x_ref[1]+(0.298147316931)*x_ref[2]**o+(0.391278660594)*x_ref[2]
-        ref[5,1,0]=(0.828297599555)*x_ref[0]**o+(0.237678875371)*x_ref[0]+(0.924551126274)*x_ref[1]**o+(-0.663695049485)*x_ref[1]+(-0.547123493132)*x_ref[2]**o+(-0.788635745118)*x_ref[2]
-        ref[5,1,1]=(0.0726334370982)*x_ref[0]**o+(-0.875688492957)*x_ref[0]+(0.473726235108)*x_ref[1]**o+(0.023025596151)*x_ref[1]+(0.827449396402)*x_ref[2]**o+(-0.154698941604)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.0338299192888)*x[0]**o+(-0.114906274359)*x[0]+(0.15010339398)*x[1]**o+(0.625295991328)*x[1]
-        arg[0,0,0,1]=(-0.1311901039)*x[0]**o+(-0.551712861217)*x[0]+(-0.287411404506)*x[1]**o+(0.0242820629572)*x[1]
-        arg[0,0,1,0]=(0.121962094111)*x[0]**o+(0.203169622345)*x[0]+(0.241504218053)*x[1]**o+(-0.0696356239498)*x[1]
-        arg[0,0,1,1]=(0.0461537352329)*x[0]**o+(-0.275908938567)*x[0]+(-0.271184121027)*x[1]**o+(-0.364024729567)*x[1]
-        arg[0,0,2,0]=(0.199272234315)*x[0]**o+(-0.906364258855)*x[0]+(-0.92102930037)*x[1]**o+(0.0718981903454)*x[1]
-        arg[0,0,2,1]=(-0.742950958383)*x[0]**o+(0.0301464847722)*x[0]+(0.466993477687)*x[1]**o+(-0.402131750698)*x[1]
-        arg[0,1,0,0]=(-0.0653776546375)*x[0]**o+(-0.679360612372)*x[0]+(-0.32783837768)*x[1]**o+(-0.113753016428)*x[1]
-        arg[0,1,0,1]=(0.58610119414)*x[0]**o+(0.142613166231)*x[0]+(0.0409105619986)*x[1]**o+(-0.660641663558)*x[1]
-        arg[0,1,1,0]=(0.212172308585)*x[0]**o+(-0.452767768344)*x[0]+(0.963053969889)*x[1]**o+(0.752691773953)*x[1]
-        arg[0,1,1,1]=(-0.514998377887)*x[0]**o+(0.0872464329801)*x[0]+(0.265590295505)*x[1]**o+(0.557238826549)*x[1]
-        arg[0,1,2,0]=(0.360523954724)*x[0]**o+(0.550238402994)*x[0]+(-0.206349415539)*x[1]**o+(0.357304730511)*x[1]
-        arg[0,1,2,1]=(-0.872755217435)*x[0]**o+(0.190943683664)*x[0]+(-0.245454292354)*x[1]**o+(0.507229578506)*x[1]
-        arg[0,2,0,0]=(0.994619505257)*x[0]**o+(0.33482820568)*x[0]+(-0.12721791236)*x[1]**o+(-0.505873171195)*x[1]
-        arg[0,2,0,1]=(0.224805131522)*x[0]**o+(0.332022434603)*x[0]+(0.0583494507268)*x[1]**o+(0.857185410994)*x[1]
-        arg[0,2,1,0]=(-0.425367077516)*x[0]**o+(-0.25207101061)*x[0]+(-0.11164491753)*x[1]**o+(0.44752084285)*x[1]
-        arg[0,2,1,1]=(-0.158725210751)*x[0]**o+(-0.0692363138932)*x[0]+(0.214803128256)*x[1]**o+(0.886699106748)*x[1]
-        arg[0,2,2,0]=(-0.332146331257)*x[0]**o+(0.114845050128)*x[0]+(-0.0781411611124)*x[1]**o+(0.474972057387)*x[1]
-        arg[0,2,2,1]=(-0.481949630694)*x[0]**o+(0.644984972151)*x[0]+(0.171146519527)*x[1]**o+(0.57534803966)*x[1]
-        arg[0,3,0,0]=(0.7580633024)*x[0]**o+(0.0280511776577)*x[0]+(0.375583652078)*x[1]**o+(-0.809112787284)*x[1]
-        arg[0,3,0,1]=(-0.466737159934)*x[0]**o+(0.410032775686)*x[0]+(0.176141189584)*x[1]**o+(-0.228288309456)*x[1]
-        arg[0,3,1,0]=(0.427129582196)*x[0]**o+(-0.718385859483)*x[0]+(-0.172261212989)*x[1]**o+(0.913157476188)*x[1]
-        arg[0,3,1,1]=(0.952506706487)*x[0]**o+(-0.497478163899)*x[0]+(-0.930273038716)*x[1]**o+(0.673573149025)*x[1]
-        arg[0,3,2,0]=(-0.0074302930747)*x[0]**o+(0.226424842035)*x[0]+(0.871190620671)*x[1]**o+(0.277695333679)*x[1]
-        arg[0,3,2,1]=(-0.540820239946)*x[0]**o+(0.33044763211)*x[0]+(-0.772648820924)*x[1]**o+(-0.362410088021)*x[1]
-        arg[0,4,0,0]=(-0.748396039111)*x[0]**o+(0.215131518212)*x[0]+(0.514087824403)*x[1]**o+(0.335563854205)*x[1]
-        arg[0,4,0,1]=(-0.443263590391)*x[0]**o+(-0.523167282542)*x[0]+(0.122612452799)*x[1]**o+(0.216527857615)*x[1]
-        arg[0,4,1,0]=(0.448176296777)*x[0]**o+(0.478292146131)*x[0]+(-0.558921083502)*x[1]**o+(-0.17018258654)*x[1]
-        arg[0,4,1,1]=(-0.912765673953)*x[0]**o+(0.751746623223)*x[0]+(-0.104811579057)*x[1]**o+(0.456436870323)*x[1]
-        arg[0,4,2,0]=(0.157946450932)*x[0]**o+(0.147858587857)*x[0]+(0.775747362874)*x[1]**o+(0.478478862463)*x[1]
-        arg[0,4,2,1]=(-0.819625058185)*x[0]**o+(-0.0231980393919)*x[0]+(-0.186647585522)*x[1]**o+(0.513350371371)*x[1]
-        arg[1,0,0,0]=(-0.942373946995)*x[0]**o+(-0.761326160931)*x[0]+(0.192511867167)*x[1]**o+(-0.50895969579)*x[1]
-        arg[1,0,0,1]=(0.0670813349951)*x[0]**o+(0.55602953512)*x[0]+(0.757621178635)*x[1]**o+(0.741550201759)*x[1]
-        arg[1,0,1,0]=(-0.114642609493)*x[0]**o+(-0.639500048447)*x[0]+(-0.861813039243)*x[1]**o+(0.36413406744)*x[1]
-        arg[1,0,1,1]=(0.126555451594)*x[0]**o+(-0.885172557082)*x[0]+(-0.376073252921)*x[1]**o+(0.166102850653)*x[1]
-        arg[1,0,2,0]=(-0.381517068219)*x[0]**o+(0.94870328267)*x[0]+(-0.129934777755)*x[1]**o+(0.78090715758)*x[1]
-        arg[1,0,2,1]=(-0.535852302247)*x[0]**o+(0.63751039318)*x[0]+(-0.537556159925)*x[1]**o+(0.147766714221)*x[1]
-        arg[1,1,0,0]=(-0.605543047533)*x[0]**o+(-0.366612785372)*x[0]+(0.544900149212)*x[1]**o+(0.722108900447)*x[1]
-        arg[1,1,0,1]=(0.133378561142)*x[0]**o+(-0.227808772494)*x[0]+(-0.729399624175)*x[1]**o+(0.307571743455)*x[1]
-        arg[1,1,1,0]=(0.0458830538139)*x[0]**o+(0.0585044493026)*x[0]+(-0.136630547605)*x[1]**o+(-0.0823288389309)*x[1]
-        arg[1,1,1,1]=(0.339263808784)*x[0]**o+(0.00988917109076)*x[0]+(-0.786591838083)*x[1]**o+(-0.361686799179)*x[1]
-        arg[1,1,2,0]=(0.789942037592)*x[0]**o+(-0.266689758676)*x[0]+(0.464856327495)*x[1]**o+(0.138022774293)*x[1]
-        arg[1,1,2,1]=(-0.723544867217)*x[0]**o+(-0.523023674205)*x[0]+(0.629726026331)*x[1]**o+(-0.867808120997)*x[1]
-        arg[1,2,0,0]=(-0.495589518787)*x[0]**o+(-0.561664880262)*x[0]+(0.0319320417078)*x[1]**o+(-0.153720661498)*x[1]
-        arg[1,2,0,1]=(0.293168114024)*x[0]**o+(-0.344107163981)*x[0]+(-0.275629670068)*x[1]**o+(0.06103653487)*x[1]
-        arg[1,2,1,0]=(0.495640927339)*x[0]**o+(0.596540095043)*x[0]+(0.208792567756)*x[1]**o+(0.886040724145)*x[1]
-        arg[1,2,1,1]=(0.331476398093)*x[0]**o+(-0.472588572455)*x[0]+(-0.455670457285)*x[1]**o+(-0.731223615642)*x[1]
-        arg[1,2,2,0]=(-0.127107829674)*x[0]**o+(-0.21113128456)*x[0]+(-0.733928194168)*x[1]**o+(-0.174127696853)*x[1]
-        arg[1,2,2,1]=(0.521879316151)*x[0]**o+(0.983424557865)*x[0]+(-0.288659660182)*x[1]**o+(-0.431045203113)*x[1]
-        arg[1,3,0,0]=(0.292348765746)*x[0]**o+(0.0730741240915)*x[0]+(0.079624022683)*x[1]**o+(0.237483071633)*x[1]
-        arg[1,3,0,1]=(0.291035771848)*x[0]**o+(-0.482909477855)*x[0]+(-0.999142129615)*x[1]**o+(-0.559723367197)*x[1]
-        arg[1,3,1,0]=(0.747096275653)*x[0]**o+(0.762757649624)*x[0]+(-0.821650889507)*x[1]**o+(0.301128670189)*x[1]
-        arg[1,3,1,1]=(0.82703681414)*x[0]**o+(-0.336570070436)*x[0]+(0.798131952979)*x[1]**o+(0.603562737956)*x[1]
-        arg[1,3,2,0]=(-0.164875914126)*x[0]**o+(0.219409873902)*x[0]+(0.784253160678)*x[1]**o+(0.0219597460707)*x[1]
-        arg[1,3,2,1]=(0.124778899794)*x[0]**o+(0.785367842145)*x[0]+(0.948111125908)*x[1]**o+(-0.887427847089)*x[1]
-        arg[1,4,0,0]=(0.0911816002883)*x[0]**o+(0.645410022441)*x[0]+(0.720551531965)*x[1]**o+(-0.388407683413)*x[1]
-        arg[1,4,0,1]=(-0.0416762613062)*x[0]**o+(-0.548874829834)*x[0]+(-0.377952555557)*x[1]**o+(0.742795234361)*x[1]
-        arg[1,4,1,0]=(-0.896929017971)*x[0]**o+(0.678343686516)*x[0]+(0.711572763082)*x[1]**o+(-0.43397331651)*x[1]
-        arg[1,4,1,1]=(-0.190804421566)*x[0]**o+(-0.0848405124789)*x[0]+(0.36246957905)*x[1]**o+(0.963599086227)*x[1]
-        arg[1,4,2,0]=(-0.0210248567982)*x[0]**o+(0.545977814581)*x[0]+(0.858962864401)*x[1]**o+(0.113792851997)*x[1]
-        arg[1,4,2,1]=(0.229641892622)*x[0]**o+(-0.739561617198)*x[0]+(-0.164372740617)*x[1]**o+(0.537097868843)*x[1]
-        arg[2,0,0,0]=(-0.13321389343)*x[0]**o+(-0.668403350503)*x[0]+(-0.924879105983)*x[1]**o+(-0.5161790717)*x[1]
-        arg[2,0,0,1]=(0.26582844685)*x[0]**o+(0.89048660684)*x[0]+(-0.377225981719)*x[1]**o+(-0.303790710194)*x[1]
-        arg[2,0,1,0]=(0.0997470860283)*x[0]**o+(0.0385427264217)*x[0]+(-0.71387347273)*x[1]**o+(-0.621376499192)*x[1]
-        arg[2,0,1,1]=(0.595544616326)*x[0]**o+(-0.850529503975)*x[0]+(0.602203957938)*x[1]**o+(-0.329484843907)*x[1]
-        arg[2,0,2,0]=(-0.106031967029)*x[0]**o+(-0.165122821622)*x[0]+(0.647473815919)*x[1]**o+(0.28942226062)*x[1]
-        arg[2,0,2,1]=(0.585955875472)*x[0]**o+(0.922667710403)*x[0]+(-0.0710905957841)*x[1]**o+(-0.669138163697)*x[1]
-        arg[2,1,0,0]=(0.461941211081)*x[0]**o+(0.723022466263)*x[0]+(-0.118551893472)*x[1]**o+(0.00445187353637)*x[1]
-        arg[2,1,0,1]=(-0.253168248108)*x[0]**o+(0.476938842605)*x[0]+(0.476641658034)*x[1]**o+(-0.916886387595)*x[1]
-        arg[2,1,1,0]=(0.722029309503)*x[0]**o+(0.0588848593425)*x[0]+(0.84737370043)*x[1]**o+(-0.674604415213)*x[1]
-        arg[2,1,1,1]=(-0.644736759298)*x[0]**o+(-0.212847303893)*x[0]+(0.25394587552)*x[1]**o+(-0.366955175081)*x[1]
-        arg[2,1,2,0]=(-0.657395296801)*x[0]**o+(-0.967570027599)*x[0]+(0.180926628541)*x[1]**o+(-0.940599897942)*x[1]
-        arg[2,1,2,1]=(0.849897328801)*x[0]**o+(-0.299199474051)*x[0]+(0.427221207827)*x[1]**o+(0.212027985441)*x[1]
-        arg[2,2,0,0]=(-0.561573507381)*x[0]**o+(-0.446925224908)*x[0]+(0.132091224948)*x[1]**o+(-0.673375661849)*x[1]
-        arg[2,2,0,1]=(-0.386657291574)*x[0]**o+(0.356784637112)*x[0]+(0.644292006233)*x[1]**o+(0.922937167842)*x[1]
-        arg[2,2,1,0]=(0.484446757285)*x[0]**o+(-0.822469870455)*x[0]+(-0.89605890123)*x[1]**o+(-0.895891500031)*x[1]
-        arg[2,2,1,1]=(-0.0930740520192)*x[0]**o+(0.953356473678)*x[0]+(-0.714418458806)*x[1]**o+(-0.100584950946)*x[1]
-        arg[2,2,2,0]=(0.945572242667)*x[0]**o+(-0.259280849605)*x[0]+(-0.925459846341)*x[1]**o+(0.906002758873)*x[1]
-        arg[2,2,2,1]=(-0.638993332975)*x[0]**o+(-0.668594641703)*x[0]+(0.012666231369)*x[1]**o+(0.89732685856)*x[1]
-        arg[2,3,0,0]=(-0.885061116144)*x[0]**o+(-0.576097536483)*x[0]+(-0.43166075788)*x[1]**o+(0.538821620917)*x[1]
-        arg[2,3,0,1]=(-0.0743638381797)*x[0]**o+(0.251037500035)*x[0]+(-0.905989928076)*x[1]**o+(0.243771000867)*x[1]
-        arg[2,3,1,0]=(-0.016045622351)*x[0]**o+(-0.632944072174)*x[0]+(-0.296175918793)*x[1]**o+(-0.00120123641365)*x[1]
-        arg[2,3,1,1]=(-0.896354921812)*x[0]**o+(-0.331348989027)*x[0]+(-0.450865285201)*x[1]**o+(-0.243268582009)*x[1]
-        arg[2,3,2,0]=(0.609332927431)*x[0]**o+(-0.0815856802115)*x[0]+(0.201924792273)*x[1]**o+(-0.890424451348)*x[1]
-        arg[2,3,2,1]=(0.395090137264)*x[0]**o+(0.294230442573)*x[0]+(-0.345371510364)*x[1]**o+(0.181229663241)*x[1]
-        arg[2,4,0,0]=(-0.823684509034)*x[0]**o+(0.431019301942)*x[0]+(0.554707015054)*x[1]**o+(-0.846322903003)*x[1]
-        arg[2,4,0,1]=(0.862984476658)*x[0]**o+(0.20512500102)*x[0]+(0.0247756159287)*x[1]**o+(-0.374795100946)*x[1]
-        arg[2,4,1,0]=(-0.0849914269517)*x[0]**o+(0.754908200339)*x[0]+(0.593363754807)*x[1]**o+(0.124923961126)*x[1]
-        arg[2,4,1,1]=(-0.691440264234)*x[0]**o+(0.825739298015)*x[0]+(0.426452231478)*x[1]**o+(0.0995610721341)*x[1]
-        arg[2,4,2,0]=(-0.175322750567)*x[0]**o+(0.419750865569)*x[0]+(0.208448987712)*x[1]**o+(0.150584798952)*x[1]
-        arg[2,4,2,1]=(0.931680152344)*x[0]**o+(0.390947206307)*x[0]+(0.388437348378)*x[1]**o+(-0.808413079032)*x[1]
-        arg[3,0,0,0]=(0.58855431402)*x[0]**o+(0.383865913364)*x[0]+(-0.691445323219)*x[1]**o+(-0.443370658523)*x[1]
-        arg[3,0,0,1]=(-0.657371481478)*x[0]**o+(0.746891082673)*x[0]+(-0.829229947773)*x[1]**o+(0.761915670404)*x[1]
-        arg[3,0,1,0]=(-0.431502932714)*x[0]**o+(-0.961472285716)*x[0]+(0.0423384388031)*x[1]**o+(0.339373458118)*x[1]
-        arg[3,0,1,1]=(-0.272831163259)*x[0]**o+(-0.533438904494)*x[0]+(-0.595625384875)*x[1]**o+(0.0366857022323)*x[1]
-        arg[3,0,2,0]=(-0.319684662306)*x[0]**o+(0.672185828912)*x[0]+(0.483126548994)*x[1]**o+(0.745872629604)*x[1]
-        arg[3,0,2,1]=(0.437895277404)*x[0]**o+(-0.337209416963)*x[0]+(0.101080522788)*x[1]**o+(0.892022488644)*x[1]
-        arg[3,1,0,0]=(-0.582325078455)*x[0]**o+(-0.854689347157)*x[0]+(0.0308638312259)*x[1]**o+(0.633382365704)*x[1]
-        arg[3,1,0,1]=(0.319735178376)*x[0]**o+(-0.782764593952)*x[0]+(0.082230132244)*x[1]**o+(-0.946010937852)*x[1]
-        arg[3,1,1,0]=(-0.698490410666)*x[0]**o+(-0.801358802689)*x[0]+(0.20695648235)*x[1]**o+(0.75257523471)*x[1]
-        arg[3,1,1,1]=(0.66321696527)*x[0]**o+(0.704572918868)*x[0]+(0.528208879002)*x[1]**o+(-0.408378325513)*x[1]
-        arg[3,1,2,0]=(-0.925177198417)*x[0]**o+(-0.152427811549)*x[0]+(0.341781993583)*x[1]**o+(-0.589976456377)*x[1]
-        arg[3,1,2,1]=(0.206706628353)*x[0]**o+(0.673777173329)*x[0]+(-0.994138314254)*x[1]**o+(-0.843696565863)*x[1]
-        arg[3,2,0,0]=(-0.588881067333)*x[0]**o+(-0.537572388341)*x[0]+(-0.206570371675)*x[1]**o+(-0.127468554294)*x[1]
-        arg[3,2,0,1]=(0.498638284096)*x[0]**o+(-0.488278831086)*x[0]+(-0.28320874594)*x[1]**o+(-0.638241576615)*x[1]
-        arg[3,2,1,0]=(-0.445780790822)*x[0]**o+(-0.347493953089)*x[0]+(-0.558010086232)*x[1]**o+(-0.0287339307689)*x[1]
-        arg[3,2,1,1]=(-0.361727811272)*x[0]**o+(-0.559565378007)*x[0]+(-0.211685558972)*x[1]**o+(0.330088396811)*x[1]
-        arg[3,2,2,0]=(-0.42600117831)*x[0]**o+(-0.488997111988)*x[0]+(0.127421278051)*x[1]**o+(-0.48233167806)*x[1]
-        arg[3,2,2,1]=(0.120468829686)*x[0]**o+(0.0675603906118)*x[0]+(-0.60674361864)*x[1]**o+(0.639115708258)*x[1]
-        arg[3,3,0,0]=(0.369343033015)*x[0]**o+(0.707735743593)*x[0]+(-0.426275591836)*x[1]**o+(-0.733377765625)*x[1]
-        arg[3,3,0,1]=(-0.931245338156)*x[0]**o+(-0.465861794185)*x[0]+(-0.650664500687)*x[1]**o+(0.103077662402)*x[1]
-        arg[3,3,1,0]=(0.731834744512)*x[0]**o+(0.267840571071)*x[0]+(0.952106457495)*x[1]**o+(-0.943845364366)*x[1]
-        arg[3,3,1,1]=(-0.21692720916)*x[0]**o+(0.580841374997)*x[0]+(-0.412129341223)*x[1]**o+(0.40414445304)*x[1]
-        arg[3,3,2,0]=(-0.447758598726)*x[0]**o+(0.0616926352912)*x[0]+(-0.824624226122)*x[1]**o+(0.19099833104)*x[1]
-        arg[3,3,2,1]=(-0.615519138165)*x[0]**o+(0.233926822164)*x[0]+(-0.969014060236)*x[1]**o+(0.835103627893)*x[1]
-        arg[3,4,0,0]=(0.550778983301)*x[0]**o+(0.0198253530882)*x[0]+(-0.39383849187)*x[1]**o+(0.367721826304)*x[1]
-        arg[3,4,0,1]=(0.444877923149)*x[0]**o+(-0.899159835223)*x[0]+(0.923392540452)*x[1]**o+(0.512905141718)*x[1]
-        arg[3,4,1,0]=(-0.563807675145)*x[0]**o+(0.994405383899)*x[0]+(-0.777352948218)*x[1]**o+(0.865994906227)*x[1]
-        arg[3,4,1,1]=(-0.593800452139)*x[0]**o+(0.613778803237)*x[0]+(0.582200979718)*x[1]**o+(0.448026243271)*x[1]
-        arg[3,4,2,0]=(-0.900331125416)*x[0]**o+(0.234613965424)*x[0]+(0.510400273805)*x[1]**o+(0.0836773641661)*x[1]
-        arg[3,4,2,1]=(0.710999097307)*x[0]**o+(0.886603988265)*x[0]+(-0.405644887679)*x[1]**o+(0.362257258809)*x[1]
-        ref[0,0,0,0]=(-0.0338299192888)*x_ref[0]**o+(-0.114906274359)*x_ref[0]+(0.15010339398)*x_ref[1]**o+(0.625295991328)*x_ref[1]
-        ref[0,0,0,1]=(-0.1311901039)*x_ref[0]**o+(-0.551712861217)*x_ref[0]+(-0.287411404506)*x_ref[1]**o+(0.0242820629572)*x_ref[1]
-        ref[0,0,1,0]=(0.121962094111)*x_ref[0]**o+(0.203169622345)*x_ref[0]+(0.241504218053)*x_ref[1]**o+(-0.0696356239498)*x_ref[1]
-        ref[0,0,1,1]=(0.0461537352329)*x_ref[0]**o+(-0.275908938567)*x_ref[0]+(-0.271184121027)*x_ref[1]**o+(-0.364024729567)*x_ref[1]
-        ref[0,0,2,0]=(0.199272234315)*x_ref[0]**o+(-0.906364258855)*x_ref[0]+(-0.92102930037)*x_ref[1]**o+(0.0718981903454)*x_ref[1]
-        ref[0,0,2,1]=(-0.742950958383)*x_ref[0]**o+(0.0301464847722)*x_ref[0]+(0.466993477687)*x_ref[1]**o+(-0.402131750698)*x_ref[1]
-        ref[0,1,0,0]=(-0.0653776546375)*x_ref[0]**o+(-0.679360612372)*x_ref[0]+(-0.32783837768)*x_ref[1]**o+(-0.113753016428)*x_ref[1]
-        ref[0,1,0,1]=(0.58610119414)*x_ref[0]**o+(0.142613166231)*x_ref[0]+(0.0409105619986)*x_ref[1]**o+(-0.660641663558)*x_ref[1]
-        ref[0,1,1,0]=(0.212172308585)*x_ref[0]**o+(-0.452767768344)*x_ref[0]+(0.963053969889)*x_ref[1]**o+(0.752691773953)*x_ref[1]
-        ref[0,1,1,1]=(-0.514998377887)*x_ref[0]**o+(0.0872464329801)*x_ref[0]+(0.265590295505)*x_ref[1]**o+(0.557238826549)*x_ref[1]
-        ref[0,1,2,0]=(0.360523954724)*x_ref[0]**o+(0.550238402994)*x_ref[0]+(-0.206349415539)*x_ref[1]**o+(0.357304730511)*x_ref[1]
-        ref[0,1,2,1]=(-0.872755217435)*x_ref[0]**o+(0.190943683664)*x_ref[0]+(-0.245454292354)*x_ref[1]**o+(0.507229578506)*x_ref[1]
-        ref[0,2,0,0]=(0.994619505257)*x_ref[0]**o+(0.33482820568)*x_ref[0]+(-0.12721791236)*x_ref[1]**o+(-0.505873171195)*x_ref[1]
-        ref[0,2,0,1]=(0.224805131522)*x_ref[0]**o+(0.332022434603)*x_ref[0]+(0.0583494507268)*x_ref[1]**o+(0.857185410994)*x_ref[1]
-        ref[0,2,1,0]=(-0.425367077516)*x_ref[0]**o+(-0.25207101061)*x_ref[0]+(-0.11164491753)*x_ref[1]**o+(0.44752084285)*x_ref[1]
-        ref[0,2,1,1]=(-0.158725210751)*x_ref[0]**o+(-0.0692363138932)*x_ref[0]+(0.214803128256)*x_ref[1]**o+(0.886699106748)*x_ref[1]
-        ref[0,2,2,0]=(-0.332146331257)*x_ref[0]**o+(0.114845050128)*x_ref[0]+(-0.0781411611124)*x_ref[1]**o+(0.474972057387)*x_ref[1]
-        ref[0,2,2,1]=(-0.481949630694)*x_ref[0]**o+(0.644984972151)*x_ref[0]+(0.171146519527)*x_ref[1]**o+(0.57534803966)*x_ref[1]
-        ref[0,3,0,0]=(0.7580633024)*x_ref[0]**o+(0.0280511776577)*x_ref[0]+(0.375583652078)*x_ref[1]**o+(-0.809112787284)*x_ref[1]
-        ref[0,3,0,1]=(-0.466737159934)*x_ref[0]**o+(0.410032775686)*x_ref[0]+(0.176141189584)*x_ref[1]**o+(-0.228288309456)*x_ref[1]
-        ref[0,3,1,0]=(0.427129582196)*x_ref[0]**o+(-0.718385859483)*x_ref[0]+(-0.172261212989)*x_ref[1]**o+(0.913157476188)*x_ref[1]
-        ref[0,3,1,1]=(0.952506706487)*x_ref[0]**o+(-0.497478163899)*x_ref[0]+(-0.930273038716)*x_ref[1]**o+(0.673573149025)*x_ref[1]
-        ref[0,3,2,0]=(-0.0074302930747)*x_ref[0]**o+(0.226424842035)*x_ref[0]+(0.871190620671)*x_ref[1]**o+(0.277695333679)*x_ref[1]
-        ref[0,3,2,1]=(-0.540820239946)*x_ref[0]**o+(0.33044763211)*x_ref[0]+(-0.772648820924)*x_ref[1]**o+(-0.362410088021)*x_ref[1]
-        ref[0,4,0,0]=(-0.748396039111)*x_ref[0]**o+(0.215131518212)*x_ref[0]+(0.514087824403)*x_ref[1]**o+(0.335563854205)*x_ref[1]
-        ref[0,4,0,1]=(-0.443263590391)*x_ref[0]**o+(-0.523167282542)*x_ref[0]+(0.122612452799)*x_ref[1]**o+(0.216527857615)*x_ref[1]
-        ref[0,4,1,0]=(0.448176296777)*x_ref[0]**o+(0.478292146131)*x_ref[0]+(-0.558921083502)*x_ref[1]**o+(-0.17018258654)*x_ref[1]
-        ref[0,4,1,1]=(-0.912765673953)*x_ref[0]**o+(0.751746623223)*x_ref[0]+(-0.104811579057)*x_ref[1]**o+(0.456436870323)*x_ref[1]
-        ref[0,4,2,0]=(0.157946450932)*x_ref[0]**o+(0.147858587857)*x_ref[0]+(0.775747362874)*x_ref[1]**o+(0.478478862463)*x_ref[1]
-        ref[0,4,2,1]=(-0.819625058185)*x_ref[0]**o+(-0.0231980393919)*x_ref[0]+(-0.186647585522)*x_ref[1]**o+(0.513350371371)*x_ref[1]
-        ref[1,0,0,0]=(-0.942373946995)*x_ref[0]**o+(-0.761326160931)*x_ref[0]+(0.192511867167)*x_ref[1]**o+(-0.50895969579)*x_ref[1]
-        ref[1,0,0,1]=(0.0670813349951)*x_ref[0]**o+(0.55602953512)*x_ref[0]+(0.757621178635)*x_ref[1]**o+(0.741550201759)*x_ref[1]
-        ref[1,0,1,0]=(-0.114642609493)*x_ref[0]**o+(-0.639500048447)*x_ref[0]+(-0.861813039243)*x_ref[1]**o+(0.36413406744)*x_ref[1]
-        ref[1,0,1,1]=(0.126555451594)*x_ref[0]**o+(-0.885172557082)*x_ref[0]+(-0.376073252921)*x_ref[1]**o+(0.166102850653)*x_ref[1]
-        ref[1,0,2,0]=(-0.381517068219)*x_ref[0]**o+(0.94870328267)*x_ref[0]+(-0.129934777755)*x_ref[1]**o+(0.78090715758)*x_ref[1]
-        ref[1,0,2,1]=(-0.535852302247)*x_ref[0]**o+(0.63751039318)*x_ref[0]+(-0.537556159925)*x_ref[1]**o+(0.147766714221)*x_ref[1]
-        ref[1,1,0,0]=(-0.605543047533)*x_ref[0]**o+(-0.366612785372)*x_ref[0]+(0.544900149212)*x_ref[1]**o+(0.722108900447)*x_ref[1]
-        ref[1,1,0,1]=(0.133378561142)*x_ref[0]**o+(-0.227808772494)*x_ref[0]+(-0.729399624175)*x_ref[1]**o+(0.307571743455)*x_ref[1]
-        ref[1,1,1,0]=(0.0458830538139)*x_ref[0]**o+(0.0585044493026)*x_ref[0]+(-0.136630547605)*x_ref[1]**o+(-0.0823288389309)*x_ref[1]
-        ref[1,1,1,1]=(0.339263808784)*x_ref[0]**o+(0.00988917109076)*x_ref[0]+(-0.786591838083)*x_ref[1]**o+(-0.361686799179)*x_ref[1]
-        ref[1,1,2,0]=(0.789942037592)*x_ref[0]**o+(-0.266689758676)*x_ref[0]+(0.464856327495)*x_ref[1]**o+(0.138022774293)*x_ref[1]
-        ref[1,1,2,1]=(-0.723544867217)*x_ref[0]**o+(-0.523023674205)*x_ref[0]+(0.629726026331)*x_ref[1]**o+(-0.867808120997)*x_ref[1]
-        ref[1,2,0,0]=(-0.495589518787)*x_ref[0]**o+(-0.561664880262)*x_ref[0]+(0.0319320417078)*x_ref[1]**o+(-0.153720661498)*x_ref[1]
-        ref[1,2,0,1]=(0.293168114024)*x_ref[0]**o+(-0.344107163981)*x_ref[0]+(-0.275629670068)*x_ref[1]**o+(0.06103653487)*x_ref[1]
-        ref[1,2,1,0]=(0.495640927339)*x_ref[0]**o+(0.596540095043)*x_ref[0]+(0.208792567756)*x_ref[1]**o+(0.886040724145)*x_ref[1]
-        ref[1,2,1,1]=(0.331476398093)*x_ref[0]**o+(-0.472588572455)*x_ref[0]+(-0.455670457285)*x_ref[1]**o+(-0.731223615642)*x_ref[1]
-        ref[1,2,2,0]=(-0.127107829674)*x_ref[0]**o+(-0.21113128456)*x_ref[0]+(-0.733928194168)*x_ref[1]**o+(-0.174127696853)*x_ref[1]
-        ref[1,2,2,1]=(0.521879316151)*x_ref[0]**o+(0.983424557865)*x_ref[0]+(-0.288659660182)*x_ref[1]**o+(-0.431045203113)*x_ref[1]
-        ref[1,3,0,0]=(0.292348765746)*x_ref[0]**o+(0.0730741240915)*x_ref[0]+(0.079624022683)*x_ref[1]**o+(0.237483071633)*x_ref[1]
-        ref[1,3,0,1]=(0.291035771848)*x_ref[0]**o+(-0.482909477855)*x_ref[0]+(-0.999142129615)*x_ref[1]**o+(-0.559723367197)*x_ref[1]
-        ref[1,3,1,0]=(0.747096275653)*x_ref[0]**o+(0.762757649624)*x_ref[0]+(-0.821650889507)*x_ref[1]**o+(0.301128670189)*x_ref[1]
-        ref[1,3,1,1]=(0.82703681414)*x_ref[0]**o+(-0.336570070436)*x_ref[0]+(0.798131952979)*x_ref[1]**o+(0.603562737956)*x_ref[1]
-        ref[1,3,2,0]=(-0.164875914126)*x_ref[0]**o+(0.219409873902)*x_ref[0]+(0.784253160678)*x_ref[1]**o+(0.0219597460707)*x_ref[1]
-        ref[1,3,2,1]=(0.124778899794)*x_ref[0]**o+(0.785367842145)*x_ref[0]+(0.948111125908)*x_ref[1]**o+(-0.887427847089)*x_ref[1]
-        ref[1,4,0,0]=(0.0911816002883)*x_ref[0]**o+(0.645410022441)*x_ref[0]+(0.720551531965)*x_ref[1]**o+(-0.388407683413)*x_ref[1]
-        ref[1,4,0,1]=(-0.0416762613062)*x_ref[0]**o+(-0.548874829834)*x_ref[0]+(-0.377952555557)*x_ref[1]**o+(0.742795234361)*x_ref[1]
-        ref[1,4,1,0]=(-0.896929017971)*x_ref[0]**o+(0.678343686516)*x_ref[0]+(0.711572763082)*x_ref[1]**o+(-0.43397331651)*x_ref[1]
-        ref[1,4,1,1]=(-0.190804421566)*x_ref[0]**o+(-0.0848405124789)*x_ref[0]+(0.36246957905)*x_ref[1]**o+(0.963599086227)*x_ref[1]
-        ref[1,4,2,0]=(-0.0210248567982)*x_ref[0]**o+(0.545977814581)*x_ref[0]+(0.858962864401)*x_ref[1]**o+(0.113792851997)*x_ref[1]
-        ref[1,4,2,1]=(0.229641892622)*x_ref[0]**o+(-0.739561617198)*x_ref[0]+(-0.164372740617)*x_ref[1]**o+(0.537097868843)*x_ref[1]
-        ref[2,0,0,0]=(-0.13321389343)*x_ref[0]**o+(-0.668403350503)*x_ref[0]+(-0.924879105983)*x_ref[1]**o+(-0.5161790717)*x_ref[1]
-        ref[2,0,0,1]=(0.26582844685)*x_ref[0]**o+(0.89048660684)*x_ref[0]+(-0.377225981719)*x_ref[1]**o+(-0.303790710194)*x_ref[1]
-        ref[2,0,1,0]=(0.0997470860283)*x_ref[0]**o+(0.0385427264217)*x_ref[0]+(-0.71387347273)*x_ref[1]**o+(-0.621376499192)*x_ref[1]
-        ref[2,0,1,1]=(0.595544616326)*x_ref[0]**o+(-0.850529503975)*x_ref[0]+(0.602203957938)*x_ref[1]**o+(-0.329484843907)*x_ref[1]
-        ref[2,0,2,0]=(-0.106031967029)*x_ref[0]**o+(-0.165122821622)*x_ref[0]+(0.647473815919)*x_ref[1]**o+(0.28942226062)*x_ref[1]
-        ref[2,0,2,1]=(0.585955875472)*x_ref[0]**o+(0.922667710403)*x_ref[0]+(-0.0710905957841)*x_ref[1]**o+(-0.669138163697)*x_ref[1]
-        ref[2,1,0,0]=(0.461941211081)*x_ref[0]**o+(0.723022466263)*x_ref[0]+(-0.118551893472)*x_ref[1]**o+(0.00445187353637)*x_ref[1]
-        ref[2,1,0,1]=(-0.253168248108)*x_ref[0]**o+(0.476938842605)*x_ref[0]+(0.476641658034)*x_ref[1]**o+(-0.916886387595)*x_ref[1]
-        ref[2,1,1,0]=(0.722029309503)*x_ref[0]**o+(0.0588848593425)*x_ref[0]+(0.84737370043)*x_ref[1]**o+(-0.674604415213)*x_ref[1]
-        ref[2,1,1,1]=(-0.644736759298)*x_ref[0]**o+(-0.212847303893)*x_ref[0]+(0.25394587552)*x_ref[1]**o+(-0.366955175081)*x_ref[1]
-        ref[2,1,2,0]=(-0.657395296801)*x_ref[0]**o+(-0.967570027599)*x_ref[0]+(0.180926628541)*x_ref[1]**o+(-0.940599897942)*x_ref[1]
-        ref[2,1,2,1]=(0.849897328801)*x_ref[0]**o+(-0.299199474051)*x_ref[0]+(0.427221207827)*x_ref[1]**o+(0.212027985441)*x_ref[1]
-        ref[2,2,0,0]=(-0.561573507381)*x_ref[0]**o+(-0.446925224908)*x_ref[0]+(0.132091224948)*x_ref[1]**o+(-0.673375661849)*x_ref[1]
-        ref[2,2,0,1]=(-0.386657291574)*x_ref[0]**o+(0.356784637112)*x_ref[0]+(0.644292006233)*x_ref[1]**o+(0.922937167842)*x_ref[1]
-        ref[2,2,1,0]=(0.484446757285)*x_ref[0]**o+(-0.822469870455)*x_ref[0]+(-0.89605890123)*x_ref[1]**o+(-0.895891500031)*x_ref[1]
-        ref[2,2,1,1]=(-0.0930740520192)*x_ref[0]**o+(0.953356473678)*x_ref[0]+(-0.714418458806)*x_ref[1]**o+(-0.100584950946)*x_ref[1]
-        ref[2,2,2,0]=(0.945572242667)*x_ref[0]**o+(-0.259280849605)*x_ref[0]+(-0.925459846341)*x_ref[1]**o+(0.906002758873)*x_ref[1]
-        ref[2,2,2,1]=(-0.638993332975)*x_ref[0]**o+(-0.668594641703)*x_ref[0]+(0.012666231369)*x_ref[1]**o+(0.89732685856)*x_ref[1]
-        ref[2,3,0,0]=(-0.885061116144)*x_ref[0]**o+(-0.576097536483)*x_ref[0]+(-0.43166075788)*x_ref[1]**o+(0.538821620917)*x_ref[1]
-        ref[2,3,0,1]=(-0.0743638381797)*x_ref[0]**o+(0.251037500035)*x_ref[0]+(-0.905989928076)*x_ref[1]**o+(0.243771000867)*x_ref[1]
-        ref[2,3,1,0]=(-0.016045622351)*x_ref[0]**o+(-0.632944072174)*x_ref[0]+(-0.296175918793)*x_ref[1]**o+(-0.00120123641365)*x_ref[1]
-        ref[2,3,1,1]=(-0.896354921812)*x_ref[0]**o+(-0.331348989027)*x_ref[0]+(-0.450865285201)*x_ref[1]**o+(-0.243268582009)*x_ref[1]
-        ref[2,3,2,0]=(0.609332927431)*x_ref[0]**o+(-0.0815856802115)*x_ref[0]+(0.201924792273)*x_ref[1]**o+(-0.890424451348)*x_ref[1]
-        ref[2,3,2,1]=(0.395090137264)*x_ref[0]**o+(0.294230442573)*x_ref[0]+(-0.345371510364)*x_ref[1]**o+(0.181229663241)*x_ref[1]
-        ref[2,4,0,0]=(-0.823684509034)*x_ref[0]**o+(0.431019301942)*x_ref[0]+(0.554707015054)*x_ref[1]**o+(-0.846322903003)*x_ref[1]
-        ref[2,4,0,1]=(0.862984476658)*x_ref[0]**o+(0.20512500102)*x_ref[0]+(0.0247756159287)*x_ref[1]**o+(-0.374795100946)*x_ref[1]
-        ref[2,4,1,0]=(-0.0849914269517)*x_ref[0]**o+(0.754908200339)*x_ref[0]+(0.593363754807)*x_ref[1]**o+(0.124923961126)*x_ref[1]
-        ref[2,4,1,1]=(-0.691440264234)*x_ref[0]**o+(0.825739298015)*x_ref[0]+(0.426452231478)*x_ref[1]**o+(0.0995610721341)*x_ref[1]
-        ref[2,4,2,0]=(-0.175322750567)*x_ref[0]**o+(0.419750865569)*x_ref[0]+(0.208448987712)*x_ref[1]**o+(0.150584798952)*x_ref[1]
-        ref[2,4,2,1]=(0.931680152344)*x_ref[0]**o+(0.390947206307)*x_ref[0]+(0.388437348378)*x_ref[1]**o+(-0.808413079032)*x_ref[1]
-        ref[3,0,0,0]=(0.58855431402)*x_ref[0]**o+(0.383865913364)*x_ref[0]+(-0.691445323219)*x_ref[1]**o+(-0.443370658523)*x_ref[1]
-        ref[3,0,0,1]=(-0.657371481478)*x_ref[0]**o+(0.746891082673)*x_ref[0]+(-0.829229947773)*x_ref[1]**o+(0.761915670404)*x_ref[1]
-        ref[3,0,1,0]=(-0.431502932714)*x_ref[0]**o+(-0.961472285716)*x_ref[0]+(0.0423384388031)*x_ref[1]**o+(0.339373458118)*x_ref[1]
-        ref[3,0,1,1]=(-0.272831163259)*x_ref[0]**o+(-0.533438904494)*x_ref[0]+(-0.595625384875)*x_ref[1]**o+(0.0366857022323)*x_ref[1]
-        ref[3,0,2,0]=(-0.319684662306)*x_ref[0]**o+(0.672185828912)*x_ref[0]+(0.483126548994)*x_ref[1]**o+(0.745872629604)*x_ref[1]
-        ref[3,0,2,1]=(0.437895277404)*x_ref[0]**o+(-0.337209416963)*x_ref[0]+(0.101080522788)*x_ref[1]**o+(0.892022488644)*x_ref[1]
-        ref[3,1,0,0]=(-0.582325078455)*x_ref[0]**o+(-0.854689347157)*x_ref[0]+(0.0308638312259)*x_ref[1]**o+(0.633382365704)*x_ref[1]
-        ref[3,1,0,1]=(0.319735178376)*x_ref[0]**o+(-0.782764593952)*x_ref[0]+(0.082230132244)*x_ref[1]**o+(-0.946010937852)*x_ref[1]
-        ref[3,1,1,0]=(-0.698490410666)*x_ref[0]**o+(-0.801358802689)*x_ref[0]+(0.20695648235)*x_ref[1]**o+(0.75257523471)*x_ref[1]
-        ref[3,1,1,1]=(0.66321696527)*x_ref[0]**o+(0.704572918868)*x_ref[0]+(0.528208879002)*x_ref[1]**o+(-0.408378325513)*x_ref[1]
-        ref[3,1,2,0]=(-0.925177198417)*x_ref[0]**o+(-0.152427811549)*x_ref[0]+(0.341781993583)*x_ref[1]**o+(-0.589976456377)*x_ref[1]
-        ref[3,1,2,1]=(0.206706628353)*x_ref[0]**o+(0.673777173329)*x_ref[0]+(-0.994138314254)*x_ref[1]**o+(-0.843696565863)*x_ref[1]
-        ref[3,2,0,0]=(-0.588881067333)*x_ref[0]**o+(-0.537572388341)*x_ref[0]+(-0.206570371675)*x_ref[1]**o+(-0.127468554294)*x_ref[1]
-        ref[3,2,0,1]=(0.498638284096)*x_ref[0]**o+(-0.488278831086)*x_ref[0]+(-0.28320874594)*x_ref[1]**o+(-0.638241576615)*x_ref[1]
-        ref[3,2,1,0]=(-0.445780790822)*x_ref[0]**o+(-0.347493953089)*x_ref[0]+(-0.558010086232)*x_ref[1]**o+(-0.0287339307689)*x_ref[1]
-        ref[3,2,1,1]=(-0.361727811272)*x_ref[0]**o+(-0.559565378007)*x_ref[0]+(-0.211685558972)*x_ref[1]**o+(0.330088396811)*x_ref[1]
-        ref[3,2,2,0]=(-0.42600117831)*x_ref[0]**o+(-0.488997111988)*x_ref[0]+(0.127421278051)*x_ref[1]**o+(-0.48233167806)*x_ref[1]
-        ref[3,2,2,1]=(0.120468829686)*x_ref[0]**o+(0.0675603906118)*x_ref[0]+(-0.60674361864)*x_ref[1]**o+(0.639115708258)*x_ref[1]
-        ref[3,3,0,0]=(0.369343033015)*x_ref[0]**o+(0.707735743593)*x_ref[0]+(-0.426275591836)*x_ref[1]**o+(-0.733377765625)*x_ref[1]
-        ref[3,3,0,1]=(-0.931245338156)*x_ref[0]**o+(-0.465861794185)*x_ref[0]+(-0.650664500687)*x_ref[1]**o+(0.103077662402)*x_ref[1]
-        ref[3,3,1,0]=(0.731834744512)*x_ref[0]**o+(0.267840571071)*x_ref[0]+(0.952106457495)*x_ref[1]**o+(-0.943845364366)*x_ref[1]
-        ref[3,3,1,1]=(-0.21692720916)*x_ref[0]**o+(0.580841374997)*x_ref[0]+(-0.412129341223)*x_ref[1]**o+(0.40414445304)*x_ref[1]
-        ref[3,3,2,0]=(-0.447758598726)*x_ref[0]**o+(0.0616926352912)*x_ref[0]+(-0.824624226122)*x_ref[1]**o+(0.19099833104)*x_ref[1]
-        ref[3,3,2,1]=(-0.615519138165)*x_ref[0]**o+(0.233926822164)*x_ref[0]+(-0.969014060236)*x_ref[1]**o+(0.835103627893)*x_ref[1]
-        ref[3,4,0,0]=(0.550778983301)*x_ref[0]**o+(0.0198253530882)*x_ref[0]+(-0.39383849187)*x_ref[1]**o+(0.367721826304)*x_ref[1]
-        ref[3,4,0,1]=(0.444877923149)*x_ref[0]**o+(-0.899159835223)*x_ref[0]+(0.923392540452)*x_ref[1]**o+(0.512905141718)*x_ref[1]
-        ref[3,4,1,0]=(-0.563807675145)*x_ref[0]**o+(0.994405383899)*x_ref[0]+(-0.777352948218)*x_ref[1]**o+(0.865994906227)*x_ref[1]
-        ref[3,4,1,1]=(-0.593800452139)*x_ref[0]**o+(0.613778803237)*x_ref[0]+(0.582200979718)*x_ref[1]**o+(0.448026243271)*x_ref[1]
-        ref[3,4,2,0]=(-0.900331125416)*x_ref[0]**o+(0.234613965424)*x_ref[0]+(0.510400273805)*x_ref[1]**o+(0.0836773641661)*x_ref[1]
-        ref[3,4,2,1]=(0.710999097307)*x_ref[0]**o+(0.886603988265)*x_ref[0]+(-0.405644887679)*x_ref[1]**o+(0.362257258809)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.310272924207)*x[0]**o+(-0.664497806351)*x[0]+(0.741942132609)*x[1]**o+(0.636051298779)*x[1]+(0.76627159146)*x[2]**o+(0.492960732588)*x[2]
-        arg[0,0,0,1]=(-0.513740801773)*x[0]**o+(-0.633330750909)*x[0]+(0.177934618983)*x[1]**o+(-0.323745723166)*x[1]+(0.694167180904)*x[2]**o+(0.441239251435)*x[2]
-        arg[0,0,1,0]=(0.417477695848)*x[0]**o+(-0.923415976002)*x[0]+(0.0765555276662)*x[1]**o+(-0.277290890834)*x[1]+(0.0177191326614)*x[2]**o+(-0.0842520100387)*x[2]
-        arg[0,0,1,1]=(-0.761916249894)*x[0]**o+(0.169673139552)*x[0]+(0.0306290828795)*x[1]**o+(0.842234592613)*x[1]+(-0.350342692669)*x[2]**o+(0.321292270658)*x[2]
-        arg[0,0,2,0]=(-0.707494137624)*x[0]**o+(0.346873490395)*x[0]+(-0.68281925138)*x[1]**o+(-0.830538083274)*x[1]+(0.329372141613)*x[2]**o+(-0.121366157163)*x[2]
-        arg[0,0,2,1]=(-0.708018186507)*x[0]**o+(-0.778051239314)*x[0]+(-0.43106291563)*x[1]**o+(-0.0115914251143)*x[1]+(0.487334215892)*x[2]**o+(-0.289232284658)*x[2]
-        arg[0,1,0,0]=(0.530614704199)*x[0]**o+(0.518622028317)*x[0]+(-0.0143129589551)*x[1]**o+(0.808469352257)*x[1]+(-0.156787373225)*x[2]**o+(0.668887813143)*x[2]
-        arg[0,1,0,1]=(0.953223233706)*x[0]**o+(-0.164323838353)*x[0]+(0.336717320858)*x[1]**o+(-0.520230488172)*x[1]+(0.689960738002)*x[2]**o+(0.487630947578)*x[2]
-        arg[0,1,1,0]=(-0.418095373429)*x[0]**o+(-0.941817844939)*x[0]+(0.88105115607)*x[1]**o+(-0.820502501439)*x[1]+(-0.693858267667)*x[2]**o+(0.530567713127)*x[2]
-        arg[0,1,1,1]=(-0.716861320218)*x[0]**o+(-0.736619859467)*x[0]+(-0.885478605601)*x[1]**o+(-0.129375578967)*x[1]+(-0.0181433907318)*x[2]**o+(0.373255537959)*x[2]
-        arg[0,1,2,0]=(-0.174742583167)*x[0]**o+(-0.0887967480112)*x[0]+(-0.291168698662)*x[1]**o+(-0.188608506769)*x[1]+(0.22479613454)*x[2]**o+(0.34173928582)*x[2]
-        arg[0,1,2,1]=(0.117208929504)*x[0]**o+(-0.420969282079)*x[0]+(0.585298109836)*x[1]**o+(0.771355162745)*x[1]+(-0.51374493747)*x[2]**o+(0.785016548855)*x[2]
-        arg[0,2,0,0]=(0.737394887886)*x[0]**o+(0.966080271342)*x[0]+(-0.373178384492)*x[1]**o+(-0.845505386142)*x[1]+(-0.274654519371)*x[2]**o+(0.709356557887)*x[2]
-        arg[0,2,0,1]=(0.0365864090636)*x[0]**o+(-0.393382479787)*x[0]+(0.018273360977)*x[1]**o+(-0.509201909328)*x[1]+(-0.777852392534)*x[2]**o+(0.0417280247507)*x[2]
-        arg[0,2,1,0]=(0.637829302751)*x[0]**o+(-0.767824790186)*x[0]+(0.843382009511)*x[1]**o+(-0.599633234403)*x[1]+(0.14283138941)*x[2]**o+(-0.354404633991)*x[2]
-        arg[0,2,1,1]=(-0.465258613599)*x[0]**o+(0.09341154383)*x[0]+(-0.629114782988)*x[1]**o+(0.91608655383)*x[1]+(-0.692901135848)*x[2]**o+(-0.707225310667)*x[2]
-        arg[0,2,2,0]=(0.9935958759)*x[0]**o+(-0.385008742466)*x[0]+(0.153885356854)*x[1]**o+(0.146270680656)*x[1]+(0.305838410343)*x[2]**o+(0.141193552717)*x[2]
-        arg[0,2,2,1]=(-0.487538023894)*x[0]**o+(-0.814283442647)*x[0]+(0.166008520199)*x[1]**o+(0.313655774416)*x[1]+(0.282308782973)*x[2]**o+(0.309176062484)*x[2]
-        arg[0,3,0,0]=(0.00203507798913)*x[0]**o+(-0.19902542604)*x[0]+(0.88110918624)*x[1]**o+(0.223549219288)*x[1]+(0.135758952369)*x[2]**o+(0.59116783639)*x[2]
-        arg[0,3,0,1]=(-0.185063700767)*x[0]**o+(0.833862155173)*x[0]+(-0.0939117509645)*x[1]**o+(0.288003692231)*x[1]+(0.580196157839)*x[2]**o+(0.299320177754)*x[2]
-        arg[0,3,1,0]=(-0.039100718826)*x[0]**o+(0.423179869395)*x[0]+(-0.013669578975)*x[1]**o+(-0.355053343085)*x[1]+(0.89285158975)*x[2]**o+(0.392984367877)*x[2]
-        arg[0,3,1,1]=(0.0988989416429)*x[0]**o+(-0.446243235174)*x[0]+(-0.691253313617)*x[1]**o+(0.338823693086)*x[1]+(0.707054126334)*x[2]**o+(0.601121388278)*x[2]
-        arg[0,3,2,0]=(-0.191366770484)*x[0]**o+(0.961791275903)*x[0]+(-0.103547475035)*x[1]**o+(-0.745236510079)*x[1]+(-0.157506981712)*x[2]**o+(0.986229506787)*x[2]
-        arg[0,3,2,1]=(-0.886091883647)*x[0]**o+(0.6979804248)*x[0]+(-0.366575419428)*x[1]**o+(-0.958601153259)*x[1]+(-0.0119724511494)*x[2]**o+(-0.76101132076)*x[2]
-        arg[0,4,0,0]=(0.923290554434)*x[0]**o+(0.411359492198)*x[0]+(-0.977999562875)*x[1]**o+(0.352085161527)*x[1]+(0.955745235349)*x[2]**o+(-0.978885609257)*x[2]
-        arg[0,4,0,1]=(0.226973479105)*x[0]**o+(-0.423881897251)*x[0]+(0.889101969481)*x[1]**o+(-0.994236389028)*x[1]+(0.0159169033361)*x[2]**o+(-0.559935154203)*x[2]
-        arg[0,4,1,0]=(-0.225427291797)*x[0]**o+(-0.557334621848)*x[0]+(-0.486252586142)*x[1]**o+(0.0497120905216)*x[1]+(0.84165736691)*x[2]**o+(-0.185010156797)*x[2]
-        arg[0,4,1,1]=(0.762694602609)*x[0]**o+(-0.447367170727)*x[0]+(-0.61103181818)*x[1]**o+(0.689761057656)*x[1]+(-0.631855120122)*x[2]**o+(0.33274655602)*x[2]
-        arg[0,4,2,0]=(-0.198884868914)*x[0]**o+(0.716371959278)*x[0]+(0.260871768919)*x[1]**o+(0.622241740082)*x[1]+(0.774103524035)*x[2]**o+(0.186132703676)*x[2]
-        arg[0,4,2,1]=(-0.309450645317)*x[0]**o+(0.204754571336)*x[0]+(0.483402810171)*x[1]**o+(0.404620744188)*x[1]+(-0.699137246959)*x[2]**o+(0.467428706196)*x[2]
-        arg[1,0,0,0]=(0.642289506448)*x[0]**o+(0.383990304394)*x[0]+(0.556940973318)*x[1]**o+(0.135219729041)*x[1]+(0.577195836358)*x[2]**o+(-0.338924419674)*x[2]
-        arg[1,0,0,1]=(-0.920873911295)*x[0]**o+(-0.330610192304)*x[0]+(-0.117226803856)*x[1]**o+(0.172482867684)*x[1]+(0.909140902709)*x[2]**o+(-0.590494167913)*x[2]
-        arg[1,0,1,0]=(0.210161538861)*x[0]**o+(-0.83860241761)*x[0]+(0.0257180382661)*x[1]**o+(0.877633854348)*x[1]+(0.26045311754)*x[2]**o+(-0.971349902714)*x[2]
-        arg[1,0,1,1]=(0.70736843125)*x[0]**o+(-0.765121985431)*x[0]+(-0.196525225943)*x[1]**o+(-0.175928729346)*x[1]+(0.945523028748)*x[2]**o+(0.877830322823)*x[2]
-        arg[1,0,2,0]=(-0.963513016065)*x[0]**o+(0.0820537856351)*x[0]+(0.0122070196118)*x[1]**o+(-0.154147449592)*x[1]+(0.323844633268)*x[2]**o+(-0.124897698214)*x[2]
-        arg[1,0,2,1]=(0.656267566405)*x[0]**o+(0.0174786620768)*x[0]+(0.763902435618)*x[1]**o+(-0.986021506043)*x[1]+(0.632625555994)*x[2]**o+(-0.110657743523)*x[2]
-        arg[1,1,0,0]=(0.00354144688732)*x[0]**o+(-0.813515808171)*x[0]+(-0.100717717446)*x[1]**o+(0.0543708163629)*x[1]+(0.785927880762)*x[2]**o+(0.0109166652227)*x[2]
-        arg[1,1,0,1]=(-0.239705688631)*x[0]**o+(0.402915642509)*x[0]+(0.463371068163)*x[1]**o+(-0.507302462928)*x[1]+(-0.0789844128295)*x[2]**o+(0.669144891499)*x[2]
-        arg[1,1,1,0]=(-0.491891367001)*x[0]**o+(-0.524377636928)*x[0]+(0.903091863917)*x[1]**o+(-0.554368807183)*x[1]+(0.332899195339)*x[2]**o+(-0.645216147049)*x[2]
-        arg[1,1,1,1]=(-0.915843941243)*x[0]**o+(-0.233175654748)*x[0]+(0.467730425037)*x[1]**o+(-0.765957936683)*x[1]+(0.726678877276)*x[2]**o+(0.770533947942)*x[2]
-        arg[1,1,2,0]=(0.678071852032)*x[0]**o+(0.266537844237)*x[0]+(0.324335300151)*x[1]**o+(-0.286713971373)*x[1]+(-0.702384414014)*x[2]**o+(0.887198276519)*x[2]
-        arg[1,1,2,1]=(0.0466444959648)*x[0]**o+(0.689162912677)*x[0]+(-0.35033923676)*x[1]**o+(-0.0536380766876)*x[1]+(-0.511833442517)*x[2]**o+(0.125566299829)*x[2]
-        arg[1,2,0,0]=(-0.803170431622)*x[0]**o+(0.476211169752)*x[0]+(-0.170510267953)*x[1]**o+(-0.765945735317)*x[1]+(-0.169966329291)*x[2]**o+(-0.988525918724)*x[2]
-        arg[1,2,0,1]=(0.289618751212)*x[0]**o+(0.294379040976)*x[0]+(-0.922478416838)*x[1]**o+(0.210546495537)*x[1]+(-0.87266381496)*x[2]**o+(-0.865571669577)*x[2]
-        arg[1,2,1,0]=(-0.292811054005)*x[0]**o+(0.651280833746)*x[0]+(-0.625004203736)*x[1]**o+(0.372078169172)*x[1]+(-0.0539099055169)*x[2]**o+(0.0911869270008)*x[2]
-        arg[1,2,1,1]=(0.496217698294)*x[0]**o+(-0.986021787133)*x[0]+(0.246417059532)*x[1]**o+(0.610226802401)*x[1]+(0.991534665298)*x[2]**o+(-0.507441185982)*x[2]
-        arg[1,2,2,0]=(-0.839902565947)*x[0]**o+(-0.279607147278)*x[0]+(0.278212307963)*x[1]**o+(0.609793640036)*x[1]+(0.940471913774)*x[2]**o+(0.21860828705)*x[2]
-        arg[1,2,2,1]=(0.789578112278)*x[0]**o+(-0.0226697818608)*x[0]+(0.216321340291)*x[1]**o+(-0.701818463454)*x[1]+(-0.166689030646)*x[2]**o+(0.966131542292)*x[2]
-        arg[1,3,0,0]=(0.149337042551)*x[0]**o+(-0.785050579674)*x[0]+(0.530219924721)*x[1]**o+(-0.971927239398)*x[1]+(0.950917908603)*x[2]**o+(0.132668077447)*x[2]
-        arg[1,3,0,1]=(0.983081559724)*x[0]**o+(-0.358694498455)*x[0]+(0.181080099281)*x[1]**o+(-0.699756291643)*x[1]+(-0.744335953304)*x[2]**o+(0.00262043221382)*x[2]
-        arg[1,3,1,0]=(0.31776032045)*x[0]**o+(-0.0726184220029)*x[0]+(-0.759883735971)*x[1]**o+(-0.6389710873)*x[1]+(-0.607858499502)*x[2]**o+(-0.397169895784)*x[2]
-        arg[1,3,1,1]=(-0.950468389728)*x[0]**o+(0.831121915521)*x[0]+(0.552857011083)*x[1]**o+(0.848599672594)*x[1]+(0.432183564231)*x[2]**o+(0.57537721362)*x[2]
-        arg[1,3,2,0]=(0.736080143601)*x[0]**o+(-0.804140307747)*x[0]+(-0.163864867884)*x[1]**o+(0.950874042315)*x[1]+(-0.99676139412)*x[2]**o+(0.332320294246)*x[2]
-        arg[1,3,2,1]=(0.119082582041)*x[0]**o+(-0.969740778852)*x[0]+(0.828432583532)*x[1]**o+(0.190324050395)*x[1]+(-0.42639142674)*x[2]**o+(0.315519578192)*x[2]
-        arg[1,4,0,0]=(-0.798465141775)*x[0]**o+(-0.717282977908)*x[0]+(0.935655148713)*x[1]**o+(-0.655752964484)*x[1]+(0.159990149099)*x[2]**o+(-0.537115062687)*x[2]
-        arg[1,4,0,1]=(0.445151775007)*x[0]**o+(-0.867956302051)*x[0]+(-0.809856879825)*x[1]**o+(-0.326897750981)*x[1]+(0.756352311987)*x[2]**o+(0.577585513459)*x[2]
-        arg[1,4,1,0]=(0.294243347591)*x[0]**o+(0.774741656931)*x[0]+(-0.0799985737984)*x[1]**o+(0.179789107412)*x[1]+(-0.612198025189)*x[2]**o+(-0.07086009611)*x[2]
-        arg[1,4,1,1]=(0.0692586287045)*x[0]**o+(-0.671956300122)*x[0]+(-0.948667104683)*x[1]**o+(0.68656246801)*x[1]+(-0.352975297696)*x[2]**o+(0.277952113716)*x[2]
-        arg[1,4,2,0]=(-0.491316095517)*x[0]**o+(0.725899087239)*x[0]+(0.634113963431)*x[1]**o+(0.235694393453)*x[1]+(-0.15600720713)*x[2]**o+(0.954814976539)*x[2]
-        arg[1,4,2,1]=(0.120206996339)*x[0]**o+(-0.86151411823)*x[0]+(-0.137093650097)*x[1]**o+(0.633402978246)*x[1]+(-0.42515364728)*x[2]**o+(-0.987634210617)*x[2]
-        arg[2,0,0,0]=(0.539463971222)*x[0]**o+(-0.03435650579)*x[0]+(-0.884395295544)*x[1]**o+(0.215454879022)*x[1]+(0.842377328246)*x[2]**o+(0.370920136871)*x[2]
-        arg[2,0,0,1]=(-0.411505463039)*x[0]**o+(0.446494039439)*x[0]+(0.0313771969556)*x[1]**o+(0.602893223061)*x[1]+(-0.30383490021)*x[2]**o+(-0.788028756758)*x[2]
-        arg[2,0,1,0]=(0.489009615999)*x[0]**o+(-0.95508248016)*x[0]+(-0.21489475022)*x[1]**o+(-0.857263478431)*x[1]+(-0.123703409045)*x[2]**o+(0.663389562431)*x[2]
-        arg[2,0,1,1]=(-0.0224763310929)*x[0]**o+(-0.315886249237)*x[0]+(-0.318201849695)*x[1]**o+(0.423732682462)*x[1]+(0.396065636381)*x[2]**o+(0.0816717878865)*x[2]
-        arg[2,0,2,0]=(-0.191432618224)*x[0]**o+(0.688389390795)*x[0]+(-0.382948112159)*x[1]**o+(0.562905173818)*x[1]+(-0.118396714029)*x[2]**o+(0.234478642577)*x[2]
-        arg[2,0,2,1]=(-0.348008173171)*x[0]**o+(0.191994166636)*x[0]+(0.450556057147)*x[1]**o+(-0.710821693343)*x[1]+(-0.245119333857)*x[2]**o+(0.262869525239)*x[2]
-        arg[2,1,0,0]=(-0.160444506203)*x[0]**o+(-0.816142837432)*x[0]+(-0.619722480492)*x[1]**o+(-0.989077039675)*x[1]+(-0.0282349103977)*x[2]**o+(-0.629849819691)*x[2]
-        arg[2,1,0,1]=(0.379513765297)*x[0]**o+(0.934652105586)*x[0]+(-0.632636427868)*x[1]**o+(-0.0492550496553)*x[1]+(0.137733572307)*x[2]**o+(0.779782637942)*x[2]
-        arg[2,1,1,0]=(0.469499320417)*x[0]**o+(0.570880924125)*x[0]+(-0.0329833251419)*x[1]**o+(-0.0388751034604)*x[1]+(-0.878520094389)*x[2]**o+(0.992656649048)*x[2]
-        arg[2,1,1,1]=(0.592005181995)*x[0]**o+(-0.553980493526)*x[0]+(0.359837665019)*x[1]**o+(0.811107941179)*x[1]+(-0.441929650912)*x[2]**o+(-0.768618378636)*x[2]
-        arg[2,1,2,0]=(0.741376258816)*x[0]**o+(-0.238909756717)*x[0]+(0.204631082449)*x[1]**o+(0.970501662949)*x[1]+(-0.615638092239)*x[2]**o+(-0.575948750844)*x[2]
-        arg[2,1,2,1]=(0.774050933112)*x[0]**o+(-0.872234076721)*x[0]+(-0.0936189240061)*x[1]**o+(-0.773608756961)*x[1]+(-0.119171907808)*x[2]**o+(-0.256124796845)*x[2]
-        arg[2,2,0,0]=(0.459481754425)*x[0]**o+(0.478364929493)*x[0]+(0.460199733287)*x[1]**o+(0.66880294659)*x[1]+(-0.859525058389)*x[2]**o+(0.77960284414)*x[2]
-        arg[2,2,0,1]=(0.690557835207)*x[0]**o+(-0.812305038592)*x[0]+(0.837924124791)*x[1]**o+(-0.785979206364)*x[1]+(-0.295553949819)*x[2]**o+(0.575096295897)*x[2]
-        arg[2,2,1,0]=(0.443193683205)*x[0]**o+(0.0355033222253)*x[0]+(0.497641002766)*x[1]**o+(-0.636955142451)*x[1]+(-0.265324357454)*x[2]**o+(0.734148569078)*x[2]
-        arg[2,2,1,1]=(-0.088707242599)*x[0]**o+(0.513403518669)*x[0]+(0.337741737651)*x[1]**o+(-0.174843924478)*x[1]+(0.687291255986)*x[2]**o+(0.473850502258)*x[2]
-        arg[2,2,2,0]=(0.5305624642)*x[0]**o+(-0.972997835953)*x[0]+(0.00197107287888)*x[1]**o+(-0.75490872634)*x[1]+(-0.0569624569435)*x[2]**o+(-0.0780532868631)*x[2]
-        arg[2,2,2,1]=(-0.744584471866)*x[0]**o+(0.915494909272)*x[0]+(0.239235050038)*x[1]**o+(-0.192466753187)*x[1]+(0.933556550824)*x[2]**o+(-0.786420251487)*x[2]
-        arg[2,3,0,0]=(0.472114530627)*x[0]**o+(0.0693211807557)*x[0]+(-0.274273425713)*x[1]**o+(0.136242554894)*x[1]+(-0.329240675785)*x[2]**o+(0.0212539247343)*x[2]
-        arg[2,3,0,1]=(-0.780426108099)*x[0]**o+(-0.632382551025)*x[0]+(0.554926949239)*x[1]**o+(0.264204009059)*x[1]+(-0.868007525824)*x[2]**o+(-0.937631120201)*x[2]
-        arg[2,3,1,0]=(-0.826692080947)*x[0]**o+(0.915241858538)*x[0]+(-0.49986160859)*x[1]**o+(0.921686464658)*x[1]+(0.71996666304)*x[2]**o+(0.297609501096)*x[2]
-        arg[2,3,1,1]=(0.991896994614)*x[0]**o+(-0.543310008103)*x[0]+(0.0791899631111)*x[1]**o+(-0.914088200145)*x[1]+(-0.496337624951)*x[2]**o+(0.708950898614)*x[2]
-        arg[2,3,2,0]=(-0.235116966432)*x[0]**o+(-0.492848730207)*x[0]+(0.428728646789)*x[1]**o+(-0.410747634691)*x[1]+(0.705059815458)*x[2]**o+(-0.185604633831)*x[2]
-        arg[2,3,2,1]=(0.838829037117)*x[0]**o+(0.670561147563)*x[0]+(0.621407965075)*x[1]**o+(-0.10624946305)*x[1]+(0.893703402687)*x[2]**o+(0.985504995821)*x[2]
-        arg[2,4,0,0]=(0.635072504682)*x[0]**o+(-0.681962427555)*x[0]+(-0.00774518011081)*x[1]**o+(-0.264996228668)*x[1]+(0.690668403198)*x[2]**o+(0.883573761062)*x[2]
-        arg[2,4,0,1]=(0.545632268651)*x[0]**o+(0.439668519394)*x[0]+(-0.482479808491)*x[1]**o+(0.752028962391)*x[1]+(0.0596773623939)*x[2]**o+(-0.369987181127)*x[2]
-        arg[2,4,1,0]=(0.659005322796)*x[0]**o+(0.503940833428)*x[0]+(0.643633321586)*x[1]**o+(0.927082323252)*x[1]+(0.354072146184)*x[2]**o+(-0.638737560608)*x[2]
-        arg[2,4,1,1]=(-0.443548860913)*x[0]**o+(0.707607048458)*x[0]+(-0.955225746402)*x[1]**o+(0.515995563585)*x[1]+(-0.288406637165)*x[2]**o+(-0.760864937318)*x[2]
-        arg[2,4,2,0]=(0.898146580355)*x[0]**o+(-0.590650787106)*x[0]+(0.036095789753)*x[1]**o+(0.326040260581)*x[1]+(0.680069361306)*x[2]**o+(0.333839099341)*x[2]
-        arg[2,4,2,1]=(-0.151364260271)*x[0]**o+(-0.675198183832)*x[0]+(-0.183626298978)*x[1]**o+(-0.182565217146)*x[1]+(0.0345632129814)*x[2]**o+(-0.581534100763)*x[2]
-        arg[3,0,0,0]=(-0.942351703246)*x[0]**o+(-0.699567649453)*x[0]+(-0.832068665702)*x[1]**o+(0.163439416504)*x[1]+(0.742500339519)*x[2]**o+(-0.492882887489)*x[2]
-        arg[3,0,0,1]=(0.990078296484)*x[0]**o+(-0.999837336587)*x[0]+(0.197589456459)*x[1]**o+(0.431403059019)*x[1]+(0.859864015871)*x[2]**o+(-0.267474829282)*x[2]
-        arg[3,0,1,0]=(-0.776773660723)*x[0]**o+(-0.189048370486)*x[0]+(0.926953856802)*x[1]**o+(-0.72314744652)*x[1]+(0.330064363809)*x[2]**o+(0.188533334359)*x[2]
-        arg[3,0,1,1]=(-0.854830058762)*x[0]**o+(0.832073883276)*x[0]+(-0.425691165124)*x[1]**o+(0.162351500316)*x[1]+(0.370604864512)*x[2]**o+(-0.581907071484)*x[2]
-        arg[3,0,2,0]=(-0.316716909548)*x[0]**o+(0.335417284383)*x[0]+(-0.783061160352)*x[1]**o+(-0.253972519239)*x[1]+(-0.826432933721)*x[2]**o+(0.267368378363)*x[2]
-        arg[3,0,2,1]=(-0.765899705462)*x[0]**o+(-0.0993875861476)*x[0]+(-0.211785004352)*x[1]**o+(-0.635330151497)*x[1]+(0.414575412599)*x[2]**o+(0.586882274623)*x[2]
-        arg[3,1,0,0]=(0.987776377237)*x[0]**o+(0.796660669191)*x[0]+(0.580724891862)*x[1]**o+(-0.24149253995)*x[1]+(-0.633421016909)*x[2]**o+(-0.220110913711)*x[2]
-        arg[3,1,0,1]=(-0.182240918081)*x[0]**o+(-0.290526050572)*x[0]+(0.00283230959976)*x[1]**o+(-0.933282166805)*x[1]+(-0.857893235883)*x[2]**o+(0.551414074127)*x[2]
-        arg[3,1,1,0]=(-0.854435997816)*x[0]**o+(0.706455144263)*x[0]+(0.406237965254)*x[1]**o+(0.192071142415)*x[1]+(0.357966796834)*x[2]**o+(0.887011087987)*x[2]
-        arg[3,1,1,1]=(0.832013396996)*x[0]**o+(0.696133072321)*x[0]+(0.682726968712)*x[1]**o+(0.613316240514)*x[1]+(0.12600339887)*x[2]**o+(-0.620088231382)*x[2]
-        arg[3,1,2,0]=(-0.178681615221)*x[0]**o+(-0.952835986168)*x[0]+(0.299692693746)*x[1]**o+(0.892451908416)*x[1]+(0.202403273634)*x[2]**o+(0.677212897943)*x[2]
-        arg[3,1,2,1]=(0.0592594053342)*x[0]**o+(0.56391153959)*x[0]+(-0.874866627667)*x[1]**o+(0.432102900769)*x[1]+(-0.49073126285)*x[2]**o+(-0.010495860028)*x[2]
-        arg[3,2,0,0]=(0.548006445814)*x[0]**o+(0.667313392202)*x[0]+(0.397805355499)*x[1]**o+(-0.788100267808)*x[1]+(0.869234055258)*x[2]**o+(-0.830241520401)*x[2]
-        arg[3,2,0,1]=(0.72586139216)*x[0]**o+(-0.931878957878)*x[0]+(-0.94119555858)*x[1]**o+(-0.133544806169)*x[1]+(0.754263323382)*x[2]**o+(-0.446604740157)*x[2]
-        arg[3,2,1,0]=(-0.28135830707)*x[0]**o+(-0.478744058518)*x[0]+(0.88219033731)*x[1]**o+(0.460587286945)*x[1]+(-0.849692146096)*x[2]**o+(0.0927701345107)*x[2]
-        arg[3,2,1,1]=(-0.681859641611)*x[0]**o+(-0.670164293088)*x[0]+(0.796366374435)*x[1]**o+(0.837230317054)*x[1]+(-0.413283915904)*x[2]**o+(0.779624227187)*x[2]
-        arg[3,2,2,0]=(-0.803242771255)*x[0]**o+(-0.0687616271776)*x[0]+(-0.948856027999)*x[1]**o+(0.762568790931)*x[1]+(0.937588292604)*x[2]**o+(-0.0224232611283)*x[2]
-        arg[3,2,2,1]=(-0.215752944937)*x[0]**o+(-0.807114296075)*x[0]+(0.970625375964)*x[1]**o+(0.68578124692)*x[1]+(-0.165007047419)*x[2]**o+(0.942718439981)*x[2]
-        arg[3,3,0,0]=(0.152001104716)*x[0]**o+(-0.657242342357)*x[0]+(0.559608661705)*x[1]**o+(0.0764403273251)*x[1]+(0.633414754695)*x[2]**o+(0.430777868344)*x[2]
-        arg[3,3,0,1]=(-0.898109497759)*x[0]**o+(0.736574249406)*x[0]+(-0.569584184574)*x[1]**o+(-0.145501395506)*x[1]+(-0.412424116475)*x[2]**o+(-0.416350923096)*x[2]
-        arg[3,3,1,0]=(0.602022795614)*x[0]**o+(-0.848525569825)*x[0]+(-0.713426287505)*x[1]**o+(-0.829278452687)*x[1]+(-0.491257659316)*x[2]**o+(0.90219908999)*x[2]
-        arg[3,3,1,1]=(-0.769110216066)*x[0]**o+(-0.789464037338)*x[0]+(-0.363686172584)*x[1]**o+(-0.86190787068)*x[1]+(0.275438119232)*x[2]**o+(0.285209834248)*x[2]
-        arg[3,3,2,0]=(0.351662405853)*x[0]**o+(0.8403302307)*x[0]+(-0.449869332519)*x[1]**o+(0.936043614838)*x[1]+(-0.656908777335)*x[2]**o+(-0.231923872531)*x[2]
-        arg[3,3,2,1]=(0.873848945653)*x[0]**o+(0.551429883959)*x[0]+(-0.577942548701)*x[1]**o+(-0.254317163049)*x[1]+(0.64878089878)*x[2]**o+(0.7135339515)*x[2]
-        arg[3,4,0,0]=(0.891435610494)*x[0]**o+(0.598893704498)*x[0]+(0.24682094756)*x[1]**o+(0.0895612710338)*x[1]+(-0.513686244953)*x[2]**o+(0.307205505502)*x[2]
-        arg[3,4,0,1]=(-0.577752944196)*x[0]**o+(-0.458383751623)*x[0]+(-0.913956988143)*x[1]**o+(0.470857602235)*x[1]+(0.631726850665)*x[2]**o+(-0.112962289904)*x[2]
-        arg[3,4,1,0]=(-0.65648177489)*x[0]**o+(-0.843530972747)*x[0]+(-0.0332153723809)*x[1]**o+(0.230484263355)*x[1]+(-0.865687508592)*x[2]**o+(0.122751735082)*x[2]
-        arg[3,4,1,1]=(-0.353502640734)*x[0]**o+(-0.816020900282)*x[0]+(0.943688796868)*x[1]**o+(-0.526707881958)*x[1]+(-0.790258298117)*x[2]**o+(-0.748706809042)*x[2]
-        arg[3,4,2,0]=(-0.596345912175)*x[0]**o+(0.872771121837)*x[0]+(0.100107395575)*x[1]**o+(0.950482249217)*x[1]+(0.0487634582783)*x[2]**o+(-0.0285218097887)*x[2]
-        arg[3,4,2,1]=(-0.827443553933)*x[0]**o+(-0.922564800149)*x[0]+(-0.810354385287)*x[1]**o+(0.630079217293)*x[1]+(-0.316280559723)*x[2]**o+(0.977830435871)*x[2]
-        ref[0,0,0,0]=(0.310272924207)*x_ref[0]**o+(-0.664497806351)*x_ref[0]+(0.741942132609)*x_ref[1]**o+(0.636051298779)*x_ref[1]+(0.76627159146)*x_ref[2]**o+(0.492960732588)*x_ref[2]
-        ref[0,0,0,1]=(-0.513740801773)*x_ref[0]**o+(-0.633330750909)*x_ref[0]+(0.177934618983)*x_ref[1]**o+(-0.323745723166)*x_ref[1]+(0.694167180904)*x_ref[2]**o+(0.441239251435)*x_ref[2]
-        ref[0,0,1,0]=(0.417477695848)*x_ref[0]**o+(-0.923415976002)*x_ref[0]+(0.0765555276662)*x_ref[1]**o+(-0.277290890834)*x_ref[1]+(0.0177191326614)*x_ref[2]**o+(-0.0842520100387)*x_ref[2]
-        ref[0,0,1,1]=(-0.761916249894)*x_ref[0]**o+(0.169673139552)*x_ref[0]+(0.0306290828795)*x_ref[1]**o+(0.842234592613)*x_ref[1]+(-0.350342692669)*x_ref[2]**o+(0.321292270658)*x_ref[2]
-        ref[0,0,2,0]=(-0.707494137624)*x_ref[0]**o+(0.346873490395)*x_ref[0]+(-0.68281925138)*x_ref[1]**o+(-0.830538083274)*x_ref[1]+(0.329372141613)*x_ref[2]**o+(-0.121366157163)*x_ref[2]
-        ref[0,0,2,1]=(-0.708018186507)*x_ref[0]**o+(-0.778051239314)*x_ref[0]+(-0.43106291563)*x_ref[1]**o+(-0.0115914251143)*x_ref[1]+(0.487334215892)*x_ref[2]**o+(-0.289232284658)*x_ref[2]
-        ref[0,1,0,0]=(0.530614704199)*x_ref[0]**o+(0.518622028317)*x_ref[0]+(-0.0143129589551)*x_ref[1]**o+(0.808469352257)*x_ref[1]+(-0.156787373225)*x_ref[2]**o+(0.668887813143)*x_ref[2]
-        ref[0,1,0,1]=(0.953223233706)*x_ref[0]**o+(-0.164323838353)*x_ref[0]+(0.336717320858)*x_ref[1]**o+(-0.520230488172)*x_ref[1]+(0.689960738002)*x_ref[2]**o+(0.487630947578)*x_ref[2]
-        ref[0,1,1,0]=(-0.418095373429)*x_ref[0]**o+(-0.941817844939)*x_ref[0]+(0.88105115607)*x_ref[1]**o+(-0.820502501439)*x_ref[1]+(-0.693858267667)*x_ref[2]**o+(0.530567713127)*x_ref[2]
-        ref[0,1,1,1]=(-0.716861320218)*x_ref[0]**o+(-0.736619859467)*x_ref[0]+(-0.885478605601)*x_ref[1]**o+(-0.129375578967)*x_ref[1]+(-0.0181433907318)*x_ref[2]**o+(0.373255537959)*x_ref[2]
-        ref[0,1,2,0]=(-0.174742583167)*x_ref[0]**o+(-0.0887967480112)*x_ref[0]+(-0.291168698662)*x_ref[1]**o+(-0.188608506769)*x_ref[1]+(0.22479613454)*x_ref[2]**o+(0.34173928582)*x_ref[2]
-        ref[0,1,2,1]=(0.117208929504)*x_ref[0]**o+(-0.420969282079)*x_ref[0]+(0.585298109836)*x_ref[1]**o+(0.771355162745)*x_ref[1]+(-0.51374493747)*x_ref[2]**o+(0.785016548855)*x_ref[2]
-        ref[0,2,0,0]=(0.737394887886)*x_ref[0]**o+(0.966080271342)*x_ref[0]+(-0.373178384492)*x_ref[1]**o+(-0.845505386142)*x_ref[1]+(-0.274654519371)*x_ref[2]**o+(0.709356557887)*x_ref[2]
-        ref[0,2,0,1]=(0.0365864090636)*x_ref[0]**o+(-0.393382479787)*x_ref[0]+(0.018273360977)*x_ref[1]**o+(-0.509201909328)*x_ref[1]+(-0.777852392534)*x_ref[2]**o+(0.0417280247507)*x_ref[2]
-        ref[0,2,1,0]=(0.637829302751)*x_ref[0]**o+(-0.767824790186)*x_ref[0]+(0.843382009511)*x_ref[1]**o+(-0.599633234403)*x_ref[1]+(0.14283138941)*x_ref[2]**o+(-0.354404633991)*x_ref[2]
-        ref[0,2,1,1]=(-0.465258613599)*x_ref[0]**o+(0.09341154383)*x_ref[0]+(-0.629114782988)*x_ref[1]**o+(0.91608655383)*x_ref[1]+(-0.692901135848)*x_ref[2]**o+(-0.707225310667)*x_ref[2]
-        ref[0,2,2,0]=(0.9935958759)*x_ref[0]**o+(-0.385008742466)*x_ref[0]+(0.153885356854)*x_ref[1]**o+(0.146270680656)*x_ref[1]+(0.305838410343)*x_ref[2]**o+(0.141193552717)*x_ref[2]
-        ref[0,2,2,1]=(-0.487538023894)*x_ref[0]**o+(-0.814283442647)*x_ref[0]+(0.166008520199)*x_ref[1]**o+(0.313655774416)*x_ref[1]+(0.282308782973)*x_ref[2]**o+(0.309176062484)*x_ref[2]
-        ref[0,3,0,0]=(0.00203507798913)*x_ref[0]**o+(-0.19902542604)*x_ref[0]+(0.88110918624)*x_ref[1]**o+(0.223549219288)*x_ref[1]+(0.135758952369)*x_ref[2]**o+(0.59116783639)*x_ref[2]
-        ref[0,3,0,1]=(-0.185063700767)*x_ref[0]**o+(0.833862155173)*x_ref[0]+(-0.0939117509645)*x_ref[1]**o+(0.288003692231)*x_ref[1]+(0.580196157839)*x_ref[2]**o+(0.299320177754)*x_ref[2]
-        ref[0,3,1,0]=(-0.039100718826)*x_ref[0]**o+(0.423179869395)*x_ref[0]+(-0.013669578975)*x_ref[1]**o+(-0.355053343085)*x_ref[1]+(0.89285158975)*x_ref[2]**o+(0.392984367877)*x_ref[2]
-        ref[0,3,1,1]=(0.0988989416429)*x_ref[0]**o+(-0.446243235174)*x_ref[0]+(-0.691253313617)*x_ref[1]**o+(0.338823693086)*x_ref[1]+(0.707054126334)*x_ref[2]**o+(0.601121388278)*x_ref[2]
-        ref[0,3,2,0]=(-0.191366770484)*x_ref[0]**o+(0.961791275903)*x_ref[0]+(-0.103547475035)*x_ref[1]**o+(-0.745236510079)*x_ref[1]+(-0.157506981712)*x_ref[2]**o+(0.986229506787)*x_ref[2]
-        ref[0,3,2,1]=(-0.886091883647)*x_ref[0]**o+(0.6979804248)*x_ref[0]+(-0.366575419428)*x_ref[1]**o+(-0.958601153259)*x_ref[1]+(-0.0119724511494)*x_ref[2]**o+(-0.76101132076)*x_ref[2]
-        ref[0,4,0,0]=(0.923290554434)*x_ref[0]**o+(0.411359492198)*x_ref[0]+(-0.977999562875)*x_ref[1]**o+(0.352085161527)*x_ref[1]+(0.955745235349)*x_ref[2]**o+(-0.978885609257)*x_ref[2]
-        ref[0,4,0,1]=(0.226973479105)*x_ref[0]**o+(-0.423881897251)*x_ref[0]+(0.889101969481)*x_ref[1]**o+(-0.994236389028)*x_ref[1]+(0.0159169033361)*x_ref[2]**o+(-0.559935154203)*x_ref[2]
-        ref[0,4,1,0]=(-0.225427291797)*x_ref[0]**o+(-0.557334621848)*x_ref[0]+(-0.486252586142)*x_ref[1]**o+(0.0497120905216)*x_ref[1]+(0.84165736691)*x_ref[2]**o+(-0.185010156797)*x_ref[2]
-        ref[0,4,1,1]=(0.762694602609)*x_ref[0]**o+(-0.447367170727)*x_ref[0]+(-0.61103181818)*x_ref[1]**o+(0.689761057656)*x_ref[1]+(-0.631855120122)*x_ref[2]**o+(0.33274655602)*x_ref[2]
-        ref[0,4,2,0]=(-0.198884868914)*x_ref[0]**o+(0.716371959278)*x_ref[0]+(0.260871768919)*x_ref[1]**o+(0.622241740082)*x_ref[1]+(0.774103524035)*x_ref[2]**o+(0.186132703676)*x_ref[2]
-        ref[0,4,2,1]=(-0.309450645317)*x_ref[0]**o+(0.204754571336)*x_ref[0]+(0.483402810171)*x_ref[1]**o+(0.404620744188)*x_ref[1]+(-0.699137246959)*x_ref[2]**o+(0.467428706196)*x_ref[2]
-        ref[1,0,0,0]=(0.642289506448)*x_ref[0]**o+(0.383990304394)*x_ref[0]+(0.556940973318)*x_ref[1]**o+(0.135219729041)*x_ref[1]+(0.577195836358)*x_ref[2]**o+(-0.338924419674)*x_ref[2]
-        ref[1,0,0,1]=(-0.920873911295)*x_ref[0]**o+(-0.330610192304)*x_ref[0]+(-0.117226803856)*x_ref[1]**o+(0.172482867684)*x_ref[1]+(0.909140902709)*x_ref[2]**o+(-0.590494167913)*x_ref[2]
-        ref[1,0,1,0]=(0.210161538861)*x_ref[0]**o+(-0.83860241761)*x_ref[0]+(0.0257180382661)*x_ref[1]**o+(0.877633854348)*x_ref[1]+(0.26045311754)*x_ref[2]**o+(-0.971349902714)*x_ref[2]
-        ref[1,0,1,1]=(0.70736843125)*x_ref[0]**o+(-0.765121985431)*x_ref[0]+(-0.196525225943)*x_ref[1]**o+(-0.175928729346)*x_ref[1]+(0.945523028748)*x_ref[2]**o+(0.877830322823)*x_ref[2]
-        ref[1,0,2,0]=(-0.963513016065)*x_ref[0]**o+(0.0820537856351)*x_ref[0]+(0.0122070196118)*x_ref[1]**o+(-0.154147449592)*x_ref[1]+(0.323844633268)*x_ref[2]**o+(-0.124897698214)*x_ref[2]
-        ref[1,0,2,1]=(0.656267566405)*x_ref[0]**o+(0.0174786620768)*x_ref[0]+(0.763902435618)*x_ref[1]**o+(-0.986021506043)*x_ref[1]+(0.632625555994)*x_ref[2]**o+(-0.110657743523)*x_ref[2]
-        ref[1,1,0,0]=(0.00354144688732)*x_ref[0]**o+(-0.813515808171)*x_ref[0]+(-0.100717717446)*x_ref[1]**o+(0.0543708163629)*x_ref[1]+(0.785927880762)*x_ref[2]**o+(0.0109166652227)*x_ref[2]
-        ref[1,1,0,1]=(-0.239705688631)*x_ref[0]**o+(0.402915642509)*x_ref[0]+(0.463371068163)*x_ref[1]**o+(-0.507302462928)*x_ref[1]+(-0.0789844128295)*x_ref[2]**o+(0.669144891499)*x_ref[2]
-        ref[1,1,1,0]=(-0.491891367001)*x_ref[0]**o+(-0.524377636928)*x_ref[0]+(0.903091863917)*x_ref[1]**o+(-0.554368807183)*x_ref[1]+(0.332899195339)*x_ref[2]**o+(-0.645216147049)*x_ref[2]
-        ref[1,1,1,1]=(-0.915843941243)*x_ref[0]**o+(-0.233175654748)*x_ref[0]+(0.467730425037)*x_ref[1]**o+(-0.765957936683)*x_ref[1]+(0.726678877276)*x_ref[2]**o+(0.770533947942)*x_ref[2]
-        ref[1,1,2,0]=(0.678071852032)*x_ref[0]**o+(0.266537844237)*x_ref[0]+(0.324335300151)*x_ref[1]**o+(-0.286713971373)*x_ref[1]+(-0.702384414014)*x_ref[2]**o+(0.887198276519)*x_ref[2]
-        ref[1,1,2,1]=(0.0466444959648)*x_ref[0]**o+(0.689162912677)*x_ref[0]+(-0.35033923676)*x_ref[1]**o+(-0.0536380766876)*x_ref[1]+(-0.511833442517)*x_ref[2]**o+(0.125566299829)*x_ref[2]
-        ref[1,2,0,0]=(-0.803170431622)*x_ref[0]**o+(0.476211169752)*x_ref[0]+(-0.170510267953)*x_ref[1]**o+(-0.765945735317)*x_ref[1]+(-0.169966329291)*x_ref[2]**o+(-0.988525918724)*x_ref[2]
-        ref[1,2,0,1]=(0.289618751212)*x_ref[0]**o+(0.294379040976)*x_ref[0]+(-0.922478416838)*x_ref[1]**o+(0.210546495537)*x_ref[1]+(-0.87266381496)*x_ref[2]**o+(-0.865571669577)*x_ref[2]
-        ref[1,2,1,0]=(-0.292811054005)*x_ref[0]**o+(0.651280833746)*x_ref[0]+(-0.625004203736)*x_ref[1]**o+(0.372078169172)*x_ref[1]+(-0.0539099055169)*x_ref[2]**o+(0.0911869270008)*x_ref[2]
-        ref[1,2,1,1]=(0.496217698294)*x_ref[0]**o+(-0.986021787133)*x_ref[0]+(0.246417059532)*x_ref[1]**o+(0.610226802401)*x_ref[1]+(0.991534665298)*x_ref[2]**o+(-0.507441185982)*x_ref[2]
-        ref[1,2,2,0]=(-0.839902565947)*x_ref[0]**o+(-0.279607147278)*x_ref[0]+(0.278212307963)*x_ref[1]**o+(0.609793640036)*x_ref[1]+(0.940471913774)*x_ref[2]**o+(0.21860828705)*x_ref[2]
-        ref[1,2,2,1]=(0.789578112278)*x_ref[0]**o+(-0.0226697818608)*x_ref[0]+(0.216321340291)*x_ref[1]**o+(-0.701818463454)*x_ref[1]+(-0.166689030646)*x_ref[2]**o+(0.966131542292)*x_ref[2]
-        ref[1,3,0,0]=(0.149337042551)*x_ref[0]**o+(-0.785050579674)*x_ref[0]+(0.530219924721)*x_ref[1]**o+(-0.971927239398)*x_ref[1]+(0.950917908603)*x_ref[2]**o+(0.132668077447)*x_ref[2]
-        ref[1,3,0,1]=(0.983081559724)*x_ref[0]**o+(-0.358694498455)*x_ref[0]+(0.181080099281)*x_ref[1]**o+(-0.699756291643)*x_ref[1]+(-0.744335953304)*x_ref[2]**o+(0.00262043221382)*x_ref[2]
-        ref[1,3,1,0]=(0.31776032045)*x_ref[0]**o+(-0.0726184220029)*x_ref[0]+(-0.759883735971)*x_ref[1]**o+(-0.6389710873)*x_ref[1]+(-0.607858499502)*x_ref[2]**o+(-0.397169895784)*x_ref[2]
-        ref[1,3,1,1]=(-0.950468389728)*x_ref[0]**o+(0.831121915521)*x_ref[0]+(0.552857011083)*x_ref[1]**o+(0.848599672594)*x_ref[1]+(0.432183564231)*x_ref[2]**o+(0.57537721362)*x_ref[2]
-        ref[1,3,2,0]=(0.736080143601)*x_ref[0]**o+(-0.804140307747)*x_ref[0]+(-0.163864867884)*x_ref[1]**o+(0.950874042315)*x_ref[1]+(-0.99676139412)*x_ref[2]**o+(0.332320294246)*x_ref[2]
-        ref[1,3,2,1]=(0.119082582041)*x_ref[0]**o+(-0.969740778852)*x_ref[0]+(0.828432583532)*x_ref[1]**o+(0.190324050395)*x_ref[1]+(-0.42639142674)*x_ref[2]**o+(0.315519578192)*x_ref[2]
-        ref[1,4,0,0]=(-0.798465141775)*x_ref[0]**o+(-0.717282977908)*x_ref[0]+(0.935655148713)*x_ref[1]**o+(-0.655752964484)*x_ref[1]+(0.159990149099)*x_ref[2]**o+(-0.537115062687)*x_ref[2]
-        ref[1,4,0,1]=(0.445151775007)*x_ref[0]**o+(-0.867956302051)*x_ref[0]+(-0.809856879825)*x_ref[1]**o+(-0.326897750981)*x_ref[1]+(0.756352311987)*x_ref[2]**o+(0.577585513459)*x_ref[2]
-        ref[1,4,1,0]=(0.294243347591)*x_ref[0]**o+(0.774741656931)*x_ref[0]+(-0.0799985737984)*x_ref[1]**o+(0.179789107412)*x_ref[1]+(-0.612198025189)*x_ref[2]**o+(-0.07086009611)*x_ref[2]
-        ref[1,4,1,1]=(0.0692586287045)*x_ref[0]**o+(-0.671956300122)*x_ref[0]+(-0.948667104683)*x_ref[1]**o+(0.68656246801)*x_ref[1]+(-0.352975297696)*x_ref[2]**o+(0.277952113716)*x_ref[2]
-        ref[1,4,2,0]=(-0.491316095517)*x_ref[0]**o+(0.725899087239)*x_ref[0]+(0.634113963431)*x_ref[1]**o+(0.235694393453)*x_ref[1]+(-0.15600720713)*x_ref[2]**o+(0.954814976539)*x_ref[2]
-        ref[1,4,2,1]=(0.120206996339)*x_ref[0]**o+(-0.86151411823)*x_ref[0]+(-0.137093650097)*x_ref[1]**o+(0.633402978246)*x_ref[1]+(-0.42515364728)*x_ref[2]**o+(-0.987634210617)*x_ref[2]
-        ref[2,0,0,0]=(0.539463971222)*x_ref[0]**o+(-0.03435650579)*x_ref[0]+(-0.884395295544)*x_ref[1]**o+(0.215454879022)*x_ref[1]+(0.842377328246)*x_ref[2]**o+(0.370920136871)*x_ref[2]
-        ref[2,0,0,1]=(-0.411505463039)*x_ref[0]**o+(0.446494039439)*x_ref[0]+(0.0313771969556)*x_ref[1]**o+(0.602893223061)*x_ref[1]+(-0.30383490021)*x_ref[2]**o+(-0.788028756758)*x_ref[2]
-        ref[2,0,1,0]=(0.489009615999)*x_ref[0]**o+(-0.95508248016)*x_ref[0]+(-0.21489475022)*x_ref[1]**o+(-0.857263478431)*x_ref[1]+(-0.123703409045)*x_ref[2]**o+(0.663389562431)*x_ref[2]
-        ref[2,0,1,1]=(-0.0224763310929)*x_ref[0]**o+(-0.315886249237)*x_ref[0]+(-0.318201849695)*x_ref[1]**o+(0.423732682462)*x_ref[1]+(0.396065636381)*x_ref[2]**o+(0.0816717878865)*x_ref[2]
-        ref[2,0,2,0]=(-0.191432618224)*x_ref[0]**o+(0.688389390795)*x_ref[0]+(-0.382948112159)*x_ref[1]**o+(0.562905173818)*x_ref[1]+(-0.118396714029)*x_ref[2]**o+(0.234478642577)*x_ref[2]
-        ref[2,0,2,1]=(-0.348008173171)*x_ref[0]**o+(0.191994166636)*x_ref[0]+(0.450556057147)*x_ref[1]**o+(-0.710821693343)*x_ref[1]+(-0.245119333857)*x_ref[2]**o+(0.262869525239)*x_ref[2]
-        ref[2,1,0,0]=(-0.160444506203)*x_ref[0]**o+(-0.816142837432)*x_ref[0]+(-0.619722480492)*x_ref[1]**o+(-0.989077039675)*x_ref[1]+(-0.0282349103977)*x_ref[2]**o+(-0.629849819691)*x_ref[2]
-        ref[2,1,0,1]=(0.379513765297)*x_ref[0]**o+(0.934652105586)*x_ref[0]+(-0.632636427868)*x_ref[1]**o+(-0.0492550496553)*x_ref[1]+(0.137733572307)*x_ref[2]**o+(0.779782637942)*x_ref[2]
-        ref[2,1,1,0]=(0.469499320417)*x_ref[0]**o+(0.570880924125)*x_ref[0]+(-0.0329833251419)*x_ref[1]**o+(-0.0388751034604)*x_ref[1]+(-0.878520094389)*x_ref[2]**o+(0.992656649048)*x_ref[2]
-        ref[2,1,1,1]=(0.592005181995)*x_ref[0]**o+(-0.553980493526)*x_ref[0]+(0.359837665019)*x_ref[1]**o+(0.811107941179)*x_ref[1]+(-0.441929650912)*x_ref[2]**o+(-0.768618378636)*x_ref[2]
-        ref[2,1,2,0]=(0.741376258816)*x_ref[0]**o+(-0.238909756717)*x_ref[0]+(0.204631082449)*x_ref[1]**o+(0.970501662949)*x_ref[1]+(-0.615638092239)*x_ref[2]**o+(-0.575948750844)*x_ref[2]
-        ref[2,1,2,1]=(0.774050933112)*x_ref[0]**o+(-0.872234076721)*x_ref[0]+(-0.0936189240061)*x_ref[1]**o+(-0.773608756961)*x_ref[1]+(-0.119171907808)*x_ref[2]**o+(-0.256124796845)*x_ref[2]
-        ref[2,2,0,0]=(0.459481754425)*x_ref[0]**o+(0.478364929493)*x_ref[0]+(0.460199733287)*x_ref[1]**o+(0.66880294659)*x_ref[1]+(-0.859525058389)*x_ref[2]**o+(0.77960284414)*x_ref[2]
-        ref[2,2,0,1]=(0.690557835207)*x_ref[0]**o+(-0.812305038592)*x_ref[0]+(0.837924124791)*x_ref[1]**o+(-0.785979206364)*x_ref[1]+(-0.295553949819)*x_ref[2]**o+(0.575096295897)*x_ref[2]
-        ref[2,2,1,0]=(0.443193683205)*x_ref[0]**o+(0.0355033222253)*x_ref[0]+(0.497641002766)*x_ref[1]**o+(-0.636955142451)*x_ref[1]+(-0.265324357454)*x_ref[2]**o+(0.734148569078)*x_ref[2]
-        ref[2,2,1,1]=(-0.088707242599)*x_ref[0]**o+(0.513403518669)*x_ref[0]+(0.337741737651)*x_ref[1]**o+(-0.174843924478)*x_ref[1]+(0.687291255986)*x_ref[2]**o+(0.473850502258)*x_ref[2]
-        ref[2,2,2,0]=(0.5305624642)*x_ref[0]**o+(-0.972997835953)*x_ref[0]+(0.00197107287888)*x_ref[1]**o+(-0.75490872634)*x_ref[1]+(-0.0569624569435)*x_ref[2]**o+(-0.0780532868631)*x_ref[2]
-        ref[2,2,2,1]=(-0.744584471866)*x_ref[0]**o+(0.915494909272)*x_ref[0]+(0.239235050038)*x_ref[1]**o+(-0.192466753187)*x_ref[1]+(0.933556550824)*x_ref[2]**o+(-0.786420251487)*x_ref[2]
-        ref[2,3,0,0]=(0.472114530627)*x_ref[0]**o+(0.0693211807557)*x_ref[0]+(-0.274273425713)*x_ref[1]**o+(0.136242554894)*x_ref[1]+(-0.329240675785)*x_ref[2]**o+(0.0212539247343)*x_ref[2]
-        ref[2,3,0,1]=(-0.780426108099)*x_ref[0]**o+(-0.632382551025)*x_ref[0]+(0.554926949239)*x_ref[1]**o+(0.264204009059)*x_ref[1]+(-0.868007525824)*x_ref[2]**o+(-0.937631120201)*x_ref[2]
-        ref[2,3,1,0]=(-0.826692080947)*x_ref[0]**o+(0.915241858538)*x_ref[0]+(-0.49986160859)*x_ref[1]**o+(0.921686464658)*x_ref[1]+(0.71996666304)*x_ref[2]**o+(0.297609501096)*x_ref[2]
-        ref[2,3,1,1]=(0.991896994614)*x_ref[0]**o+(-0.543310008103)*x_ref[0]+(0.0791899631111)*x_ref[1]**o+(-0.914088200145)*x_ref[1]+(-0.496337624951)*x_ref[2]**o+(0.708950898614)*x_ref[2]
-        ref[2,3,2,0]=(-0.235116966432)*x_ref[0]**o+(-0.492848730207)*x_ref[0]+(0.428728646789)*x_ref[1]**o+(-0.410747634691)*x_ref[1]+(0.705059815458)*x_ref[2]**o+(-0.185604633831)*x_ref[2]
-        ref[2,3,2,1]=(0.838829037117)*x_ref[0]**o+(0.670561147563)*x_ref[0]+(0.621407965075)*x_ref[1]**o+(-0.10624946305)*x_ref[1]+(0.893703402687)*x_ref[2]**o+(0.985504995821)*x_ref[2]
-        ref[2,4,0,0]=(0.635072504682)*x_ref[0]**o+(-0.681962427555)*x_ref[0]+(-0.00774518011081)*x_ref[1]**o+(-0.264996228668)*x_ref[1]+(0.690668403198)*x_ref[2]**o+(0.883573761062)*x_ref[2]
-        ref[2,4,0,1]=(0.545632268651)*x_ref[0]**o+(0.439668519394)*x_ref[0]+(-0.482479808491)*x_ref[1]**o+(0.752028962391)*x_ref[1]+(0.0596773623939)*x_ref[2]**o+(-0.369987181127)*x_ref[2]
-        ref[2,4,1,0]=(0.659005322796)*x_ref[0]**o+(0.503940833428)*x_ref[0]+(0.643633321586)*x_ref[1]**o+(0.927082323252)*x_ref[1]+(0.354072146184)*x_ref[2]**o+(-0.638737560608)*x_ref[2]
-        ref[2,4,1,1]=(-0.443548860913)*x_ref[0]**o+(0.707607048458)*x_ref[0]+(-0.955225746402)*x_ref[1]**o+(0.515995563585)*x_ref[1]+(-0.288406637165)*x_ref[2]**o+(-0.760864937318)*x_ref[2]
-        ref[2,4,2,0]=(0.898146580355)*x_ref[0]**o+(-0.590650787106)*x_ref[0]+(0.036095789753)*x_ref[1]**o+(0.326040260581)*x_ref[1]+(0.680069361306)*x_ref[2]**o+(0.333839099341)*x_ref[2]
-        ref[2,4,2,1]=(-0.151364260271)*x_ref[0]**o+(-0.675198183832)*x_ref[0]+(-0.183626298978)*x_ref[1]**o+(-0.182565217146)*x_ref[1]+(0.0345632129814)*x_ref[2]**o+(-0.581534100763)*x_ref[2]
-        ref[3,0,0,0]=(-0.942351703246)*x_ref[0]**o+(-0.699567649453)*x_ref[0]+(-0.832068665702)*x_ref[1]**o+(0.163439416504)*x_ref[1]+(0.742500339519)*x_ref[2]**o+(-0.492882887489)*x_ref[2]
-        ref[3,0,0,1]=(0.990078296484)*x_ref[0]**o+(-0.999837336587)*x_ref[0]+(0.197589456459)*x_ref[1]**o+(0.431403059019)*x_ref[1]+(0.859864015871)*x_ref[2]**o+(-0.267474829282)*x_ref[2]
-        ref[3,0,1,0]=(-0.776773660723)*x_ref[0]**o+(-0.189048370486)*x_ref[0]+(0.926953856802)*x_ref[1]**o+(-0.72314744652)*x_ref[1]+(0.330064363809)*x_ref[2]**o+(0.188533334359)*x_ref[2]
-        ref[3,0,1,1]=(-0.854830058762)*x_ref[0]**o+(0.832073883276)*x_ref[0]+(-0.425691165124)*x_ref[1]**o+(0.162351500316)*x_ref[1]+(0.370604864512)*x_ref[2]**o+(-0.581907071484)*x_ref[2]
-        ref[3,0,2,0]=(-0.316716909548)*x_ref[0]**o+(0.335417284383)*x_ref[0]+(-0.783061160352)*x_ref[1]**o+(-0.253972519239)*x_ref[1]+(-0.826432933721)*x_ref[2]**o+(0.267368378363)*x_ref[2]
-        ref[3,0,2,1]=(-0.765899705462)*x_ref[0]**o+(-0.0993875861476)*x_ref[0]+(-0.211785004352)*x_ref[1]**o+(-0.635330151497)*x_ref[1]+(0.414575412599)*x_ref[2]**o+(0.586882274623)*x_ref[2]
-        ref[3,1,0,0]=(0.987776377237)*x_ref[0]**o+(0.796660669191)*x_ref[0]+(0.580724891862)*x_ref[1]**o+(-0.24149253995)*x_ref[1]+(-0.633421016909)*x_ref[2]**o+(-0.220110913711)*x_ref[2]
-        ref[3,1,0,1]=(-0.182240918081)*x_ref[0]**o+(-0.290526050572)*x_ref[0]+(0.00283230959976)*x_ref[1]**o+(-0.933282166805)*x_ref[1]+(-0.857893235883)*x_ref[2]**o+(0.551414074127)*x_ref[2]
-        ref[3,1,1,0]=(-0.854435997816)*x_ref[0]**o+(0.706455144263)*x_ref[0]+(0.406237965254)*x_ref[1]**o+(0.192071142415)*x_ref[1]+(0.357966796834)*x_ref[2]**o+(0.887011087987)*x_ref[2]
-        ref[3,1,1,1]=(0.832013396996)*x_ref[0]**o+(0.696133072321)*x_ref[0]+(0.682726968712)*x_ref[1]**o+(0.613316240514)*x_ref[1]+(0.12600339887)*x_ref[2]**o+(-0.620088231382)*x_ref[2]
-        ref[3,1,2,0]=(-0.178681615221)*x_ref[0]**o+(-0.952835986168)*x_ref[0]+(0.299692693746)*x_ref[1]**o+(0.892451908416)*x_ref[1]+(0.202403273634)*x_ref[2]**o+(0.677212897943)*x_ref[2]
-        ref[3,1,2,1]=(0.0592594053342)*x_ref[0]**o+(0.56391153959)*x_ref[0]+(-0.874866627667)*x_ref[1]**o+(0.432102900769)*x_ref[1]+(-0.49073126285)*x_ref[2]**o+(-0.010495860028)*x_ref[2]
-        ref[3,2,0,0]=(0.548006445814)*x_ref[0]**o+(0.667313392202)*x_ref[0]+(0.397805355499)*x_ref[1]**o+(-0.788100267808)*x_ref[1]+(0.869234055258)*x_ref[2]**o+(-0.830241520401)*x_ref[2]
-        ref[3,2,0,1]=(0.72586139216)*x_ref[0]**o+(-0.931878957878)*x_ref[0]+(-0.94119555858)*x_ref[1]**o+(-0.133544806169)*x_ref[1]+(0.754263323382)*x_ref[2]**o+(-0.446604740157)*x_ref[2]
-        ref[3,2,1,0]=(-0.28135830707)*x_ref[0]**o+(-0.478744058518)*x_ref[0]+(0.88219033731)*x_ref[1]**o+(0.460587286945)*x_ref[1]+(-0.849692146096)*x_ref[2]**o+(0.0927701345107)*x_ref[2]
-        ref[3,2,1,1]=(-0.681859641611)*x_ref[0]**o+(-0.670164293088)*x_ref[0]+(0.796366374435)*x_ref[1]**o+(0.837230317054)*x_ref[1]+(-0.413283915904)*x_ref[2]**o+(0.779624227187)*x_ref[2]
-        ref[3,2,2,0]=(-0.803242771255)*x_ref[0]**o+(-0.0687616271776)*x_ref[0]+(-0.948856027999)*x_ref[1]**o+(0.762568790931)*x_ref[1]+(0.937588292604)*x_ref[2]**o+(-0.0224232611283)*x_ref[2]
-        ref[3,2,2,1]=(-0.215752944937)*x_ref[0]**o+(-0.807114296075)*x_ref[0]+(0.970625375964)*x_ref[1]**o+(0.68578124692)*x_ref[1]+(-0.165007047419)*x_ref[2]**o+(0.942718439981)*x_ref[2]
-        ref[3,3,0,0]=(0.152001104716)*x_ref[0]**o+(-0.657242342357)*x_ref[0]+(0.559608661705)*x_ref[1]**o+(0.0764403273251)*x_ref[1]+(0.633414754695)*x_ref[2]**o+(0.430777868344)*x_ref[2]
-        ref[3,3,0,1]=(-0.898109497759)*x_ref[0]**o+(0.736574249406)*x_ref[0]+(-0.569584184574)*x_ref[1]**o+(-0.145501395506)*x_ref[1]+(-0.412424116475)*x_ref[2]**o+(-0.416350923096)*x_ref[2]
-        ref[3,3,1,0]=(0.602022795614)*x_ref[0]**o+(-0.848525569825)*x_ref[0]+(-0.713426287505)*x_ref[1]**o+(-0.829278452687)*x_ref[1]+(-0.491257659316)*x_ref[2]**o+(0.90219908999)*x_ref[2]
-        ref[3,3,1,1]=(-0.769110216066)*x_ref[0]**o+(-0.789464037338)*x_ref[0]+(-0.363686172584)*x_ref[1]**o+(-0.86190787068)*x_ref[1]+(0.275438119232)*x_ref[2]**o+(0.285209834248)*x_ref[2]
-        ref[3,3,2,0]=(0.351662405853)*x_ref[0]**o+(0.8403302307)*x_ref[0]+(-0.449869332519)*x_ref[1]**o+(0.936043614838)*x_ref[1]+(-0.656908777335)*x_ref[2]**o+(-0.231923872531)*x_ref[2]
-        ref[3,3,2,1]=(0.873848945653)*x_ref[0]**o+(0.551429883959)*x_ref[0]+(-0.577942548701)*x_ref[1]**o+(-0.254317163049)*x_ref[1]+(0.64878089878)*x_ref[2]**o+(0.7135339515)*x_ref[2]
-        ref[3,4,0,0]=(0.891435610494)*x_ref[0]**o+(0.598893704498)*x_ref[0]+(0.24682094756)*x_ref[1]**o+(0.0895612710338)*x_ref[1]+(-0.513686244953)*x_ref[2]**o+(0.307205505502)*x_ref[2]
-        ref[3,4,0,1]=(-0.577752944196)*x_ref[0]**o+(-0.458383751623)*x_ref[0]+(-0.913956988143)*x_ref[1]**o+(0.470857602235)*x_ref[1]+(0.631726850665)*x_ref[2]**o+(-0.112962289904)*x_ref[2]
-        ref[3,4,1,0]=(-0.65648177489)*x_ref[0]**o+(-0.843530972747)*x_ref[0]+(-0.0332153723809)*x_ref[1]**o+(0.230484263355)*x_ref[1]+(-0.865687508592)*x_ref[2]**o+(0.122751735082)*x_ref[2]
-        ref[3,4,1,1]=(-0.353502640734)*x_ref[0]**o+(-0.816020900282)*x_ref[0]+(0.943688796868)*x_ref[1]**o+(-0.526707881958)*x_ref[1]+(-0.790258298117)*x_ref[2]**o+(-0.748706809042)*x_ref[2]
-        ref[3,4,2,0]=(-0.596345912175)*x_ref[0]**o+(0.872771121837)*x_ref[0]+(0.100107395575)*x_ref[1]**o+(0.950482249217)*x_ref[1]+(0.0487634582783)*x_ref[2]**o+(-0.0285218097887)*x_ref[2]
-        ref[3,4,2,1]=(-0.827443553933)*x_ref[0]**o+(-0.922564800149)*x_ref[0]+(-0.810354385287)*x_ref[1]**o+(0.630079217293)*x_ref[1]+(-0.316280559723)*x_ref[2]**o+(0.977830435871)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(0.142445811229)*x[0]**o+(-0.170111870439)*x[0]+(-0.571150729608)*x[1]**o+(-0.799596368319)*x[1]
-        ref=(0.142445811229)*x_ref[0]**o+(-0.170111870439)*x_ref[0]+(-0.571150729608)*x_ref[1]**o+(-0.799596368319)*x_ref[1]
-      else:
-        arg=(0.131269935442)*x[0]**o+(0.67764849927)*x[0]+(0.199946665)*x[1]**o+(0.775678673404)*x[1]+(-0.818505707274)*x[2]**o+(-0.141160005914)*x[2]
-        ref=(0.131269935442)*x_ref[0]**o+(0.67764849927)*x_ref[0]+(0.199946665)*x_ref[1]**o+(0.775678673404)*x_ref[1]+(-0.818505707274)*x_ref[2]**o+(-0.141160005914)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.271030346059)*x[0]**o+(-0.604054986035)*x[0]+(-0.856492962015)*x[1]**o+(0.229582187423)*x[1]
-        arg[1]=(-0.152539485929)*x[0]**o+(0.936634973224)*x[0]+(0.805016132937)*x[1]**o+(-0.6832854412)*x[1]
-        ref[0]=(-0.271030346059)*x_ref[0]**o+(-0.604054986035)*x_ref[0]+(-0.856492962015)*x_ref[1]**o+(0.229582187423)*x_ref[1]
-        ref[1]=(-0.152539485929)*x_ref[0]**o+(0.936634973224)*x_ref[0]+(0.805016132937)*x_ref[1]**o+(-0.6832854412)*x_ref[1]
-      else:
-        arg[0]=(-0.484580515247)*x[0]**o+(-0.134539997002)*x[0]+(0.589742989514)*x[1]**o+(-0.950803827747)*x[1]+(-0.852976687869)*x[2]**o+(0.0999526415345)*x[2]
-        arg[1]=(-0.863620642149)*x[0]**o+(-0.16255544441)*x[0]+(-0.4963232161)*x[1]**o+(0.180988811217)*x[1]+(-0.787186716126)*x[2]**o+(-0.359825851725)*x[2]
-        ref[0]=(-0.484580515247)*x_ref[0]**o+(-0.134539997002)*x_ref[0]+(0.589742989514)*x_ref[1]**o+(-0.950803827747)*x_ref[1]+(-0.852976687869)*x_ref[2]**o+(0.0999526415345)*x_ref[2]
-        ref[1]=(-0.863620642149)*x_ref[0]**o+(-0.16255544441)*x_ref[0]+(-0.4963232161)*x_ref[1]**o+(0.180988811217)*x_ref[1]+(-0.787186716126)*x_ref[2]**o+(-0.359825851725)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.88064835903)*x[0]**o+(-0.140271048585)*x[0]+(-0.363467917345)*x[1]**o+(0.382530733181)*x[1]
-        arg[0,1]=(0.835096280471)*x[0]**o+(0.132077921375)*x[0]+(-0.814392115734)*x[1]**o+(-0.379227781873)*x[1]
-        arg[0,2]=(0.257391174596)*x[0]**o+(-0.135017751364)*x[0]+(-0.462760793484)*x[1]**o+(-0.332510860616)*x[1]
-        arg[0,3]=(0.303541666957)*x[0]**o+(0.729054207976)*x[0]+(-0.0474210800089)*x[1]**o+(0.213859363809)*x[1]
-        arg[0,4]=(0.564466740909)*x[0]**o+(0.684761789227)*x[0]+(0.432934636771)*x[1]**o+(0.261269614075)*x[1]
-        arg[1,0]=(0.83080596334)*x[0]**o+(0.968795153198)*x[0]+(0.835115581928)*x[1]**o+(-0.134688885728)*x[1]
-        arg[1,1]=(-0.876235093042)*x[0]**o+(-0.43923440557)*x[0]+(-0.641186633503)*x[1]**o+(-0.987129244994)*x[1]
-        arg[1,2]=(-0.994007922096)*x[0]**o+(0.534914510762)*x[0]+(0.754420969331)*x[1]**o+(0.241533891038)*x[1]
-        arg[1,3]=(-0.196027247194)*x[0]**o+(0.962231147494)*x[0]+(-0.819146467532)*x[1]**o+(0.966024528731)*x[1]
-        arg[1,4]=(-0.577014723723)*x[0]**o+(0.350310620855)*x[0]+(0.16266475329)*x[1]**o+(-0.926739533525)*x[1]
-        arg[2,0]=(-0.262964780787)*x[0]**o+(-0.824445469277)*x[0]+(-0.982497605841)*x[1]**o+(0.900080022932)*x[1]
-        arg[2,1]=(0.54409272334)*x[0]**o+(0.789421020125)*x[0]+(0.672239490644)*x[1]**o+(-0.0306885937363)*x[1]
-        arg[2,2]=(-0.130272075526)*x[0]**o+(0.51213564573)*x[0]+(-0.819817699321)*x[1]**o+(-0.259068167835)*x[1]
-        arg[2,3]=(-0.61526267092)*x[0]**o+(-0.504362726269)*x[0]+(0.362429515671)*x[1]**o+(-0.0921852465615)*x[1]
-        arg[2,4]=(-0.344772989987)*x[0]**o+(0.260747743828)*x[0]+(0.474457474131)*x[1]**o+(0.436008642452)*x[1]
-        arg[3,0]=(-0.72740499107)*x[0]**o+(-0.297524430077)*x[0]+(-0.809254720524)*x[1]**o+(-0.230695822532)*x[1]
-        arg[3,1]=(-0.0817042383885)*x[0]**o+(-0.324890823023)*x[0]+(0.923635342281)*x[1]**o+(-0.336825317481)*x[1]
-        arg[3,2]=(-0.872954045409)*x[0]**o+(0.242165239629)*x[0]+(0.919264824591)*x[1]**o+(0.424247774945)*x[1]
-        arg[3,3]=(0.146344350418)*x[0]**o+(-0.705285807962)*x[0]+(-0.0735095471635)*x[1]**o+(-0.464180824267)*x[1]
-        arg[3,4]=(0.624085113245)*x[0]**o+(0.719452515121)*x[0]+(0.28331108038)*x[1]**o+(-0.897435702442)*x[1]
-        ref[0,0]=(-0.88064835903)*x_ref[0]**o+(-0.140271048585)*x_ref[0]+(-0.363467917345)*x_ref[1]**o+(0.382530733181)*x_ref[1]
-        ref[0,1]=(0.835096280471)*x_ref[0]**o+(0.132077921375)*x_ref[0]+(-0.814392115734)*x_ref[1]**o+(-0.379227781873)*x_ref[1]
-        ref[0,2]=(0.257391174596)*x_ref[0]**o+(-0.135017751364)*x_ref[0]+(-0.462760793484)*x_ref[1]**o+(-0.332510860616)*x_ref[1]
-        ref[0,3]=(0.303541666957)*x_ref[0]**o+(0.729054207976)*x_ref[0]+(-0.0474210800089)*x_ref[1]**o+(0.213859363809)*x_ref[1]
-        ref[0,4]=(0.564466740909)*x_ref[0]**o+(0.684761789227)*x_ref[0]+(0.432934636771)*x_ref[1]**o+(0.261269614075)*x_ref[1]
-        ref[1,0]=(0.83080596334)*x_ref[0]**o+(0.968795153198)*x_ref[0]+(0.835115581928)*x_ref[1]**o+(-0.134688885728)*x_ref[1]
-        ref[1,1]=(-0.876235093042)*x_ref[0]**o+(-0.43923440557)*x_ref[0]+(-0.641186633503)*x_ref[1]**o+(-0.987129244994)*x_ref[1]
-        ref[1,2]=(-0.994007922096)*x_ref[0]**o+(0.534914510762)*x_ref[0]+(0.754420969331)*x_ref[1]**o+(0.241533891038)*x_ref[1]
-        ref[1,3]=(-0.196027247194)*x_ref[0]**o+(0.962231147494)*x_ref[0]+(-0.819146467532)*x_ref[1]**o+(0.966024528731)*x_ref[1]
-        ref[1,4]=(-0.577014723723)*x_ref[0]**o+(0.350310620855)*x_ref[0]+(0.16266475329)*x_ref[1]**o+(-0.926739533525)*x_ref[1]
-        ref[2,0]=(-0.262964780787)*x_ref[0]**o+(-0.824445469277)*x_ref[0]+(-0.982497605841)*x_ref[1]**o+(0.900080022932)*x_ref[1]
-        ref[2,1]=(0.54409272334)*x_ref[0]**o+(0.789421020125)*x_ref[0]+(0.672239490644)*x_ref[1]**o+(-0.0306885937363)*x_ref[1]
-        ref[2,2]=(-0.130272075526)*x_ref[0]**o+(0.51213564573)*x_ref[0]+(-0.819817699321)*x_ref[1]**o+(-0.259068167835)*x_ref[1]
-        ref[2,3]=(-0.61526267092)*x_ref[0]**o+(-0.504362726269)*x_ref[0]+(0.362429515671)*x_ref[1]**o+(-0.0921852465615)*x_ref[1]
-        ref[2,4]=(-0.344772989987)*x_ref[0]**o+(0.260747743828)*x_ref[0]+(0.474457474131)*x_ref[1]**o+(0.436008642452)*x_ref[1]
-        ref[3,0]=(-0.72740499107)*x_ref[0]**o+(-0.297524430077)*x_ref[0]+(-0.809254720524)*x_ref[1]**o+(-0.230695822532)*x_ref[1]
-        ref[3,1]=(-0.0817042383885)*x_ref[0]**o+(-0.324890823023)*x_ref[0]+(0.923635342281)*x_ref[1]**o+(-0.336825317481)*x_ref[1]
-        ref[3,2]=(-0.872954045409)*x_ref[0]**o+(0.242165239629)*x_ref[0]+(0.919264824591)*x_ref[1]**o+(0.424247774945)*x_ref[1]
-        ref[3,3]=(0.146344350418)*x_ref[0]**o+(-0.705285807962)*x_ref[0]+(-0.0735095471635)*x_ref[1]**o+(-0.464180824267)*x_ref[1]
-        ref[3,4]=(0.624085113245)*x_ref[0]**o+(0.719452515121)*x_ref[0]+(0.28331108038)*x_ref[1]**o+(-0.897435702442)*x_ref[1]
-      else:
-        arg[0,0]=(0.47332206873)*x[0]**o+(0.20564453167)*x[0]+(-0.175485469473)*x[1]**o+(-0.25166656853)*x[1]+(-0.242693318919)*x[2]**o+(-0.773417228526)*x[2]
-        arg[0,1]=(0.788563488587)*x[0]**o+(0.598162739778)*x[0]+(-0.736463777722)*x[1]**o+(-0.161555683484)*x[1]+(0.480782882175)*x[2]**o+(-0.500552084345)*x[2]
-        arg[0,2]=(-0.207893050318)*x[0]**o+(0.206221241577)*x[0]+(0.306329036151)*x[1]**o+(0.585237890094)*x[1]+(0.0276469766188)*x[2]**o+(0.0502503670529)*x[2]
-        arg[0,3]=(0.914950534537)*x[0]**o+(0.401315333176)*x[0]+(0.245224334898)*x[1]**o+(0.526049350134)*x[1]+(-0.735617023846)*x[2]**o+(-0.674692140531)*x[2]
-        arg[0,4]=(-0.359566330106)*x[0]**o+(-0.279627730979)*x[0]+(-0.08398829656)*x[1]**o+(-0.789678621983)*x[1]+(-0.357374658443)*x[2]**o+(0.795724504883)*x[2]
-        arg[1,0]=(-0.0715278193161)*x[0]**o+(-0.562120168502)*x[0]+(0.428614380101)*x[1]**o+(0.115408373591)*x[1]+(-0.154674397872)*x[2]**o+(0.233468972682)*x[2]
-        arg[1,1]=(0.707445640039)*x[0]**o+(-0.719649334705)*x[0]+(-0.349743923514)*x[1]**o+(0.369262203159)*x[1]+(0.712786695739)*x[2]**o+(-0.962450154391)*x[2]
-        arg[1,2]=(-0.306983094408)*x[0]**o+(-0.933322822964)*x[0]+(-0.525515899443)*x[1]**o+(0.642320930433)*x[1]+(-0.950421802297)*x[2]**o+(-0.392142385683)*x[2]
-        arg[1,3]=(-0.765158324235)*x[0]**o+(-0.362010493356)*x[0]+(-0.918673930909)*x[1]**o+(0.72772784184)*x[1]+(-0.392848438408)*x[2]**o+(0.566119231816)*x[2]
-        arg[1,4]=(0.429984662315)*x[0]**o+(-0.165476415697)*x[0]+(0.778539911928)*x[1]**o+(0.411518911472)*x[1]+(0.418323432603)*x[2]**o+(-0.846495913126)*x[2]
-        arg[2,0]=(-0.836556750858)*x[0]**o+(0.976027316021)*x[0]+(-0.556499096672)*x[1]**o+(0.320038395915)*x[1]+(0.377663884516)*x[2]**o+(0.491202727923)*x[2]
-        arg[2,1]=(-0.329597826951)*x[0]**o+(-0.555819984044)*x[0]+(0.110029358927)*x[1]**o+(-0.737070187836)*x[1]+(-0.587142473737)*x[2]**o+(-0.0388834177112)*x[2]
-        arg[2,2]=(0.442251030646)*x[0]**o+(0.285010574287)*x[0]+(0.603267537331)*x[1]**o+(-0.0776884302384)*x[1]+(-0.123541484708)*x[2]**o+(0.44717125529)*x[2]
-        arg[2,3]=(0.474458930313)*x[0]**o+(0.415947401939)*x[0]+(0.381539850696)*x[1]**o+(-0.307590909422)*x[1]+(0.488348451586)*x[2]**o+(0.336883810306)*x[2]
-        arg[2,4]=(0.804466542611)*x[0]**o+(0.891337158669)*x[0]+(-0.599119487307)*x[1]**o+(-0.92047732727)*x[1]+(-0.251489480657)*x[2]**o+(-0.266483991526)*x[2]
-        arg[3,0]=(-0.733633520827)*x[0]**o+(0.494805537624)*x[0]+(-0.117702558274)*x[1]**o+(-0.000461693303442)*x[1]+(-0.102033981202)*x[2]**o+(-0.772865985272)*x[2]
-        arg[3,1]=(-0.636901276465)*x[0]**o+(-0.436330072041)*x[0]+(0.403048850222)*x[1]**o+(-0.94737100009)*x[1]+(0.781059874101)*x[2]**o+(-0.952781516037)*x[2]
-        arg[3,2]=(-0.489372336164)*x[0]**o+(0.221211043152)*x[0]+(0.793975373906)*x[1]**o+(0.424349965288)*x[1]+(0.453332885662)*x[2]**o+(-0.513541753005)*x[2]
-        arg[3,3]=(-0.700899677836)*x[0]**o+(-0.984271896306)*x[0]+(-0.663909486898)*x[1]**o+(0.461302174316)*x[1]+(-0.906457707724)*x[2]**o+(-0.0440003164038)*x[2]
-        arg[3,4]=(0.838326295366)*x[0]**o+(-0.483407593962)*x[0]+(-0.122458752397)*x[1]**o+(0.607337951095)*x[1]+(0.750481384434)*x[2]**o+(-0.677155633204)*x[2]
-        ref[0,0]=(0.47332206873)*x_ref[0]**o+(0.20564453167)*x_ref[0]+(-0.175485469473)*x_ref[1]**o+(-0.25166656853)*x_ref[1]+(-0.242693318919)*x_ref[2]**o+(-0.773417228526)*x_ref[2]
-        ref[0,1]=(0.788563488587)*x_ref[0]**o+(0.598162739778)*x_ref[0]+(-0.736463777722)*x_ref[1]**o+(-0.161555683484)*x_ref[1]+(0.480782882175)*x_ref[2]**o+(-0.500552084345)*x_ref[2]
-        ref[0,2]=(-0.207893050318)*x_ref[0]**o+(0.206221241577)*x_ref[0]+(0.306329036151)*x_ref[1]**o+(0.585237890094)*x_ref[1]+(0.0276469766188)*x_ref[2]**o+(0.0502503670529)*x_ref[2]
-        ref[0,3]=(0.914950534537)*x_ref[0]**o+(0.401315333176)*x_ref[0]+(0.245224334898)*x_ref[1]**o+(0.526049350134)*x_ref[1]+(-0.735617023846)*x_ref[2]**o+(-0.674692140531)*x_ref[2]
-        ref[0,4]=(-0.359566330106)*x_ref[0]**o+(-0.279627730979)*x_ref[0]+(-0.08398829656)*x_ref[1]**o+(-0.789678621983)*x_ref[1]+(-0.357374658443)*x_ref[2]**o+(0.795724504883)*x_ref[2]
-        ref[1,0]=(-0.0715278193161)*x_ref[0]**o+(-0.562120168502)*x_ref[0]+(0.428614380101)*x_ref[1]**o+(0.115408373591)*x_ref[1]+(-0.154674397872)*x_ref[2]**o+(0.233468972682)*x_ref[2]
-        ref[1,1]=(0.707445640039)*x_ref[0]**o+(-0.719649334705)*x_ref[0]+(-0.349743923514)*x_ref[1]**o+(0.369262203159)*x_ref[1]+(0.712786695739)*x_ref[2]**o+(-0.962450154391)*x_ref[2]
-        ref[1,2]=(-0.306983094408)*x_ref[0]**o+(-0.933322822964)*x_ref[0]+(-0.525515899443)*x_ref[1]**o+(0.642320930433)*x_ref[1]+(-0.950421802297)*x_ref[2]**o+(-0.392142385683)*x_ref[2]
-        ref[1,3]=(-0.765158324235)*x_ref[0]**o+(-0.362010493356)*x_ref[0]+(-0.918673930909)*x_ref[1]**o+(0.72772784184)*x_ref[1]+(-0.392848438408)*x_ref[2]**o+(0.566119231816)*x_ref[2]
-        ref[1,4]=(0.429984662315)*x_ref[0]**o+(-0.165476415697)*x_ref[0]+(0.778539911928)*x_ref[1]**o+(0.411518911472)*x_ref[1]+(0.418323432603)*x_ref[2]**o+(-0.846495913126)*x_ref[2]
-        ref[2,0]=(-0.836556750858)*x_ref[0]**o+(0.976027316021)*x_ref[0]+(-0.556499096672)*x_ref[1]**o+(0.320038395915)*x_ref[1]+(0.377663884516)*x_ref[2]**o+(0.491202727923)*x_ref[2]
-        ref[2,1]=(-0.329597826951)*x_ref[0]**o+(-0.555819984044)*x_ref[0]+(0.110029358927)*x_ref[1]**o+(-0.737070187836)*x_ref[1]+(-0.587142473737)*x_ref[2]**o+(-0.0388834177112)*x_ref[2]
-        ref[2,2]=(0.442251030646)*x_ref[0]**o+(0.285010574287)*x_ref[0]+(0.603267537331)*x_ref[1]**o+(-0.0776884302384)*x_ref[1]+(-0.123541484708)*x_ref[2]**o+(0.44717125529)*x_ref[2]
-        ref[2,3]=(0.474458930313)*x_ref[0]**o+(0.415947401939)*x_ref[0]+(0.381539850696)*x_ref[1]**o+(-0.307590909422)*x_ref[1]+(0.488348451586)*x_ref[2]**o+(0.336883810306)*x_ref[2]
-        ref[2,4]=(0.804466542611)*x_ref[0]**o+(0.891337158669)*x_ref[0]+(-0.599119487307)*x_ref[1]**o+(-0.92047732727)*x_ref[1]+(-0.251489480657)*x_ref[2]**o+(-0.266483991526)*x_ref[2]
-        ref[3,0]=(-0.733633520827)*x_ref[0]**o+(0.494805537624)*x_ref[0]+(-0.117702558274)*x_ref[1]**o+(-0.000461693303442)*x_ref[1]+(-0.102033981202)*x_ref[2]**o+(-0.772865985272)*x_ref[2]
-        ref[3,1]=(-0.636901276465)*x_ref[0]**o+(-0.436330072041)*x_ref[0]+(0.403048850222)*x_ref[1]**o+(-0.94737100009)*x_ref[1]+(0.781059874101)*x_ref[2]**o+(-0.952781516037)*x_ref[2]
-        ref[3,2]=(-0.489372336164)*x_ref[0]**o+(0.221211043152)*x_ref[0]+(0.793975373906)*x_ref[1]**o+(0.424349965288)*x_ref[1]+(0.453332885662)*x_ref[2]**o+(-0.513541753005)*x_ref[2]
-        ref[3,3]=(-0.700899677836)*x_ref[0]**o+(-0.984271896306)*x_ref[0]+(-0.663909486898)*x_ref[1]**o+(0.461302174316)*x_ref[1]+(-0.906457707724)*x_ref[2]**o+(-0.0440003164038)*x_ref[2]
-        ref[3,4]=(0.838326295366)*x_ref[0]**o+(-0.483407593962)*x_ref[0]+(-0.122458752397)*x_ref[1]**o+(0.607337951095)*x_ref[1]+(0.750481384434)*x_ref[2]**o+(-0.677155633204)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.111473275114)*x[0]**o+(-0.552264448532)*x[0]+(0.67142534913)*x[1]**o+(-0.642305751076)*x[1]
-        arg[0,0,1]=(-0.431075800974)*x[0]**o+(0.911382078454)*x[0]+(0.546541644612)*x[1]**o+(-0.67679652536)*x[1]
-        arg[0,1,0]=(0.103056292292)*x[0]**o+(-0.640858804416)*x[0]+(0.159596964992)*x[1]**o+(-0.237782007316)*x[1]
-        arg[0,1,1]=(0.975898170389)*x[0]**o+(0.255916326383)*x[0]+(-0.692770462322)*x[1]**o+(0.786355114846)*x[1]
-        arg[1,0,0]=(-0.669378370759)*x[0]**o+(-0.0153788709146)*x[0]+(0.924383188557)*x[1]**o+(0.885037556829)*x[1]
-        arg[1,0,1]=(-0.509891819881)*x[0]**o+(-0.377779514697)*x[0]+(-0.343176473036)*x[1]**o+(-0.39978416725)*x[1]
-        arg[1,1,0]=(0.457959467665)*x[0]**o+(0.786511967341)*x[0]+(0.256561665146)*x[1]**o+(-0.261300099643)*x[1]
-        arg[1,1,1]=(0.219754515189)*x[0]**o+(-0.131747762867)*x[0]+(0.736017818893)*x[1]**o+(-0.450963700533)*x[1]
-        arg[2,0,0]=(-0.182946832789)*x[0]**o+(-0.103064731935)*x[0]+(-0.223584334222)*x[1]**o+(-0.578088201628)*x[1]
-        arg[2,0,1]=(-0.830744157425)*x[0]**o+(0.590627167207)*x[0]+(-0.538048378049)*x[1]**o+(-0.0529793352741)*x[1]
-        arg[2,1,0]=(-0.307908670388)*x[0]**o+(-0.929987734045)*x[0]+(-0.167190563092)*x[1]**o+(0.126466628227)*x[1]
-        arg[2,1,1]=(-0.812045378916)*x[0]**o+(0.676973938072)*x[0]+(0.528243909204)*x[1]**o+(-0.594241387691)*x[1]
-        arg[3,0,0]=(-0.0198606164114)*x[0]**o+(-0.00574708685554)*x[0]+(0.908946312745)*x[1]**o+(0.775054099788)*x[1]
-        arg[3,0,1]=(-0.810078120518)*x[0]**o+(-0.960585888485)*x[0]+(-0.0747272427198)*x[1]**o+(0.164107641817)*x[1]
-        arg[3,1,0]=(-0.535791917139)*x[0]**o+(0.0424226440074)*x[0]+(0.701479263902)*x[1]**o+(0.787745423088)*x[1]
-        arg[3,1,1]=(-0.896532152793)*x[0]**o+(-0.0224566920251)*x[0]+(-0.554655626689)*x[1]**o+(0.41012867952)*x[1]
-        arg[4,0,0]=(0.972433817496)*x[0]**o+(-0.440662536033)*x[0]+(-0.910456530943)*x[1]**o+(-0.333429535028)*x[1]
-        arg[4,0,1]=(-0.415824313942)*x[0]**o+(0.00255557712922)*x[0]+(0.304897639195)*x[1]**o+(-0.866600848052)*x[1]
-        arg[4,1,0]=(-0.866277739076)*x[0]**o+(0.282976169776)*x[0]+(0.477528278501)*x[1]**o+(-0.233506497695)*x[1]
-        arg[4,1,1]=(-0.12729626381)*x[0]**o+(-0.723204796785)*x[0]+(0.0856495713442)*x[1]**o+(-0.214819437731)*x[1]
-        arg[5,0,0]=(0.208133503644)*x[0]**o+(-0.955529202895)*x[0]+(0.0291569127831)*x[1]**o+(0.489913918305)*x[1]
-        arg[5,0,1]=(0.96923667477)*x[0]**o+(0.543776525315)*x[0]+(0.38666450029)*x[1]**o+(-0.193493550272)*x[1]
-        arg[5,1,0]=(-0.0912940016888)*x[0]**o+(-0.477561072681)*x[0]+(0.474816021613)*x[1]**o+(-0.252664229253)*x[1]
-        arg[5,1,1]=(0.748337265159)*x[0]**o+(-0.706194454618)*x[0]+(-0.504466281507)*x[1]**o+(0.582500817679)*x[1]
-        ref[0,0,0]=(0.111473275114)*x_ref[0]**o+(-0.552264448532)*x_ref[0]+(0.67142534913)*x_ref[1]**o+(-0.642305751076)*x_ref[1]
-        ref[0,0,1]=(-0.431075800974)*x_ref[0]**o+(0.911382078454)*x_ref[0]+(0.546541644612)*x_ref[1]**o+(-0.67679652536)*x_ref[1]
-        ref[0,1,0]=(0.103056292292)*x_ref[0]**o+(-0.640858804416)*x_ref[0]+(0.159596964992)*x_ref[1]**o+(-0.237782007316)*x_ref[1]
-        ref[0,1,1]=(0.975898170389)*x_ref[0]**o+(0.255916326383)*x_ref[0]+(-0.692770462322)*x_ref[1]**o+(0.786355114846)*x_ref[1]
-        ref[1,0,0]=(-0.669378370759)*x_ref[0]**o+(-0.0153788709146)*x_ref[0]+(0.924383188557)*x_ref[1]**o+(0.885037556829)*x_ref[1]
-        ref[1,0,1]=(-0.509891819881)*x_ref[0]**o+(-0.377779514697)*x_ref[0]+(-0.343176473036)*x_ref[1]**o+(-0.39978416725)*x_ref[1]
-        ref[1,1,0]=(0.457959467665)*x_ref[0]**o+(0.786511967341)*x_ref[0]+(0.256561665146)*x_ref[1]**o+(-0.261300099643)*x_ref[1]
-        ref[1,1,1]=(0.219754515189)*x_ref[0]**o+(-0.131747762867)*x_ref[0]+(0.736017818893)*x_ref[1]**o+(-0.450963700533)*x_ref[1]
-        ref[2,0,0]=(-0.182946832789)*x_ref[0]**o+(-0.103064731935)*x_ref[0]+(-0.223584334222)*x_ref[1]**o+(-0.578088201628)*x_ref[1]
-        ref[2,0,1]=(-0.830744157425)*x_ref[0]**o+(0.590627167207)*x_ref[0]+(-0.538048378049)*x_ref[1]**o+(-0.0529793352741)*x_ref[1]
-        ref[2,1,0]=(-0.307908670388)*x_ref[0]**o+(-0.929987734045)*x_ref[0]+(-0.167190563092)*x_ref[1]**o+(0.126466628227)*x_ref[1]
-        ref[2,1,1]=(-0.812045378916)*x_ref[0]**o+(0.676973938072)*x_ref[0]+(0.528243909204)*x_ref[1]**o+(-0.594241387691)*x_ref[1]
-        ref[3,0,0]=(-0.0198606164114)*x_ref[0]**o+(-0.00574708685554)*x_ref[0]+(0.908946312745)*x_ref[1]**o+(0.775054099788)*x_ref[1]
-        ref[3,0,1]=(-0.810078120518)*x_ref[0]**o+(-0.960585888485)*x_ref[0]+(-0.0747272427198)*x_ref[1]**o+(0.164107641817)*x_ref[1]
-        ref[3,1,0]=(-0.535791917139)*x_ref[0]**o+(0.0424226440074)*x_ref[0]+(0.701479263902)*x_ref[1]**o+(0.787745423088)*x_ref[1]
-        ref[3,1,1]=(-0.896532152793)*x_ref[0]**o+(-0.0224566920251)*x_ref[0]+(-0.554655626689)*x_ref[1]**o+(0.41012867952)*x_ref[1]
-        ref[4,0,0]=(0.972433817496)*x_ref[0]**o+(-0.440662536033)*x_ref[0]+(-0.910456530943)*x_ref[1]**o+(-0.333429535028)*x_ref[1]
-        ref[4,0,1]=(-0.415824313942)*x_ref[0]**o+(0.00255557712922)*x_ref[0]+(0.304897639195)*x_ref[1]**o+(-0.866600848052)*x_ref[1]
-        ref[4,1,0]=(-0.866277739076)*x_ref[0]**o+(0.282976169776)*x_ref[0]+(0.477528278501)*x_ref[1]**o+(-0.233506497695)*x_ref[1]
-        ref[4,1,1]=(-0.12729626381)*x_ref[0]**o+(-0.723204796785)*x_ref[0]+(0.0856495713442)*x_ref[1]**o+(-0.214819437731)*x_ref[1]
-        ref[5,0,0]=(0.208133503644)*x_ref[0]**o+(-0.955529202895)*x_ref[0]+(0.0291569127831)*x_ref[1]**o+(0.489913918305)*x_ref[1]
-        ref[5,0,1]=(0.96923667477)*x_ref[0]**o+(0.543776525315)*x_ref[0]+(0.38666450029)*x_ref[1]**o+(-0.193493550272)*x_ref[1]
-        ref[5,1,0]=(-0.0912940016888)*x_ref[0]**o+(-0.477561072681)*x_ref[0]+(0.474816021613)*x_ref[1]**o+(-0.252664229253)*x_ref[1]
-        ref[5,1,1]=(0.748337265159)*x_ref[0]**o+(-0.706194454618)*x_ref[0]+(-0.504466281507)*x_ref[1]**o+(0.582500817679)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.179972720095)*x[0]**o+(-0.546715268523)*x[0]+(0.835867431319)*x[1]**o+(0.626798499259)*x[1]+(0.397356013278)*x[2]**o+(0.0771586784158)*x[2]
-        arg[0,0,1]=(0.625676031039)*x[0]**o+(0.65843849475)*x[0]+(0.456469199307)*x[1]**o+(-0.970709759479)*x[1]+(-0.699606143992)*x[2]**o+(0.76429400724)*x[2]
-        arg[0,1,0]=(0.613916424165)*x[0]**o+(0.556778588303)*x[0]+(-0.509658743529)*x[1]**o+(-0.978718968218)*x[1]+(-0.603928369428)*x[2]**o+(-0.550813953692)*x[2]
-        arg[0,1,1]=(-0.935214755436)*x[0]**o+(0.44745901813)*x[0]+(-0.582828846453)*x[1]**o+(-0.181547183233)*x[1]+(-0.183912053485)*x[2]**o+(0.446152494296)*x[2]
-        arg[1,0,0]=(-0.486345219779)*x[0]**o+(0.753529436833)*x[0]+(0.138157856552)*x[1]**o+(-0.874849020539)*x[1]+(0.374396543792)*x[2]**o+(0.26548456046)*x[2]
-        arg[1,0,1]=(0.492908753036)*x[0]**o+(-0.418118685105)*x[0]+(0.880817569823)*x[1]**o+(-0.827691145524)*x[1]+(0.238633156133)*x[2]**o+(-0.463687731341)*x[2]
-        arg[1,1,0]=(-0.397373578442)*x[0]**o+(-0.316321105607)*x[0]+(0.647511225459)*x[1]**o+(-0.82553752195)*x[1]+(-0.715549303171)*x[2]**o+(0.804623957459)*x[2]
-        arg[1,1,1]=(0.414743130234)*x[0]**o+(0.0201794413683)*x[0]+(-0.636337599584)*x[1]**o+(-0.230053616026)*x[1]+(-0.4302153311)*x[2]**o+(-0.387468029626)*x[2]
-        arg[2,0,0]=(0.715100517336)*x[0]**o+(-0.4286120178)*x[0]+(0.0987858542117)*x[1]**o+(0.815093470301)*x[1]+(0.293455353257)*x[2]**o+(0.200576090379)*x[2]
-        arg[2,0,1]=(-0.158330015822)*x[0]**o+(0.363339023457)*x[0]+(-0.796055594971)*x[1]**o+(-0.213299205306)*x[1]+(-0.136620988812)*x[2]**o+(0.10733886947)*x[2]
-        arg[2,1,0]=(-0.258729405118)*x[0]**o+(0.0669553480038)*x[0]+(0.997663166613)*x[1]**o+(0.00398861063931)*x[1]+(-0.989459856803)*x[2]**o+(0.932687384325)*x[2]
-        arg[2,1,1]=(-0.974431322319)*x[0]**o+(-0.486447431804)*x[0]+(0.871784873347)*x[1]**o+(-0.978904038765)*x[1]+(0.647341201506)*x[2]**o+(-0.269683556528)*x[2]
-        arg[3,0,0]=(-0.369507398073)*x[0]**o+(-0.772085607074)*x[0]+(0.417550881937)*x[1]**o+(0.271743719652)*x[1]+(0.881807154737)*x[2]**o+(0.54725428039)*x[2]
-        arg[3,0,1]=(0.440089335941)*x[0]**o+(0.0844171421294)*x[0]+(0.926389704362)*x[1]**o+(-0.0709182998297)*x[1]+(0.903978660317)*x[2]**o+(-0.160556206716)*x[2]
-        arg[3,1,0]=(-0.49936391282)*x[0]**o+(-0.632753931881)*x[0]+(-0.604686084554)*x[1]**o+(-0.954205199531)*x[1]+(-0.535102184845)*x[2]**o+(0.621683814123)*x[2]
-        arg[3,1,1]=(-0.117790973132)*x[0]**o+(-0.649091727896)*x[0]+(0.925682916785)*x[1]**o+(0.852053515469)*x[1]+(-0.479218429897)*x[2]**o+(0.426823478575)*x[2]
-        arg[4,0,0]=(0.454174564319)*x[0]**o+(-0.855975647406)*x[0]+(0.775972969288)*x[1]**o+(0.267900999893)*x[1]+(0.221387501995)*x[2]**o+(-0.26413791201)*x[2]
-        arg[4,0,1]=(0.875191302431)*x[0]**o+(-0.362782502152)*x[0]+(0.24600070339)*x[1]**o+(-0.566709533298)*x[1]+(-0.82187455531)*x[2]**o+(-0.943929640301)*x[2]
-        arg[4,1,0]=(-0.409313259973)*x[0]**o+(-0.784833509001)*x[0]+(-0.939690505056)*x[1]**o+(-0.0736280226974)*x[1]+(0.939072745486)*x[2]**o+(0.611697159959)*x[2]
-        arg[4,1,1]=(0.893374246808)*x[0]**o+(0.36113513561)*x[0]+(0.227899271271)*x[1]**o+(-0.847221657012)*x[1]+(-0.0106368947417)*x[2]**o+(0.0358896817595)*x[2]
-        arg[5,0,0]=(0.0329230524924)*x[0]**o+(0.0565192084014)*x[0]+(-0.68398448658)*x[1]**o+(0.909035618076)*x[1]+(-0.900060440872)*x[2]**o+(-0.481014787833)*x[2]
-        arg[5,0,1]=(0.404966692391)*x[0]**o+(0.647468764373)*x[0]+(-0.723847499346)*x[1]**o+(-0.0740896957606)*x[1]+(-0.00628515079923)*x[2]**o+(0.906667863539)*x[2]
-        arg[5,1,0]=(0.983181781531)*x[0]**o+(-0.297325990236)*x[0]+(0.00489064543352)*x[1]**o+(0.667560767038)*x[1]+(-0.665768141301)*x[2]**o+(0.772761393608)*x[2]
-        arg[5,1,1]=(-0.496581691354)*x[0]**o+(0.0121337979505)*x[0]+(0.492281382726)*x[1]**o+(0.545232714025)*x[1]+(0.418321481532)*x[2]**o+(0.489635969764)*x[2]
-        ref[0,0,0]=(-0.179972720095)*x_ref[0]**o+(-0.546715268523)*x_ref[0]+(0.835867431319)*x_ref[1]**o+(0.626798499259)*x_ref[1]+(0.397356013278)*x_ref[2]**o+(0.0771586784158)*x_ref[2]
-        ref[0,0,1]=(0.625676031039)*x_ref[0]**o+(0.65843849475)*x_ref[0]+(0.456469199307)*x_ref[1]**o+(-0.970709759479)*x_ref[1]+(-0.699606143992)*x_ref[2]**o+(0.76429400724)*x_ref[2]
-        ref[0,1,0]=(0.613916424165)*x_ref[0]**o+(0.556778588303)*x_ref[0]+(-0.509658743529)*x_ref[1]**o+(-0.978718968218)*x_ref[1]+(-0.603928369428)*x_ref[2]**o+(-0.550813953692)*x_ref[2]
-        ref[0,1,1]=(-0.935214755436)*x_ref[0]**o+(0.44745901813)*x_ref[0]+(-0.582828846453)*x_ref[1]**o+(-0.181547183233)*x_ref[1]+(-0.183912053485)*x_ref[2]**o+(0.446152494296)*x_ref[2]
-        ref[1,0,0]=(-0.486345219779)*x_ref[0]**o+(0.753529436833)*x_ref[0]+(0.138157856552)*x_ref[1]**o+(-0.874849020539)*x_ref[1]+(0.374396543792)*x_ref[2]**o+(0.26548456046)*x_ref[2]
-        ref[1,0,1]=(0.492908753036)*x_ref[0]**o+(-0.418118685105)*x_ref[0]+(0.880817569823)*x_ref[1]**o+(-0.827691145524)*x_ref[1]+(0.238633156133)*x_ref[2]**o+(-0.463687731341)*x_ref[2]
-        ref[1,1,0]=(-0.397373578442)*x_ref[0]**o+(-0.316321105607)*x_ref[0]+(0.647511225459)*x_ref[1]**o+(-0.82553752195)*x_ref[1]+(-0.715549303171)*x_ref[2]**o+(0.804623957459)*x_ref[2]
-        ref[1,1,1]=(0.414743130234)*x_ref[0]**o+(0.0201794413683)*x_ref[0]+(-0.636337599584)*x_ref[1]**o+(-0.230053616026)*x_ref[1]+(-0.4302153311)*x_ref[2]**o+(-0.387468029626)*x_ref[2]
-        ref[2,0,0]=(0.715100517336)*x_ref[0]**o+(-0.4286120178)*x_ref[0]+(0.0987858542117)*x_ref[1]**o+(0.815093470301)*x_ref[1]+(0.293455353257)*x_ref[2]**o+(0.200576090379)*x_ref[2]
-        ref[2,0,1]=(-0.158330015822)*x_ref[0]**o+(0.363339023457)*x_ref[0]+(-0.796055594971)*x_ref[1]**o+(-0.213299205306)*x_ref[1]+(-0.136620988812)*x_ref[2]**o+(0.10733886947)*x_ref[2]
-        ref[2,1,0]=(-0.258729405118)*x_ref[0]**o+(0.0669553480038)*x_ref[0]+(0.997663166613)*x_ref[1]**o+(0.00398861063931)*x_ref[1]+(-0.989459856803)*x_ref[2]**o+(0.932687384325)*x_ref[2]
-        ref[2,1,1]=(-0.974431322319)*x_ref[0]**o+(-0.486447431804)*x_ref[0]+(0.871784873347)*x_ref[1]**o+(-0.978904038765)*x_ref[1]+(0.647341201506)*x_ref[2]**o+(-0.269683556528)*x_ref[2]
-        ref[3,0,0]=(-0.369507398073)*x_ref[0]**o+(-0.772085607074)*x_ref[0]+(0.417550881937)*x_ref[1]**o+(0.271743719652)*x_ref[1]+(0.881807154737)*x_ref[2]**o+(0.54725428039)*x_ref[2]
-        ref[3,0,1]=(0.440089335941)*x_ref[0]**o+(0.0844171421294)*x_ref[0]+(0.926389704362)*x_ref[1]**o+(-0.0709182998297)*x_ref[1]+(0.903978660317)*x_ref[2]**o+(-0.160556206716)*x_ref[2]
-        ref[3,1,0]=(-0.49936391282)*x_ref[0]**o+(-0.632753931881)*x_ref[0]+(-0.604686084554)*x_ref[1]**o+(-0.954205199531)*x_ref[1]+(-0.535102184845)*x_ref[2]**o+(0.621683814123)*x_ref[2]
-        ref[3,1,1]=(-0.117790973132)*x_ref[0]**o+(-0.649091727896)*x_ref[0]+(0.925682916785)*x_ref[1]**o+(0.852053515469)*x_ref[1]+(-0.479218429897)*x_ref[2]**o+(0.426823478575)*x_ref[2]
-        ref[4,0,0]=(0.454174564319)*x_ref[0]**o+(-0.855975647406)*x_ref[0]+(0.775972969288)*x_ref[1]**o+(0.267900999893)*x_ref[1]+(0.221387501995)*x_ref[2]**o+(-0.26413791201)*x_ref[2]
-        ref[4,0,1]=(0.875191302431)*x_ref[0]**o+(-0.362782502152)*x_ref[0]+(0.24600070339)*x_ref[1]**o+(-0.566709533298)*x_ref[1]+(-0.82187455531)*x_ref[2]**o+(-0.943929640301)*x_ref[2]
-        ref[4,1,0]=(-0.409313259973)*x_ref[0]**o+(-0.784833509001)*x_ref[0]+(-0.939690505056)*x_ref[1]**o+(-0.0736280226974)*x_ref[1]+(0.939072745486)*x_ref[2]**o+(0.611697159959)*x_ref[2]
-        ref[4,1,1]=(0.893374246808)*x_ref[0]**o+(0.36113513561)*x_ref[0]+(0.227899271271)*x_ref[1]**o+(-0.847221657012)*x_ref[1]+(-0.0106368947417)*x_ref[2]**o+(0.0358896817595)*x_ref[2]
-        ref[5,0,0]=(0.0329230524924)*x_ref[0]**o+(0.0565192084014)*x_ref[0]+(-0.68398448658)*x_ref[1]**o+(0.909035618076)*x_ref[1]+(-0.900060440872)*x_ref[2]**o+(-0.481014787833)*x_ref[2]
-        ref[5,0,1]=(0.404966692391)*x_ref[0]**o+(0.647468764373)*x_ref[0]+(-0.723847499346)*x_ref[1]**o+(-0.0740896957606)*x_ref[1]+(-0.00628515079923)*x_ref[2]**o+(0.906667863539)*x_ref[2]
-        ref[5,1,0]=(0.983181781531)*x_ref[0]**o+(-0.297325990236)*x_ref[0]+(0.00489064543352)*x_ref[1]**o+(0.667560767038)*x_ref[1]+(-0.665768141301)*x_ref[2]**o+(0.772761393608)*x_ref[2]
-        ref[5,1,1]=(-0.496581691354)*x_ref[0]**o+(0.0121337979505)*x_ref[0]+(0.492281382726)*x_ref[1]**o+(0.545232714025)*x_ref[1]+(0.418321481532)*x_ref[2]**o+(0.489635969764)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactZero
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.282394950702)*x[0]**o+(0.836580157584)*x[0]+(0.337652262648)*x[1]**o+(-0.442694263325)*x[1]
-        arg[0,0,0,1]=(0.85150774028)*x[0]**o+(0.998297296593)*x[0]+(-0.710029954342)*x[1]**o+(0.0816168287837)*x[1]
-        arg[0,0,1,0]=(-0.636435102838)*x[0]**o+(-0.613479863553)*x[0]+(-0.861506513168)*x[1]**o+(-0.242998961478)*x[1]
-        arg[0,0,1,1]=(-0.00671863978521)*x[0]**o+(0.909404084068)*x[0]+(-0.734956067026)*x[1]**o+(0.256530538264)*x[1]
-        arg[0,0,2,0]=(-0.646631608999)*x[0]**o+(-0.521130455843)*x[0]+(-0.44328404557)*x[1]**o+(-0.156860325817)*x[1]
-        arg[0,0,2,1]=(-0.817550008949)*x[0]**o+(0.702414497795)*x[0]+(0.946449680763)*x[1]**o+(-0.61576361925)*x[1]
-        arg[0,1,0,0]=(-0.527206691595)*x[0]**o+(-0.43469216984)*x[0]+(-0.108455901154)*x[1]**o+(0.435646962156)*x[1]
-        arg[0,1,0,1]=(-0.148522219535)*x[0]**o+(0.146912249755)*x[0]+(-0.414934945665)*x[1]**o+(-0.422754988714)*x[1]
-        arg[0,1,1,0]=(0.177760972947)*x[0]**o+(-0.938522530862)*x[0]+(0.566229652264)*x[1]**o+(0.255269743628)*x[1]
-        arg[0,1,1,1]=(-0.317807933792)*x[0]**o+(0.432181451246)*x[0]+(-0.358821513362)*x[1]**o+(-0.470517232585)*x[1]
-        arg[0,1,2,0]=(0.486536430227)*x[0]**o+(-0.533653809349)*x[0]+(-0.126612514045)*x[1]**o+(0.103088115487)*x[1]
-        arg[0,1,2,1]=(-0.995976559589)*x[0]**o+(0.965537167421)*x[0]+(-0.351307699531)*x[1]**o+(-0.684367434666)*x[1]
-        arg[0,2,0,0]=(0.976008613768)*x[0]**o+(-0.890573007002)*x[0]+(-0.440709423944)*x[1]**o+(0.315724459367)*x[1]
-        arg[0,2,0,1]=(-0.595275811962)*x[0]**o+(-0.599634144509)*x[0]+(0.646466002346)*x[1]**o+(-0.94529568651)*x[1]
-        arg[0,2,1,0]=(0.977691521821)*x[0]**o+(-0.0730997643682)*x[0]+(-0.338897498737)*x[1]**o+(0.246308678824)*x[1]
-        arg[0,2,1,1]=(-0.111317410732)*x[0]**o+(-0.574381793398)*x[0]+(-0.0314431899843)*x[1]**o+(0.393105047096)*x[1]
-        arg[0,2,2,0]=(0.886320020757)*x[0]**o+(-0.785042003544)*x[0]+(0.82609269979)*x[1]**o+(-0.677169484337)*x[1]
-        arg[0,2,2,1]=(0.811027138079)*x[0]**o+(-0.375108470948)*x[0]+(0.781472464253)*x[1]**o+(0.217640794143)*x[1]
-        arg[0,3,0,0]=(0.264884117091)*x[0]**o+(0.116591319557)*x[0]+(0.282667679763)*x[1]**o+(0.111123454337)*x[1]
-        arg[0,3,0,1]=(0.0451626985922)*x[0]**o+(-0.93771279728)*x[0]+(0.129171764072)*x[1]**o+(0.598367954162)*x[1]
-        arg[0,3,1,0]=(0.905243511086)*x[0]**o+(0.0837062573586)*x[0]+(0.0657223248433)*x[1]**o+(-0.746644690072)*x[1]
-        arg[0,3,1,1]=(-0.0547856755485)*x[0]**o+(-0.22157806755)*x[0]+(0.124623625108)*x[1]**o+(0.0436590157081)*x[1]
-        arg[0,3,2,0]=(-0.558323744577)*x[0]**o+(-0.646043519007)*x[0]+(0.991885458004)*x[1]**o+(-0.634140808163)*x[1]
-        arg[0,3,2,1]=(-0.27247983028)*x[0]**o+(0.803906404485)*x[0]+(-0.816826609924)*x[1]**o+(-0.969532783336)*x[1]
-        arg[0,4,0,0]=(0.638733842891)*x[0]**o+(-0.972793270208)*x[0]+(0.714611008099)*x[1]**o+(0.586988595847)*x[1]
-        arg[0,4,0,1]=(0.63584760734)*x[0]**o+(-0.653740236747)*x[0]+(-0.596304731446)*x[1]**o+(0.42519786429)*x[1]
-        arg[0,4,1,0]=(0.0665562973529)*x[0]**o+(0.362152092093)*x[0]+(0.732530335739)*x[1]**o+(0.618536326941)*x[1]
-        arg[0,4,1,1]=(0.486060667608)*x[0]**o+(0.59489013279)*x[0]+(-0.547237017498)*x[1]**o+(0.0371894705857)*x[1]
-        arg[0,4,2,0]=(0.395505844397)*x[0]**o+(-0.869090434535)*x[0]+(-0.606640827437)*x[1]**o+(0.269995459083)*x[1]
-        arg[0,4,2,1]=(0.304671547176)*x[0]**o+(-0.515772523849)*x[0]+(0.546114300876)*x[1]**o+(0.530247404341)*x[1]
-        arg[1,0,0,0]=(0.408332677433)*x[0]**o+(-0.0778807359918)*x[0]+(-0.803337489297)*x[1]**o+(-0.123835718422)*x[1]
-        arg[1,0,0,1]=(-0.00441620254944)*x[0]**o+(0.0321259598831)*x[0]+(-0.998381508472)*x[1]**o+(0.800767747511)*x[1]
-        arg[1,0,1,0]=(-0.923683057418)*x[0]**o+(0.579405114902)*x[0]+(-0.939639823585)*x[1]**o+(-0.138423358134)*x[1]
-        arg[1,0,1,1]=(-0.558420234848)*x[0]**o+(0.133316569813)*x[0]+(-0.294134717329)*x[1]**o+(-0.750897749044)*x[1]
-        arg[1,0,2,0]=(0.478951298545)*x[0]**o+(-0.807173978799)*x[0]+(0.852438146763)*x[1]**o+(-0.103814229563)*x[1]
-        arg[1,0,2,1]=(-0.875250726603)*x[0]**o+(-0.934803428491)*x[0]+(0.143352873672)*x[1]**o+(0.600934881206)*x[1]
-        arg[1,1,0,0]=(-0.0539476321018)*x[0]**o+(0.194177663417)*x[0]+(-0.862877991009)*x[1]**o+(-0.438337993664)*x[1]
-        arg[1,1,0,1]=(-0.623379355474)*x[0]**o+(-0.0746994739748)*x[0]+(0.365005438956)*x[1]**o+(-0.431737688205)*x[1]
-        arg[1,1,1,0]=(0.0936054461735)*x[0]**o+(-0.974594269446)*x[0]+(-0.121917598428)*x[1]**o+(-0.84429083727)*x[1]
-        arg[1,1,1,1]=(0.967763348672)*x[0]**o+(0.331698826475)*x[0]+(0.66448515877)*x[1]**o+(0.00214985930661)*x[1]
-        arg[1,1,2,0]=(-0.312146580762)*x[0]**o+(0.998152287706)*x[0]+(-0.474242942777)*x[1]**o+(0.637827347846)*x[1]
-        arg[1,1,2,1]=(-0.556765443436)*x[0]**o+(0.227327929774)*x[0]+(0.739457845569)*x[1]**o+(-0.615070017663)*x[1]
-        arg[1,2,0,0]=(-0.23030660552)*x[0]**o+(0.750479465953)*x[0]+(0.278215408392)*x[1]**o+(-0.640618698224)*x[1]
-        arg[1,2,0,1]=(-0.0713217101129)*x[0]**o+(0.500737477887)*x[0]+(-0.972834770005)*x[1]**o+(-0.420386056033)*x[1]
-        arg[1,2,1,0]=(-0.497322989847)*x[0]**o+(-0.528685124841)*x[0]+(-0.934386348496)*x[1]**o+(0.191930553839)*x[1]
-        arg[1,2,1,1]=(0.124362419781)*x[0]**o+(-0.0457849787456)*x[0]+(-0.360596154712)*x[1]**o+(0.799736253715)*x[1]
-        arg[1,2,2,0]=(-0.346294878893)*x[0]**o+(0.427772309361)*x[0]+(-0.0642666791012)*x[1]**o+(-0.214442238311)*x[1]
-        arg[1,2,2,1]=(0.24434837411)*x[0]**o+(-0.913373159786)*x[0]+(0.158750862391)*x[1]**o+(-0.544328807576)*x[1]
-        arg[1,3,0,0]=(0.870847002687)*x[0]**o+(-0.466884462301)*x[0]+(-0.343358829445)*x[1]**o+(-0.180956419766)*x[1]
-        arg[1,3,0,1]=(-0.813518850863)*x[0]**o+(0.960810467501)*x[0]+(0.35091416904)*x[1]**o+(0.84534544948)*x[1]
-        arg[1,3,1,0]=(-0.284687751218)*x[0]**o+(-0.274583519355)*x[0]+(0.338892764102)*x[1]**o+(-0.145142443753)*x[1]
-        arg[1,3,1,1]=(0.921064262137)*x[0]**o+(0.152552421678)*x[0]+(0.827247693375)*x[1]**o+(-0.569529848619)*x[1]
-        arg[1,3,2,0]=(0.133567630356)*x[0]**o+(-0.0429397358364)*x[0]+(-0.175383170663)*x[1]**o+(0.584407631334)*x[1]
-        arg[1,3,2,1]=(0.203880167371)*x[0]**o+(-0.422978073825)*x[0]+(-0.210109267588)*x[1]**o+(-0.902327373219)*x[1]
-        arg[1,4,0,0]=(-0.566386864876)*x[0]**o+(-0.139795085483)*x[0]+(-0.00852913464238)*x[1]**o+(0.569151381884)*x[1]
-        arg[1,4,0,1]=(-0.937256625212)*x[0]**o+(0.563438253128)*x[0]+(-0.586182238715)*x[1]**o+(-0.566169678723)*x[1]
-        arg[1,4,1,0]=(-0.73296890712)*x[0]**o+(0.359249594406)*x[0]+(0.66050790616)*x[1]**o+(-0.367919797426)*x[1]
-        arg[1,4,1,1]=(-0.81165734248)*x[0]**o+(0.460592817838)*x[0]+(0.953573909492)*x[1]**o+(0.329659021274)*x[1]
-        arg[1,4,2,0]=(0.345994483595)*x[0]**o+(-0.18547324343)*x[0]+(0.669452926238)*x[1]**o+(0.42513249272)*x[1]
-        arg[1,4,2,1]=(0.250677642616)*x[0]**o+(0.466118496803)*x[0]+(-0.776608543595)*x[1]**o+(0.449144243682)*x[1]
-        arg[2,0,0,0]=(0.244172909021)*x[0]**o+(0.0311068322898)*x[0]+(-0.909348039508)*x[1]**o+(0.376500719414)*x[1]
-        arg[2,0,0,1]=(-0.033516640667)*x[0]**o+(0.698424718328)*x[0]+(-0.282814785542)*x[1]**o+(0.61118022947)*x[1]
-        arg[2,0,1,0]=(-0.946672649538)*x[0]**o+(0.814325244591)*x[0]+(-0.353215562825)*x[1]**o+(-0.138150257429)*x[1]
-        arg[2,0,1,1]=(-0.886509051692)*x[0]**o+(-0.0468334385819)*x[0]+(0.71984719189)*x[1]**o+(-0.324744971493)*x[1]
-        arg[2,0,2,0]=(-0.780921647053)*x[0]**o+(-0.401418496932)*x[0]+(0.647847274332)*x[1]**o+(-0.831834322278)*x[1]
-        arg[2,0,2,1]=(0.835155004862)*x[0]**o+(0.684459986902)*x[0]+(-0.301244240677)*x[1]**o+(-0.161292780187)*x[1]
-        arg[2,1,0,0]=(-0.652199398394)*x[0]**o+(0.62480722178)*x[0]+(-0.474535712914)*x[1]**o+(0.926061797766)*x[1]
-        arg[2,1,0,1]=(-0.813365478568)*x[0]**o+(-0.38795792417)*x[0]+(0.378161353697)*x[1]**o+(0.70581806211)*x[1]
-        arg[2,1,1,0]=(0.729265594934)*x[0]**o+(-0.469397842359)*x[0]+(0.642472199926)*x[1]**o+(-0.779527283011)*x[1]
-        arg[2,1,1,1]=(0.0517342917574)*x[0]**o+(-0.414111007917)*x[0]+(-0.89437375241)*x[1]**o+(-0.830119585842)*x[1]
-        arg[2,1,2,0]=(0.769898486257)*x[0]**o+(0.791725624832)*x[0]+(0.297519329396)*x[1]**o+(-0.959462006611)*x[1]
-        arg[2,1,2,1]=(0.817802144251)*x[0]**o+(0.69851258911)*x[0]+(-0.174401735228)*x[1]**o+(0.13449696498)*x[1]
-        arg[2,2,0,0]=(0.547972662256)*x[0]**o+(-0.66491929979)*x[0]+(0.330783041672)*x[1]**o+(0.816196730606)*x[1]
-        arg[2,2,0,1]=(0.245971097763)*x[0]**o+(0.213087481481)*x[0]+(-0.840766291392)*x[1]**o+(0.388414557376)*x[1]
-        arg[2,2,1,0]=(0.523151676444)*x[0]**o+(0.854817486027)*x[0]+(-0.53570188528)*x[1]**o+(-0.68149362242)*x[1]
-        arg[2,2,1,1]=(-0.984200247787)*x[0]**o+(0.83324365092)*x[0]+(-0.896184408816)*x[1]**o+(0.102276243487)*x[1]
-        arg[2,2,2,0]=(-0.216357164308)*x[0]**o+(-0.597984882107)*x[0]+(-0.205435921511)*x[1]**o+(0.484947652759)*x[1]
-        arg[2,2,2,1]=(-0.650046253868)*x[0]**o+(-0.624878186105)*x[0]+(0.786519914406)*x[1]**o+(0.28027273095)*x[1]
-        arg[2,3,0,0]=(-0.0821718346579)*x[0]**o+(-0.687049917467)*x[0]+(0.380792333736)*x[1]**o+(0.151185837715)*x[1]
-        arg[2,3,0,1]=(0.61796113854)*x[0]**o+(0.844624413065)*x[0]+(-0.980619401098)*x[1]**o+(-0.854924862641)*x[1]
-        arg[2,3,1,0]=(0.812293906883)*x[0]**o+(-0.225593208768)*x[0]+(0.964175374163)*x[1]**o+(0.848850064926)*x[1]
-        arg[2,3,1,1]=(0.376453572937)*x[0]**o+(0.994818812059)*x[0]+(0.58872018303)*x[1]**o+(0.68332473361)*x[1]
-        arg[2,3,2,0]=(-0.00948421972234)*x[0]**o+(-0.680685462738)*x[0]+(-0.767076278167)*x[1]**o+(0.210165437284)*x[1]
-        arg[2,3,2,1]=(-0.455199698263)*x[0]**o+(-0.763430401419)*x[0]+(0.183773350212)*x[1]**o+(0.43105940923)*x[1]
-        arg[2,4,0,0]=(-0.673962025988)*x[0]**o+(-0.679073069725)*x[0]+(0.11018431715)*x[1]**o+(0.349020527482)*x[1]
-        arg[2,4,0,1]=(-0.876691282076)*x[0]**o+(0.920902226631)*x[0]+(-0.477417470246)*x[1]**o+(0.836417982216)*x[1]
-        arg[2,4,1,0]=(0.567966851024)*x[0]**o+(0.583241431716)*x[0]+(-0.271851271008)*x[1]**o+(0.678727902863)*x[1]
-        arg[2,4,1,1]=(0.707400094)*x[0]**o+(0.802820856444)*x[0]+(0.84518937616)*x[1]**o+(-0.0267193533403)*x[1]
-        arg[2,4,2,0]=(0.213268920036)*x[0]**o+(0.780721415328)*x[0]+(0.839292948154)*x[1]**o+(-0.0376334744443)*x[1]
-        arg[2,4,2,1]=(0.136255687031)*x[0]**o+(-0.582766278693)*x[0]+(0.257662521321)*x[1]**o+(0.808337521979)*x[1]
-        arg[3,0,0,0]=(-0.524068770822)*x[0]**o+(0.942236878842)*x[0]+(0.889496255793)*x[1]**o+(-0.904810742393)*x[1]
-        arg[3,0,0,1]=(0.780157465475)*x[0]**o+(-0.763811668832)*x[0]+(-0.517482070639)*x[1]**o+(0.662770780676)*x[1]
-        arg[3,0,1,0]=(-0.693227564812)*x[0]**o+(-0.763506211841)*x[0]+(-0.427709881126)*x[1]**o+(0.159109827204)*x[1]
-        arg[3,0,1,1]=(0.644975629084)*x[0]**o+(-0.928112761899)*x[0]+(-0.530772740083)*x[1]**o+(-0.723174790087)*x[1]
-        arg[3,0,2,0]=(-0.923467274097)*x[0]**o+(0.806128117288)*x[0]+(0.177779363207)*x[1]**o+(0.862243885542)*x[1]
-        arg[3,0,2,1]=(-0.0823252901358)*x[0]**o+(0.289022916284)*x[0]+(-0.518508771021)*x[1]**o+(0.174564769845)*x[1]
-        arg[3,1,0,0]=(0.608837578444)*x[0]**o+(0.898216758361)*x[0]+(-0.844730109761)*x[1]**o+(0.745974173207)*x[1]
-        arg[3,1,0,1]=(-0.11776411078)*x[0]**o+(0.186256502356)*x[0]+(0.565289400333)*x[1]**o+(-0.776173716206)*x[1]
-        arg[3,1,1,0]=(-0.170736580152)*x[0]**o+(0.829581661683)*x[0]+(0.310135833859)*x[1]**o+(-0.509629545687)*x[1]
-        arg[3,1,1,1]=(-0.225246122751)*x[0]**o+(0.586754377294)*x[0]+(-0.726064725635)*x[1]**o+(0.136952605704)*x[1]
-        arg[3,1,2,0]=(-0.287932115478)*x[0]**o+(0.858031396153)*x[0]+(-0.493441745353)*x[1]**o+(0.601827664994)*x[1]
-        arg[3,1,2,1]=(0.665503842862)*x[0]**o+(-0.515998970452)*x[0]+(-0.890055558624)*x[1]**o+(-0.0446371451457)*x[1]
-        arg[3,2,0,0]=(-0.33741557585)*x[0]**o+(-0.416183752333)*x[0]+(-0.92430073538)*x[1]**o+(-0.486265090904)*x[1]
-        arg[3,2,0,1]=(0.910860925994)*x[0]**o+(-0.896869755389)*x[0]+(0.0634658185324)*x[1]**o+(-0.383136455739)*x[1]
-        arg[3,2,1,0]=(0.386839297976)*x[0]**o+(-0.190659927071)*x[0]+(-0.304846978185)*x[1]**o+(-0.92705511899)*x[1]
-        arg[3,2,1,1]=(-0.0197812018683)*x[0]**o+(-0.479083095775)*x[0]+(0.502489976089)*x[1]**o+(-0.859440665475)*x[1]
-        arg[3,2,2,0]=(-0.507672045299)*x[0]**o+(0.498689676072)*x[0]+(-0.719735804645)*x[1]**o+(-0.522053306674)*x[1]
-        arg[3,2,2,1]=(0.46207629211)*x[0]**o+(-0.496697066039)*x[0]+(0.994069339904)*x[1]**o+(0.873222754449)*x[1]
-        arg[3,3,0,0]=(0.126410029692)*x[0]**o+(0.51067050196)*x[0]+(-0.978384824088)*x[1]**o+(-0.68606930503)*x[1]
-        arg[3,3,0,1]=(0.376888157008)*x[0]**o+(-0.14015764025)*x[0]+(0.523667700758)*x[1]**o+(0.0277726855258)*x[1]
-        arg[3,3,1,0]=(-0.105865233294)*x[0]**o+(-0.0515230741203)*x[0]+(0.203766525036)*x[1]**o+(-0.0431893014387)*x[1]
-        arg[3,3,1,1]=(-0.404351448486)*x[0]**o+(-0.639161429157)*x[0]+(-0.957341091708)*x[1]**o+(-0.103346466984)*x[1]
-        arg[3,3,2,0]=(-0.0523508780623)*x[0]**o+(-0.563589575544)*x[0]+(0.158487727325)*x[1]**o+(-0.519455492178)*x[1]
-        arg[3,3,2,1]=(-0.823286342218)*x[0]**o+(-0.493663499535)*x[0]+(-0.409825574064)*x[1]**o+(-0.0406101279806)*x[1]
-        arg[3,4,0,0]=(0.926212910387)*x[0]**o+(-0.0944507963)*x[0]+(0.640740499391)*x[1]**o+(-0.106969076047)*x[1]
-        arg[3,4,0,1]=(-0.912044993941)*x[0]**o+(-0.495323777918)*x[0]+(-0.595831845108)*x[1]**o+(-0.313723426318)*x[1]
-        arg[3,4,1,0]=(-0.0730898742548)*x[0]**o+(0.0524008484492)*x[0]+(-0.948232935497)*x[1]**o+(0.952670824572)*x[1]
-        arg[3,4,1,1]=(-0.81869438138)*x[0]**o+(-0.894654266952)*x[0]+(0.414078621872)*x[1]**o+(-0.876690817847)*x[1]
-        arg[3,4,2,0]=(0.00688155078441)*x[0]**o+(0.845964586551)*x[0]+(0.0183149371892)*x[1]**o+(-0.882931394537)*x[1]
-        arg[3,4,2,1]=(-0.734830097149)*x[0]**o+(-0.37824588859)*x[0]+(-0.815402620311)*x[1]**o+(-0.357905685517)*x[1]
-        ref[0,0,0,0]=(-0.282394950702)*x_ref[0]**o+(0.836580157584)*x_ref[0]+(0.337652262648)*x_ref[1]**o+(-0.442694263325)*x_ref[1]
-        ref[0,0,0,1]=(0.85150774028)*x_ref[0]**o+(0.998297296593)*x_ref[0]+(-0.710029954342)*x_ref[1]**o+(0.0816168287837)*x_ref[1]
-        ref[0,0,1,0]=(-0.636435102838)*x_ref[0]**o+(-0.613479863553)*x_ref[0]+(-0.861506513168)*x_ref[1]**o+(-0.242998961478)*x_ref[1]
-        ref[0,0,1,1]=(-0.00671863978521)*x_ref[0]**o+(0.909404084068)*x_ref[0]+(-0.734956067026)*x_ref[1]**o+(0.256530538264)*x_ref[1]
-        ref[0,0,2,0]=(-0.646631608999)*x_ref[0]**o+(-0.521130455843)*x_ref[0]+(-0.44328404557)*x_ref[1]**o+(-0.156860325817)*x_ref[1]
-        ref[0,0,2,1]=(-0.817550008949)*x_ref[0]**o+(0.702414497795)*x_ref[0]+(0.946449680763)*x_ref[1]**o+(-0.61576361925)*x_ref[1]
-        ref[0,1,0,0]=(-0.527206691595)*x_ref[0]**o+(-0.43469216984)*x_ref[0]+(-0.108455901154)*x_ref[1]**o+(0.435646962156)*x_ref[1]
-        ref[0,1,0,1]=(-0.148522219535)*x_ref[0]**o+(0.146912249755)*x_ref[0]+(-0.414934945665)*x_ref[1]**o+(-0.422754988714)*x_ref[1]
-        ref[0,1,1,0]=(0.177760972947)*x_ref[0]**o+(-0.938522530862)*x_ref[0]+(0.566229652264)*x_ref[1]**o+(0.255269743628)*x_ref[1]
-        ref[0,1,1,1]=(-0.317807933792)*x_ref[0]**o+(0.432181451246)*x_ref[0]+(-0.358821513362)*x_ref[1]**o+(-0.470517232585)*x_ref[1]
-        ref[0,1,2,0]=(0.486536430227)*x_ref[0]**o+(-0.533653809349)*x_ref[0]+(-0.126612514045)*x_ref[1]**o+(0.103088115487)*x_ref[1]
-        ref[0,1,2,1]=(-0.995976559589)*x_ref[0]**o+(0.965537167421)*x_ref[0]+(-0.351307699531)*x_ref[1]**o+(-0.684367434666)*x_ref[1]
-        ref[0,2,0,0]=(0.976008613768)*x_ref[0]**o+(-0.890573007002)*x_ref[0]+(-0.440709423944)*x_ref[1]**o+(0.315724459367)*x_ref[1]
-        ref[0,2,0,1]=(-0.595275811962)*x_ref[0]**o+(-0.599634144509)*x_ref[0]+(0.646466002346)*x_ref[1]**o+(-0.94529568651)*x_ref[1]
-        ref[0,2,1,0]=(0.977691521821)*x_ref[0]**o+(-0.0730997643682)*x_ref[0]+(-0.338897498737)*x_ref[1]**o+(0.246308678824)*x_ref[1]
-        ref[0,2,1,1]=(-0.111317410732)*x_ref[0]**o+(-0.574381793398)*x_ref[0]+(-0.0314431899843)*x_ref[1]**o+(0.393105047096)*x_ref[1]
-        ref[0,2,2,0]=(0.886320020757)*x_ref[0]**o+(-0.785042003544)*x_ref[0]+(0.82609269979)*x_ref[1]**o+(-0.677169484337)*x_ref[1]
-        ref[0,2,2,1]=(0.811027138079)*x_ref[0]**o+(-0.375108470948)*x_ref[0]+(0.781472464253)*x_ref[1]**o+(0.217640794143)*x_ref[1]
-        ref[0,3,0,0]=(0.264884117091)*x_ref[0]**o+(0.116591319557)*x_ref[0]+(0.282667679763)*x_ref[1]**o+(0.111123454337)*x_ref[1]
-        ref[0,3,0,1]=(0.0451626985922)*x_ref[0]**o+(-0.93771279728)*x_ref[0]+(0.129171764072)*x_ref[1]**o+(0.598367954162)*x_ref[1]
-        ref[0,3,1,0]=(0.905243511086)*x_ref[0]**o+(0.0837062573586)*x_ref[0]+(0.0657223248433)*x_ref[1]**o+(-0.746644690072)*x_ref[1]
-        ref[0,3,1,1]=(-0.0547856755485)*x_ref[0]**o+(-0.22157806755)*x_ref[0]+(0.124623625108)*x_ref[1]**o+(0.0436590157081)*x_ref[1]
-        ref[0,3,2,0]=(-0.558323744577)*x_ref[0]**o+(-0.646043519007)*x_ref[0]+(0.991885458004)*x_ref[1]**o+(-0.634140808163)*x_ref[1]
-        ref[0,3,2,1]=(-0.27247983028)*x_ref[0]**o+(0.803906404485)*x_ref[0]+(-0.816826609924)*x_ref[1]**o+(-0.969532783336)*x_ref[1]
-        ref[0,4,0,0]=(0.638733842891)*x_ref[0]**o+(-0.972793270208)*x_ref[0]+(0.714611008099)*x_ref[1]**o+(0.586988595847)*x_ref[1]
-        ref[0,4,0,1]=(0.63584760734)*x_ref[0]**o+(-0.653740236747)*x_ref[0]+(-0.596304731446)*x_ref[1]**o+(0.42519786429)*x_ref[1]
-        ref[0,4,1,0]=(0.0665562973529)*x_ref[0]**o+(0.362152092093)*x_ref[0]+(0.732530335739)*x_ref[1]**o+(0.618536326941)*x_ref[1]
-        ref[0,4,1,1]=(0.486060667608)*x_ref[0]**o+(0.59489013279)*x_ref[0]+(-0.547237017498)*x_ref[1]**o+(0.0371894705857)*x_ref[1]
-        ref[0,4,2,0]=(0.395505844397)*x_ref[0]**o+(-0.869090434535)*x_ref[0]+(-0.606640827437)*x_ref[1]**o+(0.269995459083)*x_ref[1]
-        ref[0,4,2,1]=(0.304671547176)*x_ref[0]**o+(-0.515772523849)*x_ref[0]+(0.546114300876)*x_ref[1]**o+(0.530247404341)*x_ref[1]
-        ref[1,0,0,0]=(0.408332677433)*x_ref[0]**o+(-0.0778807359918)*x_ref[0]+(-0.803337489297)*x_ref[1]**o+(-0.123835718422)*x_ref[1]
-        ref[1,0,0,1]=(-0.00441620254944)*x_ref[0]**o+(0.0321259598831)*x_ref[0]+(-0.998381508472)*x_ref[1]**o+(0.800767747511)*x_ref[1]
-        ref[1,0,1,0]=(-0.923683057418)*x_ref[0]**o+(0.579405114902)*x_ref[0]+(-0.939639823585)*x_ref[1]**o+(-0.138423358134)*x_ref[1]
-        ref[1,0,1,1]=(-0.558420234848)*x_ref[0]**o+(0.133316569813)*x_ref[0]+(-0.294134717329)*x_ref[1]**o+(-0.750897749044)*x_ref[1]
-        ref[1,0,2,0]=(0.478951298545)*x_ref[0]**o+(-0.807173978799)*x_ref[0]+(0.852438146763)*x_ref[1]**o+(-0.103814229563)*x_ref[1]
-        ref[1,0,2,1]=(-0.875250726603)*x_ref[0]**o+(-0.934803428491)*x_ref[0]+(0.143352873672)*x_ref[1]**o+(0.600934881206)*x_ref[1]
-        ref[1,1,0,0]=(-0.0539476321018)*x_ref[0]**o+(0.194177663417)*x_ref[0]+(-0.862877991009)*x_ref[1]**o+(-0.438337993664)*x_ref[1]
-        ref[1,1,0,1]=(-0.623379355474)*x_ref[0]**o+(-0.0746994739748)*x_ref[0]+(0.365005438956)*x_ref[1]**o+(-0.431737688205)*x_ref[1]
-        ref[1,1,1,0]=(0.0936054461735)*x_ref[0]**o+(-0.974594269446)*x_ref[0]+(-0.121917598428)*x_ref[1]**o+(-0.84429083727)*x_ref[1]
-        ref[1,1,1,1]=(0.967763348672)*x_ref[0]**o+(0.331698826475)*x_ref[0]+(0.66448515877)*x_ref[1]**o+(0.00214985930661)*x_ref[1]
-        ref[1,1,2,0]=(-0.312146580762)*x_ref[0]**o+(0.998152287706)*x_ref[0]+(-0.474242942777)*x_ref[1]**o+(0.637827347846)*x_ref[1]
-        ref[1,1,2,1]=(-0.556765443436)*x_ref[0]**o+(0.227327929774)*x_ref[0]+(0.739457845569)*x_ref[1]**o+(-0.615070017663)*x_ref[1]
-        ref[1,2,0,0]=(-0.23030660552)*x_ref[0]**o+(0.750479465953)*x_ref[0]+(0.278215408392)*x_ref[1]**o+(-0.640618698224)*x_ref[1]
-        ref[1,2,0,1]=(-0.0713217101129)*x_ref[0]**o+(0.500737477887)*x_ref[0]+(-0.972834770005)*x_ref[1]**o+(-0.420386056033)*x_ref[1]
-        ref[1,2,1,0]=(-0.497322989847)*x_ref[0]**o+(-0.528685124841)*x_ref[0]+(-0.934386348496)*x_ref[1]**o+(0.191930553839)*x_ref[1]
-        ref[1,2,1,1]=(0.124362419781)*x_ref[0]**o+(-0.0457849787456)*x_ref[0]+(-0.360596154712)*x_ref[1]**o+(0.799736253715)*x_ref[1]
-        ref[1,2,2,0]=(-0.346294878893)*x_ref[0]**o+(0.427772309361)*x_ref[0]+(-0.0642666791012)*x_ref[1]**o+(-0.214442238311)*x_ref[1]
-        ref[1,2,2,1]=(0.24434837411)*x_ref[0]**o+(-0.913373159786)*x_ref[0]+(0.158750862391)*x_ref[1]**o+(-0.544328807576)*x_ref[1]
-        ref[1,3,0,0]=(0.870847002687)*x_ref[0]**o+(-0.466884462301)*x_ref[0]+(-0.343358829445)*x_ref[1]**o+(-0.180956419766)*x_ref[1]
-        ref[1,3,0,1]=(-0.813518850863)*x_ref[0]**o+(0.960810467501)*x_ref[0]+(0.35091416904)*x_ref[1]**o+(0.84534544948)*x_ref[1]
-        ref[1,3,1,0]=(-0.284687751218)*x_ref[0]**o+(-0.274583519355)*x_ref[0]+(0.338892764102)*x_ref[1]**o+(-0.145142443753)*x_ref[1]
-        ref[1,3,1,1]=(0.921064262137)*x_ref[0]**o+(0.152552421678)*x_ref[0]+(0.827247693375)*x_ref[1]**o+(-0.569529848619)*x_ref[1]
-        ref[1,3,2,0]=(0.133567630356)*x_ref[0]**o+(-0.0429397358364)*x_ref[0]+(-0.175383170663)*x_ref[1]**o+(0.584407631334)*x_ref[1]
-        ref[1,3,2,1]=(0.203880167371)*x_ref[0]**o+(-0.422978073825)*x_ref[0]+(-0.210109267588)*x_ref[1]**o+(-0.902327373219)*x_ref[1]
-        ref[1,4,0,0]=(-0.566386864876)*x_ref[0]**o+(-0.139795085483)*x_ref[0]+(-0.00852913464238)*x_ref[1]**o+(0.569151381884)*x_ref[1]
-        ref[1,4,0,1]=(-0.937256625212)*x_ref[0]**o+(0.563438253128)*x_ref[0]+(-0.586182238715)*x_ref[1]**o+(-0.566169678723)*x_ref[1]
-        ref[1,4,1,0]=(-0.73296890712)*x_ref[0]**o+(0.359249594406)*x_ref[0]+(0.66050790616)*x_ref[1]**o+(-0.367919797426)*x_ref[1]
-        ref[1,4,1,1]=(-0.81165734248)*x_ref[0]**o+(0.460592817838)*x_ref[0]+(0.953573909492)*x_ref[1]**o+(0.329659021274)*x_ref[1]
-        ref[1,4,2,0]=(0.345994483595)*x_ref[0]**o+(-0.18547324343)*x_ref[0]+(0.669452926238)*x_ref[1]**o+(0.42513249272)*x_ref[1]
-        ref[1,4,2,1]=(0.250677642616)*x_ref[0]**o+(0.466118496803)*x_ref[0]+(-0.776608543595)*x_ref[1]**o+(0.449144243682)*x_ref[1]
-        ref[2,0,0,0]=(0.244172909021)*x_ref[0]**o+(0.0311068322898)*x_ref[0]+(-0.909348039508)*x_ref[1]**o+(0.376500719414)*x_ref[1]
-        ref[2,0,0,1]=(-0.033516640667)*x_ref[0]**o+(0.698424718328)*x_ref[0]+(-0.282814785542)*x_ref[1]**o+(0.61118022947)*x_ref[1]
-        ref[2,0,1,0]=(-0.946672649538)*x_ref[0]**o+(0.814325244591)*x_ref[0]+(-0.353215562825)*x_ref[1]**o+(-0.138150257429)*x_ref[1]
-        ref[2,0,1,1]=(-0.886509051692)*x_ref[0]**o+(-0.0468334385819)*x_ref[0]+(0.71984719189)*x_ref[1]**o+(-0.324744971493)*x_ref[1]
-        ref[2,0,2,0]=(-0.780921647053)*x_ref[0]**o+(-0.401418496932)*x_ref[0]+(0.647847274332)*x_ref[1]**o+(-0.831834322278)*x_ref[1]
-        ref[2,0,2,1]=(0.835155004862)*x_ref[0]**o+(0.684459986902)*x_ref[0]+(-0.301244240677)*x_ref[1]**o+(-0.161292780187)*x_ref[1]
-        ref[2,1,0,0]=(-0.652199398394)*x_ref[0]**o+(0.62480722178)*x_ref[0]+(-0.474535712914)*x_ref[1]**o+(0.926061797766)*x_ref[1]
-        ref[2,1,0,1]=(-0.813365478568)*x_ref[0]**o+(-0.38795792417)*x_ref[0]+(0.378161353697)*x_ref[1]**o+(0.70581806211)*x_ref[1]
-        ref[2,1,1,0]=(0.729265594934)*x_ref[0]**o+(-0.469397842359)*x_ref[0]+(0.642472199926)*x_ref[1]**o+(-0.779527283011)*x_ref[1]
-        ref[2,1,1,1]=(0.0517342917574)*x_ref[0]**o+(-0.414111007917)*x_ref[0]+(-0.89437375241)*x_ref[1]**o+(-0.830119585842)*x_ref[1]
-        ref[2,1,2,0]=(0.769898486257)*x_ref[0]**o+(0.791725624832)*x_ref[0]+(0.297519329396)*x_ref[1]**o+(-0.959462006611)*x_ref[1]
-        ref[2,1,2,1]=(0.817802144251)*x_ref[0]**o+(0.69851258911)*x_ref[0]+(-0.174401735228)*x_ref[1]**o+(0.13449696498)*x_ref[1]
-        ref[2,2,0,0]=(0.547972662256)*x_ref[0]**o+(-0.66491929979)*x_ref[0]+(0.330783041672)*x_ref[1]**o+(0.816196730606)*x_ref[1]
-        ref[2,2,0,1]=(0.245971097763)*x_ref[0]**o+(0.213087481481)*x_ref[0]+(-0.840766291392)*x_ref[1]**o+(0.388414557376)*x_ref[1]
-        ref[2,2,1,0]=(0.523151676444)*x_ref[0]**o+(0.854817486027)*x_ref[0]+(-0.53570188528)*x_ref[1]**o+(-0.68149362242)*x_ref[1]
-        ref[2,2,1,1]=(-0.984200247787)*x_ref[0]**o+(0.83324365092)*x_ref[0]+(-0.896184408816)*x_ref[1]**o+(0.102276243487)*x_ref[1]
-        ref[2,2,2,0]=(-0.216357164308)*x_ref[0]**o+(-0.597984882107)*x_ref[0]+(-0.205435921511)*x_ref[1]**o+(0.484947652759)*x_ref[1]
-        ref[2,2,2,1]=(-0.650046253868)*x_ref[0]**o+(-0.624878186105)*x_ref[0]+(0.786519914406)*x_ref[1]**o+(0.28027273095)*x_ref[1]
-        ref[2,3,0,0]=(-0.0821718346579)*x_ref[0]**o+(-0.687049917467)*x_ref[0]+(0.380792333736)*x_ref[1]**o+(0.151185837715)*x_ref[1]
-        ref[2,3,0,1]=(0.61796113854)*x_ref[0]**o+(0.844624413065)*x_ref[0]+(-0.980619401098)*x_ref[1]**o+(-0.854924862641)*x_ref[1]
-        ref[2,3,1,0]=(0.812293906883)*x_ref[0]**o+(-0.225593208768)*x_ref[0]+(0.964175374163)*x_ref[1]**o+(0.848850064926)*x_ref[1]
-        ref[2,3,1,1]=(0.376453572937)*x_ref[0]**o+(0.994818812059)*x_ref[0]+(0.58872018303)*x_ref[1]**o+(0.68332473361)*x_ref[1]
-        ref[2,3,2,0]=(-0.00948421972234)*x_ref[0]**o+(-0.680685462738)*x_ref[0]+(-0.767076278167)*x_ref[1]**o+(0.210165437284)*x_ref[1]
-        ref[2,3,2,1]=(-0.455199698263)*x_ref[0]**o+(-0.763430401419)*x_ref[0]+(0.183773350212)*x_ref[1]**o+(0.43105940923)*x_ref[1]
-        ref[2,4,0,0]=(-0.673962025988)*x_ref[0]**o+(-0.679073069725)*x_ref[0]+(0.11018431715)*x_ref[1]**o+(0.349020527482)*x_ref[1]
-        ref[2,4,0,1]=(-0.876691282076)*x_ref[0]**o+(0.920902226631)*x_ref[0]+(-0.477417470246)*x_ref[1]**o+(0.836417982216)*x_ref[1]
-        ref[2,4,1,0]=(0.567966851024)*x_ref[0]**o+(0.583241431716)*x_ref[0]+(-0.271851271008)*x_ref[1]**o+(0.678727902863)*x_ref[1]
-        ref[2,4,1,1]=(0.707400094)*x_ref[0]**o+(0.802820856444)*x_ref[0]+(0.84518937616)*x_ref[1]**o+(-0.0267193533403)*x_ref[1]
-        ref[2,4,2,0]=(0.213268920036)*x_ref[0]**o+(0.780721415328)*x_ref[0]+(0.839292948154)*x_ref[1]**o+(-0.0376334744443)*x_ref[1]
-        ref[2,4,2,1]=(0.136255687031)*x_ref[0]**o+(-0.582766278693)*x_ref[0]+(0.257662521321)*x_ref[1]**o+(0.808337521979)*x_ref[1]
-        ref[3,0,0,0]=(-0.524068770822)*x_ref[0]**o+(0.942236878842)*x_ref[0]+(0.889496255793)*x_ref[1]**o+(-0.904810742393)*x_ref[1]
-        ref[3,0,0,1]=(0.780157465475)*x_ref[0]**o+(-0.763811668832)*x_ref[0]+(-0.517482070639)*x_ref[1]**o+(0.662770780676)*x_ref[1]
-        ref[3,0,1,0]=(-0.693227564812)*x_ref[0]**o+(-0.763506211841)*x_ref[0]+(-0.427709881126)*x_ref[1]**o+(0.159109827204)*x_ref[1]
-        ref[3,0,1,1]=(0.644975629084)*x_ref[0]**o+(-0.928112761899)*x_ref[0]+(-0.530772740083)*x_ref[1]**o+(-0.723174790087)*x_ref[1]
-        ref[3,0,2,0]=(-0.923467274097)*x_ref[0]**o+(0.806128117288)*x_ref[0]+(0.177779363207)*x_ref[1]**o+(0.862243885542)*x_ref[1]
-        ref[3,0,2,1]=(-0.0823252901358)*x_ref[0]**o+(0.289022916284)*x_ref[0]+(-0.518508771021)*x_ref[1]**o+(0.174564769845)*x_ref[1]
-        ref[3,1,0,0]=(0.608837578444)*x_ref[0]**o+(0.898216758361)*x_ref[0]+(-0.844730109761)*x_ref[1]**o+(0.745974173207)*x_ref[1]
-        ref[3,1,0,1]=(-0.11776411078)*x_ref[0]**o+(0.186256502356)*x_ref[0]+(0.565289400333)*x_ref[1]**o+(-0.776173716206)*x_ref[1]
-        ref[3,1,1,0]=(-0.170736580152)*x_ref[0]**o+(0.829581661683)*x_ref[0]+(0.310135833859)*x_ref[1]**o+(-0.509629545687)*x_ref[1]
-        ref[3,1,1,1]=(-0.225246122751)*x_ref[0]**o+(0.586754377294)*x_ref[0]+(-0.726064725635)*x_ref[1]**o+(0.136952605704)*x_ref[1]
-        ref[3,1,2,0]=(-0.287932115478)*x_ref[0]**o+(0.858031396153)*x_ref[0]+(-0.493441745353)*x_ref[1]**o+(0.601827664994)*x_ref[1]
-        ref[3,1,2,1]=(0.665503842862)*x_ref[0]**o+(-0.515998970452)*x_ref[0]+(-0.890055558624)*x_ref[1]**o+(-0.0446371451457)*x_ref[1]
-        ref[3,2,0,0]=(-0.33741557585)*x_ref[0]**o+(-0.416183752333)*x_ref[0]+(-0.92430073538)*x_ref[1]**o+(-0.486265090904)*x_ref[1]
-        ref[3,2,0,1]=(0.910860925994)*x_ref[0]**o+(-0.896869755389)*x_ref[0]+(0.0634658185324)*x_ref[1]**o+(-0.383136455739)*x_ref[1]
-        ref[3,2,1,0]=(0.386839297976)*x_ref[0]**o+(-0.190659927071)*x_ref[0]+(-0.304846978185)*x_ref[1]**o+(-0.92705511899)*x_ref[1]
-        ref[3,2,1,1]=(-0.0197812018683)*x_ref[0]**o+(-0.479083095775)*x_ref[0]+(0.502489976089)*x_ref[1]**o+(-0.859440665475)*x_ref[1]
-        ref[3,2,2,0]=(-0.507672045299)*x_ref[0]**o+(0.498689676072)*x_ref[0]+(-0.719735804645)*x_ref[1]**o+(-0.522053306674)*x_ref[1]
-        ref[3,2,2,1]=(0.46207629211)*x_ref[0]**o+(-0.496697066039)*x_ref[0]+(0.994069339904)*x_ref[1]**o+(0.873222754449)*x_ref[1]
-        ref[3,3,0,0]=(0.126410029692)*x_ref[0]**o+(0.51067050196)*x_ref[0]+(-0.978384824088)*x_ref[1]**o+(-0.68606930503)*x_ref[1]
-        ref[3,3,0,1]=(0.376888157008)*x_ref[0]**o+(-0.14015764025)*x_ref[0]+(0.523667700758)*x_ref[1]**o+(0.0277726855258)*x_ref[1]
-        ref[3,3,1,0]=(-0.105865233294)*x_ref[0]**o+(-0.0515230741203)*x_ref[0]+(0.203766525036)*x_ref[1]**o+(-0.0431893014387)*x_ref[1]
-        ref[3,3,1,1]=(-0.404351448486)*x_ref[0]**o+(-0.639161429157)*x_ref[0]+(-0.957341091708)*x_ref[1]**o+(-0.103346466984)*x_ref[1]
-        ref[3,3,2,0]=(-0.0523508780623)*x_ref[0]**o+(-0.563589575544)*x_ref[0]+(0.158487727325)*x_ref[1]**o+(-0.519455492178)*x_ref[1]
-        ref[3,3,2,1]=(-0.823286342218)*x_ref[0]**o+(-0.493663499535)*x_ref[0]+(-0.409825574064)*x_ref[1]**o+(-0.0406101279806)*x_ref[1]
-        ref[3,4,0,0]=(0.926212910387)*x_ref[0]**o+(-0.0944507963)*x_ref[0]+(0.640740499391)*x_ref[1]**o+(-0.106969076047)*x_ref[1]
-        ref[3,4,0,1]=(-0.912044993941)*x_ref[0]**o+(-0.495323777918)*x_ref[0]+(-0.595831845108)*x_ref[1]**o+(-0.313723426318)*x_ref[1]
-        ref[3,4,1,0]=(-0.0730898742548)*x_ref[0]**o+(0.0524008484492)*x_ref[0]+(-0.948232935497)*x_ref[1]**o+(0.952670824572)*x_ref[1]
-        ref[3,4,1,1]=(-0.81869438138)*x_ref[0]**o+(-0.894654266952)*x_ref[0]+(0.414078621872)*x_ref[1]**o+(-0.876690817847)*x_ref[1]
-        ref[3,4,2,0]=(0.00688155078441)*x_ref[0]**o+(0.845964586551)*x_ref[0]+(0.0183149371892)*x_ref[1]**o+(-0.882931394537)*x_ref[1]
-        ref[3,4,2,1]=(-0.734830097149)*x_ref[0]**o+(-0.37824588859)*x_ref[0]+(-0.815402620311)*x_ref[1]**o+(-0.357905685517)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.110519315354)*x[0]**o+(0.904227374292)*x[0]+(0.459005710707)*x[1]**o+(-0.980231422256)*x[1]+(-0.819713355475)*x[2]**o+(-0.93459517989)*x[2]
-        arg[0,0,0,1]=(-0.326902946413)*x[0]**o+(0.489327766219)*x[0]+(-0.965308741061)*x[1]**o+(0.0351399111471)*x[1]+(0.257760096595)*x[2]**o+(0.125123023244)*x[2]
-        arg[0,0,1,0]=(-0.584360710004)*x[0]**o+(0.681892732544)*x[0]+(-0.118257741614)*x[1]**o+(0.839875738892)*x[1]+(0.107934154241)*x[2]**o+(0.279757054665)*x[2]
-        arg[0,0,1,1]=(0.90973214794)*x[0]**o+(-0.776804618826)*x[0]+(-0.910633853381)*x[1]**o+(-0.25678788529)*x[1]+(0.783709363646)*x[2]**o+(-0.922660855915)*x[2]
-        arg[0,0,2,0]=(-0.802273263394)*x[0]**o+(-0.917749665952)*x[0]+(0.796206817226)*x[1]**o+(0.917284637885)*x[1]+(0.219841508893)*x[2]**o+(0.0655848200083)*x[2]
-        arg[0,0,2,1]=(0.550596792343)*x[0]**o+(-0.760207057617)*x[0]+(0.0368469683098)*x[1]**o+(0.509347717331)*x[1]+(0.813780778487)*x[2]**o+(-0.432656298451)*x[2]
-        arg[0,1,0,0]=(-0.238502042941)*x[0]**o+(-0.966632221032)*x[0]+(-0.373745652933)*x[1]**o+(-0.436176336389)*x[1]+(0.124280197699)*x[2]**o+(0.552700562803)*x[2]
-        arg[0,1,0,1]=(-0.19848053276)*x[0]**o+(0.110167634957)*x[0]+(-0.748553857473)*x[1]**o+(0.355932508959)*x[1]+(-0.226987914753)*x[2]**o+(-0.68870238197)*x[2]
-        arg[0,1,1,0]=(0.365822518882)*x[0]**o+(0.327285102897)*x[0]+(0.549212504635)*x[1]**o+(0.918179946504)*x[1]+(0.20644004679)*x[2]**o+(0.821299409756)*x[2]
-        arg[0,1,1,1]=(-0.366167489101)*x[0]**o+(0.529933186572)*x[0]+(-0.604965310967)*x[1]**o+(-0.833093092352)*x[1]+(-0.73593913912)*x[2]**o+(0.872325614453)*x[2]
-        arg[0,1,2,0]=(0.289123646902)*x[0]**o+(0.705862153789)*x[0]+(-0.319756886822)*x[1]**o+(-0.453220232524)*x[1]+(-0.192336374167)*x[2]**o+(0.363575495006)*x[2]
-        arg[0,1,2,1]=(-0.213014833353)*x[0]**o+(-0.0706784230627)*x[0]+(-0.941272982229)*x[1]**o+(-0.96641361036)*x[1]+(0.289919014964)*x[2]**o+(0.57658772066)*x[2]
-        arg[0,2,0,0]=(-0.406683991704)*x[0]**o+(-0.0110042213592)*x[0]+(-0.273148083258)*x[1]**o+(0.054257030447)*x[1]+(0.387598147681)*x[2]**o+(0.480398109069)*x[2]
-        arg[0,2,0,1]=(0.318713057562)*x[0]**o+(-0.449467749585)*x[0]+(0.669991267829)*x[1]**o+(0.237986860249)*x[1]+(0.894370523471)*x[2]**o+(-0.397832436233)*x[2]
-        arg[0,2,1,0]=(-0.858603253642)*x[0]**o+(-0.713122015919)*x[0]+(0.870251906188)*x[1]**o+(-0.781601254578)*x[1]+(-0.504531525822)*x[2]**o+(-0.699819349556)*x[2]
-        arg[0,2,1,1]=(-0.825591116361)*x[0]**o+(-0.552452876394)*x[0]+(-0.262627261618)*x[1]**o+(-0.147127256184)*x[1]+(-0.171485665103)*x[2]**o+(0.823279741501)*x[2]
-        arg[0,2,2,0]=(-0.0416279689068)*x[0]**o+(-0.0903338000001)*x[0]+(0.911673780635)*x[1]**o+(0.86298673049)*x[1]+(-0.60251179847)*x[2]**o+(0.378303877746)*x[2]
-        arg[0,2,2,1]=(0.261384106387)*x[0]**o+(0.0326416199811)*x[0]+(-0.426740102269)*x[1]**o+(-0.445401626921)*x[1]+(-0.388668254526)*x[2]**o+(-0.977942913284)*x[2]
-        arg[0,3,0,0]=(-0.0195053813483)*x[0]**o+(-0.294061998664)*x[0]+(0.790461098426)*x[1]**o+(-0.506334268838)*x[1]+(0.394015541605)*x[2]**o+(-0.562248105432)*x[2]
-        arg[0,3,0,1]=(0.390726516735)*x[0]**o+(-0.757597437859)*x[0]+(0.861882149861)*x[1]**o+(0.621870451314)*x[1]+(0.900777666162)*x[2]**o+(0.271507131938)*x[2]
-        arg[0,3,1,0]=(-0.725635966475)*x[0]**o+(-0.695837548737)*x[0]+(-0.163078176328)*x[1]**o+(-0.0435808418729)*x[1]+(0.0890756544611)*x[2]**o+(-0.270422627949)*x[2]
-        arg[0,3,1,1]=(-0.175498720647)*x[0]**o+(-0.213605441632)*x[0]+(-0.358632620362)*x[1]**o+(-0.193273004152)*x[1]+(0.937704823805)*x[2]**o+(0.861707832291)*x[2]
-        arg[0,3,2,0]=(0.0976010265611)*x[0]**o+(0.995135925341)*x[0]+(0.755339287387)*x[1]**o+(-0.924722068193)*x[1]+(-0.480212181904)*x[2]**o+(-0.40237760439)*x[2]
-        arg[0,3,2,1]=(-0.679215392952)*x[0]**o+(-0.00796096253297)*x[0]+(-0.964972599421)*x[1]**o+(-0.410415435656)*x[1]+(-0.292638067785)*x[2]**o+(-0.950383976561)*x[2]
-        arg[0,4,0,0]=(0.245586594928)*x[0]**o+(-0.593420401896)*x[0]+(0.553450486534)*x[1]**o+(0.173814965689)*x[1]+(0.0719392610563)*x[2]**o+(0.676231437486)*x[2]
-        arg[0,4,0,1]=(0.154382756425)*x[0]**o+(-0.0655740293432)*x[0]+(0.924689745142)*x[1]**o+(-0.246876531175)*x[1]+(-0.241460713543)*x[2]**o+(-0.489840108568)*x[2]
-        arg[0,4,1,0]=(-0.482705840359)*x[0]**o+(-0.392960380114)*x[0]+(-0.503463823972)*x[1]**o+(0.317163204738)*x[1]+(0.775048877356)*x[2]**o+(0.599889732326)*x[2]
-        arg[0,4,1,1]=(-0.122555861716)*x[0]**o+(0.930175770449)*x[0]+(0.483503764941)*x[1]**o+(0.340001033217)*x[1]+(0.672924280979)*x[2]**o+(0.746489359683)*x[2]
-        arg[0,4,2,0]=(-0.339421141033)*x[0]**o+(-0.604966575169)*x[0]+(0.862413017648)*x[1]**o+(0.936752078454)*x[1]+(-0.0549628353285)*x[2]**o+(-0.0858885835314)*x[2]
-        arg[0,4,2,1]=(-0.581767357421)*x[0]**o+(-0.644286027548)*x[0]+(0.76948396865)*x[1]**o+(0.692265904744)*x[1]+(0.955871091531)*x[2]**o+(-0.378888503457)*x[2]
-        arg[1,0,0,0]=(-0.0407846595046)*x[0]**o+(-0.293709943251)*x[0]+(-0.310552931582)*x[1]**o+(-0.696244178466)*x[1]+(0.962985284252)*x[2]**o+(-0.0266457621404)*x[2]
-        arg[1,0,0,1]=(-0.480942811584)*x[0]**o+(-0.400158759679)*x[0]+(0.311171869807)*x[1]**o+(-0.79518809427)*x[1]+(-0.497004450478)*x[2]**o+(-0.639822005752)*x[2]
-        arg[1,0,1,0]=(0.158738648483)*x[0]**o+(0.274859816468)*x[0]+(-0.208677612654)*x[1]**o+(0.911107598366)*x[1]+(-0.400163007778)*x[2]**o+(0.276296890267)*x[2]
-        arg[1,0,1,1]=(0.613312276864)*x[0]**o+(-0.644237218776)*x[0]+(0.81927272895)*x[1]**o+(-0.12971860556)*x[1]+(0.214379406799)*x[2]**o+(0.856335675043)*x[2]
-        arg[1,0,2,0]=(-0.699925173766)*x[0]**o+(-0.560613547952)*x[0]+(-0.355325107637)*x[1]**o+(-0.598747822041)*x[1]+(0.243087037553)*x[2]**o+(-0.484176993015)*x[2]
-        arg[1,0,2,1]=(-0.218912300848)*x[0]**o+(-0.259483312969)*x[0]+(-0.863788186295)*x[1]**o+(0.924423774757)*x[1]+(-0.0823752192204)*x[2]**o+(-0.928377900602)*x[2]
-        arg[1,1,0,0]=(-0.368901144425)*x[0]**o+(0.544104655592)*x[0]+(0.321295151176)*x[1]**o+(0.395692754134)*x[1]+(-0.721319111754)*x[2]**o+(-0.698518442137)*x[2]
-        arg[1,1,0,1]=(-0.592867336047)*x[0]**o+(0.145120231038)*x[0]+(0.110390771366)*x[1]**o+(0.168333368086)*x[1]+(-0.577866419921)*x[2]**o+(0.705027708469)*x[2]
-        arg[1,1,1,0]=(-0.210603428235)*x[0]**o+(-0.250156447116)*x[0]+(-0.397803248976)*x[1]**o+(0.332163380867)*x[1]+(-0.250648216541)*x[2]**o+(-0.0693729055697)*x[2]
-        arg[1,1,1,1]=(0.324927558096)*x[0]**o+(-0.262726116223)*x[0]+(-0.555439758488)*x[1]**o+(-0.865019248609)*x[1]+(-0.0971907425857)*x[2]**o+(-0.742359236711)*x[2]
-        arg[1,1,2,0]=(0.161058869414)*x[0]**o+(0.349191500791)*x[0]+(0.468336473315)*x[1]**o+(-0.856364775995)*x[1]+(0.491736696689)*x[2]**o+(0.352984104173)*x[2]
-        arg[1,1,2,1]=(-0.243275976508)*x[0]**o+(-0.785605388878)*x[0]+(-0.282478919296)*x[1]**o+(-0.728851522341)*x[1]+(0.375134848237)*x[2]**o+(-0.486200561256)*x[2]
-        arg[1,2,0,0]=(-0.172241451405)*x[0]**o+(0.422361498196)*x[0]+(0.464862755164)*x[1]**o+(0.466661717105)*x[1]+(-0.886209677512)*x[2]**o+(-0.43529076789)*x[2]
-        arg[1,2,0,1]=(0.946582222405)*x[0]**o+(0.513640973894)*x[0]+(-0.923788000633)*x[1]**o+(-0.358163567195)*x[1]+(-0.709999132129)*x[2]**o+(-0.761163299694)*x[2]
-        arg[1,2,1,0]=(0.236339981889)*x[0]**o+(0.259874866134)*x[0]+(-0.32460762691)*x[1]**o+(-0.629786950313)*x[1]+(-0.679261685402)*x[2]**o+(0.593069192918)*x[2]
-        arg[1,2,1,1]=(0.11006800009)*x[0]**o+(0.970532991787)*x[0]+(-0.467608188361)*x[1]**o+(-0.959281984552)*x[1]+(0.610396622519)*x[2]**o+(0.282468600058)*x[2]
-        arg[1,2,2,0]=(-0.656419157742)*x[0]**o+(0.234027308171)*x[0]+(-0.67027206978)*x[1]**o+(-0.746034436817)*x[1]+(-0.771894073652)*x[2]**o+(0.949545830287)*x[2]
-        arg[1,2,2,1]=(0.615884236811)*x[0]**o+(-0.670156612555)*x[0]+(0.543165493345)*x[1]**o+(-0.618294277594)*x[1]+(-0.974114255061)*x[2]**o+(-0.762320542298)*x[2]
-        arg[1,3,0,0]=(0.096201957648)*x[0]**o+(0.440870816208)*x[0]+(0.124448859607)*x[1]**o+(0.507919407561)*x[1]+(-0.401666263687)*x[2]**o+(-0.437653713723)*x[2]
-        arg[1,3,0,1]=(0.165129229294)*x[0]**o+(-0.353217428955)*x[0]+(0.473666065504)*x[1]**o+(0.907667166988)*x[1]+(-0.864298533288)*x[2]**o+(0.641505117281)*x[2]
-        arg[1,3,1,0]=(0.381900624425)*x[0]**o+(0.427520178597)*x[0]+(-0.560279540293)*x[1]**o+(0.190814532271)*x[1]+(-0.187947688629)*x[2]**o+(-0.127694148593)*x[2]
-        arg[1,3,1,1]=(-0.903921363895)*x[0]**o+(-0.659942040828)*x[0]+(-0.549460213492)*x[1]**o+(0.869909651895)*x[1]+(-0.962273439484)*x[2]**o+(-0.046365857751)*x[2]
-        arg[1,3,2,0]=(-0.021688482187)*x[0]**o+(-0.209531000717)*x[0]+(0.668564395133)*x[1]**o+(-0.0347978700975)*x[1]+(0.947677147488)*x[2]**o+(-0.0152385052475)*x[2]
-        arg[1,3,2,1]=(0.880839485817)*x[0]**o+(-0.319275929312)*x[0]+(-0.940056657485)*x[1]**o+(0.570855397726)*x[1]+(0.279710812074)*x[2]**o+(0.496622215051)*x[2]
-        arg[1,4,0,0]=(-0.139033645615)*x[0]**o+(-0.271453722366)*x[0]+(-0.268516720244)*x[1]**o+(-0.0467555017438)*x[1]+(-0.41618262265)*x[2]**o+(0.315320363813)*x[2]
-        arg[1,4,0,1]=(0.296108607204)*x[0]**o+(-0.184582165661)*x[0]+(0.121416543744)*x[1]**o+(-0.922284926751)*x[1]+(-0.437600089668)*x[2]**o+(-0.608800626513)*x[2]
-        arg[1,4,1,0]=(0.8942028423)*x[0]**o+(0.673402831188)*x[0]+(-0.622529195562)*x[1]**o+(-0.266052338798)*x[1]+(-0.273167851702)*x[2]**o+(-0.312211982747)*x[2]
-        arg[1,4,1,1]=(-0.102315711178)*x[0]**o+(-0.885515719371)*x[0]+(-0.532910101204)*x[1]**o+(0.798525944348)*x[1]+(0.640586802303)*x[2]**o+(0.36308806536)*x[2]
-        arg[1,4,2,0]=(0.376793506541)*x[0]**o+(-0.667063564875)*x[0]+(0.609591985816)*x[1]**o+(0.28347745142)*x[1]+(-0.751832936302)*x[2]**o+(-0.683738856965)*x[2]
-        arg[1,4,2,1]=(-0.51412252819)*x[0]**o+(0.559560297206)*x[0]+(0.751134603429)*x[1]**o+(-0.0031812310797)*x[1]+(-0.525776122178)*x[2]**o+(0.338471942848)*x[2]
-        arg[2,0,0,0]=(0.937572244905)*x[0]**o+(-0.293020870379)*x[0]+(-0.918591520817)*x[1]**o+(0.622194477261)*x[1]+(0.31641482851)*x[2]**o+(0.276912266864)*x[2]
-        arg[2,0,0,1]=(0.853041599998)*x[0]**o+(-0.0220623724171)*x[0]+(0.89909044296)*x[1]**o+(-0.838782642732)*x[1]+(0.0133197592042)*x[2]**o+(-0.868977618993)*x[2]
-        arg[2,0,1,0]=(-0.325799042976)*x[0]**o+(0.746269971994)*x[0]+(0.882671061757)*x[1]**o+(-0.284133373252)*x[1]+(0.120086549521)*x[2]**o+(-0.397352610969)*x[2]
-        arg[2,0,1,1]=(0.282336934951)*x[0]**o+(-0.339893978547)*x[0]+(-0.0861660125386)*x[1]**o+(0.283063579798)*x[1]+(0.714762478569)*x[2]**o+(-0.497021718549)*x[2]
-        arg[2,0,2,0]=(0.891782779491)*x[0]**o+(-0.817647577644)*x[0]+(0.364088142085)*x[1]**o+(-0.950577637048)*x[1]+(0.4070663557)*x[2]**o+(0.270753179246)*x[2]
-        arg[2,0,2,1]=(0.316594913808)*x[0]**o+(0.310731486851)*x[0]+(0.250421828765)*x[1]**o+(0.772786141458)*x[1]+(0.64843040679)*x[2]**o+(-0.691903332511)*x[2]
-        arg[2,1,0,0]=(0.87180715028)*x[0]**o+(-0.953173230375)*x[0]+(-0.823516344548)*x[1]**o+(0.934653756548)*x[1]+(-0.537124962489)*x[2]**o+(-0.233365939659)*x[2]
-        arg[2,1,0,1]=(-0.407189744631)*x[0]**o+(-0.754425720288)*x[0]+(0.737526767897)*x[1]**o+(0.745393943502)*x[1]+(0.811744293685)*x[2]**o+(-0.459556659177)*x[2]
-        arg[2,1,1,0]=(-0.693529259877)*x[0]**o+(0.580197938048)*x[0]+(0.506055440405)*x[1]**o+(0.122531014759)*x[1]+(0.427736137775)*x[2]**o+(-0.83260140401)*x[2]
-        arg[2,1,1,1]=(0.542621975026)*x[0]**o+(-0.568425713106)*x[0]+(0.303002043446)*x[1]**o+(0.363286261651)*x[1]+(0.2729476289)*x[2]**o+(-0.0113629744659)*x[2]
-        arg[2,1,2,0]=(-0.266750235694)*x[0]**o+(0.10116400306)*x[0]+(0.315977962897)*x[1]**o+(-0.406236201454)*x[1]+(-0.586845072374)*x[2]**o+(0.513937047282)*x[2]
-        arg[2,1,2,1]=(-0.518780811975)*x[0]**o+(0.275053640829)*x[0]+(0.4234970646)*x[1]**o+(0.389585163376)*x[1]+(-0.609771068778)*x[2]**o+(-0.121467061755)*x[2]
-        arg[2,2,0,0]=(0.138823207466)*x[0]**o+(-0.779837455014)*x[0]+(0.70167049555)*x[1]**o+(0.766428813369)*x[1]+(0.114023530366)*x[2]**o+(0.650098536187)*x[2]
-        arg[2,2,0,1]=(0.974998667633)*x[0]**o+(0.958471050654)*x[0]+(0.193515162503)*x[1]**o+(-0.252148167253)*x[1]+(0.495475460125)*x[2]**o+(0.562693347983)*x[2]
-        arg[2,2,1,0]=(-0.552379548988)*x[0]**o+(-0.831399971618)*x[0]+(0.437581216647)*x[1]**o+(-0.775331267696)*x[1]+(0.729041628844)*x[2]**o+(0.633113359893)*x[2]
-        arg[2,2,1,1]=(0.379858437049)*x[0]**o+(0.923586504203)*x[0]+(0.707244783969)*x[1]**o+(-0.293157375059)*x[1]+(-0.368717941876)*x[2]**o+(-0.202610288616)*x[2]
-        arg[2,2,2,0]=(-0.804826108231)*x[0]**o+(-0.0208712096312)*x[0]+(0.0482547072498)*x[1]**o+(0.852366543609)*x[1]+(0.328962500136)*x[2]**o+(-0.132777835512)*x[2]
-        arg[2,2,2,1]=(0.91373752217)*x[0]**o+(-0.792112120729)*x[0]+(-0.0457564087072)*x[1]**o+(0.309694852949)*x[1]+(0.089219285337)*x[2]**o+(-0.516000514614)*x[2]
-        arg[2,3,0,0]=(0.343215129115)*x[0]**o+(0.40804099837)*x[0]+(-0.865942442914)*x[1]**o+(0.842241683043)*x[1]+(0.0727803297601)*x[2]**o+(-0.395225682949)*x[2]
-        arg[2,3,0,1]=(-0.965340522771)*x[0]**o+(-0.897056478677)*x[0]+(-0.305205944062)*x[1]**o+(0.393941789685)*x[1]+(-0.253328379131)*x[2]**o+(0.0951510469271)*x[2]
-        arg[2,3,1,0]=(0.536251514752)*x[0]**o+(0.0629776386779)*x[0]+(-0.706311222379)*x[1]**o+(-0.84362242029)*x[1]+(0.00110678760539)*x[2]**o+(-0.30286059941)*x[2]
-        arg[2,3,1,1]=(0.114584737295)*x[0]**o+(0.0708763738067)*x[0]+(-0.454760062397)*x[1]**o+(0.228742539922)*x[1]+(0.514960810352)*x[2]**o+(-0.815749211085)*x[2]
-        arg[2,3,2,0]=(0.246335688008)*x[0]**o+(-0.239199299885)*x[0]+(-0.447390151659)*x[1]**o+(0.918949356391)*x[1]+(-0.307864840175)*x[2]**o+(0.560139080481)*x[2]
-        arg[2,3,2,1]=(0.118766035723)*x[0]**o+(0.610711164899)*x[0]+(0.336628771776)*x[1]**o+(0.833699268751)*x[1]+(-0.424694647429)*x[2]**o+(-0.639929688104)*x[2]
-        arg[2,4,0,0]=(0.814543506987)*x[0]**o+(-0.797684321368)*x[0]+(0.337242635783)*x[1]**o+(0.278139837072)*x[1]+(0.633511526441)*x[2]**o+(0.372175615028)*x[2]
-        arg[2,4,0,1]=(-0.0590668694094)*x[0]**o+(0.256732067267)*x[0]+(0.519737187577)*x[1]**o+(-0.376391855948)*x[1]+(-0.810934658651)*x[2]**o+(0.826899476928)*x[2]
-        arg[2,4,1,0]=(-0.428976843661)*x[0]**o+(0.672667833313)*x[0]+(0.263194890946)*x[1]**o+(-0.894790773661)*x[1]+(-0.550298557295)*x[2]**o+(-0.00560384035502)*x[2]
-        arg[2,4,1,1]=(-0.818372430144)*x[0]**o+(-0.829920833073)*x[0]+(-0.359560636119)*x[1]**o+(-0.113484563205)*x[1]+(0.586796110365)*x[2]**o+(0.296820898426)*x[2]
-        arg[2,4,2,0]=(-0.691597969566)*x[0]**o+(0.715813153538)*x[0]+(0.954093612503)*x[1]**o+(0.88803420754)*x[1]+(0.697447667765)*x[2]**o+(0.793730496625)*x[2]
-        arg[2,4,2,1]=(0.351099833336)*x[0]**o+(-0.716419272807)*x[0]+(0.318726674998)*x[1]**o+(0.246151914414)*x[1]+(-0.945520673884)*x[2]**o+(-0.489026233954)*x[2]
-        arg[3,0,0,0]=(0.511598022804)*x[0]**o+(0.567617269582)*x[0]+(-0.526293319137)*x[1]**o+(0.333750098146)*x[1]+(-0.0869228849144)*x[2]**o+(-0.204072834867)*x[2]
-        arg[3,0,0,1]=(0.905384007172)*x[0]**o+(-0.661067390314)*x[0]+(-0.470790632295)*x[1]**o+(-0.149608017616)*x[1]+(0.427879278267)*x[2]**o+(0.987040179184)*x[2]
-        arg[3,0,1,0]=(-0.946562006809)*x[0]**o+(0.64141909633)*x[0]+(-0.762076826276)*x[1]**o+(-0.642912850794)*x[1]+(0.712567898559)*x[2]**o+(-0.292128944205)*x[2]
-        arg[3,0,1,1]=(-0.955087949361)*x[0]**o+(0.426588041133)*x[0]+(0.339313104127)*x[1]**o+(-0.375147344045)*x[1]+(0.967259014679)*x[2]**o+(0.504521081858)*x[2]
-        arg[3,0,2,0]=(0.141876598344)*x[0]**o+(-0.335579252825)*x[0]+(0.514552993602)*x[1]**o+(-0.531116948499)*x[1]+(-0.369319413141)*x[2]**o+(0.0374413262362)*x[2]
-        arg[3,0,2,1]=(0.678360463658)*x[0]**o+(-0.357900119646)*x[0]+(0.300750717059)*x[1]**o+(0.516196189448)*x[1]+(0.0535466018203)*x[2]**o+(-0.149961940786)*x[2]
-        arg[3,1,0,0]=(0.0975994351079)*x[0]**o+(0.634544068499)*x[0]+(-0.963217046352)*x[1]**o+(-0.804658091456)*x[1]+(-0.620132720823)*x[2]**o+(0.862250619369)*x[2]
-        arg[3,1,0,1]=(0.210306328879)*x[0]**o+(-0.457341187966)*x[0]+(0.957556084801)*x[1]**o+(0.704073170928)*x[1]+(0.423134492133)*x[2]**o+(-0.167268375412)*x[2]
-        arg[3,1,1,0]=(-0.909228817744)*x[0]**o+(0.110665018921)*x[0]+(0.36275630147)*x[1]**o+(0.346866824763)*x[1]+(-0.535600547489)*x[2]**o+(0.627638814375)*x[2]
-        arg[3,1,1,1]=(0.328780933823)*x[0]**o+(-0.249563994161)*x[0]+(-0.555789062892)*x[1]**o+(-0.917287525036)*x[1]+(0.386191175017)*x[2]**o+(0.123904319061)*x[2]
-        arg[3,1,2,0]=(-0.838409901623)*x[0]**o+(0.673479705393)*x[0]+(0.482921104917)*x[1]**o+(0.136411388588)*x[1]+(0.583674116225)*x[2]**o+(0.305100836877)*x[2]
-        arg[3,1,2,1]=(0.952961008312)*x[0]**o+(-0.0501981079532)*x[0]+(0.661434464642)*x[1]**o+(0.65030469399)*x[1]+(-0.157562001295)*x[2]**o+(-0.249551892917)*x[2]
-        arg[3,2,0,0]=(-0.0232804500286)*x[0]**o+(-0.559229392203)*x[0]+(0.127967930273)*x[1]**o+(-0.635827181645)*x[1]+(-0.0426703224383)*x[2]**o+(0.47720230258)*x[2]
-        arg[3,2,0,1]=(-0.421658996106)*x[0]**o+(-0.468260038077)*x[0]+(0.479083572554)*x[1]**o+(-0.214417881841)*x[1]+(0.372430534261)*x[2]**o+(0.133063789546)*x[2]
-        arg[3,2,1,0]=(0.905811586567)*x[0]**o+(0.245447340384)*x[0]+(-0.337650999146)*x[1]**o+(0.908188235976)*x[1]+(-0.804029751277)*x[2]**o+(0.0512676456643)*x[2]
-        arg[3,2,1,1]=(-0.891486839409)*x[0]**o+(0.20753794329)*x[0]+(0.879183464252)*x[1]**o+(0.902028906992)*x[1]+(0.416776813598)*x[2]**o+(0.491964374373)*x[2]
-        arg[3,2,2,0]=(0.653067027119)*x[0]**o+(0.765293890745)*x[0]+(-0.348902169508)*x[1]**o+(0.324429035849)*x[1]+(-0.363026365065)*x[2]**o+(0.0816186405511)*x[2]
-        arg[3,2,2,1]=(-0.0415375052325)*x[0]**o+(-0.480779075784)*x[0]+(-0.137223552938)*x[1]**o+(-0.915733625512)*x[1]+(0.750199445159)*x[2]**o+(-0.789818945171)*x[2]
-        arg[3,3,0,0]=(0.0744921239083)*x[0]**o+(0.0700589144159)*x[0]+(-0.327105425297)*x[1]**o+(0.469843257765)*x[1]+(-0.170191600844)*x[2]**o+(0.732071534155)*x[2]
-        arg[3,3,0,1]=(0.172643927441)*x[0]**o+(0.848924114383)*x[0]+(-0.79125762228)*x[1]**o+(-0.694725775976)*x[1]+(-0.309710503985)*x[2]**o+(-0.405310234927)*x[2]
-        arg[3,3,1,0]=(-0.465911787595)*x[0]**o+(-0.71080474709)*x[0]+(0.959925934203)*x[1]**o+(-0.111110644825)*x[1]+(-0.145349925218)*x[2]**o+(0.122955165811)*x[2]
-        arg[3,3,1,1]=(-0.769111863754)*x[0]**o+(0.348036938532)*x[0]+(0.485890856474)*x[1]**o+(0.382595218985)*x[1]+(-0.897488692981)*x[2]**o+(0.830822333819)*x[2]
-        arg[3,3,2,0]=(0.341890793681)*x[0]**o+(-0.667145936571)*x[0]+(-0.145094108268)*x[1]**o+(0.771433911212)*x[1]+(-0.299752164325)*x[2]**o+(-0.357856549677)*x[2]
-        arg[3,3,2,1]=(0.26381838796)*x[0]**o+(-0.44474724998)*x[0]+(0.310283988195)*x[1]**o+(0.698675181314)*x[1]+(0.437624133238)*x[2]**o+(0.394916054445)*x[2]
-        arg[3,4,0,0]=(-0.576499406674)*x[0]**o+(0.770936634959)*x[0]+(0.707441735783)*x[1]**o+(-0.794953257043)*x[1]+(-0.535342943209)*x[2]**o+(-0.509446811787)*x[2]
-        arg[3,4,0,1]=(0.161115012113)*x[0]**o+(0.11079092252)*x[0]+(0.0633804181164)*x[1]**o+(-0.406049293019)*x[1]+(-0.824283994336)*x[2]**o+(-0.481107560499)*x[2]
-        arg[3,4,1,0]=(-0.411133810295)*x[0]**o+(0.988486625099)*x[0]+(-0.36050191367)*x[1]**o+(0.469479821965)*x[1]+(-0.431175357325)*x[2]**o+(-0.966295015263)*x[2]
-        arg[3,4,1,1]=(0.233731410367)*x[0]**o+(-0.821900740766)*x[0]+(-0.823123461385)*x[1]**o+(-0.380537914421)*x[1]+(-0.896146300355)*x[2]**o+(-0.775172990257)*x[2]
-        arg[3,4,2,0]=(-0.96323363586)*x[0]**o+(0.0935412405245)*x[0]+(0.929333026259)*x[1]**o+(-0.322236627348)*x[1]+(-0.390898135964)*x[2]**o+(-0.766178290162)*x[2]
-        arg[3,4,2,1]=(-0.773670533268)*x[0]**o+(-0.156975157098)*x[0]+(-0.91512996795)*x[1]**o+(0.0247803682126)*x[1]+(0.995159733782)*x[2]**o+(-0.669224144225)*x[2]
-        ref[0,0,0,0]=(-0.110519315354)*x_ref[0]**o+(0.904227374292)*x_ref[0]+(0.459005710707)*x_ref[1]**o+(-0.980231422256)*x_ref[1]+(-0.819713355475)*x_ref[2]**o+(-0.93459517989)*x_ref[2]
-        ref[0,0,0,1]=(-0.326902946413)*x_ref[0]**o+(0.489327766219)*x_ref[0]+(-0.965308741061)*x_ref[1]**o+(0.0351399111471)*x_ref[1]+(0.257760096595)*x_ref[2]**o+(0.125123023244)*x_ref[2]
-        ref[0,0,1,0]=(-0.584360710004)*x_ref[0]**o+(0.681892732544)*x_ref[0]+(-0.118257741614)*x_ref[1]**o+(0.839875738892)*x_ref[1]+(0.107934154241)*x_ref[2]**o+(0.279757054665)*x_ref[2]
-        ref[0,0,1,1]=(0.90973214794)*x_ref[0]**o+(-0.776804618826)*x_ref[0]+(-0.910633853381)*x_ref[1]**o+(-0.25678788529)*x_ref[1]+(0.783709363646)*x_ref[2]**o+(-0.922660855915)*x_ref[2]
-        ref[0,0,2,0]=(-0.802273263394)*x_ref[0]**o+(-0.917749665952)*x_ref[0]+(0.796206817226)*x_ref[1]**o+(0.917284637885)*x_ref[1]+(0.219841508893)*x_ref[2]**o+(0.0655848200083)*x_ref[2]
-        ref[0,0,2,1]=(0.550596792343)*x_ref[0]**o+(-0.760207057617)*x_ref[0]+(0.0368469683098)*x_ref[1]**o+(0.509347717331)*x_ref[1]+(0.813780778487)*x_ref[2]**o+(-0.432656298451)*x_ref[2]
-        ref[0,1,0,0]=(-0.238502042941)*x_ref[0]**o+(-0.966632221032)*x_ref[0]+(-0.373745652933)*x_ref[1]**o+(-0.436176336389)*x_ref[1]+(0.124280197699)*x_ref[2]**o+(0.552700562803)*x_ref[2]
-        ref[0,1,0,1]=(-0.19848053276)*x_ref[0]**o+(0.110167634957)*x_ref[0]+(-0.748553857473)*x_ref[1]**o+(0.355932508959)*x_ref[1]+(-0.226987914753)*x_ref[2]**o+(-0.68870238197)*x_ref[2]
-        ref[0,1,1,0]=(0.365822518882)*x_ref[0]**o+(0.327285102897)*x_ref[0]+(0.549212504635)*x_ref[1]**o+(0.918179946504)*x_ref[1]+(0.20644004679)*x_ref[2]**o+(0.821299409756)*x_ref[2]
-        ref[0,1,1,1]=(-0.366167489101)*x_ref[0]**o+(0.529933186572)*x_ref[0]+(-0.604965310967)*x_ref[1]**o+(-0.833093092352)*x_ref[1]+(-0.73593913912)*x_ref[2]**o+(0.872325614453)*x_ref[2]
-        ref[0,1,2,0]=(0.289123646902)*x_ref[0]**o+(0.705862153789)*x_ref[0]+(-0.319756886822)*x_ref[1]**o+(-0.453220232524)*x_ref[1]+(-0.192336374167)*x_ref[2]**o+(0.363575495006)*x_ref[2]
-        ref[0,1,2,1]=(-0.213014833353)*x_ref[0]**o+(-0.0706784230627)*x_ref[0]+(-0.941272982229)*x_ref[1]**o+(-0.96641361036)*x_ref[1]+(0.289919014964)*x_ref[2]**o+(0.57658772066)*x_ref[2]
-        ref[0,2,0,0]=(-0.406683991704)*x_ref[0]**o+(-0.0110042213592)*x_ref[0]+(-0.273148083258)*x_ref[1]**o+(0.054257030447)*x_ref[1]+(0.387598147681)*x_ref[2]**o+(0.480398109069)*x_ref[2]
-        ref[0,2,0,1]=(0.318713057562)*x_ref[0]**o+(-0.449467749585)*x_ref[0]+(0.669991267829)*x_ref[1]**o+(0.237986860249)*x_ref[1]+(0.894370523471)*x_ref[2]**o+(-0.397832436233)*x_ref[2]
-        ref[0,2,1,0]=(-0.858603253642)*x_ref[0]**o+(-0.713122015919)*x_ref[0]+(0.870251906188)*x_ref[1]**o+(-0.781601254578)*x_ref[1]+(-0.504531525822)*x_ref[2]**o+(-0.699819349556)*x_ref[2]
-        ref[0,2,1,1]=(-0.825591116361)*x_ref[0]**o+(-0.552452876394)*x_ref[0]+(-0.262627261618)*x_ref[1]**o+(-0.147127256184)*x_ref[1]+(-0.171485665103)*x_ref[2]**o+(0.823279741501)*x_ref[2]
-        ref[0,2,2,0]=(-0.0416279689068)*x_ref[0]**o+(-0.0903338000001)*x_ref[0]+(0.911673780635)*x_ref[1]**o+(0.86298673049)*x_ref[1]+(-0.60251179847)*x_ref[2]**o+(0.378303877746)*x_ref[2]
-        ref[0,2,2,1]=(0.261384106387)*x_ref[0]**o+(0.0326416199811)*x_ref[0]+(-0.426740102269)*x_ref[1]**o+(-0.445401626921)*x_ref[1]+(-0.388668254526)*x_ref[2]**o+(-0.977942913284)*x_ref[2]
-        ref[0,3,0,0]=(-0.0195053813483)*x_ref[0]**o+(-0.294061998664)*x_ref[0]+(0.790461098426)*x_ref[1]**o+(-0.506334268838)*x_ref[1]+(0.394015541605)*x_ref[2]**o+(-0.562248105432)*x_ref[2]
-        ref[0,3,0,1]=(0.390726516735)*x_ref[0]**o+(-0.757597437859)*x_ref[0]+(0.861882149861)*x_ref[1]**o+(0.621870451314)*x_ref[1]+(0.900777666162)*x_ref[2]**o+(0.271507131938)*x_ref[2]
-        ref[0,3,1,0]=(-0.725635966475)*x_ref[0]**o+(-0.695837548737)*x_ref[0]+(-0.163078176328)*x_ref[1]**o+(-0.0435808418729)*x_ref[1]+(0.0890756544611)*x_ref[2]**o+(-0.270422627949)*x_ref[2]
-        ref[0,3,1,1]=(-0.175498720647)*x_ref[0]**o+(-0.213605441632)*x_ref[0]+(-0.358632620362)*x_ref[1]**o+(-0.193273004152)*x_ref[1]+(0.937704823805)*x_ref[2]**o+(0.861707832291)*x_ref[2]
-        ref[0,3,2,0]=(0.0976010265611)*x_ref[0]**o+(0.995135925341)*x_ref[0]+(0.755339287387)*x_ref[1]**o+(-0.924722068193)*x_ref[1]+(-0.480212181904)*x_ref[2]**o+(-0.40237760439)*x_ref[2]
-        ref[0,3,2,1]=(-0.679215392952)*x_ref[0]**o+(-0.00796096253297)*x_ref[0]+(-0.964972599421)*x_ref[1]**o+(-0.410415435656)*x_ref[1]+(-0.292638067785)*x_ref[2]**o+(-0.950383976561)*x_ref[2]
-        ref[0,4,0,0]=(0.245586594928)*x_ref[0]**o+(-0.593420401896)*x_ref[0]+(0.553450486534)*x_ref[1]**o+(0.173814965689)*x_ref[1]+(0.0719392610563)*x_ref[2]**o+(0.676231437486)*x_ref[2]
-        ref[0,4,0,1]=(0.154382756425)*x_ref[0]**o+(-0.0655740293432)*x_ref[0]+(0.924689745142)*x_ref[1]**o+(-0.246876531175)*x_ref[1]+(-0.241460713543)*x_ref[2]**o+(-0.489840108568)*x_ref[2]
-        ref[0,4,1,0]=(-0.482705840359)*x_ref[0]**o+(-0.392960380114)*x_ref[0]+(-0.503463823972)*x_ref[1]**o+(0.317163204738)*x_ref[1]+(0.775048877356)*x_ref[2]**o+(0.599889732326)*x_ref[2]
-        ref[0,4,1,1]=(-0.122555861716)*x_ref[0]**o+(0.930175770449)*x_ref[0]+(0.483503764941)*x_ref[1]**o+(0.340001033217)*x_ref[1]+(0.672924280979)*x_ref[2]**o+(0.746489359683)*x_ref[2]
-        ref[0,4,2,0]=(-0.339421141033)*x_ref[0]**o+(-0.604966575169)*x_ref[0]+(0.862413017648)*x_ref[1]**o+(0.936752078454)*x_ref[1]+(-0.0549628353285)*x_ref[2]**o+(-0.0858885835314)*x_ref[2]
-        ref[0,4,2,1]=(-0.581767357421)*x_ref[0]**o+(-0.644286027548)*x_ref[0]+(0.76948396865)*x_ref[1]**o+(0.692265904744)*x_ref[1]+(0.955871091531)*x_ref[2]**o+(-0.378888503457)*x_ref[2]
-        ref[1,0,0,0]=(-0.0407846595046)*x_ref[0]**o+(-0.293709943251)*x_ref[0]+(-0.310552931582)*x_ref[1]**o+(-0.696244178466)*x_ref[1]+(0.962985284252)*x_ref[2]**o+(-0.0266457621404)*x_ref[2]
-        ref[1,0,0,1]=(-0.480942811584)*x_ref[0]**o+(-0.400158759679)*x_ref[0]+(0.311171869807)*x_ref[1]**o+(-0.79518809427)*x_ref[1]+(-0.497004450478)*x_ref[2]**o+(-0.639822005752)*x_ref[2]
-        ref[1,0,1,0]=(0.158738648483)*x_ref[0]**o+(0.274859816468)*x_ref[0]+(-0.208677612654)*x_ref[1]**o+(0.911107598366)*x_ref[1]+(-0.400163007778)*x_ref[2]**o+(0.276296890267)*x_ref[2]
-        ref[1,0,1,1]=(0.613312276864)*x_ref[0]**o+(-0.644237218776)*x_ref[0]+(0.81927272895)*x_ref[1]**o+(-0.12971860556)*x_ref[1]+(0.214379406799)*x_ref[2]**o+(0.856335675043)*x_ref[2]
-        ref[1,0,2,0]=(-0.699925173766)*x_ref[0]**o+(-0.560613547952)*x_ref[0]+(-0.355325107637)*x_ref[1]**o+(-0.598747822041)*x_ref[1]+(0.243087037553)*x_ref[2]**o+(-0.484176993015)*x_ref[2]
-        ref[1,0,2,1]=(-0.218912300848)*x_ref[0]**o+(-0.259483312969)*x_ref[0]+(-0.863788186295)*x_ref[1]**o+(0.924423774757)*x_ref[1]+(-0.0823752192204)*x_ref[2]**o+(-0.928377900602)*x_ref[2]
-        ref[1,1,0,0]=(-0.368901144425)*x_ref[0]**o+(0.544104655592)*x_ref[0]+(0.321295151176)*x_ref[1]**o+(0.395692754134)*x_ref[1]+(-0.721319111754)*x_ref[2]**o+(-0.698518442137)*x_ref[2]
-        ref[1,1,0,1]=(-0.592867336047)*x_ref[0]**o+(0.145120231038)*x_ref[0]+(0.110390771366)*x_ref[1]**o+(0.168333368086)*x_ref[1]+(-0.577866419921)*x_ref[2]**o+(0.705027708469)*x_ref[2]
-        ref[1,1,1,0]=(-0.210603428235)*x_ref[0]**o+(-0.250156447116)*x_ref[0]+(-0.397803248976)*x_ref[1]**o+(0.332163380867)*x_ref[1]+(-0.250648216541)*x_ref[2]**o+(-0.0693729055697)*x_ref[2]
-        ref[1,1,1,1]=(0.324927558096)*x_ref[0]**o+(-0.262726116223)*x_ref[0]+(-0.555439758488)*x_ref[1]**o+(-0.865019248609)*x_ref[1]+(-0.0971907425857)*x_ref[2]**o+(-0.742359236711)*x_ref[2]
-        ref[1,1,2,0]=(0.161058869414)*x_ref[0]**o+(0.349191500791)*x_ref[0]+(0.468336473315)*x_ref[1]**o+(-0.856364775995)*x_ref[1]+(0.491736696689)*x_ref[2]**o+(0.352984104173)*x_ref[2]
-        ref[1,1,2,1]=(-0.243275976508)*x_ref[0]**o+(-0.785605388878)*x_ref[0]+(-0.282478919296)*x_ref[1]**o+(-0.728851522341)*x_ref[1]+(0.375134848237)*x_ref[2]**o+(-0.486200561256)*x_ref[2]
-        ref[1,2,0,0]=(-0.172241451405)*x_ref[0]**o+(0.422361498196)*x_ref[0]+(0.464862755164)*x_ref[1]**o+(0.466661717105)*x_ref[1]+(-0.886209677512)*x_ref[2]**o+(-0.43529076789)*x_ref[2]
-        ref[1,2,0,1]=(0.946582222405)*x_ref[0]**o+(0.513640973894)*x_ref[0]+(-0.923788000633)*x_ref[1]**o+(-0.358163567195)*x_ref[1]+(-0.709999132129)*x_ref[2]**o+(-0.761163299694)*x_ref[2]
-        ref[1,2,1,0]=(0.236339981889)*x_ref[0]**o+(0.259874866134)*x_ref[0]+(-0.32460762691)*x_ref[1]**o+(-0.629786950313)*x_ref[1]+(-0.679261685402)*x_ref[2]**o+(0.593069192918)*x_ref[2]
-        ref[1,2,1,1]=(0.11006800009)*x_ref[0]**o+(0.970532991787)*x_ref[0]+(-0.467608188361)*x_ref[1]**o+(-0.959281984552)*x_ref[1]+(0.610396622519)*x_ref[2]**o+(0.282468600058)*x_ref[2]
-        ref[1,2,2,0]=(-0.656419157742)*x_ref[0]**o+(0.234027308171)*x_ref[0]+(-0.67027206978)*x_ref[1]**o+(-0.746034436817)*x_ref[1]+(-0.771894073652)*x_ref[2]**o+(0.949545830287)*x_ref[2]
-        ref[1,2,2,1]=(0.615884236811)*x_ref[0]**o+(-0.670156612555)*x_ref[0]+(0.543165493345)*x_ref[1]**o+(-0.618294277594)*x_ref[1]+(-0.974114255061)*x_ref[2]**o+(-0.762320542298)*x_ref[2]
-        ref[1,3,0,0]=(0.096201957648)*x_ref[0]**o+(0.440870816208)*x_ref[0]+(0.124448859607)*x_ref[1]**o+(0.507919407561)*x_ref[1]+(-0.401666263687)*x_ref[2]**o+(-0.437653713723)*x_ref[2]
-        ref[1,3,0,1]=(0.165129229294)*x_ref[0]**o+(-0.353217428955)*x_ref[0]+(0.473666065504)*x_ref[1]**o+(0.907667166988)*x_ref[1]+(-0.864298533288)*x_ref[2]**o+(0.641505117281)*x_ref[2]
-        ref[1,3,1,0]=(0.381900624425)*x_ref[0]**o+(0.427520178597)*x_ref[0]+(-0.560279540293)*x_ref[1]**o+(0.190814532271)*x_ref[1]+(-0.187947688629)*x_ref[2]**o+(-0.127694148593)*x_ref[2]
-        ref[1,3,1,1]=(-0.903921363895)*x_ref[0]**o+(-0.659942040828)*x_ref[0]+(-0.549460213492)*x_ref[1]**o+(0.869909651895)*x_ref[1]+(-0.962273439484)*x_ref[2]**o+(-0.046365857751)*x_ref[2]
-        ref[1,3,2,0]=(-0.021688482187)*x_ref[0]**o+(-0.209531000717)*x_ref[0]+(0.668564395133)*x_ref[1]**o+(-0.0347978700975)*x_ref[1]+(0.947677147488)*x_ref[2]**o+(-0.0152385052475)*x_ref[2]
-        ref[1,3,2,1]=(0.880839485817)*x_ref[0]**o+(-0.319275929312)*x_ref[0]+(-0.940056657485)*x_ref[1]**o+(0.570855397726)*x_ref[1]+(0.279710812074)*x_ref[2]**o+(0.496622215051)*x_ref[2]
-        ref[1,4,0,0]=(-0.139033645615)*x_ref[0]**o+(-0.271453722366)*x_ref[0]+(-0.268516720244)*x_ref[1]**o+(-0.0467555017438)*x_ref[1]+(-0.41618262265)*x_ref[2]**o+(0.315320363813)*x_ref[2]
-        ref[1,4,0,1]=(0.296108607204)*x_ref[0]**o+(-0.184582165661)*x_ref[0]+(0.121416543744)*x_ref[1]**o+(-0.922284926751)*x_ref[1]+(-0.437600089668)*x_ref[2]**o+(-0.608800626513)*x_ref[2]
-        ref[1,4,1,0]=(0.8942028423)*x_ref[0]**o+(0.673402831188)*x_ref[0]+(-0.622529195562)*x_ref[1]**o+(-0.266052338798)*x_ref[1]+(-0.273167851702)*x_ref[2]**o+(-0.312211982747)*x_ref[2]
-        ref[1,4,1,1]=(-0.102315711178)*x_ref[0]**o+(-0.885515719371)*x_ref[0]+(-0.532910101204)*x_ref[1]**o+(0.798525944348)*x_ref[1]+(0.640586802303)*x_ref[2]**o+(0.36308806536)*x_ref[2]
-        ref[1,4,2,0]=(0.376793506541)*x_ref[0]**o+(-0.667063564875)*x_ref[0]+(0.609591985816)*x_ref[1]**o+(0.28347745142)*x_ref[1]+(-0.751832936302)*x_ref[2]**o+(-0.683738856965)*x_ref[2]
-        ref[1,4,2,1]=(-0.51412252819)*x_ref[0]**o+(0.559560297206)*x_ref[0]+(0.751134603429)*x_ref[1]**o+(-0.0031812310797)*x_ref[1]+(-0.525776122178)*x_ref[2]**o+(0.338471942848)*x_ref[2]
-        ref[2,0,0,0]=(0.937572244905)*x_ref[0]**o+(-0.293020870379)*x_ref[0]+(-0.918591520817)*x_ref[1]**o+(0.622194477261)*x_ref[1]+(0.31641482851)*x_ref[2]**o+(0.276912266864)*x_ref[2]
-        ref[2,0,0,1]=(0.853041599998)*x_ref[0]**o+(-0.0220623724171)*x_ref[0]+(0.89909044296)*x_ref[1]**o+(-0.838782642732)*x_ref[1]+(0.0133197592042)*x_ref[2]**o+(-0.868977618993)*x_ref[2]
-        ref[2,0,1,0]=(-0.325799042976)*x_ref[0]**o+(0.746269971994)*x_ref[0]+(0.882671061757)*x_ref[1]**o+(-0.284133373252)*x_ref[1]+(0.120086549521)*x_ref[2]**o+(-0.397352610969)*x_ref[2]
-        ref[2,0,1,1]=(0.282336934951)*x_ref[0]**o+(-0.339893978547)*x_ref[0]+(-0.0861660125386)*x_ref[1]**o+(0.283063579798)*x_ref[1]+(0.714762478569)*x_ref[2]**o+(-0.497021718549)*x_ref[2]
-        ref[2,0,2,0]=(0.891782779491)*x_ref[0]**o+(-0.817647577644)*x_ref[0]+(0.364088142085)*x_ref[1]**o+(-0.950577637048)*x_ref[1]+(0.4070663557)*x_ref[2]**o+(0.270753179246)*x_ref[2]
-        ref[2,0,2,1]=(0.316594913808)*x_ref[0]**o+(0.310731486851)*x_ref[0]+(0.250421828765)*x_ref[1]**o+(0.772786141458)*x_ref[1]+(0.64843040679)*x_ref[2]**o+(-0.691903332511)*x_ref[2]
-        ref[2,1,0,0]=(0.87180715028)*x_ref[0]**o+(-0.953173230375)*x_ref[0]+(-0.823516344548)*x_ref[1]**o+(0.934653756548)*x_ref[1]+(-0.537124962489)*x_ref[2]**o+(-0.233365939659)*x_ref[2]
-        ref[2,1,0,1]=(-0.407189744631)*x_ref[0]**o+(-0.754425720288)*x_ref[0]+(0.737526767897)*x_ref[1]**o+(0.745393943502)*x_ref[1]+(0.811744293685)*x_ref[2]**o+(-0.459556659177)*x_ref[2]
-        ref[2,1,1,0]=(-0.693529259877)*x_ref[0]**o+(0.580197938048)*x_ref[0]+(0.506055440405)*x_ref[1]**o+(0.122531014759)*x_ref[1]+(0.427736137775)*x_ref[2]**o+(-0.83260140401)*x_ref[2]
-        ref[2,1,1,1]=(0.542621975026)*x_ref[0]**o+(-0.568425713106)*x_ref[0]+(0.303002043446)*x_ref[1]**o+(0.363286261651)*x_ref[1]+(0.2729476289)*x_ref[2]**o+(-0.0113629744659)*x_ref[2]
-        ref[2,1,2,0]=(-0.266750235694)*x_ref[0]**o+(0.10116400306)*x_ref[0]+(0.315977962897)*x_ref[1]**o+(-0.406236201454)*x_ref[1]+(-0.586845072374)*x_ref[2]**o+(0.513937047282)*x_ref[2]
-        ref[2,1,2,1]=(-0.518780811975)*x_ref[0]**o+(0.275053640829)*x_ref[0]+(0.4234970646)*x_ref[1]**o+(0.389585163376)*x_ref[1]+(-0.609771068778)*x_ref[2]**o+(-0.121467061755)*x_ref[2]
-        ref[2,2,0,0]=(0.138823207466)*x_ref[0]**o+(-0.779837455014)*x_ref[0]+(0.70167049555)*x_ref[1]**o+(0.766428813369)*x_ref[1]+(0.114023530366)*x_ref[2]**o+(0.650098536187)*x_ref[2]
-        ref[2,2,0,1]=(0.974998667633)*x_ref[0]**o+(0.958471050654)*x_ref[0]+(0.193515162503)*x_ref[1]**o+(-0.252148167253)*x_ref[1]+(0.495475460125)*x_ref[2]**o+(0.562693347983)*x_ref[2]
-        ref[2,2,1,0]=(-0.552379548988)*x_ref[0]**o+(-0.831399971618)*x_ref[0]+(0.437581216647)*x_ref[1]**o+(-0.775331267696)*x_ref[1]+(0.729041628844)*x_ref[2]**o+(0.633113359893)*x_ref[2]
-        ref[2,2,1,1]=(0.379858437049)*x_ref[0]**o+(0.923586504203)*x_ref[0]+(0.707244783969)*x_ref[1]**o+(-0.293157375059)*x_ref[1]+(-0.368717941876)*x_ref[2]**o+(-0.202610288616)*x_ref[2]
-        ref[2,2,2,0]=(-0.804826108231)*x_ref[0]**o+(-0.0208712096312)*x_ref[0]+(0.0482547072498)*x_ref[1]**o+(0.852366543609)*x_ref[1]+(0.328962500136)*x_ref[2]**o+(-0.132777835512)*x_ref[2]
-        ref[2,2,2,1]=(0.91373752217)*x_ref[0]**o+(-0.792112120729)*x_ref[0]+(-0.0457564087072)*x_ref[1]**o+(0.309694852949)*x_ref[1]+(0.089219285337)*x_ref[2]**o+(-0.516000514614)*x_ref[2]
-        ref[2,3,0,0]=(0.343215129115)*x_ref[0]**o+(0.40804099837)*x_ref[0]+(-0.865942442914)*x_ref[1]**o+(0.842241683043)*x_ref[1]+(0.0727803297601)*x_ref[2]**o+(-0.395225682949)*x_ref[2]
-        ref[2,3,0,1]=(-0.965340522771)*x_ref[0]**o+(-0.897056478677)*x_ref[0]+(-0.305205944062)*x_ref[1]**o+(0.393941789685)*x_ref[1]+(-0.253328379131)*x_ref[2]**o+(0.0951510469271)*x_ref[2]
-        ref[2,3,1,0]=(0.536251514752)*x_ref[0]**o+(0.0629776386779)*x_ref[0]+(-0.706311222379)*x_ref[1]**o+(-0.84362242029)*x_ref[1]+(0.00110678760539)*x_ref[2]**o+(-0.30286059941)*x_ref[2]
-        ref[2,3,1,1]=(0.114584737295)*x_ref[0]**o+(0.0708763738067)*x_ref[0]+(-0.454760062397)*x_ref[1]**o+(0.228742539922)*x_ref[1]+(0.514960810352)*x_ref[2]**o+(-0.815749211085)*x_ref[2]
-        ref[2,3,2,0]=(0.246335688008)*x_ref[0]**o+(-0.239199299885)*x_ref[0]+(-0.447390151659)*x_ref[1]**o+(0.918949356391)*x_ref[1]+(-0.307864840175)*x_ref[2]**o+(0.560139080481)*x_ref[2]
-        ref[2,3,2,1]=(0.118766035723)*x_ref[0]**o+(0.610711164899)*x_ref[0]+(0.336628771776)*x_ref[1]**o+(0.833699268751)*x_ref[1]+(-0.424694647429)*x_ref[2]**o+(-0.639929688104)*x_ref[2]
-        ref[2,4,0,0]=(0.814543506987)*x_ref[0]**o+(-0.797684321368)*x_ref[0]+(0.337242635783)*x_ref[1]**o+(0.278139837072)*x_ref[1]+(0.633511526441)*x_ref[2]**o+(0.372175615028)*x_ref[2]
-        ref[2,4,0,1]=(-0.0590668694094)*x_ref[0]**o+(0.256732067267)*x_ref[0]+(0.519737187577)*x_ref[1]**o+(-0.376391855948)*x_ref[1]+(-0.810934658651)*x_ref[2]**o+(0.826899476928)*x_ref[2]
-        ref[2,4,1,0]=(-0.428976843661)*x_ref[0]**o+(0.672667833313)*x_ref[0]+(0.263194890946)*x_ref[1]**o+(-0.894790773661)*x_ref[1]+(-0.550298557295)*x_ref[2]**o+(-0.00560384035502)*x_ref[2]
-        ref[2,4,1,1]=(-0.818372430144)*x_ref[0]**o+(-0.829920833073)*x_ref[0]+(-0.359560636119)*x_ref[1]**o+(-0.113484563205)*x_ref[1]+(0.586796110365)*x_ref[2]**o+(0.296820898426)*x_ref[2]
-        ref[2,4,2,0]=(-0.691597969566)*x_ref[0]**o+(0.715813153538)*x_ref[0]+(0.954093612503)*x_ref[1]**o+(0.88803420754)*x_ref[1]+(0.697447667765)*x_ref[2]**o+(0.793730496625)*x_ref[2]
-        ref[2,4,2,1]=(0.351099833336)*x_ref[0]**o+(-0.716419272807)*x_ref[0]+(0.318726674998)*x_ref[1]**o+(0.246151914414)*x_ref[1]+(-0.945520673884)*x_ref[2]**o+(-0.489026233954)*x_ref[2]
-        ref[3,0,0,0]=(0.511598022804)*x_ref[0]**o+(0.567617269582)*x_ref[0]+(-0.526293319137)*x_ref[1]**o+(0.333750098146)*x_ref[1]+(-0.0869228849144)*x_ref[2]**o+(-0.204072834867)*x_ref[2]
-        ref[3,0,0,1]=(0.905384007172)*x_ref[0]**o+(-0.661067390314)*x_ref[0]+(-0.470790632295)*x_ref[1]**o+(-0.149608017616)*x_ref[1]+(0.427879278267)*x_ref[2]**o+(0.987040179184)*x_ref[2]
-        ref[3,0,1,0]=(-0.946562006809)*x_ref[0]**o+(0.64141909633)*x_ref[0]+(-0.762076826276)*x_ref[1]**o+(-0.642912850794)*x_ref[1]+(0.712567898559)*x_ref[2]**o+(-0.292128944205)*x_ref[2]
-        ref[3,0,1,1]=(-0.955087949361)*x_ref[0]**o+(0.426588041133)*x_ref[0]+(0.339313104127)*x_ref[1]**o+(-0.375147344045)*x_ref[1]+(0.967259014679)*x_ref[2]**o+(0.504521081858)*x_ref[2]
-        ref[3,0,2,0]=(0.141876598344)*x_ref[0]**o+(-0.335579252825)*x_ref[0]+(0.514552993602)*x_ref[1]**o+(-0.531116948499)*x_ref[1]+(-0.369319413141)*x_ref[2]**o+(0.0374413262362)*x_ref[2]
-        ref[3,0,2,1]=(0.678360463658)*x_ref[0]**o+(-0.357900119646)*x_ref[0]+(0.300750717059)*x_ref[1]**o+(0.516196189448)*x_ref[1]+(0.0535466018203)*x_ref[2]**o+(-0.149961940786)*x_ref[2]
-        ref[3,1,0,0]=(0.0975994351079)*x_ref[0]**o+(0.634544068499)*x_ref[0]+(-0.963217046352)*x_ref[1]**o+(-0.804658091456)*x_ref[1]+(-0.620132720823)*x_ref[2]**o+(0.862250619369)*x_ref[2]
-        ref[3,1,0,1]=(0.210306328879)*x_ref[0]**o+(-0.457341187966)*x_ref[0]+(0.957556084801)*x_ref[1]**o+(0.704073170928)*x_ref[1]+(0.423134492133)*x_ref[2]**o+(-0.167268375412)*x_ref[2]
-        ref[3,1,1,0]=(-0.909228817744)*x_ref[0]**o+(0.110665018921)*x_ref[0]+(0.36275630147)*x_ref[1]**o+(0.346866824763)*x_ref[1]+(-0.535600547489)*x_ref[2]**o+(0.627638814375)*x_ref[2]
-        ref[3,1,1,1]=(0.328780933823)*x_ref[0]**o+(-0.249563994161)*x_ref[0]+(-0.555789062892)*x_ref[1]**o+(-0.917287525036)*x_ref[1]+(0.386191175017)*x_ref[2]**o+(0.123904319061)*x_ref[2]
-        ref[3,1,2,0]=(-0.838409901623)*x_ref[0]**o+(0.673479705393)*x_ref[0]+(0.482921104917)*x_ref[1]**o+(0.136411388588)*x_ref[1]+(0.583674116225)*x_ref[2]**o+(0.305100836877)*x_ref[2]
-        ref[3,1,2,1]=(0.952961008312)*x_ref[0]**o+(-0.0501981079532)*x_ref[0]+(0.661434464642)*x_ref[1]**o+(0.65030469399)*x_ref[1]+(-0.157562001295)*x_ref[2]**o+(-0.249551892917)*x_ref[2]
-        ref[3,2,0,0]=(-0.0232804500286)*x_ref[0]**o+(-0.559229392203)*x_ref[0]+(0.127967930273)*x_ref[1]**o+(-0.635827181645)*x_ref[1]+(-0.0426703224383)*x_ref[2]**o+(0.47720230258)*x_ref[2]
-        ref[3,2,0,1]=(-0.421658996106)*x_ref[0]**o+(-0.468260038077)*x_ref[0]+(0.479083572554)*x_ref[1]**o+(-0.214417881841)*x_ref[1]+(0.372430534261)*x_ref[2]**o+(0.133063789546)*x_ref[2]
-        ref[3,2,1,0]=(0.905811586567)*x_ref[0]**o+(0.245447340384)*x_ref[0]+(-0.337650999146)*x_ref[1]**o+(0.908188235976)*x_ref[1]+(-0.804029751277)*x_ref[2]**o+(0.0512676456643)*x_ref[2]
-        ref[3,2,1,1]=(-0.891486839409)*x_ref[0]**o+(0.20753794329)*x_ref[0]+(0.879183464252)*x_ref[1]**o+(0.902028906992)*x_ref[1]+(0.416776813598)*x_ref[2]**o+(0.491964374373)*x_ref[2]
-        ref[3,2,2,0]=(0.653067027119)*x_ref[0]**o+(0.765293890745)*x_ref[0]+(-0.348902169508)*x_ref[1]**o+(0.324429035849)*x_ref[1]+(-0.363026365065)*x_ref[2]**o+(0.0816186405511)*x_ref[2]
-        ref[3,2,2,1]=(-0.0415375052325)*x_ref[0]**o+(-0.480779075784)*x_ref[0]+(-0.137223552938)*x_ref[1]**o+(-0.915733625512)*x_ref[1]+(0.750199445159)*x_ref[2]**o+(-0.789818945171)*x_ref[2]
-        ref[3,3,0,0]=(0.0744921239083)*x_ref[0]**o+(0.0700589144159)*x_ref[0]+(-0.327105425297)*x_ref[1]**o+(0.469843257765)*x_ref[1]+(-0.170191600844)*x_ref[2]**o+(0.732071534155)*x_ref[2]
-        ref[3,3,0,1]=(0.172643927441)*x_ref[0]**o+(0.848924114383)*x_ref[0]+(-0.79125762228)*x_ref[1]**o+(-0.694725775976)*x_ref[1]+(-0.309710503985)*x_ref[2]**o+(-0.405310234927)*x_ref[2]
-        ref[3,3,1,0]=(-0.465911787595)*x_ref[0]**o+(-0.71080474709)*x_ref[0]+(0.959925934203)*x_ref[1]**o+(-0.111110644825)*x_ref[1]+(-0.145349925218)*x_ref[2]**o+(0.122955165811)*x_ref[2]
-        ref[3,3,1,1]=(-0.769111863754)*x_ref[0]**o+(0.348036938532)*x_ref[0]+(0.485890856474)*x_ref[1]**o+(0.382595218985)*x_ref[1]+(-0.897488692981)*x_ref[2]**o+(0.830822333819)*x_ref[2]
-        ref[3,3,2,0]=(0.341890793681)*x_ref[0]**o+(-0.667145936571)*x_ref[0]+(-0.145094108268)*x_ref[1]**o+(0.771433911212)*x_ref[1]+(-0.299752164325)*x_ref[2]**o+(-0.357856549677)*x_ref[2]
-        ref[3,3,2,1]=(0.26381838796)*x_ref[0]**o+(-0.44474724998)*x_ref[0]+(0.310283988195)*x_ref[1]**o+(0.698675181314)*x_ref[1]+(0.437624133238)*x_ref[2]**o+(0.394916054445)*x_ref[2]
-        ref[3,4,0,0]=(-0.576499406674)*x_ref[0]**o+(0.770936634959)*x_ref[0]+(0.707441735783)*x_ref[1]**o+(-0.794953257043)*x_ref[1]+(-0.535342943209)*x_ref[2]**o+(-0.509446811787)*x_ref[2]
-        ref[3,4,0,1]=(0.161115012113)*x_ref[0]**o+(0.11079092252)*x_ref[0]+(0.0633804181164)*x_ref[1]**o+(-0.406049293019)*x_ref[1]+(-0.824283994336)*x_ref[2]**o+(-0.481107560499)*x_ref[2]
-        ref[3,4,1,0]=(-0.411133810295)*x_ref[0]**o+(0.988486625099)*x_ref[0]+(-0.36050191367)*x_ref[1]**o+(0.469479821965)*x_ref[1]+(-0.431175357325)*x_ref[2]**o+(-0.966295015263)*x_ref[2]
-        ref[3,4,1,1]=(0.233731410367)*x_ref[0]**o+(-0.821900740766)*x_ref[0]+(-0.823123461385)*x_ref[1]**o+(-0.380537914421)*x_ref[1]+(-0.896146300355)*x_ref[2]**o+(-0.775172990257)*x_ref[2]
-        ref[3,4,2,0]=(-0.96323363586)*x_ref[0]**o+(0.0935412405245)*x_ref[0]+(0.929333026259)*x_ref[1]**o+(-0.322236627348)*x_ref[1]+(-0.390898135964)*x_ref[2]**o+(-0.766178290162)*x_ref[2]
-        ref[3,4,2,1]=(-0.773670533268)*x_ref[0]**o+(-0.156975157098)*x_ref[0]+(-0.91512996795)*x_ref[1]**o+(0.0247803682126)*x_ref[1]+(0.995159733782)*x_ref[2]**o+(-0.669224144225)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.0071553637759)*x[0]**o+(0.357615094637)*x[0]+(0.980385970972)*x[1]**o+(0.423505273491)*x[1]
-        ref=(-0.0071553637759)*x_ref[0]**o+(0.357615094637)*x_ref[0]+(0.980385970972)*x_ref[1]**o+(0.423505273491)*x_ref[1]
-      else:
-        arg=(0.546251547514)*x[0]**o+(-0.530405447164)*x[0]+(-0.901465213708)*x[1]**o+(-0.986019835171)*x[1]+(-0.731836172089)*x[2]**o+(0.377317674082)*x[2]
-        ref=(0.546251547514)*x_ref[0]**o+(-0.530405447164)*x_ref[0]+(-0.901465213708)*x_ref[1]**o+(-0.986019835171)*x_ref[1]+(-0.731836172089)*x_ref[2]**o+(0.377317674082)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.138216822552)*x[0]**o+(0.908302047805)*x[0]+(-0.247600939209)*x[1]**o+(0.776239000167)*x[1]
-        arg[1]=(-0.577926899073)*x[0]**o+(0.714263102346)*x[0]+(-0.343808625475)*x[1]**o+(0.786295563423)*x[1]
-        ref[0]=(-0.138216822552)*x_ref[0]**o+(0.908302047805)*x_ref[0]+(-0.247600939209)*x_ref[1]**o+(0.776239000167)*x_ref[1]
-        ref[1]=(-0.577926899073)*x_ref[0]**o+(0.714263102346)*x_ref[0]+(-0.343808625475)*x_ref[1]**o+(0.786295563423)*x_ref[1]
-      else:
-        arg[0]=(0.020232467504)*x[0]**o+(-0.0449727381653)*x[0]+(0.00132143537494)*x[1]**o+(-0.870292414095)*x[1]+(-0.926731511382)*x[2]**o+(-0.398915622332)*x[2]
-        arg[1]=(0.203864545604)*x[0]**o+(0.150501673382)*x[0]+(0.132132290114)*x[1]**o+(-0.720617456803)*x[1]+(0.673909788445)*x[2]**o+(0.145376368499)*x[2]
-        ref[0]=(0.020232467504)*x_ref[0]**o+(-0.0449727381653)*x_ref[0]+(0.00132143537494)*x_ref[1]**o+(-0.870292414095)*x_ref[1]+(-0.926731511382)*x_ref[2]**o+(-0.398915622332)*x_ref[2]
-        ref[1]=(0.203864545604)*x_ref[0]**o+(0.150501673382)*x_ref[0]+(0.132132290114)*x_ref[1]**o+(-0.720617456803)*x_ref[1]+(0.673909788445)*x_ref[2]**o+(0.145376368499)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.344685653483)*x[0]**o+(-0.618443209029)*x[0]+(-0.338246837583)*x[1]**o+(-0.709311881709)*x[1]
-        arg[0,1]=(-0.176341370817)*x[0]**o+(-0.230030832268)*x[0]+(-0.335163038431)*x[1]**o+(0.278627093006)*x[1]
-        arg[0,2]=(0.376270607923)*x[0]**o+(0.895822309578)*x[0]+(0.418316736671)*x[1]**o+(-0.951461687587)*x[1]
-        arg[0,3]=(0.69925470532)*x[0]**o+(-0.829917904706)*x[0]+(0.60851481091)*x[1]**o+(-0.880924691692)*x[1]
-        arg[0,4]=(0.537570501499)*x[0]**o+(0.584091505535)*x[0]+(-0.0045669307163)*x[1]**o+(0.162714723047)*x[1]
-        arg[1,0]=(-0.244615538677)*x[0]**o+(-0.0168359545772)*x[0]+(-0.511097014251)*x[1]**o+(-0.476830089968)*x[1]
-        arg[1,1]=(0.350953788855)*x[0]**o+(0.0859931352733)*x[0]+(-0.565664846934)*x[1]**o+(-0.230383210864)*x[1]
-        arg[1,2]=(0.787537227138)*x[0]**o+(-0.97589028834)*x[0]+(0.978870857538)*x[1]**o+(0.436540016432)*x[1]
-        arg[1,3]=(-0.806777674064)*x[0]**o+(-0.384971723467)*x[0]+(-0.423836322283)*x[1]**o+(0.470609842503)*x[1]
-        arg[1,4]=(0.288422170494)*x[0]**o+(-0.467670464119)*x[0]+(-0.616952048135)*x[1]**o+(0.604831335817)*x[1]
-        arg[2,0]=(0.0461969205986)*x[0]**o+(0.663083190578)*x[0]+(-0.673597938582)*x[1]**o+(0.217389040208)*x[1]
-        arg[2,1]=(-0.32008443048)*x[0]**o+(-0.970854886309)*x[0]+(0.630220968872)*x[1]**o+(0.827824011117)*x[1]
-        arg[2,2]=(-0.232867522682)*x[0]**o+(-0.17921445933)*x[0]+(-0.565289194319)*x[1]**o+(0.0251729876325)*x[1]
-        arg[2,3]=(-0.862002880133)*x[0]**o+(0.64790108714)*x[0]+(-0.469428882373)*x[1]**o+(0.50581485158)*x[1]
-        arg[2,4]=(-0.957389923449)*x[0]**o+(-0.716972488151)*x[0]+(0.848168933491)*x[1]**o+(0.78614576485)*x[1]
-        arg[3,0]=(0.417890378265)*x[0]**o+(-0.128884271967)*x[0]+(0.981251819451)*x[1]**o+(0.837945499182)*x[1]
-        arg[3,1]=(-0.296791907211)*x[0]**o+(0.913966659909)*x[0]+(0.0171079547828)*x[1]**o+(0.472922286638)*x[1]
-        arg[3,2]=(-0.549504779354)*x[0]**o+(0.356989069435)*x[0]+(-0.0978494385269)*x[1]**o+(0.59354694599)*x[1]
-        arg[3,3]=(0.0272055308458)*x[0]**o+(0.560184544705)*x[0]+(-0.825452907104)*x[1]**o+(0.701919616153)*x[1]
-        arg[3,4]=(-0.33094753848)*x[0]**o+(0.877723269108)*x[0]+(-0.491915661514)*x[1]**o+(-0.98784807255)*x[1]
-        ref[0,0]=(-0.344685653483)*x_ref[0]**o+(-0.618443209029)*x_ref[0]+(-0.338246837583)*x_ref[1]**o+(-0.709311881709)*x_ref[1]
-        ref[0,1]=(-0.176341370817)*x_ref[0]**o+(-0.230030832268)*x_ref[0]+(-0.335163038431)*x_ref[1]**o+(0.278627093006)*x_ref[1]
-        ref[0,2]=(0.376270607923)*x_ref[0]**o+(0.895822309578)*x_ref[0]+(0.418316736671)*x_ref[1]**o+(-0.951461687587)*x_ref[1]
-        ref[0,3]=(0.69925470532)*x_ref[0]**o+(-0.829917904706)*x_ref[0]+(0.60851481091)*x_ref[1]**o+(-0.880924691692)*x_ref[1]
-        ref[0,4]=(0.537570501499)*x_ref[0]**o+(0.584091505535)*x_ref[0]+(-0.0045669307163)*x_ref[1]**o+(0.162714723047)*x_ref[1]
-        ref[1,0]=(-0.244615538677)*x_ref[0]**o+(-0.0168359545772)*x_ref[0]+(-0.511097014251)*x_ref[1]**o+(-0.476830089968)*x_ref[1]
-        ref[1,1]=(0.350953788855)*x_ref[0]**o+(0.0859931352733)*x_ref[0]+(-0.565664846934)*x_ref[1]**o+(-0.230383210864)*x_ref[1]
-        ref[1,2]=(0.787537227138)*x_ref[0]**o+(-0.97589028834)*x_ref[0]+(0.978870857538)*x_ref[1]**o+(0.436540016432)*x_ref[1]
-        ref[1,3]=(-0.806777674064)*x_ref[0]**o+(-0.384971723467)*x_ref[0]+(-0.423836322283)*x_ref[1]**o+(0.470609842503)*x_ref[1]
-        ref[1,4]=(0.288422170494)*x_ref[0]**o+(-0.467670464119)*x_ref[0]+(-0.616952048135)*x_ref[1]**o+(0.604831335817)*x_ref[1]
-        ref[2,0]=(0.0461969205986)*x_ref[0]**o+(0.663083190578)*x_ref[0]+(-0.673597938582)*x_ref[1]**o+(0.217389040208)*x_ref[1]
-        ref[2,1]=(-0.32008443048)*x_ref[0]**o+(-0.970854886309)*x_ref[0]+(0.630220968872)*x_ref[1]**o+(0.827824011117)*x_ref[1]
-        ref[2,2]=(-0.232867522682)*x_ref[0]**o+(-0.17921445933)*x_ref[0]+(-0.565289194319)*x_ref[1]**o+(0.0251729876325)*x_ref[1]
-        ref[2,3]=(-0.862002880133)*x_ref[0]**o+(0.64790108714)*x_ref[0]+(-0.469428882373)*x_ref[1]**o+(0.50581485158)*x_ref[1]
-        ref[2,4]=(-0.957389923449)*x_ref[0]**o+(-0.716972488151)*x_ref[0]+(0.848168933491)*x_ref[1]**o+(0.78614576485)*x_ref[1]
-        ref[3,0]=(0.417890378265)*x_ref[0]**o+(-0.128884271967)*x_ref[0]+(0.981251819451)*x_ref[1]**o+(0.837945499182)*x_ref[1]
-        ref[3,1]=(-0.296791907211)*x_ref[0]**o+(0.913966659909)*x_ref[0]+(0.0171079547828)*x_ref[1]**o+(0.472922286638)*x_ref[1]
-        ref[3,2]=(-0.549504779354)*x_ref[0]**o+(0.356989069435)*x_ref[0]+(-0.0978494385269)*x_ref[1]**o+(0.59354694599)*x_ref[1]
-        ref[3,3]=(0.0272055308458)*x_ref[0]**o+(0.560184544705)*x_ref[0]+(-0.825452907104)*x_ref[1]**o+(0.701919616153)*x_ref[1]
-        ref[3,4]=(-0.33094753848)*x_ref[0]**o+(0.877723269108)*x_ref[0]+(-0.491915661514)*x_ref[1]**o+(-0.98784807255)*x_ref[1]
-      else:
-        arg[0,0]=(-0.434721514594)*x[0]**o+(-0.28074158231)*x[0]+(0.102692621316)*x[1]**o+(0.399677492352)*x[1]+(0.39799987301)*x[2]**o+(-0.134547332796)*x[2]
-        arg[0,1]=(-0.814630031471)*x[0]**o+(-0.0722898377573)*x[0]+(0.356831166041)*x[1]**o+(0.0556663518903)*x[1]+(-0.335764152958)*x[2]**o+(0.344564519072)*x[2]
-        arg[0,2]=(-0.881698115197)*x[0]**o+(-0.030759288922)*x[0]+(-0.23126177081)*x[1]**o+(0.865011678258)*x[1]+(0.961867471932)*x[2]**o+(-0.04809978604)*x[2]
-        arg[0,3]=(-0.931319970946)*x[0]**o+(0.807195614255)*x[0]+(0.116305510032)*x[1]**o+(0.337873586448)*x[1]+(0.523766276637)*x[2]**o+(-0.890502808117)*x[2]
-        arg[0,4]=(0.952369561411)*x[0]**o+(0.518186569223)*x[0]+(0.184454818734)*x[1]**o+(-0.198618411156)*x[1]+(0.891317797589)*x[2]**o+(-0.312268228065)*x[2]
-        arg[1,0]=(-0.770379397538)*x[0]**o+(0.11068893635)*x[0]+(0.435574518842)*x[1]**o+(-0.895094805657)*x[1]+(0.719886389608)*x[2]**o+(0.617254266829)*x[2]
-        arg[1,1]=(-0.968566082536)*x[0]**o+(0.70331821608)*x[0]+(-0.256092697223)*x[1]**o+(0.214482838048)*x[1]+(-0.20817108493)*x[2]**o+(-0.741961694045)*x[2]
-        arg[1,2]=(0.928194134464)*x[0]**o+(0.748278982508)*x[0]+(0.459001496702)*x[1]**o+(-0.333954496033)*x[1]+(0.0451659439418)*x[2]**o+(0.0355669781059)*x[2]
-        arg[1,3]=(-0.285564661682)*x[0]**o+(-0.780972389596)*x[0]+(0.20442278849)*x[1]**o+(-0.425673038027)*x[1]+(-0.886021022849)*x[2]**o+(0.2231241391)*x[2]
-        arg[1,4]=(0.48756511391)*x[0]**o+(0.904219456651)*x[0]+(-0.723245954496)*x[1]**o+(-0.876483077689)*x[1]+(0.454913273237)*x[2]**o+(0.907651543551)*x[2]
-        arg[2,0]=(-0.490623674798)*x[0]**o+(0.179561344392)*x[0]+(-0.257796709265)*x[1]**o+(0.470216680739)*x[1]+(-0.334946805819)*x[2]**o+(-0.295308708488)*x[2]
-        arg[2,1]=(-0.0753731003603)*x[0]**o+(0.848622766023)*x[0]+(-0.168762035291)*x[1]**o+(-0.132048839333)*x[1]+(0.229089231051)*x[2]**o+(0.280032186468)*x[2]
-        arg[2,2]=(0.601432167354)*x[0]**o+(-0.0857688429764)*x[0]+(0.556763499853)*x[1]**o+(-0.0953568285359)*x[1]+(-0.396589175262)*x[2]**o+(0.437257052414)*x[2]
-        arg[2,3]=(0.239710792478)*x[0]**o+(0.255863660922)*x[0]+(-0.860831814227)*x[1]**o+(0.416057968294)*x[1]+(0.284515440811)*x[2]**o+(-0.0737992548315)*x[2]
-        arg[2,4]=(-0.86884373286)*x[0]**o+(0.306811019609)*x[0]+(0.955007347168)*x[1]**o+(0.731959544948)*x[1]+(0.326947842619)*x[2]**o+(0.430618227986)*x[2]
-        arg[3,0]=(0.450341287007)*x[0]**o+(-0.0318463261779)*x[0]+(-0.755083793007)*x[1]**o+(0.427706480425)*x[1]+(0.224383931841)*x[2]**o+(-0.801200151542)*x[2]
-        arg[3,1]=(-0.750405028813)*x[0]**o+(-0.531057162102)*x[0]+(0.120116357521)*x[1]**o+(-0.247640504917)*x[1]+(-0.360494371461)*x[2]**o+(-0.496404068337)*x[2]
-        arg[3,2]=(-0.202775617449)*x[0]**o+(0.833337604045)*x[0]+(0.551285270602)*x[1]**o+(0.266630410234)*x[1]+(0.903041333927)*x[2]**o+(0.527233939028)*x[2]
-        arg[3,3]=(0.12892683791)*x[0]**o+(-0.486726243104)*x[0]+(-0.340728397711)*x[1]**o+(-0.670692588507)*x[1]+(0.832250132781)*x[2]**o+(0.276897913372)*x[2]
-        arg[3,4]=(0.839441639419)*x[0]**o+(0.362150671815)*x[0]+(0.728370029046)*x[1]**o+(0.149540296968)*x[1]+(-0.0418719598944)*x[2]**o+(-0.331805297414)*x[2]
-        ref[0,0]=(-0.434721514594)*x_ref[0]**o+(-0.28074158231)*x_ref[0]+(0.102692621316)*x_ref[1]**o+(0.399677492352)*x_ref[1]+(0.39799987301)*x_ref[2]**o+(-0.134547332796)*x_ref[2]
-        ref[0,1]=(-0.814630031471)*x_ref[0]**o+(-0.0722898377573)*x_ref[0]+(0.356831166041)*x_ref[1]**o+(0.0556663518903)*x_ref[1]+(-0.335764152958)*x_ref[2]**o+(0.344564519072)*x_ref[2]
-        ref[0,2]=(-0.881698115197)*x_ref[0]**o+(-0.030759288922)*x_ref[0]+(-0.23126177081)*x_ref[1]**o+(0.865011678258)*x_ref[1]+(0.961867471932)*x_ref[2]**o+(-0.04809978604)*x_ref[2]
-        ref[0,3]=(-0.931319970946)*x_ref[0]**o+(0.807195614255)*x_ref[0]+(0.116305510032)*x_ref[1]**o+(0.337873586448)*x_ref[1]+(0.523766276637)*x_ref[2]**o+(-0.890502808117)*x_ref[2]
-        ref[0,4]=(0.952369561411)*x_ref[0]**o+(0.518186569223)*x_ref[0]+(0.184454818734)*x_ref[1]**o+(-0.198618411156)*x_ref[1]+(0.891317797589)*x_ref[2]**o+(-0.312268228065)*x_ref[2]
-        ref[1,0]=(-0.770379397538)*x_ref[0]**o+(0.11068893635)*x_ref[0]+(0.435574518842)*x_ref[1]**o+(-0.895094805657)*x_ref[1]+(0.719886389608)*x_ref[2]**o+(0.617254266829)*x_ref[2]
-        ref[1,1]=(-0.968566082536)*x_ref[0]**o+(0.70331821608)*x_ref[0]+(-0.256092697223)*x_ref[1]**o+(0.214482838048)*x_ref[1]+(-0.20817108493)*x_ref[2]**o+(-0.741961694045)*x_ref[2]
-        ref[1,2]=(0.928194134464)*x_ref[0]**o+(0.748278982508)*x_ref[0]+(0.459001496702)*x_ref[1]**o+(-0.333954496033)*x_ref[1]+(0.0451659439418)*x_ref[2]**o+(0.0355669781059)*x_ref[2]
-        ref[1,3]=(-0.285564661682)*x_ref[0]**o+(-0.780972389596)*x_ref[0]+(0.20442278849)*x_ref[1]**o+(-0.425673038027)*x_ref[1]+(-0.886021022849)*x_ref[2]**o+(0.2231241391)*x_ref[2]
-        ref[1,4]=(0.48756511391)*x_ref[0]**o+(0.904219456651)*x_ref[0]+(-0.723245954496)*x_ref[1]**o+(-0.876483077689)*x_ref[1]+(0.454913273237)*x_ref[2]**o+(0.907651543551)*x_ref[2]
-        ref[2,0]=(-0.490623674798)*x_ref[0]**o+(0.179561344392)*x_ref[0]+(-0.257796709265)*x_ref[1]**o+(0.470216680739)*x_ref[1]+(-0.334946805819)*x_ref[2]**o+(-0.295308708488)*x_ref[2]
-        ref[2,1]=(-0.0753731003603)*x_ref[0]**o+(0.848622766023)*x_ref[0]+(-0.168762035291)*x_ref[1]**o+(-0.132048839333)*x_ref[1]+(0.229089231051)*x_ref[2]**o+(0.280032186468)*x_ref[2]
-        ref[2,2]=(0.601432167354)*x_ref[0]**o+(-0.0857688429764)*x_ref[0]+(0.556763499853)*x_ref[1]**o+(-0.0953568285359)*x_ref[1]+(-0.396589175262)*x_ref[2]**o+(0.437257052414)*x_ref[2]
-        ref[2,3]=(0.239710792478)*x_ref[0]**o+(0.255863660922)*x_ref[0]+(-0.860831814227)*x_ref[1]**o+(0.416057968294)*x_ref[1]+(0.284515440811)*x_ref[2]**o+(-0.0737992548315)*x_ref[2]
-        ref[2,4]=(-0.86884373286)*x_ref[0]**o+(0.306811019609)*x_ref[0]+(0.955007347168)*x_ref[1]**o+(0.731959544948)*x_ref[1]+(0.326947842619)*x_ref[2]**o+(0.430618227986)*x_ref[2]
-        ref[3,0]=(0.450341287007)*x_ref[0]**o+(-0.0318463261779)*x_ref[0]+(-0.755083793007)*x_ref[1]**o+(0.427706480425)*x_ref[1]+(0.224383931841)*x_ref[2]**o+(-0.801200151542)*x_ref[2]
-        ref[3,1]=(-0.750405028813)*x_ref[0]**o+(-0.531057162102)*x_ref[0]+(0.120116357521)*x_ref[1]**o+(-0.247640504917)*x_ref[1]+(-0.360494371461)*x_ref[2]**o+(-0.496404068337)*x_ref[2]
-        ref[3,2]=(-0.202775617449)*x_ref[0]**o+(0.833337604045)*x_ref[0]+(0.551285270602)*x_ref[1]**o+(0.266630410234)*x_ref[1]+(0.903041333927)*x_ref[2]**o+(0.527233939028)*x_ref[2]
-        ref[3,3]=(0.12892683791)*x_ref[0]**o+(-0.486726243104)*x_ref[0]+(-0.340728397711)*x_ref[1]**o+(-0.670692588507)*x_ref[1]+(0.832250132781)*x_ref[2]**o+(0.276897913372)*x_ref[2]
-        ref[3,4]=(0.839441639419)*x_ref[0]**o+(0.362150671815)*x_ref[0]+(0.728370029046)*x_ref[1]**o+(0.149540296968)*x_ref[1]+(-0.0418719598944)*x_ref[2]**o+(-0.331805297414)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.475615092269)*x[0]**o+(-0.0893751722575)*x[0]+(0.595881277166)*x[1]**o+(0.397900173915)*x[1]
-        arg[0,0,1]=(-0.552614805712)*x[0]**o+(0.14072435445)*x[0]+(0.290231845094)*x[1]**o+(0.573878059041)*x[1]
-        arg[0,1,0]=(-0.226148312038)*x[0]**o+(-0.737524507359)*x[0]+(-0.704362709293)*x[1]**o+(-0.197223346266)*x[1]
-        arg[0,1,1]=(0.844313529642)*x[0]**o+(-0.948514286846)*x[0]+(0.383754990882)*x[1]**o+(0.629819148632)*x[1]
-        arg[1,0,0]=(-0.519122333314)*x[0]**o+(-0.895333584981)*x[0]+(-0.941503934561)*x[1]**o+(0.574440495425)*x[1]
-        arg[1,0,1]=(0.34967649382)*x[0]**o+(-0.332598318229)*x[0]+(0.0587818420974)*x[1]**o+(0.0848419508498)*x[1]
-        arg[1,1,0]=(0.126943263196)*x[0]**o+(0.20287950383)*x[0]+(-0.305454685691)*x[1]**o+(-0.357695790052)*x[1]
-        arg[1,1,1]=(0.104154708153)*x[0]**o+(0.867435765411)*x[0]+(0.656946071961)*x[1]**o+(0.96433811362)*x[1]
-        arg[2,0,0]=(-0.407362949457)*x[0]**o+(-0.171021521273)*x[0]+(0.901342300398)*x[1]**o+(-0.0360476097399)*x[1]
-        arg[2,0,1]=(-0.709421035652)*x[0]**o+(0.949318093375)*x[0]+(0.155061840049)*x[1]**o+(0.828999317354)*x[1]
-        arg[2,1,0]=(-0.573031939083)*x[0]**o+(-0.766186602896)*x[0]+(-0.0483071013367)*x[1]**o+(0.741988754559)*x[1]
-        arg[2,1,1]=(-0.826747727748)*x[0]**o+(0.481970220735)*x[0]+(0.735617076451)*x[1]**o+(-0.64482586429)*x[1]
-        arg[3,0,0]=(0.0834619008603)*x[0]**o+(-0.122260004323)*x[0]+(-0.193792114997)*x[1]**o+(0.635792828013)*x[1]
-        arg[3,0,1]=(0.868630978759)*x[0]**o+(0.54474614716)*x[0]+(-0.514377753448)*x[1]**o+(0.58889412844)*x[1]
-        arg[3,1,0]=(-0.233744744882)*x[0]**o+(0.883601383004)*x[0]+(0.575012113003)*x[1]**o+(0.185704140149)*x[1]
-        arg[3,1,1]=(-0.948893544046)*x[0]**o+(0.851870038501)*x[0]+(-0.591835259957)*x[1]**o+(-0.958375628808)*x[1]
-        arg[4,0,0]=(0.981685480559)*x[0]**o+(0.718249744763)*x[0]+(0.589534430546)*x[1]**o+(0.72294148429)*x[1]
-        arg[4,0,1]=(-0.603601154465)*x[0]**o+(0.293688738803)*x[0]+(0.151726724518)*x[1]**o+(0.56316377967)*x[1]
-        arg[4,1,0]=(0.539033109011)*x[0]**o+(0.791686885872)*x[0]+(0.878973377358)*x[1]**o+(0.869606341625)*x[1]
-        arg[4,1,1]=(-0.0920873290752)*x[0]**o+(-0.132682060309)*x[0]+(0.34023826981)*x[1]**o+(0.585476816741)*x[1]
-        arg[5,0,0]=(-0.430989548175)*x[0]**o+(-0.525387682044)*x[0]+(-0.996483829778)*x[1]**o+(-0.564503119535)*x[1]
-        arg[5,0,1]=(0.602911018749)*x[0]**o+(-0.348972500704)*x[0]+(0.174681048071)*x[1]**o+(-0.94551825287)*x[1]
-        arg[5,1,0]=(0.780926392259)*x[0]**o+(-0.164977652547)*x[0]+(0.224726701017)*x[1]**o+(-0.779109318124)*x[1]
-        arg[5,1,1]=(0.470928696402)*x[0]**o+(-0.505871268699)*x[0]+(0.407158974816)*x[1]**o+(0.392856659954)*x[1]
-        ref[0,0,0]=(-0.475615092269)*x_ref[0]**o+(-0.0893751722575)*x_ref[0]+(0.595881277166)*x_ref[1]**o+(0.397900173915)*x_ref[1]
-        ref[0,0,1]=(-0.552614805712)*x_ref[0]**o+(0.14072435445)*x_ref[0]+(0.290231845094)*x_ref[1]**o+(0.573878059041)*x_ref[1]
-        ref[0,1,0]=(-0.226148312038)*x_ref[0]**o+(-0.737524507359)*x_ref[0]+(-0.704362709293)*x_ref[1]**o+(-0.197223346266)*x_ref[1]
-        ref[0,1,1]=(0.844313529642)*x_ref[0]**o+(-0.948514286846)*x_ref[0]+(0.383754990882)*x_ref[1]**o+(0.629819148632)*x_ref[1]
-        ref[1,0,0]=(-0.519122333314)*x_ref[0]**o+(-0.895333584981)*x_ref[0]+(-0.941503934561)*x_ref[1]**o+(0.574440495425)*x_ref[1]
-        ref[1,0,1]=(0.34967649382)*x_ref[0]**o+(-0.332598318229)*x_ref[0]+(0.0587818420974)*x_ref[1]**o+(0.0848419508498)*x_ref[1]
-        ref[1,1,0]=(0.126943263196)*x_ref[0]**o+(0.20287950383)*x_ref[0]+(-0.305454685691)*x_ref[1]**o+(-0.357695790052)*x_ref[1]
-        ref[1,1,1]=(0.104154708153)*x_ref[0]**o+(0.867435765411)*x_ref[0]+(0.656946071961)*x_ref[1]**o+(0.96433811362)*x_ref[1]
-        ref[2,0,0]=(-0.407362949457)*x_ref[0]**o+(-0.171021521273)*x_ref[0]+(0.901342300398)*x_ref[1]**o+(-0.0360476097399)*x_ref[1]
-        ref[2,0,1]=(-0.709421035652)*x_ref[0]**o+(0.949318093375)*x_ref[0]+(0.155061840049)*x_ref[1]**o+(0.828999317354)*x_ref[1]
-        ref[2,1,0]=(-0.573031939083)*x_ref[0]**o+(-0.766186602896)*x_ref[0]+(-0.0483071013367)*x_ref[1]**o+(0.741988754559)*x_ref[1]
-        ref[2,1,1]=(-0.826747727748)*x_ref[0]**o+(0.481970220735)*x_ref[0]+(0.735617076451)*x_ref[1]**o+(-0.64482586429)*x_ref[1]
-        ref[3,0,0]=(0.0834619008603)*x_ref[0]**o+(-0.122260004323)*x_ref[0]+(-0.193792114997)*x_ref[1]**o+(0.635792828013)*x_ref[1]
-        ref[3,0,1]=(0.868630978759)*x_ref[0]**o+(0.54474614716)*x_ref[0]+(-0.514377753448)*x_ref[1]**o+(0.58889412844)*x_ref[1]
-        ref[3,1,0]=(-0.233744744882)*x_ref[0]**o+(0.883601383004)*x_ref[0]+(0.575012113003)*x_ref[1]**o+(0.185704140149)*x_ref[1]
-        ref[3,1,1]=(-0.948893544046)*x_ref[0]**o+(0.851870038501)*x_ref[0]+(-0.591835259957)*x_ref[1]**o+(-0.958375628808)*x_ref[1]
-        ref[4,0,0]=(0.981685480559)*x_ref[0]**o+(0.718249744763)*x_ref[0]+(0.589534430546)*x_ref[1]**o+(0.72294148429)*x_ref[1]
-        ref[4,0,1]=(-0.603601154465)*x_ref[0]**o+(0.293688738803)*x_ref[0]+(0.151726724518)*x_ref[1]**o+(0.56316377967)*x_ref[1]
-        ref[4,1,0]=(0.539033109011)*x_ref[0]**o+(0.791686885872)*x_ref[0]+(0.878973377358)*x_ref[1]**o+(0.869606341625)*x_ref[1]
-        ref[4,1,1]=(-0.0920873290752)*x_ref[0]**o+(-0.132682060309)*x_ref[0]+(0.34023826981)*x_ref[1]**o+(0.585476816741)*x_ref[1]
-        ref[5,0,0]=(-0.430989548175)*x_ref[0]**o+(-0.525387682044)*x_ref[0]+(-0.996483829778)*x_ref[1]**o+(-0.564503119535)*x_ref[1]
-        ref[5,0,1]=(0.602911018749)*x_ref[0]**o+(-0.348972500704)*x_ref[0]+(0.174681048071)*x_ref[1]**o+(-0.94551825287)*x_ref[1]
-        ref[5,1,0]=(0.780926392259)*x_ref[0]**o+(-0.164977652547)*x_ref[0]+(0.224726701017)*x_ref[1]**o+(-0.779109318124)*x_ref[1]
-        ref[5,1,1]=(0.470928696402)*x_ref[0]**o+(-0.505871268699)*x_ref[0]+(0.407158974816)*x_ref[1]**o+(0.392856659954)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.759590374826)*x[0]**o+(-0.776182110267)*x[0]+(0.713871101133)*x[1]**o+(-0.0991655752543)*x[1]+(0.339491998788)*x[2]**o+(-0.624141085669)*x[2]
-        arg[0,0,1]=(-0.948679111098)*x[0]**o+(0.0918139408797)*x[0]+(-0.519481784001)*x[1]**o+(-0.480754367303)*x[1]+(0.996421472879)*x[2]**o+(-0.933032853651)*x[2]
-        arg[0,1,0]=(-0.824750788431)*x[0]**o+(0.846735099726)*x[0]+(-0.436835905895)*x[1]**o+(-0.732363323611)*x[1]+(-0.865610972073)*x[2]**o+(0.754759759319)*x[2]
-        arg[0,1,1]=(-0.403783782613)*x[0]**o+(0.918875237045)*x[0]+(0.0934155750366)*x[1]**o+(0.832477256884)*x[1]+(0.615080190605)*x[2]**o+(0.000920074523901)*x[2]
-        arg[1,0,0]=(0.260531941775)*x[0]**o+(-0.514647294043)*x[0]+(0.237113978946)*x[1]**o+(-0.116626766689)*x[1]+(-0.670422853592)*x[2]**o+(0.574941151693)*x[2]
-        arg[1,0,1]=(-0.0133773984155)*x[0]**o+(0.286273972547)*x[0]+(0.0493985332233)*x[1]**o+(-0.567835671454)*x[1]+(0.508314781519)*x[2]**o+(-0.603506084784)*x[2]
-        arg[1,1,0]=(0.0237413792908)*x[0]**o+(-0.758893281773)*x[0]+(0.150670689461)*x[1]**o+(0.136386516616)*x[1]+(-0.440203817756)*x[2]**o+(0.796610908529)*x[2]
-        arg[1,1,1]=(-0.223549634917)*x[0]**o+(0.396472946824)*x[0]+(0.47830083818)*x[1]**o+(0.059933592631)*x[1]+(0.709371074379)*x[2]**o+(-0.129442424949)*x[2]
-        arg[2,0,0]=(0.686170679191)*x[0]**o+(-0.118668021586)*x[0]+(0.033954449978)*x[1]**o+(-0.0508661210104)*x[1]+(0.352824724076)*x[2]**o+(-0.772874133692)*x[2]
-        arg[2,0,1]=(0.434879772789)*x[0]**o+(-0.148309931356)*x[0]+(-0.013792688421)*x[1]**o+(0.597899709109)*x[1]+(-0.280336465565)*x[2]**o+(-0.177134087728)*x[2]
-        arg[2,1,0]=(-0.636844238715)*x[0]**o+(-0.646269255495)*x[0]+(0.243236542558)*x[1]**o+(0.203480511801)*x[1]+(0.693290035164)*x[2]**o+(0.773354114662)*x[2]
-        arg[2,1,1]=(-0.161998867128)*x[0]**o+(0.193608078775)*x[0]+(0.607954851405)*x[1]**o+(0.648078354644)*x[1]+(-0.488891750936)*x[2]**o+(0.912860597431)*x[2]
-        arg[3,0,0]=(-0.696909279028)*x[0]**o+(0.039558795649)*x[0]+(0.441121646773)*x[1]**o+(-0.0681790925087)*x[1]+(-0.792437910441)*x[2]**o+(-0.512942395878)*x[2]
-        arg[3,0,1]=(-0.264832490825)*x[0]**o+(-0.955976365474)*x[0]+(-0.884641387524)*x[1]**o+(-0.736970630699)*x[1]+(-0.0525378155791)*x[2]**o+(0.149164361449)*x[2]
-        arg[3,1,0]=(0.434888951175)*x[0]**o+(-0.218511432369)*x[0]+(0.564377624401)*x[1]**o+(-0.0978716780106)*x[1]+(0.447857191989)*x[2]**o+(-0.466572586856)*x[2]
-        arg[3,1,1]=(0.457689985738)*x[0]**o+(0.00322996620178)*x[0]+(0.307787601144)*x[1]**o+(-0.119455639704)*x[1]+(0.70367723461)*x[2]**o+(0.561913096313)*x[2]
-        arg[4,0,0]=(-0.759802700221)*x[0]**o+(0.469649690329)*x[0]+(0.0913972297116)*x[1]**o+(0.310277900593)*x[1]+(-0.590266889319)*x[2]**o+(-0.89711266859)*x[2]
-        arg[4,0,1]=(0.85506147544)*x[0]**o+(-0.357476737069)*x[0]+(-0.646898911915)*x[1]**o+(-0.674811608049)*x[1]+(0.865265982147)*x[2]**o+(0.720153126392)*x[2]
-        arg[4,1,0]=(0.848146446583)*x[0]**o+(0.868166234685)*x[0]+(0.0477110054774)*x[1]**o+(-0.0338098833736)*x[1]+(-0.360024439914)*x[2]**o+(-0.634359083766)*x[2]
-        arg[4,1,1]=(-0.672530624126)*x[0]**o+(0.354170615043)*x[0]+(0.486028226561)*x[1]**o+(0.857532578327)*x[1]+(0.15798171243)*x[2]**o+(0.0579857791862)*x[2]
-        arg[5,0,0]=(0.653171799956)*x[0]**o+(0.605427034155)*x[0]+(0.7414424011)*x[1]**o+(-0.807505211605)*x[1]+(-0.0411776868808)*x[2]**o+(0.24301961063)*x[2]
-        arg[5,0,1]=(-0.336860102074)*x[0]**o+(0.235697646908)*x[0]+(-0.173217953629)*x[1]**o+(0.989643649714)*x[1]+(0.977460054831)*x[2]**o+(-0.743825027125)*x[2]
-        arg[5,1,0]=(0.794904875581)*x[0]**o+(0.607548574046)*x[0]+(0.603180304387)*x[1]**o+(0.276995429843)*x[1]+(0.698731315308)*x[2]**o+(-0.966744108727)*x[2]
-        arg[5,1,1]=(-0.0230004766002)*x[0]**o+(0.489585418104)*x[0]+(0.382764947116)*x[1]**o+(0.143873532935)*x[1]+(0.932000957196)*x[2]**o+(0.739975795806)*x[2]
-        ref[0,0,0]=(0.759590374826)*x_ref[0]**o+(-0.776182110267)*x_ref[0]+(0.713871101133)*x_ref[1]**o+(-0.0991655752543)*x_ref[1]+(0.339491998788)*x_ref[2]**o+(-0.624141085669)*x_ref[2]
-        ref[0,0,1]=(-0.948679111098)*x_ref[0]**o+(0.0918139408797)*x_ref[0]+(-0.519481784001)*x_ref[1]**o+(-0.480754367303)*x_ref[1]+(0.996421472879)*x_ref[2]**o+(-0.933032853651)*x_ref[2]
-        ref[0,1,0]=(-0.824750788431)*x_ref[0]**o+(0.846735099726)*x_ref[0]+(-0.436835905895)*x_ref[1]**o+(-0.732363323611)*x_ref[1]+(-0.865610972073)*x_ref[2]**o+(0.754759759319)*x_ref[2]
-        ref[0,1,1]=(-0.403783782613)*x_ref[0]**o+(0.918875237045)*x_ref[0]+(0.0934155750366)*x_ref[1]**o+(0.832477256884)*x_ref[1]+(0.615080190605)*x_ref[2]**o+(0.000920074523901)*x_ref[2]
-        ref[1,0,0]=(0.260531941775)*x_ref[0]**o+(-0.514647294043)*x_ref[0]+(0.237113978946)*x_ref[1]**o+(-0.116626766689)*x_ref[1]+(-0.670422853592)*x_ref[2]**o+(0.574941151693)*x_ref[2]
-        ref[1,0,1]=(-0.0133773984155)*x_ref[0]**o+(0.286273972547)*x_ref[0]+(0.0493985332233)*x_ref[1]**o+(-0.567835671454)*x_ref[1]+(0.508314781519)*x_ref[2]**o+(-0.603506084784)*x_ref[2]
-        ref[1,1,0]=(0.0237413792908)*x_ref[0]**o+(-0.758893281773)*x_ref[0]+(0.150670689461)*x_ref[1]**o+(0.136386516616)*x_ref[1]+(-0.440203817756)*x_ref[2]**o+(0.796610908529)*x_ref[2]
-        ref[1,1,1]=(-0.223549634917)*x_ref[0]**o+(0.396472946824)*x_ref[0]+(0.47830083818)*x_ref[1]**o+(0.059933592631)*x_ref[1]+(0.709371074379)*x_ref[2]**o+(-0.129442424949)*x_ref[2]
-        ref[2,0,0]=(0.686170679191)*x_ref[0]**o+(-0.118668021586)*x_ref[0]+(0.033954449978)*x_ref[1]**o+(-0.0508661210104)*x_ref[1]+(0.352824724076)*x_ref[2]**o+(-0.772874133692)*x_ref[2]
-        ref[2,0,1]=(0.434879772789)*x_ref[0]**o+(-0.148309931356)*x_ref[0]+(-0.013792688421)*x_ref[1]**o+(0.597899709109)*x_ref[1]+(-0.280336465565)*x_ref[2]**o+(-0.177134087728)*x_ref[2]
-        ref[2,1,0]=(-0.636844238715)*x_ref[0]**o+(-0.646269255495)*x_ref[0]+(0.243236542558)*x_ref[1]**o+(0.203480511801)*x_ref[1]+(0.693290035164)*x_ref[2]**o+(0.773354114662)*x_ref[2]
-        ref[2,1,1]=(-0.161998867128)*x_ref[0]**o+(0.193608078775)*x_ref[0]+(0.607954851405)*x_ref[1]**o+(0.648078354644)*x_ref[1]+(-0.488891750936)*x_ref[2]**o+(0.912860597431)*x_ref[2]
-        ref[3,0,0]=(-0.696909279028)*x_ref[0]**o+(0.039558795649)*x_ref[0]+(0.441121646773)*x_ref[1]**o+(-0.0681790925087)*x_ref[1]+(-0.792437910441)*x_ref[2]**o+(-0.512942395878)*x_ref[2]
-        ref[3,0,1]=(-0.264832490825)*x_ref[0]**o+(-0.955976365474)*x_ref[0]+(-0.884641387524)*x_ref[1]**o+(-0.736970630699)*x_ref[1]+(-0.0525378155791)*x_ref[2]**o+(0.149164361449)*x_ref[2]
-        ref[3,1,0]=(0.434888951175)*x_ref[0]**o+(-0.218511432369)*x_ref[0]+(0.564377624401)*x_ref[1]**o+(-0.0978716780106)*x_ref[1]+(0.447857191989)*x_ref[2]**o+(-0.466572586856)*x_ref[2]
-        ref[3,1,1]=(0.457689985738)*x_ref[0]**o+(0.00322996620178)*x_ref[0]+(0.307787601144)*x_ref[1]**o+(-0.119455639704)*x_ref[1]+(0.70367723461)*x_ref[2]**o+(0.561913096313)*x_ref[2]
-        ref[4,0,0]=(-0.759802700221)*x_ref[0]**o+(0.469649690329)*x_ref[0]+(0.0913972297116)*x_ref[1]**o+(0.310277900593)*x_ref[1]+(-0.590266889319)*x_ref[2]**o+(-0.89711266859)*x_ref[2]
-        ref[4,0,1]=(0.85506147544)*x_ref[0]**o+(-0.357476737069)*x_ref[0]+(-0.646898911915)*x_ref[1]**o+(-0.674811608049)*x_ref[1]+(0.865265982147)*x_ref[2]**o+(0.720153126392)*x_ref[2]
-        ref[4,1,0]=(0.848146446583)*x_ref[0]**o+(0.868166234685)*x_ref[0]+(0.0477110054774)*x_ref[1]**o+(-0.0338098833736)*x_ref[1]+(-0.360024439914)*x_ref[2]**o+(-0.634359083766)*x_ref[2]
-        ref[4,1,1]=(-0.672530624126)*x_ref[0]**o+(0.354170615043)*x_ref[0]+(0.486028226561)*x_ref[1]**o+(0.857532578327)*x_ref[1]+(0.15798171243)*x_ref[2]**o+(0.0579857791862)*x_ref[2]
-        ref[5,0,0]=(0.653171799956)*x_ref[0]**o+(0.605427034155)*x_ref[0]+(0.7414424011)*x_ref[1]**o+(-0.807505211605)*x_ref[1]+(-0.0411776868808)*x_ref[2]**o+(0.24301961063)*x_ref[2]
-        ref[5,0,1]=(-0.336860102074)*x_ref[0]**o+(0.235697646908)*x_ref[0]+(-0.173217953629)*x_ref[1]**o+(0.989643649714)*x_ref[1]+(0.977460054831)*x_ref[2]**o+(-0.743825027125)*x_ref[2]
-        ref[5,1,0]=(0.794904875581)*x_ref[0]**o+(0.607548574046)*x_ref[0]+(0.603180304387)*x_ref[1]**o+(0.276995429843)*x_ref[1]+(0.698731315308)*x_ref[2]**o+(-0.966744108727)*x_ref[2]
-        ref[5,1,1]=(-0.0230004766002)*x_ref[0]**o+(0.489585418104)*x_ref[0]+(0.382764947116)*x_ref[1]**o+(0.143873532935)*x_ref[1]+(0.932000957196)*x_ref[2]**o+(0.739975795806)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.922177773381)*x[0]**o+(0.37324175781)*x[0]+(-0.169208776011)*x[1]**o+(0.72134249236)*x[1]
-        arg[0,0,0,1]=(0.85312270129)*x[0]**o+(0.0512919651836)*x[0]+(0.968880249675)*x[1]**o+(0.740058819096)*x[1]
-        arg[0,0,1,0]=(-0.018205657901)*x[0]**o+(0.601838710779)*x[0]+(0.211002282731)*x[1]**o+(0.801382123792)*x[1]
-        arg[0,0,1,1]=(-0.249128714489)*x[0]**o+(-0.408809542089)*x[0]+(-0.684434920261)*x[1]**o+(0.223674849818)*x[1]
-        arg[0,0,2,0]=(0.396627551183)*x[0]**o+(-0.223592778052)*x[0]+(0.227333834259)*x[1]**o+(0.66580805616)*x[1]
-        arg[0,0,2,1]=(0.365216692731)*x[0]**o+(-0.670947594503)*x[0]+(0.400260365509)*x[1]**o+(0.10903299253)*x[1]
-        arg[0,1,0,0]=(0.823297765985)*x[0]**o+(0.60337946486)*x[0]+(-0.314265083693)*x[1]**o+(-0.00636816227929)*x[1]
-        arg[0,1,0,1]=(-0.26216625982)*x[0]**o+(0.767412606588)*x[0]+(-0.284917238441)*x[1]**o+(0.56385025143)*x[1]
-        arg[0,1,1,0]=(-0.732326448281)*x[0]**o+(-0.669197323856)*x[0]+(-0.608751752289)*x[1]**o+(-0.853458985188)*x[1]
-        arg[0,1,1,1]=(0.637275594334)*x[0]**o+(0.696570850488)*x[0]+(0.012026820657)*x[1]**o+(0.558317439186)*x[1]
-        arg[0,1,2,0]=(0.925899092402)*x[0]**o+(0.568045453255)*x[0]+(-0.766701931715)*x[1]**o+(-0.95082586036)*x[1]
-        arg[0,1,2,1]=(0.127524211574)*x[0]**o+(-0.65150542164)*x[0]+(-0.365773940068)*x[1]**o+(0.990465711754)*x[1]
-        arg[0,2,0,0]=(0.456469052217)*x[0]**o+(0.403391798397)*x[0]+(-0.21921915949)*x[1]**o+(0.171493695945)*x[1]
-        arg[0,2,0,1]=(-0.980242506743)*x[0]**o+(0.880225959645)*x[0]+(0.682653186307)*x[1]**o+(-0.561867916377)*x[1]
-        arg[0,2,1,0]=(-0.329881998938)*x[0]**o+(0.464976480407)*x[0]+(-0.812583693347)*x[1]**o+(0.0103356333568)*x[1]
-        arg[0,2,1,1]=(-0.710350374606)*x[0]**o+(-0.445981415127)*x[0]+(-0.159054554695)*x[1]**o+(-0.0306514318922)*x[1]
-        arg[0,2,2,0]=(0.0903142465124)*x[0]**o+(0.872680271888)*x[0]+(0.230242338668)*x[1]**o+(0.557126778217)*x[1]
-        arg[0,2,2,1]=(-0.842046475241)*x[0]**o+(0.350544067128)*x[0]+(0.486186516633)*x[1]**o+(-0.550801066658)*x[1]
-        arg[0,3,0,0]=(0.740313870334)*x[0]**o+(-0.177105021967)*x[0]+(0.00114640526837)*x[1]**o+(0.349602955151)*x[1]
-        arg[0,3,0,1]=(0.898906724506)*x[0]**o+(-0.882729119203)*x[0]+(0.000278645863091)*x[1]**o+(-0.450247260284)*x[1]
-        arg[0,3,1,0]=(0.411917691981)*x[0]**o+(0.0461900014479)*x[0]+(0.1608400364)*x[1]**o+(0.130550626888)*x[1]
-        arg[0,3,1,1]=(0.610378099059)*x[0]**o+(-0.903971943528)*x[0]+(-0.0170960427518)*x[1]**o+(0.765729630725)*x[1]
-        arg[0,3,2,0]=(-0.811421756909)*x[0]**o+(-0.220065414196)*x[0]+(0.529467921065)*x[1]**o+(0.13896086667)*x[1]
-        arg[0,3,2,1]=(-0.621021589728)*x[0]**o+(0.181903892108)*x[0]+(0.724296638902)*x[1]**o+(0.651705107858)*x[1]
-        arg[0,4,0,0]=(0.323254788695)*x[0]**o+(0.758728125147)*x[0]+(0.0719056895797)*x[1]**o+(-0.486299017994)*x[1]
-        arg[0,4,0,1]=(-0.426525215977)*x[0]**o+(-0.70344592953)*x[0]+(-0.467799544116)*x[1]**o+(0.0394017649712)*x[1]
-        arg[0,4,1,0]=(-0.559984242808)*x[0]**o+(-0.963639424043)*x[0]+(0.884232194806)*x[1]**o+(0.948111505594)*x[1]
-        arg[0,4,1,1]=(-0.825627656302)*x[0]**o+(0.167871540452)*x[0]+(0.0969950885663)*x[1]**o+(-0.477024385485)*x[1]
-        arg[0,4,2,0]=(-0.890191205005)*x[0]**o+(-0.291891624031)*x[0]+(-0.924812934321)*x[1]**o+(-0.898567598264)*x[1]
-        arg[0,4,2,1]=(0.0552241756422)*x[0]**o+(-0.47878688784)*x[0]+(-0.208893161197)*x[1]**o+(-0.671733441515)*x[1]
-        arg[1,0,0,0]=(0.609961055126)*x[0]**o+(0.389225845794)*x[0]+(0.147977819654)*x[1]**o+(-0.75096024248)*x[1]
-        arg[1,0,0,1]=(-0.407376527411)*x[0]**o+(-0.696660373977)*x[0]+(-0.803862178008)*x[1]**o+(-0.367087112506)*x[1]
-        arg[1,0,1,0]=(0.89146134332)*x[0]**o+(0.388607608477)*x[0]+(0.763190367241)*x[1]**o+(0.169275499463)*x[1]
-        arg[1,0,1,1]=(-0.870871474063)*x[0]**o+(-0.21526798243)*x[0]+(0.159168404985)*x[1]**o+(0.715049896538)*x[1]
-        arg[1,0,2,0]=(-0.842978554795)*x[0]**o+(0.209649486001)*x[0]+(-0.767629750054)*x[1]**o+(-0.126634026874)*x[1]
-        arg[1,0,2,1]=(-0.728571756044)*x[0]**o+(-0.247852313042)*x[0]+(0.818809803616)*x[1]**o+(0.736163163331)*x[1]
-        arg[1,1,0,0]=(-0.670608139072)*x[0]**o+(0.330167259903)*x[0]+(0.275974484086)*x[1]**o+(0.492110644529)*x[1]
-        arg[1,1,0,1]=(0.724664287226)*x[0]**o+(0.738855592065)*x[0]+(0.511369798951)*x[1]**o+(0.455794112842)*x[1]
-        arg[1,1,1,0]=(0.783504599076)*x[0]**o+(-0.558579246854)*x[0]+(0.608044912637)*x[1]**o+(-0.401058633268)*x[1]
-        arg[1,1,1,1]=(0.406697861117)*x[0]**o+(-0.31302718156)*x[0]+(-0.999553049864)*x[1]**o+(0.647698243869)*x[1]
-        arg[1,1,2,0]=(-0.788346252365)*x[0]**o+(-0.809895265253)*x[0]+(0.441738551485)*x[1]**o+(-0.686785865679)*x[1]
-        arg[1,1,2,1]=(0.794571346519)*x[0]**o+(-0.552071697712)*x[0]+(0.77260218173)*x[1]**o+(-0.969584549528)*x[1]
-        arg[1,2,0,0]=(-0.867948229325)*x[0]**o+(-0.582387320474)*x[0]+(0.0387726756335)*x[1]**o+(0.4143770831)*x[1]
-        arg[1,2,0,1]=(-0.913557875303)*x[0]**o+(-0.517970834439)*x[0]+(-0.922517499063)*x[1]**o+(0.858552054359)*x[1]
-        arg[1,2,1,0]=(0.409302016181)*x[0]**o+(-0.684529177441)*x[0]+(0.818122023218)*x[1]**o+(-0.583589419623)*x[1]
-        arg[1,2,1,1]=(0.750795883056)*x[0]**o+(-0.710882726624)*x[0]+(0.915210035315)*x[1]**o+(0.802588664027)*x[1]
-        arg[1,2,2,0]=(0.639216566804)*x[0]**o+(-0.300954214125)*x[0]+(-0.26724393342)*x[1]**o+(0.426742851293)*x[1]
-        arg[1,2,2,1]=(-0.00337538020121)*x[0]**o+(0.283012169215)*x[0]+(0.725040731001)*x[1]**o+(-0.708238265029)*x[1]
-        arg[1,3,0,0]=(0.217404922432)*x[0]**o+(-0.590883003502)*x[0]+(0.451142849723)*x[1]**o+(0.624698767392)*x[1]
-        arg[1,3,0,1]=(0.0351258739828)*x[0]**o+(-0.784068492686)*x[0]+(0.469956184167)*x[1]**o+(0.634124784387)*x[1]
-        arg[1,3,1,0]=(0.998414775431)*x[0]**o+(0.388202946918)*x[0]+(-0.849223443255)*x[1]**o+(-0.804590028218)*x[1]
-        arg[1,3,1,1]=(0.0219748851856)*x[0]**o+(0.464069403336)*x[0]+(-0.470759541095)*x[1]**o+(-0.21773573235)*x[1]
-        arg[1,3,2,0]=(-0.879175905661)*x[0]**o+(0.100238280861)*x[0]+(0.331472085056)*x[1]**o+(0.0310947651268)*x[1]
-        arg[1,3,2,1]=(-0.195155740038)*x[0]**o+(0.532078676231)*x[0]+(-0.863288082011)*x[1]**o+(-0.0905878788265)*x[1]
-        arg[1,4,0,0]=(0.470883637487)*x[0]**o+(0.0291028245963)*x[0]+(-0.152462235474)*x[1]**o+(0.890883963301)*x[1]
-        arg[1,4,0,1]=(-0.0780797534409)*x[0]**o+(-0.999649003413)*x[0]+(-0.79446765004)*x[1]**o+(-0.820520881428)*x[1]
-        arg[1,4,1,0]=(-0.82479629638)*x[0]**o+(-0.28924829922)*x[0]+(-0.960430867949)*x[1]**o+(-0.514730558673)*x[1]
-        arg[1,4,1,1]=(-0.0853911110391)*x[0]**o+(0.726747270178)*x[0]+(-0.70925711586)*x[1]**o+(-0.331433386035)*x[1]
-        arg[1,4,2,0]=(-0.434350343402)*x[0]**o+(0.335341284415)*x[0]+(0.496818240476)*x[1]**o+(-0.925006191184)*x[1]
-        arg[1,4,2,1]=(0.0753516047957)*x[0]**o+(0.171090641529)*x[0]+(-0.836002762987)*x[1]**o+(-0.753836171615)*x[1]
-        arg[2,0,0,0]=(-0.331008073553)*x[0]**o+(-0.299051880715)*x[0]+(-0.84520124413)*x[1]**o+(0.780471473975)*x[1]
-        arg[2,0,0,1]=(-0.947973851318)*x[0]**o+(0.579142212501)*x[0]+(0.137317760268)*x[1]**o+(-0.379509530229)*x[1]
-        arg[2,0,1,0]=(-0.741320730287)*x[0]**o+(0.642110710824)*x[0]+(-0.632595944259)*x[1]**o+(0.944980046528)*x[1]
-        arg[2,0,1,1]=(0.616943682269)*x[0]**o+(-0.348189507611)*x[0]+(-0.414080070092)*x[1]**o+(-0.733041081362)*x[1]
-        arg[2,0,2,0]=(-0.021261659709)*x[0]**o+(0.790041129031)*x[0]+(0.788378634137)*x[1]**o+(0.391057560074)*x[1]
-        arg[2,0,2,1]=(0.563737321295)*x[0]**o+(-0.110516278477)*x[0]+(0.383563652425)*x[1]**o+(-0.857100387101)*x[1]
-        arg[2,1,0,0]=(-0.0839346911978)*x[0]**o+(0.699255867073)*x[0]+(-0.698488781835)*x[1]**o+(0.225940657322)*x[1]
-        arg[2,1,0,1]=(0.93638601214)*x[0]**o+(-0.593516691147)*x[0]+(-0.445863239521)*x[1]**o+(0.601067357746)*x[1]
-        arg[2,1,1,0]=(0.114814804735)*x[0]**o+(0.717600499991)*x[0]+(0.7371911818)*x[1]**o+(0.136012416552)*x[1]
-        arg[2,1,1,1]=(0.794499830148)*x[0]**o+(0.0581947415855)*x[0]+(0.626382859976)*x[1]**o+(-0.668272098674)*x[1]
-        arg[2,1,2,0]=(0.564628771073)*x[0]**o+(0.102820241267)*x[0]+(0.397960234363)*x[1]**o+(0.379632827896)*x[1]
-        arg[2,1,2,1]=(-0.0880639775913)*x[0]**o+(0.325978376801)*x[0]+(-0.505498229733)*x[1]**o+(-0.595922646655)*x[1]
-        arg[2,2,0,0]=(-0.132672737928)*x[0]**o+(-0.0291240195523)*x[0]+(-0.00825944211706)*x[1]**o+(0.985993963145)*x[1]
-        arg[2,2,0,1]=(0.244321497515)*x[0]**o+(-0.111329005236)*x[0]+(0.769353471123)*x[1]**o+(-0.174257027136)*x[1]
-        arg[2,2,1,0]=(0.252286330282)*x[0]**o+(0.450975615825)*x[0]+(-0.515016578606)*x[1]**o+(0.834736757555)*x[1]
-        arg[2,2,1,1]=(0.0588273338962)*x[0]**o+(-0.865406338788)*x[0]+(0.482095645149)*x[1]**o+(-0.595126490156)*x[1]
-        arg[2,2,2,0]=(0.244580063555)*x[0]**o+(0.576709884892)*x[0]+(-0.212616562122)*x[1]**o+(-0.407508050723)*x[1]
-        arg[2,2,2,1]=(0.416825783755)*x[0]**o+(0.430959078988)*x[0]+(-0.398840301481)*x[1]**o+(0.889105964295)*x[1]
-        arg[2,3,0,0]=(-0.731872136283)*x[0]**o+(0.237034931745)*x[0]+(0.547737117698)*x[1]**o+(0.364733861661)*x[1]
-        arg[2,3,0,1]=(0.971716549689)*x[0]**o+(0.466300970081)*x[0]+(-0.51802162747)*x[1]**o+(-0.859910778018)*x[1]
-        arg[2,3,1,0]=(-0.562918219893)*x[0]**o+(-0.0532549959391)*x[0]+(0.842033495359)*x[1]**o+(-0.708554283815)*x[1]
-        arg[2,3,1,1]=(0.437125534104)*x[0]**o+(-0.376751615116)*x[0]+(-0.330889383623)*x[1]**o+(0.958884035289)*x[1]
-        arg[2,3,2,0]=(-0.194290501566)*x[0]**o+(-0.368131904292)*x[0]+(0.802917650409)*x[1]**o+(0.628603987906)*x[1]
-        arg[2,3,2,1]=(0.70219875881)*x[0]**o+(0.822181339005)*x[0]+(0.768635447234)*x[1]**o+(0.871676010439)*x[1]
-        arg[2,4,0,0]=(-0.654498700662)*x[0]**o+(0.851143676147)*x[0]+(0.468468395415)*x[1]**o+(-0.447240713576)*x[1]
-        arg[2,4,0,1]=(0.893177052112)*x[0]**o+(0.652743480988)*x[0]+(0.726646163682)*x[1]**o+(-0.854895731892)*x[1]
-        arg[2,4,1,0]=(0.0540542301334)*x[0]**o+(-0.208654443984)*x[0]+(0.925127576853)*x[1]**o+(-0.932489814868)*x[1]
-        arg[2,4,1,1]=(-0.460268214104)*x[0]**o+(-0.303569308977)*x[0]+(-0.381458880316)*x[1]**o+(0.690537661673)*x[1]
-        arg[2,4,2,0]=(0.401012366366)*x[0]**o+(-0.970993441679)*x[0]+(0.0249535421254)*x[1]**o+(-0.499737254014)*x[1]
-        arg[2,4,2,1]=(-0.692604790859)*x[0]**o+(-0.685292098725)*x[0]+(0.22550357354)*x[1]**o+(0.908152783462)*x[1]
-        arg[3,0,0,0]=(-0.634246407254)*x[0]**o+(-0.571223033336)*x[0]+(0.0574319920181)*x[1]**o+(0.123763929908)*x[1]
-        arg[3,0,0,1]=(-0.569358219213)*x[0]**o+(-0.107237509632)*x[0]+(0.97672999497)*x[1]**o+(-0.114939366813)*x[1]
-        arg[3,0,1,0]=(-0.767885152479)*x[0]**o+(-0.105924102555)*x[0]+(0.539361607398)*x[1]**o+(0.546186446469)*x[1]
-        arg[3,0,1,1]=(-0.58818696897)*x[0]**o+(0.629371516566)*x[0]+(-0.598173904376)*x[1]**o+(0.959043112088)*x[1]
-        arg[3,0,2,0]=(0.751165393927)*x[0]**o+(0.732151619397)*x[0]+(-0.435276735735)*x[1]**o+(0.947142140722)*x[1]
-        arg[3,0,2,1]=(0.463904349547)*x[0]**o+(-0.947270841014)*x[0]+(0.304239969784)*x[1]**o+(-0.233566944292)*x[1]
-        arg[3,1,0,0]=(0.961122232395)*x[0]**o+(-0.989040215156)*x[0]+(0.833186746232)*x[1]**o+(0.226673105305)*x[1]
-        arg[3,1,0,1]=(-0.156957616578)*x[0]**o+(-0.361665587314)*x[0]+(0.987490273947)*x[1]**o+(-0.890271058746)*x[1]
-        arg[3,1,1,0]=(-0.259959222953)*x[0]**o+(-0.696135598749)*x[0]+(0.234411151165)*x[1]**o+(0.783105897256)*x[1]
-        arg[3,1,1,1]=(0.020886322199)*x[0]**o+(0.887445555864)*x[0]+(0.709489180254)*x[1]**o+(0.990590112507)*x[1]
-        arg[3,1,2,0]=(-0.963790247866)*x[0]**o+(-0.417180971158)*x[0]+(0.303859261646)*x[1]**o+(0.745552024399)*x[1]
-        arg[3,1,2,1]=(-0.364448135641)*x[0]**o+(0.760841571414)*x[0]+(-0.0283374186763)*x[1]**o+(-0.491433855748)*x[1]
-        arg[3,2,0,0]=(-0.649766142291)*x[0]**o+(-0.177410238297)*x[0]+(0.137316641289)*x[1]**o+(-0.40890299152)*x[1]
-        arg[3,2,0,1]=(0.282922984657)*x[0]**o+(-0.660238152943)*x[0]+(0.481726052488)*x[1]**o+(0.976011254218)*x[1]
-        arg[3,2,1,0]=(0.989761520473)*x[0]**o+(0.194082255647)*x[0]+(-0.648435682551)*x[1]**o+(-0.721569599311)*x[1]
-        arg[3,2,1,1]=(0.734634540883)*x[0]**o+(0.524638529049)*x[0]+(-0.737636791717)*x[1]**o+(-0.995904525822)*x[1]
-        arg[3,2,2,0]=(0.422396808663)*x[0]**o+(-0.820639154105)*x[0]+(-0.566207315373)*x[1]**o+(-0.224174711984)*x[1]
-        arg[3,2,2,1]=(0.719145374997)*x[0]**o+(-0.885860499468)*x[0]+(0.184062878609)*x[1]**o+(0.47660543007)*x[1]
-        arg[3,3,0,0]=(-0.0122290849915)*x[0]**o+(-0.0314298339876)*x[0]+(0.937255407134)*x[1]**o+(-0.754858547072)*x[1]
-        arg[3,3,0,1]=(-0.507826956669)*x[0]**o+(0.951205020689)*x[0]+(0.837096245109)*x[1]**o+(-0.576692399518)*x[1]
-        arg[3,3,1,0]=(0.602119808238)*x[0]**o+(-0.943937134298)*x[0]+(-0.244250254626)*x[1]**o+(-0.814103542727)*x[1]
-        arg[3,3,1,1]=(-0.51811661822)*x[0]**o+(-0.188969078762)*x[0]+(-0.697470816837)*x[1]**o+(-0.741593014841)*x[1]
-        arg[3,3,2,0]=(-0.673948933786)*x[0]**o+(0.816404336566)*x[0]+(0.339239090092)*x[1]**o+(-0.0173550947113)*x[1]
-        arg[3,3,2,1]=(0.499109852716)*x[0]**o+(0.515501552893)*x[0]+(0.926442939974)*x[1]**o+(0.157227173254)*x[1]
-        arg[3,4,0,0]=(-0.1837389273)*x[0]**o+(0.78490229721)*x[0]+(-0.248033788374)*x[1]**o+(0.735136386405)*x[1]
-        arg[3,4,0,1]=(0.121169550194)*x[0]**o+(-0.854027732077)*x[0]+(0.937680848475)*x[1]**o+(-0.447184197264)*x[1]
-        arg[3,4,1,0]=(-0.788610934694)*x[0]**o+(-0.397825388144)*x[0]+(0.604421361449)*x[1]**o+(0.937184552821)*x[1]
-        arg[3,4,1,1]=(-0.493380143496)*x[0]**o+(0.958197000398)*x[0]+(0.282372561751)*x[1]**o+(-0.55322669826)*x[1]
-        arg[3,4,2,0]=(0.11333865923)*x[0]**o+(-0.542805511569)*x[0]+(-0.640646701928)*x[1]**o+(-0.342030716597)*x[1]
-        arg[3,4,2,1]=(0.505356266297)*x[0]**o+(-0.107422782294)*x[0]+(0.542833447968)*x[1]**o+(-0.615275716592)*x[1]
-        ref[0,0,0,0]=(0.922177773381)*x_ref[0]**o+(0.37324175781)*x_ref[0]+(-0.169208776011)*x_ref[1]**o+(0.72134249236)*x_ref[1]
-        ref[0,0,0,1]=(0.85312270129)*x_ref[0]**o+(0.0512919651836)*x_ref[0]+(0.968880249675)*x_ref[1]**o+(0.740058819096)*x_ref[1]
-        ref[0,0,1,0]=(-0.018205657901)*x_ref[0]**o+(0.601838710779)*x_ref[0]+(0.211002282731)*x_ref[1]**o+(0.801382123792)*x_ref[1]
-        ref[0,0,1,1]=(-0.249128714489)*x_ref[0]**o+(-0.408809542089)*x_ref[0]+(-0.684434920261)*x_ref[1]**o+(0.223674849818)*x_ref[1]
-        ref[0,0,2,0]=(0.396627551183)*x_ref[0]**o+(-0.223592778052)*x_ref[0]+(0.227333834259)*x_ref[1]**o+(0.66580805616)*x_ref[1]
-        ref[0,0,2,1]=(0.365216692731)*x_ref[0]**o+(-0.670947594503)*x_ref[0]+(0.400260365509)*x_ref[1]**o+(0.10903299253)*x_ref[1]
-        ref[0,1,0,0]=(0.823297765985)*x_ref[0]**o+(0.60337946486)*x_ref[0]+(-0.314265083693)*x_ref[1]**o+(-0.00636816227929)*x_ref[1]
-        ref[0,1,0,1]=(-0.26216625982)*x_ref[0]**o+(0.767412606588)*x_ref[0]+(-0.284917238441)*x_ref[1]**o+(0.56385025143)*x_ref[1]
-        ref[0,1,1,0]=(-0.732326448281)*x_ref[0]**o+(-0.669197323856)*x_ref[0]+(-0.608751752289)*x_ref[1]**o+(-0.853458985188)*x_ref[1]
-        ref[0,1,1,1]=(0.637275594334)*x_ref[0]**o+(0.696570850488)*x_ref[0]+(0.012026820657)*x_ref[1]**o+(0.558317439186)*x_ref[1]
-        ref[0,1,2,0]=(0.925899092402)*x_ref[0]**o+(0.568045453255)*x_ref[0]+(-0.766701931715)*x_ref[1]**o+(-0.95082586036)*x_ref[1]
-        ref[0,1,2,1]=(0.127524211574)*x_ref[0]**o+(-0.65150542164)*x_ref[0]+(-0.365773940068)*x_ref[1]**o+(0.990465711754)*x_ref[1]
-        ref[0,2,0,0]=(0.456469052217)*x_ref[0]**o+(0.403391798397)*x_ref[0]+(-0.21921915949)*x_ref[1]**o+(0.171493695945)*x_ref[1]
-        ref[0,2,0,1]=(-0.980242506743)*x_ref[0]**o+(0.880225959645)*x_ref[0]+(0.682653186307)*x_ref[1]**o+(-0.561867916377)*x_ref[1]
-        ref[0,2,1,0]=(-0.329881998938)*x_ref[0]**o+(0.464976480407)*x_ref[0]+(-0.812583693347)*x_ref[1]**o+(0.0103356333568)*x_ref[1]
-        ref[0,2,1,1]=(-0.710350374606)*x_ref[0]**o+(-0.445981415127)*x_ref[0]+(-0.159054554695)*x_ref[1]**o+(-0.0306514318922)*x_ref[1]
-        ref[0,2,2,0]=(0.0903142465124)*x_ref[0]**o+(0.872680271888)*x_ref[0]+(0.230242338668)*x_ref[1]**o+(0.557126778217)*x_ref[1]
-        ref[0,2,2,1]=(-0.842046475241)*x_ref[0]**o+(0.350544067128)*x_ref[0]+(0.486186516633)*x_ref[1]**o+(-0.550801066658)*x_ref[1]
-        ref[0,3,0,0]=(0.740313870334)*x_ref[0]**o+(-0.177105021967)*x_ref[0]+(0.00114640526837)*x_ref[1]**o+(0.349602955151)*x_ref[1]
-        ref[0,3,0,1]=(0.898906724506)*x_ref[0]**o+(-0.882729119203)*x_ref[0]+(0.000278645863091)*x_ref[1]**o+(-0.450247260284)*x_ref[1]
-        ref[0,3,1,0]=(0.411917691981)*x_ref[0]**o+(0.0461900014479)*x_ref[0]+(0.1608400364)*x_ref[1]**o+(0.130550626888)*x_ref[1]
-        ref[0,3,1,1]=(0.610378099059)*x_ref[0]**o+(-0.903971943528)*x_ref[0]+(-0.0170960427518)*x_ref[1]**o+(0.765729630725)*x_ref[1]
-        ref[0,3,2,0]=(-0.811421756909)*x_ref[0]**o+(-0.220065414196)*x_ref[0]+(0.529467921065)*x_ref[1]**o+(0.13896086667)*x_ref[1]
-        ref[0,3,2,1]=(-0.621021589728)*x_ref[0]**o+(0.181903892108)*x_ref[0]+(0.724296638902)*x_ref[1]**o+(0.651705107858)*x_ref[1]
-        ref[0,4,0,0]=(0.323254788695)*x_ref[0]**o+(0.758728125147)*x_ref[0]+(0.0719056895797)*x_ref[1]**o+(-0.486299017994)*x_ref[1]
-        ref[0,4,0,1]=(-0.426525215977)*x_ref[0]**o+(-0.70344592953)*x_ref[0]+(-0.467799544116)*x_ref[1]**o+(0.0394017649712)*x_ref[1]
-        ref[0,4,1,0]=(-0.559984242808)*x_ref[0]**o+(-0.963639424043)*x_ref[0]+(0.884232194806)*x_ref[1]**o+(0.948111505594)*x_ref[1]
-        ref[0,4,1,1]=(-0.825627656302)*x_ref[0]**o+(0.167871540452)*x_ref[0]+(0.0969950885663)*x_ref[1]**o+(-0.477024385485)*x_ref[1]
-        ref[0,4,2,0]=(-0.890191205005)*x_ref[0]**o+(-0.291891624031)*x_ref[0]+(-0.924812934321)*x_ref[1]**o+(-0.898567598264)*x_ref[1]
-        ref[0,4,2,1]=(0.0552241756422)*x_ref[0]**o+(-0.47878688784)*x_ref[0]+(-0.208893161197)*x_ref[1]**o+(-0.671733441515)*x_ref[1]
-        ref[1,0,0,0]=(0.609961055126)*x_ref[0]**o+(0.389225845794)*x_ref[0]+(0.147977819654)*x_ref[1]**o+(-0.75096024248)*x_ref[1]
-        ref[1,0,0,1]=(-0.407376527411)*x_ref[0]**o+(-0.696660373977)*x_ref[0]+(-0.803862178008)*x_ref[1]**o+(-0.367087112506)*x_ref[1]
-        ref[1,0,1,0]=(0.89146134332)*x_ref[0]**o+(0.388607608477)*x_ref[0]+(0.763190367241)*x_ref[1]**o+(0.169275499463)*x_ref[1]
-        ref[1,0,1,1]=(-0.870871474063)*x_ref[0]**o+(-0.21526798243)*x_ref[0]+(0.159168404985)*x_ref[1]**o+(0.715049896538)*x_ref[1]
-        ref[1,0,2,0]=(-0.842978554795)*x_ref[0]**o+(0.209649486001)*x_ref[0]+(-0.767629750054)*x_ref[1]**o+(-0.126634026874)*x_ref[1]
-        ref[1,0,2,1]=(-0.728571756044)*x_ref[0]**o+(-0.247852313042)*x_ref[0]+(0.818809803616)*x_ref[1]**o+(0.736163163331)*x_ref[1]
-        ref[1,1,0,0]=(-0.670608139072)*x_ref[0]**o+(0.330167259903)*x_ref[0]+(0.275974484086)*x_ref[1]**o+(0.492110644529)*x_ref[1]
-        ref[1,1,0,1]=(0.724664287226)*x_ref[0]**o+(0.738855592065)*x_ref[0]+(0.511369798951)*x_ref[1]**o+(0.455794112842)*x_ref[1]
-        ref[1,1,1,0]=(0.783504599076)*x_ref[0]**o+(-0.558579246854)*x_ref[0]+(0.608044912637)*x_ref[1]**o+(-0.401058633268)*x_ref[1]
-        ref[1,1,1,1]=(0.406697861117)*x_ref[0]**o+(-0.31302718156)*x_ref[0]+(-0.999553049864)*x_ref[1]**o+(0.647698243869)*x_ref[1]
-        ref[1,1,2,0]=(-0.788346252365)*x_ref[0]**o+(-0.809895265253)*x_ref[0]+(0.441738551485)*x_ref[1]**o+(-0.686785865679)*x_ref[1]
-        ref[1,1,2,1]=(0.794571346519)*x_ref[0]**o+(-0.552071697712)*x_ref[0]+(0.77260218173)*x_ref[1]**o+(-0.969584549528)*x_ref[1]
-        ref[1,2,0,0]=(-0.867948229325)*x_ref[0]**o+(-0.582387320474)*x_ref[0]+(0.0387726756335)*x_ref[1]**o+(0.4143770831)*x_ref[1]
-        ref[1,2,0,1]=(-0.913557875303)*x_ref[0]**o+(-0.517970834439)*x_ref[0]+(-0.922517499063)*x_ref[1]**o+(0.858552054359)*x_ref[1]
-        ref[1,2,1,0]=(0.409302016181)*x_ref[0]**o+(-0.684529177441)*x_ref[0]+(0.818122023218)*x_ref[1]**o+(-0.583589419623)*x_ref[1]
-        ref[1,2,1,1]=(0.750795883056)*x_ref[0]**o+(-0.710882726624)*x_ref[0]+(0.915210035315)*x_ref[1]**o+(0.802588664027)*x_ref[1]
-        ref[1,2,2,0]=(0.639216566804)*x_ref[0]**o+(-0.300954214125)*x_ref[0]+(-0.26724393342)*x_ref[1]**o+(0.426742851293)*x_ref[1]
-        ref[1,2,2,1]=(-0.00337538020121)*x_ref[0]**o+(0.283012169215)*x_ref[0]+(0.725040731001)*x_ref[1]**o+(-0.708238265029)*x_ref[1]
-        ref[1,3,0,0]=(0.217404922432)*x_ref[0]**o+(-0.590883003502)*x_ref[0]+(0.451142849723)*x_ref[1]**o+(0.624698767392)*x_ref[1]
-        ref[1,3,0,1]=(0.0351258739828)*x_ref[0]**o+(-0.784068492686)*x_ref[0]+(0.469956184167)*x_ref[1]**o+(0.634124784387)*x_ref[1]
-        ref[1,3,1,0]=(0.998414775431)*x_ref[0]**o+(0.388202946918)*x_ref[0]+(-0.849223443255)*x_ref[1]**o+(-0.804590028218)*x_ref[1]
-        ref[1,3,1,1]=(0.0219748851856)*x_ref[0]**o+(0.464069403336)*x_ref[0]+(-0.470759541095)*x_ref[1]**o+(-0.21773573235)*x_ref[1]
-        ref[1,3,2,0]=(-0.879175905661)*x_ref[0]**o+(0.100238280861)*x_ref[0]+(0.331472085056)*x_ref[1]**o+(0.0310947651268)*x_ref[1]
-        ref[1,3,2,1]=(-0.195155740038)*x_ref[0]**o+(0.532078676231)*x_ref[0]+(-0.863288082011)*x_ref[1]**o+(-0.0905878788265)*x_ref[1]
-        ref[1,4,0,0]=(0.470883637487)*x_ref[0]**o+(0.0291028245963)*x_ref[0]+(-0.152462235474)*x_ref[1]**o+(0.890883963301)*x_ref[1]
-        ref[1,4,0,1]=(-0.0780797534409)*x_ref[0]**o+(-0.999649003413)*x_ref[0]+(-0.79446765004)*x_ref[1]**o+(-0.820520881428)*x_ref[1]
-        ref[1,4,1,0]=(-0.82479629638)*x_ref[0]**o+(-0.28924829922)*x_ref[0]+(-0.960430867949)*x_ref[1]**o+(-0.514730558673)*x_ref[1]
-        ref[1,4,1,1]=(-0.0853911110391)*x_ref[0]**o+(0.726747270178)*x_ref[0]+(-0.70925711586)*x_ref[1]**o+(-0.331433386035)*x_ref[1]
-        ref[1,4,2,0]=(-0.434350343402)*x_ref[0]**o+(0.335341284415)*x_ref[0]+(0.496818240476)*x_ref[1]**o+(-0.925006191184)*x_ref[1]
-        ref[1,4,2,1]=(0.0753516047957)*x_ref[0]**o+(0.171090641529)*x_ref[0]+(-0.836002762987)*x_ref[1]**o+(-0.753836171615)*x_ref[1]
-        ref[2,0,0,0]=(-0.331008073553)*x_ref[0]**o+(-0.299051880715)*x_ref[0]+(-0.84520124413)*x_ref[1]**o+(0.780471473975)*x_ref[1]
-        ref[2,0,0,1]=(-0.947973851318)*x_ref[0]**o+(0.579142212501)*x_ref[0]+(0.137317760268)*x_ref[1]**o+(-0.379509530229)*x_ref[1]
-        ref[2,0,1,0]=(-0.741320730287)*x_ref[0]**o+(0.642110710824)*x_ref[0]+(-0.632595944259)*x_ref[1]**o+(0.944980046528)*x_ref[1]
-        ref[2,0,1,1]=(0.616943682269)*x_ref[0]**o+(-0.348189507611)*x_ref[0]+(-0.414080070092)*x_ref[1]**o+(-0.733041081362)*x_ref[1]
-        ref[2,0,2,0]=(-0.021261659709)*x_ref[0]**o+(0.790041129031)*x_ref[0]+(0.788378634137)*x_ref[1]**o+(0.391057560074)*x_ref[1]
-        ref[2,0,2,1]=(0.563737321295)*x_ref[0]**o+(-0.110516278477)*x_ref[0]+(0.383563652425)*x_ref[1]**o+(-0.857100387101)*x_ref[1]
-        ref[2,1,0,0]=(-0.0839346911978)*x_ref[0]**o+(0.699255867073)*x_ref[0]+(-0.698488781835)*x_ref[1]**o+(0.225940657322)*x_ref[1]
-        ref[2,1,0,1]=(0.93638601214)*x_ref[0]**o+(-0.593516691147)*x_ref[0]+(-0.445863239521)*x_ref[1]**o+(0.601067357746)*x_ref[1]
-        ref[2,1,1,0]=(0.114814804735)*x_ref[0]**o+(0.717600499991)*x_ref[0]+(0.7371911818)*x_ref[1]**o+(0.136012416552)*x_ref[1]
-        ref[2,1,1,1]=(0.794499830148)*x_ref[0]**o+(0.0581947415855)*x_ref[0]+(0.626382859976)*x_ref[1]**o+(-0.668272098674)*x_ref[1]
-        ref[2,1,2,0]=(0.564628771073)*x_ref[0]**o+(0.102820241267)*x_ref[0]+(0.397960234363)*x_ref[1]**o+(0.379632827896)*x_ref[1]
-        ref[2,1,2,1]=(-0.0880639775913)*x_ref[0]**o+(0.325978376801)*x_ref[0]+(-0.505498229733)*x_ref[1]**o+(-0.595922646655)*x_ref[1]
-        ref[2,2,0,0]=(-0.132672737928)*x_ref[0]**o+(-0.0291240195523)*x_ref[0]+(-0.00825944211706)*x_ref[1]**o+(0.985993963145)*x_ref[1]
-        ref[2,2,0,1]=(0.244321497515)*x_ref[0]**o+(-0.111329005236)*x_ref[0]+(0.769353471123)*x_ref[1]**o+(-0.174257027136)*x_ref[1]
-        ref[2,2,1,0]=(0.252286330282)*x_ref[0]**o+(0.450975615825)*x_ref[0]+(-0.515016578606)*x_ref[1]**o+(0.834736757555)*x_ref[1]
-        ref[2,2,1,1]=(0.0588273338962)*x_ref[0]**o+(-0.865406338788)*x_ref[0]+(0.482095645149)*x_ref[1]**o+(-0.595126490156)*x_ref[1]
-        ref[2,2,2,0]=(0.244580063555)*x_ref[0]**o+(0.576709884892)*x_ref[0]+(-0.212616562122)*x_ref[1]**o+(-0.407508050723)*x_ref[1]
-        ref[2,2,2,1]=(0.416825783755)*x_ref[0]**o+(0.430959078988)*x_ref[0]+(-0.398840301481)*x_ref[1]**o+(0.889105964295)*x_ref[1]
-        ref[2,3,0,0]=(-0.731872136283)*x_ref[0]**o+(0.237034931745)*x_ref[0]+(0.547737117698)*x_ref[1]**o+(0.364733861661)*x_ref[1]
-        ref[2,3,0,1]=(0.971716549689)*x_ref[0]**o+(0.466300970081)*x_ref[0]+(-0.51802162747)*x_ref[1]**o+(-0.859910778018)*x_ref[1]
-        ref[2,3,1,0]=(-0.562918219893)*x_ref[0]**o+(-0.0532549959391)*x_ref[0]+(0.842033495359)*x_ref[1]**o+(-0.708554283815)*x_ref[1]
-        ref[2,3,1,1]=(0.437125534104)*x_ref[0]**o+(-0.376751615116)*x_ref[0]+(-0.330889383623)*x_ref[1]**o+(0.958884035289)*x_ref[1]
-        ref[2,3,2,0]=(-0.194290501566)*x_ref[0]**o+(-0.368131904292)*x_ref[0]+(0.802917650409)*x_ref[1]**o+(0.628603987906)*x_ref[1]
-        ref[2,3,2,1]=(0.70219875881)*x_ref[0]**o+(0.822181339005)*x_ref[0]+(0.768635447234)*x_ref[1]**o+(0.871676010439)*x_ref[1]
-        ref[2,4,0,0]=(-0.654498700662)*x_ref[0]**o+(0.851143676147)*x_ref[0]+(0.468468395415)*x_ref[1]**o+(-0.447240713576)*x_ref[1]
-        ref[2,4,0,1]=(0.893177052112)*x_ref[0]**o+(0.652743480988)*x_ref[0]+(0.726646163682)*x_ref[1]**o+(-0.854895731892)*x_ref[1]
-        ref[2,4,1,0]=(0.0540542301334)*x_ref[0]**o+(-0.208654443984)*x_ref[0]+(0.925127576853)*x_ref[1]**o+(-0.932489814868)*x_ref[1]
-        ref[2,4,1,1]=(-0.460268214104)*x_ref[0]**o+(-0.303569308977)*x_ref[0]+(-0.381458880316)*x_ref[1]**o+(0.690537661673)*x_ref[1]
-        ref[2,4,2,0]=(0.401012366366)*x_ref[0]**o+(-0.970993441679)*x_ref[0]+(0.0249535421254)*x_ref[1]**o+(-0.499737254014)*x_ref[1]
-        ref[2,4,2,1]=(-0.692604790859)*x_ref[0]**o+(-0.685292098725)*x_ref[0]+(0.22550357354)*x_ref[1]**o+(0.908152783462)*x_ref[1]
-        ref[3,0,0,0]=(-0.634246407254)*x_ref[0]**o+(-0.571223033336)*x_ref[0]+(0.0574319920181)*x_ref[1]**o+(0.123763929908)*x_ref[1]
-        ref[3,0,0,1]=(-0.569358219213)*x_ref[0]**o+(-0.107237509632)*x_ref[0]+(0.97672999497)*x_ref[1]**o+(-0.114939366813)*x_ref[1]
-        ref[3,0,1,0]=(-0.767885152479)*x_ref[0]**o+(-0.105924102555)*x_ref[0]+(0.539361607398)*x_ref[1]**o+(0.546186446469)*x_ref[1]
-        ref[3,0,1,1]=(-0.58818696897)*x_ref[0]**o+(0.629371516566)*x_ref[0]+(-0.598173904376)*x_ref[1]**o+(0.959043112088)*x_ref[1]
-        ref[3,0,2,0]=(0.751165393927)*x_ref[0]**o+(0.732151619397)*x_ref[0]+(-0.435276735735)*x_ref[1]**o+(0.947142140722)*x_ref[1]
-        ref[3,0,2,1]=(0.463904349547)*x_ref[0]**o+(-0.947270841014)*x_ref[0]+(0.304239969784)*x_ref[1]**o+(-0.233566944292)*x_ref[1]
-        ref[3,1,0,0]=(0.961122232395)*x_ref[0]**o+(-0.989040215156)*x_ref[0]+(0.833186746232)*x_ref[1]**o+(0.226673105305)*x_ref[1]
-        ref[3,1,0,1]=(-0.156957616578)*x_ref[0]**o+(-0.361665587314)*x_ref[0]+(0.987490273947)*x_ref[1]**o+(-0.890271058746)*x_ref[1]
-        ref[3,1,1,0]=(-0.259959222953)*x_ref[0]**o+(-0.696135598749)*x_ref[0]+(0.234411151165)*x_ref[1]**o+(0.783105897256)*x_ref[1]
-        ref[3,1,1,1]=(0.020886322199)*x_ref[0]**o+(0.887445555864)*x_ref[0]+(0.709489180254)*x_ref[1]**o+(0.990590112507)*x_ref[1]
-        ref[3,1,2,0]=(-0.963790247866)*x_ref[0]**o+(-0.417180971158)*x_ref[0]+(0.303859261646)*x_ref[1]**o+(0.745552024399)*x_ref[1]
-        ref[3,1,2,1]=(-0.364448135641)*x_ref[0]**o+(0.760841571414)*x_ref[0]+(-0.0283374186763)*x_ref[1]**o+(-0.491433855748)*x_ref[1]
-        ref[3,2,0,0]=(-0.649766142291)*x_ref[0]**o+(-0.177410238297)*x_ref[0]+(0.137316641289)*x_ref[1]**o+(-0.40890299152)*x_ref[1]
-        ref[3,2,0,1]=(0.282922984657)*x_ref[0]**o+(-0.660238152943)*x_ref[0]+(0.481726052488)*x_ref[1]**o+(0.976011254218)*x_ref[1]
-        ref[3,2,1,0]=(0.989761520473)*x_ref[0]**o+(0.194082255647)*x_ref[0]+(-0.648435682551)*x_ref[1]**o+(-0.721569599311)*x_ref[1]
-        ref[3,2,1,1]=(0.734634540883)*x_ref[0]**o+(0.524638529049)*x_ref[0]+(-0.737636791717)*x_ref[1]**o+(-0.995904525822)*x_ref[1]
-        ref[3,2,2,0]=(0.422396808663)*x_ref[0]**o+(-0.820639154105)*x_ref[0]+(-0.566207315373)*x_ref[1]**o+(-0.224174711984)*x_ref[1]
-        ref[3,2,2,1]=(0.719145374997)*x_ref[0]**o+(-0.885860499468)*x_ref[0]+(0.184062878609)*x_ref[1]**o+(0.47660543007)*x_ref[1]
-        ref[3,3,0,0]=(-0.0122290849915)*x_ref[0]**o+(-0.0314298339876)*x_ref[0]+(0.937255407134)*x_ref[1]**o+(-0.754858547072)*x_ref[1]
-        ref[3,3,0,1]=(-0.507826956669)*x_ref[0]**o+(0.951205020689)*x_ref[0]+(0.837096245109)*x_ref[1]**o+(-0.576692399518)*x_ref[1]
-        ref[3,3,1,0]=(0.602119808238)*x_ref[0]**o+(-0.943937134298)*x_ref[0]+(-0.244250254626)*x_ref[1]**o+(-0.814103542727)*x_ref[1]
-        ref[3,3,1,1]=(-0.51811661822)*x_ref[0]**o+(-0.188969078762)*x_ref[0]+(-0.697470816837)*x_ref[1]**o+(-0.741593014841)*x_ref[1]
-        ref[3,3,2,0]=(-0.673948933786)*x_ref[0]**o+(0.816404336566)*x_ref[0]+(0.339239090092)*x_ref[1]**o+(-0.0173550947113)*x_ref[1]
-        ref[3,3,2,1]=(0.499109852716)*x_ref[0]**o+(0.515501552893)*x_ref[0]+(0.926442939974)*x_ref[1]**o+(0.157227173254)*x_ref[1]
-        ref[3,4,0,0]=(-0.1837389273)*x_ref[0]**o+(0.78490229721)*x_ref[0]+(-0.248033788374)*x_ref[1]**o+(0.735136386405)*x_ref[1]
-        ref[3,4,0,1]=(0.121169550194)*x_ref[0]**o+(-0.854027732077)*x_ref[0]+(0.937680848475)*x_ref[1]**o+(-0.447184197264)*x_ref[1]
-        ref[3,4,1,0]=(-0.788610934694)*x_ref[0]**o+(-0.397825388144)*x_ref[0]+(0.604421361449)*x_ref[1]**o+(0.937184552821)*x_ref[1]
-        ref[3,4,1,1]=(-0.493380143496)*x_ref[0]**o+(0.958197000398)*x_ref[0]+(0.282372561751)*x_ref[1]**o+(-0.55322669826)*x_ref[1]
-        ref[3,4,2,0]=(0.11333865923)*x_ref[0]**o+(-0.542805511569)*x_ref[0]+(-0.640646701928)*x_ref[1]**o+(-0.342030716597)*x_ref[1]
-        ref[3,4,2,1]=(0.505356266297)*x_ref[0]**o+(-0.107422782294)*x_ref[0]+(0.542833447968)*x_ref[1]**o+(-0.615275716592)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.507422888369)*x[0]**o+(0.808798513305)*x[0]+(0.51493073805)*x[1]**o+(-0.928527686947)*x[1]+(-0.788010447498)*x[2]**o+(-0.378389833131)*x[2]
-        arg[0,0,0,1]=(-0.475851243177)*x[0]**o+(0.746578446988)*x[0]+(0.504778622494)*x[1]**o+(-0.677770398899)*x[1]+(-0.862535648403)*x[2]**o+(0.620414141691)*x[2]
-        arg[0,0,1,0]=(-0.361726879582)*x[0]**o+(0.554584127587)*x[0]+(0.436610414772)*x[1]**o+(-0.686534492717)*x[1]+(0.757226061419)*x[2]**o+(0.0948537725389)*x[2]
-        arg[0,0,1,1]=(-0.362160696355)*x[0]**o+(0.766524051703)*x[0]+(0.209980857795)*x[1]**o+(-0.478398061437)*x[1]+(-0.410960179122)*x[2]**o+(-0.213272138462)*x[2]
-        arg[0,0,2,0]=(0.87154872554)*x[0]**o+(-0.727915301904)*x[0]+(0.683580698056)*x[1]**o+(0.215052521277)*x[1]+(0.267231507898)*x[2]**o+(-0.0124189912449)*x[2]
-        arg[0,0,2,1]=(0.631400944876)*x[0]**o+(0.537293628606)*x[0]+(0.944754350994)*x[1]**o+(0.108068908012)*x[1]+(0.890117096365)*x[2]**o+(0.164706867235)*x[2]
-        arg[0,1,0,0]=(-0.935871759207)*x[0]**o+(0.350133758077)*x[0]+(-0.966482181015)*x[1]**o+(0.440902701528)*x[1]+(-0.893329541322)*x[2]**o+(0.350317827938)*x[2]
-        arg[0,1,0,1]=(0.465305203601)*x[0]**o+(0.711131797928)*x[0]+(0.104091536498)*x[1]**o+(0.484811628127)*x[1]+(0.676878954516)*x[2]**o+(-0.99327016995)*x[2]
-        arg[0,1,1,0]=(-0.361189016151)*x[0]**o+(0.962468573492)*x[0]+(-0.158571122564)*x[1]**o+(-0.293583660912)*x[1]+(-0.713699173608)*x[2]**o+(-0.507430163361)*x[2]
-        arg[0,1,1,1]=(0.172564527054)*x[0]**o+(0.273438145027)*x[0]+(0.137378266239)*x[1]**o+(-0.675788606841)*x[1]+(-0.362143416121)*x[2]**o+(0.0703897749775)*x[2]
-        arg[0,1,2,0]=(-0.941374717271)*x[0]**o+(0.289433165458)*x[0]+(0.318615227028)*x[1]**o+(0.524362568204)*x[1]+(-0.612590305095)*x[2]**o+(-0.117555538957)*x[2]
-        arg[0,1,2,1]=(-0.442920825551)*x[0]**o+(-0.454982146579)*x[0]+(0.355353737589)*x[1]**o+(-0.729623917004)*x[1]+(-0.567220335937)*x[2]**o+(0.977652639976)*x[2]
-        arg[0,2,0,0]=(0.942485930373)*x[0]**o+(-0.605823961033)*x[0]+(-0.143465779338)*x[1]**o+(0.327354308987)*x[1]+(0.691900417542)*x[2]**o+(-0.514165213849)*x[2]
-        arg[0,2,0,1]=(0.018029272977)*x[0]**o+(-0.209992705469)*x[0]+(-0.224614727554)*x[1]**o+(-0.862697462048)*x[1]+(0.274791387928)*x[2]**o+(-0.907445869506)*x[2]
-        arg[0,2,1,0]=(0.862755248265)*x[0]**o+(0.020831641939)*x[0]+(0.496662599261)*x[1]**o+(0.79318975953)*x[1]+(0.0912166895541)*x[2]**o+(0.556337610316)*x[2]
-        arg[0,2,1,1]=(-0.09652997071)*x[0]**o+(-0.954279421394)*x[0]+(-0.601053524018)*x[1]**o+(0.642528012068)*x[1]+(0.295748113888)*x[2]**o+(-0.318166346186)*x[2]
-        arg[0,2,2,0]=(-0.914878854129)*x[0]**o+(0.159201123642)*x[0]+(0.589819056368)*x[1]**o+(-0.715763226823)*x[1]+(-0.444572583567)*x[2]**o+(-0.487866651367)*x[2]
-        arg[0,2,2,1]=(-0.71271969175)*x[0]**o+(0.454616308594)*x[0]+(0.510270095021)*x[1]**o+(-0.0385822967955)*x[1]+(-0.519736540313)*x[2]**o+(0.0556733091556)*x[2]
-        arg[0,3,0,0]=(0.355768034846)*x[0]**o+(0.152240594627)*x[0]+(-0.81081131843)*x[1]**o+(-0.913373483156)*x[1]+(-0.319859744799)*x[2]**o+(-0.306218435393)*x[2]
-        arg[0,3,0,1]=(-0.656932063693)*x[0]**o+(0.832886861783)*x[0]+(-0.417112750683)*x[1]**o+(-0.388190265957)*x[1]+(0.246534947096)*x[2]**o+(-0.896822839189)*x[2]
-        arg[0,3,1,0]=(0.204713418891)*x[0]**o+(-0.150097488817)*x[0]+(0.806578426941)*x[1]**o+(-0.590052708995)*x[1]+(-0.758958608419)*x[2]**o+(-0.221973528232)*x[2]
-        arg[0,3,1,1]=(-0.854308184618)*x[0]**o+(-0.292526203646)*x[0]+(-0.662403504833)*x[1]**o+(0.0955657982227)*x[1]+(0.69471076173)*x[2]**o+(0.384077309264)*x[2]
-        arg[0,3,2,0]=(0.982057200864)*x[0]**o+(-0.64758727704)*x[0]+(0.15941493222)*x[1]**o+(-0.17745437115)*x[1]+(-0.72953252955)*x[2]**o+(0.986979270802)*x[2]
-        arg[0,3,2,1]=(0.764526698779)*x[0]**o+(0.22809521115)*x[0]+(-0.0762092087998)*x[1]**o+(0.415212410471)*x[1]+(-0.263638988463)*x[2]**o+(-0.934669942336)*x[2]
-        arg[0,4,0,0]=(0.0812656932707)*x[0]**o+(0.0397235062518)*x[0]+(-0.0496912823983)*x[1]**o+(0.189891585189)*x[1]+(0.243537823293)*x[2]**o+(0.461256134208)*x[2]
-        arg[0,4,0,1]=(0.167596358861)*x[0]**o+(0.441650690481)*x[0]+(0.638100632205)*x[1]**o+(-0.69240615765)*x[1]+(-0.501855369512)*x[2]**o+(0.769465683782)*x[2]
-        arg[0,4,1,0]=(-0.137149398927)*x[0]**o+(-0.186548325285)*x[0]+(-0.504656948352)*x[1]**o+(0.228896656134)*x[1]+(-0.472425358061)*x[2]**o+(-0.0769834754996)*x[2]
-        arg[0,4,1,1]=(0.311655648626)*x[0]**o+(0.856513683959)*x[0]+(0.47173626537)*x[1]**o+(0.245497333467)*x[1]+(-0.513727691305)*x[2]**o+(-0.588614785682)*x[2]
-        arg[0,4,2,0]=(-0.152907854625)*x[0]**o+(-0.86229950575)*x[0]+(-0.931356414564)*x[1]**o+(-0.915667991864)*x[1]+(0.322316118527)*x[2]**o+(-0.987559462539)*x[2]
-        arg[0,4,2,1]=(-0.705947769164)*x[0]**o+(0.104081366627)*x[0]+(-0.540454644392)*x[1]**o+(0.404522880836)*x[1]+(0.146464264141)*x[2]**o+(0.586755030006)*x[2]
-        arg[1,0,0,0]=(-0.466614768106)*x[0]**o+(0.482681414943)*x[0]+(-0.176553738108)*x[1]**o+(-0.39162272813)*x[1]+(0.74312023324)*x[2]**o+(0.824538905894)*x[2]
-        arg[1,0,0,1]=(-0.9351073631)*x[0]**o+(-0.640226640449)*x[0]+(0.966208762054)*x[1]**o+(0.101792167944)*x[1]+(-0.732983657038)*x[2]**o+(-0.112313375937)*x[2]
-        arg[1,0,1,0]=(-0.305403470434)*x[0]**o+(-0.414397930347)*x[0]+(0.356093254322)*x[1]**o+(-0.52607560749)*x[1]+(-0.70070674473)*x[2]**o+(-0.0192901616015)*x[2]
-        arg[1,0,1,1]=(0.450046989211)*x[0]**o+(0.602770057268)*x[0]+(0.0193812509113)*x[1]**o+(-0.275615149191)*x[1]+(0.0180468267836)*x[2]**o+(-0.81388255113)*x[2]
-        arg[1,0,2,0]=(0.913651483249)*x[0]**o+(-0.92188313743)*x[0]+(0.680007150195)*x[1]**o+(-0.300145584708)*x[1]+(-0.398883520002)*x[2]**o+(-0.752781496463)*x[2]
-        arg[1,0,2,1]=(-0.265749827845)*x[0]**o+(0.594379728352)*x[0]+(0.463409943587)*x[1]**o+(-0.85840420426)*x[1]+(-0.705963756674)*x[2]**o+(0.251711112887)*x[2]
-        arg[1,1,0,0]=(-0.28895690781)*x[0]**o+(0.476461656166)*x[0]+(0.0692567954597)*x[1]**o+(0.88763437878)*x[1]+(0.0872256197554)*x[2]**o+(0.19467039694)*x[2]
-        arg[1,1,0,1]=(0.741045418981)*x[0]**o+(-0.726935151332)*x[0]+(0.899418662131)*x[1]**o+(0.27516497286)*x[1]+(-0.715927474971)*x[2]**o+(-0.709283098732)*x[2]
-        arg[1,1,1,0]=(0.991407130174)*x[0]**o+(-0.163484265852)*x[0]+(-0.983254548659)*x[1]**o+(0.0568443855477)*x[1]+(0.309664644588)*x[2]**o+(0.904334718845)*x[2]
-        arg[1,1,1,1]=(0.237261672833)*x[0]**o+(0.0861047746345)*x[0]+(-0.494898018662)*x[1]**o+(-0.433075334646)*x[1]+(0.588597346505)*x[2]**o+(-0.185559567553)*x[2]
-        arg[1,1,2,0]=(-0.969384091709)*x[0]**o+(-0.0229777223491)*x[0]+(0.0945623059666)*x[1]**o+(0.303543647034)*x[1]+(0.659000135381)*x[2]**o+(0.00873791711254)*x[2]
-        arg[1,1,2,1]=(-0.421406731882)*x[0]**o+(-0.5017394377)*x[0]+(0.027747130694)*x[1]**o+(0.327278873996)*x[1]+(-0.754133439304)*x[2]**o+(0.673525803845)*x[2]
-        arg[1,2,0,0]=(-0.104620319685)*x[0]**o+(-0.685602393278)*x[0]+(0.972173717014)*x[1]**o+(-0.440573017063)*x[1]+(-0.709529395743)*x[2]**o+(0.634170741457)*x[2]
-        arg[1,2,0,1]=(-0.560386754264)*x[0]**o+(0.570894623654)*x[0]+(-0.455122833362)*x[1]**o+(-0.00322505937935)*x[1]+(0.959400336149)*x[2]**o+(0.64014859954)*x[2]
-        arg[1,2,1,0]=(0.100585233221)*x[0]**o+(0.939532360957)*x[0]+(-0.900301955112)*x[1]**o+(-0.776375896786)*x[1]+(-0.779373294746)*x[2]**o+(0.546157461116)*x[2]
-        arg[1,2,1,1]=(-0.680457315071)*x[0]**o+(-0.0278844539208)*x[0]+(-0.629673590044)*x[1]**o+(0.813218376348)*x[1]+(-0.449484131841)*x[2]**o+(0.641682150048)*x[2]
-        arg[1,2,2,0]=(0.60056954386)*x[0]**o+(-0.763169434657)*x[0]+(-0.672890915035)*x[1]**o+(-0.368711154571)*x[1]+(0.476810195318)*x[2]**o+(-0.935071124382)*x[2]
-        arg[1,2,2,1]=(0.994100148333)*x[0]**o+(0.471647033381)*x[0]+(0.341677296654)*x[1]**o+(0.466442262068)*x[1]+(-0.0634919249117)*x[2]**o+(0.0637348830912)*x[2]
-        arg[1,3,0,0]=(-0.120744286726)*x[0]**o+(0.630378984537)*x[0]+(0.0837817796507)*x[1]**o+(-0.850115274881)*x[1]+(0.574342626561)*x[2]**o+(-0.705409915626)*x[2]
-        arg[1,3,0,1]=(-0.51181061391)*x[0]**o+(0.711479747616)*x[0]+(-0.00800928076734)*x[1]**o+(-0.703424580277)*x[1]+(-0.925935026157)*x[2]**o+(0.488175992827)*x[2]
-        arg[1,3,1,0]=(0.531879615751)*x[0]**o+(-0.214270521934)*x[0]+(-0.432344726015)*x[1]**o+(-0.107660826449)*x[1]+(0.763406427398)*x[2]**o+(-0.511000150429)*x[2]
-        arg[1,3,1,1]=(-0.867467568206)*x[0]**o+(-0.738425961596)*x[0]+(-0.925337667706)*x[1]**o+(-0.586227765107)*x[1]+(0.909987211462)*x[2]**o+(0.533347022582)*x[2]
-        arg[1,3,2,0]=(-0.47713113862)*x[0]**o+(-0.130876138883)*x[0]+(-0.607996835981)*x[1]**o+(-0.0306261551172)*x[1]+(0.956207500475)*x[2]**o+(-0.287731719382)*x[2]
-        arg[1,3,2,1]=(0.179479486943)*x[0]**o+(0.361266562479)*x[0]+(0.374904472267)*x[1]**o+(0.00788379106301)*x[1]+(-0.34090684265)*x[2]**o+(-0.190875910791)*x[2]
-        arg[1,4,0,0]=(0.685464203729)*x[0]**o+(0.0634561930987)*x[0]+(-0.662534110385)*x[1]**o+(0.383849898086)*x[1]+(0.948230524205)*x[2]**o+(-0.347042281976)*x[2]
-        arg[1,4,0,1]=(-0.484499755322)*x[0]**o+(-0.765655349243)*x[0]+(0.805331514606)*x[1]**o+(-0.0635912547496)*x[1]+(-0.139457134772)*x[2]**o+(0.227446734221)*x[2]
-        arg[1,4,1,0]=(-0.913971229647)*x[0]**o+(0.042531889985)*x[0]+(0.143956410289)*x[1]**o+(0.597990264168)*x[1]+(-0.85926903006)*x[2]**o+(0.205900361792)*x[2]
-        arg[1,4,1,1]=(-0.955540264653)*x[0]**o+(0.983439073814)*x[0]+(0.246870351555)*x[1]**o+(-0.610917180843)*x[1]+(-0.0418134447092)*x[2]**o+(-0.58407787472)*x[2]
-        arg[1,4,2,0]=(0.787274711453)*x[0]**o+(-0.899651339467)*x[0]+(-0.62195254225)*x[1]**o+(-0.516447289251)*x[1]+(0.267082643601)*x[2]**o+(0.0408186039688)*x[2]
-        arg[1,4,2,1]=(-0.485773801895)*x[0]**o+(0.663478067655)*x[0]+(0.928973237869)*x[1]**o+(0.353735145156)*x[1]+(0.128409748978)*x[2]**o+(-0.476479648592)*x[2]
-        arg[2,0,0,0]=(0.491574821811)*x[0]**o+(0.455303820526)*x[0]+(-0.747773112075)*x[1]**o+(-0.653255987137)*x[1]+(-0.738293040346)*x[2]**o+(0.948070477272)*x[2]
-        arg[2,0,0,1]=(-0.697412782403)*x[0]**o+(-0.738389544586)*x[0]+(0.231728579935)*x[1]**o+(0.248503931032)*x[1]+(-0.561155590703)*x[2]**o+(0.324682113147)*x[2]
-        arg[2,0,1,0]=(-0.00507638382064)*x[0]**o+(-0.983105866448)*x[0]+(-0.253141627484)*x[1]**o+(-0.0664178091069)*x[1]+(0.194460220144)*x[2]**o+(-0.174257469198)*x[2]
-        arg[2,0,1,1]=(-0.644447560463)*x[0]**o+(0.658703761133)*x[0]+(-0.685392825104)*x[1]**o+(-0.766295260796)*x[1]+(-0.922004388493)*x[2]**o+(-0.0745707720923)*x[2]
-        arg[2,0,2,0]=(-0.69924009606)*x[0]**o+(-0.398212597328)*x[0]+(-0.364991550186)*x[1]**o+(0.243474288977)*x[1]+(0.129545162767)*x[2]**o+(0.920611954845)*x[2]
-        arg[2,0,2,1]=(-0.494476126875)*x[0]**o+(-0.131503103148)*x[0]+(-0.241670500874)*x[1]**o+(0.40439125905)*x[1]+(0.134166779399)*x[2]**o+(-0.507385751809)*x[2]
-        arg[2,1,0,0]=(0.301148115913)*x[0]**o+(0.189635133395)*x[0]+(0.744167404774)*x[1]**o+(0.995754344203)*x[1]+(-0.334760662218)*x[2]**o+(-0.182462923741)*x[2]
-        arg[2,1,0,1]=(0.523500022508)*x[0]**o+(-0.257042661558)*x[0]+(-0.940233100381)*x[1]**o+(-0.202431731891)*x[1]+(-0.653480190287)*x[2]**o+(0.993156915081)*x[2]
-        arg[2,1,1,0]=(-0.502452234661)*x[0]**o+(-0.711581805303)*x[0]+(0.696450091152)*x[1]**o+(0.436746953802)*x[1]+(0.695969418438)*x[2]**o+(-0.671400022595)*x[2]
-        arg[2,1,1,1]=(0.0705944125182)*x[0]**o+(-0.865755834485)*x[0]+(0.921555996641)*x[1]**o+(-0.567855814858)*x[1]+(-0.213455192388)*x[2]**o+(0.820868399259)*x[2]
-        arg[2,1,2,0]=(0.744232126707)*x[0]**o+(0.336969176485)*x[0]+(0.339407729288)*x[1]**o+(-0.465154968917)*x[1]+(0.389524167202)*x[2]**o+(0.645394954477)*x[2]
-        arg[2,1,2,1]=(-0.299085687516)*x[0]**o+(0.220795864743)*x[0]+(-0.19353913538)*x[1]**o+(0.445131396297)*x[1]+(-0.779605318636)*x[2]**o+(-0.76707264371)*x[2]
-        arg[2,2,0,0]=(-0.357585997171)*x[0]**o+(-0.248795296406)*x[0]+(0.0876364714478)*x[1]**o+(-0.682833482179)*x[1]+(0.497052575986)*x[2]**o+(0.893378007889)*x[2]
-        arg[2,2,0,1]=(0.38067999218)*x[0]**o+(-0.857246232026)*x[0]+(0.0785818284359)*x[1]**o+(-0.473287028123)*x[1]+(-0.763041318956)*x[2]**o+(-0.1119710251)*x[2]
-        arg[2,2,1,0]=(-0.0278856926369)*x[0]**o+(0.435955626553)*x[0]+(-0.676274741782)*x[1]**o+(-0.719721825467)*x[1]+(0.195007734703)*x[2]**o+(0.504771278902)*x[2]
-        arg[2,2,1,1]=(0.459547475772)*x[0]**o+(-0.669041681613)*x[0]+(-0.741957874364)*x[1]**o+(0.604585337407)*x[1]+(-0.886718742046)*x[2]**o+(0.338113237761)*x[2]
-        arg[2,2,2,0]=(0.392926733678)*x[0]**o+(-0.923680589861)*x[0]+(-0.425503328457)*x[1]**o+(-0.0902669250117)*x[1]+(-0.346726072703)*x[2]**o+(0.541482976709)*x[2]
-        arg[2,2,2,1]=(0.134867023616)*x[0]**o+(0.478349607348)*x[0]+(-0.334617836366)*x[1]**o+(-0.74587411744)*x[1]+(-0.880365937567)*x[2]**o+(0.820743064452)*x[2]
-        arg[2,3,0,0]=(0.081184173895)*x[0]**o+(0.315011929905)*x[0]+(-0.137083926616)*x[1]**o+(0.103926223299)*x[1]+(0.363270989968)*x[2]**o+(-0.454075563606)*x[2]
-        arg[2,3,0,1]=(0.457730701321)*x[0]**o+(0.922345625691)*x[0]+(-0.412933933474)*x[1]**o+(-0.546359655103)*x[1]+(0.719101029933)*x[2]**o+(-0.790522859322)*x[2]
-        arg[2,3,1,0]=(-0.811816419841)*x[0]**o+(0.0379298408788)*x[0]+(-0.852643125131)*x[1]**o+(0.76881274254)*x[1]+(0.75214553496)*x[2]**o+(0.800382814403)*x[2]
-        arg[2,3,1,1]=(0.524802143618)*x[0]**o+(-0.717457078371)*x[0]+(0.389026887965)*x[1]**o+(-0.231912558721)*x[1]+(-0.394705562333)*x[2]**o+(-0.794723802655)*x[2]
-        arg[2,3,2,0]=(-0.232215520303)*x[0]**o+(0.994932250617)*x[0]+(-0.760425274222)*x[1]**o+(0.0910727760744)*x[1]+(0.621642024132)*x[2]**o+(0.263978719304)*x[2]
-        arg[2,3,2,1]=(0.515269404424)*x[0]**o+(-0.998266958288)*x[0]+(-0.485078033534)*x[1]**o+(-0.960043247553)*x[1]+(-0.926562413314)*x[2]**o+(0.612710762712)*x[2]
-        arg[2,4,0,0]=(0.419808446591)*x[0]**o+(0.132792190191)*x[0]+(-0.690603562736)*x[1]**o+(0.45137757885)*x[1]+(-0.262249041567)*x[2]**o+(-0.432995254783)*x[2]
-        arg[2,4,0,1]=(0.62413323935)*x[0]**o+(0.963559148607)*x[0]+(-0.879044261015)*x[1]**o+(-0.504981574957)*x[1]+(-0.575204029973)*x[2]**o+(0.066855791448)*x[2]
-        arg[2,4,1,0]=(0.321218662791)*x[0]**o+(0.975103526588)*x[0]+(0.783716185844)*x[1]**o+(-0.816368139389)*x[1]+(0.778169798128)*x[2]**o+(-0.527443068085)*x[2]
-        arg[2,4,1,1]=(-0.8801082648)*x[0]**o+(-0.0313845929272)*x[0]+(0.485262237838)*x[1]**o+(0.0778888535573)*x[1]+(-0.900948214929)*x[2]**o+(-0.98830300089)*x[2]
-        arg[2,4,2,0]=(-0.996395042226)*x[0]**o+(0.253635852642)*x[0]+(0.180965173659)*x[1]**o+(-0.488294662459)*x[1]+(-0.144583511741)*x[2]**o+(0.285854081388)*x[2]
-        arg[2,4,2,1]=(0.00988506292061)*x[0]**o+(-0.00192786315452)*x[0]+(0.720775470647)*x[1]**o+(-0.587673311506)*x[1]+(0.313836238675)*x[2]**o+(0.45975125457)*x[2]
-        arg[3,0,0,0]=(-0.822049489749)*x[0]**o+(-0.989589435175)*x[0]+(-0.0943830434118)*x[1]**o+(-0.789229900035)*x[1]+(0.311382619317)*x[2]**o+(-0.316646938685)*x[2]
-        arg[3,0,0,1]=(0.501517916677)*x[0]**o+(-0.704502365436)*x[0]+(0.913184728006)*x[1]**o+(-0.843712848791)*x[1]+(0.901479696878)*x[2]**o+(-0.713893336542)*x[2]
-        arg[3,0,1,0]=(0.0771592811086)*x[0]**o+(0.796038032206)*x[0]+(0.566256212871)*x[1]**o+(0.394136659986)*x[1]+(-0.794422065388)*x[2]**o+(0.662174992848)*x[2]
-        arg[3,0,1,1]=(0.180225115167)*x[0]**o+(0.366965867971)*x[0]+(-0.244015756153)*x[1]**o+(0.433571067335)*x[1]+(0.129075150185)*x[2]**o+(-0.216304414605)*x[2]
-        arg[3,0,2,0]=(0.100277967034)*x[0]**o+(-0.590583546786)*x[0]+(-0.595553697152)*x[1]**o+(0.923573252239)*x[1]+(0.578966663184)*x[2]**o+(-0.411082913097)*x[2]
-        arg[3,0,2,1]=(-0.575315696811)*x[0]**o+(0.608760285918)*x[0]+(-0.3592074605)*x[1]**o+(0.515119945308)*x[1]+(-0.4000138306)*x[2]**o+(0.477685324937)*x[2]
-        arg[3,1,0,0]=(0.0780014276919)*x[0]**o+(-0.0932830671471)*x[0]+(0.39477236642)*x[1]**o+(0.406673135556)*x[1]+(-0.235480707568)*x[2]**o+(-0.872302257144)*x[2]
-        arg[3,1,0,1]=(0.170573072646)*x[0]**o+(0.868146561326)*x[0]+(0.262136343896)*x[1]**o+(0.192343529912)*x[1]+(0.157400965693)*x[2]**o+(-0.932981619473)*x[2]
-        arg[3,1,1,0]=(0.891433179291)*x[0]**o+(-0.281396449997)*x[0]+(-0.0803173619772)*x[1]**o+(-0.378460054356)*x[1]+(-0.581578656014)*x[2]**o+(-0.65856067509)*x[2]
-        arg[3,1,1,1]=(0.343599956626)*x[0]**o+(-0.92063694125)*x[0]+(0.440698102072)*x[1]**o+(0.767124166388)*x[1]+(0.050964317543)*x[2]**o+(1.35605562239e-05)*x[2]
-        arg[3,1,2,0]=(-0.614268150987)*x[0]**o+(0.363806471556)*x[0]+(0.92193457905)*x[1]**o+(0.157919580642)*x[1]+(-0.955575321124)*x[2]**o+(-0.984808437666)*x[2]
-        arg[3,1,2,1]=(0.030099648966)*x[0]**o+(-0.375999369491)*x[0]+(-0.0992643926008)*x[1]**o+(0.109209161093)*x[1]+(-0.974043780088)*x[2]**o+(0.908049658745)*x[2]
-        arg[3,2,0,0]=(0.297771341106)*x[0]**o+(-0.637802228169)*x[0]+(0.398100441783)*x[1]**o+(-0.0643425181651)*x[1]+(0.662775339033)*x[2]**o+(0.744835182052)*x[2]
-        arg[3,2,0,1]=(0.312026420583)*x[0]**o+(0.865855052574)*x[0]+(0.0195001783165)*x[1]**o+(0.537899238473)*x[1]+(0.554893357481)*x[2]**o+(0.71555610145)*x[2]
-        arg[3,2,1,0]=(-0.199138146186)*x[0]**o+(0.827546489855)*x[0]+(-0.480965464736)*x[1]**o+(-0.473796093187)*x[1]+(0.880264675049)*x[2]**o+(0.544506670844)*x[2]
-        arg[3,2,1,1]=(0.773798005008)*x[0]**o+(0.744945241634)*x[0]+(0.548170564608)*x[1]**o+(-0.560503692823)*x[1]+(-0.435630215427)*x[2]**o+(0.080015730707)*x[2]
-        arg[3,2,2,0]=(0.36735714937)*x[0]**o+(-0.867071557873)*x[0]+(0.936135650431)*x[1]**o+(-0.432533600524)*x[1]+(-0.0224430204069)*x[2]**o+(0.218590302621)*x[2]
-        arg[3,2,2,1]=(0.932808382499)*x[0]**o+(-0.0970016713319)*x[0]+(0.458943467579)*x[1]**o+(-0.134338789898)*x[1]+(-0.426892557314)*x[2]**o+(0.627071826863)*x[2]
-        arg[3,3,0,0]=(-0.623804149075)*x[0]**o+(0.910423590172)*x[0]+(0.465938181097)*x[1]**o+(0.495479245391)*x[1]+(0.693745442185)*x[2]**o+(-0.437014226757)*x[2]
-        arg[3,3,0,1]=(0.598807017496)*x[0]**o+(-0.112361840211)*x[0]+(-0.550899685213)*x[1]**o+(-0.0478222019564)*x[1]+(-0.0110129517693)*x[2]**o+(-0.059534786374)*x[2]
-        arg[3,3,1,0]=(-0.561155633409)*x[0]**o+(-0.463563057636)*x[0]+(-0.170463996009)*x[1]**o+(-0.214509204942)*x[1]+(0.851200198666)*x[2]**o+(-0.721036329689)*x[2]
-        arg[3,3,1,1]=(0.608666240405)*x[0]**o+(0.814232455115)*x[0]+(-0.604645629689)*x[1]**o+(0.960976509673)*x[1]+(0.365807996219)*x[2]**o+(-0.87491909238)*x[2]
-        arg[3,3,2,0]=(0.120126988418)*x[0]**o+(-0.745687314825)*x[0]+(-0.332697826984)*x[1]**o+(-0.823683406516)*x[1]+(0.305444079613)*x[2]**o+(0.901972115441)*x[2]
-        arg[3,3,2,1]=(0.0470293848904)*x[0]**o+(-0.195496754814)*x[0]+(0.671870114105)*x[1]**o+(0.170273146371)*x[1]+(-0.851927986188)*x[2]**o+(0.772192863973)*x[2]
-        arg[3,4,0,0]=(-0.95392341727)*x[0]**o+(-0.665694215521)*x[0]+(-0.0247396499378)*x[1]**o+(0.441352857387)*x[1]+(0.767156547791)*x[2]**o+(-0.14696372018)*x[2]
-        arg[3,4,0,1]=(0.209761166815)*x[0]**o+(0.978934473425)*x[0]+(0.943806891053)*x[1]**o+(-0.756619917601)*x[1]+(0.635699949764)*x[2]**o+(-0.345248269568)*x[2]
-        arg[3,4,1,0]=(0.748020785785)*x[0]**o+(0.311104549542)*x[0]+(0.739127551248)*x[1]**o+(-0.635238575859)*x[1]+(0.623898875653)*x[2]**o+(0.343407392068)*x[2]
-        arg[3,4,1,1]=(-0.422500892471)*x[0]**o+(0.0688495013346)*x[0]+(-0.919653906232)*x[1]**o+(0.531036586396)*x[1]+(-0.22487910672)*x[2]**o+(-0.848225994541)*x[2]
-        arg[3,4,2,0]=(0.723965744673)*x[0]**o+(0.558602959224)*x[0]+(0.699539243308)*x[1]**o+(-0.597426541715)*x[1]+(-0.0128675070522)*x[2]**o+(-0.874796626242)*x[2]
-        arg[3,4,2,1]=(-0.962970021216)*x[0]**o+(0.532886481874)*x[0]+(-0.523159705965)*x[1]**o+(-0.82887407638)*x[1]+(0.874288116843)*x[2]**o+(0.520024515804)*x[2]
-        ref[0,0,0,0]=(0.507422888369)*x_ref[0]**o+(0.808798513305)*x_ref[0]+(0.51493073805)*x_ref[1]**o+(-0.928527686947)*x_ref[1]+(-0.788010447498)*x_ref[2]**o+(-0.378389833131)*x_ref[2]
-        ref[0,0,0,1]=(-0.475851243177)*x_ref[0]**o+(0.746578446988)*x_ref[0]+(0.504778622494)*x_ref[1]**o+(-0.677770398899)*x_ref[1]+(-0.862535648403)*x_ref[2]**o+(0.620414141691)*x_ref[2]
-        ref[0,0,1,0]=(-0.361726879582)*x_ref[0]**o+(0.554584127587)*x_ref[0]+(0.436610414772)*x_ref[1]**o+(-0.686534492717)*x_ref[1]+(0.757226061419)*x_ref[2]**o+(0.0948537725389)*x_ref[2]
-        ref[0,0,1,1]=(-0.362160696355)*x_ref[0]**o+(0.766524051703)*x_ref[0]+(0.209980857795)*x_ref[1]**o+(-0.478398061437)*x_ref[1]+(-0.410960179122)*x_ref[2]**o+(-0.213272138462)*x_ref[2]
-        ref[0,0,2,0]=(0.87154872554)*x_ref[0]**o+(-0.727915301904)*x_ref[0]+(0.683580698056)*x_ref[1]**o+(0.215052521277)*x_ref[1]+(0.267231507898)*x_ref[2]**o+(-0.0124189912449)*x_ref[2]
-        ref[0,0,2,1]=(0.631400944876)*x_ref[0]**o+(0.537293628606)*x_ref[0]+(0.944754350994)*x_ref[1]**o+(0.108068908012)*x_ref[1]+(0.890117096365)*x_ref[2]**o+(0.164706867235)*x_ref[2]
-        ref[0,1,0,0]=(-0.935871759207)*x_ref[0]**o+(0.350133758077)*x_ref[0]+(-0.966482181015)*x_ref[1]**o+(0.440902701528)*x_ref[1]+(-0.893329541322)*x_ref[2]**o+(0.350317827938)*x_ref[2]
-        ref[0,1,0,1]=(0.465305203601)*x_ref[0]**o+(0.711131797928)*x_ref[0]+(0.104091536498)*x_ref[1]**o+(0.484811628127)*x_ref[1]+(0.676878954516)*x_ref[2]**o+(-0.99327016995)*x_ref[2]
-        ref[0,1,1,0]=(-0.361189016151)*x_ref[0]**o+(0.962468573492)*x_ref[0]+(-0.158571122564)*x_ref[1]**o+(-0.293583660912)*x_ref[1]+(-0.713699173608)*x_ref[2]**o+(-0.507430163361)*x_ref[2]
-        ref[0,1,1,1]=(0.172564527054)*x_ref[0]**o+(0.273438145027)*x_ref[0]+(0.137378266239)*x_ref[1]**o+(-0.675788606841)*x_ref[1]+(-0.362143416121)*x_ref[2]**o+(0.0703897749775)*x_ref[2]
-        ref[0,1,2,0]=(-0.941374717271)*x_ref[0]**o+(0.289433165458)*x_ref[0]+(0.318615227028)*x_ref[1]**o+(0.524362568204)*x_ref[1]+(-0.612590305095)*x_ref[2]**o+(-0.117555538957)*x_ref[2]
-        ref[0,1,2,1]=(-0.442920825551)*x_ref[0]**o+(-0.454982146579)*x_ref[0]+(0.355353737589)*x_ref[1]**o+(-0.729623917004)*x_ref[1]+(-0.567220335937)*x_ref[2]**o+(0.977652639976)*x_ref[2]
-        ref[0,2,0,0]=(0.942485930373)*x_ref[0]**o+(-0.605823961033)*x_ref[0]+(-0.143465779338)*x_ref[1]**o+(0.327354308987)*x_ref[1]+(0.691900417542)*x_ref[2]**o+(-0.514165213849)*x_ref[2]
-        ref[0,2,0,1]=(0.018029272977)*x_ref[0]**o+(-0.209992705469)*x_ref[0]+(-0.224614727554)*x_ref[1]**o+(-0.862697462048)*x_ref[1]+(0.274791387928)*x_ref[2]**o+(-0.907445869506)*x_ref[2]
-        ref[0,2,1,0]=(0.862755248265)*x_ref[0]**o+(0.020831641939)*x_ref[0]+(0.496662599261)*x_ref[1]**o+(0.79318975953)*x_ref[1]+(0.0912166895541)*x_ref[2]**o+(0.556337610316)*x_ref[2]
-        ref[0,2,1,1]=(-0.09652997071)*x_ref[0]**o+(-0.954279421394)*x_ref[0]+(-0.601053524018)*x_ref[1]**o+(0.642528012068)*x_ref[1]+(0.295748113888)*x_ref[2]**o+(-0.318166346186)*x_ref[2]
-        ref[0,2,2,0]=(-0.914878854129)*x_ref[0]**o+(0.159201123642)*x_ref[0]+(0.589819056368)*x_ref[1]**o+(-0.715763226823)*x_ref[1]+(-0.444572583567)*x_ref[2]**o+(-0.487866651367)*x_ref[2]
-        ref[0,2,2,1]=(-0.71271969175)*x_ref[0]**o+(0.454616308594)*x_ref[0]+(0.510270095021)*x_ref[1]**o+(-0.0385822967955)*x_ref[1]+(-0.519736540313)*x_ref[2]**o+(0.0556733091556)*x_ref[2]
-        ref[0,3,0,0]=(0.355768034846)*x_ref[0]**o+(0.152240594627)*x_ref[0]+(-0.81081131843)*x_ref[1]**o+(-0.913373483156)*x_ref[1]+(-0.319859744799)*x_ref[2]**o+(-0.306218435393)*x_ref[2]
-        ref[0,3,0,1]=(-0.656932063693)*x_ref[0]**o+(0.832886861783)*x_ref[0]+(-0.417112750683)*x_ref[1]**o+(-0.388190265957)*x_ref[1]+(0.246534947096)*x_ref[2]**o+(-0.896822839189)*x_ref[2]
-        ref[0,3,1,0]=(0.204713418891)*x_ref[0]**o+(-0.150097488817)*x_ref[0]+(0.806578426941)*x_ref[1]**o+(-0.590052708995)*x_ref[1]+(-0.758958608419)*x_ref[2]**o+(-0.221973528232)*x_ref[2]
-        ref[0,3,1,1]=(-0.854308184618)*x_ref[0]**o+(-0.292526203646)*x_ref[0]+(-0.662403504833)*x_ref[1]**o+(0.0955657982227)*x_ref[1]+(0.69471076173)*x_ref[2]**o+(0.384077309264)*x_ref[2]
-        ref[0,3,2,0]=(0.982057200864)*x_ref[0]**o+(-0.64758727704)*x_ref[0]+(0.15941493222)*x_ref[1]**o+(-0.17745437115)*x_ref[1]+(-0.72953252955)*x_ref[2]**o+(0.986979270802)*x_ref[2]
-        ref[0,3,2,1]=(0.764526698779)*x_ref[0]**o+(0.22809521115)*x_ref[0]+(-0.0762092087998)*x_ref[1]**o+(0.415212410471)*x_ref[1]+(-0.263638988463)*x_ref[2]**o+(-0.934669942336)*x_ref[2]
-        ref[0,4,0,0]=(0.0812656932707)*x_ref[0]**o+(0.0397235062518)*x_ref[0]+(-0.0496912823983)*x_ref[1]**o+(0.189891585189)*x_ref[1]+(0.243537823293)*x_ref[2]**o+(0.461256134208)*x_ref[2]
-        ref[0,4,0,1]=(0.167596358861)*x_ref[0]**o+(0.441650690481)*x_ref[0]+(0.638100632205)*x_ref[1]**o+(-0.69240615765)*x_ref[1]+(-0.501855369512)*x_ref[2]**o+(0.769465683782)*x_ref[2]
-        ref[0,4,1,0]=(-0.137149398927)*x_ref[0]**o+(-0.186548325285)*x_ref[0]+(-0.504656948352)*x_ref[1]**o+(0.228896656134)*x_ref[1]+(-0.472425358061)*x_ref[2]**o+(-0.0769834754996)*x_ref[2]
-        ref[0,4,1,1]=(0.311655648626)*x_ref[0]**o+(0.856513683959)*x_ref[0]+(0.47173626537)*x_ref[1]**o+(0.245497333467)*x_ref[1]+(-0.513727691305)*x_ref[2]**o+(-0.588614785682)*x_ref[2]
-        ref[0,4,2,0]=(-0.152907854625)*x_ref[0]**o+(-0.86229950575)*x_ref[0]+(-0.931356414564)*x_ref[1]**o+(-0.915667991864)*x_ref[1]+(0.322316118527)*x_ref[2]**o+(-0.987559462539)*x_ref[2]
-        ref[0,4,2,1]=(-0.705947769164)*x_ref[0]**o+(0.104081366627)*x_ref[0]+(-0.540454644392)*x_ref[1]**o+(0.404522880836)*x_ref[1]+(0.146464264141)*x_ref[2]**o+(0.586755030006)*x_ref[2]
-        ref[1,0,0,0]=(-0.466614768106)*x_ref[0]**o+(0.482681414943)*x_ref[0]+(-0.176553738108)*x_ref[1]**o+(-0.39162272813)*x_ref[1]+(0.74312023324)*x_ref[2]**o+(0.824538905894)*x_ref[2]
-        ref[1,0,0,1]=(-0.9351073631)*x_ref[0]**o+(-0.640226640449)*x_ref[0]+(0.966208762054)*x_ref[1]**o+(0.101792167944)*x_ref[1]+(-0.732983657038)*x_ref[2]**o+(-0.112313375937)*x_ref[2]
-        ref[1,0,1,0]=(-0.305403470434)*x_ref[0]**o+(-0.414397930347)*x_ref[0]+(0.356093254322)*x_ref[1]**o+(-0.52607560749)*x_ref[1]+(-0.70070674473)*x_ref[2]**o+(-0.0192901616015)*x_ref[2]
-        ref[1,0,1,1]=(0.450046989211)*x_ref[0]**o+(0.602770057268)*x_ref[0]+(0.0193812509113)*x_ref[1]**o+(-0.275615149191)*x_ref[1]+(0.0180468267836)*x_ref[2]**o+(-0.81388255113)*x_ref[2]
-        ref[1,0,2,0]=(0.913651483249)*x_ref[0]**o+(-0.92188313743)*x_ref[0]+(0.680007150195)*x_ref[1]**o+(-0.300145584708)*x_ref[1]+(-0.398883520002)*x_ref[2]**o+(-0.752781496463)*x_ref[2]
-        ref[1,0,2,1]=(-0.265749827845)*x_ref[0]**o+(0.594379728352)*x_ref[0]+(0.463409943587)*x_ref[1]**o+(-0.85840420426)*x_ref[1]+(-0.705963756674)*x_ref[2]**o+(0.251711112887)*x_ref[2]
-        ref[1,1,0,0]=(-0.28895690781)*x_ref[0]**o+(0.476461656166)*x_ref[0]+(0.0692567954597)*x_ref[1]**o+(0.88763437878)*x_ref[1]+(0.0872256197554)*x_ref[2]**o+(0.19467039694)*x_ref[2]
-        ref[1,1,0,1]=(0.741045418981)*x_ref[0]**o+(-0.726935151332)*x_ref[0]+(0.899418662131)*x_ref[1]**o+(0.27516497286)*x_ref[1]+(-0.715927474971)*x_ref[2]**o+(-0.709283098732)*x_ref[2]
-        ref[1,1,1,0]=(0.991407130174)*x_ref[0]**o+(-0.163484265852)*x_ref[0]+(-0.983254548659)*x_ref[1]**o+(0.0568443855477)*x_ref[1]+(0.309664644588)*x_ref[2]**o+(0.904334718845)*x_ref[2]
-        ref[1,1,1,1]=(0.237261672833)*x_ref[0]**o+(0.0861047746345)*x_ref[0]+(-0.494898018662)*x_ref[1]**o+(-0.433075334646)*x_ref[1]+(0.588597346505)*x_ref[2]**o+(-0.185559567553)*x_ref[2]
-        ref[1,1,2,0]=(-0.969384091709)*x_ref[0]**o+(-0.0229777223491)*x_ref[0]+(0.0945623059666)*x_ref[1]**o+(0.303543647034)*x_ref[1]+(0.659000135381)*x_ref[2]**o+(0.00873791711254)*x_ref[2]
-        ref[1,1,2,1]=(-0.421406731882)*x_ref[0]**o+(-0.5017394377)*x_ref[0]+(0.027747130694)*x_ref[1]**o+(0.327278873996)*x_ref[1]+(-0.754133439304)*x_ref[2]**o+(0.673525803845)*x_ref[2]
-        ref[1,2,0,0]=(-0.104620319685)*x_ref[0]**o+(-0.685602393278)*x_ref[0]+(0.972173717014)*x_ref[1]**o+(-0.440573017063)*x_ref[1]+(-0.709529395743)*x_ref[2]**o+(0.634170741457)*x_ref[2]
-        ref[1,2,0,1]=(-0.560386754264)*x_ref[0]**o+(0.570894623654)*x_ref[0]+(-0.455122833362)*x_ref[1]**o+(-0.00322505937935)*x_ref[1]+(0.959400336149)*x_ref[2]**o+(0.64014859954)*x_ref[2]
-        ref[1,2,1,0]=(0.100585233221)*x_ref[0]**o+(0.939532360957)*x_ref[0]+(-0.900301955112)*x_ref[1]**o+(-0.776375896786)*x_ref[1]+(-0.779373294746)*x_ref[2]**o+(0.546157461116)*x_ref[2]
-        ref[1,2,1,1]=(-0.680457315071)*x_ref[0]**o+(-0.0278844539208)*x_ref[0]+(-0.629673590044)*x_ref[1]**o+(0.813218376348)*x_ref[1]+(-0.449484131841)*x_ref[2]**o+(0.641682150048)*x_ref[2]
-        ref[1,2,2,0]=(0.60056954386)*x_ref[0]**o+(-0.763169434657)*x_ref[0]+(-0.672890915035)*x_ref[1]**o+(-0.368711154571)*x_ref[1]+(0.476810195318)*x_ref[2]**o+(-0.935071124382)*x_ref[2]
-        ref[1,2,2,1]=(0.994100148333)*x_ref[0]**o+(0.471647033381)*x_ref[0]+(0.341677296654)*x_ref[1]**o+(0.466442262068)*x_ref[1]+(-0.0634919249117)*x_ref[2]**o+(0.0637348830912)*x_ref[2]
-        ref[1,3,0,0]=(-0.120744286726)*x_ref[0]**o+(0.630378984537)*x_ref[0]+(0.0837817796507)*x_ref[1]**o+(-0.850115274881)*x_ref[1]+(0.574342626561)*x_ref[2]**o+(-0.705409915626)*x_ref[2]
-        ref[1,3,0,1]=(-0.51181061391)*x_ref[0]**o+(0.711479747616)*x_ref[0]+(-0.00800928076734)*x_ref[1]**o+(-0.703424580277)*x_ref[1]+(-0.925935026157)*x_ref[2]**o+(0.488175992827)*x_ref[2]
-        ref[1,3,1,0]=(0.531879615751)*x_ref[0]**o+(-0.214270521934)*x_ref[0]+(-0.432344726015)*x_ref[1]**o+(-0.107660826449)*x_ref[1]+(0.763406427398)*x_ref[2]**o+(-0.511000150429)*x_ref[2]
-        ref[1,3,1,1]=(-0.867467568206)*x_ref[0]**o+(-0.738425961596)*x_ref[0]+(-0.925337667706)*x_ref[1]**o+(-0.586227765107)*x_ref[1]+(0.909987211462)*x_ref[2]**o+(0.533347022582)*x_ref[2]
-        ref[1,3,2,0]=(-0.47713113862)*x_ref[0]**o+(-0.130876138883)*x_ref[0]+(-0.607996835981)*x_ref[1]**o+(-0.0306261551172)*x_ref[1]+(0.956207500475)*x_ref[2]**o+(-0.287731719382)*x_ref[2]
-        ref[1,3,2,1]=(0.179479486943)*x_ref[0]**o+(0.361266562479)*x_ref[0]+(0.374904472267)*x_ref[1]**o+(0.00788379106301)*x_ref[1]+(-0.34090684265)*x_ref[2]**o+(-0.190875910791)*x_ref[2]
-        ref[1,4,0,0]=(0.685464203729)*x_ref[0]**o+(0.0634561930987)*x_ref[0]+(-0.662534110385)*x_ref[1]**o+(0.383849898086)*x_ref[1]+(0.948230524205)*x_ref[2]**o+(-0.347042281976)*x_ref[2]
-        ref[1,4,0,1]=(-0.484499755322)*x_ref[0]**o+(-0.765655349243)*x_ref[0]+(0.805331514606)*x_ref[1]**o+(-0.0635912547496)*x_ref[1]+(-0.139457134772)*x_ref[2]**o+(0.227446734221)*x_ref[2]
-        ref[1,4,1,0]=(-0.913971229647)*x_ref[0]**o+(0.042531889985)*x_ref[0]+(0.143956410289)*x_ref[1]**o+(0.597990264168)*x_ref[1]+(-0.85926903006)*x_ref[2]**o+(0.205900361792)*x_ref[2]
-        ref[1,4,1,1]=(-0.955540264653)*x_ref[0]**o+(0.983439073814)*x_ref[0]+(0.246870351555)*x_ref[1]**o+(-0.610917180843)*x_ref[1]+(-0.0418134447092)*x_ref[2]**o+(-0.58407787472)*x_ref[2]
-        ref[1,4,2,0]=(0.787274711453)*x_ref[0]**o+(-0.899651339467)*x_ref[0]+(-0.62195254225)*x_ref[1]**o+(-0.516447289251)*x_ref[1]+(0.267082643601)*x_ref[2]**o+(0.0408186039688)*x_ref[2]
-        ref[1,4,2,1]=(-0.485773801895)*x_ref[0]**o+(0.663478067655)*x_ref[0]+(0.928973237869)*x_ref[1]**o+(0.353735145156)*x_ref[1]+(0.128409748978)*x_ref[2]**o+(-0.476479648592)*x_ref[2]
-        ref[2,0,0,0]=(0.491574821811)*x_ref[0]**o+(0.455303820526)*x_ref[0]+(-0.747773112075)*x_ref[1]**o+(-0.653255987137)*x_ref[1]+(-0.738293040346)*x_ref[2]**o+(0.948070477272)*x_ref[2]
-        ref[2,0,0,1]=(-0.697412782403)*x_ref[0]**o+(-0.738389544586)*x_ref[0]+(0.231728579935)*x_ref[1]**o+(0.248503931032)*x_ref[1]+(-0.561155590703)*x_ref[2]**o+(0.324682113147)*x_ref[2]
-        ref[2,0,1,0]=(-0.00507638382064)*x_ref[0]**o+(-0.983105866448)*x_ref[0]+(-0.253141627484)*x_ref[1]**o+(-0.0664178091069)*x_ref[1]+(0.194460220144)*x_ref[2]**o+(-0.174257469198)*x_ref[2]
-        ref[2,0,1,1]=(-0.644447560463)*x_ref[0]**o+(0.658703761133)*x_ref[0]+(-0.685392825104)*x_ref[1]**o+(-0.766295260796)*x_ref[1]+(-0.922004388493)*x_ref[2]**o+(-0.0745707720923)*x_ref[2]
-        ref[2,0,2,0]=(-0.69924009606)*x_ref[0]**o+(-0.398212597328)*x_ref[0]+(-0.364991550186)*x_ref[1]**o+(0.243474288977)*x_ref[1]+(0.129545162767)*x_ref[2]**o+(0.920611954845)*x_ref[2]
-        ref[2,0,2,1]=(-0.494476126875)*x_ref[0]**o+(-0.131503103148)*x_ref[0]+(-0.241670500874)*x_ref[1]**o+(0.40439125905)*x_ref[1]+(0.134166779399)*x_ref[2]**o+(-0.507385751809)*x_ref[2]
-        ref[2,1,0,0]=(0.301148115913)*x_ref[0]**o+(0.189635133395)*x_ref[0]+(0.744167404774)*x_ref[1]**o+(0.995754344203)*x_ref[1]+(-0.334760662218)*x_ref[2]**o+(-0.182462923741)*x_ref[2]
-        ref[2,1,0,1]=(0.523500022508)*x_ref[0]**o+(-0.257042661558)*x_ref[0]+(-0.940233100381)*x_ref[1]**o+(-0.202431731891)*x_ref[1]+(-0.653480190287)*x_ref[2]**o+(0.993156915081)*x_ref[2]
-        ref[2,1,1,0]=(-0.502452234661)*x_ref[0]**o+(-0.711581805303)*x_ref[0]+(0.696450091152)*x_ref[1]**o+(0.436746953802)*x_ref[1]+(0.695969418438)*x_ref[2]**o+(-0.671400022595)*x_ref[2]
-        ref[2,1,1,1]=(0.0705944125182)*x_ref[0]**o+(-0.865755834485)*x_ref[0]+(0.921555996641)*x_ref[1]**o+(-0.567855814858)*x_ref[1]+(-0.213455192388)*x_ref[2]**o+(0.820868399259)*x_ref[2]
-        ref[2,1,2,0]=(0.744232126707)*x_ref[0]**o+(0.336969176485)*x_ref[0]+(0.339407729288)*x_ref[1]**o+(-0.465154968917)*x_ref[1]+(0.389524167202)*x_ref[2]**o+(0.645394954477)*x_ref[2]
-        ref[2,1,2,1]=(-0.299085687516)*x_ref[0]**o+(0.220795864743)*x_ref[0]+(-0.19353913538)*x_ref[1]**o+(0.445131396297)*x_ref[1]+(-0.779605318636)*x_ref[2]**o+(-0.76707264371)*x_ref[2]
-        ref[2,2,0,0]=(-0.357585997171)*x_ref[0]**o+(-0.248795296406)*x_ref[0]+(0.0876364714478)*x_ref[1]**o+(-0.682833482179)*x_ref[1]+(0.497052575986)*x_ref[2]**o+(0.893378007889)*x_ref[2]
-        ref[2,2,0,1]=(0.38067999218)*x_ref[0]**o+(-0.857246232026)*x_ref[0]+(0.0785818284359)*x_ref[1]**o+(-0.473287028123)*x_ref[1]+(-0.763041318956)*x_ref[2]**o+(-0.1119710251)*x_ref[2]
-        ref[2,2,1,0]=(-0.0278856926369)*x_ref[0]**o+(0.435955626553)*x_ref[0]+(-0.676274741782)*x_ref[1]**o+(-0.719721825467)*x_ref[1]+(0.195007734703)*x_ref[2]**o+(0.504771278902)*x_ref[2]
-        ref[2,2,1,1]=(0.459547475772)*x_ref[0]**o+(-0.669041681613)*x_ref[0]+(-0.741957874364)*x_ref[1]**o+(0.604585337407)*x_ref[1]+(-0.886718742046)*x_ref[2]**o+(0.338113237761)*x_ref[2]
-        ref[2,2,2,0]=(0.392926733678)*x_ref[0]**o+(-0.923680589861)*x_ref[0]+(-0.425503328457)*x_ref[1]**o+(-0.0902669250117)*x_ref[1]+(-0.346726072703)*x_ref[2]**o+(0.541482976709)*x_ref[2]
-        ref[2,2,2,1]=(0.134867023616)*x_ref[0]**o+(0.478349607348)*x_ref[0]+(-0.334617836366)*x_ref[1]**o+(-0.74587411744)*x_ref[1]+(-0.880365937567)*x_ref[2]**o+(0.820743064452)*x_ref[2]
-        ref[2,3,0,0]=(0.081184173895)*x_ref[0]**o+(0.315011929905)*x_ref[0]+(-0.137083926616)*x_ref[1]**o+(0.103926223299)*x_ref[1]+(0.363270989968)*x_ref[2]**o+(-0.454075563606)*x_ref[2]
-        ref[2,3,0,1]=(0.457730701321)*x_ref[0]**o+(0.922345625691)*x_ref[0]+(-0.412933933474)*x_ref[1]**o+(-0.546359655103)*x_ref[1]+(0.719101029933)*x_ref[2]**o+(-0.790522859322)*x_ref[2]
-        ref[2,3,1,0]=(-0.811816419841)*x_ref[0]**o+(0.0379298408788)*x_ref[0]+(-0.852643125131)*x_ref[1]**o+(0.76881274254)*x_ref[1]+(0.75214553496)*x_ref[2]**o+(0.800382814403)*x_ref[2]
-        ref[2,3,1,1]=(0.524802143618)*x_ref[0]**o+(-0.717457078371)*x_ref[0]+(0.389026887965)*x_ref[1]**o+(-0.231912558721)*x_ref[1]+(-0.394705562333)*x_ref[2]**o+(-0.794723802655)*x_ref[2]
-        ref[2,3,2,0]=(-0.232215520303)*x_ref[0]**o+(0.994932250617)*x_ref[0]+(-0.760425274222)*x_ref[1]**o+(0.0910727760744)*x_ref[1]+(0.621642024132)*x_ref[2]**o+(0.263978719304)*x_ref[2]
-        ref[2,3,2,1]=(0.515269404424)*x_ref[0]**o+(-0.998266958288)*x_ref[0]+(-0.485078033534)*x_ref[1]**o+(-0.960043247553)*x_ref[1]+(-0.926562413314)*x_ref[2]**o+(0.612710762712)*x_ref[2]
-        ref[2,4,0,0]=(0.419808446591)*x_ref[0]**o+(0.132792190191)*x_ref[0]+(-0.690603562736)*x_ref[1]**o+(0.45137757885)*x_ref[1]+(-0.262249041567)*x_ref[2]**o+(-0.432995254783)*x_ref[2]
-        ref[2,4,0,1]=(0.62413323935)*x_ref[0]**o+(0.963559148607)*x_ref[0]+(-0.879044261015)*x_ref[1]**o+(-0.504981574957)*x_ref[1]+(-0.575204029973)*x_ref[2]**o+(0.066855791448)*x_ref[2]
-        ref[2,4,1,0]=(0.321218662791)*x_ref[0]**o+(0.975103526588)*x_ref[0]+(0.783716185844)*x_ref[1]**o+(-0.816368139389)*x_ref[1]+(0.778169798128)*x_ref[2]**o+(-0.527443068085)*x_ref[2]
-        ref[2,4,1,1]=(-0.8801082648)*x_ref[0]**o+(-0.0313845929272)*x_ref[0]+(0.485262237838)*x_ref[1]**o+(0.0778888535573)*x_ref[1]+(-0.900948214929)*x_ref[2]**o+(-0.98830300089)*x_ref[2]
-        ref[2,4,2,0]=(-0.996395042226)*x_ref[0]**o+(0.253635852642)*x_ref[0]+(0.180965173659)*x_ref[1]**o+(-0.488294662459)*x_ref[1]+(-0.144583511741)*x_ref[2]**o+(0.285854081388)*x_ref[2]
-        ref[2,4,2,1]=(0.00988506292061)*x_ref[0]**o+(-0.00192786315452)*x_ref[0]+(0.720775470647)*x_ref[1]**o+(-0.587673311506)*x_ref[1]+(0.313836238675)*x_ref[2]**o+(0.45975125457)*x_ref[2]
-        ref[3,0,0,0]=(-0.822049489749)*x_ref[0]**o+(-0.989589435175)*x_ref[0]+(-0.0943830434118)*x_ref[1]**o+(-0.789229900035)*x_ref[1]+(0.311382619317)*x_ref[2]**o+(-0.316646938685)*x_ref[2]
-        ref[3,0,0,1]=(0.501517916677)*x_ref[0]**o+(-0.704502365436)*x_ref[0]+(0.913184728006)*x_ref[1]**o+(-0.843712848791)*x_ref[1]+(0.901479696878)*x_ref[2]**o+(-0.713893336542)*x_ref[2]
-        ref[3,0,1,0]=(0.0771592811086)*x_ref[0]**o+(0.796038032206)*x_ref[0]+(0.566256212871)*x_ref[1]**o+(0.394136659986)*x_ref[1]+(-0.794422065388)*x_ref[2]**o+(0.662174992848)*x_ref[2]
-        ref[3,0,1,1]=(0.180225115167)*x_ref[0]**o+(0.366965867971)*x_ref[0]+(-0.244015756153)*x_ref[1]**o+(0.433571067335)*x_ref[1]+(0.129075150185)*x_ref[2]**o+(-0.216304414605)*x_ref[2]
-        ref[3,0,2,0]=(0.100277967034)*x_ref[0]**o+(-0.590583546786)*x_ref[0]+(-0.595553697152)*x_ref[1]**o+(0.923573252239)*x_ref[1]+(0.578966663184)*x_ref[2]**o+(-0.411082913097)*x_ref[2]
-        ref[3,0,2,1]=(-0.575315696811)*x_ref[0]**o+(0.608760285918)*x_ref[0]+(-0.3592074605)*x_ref[1]**o+(0.515119945308)*x_ref[1]+(-0.4000138306)*x_ref[2]**o+(0.477685324937)*x_ref[2]
-        ref[3,1,0,0]=(0.0780014276919)*x_ref[0]**o+(-0.0932830671471)*x_ref[0]+(0.39477236642)*x_ref[1]**o+(0.406673135556)*x_ref[1]+(-0.235480707568)*x_ref[2]**o+(-0.872302257144)*x_ref[2]
-        ref[3,1,0,1]=(0.170573072646)*x_ref[0]**o+(0.868146561326)*x_ref[0]+(0.262136343896)*x_ref[1]**o+(0.192343529912)*x_ref[1]+(0.157400965693)*x_ref[2]**o+(-0.932981619473)*x_ref[2]
-        ref[3,1,1,0]=(0.891433179291)*x_ref[0]**o+(-0.281396449997)*x_ref[0]+(-0.0803173619772)*x_ref[1]**o+(-0.378460054356)*x_ref[1]+(-0.581578656014)*x_ref[2]**o+(-0.65856067509)*x_ref[2]
-        ref[3,1,1,1]=(0.343599956626)*x_ref[0]**o+(-0.92063694125)*x_ref[0]+(0.440698102072)*x_ref[1]**o+(0.767124166388)*x_ref[1]+(0.050964317543)*x_ref[2]**o+(1.35605562239e-05)*x_ref[2]
-        ref[3,1,2,0]=(-0.614268150987)*x_ref[0]**o+(0.363806471556)*x_ref[0]+(0.92193457905)*x_ref[1]**o+(0.157919580642)*x_ref[1]+(-0.955575321124)*x_ref[2]**o+(-0.984808437666)*x_ref[2]
-        ref[3,1,2,1]=(0.030099648966)*x_ref[0]**o+(-0.375999369491)*x_ref[0]+(-0.0992643926008)*x_ref[1]**o+(0.109209161093)*x_ref[1]+(-0.974043780088)*x_ref[2]**o+(0.908049658745)*x_ref[2]
-        ref[3,2,0,0]=(0.297771341106)*x_ref[0]**o+(-0.637802228169)*x_ref[0]+(0.398100441783)*x_ref[1]**o+(-0.0643425181651)*x_ref[1]+(0.662775339033)*x_ref[2]**o+(0.744835182052)*x_ref[2]
-        ref[3,2,0,1]=(0.312026420583)*x_ref[0]**o+(0.865855052574)*x_ref[0]+(0.0195001783165)*x_ref[1]**o+(0.537899238473)*x_ref[1]+(0.554893357481)*x_ref[2]**o+(0.71555610145)*x_ref[2]
-        ref[3,2,1,0]=(-0.199138146186)*x_ref[0]**o+(0.827546489855)*x_ref[0]+(-0.480965464736)*x_ref[1]**o+(-0.473796093187)*x_ref[1]+(0.880264675049)*x_ref[2]**o+(0.544506670844)*x_ref[2]
-        ref[3,2,1,1]=(0.773798005008)*x_ref[0]**o+(0.744945241634)*x_ref[0]+(0.548170564608)*x_ref[1]**o+(-0.560503692823)*x_ref[1]+(-0.435630215427)*x_ref[2]**o+(0.080015730707)*x_ref[2]
-        ref[3,2,2,0]=(0.36735714937)*x_ref[0]**o+(-0.867071557873)*x_ref[0]+(0.936135650431)*x_ref[1]**o+(-0.432533600524)*x_ref[1]+(-0.0224430204069)*x_ref[2]**o+(0.218590302621)*x_ref[2]
-        ref[3,2,2,1]=(0.932808382499)*x_ref[0]**o+(-0.0970016713319)*x_ref[0]+(0.458943467579)*x_ref[1]**o+(-0.134338789898)*x_ref[1]+(-0.426892557314)*x_ref[2]**o+(0.627071826863)*x_ref[2]
-        ref[3,3,0,0]=(-0.623804149075)*x_ref[0]**o+(0.910423590172)*x_ref[0]+(0.465938181097)*x_ref[1]**o+(0.495479245391)*x_ref[1]+(0.693745442185)*x_ref[2]**o+(-0.437014226757)*x_ref[2]
-        ref[3,3,0,1]=(0.598807017496)*x_ref[0]**o+(-0.112361840211)*x_ref[0]+(-0.550899685213)*x_ref[1]**o+(-0.0478222019564)*x_ref[1]+(-0.0110129517693)*x_ref[2]**o+(-0.059534786374)*x_ref[2]
-        ref[3,3,1,0]=(-0.561155633409)*x_ref[0]**o+(-0.463563057636)*x_ref[0]+(-0.170463996009)*x_ref[1]**o+(-0.214509204942)*x_ref[1]+(0.851200198666)*x_ref[2]**o+(-0.721036329689)*x_ref[2]
-        ref[3,3,1,1]=(0.608666240405)*x_ref[0]**o+(0.814232455115)*x_ref[0]+(-0.604645629689)*x_ref[1]**o+(0.960976509673)*x_ref[1]+(0.365807996219)*x_ref[2]**o+(-0.87491909238)*x_ref[2]
-        ref[3,3,2,0]=(0.120126988418)*x_ref[0]**o+(-0.745687314825)*x_ref[0]+(-0.332697826984)*x_ref[1]**o+(-0.823683406516)*x_ref[1]+(0.305444079613)*x_ref[2]**o+(0.901972115441)*x_ref[2]
-        ref[3,3,2,1]=(0.0470293848904)*x_ref[0]**o+(-0.195496754814)*x_ref[0]+(0.671870114105)*x_ref[1]**o+(0.170273146371)*x_ref[1]+(-0.851927986188)*x_ref[2]**o+(0.772192863973)*x_ref[2]
-        ref[3,4,0,0]=(-0.95392341727)*x_ref[0]**o+(-0.665694215521)*x_ref[0]+(-0.0247396499378)*x_ref[1]**o+(0.441352857387)*x_ref[1]+(0.767156547791)*x_ref[2]**o+(-0.14696372018)*x_ref[2]
-        ref[3,4,0,1]=(0.209761166815)*x_ref[0]**o+(0.978934473425)*x_ref[0]+(0.943806891053)*x_ref[1]**o+(-0.756619917601)*x_ref[1]+(0.635699949764)*x_ref[2]**o+(-0.345248269568)*x_ref[2]
-        ref[3,4,1,0]=(0.748020785785)*x_ref[0]**o+(0.311104549542)*x_ref[0]+(0.739127551248)*x_ref[1]**o+(-0.635238575859)*x_ref[1]+(0.623898875653)*x_ref[2]**o+(0.343407392068)*x_ref[2]
-        ref[3,4,1,1]=(-0.422500892471)*x_ref[0]**o+(0.0688495013346)*x_ref[0]+(-0.919653906232)*x_ref[1]**o+(0.531036586396)*x_ref[1]+(-0.22487910672)*x_ref[2]**o+(-0.848225994541)*x_ref[2]
-        ref[3,4,2,0]=(0.723965744673)*x_ref[0]**o+(0.558602959224)*x_ref[0]+(0.699539243308)*x_ref[1]**o+(-0.597426541715)*x_ref[1]+(-0.0128675070522)*x_ref[2]**o+(-0.874796626242)*x_ref[2]
-        ref[3,4,2,1]=(-0.962970021216)*x_ref[0]**o+(0.532886481874)*x_ref[0]+(-0.523159705965)*x_ref[1]**o+(-0.82887407638)*x_ref[1]+(0.874288116843)*x_ref[2]**o+(0.520024515804)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.0603413935246)*x[0]**o+(-0.70184894912)*x[0]+(-0.206341392562)*x[1]**o+(0.892585857385)*x[1]
-        ref=(-0.0603413935246)*x_ref[0]**o+(-0.70184894912)*x_ref[0]+(-0.206341392562)*x_ref[1]**o+(0.892585857385)*x_ref[1]
-      else:
-        arg=(0.120763612793)*x[0]**o+(-0.298506957699)*x[0]+(0.0620633729217)*x[1]**o+(0.807000465544)*x[1]+(-0.564443939995)*x[2]**o+(0.820783035273)*x[2]
-        ref=(0.120763612793)*x_ref[0]**o+(-0.298506957699)*x_ref[0]+(0.0620633729217)*x_ref[1]**o+(0.807000465544)*x_ref[1]+(-0.564443939995)*x_ref[2]**o+(0.820783035273)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-0.69193390973)*x[0]**o+(-0.768888031033)*x[0]+(-0.813493496124)*x[1]**o+(-0.767059499773)*x[1]
-        arg[1]=(0.111870073987)*x[0]**o+(-0.196406293238)*x[0]+(-0.10683601134)*x[1]**o+(0.69972228684)*x[1]
-        ref[0]=(-0.69193390973)*x_ref[0]**o+(-0.768888031033)*x_ref[0]+(-0.813493496124)*x_ref[1]**o+(-0.767059499773)*x_ref[1]
-        ref[1]=(0.111870073987)*x_ref[0]**o+(-0.196406293238)*x_ref[0]+(-0.10683601134)*x_ref[1]**o+(0.69972228684)*x_ref[1]
-      else:
-        arg[0]=(-0.20606732369)*x[0]**o+(0.773916734719)*x[0]+(-0.915594370888)*x[1]**o+(-0.684202475504)*x[1]+(0.161644377631)*x[2]**o+(-0.834568364942)*x[2]
-        arg[1]=(-0.475848931399)*x[0]**o+(-0.967325026091)*x[0]+(0.371032251427)*x[1]**o+(0.976933923378)*x[1]+(0.326121409381)*x[2]**o+(0.880666151318)*x[2]
-        ref[0]=(-0.20606732369)*x_ref[0]**o+(0.773916734719)*x_ref[0]+(-0.915594370888)*x_ref[1]**o+(-0.684202475504)*x_ref[1]+(0.161644377631)*x_ref[2]**o+(-0.834568364942)*x_ref[2]
-        ref[1]=(-0.475848931399)*x_ref[0]**o+(-0.967325026091)*x_ref[0]+(0.371032251427)*x_ref[1]**o+(0.976933923378)*x_ref[1]+(0.326121409381)*x_ref[2]**o+(0.880666151318)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.664616598004)*x[0]**o+(0.159791014359)*x[0]+(-0.3747223278)*x[1]**o+(0.302802720584)*x[1]
-        arg[0,1]=(-0.334311194265)*x[0]**o+(0.865855840771)*x[0]+(-0.0184933229609)*x[1]**o+(0.589277746683)*x[1]
-        arg[0,2]=(0.685266031246)*x[0]**o+(0.846357835994)*x[0]+(0.233422031025)*x[1]**o+(0.391225449794)*x[1]
-        arg[0,3]=(-0.889412463645)*x[0]**o+(0.336985584587)*x[0]+(-0.311629085429)*x[1]**o+(-0.574756125055)*x[1]
-        arg[0,4]=(-0.786434255596)*x[0]**o+(0.897529643329)*x[0]+(0.112631455142)*x[1]**o+(0.501957817255)*x[1]
-        arg[1,0]=(-0.841995669352)*x[0]**o+(-0.372241861224)*x[0]+(0.669429619157)*x[1]**o+(0.913007793035)*x[1]
-        arg[1,1]=(-0.965486931849)*x[0]**o+(-0.163330142621)*x[0]+(0.302996628649)*x[1]**o+(-0.214176383433)*x[1]
-        arg[1,2]=(-0.717841677595)*x[0]**o+(-0.560453345617)*x[0]+(0.885221610478)*x[1]**o+(0.0925933897521)*x[1]
-        arg[1,3]=(0.827380987548)*x[0]**o+(-0.185460343082)*x[0]+(-0.618848726331)*x[1]**o+(-0.25427152262)*x[1]
-        arg[1,4]=(-0.232848766689)*x[0]**o+(-0.812427149527)*x[0]+(-0.6328125174)*x[1]**o+(0.377849173478)*x[1]
-        arg[2,0]=(0.725568000689)*x[0]**o+(-0.0119648722611)*x[0]+(0.0551179058345)*x[1]**o+(-0.313601095535)*x[1]
-        arg[2,1]=(-0.371331280463)*x[0]**o+(0.164812693414)*x[0]+(0.140689113041)*x[1]**o+(0.866863122864)*x[1]
-        arg[2,2]=(0.445443472696)*x[0]**o+(0.885420986537)*x[0]+(0.434326737693)*x[1]**o+(0.013677800309)*x[1]
-        arg[2,3]=(0.186221146816)*x[0]**o+(0.919506151782)*x[0]+(-0.163957717851)*x[1]**o+(-0.533309231769)*x[1]
-        arg[2,4]=(0.137164729623)*x[0]**o+(0.561715777859)*x[0]+(0.33724606372)*x[1]**o+(-0.554531877504)*x[1]
-        arg[3,0]=(-0.0632399630146)*x[0]**o+(0.712014652956)*x[0]+(0.107109261787)*x[1]**o+(0.228670262705)*x[1]
-        arg[3,1]=(-0.973793135038)*x[0]**o+(0.923465546039)*x[0]+(0.189825544105)*x[1]**o+(-0.33784496447)*x[1]
-        arg[3,2]=(-0.12686258826)*x[0]**o+(-0.582653698893)*x[0]+(0.860503162549)*x[1]**o+(-0.477305983221)*x[1]
-        arg[3,3]=(-0.407988306429)*x[0]**o+(-0.174396602789)*x[0]+(0.646815890222)*x[1]**o+(-0.450974163079)*x[1]
-        arg[3,4]=(0.162458379489)*x[0]**o+(-0.0569354582388)*x[0]+(0.0463216806125)*x[1]**o+(-0.381777259635)*x[1]
-        ref[0,0]=(-0.664616598004)*x_ref[0]**o+(0.159791014359)*x_ref[0]+(-0.3747223278)*x_ref[1]**o+(0.302802720584)*x_ref[1]
-        ref[0,1]=(-0.334311194265)*x_ref[0]**o+(0.865855840771)*x_ref[0]+(-0.0184933229609)*x_ref[1]**o+(0.589277746683)*x_ref[1]
-        ref[0,2]=(0.685266031246)*x_ref[0]**o+(0.846357835994)*x_ref[0]+(0.233422031025)*x_ref[1]**o+(0.391225449794)*x_ref[1]
-        ref[0,3]=(-0.889412463645)*x_ref[0]**o+(0.336985584587)*x_ref[0]+(-0.311629085429)*x_ref[1]**o+(-0.574756125055)*x_ref[1]
-        ref[0,4]=(-0.786434255596)*x_ref[0]**o+(0.897529643329)*x_ref[0]+(0.112631455142)*x_ref[1]**o+(0.501957817255)*x_ref[1]
-        ref[1,0]=(-0.841995669352)*x_ref[0]**o+(-0.372241861224)*x_ref[0]+(0.669429619157)*x_ref[1]**o+(0.913007793035)*x_ref[1]
-        ref[1,1]=(-0.965486931849)*x_ref[0]**o+(-0.163330142621)*x_ref[0]+(0.302996628649)*x_ref[1]**o+(-0.214176383433)*x_ref[1]
-        ref[1,2]=(-0.717841677595)*x_ref[0]**o+(-0.560453345617)*x_ref[0]+(0.885221610478)*x_ref[1]**o+(0.0925933897521)*x_ref[1]
-        ref[1,3]=(0.827380987548)*x_ref[0]**o+(-0.185460343082)*x_ref[0]+(-0.618848726331)*x_ref[1]**o+(-0.25427152262)*x_ref[1]
-        ref[1,4]=(-0.232848766689)*x_ref[0]**o+(-0.812427149527)*x_ref[0]+(-0.6328125174)*x_ref[1]**o+(0.377849173478)*x_ref[1]
-        ref[2,0]=(0.725568000689)*x_ref[0]**o+(-0.0119648722611)*x_ref[0]+(0.0551179058345)*x_ref[1]**o+(-0.313601095535)*x_ref[1]
-        ref[2,1]=(-0.371331280463)*x_ref[0]**o+(0.164812693414)*x_ref[0]+(0.140689113041)*x_ref[1]**o+(0.866863122864)*x_ref[1]
-        ref[2,2]=(0.445443472696)*x_ref[0]**o+(0.885420986537)*x_ref[0]+(0.434326737693)*x_ref[1]**o+(0.013677800309)*x_ref[1]
-        ref[2,3]=(0.186221146816)*x_ref[0]**o+(0.919506151782)*x_ref[0]+(-0.163957717851)*x_ref[1]**o+(-0.533309231769)*x_ref[1]
-        ref[2,4]=(0.137164729623)*x_ref[0]**o+(0.561715777859)*x_ref[0]+(0.33724606372)*x_ref[1]**o+(-0.554531877504)*x_ref[1]
-        ref[3,0]=(-0.0632399630146)*x_ref[0]**o+(0.712014652956)*x_ref[0]+(0.107109261787)*x_ref[1]**o+(0.228670262705)*x_ref[1]
-        ref[3,1]=(-0.973793135038)*x_ref[0]**o+(0.923465546039)*x_ref[0]+(0.189825544105)*x_ref[1]**o+(-0.33784496447)*x_ref[1]
-        ref[3,2]=(-0.12686258826)*x_ref[0]**o+(-0.582653698893)*x_ref[0]+(0.860503162549)*x_ref[1]**o+(-0.477305983221)*x_ref[1]
-        ref[3,3]=(-0.407988306429)*x_ref[0]**o+(-0.174396602789)*x_ref[0]+(0.646815890222)*x_ref[1]**o+(-0.450974163079)*x_ref[1]
-        ref[3,4]=(0.162458379489)*x_ref[0]**o+(-0.0569354582388)*x_ref[0]+(0.0463216806125)*x_ref[1]**o+(-0.381777259635)*x_ref[1]
-      else:
-        arg[0,0]=(0.865079887449)*x[0]**o+(-0.833757275547)*x[0]+(-0.967658088049)*x[1]**o+(-0.168314490396)*x[1]+(0.151618201772)*x[2]**o+(-0.251062354355)*x[2]
-        arg[0,1]=(0.110207997589)*x[0]**o+(-0.510994295641)*x[0]+(0.855215902178)*x[1]**o+(0.941502315255)*x[1]+(-0.794874945971)*x[2]**o+(-0.309190709938)*x[2]
-        arg[0,2]=(0.71701217173)*x[0]**o+(-0.221333357165)*x[0]+(0.689963224026)*x[1]**o+(0.221517236085)*x[1]+(-0.52608140393)*x[2]**o+(0.371488496481)*x[2]
-        arg[0,3]=(0.618194041415)*x[0]**o+(0.454387091678)*x[0]+(-0.707329629946)*x[1]**o+(0.41972715681)*x[1]+(0.0180789814415)*x[2]**o+(-0.176487980225)*x[2]
-        arg[0,4]=(0.329275243989)*x[0]**o+(-0.679005993002)*x[0]+(-0.261017436418)*x[1]**o+(0.151780687062)*x[1]+(-0.480936330475)*x[2]**o+(-0.697077234587)*x[2]
-        arg[1,0]=(0.720913763906)*x[0]**o+(0.283486705277)*x[0]+(0.498289077088)*x[1]**o+(0.657543220863)*x[1]+(-0.666293219679)*x[2]**o+(0.901456618353)*x[2]
-        arg[1,1]=(-0.984526350563)*x[0]**o+(0.677118292603)*x[0]+(0.614707818107)*x[1]**o+(0.272173514554)*x[1]+(0.41492971828)*x[2]**o+(0.274511869871)*x[2]
-        arg[1,2]=(0.322224985373)*x[0]**o+(0.567272204545)*x[0]+(-0.437313912332)*x[1]**o+(0.847486025896)*x[1]+(0.769434908781)*x[2]**o+(0.325917607497)*x[2]
-        arg[1,3]=(0.709357837264)*x[0]**o+(0.927425103914)*x[0]+(-0.622876388501)*x[1]**o+(-0.296141603555)*x[1]+(-0.038448878923)*x[2]**o+(-0.320692580169)*x[2]
-        arg[1,4]=(-0.27890333885)*x[0]**o+(0.803346569394)*x[0]+(0.00665934218255)*x[1]**o+(-0.89057979428)*x[1]+(-0.727135553706)*x[2]**o+(0.892946022497)*x[2]
-        arg[2,0]=(0.579951394388)*x[0]**o+(0.0406506913385)*x[0]+(0.363944368798)*x[1]**o+(0.582732756951)*x[1]+(0.542548838027)*x[2]**o+(0.365742797343)*x[2]
-        arg[2,1]=(0.253260777874)*x[0]**o+(-0.69077350875)*x[0]+(0.458080700492)*x[1]**o+(-0.79224006672)*x[1]+(-0.504865679524)*x[2]**o+(0.681425632809)*x[2]
-        arg[2,2]=(0.600427718261)*x[0]**o+(0.91761242151)*x[0]+(0.602316047463)*x[1]**o+(0.890383614185)*x[1]+(-0.386691039525)*x[2]**o+(0.688659949109)*x[2]
-        arg[2,3]=(-0.181338810914)*x[0]**o+(0.933744241999)*x[0]+(0.0212774093137)*x[1]**o+(0.284972854884)*x[1]+(-0.150219922419)*x[2]**o+(0.0878011402107)*x[2]
-        arg[2,4]=(-0.848985879538)*x[0]**o+(0.298962025531)*x[0]+(0.593300576179)*x[1]**o+(0.301509253541)*x[1]+(0.971171084219)*x[2]**o+(-0.973386482857)*x[2]
-        arg[3,0]=(-0.735608389534)*x[0]**o+(0.44902436426)*x[0]+(0.0536456095512)*x[1]**o+(0.208969935548)*x[1]+(-0.787609300211)*x[2]**o+(0.726024812477)*x[2]
-        arg[3,1]=(0.200882171943)*x[0]**o+(-0.644461780745)*x[0]+(-0.0995704510264)*x[1]**o+(-0.857730241944)*x[1]+(-0.372302969302)*x[2]**o+(-0.171367954739)*x[2]
-        arg[3,2]=(-0.673606332627)*x[0]**o+(-0.828183678442)*x[0]+(-0.236856099365)*x[1]**o+(-0.266339053288)*x[1]+(-0.972034740204)*x[2]**o+(-0.33151750348)*x[2]
-        arg[3,3]=(-0.312470720017)*x[0]**o+(-0.657433718629)*x[0]+(-0.984940036612)*x[1]**o+(0.197707053145)*x[1]+(0.512009064643)*x[2]**o+(0.855601033248)*x[2]
-        arg[3,4]=(-0.674854508228)*x[0]**o+(-0.394035682831)*x[0]+(-0.749446232511)*x[1]**o+(0.866992763518)*x[1]+(-0.945837361158)*x[2]**o+(0.593490782481)*x[2]
-        ref[0,0]=(0.865079887449)*x_ref[0]**o+(-0.833757275547)*x_ref[0]+(-0.967658088049)*x_ref[1]**o+(-0.168314490396)*x_ref[1]+(0.151618201772)*x_ref[2]**o+(-0.251062354355)*x_ref[2]
-        ref[0,1]=(0.110207997589)*x_ref[0]**o+(-0.510994295641)*x_ref[0]+(0.855215902178)*x_ref[1]**o+(0.941502315255)*x_ref[1]+(-0.794874945971)*x_ref[2]**o+(-0.309190709938)*x_ref[2]
-        ref[0,2]=(0.71701217173)*x_ref[0]**o+(-0.221333357165)*x_ref[0]+(0.689963224026)*x_ref[1]**o+(0.221517236085)*x_ref[1]+(-0.52608140393)*x_ref[2]**o+(0.371488496481)*x_ref[2]
-        ref[0,3]=(0.618194041415)*x_ref[0]**o+(0.454387091678)*x_ref[0]+(-0.707329629946)*x_ref[1]**o+(0.41972715681)*x_ref[1]+(0.0180789814415)*x_ref[2]**o+(-0.176487980225)*x_ref[2]
-        ref[0,4]=(0.329275243989)*x_ref[0]**o+(-0.679005993002)*x_ref[0]+(-0.261017436418)*x_ref[1]**o+(0.151780687062)*x_ref[1]+(-0.480936330475)*x_ref[2]**o+(-0.697077234587)*x_ref[2]
-        ref[1,0]=(0.720913763906)*x_ref[0]**o+(0.283486705277)*x_ref[0]+(0.498289077088)*x_ref[1]**o+(0.657543220863)*x_ref[1]+(-0.666293219679)*x_ref[2]**o+(0.901456618353)*x_ref[2]
-        ref[1,1]=(-0.984526350563)*x_ref[0]**o+(0.677118292603)*x_ref[0]+(0.614707818107)*x_ref[1]**o+(0.272173514554)*x_ref[1]+(0.41492971828)*x_ref[2]**o+(0.274511869871)*x_ref[2]
-        ref[1,2]=(0.322224985373)*x_ref[0]**o+(0.567272204545)*x_ref[0]+(-0.437313912332)*x_ref[1]**o+(0.847486025896)*x_ref[1]+(0.769434908781)*x_ref[2]**o+(0.325917607497)*x_ref[2]
-        ref[1,3]=(0.709357837264)*x_ref[0]**o+(0.927425103914)*x_ref[0]+(-0.622876388501)*x_ref[1]**o+(-0.296141603555)*x_ref[1]+(-0.038448878923)*x_ref[2]**o+(-0.320692580169)*x_ref[2]
-        ref[1,4]=(-0.27890333885)*x_ref[0]**o+(0.803346569394)*x_ref[0]+(0.00665934218255)*x_ref[1]**o+(-0.89057979428)*x_ref[1]+(-0.727135553706)*x_ref[2]**o+(0.892946022497)*x_ref[2]
-        ref[2,0]=(0.579951394388)*x_ref[0]**o+(0.0406506913385)*x_ref[0]+(0.363944368798)*x_ref[1]**o+(0.582732756951)*x_ref[1]+(0.542548838027)*x_ref[2]**o+(0.365742797343)*x_ref[2]
-        ref[2,1]=(0.253260777874)*x_ref[0]**o+(-0.69077350875)*x_ref[0]+(0.458080700492)*x_ref[1]**o+(-0.79224006672)*x_ref[1]+(-0.504865679524)*x_ref[2]**o+(0.681425632809)*x_ref[2]
-        ref[2,2]=(0.600427718261)*x_ref[0]**o+(0.91761242151)*x_ref[0]+(0.602316047463)*x_ref[1]**o+(0.890383614185)*x_ref[1]+(-0.386691039525)*x_ref[2]**o+(0.688659949109)*x_ref[2]
-        ref[2,3]=(-0.181338810914)*x_ref[0]**o+(0.933744241999)*x_ref[0]+(0.0212774093137)*x_ref[1]**o+(0.284972854884)*x_ref[1]+(-0.150219922419)*x_ref[2]**o+(0.0878011402107)*x_ref[2]
-        ref[2,4]=(-0.848985879538)*x_ref[0]**o+(0.298962025531)*x_ref[0]+(0.593300576179)*x_ref[1]**o+(0.301509253541)*x_ref[1]+(0.971171084219)*x_ref[2]**o+(-0.973386482857)*x_ref[2]
-        ref[3,0]=(-0.735608389534)*x_ref[0]**o+(0.44902436426)*x_ref[0]+(0.0536456095512)*x_ref[1]**o+(0.208969935548)*x_ref[1]+(-0.787609300211)*x_ref[2]**o+(0.726024812477)*x_ref[2]
-        ref[3,1]=(0.200882171943)*x_ref[0]**o+(-0.644461780745)*x_ref[0]+(-0.0995704510264)*x_ref[1]**o+(-0.857730241944)*x_ref[1]+(-0.372302969302)*x_ref[2]**o+(-0.171367954739)*x_ref[2]
-        ref[3,2]=(-0.673606332627)*x_ref[0]**o+(-0.828183678442)*x_ref[0]+(-0.236856099365)*x_ref[1]**o+(-0.266339053288)*x_ref[1]+(-0.972034740204)*x_ref[2]**o+(-0.33151750348)*x_ref[2]
-        ref[3,3]=(-0.312470720017)*x_ref[0]**o+(-0.657433718629)*x_ref[0]+(-0.984940036612)*x_ref[1]**o+(0.197707053145)*x_ref[1]+(0.512009064643)*x_ref[2]**o+(0.855601033248)*x_ref[2]
-        ref[3,4]=(-0.674854508228)*x_ref[0]**o+(-0.394035682831)*x_ref[0]+(-0.749446232511)*x_ref[1]**o+(0.866992763518)*x_ref[1]+(-0.945837361158)*x_ref[2]**o+(0.593490782481)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.511844892619)*x[0]**o+(0.72447480361)*x[0]+(-0.415725587152)*x[1]**o+(-0.495233818217)*x[1]
-        arg[0,0,1]=(0.513861713949)*x[0]**o+(-0.918192893835)*x[0]+(0.563871531176)*x[1]**o+(0.885768393284)*x[1]
-        arg[0,1,0]=(-0.412320762031)*x[0]**o+(0.576776422795)*x[0]+(0.0103535112247)*x[1]**o+(-0.738144219037)*x[1]
-        arg[0,1,1]=(0.69941105604)*x[0]**o+(0.923470022558)*x[0]+(0.568449180547)*x[1]**o+(0.361429609343)*x[1]
-        arg[1,0,0]=(-0.574139432427)*x[0]**o+(0.968980609212)*x[0]+(-0.198809151818)*x[1]**o+(0.751623099192)*x[1]
-        arg[1,0,1]=(-0.743433955873)*x[0]**o+(-0.608013190658)*x[0]+(-0.0625473402572)*x[1]**o+(0.168418241981)*x[1]
-        arg[1,1,0]=(-0.632180449517)*x[0]**o+(-0.892666803222)*x[0]+(-0.558127678438)*x[1]**o+(0.212462582041)*x[1]
-        arg[1,1,1]=(-0.666381769622)*x[0]**o+(-0.0299308846938)*x[0]+(-0.450221481906)*x[1]**o+(0.701099654576)*x[1]
-        arg[2,0,0]=(-0.927832262778)*x[0]**o+(0.901665098705)*x[0]+(-0.0462955000541)*x[1]**o+(-0.92139600993)*x[1]
-        arg[2,0,1]=(-0.813732112672)*x[0]**o+(0.569194058283)*x[0]+(-0.527298120198)*x[1]**o+(-0.531607593369)*x[1]
-        arg[2,1,0]=(-0.760238058111)*x[0]**o+(0.628718839289)*x[0]+(-0.420066582474)*x[1]**o+(-0.205537665056)*x[1]
-        arg[2,1,1]=(0.421784629744)*x[0]**o+(-0.781451031751)*x[0]+(-0.0401156726902)*x[1]**o+(0.437044655245)*x[1]
-        arg[3,0,0]=(0.324136561188)*x[0]**o+(-0.920235828584)*x[0]+(0.677675509043)*x[1]**o+(0.322337884254)*x[1]
-        arg[3,0,1]=(-0.0711813236306)*x[0]**o+(0.0770312838088)*x[0]+(0.259613502243)*x[1]**o+(0.508154611576)*x[1]
-        arg[3,1,0]=(0.944048224599)*x[0]**o+(0.039954080407)*x[0]+(-0.503309434151)*x[1]**o+(0.747109874504)*x[1]
-        arg[3,1,1]=(0.692616323513)*x[0]**o+(0.0114568310884)*x[0]+(0.0708318026263)*x[1]**o+(0.822167043168)*x[1]
-        arg[4,0,0]=(0.392645136008)*x[0]**o+(0.160054219263)*x[0]+(-0.32320145108)*x[1]**o+(0.598963113077)*x[1]
-        arg[4,0,1]=(0.124778736846)*x[0]**o+(0.949589553291)*x[0]+(0.0985585514202)*x[1]**o+(-0.536684039884)*x[1]
-        arg[4,1,0]=(-0.983690591076)*x[0]**o+(-0.115321512368)*x[0]+(0.0875590878092)*x[1]**o+(0.992162964289)*x[1]
-        arg[4,1,1]=(-0.89264628952)*x[0]**o+(0.414589880453)*x[0]+(-0.40959764673)*x[1]**o+(-0.261016337239)*x[1]
-        arg[5,0,0]=(-0.613553175002)*x[0]**o+(0.320685999723)*x[0]+(-0.523099455238)*x[1]**o+(0.855780524769)*x[1]
-        arg[5,0,1]=(-0.45911360029)*x[0]**o+(-0.285942390871)*x[0]+(0.7279702976)*x[1]**o+(0.981483922949)*x[1]
-        arg[5,1,0]=(0.577254626037)*x[0]**o+(0.146911866492)*x[0]+(-0.414545328014)*x[1]**o+(-0.979179708006)*x[1]
-        arg[5,1,1]=(-0.838392720256)*x[0]**o+(-0.51717223091)*x[0]+(0.635616756614)*x[1]**o+(0.112711970543)*x[1]
-        ref[0,0,0]=(-0.511844892619)*x_ref[0]**o+(0.72447480361)*x_ref[0]+(-0.415725587152)*x_ref[1]**o+(-0.495233818217)*x_ref[1]
-        ref[0,0,1]=(0.513861713949)*x_ref[0]**o+(-0.918192893835)*x_ref[0]+(0.563871531176)*x_ref[1]**o+(0.885768393284)*x_ref[1]
-        ref[0,1,0]=(-0.412320762031)*x_ref[0]**o+(0.576776422795)*x_ref[0]+(0.0103535112247)*x_ref[1]**o+(-0.738144219037)*x_ref[1]
-        ref[0,1,1]=(0.69941105604)*x_ref[0]**o+(0.923470022558)*x_ref[0]+(0.568449180547)*x_ref[1]**o+(0.361429609343)*x_ref[1]
-        ref[1,0,0]=(-0.574139432427)*x_ref[0]**o+(0.968980609212)*x_ref[0]+(-0.198809151818)*x_ref[1]**o+(0.751623099192)*x_ref[1]
-        ref[1,0,1]=(-0.743433955873)*x_ref[0]**o+(-0.608013190658)*x_ref[0]+(-0.0625473402572)*x_ref[1]**o+(0.168418241981)*x_ref[1]
-        ref[1,1,0]=(-0.632180449517)*x_ref[0]**o+(-0.892666803222)*x_ref[0]+(-0.558127678438)*x_ref[1]**o+(0.212462582041)*x_ref[1]
-        ref[1,1,1]=(-0.666381769622)*x_ref[0]**o+(-0.0299308846938)*x_ref[0]+(-0.450221481906)*x_ref[1]**o+(0.701099654576)*x_ref[1]
-        ref[2,0,0]=(-0.927832262778)*x_ref[0]**o+(0.901665098705)*x_ref[0]+(-0.0462955000541)*x_ref[1]**o+(-0.92139600993)*x_ref[1]
-        ref[2,0,1]=(-0.813732112672)*x_ref[0]**o+(0.569194058283)*x_ref[0]+(-0.527298120198)*x_ref[1]**o+(-0.531607593369)*x_ref[1]
-        ref[2,1,0]=(-0.760238058111)*x_ref[0]**o+(0.628718839289)*x_ref[0]+(-0.420066582474)*x_ref[1]**o+(-0.205537665056)*x_ref[1]
-        ref[2,1,1]=(0.421784629744)*x_ref[0]**o+(-0.781451031751)*x_ref[0]+(-0.0401156726902)*x_ref[1]**o+(0.437044655245)*x_ref[1]
-        ref[3,0,0]=(0.324136561188)*x_ref[0]**o+(-0.920235828584)*x_ref[0]+(0.677675509043)*x_ref[1]**o+(0.322337884254)*x_ref[1]
-        ref[3,0,1]=(-0.0711813236306)*x_ref[0]**o+(0.0770312838088)*x_ref[0]+(0.259613502243)*x_ref[1]**o+(0.508154611576)*x_ref[1]
-        ref[3,1,0]=(0.944048224599)*x_ref[0]**o+(0.039954080407)*x_ref[0]+(-0.503309434151)*x_ref[1]**o+(0.747109874504)*x_ref[1]
-        ref[3,1,1]=(0.692616323513)*x_ref[0]**o+(0.0114568310884)*x_ref[0]+(0.0708318026263)*x_ref[1]**o+(0.822167043168)*x_ref[1]
-        ref[4,0,0]=(0.392645136008)*x_ref[0]**o+(0.160054219263)*x_ref[0]+(-0.32320145108)*x_ref[1]**o+(0.598963113077)*x_ref[1]
-        ref[4,0,1]=(0.124778736846)*x_ref[0]**o+(0.949589553291)*x_ref[0]+(0.0985585514202)*x_ref[1]**o+(-0.536684039884)*x_ref[1]
-        ref[4,1,0]=(-0.983690591076)*x_ref[0]**o+(-0.115321512368)*x_ref[0]+(0.0875590878092)*x_ref[1]**o+(0.992162964289)*x_ref[1]
-        ref[4,1,1]=(-0.89264628952)*x_ref[0]**o+(0.414589880453)*x_ref[0]+(-0.40959764673)*x_ref[1]**o+(-0.261016337239)*x_ref[1]
-        ref[5,0,0]=(-0.613553175002)*x_ref[0]**o+(0.320685999723)*x_ref[0]+(-0.523099455238)*x_ref[1]**o+(0.855780524769)*x_ref[1]
-        ref[5,0,1]=(-0.45911360029)*x_ref[0]**o+(-0.285942390871)*x_ref[0]+(0.7279702976)*x_ref[1]**o+(0.981483922949)*x_ref[1]
-        ref[5,1,0]=(0.577254626037)*x_ref[0]**o+(0.146911866492)*x_ref[0]+(-0.414545328014)*x_ref[1]**o+(-0.979179708006)*x_ref[1]
-        ref[5,1,1]=(-0.838392720256)*x_ref[0]**o+(-0.51717223091)*x_ref[0]+(0.635616756614)*x_ref[1]**o+(0.112711970543)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.807360140818)*x[0]**o+(-0.399141641865)*x[0]+(0.752910658124)*x[1]**o+(0.0998734354996)*x[1]+(-0.146785318133)*x[2]**o+(-0.393796605729)*x[2]
-        arg[0,0,1]=(-0.502209573844)*x[0]**o+(0.501684846477)*x[0]+(0.634537290794)*x[1]**o+(0.481836589517)*x[1]+(-0.0221536339712)*x[2]**o+(-0.868693970024)*x[2]
-        arg[0,1,0]=(-0.268854282014)*x[0]**o+(0.0516535086968)*x[0]+(-0.505997013698)*x[1]**o+(0.414205349613)*x[1]+(0.0119995662599)*x[2]**o+(0.584354222675)*x[2]
-        arg[0,1,1]=(0.81923283939)*x[0]**o+(-0.174637610292)*x[0]+(0.283785251937)*x[1]**o+(0.716260504685)*x[1]+(-0.957279283093)*x[2]**o+(0.632750238692)*x[2]
-        arg[1,0,0]=(0.601003888536)*x[0]**o+(-0.575011763358)*x[0]+(0.095159775614)*x[1]**o+(0.141200996742)*x[1]+(0.0173869440863)*x[2]**o+(0.478733688259)*x[2]
-        arg[1,0,1]=(-0.783826426764)*x[0]**o+(-0.40604430175)*x[0]+(-0.4574879786)*x[1]**o+(0.020222886424)*x[1]+(0.225419750344)*x[2]**o+(-0.530026190372)*x[2]
-        arg[1,1,0]=(0.542744341911)*x[0]**o+(-0.501169367089)*x[0]+(0.447661946532)*x[1]**o+(0.384528043888)*x[1]+(-0.599271261928)*x[2]**o+(-0.535447844217)*x[2]
-        arg[1,1,1]=(-0.457163465824)*x[0]**o+(0.0475382663524)*x[0]+(0.369626614251)*x[1]**o+(0.1125159395)*x[1]+(-0.252442923096)*x[2]**o+(0.0717205095822)*x[2]
-        arg[2,0,0]=(0.341536174626)*x[0]**o+(0.4408059057)*x[0]+(0.196877383546)*x[1]**o+(0.903072917866)*x[1]+(0.423403716275)*x[2]**o+(-0.521563534689)*x[2]
-        arg[2,0,1]=(0.553187361262)*x[0]**o+(-0.539057536895)*x[0]+(-0.814990210449)*x[1]**o+(-0.418614789609)*x[1]+(0.857298489434)*x[2]**o+(0.629708672)*x[2]
-        arg[2,1,0]=(0.494803348038)*x[0]**o+(0.143644562028)*x[0]+(-0.0425813919235)*x[1]**o+(-0.818562153097)*x[1]+(-0.730690839032)*x[2]**o+(-0.569426137866)*x[2]
-        arg[2,1,1]=(-0.573254727715)*x[0]**o+(-0.536459946225)*x[0]+(-0.244717967781)*x[1]**o+(-0.67463285343)*x[1]+(-0.383959754049)*x[2]**o+(-0.87595126443)*x[2]
-        arg[3,0,0]=(0.758065154533)*x[0]**o+(0.634049823109)*x[0]+(0.851352543082)*x[1]**o+(0.302790462394)*x[1]+(-0.920790730269)*x[2]**o+(0.460419670912)*x[2]
-        arg[3,0,1]=(0.415682634939)*x[0]**o+(-0.664821834506)*x[0]+(-0.314068887264)*x[1]**o+(-0.322413102029)*x[1]+(-0.498768865759)*x[2]**o+(-0.165338012626)*x[2]
-        arg[3,1,0]=(-0.398599595126)*x[0]**o+(0.744397086526)*x[0]+(-0.02321839482)*x[1]**o+(0.989743131098)*x[1]+(0.0713981107777)*x[2]**o+(-0.7862942966)*x[2]
-        arg[3,1,1]=(0.90835870295)*x[0]**o+(0.285965355995)*x[0]+(-0.302780058578)*x[1]**o+(0.396923771953)*x[1]+(0.717312324488)*x[2]**o+(0.967488138744)*x[2]
-        arg[4,0,0]=(-0.286827561624)*x[0]**o+(0.67973673275)*x[0]+(0.325169520671)*x[1]**o+(0.482002981846)*x[1]+(-0.826037251282)*x[2]**o+(-0.0567054906659)*x[2]
-        arg[4,0,1]=(-0.667297458554)*x[0]**o+(-0.207369757609)*x[0]+(-0.982746021703)*x[1]**o+(0.963677089363)*x[1]+(0.917328237047)*x[2]**o+(-0.684386577728)*x[2]
-        arg[4,1,0]=(-0.835525763762)*x[0]**o+(-0.113324184435)*x[0]+(0.465855661969)*x[1]**o+(0.656047307997)*x[1]+(0.331675778117)*x[2]**o+(-0.686067177565)*x[2]
-        arg[4,1,1]=(-0.468668496499)*x[0]**o+(0.295197251458)*x[0]+(0.065102699741)*x[1]**o+(-0.378381176309)*x[1]+(0.933627973066)*x[2]**o+(-0.91462136931)*x[2]
-        arg[5,0,0]=(-0.161916994488)*x[0]**o+(0.3070005414)*x[0]+(0.195946524325)*x[1]**o+(-0.453290146527)*x[1]+(0.751532065651)*x[2]**o+(0.82676125654)*x[2]
-        arg[5,0,1]=(-0.925362363492)*x[0]**o+(-0.0295351854097)*x[0]+(0.533980764998)*x[1]**o+(0.128080489262)*x[1]+(0.502858052015)*x[2]**o+(0.813196540163)*x[2]
-        arg[5,1,0]=(-0.740146099318)*x[0]**o+(0.27623528724)*x[0]+(-0.361620073401)*x[1]**o+(-0.310534085108)*x[1]+(-0.0363428185757)*x[2]**o+(-0.145397849357)*x[2]
-        arg[5,1,1]=(0.362089087335)*x[0]**o+(0.539359659929)*x[0]+(0.00904990097799)*x[1]**o+(-0.150401175722)*x[1]+(-0.20465882105)*x[2]**o+(-0.519331232192)*x[2]
-        ref[0,0,0]=(0.807360140818)*x_ref[0]**o+(-0.399141641865)*x_ref[0]+(0.752910658124)*x_ref[1]**o+(0.0998734354996)*x_ref[1]+(-0.146785318133)*x_ref[2]**o+(-0.393796605729)*x_ref[2]
-        ref[0,0,1]=(-0.502209573844)*x_ref[0]**o+(0.501684846477)*x_ref[0]+(0.634537290794)*x_ref[1]**o+(0.481836589517)*x_ref[1]+(-0.0221536339712)*x_ref[2]**o+(-0.868693970024)*x_ref[2]
-        ref[0,1,0]=(-0.268854282014)*x_ref[0]**o+(0.0516535086968)*x_ref[0]+(-0.505997013698)*x_ref[1]**o+(0.414205349613)*x_ref[1]+(0.0119995662599)*x_ref[2]**o+(0.584354222675)*x_ref[2]
-        ref[0,1,1]=(0.81923283939)*x_ref[0]**o+(-0.174637610292)*x_ref[0]+(0.283785251937)*x_ref[1]**o+(0.716260504685)*x_ref[1]+(-0.957279283093)*x_ref[2]**o+(0.632750238692)*x_ref[2]
-        ref[1,0,0]=(0.601003888536)*x_ref[0]**o+(-0.575011763358)*x_ref[0]+(0.095159775614)*x_ref[1]**o+(0.141200996742)*x_ref[1]+(0.0173869440863)*x_ref[2]**o+(0.478733688259)*x_ref[2]
-        ref[1,0,1]=(-0.783826426764)*x_ref[0]**o+(-0.40604430175)*x_ref[0]+(-0.4574879786)*x_ref[1]**o+(0.020222886424)*x_ref[1]+(0.225419750344)*x_ref[2]**o+(-0.530026190372)*x_ref[2]
-        ref[1,1,0]=(0.542744341911)*x_ref[0]**o+(-0.501169367089)*x_ref[0]+(0.447661946532)*x_ref[1]**o+(0.384528043888)*x_ref[1]+(-0.599271261928)*x_ref[2]**o+(-0.535447844217)*x_ref[2]
-        ref[1,1,1]=(-0.457163465824)*x_ref[0]**o+(0.0475382663524)*x_ref[0]+(0.369626614251)*x_ref[1]**o+(0.1125159395)*x_ref[1]+(-0.252442923096)*x_ref[2]**o+(0.0717205095822)*x_ref[2]
-        ref[2,0,0]=(0.341536174626)*x_ref[0]**o+(0.4408059057)*x_ref[0]+(0.196877383546)*x_ref[1]**o+(0.903072917866)*x_ref[1]+(0.423403716275)*x_ref[2]**o+(-0.521563534689)*x_ref[2]
-        ref[2,0,1]=(0.553187361262)*x_ref[0]**o+(-0.539057536895)*x_ref[0]+(-0.814990210449)*x_ref[1]**o+(-0.418614789609)*x_ref[1]+(0.857298489434)*x_ref[2]**o+(0.629708672)*x_ref[2]
-        ref[2,1,0]=(0.494803348038)*x_ref[0]**o+(0.143644562028)*x_ref[0]+(-0.0425813919235)*x_ref[1]**o+(-0.818562153097)*x_ref[1]+(-0.730690839032)*x_ref[2]**o+(-0.569426137866)*x_ref[2]
-        ref[2,1,1]=(-0.573254727715)*x_ref[0]**o+(-0.536459946225)*x_ref[0]+(-0.244717967781)*x_ref[1]**o+(-0.67463285343)*x_ref[1]+(-0.383959754049)*x_ref[2]**o+(-0.87595126443)*x_ref[2]
-        ref[3,0,0]=(0.758065154533)*x_ref[0]**o+(0.634049823109)*x_ref[0]+(0.851352543082)*x_ref[1]**o+(0.302790462394)*x_ref[1]+(-0.920790730269)*x_ref[2]**o+(0.460419670912)*x_ref[2]
-        ref[3,0,1]=(0.415682634939)*x_ref[0]**o+(-0.664821834506)*x_ref[0]+(-0.314068887264)*x_ref[1]**o+(-0.322413102029)*x_ref[1]+(-0.498768865759)*x_ref[2]**o+(-0.165338012626)*x_ref[2]
-        ref[3,1,0]=(-0.398599595126)*x_ref[0]**o+(0.744397086526)*x_ref[0]+(-0.02321839482)*x_ref[1]**o+(0.989743131098)*x_ref[1]+(0.0713981107777)*x_ref[2]**o+(-0.7862942966)*x_ref[2]
-        ref[3,1,1]=(0.90835870295)*x_ref[0]**o+(0.285965355995)*x_ref[0]+(-0.302780058578)*x_ref[1]**o+(0.396923771953)*x_ref[1]+(0.717312324488)*x_ref[2]**o+(0.967488138744)*x_ref[2]
-        ref[4,0,0]=(-0.286827561624)*x_ref[0]**o+(0.67973673275)*x_ref[0]+(0.325169520671)*x_ref[1]**o+(0.482002981846)*x_ref[1]+(-0.826037251282)*x_ref[2]**o+(-0.0567054906659)*x_ref[2]
-        ref[4,0,1]=(-0.667297458554)*x_ref[0]**o+(-0.207369757609)*x_ref[0]+(-0.982746021703)*x_ref[1]**o+(0.963677089363)*x_ref[1]+(0.917328237047)*x_ref[2]**o+(-0.684386577728)*x_ref[2]
-        ref[4,1,0]=(-0.835525763762)*x_ref[0]**o+(-0.113324184435)*x_ref[0]+(0.465855661969)*x_ref[1]**o+(0.656047307997)*x_ref[1]+(0.331675778117)*x_ref[2]**o+(-0.686067177565)*x_ref[2]
-        ref[4,1,1]=(-0.468668496499)*x_ref[0]**o+(0.295197251458)*x_ref[0]+(0.065102699741)*x_ref[1]**o+(-0.378381176309)*x_ref[1]+(0.933627973066)*x_ref[2]**o+(-0.91462136931)*x_ref[2]
-        ref[5,0,0]=(-0.161916994488)*x_ref[0]**o+(0.3070005414)*x_ref[0]+(0.195946524325)*x_ref[1]**o+(-0.453290146527)*x_ref[1]+(0.751532065651)*x_ref[2]**o+(0.82676125654)*x_ref[2]
-        ref[5,0,1]=(-0.925362363492)*x_ref[0]**o+(-0.0295351854097)*x_ref[0]+(0.533980764998)*x_ref[1]**o+(0.128080489262)*x_ref[1]+(0.502858052015)*x_ref[2]**o+(0.813196540163)*x_ref[2]
-        ref[5,1,0]=(-0.740146099318)*x_ref[0]**o+(0.27623528724)*x_ref[0]+(-0.361620073401)*x_ref[1]**o+(-0.310534085108)*x_ref[1]+(-0.0363428185757)*x_ref[2]**o+(-0.145397849357)*x_ref[2]
-        ref[5,1,1]=(0.362089087335)*x_ref[0]**o+(0.539359659929)*x_ref[0]+(0.00904990097799)*x_ref[1]**o+(-0.150401175722)*x_ref[1]+(-0.20465882105)*x_ref[2]**o+(-0.519331232192)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from Solution onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.14016992168)*x[0]**o+(-0.396856222091)*x[0]+(0.747446299477)*x[1]**o+(-0.299063042467)*x[1]
-        arg[0,0,0,1]=(0.126297805139)*x[0]**o+(0.317089000483)*x[0]+(0.0418478916266)*x[1]**o+(-0.892825689806)*x[1]
-        arg[0,0,1,0]=(0.127263485532)*x[0]**o+(0.400880552184)*x[0]+(-0.858713979216)*x[1]**o+(0.238693631738)*x[1]
-        arg[0,0,1,1]=(-0.985703521737)*x[0]**o+(-0.0192845851979)*x[0]+(-0.442493677109)*x[1]**o+(0.188038174612)*x[1]
-        arg[0,0,2,0]=(0.814303535641)*x[0]**o+(-0.201938227136)*x[0]+(-0.134135136581)*x[1]**o+(0.939272592089)*x[1]
-        arg[0,0,2,1]=(-0.609570412575)*x[0]**o+(0.181669701944)*x[0]+(0.882708213835)*x[1]**o+(0.315561722535)*x[1]
-        arg[0,1,0,0]=(0.180272217085)*x[0]**o+(-0.921231698951)*x[0]+(-0.670170775864)*x[1]**o+(0.36959006719)*x[1]
-        arg[0,1,0,1]=(-0.907447754449)*x[0]**o+(0.984356686322)*x[0]+(0.300621254386)*x[1]**o+(0.491995830235)*x[1]
-        arg[0,1,1,0]=(-0.535808887861)*x[0]**o+(0.991647965865)*x[0]+(-0.505667913884)*x[1]**o+(-0.403245981754)*x[1]
-        arg[0,1,1,1]=(-0.315687983887)*x[0]**o+(-0.570118136173)*x[0]+(0.327842038508)*x[1]**o+(-0.475833876716)*x[1]
-        arg[0,1,2,0]=(0.598143043008)*x[0]**o+(0.119789453354)*x[0]+(-0.307994361027)*x[1]**o+(-0.747443620209)*x[1]
-        arg[0,1,2,1]=(-0.384576138426)*x[0]**o+(-0.21431195392)*x[0]+(0.622157923623)*x[1]**o+(-0.535976986322)*x[1]
-        arg[0,2,0,0]=(-0.823640169824)*x[0]**o+(-0.946436729867)*x[0]+(0.158819942161)*x[1]**o+(-0.175783146941)*x[1]
-        arg[0,2,0,1]=(0.31586435609)*x[0]**o+(0.480823809413)*x[0]+(-0.155590673671)*x[1]**o+(-0.283774897002)*x[1]
-        arg[0,2,1,0]=(0.973677960338)*x[0]**o+(-0.42119441385)*x[0]+(0.936434159723)*x[1]**o+(-0.271328279678)*x[1]
-        arg[0,2,1,1]=(0.995977746066)*x[0]**o+(0.115566554312)*x[0]+(0.6023712777)*x[1]**o+(0.523708594385)*x[1]
-        arg[0,2,2,0]=(0.690331991941)*x[0]**o+(0.708864222789)*x[0]+(-0.0209681974418)*x[1]**o+(-0.402664547241)*x[1]
-        arg[0,2,2,1]=(0.793403379571)*x[0]**o+(-0.44195907862)*x[0]+(-0.750943552401)*x[1]**o+(0.87817105061)*x[1]
-        arg[0,3,0,0]=(-0.960650344452)*x[0]**o+(0.918969286865)*x[0]+(-0.788611475275)*x[1]**o+(-0.917265819096)*x[1]
-        arg[0,3,0,1]=(0.379234695969)*x[0]**o+(0.288784268667)*x[0]+(-0.231788371542)*x[1]**o+(-0.521488838978)*x[1]
-        arg[0,3,1,0]=(-0.482353410226)*x[0]**o+(0.666269361063)*x[0]+(0.207628082266)*x[1]**o+(0.890536697637)*x[1]
-        arg[0,3,1,1]=(-0.256826971067)*x[0]**o+(0.244573109457)*x[0]+(0.435182409565)*x[1]**o+(-0.98882467576)*x[1]
-        arg[0,3,2,0]=(0.727681501266)*x[0]**o+(0.174117939756)*x[0]+(0.626998345198)*x[1]**o+(0.666518756047)*x[1]
-        arg[0,3,2,1]=(-0.125855300157)*x[0]**o+(-0.750291117974)*x[0]+(0.840722993443)*x[1]**o+(0.0798848819291)*x[1]
-        arg[0,4,0,0]=(-0.156808480304)*x[0]**o+(-0.864855000875)*x[0]+(-0.825786767174)*x[1]**o+(-0.563999207624)*x[1]
-        arg[0,4,0,1]=(-0.890116284779)*x[0]**o+(0.795471417269)*x[0]+(0.326454331959)*x[1]**o+(-0.376644334859)*x[1]
-        arg[0,4,1,0]=(-0.453181887597)*x[0]**o+(0.488149970589)*x[0]+(0.506352954527)*x[1]**o+(0.971016325918)*x[1]
-        arg[0,4,1,1]=(0.156976484311)*x[0]**o+(0.988818166411)*x[0]+(0.948579296281)*x[1]**o+(-0.80303322078)*x[1]
-        arg[0,4,2,0]=(-0.0625333956516)*x[0]**o+(0.357609677642)*x[0]+(0.00245182913993)*x[1]**o+(-0.162058851234)*x[1]
-        arg[0,4,2,1]=(0.645504631508)*x[0]**o+(-0.0107543576265)*x[0]+(0.15490632437)*x[1]**o+(0.841985786269)*x[1]
-        arg[1,0,0,0]=(0.703923364197)*x[0]**o+(-0.424818178123)*x[0]+(-0.744399116071)*x[1]**o+(0.303429987787)*x[1]
-        arg[1,0,0,1]=(-0.92849671168)*x[0]**o+(0.050597602551)*x[0]+(0.91000243103)*x[1]**o+(-0.742775174195)*x[1]
-        arg[1,0,1,0]=(0.281218131435)*x[0]**o+(0.171029842909)*x[0]+(-0.65806576709)*x[1]**o+(-0.718069456213)*x[1]
-        arg[1,0,1,1]=(0.312255067232)*x[0]**o+(0.566401030665)*x[0]+(-0.941709776271)*x[1]**o+(0.0111896041808)*x[1]
-        arg[1,0,2,0]=(-0.886019321094)*x[0]**o+(-0.688815756004)*x[0]+(-0.595491288141)*x[1]**o+(0.343402495621)*x[1]
-        arg[1,0,2,1]=(-0.681063845863)*x[0]**o+(-0.676550403066)*x[0]+(0.186106532969)*x[1]**o+(0.181779537727)*x[1]
-        arg[1,1,0,0]=(0.128588939989)*x[0]**o+(0.477711214734)*x[0]+(-0.17697460919)*x[1]**o+(0.0217208670244)*x[1]
-        arg[1,1,0,1]=(-0.652028522296)*x[0]**o+(-0.503146425209)*x[0]+(-0.427973128189)*x[1]**o+(-0.182775422425)*x[1]
-        arg[1,1,1,0]=(-0.0499349942904)*x[0]**o+(-0.0183804745613)*x[0]+(-0.912604094211)*x[1]**o+(-0.949181938689)*x[1]
-        arg[1,1,1,1]=(-0.472737626621)*x[0]**o+(-0.142195314687)*x[0]+(0.580775749383)*x[1]**o+(-0.832549796746)*x[1]
-        arg[1,1,2,0]=(-0.288756468146)*x[0]**o+(-0.50657056474)*x[0]+(-0.809713268333)*x[1]**o+(0.598450102365)*x[1]
-        arg[1,1,2,1]=(-0.259779636241)*x[0]**o+(-0.227925001879)*x[0]+(-0.0752800702413)*x[1]**o+(-0.438841969161)*x[1]
-        arg[1,2,0,0]=(-0.617835522076)*x[0]**o+(-0.969275786274)*x[0]+(0.899717033555)*x[1]**o+(0.77648944909)*x[1]
-        arg[1,2,0,1]=(-0.0619395581419)*x[0]**o+(0.926394874574)*x[0]+(0.984605961354)*x[1]**o+(0.253347734181)*x[1]
-        arg[1,2,1,0]=(0.748474342269)*x[0]**o+(0.0794003341104)*x[0]+(-0.244607682532)*x[1]**o+(-0.228787873564)*x[1]
-        arg[1,2,1,1]=(-0.266853205536)*x[0]**o+(0.529714058158)*x[0]+(-0.421599080872)*x[1]**o+(-0.595557599245)*x[1]
-        arg[1,2,2,0]=(-0.377962443753)*x[0]**o+(0.609550409525)*x[0]+(0.951904771097)*x[1]**o+(-0.123551801933)*x[1]
-        arg[1,2,2,1]=(0.3262671136)*x[0]**o+(-0.574281078833)*x[0]+(0.308261022622)*x[1]**o+(-0.784762723843)*x[1]
-        arg[1,3,0,0]=(-0.419601410829)*x[0]**o+(-0.576064062071)*x[0]+(-0.431574278091)*x[1]**o+(-0.264303418881)*x[1]
-        arg[1,3,0,1]=(0.176058414693)*x[0]**o+(0.672752046411)*x[0]+(-0.8579992002)*x[1]**o+(-0.135904959185)*x[1]
-        arg[1,3,1,0]=(0.84480795105)*x[0]**o+(0.846846799225)*x[0]+(0.134417432017)*x[1]**o+(-0.725316162128)*x[1]
-        arg[1,3,1,1]=(-0.102162279538)*x[0]**o+(0.451180031789)*x[0]+(0.490175190736)*x[1]**o+(0.811823281177)*x[1]
-        arg[1,3,2,0]=(-0.582177348293)*x[0]**o+(-0.74631626712)*x[0]+(-0.275524221012)*x[1]**o+(-0.658276720144)*x[1]
-        arg[1,3,2,1]=(0.304511057297)*x[0]**o+(-0.354531411968)*x[0]+(0.0944491594546)*x[1]**o+(0.619039121597)*x[1]
-        arg[1,4,0,0]=(0.754898520324)*x[0]**o+(-0.28914218119)*x[0]+(0.8660675945)*x[1]**o+(0.526777161228)*x[1]
-        arg[1,4,0,1]=(-0.820150637429)*x[0]**o+(-0.399203443857)*x[0]+(0.118863382167)*x[1]**o+(0.269335037373)*x[1]
-        arg[1,4,1,0]=(-0.669389232967)*x[0]**o+(-0.119080399209)*x[0]+(0.999919873616)*x[1]**o+(0.733390578378)*x[1]
-        arg[1,4,1,1]=(-0.85147101348)*x[0]**o+(-0.0453996523642)*x[0]+(0.00891698330334)*x[1]**o+(-0.27128670805)*x[1]
-        arg[1,4,2,0]=(-0.946558097166)*x[0]**o+(0.0141300604882)*x[0]+(0.04075090617)*x[1]**o+(-0.141095386138)*x[1]
-        arg[1,4,2,1]=(0.613700159605)*x[0]**o+(0.115107829201)*x[0]+(0.907429968641)*x[1]**o+(0.901820725424)*x[1]
-        arg[2,0,0,0]=(-0.629486588984)*x[0]**o+(-0.590908868493)*x[0]+(0.689333052519)*x[1]**o+(0.22096464697)*x[1]
-        arg[2,0,0,1]=(-0.475364708492)*x[0]**o+(-0.3195126467)*x[0]+(-0.688082519853)*x[1]**o+(-0.889722517035)*x[1]
-        arg[2,0,1,0]=(0.931261765284)*x[0]**o+(0.399101548845)*x[0]+(-0.185342345742)*x[1]**o+(0.188927724838)*x[1]
-        arg[2,0,1,1]=(-0.195889209768)*x[0]**o+(-0.0878952476483)*x[0]+(0.636980893598)*x[1]**o+(0.827709469156)*x[1]
-        arg[2,0,2,0]=(0.644658731705)*x[0]**o+(0.275771474382)*x[0]+(0.0802903363405)*x[1]**o+(-0.157785300253)*x[1]
-        arg[2,0,2,1]=(0.324153739483)*x[0]**o+(-0.978043993375)*x[0]+(0.440060321393)*x[1]**o+(0.103952166755)*x[1]
-        arg[2,1,0,0]=(-0.233567312787)*x[0]**o+(0.139529308019)*x[0]+(-0.200168759944)*x[1]**o+(-0.629057762953)*x[1]
-        arg[2,1,0,1]=(-0.407808993281)*x[0]**o+(-0.208049914815)*x[0]+(0.676817990818)*x[1]**o+(-0.27174220248)*x[1]
-        arg[2,1,1,0]=(-0.159113456499)*x[0]**o+(0.586749846436)*x[0]+(0.112658884741)*x[1]**o+(0.521917298039)*x[1]
-        arg[2,1,1,1]=(-0.377986619436)*x[0]**o+(0.920912593255)*x[0]+(0.61285598265)*x[1]**o+(0.491316381102)*x[1]
-        arg[2,1,2,0]=(-0.594573349393)*x[0]**o+(-0.784940398408)*x[0]+(0.0602427709094)*x[1]**o+(0.381334187216)*x[1]
-        arg[2,1,2,1]=(-0.359402310466)*x[0]**o+(0.243014104221)*x[0]+(0.960587701667)*x[1]**o+(0.653124687952)*x[1]
-        arg[2,2,0,0]=(0.667031182369)*x[0]**o+(0.099374903559)*x[0]+(0.00279841725989)*x[1]**o+(-0.413751543412)*x[1]
-        arg[2,2,0,1]=(0.793557898241)*x[0]**o+(0.146572317359)*x[0]+(0.812964170008)*x[1]**o+(-0.988110793397)*x[1]
-        arg[2,2,1,0]=(0.900661246137)*x[0]**o+(-0.997975978586)*x[0]+(0.63300171387)*x[1]**o+(-0.103878548778)*x[1]
-        arg[2,2,1,1]=(-0.456464050469)*x[0]**o+(0.830699811714)*x[0]+(-0.186689927425)*x[1]**o+(-0.100170151164)*x[1]
-        arg[2,2,2,0]=(0.732282428164)*x[0]**o+(0.928947589228)*x[0]+(-0.282773641579)*x[1]**o+(-0.927533112027)*x[1]
-        arg[2,2,2,1]=(0.768111868708)*x[0]**o+(-0.308231472858)*x[0]+(0.890807565689)*x[1]**o+(-0.731196891492)*x[1]
-        arg[2,3,0,0]=(0.559658559574)*x[0]**o+(0.104536615096)*x[0]+(-0.162594824125)*x[1]**o+(-0.172859200721)*x[1]
-        arg[2,3,0,1]=(0.769297853152)*x[0]**o+(0.346598673904)*x[0]+(0.0313124779153)*x[1]**o+(-0.751767979251)*x[1]
-        arg[2,3,1,0]=(0.870887050816)*x[0]**o+(0.593904859463)*x[0]+(-0.108083837899)*x[1]**o+(0.5467383682)*x[1]
-        arg[2,3,1,1]=(0.244253227645)*x[0]**o+(0.911176738654)*x[0]+(-0.497855487714)*x[1]**o+(0.226443212585)*x[1]
-        arg[2,3,2,0]=(-0.599893560596)*x[0]**o+(-0.893030581717)*x[0]+(-0.745249903413)*x[1]**o+(0.563740068619)*x[1]
-        arg[2,3,2,1]=(-0.198088241103)*x[0]**o+(-0.171306730647)*x[0]+(-0.917417138299)*x[1]**o+(0.233920617125)*x[1]
-        arg[2,4,0,0]=(0.804585270618)*x[0]**o+(0.3784879961)*x[0]+(0.621076476928)*x[1]**o+(-0.534671153952)*x[1]
-        arg[2,4,0,1]=(0.380555159947)*x[0]**o+(-0.630487045841)*x[0]+(0.917413683072)*x[1]**o+(0.491925783834)*x[1]
-        arg[2,4,1,0]=(0.946642644964)*x[0]**o+(-0.236438579482)*x[0]+(0.525585953739)*x[1]**o+(0.499940951133)*x[1]
-        arg[2,4,1,1]=(0.827450889548)*x[0]**o+(-0.73264543626)*x[0]+(0.0626492901072)*x[1]**o+(-0.882759632862)*x[1]
-        arg[2,4,2,0]=(-0.0671814496498)*x[0]**o+(0.108634446052)*x[0]+(-0.421081640868)*x[1]**o+(-0.546455336395)*x[1]
-        arg[2,4,2,1]=(-0.601339784479)*x[0]**o+(-0.206937965916)*x[0]+(-0.849120792543)*x[1]**o+(0.615842037441)*x[1]
-        arg[3,0,0,0]=(0.640466650913)*x[0]**o+(-0.936176165762)*x[0]+(0.12758686525)*x[1]**o+(-0.104771286099)*x[1]
-        arg[3,0,0,1]=(-0.868109993006)*x[0]**o+(0.470815003671)*x[0]+(-0.301208743474)*x[1]**o+(-0.296271408095)*x[1]
-        arg[3,0,1,0]=(0.66584252787)*x[0]**o+(-0.889549573986)*x[0]+(-0.0876076820512)*x[1]**o+(-0.249000029178)*x[1]
-        arg[3,0,1,1]=(0.289388044606)*x[0]**o+(0.674519856916)*x[0]+(-0.721031236925)*x[1]**o+(0.093281544052)*x[1]
-        arg[3,0,2,0]=(-0.0558863543119)*x[0]**o+(-0.367544430651)*x[0]+(-0.85580152565)*x[1]**o+(-0.140166367203)*x[1]
-        arg[3,0,2,1]=(0.600709511675)*x[0]**o+(0.286322916564)*x[0]+(-0.544094007372)*x[1]**o+(0.470305833347)*x[1]
-        arg[3,1,0,0]=(-0.828780197168)*x[0]**o+(-0.568096532278)*x[0]+(0.435127414299)*x[1]**o+(0.96890877255)*x[1]
-        arg[3,1,0,1]=(0.191455614175)*x[0]**o+(-0.99507613827)*x[0]+(0.0735829936134)*x[1]**o+(0.635849313153)*x[1]
-        arg[3,1,1,0]=(-0.839049013591)*x[0]**o+(-0.718731394184)*x[0]+(0.575853740085)*x[1]**o+(-0.57924857477)*x[1]
-        arg[3,1,1,1]=(0.116876810453)*x[0]**o+(0.145727923885)*x[0]+(0.0155069936368)*x[1]**o+(0.223214885433)*x[1]
-        arg[3,1,2,0]=(-0.674811720223)*x[0]**o+(0.651640807063)*x[0]+(-0.652022625703)*x[1]**o+(-0.119110788344)*x[1]
-        arg[3,1,2,1]=(-0.544748794193)*x[0]**o+(-0.689440165483)*x[0]+(0.936900319026)*x[1]**o+(-0.337287311564)*x[1]
-        arg[3,2,0,0]=(-0.355059804554)*x[0]**o+(0.458306329535)*x[0]+(0.172261907494)*x[1]**o+(0.498548138594)*x[1]
-        arg[3,2,0,1]=(0.624420187129)*x[0]**o+(0.808931844722)*x[0]+(-0.690635894194)*x[1]**o+(-0.156122444554)*x[1]
-        arg[3,2,1,0]=(-0.190029529776)*x[0]**o+(0.925600418137)*x[0]+(0.601040324953)*x[1]**o+(0.615485749173)*x[1]
-        arg[3,2,1,1]=(0.679796674662)*x[0]**o+(0.879285148869)*x[0]+(0.0476373514288)*x[1]**o+(0.37655760501)*x[1]
-        arg[3,2,2,0]=(0.231748550393)*x[0]**o+(0.209858138221)*x[0]+(-0.88372579866)*x[1]**o+(0.30534744967)*x[1]
-        arg[3,2,2,1]=(-0.772177697671)*x[0]**o+(0.012439044435)*x[0]+(-0.293218976284)*x[1]**o+(0.306955066595)*x[1]
-        arg[3,3,0,0]=(0.387256929042)*x[0]**o+(-0.434015953267)*x[0]+(-0.098736946868)*x[1]**o+(-0.0837712534186)*x[1]
-        arg[3,3,0,1]=(0.396246252967)*x[0]**o+(-0.338955181605)*x[0]+(-0.353504371554)*x[1]**o+(-0.969811402293)*x[1]
-        arg[3,3,1,0]=(-0.336508964723)*x[0]**o+(-0.411882233342)*x[0]+(-0.603965321132)*x[1]**o+(0.177221705416)*x[1]
-        arg[3,3,1,1]=(0.786971174387)*x[0]**o+(0.759003522166)*x[0]+(-0.0961289050409)*x[1]**o+(-0.0811258682982)*x[1]
-        arg[3,3,2,0]=(0.526266925685)*x[0]**o+(-0.113145219611)*x[0]+(-0.208427816884)*x[1]**o+(0.291484710079)*x[1]
-        arg[3,3,2,1]=(-0.591153907468)*x[0]**o+(-0.342892047641)*x[0]+(0.865954283634)*x[1]**o+(-0.22112030903)*x[1]
-        arg[3,4,0,0]=(0.755162128186)*x[0]**o+(0.494457469003)*x[0]+(0.889254517137)*x[1]**o+(0.880654056969)*x[1]
-        arg[3,4,0,1]=(0.450983401629)*x[0]**o+(-0.0855489110466)*x[0]+(0.0601625202676)*x[1]**o+(-0.0730383237708)*x[1]
-        arg[3,4,1,0]=(0.495514588456)*x[0]**o+(-0.0895269876334)*x[0]+(-0.89729630673)*x[1]**o+(0.759465768614)*x[1]
-        arg[3,4,1,1]=(-0.666472982468)*x[0]**o+(-0.251715028171)*x[0]+(-0.0623287375223)*x[1]**o+(-0.895663326995)*x[1]
-        arg[3,4,2,0]=(0.489737923112)*x[0]**o+(0.868066981889)*x[0]+(0.0371747456704)*x[1]**o+(-0.528951636028)*x[1]
-        arg[3,4,2,1]=(0.556312598455)*x[0]**o+(-0.0979773350236)*x[0]+(-0.82785928691)*x[1]**o+(-0.567596765858)*x[1]
-        ref[0,0,0,0]=(0.14016992168)*x_ref[0]**o+(-0.396856222091)*x_ref[0]+(0.747446299477)*x_ref[1]**o+(-0.299063042467)*x_ref[1]
-        ref[0,0,0,1]=(0.126297805139)*x_ref[0]**o+(0.317089000483)*x_ref[0]+(0.0418478916266)*x_ref[1]**o+(-0.892825689806)*x_ref[1]
-        ref[0,0,1,0]=(0.127263485532)*x_ref[0]**o+(0.400880552184)*x_ref[0]+(-0.858713979216)*x_ref[1]**o+(0.238693631738)*x_ref[1]
-        ref[0,0,1,1]=(-0.985703521737)*x_ref[0]**o+(-0.0192845851979)*x_ref[0]+(-0.442493677109)*x_ref[1]**o+(0.188038174612)*x_ref[1]
-        ref[0,0,2,0]=(0.814303535641)*x_ref[0]**o+(-0.201938227136)*x_ref[0]+(-0.134135136581)*x_ref[1]**o+(0.939272592089)*x_ref[1]
-        ref[0,0,2,1]=(-0.609570412575)*x_ref[0]**o+(0.181669701944)*x_ref[0]+(0.882708213835)*x_ref[1]**o+(0.315561722535)*x_ref[1]
-        ref[0,1,0,0]=(0.180272217085)*x_ref[0]**o+(-0.921231698951)*x_ref[0]+(-0.670170775864)*x_ref[1]**o+(0.36959006719)*x_ref[1]
-        ref[0,1,0,1]=(-0.907447754449)*x_ref[0]**o+(0.984356686322)*x_ref[0]+(0.300621254386)*x_ref[1]**o+(0.491995830235)*x_ref[1]
-        ref[0,1,1,0]=(-0.535808887861)*x_ref[0]**o+(0.991647965865)*x_ref[0]+(-0.505667913884)*x_ref[1]**o+(-0.403245981754)*x_ref[1]
-        ref[0,1,1,1]=(-0.315687983887)*x_ref[0]**o+(-0.570118136173)*x_ref[0]+(0.327842038508)*x_ref[1]**o+(-0.475833876716)*x_ref[1]
-        ref[0,1,2,0]=(0.598143043008)*x_ref[0]**o+(0.119789453354)*x_ref[0]+(-0.307994361027)*x_ref[1]**o+(-0.747443620209)*x_ref[1]
-        ref[0,1,2,1]=(-0.384576138426)*x_ref[0]**o+(-0.21431195392)*x_ref[0]+(0.622157923623)*x_ref[1]**o+(-0.535976986322)*x_ref[1]
-        ref[0,2,0,0]=(-0.823640169824)*x_ref[0]**o+(-0.946436729867)*x_ref[0]+(0.158819942161)*x_ref[1]**o+(-0.175783146941)*x_ref[1]
-        ref[0,2,0,1]=(0.31586435609)*x_ref[0]**o+(0.480823809413)*x_ref[0]+(-0.155590673671)*x_ref[1]**o+(-0.283774897002)*x_ref[1]
-        ref[0,2,1,0]=(0.973677960338)*x_ref[0]**o+(-0.42119441385)*x_ref[0]+(0.936434159723)*x_ref[1]**o+(-0.271328279678)*x_ref[1]
-        ref[0,2,1,1]=(0.995977746066)*x_ref[0]**o+(0.115566554312)*x_ref[0]+(0.6023712777)*x_ref[1]**o+(0.523708594385)*x_ref[1]
-        ref[0,2,2,0]=(0.690331991941)*x_ref[0]**o+(0.708864222789)*x_ref[0]+(-0.0209681974418)*x_ref[1]**o+(-0.402664547241)*x_ref[1]
-        ref[0,2,2,1]=(0.793403379571)*x_ref[0]**o+(-0.44195907862)*x_ref[0]+(-0.750943552401)*x_ref[1]**o+(0.87817105061)*x_ref[1]
-        ref[0,3,0,0]=(-0.960650344452)*x_ref[0]**o+(0.918969286865)*x_ref[0]+(-0.788611475275)*x_ref[1]**o+(-0.917265819096)*x_ref[1]
-        ref[0,3,0,1]=(0.379234695969)*x_ref[0]**o+(0.288784268667)*x_ref[0]+(-0.231788371542)*x_ref[1]**o+(-0.521488838978)*x_ref[1]
-        ref[0,3,1,0]=(-0.482353410226)*x_ref[0]**o+(0.666269361063)*x_ref[0]+(0.207628082266)*x_ref[1]**o+(0.890536697637)*x_ref[1]
-        ref[0,3,1,1]=(-0.256826971067)*x_ref[0]**o+(0.244573109457)*x_ref[0]+(0.435182409565)*x_ref[1]**o+(-0.98882467576)*x_ref[1]
-        ref[0,3,2,0]=(0.727681501266)*x_ref[0]**o+(0.174117939756)*x_ref[0]+(0.626998345198)*x_ref[1]**o+(0.666518756047)*x_ref[1]
-        ref[0,3,2,1]=(-0.125855300157)*x_ref[0]**o+(-0.750291117974)*x_ref[0]+(0.840722993443)*x_ref[1]**o+(0.0798848819291)*x_ref[1]
-        ref[0,4,0,0]=(-0.156808480304)*x_ref[0]**o+(-0.864855000875)*x_ref[0]+(-0.825786767174)*x_ref[1]**o+(-0.563999207624)*x_ref[1]
-        ref[0,4,0,1]=(-0.890116284779)*x_ref[0]**o+(0.795471417269)*x_ref[0]+(0.326454331959)*x_ref[1]**o+(-0.376644334859)*x_ref[1]
-        ref[0,4,1,0]=(-0.453181887597)*x_ref[0]**o+(0.488149970589)*x_ref[0]+(0.506352954527)*x_ref[1]**o+(0.971016325918)*x_ref[1]
-        ref[0,4,1,1]=(0.156976484311)*x_ref[0]**o+(0.988818166411)*x_ref[0]+(0.948579296281)*x_ref[1]**o+(-0.80303322078)*x_ref[1]
-        ref[0,4,2,0]=(-0.0625333956516)*x_ref[0]**o+(0.357609677642)*x_ref[0]+(0.00245182913993)*x_ref[1]**o+(-0.162058851234)*x_ref[1]
-        ref[0,4,2,1]=(0.645504631508)*x_ref[0]**o+(-0.0107543576265)*x_ref[0]+(0.15490632437)*x_ref[1]**o+(0.841985786269)*x_ref[1]
-        ref[1,0,0,0]=(0.703923364197)*x_ref[0]**o+(-0.424818178123)*x_ref[0]+(-0.744399116071)*x_ref[1]**o+(0.303429987787)*x_ref[1]
-        ref[1,0,0,1]=(-0.92849671168)*x_ref[0]**o+(0.050597602551)*x_ref[0]+(0.91000243103)*x_ref[1]**o+(-0.742775174195)*x_ref[1]
-        ref[1,0,1,0]=(0.281218131435)*x_ref[0]**o+(0.171029842909)*x_ref[0]+(-0.65806576709)*x_ref[1]**o+(-0.718069456213)*x_ref[1]
-        ref[1,0,1,1]=(0.312255067232)*x_ref[0]**o+(0.566401030665)*x_ref[0]+(-0.941709776271)*x_ref[1]**o+(0.0111896041808)*x_ref[1]
-        ref[1,0,2,0]=(-0.886019321094)*x_ref[0]**o+(-0.688815756004)*x_ref[0]+(-0.595491288141)*x_ref[1]**o+(0.343402495621)*x_ref[1]
-        ref[1,0,2,1]=(-0.681063845863)*x_ref[0]**o+(-0.676550403066)*x_ref[0]+(0.186106532969)*x_ref[1]**o+(0.181779537727)*x_ref[1]
-        ref[1,1,0,0]=(0.128588939989)*x_ref[0]**o+(0.477711214734)*x_ref[0]+(-0.17697460919)*x_ref[1]**o+(0.0217208670244)*x_ref[1]
-        ref[1,1,0,1]=(-0.652028522296)*x_ref[0]**o+(-0.503146425209)*x_ref[0]+(-0.427973128189)*x_ref[1]**o+(-0.182775422425)*x_ref[1]
-        ref[1,1,1,0]=(-0.0499349942904)*x_ref[0]**o+(-0.0183804745613)*x_ref[0]+(-0.912604094211)*x_ref[1]**o+(-0.949181938689)*x_ref[1]
-        ref[1,1,1,1]=(-0.472737626621)*x_ref[0]**o+(-0.142195314687)*x_ref[0]+(0.580775749383)*x_ref[1]**o+(-0.832549796746)*x_ref[1]
-        ref[1,1,2,0]=(-0.288756468146)*x_ref[0]**o+(-0.50657056474)*x_ref[0]+(-0.809713268333)*x_ref[1]**o+(0.598450102365)*x_ref[1]
-        ref[1,1,2,1]=(-0.259779636241)*x_ref[0]**o+(-0.227925001879)*x_ref[0]+(-0.0752800702413)*x_ref[1]**o+(-0.438841969161)*x_ref[1]
-        ref[1,2,0,0]=(-0.617835522076)*x_ref[0]**o+(-0.969275786274)*x_ref[0]+(0.899717033555)*x_ref[1]**o+(0.77648944909)*x_ref[1]
-        ref[1,2,0,1]=(-0.0619395581419)*x_ref[0]**o+(0.926394874574)*x_ref[0]+(0.984605961354)*x_ref[1]**o+(0.253347734181)*x_ref[1]
-        ref[1,2,1,0]=(0.748474342269)*x_ref[0]**o+(0.0794003341104)*x_ref[0]+(-0.244607682532)*x_ref[1]**o+(-0.228787873564)*x_ref[1]
-        ref[1,2,1,1]=(-0.266853205536)*x_ref[0]**o+(0.529714058158)*x_ref[0]+(-0.421599080872)*x_ref[1]**o+(-0.595557599245)*x_ref[1]
-        ref[1,2,2,0]=(-0.377962443753)*x_ref[0]**o+(0.609550409525)*x_ref[0]+(0.951904771097)*x_ref[1]**o+(-0.123551801933)*x_ref[1]
-        ref[1,2,2,1]=(0.3262671136)*x_ref[0]**o+(-0.574281078833)*x_ref[0]+(0.308261022622)*x_ref[1]**o+(-0.784762723843)*x_ref[1]
-        ref[1,3,0,0]=(-0.419601410829)*x_ref[0]**o+(-0.576064062071)*x_ref[0]+(-0.431574278091)*x_ref[1]**o+(-0.264303418881)*x_ref[1]
-        ref[1,3,0,1]=(0.176058414693)*x_ref[0]**o+(0.672752046411)*x_ref[0]+(-0.8579992002)*x_ref[1]**o+(-0.135904959185)*x_ref[1]
-        ref[1,3,1,0]=(0.84480795105)*x_ref[0]**o+(0.846846799225)*x_ref[0]+(0.134417432017)*x_ref[1]**o+(-0.725316162128)*x_ref[1]
-        ref[1,3,1,1]=(-0.102162279538)*x_ref[0]**o+(0.451180031789)*x_ref[0]+(0.490175190736)*x_ref[1]**o+(0.811823281177)*x_ref[1]
-        ref[1,3,2,0]=(-0.582177348293)*x_ref[0]**o+(-0.74631626712)*x_ref[0]+(-0.275524221012)*x_ref[1]**o+(-0.658276720144)*x_ref[1]
-        ref[1,3,2,1]=(0.304511057297)*x_ref[0]**o+(-0.354531411968)*x_ref[0]+(0.0944491594546)*x_ref[1]**o+(0.619039121597)*x_ref[1]
-        ref[1,4,0,0]=(0.754898520324)*x_ref[0]**o+(-0.28914218119)*x_ref[0]+(0.8660675945)*x_ref[1]**o+(0.526777161228)*x_ref[1]
-        ref[1,4,0,1]=(-0.820150637429)*x_ref[0]**o+(-0.399203443857)*x_ref[0]+(0.118863382167)*x_ref[1]**o+(0.269335037373)*x_ref[1]
-        ref[1,4,1,0]=(-0.669389232967)*x_ref[0]**o+(-0.119080399209)*x_ref[0]+(0.999919873616)*x_ref[1]**o+(0.733390578378)*x_ref[1]
-        ref[1,4,1,1]=(-0.85147101348)*x_ref[0]**o+(-0.0453996523642)*x_ref[0]+(0.00891698330334)*x_ref[1]**o+(-0.27128670805)*x_ref[1]
-        ref[1,4,2,0]=(-0.946558097166)*x_ref[0]**o+(0.0141300604882)*x_ref[0]+(0.04075090617)*x_ref[1]**o+(-0.141095386138)*x_ref[1]
-        ref[1,4,2,1]=(0.613700159605)*x_ref[0]**o+(0.115107829201)*x_ref[0]+(0.907429968641)*x_ref[1]**o+(0.901820725424)*x_ref[1]
-        ref[2,0,0,0]=(-0.629486588984)*x_ref[0]**o+(-0.590908868493)*x_ref[0]+(0.689333052519)*x_ref[1]**o+(0.22096464697)*x_ref[1]
-        ref[2,0,0,1]=(-0.475364708492)*x_ref[0]**o+(-0.3195126467)*x_ref[0]+(-0.688082519853)*x_ref[1]**o+(-0.889722517035)*x_ref[1]
-        ref[2,0,1,0]=(0.931261765284)*x_ref[0]**o+(0.399101548845)*x_ref[0]+(-0.185342345742)*x_ref[1]**o+(0.188927724838)*x_ref[1]
-        ref[2,0,1,1]=(-0.195889209768)*x_ref[0]**o+(-0.0878952476483)*x_ref[0]+(0.636980893598)*x_ref[1]**o+(0.827709469156)*x_ref[1]
-        ref[2,0,2,0]=(0.644658731705)*x_ref[0]**o+(0.275771474382)*x_ref[0]+(0.0802903363405)*x_ref[1]**o+(-0.157785300253)*x_ref[1]
-        ref[2,0,2,1]=(0.324153739483)*x_ref[0]**o+(-0.978043993375)*x_ref[0]+(0.440060321393)*x_ref[1]**o+(0.103952166755)*x_ref[1]
-        ref[2,1,0,0]=(-0.233567312787)*x_ref[0]**o+(0.139529308019)*x_ref[0]+(-0.200168759944)*x_ref[1]**o+(-0.629057762953)*x_ref[1]
-        ref[2,1,0,1]=(-0.407808993281)*x_ref[0]**o+(-0.208049914815)*x_ref[0]+(0.676817990818)*x_ref[1]**o+(-0.27174220248)*x_ref[1]
-        ref[2,1,1,0]=(-0.159113456499)*x_ref[0]**o+(0.586749846436)*x_ref[0]+(0.112658884741)*x_ref[1]**o+(0.521917298039)*x_ref[1]
-        ref[2,1,1,1]=(-0.377986619436)*x_ref[0]**o+(0.920912593255)*x_ref[0]+(0.61285598265)*x_ref[1]**o+(0.491316381102)*x_ref[1]
-        ref[2,1,2,0]=(-0.594573349393)*x_ref[0]**o+(-0.784940398408)*x_ref[0]+(0.0602427709094)*x_ref[1]**o+(0.381334187216)*x_ref[1]
-        ref[2,1,2,1]=(-0.359402310466)*x_ref[0]**o+(0.243014104221)*x_ref[0]+(0.960587701667)*x_ref[1]**o+(0.653124687952)*x_ref[1]
-        ref[2,2,0,0]=(0.667031182369)*x_ref[0]**o+(0.099374903559)*x_ref[0]+(0.00279841725989)*x_ref[1]**o+(-0.413751543412)*x_ref[1]
-        ref[2,2,0,1]=(0.793557898241)*x_ref[0]**o+(0.146572317359)*x_ref[0]+(0.812964170008)*x_ref[1]**o+(-0.988110793397)*x_ref[1]
-        ref[2,2,1,0]=(0.900661246137)*x_ref[0]**o+(-0.997975978586)*x_ref[0]+(0.63300171387)*x_ref[1]**o+(-0.103878548778)*x_ref[1]
-        ref[2,2,1,1]=(-0.456464050469)*x_ref[0]**o+(0.830699811714)*x_ref[0]+(-0.186689927425)*x_ref[1]**o+(-0.100170151164)*x_ref[1]
-        ref[2,2,2,0]=(0.732282428164)*x_ref[0]**o+(0.928947589228)*x_ref[0]+(-0.282773641579)*x_ref[1]**o+(-0.927533112027)*x_ref[1]
-        ref[2,2,2,1]=(0.768111868708)*x_ref[0]**o+(-0.308231472858)*x_ref[0]+(0.890807565689)*x_ref[1]**o+(-0.731196891492)*x_ref[1]
-        ref[2,3,0,0]=(0.559658559574)*x_ref[0]**o+(0.104536615096)*x_ref[0]+(-0.162594824125)*x_ref[1]**o+(-0.172859200721)*x_ref[1]
-        ref[2,3,0,1]=(0.769297853152)*x_ref[0]**o+(0.346598673904)*x_ref[0]+(0.0313124779153)*x_ref[1]**o+(-0.751767979251)*x_ref[1]
-        ref[2,3,1,0]=(0.870887050816)*x_ref[0]**o+(0.593904859463)*x_ref[0]+(-0.108083837899)*x_ref[1]**o+(0.5467383682)*x_ref[1]
-        ref[2,3,1,1]=(0.244253227645)*x_ref[0]**o+(0.911176738654)*x_ref[0]+(-0.497855487714)*x_ref[1]**o+(0.226443212585)*x_ref[1]
-        ref[2,3,2,0]=(-0.599893560596)*x_ref[0]**o+(-0.893030581717)*x_ref[0]+(-0.745249903413)*x_ref[1]**o+(0.563740068619)*x_ref[1]
-        ref[2,3,2,1]=(-0.198088241103)*x_ref[0]**o+(-0.171306730647)*x_ref[0]+(-0.917417138299)*x_ref[1]**o+(0.233920617125)*x_ref[1]
-        ref[2,4,0,0]=(0.804585270618)*x_ref[0]**o+(0.3784879961)*x_ref[0]+(0.621076476928)*x_ref[1]**o+(-0.534671153952)*x_ref[1]
-        ref[2,4,0,1]=(0.380555159947)*x_ref[0]**o+(-0.630487045841)*x_ref[0]+(0.917413683072)*x_ref[1]**o+(0.491925783834)*x_ref[1]
-        ref[2,4,1,0]=(0.946642644964)*x_ref[0]**o+(-0.236438579482)*x_ref[0]+(0.525585953739)*x_ref[1]**o+(0.499940951133)*x_ref[1]
-        ref[2,4,1,1]=(0.827450889548)*x_ref[0]**o+(-0.73264543626)*x_ref[0]+(0.0626492901072)*x_ref[1]**o+(-0.882759632862)*x_ref[1]
-        ref[2,4,2,0]=(-0.0671814496498)*x_ref[0]**o+(0.108634446052)*x_ref[0]+(-0.421081640868)*x_ref[1]**o+(-0.546455336395)*x_ref[1]
-        ref[2,4,2,1]=(-0.601339784479)*x_ref[0]**o+(-0.206937965916)*x_ref[0]+(-0.849120792543)*x_ref[1]**o+(0.615842037441)*x_ref[1]
-        ref[3,0,0,0]=(0.640466650913)*x_ref[0]**o+(-0.936176165762)*x_ref[0]+(0.12758686525)*x_ref[1]**o+(-0.104771286099)*x_ref[1]
-        ref[3,0,0,1]=(-0.868109993006)*x_ref[0]**o+(0.470815003671)*x_ref[0]+(-0.301208743474)*x_ref[1]**o+(-0.296271408095)*x_ref[1]
-        ref[3,0,1,0]=(0.66584252787)*x_ref[0]**o+(-0.889549573986)*x_ref[0]+(-0.0876076820512)*x_ref[1]**o+(-0.249000029178)*x_ref[1]
-        ref[3,0,1,1]=(0.289388044606)*x_ref[0]**o+(0.674519856916)*x_ref[0]+(-0.721031236925)*x_ref[1]**o+(0.093281544052)*x_ref[1]
-        ref[3,0,2,0]=(-0.0558863543119)*x_ref[0]**o+(-0.367544430651)*x_ref[0]+(-0.85580152565)*x_ref[1]**o+(-0.140166367203)*x_ref[1]
-        ref[3,0,2,1]=(0.600709511675)*x_ref[0]**o+(0.286322916564)*x_ref[0]+(-0.544094007372)*x_ref[1]**o+(0.470305833347)*x_ref[1]
-        ref[3,1,0,0]=(-0.828780197168)*x_ref[0]**o+(-0.568096532278)*x_ref[0]+(0.435127414299)*x_ref[1]**o+(0.96890877255)*x_ref[1]
-        ref[3,1,0,1]=(0.191455614175)*x_ref[0]**o+(-0.99507613827)*x_ref[0]+(0.0735829936134)*x_ref[1]**o+(0.635849313153)*x_ref[1]
-        ref[3,1,1,0]=(-0.839049013591)*x_ref[0]**o+(-0.718731394184)*x_ref[0]+(0.575853740085)*x_ref[1]**o+(-0.57924857477)*x_ref[1]
-        ref[3,1,1,1]=(0.116876810453)*x_ref[0]**o+(0.145727923885)*x_ref[0]+(0.0155069936368)*x_ref[1]**o+(0.223214885433)*x_ref[1]
-        ref[3,1,2,0]=(-0.674811720223)*x_ref[0]**o+(0.651640807063)*x_ref[0]+(-0.652022625703)*x_ref[1]**o+(-0.119110788344)*x_ref[1]
-        ref[3,1,2,1]=(-0.544748794193)*x_ref[0]**o+(-0.689440165483)*x_ref[0]+(0.936900319026)*x_ref[1]**o+(-0.337287311564)*x_ref[1]
-        ref[3,2,0,0]=(-0.355059804554)*x_ref[0]**o+(0.458306329535)*x_ref[0]+(0.172261907494)*x_ref[1]**o+(0.498548138594)*x_ref[1]
-        ref[3,2,0,1]=(0.624420187129)*x_ref[0]**o+(0.808931844722)*x_ref[0]+(-0.690635894194)*x_ref[1]**o+(-0.156122444554)*x_ref[1]
-        ref[3,2,1,0]=(-0.190029529776)*x_ref[0]**o+(0.925600418137)*x_ref[0]+(0.601040324953)*x_ref[1]**o+(0.615485749173)*x_ref[1]
-        ref[3,2,1,1]=(0.679796674662)*x_ref[0]**o+(0.879285148869)*x_ref[0]+(0.0476373514288)*x_ref[1]**o+(0.37655760501)*x_ref[1]
-        ref[3,2,2,0]=(0.231748550393)*x_ref[0]**o+(0.209858138221)*x_ref[0]+(-0.88372579866)*x_ref[1]**o+(0.30534744967)*x_ref[1]
-        ref[3,2,2,1]=(-0.772177697671)*x_ref[0]**o+(0.012439044435)*x_ref[0]+(-0.293218976284)*x_ref[1]**o+(0.306955066595)*x_ref[1]
-        ref[3,3,0,0]=(0.387256929042)*x_ref[0]**o+(-0.434015953267)*x_ref[0]+(-0.098736946868)*x_ref[1]**o+(-0.0837712534186)*x_ref[1]
-        ref[3,3,0,1]=(0.396246252967)*x_ref[0]**o+(-0.338955181605)*x_ref[0]+(-0.353504371554)*x_ref[1]**o+(-0.969811402293)*x_ref[1]
-        ref[3,3,1,0]=(-0.336508964723)*x_ref[0]**o+(-0.411882233342)*x_ref[0]+(-0.603965321132)*x_ref[1]**o+(0.177221705416)*x_ref[1]
-        ref[3,3,1,1]=(0.786971174387)*x_ref[0]**o+(0.759003522166)*x_ref[0]+(-0.0961289050409)*x_ref[1]**o+(-0.0811258682982)*x_ref[1]
-        ref[3,3,2,0]=(0.526266925685)*x_ref[0]**o+(-0.113145219611)*x_ref[0]+(-0.208427816884)*x_ref[1]**o+(0.291484710079)*x_ref[1]
-        ref[3,3,2,1]=(-0.591153907468)*x_ref[0]**o+(-0.342892047641)*x_ref[0]+(0.865954283634)*x_ref[1]**o+(-0.22112030903)*x_ref[1]
-        ref[3,4,0,0]=(0.755162128186)*x_ref[0]**o+(0.494457469003)*x_ref[0]+(0.889254517137)*x_ref[1]**o+(0.880654056969)*x_ref[1]
-        ref[3,4,0,1]=(0.450983401629)*x_ref[0]**o+(-0.0855489110466)*x_ref[0]+(0.0601625202676)*x_ref[1]**o+(-0.0730383237708)*x_ref[1]
-        ref[3,4,1,0]=(0.495514588456)*x_ref[0]**o+(-0.0895269876334)*x_ref[0]+(-0.89729630673)*x_ref[1]**o+(0.759465768614)*x_ref[1]
-        ref[3,4,1,1]=(-0.666472982468)*x_ref[0]**o+(-0.251715028171)*x_ref[0]+(-0.0623287375223)*x_ref[1]**o+(-0.895663326995)*x_ref[1]
-        ref[3,4,2,0]=(0.489737923112)*x_ref[0]**o+(0.868066981889)*x_ref[0]+(0.0371747456704)*x_ref[1]**o+(-0.528951636028)*x_ref[1]
-        ref[3,4,2,1]=(0.556312598455)*x_ref[0]**o+(-0.0979773350236)*x_ref[0]+(-0.82785928691)*x_ref[1]**o+(-0.567596765858)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.952750275738)*x[0]**o+(0.971489204087)*x[0]+(-0.320706487584)*x[1]**o+(-0.853260471578)*x[1]+(-0.696434862068)*x[2]**o+(0.641824397433)*x[2]
-        arg[0,0,0,1]=(0.115484192786)*x[0]**o+(0.147813687309)*x[0]+(-0.998010548186)*x[1]**o+(0.0274712088882)*x[1]+(0.136937971489)*x[2]**o+(-0.657986135444)*x[2]
-        arg[0,0,1,0]=(0.805857504779)*x[0]**o+(0.196278916938)*x[0]+(-0.969340785263)*x[1]**o+(-0.543890174888)*x[1]+(0.49118423357)*x[2]**o+(-0.883493800593)*x[2]
-        arg[0,0,1,1]=(-0.808802136474)*x[0]**o+(-0.866039395649)*x[0]+(0.0339207025941)*x[1]**o+(-0.441368773534)*x[1]+(0.673688211653)*x[2]**o+(0.917894389398)*x[2]
-        arg[0,0,2,0]=(0.0459902210078)*x[0]**o+(0.862332666528)*x[0]+(-0.547792306389)*x[1]**o+(0.722176431732)*x[1]+(-0.511278989032)*x[2]**o+(-0.692775336577)*x[2]
-        arg[0,0,2,1]=(-0.641904406513)*x[0]**o+(-0.854450656063)*x[0]+(0.81138894849)*x[1]**o+(0.328886625074)*x[1]+(0.400935831363)*x[2]**o+(-0.25184059766)*x[2]
-        arg[0,1,0,0]=(0.69922840942)*x[0]**o+(-0.798085508443)*x[0]+(-0.85191383431)*x[1]**o+(-0.162940829331)*x[1]+(0.504020642931)*x[2]**o+(0.0950957436173)*x[2]
-        arg[0,1,0,1]=(0.28901429037)*x[0]**o+(-0.624508745729)*x[0]+(0.921288077478)*x[1]**o+(-0.769207901119)*x[1]+(0.0852374599763)*x[2]**o+(-0.402583033986)*x[2]
-        arg[0,1,1,0]=(0.715817282215)*x[0]**o+(0.68735256665)*x[0]+(0.610212058649)*x[1]**o+(0.53560824609)*x[1]+(-0.238908897264)*x[2]**o+(0.619799158474)*x[2]
-        arg[0,1,1,1]=(-0.371797414191)*x[0]**o+(0.106263350514)*x[0]+(0.583768355362)*x[1]**o+(0.818797667369)*x[1]+(0.0567571152493)*x[2]**o+(-0.242244867169)*x[2]
-        arg[0,1,2,0]=(0.190480659729)*x[0]**o+(-0.632415604771)*x[0]+(0.252513826138)*x[1]**o+(0.874732840469)*x[1]+(-0.367769326078)*x[2]**o+(0.364453292404)*x[2]
-        arg[0,1,2,1]=(-0.704507136581)*x[0]**o+(-0.614211737547)*x[0]+(0.533383507313)*x[1]**o+(-0.940007583478)*x[1]+(0.558260002746)*x[2]**o+(0.742565692751)*x[2]
-        arg[0,2,0,0]=(0.132581156766)*x[0]**o+(0.671793183183)*x[0]+(-0.308255110769)*x[1]**o+(-0.956002957061)*x[1]+(0.300091541301)*x[2]**o+(-0.714260746791)*x[2]
-        arg[0,2,0,1]=(-0.836648080859)*x[0]**o+(0.123813861017)*x[0]+(0.866569934894)*x[1]**o+(-0.957824572351)*x[1]+(-0.904478410952)*x[2]**o+(0.691673758521)*x[2]
-        arg[0,2,1,0]=(0.411624721878)*x[0]**o+(0.594054722352)*x[0]+(0.150177701135)*x[1]**o+(0.945855261084)*x[1]+(0.295930158817)*x[2]**o+(-0.607980954424)*x[2]
-        arg[0,2,1,1]=(-0.0777741308373)*x[0]**o+(0.697501295655)*x[0]+(0.981797797329)*x[1]**o+(-0.671827077949)*x[1]+(0.292310146229)*x[2]**o+(0.484652357857)*x[2]
-        arg[0,2,2,0]=(0.194910469807)*x[0]**o+(-0.70008515623)*x[0]+(0.192808336639)*x[1]**o+(-0.962764477371)*x[1]+(-0.34292240753)*x[2]**o+(0.525470829202)*x[2]
-        arg[0,2,2,1]=(0.850368420228)*x[0]**o+(-0.516355386368)*x[0]+(0.395764367873)*x[1]**o+(0.320830752607)*x[1]+(-0.26288679044)*x[2]**o+(0.174457723191)*x[2]
-        arg[0,3,0,0]=(-0.713987556845)*x[0]**o+(0.0391066248253)*x[0]+(-0.63911733479)*x[1]**o+(-0.119953032121)*x[1]+(0.697879836447)*x[2]**o+(-0.474957057702)*x[2]
-        arg[0,3,0,1]=(-0.128614897423)*x[0]**o+(0.7166036403)*x[0]+(0.678415978447)*x[1]**o+(-0.191453169618)*x[1]+(-0.755261361956)*x[2]**o+(-0.839956004196)*x[2]
-        arg[0,3,1,0]=(0.258158740934)*x[0]**o+(-0.412199346967)*x[0]+(-0.781106341272)*x[1]**o+(-0.561162823101)*x[1]+(-0.59549864377)*x[2]**o+(-0.748038415721)*x[2]
-        arg[0,3,1,1]=(0.68950222305)*x[0]**o+(-0.904027774445)*x[0]+(0.769744453441)*x[1]**o+(-0.265549152752)*x[1]+(-0.375978837131)*x[2]**o+(-0.387010981761)*x[2]
-        arg[0,3,2,0]=(0.46852681319)*x[0]**o+(-0.887650258615)*x[0]+(-0.780275624319)*x[1]**o+(0.527897372599)*x[1]+(0.889281778411)*x[2]**o+(0.82538563877)*x[2]
-        arg[0,3,2,1]=(-0.817514448184)*x[0]**o+(-0.230190768519)*x[0]+(-0.101550849344)*x[1]**o+(0.1654885857)*x[1]+(-0.231317749498)*x[2]**o+(0.580153306395)*x[2]
-        arg[0,4,0,0]=(0.394993007242)*x[0]**o+(0.305948764395)*x[0]+(-0.66853441368)*x[1]**o+(0.279027498094)*x[1]+(0.161366934709)*x[2]**o+(-0.742002471552)*x[2]
-        arg[0,4,0,1]=(-0.661214709471)*x[0]**o+(0.548880317935)*x[0]+(0.472682748503)*x[1]**o+(0.266797505699)*x[1]+(0.405618413683)*x[2]**o+(-0.0539677542667)*x[2]
-        arg[0,4,1,0]=(-0.713892424429)*x[0]**o+(0.568075831592)*x[0]+(-0.956180895599)*x[1]**o+(0.63618957695)*x[1]+(0.983696160047)*x[2]**o+(-0.308157929002)*x[2]
-        arg[0,4,1,1]=(-0.666582919353)*x[0]**o+(0.0816884254484)*x[0]+(0.190810048896)*x[1]**o+(0.482322905132)*x[1]+(-0.576597070954)*x[2]**o+(-0.722381611553)*x[2]
-        arg[0,4,2,0]=(-0.0229650731041)*x[0]**o+(-0.0867816754979)*x[0]+(0.0905042102365)*x[1]**o+(-0.994963424765)*x[1]+(0.74504757815)*x[2]**o+(0.71462549644)*x[2]
-        arg[0,4,2,1]=(-0.0464278496147)*x[0]**o+(0.122501026996)*x[0]+(-0.049450141901)*x[1]**o+(-0.388739464086)*x[1]+(-0.151389885067)*x[2]**o+(-0.0316948088803)*x[2]
-        arg[1,0,0,0]=(-0.303653386851)*x[0]**o+(-0.435866753659)*x[0]+(-0.419078175082)*x[1]**o+(-0.907595244917)*x[1]+(0.442156528837)*x[2]**o+(-0.76481785523)*x[2]
-        arg[1,0,0,1]=(0.879454551618)*x[0]**o+(-0.530789858588)*x[0]+(0.942203776542)*x[1]**o+(0.864362935436)*x[1]+(-0.252832164588)*x[2]**o+(0.00758252581015)*x[2]
-        arg[1,0,1,0]=(0.522433142898)*x[0]**o+(0.564002257569)*x[0]+(0.149811689377)*x[1]**o+(-0.757726948165)*x[1]+(-0.767052869719)*x[2]**o+(0.743541806001)*x[2]
-        arg[1,0,1,1]=(0.535612198186)*x[0]**o+(0.0874480088401)*x[0]+(0.913151292296)*x[1]**o+(-0.495024655308)*x[1]+(-0.42308905182)*x[2]**o+(-0.983623551153)*x[2]
-        arg[1,0,2,0]=(0.587221456352)*x[0]**o+(0.0384438535009)*x[0]+(0.301554087927)*x[1]**o+(-0.944074061806)*x[1]+(0.808195432991)*x[2]**o+(-0.46545743768)*x[2]
-        arg[1,0,2,1]=(0.136251169669)*x[0]**o+(0.772190271875)*x[0]+(-0.490981224022)*x[1]**o+(-0.191915588448)*x[1]+(0.792617864405)*x[2]**o+(0.139425359773)*x[2]
-        arg[1,1,0,0]=(0.0440493146329)*x[0]**o+(-0.948951787109)*x[0]+(-0.564104026105)*x[1]**o+(0.177457883377)*x[1]+(0.578169345377)*x[2]**o+(0.35574407049)*x[2]
-        arg[1,1,0,1]=(-0.740305651819)*x[0]**o+(-0.340976006932)*x[0]+(-0.657257828033)*x[1]**o+(-0.456240473558)*x[1]+(0.526236681039)*x[2]**o+(0.804762801115)*x[2]
-        arg[1,1,1,0]=(-0.753480536304)*x[0]**o+(0.424080516297)*x[0]+(-0.97529611006)*x[1]**o+(-0.511450162624)*x[1]+(-0.248982226385)*x[2]**o+(0.497803766242)*x[2]
-        arg[1,1,1,1]=(-0.273280180629)*x[0]**o+(0.798945176097)*x[0]+(0.552152546131)*x[1]**o+(0.737594404744)*x[1]+(0.0339269287984)*x[2]**o+(-0.773791176515)*x[2]
-        arg[1,1,2,0]=(0.553404075378)*x[0]**o+(-0.630969888585)*x[0]+(0.455072287913)*x[1]**o+(0.145928503781)*x[1]+(0.632480470504)*x[2]**o+(0.363815684296)*x[2]
-        arg[1,1,2,1]=(-0.426756293656)*x[0]**o+(-0.449867410734)*x[0]+(-0.875891527959)*x[1]**o+(-0.125243159763)*x[1]+(0.887344501669)*x[2]**o+(-0.0569005112264)*x[2]
-        arg[1,2,0,0]=(0.762313320036)*x[0]**o+(-0.514266376348)*x[0]+(-0.915248032301)*x[1]**o+(0.50418081892)*x[1]+(-0.867662577318)*x[2]**o+(0.731635970592)*x[2]
-        arg[1,2,0,1]=(-0.0866106252969)*x[0]**o+(0.063250309716)*x[0]+(0.598723588976)*x[1]**o+(0.317235331686)*x[1]+(-0.412892601258)*x[2]**o+(0.771147670726)*x[2]
-        arg[1,2,1,0]=(0.57639148624)*x[0]**o+(0.773916349481)*x[0]+(0.401319543026)*x[1]**o+(-0.510387398986)*x[1]+(-0.796773375436)*x[2]**o+(-0.765544756429)*x[2]
-        arg[1,2,1,1]=(-0.686952109389)*x[0]**o+(0.428892331428)*x[0]+(-0.139971762047)*x[1]**o+(-0.747581454837)*x[1]+(0.152196734461)*x[2]**o+(-0.778424993847)*x[2]
-        arg[1,2,2,0]=(0.729199771391)*x[0]**o+(0.185870258363)*x[0]+(0.996198489286)*x[1]**o+(0.0343703739018)*x[1]+(-0.6637833208)*x[2]**o+(-0.738510210409)*x[2]
-        arg[1,2,2,1]=(0.705773326438)*x[0]**o+(-0.633406525448)*x[0]+(0.252620923822)*x[1]**o+(-0.760785834478)*x[1]+(0.995411456622)*x[2]**o+(-0.365718663741)*x[2]
-        arg[1,3,0,0]=(0.826142335301)*x[0]**o+(-0.869335317945)*x[0]+(0.660360312658)*x[1]**o+(0.96157015332)*x[1]+(-0.268246324116)*x[2]**o+(-0.575288823295)*x[2]
-        arg[1,3,0,1]=(0.620117943072)*x[0]**o+(0.51267609202)*x[0]+(-0.882468485772)*x[1]**o+(0.771021246475)*x[1]+(0.398548927211)*x[2]**o+(0.275983192446)*x[2]
-        arg[1,3,1,0]=(0.716523839796)*x[0]**o+(-0.0868143348547)*x[0]+(-0.456384710114)*x[1]**o+(-0.646489063979)*x[1]+(0.594500214771)*x[2]**o+(-0.299956296467)*x[2]
-        arg[1,3,1,1]=(-0.453257208906)*x[0]**o+(0.583260425119)*x[0]+(0.263463648634)*x[1]**o+(0.493693446665)*x[1]+(-0.529884773858)*x[2]**o+(0.220733486264)*x[2]
-        arg[1,3,2,0]=(0.669052014654)*x[0]**o+(-0.247902780475)*x[0]+(0.44071786167)*x[1]**o+(-0.21199653848)*x[1]+(-0.0713603448391)*x[2]**o+(-0.66681439981)*x[2]
-        arg[1,3,2,1]=(-0.341533813758)*x[0]**o+(0.770581995272)*x[0]+(0.03376913861)*x[1]**o+(0.000270719073091)*x[1]+(-0.774936686899)*x[2]**o+(-0.0196300167016)*x[2]
-        arg[1,4,0,0]=(-0.869695667108)*x[0]**o+(0.515676789402)*x[0]+(0.67731822534)*x[1]**o+(0.126887846346)*x[1]+(0.843200966455)*x[2]**o+(-0.59930363301)*x[2]
-        arg[1,4,0,1]=(0.909369352728)*x[0]**o+(-0.110828876636)*x[0]+(-0.65561953478)*x[1]**o+(0.598491879954)*x[1]+(-0.557567770163)*x[2]**o+(-0.391108926502)*x[2]
-        arg[1,4,1,0]=(0.320646291934)*x[0]**o+(0.164062007697)*x[0]+(-0.546323998218)*x[1]**o+(0.72651711346)*x[1]+(-0.613496738898)*x[2]**o+(0.430761082137)*x[2]
-        arg[1,4,1,1]=(-0.721651561555)*x[0]**o+(-0.0647310624509)*x[0]+(-0.360525345485)*x[1]**o+(0.408239277468)*x[1]+(0.600551705094)*x[2]**o+(0.506237401392)*x[2]
-        arg[1,4,2,0]=(-0.391702965605)*x[0]**o+(-0.574470582913)*x[0]+(-0.729724609696)*x[1]**o+(0.91381180302)*x[1]+(-0.544328104929)*x[2]**o+(-0.516992534607)*x[2]
-        arg[1,4,2,1]=(-0.0409666962711)*x[0]**o+(-0.524913112823)*x[0]+(-0.677030607856)*x[1]**o+(-0.530859496807)*x[1]+(0.137890059737)*x[2]**o+(0.0669856870322)*x[2]
-        arg[2,0,0,0]=(0.10369318023)*x[0]**o+(0.345691611083)*x[0]+(-0.222795950561)*x[1]**o+(-0.797690270935)*x[1]+(-0.703457203234)*x[2]**o+(-0.751193209871)*x[2]
-        arg[2,0,0,1]=(0.166457278787)*x[0]**o+(-0.0304766240065)*x[0]+(0.159987374581)*x[1]**o+(0.828012214748)*x[1]+(0.0670696566332)*x[2]**o+(-0.498252024306)*x[2]
-        arg[2,0,1,0]=(0.901095992383)*x[0]**o+(0.400296735981)*x[0]+(0.394687295672)*x[1]**o+(-0.986496611224)*x[1]+(-0.768945602918)*x[2]**o+(-0.782762026735)*x[2]
-        arg[2,0,1,1]=(0.47969549703)*x[0]**o+(0.981251232699)*x[0]+(-0.69807700503)*x[1]**o+(-0.813549271424)*x[1]+(-0.135970806025)*x[2]**o+(0.288738861745)*x[2]
-        arg[2,0,2,0]=(0.315262113284)*x[0]**o+(0.0380265323361)*x[0]+(0.259894600802)*x[1]**o+(0.538712801332)*x[1]+(-0.385783597257)*x[2]**o+(0.666670257561)*x[2]
-        arg[2,0,2,1]=(-0.756715539091)*x[0]**o+(-0.823809574081)*x[0]+(-0.283842954238)*x[1]**o+(-0.640166311159)*x[1]+(-0.39947011053)*x[2]**o+(-0.393543798757)*x[2]
-        arg[2,1,0,0]=(-0.292033523499)*x[0]**o+(-0.940246412652)*x[0]+(-0.327571437608)*x[1]**o+(0.837077706655)*x[1]+(0.446471499818)*x[2]**o+(-0.747249149016)*x[2]
-        arg[2,1,0,1]=(-0.867504469067)*x[0]**o+(0.635684140727)*x[0]+(0.488043128661)*x[1]**o+(-0.163389002402)*x[1]+(0.0440527250714)*x[2]**o+(0.605766722432)*x[2]
-        arg[2,1,1,0]=(-0.0622304802635)*x[0]**o+(0.607299318698)*x[0]+(0.974933906045)*x[1]**o+(0.0632442428777)*x[1]+(0.0672808299851)*x[2]**o+(-0.555700803374)*x[2]
-        arg[2,1,1,1]=(-0.350438453721)*x[0]**o+(-0.826289294567)*x[0]+(-0.473764081208)*x[1]**o+(-0.247804269494)*x[1]+(0.834301955859)*x[2]**o+(0.443058363661)*x[2]
-        arg[2,1,2,0]=(0.5046026606)*x[0]**o+(0.305502438052)*x[0]+(-0.201816724695)*x[1]**o+(-0.101544576856)*x[1]+(0.729817329051)*x[2]**o+(-0.851479834334)*x[2]
-        arg[2,1,2,1]=(0.917039424926)*x[0]**o+(0.260565966637)*x[0]+(-0.595846674057)*x[1]**o+(0.654773238108)*x[1]+(0.544664592565)*x[2]**o+(0.363343885358)*x[2]
-        arg[2,2,0,0]=(0.243879200917)*x[0]**o+(0.335612613868)*x[0]+(-0.287066716076)*x[1]**o+(0.506206687739)*x[1]+(-0.902513036448)*x[2]**o+(-0.427017746025)*x[2]
-        arg[2,2,0,1]=(0.965102871162)*x[0]**o+(0.161476912964)*x[0]+(0.97007160306)*x[1]**o+(0.870104939402)*x[1]+(0.552404991536)*x[2]**o+(-0.319082395552)*x[2]
-        arg[2,2,1,0]=(0.17611459545)*x[0]**o+(-0.457419791602)*x[0]+(-0.00217752259743)*x[1]**o+(-0.632177103931)*x[1]+(0.521123797224)*x[2]**o+(0.427935307605)*x[2]
-        arg[2,2,1,1]=(-0.993298850316)*x[0]**o+(0.277763727112)*x[0]+(0.849464768611)*x[1]**o+(0.890919639607)*x[1]+(0.01030894969)*x[2]**o+(-0.76051772768)*x[2]
-        arg[2,2,2,0]=(-0.622887788117)*x[0]**o+(0.40187802561)*x[0]+(0.836685367934)*x[1]**o+(0.700379534201)*x[1]+(0.683627950354)*x[2]**o+(0.445351804296)*x[2]
-        arg[2,2,2,1]=(0.124965536288)*x[0]**o+(-0.198462168996)*x[0]+(-0.657084126986)*x[1]**o+(-0.420469996385)*x[1]+(0.237164091597)*x[2]**o+(0.161926160295)*x[2]
-        arg[2,3,0,0]=(-0.622682941897)*x[0]**o+(-0.6279729398)*x[0]+(0.189086870792)*x[1]**o+(-0.350822257394)*x[1]+(-0.505481371359)*x[2]**o+(0.812944216714)*x[2]
-        arg[2,3,0,1]=(-0.246704719057)*x[0]**o+(0.513716384141)*x[0]+(-0.264914192193)*x[1]**o+(-0.32984984663)*x[1]+(-0.80409813849)*x[2]**o+(-0.825568736974)*x[2]
-        arg[2,3,1,0]=(-0.534782640399)*x[0]**o+(-0.917823259622)*x[0]+(0.691827074405)*x[1]**o+(-0.818629872154)*x[1]+(0.870046992385)*x[2]**o+(0.00423218787803)*x[2]
-        arg[2,3,1,1]=(0.633068676613)*x[0]**o+(-0.895613811402)*x[0]+(0.62242069294)*x[1]**o+(-0.272136050955)*x[1]+(-0.199008776357)*x[2]**o+(0.836119124508)*x[2]
-        arg[2,3,2,0]=(0.335884106464)*x[0]**o+(-0.857917873801)*x[0]+(-0.42653278071)*x[1]**o+(0.375200781448)*x[1]+(0.378427453722)*x[2]**o+(0.398603623445)*x[2]
-        arg[2,3,2,1]=(0.0602499604703)*x[0]**o+(-0.921459358089)*x[0]+(0.558180675902)*x[1]**o+(0.0863734870743)*x[1]+(0.215167095483)*x[2]**o+(-0.37908830738)*x[2]
-        arg[2,4,0,0]=(0.866321987007)*x[0]**o+(0.81950553744)*x[0]+(0.0422552872889)*x[1]**o+(0.369328458453)*x[1]+(0.0547909452885)*x[2]**o+(-0.396367133883)*x[2]
-        arg[2,4,0,1]=(0.438824337571)*x[0]**o+(0.211435787811)*x[0]+(-0.801273340861)*x[1]**o+(-0.181654271172)*x[1]+(0.374171148243)*x[2]**o+(0.945633108881)*x[2]
-        arg[2,4,1,0]=(0.588044951473)*x[0]**o+(0.401384824924)*x[0]+(-0.191996429616)*x[1]**o+(0.0472579697166)*x[1]+(0.470962958517)*x[2]**o+(0.52718875619)*x[2]
-        arg[2,4,1,1]=(0.371613549998)*x[0]**o+(-0.414998926249)*x[0]+(-0.762013182749)*x[1]**o+(0.796144230249)*x[1]+(-0.555041053148)*x[2]**o+(-0.595298275916)*x[2]
-        arg[2,4,2,0]=(-0.992527136862)*x[0]**o+(-0.995041267483)*x[0]+(-0.730305990844)*x[1]**o+(-0.52470798566)*x[1]+(-0.938945944067)*x[2]**o+(0.33396135548)*x[2]
-        arg[2,4,2,1]=(0.0333921786723)*x[0]**o+(0.707990374515)*x[0]+(-0.106667413755)*x[1]**o+(0.282989655082)*x[1]+(-0.152535982788)*x[2]**o+(-0.75130096727)*x[2]
-        arg[3,0,0,0]=(-0.822675771493)*x[0]**o+(0.726468488157)*x[0]+(0.972567560814)*x[1]**o+(0.308266449093)*x[1]+(0.71069864654)*x[2]**o+(-0.683195491271)*x[2]
-        arg[3,0,0,1]=(-0.505155072199)*x[0]**o+(0.339013729552)*x[0]+(-0.81565931012)*x[1]**o+(0.362458680494)*x[1]+(0.960221320064)*x[2]**o+(-0.17234580875)*x[2]
-        arg[3,0,1,0]=(0.67972657926)*x[0]**o+(0.143085543693)*x[0]+(-0.699516563264)*x[1]**o+(-0.892226133751)*x[1]+(-0.898541541049)*x[2]**o+(-0.736249681714)*x[2]
-        arg[3,0,1,1]=(-0.144423319215)*x[0]**o+(-0.509713525676)*x[0]+(0.347584762861)*x[1]**o+(0.666169972794)*x[1]+(0.691734080163)*x[2]**o+(0.9338062148)*x[2]
-        arg[3,0,2,0]=(-0.47323843589)*x[0]**o+(0.0819655059363)*x[0]+(0.0863030211133)*x[1]**o+(0.127803089307)*x[1]+(-0.155852489756)*x[2]**o+(-0.00470398386987)*x[2]
-        arg[3,0,2,1]=(0.372452726232)*x[0]**o+(0.133808609857)*x[0]+(0.962945642209)*x[1]**o+(0.0446609213929)*x[1]+(-0.446207951293)*x[2]**o+(0.0400733439868)*x[2]
-        arg[3,1,0,0]=(-0.668575734235)*x[0]**o+(0.905913572459)*x[0]+(-0.321327880802)*x[1]**o+(0.0263209456188)*x[1]+(-0.0355325780368)*x[2]**o+(-0.624130395105)*x[2]
-        arg[3,1,0,1]=(0.859810828483)*x[0]**o+(-0.235372125226)*x[0]+(-0.16715244612)*x[1]**o+(-0.793399872713)*x[1]+(0.303973795556)*x[2]**o+(0.176740655638)*x[2]
-        arg[3,1,1,0]=(0.736448874258)*x[0]**o+(-0.448956585466)*x[0]+(0.782095902992)*x[1]**o+(0.796524196866)*x[1]+(-0.732812289541)*x[2]**o+(0.687089667291)*x[2]
-        arg[3,1,1,1]=(-0.797708068194)*x[0]**o+(-0.691308116296)*x[0]+(-0.644065410151)*x[1]**o+(-0.929624672017)*x[1]+(0.265040940279)*x[2]**o+(0.424929324889)*x[2]
-        arg[3,1,2,0]=(0.555032482777)*x[0]**o+(-0.564617314931)*x[0]+(-0.612721853869)*x[1]**o+(-0.048466699593)*x[1]+(0.753265037897)*x[2]**o+(0.913086239874)*x[2]
-        arg[3,1,2,1]=(0.580881807771)*x[0]**o+(0.970973128604)*x[0]+(-0.603610563753)*x[1]**o+(0.979985814438)*x[1]+(-0.639531987694)*x[2]**o+(-0.773094138073)*x[2]
-        arg[3,2,0,0]=(0.574306840544)*x[0]**o+(0.449094769988)*x[0]+(-0.406303076614)*x[1]**o+(-0.776648781906)*x[1]+(-0.59829476647)*x[2]**o+(0.257632446666)*x[2]
-        arg[3,2,0,1]=(0.689106127051)*x[0]**o+(0.717184851708)*x[0]+(-0.495581943615)*x[1]**o+(-0.30329139788)*x[1]+(0.901753128535)*x[2]**o+(0.48496505727)*x[2]
-        arg[3,2,1,0]=(0.252050902256)*x[0]**o+(-0.0414281706943)*x[0]+(-0.284125627654)*x[1]**o+(0.477450554269)*x[1]+(0.849202242148)*x[2]**o+(0.211826565889)*x[2]
-        arg[3,2,1,1]=(-0.319900673571)*x[0]**o+(0.965993723739)*x[0]+(0.671360092314)*x[1]**o+(-0.652805407934)*x[1]+(-0.0352316646853)*x[2]**o+(-0.442493499306)*x[2]
-        arg[3,2,2,0]=(0.525577660439)*x[0]**o+(0.660882378915)*x[0]+(-0.419826738105)*x[1]**o+(-0.798251889077)*x[1]+(-0.430382393461)*x[2]**o+(0.714357242496)*x[2]
-        arg[3,2,2,1]=(-0.200634944034)*x[0]**o+(0.211086366034)*x[0]+(0.116289218188)*x[1]**o+(-0.785792860501)*x[1]+(0.763320327438)*x[2]**o+(-0.457355826175)*x[2]
-        arg[3,3,0,0]=(-0.890873783782)*x[0]**o+(0.322610697657)*x[0]+(-0.351437390332)*x[1]**o+(-0.720698169708)*x[1]+(-0.664444440194)*x[2]**o+(0.274865394829)*x[2]
-        arg[3,3,0,1]=(-0.384885652342)*x[0]**o+(-0.409799972422)*x[0]+(0.679315041587)*x[1]**o+(0.0859788488759)*x[1]+(-0.136173937432)*x[2]**o+(-0.136591429212)*x[2]
-        arg[3,3,1,0]=(0.147934741321)*x[0]**o+(0.246941956666)*x[0]+(0.696831123708)*x[1]**o+(-0.905966322958)*x[1]+(0.672705695255)*x[2]**o+(-0.776017262395)*x[2]
-        arg[3,3,1,1]=(0.933982654679)*x[0]**o+(-0.367246348547)*x[0]+(-0.254076834401)*x[1]**o+(0.148617981234)*x[1]+(-0.486881004358)*x[2]**o+(0.636371570082)*x[2]
-        arg[3,3,2,0]=(-0.536125392071)*x[0]**o+(-0.663380779479)*x[0]+(0.0655694689011)*x[1]**o+(0.0390002326894)*x[1]+(-0.731730129742)*x[2]**o+(-0.578791485067)*x[2]
-        arg[3,3,2,1]=(0.705873902409)*x[0]**o+(-0.0444303506955)*x[0]+(-0.978519191225)*x[1]**o+(-0.0280878186958)*x[1]+(0.182378726121)*x[2]**o+(-0.555345919696)*x[2]
-        arg[3,4,0,0]=(0.945945862395)*x[0]**o+(-0.448487950632)*x[0]+(-0.477570573229)*x[1]**o+(0.313871838624)*x[1]+(0.237944220287)*x[2]**o+(-0.218095130482)*x[2]
-        arg[3,4,0,1]=(-0.758647277269)*x[0]**o+(-0.550604667208)*x[0]+(-0.262944399053)*x[1]**o+(0.994302652859)*x[1]+(0.363440310008)*x[2]**o+(-0.127863970613)*x[2]
-        arg[3,4,1,0]=(0.667202433965)*x[0]**o+(0.954901068821)*x[0]+(0.719745510318)*x[1]**o+(-0.763882742007)*x[1]+(0.880927476123)*x[2]**o+(0.102034630893)*x[2]
-        arg[3,4,1,1]=(-0.684644024456)*x[0]**o+(0.88037275093)*x[0]+(-0.772213766289)*x[1]**o+(-0.702615214094)*x[1]+(-0.25661708053)*x[2]**o+(0.126779040694)*x[2]
-        arg[3,4,2,0]=(-0.589611385303)*x[0]**o+(0.638712635252)*x[0]+(0.745450741856)*x[1]**o+(0.399494092815)*x[1]+(-0.717293809038)*x[2]**o+(0.305662737751)*x[2]
-        arg[3,4,2,1]=(0.0572426997796)*x[0]**o+(-0.764600144578)*x[0]+(0.482545219565)*x[1]**o+(0.525883069411)*x[1]+(-0.612224327195)*x[2]**o+(0.354344820256)*x[2]
-        ref[0,0,0,0]=(0.952750275738)*x_ref[0]**o+(0.971489204087)*x_ref[0]+(-0.320706487584)*x_ref[1]**o+(-0.853260471578)*x_ref[1]+(-0.696434862068)*x_ref[2]**o+(0.641824397433)*x_ref[2]
-        ref[0,0,0,1]=(0.115484192786)*x_ref[0]**o+(0.147813687309)*x_ref[0]+(-0.998010548186)*x_ref[1]**o+(0.0274712088882)*x_ref[1]+(0.136937971489)*x_ref[2]**o+(-0.657986135444)*x_ref[2]
-        ref[0,0,1,0]=(0.805857504779)*x_ref[0]**o+(0.196278916938)*x_ref[0]+(-0.969340785263)*x_ref[1]**o+(-0.543890174888)*x_ref[1]+(0.49118423357)*x_ref[2]**o+(-0.883493800593)*x_ref[2]
-        ref[0,0,1,1]=(-0.808802136474)*x_ref[0]**o+(-0.866039395649)*x_ref[0]+(0.0339207025941)*x_ref[1]**o+(-0.441368773534)*x_ref[1]+(0.673688211653)*x_ref[2]**o+(0.917894389398)*x_ref[2]
-        ref[0,0,2,0]=(0.0459902210078)*x_ref[0]**o+(0.862332666528)*x_ref[0]+(-0.547792306389)*x_ref[1]**o+(0.722176431732)*x_ref[1]+(-0.511278989032)*x_ref[2]**o+(-0.692775336577)*x_ref[2]
-        ref[0,0,2,1]=(-0.641904406513)*x_ref[0]**o+(-0.854450656063)*x_ref[0]+(0.81138894849)*x_ref[1]**o+(0.328886625074)*x_ref[1]+(0.400935831363)*x_ref[2]**o+(-0.25184059766)*x_ref[2]
-        ref[0,1,0,0]=(0.69922840942)*x_ref[0]**o+(-0.798085508443)*x_ref[0]+(-0.85191383431)*x_ref[1]**o+(-0.162940829331)*x_ref[1]+(0.504020642931)*x_ref[2]**o+(0.0950957436173)*x_ref[2]
-        ref[0,1,0,1]=(0.28901429037)*x_ref[0]**o+(-0.624508745729)*x_ref[0]+(0.921288077478)*x_ref[1]**o+(-0.769207901119)*x_ref[1]+(0.0852374599763)*x_ref[2]**o+(-0.402583033986)*x_ref[2]
-        ref[0,1,1,0]=(0.715817282215)*x_ref[0]**o+(0.68735256665)*x_ref[0]+(0.610212058649)*x_ref[1]**o+(0.53560824609)*x_ref[1]+(-0.238908897264)*x_ref[2]**o+(0.619799158474)*x_ref[2]
-        ref[0,1,1,1]=(-0.371797414191)*x_ref[0]**o+(0.106263350514)*x_ref[0]+(0.583768355362)*x_ref[1]**o+(0.818797667369)*x_ref[1]+(0.0567571152493)*x_ref[2]**o+(-0.242244867169)*x_ref[2]
-        ref[0,1,2,0]=(0.190480659729)*x_ref[0]**o+(-0.632415604771)*x_ref[0]+(0.252513826138)*x_ref[1]**o+(0.874732840469)*x_ref[1]+(-0.367769326078)*x_ref[2]**o+(0.364453292404)*x_ref[2]
-        ref[0,1,2,1]=(-0.704507136581)*x_ref[0]**o+(-0.614211737547)*x_ref[0]+(0.533383507313)*x_ref[1]**o+(-0.940007583478)*x_ref[1]+(0.558260002746)*x_ref[2]**o+(0.742565692751)*x_ref[2]
-        ref[0,2,0,0]=(0.132581156766)*x_ref[0]**o+(0.671793183183)*x_ref[0]+(-0.308255110769)*x_ref[1]**o+(-0.956002957061)*x_ref[1]+(0.300091541301)*x_ref[2]**o+(-0.714260746791)*x_ref[2]
-        ref[0,2,0,1]=(-0.836648080859)*x_ref[0]**o+(0.123813861017)*x_ref[0]+(0.866569934894)*x_ref[1]**o+(-0.957824572351)*x_ref[1]+(-0.904478410952)*x_ref[2]**o+(0.691673758521)*x_ref[2]
-        ref[0,2,1,0]=(0.411624721878)*x_ref[0]**o+(0.594054722352)*x_ref[0]+(0.150177701135)*x_ref[1]**o+(0.945855261084)*x_ref[1]+(0.295930158817)*x_ref[2]**o+(-0.607980954424)*x_ref[2]
-        ref[0,2,1,1]=(-0.0777741308373)*x_ref[0]**o+(0.697501295655)*x_ref[0]+(0.981797797329)*x_ref[1]**o+(-0.671827077949)*x_ref[1]+(0.292310146229)*x_ref[2]**o+(0.484652357857)*x_ref[2]
-        ref[0,2,2,0]=(0.194910469807)*x_ref[0]**o+(-0.70008515623)*x_ref[0]+(0.192808336639)*x_ref[1]**o+(-0.962764477371)*x_ref[1]+(-0.34292240753)*x_ref[2]**o+(0.525470829202)*x_ref[2]
-        ref[0,2,2,1]=(0.850368420228)*x_ref[0]**o+(-0.516355386368)*x_ref[0]+(0.395764367873)*x_ref[1]**o+(0.320830752607)*x_ref[1]+(-0.26288679044)*x_ref[2]**o+(0.174457723191)*x_ref[2]
-        ref[0,3,0,0]=(-0.713987556845)*x_ref[0]**o+(0.0391066248253)*x_ref[0]+(-0.63911733479)*x_ref[1]**o+(-0.119953032121)*x_ref[1]+(0.697879836447)*x_ref[2]**o+(-0.474957057702)*x_ref[2]
-        ref[0,3,0,1]=(-0.128614897423)*x_ref[0]**o+(0.7166036403)*x_ref[0]+(0.678415978447)*x_ref[1]**o+(-0.191453169618)*x_ref[1]+(-0.755261361956)*x_ref[2]**o+(-0.839956004196)*x_ref[2]
-        ref[0,3,1,0]=(0.258158740934)*x_ref[0]**o+(-0.412199346967)*x_ref[0]+(-0.781106341272)*x_ref[1]**o+(-0.561162823101)*x_ref[1]+(-0.59549864377)*x_ref[2]**o+(-0.748038415721)*x_ref[2]
-        ref[0,3,1,1]=(0.68950222305)*x_ref[0]**o+(-0.904027774445)*x_ref[0]+(0.769744453441)*x_ref[1]**o+(-0.265549152752)*x_ref[1]+(-0.375978837131)*x_ref[2]**o+(-0.387010981761)*x_ref[2]
-        ref[0,3,2,0]=(0.46852681319)*x_ref[0]**o+(-0.887650258615)*x_ref[0]+(-0.780275624319)*x_ref[1]**o+(0.527897372599)*x_ref[1]+(0.889281778411)*x_ref[2]**o+(0.82538563877)*x_ref[2]
-        ref[0,3,2,1]=(-0.817514448184)*x_ref[0]**o+(-0.230190768519)*x_ref[0]+(-0.101550849344)*x_ref[1]**o+(0.1654885857)*x_ref[1]+(-0.231317749498)*x_ref[2]**o+(0.580153306395)*x_ref[2]
-        ref[0,4,0,0]=(0.394993007242)*x_ref[0]**o+(0.305948764395)*x_ref[0]+(-0.66853441368)*x_ref[1]**o+(0.279027498094)*x_ref[1]+(0.161366934709)*x_ref[2]**o+(-0.742002471552)*x_ref[2]
-        ref[0,4,0,1]=(-0.661214709471)*x_ref[0]**o+(0.548880317935)*x_ref[0]+(0.472682748503)*x_ref[1]**o+(0.266797505699)*x_ref[1]+(0.405618413683)*x_ref[2]**o+(-0.0539677542667)*x_ref[2]
-        ref[0,4,1,0]=(-0.713892424429)*x_ref[0]**o+(0.568075831592)*x_ref[0]+(-0.956180895599)*x_ref[1]**o+(0.63618957695)*x_ref[1]+(0.983696160047)*x_ref[2]**o+(-0.308157929002)*x_ref[2]
-        ref[0,4,1,1]=(-0.666582919353)*x_ref[0]**o+(0.0816884254484)*x_ref[0]+(0.190810048896)*x_ref[1]**o+(0.482322905132)*x_ref[1]+(-0.576597070954)*x_ref[2]**o+(-0.722381611553)*x_ref[2]
-        ref[0,4,2,0]=(-0.0229650731041)*x_ref[0]**o+(-0.0867816754979)*x_ref[0]+(0.0905042102365)*x_ref[1]**o+(-0.994963424765)*x_ref[1]+(0.74504757815)*x_ref[2]**o+(0.71462549644)*x_ref[2]
-        ref[0,4,2,1]=(-0.0464278496147)*x_ref[0]**o+(0.122501026996)*x_ref[0]+(-0.049450141901)*x_ref[1]**o+(-0.388739464086)*x_ref[1]+(-0.151389885067)*x_ref[2]**o+(-0.0316948088803)*x_ref[2]
-        ref[1,0,0,0]=(-0.303653386851)*x_ref[0]**o+(-0.435866753659)*x_ref[0]+(-0.419078175082)*x_ref[1]**o+(-0.907595244917)*x_ref[1]+(0.442156528837)*x_ref[2]**o+(-0.76481785523)*x_ref[2]
-        ref[1,0,0,1]=(0.879454551618)*x_ref[0]**o+(-0.530789858588)*x_ref[0]+(0.942203776542)*x_ref[1]**o+(0.864362935436)*x_ref[1]+(-0.252832164588)*x_ref[2]**o+(0.00758252581015)*x_ref[2]
-        ref[1,0,1,0]=(0.522433142898)*x_ref[0]**o+(0.564002257569)*x_ref[0]+(0.149811689377)*x_ref[1]**o+(-0.757726948165)*x_ref[1]+(-0.767052869719)*x_ref[2]**o+(0.743541806001)*x_ref[2]
-        ref[1,0,1,1]=(0.535612198186)*x_ref[0]**o+(0.0874480088401)*x_ref[0]+(0.913151292296)*x_ref[1]**o+(-0.495024655308)*x_ref[1]+(-0.42308905182)*x_ref[2]**o+(-0.983623551153)*x_ref[2]
-        ref[1,0,2,0]=(0.587221456352)*x_ref[0]**o+(0.0384438535009)*x_ref[0]+(0.301554087927)*x_ref[1]**o+(-0.944074061806)*x_ref[1]+(0.808195432991)*x_ref[2]**o+(-0.46545743768)*x_ref[2]
-        ref[1,0,2,1]=(0.136251169669)*x_ref[0]**o+(0.772190271875)*x_ref[0]+(-0.490981224022)*x_ref[1]**o+(-0.191915588448)*x_ref[1]+(0.792617864405)*x_ref[2]**o+(0.139425359773)*x_ref[2]
-        ref[1,1,0,0]=(0.0440493146329)*x_ref[0]**o+(-0.948951787109)*x_ref[0]+(-0.564104026105)*x_ref[1]**o+(0.177457883377)*x_ref[1]+(0.578169345377)*x_ref[2]**o+(0.35574407049)*x_ref[2]
-        ref[1,1,0,1]=(-0.740305651819)*x_ref[0]**o+(-0.340976006932)*x_ref[0]+(-0.657257828033)*x_ref[1]**o+(-0.456240473558)*x_ref[1]+(0.526236681039)*x_ref[2]**o+(0.804762801115)*x_ref[2]
-        ref[1,1,1,0]=(-0.753480536304)*x_ref[0]**o+(0.424080516297)*x_ref[0]+(-0.97529611006)*x_ref[1]**o+(-0.511450162624)*x_ref[1]+(-0.248982226385)*x_ref[2]**o+(0.497803766242)*x_ref[2]
-        ref[1,1,1,1]=(-0.273280180629)*x_ref[0]**o+(0.798945176097)*x_ref[0]+(0.552152546131)*x_ref[1]**o+(0.737594404744)*x_ref[1]+(0.0339269287984)*x_ref[2]**o+(-0.773791176515)*x_ref[2]
-        ref[1,1,2,0]=(0.553404075378)*x_ref[0]**o+(-0.630969888585)*x_ref[0]+(0.455072287913)*x_ref[1]**o+(0.145928503781)*x_ref[1]+(0.632480470504)*x_ref[2]**o+(0.363815684296)*x_ref[2]
-        ref[1,1,2,1]=(-0.426756293656)*x_ref[0]**o+(-0.449867410734)*x_ref[0]+(-0.875891527959)*x_ref[1]**o+(-0.125243159763)*x_ref[1]+(0.887344501669)*x_ref[2]**o+(-0.0569005112264)*x_ref[2]
-        ref[1,2,0,0]=(0.762313320036)*x_ref[0]**o+(-0.514266376348)*x_ref[0]+(-0.915248032301)*x_ref[1]**o+(0.50418081892)*x_ref[1]+(-0.867662577318)*x_ref[2]**o+(0.731635970592)*x_ref[2]
-        ref[1,2,0,1]=(-0.0866106252969)*x_ref[0]**o+(0.063250309716)*x_ref[0]+(0.598723588976)*x_ref[1]**o+(0.317235331686)*x_ref[1]+(-0.412892601258)*x_ref[2]**o+(0.771147670726)*x_ref[2]
-        ref[1,2,1,0]=(0.57639148624)*x_ref[0]**o+(0.773916349481)*x_ref[0]+(0.401319543026)*x_ref[1]**o+(-0.510387398986)*x_ref[1]+(-0.796773375436)*x_ref[2]**o+(-0.765544756429)*x_ref[2]
-        ref[1,2,1,1]=(-0.686952109389)*x_ref[0]**o+(0.428892331428)*x_ref[0]+(-0.139971762047)*x_ref[1]**o+(-0.747581454837)*x_ref[1]+(0.152196734461)*x_ref[2]**o+(-0.778424993847)*x_ref[2]
-        ref[1,2,2,0]=(0.729199771391)*x_ref[0]**o+(0.185870258363)*x_ref[0]+(0.996198489286)*x_ref[1]**o+(0.0343703739018)*x_ref[1]+(-0.6637833208)*x_ref[2]**o+(-0.738510210409)*x_ref[2]
-        ref[1,2,2,1]=(0.705773326438)*x_ref[0]**o+(-0.633406525448)*x_ref[0]+(0.252620923822)*x_ref[1]**o+(-0.760785834478)*x_ref[1]+(0.995411456622)*x_ref[2]**o+(-0.365718663741)*x_ref[2]
-        ref[1,3,0,0]=(0.826142335301)*x_ref[0]**o+(-0.869335317945)*x_ref[0]+(0.660360312658)*x_ref[1]**o+(0.96157015332)*x_ref[1]+(-0.268246324116)*x_ref[2]**o+(-0.575288823295)*x_ref[2]
-        ref[1,3,0,1]=(0.620117943072)*x_ref[0]**o+(0.51267609202)*x_ref[0]+(-0.882468485772)*x_ref[1]**o+(0.771021246475)*x_ref[1]+(0.398548927211)*x_ref[2]**o+(0.275983192446)*x_ref[2]
-        ref[1,3,1,0]=(0.716523839796)*x_ref[0]**o+(-0.0868143348547)*x_ref[0]+(-0.456384710114)*x_ref[1]**o+(-0.646489063979)*x_ref[1]+(0.594500214771)*x_ref[2]**o+(-0.299956296467)*x_ref[2]
-        ref[1,3,1,1]=(-0.453257208906)*x_ref[0]**o+(0.583260425119)*x_ref[0]+(0.263463648634)*x_ref[1]**o+(0.493693446665)*x_ref[1]+(-0.529884773858)*x_ref[2]**o+(0.220733486264)*x_ref[2]
-        ref[1,3,2,0]=(0.669052014654)*x_ref[0]**o+(-0.247902780475)*x_ref[0]+(0.44071786167)*x_ref[1]**o+(-0.21199653848)*x_ref[1]+(-0.0713603448391)*x_ref[2]**o+(-0.66681439981)*x_ref[2]
-        ref[1,3,2,1]=(-0.341533813758)*x_ref[0]**o+(0.770581995272)*x_ref[0]+(0.03376913861)*x_ref[1]**o+(0.000270719073091)*x_ref[1]+(-0.774936686899)*x_ref[2]**o+(-0.0196300167016)*x_ref[2]
-        ref[1,4,0,0]=(-0.869695667108)*x_ref[0]**o+(0.515676789402)*x_ref[0]+(0.67731822534)*x_ref[1]**o+(0.126887846346)*x_ref[1]+(0.843200966455)*x_ref[2]**o+(-0.59930363301)*x_ref[2]
-        ref[1,4,0,1]=(0.909369352728)*x_ref[0]**o+(-0.110828876636)*x_ref[0]+(-0.65561953478)*x_ref[1]**o+(0.598491879954)*x_ref[1]+(-0.557567770163)*x_ref[2]**o+(-0.391108926502)*x_ref[2]
-        ref[1,4,1,0]=(0.320646291934)*x_ref[0]**o+(0.164062007697)*x_ref[0]+(-0.546323998218)*x_ref[1]**o+(0.72651711346)*x_ref[1]+(-0.613496738898)*x_ref[2]**o+(0.430761082137)*x_ref[2]
-        ref[1,4,1,1]=(-0.721651561555)*x_ref[0]**o+(-0.0647310624509)*x_ref[0]+(-0.360525345485)*x_ref[1]**o+(0.408239277468)*x_ref[1]+(0.600551705094)*x_ref[2]**o+(0.506237401392)*x_ref[2]
-        ref[1,4,2,0]=(-0.391702965605)*x_ref[0]**o+(-0.574470582913)*x_ref[0]+(-0.729724609696)*x_ref[1]**o+(0.91381180302)*x_ref[1]+(-0.544328104929)*x_ref[2]**o+(-0.516992534607)*x_ref[2]
-        ref[1,4,2,1]=(-0.0409666962711)*x_ref[0]**o+(-0.524913112823)*x_ref[0]+(-0.677030607856)*x_ref[1]**o+(-0.530859496807)*x_ref[1]+(0.137890059737)*x_ref[2]**o+(0.0669856870322)*x_ref[2]
-        ref[2,0,0,0]=(0.10369318023)*x_ref[0]**o+(0.345691611083)*x_ref[0]+(-0.222795950561)*x_ref[1]**o+(-0.797690270935)*x_ref[1]+(-0.703457203234)*x_ref[2]**o+(-0.751193209871)*x_ref[2]
-        ref[2,0,0,1]=(0.166457278787)*x_ref[0]**o+(-0.0304766240065)*x_ref[0]+(0.159987374581)*x_ref[1]**o+(0.828012214748)*x_ref[1]+(0.0670696566332)*x_ref[2]**o+(-0.498252024306)*x_ref[2]
-        ref[2,0,1,0]=(0.901095992383)*x_ref[0]**o+(0.400296735981)*x_ref[0]+(0.394687295672)*x_ref[1]**o+(-0.986496611224)*x_ref[1]+(-0.768945602918)*x_ref[2]**o+(-0.782762026735)*x_ref[2]
-        ref[2,0,1,1]=(0.47969549703)*x_ref[0]**o+(0.981251232699)*x_ref[0]+(-0.69807700503)*x_ref[1]**o+(-0.813549271424)*x_ref[1]+(-0.135970806025)*x_ref[2]**o+(0.288738861745)*x_ref[2]
-        ref[2,0,2,0]=(0.315262113284)*x_ref[0]**o+(0.0380265323361)*x_ref[0]+(0.259894600802)*x_ref[1]**o+(0.538712801332)*x_ref[1]+(-0.385783597257)*x_ref[2]**o+(0.666670257561)*x_ref[2]
-        ref[2,0,2,1]=(-0.756715539091)*x_ref[0]**o+(-0.823809574081)*x_ref[0]+(-0.283842954238)*x_ref[1]**o+(-0.640166311159)*x_ref[1]+(-0.39947011053)*x_ref[2]**o+(-0.393543798757)*x_ref[2]
-        ref[2,1,0,0]=(-0.292033523499)*x_ref[0]**o+(-0.940246412652)*x_ref[0]+(-0.327571437608)*x_ref[1]**o+(0.837077706655)*x_ref[1]+(0.446471499818)*x_ref[2]**o+(-0.747249149016)*x_ref[2]
-        ref[2,1,0,1]=(-0.867504469067)*x_ref[0]**o+(0.635684140727)*x_ref[0]+(0.488043128661)*x_ref[1]**o+(-0.163389002402)*x_ref[1]+(0.0440527250714)*x_ref[2]**o+(0.605766722432)*x_ref[2]
-        ref[2,1,1,0]=(-0.0622304802635)*x_ref[0]**o+(0.607299318698)*x_ref[0]+(0.974933906045)*x_ref[1]**o+(0.0632442428777)*x_ref[1]+(0.0672808299851)*x_ref[2]**o+(-0.555700803374)*x_ref[2]
-        ref[2,1,1,1]=(-0.350438453721)*x_ref[0]**o+(-0.826289294567)*x_ref[0]+(-0.473764081208)*x_ref[1]**o+(-0.247804269494)*x_ref[1]+(0.834301955859)*x_ref[2]**o+(0.443058363661)*x_ref[2]
-        ref[2,1,2,0]=(0.5046026606)*x_ref[0]**o+(0.305502438052)*x_ref[0]+(-0.201816724695)*x_ref[1]**o+(-0.101544576856)*x_ref[1]+(0.729817329051)*x_ref[2]**o+(-0.851479834334)*x_ref[2]
-        ref[2,1,2,1]=(0.917039424926)*x_ref[0]**o+(0.260565966637)*x_ref[0]+(-0.595846674057)*x_ref[1]**o+(0.654773238108)*x_ref[1]+(0.544664592565)*x_ref[2]**o+(0.363343885358)*x_ref[2]
-        ref[2,2,0,0]=(0.243879200917)*x_ref[0]**o+(0.335612613868)*x_ref[0]+(-0.287066716076)*x_ref[1]**o+(0.506206687739)*x_ref[1]+(-0.902513036448)*x_ref[2]**o+(-0.427017746025)*x_ref[2]
-        ref[2,2,0,1]=(0.965102871162)*x_ref[0]**o+(0.161476912964)*x_ref[0]+(0.97007160306)*x_ref[1]**o+(0.870104939402)*x_ref[1]+(0.552404991536)*x_ref[2]**o+(-0.319082395552)*x_ref[2]
-        ref[2,2,1,0]=(0.17611459545)*x_ref[0]**o+(-0.457419791602)*x_ref[0]+(-0.00217752259743)*x_ref[1]**o+(-0.632177103931)*x_ref[1]+(0.521123797224)*x_ref[2]**o+(0.427935307605)*x_ref[2]
-        ref[2,2,1,1]=(-0.993298850316)*x_ref[0]**o+(0.277763727112)*x_ref[0]+(0.849464768611)*x_ref[1]**o+(0.890919639607)*x_ref[1]+(0.01030894969)*x_ref[2]**o+(-0.76051772768)*x_ref[2]
-        ref[2,2,2,0]=(-0.622887788117)*x_ref[0]**o+(0.40187802561)*x_ref[0]+(0.836685367934)*x_ref[1]**o+(0.700379534201)*x_ref[1]+(0.683627950354)*x_ref[2]**o+(0.445351804296)*x_ref[2]
-        ref[2,2,2,1]=(0.124965536288)*x_ref[0]**o+(-0.198462168996)*x_ref[0]+(-0.657084126986)*x_ref[1]**o+(-0.420469996385)*x_ref[1]+(0.237164091597)*x_ref[2]**o+(0.161926160295)*x_ref[2]
-        ref[2,3,0,0]=(-0.622682941897)*x_ref[0]**o+(-0.6279729398)*x_ref[0]+(0.189086870792)*x_ref[1]**o+(-0.350822257394)*x_ref[1]+(-0.505481371359)*x_ref[2]**o+(0.812944216714)*x_ref[2]
-        ref[2,3,0,1]=(-0.246704719057)*x_ref[0]**o+(0.513716384141)*x_ref[0]+(-0.264914192193)*x_ref[1]**o+(-0.32984984663)*x_ref[1]+(-0.80409813849)*x_ref[2]**o+(-0.825568736974)*x_ref[2]
-        ref[2,3,1,0]=(-0.534782640399)*x_ref[0]**o+(-0.917823259622)*x_ref[0]+(0.691827074405)*x_ref[1]**o+(-0.818629872154)*x_ref[1]+(0.870046992385)*x_ref[2]**o+(0.00423218787803)*x_ref[2]
-        ref[2,3,1,1]=(0.633068676613)*x_ref[0]**o+(-0.895613811402)*x_ref[0]+(0.62242069294)*x_ref[1]**o+(-0.272136050955)*x_ref[1]+(-0.199008776357)*x_ref[2]**o+(0.836119124508)*x_ref[2]
-        ref[2,3,2,0]=(0.335884106464)*x_ref[0]**o+(-0.857917873801)*x_ref[0]+(-0.42653278071)*x_ref[1]**o+(0.375200781448)*x_ref[1]+(0.378427453722)*x_ref[2]**o+(0.398603623445)*x_ref[2]
-        ref[2,3,2,1]=(0.0602499604703)*x_ref[0]**o+(-0.921459358089)*x_ref[0]+(0.558180675902)*x_ref[1]**o+(0.0863734870743)*x_ref[1]+(0.215167095483)*x_ref[2]**o+(-0.37908830738)*x_ref[2]
-        ref[2,4,0,0]=(0.866321987007)*x_ref[0]**o+(0.81950553744)*x_ref[0]+(0.0422552872889)*x_ref[1]**o+(0.369328458453)*x_ref[1]+(0.0547909452885)*x_ref[2]**o+(-0.396367133883)*x_ref[2]
-        ref[2,4,0,1]=(0.438824337571)*x_ref[0]**o+(0.211435787811)*x_ref[0]+(-0.801273340861)*x_ref[1]**o+(-0.181654271172)*x_ref[1]+(0.374171148243)*x_ref[2]**o+(0.945633108881)*x_ref[2]
-        ref[2,4,1,0]=(0.588044951473)*x_ref[0]**o+(0.401384824924)*x_ref[0]+(-0.191996429616)*x_ref[1]**o+(0.0472579697166)*x_ref[1]+(0.470962958517)*x_ref[2]**o+(0.52718875619)*x_ref[2]
-        ref[2,4,1,1]=(0.371613549998)*x_ref[0]**o+(-0.414998926249)*x_ref[0]+(-0.762013182749)*x_ref[1]**o+(0.796144230249)*x_ref[1]+(-0.555041053148)*x_ref[2]**o+(-0.595298275916)*x_ref[2]
-        ref[2,4,2,0]=(-0.992527136862)*x_ref[0]**o+(-0.995041267483)*x_ref[0]+(-0.730305990844)*x_ref[1]**o+(-0.52470798566)*x_ref[1]+(-0.938945944067)*x_ref[2]**o+(0.33396135548)*x_ref[2]
-        ref[2,4,2,1]=(0.0333921786723)*x_ref[0]**o+(0.707990374515)*x_ref[0]+(-0.106667413755)*x_ref[1]**o+(0.282989655082)*x_ref[1]+(-0.152535982788)*x_ref[2]**o+(-0.75130096727)*x_ref[2]
-        ref[3,0,0,0]=(-0.822675771493)*x_ref[0]**o+(0.726468488157)*x_ref[0]+(0.972567560814)*x_ref[1]**o+(0.308266449093)*x_ref[1]+(0.71069864654)*x_ref[2]**o+(-0.683195491271)*x_ref[2]
-        ref[3,0,0,1]=(-0.505155072199)*x_ref[0]**o+(0.339013729552)*x_ref[0]+(-0.81565931012)*x_ref[1]**o+(0.362458680494)*x_ref[1]+(0.960221320064)*x_ref[2]**o+(-0.17234580875)*x_ref[2]
-        ref[3,0,1,0]=(0.67972657926)*x_ref[0]**o+(0.143085543693)*x_ref[0]+(-0.699516563264)*x_ref[1]**o+(-0.892226133751)*x_ref[1]+(-0.898541541049)*x_ref[2]**o+(-0.736249681714)*x_ref[2]
-        ref[3,0,1,1]=(-0.144423319215)*x_ref[0]**o+(-0.509713525676)*x_ref[0]+(0.347584762861)*x_ref[1]**o+(0.666169972794)*x_ref[1]+(0.691734080163)*x_ref[2]**o+(0.9338062148)*x_ref[2]
-        ref[3,0,2,0]=(-0.47323843589)*x_ref[0]**o+(0.0819655059363)*x_ref[0]+(0.0863030211133)*x_ref[1]**o+(0.127803089307)*x_ref[1]+(-0.155852489756)*x_ref[2]**o+(-0.00470398386987)*x_ref[2]
-        ref[3,0,2,1]=(0.372452726232)*x_ref[0]**o+(0.133808609857)*x_ref[0]+(0.962945642209)*x_ref[1]**o+(0.0446609213929)*x_ref[1]+(-0.446207951293)*x_ref[2]**o+(0.0400733439868)*x_ref[2]
-        ref[3,1,0,0]=(-0.668575734235)*x_ref[0]**o+(0.905913572459)*x_ref[0]+(-0.321327880802)*x_ref[1]**o+(0.0263209456188)*x_ref[1]+(-0.0355325780368)*x_ref[2]**o+(-0.624130395105)*x_ref[2]
-        ref[3,1,0,1]=(0.859810828483)*x_ref[0]**o+(-0.235372125226)*x_ref[0]+(-0.16715244612)*x_ref[1]**o+(-0.793399872713)*x_ref[1]+(0.303973795556)*x_ref[2]**o+(0.176740655638)*x_ref[2]
-        ref[3,1,1,0]=(0.736448874258)*x_ref[0]**o+(-0.448956585466)*x_ref[0]+(0.782095902992)*x_ref[1]**o+(0.796524196866)*x_ref[1]+(-0.732812289541)*x_ref[2]**o+(0.687089667291)*x_ref[2]
-        ref[3,1,1,1]=(-0.797708068194)*x_ref[0]**o+(-0.691308116296)*x_ref[0]+(-0.644065410151)*x_ref[1]**o+(-0.929624672017)*x_ref[1]+(0.265040940279)*x_ref[2]**o+(0.424929324889)*x_ref[2]
-        ref[3,1,2,0]=(0.555032482777)*x_ref[0]**o+(-0.564617314931)*x_ref[0]+(-0.612721853869)*x_ref[1]**o+(-0.048466699593)*x_ref[1]+(0.753265037897)*x_ref[2]**o+(0.913086239874)*x_ref[2]
-        ref[3,1,2,1]=(0.580881807771)*x_ref[0]**o+(0.970973128604)*x_ref[0]+(-0.603610563753)*x_ref[1]**o+(0.979985814438)*x_ref[1]+(-0.639531987694)*x_ref[2]**o+(-0.773094138073)*x_ref[2]
-        ref[3,2,0,0]=(0.574306840544)*x_ref[0]**o+(0.449094769988)*x_ref[0]+(-0.406303076614)*x_ref[1]**o+(-0.776648781906)*x_ref[1]+(-0.59829476647)*x_ref[2]**o+(0.257632446666)*x_ref[2]
-        ref[3,2,0,1]=(0.689106127051)*x_ref[0]**o+(0.717184851708)*x_ref[0]+(-0.495581943615)*x_ref[1]**o+(-0.30329139788)*x_ref[1]+(0.901753128535)*x_ref[2]**o+(0.48496505727)*x_ref[2]
-        ref[3,2,1,0]=(0.252050902256)*x_ref[0]**o+(-0.0414281706943)*x_ref[0]+(-0.284125627654)*x_ref[1]**o+(0.477450554269)*x_ref[1]+(0.849202242148)*x_ref[2]**o+(0.211826565889)*x_ref[2]
-        ref[3,2,1,1]=(-0.319900673571)*x_ref[0]**o+(0.965993723739)*x_ref[0]+(0.671360092314)*x_ref[1]**o+(-0.652805407934)*x_ref[1]+(-0.0352316646853)*x_ref[2]**o+(-0.442493499306)*x_ref[2]
-        ref[3,2,2,0]=(0.525577660439)*x_ref[0]**o+(0.660882378915)*x_ref[0]+(-0.419826738105)*x_ref[1]**o+(-0.798251889077)*x_ref[1]+(-0.430382393461)*x_ref[2]**o+(0.714357242496)*x_ref[2]
-        ref[3,2,2,1]=(-0.200634944034)*x_ref[0]**o+(0.211086366034)*x_ref[0]+(0.116289218188)*x_ref[1]**o+(-0.785792860501)*x_ref[1]+(0.763320327438)*x_ref[2]**o+(-0.457355826175)*x_ref[2]
-        ref[3,3,0,0]=(-0.890873783782)*x_ref[0]**o+(0.322610697657)*x_ref[0]+(-0.351437390332)*x_ref[1]**o+(-0.720698169708)*x_ref[1]+(-0.664444440194)*x_ref[2]**o+(0.274865394829)*x_ref[2]
-        ref[3,3,0,1]=(-0.384885652342)*x_ref[0]**o+(-0.409799972422)*x_ref[0]+(0.679315041587)*x_ref[1]**o+(0.0859788488759)*x_ref[1]+(-0.136173937432)*x_ref[2]**o+(-0.136591429212)*x_ref[2]
-        ref[3,3,1,0]=(0.147934741321)*x_ref[0]**o+(0.246941956666)*x_ref[0]+(0.696831123708)*x_ref[1]**o+(-0.905966322958)*x_ref[1]+(0.672705695255)*x_ref[2]**o+(-0.776017262395)*x_ref[2]
-        ref[3,3,1,1]=(0.933982654679)*x_ref[0]**o+(-0.367246348547)*x_ref[0]+(-0.254076834401)*x_ref[1]**o+(0.148617981234)*x_ref[1]+(-0.486881004358)*x_ref[2]**o+(0.636371570082)*x_ref[2]
-        ref[3,3,2,0]=(-0.536125392071)*x_ref[0]**o+(-0.663380779479)*x_ref[0]+(0.0655694689011)*x_ref[1]**o+(0.0390002326894)*x_ref[1]+(-0.731730129742)*x_ref[2]**o+(-0.578791485067)*x_ref[2]
-        ref[3,3,2,1]=(0.705873902409)*x_ref[0]**o+(-0.0444303506955)*x_ref[0]+(-0.978519191225)*x_ref[1]**o+(-0.0280878186958)*x_ref[1]+(0.182378726121)*x_ref[2]**o+(-0.555345919696)*x_ref[2]
-        ref[3,4,0,0]=(0.945945862395)*x_ref[0]**o+(-0.448487950632)*x_ref[0]+(-0.477570573229)*x_ref[1]**o+(0.313871838624)*x_ref[1]+(0.237944220287)*x_ref[2]**o+(-0.218095130482)*x_ref[2]
-        ref[3,4,0,1]=(-0.758647277269)*x_ref[0]**o+(-0.550604667208)*x_ref[0]+(-0.262944399053)*x_ref[1]**o+(0.994302652859)*x_ref[1]+(0.363440310008)*x_ref[2]**o+(-0.127863970613)*x_ref[2]
-        ref[3,4,1,0]=(0.667202433965)*x_ref[0]**o+(0.954901068821)*x_ref[0]+(0.719745510318)*x_ref[1]**o+(-0.763882742007)*x_ref[1]+(0.880927476123)*x_ref[2]**o+(0.102034630893)*x_ref[2]
-        ref[3,4,1,1]=(-0.684644024456)*x_ref[0]**o+(0.88037275093)*x_ref[0]+(-0.772213766289)*x_ref[1]**o+(-0.702615214094)*x_ref[1]+(-0.25661708053)*x_ref[2]**o+(0.126779040694)*x_ref[2]
-        ref[3,4,2,0]=(-0.589611385303)*x_ref[0]**o+(0.638712635252)*x_ref[0]+(0.745450741856)*x_ref[1]**o+(0.399494092815)*x_ref[1]+(-0.717293809038)*x_ref[2]**o+(0.305662737751)*x_ref[2]
-        ref[3,4,2,1]=(0.0572426997796)*x_ref[0]**o+(-0.764600144578)*x_ref[0]+(0.482545219565)*x_ref[1]**o+(0.525883069411)*x_ref[1]+(-0.612224327195)*x_ref[2]**o+(0.354344820256)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.100067148208)*x[0]+(-0.8375743725)*x[1]
-        ref=(-0.100067148208)*x_ref[0]+(-0.8375743725)*x_ref[1]
-      else:
-        arg=(-0.247343416726)*x[0]+(0.604193484164)*x[1]+(-0.219899438287)*x[2]
-        ref=(-0.247343416726)*x_ref[0]+(0.604193484164)*x_ref[1]+(-0.219899438287)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        arg[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-        ref[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        ref[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-      else:
-        arg[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        arg[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-        ref[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        ref[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.00153698933322)*x[0]+(0.392281645764)*x[1]
-        arg[0,1]=(-1.2794655544)*x[0]+(-0.373519639818)*x[1]
-        arg[0,2]=(0.30127033321)*x[0]+(-0.0996865853738)*x[1]
-        arg[0,3]=(1.23405799349)*x[0]+(0.498558200339)*x[1]
-        arg[0,4]=(0.85519350742)*x[0]+(-0.19188046135)*x[1]
-        arg[1,0]=(0.417367834962)*x[0]+(0.992318201639)*x[1]
-        arg[1,1]=(-0.646432128833)*x[0]+(-0.872750321582)*x[1]
-        arg[1,2]=(-0.806117185061)*x[0]+(-0.89396408325)*x[1]
-        arg[1,3]=(0.768017237627)*x[0]+(-1.2904111912)*x[1]
-        arg[1,4]=(-0.0159685523188)*x[0]+(0.401410193169)*x[1]
-        arg[2,0]=(-0.844501716181)*x[0]+(-0.123115343819)*x[1]
-        arg[2,1]=(1.08441909409)*x[0]+(0.152432282539)*x[1]
-        arg[2,2]=(-0.60551037413)*x[0]+(1.15692828826)*x[1]
-        arg[2,3]=(-1.21509168541)*x[0]+(1.03683236377)*x[1]
-        arg[2,4]=(1.16850730134)*x[0]+(0.162202615909)*x[1]
-        arg[3,0]=(0.727772166897)*x[0]+(-0.296815840935)*x[1]
-        arg[3,1]=(-0.0880577151489)*x[0]+(1.66427691426)*x[1]
-        arg[3,2]=(0.415144534458)*x[0]+(-0.555833723295)*x[1]
-        arg[3,3]=(1.09444635829)*x[0]+(-0.335209417536)*x[1]
-        arg[3,4]=(-1.05047769585)*x[0]+(0.684427039986)*x[1]
-        ref[0,0]=(0.00153698933322)*x_ref[0]+(0.392281645764)*x_ref[1]
-        ref[0,1]=(-1.2794655544)*x_ref[0]+(-0.373519639818)*x_ref[1]
-        ref[0,2]=(0.30127033321)*x_ref[0]+(-0.0996865853738)*x_ref[1]
-        ref[0,3]=(1.23405799349)*x_ref[0]+(0.498558200339)*x_ref[1]
-        ref[0,4]=(0.85519350742)*x_ref[0]+(-0.19188046135)*x_ref[1]
-        ref[1,0]=(0.417367834962)*x_ref[0]+(0.992318201639)*x_ref[1]
-        ref[1,1]=(-0.646432128833)*x_ref[0]+(-0.872750321582)*x_ref[1]
-        ref[1,2]=(-0.806117185061)*x_ref[0]+(-0.89396408325)*x_ref[1]
-        ref[1,3]=(0.768017237627)*x_ref[0]+(-1.2904111912)*x_ref[1]
-        ref[1,4]=(-0.0159685523188)*x_ref[0]+(0.401410193169)*x_ref[1]
-        ref[2,0]=(-0.844501716181)*x_ref[0]+(-0.123115343819)*x_ref[1]
-        ref[2,1]=(1.08441909409)*x_ref[0]+(0.152432282539)*x_ref[1]
-        ref[2,2]=(-0.60551037413)*x_ref[0]+(1.15692828826)*x_ref[1]
-        ref[2,3]=(-1.21509168541)*x_ref[0]+(1.03683236377)*x_ref[1]
-        ref[2,4]=(1.16850730134)*x_ref[0]+(0.162202615909)*x_ref[1]
-        ref[3,0]=(0.727772166897)*x_ref[0]+(-0.296815840935)*x_ref[1]
-        ref[3,1]=(-0.0880577151489)*x_ref[0]+(1.66427691426)*x_ref[1]
-        ref[3,2]=(0.415144534458)*x_ref[0]+(-0.555833723295)*x_ref[1]
-        ref[3,3]=(1.09444635829)*x_ref[0]+(-0.335209417536)*x_ref[1]
-        ref[3,4]=(-1.05047769585)*x_ref[0]+(0.684427039986)*x_ref[1]
-      else:
-        arg[0,0]=(-0.611607640773)*x[0]+(0.584485971628)*x[1]+(0.0090316337643)*x[2]
-        arg[0,1]=(0.905278285857)*x[0]+(0.332523151242)*x[1]+(0.9909841807)*x[2]
-        arg[0,2]=(-1.06629333132)*x[0]+(-0.38478180064)*x[1]+(-0.63309211256)*x[2]
-        arg[0,3]=(0.122436386344)*x[0]+(-0.218752671204)*x[1]+(-0.746695172216)*x[2]
-        arg[0,4]=(1.03152124874)*x[0]+(-1.11327271563)*x[1]+(-0.257591112135)*x[2]
-        arg[1,0]=(0.969019600299)*x[0]+(-0.320279309689)*x[1]+(0.327767746545)*x[2]
-        arg[1,1]=(0.291023069052)*x[0]+(0.78112901064)*x[1]+(0.879257239042)*x[2]
-        arg[1,2]=(-0.131262891536)*x[0]+(-0.0109690229153)*x[1]+(-0.171900332406)*x[2]
-        arg[1,3]=(-1.32272684486)*x[0]+(-0.256869536085)*x[1]+(0.0308524567462)*x[2]
-        arg[1,4]=(1.30707061279)*x[0]+(0.972866282634)*x[1]+(-0.474948537882)*x[2]
-        arg[2,0]=(0.169034210421)*x[0]+(-1.08714896226)*x[1]+(-0.636838450708)*x[2]
-        arg[2,1]=(-0.470752780773)*x[0]+(-0.695286088059)*x[1]+(-1.19197058712)*x[2]
-        arg[2,2]=(0.701403721228)*x[0]+(0.551002482436)*x[1]+(-0.295853851234)*x[2]
-        arg[2,3]=(-0.796431361745)*x[0]+(0.0581884766856)*x[1]+(-1.13668563089)*x[2]
-        arg[2,4]=(-0.733185798017)*x[0]+(0.178900103735)*x[1]+(-0.845671526781)*x[2]
-        arg[3,0]=(-1.47064927107)*x[0]+(1.33393324965)*x[1]+(-0.767393460937)*x[2]
-        arg[3,1]=(1.36784513226)*x[0]+(0.100008910431)*x[1]+(-1.09210256713)*x[2]
-        arg[3,2]=(-0.873076669977)*x[0]+(0.367213631778)*x[1]+(0.0698296920039)*x[2]
-        arg[3,3]=(-1.76609214158)*x[0]+(-1.26186286566)*x[1]+(0.377817035113)*x[2]
-        arg[3,4]=(-1.28261709396)*x[0]+(0.240480767533)*x[1]+(0.307813279357)*x[2]
-        ref[0,0]=(-0.611607640773)*x_ref[0]+(0.584485971628)*x_ref[1]+(0.0090316337643)*x_ref[2]
-        ref[0,1]=(0.905278285857)*x_ref[0]+(0.332523151242)*x_ref[1]+(0.9909841807)*x_ref[2]
-        ref[0,2]=(-1.06629333132)*x_ref[0]+(-0.38478180064)*x_ref[1]+(-0.63309211256)*x_ref[2]
-        ref[0,3]=(0.122436386344)*x_ref[0]+(-0.218752671204)*x_ref[1]+(-0.746695172216)*x_ref[2]
-        ref[0,4]=(1.03152124874)*x_ref[0]+(-1.11327271563)*x_ref[1]+(-0.257591112135)*x_ref[2]
-        ref[1,0]=(0.969019600299)*x_ref[0]+(-0.320279309689)*x_ref[1]+(0.327767746545)*x_ref[2]
-        ref[1,1]=(0.291023069052)*x_ref[0]+(0.78112901064)*x_ref[1]+(0.879257239042)*x_ref[2]
-        ref[1,2]=(-0.131262891536)*x_ref[0]+(-0.0109690229153)*x_ref[1]+(-0.171900332406)*x_ref[2]
-        ref[1,3]=(-1.32272684486)*x_ref[0]+(-0.256869536085)*x_ref[1]+(0.0308524567462)*x_ref[2]
-        ref[1,4]=(1.30707061279)*x_ref[0]+(0.972866282634)*x_ref[1]+(-0.474948537882)*x_ref[2]
-        ref[2,0]=(0.169034210421)*x_ref[0]+(-1.08714896226)*x_ref[1]+(-0.636838450708)*x_ref[2]
-        ref[2,1]=(-0.470752780773)*x_ref[0]+(-0.695286088059)*x_ref[1]+(-1.19197058712)*x_ref[2]
-        ref[2,2]=(0.701403721228)*x_ref[0]+(0.551002482436)*x_ref[1]+(-0.295853851234)*x_ref[2]
-        ref[2,3]=(-0.796431361745)*x_ref[0]+(0.0581884766856)*x_ref[1]+(-1.13668563089)*x_ref[2]
-        ref[2,4]=(-0.733185798017)*x_ref[0]+(0.178900103735)*x_ref[1]+(-0.845671526781)*x_ref[2]
-        ref[3,0]=(-1.47064927107)*x_ref[0]+(1.33393324965)*x_ref[1]+(-0.767393460937)*x_ref[2]
-        ref[3,1]=(1.36784513226)*x_ref[0]+(0.100008910431)*x_ref[1]+(-1.09210256713)*x_ref[2]
-        ref[3,2]=(-0.873076669977)*x_ref[0]+(0.367213631778)*x_ref[1]+(0.0698296920039)*x_ref[2]
-        ref[3,3]=(-1.76609214158)*x_ref[0]+(-1.26186286566)*x_ref[1]+(0.377817035113)*x_ref[2]
-        ref[3,4]=(-1.28261709396)*x_ref[0]+(0.240480767533)*x_ref[1]+(0.307813279357)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.423505169404)*x[0]+(-1.10390334264)*x[1]
-        arg[0,0,1]=(-0.181820089254)*x[0]+(-0.374602268791)*x[1]
-        arg[0,1,0]=(-1.36906917075)*x[0]+(0.26554385908)*x[1]
-        arg[0,1,1]=(-0.280661572374)*x[0]+(-0.239232524287)*x[1]
-        arg[1,0,0]=(-1.25670251934)*x[0]+(-0.429353977735)*x[1]
-        arg[1,0,1]=(-0.747928970735)*x[0]+(1.17874317611)*x[1]
-        arg[1,1,0]=(-0.548814611802)*x[0]+(-0.0249315764285)*x[1]
-        arg[1,1,1]=(-0.481123117522)*x[0]+(1.23402203879)*x[1]
-        arg[2,0,0]=(-0.0639512689884)*x[0]+(-0.0278213371376)*x[1]
-        arg[2,0,1]=(-1.17292797621)*x[0]+(0.42140600304)*x[1]
-        arg[2,1,0]=(-0.358052601083)*x[0]+(-1.66807880791)*x[1]
-        arg[2,1,1]=(-0.291433251349)*x[0]+(0.111473162108)*x[1]
-        arg[3,0,0]=(0.742643625989)*x[0]+(-1.29214106228)*x[1]
-        arg[3,0,1]=(0.319887321826)*x[0]+(-0.40213369238)*x[1]
-        arg[3,1,0]=(-0.449412064097)*x[0]+(-1.10654262009)*x[1]
-        arg[3,1,1]=(1.19722227632)*x[0]+(1.3455799026)*x[1]
-        arg[4,0,0]=(-1.77453188487)*x[0]+(0.634838793872)*x[1]
-        arg[4,0,1]=(-0.215461066907)*x[0]+(1.11635233844)*x[1]
-        arg[4,1,0]=(0.835816652592)*x[0]+(0.668378554214)*x[1]
-        arg[4,1,1]=(-1.22133225406)*x[0]+(-0.148780252398)*x[1]
-        arg[5,0,0]=(0.320245409639)*x[0]+(-1.08828513776)*x[1]
-        arg[5,0,1]=(-0.1865835417)*x[0]+(-0.353282061874)*x[1]
-        arg[5,1,0]=(1.38858040685)*x[0]+(0.166398261098)*x[1]
-        arg[5,1,1]=(0.947718875755)*x[0]+(-1.06171934302)*x[1]
-        ref[0,0,0]=(-0.423505169404)*x_ref[0]+(-1.10390334264)*x_ref[1]
-        ref[0,0,1]=(-0.181820089254)*x_ref[0]+(-0.374602268791)*x_ref[1]
-        ref[0,1,0]=(-1.36906917075)*x_ref[0]+(0.26554385908)*x_ref[1]
-        ref[0,1,1]=(-0.280661572374)*x_ref[0]+(-0.239232524287)*x_ref[1]
-        ref[1,0,0]=(-1.25670251934)*x_ref[0]+(-0.429353977735)*x_ref[1]
-        ref[1,0,1]=(-0.747928970735)*x_ref[0]+(1.17874317611)*x_ref[1]
-        ref[1,1,0]=(-0.548814611802)*x_ref[0]+(-0.0249315764285)*x_ref[1]
-        ref[1,1,1]=(-0.481123117522)*x_ref[0]+(1.23402203879)*x_ref[1]
-        ref[2,0,0]=(-0.0639512689884)*x_ref[0]+(-0.0278213371376)*x_ref[1]
-        ref[2,0,1]=(-1.17292797621)*x_ref[0]+(0.42140600304)*x_ref[1]
-        ref[2,1,0]=(-0.358052601083)*x_ref[0]+(-1.66807880791)*x_ref[1]
-        ref[2,1,1]=(-0.291433251349)*x_ref[0]+(0.111473162108)*x_ref[1]
-        ref[3,0,0]=(0.742643625989)*x_ref[0]+(-1.29214106228)*x_ref[1]
-        ref[3,0,1]=(0.319887321826)*x_ref[0]+(-0.40213369238)*x_ref[1]
-        ref[3,1,0]=(-0.449412064097)*x_ref[0]+(-1.10654262009)*x_ref[1]
-        ref[3,1,1]=(1.19722227632)*x_ref[0]+(1.3455799026)*x_ref[1]
-        ref[4,0,0]=(-1.77453188487)*x_ref[0]+(0.634838793872)*x_ref[1]
-        ref[4,0,1]=(-0.215461066907)*x_ref[0]+(1.11635233844)*x_ref[1]
-        ref[4,1,0]=(0.835816652592)*x_ref[0]+(0.668378554214)*x_ref[1]
-        ref[4,1,1]=(-1.22133225406)*x_ref[0]+(-0.148780252398)*x_ref[1]
-        ref[5,0,0]=(0.320245409639)*x_ref[0]+(-1.08828513776)*x_ref[1]
-        ref[5,0,1]=(-0.1865835417)*x_ref[0]+(-0.353282061874)*x_ref[1]
-        ref[5,1,0]=(1.38858040685)*x_ref[0]+(0.166398261098)*x_ref[1]
-        ref[5,1,1]=(0.947718875755)*x_ref[0]+(-1.06171934302)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.892096322478)*x[0]+(0.720363183451)*x[1]+(0.600609272191)*x[2]
-        arg[0,0,1]=(-0.418024461935)*x[0]+(-0.819275292035)*x[1]+(0.134962557692)*x[2]
-        arg[0,1,0]=(-0.449783838361)*x[0]+(0.943677173533)*x[1]+(0.209424190991)*x[2]
-        arg[0,1,1]=(-0.424386775004)*x[0]+(-0.213024388094)*x[1]+(-1.05927943384)*x[2]
-        arg[1,0,0]=(-0.699504096539)*x[0]+(-0.153570308377)*x[1]+(0.576902392658)*x[2]
-        arg[1,0,1]=(-0.426914055661)*x[0]+(-0.330405267059)*x[1]+(1.07656632155)*x[2]
-        arg[1,1,0]=(0.775238005352)*x[0]+(1.11012072575)*x[1]+(0.764627098603)*x[2]
-        arg[1,1,1]=(0.0130424708408)*x[0]+(-0.671778102107)*x[1]+(0.780684368983)*x[2]
-        arg[2,0,0]=(-0.0512224258498)*x[0]+(-1.50515803984)*x[1]+(0.342824143946)*x[2]
-        arg[2,0,1]=(0.117541624176)*x[0]+(0.372415524552)*x[1]+(0.255218095016)*x[2]
-        arg[2,1,0]=(-0.574508895703)*x[0]+(0.345217292359)*x[1]+(0.209211956821)*x[2]
-        arg[2,1,1]=(0.93643587147)*x[0]+(-0.096209009902)*x[1]+(0.205150859527)*x[2]
-        arg[3,0,0]=(1.7541929884)*x[0]+(0.169061478447)*x[1]+(0.534746695515)*x[2]
-        arg[3,0,1]=(0.442329266782)*x[0]+(0.334971710414)*x[1]+(1.66892557698)*x[2]
-        arg[3,1,0]=(0.316436716758)*x[0]+(-1.25442030987)*x[1]+(0.372183105374)*x[2]
-        arg[3,1,1]=(-0.254157820265)*x[0]+(0.287381300023)*x[1]+(0.0574117423352)*x[2]
-        arg[4,0,0]=(-1.08380257521)*x[0]+(-1.31461890032)*x[1]+(-0.503802775099)*x[2]
-        arg[4,0,1]=(-0.558293486798)*x[0]+(0.702317635925)*x[1]+(0.463814829137)*x[2]
-        arg[4,1,0]=(-0.677160971974)*x[0]+(-0.14921275312)*x[1]+(-1.6501459435)*x[2]
-        arg[4,1,1]=(-0.176672532474)*x[0]+(0.945017605811)*x[1]+(-0.790342939788)*x[2]
-        arg[5,0,0]=(-1.45668070675)*x[0]+(-0.404957129204)*x[1]+(1.37383065954)*x[2]
-        arg[5,0,1]=(0.53829326756)*x[0]+(0.543333031479)*x[1]+(-0.854057296362)*x[2]
-        arg[5,1,0]=(0.805864283921)*x[0]+(-0.00186634953513)*x[1]+(-1.97111362539)*x[2]
-        arg[5,1,1]=(-0.387746238967)*x[0]+(-0.739158353882)*x[1]+(-0.134082808118)*x[2]
-        ref[0,0,0]=(-0.892096322478)*x_ref[0]+(0.720363183451)*x_ref[1]+(0.600609272191)*x_ref[2]
-        ref[0,0,1]=(-0.418024461935)*x_ref[0]+(-0.819275292035)*x_ref[1]+(0.134962557692)*x_ref[2]
-        ref[0,1,0]=(-0.449783838361)*x_ref[0]+(0.943677173533)*x_ref[1]+(0.209424190991)*x_ref[2]
-        ref[0,1,1]=(-0.424386775004)*x_ref[0]+(-0.213024388094)*x_ref[1]+(-1.05927943384)*x_ref[2]
-        ref[1,0,0]=(-0.699504096539)*x_ref[0]+(-0.153570308377)*x_ref[1]+(0.576902392658)*x_ref[2]
-        ref[1,0,1]=(-0.426914055661)*x_ref[0]+(-0.330405267059)*x_ref[1]+(1.07656632155)*x_ref[2]
-        ref[1,1,0]=(0.775238005352)*x_ref[0]+(1.11012072575)*x_ref[1]+(0.764627098603)*x_ref[2]
-        ref[1,1,1]=(0.0130424708408)*x_ref[0]+(-0.671778102107)*x_ref[1]+(0.780684368983)*x_ref[2]
-        ref[2,0,0]=(-0.0512224258498)*x_ref[0]+(-1.50515803984)*x_ref[1]+(0.342824143946)*x_ref[2]
-        ref[2,0,1]=(0.117541624176)*x_ref[0]+(0.372415524552)*x_ref[1]+(0.255218095016)*x_ref[2]
-        ref[2,1,0]=(-0.574508895703)*x_ref[0]+(0.345217292359)*x_ref[1]+(0.209211956821)*x_ref[2]
-        ref[2,1,1]=(0.93643587147)*x_ref[0]+(-0.096209009902)*x_ref[1]+(0.205150859527)*x_ref[2]
-        ref[3,0,0]=(1.7541929884)*x_ref[0]+(0.169061478447)*x_ref[1]+(0.534746695515)*x_ref[2]
-        ref[3,0,1]=(0.442329266782)*x_ref[0]+(0.334971710414)*x_ref[1]+(1.66892557698)*x_ref[2]
-        ref[3,1,0]=(0.316436716758)*x_ref[0]+(-1.25442030987)*x_ref[1]+(0.372183105374)*x_ref[2]
-        ref[3,1,1]=(-0.254157820265)*x_ref[0]+(0.287381300023)*x_ref[1]+(0.0574117423352)*x_ref[2]
-        ref[4,0,0]=(-1.08380257521)*x_ref[0]+(-1.31461890032)*x_ref[1]+(-0.503802775099)*x_ref[2]
-        ref[4,0,1]=(-0.558293486798)*x_ref[0]+(0.702317635925)*x_ref[1]+(0.463814829137)*x_ref[2]
-        ref[4,1,0]=(-0.677160971974)*x_ref[0]+(-0.14921275312)*x_ref[1]+(-1.6501459435)*x_ref[2]
-        ref[4,1,1]=(-0.176672532474)*x_ref[0]+(0.945017605811)*x_ref[1]+(-0.790342939788)*x_ref[2]
-        ref[5,0,0]=(-1.45668070675)*x_ref[0]+(-0.404957129204)*x_ref[1]+(1.37383065954)*x_ref[2]
-        ref[5,0,1]=(0.53829326756)*x_ref[0]+(0.543333031479)*x_ref[1]+(-0.854057296362)*x_ref[2]
-        ref[5,1,0]=(0.805864283921)*x_ref[0]+(-0.00186634953513)*x_ref[1]+(-1.97111362539)*x_ref[2]
-        ref[5,1,1]=(-0.387746238967)*x_ref[0]+(-0.739158353882)*x_ref[1]+(-0.134082808118)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedSolution onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.754311658086)*x[0]+(0.235157034342)*x[1]
-        arg[0,0,0,1]=(-1.33786315024)*x[0]+(0.243349279742)*x[1]
-        arg[0,0,1,0]=(1.48657750088)*x[0]+(1.09853108305)*x[1]
-        arg[0,0,1,1]=(1.4501362266)*x[0]+(0.824811567155)*x[1]
-        arg[0,0,2,0]=(1.12567566082)*x[0]+(0.663525681174)*x[1]
-        arg[0,0,2,1]=(1.48991565019)*x[0]+(-0.680795365011)*x[1]
-        arg[0,1,0,0]=(0.268571449528)*x[0]+(0.818595834672)*x[1]
-        arg[0,1,0,1]=(-1.55490945555)*x[0]+(0.783595197888)*x[1]
-        arg[0,1,1,0]=(0.913201382585)*x[0]+(0.855491379376)*x[1]
-        arg[0,1,1,1]=(-0.179192075116)*x[0]+(-0.690415079523)*x[1]
-        arg[0,1,2,0]=(-0.0393574502912)*x[0]+(-0.690157650634)*x[1]
-        arg[0,1,2,1]=(0.784216863217)*x[0]+(0.498735486159)*x[1]
-        arg[0,2,0,0]=(0.137939554165)*x[0]+(-1.33961519113)*x[1]
-        arg[0,2,0,1]=(-1.03897311736)*x[0]+(-1.37797405312)*x[1]
-        arg[0,2,1,0]=(0.199812003756)*x[0]+(-0.0388499674037)*x[1]
-        arg[0,2,1,1]=(1.15530534202)*x[0]+(-1.28280869078)*x[1]
-        arg[0,2,2,0]=(0.836447791155)*x[0]+(1.2627066026)*x[1]
-        arg[0,2,2,1]=(-0.584608492688)*x[0]+(-1.55305974305)*x[1]
-        arg[0,3,0,0]=(-0.661952381799)*x[0]+(-1.27062403778)*x[1]
-        arg[0,3,0,1]=(-1.47789532259)*x[0]+(-0.279583524936)*x[1]
-        arg[0,3,1,0]=(1.40729771357)*x[0]+(0.0971284144528)*x[1]
-        arg[0,3,1,1]=(-0.459167955911)*x[0]+(-1.29033281524)*x[1]
-        arg[0,3,2,0]=(-1.63189436824)*x[0]+(0.75729808422)*x[1]
-        arg[0,3,2,1]=(0.522479828718)*x[0]+(-0.0231299515383)*x[1]
-        arg[0,4,0,0]=(0.241891446615)*x[0]+(0.803327107651)*x[1]
-        arg[0,4,0,1]=(0.273613502836)*x[0]+(-0.0115180464171)*x[1]
-        arg[0,4,1,0]=(1.96219818696)*x[0]+(-0.349137094743)*x[1]
-        arg[0,4,1,1]=(0.365690821719)*x[0]+(-1.6943347181)*x[1]
-        arg[0,4,2,0]=(-0.283970779872)*x[0]+(-0.258537179804)*x[1]
-        arg[0,4,2,1]=(-0.973333430598)*x[0]+(1.48706276212)*x[1]
-        arg[1,0,0,0]=(1.18757466971)*x[0]+(0.838804656357)*x[1]
-        arg[1,0,0,1]=(0.840859904702)*x[0]+(1.09955195682)*x[1]
-        arg[1,0,1,0]=(1.46190513227)*x[0]+(-0.596959830422)*x[1]
-        arg[1,0,1,1]=(0.718689296745)*x[0]+(-0.628074620222)*x[1]
-        arg[1,0,2,0]=(0.440761293041)*x[0]+(0.115800854194)*x[1]
-        arg[1,0,2,1]=(1.34891146904)*x[0]+(0.813690260652)*x[1]
-        arg[1,1,0,0]=(0.183071638098)*x[0]+(-1.37996210755)*x[1]
-        arg[1,1,0,1]=(0.258142115988)*x[0]+(-0.757709381529)*x[1]
-        arg[1,1,1,0]=(1.72392829309)*x[0]+(0.444995102781)*x[1]
-        arg[1,1,1,1]=(-0.380898209988)*x[0]+(-0.0950246860347)*x[1]
-        arg[1,1,2,0]=(0.203007226016)*x[0]+(1.09786001832)*x[1]
-        arg[1,1,2,1]=(-0.502500865341)*x[0]+(-0.629980527995)*x[1]
-        arg[1,2,0,0]=(0.482549518436)*x[0]+(0.565840824146)*x[1]
-        arg[1,2,0,1]=(0.355818565068)*x[0]+(-0.78273295574)*x[1]
-        arg[1,2,1,0]=(1.79204033071)*x[0]+(-0.698040851585)*x[1]
-        arg[1,2,1,1]=(-0.534827741044)*x[0]+(0.00943131627498)*x[1]
-        arg[1,2,2,0]=(-1.00663524444)*x[0]+(0.0207854553456)*x[1]
-        arg[1,2,2,1]=(-0.338048040159)*x[0]+(-0.380607406217)*x[1]
-        arg[1,3,0,0]=(0.586310549044)*x[0]+(0.276326798805)*x[1]
-        arg[1,3,0,1]=(-0.260482580702)*x[0]+(-0.349279395321)*x[1]
-        arg[1,3,1,0]=(-0.196533829895)*x[0]+(0.614805272738)*x[1]
-        arg[1,3,1,1]=(-0.363176483895)*x[0]+(-0.925817017731)*x[1]
-        arg[1,3,2,0]=(-1.24182075421)*x[0]+(0.215966446013)*x[1]
-        arg[1,3,2,1]=(1.07546652642)*x[0]+(0.383803991974)*x[1]
-        arg[1,4,0,0]=(0.199312303525)*x[0]+(-0.314520883859)*x[1]
-        arg[1,4,0,1]=(-1.56890826152)*x[0]+(-0.133086662241)*x[1]
-        arg[1,4,1,0]=(1.1307241936)*x[0]+(-1.32905744984)*x[1]
-        arg[1,4,1,1]=(-0.385991455298)*x[0]+(0.292913024507)*x[1]
-        arg[1,4,2,0]=(1.14561678056)*x[0]+(-0.662696162276)*x[1]
-        arg[1,4,2,1]=(-1.49533948954)*x[0]+(1.43396138744)*x[1]
-        arg[2,0,0,0]=(-0.63160396493)*x[0]+(0.813120998776)*x[1]
-        arg[2,0,0,1]=(0.65598998434)*x[0]+(-1.02445537553)*x[1]
-        arg[2,0,1,0]=(-1.13473104075)*x[0]+(0.057331183449)*x[1]
-        arg[2,0,1,1]=(-0.154892482107)*x[0]+(0.481969957579)*x[1]
-        arg[2,0,2,0]=(0.521916671496)*x[0]+(0.546676943059)*x[1]
-        arg[2,0,2,1]=(-1.68919379028)*x[0]+(1.08292038981)*x[1]
-        arg[2,1,0,0]=(-0.643846595888)*x[0]+(0.528306097755)*x[1]
-        arg[2,1,0,1]=(1.3745090497)*x[0]+(-0.0801648509184)*x[1]
-        arg[2,1,1,0]=(0.129096817054)*x[0]+(0.90750370855)*x[1]
-        arg[2,1,1,1]=(0.539309513305)*x[0]+(1.34949470961)*x[1]
-        arg[2,1,2,0]=(1.4189703896)*x[0]+(-1.75011201893)*x[1]
-        arg[2,1,2,1]=(-1.09325548386)*x[0]+(0.148279301716)*x[1]
-        arg[2,2,0,0]=(-1.25785133743)*x[0]+(0.275071306594)*x[1]
-        arg[2,2,0,1]=(-0.550152068761)*x[0]+(-1.20422484275)*x[1]
-        arg[2,2,1,0]=(-0.102062863668)*x[0]+(-1.34431887541)*x[1]
-        arg[2,2,1,1]=(0.103354724169)*x[0]+(-0.941952180446)*x[1]
-        arg[2,2,2,0]=(1.2090339604)*x[0]+(-0.330357976796)*x[1]
-        arg[2,2,2,1]=(0.203162449188)*x[0]+(-1.03640702014)*x[1]
-        arg[2,3,0,0]=(-0.324576353514)*x[0]+(0.582614539267)*x[1]
-        arg[2,3,0,1]=(-0.213823136215)*x[0]+(-0.473199105214)*x[1]
-        arg[2,3,1,0]=(0.395144702599)*x[0]+(0.0358194467152)*x[1]
-        arg[2,3,1,1]=(1.32860563396)*x[0]+(-0.577308310732)*x[1]
-        arg[2,3,2,0]=(0.994205029432)*x[0]+(1.13433517636)*x[1]
-        arg[2,3,2,1]=(-0.488499286742)*x[0]+(0.224253820738)*x[1]
-        arg[2,4,0,0]=(1.48035663008)*x[0]+(-1.09697986914)*x[1]
-        arg[2,4,0,1]=(-1.09991915151)*x[0]+(-0.557951199985)*x[1]
-        arg[2,4,1,0]=(-1.23862699804)*x[0]+(-0.230602187713)*x[1]
-        arg[2,4,1,1]=(-0.922609370448)*x[0]+(1.76673953413)*x[1]
-        arg[2,4,2,0]=(0.731769419709)*x[0]+(-1.1094516608)*x[1]
-        arg[2,4,2,1]=(-0.145672504805)*x[0]+(0.168194421355)*x[1]
-        arg[3,0,0,0]=(1.02559707602)*x[0]+(0.260431368523)*x[1]
-        arg[3,0,0,1]=(0.111899568824)*x[0]+(-0.90725475423)*x[1]
-        arg[3,0,1,0]=(-0.226547745683)*x[0]+(-0.232830393372)*x[1]
-        arg[3,0,1,1]=(0.347004318471)*x[0]+(-0.196130970001)*x[1]
-        arg[3,0,2,0]=(-1.72155871442)*x[0]+(-1.28372407452)*x[1]
-        arg[3,0,2,1]=(1.43817914693)*x[0]+(-0.354093253684)*x[1]
-        arg[3,1,0,0]=(-0.293939245102)*x[0]+(0.0255562139103)*x[1]
-        arg[3,1,0,1]=(0.139306213018)*x[0]+(0.595062226642)*x[1]
-        arg[3,1,1,0]=(-0.670339920672)*x[0]+(0.387520583192)*x[1]
-        arg[3,1,1,1]=(-0.0323325470954)*x[0]+(-0.681162999279)*x[1]
-        arg[3,1,2,0]=(0.235275048739)*x[0]+(0.144725473773)*x[1]
-        arg[3,1,2,1]=(0.132211795214)*x[0]+(0.262780216845)*x[1]
-        arg[3,2,0,0]=(0.590514326163)*x[0]+(-0.84273677918)*x[1]
-        arg[3,2,0,1]=(-0.925181556185)*x[0]+(-0.300244447001)*x[1]
-        arg[3,2,1,0]=(-0.0509700795112)*x[0]+(-1.31919389616)*x[1]
-        arg[3,2,1,1]=(1.50577291846)*x[0]+(-0.219284607769)*x[1]
-        arg[3,2,2,0]=(-0.0460616673346)*x[0]+(-0.690312685466)*x[1]
-        arg[3,2,2,1]=(-0.673765477936)*x[0]+(-0.0965860475641)*x[1]
-        arg[3,3,0,0]=(-0.6577594174)*x[0]+(0.171886277016)*x[1]
-        arg[3,3,0,1]=(-1.08810434718)*x[0]+(0.333153250183)*x[1]
-        arg[3,3,1,0]=(0.150968371983)*x[0]+(0.290859317391)*x[1]
-        arg[3,3,1,1]=(1.62096265131)*x[0]+(-1.10309602741)*x[1]
-        arg[3,3,2,0]=(-0.932063639972)*x[0]+(-0.897131561126)*x[1]
-        arg[3,3,2,1]=(-0.819110834345)*x[0]+(1.59159109562)*x[1]
-        arg[3,4,0,0]=(0.272662931155)*x[0]+(0.69026285756)*x[1]
-        arg[3,4,0,1]=(-0.600556370757)*x[0]+(-0.0853533546302)*x[1]
-        arg[3,4,1,0]=(1.18544735281)*x[0]+(0.217751189034)*x[1]
-        arg[3,4,1,1]=(-0.594609531358)*x[0]+(0.882158349788)*x[1]
-        arg[3,4,2,0]=(1.18876765552)*x[0]+(-0.411481586979)*x[1]
-        arg[3,4,2,1]=(-1.093067792)*x[0]+(-0.266744260768)*x[1]
-        ref[0,0,0,0]=(-0.754311658086)*x_ref[0]+(0.235157034342)*x_ref[1]
-        ref[0,0,0,1]=(-1.33786315024)*x_ref[0]+(0.243349279742)*x_ref[1]
-        ref[0,0,1,0]=(1.48657750088)*x_ref[0]+(1.09853108305)*x_ref[1]
-        ref[0,0,1,1]=(1.4501362266)*x_ref[0]+(0.824811567155)*x_ref[1]
-        ref[0,0,2,0]=(1.12567566082)*x_ref[0]+(0.663525681174)*x_ref[1]
-        ref[0,0,2,1]=(1.48991565019)*x_ref[0]+(-0.680795365011)*x_ref[1]
-        ref[0,1,0,0]=(0.268571449528)*x_ref[0]+(0.818595834672)*x_ref[1]
-        ref[0,1,0,1]=(-1.55490945555)*x_ref[0]+(0.783595197888)*x_ref[1]
-        ref[0,1,1,0]=(0.913201382585)*x_ref[0]+(0.855491379376)*x_ref[1]
-        ref[0,1,1,1]=(-0.179192075116)*x_ref[0]+(-0.690415079523)*x_ref[1]
-        ref[0,1,2,0]=(-0.0393574502912)*x_ref[0]+(-0.690157650634)*x_ref[1]
-        ref[0,1,2,1]=(0.784216863217)*x_ref[0]+(0.498735486159)*x_ref[1]
-        ref[0,2,0,0]=(0.137939554165)*x_ref[0]+(-1.33961519113)*x_ref[1]
-        ref[0,2,0,1]=(-1.03897311736)*x_ref[0]+(-1.37797405312)*x_ref[1]
-        ref[0,2,1,0]=(0.199812003756)*x_ref[0]+(-0.0388499674037)*x_ref[1]
-        ref[0,2,1,1]=(1.15530534202)*x_ref[0]+(-1.28280869078)*x_ref[1]
-        ref[0,2,2,0]=(0.836447791155)*x_ref[0]+(1.2627066026)*x_ref[1]
-        ref[0,2,2,1]=(-0.584608492688)*x_ref[0]+(-1.55305974305)*x_ref[1]
-        ref[0,3,0,0]=(-0.661952381799)*x_ref[0]+(-1.27062403778)*x_ref[1]
-        ref[0,3,0,1]=(-1.47789532259)*x_ref[0]+(-0.279583524936)*x_ref[1]
-        ref[0,3,1,0]=(1.40729771357)*x_ref[0]+(0.0971284144528)*x_ref[1]
-        ref[0,3,1,1]=(-0.459167955911)*x_ref[0]+(-1.29033281524)*x_ref[1]
-        ref[0,3,2,0]=(-1.63189436824)*x_ref[0]+(0.75729808422)*x_ref[1]
-        ref[0,3,2,1]=(0.522479828718)*x_ref[0]+(-0.0231299515383)*x_ref[1]
-        ref[0,4,0,0]=(0.241891446615)*x_ref[0]+(0.803327107651)*x_ref[1]
-        ref[0,4,0,1]=(0.273613502836)*x_ref[0]+(-0.0115180464171)*x_ref[1]
-        ref[0,4,1,0]=(1.96219818696)*x_ref[0]+(-0.349137094743)*x_ref[1]
-        ref[0,4,1,1]=(0.365690821719)*x_ref[0]+(-1.6943347181)*x_ref[1]
-        ref[0,4,2,0]=(-0.283970779872)*x_ref[0]+(-0.258537179804)*x_ref[1]
-        ref[0,4,2,1]=(-0.973333430598)*x_ref[0]+(1.48706276212)*x_ref[1]
-        ref[1,0,0,0]=(1.18757466971)*x_ref[0]+(0.838804656357)*x_ref[1]
-        ref[1,0,0,1]=(0.840859904702)*x_ref[0]+(1.09955195682)*x_ref[1]
-        ref[1,0,1,0]=(1.46190513227)*x_ref[0]+(-0.596959830422)*x_ref[1]
-        ref[1,0,1,1]=(0.718689296745)*x_ref[0]+(-0.628074620222)*x_ref[1]
-        ref[1,0,2,0]=(0.440761293041)*x_ref[0]+(0.115800854194)*x_ref[1]
-        ref[1,0,2,1]=(1.34891146904)*x_ref[0]+(0.813690260652)*x_ref[1]
-        ref[1,1,0,0]=(0.183071638098)*x_ref[0]+(-1.37996210755)*x_ref[1]
-        ref[1,1,0,1]=(0.258142115988)*x_ref[0]+(-0.757709381529)*x_ref[1]
-        ref[1,1,1,0]=(1.72392829309)*x_ref[0]+(0.444995102781)*x_ref[1]
-        ref[1,1,1,1]=(-0.380898209988)*x_ref[0]+(-0.0950246860347)*x_ref[1]
-        ref[1,1,2,0]=(0.203007226016)*x_ref[0]+(1.09786001832)*x_ref[1]
-        ref[1,1,2,1]=(-0.502500865341)*x_ref[0]+(-0.629980527995)*x_ref[1]
-        ref[1,2,0,0]=(0.482549518436)*x_ref[0]+(0.565840824146)*x_ref[1]
-        ref[1,2,0,1]=(0.355818565068)*x_ref[0]+(-0.78273295574)*x_ref[1]
-        ref[1,2,1,0]=(1.79204033071)*x_ref[0]+(-0.698040851585)*x_ref[1]
-        ref[1,2,1,1]=(-0.534827741044)*x_ref[0]+(0.00943131627498)*x_ref[1]
-        ref[1,2,2,0]=(-1.00663524444)*x_ref[0]+(0.0207854553456)*x_ref[1]
-        ref[1,2,2,1]=(-0.338048040159)*x_ref[0]+(-0.380607406217)*x_ref[1]
-        ref[1,3,0,0]=(0.586310549044)*x_ref[0]+(0.276326798805)*x_ref[1]
-        ref[1,3,0,1]=(-0.260482580702)*x_ref[0]+(-0.349279395321)*x_ref[1]
-        ref[1,3,1,0]=(-0.196533829895)*x_ref[0]+(0.614805272738)*x_ref[1]
-        ref[1,3,1,1]=(-0.363176483895)*x_ref[0]+(-0.925817017731)*x_ref[1]
-        ref[1,3,2,0]=(-1.24182075421)*x_ref[0]+(0.215966446013)*x_ref[1]
-        ref[1,3,2,1]=(1.07546652642)*x_ref[0]+(0.383803991974)*x_ref[1]
-        ref[1,4,0,0]=(0.199312303525)*x_ref[0]+(-0.314520883859)*x_ref[1]
-        ref[1,4,0,1]=(-1.56890826152)*x_ref[0]+(-0.133086662241)*x_ref[1]
-        ref[1,4,1,0]=(1.1307241936)*x_ref[0]+(-1.32905744984)*x_ref[1]
-        ref[1,4,1,1]=(-0.385991455298)*x_ref[0]+(0.292913024507)*x_ref[1]
-        ref[1,4,2,0]=(1.14561678056)*x_ref[0]+(-0.662696162276)*x_ref[1]
-        ref[1,4,2,1]=(-1.49533948954)*x_ref[0]+(1.43396138744)*x_ref[1]
-        ref[2,0,0,0]=(-0.63160396493)*x_ref[0]+(0.813120998776)*x_ref[1]
-        ref[2,0,0,1]=(0.65598998434)*x_ref[0]+(-1.02445537553)*x_ref[1]
-        ref[2,0,1,0]=(-1.13473104075)*x_ref[0]+(0.057331183449)*x_ref[1]
-        ref[2,0,1,1]=(-0.154892482107)*x_ref[0]+(0.481969957579)*x_ref[1]
-        ref[2,0,2,0]=(0.521916671496)*x_ref[0]+(0.546676943059)*x_ref[1]
-        ref[2,0,2,1]=(-1.68919379028)*x_ref[0]+(1.08292038981)*x_ref[1]
-        ref[2,1,0,0]=(-0.643846595888)*x_ref[0]+(0.528306097755)*x_ref[1]
-        ref[2,1,0,1]=(1.3745090497)*x_ref[0]+(-0.0801648509184)*x_ref[1]
-        ref[2,1,1,0]=(0.129096817054)*x_ref[0]+(0.90750370855)*x_ref[1]
-        ref[2,1,1,1]=(0.539309513305)*x_ref[0]+(1.34949470961)*x_ref[1]
-        ref[2,1,2,0]=(1.4189703896)*x_ref[0]+(-1.75011201893)*x_ref[1]
-        ref[2,1,2,1]=(-1.09325548386)*x_ref[0]+(0.148279301716)*x_ref[1]
-        ref[2,2,0,0]=(-1.25785133743)*x_ref[0]+(0.275071306594)*x_ref[1]
-        ref[2,2,0,1]=(-0.550152068761)*x_ref[0]+(-1.20422484275)*x_ref[1]
-        ref[2,2,1,0]=(-0.102062863668)*x_ref[0]+(-1.34431887541)*x_ref[1]
-        ref[2,2,1,1]=(0.103354724169)*x_ref[0]+(-0.941952180446)*x_ref[1]
-        ref[2,2,2,0]=(1.2090339604)*x_ref[0]+(-0.330357976796)*x_ref[1]
-        ref[2,2,2,1]=(0.203162449188)*x_ref[0]+(-1.03640702014)*x_ref[1]
-        ref[2,3,0,0]=(-0.324576353514)*x_ref[0]+(0.582614539267)*x_ref[1]
-        ref[2,3,0,1]=(-0.213823136215)*x_ref[0]+(-0.473199105214)*x_ref[1]
-        ref[2,3,1,0]=(0.395144702599)*x_ref[0]+(0.0358194467152)*x_ref[1]
-        ref[2,3,1,1]=(1.32860563396)*x_ref[0]+(-0.577308310732)*x_ref[1]
-        ref[2,3,2,0]=(0.994205029432)*x_ref[0]+(1.13433517636)*x_ref[1]
-        ref[2,3,2,1]=(-0.488499286742)*x_ref[0]+(0.224253820738)*x_ref[1]
-        ref[2,4,0,0]=(1.48035663008)*x_ref[0]+(-1.09697986914)*x_ref[1]
-        ref[2,4,0,1]=(-1.09991915151)*x_ref[0]+(-0.557951199985)*x_ref[1]
-        ref[2,4,1,0]=(-1.23862699804)*x_ref[0]+(-0.230602187713)*x_ref[1]
-        ref[2,4,1,1]=(-0.922609370448)*x_ref[0]+(1.76673953413)*x_ref[1]
-        ref[2,4,2,0]=(0.731769419709)*x_ref[0]+(-1.1094516608)*x_ref[1]
-        ref[2,4,2,1]=(-0.145672504805)*x_ref[0]+(0.168194421355)*x_ref[1]
-        ref[3,0,0,0]=(1.02559707602)*x_ref[0]+(0.260431368523)*x_ref[1]
-        ref[3,0,0,1]=(0.111899568824)*x_ref[0]+(-0.90725475423)*x_ref[1]
-        ref[3,0,1,0]=(-0.226547745683)*x_ref[0]+(-0.232830393372)*x_ref[1]
-        ref[3,0,1,1]=(0.347004318471)*x_ref[0]+(-0.196130970001)*x_ref[1]
-        ref[3,0,2,0]=(-1.72155871442)*x_ref[0]+(-1.28372407452)*x_ref[1]
-        ref[3,0,2,1]=(1.43817914693)*x_ref[0]+(-0.354093253684)*x_ref[1]
-        ref[3,1,0,0]=(-0.293939245102)*x_ref[0]+(0.0255562139103)*x_ref[1]
-        ref[3,1,0,1]=(0.139306213018)*x_ref[0]+(0.595062226642)*x_ref[1]
-        ref[3,1,1,0]=(-0.670339920672)*x_ref[0]+(0.387520583192)*x_ref[1]
-        ref[3,1,1,1]=(-0.0323325470954)*x_ref[0]+(-0.681162999279)*x_ref[1]
-        ref[3,1,2,0]=(0.235275048739)*x_ref[0]+(0.144725473773)*x_ref[1]
-        ref[3,1,2,1]=(0.132211795214)*x_ref[0]+(0.262780216845)*x_ref[1]
-        ref[3,2,0,0]=(0.590514326163)*x_ref[0]+(-0.84273677918)*x_ref[1]
-        ref[3,2,0,1]=(-0.925181556185)*x_ref[0]+(-0.300244447001)*x_ref[1]
-        ref[3,2,1,0]=(-0.0509700795112)*x_ref[0]+(-1.31919389616)*x_ref[1]
-        ref[3,2,1,1]=(1.50577291846)*x_ref[0]+(-0.219284607769)*x_ref[1]
-        ref[3,2,2,0]=(-0.0460616673346)*x_ref[0]+(-0.690312685466)*x_ref[1]
-        ref[3,2,2,1]=(-0.673765477936)*x_ref[0]+(-0.0965860475641)*x_ref[1]
-        ref[3,3,0,0]=(-0.6577594174)*x_ref[0]+(0.171886277016)*x_ref[1]
-        ref[3,3,0,1]=(-1.08810434718)*x_ref[0]+(0.333153250183)*x_ref[1]
-        ref[3,3,1,0]=(0.150968371983)*x_ref[0]+(0.290859317391)*x_ref[1]
-        ref[3,3,1,1]=(1.62096265131)*x_ref[0]+(-1.10309602741)*x_ref[1]
-        ref[3,3,2,0]=(-0.932063639972)*x_ref[0]+(-0.897131561126)*x_ref[1]
-        ref[3,3,2,1]=(-0.819110834345)*x_ref[0]+(1.59159109562)*x_ref[1]
-        ref[3,4,0,0]=(0.272662931155)*x_ref[0]+(0.69026285756)*x_ref[1]
-        ref[3,4,0,1]=(-0.600556370757)*x_ref[0]+(-0.0853533546302)*x_ref[1]
-        ref[3,4,1,0]=(1.18544735281)*x_ref[0]+(0.217751189034)*x_ref[1]
-        ref[3,4,1,1]=(-0.594609531358)*x_ref[0]+(0.882158349788)*x_ref[1]
-        ref[3,4,2,0]=(1.18876765552)*x_ref[0]+(-0.411481586979)*x_ref[1]
-        ref[3,4,2,1]=(-1.093067792)*x_ref[0]+(-0.266744260768)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.29218217256)*x[0]+(-0.382937892213)*x[1]+(0.14363896447)*x[2]
-        arg[0,0,0,1]=(1.39856942421)*x[0]+(0.302082267835)*x[1]+(-0.40870736584)*x[2]
-        arg[0,0,1,0]=(0.523846108043)*x[0]+(1.19961531204)*x[1]+(0.838881761349)*x[2]
-        arg[0,0,1,1]=(0.634542282764)*x[0]+(-0.475514686466)*x[1]+(-1.68745428486)*x[2]
-        arg[0,0,2,0]=(1.16379585731)*x[0]+(-0.928037595416)*x[1]+(0.998857178353)*x[2]
-        arg[0,0,2,1]=(-0.804515607022)*x[0]+(-0.915469493439)*x[1]+(-0.143888000623)*x[2]
-        arg[0,1,0,0]=(0.925843155486)*x[0]+(-0.168243418953)*x[1]+(-0.887839555187)*x[2]
-        arg[0,1,0,1]=(-0.913103105329)*x[0]+(1.38011681732)*x[1]+(-0.992478793291)*x[2]
-        arg[0,1,1,0]=(0.759685289903)*x[0]+(-0.579481939982)*x[1]+(0.577682929138)*x[2]
-        arg[0,1,1,1]=(0.813155548228)*x[0]+(-0.178317843217)*x[1]+(-0.0460113194526)*x[2]
-        arg[0,1,2,0]=(-0.195764860141)*x[0]+(1.44256979628)*x[1]+(0.283992441343)*x[2]
-        arg[0,1,2,1]=(-0.921229459072)*x[0]+(-1.19295761547)*x[1]+(0.215736801944)*x[2]
-        arg[0,2,0,0]=(-0.741726331752)*x[0]+(-0.225585937382)*x[1]+(1.12654556466)*x[2]
-        arg[0,2,0,1]=(-0.709656162421)*x[0]+(0.298862010425)*x[1]+(-0.502443284827)*x[2]
-        arg[0,2,1,0]=(-1.01166188669)*x[0]+(-1.43763408953)*x[1]+(-0.835160398488)*x[2]
-        arg[0,2,1,1]=(1.80968424545)*x[0]+(-0.802666103495)*x[1]+(0.290283606115)*x[2]
-        arg[0,2,2,0]=(0.346481981585)*x[0]+(-0.444176962215)*x[1]+(0.689127612227)*x[2]
-        arg[0,2,2,1]=(1.06925494095)*x[0]+(0.452854988449)*x[1]+(-1.19974690364)*x[2]
-        arg[0,3,0,0]=(-0.534896036328)*x[0]+(-0.312000770615)*x[1]+(-0.440033746693)*x[2]
-        arg[0,3,0,1]=(0.580351431838)*x[0]+(-0.36623848451)*x[1]+(-0.507837490037)*x[2]
-        arg[0,3,1,0]=(0.383180910522)*x[0]+(-0.0907152443563)*x[1]+(-0.200103743943)*x[2]
-        arg[0,3,1,1]=(0.0160194687513)*x[0]+(0.862509612939)*x[1]+(-1.14643594474)*x[2]
-        arg[0,3,2,0]=(-0.224390850199)*x[0]+(-0.176927715447)*x[1]+(0.213480525831)*x[2]
-        arg[0,3,2,1]=(-0.0508511448148)*x[0]+(-1.28943467389)*x[1]+(0.902285302487)*x[2]
-        arg[0,4,0,0]=(-0.633106625232)*x[0]+(-0.430651917485)*x[1]+(0.583149841952)*x[2]
-        arg[0,4,0,1]=(0.579035528956)*x[0]+(0.159439682519)*x[1]+(-0.0926277063021)*x[2]
-        arg[0,4,1,0]=(0.00484756366973)*x[0]+(0.0324822270755)*x[1]+(1.20052413378)*x[2]
-        arg[0,4,1,1]=(-0.337383994688)*x[0]+(0.902076367981)*x[1]+(-0.1956377395)*x[2]
-        arg[0,4,2,0]=(0.928434343456)*x[0]+(0.0376569884355)*x[1]+(-0.155274118568)*x[2]
-        arg[0,4,2,1]=(-0.541990213238)*x[0]+(-0.0165076697829)*x[1]+(-0.210319224859)*x[2]
-        arg[1,0,0,0]=(-1.67762025181)*x[0]+(1.61434755579)*x[1]+(0.357272049999)*x[2]
-        arg[1,0,0,1]=(-1.62532544549)*x[0]+(-0.271426231027)*x[1]+(0.338680991778)*x[2]
-        arg[1,0,1,0]=(1.73523408033)*x[0]+(1.11987092368)*x[1]+(0.126769364273)*x[2]
-        arg[1,0,1,1]=(-1.49220786558)*x[0]+(1.51915566092)*x[1]+(1.24788192157)*x[2]
-        arg[1,0,2,0]=(-0.687808766765)*x[0]+(-1.02318754737)*x[1]+(0.590653972416)*x[2]
-        arg[1,0,2,1]=(0.756067354802)*x[0]+(-0.66964706965)*x[1]+(-1.18986499158)*x[2]
-        arg[1,1,0,0]=(0.371345732177)*x[0]+(0.212739617115)*x[1]+(-1.13439047405)*x[2]
-        arg[1,1,0,1]=(0.525761804111)*x[0]+(0.144130399691)*x[1]+(0.715517587677)*x[2]
-        arg[1,1,1,0]=(-0.376160293215)*x[0]+(-0.469964935263)*x[1]+(0.413518194707)*x[2]
-        arg[1,1,1,1]=(-0.787748398144)*x[0]+(-0.810090402237)*x[1]+(-0.50127109256)*x[2]
-        arg[1,1,2,0]=(0.654555083692)*x[0]+(-0.142134700515)*x[1]+(-1.55891930521)*x[2]
-        arg[1,1,2,1]=(-0.423058885456)*x[0]+(-0.65930158641)*x[1]+(0.94440057744)*x[2]
-        arg[1,2,0,0]=(-0.924832007053)*x[0]+(1.0154890382)*x[1]+(0.11938079748)*x[2]
-        arg[1,2,0,1]=(0.134642686931)*x[0]+(-1.30908067998)*x[1]+(0.367206139074)*x[2]
-        arg[1,2,1,0]=(1.55524055201)*x[0]+(0.727208660637)*x[1]+(0.809810917377)*x[2]
-        arg[1,2,1,1]=(0.94813391462)*x[0]+(-1.49402524308)*x[1]+(0.367824542434)*x[2]
-        arg[1,2,2,0]=(-0.608295798731)*x[0]+(-0.142302252814)*x[1]+(-0.986529251308)*x[2]
-        arg[1,2,2,1]=(0.0259394619607)*x[0]+(-1.60728202467)*x[1]+(0.312534656619)*x[2]
-        arg[1,3,0,0]=(-1.34063373729)*x[0]+(-0.268499839329)*x[1]+(-0.335125886299)*x[2]
-        arg[1,3,0,1]=(1.53280698072)*x[0]+(1.24369684711)*x[1]+(0.766369156132)*x[2]
-        arg[1,3,1,0]=(0.902067176876)*x[0]+(0.791102994814)*x[1]+(-0.89266430493)*x[2]
-        arg[1,3,1,1]=(0.704997629232)*x[0]+(-0.551611360332)*x[1]+(1.39134537491)*x[2]
-        arg[1,3,2,0]=(-0.151690675211)*x[0]+(-1.01762975893)*x[1]+(-0.627493214284)*x[2]
-        arg[1,3,2,1]=(1.00936645922)*x[0]+(0.0322458997248)*x[1]+(1.45039938194)*x[2]
-        arg[1,4,0,0]=(-0.0916390388904)*x[0]+(-0.783111746469)*x[1]+(0.389725342225)*x[2]
-        arg[1,4,0,1]=(1.18859328243)*x[0]+(0.871689661558)*x[1]+(-0.775464713448)*x[2]
-        arg[1,4,1,0]=(0.913118342488)*x[0]+(1.53285648884)*x[1]+(0.0947365101243)*x[2]
-        arg[1,4,1,1]=(-1.00735841224)*x[0]+(-1.12544193607)*x[1]+(0.267347229372)*x[2]
-        arg[1,4,2,0]=(0.285943438284)*x[0]+(-1.0889389244)*x[1]+(-1.03054842327)*x[2]
-        arg[1,4,2,1]=(-1.5768940139)*x[0]+(0.91237754587)*x[1]+(1.30220394199)*x[2]
-        arg[2,0,0,0]=(-0.0634935883277)*x[0]+(0.157304131712)*x[1]+(-1.2995042074)*x[2]
-        arg[2,0,0,1]=(-0.802705266871)*x[0]+(0.238233162774)*x[1]+(1.29463414013)*x[2]
-        arg[2,0,1,0]=(-0.925468462671)*x[0]+(0.870960795966)*x[1]+(0.156522765713)*x[2]
-        arg[2,0,1,1]=(-0.546666833309)*x[0]+(-1.14649607995)*x[1]+(-1.53906505048)*x[2]
-        arg[2,0,2,0]=(0.464952910857)*x[0]+(0.408605786027)*x[1]+(-0.886974881114)*x[2]
-        arg[2,0,2,1]=(0.491723247948)*x[0]+(0.194616420077)*x[1]+(0.409049782749)*x[2]
-        arg[2,1,0,0]=(-1.19836883114)*x[0]+(1.0622722337)*x[1]+(-0.109193867727)*x[2]
-        arg[2,1,0,1]=(1.01973600383)*x[0]+(-0.154482220539)*x[1]+(0.378696371956)*x[2]
-        arg[2,1,1,0]=(-0.0812015296246)*x[0]+(-1.10252794568)*x[1]+(-0.00585426581857)*x[2]
-        arg[2,1,1,1]=(0.536042665272)*x[0]+(0.685507117255)*x[1]+(-0.179652683139)*x[2]
-        arg[2,1,2,0]=(-0.36750467811)*x[0]+(-1.23674550869)*x[1]+(-0.762905702801)*x[2]
-        arg[2,1,2,1]=(0.329665965651)*x[0]+(0.101195810737)*x[1]+(-0.610015052375)*x[2]
-        arg[2,2,0,0]=(-0.81644635185)*x[0]+(-0.604578476306)*x[1]+(0.0440925706991)*x[2]
-        arg[2,2,0,1]=(-0.958241437971)*x[0]+(0.38563498206)*x[1]+(0.913406762318)*x[2]
-        arg[2,2,1,0]=(1.22027492224)*x[0]+(-1.00726209939)*x[1]+(-1.05083068303)*x[2]
-        arg[2,2,1,1]=(-1.47561192645)*x[0]+(-0.903549355608)*x[1]+(0.236771324671)*x[2]
-        arg[2,2,2,0]=(0.284995864449)*x[0]+(-0.175760829921)*x[1]+(-0.720607220001)*x[2]
-        arg[2,2,2,1]=(-0.535894515963)*x[0]+(-0.821302957162)*x[1]+(-1.75141540241)*x[2]
-        arg[2,3,0,0]=(-0.333082106674)*x[0]+(0.579471826412)*x[1]+(0.561184138108)*x[2]
-        arg[2,3,0,1]=(1.34803519557)*x[0]+(-0.441299088849)*x[1]+(-1.04945951616)*x[2]
-        arg[2,3,1,0]=(0.299011096602)*x[0]+(1.32726458235)*x[1]+(-0.196298687359)*x[2]
-        arg[2,3,1,1]=(1.48698834204)*x[0]+(0.527221496971)*x[1]+(0.0819813519422)*x[2]
-        arg[2,3,2,0]=(0.681680955153)*x[0]+(0.503653972357)*x[1]+(0.434669347891)*x[2]
-        arg[2,3,2,1]=(-0.152586789311)*x[0]+(-0.765242635579)*x[1]+(0.712663994387)*x[2]
-        arg[2,4,0,0]=(0.630152300463)*x[0]+(1.12366733588)*x[1]+(-0.662966700638)*x[2]
-        arg[2,4,0,1]=(1.02796709755)*x[0]+(-0.24093881584)*x[1]+(1.79445417019)*x[2]
-        arg[2,4,1,0]=(-0.954575760758)*x[0]+(0.16331782608)*x[1]+(1.38309921277)*x[2]
-        arg[2,4,1,1]=(0.536092514281)*x[0]+(-0.276364952673)*x[1]+(0.779619701528)*x[2]
-        arg[2,4,2,0]=(0.267270444141)*x[0]+(-0.810746424331)*x[1]+(-0.733877853264)*x[2]
-        arg[2,4,2,1]=(-0.0641688847923)*x[0]+(-0.386279280667)*x[1]+(0.0637571595255)*x[2]
-        arg[3,0,0,0]=(0.469903180687)*x[0]+(-0.793812397342)*x[1]+(1.60841921779)*x[2]
-        arg[3,0,0,1]=(0.720057600102)*x[0]+(0.502582253261)*x[1]+(0.460147791003)*x[2]
-        arg[3,0,1,0]=(0.0327862564137)*x[0]+(-1.142962965)*x[1]+(0.114799131894)*x[2]
-        arg[3,0,1,1]=(-0.997412656978)*x[0]+(-0.678175468576)*x[1]+(-0.152663147682)*x[2]
-        arg[3,0,2,0]=(0.810424599078)*x[0]+(0.75522727786)*x[1]+(-0.205880941501)*x[2]
-        arg[3,0,2,1]=(0.353601949476)*x[0]+(0.0963200813379)*x[1]+(0.0578829287146)*x[2]
-        arg[3,1,0,0]=(0.346590730062)*x[0]+(1.07953790092)*x[1]+(0.647586851217)*x[2]
-        arg[3,1,0,1]=(0.889879195334)*x[0]+(-0.352788186249)*x[1]+(0.434900135803)*x[2]
-        arg[3,1,1,0]=(-0.721742734959)*x[0]+(0.166066672134)*x[1]+(-0.489266924809)*x[2]
-        arg[3,1,1,1]=(-0.810487755181)*x[0]+(0.0354916979253)*x[1]+(0.0735520654395)*x[2]
-        arg[3,1,2,0]=(1.02414338939)*x[0]+(-0.851076284556)*x[1]+(-0.232174494405)*x[2]
-        arg[3,1,2,1]=(-0.327246566026)*x[0]+(-0.0499396023605)*x[1]+(0.611585402379)*x[2]
-        arg[3,2,0,0]=(-0.365757628557)*x[0]+(0.868697342115)*x[1]+(-1.102545972)*x[2]
-        arg[3,2,0,1]=(0.628592129227)*x[0]+(1.25545515311)*x[1]+(-1.0577476264)*x[2]
-        arg[3,2,1,0]=(0.160995978044)*x[0]+(-0.947389499556)*x[1]+(-0.870476160656)*x[2]
-        arg[3,2,1,1]=(0.910787139938)*x[0]+(-0.0681493345139)*x[1]+(-0.561910153781)*x[2]
-        arg[3,2,2,0]=(0.0761644634428)*x[0]+(-0.700940967343)*x[1]+(1.19407210904)*x[2]
-        arg[3,2,2,1]=(1.75717437065)*x[0]+(-0.144457317494)*x[1]+(-0.523233453079)*x[2]
-        arg[3,3,0,0]=(0.448782872606)*x[0]+(0.650464256547)*x[1]+(1.19476547456)*x[2]
-        arg[3,3,0,1]=(0.118586027201)*x[0]+(0.449971816918)*x[1]+(-0.510812733389)*x[2]
-        arg[3,3,1,0]=(-0.330032265081)*x[0]+(-0.13657534891)*x[1]+(0.456365289556)*x[2]
-        arg[3,3,1,1]=(0.697584212635)*x[0]+(0.897604241724)*x[1]+(1.31517116663)*x[2]
-        arg[3,3,2,0]=(-0.940538707365)*x[0]+(-0.334862221665)*x[1]+(0.0969742096754)*x[2]
-        arg[3,3,2,1]=(-0.985788813516)*x[0]+(0.348389725548)*x[1]+(-0.260816590361)*x[2]
-        arg[3,4,0,0]=(0.754692421417)*x[0]+(0.775985781769)*x[1]+(-0.0866159222457)*x[2]
-        arg[3,4,0,1]=(-1.17670502429)*x[0]+(1.12268279393)*x[1]+(-1.1279822095)*x[2]
-        arg[3,4,1,0]=(-1.48674370666)*x[0]+(1.26685445713)*x[1]+(-0.0522828809306)*x[2]
-        arg[3,4,1,1]=(0.401760689843)*x[0]+(-1.35707797971)*x[1]+(-0.0580654273828)*x[2]
-        arg[3,4,2,0]=(-1.40697830852)*x[0]+(0.933923369958)*x[1]+(0.230152169159)*x[2]
-        arg[3,4,2,1]=(-1.21242130555)*x[0]+(0.858316339663)*x[1]+(-0.839747078526)*x[2]
-        ref[0,0,0,0]=(-1.29218217256)*x_ref[0]+(-0.382937892213)*x_ref[1]+(0.14363896447)*x_ref[2]
-        ref[0,0,0,1]=(1.39856942421)*x_ref[0]+(0.302082267835)*x_ref[1]+(-0.40870736584)*x_ref[2]
-        ref[0,0,1,0]=(0.523846108043)*x_ref[0]+(1.19961531204)*x_ref[1]+(0.838881761349)*x_ref[2]
-        ref[0,0,1,1]=(0.634542282764)*x_ref[0]+(-0.475514686466)*x_ref[1]+(-1.68745428486)*x_ref[2]
-        ref[0,0,2,0]=(1.16379585731)*x_ref[0]+(-0.928037595416)*x_ref[1]+(0.998857178353)*x_ref[2]
-        ref[0,0,2,1]=(-0.804515607022)*x_ref[0]+(-0.915469493439)*x_ref[1]+(-0.143888000623)*x_ref[2]
-        ref[0,1,0,0]=(0.925843155486)*x_ref[0]+(-0.168243418953)*x_ref[1]+(-0.887839555187)*x_ref[2]
-        ref[0,1,0,1]=(-0.913103105329)*x_ref[0]+(1.38011681732)*x_ref[1]+(-0.992478793291)*x_ref[2]
-        ref[0,1,1,0]=(0.759685289903)*x_ref[0]+(-0.579481939982)*x_ref[1]+(0.577682929138)*x_ref[2]
-        ref[0,1,1,1]=(0.813155548228)*x_ref[0]+(-0.178317843217)*x_ref[1]+(-0.0460113194526)*x_ref[2]
-        ref[0,1,2,0]=(-0.195764860141)*x_ref[0]+(1.44256979628)*x_ref[1]+(0.283992441343)*x_ref[2]
-        ref[0,1,2,1]=(-0.921229459072)*x_ref[0]+(-1.19295761547)*x_ref[1]+(0.215736801944)*x_ref[2]
-        ref[0,2,0,0]=(-0.741726331752)*x_ref[0]+(-0.225585937382)*x_ref[1]+(1.12654556466)*x_ref[2]
-        ref[0,2,0,1]=(-0.709656162421)*x_ref[0]+(0.298862010425)*x_ref[1]+(-0.502443284827)*x_ref[2]
-        ref[0,2,1,0]=(-1.01166188669)*x_ref[0]+(-1.43763408953)*x_ref[1]+(-0.835160398488)*x_ref[2]
-        ref[0,2,1,1]=(1.80968424545)*x_ref[0]+(-0.802666103495)*x_ref[1]+(0.290283606115)*x_ref[2]
-        ref[0,2,2,0]=(0.346481981585)*x_ref[0]+(-0.444176962215)*x_ref[1]+(0.689127612227)*x_ref[2]
-        ref[0,2,2,1]=(1.06925494095)*x_ref[0]+(0.452854988449)*x_ref[1]+(-1.19974690364)*x_ref[2]
-        ref[0,3,0,0]=(-0.534896036328)*x_ref[0]+(-0.312000770615)*x_ref[1]+(-0.440033746693)*x_ref[2]
-        ref[0,3,0,1]=(0.580351431838)*x_ref[0]+(-0.36623848451)*x_ref[1]+(-0.507837490037)*x_ref[2]
-        ref[0,3,1,0]=(0.383180910522)*x_ref[0]+(-0.0907152443563)*x_ref[1]+(-0.200103743943)*x_ref[2]
-        ref[0,3,1,1]=(0.0160194687513)*x_ref[0]+(0.862509612939)*x_ref[1]+(-1.14643594474)*x_ref[2]
-        ref[0,3,2,0]=(-0.224390850199)*x_ref[0]+(-0.176927715447)*x_ref[1]+(0.213480525831)*x_ref[2]
-        ref[0,3,2,1]=(-0.0508511448148)*x_ref[0]+(-1.28943467389)*x_ref[1]+(0.902285302487)*x_ref[2]
-        ref[0,4,0,0]=(-0.633106625232)*x_ref[0]+(-0.430651917485)*x_ref[1]+(0.583149841952)*x_ref[2]
-        ref[0,4,0,1]=(0.579035528956)*x_ref[0]+(0.159439682519)*x_ref[1]+(-0.0926277063021)*x_ref[2]
-        ref[0,4,1,0]=(0.00484756366973)*x_ref[0]+(0.0324822270755)*x_ref[1]+(1.20052413378)*x_ref[2]
-        ref[0,4,1,1]=(-0.337383994688)*x_ref[0]+(0.902076367981)*x_ref[1]+(-0.1956377395)*x_ref[2]
-        ref[0,4,2,0]=(0.928434343456)*x_ref[0]+(0.0376569884355)*x_ref[1]+(-0.155274118568)*x_ref[2]
-        ref[0,4,2,1]=(-0.541990213238)*x_ref[0]+(-0.0165076697829)*x_ref[1]+(-0.210319224859)*x_ref[2]
-        ref[1,0,0,0]=(-1.67762025181)*x_ref[0]+(1.61434755579)*x_ref[1]+(0.357272049999)*x_ref[2]
-        ref[1,0,0,1]=(-1.62532544549)*x_ref[0]+(-0.271426231027)*x_ref[1]+(0.338680991778)*x_ref[2]
-        ref[1,0,1,0]=(1.73523408033)*x_ref[0]+(1.11987092368)*x_ref[1]+(0.126769364273)*x_ref[2]
-        ref[1,0,1,1]=(-1.49220786558)*x_ref[0]+(1.51915566092)*x_ref[1]+(1.24788192157)*x_ref[2]
-        ref[1,0,2,0]=(-0.687808766765)*x_ref[0]+(-1.02318754737)*x_ref[1]+(0.590653972416)*x_ref[2]
-        ref[1,0,2,1]=(0.756067354802)*x_ref[0]+(-0.66964706965)*x_ref[1]+(-1.18986499158)*x_ref[2]
-        ref[1,1,0,0]=(0.371345732177)*x_ref[0]+(0.212739617115)*x_ref[1]+(-1.13439047405)*x_ref[2]
-        ref[1,1,0,1]=(0.525761804111)*x_ref[0]+(0.144130399691)*x_ref[1]+(0.715517587677)*x_ref[2]
-        ref[1,1,1,0]=(-0.376160293215)*x_ref[0]+(-0.469964935263)*x_ref[1]+(0.413518194707)*x_ref[2]
-        ref[1,1,1,1]=(-0.787748398144)*x_ref[0]+(-0.810090402237)*x_ref[1]+(-0.50127109256)*x_ref[2]
-        ref[1,1,2,0]=(0.654555083692)*x_ref[0]+(-0.142134700515)*x_ref[1]+(-1.55891930521)*x_ref[2]
-        ref[1,1,2,1]=(-0.423058885456)*x_ref[0]+(-0.65930158641)*x_ref[1]+(0.94440057744)*x_ref[2]
-        ref[1,2,0,0]=(-0.924832007053)*x_ref[0]+(1.0154890382)*x_ref[1]+(0.11938079748)*x_ref[2]
-        ref[1,2,0,1]=(0.134642686931)*x_ref[0]+(-1.30908067998)*x_ref[1]+(0.367206139074)*x_ref[2]
-        ref[1,2,1,0]=(1.55524055201)*x_ref[0]+(0.727208660637)*x_ref[1]+(0.809810917377)*x_ref[2]
-        ref[1,2,1,1]=(0.94813391462)*x_ref[0]+(-1.49402524308)*x_ref[1]+(0.367824542434)*x_ref[2]
-        ref[1,2,2,0]=(-0.608295798731)*x_ref[0]+(-0.142302252814)*x_ref[1]+(-0.986529251308)*x_ref[2]
-        ref[1,2,2,1]=(0.0259394619607)*x_ref[0]+(-1.60728202467)*x_ref[1]+(0.312534656619)*x_ref[2]
-        ref[1,3,0,0]=(-1.34063373729)*x_ref[0]+(-0.268499839329)*x_ref[1]+(-0.335125886299)*x_ref[2]
-        ref[1,3,0,1]=(1.53280698072)*x_ref[0]+(1.24369684711)*x_ref[1]+(0.766369156132)*x_ref[2]
-        ref[1,3,1,0]=(0.902067176876)*x_ref[0]+(0.791102994814)*x_ref[1]+(-0.89266430493)*x_ref[2]
-        ref[1,3,1,1]=(0.704997629232)*x_ref[0]+(-0.551611360332)*x_ref[1]+(1.39134537491)*x_ref[2]
-        ref[1,3,2,0]=(-0.151690675211)*x_ref[0]+(-1.01762975893)*x_ref[1]+(-0.627493214284)*x_ref[2]
-        ref[1,3,2,1]=(1.00936645922)*x_ref[0]+(0.0322458997248)*x_ref[1]+(1.45039938194)*x_ref[2]
-        ref[1,4,0,0]=(-0.0916390388904)*x_ref[0]+(-0.783111746469)*x_ref[1]+(0.389725342225)*x_ref[2]
-        ref[1,4,0,1]=(1.18859328243)*x_ref[0]+(0.871689661558)*x_ref[1]+(-0.775464713448)*x_ref[2]
-        ref[1,4,1,0]=(0.913118342488)*x_ref[0]+(1.53285648884)*x_ref[1]+(0.0947365101243)*x_ref[2]
-        ref[1,4,1,1]=(-1.00735841224)*x_ref[0]+(-1.12544193607)*x_ref[1]+(0.267347229372)*x_ref[2]
-        ref[1,4,2,0]=(0.285943438284)*x_ref[0]+(-1.0889389244)*x_ref[1]+(-1.03054842327)*x_ref[2]
-        ref[1,4,2,1]=(-1.5768940139)*x_ref[0]+(0.91237754587)*x_ref[1]+(1.30220394199)*x_ref[2]
-        ref[2,0,0,0]=(-0.0634935883277)*x_ref[0]+(0.157304131712)*x_ref[1]+(-1.2995042074)*x_ref[2]
-        ref[2,0,0,1]=(-0.802705266871)*x_ref[0]+(0.238233162774)*x_ref[1]+(1.29463414013)*x_ref[2]
-        ref[2,0,1,0]=(-0.925468462671)*x_ref[0]+(0.870960795966)*x_ref[1]+(0.156522765713)*x_ref[2]
-        ref[2,0,1,1]=(-0.546666833309)*x_ref[0]+(-1.14649607995)*x_ref[1]+(-1.53906505048)*x_ref[2]
-        ref[2,0,2,0]=(0.464952910857)*x_ref[0]+(0.408605786027)*x_ref[1]+(-0.886974881114)*x_ref[2]
-        ref[2,0,2,1]=(0.491723247948)*x_ref[0]+(0.194616420077)*x_ref[1]+(0.409049782749)*x_ref[2]
-        ref[2,1,0,0]=(-1.19836883114)*x_ref[0]+(1.0622722337)*x_ref[1]+(-0.109193867727)*x_ref[2]
-        ref[2,1,0,1]=(1.01973600383)*x_ref[0]+(-0.154482220539)*x_ref[1]+(0.378696371956)*x_ref[2]
-        ref[2,1,1,0]=(-0.0812015296246)*x_ref[0]+(-1.10252794568)*x_ref[1]+(-0.00585426581857)*x_ref[2]
-        ref[2,1,1,1]=(0.536042665272)*x_ref[0]+(0.685507117255)*x_ref[1]+(-0.179652683139)*x_ref[2]
-        ref[2,1,2,0]=(-0.36750467811)*x_ref[0]+(-1.23674550869)*x_ref[1]+(-0.762905702801)*x_ref[2]
-        ref[2,1,2,1]=(0.329665965651)*x_ref[0]+(0.101195810737)*x_ref[1]+(-0.610015052375)*x_ref[2]
-        ref[2,2,0,0]=(-0.81644635185)*x_ref[0]+(-0.604578476306)*x_ref[1]+(0.0440925706991)*x_ref[2]
-        ref[2,2,0,1]=(-0.958241437971)*x_ref[0]+(0.38563498206)*x_ref[1]+(0.913406762318)*x_ref[2]
-        ref[2,2,1,0]=(1.22027492224)*x_ref[0]+(-1.00726209939)*x_ref[1]+(-1.05083068303)*x_ref[2]
-        ref[2,2,1,1]=(-1.47561192645)*x_ref[0]+(-0.903549355608)*x_ref[1]+(0.236771324671)*x_ref[2]
-        ref[2,2,2,0]=(0.284995864449)*x_ref[0]+(-0.175760829921)*x_ref[1]+(-0.720607220001)*x_ref[2]
-        ref[2,2,2,1]=(-0.535894515963)*x_ref[0]+(-0.821302957162)*x_ref[1]+(-1.75141540241)*x_ref[2]
-        ref[2,3,0,0]=(-0.333082106674)*x_ref[0]+(0.579471826412)*x_ref[1]+(0.561184138108)*x_ref[2]
-        ref[2,3,0,1]=(1.34803519557)*x_ref[0]+(-0.441299088849)*x_ref[1]+(-1.04945951616)*x_ref[2]
-        ref[2,3,1,0]=(0.299011096602)*x_ref[0]+(1.32726458235)*x_ref[1]+(-0.196298687359)*x_ref[2]
-        ref[2,3,1,1]=(1.48698834204)*x_ref[0]+(0.527221496971)*x_ref[1]+(0.0819813519422)*x_ref[2]
-        ref[2,3,2,0]=(0.681680955153)*x_ref[0]+(0.503653972357)*x_ref[1]+(0.434669347891)*x_ref[2]
-        ref[2,3,2,1]=(-0.152586789311)*x_ref[0]+(-0.765242635579)*x_ref[1]+(0.712663994387)*x_ref[2]
-        ref[2,4,0,0]=(0.630152300463)*x_ref[0]+(1.12366733588)*x_ref[1]+(-0.662966700638)*x_ref[2]
-        ref[2,4,0,1]=(1.02796709755)*x_ref[0]+(-0.24093881584)*x_ref[1]+(1.79445417019)*x_ref[2]
-        ref[2,4,1,0]=(-0.954575760758)*x_ref[0]+(0.16331782608)*x_ref[1]+(1.38309921277)*x_ref[2]
-        ref[2,4,1,1]=(0.536092514281)*x_ref[0]+(-0.276364952673)*x_ref[1]+(0.779619701528)*x_ref[2]
-        ref[2,4,2,0]=(0.267270444141)*x_ref[0]+(-0.810746424331)*x_ref[1]+(-0.733877853264)*x_ref[2]
-        ref[2,4,2,1]=(-0.0641688847923)*x_ref[0]+(-0.386279280667)*x_ref[1]+(0.0637571595255)*x_ref[2]
-        ref[3,0,0,0]=(0.469903180687)*x_ref[0]+(-0.793812397342)*x_ref[1]+(1.60841921779)*x_ref[2]
-        ref[3,0,0,1]=(0.720057600102)*x_ref[0]+(0.502582253261)*x_ref[1]+(0.460147791003)*x_ref[2]
-        ref[3,0,1,0]=(0.0327862564137)*x_ref[0]+(-1.142962965)*x_ref[1]+(0.114799131894)*x_ref[2]
-        ref[3,0,1,1]=(-0.997412656978)*x_ref[0]+(-0.678175468576)*x_ref[1]+(-0.152663147682)*x_ref[2]
-        ref[3,0,2,0]=(0.810424599078)*x_ref[0]+(0.75522727786)*x_ref[1]+(-0.205880941501)*x_ref[2]
-        ref[3,0,2,1]=(0.353601949476)*x_ref[0]+(0.0963200813379)*x_ref[1]+(0.0578829287146)*x_ref[2]
-        ref[3,1,0,0]=(0.346590730062)*x_ref[0]+(1.07953790092)*x_ref[1]+(0.647586851217)*x_ref[2]
-        ref[3,1,0,1]=(0.889879195334)*x_ref[0]+(-0.352788186249)*x_ref[1]+(0.434900135803)*x_ref[2]
-        ref[3,1,1,0]=(-0.721742734959)*x_ref[0]+(0.166066672134)*x_ref[1]+(-0.489266924809)*x_ref[2]
-        ref[3,1,1,1]=(-0.810487755181)*x_ref[0]+(0.0354916979253)*x_ref[1]+(0.0735520654395)*x_ref[2]
-        ref[3,1,2,0]=(1.02414338939)*x_ref[0]+(-0.851076284556)*x_ref[1]+(-0.232174494405)*x_ref[2]
-        ref[3,1,2,1]=(-0.327246566026)*x_ref[0]+(-0.0499396023605)*x_ref[1]+(0.611585402379)*x_ref[2]
-        ref[3,2,0,0]=(-0.365757628557)*x_ref[0]+(0.868697342115)*x_ref[1]+(-1.102545972)*x_ref[2]
-        ref[3,2,0,1]=(0.628592129227)*x_ref[0]+(1.25545515311)*x_ref[1]+(-1.0577476264)*x_ref[2]
-        ref[3,2,1,0]=(0.160995978044)*x_ref[0]+(-0.947389499556)*x_ref[1]+(-0.870476160656)*x_ref[2]
-        ref[3,2,1,1]=(0.910787139938)*x_ref[0]+(-0.0681493345139)*x_ref[1]+(-0.561910153781)*x_ref[2]
-        ref[3,2,2,0]=(0.0761644634428)*x_ref[0]+(-0.700940967343)*x_ref[1]+(1.19407210904)*x_ref[2]
-        ref[3,2,2,1]=(1.75717437065)*x_ref[0]+(-0.144457317494)*x_ref[1]+(-0.523233453079)*x_ref[2]
-        ref[3,3,0,0]=(0.448782872606)*x_ref[0]+(0.650464256547)*x_ref[1]+(1.19476547456)*x_ref[2]
-        ref[3,3,0,1]=(0.118586027201)*x_ref[0]+(0.449971816918)*x_ref[1]+(-0.510812733389)*x_ref[2]
-        ref[3,3,1,0]=(-0.330032265081)*x_ref[0]+(-0.13657534891)*x_ref[1]+(0.456365289556)*x_ref[2]
-        ref[3,3,1,1]=(0.697584212635)*x_ref[0]+(0.897604241724)*x_ref[1]+(1.31517116663)*x_ref[2]
-        ref[3,3,2,0]=(-0.940538707365)*x_ref[0]+(-0.334862221665)*x_ref[1]+(0.0969742096754)*x_ref[2]
-        ref[3,3,2,1]=(-0.985788813516)*x_ref[0]+(0.348389725548)*x_ref[1]+(-0.260816590361)*x_ref[2]
-        ref[3,4,0,0]=(0.754692421417)*x_ref[0]+(0.775985781769)*x_ref[1]+(-0.0866159222457)*x_ref[2]
-        ref[3,4,0,1]=(-1.17670502429)*x_ref[0]+(1.12268279393)*x_ref[1]+(-1.1279822095)*x_ref[2]
-        ref[3,4,1,0]=(-1.48674370666)*x_ref[0]+(1.26685445713)*x_ref[1]+(-0.0522828809306)*x_ref[2]
-        ref[3,4,1,1]=(0.401760689843)*x_ref[0]+(-1.35707797971)*x_ref[1]+(-0.0580654273828)*x_ref[2]
-        ref[3,4,2,0]=(-1.40697830852)*x_ref[0]+(0.933923369958)*x_ref[1]+(0.230152169159)*x_ref[2]
-        ref[3,4,2,1]=(-1.21242130555)*x_ref[0]+(0.858316339663)*x_ref[1]+(-0.839747078526)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.100067148208)*x[0]+(-0.8375743725)*x[1]
-        ref=(-0.100067148208)*x_ref[0]+(-0.8375743725)*x_ref[1]
-      else:
-        arg=(-0.247343416726)*x[0]+(0.604193484164)*x[1]+(-0.219899438287)*x[2]
-        ref=(-0.247343416726)*x_ref[0]+(0.604193484164)*x_ref[1]+(-0.219899438287)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        arg[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-        ref[0]=(-1.66196653104)*x[0]+(1.29891335227)*x[1]
-        ref[1]=(-0.347844771248)*x[0]+(-0.404726300584)*x[1]
-      else:
-        arg[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        arg[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-        ref[0]=(0.334094742067)*x[0]+(-0.619063646554)*x[1]+(0.538572422001)*x[2]
-        ref[1]=(0.673290433004)*x[0]+(0.169501972843)*x[1]+(-0.833663493893)*x[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.00153698933322)*x[0]+(0.392281645764)*x[1]
-        arg[0,1]=(-1.2794655544)*x[0]+(-0.373519639818)*x[1]
-        arg[0,2]=(0.30127033321)*x[0]+(-0.0996865853738)*x[1]
-        arg[0,3]=(1.23405799349)*x[0]+(0.498558200339)*x[1]
-        arg[0,4]=(0.85519350742)*x[0]+(-0.19188046135)*x[1]
-        arg[1,0]=(0.417367834962)*x[0]+(0.992318201639)*x[1]
-        arg[1,1]=(-0.646432128833)*x[0]+(-0.872750321582)*x[1]
-        arg[1,2]=(-0.806117185061)*x[0]+(-0.89396408325)*x[1]
-        arg[1,3]=(0.768017237627)*x[0]+(-1.2904111912)*x[1]
-        arg[1,4]=(-0.0159685523188)*x[0]+(0.401410193169)*x[1]
-        arg[2,0]=(-0.844501716181)*x[0]+(-0.123115343819)*x[1]
-        arg[2,1]=(1.08441909409)*x[0]+(0.152432282539)*x[1]
-        arg[2,2]=(-0.60551037413)*x[0]+(1.15692828826)*x[1]
-        arg[2,3]=(-1.21509168541)*x[0]+(1.03683236377)*x[1]
-        arg[2,4]=(1.16850730134)*x[0]+(0.162202615909)*x[1]
-        arg[3,0]=(0.727772166897)*x[0]+(-0.296815840935)*x[1]
-        arg[3,1]=(-0.0880577151489)*x[0]+(1.66427691426)*x[1]
-        arg[3,2]=(0.415144534458)*x[0]+(-0.555833723295)*x[1]
-        arg[3,3]=(1.09444635829)*x[0]+(-0.335209417536)*x[1]
-        arg[3,4]=(-1.05047769585)*x[0]+(0.684427039986)*x[1]
-        ref[0,0]=(0.00153698933322)*x_ref[0]+(0.392281645764)*x_ref[1]
-        ref[0,1]=(-1.2794655544)*x_ref[0]+(-0.373519639818)*x_ref[1]
-        ref[0,2]=(0.30127033321)*x_ref[0]+(-0.0996865853738)*x_ref[1]
-        ref[0,3]=(1.23405799349)*x_ref[0]+(0.498558200339)*x_ref[1]
-        ref[0,4]=(0.85519350742)*x_ref[0]+(-0.19188046135)*x_ref[1]
-        ref[1,0]=(0.417367834962)*x_ref[0]+(0.992318201639)*x_ref[1]
-        ref[1,1]=(-0.646432128833)*x_ref[0]+(-0.872750321582)*x_ref[1]
-        ref[1,2]=(-0.806117185061)*x_ref[0]+(-0.89396408325)*x_ref[1]
-        ref[1,3]=(0.768017237627)*x_ref[0]+(-1.2904111912)*x_ref[1]
-        ref[1,4]=(-0.0159685523188)*x_ref[0]+(0.401410193169)*x_ref[1]
-        ref[2,0]=(-0.844501716181)*x_ref[0]+(-0.123115343819)*x_ref[1]
-        ref[2,1]=(1.08441909409)*x_ref[0]+(0.152432282539)*x_ref[1]
-        ref[2,2]=(-0.60551037413)*x_ref[0]+(1.15692828826)*x_ref[1]
-        ref[2,3]=(-1.21509168541)*x_ref[0]+(1.03683236377)*x_ref[1]
-        ref[2,4]=(1.16850730134)*x_ref[0]+(0.162202615909)*x_ref[1]
-        ref[3,0]=(0.727772166897)*x_ref[0]+(-0.296815840935)*x_ref[1]
-        ref[3,1]=(-0.0880577151489)*x_ref[0]+(1.66427691426)*x_ref[1]
-        ref[3,2]=(0.415144534458)*x_ref[0]+(-0.555833723295)*x_ref[1]
-        ref[3,3]=(1.09444635829)*x_ref[0]+(-0.335209417536)*x_ref[1]
-        ref[3,4]=(-1.05047769585)*x_ref[0]+(0.684427039986)*x_ref[1]
-      else:
-        arg[0,0]=(-0.611607640773)*x[0]+(0.584485971628)*x[1]+(0.0090316337643)*x[2]
-        arg[0,1]=(0.905278285857)*x[0]+(0.332523151242)*x[1]+(0.9909841807)*x[2]
-        arg[0,2]=(-1.06629333132)*x[0]+(-0.38478180064)*x[1]+(-0.63309211256)*x[2]
-        arg[0,3]=(0.122436386344)*x[0]+(-0.218752671204)*x[1]+(-0.746695172216)*x[2]
-        arg[0,4]=(1.03152124874)*x[0]+(-1.11327271563)*x[1]+(-0.257591112135)*x[2]
-        arg[1,0]=(0.969019600299)*x[0]+(-0.320279309689)*x[1]+(0.327767746545)*x[2]
-        arg[1,1]=(0.291023069052)*x[0]+(0.78112901064)*x[1]+(0.879257239042)*x[2]
-        arg[1,2]=(-0.131262891536)*x[0]+(-0.0109690229153)*x[1]+(-0.171900332406)*x[2]
-        arg[1,3]=(-1.32272684486)*x[0]+(-0.256869536085)*x[1]+(0.0308524567462)*x[2]
-        arg[1,4]=(1.30707061279)*x[0]+(0.972866282634)*x[1]+(-0.474948537882)*x[2]
-        arg[2,0]=(0.169034210421)*x[0]+(-1.08714896226)*x[1]+(-0.636838450708)*x[2]
-        arg[2,1]=(-0.470752780773)*x[0]+(-0.695286088059)*x[1]+(-1.19197058712)*x[2]
-        arg[2,2]=(0.701403721228)*x[0]+(0.551002482436)*x[1]+(-0.295853851234)*x[2]
-        arg[2,3]=(-0.796431361745)*x[0]+(0.0581884766856)*x[1]+(-1.13668563089)*x[2]
-        arg[2,4]=(-0.733185798017)*x[0]+(0.178900103735)*x[1]+(-0.845671526781)*x[2]
-        arg[3,0]=(-1.47064927107)*x[0]+(1.33393324965)*x[1]+(-0.767393460937)*x[2]
-        arg[3,1]=(1.36784513226)*x[0]+(0.100008910431)*x[1]+(-1.09210256713)*x[2]
-        arg[3,2]=(-0.873076669977)*x[0]+(0.367213631778)*x[1]+(0.0698296920039)*x[2]
-        arg[3,3]=(-1.76609214158)*x[0]+(-1.26186286566)*x[1]+(0.377817035113)*x[2]
-        arg[3,4]=(-1.28261709396)*x[0]+(0.240480767533)*x[1]+(0.307813279357)*x[2]
-        ref[0,0]=(-0.611607640773)*x_ref[0]+(0.584485971628)*x_ref[1]+(0.0090316337643)*x_ref[2]
-        ref[0,1]=(0.905278285857)*x_ref[0]+(0.332523151242)*x_ref[1]+(0.9909841807)*x_ref[2]
-        ref[0,2]=(-1.06629333132)*x_ref[0]+(-0.38478180064)*x_ref[1]+(-0.63309211256)*x_ref[2]
-        ref[0,3]=(0.122436386344)*x_ref[0]+(-0.218752671204)*x_ref[1]+(-0.746695172216)*x_ref[2]
-        ref[0,4]=(1.03152124874)*x_ref[0]+(-1.11327271563)*x_ref[1]+(-0.257591112135)*x_ref[2]
-        ref[1,0]=(0.969019600299)*x_ref[0]+(-0.320279309689)*x_ref[1]+(0.327767746545)*x_ref[2]
-        ref[1,1]=(0.291023069052)*x_ref[0]+(0.78112901064)*x_ref[1]+(0.879257239042)*x_ref[2]
-        ref[1,2]=(-0.131262891536)*x_ref[0]+(-0.0109690229153)*x_ref[1]+(-0.171900332406)*x_ref[2]
-        ref[1,3]=(-1.32272684486)*x_ref[0]+(-0.256869536085)*x_ref[1]+(0.0308524567462)*x_ref[2]
-        ref[1,4]=(1.30707061279)*x_ref[0]+(0.972866282634)*x_ref[1]+(-0.474948537882)*x_ref[2]
-        ref[2,0]=(0.169034210421)*x_ref[0]+(-1.08714896226)*x_ref[1]+(-0.636838450708)*x_ref[2]
-        ref[2,1]=(-0.470752780773)*x_ref[0]+(-0.695286088059)*x_ref[1]+(-1.19197058712)*x_ref[2]
-        ref[2,2]=(0.701403721228)*x_ref[0]+(0.551002482436)*x_ref[1]+(-0.295853851234)*x_ref[2]
-        ref[2,3]=(-0.796431361745)*x_ref[0]+(0.0581884766856)*x_ref[1]+(-1.13668563089)*x_ref[2]
-        ref[2,4]=(-0.733185798017)*x_ref[0]+(0.178900103735)*x_ref[1]+(-0.845671526781)*x_ref[2]
-        ref[3,0]=(-1.47064927107)*x_ref[0]+(1.33393324965)*x_ref[1]+(-0.767393460937)*x_ref[2]
-        ref[3,1]=(1.36784513226)*x_ref[0]+(0.100008910431)*x_ref[1]+(-1.09210256713)*x_ref[2]
-        ref[3,2]=(-0.873076669977)*x_ref[0]+(0.367213631778)*x_ref[1]+(0.0698296920039)*x_ref[2]
-        ref[3,3]=(-1.76609214158)*x_ref[0]+(-1.26186286566)*x_ref[1]+(0.377817035113)*x_ref[2]
-        ref[3,4]=(-1.28261709396)*x_ref[0]+(0.240480767533)*x_ref[1]+(0.307813279357)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.423505169404)*x[0]+(-1.10390334264)*x[1]
-        arg[0,0,1]=(-0.181820089254)*x[0]+(-0.374602268791)*x[1]
-        arg[0,1,0]=(-1.36906917075)*x[0]+(0.26554385908)*x[1]
-        arg[0,1,1]=(-0.280661572374)*x[0]+(-0.239232524287)*x[1]
-        arg[1,0,0]=(-1.25670251934)*x[0]+(-0.429353977735)*x[1]
-        arg[1,0,1]=(-0.747928970735)*x[0]+(1.17874317611)*x[1]
-        arg[1,1,0]=(-0.548814611802)*x[0]+(-0.0249315764285)*x[1]
-        arg[1,1,1]=(-0.481123117522)*x[0]+(1.23402203879)*x[1]
-        arg[2,0,0]=(-0.0639512689884)*x[0]+(-0.0278213371376)*x[1]
-        arg[2,0,1]=(-1.17292797621)*x[0]+(0.42140600304)*x[1]
-        arg[2,1,0]=(-0.358052601083)*x[0]+(-1.66807880791)*x[1]
-        arg[2,1,1]=(-0.291433251349)*x[0]+(0.111473162108)*x[1]
-        arg[3,0,0]=(0.742643625989)*x[0]+(-1.29214106228)*x[1]
-        arg[3,0,1]=(0.319887321826)*x[0]+(-0.40213369238)*x[1]
-        arg[3,1,0]=(-0.449412064097)*x[0]+(-1.10654262009)*x[1]
-        arg[3,1,1]=(1.19722227632)*x[0]+(1.3455799026)*x[1]
-        arg[4,0,0]=(-1.77453188487)*x[0]+(0.634838793872)*x[1]
-        arg[4,0,1]=(-0.215461066907)*x[0]+(1.11635233844)*x[1]
-        arg[4,1,0]=(0.835816652592)*x[0]+(0.668378554214)*x[1]
-        arg[4,1,1]=(-1.22133225406)*x[0]+(-0.148780252398)*x[1]
-        arg[5,0,0]=(0.320245409639)*x[0]+(-1.08828513776)*x[1]
-        arg[5,0,1]=(-0.1865835417)*x[0]+(-0.353282061874)*x[1]
-        arg[5,1,0]=(1.38858040685)*x[0]+(0.166398261098)*x[1]
-        arg[5,1,1]=(0.947718875755)*x[0]+(-1.06171934302)*x[1]
-        ref[0,0,0]=(-0.423505169404)*x_ref[0]+(-1.10390334264)*x_ref[1]
-        ref[0,0,1]=(-0.181820089254)*x_ref[0]+(-0.374602268791)*x_ref[1]
-        ref[0,1,0]=(-1.36906917075)*x_ref[0]+(0.26554385908)*x_ref[1]
-        ref[0,1,1]=(-0.280661572374)*x_ref[0]+(-0.239232524287)*x_ref[1]
-        ref[1,0,0]=(-1.25670251934)*x_ref[0]+(-0.429353977735)*x_ref[1]
-        ref[1,0,1]=(-0.747928970735)*x_ref[0]+(1.17874317611)*x_ref[1]
-        ref[1,1,0]=(-0.548814611802)*x_ref[0]+(-0.0249315764285)*x_ref[1]
-        ref[1,1,1]=(-0.481123117522)*x_ref[0]+(1.23402203879)*x_ref[1]
-        ref[2,0,0]=(-0.0639512689884)*x_ref[0]+(-0.0278213371376)*x_ref[1]
-        ref[2,0,1]=(-1.17292797621)*x_ref[0]+(0.42140600304)*x_ref[1]
-        ref[2,1,0]=(-0.358052601083)*x_ref[0]+(-1.66807880791)*x_ref[1]
-        ref[2,1,1]=(-0.291433251349)*x_ref[0]+(0.111473162108)*x_ref[1]
-        ref[3,0,0]=(0.742643625989)*x_ref[0]+(-1.29214106228)*x_ref[1]
-        ref[3,0,1]=(0.319887321826)*x_ref[0]+(-0.40213369238)*x_ref[1]
-        ref[3,1,0]=(-0.449412064097)*x_ref[0]+(-1.10654262009)*x_ref[1]
-        ref[3,1,1]=(1.19722227632)*x_ref[0]+(1.3455799026)*x_ref[1]
-        ref[4,0,0]=(-1.77453188487)*x_ref[0]+(0.634838793872)*x_ref[1]
-        ref[4,0,1]=(-0.215461066907)*x_ref[0]+(1.11635233844)*x_ref[1]
-        ref[4,1,0]=(0.835816652592)*x_ref[0]+(0.668378554214)*x_ref[1]
-        ref[4,1,1]=(-1.22133225406)*x_ref[0]+(-0.148780252398)*x_ref[1]
-        ref[5,0,0]=(0.320245409639)*x_ref[0]+(-1.08828513776)*x_ref[1]
-        ref[5,0,1]=(-0.1865835417)*x_ref[0]+(-0.353282061874)*x_ref[1]
-        ref[5,1,0]=(1.38858040685)*x_ref[0]+(0.166398261098)*x_ref[1]
-        ref[5,1,1]=(0.947718875755)*x_ref[0]+(-1.06171934302)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.892096322478)*x[0]+(0.720363183451)*x[1]+(0.600609272191)*x[2]
-        arg[0,0,1]=(-0.418024461935)*x[0]+(-0.819275292035)*x[1]+(0.134962557692)*x[2]
-        arg[0,1,0]=(-0.449783838361)*x[0]+(0.943677173533)*x[1]+(0.209424190991)*x[2]
-        arg[0,1,1]=(-0.424386775004)*x[0]+(-0.213024388094)*x[1]+(-1.05927943384)*x[2]
-        arg[1,0,0]=(-0.699504096539)*x[0]+(-0.153570308377)*x[1]+(0.576902392658)*x[2]
-        arg[1,0,1]=(-0.426914055661)*x[0]+(-0.330405267059)*x[1]+(1.07656632155)*x[2]
-        arg[1,1,0]=(0.775238005352)*x[0]+(1.11012072575)*x[1]+(0.764627098603)*x[2]
-        arg[1,1,1]=(0.0130424708408)*x[0]+(-0.671778102107)*x[1]+(0.780684368983)*x[2]
-        arg[2,0,0]=(-0.0512224258498)*x[0]+(-1.50515803984)*x[1]+(0.342824143946)*x[2]
-        arg[2,0,1]=(0.117541624176)*x[0]+(0.372415524552)*x[1]+(0.255218095016)*x[2]
-        arg[2,1,0]=(-0.574508895703)*x[0]+(0.345217292359)*x[1]+(0.209211956821)*x[2]
-        arg[2,1,1]=(0.93643587147)*x[0]+(-0.096209009902)*x[1]+(0.205150859527)*x[2]
-        arg[3,0,0]=(1.7541929884)*x[0]+(0.169061478447)*x[1]+(0.534746695515)*x[2]
-        arg[3,0,1]=(0.442329266782)*x[0]+(0.334971710414)*x[1]+(1.66892557698)*x[2]
-        arg[3,1,0]=(0.316436716758)*x[0]+(-1.25442030987)*x[1]+(0.372183105374)*x[2]
-        arg[3,1,1]=(-0.254157820265)*x[0]+(0.287381300023)*x[1]+(0.0574117423352)*x[2]
-        arg[4,0,0]=(-1.08380257521)*x[0]+(-1.31461890032)*x[1]+(-0.503802775099)*x[2]
-        arg[4,0,1]=(-0.558293486798)*x[0]+(0.702317635925)*x[1]+(0.463814829137)*x[2]
-        arg[4,1,0]=(-0.677160971974)*x[0]+(-0.14921275312)*x[1]+(-1.6501459435)*x[2]
-        arg[4,1,1]=(-0.176672532474)*x[0]+(0.945017605811)*x[1]+(-0.790342939788)*x[2]
-        arg[5,0,0]=(-1.45668070675)*x[0]+(-0.404957129204)*x[1]+(1.37383065954)*x[2]
-        arg[5,0,1]=(0.53829326756)*x[0]+(0.543333031479)*x[1]+(-0.854057296362)*x[2]
-        arg[5,1,0]=(0.805864283921)*x[0]+(-0.00186634953513)*x[1]+(-1.97111362539)*x[2]
-        arg[5,1,1]=(-0.387746238967)*x[0]+(-0.739158353882)*x[1]+(-0.134082808118)*x[2]
-        ref[0,0,0]=(-0.892096322478)*x_ref[0]+(0.720363183451)*x_ref[1]+(0.600609272191)*x_ref[2]
-        ref[0,0,1]=(-0.418024461935)*x_ref[0]+(-0.819275292035)*x_ref[1]+(0.134962557692)*x_ref[2]
-        ref[0,1,0]=(-0.449783838361)*x_ref[0]+(0.943677173533)*x_ref[1]+(0.209424190991)*x_ref[2]
-        ref[0,1,1]=(-0.424386775004)*x_ref[0]+(-0.213024388094)*x_ref[1]+(-1.05927943384)*x_ref[2]
-        ref[1,0,0]=(-0.699504096539)*x_ref[0]+(-0.153570308377)*x_ref[1]+(0.576902392658)*x_ref[2]
-        ref[1,0,1]=(-0.426914055661)*x_ref[0]+(-0.330405267059)*x_ref[1]+(1.07656632155)*x_ref[2]
-        ref[1,1,0]=(0.775238005352)*x_ref[0]+(1.11012072575)*x_ref[1]+(0.764627098603)*x_ref[2]
-        ref[1,1,1]=(0.0130424708408)*x_ref[0]+(-0.671778102107)*x_ref[1]+(0.780684368983)*x_ref[2]
-        ref[2,0,0]=(-0.0512224258498)*x_ref[0]+(-1.50515803984)*x_ref[1]+(0.342824143946)*x_ref[2]
-        ref[2,0,1]=(0.117541624176)*x_ref[0]+(0.372415524552)*x_ref[1]+(0.255218095016)*x_ref[2]
-        ref[2,1,0]=(-0.574508895703)*x_ref[0]+(0.345217292359)*x_ref[1]+(0.209211956821)*x_ref[2]
-        ref[2,1,1]=(0.93643587147)*x_ref[0]+(-0.096209009902)*x_ref[1]+(0.205150859527)*x_ref[2]
-        ref[3,0,0]=(1.7541929884)*x_ref[0]+(0.169061478447)*x_ref[1]+(0.534746695515)*x_ref[2]
-        ref[3,0,1]=(0.442329266782)*x_ref[0]+(0.334971710414)*x_ref[1]+(1.66892557698)*x_ref[2]
-        ref[3,1,0]=(0.316436716758)*x_ref[0]+(-1.25442030987)*x_ref[1]+(0.372183105374)*x_ref[2]
-        ref[3,1,1]=(-0.254157820265)*x_ref[0]+(0.287381300023)*x_ref[1]+(0.0574117423352)*x_ref[2]
-        ref[4,0,0]=(-1.08380257521)*x_ref[0]+(-1.31461890032)*x_ref[1]+(-0.503802775099)*x_ref[2]
-        ref[4,0,1]=(-0.558293486798)*x_ref[0]+(0.702317635925)*x_ref[1]+(0.463814829137)*x_ref[2]
-        ref[4,1,0]=(-0.677160971974)*x_ref[0]+(-0.14921275312)*x_ref[1]+(-1.6501459435)*x_ref[2]
-        ref[4,1,1]=(-0.176672532474)*x_ref[0]+(0.945017605811)*x_ref[1]+(-0.790342939788)*x_ref[2]
-        ref[5,0,0]=(-1.45668070675)*x_ref[0]+(-0.404957129204)*x_ref[1]+(1.37383065954)*x_ref[2]
-        ref[5,0,1]=(0.53829326756)*x_ref[0]+(0.543333031479)*x_ref[1]+(-0.854057296362)*x_ref[2]
-        ref[5,1,0]=(0.805864283921)*x_ref[0]+(-0.00186634953513)*x_ref[1]+(-1.97111362539)*x_ref[2]
-        ref[5,1,1]=(-0.387746238967)*x_ref[0]+(-0.739158353882)*x_ref[1]+(-0.134082808118)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedContinuousFunction onto ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.754311658086)*x[0]+(0.235157034342)*x[1]
-        arg[0,0,0,1]=(-1.33786315024)*x[0]+(0.243349279742)*x[1]
-        arg[0,0,1,0]=(1.48657750088)*x[0]+(1.09853108305)*x[1]
-        arg[0,0,1,1]=(1.4501362266)*x[0]+(0.824811567155)*x[1]
-        arg[0,0,2,0]=(1.12567566082)*x[0]+(0.663525681174)*x[1]
-        arg[0,0,2,1]=(1.48991565019)*x[0]+(-0.680795365011)*x[1]
-        arg[0,1,0,0]=(0.268571449528)*x[0]+(0.818595834672)*x[1]
-        arg[0,1,0,1]=(-1.55490945555)*x[0]+(0.783595197888)*x[1]
-        arg[0,1,1,0]=(0.913201382585)*x[0]+(0.855491379376)*x[1]
-        arg[0,1,1,1]=(-0.179192075116)*x[0]+(-0.690415079523)*x[1]
-        arg[0,1,2,0]=(-0.0393574502912)*x[0]+(-0.690157650634)*x[1]
-        arg[0,1,2,1]=(0.784216863217)*x[0]+(0.498735486159)*x[1]
-        arg[0,2,0,0]=(0.137939554165)*x[0]+(-1.33961519113)*x[1]
-        arg[0,2,0,1]=(-1.03897311736)*x[0]+(-1.37797405312)*x[1]
-        arg[0,2,1,0]=(0.199812003756)*x[0]+(-0.0388499674037)*x[1]
-        arg[0,2,1,1]=(1.15530534202)*x[0]+(-1.28280869078)*x[1]
-        arg[0,2,2,0]=(0.836447791155)*x[0]+(1.2627066026)*x[1]
-        arg[0,2,2,1]=(-0.584608492688)*x[0]+(-1.55305974305)*x[1]
-        arg[0,3,0,0]=(-0.661952381799)*x[0]+(-1.27062403778)*x[1]
-        arg[0,3,0,1]=(-1.47789532259)*x[0]+(-0.279583524936)*x[1]
-        arg[0,3,1,0]=(1.40729771357)*x[0]+(0.0971284144528)*x[1]
-        arg[0,3,1,1]=(-0.459167955911)*x[0]+(-1.29033281524)*x[1]
-        arg[0,3,2,0]=(-1.63189436824)*x[0]+(0.75729808422)*x[1]
-        arg[0,3,2,1]=(0.522479828718)*x[0]+(-0.0231299515383)*x[1]
-        arg[0,4,0,0]=(0.241891446615)*x[0]+(0.803327107651)*x[1]
-        arg[0,4,0,1]=(0.273613502836)*x[0]+(-0.0115180464171)*x[1]
-        arg[0,4,1,0]=(1.96219818696)*x[0]+(-0.349137094743)*x[1]
-        arg[0,4,1,1]=(0.365690821719)*x[0]+(-1.6943347181)*x[1]
-        arg[0,4,2,0]=(-0.283970779872)*x[0]+(-0.258537179804)*x[1]
-        arg[0,4,2,1]=(-0.973333430598)*x[0]+(1.48706276212)*x[1]
-        arg[1,0,0,0]=(1.18757466971)*x[0]+(0.838804656357)*x[1]
-        arg[1,0,0,1]=(0.840859904702)*x[0]+(1.09955195682)*x[1]
-        arg[1,0,1,0]=(1.46190513227)*x[0]+(-0.596959830422)*x[1]
-        arg[1,0,1,1]=(0.718689296745)*x[0]+(-0.628074620222)*x[1]
-        arg[1,0,2,0]=(0.440761293041)*x[0]+(0.115800854194)*x[1]
-        arg[1,0,2,1]=(1.34891146904)*x[0]+(0.813690260652)*x[1]
-        arg[1,1,0,0]=(0.183071638098)*x[0]+(-1.37996210755)*x[1]
-        arg[1,1,0,1]=(0.258142115988)*x[0]+(-0.757709381529)*x[1]
-        arg[1,1,1,0]=(1.72392829309)*x[0]+(0.444995102781)*x[1]
-        arg[1,1,1,1]=(-0.380898209988)*x[0]+(-0.0950246860347)*x[1]
-        arg[1,1,2,0]=(0.203007226016)*x[0]+(1.09786001832)*x[1]
-        arg[1,1,2,1]=(-0.502500865341)*x[0]+(-0.629980527995)*x[1]
-        arg[1,2,0,0]=(0.482549518436)*x[0]+(0.565840824146)*x[1]
-        arg[1,2,0,1]=(0.355818565068)*x[0]+(-0.78273295574)*x[1]
-        arg[1,2,1,0]=(1.79204033071)*x[0]+(-0.698040851585)*x[1]
-        arg[1,2,1,1]=(-0.534827741044)*x[0]+(0.00943131627498)*x[1]
-        arg[1,2,2,0]=(-1.00663524444)*x[0]+(0.0207854553456)*x[1]
-        arg[1,2,2,1]=(-0.338048040159)*x[0]+(-0.380607406217)*x[1]
-        arg[1,3,0,0]=(0.586310549044)*x[0]+(0.276326798805)*x[1]
-        arg[1,3,0,1]=(-0.260482580702)*x[0]+(-0.349279395321)*x[1]
-        arg[1,3,1,0]=(-0.196533829895)*x[0]+(0.614805272738)*x[1]
-        arg[1,3,1,1]=(-0.363176483895)*x[0]+(-0.925817017731)*x[1]
-        arg[1,3,2,0]=(-1.24182075421)*x[0]+(0.215966446013)*x[1]
-        arg[1,3,2,1]=(1.07546652642)*x[0]+(0.383803991974)*x[1]
-        arg[1,4,0,0]=(0.199312303525)*x[0]+(-0.314520883859)*x[1]
-        arg[1,4,0,1]=(-1.56890826152)*x[0]+(-0.133086662241)*x[1]
-        arg[1,4,1,0]=(1.1307241936)*x[0]+(-1.32905744984)*x[1]
-        arg[1,4,1,1]=(-0.385991455298)*x[0]+(0.292913024507)*x[1]
-        arg[1,4,2,0]=(1.14561678056)*x[0]+(-0.662696162276)*x[1]
-        arg[1,4,2,1]=(-1.49533948954)*x[0]+(1.43396138744)*x[1]
-        arg[2,0,0,0]=(-0.63160396493)*x[0]+(0.813120998776)*x[1]
-        arg[2,0,0,1]=(0.65598998434)*x[0]+(-1.02445537553)*x[1]
-        arg[2,0,1,0]=(-1.13473104075)*x[0]+(0.057331183449)*x[1]
-        arg[2,0,1,1]=(-0.154892482107)*x[0]+(0.481969957579)*x[1]
-        arg[2,0,2,0]=(0.521916671496)*x[0]+(0.546676943059)*x[1]
-        arg[2,0,2,1]=(-1.68919379028)*x[0]+(1.08292038981)*x[1]
-        arg[2,1,0,0]=(-0.643846595888)*x[0]+(0.528306097755)*x[1]
-        arg[2,1,0,1]=(1.3745090497)*x[0]+(-0.0801648509184)*x[1]
-        arg[2,1,1,0]=(0.129096817054)*x[0]+(0.90750370855)*x[1]
-        arg[2,1,1,1]=(0.539309513305)*x[0]+(1.34949470961)*x[1]
-        arg[2,1,2,0]=(1.4189703896)*x[0]+(-1.75011201893)*x[1]
-        arg[2,1,2,1]=(-1.09325548386)*x[0]+(0.148279301716)*x[1]
-        arg[2,2,0,0]=(-1.25785133743)*x[0]+(0.275071306594)*x[1]
-        arg[2,2,0,1]=(-0.550152068761)*x[0]+(-1.20422484275)*x[1]
-        arg[2,2,1,0]=(-0.102062863668)*x[0]+(-1.34431887541)*x[1]
-        arg[2,2,1,1]=(0.103354724169)*x[0]+(-0.941952180446)*x[1]
-        arg[2,2,2,0]=(1.2090339604)*x[0]+(-0.330357976796)*x[1]
-        arg[2,2,2,1]=(0.203162449188)*x[0]+(-1.03640702014)*x[1]
-        arg[2,3,0,0]=(-0.324576353514)*x[0]+(0.582614539267)*x[1]
-        arg[2,3,0,1]=(-0.213823136215)*x[0]+(-0.473199105214)*x[1]
-        arg[2,3,1,0]=(0.395144702599)*x[0]+(0.0358194467152)*x[1]
-        arg[2,3,1,1]=(1.32860563396)*x[0]+(-0.577308310732)*x[1]
-        arg[2,3,2,0]=(0.994205029432)*x[0]+(1.13433517636)*x[1]
-        arg[2,3,2,1]=(-0.488499286742)*x[0]+(0.224253820738)*x[1]
-        arg[2,4,0,0]=(1.48035663008)*x[0]+(-1.09697986914)*x[1]
-        arg[2,4,0,1]=(-1.09991915151)*x[0]+(-0.557951199985)*x[1]
-        arg[2,4,1,0]=(-1.23862699804)*x[0]+(-0.230602187713)*x[1]
-        arg[2,4,1,1]=(-0.922609370448)*x[0]+(1.76673953413)*x[1]
-        arg[2,4,2,0]=(0.731769419709)*x[0]+(-1.1094516608)*x[1]
-        arg[2,4,2,1]=(-0.145672504805)*x[0]+(0.168194421355)*x[1]
-        arg[3,0,0,0]=(1.02559707602)*x[0]+(0.260431368523)*x[1]
-        arg[3,0,0,1]=(0.111899568824)*x[0]+(-0.90725475423)*x[1]
-        arg[3,0,1,0]=(-0.226547745683)*x[0]+(-0.232830393372)*x[1]
-        arg[3,0,1,1]=(0.347004318471)*x[0]+(-0.196130970001)*x[1]
-        arg[3,0,2,0]=(-1.72155871442)*x[0]+(-1.28372407452)*x[1]
-        arg[3,0,2,1]=(1.43817914693)*x[0]+(-0.354093253684)*x[1]
-        arg[3,1,0,0]=(-0.293939245102)*x[0]+(0.0255562139103)*x[1]
-        arg[3,1,0,1]=(0.139306213018)*x[0]+(0.595062226642)*x[1]
-        arg[3,1,1,0]=(-0.670339920672)*x[0]+(0.387520583192)*x[1]
-        arg[3,1,1,1]=(-0.0323325470954)*x[0]+(-0.681162999279)*x[1]
-        arg[3,1,2,0]=(0.235275048739)*x[0]+(0.144725473773)*x[1]
-        arg[3,1,2,1]=(0.132211795214)*x[0]+(0.262780216845)*x[1]
-        arg[3,2,0,0]=(0.590514326163)*x[0]+(-0.84273677918)*x[1]
-        arg[3,2,0,1]=(-0.925181556185)*x[0]+(-0.300244447001)*x[1]
-        arg[3,2,1,0]=(-0.0509700795112)*x[0]+(-1.31919389616)*x[1]
-        arg[3,2,1,1]=(1.50577291846)*x[0]+(-0.219284607769)*x[1]
-        arg[3,2,2,0]=(-0.0460616673346)*x[0]+(-0.690312685466)*x[1]
-        arg[3,2,2,1]=(-0.673765477936)*x[0]+(-0.0965860475641)*x[1]
-        arg[3,3,0,0]=(-0.6577594174)*x[0]+(0.171886277016)*x[1]
-        arg[3,3,0,1]=(-1.08810434718)*x[0]+(0.333153250183)*x[1]
-        arg[3,3,1,0]=(0.150968371983)*x[0]+(0.290859317391)*x[1]
-        arg[3,3,1,1]=(1.62096265131)*x[0]+(-1.10309602741)*x[1]
-        arg[3,3,2,0]=(-0.932063639972)*x[0]+(-0.897131561126)*x[1]
-        arg[3,3,2,1]=(-0.819110834345)*x[0]+(1.59159109562)*x[1]
-        arg[3,4,0,0]=(0.272662931155)*x[0]+(0.69026285756)*x[1]
-        arg[3,4,0,1]=(-0.600556370757)*x[0]+(-0.0853533546302)*x[1]
-        arg[3,4,1,0]=(1.18544735281)*x[0]+(0.217751189034)*x[1]
-        arg[3,4,1,1]=(-0.594609531358)*x[0]+(0.882158349788)*x[1]
-        arg[3,4,2,0]=(1.18876765552)*x[0]+(-0.411481586979)*x[1]
-        arg[3,4,2,1]=(-1.093067792)*x[0]+(-0.266744260768)*x[1]
-        ref[0,0,0,0]=(-0.754311658086)*x_ref[0]+(0.235157034342)*x_ref[1]
-        ref[0,0,0,1]=(-1.33786315024)*x_ref[0]+(0.243349279742)*x_ref[1]
-        ref[0,0,1,0]=(1.48657750088)*x_ref[0]+(1.09853108305)*x_ref[1]
-        ref[0,0,1,1]=(1.4501362266)*x_ref[0]+(0.824811567155)*x_ref[1]
-        ref[0,0,2,0]=(1.12567566082)*x_ref[0]+(0.663525681174)*x_ref[1]
-        ref[0,0,2,1]=(1.48991565019)*x_ref[0]+(-0.680795365011)*x_ref[1]
-        ref[0,1,0,0]=(0.268571449528)*x_ref[0]+(0.818595834672)*x_ref[1]
-        ref[0,1,0,1]=(-1.55490945555)*x_ref[0]+(0.783595197888)*x_ref[1]
-        ref[0,1,1,0]=(0.913201382585)*x_ref[0]+(0.855491379376)*x_ref[1]
-        ref[0,1,1,1]=(-0.179192075116)*x_ref[0]+(-0.690415079523)*x_ref[1]
-        ref[0,1,2,0]=(-0.0393574502912)*x_ref[0]+(-0.690157650634)*x_ref[1]
-        ref[0,1,2,1]=(0.784216863217)*x_ref[0]+(0.498735486159)*x_ref[1]
-        ref[0,2,0,0]=(0.137939554165)*x_ref[0]+(-1.33961519113)*x_ref[1]
-        ref[0,2,0,1]=(-1.03897311736)*x_ref[0]+(-1.37797405312)*x_ref[1]
-        ref[0,2,1,0]=(0.199812003756)*x_ref[0]+(-0.0388499674037)*x_ref[1]
-        ref[0,2,1,1]=(1.15530534202)*x_ref[0]+(-1.28280869078)*x_ref[1]
-        ref[0,2,2,0]=(0.836447791155)*x_ref[0]+(1.2627066026)*x_ref[1]
-        ref[0,2,2,1]=(-0.584608492688)*x_ref[0]+(-1.55305974305)*x_ref[1]
-        ref[0,3,0,0]=(-0.661952381799)*x_ref[0]+(-1.27062403778)*x_ref[1]
-        ref[0,3,0,1]=(-1.47789532259)*x_ref[0]+(-0.279583524936)*x_ref[1]
-        ref[0,3,1,0]=(1.40729771357)*x_ref[0]+(0.0971284144528)*x_ref[1]
-        ref[0,3,1,1]=(-0.459167955911)*x_ref[0]+(-1.29033281524)*x_ref[1]
-        ref[0,3,2,0]=(-1.63189436824)*x_ref[0]+(0.75729808422)*x_ref[1]
-        ref[0,3,2,1]=(0.522479828718)*x_ref[0]+(-0.0231299515383)*x_ref[1]
-        ref[0,4,0,0]=(0.241891446615)*x_ref[0]+(0.803327107651)*x_ref[1]
-        ref[0,4,0,1]=(0.273613502836)*x_ref[0]+(-0.0115180464171)*x_ref[1]
-        ref[0,4,1,0]=(1.96219818696)*x_ref[0]+(-0.349137094743)*x_ref[1]
-        ref[0,4,1,1]=(0.365690821719)*x_ref[0]+(-1.6943347181)*x_ref[1]
-        ref[0,4,2,0]=(-0.283970779872)*x_ref[0]+(-0.258537179804)*x_ref[1]
-        ref[0,4,2,1]=(-0.973333430598)*x_ref[0]+(1.48706276212)*x_ref[1]
-        ref[1,0,0,0]=(1.18757466971)*x_ref[0]+(0.838804656357)*x_ref[1]
-        ref[1,0,0,1]=(0.840859904702)*x_ref[0]+(1.09955195682)*x_ref[1]
-        ref[1,0,1,0]=(1.46190513227)*x_ref[0]+(-0.596959830422)*x_ref[1]
-        ref[1,0,1,1]=(0.718689296745)*x_ref[0]+(-0.628074620222)*x_ref[1]
-        ref[1,0,2,0]=(0.440761293041)*x_ref[0]+(0.115800854194)*x_ref[1]
-        ref[1,0,2,1]=(1.34891146904)*x_ref[0]+(0.813690260652)*x_ref[1]
-        ref[1,1,0,0]=(0.183071638098)*x_ref[0]+(-1.37996210755)*x_ref[1]
-        ref[1,1,0,1]=(0.258142115988)*x_ref[0]+(-0.757709381529)*x_ref[1]
-        ref[1,1,1,0]=(1.72392829309)*x_ref[0]+(0.444995102781)*x_ref[1]
-        ref[1,1,1,1]=(-0.380898209988)*x_ref[0]+(-0.0950246860347)*x_ref[1]
-        ref[1,1,2,0]=(0.203007226016)*x_ref[0]+(1.09786001832)*x_ref[1]
-        ref[1,1,2,1]=(-0.502500865341)*x_ref[0]+(-0.629980527995)*x_ref[1]
-        ref[1,2,0,0]=(0.482549518436)*x_ref[0]+(0.565840824146)*x_ref[1]
-        ref[1,2,0,1]=(0.355818565068)*x_ref[0]+(-0.78273295574)*x_ref[1]
-        ref[1,2,1,0]=(1.79204033071)*x_ref[0]+(-0.698040851585)*x_ref[1]
-        ref[1,2,1,1]=(-0.534827741044)*x_ref[0]+(0.00943131627498)*x_ref[1]
-        ref[1,2,2,0]=(-1.00663524444)*x_ref[0]+(0.0207854553456)*x_ref[1]
-        ref[1,2,2,1]=(-0.338048040159)*x_ref[0]+(-0.380607406217)*x_ref[1]
-        ref[1,3,0,0]=(0.586310549044)*x_ref[0]+(0.276326798805)*x_ref[1]
-        ref[1,3,0,1]=(-0.260482580702)*x_ref[0]+(-0.349279395321)*x_ref[1]
-        ref[1,3,1,0]=(-0.196533829895)*x_ref[0]+(0.614805272738)*x_ref[1]
-        ref[1,3,1,1]=(-0.363176483895)*x_ref[0]+(-0.925817017731)*x_ref[1]
-        ref[1,3,2,0]=(-1.24182075421)*x_ref[0]+(0.215966446013)*x_ref[1]
-        ref[1,3,2,1]=(1.07546652642)*x_ref[0]+(0.383803991974)*x_ref[1]
-        ref[1,4,0,0]=(0.199312303525)*x_ref[0]+(-0.314520883859)*x_ref[1]
-        ref[1,4,0,1]=(-1.56890826152)*x_ref[0]+(-0.133086662241)*x_ref[1]
-        ref[1,4,1,0]=(1.1307241936)*x_ref[0]+(-1.32905744984)*x_ref[1]
-        ref[1,4,1,1]=(-0.385991455298)*x_ref[0]+(0.292913024507)*x_ref[1]
-        ref[1,4,2,0]=(1.14561678056)*x_ref[0]+(-0.662696162276)*x_ref[1]
-        ref[1,4,2,1]=(-1.49533948954)*x_ref[0]+(1.43396138744)*x_ref[1]
-        ref[2,0,0,0]=(-0.63160396493)*x_ref[0]+(0.813120998776)*x_ref[1]
-        ref[2,0,0,1]=(0.65598998434)*x_ref[0]+(-1.02445537553)*x_ref[1]
-        ref[2,0,1,0]=(-1.13473104075)*x_ref[0]+(0.057331183449)*x_ref[1]
-        ref[2,0,1,1]=(-0.154892482107)*x_ref[0]+(0.481969957579)*x_ref[1]
-        ref[2,0,2,0]=(0.521916671496)*x_ref[0]+(0.546676943059)*x_ref[1]
-        ref[2,0,2,1]=(-1.68919379028)*x_ref[0]+(1.08292038981)*x_ref[1]
-        ref[2,1,0,0]=(-0.643846595888)*x_ref[0]+(0.528306097755)*x_ref[1]
-        ref[2,1,0,1]=(1.3745090497)*x_ref[0]+(-0.0801648509184)*x_ref[1]
-        ref[2,1,1,0]=(0.129096817054)*x_ref[0]+(0.90750370855)*x_ref[1]
-        ref[2,1,1,1]=(0.539309513305)*x_ref[0]+(1.34949470961)*x_ref[1]
-        ref[2,1,2,0]=(1.4189703896)*x_ref[0]+(-1.75011201893)*x_ref[1]
-        ref[2,1,2,1]=(-1.09325548386)*x_ref[0]+(0.148279301716)*x_ref[1]
-        ref[2,2,0,0]=(-1.25785133743)*x_ref[0]+(0.275071306594)*x_ref[1]
-        ref[2,2,0,1]=(-0.550152068761)*x_ref[0]+(-1.20422484275)*x_ref[1]
-        ref[2,2,1,0]=(-0.102062863668)*x_ref[0]+(-1.34431887541)*x_ref[1]
-        ref[2,2,1,1]=(0.103354724169)*x_ref[0]+(-0.941952180446)*x_ref[1]
-        ref[2,2,2,0]=(1.2090339604)*x_ref[0]+(-0.330357976796)*x_ref[1]
-        ref[2,2,2,1]=(0.203162449188)*x_ref[0]+(-1.03640702014)*x_ref[1]
-        ref[2,3,0,0]=(-0.324576353514)*x_ref[0]+(0.582614539267)*x_ref[1]
-        ref[2,3,0,1]=(-0.213823136215)*x_ref[0]+(-0.473199105214)*x_ref[1]
-        ref[2,3,1,0]=(0.395144702599)*x_ref[0]+(0.0358194467152)*x_ref[1]
-        ref[2,3,1,1]=(1.32860563396)*x_ref[0]+(-0.577308310732)*x_ref[1]
-        ref[2,3,2,0]=(0.994205029432)*x_ref[0]+(1.13433517636)*x_ref[1]
-        ref[2,3,2,1]=(-0.488499286742)*x_ref[0]+(0.224253820738)*x_ref[1]
-        ref[2,4,0,0]=(1.48035663008)*x_ref[0]+(-1.09697986914)*x_ref[1]
-        ref[2,4,0,1]=(-1.09991915151)*x_ref[0]+(-0.557951199985)*x_ref[1]
-        ref[2,4,1,0]=(-1.23862699804)*x_ref[0]+(-0.230602187713)*x_ref[1]
-        ref[2,4,1,1]=(-0.922609370448)*x_ref[0]+(1.76673953413)*x_ref[1]
-        ref[2,4,2,0]=(0.731769419709)*x_ref[0]+(-1.1094516608)*x_ref[1]
-        ref[2,4,2,1]=(-0.145672504805)*x_ref[0]+(0.168194421355)*x_ref[1]
-        ref[3,0,0,0]=(1.02559707602)*x_ref[0]+(0.260431368523)*x_ref[1]
-        ref[3,0,0,1]=(0.111899568824)*x_ref[0]+(-0.90725475423)*x_ref[1]
-        ref[3,0,1,0]=(-0.226547745683)*x_ref[0]+(-0.232830393372)*x_ref[1]
-        ref[3,0,1,1]=(0.347004318471)*x_ref[0]+(-0.196130970001)*x_ref[1]
-        ref[3,0,2,0]=(-1.72155871442)*x_ref[0]+(-1.28372407452)*x_ref[1]
-        ref[3,0,2,1]=(1.43817914693)*x_ref[0]+(-0.354093253684)*x_ref[1]
-        ref[3,1,0,0]=(-0.293939245102)*x_ref[0]+(0.0255562139103)*x_ref[1]
-        ref[3,1,0,1]=(0.139306213018)*x_ref[0]+(0.595062226642)*x_ref[1]
-        ref[3,1,1,0]=(-0.670339920672)*x_ref[0]+(0.387520583192)*x_ref[1]
-        ref[3,1,1,1]=(-0.0323325470954)*x_ref[0]+(-0.681162999279)*x_ref[1]
-        ref[3,1,2,0]=(0.235275048739)*x_ref[0]+(0.144725473773)*x_ref[1]
-        ref[3,1,2,1]=(0.132211795214)*x_ref[0]+(0.262780216845)*x_ref[1]
-        ref[3,2,0,0]=(0.590514326163)*x_ref[0]+(-0.84273677918)*x_ref[1]
-        ref[3,2,0,1]=(-0.925181556185)*x_ref[0]+(-0.300244447001)*x_ref[1]
-        ref[3,2,1,0]=(-0.0509700795112)*x_ref[0]+(-1.31919389616)*x_ref[1]
-        ref[3,2,1,1]=(1.50577291846)*x_ref[0]+(-0.219284607769)*x_ref[1]
-        ref[3,2,2,0]=(-0.0460616673346)*x_ref[0]+(-0.690312685466)*x_ref[1]
-        ref[3,2,2,1]=(-0.673765477936)*x_ref[0]+(-0.0965860475641)*x_ref[1]
-        ref[3,3,0,0]=(-0.6577594174)*x_ref[0]+(0.171886277016)*x_ref[1]
-        ref[3,3,0,1]=(-1.08810434718)*x_ref[0]+(0.333153250183)*x_ref[1]
-        ref[3,3,1,0]=(0.150968371983)*x_ref[0]+(0.290859317391)*x_ref[1]
-        ref[3,3,1,1]=(1.62096265131)*x_ref[0]+(-1.10309602741)*x_ref[1]
-        ref[3,3,2,0]=(-0.932063639972)*x_ref[0]+(-0.897131561126)*x_ref[1]
-        ref[3,3,2,1]=(-0.819110834345)*x_ref[0]+(1.59159109562)*x_ref[1]
-        ref[3,4,0,0]=(0.272662931155)*x_ref[0]+(0.69026285756)*x_ref[1]
-        ref[3,4,0,1]=(-0.600556370757)*x_ref[0]+(-0.0853533546302)*x_ref[1]
-        ref[3,4,1,0]=(1.18544735281)*x_ref[0]+(0.217751189034)*x_ref[1]
-        ref[3,4,1,1]=(-0.594609531358)*x_ref[0]+(0.882158349788)*x_ref[1]
-        ref[3,4,2,0]=(1.18876765552)*x_ref[0]+(-0.411481586979)*x_ref[1]
-        ref[3,4,2,1]=(-1.093067792)*x_ref[0]+(-0.266744260768)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-1.29218217256)*x[0]+(-0.382937892213)*x[1]+(0.14363896447)*x[2]
-        arg[0,0,0,1]=(1.39856942421)*x[0]+(0.302082267835)*x[1]+(-0.40870736584)*x[2]
-        arg[0,0,1,0]=(0.523846108043)*x[0]+(1.19961531204)*x[1]+(0.838881761349)*x[2]
-        arg[0,0,1,1]=(0.634542282764)*x[0]+(-0.475514686466)*x[1]+(-1.68745428486)*x[2]
-        arg[0,0,2,0]=(1.16379585731)*x[0]+(-0.928037595416)*x[1]+(0.998857178353)*x[2]
-        arg[0,0,2,1]=(-0.804515607022)*x[0]+(-0.915469493439)*x[1]+(-0.143888000623)*x[2]
-        arg[0,1,0,0]=(0.925843155486)*x[0]+(-0.168243418953)*x[1]+(-0.887839555187)*x[2]
-        arg[0,1,0,1]=(-0.913103105329)*x[0]+(1.38011681732)*x[1]+(-0.992478793291)*x[2]
-        arg[0,1,1,0]=(0.759685289903)*x[0]+(-0.579481939982)*x[1]+(0.577682929138)*x[2]
-        arg[0,1,1,1]=(0.813155548228)*x[0]+(-0.178317843217)*x[1]+(-0.0460113194526)*x[2]
-        arg[0,1,2,0]=(-0.195764860141)*x[0]+(1.44256979628)*x[1]+(0.283992441343)*x[2]
-        arg[0,1,2,1]=(-0.921229459072)*x[0]+(-1.19295761547)*x[1]+(0.215736801944)*x[2]
-        arg[0,2,0,0]=(-0.741726331752)*x[0]+(-0.225585937382)*x[1]+(1.12654556466)*x[2]
-        arg[0,2,0,1]=(-0.709656162421)*x[0]+(0.298862010425)*x[1]+(-0.502443284827)*x[2]
-        arg[0,2,1,0]=(-1.01166188669)*x[0]+(-1.43763408953)*x[1]+(-0.835160398488)*x[2]
-        arg[0,2,1,1]=(1.80968424545)*x[0]+(-0.802666103495)*x[1]+(0.290283606115)*x[2]
-        arg[0,2,2,0]=(0.346481981585)*x[0]+(-0.444176962215)*x[1]+(0.689127612227)*x[2]
-        arg[0,2,2,1]=(1.06925494095)*x[0]+(0.452854988449)*x[1]+(-1.19974690364)*x[2]
-        arg[0,3,0,0]=(-0.534896036328)*x[0]+(-0.312000770615)*x[1]+(-0.440033746693)*x[2]
-        arg[0,3,0,1]=(0.580351431838)*x[0]+(-0.36623848451)*x[1]+(-0.507837490037)*x[2]
-        arg[0,3,1,0]=(0.383180910522)*x[0]+(-0.0907152443563)*x[1]+(-0.200103743943)*x[2]
-        arg[0,3,1,1]=(0.0160194687513)*x[0]+(0.862509612939)*x[1]+(-1.14643594474)*x[2]
-        arg[0,3,2,0]=(-0.224390850199)*x[0]+(-0.176927715447)*x[1]+(0.213480525831)*x[2]
-        arg[0,3,2,1]=(-0.0508511448148)*x[0]+(-1.28943467389)*x[1]+(0.902285302487)*x[2]
-        arg[0,4,0,0]=(-0.633106625232)*x[0]+(-0.430651917485)*x[1]+(0.583149841952)*x[2]
-        arg[0,4,0,1]=(0.579035528956)*x[0]+(0.159439682519)*x[1]+(-0.0926277063021)*x[2]
-        arg[0,4,1,0]=(0.00484756366973)*x[0]+(0.0324822270755)*x[1]+(1.20052413378)*x[2]
-        arg[0,4,1,1]=(-0.337383994688)*x[0]+(0.902076367981)*x[1]+(-0.1956377395)*x[2]
-        arg[0,4,2,0]=(0.928434343456)*x[0]+(0.0376569884355)*x[1]+(-0.155274118568)*x[2]
-        arg[0,4,2,1]=(-0.541990213238)*x[0]+(-0.0165076697829)*x[1]+(-0.210319224859)*x[2]
-        arg[1,0,0,0]=(-1.67762025181)*x[0]+(1.61434755579)*x[1]+(0.357272049999)*x[2]
-        arg[1,0,0,1]=(-1.62532544549)*x[0]+(-0.271426231027)*x[1]+(0.338680991778)*x[2]
-        arg[1,0,1,0]=(1.73523408033)*x[0]+(1.11987092368)*x[1]+(0.126769364273)*x[2]
-        arg[1,0,1,1]=(-1.49220786558)*x[0]+(1.51915566092)*x[1]+(1.24788192157)*x[2]
-        arg[1,0,2,0]=(-0.687808766765)*x[0]+(-1.02318754737)*x[1]+(0.590653972416)*x[2]
-        arg[1,0,2,1]=(0.756067354802)*x[0]+(-0.66964706965)*x[1]+(-1.18986499158)*x[2]
-        arg[1,1,0,0]=(0.371345732177)*x[0]+(0.212739617115)*x[1]+(-1.13439047405)*x[2]
-        arg[1,1,0,1]=(0.525761804111)*x[0]+(0.144130399691)*x[1]+(0.715517587677)*x[2]
-        arg[1,1,1,0]=(-0.376160293215)*x[0]+(-0.469964935263)*x[1]+(0.413518194707)*x[2]
-        arg[1,1,1,1]=(-0.787748398144)*x[0]+(-0.810090402237)*x[1]+(-0.50127109256)*x[2]
-        arg[1,1,2,0]=(0.654555083692)*x[0]+(-0.142134700515)*x[1]+(-1.55891930521)*x[2]
-        arg[1,1,2,1]=(-0.423058885456)*x[0]+(-0.65930158641)*x[1]+(0.94440057744)*x[2]
-        arg[1,2,0,0]=(-0.924832007053)*x[0]+(1.0154890382)*x[1]+(0.11938079748)*x[2]
-        arg[1,2,0,1]=(0.134642686931)*x[0]+(-1.30908067998)*x[1]+(0.367206139074)*x[2]
-        arg[1,2,1,0]=(1.55524055201)*x[0]+(0.727208660637)*x[1]+(0.809810917377)*x[2]
-        arg[1,2,1,1]=(0.94813391462)*x[0]+(-1.49402524308)*x[1]+(0.367824542434)*x[2]
-        arg[1,2,2,0]=(-0.608295798731)*x[0]+(-0.142302252814)*x[1]+(-0.986529251308)*x[2]
-        arg[1,2,2,1]=(0.0259394619607)*x[0]+(-1.60728202467)*x[1]+(0.312534656619)*x[2]
-        arg[1,3,0,0]=(-1.34063373729)*x[0]+(-0.268499839329)*x[1]+(-0.335125886299)*x[2]
-        arg[1,3,0,1]=(1.53280698072)*x[0]+(1.24369684711)*x[1]+(0.766369156132)*x[2]
-        arg[1,3,1,0]=(0.902067176876)*x[0]+(0.791102994814)*x[1]+(-0.89266430493)*x[2]
-        arg[1,3,1,1]=(0.704997629232)*x[0]+(-0.551611360332)*x[1]+(1.39134537491)*x[2]
-        arg[1,3,2,0]=(-0.151690675211)*x[0]+(-1.01762975893)*x[1]+(-0.627493214284)*x[2]
-        arg[1,3,2,1]=(1.00936645922)*x[0]+(0.0322458997248)*x[1]+(1.45039938194)*x[2]
-        arg[1,4,0,0]=(-0.0916390388904)*x[0]+(-0.783111746469)*x[1]+(0.389725342225)*x[2]
-        arg[1,4,0,1]=(1.18859328243)*x[0]+(0.871689661558)*x[1]+(-0.775464713448)*x[2]
-        arg[1,4,1,0]=(0.913118342488)*x[0]+(1.53285648884)*x[1]+(0.0947365101243)*x[2]
-        arg[1,4,1,1]=(-1.00735841224)*x[0]+(-1.12544193607)*x[1]+(0.267347229372)*x[2]
-        arg[1,4,2,0]=(0.285943438284)*x[0]+(-1.0889389244)*x[1]+(-1.03054842327)*x[2]
-        arg[1,4,2,1]=(-1.5768940139)*x[0]+(0.91237754587)*x[1]+(1.30220394199)*x[2]
-        arg[2,0,0,0]=(-0.0634935883277)*x[0]+(0.157304131712)*x[1]+(-1.2995042074)*x[2]
-        arg[2,0,0,1]=(-0.802705266871)*x[0]+(0.238233162774)*x[1]+(1.29463414013)*x[2]
-        arg[2,0,1,0]=(-0.925468462671)*x[0]+(0.870960795966)*x[1]+(0.156522765713)*x[2]
-        arg[2,0,1,1]=(-0.546666833309)*x[0]+(-1.14649607995)*x[1]+(-1.53906505048)*x[2]
-        arg[2,0,2,0]=(0.464952910857)*x[0]+(0.408605786027)*x[1]+(-0.886974881114)*x[2]
-        arg[2,0,2,1]=(0.491723247948)*x[0]+(0.194616420077)*x[1]+(0.409049782749)*x[2]
-        arg[2,1,0,0]=(-1.19836883114)*x[0]+(1.0622722337)*x[1]+(-0.109193867727)*x[2]
-        arg[2,1,0,1]=(1.01973600383)*x[0]+(-0.154482220539)*x[1]+(0.378696371956)*x[2]
-        arg[2,1,1,0]=(-0.0812015296246)*x[0]+(-1.10252794568)*x[1]+(-0.00585426581857)*x[2]
-        arg[2,1,1,1]=(0.536042665272)*x[0]+(0.685507117255)*x[1]+(-0.179652683139)*x[2]
-        arg[2,1,2,0]=(-0.36750467811)*x[0]+(-1.23674550869)*x[1]+(-0.762905702801)*x[2]
-        arg[2,1,2,1]=(0.329665965651)*x[0]+(0.101195810737)*x[1]+(-0.610015052375)*x[2]
-        arg[2,2,0,0]=(-0.81644635185)*x[0]+(-0.604578476306)*x[1]+(0.0440925706991)*x[2]
-        arg[2,2,0,1]=(-0.958241437971)*x[0]+(0.38563498206)*x[1]+(0.913406762318)*x[2]
-        arg[2,2,1,0]=(1.22027492224)*x[0]+(-1.00726209939)*x[1]+(-1.05083068303)*x[2]
-        arg[2,2,1,1]=(-1.47561192645)*x[0]+(-0.903549355608)*x[1]+(0.236771324671)*x[2]
-        arg[2,2,2,0]=(0.284995864449)*x[0]+(-0.175760829921)*x[1]+(-0.720607220001)*x[2]
-        arg[2,2,2,1]=(-0.535894515963)*x[0]+(-0.821302957162)*x[1]+(-1.75141540241)*x[2]
-        arg[2,3,0,0]=(-0.333082106674)*x[0]+(0.579471826412)*x[1]+(0.561184138108)*x[2]
-        arg[2,3,0,1]=(1.34803519557)*x[0]+(-0.441299088849)*x[1]+(-1.04945951616)*x[2]
-        arg[2,3,1,0]=(0.299011096602)*x[0]+(1.32726458235)*x[1]+(-0.196298687359)*x[2]
-        arg[2,3,1,1]=(1.48698834204)*x[0]+(0.527221496971)*x[1]+(0.0819813519422)*x[2]
-        arg[2,3,2,0]=(0.681680955153)*x[0]+(0.503653972357)*x[1]+(0.434669347891)*x[2]
-        arg[2,3,2,1]=(-0.152586789311)*x[0]+(-0.765242635579)*x[1]+(0.712663994387)*x[2]
-        arg[2,4,0,0]=(0.630152300463)*x[0]+(1.12366733588)*x[1]+(-0.662966700638)*x[2]
-        arg[2,4,0,1]=(1.02796709755)*x[0]+(-0.24093881584)*x[1]+(1.79445417019)*x[2]
-        arg[2,4,1,0]=(-0.954575760758)*x[0]+(0.16331782608)*x[1]+(1.38309921277)*x[2]
-        arg[2,4,1,1]=(0.536092514281)*x[0]+(-0.276364952673)*x[1]+(0.779619701528)*x[2]
-        arg[2,4,2,0]=(0.267270444141)*x[0]+(-0.810746424331)*x[1]+(-0.733877853264)*x[2]
-        arg[2,4,2,1]=(-0.0641688847923)*x[0]+(-0.386279280667)*x[1]+(0.0637571595255)*x[2]
-        arg[3,0,0,0]=(0.469903180687)*x[0]+(-0.793812397342)*x[1]+(1.60841921779)*x[2]
-        arg[3,0,0,1]=(0.720057600102)*x[0]+(0.502582253261)*x[1]+(0.460147791003)*x[2]
-        arg[3,0,1,0]=(0.0327862564137)*x[0]+(-1.142962965)*x[1]+(0.114799131894)*x[2]
-        arg[3,0,1,1]=(-0.997412656978)*x[0]+(-0.678175468576)*x[1]+(-0.152663147682)*x[2]
-        arg[3,0,2,0]=(0.810424599078)*x[0]+(0.75522727786)*x[1]+(-0.205880941501)*x[2]
-        arg[3,0,2,1]=(0.353601949476)*x[0]+(0.0963200813379)*x[1]+(0.0578829287146)*x[2]
-        arg[3,1,0,0]=(0.346590730062)*x[0]+(1.07953790092)*x[1]+(0.647586851217)*x[2]
-        arg[3,1,0,1]=(0.889879195334)*x[0]+(-0.352788186249)*x[1]+(0.434900135803)*x[2]
-        arg[3,1,1,0]=(-0.721742734959)*x[0]+(0.166066672134)*x[1]+(-0.489266924809)*x[2]
-        arg[3,1,1,1]=(-0.810487755181)*x[0]+(0.0354916979253)*x[1]+(0.0735520654395)*x[2]
-        arg[3,1,2,0]=(1.02414338939)*x[0]+(-0.851076284556)*x[1]+(-0.232174494405)*x[2]
-        arg[3,1,2,1]=(-0.327246566026)*x[0]+(-0.0499396023605)*x[1]+(0.611585402379)*x[2]
-        arg[3,2,0,0]=(-0.365757628557)*x[0]+(0.868697342115)*x[1]+(-1.102545972)*x[2]
-        arg[3,2,0,1]=(0.628592129227)*x[0]+(1.25545515311)*x[1]+(-1.0577476264)*x[2]
-        arg[3,2,1,0]=(0.160995978044)*x[0]+(-0.947389499556)*x[1]+(-0.870476160656)*x[2]
-        arg[3,2,1,1]=(0.910787139938)*x[0]+(-0.0681493345139)*x[1]+(-0.561910153781)*x[2]
-        arg[3,2,2,0]=(0.0761644634428)*x[0]+(-0.700940967343)*x[1]+(1.19407210904)*x[2]
-        arg[3,2,2,1]=(1.75717437065)*x[0]+(-0.144457317494)*x[1]+(-0.523233453079)*x[2]
-        arg[3,3,0,0]=(0.448782872606)*x[0]+(0.650464256547)*x[1]+(1.19476547456)*x[2]
-        arg[3,3,0,1]=(0.118586027201)*x[0]+(0.449971816918)*x[1]+(-0.510812733389)*x[2]
-        arg[3,3,1,0]=(-0.330032265081)*x[0]+(-0.13657534891)*x[1]+(0.456365289556)*x[2]
-        arg[3,3,1,1]=(0.697584212635)*x[0]+(0.897604241724)*x[1]+(1.31517116663)*x[2]
-        arg[3,3,2,0]=(-0.940538707365)*x[0]+(-0.334862221665)*x[1]+(0.0969742096754)*x[2]
-        arg[3,3,2,1]=(-0.985788813516)*x[0]+(0.348389725548)*x[1]+(-0.260816590361)*x[2]
-        arg[3,4,0,0]=(0.754692421417)*x[0]+(0.775985781769)*x[1]+(-0.0866159222457)*x[2]
-        arg[3,4,0,1]=(-1.17670502429)*x[0]+(1.12268279393)*x[1]+(-1.1279822095)*x[2]
-        arg[3,4,1,0]=(-1.48674370666)*x[0]+(1.26685445713)*x[1]+(-0.0522828809306)*x[2]
-        arg[3,4,1,1]=(0.401760689843)*x[0]+(-1.35707797971)*x[1]+(-0.0580654273828)*x[2]
-        arg[3,4,2,0]=(-1.40697830852)*x[0]+(0.933923369958)*x[1]+(0.230152169159)*x[2]
-        arg[3,4,2,1]=(-1.21242130555)*x[0]+(0.858316339663)*x[1]+(-0.839747078526)*x[2]
-        ref[0,0,0,0]=(-1.29218217256)*x_ref[0]+(-0.382937892213)*x_ref[1]+(0.14363896447)*x_ref[2]
-        ref[0,0,0,1]=(1.39856942421)*x_ref[0]+(0.302082267835)*x_ref[1]+(-0.40870736584)*x_ref[2]
-        ref[0,0,1,0]=(0.523846108043)*x_ref[0]+(1.19961531204)*x_ref[1]+(0.838881761349)*x_ref[2]
-        ref[0,0,1,1]=(0.634542282764)*x_ref[0]+(-0.475514686466)*x_ref[1]+(-1.68745428486)*x_ref[2]
-        ref[0,0,2,0]=(1.16379585731)*x_ref[0]+(-0.928037595416)*x_ref[1]+(0.998857178353)*x_ref[2]
-        ref[0,0,2,1]=(-0.804515607022)*x_ref[0]+(-0.915469493439)*x_ref[1]+(-0.143888000623)*x_ref[2]
-        ref[0,1,0,0]=(0.925843155486)*x_ref[0]+(-0.168243418953)*x_ref[1]+(-0.887839555187)*x_ref[2]
-        ref[0,1,0,1]=(-0.913103105329)*x_ref[0]+(1.38011681732)*x_ref[1]+(-0.992478793291)*x_ref[2]
-        ref[0,1,1,0]=(0.759685289903)*x_ref[0]+(-0.579481939982)*x_ref[1]+(0.577682929138)*x_ref[2]
-        ref[0,1,1,1]=(0.813155548228)*x_ref[0]+(-0.178317843217)*x_ref[1]+(-0.0460113194526)*x_ref[2]
-        ref[0,1,2,0]=(-0.195764860141)*x_ref[0]+(1.44256979628)*x_ref[1]+(0.283992441343)*x_ref[2]
-        ref[0,1,2,1]=(-0.921229459072)*x_ref[0]+(-1.19295761547)*x_ref[1]+(0.215736801944)*x_ref[2]
-        ref[0,2,0,0]=(-0.741726331752)*x_ref[0]+(-0.225585937382)*x_ref[1]+(1.12654556466)*x_ref[2]
-        ref[0,2,0,1]=(-0.709656162421)*x_ref[0]+(0.298862010425)*x_ref[1]+(-0.502443284827)*x_ref[2]
-        ref[0,2,1,0]=(-1.01166188669)*x_ref[0]+(-1.43763408953)*x_ref[1]+(-0.835160398488)*x_ref[2]
-        ref[0,2,1,1]=(1.80968424545)*x_ref[0]+(-0.802666103495)*x_ref[1]+(0.290283606115)*x_ref[2]
-        ref[0,2,2,0]=(0.346481981585)*x_ref[0]+(-0.444176962215)*x_ref[1]+(0.689127612227)*x_ref[2]
-        ref[0,2,2,1]=(1.06925494095)*x_ref[0]+(0.452854988449)*x_ref[1]+(-1.19974690364)*x_ref[2]
-        ref[0,3,0,0]=(-0.534896036328)*x_ref[0]+(-0.312000770615)*x_ref[1]+(-0.440033746693)*x_ref[2]
-        ref[0,3,0,1]=(0.580351431838)*x_ref[0]+(-0.36623848451)*x_ref[1]+(-0.507837490037)*x_ref[2]
-        ref[0,3,1,0]=(0.383180910522)*x_ref[0]+(-0.0907152443563)*x_ref[1]+(-0.200103743943)*x_ref[2]
-        ref[0,3,1,1]=(0.0160194687513)*x_ref[0]+(0.862509612939)*x_ref[1]+(-1.14643594474)*x_ref[2]
-        ref[0,3,2,0]=(-0.224390850199)*x_ref[0]+(-0.176927715447)*x_ref[1]+(0.213480525831)*x_ref[2]
-        ref[0,3,2,1]=(-0.0508511448148)*x_ref[0]+(-1.28943467389)*x_ref[1]+(0.902285302487)*x_ref[2]
-        ref[0,4,0,0]=(-0.633106625232)*x_ref[0]+(-0.430651917485)*x_ref[1]+(0.583149841952)*x_ref[2]
-        ref[0,4,0,1]=(0.579035528956)*x_ref[0]+(0.159439682519)*x_ref[1]+(-0.0926277063021)*x_ref[2]
-        ref[0,4,1,0]=(0.00484756366973)*x_ref[0]+(0.0324822270755)*x_ref[1]+(1.20052413378)*x_ref[2]
-        ref[0,4,1,1]=(-0.337383994688)*x_ref[0]+(0.902076367981)*x_ref[1]+(-0.1956377395)*x_ref[2]
-        ref[0,4,2,0]=(0.928434343456)*x_ref[0]+(0.0376569884355)*x_ref[1]+(-0.155274118568)*x_ref[2]
-        ref[0,4,2,1]=(-0.541990213238)*x_ref[0]+(-0.0165076697829)*x_ref[1]+(-0.210319224859)*x_ref[2]
-        ref[1,0,0,0]=(-1.67762025181)*x_ref[0]+(1.61434755579)*x_ref[1]+(0.357272049999)*x_ref[2]
-        ref[1,0,0,1]=(-1.62532544549)*x_ref[0]+(-0.271426231027)*x_ref[1]+(0.338680991778)*x_ref[2]
-        ref[1,0,1,0]=(1.73523408033)*x_ref[0]+(1.11987092368)*x_ref[1]+(0.126769364273)*x_ref[2]
-        ref[1,0,1,1]=(-1.49220786558)*x_ref[0]+(1.51915566092)*x_ref[1]+(1.24788192157)*x_ref[2]
-        ref[1,0,2,0]=(-0.687808766765)*x_ref[0]+(-1.02318754737)*x_ref[1]+(0.590653972416)*x_ref[2]
-        ref[1,0,2,1]=(0.756067354802)*x_ref[0]+(-0.66964706965)*x_ref[1]+(-1.18986499158)*x_ref[2]
-        ref[1,1,0,0]=(0.371345732177)*x_ref[0]+(0.212739617115)*x_ref[1]+(-1.13439047405)*x_ref[2]
-        ref[1,1,0,1]=(0.525761804111)*x_ref[0]+(0.144130399691)*x_ref[1]+(0.715517587677)*x_ref[2]
-        ref[1,1,1,0]=(-0.376160293215)*x_ref[0]+(-0.469964935263)*x_ref[1]+(0.413518194707)*x_ref[2]
-        ref[1,1,1,1]=(-0.787748398144)*x_ref[0]+(-0.810090402237)*x_ref[1]+(-0.50127109256)*x_ref[2]
-        ref[1,1,2,0]=(0.654555083692)*x_ref[0]+(-0.142134700515)*x_ref[1]+(-1.55891930521)*x_ref[2]
-        ref[1,1,2,1]=(-0.423058885456)*x_ref[0]+(-0.65930158641)*x_ref[1]+(0.94440057744)*x_ref[2]
-        ref[1,2,0,0]=(-0.924832007053)*x_ref[0]+(1.0154890382)*x_ref[1]+(0.11938079748)*x_ref[2]
-        ref[1,2,0,1]=(0.134642686931)*x_ref[0]+(-1.30908067998)*x_ref[1]+(0.367206139074)*x_ref[2]
-        ref[1,2,1,0]=(1.55524055201)*x_ref[0]+(0.727208660637)*x_ref[1]+(0.809810917377)*x_ref[2]
-        ref[1,2,1,1]=(0.94813391462)*x_ref[0]+(-1.49402524308)*x_ref[1]+(0.367824542434)*x_ref[2]
-        ref[1,2,2,0]=(-0.608295798731)*x_ref[0]+(-0.142302252814)*x_ref[1]+(-0.986529251308)*x_ref[2]
-        ref[1,2,2,1]=(0.0259394619607)*x_ref[0]+(-1.60728202467)*x_ref[1]+(0.312534656619)*x_ref[2]
-        ref[1,3,0,0]=(-1.34063373729)*x_ref[0]+(-0.268499839329)*x_ref[1]+(-0.335125886299)*x_ref[2]
-        ref[1,3,0,1]=(1.53280698072)*x_ref[0]+(1.24369684711)*x_ref[1]+(0.766369156132)*x_ref[2]
-        ref[1,3,1,0]=(0.902067176876)*x_ref[0]+(0.791102994814)*x_ref[1]+(-0.89266430493)*x_ref[2]
-        ref[1,3,1,1]=(0.704997629232)*x_ref[0]+(-0.551611360332)*x_ref[1]+(1.39134537491)*x_ref[2]
-        ref[1,3,2,0]=(-0.151690675211)*x_ref[0]+(-1.01762975893)*x_ref[1]+(-0.627493214284)*x_ref[2]
-        ref[1,3,2,1]=(1.00936645922)*x_ref[0]+(0.0322458997248)*x_ref[1]+(1.45039938194)*x_ref[2]
-        ref[1,4,0,0]=(-0.0916390388904)*x_ref[0]+(-0.783111746469)*x_ref[1]+(0.389725342225)*x_ref[2]
-        ref[1,4,0,1]=(1.18859328243)*x_ref[0]+(0.871689661558)*x_ref[1]+(-0.775464713448)*x_ref[2]
-        ref[1,4,1,0]=(0.913118342488)*x_ref[0]+(1.53285648884)*x_ref[1]+(0.0947365101243)*x_ref[2]
-        ref[1,4,1,1]=(-1.00735841224)*x_ref[0]+(-1.12544193607)*x_ref[1]+(0.267347229372)*x_ref[2]
-        ref[1,4,2,0]=(0.285943438284)*x_ref[0]+(-1.0889389244)*x_ref[1]+(-1.03054842327)*x_ref[2]
-        ref[1,4,2,1]=(-1.5768940139)*x_ref[0]+(0.91237754587)*x_ref[1]+(1.30220394199)*x_ref[2]
-        ref[2,0,0,0]=(-0.0634935883277)*x_ref[0]+(0.157304131712)*x_ref[1]+(-1.2995042074)*x_ref[2]
-        ref[2,0,0,1]=(-0.802705266871)*x_ref[0]+(0.238233162774)*x_ref[1]+(1.29463414013)*x_ref[2]
-        ref[2,0,1,0]=(-0.925468462671)*x_ref[0]+(0.870960795966)*x_ref[1]+(0.156522765713)*x_ref[2]
-        ref[2,0,1,1]=(-0.546666833309)*x_ref[0]+(-1.14649607995)*x_ref[1]+(-1.53906505048)*x_ref[2]
-        ref[2,0,2,0]=(0.464952910857)*x_ref[0]+(0.408605786027)*x_ref[1]+(-0.886974881114)*x_ref[2]
-        ref[2,0,2,1]=(0.491723247948)*x_ref[0]+(0.194616420077)*x_ref[1]+(0.409049782749)*x_ref[2]
-        ref[2,1,0,0]=(-1.19836883114)*x_ref[0]+(1.0622722337)*x_ref[1]+(-0.109193867727)*x_ref[2]
-        ref[2,1,0,1]=(1.01973600383)*x_ref[0]+(-0.154482220539)*x_ref[1]+(0.378696371956)*x_ref[2]
-        ref[2,1,1,0]=(-0.0812015296246)*x_ref[0]+(-1.10252794568)*x_ref[1]+(-0.00585426581857)*x_ref[2]
-        ref[2,1,1,1]=(0.536042665272)*x_ref[0]+(0.685507117255)*x_ref[1]+(-0.179652683139)*x_ref[2]
-        ref[2,1,2,0]=(-0.36750467811)*x_ref[0]+(-1.23674550869)*x_ref[1]+(-0.762905702801)*x_ref[2]
-        ref[2,1,2,1]=(0.329665965651)*x_ref[0]+(0.101195810737)*x_ref[1]+(-0.610015052375)*x_ref[2]
-        ref[2,2,0,0]=(-0.81644635185)*x_ref[0]+(-0.604578476306)*x_ref[1]+(0.0440925706991)*x_ref[2]
-        ref[2,2,0,1]=(-0.958241437971)*x_ref[0]+(0.38563498206)*x_ref[1]+(0.913406762318)*x_ref[2]
-        ref[2,2,1,0]=(1.22027492224)*x_ref[0]+(-1.00726209939)*x_ref[1]+(-1.05083068303)*x_ref[2]
-        ref[2,2,1,1]=(-1.47561192645)*x_ref[0]+(-0.903549355608)*x_ref[1]+(0.236771324671)*x_ref[2]
-        ref[2,2,2,0]=(0.284995864449)*x_ref[0]+(-0.175760829921)*x_ref[1]+(-0.720607220001)*x_ref[2]
-        ref[2,2,2,1]=(-0.535894515963)*x_ref[0]+(-0.821302957162)*x_ref[1]+(-1.75141540241)*x_ref[2]
-        ref[2,3,0,0]=(-0.333082106674)*x_ref[0]+(0.579471826412)*x_ref[1]+(0.561184138108)*x_ref[2]
-        ref[2,3,0,1]=(1.34803519557)*x_ref[0]+(-0.441299088849)*x_ref[1]+(-1.04945951616)*x_ref[2]
-        ref[2,3,1,0]=(0.299011096602)*x_ref[0]+(1.32726458235)*x_ref[1]+(-0.196298687359)*x_ref[2]
-        ref[2,3,1,1]=(1.48698834204)*x_ref[0]+(0.527221496971)*x_ref[1]+(0.0819813519422)*x_ref[2]
-        ref[2,3,2,0]=(0.681680955153)*x_ref[0]+(0.503653972357)*x_ref[1]+(0.434669347891)*x_ref[2]
-        ref[2,3,2,1]=(-0.152586789311)*x_ref[0]+(-0.765242635579)*x_ref[1]+(0.712663994387)*x_ref[2]
-        ref[2,4,0,0]=(0.630152300463)*x_ref[0]+(1.12366733588)*x_ref[1]+(-0.662966700638)*x_ref[2]
-        ref[2,4,0,1]=(1.02796709755)*x_ref[0]+(-0.24093881584)*x_ref[1]+(1.79445417019)*x_ref[2]
-        ref[2,4,1,0]=(-0.954575760758)*x_ref[0]+(0.16331782608)*x_ref[1]+(1.38309921277)*x_ref[2]
-        ref[2,4,1,1]=(0.536092514281)*x_ref[0]+(-0.276364952673)*x_ref[1]+(0.779619701528)*x_ref[2]
-        ref[2,4,2,0]=(0.267270444141)*x_ref[0]+(-0.810746424331)*x_ref[1]+(-0.733877853264)*x_ref[2]
-        ref[2,4,2,1]=(-0.0641688847923)*x_ref[0]+(-0.386279280667)*x_ref[1]+(0.0637571595255)*x_ref[2]
-        ref[3,0,0,0]=(0.469903180687)*x_ref[0]+(-0.793812397342)*x_ref[1]+(1.60841921779)*x_ref[2]
-        ref[3,0,0,1]=(0.720057600102)*x_ref[0]+(0.502582253261)*x_ref[1]+(0.460147791003)*x_ref[2]
-        ref[3,0,1,0]=(0.0327862564137)*x_ref[0]+(-1.142962965)*x_ref[1]+(0.114799131894)*x_ref[2]
-        ref[3,0,1,1]=(-0.997412656978)*x_ref[0]+(-0.678175468576)*x_ref[1]+(-0.152663147682)*x_ref[2]
-        ref[3,0,2,0]=(0.810424599078)*x_ref[0]+(0.75522727786)*x_ref[1]+(-0.205880941501)*x_ref[2]
-        ref[3,0,2,1]=(0.353601949476)*x_ref[0]+(0.0963200813379)*x_ref[1]+(0.0578829287146)*x_ref[2]
-        ref[3,1,0,0]=(0.346590730062)*x_ref[0]+(1.07953790092)*x_ref[1]+(0.647586851217)*x_ref[2]
-        ref[3,1,0,1]=(0.889879195334)*x_ref[0]+(-0.352788186249)*x_ref[1]+(0.434900135803)*x_ref[2]
-        ref[3,1,1,0]=(-0.721742734959)*x_ref[0]+(0.166066672134)*x_ref[1]+(-0.489266924809)*x_ref[2]
-        ref[3,1,1,1]=(-0.810487755181)*x_ref[0]+(0.0354916979253)*x_ref[1]+(0.0735520654395)*x_ref[2]
-        ref[3,1,2,0]=(1.02414338939)*x_ref[0]+(-0.851076284556)*x_ref[1]+(-0.232174494405)*x_ref[2]
-        ref[3,1,2,1]=(-0.327246566026)*x_ref[0]+(-0.0499396023605)*x_ref[1]+(0.611585402379)*x_ref[2]
-        ref[3,2,0,0]=(-0.365757628557)*x_ref[0]+(0.868697342115)*x_ref[1]+(-1.102545972)*x_ref[2]
-        ref[3,2,0,1]=(0.628592129227)*x_ref[0]+(1.25545515311)*x_ref[1]+(-1.0577476264)*x_ref[2]
-        ref[3,2,1,0]=(0.160995978044)*x_ref[0]+(-0.947389499556)*x_ref[1]+(-0.870476160656)*x_ref[2]
-        ref[3,2,1,1]=(0.910787139938)*x_ref[0]+(-0.0681493345139)*x_ref[1]+(-0.561910153781)*x_ref[2]
-        ref[3,2,2,0]=(0.0761644634428)*x_ref[0]+(-0.700940967343)*x_ref[1]+(1.19407210904)*x_ref[2]
-        ref[3,2,2,1]=(1.75717437065)*x_ref[0]+(-0.144457317494)*x_ref[1]+(-0.523233453079)*x_ref[2]
-        ref[3,3,0,0]=(0.448782872606)*x_ref[0]+(0.650464256547)*x_ref[1]+(1.19476547456)*x_ref[2]
-        ref[3,3,0,1]=(0.118586027201)*x_ref[0]+(0.449971816918)*x_ref[1]+(-0.510812733389)*x_ref[2]
-        ref[3,3,1,0]=(-0.330032265081)*x_ref[0]+(-0.13657534891)*x_ref[1]+(0.456365289556)*x_ref[2]
-        ref[3,3,1,1]=(0.697584212635)*x_ref[0]+(0.897604241724)*x_ref[1]+(1.31517116663)*x_ref[2]
-        ref[3,3,2,0]=(-0.940538707365)*x_ref[0]+(-0.334862221665)*x_ref[1]+(0.0969742096754)*x_ref[2]
-        ref[3,3,2,1]=(-0.985788813516)*x_ref[0]+(0.348389725548)*x_ref[1]+(-0.260816590361)*x_ref[2]
-        ref[3,4,0,0]=(0.754692421417)*x_ref[0]+(0.775985781769)*x_ref[1]+(-0.0866159222457)*x_ref[2]
-        ref[3,4,0,1]=(-1.17670502429)*x_ref[0]+(1.12268279393)*x_ref[1]+(-1.1279822095)*x_ref[2]
-        ref[3,4,1,0]=(-1.48674370666)*x_ref[0]+(1.26685445713)*x_ref[1]+(-0.0522828809306)*x_ref[2]
-        ref[3,4,1,1]=(0.401760689843)*x_ref[0]+(-1.35707797971)*x_ref[1]+(-0.0580654273828)*x_ref[2]
-        ref[3,4,2,0]=(-1.40697830852)*x_ref[0]+(0.933923369958)*x_ref[1]+(0.230152169159)*x_ref[2]
-        ref[3,4,2,1]=(-1.21242130555)*x_ref[0]+(0.858316339663)*x_ref[1]+(-0.839747078526)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.485106931655)*x[0]**o+(-0.45911691249)*x[0]+(-0.780654139819)*x[1]**o+(-0.496275334303)*x[1]
-        ref=(-0.485106931655)*x_ref[0]**o+(-0.45911691249)*x_ref[0]+(-0.780654139819)*x_ref[1]**o+(-0.496275334303)*x_ref[1]
-      else:
-        arg=(-0.312233545328)*x[0]**o+(0.386652391857)*x[0]+(0.893938213685)*x[1]**o+(-0.109836308832)*x[1]+(0.293419600866)*x[2]**o+(-0.802363407879)*x[2]
-        ref=(-0.312233545328)*x_ref[0]**o+(0.386652391857)*x_ref[0]+(0.893938213685)*x_ref[1]**o+(-0.109836308832)*x_ref[1]+(0.293419600866)*x_ref[2]**o+(-0.802363407879)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.383147346126)*x[0]**o+(-0.103098043084)*x[0]+(0.389581571033)*x[1]**o+(0.647441523744)*x[1]
-        arg[1]=(-0.0718078186662)*x[0]**o+(-0.975209175853)*x[0]+(-0.62913306056)*x[1]**o+(0.648038487393)*x[1]
-        ref[0]=(0.383147346126)*x_ref[0]**o+(-0.103098043084)*x_ref[0]+(0.389581571033)*x_ref[1]**o+(0.647441523744)*x_ref[1]
-        ref[1]=(-0.0718078186662)*x_ref[0]**o+(-0.975209175853)*x_ref[0]+(-0.62913306056)*x_ref[1]**o+(0.648038487393)*x_ref[1]
-      else:
-        arg[0]=(-0.392958184101)*x[0]**o+(-0.529709692826)*x[0]+(-0.834422900831)*x[1]**o+(0.52562214773)*x[1]+(-0.726762801989)*x[2]**o+(-0.329225625652)*x[2]
-        arg[1]=(-0.388486489727)*x[0]**o+(0.62353995706)*x[0]+(0.0198506797091)*x[1]**o+(0.744336375443)*x[1]+(0.115966573066)*x[2]**o+(-0.195838697299)*x[2]
-        ref[0]=(-0.392958184101)*x_ref[0]**o+(-0.529709692826)*x_ref[0]+(-0.834422900831)*x_ref[1]**o+(0.52562214773)*x_ref[1]+(-0.726762801989)*x_ref[2]**o+(-0.329225625652)*x_ref[2]
-        ref[1]=(-0.388486489727)*x_ref[0]**o+(0.62353995706)*x_ref[0]+(0.0198506797091)*x_ref[1]**o+(0.744336375443)*x_ref[1]+(0.115966573066)*x_ref[2]**o+(-0.195838697299)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.657915437562)*x[0]**o+(-0.545113889022)*x[0]+(0.531900702747)*x[1]**o+(0.593791195717)*x[1]
-        arg[0,1]=(0.051080053648)*x[0]**o+(-0.693135614033)*x[0]+(0.132124625293)*x[1]**o+(0.790120778986)*x[1]
-        arg[0,2]=(-0.474326324304)*x[0]**o+(0.844119715746)*x[0]+(-0.107139623866)*x[1]**o+(0.456623369855)*x[1]
-        arg[0,3]=(-0.582421376463)*x[0]**o+(0.972810074845)*x[0]+(0.875278994526)*x[1]**o+(-0.382656553829)*x[1]
-        arg[0,4]=(-0.904956623057)*x[0]**o+(0.701968065151)*x[0]+(-0.710231782855)*x[1]**o+(-0.123456684979)*x[1]
-        arg[1,0]=(0.361017539866)*x[0]**o+(0.865249575899)*x[0]+(0.529515655309)*x[1]**o+(0.161402780958)*x[1]
-        arg[1,1]=(0.813945406612)*x[0]**o+(0.801153720706)*x[0]+(-0.254227034266)*x[1]**o+(-0.422848409284)*x[1]
-        arg[1,2]=(0.56207473833)*x[0]**o+(-0.831638855484)*x[0]+(-0.584619648965)*x[1]**o+(0.453944553892)*x[1]
-        arg[1,3]=(0.25526821881)*x[0]**o+(-0.436135120045)*x[0]+(0.524842439137)*x[1]**o+(0.568007117728)*x[1]
-        arg[1,4]=(-0.0587551077421)*x[0]**o+(-0.434635762185)*x[0]+(-0.592094375986)*x[1]**o+(0.873123434395)*x[1]
-        arg[2,0]=(0.266819439236)*x[0]**o+(-0.45156140915)*x[0]+(0.436756372775)*x[1]**o+(0.12295128383)*x[1]
-        arg[2,1]=(0.347128677451)*x[0]**o+(-0.0983169467916)*x[0]+(-0.414573209624)*x[1]**o+(-0.171300108487)*x[1]
-        arg[2,2]=(-0.279695154296)*x[0]**o+(-0.911450144779)*x[0]+(0.5055340448)*x[1]**o+(-0.858058864152)*x[1]
-        arg[2,3]=(-0.53768906863)*x[0]**o+(-0.0626923004303)*x[0]+(0.72295545269)*x[1]**o+(-0.77070425804)*x[1]
-        arg[2,4]=(0.18215032008)*x[0]**o+(-0.965014882526)*x[0]+(0.596564813119)*x[1]**o+(0.0817024840554)*x[1]
-        arg[3,0]=(-0.572404596368)*x[0]**o+(0.488365635829)*x[0]+(0.145439800826)*x[1]**o+(-0.337589667899)*x[1]
-        arg[3,1]=(-0.628977426654)*x[0]**o+(0.22731945375)*x[0]+(0.989224773975)*x[1]**o+(0.0691553279499)*x[1]
-        arg[3,2]=(-0.43609079916)*x[0]**o+(0.966113801416)*x[0]+(-0.853136416278)*x[1]**o+(-0.0125151911906)*x[1]
-        arg[3,3]=(0.340159347855)*x[0]**o+(-0.254775013843)*x[0]+(0.795261224144)*x[1]**o+(-0.692255020659)*x[1]
-        arg[3,4]=(-0.153521724504)*x[0]**o+(-0.681779299881)*x[0]+(0.693860779041)*x[1]**o+(0.882012604794)*x[1]
-        ref[0,0]=(-0.657915437562)*x_ref[0]**o+(-0.545113889022)*x_ref[0]+(0.531900702747)*x_ref[1]**o+(0.593791195717)*x_ref[1]
-        ref[0,1]=(0.051080053648)*x_ref[0]**o+(-0.693135614033)*x_ref[0]+(0.132124625293)*x_ref[1]**o+(0.790120778986)*x_ref[1]
-        ref[0,2]=(-0.474326324304)*x_ref[0]**o+(0.844119715746)*x_ref[0]+(-0.107139623866)*x_ref[1]**o+(0.456623369855)*x_ref[1]
-        ref[0,3]=(-0.582421376463)*x_ref[0]**o+(0.972810074845)*x_ref[0]+(0.875278994526)*x_ref[1]**o+(-0.382656553829)*x_ref[1]
-        ref[0,4]=(-0.904956623057)*x_ref[0]**o+(0.701968065151)*x_ref[0]+(-0.710231782855)*x_ref[1]**o+(-0.123456684979)*x_ref[1]
-        ref[1,0]=(0.361017539866)*x_ref[0]**o+(0.865249575899)*x_ref[0]+(0.529515655309)*x_ref[1]**o+(0.161402780958)*x_ref[1]
-        ref[1,1]=(0.813945406612)*x_ref[0]**o+(0.801153720706)*x_ref[0]+(-0.254227034266)*x_ref[1]**o+(-0.422848409284)*x_ref[1]
-        ref[1,2]=(0.56207473833)*x_ref[0]**o+(-0.831638855484)*x_ref[0]+(-0.584619648965)*x_ref[1]**o+(0.453944553892)*x_ref[1]
-        ref[1,3]=(0.25526821881)*x_ref[0]**o+(-0.436135120045)*x_ref[0]+(0.524842439137)*x_ref[1]**o+(0.568007117728)*x_ref[1]
-        ref[1,4]=(-0.0587551077421)*x_ref[0]**o+(-0.434635762185)*x_ref[0]+(-0.592094375986)*x_ref[1]**o+(0.873123434395)*x_ref[1]
-        ref[2,0]=(0.266819439236)*x_ref[0]**o+(-0.45156140915)*x_ref[0]+(0.436756372775)*x_ref[1]**o+(0.12295128383)*x_ref[1]
-        ref[2,1]=(0.347128677451)*x_ref[0]**o+(-0.0983169467916)*x_ref[0]+(-0.414573209624)*x_ref[1]**o+(-0.171300108487)*x_ref[1]
-        ref[2,2]=(-0.279695154296)*x_ref[0]**o+(-0.911450144779)*x_ref[0]+(0.5055340448)*x_ref[1]**o+(-0.858058864152)*x_ref[1]
-        ref[2,3]=(-0.53768906863)*x_ref[0]**o+(-0.0626923004303)*x_ref[0]+(0.72295545269)*x_ref[1]**o+(-0.77070425804)*x_ref[1]
-        ref[2,4]=(0.18215032008)*x_ref[0]**o+(-0.965014882526)*x_ref[0]+(0.596564813119)*x_ref[1]**o+(0.0817024840554)*x_ref[1]
-        ref[3,0]=(-0.572404596368)*x_ref[0]**o+(0.488365635829)*x_ref[0]+(0.145439800826)*x_ref[1]**o+(-0.337589667899)*x_ref[1]
-        ref[3,1]=(-0.628977426654)*x_ref[0]**o+(0.22731945375)*x_ref[0]+(0.989224773975)*x_ref[1]**o+(0.0691553279499)*x_ref[1]
-        ref[3,2]=(-0.43609079916)*x_ref[0]**o+(0.966113801416)*x_ref[0]+(-0.853136416278)*x_ref[1]**o+(-0.0125151911906)*x_ref[1]
-        ref[3,3]=(0.340159347855)*x_ref[0]**o+(-0.254775013843)*x_ref[0]+(0.795261224144)*x_ref[1]**o+(-0.692255020659)*x_ref[1]
-        ref[3,4]=(-0.153521724504)*x_ref[0]**o+(-0.681779299881)*x_ref[0]+(0.693860779041)*x_ref[1]**o+(0.882012604794)*x_ref[1]
-      else:
-        arg[0,0]=(-0.0201751669244)*x[0]**o+(0.337967826628)*x[0]+(0.262482967798)*x[1]**o+(-0.192863458488)*x[1]+(-0.696822606165)*x[2]**o+(-0.476556518002)*x[2]
-        arg[0,1]=(-0.546277895941)*x[0]**o+(-0.118793125394)*x[0]+(0.987786322041)*x[1]**o+(-0.241472898602)*x[1]+(-0.454308453322)*x[2]**o+(-0.27057260464)*x[2]
-        arg[0,2]=(0.383631846628)*x[0]**o+(0.979909217026)*x[0]+(-0.0503694684178)*x[1]**o+(-0.748153155067)*x[1]+(-0.721832849635)*x[2]**o+(0.144937710994)*x[2]
-        arg[0,3]=(-0.540144273345)*x[0]**o+(-0.986853732479)*x[0]+(-0.14527387031)*x[1]**o+(0.329815126012)*x[1]+(0.566431907689)*x[2]**o+(-0.323179211167)*x[2]
-        arg[0,4]=(-0.448624394254)*x[0]**o+(-0.272742080619)*x[0]+(-0.451405020267)*x[1]**o+(0.173204890481)*x[1]+(-0.0122463571841)*x[2]**o+(-0.595932249794)*x[2]
-        arg[1,0]=(0.984160677776)*x[0]**o+(-0.243512460216)*x[0]+(0.82590496761)*x[1]**o+(-0.448270326787)*x[1]+(0.286008153265)*x[2]**o+(0.804229889769)*x[2]
-        arg[1,1]=(0.531762548093)*x[0]**o+(0.211455783615)*x[0]+(0.836058347792)*x[1]**o+(0.806904570574)*x[1]+(-0.052512287992)*x[2]**o+(0.998679219355)*x[2]
-        arg[1,2]=(0.462615968956)*x[0]**o+(0.960862689218)*x[0]+(-0.693932866844)*x[1]**o+(0.881110014782)*x[1]+(0.976329091354)*x[2]**o+(-0.647483316997)*x[2]
-        arg[1,3]=(-0.764181748932)*x[0]**o+(-0.962197871121)*x[0]+(-0.143747029438)*x[1]**o+(0.913962833322)*x[1]+(0.165013597835)*x[2]**o+(0.166877976184)*x[2]
-        arg[1,4]=(0.687688905493)*x[0]**o+(-0.152816071208)*x[0]+(-0.277974702822)*x[1]**o+(-0.389918839086)*x[1]+(0.229658530129)*x[2]**o+(-0.69924627348)*x[2]
-        arg[2,0]=(0.0598215047949)*x[0]**o+(0.592389000293)*x[0]+(0.00886573296364)*x[1]**o+(0.339086619934)*x[1]+(0.476600446349)*x[2]**o+(0.767524427684)*x[2]
-        arg[2,1]=(0.525936212445)*x[0]**o+(0.44607860423)*x[0]+(0.0397184541609)*x[1]**o+(-0.424118244789)*x[1]+(-0.273077104391)*x[2]**o+(0.435027185784)*x[2]
-        arg[2,2]=(0.672992314995)*x[0]**o+(0.993339100191)*x[0]+(0.488983819898)*x[1]**o+(0.568579529177)*x[1]+(-0.321282052211)*x[2]**o+(-0.268847753649)*x[2]
-        arg[2,3]=(-0.0536748741467)*x[0]**o+(-0.195658514433)*x[0]+(-0.931652264383)*x[1]**o+(-0.89957282695)*x[1]+(-0.811088135231)*x[2]**o+(0.0699177832759)*x[2]
-        arg[2,4]=(-0.707875141752)*x[0]**o+(-0.00297935832343)*x[0]+(-0.959580991547)*x[1]**o+(0.0787110832272)*x[1]+(-0.754646316678)*x[2]**o+(-0.432731727467)*x[2]
-        arg[3,0]=(0.728853463111)*x[0]**o+(-0.681375546727)*x[0]+(-0.283722278591)*x[1]**o+(0.950522890527)*x[1]+(0.608194817491)*x[2]**o+(0.571156129477)*x[2]
-        arg[3,1]=(-0.0208969501228)*x[0]**o+(0.572596028151)*x[0]+(0.811179009214)*x[1]**o+(0.519098352581)*x[1]+(0.154527510954)*x[2]**o+(-0.21413742337)*x[2]
-        arg[3,2]=(0.347209642455)*x[0]**o+(-0.114911324326)*x[0]+(-0.104561779357)*x[1]**o+(0.848703366841)*x[1]+(0.680312939858)*x[2]**o+(-0.680566404979)*x[2]
-        arg[3,3]=(0.342687985669)*x[0]**o+(0.443470953221)*x[0]+(-0.849668173915)*x[1]**o+(0.337689225078)*x[1]+(-0.35083505383)*x[2]**o+(-0.284627678739)*x[2]
-        arg[3,4]=(0.661690111131)*x[0]**o+(-0.0918926979359)*x[0]+(-0.587753600932)*x[1]**o+(-0.383115718043)*x[1]+(-0.0696588695623)*x[2]**o+(-0.799630628972)*x[2]
-        ref[0,0]=(-0.0201751669244)*x_ref[0]**o+(0.337967826628)*x_ref[0]+(0.262482967798)*x_ref[1]**o+(-0.192863458488)*x_ref[1]+(-0.696822606165)*x_ref[2]**o+(-0.476556518002)*x_ref[2]
-        ref[0,1]=(-0.546277895941)*x_ref[0]**o+(-0.118793125394)*x_ref[0]+(0.987786322041)*x_ref[1]**o+(-0.241472898602)*x_ref[1]+(-0.454308453322)*x_ref[2]**o+(-0.27057260464)*x_ref[2]
-        ref[0,2]=(0.383631846628)*x_ref[0]**o+(0.979909217026)*x_ref[0]+(-0.0503694684178)*x_ref[1]**o+(-0.748153155067)*x_ref[1]+(-0.721832849635)*x_ref[2]**o+(0.144937710994)*x_ref[2]
-        ref[0,3]=(-0.540144273345)*x_ref[0]**o+(-0.986853732479)*x_ref[0]+(-0.14527387031)*x_ref[1]**o+(0.329815126012)*x_ref[1]+(0.566431907689)*x_ref[2]**o+(-0.323179211167)*x_ref[2]
-        ref[0,4]=(-0.448624394254)*x_ref[0]**o+(-0.272742080619)*x_ref[0]+(-0.451405020267)*x_ref[1]**o+(0.173204890481)*x_ref[1]+(-0.0122463571841)*x_ref[2]**o+(-0.595932249794)*x_ref[2]
-        ref[1,0]=(0.984160677776)*x_ref[0]**o+(-0.243512460216)*x_ref[0]+(0.82590496761)*x_ref[1]**o+(-0.448270326787)*x_ref[1]+(0.286008153265)*x_ref[2]**o+(0.804229889769)*x_ref[2]
-        ref[1,1]=(0.531762548093)*x_ref[0]**o+(0.211455783615)*x_ref[0]+(0.836058347792)*x_ref[1]**o+(0.806904570574)*x_ref[1]+(-0.052512287992)*x_ref[2]**o+(0.998679219355)*x_ref[2]
-        ref[1,2]=(0.462615968956)*x_ref[0]**o+(0.960862689218)*x_ref[0]+(-0.693932866844)*x_ref[1]**o+(0.881110014782)*x_ref[1]+(0.976329091354)*x_ref[2]**o+(-0.647483316997)*x_ref[2]
-        ref[1,3]=(-0.764181748932)*x_ref[0]**o+(-0.962197871121)*x_ref[0]+(-0.143747029438)*x_ref[1]**o+(0.913962833322)*x_ref[1]+(0.165013597835)*x_ref[2]**o+(0.166877976184)*x_ref[2]
-        ref[1,4]=(0.687688905493)*x_ref[0]**o+(-0.152816071208)*x_ref[0]+(-0.277974702822)*x_ref[1]**o+(-0.389918839086)*x_ref[1]+(0.229658530129)*x_ref[2]**o+(-0.69924627348)*x_ref[2]
-        ref[2,0]=(0.0598215047949)*x_ref[0]**o+(0.592389000293)*x_ref[0]+(0.00886573296364)*x_ref[1]**o+(0.339086619934)*x_ref[1]+(0.476600446349)*x_ref[2]**o+(0.767524427684)*x_ref[2]
-        ref[2,1]=(0.525936212445)*x_ref[0]**o+(0.44607860423)*x_ref[0]+(0.0397184541609)*x_ref[1]**o+(-0.424118244789)*x_ref[1]+(-0.273077104391)*x_ref[2]**o+(0.435027185784)*x_ref[2]
-        ref[2,2]=(0.672992314995)*x_ref[0]**o+(0.993339100191)*x_ref[0]+(0.488983819898)*x_ref[1]**o+(0.568579529177)*x_ref[1]+(-0.321282052211)*x_ref[2]**o+(-0.268847753649)*x_ref[2]
-        ref[2,3]=(-0.0536748741467)*x_ref[0]**o+(-0.195658514433)*x_ref[0]+(-0.931652264383)*x_ref[1]**o+(-0.89957282695)*x_ref[1]+(-0.811088135231)*x_ref[2]**o+(0.0699177832759)*x_ref[2]
-        ref[2,4]=(-0.707875141752)*x_ref[0]**o+(-0.00297935832343)*x_ref[0]+(-0.959580991547)*x_ref[1]**o+(0.0787110832272)*x_ref[1]+(-0.754646316678)*x_ref[2]**o+(-0.432731727467)*x_ref[2]
-        ref[3,0]=(0.728853463111)*x_ref[0]**o+(-0.681375546727)*x_ref[0]+(-0.283722278591)*x_ref[1]**o+(0.950522890527)*x_ref[1]+(0.608194817491)*x_ref[2]**o+(0.571156129477)*x_ref[2]
-        ref[3,1]=(-0.0208969501228)*x_ref[0]**o+(0.572596028151)*x_ref[0]+(0.811179009214)*x_ref[1]**o+(0.519098352581)*x_ref[1]+(0.154527510954)*x_ref[2]**o+(-0.21413742337)*x_ref[2]
-        ref[3,2]=(0.347209642455)*x_ref[0]**o+(-0.114911324326)*x_ref[0]+(-0.104561779357)*x_ref[1]**o+(0.848703366841)*x_ref[1]+(0.680312939858)*x_ref[2]**o+(-0.680566404979)*x_ref[2]
-        ref[3,3]=(0.342687985669)*x_ref[0]**o+(0.443470953221)*x_ref[0]+(-0.849668173915)*x_ref[1]**o+(0.337689225078)*x_ref[1]+(-0.35083505383)*x_ref[2]**o+(-0.284627678739)*x_ref[2]
-        ref[3,4]=(0.661690111131)*x_ref[0]**o+(-0.0918926979359)*x_ref[0]+(-0.587753600932)*x_ref[1]**o+(-0.383115718043)*x_ref[1]+(-0.0696588695623)*x_ref[2]**o+(-0.799630628972)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.906705618142)*x[0]**o+(0.458982439103)*x[0]+(0.556464353903)*x[1]**o+(0.733236686234)*x[1]
-        arg[0,0,1]=(-0.192889954523)*x[0]**o+(-0.814332539133)*x[0]+(0.446164214282)*x[1]**o+(0.032291315446)*x[1]
-        arg[0,1,0]=(0.757081929199)*x[0]**o+(-0.3938524931)*x[0]+(-0.458060132115)*x[1]**o+(0.471831491182)*x[1]
-        arg[0,1,1]=(0.459868785407)*x[0]**o+(0.513707183316)*x[0]+(-0.9682413377)*x[1]**o+(-0.49496265187)*x[1]
-        arg[1,0,0]=(0.546655212697)*x[0]**o+(-0.296125788768)*x[0]+(0.570033305927)*x[1]**o+(-0.818919094317)*x[1]
-        arg[1,0,1]=(-0.954422252892)*x[0]**o+(-0.925035286684)*x[0]+(0.171311127546)*x[1]**o+(-0.584606597796)*x[1]
-        arg[1,1,0]=(-0.203956024883)*x[0]**o+(-0.933117428128)*x[0]+(-0.745101180472)*x[1]**o+(0.0390208509919)*x[1]
-        arg[1,1,1]=(-0.67467593628)*x[0]**o+(0.42281003355)*x[0]+(-0.495401176467)*x[1]**o+(0.993257306842)*x[1]
-        arg[2,0,0]=(-0.204011890956)*x[0]**o+(0.730452092671)*x[0]+(-0.0486718200506)*x[1]**o+(0.691928726795)*x[1]
-        arg[2,0,1]=(0.381571380631)*x[0]**o+(0.504896621541)*x[0]+(-0.229805983176)*x[1]**o+(0.281401365705)*x[1]
-        arg[2,1,0]=(0.578852751326)*x[0]**o+(-0.38588684985)*x[0]+(-0.630908284751)*x[1]**o+(0.237972319424)*x[1]
-        arg[2,1,1]=(-0.928366568501)*x[0]**o+(0.254484026833)*x[0]+(0.903931940538)*x[1]**o+(-0.370818194785)*x[1]
-        arg[3,0,0]=(-0.216012465475)*x[0]**o+(-0.938274177001)*x[0]+(0.0674408710328)*x[1]**o+(-0.731594784098)*x[1]
-        arg[3,0,1]=(-0.156790905207)*x[0]**o+(0.284403081253)*x[0]+(0.3754228052)*x[1]**o+(-0.772758808958)*x[1]
-        arg[3,1,0]=(0.89987768188)*x[0]**o+(0.0177886564195)*x[0]+(0.102329016274)*x[1]**o+(0.474039949682)*x[1]
-        arg[3,1,1]=(0.0416243959618)*x[0]**o+(0.739593496294)*x[0]+(-0.0215969068381)*x[1]**o+(0.203954403681)*x[1]
-        arg[4,0,0]=(-0.479380091881)*x[0]**o+(0.973630227471)*x[0]+(0.372617682727)*x[1]**o+(0.721993565094)*x[1]
-        arg[4,0,1]=(0.360211306746)*x[0]**o+(0.260993313325)*x[0]+(0.252635752916)*x[1]**o+(0.534875843061)*x[1]
-        arg[4,1,0]=(-0.609695114069)*x[0]**o+(0.283865161572)*x[0]+(-0.607441168016)*x[1]**o+(-0.838279309054)*x[1]
-        arg[4,1,1]=(0.984921561958)*x[0]**o+(-0.352255390774)*x[0]+(-0.770706841576)*x[1]**o+(0.456415771191)*x[1]
-        arg[5,0,0]=(0.903410389973)*x[0]**o+(0.609651342058)*x[0]+(-0.0890705788805)*x[1]**o+(0.613493629434)*x[1]
-        arg[5,0,1]=(-0.977979577058)*x[0]**o+(-0.121665631763)*x[0]+(0.466897174395)*x[1]**o+(-0.438819940752)*x[1]
-        arg[5,1,0]=(-0.537313389905)*x[0]**o+(-0.0401503571218)*x[0]+(-0.454563705252)*x[1]**o+(-0.728276295145)*x[1]
-        arg[5,1,1]=(0.858855332454)*x[0]**o+(0.378938106473)*x[0]+(0.908957690039)*x[1]**o+(0.989040980713)*x[1]
-        ref[0,0,0]=(-0.906705618142)*x_ref[0]**o+(0.458982439103)*x_ref[0]+(0.556464353903)*x_ref[1]**o+(0.733236686234)*x_ref[1]
-        ref[0,0,1]=(-0.192889954523)*x_ref[0]**o+(-0.814332539133)*x_ref[0]+(0.446164214282)*x_ref[1]**o+(0.032291315446)*x_ref[1]
-        ref[0,1,0]=(0.757081929199)*x_ref[0]**o+(-0.3938524931)*x_ref[0]+(-0.458060132115)*x_ref[1]**o+(0.471831491182)*x_ref[1]
-        ref[0,1,1]=(0.459868785407)*x_ref[0]**o+(0.513707183316)*x_ref[0]+(-0.9682413377)*x_ref[1]**o+(-0.49496265187)*x_ref[1]
-        ref[1,0,0]=(0.546655212697)*x_ref[0]**o+(-0.296125788768)*x_ref[0]+(0.570033305927)*x_ref[1]**o+(-0.818919094317)*x_ref[1]
-        ref[1,0,1]=(-0.954422252892)*x_ref[0]**o+(-0.925035286684)*x_ref[0]+(0.171311127546)*x_ref[1]**o+(-0.584606597796)*x_ref[1]
-        ref[1,1,0]=(-0.203956024883)*x_ref[0]**o+(-0.933117428128)*x_ref[0]+(-0.745101180472)*x_ref[1]**o+(0.0390208509919)*x_ref[1]
-        ref[1,1,1]=(-0.67467593628)*x_ref[0]**o+(0.42281003355)*x_ref[0]+(-0.495401176467)*x_ref[1]**o+(0.993257306842)*x_ref[1]
-        ref[2,0,0]=(-0.204011890956)*x_ref[0]**o+(0.730452092671)*x_ref[0]+(-0.0486718200506)*x_ref[1]**o+(0.691928726795)*x_ref[1]
-        ref[2,0,1]=(0.381571380631)*x_ref[0]**o+(0.504896621541)*x_ref[0]+(-0.229805983176)*x_ref[1]**o+(0.281401365705)*x_ref[1]
-        ref[2,1,0]=(0.578852751326)*x_ref[0]**o+(-0.38588684985)*x_ref[0]+(-0.630908284751)*x_ref[1]**o+(0.237972319424)*x_ref[1]
-        ref[2,1,1]=(-0.928366568501)*x_ref[0]**o+(0.254484026833)*x_ref[0]+(0.903931940538)*x_ref[1]**o+(-0.370818194785)*x_ref[1]
-        ref[3,0,0]=(-0.216012465475)*x_ref[0]**o+(-0.938274177001)*x_ref[0]+(0.0674408710328)*x_ref[1]**o+(-0.731594784098)*x_ref[1]
-        ref[3,0,1]=(-0.156790905207)*x_ref[0]**o+(0.284403081253)*x_ref[0]+(0.3754228052)*x_ref[1]**o+(-0.772758808958)*x_ref[1]
-        ref[3,1,0]=(0.89987768188)*x_ref[0]**o+(0.0177886564195)*x_ref[0]+(0.102329016274)*x_ref[1]**o+(0.474039949682)*x_ref[1]
-        ref[3,1,1]=(0.0416243959618)*x_ref[0]**o+(0.739593496294)*x_ref[0]+(-0.0215969068381)*x_ref[1]**o+(0.203954403681)*x_ref[1]
-        ref[4,0,0]=(-0.479380091881)*x_ref[0]**o+(0.973630227471)*x_ref[0]+(0.372617682727)*x_ref[1]**o+(0.721993565094)*x_ref[1]
-        ref[4,0,1]=(0.360211306746)*x_ref[0]**o+(0.260993313325)*x_ref[0]+(0.252635752916)*x_ref[1]**o+(0.534875843061)*x_ref[1]
-        ref[4,1,0]=(-0.609695114069)*x_ref[0]**o+(0.283865161572)*x_ref[0]+(-0.607441168016)*x_ref[1]**o+(-0.838279309054)*x_ref[1]
-        ref[4,1,1]=(0.984921561958)*x_ref[0]**o+(-0.352255390774)*x_ref[0]+(-0.770706841576)*x_ref[1]**o+(0.456415771191)*x_ref[1]
-        ref[5,0,0]=(0.903410389973)*x_ref[0]**o+(0.609651342058)*x_ref[0]+(-0.0890705788805)*x_ref[1]**o+(0.613493629434)*x_ref[1]
-        ref[5,0,1]=(-0.977979577058)*x_ref[0]**o+(-0.121665631763)*x_ref[0]+(0.466897174395)*x_ref[1]**o+(-0.438819940752)*x_ref[1]
-        ref[5,1,0]=(-0.537313389905)*x_ref[0]**o+(-0.0401503571218)*x_ref[0]+(-0.454563705252)*x_ref[1]**o+(-0.728276295145)*x_ref[1]
-        ref[5,1,1]=(0.858855332454)*x_ref[0]**o+(0.378938106473)*x_ref[0]+(0.908957690039)*x_ref[1]**o+(0.989040980713)*x_ref[1]
-      else:
-        arg[0,0,0]=(-0.550852990025)*x[0]**o+(0.578705971531)*x[0]+(0.9533401901)*x[1]**o+(0.233181910221)*x[1]+(-0.143544272432)*x[2]**o+(-0.986513253736)*x[2]
-        arg[0,0,1]=(-0.326417636931)*x[0]**o+(0.0910236969351)*x[0]+(-0.8240642668)*x[1]**o+(-0.242359389714)*x[1]+(0.266813299647)*x[2]**o+(-0.364956839435)*x[2]
-        arg[0,1,0]=(-0.777107068999)*x[0]**o+(0.201120303703)*x[0]+(-0.684906707463)*x[1]**o+(-0.9620762843)*x[1]+(-0.314789913974)*x[2]**o+(-0.70682592319)*x[2]
-        arg[0,1,1]=(-0.980292769796)*x[0]**o+(-0.827763529178)*x[0]+(0.256770279946)*x[1]**o+(0.619665292369)*x[1]+(0.014752087873)*x[2]**o+(-0.810044916486)*x[2]
-        arg[1,0,0]=(-0.51164541516)*x[0]**o+(-0.429646605692)*x[0]+(-0.844516540906)*x[1]**o+(-0.0334629941654)*x[1]+(0.942164301071)*x[2]**o+(0.129008643344)*x[2]
-        arg[1,0,1]=(-0.545329352463)*x[0]**o+(-0.0601985885543)*x[0]+(0.959752895562)*x[1]**o+(-0.617790988468)*x[1]+(-0.352323774737)*x[2]**o+(0.0854549755648)*x[2]
-        arg[1,1,0]=(0.163270290732)*x[0]**o+(0.715418689409)*x[0]+(-0.892736094727)*x[1]**o+(-0.250085969902)*x[1]+(-0.323686607391)*x[2]**o+(-0.808822044566)*x[2]
-        arg[1,1,1]=(-0.582858228848)*x[0]**o+(0.245356494646)*x[0]+(0.253867860186)*x[1]**o+(0.294533212339)*x[1]+(0.802766375942)*x[2]**o+(-0.142246487978)*x[2]
-        arg[2,0,0]=(0.559682931749)*x[0]**o+(0.349781768104)*x[0]+(-0.903942828138)*x[1]**o+(0.285790428402)*x[1]+(0.334765408827)*x[2]**o+(-0.319553167552)*x[2]
-        arg[2,0,1]=(-0.33958138616)*x[0]**o+(-0.476356251551)*x[0]+(0.222685919591)*x[1]**o+(0.947677379274)*x[1]+(-0.238198083505)*x[2]**o+(-0.158835521934)*x[2]
-        arg[2,1,0]=(0.233005925554)*x[0]**o+(-0.0885827512025)*x[0]+(0.99298235997)*x[1]**o+(-0.972864413346)*x[1]+(-0.328337965331)*x[2]**o+(0.548449226427)*x[2]
-        arg[2,1,1]=(-0.682434615287)*x[0]**o+(-0.681560497743)*x[0]+(-0.0427998840708)*x[1]**o+(-0.640532507401)*x[1]+(0.0600572641903)*x[2]**o+(0.580127097835)*x[2]
-        arg[3,0,0]=(0.627556962303)*x[0]**o+(-0.2282646452)*x[0]+(0.201159933134)*x[1]**o+(-0.0874921144181)*x[1]+(0.487026890349)*x[2]**o+(-0.044256665504)*x[2]
-        arg[3,0,1]=(-0.202969525043)*x[0]**o+(0.0445621391034)*x[0]+(-0.763479658456)*x[1]**o+(-0.600818445386)*x[1]+(-0.442800171339)*x[2]**o+(0.0422443400421)*x[2]
-        arg[3,1,0]=(-0.422348404642)*x[0]**o+(0.723277196982)*x[0]+(0.882658191301)*x[1]**o+(-0.415218341669)*x[1]+(0.834911332561)*x[2]**o+(-0.843638850779)*x[2]
-        arg[3,1,1]=(-0.685037113836)*x[0]**o+(0.119526696821)*x[0]+(0.732784440424)*x[1]**o+(0.156993935952)*x[1]+(-0.565837827825)*x[2]**o+(0.667635603478)*x[2]
-        arg[4,0,0]=(-0.18210082527)*x[0]**o+(-0.00639006601355)*x[0]+(0.633771301081)*x[1]**o+(0.765450011643)*x[1]+(-0.323701472535)*x[2]**o+(0.841246809469)*x[2]
-        arg[4,0,1]=(0.345847635107)*x[0]**o+(0.910917657816)*x[0]+(0.329667803527)*x[1]**o+(-0.0638797846725)*x[1]+(-0.705758696202)*x[2]**o+(0.39567870447)*x[2]
-        arg[4,1,0]=(0.700805557734)*x[0]**o+(0.215376719066)*x[0]+(0.057212023986)*x[1]**o+(-0.601972647211)*x[1]+(-0.0163323501628)*x[2]**o+(-0.182314452762)*x[2]
-        arg[4,1,1]=(-0.25633784052)*x[0]**o+(-0.36128209808)*x[0]+(-0.580660119759)*x[1]**o+(-0.718361413439)*x[1]+(0.294752937469)*x[2]**o+(0.479425008353)*x[2]
-        arg[5,0,0]=(0.0250768411622)*x[0]**o+(-0.954437161073)*x[0]+(0.314623130846)*x[1]**o+(-0.915911802082)*x[1]+(-0.293481557155)*x[2]**o+(0.193040417512)*x[2]
-        arg[5,0,1]=(-0.260552760825)*x[0]**o+(-0.993318746791)*x[0]+(-0.0888187740235)*x[1]**o+(0.228899511722)*x[1]+(0.667467747688)*x[2]**o+(0.210051895803)*x[2]
-        arg[5,1,0]=(-0.925551425372)*x[0]**o+(-0.051063099903)*x[0]+(0.0607054862843)*x[1]**o+(0.778043999849)*x[1]+(-0.393429559505)*x[2]**o+(0.235480458425)*x[2]
-        arg[5,1,1]=(0.00188621198193)*x[0]**o+(-0.529444982511)*x[0]+(0.766032106394)*x[1]**o+(-0.554844276584)*x[1]+(0.793956883291)*x[2]**o+(0.221253426455)*x[2]
-        ref[0,0,0]=(-0.550852990025)*x_ref[0]**o+(0.578705971531)*x_ref[0]+(0.9533401901)*x_ref[1]**o+(0.233181910221)*x_ref[1]+(-0.143544272432)*x_ref[2]**o+(-0.986513253736)*x_ref[2]
-        ref[0,0,1]=(-0.326417636931)*x_ref[0]**o+(0.0910236969351)*x_ref[0]+(-0.8240642668)*x_ref[1]**o+(-0.242359389714)*x_ref[1]+(0.266813299647)*x_ref[2]**o+(-0.364956839435)*x_ref[2]
-        ref[0,1,0]=(-0.777107068999)*x_ref[0]**o+(0.201120303703)*x_ref[0]+(-0.684906707463)*x_ref[1]**o+(-0.9620762843)*x_ref[1]+(-0.314789913974)*x_ref[2]**o+(-0.70682592319)*x_ref[2]
-        ref[0,1,1]=(-0.980292769796)*x_ref[0]**o+(-0.827763529178)*x_ref[0]+(0.256770279946)*x_ref[1]**o+(0.619665292369)*x_ref[1]+(0.014752087873)*x_ref[2]**o+(-0.810044916486)*x_ref[2]
-        ref[1,0,0]=(-0.51164541516)*x_ref[0]**o+(-0.429646605692)*x_ref[0]+(-0.844516540906)*x_ref[1]**o+(-0.0334629941654)*x_ref[1]+(0.942164301071)*x_ref[2]**o+(0.129008643344)*x_ref[2]
-        ref[1,0,1]=(-0.545329352463)*x_ref[0]**o+(-0.0601985885543)*x_ref[0]+(0.959752895562)*x_ref[1]**o+(-0.617790988468)*x_ref[1]+(-0.352323774737)*x_ref[2]**o+(0.0854549755648)*x_ref[2]
-        ref[1,1,0]=(0.163270290732)*x_ref[0]**o+(0.715418689409)*x_ref[0]+(-0.892736094727)*x_ref[1]**o+(-0.250085969902)*x_ref[1]+(-0.323686607391)*x_ref[2]**o+(-0.808822044566)*x_ref[2]
-        ref[1,1,1]=(-0.582858228848)*x_ref[0]**o+(0.245356494646)*x_ref[0]+(0.253867860186)*x_ref[1]**o+(0.294533212339)*x_ref[1]+(0.802766375942)*x_ref[2]**o+(-0.142246487978)*x_ref[2]
-        ref[2,0,0]=(0.559682931749)*x_ref[0]**o+(0.349781768104)*x_ref[0]+(-0.903942828138)*x_ref[1]**o+(0.285790428402)*x_ref[1]+(0.334765408827)*x_ref[2]**o+(-0.319553167552)*x_ref[2]
-        ref[2,0,1]=(-0.33958138616)*x_ref[0]**o+(-0.476356251551)*x_ref[0]+(0.222685919591)*x_ref[1]**o+(0.947677379274)*x_ref[1]+(-0.238198083505)*x_ref[2]**o+(-0.158835521934)*x_ref[2]
-        ref[2,1,0]=(0.233005925554)*x_ref[0]**o+(-0.0885827512025)*x_ref[0]+(0.99298235997)*x_ref[1]**o+(-0.972864413346)*x_ref[1]+(-0.328337965331)*x_ref[2]**o+(0.548449226427)*x_ref[2]
-        ref[2,1,1]=(-0.682434615287)*x_ref[0]**o+(-0.681560497743)*x_ref[0]+(-0.0427998840708)*x_ref[1]**o+(-0.640532507401)*x_ref[1]+(0.0600572641903)*x_ref[2]**o+(0.580127097835)*x_ref[2]
-        ref[3,0,0]=(0.627556962303)*x_ref[0]**o+(-0.2282646452)*x_ref[0]+(0.201159933134)*x_ref[1]**o+(-0.0874921144181)*x_ref[1]+(0.487026890349)*x_ref[2]**o+(-0.044256665504)*x_ref[2]
-        ref[3,0,1]=(-0.202969525043)*x_ref[0]**o+(0.0445621391034)*x_ref[0]+(-0.763479658456)*x_ref[1]**o+(-0.600818445386)*x_ref[1]+(-0.442800171339)*x_ref[2]**o+(0.0422443400421)*x_ref[2]
-        ref[3,1,0]=(-0.422348404642)*x_ref[0]**o+(0.723277196982)*x_ref[0]+(0.882658191301)*x_ref[1]**o+(-0.415218341669)*x_ref[1]+(0.834911332561)*x_ref[2]**o+(-0.843638850779)*x_ref[2]
-        ref[3,1,1]=(-0.685037113836)*x_ref[0]**o+(0.119526696821)*x_ref[0]+(0.732784440424)*x_ref[1]**o+(0.156993935952)*x_ref[1]+(-0.565837827825)*x_ref[2]**o+(0.667635603478)*x_ref[2]
-        ref[4,0,0]=(-0.18210082527)*x_ref[0]**o+(-0.00639006601355)*x_ref[0]+(0.633771301081)*x_ref[1]**o+(0.765450011643)*x_ref[1]+(-0.323701472535)*x_ref[2]**o+(0.841246809469)*x_ref[2]
-        ref[4,0,1]=(0.345847635107)*x_ref[0]**o+(0.910917657816)*x_ref[0]+(0.329667803527)*x_ref[1]**o+(-0.0638797846725)*x_ref[1]+(-0.705758696202)*x_ref[2]**o+(0.39567870447)*x_ref[2]
-        ref[4,1,0]=(0.700805557734)*x_ref[0]**o+(0.215376719066)*x_ref[0]+(0.057212023986)*x_ref[1]**o+(-0.601972647211)*x_ref[1]+(-0.0163323501628)*x_ref[2]**o+(-0.182314452762)*x_ref[2]
-        ref[4,1,1]=(-0.25633784052)*x_ref[0]**o+(-0.36128209808)*x_ref[0]+(-0.580660119759)*x_ref[1]**o+(-0.718361413439)*x_ref[1]+(0.294752937469)*x_ref[2]**o+(0.479425008353)*x_ref[2]
-        ref[5,0,0]=(0.0250768411622)*x_ref[0]**o+(-0.954437161073)*x_ref[0]+(0.314623130846)*x_ref[1]**o+(-0.915911802082)*x_ref[1]+(-0.293481557155)*x_ref[2]**o+(0.193040417512)*x_ref[2]
-        ref[5,0,1]=(-0.260552760825)*x_ref[0]**o+(-0.993318746791)*x_ref[0]+(-0.0888187740235)*x_ref[1]**o+(0.228899511722)*x_ref[1]+(0.667467747688)*x_ref[2]**o+(0.210051895803)*x_ref[2]
-        ref[5,1,0]=(-0.925551425372)*x_ref[0]**o+(-0.051063099903)*x_ref[0]+(0.0607054862843)*x_ref[1]**o+(0.778043999849)*x_ref[1]+(-0.393429559505)*x_ref[2]**o+(0.235480458425)*x_ref[2]
-        ref[5,1,1]=(0.00188621198193)*x_ref[0]**o+(-0.529444982511)*x_ref[0]+(0.766032106394)*x_ref[1]**o+(-0.554844276584)*x_ref[1]+(0.793956883291)*x_ref[2]**o+(0.221253426455)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactZero onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactZero(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(0.358768976574)*x[0]**o+(-0.231637053165)*x[0]+(0.798891506345)*x[1]**o+(0.292325388353)*x[1]
-        arg[0,0,0,1]=(0.53301689922)*x[0]**o+(-0.761786870664)*x[0]+(0.284067900826)*x[1]**o+(-0.688662082205)*x[1]
-        arg[0,0,1,0]=(-0.721988036113)*x[0]**o+(-0.743892757815)*x[0]+(-0.796787022375)*x[1]**o+(-0.499468412523)*x[1]
-        arg[0,0,1,1]=(0.0710691488306)*x[0]**o+(0.0210385141456)*x[0]+(-0.709342417683)*x[1]**o+(0.901794071115)*x[1]
-        arg[0,0,2,0]=(-0.800537263339)*x[0]**o+(0.583114786539)*x[0]+(0.422752622522)*x[1]**o+(-0.0954981460748)*x[1]
-        arg[0,0,2,1]=(-0.0805357065445)*x[0]**o+(0.476377895547)*x[0]+(0.242203912566)*x[1]**o+(-0.479971540043)*x[1]
-        arg[0,1,0,0]=(-0.476356823162)*x[0]**o+(-0.438853622252)*x[0]+(-0.937228141746)*x[1]**o+(0.366496742588)*x[1]
-        arg[0,1,0,1]=(-0.496918253956)*x[0]**o+(-0.0227549061268)*x[0]+(0.830195584768)*x[1]**o+(-0.114624902423)*x[1]
-        arg[0,1,1,0]=(0.431291036997)*x[0]**o+(0.807713720258)*x[0]+(0.730057543333)*x[1]**o+(0.635171725232)*x[1]
-        arg[0,1,1,1]=(0.784425995411)*x[0]**o+(-0.397510494899)*x[0]+(-0.579911740115)*x[1]**o+(0.130426014607)*x[1]
-        arg[0,1,2,0]=(0.473613650641)*x[0]**o+(-0.155617741177)*x[0]+(0.873237852103)*x[1]**o+(-0.749395152414)*x[1]
-        arg[0,1,2,1]=(0.367649559431)*x[0]**o+(0.830181309644)*x[0]+(0.87726968147)*x[1]**o+(-0.450304793682)*x[1]
-        arg[0,2,0,0]=(-0.700522876654)*x[0]**o+(-0.998187126003)*x[0]+(0.732491610173)*x[1]**o+(0.648679267)*x[1]
-        arg[0,2,0,1]=(0.499746141285)*x[0]**o+(-0.730090975806)*x[0]+(-0.525566438654)*x[1]**o+(0.212469850421)*x[1]
-        arg[0,2,1,0]=(-0.847752916298)*x[0]**o+(0.43510472619)*x[0]+(0.815305936548)*x[1]**o+(-0.143802676552)*x[1]
-        arg[0,2,1,1]=(-0.453572376958)*x[0]**o+(-0.913023531929)*x[0]+(0.743328127665)*x[1]**o+(0.152586122591)*x[1]
-        arg[0,2,2,0]=(0.526939334508)*x[0]**o+(0.247268722057)*x[0]+(-0.176432621481)*x[1]**o+(-0.510110202196)*x[1]
-        arg[0,2,2,1]=(0.139685732003)*x[0]**o+(0.278304455867)*x[0]+(0.517953769616)*x[1]**o+(-0.272384261701)*x[1]
-        arg[0,3,0,0]=(-0.38867907688)*x[0]**o+(-0.73043975055)*x[0]+(-0.14293243901)*x[1]**o+(0.0601042854043)*x[1]
-        arg[0,3,0,1]=(-0.163055949188)*x[0]**o+(-0.035877062482)*x[0]+(0.0396615423106)*x[1]**o+(-0.870062303275)*x[1]
-        arg[0,3,1,0]=(0.283839779914)*x[0]**o+(-0.519316925197)*x[0]+(-0.437401973959)*x[1]**o+(-0.823707232663)*x[1]
-        arg[0,3,1,1]=(0.700305425892)*x[0]**o+(0.0299761521094)*x[0]+(-0.993032151025)*x[1]**o+(0.633293413221)*x[1]
-        arg[0,3,2,0]=(-0.745357256365)*x[0]**o+(-0.451553456961)*x[0]+(0.05789646302)*x[1]**o+(-0.755901155251)*x[1]
-        arg[0,3,2,1]=(-0.57330840403)*x[0]**o+(-0.589361483751)*x[0]+(-0.038677123513)*x[1]**o+(0.417332032168)*x[1]
-        arg[0,4,0,0]=(0.759655161531)*x[0]**o+(0.737483461328)*x[0]+(0.573158629937)*x[1]**o+(-0.454191109106)*x[1]
-        arg[0,4,0,1]=(-0.232982406645)*x[0]**o+(-0.926030038179)*x[0]+(-0.504256834465)*x[1]**o+(-0.107703527058)*x[1]
-        arg[0,4,1,0]=(0.898411697016)*x[0]**o+(0.642045536742)*x[0]+(-0.953059791895)*x[1]**o+(-0.67501710093)*x[1]
-        arg[0,4,1,1]=(0.300380574165)*x[0]**o+(0.204591960115)*x[0]+(-0.308849697562)*x[1]**o+(-0.489495887357)*x[1]
-        arg[0,4,2,0]=(-0.814560286716)*x[0]**o+(0.154235599953)*x[0]+(0.279329273498)*x[1]**o+(-0.674063978926)*x[1]
-        arg[0,4,2,1]=(-0.718018870365)*x[0]**o+(-0.735982858424)*x[0]+(-0.0132197132926)*x[1]**o+(0.398939587543)*x[1]
-        arg[1,0,0,0]=(0.0559995351725)*x[0]**o+(-0.164549619892)*x[0]+(-0.794242529408)*x[1]**o+(0.0927822314785)*x[1]
-        arg[1,0,0,1]=(-0.894238542341)*x[0]**o+(0.378559247473)*x[0]+(-0.183957272639)*x[1]**o+(0.486358968942)*x[1]
-        arg[1,0,1,0]=(0.931288801001)*x[0]**o+(0.223815769968)*x[0]+(-0.719591906328)*x[1]**o+(-0.743644741105)*x[1]
-        arg[1,0,1,1]=(0.156646029123)*x[0]**o+(0.306942879419)*x[0]+(0.747006830674)*x[1]**o+(-0.876534912274)*x[1]
-        arg[1,0,2,0]=(-0.496819081999)*x[0]**o+(-0.939227402425)*x[0]+(0.0566331712182)*x[1]**o+(0.565724364661)*x[1]
-        arg[1,0,2,1]=(0.903706429954)*x[0]**o+(0.667947320307)*x[0]+(0.97140855373)*x[1]**o+(0.924095235752)*x[1]
-        arg[1,1,0,0]=(0.526180197299)*x[0]**o+(0.435493351674)*x[0]+(0.400107077848)*x[1]**o+(-0.704760833758)*x[1]
-        arg[1,1,0,1]=(0.0723740015004)*x[0]**o+(-0.405859051371)*x[0]+(0.200787757511)*x[1]**o+(0.41819184563)*x[1]
-        arg[1,1,1,0]=(-0.0320951655627)*x[0]**o+(0.235068445821)*x[0]+(0.450383349599)*x[1]**o+(-0.801487424765)*x[1]
-        arg[1,1,1,1]=(-0.52478892744)*x[0]**o+(-0.449111297125)*x[0]+(0.731062182014)*x[1]**o+(0.533619608577)*x[1]
-        arg[1,1,2,0]=(0.0889794057057)*x[0]**o+(-0.971856981571)*x[0]+(0.662216408922)*x[1]**o+(0.164089024468)*x[1]
-        arg[1,1,2,1]=(-0.196374963647)*x[0]**o+(-0.739360211802)*x[0]+(0.916611650753)*x[1]**o+(-0.260102318115)*x[1]
-        arg[1,2,0,0]=(0.627763572103)*x[0]**o+(-0.893900847319)*x[0]+(0.907548446417)*x[1]**o+(0.0687906203663)*x[1]
-        arg[1,2,0,1]=(0.59755498682)*x[0]**o+(-0.457108009787)*x[0]+(0.71562139654)*x[1]**o+(-0.300872832559)*x[1]
-        arg[1,2,1,0]=(-0.479641829834)*x[0]**o+(0.297188513722)*x[0]+(0.0227730978493)*x[1]**o+(0.199329665406)*x[1]
-        arg[1,2,1,1]=(0.918974940101)*x[0]**o+(0.595194981816)*x[0]+(0.760030152554)*x[1]**o+(-0.798899878486)*x[1]
-        arg[1,2,2,0]=(-0.878334511842)*x[0]**o+(0.910857236287)*x[0]+(0.0164747567997)*x[1]**o+(-0.876970888445)*x[1]
-        arg[1,2,2,1]=(0.29445809181)*x[0]**o+(0.837849454931)*x[0]+(0.0759054371211)*x[1]**o+(0.501243080372)*x[1]
-        arg[1,3,0,0]=(-0.529006436258)*x[0]**o+(-0.932325855538)*x[0]+(-0.561472972374)*x[1]**o+(0.845125736656)*x[1]
-        arg[1,3,0,1]=(-0.843008257488)*x[0]**o+(0.614118623012)*x[0]+(-0.167015137447)*x[1]**o+(0.158701952625)*x[1]
-        arg[1,3,1,0]=(-0.662966916148)*x[0]**o+(-0.443297576512)*x[0]+(0.295988608077)*x[1]**o+(0.059506908615)*x[1]
-        arg[1,3,1,1]=(0.864199978014)*x[0]**o+(0.138723519602)*x[0]+(0.144964839302)*x[1]**o+(0.239863709389)*x[1]
-        arg[1,3,2,0]=(0.479006097431)*x[0]**o+(0.542168797821)*x[0]+(0.561074562163)*x[1]**o+(-0.133365787275)*x[1]
-        arg[1,3,2,1]=(-0.901033449452)*x[0]**o+(-0.620245150074)*x[0]+(0.598461569697)*x[1]**o+(-0.2213246854)*x[1]
-        arg[1,4,0,0]=(-0.577067401348)*x[0]**o+(0.486154324874)*x[0]+(0.809205150442)*x[1]**o+(-0.218206418459)*x[1]
-        arg[1,4,0,1]=(0.726556862066)*x[0]**o+(0.0293695509867)*x[0]+(0.601938348193)*x[1]**o+(0.967332697531)*x[1]
-        arg[1,4,1,0]=(-0.675624388054)*x[0]**o+(-0.871613723214)*x[0]+(0.605519387693)*x[1]**o+(0.287186894411)*x[1]
-        arg[1,4,1,1]=(-0.689904898214)*x[0]**o+(-0.918236705665)*x[0]+(-0.892168622177)*x[1]**o+(0.507441662612)*x[1]
-        arg[1,4,2,0]=(0.845768980712)*x[0]**o+(-0.458467508114)*x[0]+(-0.518185249391)*x[1]**o+(0.829945330327)*x[1]
-        arg[1,4,2,1]=(0.776852312178)*x[0]**o+(-0.268810999469)*x[0]+(-0.576757148841)*x[1]**o+(-0.50628294802)*x[1]
-        arg[2,0,0,0]=(-0.686840219939)*x[0]**o+(0.6861172847)*x[0]+(0.240362263052)*x[1]**o+(0.962361523884)*x[1]
-        arg[2,0,0,1]=(-0.943837188119)*x[0]**o+(0.829832768268)*x[0]+(0.377590124133)*x[1]**o+(-0.171714144962)*x[1]
-        arg[2,0,1,0]=(0.862809148447)*x[0]**o+(0.0573402136489)*x[0]+(-0.743311826013)*x[1]**o+(0.427809313437)*x[1]
-        arg[2,0,1,1]=(0.377380819576)*x[0]**o+(-0.223280285041)*x[0]+(0.178628658562)*x[1]**o+(0.121964611877)*x[1]
-        arg[2,0,2,0]=(0.41723758689)*x[0]**o+(0.256039203883)*x[0]+(0.255358776676)*x[1]**o+(-0.881665964974)*x[1]
-        arg[2,0,2,1]=(-0.0797103024499)*x[0]**o+(0.128068931414)*x[0]+(-0.758317834409)*x[1]**o+(0.654657809183)*x[1]
-        arg[2,1,0,0]=(0.603648218133)*x[0]**o+(-0.286780270729)*x[0]+(-0.341108067214)*x[1]**o+(-0.769667356087)*x[1]
-        arg[2,1,0,1]=(0.844044270035)*x[0]**o+(0.0585907857764)*x[0]+(-0.578232785252)*x[1]**o+(-0.40959017859)*x[1]
-        arg[2,1,1,0]=(0.599709567393)*x[0]**o+(0.307092449739)*x[0]+(-0.402950586215)*x[1]**o+(0.0674239470451)*x[1]
-        arg[2,1,1,1]=(0.182608249961)*x[0]**o+(0.373533584601)*x[0]+(0.40949869082)*x[1]**o+(0.696333617699)*x[1]
-        arg[2,1,2,0]=(0.0462891111054)*x[0]**o+(0.371258293292)*x[0]+(0.782976187716)*x[1]**o+(0.117976017999)*x[1]
-        arg[2,1,2,1]=(0.891841121526)*x[0]**o+(-0.998971173204)*x[0]+(0.0286712507928)*x[1]**o+(-0.0198507022516)*x[1]
-        arg[2,2,0,0]=(0.284620902703)*x[0]**o+(0.936231203073)*x[0]+(0.829209752046)*x[1]**o+(-0.94940982125)*x[1]
-        arg[2,2,0,1]=(-0.647956027376)*x[0]**o+(0.923690718922)*x[0]+(-0.0322423837346)*x[1]**o+(0.124962508606)*x[1]
-        arg[2,2,1,0]=(-0.0696010411705)*x[0]**o+(-0.161672936739)*x[0]+(-0.997445762186)*x[1]**o+(0.177962302014)*x[1]
-        arg[2,2,1,1]=(-0.897657700296)*x[0]**o+(-0.467866721175)*x[0]+(-0.560034332007)*x[1]**o+(-0.861509898295)*x[1]
-        arg[2,2,2,0]=(-0.100880174048)*x[0]**o+(0.678568254695)*x[0]+(-0.83289411684)*x[1]**o+(0.680564393149)*x[1]
-        arg[2,2,2,1]=(0.546159181491)*x[0]**o+(0.720296622966)*x[0]+(0.939046941118)*x[1]**o+(-0.716147554733)*x[1]
-        arg[2,3,0,0]=(-0.921073162235)*x[0]**o+(0.979925882289)*x[0]+(-0.0938642966949)*x[1]**o+(0.482093047223)*x[1]
-        arg[2,3,0,1]=(0.0709940956822)*x[0]**o+(-0.691401017243)*x[0]+(0.447000814029)*x[1]**o+(0.0575856240533)*x[1]
-        arg[2,3,1,0]=(0.562800393365)*x[0]**o+(0.657646549915)*x[0]+(-0.835326361689)*x[1]**o+(0.3487960687)*x[1]
-        arg[2,3,1,1]=(0.106668867409)*x[0]**o+(0.436327240765)*x[0]+(-0.585051261259)*x[1]**o+(0.616655338667)*x[1]
-        arg[2,3,2,0]=(-0.501849628176)*x[0]**o+(-0.284722503916)*x[0]+(-0.892470199837)*x[1]**o+(-0.979942541795)*x[1]
-        arg[2,3,2,1]=(0.236759540073)*x[0]**o+(-0.806931113769)*x[0]+(-0.225220003475)*x[1]**o+(-0.95183239844)*x[1]
-        arg[2,4,0,0]=(-0.684823909581)*x[0]**o+(0.445615228059)*x[0]+(-0.638879895767)*x[1]**o+(-0.335505874088)*x[1]
-        arg[2,4,0,1]=(-0.196708460612)*x[0]**o+(0.981592996809)*x[0]+(0.435774317028)*x[1]**o+(-0.0952200663109)*x[1]
-        arg[2,4,1,0]=(-0.552759474764)*x[0]**o+(-0.614031173545)*x[0]+(0.304375542871)*x[1]**o+(-0.285131901533)*x[1]
-        arg[2,4,1,1]=(0.147812951421)*x[0]**o+(-0.78533487681)*x[0]+(0.942205524401)*x[1]**o+(0.166280215075)*x[1]
-        arg[2,4,2,0]=(0.843067982563)*x[0]**o+(0.0116520710289)*x[0]+(0.927948889059)*x[1]**o+(-0.395251919577)*x[1]
-        arg[2,4,2,1]=(-0.316538010007)*x[0]**o+(-0.139262497126)*x[0]+(0.645409249217)*x[1]**o+(0.192949521992)*x[1]
-        arg[3,0,0,0]=(0.88179290666)*x[0]**o+(0.337853287365)*x[0]+(-0.590219587193)*x[1]**o+(-0.827051504196)*x[1]
-        arg[3,0,0,1]=(-0.104526336997)*x[0]**o+(0.299097012282)*x[0]+(-0.348493995853)*x[1]**o+(-0.780034322304)*x[1]
-        arg[3,0,1,0]=(0.358724159445)*x[0]**o+(-0.0338089482488)*x[0]+(-0.0423054506456)*x[1]**o+(0.67180489557)*x[1]
-        arg[3,0,1,1]=(-0.778880095665)*x[0]**o+(-0.448812173928)*x[0]+(-0.823686122382)*x[1]**o+(0.636028922656)*x[1]
-        arg[3,0,2,0]=(0.146891002069)*x[0]**o+(-0.368903199628)*x[0]+(-0.596272077557)*x[1]**o+(0.703510683225)*x[1]
-        arg[3,0,2,1]=(0.357416423547)*x[0]**o+(-0.103754905142)*x[0]+(0.32026011189)*x[1]**o+(0.755648597627)*x[1]
-        arg[3,1,0,0]=(0.399082464238)*x[0]**o+(-0.12611921797)*x[0]+(0.426552225948)*x[1]**o+(-0.228714297286)*x[1]
-        arg[3,1,0,1]=(-0.638411026717)*x[0]**o+(-0.342143922306)*x[0]+(-0.502107802626)*x[1]**o+(-0.881045304848)*x[1]
-        arg[3,1,1,0]=(0.411134247295)*x[0]**o+(-0.216585727086)*x[0]+(0.270013339156)*x[1]**o+(0.251581243494)*x[1]
-        arg[3,1,1,1]=(0.788758848294)*x[0]**o+(0.345181621902)*x[0]+(0.102843710598)*x[1]**o+(0.0561071077516)*x[1]
-        arg[3,1,2,0]=(0.232441162347)*x[0]**o+(-0.687544250386)*x[0]+(0.369065746372)*x[1]**o+(0.628109564412)*x[1]
-        arg[3,1,2,1]=(-0.912295044312)*x[0]**o+(0.847830497468)*x[0]+(0.776648618003)*x[1]**o+(0.522638388084)*x[1]
-        arg[3,2,0,0]=(0.779333120942)*x[0]**o+(-0.0747119967046)*x[0]+(-0.594363282198)*x[1]**o+(0.513922159444)*x[1]
-        arg[3,2,0,1]=(0.877492427404)*x[0]**o+(-0.191727825399)*x[0]+(0.0881296554818)*x[1]**o+(-0.408407503067)*x[1]
-        arg[3,2,1,0]=(0.29696771215)*x[0]**o+(-0.914882727138)*x[0]+(0.684156831385)*x[1]**o+(0.142293411327)*x[1]
-        arg[3,2,1,1]=(0.105927449304)*x[0]**o+(-0.863339661598)*x[0]+(-0.815550662607)*x[1]**o+(-0.261034715274)*x[1]
-        arg[3,2,2,0]=(0.944082529871)*x[0]**o+(-0.449259627627)*x[0]+(-0.560526159016)*x[1]**o+(0.609050500798)*x[1]
-        arg[3,2,2,1]=(0.529508870267)*x[0]**o+(0.627216712239)*x[0]+(-0.0148122228382)*x[1]**o+(0.0743274653452)*x[1]
-        arg[3,3,0,0]=(-0.30609697448)*x[0]**o+(0.910972095956)*x[0]+(0.256274444924)*x[1]**o+(0.229096821635)*x[1]
-        arg[3,3,0,1]=(-0.510323627078)*x[0]**o+(0.308418491165)*x[0]+(0.786418296678)*x[1]**o+(-0.248788086479)*x[1]
-        arg[3,3,1,0]=(-0.981107944688)*x[0]**o+(-0.331637054173)*x[0]+(-0.972981902152)*x[1]**o+(-0.389364980465)*x[1]
-        arg[3,3,1,1]=(-0.839880147367)*x[0]**o+(-0.911569972467)*x[0]+(0.209642332468)*x[1]**o+(0.0926875442137)*x[1]
-        arg[3,3,2,0]=(-0.22724314378)*x[0]**o+(-0.0396604383619)*x[0]+(0.906829234649)*x[1]**o+(-0.862410550066)*x[1]
-        arg[3,3,2,1]=(-0.412816401935)*x[0]**o+(-0.848442294241)*x[0]+(-0.599302206188)*x[1]**o+(0.719403009819)*x[1]
-        arg[3,4,0,0]=(0.259283054664)*x[0]**o+(0.0983272120339)*x[0]+(-0.538373082787)*x[1]**o+(0.950164435617)*x[1]
-        arg[3,4,0,1]=(0.633594236794)*x[0]**o+(0.120984469179)*x[0]+(0.472771297982)*x[1]**o+(0.873015785724)*x[1]
-        arg[3,4,1,0]=(0.913524970057)*x[0]**o+(0.106590018424)*x[0]+(0.124026494061)*x[1]**o+(-0.254989594971)*x[1]
-        arg[3,4,1,1]=(0.945528885492)*x[0]**o+(-0.323205519576)*x[0]+(-0.467294290307)*x[1]**o+(-0.557033486306)*x[1]
-        arg[3,4,2,0]=(-0.268364682764)*x[0]**o+(0.0289685280025)*x[0]+(0.0493964636013)*x[1]**o+(0.872120137365)*x[1]
-        arg[3,4,2,1]=(-0.266698796897)*x[0]**o+(-0.679148300702)*x[0]+(0.337653394795)*x[1]**o+(0.186866149716)*x[1]
-        ref[0,0,0,0]=(0.358768976574)*x_ref[0]**o+(-0.231637053165)*x_ref[0]+(0.798891506345)*x_ref[1]**o+(0.292325388353)*x_ref[1]
-        ref[0,0,0,1]=(0.53301689922)*x_ref[0]**o+(-0.761786870664)*x_ref[0]+(0.284067900826)*x_ref[1]**o+(-0.688662082205)*x_ref[1]
-        ref[0,0,1,0]=(-0.721988036113)*x_ref[0]**o+(-0.743892757815)*x_ref[0]+(-0.796787022375)*x_ref[1]**o+(-0.499468412523)*x_ref[1]
-        ref[0,0,1,1]=(0.0710691488306)*x_ref[0]**o+(0.0210385141456)*x_ref[0]+(-0.709342417683)*x_ref[1]**o+(0.901794071115)*x_ref[1]
-        ref[0,0,2,0]=(-0.800537263339)*x_ref[0]**o+(0.583114786539)*x_ref[0]+(0.422752622522)*x_ref[1]**o+(-0.0954981460748)*x_ref[1]
-        ref[0,0,2,1]=(-0.0805357065445)*x_ref[0]**o+(0.476377895547)*x_ref[0]+(0.242203912566)*x_ref[1]**o+(-0.479971540043)*x_ref[1]
-        ref[0,1,0,0]=(-0.476356823162)*x_ref[0]**o+(-0.438853622252)*x_ref[0]+(-0.937228141746)*x_ref[1]**o+(0.366496742588)*x_ref[1]
-        ref[0,1,0,1]=(-0.496918253956)*x_ref[0]**o+(-0.0227549061268)*x_ref[0]+(0.830195584768)*x_ref[1]**o+(-0.114624902423)*x_ref[1]
-        ref[0,1,1,0]=(0.431291036997)*x_ref[0]**o+(0.807713720258)*x_ref[0]+(0.730057543333)*x_ref[1]**o+(0.635171725232)*x_ref[1]
-        ref[0,1,1,1]=(0.784425995411)*x_ref[0]**o+(-0.397510494899)*x_ref[0]+(-0.579911740115)*x_ref[1]**o+(0.130426014607)*x_ref[1]
-        ref[0,1,2,0]=(0.473613650641)*x_ref[0]**o+(-0.155617741177)*x_ref[0]+(0.873237852103)*x_ref[1]**o+(-0.749395152414)*x_ref[1]
-        ref[0,1,2,1]=(0.367649559431)*x_ref[0]**o+(0.830181309644)*x_ref[0]+(0.87726968147)*x_ref[1]**o+(-0.450304793682)*x_ref[1]
-        ref[0,2,0,0]=(-0.700522876654)*x_ref[0]**o+(-0.998187126003)*x_ref[0]+(0.732491610173)*x_ref[1]**o+(0.648679267)*x_ref[1]
-        ref[0,2,0,1]=(0.499746141285)*x_ref[0]**o+(-0.730090975806)*x_ref[0]+(-0.525566438654)*x_ref[1]**o+(0.212469850421)*x_ref[1]
-        ref[0,2,1,0]=(-0.847752916298)*x_ref[0]**o+(0.43510472619)*x_ref[0]+(0.815305936548)*x_ref[1]**o+(-0.143802676552)*x_ref[1]
-        ref[0,2,1,1]=(-0.453572376958)*x_ref[0]**o+(-0.913023531929)*x_ref[0]+(0.743328127665)*x_ref[1]**o+(0.152586122591)*x_ref[1]
-        ref[0,2,2,0]=(0.526939334508)*x_ref[0]**o+(0.247268722057)*x_ref[0]+(-0.176432621481)*x_ref[1]**o+(-0.510110202196)*x_ref[1]
-        ref[0,2,2,1]=(0.139685732003)*x_ref[0]**o+(0.278304455867)*x_ref[0]+(0.517953769616)*x_ref[1]**o+(-0.272384261701)*x_ref[1]
-        ref[0,3,0,0]=(-0.38867907688)*x_ref[0]**o+(-0.73043975055)*x_ref[0]+(-0.14293243901)*x_ref[1]**o+(0.0601042854043)*x_ref[1]
-        ref[0,3,0,1]=(-0.163055949188)*x_ref[0]**o+(-0.035877062482)*x_ref[0]+(0.0396615423106)*x_ref[1]**o+(-0.870062303275)*x_ref[1]
-        ref[0,3,1,0]=(0.283839779914)*x_ref[0]**o+(-0.519316925197)*x_ref[0]+(-0.437401973959)*x_ref[1]**o+(-0.823707232663)*x_ref[1]
-        ref[0,3,1,1]=(0.700305425892)*x_ref[0]**o+(0.0299761521094)*x_ref[0]+(-0.993032151025)*x_ref[1]**o+(0.633293413221)*x_ref[1]
-        ref[0,3,2,0]=(-0.745357256365)*x_ref[0]**o+(-0.451553456961)*x_ref[0]+(0.05789646302)*x_ref[1]**o+(-0.755901155251)*x_ref[1]
-        ref[0,3,2,1]=(-0.57330840403)*x_ref[0]**o+(-0.589361483751)*x_ref[0]+(-0.038677123513)*x_ref[1]**o+(0.417332032168)*x_ref[1]
-        ref[0,4,0,0]=(0.759655161531)*x_ref[0]**o+(0.737483461328)*x_ref[0]+(0.573158629937)*x_ref[1]**o+(-0.454191109106)*x_ref[1]
-        ref[0,4,0,1]=(-0.232982406645)*x_ref[0]**o+(-0.926030038179)*x_ref[0]+(-0.504256834465)*x_ref[1]**o+(-0.107703527058)*x_ref[1]
-        ref[0,4,1,0]=(0.898411697016)*x_ref[0]**o+(0.642045536742)*x_ref[0]+(-0.953059791895)*x_ref[1]**o+(-0.67501710093)*x_ref[1]
-        ref[0,4,1,1]=(0.300380574165)*x_ref[0]**o+(0.204591960115)*x_ref[0]+(-0.308849697562)*x_ref[1]**o+(-0.489495887357)*x_ref[1]
-        ref[0,4,2,0]=(-0.814560286716)*x_ref[0]**o+(0.154235599953)*x_ref[0]+(0.279329273498)*x_ref[1]**o+(-0.674063978926)*x_ref[1]
-        ref[0,4,2,1]=(-0.718018870365)*x_ref[0]**o+(-0.735982858424)*x_ref[0]+(-0.0132197132926)*x_ref[1]**o+(0.398939587543)*x_ref[1]
-        ref[1,0,0,0]=(0.0559995351725)*x_ref[0]**o+(-0.164549619892)*x_ref[0]+(-0.794242529408)*x_ref[1]**o+(0.0927822314785)*x_ref[1]
-        ref[1,0,0,1]=(-0.894238542341)*x_ref[0]**o+(0.378559247473)*x_ref[0]+(-0.183957272639)*x_ref[1]**o+(0.486358968942)*x_ref[1]
-        ref[1,0,1,0]=(0.931288801001)*x_ref[0]**o+(0.223815769968)*x_ref[0]+(-0.719591906328)*x_ref[1]**o+(-0.743644741105)*x_ref[1]
-        ref[1,0,1,1]=(0.156646029123)*x_ref[0]**o+(0.306942879419)*x_ref[0]+(0.747006830674)*x_ref[1]**o+(-0.876534912274)*x_ref[1]
-        ref[1,0,2,0]=(-0.496819081999)*x_ref[0]**o+(-0.939227402425)*x_ref[0]+(0.0566331712182)*x_ref[1]**o+(0.565724364661)*x_ref[1]
-        ref[1,0,2,1]=(0.903706429954)*x_ref[0]**o+(0.667947320307)*x_ref[0]+(0.97140855373)*x_ref[1]**o+(0.924095235752)*x_ref[1]
-        ref[1,1,0,0]=(0.526180197299)*x_ref[0]**o+(0.435493351674)*x_ref[0]+(0.400107077848)*x_ref[1]**o+(-0.704760833758)*x_ref[1]
-        ref[1,1,0,1]=(0.0723740015004)*x_ref[0]**o+(-0.405859051371)*x_ref[0]+(0.200787757511)*x_ref[1]**o+(0.41819184563)*x_ref[1]
-        ref[1,1,1,0]=(-0.0320951655627)*x_ref[0]**o+(0.235068445821)*x_ref[0]+(0.450383349599)*x_ref[1]**o+(-0.801487424765)*x_ref[1]
-        ref[1,1,1,1]=(-0.52478892744)*x_ref[0]**o+(-0.449111297125)*x_ref[0]+(0.731062182014)*x_ref[1]**o+(0.533619608577)*x_ref[1]
-        ref[1,1,2,0]=(0.0889794057057)*x_ref[0]**o+(-0.971856981571)*x_ref[0]+(0.662216408922)*x_ref[1]**o+(0.164089024468)*x_ref[1]
-        ref[1,1,2,1]=(-0.196374963647)*x_ref[0]**o+(-0.739360211802)*x_ref[0]+(0.916611650753)*x_ref[1]**o+(-0.260102318115)*x_ref[1]
-        ref[1,2,0,0]=(0.627763572103)*x_ref[0]**o+(-0.893900847319)*x_ref[0]+(0.907548446417)*x_ref[1]**o+(0.0687906203663)*x_ref[1]
-        ref[1,2,0,1]=(0.59755498682)*x_ref[0]**o+(-0.457108009787)*x_ref[0]+(0.71562139654)*x_ref[1]**o+(-0.300872832559)*x_ref[1]
-        ref[1,2,1,0]=(-0.479641829834)*x_ref[0]**o+(0.297188513722)*x_ref[0]+(0.0227730978493)*x_ref[1]**o+(0.199329665406)*x_ref[1]
-        ref[1,2,1,1]=(0.918974940101)*x_ref[0]**o+(0.595194981816)*x_ref[0]+(0.760030152554)*x_ref[1]**o+(-0.798899878486)*x_ref[1]
-        ref[1,2,2,0]=(-0.878334511842)*x_ref[0]**o+(0.910857236287)*x_ref[0]+(0.0164747567997)*x_ref[1]**o+(-0.876970888445)*x_ref[1]
-        ref[1,2,2,1]=(0.29445809181)*x_ref[0]**o+(0.837849454931)*x_ref[0]+(0.0759054371211)*x_ref[1]**o+(0.501243080372)*x_ref[1]
-        ref[1,3,0,0]=(-0.529006436258)*x_ref[0]**o+(-0.932325855538)*x_ref[0]+(-0.561472972374)*x_ref[1]**o+(0.845125736656)*x_ref[1]
-        ref[1,3,0,1]=(-0.843008257488)*x_ref[0]**o+(0.614118623012)*x_ref[0]+(-0.167015137447)*x_ref[1]**o+(0.158701952625)*x_ref[1]
-        ref[1,3,1,0]=(-0.662966916148)*x_ref[0]**o+(-0.443297576512)*x_ref[0]+(0.295988608077)*x_ref[1]**o+(0.059506908615)*x_ref[1]
-        ref[1,3,1,1]=(0.864199978014)*x_ref[0]**o+(0.138723519602)*x_ref[0]+(0.144964839302)*x_ref[1]**o+(0.239863709389)*x_ref[1]
-        ref[1,3,2,0]=(0.479006097431)*x_ref[0]**o+(0.542168797821)*x_ref[0]+(0.561074562163)*x_ref[1]**o+(-0.133365787275)*x_ref[1]
-        ref[1,3,2,1]=(-0.901033449452)*x_ref[0]**o+(-0.620245150074)*x_ref[0]+(0.598461569697)*x_ref[1]**o+(-0.2213246854)*x_ref[1]
-        ref[1,4,0,0]=(-0.577067401348)*x_ref[0]**o+(0.486154324874)*x_ref[0]+(0.809205150442)*x_ref[1]**o+(-0.218206418459)*x_ref[1]
-        ref[1,4,0,1]=(0.726556862066)*x_ref[0]**o+(0.0293695509867)*x_ref[0]+(0.601938348193)*x_ref[1]**o+(0.967332697531)*x_ref[1]
-        ref[1,4,1,0]=(-0.675624388054)*x_ref[0]**o+(-0.871613723214)*x_ref[0]+(0.605519387693)*x_ref[1]**o+(0.287186894411)*x_ref[1]
-        ref[1,4,1,1]=(-0.689904898214)*x_ref[0]**o+(-0.918236705665)*x_ref[0]+(-0.892168622177)*x_ref[1]**o+(0.507441662612)*x_ref[1]
-        ref[1,4,2,0]=(0.845768980712)*x_ref[0]**o+(-0.458467508114)*x_ref[0]+(-0.518185249391)*x_ref[1]**o+(0.829945330327)*x_ref[1]
-        ref[1,4,2,1]=(0.776852312178)*x_ref[0]**o+(-0.268810999469)*x_ref[0]+(-0.576757148841)*x_ref[1]**o+(-0.50628294802)*x_ref[1]
-        ref[2,0,0,0]=(-0.686840219939)*x_ref[0]**o+(0.6861172847)*x_ref[0]+(0.240362263052)*x_ref[1]**o+(0.962361523884)*x_ref[1]
-        ref[2,0,0,1]=(-0.943837188119)*x_ref[0]**o+(0.829832768268)*x_ref[0]+(0.377590124133)*x_ref[1]**o+(-0.171714144962)*x_ref[1]
-        ref[2,0,1,0]=(0.862809148447)*x_ref[0]**o+(0.0573402136489)*x_ref[0]+(-0.743311826013)*x_ref[1]**o+(0.427809313437)*x_ref[1]
-        ref[2,0,1,1]=(0.377380819576)*x_ref[0]**o+(-0.223280285041)*x_ref[0]+(0.178628658562)*x_ref[1]**o+(0.121964611877)*x_ref[1]
-        ref[2,0,2,0]=(0.41723758689)*x_ref[0]**o+(0.256039203883)*x_ref[0]+(0.255358776676)*x_ref[1]**o+(-0.881665964974)*x_ref[1]
-        ref[2,0,2,1]=(-0.0797103024499)*x_ref[0]**o+(0.128068931414)*x_ref[0]+(-0.758317834409)*x_ref[1]**o+(0.654657809183)*x_ref[1]
-        ref[2,1,0,0]=(0.603648218133)*x_ref[0]**o+(-0.286780270729)*x_ref[0]+(-0.341108067214)*x_ref[1]**o+(-0.769667356087)*x_ref[1]
-        ref[2,1,0,1]=(0.844044270035)*x_ref[0]**o+(0.0585907857764)*x_ref[0]+(-0.578232785252)*x_ref[1]**o+(-0.40959017859)*x_ref[1]
-        ref[2,1,1,0]=(0.599709567393)*x_ref[0]**o+(0.307092449739)*x_ref[0]+(-0.402950586215)*x_ref[1]**o+(0.0674239470451)*x_ref[1]
-        ref[2,1,1,1]=(0.182608249961)*x_ref[0]**o+(0.373533584601)*x_ref[0]+(0.40949869082)*x_ref[1]**o+(0.696333617699)*x_ref[1]
-        ref[2,1,2,0]=(0.0462891111054)*x_ref[0]**o+(0.371258293292)*x_ref[0]+(0.782976187716)*x_ref[1]**o+(0.117976017999)*x_ref[1]
-        ref[2,1,2,1]=(0.891841121526)*x_ref[0]**o+(-0.998971173204)*x_ref[0]+(0.0286712507928)*x_ref[1]**o+(-0.0198507022516)*x_ref[1]
-        ref[2,2,0,0]=(0.284620902703)*x_ref[0]**o+(0.936231203073)*x_ref[0]+(0.829209752046)*x_ref[1]**o+(-0.94940982125)*x_ref[1]
-        ref[2,2,0,1]=(-0.647956027376)*x_ref[0]**o+(0.923690718922)*x_ref[0]+(-0.0322423837346)*x_ref[1]**o+(0.124962508606)*x_ref[1]
-        ref[2,2,1,0]=(-0.0696010411705)*x_ref[0]**o+(-0.161672936739)*x_ref[0]+(-0.997445762186)*x_ref[1]**o+(0.177962302014)*x_ref[1]
-        ref[2,2,1,1]=(-0.897657700296)*x_ref[0]**o+(-0.467866721175)*x_ref[0]+(-0.560034332007)*x_ref[1]**o+(-0.861509898295)*x_ref[1]
-        ref[2,2,2,0]=(-0.100880174048)*x_ref[0]**o+(0.678568254695)*x_ref[0]+(-0.83289411684)*x_ref[1]**o+(0.680564393149)*x_ref[1]
-        ref[2,2,2,1]=(0.546159181491)*x_ref[0]**o+(0.720296622966)*x_ref[0]+(0.939046941118)*x_ref[1]**o+(-0.716147554733)*x_ref[1]
-        ref[2,3,0,0]=(-0.921073162235)*x_ref[0]**o+(0.979925882289)*x_ref[0]+(-0.0938642966949)*x_ref[1]**o+(0.482093047223)*x_ref[1]
-        ref[2,3,0,1]=(0.0709940956822)*x_ref[0]**o+(-0.691401017243)*x_ref[0]+(0.447000814029)*x_ref[1]**o+(0.0575856240533)*x_ref[1]
-        ref[2,3,1,0]=(0.562800393365)*x_ref[0]**o+(0.657646549915)*x_ref[0]+(-0.835326361689)*x_ref[1]**o+(0.3487960687)*x_ref[1]
-        ref[2,3,1,1]=(0.106668867409)*x_ref[0]**o+(0.436327240765)*x_ref[0]+(-0.585051261259)*x_ref[1]**o+(0.616655338667)*x_ref[1]
-        ref[2,3,2,0]=(-0.501849628176)*x_ref[0]**o+(-0.284722503916)*x_ref[0]+(-0.892470199837)*x_ref[1]**o+(-0.979942541795)*x_ref[1]
-        ref[2,3,2,1]=(0.236759540073)*x_ref[0]**o+(-0.806931113769)*x_ref[0]+(-0.225220003475)*x_ref[1]**o+(-0.95183239844)*x_ref[1]
-        ref[2,4,0,0]=(-0.684823909581)*x_ref[0]**o+(0.445615228059)*x_ref[0]+(-0.638879895767)*x_ref[1]**o+(-0.335505874088)*x_ref[1]
-        ref[2,4,0,1]=(-0.196708460612)*x_ref[0]**o+(0.981592996809)*x_ref[0]+(0.435774317028)*x_ref[1]**o+(-0.0952200663109)*x_ref[1]
-        ref[2,4,1,0]=(-0.552759474764)*x_ref[0]**o+(-0.614031173545)*x_ref[0]+(0.304375542871)*x_ref[1]**o+(-0.285131901533)*x_ref[1]
-        ref[2,4,1,1]=(0.147812951421)*x_ref[0]**o+(-0.78533487681)*x_ref[0]+(0.942205524401)*x_ref[1]**o+(0.166280215075)*x_ref[1]
-        ref[2,4,2,0]=(0.843067982563)*x_ref[0]**o+(0.0116520710289)*x_ref[0]+(0.927948889059)*x_ref[1]**o+(-0.395251919577)*x_ref[1]
-        ref[2,4,2,1]=(-0.316538010007)*x_ref[0]**o+(-0.139262497126)*x_ref[0]+(0.645409249217)*x_ref[1]**o+(0.192949521992)*x_ref[1]
-        ref[3,0,0,0]=(0.88179290666)*x_ref[0]**o+(0.337853287365)*x_ref[0]+(-0.590219587193)*x_ref[1]**o+(-0.827051504196)*x_ref[1]
-        ref[3,0,0,1]=(-0.104526336997)*x_ref[0]**o+(0.299097012282)*x_ref[0]+(-0.348493995853)*x_ref[1]**o+(-0.780034322304)*x_ref[1]
-        ref[3,0,1,0]=(0.358724159445)*x_ref[0]**o+(-0.0338089482488)*x_ref[0]+(-0.0423054506456)*x_ref[1]**o+(0.67180489557)*x_ref[1]
-        ref[3,0,1,1]=(-0.778880095665)*x_ref[0]**o+(-0.448812173928)*x_ref[0]+(-0.823686122382)*x_ref[1]**o+(0.636028922656)*x_ref[1]
-        ref[3,0,2,0]=(0.146891002069)*x_ref[0]**o+(-0.368903199628)*x_ref[0]+(-0.596272077557)*x_ref[1]**o+(0.703510683225)*x_ref[1]
-        ref[3,0,2,1]=(0.357416423547)*x_ref[0]**o+(-0.103754905142)*x_ref[0]+(0.32026011189)*x_ref[1]**o+(0.755648597627)*x_ref[1]
-        ref[3,1,0,0]=(0.399082464238)*x_ref[0]**o+(-0.12611921797)*x_ref[0]+(0.426552225948)*x_ref[1]**o+(-0.228714297286)*x_ref[1]
-        ref[3,1,0,1]=(-0.638411026717)*x_ref[0]**o+(-0.342143922306)*x_ref[0]+(-0.502107802626)*x_ref[1]**o+(-0.881045304848)*x_ref[1]
-        ref[3,1,1,0]=(0.411134247295)*x_ref[0]**o+(-0.216585727086)*x_ref[0]+(0.270013339156)*x_ref[1]**o+(0.251581243494)*x_ref[1]
-        ref[3,1,1,1]=(0.788758848294)*x_ref[0]**o+(0.345181621902)*x_ref[0]+(0.102843710598)*x_ref[1]**o+(0.0561071077516)*x_ref[1]
-        ref[3,1,2,0]=(0.232441162347)*x_ref[0]**o+(-0.687544250386)*x_ref[0]+(0.369065746372)*x_ref[1]**o+(0.628109564412)*x_ref[1]
-        ref[3,1,2,1]=(-0.912295044312)*x_ref[0]**o+(0.847830497468)*x_ref[0]+(0.776648618003)*x_ref[1]**o+(0.522638388084)*x_ref[1]
-        ref[3,2,0,0]=(0.779333120942)*x_ref[0]**o+(-0.0747119967046)*x_ref[0]+(-0.594363282198)*x_ref[1]**o+(0.513922159444)*x_ref[1]
-        ref[3,2,0,1]=(0.877492427404)*x_ref[0]**o+(-0.191727825399)*x_ref[0]+(0.0881296554818)*x_ref[1]**o+(-0.408407503067)*x_ref[1]
-        ref[3,2,1,0]=(0.29696771215)*x_ref[0]**o+(-0.914882727138)*x_ref[0]+(0.684156831385)*x_ref[1]**o+(0.142293411327)*x_ref[1]
-        ref[3,2,1,1]=(0.105927449304)*x_ref[0]**o+(-0.863339661598)*x_ref[0]+(-0.815550662607)*x_ref[1]**o+(-0.261034715274)*x_ref[1]
-        ref[3,2,2,0]=(0.944082529871)*x_ref[0]**o+(-0.449259627627)*x_ref[0]+(-0.560526159016)*x_ref[1]**o+(0.609050500798)*x_ref[1]
-        ref[3,2,2,1]=(0.529508870267)*x_ref[0]**o+(0.627216712239)*x_ref[0]+(-0.0148122228382)*x_ref[1]**o+(0.0743274653452)*x_ref[1]
-        ref[3,3,0,0]=(-0.30609697448)*x_ref[0]**o+(0.910972095956)*x_ref[0]+(0.256274444924)*x_ref[1]**o+(0.229096821635)*x_ref[1]
-        ref[3,3,0,1]=(-0.510323627078)*x_ref[0]**o+(0.308418491165)*x_ref[0]+(0.786418296678)*x_ref[1]**o+(-0.248788086479)*x_ref[1]
-        ref[3,3,1,0]=(-0.981107944688)*x_ref[0]**o+(-0.331637054173)*x_ref[0]+(-0.972981902152)*x_ref[1]**o+(-0.389364980465)*x_ref[1]
-        ref[3,3,1,1]=(-0.839880147367)*x_ref[0]**o+(-0.911569972467)*x_ref[0]+(0.209642332468)*x_ref[1]**o+(0.0926875442137)*x_ref[1]
-        ref[3,3,2,0]=(-0.22724314378)*x_ref[0]**o+(-0.0396604383619)*x_ref[0]+(0.906829234649)*x_ref[1]**o+(-0.862410550066)*x_ref[1]
-        ref[3,3,2,1]=(-0.412816401935)*x_ref[0]**o+(-0.848442294241)*x_ref[0]+(-0.599302206188)*x_ref[1]**o+(0.719403009819)*x_ref[1]
-        ref[3,4,0,0]=(0.259283054664)*x_ref[0]**o+(0.0983272120339)*x_ref[0]+(-0.538373082787)*x_ref[1]**o+(0.950164435617)*x_ref[1]
-        ref[3,4,0,1]=(0.633594236794)*x_ref[0]**o+(0.120984469179)*x_ref[0]+(0.472771297982)*x_ref[1]**o+(0.873015785724)*x_ref[1]
-        ref[3,4,1,0]=(0.913524970057)*x_ref[0]**o+(0.106590018424)*x_ref[0]+(0.124026494061)*x_ref[1]**o+(-0.254989594971)*x_ref[1]
-        ref[3,4,1,1]=(0.945528885492)*x_ref[0]**o+(-0.323205519576)*x_ref[0]+(-0.467294290307)*x_ref[1]**o+(-0.557033486306)*x_ref[1]
-        ref[3,4,2,0]=(-0.268364682764)*x_ref[0]**o+(0.0289685280025)*x_ref[0]+(0.0493964636013)*x_ref[1]**o+(0.872120137365)*x_ref[1]
-        ref[3,4,2,1]=(-0.266698796897)*x_ref[0]**o+(-0.679148300702)*x_ref[0]+(0.337653394795)*x_ref[1]**o+(0.186866149716)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(-0.928996629952)*x[0]**o+(-0.171383074114)*x[0]+(-0.324423798901)*x[1]**o+(-0.801354053962)*x[1]+(0.365256142808)*x[2]**o+(0.126262208857)*x[2]
-        arg[0,0,0,1]=(0.326024843626)*x[0]**o+(-0.0091566240426)*x[0]+(-0.0396235158589)*x[1]**o+(-0.753302577837)*x[1]+(-0.38709916587)*x[2]**o+(-0.28660316595)*x[2]
-        arg[0,0,1,0]=(0.755338255506)*x[0]**o+(0.851895434343)*x[0]+(0.419119464402)*x[1]**o+(0.670733085023)*x[1]+(0.819398310958)*x[2]**o+(0.476185335773)*x[2]
-        arg[0,0,1,1]=(-0.981416259131)*x[0]**o+(-0.97000252267)*x[0]+(-0.132624451699)*x[1]**o+(-0.261428370649)*x[1]+(-0.349245951727)*x[2]**o+(-0.717343195877)*x[2]
-        arg[0,0,2,0]=(-0.874826075266)*x[0]**o+(-0.399307905707)*x[0]+(0.350873599317)*x[1]**o+(0.15861651992)*x[1]+(0.396279933216)*x[2]**o+(0.92332515708)*x[2]
-        arg[0,0,2,1]=(-0.183596683527)*x[0]**o+(-0.115194639348)*x[0]+(0.616111723618)*x[1]**o+(-0.402157657669)*x[1]+(0.44145594193)*x[2]**o+(0.686052407784)*x[2]
-        arg[0,1,0,0]=(-0.669169178244)*x[0]**o+(0.835937801609)*x[0]+(0.468805302181)*x[1]**o+(-0.627292634023)*x[1]+(-0.674361231979)*x[2]**o+(-0.00929181785129)*x[2]
-        arg[0,1,0,1]=(-0.568131655705)*x[0]**o+(0.690366535852)*x[0]+(-0.212524396914)*x[1]**o+(-0.767983769407)*x[1]+(0.477500128569)*x[2]**o+(-0.0190887598644)*x[2]
-        arg[0,1,1,0]=(-0.374170635822)*x[0]**o+(0.0169009974558)*x[0]+(-0.162519103357)*x[1]**o+(0.786991144449)*x[1]+(0.0590294918131)*x[2]**o+(-0.213442509309)*x[2]
-        arg[0,1,1,1]=(-0.558268657439)*x[0]**o+(0.584734933669)*x[0]+(-0.650790013689)*x[1]**o+(-0.192849048407)*x[1]+(0.505458636714)*x[2]**o+(-0.585174281371)*x[2]
-        arg[0,1,2,0]=(-0.933243590775)*x[0]**o+(0.528060249767)*x[0]+(-0.763255746252)*x[1]**o+(0.771589118163)*x[1]+(-0.641287604338)*x[2]**o+(0.379566401585)*x[2]
-        arg[0,1,2,1]=(-0.836976373935)*x[0]**o+(-0.969434110974)*x[0]+(0.758148372888)*x[1]**o+(-0.89212062535)*x[1]+(0.788693820015)*x[2]**o+(-0.620704367414)*x[2]
-        arg[0,2,0,0]=(0.0163117360814)*x[0]**o+(-0.390867752068)*x[0]+(-0.725068297982)*x[1]**o+(-0.680312496646)*x[1]+(0.069273494969)*x[2]**o+(-0.576122275696)*x[2]
-        arg[0,2,0,1]=(0.461771197614)*x[0]**o+(-0.767541404109)*x[0]+(-0.694279263622)*x[1]**o+(-0.721448812749)*x[1]+(0.248787896584)*x[2]**o+(0.237075401327)*x[2]
-        arg[0,2,1,0]=(0.381987012965)*x[0]**o+(-0.288236233238)*x[0]+(-0.519012025084)*x[1]**o+(-0.256658293082)*x[1]+(0.807322167368)*x[2]**o+(-0.261916179859)*x[2]
-        arg[0,2,1,1]=(0.257241267407)*x[0]**o+(-0.470612990721)*x[0]+(-0.208612656448)*x[1]**o+(0.839646962914)*x[1]+(0.916675150494)*x[2]**o+(-0.165468351005)*x[2]
-        arg[0,2,2,0]=(0.92569232521)*x[0]**o+(0.809982458308)*x[0]+(-0.860530305336)*x[1]**o+(0.261687622817)*x[1]+(0.948003684651)*x[2]**o+(-0.473133742361)*x[2]
-        arg[0,2,2,1]=(-0.113846814874)*x[0]**o+(0.680846459377)*x[0]+(0.920219149741)*x[1]**o+(0.172027554503)*x[1]+(0.475330041115)*x[2]**o+(-0.176218891429)*x[2]
-        arg[0,3,0,0]=(-0.948638294297)*x[0]**o+(-0.0411621070703)*x[0]+(-0.294759271027)*x[1]**o+(-0.903733455086)*x[1]+(-0.995253733593)*x[2]**o+(0.106726960462)*x[2]
-        arg[0,3,0,1]=(0.1592709614)*x[0]**o+(0.0683266445293)*x[0]+(0.336092506745)*x[1]**o+(-0.209047739881)*x[1]+(-0.330417243459)*x[2]**o+(-0.809242647755)*x[2]
-        arg[0,3,1,0]=(-0.680637516359)*x[0]**o+(-0.713405815404)*x[0]+(-0.484624435043)*x[1]**o+(-0.279314462332)*x[1]+(-0.458856066504)*x[2]**o+(0.0588111305227)*x[2]
-        arg[0,3,1,1]=(-0.853676338655)*x[0]**o+(-0.651539814195)*x[0]+(-0.109727277725)*x[1]**o+(0.0139006407942)*x[1]+(0.231943245426)*x[2]**o+(0.42972517233)*x[2]
-        arg[0,3,2,0]=(-0.60799269765)*x[0]**o+(-0.802413269128)*x[0]+(0.151362498863)*x[1]**o+(-0.678226252875)*x[1]+(-0.867117685659)*x[2]**o+(-0.711982116071)*x[2]
-        arg[0,3,2,1]=(-0.243012743941)*x[0]**o+(-0.692614579016)*x[0]+(0.0986817641914)*x[1]**o+(-0.495735862695)*x[1]+(-0.430040681653)*x[2]**o+(0.0108928722284)*x[2]
-        arg[0,4,0,0]=(0.0989402181558)*x[0]**o+(-0.60096719882)*x[0]+(-0.324253928432)*x[1]**o+(-0.862723687559)*x[1]+(-0.34745416427)*x[2]**o+(0.936559074873)*x[2]
-        arg[0,4,0,1]=(0.711021967566)*x[0]**o+(-0.939408401113)*x[0]+(-0.218100921633)*x[1]**o+(0.92835194875)*x[1]+(-0.353936913865)*x[2]**o+(-0.547266090928)*x[2]
-        arg[0,4,1,0]=(0.172231614188)*x[0]**o+(-0.734622090671)*x[0]+(0.432686916647)*x[1]**o+(0.552595350492)*x[1]+(0.779662641076)*x[2]**o+(-0.0933220492779)*x[2]
-        arg[0,4,1,1]=(0.996776716866)*x[0]**o+(-0.340786520686)*x[0]+(0.260075214171)*x[1]**o+(0.00385504852496)*x[1]+(0.377516772127)*x[2]**o+(-0.341751634181)*x[2]
-        arg[0,4,2,0]=(-0.655642896664)*x[0]**o+(-0.840525173737)*x[0]+(-0.855343721564)*x[1]**o+(0.253558571524)*x[1]+(0.0463733059925)*x[2]**o+(-0.116359866912)*x[2]
-        arg[0,4,2,1]=(0.131619661414)*x[0]**o+(-0.162067255954)*x[0]+(0.562536831367)*x[1]**o+(-0.940412472035)*x[1]+(-0.282265762783)*x[2]**o+(0.634711607923)*x[2]
-        arg[1,0,0,0]=(0.484071808097)*x[0]**o+(0.566763524691)*x[0]+(-0.658614173653)*x[1]**o+(-0.140192232895)*x[1]+(-0.310114236409)*x[2]**o+(-0.918532401595)*x[2]
-        arg[1,0,0,1]=(-0.81190380441)*x[0]**o+(0.644439878497)*x[0]+(0.479583403289)*x[1]**o+(-0.493318882779)*x[1]+(-0.424704492175)*x[2]**o+(0.700624317732)*x[2]
-        arg[1,0,1,0]=(0.766650182435)*x[0]**o+(0.226365545129)*x[0]+(0.510828945971)*x[1]**o+(0.283221954498)*x[1]+(0.817303877886)*x[2]**o+(-0.245709044628)*x[2]
-        arg[1,0,1,1]=(0.194787112664)*x[0]**o+(-0.879306736922)*x[0]+(0.185381291627)*x[1]**o+(-0.510692743975)*x[1]+(-0.422555014055)*x[2]**o+(0.556629919959)*x[2]
-        arg[1,0,2,0]=(-0.958345828895)*x[0]**o+(-0.667735551013)*x[0]+(0.278271284225)*x[1]**o+(-0.0847995194757)*x[1]+(0.902184171441)*x[2]**o+(0.763125168854)*x[2]
-        arg[1,0,2,1]=(-0.0766429670195)*x[0]**o+(0.894421139029)*x[0]+(-0.331560314101)*x[1]**o+(-0.0253297623997)*x[1]+(0.13406045967)*x[2]**o+(-0.326681111625)*x[2]
-        arg[1,1,0,0]=(-0.979406855838)*x[0]**o+(0.528849909402)*x[0]+(-0.0486159476737)*x[1]**o+(-0.898392512695)*x[1]+(-0.678328327407)*x[2]**o+(0.644201802057)*x[2]
-        arg[1,1,0,1]=(-0.977485554605)*x[0]**o+(0.794799941538)*x[0]+(-0.00237183848504)*x[1]**o+(-0.633497483149)*x[1]+(0.746593853568)*x[2]**o+(0.197741126365)*x[2]
-        arg[1,1,1,0]=(0.379985506182)*x[0]**o+(0.69889144234)*x[0]+(-0.507293887409)*x[1]**o+(-0.727675545291)*x[1]+(-0.467064531693)*x[2]**o+(0.130273930089)*x[2]
-        arg[1,1,1,1]=(-0.330627830819)*x[0]**o+(-0.0311542935889)*x[0]+(-0.0671494148749)*x[1]**o+(0.583605469163)*x[1]+(-0.172083996069)*x[2]**o+(0.666718011074)*x[2]
-        arg[1,1,2,0]=(0.539618381063)*x[0]**o+(-0.546796237888)*x[0]+(0.857911750392)*x[1]**o+(0.119552731463)*x[1]+(0.329286820109)*x[2]**o+(0.637240649087)*x[2]
-        arg[1,1,2,1]=(-0.828603071334)*x[0]**o+(0.861799149065)*x[0]+(0.615224040538)*x[1]**o+(-0.0868985543263)*x[1]+(-0.206168997809)*x[2]**o+(0.311103719286)*x[2]
-        arg[1,2,0,0]=(0.695106867715)*x[0]**o+(-0.533303418727)*x[0]+(-0.393936955207)*x[1]**o+(-0.407635261686)*x[1]+(0.604346269147)*x[2]**o+(-0.10213061533)*x[2]
-        arg[1,2,0,1]=(0.338035309929)*x[0]**o+(0.517135412671)*x[0]+(0.277863735829)*x[1]**o+(-0.703417079398)*x[1]+(0.369398635984)*x[2]**o+(-0.952905070601)*x[2]
-        arg[1,2,1,0]=(0.937866603297)*x[0]**o+(0.436121631708)*x[0]+(0.568362098461)*x[1]**o+(0.223837722984)*x[1]+(-0.236896910941)*x[2]**o+(0.316114408308)*x[2]
-        arg[1,2,1,1]=(0.285714491932)*x[0]**o+(0.633321537987)*x[0]+(0.953737237202)*x[1]**o+(0.732065555924)*x[1]+(-0.515759068197)*x[2]**o+(-0.519775334889)*x[2]
-        arg[1,2,2,0]=(-0.0610222303479)*x[0]**o+(0.135974983944)*x[0]+(0.450213393447)*x[1]**o+(-0.44747541715)*x[1]+(-0.640660207187)*x[2]**o+(0.348457261119)*x[2]
-        arg[1,2,2,1]=(0.131753033369)*x[0]**o+(-0.311359549998)*x[0]+(0.445707767235)*x[1]**o+(-0.710795569938)*x[1]+(-0.746038648477)*x[2]**o+(-0.210414773188)*x[2]
-        arg[1,3,0,0]=(-0.323684061289)*x[0]**o+(-0.0937091220282)*x[0]+(-0.827884898323)*x[1]**o+(0.604442907568)*x[1]+(0.620923596379)*x[2]**o+(0.851758170763)*x[2]
-        arg[1,3,0,1]=(-0.269239872573)*x[0]**o+(-0.603248280988)*x[0]+(0.603804530326)*x[1]**o+(-0.331910095046)*x[1]+(-0.653877236308)*x[2]**o+(0.115434865132)*x[2]
-        arg[1,3,1,0]=(0.0531798412869)*x[0]**o+(0.292950346899)*x[0]+(-0.634376081823)*x[1]**o+(-0.775427771578)*x[1]+(-0.987113467149)*x[2]**o+(0.757980444447)*x[2]
-        arg[1,3,1,1]=(0.757807292214)*x[0]**o+(0.81778478971)*x[0]+(-0.619873148405)*x[1]**o+(0.0129855659138)*x[1]+(-0.282861093681)*x[2]**o+(0.667211104045)*x[2]
-        arg[1,3,2,0]=(-0.915205606853)*x[0]**o+(0.918704643459)*x[0]+(0.143238155504)*x[1]**o+(0.0285686377214)*x[1]+(-0.848712843243)*x[2]**o+(0.058647124862)*x[2]
-        arg[1,3,2,1]=(0.441487712831)*x[0]**o+(-0.626878272507)*x[0]+(-0.862579662295)*x[1]**o+(0.204629243832)*x[1]+(0.964143347265)*x[2]**o+(-0.399125844282)*x[2]
-        arg[1,4,0,0]=(-0.349791275126)*x[0]**o+(-0.140293844776)*x[0]+(-0.693879671138)*x[1]**o+(0.429290435637)*x[1]+(-0.892670314048)*x[2]**o+(-0.380777380409)*x[2]
-        arg[1,4,0,1]=(0.528712424647)*x[0]**o+(0.449268002671)*x[0]+(-0.202472214961)*x[1]**o+(-0.374762208851)*x[1]+(-0.625590920648)*x[2]**o+(-0.000776205555531)*x[2]
-        arg[1,4,1,0]=(0.00425881397184)*x[0]**o+(0.265831686248)*x[0]+(0.757626547866)*x[1]**o+(-0.934207064756)*x[1]+(0.541356932538)*x[2]**o+(0.217841597089)*x[2]
-        arg[1,4,1,1]=(-0.02422207106)*x[0]**o+(-0.807018149115)*x[0]+(-0.402347046418)*x[1]**o+(-0.0548851919048)*x[1]+(0.850202044077)*x[2]**o+(-0.889576261979)*x[2]
-        arg[1,4,2,0]=(0.487059068561)*x[0]**o+(0.338254525003)*x[0]+(-0.387019663154)*x[1]**o+(-0.436969552236)*x[1]+(-0.747690766603)*x[2]**o+(0.265854907003)*x[2]
-        arg[1,4,2,1]=(0.687562221132)*x[0]**o+(0.4755782976)*x[0]+(-0.456287111804)*x[1]**o+(0.412138123928)*x[1]+(0.637920334647)*x[2]**o+(0.817007725525)*x[2]
-        arg[2,0,0,0]=(-0.728166422776)*x[0]**o+(0.108904177195)*x[0]+(0.383848108635)*x[1]**o+(-0.19252707292)*x[1]+(-0.279319122495)*x[2]**o+(-0.0530727745585)*x[2]
-        arg[2,0,0,1]=(0.380827452272)*x[0]**o+(-0.133776280687)*x[0]+(-0.174731551283)*x[1]**o+(-0.369231086652)*x[1]+(-0.0190771818046)*x[2]**o+(-0.331873068919)*x[2]
-        arg[2,0,1,0]=(0.653644298826)*x[0]**o+(-0.916110182689)*x[0]+(0.0510855252492)*x[1]**o+(-0.934192949208)*x[1]+(0.572048462784)*x[2]**o+(-0.451401856863)*x[2]
-        arg[2,0,1,1]=(-0.394958497502)*x[0]**o+(-0.690752972227)*x[0]+(-0.436352069349)*x[1]**o+(0.933524576573)*x[1]+(-0.524344161699)*x[2]**o+(0.526748792776)*x[2]
-        arg[2,0,2,0]=(0.845649523782)*x[0]**o+(0.63927747558)*x[0]+(-0.534192218216)*x[1]**o+(0.714500925459)*x[1]+(0.156077814898)*x[2]**o+(-0.193712778792)*x[2]
-        arg[2,0,2,1]=(0.809636640413)*x[0]**o+(-0.930654037481)*x[0]+(0.509441692942)*x[1]**o+(0.881563824585)*x[1]+(0.101333749057)*x[2]**o+(0.418791722704)*x[2]
-        arg[2,1,0,0]=(0.289481281745)*x[0]**o+(-0.98279193802)*x[0]+(-0.443382747319)*x[1]**o+(-0.281710992472)*x[1]+(0.426349350391)*x[2]**o+(-0.870192121251)*x[2]
-        arg[2,1,0,1]=(0.837046002753)*x[0]**o+(-0.0254166983371)*x[0]+(0.30178635814)*x[1]**o+(0.973915444924)*x[1]+(0.298631524734)*x[2]**o+(-0.422490970248)*x[2]
-        arg[2,1,1,0]=(0.869799082394)*x[0]**o+(0.376436513628)*x[0]+(-0.74735679118)*x[1]**o+(0.477184335901)*x[1]+(-0.797472924916)*x[2]**o+(-0.568827873964)*x[2]
-        arg[2,1,1,1]=(0.993441009779)*x[0]**o+(-0.264888299493)*x[0]+(0.861197560367)*x[1]**o+(-0.769058084144)*x[1]+(-0.86221947415)*x[2]**o+(-0.617024169672)*x[2]
-        arg[2,1,2,0]=(-0.89303691749)*x[0]**o+(-0.390287412175)*x[0]+(-0.312883084291)*x[1]**o+(-0.432368502641)*x[1]+(-0.121476666357)*x[2]**o+(0.416361314288)*x[2]
-        arg[2,1,2,1]=(-0.622214426504)*x[0]**o+(-0.595279134338)*x[0]+(0.000927173498715)*x[1]**o+(0.783001179117)*x[1]+(-0.956003738061)*x[2]**o+(0.482321214492)*x[2]
-        arg[2,2,0,0]=(-0.0047994639068)*x[0]**o+(0.478805093492)*x[0]+(0.747825846519)*x[1]**o+(0.0756064430807)*x[1]+(-0.470534826525)*x[2]**o+(-0.421524571831)*x[2]
-        arg[2,2,0,1]=(-0.0569198078126)*x[0]**o+(-0.36284856463)*x[0]+(-0.374343856016)*x[1]**o+(0.193470734451)*x[1]+(0.425350990791)*x[2]**o+(-0.903309757487)*x[2]
-        arg[2,2,1,0]=(0.602075251229)*x[0]**o+(-0.558163518701)*x[0]+(-0.00146699467501)*x[1]**o+(0.437116756605)*x[1]+(-0.252696658318)*x[2]**o+(0.154017654456)*x[2]
-        arg[2,2,1,1]=(0.226970288166)*x[0]**o+(0.844076458869)*x[0]+(0.231874137232)*x[1]**o+(-0.270233945335)*x[1]+(0.365979082276)*x[2]**o+(-0.937144802776)*x[2]
-        arg[2,2,2,0]=(0.662440813722)*x[0]**o+(-0.600830429698)*x[0]+(0.248436486724)*x[1]**o+(0.73439963812)*x[1]+(-0.406317484259)*x[2]**o+(-0.406641354653)*x[2]
-        arg[2,2,2,1]=(0.948630940404)*x[0]**o+(-0.695098513788)*x[0]+(-0.819843883615)*x[1]**o+(0.0479609386435)*x[1]+(-0.968033045837)*x[2]**o+(0.199490071238)*x[2]
-        arg[2,3,0,0]=(0.967996364186)*x[0]**o+(0.562562580668)*x[0]+(0.660658005197)*x[1]**o+(-0.00126241998808)*x[1]+(-0.0188273819622)*x[2]**o+(-0.798370566647)*x[2]
-        arg[2,3,0,1]=(0.108137383906)*x[0]**o+(0.230815090379)*x[0]+(-0.0817434914408)*x[1]**o+(0.256977068172)*x[1]+(0.323454379512)*x[2]**o+(0.0382049771532)*x[2]
-        arg[2,3,1,0]=(-0.279443973124)*x[0]**o+(-0.948014830608)*x[0]+(-0.237787814838)*x[1]**o+(-0.880632864876)*x[1]+(0.305230465688)*x[2]**o+(0.722139326346)*x[2]
-        arg[2,3,1,1]=(-0.192752669063)*x[0]**o+(0.763575125553)*x[0]+(-0.317096602795)*x[1]**o+(-0.241479822867)*x[1]+(0.643154065804)*x[2]**o+(0.903250562165)*x[2]
-        arg[2,3,2,0]=(0.58153852366)*x[0]**o+(-0.131284078682)*x[0]+(0.803022288461)*x[1]**o+(0.862074208938)*x[1]+(0.934648335783)*x[2]**o+(0.720337200812)*x[2]
-        arg[2,3,2,1]=(-0.866755142782)*x[0]**o+(0.299995782189)*x[0]+(0.830022439718)*x[1]**o+(0.787775630269)*x[1]+(-0.436980900353)*x[2]**o+(0.436719598692)*x[2]
-        arg[2,4,0,0]=(-0.416946111972)*x[0]**o+(-0.342692819134)*x[0]+(-0.265712927184)*x[1]**o+(-0.503154497528)*x[1]+(0.436447837569)*x[2]**o+(-0.514226068117)*x[2]
-        arg[2,4,0,1]=(-0.915995315837)*x[0]**o+(-0.562870475868)*x[0]+(0.158881525561)*x[1]**o+(-0.458461594412)*x[1]+(-0.117927681987)*x[2]**o+(-0.697751714189)*x[2]
-        arg[2,4,1,0]=(-0.961291698815)*x[0]**o+(0.457487466485)*x[0]+(0.170987701633)*x[1]**o+(-0.14226156627)*x[1]+(-0.663462703057)*x[2]**o+(-0.0307934454283)*x[2]
-        arg[2,4,1,1]=(0.588162542138)*x[0]**o+(-0.761783611043)*x[0]+(0.510241246326)*x[1]**o+(0.805053446677)*x[1]+(-0.851391511147)*x[2]**o+(-0.0976037736598)*x[2]
-        arg[2,4,2,0]=(0.649047985858)*x[0]**o+(0.677435498282)*x[0]+(-0.620777977748)*x[1]**o+(-0.209440794016)*x[1]+(0.58009322661)*x[2]**o+(0.56317180284)*x[2]
-        arg[2,4,2,1]=(-0.975596464331)*x[0]**o+(0.759364271658)*x[0]+(0.43142780149)*x[1]**o+(-0.701043203786)*x[1]+(-0.648159388134)*x[2]**o+(-0.129618261144)*x[2]
-        arg[3,0,0,0]=(-0.0207100058532)*x[0]**o+(-0.829637327952)*x[0]+(-0.0326040806041)*x[1]**o+(0.652320712227)*x[1]+(-0.509435869246)*x[2]**o+(-0.66044392521)*x[2]
-        arg[3,0,0,1]=(-0.312677151974)*x[0]**o+(0.0204494340128)*x[0]+(-0.989457740146)*x[1]**o+(-0.0606077687298)*x[1]+(-0.527267756606)*x[2]**o+(0.496006274201)*x[2]
-        arg[3,0,1,0]=(0.842871894549)*x[0]**o+(-0.577687338895)*x[0]+(0.414019506131)*x[1]**o+(0.0410521331015)*x[1]+(-0.830482660184)*x[2]**o+(0.688692187619)*x[2]
-        arg[3,0,1,1]=(-0.920070939376)*x[0]**o+(0.632972952755)*x[0]+(0.944186412149)*x[1]**o+(0.620319712728)*x[1]+(-0.171433727161)*x[2]**o+(0.267125744191)*x[2]
-        arg[3,0,2,0]=(-0.0669535338492)*x[0]**o+(0.249181230746)*x[0]+(-0.147448553328)*x[1]**o+(-0.459701695839)*x[1]+(0.378458172384)*x[2]**o+(0.916594147889)*x[2]
-        arg[3,0,2,1]=(0.0720111269432)*x[0]**o+(-0.390032127319)*x[0]+(-0.115565740734)*x[1]**o+(0.501210832815)*x[1]+(0.568129023658)*x[2]**o+(-0.303909080042)*x[2]
-        arg[3,1,0,0]=(0.205675480731)*x[0]**o+(-0.843093328795)*x[0]+(-0.812415573635)*x[1]**o+(-0.706806177394)*x[1]+(-0.158442718286)*x[2]**o+(0.15187176613)*x[2]
-        arg[3,1,0,1]=(0.149669308017)*x[0]**o+(0.487445503149)*x[0]+(-0.27973905833)*x[1]**o+(-0.504992462225)*x[1]+(-0.728166691522)*x[2]**o+(0.734846267391)*x[2]
-        arg[3,1,1,0]=(0.0410578015251)*x[0]**o+(-0.525001495676)*x[0]+(-0.512685697472)*x[1]**o+(-0.284314686987)*x[1]+(0.888112049081)*x[2]**o+(0.425466793802)*x[2]
-        arg[3,1,1,1]=(-0.374237047043)*x[0]**o+(-0.00078724690461)*x[0]+(0.849952487348)*x[1]**o+(-0.654945893799)*x[1]+(-0.536739132177)*x[2]**o+(0.20919294066)*x[2]
-        arg[3,1,2,0]=(0.685749084068)*x[0]**o+(-0.730378478543)*x[0]+(-0.918072746761)*x[1]**o+(-0.706713872062)*x[1]+(-0.486100957526)*x[2]**o+(0.95736939257)*x[2]
-        arg[3,1,2,1]=(-0.287859736321)*x[0]**o+(-0.271882215207)*x[0]+(-0.673357024623)*x[1]**o+(0.702867457627)*x[1]+(0.78445294416)*x[2]**o+(0.613888365259)*x[2]
-        arg[3,2,0,0]=(0.568506008135)*x[0]**o+(-0.825947283734)*x[0]+(0.687369924271)*x[1]**o+(-0.866597782569)*x[1]+(-0.332810902355)*x[2]**o+(0.499502049139)*x[2]
-        arg[3,2,0,1]=(0.757251773732)*x[0]**o+(0.293337812465)*x[0]+(0.686709285382)*x[1]**o+(-0.084997189402)*x[1]+(-0.338903817381)*x[2]**o+(-0.787646799698)*x[2]
-        arg[3,2,1,0]=(-0.580327419983)*x[0]**o+(-0.603952498996)*x[0]+(0.523057988618)*x[1]**o+(-0.0835187394107)*x[1]+(0.459827887147)*x[2]**o+(0.689021201042)*x[2]
-        arg[3,2,1,1]=(-0.41923416619)*x[0]**o+(0.0406426957237)*x[0]+(-0.908041008186)*x[1]**o+(0.382097138462)*x[1]+(0.66835706849)*x[2]**o+(0.355849275378)*x[2]
-        arg[3,2,2,0]=(-0.133756767108)*x[0]**o+(-0.233743496333)*x[0]+(-0.661420120856)*x[1]**o+(0.788722576584)*x[1]+(-0.131764585707)*x[2]**o+(-0.781004479871)*x[2]
-        arg[3,2,2,1]=(0.0308645139784)*x[0]**o+(-0.194986246344)*x[0]+(-0.267418187303)*x[1]**o+(0.332143733168)*x[1]+(0.513266431894)*x[2]**o+(0.594016981473)*x[2]
-        arg[3,3,0,0]=(0.644314102613)*x[0]**o+(-0.977355279476)*x[0]+(0.516452323667)*x[1]**o+(0.172873579919)*x[1]+(0.778904819969)*x[2]**o+(0.559689750425)*x[2]
-        arg[3,3,0,1]=(0.736135986201)*x[0]**o+(0.366918250826)*x[0]+(-0.0547007988818)*x[1]**o+(-0.830174436433)*x[1]+(0.613440124338)*x[2]**o+(0.574992469591)*x[2]
-        arg[3,3,1,0]=(0.324504938146)*x[0]**o+(-0.915240176689)*x[0]+(-0.398105336249)*x[1]**o+(-0.526498343533)*x[1]+(0.43264573336)*x[2]**o+(0.393008086529)*x[2]
-        arg[3,3,1,1]=(0.926367438323)*x[0]**o+(0.526364305462)*x[0]+(0.15596582236)*x[1]**o+(0.165158439711)*x[1]+(-0.508505348973)*x[2]**o+(-0.603637833992)*x[2]
-        arg[3,3,2,0]=(0.661333046004)*x[0]**o+(0.425320373512)*x[0]+(-0.810809051016)*x[1]**o+(0.20446843023)*x[1]+(0.685136412413)*x[2]**o+(-0.0281127019894)*x[2]
-        arg[3,3,2,1]=(0.851742499007)*x[0]**o+(-0.405506974975)*x[0]+(-0.296768983731)*x[1]**o+(0.389557354929)*x[1]+(0.335108341463)*x[2]**o+(0.0313094433351)*x[2]
-        arg[3,4,0,0]=(0.0415035498649)*x[0]**o+(0.827106496882)*x[0]+(-0.481831487377)*x[1]**o+(-0.14935685817)*x[1]+(0.354765095566)*x[2]**o+(0.521898910137)*x[2]
-        arg[3,4,0,1]=(-0.36328099035)*x[0]**o+(-0.243342386595)*x[0]+(0.0475935188475)*x[1]**o+(0.845308417697)*x[1]+(0.315259620082)*x[2]**o+(0.541313742759)*x[2]
-        arg[3,4,1,0]=(-0.66364149672)*x[0]**o+(0.987505978353)*x[0]+(-0.337659775957)*x[1]**o+(0.197277151989)*x[1]+(-0.431260870605)*x[2]**o+(-0.803375909471)*x[2]
-        arg[3,4,1,1]=(0.722104365428)*x[0]**o+(0.168416682879)*x[0]+(-0.415740544748)*x[1]**o+(-0.437836696476)*x[1]+(-0.280581752598)*x[2]**o+(0.434326371762)*x[2]
-        arg[3,4,2,0]=(0.673144889684)*x[0]**o+(-0.0628529591764)*x[0]+(0.0161458704408)*x[1]**o+(-0.439966404278)*x[1]+(-0.963402070447)*x[2]**o+(0.308312287021)*x[2]
-        arg[3,4,2,1]=(0.649131384887)*x[0]**o+(-0.825086043001)*x[0]+(0.204615530143)*x[1]**o+(0.00801105023644)*x[1]+(-0.234754758061)*x[2]**o+(0.659650083864)*x[2]
-        ref[0,0,0,0]=(-0.928996629952)*x_ref[0]**o+(-0.171383074114)*x_ref[0]+(-0.324423798901)*x_ref[1]**o+(-0.801354053962)*x_ref[1]+(0.365256142808)*x_ref[2]**o+(0.126262208857)*x_ref[2]
-        ref[0,0,0,1]=(0.326024843626)*x_ref[0]**o+(-0.0091566240426)*x_ref[0]+(-0.0396235158589)*x_ref[1]**o+(-0.753302577837)*x_ref[1]+(-0.38709916587)*x_ref[2]**o+(-0.28660316595)*x_ref[2]
-        ref[0,0,1,0]=(0.755338255506)*x_ref[0]**o+(0.851895434343)*x_ref[0]+(0.419119464402)*x_ref[1]**o+(0.670733085023)*x_ref[1]+(0.819398310958)*x_ref[2]**o+(0.476185335773)*x_ref[2]
-        ref[0,0,1,1]=(-0.981416259131)*x_ref[0]**o+(-0.97000252267)*x_ref[0]+(-0.132624451699)*x_ref[1]**o+(-0.261428370649)*x_ref[1]+(-0.349245951727)*x_ref[2]**o+(-0.717343195877)*x_ref[2]
-        ref[0,0,2,0]=(-0.874826075266)*x_ref[0]**o+(-0.399307905707)*x_ref[0]+(0.350873599317)*x_ref[1]**o+(0.15861651992)*x_ref[1]+(0.396279933216)*x_ref[2]**o+(0.92332515708)*x_ref[2]
-        ref[0,0,2,1]=(-0.183596683527)*x_ref[0]**o+(-0.115194639348)*x_ref[0]+(0.616111723618)*x_ref[1]**o+(-0.402157657669)*x_ref[1]+(0.44145594193)*x_ref[2]**o+(0.686052407784)*x_ref[2]
-        ref[0,1,0,0]=(-0.669169178244)*x_ref[0]**o+(0.835937801609)*x_ref[0]+(0.468805302181)*x_ref[1]**o+(-0.627292634023)*x_ref[1]+(-0.674361231979)*x_ref[2]**o+(-0.00929181785129)*x_ref[2]
-        ref[0,1,0,1]=(-0.568131655705)*x_ref[0]**o+(0.690366535852)*x_ref[0]+(-0.212524396914)*x_ref[1]**o+(-0.767983769407)*x_ref[1]+(0.477500128569)*x_ref[2]**o+(-0.0190887598644)*x_ref[2]
-        ref[0,1,1,0]=(-0.374170635822)*x_ref[0]**o+(0.0169009974558)*x_ref[0]+(-0.162519103357)*x_ref[1]**o+(0.786991144449)*x_ref[1]+(0.0590294918131)*x_ref[2]**o+(-0.213442509309)*x_ref[2]
-        ref[0,1,1,1]=(-0.558268657439)*x_ref[0]**o+(0.584734933669)*x_ref[0]+(-0.650790013689)*x_ref[1]**o+(-0.192849048407)*x_ref[1]+(0.505458636714)*x_ref[2]**o+(-0.585174281371)*x_ref[2]
-        ref[0,1,2,0]=(-0.933243590775)*x_ref[0]**o+(0.528060249767)*x_ref[0]+(-0.763255746252)*x_ref[1]**o+(0.771589118163)*x_ref[1]+(-0.641287604338)*x_ref[2]**o+(0.379566401585)*x_ref[2]
-        ref[0,1,2,1]=(-0.836976373935)*x_ref[0]**o+(-0.969434110974)*x_ref[0]+(0.758148372888)*x_ref[1]**o+(-0.89212062535)*x_ref[1]+(0.788693820015)*x_ref[2]**o+(-0.620704367414)*x_ref[2]
-        ref[0,2,0,0]=(0.0163117360814)*x_ref[0]**o+(-0.390867752068)*x_ref[0]+(-0.725068297982)*x_ref[1]**o+(-0.680312496646)*x_ref[1]+(0.069273494969)*x_ref[2]**o+(-0.576122275696)*x_ref[2]
-        ref[0,2,0,1]=(0.461771197614)*x_ref[0]**o+(-0.767541404109)*x_ref[0]+(-0.694279263622)*x_ref[1]**o+(-0.721448812749)*x_ref[1]+(0.248787896584)*x_ref[2]**o+(0.237075401327)*x_ref[2]
-        ref[0,2,1,0]=(0.381987012965)*x_ref[0]**o+(-0.288236233238)*x_ref[0]+(-0.519012025084)*x_ref[1]**o+(-0.256658293082)*x_ref[1]+(0.807322167368)*x_ref[2]**o+(-0.261916179859)*x_ref[2]
-        ref[0,2,1,1]=(0.257241267407)*x_ref[0]**o+(-0.470612990721)*x_ref[0]+(-0.208612656448)*x_ref[1]**o+(0.839646962914)*x_ref[1]+(0.916675150494)*x_ref[2]**o+(-0.165468351005)*x_ref[2]
-        ref[0,2,2,0]=(0.92569232521)*x_ref[0]**o+(0.809982458308)*x_ref[0]+(-0.860530305336)*x_ref[1]**o+(0.261687622817)*x_ref[1]+(0.948003684651)*x_ref[2]**o+(-0.473133742361)*x_ref[2]
-        ref[0,2,2,1]=(-0.113846814874)*x_ref[0]**o+(0.680846459377)*x_ref[0]+(0.920219149741)*x_ref[1]**o+(0.172027554503)*x_ref[1]+(0.475330041115)*x_ref[2]**o+(-0.176218891429)*x_ref[2]
-        ref[0,3,0,0]=(-0.948638294297)*x_ref[0]**o+(-0.0411621070703)*x_ref[0]+(-0.294759271027)*x_ref[1]**o+(-0.903733455086)*x_ref[1]+(-0.995253733593)*x_ref[2]**o+(0.106726960462)*x_ref[2]
-        ref[0,3,0,1]=(0.1592709614)*x_ref[0]**o+(0.0683266445293)*x_ref[0]+(0.336092506745)*x_ref[1]**o+(-0.209047739881)*x_ref[1]+(-0.330417243459)*x_ref[2]**o+(-0.809242647755)*x_ref[2]
-        ref[0,3,1,0]=(-0.680637516359)*x_ref[0]**o+(-0.713405815404)*x_ref[0]+(-0.484624435043)*x_ref[1]**o+(-0.279314462332)*x_ref[1]+(-0.458856066504)*x_ref[2]**o+(0.0588111305227)*x_ref[2]
-        ref[0,3,1,1]=(-0.853676338655)*x_ref[0]**o+(-0.651539814195)*x_ref[0]+(-0.109727277725)*x_ref[1]**o+(0.0139006407942)*x_ref[1]+(0.231943245426)*x_ref[2]**o+(0.42972517233)*x_ref[2]
-        ref[0,3,2,0]=(-0.60799269765)*x_ref[0]**o+(-0.802413269128)*x_ref[0]+(0.151362498863)*x_ref[1]**o+(-0.678226252875)*x_ref[1]+(-0.867117685659)*x_ref[2]**o+(-0.711982116071)*x_ref[2]
-        ref[0,3,2,1]=(-0.243012743941)*x_ref[0]**o+(-0.692614579016)*x_ref[0]+(0.0986817641914)*x_ref[1]**o+(-0.495735862695)*x_ref[1]+(-0.430040681653)*x_ref[2]**o+(0.0108928722284)*x_ref[2]
-        ref[0,4,0,0]=(0.0989402181558)*x_ref[0]**o+(-0.60096719882)*x_ref[0]+(-0.324253928432)*x_ref[1]**o+(-0.862723687559)*x_ref[1]+(-0.34745416427)*x_ref[2]**o+(0.936559074873)*x_ref[2]
-        ref[0,4,0,1]=(0.711021967566)*x_ref[0]**o+(-0.939408401113)*x_ref[0]+(-0.218100921633)*x_ref[1]**o+(0.92835194875)*x_ref[1]+(-0.353936913865)*x_ref[2]**o+(-0.547266090928)*x_ref[2]
-        ref[0,4,1,0]=(0.172231614188)*x_ref[0]**o+(-0.734622090671)*x_ref[0]+(0.432686916647)*x_ref[1]**o+(0.552595350492)*x_ref[1]+(0.779662641076)*x_ref[2]**o+(-0.0933220492779)*x_ref[2]
-        ref[0,4,1,1]=(0.996776716866)*x_ref[0]**o+(-0.340786520686)*x_ref[0]+(0.260075214171)*x_ref[1]**o+(0.00385504852496)*x_ref[1]+(0.377516772127)*x_ref[2]**o+(-0.341751634181)*x_ref[2]
-        ref[0,4,2,0]=(-0.655642896664)*x_ref[0]**o+(-0.840525173737)*x_ref[0]+(-0.855343721564)*x_ref[1]**o+(0.253558571524)*x_ref[1]+(0.0463733059925)*x_ref[2]**o+(-0.116359866912)*x_ref[2]
-        ref[0,4,2,1]=(0.131619661414)*x_ref[0]**o+(-0.162067255954)*x_ref[0]+(0.562536831367)*x_ref[1]**o+(-0.940412472035)*x_ref[1]+(-0.282265762783)*x_ref[2]**o+(0.634711607923)*x_ref[2]
-        ref[1,0,0,0]=(0.484071808097)*x_ref[0]**o+(0.566763524691)*x_ref[0]+(-0.658614173653)*x_ref[1]**o+(-0.140192232895)*x_ref[1]+(-0.310114236409)*x_ref[2]**o+(-0.918532401595)*x_ref[2]
-        ref[1,0,0,1]=(-0.81190380441)*x_ref[0]**o+(0.644439878497)*x_ref[0]+(0.479583403289)*x_ref[1]**o+(-0.493318882779)*x_ref[1]+(-0.424704492175)*x_ref[2]**o+(0.700624317732)*x_ref[2]
-        ref[1,0,1,0]=(0.766650182435)*x_ref[0]**o+(0.226365545129)*x_ref[0]+(0.510828945971)*x_ref[1]**o+(0.283221954498)*x_ref[1]+(0.817303877886)*x_ref[2]**o+(-0.245709044628)*x_ref[2]
-        ref[1,0,1,1]=(0.194787112664)*x_ref[0]**o+(-0.879306736922)*x_ref[0]+(0.185381291627)*x_ref[1]**o+(-0.510692743975)*x_ref[1]+(-0.422555014055)*x_ref[2]**o+(0.556629919959)*x_ref[2]
-        ref[1,0,2,0]=(-0.958345828895)*x_ref[0]**o+(-0.667735551013)*x_ref[0]+(0.278271284225)*x_ref[1]**o+(-0.0847995194757)*x_ref[1]+(0.902184171441)*x_ref[2]**o+(0.763125168854)*x_ref[2]
-        ref[1,0,2,1]=(-0.0766429670195)*x_ref[0]**o+(0.894421139029)*x_ref[0]+(-0.331560314101)*x_ref[1]**o+(-0.0253297623997)*x_ref[1]+(0.13406045967)*x_ref[2]**o+(-0.326681111625)*x_ref[2]
-        ref[1,1,0,0]=(-0.979406855838)*x_ref[0]**o+(0.528849909402)*x_ref[0]+(-0.0486159476737)*x_ref[1]**o+(-0.898392512695)*x_ref[1]+(-0.678328327407)*x_ref[2]**o+(0.644201802057)*x_ref[2]
-        ref[1,1,0,1]=(-0.977485554605)*x_ref[0]**o+(0.794799941538)*x_ref[0]+(-0.00237183848504)*x_ref[1]**o+(-0.633497483149)*x_ref[1]+(0.746593853568)*x_ref[2]**o+(0.197741126365)*x_ref[2]
-        ref[1,1,1,0]=(0.379985506182)*x_ref[0]**o+(0.69889144234)*x_ref[0]+(-0.507293887409)*x_ref[1]**o+(-0.727675545291)*x_ref[1]+(-0.467064531693)*x_ref[2]**o+(0.130273930089)*x_ref[2]
-        ref[1,1,1,1]=(-0.330627830819)*x_ref[0]**o+(-0.0311542935889)*x_ref[0]+(-0.0671494148749)*x_ref[1]**o+(0.583605469163)*x_ref[1]+(-0.172083996069)*x_ref[2]**o+(0.666718011074)*x_ref[2]
-        ref[1,1,2,0]=(0.539618381063)*x_ref[0]**o+(-0.546796237888)*x_ref[0]+(0.857911750392)*x_ref[1]**o+(0.119552731463)*x_ref[1]+(0.329286820109)*x_ref[2]**o+(0.637240649087)*x_ref[2]
-        ref[1,1,2,1]=(-0.828603071334)*x_ref[0]**o+(0.861799149065)*x_ref[0]+(0.615224040538)*x_ref[1]**o+(-0.0868985543263)*x_ref[1]+(-0.206168997809)*x_ref[2]**o+(0.311103719286)*x_ref[2]
-        ref[1,2,0,0]=(0.695106867715)*x_ref[0]**o+(-0.533303418727)*x_ref[0]+(-0.393936955207)*x_ref[1]**o+(-0.407635261686)*x_ref[1]+(0.604346269147)*x_ref[2]**o+(-0.10213061533)*x_ref[2]
-        ref[1,2,0,1]=(0.338035309929)*x_ref[0]**o+(0.517135412671)*x_ref[0]+(0.277863735829)*x_ref[1]**o+(-0.703417079398)*x_ref[1]+(0.369398635984)*x_ref[2]**o+(-0.952905070601)*x_ref[2]
-        ref[1,2,1,0]=(0.937866603297)*x_ref[0]**o+(0.436121631708)*x_ref[0]+(0.568362098461)*x_ref[1]**o+(0.223837722984)*x_ref[1]+(-0.236896910941)*x_ref[2]**o+(0.316114408308)*x_ref[2]
-        ref[1,2,1,1]=(0.285714491932)*x_ref[0]**o+(0.633321537987)*x_ref[0]+(0.953737237202)*x_ref[1]**o+(0.732065555924)*x_ref[1]+(-0.515759068197)*x_ref[2]**o+(-0.519775334889)*x_ref[2]
-        ref[1,2,2,0]=(-0.0610222303479)*x_ref[0]**o+(0.135974983944)*x_ref[0]+(0.450213393447)*x_ref[1]**o+(-0.44747541715)*x_ref[1]+(-0.640660207187)*x_ref[2]**o+(0.348457261119)*x_ref[2]
-        ref[1,2,2,1]=(0.131753033369)*x_ref[0]**o+(-0.311359549998)*x_ref[0]+(0.445707767235)*x_ref[1]**o+(-0.710795569938)*x_ref[1]+(-0.746038648477)*x_ref[2]**o+(-0.210414773188)*x_ref[2]
-        ref[1,3,0,0]=(-0.323684061289)*x_ref[0]**o+(-0.0937091220282)*x_ref[0]+(-0.827884898323)*x_ref[1]**o+(0.604442907568)*x_ref[1]+(0.620923596379)*x_ref[2]**o+(0.851758170763)*x_ref[2]
-        ref[1,3,0,1]=(-0.269239872573)*x_ref[0]**o+(-0.603248280988)*x_ref[0]+(0.603804530326)*x_ref[1]**o+(-0.331910095046)*x_ref[1]+(-0.653877236308)*x_ref[2]**o+(0.115434865132)*x_ref[2]
-        ref[1,3,1,0]=(0.0531798412869)*x_ref[0]**o+(0.292950346899)*x_ref[0]+(-0.634376081823)*x_ref[1]**o+(-0.775427771578)*x_ref[1]+(-0.987113467149)*x_ref[2]**o+(0.757980444447)*x_ref[2]
-        ref[1,3,1,1]=(0.757807292214)*x_ref[0]**o+(0.81778478971)*x_ref[0]+(-0.619873148405)*x_ref[1]**o+(0.0129855659138)*x_ref[1]+(-0.282861093681)*x_ref[2]**o+(0.667211104045)*x_ref[2]
-        ref[1,3,2,0]=(-0.915205606853)*x_ref[0]**o+(0.918704643459)*x_ref[0]+(0.143238155504)*x_ref[1]**o+(0.0285686377214)*x_ref[1]+(-0.848712843243)*x_ref[2]**o+(0.058647124862)*x_ref[2]
-        ref[1,3,2,1]=(0.441487712831)*x_ref[0]**o+(-0.626878272507)*x_ref[0]+(-0.862579662295)*x_ref[1]**o+(0.204629243832)*x_ref[1]+(0.964143347265)*x_ref[2]**o+(-0.399125844282)*x_ref[2]
-        ref[1,4,0,0]=(-0.349791275126)*x_ref[0]**o+(-0.140293844776)*x_ref[0]+(-0.693879671138)*x_ref[1]**o+(0.429290435637)*x_ref[1]+(-0.892670314048)*x_ref[2]**o+(-0.380777380409)*x_ref[2]
-        ref[1,4,0,1]=(0.528712424647)*x_ref[0]**o+(0.449268002671)*x_ref[0]+(-0.202472214961)*x_ref[1]**o+(-0.374762208851)*x_ref[1]+(-0.625590920648)*x_ref[2]**o+(-0.000776205555531)*x_ref[2]
-        ref[1,4,1,0]=(0.00425881397184)*x_ref[0]**o+(0.265831686248)*x_ref[0]+(0.757626547866)*x_ref[1]**o+(-0.934207064756)*x_ref[1]+(0.541356932538)*x_ref[2]**o+(0.217841597089)*x_ref[2]
-        ref[1,4,1,1]=(-0.02422207106)*x_ref[0]**o+(-0.807018149115)*x_ref[0]+(-0.402347046418)*x_ref[1]**o+(-0.0548851919048)*x_ref[1]+(0.850202044077)*x_ref[2]**o+(-0.889576261979)*x_ref[2]
-        ref[1,4,2,0]=(0.487059068561)*x_ref[0]**o+(0.338254525003)*x_ref[0]+(-0.387019663154)*x_ref[1]**o+(-0.436969552236)*x_ref[1]+(-0.747690766603)*x_ref[2]**o+(0.265854907003)*x_ref[2]
-        ref[1,4,2,1]=(0.687562221132)*x_ref[0]**o+(0.4755782976)*x_ref[0]+(-0.456287111804)*x_ref[1]**o+(0.412138123928)*x_ref[1]+(0.637920334647)*x_ref[2]**o+(0.817007725525)*x_ref[2]
-        ref[2,0,0,0]=(-0.728166422776)*x_ref[0]**o+(0.108904177195)*x_ref[0]+(0.383848108635)*x_ref[1]**o+(-0.19252707292)*x_ref[1]+(-0.279319122495)*x_ref[2]**o+(-0.0530727745585)*x_ref[2]
-        ref[2,0,0,1]=(0.380827452272)*x_ref[0]**o+(-0.133776280687)*x_ref[0]+(-0.174731551283)*x_ref[1]**o+(-0.369231086652)*x_ref[1]+(-0.0190771818046)*x_ref[2]**o+(-0.331873068919)*x_ref[2]
-        ref[2,0,1,0]=(0.653644298826)*x_ref[0]**o+(-0.916110182689)*x_ref[0]+(0.0510855252492)*x_ref[1]**o+(-0.934192949208)*x_ref[1]+(0.572048462784)*x_ref[2]**o+(-0.451401856863)*x_ref[2]
-        ref[2,0,1,1]=(-0.394958497502)*x_ref[0]**o+(-0.690752972227)*x_ref[0]+(-0.436352069349)*x_ref[1]**o+(0.933524576573)*x_ref[1]+(-0.524344161699)*x_ref[2]**o+(0.526748792776)*x_ref[2]
-        ref[2,0,2,0]=(0.845649523782)*x_ref[0]**o+(0.63927747558)*x_ref[0]+(-0.534192218216)*x_ref[1]**o+(0.714500925459)*x_ref[1]+(0.156077814898)*x_ref[2]**o+(-0.193712778792)*x_ref[2]
-        ref[2,0,2,1]=(0.809636640413)*x_ref[0]**o+(-0.930654037481)*x_ref[0]+(0.509441692942)*x_ref[1]**o+(0.881563824585)*x_ref[1]+(0.101333749057)*x_ref[2]**o+(0.418791722704)*x_ref[2]
-        ref[2,1,0,0]=(0.289481281745)*x_ref[0]**o+(-0.98279193802)*x_ref[0]+(-0.443382747319)*x_ref[1]**o+(-0.281710992472)*x_ref[1]+(0.426349350391)*x_ref[2]**o+(-0.870192121251)*x_ref[2]
-        ref[2,1,0,1]=(0.837046002753)*x_ref[0]**o+(-0.0254166983371)*x_ref[0]+(0.30178635814)*x_ref[1]**o+(0.973915444924)*x_ref[1]+(0.298631524734)*x_ref[2]**o+(-0.422490970248)*x_ref[2]
-        ref[2,1,1,0]=(0.869799082394)*x_ref[0]**o+(0.376436513628)*x_ref[0]+(-0.74735679118)*x_ref[1]**o+(0.477184335901)*x_ref[1]+(-0.797472924916)*x_ref[2]**o+(-0.568827873964)*x_ref[2]
-        ref[2,1,1,1]=(0.993441009779)*x_ref[0]**o+(-0.264888299493)*x_ref[0]+(0.861197560367)*x_ref[1]**o+(-0.769058084144)*x_ref[1]+(-0.86221947415)*x_ref[2]**o+(-0.617024169672)*x_ref[2]
-        ref[2,1,2,0]=(-0.89303691749)*x_ref[0]**o+(-0.390287412175)*x_ref[0]+(-0.312883084291)*x_ref[1]**o+(-0.432368502641)*x_ref[1]+(-0.121476666357)*x_ref[2]**o+(0.416361314288)*x_ref[2]
-        ref[2,1,2,1]=(-0.622214426504)*x_ref[0]**o+(-0.595279134338)*x_ref[0]+(0.000927173498715)*x_ref[1]**o+(0.783001179117)*x_ref[1]+(-0.956003738061)*x_ref[2]**o+(0.482321214492)*x_ref[2]
-        ref[2,2,0,0]=(-0.0047994639068)*x_ref[0]**o+(0.478805093492)*x_ref[0]+(0.747825846519)*x_ref[1]**o+(0.0756064430807)*x_ref[1]+(-0.470534826525)*x_ref[2]**o+(-0.421524571831)*x_ref[2]
-        ref[2,2,0,1]=(-0.0569198078126)*x_ref[0]**o+(-0.36284856463)*x_ref[0]+(-0.374343856016)*x_ref[1]**o+(0.193470734451)*x_ref[1]+(0.425350990791)*x_ref[2]**o+(-0.903309757487)*x_ref[2]
-        ref[2,2,1,0]=(0.602075251229)*x_ref[0]**o+(-0.558163518701)*x_ref[0]+(-0.00146699467501)*x_ref[1]**o+(0.437116756605)*x_ref[1]+(-0.252696658318)*x_ref[2]**o+(0.154017654456)*x_ref[2]
-        ref[2,2,1,1]=(0.226970288166)*x_ref[0]**o+(0.844076458869)*x_ref[0]+(0.231874137232)*x_ref[1]**o+(-0.270233945335)*x_ref[1]+(0.365979082276)*x_ref[2]**o+(-0.937144802776)*x_ref[2]
-        ref[2,2,2,0]=(0.662440813722)*x_ref[0]**o+(-0.600830429698)*x_ref[0]+(0.248436486724)*x_ref[1]**o+(0.73439963812)*x_ref[1]+(-0.406317484259)*x_ref[2]**o+(-0.406641354653)*x_ref[2]
-        ref[2,2,2,1]=(0.948630940404)*x_ref[0]**o+(-0.695098513788)*x_ref[0]+(-0.819843883615)*x_ref[1]**o+(0.0479609386435)*x_ref[1]+(-0.968033045837)*x_ref[2]**o+(0.199490071238)*x_ref[2]
-        ref[2,3,0,0]=(0.967996364186)*x_ref[0]**o+(0.562562580668)*x_ref[0]+(0.660658005197)*x_ref[1]**o+(-0.00126241998808)*x_ref[1]+(-0.0188273819622)*x_ref[2]**o+(-0.798370566647)*x_ref[2]
-        ref[2,3,0,1]=(0.108137383906)*x_ref[0]**o+(0.230815090379)*x_ref[0]+(-0.0817434914408)*x_ref[1]**o+(0.256977068172)*x_ref[1]+(0.323454379512)*x_ref[2]**o+(0.0382049771532)*x_ref[2]
-        ref[2,3,1,0]=(-0.279443973124)*x_ref[0]**o+(-0.948014830608)*x_ref[0]+(-0.237787814838)*x_ref[1]**o+(-0.880632864876)*x_ref[1]+(0.305230465688)*x_ref[2]**o+(0.722139326346)*x_ref[2]
-        ref[2,3,1,1]=(-0.192752669063)*x_ref[0]**o+(0.763575125553)*x_ref[0]+(-0.317096602795)*x_ref[1]**o+(-0.241479822867)*x_ref[1]+(0.643154065804)*x_ref[2]**o+(0.903250562165)*x_ref[2]
-        ref[2,3,2,0]=(0.58153852366)*x_ref[0]**o+(-0.131284078682)*x_ref[0]+(0.803022288461)*x_ref[1]**o+(0.862074208938)*x_ref[1]+(0.934648335783)*x_ref[2]**o+(0.720337200812)*x_ref[2]
-        ref[2,3,2,1]=(-0.866755142782)*x_ref[0]**o+(0.299995782189)*x_ref[0]+(0.830022439718)*x_ref[1]**o+(0.787775630269)*x_ref[1]+(-0.436980900353)*x_ref[2]**o+(0.436719598692)*x_ref[2]
-        ref[2,4,0,0]=(-0.416946111972)*x_ref[0]**o+(-0.342692819134)*x_ref[0]+(-0.265712927184)*x_ref[1]**o+(-0.503154497528)*x_ref[1]+(0.436447837569)*x_ref[2]**o+(-0.514226068117)*x_ref[2]
-        ref[2,4,0,1]=(-0.915995315837)*x_ref[0]**o+(-0.562870475868)*x_ref[0]+(0.158881525561)*x_ref[1]**o+(-0.458461594412)*x_ref[1]+(-0.117927681987)*x_ref[2]**o+(-0.697751714189)*x_ref[2]
-        ref[2,4,1,0]=(-0.961291698815)*x_ref[0]**o+(0.457487466485)*x_ref[0]+(0.170987701633)*x_ref[1]**o+(-0.14226156627)*x_ref[1]+(-0.663462703057)*x_ref[2]**o+(-0.0307934454283)*x_ref[2]
-        ref[2,4,1,1]=(0.588162542138)*x_ref[0]**o+(-0.761783611043)*x_ref[0]+(0.510241246326)*x_ref[1]**o+(0.805053446677)*x_ref[1]+(-0.851391511147)*x_ref[2]**o+(-0.0976037736598)*x_ref[2]
-        ref[2,4,2,0]=(0.649047985858)*x_ref[0]**o+(0.677435498282)*x_ref[0]+(-0.620777977748)*x_ref[1]**o+(-0.209440794016)*x_ref[1]+(0.58009322661)*x_ref[2]**o+(0.56317180284)*x_ref[2]
-        ref[2,4,2,1]=(-0.975596464331)*x_ref[0]**o+(0.759364271658)*x_ref[0]+(0.43142780149)*x_ref[1]**o+(-0.701043203786)*x_ref[1]+(-0.648159388134)*x_ref[2]**o+(-0.129618261144)*x_ref[2]
-        ref[3,0,0,0]=(-0.0207100058532)*x_ref[0]**o+(-0.829637327952)*x_ref[0]+(-0.0326040806041)*x_ref[1]**o+(0.652320712227)*x_ref[1]+(-0.509435869246)*x_ref[2]**o+(-0.66044392521)*x_ref[2]
-        ref[3,0,0,1]=(-0.312677151974)*x_ref[0]**o+(0.0204494340128)*x_ref[0]+(-0.989457740146)*x_ref[1]**o+(-0.0606077687298)*x_ref[1]+(-0.527267756606)*x_ref[2]**o+(0.496006274201)*x_ref[2]
-        ref[3,0,1,0]=(0.842871894549)*x_ref[0]**o+(-0.577687338895)*x_ref[0]+(0.414019506131)*x_ref[1]**o+(0.0410521331015)*x_ref[1]+(-0.830482660184)*x_ref[2]**o+(0.688692187619)*x_ref[2]
-        ref[3,0,1,1]=(-0.920070939376)*x_ref[0]**o+(0.632972952755)*x_ref[0]+(0.944186412149)*x_ref[1]**o+(0.620319712728)*x_ref[1]+(-0.171433727161)*x_ref[2]**o+(0.267125744191)*x_ref[2]
-        ref[3,0,2,0]=(-0.0669535338492)*x_ref[0]**o+(0.249181230746)*x_ref[0]+(-0.147448553328)*x_ref[1]**o+(-0.459701695839)*x_ref[1]+(0.378458172384)*x_ref[2]**o+(0.916594147889)*x_ref[2]
-        ref[3,0,2,1]=(0.0720111269432)*x_ref[0]**o+(-0.390032127319)*x_ref[0]+(-0.115565740734)*x_ref[1]**o+(0.501210832815)*x_ref[1]+(0.568129023658)*x_ref[2]**o+(-0.303909080042)*x_ref[2]
-        ref[3,1,0,0]=(0.205675480731)*x_ref[0]**o+(-0.843093328795)*x_ref[0]+(-0.812415573635)*x_ref[1]**o+(-0.706806177394)*x_ref[1]+(-0.158442718286)*x_ref[2]**o+(0.15187176613)*x_ref[2]
-        ref[3,1,0,1]=(0.149669308017)*x_ref[0]**o+(0.487445503149)*x_ref[0]+(-0.27973905833)*x_ref[1]**o+(-0.504992462225)*x_ref[1]+(-0.728166691522)*x_ref[2]**o+(0.734846267391)*x_ref[2]
-        ref[3,1,1,0]=(0.0410578015251)*x_ref[0]**o+(-0.525001495676)*x_ref[0]+(-0.512685697472)*x_ref[1]**o+(-0.284314686987)*x_ref[1]+(0.888112049081)*x_ref[2]**o+(0.425466793802)*x_ref[2]
-        ref[3,1,1,1]=(-0.374237047043)*x_ref[0]**o+(-0.00078724690461)*x_ref[0]+(0.849952487348)*x_ref[1]**o+(-0.654945893799)*x_ref[1]+(-0.536739132177)*x_ref[2]**o+(0.20919294066)*x_ref[2]
-        ref[3,1,2,0]=(0.685749084068)*x_ref[0]**o+(-0.730378478543)*x_ref[0]+(-0.918072746761)*x_ref[1]**o+(-0.706713872062)*x_ref[1]+(-0.486100957526)*x_ref[2]**o+(0.95736939257)*x_ref[2]
-        ref[3,1,2,1]=(-0.287859736321)*x_ref[0]**o+(-0.271882215207)*x_ref[0]+(-0.673357024623)*x_ref[1]**o+(0.702867457627)*x_ref[1]+(0.78445294416)*x_ref[2]**o+(0.613888365259)*x_ref[2]
-        ref[3,2,0,0]=(0.568506008135)*x_ref[0]**o+(-0.825947283734)*x_ref[0]+(0.687369924271)*x_ref[1]**o+(-0.866597782569)*x_ref[1]+(-0.332810902355)*x_ref[2]**o+(0.499502049139)*x_ref[2]
-        ref[3,2,0,1]=(0.757251773732)*x_ref[0]**o+(0.293337812465)*x_ref[0]+(0.686709285382)*x_ref[1]**o+(-0.084997189402)*x_ref[1]+(-0.338903817381)*x_ref[2]**o+(-0.787646799698)*x_ref[2]
-        ref[3,2,1,0]=(-0.580327419983)*x_ref[0]**o+(-0.603952498996)*x_ref[0]+(0.523057988618)*x_ref[1]**o+(-0.0835187394107)*x_ref[1]+(0.459827887147)*x_ref[2]**o+(0.689021201042)*x_ref[2]
-        ref[3,2,1,1]=(-0.41923416619)*x_ref[0]**o+(0.0406426957237)*x_ref[0]+(-0.908041008186)*x_ref[1]**o+(0.382097138462)*x_ref[1]+(0.66835706849)*x_ref[2]**o+(0.355849275378)*x_ref[2]
-        ref[3,2,2,0]=(-0.133756767108)*x_ref[0]**o+(-0.233743496333)*x_ref[0]+(-0.661420120856)*x_ref[1]**o+(0.788722576584)*x_ref[1]+(-0.131764585707)*x_ref[2]**o+(-0.781004479871)*x_ref[2]
-        ref[3,2,2,1]=(0.0308645139784)*x_ref[0]**o+(-0.194986246344)*x_ref[0]+(-0.267418187303)*x_ref[1]**o+(0.332143733168)*x_ref[1]+(0.513266431894)*x_ref[2]**o+(0.594016981473)*x_ref[2]
-        ref[3,3,0,0]=(0.644314102613)*x_ref[0]**o+(-0.977355279476)*x_ref[0]+(0.516452323667)*x_ref[1]**o+(0.172873579919)*x_ref[1]+(0.778904819969)*x_ref[2]**o+(0.559689750425)*x_ref[2]
-        ref[3,3,0,1]=(0.736135986201)*x_ref[0]**o+(0.366918250826)*x_ref[0]+(-0.0547007988818)*x_ref[1]**o+(-0.830174436433)*x_ref[1]+(0.613440124338)*x_ref[2]**o+(0.574992469591)*x_ref[2]
-        ref[3,3,1,0]=(0.324504938146)*x_ref[0]**o+(-0.915240176689)*x_ref[0]+(-0.398105336249)*x_ref[1]**o+(-0.526498343533)*x_ref[1]+(0.43264573336)*x_ref[2]**o+(0.393008086529)*x_ref[2]
-        ref[3,3,1,1]=(0.926367438323)*x_ref[0]**o+(0.526364305462)*x_ref[0]+(0.15596582236)*x_ref[1]**o+(0.165158439711)*x_ref[1]+(-0.508505348973)*x_ref[2]**o+(-0.603637833992)*x_ref[2]
-        ref[3,3,2,0]=(0.661333046004)*x_ref[0]**o+(0.425320373512)*x_ref[0]+(-0.810809051016)*x_ref[1]**o+(0.20446843023)*x_ref[1]+(0.685136412413)*x_ref[2]**o+(-0.0281127019894)*x_ref[2]
-        ref[3,3,2,1]=(0.851742499007)*x_ref[0]**o+(-0.405506974975)*x_ref[0]+(-0.296768983731)*x_ref[1]**o+(0.389557354929)*x_ref[1]+(0.335108341463)*x_ref[2]**o+(0.0313094433351)*x_ref[2]
-        ref[3,4,0,0]=(0.0415035498649)*x_ref[0]**o+(0.827106496882)*x_ref[0]+(-0.481831487377)*x_ref[1]**o+(-0.14935685817)*x_ref[1]+(0.354765095566)*x_ref[2]**o+(0.521898910137)*x_ref[2]
-        ref[3,4,0,1]=(-0.36328099035)*x_ref[0]**o+(-0.243342386595)*x_ref[0]+(0.0475935188475)*x_ref[1]**o+(0.845308417697)*x_ref[1]+(0.315259620082)*x_ref[2]**o+(0.541313742759)*x_ref[2]
-        ref[3,4,1,0]=(-0.66364149672)*x_ref[0]**o+(0.987505978353)*x_ref[0]+(-0.337659775957)*x_ref[1]**o+(0.197277151989)*x_ref[1]+(-0.431260870605)*x_ref[2]**o+(-0.803375909471)*x_ref[2]
-        ref[3,4,1,1]=(0.722104365428)*x_ref[0]**o+(0.168416682879)*x_ref[0]+(-0.415740544748)*x_ref[1]**o+(-0.437836696476)*x_ref[1]+(-0.280581752598)*x_ref[2]**o+(0.434326371762)*x_ref[2]
-        ref[3,4,2,0]=(0.673144889684)*x_ref[0]**o+(-0.0628529591764)*x_ref[0]+(0.0161458704408)*x_ref[1]**o+(-0.439966404278)*x_ref[1]+(-0.963402070447)*x_ref[2]**o+(0.308312287021)*x_ref[2]
-        ref[3,4,2,1]=(0.649131384887)*x_ref[0]**o+(-0.825086043001)*x_ref[0]+(0.204615530143)*x_ref[1]**o+(0.00801105023644)*x_ref[1]+(-0.234754758061)*x_ref[2]**o+(0.659650083864)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
-      """
-      tests interpolate for rank 0 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,(),w_ref)
-      if dim==2:
-        arg=(-0.935068705503)*x[0]**o+(-0.843768568975)*x[0]+(0.220151879481)*x[1]**o+(0.629247769917)*x[1]
-        ref=(-0.935068705503)*x_ref[0]**o+(-0.843768568975)*x_ref[0]+(0.220151879481)*x_ref[1]**o+(0.629247769917)*x_ref[1]
-      else:
-        arg=(0.204715133488)*x[0]**o+(-0.933589384176)*x[0]+(-0.651477613601)*x[1]**o+(-0.128099401086)*x[1]+(0.0507915334433)*x[2]**o+(0.63225604515)*x[2]
-        ref=(0.204715133488)*x_ref[0]**o+(-0.933589384176)*x_ref[0]+(-0.651477613601)*x_ref[1]**o+(-0.128099401086)*x_ref[1]+(0.0507915334433)*x_ref[2]**o+(0.63225604515)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
-      """
-      tests interpolate for rank 1 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,),w_ref)
-      if dim==2:
-        arg[0]=(0.693671772608)*x[0]**o+(0.260200526395)*x[0]+(-0.99202032752)*x[1]**o+(0.698503413133)*x[1]
-        arg[1]=(-0.549448913905)*x[0]**o+(-0.728769679965)*x[0]+(0.415132041969)*x[1]**o+(-0.106391482954)*x[1]
-        ref[0]=(0.693671772608)*x_ref[0]**o+(0.260200526395)*x_ref[0]+(-0.99202032752)*x_ref[1]**o+(0.698503413133)*x_ref[1]
-        ref[1]=(-0.549448913905)*x_ref[0]**o+(-0.728769679965)*x_ref[0]+(0.415132041969)*x_ref[1]**o+(-0.106391482954)*x_ref[1]
-      else:
-        arg[0]=(0.479813279739)*x[0]**o+(0.940795516779)*x[0]+(-0.671143421639)*x[1]**o+(-0.485412476854)*x[1]+(-0.962114397463)*x[2]**o+(0.0250734884375)*x[2]
-        arg[1]=(0.703481492279)*x[0]**o+(0.298972367312)*x[0]+(0.22386003834)*x[1]**o+(-0.726486516907)*x[1]+(0.0556568111911)*x[2]**o+(-0.603711754869)*x[2]
-        ref[0]=(0.479813279739)*x_ref[0]**o+(0.940795516779)*x_ref[0]+(-0.671143421639)*x_ref[1]**o+(-0.485412476854)*x_ref[1]+(-0.962114397463)*x_ref[2]**o+(0.0250734884375)*x_ref[2]
-        ref[1]=(0.703481492279)*x_ref[0]**o+(0.298972367312)*x_ref[0]+(0.22386003834)*x_ref[1]**o+(-0.726486516907)*x_ref[1]+(0.0556568111911)*x_ref[2]**o+(-0.603711754869)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(2,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
-      """
-      tests interpolate for rank 2 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5),w_ref)
-      if dim==2:
-        arg[0,0]=(0.436439283545)*x[0]**o+(0.705849609672)*x[0]+(-0.261476237133)*x[1]**o+(-0.10504570237)*x[1]
-        arg[0,1]=(0.035208834696)*x[0]**o+(0.590058421274)*x[0]+(-0.532905126944)*x[1]**o+(0.126572388319)*x[1]
-        arg[0,2]=(0.985266120604)*x[0]**o+(-0.465951670003)*x[0]+(0.855881157118)*x[1]**o+(0.00932326399668)*x[1]
-        arg[0,3]=(0.867525798771)*x[0]**o+(-0.480556561488)*x[0]+(-0.958556900472)*x[1]**o+(-0.764939529718)*x[1]
-        arg[0,4]=(-0.51062937871)*x[0]**o+(-0.135415437913)*x[0]+(0.340077694039)*x[1]**o+(0.874347806916)*x[1]
-        arg[1,0]=(0.636810684661)*x[0]**o+(0.774651780754)*x[0]+(-0.314130997812)*x[1]**o+(-0.422706240721)*x[1]
-        arg[1,1]=(0.495122166216)*x[0]**o+(0.757099858142)*x[0]+(-0.25861054515)*x[1]**o+(0.612180732826)*x[1]
-        arg[1,2]=(-0.909636123949)*x[0]**o+(-0.0434375137409)*x[0]+(0.100612174358)*x[1]**o+(0.787104124194)*x[1]
-        arg[1,3]=(-0.499307726848)*x[0]**o+(0.013205984499)*x[0]+(0.858074302957)*x[1]**o+(-0.630926261217)*x[1]
-        arg[1,4]=(-0.410815849264)*x[0]**o+(0.820939326325)*x[0]+(-0.415370205615)*x[1]**o+(0.0602438669371)*x[1]
-        arg[2,0]=(0.642545275281)*x[0]**o+(0.872239548588)*x[0]+(0.446294659843)*x[1]**o+(0.929350720888)*x[1]
-        arg[2,1]=(0.182218495486)*x[0]**o+(-0.393184556589)*x[0]+(0.42311545961)*x[1]**o+(-0.479636250878)*x[1]
-        arg[2,2]=(0.874574618473)*x[0]**o+(0.879031610251)*x[0]+(0.686157301617)*x[1]**o+(0.706917527697)*x[1]
-        arg[2,3]=(0.614189029029)*x[0]**o+(0.0973950074653)*x[0]+(0.626052996278)*x[1]**o+(0.75043535006)*x[1]
-        arg[2,4]=(0.386209196978)*x[0]**o+(0.644169312279)*x[0]+(-0.554562346917)*x[1]**o+(-0.474292025255)*x[1]
-        arg[3,0]=(0.015012073686)*x[0]**o+(-0.665804159938)*x[0]+(-0.849030247328)*x[1]**o+(-0.936779648988)*x[1]
-        arg[3,1]=(-0.818194334698)*x[0]**o+(-0.569993362998)*x[0]+(-0.806235611766)*x[1]**o+(0.35347475408)*x[1]
-        arg[3,2]=(-0.227117779134)*x[0]**o+(-0.981285175536)*x[0]+(-0.226804205345)*x[1]**o+(-0.0134258740334)*x[1]
-        arg[3,3]=(0.126716245369)*x[0]**o+(0.135476076345)*x[0]+(-0.641421845681)*x[1]**o+(0.0595388928019)*x[1]
-        arg[3,4]=(-0.658260624128)*x[0]**o+(0.124989215683)*x[0]+(-0.949146047463)*x[1]**o+(0.805277938593)*x[1]
-        ref[0,0]=(0.436439283545)*x_ref[0]**o+(0.705849609672)*x_ref[0]+(-0.261476237133)*x_ref[1]**o+(-0.10504570237)*x_ref[1]
-        ref[0,1]=(0.035208834696)*x_ref[0]**o+(0.590058421274)*x_ref[0]+(-0.532905126944)*x_ref[1]**o+(0.126572388319)*x_ref[1]
-        ref[0,2]=(0.985266120604)*x_ref[0]**o+(-0.465951670003)*x_ref[0]+(0.855881157118)*x_ref[1]**o+(0.00932326399668)*x_ref[1]
-        ref[0,3]=(0.867525798771)*x_ref[0]**o+(-0.480556561488)*x_ref[0]+(-0.958556900472)*x_ref[1]**o+(-0.764939529718)*x_ref[1]
-        ref[0,4]=(-0.51062937871)*x_ref[0]**o+(-0.135415437913)*x_ref[0]+(0.340077694039)*x_ref[1]**o+(0.874347806916)*x_ref[1]
-        ref[1,0]=(0.636810684661)*x_ref[0]**o+(0.774651780754)*x_ref[0]+(-0.314130997812)*x_ref[1]**o+(-0.422706240721)*x_ref[1]
-        ref[1,1]=(0.495122166216)*x_ref[0]**o+(0.757099858142)*x_ref[0]+(-0.25861054515)*x_ref[1]**o+(0.612180732826)*x_ref[1]
-        ref[1,2]=(-0.909636123949)*x_ref[0]**o+(-0.0434375137409)*x_ref[0]+(0.100612174358)*x_ref[1]**o+(0.787104124194)*x_ref[1]
-        ref[1,3]=(-0.499307726848)*x_ref[0]**o+(0.013205984499)*x_ref[0]+(0.858074302957)*x_ref[1]**o+(-0.630926261217)*x_ref[1]
-        ref[1,4]=(-0.410815849264)*x_ref[0]**o+(0.820939326325)*x_ref[0]+(-0.415370205615)*x_ref[1]**o+(0.0602438669371)*x_ref[1]
-        ref[2,0]=(0.642545275281)*x_ref[0]**o+(0.872239548588)*x_ref[0]+(0.446294659843)*x_ref[1]**o+(0.929350720888)*x_ref[1]
-        ref[2,1]=(0.182218495486)*x_ref[0]**o+(-0.393184556589)*x_ref[0]+(0.42311545961)*x_ref[1]**o+(-0.479636250878)*x_ref[1]
-        ref[2,2]=(0.874574618473)*x_ref[0]**o+(0.879031610251)*x_ref[0]+(0.686157301617)*x_ref[1]**o+(0.706917527697)*x_ref[1]
-        ref[2,3]=(0.614189029029)*x_ref[0]**o+(0.0973950074653)*x_ref[0]+(0.626052996278)*x_ref[1]**o+(0.75043535006)*x_ref[1]
-        ref[2,4]=(0.386209196978)*x_ref[0]**o+(0.644169312279)*x_ref[0]+(-0.554562346917)*x_ref[1]**o+(-0.474292025255)*x_ref[1]
-        ref[3,0]=(0.015012073686)*x_ref[0]**o+(-0.665804159938)*x_ref[0]+(-0.849030247328)*x_ref[1]**o+(-0.936779648988)*x_ref[1]
-        ref[3,1]=(-0.818194334698)*x_ref[0]**o+(-0.569993362998)*x_ref[0]+(-0.806235611766)*x_ref[1]**o+(0.35347475408)*x_ref[1]
-        ref[3,2]=(-0.227117779134)*x_ref[0]**o+(-0.981285175536)*x_ref[0]+(-0.226804205345)*x_ref[1]**o+(-0.0134258740334)*x_ref[1]
-        ref[3,3]=(0.126716245369)*x_ref[0]**o+(0.135476076345)*x_ref[0]+(-0.641421845681)*x_ref[1]**o+(0.0595388928019)*x_ref[1]
-        ref[3,4]=(-0.658260624128)*x_ref[0]**o+(0.124989215683)*x_ref[0]+(-0.949146047463)*x_ref[1]**o+(0.805277938593)*x_ref[1]
-      else:
-        arg[0,0]=(-0.859332605724)*x[0]**o+(-0.239005430756)*x[0]+(-0.52959833033)*x[1]**o+(0.725877930655)*x[1]+(-0.0348436114161)*x[2]**o+(0.47287744745)*x[2]
-        arg[0,1]=(-0.0816886854463)*x[0]**o+(-0.626507446322)*x[0]+(-0.93804868959)*x[1]**o+(-0.450134311929)*x[1]+(0.0957946938715)*x[2]**o+(-0.236994496198)*x[2]
-        arg[0,2]=(-0.669441310039)*x[0]**o+(-0.406451428536)*x[0]+(-0.292718530458)*x[1]**o+(-0.0948016380336)*x[1]+(-0.0943083566957)*x[2]**o+(0.747978324024)*x[2]
-        arg[0,3]=(-0.0350228116485)*x[0]**o+(-0.967728170529)*x[0]+(-0.16425180976)*x[1]**o+(-0.141334783297)*x[1]+(0.179458630309)*x[2]**o+(0.45080506919)*x[2]
-        arg[0,4]=(0.909578721407)*x[0]**o+(-0.341028350711)*x[0]+(-0.937703389458)*x[1]**o+(-0.845025015446)*x[1]+(-0.762836324997)*x[2]**o+(0.772817997464)*x[2]
-        arg[1,0]=(0.75675349915)*x[0]**o+(-0.208827138169)*x[0]+(-0.0146742840091)*x[1]**o+(-0.1486215734)*x[1]+(0.205344647252)*x[2]**o+(-0.409293867732)*x[2]
-        arg[1,1]=(-0.215359027624)*x[0]**o+(0.220661567012)*x[0]+(0.122954614324)*x[1]**o+(-0.888828539035)*x[1]+(-0.860535003713)*x[2]**o+(-0.582396229154)*x[2]
-        arg[1,2]=(-0.252703089432)*x[0]**o+(0.294168447756)*x[0]+(0.323290819691)*x[1]**o+(-0.0440370164755)*x[1]+(0.487110700327)*x[2]**o+(-0.269109129573)*x[2]
-        arg[1,3]=(0.0653521784751)*x[0]**o+(0.328048279094)*x[0]+(-0.414467594535)*x[1]**o+(0.436061182815)*x[1]+(0.483513283452)*x[2]**o+(-0.744560862926)*x[2]
-        arg[1,4]=(0.0102955000926)*x[0]**o+(-0.636994970624)*x[0]+(0.83732393089)*x[1]**o+(0.914683806871)*x[1]+(0.574439856221)*x[2]**o+(-0.096821482591)*x[2]
-        arg[2,0]=(-0.129692996812)*x[0]**o+(-0.617534967242)*x[0]+(0.299770969796)*x[1]**o+(0.93870530376)*x[1]+(-0.864448551767)*x[2]**o+(0.755129965839)*x[2]
-        arg[2,1]=(-0.354122778719)*x[0]**o+(0.576654786045)*x[0]+(-0.965116346607)*x[1]**o+(0.0705856628847)*x[1]+(0.817059960545)*x[2]**o+(-0.597731384232)*x[2]
-        arg[2,2]=(-0.705190107591)*x[0]**o+(0.876019062019)*x[0]+(-0.732733986501)*x[1]**o+(0.505334922081)*x[1]+(-0.616601928994)*x[2]**o+(-0.332268983863)*x[2]
-        arg[2,3]=(0.663768017414)*x[0]**o+(-0.431682444208)*x[0]+(0.186159158088)*x[1]**o+(-0.689766933274)*x[1]+(-0.765854811539)*x[2]**o+(-0.402774599632)*x[2]
-        arg[2,4]=(-0.698031877485)*x[0]**o+(0.914418269242)*x[0]+(-0.693564630363)*x[1]**o+(-0.18289238868)*x[1]+(0.988158500287)*x[2]**o+(-0.33952288549)*x[2]
-        arg[3,0]=(-0.188499634873)*x[0]**o+(-0.10427816897)*x[0]+(-0.772866404794)*x[1]**o+(0.841928986479)*x[1]+(-0.866955639695)*x[2]**o+(-0.152515560713)*x[2]
-        arg[3,1]=(0.937695460564)*x[0]**o+(-0.551079526492)*x[0]+(0.353043727721)*x[1]**o+(-0.604814667118)*x[1]+(0.200913251642)*x[2]**o+(-0.0497427852682)*x[2]
-        arg[3,2]=(-0.49130784927)*x[0]**o+(0.537445967432)*x[0]+(-0.408371200391)*x[1]**o+(0.945593173362)*x[1]+(-0.0956969348675)*x[2]**o+(-0.174133549441)*x[2]
-        arg[3,3]=(0.847790369559)*x[0]**o+(0.743993523287)*x[0]+(-0.810126540693)*x[1]**o+(-0.775699501886)*x[1]+(-0.479687101313)*x[2]**o+(0.627116825116)*x[2]
-        arg[3,4]=(0.352455163407)*x[0]**o+(0.86343850667)*x[0]+(0.126742974996)*x[1]**o+(0.0175699888323)*x[1]+(0.964899127449)*x[2]**o+(-0.206749046822)*x[2]
-        ref[0,0]=(-0.859332605724)*x_ref[0]**o+(-0.239005430756)*x_ref[0]+(-0.52959833033)*x_ref[1]**o+(0.725877930655)*x_ref[1]+(-0.0348436114161)*x_ref[2]**o+(0.47287744745)*x_ref[2]
-        ref[0,1]=(-0.0816886854463)*x_ref[0]**o+(-0.626507446322)*x_ref[0]+(-0.93804868959)*x_ref[1]**o+(-0.450134311929)*x_ref[1]+(0.0957946938715)*x_ref[2]**o+(-0.236994496198)*x_ref[2]
-        ref[0,2]=(-0.669441310039)*x_ref[0]**o+(-0.406451428536)*x_ref[0]+(-0.292718530458)*x_ref[1]**o+(-0.0948016380336)*x_ref[1]+(-0.0943083566957)*x_ref[2]**o+(0.747978324024)*x_ref[2]
-        ref[0,3]=(-0.0350228116485)*x_ref[0]**o+(-0.967728170529)*x_ref[0]+(-0.16425180976)*x_ref[1]**o+(-0.141334783297)*x_ref[1]+(0.179458630309)*x_ref[2]**o+(0.45080506919)*x_ref[2]
-        ref[0,4]=(0.909578721407)*x_ref[0]**o+(-0.341028350711)*x_ref[0]+(-0.937703389458)*x_ref[1]**o+(-0.845025015446)*x_ref[1]+(-0.762836324997)*x_ref[2]**o+(0.772817997464)*x_ref[2]
-        ref[1,0]=(0.75675349915)*x_ref[0]**o+(-0.208827138169)*x_ref[0]+(-0.0146742840091)*x_ref[1]**o+(-0.1486215734)*x_ref[1]+(0.205344647252)*x_ref[2]**o+(-0.409293867732)*x_ref[2]
-        ref[1,1]=(-0.215359027624)*x_ref[0]**o+(0.220661567012)*x_ref[0]+(0.122954614324)*x_ref[1]**o+(-0.888828539035)*x_ref[1]+(-0.860535003713)*x_ref[2]**o+(-0.582396229154)*x_ref[2]
-        ref[1,2]=(-0.252703089432)*x_ref[0]**o+(0.294168447756)*x_ref[0]+(0.323290819691)*x_ref[1]**o+(-0.0440370164755)*x_ref[1]+(0.487110700327)*x_ref[2]**o+(-0.269109129573)*x_ref[2]
-        ref[1,3]=(0.0653521784751)*x_ref[0]**o+(0.328048279094)*x_ref[0]+(-0.414467594535)*x_ref[1]**o+(0.436061182815)*x_ref[1]+(0.483513283452)*x_ref[2]**o+(-0.744560862926)*x_ref[2]
-        ref[1,4]=(0.0102955000926)*x_ref[0]**o+(-0.636994970624)*x_ref[0]+(0.83732393089)*x_ref[1]**o+(0.914683806871)*x_ref[1]+(0.574439856221)*x_ref[2]**o+(-0.096821482591)*x_ref[2]
-        ref[2,0]=(-0.129692996812)*x_ref[0]**o+(-0.617534967242)*x_ref[0]+(0.299770969796)*x_ref[1]**o+(0.93870530376)*x_ref[1]+(-0.864448551767)*x_ref[2]**o+(0.755129965839)*x_ref[2]
-        ref[2,1]=(-0.354122778719)*x_ref[0]**o+(0.576654786045)*x_ref[0]+(-0.965116346607)*x_ref[1]**o+(0.0705856628847)*x_ref[1]+(0.817059960545)*x_ref[2]**o+(-0.597731384232)*x_ref[2]
-        ref[2,2]=(-0.705190107591)*x_ref[0]**o+(0.876019062019)*x_ref[0]+(-0.732733986501)*x_ref[1]**o+(0.505334922081)*x_ref[1]+(-0.616601928994)*x_ref[2]**o+(-0.332268983863)*x_ref[2]
-        ref[2,3]=(0.663768017414)*x_ref[0]**o+(-0.431682444208)*x_ref[0]+(0.186159158088)*x_ref[1]**o+(-0.689766933274)*x_ref[1]+(-0.765854811539)*x_ref[2]**o+(-0.402774599632)*x_ref[2]
-        ref[2,4]=(-0.698031877485)*x_ref[0]**o+(0.914418269242)*x_ref[0]+(-0.693564630363)*x_ref[1]**o+(-0.18289238868)*x_ref[1]+(0.988158500287)*x_ref[2]**o+(-0.33952288549)*x_ref[2]
-        ref[3,0]=(-0.188499634873)*x_ref[0]**o+(-0.10427816897)*x_ref[0]+(-0.772866404794)*x_ref[1]**o+(0.841928986479)*x_ref[1]+(-0.866955639695)*x_ref[2]**o+(-0.152515560713)*x_ref[2]
-        ref[3,1]=(0.937695460564)*x_ref[0]**o+(-0.551079526492)*x_ref[0]+(0.353043727721)*x_ref[1]**o+(-0.604814667118)*x_ref[1]+(0.200913251642)*x_ref[2]**o+(-0.0497427852682)*x_ref[2]
-        ref[3,2]=(-0.49130784927)*x_ref[0]**o+(0.537445967432)*x_ref[0]+(-0.408371200391)*x_ref[1]**o+(0.945593173362)*x_ref[1]+(-0.0956969348675)*x_ref[2]**o+(-0.174133549441)*x_ref[2]
-        ref[3,3]=(0.847790369559)*x_ref[0]**o+(0.743993523287)*x_ref[0]+(-0.810126540693)*x_ref[1]**o+(-0.775699501886)*x_ref[1]+(-0.479687101313)*x_ref[2]**o+(0.627116825116)*x_ref[2]
-        ref[3,4]=(0.352455163407)*x_ref[0]**o+(0.86343850667)*x_ref[0]+(0.126742974996)*x_ref[1]**o+(0.0175699888323)*x_ref[1]+(0.964899127449)*x_ref[2]**o+(-0.206749046822)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
-      """
-      tests interpolate for rank 3 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.396745847367)*x[0]**o+(-0.700719490691)*x[0]+(0.117558242545)*x[1]**o+(-0.161976142849)*x[1]
-        arg[0,0,1]=(-0.490732277107)*x[0]**o+(0.526833149216)*x[0]+(-0.136309303122)*x[1]**o+(0.629465649533)*x[1]
-        arg[0,1,0]=(-0.242474968121)*x[0]**o+(-0.76270698332)*x[0]+(-0.0979504547153)*x[1]**o+(-0.0743521177641)*x[1]
-        arg[0,1,1]=(0.641246476843)*x[0]**o+(0.0158147797433)*x[0]+(-0.213898399703)*x[1]**o+(-0.378401519675)*x[1]
-        arg[1,0,0]=(0.603700544573)*x[0]**o+(-0.993751144334)*x[0]+(0.466222025692)*x[1]**o+(0.457689495241)*x[1]
-        arg[1,0,1]=(-0.727287858841)*x[0]**o+(-0.177841994955)*x[0]+(0.720237448692)*x[1]**o+(0.716175629178)*x[1]
-        arg[1,1,0]=(0.784514682242)*x[0]**o+(0.681214612353)*x[0]+(0.404266860166)*x[1]**o+(0.871218157219)*x[1]
-        arg[1,1,1]=(-0.918634586367)*x[0]**o+(-0.722365105889)*x[0]+(-0.0337202979587)*x[1]**o+(-0.487790376172)*x[1]
-        arg[2,0,0]=(0.159515902499)*x[0]**o+(-0.0650417831188)*x[0]+(0.107260481333)*x[1]**o+(0.469096212511)*x[1]
-        arg[2,0,1]=(0.0436003865409)*x[0]**o+(-0.67488837592)*x[0]+(0.547761443272)*x[1]**o+(-0.69222031017)*x[1]
-        arg[2,1,0]=(-0.153636036391)*x[0]**o+(0.0415911821723)*x[0]+(0.421990370678)*x[1]**o+(-0.128883832414)*x[1]
-        arg[2,1,1]=(0.513420393955)*x[0]**o+(-0.769636964711)*x[0]+(0.874383588901)*x[1]**o+(-0.357923227767)*x[1]
-        arg[3,0,0]=(0.943275907357)*x[0]**o+(0.372378913231)*x[0]+(0.559656674007)*x[1]**o+(-0.878007664293)*x[1]
-        arg[3,0,1]=(-0.541535388034)*x[0]**o+(-0.0510200932939)*x[0]+(-0.448618747155)*x[1]**o+(0.693514427768)*x[1]
-        arg[3,1,0]=(-0.287622342268)*x[0]**o+(0.8333134988)*x[0]+(-0.691930501782)*x[1]**o+(-0.659618596505)*x[1]
-        arg[3,1,1]=(0.44446133556)*x[0]**o+(0.697704081094)*x[0]+(0.0679863572322)*x[1]**o+(-0.949443102916)*x[1]
-        arg[4,0,0]=(0.546245770076)*x[0]**o+(-0.466891879347)*x[0]+(-0.608261901126)*x[1]**o+(0.669561643667)*x[1]
-        arg[4,0,1]=(-0.522497485476)*x[0]**o+(0.70886716903)*x[0]+(-0.296815361132)*x[1]**o+(0.500540583082)*x[1]
-        arg[4,1,0]=(-0.841653490079)*x[0]**o+(0.400589086976)*x[0]+(0.865994660457)*x[1]**o+(0.0205817210969)*x[1]
-        arg[4,1,1]=(-0.64369513787)*x[0]**o+(0.883032618928)*x[0]+(-0.178766897224)*x[1]**o+(0.748041632322)*x[1]
-        arg[5,0,0]=(0.471810615096)*x[0]**o+(-0.140340964274)*x[0]+(-0.7063314968)*x[1]**o+(0.0524231879837)*x[1]
-        arg[5,0,1]=(-0.51339482213)*x[0]**o+(-0.81447661092)*x[0]+(0.437085868301)*x[1]**o+(0.862678017842)*x[1]
-        arg[5,1,0]=(-0.752858172473)*x[0]**o+(0.325827525243)*x[0]+(-0.702286757187)*x[1]**o+(-0.467810951898)*x[1]
-        arg[5,1,1]=(-0.256879797442)*x[0]**o+(0.257067666229)*x[0]+(0.912308244411)*x[1]**o+(0.0620337856352)*x[1]
-        ref[0,0,0]=(-0.396745847367)*x_ref[0]**o+(-0.700719490691)*x_ref[0]+(0.117558242545)*x_ref[1]**o+(-0.161976142849)*x_ref[1]
-        ref[0,0,1]=(-0.490732277107)*x_ref[0]**o+(0.526833149216)*x_ref[0]+(-0.136309303122)*x_ref[1]**o+(0.629465649533)*x_ref[1]
-        ref[0,1,0]=(-0.242474968121)*x_ref[0]**o+(-0.76270698332)*x_ref[0]+(-0.0979504547153)*x_ref[1]**o+(-0.0743521177641)*x_ref[1]
-        ref[0,1,1]=(0.641246476843)*x_ref[0]**o+(0.0158147797433)*x_ref[0]+(-0.213898399703)*x_ref[1]**o+(-0.378401519675)*x_ref[1]
-        ref[1,0,0]=(0.603700544573)*x_ref[0]**o+(-0.993751144334)*x_ref[0]+(0.466222025692)*x_ref[1]**o+(0.457689495241)*x_ref[1]
-        ref[1,0,1]=(-0.727287858841)*x_ref[0]**o+(-0.177841994955)*x_ref[0]+(0.720237448692)*x_ref[1]**o+(0.716175629178)*x_ref[1]
-        ref[1,1,0]=(0.784514682242)*x_ref[0]**o+(0.681214612353)*x_ref[0]+(0.404266860166)*x_ref[1]**o+(0.871218157219)*x_ref[1]
-        ref[1,1,1]=(-0.918634586367)*x_ref[0]**o+(-0.722365105889)*x_ref[0]+(-0.0337202979587)*x_ref[1]**o+(-0.487790376172)*x_ref[1]
-        ref[2,0,0]=(0.159515902499)*x_ref[0]**o+(-0.0650417831188)*x_ref[0]+(0.107260481333)*x_ref[1]**o+(0.469096212511)*x_ref[1]
-        ref[2,0,1]=(0.0436003865409)*x_ref[0]**o+(-0.67488837592)*x_ref[0]+(0.547761443272)*x_ref[1]**o+(-0.69222031017)*x_ref[1]
-        ref[2,1,0]=(-0.153636036391)*x_ref[0]**o+(0.0415911821723)*x_ref[0]+(0.421990370678)*x_ref[1]**o+(-0.128883832414)*x_ref[1]
-        ref[2,1,1]=(0.513420393955)*x_ref[0]**o+(-0.769636964711)*x_ref[0]+(0.874383588901)*x_ref[1]**o+(-0.357923227767)*x_ref[1]
-        ref[3,0,0]=(0.943275907357)*x_ref[0]**o+(0.372378913231)*x_ref[0]+(0.559656674007)*x_ref[1]**o+(-0.878007664293)*x_ref[1]
-        ref[3,0,1]=(-0.541535388034)*x_ref[0]**o+(-0.0510200932939)*x_ref[0]+(-0.448618747155)*x_ref[1]**o+(0.693514427768)*x_ref[1]
-        ref[3,1,0]=(-0.287622342268)*x_ref[0]**o+(0.8333134988)*x_ref[0]+(-0.691930501782)*x_ref[1]**o+(-0.659618596505)*x_ref[1]
-        ref[3,1,1]=(0.44446133556)*x_ref[0]**o+(0.697704081094)*x_ref[0]+(0.0679863572322)*x_ref[1]**o+(-0.949443102916)*x_ref[1]
-        ref[4,0,0]=(0.546245770076)*x_ref[0]**o+(-0.466891879347)*x_ref[0]+(-0.608261901126)*x_ref[1]**o+(0.669561643667)*x_ref[1]
-        ref[4,0,1]=(-0.522497485476)*x_ref[0]**o+(0.70886716903)*x_ref[0]+(-0.296815361132)*x_ref[1]**o+(0.500540583082)*x_ref[1]
-        ref[4,1,0]=(-0.841653490079)*x_ref[0]**o+(0.400589086976)*x_ref[0]+(0.865994660457)*x_ref[1]**o+(0.0205817210969)*x_ref[1]
-        ref[4,1,1]=(-0.64369513787)*x_ref[0]**o+(0.883032618928)*x_ref[0]+(-0.178766897224)*x_ref[1]**o+(0.748041632322)*x_ref[1]
-        ref[5,0,0]=(0.471810615096)*x_ref[0]**o+(-0.140340964274)*x_ref[0]+(-0.7063314968)*x_ref[1]**o+(0.0524231879837)*x_ref[1]
-        ref[5,0,1]=(-0.51339482213)*x_ref[0]**o+(-0.81447661092)*x_ref[0]+(0.437085868301)*x_ref[1]**o+(0.862678017842)*x_ref[1]
-        ref[5,1,0]=(-0.752858172473)*x_ref[0]**o+(0.325827525243)*x_ref[0]+(-0.702286757187)*x_ref[1]**o+(-0.467810951898)*x_ref[1]
-        ref[5,1,1]=(-0.256879797442)*x_ref[0]**o+(0.257067666229)*x_ref[0]+(0.912308244411)*x_ref[1]**o+(0.0620337856352)*x_ref[1]
-      else:
-        arg[0,0,0]=(0.564502533309)*x[0]**o+(-0.237721559752)*x[0]+(0.225601658644)*x[1]**o+(0.967190188292)*x[1]+(0.471760897542)*x[2]**o+(0.79404420728)*x[2]
-        arg[0,0,1]=(-0.373762346136)*x[0]**o+(-0.643766021731)*x[0]+(0.088028383792)*x[1]**o+(-0.541163410313)*x[1]+(0.463315911637)*x[2]**o+(-0.596740807595)*x[2]
-        arg[0,1,0]=(-0.526694453842)*x[0]**o+(0.405010889931)*x[0]+(-0.0153807962972)*x[1]**o+(-0.0446620712949)*x[1]+(0.00553918668197)*x[2]**o+(0.72170514564)*x[2]
-        arg[0,1,1]=(-0.00750073616089)*x[0]**o+(-0.60431903208)*x[0]+(0.790032415931)*x[1]**o+(0.272709398336)*x[1]+(0.228539600712)*x[2]**o+(0.62284140325)*x[2]
-        arg[1,0,0]=(-0.892797595418)*x[0]**o+(-0.151608141828)*x[0]+(0.313142074823)*x[1]**o+(0.80280439466)*x[1]+(-0.593056273594)*x[2]**o+(-0.41551679707)*x[2]
-        arg[1,0,1]=(-0.385715092974)*x[0]**o+(-0.77884107065)*x[0]+(-0.0804019137225)*x[1]**o+(-0.240129932101)*x[1]+(0.238145788042)*x[2]**o+(-0.806337666628)*x[2]
-        arg[1,1,0]=(0.940492459417)*x[0]**o+(-0.0054460073194)*x[0]+(-0.697916565168)*x[1]**o+(-0.949456184725)*x[1]+(-0.115461214789)*x[2]**o+(-0.403742409948)*x[2]
-        arg[1,1,1]=(-0.711716124415)*x[0]**o+(0.586131021871)*x[0]+(0.625988666837)*x[1]**o+(0.638433219635)*x[1]+(0.971169174015)*x[2]**o+(-0.064949626884)*x[2]
-        arg[2,0,0]=(-0.891973333325)*x[0]**o+(0.76090478364)*x[0]+(0.439956136239)*x[1]**o+(-0.74807071296)*x[1]+(-0.209999803467)*x[2]**o+(0.404396254503)*x[2]
-        arg[2,0,1]=(0.559776288735)*x[0]**o+(0.284643618707)*x[0]+(0.0527799359967)*x[1]**o+(-0.201660204363)*x[1]+(0.590722655898)*x[2]**o+(-0.24940757474)*x[2]
-        arg[2,1,0]=(-0.747588234432)*x[0]**o+(0.0196702046746)*x[0]+(0.0454238912973)*x[1]**o+(0.174053915643)*x[1]+(-0.868554688657)*x[2]**o+(-0.127425849813)*x[2]
-        arg[2,1,1]=(-0.324276984008)*x[0]**o+(-0.494912096003)*x[0]+(-0.780953487415)*x[1]**o+(0.225787179491)*x[1]+(-0.760330660035)*x[2]**o+(0.0440722700759)*x[2]
-        arg[3,0,0]=(0.37479028021)*x[0]**o+(-0.869009335783)*x[0]+(0.811673580204)*x[1]**o+(0.521877505351)*x[1]+(-0.508710979256)*x[2]**o+(0.558085136638)*x[2]
-        arg[3,0,1]=(0.815143535066)*x[0]**o+(0.867977183071)*x[0]+(0.0315543942614)*x[1]**o+(0.786379597601)*x[1]+(0.0433279381339)*x[2]**o+(-0.56554445624)*x[2]
-        arg[3,1,0]=(-0.948224238625)*x[0]**o+(-0.759282528831)*x[0]+(0.511802336753)*x[1]**o+(0.331073342499)*x[1]+(0.295241697427)*x[2]**o+(0.154864664771)*x[2]
-        arg[3,1,1]=(-0.982634132939)*x[0]**o+(-0.0762014431695)*x[0]+(-0.0797462613351)*x[1]**o+(-0.512305271957)*x[1]+(-0.348883505418)*x[2]**o+(0.00580412526927)*x[2]
-        arg[4,0,0]=(0.186597109908)*x[0]**o+(0.051957206238)*x[0]+(0.572882754553)*x[1]**o+(-0.114338954084)*x[1]+(-0.517239439578)*x[2]**o+(-0.298287404607)*x[2]
-        arg[4,0,1]=(0.637628569107)*x[0]**o+(0.228562669958)*x[0]+(0.053657321561)*x[1]**o+(0.762909608846)*x[1]+(0.873936819574)*x[2]**o+(-0.20000969514)*x[2]
-        arg[4,1,0]=(-0.717459489066)*x[0]**o+(-0.462174191129)*x[0]+(-0.70491180102)*x[1]**o+(-0.406072010622)*x[1]+(-0.903872259447)*x[2]**o+(0.487491537826)*x[2]
-        arg[4,1,1]=(0.947654286923)*x[0]**o+(-0.228830597313)*x[0]+(-0.501442713655)*x[1]**o+(0.282437368749)*x[1]+(0.543592950002)*x[2]**o+(0.5400198247)*x[2]
-        arg[5,0,0]=(0.144349494033)*x[0]**o+(-0.635328703132)*x[0]+(-0.797851162499)*x[1]**o+(0.356874780185)*x[1]+(-0.205725457569)*x[2]**o+(-0.674962512018)*x[2]
-        arg[5,0,1]=(-0.728948504419)*x[0]**o+(0.944337871242)*x[0]+(-0.790388944678)*x[1]**o+(0.59119693076)*x[1]+(0.9569152246)*x[2]**o+(-0.205404245177)*x[2]
-        arg[5,1,0]=(0.477597678348)*x[0]**o+(-0.318993929605)*x[0]+(0.481029970286)*x[1]**o+(0.708696918395)*x[1]+(0.0531716082887)*x[2]**o+(-0.847697491061)*x[2]
-        arg[5,1,1]=(-0.458572001979)*x[0]**o+(0.582048244354)*x[0]+(-0.040756132547)*x[1]**o+(-0.953201198076)*x[1]+(-0.971859723822)*x[2]**o+(-0.796426143181)*x[2]
-        ref[0,0,0]=(0.564502533309)*x_ref[0]**o+(-0.237721559752)*x_ref[0]+(0.225601658644)*x_ref[1]**o+(0.967190188292)*x_ref[1]+(0.471760897542)*x_ref[2]**o+(0.79404420728)*x_ref[2]
-        ref[0,0,1]=(-0.373762346136)*x_ref[0]**o+(-0.643766021731)*x_ref[0]+(0.088028383792)*x_ref[1]**o+(-0.541163410313)*x_ref[1]+(0.463315911637)*x_ref[2]**o+(-0.596740807595)*x_ref[2]
-        ref[0,1,0]=(-0.526694453842)*x_ref[0]**o+(0.405010889931)*x_ref[0]+(-0.0153807962972)*x_ref[1]**o+(-0.0446620712949)*x_ref[1]+(0.00553918668197)*x_ref[2]**o+(0.72170514564)*x_ref[2]
-        ref[0,1,1]=(-0.00750073616089)*x_ref[0]**o+(-0.60431903208)*x_ref[0]+(0.790032415931)*x_ref[1]**o+(0.272709398336)*x_ref[1]+(0.228539600712)*x_ref[2]**o+(0.62284140325)*x_ref[2]
-        ref[1,0,0]=(-0.892797595418)*x_ref[0]**o+(-0.151608141828)*x_ref[0]+(0.313142074823)*x_ref[1]**o+(0.80280439466)*x_ref[1]+(-0.593056273594)*x_ref[2]**o+(-0.41551679707)*x_ref[2]
-        ref[1,0,1]=(-0.385715092974)*x_ref[0]**o+(-0.77884107065)*x_ref[0]+(-0.0804019137225)*x_ref[1]**o+(-0.240129932101)*x_ref[1]+(0.238145788042)*x_ref[2]**o+(-0.806337666628)*x_ref[2]
-        ref[1,1,0]=(0.940492459417)*x_ref[0]**o+(-0.0054460073194)*x_ref[0]+(-0.697916565168)*x_ref[1]**o+(-0.949456184725)*x_ref[1]+(-0.115461214789)*x_ref[2]**o+(-0.403742409948)*x_ref[2]
-        ref[1,1,1]=(-0.711716124415)*x_ref[0]**o+(0.586131021871)*x_ref[0]+(0.625988666837)*x_ref[1]**o+(0.638433219635)*x_ref[1]+(0.971169174015)*x_ref[2]**o+(-0.064949626884)*x_ref[2]
-        ref[2,0,0]=(-0.891973333325)*x_ref[0]**o+(0.76090478364)*x_ref[0]+(0.439956136239)*x_ref[1]**o+(-0.74807071296)*x_ref[1]+(-0.209999803467)*x_ref[2]**o+(0.404396254503)*x_ref[2]
-        ref[2,0,1]=(0.559776288735)*x_ref[0]**o+(0.284643618707)*x_ref[0]+(0.0527799359967)*x_ref[1]**o+(-0.201660204363)*x_ref[1]+(0.590722655898)*x_ref[2]**o+(-0.24940757474)*x_ref[2]
-        ref[2,1,0]=(-0.747588234432)*x_ref[0]**o+(0.0196702046746)*x_ref[0]+(0.0454238912973)*x_ref[1]**o+(0.174053915643)*x_ref[1]+(-0.868554688657)*x_ref[2]**o+(-0.127425849813)*x_ref[2]
-        ref[2,1,1]=(-0.324276984008)*x_ref[0]**o+(-0.494912096003)*x_ref[0]+(-0.780953487415)*x_ref[1]**o+(0.225787179491)*x_ref[1]+(-0.760330660035)*x_ref[2]**o+(0.0440722700759)*x_ref[2]
-        ref[3,0,0]=(0.37479028021)*x_ref[0]**o+(-0.869009335783)*x_ref[0]+(0.811673580204)*x_ref[1]**o+(0.521877505351)*x_ref[1]+(-0.508710979256)*x_ref[2]**o+(0.558085136638)*x_ref[2]
-        ref[3,0,1]=(0.815143535066)*x_ref[0]**o+(0.867977183071)*x_ref[0]+(0.0315543942614)*x_ref[1]**o+(0.786379597601)*x_ref[1]+(0.0433279381339)*x_ref[2]**o+(-0.56554445624)*x_ref[2]
-        ref[3,1,0]=(-0.948224238625)*x_ref[0]**o+(-0.759282528831)*x_ref[0]+(0.511802336753)*x_ref[1]**o+(0.331073342499)*x_ref[1]+(0.295241697427)*x_ref[2]**o+(0.154864664771)*x_ref[2]
-        ref[3,1,1]=(-0.982634132939)*x_ref[0]**o+(-0.0762014431695)*x_ref[0]+(-0.0797462613351)*x_ref[1]**o+(-0.512305271957)*x_ref[1]+(-0.348883505418)*x_ref[2]**o+(0.00580412526927)*x_ref[2]
-        ref[4,0,0]=(0.186597109908)*x_ref[0]**o+(0.051957206238)*x_ref[0]+(0.572882754553)*x_ref[1]**o+(-0.114338954084)*x_ref[1]+(-0.517239439578)*x_ref[2]**o+(-0.298287404607)*x_ref[2]
-        ref[4,0,1]=(0.637628569107)*x_ref[0]**o+(0.228562669958)*x_ref[0]+(0.053657321561)*x_ref[1]**o+(0.762909608846)*x_ref[1]+(0.873936819574)*x_ref[2]**o+(-0.20000969514)*x_ref[2]
-        ref[4,1,0]=(-0.717459489066)*x_ref[0]**o+(-0.462174191129)*x_ref[0]+(-0.70491180102)*x_ref[1]**o+(-0.406072010622)*x_ref[1]+(-0.903872259447)*x_ref[2]**o+(0.487491537826)*x_ref[2]
-        ref[4,1,1]=(0.947654286923)*x_ref[0]**o+(-0.228830597313)*x_ref[0]+(-0.501442713655)*x_ref[1]**o+(0.282437368749)*x_ref[1]+(0.543592950002)*x_ref[2]**o+(0.5400198247)*x_ref[2]
-        ref[5,0,0]=(0.144349494033)*x_ref[0]**o+(-0.635328703132)*x_ref[0]+(-0.797851162499)*x_ref[1]**o+(0.356874780185)*x_ref[1]+(-0.205725457569)*x_ref[2]**o+(-0.674962512018)*x_ref[2]
-        ref[5,0,1]=(-0.728948504419)*x_ref[0]**o+(0.944337871242)*x_ref[0]+(-0.790388944678)*x_ref[1]**o+(0.59119693076)*x_ref[1]+(0.9569152246)*x_ref[2]**o+(-0.205404245177)*x_ref[2]
-        ref[5,1,0]=(0.477597678348)*x_ref[0]**o+(-0.318993929605)*x_ref[0]+(0.481029970286)*x_ref[1]**o+(0.708696918395)*x_ref[1]+(0.0531716082887)*x_ref[2]**o+(-0.847697491061)*x_ref[2]
-        ref[5,1,1]=(-0.458572001979)*x_ref[0]**o+(0.582048244354)*x_ref[0]+(-0.040756132547)*x_ref[1]**o+(-0.953201198076)*x_ref[1]+(-0.971859723822)*x_ref[2]**o+(-0.796426143181)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
-      """
-      tests interpolate for rank 4 Data onto the ReducedFunctionOnContactOne
-
-      assumptions: self.domain supports inpterpolation from ReducedFunctionOnContactOne onto ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedFunctionOnContactOne(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5, 3, 2),w)
-      ref=Data(0,(4, 5, 3, 2),w_ref)
-      if dim==2:
-        arg[0,0,0,0]=(-0.937777610663)*x[0]**o+(-0.0228520946632)*x[0]+(0.642385396583)*x[1]**o+(-0.803821945812)*x[1]
-        arg[0,0,0,1]=(-0.398785307492)*x[0]**o+(0.0450288952883)*x[0]+(-0.777780548133)*x[1]**o+(0.0273772099414)*x[1]
-        arg[0,0,1,0]=(-0.667280086925)*x[0]**o+(-0.934642710274)*x[0]+(0.565327494491)*x[1]**o+(0.988521769056)*x[1]
-        arg[0,0,1,1]=(-0.225562383498)*x[0]**o+(-0.280566031134)*x[0]+(-0.295768954831)*x[1]**o+(0.102759013802)*x[1]
-        arg[0,0,2,0]=(-0.179577502546)*x[0]**o+(-0.156932777074)*x[0]+(-0.145616153633)*x[1]**o+(0.971876899135)*x[1]
-        arg[0,0,2,1]=(-0.840266409118)*x[0]**o+(0.704356785022)*x[0]+(0.740091470711)*x[1]**o+(0.708478499023)*x[1]
-        arg[0,1,0,0]=(-0.487161662806)*x[0]**o+(0.565313908399)*x[0]+(-0.33708697293)*x[1]**o+(0.731675966546)*x[1]
-        arg[0,1,0,1]=(-0.135615857963)*x[0]**o+(0.265408777025)*x[0]+(-0.168207260227)*x[1]**o+(-0.598974659317)*x[1]
-        arg[0,1,1,0]=(0.0533944010258)*x[0]**o+(0.819248906738)*x[0]+(-0.837005251524)*x[1]**o+(0.119613618595)*x[1]
-        arg[0,1,1,1]=(-0.257520627047)*x[0]**o+(0.339264545713)*x[0]+(0.137721228188)*x[1]**o+(-0.512251030979)*x[1]
-        arg[0,1,2,0]=(-0.797070396749)*x[0]**o+(0.690173285077)*x[0]+(-0.213206187271)*x[1]**o+(-0.873999125945)*x[1]
-        arg[0,1,2,1]=(-0.847662300367)*x[0]**o+(0.785781114266)*x[0]+(-0.456918398811)*x[1]**o+(0.458881079947)*x[1]
-        arg[0,2,0,0]=(-0.385269163334)*x[0]**o+(0.135941228964)*x[0]+(0.233245620648)*x[1]**o+(-0.246282209626)*x[1]
-        arg[0,2,0,1]=(0.372914636218)*x[0]**o+(-0.160283657003)*x[0]+(0.0565043889781)*x[1]**o+(0.199715522021)*x[1]
-        arg[0,2,1,0]=(0.676198390598)*x[0]**o+(0.938025122014)*x[0]+(0.161074696651)*x[1]**o+(-0.155495646964)*x[1]
-        arg[0,2,1,1]=(-0.709286924155)*x[0]**o+(-0.173716284776)*x[0]+(0.0576435484694)*x[1]**o+(0.673924697832)*x[1]
-        arg[0,2,2,0]=(-0.436468652969)*x[0]**o+(0.117279009082)*x[0]+(-0.731436369191)*x[1]**o+(0.919578503469)*x[1]
-        arg[0,2,2,1]=(-0.691042646151)*x[0]**o+(-0.606293725574)*x[0]+(0.657291692759)*x[1]**o+(-0.0146398994729)*x[1]
-        arg[0,3,0,0]=(0.365939313719)*x[0]**o+(-0.221236913792)*x[0]+(-0.729594967883)*x[1]**o+(0.0179024719114)*x[1]
-        arg[0,3,0,1]=(0.135892133258)*x[0]**o+(0.728069461936)*x[0]+(-0.365691795279)*x[1]**o+(0.877708599922)*x[1]
-        arg[0,3,1,0]=(-0.853312456817)*x[0]**o+(-0.713031969049)*x[0]+(0.274755827464)*x[1]**o+(-0.527330699033)*x[1]
-        arg[0,3,1,1]=(-0.30358584687)*x[0]**o+(0.871629391968)*x[0]+(0.906915162645)*x[1]**o+(0.499955429041)*x[1]
-        arg[0,3,2,0]=(-0.880532587427)*x[0]**o+(0.265729672258)*x[0]+(0.528677136349)*x[1]**o+(-0.224602964925)*x[1]
-        arg[0,3,2,1]=(0.158632463532)*x[0]**o+(-0.665418329643)*x[0]+(0.957661069067)*x[1]**o+(-0.23771309434)*x[1]
-        arg[0,4,0,0]=(-0.128073514905)*x[0]**o+(-0.452543798055)*x[0]+(0.303808626277)*x[1]**o+(0.841041779759)*x[1]
-        arg[0,4,0,1]=(0.0219309964781)*x[0]**o+(-0.949488393443)*x[0]+(0.0436905404663)*x[1]**o+(-0.304527242795)*x[1]
-        arg[0,4,1,0]=(-0.792275137775)*x[0]**o+(0.450079829644)*x[0]+(0.162879981637)*x[1]**o+(-0.185839015805)*x[1]
-        arg[0,4,1,1]=(0.761932713893)*x[0]**o+(0.932601232945)*x[0]+(-0.606328305783)*x[1]**o+(-0.123973545682)*x[1]
-        arg[0,4,2,0]=(-0.514088304908)*x[0]**o+(0.987668774807)*x[0]+(0.866078887168)*x[1]**o+(-0.608518224484)*x[1]
-        arg[0,4,2,1]=(-0.427564608028)*x[0]**o+(0.231599614445)*x[0]+(-0.406862229819)*x[1]**o+(0.358456864265)*x[1]
-        arg[1,0,0,0]=(0.342092171801)*x[0]**o+(-0.264522675185)*x[0]+(-0.37976917867)*x[1]**o+(0.778596602561)*x[1]
-        arg[1,0,0,1]=(0.672156473235)*x[0]**o+(0.320317500856)*x[0]+(0.514206881296)*x[1]**o+(0.602594631705)*x[1]
-        arg[1,0,1,0]=(0.914472920293)*x[0]**o+(0.525647943447)*x[0]+(0.685613621597)*x[1]**o+(0.482308039231)*x[1]
-        arg[1,0,1,1]=(-0.727982874425)*x[0]**o+(-0.417964463065)*x[0]+(0.825853988063)*x[1]**o+(0.236134760252)*x[1]
-        arg[1,0,2,0]=(0.922186381756)*x[0]**o+(-0.140522762044)*x[0]+(-0.282169431666)*x[1]**o+(0.778383988397)*x[1]
-        arg[1,0,2,1]=(0.307296736289)*x[0]**o+(0.589844868569)*x[0]+(0.64571457752)*x[1]**o+(0.749333079485)*x[1]
-        arg[1,1,0,0]=(0.908345176703)*x[0]**o+(-0.476053147164)*x[0]+(0.0828501189289)*x[1]**o+(0.280657117705)*x[1]
-        arg[1,1,0,1]=(0.396128814097)*x[0]**o+(0.368821575482)*x[0]+(-0.916584602334)*x[1]**o+(-0.149377992159)*x[1]
-        arg[1,1,1,0]=(-0.38468474313)*x[0]**o+(0.304742499301)*x[0]+(0.638083865846)*x[1]**o+(-0.332046460663)*x[1]
-        arg[1,1,1,1]=(0.845097787138)*x[0]**o+(-0.34949498164)*x[0]+(0.229157202572)*x[1]**o+(0.677584672856)*x[1]
-        arg[1,1,2,0]=(0.0280692825358)*x[0]**o+(0.567451370107)*x[0]+(0.66934188305)*x[1]**o+(-0.477197213188)*x[1]
-        arg[1,1,2,1]=(0.375411487264)*x[0]**o+(0.55086548839)*x[0]+(-0.392135351366)*x[1]**o+(0.91971334589)*x[1]
-        arg[1,2,0,0]=(-0.7659270368)*x[0]**o+(-0.338082792509)*x[0]+(-0.26272975232)*x[1]**o+(0.267936454568)*x[1]
-        arg[1,2,0,1]=(0.918125455771)*x[0]**o+(0.182896655906)*x[0]+(0.525396835337)*x[1]**o+(0.201918789801)*x[1]
-        arg[1,2,1,0]=(-0.54472490266)*x[0]**o+(0.693714832775)*x[0]+(0.898278265794)*x[1]**o+(0.345095187159)*x[1]
-        arg[1,2,1,1]=(-0.498607752195)*x[0]**o+(0.84678344253)*x[0]+(0.678992455984)*x[1]**o+(-0.597396262326)*x[1]
-        arg[1,2,2,0]=(0.215267998554)*x[0]**o+(0.384479388838)*x[0]+(-0.09078862662)*x[1]**o+(-0.0162185695524)*x[1]
-        arg[1,2,2,1]=(-0.335574750173)*x[0]**o+(-0.439933690512)*x[0]+(0.194601817488)*x[1]**o+(0.795181445633)*x[1]
-        arg[1,3,0,0]=(0.862180273604)*x[0]**o+(0.276662657248)*x[0]+(-0.908827123328)*x[1]**o+(0.290406540669)*x[1]
-        arg[1,3,0,1]=(-0.620441636176)*x[0]**o+(0.448236189204)*x[0]+(-0.503817375869)*x[1]**o+(0.689447469467)*x[1]
-        arg[1,3,1,0]=(0.126327572417)*x[0]**o+(-0.476552913848)*x[0]+(0.362273273226)*x[1]**o+(-0.816228830372)*x[1]
-        arg[1,3,1,1]=(-0.65091977023)*x[0]**o+(0.0316560718061)*x[0]+(-0.922906273452)*x[1]**o+(-0.584811809954)*x[1]
-        arg[1,3,2,0]=(-0.675982262546)*x[0]**o+(0.23518662745)*x[0]+(-0.270229269162)*x[1]**o+(-0.00300656227686)*x[1]
-        arg[1,3,2,1]=(0.55691633063)*x[0]**o+(-0.0643123929496)*x[0]+(0.212825067376)*x[1]**o+(-0.0807098593265)*x[1]
-        arg[1,4,0,0]=(0.199100268435)*x[0]**o+(-0.358028564112)*x[0]+(0.130301315926)*x[1]**o+(-0.255752658178)*x[1]
-        arg[1,4,0,1]=(0.821720568968)*x[0]**o+(0.193634063182)*x[0]+(0.862353589302)*x[1]**o+(-0.42971617129)*x[1]
-        arg[1,4,1,0]=(0.51160977767)*x[0]**o+(0.326743318954)*x[0]+(-0.866878934278)*x[1]**o+(-0.927585776234)*x[1]
-        arg[1,4,1,1]=(0.299835915861)*x[0]**o+(-0.969027084981)*x[0]+(-0.589772230832)*x[1]**o+(0.382433302029)*x[1]
-        arg[1,4,2,0]=(0.473101160384)*x[0]**o+(-0.591124830283)*x[0]+(0.0929141413982)*x[1]**o+(-0.529811769054)*x[1]
-        arg[1,4,2,1]=(-0.712363897962)*x[0]**o+(-0.259229026597)*x[0]+(0.00983651162685)*x[1]**o+(-0.329312308231)*x[1]
-        arg[2,0,0,0]=(-0.507414918232)*x[0]**o+(0.668167664289)*x[0]+(0.654870826953)*x[1]**o+(-0.411963068213)*x[1]
-        arg[2,0,0,1]=(-0.894915678458)*x[0]**o+(0.647579368695)*x[0]+(0.222274441569)*x[1]**o+(0.737972296743)*x[1]
-        arg[2,0,1,0]=(-0.457176106717)*x[0]**o+(0.99997698232)*x[0]+(0.524381951875)*x[1]**o+(0.796302331418)*x[1]
-        arg[2,0,1,1]=(-0.761912711581)*x[0]**o+(-0.995235985398)*x[0]+(-0.371926591709)*x[1]**o+(-0.37949019966)*x[1]
-        arg[2,0,2,0]=(0.402826798397)*x[0]**o+(0.473547871218)*x[0]+(0.801636706721)*x[1]**o+(0.314221308918)*x[1]
-        arg[2,0,2,1]=(0.0416846902183)*x[0]**o+(0.815306853966)*x[0]+(-0.526315166764)*x[1]**o+(-0.327935702076)*x[1]
-        arg[2,1,0,0]=(-0.53829655239)*x[0]**o+(-0.467914397053)*x[0]+(0.392659650792)*x[1]**o+(0.309531884089)*x[1]
-        arg[2,1,0,1]=(-0.768324371377)*x[0]**o+(0.136336455054)*x[0]+(0.0653485752909)*x[1]**o+(-0.0181923467911)*x[1]
-        arg[2,1,1,0]=(0.121561771322)*x[0]**o+(-0.794575616334)*x[0]+(0.038194779569)*x[1]**o+(-0.695864614551)*x[1]
-        arg[2,1,1,1]=(0.941872575674)*x[0]**o+(0.322067879395)*x[0]+(0.176873583908)*x[1]**o+(0.266964433323)*x[1]
-        arg[2,1,2,0]=(0.324335817101)*x[0]**o+(0.609048475305)*x[0]+(0.350973789003)*x[1]**o+(-0.284995830372)*x[1]
-        arg[2,1,2,1]=(0.939941132515)*x[0]**o+(0.782468124836)*x[0]+(-0.238539378134)*x[1]**o+(-0.515203802574)*x[1]
-        arg[2,2,0,0]=(0.080179317168)*x[0]**o+(-0.555769741953)*x[0]+(0.283304726007)*x[1]**o+(0.844935300942)*x[1]
-        arg[2,2,0,1]=(0.52001819752)*x[0]**o+(-0.105912273152)*x[0]+(-0.360523424917)*x[1]**o+(-0.179135541646)*x[1]
-        arg[2,2,1,0]=(0.719593478448)*x[0]**o+(-0.722945454687)*x[0]+(0.0316404625439)*x[1]**o+(0.154290328891)*x[1]
-        arg[2,2,1,1]=(0.906382302919)*x[0]**o+(-0.137753840588)*x[0]+(-0.626417865101)*x[1]**o+(-0.890642745149)*x[1]
-        arg[2,2,2,0]=(0.618763086671)*x[0]**o+(-0.267876013516)*x[0]+(0.582353922702)*x[1]**o+(-0.190278788501)*x[1]
-        arg[2,2,2,1]=(0.778824546516)*x[0]**o+(-0.00837218512008)*x[0]+(0.576376019084)*x[1]**o+(-0.173470710629)*x[1]
-        arg[2,3,0,0]=(0.351742111948)*x[0]**o+(-0.641801256932)*x[0]+(-0.979232109277)*x[1]**o+(0.973197715414)*x[1]
-        arg[2,3,0,1]=(-0.194493570182)*x[0]**o+(-0.24088269914)*x[0]+(-0.594521666623)*x[1]**o+(0.442357460052)*x[1]
-        arg[2,3,1,0]=(-0.0677209625916)*x[0]**o+(-0.329246651504)*x[0]+(-0.200109031557)*x[1]**o+(0.0666064469254)*x[1]
-        arg[2,3,1,1]=(-0.31026797404)*x[0]**o+(-0.0420778789656)*x[0]+(-0.534104800904)*x[1]**o+(0.940011883171)*x[1]
-        arg[2,3,2,0]=(0.572825859789)*x[0]**o+(-0.439819027899)*x[0]+(-0.641214796724)*x[1]**o+(0.281317897435)*x[1]
-        arg[2,3,2,1]=(0.410920070755)*x[0]**o+(-0.517259918184)*x[0]+(0.436420469387)*x[1]**o+(0.212276585342)*x[1]
-        arg[2,4,0,0]=(0.0537540090315)*x[0]**o+(-0.362577123782)*x[0]+(-0.0134992480023)*x[1]**o+(0.59055317928)*x[1]
-        arg[2,4,0,1]=(0.894896469792)*x[0]**o+(-0.594219811149)*x[0]+(0.755490579022)*x[1]**o+(-0.222913251691)*x[1]
-        arg[2,4,1,0]=(-0.95471806813)*x[0]**o+(0.364260591437)*x[0]+(-0.51232745259)*x[1]**o+(-0.874795288001)*x[1]
-        arg[2,4,1,1]=(-0.146483465086)*x[0]**o+(0.182495641134)*x[0]+(-0.132211746968)*x[1]**o+(0.39915899917)*x[1]
-        arg[2,4,2,0]=(0.630856642463)*x[0]**o+(0.568438094437)*x[0]+(0.283670966088)*x[1]**o+(0.200206672418)*x[1]
-        arg[2,4,2,1]=(-0.181938802717)*x[0]**o+(0.850684926475)*x[0]+(-0.765889361148)*x[1]**o+(0.750762858672)*x[1]
-        arg[3,0,0,0]=(0.618955933151)*x[0]**o+(0.0280502885803)*x[0]+(-0.518282623282)*x[1]**o+(-0.741257199588)*x[1]
-        arg[3,0,0,1]=(0.122462861306)*x[0]**o+(-0.103190806023)*x[0]+(0.647959918767)*x[1]**o+(0.531727405032)*x[1]
-        arg[3,0,1,0]=(-0.129468664704)*x[0]**o+(0.342288003693)*x[0]+(-0.0268246756133)*x[1]**o+(0.671147920273)*x[1]
-        arg[3,0,1,1]=(-0.99153395274)*x[0]**o+(0.584874556271)*x[0]+(-0.29273067599)*x[1]**o+(-0.802100630404)*x[1]
-        arg[3,0,2,0]=(0.406033817569)*x[0]**o+(-0.664112618189)*x[0]+(0.970253482906)*x[1]**o+(0.979709129918)*x[1]
-        arg[3,0,2,1]=(-0.708798148641)*x[0]**o+(-0.574259437301)*x[0]+(0.305353886124)*x[1]**o+(0.90520799029)*x[1]
-        arg[3,1,0,0]=(-0.296777292529)*x[0]**o+(0.788817860427)*x[0]+(-0.817934426475)*x[1]**o+(-0.480405944642)*x[1]
-        arg[3,1,0,1]=(0.382866653892)*x[0]**o+(-0.0911340124698)*x[0]+(0.449555911305)*x[1]**o+(0.972590525904)*x[1]
-        arg[3,1,1,0]=(0.150349675921)*x[0]**o+(0.316401916978)*x[0]+(0.176755455021)*x[1]**o+(-0.895165552576)*x[1]
-        arg[3,1,1,1]=(-0.334194603044)*x[0]**o+(0.40353334527)*x[0]+(0.510619331296)*x[1]**o+(-0.423857458769)*x[1]
-        arg[3,1,2,0]=(0.876266380991)*x[0]**o+(-0.1146693887)*x[0]+(0.0388933985336)*x[1]**o+(0.537276050219)*x[1]
-        arg[3,1,2,1]=(0.953489127278)*x[0]**o+(-0.40088917811)*x[0]+(0.322112015322)*x[1]**o+(0.570451651396)*x[1]
-        arg[3,2,0,0]=(-0.392674815471)*x[0]**o+(0.805725364633)*x[0]+(-0.550131544344)*x[1]**o+(-0.902042986324)*x[1]
-        arg[3,2,0,1]=(0.996009652754)*x[0]**o+(0.534022968708)*x[0]+(-0.251810035763)*x[1]**o+(-0.324231235105)*x[1]
-        arg[3,2,1,0]=(-0.280691594637)*x[0]**o+(0.716441336919)*x[0]+(0.444717298591)*x[1]**o+(-0.417682576675)*x[1]
-        arg[3,2,1,1]=(-0.528033696021)*x[0]**o+(0.105118392268)*x[0]+(0.219345332231)*x[1]**o+(-0.554011705858)*x[1]
-        arg[3,2,2,0]=(0.869967952526)*x[0]**o+(-0.285204973916)*x[0]+(0.676958471189)*x[1]**o+(-0.109813007662)*x[1]
-        arg[3,2,2,1]=(-0.183338615818)*x[0]**o+(0.124214512553)*x[0]+(-0.00262420395052)*x[1]**o+(0.505099322191)*x[1]
-        arg[3,3,0,0]=(-0.77019083751)*x[0]**o+(-0.288304317474)*x[0]+(-0.674724525333)*x[1]**o+(0.6230658909)*x[1]
-        arg[3,3,0,1]=(0.4027332007)*x[0]**o+(0.0181383553658)*x[0]+(0.0346834190431)*x[1]**o+(-0.343302420746)*x[1]
-        arg[3,3,1,0]=(0.0907452191096)*x[0]**o+(-0.734197819823)*x[0]+(-0.262536956938)*x[1]**o+(-0.838964523281)*x[1]
-        arg[3,3,1,1]=(0.362001847336)*x[0]**o+(-0.99196319473)*x[0]+(-0.544565811529)*x[1]**o+(0.0460139495686)*x[1]
-        arg[3,3,2,0]=(0.43659913886)*x[0]**o+(-0.42986865456)*x[0]+(-0.298749218949)*x[1]**o+(0.927334871957)*x[1]
-        arg[3,3,2,1]=(0.400272592051)*x[0]**o+(0.332756541456)*x[0]+(0.971127734155)*x[1]**o+(0.653965425034)*x[1]
-        arg[3,4,0,0]=(0.663781122153)*x[0]**o+(0.697898766724)*x[0]+(0.157432061303)*x[1]**o+(-0.0526003145497)*x[1]
-        arg[3,4,0,1]=(-0.463791084222)*x[0]**o+(0.384914785855)*x[0]+(-0.996485418809)*x[1]**o+(-0.519106290889)*x[1]
-        arg[3,4,1,0]=(-0.598068247392)*x[0]**o+(0.553482523952)*x[0]+(0.202485340343)*x[1]**o+(-0.540515409196)*x[1]
-        arg[3,4,1,1]=(0.134764979841)*x[0]**o+(0.0141136152488)*x[0]+(-0.536476467366)*x[1]**o+(0.323150057577)*x[1]
-        arg[3,4,2,0]=(-0.73096888708)*x[0]**o+(0.485529166207)*x[0]+(-0.541219829073)*x[1]**o+(0.471443044424)*x[1]
-        arg[3,4,2,1]=(-0.815808733094)*x[0]**o+(0.694490460113)*x[0]+(0.292301816313)*x[1]**o+(0.700014734893)*x[1]
-        ref[0,0,0,0]=(-0.937777610663)*x_ref[0]**o+(-0.0228520946632)*x_ref[0]+(0.642385396583)*x_ref[1]**o+(-0.803821945812)*x_ref[1]
-        ref[0,0,0,1]=(-0.398785307492)*x_ref[0]**o+(0.0450288952883)*x_ref[0]+(-0.777780548133)*x_ref[1]**o+(0.0273772099414)*x_ref[1]
-        ref[0,0,1,0]=(-0.667280086925)*x_ref[0]**o+(-0.934642710274)*x_ref[0]+(0.565327494491)*x_ref[1]**o+(0.988521769056)*x_ref[1]
-        ref[0,0,1,1]=(-0.225562383498)*x_ref[0]**o+(-0.280566031134)*x_ref[0]+(-0.295768954831)*x_ref[1]**o+(0.102759013802)*x_ref[1]
-        ref[0,0,2,0]=(-0.179577502546)*x_ref[0]**o+(-0.156932777074)*x_ref[0]+(-0.145616153633)*x_ref[1]**o+(0.971876899135)*x_ref[1]
-        ref[0,0,2,1]=(-0.840266409118)*x_ref[0]**o+(0.704356785022)*x_ref[0]+(0.740091470711)*x_ref[1]**o+(0.708478499023)*x_ref[1]
-        ref[0,1,0,0]=(-0.487161662806)*x_ref[0]**o+(0.565313908399)*x_ref[0]+(-0.33708697293)*x_ref[1]**o+(0.731675966546)*x_ref[1]
-        ref[0,1,0,1]=(-0.135615857963)*x_ref[0]**o+(0.265408777025)*x_ref[0]+(-0.168207260227)*x_ref[1]**o+(-0.598974659317)*x_ref[1]
-        ref[0,1,1,0]=(0.0533944010258)*x_ref[0]**o+(0.819248906738)*x_ref[0]+(-0.837005251524)*x_ref[1]**o+(0.119613618595)*x_ref[1]
-        ref[0,1,1,1]=(-0.257520627047)*x_ref[0]**o+(0.339264545713)*x_ref[0]+(0.137721228188)*x_ref[1]**o+(-0.512251030979)*x_ref[1]
-        ref[0,1,2,0]=(-0.797070396749)*x_ref[0]**o+(0.690173285077)*x_ref[0]+(-0.213206187271)*x_ref[1]**o+(-0.873999125945)*x_ref[1]
-        ref[0,1,2,1]=(-0.847662300367)*x_ref[0]**o+(0.785781114266)*x_ref[0]+(-0.456918398811)*x_ref[1]**o+(0.458881079947)*x_ref[1]
-        ref[0,2,0,0]=(-0.385269163334)*x_ref[0]**o+(0.135941228964)*x_ref[0]+(0.233245620648)*x_ref[1]**o+(-0.246282209626)*x_ref[1]
-        ref[0,2,0,1]=(0.372914636218)*x_ref[0]**o+(-0.160283657003)*x_ref[0]+(0.0565043889781)*x_ref[1]**o+(0.199715522021)*x_ref[1]
-        ref[0,2,1,0]=(0.676198390598)*x_ref[0]**o+(0.938025122014)*x_ref[0]+(0.161074696651)*x_ref[1]**o+(-0.155495646964)*x_ref[1]
-        ref[0,2,1,1]=(-0.709286924155)*x_ref[0]**o+(-0.173716284776)*x_ref[0]+(0.0576435484694)*x_ref[1]**o+(0.673924697832)*x_ref[1]
-        ref[0,2,2,0]=(-0.436468652969)*x_ref[0]**o+(0.117279009082)*x_ref[0]+(-0.731436369191)*x_ref[1]**o+(0.919578503469)*x_ref[1]
-        ref[0,2,2,1]=(-0.691042646151)*x_ref[0]**o+(-0.606293725574)*x_ref[0]+(0.657291692759)*x_ref[1]**o+(-0.0146398994729)*x_ref[1]
-        ref[0,3,0,0]=(0.365939313719)*x_ref[0]**o+(-0.221236913792)*x_ref[0]+(-0.729594967883)*x_ref[1]**o+(0.0179024719114)*x_ref[1]
-        ref[0,3,0,1]=(0.135892133258)*x_ref[0]**o+(0.728069461936)*x_ref[0]+(-0.365691795279)*x_ref[1]**o+(0.877708599922)*x_ref[1]
-        ref[0,3,1,0]=(-0.853312456817)*x_ref[0]**o+(-0.713031969049)*x_ref[0]+(0.274755827464)*x_ref[1]**o+(-0.527330699033)*x_ref[1]
-        ref[0,3,1,1]=(-0.30358584687)*x_ref[0]**o+(0.871629391968)*x_ref[0]+(0.906915162645)*x_ref[1]**o+(0.499955429041)*x_ref[1]
-        ref[0,3,2,0]=(-0.880532587427)*x_ref[0]**o+(0.265729672258)*x_ref[0]+(0.528677136349)*x_ref[1]**o+(-0.224602964925)*x_ref[1]
-        ref[0,3,2,1]=(0.158632463532)*x_ref[0]**o+(-0.665418329643)*x_ref[0]+(0.957661069067)*x_ref[1]**o+(-0.23771309434)*x_ref[1]
-        ref[0,4,0,0]=(-0.128073514905)*x_ref[0]**o+(-0.452543798055)*x_ref[0]+(0.303808626277)*x_ref[1]**o+(0.841041779759)*x_ref[1]
-        ref[0,4,0,1]=(0.0219309964781)*x_ref[0]**o+(-0.949488393443)*x_ref[0]+(0.0436905404663)*x_ref[1]**o+(-0.304527242795)*x_ref[1]
-        ref[0,4,1,0]=(-0.792275137775)*x_ref[0]**o+(0.450079829644)*x_ref[0]+(0.162879981637)*x_ref[1]**o+(-0.185839015805)*x_ref[1]
-        ref[0,4,1,1]=(0.761932713893)*x_ref[0]**o+(0.932601232945)*x_ref[0]+(-0.606328305783)*x_ref[1]**o+(-0.123973545682)*x_ref[1]
-        ref[0,4,2,0]=(-0.514088304908)*x_ref[0]**o+(0.987668774807)*x_ref[0]+(0.866078887168)*x_ref[1]**o+(-0.608518224484)*x_ref[1]
-        ref[0,4,2,1]=(-0.427564608028)*x_ref[0]**o+(0.231599614445)*x_ref[0]+(-0.406862229819)*x_ref[1]**o+(0.358456864265)*x_ref[1]
-        ref[1,0,0,0]=(0.342092171801)*x_ref[0]**o+(-0.264522675185)*x_ref[0]+(-0.37976917867)*x_ref[1]**o+(0.778596602561)*x_ref[1]
-        ref[1,0,0,1]=(0.672156473235)*x_ref[0]**o+(0.320317500856)*x_ref[0]+(0.514206881296)*x_ref[1]**o+(0.602594631705)*x_ref[1]
-        ref[1,0,1,0]=(0.914472920293)*x_ref[0]**o+(0.525647943447)*x_ref[0]+(0.685613621597)*x_ref[1]**o+(0.482308039231)*x_ref[1]
-        ref[1,0,1,1]=(-0.727982874425)*x_ref[0]**o+(-0.417964463065)*x_ref[0]+(0.825853988063)*x_ref[1]**o+(0.236134760252)*x_ref[1]
-        ref[1,0,2,0]=(0.922186381756)*x_ref[0]**o+(-0.140522762044)*x_ref[0]+(-0.282169431666)*x_ref[1]**o+(0.778383988397)*x_ref[1]
-        ref[1,0,2,1]=(0.307296736289)*x_ref[0]**o+(0.589844868569)*x_ref[0]+(0.64571457752)*x_ref[1]**o+(0.749333079485)*x_ref[1]
-        ref[1,1,0,0]=(0.908345176703)*x_ref[0]**o+(-0.476053147164)*x_ref[0]+(0.0828501189289)*x_ref[1]**o+(0.280657117705)*x_ref[1]
-        ref[1,1,0,1]=(0.396128814097)*x_ref[0]**o+(0.368821575482)*x_ref[0]+(-0.916584602334)*x_ref[1]**o+(-0.149377992159)*x_ref[1]
-        ref[1,1,1,0]=(-0.38468474313)*x_ref[0]**o+(0.304742499301)*x_ref[0]+(0.638083865846)*x_ref[1]**o+(-0.332046460663)*x_ref[1]
-        ref[1,1,1,1]=(0.845097787138)*x_ref[0]**o+(-0.34949498164)*x_ref[0]+(0.229157202572)*x_ref[1]**o+(0.677584672856)*x_ref[1]
-        ref[1,1,2,0]=(0.0280692825358)*x_ref[0]**o+(0.567451370107)*x_ref[0]+(0.66934188305)*x_ref[1]**o+(-0.477197213188)*x_ref[1]
-        ref[1,1,2,1]=(0.375411487264)*x_ref[0]**o+(0.55086548839)*x_ref[0]+(-0.392135351366)*x_ref[1]**o+(0.91971334589)*x_ref[1]
-        ref[1,2,0,0]=(-0.7659270368)*x_ref[0]**o+(-0.338082792509)*x_ref[0]+(-0.26272975232)*x_ref[1]**o+(0.267936454568)*x_ref[1]
-        ref[1,2,0,1]=(0.918125455771)*x_ref[0]**o+(0.182896655906)*x_ref[0]+(0.525396835337)*x_ref[1]**o+(0.201918789801)*x_ref[1]
-        ref[1,2,1,0]=(-0.54472490266)*x_ref[0]**o+(0.693714832775)*x_ref[0]+(0.898278265794)*x_ref[1]**o+(0.345095187159)*x_ref[1]
-        ref[1,2,1,1]=(-0.498607752195)*x_ref[0]**o+(0.84678344253)*x_ref[0]+(0.678992455984)*x_ref[1]**o+(-0.597396262326)*x_ref[1]
-        ref[1,2,2,0]=(0.215267998554)*x_ref[0]**o+(0.384479388838)*x_ref[0]+(-0.09078862662)*x_ref[1]**o+(-0.0162185695524)*x_ref[1]
-        ref[1,2,2,1]=(-0.335574750173)*x_ref[0]**o+(-0.439933690512)*x_ref[0]+(0.194601817488)*x_ref[1]**o+(0.795181445633)*x_ref[1]
-        ref[1,3,0,0]=(0.862180273604)*x_ref[0]**o+(0.276662657248)*x_ref[0]+(-0.908827123328)*x_ref[1]**o+(0.290406540669)*x_ref[1]
-        ref[1,3,0,1]=(-0.620441636176)*x_ref[0]**o+(0.448236189204)*x_ref[0]+(-0.503817375869)*x_ref[1]**o+(0.689447469467)*x_ref[1]
-        ref[1,3,1,0]=(0.126327572417)*x_ref[0]**o+(-0.476552913848)*x_ref[0]+(0.362273273226)*x_ref[1]**o+(-0.816228830372)*x_ref[1]
-        ref[1,3,1,1]=(-0.65091977023)*x_ref[0]**o+(0.0316560718061)*x_ref[0]+(-0.922906273452)*x_ref[1]**o+(-0.584811809954)*x_ref[1]
-        ref[1,3,2,0]=(-0.675982262546)*x_ref[0]**o+(0.23518662745)*x_ref[0]+(-0.270229269162)*x_ref[1]**o+(-0.00300656227686)*x_ref[1]
-        ref[1,3,2,1]=(0.55691633063)*x_ref[0]**o+(-0.0643123929496)*x_ref[0]+(0.212825067376)*x_ref[1]**o+(-0.0807098593265)*x_ref[1]
-        ref[1,4,0,0]=(0.199100268435)*x_ref[0]**o+(-0.358028564112)*x_ref[0]+(0.130301315926)*x_ref[1]**o+(-0.255752658178)*x_ref[1]
-        ref[1,4,0,1]=(0.821720568968)*x_ref[0]**o+(0.193634063182)*x_ref[0]+(0.862353589302)*x_ref[1]**o+(-0.42971617129)*x_ref[1]
-        ref[1,4,1,0]=(0.51160977767)*x_ref[0]**o+(0.326743318954)*x_ref[0]+(-0.866878934278)*x_ref[1]**o+(-0.927585776234)*x_ref[1]
-        ref[1,4,1,1]=(0.299835915861)*x_ref[0]**o+(-0.969027084981)*x_ref[0]+(-0.589772230832)*x_ref[1]**o+(0.382433302029)*x_ref[1]
-        ref[1,4,2,0]=(0.473101160384)*x_ref[0]**o+(-0.591124830283)*x_ref[0]+(0.0929141413982)*x_ref[1]**o+(-0.529811769054)*x_ref[1]
-        ref[1,4,2,1]=(-0.712363897962)*x_ref[0]**o+(-0.259229026597)*x_ref[0]+(0.00983651162685)*x_ref[1]**o+(-0.329312308231)*x_ref[1]
-        ref[2,0,0,0]=(-0.507414918232)*x_ref[0]**o+(0.668167664289)*x_ref[0]+(0.654870826953)*x_ref[1]**o+(-0.411963068213)*x_ref[1]
-        ref[2,0,0,1]=(-0.894915678458)*x_ref[0]**o+(0.647579368695)*x_ref[0]+(0.222274441569)*x_ref[1]**o+(0.737972296743)*x_ref[1]
-        ref[2,0,1,0]=(-0.457176106717)*x_ref[0]**o+(0.99997698232)*x_ref[0]+(0.524381951875)*x_ref[1]**o+(0.796302331418)*x_ref[1]
-        ref[2,0,1,1]=(-0.761912711581)*x_ref[0]**o+(-0.995235985398)*x_ref[0]+(-0.371926591709)*x_ref[1]**o+(-0.37949019966)*x_ref[1]
-        ref[2,0,2,0]=(0.402826798397)*x_ref[0]**o+(0.473547871218)*x_ref[0]+(0.801636706721)*x_ref[1]**o+(0.314221308918)*x_ref[1]
-        ref[2,0,2,1]=(0.0416846902183)*x_ref[0]**o+(0.815306853966)*x_ref[0]+(-0.526315166764)*x_ref[1]**o+(-0.327935702076)*x_ref[1]
-        ref[2,1,0,0]=(-0.53829655239)*x_ref[0]**o+(-0.467914397053)*x_ref[0]+(0.392659650792)*x_ref[1]**o+(0.309531884089)*x_ref[1]
-        ref[2,1,0,1]=(-0.768324371377)*x_ref[0]**o+(0.136336455054)*x_ref[0]+(0.0653485752909)*x_ref[1]**o+(-0.0181923467911)*x_ref[1]
-        ref[2,1,1,0]=(0.121561771322)*x_ref[0]**o+(-0.794575616334)*x_ref[0]+(0.038194779569)*x_ref[1]**o+(-0.695864614551)*x_ref[1]
-        ref[2,1,1,1]=(0.941872575674)*x_ref[0]**o+(0.322067879395)*x_ref[0]+(0.176873583908)*x_ref[1]**o+(0.266964433323)*x_ref[1]
-        ref[2,1,2,0]=(0.324335817101)*x_ref[0]**o+(0.609048475305)*x_ref[0]+(0.350973789003)*x_ref[1]**o+(-0.284995830372)*x_ref[1]
-        ref[2,1,2,1]=(0.939941132515)*x_ref[0]**o+(0.782468124836)*x_ref[0]+(-0.238539378134)*x_ref[1]**o+(-0.515203802574)*x_ref[1]
-        ref[2,2,0,0]=(0.080179317168)*x_ref[0]**o+(-0.555769741953)*x_ref[0]+(0.283304726007)*x_ref[1]**o+(0.844935300942)*x_ref[1]
-        ref[2,2,0,1]=(0.52001819752)*x_ref[0]**o+(-0.105912273152)*x_ref[0]+(-0.360523424917)*x_ref[1]**o+(-0.179135541646)*x_ref[1]
-        ref[2,2,1,0]=(0.719593478448)*x_ref[0]**o+(-0.722945454687)*x_ref[0]+(0.0316404625439)*x_ref[1]**o+(0.154290328891)*x_ref[1]
-        ref[2,2,1,1]=(0.906382302919)*x_ref[0]**o+(-0.137753840588)*x_ref[0]+(-0.626417865101)*x_ref[1]**o+(-0.890642745149)*x_ref[1]
-        ref[2,2,2,0]=(0.618763086671)*x_ref[0]**o+(-0.267876013516)*x_ref[0]+(0.582353922702)*x_ref[1]**o+(-0.190278788501)*x_ref[1]
-        ref[2,2,2,1]=(0.778824546516)*x_ref[0]**o+(-0.00837218512008)*x_ref[0]+(0.576376019084)*x_ref[1]**o+(-0.173470710629)*x_ref[1]
-        ref[2,3,0,0]=(0.351742111948)*x_ref[0]**o+(-0.641801256932)*x_ref[0]+(-0.979232109277)*x_ref[1]**o+(0.973197715414)*x_ref[1]
-        ref[2,3,0,1]=(-0.194493570182)*x_ref[0]**o+(-0.24088269914)*x_ref[0]+(-0.594521666623)*x_ref[1]**o+(0.442357460052)*x_ref[1]
-        ref[2,3,1,0]=(-0.0677209625916)*x_ref[0]**o+(-0.329246651504)*x_ref[0]+(-0.200109031557)*x_ref[1]**o+(0.0666064469254)*x_ref[1]
-        ref[2,3,1,1]=(-0.31026797404)*x_ref[0]**o+(-0.0420778789656)*x_ref[0]+(-0.534104800904)*x_ref[1]**o+(0.940011883171)*x_ref[1]
-        ref[2,3,2,0]=(0.572825859789)*x_ref[0]**o+(-0.439819027899)*x_ref[0]+(-0.641214796724)*x_ref[1]**o+(0.281317897435)*x_ref[1]
-        ref[2,3,2,1]=(0.410920070755)*x_ref[0]**o+(-0.517259918184)*x_ref[0]+(0.436420469387)*x_ref[1]**o+(0.212276585342)*x_ref[1]
-        ref[2,4,0,0]=(0.0537540090315)*x_ref[0]**o+(-0.362577123782)*x_ref[0]+(-0.0134992480023)*x_ref[1]**o+(0.59055317928)*x_ref[1]
-        ref[2,4,0,1]=(0.894896469792)*x_ref[0]**o+(-0.594219811149)*x_ref[0]+(0.755490579022)*x_ref[1]**o+(-0.222913251691)*x_ref[1]
-        ref[2,4,1,0]=(-0.95471806813)*x_ref[0]**o+(0.364260591437)*x_ref[0]+(-0.51232745259)*x_ref[1]**o+(-0.874795288001)*x_ref[1]
-        ref[2,4,1,1]=(-0.146483465086)*x_ref[0]**o+(0.182495641134)*x_ref[0]+(-0.132211746968)*x_ref[1]**o+(0.39915899917)*x_ref[1]
-        ref[2,4,2,0]=(0.630856642463)*x_ref[0]**o+(0.568438094437)*x_ref[0]+(0.283670966088)*x_ref[1]**o+(0.200206672418)*x_ref[1]
-        ref[2,4,2,1]=(-0.181938802717)*x_ref[0]**o+(0.850684926475)*x_ref[0]+(-0.765889361148)*x_ref[1]**o+(0.750762858672)*x_ref[1]
-        ref[3,0,0,0]=(0.618955933151)*x_ref[0]**o+(0.0280502885803)*x_ref[0]+(-0.518282623282)*x_ref[1]**o+(-0.741257199588)*x_ref[1]
-        ref[3,0,0,1]=(0.122462861306)*x_ref[0]**o+(-0.103190806023)*x_ref[0]+(0.647959918767)*x_ref[1]**o+(0.531727405032)*x_ref[1]
-        ref[3,0,1,0]=(-0.129468664704)*x_ref[0]**o+(0.342288003693)*x_ref[0]+(-0.0268246756133)*x_ref[1]**o+(0.671147920273)*x_ref[1]
-        ref[3,0,1,1]=(-0.99153395274)*x_ref[0]**o+(0.584874556271)*x_ref[0]+(-0.29273067599)*x_ref[1]**o+(-0.802100630404)*x_ref[1]
-        ref[3,0,2,0]=(0.406033817569)*x_ref[0]**o+(-0.664112618189)*x_ref[0]+(0.970253482906)*x_ref[1]**o+(0.979709129918)*x_ref[1]
-        ref[3,0,2,1]=(-0.708798148641)*x_ref[0]**o+(-0.574259437301)*x_ref[0]+(0.305353886124)*x_ref[1]**o+(0.90520799029)*x_ref[1]
-        ref[3,1,0,0]=(-0.296777292529)*x_ref[0]**o+(0.788817860427)*x_ref[0]+(-0.817934426475)*x_ref[1]**o+(-0.480405944642)*x_ref[1]
-        ref[3,1,0,1]=(0.382866653892)*x_ref[0]**o+(-0.0911340124698)*x_ref[0]+(0.449555911305)*x_ref[1]**o+(0.972590525904)*x_ref[1]
-        ref[3,1,1,0]=(0.150349675921)*x_ref[0]**o+(0.316401916978)*x_ref[0]+(0.176755455021)*x_ref[1]**o+(-0.895165552576)*x_ref[1]
-        ref[3,1,1,1]=(-0.334194603044)*x_ref[0]**o+(0.40353334527)*x_ref[0]+(0.510619331296)*x_ref[1]**o+(-0.423857458769)*x_ref[1]
-        ref[3,1,2,0]=(0.876266380991)*x_ref[0]**o+(-0.1146693887)*x_ref[0]+(0.0388933985336)*x_ref[1]**o+(0.537276050219)*x_ref[1]
-        ref[3,1,2,1]=(0.953489127278)*x_ref[0]**o+(-0.40088917811)*x_ref[0]+(0.322112015322)*x_ref[1]**o+(0.570451651396)*x_ref[1]
-        ref[3,2,0,0]=(-0.392674815471)*x_ref[0]**o+(0.805725364633)*x_ref[0]+(-0.550131544344)*x_ref[1]**o+(-0.902042986324)*x_ref[1]
-        ref[3,2,0,1]=(0.996009652754)*x_ref[0]**o+(0.534022968708)*x_ref[0]+(-0.251810035763)*x_ref[1]**o+(-0.324231235105)*x_ref[1]
-        ref[3,2,1,0]=(-0.280691594637)*x_ref[0]**o+(0.716441336919)*x_ref[0]+(0.444717298591)*x_ref[1]**o+(-0.417682576675)*x_ref[1]
-        ref[3,2,1,1]=(-0.528033696021)*x_ref[0]**o+(0.105118392268)*x_ref[0]+(0.219345332231)*x_ref[1]**o+(-0.554011705858)*x_ref[1]
-        ref[3,2,2,0]=(0.869967952526)*x_ref[0]**o+(-0.285204973916)*x_ref[0]+(0.676958471189)*x_ref[1]**o+(-0.109813007662)*x_ref[1]
-        ref[3,2,2,1]=(-0.183338615818)*x_ref[0]**o+(0.124214512553)*x_ref[0]+(-0.00262420395052)*x_ref[1]**o+(0.505099322191)*x_ref[1]
-        ref[3,3,0,0]=(-0.77019083751)*x_ref[0]**o+(-0.288304317474)*x_ref[0]+(-0.674724525333)*x_ref[1]**o+(0.6230658909)*x_ref[1]
-        ref[3,3,0,1]=(0.4027332007)*x_ref[0]**o+(0.0181383553658)*x_ref[0]+(0.0346834190431)*x_ref[1]**o+(-0.343302420746)*x_ref[1]
-        ref[3,3,1,0]=(0.0907452191096)*x_ref[0]**o+(-0.734197819823)*x_ref[0]+(-0.262536956938)*x_ref[1]**o+(-0.838964523281)*x_ref[1]
-        ref[3,3,1,1]=(0.362001847336)*x_ref[0]**o+(-0.99196319473)*x_ref[0]+(-0.544565811529)*x_ref[1]**o+(0.0460139495686)*x_ref[1]
-        ref[3,3,2,0]=(0.43659913886)*x_ref[0]**o+(-0.42986865456)*x_ref[0]+(-0.298749218949)*x_ref[1]**o+(0.927334871957)*x_ref[1]
-        ref[3,3,2,1]=(0.400272592051)*x_ref[0]**o+(0.332756541456)*x_ref[0]+(0.971127734155)*x_ref[1]**o+(0.653965425034)*x_ref[1]
-        ref[3,4,0,0]=(0.663781122153)*x_ref[0]**o+(0.697898766724)*x_ref[0]+(0.157432061303)*x_ref[1]**o+(-0.0526003145497)*x_ref[1]
-        ref[3,4,0,1]=(-0.463791084222)*x_ref[0]**o+(0.384914785855)*x_ref[0]+(-0.996485418809)*x_ref[1]**o+(-0.519106290889)*x_ref[1]
-        ref[3,4,1,0]=(-0.598068247392)*x_ref[0]**o+(0.553482523952)*x_ref[0]+(0.202485340343)*x_ref[1]**o+(-0.540515409196)*x_ref[1]
-        ref[3,4,1,1]=(0.134764979841)*x_ref[0]**o+(0.0141136152488)*x_ref[0]+(-0.536476467366)*x_ref[1]**o+(0.323150057577)*x_ref[1]
-        ref[3,4,2,0]=(-0.73096888708)*x_ref[0]**o+(0.485529166207)*x_ref[0]+(-0.541219829073)*x_ref[1]**o+(0.471443044424)*x_ref[1]
-        ref[3,4,2,1]=(-0.815808733094)*x_ref[0]**o+(0.694490460113)*x_ref[0]+(0.292301816313)*x_ref[1]**o+(0.700014734893)*x_ref[1]
-      else:
-        arg[0,0,0,0]=(0.244520699379)*x[0]**o+(-0.125771252842)*x[0]+(0.654557798928)*x[1]**o+(0.438110948503)*x[1]+(0.399996169353)*x[2]**o+(0.37037141324)*x[2]
-        arg[0,0,0,1]=(0.019693348021)*x[0]**o+(-0.509938412509)*x[0]+(-0.425852907243)*x[1]**o+(0.351462945072)*x[1]+(0.628410872426)*x[2]**o+(0.4769252017)*x[2]
-        arg[0,0,1,0]=(0.623813767602)*x[0]**o+(-0.940818977456)*x[0]+(-0.00111063869285)*x[1]**o+(-0.577558081394)*x[1]+(-0.30810971068)*x[2]**o+(-0.660149007373)*x[2]
-        arg[0,0,1,1]=(0.994105796371)*x[0]**o+(0.199970906966)*x[0]+(0.961509001434)*x[1]**o+(-0.783069602127)*x[1]+(-0.179922863021)*x[2]**o+(-0.386974503089)*x[2]
-        arg[0,0,2,0]=(0.932745137122)*x[0]**o+(0.627995830114)*x[0]+(-0.334344490736)*x[1]**o+(0.733210590815)*x[1]+(-0.23424959051)*x[2]**o+(0.140644214958)*x[2]
-        arg[0,0,2,1]=(-0.282836519247)*x[0]**o+(-0.744077669768)*x[0]+(0.123898574243)*x[1]**o+(0.562384289004)*x[1]+(0.0757927394637)*x[2]**o+(0.767684067921)*x[2]
-        arg[0,1,0,0]=(0.212366202901)*x[0]**o+(-0.679228304269)*x[0]+(0.829706652419)*x[1]**o+(0.24389996073)*x[1]+(0.909367025978)*x[2]**o+(0.280617790407)*x[2]
-        arg[0,1,0,1]=(0.760070952632)*x[0]**o+(-0.678309252372)*x[0]+(0.0372281910363)*x[1]**o+(0.0284582814297)*x[1]+(-0.092349250941)*x[2]**o+(0.347713645921)*x[2]
-        arg[0,1,1,0]=(0.248410230191)*x[0]**o+(-0.833983202295)*x[0]+(-0.759357278899)*x[1]**o+(0.880038285893)*x[1]+(-0.734799540652)*x[2]**o+(0.493330231104)*x[2]
-        arg[0,1,1,1]=(0.0359919724228)*x[0]**o+(-0.0393899014057)*x[0]+(0.185155782488)*x[1]**o+(-0.92692925719)*x[1]+(0.74718037404)*x[2]**o+(-0.283900681763)*x[2]
-        arg[0,1,2,0]=(-0.208643544667)*x[0]**o+(0.368200149096)*x[0]+(-0.327032725172)*x[1]**o+(-0.245547905792)*x[1]+(0.0886488214242)*x[2]**o+(0.179139897691)*x[2]
-        arg[0,1,2,1]=(-0.0618762861459)*x[0]**o+(0.253419217897)*x[0]+(0.840270125508)*x[1]**o+(0.0223556878387)*x[1]+(0.0560904700176)*x[2]**o+(-0.646231049424)*x[2]
-        arg[0,2,0,0]=(0.568966969865)*x[0]**o+(0.786776511348)*x[0]+(0.150595926116)*x[1]**o+(-0.780164417762)*x[1]+(0.510149831242)*x[2]**o+(-0.902871929903)*x[2]
-        arg[0,2,0,1]=(-0.817062669957)*x[0]**o+(0.626805486868)*x[0]+(-0.566129786829)*x[1]**o+(0.248418548905)*x[1]+(-0.273995326019)*x[2]**o+(0.402023521018)*x[2]
-        arg[0,2,1,0]=(-0.160276235113)*x[0]**o+(-0.0732543937053)*x[0]+(-0.0651595982698)*x[1]**o+(-0.529463476237)*x[1]+(0.346098812945)*x[2]**o+(0.418367016439)*x[2]
-        arg[0,2,1,1]=(0.736907408498)*x[0]**o+(-0.123612748157)*x[0]+(0.000834659108651)*x[1]**o+(0.568833761363)*x[1]+(-0.542676953582)*x[2]**o+(0.026182553484)*x[2]
-        arg[0,2,2,0]=(0.320985918151)*x[0]**o+(0.0512654311644)*x[0]+(-0.0313412913713)*x[1]**o+(0.295659930913)*x[1]+(-0.989560405329)*x[2]**o+(-0.107344246298)*x[2]
-        arg[0,2,2,1]=(-0.957793939949)*x[0]**o+(-0.177591880789)*x[0]+(0.0785829772689)*x[1]**o+(0.121445956612)*x[1]+(-0.384134176508)*x[2]**o+(-0.775433914622)*x[2]
-        arg[0,3,0,0]=(-0.130620609021)*x[0]**o+(0.268283814564)*x[0]+(-0.192835222037)*x[1]**o+(0.235341688541)*x[1]+(0.957069315916)*x[2]**o+(-0.708853567529)*x[2]
-        arg[0,3,0,1]=(-0.377028600614)*x[0]**o+(-0.858446162753)*x[0]+(-0.850630580491)*x[1]**o+(-0.810676898206)*x[1]+(-0.613330062817)*x[2]**o+(0.714335738947)*x[2]
-        arg[0,3,1,0]=(-0.602336649415)*x[0]**o+(-0.166667559558)*x[0]+(0.962948866081)*x[1]**o+(0.939531483467)*x[1]+(0.267767294244)*x[2]**o+(0.247155872428)*x[2]
-        arg[0,3,1,1]=(0.838505391049)*x[0]**o+(0.115204438919)*x[0]+(0.989010581013)*x[1]**o+(-0.649789818418)*x[1]+(0.757328444925)*x[2]**o+(0.825158129449)*x[2]
-        arg[0,3,2,0]=(0.724488034506)*x[0]**o+(0.0333093325925)*x[0]+(0.864643652652)*x[1]**o+(-0.557517585925)*x[1]+(-0.340534672063)*x[2]**o+(-0.00425705176271)*x[2]
-        arg[0,3,2,1]=(-0.366459483792)*x[0]**o+(0.257706980646)*x[0]+(0.821731531023)*x[1]**o+(-0.212501303617)*x[1]+(-0.128977067795)*x[2]**o+(-0.931439847041)*x[2]
-        arg[0,4,0,0]=(0.398430239547)*x[0]**o+(-0.00991917699933)*x[0]+(-0.182471763172)*x[1]**o+(0.218327764946)*x[1]+(-0.484510127696)*x[2]**o+(-0.360678193996)*x[2]
-        arg[0,4,0,1]=(0.0640680415135)*x[0]**o+(0.671150063087)*x[0]+(0.208610130381)*x[1]**o+(-0.441252393083)*x[1]+(0.365150146582)*x[2]**o+(-0.228346558142)*x[2]
-        arg[0,4,1,0]=(-0.852694824303)*x[0]**o+(0.181041494463)*x[0]+(0.898413617086)*x[1]**o+(-0.918988862595)*x[1]+(0.169010143324)*x[2]**o+(0.540458809834)*x[2]
-        arg[0,4,1,1]=(-0.213782550366)*x[0]**o+(-0.180557891041)*x[0]+(0.23144059382)*x[1]**o+(0.0609482143429)*x[1]+(0.89256221946)*x[2]**o+(0.977857158982)*x[2]
-        arg[0,4,2,0]=(0.320772898841)*x[0]**o+(0.371610189518)*x[0]+(0.692264150983)*x[1]**o+(-0.751154935415)*x[1]+(-0.163272902772)*x[2]**o+(0.0635386628764)*x[2]
-        arg[0,4,2,1]=(-0.316885908577)*x[0]**o+(0.476104431241)*x[0]+(-0.647713072489)*x[1]**o+(0.683813449908)*x[1]+(0.699293342945)*x[2]**o+(-0.0373906770097)*x[2]
-        arg[1,0,0,0]=(-0.030329265733)*x[0]**o+(-0.0115761157375)*x[0]+(-0.30993823088)*x[1]**o+(0.628877975389)*x[1]+(-0.582940961417)*x[2]**o+(0.154786570457)*x[2]
-        arg[1,0,0,1]=(-0.593610753495)*x[0]**o+(-0.822232097764)*x[0]+(-0.465144000698)*x[1]**o+(-0.62576868204)*x[1]+(-0.53588531407)*x[2]**o+(0.119119578421)*x[2]
-        arg[1,0,1,0]=(-0.15668734059)*x[0]**o+(-0.950658811047)*x[0]+(-0.267969935748)*x[1]**o+(0.0919415340304)*x[1]+(-0.0445382452662)*x[2]**o+(0.949984936459)*x[2]
-        arg[1,0,1,1]=(-0.762474809436)*x[0]**o+(0.794314442281)*x[0]+(0.617742930372)*x[1]**o+(-0.502057530669)*x[1]+(0.42532154189)*x[2]**o+(0.343417687179)*x[2]
-        arg[1,0,2,0]=(0.259583418084)*x[0]**o+(0.460122326434)*x[0]+(0.875185242587)*x[1]**o+(-0.621232091699)*x[1]+(0.922536397008)*x[2]**o+(-0.494729334323)*x[2]
-        arg[1,0,2,1]=(0.79625863156)*x[0]**o+(-0.980360881506)*x[0]+(0.947721778185)*x[1]**o+(-0.234201025597)*x[1]+(-0.974251961452)*x[2]**o+(-0.300484605111)*x[2]
-        arg[1,1,0,0]=(0.719927358834)*x[0]**o+(-0.296944527139)*x[0]+(0.970290716632)*x[1]**o+(0.45656092862)*x[1]+(0.657023751979)*x[2]**o+(-0.703898365316)*x[2]
-        arg[1,1,0,1]=(-0.0600633107738)*x[0]**o+(0.525293730667)*x[0]+(0.17955637601)*x[1]**o+(-0.625782540859)*x[1]+(0.205255859488)*x[2]**o+(-0.963128832741)*x[2]
-        arg[1,1,1,0]=(0.119721921725)*x[0]**o+(0.957918016103)*x[0]+(-0.574883179285)*x[1]**o+(0.915580622743)*x[1]+(-0.432538225757)*x[2]**o+(-0.937539574986)*x[2]
-        arg[1,1,1,1]=(-0.295639299942)*x[0]**o+(-0.703954000058)*x[0]+(-0.185001166055)*x[1]**o+(-0.943933820897)*x[1]+(-0.12692007135)*x[2]**o+(0.476481616585)*x[2]
-        arg[1,1,2,0]=(0.247892010246)*x[0]**o+(0.901198196531)*x[0]+(-0.586162224974)*x[1]**o+(-0.934177552379)*x[1]+(0.704265144051)*x[2]**o+(-0.688632953989)*x[2]
-        arg[1,1,2,1]=(-0.116039842334)*x[0]**o+(-0.300373025101)*x[0]+(-0.286684372551)*x[1]**o+(-0.452337760059)*x[1]+(0.883210026596)*x[2]**o+(-0.319739612634)*x[2]
-        arg[1,2,0,0]=(-0.0326555626249)*x[0]**o+(-0.0933559852573)*x[0]+(0.807443822382)*x[1]**o+(-0.148842350195)*x[1]+(-0.118904471983)*x[2]**o+(-0.740440145747)*x[2]
-        arg[1,2,0,1]=(0.313623768488)*x[0]**o+(0.524958399998)*x[0]+(0.876747001712)*x[1]**o+(-0.468458894694)*x[1]+(0.52118935613)*x[2]**o+(-0.776405429712)*x[2]
-        arg[1,2,1,0]=(0.1328367779)*x[0]**o+(-0.959628068869)*x[0]+(0.746000325891)*x[1]**o+(-0.454705589649)*x[1]+(0.08534697763)*x[2]**o+(0.174892567303)*x[2]
-        arg[1,2,1,1]=(-0.482594997843)*x[0]**o+(0.765628170342)*x[0]+(0.103333249513)*x[1]**o+(0.840778499017)*x[1]+(0.136748193255)*x[2]**o+(0.771613240623)*x[2]
-        arg[1,2,2,0]=(-0.305745376076)*x[0]**o+(-0.0464234361529)*x[0]+(-0.163528204043)*x[1]**o+(0.80782719974)*x[1]+(0.131046315567)*x[2]**o+(0.0849217124905)*x[2]
-        arg[1,2,2,1]=(0.564915635291)*x[0]**o+(-0.162467524139)*x[0]+(-0.696721556806)*x[1]**o+(0.0172839552576)*x[1]+(-0.630040402586)*x[2]**o+(-0.181232689117)*x[2]
-        arg[1,3,0,0]=(-0.768631958549)*x[0]**o+(0.537076196504)*x[0]+(-0.403489871013)*x[1]**o+(0.831966318632)*x[1]+(0.602387061638)*x[2]**o+(0.330495470463)*x[2]
-        arg[1,3,0,1]=(0.770878177942)*x[0]**o+(-0.678609489017)*x[0]+(-0.895200519099)*x[1]**o+(0.935093561205)*x[1]+(0.0497551733469)*x[2]**o+(0.820432808383)*x[2]
-        arg[1,3,1,0]=(0.052867263447)*x[0]**o+(0.566167926663)*x[0]+(-0.00397870350455)*x[1]**o+(-0.780374460006)*x[1]+(-0.166645199933)*x[2]**o+(-0.867274057327)*x[2]
-        arg[1,3,1,1]=(0.0573446476183)*x[0]**o+(-0.699343104682)*x[0]+(0.428624411932)*x[1]**o+(-0.400834963806)*x[1]+(-0.722750021776)*x[2]**o+(0.386821944027)*x[2]
-        arg[1,3,2,0]=(0.390777333115)*x[0]**o+(0.191564882434)*x[0]+(-0.774547811812)*x[1]**o+(0.747678394063)*x[1]+(0.662273739757)*x[2]**o+(-0.295629568405)*x[2]
-        arg[1,3,2,1]=(-0.160077661734)*x[0]**o+(-0.512286879466)*x[0]+(0.616824388099)*x[1]**o+(0.0257995114324)*x[1]+(0.644270949659)*x[2]**o+(0.243520087896)*x[2]
-        arg[1,4,0,0]=(-0.980501571755)*x[0]**o+(0.844184850883)*x[0]+(-0.608509998911)*x[1]**o+(-0.347687895783)*x[1]+(-0.536534228926)*x[2]**o+(0.632821444072)*x[2]
-        arg[1,4,0,1]=(-0.881676821515)*x[0]**o+(-0.858728104026)*x[0]+(-0.576516592622)*x[1]**o+(0.695748958418)*x[1]+(0.856547670877)*x[2]**o+(-0.932960091743)*x[2]
-        arg[1,4,1,0]=(-0.451435812217)*x[0]**o+(0.963886330308)*x[0]+(0.888532771273)*x[1]**o+(0.807924978471)*x[1]+(0.789117121354)*x[2]**o+(0.577647188972)*x[2]
-        arg[1,4,1,1]=(-0.315320308371)*x[0]**o+(0.182798184972)*x[0]+(0.936963228212)*x[1]**o+(-0.634429372225)*x[1]+(0.634343556662)*x[2]**o+(0.975851394002)*x[2]
-        arg[1,4,2,0]=(0.858246326961)*x[0]**o+(0.0955812000864)*x[0]+(0.16143064785)*x[1]**o+(0.397013086552)*x[1]+(-0.507188929963)*x[2]**o+(0.49789827039)*x[2]
-        arg[1,4,2,1]=(-0.524634529078)*x[0]**o+(0.675491034226)*x[0]+(0.858857975014)*x[1]**o+(-0.57874207047)*x[1]+(0.476551353232)*x[2]**o+(-0.622601386038)*x[2]
-        arg[2,0,0,0]=(0.976563609)*x[0]**o+(0.127133211238)*x[0]+(-0.410155025204)*x[1]**o+(-0.909032700787)*x[1]+(-0.197014506331)*x[2]**o+(0.557171133933)*x[2]
-        arg[2,0,0,1]=(0.434874625301)*x[0]**o+(-0.576955025374)*x[0]+(-0.466686136319)*x[1]**o+(-0.359616702831)*x[1]+(-0.916050768111)*x[2]**o+(0.900510057507)*x[2]
-        arg[2,0,1,0]=(0.615259852986)*x[0]**o+(-0.685399646912)*x[0]+(-0.222742007887)*x[1]**o+(-0.487739486778)*x[1]+(-0.675225266903)*x[2]**o+(0.494623157154)*x[2]
-        arg[2,0,1,1]=(-0.89129010918)*x[0]**o+(0.0051571255592)*x[0]+(0.681003954208)*x[1]**o+(0.634041720719)*x[1]+(-0.308587458722)*x[2]**o+(-0.107801539193)*x[2]
-        arg[2,0,2,0]=(-0.660496698398)*x[0]**o+(-0.889315862375)*x[0]+(0.64248433679)*x[1]**o+(-0.941990511222)*x[1]+(-0.173668816201)*x[2]**o+(0.237812802184)*x[2]
-        arg[2,0,2,1]=(0.847365004226)*x[0]**o+(0.802449170085)*x[0]+(0.504737931993)*x[1]**o+(-0.695546680342)*x[1]+(0.0742668699455)*x[2]**o+(0.396565506083)*x[2]
-        arg[2,1,0,0]=(0.812115742561)*x[0]**o+(-0.528091349418)*x[0]+(-0.442834134691)*x[1]**o+(-0.574414379092)*x[1]+(-0.734077338221)*x[2]**o+(0.159306515061)*x[2]
-        arg[2,1,0,1]=(-0.259422255041)*x[0]**o+(-0.104016445541)*x[0]+(0.3560854635)*x[1]**o+(0.997015276785)*x[1]+(-0.707278312293)*x[2]**o+(-0.975235879836)*x[2]
-        arg[2,1,1,0]=(0.402099188227)*x[0]**o+(0.0320354114274)*x[0]+(0.203384927114)*x[1]**o+(-0.847804170327)*x[1]+(-0.898459903546)*x[2]**o+(0.639388498254)*x[2]
-        arg[2,1,1,1]=(-0.0477209380768)*x[0]**o+(0.531574667575)*x[0]+(0.280889682833)*x[1]**o+(-0.444963671116)*x[1]+(0.33935324652)*x[2]**o+(0.943089036339)*x[2]
-        arg[2,1,2,0]=(0.396038211375)*x[0]**o+(-0.54994373568)*x[0]+(0.851017234687)*x[1]**o+(-0.739787661885)*x[1]+(-0.368325897478)*x[2]**o+(-0.449096507837)*x[2]
-        arg[2,1,2,1]=(0.857714720302)*x[0]**o+(-0.750668366832)*x[0]+(-0.587901076381)*x[1]**o+(-0.24906126763)*x[1]+(0.131707530536)*x[2]**o+(0.900975507373)*x[2]
-        arg[2,2,0,0]=(0.783919932392)*x[0]**o+(-0.967669966647)*x[0]+(0.82052580972)*x[1]**o+(-0.711919131449)*x[1]+(-0.396059626351)*x[2]**o+(-0.265805391355)*x[2]
-        arg[2,2,0,1]=(-0.0398160197307)*x[0]**o+(-0.238193541)*x[0]+(0.282277679599)*x[1]**o+(-0.0526835304963)*x[1]+(0.590871489195)*x[2]**o+(-0.925835585742)*x[2]
-        arg[2,2,1,0]=(-0.825757767738)*x[0]**o+(0.238488063696)*x[0]+(0.109616380527)*x[1]**o+(-0.942941715764)*x[1]+(0.632013079754)*x[2]**o+(0.0517997920543)*x[2]
-        arg[2,2,1,1]=(-0.85343230326)*x[0]**o+(0.225247381624)*x[0]+(0.43171428489)*x[1]**o+(0.0937487532231)*x[1]+(0.894064129869)*x[2]**o+(-0.0876265498234)*x[2]
-        arg[2,2,2,0]=(0.349294373111)*x[0]**o+(-0.734159680014)*x[0]+(0.0489227393033)*x[1]**o+(-0.245284468757)*x[1]+(-0.346469825649)*x[2]**o+(0.547054093324)*x[2]
-        arg[2,2,2,1]=(-0.0478095998047)*x[0]**o+(0.440261344405)*x[0]+(-0.590330499679)*x[1]**o+(-0.961009986328)*x[1]+(0.546190002905)*x[2]**o+(-0.027965996519)*x[2]
-        arg[2,3,0,0]=(0.148563550644)*x[0]**o+(0.576704219545)*x[0]+(-0.782168581109)*x[1]**o+(-0.8301245678)*x[1]+(0.937936245682)*x[2]**o+(0.846740948371)*x[2]
-        arg[2,3,0,1]=(-0.447832058524)*x[0]**o+(0.385431388609)*x[0]+(0.193985676964)*x[1]**o+(-0.91717180275)*x[1]+(-0.408732230908)*x[2]**o+(0.548173152118)*x[2]
-        arg[2,3,1,0]=(0.197592567864)*x[0]**o+(-0.77657127384)*x[0]+(0.266355135001)*x[1]**o+(0.604009981584)*x[1]+(-0.379930450459)*x[2]**o+(0.46952844479)*x[2]
-        arg[2,3,1,1]=(0.996803794962)*x[0]**o+(0.319115676981)*x[0]+(0.255552997875)*x[1]**o+(0.21834578367)*x[1]+(0.389966036243)*x[2]**o+(-0.115308080726)*x[2]
-        arg[2,3,2,0]=(-0.0244303880675)*x[0]**o+(-0.128929049017)*x[0]+(-0.350933414406)*x[1]**o+(-0.341716440852)*x[1]+(-0.724579076377)*x[2]**o+(0.21963465519)*x[2]
-        arg[2,3,2,1]=(-0.92899971478)*x[0]**o+(-0.304496074717)*x[0]+(0.568151427024)*x[1]**o+(0.504629517922)*x[1]+(0.846158711477)*x[2]**o+(0.35936792568)*x[2]
-        arg[2,4,0,0]=(-0.350964834352)*x[0]**o+(0.387667833884)*x[0]+(0.547101274223)*x[1]**o+(0.257218757373)*x[1]+(-0.00316748527841)*x[2]**o+(0.314561238615)*x[2]
-        arg[2,4,0,1]=(0.408941739151)*x[0]**o+(0.819113792537)*x[0]+(0.532891848781)*x[1]**o+(-0.30688659725)*x[1]+(-0.736611937618)*x[2]**o+(-0.875783706051)*x[2]
-        arg[2,4,1,0]=(-0.730885165985)*x[0]**o+(0.453908506302)*x[0]+(-0.617385752505)*x[1]**o+(0.357459789592)*x[1]+(0.286323175805)*x[2]**o+(-0.448879127031)*x[2]
-        arg[2,4,1,1]=(-0.295377341281)*x[0]**o+(0.423424371051)*x[0]+(0.524695076927)*x[1]**o+(-0.698499625038)*x[1]+(0.617308008395)*x[2]**o+(-0.423469866581)*x[2]
-        arg[2,4,2,0]=(0.104251379635)*x[0]**o+(0.989709098795)*x[0]+(-0.422075396624)*x[1]**o+(-0.254328561231)*x[1]+(-0.502052795074)*x[2]**o+(-0.0851411652168)*x[2]
-        arg[2,4,2,1]=(0.379332842082)*x[0]**o+(-0.707504861783)*x[0]+(0.00855075647146)*x[1]**o+(0.792851159033)*x[1]+(-0.692042160791)*x[2]**o+(-0.18327165243)*x[2]
-        arg[3,0,0,0]=(0.310700158718)*x[0]**o+(0.285647240187)*x[0]+(0.817947571838)*x[1]**o+(0.808698040916)*x[1]+(0.844184006443)*x[2]**o+(-0.310383215636)*x[2]
-        arg[3,0,0,1]=(-0.0173109952616)*x[0]**o+(0.672034452037)*x[0]+(-0.464572256298)*x[1]**o+(0.205799523299)*x[1]+(-0.971979841338)*x[2]**o+(0.261515966001)*x[2]
-        arg[3,0,1,0]=(0.0329384377028)*x[0]**o+(0.571501185072)*x[0]+(-0.902222556642)*x[1]**o+(-0.528317784373)*x[1]+(0.331989640881)*x[2]**o+(0.0427505624318)*x[2]
-        arg[3,0,1,1]=(0.964350410761)*x[0]**o+(-0.327198989999)*x[0]+(-0.195271523191)*x[1]**o+(0.534663014601)*x[1]+(-0.0208261208706)*x[2]**o+(-0.158019249052)*x[2]
-        arg[3,0,2,0]=(-0.622082726008)*x[0]**o+(0.559463883442)*x[0]+(0.841439693313)*x[1]**o+(-0.196363987516)*x[1]+(-0.0143926547396)*x[2]**o+(0.144732603689)*x[2]
-        arg[3,0,2,1]=(-0.149531653278)*x[0]**o+(0.354229138322)*x[0]+(-0.507916088829)*x[1]**o+(0.221251580047)*x[1]+(0.197213706274)*x[2]**o+(-0.555645149276)*x[2]
-        arg[3,1,0,0]=(0.331020785374)*x[0]**o+(-0.377647773513)*x[0]+(0.563355928949)*x[1]**o+(0.789309216711)*x[1]+(0.203663383875)*x[2]**o+(-0.0333894540645)*x[2]
-        arg[3,1,0,1]=(-0.0965613913882)*x[0]**o+(0.18656484323)*x[0]+(-0.138245941339)*x[1]**o+(-0.34549538745)*x[1]+(0.827173403167)*x[2]**o+(-0.873380503939)*x[2]
-        arg[3,1,1,0]=(0.932940890033)*x[0]**o+(-0.564883830288)*x[0]+(-0.505052725295)*x[1]**o+(-0.669420210206)*x[1]+(-0.799638096039)*x[2]**o+(0.469400233749)*x[2]
-        arg[3,1,1,1]=(-0.9741761069)*x[0]**o+(-0.748125328781)*x[0]+(0.664448241931)*x[1]**o+(0.0957643296979)*x[1]+(0.112211322019)*x[2]**o+(-0.131870290434)*x[2]
-        arg[3,1,2,0]=(-0.438609127704)*x[0]**o+(-0.36618286515)*x[0]+(-0.376420011115)*x[1]**o+(-0.67084624599)*x[1]+(0.821679796644)*x[2]**o+(0.80111319897)*x[2]
-        arg[3,1,2,1]=(-0.409859432085)*x[0]**o+(0.848767816929)*x[0]+(0.382358459835)*x[1]**o+(-0.750139843631)*x[1]+(0.587152586559)*x[2]**o+(-0.26162952001)*x[2]
-        arg[3,2,0,0]=(-0.506329785074)*x[0]**o+(-0.0967745752004)*x[0]+(-0.163316795268)*x[1]**o+(0.0628481921732)*x[1]+(0.395355494367)*x[2]**o+(0.0978901916332)*x[2]
-        arg[3,2,0,1]=(0.803590309587)*x[0]**o+(0.470388053389)*x[0]+(0.674942922168)*x[1]**o+(0.223472834762)*x[1]+(0.552332209028)*x[2]**o+(-0.396443498843)*x[2]
-        arg[3,2,1,0]=(-0.312384723839)*x[0]**o+(0.392213828608)*x[0]+(0.449465316671)*x[1]**o+(-0.249103089401)*x[1]+(0.601412913458)*x[2]**o+(0.209899368039)*x[2]
-        arg[3,2,1,1]=(-0.583776179557)*x[0]**o+(0.485007047754)*x[0]+(-0.0354153633589)*x[1]**o+(-0.898630969916)*x[1]+(-0.266581492795)*x[2]**o+(0.822086680281)*x[2]
-        arg[3,2,2,0]=(0.944617094397)*x[0]**o+(-0.173057994833)*x[0]+(0.927832160048)*x[1]**o+(-0.218599594252)*x[1]+(0.349957755011)*x[2]**o+(0.392602744545)*x[2]
-        arg[3,2,2,1]=(0.461648084674)*x[0]**o+(0.826213376949)*x[0]+(0.143429054731)*x[1]**o+(-0.214265128007)*x[1]+(0.0317208127607)*x[2]**o+(-0.858361078381)*x[2]
-        arg[3,3,0,0]=(0.306607920368)*x[0]**o+(0.147692891688)*x[0]+(-0.562661766456)*x[1]**o+(0.448595564727)*x[1]+(-0.707178218373)*x[2]**o+(0.0655554587866)*x[2]
-        arg[3,3,0,1]=(0.135475820362)*x[0]**o+(0.51420718793)*x[0]+(0.343291220736)*x[1]**o+(-0.797532312602)*x[1]+(-0.273431011273)*x[2]**o+(0.135307779253)*x[2]
-        arg[3,3,1,0]=(0.488028231073)*x[0]**o+(0.542021806829)*x[0]+(0.91916268609)*x[1]**o+(0.317368273365)*x[1]+(0.314807039395)*x[2]**o+(-0.841583308025)*x[2]
-        arg[3,3,1,1]=(-0.182783814917)*x[0]**o+(0.250863481201)*x[0]+(0.755551457003)*x[1]**o+(0.946171548529)*x[1]+(0.0350225436682)*x[2]**o+(0.776059830052)*x[2]
-        arg[3,3,2,0]=(-0.116707124994)*x[0]**o+(-0.727010280588)*x[0]+(0.172065389268)*x[1]**o+(0.754164564639)*x[1]+(0.803777635621)*x[2]**o+(0.293490264417)*x[2]
-        arg[3,3,2,1]=(0.154235982797)*x[0]**o+(-0.124286021486)*x[0]+(-0.737324748116)*x[1]**o+(-0.136803541581)*x[1]+(-0.608370191604)*x[2]**o+(-0.933599034128)*x[2]
-        arg[3,4,0,0]=(0.818061677328)*x[0]**o+(-0.771719613166)*x[0]+(0.742772795251)*x[1]**o+(0.0359285091312)*x[1]+(-0.985656851837)*x[2]**o+(-0.884598206512)*x[2]
-        arg[3,4,0,1]=(0.198371732741)*x[0]**o+(0.646496618681)*x[0]+(0.232912446494)*x[1]**o+(0.945619492023)*x[1]+(-0.344370341731)*x[2]**o+(0.31156840357)*x[2]
-        arg[3,4,1,0]=(-0.609298834606)*x[0]**o+(0.784697392412)*x[0]+(0.996065619079)*x[1]**o+(-0.284498300043)*x[1]+(-0.652795706803)*x[2]**o+(-0.254746840396)*x[2]
-        arg[3,4,1,1]=(-0.0083632822507)*x[0]**o+(0.200923618933)*x[0]+(0.353883930064)*x[1]**o+(0.153257380179)*x[1]+(0.843965464205)*x[2]**o+(0.0418501400703)*x[2]
-        arg[3,4,2,0]=(-0.226055622191)*x[0]**o+(-0.701789166696)*x[0]+(0.274080957143)*x[1]**o+(0.0596744660556)*x[1]+(-0.342083152987)*x[2]**o+(0.593518464697)*x[2]
-        arg[3,4,2,1]=(-0.288168945023)*x[0]**o+(-0.742841678774)*x[0]+(0.972629532424)*x[1]**o+(0.892100560733)*x[1]+(0.803880474721)*x[2]**o+(-0.0638336211224)*x[2]
-        ref[0,0,0,0]=(0.244520699379)*x_ref[0]**o+(-0.125771252842)*x_ref[0]+(0.654557798928)*x_ref[1]**o+(0.438110948503)*x_ref[1]+(0.399996169353)*x_ref[2]**o+(0.37037141324)*x_ref[2]
-        ref[0,0,0,1]=(0.019693348021)*x_ref[0]**o+(-0.509938412509)*x_ref[0]+(-0.425852907243)*x_ref[1]**o+(0.351462945072)*x_ref[1]+(0.628410872426)*x_ref[2]**o+(0.4769252017)*x_ref[2]
-        ref[0,0,1,0]=(0.623813767602)*x_ref[0]**o+(-0.940818977456)*x_ref[0]+(-0.00111063869285)*x_ref[1]**o+(-0.577558081394)*x_ref[1]+(-0.30810971068)*x_ref[2]**o+(-0.660149007373)*x_ref[2]
-        ref[0,0,1,1]=(0.994105796371)*x_ref[0]**o+(0.199970906966)*x_ref[0]+(0.961509001434)*x_ref[1]**o+(-0.783069602127)*x_ref[1]+(-0.179922863021)*x_ref[2]**o+(-0.386974503089)*x_ref[2]
-        ref[0,0,2,0]=(0.932745137122)*x_ref[0]**o+(0.627995830114)*x_ref[0]+(-0.334344490736)*x_ref[1]**o+(0.733210590815)*x_ref[1]+(-0.23424959051)*x_ref[2]**o+(0.140644214958)*x_ref[2]
-        ref[0,0,2,1]=(-0.282836519247)*x_ref[0]**o+(-0.744077669768)*x_ref[0]+(0.123898574243)*x_ref[1]**o+(0.562384289004)*x_ref[1]+(0.0757927394637)*x_ref[2]**o+(0.767684067921)*x_ref[2]
-        ref[0,1,0,0]=(0.212366202901)*x_ref[0]**o+(-0.679228304269)*x_ref[0]+(0.829706652419)*x_ref[1]**o+(0.24389996073)*x_ref[1]+(0.909367025978)*x_ref[2]**o+(0.280617790407)*x_ref[2]
-        ref[0,1,0,1]=(0.760070952632)*x_ref[0]**o+(-0.678309252372)*x_ref[0]+(0.0372281910363)*x_ref[1]**o+(0.0284582814297)*x_ref[1]+(-0.092349250941)*x_ref[2]**o+(0.347713645921)*x_ref[2]
-        ref[0,1,1,0]=(0.248410230191)*x_ref[0]**o+(-0.833983202295)*x_ref[0]+(-0.759357278899)*x_ref[1]**o+(0.880038285893)*x_ref[1]+(-0.734799540652)*x_ref[2]**o+(0.493330231104)*x_ref[2]
-        ref[0,1,1,1]=(0.0359919724228)*x_ref[0]**o+(-0.0393899014057)*x_ref[0]+(0.185155782488)*x_ref[1]**o+(-0.92692925719)*x_ref[1]+(0.74718037404)*x_ref[2]**o+(-0.283900681763)*x_ref[2]
-        ref[0,1,2,0]=(-0.208643544667)*x_ref[0]**o+(0.368200149096)*x_ref[0]+(-0.327032725172)*x_ref[1]**o+(-0.245547905792)*x_ref[1]+(0.0886488214242)*x_ref[2]**o+(0.179139897691)*x_ref[2]
-        ref[0,1,2,1]=(-0.0618762861459)*x_ref[0]**o+(0.253419217897)*x_ref[0]+(0.840270125508)*x_ref[1]**o+(0.0223556878387)*x_ref[1]+(0.0560904700176)*x_ref[2]**o+(-0.646231049424)*x_ref[2]
-        ref[0,2,0,0]=(0.568966969865)*x_ref[0]**o+(0.786776511348)*x_ref[0]+(0.150595926116)*x_ref[1]**o+(-0.780164417762)*x_ref[1]+(0.510149831242)*x_ref[2]**o+(-0.902871929903)*x_ref[2]
-        ref[0,2,0,1]=(-0.817062669957)*x_ref[0]**o+(0.626805486868)*x_ref[0]+(-0.566129786829)*x_ref[1]**o+(0.248418548905)*x_ref[1]+(-0.273995326019)*x_ref[2]**o+(0.402023521018)*x_ref[2]
-        ref[0,2,1,0]=(-0.160276235113)*x_ref[0]**o+(-0.0732543937053)*x_ref[0]+(-0.0651595982698)*x_ref[1]**o+(-0.529463476237)*x_ref[1]+(0.346098812945)*x_ref[2]**o+(0.418367016439)*x_ref[2]
-        ref[0,2,1,1]=(0.736907408498)*x_ref[0]**o+(-0.123612748157)*x_ref[0]+(0.000834659108651)*x_ref[1]**o+(0.568833761363)*x_ref[1]+(-0.542676953582)*x_ref[2]**o+(0.026182553484)*x_ref[2]
-        ref[0,2,2,0]=(0.320985918151)*x_ref[0]**o+(0.0512654311644)*x_ref[0]+(-0.0313412913713)*x_ref[1]**o+(0.295659930913)*x_ref[1]+(-0.989560405329)*x_ref[2]**o+(-0.107344246298)*x_ref[2]
-        ref[0,2,2,1]=(-0.957793939949)*x_ref[0]**o+(-0.177591880789)*x_ref[0]+(0.0785829772689)*x_ref[1]**o+(0.121445956612)*x_ref[1]+(-0.384134176508)*x_ref[2]**o+(-0.775433914622)*x_ref[2]
-        ref[0,3,0,0]=(-0.130620609021)*x_ref[0]**o+(0.268283814564)*x_ref[0]+(-0.192835222037)*x_ref[1]**o+(0.235341688541)*x_ref[1]+(0.957069315916)*x_ref[2]**o+(-0.708853567529)*x_ref[2]
-        ref[0,3,0,1]=(-0.377028600614)*x_ref[0]**o+(-0.858446162753)*x_ref[0]+(-0.850630580491)*x_ref[1]**o+(-0.810676898206)*x_ref[1]+(-0.613330062817)*x_ref[2]**o+(0.714335738947)*x_ref[2]
-        ref[0,3,1,0]=(-0.602336649415)*x_ref[0]**o+(-0.166667559558)*x_ref[0]+(0.962948866081)*x_ref[1]**o+(0.939531483467)*x_ref[1]+(0.267767294244)*x_ref[2]**o+(0.247155872428)*x_ref[2]
-        ref[0,3,1,1]=(0.838505391049)*x_ref[0]**o+(0.115204438919)*x_ref[0]+(0.989010581013)*x_ref[1]**o+(-0.649789818418)*x_ref[1]+(0.757328444925)*x_ref[2]**o+(0.825158129449)*x_ref[2]
-        ref[0,3,2,0]=(0.724488034506)*x_ref[0]**o+(0.0333093325925)*x_ref[0]+(0.864643652652)*x_ref[1]**o+(-0.557517585925)*x_ref[1]+(-0.340534672063)*x_ref[2]**o+(-0.00425705176271)*x_ref[2]
-        ref[0,3,2,1]=(-0.366459483792)*x_ref[0]**o+(0.257706980646)*x_ref[0]+(0.821731531023)*x_ref[1]**o+(-0.212501303617)*x_ref[1]+(-0.128977067795)*x_ref[2]**o+(-0.931439847041)*x_ref[2]
-        ref[0,4,0,0]=(0.398430239547)*x_ref[0]**o+(-0.00991917699933)*x_ref[0]+(-0.182471763172)*x_ref[1]**o+(0.218327764946)*x_ref[1]+(-0.484510127696)*x_ref[2]**o+(-0.360678193996)*x_ref[2]
-        ref[0,4,0,1]=(0.0640680415135)*x_ref[0]**o+(0.671150063087)*x_ref[0]+(0.208610130381)*x_ref[1]**o+(-0.441252393083)*x_ref[1]+(0.365150146582)*x_ref[2]**o+(-0.228346558142)*x_ref[2]
-        ref[0,4,1,0]=(-0.852694824303)*x_ref[0]**o+(0.181041494463)*x_ref[0]+(0.898413617086)*x_ref[1]**o+(-0.918988862595)*x_ref[1]+(0.169010143324)*x_ref[2]**o+(0.540458809834)*x_ref[2]
-        ref[0,4,1,1]=(-0.213782550366)*x_ref[0]**o+(-0.180557891041)*x_ref[0]+(0.23144059382)*x_ref[1]**o+(0.0609482143429)*x_ref[1]+(0.89256221946)*x_ref[2]**o+(0.977857158982)*x_ref[2]
-        ref[0,4,2,0]=(0.320772898841)*x_ref[0]**o+(0.371610189518)*x_ref[0]+(0.692264150983)*x_ref[1]**o+(-0.751154935415)*x_ref[1]+(-0.163272902772)*x_ref[2]**o+(0.0635386628764)*x_ref[2]
-        ref[0,4,2,1]=(-0.316885908577)*x_ref[0]**o+(0.476104431241)*x_ref[0]+(-0.647713072489)*x_ref[1]**o+(0.683813449908)*x_ref[1]+(0.699293342945)*x_ref[2]**o+(-0.0373906770097)*x_ref[2]
-        ref[1,0,0,0]=(-0.030329265733)*x_ref[0]**o+(-0.0115761157375)*x_ref[0]+(-0.30993823088)*x_ref[1]**o+(0.628877975389)*x_ref[1]+(-0.582940961417)*x_ref[2]**o+(0.154786570457)*x_ref[2]
-        ref[1,0,0,1]=(-0.593610753495)*x_ref[0]**o+(-0.822232097764)*x_ref[0]+(-0.465144000698)*x_ref[1]**o+(-0.62576868204)*x_ref[1]+(-0.53588531407)*x_ref[2]**o+(0.119119578421)*x_ref[2]
-        ref[1,0,1,0]=(-0.15668734059)*x_ref[0]**o+(-0.950658811047)*x_ref[0]+(-0.267969935748)*x_ref[1]**o+(0.0919415340304)*x_ref[1]+(-0.0445382452662)*x_ref[2]**o+(0.949984936459)*x_ref[2]
-        ref[1,0,1,1]=(-0.762474809436)*x_ref[0]**o+(0.794314442281)*x_ref[0]+(0.617742930372)*x_ref[1]**o+(-0.502057530669)*x_ref[1]+(0.42532154189)*x_ref[2]**o+(0.343417687179)*x_ref[2]
-        ref[1,0,2,0]=(0.259583418084)*x_ref[0]**o+(0.460122326434)*x_ref[0]+(0.875185242587)*x_ref[1]**o+(-0.621232091699)*x_ref[1]+(0.922536397008)*x_ref[2]**o+(-0.494729334323)*x_ref[2]
-        ref[1,0,2,1]=(0.79625863156)*x_ref[0]**o+(-0.980360881506)*x_ref[0]+(0.947721778185)*x_ref[1]**o+(-0.234201025597)*x_ref[1]+(-0.974251961452)*x_ref[2]**o+(-0.300484605111)*x_ref[2]
-        ref[1,1,0,0]=(0.719927358834)*x_ref[0]**o+(-0.296944527139)*x_ref[0]+(0.970290716632)*x_ref[1]**o+(0.45656092862)*x_ref[1]+(0.657023751979)*x_ref[2]**o+(-0.703898365316)*x_ref[2]
-        ref[1,1,0,1]=(-0.0600633107738)*x_ref[0]**o+(0.525293730667)*x_ref[0]+(0.17955637601)*x_ref[1]**o+(-0.625782540859)*x_ref[1]+(0.205255859488)*x_ref[2]**o+(-0.963128832741)*x_ref[2]
-        ref[1,1,1,0]=(0.119721921725)*x_ref[0]**o+(0.957918016103)*x_ref[0]+(-0.574883179285)*x_ref[1]**o+(0.915580622743)*x_ref[1]+(-0.432538225757)*x_ref[2]**o+(-0.937539574986)*x_ref[2]
-        ref[1,1,1,1]=(-0.295639299942)*x_ref[0]**o+(-0.703954000058)*x_ref[0]+(-0.185001166055)*x_ref[1]**o+(-0.943933820897)*x_ref[1]+(-0.12692007135)*x_ref[2]**o+(0.476481616585)*x_ref[2]
-        ref[1,1,2,0]=(0.247892010246)*x_ref[0]**o+(0.901198196531)*x_ref[0]+(-0.586162224974)*x_ref[1]**o+(-0.934177552379)*x_ref[1]+(0.704265144051)*x_ref[2]**o+(-0.688632953989)*x_ref[2]
-        ref[1,1,2,1]=(-0.116039842334)*x_ref[0]**o+(-0.300373025101)*x_ref[0]+(-0.286684372551)*x_ref[1]**o+(-0.452337760059)*x_ref[1]+(0.883210026596)*x_ref[2]**o+(-0.319739612634)*x_ref[2]
-        ref[1,2,0,0]=(-0.0326555626249)*x_ref[0]**o+(-0.0933559852573)*x_ref[0]+(0.807443822382)*x_ref[1]**o+(-0.148842350195)*x_ref[1]+(-0.118904471983)*x_ref[2]**o+(-0.740440145747)*x_ref[2]
-        ref[1,2,0,1]=(0.313623768488)*x_ref[0]**o+(0.524958399998)*x_ref[0]+(0.876747001712)*x_ref[1]**o+(-0.468458894694)*x_ref[1]+(0.52118935613)*x_ref[2]**o+(-0.776405429712)*x_ref[2]
-        ref[1,2,1,0]=(0.1328367779)*x_ref[0]**o+(-0.959628068869)*x_ref[0]+(0.746000325891)*x_ref[1]**o+(-0.454705589649)*x_ref[1]+(0.08534697763)*x_ref[2]**o+(0.174892567303)*x_ref[2]
-        ref[1,2,1,1]=(-0.482594997843)*x_ref[0]**o+(0.765628170342)*x_ref[0]+(0.103333249513)*x_ref[1]**o+(0.840778499017)*x_ref[1]+(0.136748193255)*x_ref[2]**o+(0.771613240623)*x_ref[2]
-        ref[1,2,2,0]=(-0.305745376076)*x_ref[0]**o+(-0.0464234361529)*x_ref[0]+(-0.163528204043)*x_ref[1]**o+(0.80782719974)*x_ref[1]+(0.131046315567)*x_ref[2]**o+(0.0849217124905)*x_ref[2]
-        ref[1,2,2,1]=(0.564915635291)*x_ref[0]**o+(-0.162467524139)*x_ref[0]+(-0.696721556806)*x_ref[1]**o+(0.0172839552576)*x_ref[1]+(-0.630040402586)*x_ref[2]**o+(-0.181232689117)*x_ref[2]
-        ref[1,3,0,0]=(-0.768631958549)*x_ref[0]**o+(0.537076196504)*x_ref[0]+(-0.403489871013)*x_ref[1]**o+(0.831966318632)*x_ref[1]+(0.602387061638)*x_ref[2]**o+(0.330495470463)*x_ref[2]
-        ref[1,3,0,1]=(0.770878177942)*x_ref[0]**o+(-0.678609489017)*x_ref[0]+(-0.895200519099)*x_ref[1]**o+(0.935093561205)*x_ref[1]+(0.0497551733469)*x_ref[2]**o+(0.820432808383)*x_ref[2]
-        ref[1,3,1,0]=(0.052867263447)*x_ref[0]**o+(0.566167926663)*x_ref[0]+(-0.00397870350455)*x_ref[1]**o+(-0.780374460006)*x_ref[1]+(-0.166645199933)*x_ref[2]**o+(-0.867274057327)*x_ref[2]
-        ref[1,3,1,1]=(0.0573446476183)*x_ref[0]**o+(-0.699343104682)*x_ref[0]+(0.428624411932)*x_ref[1]**o+(-0.400834963806)*x_ref[1]+(-0.722750021776)*x_ref[2]**o+(0.386821944027)*x_ref[2]
-        ref[1,3,2,0]=(0.390777333115)*x_ref[0]**o+(0.191564882434)*x_ref[0]+(-0.774547811812)*x_ref[1]**o+(0.747678394063)*x_ref[1]+(0.662273739757)*x_ref[2]**o+(-0.295629568405)*x_ref[2]
-        ref[1,3,2,1]=(-0.160077661734)*x_ref[0]**o+(-0.512286879466)*x_ref[0]+(0.616824388099)*x_ref[1]**o+(0.0257995114324)*x_ref[1]+(0.644270949659)*x_ref[2]**o+(0.243520087896)*x_ref[2]
-        ref[1,4,0,0]=(-0.980501571755)*x_ref[0]**o+(0.844184850883)*x_ref[0]+(-0.608509998911)*x_ref[1]**o+(-0.347687895783)*x_ref[1]+(-0.536534228926)*x_ref[2]**o+(0.632821444072)*x_ref[2]
-        ref[1,4,0,1]=(-0.881676821515)*x_ref[0]**o+(-0.858728104026)*x_ref[0]+(-0.576516592622)*x_ref[1]**o+(0.695748958418)*x_ref[1]+(0.856547670877)*x_ref[2]**o+(-0.932960091743)*x_ref[2]
-        ref[1,4,1,0]=(-0.451435812217)*x_ref[0]**o+(0.963886330308)*x_ref[0]+(0.888532771273)*x_ref[1]**o+(0.807924978471)*x_ref[1]+(0.789117121354)*x_ref[2]**o+(0.577647188972)*x_ref[2]
-        ref[1,4,1,1]=(-0.315320308371)*x_ref[0]**o+(0.182798184972)*x_ref[0]+(0.936963228212)*x_ref[1]**o+(-0.634429372225)*x_ref[1]+(0.634343556662)*x_ref[2]**o+(0.975851394002)*x_ref[2]
-        ref[1,4,2,0]=(0.858246326961)*x_ref[0]**o+(0.0955812000864)*x_ref[0]+(0.16143064785)*x_ref[1]**o+(0.397013086552)*x_ref[1]+(-0.507188929963)*x_ref[2]**o+(0.49789827039)*x_ref[2]
-        ref[1,4,2,1]=(-0.524634529078)*x_ref[0]**o+(0.675491034226)*x_ref[0]+(0.858857975014)*x_ref[1]**o+(-0.57874207047)*x_ref[1]+(0.476551353232)*x_ref[2]**o+(-0.622601386038)*x_ref[2]
-        ref[2,0,0,0]=(0.976563609)*x_ref[0]**o+(0.127133211238)*x_ref[0]+(-0.410155025204)*x_ref[1]**o+(-0.909032700787)*x_ref[1]+(-0.197014506331)*x_ref[2]**o+(0.557171133933)*x_ref[2]
-        ref[2,0,0,1]=(0.434874625301)*x_ref[0]**o+(-0.576955025374)*x_ref[0]+(-0.466686136319)*x_ref[1]**o+(-0.359616702831)*x_ref[1]+(-0.916050768111)*x_ref[2]**o+(0.900510057507)*x_ref[2]
-        ref[2,0,1,0]=(0.615259852986)*x_ref[0]**o+(-0.685399646912)*x_ref[0]+(-0.222742007887)*x_ref[1]**o+(-0.487739486778)*x_ref[1]+(-0.675225266903)*x_ref[2]**o+(0.494623157154)*x_ref[2]
-        ref[2,0,1,1]=(-0.89129010918)*x_ref[0]**o+(0.0051571255592)*x_ref[0]+(0.681003954208)*x_ref[1]**o+(0.634041720719)*x_ref[1]+(-0.308587458722)*x_ref[2]**o+(-0.107801539193)*x_ref[2]
-        ref[2,0,2,0]=(-0.660496698398)*x_ref[0]**o+(-0.889315862375)*x_ref[0]+(0.64248433679)*x_ref[1]**o+(-0.941990511222)*x_ref[1]+(-0.173668816201)*x_ref[2]**o+(0.237812802184)*x_ref[2]
-        ref[2,0,2,1]=(0.847365004226)*x_ref[0]**o+(0.802449170085)*x_ref[0]+(0.504737931993)*x_ref[1]**o+(-0.695546680342)*x_ref[1]+(0.0742668699455)*x_ref[2]**o+(0.396565506083)*x_ref[2]
-        ref[2,1,0,0]=(0.812115742561)*x_ref[0]**o+(-0.528091349418)*x_ref[0]+(-0.442834134691)*x_ref[1]**o+(-0.574414379092)*x_ref[1]+(-0.734077338221)*x_ref[2]**o+(0.159306515061)*x_ref[2]
-        ref[2,1,0,1]=(-0.259422255041)*x_ref[0]**o+(-0.104016445541)*x_ref[0]+(0.3560854635)*x_ref[1]**o+(0.997015276785)*x_ref[1]+(-0.707278312293)*x_ref[2]**o+(-0.975235879836)*x_ref[2]
-        ref[2,1,1,0]=(0.402099188227)*x_ref[0]**o+(0.0320354114274)*x_ref[0]+(0.203384927114)*x_ref[1]**o+(-0.847804170327)*x_ref[1]+(-0.898459903546)*x_ref[2]**o+(0.639388498254)*x_ref[2]
-        ref[2,1,1,1]=(-0.0477209380768)*x_ref[0]**o+(0.531574667575)*x_ref[0]+(0.280889682833)*x_ref[1]**o+(-0.444963671116)*x_ref[1]+(0.33935324652)*x_ref[2]**o+(0.943089036339)*x_ref[2]
-        ref[2,1,2,0]=(0.396038211375)*x_ref[0]**o+(-0.54994373568)*x_ref[0]+(0.851017234687)*x_ref[1]**o+(-0.739787661885)*x_ref[1]+(-0.368325897478)*x_ref[2]**o+(-0.449096507837)*x_ref[2]
-        ref[2,1,2,1]=(0.857714720302)*x_ref[0]**o+(-0.750668366832)*x_ref[0]+(-0.587901076381)*x_ref[1]**o+(-0.24906126763)*x_ref[1]+(0.131707530536)*x_ref[2]**o+(0.900975507373)*x_ref[2]
-        ref[2,2,0,0]=(0.783919932392)*x_ref[0]**o+(-0.967669966647)*x_ref[0]+(0.82052580972)*x_ref[1]**o+(-0.711919131449)*x_ref[1]+(-0.396059626351)*x_ref[2]**o+(-0.265805391355)*x_ref[2]
-        ref[2,2,0,1]=(-0.0398160197307)*x_ref[0]**o+(-0.238193541)*x_ref[0]+(0.282277679599)*x_ref[1]**o+(-0.0526835304963)*x_ref[1]+(0.590871489195)*x_ref[2]**o+(-0.925835585742)*x_ref[2]
-        ref[2,2,1,0]=(-0.825757767738)*x_ref[0]**o+(0.238488063696)*x_ref[0]+(0.109616380527)*x_ref[1]**o+(-0.942941715764)*x_ref[1]+(0.632013079754)*x_ref[2]**o+(0.0517997920543)*x_ref[2]
-        ref[2,2,1,1]=(-0.85343230326)*x_ref[0]**o+(0.225247381624)*x_ref[0]+(0.43171428489)*x_ref[1]**o+(0.0937487532231)*x_ref[1]+(0.894064129869)*x_ref[2]**o+(-0.0876265498234)*x_ref[2]
-        ref[2,2,2,0]=(0.349294373111)*x_ref[0]**o+(-0.734159680014)*x_ref[0]+(0.0489227393033)*x_ref[1]**o+(-0.245284468757)*x_ref[1]+(-0.346469825649)*x_ref[2]**o+(0.547054093324)*x_ref[2]
-        ref[2,2,2,1]=(-0.0478095998047)*x_ref[0]**o+(0.440261344405)*x_ref[0]+(-0.590330499679)*x_ref[1]**o+(-0.961009986328)*x_ref[1]+(0.546190002905)*x_ref[2]**o+(-0.027965996519)*x_ref[2]
-        ref[2,3,0,0]=(0.148563550644)*x_ref[0]**o+(0.576704219545)*x_ref[0]+(-0.782168581109)*x_ref[1]**o+(-0.8301245678)*x_ref[1]+(0.937936245682)*x_ref[2]**o+(0.846740948371)*x_ref[2]
-        ref[2,3,0,1]=(-0.447832058524)*x_ref[0]**o+(0.385431388609)*x_ref[0]+(0.193985676964)*x_ref[1]**o+(-0.91717180275)*x_ref[1]+(-0.408732230908)*x_ref[2]**o+(0.548173152118)*x_ref[2]
-        ref[2,3,1,0]=(0.197592567864)*x_ref[0]**o+(-0.77657127384)*x_ref[0]+(0.266355135001)*x_ref[1]**o+(0.604009981584)*x_ref[1]+(-0.379930450459)*x_ref[2]**o+(0.46952844479)*x_ref[2]
-        ref[2,3,1,1]=(0.996803794962)*x_ref[0]**o+(0.319115676981)*x_ref[0]+(0.255552997875)*x_ref[1]**o+(0.21834578367)*x_ref[1]+(0.389966036243)*x_ref[2]**o+(-0.115308080726)*x_ref[2]
-        ref[2,3,2,0]=(-0.0244303880675)*x_ref[0]**o+(-0.128929049017)*x_ref[0]+(-0.350933414406)*x_ref[1]**o+(-0.341716440852)*x_ref[1]+(-0.724579076377)*x_ref[2]**o+(0.21963465519)*x_ref[2]
-        ref[2,3,2,1]=(-0.92899971478)*x_ref[0]**o+(-0.304496074717)*x_ref[0]+(0.568151427024)*x_ref[1]**o+(0.504629517922)*x_ref[1]+(0.846158711477)*x_ref[2]**o+(0.35936792568)*x_ref[2]
-        ref[2,4,0,0]=(-0.350964834352)*x_ref[0]**o+(0.387667833884)*x_ref[0]+(0.547101274223)*x_ref[1]**o+(0.257218757373)*x_ref[1]+(-0.00316748527841)*x_ref[2]**o+(0.314561238615)*x_ref[2]
-        ref[2,4,0,1]=(0.408941739151)*x_ref[0]**o+(0.819113792537)*x_ref[0]+(0.532891848781)*x_ref[1]**o+(-0.30688659725)*x_ref[1]+(-0.736611937618)*x_ref[2]**o+(-0.875783706051)*x_ref[2]
-        ref[2,4,1,0]=(-0.730885165985)*x_ref[0]**o+(0.453908506302)*x_ref[0]+(-0.617385752505)*x_ref[1]**o+(0.357459789592)*x_ref[1]+(0.286323175805)*x_ref[2]**o+(-0.448879127031)*x_ref[2]
-        ref[2,4,1,1]=(-0.295377341281)*x_ref[0]**o+(0.423424371051)*x_ref[0]+(0.524695076927)*x_ref[1]**o+(-0.698499625038)*x_ref[1]+(0.617308008395)*x_ref[2]**o+(-0.423469866581)*x_ref[2]
-        ref[2,4,2,0]=(0.104251379635)*x_ref[0]**o+(0.989709098795)*x_ref[0]+(-0.422075396624)*x_ref[1]**o+(-0.254328561231)*x_ref[1]+(-0.502052795074)*x_ref[2]**o+(-0.0851411652168)*x_ref[2]
-        ref[2,4,2,1]=(0.379332842082)*x_ref[0]**o+(-0.707504861783)*x_ref[0]+(0.00855075647146)*x_ref[1]**o+(0.792851159033)*x_ref[1]+(-0.692042160791)*x_ref[2]**o+(-0.18327165243)*x_ref[2]
-        ref[3,0,0,0]=(0.310700158718)*x_ref[0]**o+(0.285647240187)*x_ref[0]+(0.817947571838)*x_ref[1]**o+(0.808698040916)*x_ref[1]+(0.844184006443)*x_ref[2]**o+(-0.310383215636)*x_ref[2]
-        ref[3,0,0,1]=(-0.0173109952616)*x_ref[0]**o+(0.672034452037)*x_ref[0]+(-0.464572256298)*x_ref[1]**o+(0.205799523299)*x_ref[1]+(-0.971979841338)*x_ref[2]**o+(0.261515966001)*x_ref[2]
-        ref[3,0,1,0]=(0.0329384377028)*x_ref[0]**o+(0.571501185072)*x_ref[0]+(-0.902222556642)*x_ref[1]**o+(-0.528317784373)*x_ref[1]+(0.331989640881)*x_ref[2]**o+(0.0427505624318)*x_ref[2]
-        ref[3,0,1,1]=(0.964350410761)*x_ref[0]**o+(-0.327198989999)*x_ref[0]+(-0.195271523191)*x_ref[1]**o+(0.534663014601)*x_ref[1]+(-0.0208261208706)*x_ref[2]**o+(-0.158019249052)*x_ref[2]
-        ref[3,0,2,0]=(-0.622082726008)*x_ref[0]**o+(0.559463883442)*x_ref[0]+(0.841439693313)*x_ref[1]**o+(-0.196363987516)*x_ref[1]+(-0.0143926547396)*x_ref[2]**o+(0.144732603689)*x_ref[2]
-        ref[3,0,2,1]=(-0.149531653278)*x_ref[0]**o+(0.354229138322)*x_ref[0]+(-0.507916088829)*x_ref[1]**o+(0.221251580047)*x_ref[1]+(0.197213706274)*x_ref[2]**o+(-0.555645149276)*x_ref[2]
-        ref[3,1,0,0]=(0.331020785374)*x_ref[0]**o+(-0.377647773513)*x_ref[0]+(0.563355928949)*x_ref[1]**o+(0.789309216711)*x_ref[1]+(0.203663383875)*x_ref[2]**o+(-0.0333894540645)*x_ref[2]
-        ref[3,1,0,1]=(-0.0965613913882)*x_ref[0]**o+(0.18656484323)*x_ref[0]+(-0.138245941339)*x_ref[1]**o+(-0.34549538745)*x_ref[1]+(0.827173403167)*x_ref[2]**o+(-0.873380503939)*x_ref[2]
-        ref[3,1,1,0]=(0.932940890033)*x_ref[0]**o+(-0.564883830288)*x_ref[0]+(-0.505052725295)*x_ref[1]**o+(-0.669420210206)*x_ref[1]+(-0.799638096039)*x_ref[2]**o+(0.469400233749)*x_ref[2]
-        ref[3,1,1,1]=(-0.9741761069)*x_ref[0]**o+(-0.748125328781)*x_ref[0]+(0.664448241931)*x_ref[1]**o+(0.0957643296979)*x_ref[1]+(0.112211322019)*x_ref[2]**o+(-0.131870290434)*x_ref[2]
-        ref[3,1,2,0]=(-0.438609127704)*x_ref[0]**o+(-0.36618286515)*x_ref[0]+(-0.376420011115)*x_ref[1]**o+(-0.67084624599)*x_ref[1]+(0.821679796644)*x_ref[2]**o+(0.80111319897)*x_ref[2]
-        ref[3,1,2,1]=(-0.409859432085)*x_ref[0]**o+(0.848767816929)*x_ref[0]+(0.382358459835)*x_ref[1]**o+(-0.750139843631)*x_ref[1]+(0.587152586559)*x_ref[2]**o+(-0.26162952001)*x_ref[2]
-        ref[3,2,0,0]=(-0.506329785074)*x_ref[0]**o+(-0.0967745752004)*x_ref[0]+(-0.163316795268)*x_ref[1]**o+(0.0628481921732)*x_ref[1]+(0.395355494367)*x_ref[2]**o+(0.0978901916332)*x_ref[2]
-        ref[3,2,0,1]=(0.803590309587)*x_ref[0]**o+(0.470388053389)*x_ref[0]+(0.674942922168)*x_ref[1]**o+(0.223472834762)*x_ref[1]+(0.552332209028)*x_ref[2]**o+(-0.396443498843)*x_ref[2]
-        ref[3,2,1,0]=(-0.312384723839)*x_ref[0]**o+(0.392213828608)*x_ref[0]+(0.449465316671)*x_ref[1]**o+(-0.249103089401)*x_ref[1]+(0.601412913458)*x_ref[2]**o+(0.209899368039)*x_ref[2]
-        ref[3,2,1,1]=(-0.583776179557)*x_ref[0]**o+(0.485007047754)*x_ref[0]+(-0.0354153633589)*x_ref[1]**o+(-0.898630969916)*x_ref[1]+(-0.266581492795)*x_ref[2]**o+(0.822086680281)*x_ref[2]
-        ref[3,2,2,0]=(0.944617094397)*x_ref[0]**o+(-0.173057994833)*x_ref[0]+(0.927832160048)*x_ref[1]**o+(-0.218599594252)*x_ref[1]+(0.349957755011)*x_ref[2]**o+(0.392602744545)*x_ref[2]
-        ref[3,2,2,1]=(0.461648084674)*x_ref[0]**o+(0.826213376949)*x_ref[0]+(0.143429054731)*x_ref[1]**o+(-0.214265128007)*x_ref[1]+(0.0317208127607)*x_ref[2]**o+(-0.858361078381)*x_ref[2]
-        ref[3,3,0,0]=(0.306607920368)*x_ref[0]**o+(0.147692891688)*x_ref[0]+(-0.562661766456)*x_ref[1]**o+(0.448595564727)*x_ref[1]+(-0.707178218373)*x_ref[2]**o+(0.0655554587866)*x_ref[2]
-        ref[3,3,0,1]=(0.135475820362)*x_ref[0]**o+(0.51420718793)*x_ref[0]+(0.343291220736)*x_ref[1]**o+(-0.797532312602)*x_ref[1]+(-0.273431011273)*x_ref[2]**o+(0.135307779253)*x_ref[2]
-        ref[3,3,1,0]=(0.488028231073)*x_ref[0]**o+(0.542021806829)*x_ref[0]+(0.91916268609)*x_ref[1]**o+(0.317368273365)*x_ref[1]+(0.314807039395)*x_ref[2]**o+(-0.841583308025)*x_ref[2]
-        ref[3,3,1,1]=(-0.182783814917)*x_ref[0]**o+(0.250863481201)*x_ref[0]+(0.755551457003)*x_ref[1]**o+(0.946171548529)*x_ref[1]+(0.0350225436682)*x_ref[2]**o+(0.776059830052)*x_ref[2]
-        ref[3,3,2,0]=(-0.116707124994)*x_ref[0]**o+(-0.727010280588)*x_ref[0]+(0.172065389268)*x_ref[1]**o+(0.754164564639)*x_ref[1]+(0.803777635621)*x_ref[2]**o+(0.293490264417)*x_ref[2]
-        ref[3,3,2,1]=(0.154235982797)*x_ref[0]**o+(-0.124286021486)*x_ref[0]+(-0.737324748116)*x_ref[1]**o+(-0.136803541581)*x_ref[1]+(-0.608370191604)*x_ref[2]**o+(-0.933599034128)*x_ref[2]
-        ref[3,4,0,0]=(0.818061677328)*x_ref[0]**o+(-0.771719613166)*x_ref[0]+(0.742772795251)*x_ref[1]**o+(0.0359285091312)*x_ref[1]+(-0.985656851837)*x_ref[2]**o+(-0.884598206512)*x_ref[2]
-        ref[3,4,0,1]=(0.198371732741)*x_ref[0]**o+(0.646496618681)*x_ref[0]+(0.232912446494)*x_ref[1]**o+(0.945619492023)*x_ref[1]+(-0.344370341731)*x_ref[2]**o+(0.31156840357)*x_ref[2]
-        ref[3,4,1,0]=(-0.609298834606)*x_ref[0]**o+(0.784697392412)*x_ref[0]+(0.996065619079)*x_ref[1]**o+(-0.284498300043)*x_ref[1]+(-0.652795706803)*x_ref[2]**o+(-0.254746840396)*x_ref[2]
-        ref[3,4,1,1]=(-0.0083632822507)*x_ref[0]**o+(0.200923618933)*x_ref[0]+(0.353883930064)*x_ref[1]**o+(0.153257380179)*x_ref[1]+(0.843965464205)*x_ref[2]**o+(0.0418501400703)*x_ref[2]
-        ref[3,4,2,0]=(-0.226055622191)*x_ref[0]**o+(-0.701789166696)*x_ref[0]+(0.274080957143)*x_ref[1]**o+(0.0596744660556)*x_ref[1]+(-0.342083152987)*x_ref[2]**o+(0.593518464697)*x_ref[2]
-        ref[3,4,2,1]=(-0.288168945023)*x_ref[0]**o+(-0.742841678774)*x_ref[0]+(0.972629532424)*x_ref[1]**o+(0.892100560733)*x_ref[1]+(0.803880474721)*x_ref[2]**o+(-0.0638336211224)*x_ref[2]
-      res=interpolate(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
-      self.assertEqual(res.getShape(),(4, 5, 3, 2),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_L2_onFunctionOnContactZero_fromData_rank0(self):
       """
       tests L2-norm of Data on the FunctionOnContactZero
diff --git a/escriptcore/test/python/test_util_spatial_functions3.py b/escriptcore/test/python/test_util_spatial_functions3.py
index a5f8138..d92380c 100644
--- a/escriptcore/test/python/test_util_spatial_functions3.py
+++ b/escriptcore/test/python/test_util_spatial_functions3.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -45,10019 +45,12 @@ from numpy import array
 import numpy
 
 from test_util_spatial_functions2 import Test_Util_SpatialFunctions_noGradOnBoundary
+from test_util_grad import Test_Util_Gradient
 
 
-class Test_Util_SpatialFunctions(Test_Util_SpatialFunctions_noGradOnBoundary):
+class Test_Util_SpatialFunctions(Test_Util_SpatialFunctions_noGradOnBoundary, Test_Util_Gradient):
 
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.741017463552)*x[0]**o+(0.665549604887)*x[0]+(-0.294688627656)*x[1]**o+(-0.188608956137)*x[1]
-        ref[0]=o*(0.741017463552)*x_ref[0]**(o-1)+(0.665549604887)
-        ref[1]=o*(-0.294688627656)*x_ref[1]**(o-1)+(-0.188608956137)
-      else:
-        arg=(-0.182264095574)*x[0]**o+(0.388884343071)*x[0]+(0.0250471058578)*x[1]**o+(0.242724421847)*x[1]+(-0.863568419189)*x[2]**o+(-0.797427046061)*x[2]
-        ref[0]=o*(-0.182264095574)*x_ref[0]**(o-1)+(0.388884343071)
-        ref[1]=o*(0.0250471058578)*x_ref[1]**(o-1)+(0.242724421847)
-        ref[2]=o*(-0.863568419189)*x_ref[2]**(o-1)+(-0.797427046061)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.566748845779)*x[0]**o+(0.284156548246)*x[0]+(0.213805183732)*x[1]**o+(0.887833417271)*x[1]
-        arg[1]=(-0.935376067943)*x[0]**o+(0.31417056704)*x[0]+(0.157729703937)*x[1]**o+(0.781264180355)*x[1]
-        ref[0,0]=o*(-0.566748845779)*x_ref[0]**(o-1)+(0.284156548246)
-        ref[0,1]=o*(0.213805183732)*x_ref[1]**(o-1)+(0.887833417271)
-        ref[1,0]=o*(-0.935376067943)*x_ref[0]**(o-1)+(0.31417056704)
-        ref[1,1]=o*(0.157729703937)*x_ref[1]**(o-1)+(0.781264180355)
-      else:
-        arg[0]=(0.787106597246)*x[0]**o+(0.0477259256332)*x[0]+(0.0657839729355)*x[1]**o+(-0.367242386854)*x[1]+(0.638047637996)*x[2]**o+(0.292293368262)*x[2]
-        arg[1]=(0.325241621537)*x[0]**o+(-0.995465871567)*x[0]+(-0.589833259992)*x[1]**o+(0.252602994164)*x[1]+(0.271544628727)*x[2]**o+(0.401222388174)*x[2]
-        ref[0,0]=o*(0.787106597246)*x_ref[0]**(o-1)+(0.0477259256332)
-        ref[0,1]=o*(0.0657839729355)*x_ref[1]**(o-1)+(-0.367242386854)
-        ref[0,2]=o*(0.638047637996)*x_ref[2]**(o-1)+(0.292293368262)
-        ref[1,0]=o*(0.325241621537)*x_ref[0]**(o-1)+(-0.995465871567)
-        ref[1,1]=o*(-0.589833259992)*x_ref[1]**(o-1)+(0.252602994164)
-        ref[1,2]=o*(0.271544628727)*x_ref[2]**(o-1)+(0.401222388174)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.535138548297)*x[0]**o+(0.320793182084)*x[0]+(-0.363556615611)*x[1]**o+(0.80028981928)*x[1]
-        arg[0,1]=(0.50712290341)*x[0]**o+(0.0696582374725)*x[0]+(-0.565430065964)*x[1]**o+(0.840341269012)*x[1]
-        arg[0,2]=(0.222608517758)*x[0]**o+(0.0741096149609)*x[0]+(-0.926916099396)*x[1]**o+(0.840471681255)*x[1]
-        arg[0,3]=(-0.0729061065831)*x[0]**o+(-0.361006912293)*x[0]+(-0.796381694915)*x[1]**o+(-0.87399027927)*x[1]
-        arg[0,4]=(0.946982642563)*x[0]**o+(0.776871793528)*x[0]+(0.906858449271)*x[1]**o+(0.23076439514)*x[1]
-        arg[1,0]=(-0.121641842365)*x[0]**o+(0.755274749862)*x[0]+(-0.905815080361)*x[1]**o+(-0.27711865979)*x[1]
-        arg[1,1]=(0.870675475328)*x[0]**o+(0.000245820302085)*x[0]+(0.990534371185)*x[1]**o+(-0.0132722523111)*x[1]
-        arg[1,2]=(0.665375098591)*x[0]**o+(0.602779210152)*x[0]+(0.112732227406)*x[1]**o+(0.973600268944)*x[1]
-        arg[1,3]=(-0.760686885095)*x[0]**o+(-0.993893837808)*x[0]+(-0.279242757928)*x[1]**o+(0.0970216781461)*x[1]
-        arg[1,4]=(-0.326265155118)*x[0]**o+(-0.302971035826)*x[0]+(-0.991053864037)*x[1]**o+(-0.787776341406)*x[1]
-        arg[2,0]=(-0.798558123695)*x[0]**o+(-0.648773673567)*x[0]+(0.911336567339)*x[1]**o+(0.525888531875)*x[1]
-        arg[2,1]=(0.334481967771)*x[0]**o+(0.559633318828)*x[0]+(-0.738361234791)*x[1]**o+(0.863808627657)*x[1]
-        arg[2,2]=(-0.660270802705)*x[0]**o+(-0.500800405285)*x[0]+(0.250991213972)*x[1]**o+(-0.855371865339)*x[1]
-        arg[2,3]=(0.573495152924)*x[0]**o+(0.841810214664)*x[0]+(0.816402403997)*x[1]**o+(0.871435278968)*x[1]
-        arg[2,4]=(0.00700234490903)*x[0]**o+(0.609696655384)*x[0]+(-0.908261420109)*x[1]**o+(-0.0469518512659)*x[1]
-        arg[3,0]=(-0.78381944233)*x[0]**o+(0.547849085605)*x[0]+(-0.481333073199)*x[1]**o+(-0.100496681813)*x[1]
-        arg[3,1]=(0.53995869966)*x[0]**o+(-0.503303606531)*x[0]+(0.783394329024)*x[1]**o+(0.989828473603)*x[1]
-        arg[3,2]=(0.723590003109)*x[0]**o+(-0.75511396868)*x[0]+(0.249651386017)*x[1]**o+(0.545636109436)*x[1]
-        arg[3,3]=(-0.126863462818)*x[0]**o+(0.553295312002)*x[0]+(-0.286155398085)*x[1]**o+(0.425889110789)*x[1]
-        arg[3,4]=(-0.970069386779)*x[0]**o+(0.457400568855)*x[0]+(-0.245839304835)*x[1]**o+(-0.463000940469)*x[1]
-        ref[0,0,0]=o*(-0.535138548297)*x_ref[0]**(o-1)+(0.320793182084)
-        ref[0,0,1]=o*(-0.363556615611)*x_ref[1]**(o-1)+(0.80028981928)
-        ref[0,1,0]=o*(0.50712290341)*x_ref[0]**(o-1)+(0.0696582374725)
-        ref[0,1,1]=o*(-0.565430065964)*x_ref[1]**(o-1)+(0.840341269012)
-        ref[0,2,0]=o*(0.222608517758)*x_ref[0]**(o-1)+(0.0741096149609)
-        ref[0,2,1]=o*(-0.926916099396)*x_ref[1]**(o-1)+(0.840471681255)
-        ref[0,3,0]=o*(-0.0729061065831)*x_ref[0]**(o-1)+(-0.361006912293)
-        ref[0,3,1]=o*(-0.796381694915)*x_ref[1]**(o-1)+(-0.87399027927)
-        ref[0,4,0]=o*(0.946982642563)*x_ref[0]**(o-1)+(0.776871793528)
-        ref[0,4,1]=o*(0.906858449271)*x_ref[1]**(o-1)+(0.23076439514)
-        ref[1,0,0]=o*(-0.121641842365)*x_ref[0]**(o-1)+(0.755274749862)
-        ref[1,0,1]=o*(-0.905815080361)*x_ref[1]**(o-1)+(-0.27711865979)
-        ref[1,1,0]=o*(0.870675475328)*x_ref[0]**(o-1)+(0.000245820302085)
-        ref[1,1,1]=o*(0.990534371185)*x_ref[1]**(o-1)+(-0.0132722523111)
-        ref[1,2,0]=o*(0.665375098591)*x_ref[0]**(o-1)+(0.602779210152)
-        ref[1,2,1]=o*(0.112732227406)*x_ref[1]**(o-1)+(0.973600268944)
-        ref[1,3,0]=o*(-0.760686885095)*x_ref[0]**(o-1)+(-0.993893837808)
-        ref[1,3,1]=o*(-0.279242757928)*x_ref[1]**(o-1)+(0.0970216781461)
-        ref[1,4,0]=o*(-0.326265155118)*x_ref[0]**(o-1)+(-0.302971035826)
-        ref[1,4,1]=o*(-0.991053864037)*x_ref[1]**(o-1)+(-0.787776341406)
-        ref[2,0,0]=o*(-0.798558123695)*x_ref[0]**(o-1)+(-0.648773673567)
-        ref[2,0,1]=o*(0.911336567339)*x_ref[1]**(o-1)+(0.525888531875)
-        ref[2,1,0]=o*(0.334481967771)*x_ref[0]**(o-1)+(0.559633318828)
-        ref[2,1,1]=o*(-0.738361234791)*x_ref[1]**(o-1)+(0.863808627657)
-        ref[2,2,0]=o*(-0.660270802705)*x_ref[0]**(o-1)+(-0.500800405285)
-        ref[2,2,1]=o*(0.250991213972)*x_ref[1]**(o-1)+(-0.855371865339)
-        ref[2,3,0]=o*(0.573495152924)*x_ref[0]**(o-1)+(0.841810214664)
-        ref[2,3,1]=o*(0.816402403997)*x_ref[1]**(o-1)+(0.871435278968)
-        ref[2,4,0]=o*(0.00700234490903)*x_ref[0]**(o-1)+(0.609696655384)
-        ref[2,4,1]=o*(-0.908261420109)*x_ref[1]**(o-1)+(-0.0469518512659)
-        ref[3,0,0]=o*(-0.78381944233)*x_ref[0]**(o-1)+(0.547849085605)
-        ref[3,0,1]=o*(-0.481333073199)*x_ref[1]**(o-1)+(-0.100496681813)
-        ref[3,1,0]=o*(0.53995869966)*x_ref[0]**(o-1)+(-0.503303606531)
-        ref[3,1,1]=o*(0.783394329024)*x_ref[1]**(o-1)+(0.989828473603)
-        ref[3,2,0]=o*(0.723590003109)*x_ref[0]**(o-1)+(-0.75511396868)
-        ref[3,2,1]=o*(0.249651386017)*x_ref[1]**(o-1)+(0.545636109436)
-        ref[3,3,0]=o*(-0.126863462818)*x_ref[0]**(o-1)+(0.553295312002)
-        ref[3,3,1]=o*(-0.286155398085)*x_ref[1]**(o-1)+(0.425889110789)
-        ref[3,4,0]=o*(-0.970069386779)*x_ref[0]**(o-1)+(0.457400568855)
-        ref[3,4,1]=o*(-0.245839304835)*x_ref[1]**(o-1)+(-0.463000940469)
-      else:
-        arg[0,0]=(-0.0252675874258)*x[0]**o+(-0.998043629662)*x[0]+(-0.956603187221)*x[1]**o+(-0.642113208329)*x[1]+(-0.59687133215)*x[2]**o+(-0.222380006695)*x[2]
-        arg[0,1]=(0.540057023826)*x[0]**o+(0.660021105706)*x[0]+(-0.0847035816563)*x[1]**o+(0.734935147879)*x[1]+(0.895080236848)*x[2]**o+(0.759076168225)*x[2]
-        arg[0,2]=(0.208276460123)*x[0]**o+(-0.842726599314)*x[0]+(0.514146640689)*x[1]**o+(-0.931115443386)*x[1]+(-0.427990918054)*x[2]**o+(-0.0944702225036)*x[2]
-        arg[0,3]=(-0.669873393665)*x[0]**o+(-0.164211687812)*x[0]+(0.257292402022)*x[1]**o+(0.788249196864)*x[1]+(-0.0160232742588)*x[2]**o+(0.593261720532)*x[2]
-        arg[0,4]=(0.574685018662)*x[0]**o+(-0.404093341935)*x[0]+(-0.613704015926)*x[1]**o+(-0.388769512229)*x[1]+(0.65014059769)*x[2]**o+(0.796497720581)*x[2]
-        arg[1,0]=(0.579425469692)*x[0]**o+(0.706786266065)*x[0]+(-0.489805412824)*x[1]**o+(0.412673120993)*x[1]+(-0.261487328773)*x[2]**o+(0.323016314178)*x[2]
-        arg[1,1]=(-0.406115852457)*x[0]**o+(-0.320011474154)*x[0]+(0.83353566302)*x[1]**o+(-0.770757586792)*x[1]+(-0.497021878205)*x[2]**o+(-0.108546214912)*x[2]
-        arg[1,2]=(-0.799159182698)*x[0]**o+(0.221424788319)*x[0]+(0.882092644719)*x[1]**o+(0.25804039903)*x[1]+(-0.788642442802)*x[2]**o+(-0.434293659417)*x[2]
-        arg[1,3]=(-0.453596867354)*x[0]**o+(-0.855684542333)*x[0]+(0.421257402196)*x[1]**o+(0.162268279507)*x[1]+(-0.618396236314)*x[2]**o+(-0.650684413266)*x[2]
-        arg[1,4]=(-0.464749011522)*x[0]**o+(-0.050661862641)*x[0]+(-0.7554290975)*x[1]**o+(-0.213826578781)*x[1]+(-0.536460109672)*x[2]**o+(-0.441490452069)*x[2]
-        arg[2,0]=(0.335438338384)*x[0]**o+(-0.598515232086)*x[0]+(0.396958696838)*x[1]**o+(0.712094780848)*x[1]+(0.0112487672163)*x[2]**o+(-0.106361601342)*x[2]
-        arg[2,1]=(0.157333767552)*x[0]**o+(0.763247557186)*x[0]+(0.454047596703)*x[1]**o+(0.874633696245)*x[1]+(0.80992740886)*x[2]**o+(-0.465565575276)*x[2]
-        arg[2,2]=(-0.668932235683)*x[0]**o+(0.99055962791)*x[0]+(-0.473440344595)*x[1]**o+(-0.694789559356)*x[1]+(-0.337501506478)*x[2]**o+(-0.552461610916)*x[2]
-        arg[2,3]=(-0.174040039098)*x[0]**o+(0.878604594327)*x[0]+(-0.488684761288)*x[1]**o+(-0.225626690649)*x[1]+(0.307550460093)*x[2]**o+(0.279172145442)*x[2]
-        arg[2,4]=(0.771496476361)*x[0]**o+(-0.528231004311)*x[0]+(0.318620411204)*x[1]**o+(-0.831636376644)*x[1]+(-0.23477599759)*x[2]**o+(0.452986258707)*x[2]
-        arg[3,0]=(0.689878836595)*x[0]**o+(-0.723887531161)*x[0]+(0.906077469738)*x[1]**o+(-0.729986756151)*x[1]+(0.860506345609)*x[2]**o+(-0.437203511895)*x[2]
-        arg[3,1]=(0.867909616506)*x[0]**o+(-0.0480808079676)*x[0]+(-0.439925732789)*x[1]**o+(-0.753945614279)*x[1]+(-0.0015149141551)*x[2]**o+(-0.465559525628)*x[2]
-        arg[3,2]=(0.915231983332)*x[0]**o+(0.77428136852)*x[0]+(0.902598621987)*x[1]**o+(-0.49204288782)*x[1]+(0.77362022057)*x[2]**o+(0.872135547313)*x[2]
-        arg[3,3]=(0.274436414079)*x[0]**o+(-0.291721638943)*x[0]+(0.202501119852)*x[1]**o+(0.911330931145)*x[1]+(-0.61382801878)*x[2]**o+(0.386704897682)*x[2]
-        arg[3,4]=(-0.0258695378217)*x[0]**o+(0.263046110195)*x[0]+(-0.162461126288)*x[1]**o+(-0.123570278155)*x[1]+(0.598012400912)*x[2]**o+(0.769951340801)*x[2]
-        ref[0,0,0]=o*(-0.0252675874258)*x_ref[0]**(o-1)+(-0.998043629662)
-        ref[0,0,1]=o*(-0.956603187221)*x_ref[1]**(o-1)+(-0.642113208329)
-        ref[0,0,2]=o*(-0.59687133215)*x_ref[2]**(o-1)+(-0.222380006695)
-        ref[0,1,0]=o*(0.540057023826)*x_ref[0]**(o-1)+(0.660021105706)
-        ref[0,1,1]=o*(-0.0847035816563)*x_ref[1]**(o-1)+(0.734935147879)
-        ref[0,1,2]=o*(0.895080236848)*x_ref[2]**(o-1)+(0.759076168225)
-        ref[0,2,0]=o*(0.208276460123)*x_ref[0]**(o-1)+(-0.842726599314)
-        ref[0,2,1]=o*(0.514146640689)*x_ref[1]**(o-1)+(-0.931115443386)
-        ref[0,2,2]=o*(-0.427990918054)*x_ref[2]**(o-1)+(-0.0944702225036)
-        ref[0,3,0]=o*(-0.669873393665)*x_ref[0]**(o-1)+(-0.164211687812)
-        ref[0,3,1]=o*(0.257292402022)*x_ref[1]**(o-1)+(0.788249196864)
-        ref[0,3,2]=o*(-0.0160232742588)*x_ref[2]**(o-1)+(0.593261720532)
-        ref[0,4,0]=o*(0.574685018662)*x_ref[0]**(o-1)+(-0.404093341935)
-        ref[0,4,1]=o*(-0.613704015926)*x_ref[1]**(o-1)+(-0.388769512229)
-        ref[0,4,2]=o*(0.65014059769)*x_ref[2]**(o-1)+(0.796497720581)
-        ref[1,0,0]=o*(0.579425469692)*x_ref[0]**(o-1)+(0.706786266065)
-        ref[1,0,1]=o*(-0.489805412824)*x_ref[1]**(o-1)+(0.412673120993)
-        ref[1,0,2]=o*(-0.261487328773)*x_ref[2]**(o-1)+(0.323016314178)
-        ref[1,1,0]=o*(-0.406115852457)*x_ref[0]**(o-1)+(-0.320011474154)
-        ref[1,1,1]=o*(0.83353566302)*x_ref[1]**(o-1)+(-0.770757586792)
-        ref[1,1,2]=o*(-0.497021878205)*x_ref[2]**(o-1)+(-0.108546214912)
-        ref[1,2,0]=o*(-0.799159182698)*x_ref[0]**(o-1)+(0.221424788319)
-        ref[1,2,1]=o*(0.882092644719)*x_ref[1]**(o-1)+(0.25804039903)
-        ref[1,2,2]=o*(-0.788642442802)*x_ref[2]**(o-1)+(-0.434293659417)
-        ref[1,3,0]=o*(-0.453596867354)*x_ref[0]**(o-1)+(-0.855684542333)
-        ref[1,3,1]=o*(0.421257402196)*x_ref[1]**(o-1)+(0.162268279507)
-        ref[1,3,2]=o*(-0.618396236314)*x_ref[2]**(o-1)+(-0.650684413266)
-        ref[1,4,0]=o*(-0.464749011522)*x_ref[0]**(o-1)+(-0.050661862641)
-        ref[1,4,1]=o*(-0.7554290975)*x_ref[1]**(o-1)+(-0.213826578781)
-        ref[1,4,2]=o*(-0.536460109672)*x_ref[2]**(o-1)+(-0.441490452069)
-        ref[2,0,0]=o*(0.335438338384)*x_ref[0]**(o-1)+(-0.598515232086)
-        ref[2,0,1]=o*(0.396958696838)*x_ref[1]**(o-1)+(0.712094780848)
-        ref[2,0,2]=o*(0.0112487672163)*x_ref[2]**(o-1)+(-0.106361601342)
-        ref[2,1,0]=o*(0.157333767552)*x_ref[0]**(o-1)+(0.763247557186)
-        ref[2,1,1]=o*(0.454047596703)*x_ref[1]**(o-1)+(0.874633696245)
-        ref[2,1,2]=o*(0.80992740886)*x_ref[2]**(o-1)+(-0.465565575276)
-        ref[2,2,0]=o*(-0.668932235683)*x_ref[0]**(o-1)+(0.99055962791)
-        ref[2,2,1]=o*(-0.473440344595)*x_ref[1]**(o-1)+(-0.694789559356)
-        ref[2,2,2]=o*(-0.337501506478)*x_ref[2]**(o-1)+(-0.552461610916)
-        ref[2,3,0]=o*(-0.174040039098)*x_ref[0]**(o-1)+(0.878604594327)
-        ref[2,3,1]=o*(-0.488684761288)*x_ref[1]**(o-1)+(-0.225626690649)
-        ref[2,3,2]=o*(0.307550460093)*x_ref[2]**(o-1)+(0.279172145442)
-        ref[2,4,0]=o*(0.771496476361)*x_ref[0]**(o-1)+(-0.528231004311)
-        ref[2,4,1]=o*(0.318620411204)*x_ref[1]**(o-1)+(-0.831636376644)
-        ref[2,4,2]=o*(-0.23477599759)*x_ref[2]**(o-1)+(0.452986258707)
-        ref[3,0,0]=o*(0.689878836595)*x_ref[0]**(o-1)+(-0.723887531161)
-        ref[3,0,1]=o*(0.906077469738)*x_ref[1]**(o-1)+(-0.729986756151)
-        ref[3,0,2]=o*(0.860506345609)*x_ref[2]**(o-1)+(-0.437203511895)
-        ref[3,1,0]=o*(0.867909616506)*x_ref[0]**(o-1)+(-0.0480808079676)
-        ref[3,1,1]=o*(-0.439925732789)*x_ref[1]**(o-1)+(-0.753945614279)
-        ref[3,1,2]=o*(-0.0015149141551)*x_ref[2]**(o-1)+(-0.465559525628)
-        ref[3,2,0]=o*(0.915231983332)*x_ref[0]**(o-1)+(0.77428136852)
-        ref[3,2,1]=o*(0.902598621987)*x_ref[1]**(o-1)+(-0.49204288782)
-        ref[3,2,2]=o*(0.77362022057)*x_ref[2]**(o-1)+(0.872135547313)
-        ref[3,3,0]=o*(0.274436414079)*x_ref[0]**(o-1)+(-0.291721638943)
-        ref[3,3,1]=o*(0.202501119852)*x_ref[1]**(o-1)+(0.911330931145)
-        ref[3,3,2]=o*(-0.61382801878)*x_ref[2]**(o-1)+(0.386704897682)
-        ref[3,4,0]=o*(-0.0258695378217)*x_ref[0]**(o-1)+(0.263046110195)
-        ref[3,4,1]=o*(-0.162461126288)*x_ref[1]**(o-1)+(-0.123570278155)
-        ref[3,4,2]=o*(0.598012400912)*x_ref[2]**(o-1)+(0.769951340801)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.301542954432)*x[0]**o+(-0.126029003998)*x[0]+(-0.408561086014)*x[1]**o+(0.090642210886)*x[1]
-        arg[0,0,1]=(0.456052591865)*x[0]**o+(0.624896766511)*x[0]+(0.87137087467)*x[1]**o+(-0.296114354421)*x[1]
-        arg[0,1,0]=(0.370833001032)*x[0]**o+(-0.700862384031)*x[0]+(-0.276076372016)*x[1]**o+(-0.820884025764)*x[1]
-        arg[0,1,1]=(0.550805148631)*x[0]**o+(-0.628825647329)*x[0]+(0.906362219793)*x[1]**o+(0.093148354989)*x[1]
-        arg[1,0,0]=(-0.80347190678)*x[0]**o+(-0.112285193049)*x[0]+(-0.703090064994)*x[1]**o+(0.738893806856)*x[1]
-        arg[1,0,1]=(0.716113817265)*x[0]**o+(-0.403563175278)*x[0]+(-0.545474326725)*x[1]**o+(-0.085377932579)*x[1]
-        arg[1,1,0]=(0.0151945295253)*x[0]**o+(0.419681120006)*x[0]+(0.605889120207)*x[1]**o+(0.94921670969)*x[1]
-        arg[1,1,1]=(0.330888675781)*x[0]**o+(0.536336632067)*x[0]+(0.130243661103)*x[1]**o+(0.249581698903)*x[1]
-        arg[2,0,0]=(-0.94168189216)*x[0]**o+(0.42899125004)*x[0]+(0.104206704223)*x[1]**o+(0.992451993183)*x[1]
-        arg[2,0,1]=(-0.557898869487)*x[0]**o+(-0.0387050073802)*x[0]+(-0.880396260326)*x[1]**o+(-0.649734782543)*x[1]
-        arg[2,1,0]=(0.0362873703011)*x[0]**o+(0.641116555832)*x[0]+(-0.878565186806)*x[1]**o+(-0.305825058029)*x[1]
-        arg[2,1,1]=(0.926144430868)*x[0]**o+(0.207902756992)*x[0]+(-0.823834000424)*x[1]**o+(0.541980766739)*x[1]
-        arg[3,0,0]=(-0.497934527226)*x[0]**o+(0.904514339359)*x[0]+(0.0627382682436)*x[1]**o+(-0.886845257384)*x[1]
-        arg[3,0,1]=(0.458163004678)*x[0]**o+(-0.890966354569)*x[0]+(0.779511556433)*x[1]**o+(0.911407858547)*x[1]
-        arg[3,1,0]=(0.643197533583)*x[0]**o+(-0.445952483015)*x[0]+(-0.491648538422)*x[1]**o+(-0.339803793944)*x[1]
-        arg[3,1,1]=(0.564910446806)*x[0]**o+(-0.251342703228)*x[0]+(-0.102526510378)*x[1]**o+(0.989034603428)*x[1]
-        arg[4,0,0]=(0.0728812877818)*x[0]**o+(-0.160839673847)*x[0]+(0.078039622926)*x[1]**o+(-0.778740146006)*x[1]
-        arg[4,0,1]=(-0.848970759855)*x[0]**o+(0.83795370612)*x[0]+(-0.652802628253)*x[1]**o+(0.570900978851)*x[1]
-        arg[4,1,0]=(0.492154273484)*x[0]**o+(-0.138488354185)*x[0]+(0.269142955069)*x[1]**o+(-0.849995493706)*x[1]
-        arg[4,1,1]=(0.945032529684)*x[0]**o+(0.611284327327)*x[0]+(0.549856083886)*x[1]**o+(0.347585489606)*x[1]
-        arg[5,0,0]=(0.481456547858)*x[0]**o+(0.238848312219)*x[0]+(-0.5849679413)*x[1]**o+(-0.749140400072)*x[1]
-        arg[5,0,1]=(0.27081490311)*x[0]**o+(-0.101642948148)*x[0]+(0.31847076679)*x[1]**o+(0.192182993758)*x[1]
-        arg[5,1,0]=(-0.873348151897)*x[0]**o+(-0.613499952221)*x[0]+(0.54087826152)*x[1]**o+(-0.269096416524)*x[1]
-        arg[5,1,1]=(-0.803277233859)*x[0]**o+(-0.714237882827)*x[0]+(-0.205544031812)*x[1]**o+(0.188144864673)*x[1]
-        ref[0,0,0,0]=o*(-0.301542954432)*x_ref[0]**(o-1)+(-0.126029003998)
-        ref[0,0,0,1]=o*(-0.408561086014)*x_ref[1]**(o-1)+(0.090642210886)
-        ref[0,0,1,0]=o*(0.456052591865)*x_ref[0]**(o-1)+(0.624896766511)
-        ref[0,0,1,1]=o*(0.87137087467)*x_ref[1]**(o-1)+(-0.296114354421)
-        ref[0,1,0,0]=o*(0.370833001032)*x_ref[0]**(o-1)+(-0.700862384031)
-        ref[0,1,0,1]=o*(-0.276076372016)*x_ref[1]**(o-1)+(-0.820884025764)
-        ref[0,1,1,0]=o*(0.550805148631)*x_ref[0]**(o-1)+(-0.628825647329)
-        ref[0,1,1,1]=o*(0.906362219793)*x_ref[1]**(o-1)+(0.093148354989)
-        ref[1,0,0,0]=o*(-0.80347190678)*x_ref[0]**(o-1)+(-0.112285193049)
-        ref[1,0,0,1]=o*(-0.703090064994)*x_ref[1]**(o-1)+(0.738893806856)
-        ref[1,0,1,0]=o*(0.716113817265)*x_ref[0]**(o-1)+(-0.403563175278)
-        ref[1,0,1,1]=o*(-0.545474326725)*x_ref[1]**(o-1)+(-0.085377932579)
-        ref[1,1,0,0]=o*(0.0151945295253)*x_ref[0]**(o-1)+(0.419681120006)
-        ref[1,1,0,1]=o*(0.605889120207)*x_ref[1]**(o-1)+(0.94921670969)
-        ref[1,1,1,0]=o*(0.330888675781)*x_ref[0]**(o-1)+(0.536336632067)
-        ref[1,1,1,1]=o*(0.130243661103)*x_ref[1]**(o-1)+(0.249581698903)
-        ref[2,0,0,0]=o*(-0.94168189216)*x_ref[0]**(o-1)+(0.42899125004)
-        ref[2,0,0,1]=o*(0.104206704223)*x_ref[1]**(o-1)+(0.992451993183)
-        ref[2,0,1,0]=o*(-0.557898869487)*x_ref[0]**(o-1)+(-0.0387050073802)
-        ref[2,0,1,1]=o*(-0.880396260326)*x_ref[1]**(o-1)+(-0.649734782543)
-        ref[2,1,0,0]=o*(0.0362873703011)*x_ref[0]**(o-1)+(0.641116555832)
-        ref[2,1,0,1]=o*(-0.878565186806)*x_ref[1]**(o-1)+(-0.305825058029)
-        ref[2,1,1,0]=o*(0.926144430868)*x_ref[0]**(o-1)+(0.207902756992)
-        ref[2,1,1,1]=o*(-0.823834000424)*x_ref[1]**(o-1)+(0.541980766739)
-        ref[3,0,0,0]=o*(-0.497934527226)*x_ref[0]**(o-1)+(0.904514339359)
-        ref[3,0,0,1]=o*(0.0627382682436)*x_ref[1]**(o-1)+(-0.886845257384)
-        ref[3,0,1,0]=o*(0.458163004678)*x_ref[0]**(o-1)+(-0.890966354569)
-        ref[3,0,1,1]=o*(0.779511556433)*x_ref[1]**(o-1)+(0.911407858547)
-        ref[3,1,0,0]=o*(0.643197533583)*x_ref[0]**(o-1)+(-0.445952483015)
-        ref[3,1,0,1]=o*(-0.491648538422)*x_ref[1]**(o-1)+(-0.339803793944)
-        ref[3,1,1,0]=o*(0.564910446806)*x_ref[0]**(o-1)+(-0.251342703228)
-        ref[3,1,1,1]=o*(-0.102526510378)*x_ref[1]**(o-1)+(0.989034603428)
-        ref[4,0,0,0]=o*(0.0728812877818)*x_ref[0]**(o-1)+(-0.160839673847)
-        ref[4,0,0,1]=o*(0.078039622926)*x_ref[1]**(o-1)+(-0.778740146006)
-        ref[4,0,1,0]=o*(-0.848970759855)*x_ref[0]**(o-1)+(0.83795370612)
-        ref[4,0,1,1]=o*(-0.652802628253)*x_ref[1]**(o-1)+(0.570900978851)
-        ref[4,1,0,0]=o*(0.492154273484)*x_ref[0]**(o-1)+(-0.138488354185)
-        ref[4,1,0,1]=o*(0.269142955069)*x_ref[1]**(o-1)+(-0.849995493706)
-        ref[4,1,1,0]=o*(0.945032529684)*x_ref[0]**(o-1)+(0.611284327327)
-        ref[4,1,1,1]=o*(0.549856083886)*x_ref[1]**(o-1)+(0.347585489606)
-        ref[5,0,0,0]=o*(0.481456547858)*x_ref[0]**(o-1)+(0.238848312219)
-        ref[5,0,0,1]=o*(-0.5849679413)*x_ref[1]**(o-1)+(-0.749140400072)
-        ref[5,0,1,0]=o*(0.27081490311)*x_ref[0]**(o-1)+(-0.101642948148)
-        ref[5,0,1,1]=o*(0.31847076679)*x_ref[1]**(o-1)+(0.192182993758)
-        ref[5,1,0,0]=o*(-0.873348151897)*x_ref[0]**(o-1)+(-0.613499952221)
-        ref[5,1,0,1]=o*(0.54087826152)*x_ref[1]**(o-1)+(-0.269096416524)
-        ref[5,1,1,0]=o*(-0.803277233859)*x_ref[0]**(o-1)+(-0.714237882827)
-        ref[5,1,1,1]=o*(-0.205544031812)*x_ref[1]**(o-1)+(0.188144864673)
-      else:
-        arg[0,0,0]=(-0.639251981322)*x[0]**o+(-0.115972267818)*x[0]+(0.491134645863)*x[1]**o+(0.345343639029)*x[1]+(-0.663597762251)*x[2]**o+(-0.328150609455)*x[2]
-        arg[0,0,1]=(-0.76280151252)*x[0]**o+(0.933789965647)*x[0]+(-0.117386438957)*x[1]**o+(0.738801880577)*x[1]+(-0.823759196233)*x[2]**o+(-0.591225057134)*x[2]
-        arg[0,1,0]=(-0.515479158328)*x[0]**o+(-0.498840147412)*x[0]+(-0.07870152457)*x[1]**o+(0.240823897179)*x[1]+(-0.529483054724)*x[2]**o+(0.957444878465)*x[2]
-        arg[0,1,1]=(0.659163197783)*x[0]**o+(-0.987017484017)*x[0]+(0.316073196672)*x[1]**o+(-0.858184573568)*x[1]+(-0.324909144593)*x[2]**o+(-0.89624674398)*x[2]
-        arg[1,0,0]=(0.582390600104)*x[0]**o+(-0.808724939916)*x[0]+(-0.204186916478)*x[1]**o+(0.63212764696)*x[1]+(-0.272947627588)*x[2]**o+(-0.133369751815)*x[2]
-        arg[1,0,1]=(-0.955892141909)*x[0]**o+(0.915832405494)*x[0]+(-0.823428836636)*x[1]**o+(-0.527176552593)*x[1]+(-0.439872810771)*x[2]**o+(0.282431362763)*x[2]
-        arg[1,1,0]=(0.269192050139)*x[0]**o+(0.304289733459)*x[0]+(-0.252137123064)*x[1]**o+(0.159346881758)*x[1]+(-0.875713938743)*x[2]**o+(-0.804681982204)*x[2]
-        arg[1,1,1]=(0.100159906585)*x[0]**o+(0.652670710888)*x[0]+(-0.0471177296503)*x[1]**o+(0.15344212377)*x[1]+(0.162356023341)*x[2]**o+(0.242855769737)*x[2]
-        arg[2,0,0]=(-0.0214334988311)*x[0]**o+(0.444654672491)*x[0]+(0.235478960156)*x[1]**o+(0.62191559883)*x[1]+(0.124531773653)*x[2]**o+(-0.603748942811)*x[2]
-        arg[2,0,1]=(-0.00696114124898)*x[0]**o+(-0.350635993795)*x[0]+(0.766513244466)*x[1]**o+(-0.99996024111)*x[1]+(0.976036637033)*x[2]**o+(0.00703160282837)*x[2]
-        arg[2,1,0]=(-0.210499708873)*x[0]**o+(-0.763641982769)*x[0]+(0.435435481771)*x[1]**o+(0.0886400511888)*x[1]+(0.540913993886)*x[2]**o+(-0.864904989707)*x[2]
-        arg[2,1,1]=(0.609017357846)*x[0]**o+(-0.681305727596)*x[0]+(-0.291763309802)*x[1]**o+(0.12465245807)*x[1]+(-0.265362499082)*x[2]**o+(-0.978509447338)*x[2]
-        arg[3,0,0]=(0.622861389608)*x[0]**o+(-0.341108338962)*x[0]+(0.908588438318)*x[1]**o+(-0.583012719535)*x[1]+(0.33513654797)*x[2]**o+(-0.835513934636)*x[2]
-        arg[3,0,1]=(0.164841305439)*x[0]**o+(-0.622242302911)*x[0]+(-0.0469305037163)*x[1]**o+(-0.859517953063)*x[1]+(-0.112485630662)*x[2]**o+(0.31475831421)*x[2]
-        arg[3,1,0]=(-0.177913851996)*x[0]**o+(0.74607750787)*x[0]+(-0.188838634745)*x[1]**o+(-0.803617744529)*x[1]+(0.18839438068)*x[2]**o+(-0.857696671728)*x[2]
-        arg[3,1,1]=(0.485172697497)*x[0]**o+(-0.554750723313)*x[0]+(-0.59838039994)*x[1]**o+(-0.83177053032)*x[1]+(0.655490277067)*x[2]**o+(0.0645924856059)*x[2]
-        arg[4,0,0]=(0.900678166492)*x[0]**o+(-0.485573346705)*x[0]+(0.0108149783491)*x[1]**o+(0.982616024342)*x[1]+(-0.374371784319)*x[2]**o+(-0.825014166204)*x[2]
-        arg[4,0,1]=(0.682753472393)*x[0]**o+(0.810927347906)*x[0]+(-0.128780174224)*x[1]**o+(0.514607304836)*x[1]+(0.606285011416)*x[2]**o+(-0.691191486471)*x[2]
-        arg[4,1,0]=(0.0103661338625)*x[0]**o+(0.184111752707)*x[0]+(-0.270751890504)*x[1]**o+(0.207351712222)*x[1]+(-0.366280871535)*x[2]**o+(-0.638450092731)*x[2]
-        arg[4,1,1]=(-0.111302974207)*x[0]**o+(-0.520252159917)*x[0]+(-0.911197545741)*x[1]**o+(-0.779732160528)*x[1]+(-0.443379349795)*x[2]**o+(-0.783540988384)*x[2]
-        arg[5,0,0]=(0.319701766792)*x[0]**o+(-0.953929305858)*x[0]+(-0.783942145061)*x[1]**o+(0.687992583635)*x[1]+(0.873868267323)*x[2]**o+(-0.204836707955)*x[2]
-        arg[5,0,1]=(-0.240340717622)*x[0]**o+(-0.799598459684)*x[0]+(-0.827096078861)*x[1]**o+(0.229071234102)*x[1]+(0.309197705487)*x[2]**o+(-0.286088934882)*x[2]
-        arg[5,1,0]=(-0.0926450319507)*x[0]**o+(0.638985747884)*x[0]+(0.604913216138)*x[1]**o+(-0.364251815312)*x[1]+(-0.47971664069)*x[2]**o+(-0.20655528518)*x[2]
-        arg[5,1,1]=(0.418341452333)*x[0]**o+(0.430002851684)*x[0]+(0.624025385599)*x[1]**o+(0.338601201629)*x[1]+(0.0900364406242)*x[2]**o+(0.193533337073)*x[2]
-        ref[0,0,0,0]=o*(-0.639251981322)*x_ref[0]**(o-1)+(-0.115972267818)
-        ref[0,0,0,1]=o*(0.491134645863)*x_ref[1]**(o-1)+(0.345343639029)
-        ref[0,0,0,2]=o*(-0.663597762251)*x_ref[2]**(o-1)+(-0.328150609455)
-        ref[0,0,1,0]=o*(-0.76280151252)*x_ref[0]**(o-1)+(0.933789965647)
-        ref[0,0,1,1]=o*(-0.117386438957)*x_ref[1]**(o-1)+(0.738801880577)
-        ref[0,0,1,2]=o*(-0.823759196233)*x_ref[2]**(o-1)+(-0.591225057134)
-        ref[0,1,0,0]=o*(-0.515479158328)*x_ref[0]**(o-1)+(-0.498840147412)
-        ref[0,1,0,1]=o*(-0.07870152457)*x_ref[1]**(o-1)+(0.240823897179)
-        ref[0,1,0,2]=o*(-0.529483054724)*x_ref[2]**(o-1)+(0.957444878465)
-        ref[0,1,1,0]=o*(0.659163197783)*x_ref[0]**(o-1)+(-0.987017484017)
-        ref[0,1,1,1]=o*(0.316073196672)*x_ref[1]**(o-1)+(-0.858184573568)
-        ref[0,1,1,2]=o*(-0.324909144593)*x_ref[2]**(o-1)+(-0.89624674398)
-        ref[1,0,0,0]=o*(0.582390600104)*x_ref[0]**(o-1)+(-0.808724939916)
-        ref[1,0,0,1]=o*(-0.204186916478)*x_ref[1]**(o-1)+(0.63212764696)
-        ref[1,0,0,2]=o*(-0.272947627588)*x_ref[2]**(o-1)+(-0.133369751815)
-        ref[1,0,1,0]=o*(-0.955892141909)*x_ref[0]**(o-1)+(0.915832405494)
-        ref[1,0,1,1]=o*(-0.823428836636)*x_ref[1]**(o-1)+(-0.527176552593)
-        ref[1,0,1,2]=o*(-0.439872810771)*x_ref[2]**(o-1)+(0.282431362763)
-        ref[1,1,0,0]=o*(0.269192050139)*x_ref[0]**(o-1)+(0.304289733459)
-        ref[1,1,0,1]=o*(-0.252137123064)*x_ref[1]**(o-1)+(0.159346881758)
-        ref[1,1,0,2]=o*(-0.875713938743)*x_ref[2]**(o-1)+(-0.804681982204)
-        ref[1,1,1,0]=o*(0.100159906585)*x_ref[0]**(o-1)+(0.652670710888)
-        ref[1,1,1,1]=o*(-0.0471177296503)*x_ref[1]**(o-1)+(0.15344212377)
-        ref[1,1,1,2]=o*(0.162356023341)*x_ref[2]**(o-1)+(0.242855769737)
-        ref[2,0,0,0]=o*(-0.0214334988311)*x_ref[0]**(o-1)+(0.444654672491)
-        ref[2,0,0,1]=o*(0.235478960156)*x_ref[1]**(o-1)+(0.62191559883)
-        ref[2,0,0,2]=o*(0.124531773653)*x_ref[2]**(o-1)+(-0.603748942811)
-        ref[2,0,1,0]=o*(-0.00696114124898)*x_ref[0]**(o-1)+(-0.350635993795)
-        ref[2,0,1,1]=o*(0.766513244466)*x_ref[1]**(o-1)+(-0.99996024111)
-        ref[2,0,1,2]=o*(0.976036637033)*x_ref[2]**(o-1)+(0.00703160282837)
-        ref[2,1,0,0]=o*(-0.210499708873)*x_ref[0]**(o-1)+(-0.763641982769)
-        ref[2,1,0,1]=o*(0.435435481771)*x_ref[1]**(o-1)+(0.0886400511888)
-        ref[2,1,0,2]=o*(0.540913993886)*x_ref[2]**(o-1)+(-0.864904989707)
-        ref[2,1,1,0]=o*(0.609017357846)*x_ref[0]**(o-1)+(-0.681305727596)
-        ref[2,1,1,1]=o*(-0.291763309802)*x_ref[1]**(o-1)+(0.12465245807)
-        ref[2,1,1,2]=o*(-0.265362499082)*x_ref[2]**(o-1)+(-0.978509447338)
-        ref[3,0,0,0]=o*(0.622861389608)*x_ref[0]**(o-1)+(-0.341108338962)
-        ref[3,0,0,1]=o*(0.908588438318)*x_ref[1]**(o-1)+(-0.583012719535)
-        ref[3,0,0,2]=o*(0.33513654797)*x_ref[2]**(o-1)+(-0.835513934636)
-        ref[3,0,1,0]=o*(0.164841305439)*x_ref[0]**(o-1)+(-0.622242302911)
-        ref[3,0,1,1]=o*(-0.0469305037163)*x_ref[1]**(o-1)+(-0.859517953063)
-        ref[3,0,1,2]=o*(-0.112485630662)*x_ref[2]**(o-1)+(0.31475831421)
-        ref[3,1,0,0]=o*(-0.177913851996)*x_ref[0]**(o-1)+(0.74607750787)
-        ref[3,1,0,1]=o*(-0.188838634745)*x_ref[1]**(o-1)+(-0.803617744529)
-        ref[3,1,0,2]=o*(0.18839438068)*x_ref[2]**(o-1)+(-0.857696671728)
-        ref[3,1,1,0]=o*(0.485172697497)*x_ref[0]**(o-1)+(-0.554750723313)
-        ref[3,1,1,1]=o*(-0.59838039994)*x_ref[1]**(o-1)+(-0.83177053032)
-        ref[3,1,1,2]=o*(0.655490277067)*x_ref[2]**(o-1)+(0.0645924856059)
-        ref[4,0,0,0]=o*(0.900678166492)*x_ref[0]**(o-1)+(-0.485573346705)
-        ref[4,0,0,1]=o*(0.0108149783491)*x_ref[1]**(o-1)+(0.982616024342)
-        ref[4,0,0,2]=o*(-0.374371784319)*x_ref[2]**(o-1)+(-0.825014166204)
-        ref[4,0,1,0]=o*(0.682753472393)*x_ref[0]**(o-1)+(0.810927347906)
-        ref[4,0,1,1]=o*(-0.128780174224)*x_ref[1]**(o-1)+(0.514607304836)
-        ref[4,0,1,2]=o*(0.606285011416)*x_ref[2]**(o-1)+(-0.691191486471)
-        ref[4,1,0,0]=o*(0.0103661338625)*x_ref[0]**(o-1)+(0.184111752707)
-        ref[4,1,0,1]=o*(-0.270751890504)*x_ref[1]**(o-1)+(0.207351712222)
-        ref[4,1,0,2]=o*(-0.366280871535)*x_ref[2]**(o-1)+(-0.638450092731)
-        ref[4,1,1,0]=o*(-0.111302974207)*x_ref[0]**(o-1)+(-0.520252159917)
-        ref[4,1,1,1]=o*(-0.911197545741)*x_ref[1]**(o-1)+(-0.779732160528)
-        ref[4,1,1,2]=o*(-0.443379349795)*x_ref[2]**(o-1)+(-0.783540988384)
-        ref[5,0,0,0]=o*(0.319701766792)*x_ref[0]**(o-1)+(-0.953929305858)
-        ref[5,0,0,1]=o*(-0.783942145061)*x_ref[1]**(o-1)+(0.687992583635)
-        ref[5,0,0,2]=o*(0.873868267323)*x_ref[2]**(o-1)+(-0.204836707955)
-        ref[5,0,1,0]=o*(-0.240340717622)*x_ref[0]**(o-1)+(-0.799598459684)
-        ref[5,0,1,1]=o*(-0.827096078861)*x_ref[1]**(o-1)+(0.229071234102)
-        ref[5,0,1,2]=o*(0.309197705487)*x_ref[2]**(o-1)+(-0.286088934882)
-        ref[5,1,0,0]=o*(-0.0926450319507)*x_ref[0]**(o-1)+(0.638985747884)
-        ref[5,1,0,1]=o*(0.604913216138)*x_ref[1]**(o-1)+(-0.364251815312)
-        ref[5,1,0,2]=o*(-0.47971664069)*x_ref[2]**(o-1)+(-0.20655528518)
-        ref[5,1,1,0]=o*(0.418341452333)*x_ref[0]**(o-1)+(0.430002851684)
-        ref[5,1,1,1]=o*(0.624025385599)*x_ref[1]**(o-1)+(0.338601201629)
-        ref[5,1,1,2]=o*(0.0900364406242)*x_ref[2]**(o-1)+(0.193533337073)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.828412007781)*x[0]**o+(0.392494008682)*x[0]+(0.424780018344)*x[1]**o+(-0.75790685259)*x[1]
-        ref[0]=o*(0.828412007781)*x_ref[0]**(o-1)+(0.392494008682)
-        ref[1]=o*(0.424780018344)*x_ref[1]**(o-1)+(-0.75790685259)
-      else:
-        arg=(0.0243949626425)*x[0]**o+(0.99040714323)*x[0]+(0.455478130443)*x[1]**o+(-0.917504050554)*x[1]+(-0.642882027126)*x[2]**o+(-0.0751962677977)*x[2]
-        ref[0]=o*(0.0243949626425)*x_ref[0]**(o-1)+(0.99040714323)
-        ref[1]=o*(0.455478130443)*x_ref[1]**(o-1)+(-0.917504050554)
-        ref[2]=o*(-0.642882027126)*x_ref[2]**(o-1)+(-0.0751962677977)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.107613645086)*x[0]**o+(-0.942156383662)*x[0]+(0.294425370324)*x[1]**o+(-0.177019031098)*x[1]
-        arg[1]=(-0.120283674295)*x[0]**o+(-0.0644985036825)*x[0]+(-0.818412208612)*x[1]**o+(-0.375335380433)*x[1]
-        ref[0,0]=o*(-0.107613645086)*x_ref[0]**(o-1)+(-0.942156383662)
-        ref[0,1]=o*(0.294425370324)*x_ref[1]**(o-1)+(-0.177019031098)
-        ref[1,0]=o*(-0.120283674295)*x_ref[0]**(o-1)+(-0.0644985036825)
-        ref[1,1]=o*(-0.818412208612)*x_ref[1]**(o-1)+(-0.375335380433)
-      else:
-        arg[0]=(-0.888739890088)*x[0]**o+(0.874877363684)*x[0]+(-0.104101311962)*x[1]**o+(-0.124590333446)*x[1]+(-0.311645832684)*x[2]**o+(-0.249470325769)*x[2]
-        arg[1]=(0.680288601947)*x[0]**o+(0.0595361804285)*x[0]+(-0.477099840976)*x[1]**o+(-0.695340106154)*x[1]+(-0.371044873416)*x[2]**o+(-0.442877128189)*x[2]
-        ref[0,0]=o*(-0.888739890088)*x_ref[0]**(o-1)+(0.874877363684)
-        ref[0,1]=o*(-0.104101311962)*x_ref[1]**(o-1)+(-0.124590333446)
-        ref[0,2]=o*(-0.311645832684)*x_ref[2]**(o-1)+(-0.249470325769)
-        ref[1,0]=o*(0.680288601947)*x_ref[0]**(o-1)+(0.0595361804285)
-        ref[1,1]=o*(-0.477099840976)*x_ref[1]**(o-1)+(-0.695340106154)
-        ref[1,2]=o*(-0.371044873416)*x_ref[2]**(o-1)+(-0.442877128189)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0237486351119)*x[0]**o+(0.751375149587)*x[0]+(0.0776560601509)*x[1]**o+(-0.363340006998)*x[1]
-        arg[0,1]=(0.129612138219)*x[0]**o+(0.377878821946)*x[0]+(0.166470268672)*x[1]**o+(-0.0442064974104)*x[1]
-        arg[0,2]=(0.692350462477)*x[0]**o+(-0.439155965586)*x[0]+(0.655583353562)*x[1]**o+(0.3753639938)*x[1]
-        arg[0,3]=(-0.909698820615)*x[0]**o+(0.382887632024)*x[0]+(-0.108821308794)*x[1]**o+(0.330111344773)*x[1]
-        arg[0,4]=(-0.694552793316)*x[0]**o+(-0.38920298235)*x[0]+(0.174040833682)*x[1]**o+(-0.41756882346)*x[1]
-        arg[1,0]=(-0.194901264915)*x[0]**o+(-0.325546767846)*x[0]+(0.507614203136)*x[1]**o+(-0.964255763976)*x[1]
-        arg[1,1]=(-0.634480793567)*x[0]**o+(0.787029027123)*x[0]+(-0.067769912764)*x[1]**o+(0.439969554037)*x[1]
-        arg[1,2]=(-0.59461925815)*x[0]**o+(-0.799215148911)*x[0]+(-0.286848861016)*x[1]**o+(-0.0274325066994)*x[1]
-        arg[1,3]=(0.564664310607)*x[0]**o+(-0.00188717695265)*x[0]+(0.984042638249)*x[1]**o+(-0.524339915306)*x[1]
-        arg[1,4]=(-0.673190201485)*x[0]**o+(0.149574403846)*x[0]+(0.667179612419)*x[1]**o+(-0.279377079395)*x[1]
-        arg[2,0]=(0.270490028978)*x[0]**o+(0.498901404478)*x[0]+(0.485707956493)*x[1]**o+(-0.340861889384)*x[1]
-        arg[2,1]=(-0.785952730285)*x[0]**o+(0.514446635701)*x[0]+(0.925557655147)*x[1]**o+(0.616971745561)*x[1]
-        arg[2,2]=(0.788196502068)*x[0]**o+(0.651461860731)*x[0]+(0.160564742956)*x[1]**o+(-0.681831134057)*x[1]
-        arg[2,3]=(0.892258488111)*x[0]**o+(0.752252063583)*x[0]+(0.853514779349)*x[1]**o+(-0.181884189513)*x[1]
-        arg[2,4]=(-0.824886296933)*x[0]**o+(0.211931432354)*x[0]+(0.924362197939)*x[1]**o+(0.036482432278)*x[1]
-        arg[3,0]=(-0.0616004277583)*x[0]**o+(-0.77338193907)*x[0]+(-0.966899521855)*x[1]**o+(-0.395764830291)*x[1]
-        arg[3,1]=(-0.607976110595)*x[0]**o+(-0.448875768616)*x[0]+(-0.414034580078)*x[1]**o+(0.185483819416)*x[1]
-        arg[3,2]=(-0.918071244524)*x[0]**o+(0.924225885038)*x[0]+(0.418000509852)*x[1]**o+(0.431330768344)*x[1]
-        arg[3,3]=(0.897504318738)*x[0]**o+(0.66265738089)*x[0]+(0.720830604485)*x[1]**o+(-0.713433930025)*x[1]
-        arg[3,4]=(0.526823069245)*x[0]**o+(-0.255965317744)*x[0]+(-0.326371546564)*x[1]**o+(-0.436881501009)*x[1]
-        ref[0,0,0]=o*(0.0237486351119)*x_ref[0]**(o-1)+(0.751375149587)
-        ref[0,0,1]=o*(0.0776560601509)*x_ref[1]**(o-1)+(-0.363340006998)
-        ref[0,1,0]=o*(0.129612138219)*x_ref[0]**(o-1)+(0.377878821946)
-        ref[0,1,1]=o*(0.166470268672)*x_ref[1]**(o-1)+(-0.0442064974104)
-        ref[0,2,0]=o*(0.692350462477)*x_ref[0]**(o-1)+(-0.439155965586)
-        ref[0,2,1]=o*(0.655583353562)*x_ref[1]**(o-1)+(0.3753639938)
-        ref[0,3,0]=o*(-0.909698820615)*x_ref[0]**(o-1)+(0.382887632024)
-        ref[0,3,1]=o*(-0.108821308794)*x_ref[1]**(o-1)+(0.330111344773)
-        ref[0,4,0]=o*(-0.694552793316)*x_ref[0]**(o-1)+(-0.38920298235)
-        ref[0,4,1]=o*(0.174040833682)*x_ref[1]**(o-1)+(-0.41756882346)
-        ref[1,0,0]=o*(-0.194901264915)*x_ref[0]**(o-1)+(-0.325546767846)
-        ref[1,0,1]=o*(0.507614203136)*x_ref[1]**(o-1)+(-0.964255763976)
-        ref[1,1,0]=o*(-0.634480793567)*x_ref[0]**(o-1)+(0.787029027123)
-        ref[1,1,1]=o*(-0.067769912764)*x_ref[1]**(o-1)+(0.439969554037)
-        ref[1,2,0]=o*(-0.59461925815)*x_ref[0]**(o-1)+(-0.799215148911)
-        ref[1,2,1]=o*(-0.286848861016)*x_ref[1]**(o-1)+(-0.0274325066994)
-        ref[1,3,0]=o*(0.564664310607)*x_ref[0]**(o-1)+(-0.00188717695265)
-        ref[1,3,1]=o*(0.984042638249)*x_ref[1]**(o-1)+(-0.524339915306)
-        ref[1,4,0]=o*(-0.673190201485)*x_ref[0]**(o-1)+(0.149574403846)
-        ref[1,4,1]=o*(0.667179612419)*x_ref[1]**(o-1)+(-0.279377079395)
-        ref[2,0,0]=o*(0.270490028978)*x_ref[0]**(o-1)+(0.498901404478)
-        ref[2,0,1]=o*(0.485707956493)*x_ref[1]**(o-1)+(-0.340861889384)
-        ref[2,1,0]=o*(-0.785952730285)*x_ref[0]**(o-1)+(0.514446635701)
-        ref[2,1,1]=o*(0.925557655147)*x_ref[1]**(o-1)+(0.616971745561)
-        ref[2,2,0]=o*(0.788196502068)*x_ref[0]**(o-1)+(0.651461860731)
-        ref[2,2,1]=o*(0.160564742956)*x_ref[1]**(o-1)+(-0.681831134057)
-        ref[2,3,0]=o*(0.892258488111)*x_ref[0]**(o-1)+(0.752252063583)
-        ref[2,3,1]=o*(0.853514779349)*x_ref[1]**(o-1)+(-0.181884189513)
-        ref[2,4,0]=o*(-0.824886296933)*x_ref[0]**(o-1)+(0.211931432354)
-        ref[2,4,1]=o*(0.924362197939)*x_ref[1]**(o-1)+(0.036482432278)
-        ref[3,0,0]=o*(-0.0616004277583)*x_ref[0]**(o-1)+(-0.77338193907)
-        ref[3,0,1]=o*(-0.966899521855)*x_ref[1]**(o-1)+(-0.395764830291)
-        ref[3,1,0]=o*(-0.607976110595)*x_ref[0]**(o-1)+(-0.448875768616)
-        ref[3,1,1]=o*(-0.414034580078)*x_ref[1]**(o-1)+(0.185483819416)
-        ref[3,2,0]=o*(-0.918071244524)*x_ref[0]**(o-1)+(0.924225885038)
-        ref[3,2,1]=o*(0.418000509852)*x_ref[1]**(o-1)+(0.431330768344)
-        ref[3,3,0]=o*(0.897504318738)*x_ref[0]**(o-1)+(0.66265738089)
-        ref[3,3,1]=o*(0.720830604485)*x_ref[1]**(o-1)+(-0.713433930025)
-        ref[3,4,0]=o*(0.526823069245)*x_ref[0]**(o-1)+(-0.255965317744)
-        ref[3,4,1]=o*(-0.326371546564)*x_ref[1]**(o-1)+(-0.436881501009)
-      else:
-        arg[0,0]=(-0.66471814098)*x[0]**o+(0.417241001417)*x[0]+(-0.228677853733)*x[1]**o+(-0.706946716128)*x[1]+(0.977168565988)*x[2]**o+(-0.0293128613918)*x[2]
-        arg[0,1]=(-0.161577085067)*x[0]**o+(0.86957667281)*x[0]+(-0.246783815579)*x[1]**o+(0.495318651008)*x[1]+(-0.500962203485)*x[2]**o+(0.903521194042)*x[2]
-        arg[0,2]=(0.0764824142976)*x[0]**o+(-0.0831710166954)*x[0]+(0.538063052387)*x[1]**o+(0.472451075914)*x[1]+(-0.354702552367)*x[2]**o+(-0.820126246007)*x[2]
-        arg[0,3]=(-0.286219487301)*x[0]**o+(0.561959250696)*x[0]+(-0.65668352495)*x[1]**o+(-0.276560290133)*x[1]+(-0.500866980002)*x[2]**o+(0.71188245613)*x[2]
-        arg[0,4]=(-0.13704169085)*x[0]**o+(0.107954139186)*x[0]+(0.498233399424)*x[1]**o+(-0.201539549426)*x[1]+(-0.889578977028)*x[2]**o+(0.33670078332)*x[2]
-        arg[1,0]=(0.411075168668)*x[0]**o+(-0.982783292982)*x[0]+(0.919652087888)*x[1]**o+(0.657917523808)*x[1]+(-0.220747064163)*x[2]**o+(-0.65863499098)*x[2]
-        arg[1,1]=(0.978122893048)*x[0]**o+(-0.638310308996)*x[0]+(-0.182955841813)*x[1]**o+(0.386322350256)*x[1]+(0.0238129376001)*x[2]**o+(0.415141411589)*x[2]
-        arg[1,2]=(-0.410102590894)*x[0]**o+(-0.0527422034609)*x[0]+(0.218532590216)*x[1]**o+(0.338645963161)*x[1]+(-0.559262295901)*x[2]**o+(0.00154425206109)*x[2]
-        arg[1,3]=(-0.509603507286)*x[0]**o+(0.220014659177)*x[0]+(-0.850244819031)*x[1]**o+(0.851103142912)*x[1]+(0.485740207202)*x[2]**o+(0.625073715619)*x[2]
-        arg[1,4]=(-0.990056784415)*x[0]**o+(0.822920800823)*x[0]+(-0.310061384265)*x[1]**o+(-0.337394401914)*x[1]+(0.139776472055)*x[2]**o+(0.615477120599)*x[2]
-        arg[2,0]=(0.434733128443)*x[0]**o+(-0.23992608444)*x[0]+(0.532847685888)*x[1]**o+(0.641963266518)*x[1]+(-0.421857805771)*x[2]**o+(0.385408885641)*x[2]
-        arg[2,1]=(0.502146118236)*x[0]**o+(-0.476835388064)*x[0]+(-0.676891574566)*x[1]**o+(0.713401740075)*x[1]+(0.220183315534)*x[2]**o+(-0.863327755288)*x[2]
-        arg[2,2]=(-0.694614904655)*x[0]**o+(-0.881664834998)*x[0]+(0.318605270866)*x[1]**o+(0.55884249433)*x[1]+(0.286031997395)*x[2]**o+(-0.947477517785)*x[2]
-        arg[2,3]=(-0.046201338948)*x[0]**o+(-0.316456331808)*x[0]+(0.968975602807)*x[1]**o+(0.549024517551)*x[1]+(-0.473260734234)*x[2]**o+(0.889462696171)*x[2]
-        arg[2,4]=(0.316754513953)*x[0]**o+(0.43553288512)*x[0]+(0.962932728727)*x[1]**o+(0.887900662435)*x[1]+(-0.235820939423)*x[2]**o+(0.947057541177)*x[2]
-        arg[3,0]=(-0.835914763446)*x[0]**o+(-0.488811438785)*x[0]+(-0.573283060197)*x[1]**o+(0.963078263225)*x[1]+(0.601345307969)*x[2]**o+(-0.185658285596)*x[2]
-        arg[3,1]=(0.597606596118)*x[0]**o+(0.0839878651552)*x[0]+(0.0836232765815)*x[1]**o+(0.594866612681)*x[1]+(-0.361174348867)*x[2]**o+(0.701364726038)*x[2]
-        arg[3,2]=(-0.172328462662)*x[0]**o+(-0.856154059105)*x[0]+(0.533657669403)*x[1]**o+(-0.305657234912)*x[1]+(0.828787414246)*x[2]**o+(0.993286809537)*x[2]
-        arg[3,3]=(0.181845363409)*x[0]**o+(0.184210025662)*x[0]+(-0.538269933964)*x[1]**o+(0.731384195858)*x[1]+(0.900272670238)*x[2]**o+(-0.152731605913)*x[2]
-        arg[3,4]=(0.812640675362)*x[0]**o+(-0.330495179989)*x[0]+(0.455533774723)*x[1]**o+(0.32100819695)*x[1]+(-0.332730198093)*x[2]**o+(-0.692589097458)*x[2]
-        ref[0,0,0]=o*(-0.66471814098)*x_ref[0]**(o-1)+(0.417241001417)
-        ref[0,0,1]=o*(-0.228677853733)*x_ref[1]**(o-1)+(-0.706946716128)
-        ref[0,0,2]=o*(0.977168565988)*x_ref[2]**(o-1)+(-0.0293128613918)
-        ref[0,1,0]=o*(-0.161577085067)*x_ref[0]**(o-1)+(0.86957667281)
-        ref[0,1,1]=o*(-0.246783815579)*x_ref[1]**(o-1)+(0.495318651008)
-        ref[0,1,2]=o*(-0.500962203485)*x_ref[2]**(o-1)+(0.903521194042)
-        ref[0,2,0]=o*(0.0764824142976)*x_ref[0]**(o-1)+(-0.0831710166954)
-        ref[0,2,1]=o*(0.538063052387)*x_ref[1]**(o-1)+(0.472451075914)
-        ref[0,2,2]=o*(-0.354702552367)*x_ref[2]**(o-1)+(-0.820126246007)
-        ref[0,3,0]=o*(-0.286219487301)*x_ref[0]**(o-1)+(0.561959250696)
-        ref[0,3,1]=o*(-0.65668352495)*x_ref[1]**(o-1)+(-0.276560290133)
-        ref[0,3,2]=o*(-0.500866980002)*x_ref[2]**(o-1)+(0.71188245613)
-        ref[0,4,0]=o*(-0.13704169085)*x_ref[0]**(o-1)+(0.107954139186)
-        ref[0,4,1]=o*(0.498233399424)*x_ref[1]**(o-1)+(-0.201539549426)
-        ref[0,4,2]=o*(-0.889578977028)*x_ref[2]**(o-1)+(0.33670078332)
-        ref[1,0,0]=o*(0.411075168668)*x_ref[0]**(o-1)+(-0.982783292982)
-        ref[1,0,1]=o*(0.919652087888)*x_ref[1]**(o-1)+(0.657917523808)
-        ref[1,0,2]=o*(-0.220747064163)*x_ref[2]**(o-1)+(-0.65863499098)
-        ref[1,1,0]=o*(0.978122893048)*x_ref[0]**(o-1)+(-0.638310308996)
-        ref[1,1,1]=o*(-0.182955841813)*x_ref[1]**(o-1)+(0.386322350256)
-        ref[1,1,2]=o*(0.0238129376001)*x_ref[2]**(o-1)+(0.415141411589)
-        ref[1,2,0]=o*(-0.410102590894)*x_ref[0]**(o-1)+(-0.0527422034609)
-        ref[1,2,1]=o*(0.218532590216)*x_ref[1]**(o-1)+(0.338645963161)
-        ref[1,2,2]=o*(-0.559262295901)*x_ref[2]**(o-1)+(0.00154425206109)
-        ref[1,3,0]=o*(-0.509603507286)*x_ref[0]**(o-1)+(0.220014659177)
-        ref[1,3,1]=o*(-0.850244819031)*x_ref[1]**(o-1)+(0.851103142912)
-        ref[1,3,2]=o*(0.485740207202)*x_ref[2]**(o-1)+(0.625073715619)
-        ref[1,4,0]=o*(-0.990056784415)*x_ref[0]**(o-1)+(0.822920800823)
-        ref[1,4,1]=o*(-0.310061384265)*x_ref[1]**(o-1)+(-0.337394401914)
-        ref[1,4,2]=o*(0.139776472055)*x_ref[2]**(o-1)+(0.615477120599)
-        ref[2,0,0]=o*(0.434733128443)*x_ref[0]**(o-1)+(-0.23992608444)
-        ref[2,0,1]=o*(0.532847685888)*x_ref[1]**(o-1)+(0.641963266518)
-        ref[2,0,2]=o*(-0.421857805771)*x_ref[2]**(o-1)+(0.385408885641)
-        ref[2,1,0]=o*(0.502146118236)*x_ref[0]**(o-1)+(-0.476835388064)
-        ref[2,1,1]=o*(-0.676891574566)*x_ref[1]**(o-1)+(0.713401740075)
-        ref[2,1,2]=o*(0.220183315534)*x_ref[2]**(o-1)+(-0.863327755288)
-        ref[2,2,0]=o*(-0.694614904655)*x_ref[0]**(o-1)+(-0.881664834998)
-        ref[2,2,1]=o*(0.318605270866)*x_ref[1]**(o-1)+(0.55884249433)
-        ref[2,2,2]=o*(0.286031997395)*x_ref[2]**(o-1)+(-0.947477517785)
-        ref[2,3,0]=o*(-0.046201338948)*x_ref[0]**(o-1)+(-0.316456331808)
-        ref[2,3,1]=o*(0.968975602807)*x_ref[1]**(o-1)+(0.549024517551)
-        ref[2,3,2]=o*(-0.473260734234)*x_ref[2]**(o-1)+(0.889462696171)
-        ref[2,4,0]=o*(0.316754513953)*x_ref[0]**(o-1)+(0.43553288512)
-        ref[2,4,1]=o*(0.962932728727)*x_ref[1]**(o-1)+(0.887900662435)
-        ref[2,4,2]=o*(-0.235820939423)*x_ref[2]**(o-1)+(0.947057541177)
-        ref[3,0,0]=o*(-0.835914763446)*x_ref[0]**(o-1)+(-0.488811438785)
-        ref[3,0,1]=o*(-0.573283060197)*x_ref[1]**(o-1)+(0.963078263225)
-        ref[3,0,2]=o*(0.601345307969)*x_ref[2]**(o-1)+(-0.185658285596)
-        ref[3,1,0]=o*(0.597606596118)*x_ref[0]**(o-1)+(0.0839878651552)
-        ref[3,1,1]=o*(0.0836232765815)*x_ref[1]**(o-1)+(0.594866612681)
-        ref[3,1,2]=o*(-0.361174348867)*x_ref[2]**(o-1)+(0.701364726038)
-        ref[3,2,0]=o*(-0.172328462662)*x_ref[0]**(o-1)+(-0.856154059105)
-        ref[3,2,1]=o*(0.533657669403)*x_ref[1]**(o-1)+(-0.305657234912)
-        ref[3,2,2]=o*(0.828787414246)*x_ref[2]**(o-1)+(0.993286809537)
-        ref[3,3,0]=o*(0.181845363409)*x_ref[0]**(o-1)+(0.184210025662)
-        ref[3,3,1]=o*(-0.538269933964)*x_ref[1]**(o-1)+(0.731384195858)
-        ref[3,3,2]=o*(0.900272670238)*x_ref[2]**(o-1)+(-0.152731605913)
-        ref[3,4,0]=o*(0.812640675362)*x_ref[0]**(o-1)+(-0.330495179989)
-        ref[3,4,1]=o*(0.455533774723)*x_ref[1]**(o-1)+(0.32100819695)
-        ref[3,4,2]=o*(-0.332730198093)*x_ref[2]**(o-1)+(-0.692589097458)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.253396883727)*x[0]**o+(0.491235248599)*x[0]+(-0.468734602938)*x[1]**o+(0.730479725967)*x[1]
-        arg[0,0,1]=(0.344036208598)*x[0]**o+(-0.394302857752)*x[0]+(-0.608765577652)*x[1]**o+(-0.564065946953)*x[1]
-        arg[0,1,0]=(-0.84520693538)*x[0]**o+(0.934285247148)*x[0]+(0.0841237910789)*x[1]**o+(0.455488803423)*x[1]
-        arg[0,1,1]=(0.484027534363)*x[0]**o+(-0.374633264234)*x[0]+(-0.0665482018417)*x[1]**o+(0.528984445833)*x[1]
-        arg[1,0,0]=(-0.470188044426)*x[0]**o+(-0.328178128746)*x[0]+(0.67571857307)*x[1]**o+(0.116985630247)*x[1]
-        arg[1,0,1]=(0.986586449605)*x[0]**o+(-0.25691197068)*x[0]+(0.755235660838)*x[1]**o+(0.211004338524)*x[1]
-        arg[1,1,0]=(-0.569322712396)*x[0]**o+(0.900009729013)*x[0]+(0.748881276361)*x[1]**o+(0.850464087662)*x[1]
-        arg[1,1,1]=(0.625042758036)*x[0]**o+(-0.72757111333)*x[0]+(-0.986053078492)*x[1]**o+(-0.633517003425)*x[1]
-        arg[2,0,0]=(-0.716192724085)*x[0]**o+(-0.23327162426)*x[0]+(0.206440629344)*x[1]**o+(0.816324161671)*x[1]
-        arg[2,0,1]=(-0.803679553386)*x[0]**o+(0.445433027195)*x[0]+(-0.111465589792)*x[1]**o+(-0.109772986088)*x[1]
-        arg[2,1,0]=(0.374386571048)*x[0]**o+(-0.317187375606)*x[0]+(0.133248401591)*x[1]**o+(-0.971347533424)*x[1]
-        arg[2,1,1]=(-0.48476474399)*x[0]**o+(0.979379654323)*x[0]+(0.371437992948)*x[1]**o+(-0.110228097225)*x[1]
-        arg[3,0,0]=(0.37507701433)*x[0]**o+(0.451375135714)*x[0]+(0.228204578568)*x[1]**o+(0.0935454426192)*x[1]
-        arg[3,0,1]=(-0.322375030256)*x[0]**o+(-0.0412650889525)*x[0]+(0.23495348361)*x[1]**o+(-0.704960519241)*x[1]
-        arg[3,1,0]=(-0.478413043796)*x[0]**o+(0.373637701709)*x[0]+(0.346845166424)*x[1]**o+(0.00492075723836)*x[1]
-        arg[3,1,1]=(0.0753795682919)*x[0]**o+(0.51446748543)*x[0]+(-0.337079735899)*x[1]**o+(0.976335320865)*x[1]
-        arg[4,0,0]=(0.173293972121)*x[0]**o+(0.78972296986)*x[0]+(-0.518624390388)*x[1]**o+(-0.587962330417)*x[1]
-        arg[4,0,1]=(0.747393467297)*x[0]**o+(0.940132823774)*x[0]+(-0.292996377712)*x[1]**o+(0.980334604245)*x[1]
-        arg[4,1,0]=(-0.836497499117)*x[0]**o+(0.625161912911)*x[0]+(0.978929091652)*x[1]**o+(-0.676430396031)*x[1]
-        arg[4,1,1]=(-0.195907406253)*x[0]**o+(-0.388427741642)*x[0]+(0.233500679929)*x[1]**o+(0.535047073421)*x[1]
-        arg[5,0,0]=(0.983591245443)*x[0]**o+(-0.356589240979)*x[0]+(0.328974933764)*x[1]**o+(-0.875152262477)*x[1]
-        arg[5,0,1]=(0.901430256705)*x[0]**o+(0.74247442514)*x[0]+(0.189211012786)*x[1]**o+(0.930520401277)*x[1]
-        arg[5,1,0]=(-0.319591878243)*x[0]**o+(0.174836571432)*x[0]+(0.953875085784)*x[1]**o+(-0.51684941838)*x[1]
-        arg[5,1,1]=(-0.916869714992)*x[0]**o+(0.121572609124)*x[0]+(0.791850838139)*x[1]**o+(-0.588663035087)*x[1]
-        ref[0,0,0,0]=o*(0.253396883727)*x_ref[0]**(o-1)+(0.491235248599)
-        ref[0,0,0,1]=o*(-0.468734602938)*x_ref[1]**(o-1)+(0.730479725967)
-        ref[0,0,1,0]=o*(0.344036208598)*x_ref[0]**(o-1)+(-0.394302857752)
-        ref[0,0,1,1]=o*(-0.608765577652)*x_ref[1]**(o-1)+(-0.564065946953)
-        ref[0,1,0,0]=o*(-0.84520693538)*x_ref[0]**(o-1)+(0.934285247148)
-        ref[0,1,0,1]=o*(0.0841237910789)*x_ref[1]**(o-1)+(0.455488803423)
-        ref[0,1,1,0]=o*(0.484027534363)*x_ref[0]**(o-1)+(-0.374633264234)
-        ref[0,1,1,1]=o*(-0.0665482018417)*x_ref[1]**(o-1)+(0.528984445833)
-        ref[1,0,0,0]=o*(-0.470188044426)*x_ref[0]**(o-1)+(-0.328178128746)
-        ref[1,0,0,1]=o*(0.67571857307)*x_ref[1]**(o-1)+(0.116985630247)
-        ref[1,0,1,0]=o*(0.986586449605)*x_ref[0]**(o-1)+(-0.25691197068)
-        ref[1,0,1,1]=o*(0.755235660838)*x_ref[1]**(o-1)+(0.211004338524)
-        ref[1,1,0,0]=o*(-0.569322712396)*x_ref[0]**(o-1)+(0.900009729013)
-        ref[1,1,0,1]=o*(0.748881276361)*x_ref[1]**(o-1)+(0.850464087662)
-        ref[1,1,1,0]=o*(0.625042758036)*x_ref[0]**(o-1)+(-0.72757111333)
-        ref[1,1,1,1]=o*(-0.986053078492)*x_ref[1]**(o-1)+(-0.633517003425)
-        ref[2,0,0,0]=o*(-0.716192724085)*x_ref[0]**(o-1)+(-0.23327162426)
-        ref[2,0,0,1]=o*(0.206440629344)*x_ref[1]**(o-1)+(0.816324161671)
-        ref[2,0,1,0]=o*(-0.803679553386)*x_ref[0]**(o-1)+(0.445433027195)
-        ref[2,0,1,1]=o*(-0.111465589792)*x_ref[1]**(o-1)+(-0.109772986088)
-        ref[2,1,0,0]=o*(0.374386571048)*x_ref[0]**(o-1)+(-0.317187375606)
-        ref[2,1,0,1]=o*(0.133248401591)*x_ref[1]**(o-1)+(-0.971347533424)
-        ref[2,1,1,0]=o*(-0.48476474399)*x_ref[0]**(o-1)+(0.979379654323)
-        ref[2,1,1,1]=o*(0.371437992948)*x_ref[1]**(o-1)+(-0.110228097225)
-        ref[3,0,0,0]=o*(0.37507701433)*x_ref[0]**(o-1)+(0.451375135714)
-        ref[3,0,0,1]=o*(0.228204578568)*x_ref[1]**(o-1)+(0.0935454426192)
-        ref[3,0,1,0]=o*(-0.322375030256)*x_ref[0]**(o-1)+(-0.0412650889525)
-        ref[3,0,1,1]=o*(0.23495348361)*x_ref[1]**(o-1)+(-0.704960519241)
-        ref[3,1,0,0]=o*(-0.478413043796)*x_ref[0]**(o-1)+(0.373637701709)
-        ref[3,1,0,1]=o*(0.346845166424)*x_ref[1]**(o-1)+(0.00492075723836)
-        ref[3,1,1,0]=o*(0.0753795682919)*x_ref[0]**(o-1)+(0.51446748543)
-        ref[3,1,1,1]=o*(-0.337079735899)*x_ref[1]**(o-1)+(0.976335320865)
-        ref[4,0,0,0]=o*(0.173293972121)*x_ref[0]**(o-1)+(0.78972296986)
-        ref[4,0,0,1]=o*(-0.518624390388)*x_ref[1]**(o-1)+(-0.587962330417)
-        ref[4,0,1,0]=o*(0.747393467297)*x_ref[0]**(o-1)+(0.940132823774)
-        ref[4,0,1,1]=o*(-0.292996377712)*x_ref[1]**(o-1)+(0.980334604245)
-        ref[4,1,0,0]=o*(-0.836497499117)*x_ref[0]**(o-1)+(0.625161912911)
-        ref[4,1,0,1]=o*(0.978929091652)*x_ref[1]**(o-1)+(-0.676430396031)
-        ref[4,1,1,0]=o*(-0.195907406253)*x_ref[0]**(o-1)+(-0.388427741642)
-        ref[4,1,1,1]=o*(0.233500679929)*x_ref[1]**(o-1)+(0.535047073421)
-        ref[5,0,0,0]=o*(0.983591245443)*x_ref[0]**(o-1)+(-0.356589240979)
-        ref[5,0,0,1]=o*(0.328974933764)*x_ref[1]**(o-1)+(-0.875152262477)
-        ref[5,0,1,0]=o*(0.901430256705)*x_ref[0]**(o-1)+(0.74247442514)
-        ref[5,0,1,1]=o*(0.189211012786)*x_ref[1]**(o-1)+(0.930520401277)
-        ref[5,1,0,0]=o*(-0.319591878243)*x_ref[0]**(o-1)+(0.174836571432)
-        ref[5,1,0,1]=o*(0.953875085784)*x_ref[1]**(o-1)+(-0.51684941838)
-        ref[5,1,1,0]=o*(-0.916869714992)*x_ref[0]**(o-1)+(0.121572609124)
-        ref[5,1,1,1]=o*(0.791850838139)*x_ref[1]**(o-1)+(-0.588663035087)
-      else:
-        arg[0,0,0]=(-0.513971266383)*x[0]**o+(-0.117127749421)*x[0]+(-0.551292004692)*x[1]**o+(-0.268920693702)*x[1]+(0.0872538366694)*x[2]**o+(0.855491592762)*x[2]
-        arg[0,0,1]=(0.156425207213)*x[0]**o+(-0.299808724719)*x[0]+(0.827383156334)*x[1]**o+(-0.594506082498)*x[1]+(-0.289589281068)*x[2]**o+(0.559159349352)*x[2]
-        arg[0,1,0]=(-0.925822763448)*x[0]**o+(0.518052108584)*x[0]+(-0.774761536373)*x[1]**o+(-0.0329613155479)*x[1]+(0.957805160206)*x[2]**o+(0.0606445544683)*x[2]
-        arg[0,1,1]=(-0.337663244379)*x[0]**o+(-0.634947360886)*x[0]+(0.232117517887)*x[1]**o+(-0.534317817241)*x[1]+(0.554880796818)*x[2]**o+(-0.3101266685)*x[2]
-        arg[1,0,0]=(-0.888548906608)*x[0]**o+(0.517747675888)*x[0]+(-0.614381113253)*x[1]**o+(-0.757891891198)*x[1]+(0.618261909378)*x[2]**o+(-0.0853347346644)*x[2]
-        arg[1,0,1]=(-0.686920109418)*x[0]**o+(0.000673193523604)*x[0]+(0.251800447271)*x[1]**o+(-0.105619412646)*x[1]+(0.00990847148242)*x[2]**o+(0.861798595402)*x[2]
-        arg[1,1,0]=(0.170484209485)*x[0]**o+(-0.620257643847)*x[0]+(0.057743430303)*x[1]**o+(0.0640298192279)*x[1]+(0.0757100493935)*x[2]**o+(-0.414863410391)*x[2]
-        arg[1,1,1]=(-0.714807290039)*x[0]**o+(-0.562420622765)*x[0]+(0.788769732877)*x[1]**o+(-0.472413621829)*x[1]+(-0.466159435785)*x[2]**o+(-0.476510555737)*x[2]
-        arg[2,0,0]=(0.875340499144)*x[0]**o+(-0.598283854175)*x[0]+(0.206593884126)*x[1]**o+(-0.987568956833)*x[1]+(0.666527095968)*x[2]**o+(-0.352753155564)*x[2]
-        arg[2,0,1]=(0.677005187408)*x[0]**o+(0.760176905882)*x[0]+(-0.0863648949101)*x[1]**o+(-0.607384058071)*x[1]+(-0.117434466077)*x[2]**o+(-0.670292588633)*x[2]
-        arg[2,1,0]=(0.888629811684)*x[0]**o+(0.35826389662)*x[0]+(0.00390435387028)*x[1]**o+(-0.0937518531166)*x[1]+(-0.365569888759)*x[2]**o+(0.380035526283)*x[2]
-        arg[2,1,1]=(0.138275666033)*x[0]**o+(-0.437710809963)*x[0]+(0.773451227027)*x[1]**o+(0.834016138485)*x[1]+(0.847339165612)*x[2]**o+(-0.417687340903)*x[2]
-        arg[3,0,0]=(-0.298714836243)*x[0]**o+(-0.268961434956)*x[0]+(0.232096942083)*x[1]**o+(-0.455570990604)*x[1]+(-0.294542554349)*x[2]**o+(-0.37112817156)*x[2]
-        arg[3,0,1]=(0.0903365333358)*x[0]**o+(0.338265717129)*x[0]+(-0.755237281599)*x[1]**o+(-0.608535543682)*x[1]+(0.812136572153)*x[2]**o+(-0.146674314466)*x[2]
-        arg[3,1,0]=(0.159422014459)*x[0]**o+(0.899761817668)*x[0]+(0.467507279621)*x[1]**o+(0.47028740641)*x[1]+(-0.905453092566)*x[2]**o+(0.325443171334)*x[2]
-        arg[3,1,1]=(0.706113787474)*x[0]**o+(0.411358047385)*x[0]+(0.710178001185)*x[1]**o+(-0.248170072927)*x[1]+(0.2228478152)*x[2]**o+(-0.6845238748)*x[2]
-        arg[4,0,0]=(-0.810987300482)*x[0]**o+(-0.20061683347)*x[0]+(-0.362480203096)*x[1]**o+(0.23493442788)*x[1]+(-0.0262576869803)*x[2]**o+(0.40114062378)*x[2]
-        arg[4,0,1]=(-0.0377982138529)*x[0]**o+(-0.844585963856)*x[0]+(-0.94360590097)*x[1]**o+(-0.775666510211)*x[1]+(-0.484314539768)*x[2]**o+(0.472661289406)*x[2]
-        arg[4,1,0]=(0.579937359489)*x[0]**o+(0.384020744083)*x[0]+(-0.303096661906)*x[1]**o+(-0.0640353004314)*x[1]+(0.693425296881)*x[2]**o+(0.410980796125)*x[2]
-        arg[4,1,1]=(0.152139667717)*x[0]**o+(-0.49610371397)*x[0]+(-0.884008900347)*x[1]**o+(-0.364570486388)*x[1]+(0.126918854811)*x[2]**o+(0.409453971802)*x[2]
-        arg[5,0,0]=(0.409834559571)*x[0]**o+(-0.347724104753)*x[0]+(-0.263327417846)*x[1]**o+(0.18147743546)*x[1]+(-0.399848371177)*x[2]**o+(0.928317631431)*x[2]
-        arg[5,0,1]=(-0.686702422025)*x[0]**o+(-0.918530462662)*x[0]+(0.478936304167)*x[1]**o+(-0.641691106861)*x[1]+(-0.582780732375)*x[2]**o+(0.30255037752)*x[2]
-        arg[5,1,0]=(0.50568688101)*x[0]**o+(0.378682510558)*x[0]+(0.59801824354)*x[1]**o+(-0.316028163905)*x[1]+(-0.554966057648)*x[2]**o+(0.637313154931)*x[2]
-        arg[5,1,1]=(0.300318472719)*x[0]**o+(-0.794010312167)*x[0]+(-0.314402790698)*x[1]**o+(0.991870648498)*x[1]+(0.949603731589)*x[2]**o+(-0.302054056398)*x[2]
-        ref[0,0,0,0]=o*(-0.513971266383)*x_ref[0]**(o-1)+(-0.117127749421)
-        ref[0,0,0,1]=o*(-0.551292004692)*x_ref[1]**(o-1)+(-0.268920693702)
-        ref[0,0,0,2]=o*(0.0872538366694)*x_ref[2]**(o-1)+(0.855491592762)
-        ref[0,0,1,0]=o*(0.156425207213)*x_ref[0]**(o-1)+(-0.299808724719)
-        ref[0,0,1,1]=o*(0.827383156334)*x_ref[1]**(o-1)+(-0.594506082498)
-        ref[0,0,1,2]=o*(-0.289589281068)*x_ref[2]**(o-1)+(0.559159349352)
-        ref[0,1,0,0]=o*(-0.925822763448)*x_ref[0]**(o-1)+(0.518052108584)
-        ref[0,1,0,1]=o*(-0.774761536373)*x_ref[1]**(o-1)+(-0.0329613155479)
-        ref[0,1,0,2]=o*(0.957805160206)*x_ref[2]**(o-1)+(0.0606445544683)
-        ref[0,1,1,0]=o*(-0.337663244379)*x_ref[0]**(o-1)+(-0.634947360886)
-        ref[0,1,1,1]=o*(0.232117517887)*x_ref[1]**(o-1)+(-0.534317817241)
-        ref[0,1,1,2]=o*(0.554880796818)*x_ref[2]**(o-1)+(-0.3101266685)
-        ref[1,0,0,0]=o*(-0.888548906608)*x_ref[0]**(o-1)+(0.517747675888)
-        ref[1,0,0,1]=o*(-0.614381113253)*x_ref[1]**(o-1)+(-0.757891891198)
-        ref[1,0,0,2]=o*(0.618261909378)*x_ref[2]**(o-1)+(-0.0853347346644)
-        ref[1,0,1,0]=o*(-0.686920109418)*x_ref[0]**(o-1)+(0.000673193523604)
-        ref[1,0,1,1]=o*(0.251800447271)*x_ref[1]**(o-1)+(-0.105619412646)
-        ref[1,0,1,2]=o*(0.00990847148242)*x_ref[2]**(o-1)+(0.861798595402)
-        ref[1,1,0,0]=o*(0.170484209485)*x_ref[0]**(o-1)+(-0.620257643847)
-        ref[1,1,0,1]=o*(0.057743430303)*x_ref[1]**(o-1)+(0.0640298192279)
-        ref[1,1,0,2]=o*(0.0757100493935)*x_ref[2]**(o-1)+(-0.414863410391)
-        ref[1,1,1,0]=o*(-0.714807290039)*x_ref[0]**(o-1)+(-0.562420622765)
-        ref[1,1,1,1]=o*(0.788769732877)*x_ref[1]**(o-1)+(-0.472413621829)
-        ref[1,1,1,2]=o*(-0.466159435785)*x_ref[2]**(o-1)+(-0.476510555737)
-        ref[2,0,0,0]=o*(0.875340499144)*x_ref[0]**(o-1)+(-0.598283854175)
-        ref[2,0,0,1]=o*(0.206593884126)*x_ref[1]**(o-1)+(-0.987568956833)
-        ref[2,0,0,2]=o*(0.666527095968)*x_ref[2]**(o-1)+(-0.352753155564)
-        ref[2,0,1,0]=o*(0.677005187408)*x_ref[0]**(o-1)+(0.760176905882)
-        ref[2,0,1,1]=o*(-0.0863648949101)*x_ref[1]**(o-1)+(-0.607384058071)
-        ref[2,0,1,2]=o*(-0.117434466077)*x_ref[2]**(o-1)+(-0.670292588633)
-        ref[2,1,0,0]=o*(0.888629811684)*x_ref[0]**(o-1)+(0.35826389662)
-        ref[2,1,0,1]=o*(0.00390435387028)*x_ref[1]**(o-1)+(-0.0937518531166)
-        ref[2,1,0,2]=o*(-0.365569888759)*x_ref[2]**(o-1)+(0.380035526283)
-        ref[2,1,1,0]=o*(0.138275666033)*x_ref[0]**(o-1)+(-0.437710809963)
-        ref[2,1,1,1]=o*(0.773451227027)*x_ref[1]**(o-1)+(0.834016138485)
-        ref[2,1,1,2]=o*(0.847339165612)*x_ref[2]**(o-1)+(-0.417687340903)
-        ref[3,0,0,0]=o*(-0.298714836243)*x_ref[0]**(o-1)+(-0.268961434956)
-        ref[3,0,0,1]=o*(0.232096942083)*x_ref[1]**(o-1)+(-0.455570990604)
-        ref[3,0,0,2]=o*(-0.294542554349)*x_ref[2]**(o-1)+(-0.37112817156)
-        ref[3,0,1,0]=o*(0.0903365333358)*x_ref[0]**(o-1)+(0.338265717129)
-        ref[3,0,1,1]=o*(-0.755237281599)*x_ref[1]**(o-1)+(-0.608535543682)
-        ref[3,0,1,2]=o*(0.812136572153)*x_ref[2]**(o-1)+(-0.146674314466)
-        ref[3,1,0,0]=o*(0.159422014459)*x_ref[0]**(o-1)+(0.899761817668)
-        ref[3,1,0,1]=o*(0.467507279621)*x_ref[1]**(o-1)+(0.47028740641)
-        ref[3,1,0,2]=o*(-0.905453092566)*x_ref[2]**(o-1)+(0.325443171334)
-        ref[3,1,1,0]=o*(0.706113787474)*x_ref[0]**(o-1)+(0.411358047385)
-        ref[3,1,1,1]=o*(0.710178001185)*x_ref[1]**(o-1)+(-0.248170072927)
-        ref[3,1,1,2]=o*(0.2228478152)*x_ref[2]**(o-1)+(-0.6845238748)
-        ref[4,0,0,0]=o*(-0.810987300482)*x_ref[0]**(o-1)+(-0.20061683347)
-        ref[4,0,0,1]=o*(-0.362480203096)*x_ref[1]**(o-1)+(0.23493442788)
-        ref[4,0,0,2]=o*(-0.0262576869803)*x_ref[2]**(o-1)+(0.40114062378)
-        ref[4,0,1,0]=o*(-0.0377982138529)*x_ref[0]**(o-1)+(-0.844585963856)
-        ref[4,0,1,1]=o*(-0.94360590097)*x_ref[1]**(o-1)+(-0.775666510211)
-        ref[4,0,1,2]=o*(-0.484314539768)*x_ref[2]**(o-1)+(0.472661289406)
-        ref[4,1,0,0]=o*(0.579937359489)*x_ref[0]**(o-1)+(0.384020744083)
-        ref[4,1,0,1]=o*(-0.303096661906)*x_ref[1]**(o-1)+(-0.0640353004314)
-        ref[4,1,0,2]=o*(0.693425296881)*x_ref[2]**(o-1)+(0.410980796125)
-        ref[4,1,1,0]=o*(0.152139667717)*x_ref[0]**(o-1)+(-0.49610371397)
-        ref[4,1,1,1]=o*(-0.884008900347)*x_ref[1]**(o-1)+(-0.364570486388)
-        ref[4,1,1,2]=o*(0.126918854811)*x_ref[2]**(o-1)+(0.409453971802)
-        ref[5,0,0,0]=o*(0.409834559571)*x_ref[0]**(o-1)+(-0.347724104753)
-        ref[5,0,0,1]=o*(-0.263327417846)*x_ref[1]**(o-1)+(0.18147743546)
-        ref[5,0,0,2]=o*(-0.399848371177)*x_ref[2]**(o-1)+(0.928317631431)
-        ref[5,0,1,0]=o*(-0.686702422025)*x_ref[0]**(o-1)+(-0.918530462662)
-        ref[5,0,1,1]=o*(0.478936304167)*x_ref[1]**(o-1)+(-0.641691106861)
-        ref[5,0,1,2]=o*(-0.582780732375)*x_ref[2]**(o-1)+(0.30255037752)
-        ref[5,1,0,0]=o*(0.50568688101)*x_ref[0]**(o-1)+(0.378682510558)
-        ref[5,1,0,1]=o*(0.59801824354)*x_ref[1]**(o-1)+(-0.316028163905)
-        ref[5,1,0,2]=o*(-0.554966057648)*x_ref[2]**(o-1)+(0.637313154931)
-        ref[5,1,1,0]=o*(0.300318472719)*x_ref[0]**(o-1)+(-0.794010312167)
-        ref[5,1,1,1]=o*(-0.314402790698)*x_ref[1]**(o-1)+(0.991870648498)
-        ref[5,1,1,2]=o*(0.949603731589)*x_ref[2]**(o-1)+(-0.302054056398)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.306947418999)*x[0]+(-0.706616694784)*x[1]
-        ref[0]=(0.306947418999)
-        ref[1]=(-0.706616694784)
-      else:
-        arg=(0.490435692707)*x[0]+(0.929248719763)*x[1]+(0.269868131113)*x[2]
-        ref[0]=(0.490435692707)
-        ref[1]=(0.929248719763)
-        ref[2]=(0.269868131113)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.882633673888)*x[0]+(-0.790592442848)*x[1]
-        arg[1]=(1.55495669126)*x[0]+(0.496011926182)*x[1]
-        ref[0,0]=(-0.882633673888)
-        ref[0,1]=(-0.790592442848)
-        ref[1,0]=(1.55495669126)
-        ref[1,1]=(0.496011926182)
-      else:
-        arg[0]=(0.683098278161)*x[0]+(-0.151590511238)*x[1]+(0.54461031868)*x[2]
-        arg[1]=(0.59998040214)*x[0]+(-0.995466442084)*x[1]+(-1.09468062911)*x[2]
-        ref[0,0]=(0.683098278161)
-        ref[0,1]=(-0.151590511238)
-        ref[0,2]=(0.54461031868)
-        ref[1,0]=(0.59998040214)
-        ref[1,1]=(-0.995466442084)
-        ref[1,2]=(-1.09468062911)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.159129528541)*x[0]+(0.107835972384)*x[1]
-        arg[0,1]=(-1.52388770934)*x[0]+(0.262089610596)*x[1]
-        arg[0,2]=(0.505454501555)*x[0]+(-0.247061440744)*x[1]
-        arg[0,3]=(-0.556075420202)*x[0]+(0.702144110506)*x[1]
-        arg[0,4]=(0.810518335626)*x[0]+(-0.76077949525)*x[1]
-        arg[1,0]=(-0.491052732808)*x[0]+(-0.272913467279)*x[1]
-        arg[1,1]=(0.0141908236388)*x[0]+(1.10868804645)*x[1]
-        arg[1,2]=(0.719028425382)*x[0]+(-0.544780305018)*x[1]
-        arg[1,3]=(-1.15474920716)*x[0]+(0.888461325396)*x[1]
-        arg[1,4]=(-0.842901893766)*x[0]+(-0.465916012282)*x[1]
-        arg[2,0]=(1.24606386746)*x[0]+(0.817235825831)*x[1]
-        arg[2,1]=(0.400861923494)*x[0]+(1.24545704982)*x[1]
-        arg[2,2]=(0.656546253691)*x[0]+(-0.0269228973404)*x[1]
-        arg[2,3]=(-0.590512343874)*x[0]+(-0.0654952556025)*x[1]
-        arg[2,4]=(0.806342618281)*x[0]+(-0.183166204195)*x[1]
-        arg[3,0]=(0.637045776935)*x[0]+(-0.512820906995)*x[1]
-        arg[3,1]=(-0.596216711833)*x[0]+(-0.221853749777)*x[1]
-        arg[3,2]=(0.113235739927)*x[0]+(-0.210641618992)*x[1]
-        arg[3,3]=(-1.11423980423)*x[0]+(-1.46748285012)*x[1]
-        arg[3,4]=(0.573260999643)*x[0]+(0.55016627172)*x[1]
-        ref[0,0,0]=(-0.159129528541)
-        ref[0,0,1]=(0.107835972384)
-        ref[0,1,0]=(-1.52388770934)
-        ref[0,1,1]=(0.262089610596)
-        ref[0,2,0]=(0.505454501555)
-        ref[0,2,1]=(-0.247061440744)
-        ref[0,3,0]=(-0.556075420202)
-        ref[0,3,1]=(0.702144110506)
-        ref[0,4,0]=(0.810518335626)
-        ref[0,4,1]=(-0.76077949525)
-        ref[1,0,0]=(-0.491052732808)
-        ref[1,0,1]=(-0.272913467279)
-        ref[1,1,0]=(0.0141908236388)
-        ref[1,1,1]=(1.10868804645)
-        ref[1,2,0]=(0.719028425382)
-        ref[1,2,1]=(-0.544780305018)
-        ref[1,3,0]=(-1.15474920716)
-        ref[1,3,1]=(0.888461325396)
-        ref[1,4,0]=(-0.842901893766)
-        ref[1,4,1]=(-0.465916012282)
-        ref[2,0,0]=(1.24606386746)
-        ref[2,0,1]=(0.817235825831)
-        ref[2,1,0]=(0.400861923494)
-        ref[2,1,1]=(1.24545704982)
-        ref[2,2,0]=(0.656546253691)
-        ref[2,2,1]=(-0.0269228973404)
-        ref[2,3,0]=(-0.590512343874)
-        ref[2,3,1]=(-0.0654952556025)
-        ref[2,4,0]=(0.806342618281)
-        ref[2,4,1]=(-0.183166204195)
-        ref[3,0,0]=(0.637045776935)
-        ref[3,0,1]=(-0.512820906995)
-        ref[3,1,0]=(-0.596216711833)
-        ref[3,1,1]=(-0.221853749777)
-        ref[3,2,0]=(0.113235739927)
-        ref[3,2,1]=(-0.210641618992)
-        ref[3,3,0]=(-1.11423980423)
-        ref[3,3,1]=(-1.46748285012)
-        ref[3,4,0]=(0.573260999643)
-        ref[3,4,1]=(0.55016627172)
-      else:
-        arg[0,0]=(-0.025505130975)*x[0]+(-0.128352022583)*x[1]+(-0.0645809876948)*x[2]
-        arg[0,1]=(-0.974556985555)*x[0]+(0.503751568036)*x[1]+(-0.524784840232)*x[2]
-        arg[0,2]=(-1.23653778531)*x[0]+(-0.73883453445)*x[1]+(-1.59259101746)*x[2]
-        arg[0,3]=(-0.543656268618)*x[0]+(0.110486603472)*x[1]+(-0.636246757745)*x[2]
-        arg[0,4]=(-0.566088225133)*x[0]+(-0.272577812471)*x[1]+(-0.282075405014)*x[2]
-        arg[1,0]=(-0.28252305722)*x[0]+(0.497103425073)*x[1]+(0.997942367464)*x[2]
-        arg[1,1]=(-0.444059543356)*x[0]+(-0.149004039444)*x[1]+(-0.871853047384)*x[2]
-        arg[1,2]=(-0.610830496789)*x[0]+(0.196494475826)*x[1]+(0.0123852343883)*x[2]
-        arg[1,3]=(-0.327903465165)*x[0]+(0.523560519595)*x[1]+(-0.409961704581)*x[2]
-        arg[1,4]=(0.633897214746)*x[0]+(-0.9032002551)*x[1]+(0.624042996391)*x[2]
-        arg[2,0]=(0.469489049636)*x[0]+(1.46158418286)*x[1]+(-0.538453674545)*x[2]
-        arg[2,1]=(0.0488906165423)*x[0]+(0.483867458959)*x[1]+(0.0419643463366)*x[2]
-        arg[2,2]=(-1.89716754038)*x[0]+(-0.577554008519)*x[1]+(-0.0328835832126)*x[2]
-        arg[2,3]=(0.507329501469)*x[0]+(0.354939444351)*x[1]+(0.0136766029313)*x[2]
-        arg[2,4]=(-0.313182267444)*x[0]+(-1.08684309178)*x[1]+(-1.39365968958)*x[2]
-        arg[3,0]=(0.272322829309)*x[0]+(-0.233645276231)*x[1]+(0.491500838791)*x[2]
-        arg[3,1]=(1.27603407856)*x[0]+(-0.709429989875)*x[1]+(-0.998371438244)*x[2]
-        arg[3,2]=(0.637972716248)*x[0]+(-1.37896009762)*x[1]+(0.496830616786)*x[2]
-        arg[3,3]=(-1.67735443481)*x[0]+(-0.741884420811)*x[1]+(1.23125805904)*x[2]
-        arg[3,4]=(-0.593290763881)*x[0]+(-0.881909104701)*x[1]+(-1.0425499934)*x[2]
-        ref[0,0,0]=(-0.025505130975)
-        ref[0,0,1]=(-0.128352022583)
-        ref[0,0,2]=(-0.0645809876948)
-        ref[0,1,0]=(-0.974556985555)
-        ref[0,1,1]=(0.503751568036)
-        ref[0,1,2]=(-0.524784840232)
-        ref[0,2,0]=(-1.23653778531)
-        ref[0,2,1]=(-0.73883453445)
-        ref[0,2,2]=(-1.59259101746)
-        ref[0,3,0]=(-0.543656268618)
-        ref[0,3,1]=(0.110486603472)
-        ref[0,3,2]=(-0.636246757745)
-        ref[0,4,0]=(-0.566088225133)
-        ref[0,4,1]=(-0.272577812471)
-        ref[0,4,2]=(-0.282075405014)
-        ref[1,0,0]=(-0.28252305722)
-        ref[1,0,1]=(0.497103425073)
-        ref[1,0,2]=(0.997942367464)
-        ref[1,1,0]=(-0.444059543356)
-        ref[1,1,1]=(-0.149004039444)
-        ref[1,1,2]=(-0.871853047384)
-        ref[1,2,0]=(-0.610830496789)
-        ref[1,2,1]=(0.196494475826)
-        ref[1,2,2]=(0.0123852343883)
-        ref[1,3,0]=(-0.327903465165)
-        ref[1,3,1]=(0.523560519595)
-        ref[1,3,2]=(-0.409961704581)
-        ref[1,4,0]=(0.633897214746)
-        ref[1,4,1]=(-0.9032002551)
-        ref[1,4,2]=(0.624042996391)
-        ref[2,0,0]=(0.469489049636)
-        ref[2,0,1]=(1.46158418286)
-        ref[2,0,2]=(-0.538453674545)
-        ref[2,1,0]=(0.0488906165423)
-        ref[2,1,1]=(0.483867458959)
-        ref[2,1,2]=(0.0419643463366)
-        ref[2,2,0]=(-1.89716754038)
-        ref[2,2,1]=(-0.577554008519)
-        ref[2,2,2]=(-0.0328835832126)
-        ref[2,3,0]=(0.507329501469)
-        ref[2,3,1]=(0.354939444351)
-        ref[2,3,2]=(0.0136766029313)
-        ref[2,4,0]=(-0.313182267444)
-        ref[2,4,1]=(-1.08684309178)
-        ref[2,4,2]=(-1.39365968958)
-        ref[3,0,0]=(0.272322829309)
-        ref[3,0,1]=(-0.233645276231)
-        ref[3,0,2]=(0.491500838791)
-        ref[3,1,0]=(1.27603407856)
-        ref[3,1,1]=(-0.709429989875)
-        ref[3,1,2]=(-0.998371438244)
-        ref[3,2,0]=(0.637972716248)
-        ref[3,2,1]=(-1.37896009762)
-        ref[3,2,2]=(0.496830616786)
-        ref[3,3,0]=(-1.67735443481)
-        ref[3,3,1]=(-0.741884420811)
-        ref[3,3,2]=(1.23125805904)
-        ref[3,4,0]=(-0.593290763881)
-        ref[3,4,1]=(-0.881909104701)
-        ref[3,4,2]=(-1.0425499934)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.289868084377)*x[0]+(-1.636093365)*x[1]
-        arg[0,0,1]=(0.841764493453)*x[0]+(-0.397262590373)*x[1]
-        arg[0,1,0]=(0.318610649633)*x[0]+(1.59837795884)*x[1]
-        arg[0,1,1]=(1.41408600658)*x[0]+(0.212012530707)*x[1]
-        arg[1,0,0]=(-1.13663878903)*x[0]+(-0.535752609596)*x[1]
-        arg[1,0,1]=(-0.795140440626)*x[0]+(-0.733456054749)*x[1]
-        arg[1,1,0]=(-0.174874940569)*x[0]+(0.304037654801)*x[1]
-        arg[1,1,1]=(0.835374268658)*x[0]+(0.645365790264)*x[1]
-        arg[2,0,0]=(0.684064169293)*x[0]+(-0.580502209076)*x[1]
-        arg[2,0,1]=(0.342542841673)*x[0]+(-0.620912562797)*x[1]
-        arg[2,1,0]=(-0.457226288553)*x[0]+(-0.163180645461)*x[1]
-        arg[2,1,1]=(-0.494067356015)*x[0]+(-0.604667785982)*x[1]
-        arg[3,0,0]=(-0.224173319974)*x[0]+(-0.288566962407)*x[1]
-        arg[3,0,1]=(-0.83578982053)*x[0]+(0.290663773612)*x[1]
-        arg[3,1,0]=(0.700494058094)*x[0]+(0.244036699451)*x[1]
-        arg[3,1,1]=(0.960756120912)*x[0]+(-0.129549309953)*x[1]
-        arg[4,0,0]=(0.942292060296)*x[0]+(-0.148922577041)*x[1]
-        arg[4,0,1]=(-0.363876552144)*x[0]+(0.903847614766)*x[1]
-        arg[4,1,0]=(-1.91719369833)*x[0]+(0.961392595186)*x[1]
-        arg[4,1,1]=(-0.141662097711)*x[0]+(-0.695061685931)*x[1]
-        arg[5,0,0]=(0.416693171023)*x[0]+(1.04455773845)*x[1]
-        arg[5,0,1]=(0.325327980312)*x[0]+(-1.01452792883)*x[1]
-        arg[5,1,0]=(-1.43970903355)*x[0]+(-1.04382682561)*x[1]
-        arg[5,1,1]=(-0.969700314248)*x[0]+(-0.286024748854)*x[1]
-        ref[0,0,0,0]=(0.289868084377)
-        ref[0,0,0,1]=(-1.636093365)
-        ref[0,0,1,0]=(0.841764493453)
-        ref[0,0,1,1]=(-0.397262590373)
-        ref[0,1,0,0]=(0.318610649633)
-        ref[0,1,0,1]=(1.59837795884)
-        ref[0,1,1,0]=(1.41408600658)
-        ref[0,1,1,1]=(0.212012530707)
-        ref[1,0,0,0]=(-1.13663878903)
-        ref[1,0,0,1]=(-0.535752609596)
-        ref[1,0,1,0]=(-0.795140440626)
-        ref[1,0,1,1]=(-0.733456054749)
-        ref[1,1,0,0]=(-0.174874940569)
-        ref[1,1,0,1]=(0.304037654801)
-        ref[1,1,1,0]=(0.835374268658)
-        ref[1,1,1,1]=(0.645365790264)
-        ref[2,0,0,0]=(0.684064169293)
-        ref[2,0,0,1]=(-0.580502209076)
-        ref[2,0,1,0]=(0.342542841673)
-        ref[2,0,1,1]=(-0.620912562797)
-        ref[2,1,0,0]=(-0.457226288553)
-        ref[2,1,0,1]=(-0.163180645461)
-        ref[2,1,1,0]=(-0.494067356015)
-        ref[2,1,1,1]=(-0.604667785982)
-        ref[3,0,0,0]=(-0.224173319974)
-        ref[3,0,0,1]=(-0.288566962407)
-        ref[3,0,1,0]=(-0.83578982053)
-        ref[3,0,1,1]=(0.290663773612)
-        ref[3,1,0,0]=(0.700494058094)
-        ref[3,1,0,1]=(0.244036699451)
-        ref[3,1,1,0]=(0.960756120912)
-        ref[3,1,1,1]=(-0.129549309953)
-        ref[4,0,0,0]=(0.942292060296)
-        ref[4,0,0,1]=(-0.148922577041)
-        ref[4,0,1,0]=(-0.363876552144)
-        ref[4,0,1,1]=(0.903847614766)
-        ref[4,1,0,0]=(-1.91719369833)
-        ref[4,1,0,1]=(0.961392595186)
-        ref[4,1,1,0]=(-0.141662097711)
-        ref[4,1,1,1]=(-0.695061685931)
-        ref[5,0,0,0]=(0.416693171023)
-        ref[5,0,0,1]=(1.04455773845)
-        ref[5,0,1,0]=(0.325327980312)
-        ref[5,0,1,1]=(-1.01452792883)
-        ref[5,1,0,0]=(-1.43970903355)
-        ref[5,1,0,1]=(-1.04382682561)
-        ref[5,1,1,0]=(-0.969700314248)
-        ref[5,1,1,1]=(-0.286024748854)
-      else:
-        arg[0,0,0]=(-1.52443210214)*x[0]+(-1.48020118993)*x[1]+(1.2552138343)*x[2]
-        arg[0,0,1]=(-0.102900544448)*x[0]+(-1.14209442568)*x[1]+(-0.975626338621)*x[2]
-        arg[0,1,0]=(0.909668629294)*x[0]+(1.29127341353)*x[1]+(-1.65221956404)*x[2]
-        arg[0,1,1]=(-0.00309732749698)*x[0]+(0.0561682749786)*x[1]+(0.330039911431)*x[2]
-        arg[1,0,0]=(0.966608417982)*x[0]+(-0.181702539284)*x[1]+(0.377393548129)*x[2]
-        arg[1,0,1]=(0.0273333293331)*x[0]+(0.745172228806)*x[1]+(0.756302500232)*x[2]
-        arg[1,1,0]=(-0.550382204645)*x[0]+(0.531191986475)*x[1]+(-1.02269665633)*x[2]
-        arg[1,1,1]=(-0.928522491259)*x[0]+(-1.25241213648)*x[1]+(0.635412990933)*x[2]
-        arg[2,0,0]=(-0.355234026557)*x[0]+(-1.69834232334)*x[1]+(1.17827811215)*x[2]
-        arg[2,0,1]=(-0.905805855166)*x[0]+(1.4023187683)*x[1]+(-0.570168366306)*x[2]
-        arg[2,1,0]=(0.550150523384)*x[0]+(-1.59933962526)*x[1]+(-0.388203251081)*x[2]
-        arg[2,1,1]=(0.138470563927)*x[0]+(0.245233545344)*x[1]+(-0.293840556681)*x[2]
-        arg[3,0,0]=(1.19700673733)*x[0]+(-1.04510591446)*x[1]+(1.03589008728)*x[2]
-        arg[3,0,1]=(0.713948123924)*x[0]+(-1.42841558036)*x[1]+(1.07248428525)*x[2]
-        arg[3,1,0]=(0.11223781122)*x[0]+(-0.00982612208261)*x[1]+(-0.263153847134)*x[2]
-        arg[3,1,1]=(1.33011049869)*x[0]+(0.691016997799)*x[1]+(-0.0547947379786)*x[2]
-        arg[4,0,0]=(1.0577224608)*x[0]+(-0.263034881475)*x[1]+(-0.854540775969)*x[2]
-        arg[4,0,1]=(0.686363734714)*x[0]+(0.198120868875)*x[1]+(1.46326635417)*x[2]
-        arg[4,1,0]=(-0.745244187008)*x[0]+(1.31766298118)*x[1]+(1.51544532829)*x[2]
-        arg[4,1,1]=(0.878390723411)*x[0]+(-0.427741582253)*x[1]+(0.0324341706939)*x[2]
-        arg[5,0,0]=(-0.445960121294)*x[0]+(-0.215668362178)*x[1]+(0.147632419682)*x[2]
-        arg[5,0,1]=(-0.0781270285912)*x[0]+(0.782990026347)*x[1]+(-1.28046463036)*x[2]
-        arg[5,1,0]=(-0.385003656622)*x[0]+(-1.02087438188)*x[1]+(-0.594357838151)*x[2]
-        arg[5,1,1]=(-0.676669731714)*x[0]+(-0.28685220691)*x[1]+(0.335774697674)*x[2]
-        ref[0,0,0,0]=(-1.52443210214)
-        ref[0,0,0,1]=(-1.48020118993)
-        ref[0,0,0,2]=(1.2552138343)
-        ref[0,0,1,0]=(-0.102900544448)
-        ref[0,0,1,1]=(-1.14209442568)
-        ref[0,0,1,2]=(-0.975626338621)
-        ref[0,1,0,0]=(0.909668629294)
-        ref[0,1,0,1]=(1.29127341353)
-        ref[0,1,0,2]=(-1.65221956404)
-        ref[0,1,1,0]=(-0.00309732749698)
-        ref[0,1,1,1]=(0.0561682749786)
-        ref[0,1,1,2]=(0.330039911431)
-        ref[1,0,0,0]=(0.966608417982)
-        ref[1,0,0,1]=(-0.181702539284)
-        ref[1,0,0,2]=(0.377393548129)
-        ref[1,0,1,0]=(0.0273333293331)
-        ref[1,0,1,1]=(0.745172228806)
-        ref[1,0,1,2]=(0.756302500232)
-        ref[1,1,0,0]=(-0.550382204645)
-        ref[1,1,0,1]=(0.531191986475)
-        ref[1,1,0,2]=(-1.02269665633)
-        ref[1,1,1,0]=(-0.928522491259)
-        ref[1,1,1,1]=(-1.25241213648)
-        ref[1,1,1,2]=(0.635412990933)
-        ref[2,0,0,0]=(-0.355234026557)
-        ref[2,0,0,1]=(-1.69834232334)
-        ref[2,0,0,2]=(1.17827811215)
-        ref[2,0,1,0]=(-0.905805855166)
-        ref[2,0,1,1]=(1.4023187683)
-        ref[2,0,1,2]=(-0.570168366306)
-        ref[2,1,0,0]=(0.550150523384)
-        ref[2,1,0,1]=(-1.59933962526)
-        ref[2,1,0,2]=(-0.388203251081)
-        ref[2,1,1,0]=(0.138470563927)
-        ref[2,1,1,1]=(0.245233545344)
-        ref[2,1,1,2]=(-0.293840556681)
-        ref[3,0,0,0]=(1.19700673733)
-        ref[3,0,0,1]=(-1.04510591446)
-        ref[3,0,0,2]=(1.03589008728)
-        ref[3,0,1,0]=(0.713948123924)
-        ref[3,0,1,1]=(-1.42841558036)
-        ref[3,0,1,2]=(1.07248428525)
-        ref[3,1,0,0]=(0.11223781122)
-        ref[3,1,0,1]=(-0.00982612208261)
-        ref[3,1,0,2]=(-0.263153847134)
-        ref[3,1,1,0]=(1.33011049869)
-        ref[3,1,1,1]=(0.691016997799)
-        ref[3,1,1,2]=(-0.0547947379786)
-        ref[4,0,0,0]=(1.0577224608)
-        ref[4,0,0,1]=(-0.263034881475)
-        ref[4,0,0,2]=(-0.854540775969)
-        ref[4,0,1,0]=(0.686363734714)
-        ref[4,0,1,1]=(0.198120868875)
-        ref[4,0,1,2]=(1.46326635417)
-        ref[4,1,0,0]=(-0.745244187008)
-        ref[4,1,0,1]=(1.31766298118)
-        ref[4,1,0,2]=(1.51544532829)
-        ref[4,1,1,0]=(0.878390723411)
-        ref[4,1,1,1]=(-0.427741582253)
-        ref[4,1,1,2]=(0.0324341706939)
-        ref[5,0,0,0]=(-0.445960121294)
-        ref[5,0,0,1]=(-0.215668362178)
-        ref[5,0,0,2]=(0.147632419682)
-        ref[5,0,1,0]=(-0.0781270285912)
-        ref[5,0,1,1]=(0.782990026347)
-        ref[5,0,1,2]=(-1.28046463036)
-        ref[5,1,0,0]=(-0.385003656622)
-        ref[5,1,0,1]=(-1.02087438188)
-        ref[5,1,0,2]=(-0.594357838151)
-        ref[5,1,1,0]=(-0.676669731714)
-        ref[5,1,1,1]=(-0.28685220691)
-        ref[5,1,1,2]=(0.335774697674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.306947418999)*x[0]+(-0.706616694784)*x[1]
-        ref[0]=(0.306947418999)
-        ref[1]=(-0.706616694784)
-      else:
-        arg=(0.490435692707)*x[0]+(0.929248719763)*x[1]+(0.269868131113)*x[2]
-        ref[0]=(0.490435692707)
-        ref[1]=(0.929248719763)
-        ref[2]=(0.269868131113)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.882633673888)*x[0]+(-0.790592442848)*x[1]
-        arg[1]=(1.55495669126)*x[0]+(0.496011926182)*x[1]
-        ref[0,0]=(-0.882633673888)
-        ref[0,1]=(-0.790592442848)
-        ref[1,0]=(1.55495669126)
-        ref[1,1]=(0.496011926182)
-      else:
-        arg[0]=(0.683098278161)*x[0]+(-0.151590511238)*x[1]+(0.54461031868)*x[2]
-        arg[1]=(0.59998040214)*x[0]+(-0.995466442084)*x[1]+(-1.09468062911)*x[2]
-        ref[0,0]=(0.683098278161)
-        ref[0,1]=(-0.151590511238)
-        ref[0,2]=(0.54461031868)
-        ref[1,0]=(0.59998040214)
-        ref[1,1]=(-0.995466442084)
-        ref[1,2]=(-1.09468062911)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.159129528541)*x[0]+(0.107835972384)*x[1]
-        arg[0,1]=(-1.52388770934)*x[0]+(0.262089610596)*x[1]
-        arg[0,2]=(0.505454501555)*x[0]+(-0.247061440744)*x[1]
-        arg[0,3]=(-0.556075420202)*x[0]+(0.702144110506)*x[1]
-        arg[0,4]=(0.810518335626)*x[0]+(-0.76077949525)*x[1]
-        arg[1,0]=(-0.491052732808)*x[0]+(-0.272913467279)*x[1]
-        arg[1,1]=(0.0141908236388)*x[0]+(1.10868804645)*x[1]
-        arg[1,2]=(0.719028425382)*x[0]+(-0.544780305018)*x[1]
-        arg[1,3]=(-1.15474920716)*x[0]+(0.888461325396)*x[1]
-        arg[1,4]=(-0.842901893766)*x[0]+(-0.465916012282)*x[1]
-        arg[2,0]=(1.24606386746)*x[0]+(0.817235825831)*x[1]
-        arg[2,1]=(0.400861923494)*x[0]+(1.24545704982)*x[1]
-        arg[2,2]=(0.656546253691)*x[0]+(-0.0269228973404)*x[1]
-        arg[2,3]=(-0.590512343874)*x[0]+(-0.0654952556025)*x[1]
-        arg[2,4]=(0.806342618281)*x[0]+(-0.183166204195)*x[1]
-        arg[3,0]=(0.637045776935)*x[0]+(-0.512820906995)*x[1]
-        arg[3,1]=(-0.596216711833)*x[0]+(-0.221853749777)*x[1]
-        arg[3,2]=(0.113235739927)*x[0]+(-0.210641618992)*x[1]
-        arg[3,3]=(-1.11423980423)*x[0]+(-1.46748285012)*x[1]
-        arg[3,4]=(0.573260999643)*x[0]+(0.55016627172)*x[1]
-        ref[0,0,0]=(-0.159129528541)
-        ref[0,0,1]=(0.107835972384)
-        ref[0,1,0]=(-1.52388770934)
-        ref[0,1,1]=(0.262089610596)
-        ref[0,2,0]=(0.505454501555)
-        ref[0,2,1]=(-0.247061440744)
-        ref[0,3,0]=(-0.556075420202)
-        ref[0,3,1]=(0.702144110506)
-        ref[0,4,0]=(0.810518335626)
-        ref[0,4,1]=(-0.76077949525)
-        ref[1,0,0]=(-0.491052732808)
-        ref[1,0,1]=(-0.272913467279)
-        ref[1,1,0]=(0.0141908236388)
-        ref[1,1,1]=(1.10868804645)
-        ref[1,2,0]=(0.719028425382)
-        ref[1,2,1]=(-0.544780305018)
-        ref[1,3,0]=(-1.15474920716)
-        ref[1,3,1]=(0.888461325396)
-        ref[1,4,0]=(-0.842901893766)
-        ref[1,4,1]=(-0.465916012282)
-        ref[2,0,0]=(1.24606386746)
-        ref[2,0,1]=(0.817235825831)
-        ref[2,1,0]=(0.400861923494)
-        ref[2,1,1]=(1.24545704982)
-        ref[2,2,0]=(0.656546253691)
-        ref[2,2,1]=(-0.0269228973404)
-        ref[2,3,0]=(-0.590512343874)
-        ref[2,3,1]=(-0.0654952556025)
-        ref[2,4,0]=(0.806342618281)
-        ref[2,4,1]=(-0.183166204195)
-        ref[3,0,0]=(0.637045776935)
-        ref[3,0,1]=(-0.512820906995)
-        ref[3,1,0]=(-0.596216711833)
-        ref[3,1,1]=(-0.221853749777)
-        ref[3,2,0]=(0.113235739927)
-        ref[3,2,1]=(-0.210641618992)
-        ref[3,3,0]=(-1.11423980423)
-        ref[3,3,1]=(-1.46748285012)
-        ref[3,4,0]=(0.573260999643)
-        ref[3,4,1]=(0.55016627172)
-      else:
-        arg[0,0]=(-0.025505130975)*x[0]+(-0.128352022583)*x[1]+(-0.0645809876948)*x[2]
-        arg[0,1]=(-0.974556985555)*x[0]+(0.503751568036)*x[1]+(-0.524784840232)*x[2]
-        arg[0,2]=(-1.23653778531)*x[0]+(-0.73883453445)*x[1]+(-1.59259101746)*x[2]
-        arg[0,3]=(-0.543656268618)*x[0]+(0.110486603472)*x[1]+(-0.636246757745)*x[2]
-        arg[0,4]=(-0.566088225133)*x[0]+(-0.272577812471)*x[1]+(-0.282075405014)*x[2]
-        arg[1,0]=(-0.28252305722)*x[0]+(0.497103425073)*x[1]+(0.997942367464)*x[2]
-        arg[1,1]=(-0.444059543356)*x[0]+(-0.149004039444)*x[1]+(-0.871853047384)*x[2]
-        arg[1,2]=(-0.610830496789)*x[0]+(0.196494475826)*x[1]+(0.0123852343883)*x[2]
-        arg[1,3]=(-0.327903465165)*x[0]+(0.523560519595)*x[1]+(-0.409961704581)*x[2]
-        arg[1,4]=(0.633897214746)*x[0]+(-0.9032002551)*x[1]+(0.624042996391)*x[2]
-        arg[2,0]=(0.469489049636)*x[0]+(1.46158418286)*x[1]+(-0.538453674545)*x[2]
-        arg[2,1]=(0.0488906165423)*x[0]+(0.483867458959)*x[1]+(0.0419643463366)*x[2]
-        arg[2,2]=(-1.89716754038)*x[0]+(-0.577554008519)*x[1]+(-0.0328835832126)*x[2]
-        arg[2,3]=(0.507329501469)*x[0]+(0.354939444351)*x[1]+(0.0136766029313)*x[2]
-        arg[2,4]=(-0.313182267444)*x[0]+(-1.08684309178)*x[1]+(-1.39365968958)*x[2]
-        arg[3,0]=(0.272322829309)*x[0]+(-0.233645276231)*x[1]+(0.491500838791)*x[2]
-        arg[3,1]=(1.27603407856)*x[0]+(-0.709429989875)*x[1]+(-0.998371438244)*x[2]
-        arg[3,2]=(0.637972716248)*x[0]+(-1.37896009762)*x[1]+(0.496830616786)*x[2]
-        arg[3,3]=(-1.67735443481)*x[0]+(-0.741884420811)*x[1]+(1.23125805904)*x[2]
-        arg[3,4]=(-0.593290763881)*x[0]+(-0.881909104701)*x[1]+(-1.0425499934)*x[2]
-        ref[0,0,0]=(-0.025505130975)
-        ref[0,0,1]=(-0.128352022583)
-        ref[0,0,2]=(-0.0645809876948)
-        ref[0,1,0]=(-0.974556985555)
-        ref[0,1,1]=(0.503751568036)
-        ref[0,1,2]=(-0.524784840232)
-        ref[0,2,0]=(-1.23653778531)
-        ref[0,2,1]=(-0.73883453445)
-        ref[0,2,2]=(-1.59259101746)
-        ref[0,3,0]=(-0.543656268618)
-        ref[0,3,1]=(0.110486603472)
-        ref[0,3,2]=(-0.636246757745)
-        ref[0,4,0]=(-0.566088225133)
-        ref[0,4,1]=(-0.272577812471)
-        ref[0,4,2]=(-0.282075405014)
-        ref[1,0,0]=(-0.28252305722)
-        ref[1,0,1]=(0.497103425073)
-        ref[1,0,2]=(0.997942367464)
-        ref[1,1,0]=(-0.444059543356)
-        ref[1,1,1]=(-0.149004039444)
-        ref[1,1,2]=(-0.871853047384)
-        ref[1,2,0]=(-0.610830496789)
-        ref[1,2,1]=(0.196494475826)
-        ref[1,2,2]=(0.0123852343883)
-        ref[1,3,0]=(-0.327903465165)
-        ref[1,3,1]=(0.523560519595)
-        ref[1,3,2]=(-0.409961704581)
-        ref[1,4,0]=(0.633897214746)
-        ref[1,4,1]=(-0.9032002551)
-        ref[1,4,2]=(0.624042996391)
-        ref[2,0,0]=(0.469489049636)
-        ref[2,0,1]=(1.46158418286)
-        ref[2,0,2]=(-0.538453674545)
-        ref[2,1,0]=(0.0488906165423)
-        ref[2,1,1]=(0.483867458959)
-        ref[2,1,2]=(0.0419643463366)
-        ref[2,2,0]=(-1.89716754038)
-        ref[2,2,1]=(-0.577554008519)
-        ref[2,2,2]=(-0.0328835832126)
-        ref[2,3,0]=(0.507329501469)
-        ref[2,3,1]=(0.354939444351)
-        ref[2,3,2]=(0.0136766029313)
-        ref[2,4,0]=(-0.313182267444)
-        ref[2,4,1]=(-1.08684309178)
-        ref[2,4,2]=(-1.39365968958)
-        ref[3,0,0]=(0.272322829309)
-        ref[3,0,1]=(-0.233645276231)
-        ref[3,0,2]=(0.491500838791)
-        ref[3,1,0]=(1.27603407856)
-        ref[3,1,1]=(-0.709429989875)
-        ref[3,1,2]=(-0.998371438244)
-        ref[3,2,0]=(0.637972716248)
-        ref[3,2,1]=(-1.37896009762)
-        ref[3,2,2]=(0.496830616786)
-        ref[3,3,0]=(-1.67735443481)
-        ref[3,3,1]=(-0.741884420811)
-        ref[3,3,2]=(1.23125805904)
-        ref[3,4,0]=(-0.593290763881)
-        ref[3,4,1]=(-0.881909104701)
-        ref[3,4,2]=(-1.0425499934)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.289868084377)*x[0]+(-1.636093365)*x[1]
-        arg[0,0,1]=(0.841764493453)*x[0]+(-0.397262590373)*x[1]
-        arg[0,1,0]=(0.318610649633)*x[0]+(1.59837795884)*x[1]
-        arg[0,1,1]=(1.41408600658)*x[0]+(0.212012530707)*x[1]
-        arg[1,0,0]=(-1.13663878903)*x[0]+(-0.535752609596)*x[1]
-        arg[1,0,1]=(-0.795140440626)*x[0]+(-0.733456054749)*x[1]
-        arg[1,1,0]=(-0.174874940569)*x[0]+(0.304037654801)*x[1]
-        arg[1,1,1]=(0.835374268658)*x[0]+(0.645365790264)*x[1]
-        arg[2,0,0]=(0.684064169293)*x[0]+(-0.580502209076)*x[1]
-        arg[2,0,1]=(0.342542841673)*x[0]+(-0.620912562797)*x[1]
-        arg[2,1,0]=(-0.457226288553)*x[0]+(-0.163180645461)*x[1]
-        arg[2,1,1]=(-0.494067356015)*x[0]+(-0.604667785982)*x[1]
-        arg[3,0,0]=(-0.224173319974)*x[0]+(-0.288566962407)*x[1]
-        arg[3,0,1]=(-0.83578982053)*x[0]+(0.290663773612)*x[1]
-        arg[3,1,0]=(0.700494058094)*x[0]+(0.244036699451)*x[1]
-        arg[3,1,1]=(0.960756120912)*x[0]+(-0.129549309953)*x[1]
-        arg[4,0,0]=(0.942292060296)*x[0]+(-0.148922577041)*x[1]
-        arg[4,0,1]=(-0.363876552144)*x[0]+(0.903847614766)*x[1]
-        arg[4,1,0]=(-1.91719369833)*x[0]+(0.961392595186)*x[1]
-        arg[4,1,1]=(-0.141662097711)*x[0]+(-0.695061685931)*x[1]
-        arg[5,0,0]=(0.416693171023)*x[0]+(1.04455773845)*x[1]
-        arg[5,0,1]=(0.325327980312)*x[0]+(-1.01452792883)*x[1]
-        arg[5,1,0]=(-1.43970903355)*x[0]+(-1.04382682561)*x[1]
-        arg[5,1,1]=(-0.969700314248)*x[0]+(-0.286024748854)*x[1]
-        ref[0,0,0,0]=(0.289868084377)
-        ref[0,0,0,1]=(-1.636093365)
-        ref[0,0,1,0]=(0.841764493453)
-        ref[0,0,1,1]=(-0.397262590373)
-        ref[0,1,0,0]=(0.318610649633)
-        ref[0,1,0,1]=(1.59837795884)
-        ref[0,1,1,0]=(1.41408600658)
-        ref[0,1,1,1]=(0.212012530707)
-        ref[1,0,0,0]=(-1.13663878903)
-        ref[1,0,0,1]=(-0.535752609596)
-        ref[1,0,1,0]=(-0.795140440626)
-        ref[1,0,1,1]=(-0.733456054749)
-        ref[1,1,0,0]=(-0.174874940569)
-        ref[1,1,0,1]=(0.304037654801)
-        ref[1,1,1,0]=(0.835374268658)
-        ref[1,1,1,1]=(0.645365790264)
-        ref[2,0,0,0]=(0.684064169293)
-        ref[2,0,0,1]=(-0.580502209076)
-        ref[2,0,1,0]=(0.342542841673)
-        ref[2,0,1,1]=(-0.620912562797)
-        ref[2,1,0,0]=(-0.457226288553)
-        ref[2,1,0,1]=(-0.163180645461)
-        ref[2,1,1,0]=(-0.494067356015)
-        ref[2,1,1,1]=(-0.604667785982)
-        ref[3,0,0,0]=(-0.224173319974)
-        ref[3,0,0,1]=(-0.288566962407)
-        ref[3,0,1,0]=(-0.83578982053)
-        ref[3,0,1,1]=(0.290663773612)
-        ref[3,1,0,0]=(0.700494058094)
-        ref[3,1,0,1]=(0.244036699451)
-        ref[3,1,1,0]=(0.960756120912)
-        ref[3,1,1,1]=(-0.129549309953)
-        ref[4,0,0,0]=(0.942292060296)
-        ref[4,0,0,1]=(-0.148922577041)
-        ref[4,0,1,0]=(-0.363876552144)
-        ref[4,0,1,1]=(0.903847614766)
-        ref[4,1,0,0]=(-1.91719369833)
-        ref[4,1,0,1]=(0.961392595186)
-        ref[4,1,1,0]=(-0.141662097711)
-        ref[4,1,1,1]=(-0.695061685931)
-        ref[5,0,0,0]=(0.416693171023)
-        ref[5,0,0,1]=(1.04455773845)
-        ref[5,0,1,0]=(0.325327980312)
-        ref[5,0,1,1]=(-1.01452792883)
-        ref[5,1,0,0]=(-1.43970903355)
-        ref[5,1,0,1]=(-1.04382682561)
-        ref[5,1,1,0]=(-0.969700314248)
-        ref[5,1,1,1]=(-0.286024748854)
-      else:
-        arg[0,0,0]=(-1.52443210214)*x[0]+(-1.48020118993)*x[1]+(1.2552138343)*x[2]
-        arg[0,0,1]=(-0.102900544448)*x[0]+(-1.14209442568)*x[1]+(-0.975626338621)*x[2]
-        arg[0,1,0]=(0.909668629294)*x[0]+(1.29127341353)*x[1]+(-1.65221956404)*x[2]
-        arg[0,1,1]=(-0.00309732749698)*x[0]+(0.0561682749786)*x[1]+(0.330039911431)*x[2]
-        arg[1,0,0]=(0.966608417982)*x[0]+(-0.181702539284)*x[1]+(0.377393548129)*x[2]
-        arg[1,0,1]=(0.0273333293331)*x[0]+(0.745172228806)*x[1]+(0.756302500232)*x[2]
-        arg[1,1,0]=(-0.550382204645)*x[0]+(0.531191986475)*x[1]+(-1.02269665633)*x[2]
-        arg[1,1,1]=(-0.928522491259)*x[0]+(-1.25241213648)*x[1]+(0.635412990933)*x[2]
-        arg[2,0,0]=(-0.355234026557)*x[0]+(-1.69834232334)*x[1]+(1.17827811215)*x[2]
-        arg[2,0,1]=(-0.905805855166)*x[0]+(1.4023187683)*x[1]+(-0.570168366306)*x[2]
-        arg[2,1,0]=(0.550150523384)*x[0]+(-1.59933962526)*x[1]+(-0.388203251081)*x[2]
-        arg[2,1,1]=(0.138470563927)*x[0]+(0.245233545344)*x[1]+(-0.293840556681)*x[2]
-        arg[3,0,0]=(1.19700673733)*x[0]+(-1.04510591446)*x[1]+(1.03589008728)*x[2]
-        arg[3,0,1]=(0.713948123924)*x[0]+(-1.42841558036)*x[1]+(1.07248428525)*x[2]
-        arg[3,1,0]=(0.11223781122)*x[0]+(-0.00982612208261)*x[1]+(-0.263153847134)*x[2]
-        arg[3,1,1]=(1.33011049869)*x[0]+(0.691016997799)*x[1]+(-0.0547947379786)*x[2]
-        arg[4,0,0]=(1.0577224608)*x[0]+(-0.263034881475)*x[1]+(-0.854540775969)*x[2]
-        arg[4,0,1]=(0.686363734714)*x[0]+(0.198120868875)*x[1]+(1.46326635417)*x[2]
-        arg[4,1,0]=(-0.745244187008)*x[0]+(1.31766298118)*x[1]+(1.51544532829)*x[2]
-        arg[4,1,1]=(0.878390723411)*x[0]+(-0.427741582253)*x[1]+(0.0324341706939)*x[2]
-        arg[5,0,0]=(-0.445960121294)*x[0]+(-0.215668362178)*x[1]+(0.147632419682)*x[2]
-        arg[5,0,1]=(-0.0781270285912)*x[0]+(0.782990026347)*x[1]+(-1.28046463036)*x[2]
-        arg[5,1,0]=(-0.385003656622)*x[0]+(-1.02087438188)*x[1]+(-0.594357838151)*x[2]
-        arg[5,1,1]=(-0.676669731714)*x[0]+(-0.28685220691)*x[1]+(0.335774697674)*x[2]
-        ref[0,0,0,0]=(-1.52443210214)
-        ref[0,0,0,1]=(-1.48020118993)
-        ref[0,0,0,2]=(1.2552138343)
-        ref[0,0,1,0]=(-0.102900544448)
-        ref[0,0,1,1]=(-1.14209442568)
-        ref[0,0,1,2]=(-0.975626338621)
-        ref[0,1,0,0]=(0.909668629294)
-        ref[0,1,0,1]=(1.29127341353)
-        ref[0,1,0,2]=(-1.65221956404)
-        ref[0,1,1,0]=(-0.00309732749698)
-        ref[0,1,1,1]=(0.0561682749786)
-        ref[0,1,1,2]=(0.330039911431)
-        ref[1,0,0,0]=(0.966608417982)
-        ref[1,0,0,1]=(-0.181702539284)
-        ref[1,0,0,2]=(0.377393548129)
-        ref[1,0,1,0]=(0.0273333293331)
-        ref[1,0,1,1]=(0.745172228806)
-        ref[1,0,1,2]=(0.756302500232)
-        ref[1,1,0,0]=(-0.550382204645)
-        ref[1,1,0,1]=(0.531191986475)
-        ref[1,1,0,2]=(-1.02269665633)
-        ref[1,1,1,0]=(-0.928522491259)
-        ref[1,1,1,1]=(-1.25241213648)
-        ref[1,1,1,2]=(0.635412990933)
-        ref[2,0,0,0]=(-0.355234026557)
-        ref[2,0,0,1]=(-1.69834232334)
-        ref[2,0,0,2]=(1.17827811215)
-        ref[2,0,1,0]=(-0.905805855166)
-        ref[2,0,1,1]=(1.4023187683)
-        ref[2,0,1,2]=(-0.570168366306)
-        ref[2,1,0,0]=(0.550150523384)
-        ref[2,1,0,1]=(-1.59933962526)
-        ref[2,1,0,2]=(-0.388203251081)
-        ref[2,1,1,0]=(0.138470563927)
-        ref[2,1,1,1]=(0.245233545344)
-        ref[2,1,1,2]=(-0.293840556681)
-        ref[3,0,0,0]=(1.19700673733)
-        ref[3,0,0,1]=(-1.04510591446)
-        ref[3,0,0,2]=(1.03589008728)
-        ref[3,0,1,0]=(0.713948123924)
-        ref[3,0,1,1]=(-1.42841558036)
-        ref[3,0,1,2]=(1.07248428525)
-        ref[3,1,0,0]=(0.11223781122)
-        ref[3,1,0,1]=(-0.00982612208261)
-        ref[3,1,0,2]=(-0.263153847134)
-        ref[3,1,1,0]=(1.33011049869)
-        ref[3,1,1,1]=(0.691016997799)
-        ref[3,1,1,2]=(-0.0547947379786)
-        ref[4,0,0,0]=(1.0577224608)
-        ref[4,0,0,1]=(-0.263034881475)
-        ref[4,0,0,2]=(-0.854540775969)
-        ref[4,0,1,0]=(0.686363734714)
-        ref[4,0,1,1]=(0.198120868875)
-        ref[4,0,1,2]=(1.46326635417)
-        ref[4,1,0,0]=(-0.745244187008)
-        ref[4,1,0,1]=(1.31766298118)
-        ref[4,1,0,2]=(1.51544532829)
-        ref[4,1,1,0]=(0.878390723411)
-        ref[4,1,1,1]=(-0.427741582253)
-        ref[4,1,1,2]=(0.0324341706939)
-        ref[5,0,0,0]=(-0.445960121294)
-        ref[5,0,0,1]=(-0.215668362178)
-        ref[5,0,0,2]=(0.147632419682)
-        ref[5,0,1,0]=(-0.0781270285912)
-        ref[5,0,1,1]=(0.782990026347)
-        ref[5,0,1,2]=(-1.28046463036)
-        ref[5,1,0,0]=(-0.385003656622)
-        ref[5,1,0,1]=(-1.02087438188)
-        ref[5,1,0,2]=(-0.594357838151)
-        ref[5,1,1,0]=(-0.676669731714)
-        ref[5,1,1,1]=(-0.28685220691)
-        ref[5,1,1,2]=(0.335774697674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.741017463552)*x[0]**o+(0.665549604887)*x[0]+(-0.294688627656)*x[1]**o+(-0.188608956137)*x[1]
-        ref[0]=o*(0.741017463552)*x_ref[0]**(o-1)+(0.665549604887)
-        ref[1]=o*(-0.294688627656)*x_ref[1]**(o-1)+(-0.188608956137)
-      else:
-        arg=(-0.182264095574)*x[0]**o+(0.388884343071)*x[0]+(0.0250471058578)*x[1]**o+(0.242724421847)*x[1]+(-0.863568419189)*x[2]**o+(-0.797427046061)*x[2]
-        ref[0]=o*(-0.182264095574)*x_ref[0]**(o-1)+(0.388884343071)
-        ref[1]=o*(0.0250471058578)*x_ref[1]**(o-1)+(0.242724421847)
-        ref[2]=o*(-0.863568419189)*x_ref[2]**(o-1)+(-0.797427046061)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.566748845779)*x[0]**o+(0.284156548246)*x[0]+(0.213805183732)*x[1]**o+(0.887833417271)*x[1]
-        arg[1]=(-0.935376067943)*x[0]**o+(0.31417056704)*x[0]+(0.157729703937)*x[1]**o+(0.781264180355)*x[1]
-        ref[0,0]=o*(-0.566748845779)*x_ref[0]**(o-1)+(0.284156548246)
-        ref[0,1]=o*(0.213805183732)*x_ref[1]**(o-1)+(0.887833417271)
-        ref[1,0]=o*(-0.935376067943)*x_ref[0]**(o-1)+(0.31417056704)
-        ref[1,1]=o*(0.157729703937)*x_ref[1]**(o-1)+(0.781264180355)
-      else:
-        arg[0]=(0.787106597246)*x[0]**o+(0.0477259256332)*x[0]+(0.0657839729355)*x[1]**o+(-0.367242386854)*x[1]+(0.638047637996)*x[2]**o+(0.292293368262)*x[2]
-        arg[1]=(0.325241621537)*x[0]**o+(-0.995465871567)*x[0]+(-0.589833259992)*x[1]**o+(0.252602994164)*x[1]+(0.271544628727)*x[2]**o+(0.401222388174)*x[2]
-        ref[0,0]=o*(0.787106597246)*x_ref[0]**(o-1)+(0.0477259256332)
-        ref[0,1]=o*(0.0657839729355)*x_ref[1]**(o-1)+(-0.367242386854)
-        ref[0,2]=o*(0.638047637996)*x_ref[2]**(o-1)+(0.292293368262)
-        ref[1,0]=o*(0.325241621537)*x_ref[0]**(o-1)+(-0.995465871567)
-        ref[1,1]=o*(-0.589833259992)*x_ref[1]**(o-1)+(0.252602994164)
-        ref[1,2]=o*(0.271544628727)*x_ref[2]**(o-1)+(0.401222388174)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.535138548297)*x[0]**o+(0.320793182084)*x[0]+(-0.363556615611)*x[1]**o+(0.80028981928)*x[1]
-        arg[0,1]=(0.50712290341)*x[0]**o+(0.0696582374725)*x[0]+(-0.565430065964)*x[1]**o+(0.840341269012)*x[1]
-        arg[0,2]=(0.222608517758)*x[0]**o+(0.0741096149609)*x[0]+(-0.926916099396)*x[1]**o+(0.840471681255)*x[1]
-        arg[0,3]=(-0.0729061065831)*x[0]**o+(-0.361006912293)*x[0]+(-0.796381694915)*x[1]**o+(-0.87399027927)*x[1]
-        arg[0,4]=(0.946982642563)*x[0]**o+(0.776871793528)*x[0]+(0.906858449271)*x[1]**o+(0.23076439514)*x[1]
-        arg[1,0]=(-0.121641842365)*x[0]**o+(0.755274749862)*x[0]+(-0.905815080361)*x[1]**o+(-0.27711865979)*x[1]
-        arg[1,1]=(0.870675475328)*x[0]**o+(0.000245820302085)*x[0]+(0.990534371185)*x[1]**o+(-0.0132722523111)*x[1]
-        arg[1,2]=(0.665375098591)*x[0]**o+(0.602779210152)*x[0]+(0.112732227406)*x[1]**o+(0.973600268944)*x[1]
-        arg[1,3]=(-0.760686885095)*x[0]**o+(-0.993893837808)*x[0]+(-0.279242757928)*x[1]**o+(0.0970216781461)*x[1]
-        arg[1,4]=(-0.326265155118)*x[0]**o+(-0.302971035826)*x[0]+(-0.991053864037)*x[1]**o+(-0.787776341406)*x[1]
-        arg[2,0]=(-0.798558123695)*x[0]**o+(-0.648773673567)*x[0]+(0.911336567339)*x[1]**o+(0.525888531875)*x[1]
-        arg[2,1]=(0.334481967771)*x[0]**o+(0.559633318828)*x[0]+(-0.738361234791)*x[1]**o+(0.863808627657)*x[1]
-        arg[2,2]=(-0.660270802705)*x[0]**o+(-0.500800405285)*x[0]+(0.250991213972)*x[1]**o+(-0.855371865339)*x[1]
-        arg[2,3]=(0.573495152924)*x[0]**o+(0.841810214664)*x[0]+(0.816402403997)*x[1]**o+(0.871435278968)*x[1]
-        arg[2,4]=(0.00700234490903)*x[0]**o+(0.609696655384)*x[0]+(-0.908261420109)*x[1]**o+(-0.0469518512659)*x[1]
-        arg[3,0]=(-0.78381944233)*x[0]**o+(0.547849085605)*x[0]+(-0.481333073199)*x[1]**o+(-0.100496681813)*x[1]
-        arg[3,1]=(0.53995869966)*x[0]**o+(-0.503303606531)*x[0]+(0.783394329024)*x[1]**o+(0.989828473603)*x[1]
-        arg[3,2]=(0.723590003109)*x[0]**o+(-0.75511396868)*x[0]+(0.249651386017)*x[1]**o+(0.545636109436)*x[1]
-        arg[3,3]=(-0.126863462818)*x[0]**o+(0.553295312002)*x[0]+(-0.286155398085)*x[1]**o+(0.425889110789)*x[1]
-        arg[3,4]=(-0.970069386779)*x[0]**o+(0.457400568855)*x[0]+(-0.245839304835)*x[1]**o+(-0.463000940469)*x[1]
-        ref[0,0,0]=o*(-0.535138548297)*x_ref[0]**(o-1)+(0.320793182084)
-        ref[0,0,1]=o*(-0.363556615611)*x_ref[1]**(o-1)+(0.80028981928)
-        ref[0,1,0]=o*(0.50712290341)*x_ref[0]**(o-1)+(0.0696582374725)
-        ref[0,1,1]=o*(-0.565430065964)*x_ref[1]**(o-1)+(0.840341269012)
-        ref[0,2,0]=o*(0.222608517758)*x_ref[0]**(o-1)+(0.0741096149609)
-        ref[0,2,1]=o*(-0.926916099396)*x_ref[1]**(o-1)+(0.840471681255)
-        ref[0,3,0]=o*(-0.0729061065831)*x_ref[0]**(o-1)+(-0.361006912293)
-        ref[0,3,1]=o*(-0.796381694915)*x_ref[1]**(o-1)+(-0.87399027927)
-        ref[0,4,0]=o*(0.946982642563)*x_ref[0]**(o-1)+(0.776871793528)
-        ref[0,4,1]=o*(0.906858449271)*x_ref[1]**(o-1)+(0.23076439514)
-        ref[1,0,0]=o*(-0.121641842365)*x_ref[0]**(o-1)+(0.755274749862)
-        ref[1,0,1]=o*(-0.905815080361)*x_ref[1]**(o-1)+(-0.27711865979)
-        ref[1,1,0]=o*(0.870675475328)*x_ref[0]**(o-1)+(0.000245820302085)
-        ref[1,1,1]=o*(0.990534371185)*x_ref[1]**(o-1)+(-0.0132722523111)
-        ref[1,2,0]=o*(0.665375098591)*x_ref[0]**(o-1)+(0.602779210152)
-        ref[1,2,1]=o*(0.112732227406)*x_ref[1]**(o-1)+(0.973600268944)
-        ref[1,3,0]=o*(-0.760686885095)*x_ref[0]**(o-1)+(-0.993893837808)
-        ref[1,3,1]=o*(-0.279242757928)*x_ref[1]**(o-1)+(0.0970216781461)
-        ref[1,4,0]=o*(-0.326265155118)*x_ref[0]**(o-1)+(-0.302971035826)
-        ref[1,4,1]=o*(-0.991053864037)*x_ref[1]**(o-1)+(-0.787776341406)
-        ref[2,0,0]=o*(-0.798558123695)*x_ref[0]**(o-1)+(-0.648773673567)
-        ref[2,0,1]=o*(0.911336567339)*x_ref[1]**(o-1)+(0.525888531875)
-        ref[2,1,0]=o*(0.334481967771)*x_ref[0]**(o-1)+(0.559633318828)
-        ref[2,1,1]=o*(-0.738361234791)*x_ref[1]**(o-1)+(0.863808627657)
-        ref[2,2,0]=o*(-0.660270802705)*x_ref[0]**(o-1)+(-0.500800405285)
-        ref[2,2,1]=o*(0.250991213972)*x_ref[1]**(o-1)+(-0.855371865339)
-        ref[2,3,0]=o*(0.573495152924)*x_ref[0]**(o-1)+(0.841810214664)
-        ref[2,3,1]=o*(0.816402403997)*x_ref[1]**(o-1)+(0.871435278968)
-        ref[2,4,0]=o*(0.00700234490903)*x_ref[0]**(o-1)+(0.609696655384)
-        ref[2,4,1]=o*(-0.908261420109)*x_ref[1]**(o-1)+(-0.0469518512659)
-        ref[3,0,0]=o*(-0.78381944233)*x_ref[0]**(o-1)+(0.547849085605)
-        ref[3,0,1]=o*(-0.481333073199)*x_ref[1]**(o-1)+(-0.100496681813)
-        ref[3,1,0]=o*(0.53995869966)*x_ref[0]**(o-1)+(-0.503303606531)
-        ref[3,1,1]=o*(0.783394329024)*x_ref[1]**(o-1)+(0.989828473603)
-        ref[3,2,0]=o*(0.723590003109)*x_ref[0]**(o-1)+(-0.75511396868)
-        ref[3,2,1]=o*(0.249651386017)*x_ref[1]**(o-1)+(0.545636109436)
-        ref[3,3,0]=o*(-0.126863462818)*x_ref[0]**(o-1)+(0.553295312002)
-        ref[3,3,1]=o*(-0.286155398085)*x_ref[1]**(o-1)+(0.425889110789)
-        ref[3,4,0]=o*(-0.970069386779)*x_ref[0]**(o-1)+(0.457400568855)
-        ref[3,4,1]=o*(-0.245839304835)*x_ref[1]**(o-1)+(-0.463000940469)
-      else:
-        arg[0,0]=(-0.0252675874258)*x[0]**o+(-0.998043629662)*x[0]+(-0.956603187221)*x[1]**o+(-0.642113208329)*x[1]+(-0.59687133215)*x[2]**o+(-0.222380006695)*x[2]
-        arg[0,1]=(0.540057023826)*x[0]**o+(0.660021105706)*x[0]+(-0.0847035816563)*x[1]**o+(0.734935147879)*x[1]+(0.895080236848)*x[2]**o+(0.759076168225)*x[2]
-        arg[0,2]=(0.208276460123)*x[0]**o+(-0.842726599314)*x[0]+(0.514146640689)*x[1]**o+(-0.931115443386)*x[1]+(-0.427990918054)*x[2]**o+(-0.0944702225036)*x[2]
-        arg[0,3]=(-0.669873393665)*x[0]**o+(-0.164211687812)*x[0]+(0.257292402022)*x[1]**o+(0.788249196864)*x[1]+(-0.0160232742588)*x[2]**o+(0.593261720532)*x[2]
-        arg[0,4]=(0.574685018662)*x[0]**o+(-0.404093341935)*x[0]+(-0.613704015926)*x[1]**o+(-0.388769512229)*x[1]+(0.65014059769)*x[2]**o+(0.796497720581)*x[2]
-        arg[1,0]=(0.579425469692)*x[0]**o+(0.706786266065)*x[0]+(-0.489805412824)*x[1]**o+(0.412673120993)*x[1]+(-0.261487328773)*x[2]**o+(0.323016314178)*x[2]
-        arg[1,1]=(-0.406115852457)*x[0]**o+(-0.320011474154)*x[0]+(0.83353566302)*x[1]**o+(-0.770757586792)*x[1]+(-0.497021878205)*x[2]**o+(-0.108546214912)*x[2]
-        arg[1,2]=(-0.799159182698)*x[0]**o+(0.221424788319)*x[0]+(0.882092644719)*x[1]**o+(0.25804039903)*x[1]+(-0.788642442802)*x[2]**o+(-0.434293659417)*x[2]
-        arg[1,3]=(-0.453596867354)*x[0]**o+(-0.855684542333)*x[0]+(0.421257402196)*x[1]**o+(0.162268279507)*x[1]+(-0.618396236314)*x[2]**o+(-0.650684413266)*x[2]
-        arg[1,4]=(-0.464749011522)*x[0]**o+(-0.050661862641)*x[0]+(-0.7554290975)*x[1]**o+(-0.213826578781)*x[1]+(-0.536460109672)*x[2]**o+(-0.441490452069)*x[2]
-        arg[2,0]=(0.335438338384)*x[0]**o+(-0.598515232086)*x[0]+(0.396958696838)*x[1]**o+(0.712094780848)*x[1]+(0.0112487672163)*x[2]**o+(-0.106361601342)*x[2]
-        arg[2,1]=(0.157333767552)*x[0]**o+(0.763247557186)*x[0]+(0.454047596703)*x[1]**o+(0.874633696245)*x[1]+(0.80992740886)*x[2]**o+(-0.465565575276)*x[2]
-        arg[2,2]=(-0.668932235683)*x[0]**o+(0.99055962791)*x[0]+(-0.473440344595)*x[1]**o+(-0.694789559356)*x[1]+(-0.337501506478)*x[2]**o+(-0.552461610916)*x[2]
-        arg[2,3]=(-0.174040039098)*x[0]**o+(0.878604594327)*x[0]+(-0.488684761288)*x[1]**o+(-0.225626690649)*x[1]+(0.307550460093)*x[2]**o+(0.279172145442)*x[2]
-        arg[2,4]=(0.771496476361)*x[0]**o+(-0.528231004311)*x[0]+(0.318620411204)*x[1]**o+(-0.831636376644)*x[1]+(-0.23477599759)*x[2]**o+(0.452986258707)*x[2]
-        arg[3,0]=(0.689878836595)*x[0]**o+(-0.723887531161)*x[0]+(0.906077469738)*x[1]**o+(-0.729986756151)*x[1]+(0.860506345609)*x[2]**o+(-0.437203511895)*x[2]
-        arg[3,1]=(0.867909616506)*x[0]**o+(-0.0480808079676)*x[0]+(-0.439925732789)*x[1]**o+(-0.753945614279)*x[1]+(-0.0015149141551)*x[2]**o+(-0.465559525628)*x[2]
-        arg[3,2]=(0.915231983332)*x[0]**o+(0.77428136852)*x[0]+(0.902598621987)*x[1]**o+(-0.49204288782)*x[1]+(0.77362022057)*x[2]**o+(0.872135547313)*x[2]
-        arg[3,3]=(0.274436414079)*x[0]**o+(-0.291721638943)*x[0]+(0.202501119852)*x[1]**o+(0.911330931145)*x[1]+(-0.61382801878)*x[2]**o+(0.386704897682)*x[2]
-        arg[3,4]=(-0.0258695378217)*x[0]**o+(0.263046110195)*x[0]+(-0.162461126288)*x[1]**o+(-0.123570278155)*x[1]+(0.598012400912)*x[2]**o+(0.769951340801)*x[2]
-        ref[0,0,0]=o*(-0.0252675874258)*x_ref[0]**(o-1)+(-0.998043629662)
-        ref[0,0,1]=o*(-0.956603187221)*x_ref[1]**(o-1)+(-0.642113208329)
-        ref[0,0,2]=o*(-0.59687133215)*x_ref[2]**(o-1)+(-0.222380006695)
-        ref[0,1,0]=o*(0.540057023826)*x_ref[0]**(o-1)+(0.660021105706)
-        ref[0,1,1]=o*(-0.0847035816563)*x_ref[1]**(o-1)+(0.734935147879)
-        ref[0,1,2]=o*(0.895080236848)*x_ref[2]**(o-1)+(0.759076168225)
-        ref[0,2,0]=o*(0.208276460123)*x_ref[0]**(o-1)+(-0.842726599314)
-        ref[0,2,1]=o*(0.514146640689)*x_ref[1]**(o-1)+(-0.931115443386)
-        ref[0,2,2]=o*(-0.427990918054)*x_ref[2]**(o-1)+(-0.0944702225036)
-        ref[0,3,0]=o*(-0.669873393665)*x_ref[0]**(o-1)+(-0.164211687812)
-        ref[0,3,1]=o*(0.257292402022)*x_ref[1]**(o-1)+(0.788249196864)
-        ref[0,3,2]=o*(-0.0160232742588)*x_ref[2]**(o-1)+(0.593261720532)
-        ref[0,4,0]=o*(0.574685018662)*x_ref[0]**(o-1)+(-0.404093341935)
-        ref[0,4,1]=o*(-0.613704015926)*x_ref[1]**(o-1)+(-0.388769512229)
-        ref[0,4,2]=o*(0.65014059769)*x_ref[2]**(o-1)+(0.796497720581)
-        ref[1,0,0]=o*(0.579425469692)*x_ref[0]**(o-1)+(0.706786266065)
-        ref[1,0,1]=o*(-0.489805412824)*x_ref[1]**(o-1)+(0.412673120993)
-        ref[1,0,2]=o*(-0.261487328773)*x_ref[2]**(o-1)+(0.323016314178)
-        ref[1,1,0]=o*(-0.406115852457)*x_ref[0]**(o-1)+(-0.320011474154)
-        ref[1,1,1]=o*(0.83353566302)*x_ref[1]**(o-1)+(-0.770757586792)
-        ref[1,1,2]=o*(-0.497021878205)*x_ref[2]**(o-1)+(-0.108546214912)
-        ref[1,2,0]=o*(-0.799159182698)*x_ref[0]**(o-1)+(0.221424788319)
-        ref[1,2,1]=o*(0.882092644719)*x_ref[1]**(o-1)+(0.25804039903)
-        ref[1,2,2]=o*(-0.788642442802)*x_ref[2]**(o-1)+(-0.434293659417)
-        ref[1,3,0]=o*(-0.453596867354)*x_ref[0]**(o-1)+(-0.855684542333)
-        ref[1,3,1]=o*(0.421257402196)*x_ref[1]**(o-1)+(0.162268279507)
-        ref[1,3,2]=o*(-0.618396236314)*x_ref[2]**(o-1)+(-0.650684413266)
-        ref[1,4,0]=o*(-0.464749011522)*x_ref[0]**(o-1)+(-0.050661862641)
-        ref[1,4,1]=o*(-0.7554290975)*x_ref[1]**(o-1)+(-0.213826578781)
-        ref[1,4,2]=o*(-0.536460109672)*x_ref[2]**(o-1)+(-0.441490452069)
-        ref[2,0,0]=o*(0.335438338384)*x_ref[0]**(o-1)+(-0.598515232086)
-        ref[2,0,1]=o*(0.396958696838)*x_ref[1]**(o-1)+(0.712094780848)
-        ref[2,0,2]=o*(0.0112487672163)*x_ref[2]**(o-1)+(-0.106361601342)
-        ref[2,1,0]=o*(0.157333767552)*x_ref[0]**(o-1)+(0.763247557186)
-        ref[2,1,1]=o*(0.454047596703)*x_ref[1]**(o-1)+(0.874633696245)
-        ref[2,1,2]=o*(0.80992740886)*x_ref[2]**(o-1)+(-0.465565575276)
-        ref[2,2,0]=o*(-0.668932235683)*x_ref[0]**(o-1)+(0.99055962791)
-        ref[2,2,1]=o*(-0.473440344595)*x_ref[1]**(o-1)+(-0.694789559356)
-        ref[2,2,2]=o*(-0.337501506478)*x_ref[2]**(o-1)+(-0.552461610916)
-        ref[2,3,0]=o*(-0.174040039098)*x_ref[0]**(o-1)+(0.878604594327)
-        ref[2,3,1]=o*(-0.488684761288)*x_ref[1]**(o-1)+(-0.225626690649)
-        ref[2,3,2]=o*(0.307550460093)*x_ref[2]**(o-1)+(0.279172145442)
-        ref[2,4,0]=o*(0.771496476361)*x_ref[0]**(o-1)+(-0.528231004311)
-        ref[2,4,1]=o*(0.318620411204)*x_ref[1]**(o-1)+(-0.831636376644)
-        ref[2,4,2]=o*(-0.23477599759)*x_ref[2]**(o-1)+(0.452986258707)
-        ref[3,0,0]=o*(0.689878836595)*x_ref[0]**(o-1)+(-0.723887531161)
-        ref[3,0,1]=o*(0.906077469738)*x_ref[1]**(o-1)+(-0.729986756151)
-        ref[3,0,2]=o*(0.860506345609)*x_ref[2]**(o-1)+(-0.437203511895)
-        ref[3,1,0]=o*(0.867909616506)*x_ref[0]**(o-1)+(-0.0480808079676)
-        ref[3,1,1]=o*(-0.439925732789)*x_ref[1]**(o-1)+(-0.753945614279)
-        ref[3,1,2]=o*(-0.0015149141551)*x_ref[2]**(o-1)+(-0.465559525628)
-        ref[3,2,0]=o*(0.915231983332)*x_ref[0]**(o-1)+(0.77428136852)
-        ref[3,2,1]=o*(0.902598621987)*x_ref[1]**(o-1)+(-0.49204288782)
-        ref[3,2,2]=o*(0.77362022057)*x_ref[2]**(o-1)+(0.872135547313)
-        ref[3,3,0]=o*(0.274436414079)*x_ref[0]**(o-1)+(-0.291721638943)
-        ref[3,3,1]=o*(0.202501119852)*x_ref[1]**(o-1)+(0.911330931145)
-        ref[3,3,2]=o*(-0.61382801878)*x_ref[2]**(o-1)+(0.386704897682)
-        ref[3,4,0]=o*(-0.0258695378217)*x_ref[0]**(o-1)+(0.263046110195)
-        ref[3,4,1]=o*(-0.162461126288)*x_ref[1]**(o-1)+(-0.123570278155)
-        ref[3,4,2]=o*(0.598012400912)*x_ref[2]**(o-1)+(0.769951340801)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.301542954432)*x[0]**o+(-0.126029003998)*x[0]+(-0.408561086014)*x[1]**o+(0.090642210886)*x[1]
-        arg[0,0,1]=(0.456052591865)*x[0]**o+(0.624896766511)*x[0]+(0.87137087467)*x[1]**o+(-0.296114354421)*x[1]
-        arg[0,1,0]=(0.370833001032)*x[0]**o+(-0.700862384031)*x[0]+(-0.276076372016)*x[1]**o+(-0.820884025764)*x[1]
-        arg[0,1,1]=(0.550805148631)*x[0]**o+(-0.628825647329)*x[0]+(0.906362219793)*x[1]**o+(0.093148354989)*x[1]
-        arg[1,0,0]=(-0.80347190678)*x[0]**o+(-0.112285193049)*x[0]+(-0.703090064994)*x[1]**o+(0.738893806856)*x[1]
-        arg[1,0,1]=(0.716113817265)*x[0]**o+(-0.403563175278)*x[0]+(-0.545474326725)*x[1]**o+(-0.085377932579)*x[1]
-        arg[1,1,0]=(0.0151945295253)*x[0]**o+(0.419681120006)*x[0]+(0.605889120207)*x[1]**o+(0.94921670969)*x[1]
-        arg[1,1,1]=(0.330888675781)*x[0]**o+(0.536336632067)*x[0]+(0.130243661103)*x[1]**o+(0.249581698903)*x[1]
-        arg[2,0,0]=(-0.94168189216)*x[0]**o+(0.42899125004)*x[0]+(0.104206704223)*x[1]**o+(0.992451993183)*x[1]
-        arg[2,0,1]=(-0.557898869487)*x[0]**o+(-0.0387050073802)*x[0]+(-0.880396260326)*x[1]**o+(-0.649734782543)*x[1]
-        arg[2,1,0]=(0.0362873703011)*x[0]**o+(0.641116555832)*x[0]+(-0.878565186806)*x[1]**o+(-0.305825058029)*x[1]
-        arg[2,1,1]=(0.926144430868)*x[0]**o+(0.207902756992)*x[0]+(-0.823834000424)*x[1]**o+(0.541980766739)*x[1]
-        arg[3,0,0]=(-0.497934527226)*x[0]**o+(0.904514339359)*x[0]+(0.0627382682436)*x[1]**o+(-0.886845257384)*x[1]
-        arg[3,0,1]=(0.458163004678)*x[0]**o+(-0.890966354569)*x[0]+(0.779511556433)*x[1]**o+(0.911407858547)*x[1]
-        arg[3,1,0]=(0.643197533583)*x[0]**o+(-0.445952483015)*x[0]+(-0.491648538422)*x[1]**o+(-0.339803793944)*x[1]
-        arg[3,1,1]=(0.564910446806)*x[0]**o+(-0.251342703228)*x[0]+(-0.102526510378)*x[1]**o+(0.989034603428)*x[1]
-        arg[4,0,0]=(0.0728812877818)*x[0]**o+(-0.160839673847)*x[0]+(0.078039622926)*x[1]**o+(-0.778740146006)*x[1]
-        arg[4,0,1]=(-0.848970759855)*x[0]**o+(0.83795370612)*x[0]+(-0.652802628253)*x[1]**o+(0.570900978851)*x[1]
-        arg[4,1,0]=(0.492154273484)*x[0]**o+(-0.138488354185)*x[0]+(0.269142955069)*x[1]**o+(-0.849995493706)*x[1]
-        arg[4,1,1]=(0.945032529684)*x[0]**o+(0.611284327327)*x[0]+(0.549856083886)*x[1]**o+(0.347585489606)*x[1]
-        arg[5,0,0]=(0.481456547858)*x[0]**o+(0.238848312219)*x[0]+(-0.5849679413)*x[1]**o+(-0.749140400072)*x[1]
-        arg[5,0,1]=(0.27081490311)*x[0]**o+(-0.101642948148)*x[0]+(0.31847076679)*x[1]**o+(0.192182993758)*x[1]
-        arg[5,1,0]=(-0.873348151897)*x[0]**o+(-0.613499952221)*x[0]+(0.54087826152)*x[1]**o+(-0.269096416524)*x[1]
-        arg[5,1,1]=(-0.803277233859)*x[0]**o+(-0.714237882827)*x[0]+(-0.205544031812)*x[1]**o+(0.188144864673)*x[1]
-        ref[0,0,0,0]=o*(-0.301542954432)*x_ref[0]**(o-1)+(-0.126029003998)
-        ref[0,0,0,1]=o*(-0.408561086014)*x_ref[1]**(o-1)+(0.090642210886)
-        ref[0,0,1,0]=o*(0.456052591865)*x_ref[0]**(o-1)+(0.624896766511)
-        ref[0,0,1,1]=o*(0.87137087467)*x_ref[1]**(o-1)+(-0.296114354421)
-        ref[0,1,0,0]=o*(0.370833001032)*x_ref[0]**(o-1)+(-0.700862384031)
-        ref[0,1,0,1]=o*(-0.276076372016)*x_ref[1]**(o-1)+(-0.820884025764)
-        ref[0,1,1,0]=o*(0.550805148631)*x_ref[0]**(o-1)+(-0.628825647329)
-        ref[0,1,1,1]=o*(0.906362219793)*x_ref[1]**(o-1)+(0.093148354989)
-        ref[1,0,0,0]=o*(-0.80347190678)*x_ref[0]**(o-1)+(-0.112285193049)
-        ref[1,0,0,1]=o*(-0.703090064994)*x_ref[1]**(o-1)+(0.738893806856)
-        ref[1,0,1,0]=o*(0.716113817265)*x_ref[0]**(o-1)+(-0.403563175278)
-        ref[1,0,1,1]=o*(-0.545474326725)*x_ref[1]**(o-1)+(-0.085377932579)
-        ref[1,1,0,0]=o*(0.0151945295253)*x_ref[0]**(o-1)+(0.419681120006)
-        ref[1,1,0,1]=o*(0.605889120207)*x_ref[1]**(o-1)+(0.94921670969)
-        ref[1,1,1,0]=o*(0.330888675781)*x_ref[0]**(o-1)+(0.536336632067)
-        ref[1,1,1,1]=o*(0.130243661103)*x_ref[1]**(o-1)+(0.249581698903)
-        ref[2,0,0,0]=o*(-0.94168189216)*x_ref[0]**(o-1)+(0.42899125004)
-        ref[2,0,0,1]=o*(0.104206704223)*x_ref[1]**(o-1)+(0.992451993183)
-        ref[2,0,1,0]=o*(-0.557898869487)*x_ref[0]**(o-1)+(-0.0387050073802)
-        ref[2,0,1,1]=o*(-0.880396260326)*x_ref[1]**(o-1)+(-0.649734782543)
-        ref[2,1,0,0]=o*(0.0362873703011)*x_ref[0]**(o-1)+(0.641116555832)
-        ref[2,1,0,1]=o*(-0.878565186806)*x_ref[1]**(o-1)+(-0.305825058029)
-        ref[2,1,1,0]=o*(0.926144430868)*x_ref[0]**(o-1)+(0.207902756992)
-        ref[2,1,1,1]=o*(-0.823834000424)*x_ref[1]**(o-1)+(0.541980766739)
-        ref[3,0,0,0]=o*(-0.497934527226)*x_ref[0]**(o-1)+(0.904514339359)
-        ref[3,0,0,1]=o*(0.0627382682436)*x_ref[1]**(o-1)+(-0.886845257384)
-        ref[3,0,1,0]=o*(0.458163004678)*x_ref[0]**(o-1)+(-0.890966354569)
-        ref[3,0,1,1]=o*(0.779511556433)*x_ref[1]**(o-1)+(0.911407858547)
-        ref[3,1,0,0]=o*(0.643197533583)*x_ref[0]**(o-1)+(-0.445952483015)
-        ref[3,1,0,1]=o*(-0.491648538422)*x_ref[1]**(o-1)+(-0.339803793944)
-        ref[3,1,1,0]=o*(0.564910446806)*x_ref[0]**(o-1)+(-0.251342703228)
-        ref[3,1,1,1]=o*(-0.102526510378)*x_ref[1]**(o-1)+(0.989034603428)
-        ref[4,0,0,0]=o*(0.0728812877818)*x_ref[0]**(o-1)+(-0.160839673847)
-        ref[4,0,0,1]=o*(0.078039622926)*x_ref[1]**(o-1)+(-0.778740146006)
-        ref[4,0,1,0]=o*(-0.848970759855)*x_ref[0]**(o-1)+(0.83795370612)
-        ref[4,0,1,1]=o*(-0.652802628253)*x_ref[1]**(o-1)+(0.570900978851)
-        ref[4,1,0,0]=o*(0.492154273484)*x_ref[0]**(o-1)+(-0.138488354185)
-        ref[4,1,0,1]=o*(0.269142955069)*x_ref[1]**(o-1)+(-0.849995493706)
-        ref[4,1,1,0]=o*(0.945032529684)*x_ref[0]**(o-1)+(0.611284327327)
-        ref[4,1,1,1]=o*(0.549856083886)*x_ref[1]**(o-1)+(0.347585489606)
-        ref[5,0,0,0]=o*(0.481456547858)*x_ref[0]**(o-1)+(0.238848312219)
-        ref[5,0,0,1]=o*(-0.5849679413)*x_ref[1]**(o-1)+(-0.749140400072)
-        ref[5,0,1,0]=o*(0.27081490311)*x_ref[0]**(o-1)+(-0.101642948148)
-        ref[5,0,1,1]=o*(0.31847076679)*x_ref[1]**(o-1)+(0.192182993758)
-        ref[5,1,0,0]=o*(-0.873348151897)*x_ref[0]**(o-1)+(-0.613499952221)
-        ref[5,1,0,1]=o*(0.54087826152)*x_ref[1]**(o-1)+(-0.269096416524)
-        ref[5,1,1,0]=o*(-0.803277233859)*x_ref[0]**(o-1)+(-0.714237882827)
-        ref[5,1,1,1]=o*(-0.205544031812)*x_ref[1]**(o-1)+(0.188144864673)
-      else:
-        arg[0,0,0]=(-0.639251981322)*x[0]**o+(-0.115972267818)*x[0]+(0.491134645863)*x[1]**o+(0.345343639029)*x[1]+(-0.663597762251)*x[2]**o+(-0.328150609455)*x[2]
-        arg[0,0,1]=(-0.76280151252)*x[0]**o+(0.933789965647)*x[0]+(-0.117386438957)*x[1]**o+(0.738801880577)*x[1]+(-0.823759196233)*x[2]**o+(-0.591225057134)*x[2]
-        arg[0,1,0]=(-0.515479158328)*x[0]**o+(-0.498840147412)*x[0]+(-0.07870152457)*x[1]**o+(0.240823897179)*x[1]+(-0.529483054724)*x[2]**o+(0.957444878465)*x[2]
-        arg[0,1,1]=(0.659163197783)*x[0]**o+(-0.987017484017)*x[0]+(0.316073196672)*x[1]**o+(-0.858184573568)*x[1]+(-0.324909144593)*x[2]**o+(-0.89624674398)*x[2]
-        arg[1,0,0]=(0.582390600104)*x[0]**o+(-0.808724939916)*x[0]+(-0.204186916478)*x[1]**o+(0.63212764696)*x[1]+(-0.272947627588)*x[2]**o+(-0.133369751815)*x[2]
-        arg[1,0,1]=(-0.955892141909)*x[0]**o+(0.915832405494)*x[0]+(-0.823428836636)*x[1]**o+(-0.527176552593)*x[1]+(-0.439872810771)*x[2]**o+(0.282431362763)*x[2]
-        arg[1,1,0]=(0.269192050139)*x[0]**o+(0.304289733459)*x[0]+(-0.252137123064)*x[1]**o+(0.159346881758)*x[1]+(-0.875713938743)*x[2]**o+(-0.804681982204)*x[2]
-        arg[1,1,1]=(0.100159906585)*x[0]**o+(0.652670710888)*x[0]+(-0.0471177296503)*x[1]**o+(0.15344212377)*x[1]+(0.162356023341)*x[2]**o+(0.242855769737)*x[2]
-        arg[2,0,0]=(-0.0214334988311)*x[0]**o+(0.444654672491)*x[0]+(0.235478960156)*x[1]**o+(0.62191559883)*x[1]+(0.124531773653)*x[2]**o+(-0.603748942811)*x[2]
-        arg[2,0,1]=(-0.00696114124898)*x[0]**o+(-0.350635993795)*x[0]+(0.766513244466)*x[1]**o+(-0.99996024111)*x[1]+(0.976036637033)*x[2]**o+(0.00703160282837)*x[2]
-        arg[2,1,0]=(-0.210499708873)*x[0]**o+(-0.763641982769)*x[0]+(0.435435481771)*x[1]**o+(0.0886400511888)*x[1]+(0.540913993886)*x[2]**o+(-0.864904989707)*x[2]
-        arg[2,1,1]=(0.609017357846)*x[0]**o+(-0.681305727596)*x[0]+(-0.291763309802)*x[1]**o+(0.12465245807)*x[1]+(-0.265362499082)*x[2]**o+(-0.978509447338)*x[2]
-        arg[3,0,0]=(0.622861389608)*x[0]**o+(-0.341108338962)*x[0]+(0.908588438318)*x[1]**o+(-0.583012719535)*x[1]+(0.33513654797)*x[2]**o+(-0.835513934636)*x[2]
-        arg[3,0,1]=(0.164841305439)*x[0]**o+(-0.622242302911)*x[0]+(-0.0469305037163)*x[1]**o+(-0.859517953063)*x[1]+(-0.112485630662)*x[2]**o+(0.31475831421)*x[2]
-        arg[3,1,0]=(-0.177913851996)*x[0]**o+(0.74607750787)*x[0]+(-0.188838634745)*x[1]**o+(-0.803617744529)*x[1]+(0.18839438068)*x[2]**o+(-0.857696671728)*x[2]
-        arg[3,1,1]=(0.485172697497)*x[0]**o+(-0.554750723313)*x[0]+(-0.59838039994)*x[1]**o+(-0.83177053032)*x[1]+(0.655490277067)*x[2]**o+(0.0645924856059)*x[2]
-        arg[4,0,0]=(0.900678166492)*x[0]**o+(-0.485573346705)*x[0]+(0.0108149783491)*x[1]**o+(0.982616024342)*x[1]+(-0.374371784319)*x[2]**o+(-0.825014166204)*x[2]
-        arg[4,0,1]=(0.682753472393)*x[0]**o+(0.810927347906)*x[0]+(-0.128780174224)*x[1]**o+(0.514607304836)*x[1]+(0.606285011416)*x[2]**o+(-0.691191486471)*x[2]
-        arg[4,1,0]=(0.0103661338625)*x[0]**o+(0.184111752707)*x[0]+(-0.270751890504)*x[1]**o+(0.207351712222)*x[1]+(-0.366280871535)*x[2]**o+(-0.638450092731)*x[2]
-        arg[4,1,1]=(-0.111302974207)*x[0]**o+(-0.520252159917)*x[0]+(-0.911197545741)*x[1]**o+(-0.779732160528)*x[1]+(-0.443379349795)*x[2]**o+(-0.783540988384)*x[2]
-        arg[5,0,0]=(0.319701766792)*x[0]**o+(-0.953929305858)*x[0]+(-0.783942145061)*x[1]**o+(0.687992583635)*x[1]+(0.873868267323)*x[2]**o+(-0.204836707955)*x[2]
-        arg[5,0,1]=(-0.240340717622)*x[0]**o+(-0.799598459684)*x[0]+(-0.827096078861)*x[1]**o+(0.229071234102)*x[1]+(0.309197705487)*x[2]**o+(-0.286088934882)*x[2]
-        arg[5,1,0]=(-0.0926450319507)*x[0]**o+(0.638985747884)*x[0]+(0.604913216138)*x[1]**o+(-0.364251815312)*x[1]+(-0.47971664069)*x[2]**o+(-0.20655528518)*x[2]
-        arg[5,1,1]=(0.418341452333)*x[0]**o+(0.430002851684)*x[0]+(0.624025385599)*x[1]**o+(0.338601201629)*x[1]+(0.0900364406242)*x[2]**o+(0.193533337073)*x[2]
-        ref[0,0,0,0]=o*(-0.639251981322)*x_ref[0]**(o-1)+(-0.115972267818)
-        ref[0,0,0,1]=o*(0.491134645863)*x_ref[1]**(o-1)+(0.345343639029)
-        ref[0,0,0,2]=o*(-0.663597762251)*x_ref[2]**(o-1)+(-0.328150609455)
-        ref[0,0,1,0]=o*(-0.76280151252)*x_ref[0]**(o-1)+(0.933789965647)
-        ref[0,0,1,1]=o*(-0.117386438957)*x_ref[1]**(o-1)+(0.738801880577)
-        ref[0,0,1,2]=o*(-0.823759196233)*x_ref[2]**(o-1)+(-0.591225057134)
-        ref[0,1,0,0]=o*(-0.515479158328)*x_ref[0]**(o-1)+(-0.498840147412)
-        ref[0,1,0,1]=o*(-0.07870152457)*x_ref[1]**(o-1)+(0.240823897179)
-        ref[0,1,0,2]=o*(-0.529483054724)*x_ref[2]**(o-1)+(0.957444878465)
-        ref[0,1,1,0]=o*(0.659163197783)*x_ref[0]**(o-1)+(-0.987017484017)
-        ref[0,1,1,1]=o*(0.316073196672)*x_ref[1]**(o-1)+(-0.858184573568)
-        ref[0,1,1,2]=o*(-0.324909144593)*x_ref[2]**(o-1)+(-0.89624674398)
-        ref[1,0,0,0]=o*(0.582390600104)*x_ref[0]**(o-1)+(-0.808724939916)
-        ref[1,0,0,1]=o*(-0.204186916478)*x_ref[1]**(o-1)+(0.63212764696)
-        ref[1,0,0,2]=o*(-0.272947627588)*x_ref[2]**(o-1)+(-0.133369751815)
-        ref[1,0,1,0]=o*(-0.955892141909)*x_ref[0]**(o-1)+(0.915832405494)
-        ref[1,0,1,1]=o*(-0.823428836636)*x_ref[1]**(o-1)+(-0.527176552593)
-        ref[1,0,1,2]=o*(-0.439872810771)*x_ref[2]**(o-1)+(0.282431362763)
-        ref[1,1,0,0]=o*(0.269192050139)*x_ref[0]**(o-1)+(0.304289733459)
-        ref[1,1,0,1]=o*(-0.252137123064)*x_ref[1]**(o-1)+(0.159346881758)
-        ref[1,1,0,2]=o*(-0.875713938743)*x_ref[2]**(o-1)+(-0.804681982204)
-        ref[1,1,1,0]=o*(0.100159906585)*x_ref[0]**(o-1)+(0.652670710888)
-        ref[1,1,1,1]=o*(-0.0471177296503)*x_ref[1]**(o-1)+(0.15344212377)
-        ref[1,1,1,2]=o*(0.162356023341)*x_ref[2]**(o-1)+(0.242855769737)
-        ref[2,0,0,0]=o*(-0.0214334988311)*x_ref[0]**(o-1)+(0.444654672491)
-        ref[2,0,0,1]=o*(0.235478960156)*x_ref[1]**(o-1)+(0.62191559883)
-        ref[2,0,0,2]=o*(0.124531773653)*x_ref[2]**(o-1)+(-0.603748942811)
-        ref[2,0,1,0]=o*(-0.00696114124898)*x_ref[0]**(o-1)+(-0.350635993795)
-        ref[2,0,1,1]=o*(0.766513244466)*x_ref[1]**(o-1)+(-0.99996024111)
-        ref[2,0,1,2]=o*(0.976036637033)*x_ref[2]**(o-1)+(0.00703160282837)
-        ref[2,1,0,0]=o*(-0.210499708873)*x_ref[0]**(o-1)+(-0.763641982769)
-        ref[2,1,0,1]=o*(0.435435481771)*x_ref[1]**(o-1)+(0.0886400511888)
-        ref[2,1,0,2]=o*(0.540913993886)*x_ref[2]**(o-1)+(-0.864904989707)
-        ref[2,1,1,0]=o*(0.609017357846)*x_ref[0]**(o-1)+(-0.681305727596)
-        ref[2,1,1,1]=o*(-0.291763309802)*x_ref[1]**(o-1)+(0.12465245807)
-        ref[2,1,1,2]=o*(-0.265362499082)*x_ref[2]**(o-1)+(-0.978509447338)
-        ref[3,0,0,0]=o*(0.622861389608)*x_ref[0]**(o-1)+(-0.341108338962)
-        ref[3,0,0,1]=o*(0.908588438318)*x_ref[1]**(o-1)+(-0.583012719535)
-        ref[3,0,0,2]=o*(0.33513654797)*x_ref[2]**(o-1)+(-0.835513934636)
-        ref[3,0,1,0]=o*(0.164841305439)*x_ref[0]**(o-1)+(-0.622242302911)
-        ref[3,0,1,1]=o*(-0.0469305037163)*x_ref[1]**(o-1)+(-0.859517953063)
-        ref[3,0,1,2]=o*(-0.112485630662)*x_ref[2]**(o-1)+(0.31475831421)
-        ref[3,1,0,0]=o*(-0.177913851996)*x_ref[0]**(o-1)+(0.74607750787)
-        ref[3,1,0,1]=o*(-0.188838634745)*x_ref[1]**(o-1)+(-0.803617744529)
-        ref[3,1,0,2]=o*(0.18839438068)*x_ref[2]**(o-1)+(-0.857696671728)
-        ref[3,1,1,0]=o*(0.485172697497)*x_ref[0]**(o-1)+(-0.554750723313)
-        ref[3,1,1,1]=o*(-0.59838039994)*x_ref[1]**(o-1)+(-0.83177053032)
-        ref[3,1,1,2]=o*(0.655490277067)*x_ref[2]**(o-1)+(0.0645924856059)
-        ref[4,0,0,0]=o*(0.900678166492)*x_ref[0]**(o-1)+(-0.485573346705)
-        ref[4,0,0,1]=o*(0.0108149783491)*x_ref[1]**(o-1)+(0.982616024342)
-        ref[4,0,0,2]=o*(-0.374371784319)*x_ref[2]**(o-1)+(-0.825014166204)
-        ref[4,0,1,0]=o*(0.682753472393)*x_ref[0]**(o-1)+(0.810927347906)
-        ref[4,0,1,1]=o*(-0.128780174224)*x_ref[1]**(o-1)+(0.514607304836)
-        ref[4,0,1,2]=o*(0.606285011416)*x_ref[2]**(o-1)+(-0.691191486471)
-        ref[4,1,0,0]=o*(0.0103661338625)*x_ref[0]**(o-1)+(0.184111752707)
-        ref[4,1,0,1]=o*(-0.270751890504)*x_ref[1]**(o-1)+(0.207351712222)
-        ref[4,1,0,2]=o*(-0.366280871535)*x_ref[2]**(o-1)+(-0.638450092731)
-        ref[4,1,1,0]=o*(-0.111302974207)*x_ref[0]**(o-1)+(-0.520252159917)
-        ref[4,1,1,1]=o*(-0.911197545741)*x_ref[1]**(o-1)+(-0.779732160528)
-        ref[4,1,1,2]=o*(-0.443379349795)*x_ref[2]**(o-1)+(-0.783540988384)
-        ref[5,0,0,0]=o*(0.319701766792)*x_ref[0]**(o-1)+(-0.953929305858)
-        ref[5,0,0,1]=o*(-0.783942145061)*x_ref[1]**(o-1)+(0.687992583635)
-        ref[5,0,0,2]=o*(0.873868267323)*x_ref[2]**(o-1)+(-0.204836707955)
-        ref[5,0,1,0]=o*(-0.240340717622)*x_ref[0]**(o-1)+(-0.799598459684)
-        ref[5,0,1,1]=o*(-0.827096078861)*x_ref[1]**(o-1)+(0.229071234102)
-        ref[5,0,1,2]=o*(0.309197705487)*x_ref[2]**(o-1)+(-0.286088934882)
-        ref[5,1,0,0]=o*(-0.0926450319507)*x_ref[0]**(o-1)+(0.638985747884)
-        ref[5,1,0,1]=o*(0.604913216138)*x_ref[1]**(o-1)+(-0.364251815312)
-        ref[5,1,0,2]=o*(-0.47971664069)*x_ref[2]**(o-1)+(-0.20655528518)
-        ref[5,1,1,0]=o*(0.418341452333)*x_ref[0]**(o-1)+(0.430002851684)
-        ref[5,1,1,1]=o*(0.624025385599)*x_ref[1]**(o-1)+(0.338601201629)
-        ref[5,1,1,2]=o*(0.0900364406242)*x_ref[2]**(o-1)+(0.193533337073)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.828412007781)*x[0]**o+(0.392494008682)*x[0]+(0.424780018344)*x[1]**o+(-0.75790685259)*x[1]
-        ref[0]=o*(0.828412007781)*x_ref[0]**(o-1)+(0.392494008682)
-        ref[1]=o*(0.424780018344)*x_ref[1]**(o-1)+(-0.75790685259)
-      else:
-        arg=(0.0243949626425)*x[0]**o+(0.99040714323)*x[0]+(0.455478130443)*x[1]**o+(-0.917504050554)*x[1]+(-0.642882027126)*x[2]**o+(-0.0751962677977)*x[2]
-        ref[0]=o*(0.0243949626425)*x_ref[0]**(o-1)+(0.99040714323)
-        ref[1]=o*(0.455478130443)*x_ref[1]**(o-1)+(-0.917504050554)
-        ref[2]=o*(-0.642882027126)*x_ref[2]**(o-1)+(-0.0751962677977)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.107613645086)*x[0]**o+(-0.942156383662)*x[0]+(0.294425370324)*x[1]**o+(-0.177019031098)*x[1]
-        arg[1]=(-0.120283674295)*x[0]**o+(-0.0644985036825)*x[0]+(-0.818412208612)*x[1]**o+(-0.375335380433)*x[1]
-        ref[0,0]=o*(-0.107613645086)*x_ref[0]**(o-1)+(-0.942156383662)
-        ref[0,1]=o*(0.294425370324)*x_ref[1]**(o-1)+(-0.177019031098)
-        ref[1,0]=o*(-0.120283674295)*x_ref[0]**(o-1)+(-0.0644985036825)
-        ref[1,1]=o*(-0.818412208612)*x_ref[1]**(o-1)+(-0.375335380433)
-      else:
-        arg[0]=(-0.888739890088)*x[0]**o+(0.874877363684)*x[0]+(-0.104101311962)*x[1]**o+(-0.124590333446)*x[1]+(-0.311645832684)*x[2]**o+(-0.249470325769)*x[2]
-        arg[1]=(0.680288601947)*x[0]**o+(0.0595361804285)*x[0]+(-0.477099840976)*x[1]**o+(-0.695340106154)*x[1]+(-0.371044873416)*x[2]**o+(-0.442877128189)*x[2]
-        ref[0,0]=o*(-0.888739890088)*x_ref[0]**(o-1)+(0.874877363684)
-        ref[0,1]=o*(-0.104101311962)*x_ref[1]**(o-1)+(-0.124590333446)
-        ref[0,2]=o*(-0.311645832684)*x_ref[2]**(o-1)+(-0.249470325769)
-        ref[1,0]=o*(0.680288601947)*x_ref[0]**(o-1)+(0.0595361804285)
-        ref[1,1]=o*(-0.477099840976)*x_ref[1]**(o-1)+(-0.695340106154)
-        ref[1,2]=o*(-0.371044873416)*x_ref[2]**(o-1)+(-0.442877128189)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.0237486351119)*x[0]**o+(0.751375149587)*x[0]+(0.0776560601509)*x[1]**o+(-0.363340006998)*x[1]
-        arg[0,1]=(0.129612138219)*x[0]**o+(0.377878821946)*x[0]+(0.166470268672)*x[1]**o+(-0.0442064974104)*x[1]
-        arg[0,2]=(0.692350462477)*x[0]**o+(-0.439155965586)*x[0]+(0.655583353562)*x[1]**o+(0.3753639938)*x[1]
-        arg[0,3]=(-0.909698820615)*x[0]**o+(0.382887632024)*x[0]+(-0.108821308794)*x[1]**o+(0.330111344773)*x[1]
-        arg[0,4]=(-0.694552793316)*x[0]**o+(-0.38920298235)*x[0]+(0.174040833682)*x[1]**o+(-0.41756882346)*x[1]
-        arg[1,0]=(-0.194901264915)*x[0]**o+(-0.325546767846)*x[0]+(0.507614203136)*x[1]**o+(-0.964255763976)*x[1]
-        arg[1,1]=(-0.634480793567)*x[0]**o+(0.787029027123)*x[0]+(-0.067769912764)*x[1]**o+(0.439969554037)*x[1]
-        arg[1,2]=(-0.59461925815)*x[0]**o+(-0.799215148911)*x[0]+(-0.286848861016)*x[1]**o+(-0.0274325066994)*x[1]
-        arg[1,3]=(0.564664310607)*x[0]**o+(-0.00188717695265)*x[0]+(0.984042638249)*x[1]**o+(-0.524339915306)*x[1]
-        arg[1,4]=(-0.673190201485)*x[0]**o+(0.149574403846)*x[0]+(0.667179612419)*x[1]**o+(-0.279377079395)*x[1]
-        arg[2,0]=(0.270490028978)*x[0]**o+(0.498901404478)*x[0]+(0.485707956493)*x[1]**o+(-0.340861889384)*x[1]
-        arg[2,1]=(-0.785952730285)*x[0]**o+(0.514446635701)*x[0]+(0.925557655147)*x[1]**o+(0.616971745561)*x[1]
-        arg[2,2]=(0.788196502068)*x[0]**o+(0.651461860731)*x[0]+(0.160564742956)*x[1]**o+(-0.681831134057)*x[1]
-        arg[2,3]=(0.892258488111)*x[0]**o+(0.752252063583)*x[0]+(0.853514779349)*x[1]**o+(-0.181884189513)*x[1]
-        arg[2,4]=(-0.824886296933)*x[0]**o+(0.211931432354)*x[0]+(0.924362197939)*x[1]**o+(0.036482432278)*x[1]
-        arg[3,0]=(-0.0616004277583)*x[0]**o+(-0.77338193907)*x[0]+(-0.966899521855)*x[1]**o+(-0.395764830291)*x[1]
-        arg[3,1]=(-0.607976110595)*x[0]**o+(-0.448875768616)*x[0]+(-0.414034580078)*x[1]**o+(0.185483819416)*x[1]
-        arg[3,2]=(-0.918071244524)*x[0]**o+(0.924225885038)*x[0]+(0.418000509852)*x[1]**o+(0.431330768344)*x[1]
-        arg[3,3]=(0.897504318738)*x[0]**o+(0.66265738089)*x[0]+(0.720830604485)*x[1]**o+(-0.713433930025)*x[1]
-        arg[3,4]=(0.526823069245)*x[0]**o+(-0.255965317744)*x[0]+(-0.326371546564)*x[1]**o+(-0.436881501009)*x[1]
-        ref[0,0,0]=o*(0.0237486351119)*x_ref[0]**(o-1)+(0.751375149587)
-        ref[0,0,1]=o*(0.0776560601509)*x_ref[1]**(o-1)+(-0.363340006998)
-        ref[0,1,0]=o*(0.129612138219)*x_ref[0]**(o-1)+(0.377878821946)
-        ref[0,1,1]=o*(0.166470268672)*x_ref[1]**(o-1)+(-0.0442064974104)
-        ref[0,2,0]=o*(0.692350462477)*x_ref[0]**(o-1)+(-0.439155965586)
-        ref[0,2,1]=o*(0.655583353562)*x_ref[1]**(o-1)+(0.3753639938)
-        ref[0,3,0]=o*(-0.909698820615)*x_ref[0]**(o-1)+(0.382887632024)
-        ref[0,3,1]=o*(-0.108821308794)*x_ref[1]**(o-1)+(0.330111344773)
-        ref[0,4,0]=o*(-0.694552793316)*x_ref[0]**(o-1)+(-0.38920298235)
-        ref[0,4,1]=o*(0.174040833682)*x_ref[1]**(o-1)+(-0.41756882346)
-        ref[1,0,0]=o*(-0.194901264915)*x_ref[0]**(o-1)+(-0.325546767846)
-        ref[1,0,1]=o*(0.507614203136)*x_ref[1]**(o-1)+(-0.964255763976)
-        ref[1,1,0]=o*(-0.634480793567)*x_ref[0]**(o-1)+(0.787029027123)
-        ref[1,1,1]=o*(-0.067769912764)*x_ref[1]**(o-1)+(0.439969554037)
-        ref[1,2,0]=o*(-0.59461925815)*x_ref[0]**(o-1)+(-0.799215148911)
-        ref[1,2,1]=o*(-0.286848861016)*x_ref[1]**(o-1)+(-0.0274325066994)
-        ref[1,3,0]=o*(0.564664310607)*x_ref[0]**(o-1)+(-0.00188717695265)
-        ref[1,3,1]=o*(0.984042638249)*x_ref[1]**(o-1)+(-0.524339915306)
-        ref[1,4,0]=o*(-0.673190201485)*x_ref[0]**(o-1)+(0.149574403846)
-        ref[1,4,1]=o*(0.667179612419)*x_ref[1]**(o-1)+(-0.279377079395)
-        ref[2,0,0]=o*(0.270490028978)*x_ref[0]**(o-1)+(0.498901404478)
-        ref[2,0,1]=o*(0.485707956493)*x_ref[1]**(o-1)+(-0.340861889384)
-        ref[2,1,0]=o*(-0.785952730285)*x_ref[0]**(o-1)+(0.514446635701)
-        ref[2,1,1]=o*(0.925557655147)*x_ref[1]**(o-1)+(0.616971745561)
-        ref[2,2,0]=o*(0.788196502068)*x_ref[0]**(o-1)+(0.651461860731)
-        ref[2,2,1]=o*(0.160564742956)*x_ref[1]**(o-1)+(-0.681831134057)
-        ref[2,3,0]=o*(0.892258488111)*x_ref[0]**(o-1)+(0.752252063583)
-        ref[2,3,1]=o*(0.853514779349)*x_ref[1]**(o-1)+(-0.181884189513)
-        ref[2,4,0]=o*(-0.824886296933)*x_ref[0]**(o-1)+(0.211931432354)
-        ref[2,4,1]=o*(0.924362197939)*x_ref[1]**(o-1)+(0.036482432278)
-        ref[3,0,0]=o*(-0.0616004277583)*x_ref[0]**(o-1)+(-0.77338193907)
-        ref[3,0,1]=o*(-0.966899521855)*x_ref[1]**(o-1)+(-0.395764830291)
-        ref[3,1,0]=o*(-0.607976110595)*x_ref[0]**(o-1)+(-0.448875768616)
-        ref[3,1,1]=o*(-0.414034580078)*x_ref[1]**(o-1)+(0.185483819416)
-        ref[3,2,0]=o*(-0.918071244524)*x_ref[0]**(o-1)+(0.924225885038)
-        ref[3,2,1]=o*(0.418000509852)*x_ref[1]**(o-1)+(0.431330768344)
-        ref[3,3,0]=o*(0.897504318738)*x_ref[0]**(o-1)+(0.66265738089)
-        ref[3,3,1]=o*(0.720830604485)*x_ref[1]**(o-1)+(-0.713433930025)
-        ref[3,4,0]=o*(0.526823069245)*x_ref[0]**(o-1)+(-0.255965317744)
-        ref[3,4,1]=o*(-0.326371546564)*x_ref[1]**(o-1)+(-0.436881501009)
-      else:
-        arg[0,0]=(-0.66471814098)*x[0]**o+(0.417241001417)*x[0]+(-0.228677853733)*x[1]**o+(-0.706946716128)*x[1]+(0.977168565988)*x[2]**o+(-0.0293128613918)*x[2]
-        arg[0,1]=(-0.161577085067)*x[0]**o+(0.86957667281)*x[0]+(-0.246783815579)*x[1]**o+(0.495318651008)*x[1]+(-0.500962203485)*x[2]**o+(0.903521194042)*x[2]
-        arg[0,2]=(0.0764824142976)*x[0]**o+(-0.0831710166954)*x[0]+(0.538063052387)*x[1]**o+(0.472451075914)*x[1]+(-0.354702552367)*x[2]**o+(-0.820126246007)*x[2]
-        arg[0,3]=(-0.286219487301)*x[0]**o+(0.561959250696)*x[0]+(-0.65668352495)*x[1]**o+(-0.276560290133)*x[1]+(-0.500866980002)*x[2]**o+(0.71188245613)*x[2]
-        arg[0,4]=(-0.13704169085)*x[0]**o+(0.107954139186)*x[0]+(0.498233399424)*x[1]**o+(-0.201539549426)*x[1]+(-0.889578977028)*x[2]**o+(0.33670078332)*x[2]
-        arg[1,0]=(0.411075168668)*x[0]**o+(-0.982783292982)*x[0]+(0.919652087888)*x[1]**o+(0.657917523808)*x[1]+(-0.220747064163)*x[2]**o+(-0.65863499098)*x[2]
-        arg[1,1]=(0.978122893048)*x[0]**o+(-0.638310308996)*x[0]+(-0.182955841813)*x[1]**o+(0.386322350256)*x[1]+(0.0238129376001)*x[2]**o+(0.415141411589)*x[2]
-        arg[1,2]=(-0.410102590894)*x[0]**o+(-0.0527422034609)*x[0]+(0.218532590216)*x[1]**o+(0.338645963161)*x[1]+(-0.559262295901)*x[2]**o+(0.00154425206109)*x[2]
-        arg[1,3]=(-0.509603507286)*x[0]**o+(0.220014659177)*x[0]+(-0.850244819031)*x[1]**o+(0.851103142912)*x[1]+(0.485740207202)*x[2]**o+(0.625073715619)*x[2]
-        arg[1,4]=(-0.990056784415)*x[0]**o+(0.822920800823)*x[0]+(-0.310061384265)*x[1]**o+(-0.337394401914)*x[1]+(0.139776472055)*x[2]**o+(0.615477120599)*x[2]
-        arg[2,0]=(0.434733128443)*x[0]**o+(-0.23992608444)*x[0]+(0.532847685888)*x[1]**o+(0.641963266518)*x[1]+(-0.421857805771)*x[2]**o+(0.385408885641)*x[2]
-        arg[2,1]=(0.502146118236)*x[0]**o+(-0.476835388064)*x[0]+(-0.676891574566)*x[1]**o+(0.713401740075)*x[1]+(0.220183315534)*x[2]**o+(-0.863327755288)*x[2]
-        arg[2,2]=(-0.694614904655)*x[0]**o+(-0.881664834998)*x[0]+(0.318605270866)*x[1]**o+(0.55884249433)*x[1]+(0.286031997395)*x[2]**o+(-0.947477517785)*x[2]
-        arg[2,3]=(-0.046201338948)*x[0]**o+(-0.316456331808)*x[0]+(0.968975602807)*x[1]**o+(0.549024517551)*x[1]+(-0.473260734234)*x[2]**o+(0.889462696171)*x[2]
-        arg[2,4]=(0.316754513953)*x[0]**o+(0.43553288512)*x[0]+(0.962932728727)*x[1]**o+(0.887900662435)*x[1]+(-0.235820939423)*x[2]**o+(0.947057541177)*x[2]
-        arg[3,0]=(-0.835914763446)*x[0]**o+(-0.488811438785)*x[0]+(-0.573283060197)*x[1]**o+(0.963078263225)*x[1]+(0.601345307969)*x[2]**o+(-0.185658285596)*x[2]
-        arg[3,1]=(0.597606596118)*x[0]**o+(0.0839878651552)*x[0]+(0.0836232765815)*x[1]**o+(0.594866612681)*x[1]+(-0.361174348867)*x[2]**o+(0.701364726038)*x[2]
-        arg[3,2]=(-0.172328462662)*x[0]**o+(-0.856154059105)*x[0]+(0.533657669403)*x[1]**o+(-0.305657234912)*x[1]+(0.828787414246)*x[2]**o+(0.993286809537)*x[2]
-        arg[3,3]=(0.181845363409)*x[0]**o+(0.184210025662)*x[0]+(-0.538269933964)*x[1]**o+(0.731384195858)*x[1]+(0.900272670238)*x[2]**o+(-0.152731605913)*x[2]
-        arg[3,4]=(0.812640675362)*x[0]**o+(-0.330495179989)*x[0]+(0.455533774723)*x[1]**o+(0.32100819695)*x[1]+(-0.332730198093)*x[2]**o+(-0.692589097458)*x[2]
-        ref[0,0,0]=o*(-0.66471814098)*x_ref[0]**(o-1)+(0.417241001417)
-        ref[0,0,1]=o*(-0.228677853733)*x_ref[1]**(o-1)+(-0.706946716128)
-        ref[0,0,2]=o*(0.977168565988)*x_ref[2]**(o-1)+(-0.0293128613918)
-        ref[0,1,0]=o*(-0.161577085067)*x_ref[0]**(o-1)+(0.86957667281)
-        ref[0,1,1]=o*(-0.246783815579)*x_ref[1]**(o-1)+(0.495318651008)
-        ref[0,1,2]=o*(-0.500962203485)*x_ref[2]**(o-1)+(0.903521194042)
-        ref[0,2,0]=o*(0.0764824142976)*x_ref[0]**(o-1)+(-0.0831710166954)
-        ref[0,2,1]=o*(0.538063052387)*x_ref[1]**(o-1)+(0.472451075914)
-        ref[0,2,2]=o*(-0.354702552367)*x_ref[2]**(o-1)+(-0.820126246007)
-        ref[0,3,0]=o*(-0.286219487301)*x_ref[0]**(o-1)+(0.561959250696)
-        ref[0,3,1]=o*(-0.65668352495)*x_ref[1]**(o-1)+(-0.276560290133)
-        ref[0,3,2]=o*(-0.500866980002)*x_ref[2]**(o-1)+(0.71188245613)
-        ref[0,4,0]=o*(-0.13704169085)*x_ref[0]**(o-1)+(0.107954139186)
-        ref[0,4,1]=o*(0.498233399424)*x_ref[1]**(o-1)+(-0.201539549426)
-        ref[0,4,2]=o*(-0.889578977028)*x_ref[2]**(o-1)+(0.33670078332)
-        ref[1,0,0]=o*(0.411075168668)*x_ref[0]**(o-1)+(-0.982783292982)
-        ref[1,0,1]=o*(0.919652087888)*x_ref[1]**(o-1)+(0.657917523808)
-        ref[1,0,2]=o*(-0.220747064163)*x_ref[2]**(o-1)+(-0.65863499098)
-        ref[1,1,0]=o*(0.978122893048)*x_ref[0]**(o-1)+(-0.638310308996)
-        ref[1,1,1]=o*(-0.182955841813)*x_ref[1]**(o-1)+(0.386322350256)
-        ref[1,1,2]=o*(0.0238129376001)*x_ref[2]**(o-1)+(0.415141411589)
-        ref[1,2,0]=o*(-0.410102590894)*x_ref[0]**(o-1)+(-0.0527422034609)
-        ref[1,2,1]=o*(0.218532590216)*x_ref[1]**(o-1)+(0.338645963161)
-        ref[1,2,2]=o*(-0.559262295901)*x_ref[2]**(o-1)+(0.00154425206109)
-        ref[1,3,0]=o*(-0.509603507286)*x_ref[0]**(o-1)+(0.220014659177)
-        ref[1,3,1]=o*(-0.850244819031)*x_ref[1]**(o-1)+(0.851103142912)
-        ref[1,3,2]=o*(0.485740207202)*x_ref[2]**(o-1)+(0.625073715619)
-        ref[1,4,0]=o*(-0.990056784415)*x_ref[0]**(o-1)+(0.822920800823)
-        ref[1,4,1]=o*(-0.310061384265)*x_ref[1]**(o-1)+(-0.337394401914)
-        ref[1,4,2]=o*(0.139776472055)*x_ref[2]**(o-1)+(0.615477120599)
-        ref[2,0,0]=o*(0.434733128443)*x_ref[0]**(o-1)+(-0.23992608444)
-        ref[2,0,1]=o*(0.532847685888)*x_ref[1]**(o-1)+(0.641963266518)
-        ref[2,0,2]=o*(-0.421857805771)*x_ref[2]**(o-1)+(0.385408885641)
-        ref[2,1,0]=o*(0.502146118236)*x_ref[0]**(o-1)+(-0.476835388064)
-        ref[2,1,1]=o*(-0.676891574566)*x_ref[1]**(o-1)+(0.713401740075)
-        ref[2,1,2]=o*(0.220183315534)*x_ref[2]**(o-1)+(-0.863327755288)
-        ref[2,2,0]=o*(-0.694614904655)*x_ref[0]**(o-1)+(-0.881664834998)
-        ref[2,2,1]=o*(0.318605270866)*x_ref[1]**(o-1)+(0.55884249433)
-        ref[2,2,2]=o*(0.286031997395)*x_ref[2]**(o-1)+(-0.947477517785)
-        ref[2,3,0]=o*(-0.046201338948)*x_ref[0]**(o-1)+(-0.316456331808)
-        ref[2,3,1]=o*(0.968975602807)*x_ref[1]**(o-1)+(0.549024517551)
-        ref[2,3,2]=o*(-0.473260734234)*x_ref[2]**(o-1)+(0.889462696171)
-        ref[2,4,0]=o*(0.316754513953)*x_ref[0]**(o-1)+(0.43553288512)
-        ref[2,4,1]=o*(0.962932728727)*x_ref[1]**(o-1)+(0.887900662435)
-        ref[2,4,2]=o*(-0.235820939423)*x_ref[2]**(o-1)+(0.947057541177)
-        ref[3,0,0]=o*(-0.835914763446)*x_ref[0]**(o-1)+(-0.488811438785)
-        ref[3,0,1]=o*(-0.573283060197)*x_ref[1]**(o-1)+(0.963078263225)
-        ref[3,0,2]=o*(0.601345307969)*x_ref[2]**(o-1)+(-0.185658285596)
-        ref[3,1,0]=o*(0.597606596118)*x_ref[0]**(o-1)+(0.0839878651552)
-        ref[3,1,1]=o*(0.0836232765815)*x_ref[1]**(o-1)+(0.594866612681)
-        ref[3,1,2]=o*(-0.361174348867)*x_ref[2]**(o-1)+(0.701364726038)
-        ref[3,2,0]=o*(-0.172328462662)*x_ref[0]**(o-1)+(-0.856154059105)
-        ref[3,2,1]=o*(0.533657669403)*x_ref[1]**(o-1)+(-0.305657234912)
-        ref[3,2,2]=o*(0.828787414246)*x_ref[2]**(o-1)+(0.993286809537)
-        ref[3,3,0]=o*(0.181845363409)*x_ref[0]**(o-1)+(0.184210025662)
-        ref[3,3,1]=o*(-0.538269933964)*x_ref[1]**(o-1)+(0.731384195858)
-        ref[3,3,2]=o*(0.900272670238)*x_ref[2]**(o-1)+(-0.152731605913)
-        ref[3,4,0]=o*(0.812640675362)*x_ref[0]**(o-1)+(-0.330495179989)
-        ref[3,4,1]=o*(0.455533774723)*x_ref[1]**(o-1)+(0.32100819695)
-        ref[3,4,2]=o*(-0.332730198093)*x_ref[2]**(o-1)+(-0.692589097458)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnBoundary
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.253396883727)*x[0]**o+(0.491235248599)*x[0]+(-0.468734602938)*x[1]**o+(0.730479725967)*x[1]
-        arg[0,0,1]=(0.344036208598)*x[0]**o+(-0.394302857752)*x[0]+(-0.608765577652)*x[1]**o+(-0.564065946953)*x[1]
-        arg[0,1,0]=(-0.84520693538)*x[0]**o+(0.934285247148)*x[0]+(0.0841237910789)*x[1]**o+(0.455488803423)*x[1]
-        arg[0,1,1]=(0.484027534363)*x[0]**o+(-0.374633264234)*x[0]+(-0.0665482018417)*x[1]**o+(0.528984445833)*x[1]
-        arg[1,0,0]=(-0.470188044426)*x[0]**o+(-0.328178128746)*x[0]+(0.67571857307)*x[1]**o+(0.116985630247)*x[1]
-        arg[1,0,1]=(0.986586449605)*x[0]**o+(-0.25691197068)*x[0]+(0.755235660838)*x[1]**o+(0.211004338524)*x[1]
-        arg[1,1,0]=(-0.569322712396)*x[0]**o+(0.900009729013)*x[0]+(0.748881276361)*x[1]**o+(0.850464087662)*x[1]
-        arg[1,1,1]=(0.625042758036)*x[0]**o+(-0.72757111333)*x[0]+(-0.986053078492)*x[1]**o+(-0.633517003425)*x[1]
-        arg[2,0,0]=(-0.716192724085)*x[0]**o+(-0.23327162426)*x[0]+(0.206440629344)*x[1]**o+(0.816324161671)*x[1]
-        arg[2,0,1]=(-0.803679553386)*x[0]**o+(0.445433027195)*x[0]+(-0.111465589792)*x[1]**o+(-0.109772986088)*x[1]
-        arg[2,1,0]=(0.374386571048)*x[0]**o+(-0.317187375606)*x[0]+(0.133248401591)*x[1]**o+(-0.971347533424)*x[1]
-        arg[2,1,1]=(-0.48476474399)*x[0]**o+(0.979379654323)*x[0]+(0.371437992948)*x[1]**o+(-0.110228097225)*x[1]
-        arg[3,0,0]=(0.37507701433)*x[0]**o+(0.451375135714)*x[0]+(0.228204578568)*x[1]**o+(0.0935454426192)*x[1]
-        arg[3,0,1]=(-0.322375030256)*x[0]**o+(-0.0412650889525)*x[0]+(0.23495348361)*x[1]**o+(-0.704960519241)*x[1]
-        arg[3,1,0]=(-0.478413043796)*x[0]**o+(0.373637701709)*x[0]+(0.346845166424)*x[1]**o+(0.00492075723836)*x[1]
-        arg[3,1,1]=(0.0753795682919)*x[0]**o+(0.51446748543)*x[0]+(-0.337079735899)*x[1]**o+(0.976335320865)*x[1]
-        arg[4,0,0]=(0.173293972121)*x[0]**o+(0.78972296986)*x[0]+(-0.518624390388)*x[1]**o+(-0.587962330417)*x[1]
-        arg[4,0,1]=(0.747393467297)*x[0]**o+(0.940132823774)*x[0]+(-0.292996377712)*x[1]**o+(0.980334604245)*x[1]
-        arg[4,1,0]=(-0.836497499117)*x[0]**o+(0.625161912911)*x[0]+(0.978929091652)*x[1]**o+(-0.676430396031)*x[1]
-        arg[4,1,1]=(-0.195907406253)*x[0]**o+(-0.388427741642)*x[0]+(0.233500679929)*x[1]**o+(0.535047073421)*x[1]
-        arg[5,0,0]=(0.983591245443)*x[0]**o+(-0.356589240979)*x[0]+(0.328974933764)*x[1]**o+(-0.875152262477)*x[1]
-        arg[5,0,1]=(0.901430256705)*x[0]**o+(0.74247442514)*x[0]+(0.189211012786)*x[1]**o+(0.930520401277)*x[1]
-        arg[5,1,0]=(-0.319591878243)*x[0]**o+(0.174836571432)*x[0]+(0.953875085784)*x[1]**o+(-0.51684941838)*x[1]
-        arg[5,1,1]=(-0.916869714992)*x[0]**o+(0.121572609124)*x[0]+(0.791850838139)*x[1]**o+(-0.588663035087)*x[1]
-        ref[0,0,0,0]=o*(0.253396883727)*x_ref[0]**(o-1)+(0.491235248599)
-        ref[0,0,0,1]=o*(-0.468734602938)*x_ref[1]**(o-1)+(0.730479725967)
-        ref[0,0,1,0]=o*(0.344036208598)*x_ref[0]**(o-1)+(-0.394302857752)
-        ref[0,0,1,1]=o*(-0.608765577652)*x_ref[1]**(o-1)+(-0.564065946953)
-        ref[0,1,0,0]=o*(-0.84520693538)*x_ref[0]**(o-1)+(0.934285247148)
-        ref[0,1,0,1]=o*(0.0841237910789)*x_ref[1]**(o-1)+(0.455488803423)
-        ref[0,1,1,0]=o*(0.484027534363)*x_ref[0]**(o-1)+(-0.374633264234)
-        ref[0,1,1,1]=o*(-0.0665482018417)*x_ref[1]**(o-1)+(0.528984445833)
-        ref[1,0,0,0]=o*(-0.470188044426)*x_ref[0]**(o-1)+(-0.328178128746)
-        ref[1,0,0,1]=o*(0.67571857307)*x_ref[1]**(o-1)+(0.116985630247)
-        ref[1,0,1,0]=o*(0.986586449605)*x_ref[0]**(o-1)+(-0.25691197068)
-        ref[1,0,1,1]=o*(0.755235660838)*x_ref[1]**(o-1)+(0.211004338524)
-        ref[1,1,0,0]=o*(-0.569322712396)*x_ref[0]**(o-1)+(0.900009729013)
-        ref[1,1,0,1]=o*(0.748881276361)*x_ref[1]**(o-1)+(0.850464087662)
-        ref[1,1,1,0]=o*(0.625042758036)*x_ref[0]**(o-1)+(-0.72757111333)
-        ref[1,1,1,1]=o*(-0.986053078492)*x_ref[1]**(o-1)+(-0.633517003425)
-        ref[2,0,0,0]=o*(-0.716192724085)*x_ref[0]**(o-1)+(-0.23327162426)
-        ref[2,0,0,1]=o*(0.206440629344)*x_ref[1]**(o-1)+(0.816324161671)
-        ref[2,0,1,0]=o*(-0.803679553386)*x_ref[0]**(o-1)+(0.445433027195)
-        ref[2,0,1,1]=o*(-0.111465589792)*x_ref[1]**(o-1)+(-0.109772986088)
-        ref[2,1,0,0]=o*(0.374386571048)*x_ref[0]**(o-1)+(-0.317187375606)
-        ref[2,1,0,1]=o*(0.133248401591)*x_ref[1]**(o-1)+(-0.971347533424)
-        ref[2,1,1,0]=o*(-0.48476474399)*x_ref[0]**(o-1)+(0.979379654323)
-        ref[2,1,1,1]=o*(0.371437992948)*x_ref[1]**(o-1)+(-0.110228097225)
-        ref[3,0,0,0]=o*(0.37507701433)*x_ref[0]**(o-1)+(0.451375135714)
-        ref[3,0,0,1]=o*(0.228204578568)*x_ref[1]**(o-1)+(0.0935454426192)
-        ref[3,0,1,0]=o*(-0.322375030256)*x_ref[0]**(o-1)+(-0.0412650889525)
-        ref[3,0,1,1]=o*(0.23495348361)*x_ref[1]**(o-1)+(-0.704960519241)
-        ref[3,1,0,0]=o*(-0.478413043796)*x_ref[0]**(o-1)+(0.373637701709)
-        ref[3,1,0,1]=o*(0.346845166424)*x_ref[1]**(o-1)+(0.00492075723836)
-        ref[3,1,1,0]=o*(0.0753795682919)*x_ref[0]**(o-1)+(0.51446748543)
-        ref[3,1,1,1]=o*(-0.337079735899)*x_ref[1]**(o-1)+(0.976335320865)
-        ref[4,0,0,0]=o*(0.173293972121)*x_ref[0]**(o-1)+(0.78972296986)
-        ref[4,0,0,1]=o*(-0.518624390388)*x_ref[1]**(o-1)+(-0.587962330417)
-        ref[4,0,1,0]=o*(0.747393467297)*x_ref[0]**(o-1)+(0.940132823774)
-        ref[4,0,1,1]=o*(-0.292996377712)*x_ref[1]**(o-1)+(0.980334604245)
-        ref[4,1,0,0]=o*(-0.836497499117)*x_ref[0]**(o-1)+(0.625161912911)
-        ref[4,1,0,1]=o*(0.978929091652)*x_ref[1]**(o-1)+(-0.676430396031)
-        ref[4,1,1,0]=o*(-0.195907406253)*x_ref[0]**(o-1)+(-0.388427741642)
-        ref[4,1,1,1]=o*(0.233500679929)*x_ref[1]**(o-1)+(0.535047073421)
-        ref[5,0,0,0]=o*(0.983591245443)*x_ref[0]**(o-1)+(-0.356589240979)
-        ref[5,0,0,1]=o*(0.328974933764)*x_ref[1]**(o-1)+(-0.875152262477)
-        ref[5,0,1,0]=o*(0.901430256705)*x_ref[0]**(o-1)+(0.74247442514)
-        ref[5,0,1,1]=o*(0.189211012786)*x_ref[1]**(o-1)+(0.930520401277)
-        ref[5,1,0,0]=o*(-0.319591878243)*x_ref[0]**(o-1)+(0.174836571432)
-        ref[5,1,0,1]=o*(0.953875085784)*x_ref[1]**(o-1)+(-0.51684941838)
-        ref[5,1,1,0]=o*(-0.916869714992)*x_ref[0]**(o-1)+(0.121572609124)
-        ref[5,1,1,1]=o*(0.791850838139)*x_ref[1]**(o-1)+(-0.588663035087)
-      else:
-        arg[0,0,0]=(-0.513971266383)*x[0]**o+(-0.117127749421)*x[0]+(-0.551292004692)*x[1]**o+(-0.268920693702)*x[1]+(0.0872538366694)*x[2]**o+(0.855491592762)*x[2]
-        arg[0,0,1]=(0.156425207213)*x[0]**o+(-0.299808724719)*x[0]+(0.827383156334)*x[1]**o+(-0.594506082498)*x[1]+(-0.289589281068)*x[2]**o+(0.559159349352)*x[2]
-        arg[0,1,0]=(-0.925822763448)*x[0]**o+(0.518052108584)*x[0]+(-0.774761536373)*x[1]**o+(-0.0329613155479)*x[1]+(0.957805160206)*x[2]**o+(0.0606445544683)*x[2]
-        arg[0,1,1]=(-0.337663244379)*x[0]**o+(-0.634947360886)*x[0]+(0.232117517887)*x[1]**o+(-0.534317817241)*x[1]+(0.554880796818)*x[2]**o+(-0.3101266685)*x[2]
-        arg[1,0,0]=(-0.888548906608)*x[0]**o+(0.517747675888)*x[0]+(-0.614381113253)*x[1]**o+(-0.757891891198)*x[1]+(0.618261909378)*x[2]**o+(-0.0853347346644)*x[2]
-        arg[1,0,1]=(-0.686920109418)*x[0]**o+(0.000673193523604)*x[0]+(0.251800447271)*x[1]**o+(-0.105619412646)*x[1]+(0.00990847148242)*x[2]**o+(0.861798595402)*x[2]
-        arg[1,1,0]=(0.170484209485)*x[0]**o+(-0.620257643847)*x[0]+(0.057743430303)*x[1]**o+(0.0640298192279)*x[1]+(0.0757100493935)*x[2]**o+(-0.414863410391)*x[2]
-        arg[1,1,1]=(-0.714807290039)*x[0]**o+(-0.562420622765)*x[0]+(0.788769732877)*x[1]**o+(-0.472413621829)*x[1]+(-0.466159435785)*x[2]**o+(-0.476510555737)*x[2]
-        arg[2,0,0]=(0.875340499144)*x[0]**o+(-0.598283854175)*x[0]+(0.206593884126)*x[1]**o+(-0.987568956833)*x[1]+(0.666527095968)*x[2]**o+(-0.352753155564)*x[2]
-        arg[2,0,1]=(0.677005187408)*x[0]**o+(0.760176905882)*x[0]+(-0.0863648949101)*x[1]**o+(-0.607384058071)*x[1]+(-0.117434466077)*x[2]**o+(-0.670292588633)*x[2]
-        arg[2,1,0]=(0.888629811684)*x[0]**o+(0.35826389662)*x[0]+(0.00390435387028)*x[1]**o+(-0.0937518531166)*x[1]+(-0.365569888759)*x[2]**o+(0.380035526283)*x[2]
-        arg[2,1,1]=(0.138275666033)*x[0]**o+(-0.437710809963)*x[0]+(0.773451227027)*x[1]**o+(0.834016138485)*x[1]+(0.847339165612)*x[2]**o+(-0.417687340903)*x[2]
-        arg[3,0,0]=(-0.298714836243)*x[0]**o+(-0.268961434956)*x[0]+(0.232096942083)*x[1]**o+(-0.455570990604)*x[1]+(-0.294542554349)*x[2]**o+(-0.37112817156)*x[2]
-        arg[3,0,1]=(0.0903365333358)*x[0]**o+(0.338265717129)*x[0]+(-0.755237281599)*x[1]**o+(-0.608535543682)*x[1]+(0.812136572153)*x[2]**o+(-0.146674314466)*x[2]
-        arg[3,1,0]=(0.159422014459)*x[0]**o+(0.899761817668)*x[0]+(0.467507279621)*x[1]**o+(0.47028740641)*x[1]+(-0.905453092566)*x[2]**o+(0.325443171334)*x[2]
-        arg[3,1,1]=(0.706113787474)*x[0]**o+(0.411358047385)*x[0]+(0.710178001185)*x[1]**o+(-0.248170072927)*x[1]+(0.2228478152)*x[2]**o+(-0.6845238748)*x[2]
-        arg[4,0,0]=(-0.810987300482)*x[0]**o+(-0.20061683347)*x[0]+(-0.362480203096)*x[1]**o+(0.23493442788)*x[1]+(-0.0262576869803)*x[2]**o+(0.40114062378)*x[2]
-        arg[4,0,1]=(-0.0377982138529)*x[0]**o+(-0.844585963856)*x[0]+(-0.94360590097)*x[1]**o+(-0.775666510211)*x[1]+(-0.484314539768)*x[2]**o+(0.472661289406)*x[2]
-        arg[4,1,0]=(0.579937359489)*x[0]**o+(0.384020744083)*x[0]+(-0.303096661906)*x[1]**o+(-0.0640353004314)*x[1]+(0.693425296881)*x[2]**o+(0.410980796125)*x[2]
-        arg[4,1,1]=(0.152139667717)*x[0]**o+(-0.49610371397)*x[0]+(-0.884008900347)*x[1]**o+(-0.364570486388)*x[1]+(0.126918854811)*x[2]**o+(0.409453971802)*x[2]
-        arg[5,0,0]=(0.409834559571)*x[0]**o+(-0.347724104753)*x[0]+(-0.263327417846)*x[1]**o+(0.18147743546)*x[1]+(-0.399848371177)*x[2]**o+(0.928317631431)*x[2]
-        arg[5,0,1]=(-0.686702422025)*x[0]**o+(-0.918530462662)*x[0]+(0.478936304167)*x[1]**o+(-0.641691106861)*x[1]+(-0.582780732375)*x[2]**o+(0.30255037752)*x[2]
-        arg[5,1,0]=(0.50568688101)*x[0]**o+(0.378682510558)*x[0]+(0.59801824354)*x[1]**o+(-0.316028163905)*x[1]+(-0.554966057648)*x[2]**o+(0.637313154931)*x[2]
-        arg[5,1,1]=(0.300318472719)*x[0]**o+(-0.794010312167)*x[0]+(-0.314402790698)*x[1]**o+(0.991870648498)*x[1]+(0.949603731589)*x[2]**o+(-0.302054056398)*x[2]
-        ref[0,0,0,0]=o*(-0.513971266383)*x_ref[0]**(o-1)+(-0.117127749421)
-        ref[0,0,0,1]=o*(-0.551292004692)*x_ref[1]**(o-1)+(-0.268920693702)
-        ref[0,0,0,2]=o*(0.0872538366694)*x_ref[2]**(o-1)+(0.855491592762)
-        ref[0,0,1,0]=o*(0.156425207213)*x_ref[0]**(o-1)+(-0.299808724719)
-        ref[0,0,1,1]=o*(0.827383156334)*x_ref[1]**(o-1)+(-0.594506082498)
-        ref[0,0,1,2]=o*(-0.289589281068)*x_ref[2]**(o-1)+(0.559159349352)
-        ref[0,1,0,0]=o*(-0.925822763448)*x_ref[0]**(o-1)+(0.518052108584)
-        ref[0,1,0,1]=o*(-0.774761536373)*x_ref[1]**(o-1)+(-0.0329613155479)
-        ref[0,1,0,2]=o*(0.957805160206)*x_ref[2]**(o-1)+(0.0606445544683)
-        ref[0,1,1,0]=o*(-0.337663244379)*x_ref[0]**(o-1)+(-0.634947360886)
-        ref[0,1,1,1]=o*(0.232117517887)*x_ref[1]**(o-1)+(-0.534317817241)
-        ref[0,1,1,2]=o*(0.554880796818)*x_ref[2]**(o-1)+(-0.3101266685)
-        ref[1,0,0,0]=o*(-0.888548906608)*x_ref[0]**(o-1)+(0.517747675888)
-        ref[1,0,0,1]=o*(-0.614381113253)*x_ref[1]**(o-1)+(-0.757891891198)
-        ref[1,0,0,2]=o*(0.618261909378)*x_ref[2]**(o-1)+(-0.0853347346644)
-        ref[1,0,1,0]=o*(-0.686920109418)*x_ref[0]**(o-1)+(0.000673193523604)
-        ref[1,0,1,1]=o*(0.251800447271)*x_ref[1]**(o-1)+(-0.105619412646)
-        ref[1,0,1,2]=o*(0.00990847148242)*x_ref[2]**(o-1)+(0.861798595402)
-        ref[1,1,0,0]=o*(0.170484209485)*x_ref[0]**(o-1)+(-0.620257643847)
-        ref[1,1,0,1]=o*(0.057743430303)*x_ref[1]**(o-1)+(0.0640298192279)
-        ref[1,1,0,2]=o*(0.0757100493935)*x_ref[2]**(o-1)+(-0.414863410391)
-        ref[1,1,1,0]=o*(-0.714807290039)*x_ref[0]**(o-1)+(-0.562420622765)
-        ref[1,1,1,1]=o*(0.788769732877)*x_ref[1]**(o-1)+(-0.472413621829)
-        ref[1,1,1,2]=o*(-0.466159435785)*x_ref[2]**(o-1)+(-0.476510555737)
-        ref[2,0,0,0]=o*(0.875340499144)*x_ref[0]**(o-1)+(-0.598283854175)
-        ref[2,0,0,1]=o*(0.206593884126)*x_ref[1]**(o-1)+(-0.987568956833)
-        ref[2,0,0,2]=o*(0.666527095968)*x_ref[2]**(o-1)+(-0.352753155564)
-        ref[2,0,1,0]=o*(0.677005187408)*x_ref[0]**(o-1)+(0.760176905882)
-        ref[2,0,1,1]=o*(-0.0863648949101)*x_ref[1]**(o-1)+(-0.607384058071)
-        ref[2,0,1,2]=o*(-0.117434466077)*x_ref[2]**(o-1)+(-0.670292588633)
-        ref[2,1,0,0]=o*(0.888629811684)*x_ref[0]**(o-1)+(0.35826389662)
-        ref[2,1,0,1]=o*(0.00390435387028)*x_ref[1]**(o-1)+(-0.0937518531166)
-        ref[2,1,0,2]=o*(-0.365569888759)*x_ref[2]**(o-1)+(0.380035526283)
-        ref[2,1,1,0]=o*(0.138275666033)*x_ref[0]**(o-1)+(-0.437710809963)
-        ref[2,1,1,1]=o*(0.773451227027)*x_ref[1]**(o-1)+(0.834016138485)
-        ref[2,1,1,2]=o*(0.847339165612)*x_ref[2]**(o-1)+(-0.417687340903)
-        ref[3,0,0,0]=o*(-0.298714836243)*x_ref[0]**(o-1)+(-0.268961434956)
-        ref[3,0,0,1]=o*(0.232096942083)*x_ref[1]**(o-1)+(-0.455570990604)
-        ref[3,0,0,2]=o*(-0.294542554349)*x_ref[2]**(o-1)+(-0.37112817156)
-        ref[3,0,1,0]=o*(0.0903365333358)*x_ref[0]**(o-1)+(0.338265717129)
-        ref[3,0,1,1]=o*(-0.755237281599)*x_ref[1]**(o-1)+(-0.608535543682)
-        ref[3,0,1,2]=o*(0.812136572153)*x_ref[2]**(o-1)+(-0.146674314466)
-        ref[3,1,0,0]=o*(0.159422014459)*x_ref[0]**(o-1)+(0.899761817668)
-        ref[3,1,0,1]=o*(0.467507279621)*x_ref[1]**(o-1)+(0.47028740641)
-        ref[3,1,0,2]=o*(-0.905453092566)*x_ref[2]**(o-1)+(0.325443171334)
-        ref[3,1,1,0]=o*(0.706113787474)*x_ref[0]**(o-1)+(0.411358047385)
-        ref[3,1,1,1]=o*(0.710178001185)*x_ref[1]**(o-1)+(-0.248170072927)
-        ref[3,1,1,2]=o*(0.2228478152)*x_ref[2]**(o-1)+(-0.6845238748)
-        ref[4,0,0,0]=o*(-0.810987300482)*x_ref[0]**(o-1)+(-0.20061683347)
-        ref[4,0,0,1]=o*(-0.362480203096)*x_ref[1]**(o-1)+(0.23493442788)
-        ref[4,0,0,2]=o*(-0.0262576869803)*x_ref[2]**(o-1)+(0.40114062378)
-        ref[4,0,1,0]=o*(-0.0377982138529)*x_ref[0]**(o-1)+(-0.844585963856)
-        ref[4,0,1,1]=o*(-0.94360590097)*x_ref[1]**(o-1)+(-0.775666510211)
-        ref[4,0,1,2]=o*(-0.484314539768)*x_ref[2]**(o-1)+(0.472661289406)
-        ref[4,1,0,0]=o*(0.579937359489)*x_ref[0]**(o-1)+(0.384020744083)
-        ref[4,1,0,1]=o*(-0.303096661906)*x_ref[1]**(o-1)+(-0.0640353004314)
-        ref[4,1,0,2]=o*(0.693425296881)*x_ref[2]**(o-1)+(0.410980796125)
-        ref[4,1,1,0]=o*(0.152139667717)*x_ref[0]**(o-1)+(-0.49610371397)
-        ref[4,1,1,1]=o*(-0.884008900347)*x_ref[1]**(o-1)+(-0.364570486388)
-        ref[4,1,1,2]=o*(0.126918854811)*x_ref[2]**(o-1)+(0.409453971802)
-        ref[5,0,0,0]=o*(0.409834559571)*x_ref[0]**(o-1)+(-0.347724104753)
-        ref[5,0,0,1]=o*(-0.263327417846)*x_ref[1]**(o-1)+(0.18147743546)
-        ref[5,0,0,2]=o*(-0.399848371177)*x_ref[2]**(o-1)+(0.928317631431)
-        ref[5,0,1,0]=o*(-0.686702422025)*x_ref[0]**(o-1)+(-0.918530462662)
-        ref[5,0,1,1]=o*(0.478936304167)*x_ref[1]**(o-1)+(-0.641691106861)
-        ref[5,0,1,2]=o*(-0.582780732375)*x_ref[2]**(o-1)+(0.30255037752)
-        ref[5,1,0,0]=o*(0.50568688101)*x_ref[0]**(o-1)+(0.378682510558)
-        ref[5,1,0,1]=o*(0.59801824354)*x_ref[1]**(o-1)+(-0.316028163905)
-        ref[5,1,0,2]=o*(-0.554966057648)*x_ref[2]**(o-1)+(0.637313154931)
-        ref[5,1,1,0]=o*(0.300318472719)*x_ref[0]**(o-1)+(-0.794010312167)
-        ref[5,1,1,1]=o*(-0.314402790698)*x_ref[1]**(o-1)+(0.991870648498)
-        ref[5,1,1,2]=o*(0.949603731589)*x_ref[2]**(o-1)+(-0.302054056398)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.306947418999)*x[0]+(-0.706616694784)*x[1]
-        ref[0]=(0.306947418999)
-        ref[1]=(-0.706616694784)
-      else:
-        arg=(0.490435692707)*x[0]+(0.929248719763)*x[1]+(0.269868131113)*x[2]
-        ref[0]=(0.490435692707)
-        ref[1]=(0.929248719763)
-        ref[2]=(0.269868131113)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.882633673888)*x[0]+(-0.790592442848)*x[1]
-        arg[1]=(1.55495669126)*x[0]+(0.496011926182)*x[1]
-        ref[0,0]=(-0.882633673888)
-        ref[0,1]=(-0.790592442848)
-        ref[1,0]=(1.55495669126)
-        ref[1,1]=(0.496011926182)
-      else:
-        arg[0]=(0.683098278161)*x[0]+(-0.151590511238)*x[1]+(0.54461031868)*x[2]
-        arg[1]=(0.59998040214)*x[0]+(-0.995466442084)*x[1]+(-1.09468062911)*x[2]
-        ref[0,0]=(0.683098278161)
-        ref[0,1]=(-0.151590511238)
-        ref[0,2]=(0.54461031868)
-        ref[1,0]=(0.59998040214)
-        ref[1,1]=(-0.995466442084)
-        ref[1,2]=(-1.09468062911)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.159129528541)*x[0]+(0.107835972384)*x[1]
-        arg[0,1]=(-1.52388770934)*x[0]+(0.262089610596)*x[1]
-        arg[0,2]=(0.505454501555)*x[0]+(-0.247061440744)*x[1]
-        arg[0,3]=(-0.556075420202)*x[0]+(0.702144110506)*x[1]
-        arg[0,4]=(0.810518335626)*x[0]+(-0.76077949525)*x[1]
-        arg[1,0]=(-0.491052732808)*x[0]+(-0.272913467279)*x[1]
-        arg[1,1]=(0.0141908236388)*x[0]+(1.10868804645)*x[1]
-        arg[1,2]=(0.719028425382)*x[0]+(-0.544780305018)*x[1]
-        arg[1,3]=(-1.15474920716)*x[0]+(0.888461325396)*x[1]
-        arg[1,4]=(-0.842901893766)*x[0]+(-0.465916012282)*x[1]
-        arg[2,0]=(1.24606386746)*x[0]+(0.817235825831)*x[1]
-        arg[2,1]=(0.400861923494)*x[0]+(1.24545704982)*x[1]
-        arg[2,2]=(0.656546253691)*x[0]+(-0.0269228973404)*x[1]
-        arg[2,3]=(-0.590512343874)*x[0]+(-0.0654952556025)*x[1]
-        arg[2,4]=(0.806342618281)*x[0]+(-0.183166204195)*x[1]
-        arg[3,0]=(0.637045776935)*x[0]+(-0.512820906995)*x[1]
-        arg[3,1]=(-0.596216711833)*x[0]+(-0.221853749777)*x[1]
-        arg[3,2]=(0.113235739927)*x[0]+(-0.210641618992)*x[1]
-        arg[3,3]=(-1.11423980423)*x[0]+(-1.46748285012)*x[1]
-        arg[3,4]=(0.573260999643)*x[0]+(0.55016627172)*x[1]
-        ref[0,0,0]=(-0.159129528541)
-        ref[0,0,1]=(0.107835972384)
-        ref[0,1,0]=(-1.52388770934)
-        ref[0,1,1]=(0.262089610596)
-        ref[0,2,0]=(0.505454501555)
-        ref[0,2,1]=(-0.247061440744)
-        ref[0,3,0]=(-0.556075420202)
-        ref[0,3,1]=(0.702144110506)
-        ref[0,4,0]=(0.810518335626)
-        ref[0,4,1]=(-0.76077949525)
-        ref[1,0,0]=(-0.491052732808)
-        ref[1,0,1]=(-0.272913467279)
-        ref[1,1,0]=(0.0141908236388)
-        ref[1,1,1]=(1.10868804645)
-        ref[1,2,0]=(0.719028425382)
-        ref[1,2,1]=(-0.544780305018)
-        ref[1,3,0]=(-1.15474920716)
-        ref[1,3,1]=(0.888461325396)
-        ref[1,4,0]=(-0.842901893766)
-        ref[1,4,1]=(-0.465916012282)
-        ref[2,0,0]=(1.24606386746)
-        ref[2,0,1]=(0.817235825831)
-        ref[2,1,0]=(0.400861923494)
-        ref[2,1,1]=(1.24545704982)
-        ref[2,2,0]=(0.656546253691)
-        ref[2,2,1]=(-0.0269228973404)
-        ref[2,3,0]=(-0.590512343874)
-        ref[2,3,1]=(-0.0654952556025)
-        ref[2,4,0]=(0.806342618281)
-        ref[2,4,1]=(-0.183166204195)
-        ref[3,0,0]=(0.637045776935)
-        ref[3,0,1]=(-0.512820906995)
-        ref[3,1,0]=(-0.596216711833)
-        ref[3,1,1]=(-0.221853749777)
-        ref[3,2,0]=(0.113235739927)
-        ref[3,2,1]=(-0.210641618992)
-        ref[3,3,0]=(-1.11423980423)
-        ref[3,3,1]=(-1.46748285012)
-        ref[3,4,0]=(0.573260999643)
-        ref[3,4,1]=(0.55016627172)
-      else:
-        arg[0,0]=(-0.025505130975)*x[0]+(-0.128352022583)*x[1]+(-0.0645809876948)*x[2]
-        arg[0,1]=(-0.974556985555)*x[0]+(0.503751568036)*x[1]+(-0.524784840232)*x[2]
-        arg[0,2]=(-1.23653778531)*x[0]+(-0.73883453445)*x[1]+(-1.59259101746)*x[2]
-        arg[0,3]=(-0.543656268618)*x[0]+(0.110486603472)*x[1]+(-0.636246757745)*x[2]
-        arg[0,4]=(-0.566088225133)*x[0]+(-0.272577812471)*x[1]+(-0.282075405014)*x[2]
-        arg[1,0]=(-0.28252305722)*x[0]+(0.497103425073)*x[1]+(0.997942367464)*x[2]
-        arg[1,1]=(-0.444059543356)*x[0]+(-0.149004039444)*x[1]+(-0.871853047384)*x[2]
-        arg[1,2]=(-0.610830496789)*x[0]+(0.196494475826)*x[1]+(0.0123852343883)*x[2]
-        arg[1,3]=(-0.327903465165)*x[0]+(0.523560519595)*x[1]+(-0.409961704581)*x[2]
-        arg[1,4]=(0.633897214746)*x[0]+(-0.9032002551)*x[1]+(0.624042996391)*x[2]
-        arg[2,0]=(0.469489049636)*x[0]+(1.46158418286)*x[1]+(-0.538453674545)*x[2]
-        arg[2,1]=(0.0488906165423)*x[0]+(0.483867458959)*x[1]+(0.0419643463366)*x[2]
-        arg[2,2]=(-1.89716754038)*x[0]+(-0.577554008519)*x[1]+(-0.0328835832126)*x[2]
-        arg[2,3]=(0.507329501469)*x[0]+(0.354939444351)*x[1]+(0.0136766029313)*x[2]
-        arg[2,4]=(-0.313182267444)*x[0]+(-1.08684309178)*x[1]+(-1.39365968958)*x[2]
-        arg[3,0]=(0.272322829309)*x[0]+(-0.233645276231)*x[1]+(0.491500838791)*x[2]
-        arg[3,1]=(1.27603407856)*x[0]+(-0.709429989875)*x[1]+(-0.998371438244)*x[2]
-        arg[3,2]=(0.637972716248)*x[0]+(-1.37896009762)*x[1]+(0.496830616786)*x[2]
-        arg[3,3]=(-1.67735443481)*x[0]+(-0.741884420811)*x[1]+(1.23125805904)*x[2]
-        arg[3,4]=(-0.593290763881)*x[0]+(-0.881909104701)*x[1]+(-1.0425499934)*x[2]
-        ref[0,0,0]=(-0.025505130975)
-        ref[0,0,1]=(-0.128352022583)
-        ref[0,0,2]=(-0.0645809876948)
-        ref[0,1,0]=(-0.974556985555)
-        ref[0,1,1]=(0.503751568036)
-        ref[0,1,2]=(-0.524784840232)
-        ref[0,2,0]=(-1.23653778531)
-        ref[0,2,1]=(-0.73883453445)
-        ref[0,2,2]=(-1.59259101746)
-        ref[0,3,0]=(-0.543656268618)
-        ref[0,3,1]=(0.110486603472)
-        ref[0,3,2]=(-0.636246757745)
-        ref[0,4,0]=(-0.566088225133)
-        ref[0,4,1]=(-0.272577812471)
-        ref[0,4,2]=(-0.282075405014)
-        ref[1,0,0]=(-0.28252305722)
-        ref[1,0,1]=(0.497103425073)
-        ref[1,0,2]=(0.997942367464)
-        ref[1,1,0]=(-0.444059543356)
-        ref[1,1,1]=(-0.149004039444)
-        ref[1,1,2]=(-0.871853047384)
-        ref[1,2,0]=(-0.610830496789)
-        ref[1,2,1]=(0.196494475826)
-        ref[1,2,2]=(0.0123852343883)
-        ref[1,3,0]=(-0.327903465165)
-        ref[1,3,1]=(0.523560519595)
-        ref[1,3,2]=(-0.409961704581)
-        ref[1,4,0]=(0.633897214746)
-        ref[1,4,1]=(-0.9032002551)
-        ref[1,4,2]=(0.624042996391)
-        ref[2,0,0]=(0.469489049636)
-        ref[2,0,1]=(1.46158418286)
-        ref[2,0,2]=(-0.538453674545)
-        ref[2,1,0]=(0.0488906165423)
-        ref[2,1,1]=(0.483867458959)
-        ref[2,1,2]=(0.0419643463366)
-        ref[2,2,0]=(-1.89716754038)
-        ref[2,2,1]=(-0.577554008519)
-        ref[2,2,2]=(-0.0328835832126)
-        ref[2,3,0]=(0.507329501469)
-        ref[2,3,1]=(0.354939444351)
-        ref[2,3,2]=(0.0136766029313)
-        ref[2,4,0]=(-0.313182267444)
-        ref[2,4,1]=(-1.08684309178)
-        ref[2,4,2]=(-1.39365968958)
-        ref[3,0,0]=(0.272322829309)
-        ref[3,0,1]=(-0.233645276231)
-        ref[3,0,2]=(0.491500838791)
-        ref[3,1,0]=(1.27603407856)
-        ref[3,1,1]=(-0.709429989875)
-        ref[3,1,2]=(-0.998371438244)
-        ref[3,2,0]=(0.637972716248)
-        ref[3,2,1]=(-1.37896009762)
-        ref[3,2,2]=(0.496830616786)
-        ref[3,3,0]=(-1.67735443481)
-        ref[3,3,1]=(-0.741884420811)
-        ref[3,3,2]=(1.23125805904)
-        ref[3,4,0]=(-0.593290763881)
-        ref[3,4,1]=(-0.881909104701)
-        ref[3,4,2]=(-1.0425499934)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.289868084377)*x[0]+(-1.636093365)*x[1]
-        arg[0,0,1]=(0.841764493453)*x[0]+(-0.397262590373)*x[1]
-        arg[0,1,0]=(0.318610649633)*x[0]+(1.59837795884)*x[1]
-        arg[0,1,1]=(1.41408600658)*x[0]+(0.212012530707)*x[1]
-        arg[1,0,0]=(-1.13663878903)*x[0]+(-0.535752609596)*x[1]
-        arg[1,0,1]=(-0.795140440626)*x[0]+(-0.733456054749)*x[1]
-        arg[1,1,0]=(-0.174874940569)*x[0]+(0.304037654801)*x[1]
-        arg[1,1,1]=(0.835374268658)*x[0]+(0.645365790264)*x[1]
-        arg[2,0,0]=(0.684064169293)*x[0]+(-0.580502209076)*x[1]
-        arg[2,0,1]=(0.342542841673)*x[0]+(-0.620912562797)*x[1]
-        arg[2,1,0]=(-0.457226288553)*x[0]+(-0.163180645461)*x[1]
-        arg[2,1,1]=(-0.494067356015)*x[0]+(-0.604667785982)*x[1]
-        arg[3,0,0]=(-0.224173319974)*x[0]+(-0.288566962407)*x[1]
-        arg[3,0,1]=(-0.83578982053)*x[0]+(0.290663773612)*x[1]
-        arg[3,1,0]=(0.700494058094)*x[0]+(0.244036699451)*x[1]
-        arg[3,1,1]=(0.960756120912)*x[0]+(-0.129549309953)*x[1]
-        arg[4,0,0]=(0.942292060296)*x[0]+(-0.148922577041)*x[1]
-        arg[4,0,1]=(-0.363876552144)*x[0]+(0.903847614766)*x[1]
-        arg[4,1,0]=(-1.91719369833)*x[0]+(0.961392595186)*x[1]
-        arg[4,1,1]=(-0.141662097711)*x[0]+(-0.695061685931)*x[1]
-        arg[5,0,0]=(0.416693171023)*x[0]+(1.04455773845)*x[1]
-        arg[5,0,1]=(0.325327980312)*x[0]+(-1.01452792883)*x[1]
-        arg[5,1,0]=(-1.43970903355)*x[0]+(-1.04382682561)*x[1]
-        arg[5,1,1]=(-0.969700314248)*x[0]+(-0.286024748854)*x[1]
-        ref[0,0,0,0]=(0.289868084377)
-        ref[0,0,0,1]=(-1.636093365)
-        ref[0,0,1,0]=(0.841764493453)
-        ref[0,0,1,1]=(-0.397262590373)
-        ref[0,1,0,0]=(0.318610649633)
-        ref[0,1,0,1]=(1.59837795884)
-        ref[0,1,1,0]=(1.41408600658)
-        ref[0,1,1,1]=(0.212012530707)
-        ref[1,0,0,0]=(-1.13663878903)
-        ref[1,0,0,1]=(-0.535752609596)
-        ref[1,0,1,0]=(-0.795140440626)
-        ref[1,0,1,1]=(-0.733456054749)
-        ref[1,1,0,0]=(-0.174874940569)
-        ref[1,1,0,1]=(0.304037654801)
-        ref[1,1,1,0]=(0.835374268658)
-        ref[1,1,1,1]=(0.645365790264)
-        ref[2,0,0,0]=(0.684064169293)
-        ref[2,0,0,1]=(-0.580502209076)
-        ref[2,0,1,0]=(0.342542841673)
-        ref[2,0,1,1]=(-0.620912562797)
-        ref[2,1,0,0]=(-0.457226288553)
-        ref[2,1,0,1]=(-0.163180645461)
-        ref[2,1,1,0]=(-0.494067356015)
-        ref[2,1,1,1]=(-0.604667785982)
-        ref[3,0,0,0]=(-0.224173319974)
-        ref[3,0,0,1]=(-0.288566962407)
-        ref[3,0,1,0]=(-0.83578982053)
-        ref[3,0,1,1]=(0.290663773612)
-        ref[3,1,0,0]=(0.700494058094)
-        ref[3,1,0,1]=(0.244036699451)
-        ref[3,1,1,0]=(0.960756120912)
-        ref[3,1,1,1]=(-0.129549309953)
-        ref[4,0,0,0]=(0.942292060296)
-        ref[4,0,0,1]=(-0.148922577041)
-        ref[4,0,1,0]=(-0.363876552144)
-        ref[4,0,1,1]=(0.903847614766)
-        ref[4,1,0,0]=(-1.91719369833)
-        ref[4,1,0,1]=(0.961392595186)
-        ref[4,1,1,0]=(-0.141662097711)
-        ref[4,1,1,1]=(-0.695061685931)
-        ref[5,0,0,0]=(0.416693171023)
-        ref[5,0,0,1]=(1.04455773845)
-        ref[5,0,1,0]=(0.325327980312)
-        ref[5,0,1,1]=(-1.01452792883)
-        ref[5,1,0,0]=(-1.43970903355)
-        ref[5,1,0,1]=(-1.04382682561)
-        ref[5,1,1,0]=(-0.969700314248)
-        ref[5,1,1,1]=(-0.286024748854)
-      else:
-        arg[0,0,0]=(-1.52443210214)*x[0]+(-1.48020118993)*x[1]+(1.2552138343)*x[2]
-        arg[0,0,1]=(-0.102900544448)*x[0]+(-1.14209442568)*x[1]+(-0.975626338621)*x[2]
-        arg[0,1,0]=(0.909668629294)*x[0]+(1.29127341353)*x[1]+(-1.65221956404)*x[2]
-        arg[0,1,1]=(-0.00309732749698)*x[0]+(0.0561682749786)*x[1]+(0.330039911431)*x[2]
-        arg[1,0,0]=(0.966608417982)*x[0]+(-0.181702539284)*x[1]+(0.377393548129)*x[2]
-        arg[1,0,1]=(0.0273333293331)*x[0]+(0.745172228806)*x[1]+(0.756302500232)*x[2]
-        arg[1,1,0]=(-0.550382204645)*x[0]+(0.531191986475)*x[1]+(-1.02269665633)*x[2]
-        arg[1,1,1]=(-0.928522491259)*x[0]+(-1.25241213648)*x[1]+(0.635412990933)*x[2]
-        arg[2,0,0]=(-0.355234026557)*x[0]+(-1.69834232334)*x[1]+(1.17827811215)*x[2]
-        arg[2,0,1]=(-0.905805855166)*x[0]+(1.4023187683)*x[1]+(-0.570168366306)*x[2]
-        arg[2,1,0]=(0.550150523384)*x[0]+(-1.59933962526)*x[1]+(-0.388203251081)*x[2]
-        arg[2,1,1]=(0.138470563927)*x[0]+(0.245233545344)*x[1]+(-0.293840556681)*x[2]
-        arg[3,0,0]=(1.19700673733)*x[0]+(-1.04510591446)*x[1]+(1.03589008728)*x[2]
-        arg[3,0,1]=(0.713948123924)*x[0]+(-1.42841558036)*x[1]+(1.07248428525)*x[2]
-        arg[3,1,0]=(0.11223781122)*x[0]+(-0.00982612208261)*x[1]+(-0.263153847134)*x[2]
-        arg[3,1,1]=(1.33011049869)*x[0]+(0.691016997799)*x[1]+(-0.0547947379786)*x[2]
-        arg[4,0,0]=(1.0577224608)*x[0]+(-0.263034881475)*x[1]+(-0.854540775969)*x[2]
-        arg[4,0,1]=(0.686363734714)*x[0]+(0.198120868875)*x[1]+(1.46326635417)*x[2]
-        arg[4,1,0]=(-0.745244187008)*x[0]+(1.31766298118)*x[1]+(1.51544532829)*x[2]
-        arg[4,1,1]=(0.878390723411)*x[0]+(-0.427741582253)*x[1]+(0.0324341706939)*x[2]
-        arg[5,0,0]=(-0.445960121294)*x[0]+(-0.215668362178)*x[1]+(0.147632419682)*x[2]
-        arg[5,0,1]=(-0.0781270285912)*x[0]+(0.782990026347)*x[1]+(-1.28046463036)*x[2]
-        arg[5,1,0]=(-0.385003656622)*x[0]+(-1.02087438188)*x[1]+(-0.594357838151)*x[2]
-        arg[5,1,1]=(-0.676669731714)*x[0]+(-0.28685220691)*x[1]+(0.335774697674)*x[2]
-        ref[0,0,0,0]=(-1.52443210214)
-        ref[0,0,0,1]=(-1.48020118993)
-        ref[0,0,0,2]=(1.2552138343)
-        ref[0,0,1,0]=(-0.102900544448)
-        ref[0,0,1,1]=(-1.14209442568)
-        ref[0,0,1,2]=(-0.975626338621)
-        ref[0,1,0,0]=(0.909668629294)
-        ref[0,1,0,1]=(1.29127341353)
-        ref[0,1,0,2]=(-1.65221956404)
-        ref[0,1,1,0]=(-0.00309732749698)
-        ref[0,1,1,1]=(0.0561682749786)
-        ref[0,1,1,2]=(0.330039911431)
-        ref[1,0,0,0]=(0.966608417982)
-        ref[1,0,0,1]=(-0.181702539284)
-        ref[1,0,0,2]=(0.377393548129)
-        ref[1,0,1,0]=(0.0273333293331)
-        ref[1,0,1,1]=(0.745172228806)
-        ref[1,0,1,2]=(0.756302500232)
-        ref[1,1,0,0]=(-0.550382204645)
-        ref[1,1,0,1]=(0.531191986475)
-        ref[1,1,0,2]=(-1.02269665633)
-        ref[1,1,1,0]=(-0.928522491259)
-        ref[1,1,1,1]=(-1.25241213648)
-        ref[1,1,1,2]=(0.635412990933)
-        ref[2,0,0,0]=(-0.355234026557)
-        ref[2,0,0,1]=(-1.69834232334)
-        ref[2,0,0,2]=(1.17827811215)
-        ref[2,0,1,0]=(-0.905805855166)
-        ref[2,0,1,1]=(1.4023187683)
-        ref[2,0,1,2]=(-0.570168366306)
-        ref[2,1,0,0]=(0.550150523384)
-        ref[2,1,0,1]=(-1.59933962526)
-        ref[2,1,0,2]=(-0.388203251081)
-        ref[2,1,1,0]=(0.138470563927)
-        ref[2,1,1,1]=(0.245233545344)
-        ref[2,1,1,2]=(-0.293840556681)
-        ref[3,0,0,0]=(1.19700673733)
-        ref[3,0,0,1]=(-1.04510591446)
-        ref[3,0,0,2]=(1.03589008728)
-        ref[3,0,1,0]=(0.713948123924)
-        ref[3,0,1,1]=(-1.42841558036)
-        ref[3,0,1,2]=(1.07248428525)
-        ref[3,1,0,0]=(0.11223781122)
-        ref[3,1,0,1]=(-0.00982612208261)
-        ref[3,1,0,2]=(-0.263153847134)
-        ref[3,1,1,0]=(1.33011049869)
-        ref[3,1,1,1]=(0.691016997799)
-        ref[3,1,1,2]=(-0.0547947379786)
-        ref[4,0,0,0]=(1.0577224608)
-        ref[4,0,0,1]=(-0.263034881475)
-        ref[4,0,0,2]=(-0.854540775969)
-        ref[4,0,1,0]=(0.686363734714)
-        ref[4,0,1,1]=(0.198120868875)
-        ref[4,0,1,2]=(1.46326635417)
-        ref[4,1,0,0]=(-0.745244187008)
-        ref[4,1,0,1]=(1.31766298118)
-        ref[4,1,0,2]=(1.51544532829)
-        ref[4,1,1,0]=(0.878390723411)
-        ref[4,1,1,1]=(-0.427741582253)
-        ref[4,1,1,2]=(0.0324341706939)
-        ref[5,0,0,0]=(-0.445960121294)
-        ref[5,0,0,1]=(-0.215668362178)
-        ref[5,0,0,2]=(0.147632419682)
-        ref[5,0,1,0]=(-0.0781270285912)
-        ref[5,0,1,1]=(0.782990026347)
-        ref[5,0,1,2]=(-1.28046463036)
-        ref[5,1,0,0]=(-0.385003656622)
-        ref[5,1,0,1]=(-1.02087438188)
-        ref[5,1,0,2]=(-0.594357838151)
-        ref[5,1,1,0]=(-0.676669731714)
-        ref[5,1,1,1]=(-0.28685220691)
-        ref[5,1,1,2]=(0.335774697674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.306947418999)*x[0]+(-0.706616694784)*x[1]
-        ref[0]=(0.306947418999)
-        ref[1]=(-0.706616694784)
-      else:
-        arg=(0.490435692707)*x[0]+(0.929248719763)*x[1]+(0.269868131113)*x[2]
-        ref[0]=(0.490435692707)
-        ref[1]=(0.929248719763)
-        ref[2]=(0.269868131113)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.882633673888)*x[0]+(-0.790592442848)*x[1]
-        arg[1]=(1.55495669126)*x[0]+(0.496011926182)*x[1]
-        ref[0,0]=(-0.882633673888)
-        ref[0,1]=(-0.790592442848)
-        ref[1,0]=(1.55495669126)
-        ref[1,1]=(0.496011926182)
-      else:
-        arg[0]=(0.683098278161)*x[0]+(-0.151590511238)*x[1]+(0.54461031868)*x[2]
-        arg[1]=(0.59998040214)*x[0]+(-0.995466442084)*x[1]+(-1.09468062911)*x[2]
-        ref[0,0]=(0.683098278161)
-        ref[0,1]=(-0.151590511238)
-        ref[0,2]=(0.54461031868)
-        ref[1,0]=(0.59998040214)
-        ref[1,1]=(-0.995466442084)
-        ref[1,2]=(-1.09468062911)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.159129528541)*x[0]+(0.107835972384)*x[1]
-        arg[0,1]=(-1.52388770934)*x[0]+(0.262089610596)*x[1]
-        arg[0,2]=(0.505454501555)*x[0]+(-0.247061440744)*x[1]
-        arg[0,3]=(-0.556075420202)*x[0]+(0.702144110506)*x[1]
-        arg[0,4]=(0.810518335626)*x[0]+(-0.76077949525)*x[1]
-        arg[1,0]=(-0.491052732808)*x[0]+(-0.272913467279)*x[1]
-        arg[1,1]=(0.0141908236388)*x[0]+(1.10868804645)*x[1]
-        arg[1,2]=(0.719028425382)*x[0]+(-0.544780305018)*x[1]
-        arg[1,3]=(-1.15474920716)*x[0]+(0.888461325396)*x[1]
-        arg[1,4]=(-0.842901893766)*x[0]+(-0.465916012282)*x[1]
-        arg[2,0]=(1.24606386746)*x[0]+(0.817235825831)*x[1]
-        arg[2,1]=(0.400861923494)*x[0]+(1.24545704982)*x[1]
-        arg[2,2]=(0.656546253691)*x[0]+(-0.0269228973404)*x[1]
-        arg[2,3]=(-0.590512343874)*x[0]+(-0.0654952556025)*x[1]
-        arg[2,4]=(0.806342618281)*x[0]+(-0.183166204195)*x[1]
-        arg[3,0]=(0.637045776935)*x[0]+(-0.512820906995)*x[1]
-        arg[3,1]=(-0.596216711833)*x[0]+(-0.221853749777)*x[1]
-        arg[3,2]=(0.113235739927)*x[0]+(-0.210641618992)*x[1]
-        arg[3,3]=(-1.11423980423)*x[0]+(-1.46748285012)*x[1]
-        arg[3,4]=(0.573260999643)*x[0]+(0.55016627172)*x[1]
-        ref[0,0,0]=(-0.159129528541)
-        ref[0,0,1]=(0.107835972384)
-        ref[0,1,0]=(-1.52388770934)
-        ref[0,1,1]=(0.262089610596)
-        ref[0,2,0]=(0.505454501555)
-        ref[0,2,1]=(-0.247061440744)
-        ref[0,3,0]=(-0.556075420202)
-        ref[0,3,1]=(0.702144110506)
-        ref[0,4,0]=(0.810518335626)
-        ref[0,4,1]=(-0.76077949525)
-        ref[1,0,0]=(-0.491052732808)
-        ref[1,0,1]=(-0.272913467279)
-        ref[1,1,0]=(0.0141908236388)
-        ref[1,1,1]=(1.10868804645)
-        ref[1,2,0]=(0.719028425382)
-        ref[1,2,1]=(-0.544780305018)
-        ref[1,3,0]=(-1.15474920716)
-        ref[1,3,1]=(0.888461325396)
-        ref[1,4,0]=(-0.842901893766)
-        ref[1,4,1]=(-0.465916012282)
-        ref[2,0,0]=(1.24606386746)
-        ref[2,0,1]=(0.817235825831)
-        ref[2,1,0]=(0.400861923494)
-        ref[2,1,1]=(1.24545704982)
-        ref[2,2,0]=(0.656546253691)
-        ref[2,2,1]=(-0.0269228973404)
-        ref[2,3,0]=(-0.590512343874)
-        ref[2,3,1]=(-0.0654952556025)
-        ref[2,4,0]=(0.806342618281)
-        ref[2,4,1]=(-0.183166204195)
-        ref[3,0,0]=(0.637045776935)
-        ref[3,0,1]=(-0.512820906995)
-        ref[3,1,0]=(-0.596216711833)
-        ref[3,1,1]=(-0.221853749777)
-        ref[3,2,0]=(0.113235739927)
-        ref[3,2,1]=(-0.210641618992)
-        ref[3,3,0]=(-1.11423980423)
-        ref[3,3,1]=(-1.46748285012)
-        ref[3,4,0]=(0.573260999643)
-        ref[3,4,1]=(0.55016627172)
-      else:
-        arg[0,0]=(-0.025505130975)*x[0]+(-0.128352022583)*x[1]+(-0.0645809876948)*x[2]
-        arg[0,1]=(-0.974556985555)*x[0]+(0.503751568036)*x[1]+(-0.524784840232)*x[2]
-        arg[0,2]=(-1.23653778531)*x[0]+(-0.73883453445)*x[1]+(-1.59259101746)*x[2]
-        arg[0,3]=(-0.543656268618)*x[0]+(0.110486603472)*x[1]+(-0.636246757745)*x[2]
-        arg[0,4]=(-0.566088225133)*x[0]+(-0.272577812471)*x[1]+(-0.282075405014)*x[2]
-        arg[1,0]=(-0.28252305722)*x[0]+(0.497103425073)*x[1]+(0.997942367464)*x[2]
-        arg[1,1]=(-0.444059543356)*x[0]+(-0.149004039444)*x[1]+(-0.871853047384)*x[2]
-        arg[1,2]=(-0.610830496789)*x[0]+(0.196494475826)*x[1]+(0.0123852343883)*x[2]
-        arg[1,3]=(-0.327903465165)*x[0]+(0.523560519595)*x[1]+(-0.409961704581)*x[2]
-        arg[1,4]=(0.633897214746)*x[0]+(-0.9032002551)*x[1]+(0.624042996391)*x[2]
-        arg[2,0]=(0.469489049636)*x[0]+(1.46158418286)*x[1]+(-0.538453674545)*x[2]
-        arg[2,1]=(0.0488906165423)*x[0]+(0.483867458959)*x[1]+(0.0419643463366)*x[2]
-        arg[2,2]=(-1.89716754038)*x[0]+(-0.577554008519)*x[1]+(-0.0328835832126)*x[2]
-        arg[2,3]=(0.507329501469)*x[0]+(0.354939444351)*x[1]+(0.0136766029313)*x[2]
-        arg[2,4]=(-0.313182267444)*x[0]+(-1.08684309178)*x[1]+(-1.39365968958)*x[2]
-        arg[3,0]=(0.272322829309)*x[0]+(-0.233645276231)*x[1]+(0.491500838791)*x[2]
-        arg[3,1]=(1.27603407856)*x[0]+(-0.709429989875)*x[1]+(-0.998371438244)*x[2]
-        arg[3,2]=(0.637972716248)*x[0]+(-1.37896009762)*x[1]+(0.496830616786)*x[2]
-        arg[3,3]=(-1.67735443481)*x[0]+(-0.741884420811)*x[1]+(1.23125805904)*x[2]
-        arg[3,4]=(-0.593290763881)*x[0]+(-0.881909104701)*x[1]+(-1.0425499934)*x[2]
-        ref[0,0,0]=(-0.025505130975)
-        ref[0,0,1]=(-0.128352022583)
-        ref[0,0,2]=(-0.0645809876948)
-        ref[0,1,0]=(-0.974556985555)
-        ref[0,1,1]=(0.503751568036)
-        ref[0,1,2]=(-0.524784840232)
-        ref[0,2,0]=(-1.23653778531)
-        ref[0,2,1]=(-0.73883453445)
-        ref[0,2,2]=(-1.59259101746)
-        ref[0,3,0]=(-0.543656268618)
-        ref[0,3,1]=(0.110486603472)
-        ref[0,3,2]=(-0.636246757745)
-        ref[0,4,0]=(-0.566088225133)
-        ref[0,4,1]=(-0.272577812471)
-        ref[0,4,2]=(-0.282075405014)
-        ref[1,0,0]=(-0.28252305722)
-        ref[1,0,1]=(0.497103425073)
-        ref[1,0,2]=(0.997942367464)
-        ref[1,1,0]=(-0.444059543356)
-        ref[1,1,1]=(-0.149004039444)
-        ref[1,1,2]=(-0.871853047384)
-        ref[1,2,0]=(-0.610830496789)
-        ref[1,2,1]=(0.196494475826)
-        ref[1,2,2]=(0.0123852343883)
-        ref[1,3,0]=(-0.327903465165)
-        ref[1,3,1]=(0.523560519595)
-        ref[1,3,2]=(-0.409961704581)
-        ref[1,4,0]=(0.633897214746)
-        ref[1,4,1]=(-0.9032002551)
-        ref[1,4,2]=(0.624042996391)
-        ref[2,0,0]=(0.469489049636)
-        ref[2,0,1]=(1.46158418286)
-        ref[2,0,2]=(-0.538453674545)
-        ref[2,1,0]=(0.0488906165423)
-        ref[2,1,1]=(0.483867458959)
-        ref[2,1,2]=(0.0419643463366)
-        ref[2,2,0]=(-1.89716754038)
-        ref[2,2,1]=(-0.577554008519)
-        ref[2,2,2]=(-0.0328835832126)
-        ref[2,3,0]=(0.507329501469)
-        ref[2,3,1]=(0.354939444351)
-        ref[2,3,2]=(0.0136766029313)
-        ref[2,4,0]=(-0.313182267444)
-        ref[2,4,1]=(-1.08684309178)
-        ref[2,4,2]=(-1.39365968958)
-        ref[3,0,0]=(0.272322829309)
-        ref[3,0,1]=(-0.233645276231)
-        ref[3,0,2]=(0.491500838791)
-        ref[3,1,0]=(1.27603407856)
-        ref[3,1,1]=(-0.709429989875)
-        ref[3,1,2]=(-0.998371438244)
-        ref[3,2,0]=(0.637972716248)
-        ref[3,2,1]=(-1.37896009762)
-        ref[3,2,2]=(0.496830616786)
-        ref[3,3,0]=(-1.67735443481)
-        ref[3,3,1]=(-0.741884420811)
-        ref[3,3,2]=(1.23125805904)
-        ref[3,4,0]=(-0.593290763881)
-        ref[3,4,1]=(-0.881909104701)
-        ref[3,4,2]=(-1.0425499934)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnBoundary
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnBoundary
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnBoundary(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.289868084377)*x[0]+(-1.636093365)*x[1]
-        arg[0,0,1]=(0.841764493453)*x[0]+(-0.397262590373)*x[1]
-        arg[0,1,0]=(0.318610649633)*x[0]+(1.59837795884)*x[1]
-        arg[0,1,1]=(1.41408600658)*x[0]+(0.212012530707)*x[1]
-        arg[1,0,0]=(-1.13663878903)*x[0]+(-0.535752609596)*x[1]
-        arg[1,0,1]=(-0.795140440626)*x[0]+(-0.733456054749)*x[1]
-        arg[1,1,0]=(-0.174874940569)*x[0]+(0.304037654801)*x[1]
-        arg[1,1,1]=(0.835374268658)*x[0]+(0.645365790264)*x[1]
-        arg[2,0,0]=(0.684064169293)*x[0]+(-0.580502209076)*x[1]
-        arg[2,0,1]=(0.342542841673)*x[0]+(-0.620912562797)*x[1]
-        arg[2,1,0]=(-0.457226288553)*x[0]+(-0.163180645461)*x[1]
-        arg[2,1,1]=(-0.494067356015)*x[0]+(-0.604667785982)*x[1]
-        arg[3,0,0]=(-0.224173319974)*x[0]+(-0.288566962407)*x[1]
-        arg[3,0,1]=(-0.83578982053)*x[0]+(0.290663773612)*x[1]
-        arg[3,1,0]=(0.700494058094)*x[0]+(0.244036699451)*x[1]
-        arg[3,1,1]=(0.960756120912)*x[0]+(-0.129549309953)*x[1]
-        arg[4,0,0]=(0.942292060296)*x[0]+(-0.148922577041)*x[1]
-        arg[4,0,1]=(-0.363876552144)*x[0]+(0.903847614766)*x[1]
-        arg[4,1,0]=(-1.91719369833)*x[0]+(0.961392595186)*x[1]
-        arg[4,1,1]=(-0.141662097711)*x[0]+(-0.695061685931)*x[1]
-        arg[5,0,0]=(0.416693171023)*x[0]+(1.04455773845)*x[1]
-        arg[5,0,1]=(0.325327980312)*x[0]+(-1.01452792883)*x[1]
-        arg[5,1,0]=(-1.43970903355)*x[0]+(-1.04382682561)*x[1]
-        arg[5,1,1]=(-0.969700314248)*x[0]+(-0.286024748854)*x[1]
-        ref[0,0,0,0]=(0.289868084377)
-        ref[0,0,0,1]=(-1.636093365)
-        ref[0,0,1,0]=(0.841764493453)
-        ref[0,0,1,1]=(-0.397262590373)
-        ref[0,1,0,0]=(0.318610649633)
-        ref[0,1,0,1]=(1.59837795884)
-        ref[0,1,1,0]=(1.41408600658)
-        ref[0,1,1,1]=(0.212012530707)
-        ref[1,0,0,0]=(-1.13663878903)
-        ref[1,0,0,1]=(-0.535752609596)
-        ref[1,0,1,0]=(-0.795140440626)
-        ref[1,0,1,1]=(-0.733456054749)
-        ref[1,1,0,0]=(-0.174874940569)
-        ref[1,1,0,1]=(0.304037654801)
-        ref[1,1,1,0]=(0.835374268658)
-        ref[1,1,1,1]=(0.645365790264)
-        ref[2,0,0,0]=(0.684064169293)
-        ref[2,0,0,1]=(-0.580502209076)
-        ref[2,0,1,0]=(0.342542841673)
-        ref[2,0,1,1]=(-0.620912562797)
-        ref[2,1,0,0]=(-0.457226288553)
-        ref[2,1,0,1]=(-0.163180645461)
-        ref[2,1,1,0]=(-0.494067356015)
-        ref[2,1,1,1]=(-0.604667785982)
-        ref[3,0,0,0]=(-0.224173319974)
-        ref[3,0,0,1]=(-0.288566962407)
-        ref[3,0,1,0]=(-0.83578982053)
-        ref[3,0,1,1]=(0.290663773612)
-        ref[3,1,0,0]=(0.700494058094)
-        ref[3,1,0,1]=(0.244036699451)
-        ref[3,1,1,0]=(0.960756120912)
-        ref[3,1,1,1]=(-0.129549309953)
-        ref[4,0,0,0]=(0.942292060296)
-        ref[4,0,0,1]=(-0.148922577041)
-        ref[4,0,1,0]=(-0.363876552144)
-        ref[4,0,1,1]=(0.903847614766)
-        ref[4,1,0,0]=(-1.91719369833)
-        ref[4,1,0,1]=(0.961392595186)
-        ref[4,1,1,0]=(-0.141662097711)
-        ref[4,1,1,1]=(-0.695061685931)
-        ref[5,0,0,0]=(0.416693171023)
-        ref[5,0,0,1]=(1.04455773845)
-        ref[5,0,1,0]=(0.325327980312)
-        ref[5,0,1,1]=(-1.01452792883)
-        ref[5,1,0,0]=(-1.43970903355)
-        ref[5,1,0,1]=(-1.04382682561)
-        ref[5,1,1,0]=(-0.969700314248)
-        ref[5,1,1,1]=(-0.286024748854)
-      else:
-        arg[0,0,0]=(-1.52443210214)*x[0]+(-1.48020118993)*x[1]+(1.2552138343)*x[2]
-        arg[0,0,1]=(-0.102900544448)*x[0]+(-1.14209442568)*x[1]+(-0.975626338621)*x[2]
-        arg[0,1,0]=(0.909668629294)*x[0]+(1.29127341353)*x[1]+(-1.65221956404)*x[2]
-        arg[0,1,1]=(-0.00309732749698)*x[0]+(0.0561682749786)*x[1]+(0.330039911431)*x[2]
-        arg[1,0,0]=(0.966608417982)*x[0]+(-0.181702539284)*x[1]+(0.377393548129)*x[2]
-        arg[1,0,1]=(0.0273333293331)*x[0]+(0.745172228806)*x[1]+(0.756302500232)*x[2]
-        arg[1,1,0]=(-0.550382204645)*x[0]+(0.531191986475)*x[1]+(-1.02269665633)*x[2]
-        arg[1,1,1]=(-0.928522491259)*x[0]+(-1.25241213648)*x[1]+(0.635412990933)*x[2]
-        arg[2,0,0]=(-0.355234026557)*x[0]+(-1.69834232334)*x[1]+(1.17827811215)*x[2]
-        arg[2,0,1]=(-0.905805855166)*x[0]+(1.4023187683)*x[1]+(-0.570168366306)*x[2]
-        arg[2,1,0]=(0.550150523384)*x[0]+(-1.59933962526)*x[1]+(-0.388203251081)*x[2]
-        arg[2,1,1]=(0.138470563927)*x[0]+(0.245233545344)*x[1]+(-0.293840556681)*x[2]
-        arg[3,0,0]=(1.19700673733)*x[0]+(-1.04510591446)*x[1]+(1.03589008728)*x[2]
-        arg[3,0,1]=(0.713948123924)*x[0]+(-1.42841558036)*x[1]+(1.07248428525)*x[2]
-        arg[3,1,0]=(0.11223781122)*x[0]+(-0.00982612208261)*x[1]+(-0.263153847134)*x[2]
-        arg[3,1,1]=(1.33011049869)*x[0]+(0.691016997799)*x[1]+(-0.0547947379786)*x[2]
-        arg[4,0,0]=(1.0577224608)*x[0]+(-0.263034881475)*x[1]+(-0.854540775969)*x[2]
-        arg[4,0,1]=(0.686363734714)*x[0]+(0.198120868875)*x[1]+(1.46326635417)*x[2]
-        arg[4,1,0]=(-0.745244187008)*x[0]+(1.31766298118)*x[1]+(1.51544532829)*x[2]
-        arg[4,1,1]=(0.878390723411)*x[0]+(-0.427741582253)*x[1]+(0.0324341706939)*x[2]
-        arg[5,0,0]=(-0.445960121294)*x[0]+(-0.215668362178)*x[1]+(0.147632419682)*x[2]
-        arg[5,0,1]=(-0.0781270285912)*x[0]+(0.782990026347)*x[1]+(-1.28046463036)*x[2]
-        arg[5,1,0]=(-0.385003656622)*x[0]+(-1.02087438188)*x[1]+(-0.594357838151)*x[2]
-        arg[5,1,1]=(-0.676669731714)*x[0]+(-0.28685220691)*x[1]+(0.335774697674)*x[2]
-        ref[0,0,0,0]=(-1.52443210214)
-        ref[0,0,0,1]=(-1.48020118993)
-        ref[0,0,0,2]=(1.2552138343)
-        ref[0,0,1,0]=(-0.102900544448)
-        ref[0,0,1,1]=(-1.14209442568)
-        ref[0,0,1,2]=(-0.975626338621)
-        ref[0,1,0,0]=(0.909668629294)
-        ref[0,1,0,1]=(1.29127341353)
-        ref[0,1,0,2]=(-1.65221956404)
-        ref[0,1,1,0]=(-0.00309732749698)
-        ref[0,1,1,1]=(0.0561682749786)
-        ref[0,1,1,2]=(0.330039911431)
-        ref[1,0,0,0]=(0.966608417982)
-        ref[1,0,0,1]=(-0.181702539284)
-        ref[1,0,0,2]=(0.377393548129)
-        ref[1,0,1,0]=(0.0273333293331)
-        ref[1,0,1,1]=(0.745172228806)
-        ref[1,0,1,2]=(0.756302500232)
-        ref[1,1,0,0]=(-0.550382204645)
-        ref[1,1,0,1]=(0.531191986475)
-        ref[1,1,0,2]=(-1.02269665633)
-        ref[1,1,1,0]=(-0.928522491259)
-        ref[1,1,1,1]=(-1.25241213648)
-        ref[1,1,1,2]=(0.635412990933)
-        ref[2,0,0,0]=(-0.355234026557)
-        ref[2,0,0,1]=(-1.69834232334)
-        ref[2,0,0,2]=(1.17827811215)
-        ref[2,0,1,0]=(-0.905805855166)
-        ref[2,0,1,1]=(1.4023187683)
-        ref[2,0,1,2]=(-0.570168366306)
-        ref[2,1,0,0]=(0.550150523384)
-        ref[2,1,0,1]=(-1.59933962526)
-        ref[2,1,0,2]=(-0.388203251081)
-        ref[2,1,1,0]=(0.138470563927)
-        ref[2,1,1,1]=(0.245233545344)
-        ref[2,1,1,2]=(-0.293840556681)
-        ref[3,0,0,0]=(1.19700673733)
-        ref[3,0,0,1]=(-1.04510591446)
-        ref[3,0,0,2]=(1.03589008728)
-        ref[3,0,1,0]=(0.713948123924)
-        ref[3,0,1,1]=(-1.42841558036)
-        ref[3,0,1,2]=(1.07248428525)
-        ref[3,1,0,0]=(0.11223781122)
-        ref[3,1,0,1]=(-0.00982612208261)
-        ref[3,1,0,2]=(-0.263153847134)
-        ref[3,1,1,0]=(1.33011049869)
-        ref[3,1,1,1]=(0.691016997799)
-        ref[3,1,1,2]=(-0.0547947379786)
-        ref[4,0,0,0]=(1.0577224608)
-        ref[4,0,0,1]=(-0.263034881475)
-        ref[4,0,0,2]=(-0.854540775969)
-        ref[4,0,1,0]=(0.686363734714)
-        ref[4,0,1,1]=(0.198120868875)
-        ref[4,0,1,2]=(1.46326635417)
-        ref[4,1,0,0]=(-0.745244187008)
-        ref[4,1,0,1]=(1.31766298118)
-        ref[4,1,0,2]=(1.51544532829)
-        ref[4,1,1,0]=(0.878390723411)
-        ref[4,1,1,1]=(-0.427741582253)
-        ref[4,1,1,2]=(0.0324341706939)
-        ref[5,0,0,0]=(-0.445960121294)
-        ref[5,0,0,1]=(-0.215668362178)
-        ref[5,0,0,2]=(0.147632419682)
-        ref[5,0,1,0]=(-0.0781270285912)
-        ref[5,0,1,1]=(0.782990026347)
-        ref[5,0,1,2]=(-1.28046463036)
-        ref[5,1,0,0]=(-0.385003656622)
-        ref[5,1,0,1]=(-1.02087438188)
-        ref[5,1,0,2]=(-0.594357838151)
-        ref[5,1,1,0]=(-0.676669731714)
-        ref[5,1,1,1]=(-0.28685220691)
-        ref[5,1,1,2]=(0.335774697674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(-0.447987377779)*x[0]**o+(-0.3185298109)*x[0]+(0.748689324197)*x[1]**o+(-0.979369398128)*x[1]
-        ref[0]=o*(-0.447987377779)*x_ref[0]**(o-1)+(-0.3185298109)
-        ref[1]=o*(0.748689324197)*x_ref[1]**(o-1)+(-0.979369398128)
-      else:
-        arg=(-0.991175677257)*x[0]**o+(0.486310659385)*x[0]+(0.366862476014)*x[1]**o+(0.718311286349)*x[1]+(-0.593137377946)*x[2]**o+(-0.98259729892)*x[2]
-        ref[0]=o*(-0.991175677257)*x_ref[0]**(o-1)+(0.486310659385)
-        ref[1]=o*(0.366862476014)*x_ref[1]**(o-1)+(0.718311286349)
-        ref[2]=o*(-0.593137377946)*x_ref[2]**(o-1)+(-0.98259729892)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.532427358862)*x[0]**o+(-0.699829406888)*x[0]+(-0.378181075858)*x[1]**o+(-0.163897932934)*x[1]
-        arg[1]=(0.76393225396)*x[0]**o+(0.87331212216)*x[0]+(0.0261520274749)*x[1]**o+(-0.475078274702)*x[1]
-        ref[0,0]=o*(0.532427358862)*x_ref[0]**(o-1)+(-0.699829406888)
-        ref[0,1]=o*(-0.378181075858)*x_ref[1]**(o-1)+(-0.163897932934)
-        ref[1,0]=o*(0.76393225396)*x_ref[0]**(o-1)+(0.87331212216)
-        ref[1,1]=o*(0.0261520274749)*x_ref[1]**(o-1)+(-0.475078274702)
-      else:
-        arg[0]=(-0.559640148983)*x[0]**o+(0.868360358061)*x[0]+(0.148807680806)*x[1]**o+(-0.488426629736)*x[1]+(0.99381766343)*x[2]**o+(-0.0241703848022)*x[2]
-        arg[1]=(-0.00270447073555)*x[0]**o+(0.599732416474)*x[0]+(-0.455449579349)*x[1]**o+(-0.791088816655)*x[1]+(0.850362671968)*x[2]**o+(-0.180726138889)*x[2]
-        ref[0,0]=o*(-0.559640148983)*x_ref[0]**(o-1)+(0.868360358061)
-        ref[0,1]=o*(0.148807680806)*x_ref[1]**(o-1)+(-0.488426629736)
-        ref[0,2]=o*(0.99381766343)*x_ref[2]**(o-1)+(-0.0241703848022)
-        ref[1,0]=o*(-0.00270447073555)*x_ref[0]**(o-1)+(0.599732416474)
-        ref[1,1]=o*(-0.455449579349)*x_ref[1]**(o-1)+(-0.791088816655)
-        ref[1,2]=o*(0.850362671968)*x_ref[2]**(o-1)+(-0.180726138889)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.157399152858)*x[0]**o+(0.00598352783814)*x[0]+(-0.904853822462)*x[1]**o+(0.767645769461)*x[1]
-        arg[0,1]=(0.764556091331)*x[0]**o+(-0.167733604181)*x[0]+(0.723254547109)*x[1]**o+(-0.863633737324)*x[1]
-        arg[0,2]=(0.480913138549)*x[0]**o+(0.505712705322)*x[0]+(-0.295398027463)*x[1]**o+(-0.0497846093953)*x[1]
-        arg[0,3]=(-0.957208239652)*x[0]**o+(0.608346818502)*x[0]+(-0.194623401251)*x[1]**o+(0.670671588806)*x[1]
-        arg[0,4]=(-0.179165159786)*x[0]**o+(-0.146090255471)*x[0]+(-0.413009197676)*x[1]**o+(-0.168508218849)*x[1]
-        arg[1,0]=(0.659914628278)*x[0]**o+(0.123177996909)*x[0]+(0.713971230628)*x[1]**o+(-0.687569461154)*x[1]
-        arg[1,1]=(0.857554477911)*x[0]**o+(0.119604916634)*x[0]+(-0.123185856515)*x[1]**o+(0.968800869965)*x[1]
-        arg[1,2]=(0.566596883167)*x[0]**o+(-0.667227639224)*x[0]+(0.29838343622)*x[1]**o+(0.0172896834006)*x[1]
-        arg[1,3]=(0.340418732306)*x[0]**o+(-0.115031635126)*x[0]+(0.212495048781)*x[1]**o+(-0.690939141829)*x[1]
-        arg[1,4]=(-0.513225187356)*x[0]**o+(0.975159534619)*x[0]+(0.159694719764)*x[1]**o+(-0.441973185517)*x[1]
-        arg[2,0]=(0.00598247134499)*x[0]**o+(-0.680866157243)*x[0]+(0.198740044836)*x[1]**o+(-0.776778848701)*x[1]
-        arg[2,1]=(0.385572341196)*x[0]**o+(-0.911229388405)*x[0]+(-0.869563350649)*x[1]**o+(-0.453073292811)*x[1]
-        arg[2,2]=(-0.678405510051)*x[0]**o+(0.570159849365)*x[0]+(-0.998909274112)*x[1]**o+(-0.56867397999)*x[1]
-        arg[2,3]=(0.592650344218)*x[0]**o+(-0.990760992864)*x[0]+(0.54832364584)*x[1]**o+(-0.62848423403)*x[1]
-        arg[2,4]=(-0.267222595774)*x[0]**o+(-0.398631721649)*x[0]+(-0.139351142788)*x[1]**o+(-0.973211734322)*x[1]
-        arg[3,0]=(-0.748270220449)*x[0]**o+(-0.432648285296)*x[0]+(-0.572322019432)*x[1]**o+(-0.361258377472)*x[1]
-        arg[3,1]=(-0.872970937458)*x[0]**o+(-0.412714429527)*x[0]+(0.28965384698)*x[1]**o+(0.0899128505144)*x[1]
-        arg[3,2]=(-0.448552675711)*x[0]**o+(-0.0531593149976)*x[0]+(-0.445359129375)*x[1]**o+(-0.357551800127)*x[1]
-        arg[3,3]=(-0.120676057603)*x[0]**o+(-0.736959379114)*x[0]+(-0.437089829553)*x[1]**o+(-0.272117257464)*x[1]
-        arg[3,4]=(0.342279309395)*x[0]**o+(0.182206506048)*x[0]+(0.843948330758)*x[1]**o+(0.165354303251)*x[1]
-        ref[0,0,0]=o*(0.157399152858)*x_ref[0]**(o-1)+(0.00598352783814)
-        ref[0,0,1]=o*(-0.904853822462)*x_ref[1]**(o-1)+(0.767645769461)
-        ref[0,1,0]=o*(0.764556091331)*x_ref[0]**(o-1)+(-0.167733604181)
-        ref[0,1,1]=o*(0.723254547109)*x_ref[1]**(o-1)+(-0.863633737324)
-        ref[0,2,0]=o*(0.480913138549)*x_ref[0]**(o-1)+(0.505712705322)
-        ref[0,2,1]=o*(-0.295398027463)*x_ref[1]**(o-1)+(-0.0497846093953)
-        ref[0,3,0]=o*(-0.957208239652)*x_ref[0]**(o-1)+(0.608346818502)
-        ref[0,3,1]=o*(-0.194623401251)*x_ref[1]**(o-1)+(0.670671588806)
-        ref[0,4,0]=o*(-0.179165159786)*x_ref[0]**(o-1)+(-0.146090255471)
-        ref[0,4,1]=o*(-0.413009197676)*x_ref[1]**(o-1)+(-0.168508218849)
-        ref[1,0,0]=o*(0.659914628278)*x_ref[0]**(o-1)+(0.123177996909)
-        ref[1,0,1]=o*(0.713971230628)*x_ref[1]**(o-1)+(-0.687569461154)
-        ref[1,1,0]=o*(0.857554477911)*x_ref[0]**(o-1)+(0.119604916634)
-        ref[1,1,1]=o*(-0.123185856515)*x_ref[1]**(o-1)+(0.968800869965)
-        ref[1,2,0]=o*(0.566596883167)*x_ref[0]**(o-1)+(-0.667227639224)
-        ref[1,2,1]=o*(0.29838343622)*x_ref[1]**(o-1)+(0.0172896834006)
-        ref[1,3,0]=o*(0.340418732306)*x_ref[0]**(o-1)+(-0.115031635126)
-        ref[1,3,1]=o*(0.212495048781)*x_ref[1]**(o-1)+(-0.690939141829)
-        ref[1,4,0]=o*(-0.513225187356)*x_ref[0]**(o-1)+(0.975159534619)
-        ref[1,4,1]=o*(0.159694719764)*x_ref[1]**(o-1)+(-0.441973185517)
-        ref[2,0,0]=o*(0.00598247134499)*x_ref[0]**(o-1)+(-0.680866157243)
-        ref[2,0,1]=o*(0.198740044836)*x_ref[1]**(o-1)+(-0.776778848701)
-        ref[2,1,0]=o*(0.385572341196)*x_ref[0]**(o-1)+(-0.911229388405)
-        ref[2,1,1]=o*(-0.869563350649)*x_ref[1]**(o-1)+(-0.453073292811)
-        ref[2,2,0]=o*(-0.678405510051)*x_ref[0]**(o-1)+(0.570159849365)
-        ref[2,2,1]=o*(-0.998909274112)*x_ref[1]**(o-1)+(-0.56867397999)
-        ref[2,3,0]=o*(0.592650344218)*x_ref[0]**(o-1)+(-0.990760992864)
-        ref[2,3,1]=o*(0.54832364584)*x_ref[1]**(o-1)+(-0.62848423403)
-        ref[2,4,0]=o*(-0.267222595774)*x_ref[0]**(o-1)+(-0.398631721649)
-        ref[2,4,1]=o*(-0.139351142788)*x_ref[1]**(o-1)+(-0.973211734322)
-        ref[3,0,0]=o*(-0.748270220449)*x_ref[0]**(o-1)+(-0.432648285296)
-        ref[3,0,1]=o*(-0.572322019432)*x_ref[1]**(o-1)+(-0.361258377472)
-        ref[3,1,0]=o*(-0.872970937458)*x_ref[0]**(o-1)+(-0.412714429527)
-        ref[3,1,1]=o*(0.28965384698)*x_ref[1]**(o-1)+(0.0899128505144)
-        ref[3,2,0]=o*(-0.448552675711)*x_ref[0]**(o-1)+(-0.0531593149976)
-        ref[3,2,1]=o*(-0.445359129375)*x_ref[1]**(o-1)+(-0.357551800127)
-        ref[3,3,0]=o*(-0.120676057603)*x_ref[0]**(o-1)+(-0.736959379114)
-        ref[3,3,1]=o*(-0.437089829553)*x_ref[1]**(o-1)+(-0.272117257464)
-        ref[3,4,0]=o*(0.342279309395)*x_ref[0]**(o-1)+(0.182206506048)
-        ref[3,4,1]=o*(0.843948330758)*x_ref[1]**(o-1)+(0.165354303251)
-      else:
-        arg[0,0]=(-0.912611504385)*x[0]**o+(0.730660242466)*x[0]+(-0.807306513948)*x[1]**o+(-0.611619910819)*x[1]+(-0.567616988907)*x[2]**o+(0.554411283236)*x[2]
-        arg[0,1]=(-0.900956431107)*x[0]**o+(-0.731441474835)*x[0]+(0.366905510731)*x[1]**o+(0.444763254457)*x[1]+(0.223337203463)*x[2]**o+(0.0823258304577)*x[2]
-        arg[0,2]=(-0.300262400629)*x[0]**o+(0.781835992318)*x[0]+(-0.961025746467)*x[1]**o+(-0.0255420888548)*x[1]+(-0.195336914392)*x[2]**o+(0.631006440014)*x[2]
-        arg[0,3]=(-0.0362225627667)*x[0]**o+(-0.258309391935)*x[0]+(0.915114590957)*x[1]**o+(-0.0261151730116)*x[1]+(-0.0359136191693)*x[2]**o+(0.34837541797)*x[2]
-        arg[0,4]=(0.718483283111)*x[0]**o+(-0.981945434022)*x[0]+(0.715616160215)*x[1]**o+(-0.213673997408)*x[1]+(0.703864386687)*x[2]**o+(-0.258970624794)*x[2]
-        arg[1,0]=(0.562339421788)*x[0]**o+(-0.469800316995)*x[0]+(-0.58860202695)*x[1]**o+(0.592493291759)*x[1]+(-0.0747446509827)*x[2]**o+(0.459846703357)*x[2]
-        arg[1,1]=(-0.739792007188)*x[0]**o+(0.69804646711)*x[0]+(0.685574577582)*x[1]**o+(0.34906822136)*x[1]+(-0.346626103556)*x[2]**o+(-0.186290616908)*x[2]
-        arg[1,2]=(0.605479936712)*x[0]**o+(0.23811484281)*x[0]+(-0.18270059933)*x[1]**o+(-0.883573478283)*x[1]+(0.558417469124)*x[2]**o+(0.0921284647122)*x[2]
-        arg[1,3]=(0.829453952054)*x[0]**o+(0.0943225421949)*x[0]+(-0.377472410614)*x[1]**o+(0.422596289908)*x[1]+(0.992700203574)*x[2]**o+(0.954704595957)*x[2]
-        arg[1,4]=(0.713437745608)*x[0]**o+(-0.90755469394)*x[0]+(-0.116969245983)*x[1]**o+(-0.615609779318)*x[1]+(-0.631014272933)*x[2]**o+(0.196556707186)*x[2]
-        arg[2,0]=(-0.643142569205)*x[0]**o+(-0.522571508238)*x[0]+(-0.221094875426)*x[1]**o+(0.00263621704394)*x[1]+(-0.346088170378)*x[2]**o+(-0.323346603492)*x[2]
-        arg[2,1]=(0.121192120404)*x[0]**o+(-0.910581465748)*x[0]+(0.661403514322)*x[1]**o+(0.314356472557)*x[1]+(0.740349932503)*x[2]**o+(0.397923840477)*x[2]
-        arg[2,2]=(0.712887835251)*x[0]**o+(0.802827824977)*x[0]+(0.225275507294)*x[1]**o+(0.00655056099106)*x[1]+(-0.0211189465513)*x[2]**o+(-0.672450969446)*x[2]
-        arg[2,3]=(0.220976204507)*x[0]**o+(0.384529933174)*x[0]+(-0.824967564367)*x[1]**o+(0.382079183434)*x[1]+(0.975192346085)*x[2]**o+(-0.845325222223)*x[2]
-        arg[2,4]=(-0.316551069119)*x[0]**o+(0.194934627874)*x[0]+(0.192096230967)*x[1]**o+(-0.423775967466)*x[1]+(-0.669140845203)*x[2]**o+(0.367813824992)*x[2]
-        arg[3,0]=(-0.361410077778)*x[0]**o+(0.377521588398)*x[0]+(-0.795093364568)*x[1]**o+(0.475257686757)*x[1]+(-0.996619080341)*x[2]**o+(-0.909105543506)*x[2]
-        arg[3,1]=(-0.324100979259)*x[0]**o+(-0.950807456193)*x[0]+(-0.141687301441)*x[1]**o+(0.153568029515)*x[1]+(-0.698514966417)*x[2]**o+(0.312395968777)*x[2]
-        arg[3,2]=(-0.997783460035)*x[0]**o+(0.328724967881)*x[0]+(-0.561572087716)*x[1]**o+(-0.0148890799876)*x[1]+(0.236142454998)*x[2]**o+(-0.36513107554)*x[2]
-        arg[3,3]=(0.750818510719)*x[0]**o+(-0.484598204959)*x[0]+(-0.599436804638)*x[1]**o+(-0.236232976078)*x[1]+(-0.0789148183785)*x[2]**o+(-0.74437164566)*x[2]
-        arg[3,4]=(-0.730664688591)*x[0]**o+(-0.94753100979)*x[0]+(-0.671463334034)*x[1]**o+(-0.139992464354)*x[1]+(0.286757519111)*x[2]**o+(0.512453551537)*x[2]
-        ref[0,0,0]=o*(-0.912611504385)*x_ref[0]**(o-1)+(0.730660242466)
-        ref[0,0,1]=o*(-0.807306513948)*x_ref[1]**(o-1)+(-0.611619910819)
-        ref[0,0,2]=o*(-0.567616988907)*x_ref[2]**(o-1)+(0.554411283236)
-        ref[0,1,0]=o*(-0.900956431107)*x_ref[0]**(o-1)+(-0.731441474835)
-        ref[0,1,1]=o*(0.366905510731)*x_ref[1]**(o-1)+(0.444763254457)
-        ref[0,1,2]=o*(0.223337203463)*x_ref[2]**(o-1)+(0.0823258304577)
-        ref[0,2,0]=o*(-0.300262400629)*x_ref[0]**(o-1)+(0.781835992318)
-        ref[0,2,1]=o*(-0.961025746467)*x_ref[1]**(o-1)+(-0.0255420888548)
-        ref[0,2,2]=o*(-0.195336914392)*x_ref[2]**(o-1)+(0.631006440014)
-        ref[0,3,0]=o*(-0.0362225627667)*x_ref[0]**(o-1)+(-0.258309391935)
-        ref[0,3,1]=o*(0.915114590957)*x_ref[1]**(o-1)+(-0.0261151730116)
-        ref[0,3,2]=o*(-0.0359136191693)*x_ref[2]**(o-1)+(0.34837541797)
-        ref[0,4,0]=o*(0.718483283111)*x_ref[0]**(o-1)+(-0.981945434022)
-        ref[0,4,1]=o*(0.715616160215)*x_ref[1]**(o-1)+(-0.213673997408)
-        ref[0,4,2]=o*(0.703864386687)*x_ref[2]**(o-1)+(-0.258970624794)
-        ref[1,0,0]=o*(0.562339421788)*x_ref[0]**(o-1)+(-0.469800316995)
-        ref[1,0,1]=o*(-0.58860202695)*x_ref[1]**(o-1)+(0.592493291759)
-        ref[1,0,2]=o*(-0.0747446509827)*x_ref[2]**(o-1)+(0.459846703357)
-        ref[1,1,0]=o*(-0.739792007188)*x_ref[0]**(o-1)+(0.69804646711)
-        ref[1,1,1]=o*(0.685574577582)*x_ref[1]**(o-1)+(0.34906822136)
-        ref[1,1,2]=o*(-0.346626103556)*x_ref[2]**(o-1)+(-0.186290616908)
-        ref[1,2,0]=o*(0.605479936712)*x_ref[0]**(o-1)+(0.23811484281)
-        ref[1,2,1]=o*(-0.18270059933)*x_ref[1]**(o-1)+(-0.883573478283)
-        ref[1,2,2]=o*(0.558417469124)*x_ref[2]**(o-1)+(0.0921284647122)
-        ref[1,3,0]=o*(0.829453952054)*x_ref[0]**(o-1)+(0.0943225421949)
-        ref[1,3,1]=o*(-0.377472410614)*x_ref[1]**(o-1)+(0.422596289908)
-        ref[1,3,2]=o*(0.992700203574)*x_ref[2]**(o-1)+(0.954704595957)
-        ref[1,4,0]=o*(0.713437745608)*x_ref[0]**(o-1)+(-0.90755469394)
-        ref[1,4,1]=o*(-0.116969245983)*x_ref[1]**(o-1)+(-0.615609779318)
-        ref[1,4,2]=o*(-0.631014272933)*x_ref[2]**(o-1)+(0.196556707186)
-        ref[2,0,0]=o*(-0.643142569205)*x_ref[0]**(o-1)+(-0.522571508238)
-        ref[2,0,1]=o*(-0.221094875426)*x_ref[1]**(o-1)+(0.00263621704394)
-        ref[2,0,2]=o*(-0.346088170378)*x_ref[2]**(o-1)+(-0.323346603492)
-        ref[2,1,0]=o*(0.121192120404)*x_ref[0]**(o-1)+(-0.910581465748)
-        ref[2,1,1]=o*(0.661403514322)*x_ref[1]**(o-1)+(0.314356472557)
-        ref[2,1,2]=o*(0.740349932503)*x_ref[2]**(o-1)+(0.397923840477)
-        ref[2,2,0]=o*(0.712887835251)*x_ref[0]**(o-1)+(0.802827824977)
-        ref[2,2,1]=o*(0.225275507294)*x_ref[1]**(o-1)+(0.00655056099106)
-        ref[2,2,2]=o*(-0.0211189465513)*x_ref[2]**(o-1)+(-0.672450969446)
-        ref[2,3,0]=o*(0.220976204507)*x_ref[0]**(o-1)+(0.384529933174)
-        ref[2,3,1]=o*(-0.824967564367)*x_ref[1]**(o-1)+(0.382079183434)
-        ref[2,3,2]=o*(0.975192346085)*x_ref[2]**(o-1)+(-0.845325222223)
-        ref[2,4,0]=o*(-0.316551069119)*x_ref[0]**(o-1)+(0.194934627874)
-        ref[2,4,1]=o*(0.192096230967)*x_ref[1]**(o-1)+(-0.423775967466)
-        ref[2,4,2]=o*(-0.669140845203)*x_ref[2]**(o-1)+(0.367813824992)
-        ref[3,0,0]=o*(-0.361410077778)*x_ref[0]**(o-1)+(0.377521588398)
-        ref[3,0,1]=o*(-0.795093364568)*x_ref[1]**(o-1)+(0.475257686757)
-        ref[3,0,2]=o*(-0.996619080341)*x_ref[2]**(o-1)+(-0.909105543506)
-        ref[3,1,0]=o*(-0.324100979259)*x_ref[0]**(o-1)+(-0.950807456193)
-        ref[3,1,1]=o*(-0.141687301441)*x_ref[1]**(o-1)+(0.153568029515)
-        ref[3,1,2]=o*(-0.698514966417)*x_ref[2]**(o-1)+(0.312395968777)
-        ref[3,2,0]=o*(-0.997783460035)*x_ref[0]**(o-1)+(0.328724967881)
-        ref[3,2,1]=o*(-0.561572087716)*x_ref[1]**(o-1)+(-0.0148890799876)
-        ref[3,2,2]=o*(0.236142454998)*x_ref[2]**(o-1)+(-0.36513107554)
-        ref[3,3,0]=o*(0.750818510719)*x_ref[0]**(o-1)+(-0.484598204959)
-        ref[3,3,1]=o*(-0.599436804638)*x_ref[1]**(o-1)+(-0.236232976078)
-        ref[3,3,2]=o*(-0.0789148183785)*x_ref[2]**(o-1)+(-0.74437164566)
-        ref[3,4,0]=o*(-0.730664688591)*x_ref[0]**(o-1)+(-0.94753100979)
-        ref[3,4,1]=o*(-0.671463334034)*x_ref[1]**(o-1)+(-0.139992464354)
-        ref[3,4,2]=o*(0.286757519111)*x_ref[2]**(o-1)+(0.512453551537)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.467597203998)*x[0]**o+(-0.878331243959)*x[0]+(-0.971530784104)*x[1]**o+(0.685854853102)*x[1]
-        arg[0,0,1]=(0.291345615954)*x[0]**o+(-0.745469654319)*x[0]+(0.976621664002)*x[1]**o+(-0.881452217847)*x[1]
-        arg[0,1,0]=(0.537843295475)*x[0]**o+(0.489619951145)*x[0]+(0.77330251637)*x[1]**o+(0.998031266089)*x[1]
-        arg[0,1,1]=(0.355984068681)*x[0]**o+(-0.814720548776)*x[0]+(0.495564264626)*x[1]**o+(0.525926194911)*x[1]
-        arg[1,0,0]=(0.0459062782507)*x[0]**o+(0.745363380399)*x[0]+(0.254962338793)*x[1]**o+(-0.818268107226)*x[1]
-        arg[1,0,1]=(0.806972777032)*x[0]**o+(0.65759411882)*x[0]+(-0.714015350868)*x[1]**o+(0.785611067194)*x[1]
-        arg[1,1,0]=(0.576206375389)*x[0]**o+(-0.502513595266)*x[0]+(0.258287392463)*x[1]**o+(0.0897418205816)*x[1]
-        arg[1,1,1]=(-0.854645709831)*x[0]**o+(0.48910569315)*x[0]+(0.684503579045)*x[1]**o+(0.156890859871)*x[1]
-        arg[2,0,0]=(-0.535650648427)*x[0]**o+(-0.189186476574)*x[0]+(-0.62891575537)*x[1]**o+(-0.37603690255)*x[1]
-        arg[2,0,1]=(-0.153001902814)*x[0]**o+(0.028214773063)*x[0]+(-0.605102549169)*x[1]**o+(-0.566991398262)*x[1]
-        arg[2,1,0]=(0.607976055886)*x[0]**o+(-0.247395663109)*x[0]+(0.424340230656)*x[1]**o+(0.210489427749)*x[1]
-        arg[2,1,1]=(-0.513543937157)*x[0]**o+(0.345931529219)*x[0]+(0.893744279358)*x[1]**o+(-0.519602594857)*x[1]
-        arg[3,0,0]=(-0.618812192169)*x[0]**o+(-0.897898654184)*x[0]+(-0.717700928924)*x[1]**o+(-0.21348885325)*x[1]
-        arg[3,0,1]=(-0.582829504396)*x[0]**o+(-0.0726162868757)*x[0]+(0.366457797377)*x[1]**o+(0.479006714526)*x[1]
-        arg[3,1,0]=(0.929143108169)*x[0]**o+(-0.302254589362)*x[0]+(-0.518817476772)*x[1]**o+(0.854860903894)*x[1]
-        arg[3,1,1]=(-0.815422381361)*x[0]**o+(-0.183407261786)*x[0]+(0.841334455272)*x[1]**o+(-0.560841747647)*x[1]
-        arg[4,0,0]=(0.746229089137)*x[0]**o+(-0.00173525360161)*x[0]+(0.729473923491)*x[1]**o+(-0.0152936558265)*x[1]
-        arg[4,0,1]=(-0.0474071267025)*x[0]**o+(-0.380505263812)*x[0]+(0.166181839511)*x[1]**o+(-0.421069915995)*x[1]
-        arg[4,1,0]=(-0.826801927705)*x[0]**o+(0.704799677183)*x[0]+(-0.0346961982898)*x[1]**o+(-0.401235214163)*x[1]
-        arg[4,1,1]=(-0.973646144788)*x[0]**o+(0.469976655077)*x[0]+(-0.458846284633)*x[1]**o+(0.818397008807)*x[1]
-        arg[5,0,0]=(0.155460716472)*x[0]**o+(-0.509095443426)*x[0]+(-0.0942934981524)*x[1]**o+(0.754087972651)*x[1]
-        arg[5,0,1]=(-0.584172835053)*x[0]**o+(-0.904579020559)*x[0]+(0.156301832106)*x[1]**o+(0.169995805721)*x[1]
-        arg[5,1,0]=(-0.424977437614)*x[0]**o+(0.244566550647)*x[0]+(-0.474400097866)*x[1]**o+(-0.315912223349)*x[1]
-        arg[5,1,1]=(0.764961378837)*x[0]**o+(-0.83633430067)*x[0]+(-0.446378328981)*x[1]**o+(-0.278460992776)*x[1]
-        ref[0,0,0,0]=o*(0.467597203998)*x_ref[0]**(o-1)+(-0.878331243959)
-        ref[0,0,0,1]=o*(-0.971530784104)*x_ref[1]**(o-1)+(0.685854853102)
-        ref[0,0,1,0]=o*(0.291345615954)*x_ref[0]**(o-1)+(-0.745469654319)
-        ref[0,0,1,1]=o*(0.976621664002)*x_ref[1]**(o-1)+(-0.881452217847)
-        ref[0,1,0,0]=o*(0.537843295475)*x_ref[0]**(o-1)+(0.489619951145)
-        ref[0,1,0,1]=o*(0.77330251637)*x_ref[1]**(o-1)+(0.998031266089)
-        ref[0,1,1,0]=o*(0.355984068681)*x_ref[0]**(o-1)+(-0.814720548776)
-        ref[0,1,1,1]=o*(0.495564264626)*x_ref[1]**(o-1)+(0.525926194911)
-        ref[1,0,0,0]=o*(0.0459062782507)*x_ref[0]**(o-1)+(0.745363380399)
-        ref[1,0,0,1]=o*(0.254962338793)*x_ref[1]**(o-1)+(-0.818268107226)
-        ref[1,0,1,0]=o*(0.806972777032)*x_ref[0]**(o-1)+(0.65759411882)
-        ref[1,0,1,1]=o*(-0.714015350868)*x_ref[1]**(o-1)+(0.785611067194)
-        ref[1,1,0,0]=o*(0.576206375389)*x_ref[0]**(o-1)+(-0.502513595266)
-        ref[1,1,0,1]=o*(0.258287392463)*x_ref[1]**(o-1)+(0.0897418205816)
-        ref[1,1,1,0]=o*(-0.854645709831)*x_ref[0]**(o-1)+(0.48910569315)
-        ref[1,1,1,1]=o*(0.684503579045)*x_ref[1]**(o-1)+(0.156890859871)
-        ref[2,0,0,0]=o*(-0.535650648427)*x_ref[0]**(o-1)+(-0.189186476574)
-        ref[2,0,0,1]=o*(-0.62891575537)*x_ref[1]**(o-1)+(-0.37603690255)
-        ref[2,0,1,0]=o*(-0.153001902814)*x_ref[0]**(o-1)+(0.028214773063)
-        ref[2,0,1,1]=o*(-0.605102549169)*x_ref[1]**(o-1)+(-0.566991398262)
-        ref[2,1,0,0]=o*(0.607976055886)*x_ref[0]**(o-1)+(-0.247395663109)
-        ref[2,1,0,1]=o*(0.424340230656)*x_ref[1]**(o-1)+(0.210489427749)
-        ref[2,1,1,0]=o*(-0.513543937157)*x_ref[0]**(o-1)+(0.345931529219)
-        ref[2,1,1,1]=o*(0.893744279358)*x_ref[1]**(o-1)+(-0.519602594857)
-        ref[3,0,0,0]=o*(-0.618812192169)*x_ref[0]**(o-1)+(-0.897898654184)
-        ref[3,0,0,1]=o*(-0.717700928924)*x_ref[1]**(o-1)+(-0.21348885325)
-        ref[3,0,1,0]=o*(-0.582829504396)*x_ref[0]**(o-1)+(-0.0726162868757)
-        ref[3,0,1,1]=o*(0.366457797377)*x_ref[1]**(o-1)+(0.479006714526)
-        ref[3,1,0,0]=o*(0.929143108169)*x_ref[0]**(o-1)+(-0.302254589362)
-        ref[3,1,0,1]=o*(-0.518817476772)*x_ref[1]**(o-1)+(0.854860903894)
-        ref[3,1,1,0]=o*(-0.815422381361)*x_ref[0]**(o-1)+(-0.183407261786)
-        ref[3,1,1,1]=o*(0.841334455272)*x_ref[1]**(o-1)+(-0.560841747647)
-        ref[4,0,0,0]=o*(0.746229089137)*x_ref[0]**(o-1)+(-0.00173525360161)
-        ref[4,0,0,1]=o*(0.729473923491)*x_ref[1]**(o-1)+(-0.0152936558265)
-        ref[4,0,1,0]=o*(-0.0474071267025)*x_ref[0]**(o-1)+(-0.380505263812)
-        ref[4,0,1,1]=o*(0.166181839511)*x_ref[1]**(o-1)+(-0.421069915995)
-        ref[4,1,0,0]=o*(-0.826801927705)*x_ref[0]**(o-1)+(0.704799677183)
-        ref[4,1,0,1]=o*(-0.0346961982898)*x_ref[1]**(o-1)+(-0.401235214163)
-        ref[4,1,1,0]=o*(-0.973646144788)*x_ref[0]**(o-1)+(0.469976655077)
-        ref[4,1,1,1]=o*(-0.458846284633)*x_ref[1]**(o-1)+(0.818397008807)
-        ref[5,0,0,0]=o*(0.155460716472)*x_ref[0]**(o-1)+(-0.509095443426)
-        ref[5,0,0,1]=o*(-0.0942934981524)*x_ref[1]**(o-1)+(0.754087972651)
-        ref[5,0,1,0]=o*(-0.584172835053)*x_ref[0]**(o-1)+(-0.904579020559)
-        ref[5,0,1,1]=o*(0.156301832106)*x_ref[1]**(o-1)+(0.169995805721)
-        ref[5,1,0,0]=o*(-0.424977437614)*x_ref[0]**(o-1)+(0.244566550647)
-        ref[5,1,0,1]=o*(-0.474400097866)*x_ref[1]**(o-1)+(-0.315912223349)
-        ref[5,1,1,0]=o*(0.764961378837)*x_ref[0]**(o-1)+(-0.83633430067)
-        ref[5,1,1,1]=o*(-0.446378328981)*x_ref[1]**(o-1)+(-0.278460992776)
-      else:
-        arg[0,0,0]=(0.723756735151)*x[0]**o+(0.738121670547)*x[0]+(0.384835073242)*x[1]**o+(-0.997944909714)*x[1]+(0.271533052097)*x[2]**o+(-0.667680363953)*x[2]
-        arg[0,0,1]=(-0.279804914835)*x[0]**o+(0.789671404386)*x[0]+(-0.823187173328)*x[1]**o+(-0.0126377581755)*x[1]+(-0.942836469998)*x[2]**o+(0.416417451133)*x[2]
-        arg[0,1,0]=(-0.69035514237)*x[0]**o+(0.388349204037)*x[0]+(0.807201832597)*x[1]**o+(-0.969007115064)*x[1]+(0.280506744137)*x[2]**o+(0.228554540968)*x[2]
-        arg[0,1,1]=(0.893542584763)*x[0]**o+(-0.755974692532)*x[0]+(0.675321004205)*x[1]**o+(0.670278291297)*x[1]+(0.92092687885)*x[2]**o+(-0.516288388724)*x[2]
-        arg[1,0,0]=(0.503764409596)*x[0]**o+(-0.39410032918)*x[0]+(0.532408717712)*x[1]**o+(0.0658355614843)*x[1]+(-0.533534889451)*x[2]**o+(0.846333211477)*x[2]
-        arg[1,0,1]=(0.520531780859)*x[0]**o+(0.869039672332)*x[0]+(-0.706342144586)*x[1]**o+(0.0665768341658)*x[1]+(-0.909079295867)*x[2]**o+(-0.34153327843)*x[2]
-        arg[1,1,0]=(-0.873546169914)*x[0]**o+(-0.554907283387)*x[0]+(-0.0560665557101)*x[1]**o+(0.436703623389)*x[1]+(0.730437022736)*x[2]**o+(0.100904171105)*x[2]
-        arg[1,1,1]=(0.845958886681)*x[0]**o+(0.376444128389)*x[0]+(-0.393744308499)*x[1]**o+(-0.0940537397734)*x[1]+(0.178796464778)*x[2]**o+(-0.584448595407)*x[2]
-        arg[2,0,0]=(0.000704382305339)*x[0]**o+(-0.836800712787)*x[0]+(0.671931504433)*x[1]**o+(0.263280364406)*x[1]+(-0.746980015754)*x[2]**o+(-0.985058787575)*x[2]
-        arg[2,0,1]=(-0.540690929008)*x[0]**o+(0.656899216804)*x[0]+(-0.608036845804)*x[1]**o+(0.224943400248)*x[1]+(-0.312449005326)*x[2]**o+(-0.621458231634)*x[2]
-        arg[2,1,0]=(0.440432866893)*x[0]**o+(0.972046189647)*x[0]+(0.060785199375)*x[1]**o+(0.304756432986)*x[1]+(-0.473510049103)*x[2]**o+(0.3707166351)*x[2]
-        arg[2,1,1]=(0.96344472567)*x[0]**o+(-0.153932665404)*x[0]+(-0.43646142206)*x[1]**o+(0.4838463484)*x[1]+(0.613286612579)*x[2]**o+(0.84521461472)*x[2]
-        arg[3,0,0]=(0.65147393118)*x[0]**o+(-0.886665762467)*x[0]+(-0.266000665973)*x[1]**o+(0.897979405808)*x[1]+(0.699333158084)*x[2]**o+(-0.460865970247)*x[2]
-        arg[3,0,1]=(0.870253308112)*x[0]**o+(-0.248736315721)*x[0]+(-0.816719773596)*x[1]**o+(-0.89378202899)*x[1]+(0.524350309915)*x[2]**o+(0.107325872954)*x[2]
-        arg[3,1,0]=(-0.152250686624)*x[0]**o+(-0.89784066484)*x[0]+(-0.327207891694)*x[1]**o+(0.346548492907)*x[1]+(0.409288642845)*x[2]**o+(-0.627349664194)*x[2]
-        arg[3,1,1]=(0.398337202036)*x[0]**o+(0.307156588584)*x[0]+(0.0567088869624)*x[1]**o+(-0.132313990308)*x[1]+(-0.361821356587)*x[2]**o+(0.913518325149)*x[2]
-        arg[4,0,0]=(0.184289428296)*x[0]**o+(0.138095407277)*x[0]+(0.514405012603)*x[1]**o+(0.590757249119)*x[1]+(-0.984116206238)*x[2]**o+(-0.176561783123)*x[2]
-        arg[4,0,1]=(-0.804189448075)*x[0]**o+(0.662750787102)*x[0]+(0.361634380444)*x[1]**o+(-0.682665313256)*x[1]+(-0.0738989964344)*x[2]**o+(0.8870747144)*x[2]
-        arg[4,1,0]=(-0.28290153618)*x[0]**o+(-0.942107675992)*x[0]+(0.308140792703)*x[1]**o+(0.686659531002)*x[1]+(0.789553636322)*x[2]**o+(0.587377542884)*x[2]
-        arg[4,1,1]=(0.6137979501)*x[0]**o+(-0.564031937362)*x[0]+(-0.116407590432)*x[1]**o+(-0.119100735459)*x[1]+(0.673631378916)*x[2]**o+(0.766413057635)*x[2]
-        arg[5,0,0]=(-0.871242033478)*x[0]**o+(0.823859447959)*x[0]+(-0.0506075089356)*x[1]**o+(-0.901254358367)*x[1]+(0.936710991394)*x[2]**o+(0.328438496312)*x[2]
-        arg[5,0,1]=(-0.768255700059)*x[0]**o+(0.199623934067)*x[0]+(-0.0715921959057)*x[1]**o+(-0.542435290562)*x[1]+(-0.278962068381)*x[2]**o+(0.784363143932)*x[2]
-        arg[5,1,0]=(0.897130313615)*x[0]**o+(-0.519033315355)*x[0]+(0.223176381444)*x[1]**o+(0.495645921147)*x[1]+(-0.0957696173909)*x[2]**o+(-0.768307051074)*x[2]
-        arg[5,1,1]=(-0.944161779454)*x[0]**o+(0.430097328631)*x[0]+(0.86626977715)*x[1]**o+(-0.675612908116)*x[1]+(0.506821683353)*x[2]**o+(0.386559021354)*x[2]
-        ref[0,0,0,0]=o*(0.723756735151)*x_ref[0]**(o-1)+(0.738121670547)
-        ref[0,0,0,1]=o*(0.384835073242)*x_ref[1]**(o-1)+(-0.997944909714)
-        ref[0,0,0,2]=o*(0.271533052097)*x_ref[2]**(o-1)+(-0.667680363953)
-        ref[0,0,1,0]=o*(-0.279804914835)*x_ref[0]**(o-1)+(0.789671404386)
-        ref[0,0,1,1]=o*(-0.823187173328)*x_ref[1]**(o-1)+(-0.0126377581755)
-        ref[0,0,1,2]=o*(-0.942836469998)*x_ref[2]**(o-1)+(0.416417451133)
-        ref[0,1,0,0]=o*(-0.69035514237)*x_ref[0]**(o-1)+(0.388349204037)
-        ref[0,1,0,1]=o*(0.807201832597)*x_ref[1]**(o-1)+(-0.969007115064)
-        ref[0,1,0,2]=o*(0.280506744137)*x_ref[2]**(o-1)+(0.228554540968)
-        ref[0,1,1,0]=o*(0.893542584763)*x_ref[0]**(o-1)+(-0.755974692532)
-        ref[0,1,1,1]=o*(0.675321004205)*x_ref[1]**(o-1)+(0.670278291297)
-        ref[0,1,1,2]=o*(0.92092687885)*x_ref[2]**(o-1)+(-0.516288388724)
-        ref[1,0,0,0]=o*(0.503764409596)*x_ref[0]**(o-1)+(-0.39410032918)
-        ref[1,0,0,1]=o*(0.532408717712)*x_ref[1]**(o-1)+(0.0658355614843)
-        ref[1,0,0,2]=o*(-0.533534889451)*x_ref[2]**(o-1)+(0.846333211477)
-        ref[1,0,1,0]=o*(0.520531780859)*x_ref[0]**(o-1)+(0.869039672332)
-        ref[1,0,1,1]=o*(-0.706342144586)*x_ref[1]**(o-1)+(0.0665768341658)
-        ref[1,0,1,2]=o*(-0.909079295867)*x_ref[2]**(o-1)+(-0.34153327843)
-        ref[1,1,0,0]=o*(-0.873546169914)*x_ref[0]**(o-1)+(-0.554907283387)
-        ref[1,1,0,1]=o*(-0.0560665557101)*x_ref[1]**(o-1)+(0.436703623389)
-        ref[1,1,0,2]=o*(0.730437022736)*x_ref[2]**(o-1)+(0.100904171105)
-        ref[1,1,1,0]=o*(0.845958886681)*x_ref[0]**(o-1)+(0.376444128389)
-        ref[1,1,1,1]=o*(-0.393744308499)*x_ref[1]**(o-1)+(-0.0940537397734)
-        ref[1,1,1,2]=o*(0.178796464778)*x_ref[2]**(o-1)+(-0.584448595407)
-        ref[2,0,0,0]=o*(0.000704382305339)*x_ref[0]**(o-1)+(-0.836800712787)
-        ref[2,0,0,1]=o*(0.671931504433)*x_ref[1]**(o-1)+(0.263280364406)
-        ref[2,0,0,2]=o*(-0.746980015754)*x_ref[2]**(o-1)+(-0.985058787575)
-        ref[2,0,1,0]=o*(-0.540690929008)*x_ref[0]**(o-1)+(0.656899216804)
-        ref[2,0,1,1]=o*(-0.608036845804)*x_ref[1]**(o-1)+(0.224943400248)
-        ref[2,0,1,2]=o*(-0.312449005326)*x_ref[2]**(o-1)+(-0.621458231634)
-        ref[2,1,0,0]=o*(0.440432866893)*x_ref[0]**(o-1)+(0.972046189647)
-        ref[2,1,0,1]=o*(0.060785199375)*x_ref[1]**(o-1)+(0.304756432986)
-        ref[2,1,0,2]=o*(-0.473510049103)*x_ref[2]**(o-1)+(0.3707166351)
-        ref[2,1,1,0]=o*(0.96344472567)*x_ref[0]**(o-1)+(-0.153932665404)
-        ref[2,1,1,1]=o*(-0.43646142206)*x_ref[1]**(o-1)+(0.4838463484)
-        ref[2,1,1,2]=o*(0.613286612579)*x_ref[2]**(o-1)+(0.84521461472)
-        ref[3,0,0,0]=o*(0.65147393118)*x_ref[0]**(o-1)+(-0.886665762467)
-        ref[3,0,0,1]=o*(-0.266000665973)*x_ref[1]**(o-1)+(0.897979405808)
-        ref[3,0,0,2]=o*(0.699333158084)*x_ref[2]**(o-1)+(-0.460865970247)
-        ref[3,0,1,0]=o*(0.870253308112)*x_ref[0]**(o-1)+(-0.248736315721)
-        ref[3,0,1,1]=o*(-0.816719773596)*x_ref[1]**(o-1)+(-0.89378202899)
-        ref[3,0,1,2]=o*(0.524350309915)*x_ref[2]**(o-1)+(0.107325872954)
-        ref[3,1,0,0]=o*(-0.152250686624)*x_ref[0]**(o-1)+(-0.89784066484)
-        ref[3,1,0,1]=o*(-0.327207891694)*x_ref[1]**(o-1)+(0.346548492907)
-        ref[3,1,0,2]=o*(0.409288642845)*x_ref[2]**(o-1)+(-0.627349664194)
-        ref[3,1,1,0]=o*(0.398337202036)*x_ref[0]**(o-1)+(0.307156588584)
-        ref[3,1,1,1]=o*(0.0567088869624)*x_ref[1]**(o-1)+(-0.132313990308)
-        ref[3,1,1,2]=o*(-0.361821356587)*x_ref[2]**(o-1)+(0.913518325149)
-        ref[4,0,0,0]=o*(0.184289428296)*x_ref[0]**(o-1)+(0.138095407277)
-        ref[4,0,0,1]=o*(0.514405012603)*x_ref[1]**(o-1)+(0.590757249119)
-        ref[4,0,0,2]=o*(-0.984116206238)*x_ref[2]**(o-1)+(-0.176561783123)
-        ref[4,0,1,0]=o*(-0.804189448075)*x_ref[0]**(o-1)+(0.662750787102)
-        ref[4,0,1,1]=o*(0.361634380444)*x_ref[1]**(o-1)+(-0.682665313256)
-        ref[4,0,1,2]=o*(-0.0738989964344)*x_ref[2]**(o-1)+(0.8870747144)
-        ref[4,1,0,0]=o*(-0.28290153618)*x_ref[0]**(o-1)+(-0.942107675992)
-        ref[4,1,0,1]=o*(0.308140792703)*x_ref[1]**(o-1)+(0.686659531002)
-        ref[4,1,0,2]=o*(0.789553636322)*x_ref[2]**(o-1)+(0.587377542884)
-        ref[4,1,1,0]=o*(0.6137979501)*x_ref[0]**(o-1)+(-0.564031937362)
-        ref[4,1,1,1]=o*(-0.116407590432)*x_ref[1]**(o-1)+(-0.119100735459)
-        ref[4,1,1,2]=o*(0.673631378916)*x_ref[2]**(o-1)+(0.766413057635)
-        ref[5,0,0,0]=o*(-0.871242033478)*x_ref[0]**(o-1)+(0.823859447959)
-        ref[5,0,0,1]=o*(-0.0506075089356)*x_ref[1]**(o-1)+(-0.901254358367)
-        ref[5,0,0,2]=o*(0.936710991394)*x_ref[2]**(o-1)+(0.328438496312)
-        ref[5,0,1,0]=o*(-0.768255700059)*x_ref[0]**(o-1)+(0.199623934067)
-        ref[5,0,1,1]=o*(-0.0715921959057)*x_ref[1]**(o-1)+(-0.542435290562)
-        ref[5,0,1,2]=o*(-0.278962068381)*x_ref[2]**(o-1)+(0.784363143932)
-        ref[5,1,0,0]=o*(0.897130313615)*x_ref[0]**(o-1)+(-0.519033315355)
-        ref[5,1,0,1]=o*(0.223176381444)*x_ref[1]**(o-1)+(0.495645921147)
-        ref[5,1,0,2]=o*(-0.0957696173909)*x_ref[2]**(o-1)+(-0.768307051074)
-        ref[5,1,1,0]=o*(-0.944161779454)*x_ref[0]**(o-1)+(0.430097328631)
-        ref[5,1,1,1]=o*(0.86626977715)*x_ref[1]**(o-1)+(-0.675612908116)
-        ref[5,1,1,2]=o*(0.506821683353)*x_ref[2]**(o-1)+(0.386559021354)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.54415545025)*x[0]**o+(0.979947366774)*x[0]+(-0.405934730304)*x[1]**o+(0.424994268397)*x[1]
-        ref[0]=o*(0.54415545025)*x_ref[0]**(o-1)+(0.979947366774)
-        ref[1]=o*(-0.405934730304)*x_ref[1]**(o-1)+(0.424994268397)
-      else:
-        arg=(-0.0240792232301)*x[0]**o+(0.33156704088)*x[0]+(-0.051539264252)*x[1]**o+(-0.886370693155)*x[1]+(-0.954475798211)*x[2]**o+(0.238073928589)*x[2]
-        ref[0]=o*(-0.0240792232301)*x_ref[0]**(o-1)+(0.33156704088)
-        ref[1]=o*(-0.051539264252)*x_ref[1]**(o-1)+(-0.886370693155)
-        ref[2]=o*(-0.954475798211)*x_ref[2]**(o-1)+(0.238073928589)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.526471606132)*x[0]**o+(-0.355534153967)*x[0]+(-0.792258102571)*x[1]**o+(0.386283553167)*x[1]
-        arg[1]=(-0.892924864905)*x[0]**o+(0.19218757952)*x[0]+(0.00248964495987)*x[1]**o+(-0.687070938997)*x[1]
-        ref[0,0]=o*(-0.526471606132)*x_ref[0]**(o-1)+(-0.355534153967)
-        ref[0,1]=o*(-0.792258102571)*x_ref[1]**(o-1)+(0.386283553167)
-        ref[1,0]=o*(-0.892924864905)*x_ref[0]**(o-1)+(0.19218757952)
-        ref[1,1]=o*(0.00248964495987)*x_ref[1]**(o-1)+(-0.687070938997)
-      else:
-        arg[0]=(-0.254013984725)*x[0]**o+(0.126174108068)*x[0]+(-0.967653739084)*x[1]**o+(-0.524294999327)*x[1]+(0.374454913375)*x[2]**o+(0.783768839592)*x[2]
-        arg[1]=(0.862328996944)*x[0]**o+(-0.0100272707295)*x[0]+(0.163524617753)*x[1]**o+(-0.19251370258)*x[1]+(0.889557068195)*x[2]**o+(0.573248942406)*x[2]
-        ref[0,0]=o*(-0.254013984725)*x_ref[0]**(o-1)+(0.126174108068)
-        ref[0,1]=o*(-0.967653739084)*x_ref[1]**(o-1)+(-0.524294999327)
-        ref[0,2]=o*(0.374454913375)*x_ref[2]**(o-1)+(0.783768839592)
-        ref[1,0]=o*(0.862328996944)*x_ref[0]**(o-1)+(-0.0100272707295)
-        ref[1,1]=o*(0.163524617753)*x_ref[1]**(o-1)+(-0.19251370258)
-        ref[1,2]=o*(0.889557068195)*x_ref[2]**(o-1)+(0.573248942406)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.712410724071)*x[0]**o+(0.642832165006)*x[0]+(0.409613677638)*x[1]**o+(-0.940707375829)*x[1]
-        arg[0,1]=(-0.192677448978)*x[0]**o+(0.928105399392)*x[0]+(-0.0976390111113)*x[1]**o+(0.152541825282)*x[1]
-        arg[0,2]=(-0.555865920622)*x[0]**o+(0.187618737934)*x[0]+(-0.400398722616)*x[1]**o+(0.132335647294)*x[1]
-        arg[0,3]=(-0.0984345355899)*x[0]**o+(-0.136251593387)*x[0]+(0.820900167194)*x[1]**o+(-0.54323976155)*x[1]
-        arg[0,4]=(-0.718763327727)*x[0]**o+(-0.993678837401)*x[0]+(0.0282625285716)*x[1]**o+(0.480464124636)*x[1]
-        arg[1,0]=(-0.1635372419)*x[0]**o+(0.97173720053)*x[0]+(0.0423190406144)*x[1]**o+(-0.607779321237)*x[1]
-        arg[1,1]=(-0.59220466746)*x[0]**o+(-0.329625880847)*x[0]+(0.176412343254)*x[1]**o+(0.955769019385)*x[1]
-        arg[1,2]=(-0.516421195901)*x[0]**o+(0.147037193899)*x[0]+(0.247835053631)*x[1]**o+(-0.877986653535)*x[1]
-        arg[1,3]=(-0.317266388999)*x[0]**o+(0.864393749347)*x[0]+(-0.957863705756)*x[1]**o+(-0.884975429798)*x[1]
-        arg[1,4]=(0.540121554391)*x[0]**o+(0.808050078272)*x[0]+(0.703557587067)*x[1]**o+(-0.0976121077766)*x[1]
-        arg[2,0]=(0.23658022222)*x[0]**o+(0.122038637852)*x[0]+(0.411570045798)*x[1]**o+(-0.434531687414)*x[1]
-        arg[2,1]=(-0.378365306249)*x[0]**o+(0.511747532394)*x[0]+(0.586326813286)*x[1]**o+(0.699918966936)*x[1]
-        arg[2,2]=(0.445092669694)*x[0]**o+(0.637517787944)*x[0]+(-0.668779388847)*x[1]**o+(0.487635262236)*x[1]
-        arg[2,3]=(-0.232265851556)*x[0]**o+(0.391449220433)*x[0]+(0.647177607766)*x[1]**o+(0.207062996634)*x[1]
-        arg[2,4]=(0.338412227828)*x[0]**o+(0.0205801366652)*x[0]+(-0.492628796478)*x[1]**o+(-0.683459852092)*x[1]
-        arg[3,0]=(0.584296838468)*x[0]**o+(-0.598793253755)*x[0]+(0.707319426212)*x[1]**o+(0.678834769735)*x[1]
-        arg[3,1]=(0.801295300134)*x[0]**o+(0.0494871119593)*x[0]+(0.378929822492)*x[1]**o+(-0.536309789421)*x[1]
-        arg[3,2]=(-0.761535984131)*x[0]**o+(0.121584094596)*x[0]+(-0.00655849155175)*x[1]**o+(0.321872124523)*x[1]
-        arg[3,3]=(0.384633290815)*x[0]**o+(-0.710356674518)*x[0]+(0.962059942069)*x[1]**o+(-0.593059919585)*x[1]
-        arg[3,4]=(-0.608988807286)*x[0]**o+(-0.0776468065145)*x[0]+(-0.701400144867)*x[1]**o+(0.643928611178)*x[1]
-        ref[0,0,0]=o*(0.712410724071)*x_ref[0]**(o-1)+(0.642832165006)
-        ref[0,0,1]=o*(0.409613677638)*x_ref[1]**(o-1)+(-0.940707375829)
-        ref[0,1,0]=o*(-0.192677448978)*x_ref[0]**(o-1)+(0.928105399392)
-        ref[0,1,1]=o*(-0.0976390111113)*x_ref[1]**(o-1)+(0.152541825282)
-        ref[0,2,0]=o*(-0.555865920622)*x_ref[0]**(o-1)+(0.187618737934)
-        ref[0,2,1]=o*(-0.400398722616)*x_ref[1]**(o-1)+(0.132335647294)
-        ref[0,3,0]=o*(-0.0984345355899)*x_ref[0]**(o-1)+(-0.136251593387)
-        ref[0,3,1]=o*(0.820900167194)*x_ref[1]**(o-1)+(-0.54323976155)
-        ref[0,4,0]=o*(-0.718763327727)*x_ref[0]**(o-1)+(-0.993678837401)
-        ref[0,4,1]=o*(0.0282625285716)*x_ref[1]**(o-1)+(0.480464124636)
-        ref[1,0,0]=o*(-0.1635372419)*x_ref[0]**(o-1)+(0.97173720053)
-        ref[1,0,1]=o*(0.0423190406144)*x_ref[1]**(o-1)+(-0.607779321237)
-        ref[1,1,0]=o*(-0.59220466746)*x_ref[0]**(o-1)+(-0.329625880847)
-        ref[1,1,1]=o*(0.176412343254)*x_ref[1]**(o-1)+(0.955769019385)
-        ref[1,2,0]=o*(-0.516421195901)*x_ref[0]**(o-1)+(0.147037193899)
-        ref[1,2,1]=o*(0.247835053631)*x_ref[1]**(o-1)+(-0.877986653535)
-        ref[1,3,0]=o*(-0.317266388999)*x_ref[0]**(o-1)+(0.864393749347)
-        ref[1,3,1]=o*(-0.957863705756)*x_ref[1]**(o-1)+(-0.884975429798)
-        ref[1,4,0]=o*(0.540121554391)*x_ref[0]**(o-1)+(0.808050078272)
-        ref[1,4,1]=o*(0.703557587067)*x_ref[1]**(o-1)+(-0.0976121077766)
-        ref[2,0,0]=o*(0.23658022222)*x_ref[0]**(o-1)+(0.122038637852)
-        ref[2,0,1]=o*(0.411570045798)*x_ref[1]**(o-1)+(-0.434531687414)
-        ref[2,1,0]=o*(-0.378365306249)*x_ref[0]**(o-1)+(0.511747532394)
-        ref[2,1,1]=o*(0.586326813286)*x_ref[1]**(o-1)+(0.699918966936)
-        ref[2,2,0]=o*(0.445092669694)*x_ref[0]**(o-1)+(0.637517787944)
-        ref[2,2,1]=o*(-0.668779388847)*x_ref[1]**(o-1)+(0.487635262236)
-        ref[2,3,0]=o*(-0.232265851556)*x_ref[0]**(o-1)+(0.391449220433)
-        ref[2,3,1]=o*(0.647177607766)*x_ref[1]**(o-1)+(0.207062996634)
-        ref[2,4,0]=o*(0.338412227828)*x_ref[0]**(o-1)+(0.0205801366652)
-        ref[2,4,1]=o*(-0.492628796478)*x_ref[1]**(o-1)+(-0.683459852092)
-        ref[3,0,0]=o*(0.584296838468)*x_ref[0]**(o-1)+(-0.598793253755)
-        ref[3,0,1]=o*(0.707319426212)*x_ref[1]**(o-1)+(0.678834769735)
-        ref[3,1,0]=o*(0.801295300134)*x_ref[0]**(o-1)+(0.0494871119593)
-        ref[3,1,1]=o*(0.378929822492)*x_ref[1]**(o-1)+(-0.536309789421)
-        ref[3,2,0]=o*(-0.761535984131)*x_ref[0]**(o-1)+(0.121584094596)
-        ref[3,2,1]=o*(-0.00655849155175)*x_ref[1]**(o-1)+(0.321872124523)
-        ref[3,3,0]=o*(0.384633290815)*x_ref[0]**(o-1)+(-0.710356674518)
-        ref[3,3,1]=o*(0.962059942069)*x_ref[1]**(o-1)+(-0.593059919585)
-        ref[3,4,0]=o*(-0.608988807286)*x_ref[0]**(o-1)+(-0.0776468065145)
-        ref[3,4,1]=o*(-0.701400144867)*x_ref[1]**(o-1)+(0.643928611178)
-      else:
-        arg[0,0]=(-0.514546772198)*x[0]**o+(0.679859064768)*x[0]+(-0.494037106077)*x[1]**o+(-0.0598645161488)*x[1]+(-0.543474311879)*x[2]**o+(0.597237276677)*x[2]
-        arg[0,1]=(0.0826513727579)*x[0]**o+(0.870535937411)*x[0]+(-0.194047768119)*x[1]**o+(-0.111616761775)*x[1]+(0.697073558803)*x[2]**o+(-0.170433075843)*x[2]
-        arg[0,2]=(0.608560200938)*x[0]**o+(-0.28991661304)*x[0]+(0.929121366615)*x[1]**o+(0.445280468492)*x[1]+(-0.0671026162019)*x[2]**o+(-0.835086989851)*x[2]
-        arg[0,3]=(-0.256476478337)*x[0]**o+(-0.857686365148)*x[0]+(-0.309306419219)*x[1]**o+(0.750579112592)*x[1]+(0.758254577714)*x[2]**o+(0.108972886739)*x[2]
-        arg[0,4]=(0.189540467853)*x[0]**o+(-0.639906129587)*x[0]+(0.1086564431)*x[1]**o+(-0.254754163159)*x[1]+(-0.595415956315)*x[2]**o+(0.416643698623)*x[2]
-        arg[1,0]=(0.649640741159)*x[0]**o+(-0.715604744977)*x[0]+(0.144698127223)*x[1]**o+(0.84058008507)*x[1]+(0.00226738664623)*x[2]**o+(0.143092105366)*x[2]
-        arg[1,1]=(0.30428097785)*x[0]**o+(0.172630542192)*x[0]+(0.645118113075)*x[1]**o+(-0.394468022223)*x[1]+(0.731670923192)*x[2]**o+(-0.676021495379)*x[2]
-        arg[1,2]=(0.56459927889)*x[0]**o+(-0.624980053566)*x[0]+(-0.524836958708)*x[1]**o+(0.282862320474)*x[1]+(0.99070455422)*x[2]**o+(0.000265746399286)*x[2]
-        arg[1,3]=(-0.251929813217)*x[0]**o+(0.00685246758491)*x[0]+(-0.252595929082)*x[1]**o+(-0.997558334417)*x[1]+(-0.431329146194)*x[2]**o+(0.0685298495116)*x[2]
-        arg[1,4]=(-0.850398225165)*x[0]**o+(-0.752363025861)*x[0]+(-0.669448553729)*x[1]**o+(0.809247179374)*x[1]+(-0.927467807251)*x[2]**o+(-0.498094160268)*x[2]
-        arg[2,0]=(0.541736859663)*x[0]**o+(-0.651273876855)*x[0]+(-0.679670779769)*x[1]**o+(0.669564679419)*x[1]+(-0.825048237017)*x[2]**o+(-0.247744537755)*x[2]
-        arg[2,1]=(0.909016713138)*x[0]**o+(-0.794124179572)*x[0]+(0.887294650854)*x[1]**o+(-0.198933351435)*x[1]+(-0.819671062456)*x[2]**o+(0.287455634612)*x[2]
-        arg[2,2]=(-0.469337238665)*x[0]**o+(0.787828984218)*x[0]+(0.916042829702)*x[1]**o+(-0.475983675757)*x[1]+(-0.350660319046)*x[2]**o+(0.944222119413)*x[2]
-        arg[2,3]=(-0.194629035155)*x[0]**o+(0.452058614199)*x[0]+(-0.565150768916)*x[1]**o+(-0.967642852138)*x[1]+(-0.345332973443)*x[2]**o+(-0.238359110833)*x[2]
-        arg[2,4]=(-0.744197369952)*x[0]**o+(-0.0161450929106)*x[0]+(0.946555120156)*x[1]**o+(-0.336314723492)*x[1]+(0.212936909808)*x[2]**o+(-0.900582293569)*x[2]
-        arg[3,0]=(0.90736518985)*x[0]**o+(-0.866096443075)*x[0]+(0.440227521532)*x[1]**o+(-0.545983384676)*x[1]+(0.433167375756)*x[2]**o+(-0.913060961228)*x[2]
-        arg[3,1]=(0.33547032327)*x[0]**o+(0.766388218896)*x[0]+(-0.386141806114)*x[1]**o+(0.28471049668)*x[1]+(0.389347155974)*x[2]**o+(0.211663215285)*x[2]
-        arg[3,2]=(0.193757801099)*x[0]**o+(0.0145439587225)*x[0]+(0.575506295918)*x[1]**o+(-0.678317336021)*x[1]+(0.64603157052)*x[2]**o+(-0.876667949279)*x[2]
-        arg[3,3]=(-0.0518002857411)*x[0]**o+(-0.540021971724)*x[0]+(-0.490275636747)*x[1]**o+(-0.849147647677)*x[1]+(-0.0132783508877)*x[2]**o+(0.0859860768541)*x[2]
-        arg[3,4]=(-0.332675003425)*x[0]**o+(-0.757986125506)*x[0]+(-0.487001539705)*x[1]**o+(0.898881577697)*x[1]+(0.56557767007)*x[2]**o+(0.181594113977)*x[2]
-        ref[0,0,0]=o*(-0.514546772198)*x_ref[0]**(o-1)+(0.679859064768)
-        ref[0,0,1]=o*(-0.494037106077)*x_ref[1]**(o-1)+(-0.0598645161488)
-        ref[0,0,2]=o*(-0.543474311879)*x_ref[2]**(o-1)+(0.597237276677)
-        ref[0,1,0]=o*(0.0826513727579)*x_ref[0]**(o-1)+(0.870535937411)
-        ref[0,1,1]=o*(-0.194047768119)*x_ref[1]**(o-1)+(-0.111616761775)
-        ref[0,1,2]=o*(0.697073558803)*x_ref[2]**(o-1)+(-0.170433075843)
-        ref[0,2,0]=o*(0.608560200938)*x_ref[0]**(o-1)+(-0.28991661304)
-        ref[0,2,1]=o*(0.929121366615)*x_ref[1]**(o-1)+(0.445280468492)
-        ref[0,2,2]=o*(-0.0671026162019)*x_ref[2]**(o-1)+(-0.835086989851)
-        ref[0,3,0]=o*(-0.256476478337)*x_ref[0]**(o-1)+(-0.857686365148)
-        ref[0,3,1]=o*(-0.309306419219)*x_ref[1]**(o-1)+(0.750579112592)
-        ref[0,3,2]=o*(0.758254577714)*x_ref[2]**(o-1)+(0.108972886739)
-        ref[0,4,0]=o*(0.189540467853)*x_ref[0]**(o-1)+(-0.639906129587)
-        ref[0,4,1]=o*(0.1086564431)*x_ref[1]**(o-1)+(-0.254754163159)
-        ref[0,4,2]=o*(-0.595415956315)*x_ref[2]**(o-1)+(0.416643698623)
-        ref[1,0,0]=o*(0.649640741159)*x_ref[0]**(o-1)+(-0.715604744977)
-        ref[1,0,1]=o*(0.144698127223)*x_ref[1]**(o-1)+(0.84058008507)
-        ref[1,0,2]=o*(0.00226738664623)*x_ref[2]**(o-1)+(0.143092105366)
-        ref[1,1,0]=o*(0.30428097785)*x_ref[0]**(o-1)+(0.172630542192)
-        ref[1,1,1]=o*(0.645118113075)*x_ref[1]**(o-1)+(-0.394468022223)
-        ref[1,1,2]=o*(0.731670923192)*x_ref[2]**(o-1)+(-0.676021495379)
-        ref[1,2,0]=o*(0.56459927889)*x_ref[0]**(o-1)+(-0.624980053566)
-        ref[1,2,1]=o*(-0.524836958708)*x_ref[1]**(o-1)+(0.282862320474)
-        ref[1,2,2]=o*(0.99070455422)*x_ref[2]**(o-1)+(0.000265746399286)
-        ref[1,3,0]=o*(-0.251929813217)*x_ref[0]**(o-1)+(0.00685246758491)
-        ref[1,3,1]=o*(-0.252595929082)*x_ref[1]**(o-1)+(-0.997558334417)
-        ref[1,3,2]=o*(-0.431329146194)*x_ref[2]**(o-1)+(0.0685298495116)
-        ref[1,4,0]=o*(-0.850398225165)*x_ref[0]**(o-1)+(-0.752363025861)
-        ref[1,4,1]=o*(-0.669448553729)*x_ref[1]**(o-1)+(0.809247179374)
-        ref[1,4,2]=o*(-0.927467807251)*x_ref[2]**(o-1)+(-0.498094160268)
-        ref[2,0,0]=o*(0.541736859663)*x_ref[0]**(o-1)+(-0.651273876855)
-        ref[2,0,1]=o*(-0.679670779769)*x_ref[1]**(o-1)+(0.669564679419)
-        ref[2,0,2]=o*(-0.825048237017)*x_ref[2]**(o-1)+(-0.247744537755)
-        ref[2,1,0]=o*(0.909016713138)*x_ref[0]**(o-1)+(-0.794124179572)
-        ref[2,1,1]=o*(0.887294650854)*x_ref[1]**(o-1)+(-0.198933351435)
-        ref[2,1,2]=o*(-0.819671062456)*x_ref[2]**(o-1)+(0.287455634612)
-        ref[2,2,0]=o*(-0.469337238665)*x_ref[0]**(o-1)+(0.787828984218)
-        ref[2,2,1]=o*(0.916042829702)*x_ref[1]**(o-1)+(-0.475983675757)
-        ref[2,2,2]=o*(-0.350660319046)*x_ref[2]**(o-1)+(0.944222119413)
-        ref[2,3,0]=o*(-0.194629035155)*x_ref[0]**(o-1)+(0.452058614199)
-        ref[2,3,1]=o*(-0.565150768916)*x_ref[1]**(o-1)+(-0.967642852138)
-        ref[2,3,2]=o*(-0.345332973443)*x_ref[2]**(o-1)+(-0.238359110833)
-        ref[2,4,0]=o*(-0.744197369952)*x_ref[0]**(o-1)+(-0.0161450929106)
-        ref[2,4,1]=o*(0.946555120156)*x_ref[1]**(o-1)+(-0.336314723492)
-        ref[2,4,2]=o*(0.212936909808)*x_ref[2]**(o-1)+(-0.900582293569)
-        ref[3,0,0]=o*(0.90736518985)*x_ref[0]**(o-1)+(-0.866096443075)
-        ref[3,0,1]=o*(0.440227521532)*x_ref[1]**(o-1)+(-0.545983384676)
-        ref[3,0,2]=o*(0.433167375756)*x_ref[2]**(o-1)+(-0.913060961228)
-        ref[3,1,0]=o*(0.33547032327)*x_ref[0]**(o-1)+(0.766388218896)
-        ref[3,1,1]=o*(-0.386141806114)*x_ref[1]**(o-1)+(0.28471049668)
-        ref[3,1,2]=o*(0.389347155974)*x_ref[2]**(o-1)+(0.211663215285)
-        ref[3,2,0]=o*(0.193757801099)*x_ref[0]**(o-1)+(0.0145439587225)
-        ref[3,2,1]=o*(0.575506295918)*x_ref[1]**(o-1)+(-0.678317336021)
-        ref[3,2,2]=o*(0.64603157052)*x_ref[2]**(o-1)+(-0.876667949279)
-        ref[3,3,0]=o*(-0.0518002857411)*x_ref[0]**(o-1)+(-0.540021971724)
-        ref[3,3,1]=o*(-0.490275636747)*x_ref[1]**(o-1)+(-0.849147647677)
-        ref[3,3,2]=o*(-0.0132783508877)*x_ref[2]**(o-1)+(0.0859860768541)
-        ref[3,4,0]=o*(-0.332675003425)*x_ref[0]**(o-1)+(-0.757986125506)
-        ref[3,4,1]=o*(-0.487001539705)*x_ref[1]**(o-1)+(0.898881577697)
-        ref[3,4,2]=o*(0.56557767007)*x_ref[2]**(o-1)+(0.181594113977)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.568278554396)*x[0]**o+(0.714635312506)*x[0]+(-0.121000061881)*x[1]**o+(0.650923087629)*x[1]
-        arg[0,0,1]=(0.610070747198)*x[0]**o+(-0.17228586298)*x[0]+(-0.763207252556)*x[1]**o+(-0.417620736844)*x[1]
-        arg[0,1,0]=(0.953437717333)*x[0]**o+(-0.877858891638)*x[0]+(-0.629855255168)*x[1]**o+(0.138168708132)*x[1]
-        arg[0,1,1]=(-0.676346259275)*x[0]**o+(0.810400719592)*x[0]+(0.252517037374)*x[1]**o+(-0.0253025825974)*x[1]
-        arg[1,0,0]=(0.0354009852553)*x[0]**o+(-0.930486981217)*x[0]+(0.515533244848)*x[1]**o+(0.39357313927)*x[1]
-        arg[1,0,1]=(4.954730054e-05)*x[0]**o+(0.902841279458)*x[0]+(0.0974175050415)*x[1]**o+(-0.283224733511)*x[1]
-        arg[1,1,0]=(-0.3695113121)*x[0]**o+(-0.425976895152)*x[0]+(-0.752863101988)*x[1]**o+(-0.135026977845)*x[1]
-        arg[1,1,1]=(-0.627750038208)*x[0]**o+(-0.682825202306)*x[0]+(0.598327522753)*x[1]**o+(0.0402698525348)*x[1]
-        arg[2,0,0]=(0.95982907811)*x[0]**o+(-0.786158711751)*x[0]+(0.6974717418)*x[1]**o+(-0.548248895713)*x[1]
-        arg[2,0,1]=(-0.21063630362)*x[0]**o+(-0.979628903483)*x[0]+(0.514851452559)*x[1]**o+(-0.294218784425)*x[1]
-        arg[2,1,0]=(-0.446140926476)*x[0]**o+(0.658918134389)*x[0]+(-0.166087456007)*x[1]**o+(0.328044805625)*x[1]
-        arg[2,1,1]=(0.937161634589)*x[0]**o+(0.594322457074)*x[0]+(0.992336676032)*x[1]**o+(-0.499637100315)*x[1]
-        arg[3,0,0]=(0.767677974163)*x[0]**o+(-0.820615663298)*x[0]+(0.558185245925)*x[1]**o+(-0.763525476816)*x[1]
-        arg[3,0,1]=(-0.866581629552)*x[0]**o+(0.589993777037)*x[0]+(-0.0704817160146)*x[1]**o+(-0.897469280048)*x[1]
-        arg[3,1,0]=(-0.290118027748)*x[0]**o+(0.211790364383)*x[0]+(-0.0688758465892)*x[1]**o+(0.777490292219)*x[1]
-        arg[3,1,1]=(-0.969418722549)*x[0]**o+(-0.46884683812)*x[0]+(0.826696594862)*x[1]**o+(-0.926802811507)*x[1]
-        arg[4,0,0]=(-0.230285931083)*x[0]**o+(0.905695021426)*x[0]+(-0.581906633624)*x[1]**o+(-0.69277147014)*x[1]
-        arg[4,0,1]=(-0.251350536276)*x[0]**o+(0.352877501605)*x[0]+(0.290432460788)*x[1]**o+(0.614218150117)*x[1]
-        arg[4,1,0]=(-0.475014635407)*x[0]**o+(0.86786497963)*x[0]+(-0.763349511499)*x[1]**o+(0.817847286727)*x[1]
-        arg[4,1,1]=(0.0079711463132)*x[0]**o+(-0.20685339926)*x[0]+(0.377467915936)*x[1]**o+(-0.209268733968)*x[1]
-        arg[5,0,0]=(0.795790630791)*x[0]**o+(0.0661201279192)*x[0]+(0.932665258262)*x[1]**o+(-0.4785884914)*x[1]
-        arg[5,0,1]=(0.929422646068)*x[0]**o+(0.775378282324)*x[0]+(0.297482039582)*x[1]**o+(-0.700872789842)*x[1]
-        arg[5,1,0]=(0.678688297204)*x[0]**o+(0.365975847321)*x[0]+(-0.565261107289)*x[1]**o+(0.0317556604619)*x[1]
-        arg[5,1,1]=(-0.0231297032408)*x[0]**o+(-0.985865541949)*x[0]+(0.733821736669)*x[1]**o+(0.603255951212)*x[1]
-        ref[0,0,0,0]=o*(0.568278554396)*x_ref[0]**(o-1)+(0.714635312506)
-        ref[0,0,0,1]=o*(-0.121000061881)*x_ref[1]**(o-1)+(0.650923087629)
-        ref[0,0,1,0]=o*(0.610070747198)*x_ref[0]**(o-1)+(-0.17228586298)
-        ref[0,0,1,1]=o*(-0.763207252556)*x_ref[1]**(o-1)+(-0.417620736844)
-        ref[0,1,0,0]=o*(0.953437717333)*x_ref[0]**(o-1)+(-0.877858891638)
-        ref[0,1,0,1]=o*(-0.629855255168)*x_ref[1]**(o-1)+(0.138168708132)
-        ref[0,1,1,0]=o*(-0.676346259275)*x_ref[0]**(o-1)+(0.810400719592)
-        ref[0,1,1,1]=o*(0.252517037374)*x_ref[1]**(o-1)+(-0.0253025825974)
-        ref[1,0,0,0]=o*(0.0354009852553)*x_ref[0]**(o-1)+(-0.930486981217)
-        ref[1,0,0,1]=o*(0.515533244848)*x_ref[1]**(o-1)+(0.39357313927)
-        ref[1,0,1,0]=o*(4.954730054e-05)*x_ref[0]**(o-1)+(0.902841279458)
-        ref[1,0,1,1]=o*(0.0974175050415)*x_ref[1]**(o-1)+(-0.283224733511)
-        ref[1,1,0,0]=o*(-0.3695113121)*x_ref[0]**(o-1)+(-0.425976895152)
-        ref[1,1,0,1]=o*(-0.752863101988)*x_ref[1]**(o-1)+(-0.135026977845)
-        ref[1,1,1,0]=o*(-0.627750038208)*x_ref[0]**(o-1)+(-0.682825202306)
-        ref[1,1,1,1]=o*(0.598327522753)*x_ref[1]**(o-1)+(0.0402698525348)
-        ref[2,0,0,0]=o*(0.95982907811)*x_ref[0]**(o-1)+(-0.786158711751)
-        ref[2,0,0,1]=o*(0.6974717418)*x_ref[1]**(o-1)+(-0.548248895713)
-        ref[2,0,1,0]=o*(-0.21063630362)*x_ref[0]**(o-1)+(-0.979628903483)
-        ref[2,0,1,1]=o*(0.514851452559)*x_ref[1]**(o-1)+(-0.294218784425)
-        ref[2,1,0,0]=o*(-0.446140926476)*x_ref[0]**(o-1)+(0.658918134389)
-        ref[2,1,0,1]=o*(-0.166087456007)*x_ref[1]**(o-1)+(0.328044805625)
-        ref[2,1,1,0]=o*(0.937161634589)*x_ref[0]**(o-1)+(0.594322457074)
-        ref[2,1,1,1]=o*(0.992336676032)*x_ref[1]**(o-1)+(-0.499637100315)
-        ref[3,0,0,0]=o*(0.767677974163)*x_ref[0]**(o-1)+(-0.820615663298)
-        ref[3,0,0,1]=o*(0.558185245925)*x_ref[1]**(o-1)+(-0.763525476816)
-        ref[3,0,1,0]=o*(-0.866581629552)*x_ref[0]**(o-1)+(0.589993777037)
-        ref[3,0,1,1]=o*(-0.0704817160146)*x_ref[1]**(o-1)+(-0.897469280048)
-        ref[3,1,0,0]=o*(-0.290118027748)*x_ref[0]**(o-1)+(0.211790364383)
-        ref[3,1,0,1]=o*(-0.0688758465892)*x_ref[1]**(o-1)+(0.777490292219)
-        ref[3,1,1,0]=o*(-0.969418722549)*x_ref[0]**(o-1)+(-0.46884683812)
-        ref[3,1,1,1]=o*(0.826696594862)*x_ref[1]**(o-1)+(-0.926802811507)
-        ref[4,0,0,0]=o*(-0.230285931083)*x_ref[0]**(o-1)+(0.905695021426)
-        ref[4,0,0,1]=o*(-0.581906633624)*x_ref[1]**(o-1)+(-0.69277147014)
-        ref[4,0,1,0]=o*(-0.251350536276)*x_ref[0]**(o-1)+(0.352877501605)
-        ref[4,0,1,1]=o*(0.290432460788)*x_ref[1]**(o-1)+(0.614218150117)
-        ref[4,1,0,0]=o*(-0.475014635407)*x_ref[0]**(o-1)+(0.86786497963)
-        ref[4,1,0,1]=o*(-0.763349511499)*x_ref[1]**(o-1)+(0.817847286727)
-        ref[4,1,1,0]=o*(0.0079711463132)*x_ref[0]**(o-1)+(-0.20685339926)
-        ref[4,1,1,1]=o*(0.377467915936)*x_ref[1]**(o-1)+(-0.209268733968)
-        ref[5,0,0,0]=o*(0.795790630791)*x_ref[0]**(o-1)+(0.0661201279192)
-        ref[5,0,0,1]=o*(0.932665258262)*x_ref[1]**(o-1)+(-0.4785884914)
-        ref[5,0,1,0]=o*(0.929422646068)*x_ref[0]**(o-1)+(0.775378282324)
-        ref[5,0,1,1]=o*(0.297482039582)*x_ref[1]**(o-1)+(-0.700872789842)
-        ref[5,1,0,0]=o*(0.678688297204)*x_ref[0]**(o-1)+(0.365975847321)
-        ref[5,1,0,1]=o*(-0.565261107289)*x_ref[1]**(o-1)+(0.0317556604619)
-        ref[5,1,1,0]=o*(-0.0231297032408)*x_ref[0]**(o-1)+(-0.985865541949)
-        ref[5,1,1,1]=o*(0.733821736669)*x_ref[1]**(o-1)+(0.603255951212)
-      else:
-        arg[0,0,0]=(-0.211459759219)*x[0]**o+(-0.577684864446)*x[0]+(-0.391603126843)*x[1]**o+(0.260321825768)*x[1]+(-0.314038207978)*x[2]**o+(-0.981440041663)*x[2]
-        arg[0,0,1]=(-0.876053365684)*x[0]**o+(-0.194899445893)*x[0]+(0.346950377505)*x[1]**o+(0.571865696578)*x[1]+(0.632901527485)*x[2]**o+(0.832258490904)*x[2]
-        arg[0,1,0]=(-0.0779003885155)*x[0]**o+(0.583384314998)*x[0]+(-0.257262737021)*x[1]**o+(0.456730130081)*x[1]+(0.262812418811)*x[2]**o+(0.0815640391979)*x[2]
-        arg[0,1,1]=(0.087484387098)*x[0]**o+(-0.415375968565)*x[0]+(0.31138114792)*x[1]**o+(0.832138685168)*x[1]+(0.552625436456)*x[2]**o+(-0.0969172211154)*x[2]
-        arg[1,0,0]=(0.721326796741)*x[0]**o+(-0.556644260079)*x[0]+(0.14718294664)*x[1]**o+(0.688425309252)*x[1]+(-0.16480505764)*x[2]**o+(-0.914914176523)*x[2]
-        arg[1,0,1]=(0.0932763269908)*x[0]**o+(0.359036469617)*x[0]+(0.568509073358)*x[1]**o+(-0.42133310351)*x[1]+(0.576833556667)*x[2]**o+(0.44466763296)*x[2]
-        arg[1,1,0]=(0.564028751408)*x[0]**o+(-0.314840429631)*x[0]+(-0.910523044917)*x[1]**o+(-0.0377714078758)*x[1]+(0.0125836031881)*x[2]**o+(0.602273699833)*x[2]
-        arg[1,1,1]=(0.135282471986)*x[0]**o+(0.163613895979)*x[0]+(0.115685034139)*x[1]**o+(-0.687078382924)*x[1]+(0.406385459521)*x[2]**o+(-0.401846794432)*x[2]
-        arg[2,0,0]=(0.815695969791)*x[0]**o+(0.312205723135)*x[0]+(0.993404535838)*x[1]**o+(0.101946422158)*x[1]+(-0.331818829998)*x[2]**o+(-0.0034480605816)*x[2]
-        arg[2,0,1]=(0.638646208966)*x[0]**o+(0.265838992948)*x[0]+(0.156594972273)*x[1]**o+(0.935292984535)*x[1]+(-0.930522319399)*x[2]**o+(0.540679813135)*x[2]
-        arg[2,1,0]=(-0.778823826824)*x[0]**o+(0.435399707656)*x[0]+(0.123031900278)*x[1]**o+(-0.132556439303)*x[1]+(-0.29114590778)*x[2]**o+(-0.277636472779)*x[2]
-        arg[2,1,1]=(-0.200541347963)*x[0]**o+(-0.526841282198)*x[0]+(0.670718267305)*x[1]**o+(0.0777161510281)*x[1]+(0.847335718393)*x[2]**o+(0.167185849891)*x[2]
-        arg[3,0,0]=(0.481112023661)*x[0]**o+(-0.703558873662)*x[0]+(0.0661746324247)*x[1]**o+(0.0628113595423)*x[1]+(0.804110728888)*x[2]**o+(0.517297444342)*x[2]
-        arg[3,0,1]=(-0.44648091284)*x[0]**o+(-0.976332452987)*x[0]+(-0.886297355627)*x[1]**o+(-0.910033293533)*x[1]+(0.946007442337)*x[2]**o+(-0.586006699603)*x[2]
-        arg[3,1,0]=(0.686532047098)*x[0]**o+(0.647146535444)*x[0]+(-0.424413819624)*x[1]**o+(-0.266078497115)*x[1]+(-0.656118336723)*x[2]**o+(0.902145487914)*x[2]
-        arg[3,1,1]=(-0.0562438759603)*x[0]**o+(0.600872472135)*x[0]+(-0.162016187788)*x[1]**o+(-0.685387926)*x[1]+(-0.899318041513)*x[2]**o+(0.459743174318)*x[2]
-        arg[4,0,0]=(-0.923373905806)*x[0]**o+(-0.0340303642214)*x[0]+(-0.798971449517)*x[1]**o+(-0.45521271974)*x[1]+(-0.354501811953)*x[2]**o+(0.0668579007274)*x[2]
-        arg[4,0,1]=(0.411397784181)*x[0]**o+(0.112609440102)*x[0]+(0.352899973694)*x[1]**o+(-0.0728024007714)*x[1]+(0.50804391825)*x[2]**o+(0.748548958571)*x[2]
-        arg[4,1,0]=(0.875890044031)*x[0]**o+(0.674204747948)*x[0]+(-0.879286517401)*x[1]**o+(-0.00338161978492)*x[1]+(-0.372790489717)*x[2]**o+(0.480822881409)*x[2]
-        arg[4,1,1]=(-0.224827091498)*x[0]**o+(0.854170572245)*x[0]+(-0.670467931784)*x[1]**o+(0.85225464592)*x[1]+(0.41885719338)*x[2]**o+(-0.623296073831)*x[2]
-        arg[5,0,0]=(-0.662704253172)*x[0]**o+(0.690656552406)*x[0]+(-0.812436958497)*x[1]**o+(0.928013493065)*x[1]+(0.763792541097)*x[2]**o+(-0.430084528987)*x[2]
-        arg[5,0,1]=(0.451167682598)*x[0]**o+(0.373015986015)*x[0]+(0.73334610852)*x[1]**o+(0.44892130407)*x[1]+(0.820233215547)*x[2]**o+(0.863864357936)*x[2]
-        arg[5,1,0]=(-0.700840074185)*x[0]**o+(-0.637964737375)*x[0]+(0.0532062256138)*x[1]**o+(-0.902662868597)*x[1]+(-0.91668008633)*x[2]**o+(0.00253116545509)*x[2]
-        arg[5,1,1]=(0.0461834200484)*x[0]**o+(0.102406795193)*x[0]+(0.599142154957)*x[1]**o+(0.374585801545)*x[1]+(-0.444968156109)*x[2]**o+(-0.932860816729)*x[2]
-        ref[0,0,0,0]=o*(-0.211459759219)*x_ref[0]**(o-1)+(-0.577684864446)
-        ref[0,0,0,1]=o*(-0.391603126843)*x_ref[1]**(o-1)+(0.260321825768)
-        ref[0,0,0,2]=o*(-0.314038207978)*x_ref[2]**(o-1)+(-0.981440041663)
-        ref[0,0,1,0]=o*(-0.876053365684)*x_ref[0]**(o-1)+(-0.194899445893)
-        ref[0,0,1,1]=o*(0.346950377505)*x_ref[1]**(o-1)+(0.571865696578)
-        ref[0,0,1,2]=o*(0.632901527485)*x_ref[2]**(o-1)+(0.832258490904)
-        ref[0,1,0,0]=o*(-0.0779003885155)*x_ref[0]**(o-1)+(0.583384314998)
-        ref[0,1,0,1]=o*(-0.257262737021)*x_ref[1]**(o-1)+(0.456730130081)
-        ref[0,1,0,2]=o*(0.262812418811)*x_ref[2]**(o-1)+(0.0815640391979)
-        ref[0,1,1,0]=o*(0.087484387098)*x_ref[0]**(o-1)+(-0.415375968565)
-        ref[0,1,1,1]=o*(0.31138114792)*x_ref[1]**(o-1)+(0.832138685168)
-        ref[0,1,1,2]=o*(0.552625436456)*x_ref[2]**(o-1)+(-0.0969172211154)
-        ref[1,0,0,0]=o*(0.721326796741)*x_ref[0]**(o-1)+(-0.556644260079)
-        ref[1,0,0,1]=o*(0.14718294664)*x_ref[1]**(o-1)+(0.688425309252)
-        ref[1,0,0,2]=o*(-0.16480505764)*x_ref[2]**(o-1)+(-0.914914176523)
-        ref[1,0,1,0]=o*(0.0932763269908)*x_ref[0]**(o-1)+(0.359036469617)
-        ref[1,0,1,1]=o*(0.568509073358)*x_ref[1]**(o-1)+(-0.42133310351)
-        ref[1,0,1,2]=o*(0.576833556667)*x_ref[2]**(o-1)+(0.44466763296)
-        ref[1,1,0,0]=o*(0.564028751408)*x_ref[0]**(o-1)+(-0.314840429631)
-        ref[1,1,0,1]=o*(-0.910523044917)*x_ref[1]**(o-1)+(-0.0377714078758)
-        ref[1,1,0,2]=o*(0.0125836031881)*x_ref[2]**(o-1)+(0.602273699833)
-        ref[1,1,1,0]=o*(0.135282471986)*x_ref[0]**(o-1)+(0.163613895979)
-        ref[1,1,1,1]=o*(0.115685034139)*x_ref[1]**(o-1)+(-0.687078382924)
-        ref[1,1,1,2]=o*(0.406385459521)*x_ref[2]**(o-1)+(-0.401846794432)
-        ref[2,0,0,0]=o*(0.815695969791)*x_ref[0]**(o-1)+(0.312205723135)
-        ref[2,0,0,1]=o*(0.993404535838)*x_ref[1]**(o-1)+(0.101946422158)
-        ref[2,0,0,2]=o*(-0.331818829998)*x_ref[2]**(o-1)+(-0.0034480605816)
-        ref[2,0,1,0]=o*(0.638646208966)*x_ref[0]**(o-1)+(0.265838992948)
-        ref[2,0,1,1]=o*(0.156594972273)*x_ref[1]**(o-1)+(0.935292984535)
-        ref[2,0,1,2]=o*(-0.930522319399)*x_ref[2]**(o-1)+(0.540679813135)
-        ref[2,1,0,0]=o*(-0.778823826824)*x_ref[0]**(o-1)+(0.435399707656)
-        ref[2,1,0,1]=o*(0.123031900278)*x_ref[1]**(o-1)+(-0.132556439303)
-        ref[2,1,0,2]=o*(-0.29114590778)*x_ref[2]**(o-1)+(-0.277636472779)
-        ref[2,1,1,0]=o*(-0.200541347963)*x_ref[0]**(o-1)+(-0.526841282198)
-        ref[2,1,1,1]=o*(0.670718267305)*x_ref[1]**(o-1)+(0.0777161510281)
-        ref[2,1,1,2]=o*(0.847335718393)*x_ref[2]**(o-1)+(0.167185849891)
-        ref[3,0,0,0]=o*(0.481112023661)*x_ref[0]**(o-1)+(-0.703558873662)
-        ref[3,0,0,1]=o*(0.0661746324247)*x_ref[1]**(o-1)+(0.0628113595423)
-        ref[3,0,0,2]=o*(0.804110728888)*x_ref[2]**(o-1)+(0.517297444342)
-        ref[3,0,1,0]=o*(-0.44648091284)*x_ref[0]**(o-1)+(-0.976332452987)
-        ref[3,0,1,1]=o*(-0.886297355627)*x_ref[1]**(o-1)+(-0.910033293533)
-        ref[3,0,1,2]=o*(0.946007442337)*x_ref[2]**(o-1)+(-0.586006699603)
-        ref[3,1,0,0]=o*(0.686532047098)*x_ref[0]**(o-1)+(0.647146535444)
-        ref[3,1,0,1]=o*(-0.424413819624)*x_ref[1]**(o-1)+(-0.266078497115)
-        ref[3,1,0,2]=o*(-0.656118336723)*x_ref[2]**(o-1)+(0.902145487914)
-        ref[3,1,1,0]=o*(-0.0562438759603)*x_ref[0]**(o-1)+(0.600872472135)
-        ref[3,1,1,1]=o*(-0.162016187788)*x_ref[1]**(o-1)+(-0.685387926)
-        ref[3,1,1,2]=o*(-0.899318041513)*x_ref[2]**(o-1)+(0.459743174318)
-        ref[4,0,0,0]=o*(-0.923373905806)*x_ref[0]**(o-1)+(-0.0340303642214)
-        ref[4,0,0,1]=o*(-0.798971449517)*x_ref[1]**(o-1)+(-0.45521271974)
-        ref[4,0,0,2]=o*(-0.354501811953)*x_ref[2]**(o-1)+(0.0668579007274)
-        ref[4,0,1,0]=o*(0.411397784181)*x_ref[0]**(o-1)+(0.112609440102)
-        ref[4,0,1,1]=o*(0.352899973694)*x_ref[1]**(o-1)+(-0.0728024007714)
-        ref[4,0,1,2]=o*(0.50804391825)*x_ref[2]**(o-1)+(0.748548958571)
-        ref[4,1,0,0]=o*(0.875890044031)*x_ref[0]**(o-1)+(0.674204747948)
-        ref[4,1,0,1]=o*(-0.879286517401)*x_ref[1]**(o-1)+(-0.00338161978492)
-        ref[4,1,0,2]=o*(-0.372790489717)*x_ref[2]**(o-1)+(0.480822881409)
-        ref[4,1,1,0]=o*(-0.224827091498)*x_ref[0]**(o-1)+(0.854170572245)
-        ref[4,1,1,1]=o*(-0.670467931784)*x_ref[1]**(o-1)+(0.85225464592)
-        ref[4,1,1,2]=o*(0.41885719338)*x_ref[2]**(o-1)+(-0.623296073831)
-        ref[5,0,0,0]=o*(-0.662704253172)*x_ref[0]**(o-1)+(0.690656552406)
-        ref[5,0,0,1]=o*(-0.812436958497)*x_ref[1]**(o-1)+(0.928013493065)
-        ref[5,0,0,2]=o*(0.763792541097)*x_ref[2]**(o-1)+(-0.430084528987)
-        ref[5,0,1,0]=o*(0.451167682598)*x_ref[0]**(o-1)+(0.373015986015)
-        ref[5,0,1,1]=o*(0.73334610852)*x_ref[1]**(o-1)+(0.44892130407)
-        ref[5,0,1,2]=o*(0.820233215547)*x_ref[2]**(o-1)+(0.863864357936)
-        ref[5,1,0,0]=o*(-0.700840074185)*x_ref[0]**(o-1)+(-0.637964737375)
-        ref[5,1,0,1]=o*(0.0532062256138)*x_ref[1]**(o-1)+(-0.902662868597)
-        ref[5,1,0,2]=o*(-0.91668008633)*x_ref[2]**(o-1)+(0.00253116545509)
-        ref[5,1,1,0]=o*(0.0461834200484)*x_ref[0]**(o-1)+(0.102406795193)
-        ref[5,1,1,1]=o*(0.599142154957)*x_ref[1]**(o-1)+(0.374585801545)
-        ref[5,1,1,2]=o*(-0.444968156109)*x_ref[2]**(o-1)+(-0.932860816729)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(1.37238770251)*x[0]+(-1.43917937019)*x[1]
-        ref[0]=(1.37238770251)
-        ref[1]=(-1.43917937019)
-      else:
-        arg=(0.951563810847)*x[0]+(-1.91408943437)*x[1]+(0.233861671105)*x[2]
-        ref[0]=(0.951563810847)
-        ref[1]=(-1.91408943437)
-        ref[2]=(0.233861671105)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.42921344972)*x[0]+(-0.911436505176)*x[1]
-        arg[1]=(1.25688300316)*x[0]+(0.0536640238292)*x[1]
-        ref[0,0]=(1.42921344972)
-        ref[0,1]=(-0.911436505176)
-        ref[1,0]=(1.25688300316)
-        ref[1,1]=(0.0536640238292)
-      else:
-        arg[0]=(-1.57773112011)*x[0]+(-0.697311790617)*x[1]+(-0.480770363787)*x[2]
-        arg[1]=(-0.136063655594)*x[0]+(0.882253548646)*x[1]+(1.35773570995)*x[2]
-        ref[0,0]=(-1.57773112011)
-        ref[0,1]=(-0.697311790617)
-        ref[0,2]=(-0.480770363787)
-        ref[1,0]=(-0.136063655594)
-        ref[1,1]=(0.882253548646)
-        ref[1,2]=(1.35773570995)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.448247291087)*x[0]+(-0.00880442943882)*x[1]
-        arg[0,1]=(-0.59784234455)*x[0]+(-0.94951606979)*x[1]
-        arg[0,2]=(1.38316656933)*x[0]+(-0.124817047005)*x[1]
-        arg[0,3]=(-0.0748469893414)*x[0]+(1.44145142047)*x[1]
-        arg[0,4]=(1.81133385456)*x[0]+(-0.518406894403)*x[1]
-        arg[1,0]=(-0.65460152624)*x[0]+(-0.350858526434)*x[1]
-        arg[1,1]=(0.924058009558)*x[0]+(-0.40973995895)*x[1]
-        arg[1,2]=(-0.299794705178)*x[0]+(-0.924557696915)*x[1]
-        arg[1,3]=(-0.608513627169)*x[0]+(-0.141936714389)*x[1]
-        arg[1,4]=(0.469099778997)*x[0]+(0.754132353456)*x[1]
-        arg[2,0]=(-0.627098551951)*x[0]+(0.476865448119)*x[1]
-        arg[2,1]=(-1.03564375134)*x[0]+(-0.280009187543)*x[1]
-        arg[2,2]=(0.475083576156)*x[0]+(0.220248066616)*x[1]
-        arg[2,3]=(0.0420499398173)*x[0]+(0.0808105284548)*x[1]
-        arg[2,4]=(0.368173655662)*x[0]+(-0.58266909961)*x[1]
-        arg[3,0]=(0.450851110298)*x[0]+(0.0844590226087)*x[1]
-        arg[3,1]=(0.508010554654)*x[0]+(0.797109833792)*x[1]
-        arg[3,2]=(0.711479388001)*x[0]+(1.12829906729)*x[1]
-        arg[3,3]=(0.0588799697153)*x[0]+(-0.991874826409)*x[1]
-        arg[3,4]=(0.743446045536)*x[0]+(0.65754450588)*x[1]
-        ref[0,0,0]=(0.448247291087)
-        ref[0,0,1]=(-0.00880442943882)
-        ref[0,1,0]=(-0.59784234455)
-        ref[0,1,1]=(-0.94951606979)
-        ref[0,2,0]=(1.38316656933)
-        ref[0,2,1]=(-0.124817047005)
-        ref[0,3,0]=(-0.0748469893414)
-        ref[0,3,1]=(1.44145142047)
-        ref[0,4,0]=(1.81133385456)
-        ref[0,4,1]=(-0.518406894403)
-        ref[1,0,0]=(-0.65460152624)
-        ref[1,0,1]=(-0.350858526434)
-        ref[1,1,0]=(0.924058009558)
-        ref[1,1,1]=(-0.40973995895)
-        ref[1,2,0]=(-0.299794705178)
-        ref[1,2,1]=(-0.924557696915)
-        ref[1,3,0]=(-0.608513627169)
-        ref[1,3,1]=(-0.141936714389)
-        ref[1,4,0]=(0.469099778997)
-        ref[1,4,1]=(0.754132353456)
-        ref[2,0,0]=(-0.627098551951)
-        ref[2,0,1]=(0.476865448119)
-        ref[2,1,0]=(-1.03564375134)
-        ref[2,1,1]=(-0.280009187543)
-        ref[2,2,0]=(0.475083576156)
-        ref[2,2,1]=(0.220248066616)
-        ref[2,3,0]=(0.0420499398173)
-        ref[2,3,1]=(0.0808105284548)
-        ref[2,4,0]=(0.368173655662)
-        ref[2,4,1]=(-0.58266909961)
-        ref[3,0,0]=(0.450851110298)
-        ref[3,0,1]=(0.0844590226087)
-        ref[3,1,0]=(0.508010554654)
-        ref[3,1,1]=(0.797109833792)
-        ref[3,2,0]=(0.711479388001)
-        ref[3,2,1]=(1.12829906729)
-        ref[3,3,0]=(0.0588799697153)
-        ref[3,3,1]=(-0.991874826409)
-        ref[3,4,0]=(0.743446045536)
-        ref[3,4,1]=(0.65754450588)
-      else:
-        arg[0,0]=(-0.43386387868)*x[0]+(0.321105491776)*x[1]+(0.384206679414)*x[2]
-        arg[0,1]=(0.604698878149)*x[0]+(0.594375439325)*x[1]+(0.162832272176)*x[2]
-        arg[0,2]=(-0.332194829416)*x[0]+(0.600821281937)*x[1]+(0.493622302813)*x[2]
-        arg[0,3]=(0.846367268698)*x[0]+(-1.32744832381)*x[1]+(0.00466654421944)*x[2]
-        arg[0,4]=(0.385111950936)*x[0]+(-0.176705693397)*x[1]+(0.461732370075)*x[2]
-        arg[1,0]=(-0.14529643778)*x[0]+(1.15329219838)*x[1]+(0.157842247326)*x[2]
-        arg[1,1]=(0.00817149012591)*x[0]+(-0.703898404732)*x[1]+(-1.14419500663)*x[2]
-        arg[1,2]=(-0.124155034423)*x[0]+(0.906000496919)*x[1]+(-0.466071596735)*x[2]
-        arg[1,3]=(0.413190740147)*x[0]+(0.968639404637)*x[1]+(-1.25413312698)*x[2]
-        arg[1,4]=(0.521974966379)*x[0]+(0.936384991187)*x[1]+(-0.0630547476157)*x[2]
-        arg[2,0]=(-0.334976510608)*x[0]+(-0.268364721371)*x[1]+(0.806974769679)*x[2]
-        arg[2,1]=(-0.0672705162033)*x[0]+(0.459808873839)*x[1]+(0.0725634327358)*x[2]
-        arg[2,2]=(0.142418012401)*x[0]+(-0.400301432498)*x[1]+(-1.37021128371)*x[2]
-        arg[2,3]=(-1.60617980561)*x[0]+(0.0686943218654)*x[1]+(0.647509287658)*x[2]
-        arg[2,4]=(0.0102366197695)*x[0]+(-1.24104511219)*x[1]+(-0.739463479584)*x[2]
-        arg[3,0]=(-0.425526939568)*x[0]+(-0.946421307227)*x[1]+(0.133101457377)*x[2]
-        arg[3,1]=(1.07183638389)*x[0]+(-1.21405997903)*x[1]+(-0.962984008606)*x[2]
-        arg[3,2]=(-0.913456686897)*x[0]+(0.907233128077)*x[1]+(0.581609247137)*x[2]
-        arg[3,3]=(-0.729544885457)*x[0]+(-0.433435638004)*x[1]+(0.357011166494)*x[2]
-        arg[3,4]=(1.21906931308)*x[0]+(0.322487716786)*x[1]+(1.05602783674)*x[2]
-        ref[0,0,0]=(-0.43386387868)
-        ref[0,0,1]=(0.321105491776)
-        ref[0,0,2]=(0.384206679414)
-        ref[0,1,0]=(0.604698878149)
-        ref[0,1,1]=(0.594375439325)
-        ref[0,1,2]=(0.162832272176)
-        ref[0,2,0]=(-0.332194829416)
-        ref[0,2,1]=(0.600821281937)
-        ref[0,2,2]=(0.493622302813)
-        ref[0,3,0]=(0.846367268698)
-        ref[0,3,1]=(-1.32744832381)
-        ref[0,3,2]=(0.00466654421944)
-        ref[0,4,0]=(0.385111950936)
-        ref[0,4,1]=(-0.176705693397)
-        ref[0,4,2]=(0.461732370075)
-        ref[1,0,0]=(-0.14529643778)
-        ref[1,0,1]=(1.15329219838)
-        ref[1,0,2]=(0.157842247326)
-        ref[1,1,0]=(0.00817149012591)
-        ref[1,1,1]=(-0.703898404732)
-        ref[1,1,2]=(-1.14419500663)
-        ref[1,2,0]=(-0.124155034423)
-        ref[1,2,1]=(0.906000496919)
-        ref[1,2,2]=(-0.466071596735)
-        ref[1,3,0]=(0.413190740147)
-        ref[1,3,1]=(0.968639404637)
-        ref[1,3,2]=(-1.25413312698)
-        ref[1,4,0]=(0.521974966379)
-        ref[1,4,1]=(0.936384991187)
-        ref[1,4,2]=(-0.0630547476157)
-        ref[2,0,0]=(-0.334976510608)
-        ref[2,0,1]=(-0.268364721371)
-        ref[2,0,2]=(0.806974769679)
-        ref[2,1,0]=(-0.0672705162033)
-        ref[2,1,1]=(0.459808873839)
-        ref[2,1,2]=(0.0725634327358)
-        ref[2,2,0]=(0.142418012401)
-        ref[2,2,1]=(-0.400301432498)
-        ref[2,2,2]=(-1.37021128371)
-        ref[2,3,0]=(-1.60617980561)
-        ref[2,3,1]=(0.0686943218654)
-        ref[2,3,2]=(0.647509287658)
-        ref[2,4,0]=(0.0102366197695)
-        ref[2,4,1]=(-1.24104511219)
-        ref[2,4,2]=(-0.739463479584)
-        ref[3,0,0]=(-0.425526939568)
-        ref[3,0,1]=(-0.946421307227)
-        ref[3,0,2]=(0.133101457377)
-        ref[3,1,0]=(1.07183638389)
-        ref[3,1,1]=(-1.21405997903)
-        ref[3,1,2]=(-0.962984008606)
-        ref[3,2,0]=(-0.913456686897)
-        ref[3,2,1]=(0.907233128077)
-        ref[3,2,2]=(0.581609247137)
-        ref[3,3,0]=(-0.729544885457)
-        ref[3,3,1]=(-0.433435638004)
-        ref[3,3,2]=(0.357011166494)
-        ref[3,4,0]=(1.21906931308)
-        ref[3,4,1]=(0.322487716786)
-        ref[3,4,2]=(1.05602783674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.287546203823)*x[0]+(0.390321729967)*x[1]
-        arg[0,0,1]=(-0.112653571553)*x[0]+(-0.359753186922)*x[1]
-        arg[0,1,0]=(0.00656985674969)*x[0]+(-0.397210304393)*x[1]
-        arg[0,1,1]=(-0.825698431533)*x[0]+(-1.20994477496)*x[1]
-        arg[1,0,0]=(0.0456789352898)*x[0]+(0.201178709355)*x[1]
-        arg[1,0,1]=(0.216619650199)*x[0]+(-0.684237394127)*x[1]
-        arg[1,1,0]=(-0.452605086273)*x[0]+(0.383220784575)*x[1]
-        arg[1,1,1]=(-0.385315869703)*x[0]+(-1.25937320051)*x[1]
-        arg[2,0,0]=(-0.546290546777)*x[0]+(0.0659124729108)*x[1]
-        arg[2,0,1]=(0.23413834434)*x[0]+(0.241510050424)*x[1]
-        arg[2,1,0]=(-0.541097368124)*x[0]+(0.458682016611)*x[1]
-        arg[2,1,1]=(0.314030173817)*x[0]+(0.083613884286)*x[1]
-        arg[3,0,0]=(0.862005271666)*x[0]+(0.858693755091)*x[1]
-        arg[3,0,1]=(-1.14220805291)*x[0]+(0.609875693913)*x[1]
-        arg[3,1,0]=(-0.847069360014)*x[0]+(0.240069314456)*x[1]
-        arg[3,1,1]=(0.480596211718)*x[0]+(-1.40901297384)*x[1]
-        arg[4,0,0]=(-1.38036653523)*x[0]+(-0.0732955000278)*x[1]
-        arg[4,0,1]=(0.0716061704803)*x[0]+(0.180127379412)*x[1]
-        arg[4,1,0]=(1.26959959862)*x[0]+(-1.38131896436)*x[1]
-        arg[4,1,1]=(0.204280361123)*x[0]+(0.532611514369)*x[1]
-        arg[5,0,0]=(0.209536293545)*x[0]+(-0.303994906788)*x[1]
-        arg[5,0,1]=(1.41150162289)*x[0]+(1.32515735407)*x[1]
-        arg[5,1,0]=(1.59736027384)*x[0]+(-0.711055564868)*x[1]
-        arg[5,1,1]=(-1.31799658024)*x[0]+(0.829209493108)*x[1]
-        ref[0,0,0,0]=(-0.287546203823)
-        ref[0,0,0,1]=(0.390321729967)
-        ref[0,0,1,0]=(-0.112653571553)
-        ref[0,0,1,1]=(-0.359753186922)
-        ref[0,1,0,0]=(0.00656985674969)
-        ref[0,1,0,1]=(-0.397210304393)
-        ref[0,1,1,0]=(-0.825698431533)
-        ref[0,1,1,1]=(-1.20994477496)
-        ref[1,0,0,0]=(0.0456789352898)
-        ref[1,0,0,1]=(0.201178709355)
-        ref[1,0,1,0]=(0.216619650199)
-        ref[1,0,1,1]=(-0.684237394127)
-        ref[1,1,0,0]=(-0.452605086273)
-        ref[1,1,0,1]=(0.383220784575)
-        ref[1,1,1,0]=(-0.385315869703)
-        ref[1,1,1,1]=(-1.25937320051)
-        ref[2,0,0,0]=(-0.546290546777)
-        ref[2,0,0,1]=(0.0659124729108)
-        ref[2,0,1,0]=(0.23413834434)
-        ref[2,0,1,1]=(0.241510050424)
-        ref[2,1,0,0]=(-0.541097368124)
-        ref[2,1,0,1]=(0.458682016611)
-        ref[2,1,1,0]=(0.314030173817)
-        ref[2,1,1,1]=(0.083613884286)
-        ref[3,0,0,0]=(0.862005271666)
-        ref[3,0,0,1]=(0.858693755091)
-        ref[3,0,1,0]=(-1.14220805291)
-        ref[3,0,1,1]=(0.609875693913)
-        ref[3,1,0,0]=(-0.847069360014)
-        ref[3,1,0,1]=(0.240069314456)
-        ref[3,1,1,0]=(0.480596211718)
-        ref[3,1,1,1]=(-1.40901297384)
-        ref[4,0,0,0]=(-1.38036653523)
-        ref[4,0,0,1]=(-0.0732955000278)
-        ref[4,0,1,0]=(0.0716061704803)
-        ref[4,0,1,1]=(0.180127379412)
-        ref[4,1,0,0]=(1.26959959862)
-        ref[4,1,0,1]=(-1.38131896436)
-        ref[4,1,1,0]=(0.204280361123)
-        ref[4,1,1,1]=(0.532611514369)
-        ref[5,0,0,0]=(0.209536293545)
-        ref[5,0,0,1]=(-0.303994906788)
-        ref[5,0,1,0]=(1.41150162289)
-        ref[5,0,1,1]=(1.32515735407)
-        ref[5,1,0,0]=(1.59736027384)
-        ref[5,1,0,1]=(-0.711055564868)
-        ref[5,1,1,0]=(-1.31799658024)
-        ref[5,1,1,1]=(0.829209493108)
-      else:
-        arg[0,0,0]=(0.832267408258)*x[0]+(-1.1995239623)*x[1]+(-1.81276973398)*x[2]
-        arg[0,0,1]=(-0.0125232856194)*x[0]+(0.122543918666)*x[1]+(-1.12411286836)*x[2]
-        arg[0,1,0]=(0.985611388383)*x[0]+(-1.17217207383)*x[1]+(-0.231241872108)*x[2]
-        arg[0,1,1]=(0.625494139449)*x[0]+(0.784802683192)*x[1]+(0.612764525973)*x[2]
-        arg[1,0,0]=(0.327644975022)*x[0]+(0.0552951801276)*x[1]+(-0.806887445103)*x[2]
-        arg[1,0,1]=(0.194338798022)*x[0]+(0.799902026341)*x[1]+(1.70164249741)*x[2]
-        arg[1,1,0]=(0.890832636865)*x[0]+(0.223899365292)*x[1]+(-0.283094526824)*x[2]
-        arg[1,1,1]=(-0.122108330088)*x[0]+(-0.293413695547)*x[1]+(-0.371581852879)*x[2]
-        arg[2,0,0]=(-0.469341678297)*x[0]+(0.152856292978)*x[1]+(0.765861314481)*x[2]
-        arg[2,0,1]=(0.249219162734)*x[0]+(0.319622173697)*x[1]+(-0.182998471546)*x[2]
-        arg[2,1,0]=(0.39687496584)*x[0]+(0.137084411978)*x[1]+(-0.34707250854)*x[2]
-        arg[2,1,1]=(-0.382391798519)*x[0]+(0.755317411547)*x[1]+(0.424204162929)*x[2]
-        arg[3,0,0]=(1.12637976255)*x[0]+(0.11632178776)*x[1]+(-0.615547388072)*x[2]
-        arg[3,0,1]=(-0.819303259446)*x[0]+(0.916951216368)*x[1]+(-0.572792050441)*x[2]
-        arg[3,1,0]=(0.194642055711)*x[0]+(0.949663114037)*x[1]+(-0.403001914682)*x[2]
-        arg[3,1,1]=(0.902547242635)*x[0]+(-1.04027936291)*x[1]+(-1.78463515221)*x[2]
-        arg[4,0,0]=(0.59060036737)*x[0]+(-0.580905638676)*x[1]+(-0.486098556884)*x[2]
-        arg[4,0,1]=(-0.330634605524)*x[0]+(-0.758140973629)*x[1]+(-0.192282397672)*x[2]
-        arg[4,1,0]=(1.40502801336)*x[0]+(0.199036161455)*x[1]+(-0.558660947885)*x[2]
-        arg[4,1,1]=(-0.155588274273)*x[0]+(-0.57050736529)*x[1]+(1.1998664442)*x[2]
-        arg[5,0,0]=(-0.754680865929)*x[0]+(1.29040984028)*x[1]+(-1.83778974463)*x[2]
-        arg[5,0,1]=(0.274692501647)*x[0]+(0.368546080921)*x[1]+(-0.446376269232)*x[2]
-        arg[5,1,0]=(-0.758704372861)*x[0]+(1.75555227426)*x[1]+(-0.13664688871)*x[2]
-        arg[5,1,1]=(-0.568468068187)*x[0]+(-0.320218561544)*x[1]+(-0.827795466031)*x[2]
-        ref[0,0,0,0]=(0.832267408258)
-        ref[0,0,0,1]=(-1.1995239623)
-        ref[0,0,0,2]=(-1.81276973398)
-        ref[0,0,1,0]=(-0.0125232856194)
-        ref[0,0,1,1]=(0.122543918666)
-        ref[0,0,1,2]=(-1.12411286836)
-        ref[0,1,0,0]=(0.985611388383)
-        ref[0,1,0,1]=(-1.17217207383)
-        ref[0,1,0,2]=(-0.231241872108)
-        ref[0,1,1,0]=(0.625494139449)
-        ref[0,1,1,1]=(0.784802683192)
-        ref[0,1,1,2]=(0.612764525973)
-        ref[1,0,0,0]=(0.327644975022)
-        ref[1,0,0,1]=(0.0552951801276)
-        ref[1,0,0,2]=(-0.806887445103)
-        ref[1,0,1,0]=(0.194338798022)
-        ref[1,0,1,1]=(0.799902026341)
-        ref[1,0,1,2]=(1.70164249741)
-        ref[1,1,0,0]=(0.890832636865)
-        ref[1,1,0,1]=(0.223899365292)
-        ref[1,1,0,2]=(-0.283094526824)
-        ref[1,1,1,0]=(-0.122108330088)
-        ref[1,1,1,1]=(-0.293413695547)
-        ref[1,1,1,2]=(-0.371581852879)
-        ref[2,0,0,0]=(-0.469341678297)
-        ref[2,0,0,1]=(0.152856292978)
-        ref[2,0,0,2]=(0.765861314481)
-        ref[2,0,1,0]=(0.249219162734)
-        ref[2,0,1,1]=(0.319622173697)
-        ref[2,0,1,2]=(-0.182998471546)
-        ref[2,1,0,0]=(0.39687496584)
-        ref[2,1,0,1]=(0.137084411978)
-        ref[2,1,0,2]=(-0.34707250854)
-        ref[2,1,1,0]=(-0.382391798519)
-        ref[2,1,1,1]=(0.755317411547)
-        ref[2,1,1,2]=(0.424204162929)
-        ref[3,0,0,0]=(1.12637976255)
-        ref[3,0,0,1]=(0.11632178776)
-        ref[3,0,0,2]=(-0.615547388072)
-        ref[3,0,1,0]=(-0.819303259446)
-        ref[3,0,1,1]=(0.916951216368)
-        ref[3,0,1,2]=(-0.572792050441)
-        ref[3,1,0,0]=(0.194642055711)
-        ref[3,1,0,1]=(0.949663114037)
-        ref[3,1,0,2]=(-0.403001914682)
-        ref[3,1,1,0]=(0.902547242635)
-        ref[3,1,1,1]=(-1.04027936291)
-        ref[3,1,1,2]=(-1.78463515221)
-        ref[4,0,0,0]=(0.59060036737)
-        ref[4,0,0,1]=(-0.580905638676)
-        ref[4,0,0,2]=(-0.486098556884)
-        ref[4,0,1,0]=(-0.330634605524)
-        ref[4,0,1,1]=(-0.758140973629)
-        ref[4,0,1,2]=(-0.192282397672)
-        ref[4,1,0,0]=(1.40502801336)
-        ref[4,1,0,1]=(0.199036161455)
-        ref[4,1,0,2]=(-0.558660947885)
-        ref[4,1,1,0]=(-0.155588274273)
-        ref[4,1,1,1]=(-0.57050736529)
-        ref[4,1,1,2]=(1.1998664442)
-        ref[5,0,0,0]=(-0.754680865929)
-        ref[5,0,0,1]=(1.29040984028)
-        ref[5,0,0,2]=(-1.83778974463)
-        ref[5,0,1,0]=(0.274692501647)
-        ref[5,0,1,1]=(0.368546080921)
-        ref[5,0,1,2]=(-0.446376269232)
-        ref[5,1,0,0]=(-0.758704372861)
-        ref[5,1,0,1]=(1.75555227426)
-        ref[5,1,0,2]=(-0.13664688871)
-        ref[5,1,1,0]=(-0.568468068187)
-        ref[5,1,1,1]=(-0.320218561544)
-        ref[5,1,1,2]=(-0.827795466031)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(1.37238770251)*x[0]+(-1.43917937019)*x[1]
-        ref[0]=(1.37238770251)
-        ref[1]=(-1.43917937019)
-      else:
-        arg=(0.951563810847)*x[0]+(-1.91408943437)*x[1]+(0.233861671105)*x[2]
-        ref[0]=(0.951563810847)
-        ref[1]=(-1.91408943437)
-        ref[2]=(0.233861671105)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.42921344972)*x[0]+(-0.911436505176)*x[1]
-        arg[1]=(1.25688300316)*x[0]+(0.0536640238292)*x[1]
-        ref[0,0]=(1.42921344972)
-        ref[0,1]=(-0.911436505176)
-        ref[1,0]=(1.25688300316)
-        ref[1,1]=(0.0536640238292)
-      else:
-        arg[0]=(-1.57773112011)*x[0]+(-0.697311790617)*x[1]+(-0.480770363787)*x[2]
-        arg[1]=(-0.136063655594)*x[0]+(0.882253548646)*x[1]+(1.35773570995)*x[2]
-        ref[0,0]=(-1.57773112011)
-        ref[0,1]=(-0.697311790617)
-        ref[0,2]=(-0.480770363787)
-        ref[1,0]=(-0.136063655594)
-        ref[1,1]=(0.882253548646)
-        ref[1,2]=(1.35773570995)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.448247291087)*x[0]+(-0.00880442943882)*x[1]
-        arg[0,1]=(-0.59784234455)*x[0]+(-0.94951606979)*x[1]
-        arg[0,2]=(1.38316656933)*x[0]+(-0.124817047005)*x[1]
-        arg[0,3]=(-0.0748469893414)*x[0]+(1.44145142047)*x[1]
-        arg[0,4]=(1.81133385456)*x[0]+(-0.518406894403)*x[1]
-        arg[1,0]=(-0.65460152624)*x[0]+(-0.350858526434)*x[1]
-        arg[1,1]=(0.924058009558)*x[0]+(-0.40973995895)*x[1]
-        arg[1,2]=(-0.299794705178)*x[0]+(-0.924557696915)*x[1]
-        arg[1,3]=(-0.608513627169)*x[0]+(-0.141936714389)*x[1]
-        arg[1,4]=(0.469099778997)*x[0]+(0.754132353456)*x[1]
-        arg[2,0]=(-0.627098551951)*x[0]+(0.476865448119)*x[1]
-        arg[2,1]=(-1.03564375134)*x[0]+(-0.280009187543)*x[1]
-        arg[2,2]=(0.475083576156)*x[0]+(0.220248066616)*x[1]
-        arg[2,3]=(0.0420499398173)*x[0]+(0.0808105284548)*x[1]
-        arg[2,4]=(0.368173655662)*x[0]+(-0.58266909961)*x[1]
-        arg[3,0]=(0.450851110298)*x[0]+(0.0844590226087)*x[1]
-        arg[3,1]=(0.508010554654)*x[0]+(0.797109833792)*x[1]
-        arg[3,2]=(0.711479388001)*x[0]+(1.12829906729)*x[1]
-        arg[3,3]=(0.0588799697153)*x[0]+(-0.991874826409)*x[1]
-        arg[3,4]=(0.743446045536)*x[0]+(0.65754450588)*x[1]
-        ref[0,0,0]=(0.448247291087)
-        ref[0,0,1]=(-0.00880442943882)
-        ref[0,1,0]=(-0.59784234455)
-        ref[0,1,1]=(-0.94951606979)
-        ref[0,2,0]=(1.38316656933)
-        ref[0,2,1]=(-0.124817047005)
-        ref[0,3,0]=(-0.0748469893414)
-        ref[0,3,1]=(1.44145142047)
-        ref[0,4,0]=(1.81133385456)
-        ref[0,4,1]=(-0.518406894403)
-        ref[1,0,0]=(-0.65460152624)
-        ref[1,0,1]=(-0.350858526434)
-        ref[1,1,0]=(0.924058009558)
-        ref[1,1,1]=(-0.40973995895)
-        ref[1,2,0]=(-0.299794705178)
-        ref[1,2,1]=(-0.924557696915)
-        ref[1,3,0]=(-0.608513627169)
-        ref[1,3,1]=(-0.141936714389)
-        ref[1,4,0]=(0.469099778997)
-        ref[1,4,1]=(0.754132353456)
-        ref[2,0,0]=(-0.627098551951)
-        ref[2,0,1]=(0.476865448119)
-        ref[2,1,0]=(-1.03564375134)
-        ref[2,1,1]=(-0.280009187543)
-        ref[2,2,0]=(0.475083576156)
-        ref[2,2,1]=(0.220248066616)
-        ref[2,3,0]=(0.0420499398173)
-        ref[2,3,1]=(0.0808105284548)
-        ref[2,4,0]=(0.368173655662)
-        ref[2,4,1]=(-0.58266909961)
-        ref[3,0,0]=(0.450851110298)
-        ref[3,0,1]=(0.0844590226087)
-        ref[3,1,0]=(0.508010554654)
-        ref[3,1,1]=(0.797109833792)
-        ref[3,2,0]=(0.711479388001)
-        ref[3,2,1]=(1.12829906729)
-        ref[3,3,0]=(0.0588799697153)
-        ref[3,3,1]=(-0.991874826409)
-        ref[3,4,0]=(0.743446045536)
-        ref[3,4,1]=(0.65754450588)
-      else:
-        arg[0,0]=(-0.43386387868)*x[0]+(0.321105491776)*x[1]+(0.384206679414)*x[2]
-        arg[0,1]=(0.604698878149)*x[0]+(0.594375439325)*x[1]+(0.162832272176)*x[2]
-        arg[0,2]=(-0.332194829416)*x[0]+(0.600821281937)*x[1]+(0.493622302813)*x[2]
-        arg[0,3]=(0.846367268698)*x[0]+(-1.32744832381)*x[1]+(0.00466654421944)*x[2]
-        arg[0,4]=(0.385111950936)*x[0]+(-0.176705693397)*x[1]+(0.461732370075)*x[2]
-        arg[1,0]=(-0.14529643778)*x[0]+(1.15329219838)*x[1]+(0.157842247326)*x[2]
-        arg[1,1]=(0.00817149012591)*x[0]+(-0.703898404732)*x[1]+(-1.14419500663)*x[2]
-        arg[1,2]=(-0.124155034423)*x[0]+(0.906000496919)*x[1]+(-0.466071596735)*x[2]
-        arg[1,3]=(0.413190740147)*x[0]+(0.968639404637)*x[1]+(-1.25413312698)*x[2]
-        arg[1,4]=(0.521974966379)*x[0]+(0.936384991187)*x[1]+(-0.0630547476157)*x[2]
-        arg[2,0]=(-0.334976510608)*x[0]+(-0.268364721371)*x[1]+(0.806974769679)*x[2]
-        arg[2,1]=(-0.0672705162033)*x[0]+(0.459808873839)*x[1]+(0.0725634327358)*x[2]
-        arg[2,2]=(0.142418012401)*x[0]+(-0.400301432498)*x[1]+(-1.37021128371)*x[2]
-        arg[2,3]=(-1.60617980561)*x[0]+(0.0686943218654)*x[1]+(0.647509287658)*x[2]
-        arg[2,4]=(0.0102366197695)*x[0]+(-1.24104511219)*x[1]+(-0.739463479584)*x[2]
-        arg[3,0]=(-0.425526939568)*x[0]+(-0.946421307227)*x[1]+(0.133101457377)*x[2]
-        arg[3,1]=(1.07183638389)*x[0]+(-1.21405997903)*x[1]+(-0.962984008606)*x[2]
-        arg[3,2]=(-0.913456686897)*x[0]+(0.907233128077)*x[1]+(0.581609247137)*x[2]
-        arg[3,3]=(-0.729544885457)*x[0]+(-0.433435638004)*x[1]+(0.357011166494)*x[2]
-        arg[3,4]=(1.21906931308)*x[0]+(0.322487716786)*x[1]+(1.05602783674)*x[2]
-        ref[0,0,0]=(-0.43386387868)
-        ref[0,0,1]=(0.321105491776)
-        ref[0,0,2]=(0.384206679414)
-        ref[0,1,0]=(0.604698878149)
-        ref[0,1,1]=(0.594375439325)
-        ref[0,1,2]=(0.162832272176)
-        ref[0,2,0]=(-0.332194829416)
-        ref[0,2,1]=(0.600821281937)
-        ref[0,2,2]=(0.493622302813)
-        ref[0,3,0]=(0.846367268698)
-        ref[0,3,1]=(-1.32744832381)
-        ref[0,3,2]=(0.00466654421944)
-        ref[0,4,0]=(0.385111950936)
-        ref[0,4,1]=(-0.176705693397)
-        ref[0,4,2]=(0.461732370075)
-        ref[1,0,0]=(-0.14529643778)
-        ref[1,0,1]=(1.15329219838)
-        ref[1,0,2]=(0.157842247326)
-        ref[1,1,0]=(0.00817149012591)
-        ref[1,1,1]=(-0.703898404732)
-        ref[1,1,2]=(-1.14419500663)
-        ref[1,2,0]=(-0.124155034423)
-        ref[1,2,1]=(0.906000496919)
-        ref[1,2,2]=(-0.466071596735)
-        ref[1,3,0]=(0.413190740147)
-        ref[1,3,1]=(0.968639404637)
-        ref[1,3,2]=(-1.25413312698)
-        ref[1,4,0]=(0.521974966379)
-        ref[1,4,1]=(0.936384991187)
-        ref[1,4,2]=(-0.0630547476157)
-        ref[2,0,0]=(-0.334976510608)
-        ref[2,0,1]=(-0.268364721371)
-        ref[2,0,2]=(0.806974769679)
-        ref[2,1,0]=(-0.0672705162033)
-        ref[2,1,1]=(0.459808873839)
-        ref[2,1,2]=(0.0725634327358)
-        ref[2,2,0]=(0.142418012401)
-        ref[2,2,1]=(-0.400301432498)
-        ref[2,2,2]=(-1.37021128371)
-        ref[2,3,0]=(-1.60617980561)
-        ref[2,3,1]=(0.0686943218654)
-        ref[2,3,2]=(0.647509287658)
-        ref[2,4,0]=(0.0102366197695)
-        ref[2,4,1]=(-1.24104511219)
-        ref[2,4,2]=(-0.739463479584)
-        ref[3,0,0]=(-0.425526939568)
-        ref[3,0,1]=(-0.946421307227)
-        ref[3,0,2]=(0.133101457377)
-        ref[3,1,0]=(1.07183638389)
-        ref[3,1,1]=(-1.21405997903)
-        ref[3,1,2]=(-0.962984008606)
-        ref[3,2,0]=(-0.913456686897)
-        ref[3,2,1]=(0.907233128077)
-        ref[3,2,2]=(0.581609247137)
-        ref[3,3,0]=(-0.729544885457)
-        ref[3,3,1]=(-0.433435638004)
-        ref[3,3,2]=(0.357011166494)
-        ref[3,4,0]=(1.21906931308)
-        ref[3,4,1]=(0.322487716786)
-        ref[3,4,2]=(1.05602783674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.287546203823)*x[0]+(0.390321729967)*x[1]
-        arg[0,0,1]=(-0.112653571553)*x[0]+(-0.359753186922)*x[1]
-        arg[0,1,0]=(0.00656985674969)*x[0]+(-0.397210304393)*x[1]
-        arg[0,1,1]=(-0.825698431533)*x[0]+(-1.20994477496)*x[1]
-        arg[1,0,0]=(0.0456789352898)*x[0]+(0.201178709355)*x[1]
-        arg[1,0,1]=(0.216619650199)*x[0]+(-0.684237394127)*x[1]
-        arg[1,1,0]=(-0.452605086273)*x[0]+(0.383220784575)*x[1]
-        arg[1,1,1]=(-0.385315869703)*x[0]+(-1.25937320051)*x[1]
-        arg[2,0,0]=(-0.546290546777)*x[0]+(0.0659124729108)*x[1]
-        arg[2,0,1]=(0.23413834434)*x[0]+(0.241510050424)*x[1]
-        arg[2,1,0]=(-0.541097368124)*x[0]+(0.458682016611)*x[1]
-        arg[2,1,1]=(0.314030173817)*x[0]+(0.083613884286)*x[1]
-        arg[3,0,0]=(0.862005271666)*x[0]+(0.858693755091)*x[1]
-        arg[3,0,1]=(-1.14220805291)*x[0]+(0.609875693913)*x[1]
-        arg[3,1,0]=(-0.847069360014)*x[0]+(0.240069314456)*x[1]
-        arg[3,1,1]=(0.480596211718)*x[0]+(-1.40901297384)*x[1]
-        arg[4,0,0]=(-1.38036653523)*x[0]+(-0.0732955000278)*x[1]
-        arg[4,0,1]=(0.0716061704803)*x[0]+(0.180127379412)*x[1]
-        arg[4,1,0]=(1.26959959862)*x[0]+(-1.38131896436)*x[1]
-        arg[4,1,1]=(0.204280361123)*x[0]+(0.532611514369)*x[1]
-        arg[5,0,0]=(0.209536293545)*x[0]+(-0.303994906788)*x[1]
-        arg[5,0,1]=(1.41150162289)*x[0]+(1.32515735407)*x[1]
-        arg[5,1,0]=(1.59736027384)*x[0]+(-0.711055564868)*x[1]
-        arg[5,1,1]=(-1.31799658024)*x[0]+(0.829209493108)*x[1]
-        ref[0,0,0,0]=(-0.287546203823)
-        ref[0,0,0,1]=(0.390321729967)
-        ref[0,0,1,0]=(-0.112653571553)
-        ref[0,0,1,1]=(-0.359753186922)
-        ref[0,1,0,0]=(0.00656985674969)
-        ref[0,1,0,1]=(-0.397210304393)
-        ref[0,1,1,0]=(-0.825698431533)
-        ref[0,1,1,1]=(-1.20994477496)
-        ref[1,0,0,0]=(0.0456789352898)
-        ref[1,0,0,1]=(0.201178709355)
-        ref[1,0,1,0]=(0.216619650199)
-        ref[1,0,1,1]=(-0.684237394127)
-        ref[1,1,0,0]=(-0.452605086273)
-        ref[1,1,0,1]=(0.383220784575)
-        ref[1,1,1,0]=(-0.385315869703)
-        ref[1,1,1,1]=(-1.25937320051)
-        ref[2,0,0,0]=(-0.546290546777)
-        ref[2,0,0,1]=(0.0659124729108)
-        ref[2,0,1,0]=(0.23413834434)
-        ref[2,0,1,1]=(0.241510050424)
-        ref[2,1,0,0]=(-0.541097368124)
-        ref[2,1,0,1]=(0.458682016611)
-        ref[2,1,1,0]=(0.314030173817)
-        ref[2,1,1,1]=(0.083613884286)
-        ref[3,0,0,0]=(0.862005271666)
-        ref[3,0,0,1]=(0.858693755091)
-        ref[3,0,1,0]=(-1.14220805291)
-        ref[3,0,1,1]=(0.609875693913)
-        ref[3,1,0,0]=(-0.847069360014)
-        ref[3,1,0,1]=(0.240069314456)
-        ref[3,1,1,0]=(0.480596211718)
-        ref[3,1,1,1]=(-1.40901297384)
-        ref[4,0,0,0]=(-1.38036653523)
-        ref[4,0,0,1]=(-0.0732955000278)
-        ref[4,0,1,0]=(0.0716061704803)
-        ref[4,0,1,1]=(0.180127379412)
-        ref[4,1,0,0]=(1.26959959862)
-        ref[4,1,0,1]=(-1.38131896436)
-        ref[4,1,1,0]=(0.204280361123)
-        ref[4,1,1,1]=(0.532611514369)
-        ref[5,0,0,0]=(0.209536293545)
-        ref[5,0,0,1]=(-0.303994906788)
-        ref[5,0,1,0]=(1.41150162289)
-        ref[5,0,1,1]=(1.32515735407)
-        ref[5,1,0,0]=(1.59736027384)
-        ref[5,1,0,1]=(-0.711055564868)
-        ref[5,1,1,0]=(-1.31799658024)
-        ref[5,1,1,1]=(0.829209493108)
-      else:
-        arg[0,0,0]=(0.832267408258)*x[0]+(-1.1995239623)*x[1]+(-1.81276973398)*x[2]
-        arg[0,0,1]=(-0.0125232856194)*x[0]+(0.122543918666)*x[1]+(-1.12411286836)*x[2]
-        arg[0,1,0]=(0.985611388383)*x[0]+(-1.17217207383)*x[1]+(-0.231241872108)*x[2]
-        arg[0,1,1]=(0.625494139449)*x[0]+(0.784802683192)*x[1]+(0.612764525973)*x[2]
-        arg[1,0,0]=(0.327644975022)*x[0]+(0.0552951801276)*x[1]+(-0.806887445103)*x[2]
-        arg[1,0,1]=(0.194338798022)*x[0]+(0.799902026341)*x[1]+(1.70164249741)*x[2]
-        arg[1,1,0]=(0.890832636865)*x[0]+(0.223899365292)*x[1]+(-0.283094526824)*x[2]
-        arg[1,1,1]=(-0.122108330088)*x[0]+(-0.293413695547)*x[1]+(-0.371581852879)*x[2]
-        arg[2,0,0]=(-0.469341678297)*x[0]+(0.152856292978)*x[1]+(0.765861314481)*x[2]
-        arg[2,0,1]=(0.249219162734)*x[0]+(0.319622173697)*x[1]+(-0.182998471546)*x[2]
-        arg[2,1,0]=(0.39687496584)*x[0]+(0.137084411978)*x[1]+(-0.34707250854)*x[2]
-        arg[2,1,1]=(-0.382391798519)*x[0]+(0.755317411547)*x[1]+(0.424204162929)*x[2]
-        arg[3,0,0]=(1.12637976255)*x[0]+(0.11632178776)*x[1]+(-0.615547388072)*x[2]
-        arg[3,0,1]=(-0.819303259446)*x[0]+(0.916951216368)*x[1]+(-0.572792050441)*x[2]
-        arg[3,1,0]=(0.194642055711)*x[0]+(0.949663114037)*x[1]+(-0.403001914682)*x[2]
-        arg[3,1,1]=(0.902547242635)*x[0]+(-1.04027936291)*x[1]+(-1.78463515221)*x[2]
-        arg[4,0,0]=(0.59060036737)*x[0]+(-0.580905638676)*x[1]+(-0.486098556884)*x[2]
-        arg[4,0,1]=(-0.330634605524)*x[0]+(-0.758140973629)*x[1]+(-0.192282397672)*x[2]
-        arg[4,1,0]=(1.40502801336)*x[0]+(0.199036161455)*x[1]+(-0.558660947885)*x[2]
-        arg[4,1,1]=(-0.155588274273)*x[0]+(-0.57050736529)*x[1]+(1.1998664442)*x[2]
-        arg[5,0,0]=(-0.754680865929)*x[0]+(1.29040984028)*x[1]+(-1.83778974463)*x[2]
-        arg[5,0,1]=(0.274692501647)*x[0]+(0.368546080921)*x[1]+(-0.446376269232)*x[2]
-        arg[5,1,0]=(-0.758704372861)*x[0]+(1.75555227426)*x[1]+(-0.13664688871)*x[2]
-        arg[5,1,1]=(-0.568468068187)*x[0]+(-0.320218561544)*x[1]+(-0.827795466031)*x[2]
-        ref[0,0,0,0]=(0.832267408258)
-        ref[0,0,0,1]=(-1.1995239623)
-        ref[0,0,0,2]=(-1.81276973398)
-        ref[0,0,1,0]=(-0.0125232856194)
-        ref[0,0,1,1]=(0.122543918666)
-        ref[0,0,1,2]=(-1.12411286836)
-        ref[0,1,0,0]=(0.985611388383)
-        ref[0,1,0,1]=(-1.17217207383)
-        ref[0,1,0,2]=(-0.231241872108)
-        ref[0,1,1,0]=(0.625494139449)
-        ref[0,1,1,1]=(0.784802683192)
-        ref[0,1,1,2]=(0.612764525973)
-        ref[1,0,0,0]=(0.327644975022)
-        ref[1,0,0,1]=(0.0552951801276)
-        ref[1,0,0,2]=(-0.806887445103)
-        ref[1,0,1,0]=(0.194338798022)
-        ref[1,0,1,1]=(0.799902026341)
-        ref[1,0,1,2]=(1.70164249741)
-        ref[1,1,0,0]=(0.890832636865)
-        ref[1,1,0,1]=(0.223899365292)
-        ref[1,1,0,2]=(-0.283094526824)
-        ref[1,1,1,0]=(-0.122108330088)
-        ref[1,1,1,1]=(-0.293413695547)
-        ref[1,1,1,2]=(-0.371581852879)
-        ref[2,0,0,0]=(-0.469341678297)
-        ref[2,0,0,1]=(0.152856292978)
-        ref[2,0,0,2]=(0.765861314481)
-        ref[2,0,1,0]=(0.249219162734)
-        ref[2,0,1,1]=(0.319622173697)
-        ref[2,0,1,2]=(-0.182998471546)
-        ref[2,1,0,0]=(0.39687496584)
-        ref[2,1,0,1]=(0.137084411978)
-        ref[2,1,0,2]=(-0.34707250854)
-        ref[2,1,1,0]=(-0.382391798519)
-        ref[2,1,1,1]=(0.755317411547)
-        ref[2,1,1,2]=(0.424204162929)
-        ref[3,0,0,0]=(1.12637976255)
-        ref[3,0,0,1]=(0.11632178776)
-        ref[3,0,0,2]=(-0.615547388072)
-        ref[3,0,1,0]=(-0.819303259446)
-        ref[3,0,1,1]=(0.916951216368)
-        ref[3,0,1,2]=(-0.572792050441)
-        ref[3,1,0,0]=(0.194642055711)
-        ref[3,1,0,1]=(0.949663114037)
-        ref[3,1,0,2]=(-0.403001914682)
-        ref[3,1,1,0]=(0.902547242635)
-        ref[3,1,1,1]=(-1.04027936291)
-        ref[3,1,1,2]=(-1.78463515221)
-        ref[4,0,0,0]=(0.59060036737)
-        ref[4,0,0,1]=(-0.580905638676)
-        ref[4,0,0,2]=(-0.486098556884)
-        ref[4,0,1,0]=(-0.330634605524)
-        ref[4,0,1,1]=(-0.758140973629)
-        ref[4,0,1,2]=(-0.192282397672)
-        ref[4,1,0,0]=(1.40502801336)
-        ref[4,1,0,1]=(0.199036161455)
-        ref[4,1,0,2]=(-0.558660947885)
-        ref[4,1,1,0]=(-0.155588274273)
-        ref[4,1,1,1]=(-0.57050736529)
-        ref[4,1,1,2]=(1.1998664442)
-        ref[5,0,0,0]=(-0.754680865929)
-        ref[5,0,0,1]=(1.29040984028)
-        ref[5,0,0,2]=(-1.83778974463)
-        ref[5,0,1,0]=(0.274692501647)
-        ref[5,0,1,1]=(0.368546080921)
-        ref[5,0,1,2]=(-0.446376269232)
-        ref[5,1,0,0]=(-0.758704372861)
-        ref[5,1,0,1]=(1.75555227426)
-        ref[5,1,0,2]=(-0.13664688871)
-        ref[5,1,1,0]=(-0.568468068187)
-        ref[5,1,1,1]=(-0.320218561544)
-        ref[5,1,1,2]=(-0.827795466031)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(-0.447987377779)*x[0]**o+(-0.3185298109)*x[0]+(0.748689324197)*x[1]**o+(-0.979369398128)*x[1]
-        ref[0]=o*(-0.447987377779)*x_ref[0]**(o-1)+(-0.3185298109)
-        ref[1]=o*(0.748689324197)*x_ref[1]**(o-1)+(-0.979369398128)
-      else:
-        arg=(-0.991175677257)*x[0]**o+(0.486310659385)*x[0]+(0.366862476014)*x[1]**o+(0.718311286349)*x[1]+(-0.593137377946)*x[2]**o+(-0.98259729892)*x[2]
-        ref[0]=o*(-0.991175677257)*x_ref[0]**(o-1)+(0.486310659385)
-        ref[1]=o*(0.366862476014)*x_ref[1]**(o-1)+(0.718311286349)
-        ref[2]=o*(-0.593137377946)*x_ref[2]**(o-1)+(-0.98259729892)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.532427358862)*x[0]**o+(-0.699829406888)*x[0]+(-0.378181075858)*x[1]**o+(-0.163897932934)*x[1]
-        arg[1]=(0.76393225396)*x[0]**o+(0.87331212216)*x[0]+(0.0261520274749)*x[1]**o+(-0.475078274702)*x[1]
-        ref[0,0]=o*(0.532427358862)*x_ref[0]**(o-1)+(-0.699829406888)
-        ref[0,1]=o*(-0.378181075858)*x_ref[1]**(o-1)+(-0.163897932934)
-        ref[1,0]=o*(0.76393225396)*x_ref[0]**(o-1)+(0.87331212216)
-        ref[1,1]=o*(0.0261520274749)*x_ref[1]**(o-1)+(-0.475078274702)
-      else:
-        arg[0]=(-0.559640148983)*x[0]**o+(0.868360358061)*x[0]+(0.148807680806)*x[1]**o+(-0.488426629736)*x[1]+(0.99381766343)*x[2]**o+(-0.0241703848022)*x[2]
-        arg[1]=(-0.00270447073555)*x[0]**o+(0.599732416474)*x[0]+(-0.455449579349)*x[1]**o+(-0.791088816655)*x[1]+(0.850362671968)*x[2]**o+(-0.180726138889)*x[2]
-        ref[0,0]=o*(-0.559640148983)*x_ref[0]**(o-1)+(0.868360358061)
-        ref[0,1]=o*(0.148807680806)*x_ref[1]**(o-1)+(-0.488426629736)
-        ref[0,2]=o*(0.99381766343)*x_ref[2]**(o-1)+(-0.0241703848022)
-        ref[1,0]=o*(-0.00270447073555)*x_ref[0]**(o-1)+(0.599732416474)
-        ref[1,1]=o*(-0.455449579349)*x_ref[1]**(o-1)+(-0.791088816655)
-        ref[1,2]=o*(0.850362671968)*x_ref[2]**(o-1)+(-0.180726138889)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.157399152858)*x[0]**o+(0.00598352783814)*x[0]+(-0.904853822462)*x[1]**o+(0.767645769461)*x[1]
-        arg[0,1]=(0.764556091331)*x[0]**o+(-0.167733604181)*x[0]+(0.723254547109)*x[1]**o+(-0.863633737324)*x[1]
-        arg[0,2]=(0.480913138549)*x[0]**o+(0.505712705322)*x[0]+(-0.295398027463)*x[1]**o+(-0.0497846093953)*x[1]
-        arg[0,3]=(-0.957208239652)*x[0]**o+(0.608346818502)*x[0]+(-0.194623401251)*x[1]**o+(0.670671588806)*x[1]
-        arg[0,4]=(-0.179165159786)*x[0]**o+(-0.146090255471)*x[0]+(-0.413009197676)*x[1]**o+(-0.168508218849)*x[1]
-        arg[1,0]=(0.659914628278)*x[0]**o+(0.123177996909)*x[0]+(0.713971230628)*x[1]**o+(-0.687569461154)*x[1]
-        arg[1,1]=(0.857554477911)*x[0]**o+(0.119604916634)*x[0]+(-0.123185856515)*x[1]**o+(0.968800869965)*x[1]
-        arg[1,2]=(0.566596883167)*x[0]**o+(-0.667227639224)*x[0]+(0.29838343622)*x[1]**o+(0.0172896834006)*x[1]
-        arg[1,3]=(0.340418732306)*x[0]**o+(-0.115031635126)*x[0]+(0.212495048781)*x[1]**o+(-0.690939141829)*x[1]
-        arg[1,4]=(-0.513225187356)*x[0]**o+(0.975159534619)*x[0]+(0.159694719764)*x[1]**o+(-0.441973185517)*x[1]
-        arg[2,0]=(0.00598247134499)*x[0]**o+(-0.680866157243)*x[0]+(0.198740044836)*x[1]**o+(-0.776778848701)*x[1]
-        arg[2,1]=(0.385572341196)*x[0]**o+(-0.911229388405)*x[0]+(-0.869563350649)*x[1]**o+(-0.453073292811)*x[1]
-        arg[2,2]=(-0.678405510051)*x[0]**o+(0.570159849365)*x[0]+(-0.998909274112)*x[1]**o+(-0.56867397999)*x[1]
-        arg[2,3]=(0.592650344218)*x[0]**o+(-0.990760992864)*x[0]+(0.54832364584)*x[1]**o+(-0.62848423403)*x[1]
-        arg[2,4]=(-0.267222595774)*x[0]**o+(-0.398631721649)*x[0]+(-0.139351142788)*x[1]**o+(-0.973211734322)*x[1]
-        arg[3,0]=(-0.748270220449)*x[0]**o+(-0.432648285296)*x[0]+(-0.572322019432)*x[1]**o+(-0.361258377472)*x[1]
-        arg[3,1]=(-0.872970937458)*x[0]**o+(-0.412714429527)*x[0]+(0.28965384698)*x[1]**o+(0.0899128505144)*x[1]
-        arg[3,2]=(-0.448552675711)*x[0]**o+(-0.0531593149976)*x[0]+(-0.445359129375)*x[1]**o+(-0.357551800127)*x[1]
-        arg[3,3]=(-0.120676057603)*x[0]**o+(-0.736959379114)*x[0]+(-0.437089829553)*x[1]**o+(-0.272117257464)*x[1]
-        arg[3,4]=(0.342279309395)*x[0]**o+(0.182206506048)*x[0]+(0.843948330758)*x[1]**o+(0.165354303251)*x[1]
-        ref[0,0,0]=o*(0.157399152858)*x_ref[0]**(o-1)+(0.00598352783814)
-        ref[0,0,1]=o*(-0.904853822462)*x_ref[1]**(o-1)+(0.767645769461)
-        ref[0,1,0]=o*(0.764556091331)*x_ref[0]**(o-1)+(-0.167733604181)
-        ref[0,1,1]=o*(0.723254547109)*x_ref[1]**(o-1)+(-0.863633737324)
-        ref[0,2,0]=o*(0.480913138549)*x_ref[0]**(o-1)+(0.505712705322)
-        ref[0,2,1]=o*(-0.295398027463)*x_ref[1]**(o-1)+(-0.0497846093953)
-        ref[0,3,0]=o*(-0.957208239652)*x_ref[0]**(o-1)+(0.608346818502)
-        ref[0,3,1]=o*(-0.194623401251)*x_ref[1]**(o-1)+(0.670671588806)
-        ref[0,4,0]=o*(-0.179165159786)*x_ref[0]**(o-1)+(-0.146090255471)
-        ref[0,4,1]=o*(-0.413009197676)*x_ref[1]**(o-1)+(-0.168508218849)
-        ref[1,0,0]=o*(0.659914628278)*x_ref[0]**(o-1)+(0.123177996909)
-        ref[1,0,1]=o*(0.713971230628)*x_ref[1]**(o-1)+(-0.687569461154)
-        ref[1,1,0]=o*(0.857554477911)*x_ref[0]**(o-1)+(0.119604916634)
-        ref[1,1,1]=o*(-0.123185856515)*x_ref[1]**(o-1)+(0.968800869965)
-        ref[1,2,0]=o*(0.566596883167)*x_ref[0]**(o-1)+(-0.667227639224)
-        ref[1,2,1]=o*(0.29838343622)*x_ref[1]**(o-1)+(0.0172896834006)
-        ref[1,3,0]=o*(0.340418732306)*x_ref[0]**(o-1)+(-0.115031635126)
-        ref[1,3,1]=o*(0.212495048781)*x_ref[1]**(o-1)+(-0.690939141829)
-        ref[1,4,0]=o*(-0.513225187356)*x_ref[0]**(o-1)+(0.975159534619)
-        ref[1,4,1]=o*(0.159694719764)*x_ref[1]**(o-1)+(-0.441973185517)
-        ref[2,0,0]=o*(0.00598247134499)*x_ref[0]**(o-1)+(-0.680866157243)
-        ref[2,0,1]=o*(0.198740044836)*x_ref[1]**(o-1)+(-0.776778848701)
-        ref[2,1,0]=o*(0.385572341196)*x_ref[0]**(o-1)+(-0.911229388405)
-        ref[2,1,1]=o*(-0.869563350649)*x_ref[1]**(o-1)+(-0.453073292811)
-        ref[2,2,0]=o*(-0.678405510051)*x_ref[0]**(o-1)+(0.570159849365)
-        ref[2,2,1]=o*(-0.998909274112)*x_ref[1]**(o-1)+(-0.56867397999)
-        ref[2,3,0]=o*(0.592650344218)*x_ref[0]**(o-1)+(-0.990760992864)
-        ref[2,3,1]=o*(0.54832364584)*x_ref[1]**(o-1)+(-0.62848423403)
-        ref[2,4,0]=o*(-0.267222595774)*x_ref[0]**(o-1)+(-0.398631721649)
-        ref[2,4,1]=o*(-0.139351142788)*x_ref[1]**(o-1)+(-0.973211734322)
-        ref[3,0,0]=o*(-0.748270220449)*x_ref[0]**(o-1)+(-0.432648285296)
-        ref[3,0,1]=o*(-0.572322019432)*x_ref[1]**(o-1)+(-0.361258377472)
-        ref[3,1,0]=o*(-0.872970937458)*x_ref[0]**(o-1)+(-0.412714429527)
-        ref[3,1,1]=o*(0.28965384698)*x_ref[1]**(o-1)+(0.0899128505144)
-        ref[3,2,0]=o*(-0.448552675711)*x_ref[0]**(o-1)+(-0.0531593149976)
-        ref[3,2,1]=o*(-0.445359129375)*x_ref[1]**(o-1)+(-0.357551800127)
-        ref[3,3,0]=o*(-0.120676057603)*x_ref[0]**(o-1)+(-0.736959379114)
-        ref[3,3,1]=o*(-0.437089829553)*x_ref[1]**(o-1)+(-0.272117257464)
-        ref[3,4,0]=o*(0.342279309395)*x_ref[0]**(o-1)+(0.182206506048)
-        ref[3,4,1]=o*(0.843948330758)*x_ref[1]**(o-1)+(0.165354303251)
-      else:
-        arg[0,0]=(-0.912611504385)*x[0]**o+(0.730660242466)*x[0]+(-0.807306513948)*x[1]**o+(-0.611619910819)*x[1]+(-0.567616988907)*x[2]**o+(0.554411283236)*x[2]
-        arg[0,1]=(-0.900956431107)*x[0]**o+(-0.731441474835)*x[0]+(0.366905510731)*x[1]**o+(0.444763254457)*x[1]+(0.223337203463)*x[2]**o+(0.0823258304577)*x[2]
-        arg[0,2]=(-0.300262400629)*x[0]**o+(0.781835992318)*x[0]+(-0.961025746467)*x[1]**o+(-0.0255420888548)*x[1]+(-0.195336914392)*x[2]**o+(0.631006440014)*x[2]
-        arg[0,3]=(-0.0362225627667)*x[0]**o+(-0.258309391935)*x[0]+(0.915114590957)*x[1]**o+(-0.0261151730116)*x[1]+(-0.0359136191693)*x[2]**o+(0.34837541797)*x[2]
-        arg[0,4]=(0.718483283111)*x[0]**o+(-0.981945434022)*x[0]+(0.715616160215)*x[1]**o+(-0.213673997408)*x[1]+(0.703864386687)*x[2]**o+(-0.258970624794)*x[2]
-        arg[1,0]=(0.562339421788)*x[0]**o+(-0.469800316995)*x[0]+(-0.58860202695)*x[1]**o+(0.592493291759)*x[1]+(-0.0747446509827)*x[2]**o+(0.459846703357)*x[2]
-        arg[1,1]=(-0.739792007188)*x[0]**o+(0.69804646711)*x[0]+(0.685574577582)*x[1]**o+(0.34906822136)*x[1]+(-0.346626103556)*x[2]**o+(-0.186290616908)*x[2]
-        arg[1,2]=(0.605479936712)*x[0]**o+(0.23811484281)*x[0]+(-0.18270059933)*x[1]**o+(-0.883573478283)*x[1]+(0.558417469124)*x[2]**o+(0.0921284647122)*x[2]
-        arg[1,3]=(0.829453952054)*x[0]**o+(0.0943225421949)*x[0]+(-0.377472410614)*x[1]**o+(0.422596289908)*x[1]+(0.992700203574)*x[2]**o+(0.954704595957)*x[2]
-        arg[1,4]=(0.713437745608)*x[0]**o+(-0.90755469394)*x[0]+(-0.116969245983)*x[1]**o+(-0.615609779318)*x[1]+(-0.631014272933)*x[2]**o+(0.196556707186)*x[2]
-        arg[2,0]=(-0.643142569205)*x[0]**o+(-0.522571508238)*x[0]+(-0.221094875426)*x[1]**o+(0.00263621704394)*x[1]+(-0.346088170378)*x[2]**o+(-0.323346603492)*x[2]
-        arg[2,1]=(0.121192120404)*x[0]**o+(-0.910581465748)*x[0]+(0.661403514322)*x[1]**o+(0.314356472557)*x[1]+(0.740349932503)*x[2]**o+(0.397923840477)*x[2]
-        arg[2,2]=(0.712887835251)*x[0]**o+(0.802827824977)*x[0]+(0.225275507294)*x[1]**o+(0.00655056099106)*x[1]+(-0.0211189465513)*x[2]**o+(-0.672450969446)*x[2]
-        arg[2,3]=(0.220976204507)*x[0]**o+(0.384529933174)*x[0]+(-0.824967564367)*x[1]**o+(0.382079183434)*x[1]+(0.975192346085)*x[2]**o+(-0.845325222223)*x[2]
-        arg[2,4]=(-0.316551069119)*x[0]**o+(0.194934627874)*x[0]+(0.192096230967)*x[1]**o+(-0.423775967466)*x[1]+(-0.669140845203)*x[2]**o+(0.367813824992)*x[2]
-        arg[3,0]=(-0.361410077778)*x[0]**o+(0.377521588398)*x[0]+(-0.795093364568)*x[1]**o+(0.475257686757)*x[1]+(-0.996619080341)*x[2]**o+(-0.909105543506)*x[2]
-        arg[3,1]=(-0.324100979259)*x[0]**o+(-0.950807456193)*x[0]+(-0.141687301441)*x[1]**o+(0.153568029515)*x[1]+(-0.698514966417)*x[2]**o+(0.312395968777)*x[2]
-        arg[3,2]=(-0.997783460035)*x[0]**o+(0.328724967881)*x[0]+(-0.561572087716)*x[1]**o+(-0.0148890799876)*x[1]+(0.236142454998)*x[2]**o+(-0.36513107554)*x[2]
-        arg[3,3]=(0.750818510719)*x[0]**o+(-0.484598204959)*x[0]+(-0.599436804638)*x[1]**o+(-0.236232976078)*x[1]+(-0.0789148183785)*x[2]**o+(-0.74437164566)*x[2]
-        arg[3,4]=(-0.730664688591)*x[0]**o+(-0.94753100979)*x[0]+(-0.671463334034)*x[1]**o+(-0.139992464354)*x[1]+(0.286757519111)*x[2]**o+(0.512453551537)*x[2]
-        ref[0,0,0]=o*(-0.912611504385)*x_ref[0]**(o-1)+(0.730660242466)
-        ref[0,0,1]=o*(-0.807306513948)*x_ref[1]**(o-1)+(-0.611619910819)
-        ref[0,0,2]=o*(-0.567616988907)*x_ref[2]**(o-1)+(0.554411283236)
-        ref[0,1,0]=o*(-0.900956431107)*x_ref[0]**(o-1)+(-0.731441474835)
-        ref[0,1,1]=o*(0.366905510731)*x_ref[1]**(o-1)+(0.444763254457)
-        ref[0,1,2]=o*(0.223337203463)*x_ref[2]**(o-1)+(0.0823258304577)
-        ref[0,2,0]=o*(-0.300262400629)*x_ref[0]**(o-1)+(0.781835992318)
-        ref[0,2,1]=o*(-0.961025746467)*x_ref[1]**(o-1)+(-0.0255420888548)
-        ref[0,2,2]=o*(-0.195336914392)*x_ref[2]**(o-1)+(0.631006440014)
-        ref[0,3,0]=o*(-0.0362225627667)*x_ref[0]**(o-1)+(-0.258309391935)
-        ref[0,3,1]=o*(0.915114590957)*x_ref[1]**(o-1)+(-0.0261151730116)
-        ref[0,3,2]=o*(-0.0359136191693)*x_ref[2]**(o-1)+(0.34837541797)
-        ref[0,4,0]=o*(0.718483283111)*x_ref[0]**(o-1)+(-0.981945434022)
-        ref[0,4,1]=o*(0.715616160215)*x_ref[1]**(o-1)+(-0.213673997408)
-        ref[0,4,2]=o*(0.703864386687)*x_ref[2]**(o-1)+(-0.258970624794)
-        ref[1,0,0]=o*(0.562339421788)*x_ref[0]**(o-1)+(-0.469800316995)
-        ref[1,0,1]=o*(-0.58860202695)*x_ref[1]**(o-1)+(0.592493291759)
-        ref[1,0,2]=o*(-0.0747446509827)*x_ref[2]**(o-1)+(0.459846703357)
-        ref[1,1,0]=o*(-0.739792007188)*x_ref[0]**(o-1)+(0.69804646711)
-        ref[1,1,1]=o*(0.685574577582)*x_ref[1]**(o-1)+(0.34906822136)
-        ref[1,1,2]=o*(-0.346626103556)*x_ref[2]**(o-1)+(-0.186290616908)
-        ref[1,2,0]=o*(0.605479936712)*x_ref[0]**(o-1)+(0.23811484281)
-        ref[1,2,1]=o*(-0.18270059933)*x_ref[1]**(o-1)+(-0.883573478283)
-        ref[1,2,2]=o*(0.558417469124)*x_ref[2]**(o-1)+(0.0921284647122)
-        ref[1,3,0]=o*(0.829453952054)*x_ref[0]**(o-1)+(0.0943225421949)
-        ref[1,3,1]=o*(-0.377472410614)*x_ref[1]**(o-1)+(0.422596289908)
-        ref[1,3,2]=o*(0.992700203574)*x_ref[2]**(o-1)+(0.954704595957)
-        ref[1,4,0]=o*(0.713437745608)*x_ref[0]**(o-1)+(-0.90755469394)
-        ref[1,4,1]=o*(-0.116969245983)*x_ref[1]**(o-1)+(-0.615609779318)
-        ref[1,4,2]=o*(-0.631014272933)*x_ref[2]**(o-1)+(0.196556707186)
-        ref[2,0,0]=o*(-0.643142569205)*x_ref[0]**(o-1)+(-0.522571508238)
-        ref[2,0,1]=o*(-0.221094875426)*x_ref[1]**(o-1)+(0.00263621704394)
-        ref[2,0,2]=o*(-0.346088170378)*x_ref[2]**(o-1)+(-0.323346603492)
-        ref[2,1,0]=o*(0.121192120404)*x_ref[0]**(o-1)+(-0.910581465748)
-        ref[2,1,1]=o*(0.661403514322)*x_ref[1]**(o-1)+(0.314356472557)
-        ref[2,1,2]=o*(0.740349932503)*x_ref[2]**(o-1)+(0.397923840477)
-        ref[2,2,0]=o*(0.712887835251)*x_ref[0]**(o-1)+(0.802827824977)
-        ref[2,2,1]=o*(0.225275507294)*x_ref[1]**(o-1)+(0.00655056099106)
-        ref[2,2,2]=o*(-0.0211189465513)*x_ref[2]**(o-1)+(-0.672450969446)
-        ref[2,3,0]=o*(0.220976204507)*x_ref[0]**(o-1)+(0.384529933174)
-        ref[2,3,1]=o*(-0.824967564367)*x_ref[1]**(o-1)+(0.382079183434)
-        ref[2,3,2]=o*(0.975192346085)*x_ref[2]**(o-1)+(-0.845325222223)
-        ref[2,4,0]=o*(-0.316551069119)*x_ref[0]**(o-1)+(0.194934627874)
-        ref[2,4,1]=o*(0.192096230967)*x_ref[1]**(o-1)+(-0.423775967466)
-        ref[2,4,2]=o*(-0.669140845203)*x_ref[2]**(o-1)+(0.367813824992)
-        ref[3,0,0]=o*(-0.361410077778)*x_ref[0]**(o-1)+(0.377521588398)
-        ref[3,0,1]=o*(-0.795093364568)*x_ref[1]**(o-1)+(0.475257686757)
-        ref[3,0,2]=o*(-0.996619080341)*x_ref[2]**(o-1)+(-0.909105543506)
-        ref[3,1,0]=o*(-0.324100979259)*x_ref[0]**(o-1)+(-0.950807456193)
-        ref[3,1,1]=o*(-0.141687301441)*x_ref[1]**(o-1)+(0.153568029515)
-        ref[3,1,2]=o*(-0.698514966417)*x_ref[2]**(o-1)+(0.312395968777)
-        ref[3,2,0]=o*(-0.997783460035)*x_ref[0]**(o-1)+(0.328724967881)
-        ref[3,2,1]=o*(-0.561572087716)*x_ref[1]**(o-1)+(-0.0148890799876)
-        ref[3,2,2]=o*(0.236142454998)*x_ref[2]**(o-1)+(-0.36513107554)
-        ref[3,3,0]=o*(0.750818510719)*x_ref[0]**(o-1)+(-0.484598204959)
-        ref[3,3,1]=o*(-0.599436804638)*x_ref[1]**(o-1)+(-0.236232976078)
-        ref[3,3,2]=o*(-0.0789148183785)*x_ref[2]**(o-1)+(-0.74437164566)
-        ref[3,4,0]=o*(-0.730664688591)*x_ref[0]**(o-1)+(-0.94753100979)
-        ref[3,4,1]=o*(-0.671463334034)*x_ref[1]**(o-1)+(-0.139992464354)
-        ref[3,4,2]=o*(0.286757519111)*x_ref[2]**(o-1)+(0.512453551537)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.467597203998)*x[0]**o+(-0.878331243959)*x[0]+(-0.971530784104)*x[1]**o+(0.685854853102)*x[1]
-        arg[0,0,1]=(0.291345615954)*x[0]**o+(-0.745469654319)*x[0]+(0.976621664002)*x[1]**o+(-0.881452217847)*x[1]
-        arg[0,1,0]=(0.537843295475)*x[0]**o+(0.489619951145)*x[0]+(0.77330251637)*x[1]**o+(0.998031266089)*x[1]
-        arg[0,1,1]=(0.355984068681)*x[0]**o+(-0.814720548776)*x[0]+(0.495564264626)*x[1]**o+(0.525926194911)*x[1]
-        arg[1,0,0]=(0.0459062782507)*x[0]**o+(0.745363380399)*x[0]+(0.254962338793)*x[1]**o+(-0.818268107226)*x[1]
-        arg[1,0,1]=(0.806972777032)*x[0]**o+(0.65759411882)*x[0]+(-0.714015350868)*x[1]**o+(0.785611067194)*x[1]
-        arg[1,1,0]=(0.576206375389)*x[0]**o+(-0.502513595266)*x[0]+(0.258287392463)*x[1]**o+(0.0897418205816)*x[1]
-        arg[1,1,1]=(-0.854645709831)*x[0]**o+(0.48910569315)*x[0]+(0.684503579045)*x[1]**o+(0.156890859871)*x[1]
-        arg[2,0,0]=(-0.535650648427)*x[0]**o+(-0.189186476574)*x[0]+(-0.62891575537)*x[1]**o+(-0.37603690255)*x[1]
-        arg[2,0,1]=(-0.153001902814)*x[0]**o+(0.028214773063)*x[0]+(-0.605102549169)*x[1]**o+(-0.566991398262)*x[1]
-        arg[2,1,0]=(0.607976055886)*x[0]**o+(-0.247395663109)*x[0]+(0.424340230656)*x[1]**o+(0.210489427749)*x[1]
-        arg[2,1,1]=(-0.513543937157)*x[0]**o+(0.345931529219)*x[0]+(0.893744279358)*x[1]**o+(-0.519602594857)*x[1]
-        arg[3,0,0]=(-0.618812192169)*x[0]**o+(-0.897898654184)*x[0]+(-0.717700928924)*x[1]**o+(-0.21348885325)*x[1]
-        arg[3,0,1]=(-0.582829504396)*x[0]**o+(-0.0726162868757)*x[0]+(0.366457797377)*x[1]**o+(0.479006714526)*x[1]
-        arg[3,1,0]=(0.929143108169)*x[0]**o+(-0.302254589362)*x[0]+(-0.518817476772)*x[1]**o+(0.854860903894)*x[1]
-        arg[3,1,1]=(-0.815422381361)*x[0]**o+(-0.183407261786)*x[0]+(0.841334455272)*x[1]**o+(-0.560841747647)*x[1]
-        arg[4,0,0]=(0.746229089137)*x[0]**o+(-0.00173525360161)*x[0]+(0.729473923491)*x[1]**o+(-0.0152936558265)*x[1]
-        arg[4,0,1]=(-0.0474071267025)*x[0]**o+(-0.380505263812)*x[0]+(0.166181839511)*x[1]**o+(-0.421069915995)*x[1]
-        arg[4,1,0]=(-0.826801927705)*x[0]**o+(0.704799677183)*x[0]+(-0.0346961982898)*x[1]**o+(-0.401235214163)*x[1]
-        arg[4,1,1]=(-0.973646144788)*x[0]**o+(0.469976655077)*x[0]+(-0.458846284633)*x[1]**o+(0.818397008807)*x[1]
-        arg[5,0,0]=(0.155460716472)*x[0]**o+(-0.509095443426)*x[0]+(-0.0942934981524)*x[1]**o+(0.754087972651)*x[1]
-        arg[5,0,1]=(-0.584172835053)*x[0]**o+(-0.904579020559)*x[0]+(0.156301832106)*x[1]**o+(0.169995805721)*x[1]
-        arg[5,1,0]=(-0.424977437614)*x[0]**o+(0.244566550647)*x[0]+(-0.474400097866)*x[1]**o+(-0.315912223349)*x[1]
-        arg[5,1,1]=(0.764961378837)*x[0]**o+(-0.83633430067)*x[0]+(-0.446378328981)*x[1]**o+(-0.278460992776)*x[1]
-        ref[0,0,0,0]=o*(0.467597203998)*x_ref[0]**(o-1)+(-0.878331243959)
-        ref[0,0,0,1]=o*(-0.971530784104)*x_ref[1]**(o-1)+(0.685854853102)
-        ref[0,0,1,0]=o*(0.291345615954)*x_ref[0]**(o-1)+(-0.745469654319)
-        ref[0,0,1,1]=o*(0.976621664002)*x_ref[1]**(o-1)+(-0.881452217847)
-        ref[0,1,0,0]=o*(0.537843295475)*x_ref[0]**(o-1)+(0.489619951145)
-        ref[0,1,0,1]=o*(0.77330251637)*x_ref[1]**(o-1)+(0.998031266089)
-        ref[0,1,1,0]=o*(0.355984068681)*x_ref[0]**(o-1)+(-0.814720548776)
-        ref[0,1,1,1]=o*(0.495564264626)*x_ref[1]**(o-1)+(0.525926194911)
-        ref[1,0,0,0]=o*(0.0459062782507)*x_ref[0]**(o-1)+(0.745363380399)
-        ref[1,0,0,1]=o*(0.254962338793)*x_ref[1]**(o-1)+(-0.818268107226)
-        ref[1,0,1,0]=o*(0.806972777032)*x_ref[0]**(o-1)+(0.65759411882)
-        ref[1,0,1,1]=o*(-0.714015350868)*x_ref[1]**(o-1)+(0.785611067194)
-        ref[1,1,0,0]=o*(0.576206375389)*x_ref[0]**(o-1)+(-0.502513595266)
-        ref[1,1,0,1]=o*(0.258287392463)*x_ref[1]**(o-1)+(0.0897418205816)
-        ref[1,1,1,0]=o*(-0.854645709831)*x_ref[0]**(o-1)+(0.48910569315)
-        ref[1,1,1,1]=o*(0.684503579045)*x_ref[1]**(o-1)+(0.156890859871)
-        ref[2,0,0,0]=o*(-0.535650648427)*x_ref[0]**(o-1)+(-0.189186476574)
-        ref[2,0,0,1]=o*(-0.62891575537)*x_ref[1]**(o-1)+(-0.37603690255)
-        ref[2,0,1,0]=o*(-0.153001902814)*x_ref[0]**(o-1)+(0.028214773063)
-        ref[2,0,1,1]=o*(-0.605102549169)*x_ref[1]**(o-1)+(-0.566991398262)
-        ref[2,1,0,0]=o*(0.607976055886)*x_ref[0]**(o-1)+(-0.247395663109)
-        ref[2,1,0,1]=o*(0.424340230656)*x_ref[1]**(o-1)+(0.210489427749)
-        ref[2,1,1,0]=o*(-0.513543937157)*x_ref[0]**(o-1)+(0.345931529219)
-        ref[2,1,1,1]=o*(0.893744279358)*x_ref[1]**(o-1)+(-0.519602594857)
-        ref[3,0,0,0]=o*(-0.618812192169)*x_ref[0]**(o-1)+(-0.897898654184)
-        ref[3,0,0,1]=o*(-0.717700928924)*x_ref[1]**(o-1)+(-0.21348885325)
-        ref[3,0,1,0]=o*(-0.582829504396)*x_ref[0]**(o-1)+(-0.0726162868757)
-        ref[3,0,1,1]=o*(0.366457797377)*x_ref[1]**(o-1)+(0.479006714526)
-        ref[3,1,0,0]=o*(0.929143108169)*x_ref[0]**(o-1)+(-0.302254589362)
-        ref[3,1,0,1]=o*(-0.518817476772)*x_ref[1]**(o-1)+(0.854860903894)
-        ref[3,1,1,0]=o*(-0.815422381361)*x_ref[0]**(o-1)+(-0.183407261786)
-        ref[3,1,1,1]=o*(0.841334455272)*x_ref[1]**(o-1)+(-0.560841747647)
-        ref[4,0,0,0]=o*(0.746229089137)*x_ref[0]**(o-1)+(-0.00173525360161)
-        ref[4,0,0,1]=o*(0.729473923491)*x_ref[1]**(o-1)+(-0.0152936558265)
-        ref[4,0,1,0]=o*(-0.0474071267025)*x_ref[0]**(o-1)+(-0.380505263812)
-        ref[4,0,1,1]=o*(0.166181839511)*x_ref[1]**(o-1)+(-0.421069915995)
-        ref[4,1,0,0]=o*(-0.826801927705)*x_ref[0]**(o-1)+(0.704799677183)
-        ref[4,1,0,1]=o*(-0.0346961982898)*x_ref[1]**(o-1)+(-0.401235214163)
-        ref[4,1,1,0]=o*(-0.973646144788)*x_ref[0]**(o-1)+(0.469976655077)
-        ref[4,1,1,1]=o*(-0.458846284633)*x_ref[1]**(o-1)+(0.818397008807)
-        ref[5,0,0,0]=o*(0.155460716472)*x_ref[0]**(o-1)+(-0.509095443426)
-        ref[5,0,0,1]=o*(-0.0942934981524)*x_ref[1]**(o-1)+(0.754087972651)
-        ref[5,0,1,0]=o*(-0.584172835053)*x_ref[0]**(o-1)+(-0.904579020559)
-        ref[5,0,1,1]=o*(0.156301832106)*x_ref[1]**(o-1)+(0.169995805721)
-        ref[5,1,0,0]=o*(-0.424977437614)*x_ref[0]**(o-1)+(0.244566550647)
-        ref[5,1,0,1]=o*(-0.474400097866)*x_ref[1]**(o-1)+(-0.315912223349)
-        ref[5,1,1,0]=o*(0.764961378837)*x_ref[0]**(o-1)+(-0.83633430067)
-        ref[5,1,1,1]=o*(-0.446378328981)*x_ref[1]**(o-1)+(-0.278460992776)
-      else:
-        arg[0,0,0]=(0.723756735151)*x[0]**o+(0.738121670547)*x[0]+(0.384835073242)*x[1]**o+(-0.997944909714)*x[1]+(0.271533052097)*x[2]**o+(-0.667680363953)*x[2]
-        arg[0,0,1]=(-0.279804914835)*x[0]**o+(0.789671404386)*x[0]+(-0.823187173328)*x[1]**o+(-0.0126377581755)*x[1]+(-0.942836469998)*x[2]**o+(0.416417451133)*x[2]
-        arg[0,1,0]=(-0.69035514237)*x[0]**o+(0.388349204037)*x[0]+(0.807201832597)*x[1]**o+(-0.969007115064)*x[1]+(0.280506744137)*x[2]**o+(0.228554540968)*x[2]
-        arg[0,1,1]=(0.893542584763)*x[0]**o+(-0.755974692532)*x[0]+(0.675321004205)*x[1]**o+(0.670278291297)*x[1]+(0.92092687885)*x[2]**o+(-0.516288388724)*x[2]
-        arg[1,0,0]=(0.503764409596)*x[0]**o+(-0.39410032918)*x[0]+(0.532408717712)*x[1]**o+(0.0658355614843)*x[1]+(-0.533534889451)*x[2]**o+(0.846333211477)*x[2]
-        arg[1,0,1]=(0.520531780859)*x[0]**o+(0.869039672332)*x[0]+(-0.706342144586)*x[1]**o+(0.0665768341658)*x[1]+(-0.909079295867)*x[2]**o+(-0.34153327843)*x[2]
-        arg[1,1,0]=(-0.873546169914)*x[0]**o+(-0.554907283387)*x[0]+(-0.0560665557101)*x[1]**o+(0.436703623389)*x[1]+(0.730437022736)*x[2]**o+(0.100904171105)*x[2]
-        arg[1,1,1]=(0.845958886681)*x[0]**o+(0.376444128389)*x[0]+(-0.393744308499)*x[1]**o+(-0.0940537397734)*x[1]+(0.178796464778)*x[2]**o+(-0.584448595407)*x[2]
-        arg[2,0,0]=(0.000704382305339)*x[0]**o+(-0.836800712787)*x[0]+(0.671931504433)*x[1]**o+(0.263280364406)*x[1]+(-0.746980015754)*x[2]**o+(-0.985058787575)*x[2]
-        arg[2,0,1]=(-0.540690929008)*x[0]**o+(0.656899216804)*x[0]+(-0.608036845804)*x[1]**o+(0.224943400248)*x[1]+(-0.312449005326)*x[2]**o+(-0.621458231634)*x[2]
-        arg[2,1,0]=(0.440432866893)*x[0]**o+(0.972046189647)*x[0]+(0.060785199375)*x[1]**o+(0.304756432986)*x[1]+(-0.473510049103)*x[2]**o+(0.3707166351)*x[2]
-        arg[2,1,1]=(0.96344472567)*x[0]**o+(-0.153932665404)*x[0]+(-0.43646142206)*x[1]**o+(0.4838463484)*x[1]+(0.613286612579)*x[2]**o+(0.84521461472)*x[2]
-        arg[3,0,0]=(0.65147393118)*x[0]**o+(-0.886665762467)*x[0]+(-0.266000665973)*x[1]**o+(0.897979405808)*x[1]+(0.699333158084)*x[2]**o+(-0.460865970247)*x[2]
-        arg[3,0,1]=(0.870253308112)*x[0]**o+(-0.248736315721)*x[0]+(-0.816719773596)*x[1]**o+(-0.89378202899)*x[1]+(0.524350309915)*x[2]**o+(0.107325872954)*x[2]
-        arg[3,1,0]=(-0.152250686624)*x[0]**o+(-0.89784066484)*x[0]+(-0.327207891694)*x[1]**o+(0.346548492907)*x[1]+(0.409288642845)*x[2]**o+(-0.627349664194)*x[2]
-        arg[3,1,1]=(0.398337202036)*x[0]**o+(0.307156588584)*x[0]+(0.0567088869624)*x[1]**o+(-0.132313990308)*x[1]+(-0.361821356587)*x[2]**o+(0.913518325149)*x[2]
-        arg[4,0,0]=(0.184289428296)*x[0]**o+(0.138095407277)*x[0]+(0.514405012603)*x[1]**o+(0.590757249119)*x[1]+(-0.984116206238)*x[2]**o+(-0.176561783123)*x[2]
-        arg[4,0,1]=(-0.804189448075)*x[0]**o+(0.662750787102)*x[0]+(0.361634380444)*x[1]**o+(-0.682665313256)*x[1]+(-0.0738989964344)*x[2]**o+(0.8870747144)*x[2]
-        arg[4,1,0]=(-0.28290153618)*x[0]**o+(-0.942107675992)*x[0]+(0.308140792703)*x[1]**o+(0.686659531002)*x[1]+(0.789553636322)*x[2]**o+(0.587377542884)*x[2]
-        arg[4,1,1]=(0.6137979501)*x[0]**o+(-0.564031937362)*x[0]+(-0.116407590432)*x[1]**o+(-0.119100735459)*x[1]+(0.673631378916)*x[2]**o+(0.766413057635)*x[2]
-        arg[5,0,0]=(-0.871242033478)*x[0]**o+(0.823859447959)*x[0]+(-0.0506075089356)*x[1]**o+(-0.901254358367)*x[1]+(0.936710991394)*x[2]**o+(0.328438496312)*x[2]
-        arg[5,0,1]=(-0.768255700059)*x[0]**o+(0.199623934067)*x[0]+(-0.0715921959057)*x[1]**o+(-0.542435290562)*x[1]+(-0.278962068381)*x[2]**o+(0.784363143932)*x[2]
-        arg[5,1,0]=(0.897130313615)*x[0]**o+(-0.519033315355)*x[0]+(0.223176381444)*x[1]**o+(0.495645921147)*x[1]+(-0.0957696173909)*x[2]**o+(-0.768307051074)*x[2]
-        arg[5,1,1]=(-0.944161779454)*x[0]**o+(0.430097328631)*x[0]+(0.86626977715)*x[1]**o+(-0.675612908116)*x[1]+(0.506821683353)*x[2]**o+(0.386559021354)*x[2]
-        ref[0,0,0,0]=o*(0.723756735151)*x_ref[0]**(o-1)+(0.738121670547)
-        ref[0,0,0,1]=o*(0.384835073242)*x_ref[1]**(o-1)+(-0.997944909714)
-        ref[0,0,0,2]=o*(0.271533052097)*x_ref[2]**(o-1)+(-0.667680363953)
-        ref[0,0,1,0]=o*(-0.279804914835)*x_ref[0]**(o-1)+(0.789671404386)
-        ref[0,0,1,1]=o*(-0.823187173328)*x_ref[1]**(o-1)+(-0.0126377581755)
-        ref[0,0,1,2]=o*(-0.942836469998)*x_ref[2]**(o-1)+(0.416417451133)
-        ref[0,1,0,0]=o*(-0.69035514237)*x_ref[0]**(o-1)+(0.388349204037)
-        ref[0,1,0,1]=o*(0.807201832597)*x_ref[1]**(o-1)+(-0.969007115064)
-        ref[0,1,0,2]=o*(0.280506744137)*x_ref[2]**(o-1)+(0.228554540968)
-        ref[0,1,1,0]=o*(0.893542584763)*x_ref[0]**(o-1)+(-0.755974692532)
-        ref[0,1,1,1]=o*(0.675321004205)*x_ref[1]**(o-1)+(0.670278291297)
-        ref[0,1,1,2]=o*(0.92092687885)*x_ref[2]**(o-1)+(-0.516288388724)
-        ref[1,0,0,0]=o*(0.503764409596)*x_ref[0]**(o-1)+(-0.39410032918)
-        ref[1,0,0,1]=o*(0.532408717712)*x_ref[1]**(o-1)+(0.0658355614843)
-        ref[1,0,0,2]=o*(-0.533534889451)*x_ref[2]**(o-1)+(0.846333211477)
-        ref[1,0,1,0]=o*(0.520531780859)*x_ref[0]**(o-1)+(0.869039672332)
-        ref[1,0,1,1]=o*(-0.706342144586)*x_ref[1]**(o-1)+(0.0665768341658)
-        ref[1,0,1,2]=o*(-0.909079295867)*x_ref[2]**(o-1)+(-0.34153327843)
-        ref[1,1,0,0]=o*(-0.873546169914)*x_ref[0]**(o-1)+(-0.554907283387)
-        ref[1,1,0,1]=o*(-0.0560665557101)*x_ref[1]**(o-1)+(0.436703623389)
-        ref[1,1,0,2]=o*(0.730437022736)*x_ref[2]**(o-1)+(0.100904171105)
-        ref[1,1,1,0]=o*(0.845958886681)*x_ref[0]**(o-1)+(0.376444128389)
-        ref[1,1,1,1]=o*(-0.393744308499)*x_ref[1]**(o-1)+(-0.0940537397734)
-        ref[1,1,1,2]=o*(0.178796464778)*x_ref[2]**(o-1)+(-0.584448595407)
-        ref[2,0,0,0]=o*(0.000704382305339)*x_ref[0]**(o-1)+(-0.836800712787)
-        ref[2,0,0,1]=o*(0.671931504433)*x_ref[1]**(o-1)+(0.263280364406)
-        ref[2,0,0,2]=o*(-0.746980015754)*x_ref[2]**(o-1)+(-0.985058787575)
-        ref[2,0,1,0]=o*(-0.540690929008)*x_ref[0]**(o-1)+(0.656899216804)
-        ref[2,0,1,1]=o*(-0.608036845804)*x_ref[1]**(o-1)+(0.224943400248)
-        ref[2,0,1,2]=o*(-0.312449005326)*x_ref[2]**(o-1)+(-0.621458231634)
-        ref[2,1,0,0]=o*(0.440432866893)*x_ref[0]**(o-1)+(0.972046189647)
-        ref[2,1,0,1]=o*(0.060785199375)*x_ref[1]**(o-1)+(0.304756432986)
-        ref[2,1,0,2]=o*(-0.473510049103)*x_ref[2]**(o-1)+(0.3707166351)
-        ref[2,1,1,0]=o*(0.96344472567)*x_ref[0]**(o-1)+(-0.153932665404)
-        ref[2,1,1,1]=o*(-0.43646142206)*x_ref[1]**(o-1)+(0.4838463484)
-        ref[2,1,1,2]=o*(0.613286612579)*x_ref[2]**(o-1)+(0.84521461472)
-        ref[3,0,0,0]=o*(0.65147393118)*x_ref[0]**(o-1)+(-0.886665762467)
-        ref[3,0,0,1]=o*(-0.266000665973)*x_ref[1]**(o-1)+(0.897979405808)
-        ref[3,0,0,2]=o*(0.699333158084)*x_ref[2]**(o-1)+(-0.460865970247)
-        ref[3,0,1,0]=o*(0.870253308112)*x_ref[0]**(o-1)+(-0.248736315721)
-        ref[3,0,1,1]=o*(-0.816719773596)*x_ref[1]**(o-1)+(-0.89378202899)
-        ref[3,0,1,2]=o*(0.524350309915)*x_ref[2]**(o-1)+(0.107325872954)
-        ref[3,1,0,0]=o*(-0.152250686624)*x_ref[0]**(o-1)+(-0.89784066484)
-        ref[3,1,0,1]=o*(-0.327207891694)*x_ref[1]**(o-1)+(0.346548492907)
-        ref[3,1,0,2]=o*(0.409288642845)*x_ref[2]**(o-1)+(-0.627349664194)
-        ref[3,1,1,0]=o*(0.398337202036)*x_ref[0]**(o-1)+(0.307156588584)
-        ref[3,1,1,1]=o*(0.0567088869624)*x_ref[1]**(o-1)+(-0.132313990308)
-        ref[3,1,1,2]=o*(-0.361821356587)*x_ref[2]**(o-1)+(0.913518325149)
-        ref[4,0,0,0]=o*(0.184289428296)*x_ref[0]**(o-1)+(0.138095407277)
-        ref[4,0,0,1]=o*(0.514405012603)*x_ref[1]**(o-1)+(0.590757249119)
-        ref[4,0,0,2]=o*(-0.984116206238)*x_ref[2]**(o-1)+(-0.176561783123)
-        ref[4,0,1,0]=o*(-0.804189448075)*x_ref[0]**(o-1)+(0.662750787102)
-        ref[4,0,1,1]=o*(0.361634380444)*x_ref[1]**(o-1)+(-0.682665313256)
-        ref[4,0,1,2]=o*(-0.0738989964344)*x_ref[2]**(o-1)+(0.8870747144)
-        ref[4,1,0,0]=o*(-0.28290153618)*x_ref[0]**(o-1)+(-0.942107675992)
-        ref[4,1,0,1]=o*(0.308140792703)*x_ref[1]**(o-1)+(0.686659531002)
-        ref[4,1,0,2]=o*(0.789553636322)*x_ref[2]**(o-1)+(0.587377542884)
-        ref[4,1,1,0]=o*(0.6137979501)*x_ref[0]**(o-1)+(-0.564031937362)
-        ref[4,1,1,1]=o*(-0.116407590432)*x_ref[1]**(o-1)+(-0.119100735459)
-        ref[4,1,1,2]=o*(0.673631378916)*x_ref[2]**(o-1)+(0.766413057635)
-        ref[5,0,0,0]=o*(-0.871242033478)*x_ref[0]**(o-1)+(0.823859447959)
-        ref[5,0,0,1]=o*(-0.0506075089356)*x_ref[1]**(o-1)+(-0.901254358367)
-        ref[5,0,0,2]=o*(0.936710991394)*x_ref[2]**(o-1)+(0.328438496312)
-        ref[5,0,1,0]=o*(-0.768255700059)*x_ref[0]**(o-1)+(0.199623934067)
-        ref[5,0,1,1]=o*(-0.0715921959057)*x_ref[1]**(o-1)+(-0.542435290562)
-        ref[5,0,1,2]=o*(-0.278962068381)*x_ref[2]**(o-1)+(0.784363143932)
-        ref[5,1,0,0]=o*(0.897130313615)*x_ref[0]**(o-1)+(-0.519033315355)
-        ref[5,1,0,1]=o*(0.223176381444)*x_ref[1]**(o-1)+(0.495645921147)
-        ref[5,1,0,2]=o*(-0.0957696173909)*x_ref[2]**(o-1)+(-0.768307051074)
-        ref[5,1,1,0]=o*(-0.944161779454)*x_ref[0]**(o-1)+(0.430097328631)
-        ref[5,1,1,1]=o*(0.86626977715)*x_ref[1]**(o-1)+(-0.675612908116)
-        ref[5,1,1,2]=o*(0.506821683353)*x_ref[2]**(o-1)+(0.386559021354)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.54415545025)*x[0]**o+(0.979947366774)*x[0]+(-0.405934730304)*x[1]**o+(0.424994268397)*x[1]
-        ref[0]=o*(0.54415545025)*x_ref[0]**(o-1)+(0.979947366774)
-        ref[1]=o*(-0.405934730304)*x_ref[1]**(o-1)+(0.424994268397)
-      else:
-        arg=(-0.0240792232301)*x[0]**o+(0.33156704088)*x[0]+(-0.051539264252)*x[1]**o+(-0.886370693155)*x[1]+(-0.954475798211)*x[2]**o+(0.238073928589)*x[2]
-        ref[0]=o*(-0.0240792232301)*x_ref[0]**(o-1)+(0.33156704088)
-        ref[1]=o*(-0.051539264252)*x_ref[1]**(o-1)+(-0.886370693155)
-        ref[2]=o*(-0.954475798211)*x_ref[2]**(o-1)+(0.238073928589)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.526471606132)*x[0]**o+(-0.355534153967)*x[0]+(-0.792258102571)*x[1]**o+(0.386283553167)*x[1]
-        arg[1]=(-0.892924864905)*x[0]**o+(0.19218757952)*x[0]+(0.00248964495987)*x[1]**o+(-0.687070938997)*x[1]
-        ref[0,0]=o*(-0.526471606132)*x_ref[0]**(o-1)+(-0.355534153967)
-        ref[0,1]=o*(-0.792258102571)*x_ref[1]**(o-1)+(0.386283553167)
-        ref[1,0]=o*(-0.892924864905)*x_ref[0]**(o-1)+(0.19218757952)
-        ref[1,1]=o*(0.00248964495987)*x_ref[1]**(o-1)+(-0.687070938997)
-      else:
-        arg[0]=(-0.254013984725)*x[0]**o+(0.126174108068)*x[0]+(-0.967653739084)*x[1]**o+(-0.524294999327)*x[1]+(0.374454913375)*x[2]**o+(0.783768839592)*x[2]
-        arg[1]=(0.862328996944)*x[0]**o+(-0.0100272707295)*x[0]+(0.163524617753)*x[1]**o+(-0.19251370258)*x[1]+(0.889557068195)*x[2]**o+(0.573248942406)*x[2]
-        ref[0,0]=o*(-0.254013984725)*x_ref[0]**(o-1)+(0.126174108068)
-        ref[0,1]=o*(-0.967653739084)*x_ref[1]**(o-1)+(-0.524294999327)
-        ref[0,2]=o*(0.374454913375)*x_ref[2]**(o-1)+(0.783768839592)
-        ref[1,0]=o*(0.862328996944)*x_ref[0]**(o-1)+(-0.0100272707295)
-        ref[1,1]=o*(0.163524617753)*x_ref[1]**(o-1)+(-0.19251370258)
-        ref[1,2]=o*(0.889557068195)*x_ref[2]**(o-1)+(0.573248942406)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.712410724071)*x[0]**o+(0.642832165006)*x[0]+(0.409613677638)*x[1]**o+(-0.940707375829)*x[1]
-        arg[0,1]=(-0.192677448978)*x[0]**o+(0.928105399392)*x[0]+(-0.0976390111113)*x[1]**o+(0.152541825282)*x[1]
-        arg[0,2]=(-0.555865920622)*x[0]**o+(0.187618737934)*x[0]+(-0.400398722616)*x[1]**o+(0.132335647294)*x[1]
-        arg[0,3]=(-0.0984345355899)*x[0]**o+(-0.136251593387)*x[0]+(0.820900167194)*x[1]**o+(-0.54323976155)*x[1]
-        arg[0,4]=(-0.718763327727)*x[0]**o+(-0.993678837401)*x[0]+(0.0282625285716)*x[1]**o+(0.480464124636)*x[1]
-        arg[1,0]=(-0.1635372419)*x[0]**o+(0.97173720053)*x[0]+(0.0423190406144)*x[1]**o+(-0.607779321237)*x[1]
-        arg[1,1]=(-0.59220466746)*x[0]**o+(-0.329625880847)*x[0]+(0.176412343254)*x[1]**o+(0.955769019385)*x[1]
-        arg[1,2]=(-0.516421195901)*x[0]**o+(0.147037193899)*x[0]+(0.247835053631)*x[1]**o+(-0.877986653535)*x[1]
-        arg[1,3]=(-0.317266388999)*x[0]**o+(0.864393749347)*x[0]+(-0.957863705756)*x[1]**o+(-0.884975429798)*x[1]
-        arg[1,4]=(0.540121554391)*x[0]**o+(0.808050078272)*x[0]+(0.703557587067)*x[1]**o+(-0.0976121077766)*x[1]
-        arg[2,0]=(0.23658022222)*x[0]**o+(0.122038637852)*x[0]+(0.411570045798)*x[1]**o+(-0.434531687414)*x[1]
-        arg[2,1]=(-0.378365306249)*x[0]**o+(0.511747532394)*x[0]+(0.586326813286)*x[1]**o+(0.699918966936)*x[1]
-        arg[2,2]=(0.445092669694)*x[0]**o+(0.637517787944)*x[0]+(-0.668779388847)*x[1]**o+(0.487635262236)*x[1]
-        arg[2,3]=(-0.232265851556)*x[0]**o+(0.391449220433)*x[0]+(0.647177607766)*x[1]**o+(0.207062996634)*x[1]
-        arg[2,4]=(0.338412227828)*x[0]**o+(0.0205801366652)*x[0]+(-0.492628796478)*x[1]**o+(-0.683459852092)*x[1]
-        arg[3,0]=(0.584296838468)*x[0]**o+(-0.598793253755)*x[0]+(0.707319426212)*x[1]**o+(0.678834769735)*x[1]
-        arg[3,1]=(0.801295300134)*x[0]**o+(0.0494871119593)*x[0]+(0.378929822492)*x[1]**o+(-0.536309789421)*x[1]
-        arg[3,2]=(-0.761535984131)*x[0]**o+(0.121584094596)*x[0]+(-0.00655849155175)*x[1]**o+(0.321872124523)*x[1]
-        arg[3,3]=(0.384633290815)*x[0]**o+(-0.710356674518)*x[0]+(0.962059942069)*x[1]**o+(-0.593059919585)*x[1]
-        arg[3,4]=(-0.608988807286)*x[0]**o+(-0.0776468065145)*x[0]+(-0.701400144867)*x[1]**o+(0.643928611178)*x[1]
-        ref[0,0,0]=o*(0.712410724071)*x_ref[0]**(o-1)+(0.642832165006)
-        ref[0,0,1]=o*(0.409613677638)*x_ref[1]**(o-1)+(-0.940707375829)
-        ref[0,1,0]=o*(-0.192677448978)*x_ref[0]**(o-1)+(0.928105399392)
-        ref[0,1,1]=o*(-0.0976390111113)*x_ref[1]**(o-1)+(0.152541825282)
-        ref[0,2,0]=o*(-0.555865920622)*x_ref[0]**(o-1)+(0.187618737934)
-        ref[0,2,1]=o*(-0.400398722616)*x_ref[1]**(o-1)+(0.132335647294)
-        ref[0,3,0]=o*(-0.0984345355899)*x_ref[0]**(o-1)+(-0.136251593387)
-        ref[0,3,1]=o*(0.820900167194)*x_ref[1]**(o-1)+(-0.54323976155)
-        ref[0,4,0]=o*(-0.718763327727)*x_ref[0]**(o-1)+(-0.993678837401)
-        ref[0,4,1]=o*(0.0282625285716)*x_ref[1]**(o-1)+(0.480464124636)
-        ref[1,0,0]=o*(-0.1635372419)*x_ref[0]**(o-1)+(0.97173720053)
-        ref[1,0,1]=o*(0.0423190406144)*x_ref[1]**(o-1)+(-0.607779321237)
-        ref[1,1,0]=o*(-0.59220466746)*x_ref[0]**(o-1)+(-0.329625880847)
-        ref[1,1,1]=o*(0.176412343254)*x_ref[1]**(o-1)+(0.955769019385)
-        ref[1,2,0]=o*(-0.516421195901)*x_ref[0]**(o-1)+(0.147037193899)
-        ref[1,2,1]=o*(0.247835053631)*x_ref[1]**(o-1)+(-0.877986653535)
-        ref[1,3,0]=o*(-0.317266388999)*x_ref[0]**(o-1)+(0.864393749347)
-        ref[1,3,1]=o*(-0.957863705756)*x_ref[1]**(o-1)+(-0.884975429798)
-        ref[1,4,0]=o*(0.540121554391)*x_ref[0]**(o-1)+(0.808050078272)
-        ref[1,4,1]=o*(0.703557587067)*x_ref[1]**(o-1)+(-0.0976121077766)
-        ref[2,0,0]=o*(0.23658022222)*x_ref[0]**(o-1)+(0.122038637852)
-        ref[2,0,1]=o*(0.411570045798)*x_ref[1]**(o-1)+(-0.434531687414)
-        ref[2,1,0]=o*(-0.378365306249)*x_ref[0]**(o-1)+(0.511747532394)
-        ref[2,1,1]=o*(0.586326813286)*x_ref[1]**(o-1)+(0.699918966936)
-        ref[2,2,0]=o*(0.445092669694)*x_ref[0]**(o-1)+(0.637517787944)
-        ref[2,2,1]=o*(-0.668779388847)*x_ref[1]**(o-1)+(0.487635262236)
-        ref[2,3,0]=o*(-0.232265851556)*x_ref[0]**(o-1)+(0.391449220433)
-        ref[2,3,1]=o*(0.647177607766)*x_ref[1]**(o-1)+(0.207062996634)
-        ref[2,4,0]=o*(0.338412227828)*x_ref[0]**(o-1)+(0.0205801366652)
-        ref[2,4,1]=o*(-0.492628796478)*x_ref[1]**(o-1)+(-0.683459852092)
-        ref[3,0,0]=o*(0.584296838468)*x_ref[0]**(o-1)+(-0.598793253755)
-        ref[3,0,1]=o*(0.707319426212)*x_ref[1]**(o-1)+(0.678834769735)
-        ref[3,1,0]=o*(0.801295300134)*x_ref[0]**(o-1)+(0.0494871119593)
-        ref[3,1,1]=o*(0.378929822492)*x_ref[1]**(o-1)+(-0.536309789421)
-        ref[3,2,0]=o*(-0.761535984131)*x_ref[0]**(o-1)+(0.121584094596)
-        ref[3,2,1]=o*(-0.00655849155175)*x_ref[1]**(o-1)+(0.321872124523)
-        ref[3,3,0]=o*(0.384633290815)*x_ref[0]**(o-1)+(-0.710356674518)
-        ref[3,3,1]=o*(0.962059942069)*x_ref[1]**(o-1)+(-0.593059919585)
-        ref[3,4,0]=o*(-0.608988807286)*x_ref[0]**(o-1)+(-0.0776468065145)
-        ref[3,4,1]=o*(-0.701400144867)*x_ref[1]**(o-1)+(0.643928611178)
-      else:
-        arg[0,0]=(-0.514546772198)*x[0]**o+(0.679859064768)*x[0]+(-0.494037106077)*x[1]**o+(-0.0598645161488)*x[1]+(-0.543474311879)*x[2]**o+(0.597237276677)*x[2]
-        arg[0,1]=(0.0826513727579)*x[0]**o+(0.870535937411)*x[0]+(-0.194047768119)*x[1]**o+(-0.111616761775)*x[1]+(0.697073558803)*x[2]**o+(-0.170433075843)*x[2]
-        arg[0,2]=(0.608560200938)*x[0]**o+(-0.28991661304)*x[0]+(0.929121366615)*x[1]**o+(0.445280468492)*x[1]+(-0.0671026162019)*x[2]**o+(-0.835086989851)*x[2]
-        arg[0,3]=(-0.256476478337)*x[0]**o+(-0.857686365148)*x[0]+(-0.309306419219)*x[1]**o+(0.750579112592)*x[1]+(0.758254577714)*x[2]**o+(0.108972886739)*x[2]
-        arg[0,4]=(0.189540467853)*x[0]**o+(-0.639906129587)*x[0]+(0.1086564431)*x[1]**o+(-0.254754163159)*x[1]+(-0.595415956315)*x[2]**o+(0.416643698623)*x[2]
-        arg[1,0]=(0.649640741159)*x[0]**o+(-0.715604744977)*x[0]+(0.144698127223)*x[1]**o+(0.84058008507)*x[1]+(0.00226738664623)*x[2]**o+(0.143092105366)*x[2]
-        arg[1,1]=(0.30428097785)*x[0]**o+(0.172630542192)*x[0]+(0.645118113075)*x[1]**o+(-0.394468022223)*x[1]+(0.731670923192)*x[2]**o+(-0.676021495379)*x[2]
-        arg[1,2]=(0.56459927889)*x[0]**o+(-0.624980053566)*x[0]+(-0.524836958708)*x[1]**o+(0.282862320474)*x[1]+(0.99070455422)*x[2]**o+(0.000265746399286)*x[2]
-        arg[1,3]=(-0.251929813217)*x[0]**o+(0.00685246758491)*x[0]+(-0.252595929082)*x[1]**o+(-0.997558334417)*x[1]+(-0.431329146194)*x[2]**o+(0.0685298495116)*x[2]
-        arg[1,4]=(-0.850398225165)*x[0]**o+(-0.752363025861)*x[0]+(-0.669448553729)*x[1]**o+(0.809247179374)*x[1]+(-0.927467807251)*x[2]**o+(-0.498094160268)*x[2]
-        arg[2,0]=(0.541736859663)*x[0]**o+(-0.651273876855)*x[0]+(-0.679670779769)*x[1]**o+(0.669564679419)*x[1]+(-0.825048237017)*x[2]**o+(-0.247744537755)*x[2]
-        arg[2,1]=(0.909016713138)*x[0]**o+(-0.794124179572)*x[0]+(0.887294650854)*x[1]**o+(-0.198933351435)*x[1]+(-0.819671062456)*x[2]**o+(0.287455634612)*x[2]
-        arg[2,2]=(-0.469337238665)*x[0]**o+(0.787828984218)*x[0]+(0.916042829702)*x[1]**o+(-0.475983675757)*x[1]+(-0.350660319046)*x[2]**o+(0.944222119413)*x[2]
-        arg[2,3]=(-0.194629035155)*x[0]**o+(0.452058614199)*x[0]+(-0.565150768916)*x[1]**o+(-0.967642852138)*x[1]+(-0.345332973443)*x[2]**o+(-0.238359110833)*x[2]
-        arg[2,4]=(-0.744197369952)*x[0]**o+(-0.0161450929106)*x[0]+(0.946555120156)*x[1]**o+(-0.336314723492)*x[1]+(0.212936909808)*x[2]**o+(-0.900582293569)*x[2]
-        arg[3,0]=(0.90736518985)*x[0]**o+(-0.866096443075)*x[0]+(0.440227521532)*x[1]**o+(-0.545983384676)*x[1]+(0.433167375756)*x[2]**o+(-0.913060961228)*x[2]
-        arg[3,1]=(0.33547032327)*x[0]**o+(0.766388218896)*x[0]+(-0.386141806114)*x[1]**o+(0.28471049668)*x[1]+(0.389347155974)*x[2]**o+(0.211663215285)*x[2]
-        arg[3,2]=(0.193757801099)*x[0]**o+(0.0145439587225)*x[0]+(0.575506295918)*x[1]**o+(-0.678317336021)*x[1]+(0.64603157052)*x[2]**o+(-0.876667949279)*x[2]
-        arg[3,3]=(-0.0518002857411)*x[0]**o+(-0.540021971724)*x[0]+(-0.490275636747)*x[1]**o+(-0.849147647677)*x[1]+(-0.0132783508877)*x[2]**o+(0.0859860768541)*x[2]
-        arg[3,4]=(-0.332675003425)*x[0]**o+(-0.757986125506)*x[0]+(-0.487001539705)*x[1]**o+(0.898881577697)*x[1]+(0.56557767007)*x[2]**o+(0.181594113977)*x[2]
-        ref[0,0,0]=o*(-0.514546772198)*x_ref[0]**(o-1)+(0.679859064768)
-        ref[0,0,1]=o*(-0.494037106077)*x_ref[1]**(o-1)+(-0.0598645161488)
-        ref[0,0,2]=o*(-0.543474311879)*x_ref[2]**(o-1)+(0.597237276677)
-        ref[0,1,0]=o*(0.0826513727579)*x_ref[0]**(o-1)+(0.870535937411)
-        ref[0,1,1]=o*(-0.194047768119)*x_ref[1]**(o-1)+(-0.111616761775)
-        ref[0,1,2]=o*(0.697073558803)*x_ref[2]**(o-1)+(-0.170433075843)
-        ref[0,2,0]=o*(0.608560200938)*x_ref[0]**(o-1)+(-0.28991661304)
-        ref[0,2,1]=o*(0.929121366615)*x_ref[1]**(o-1)+(0.445280468492)
-        ref[0,2,2]=o*(-0.0671026162019)*x_ref[2]**(o-1)+(-0.835086989851)
-        ref[0,3,0]=o*(-0.256476478337)*x_ref[0]**(o-1)+(-0.857686365148)
-        ref[0,3,1]=o*(-0.309306419219)*x_ref[1]**(o-1)+(0.750579112592)
-        ref[0,3,2]=o*(0.758254577714)*x_ref[2]**(o-1)+(0.108972886739)
-        ref[0,4,0]=o*(0.189540467853)*x_ref[0]**(o-1)+(-0.639906129587)
-        ref[0,4,1]=o*(0.1086564431)*x_ref[1]**(o-1)+(-0.254754163159)
-        ref[0,4,2]=o*(-0.595415956315)*x_ref[2]**(o-1)+(0.416643698623)
-        ref[1,0,0]=o*(0.649640741159)*x_ref[0]**(o-1)+(-0.715604744977)
-        ref[1,0,1]=o*(0.144698127223)*x_ref[1]**(o-1)+(0.84058008507)
-        ref[1,0,2]=o*(0.00226738664623)*x_ref[2]**(o-1)+(0.143092105366)
-        ref[1,1,0]=o*(0.30428097785)*x_ref[0]**(o-1)+(0.172630542192)
-        ref[1,1,1]=o*(0.645118113075)*x_ref[1]**(o-1)+(-0.394468022223)
-        ref[1,1,2]=o*(0.731670923192)*x_ref[2]**(o-1)+(-0.676021495379)
-        ref[1,2,0]=o*(0.56459927889)*x_ref[0]**(o-1)+(-0.624980053566)
-        ref[1,2,1]=o*(-0.524836958708)*x_ref[1]**(o-1)+(0.282862320474)
-        ref[1,2,2]=o*(0.99070455422)*x_ref[2]**(o-1)+(0.000265746399286)
-        ref[1,3,0]=o*(-0.251929813217)*x_ref[0]**(o-1)+(0.00685246758491)
-        ref[1,3,1]=o*(-0.252595929082)*x_ref[1]**(o-1)+(-0.997558334417)
-        ref[1,3,2]=o*(-0.431329146194)*x_ref[2]**(o-1)+(0.0685298495116)
-        ref[1,4,0]=o*(-0.850398225165)*x_ref[0]**(o-1)+(-0.752363025861)
-        ref[1,4,1]=o*(-0.669448553729)*x_ref[1]**(o-1)+(0.809247179374)
-        ref[1,4,2]=o*(-0.927467807251)*x_ref[2]**(o-1)+(-0.498094160268)
-        ref[2,0,0]=o*(0.541736859663)*x_ref[0]**(o-1)+(-0.651273876855)
-        ref[2,0,1]=o*(-0.679670779769)*x_ref[1]**(o-1)+(0.669564679419)
-        ref[2,0,2]=o*(-0.825048237017)*x_ref[2]**(o-1)+(-0.247744537755)
-        ref[2,1,0]=o*(0.909016713138)*x_ref[0]**(o-1)+(-0.794124179572)
-        ref[2,1,1]=o*(0.887294650854)*x_ref[1]**(o-1)+(-0.198933351435)
-        ref[2,1,2]=o*(-0.819671062456)*x_ref[2]**(o-1)+(0.287455634612)
-        ref[2,2,0]=o*(-0.469337238665)*x_ref[0]**(o-1)+(0.787828984218)
-        ref[2,2,1]=o*(0.916042829702)*x_ref[1]**(o-1)+(-0.475983675757)
-        ref[2,2,2]=o*(-0.350660319046)*x_ref[2]**(o-1)+(0.944222119413)
-        ref[2,3,0]=o*(-0.194629035155)*x_ref[0]**(o-1)+(0.452058614199)
-        ref[2,3,1]=o*(-0.565150768916)*x_ref[1]**(o-1)+(-0.967642852138)
-        ref[2,3,2]=o*(-0.345332973443)*x_ref[2]**(o-1)+(-0.238359110833)
-        ref[2,4,0]=o*(-0.744197369952)*x_ref[0]**(o-1)+(-0.0161450929106)
-        ref[2,4,1]=o*(0.946555120156)*x_ref[1]**(o-1)+(-0.336314723492)
-        ref[2,4,2]=o*(0.212936909808)*x_ref[2]**(o-1)+(-0.900582293569)
-        ref[3,0,0]=o*(0.90736518985)*x_ref[0]**(o-1)+(-0.866096443075)
-        ref[3,0,1]=o*(0.440227521532)*x_ref[1]**(o-1)+(-0.545983384676)
-        ref[3,0,2]=o*(0.433167375756)*x_ref[2]**(o-1)+(-0.913060961228)
-        ref[3,1,0]=o*(0.33547032327)*x_ref[0]**(o-1)+(0.766388218896)
-        ref[3,1,1]=o*(-0.386141806114)*x_ref[1]**(o-1)+(0.28471049668)
-        ref[3,1,2]=o*(0.389347155974)*x_ref[2]**(o-1)+(0.211663215285)
-        ref[3,2,0]=o*(0.193757801099)*x_ref[0]**(o-1)+(0.0145439587225)
-        ref[3,2,1]=o*(0.575506295918)*x_ref[1]**(o-1)+(-0.678317336021)
-        ref[3,2,2]=o*(0.64603157052)*x_ref[2]**(o-1)+(-0.876667949279)
-        ref[3,3,0]=o*(-0.0518002857411)*x_ref[0]**(o-1)+(-0.540021971724)
-        ref[3,3,1]=o*(-0.490275636747)*x_ref[1]**(o-1)+(-0.849147647677)
-        ref[3,3,2]=o*(-0.0132783508877)*x_ref[2]**(o-1)+(0.0859860768541)
-        ref[3,4,0]=o*(-0.332675003425)*x_ref[0]**(o-1)+(-0.757986125506)
-        ref[3,4,1]=o*(-0.487001539705)*x_ref[1]**(o-1)+(0.898881577697)
-        ref[3,4,2]=o*(0.56557767007)*x_ref[2]**(o-1)+(0.181594113977)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactZero
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.568278554396)*x[0]**o+(0.714635312506)*x[0]+(-0.121000061881)*x[1]**o+(0.650923087629)*x[1]
-        arg[0,0,1]=(0.610070747198)*x[0]**o+(-0.17228586298)*x[0]+(-0.763207252556)*x[1]**o+(-0.417620736844)*x[1]
-        arg[0,1,0]=(0.953437717333)*x[0]**o+(-0.877858891638)*x[0]+(-0.629855255168)*x[1]**o+(0.138168708132)*x[1]
-        arg[0,1,1]=(-0.676346259275)*x[0]**o+(0.810400719592)*x[0]+(0.252517037374)*x[1]**o+(-0.0253025825974)*x[1]
-        arg[1,0,0]=(0.0354009852553)*x[0]**o+(-0.930486981217)*x[0]+(0.515533244848)*x[1]**o+(0.39357313927)*x[1]
-        arg[1,0,1]=(4.954730054e-05)*x[0]**o+(0.902841279458)*x[0]+(0.0974175050415)*x[1]**o+(-0.283224733511)*x[1]
-        arg[1,1,0]=(-0.3695113121)*x[0]**o+(-0.425976895152)*x[0]+(-0.752863101988)*x[1]**o+(-0.135026977845)*x[1]
-        arg[1,1,1]=(-0.627750038208)*x[0]**o+(-0.682825202306)*x[0]+(0.598327522753)*x[1]**o+(0.0402698525348)*x[1]
-        arg[2,0,0]=(0.95982907811)*x[0]**o+(-0.786158711751)*x[0]+(0.6974717418)*x[1]**o+(-0.548248895713)*x[1]
-        arg[2,0,1]=(-0.21063630362)*x[0]**o+(-0.979628903483)*x[0]+(0.514851452559)*x[1]**o+(-0.294218784425)*x[1]
-        arg[2,1,0]=(-0.446140926476)*x[0]**o+(0.658918134389)*x[0]+(-0.166087456007)*x[1]**o+(0.328044805625)*x[1]
-        arg[2,1,1]=(0.937161634589)*x[0]**o+(0.594322457074)*x[0]+(0.992336676032)*x[1]**o+(-0.499637100315)*x[1]
-        arg[3,0,0]=(0.767677974163)*x[0]**o+(-0.820615663298)*x[0]+(0.558185245925)*x[1]**o+(-0.763525476816)*x[1]
-        arg[3,0,1]=(-0.866581629552)*x[0]**o+(0.589993777037)*x[0]+(-0.0704817160146)*x[1]**o+(-0.897469280048)*x[1]
-        arg[3,1,0]=(-0.290118027748)*x[0]**o+(0.211790364383)*x[0]+(-0.0688758465892)*x[1]**o+(0.777490292219)*x[1]
-        arg[3,1,1]=(-0.969418722549)*x[0]**o+(-0.46884683812)*x[0]+(0.826696594862)*x[1]**o+(-0.926802811507)*x[1]
-        arg[4,0,0]=(-0.230285931083)*x[0]**o+(0.905695021426)*x[0]+(-0.581906633624)*x[1]**o+(-0.69277147014)*x[1]
-        arg[4,0,1]=(-0.251350536276)*x[0]**o+(0.352877501605)*x[0]+(0.290432460788)*x[1]**o+(0.614218150117)*x[1]
-        arg[4,1,0]=(-0.475014635407)*x[0]**o+(0.86786497963)*x[0]+(-0.763349511499)*x[1]**o+(0.817847286727)*x[1]
-        arg[4,1,1]=(0.0079711463132)*x[0]**o+(-0.20685339926)*x[0]+(0.377467915936)*x[1]**o+(-0.209268733968)*x[1]
-        arg[5,0,0]=(0.795790630791)*x[0]**o+(0.0661201279192)*x[0]+(0.932665258262)*x[1]**o+(-0.4785884914)*x[1]
-        arg[5,0,1]=(0.929422646068)*x[0]**o+(0.775378282324)*x[0]+(0.297482039582)*x[1]**o+(-0.700872789842)*x[1]
-        arg[5,1,0]=(0.678688297204)*x[0]**o+(0.365975847321)*x[0]+(-0.565261107289)*x[1]**o+(0.0317556604619)*x[1]
-        arg[5,1,1]=(-0.0231297032408)*x[0]**o+(-0.985865541949)*x[0]+(0.733821736669)*x[1]**o+(0.603255951212)*x[1]
-        ref[0,0,0,0]=o*(0.568278554396)*x_ref[0]**(o-1)+(0.714635312506)
-        ref[0,0,0,1]=o*(-0.121000061881)*x_ref[1]**(o-1)+(0.650923087629)
-        ref[0,0,1,0]=o*(0.610070747198)*x_ref[0]**(o-1)+(-0.17228586298)
-        ref[0,0,1,1]=o*(-0.763207252556)*x_ref[1]**(o-1)+(-0.417620736844)
-        ref[0,1,0,0]=o*(0.953437717333)*x_ref[0]**(o-1)+(-0.877858891638)
-        ref[0,1,0,1]=o*(-0.629855255168)*x_ref[1]**(o-1)+(0.138168708132)
-        ref[0,1,1,0]=o*(-0.676346259275)*x_ref[0]**(o-1)+(0.810400719592)
-        ref[0,1,1,1]=o*(0.252517037374)*x_ref[1]**(o-1)+(-0.0253025825974)
-        ref[1,0,0,0]=o*(0.0354009852553)*x_ref[0]**(o-1)+(-0.930486981217)
-        ref[1,0,0,1]=o*(0.515533244848)*x_ref[1]**(o-1)+(0.39357313927)
-        ref[1,0,1,0]=o*(4.954730054e-05)*x_ref[0]**(o-1)+(0.902841279458)
-        ref[1,0,1,1]=o*(0.0974175050415)*x_ref[1]**(o-1)+(-0.283224733511)
-        ref[1,1,0,0]=o*(-0.3695113121)*x_ref[0]**(o-1)+(-0.425976895152)
-        ref[1,1,0,1]=o*(-0.752863101988)*x_ref[1]**(o-1)+(-0.135026977845)
-        ref[1,1,1,0]=o*(-0.627750038208)*x_ref[0]**(o-1)+(-0.682825202306)
-        ref[1,1,1,1]=o*(0.598327522753)*x_ref[1]**(o-1)+(0.0402698525348)
-        ref[2,0,0,0]=o*(0.95982907811)*x_ref[0]**(o-1)+(-0.786158711751)
-        ref[2,0,0,1]=o*(0.6974717418)*x_ref[1]**(o-1)+(-0.548248895713)
-        ref[2,0,1,0]=o*(-0.21063630362)*x_ref[0]**(o-1)+(-0.979628903483)
-        ref[2,0,1,1]=o*(0.514851452559)*x_ref[1]**(o-1)+(-0.294218784425)
-        ref[2,1,0,0]=o*(-0.446140926476)*x_ref[0]**(o-1)+(0.658918134389)
-        ref[2,1,0,1]=o*(-0.166087456007)*x_ref[1]**(o-1)+(0.328044805625)
-        ref[2,1,1,0]=o*(0.937161634589)*x_ref[0]**(o-1)+(0.594322457074)
-        ref[2,1,1,1]=o*(0.992336676032)*x_ref[1]**(o-1)+(-0.499637100315)
-        ref[3,0,0,0]=o*(0.767677974163)*x_ref[0]**(o-1)+(-0.820615663298)
-        ref[3,0,0,1]=o*(0.558185245925)*x_ref[1]**(o-1)+(-0.763525476816)
-        ref[3,0,1,0]=o*(-0.866581629552)*x_ref[0]**(o-1)+(0.589993777037)
-        ref[3,0,1,1]=o*(-0.0704817160146)*x_ref[1]**(o-1)+(-0.897469280048)
-        ref[3,1,0,0]=o*(-0.290118027748)*x_ref[0]**(o-1)+(0.211790364383)
-        ref[3,1,0,1]=o*(-0.0688758465892)*x_ref[1]**(o-1)+(0.777490292219)
-        ref[3,1,1,0]=o*(-0.969418722549)*x_ref[0]**(o-1)+(-0.46884683812)
-        ref[3,1,1,1]=o*(0.826696594862)*x_ref[1]**(o-1)+(-0.926802811507)
-        ref[4,0,0,0]=o*(-0.230285931083)*x_ref[0]**(o-1)+(0.905695021426)
-        ref[4,0,0,1]=o*(-0.581906633624)*x_ref[1]**(o-1)+(-0.69277147014)
-        ref[4,0,1,0]=o*(-0.251350536276)*x_ref[0]**(o-1)+(0.352877501605)
-        ref[4,0,1,1]=o*(0.290432460788)*x_ref[1]**(o-1)+(0.614218150117)
-        ref[4,1,0,0]=o*(-0.475014635407)*x_ref[0]**(o-1)+(0.86786497963)
-        ref[4,1,0,1]=o*(-0.763349511499)*x_ref[1]**(o-1)+(0.817847286727)
-        ref[4,1,1,0]=o*(0.0079711463132)*x_ref[0]**(o-1)+(-0.20685339926)
-        ref[4,1,1,1]=o*(0.377467915936)*x_ref[1]**(o-1)+(-0.209268733968)
-        ref[5,0,0,0]=o*(0.795790630791)*x_ref[0]**(o-1)+(0.0661201279192)
-        ref[5,0,0,1]=o*(0.932665258262)*x_ref[1]**(o-1)+(-0.4785884914)
-        ref[5,0,1,0]=o*(0.929422646068)*x_ref[0]**(o-1)+(0.775378282324)
-        ref[5,0,1,1]=o*(0.297482039582)*x_ref[1]**(o-1)+(-0.700872789842)
-        ref[5,1,0,0]=o*(0.678688297204)*x_ref[0]**(o-1)+(0.365975847321)
-        ref[5,1,0,1]=o*(-0.565261107289)*x_ref[1]**(o-1)+(0.0317556604619)
-        ref[5,1,1,0]=o*(-0.0231297032408)*x_ref[0]**(o-1)+(-0.985865541949)
-        ref[5,1,1,1]=o*(0.733821736669)*x_ref[1]**(o-1)+(0.603255951212)
-      else:
-        arg[0,0,0]=(-0.211459759219)*x[0]**o+(-0.577684864446)*x[0]+(-0.391603126843)*x[1]**o+(0.260321825768)*x[1]+(-0.314038207978)*x[2]**o+(-0.981440041663)*x[2]
-        arg[0,0,1]=(-0.876053365684)*x[0]**o+(-0.194899445893)*x[0]+(0.346950377505)*x[1]**o+(0.571865696578)*x[1]+(0.632901527485)*x[2]**o+(0.832258490904)*x[2]
-        arg[0,1,0]=(-0.0779003885155)*x[0]**o+(0.583384314998)*x[0]+(-0.257262737021)*x[1]**o+(0.456730130081)*x[1]+(0.262812418811)*x[2]**o+(0.0815640391979)*x[2]
-        arg[0,1,1]=(0.087484387098)*x[0]**o+(-0.415375968565)*x[0]+(0.31138114792)*x[1]**o+(0.832138685168)*x[1]+(0.552625436456)*x[2]**o+(-0.0969172211154)*x[2]
-        arg[1,0,0]=(0.721326796741)*x[0]**o+(-0.556644260079)*x[0]+(0.14718294664)*x[1]**o+(0.688425309252)*x[1]+(-0.16480505764)*x[2]**o+(-0.914914176523)*x[2]
-        arg[1,0,1]=(0.0932763269908)*x[0]**o+(0.359036469617)*x[0]+(0.568509073358)*x[1]**o+(-0.42133310351)*x[1]+(0.576833556667)*x[2]**o+(0.44466763296)*x[2]
-        arg[1,1,0]=(0.564028751408)*x[0]**o+(-0.314840429631)*x[0]+(-0.910523044917)*x[1]**o+(-0.0377714078758)*x[1]+(0.0125836031881)*x[2]**o+(0.602273699833)*x[2]
-        arg[1,1,1]=(0.135282471986)*x[0]**o+(0.163613895979)*x[0]+(0.115685034139)*x[1]**o+(-0.687078382924)*x[1]+(0.406385459521)*x[2]**o+(-0.401846794432)*x[2]
-        arg[2,0,0]=(0.815695969791)*x[0]**o+(0.312205723135)*x[0]+(0.993404535838)*x[1]**o+(0.101946422158)*x[1]+(-0.331818829998)*x[2]**o+(-0.0034480605816)*x[2]
-        arg[2,0,1]=(0.638646208966)*x[0]**o+(0.265838992948)*x[0]+(0.156594972273)*x[1]**o+(0.935292984535)*x[1]+(-0.930522319399)*x[2]**o+(0.540679813135)*x[2]
-        arg[2,1,0]=(-0.778823826824)*x[0]**o+(0.435399707656)*x[0]+(0.123031900278)*x[1]**o+(-0.132556439303)*x[1]+(-0.29114590778)*x[2]**o+(-0.277636472779)*x[2]
-        arg[2,1,1]=(-0.200541347963)*x[0]**o+(-0.526841282198)*x[0]+(0.670718267305)*x[1]**o+(0.0777161510281)*x[1]+(0.847335718393)*x[2]**o+(0.167185849891)*x[2]
-        arg[3,0,0]=(0.481112023661)*x[0]**o+(-0.703558873662)*x[0]+(0.0661746324247)*x[1]**o+(0.0628113595423)*x[1]+(0.804110728888)*x[2]**o+(0.517297444342)*x[2]
-        arg[3,0,1]=(-0.44648091284)*x[0]**o+(-0.976332452987)*x[0]+(-0.886297355627)*x[1]**o+(-0.910033293533)*x[1]+(0.946007442337)*x[2]**o+(-0.586006699603)*x[2]
-        arg[3,1,0]=(0.686532047098)*x[0]**o+(0.647146535444)*x[0]+(-0.424413819624)*x[1]**o+(-0.266078497115)*x[1]+(-0.656118336723)*x[2]**o+(0.902145487914)*x[2]
-        arg[3,1,1]=(-0.0562438759603)*x[0]**o+(0.600872472135)*x[0]+(-0.162016187788)*x[1]**o+(-0.685387926)*x[1]+(-0.899318041513)*x[2]**o+(0.459743174318)*x[2]
-        arg[4,0,0]=(-0.923373905806)*x[0]**o+(-0.0340303642214)*x[0]+(-0.798971449517)*x[1]**o+(-0.45521271974)*x[1]+(-0.354501811953)*x[2]**o+(0.0668579007274)*x[2]
-        arg[4,0,1]=(0.411397784181)*x[0]**o+(0.112609440102)*x[0]+(0.352899973694)*x[1]**o+(-0.0728024007714)*x[1]+(0.50804391825)*x[2]**o+(0.748548958571)*x[2]
-        arg[4,1,0]=(0.875890044031)*x[0]**o+(0.674204747948)*x[0]+(-0.879286517401)*x[1]**o+(-0.00338161978492)*x[1]+(-0.372790489717)*x[2]**o+(0.480822881409)*x[2]
-        arg[4,1,1]=(-0.224827091498)*x[0]**o+(0.854170572245)*x[0]+(-0.670467931784)*x[1]**o+(0.85225464592)*x[1]+(0.41885719338)*x[2]**o+(-0.623296073831)*x[2]
-        arg[5,0,0]=(-0.662704253172)*x[0]**o+(0.690656552406)*x[0]+(-0.812436958497)*x[1]**o+(0.928013493065)*x[1]+(0.763792541097)*x[2]**o+(-0.430084528987)*x[2]
-        arg[5,0,1]=(0.451167682598)*x[0]**o+(0.373015986015)*x[0]+(0.73334610852)*x[1]**o+(0.44892130407)*x[1]+(0.820233215547)*x[2]**o+(0.863864357936)*x[2]
-        arg[5,1,0]=(-0.700840074185)*x[0]**o+(-0.637964737375)*x[0]+(0.0532062256138)*x[1]**o+(-0.902662868597)*x[1]+(-0.91668008633)*x[2]**o+(0.00253116545509)*x[2]
-        arg[5,1,1]=(0.0461834200484)*x[0]**o+(0.102406795193)*x[0]+(0.599142154957)*x[1]**o+(0.374585801545)*x[1]+(-0.444968156109)*x[2]**o+(-0.932860816729)*x[2]
-        ref[0,0,0,0]=o*(-0.211459759219)*x_ref[0]**(o-1)+(-0.577684864446)
-        ref[0,0,0,1]=o*(-0.391603126843)*x_ref[1]**(o-1)+(0.260321825768)
-        ref[0,0,0,2]=o*(-0.314038207978)*x_ref[2]**(o-1)+(-0.981440041663)
-        ref[0,0,1,0]=o*(-0.876053365684)*x_ref[0]**(o-1)+(-0.194899445893)
-        ref[0,0,1,1]=o*(0.346950377505)*x_ref[1]**(o-1)+(0.571865696578)
-        ref[0,0,1,2]=o*(0.632901527485)*x_ref[2]**(o-1)+(0.832258490904)
-        ref[0,1,0,0]=o*(-0.0779003885155)*x_ref[0]**(o-1)+(0.583384314998)
-        ref[0,1,0,1]=o*(-0.257262737021)*x_ref[1]**(o-1)+(0.456730130081)
-        ref[0,1,0,2]=o*(0.262812418811)*x_ref[2]**(o-1)+(0.0815640391979)
-        ref[0,1,1,0]=o*(0.087484387098)*x_ref[0]**(o-1)+(-0.415375968565)
-        ref[0,1,1,1]=o*(0.31138114792)*x_ref[1]**(o-1)+(0.832138685168)
-        ref[0,1,1,2]=o*(0.552625436456)*x_ref[2]**(o-1)+(-0.0969172211154)
-        ref[1,0,0,0]=o*(0.721326796741)*x_ref[0]**(o-1)+(-0.556644260079)
-        ref[1,0,0,1]=o*(0.14718294664)*x_ref[1]**(o-1)+(0.688425309252)
-        ref[1,0,0,2]=o*(-0.16480505764)*x_ref[2]**(o-1)+(-0.914914176523)
-        ref[1,0,1,0]=o*(0.0932763269908)*x_ref[0]**(o-1)+(0.359036469617)
-        ref[1,0,1,1]=o*(0.568509073358)*x_ref[1]**(o-1)+(-0.42133310351)
-        ref[1,0,1,2]=o*(0.576833556667)*x_ref[2]**(o-1)+(0.44466763296)
-        ref[1,1,0,0]=o*(0.564028751408)*x_ref[0]**(o-1)+(-0.314840429631)
-        ref[1,1,0,1]=o*(-0.910523044917)*x_ref[1]**(o-1)+(-0.0377714078758)
-        ref[1,1,0,2]=o*(0.0125836031881)*x_ref[2]**(o-1)+(0.602273699833)
-        ref[1,1,1,0]=o*(0.135282471986)*x_ref[0]**(o-1)+(0.163613895979)
-        ref[1,1,1,1]=o*(0.115685034139)*x_ref[1]**(o-1)+(-0.687078382924)
-        ref[1,1,1,2]=o*(0.406385459521)*x_ref[2]**(o-1)+(-0.401846794432)
-        ref[2,0,0,0]=o*(0.815695969791)*x_ref[0]**(o-1)+(0.312205723135)
-        ref[2,0,0,1]=o*(0.993404535838)*x_ref[1]**(o-1)+(0.101946422158)
-        ref[2,0,0,2]=o*(-0.331818829998)*x_ref[2]**(o-1)+(-0.0034480605816)
-        ref[2,0,1,0]=o*(0.638646208966)*x_ref[0]**(o-1)+(0.265838992948)
-        ref[2,0,1,1]=o*(0.156594972273)*x_ref[1]**(o-1)+(0.935292984535)
-        ref[2,0,1,2]=o*(-0.930522319399)*x_ref[2]**(o-1)+(0.540679813135)
-        ref[2,1,0,0]=o*(-0.778823826824)*x_ref[0]**(o-1)+(0.435399707656)
-        ref[2,1,0,1]=o*(0.123031900278)*x_ref[1]**(o-1)+(-0.132556439303)
-        ref[2,1,0,2]=o*(-0.29114590778)*x_ref[2]**(o-1)+(-0.277636472779)
-        ref[2,1,1,0]=o*(-0.200541347963)*x_ref[0]**(o-1)+(-0.526841282198)
-        ref[2,1,1,1]=o*(0.670718267305)*x_ref[1]**(o-1)+(0.0777161510281)
-        ref[2,1,1,2]=o*(0.847335718393)*x_ref[2]**(o-1)+(0.167185849891)
-        ref[3,0,0,0]=o*(0.481112023661)*x_ref[0]**(o-1)+(-0.703558873662)
-        ref[3,0,0,1]=o*(0.0661746324247)*x_ref[1]**(o-1)+(0.0628113595423)
-        ref[3,0,0,2]=o*(0.804110728888)*x_ref[2]**(o-1)+(0.517297444342)
-        ref[3,0,1,0]=o*(-0.44648091284)*x_ref[0]**(o-1)+(-0.976332452987)
-        ref[3,0,1,1]=o*(-0.886297355627)*x_ref[1]**(o-1)+(-0.910033293533)
-        ref[3,0,1,2]=o*(0.946007442337)*x_ref[2]**(o-1)+(-0.586006699603)
-        ref[3,1,0,0]=o*(0.686532047098)*x_ref[0]**(o-1)+(0.647146535444)
-        ref[3,1,0,1]=o*(-0.424413819624)*x_ref[1]**(o-1)+(-0.266078497115)
-        ref[3,1,0,2]=o*(-0.656118336723)*x_ref[2]**(o-1)+(0.902145487914)
-        ref[3,1,1,0]=o*(-0.0562438759603)*x_ref[0]**(o-1)+(0.600872472135)
-        ref[3,1,1,1]=o*(-0.162016187788)*x_ref[1]**(o-1)+(-0.685387926)
-        ref[3,1,1,2]=o*(-0.899318041513)*x_ref[2]**(o-1)+(0.459743174318)
-        ref[4,0,0,0]=o*(-0.923373905806)*x_ref[0]**(o-1)+(-0.0340303642214)
-        ref[4,0,0,1]=o*(-0.798971449517)*x_ref[1]**(o-1)+(-0.45521271974)
-        ref[4,0,0,2]=o*(-0.354501811953)*x_ref[2]**(o-1)+(0.0668579007274)
-        ref[4,0,1,0]=o*(0.411397784181)*x_ref[0]**(o-1)+(0.112609440102)
-        ref[4,0,1,1]=o*(0.352899973694)*x_ref[1]**(o-1)+(-0.0728024007714)
-        ref[4,0,1,2]=o*(0.50804391825)*x_ref[2]**(o-1)+(0.748548958571)
-        ref[4,1,0,0]=o*(0.875890044031)*x_ref[0]**(o-1)+(0.674204747948)
-        ref[4,1,0,1]=o*(-0.879286517401)*x_ref[1]**(o-1)+(-0.00338161978492)
-        ref[4,1,0,2]=o*(-0.372790489717)*x_ref[2]**(o-1)+(0.480822881409)
-        ref[4,1,1,0]=o*(-0.224827091498)*x_ref[0]**(o-1)+(0.854170572245)
-        ref[4,1,1,1]=o*(-0.670467931784)*x_ref[1]**(o-1)+(0.85225464592)
-        ref[4,1,1,2]=o*(0.41885719338)*x_ref[2]**(o-1)+(-0.623296073831)
-        ref[5,0,0,0]=o*(-0.662704253172)*x_ref[0]**(o-1)+(0.690656552406)
-        ref[5,0,0,1]=o*(-0.812436958497)*x_ref[1]**(o-1)+(0.928013493065)
-        ref[5,0,0,2]=o*(0.763792541097)*x_ref[2]**(o-1)+(-0.430084528987)
-        ref[5,0,1,0]=o*(0.451167682598)*x_ref[0]**(o-1)+(0.373015986015)
-        ref[5,0,1,1]=o*(0.73334610852)*x_ref[1]**(o-1)+(0.44892130407)
-        ref[5,0,1,2]=o*(0.820233215547)*x_ref[2]**(o-1)+(0.863864357936)
-        ref[5,1,0,0]=o*(-0.700840074185)*x_ref[0]**(o-1)+(-0.637964737375)
-        ref[5,1,0,1]=o*(0.0532062256138)*x_ref[1]**(o-1)+(-0.902662868597)
-        ref[5,1,0,2]=o*(-0.91668008633)*x_ref[2]**(o-1)+(0.00253116545509)
-        ref[5,1,1,0]=o*(0.0461834200484)*x_ref[0]**(o-1)+(0.102406795193)
-        ref[5,1,1,1]=o*(0.599142154957)*x_ref[1]**(o-1)+(0.374585801545)
-        ref[5,1,1,2]=o*(-0.444968156109)*x_ref[2]**(o-1)+(-0.932860816729)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(1.37238770251)*x[0]+(-1.43917937019)*x[1]
-        ref[0]=(1.37238770251)
-        ref[1]=(-1.43917937019)
-      else:
-        arg=(0.951563810847)*x[0]+(-1.91408943437)*x[1]+(0.233861671105)*x[2]
-        ref[0]=(0.951563810847)
-        ref[1]=(-1.91408943437)
-        ref[2]=(0.233861671105)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.42921344972)*x[0]+(-0.911436505176)*x[1]
-        arg[1]=(1.25688300316)*x[0]+(0.0536640238292)*x[1]
-        ref[0,0]=(1.42921344972)
-        ref[0,1]=(-0.911436505176)
-        ref[1,0]=(1.25688300316)
-        ref[1,1]=(0.0536640238292)
-      else:
-        arg[0]=(-1.57773112011)*x[0]+(-0.697311790617)*x[1]+(-0.480770363787)*x[2]
-        arg[1]=(-0.136063655594)*x[0]+(0.882253548646)*x[1]+(1.35773570995)*x[2]
-        ref[0,0]=(-1.57773112011)
-        ref[0,1]=(-0.697311790617)
-        ref[0,2]=(-0.480770363787)
-        ref[1,0]=(-0.136063655594)
-        ref[1,1]=(0.882253548646)
-        ref[1,2]=(1.35773570995)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.448247291087)*x[0]+(-0.00880442943882)*x[1]
-        arg[0,1]=(-0.59784234455)*x[0]+(-0.94951606979)*x[1]
-        arg[0,2]=(1.38316656933)*x[0]+(-0.124817047005)*x[1]
-        arg[0,3]=(-0.0748469893414)*x[0]+(1.44145142047)*x[1]
-        arg[0,4]=(1.81133385456)*x[0]+(-0.518406894403)*x[1]
-        arg[1,0]=(-0.65460152624)*x[0]+(-0.350858526434)*x[1]
-        arg[1,1]=(0.924058009558)*x[0]+(-0.40973995895)*x[1]
-        arg[1,2]=(-0.299794705178)*x[0]+(-0.924557696915)*x[1]
-        arg[1,3]=(-0.608513627169)*x[0]+(-0.141936714389)*x[1]
-        arg[1,4]=(0.469099778997)*x[0]+(0.754132353456)*x[1]
-        arg[2,0]=(-0.627098551951)*x[0]+(0.476865448119)*x[1]
-        arg[2,1]=(-1.03564375134)*x[0]+(-0.280009187543)*x[1]
-        arg[2,2]=(0.475083576156)*x[0]+(0.220248066616)*x[1]
-        arg[2,3]=(0.0420499398173)*x[0]+(0.0808105284548)*x[1]
-        arg[2,4]=(0.368173655662)*x[0]+(-0.58266909961)*x[1]
-        arg[3,0]=(0.450851110298)*x[0]+(0.0844590226087)*x[1]
-        arg[3,1]=(0.508010554654)*x[0]+(0.797109833792)*x[1]
-        arg[3,2]=(0.711479388001)*x[0]+(1.12829906729)*x[1]
-        arg[3,3]=(0.0588799697153)*x[0]+(-0.991874826409)*x[1]
-        arg[3,4]=(0.743446045536)*x[0]+(0.65754450588)*x[1]
-        ref[0,0,0]=(0.448247291087)
-        ref[0,0,1]=(-0.00880442943882)
-        ref[0,1,0]=(-0.59784234455)
-        ref[0,1,1]=(-0.94951606979)
-        ref[0,2,0]=(1.38316656933)
-        ref[0,2,1]=(-0.124817047005)
-        ref[0,3,0]=(-0.0748469893414)
-        ref[0,3,1]=(1.44145142047)
-        ref[0,4,0]=(1.81133385456)
-        ref[0,4,1]=(-0.518406894403)
-        ref[1,0,0]=(-0.65460152624)
-        ref[1,0,1]=(-0.350858526434)
-        ref[1,1,0]=(0.924058009558)
-        ref[1,1,1]=(-0.40973995895)
-        ref[1,2,0]=(-0.299794705178)
-        ref[1,2,1]=(-0.924557696915)
-        ref[1,3,0]=(-0.608513627169)
-        ref[1,3,1]=(-0.141936714389)
-        ref[1,4,0]=(0.469099778997)
-        ref[1,4,1]=(0.754132353456)
-        ref[2,0,0]=(-0.627098551951)
-        ref[2,0,1]=(0.476865448119)
-        ref[2,1,0]=(-1.03564375134)
-        ref[2,1,1]=(-0.280009187543)
-        ref[2,2,0]=(0.475083576156)
-        ref[2,2,1]=(0.220248066616)
-        ref[2,3,0]=(0.0420499398173)
-        ref[2,3,1]=(0.0808105284548)
-        ref[2,4,0]=(0.368173655662)
-        ref[2,4,1]=(-0.58266909961)
-        ref[3,0,0]=(0.450851110298)
-        ref[3,0,1]=(0.0844590226087)
-        ref[3,1,0]=(0.508010554654)
-        ref[3,1,1]=(0.797109833792)
-        ref[3,2,0]=(0.711479388001)
-        ref[3,2,1]=(1.12829906729)
-        ref[3,3,0]=(0.0588799697153)
-        ref[3,3,1]=(-0.991874826409)
-        ref[3,4,0]=(0.743446045536)
-        ref[3,4,1]=(0.65754450588)
-      else:
-        arg[0,0]=(-0.43386387868)*x[0]+(0.321105491776)*x[1]+(0.384206679414)*x[2]
-        arg[0,1]=(0.604698878149)*x[0]+(0.594375439325)*x[1]+(0.162832272176)*x[2]
-        arg[0,2]=(-0.332194829416)*x[0]+(0.600821281937)*x[1]+(0.493622302813)*x[2]
-        arg[0,3]=(0.846367268698)*x[0]+(-1.32744832381)*x[1]+(0.00466654421944)*x[2]
-        arg[0,4]=(0.385111950936)*x[0]+(-0.176705693397)*x[1]+(0.461732370075)*x[2]
-        arg[1,0]=(-0.14529643778)*x[0]+(1.15329219838)*x[1]+(0.157842247326)*x[2]
-        arg[1,1]=(0.00817149012591)*x[0]+(-0.703898404732)*x[1]+(-1.14419500663)*x[2]
-        arg[1,2]=(-0.124155034423)*x[0]+(0.906000496919)*x[1]+(-0.466071596735)*x[2]
-        arg[1,3]=(0.413190740147)*x[0]+(0.968639404637)*x[1]+(-1.25413312698)*x[2]
-        arg[1,4]=(0.521974966379)*x[0]+(0.936384991187)*x[1]+(-0.0630547476157)*x[2]
-        arg[2,0]=(-0.334976510608)*x[0]+(-0.268364721371)*x[1]+(0.806974769679)*x[2]
-        arg[2,1]=(-0.0672705162033)*x[0]+(0.459808873839)*x[1]+(0.0725634327358)*x[2]
-        arg[2,2]=(0.142418012401)*x[0]+(-0.400301432498)*x[1]+(-1.37021128371)*x[2]
-        arg[2,3]=(-1.60617980561)*x[0]+(0.0686943218654)*x[1]+(0.647509287658)*x[2]
-        arg[2,4]=(0.0102366197695)*x[0]+(-1.24104511219)*x[1]+(-0.739463479584)*x[2]
-        arg[3,0]=(-0.425526939568)*x[0]+(-0.946421307227)*x[1]+(0.133101457377)*x[2]
-        arg[3,1]=(1.07183638389)*x[0]+(-1.21405997903)*x[1]+(-0.962984008606)*x[2]
-        arg[3,2]=(-0.913456686897)*x[0]+(0.907233128077)*x[1]+(0.581609247137)*x[2]
-        arg[3,3]=(-0.729544885457)*x[0]+(-0.433435638004)*x[1]+(0.357011166494)*x[2]
-        arg[3,4]=(1.21906931308)*x[0]+(0.322487716786)*x[1]+(1.05602783674)*x[2]
-        ref[0,0,0]=(-0.43386387868)
-        ref[0,0,1]=(0.321105491776)
-        ref[0,0,2]=(0.384206679414)
-        ref[0,1,0]=(0.604698878149)
-        ref[0,1,1]=(0.594375439325)
-        ref[0,1,2]=(0.162832272176)
-        ref[0,2,0]=(-0.332194829416)
-        ref[0,2,1]=(0.600821281937)
-        ref[0,2,2]=(0.493622302813)
-        ref[0,3,0]=(0.846367268698)
-        ref[0,3,1]=(-1.32744832381)
-        ref[0,3,2]=(0.00466654421944)
-        ref[0,4,0]=(0.385111950936)
-        ref[0,4,1]=(-0.176705693397)
-        ref[0,4,2]=(0.461732370075)
-        ref[1,0,0]=(-0.14529643778)
-        ref[1,0,1]=(1.15329219838)
-        ref[1,0,2]=(0.157842247326)
-        ref[1,1,0]=(0.00817149012591)
-        ref[1,1,1]=(-0.703898404732)
-        ref[1,1,2]=(-1.14419500663)
-        ref[1,2,0]=(-0.124155034423)
-        ref[1,2,1]=(0.906000496919)
-        ref[1,2,2]=(-0.466071596735)
-        ref[1,3,0]=(0.413190740147)
-        ref[1,3,1]=(0.968639404637)
-        ref[1,3,2]=(-1.25413312698)
-        ref[1,4,0]=(0.521974966379)
-        ref[1,4,1]=(0.936384991187)
-        ref[1,4,2]=(-0.0630547476157)
-        ref[2,0,0]=(-0.334976510608)
-        ref[2,0,1]=(-0.268364721371)
-        ref[2,0,2]=(0.806974769679)
-        ref[2,1,0]=(-0.0672705162033)
-        ref[2,1,1]=(0.459808873839)
-        ref[2,1,2]=(0.0725634327358)
-        ref[2,2,0]=(0.142418012401)
-        ref[2,2,1]=(-0.400301432498)
-        ref[2,2,2]=(-1.37021128371)
-        ref[2,3,0]=(-1.60617980561)
-        ref[2,3,1]=(0.0686943218654)
-        ref[2,3,2]=(0.647509287658)
-        ref[2,4,0]=(0.0102366197695)
-        ref[2,4,1]=(-1.24104511219)
-        ref[2,4,2]=(-0.739463479584)
-        ref[3,0,0]=(-0.425526939568)
-        ref[3,0,1]=(-0.946421307227)
-        ref[3,0,2]=(0.133101457377)
-        ref[3,1,0]=(1.07183638389)
-        ref[3,1,1]=(-1.21405997903)
-        ref[3,1,2]=(-0.962984008606)
-        ref[3,2,0]=(-0.913456686897)
-        ref[3,2,1]=(0.907233128077)
-        ref[3,2,2]=(0.581609247137)
-        ref[3,3,0]=(-0.729544885457)
-        ref[3,3,1]=(-0.433435638004)
-        ref[3,3,2]=(0.357011166494)
-        ref[3,4,0]=(1.21906931308)
-        ref[3,4,1]=(0.322487716786)
-        ref[3,4,2]=(1.05602783674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.287546203823)*x[0]+(0.390321729967)*x[1]
-        arg[0,0,1]=(-0.112653571553)*x[0]+(-0.359753186922)*x[1]
-        arg[0,1,0]=(0.00656985674969)*x[0]+(-0.397210304393)*x[1]
-        arg[0,1,1]=(-0.825698431533)*x[0]+(-1.20994477496)*x[1]
-        arg[1,0,0]=(0.0456789352898)*x[0]+(0.201178709355)*x[1]
-        arg[1,0,1]=(0.216619650199)*x[0]+(-0.684237394127)*x[1]
-        arg[1,1,0]=(-0.452605086273)*x[0]+(0.383220784575)*x[1]
-        arg[1,1,1]=(-0.385315869703)*x[0]+(-1.25937320051)*x[1]
-        arg[2,0,0]=(-0.546290546777)*x[0]+(0.0659124729108)*x[1]
-        arg[2,0,1]=(0.23413834434)*x[0]+(0.241510050424)*x[1]
-        arg[2,1,0]=(-0.541097368124)*x[0]+(0.458682016611)*x[1]
-        arg[2,1,1]=(0.314030173817)*x[0]+(0.083613884286)*x[1]
-        arg[3,0,0]=(0.862005271666)*x[0]+(0.858693755091)*x[1]
-        arg[3,0,1]=(-1.14220805291)*x[0]+(0.609875693913)*x[1]
-        arg[3,1,0]=(-0.847069360014)*x[0]+(0.240069314456)*x[1]
-        arg[3,1,1]=(0.480596211718)*x[0]+(-1.40901297384)*x[1]
-        arg[4,0,0]=(-1.38036653523)*x[0]+(-0.0732955000278)*x[1]
-        arg[4,0,1]=(0.0716061704803)*x[0]+(0.180127379412)*x[1]
-        arg[4,1,0]=(1.26959959862)*x[0]+(-1.38131896436)*x[1]
-        arg[4,1,1]=(0.204280361123)*x[0]+(0.532611514369)*x[1]
-        arg[5,0,0]=(0.209536293545)*x[0]+(-0.303994906788)*x[1]
-        arg[5,0,1]=(1.41150162289)*x[0]+(1.32515735407)*x[1]
-        arg[5,1,0]=(1.59736027384)*x[0]+(-0.711055564868)*x[1]
-        arg[5,1,1]=(-1.31799658024)*x[0]+(0.829209493108)*x[1]
-        ref[0,0,0,0]=(-0.287546203823)
-        ref[0,0,0,1]=(0.390321729967)
-        ref[0,0,1,0]=(-0.112653571553)
-        ref[0,0,1,1]=(-0.359753186922)
-        ref[0,1,0,0]=(0.00656985674969)
-        ref[0,1,0,1]=(-0.397210304393)
-        ref[0,1,1,0]=(-0.825698431533)
-        ref[0,1,1,1]=(-1.20994477496)
-        ref[1,0,0,0]=(0.0456789352898)
-        ref[1,0,0,1]=(0.201178709355)
-        ref[1,0,1,0]=(0.216619650199)
-        ref[1,0,1,1]=(-0.684237394127)
-        ref[1,1,0,0]=(-0.452605086273)
-        ref[1,1,0,1]=(0.383220784575)
-        ref[1,1,1,0]=(-0.385315869703)
-        ref[1,1,1,1]=(-1.25937320051)
-        ref[2,0,0,0]=(-0.546290546777)
-        ref[2,0,0,1]=(0.0659124729108)
-        ref[2,0,1,0]=(0.23413834434)
-        ref[2,0,1,1]=(0.241510050424)
-        ref[2,1,0,0]=(-0.541097368124)
-        ref[2,1,0,1]=(0.458682016611)
-        ref[2,1,1,0]=(0.314030173817)
-        ref[2,1,1,1]=(0.083613884286)
-        ref[3,0,0,0]=(0.862005271666)
-        ref[3,0,0,1]=(0.858693755091)
-        ref[3,0,1,0]=(-1.14220805291)
-        ref[3,0,1,1]=(0.609875693913)
-        ref[3,1,0,0]=(-0.847069360014)
-        ref[3,1,0,1]=(0.240069314456)
-        ref[3,1,1,0]=(0.480596211718)
-        ref[3,1,1,1]=(-1.40901297384)
-        ref[4,0,0,0]=(-1.38036653523)
-        ref[4,0,0,1]=(-0.0732955000278)
-        ref[4,0,1,0]=(0.0716061704803)
-        ref[4,0,1,1]=(0.180127379412)
-        ref[4,1,0,0]=(1.26959959862)
-        ref[4,1,0,1]=(-1.38131896436)
-        ref[4,1,1,0]=(0.204280361123)
-        ref[4,1,1,1]=(0.532611514369)
-        ref[5,0,0,0]=(0.209536293545)
-        ref[5,0,0,1]=(-0.303994906788)
-        ref[5,0,1,0]=(1.41150162289)
-        ref[5,0,1,1]=(1.32515735407)
-        ref[5,1,0,0]=(1.59736027384)
-        ref[5,1,0,1]=(-0.711055564868)
-        ref[5,1,1,0]=(-1.31799658024)
-        ref[5,1,1,1]=(0.829209493108)
-      else:
-        arg[0,0,0]=(0.832267408258)*x[0]+(-1.1995239623)*x[1]+(-1.81276973398)*x[2]
-        arg[0,0,1]=(-0.0125232856194)*x[0]+(0.122543918666)*x[1]+(-1.12411286836)*x[2]
-        arg[0,1,0]=(0.985611388383)*x[0]+(-1.17217207383)*x[1]+(-0.231241872108)*x[2]
-        arg[0,1,1]=(0.625494139449)*x[0]+(0.784802683192)*x[1]+(0.612764525973)*x[2]
-        arg[1,0,0]=(0.327644975022)*x[0]+(0.0552951801276)*x[1]+(-0.806887445103)*x[2]
-        arg[1,0,1]=(0.194338798022)*x[0]+(0.799902026341)*x[1]+(1.70164249741)*x[2]
-        arg[1,1,0]=(0.890832636865)*x[0]+(0.223899365292)*x[1]+(-0.283094526824)*x[2]
-        arg[1,1,1]=(-0.122108330088)*x[0]+(-0.293413695547)*x[1]+(-0.371581852879)*x[2]
-        arg[2,0,0]=(-0.469341678297)*x[0]+(0.152856292978)*x[1]+(0.765861314481)*x[2]
-        arg[2,0,1]=(0.249219162734)*x[0]+(0.319622173697)*x[1]+(-0.182998471546)*x[2]
-        arg[2,1,0]=(0.39687496584)*x[0]+(0.137084411978)*x[1]+(-0.34707250854)*x[2]
-        arg[2,1,1]=(-0.382391798519)*x[0]+(0.755317411547)*x[1]+(0.424204162929)*x[2]
-        arg[3,0,0]=(1.12637976255)*x[0]+(0.11632178776)*x[1]+(-0.615547388072)*x[2]
-        arg[3,0,1]=(-0.819303259446)*x[0]+(0.916951216368)*x[1]+(-0.572792050441)*x[2]
-        arg[3,1,0]=(0.194642055711)*x[0]+(0.949663114037)*x[1]+(-0.403001914682)*x[2]
-        arg[3,1,1]=(0.902547242635)*x[0]+(-1.04027936291)*x[1]+(-1.78463515221)*x[2]
-        arg[4,0,0]=(0.59060036737)*x[0]+(-0.580905638676)*x[1]+(-0.486098556884)*x[2]
-        arg[4,0,1]=(-0.330634605524)*x[0]+(-0.758140973629)*x[1]+(-0.192282397672)*x[2]
-        arg[4,1,0]=(1.40502801336)*x[0]+(0.199036161455)*x[1]+(-0.558660947885)*x[2]
-        arg[4,1,1]=(-0.155588274273)*x[0]+(-0.57050736529)*x[1]+(1.1998664442)*x[2]
-        arg[5,0,0]=(-0.754680865929)*x[0]+(1.29040984028)*x[1]+(-1.83778974463)*x[2]
-        arg[5,0,1]=(0.274692501647)*x[0]+(0.368546080921)*x[1]+(-0.446376269232)*x[2]
-        arg[5,1,0]=(-0.758704372861)*x[0]+(1.75555227426)*x[1]+(-0.13664688871)*x[2]
-        arg[5,1,1]=(-0.568468068187)*x[0]+(-0.320218561544)*x[1]+(-0.827795466031)*x[2]
-        ref[0,0,0,0]=(0.832267408258)
-        ref[0,0,0,1]=(-1.1995239623)
-        ref[0,0,0,2]=(-1.81276973398)
-        ref[0,0,1,0]=(-0.0125232856194)
-        ref[0,0,1,1]=(0.122543918666)
-        ref[0,0,1,2]=(-1.12411286836)
-        ref[0,1,0,0]=(0.985611388383)
-        ref[0,1,0,1]=(-1.17217207383)
-        ref[0,1,0,2]=(-0.231241872108)
-        ref[0,1,1,0]=(0.625494139449)
-        ref[0,1,1,1]=(0.784802683192)
-        ref[0,1,1,2]=(0.612764525973)
-        ref[1,0,0,0]=(0.327644975022)
-        ref[1,0,0,1]=(0.0552951801276)
-        ref[1,0,0,2]=(-0.806887445103)
-        ref[1,0,1,0]=(0.194338798022)
-        ref[1,0,1,1]=(0.799902026341)
-        ref[1,0,1,2]=(1.70164249741)
-        ref[1,1,0,0]=(0.890832636865)
-        ref[1,1,0,1]=(0.223899365292)
-        ref[1,1,0,2]=(-0.283094526824)
-        ref[1,1,1,0]=(-0.122108330088)
-        ref[1,1,1,1]=(-0.293413695547)
-        ref[1,1,1,2]=(-0.371581852879)
-        ref[2,0,0,0]=(-0.469341678297)
-        ref[2,0,0,1]=(0.152856292978)
-        ref[2,0,0,2]=(0.765861314481)
-        ref[2,0,1,0]=(0.249219162734)
-        ref[2,0,1,1]=(0.319622173697)
-        ref[2,0,1,2]=(-0.182998471546)
-        ref[2,1,0,0]=(0.39687496584)
-        ref[2,1,0,1]=(0.137084411978)
-        ref[2,1,0,2]=(-0.34707250854)
-        ref[2,1,1,0]=(-0.382391798519)
-        ref[2,1,1,1]=(0.755317411547)
-        ref[2,1,1,2]=(0.424204162929)
-        ref[3,0,0,0]=(1.12637976255)
-        ref[3,0,0,1]=(0.11632178776)
-        ref[3,0,0,2]=(-0.615547388072)
-        ref[3,0,1,0]=(-0.819303259446)
-        ref[3,0,1,1]=(0.916951216368)
-        ref[3,0,1,2]=(-0.572792050441)
-        ref[3,1,0,0]=(0.194642055711)
-        ref[3,1,0,1]=(0.949663114037)
-        ref[3,1,0,2]=(-0.403001914682)
-        ref[3,1,1,0]=(0.902547242635)
-        ref[3,1,1,1]=(-1.04027936291)
-        ref[3,1,1,2]=(-1.78463515221)
-        ref[4,0,0,0]=(0.59060036737)
-        ref[4,0,0,1]=(-0.580905638676)
-        ref[4,0,0,2]=(-0.486098556884)
-        ref[4,0,1,0]=(-0.330634605524)
-        ref[4,0,1,1]=(-0.758140973629)
-        ref[4,0,1,2]=(-0.192282397672)
-        ref[4,1,0,0]=(1.40502801336)
-        ref[4,1,0,1]=(0.199036161455)
-        ref[4,1,0,2]=(-0.558660947885)
-        ref[4,1,1,0]=(-0.155588274273)
-        ref[4,1,1,1]=(-0.57050736529)
-        ref[4,1,1,2]=(1.1998664442)
-        ref[5,0,0,0]=(-0.754680865929)
-        ref[5,0,0,1]=(1.29040984028)
-        ref[5,0,0,2]=(-1.83778974463)
-        ref[5,0,1,0]=(0.274692501647)
-        ref[5,0,1,1]=(0.368546080921)
-        ref[5,0,1,2]=(-0.446376269232)
-        ref[5,1,0,0]=(-0.758704372861)
-        ref[5,1,0,1]=(1.75555227426)
-        ref[5,1,0,2]=(-0.13664688871)
-        ref[5,1,1,0]=(-0.568468068187)
-        ref[5,1,1,1]=(-0.320218561544)
-        ref[5,1,1,2]=(-0.827795466031)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(1.37238770251)*x[0]+(-1.43917937019)*x[1]
-        ref[0]=(1.37238770251)
-        ref[1]=(-1.43917937019)
-      else:
-        arg=(0.951563810847)*x[0]+(-1.91408943437)*x[1]+(0.233861671105)*x[2]
-        ref[0]=(0.951563810847)
-        ref[1]=(-1.91408943437)
-        ref[2]=(0.233861671105)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(1.42921344972)*x[0]+(-0.911436505176)*x[1]
-        arg[1]=(1.25688300316)*x[0]+(0.0536640238292)*x[1]
-        ref[0,0]=(1.42921344972)
-        ref[0,1]=(-0.911436505176)
-        ref[1,0]=(1.25688300316)
-        ref[1,1]=(0.0536640238292)
-      else:
-        arg[0]=(-1.57773112011)*x[0]+(-0.697311790617)*x[1]+(-0.480770363787)*x[2]
-        arg[1]=(-0.136063655594)*x[0]+(0.882253548646)*x[1]+(1.35773570995)*x[2]
-        ref[0,0]=(-1.57773112011)
-        ref[0,1]=(-0.697311790617)
-        ref[0,2]=(-0.480770363787)
-        ref[1,0]=(-0.136063655594)
-        ref[1,1]=(0.882253548646)
-        ref[1,2]=(1.35773570995)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.448247291087)*x[0]+(-0.00880442943882)*x[1]
-        arg[0,1]=(-0.59784234455)*x[0]+(-0.94951606979)*x[1]
-        arg[0,2]=(1.38316656933)*x[0]+(-0.124817047005)*x[1]
-        arg[0,3]=(-0.0748469893414)*x[0]+(1.44145142047)*x[1]
-        arg[0,4]=(1.81133385456)*x[0]+(-0.518406894403)*x[1]
-        arg[1,0]=(-0.65460152624)*x[0]+(-0.350858526434)*x[1]
-        arg[1,1]=(0.924058009558)*x[0]+(-0.40973995895)*x[1]
-        arg[1,2]=(-0.299794705178)*x[0]+(-0.924557696915)*x[1]
-        arg[1,3]=(-0.608513627169)*x[0]+(-0.141936714389)*x[1]
-        arg[1,4]=(0.469099778997)*x[0]+(0.754132353456)*x[1]
-        arg[2,0]=(-0.627098551951)*x[0]+(0.476865448119)*x[1]
-        arg[2,1]=(-1.03564375134)*x[0]+(-0.280009187543)*x[1]
-        arg[2,2]=(0.475083576156)*x[0]+(0.220248066616)*x[1]
-        arg[2,3]=(0.0420499398173)*x[0]+(0.0808105284548)*x[1]
-        arg[2,4]=(0.368173655662)*x[0]+(-0.58266909961)*x[1]
-        arg[3,0]=(0.450851110298)*x[0]+(0.0844590226087)*x[1]
-        arg[3,1]=(0.508010554654)*x[0]+(0.797109833792)*x[1]
-        arg[3,2]=(0.711479388001)*x[0]+(1.12829906729)*x[1]
-        arg[3,3]=(0.0588799697153)*x[0]+(-0.991874826409)*x[1]
-        arg[3,4]=(0.743446045536)*x[0]+(0.65754450588)*x[1]
-        ref[0,0,0]=(0.448247291087)
-        ref[0,0,1]=(-0.00880442943882)
-        ref[0,1,0]=(-0.59784234455)
-        ref[0,1,1]=(-0.94951606979)
-        ref[0,2,0]=(1.38316656933)
-        ref[0,2,1]=(-0.124817047005)
-        ref[0,3,0]=(-0.0748469893414)
-        ref[0,3,1]=(1.44145142047)
-        ref[0,4,0]=(1.81133385456)
-        ref[0,4,1]=(-0.518406894403)
-        ref[1,0,0]=(-0.65460152624)
-        ref[1,0,1]=(-0.350858526434)
-        ref[1,1,0]=(0.924058009558)
-        ref[1,1,1]=(-0.40973995895)
-        ref[1,2,0]=(-0.299794705178)
-        ref[1,2,1]=(-0.924557696915)
-        ref[1,3,0]=(-0.608513627169)
-        ref[1,3,1]=(-0.141936714389)
-        ref[1,4,0]=(0.469099778997)
-        ref[1,4,1]=(0.754132353456)
-        ref[2,0,0]=(-0.627098551951)
-        ref[2,0,1]=(0.476865448119)
-        ref[2,1,0]=(-1.03564375134)
-        ref[2,1,1]=(-0.280009187543)
-        ref[2,2,0]=(0.475083576156)
-        ref[2,2,1]=(0.220248066616)
-        ref[2,3,0]=(0.0420499398173)
-        ref[2,3,1]=(0.0808105284548)
-        ref[2,4,0]=(0.368173655662)
-        ref[2,4,1]=(-0.58266909961)
-        ref[3,0,0]=(0.450851110298)
-        ref[3,0,1]=(0.0844590226087)
-        ref[3,1,0]=(0.508010554654)
-        ref[3,1,1]=(0.797109833792)
-        ref[3,2,0]=(0.711479388001)
-        ref[3,2,1]=(1.12829906729)
-        ref[3,3,0]=(0.0588799697153)
-        ref[3,3,1]=(-0.991874826409)
-        ref[3,4,0]=(0.743446045536)
-        ref[3,4,1]=(0.65754450588)
-      else:
-        arg[0,0]=(-0.43386387868)*x[0]+(0.321105491776)*x[1]+(0.384206679414)*x[2]
-        arg[0,1]=(0.604698878149)*x[0]+(0.594375439325)*x[1]+(0.162832272176)*x[2]
-        arg[0,2]=(-0.332194829416)*x[0]+(0.600821281937)*x[1]+(0.493622302813)*x[2]
-        arg[0,3]=(0.846367268698)*x[0]+(-1.32744832381)*x[1]+(0.00466654421944)*x[2]
-        arg[0,4]=(0.385111950936)*x[0]+(-0.176705693397)*x[1]+(0.461732370075)*x[2]
-        arg[1,0]=(-0.14529643778)*x[0]+(1.15329219838)*x[1]+(0.157842247326)*x[2]
-        arg[1,1]=(0.00817149012591)*x[0]+(-0.703898404732)*x[1]+(-1.14419500663)*x[2]
-        arg[1,2]=(-0.124155034423)*x[0]+(0.906000496919)*x[1]+(-0.466071596735)*x[2]
-        arg[1,3]=(0.413190740147)*x[0]+(0.968639404637)*x[1]+(-1.25413312698)*x[2]
-        arg[1,4]=(0.521974966379)*x[0]+(0.936384991187)*x[1]+(-0.0630547476157)*x[2]
-        arg[2,0]=(-0.334976510608)*x[0]+(-0.268364721371)*x[1]+(0.806974769679)*x[2]
-        arg[2,1]=(-0.0672705162033)*x[0]+(0.459808873839)*x[1]+(0.0725634327358)*x[2]
-        arg[2,2]=(0.142418012401)*x[0]+(-0.400301432498)*x[1]+(-1.37021128371)*x[2]
-        arg[2,3]=(-1.60617980561)*x[0]+(0.0686943218654)*x[1]+(0.647509287658)*x[2]
-        arg[2,4]=(0.0102366197695)*x[0]+(-1.24104511219)*x[1]+(-0.739463479584)*x[2]
-        arg[3,0]=(-0.425526939568)*x[0]+(-0.946421307227)*x[1]+(0.133101457377)*x[2]
-        arg[3,1]=(1.07183638389)*x[0]+(-1.21405997903)*x[1]+(-0.962984008606)*x[2]
-        arg[3,2]=(-0.913456686897)*x[0]+(0.907233128077)*x[1]+(0.581609247137)*x[2]
-        arg[3,3]=(-0.729544885457)*x[0]+(-0.433435638004)*x[1]+(0.357011166494)*x[2]
-        arg[3,4]=(1.21906931308)*x[0]+(0.322487716786)*x[1]+(1.05602783674)*x[2]
-        ref[0,0,0]=(-0.43386387868)
-        ref[0,0,1]=(0.321105491776)
-        ref[0,0,2]=(0.384206679414)
-        ref[0,1,0]=(0.604698878149)
-        ref[0,1,1]=(0.594375439325)
-        ref[0,1,2]=(0.162832272176)
-        ref[0,2,0]=(-0.332194829416)
-        ref[0,2,1]=(0.600821281937)
-        ref[0,2,2]=(0.493622302813)
-        ref[0,3,0]=(0.846367268698)
-        ref[0,3,1]=(-1.32744832381)
-        ref[0,3,2]=(0.00466654421944)
-        ref[0,4,0]=(0.385111950936)
-        ref[0,4,1]=(-0.176705693397)
-        ref[0,4,2]=(0.461732370075)
-        ref[1,0,0]=(-0.14529643778)
-        ref[1,0,1]=(1.15329219838)
-        ref[1,0,2]=(0.157842247326)
-        ref[1,1,0]=(0.00817149012591)
-        ref[1,1,1]=(-0.703898404732)
-        ref[1,1,2]=(-1.14419500663)
-        ref[1,2,0]=(-0.124155034423)
-        ref[1,2,1]=(0.906000496919)
-        ref[1,2,2]=(-0.466071596735)
-        ref[1,3,0]=(0.413190740147)
-        ref[1,3,1]=(0.968639404637)
-        ref[1,3,2]=(-1.25413312698)
-        ref[1,4,0]=(0.521974966379)
-        ref[1,4,1]=(0.936384991187)
-        ref[1,4,2]=(-0.0630547476157)
-        ref[2,0,0]=(-0.334976510608)
-        ref[2,0,1]=(-0.268364721371)
-        ref[2,0,2]=(0.806974769679)
-        ref[2,1,0]=(-0.0672705162033)
-        ref[2,1,1]=(0.459808873839)
-        ref[2,1,2]=(0.0725634327358)
-        ref[2,2,0]=(0.142418012401)
-        ref[2,2,1]=(-0.400301432498)
-        ref[2,2,2]=(-1.37021128371)
-        ref[2,3,0]=(-1.60617980561)
-        ref[2,3,1]=(0.0686943218654)
-        ref[2,3,2]=(0.647509287658)
-        ref[2,4,0]=(0.0102366197695)
-        ref[2,4,1]=(-1.24104511219)
-        ref[2,4,2]=(-0.739463479584)
-        ref[3,0,0]=(-0.425526939568)
-        ref[3,0,1]=(-0.946421307227)
-        ref[3,0,2]=(0.133101457377)
-        ref[3,1,0]=(1.07183638389)
-        ref[3,1,1]=(-1.21405997903)
-        ref[3,1,2]=(-0.962984008606)
-        ref[3,2,0]=(-0.913456686897)
-        ref[3,2,1]=(0.907233128077)
-        ref[3,2,2]=(0.581609247137)
-        ref[3,3,0]=(-0.729544885457)
-        ref[3,3,1]=(-0.433435638004)
-        ref[3,3,2]=(0.357011166494)
-        ref[3,4,0]=(1.21906931308)
-        ref[3,4,1]=(0.322487716786)
-        ref[3,4,2]=(1.05602783674)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactZero
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactZero
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactZero(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(-0.287546203823)*x[0]+(0.390321729967)*x[1]
-        arg[0,0,1]=(-0.112653571553)*x[0]+(-0.359753186922)*x[1]
-        arg[0,1,0]=(0.00656985674969)*x[0]+(-0.397210304393)*x[1]
-        arg[0,1,1]=(-0.825698431533)*x[0]+(-1.20994477496)*x[1]
-        arg[1,0,0]=(0.0456789352898)*x[0]+(0.201178709355)*x[1]
-        arg[1,0,1]=(0.216619650199)*x[0]+(-0.684237394127)*x[1]
-        arg[1,1,0]=(-0.452605086273)*x[0]+(0.383220784575)*x[1]
-        arg[1,1,1]=(-0.385315869703)*x[0]+(-1.25937320051)*x[1]
-        arg[2,0,0]=(-0.546290546777)*x[0]+(0.0659124729108)*x[1]
-        arg[2,0,1]=(0.23413834434)*x[0]+(0.241510050424)*x[1]
-        arg[2,1,0]=(-0.541097368124)*x[0]+(0.458682016611)*x[1]
-        arg[2,1,1]=(0.314030173817)*x[0]+(0.083613884286)*x[1]
-        arg[3,0,0]=(0.862005271666)*x[0]+(0.858693755091)*x[1]
-        arg[3,0,1]=(-1.14220805291)*x[0]+(0.609875693913)*x[1]
-        arg[3,1,0]=(-0.847069360014)*x[0]+(0.240069314456)*x[1]
-        arg[3,1,1]=(0.480596211718)*x[0]+(-1.40901297384)*x[1]
-        arg[4,0,0]=(-1.38036653523)*x[0]+(-0.0732955000278)*x[1]
-        arg[4,0,1]=(0.0716061704803)*x[0]+(0.180127379412)*x[1]
-        arg[4,1,0]=(1.26959959862)*x[0]+(-1.38131896436)*x[1]
-        arg[4,1,1]=(0.204280361123)*x[0]+(0.532611514369)*x[1]
-        arg[5,0,0]=(0.209536293545)*x[0]+(-0.303994906788)*x[1]
-        arg[5,0,1]=(1.41150162289)*x[0]+(1.32515735407)*x[1]
-        arg[5,1,0]=(1.59736027384)*x[0]+(-0.711055564868)*x[1]
-        arg[5,1,1]=(-1.31799658024)*x[0]+(0.829209493108)*x[1]
-        ref[0,0,0,0]=(-0.287546203823)
-        ref[0,0,0,1]=(0.390321729967)
-        ref[0,0,1,0]=(-0.112653571553)
-        ref[0,0,1,1]=(-0.359753186922)
-        ref[0,1,0,0]=(0.00656985674969)
-        ref[0,1,0,1]=(-0.397210304393)
-        ref[0,1,1,0]=(-0.825698431533)
-        ref[0,1,1,1]=(-1.20994477496)
-        ref[1,0,0,0]=(0.0456789352898)
-        ref[1,0,0,1]=(0.201178709355)
-        ref[1,0,1,0]=(0.216619650199)
-        ref[1,0,1,1]=(-0.684237394127)
-        ref[1,1,0,0]=(-0.452605086273)
-        ref[1,1,0,1]=(0.383220784575)
-        ref[1,1,1,0]=(-0.385315869703)
-        ref[1,1,1,1]=(-1.25937320051)
-        ref[2,0,0,0]=(-0.546290546777)
-        ref[2,0,0,1]=(0.0659124729108)
-        ref[2,0,1,0]=(0.23413834434)
-        ref[2,0,1,1]=(0.241510050424)
-        ref[2,1,0,0]=(-0.541097368124)
-        ref[2,1,0,1]=(0.458682016611)
-        ref[2,1,1,0]=(0.314030173817)
-        ref[2,1,1,1]=(0.083613884286)
-        ref[3,0,0,0]=(0.862005271666)
-        ref[3,0,0,1]=(0.858693755091)
-        ref[3,0,1,0]=(-1.14220805291)
-        ref[3,0,1,1]=(0.609875693913)
-        ref[3,1,0,0]=(-0.847069360014)
-        ref[3,1,0,1]=(0.240069314456)
-        ref[3,1,1,0]=(0.480596211718)
-        ref[3,1,1,1]=(-1.40901297384)
-        ref[4,0,0,0]=(-1.38036653523)
-        ref[4,0,0,1]=(-0.0732955000278)
-        ref[4,0,1,0]=(0.0716061704803)
-        ref[4,0,1,1]=(0.180127379412)
-        ref[4,1,0,0]=(1.26959959862)
-        ref[4,1,0,1]=(-1.38131896436)
-        ref[4,1,1,0]=(0.204280361123)
-        ref[4,1,1,1]=(0.532611514369)
-        ref[5,0,0,0]=(0.209536293545)
-        ref[5,0,0,1]=(-0.303994906788)
-        ref[5,0,1,0]=(1.41150162289)
-        ref[5,0,1,1]=(1.32515735407)
-        ref[5,1,0,0]=(1.59736027384)
-        ref[5,1,0,1]=(-0.711055564868)
-        ref[5,1,1,0]=(-1.31799658024)
-        ref[5,1,1,1]=(0.829209493108)
-      else:
-        arg[0,0,0]=(0.832267408258)*x[0]+(-1.1995239623)*x[1]+(-1.81276973398)*x[2]
-        arg[0,0,1]=(-0.0125232856194)*x[0]+(0.122543918666)*x[1]+(-1.12411286836)*x[2]
-        arg[0,1,0]=(0.985611388383)*x[0]+(-1.17217207383)*x[1]+(-0.231241872108)*x[2]
-        arg[0,1,1]=(0.625494139449)*x[0]+(0.784802683192)*x[1]+(0.612764525973)*x[2]
-        arg[1,0,0]=(0.327644975022)*x[0]+(0.0552951801276)*x[1]+(-0.806887445103)*x[2]
-        arg[1,0,1]=(0.194338798022)*x[0]+(0.799902026341)*x[1]+(1.70164249741)*x[2]
-        arg[1,1,0]=(0.890832636865)*x[0]+(0.223899365292)*x[1]+(-0.283094526824)*x[2]
-        arg[1,1,1]=(-0.122108330088)*x[0]+(-0.293413695547)*x[1]+(-0.371581852879)*x[2]
-        arg[2,0,0]=(-0.469341678297)*x[0]+(0.152856292978)*x[1]+(0.765861314481)*x[2]
-        arg[2,0,1]=(0.249219162734)*x[0]+(0.319622173697)*x[1]+(-0.182998471546)*x[2]
-        arg[2,1,0]=(0.39687496584)*x[0]+(0.137084411978)*x[1]+(-0.34707250854)*x[2]
-        arg[2,1,1]=(-0.382391798519)*x[0]+(0.755317411547)*x[1]+(0.424204162929)*x[2]
-        arg[3,0,0]=(1.12637976255)*x[0]+(0.11632178776)*x[1]+(-0.615547388072)*x[2]
-        arg[3,0,1]=(-0.819303259446)*x[0]+(0.916951216368)*x[1]+(-0.572792050441)*x[2]
-        arg[3,1,0]=(0.194642055711)*x[0]+(0.949663114037)*x[1]+(-0.403001914682)*x[2]
-        arg[3,1,1]=(0.902547242635)*x[0]+(-1.04027936291)*x[1]+(-1.78463515221)*x[2]
-        arg[4,0,0]=(0.59060036737)*x[0]+(-0.580905638676)*x[1]+(-0.486098556884)*x[2]
-        arg[4,0,1]=(-0.330634605524)*x[0]+(-0.758140973629)*x[1]+(-0.192282397672)*x[2]
-        arg[4,1,0]=(1.40502801336)*x[0]+(0.199036161455)*x[1]+(-0.558660947885)*x[2]
-        arg[4,1,1]=(-0.155588274273)*x[0]+(-0.57050736529)*x[1]+(1.1998664442)*x[2]
-        arg[5,0,0]=(-0.754680865929)*x[0]+(1.29040984028)*x[1]+(-1.83778974463)*x[2]
-        arg[5,0,1]=(0.274692501647)*x[0]+(0.368546080921)*x[1]+(-0.446376269232)*x[2]
-        arg[5,1,0]=(-0.758704372861)*x[0]+(1.75555227426)*x[1]+(-0.13664688871)*x[2]
-        arg[5,1,1]=(-0.568468068187)*x[0]+(-0.320218561544)*x[1]+(-0.827795466031)*x[2]
-        ref[0,0,0,0]=(0.832267408258)
-        ref[0,0,0,1]=(-1.1995239623)
-        ref[0,0,0,2]=(-1.81276973398)
-        ref[0,0,1,0]=(-0.0125232856194)
-        ref[0,0,1,1]=(0.122543918666)
-        ref[0,0,1,2]=(-1.12411286836)
-        ref[0,1,0,0]=(0.985611388383)
-        ref[0,1,0,1]=(-1.17217207383)
-        ref[0,1,0,2]=(-0.231241872108)
-        ref[0,1,1,0]=(0.625494139449)
-        ref[0,1,1,1]=(0.784802683192)
-        ref[0,1,1,2]=(0.612764525973)
-        ref[1,0,0,0]=(0.327644975022)
-        ref[1,0,0,1]=(0.0552951801276)
-        ref[1,0,0,2]=(-0.806887445103)
-        ref[1,0,1,0]=(0.194338798022)
-        ref[1,0,1,1]=(0.799902026341)
-        ref[1,0,1,2]=(1.70164249741)
-        ref[1,1,0,0]=(0.890832636865)
-        ref[1,1,0,1]=(0.223899365292)
-        ref[1,1,0,2]=(-0.283094526824)
-        ref[1,1,1,0]=(-0.122108330088)
-        ref[1,1,1,1]=(-0.293413695547)
-        ref[1,1,1,2]=(-0.371581852879)
-        ref[2,0,0,0]=(-0.469341678297)
-        ref[2,0,0,1]=(0.152856292978)
-        ref[2,0,0,2]=(0.765861314481)
-        ref[2,0,1,0]=(0.249219162734)
-        ref[2,0,1,1]=(0.319622173697)
-        ref[2,0,1,2]=(-0.182998471546)
-        ref[2,1,0,0]=(0.39687496584)
-        ref[2,1,0,1]=(0.137084411978)
-        ref[2,1,0,2]=(-0.34707250854)
-        ref[2,1,1,0]=(-0.382391798519)
-        ref[2,1,1,1]=(0.755317411547)
-        ref[2,1,1,2]=(0.424204162929)
-        ref[3,0,0,0]=(1.12637976255)
-        ref[3,0,0,1]=(0.11632178776)
-        ref[3,0,0,2]=(-0.615547388072)
-        ref[3,0,1,0]=(-0.819303259446)
-        ref[3,0,1,1]=(0.916951216368)
-        ref[3,0,1,2]=(-0.572792050441)
-        ref[3,1,0,0]=(0.194642055711)
-        ref[3,1,0,1]=(0.949663114037)
-        ref[3,1,0,2]=(-0.403001914682)
-        ref[3,1,1,0]=(0.902547242635)
-        ref[3,1,1,1]=(-1.04027936291)
-        ref[3,1,1,2]=(-1.78463515221)
-        ref[4,0,0,0]=(0.59060036737)
-        ref[4,0,0,1]=(-0.580905638676)
-        ref[4,0,0,2]=(-0.486098556884)
-        ref[4,0,1,0]=(-0.330634605524)
-        ref[4,0,1,1]=(-0.758140973629)
-        ref[4,0,1,2]=(-0.192282397672)
-        ref[4,1,0,0]=(1.40502801336)
-        ref[4,1,0,1]=(0.199036161455)
-        ref[4,1,0,2]=(-0.558660947885)
-        ref[4,1,1,0]=(-0.155588274273)
-        ref[4,1,1,1]=(-0.57050736529)
-        ref[4,1,1,2]=(1.1998664442)
-        ref[5,0,0,0]=(-0.754680865929)
-        ref[5,0,0,1]=(1.29040984028)
-        ref[5,0,0,2]=(-1.83778974463)
-        ref[5,0,1,0]=(0.274692501647)
-        ref[5,0,1,1]=(0.368546080921)
-        ref[5,0,1,2]=(-0.446376269232)
-        ref[5,1,0,0]=(-0.758704372861)
-        ref[5,1,0,1]=(1.75555227426)
-        ref[5,1,0,2]=(-0.13664688871)
-        ref[5,1,1,0]=(-0.568468068187)
-        ref[5,1,1,1]=(-0.320218561544)
-        ref[5,1,1,2]=(-0.827795466031)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(-0.169375355906)*x[0]**o+(0.270029734958)*x[0]+(-0.19196016538)*x[1]**o+(0.426264369437)*x[1]
-        ref[0]=o*(-0.169375355906)*x_ref[0]**(o-1)+(0.270029734958)
-        ref[1]=o*(-0.19196016538)*x_ref[1]**(o-1)+(0.426264369437)
-      else:
-        arg=(0.00913595455019)*x[0]**o+(-0.561918629059)*x[0]+(0.0164102679759)*x[1]**o+(0.20749162111)*x[1]+(0.588703418401)*x[2]**o+(0.841289333498)*x[2]
-        ref[0]=o*(0.00913595455019)*x_ref[0]**(o-1)+(-0.561918629059)
-        ref[1]=o*(0.0164102679759)*x_ref[1]**(o-1)+(0.20749162111)
-        ref[2]=o*(0.588703418401)*x_ref[2]**(o-1)+(0.841289333498)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.290031175706)*x[0]**o+(0.690121137589)*x[0]+(0.916232953272)*x[1]**o+(0.427227803135)*x[1]
-        arg[1]=(0.0325792679154)*x[0]**o+(0.773157737135)*x[0]+(-0.0443953478357)*x[1]**o+(0.772028975294)*x[1]
-        ref[0,0]=o*(-0.290031175706)*x_ref[0]**(o-1)+(0.690121137589)
-        ref[0,1]=o*(0.916232953272)*x_ref[1]**(o-1)+(0.427227803135)
-        ref[1,0]=o*(0.0325792679154)*x_ref[0]**(o-1)+(0.773157737135)
-        ref[1,1]=o*(-0.0443953478357)*x_ref[1]**(o-1)+(0.772028975294)
-      else:
-        arg[0]=(-0.119338345858)*x[0]**o+(-0.866134437839)*x[0]+(-0.727685742079)*x[1]**o+(0.465666609669)*x[1]+(-0.351266733199)*x[2]**o+(-0.960631632698)*x[2]
-        arg[1]=(-0.731037524737)*x[0]**o+(0.415975622707)*x[0]+(-0.86639696362)*x[1]**o+(0.914277406921)*x[1]+(0.627502485514)*x[2]**o+(-0.855013681276)*x[2]
-        ref[0,0]=o*(-0.119338345858)*x_ref[0]**(o-1)+(-0.866134437839)
-        ref[0,1]=o*(-0.727685742079)*x_ref[1]**(o-1)+(0.465666609669)
-        ref[0,2]=o*(-0.351266733199)*x_ref[2]**(o-1)+(-0.960631632698)
-        ref[1,0]=o*(-0.731037524737)*x_ref[0]**(o-1)+(0.415975622707)
-        ref[1,1]=o*(-0.86639696362)*x_ref[1]**(o-1)+(0.914277406921)
-        ref[1,2]=o*(0.627502485514)*x_ref[2]**(o-1)+(-0.855013681276)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.148320408183)*x[0]**o+(-0.340902870434)*x[0]+(-0.0856445410272)*x[1]**o+(0.220499304831)*x[1]
-        arg[0,1]=(0.915892845602)*x[0]**o+(-0.04770770327)*x[0]+(0.482403170451)*x[1]**o+(-0.639478756575)*x[1]
-        arg[0,2]=(-0.109204159071)*x[0]**o+(0.641607024805)*x[0]+(-0.409310547283)*x[1]**o+(0.202984386731)*x[1]
-        arg[0,3]=(0.436833770493)*x[0]**o+(-0.200611791892)*x[0]+(-0.74814554517)*x[1]**o+(0.571881526754)*x[1]
-        arg[0,4]=(0.704812299415)*x[0]**o+(0.688151134045)*x[0]+(0.486135712907)*x[1]**o+(0.955314240096)*x[1]
-        arg[1,0]=(-0.731790373321)*x[0]**o+(-0.711258122556)*x[0]+(-0.961514666684)*x[1]**o+(0.726573978492)*x[1]
-        arg[1,1]=(0.975372389889)*x[0]**o+(0.5026238435)*x[0]+(0.948955767945)*x[1]**o+(-0.780842035663)*x[1]
-        arg[1,2]=(0.742383399984)*x[0]**o+(-0.729678661652)*x[0]+(-0.815499612514)*x[1]**o+(-0.12280674993)*x[1]
-        arg[1,3]=(0.323809901662)*x[0]**o+(-0.441906205977)*x[0]+(-0.308989501913)*x[1]**o+(-0.549353671447)*x[1]
-        arg[1,4]=(0.711285710752)*x[0]**o+(0.297823778866)*x[0]+(0.645185023747)*x[1]**o+(0.825620074525)*x[1]
-        arg[2,0]=(-0.373175217644)*x[0]**o+(-0.25651286112)*x[0]+(-0.46193047583)*x[1]**o+(-0.359820938943)*x[1]
-        arg[2,1]=(-0.406101756283)*x[0]**o+(-0.38896428223)*x[0]+(-0.993257693721)*x[1]**o+(-0.910326366305)*x[1]
-        arg[2,2]=(0.517566718504)*x[0]**o+(-0.582940900248)*x[0]+(-0.381600156082)*x[1]**o+(0.466575604699)*x[1]
-        arg[2,3]=(0.323944380062)*x[0]**o+(-0.99359065412)*x[0]+(0.069389014076)*x[1]**o+(0.960192708612)*x[1]
-        arg[2,4]=(-0.741362989132)*x[0]**o+(0.978137520347)*x[0]+(-0.398259900603)*x[1]**o+(-0.224949732925)*x[1]
-        arg[3,0]=(-0.540235240193)*x[0]**o+(0.761488584116)*x[0]+(-0.100229643779)*x[1]**o+(-0.168724555964)*x[1]
-        arg[3,1]=(0.565068220879)*x[0]**o+(-0.778936552173)*x[0]+(-0.933478028833)*x[1]**o+(-0.274446893155)*x[1]
-        arg[3,2]=(-0.198878845493)*x[0]**o+(0.97185846381)*x[0]+(0.0345948289236)*x[1]**o+(0.359375885935)*x[1]
-        arg[3,3]=(-0.815426880937)*x[0]**o+(-0.0734806259357)*x[0]+(-0.0452925239934)*x[1]**o+(0.976167480949)*x[1]
-        arg[3,4]=(0.374670688698)*x[0]**o+(-0.427666745858)*x[0]+(-0.631640994091)*x[1]**o+(-0.312455066404)*x[1]
-        ref[0,0,0]=o*(0.148320408183)*x_ref[0]**(o-1)+(-0.340902870434)
-        ref[0,0,1]=o*(-0.0856445410272)*x_ref[1]**(o-1)+(0.220499304831)
-        ref[0,1,0]=o*(0.915892845602)*x_ref[0]**(o-1)+(-0.04770770327)
-        ref[0,1,1]=o*(0.482403170451)*x_ref[1]**(o-1)+(-0.639478756575)
-        ref[0,2,0]=o*(-0.109204159071)*x_ref[0]**(o-1)+(0.641607024805)
-        ref[0,2,1]=o*(-0.409310547283)*x_ref[1]**(o-1)+(0.202984386731)
-        ref[0,3,0]=o*(0.436833770493)*x_ref[0]**(o-1)+(-0.200611791892)
-        ref[0,3,1]=o*(-0.74814554517)*x_ref[1]**(o-1)+(0.571881526754)
-        ref[0,4,0]=o*(0.704812299415)*x_ref[0]**(o-1)+(0.688151134045)
-        ref[0,4,1]=o*(0.486135712907)*x_ref[1]**(o-1)+(0.955314240096)
-        ref[1,0,0]=o*(-0.731790373321)*x_ref[0]**(o-1)+(-0.711258122556)
-        ref[1,0,1]=o*(-0.961514666684)*x_ref[1]**(o-1)+(0.726573978492)
-        ref[1,1,0]=o*(0.975372389889)*x_ref[0]**(o-1)+(0.5026238435)
-        ref[1,1,1]=o*(0.948955767945)*x_ref[1]**(o-1)+(-0.780842035663)
-        ref[1,2,0]=o*(0.742383399984)*x_ref[0]**(o-1)+(-0.729678661652)
-        ref[1,2,1]=o*(-0.815499612514)*x_ref[1]**(o-1)+(-0.12280674993)
-        ref[1,3,0]=o*(0.323809901662)*x_ref[0]**(o-1)+(-0.441906205977)
-        ref[1,3,1]=o*(-0.308989501913)*x_ref[1]**(o-1)+(-0.549353671447)
-        ref[1,4,0]=o*(0.711285710752)*x_ref[0]**(o-1)+(0.297823778866)
-        ref[1,4,1]=o*(0.645185023747)*x_ref[1]**(o-1)+(0.825620074525)
-        ref[2,0,0]=o*(-0.373175217644)*x_ref[0]**(o-1)+(-0.25651286112)
-        ref[2,0,1]=o*(-0.46193047583)*x_ref[1]**(o-1)+(-0.359820938943)
-        ref[2,1,0]=o*(-0.406101756283)*x_ref[0]**(o-1)+(-0.38896428223)
-        ref[2,1,1]=o*(-0.993257693721)*x_ref[1]**(o-1)+(-0.910326366305)
-        ref[2,2,0]=o*(0.517566718504)*x_ref[0]**(o-1)+(-0.582940900248)
-        ref[2,2,1]=o*(-0.381600156082)*x_ref[1]**(o-1)+(0.466575604699)
-        ref[2,3,0]=o*(0.323944380062)*x_ref[0]**(o-1)+(-0.99359065412)
-        ref[2,3,1]=o*(0.069389014076)*x_ref[1]**(o-1)+(0.960192708612)
-        ref[2,4,0]=o*(-0.741362989132)*x_ref[0]**(o-1)+(0.978137520347)
-        ref[2,4,1]=o*(-0.398259900603)*x_ref[1]**(o-1)+(-0.224949732925)
-        ref[3,0,0]=o*(-0.540235240193)*x_ref[0]**(o-1)+(0.761488584116)
-        ref[3,0,1]=o*(-0.100229643779)*x_ref[1]**(o-1)+(-0.168724555964)
-        ref[3,1,0]=o*(0.565068220879)*x_ref[0]**(o-1)+(-0.778936552173)
-        ref[3,1,1]=o*(-0.933478028833)*x_ref[1]**(o-1)+(-0.274446893155)
-        ref[3,2,0]=o*(-0.198878845493)*x_ref[0]**(o-1)+(0.97185846381)
-        ref[3,2,1]=o*(0.0345948289236)*x_ref[1]**(o-1)+(0.359375885935)
-        ref[3,3,0]=o*(-0.815426880937)*x_ref[0]**(o-1)+(-0.0734806259357)
-        ref[3,3,1]=o*(-0.0452925239934)*x_ref[1]**(o-1)+(0.976167480949)
-        ref[3,4,0]=o*(0.374670688698)*x_ref[0]**(o-1)+(-0.427666745858)
-        ref[3,4,1]=o*(-0.631640994091)*x_ref[1]**(o-1)+(-0.312455066404)
-      else:
-        arg[0,0]=(0.284398400678)*x[0]**o+(0.219396164435)*x[0]+(0.220563761332)*x[1]**o+(0.167554964517)*x[1]+(0.234139558431)*x[2]**o+(-0.462262273341)*x[2]
-        arg[0,1]=(0.161107248226)*x[0]**o+(0.23981806792)*x[0]+(-0.365265066245)*x[1]**o+(0.280522162689)*x[1]+(0.0813974911438)*x[2]**o+(-0.43305486384)*x[2]
-        arg[0,2]=(0.813480874845)*x[0]**o+(0.600760069636)*x[0]+(-0.133815038485)*x[1]**o+(-0.954192097752)*x[1]+(-0.60756978514)*x[2]**o+(0.669710363926)*x[2]
-        arg[0,3]=(-0.760542897936)*x[0]**o+(0.869702837484)*x[0]+(0.568626088907)*x[1]**o+(0.272054244422)*x[1]+(-0.0415999983147)*x[2]**o+(0.446199878551)*x[2]
-        arg[0,4]=(0.0453200557409)*x[0]**o+(0.990444244175)*x[0]+(0.134265180195)*x[1]**o+(0.156166931353)*x[1]+(-0.787964274948)*x[2]**o+(0.0116920503615)*x[2]
-        arg[1,0]=(-0.826245054647)*x[0]**o+(0.203727421041)*x[0]+(0.435254937068)*x[1]**o+(-0.271957510058)*x[1]+(0.24056400787)*x[2]**o+(-0.270322614397)*x[2]
-        arg[1,1]=(-0.423339337474)*x[0]**o+(0.272439137387)*x[0]+(-0.0736213619539)*x[1]**o+(-0.776123259153)*x[1]+(-0.751736227059)*x[2]**o+(0.944253810697)*x[2]
-        arg[1,2]=(0.189348519506)*x[0]**o+(-0.599085006375)*x[0]+(0.511802349511)*x[1]**o+(-0.309756999526)*x[1]+(-0.753093308971)*x[2]**o+(-0.109878524762)*x[2]
-        arg[1,3]=(0.273889782311)*x[0]**o+(0.284416273071)*x[0]+(-0.793016836976)*x[1]**o+(0.584657111427)*x[1]+(0.202246448215)*x[2]**o+(0.669336280646)*x[2]
-        arg[1,4]=(-0.310062687494)*x[0]**o+(-0.0558492819571)*x[0]+(0.661043054703)*x[1]**o+(0.708531199864)*x[1]+(0.0490202348501)*x[2]**o+(0.732983691308)*x[2]
-        arg[2,0]=(0.967228638923)*x[0]**o+(-0.816725187456)*x[0]+(0.836005904943)*x[1]**o+(-0.618363868727)*x[1]+(-0.977101150283)*x[2]**o+(-0.960030792428)*x[2]
-        arg[2,1]=(0.536503091036)*x[0]**o+(-0.786194077149)*x[0]+(-0.337609174718)*x[1]**o+(0.787326702105)*x[1]+(0.989900210061)*x[2]**o+(0.67077581859)*x[2]
-        arg[2,2]=(-0.732242113661)*x[0]**o+(-0.565641876648)*x[0]+(0.175986347852)*x[1]**o+(0.862449074966)*x[1]+(0.0257656069443)*x[2]**o+(0.824927753427)*x[2]
-        arg[2,3]=(-0.863272499797)*x[0]**o+(-0.817781186551)*x[0]+(0.168931269996)*x[1]**o+(-0.530060186715)*x[1]+(-0.516801368376)*x[2]**o+(-0.570137941882)*x[2]
-        arg[2,4]=(-0.675287850319)*x[0]**o+(-0.672701614891)*x[0]+(-0.19851266374)*x[1]**o+(-0.0494587000627)*x[1]+(0.518006592112)*x[2]**o+(0.0337938303974)*x[2]
-        arg[3,0]=(-0.175683006965)*x[0]**o+(-0.843980579113)*x[0]+(0.903358518604)*x[1]**o+(0.962156465407)*x[1]+(-0.0887392353523)*x[2]**o+(0.524587238729)*x[2]
-        arg[3,1]=(0.0622433182846)*x[0]**o+(-0.756701969275)*x[0]+(0.721836266349)*x[1]**o+(0.457673032865)*x[1]+(0.704951904865)*x[2]**o+(0.781015828813)*x[2]
-        arg[3,2]=(-0.457057269128)*x[0]**o+(-0.880403805028)*x[0]+(0.103553852578)*x[1]**o+(-0.807061998574)*x[1]+(-0.0352722677587)*x[2]**o+(0.0527948564177)*x[2]
-        arg[3,3]=(0.161459807817)*x[0]**o+(0.698509459014)*x[0]+(-0.596487730094)*x[1]**o+(-0.906646770174)*x[1]+(0.567036380682)*x[2]**o+(0.490123167386)*x[2]
-        arg[3,4]=(-0.668686195082)*x[0]**o+(0.911485638627)*x[0]+(-0.856948411336)*x[1]**o+(0.0348927535379)*x[1]+(0.17649505057)*x[2]**o+(-0.778920185271)*x[2]
-        ref[0,0,0]=o*(0.284398400678)*x_ref[0]**(o-1)+(0.219396164435)
-        ref[0,0,1]=o*(0.220563761332)*x_ref[1]**(o-1)+(0.167554964517)
-        ref[0,0,2]=o*(0.234139558431)*x_ref[2]**(o-1)+(-0.462262273341)
-        ref[0,1,0]=o*(0.161107248226)*x_ref[0]**(o-1)+(0.23981806792)
-        ref[0,1,1]=o*(-0.365265066245)*x_ref[1]**(o-1)+(0.280522162689)
-        ref[0,1,2]=o*(0.0813974911438)*x_ref[2]**(o-1)+(-0.43305486384)
-        ref[0,2,0]=o*(0.813480874845)*x_ref[0]**(o-1)+(0.600760069636)
-        ref[0,2,1]=o*(-0.133815038485)*x_ref[1]**(o-1)+(-0.954192097752)
-        ref[0,2,2]=o*(-0.60756978514)*x_ref[2]**(o-1)+(0.669710363926)
-        ref[0,3,0]=o*(-0.760542897936)*x_ref[0]**(o-1)+(0.869702837484)
-        ref[0,3,1]=o*(0.568626088907)*x_ref[1]**(o-1)+(0.272054244422)
-        ref[0,3,2]=o*(-0.0415999983147)*x_ref[2]**(o-1)+(0.446199878551)
-        ref[0,4,0]=o*(0.0453200557409)*x_ref[0]**(o-1)+(0.990444244175)
-        ref[0,4,1]=o*(0.134265180195)*x_ref[1]**(o-1)+(0.156166931353)
-        ref[0,4,2]=o*(-0.787964274948)*x_ref[2]**(o-1)+(0.0116920503615)
-        ref[1,0,0]=o*(-0.826245054647)*x_ref[0]**(o-1)+(0.203727421041)
-        ref[1,0,1]=o*(0.435254937068)*x_ref[1]**(o-1)+(-0.271957510058)
-        ref[1,0,2]=o*(0.24056400787)*x_ref[2]**(o-1)+(-0.270322614397)
-        ref[1,1,0]=o*(-0.423339337474)*x_ref[0]**(o-1)+(0.272439137387)
-        ref[1,1,1]=o*(-0.0736213619539)*x_ref[1]**(o-1)+(-0.776123259153)
-        ref[1,1,2]=o*(-0.751736227059)*x_ref[2]**(o-1)+(0.944253810697)
-        ref[1,2,0]=o*(0.189348519506)*x_ref[0]**(o-1)+(-0.599085006375)
-        ref[1,2,1]=o*(0.511802349511)*x_ref[1]**(o-1)+(-0.309756999526)
-        ref[1,2,2]=o*(-0.753093308971)*x_ref[2]**(o-1)+(-0.109878524762)
-        ref[1,3,0]=o*(0.273889782311)*x_ref[0]**(o-1)+(0.284416273071)
-        ref[1,3,1]=o*(-0.793016836976)*x_ref[1]**(o-1)+(0.584657111427)
-        ref[1,3,2]=o*(0.202246448215)*x_ref[2]**(o-1)+(0.669336280646)
-        ref[1,4,0]=o*(-0.310062687494)*x_ref[0]**(o-1)+(-0.0558492819571)
-        ref[1,4,1]=o*(0.661043054703)*x_ref[1]**(o-1)+(0.708531199864)
-        ref[1,4,2]=o*(0.0490202348501)*x_ref[2]**(o-1)+(0.732983691308)
-        ref[2,0,0]=o*(0.967228638923)*x_ref[0]**(o-1)+(-0.816725187456)
-        ref[2,0,1]=o*(0.836005904943)*x_ref[1]**(o-1)+(-0.618363868727)
-        ref[2,0,2]=o*(-0.977101150283)*x_ref[2]**(o-1)+(-0.960030792428)
-        ref[2,1,0]=o*(0.536503091036)*x_ref[0]**(o-1)+(-0.786194077149)
-        ref[2,1,1]=o*(-0.337609174718)*x_ref[1]**(o-1)+(0.787326702105)
-        ref[2,1,2]=o*(0.989900210061)*x_ref[2]**(o-1)+(0.67077581859)
-        ref[2,2,0]=o*(-0.732242113661)*x_ref[0]**(o-1)+(-0.565641876648)
-        ref[2,2,1]=o*(0.175986347852)*x_ref[1]**(o-1)+(0.862449074966)
-        ref[2,2,2]=o*(0.0257656069443)*x_ref[2]**(o-1)+(0.824927753427)
-        ref[2,3,0]=o*(-0.863272499797)*x_ref[0]**(o-1)+(-0.817781186551)
-        ref[2,3,1]=o*(0.168931269996)*x_ref[1]**(o-1)+(-0.530060186715)
-        ref[2,3,2]=o*(-0.516801368376)*x_ref[2]**(o-1)+(-0.570137941882)
-        ref[2,4,0]=o*(-0.675287850319)*x_ref[0]**(o-1)+(-0.672701614891)
-        ref[2,4,1]=o*(-0.19851266374)*x_ref[1]**(o-1)+(-0.0494587000627)
-        ref[2,4,2]=o*(0.518006592112)*x_ref[2]**(o-1)+(0.0337938303974)
-        ref[3,0,0]=o*(-0.175683006965)*x_ref[0]**(o-1)+(-0.843980579113)
-        ref[3,0,1]=o*(0.903358518604)*x_ref[1]**(o-1)+(0.962156465407)
-        ref[3,0,2]=o*(-0.0887392353523)*x_ref[2]**(o-1)+(0.524587238729)
-        ref[3,1,0]=o*(0.0622433182846)*x_ref[0]**(o-1)+(-0.756701969275)
-        ref[3,1,1]=o*(0.721836266349)*x_ref[1]**(o-1)+(0.457673032865)
-        ref[3,1,2]=o*(0.704951904865)*x_ref[2]**(o-1)+(0.781015828813)
-        ref[3,2,0]=o*(-0.457057269128)*x_ref[0]**(o-1)+(-0.880403805028)
-        ref[3,2,1]=o*(0.103553852578)*x_ref[1]**(o-1)+(-0.807061998574)
-        ref[3,2,2]=o*(-0.0352722677587)*x_ref[2]**(o-1)+(0.0527948564177)
-        ref[3,3,0]=o*(0.161459807817)*x_ref[0]**(o-1)+(0.698509459014)
-        ref[3,3,1]=o*(-0.596487730094)*x_ref[1]**(o-1)+(-0.906646770174)
-        ref[3,3,2]=o*(0.567036380682)*x_ref[2]**(o-1)+(0.490123167386)
-        ref[3,4,0]=o*(-0.668686195082)*x_ref[0]**(o-1)+(0.911485638627)
-        ref[3,4,1]=o*(-0.856948411336)*x_ref[1]**(o-1)+(0.0348927535379)
-        ref[3,4,2]=o*(0.17649505057)*x_ref[2]**(o-1)+(-0.778920185271)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.366719126165)*x[0]**o+(0.273305723392)*x[0]+(0.508134048679)*x[1]**o+(-0.0895788966541)*x[1]
-        arg[0,0,1]=(-0.911986850385)*x[0]**o+(-0.98503317507)*x[0]+(-0.310897248279)*x[1]**o+(0.015206007134)*x[1]
-        arg[0,1,0]=(-0.0827324676842)*x[0]**o+(0.566620026269)*x[0]+(-0.0581063189367)*x[1]**o+(0.379530936223)*x[1]
-        arg[0,1,1]=(0.223247684076)*x[0]**o+(0.511247996036)*x[0]+(-0.904638808138)*x[1]**o+(-0.253982863496)*x[1]
-        arg[1,0,0]=(-0.117040630362)*x[0]**o+(0.720200175398)*x[0]+(0.316014562047)*x[1]**o+(-0.88437304478)*x[1]
-        arg[1,0,1]=(0.521261471788)*x[0]**o+(0.866618380963)*x[0]+(0.376866254345)*x[1]**o+(0.0905522236713)*x[1]
-        arg[1,1,0]=(-0.0907011175214)*x[0]**o+(0.925809501719)*x[0]+(0.29066676347)*x[1]**o+(-0.77392365917)*x[1]
-        arg[1,1,1]=(0.410922874646)*x[0]**o+(-0.801953959211)*x[0]+(-0.911104174539)*x[1]**o+(-0.640661859542)*x[1]
-        arg[2,0,0]=(-0.449471274267)*x[0]**o+(0.8111872512)*x[0]+(0.0498814189394)*x[1]**o+(0.683703882124)*x[1]
-        arg[2,0,1]=(-0.192396495147)*x[0]**o+(0.893457442524)*x[0]+(-0.946936565887)*x[1]**o+(-0.0290255758634)*x[1]
-        arg[2,1,0]=(0.90847535637)*x[0]**o+(-0.517929281823)*x[0]+(0.389994692606)*x[1]**o+(-0.601708219886)*x[1]
-        arg[2,1,1]=(0.401910281699)*x[0]**o+(0.485033224067)*x[0]+(-0.362139392478)*x[1]**o+(-0.740542640224)*x[1]
-        arg[3,0,0]=(0.195815356554)*x[0]**o+(-0.584270182199)*x[0]+(-0.773247762709)*x[1]**o+(0.974109226972)*x[1]
-        arg[3,0,1]=(0.516821334505)*x[0]**o+(-0.667535261235)*x[0]+(-0.687554420634)*x[1]**o+(-0.826211449593)*x[1]
-        arg[3,1,0]=(-0.886684033283)*x[0]**o+(0.833394822235)*x[0]+(-0.509561014765)*x[1]**o+(-0.934990250803)*x[1]
-        arg[3,1,1]=(-0.279505984235)*x[0]**o+(0.629210321924)*x[0]+(-0.245033518843)*x[1]**o+(0.148437993524)*x[1]
-        arg[4,0,0]=(-0.120914130766)*x[0]**o+(-0.70386339291)*x[0]+(-0.37739143589)*x[1]**o+(-0.604979315802)*x[1]
-        arg[4,0,1]=(-0.259492475213)*x[0]**o+(0.628922768093)*x[0]+(-0.973387886178)*x[1]**o+(0.285217747252)*x[1]
-        arg[4,1,0]=(-0.986163107858)*x[0]**o+(-0.85082996164)*x[0]+(-0.560402256475)*x[1]**o+(-0.468278543242)*x[1]
-        arg[4,1,1]=(0.370258762453)*x[0]**o+(0.870396552858)*x[0]+(0.57205142923)*x[1]**o+(0.332787259857)*x[1]
-        arg[5,0,0]=(-0.570453853889)*x[0]**o+(0.253977538115)*x[0]+(0.628545140288)*x[1]**o+(-0.766550576107)*x[1]
-        arg[5,0,1]=(-0.626776709555)*x[0]**o+(0.593526092433)*x[0]+(0.824052315861)*x[1]**o+(-0.409883522469)*x[1]
-        arg[5,1,0]=(0.285256467088)*x[0]**o+(-0.808675657802)*x[0]+(-0.818251043807)*x[1]**o+(0.378756627769)*x[1]
-        arg[5,1,1]=(-0.810805592247)*x[0]**o+(-0.879886206051)*x[0]+(0.378171206533)*x[1]**o+(0.478469089448)*x[1]
-        ref[0,0,0,0]=o*(0.366719126165)*x_ref[0]**(o-1)+(0.273305723392)
-        ref[0,0,0,1]=o*(0.508134048679)*x_ref[1]**(o-1)+(-0.0895788966541)
-        ref[0,0,1,0]=o*(-0.911986850385)*x_ref[0]**(o-1)+(-0.98503317507)
-        ref[0,0,1,1]=o*(-0.310897248279)*x_ref[1]**(o-1)+(0.015206007134)
-        ref[0,1,0,0]=o*(-0.0827324676842)*x_ref[0]**(o-1)+(0.566620026269)
-        ref[0,1,0,1]=o*(-0.0581063189367)*x_ref[1]**(o-1)+(0.379530936223)
-        ref[0,1,1,0]=o*(0.223247684076)*x_ref[0]**(o-1)+(0.511247996036)
-        ref[0,1,1,1]=o*(-0.904638808138)*x_ref[1]**(o-1)+(-0.253982863496)
-        ref[1,0,0,0]=o*(-0.117040630362)*x_ref[0]**(o-1)+(0.720200175398)
-        ref[1,0,0,1]=o*(0.316014562047)*x_ref[1]**(o-1)+(-0.88437304478)
-        ref[1,0,1,0]=o*(0.521261471788)*x_ref[0]**(o-1)+(0.866618380963)
-        ref[1,0,1,1]=o*(0.376866254345)*x_ref[1]**(o-1)+(0.0905522236713)
-        ref[1,1,0,0]=o*(-0.0907011175214)*x_ref[0]**(o-1)+(0.925809501719)
-        ref[1,1,0,1]=o*(0.29066676347)*x_ref[1]**(o-1)+(-0.77392365917)
-        ref[1,1,1,0]=o*(0.410922874646)*x_ref[0]**(o-1)+(-0.801953959211)
-        ref[1,1,1,1]=o*(-0.911104174539)*x_ref[1]**(o-1)+(-0.640661859542)
-        ref[2,0,0,0]=o*(-0.449471274267)*x_ref[0]**(o-1)+(0.8111872512)
-        ref[2,0,0,1]=o*(0.0498814189394)*x_ref[1]**(o-1)+(0.683703882124)
-        ref[2,0,1,0]=o*(-0.192396495147)*x_ref[0]**(o-1)+(0.893457442524)
-        ref[2,0,1,1]=o*(-0.946936565887)*x_ref[1]**(o-1)+(-0.0290255758634)
-        ref[2,1,0,0]=o*(0.90847535637)*x_ref[0]**(o-1)+(-0.517929281823)
-        ref[2,1,0,1]=o*(0.389994692606)*x_ref[1]**(o-1)+(-0.601708219886)
-        ref[2,1,1,0]=o*(0.401910281699)*x_ref[0]**(o-1)+(0.485033224067)
-        ref[2,1,1,1]=o*(-0.362139392478)*x_ref[1]**(o-1)+(-0.740542640224)
-        ref[3,0,0,0]=o*(0.195815356554)*x_ref[0]**(o-1)+(-0.584270182199)
-        ref[3,0,0,1]=o*(-0.773247762709)*x_ref[1]**(o-1)+(0.974109226972)
-        ref[3,0,1,0]=o*(0.516821334505)*x_ref[0]**(o-1)+(-0.667535261235)
-        ref[3,0,1,1]=o*(-0.687554420634)*x_ref[1]**(o-1)+(-0.826211449593)
-        ref[3,1,0,0]=o*(-0.886684033283)*x_ref[0]**(o-1)+(0.833394822235)
-        ref[3,1,0,1]=o*(-0.509561014765)*x_ref[1]**(o-1)+(-0.934990250803)
-        ref[3,1,1,0]=o*(-0.279505984235)*x_ref[0]**(o-1)+(0.629210321924)
-        ref[3,1,1,1]=o*(-0.245033518843)*x_ref[1]**(o-1)+(0.148437993524)
-        ref[4,0,0,0]=o*(-0.120914130766)*x_ref[0]**(o-1)+(-0.70386339291)
-        ref[4,0,0,1]=o*(-0.37739143589)*x_ref[1]**(o-1)+(-0.604979315802)
-        ref[4,0,1,0]=o*(-0.259492475213)*x_ref[0]**(o-1)+(0.628922768093)
-        ref[4,0,1,1]=o*(-0.973387886178)*x_ref[1]**(o-1)+(0.285217747252)
-        ref[4,1,0,0]=o*(-0.986163107858)*x_ref[0]**(o-1)+(-0.85082996164)
-        ref[4,1,0,1]=o*(-0.560402256475)*x_ref[1]**(o-1)+(-0.468278543242)
-        ref[4,1,1,0]=o*(0.370258762453)*x_ref[0]**(o-1)+(0.870396552858)
-        ref[4,1,1,1]=o*(0.57205142923)*x_ref[1]**(o-1)+(0.332787259857)
-        ref[5,0,0,0]=o*(-0.570453853889)*x_ref[0]**(o-1)+(0.253977538115)
-        ref[5,0,0,1]=o*(0.628545140288)*x_ref[1]**(o-1)+(-0.766550576107)
-        ref[5,0,1,0]=o*(-0.626776709555)*x_ref[0]**(o-1)+(0.593526092433)
-        ref[5,0,1,1]=o*(0.824052315861)*x_ref[1]**(o-1)+(-0.409883522469)
-        ref[5,1,0,0]=o*(0.285256467088)*x_ref[0]**(o-1)+(-0.808675657802)
-        ref[5,1,0,1]=o*(-0.818251043807)*x_ref[1]**(o-1)+(0.378756627769)
-        ref[5,1,1,0]=o*(-0.810805592247)*x_ref[0]**(o-1)+(-0.879886206051)
-        ref[5,1,1,1]=o*(0.378171206533)*x_ref[1]**(o-1)+(0.478469089448)
-      else:
-        arg[0,0,0]=(0.99032561737)*x[0]**o+(0.0664709329455)*x[0]+(0.118470702946)*x[1]**o+(0.339805181064)*x[1]+(-0.288819936068)*x[2]**o+(0.500626113335)*x[2]
-        arg[0,0,1]=(-0.736833023385)*x[0]**o+(-0.160433791202)*x[0]+(-0.159295012314)*x[1]**o+(-0.0515197665154)*x[1]+(-0.199553046759)*x[2]**o+(0.912767397035)*x[2]
-        arg[0,1,0]=(0.263643352646)*x[0]**o+(-0.408521561602)*x[0]+(-0.690441644678)*x[1]**o+(0.514925086967)*x[1]+(-0.321785011214)*x[2]**o+(-0.192767636106)*x[2]
-        arg[0,1,1]=(-0.00679573309711)*x[0]**o+(-0.0919830030966)*x[0]+(0.0194635540782)*x[1]**o+(0.0364274479874)*x[1]+(0.324767149157)*x[2]**o+(-0.930770951272)*x[2]
-        arg[1,0,0]=(0.129524159454)*x[0]**o+(-0.747948168258)*x[0]+(0.748091879992)*x[1]**o+(0.0701365933978)*x[1]+(-0.227595193537)*x[2]**o+(-0.515988222581)*x[2]
-        arg[1,0,1]=(-0.369843455974)*x[0]**o+(0.902965907161)*x[0]+(0.841050267135)*x[1]**o+(0.985297243316)*x[1]+(-0.96057678523)*x[2]**o+(0.149329555515)*x[2]
-        arg[1,1,0]=(-0.530918169849)*x[0]**o+(0.574734874263)*x[0]+(-0.56424658789)*x[1]**o+(-0.756154171146)*x[1]+(-0.181750429769)*x[2]**o+(-0.270972276027)*x[2]
-        arg[1,1,1]=(0.18184543511)*x[0]**o+(0.810253164883)*x[0]+(-0.0289547932926)*x[1]**o+(0.690366471619)*x[1]+(0.862616271239)*x[2]**o+(0.157705360996)*x[2]
-        arg[2,0,0]=(-0.732811475459)*x[0]**o+(-0.720788617286)*x[0]+(-0.72285785154)*x[1]**o+(-0.764360626538)*x[1]+(0.979115834974)*x[2]**o+(0.430570190112)*x[2]
-        arg[2,0,1]=(-0.602364948602)*x[0]**o+(-0.313871272033)*x[0]+(0.931476652796)*x[1]**o+(-0.553237167378)*x[1]+(0.273773142735)*x[2]**o+(0.732796238419)*x[2]
-        arg[2,1,0]=(0.723724167325)*x[0]**o+(-0.411330362765)*x[0]+(0.415411259564)*x[1]**o+(0.596006586583)*x[1]+(0.588177039382)*x[2]**o+(-0.365406082278)*x[2]
-        arg[2,1,1]=(0.0622006916856)*x[0]**o+(0.583807018004)*x[0]+(0.292401319183)*x[1]**o+(-0.202393075873)*x[1]+(-0.544886623341)*x[2]**o+(-0.269087712755)*x[2]
-        arg[3,0,0]=(-0.543339583883)*x[0]**o+(-0.594218090249)*x[0]+(0.463226896714)*x[1]**o+(0.613466907584)*x[1]+(0.147935164587)*x[2]**o+(0.696530808607)*x[2]
-        arg[3,0,1]=(0.338109512519)*x[0]**o+(0.281428380284)*x[0]+(0.0445095482602)*x[1]**o+(0.898143737155)*x[1]+(0.0465131079784)*x[2]**o+(-0.311801195497)*x[2]
-        arg[3,1,0]=(0.489699597199)*x[0]**o+(0.198461296558)*x[0]+(0.87785894323)*x[1]**o+(0.916226820395)*x[1]+(-0.473685913201)*x[2]**o+(-0.496145627682)*x[2]
-        arg[3,1,1]=(0.249814020596)*x[0]**o+(-0.894315482252)*x[0]+(-0.778776373134)*x[1]**o+(0.760727700644)*x[1]+(0.743775735588)*x[2]**o+(-0.689040985439)*x[2]
-        arg[4,0,0]=(-0.825052728563)*x[0]**o+(0.522046869865)*x[0]+(0.333964173928)*x[1]**o+(-0.76926539114)*x[1]+(0.412352181661)*x[2]**o+(-0.0067772174596)*x[2]
-        arg[4,0,1]=(-0.478610156432)*x[0]**o+(0.750576911314)*x[0]+(-0.531813749953)*x[1]**o+(0.355951176778)*x[1]+(-0.852853671607)*x[2]**o+(0.980221079923)*x[2]
-        arg[4,1,0]=(-0.641389506244)*x[0]**o+(0.881787042426)*x[0]+(-0.304080099649)*x[1]**o+(0.38448900132)*x[1]+(-0.047930997317)*x[2]**o+(-0.276038511441)*x[2]
-        arg[4,1,1]=(0.606877338216)*x[0]**o+(0.693205674961)*x[0]+(-0.731785947563)*x[1]**o+(0.980888111857)*x[1]+(0.355758103413)*x[2]**o+(-0.493780352941)*x[2]
-        arg[5,0,0]=(-0.542680086594)*x[0]**o+(-0.335712421489)*x[0]+(0.196257902892)*x[1]**o+(-0.923381865562)*x[1]+(0.396049043788)*x[2]**o+(0.231195219983)*x[2]
-        arg[5,0,1]=(0.224328300764)*x[0]**o+(0.306254705923)*x[0]+(-0.298262471524)*x[1]**o+(0.318537412793)*x[1]+(-0.0971742408716)*x[2]**o+(-0.374440507273)*x[2]
-        arg[5,1,0]=(-0.408985188836)*x[0]**o+(-0.932478279672)*x[0]+(0.700313488604)*x[1]**o+(0.259720889362)*x[1]+(0.862207003532)*x[2]**o+(0.646109275237)*x[2]
-        arg[5,1,1]=(-0.0341740340851)*x[0]**o+(0.742119475866)*x[0]+(0.310640405448)*x[1]**o+(-0.295841203899)*x[1]+(-0.778064951853)*x[2]**o+(-0.847637829972)*x[2]
-        ref[0,0,0,0]=o*(0.99032561737)*x_ref[0]**(o-1)+(0.0664709329455)
-        ref[0,0,0,1]=o*(0.118470702946)*x_ref[1]**(o-1)+(0.339805181064)
-        ref[0,0,0,2]=o*(-0.288819936068)*x_ref[2]**(o-1)+(0.500626113335)
-        ref[0,0,1,0]=o*(-0.736833023385)*x_ref[0]**(o-1)+(-0.160433791202)
-        ref[0,0,1,1]=o*(-0.159295012314)*x_ref[1]**(o-1)+(-0.0515197665154)
-        ref[0,0,1,2]=o*(-0.199553046759)*x_ref[2]**(o-1)+(0.912767397035)
-        ref[0,1,0,0]=o*(0.263643352646)*x_ref[0]**(o-1)+(-0.408521561602)
-        ref[0,1,0,1]=o*(-0.690441644678)*x_ref[1]**(o-1)+(0.514925086967)
-        ref[0,1,0,2]=o*(-0.321785011214)*x_ref[2]**(o-1)+(-0.192767636106)
-        ref[0,1,1,0]=o*(-0.00679573309711)*x_ref[0]**(o-1)+(-0.0919830030966)
-        ref[0,1,1,1]=o*(0.0194635540782)*x_ref[1]**(o-1)+(0.0364274479874)
-        ref[0,1,1,2]=o*(0.324767149157)*x_ref[2]**(o-1)+(-0.930770951272)
-        ref[1,0,0,0]=o*(0.129524159454)*x_ref[0]**(o-1)+(-0.747948168258)
-        ref[1,0,0,1]=o*(0.748091879992)*x_ref[1]**(o-1)+(0.0701365933978)
-        ref[1,0,0,2]=o*(-0.227595193537)*x_ref[2]**(o-1)+(-0.515988222581)
-        ref[1,0,1,0]=o*(-0.369843455974)*x_ref[0]**(o-1)+(0.902965907161)
-        ref[1,0,1,1]=o*(0.841050267135)*x_ref[1]**(o-1)+(0.985297243316)
-        ref[1,0,1,2]=o*(-0.96057678523)*x_ref[2]**(o-1)+(0.149329555515)
-        ref[1,1,0,0]=o*(-0.530918169849)*x_ref[0]**(o-1)+(0.574734874263)
-        ref[1,1,0,1]=o*(-0.56424658789)*x_ref[1]**(o-1)+(-0.756154171146)
-        ref[1,1,0,2]=o*(-0.181750429769)*x_ref[2]**(o-1)+(-0.270972276027)
-        ref[1,1,1,0]=o*(0.18184543511)*x_ref[0]**(o-1)+(0.810253164883)
-        ref[1,1,1,1]=o*(-0.0289547932926)*x_ref[1]**(o-1)+(0.690366471619)
-        ref[1,1,1,2]=o*(0.862616271239)*x_ref[2]**(o-1)+(0.157705360996)
-        ref[2,0,0,0]=o*(-0.732811475459)*x_ref[0]**(o-1)+(-0.720788617286)
-        ref[2,0,0,1]=o*(-0.72285785154)*x_ref[1]**(o-1)+(-0.764360626538)
-        ref[2,0,0,2]=o*(0.979115834974)*x_ref[2]**(o-1)+(0.430570190112)
-        ref[2,0,1,0]=o*(-0.602364948602)*x_ref[0]**(o-1)+(-0.313871272033)
-        ref[2,0,1,1]=o*(0.931476652796)*x_ref[1]**(o-1)+(-0.553237167378)
-        ref[2,0,1,2]=o*(0.273773142735)*x_ref[2]**(o-1)+(0.732796238419)
-        ref[2,1,0,0]=o*(0.723724167325)*x_ref[0]**(o-1)+(-0.411330362765)
-        ref[2,1,0,1]=o*(0.415411259564)*x_ref[1]**(o-1)+(0.596006586583)
-        ref[2,1,0,2]=o*(0.588177039382)*x_ref[2]**(o-1)+(-0.365406082278)
-        ref[2,1,1,0]=o*(0.0622006916856)*x_ref[0]**(o-1)+(0.583807018004)
-        ref[2,1,1,1]=o*(0.292401319183)*x_ref[1]**(o-1)+(-0.202393075873)
-        ref[2,1,1,2]=o*(-0.544886623341)*x_ref[2]**(o-1)+(-0.269087712755)
-        ref[3,0,0,0]=o*(-0.543339583883)*x_ref[0]**(o-1)+(-0.594218090249)
-        ref[3,0,0,1]=o*(0.463226896714)*x_ref[1]**(o-1)+(0.613466907584)
-        ref[3,0,0,2]=o*(0.147935164587)*x_ref[2]**(o-1)+(0.696530808607)
-        ref[3,0,1,0]=o*(0.338109512519)*x_ref[0]**(o-1)+(0.281428380284)
-        ref[3,0,1,1]=o*(0.0445095482602)*x_ref[1]**(o-1)+(0.898143737155)
-        ref[3,0,1,2]=o*(0.0465131079784)*x_ref[2]**(o-1)+(-0.311801195497)
-        ref[3,1,0,0]=o*(0.489699597199)*x_ref[0]**(o-1)+(0.198461296558)
-        ref[3,1,0,1]=o*(0.87785894323)*x_ref[1]**(o-1)+(0.916226820395)
-        ref[3,1,0,2]=o*(-0.473685913201)*x_ref[2]**(o-1)+(-0.496145627682)
-        ref[3,1,1,0]=o*(0.249814020596)*x_ref[0]**(o-1)+(-0.894315482252)
-        ref[3,1,1,1]=o*(-0.778776373134)*x_ref[1]**(o-1)+(0.760727700644)
-        ref[3,1,1,2]=o*(0.743775735588)*x_ref[2]**(o-1)+(-0.689040985439)
-        ref[4,0,0,0]=o*(-0.825052728563)*x_ref[0]**(o-1)+(0.522046869865)
-        ref[4,0,0,1]=o*(0.333964173928)*x_ref[1]**(o-1)+(-0.76926539114)
-        ref[4,0,0,2]=o*(0.412352181661)*x_ref[2]**(o-1)+(-0.0067772174596)
-        ref[4,0,1,0]=o*(-0.478610156432)*x_ref[0]**(o-1)+(0.750576911314)
-        ref[4,0,1,1]=o*(-0.531813749953)*x_ref[1]**(o-1)+(0.355951176778)
-        ref[4,0,1,2]=o*(-0.852853671607)*x_ref[2]**(o-1)+(0.980221079923)
-        ref[4,1,0,0]=o*(-0.641389506244)*x_ref[0]**(o-1)+(0.881787042426)
-        ref[4,1,0,1]=o*(-0.304080099649)*x_ref[1]**(o-1)+(0.38448900132)
-        ref[4,1,0,2]=o*(-0.047930997317)*x_ref[2]**(o-1)+(-0.276038511441)
-        ref[4,1,1,0]=o*(0.606877338216)*x_ref[0]**(o-1)+(0.693205674961)
-        ref[4,1,1,1]=o*(-0.731785947563)*x_ref[1]**(o-1)+(0.980888111857)
-        ref[4,1,1,2]=o*(0.355758103413)*x_ref[2]**(o-1)+(-0.493780352941)
-        ref[5,0,0,0]=o*(-0.542680086594)*x_ref[0]**(o-1)+(-0.335712421489)
-        ref[5,0,0,1]=o*(0.196257902892)*x_ref[1]**(o-1)+(-0.923381865562)
-        ref[5,0,0,2]=o*(0.396049043788)*x_ref[2]**(o-1)+(0.231195219983)
-        ref[5,0,1,0]=o*(0.224328300764)*x_ref[0]**(o-1)+(0.306254705923)
-        ref[5,0,1,1]=o*(-0.298262471524)*x_ref[1]**(o-1)+(0.318537412793)
-        ref[5,0,1,2]=o*(-0.0971742408716)*x_ref[2]**(o-1)+(-0.374440507273)
-        ref[5,1,0,0]=o*(-0.408985188836)*x_ref[0]**(o-1)+(-0.932478279672)
-        ref[5,1,0,1]=o*(0.700313488604)*x_ref[1]**(o-1)+(0.259720889362)
-        ref[5,1,0,2]=o*(0.862207003532)*x_ref[2]**(o-1)+(0.646109275237)
-        ref[5,1,1,0]=o*(-0.0341740340851)*x_ref[0]**(o-1)+(0.742119475866)
-        ref[5,1,1,1]=o*(0.310640405448)*x_ref[1]**(o-1)+(-0.295841203899)
-        ref[5,1,1,2]=o*(-0.778064951853)*x_ref[2]**(o-1)+(-0.847637829972)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(-0.188926722839)*x[0]**o+(0.0528015322778)*x[0]+(0.394368405707)*x[1]**o+(0.573648619197)*x[1]
-        ref[0]=o*(-0.188926722839)*x_ref[0]**(o-1)+(0.0528015322778)
-        ref[1]=o*(0.394368405707)*x_ref[1]**(o-1)+(0.573648619197)
-      else:
-        arg=(0.208843709667)*x[0]**o+(-0.461780133723)*x[0]+(0.15028897973)*x[1]**o+(-0.594920423887)*x[1]+(0.517629763426)*x[2]**o+(0.403396285863)*x[2]
-        ref[0]=o*(0.208843709667)*x_ref[0]**(o-1)+(-0.461780133723)
-        ref[1]=o*(0.15028897973)*x_ref[1]**(o-1)+(-0.594920423887)
-        ref[2]=o*(0.517629763426)*x_ref[2]**(o-1)+(0.403396285863)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.321445299816)*x[0]**o+(-0.133016832047)*x[0]+(0.663051729844)*x[1]**o+(-0.688058231943)*x[1]
-        arg[1]=(-0.0269450330081)*x[0]**o+(0.0944332164606)*x[0]+(-0.285657276114)*x[1]**o+(-0.00151309619508)*x[1]
-        ref[0,0]=o*(0.321445299816)*x_ref[0]**(o-1)+(-0.133016832047)
-        ref[0,1]=o*(0.663051729844)*x_ref[1]**(o-1)+(-0.688058231943)
-        ref[1,0]=o*(-0.0269450330081)*x_ref[0]**(o-1)+(0.0944332164606)
-        ref[1,1]=o*(-0.285657276114)*x_ref[1]**(o-1)+(-0.00151309619508)
-      else:
-        arg[0]=(-0.779418963504)*x[0]**o+(-0.66017852882)*x[0]+(0.0796746454991)*x[1]**o+(-0.559782816375)*x[1]+(0.903645344893)*x[2]**o+(0.752370056114)*x[2]
-        arg[1]=(-0.789198080015)*x[0]**o+(-0.61428352272)*x[0]+(-0.0678314090236)*x[1]**o+(-0.592189717525)*x[1]+(0.289759368386)*x[2]**o+(-0.612628874512)*x[2]
-        ref[0,0]=o*(-0.779418963504)*x_ref[0]**(o-1)+(-0.66017852882)
-        ref[0,1]=o*(0.0796746454991)*x_ref[1]**(o-1)+(-0.559782816375)
-        ref[0,2]=o*(0.903645344893)*x_ref[2]**(o-1)+(0.752370056114)
-        ref[1,0]=o*(-0.789198080015)*x_ref[0]**(o-1)+(-0.61428352272)
-        ref[1,1]=o*(-0.0678314090236)*x_ref[1]**(o-1)+(-0.592189717525)
-        ref[1,2]=o*(0.289759368386)*x_ref[2]**(o-1)+(-0.612628874512)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.23566716053)*x[0]**o+(-0.72341376636)*x[0]+(0.972511874619)*x[1]**o+(-0.915617397257)*x[1]
-        arg[0,1]=(-0.767927641628)*x[0]**o+(0.381522882363)*x[0]+(0.147312331507)*x[1]**o+(0.593669546711)*x[1]
-        arg[0,2]=(0.735354496752)*x[0]**o+(0.0328129903288)*x[0]+(-0.113236521952)*x[1]**o+(0.486761746739)*x[1]
-        arg[0,3]=(-0.324209941994)*x[0]**o+(-0.235510827792)*x[0]+(0.167116943517)*x[1]**o+(0.0751459244008)*x[1]
-        arg[0,4]=(-0.880038149806)*x[0]**o+(0.250698509807)*x[0]+(-0.249975000596)*x[1]**o+(-0.597287763096)*x[1]
-        arg[1,0]=(0.0776176376816)*x[0]**o+(0.719231364575)*x[0]+(-0.573766708326)*x[1]**o+(-0.0657431038913)*x[1]
-        arg[1,1]=(0.214586176047)*x[0]**o+(-0.542584637828)*x[0]+(-0.649916769602)*x[1]**o+(0.360674473897)*x[1]
-        arg[1,2]=(-0.131191309002)*x[0]**o+(0.00956079049513)*x[0]+(-0.0399067337815)*x[1]**o+(-0.870803424616)*x[1]
-        arg[1,3]=(-0.604243786872)*x[0]**o+(0.439677657963)*x[0]+(0.749342339715)*x[1]**o+(0.772192804507)*x[1]
-        arg[1,4]=(0.461907488239)*x[0]**o+(-0.957858912937)*x[0]+(0.915893716197)*x[1]**o+(-0.858798101783)*x[1]
-        arg[2,0]=(0.922598387398)*x[0]**o+(-0.194676923002)*x[0]+(-0.724972013231)*x[1]**o+(-0.83198174562)*x[1]
-        arg[2,1]=(0.62648959348)*x[0]**o+(-0.968390708088)*x[0]+(0.955519507666)*x[1]**o+(0.0140489471727)*x[1]
-        arg[2,2]=(-0.488249561275)*x[0]**o+(-0.354607683897)*x[0]+(-0.781278758499)*x[1]**o+(-0.206598205965)*x[1]
-        arg[2,3]=(-0.503987693598)*x[0]**o+(0.581909066959)*x[0]+(0.133400791996)*x[1]**o+(-0.234595457546)*x[1]
-        arg[2,4]=(-0.768789727431)*x[0]**o+(0.669013649323)*x[0]+(-0.618484878747)*x[1]**o+(-0.287461699457)*x[1]
-        arg[3,0]=(0.125603852132)*x[0]**o+(0.83276119445)*x[0]+(-0.643188775199)*x[1]**o+(0.228300434999)*x[1]
-        arg[3,1]=(0.645892506866)*x[0]**o+(0.701922167913)*x[0]+(-0.283958147744)*x[1]**o+(-0.781197564279)*x[1]
-        arg[3,2]=(-0.0995754594857)*x[0]**o+(-0.106281614694)*x[0]+(0.00912723779796)*x[1]**o+(0.841448365384)*x[1]
-        arg[3,3]=(-0.664740577186)*x[0]**o+(0.100401840489)*x[0]+(0.334300978415)*x[1]**o+(-0.383639183037)*x[1]
-        arg[3,4]=(0.949394733501)*x[0]**o+(-0.0768203586407)*x[0]+(0.715238033192)*x[1]**o+(-0.175178433047)*x[1]
-        ref[0,0,0]=o*(-0.23566716053)*x_ref[0]**(o-1)+(-0.72341376636)
-        ref[0,0,1]=o*(0.972511874619)*x_ref[1]**(o-1)+(-0.915617397257)
-        ref[0,1,0]=o*(-0.767927641628)*x_ref[0]**(o-1)+(0.381522882363)
-        ref[0,1,1]=o*(0.147312331507)*x_ref[1]**(o-1)+(0.593669546711)
-        ref[0,2,0]=o*(0.735354496752)*x_ref[0]**(o-1)+(0.0328129903288)
-        ref[0,2,1]=o*(-0.113236521952)*x_ref[1]**(o-1)+(0.486761746739)
-        ref[0,3,0]=o*(-0.324209941994)*x_ref[0]**(o-1)+(-0.235510827792)
-        ref[0,3,1]=o*(0.167116943517)*x_ref[1]**(o-1)+(0.0751459244008)
-        ref[0,4,0]=o*(-0.880038149806)*x_ref[0]**(o-1)+(0.250698509807)
-        ref[0,4,1]=o*(-0.249975000596)*x_ref[1]**(o-1)+(-0.597287763096)
-        ref[1,0,0]=o*(0.0776176376816)*x_ref[0]**(o-1)+(0.719231364575)
-        ref[1,0,1]=o*(-0.573766708326)*x_ref[1]**(o-1)+(-0.0657431038913)
-        ref[1,1,0]=o*(0.214586176047)*x_ref[0]**(o-1)+(-0.542584637828)
-        ref[1,1,1]=o*(-0.649916769602)*x_ref[1]**(o-1)+(0.360674473897)
-        ref[1,2,0]=o*(-0.131191309002)*x_ref[0]**(o-1)+(0.00956079049513)
-        ref[1,2,1]=o*(-0.0399067337815)*x_ref[1]**(o-1)+(-0.870803424616)
-        ref[1,3,0]=o*(-0.604243786872)*x_ref[0]**(o-1)+(0.439677657963)
-        ref[1,3,1]=o*(0.749342339715)*x_ref[1]**(o-1)+(0.772192804507)
-        ref[1,4,0]=o*(0.461907488239)*x_ref[0]**(o-1)+(-0.957858912937)
-        ref[1,4,1]=o*(0.915893716197)*x_ref[1]**(o-1)+(-0.858798101783)
-        ref[2,0,0]=o*(0.922598387398)*x_ref[0]**(o-1)+(-0.194676923002)
-        ref[2,0,1]=o*(-0.724972013231)*x_ref[1]**(o-1)+(-0.83198174562)
-        ref[2,1,0]=o*(0.62648959348)*x_ref[0]**(o-1)+(-0.968390708088)
-        ref[2,1,1]=o*(0.955519507666)*x_ref[1]**(o-1)+(0.0140489471727)
-        ref[2,2,0]=o*(-0.488249561275)*x_ref[0]**(o-1)+(-0.354607683897)
-        ref[2,2,1]=o*(-0.781278758499)*x_ref[1]**(o-1)+(-0.206598205965)
-        ref[2,3,0]=o*(-0.503987693598)*x_ref[0]**(o-1)+(0.581909066959)
-        ref[2,3,1]=o*(0.133400791996)*x_ref[1]**(o-1)+(-0.234595457546)
-        ref[2,4,0]=o*(-0.768789727431)*x_ref[0]**(o-1)+(0.669013649323)
-        ref[2,4,1]=o*(-0.618484878747)*x_ref[1]**(o-1)+(-0.287461699457)
-        ref[3,0,0]=o*(0.125603852132)*x_ref[0]**(o-1)+(0.83276119445)
-        ref[3,0,1]=o*(-0.643188775199)*x_ref[1]**(o-1)+(0.228300434999)
-        ref[3,1,0]=o*(0.645892506866)*x_ref[0]**(o-1)+(0.701922167913)
-        ref[3,1,1]=o*(-0.283958147744)*x_ref[1]**(o-1)+(-0.781197564279)
-        ref[3,2,0]=o*(-0.0995754594857)*x_ref[0]**(o-1)+(-0.106281614694)
-        ref[3,2,1]=o*(0.00912723779796)*x_ref[1]**(o-1)+(0.841448365384)
-        ref[3,3,0]=o*(-0.664740577186)*x_ref[0]**(o-1)+(0.100401840489)
-        ref[3,3,1]=o*(0.334300978415)*x_ref[1]**(o-1)+(-0.383639183037)
-        ref[3,4,0]=o*(0.949394733501)*x_ref[0]**(o-1)+(-0.0768203586407)
-        ref[3,4,1]=o*(0.715238033192)*x_ref[1]**(o-1)+(-0.175178433047)
-      else:
-        arg[0,0]=(0.697509098917)*x[0]**o+(-0.571983680004)*x[0]+(0.456254556306)*x[1]**o+(0.407076527516)*x[1]+(-0.379511349609)*x[2]**o+(0.37799055755)*x[2]
-        arg[0,1]=(-0.543310012054)*x[0]**o+(0.622613643381)*x[0]+(0.899028609397)*x[1]**o+(0.0358870746022)*x[1]+(0.923875380698)*x[2]**o+(-0.79605331054)*x[2]
-        arg[0,2]=(0.613316685189)*x[0]**o+(0.308568047177)*x[0]+(0.0817110033202)*x[1]**o+(0.631167179752)*x[1]+(0.527259723046)*x[2]**o+(-0.44240882282)*x[2]
-        arg[0,3]=(0.831261835833)*x[0]**o+(-0.0869775296331)*x[0]+(0.30622781536)*x[1]**o+(0.633056041347)*x[1]+(0.631243241273)*x[2]**o+(0.100112313541)*x[2]
-        arg[0,4]=(-0.997030704248)*x[0]**o+(-0.374466395678)*x[0]+(0.0194535973217)*x[1]**o+(0.816505299829)*x[1]+(-0.412869831136)*x[2]**o+(-0.943976805293)*x[2]
-        arg[1,0]=(0.555404162574)*x[0]**o+(-0.335389786458)*x[0]+(0.644585507787)*x[1]**o+(0.917280812233)*x[1]+(0.417410132456)*x[2]**o+(-0.26505427144)*x[2]
-        arg[1,1]=(0.781185373116)*x[0]**o+(-0.852319927495)*x[0]+(-0.442528270016)*x[1]**o+(-0.538132919634)*x[1]+(-0.604047417588)*x[2]**o+(0.727395882535)*x[2]
-        arg[1,2]=(-0.272462727471)*x[0]**o+(-0.834077558378)*x[0]+(0.763269297137)*x[1]**o+(-0.823180222291)*x[1]+(-0.162146758865)*x[2]**o+(0.595529366226)*x[2]
-        arg[1,3]=(-0.0468429326976)*x[0]**o+(-0.179116342871)*x[0]+(-0.640563576973)*x[1]**o+(0.914070705704)*x[1]+(0.725297040984)*x[2]**o+(0.870302256055)*x[2]
-        arg[1,4]=(-0.0632444730547)*x[0]**o+(-0.266315658984)*x[0]+(0.533681589116)*x[1]**o+(0.709939511175)*x[1]+(-0.60554532679)*x[2]**o+(0.915224044125)*x[2]
-        arg[2,0]=(0.23330035938)*x[0]**o+(-0.385419740264)*x[0]+(0.120424890588)*x[1]**o+(0.591983224766)*x[1]+(0.925564960339)*x[2]**o+(-0.602528014193)*x[2]
-        arg[2,1]=(0.786024569139)*x[0]**o+(0.619287163829)*x[0]+(-0.722187904611)*x[1]**o+(0.275352886478)*x[1]+(0.723591624164)*x[2]**o+(0.0909486746072)*x[2]
-        arg[2,2]=(0.766293557291)*x[0]**o+(0.0610694643295)*x[0]+(0.375714644104)*x[1]**o+(-0.772092520637)*x[1]+(0.775058332825)*x[2]**o+(0.533525926942)*x[2]
-        arg[2,3]=(-0.67254491898)*x[0]**o+(-0.0926113197516)*x[0]+(-0.615891770107)*x[1]**o+(-0.616600504392)*x[1]+(-0.808251600122)*x[2]**o+(-0.602309670223)*x[2]
-        arg[2,4]=(0.80242562495)*x[0]**o+(0.359171734464)*x[0]+(-0.560256436586)*x[1]**o+(-0.420334736194)*x[1]+(0.871043977034)*x[2]**o+(0.156212055829)*x[2]
-        arg[3,0]=(-0.0569856826934)*x[0]**o+(-0.381868544897)*x[0]+(-0.396013644801)*x[1]**o+(0.695329212849)*x[1]+(0.201188831017)*x[2]**o+(0.471078018432)*x[2]
-        arg[3,1]=(0.28457474179)*x[0]**o+(-0.623305572154)*x[0]+(-0.442659858168)*x[1]**o+(0.725900635371)*x[1]+(-0.908206119008)*x[2]**o+(-0.190223696293)*x[2]
-        arg[3,2]=(0.568043480074)*x[0]**o+(0.942235524274)*x[0]+(-0.720727900911)*x[1]**o+(0.771808109591)*x[1]+(-0.538996050264)*x[2]**o+(-0.641448383256)*x[2]
-        arg[3,3]=(0.00707362989382)*x[0]**o+(0.139812417833)*x[0]+(-0.179986304531)*x[1]**o+(-0.546332565953)*x[1]+(-0.687783685855)*x[2]**o+(0.292513389166)*x[2]
-        arg[3,4]=(0.657315930332)*x[0]**o+(0.0252304793386)*x[0]+(0.540737656651)*x[1]**o+(0.832327802479)*x[1]+(-0.822641904799)*x[2]**o+(-0.599972412377)*x[2]
-        ref[0,0,0]=o*(0.697509098917)*x_ref[0]**(o-1)+(-0.571983680004)
-        ref[0,0,1]=o*(0.456254556306)*x_ref[1]**(o-1)+(0.407076527516)
-        ref[0,0,2]=o*(-0.379511349609)*x_ref[2]**(o-1)+(0.37799055755)
-        ref[0,1,0]=o*(-0.543310012054)*x_ref[0]**(o-1)+(0.622613643381)
-        ref[0,1,1]=o*(0.899028609397)*x_ref[1]**(o-1)+(0.0358870746022)
-        ref[0,1,2]=o*(0.923875380698)*x_ref[2]**(o-1)+(-0.79605331054)
-        ref[0,2,0]=o*(0.613316685189)*x_ref[0]**(o-1)+(0.308568047177)
-        ref[0,2,1]=o*(0.0817110033202)*x_ref[1]**(o-1)+(0.631167179752)
-        ref[0,2,2]=o*(0.527259723046)*x_ref[2]**(o-1)+(-0.44240882282)
-        ref[0,3,0]=o*(0.831261835833)*x_ref[0]**(o-1)+(-0.0869775296331)
-        ref[0,3,1]=o*(0.30622781536)*x_ref[1]**(o-1)+(0.633056041347)
-        ref[0,3,2]=o*(0.631243241273)*x_ref[2]**(o-1)+(0.100112313541)
-        ref[0,4,0]=o*(-0.997030704248)*x_ref[0]**(o-1)+(-0.374466395678)
-        ref[0,4,1]=o*(0.0194535973217)*x_ref[1]**(o-1)+(0.816505299829)
-        ref[0,4,2]=o*(-0.412869831136)*x_ref[2]**(o-1)+(-0.943976805293)
-        ref[1,0,0]=o*(0.555404162574)*x_ref[0]**(o-1)+(-0.335389786458)
-        ref[1,0,1]=o*(0.644585507787)*x_ref[1]**(o-1)+(0.917280812233)
-        ref[1,0,2]=o*(0.417410132456)*x_ref[2]**(o-1)+(-0.26505427144)
-        ref[1,1,0]=o*(0.781185373116)*x_ref[0]**(o-1)+(-0.852319927495)
-        ref[1,1,1]=o*(-0.442528270016)*x_ref[1]**(o-1)+(-0.538132919634)
-        ref[1,1,2]=o*(-0.604047417588)*x_ref[2]**(o-1)+(0.727395882535)
-        ref[1,2,0]=o*(-0.272462727471)*x_ref[0]**(o-1)+(-0.834077558378)
-        ref[1,2,1]=o*(0.763269297137)*x_ref[1]**(o-1)+(-0.823180222291)
-        ref[1,2,2]=o*(-0.162146758865)*x_ref[2]**(o-1)+(0.595529366226)
-        ref[1,3,0]=o*(-0.0468429326976)*x_ref[0]**(o-1)+(-0.179116342871)
-        ref[1,3,1]=o*(-0.640563576973)*x_ref[1]**(o-1)+(0.914070705704)
-        ref[1,3,2]=o*(0.725297040984)*x_ref[2]**(o-1)+(0.870302256055)
-        ref[1,4,0]=o*(-0.0632444730547)*x_ref[0]**(o-1)+(-0.266315658984)
-        ref[1,4,1]=o*(0.533681589116)*x_ref[1]**(o-1)+(0.709939511175)
-        ref[1,4,2]=o*(-0.60554532679)*x_ref[2]**(o-1)+(0.915224044125)
-        ref[2,0,0]=o*(0.23330035938)*x_ref[0]**(o-1)+(-0.385419740264)
-        ref[2,0,1]=o*(0.120424890588)*x_ref[1]**(o-1)+(0.591983224766)
-        ref[2,0,2]=o*(0.925564960339)*x_ref[2]**(o-1)+(-0.602528014193)
-        ref[2,1,0]=o*(0.786024569139)*x_ref[0]**(o-1)+(0.619287163829)
-        ref[2,1,1]=o*(-0.722187904611)*x_ref[1]**(o-1)+(0.275352886478)
-        ref[2,1,2]=o*(0.723591624164)*x_ref[2]**(o-1)+(0.0909486746072)
-        ref[2,2,0]=o*(0.766293557291)*x_ref[0]**(o-1)+(0.0610694643295)
-        ref[2,2,1]=o*(0.375714644104)*x_ref[1]**(o-1)+(-0.772092520637)
-        ref[2,2,2]=o*(0.775058332825)*x_ref[2]**(o-1)+(0.533525926942)
-        ref[2,3,0]=o*(-0.67254491898)*x_ref[0]**(o-1)+(-0.0926113197516)
-        ref[2,3,1]=o*(-0.615891770107)*x_ref[1]**(o-1)+(-0.616600504392)
-        ref[2,3,2]=o*(-0.808251600122)*x_ref[2]**(o-1)+(-0.602309670223)
-        ref[2,4,0]=o*(0.80242562495)*x_ref[0]**(o-1)+(0.359171734464)
-        ref[2,4,1]=o*(-0.560256436586)*x_ref[1]**(o-1)+(-0.420334736194)
-        ref[2,4,2]=o*(0.871043977034)*x_ref[2]**(o-1)+(0.156212055829)
-        ref[3,0,0]=o*(-0.0569856826934)*x_ref[0]**(o-1)+(-0.381868544897)
-        ref[3,0,1]=o*(-0.396013644801)*x_ref[1]**(o-1)+(0.695329212849)
-        ref[3,0,2]=o*(0.201188831017)*x_ref[2]**(o-1)+(0.471078018432)
-        ref[3,1,0]=o*(0.28457474179)*x_ref[0]**(o-1)+(-0.623305572154)
-        ref[3,1,1]=o*(-0.442659858168)*x_ref[1]**(o-1)+(0.725900635371)
-        ref[3,1,2]=o*(-0.908206119008)*x_ref[2]**(o-1)+(-0.190223696293)
-        ref[3,2,0]=o*(0.568043480074)*x_ref[0]**(o-1)+(0.942235524274)
-        ref[3,2,1]=o*(-0.720727900911)*x_ref[1]**(o-1)+(0.771808109591)
-        ref[3,2,2]=o*(-0.538996050264)*x_ref[2]**(o-1)+(-0.641448383256)
-        ref[3,3,0]=o*(0.00707362989382)*x_ref[0]**(o-1)+(0.139812417833)
-        ref[3,3,1]=o*(-0.179986304531)*x_ref[1]**(o-1)+(-0.546332565953)
-        ref[3,3,2]=o*(-0.687783685855)*x_ref[2]**(o-1)+(0.292513389166)
-        ref[3,4,0]=o*(0.657315930332)*x_ref[0]**(o-1)+(0.0252304793386)
-        ref[3,4,1]=o*(0.540737656651)*x_ref[1]**(o-1)+(0.832327802479)
-        ref[3,4,2]=o*(-0.822641904799)*x_ref[2]**(o-1)+(-0.599972412377)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.711259674136)*x[0]**o+(0.597099394118)*x[0]+(0.656676641605)*x[1]**o+(0.800065074626)*x[1]
-        arg[0,0,1]=(0.410575880869)*x[0]**o+(0.0290305819624)*x[0]+(-0.746442034948)*x[1]**o+(0.074826200729)*x[1]
-        arg[0,1,0]=(0.478073638149)*x[0]**o+(0.856920711223)*x[0]+(0.517173340088)*x[1]**o+(-0.677846282063)*x[1]
-        arg[0,1,1]=(0.285231489647)*x[0]**o+(0.0756593965609)*x[0]+(-0.355221676478)*x[1]**o+(-0.520564308221)*x[1]
-        arg[1,0,0]=(-0.368777104698)*x[0]**o+(0.474996103371)*x[0]+(0.675654207136)*x[1]**o+(-0.0324979517659)*x[1]
-        arg[1,0,1]=(0.498857835281)*x[0]**o+(-0.73836840989)*x[0]+(0.362789682422)*x[1]**o+(0.315425076703)*x[1]
-        arg[1,1,0]=(-0.325384820094)*x[0]**o+(-0.895297521761)*x[0]+(0.563090918504)*x[1]**o+(0.589834648825)*x[1]
-        arg[1,1,1]=(0.0378060061714)*x[0]**o+(-0.429064920806)*x[0]+(-0.467324629077)*x[1]**o+(0.938161415082)*x[1]
-        arg[2,0,0]=(-0.527827738902)*x[0]**o+(-0.534425169092)*x[0]+(-0.185111533531)*x[1]**o+(-0.810076656622)*x[1]
-        arg[2,0,1]=(-0.221712302033)*x[0]**o+(0.883619587624)*x[0]+(-0.972912188123)*x[1]**o+(0.0780565750992)*x[1]
-        arg[2,1,0]=(-0.752942706408)*x[0]**o+(-0.153790659605)*x[0]+(-0.398384592556)*x[1]**o+(0.657319049074)*x[1]
-        arg[2,1,1]=(0.428492876383)*x[0]**o+(0.427090189076)*x[0]+(-0.017400284896)*x[1]**o+(-0.730635641841)*x[1]
-        arg[3,0,0]=(-0.644602330168)*x[0]**o+(0.706532342264)*x[0]+(-0.64532460698)*x[1]**o+(0.850059843173)*x[1]
-        arg[3,0,1]=(-0.63066688687)*x[0]**o+(0.578132047851)*x[0]+(0.413335880906)*x[1]**o+(0.611233278281)*x[1]
-        arg[3,1,0]=(-0.247378556309)*x[0]**o+(-0.631688468936)*x[0]+(-0.898130068425)*x[1]**o+(0.147210661251)*x[1]
-        arg[3,1,1]=(0.979026126394)*x[0]**o+(-0.231003559285)*x[0]+(-0.884530953901)*x[1]**o+(-0.453907922804)*x[1]
-        arg[4,0,0]=(-0.584910281652)*x[0]**o+(-0.808929690751)*x[0]+(0.661854511996)*x[1]**o+(0.262336033771)*x[1]
-        arg[4,0,1]=(0.32006961919)*x[0]**o+(0.407637671852)*x[0]+(-0.36617527544)*x[1]**o+(-0.28786191714)*x[1]
-        arg[4,1,0]=(0.718670448416)*x[0]**o+(-0.836956284868)*x[0]+(0.694744974874)*x[1]**o+(-0.176920245996)*x[1]
-        arg[4,1,1]=(-0.892867770142)*x[0]**o+(-0.439240069099)*x[0]+(0.960956271989)*x[1]**o+(-0.559541152716)*x[1]
-        arg[5,0,0]=(-0.159459484106)*x[0]**o+(0.497366075466)*x[0]+(0.776343693655)*x[1]**o+(0.326882397775)*x[1]
-        arg[5,0,1]=(-0.769197598992)*x[0]**o+(-0.155931232816)*x[0]+(0.306889959757)*x[1]**o+(0.283798117232)*x[1]
-        arg[5,1,0]=(0.329987736778)*x[0]**o+(-0.181917315586)*x[0]+(0.896508353752)*x[1]**o+(0.505276687831)*x[1]
-        arg[5,1,1]=(-0.805264678584)*x[0]**o+(0.1541429191)*x[0]+(0.759370357364)*x[1]**o+(-0.858941373648)*x[1]
-        ref[0,0,0,0]=o*(0.711259674136)*x_ref[0]**(o-1)+(0.597099394118)
-        ref[0,0,0,1]=o*(0.656676641605)*x_ref[1]**(o-1)+(0.800065074626)
-        ref[0,0,1,0]=o*(0.410575880869)*x_ref[0]**(o-1)+(0.0290305819624)
-        ref[0,0,1,1]=o*(-0.746442034948)*x_ref[1]**(o-1)+(0.074826200729)
-        ref[0,1,0,0]=o*(0.478073638149)*x_ref[0]**(o-1)+(0.856920711223)
-        ref[0,1,0,1]=o*(0.517173340088)*x_ref[1]**(o-1)+(-0.677846282063)
-        ref[0,1,1,0]=o*(0.285231489647)*x_ref[0]**(o-1)+(0.0756593965609)
-        ref[0,1,1,1]=o*(-0.355221676478)*x_ref[1]**(o-1)+(-0.520564308221)
-        ref[1,0,0,0]=o*(-0.368777104698)*x_ref[0]**(o-1)+(0.474996103371)
-        ref[1,0,0,1]=o*(0.675654207136)*x_ref[1]**(o-1)+(-0.0324979517659)
-        ref[1,0,1,0]=o*(0.498857835281)*x_ref[0]**(o-1)+(-0.73836840989)
-        ref[1,0,1,1]=o*(0.362789682422)*x_ref[1]**(o-1)+(0.315425076703)
-        ref[1,1,0,0]=o*(-0.325384820094)*x_ref[0]**(o-1)+(-0.895297521761)
-        ref[1,1,0,1]=o*(0.563090918504)*x_ref[1]**(o-1)+(0.589834648825)
-        ref[1,1,1,0]=o*(0.0378060061714)*x_ref[0]**(o-1)+(-0.429064920806)
-        ref[1,1,1,1]=o*(-0.467324629077)*x_ref[1]**(o-1)+(0.938161415082)
-        ref[2,0,0,0]=o*(-0.527827738902)*x_ref[0]**(o-1)+(-0.534425169092)
-        ref[2,0,0,1]=o*(-0.185111533531)*x_ref[1]**(o-1)+(-0.810076656622)
-        ref[2,0,1,0]=o*(-0.221712302033)*x_ref[0]**(o-1)+(0.883619587624)
-        ref[2,0,1,1]=o*(-0.972912188123)*x_ref[1]**(o-1)+(0.0780565750992)
-        ref[2,1,0,0]=o*(-0.752942706408)*x_ref[0]**(o-1)+(-0.153790659605)
-        ref[2,1,0,1]=o*(-0.398384592556)*x_ref[1]**(o-1)+(0.657319049074)
-        ref[2,1,1,0]=o*(0.428492876383)*x_ref[0]**(o-1)+(0.427090189076)
-        ref[2,1,1,1]=o*(-0.017400284896)*x_ref[1]**(o-1)+(-0.730635641841)
-        ref[3,0,0,0]=o*(-0.644602330168)*x_ref[0]**(o-1)+(0.706532342264)
-        ref[3,0,0,1]=o*(-0.64532460698)*x_ref[1]**(o-1)+(0.850059843173)
-        ref[3,0,1,0]=o*(-0.63066688687)*x_ref[0]**(o-1)+(0.578132047851)
-        ref[3,0,1,1]=o*(0.413335880906)*x_ref[1]**(o-1)+(0.611233278281)
-        ref[3,1,0,0]=o*(-0.247378556309)*x_ref[0]**(o-1)+(-0.631688468936)
-        ref[3,1,0,1]=o*(-0.898130068425)*x_ref[1]**(o-1)+(0.147210661251)
-        ref[3,1,1,0]=o*(0.979026126394)*x_ref[0]**(o-1)+(-0.231003559285)
-        ref[3,1,1,1]=o*(-0.884530953901)*x_ref[1]**(o-1)+(-0.453907922804)
-        ref[4,0,0,0]=o*(-0.584910281652)*x_ref[0]**(o-1)+(-0.808929690751)
-        ref[4,0,0,1]=o*(0.661854511996)*x_ref[1]**(o-1)+(0.262336033771)
-        ref[4,0,1,0]=o*(0.32006961919)*x_ref[0]**(o-1)+(0.407637671852)
-        ref[4,0,1,1]=o*(-0.36617527544)*x_ref[1]**(o-1)+(-0.28786191714)
-        ref[4,1,0,0]=o*(0.718670448416)*x_ref[0]**(o-1)+(-0.836956284868)
-        ref[4,1,0,1]=o*(0.694744974874)*x_ref[1]**(o-1)+(-0.176920245996)
-        ref[4,1,1,0]=o*(-0.892867770142)*x_ref[0]**(o-1)+(-0.439240069099)
-        ref[4,1,1,1]=o*(0.960956271989)*x_ref[1]**(o-1)+(-0.559541152716)
-        ref[5,0,0,0]=o*(-0.159459484106)*x_ref[0]**(o-1)+(0.497366075466)
-        ref[5,0,0,1]=o*(0.776343693655)*x_ref[1]**(o-1)+(0.326882397775)
-        ref[5,0,1,0]=o*(-0.769197598992)*x_ref[0]**(o-1)+(-0.155931232816)
-        ref[5,0,1,1]=o*(0.306889959757)*x_ref[1]**(o-1)+(0.283798117232)
-        ref[5,1,0,0]=o*(0.329987736778)*x_ref[0]**(o-1)+(-0.181917315586)
-        ref[5,1,0,1]=o*(0.896508353752)*x_ref[1]**(o-1)+(0.505276687831)
-        ref[5,1,1,0]=o*(-0.805264678584)*x_ref[0]**(o-1)+(0.1541429191)
-        ref[5,1,1,1]=o*(0.759370357364)*x_ref[1]**(o-1)+(-0.858941373648)
-      else:
-        arg[0,0,0]=(0.168268053227)*x[0]**o+(-0.693455720059)*x[0]+(-0.929660815724)*x[1]**o+(0.986095168154)*x[1]+(0.736239785757)*x[2]**o+(-0.852231596742)*x[2]
-        arg[0,0,1]=(-0.246755690586)*x[0]**o+(0.374568513964)*x[0]+(-0.964930789849)*x[1]**o+(0.911595670675)*x[1]+(-0.450825843592)*x[2]**o+(0.109918389584)*x[2]
-        arg[0,1,0]=(-0.733872890764)*x[0]**o+(-0.673737586895)*x[0]+(0.948528017502)*x[1]**o+(0.00135698010622)*x[1]+(0.960702320728)*x[2]**o+(-0.0223793346126)*x[2]
-        arg[0,1,1]=(0.117470384547)*x[0]**o+(0.390065805504)*x[0]+(0.116939897886)*x[1]**o+(0.201756470627)*x[1]+(0.649311190776)*x[2]**o+(-0.388330674246)*x[2]
-        arg[1,0,0]=(0.848074231014)*x[0]**o+(-0.431699971504)*x[0]+(0.956477578677)*x[1]**o+(0.522633753414)*x[1]+(0.147733403055)*x[2]**o+(0.136817362225)*x[2]
-        arg[1,0,1]=(0.482934543775)*x[0]**o+(-0.358181242578)*x[0]+(-0.013088278343)*x[1]**o+(0.002654195003)*x[1]+(0.960898421715)*x[2]**o+(0.23166323571)*x[2]
-        arg[1,1,0]=(-0.60469206115)*x[0]**o+(-0.449073005118)*x[0]+(-0.0774626329204)*x[1]**o+(-0.135772353437)*x[1]+(-0.796309060217)*x[2]**o+(-0.0601212417342)*x[2]
-        arg[1,1,1]=(0.41742915222)*x[0]**o+(-0.907531578792)*x[0]+(-0.998018453394)*x[1]**o+(0.38863222527)*x[1]+(-0.941909949653)*x[2]**o+(-0.962025400733)*x[2]
-        arg[2,0,0]=(0.677803680186)*x[0]**o+(0.493757303449)*x[0]+(-0.700353467324)*x[1]**o+(0.713489396377)*x[1]+(-0.147276750564)*x[2]**o+(-0.666815984705)*x[2]
-        arg[2,0,1]=(-0.196166170445)*x[0]**o+(-0.776357160477)*x[0]+(0.531757851468)*x[1]**o+(-0.0951663105473)*x[1]+(0.296695659682)*x[2]**o+(0.132047740242)*x[2]
-        arg[2,1,0]=(0.89703218788)*x[0]**o+(0.446461958293)*x[0]+(0.849781349832)*x[1]**o+(0.495003438762)*x[1]+(0.200866318394)*x[2]**o+(-0.239158244355)*x[2]
-        arg[2,1,1]=(0.699816693)*x[0]**o+(-0.498016262468)*x[0]+(0.467212425781)*x[1]**o+(0.507210685133)*x[1]+(0.872000089805)*x[2]**o+(-0.608415132584)*x[2]
-        arg[3,0,0]=(-0.858779999521)*x[0]**o+(-0.934307938564)*x[0]+(0.998531969194)*x[1]**o+(-0.10694369616)*x[1]+(0.565515051636)*x[2]**o+(-0.340328286843)*x[2]
-        arg[3,0,1]=(-0.734447160975)*x[0]**o+(0.592969337009)*x[0]+(0.769648460523)*x[1]**o+(0.939994123398)*x[1]+(-0.14168879251)*x[2]**o+(-0.151602759825)*x[2]
-        arg[3,1,0]=(-0.204447368694)*x[0]**o+(-0.149512701586)*x[0]+(0.496643987821)*x[1]**o+(0.137154021271)*x[1]+(-0.207451973465)*x[2]**o+(0.976289933313)*x[2]
-        arg[3,1,1]=(-0.498939396392)*x[0]**o+(-0.388761371521)*x[0]+(0.918876234523)*x[1]**o+(0.326334103437)*x[1]+(0.135801853065)*x[2]**o+(-0.513268577694)*x[2]
-        arg[4,0,0]=(0.383369953978)*x[0]**o+(0.262190952188)*x[0]+(0.226913840907)*x[1]**o+(0.625767074123)*x[1]+(0.0736409418752)*x[2]**o+(-0.681643359069)*x[2]
-        arg[4,0,1]=(-0.00395633017219)*x[0]**o+(0.103598757494)*x[0]+(0.245388867438)*x[1]**o+(0.0199139065324)*x[1]+(-0.85935209669)*x[2]**o+(0.780770429677)*x[2]
-        arg[4,1,0]=(0.93284113054)*x[0]**o+(0.192867707515)*x[0]+(0.354258046046)*x[1]**o+(0.0244899514488)*x[1]+(-0.00723308587137)*x[2]**o+(0.724287748378)*x[2]
-        arg[4,1,1]=(-0.701870704251)*x[0]**o+(0.29146856048)*x[0]+(-0.677358067691)*x[1]**o+(-0.055827889309)*x[1]+(0.96248585097)*x[2]**o+(0.100526700803)*x[2]
-        arg[5,0,0]=(-0.582058132348)*x[0]**o+(0.5354038569)*x[0]+(-0.608415656952)*x[1]**o+(0.700352801694)*x[1]+(-0.705438310252)*x[2]**o+(0.969824711925)*x[2]
-        arg[5,0,1]=(-0.573326444971)*x[0]**o+(0.00490482707944)*x[0]+(0.300312254171)*x[1]**o+(-0.620154697788)*x[1]+(-0.0703788860867)*x[2]**o+(-0.608567609941)*x[2]
-        arg[5,1,0]=(0.346782282755)*x[0]**o+(-0.022146949553)*x[0]+(0.548359292626)*x[1]**o+(0.314315074761)*x[1]+(0.164808336191)*x[2]**o+(-0.983018613943)*x[2]
-        arg[5,1,1]=(-0.357126808896)*x[0]**o+(0.547191129837)*x[0]+(-0.0128153418859)*x[1]**o+(-0.199507147279)*x[1]+(-0.637546467191)*x[2]**o+(0.65056997574)*x[2]
-        ref[0,0,0,0]=o*(0.168268053227)*x_ref[0]**(o-1)+(-0.693455720059)
-        ref[0,0,0,1]=o*(-0.929660815724)*x_ref[1]**(o-1)+(0.986095168154)
-        ref[0,0,0,2]=o*(0.736239785757)*x_ref[2]**(o-1)+(-0.852231596742)
-        ref[0,0,1,0]=o*(-0.246755690586)*x_ref[0]**(o-1)+(0.374568513964)
-        ref[0,0,1,1]=o*(-0.964930789849)*x_ref[1]**(o-1)+(0.911595670675)
-        ref[0,0,1,2]=o*(-0.450825843592)*x_ref[2]**(o-1)+(0.109918389584)
-        ref[0,1,0,0]=o*(-0.733872890764)*x_ref[0]**(o-1)+(-0.673737586895)
-        ref[0,1,0,1]=o*(0.948528017502)*x_ref[1]**(o-1)+(0.00135698010622)
-        ref[0,1,0,2]=o*(0.960702320728)*x_ref[2]**(o-1)+(-0.0223793346126)
-        ref[0,1,1,0]=o*(0.117470384547)*x_ref[0]**(o-1)+(0.390065805504)
-        ref[0,1,1,1]=o*(0.116939897886)*x_ref[1]**(o-1)+(0.201756470627)
-        ref[0,1,1,2]=o*(0.649311190776)*x_ref[2]**(o-1)+(-0.388330674246)
-        ref[1,0,0,0]=o*(0.848074231014)*x_ref[0]**(o-1)+(-0.431699971504)
-        ref[1,0,0,1]=o*(0.956477578677)*x_ref[1]**(o-1)+(0.522633753414)
-        ref[1,0,0,2]=o*(0.147733403055)*x_ref[2]**(o-1)+(0.136817362225)
-        ref[1,0,1,0]=o*(0.482934543775)*x_ref[0]**(o-1)+(-0.358181242578)
-        ref[1,0,1,1]=o*(-0.013088278343)*x_ref[1]**(o-1)+(0.002654195003)
-        ref[1,0,1,2]=o*(0.960898421715)*x_ref[2]**(o-1)+(0.23166323571)
-        ref[1,1,0,0]=o*(-0.60469206115)*x_ref[0]**(o-1)+(-0.449073005118)
-        ref[1,1,0,1]=o*(-0.0774626329204)*x_ref[1]**(o-1)+(-0.135772353437)
-        ref[1,1,0,2]=o*(-0.796309060217)*x_ref[2]**(o-1)+(-0.0601212417342)
-        ref[1,1,1,0]=o*(0.41742915222)*x_ref[0]**(o-1)+(-0.907531578792)
-        ref[1,1,1,1]=o*(-0.998018453394)*x_ref[1]**(o-1)+(0.38863222527)
-        ref[1,1,1,2]=o*(-0.941909949653)*x_ref[2]**(o-1)+(-0.962025400733)
-        ref[2,0,0,0]=o*(0.677803680186)*x_ref[0]**(o-1)+(0.493757303449)
-        ref[2,0,0,1]=o*(-0.700353467324)*x_ref[1]**(o-1)+(0.713489396377)
-        ref[2,0,0,2]=o*(-0.147276750564)*x_ref[2]**(o-1)+(-0.666815984705)
-        ref[2,0,1,0]=o*(-0.196166170445)*x_ref[0]**(o-1)+(-0.776357160477)
-        ref[2,0,1,1]=o*(0.531757851468)*x_ref[1]**(o-1)+(-0.0951663105473)
-        ref[2,0,1,2]=o*(0.296695659682)*x_ref[2]**(o-1)+(0.132047740242)
-        ref[2,1,0,0]=o*(0.89703218788)*x_ref[0]**(o-1)+(0.446461958293)
-        ref[2,1,0,1]=o*(0.849781349832)*x_ref[1]**(o-1)+(0.495003438762)
-        ref[2,1,0,2]=o*(0.200866318394)*x_ref[2]**(o-1)+(-0.239158244355)
-        ref[2,1,1,0]=o*(0.699816693)*x_ref[0]**(o-1)+(-0.498016262468)
-        ref[2,1,1,1]=o*(0.467212425781)*x_ref[1]**(o-1)+(0.507210685133)
-        ref[2,1,1,2]=o*(0.872000089805)*x_ref[2]**(o-1)+(-0.608415132584)
-        ref[3,0,0,0]=o*(-0.858779999521)*x_ref[0]**(o-1)+(-0.934307938564)
-        ref[3,0,0,1]=o*(0.998531969194)*x_ref[1]**(o-1)+(-0.10694369616)
-        ref[3,0,0,2]=o*(0.565515051636)*x_ref[2]**(o-1)+(-0.340328286843)
-        ref[3,0,1,0]=o*(-0.734447160975)*x_ref[0]**(o-1)+(0.592969337009)
-        ref[3,0,1,1]=o*(0.769648460523)*x_ref[1]**(o-1)+(0.939994123398)
-        ref[3,0,1,2]=o*(-0.14168879251)*x_ref[2]**(o-1)+(-0.151602759825)
-        ref[3,1,0,0]=o*(-0.204447368694)*x_ref[0]**(o-1)+(-0.149512701586)
-        ref[3,1,0,1]=o*(0.496643987821)*x_ref[1]**(o-1)+(0.137154021271)
-        ref[3,1,0,2]=o*(-0.207451973465)*x_ref[2]**(o-1)+(0.976289933313)
-        ref[3,1,1,0]=o*(-0.498939396392)*x_ref[0]**(o-1)+(-0.388761371521)
-        ref[3,1,1,1]=o*(0.918876234523)*x_ref[1]**(o-1)+(0.326334103437)
-        ref[3,1,1,2]=o*(0.135801853065)*x_ref[2]**(o-1)+(-0.513268577694)
-        ref[4,0,0,0]=o*(0.383369953978)*x_ref[0]**(o-1)+(0.262190952188)
-        ref[4,0,0,1]=o*(0.226913840907)*x_ref[1]**(o-1)+(0.625767074123)
-        ref[4,0,0,2]=o*(0.0736409418752)*x_ref[2]**(o-1)+(-0.681643359069)
-        ref[4,0,1,0]=o*(-0.00395633017219)*x_ref[0]**(o-1)+(0.103598757494)
-        ref[4,0,1,1]=o*(0.245388867438)*x_ref[1]**(o-1)+(0.0199139065324)
-        ref[4,0,1,2]=o*(-0.85935209669)*x_ref[2]**(o-1)+(0.780770429677)
-        ref[4,1,0,0]=o*(0.93284113054)*x_ref[0]**(o-1)+(0.192867707515)
-        ref[4,1,0,1]=o*(0.354258046046)*x_ref[1]**(o-1)+(0.0244899514488)
-        ref[4,1,0,2]=o*(-0.00723308587137)*x_ref[2]**(o-1)+(0.724287748378)
-        ref[4,1,1,0]=o*(-0.701870704251)*x_ref[0]**(o-1)+(0.29146856048)
-        ref[4,1,1,1]=o*(-0.677358067691)*x_ref[1]**(o-1)+(-0.055827889309)
-        ref[4,1,1,2]=o*(0.96248585097)*x_ref[2]**(o-1)+(0.100526700803)
-        ref[5,0,0,0]=o*(-0.582058132348)*x_ref[0]**(o-1)+(0.5354038569)
-        ref[5,0,0,1]=o*(-0.608415656952)*x_ref[1]**(o-1)+(0.700352801694)
-        ref[5,0,0,2]=o*(-0.705438310252)*x_ref[2]**(o-1)+(0.969824711925)
-        ref[5,0,1,0]=o*(-0.573326444971)*x_ref[0]**(o-1)+(0.00490482707944)
-        ref[5,0,1,1]=o*(0.300312254171)*x_ref[1]**(o-1)+(-0.620154697788)
-        ref[5,0,1,2]=o*(-0.0703788860867)*x_ref[2]**(o-1)+(-0.608567609941)
-        ref[5,1,0,0]=o*(0.346782282755)*x_ref[0]**(o-1)+(-0.022146949553)
-        ref[5,1,0,1]=o*(0.548359292626)*x_ref[1]**(o-1)+(0.314315074761)
-        ref[5,1,0,2]=o*(0.164808336191)*x_ref[2]**(o-1)+(-0.983018613943)
-        ref[5,1,1,0]=o*(-0.357126808896)*x_ref[0]**(o-1)+(0.547191129837)
-        ref[5,1,1,1]=o*(-0.0128153418859)*x_ref[1]**(o-1)+(-0.199507147279)
-        ref[5,1,1,2]=o*(-0.637546467191)*x_ref[2]**(o-1)+(0.65056997574)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.694260485776)*x[0]+(1.46246375886)*x[1]
-        ref[0]=(0.694260485776)
-        ref[1]=(1.46246375886)
-      else:
-        arg=(-1.10912081576)*x[0]+(1.19790363484)*x[1]+(0.555862453192)*x[2]
-        ref[0]=(-1.10912081576)
-        ref[1]=(1.19790363484)
-        ref[2]=(0.555862453192)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.0963683715208)*x[0]+(-0.985421300426)*x[1]
-        arg[1]=(0.50107481561)*x[0]+(0.296191075154)*x[1]
-        ref[0,0]=(-0.0963683715208)
-        ref[0,1]=(-0.985421300426)
-        ref[1,0]=(0.50107481561)
-        ref[1,1]=(0.296191075154)
-      else:
-        arg[0]=(0.790729361248)*x[0]+(0.3673431791)*x[1]+(0.031915702612)*x[2]
-        arg[1]=(-0.218629391175)*x[0]+(-0.0619831001578)*x[1]+(-1.46460054046)*x[2]
-        ref[0,0]=(0.790729361248)
-        ref[0,1]=(0.3673431791)
-        ref[0,2]=(0.031915702612)
-        ref[1,0]=(-0.218629391175)
-        ref[1,1]=(-0.0619831001578)
-        ref[1,2]=(-1.46460054046)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.102266041928)*x[0]+(0.962985129019)*x[1]
-        arg[0,1]=(1.22474578409)*x[0]+(-0.211640772922)*x[1]
-        arg[0,2]=(-0.51306749275)*x[0]+(0.652502950912)*x[1]
-        arg[0,3]=(1.89516926008)*x[0]+(0.317996805009)*x[1]
-        arg[0,4]=(0.562531430083)*x[0]+(-0.194650166716)*x[1]
-        arg[1,0]=(0.344353002434)*x[0]+(-0.830671914713)*x[1]
-        arg[1,1]=(0.984363231775)*x[0]+(-0.0773767796506)*x[1]
-        arg[1,2]=(-0.893978692143)*x[0]+(1.43362006873)*x[1]
-        arg[1,3]=(0.603459290036)*x[0]+(-0.527471281229)*x[1]
-        arg[1,4]=(-0.768879816113)*x[0]+(0.670739267079)*x[1]
-        arg[2,0]=(0.466692398942)*x[0]+(-0.315362658981)*x[1]
-        arg[2,1]=(1.30065290708)*x[0]+(-0.202369755569)*x[1]
-        arg[2,2]=(-0.114571246331)*x[0]+(1.30250121342)*x[1]
-        arg[2,3]=(-0.243608494456)*x[0]+(-0.103398411275)*x[1]
-        arg[2,4]=(-0.262568543724)*x[0]+(-0.23979204654)*x[1]
-        arg[3,0]=(0.0334727960327)*x[0]+(-0.24547366383)*x[1]
-        arg[3,1]=(0.829837477348)*x[0]+(-0.416646135702)*x[1]
-        arg[3,2]=(1.43081322579)*x[0]+(0.574724874607)*x[1]
-        arg[3,3]=(1.16303985686)*x[0]+(-0.915348714324)*x[1]
-        arg[3,4]=(0.773764690591)*x[0]+(0.28049189996)*x[1]
-        ref[0,0,0]=(0.102266041928)
-        ref[0,0,1]=(0.962985129019)
-        ref[0,1,0]=(1.22474578409)
-        ref[0,1,1]=(-0.211640772922)
-        ref[0,2,0]=(-0.51306749275)
-        ref[0,2,1]=(0.652502950912)
-        ref[0,3,0]=(1.89516926008)
-        ref[0,3,1]=(0.317996805009)
-        ref[0,4,0]=(0.562531430083)
-        ref[0,4,1]=(-0.194650166716)
-        ref[1,0,0]=(0.344353002434)
-        ref[1,0,1]=(-0.830671914713)
-        ref[1,1,0]=(0.984363231775)
-        ref[1,1,1]=(-0.0773767796506)
-        ref[1,2,0]=(-0.893978692143)
-        ref[1,2,1]=(1.43362006873)
-        ref[1,3,0]=(0.603459290036)
-        ref[1,3,1]=(-0.527471281229)
-        ref[1,4,0]=(-0.768879816113)
-        ref[1,4,1]=(0.670739267079)
-        ref[2,0,0]=(0.466692398942)
-        ref[2,0,1]=(-0.315362658981)
-        ref[2,1,0]=(1.30065290708)
-        ref[2,1,1]=(-0.202369755569)
-        ref[2,2,0]=(-0.114571246331)
-        ref[2,2,1]=(1.30250121342)
-        ref[2,3,0]=(-0.243608494456)
-        ref[2,3,1]=(-0.103398411275)
-        ref[2,4,0]=(-0.262568543724)
-        ref[2,4,1]=(-0.23979204654)
-        ref[3,0,0]=(0.0334727960327)
-        ref[3,0,1]=(-0.24547366383)
-        ref[3,1,0]=(0.829837477348)
-        ref[3,1,1]=(-0.416646135702)
-        ref[3,2,0]=(1.43081322579)
-        ref[3,2,1]=(0.574724874607)
-        ref[3,3,0]=(1.16303985686)
-        ref[3,3,1]=(-0.915348714324)
-        ref[3,4,0]=(0.773764690591)
-        ref[3,4,1]=(0.28049189996)
-      else:
-        arg[0,0]=(-0.998409457516)*x[0]+(0.374200474533)*x[1]+(-0.397603453862)*x[2]
-        arg[0,1]=(-1.48600938216)*x[0]+(1.46358462866)*x[1]+(-0.393381462291)*x[2]
-        arg[0,2]=(1.08201727329)*x[0]+(0.065185376372)*x[1]+(-1.32483264357)*x[2]
-        arg[0,3]=(-0.518441162)*x[0]+(0.364373161676)*x[1]+(-1.25875574919)*x[2]
-        arg[0,4]=(-0.836980279478)*x[0]+(1.21655914685)*x[1]+(0.1586084291)*x[2]
-        arg[1,0]=(0.760774732939)*x[0]+(0.515414129191)*x[1]+(-1.50192024303)*x[2]
-        arg[1,1]=(-0.653360330499)*x[0]+(1.71417096347)*x[1]+(-0.169129173291)*x[2]
-        arg[1,2]=(1.07221333767)*x[0]+(-1.07638348405)*x[1]+(1.13393461135)*x[2]
-        arg[1,3]=(0.847567825055)*x[0]+(-0.0298335468796)*x[1]+(0.45122717832)*x[2]
-        arg[1,4]=(-0.108027217492)*x[0]+(-1.12654142913)*x[1]+(-0.781718943065)*x[2]
-        arg[2,0]=(0.408863322164)*x[0]+(0.100914804776)*x[1]+(-0.471567638444)*x[2]
-        arg[2,1]=(-1.42194256762)*x[0]+(-0.348217894465)*x[1]+(-0.830561377367)*x[2]
-        arg[2,2]=(1.36876795155)*x[0]+(0.125252389466)*x[1]+(0.00641454191902)*x[2]
-        arg[2,3]=(0.135243193372)*x[0]+(-1.04394510102)*x[1]+(0.0223029076973)*x[2]
-        arg[2,4]=(-0.969785158394)*x[0]+(-0.48178611106)*x[1]+(-0.0556576599006)*x[2]
-        arg[3,0]=(1.39484073703)*x[0]+(-1.0132109886)*x[1]+(0.0205156989927)*x[2]
-        arg[3,1]=(-0.92783313898)*x[0]+(-1.27904129731)*x[1]+(-0.817768402689)*x[2]
-        arg[3,2]=(1.21718392423)*x[0]+(-0.984091647405)*x[1]+(0.458009888947)*x[2]
-        arg[3,3]=(-0.812990754761)*x[0]+(-0.104941245044)*x[1]+(-0.996531826869)*x[2]
-        arg[3,4]=(-0.28581988131)*x[0]+(-1.24321114539)*x[1]+(0.408464222517)*x[2]
-        ref[0,0,0]=(-0.998409457516)
-        ref[0,0,1]=(0.374200474533)
-        ref[0,0,2]=(-0.397603453862)
-        ref[0,1,0]=(-1.48600938216)
-        ref[0,1,1]=(1.46358462866)
-        ref[0,1,2]=(-0.393381462291)
-        ref[0,2,0]=(1.08201727329)
-        ref[0,2,1]=(0.065185376372)
-        ref[0,2,2]=(-1.32483264357)
-        ref[0,3,0]=(-0.518441162)
-        ref[0,3,1]=(0.364373161676)
-        ref[0,3,2]=(-1.25875574919)
-        ref[0,4,0]=(-0.836980279478)
-        ref[0,4,1]=(1.21655914685)
-        ref[0,4,2]=(0.1586084291)
-        ref[1,0,0]=(0.760774732939)
-        ref[1,0,1]=(0.515414129191)
-        ref[1,0,2]=(-1.50192024303)
-        ref[1,1,0]=(-0.653360330499)
-        ref[1,1,1]=(1.71417096347)
-        ref[1,1,2]=(-0.169129173291)
-        ref[1,2,0]=(1.07221333767)
-        ref[1,2,1]=(-1.07638348405)
-        ref[1,2,2]=(1.13393461135)
-        ref[1,3,0]=(0.847567825055)
-        ref[1,3,1]=(-0.0298335468796)
-        ref[1,3,2]=(0.45122717832)
-        ref[1,4,0]=(-0.108027217492)
-        ref[1,4,1]=(-1.12654142913)
-        ref[1,4,2]=(-0.781718943065)
-        ref[2,0,0]=(0.408863322164)
-        ref[2,0,1]=(0.100914804776)
-        ref[2,0,2]=(-0.471567638444)
-        ref[2,1,0]=(-1.42194256762)
-        ref[2,1,1]=(-0.348217894465)
-        ref[2,1,2]=(-0.830561377367)
-        ref[2,2,0]=(1.36876795155)
-        ref[2,2,1]=(0.125252389466)
-        ref[2,2,2]=(0.00641454191902)
-        ref[2,3,0]=(0.135243193372)
-        ref[2,3,1]=(-1.04394510102)
-        ref[2,3,2]=(0.0223029076973)
-        ref[2,4,0]=(-0.969785158394)
-        ref[2,4,1]=(-0.48178611106)
-        ref[2,4,2]=(-0.0556576599006)
-        ref[3,0,0]=(1.39484073703)
-        ref[3,0,1]=(-1.0132109886)
-        ref[3,0,2]=(0.0205156989927)
-        ref[3,1,0]=(-0.92783313898)
-        ref[3,1,1]=(-1.27904129731)
-        ref[3,1,2]=(-0.817768402689)
-        ref[3,2,0]=(1.21718392423)
-        ref[3,2,1]=(-0.984091647405)
-        ref[3,2,2]=(0.458009888947)
-        ref[3,3,0]=(-0.812990754761)
-        ref[3,3,1]=(-0.104941245044)
-        ref[3,3,2]=(-0.996531826869)
-        ref[3,4,0]=(-0.28581988131)
-        ref[3,4,1]=(-1.24321114539)
-        ref[3,4,2]=(0.408464222517)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.39712204981)*x[0]+(-1.36315938849)*x[1]
-        arg[0,0,1]=(0.654450268666)*x[0]+(-0.198258834351)*x[1]
-        arg[0,1,0]=(0.21357757124)*x[0]+(0.193878132191)*x[1]
-        arg[0,1,1]=(0.0762258436603)*x[0]+(-0.33284111684)*x[1]
-        arg[1,0,0]=(-0.264232939297)*x[0]+(-0.726336076701)*x[1]
-        arg[1,0,1]=(-0.179928817534)*x[0]+(-0.723247805844)*x[1]
-        arg[1,1,0]=(0.923289681593)*x[0]+(0.986763135255)*x[1]
-        arg[1,1,1]=(0.065387254507)*x[0]+(-0.710965008545)*x[1]
-        arg[2,0,0]=(0.759853961917)*x[0]+(0.24486573839)*x[1]
-        arg[2,0,1]=(-0.318336679378)*x[0]+(0.39328274922)*x[1]
-        arg[2,1,0]=(-1.562818948)*x[0]+(-0.891340974738)*x[1]
-        arg[2,1,1]=(0.0508006116584)*x[0]+(1.17654134987)*x[1]
-        arg[3,0,0]=(-0.155883472458)*x[0]+(0.248809866836)*x[1]
-        arg[3,0,1]=(0.287794710222)*x[0]+(-1.72525392296)*x[1]
-        arg[3,1,0]=(0.00665202042795)*x[0]+(-0.0996395796968)*x[1]
-        arg[3,1,1]=(-0.19809021298)*x[0]+(0.487549616652)*x[1]
-        arg[4,0,0]=(0.764163773078)*x[0]+(-0.898694486894)*x[1]
-        arg[4,0,1]=(-0.213042355119)*x[0]+(0.708925705544)*x[1]
-        arg[4,1,0]=(1.55505564031)*x[0]+(-0.545746649289)*x[1]
-        arg[4,1,1]=(-1.31623592165)*x[0]+(0.948772953354)*x[1]
-        arg[5,0,0]=(0.221103671977)*x[0]+(0.866067107464)*x[1]
-        arg[5,0,1]=(-0.0979530612779)*x[0]+(-0.371623102578)*x[1]
-        arg[5,1,0]=(-0.348963169972)*x[0]+(-0.692055450872)*x[1]
-        arg[5,1,1]=(-0.584053243695)*x[0]+(-0.487768032842)*x[1]
-        ref[0,0,0,0]=(0.39712204981)
-        ref[0,0,0,1]=(-1.36315938849)
-        ref[0,0,1,0]=(0.654450268666)
-        ref[0,0,1,1]=(-0.198258834351)
-        ref[0,1,0,0]=(0.21357757124)
-        ref[0,1,0,1]=(0.193878132191)
-        ref[0,1,1,0]=(0.0762258436603)
-        ref[0,1,1,1]=(-0.33284111684)
-        ref[1,0,0,0]=(-0.264232939297)
-        ref[1,0,0,1]=(-0.726336076701)
-        ref[1,0,1,0]=(-0.179928817534)
-        ref[1,0,1,1]=(-0.723247805844)
-        ref[1,1,0,0]=(0.923289681593)
-        ref[1,1,0,1]=(0.986763135255)
-        ref[1,1,1,0]=(0.065387254507)
-        ref[1,1,1,1]=(-0.710965008545)
-        ref[2,0,0,0]=(0.759853961917)
-        ref[2,0,0,1]=(0.24486573839)
-        ref[2,0,1,0]=(-0.318336679378)
-        ref[2,0,1,1]=(0.39328274922)
-        ref[2,1,0,0]=(-1.562818948)
-        ref[2,1,0,1]=(-0.891340974738)
-        ref[2,1,1,0]=(0.0508006116584)
-        ref[2,1,1,1]=(1.17654134987)
-        ref[3,0,0,0]=(-0.155883472458)
-        ref[3,0,0,1]=(0.248809866836)
-        ref[3,0,1,0]=(0.287794710222)
-        ref[3,0,1,1]=(-1.72525392296)
-        ref[3,1,0,0]=(0.00665202042795)
-        ref[3,1,0,1]=(-0.0996395796968)
-        ref[3,1,1,0]=(-0.19809021298)
-        ref[3,1,1,1]=(0.487549616652)
-        ref[4,0,0,0]=(0.764163773078)
-        ref[4,0,0,1]=(-0.898694486894)
-        ref[4,0,1,0]=(-0.213042355119)
-        ref[4,0,1,1]=(0.708925705544)
-        ref[4,1,0,0]=(1.55505564031)
-        ref[4,1,0,1]=(-0.545746649289)
-        ref[4,1,1,0]=(-1.31623592165)
-        ref[4,1,1,1]=(0.948772953354)
-        ref[5,0,0,0]=(0.221103671977)
-        ref[5,0,0,1]=(0.866067107464)
-        ref[5,0,1,0]=(-0.0979530612779)
-        ref[5,0,1,1]=(-0.371623102578)
-        ref[5,1,0,0]=(-0.348963169972)
-        ref[5,1,0,1]=(-0.692055450872)
-        ref[5,1,1,0]=(-0.584053243695)
-        ref[5,1,1,1]=(-0.487768032842)
-      else:
-        arg[0,0,0]=(-1.45023987007)*x[0]+(0.138479134523)*x[1]+(1.46404607112)*x[2]
-        arg[0,0,1]=(-0.647908832568)*x[0]+(-0.503758830859)*x[1]+(1.23196203665)*x[2]
-        arg[0,1,0]=(-0.0108286161243)*x[0]+(0.565615928686)*x[1]+(-0.357789821636)*x[2]
-        arg[0,1,1]=(0.648224572901)*x[0]+(0.775857442933)*x[1]+(0.960991462312)*x[2]
-        arg[1,0,0]=(0.340590670624)*x[0]+(0.0357759349963)*x[1]+(0.358139256621)*x[2]
-        arg[1,0,1]=(0.569789735109)*x[0]+(1.40678949618)*x[1]+(-0.965577726422)*x[2]
-        arg[1,1,0]=(-0.758717082212)*x[0]+(0.612968081377)*x[1]+(-0.417988159948)*x[2]
-        arg[1,1,1]=(0.969867032567)*x[0]+(-0.0700234825891)*x[1]+(1.53879850558)*x[2]
-        arg[2,0,0]=(-1.02952648125)*x[0]+(0.108642437375)*x[1]+(0.251073184196)*x[2]
-        arg[2,0,1]=(0.794766888909)*x[0]+(1.50591346365)*x[1]+(-0.36870578891)*x[2]
-        arg[2,1,0]=(-0.534487055503)*x[0]+(-1.09061679233)*x[1]+(0.799342633685)*x[2]
-        arg[2,1,1]=(0.0435889213805)*x[0]+(-0.209888628166)*x[1]+(1.34633215915)*x[2]
-        arg[3,0,0]=(-0.0344682106376)*x[0]+(-0.92386569455)*x[1]+(-0.551250384619)*x[2]
-        arg[3,0,1]=(-0.168599962689)*x[0]+(0.204634495314)*x[1]+(-0.65426520271)*x[2]
-        arg[3,1,0]=(-1.61759210628)*x[0]+(-0.5922211067)*x[1]+(-0.139092780207)*x[2]
-        arg[3,1,1]=(-0.13862300062)*x[0]+(-1.45951050222)*x[1]+(0.300904423579)*x[2]
-        arg[4,0,0]=(0.629590770742)*x[0]+(-0.217150209985)*x[1]+(-0.140384227583)*x[2]
-        arg[4,0,1]=(-0.0461635416119)*x[0]+(0.525692990183)*x[1]+(-1.89728167146)*x[2]
-        arg[4,1,0]=(-0.130297059668)*x[0]+(-0.138816250007)*x[1]+(1.26805054232)*x[2]
-        arg[4,1,1]=(0.742488751566)*x[0]+(0.659272799907)*x[1]+(-0.370877917078)*x[2]
-        arg[5,0,0]=(-0.521350561164)*x[0]+(-0.213669151076)*x[1]+(0.00949381597317)*x[2]
-        arg[5,0,1]=(-0.951547526648)*x[0]+(-0.388340895795)*x[1]+(0.741997603334)*x[2]
-        arg[5,1,0]=(-0.332922940005)*x[0]+(1.74852940259)*x[1]+(-0.484189519128)*x[2]
-        arg[5,1,1]=(0.418660109098)*x[0]+(-0.690728767024)*x[1]+(-0.675947375912)*x[2]
-        ref[0,0,0,0]=(-1.45023987007)
-        ref[0,0,0,1]=(0.138479134523)
-        ref[0,0,0,2]=(1.46404607112)
-        ref[0,0,1,0]=(-0.647908832568)
-        ref[0,0,1,1]=(-0.503758830859)
-        ref[0,0,1,2]=(1.23196203665)
-        ref[0,1,0,0]=(-0.0108286161243)
-        ref[0,1,0,1]=(0.565615928686)
-        ref[0,1,0,2]=(-0.357789821636)
-        ref[0,1,1,0]=(0.648224572901)
-        ref[0,1,1,1]=(0.775857442933)
-        ref[0,1,1,2]=(0.960991462312)
-        ref[1,0,0,0]=(0.340590670624)
-        ref[1,0,0,1]=(0.0357759349963)
-        ref[1,0,0,2]=(0.358139256621)
-        ref[1,0,1,0]=(0.569789735109)
-        ref[1,0,1,1]=(1.40678949618)
-        ref[1,0,1,2]=(-0.965577726422)
-        ref[1,1,0,0]=(-0.758717082212)
-        ref[1,1,0,1]=(0.612968081377)
-        ref[1,1,0,2]=(-0.417988159948)
-        ref[1,1,1,0]=(0.969867032567)
-        ref[1,1,1,1]=(-0.0700234825891)
-        ref[1,1,1,2]=(1.53879850558)
-        ref[2,0,0,0]=(-1.02952648125)
-        ref[2,0,0,1]=(0.108642437375)
-        ref[2,0,0,2]=(0.251073184196)
-        ref[2,0,1,0]=(0.794766888909)
-        ref[2,0,1,1]=(1.50591346365)
-        ref[2,0,1,2]=(-0.36870578891)
-        ref[2,1,0,0]=(-0.534487055503)
-        ref[2,1,0,1]=(-1.09061679233)
-        ref[2,1,0,2]=(0.799342633685)
-        ref[2,1,1,0]=(0.0435889213805)
-        ref[2,1,1,1]=(-0.209888628166)
-        ref[2,1,1,2]=(1.34633215915)
-        ref[3,0,0,0]=(-0.0344682106376)
-        ref[3,0,0,1]=(-0.92386569455)
-        ref[3,0,0,2]=(-0.551250384619)
-        ref[3,0,1,0]=(-0.168599962689)
-        ref[3,0,1,1]=(0.204634495314)
-        ref[3,0,1,2]=(-0.65426520271)
-        ref[3,1,0,0]=(-1.61759210628)
-        ref[3,1,0,1]=(-0.5922211067)
-        ref[3,1,0,2]=(-0.139092780207)
-        ref[3,1,1,0]=(-0.13862300062)
-        ref[3,1,1,1]=(-1.45951050222)
-        ref[3,1,1,2]=(0.300904423579)
-        ref[4,0,0,0]=(0.629590770742)
-        ref[4,0,0,1]=(-0.217150209985)
-        ref[4,0,0,2]=(-0.140384227583)
-        ref[4,0,1,0]=(-0.0461635416119)
-        ref[4,0,1,1]=(0.525692990183)
-        ref[4,0,1,2]=(-1.89728167146)
-        ref[4,1,0,0]=(-0.130297059668)
-        ref[4,1,0,1]=(-0.138816250007)
-        ref[4,1,0,2]=(1.26805054232)
-        ref[4,1,1,0]=(0.742488751566)
-        ref[4,1,1,1]=(0.659272799907)
-        ref[4,1,1,2]=(-0.370877917078)
-        ref[5,0,0,0]=(-0.521350561164)
-        ref[5,0,0,1]=(-0.213669151076)
-        ref[5,0,0,2]=(0.00949381597317)
-        ref[5,0,1,0]=(-0.951547526648)
-        ref[5,0,1,1]=(-0.388340895795)
-        ref[5,0,1,2]=(0.741997603334)
-        ref[5,1,0,0]=(-0.332922940005)
-        ref[5,1,0,1]=(1.74852940259)
-        ref[5,1,0,2]=(-0.484189519128)
-        ref[5,1,1,0]=(0.418660109098)
-        ref[5,1,1,1]=(-0.690728767024)
-        ref[5,1,1,2]=(-0.675947375912)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.694260485776)*x[0]+(1.46246375886)*x[1]
-        ref[0]=(0.694260485776)
-        ref[1]=(1.46246375886)
-      else:
-        arg=(-1.10912081576)*x[0]+(1.19790363484)*x[1]+(0.555862453192)*x[2]
-        ref[0]=(-1.10912081576)
-        ref[1]=(1.19790363484)
-        ref[2]=(0.555862453192)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.0963683715208)*x[0]+(-0.985421300426)*x[1]
-        arg[1]=(0.50107481561)*x[0]+(0.296191075154)*x[1]
-        ref[0,0]=(-0.0963683715208)
-        ref[0,1]=(-0.985421300426)
-        ref[1,0]=(0.50107481561)
-        ref[1,1]=(0.296191075154)
-      else:
-        arg[0]=(0.790729361248)*x[0]+(0.3673431791)*x[1]+(0.031915702612)*x[2]
-        arg[1]=(-0.218629391175)*x[0]+(-0.0619831001578)*x[1]+(-1.46460054046)*x[2]
-        ref[0,0]=(0.790729361248)
-        ref[0,1]=(0.3673431791)
-        ref[0,2]=(0.031915702612)
-        ref[1,0]=(-0.218629391175)
-        ref[1,1]=(-0.0619831001578)
-        ref[1,2]=(-1.46460054046)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.102266041928)*x[0]+(0.962985129019)*x[1]
-        arg[0,1]=(1.22474578409)*x[0]+(-0.211640772922)*x[1]
-        arg[0,2]=(-0.51306749275)*x[0]+(0.652502950912)*x[1]
-        arg[0,3]=(1.89516926008)*x[0]+(0.317996805009)*x[1]
-        arg[0,4]=(0.562531430083)*x[0]+(-0.194650166716)*x[1]
-        arg[1,0]=(0.344353002434)*x[0]+(-0.830671914713)*x[1]
-        arg[1,1]=(0.984363231775)*x[0]+(-0.0773767796506)*x[1]
-        arg[1,2]=(-0.893978692143)*x[0]+(1.43362006873)*x[1]
-        arg[1,3]=(0.603459290036)*x[0]+(-0.527471281229)*x[1]
-        arg[1,4]=(-0.768879816113)*x[0]+(0.670739267079)*x[1]
-        arg[2,0]=(0.466692398942)*x[0]+(-0.315362658981)*x[1]
-        arg[2,1]=(1.30065290708)*x[0]+(-0.202369755569)*x[1]
-        arg[2,2]=(-0.114571246331)*x[0]+(1.30250121342)*x[1]
-        arg[2,3]=(-0.243608494456)*x[0]+(-0.103398411275)*x[1]
-        arg[2,4]=(-0.262568543724)*x[0]+(-0.23979204654)*x[1]
-        arg[3,0]=(0.0334727960327)*x[0]+(-0.24547366383)*x[1]
-        arg[3,1]=(0.829837477348)*x[0]+(-0.416646135702)*x[1]
-        arg[3,2]=(1.43081322579)*x[0]+(0.574724874607)*x[1]
-        arg[3,3]=(1.16303985686)*x[0]+(-0.915348714324)*x[1]
-        arg[3,4]=(0.773764690591)*x[0]+(0.28049189996)*x[1]
-        ref[0,0,0]=(0.102266041928)
-        ref[0,0,1]=(0.962985129019)
-        ref[0,1,0]=(1.22474578409)
-        ref[0,1,1]=(-0.211640772922)
-        ref[0,2,0]=(-0.51306749275)
-        ref[0,2,1]=(0.652502950912)
-        ref[0,3,0]=(1.89516926008)
-        ref[0,3,1]=(0.317996805009)
-        ref[0,4,0]=(0.562531430083)
-        ref[0,4,1]=(-0.194650166716)
-        ref[1,0,0]=(0.344353002434)
-        ref[1,0,1]=(-0.830671914713)
-        ref[1,1,0]=(0.984363231775)
-        ref[1,1,1]=(-0.0773767796506)
-        ref[1,2,0]=(-0.893978692143)
-        ref[1,2,1]=(1.43362006873)
-        ref[1,3,0]=(0.603459290036)
-        ref[1,3,1]=(-0.527471281229)
-        ref[1,4,0]=(-0.768879816113)
-        ref[1,4,1]=(0.670739267079)
-        ref[2,0,0]=(0.466692398942)
-        ref[2,0,1]=(-0.315362658981)
-        ref[2,1,0]=(1.30065290708)
-        ref[2,1,1]=(-0.202369755569)
-        ref[2,2,0]=(-0.114571246331)
-        ref[2,2,1]=(1.30250121342)
-        ref[2,3,0]=(-0.243608494456)
-        ref[2,3,1]=(-0.103398411275)
-        ref[2,4,0]=(-0.262568543724)
-        ref[2,4,1]=(-0.23979204654)
-        ref[3,0,0]=(0.0334727960327)
-        ref[3,0,1]=(-0.24547366383)
-        ref[3,1,0]=(0.829837477348)
-        ref[3,1,1]=(-0.416646135702)
-        ref[3,2,0]=(1.43081322579)
-        ref[3,2,1]=(0.574724874607)
-        ref[3,3,0]=(1.16303985686)
-        ref[3,3,1]=(-0.915348714324)
-        ref[3,4,0]=(0.773764690591)
-        ref[3,4,1]=(0.28049189996)
-      else:
-        arg[0,0]=(-0.998409457516)*x[0]+(0.374200474533)*x[1]+(-0.397603453862)*x[2]
-        arg[0,1]=(-1.48600938216)*x[0]+(1.46358462866)*x[1]+(-0.393381462291)*x[2]
-        arg[0,2]=(1.08201727329)*x[0]+(0.065185376372)*x[1]+(-1.32483264357)*x[2]
-        arg[0,3]=(-0.518441162)*x[0]+(0.364373161676)*x[1]+(-1.25875574919)*x[2]
-        arg[0,4]=(-0.836980279478)*x[0]+(1.21655914685)*x[1]+(0.1586084291)*x[2]
-        arg[1,0]=(0.760774732939)*x[0]+(0.515414129191)*x[1]+(-1.50192024303)*x[2]
-        arg[1,1]=(-0.653360330499)*x[0]+(1.71417096347)*x[1]+(-0.169129173291)*x[2]
-        arg[1,2]=(1.07221333767)*x[0]+(-1.07638348405)*x[1]+(1.13393461135)*x[2]
-        arg[1,3]=(0.847567825055)*x[0]+(-0.0298335468796)*x[1]+(0.45122717832)*x[2]
-        arg[1,4]=(-0.108027217492)*x[0]+(-1.12654142913)*x[1]+(-0.781718943065)*x[2]
-        arg[2,0]=(0.408863322164)*x[0]+(0.100914804776)*x[1]+(-0.471567638444)*x[2]
-        arg[2,1]=(-1.42194256762)*x[0]+(-0.348217894465)*x[1]+(-0.830561377367)*x[2]
-        arg[2,2]=(1.36876795155)*x[0]+(0.125252389466)*x[1]+(0.00641454191902)*x[2]
-        arg[2,3]=(0.135243193372)*x[0]+(-1.04394510102)*x[1]+(0.0223029076973)*x[2]
-        arg[2,4]=(-0.969785158394)*x[0]+(-0.48178611106)*x[1]+(-0.0556576599006)*x[2]
-        arg[3,0]=(1.39484073703)*x[0]+(-1.0132109886)*x[1]+(0.0205156989927)*x[2]
-        arg[3,1]=(-0.92783313898)*x[0]+(-1.27904129731)*x[1]+(-0.817768402689)*x[2]
-        arg[3,2]=(1.21718392423)*x[0]+(-0.984091647405)*x[1]+(0.458009888947)*x[2]
-        arg[3,3]=(-0.812990754761)*x[0]+(-0.104941245044)*x[1]+(-0.996531826869)*x[2]
-        arg[3,4]=(-0.28581988131)*x[0]+(-1.24321114539)*x[1]+(0.408464222517)*x[2]
-        ref[0,0,0]=(-0.998409457516)
-        ref[0,0,1]=(0.374200474533)
-        ref[0,0,2]=(-0.397603453862)
-        ref[0,1,0]=(-1.48600938216)
-        ref[0,1,1]=(1.46358462866)
-        ref[0,1,2]=(-0.393381462291)
-        ref[0,2,0]=(1.08201727329)
-        ref[0,2,1]=(0.065185376372)
-        ref[0,2,2]=(-1.32483264357)
-        ref[0,3,0]=(-0.518441162)
-        ref[0,3,1]=(0.364373161676)
-        ref[0,3,2]=(-1.25875574919)
-        ref[0,4,0]=(-0.836980279478)
-        ref[0,4,1]=(1.21655914685)
-        ref[0,4,2]=(0.1586084291)
-        ref[1,0,0]=(0.760774732939)
-        ref[1,0,1]=(0.515414129191)
-        ref[1,0,2]=(-1.50192024303)
-        ref[1,1,0]=(-0.653360330499)
-        ref[1,1,1]=(1.71417096347)
-        ref[1,1,2]=(-0.169129173291)
-        ref[1,2,0]=(1.07221333767)
-        ref[1,2,1]=(-1.07638348405)
-        ref[1,2,2]=(1.13393461135)
-        ref[1,3,0]=(0.847567825055)
-        ref[1,3,1]=(-0.0298335468796)
-        ref[1,3,2]=(0.45122717832)
-        ref[1,4,0]=(-0.108027217492)
-        ref[1,4,1]=(-1.12654142913)
-        ref[1,4,2]=(-0.781718943065)
-        ref[2,0,0]=(0.408863322164)
-        ref[2,0,1]=(0.100914804776)
-        ref[2,0,2]=(-0.471567638444)
-        ref[2,1,0]=(-1.42194256762)
-        ref[2,1,1]=(-0.348217894465)
-        ref[2,1,2]=(-0.830561377367)
-        ref[2,2,0]=(1.36876795155)
-        ref[2,2,1]=(0.125252389466)
-        ref[2,2,2]=(0.00641454191902)
-        ref[2,3,0]=(0.135243193372)
-        ref[2,3,1]=(-1.04394510102)
-        ref[2,3,2]=(0.0223029076973)
-        ref[2,4,0]=(-0.969785158394)
-        ref[2,4,1]=(-0.48178611106)
-        ref[2,4,2]=(-0.0556576599006)
-        ref[3,0,0]=(1.39484073703)
-        ref[3,0,1]=(-1.0132109886)
-        ref[3,0,2]=(0.0205156989927)
-        ref[3,1,0]=(-0.92783313898)
-        ref[3,1,1]=(-1.27904129731)
-        ref[3,1,2]=(-0.817768402689)
-        ref[3,2,0]=(1.21718392423)
-        ref[3,2,1]=(-0.984091647405)
-        ref[3,2,2]=(0.458009888947)
-        ref[3,3,0]=(-0.812990754761)
-        ref[3,3,1]=(-0.104941245044)
-        ref[3,3,2]=(-0.996531826869)
-        ref[3,4,0]=(-0.28581988131)
-        ref[3,4,1]=(-1.24321114539)
-        ref[3,4,2]=(0.408464222517)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the FunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on FunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=FunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.39712204981)*x[0]+(-1.36315938849)*x[1]
-        arg[0,0,1]=(0.654450268666)*x[0]+(-0.198258834351)*x[1]
-        arg[0,1,0]=(0.21357757124)*x[0]+(0.193878132191)*x[1]
-        arg[0,1,1]=(0.0762258436603)*x[0]+(-0.33284111684)*x[1]
-        arg[1,0,0]=(-0.264232939297)*x[0]+(-0.726336076701)*x[1]
-        arg[1,0,1]=(-0.179928817534)*x[0]+(-0.723247805844)*x[1]
-        arg[1,1,0]=(0.923289681593)*x[0]+(0.986763135255)*x[1]
-        arg[1,1,1]=(0.065387254507)*x[0]+(-0.710965008545)*x[1]
-        arg[2,0,0]=(0.759853961917)*x[0]+(0.24486573839)*x[1]
-        arg[2,0,1]=(-0.318336679378)*x[0]+(0.39328274922)*x[1]
-        arg[2,1,0]=(-1.562818948)*x[0]+(-0.891340974738)*x[1]
-        arg[2,1,1]=(0.0508006116584)*x[0]+(1.17654134987)*x[1]
-        arg[3,0,0]=(-0.155883472458)*x[0]+(0.248809866836)*x[1]
-        arg[3,0,1]=(0.287794710222)*x[0]+(-1.72525392296)*x[1]
-        arg[3,1,0]=(0.00665202042795)*x[0]+(-0.0996395796968)*x[1]
-        arg[3,1,1]=(-0.19809021298)*x[0]+(0.487549616652)*x[1]
-        arg[4,0,0]=(0.764163773078)*x[0]+(-0.898694486894)*x[1]
-        arg[4,0,1]=(-0.213042355119)*x[0]+(0.708925705544)*x[1]
-        arg[4,1,0]=(1.55505564031)*x[0]+(-0.545746649289)*x[1]
-        arg[4,1,1]=(-1.31623592165)*x[0]+(0.948772953354)*x[1]
-        arg[5,0,0]=(0.221103671977)*x[0]+(0.866067107464)*x[1]
-        arg[5,0,1]=(-0.0979530612779)*x[0]+(-0.371623102578)*x[1]
-        arg[5,1,0]=(-0.348963169972)*x[0]+(-0.692055450872)*x[1]
-        arg[5,1,1]=(-0.584053243695)*x[0]+(-0.487768032842)*x[1]
-        ref[0,0,0,0]=(0.39712204981)
-        ref[0,0,0,1]=(-1.36315938849)
-        ref[0,0,1,0]=(0.654450268666)
-        ref[0,0,1,1]=(-0.198258834351)
-        ref[0,1,0,0]=(0.21357757124)
-        ref[0,1,0,1]=(0.193878132191)
-        ref[0,1,1,0]=(0.0762258436603)
-        ref[0,1,1,1]=(-0.33284111684)
-        ref[1,0,0,0]=(-0.264232939297)
-        ref[1,0,0,1]=(-0.726336076701)
-        ref[1,0,1,0]=(-0.179928817534)
-        ref[1,0,1,1]=(-0.723247805844)
-        ref[1,1,0,0]=(0.923289681593)
-        ref[1,1,0,1]=(0.986763135255)
-        ref[1,1,1,0]=(0.065387254507)
-        ref[1,1,1,1]=(-0.710965008545)
-        ref[2,0,0,0]=(0.759853961917)
-        ref[2,0,0,1]=(0.24486573839)
-        ref[2,0,1,0]=(-0.318336679378)
-        ref[2,0,1,1]=(0.39328274922)
-        ref[2,1,0,0]=(-1.562818948)
-        ref[2,1,0,1]=(-0.891340974738)
-        ref[2,1,1,0]=(0.0508006116584)
-        ref[2,1,1,1]=(1.17654134987)
-        ref[3,0,0,0]=(-0.155883472458)
-        ref[3,0,0,1]=(0.248809866836)
-        ref[3,0,1,0]=(0.287794710222)
-        ref[3,0,1,1]=(-1.72525392296)
-        ref[3,1,0,0]=(0.00665202042795)
-        ref[3,1,0,1]=(-0.0996395796968)
-        ref[3,1,1,0]=(-0.19809021298)
-        ref[3,1,1,1]=(0.487549616652)
-        ref[4,0,0,0]=(0.764163773078)
-        ref[4,0,0,1]=(-0.898694486894)
-        ref[4,0,1,0]=(-0.213042355119)
-        ref[4,0,1,1]=(0.708925705544)
-        ref[4,1,0,0]=(1.55505564031)
-        ref[4,1,0,1]=(-0.545746649289)
-        ref[4,1,1,0]=(-1.31623592165)
-        ref[4,1,1,1]=(0.948772953354)
-        ref[5,0,0,0]=(0.221103671977)
-        ref[5,0,0,1]=(0.866067107464)
-        ref[5,0,1,0]=(-0.0979530612779)
-        ref[5,0,1,1]=(-0.371623102578)
-        ref[5,1,0,0]=(-0.348963169972)
-        ref[5,1,0,1]=(-0.692055450872)
-        ref[5,1,1,0]=(-0.584053243695)
-        ref[5,1,1,1]=(-0.487768032842)
-      else:
-        arg[0,0,0]=(-1.45023987007)*x[0]+(0.138479134523)*x[1]+(1.46404607112)*x[2]
-        arg[0,0,1]=(-0.647908832568)*x[0]+(-0.503758830859)*x[1]+(1.23196203665)*x[2]
-        arg[0,1,0]=(-0.0108286161243)*x[0]+(0.565615928686)*x[1]+(-0.357789821636)*x[2]
-        arg[0,1,1]=(0.648224572901)*x[0]+(0.775857442933)*x[1]+(0.960991462312)*x[2]
-        arg[1,0,0]=(0.340590670624)*x[0]+(0.0357759349963)*x[1]+(0.358139256621)*x[2]
-        arg[1,0,1]=(0.569789735109)*x[0]+(1.40678949618)*x[1]+(-0.965577726422)*x[2]
-        arg[1,1,0]=(-0.758717082212)*x[0]+(0.612968081377)*x[1]+(-0.417988159948)*x[2]
-        arg[1,1,1]=(0.969867032567)*x[0]+(-0.0700234825891)*x[1]+(1.53879850558)*x[2]
-        arg[2,0,0]=(-1.02952648125)*x[0]+(0.108642437375)*x[1]+(0.251073184196)*x[2]
-        arg[2,0,1]=(0.794766888909)*x[0]+(1.50591346365)*x[1]+(-0.36870578891)*x[2]
-        arg[2,1,0]=(-0.534487055503)*x[0]+(-1.09061679233)*x[1]+(0.799342633685)*x[2]
-        arg[2,1,1]=(0.0435889213805)*x[0]+(-0.209888628166)*x[1]+(1.34633215915)*x[2]
-        arg[3,0,0]=(-0.0344682106376)*x[0]+(-0.92386569455)*x[1]+(-0.551250384619)*x[2]
-        arg[3,0,1]=(-0.168599962689)*x[0]+(0.204634495314)*x[1]+(-0.65426520271)*x[2]
-        arg[3,1,0]=(-1.61759210628)*x[0]+(-0.5922211067)*x[1]+(-0.139092780207)*x[2]
-        arg[3,1,1]=(-0.13862300062)*x[0]+(-1.45951050222)*x[1]+(0.300904423579)*x[2]
-        arg[4,0,0]=(0.629590770742)*x[0]+(-0.217150209985)*x[1]+(-0.140384227583)*x[2]
-        arg[4,0,1]=(-0.0461635416119)*x[0]+(0.525692990183)*x[1]+(-1.89728167146)*x[2]
-        arg[4,1,0]=(-0.130297059668)*x[0]+(-0.138816250007)*x[1]+(1.26805054232)*x[2]
-        arg[4,1,1]=(0.742488751566)*x[0]+(0.659272799907)*x[1]+(-0.370877917078)*x[2]
-        arg[5,0,0]=(-0.521350561164)*x[0]+(-0.213669151076)*x[1]+(0.00949381597317)*x[2]
-        arg[5,0,1]=(-0.951547526648)*x[0]+(-0.388340895795)*x[1]+(0.741997603334)*x[2]
-        arg[5,1,0]=(-0.332922940005)*x[0]+(1.74852940259)*x[1]+(-0.484189519128)*x[2]
-        arg[5,1,1]=(0.418660109098)*x[0]+(-0.690728767024)*x[1]+(-0.675947375912)*x[2]
-        ref[0,0,0,0]=(-1.45023987007)
-        ref[0,0,0,1]=(0.138479134523)
-        ref[0,0,0,2]=(1.46404607112)
-        ref[0,0,1,0]=(-0.647908832568)
-        ref[0,0,1,1]=(-0.503758830859)
-        ref[0,0,1,2]=(1.23196203665)
-        ref[0,1,0,0]=(-0.0108286161243)
-        ref[0,1,0,1]=(0.565615928686)
-        ref[0,1,0,2]=(-0.357789821636)
-        ref[0,1,1,0]=(0.648224572901)
-        ref[0,1,1,1]=(0.775857442933)
-        ref[0,1,1,2]=(0.960991462312)
-        ref[1,0,0,0]=(0.340590670624)
-        ref[1,0,0,1]=(0.0357759349963)
-        ref[1,0,0,2]=(0.358139256621)
-        ref[1,0,1,0]=(0.569789735109)
-        ref[1,0,1,1]=(1.40678949618)
-        ref[1,0,1,2]=(-0.965577726422)
-        ref[1,1,0,0]=(-0.758717082212)
-        ref[1,1,0,1]=(0.612968081377)
-        ref[1,1,0,2]=(-0.417988159948)
-        ref[1,1,1,0]=(0.969867032567)
-        ref[1,1,1,1]=(-0.0700234825891)
-        ref[1,1,1,2]=(1.53879850558)
-        ref[2,0,0,0]=(-1.02952648125)
-        ref[2,0,0,1]=(0.108642437375)
-        ref[2,0,0,2]=(0.251073184196)
-        ref[2,0,1,0]=(0.794766888909)
-        ref[2,0,1,1]=(1.50591346365)
-        ref[2,0,1,2]=(-0.36870578891)
-        ref[2,1,0,0]=(-0.534487055503)
-        ref[2,1,0,1]=(-1.09061679233)
-        ref[2,1,0,2]=(0.799342633685)
-        ref[2,1,1,0]=(0.0435889213805)
-        ref[2,1,1,1]=(-0.209888628166)
-        ref[2,1,1,2]=(1.34633215915)
-        ref[3,0,0,0]=(-0.0344682106376)
-        ref[3,0,0,1]=(-0.92386569455)
-        ref[3,0,0,2]=(-0.551250384619)
-        ref[3,0,1,0]=(-0.168599962689)
-        ref[3,0,1,1]=(0.204634495314)
-        ref[3,0,1,2]=(-0.65426520271)
-        ref[3,1,0,0]=(-1.61759210628)
-        ref[3,1,0,1]=(-0.5922211067)
-        ref[3,1,0,2]=(-0.139092780207)
-        ref[3,1,1,0]=(-0.13862300062)
-        ref[3,1,1,1]=(-1.45951050222)
-        ref[3,1,1,2]=(0.300904423579)
-        ref[4,0,0,0]=(0.629590770742)
-        ref[4,0,0,1]=(-0.217150209985)
-        ref[4,0,0,2]=(-0.140384227583)
-        ref[4,0,1,0]=(-0.0461635416119)
-        ref[4,0,1,1]=(0.525692990183)
-        ref[4,0,1,2]=(-1.89728167146)
-        ref[4,1,0,0]=(-0.130297059668)
-        ref[4,1,0,1]=(-0.138816250007)
-        ref[4,1,0,2]=(1.26805054232)
-        ref[4,1,1,0]=(0.742488751566)
-        ref[4,1,1,1]=(0.659272799907)
-        ref[4,1,1,2]=(-0.370877917078)
-        ref[5,0,0,0]=(-0.521350561164)
-        ref[5,0,0,1]=(-0.213669151076)
-        ref[5,0,0,2]=(0.00949381597317)
-        ref[5,0,1,0]=(-0.951547526648)
-        ref[5,0,1,1]=(-0.388340895795)
-        ref[5,0,1,2]=(0.741997603334)
-        ref[5,1,0,0]=(-0.332922940005)
-        ref[5,1,0,1]=(1.74852940259)
-        ref[5,1,0,2]=(-0.484189519128)
-        ref[5,1,1,0]=(0.418660109098)
-        ref[5,1,1,1]=(-0.690728767024)
-        ref[5,1,1,2]=(-0.675947375912)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(-0.169375355906)*x[0]**o+(0.270029734958)*x[0]+(-0.19196016538)*x[1]**o+(0.426264369437)*x[1]
-        ref[0]=o*(-0.169375355906)*x_ref[0]**(o-1)+(0.270029734958)
-        ref[1]=o*(-0.19196016538)*x_ref[1]**(o-1)+(0.426264369437)
-      else:
-        arg=(0.00913595455019)*x[0]**o+(-0.561918629059)*x[0]+(0.0164102679759)*x[1]**o+(0.20749162111)*x[1]+(0.588703418401)*x[2]**o+(0.841289333498)*x[2]
-        ref[0]=o*(0.00913595455019)*x_ref[0]**(o-1)+(-0.561918629059)
-        ref[1]=o*(0.0164102679759)*x_ref[1]**(o-1)+(0.20749162111)
-        ref[2]=o*(0.588703418401)*x_ref[2]**(o-1)+(0.841289333498)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.290031175706)*x[0]**o+(0.690121137589)*x[0]+(0.916232953272)*x[1]**o+(0.427227803135)*x[1]
-        arg[1]=(0.0325792679154)*x[0]**o+(0.773157737135)*x[0]+(-0.0443953478357)*x[1]**o+(0.772028975294)*x[1]
-        ref[0,0]=o*(-0.290031175706)*x_ref[0]**(o-1)+(0.690121137589)
-        ref[0,1]=o*(0.916232953272)*x_ref[1]**(o-1)+(0.427227803135)
-        ref[1,0]=o*(0.0325792679154)*x_ref[0]**(o-1)+(0.773157737135)
-        ref[1,1]=o*(-0.0443953478357)*x_ref[1]**(o-1)+(0.772028975294)
-      else:
-        arg[0]=(-0.119338345858)*x[0]**o+(-0.866134437839)*x[0]+(-0.727685742079)*x[1]**o+(0.465666609669)*x[1]+(-0.351266733199)*x[2]**o+(-0.960631632698)*x[2]
-        arg[1]=(-0.731037524737)*x[0]**o+(0.415975622707)*x[0]+(-0.86639696362)*x[1]**o+(0.914277406921)*x[1]+(0.627502485514)*x[2]**o+(-0.855013681276)*x[2]
-        ref[0,0]=o*(-0.119338345858)*x_ref[0]**(o-1)+(-0.866134437839)
-        ref[0,1]=o*(-0.727685742079)*x_ref[1]**(o-1)+(0.465666609669)
-        ref[0,2]=o*(-0.351266733199)*x_ref[2]**(o-1)+(-0.960631632698)
-        ref[1,0]=o*(-0.731037524737)*x_ref[0]**(o-1)+(0.415975622707)
-        ref[1,1]=o*(-0.86639696362)*x_ref[1]**(o-1)+(0.914277406921)
-        ref[1,2]=o*(0.627502485514)*x_ref[2]**(o-1)+(-0.855013681276)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.148320408183)*x[0]**o+(-0.340902870434)*x[0]+(-0.0856445410272)*x[1]**o+(0.220499304831)*x[1]
-        arg[0,1]=(0.915892845602)*x[0]**o+(-0.04770770327)*x[0]+(0.482403170451)*x[1]**o+(-0.639478756575)*x[1]
-        arg[0,2]=(-0.109204159071)*x[0]**o+(0.641607024805)*x[0]+(-0.409310547283)*x[1]**o+(0.202984386731)*x[1]
-        arg[0,3]=(0.436833770493)*x[0]**o+(-0.200611791892)*x[0]+(-0.74814554517)*x[1]**o+(0.571881526754)*x[1]
-        arg[0,4]=(0.704812299415)*x[0]**o+(0.688151134045)*x[0]+(0.486135712907)*x[1]**o+(0.955314240096)*x[1]
-        arg[1,0]=(-0.731790373321)*x[0]**o+(-0.711258122556)*x[0]+(-0.961514666684)*x[1]**o+(0.726573978492)*x[1]
-        arg[1,1]=(0.975372389889)*x[0]**o+(0.5026238435)*x[0]+(0.948955767945)*x[1]**o+(-0.780842035663)*x[1]
-        arg[1,2]=(0.742383399984)*x[0]**o+(-0.729678661652)*x[0]+(-0.815499612514)*x[1]**o+(-0.12280674993)*x[1]
-        arg[1,3]=(0.323809901662)*x[0]**o+(-0.441906205977)*x[0]+(-0.308989501913)*x[1]**o+(-0.549353671447)*x[1]
-        arg[1,4]=(0.711285710752)*x[0]**o+(0.297823778866)*x[0]+(0.645185023747)*x[1]**o+(0.825620074525)*x[1]
-        arg[2,0]=(-0.373175217644)*x[0]**o+(-0.25651286112)*x[0]+(-0.46193047583)*x[1]**o+(-0.359820938943)*x[1]
-        arg[2,1]=(-0.406101756283)*x[0]**o+(-0.38896428223)*x[0]+(-0.993257693721)*x[1]**o+(-0.910326366305)*x[1]
-        arg[2,2]=(0.517566718504)*x[0]**o+(-0.582940900248)*x[0]+(-0.381600156082)*x[1]**o+(0.466575604699)*x[1]
-        arg[2,3]=(0.323944380062)*x[0]**o+(-0.99359065412)*x[0]+(0.069389014076)*x[1]**o+(0.960192708612)*x[1]
-        arg[2,4]=(-0.741362989132)*x[0]**o+(0.978137520347)*x[0]+(-0.398259900603)*x[1]**o+(-0.224949732925)*x[1]
-        arg[3,0]=(-0.540235240193)*x[0]**o+(0.761488584116)*x[0]+(-0.100229643779)*x[1]**o+(-0.168724555964)*x[1]
-        arg[3,1]=(0.565068220879)*x[0]**o+(-0.778936552173)*x[0]+(-0.933478028833)*x[1]**o+(-0.274446893155)*x[1]
-        arg[3,2]=(-0.198878845493)*x[0]**o+(0.97185846381)*x[0]+(0.0345948289236)*x[1]**o+(0.359375885935)*x[1]
-        arg[3,3]=(-0.815426880937)*x[0]**o+(-0.0734806259357)*x[0]+(-0.0452925239934)*x[1]**o+(0.976167480949)*x[1]
-        arg[3,4]=(0.374670688698)*x[0]**o+(-0.427666745858)*x[0]+(-0.631640994091)*x[1]**o+(-0.312455066404)*x[1]
-        ref[0,0,0]=o*(0.148320408183)*x_ref[0]**(o-1)+(-0.340902870434)
-        ref[0,0,1]=o*(-0.0856445410272)*x_ref[1]**(o-1)+(0.220499304831)
-        ref[0,1,0]=o*(0.915892845602)*x_ref[0]**(o-1)+(-0.04770770327)
-        ref[0,1,1]=o*(0.482403170451)*x_ref[1]**(o-1)+(-0.639478756575)
-        ref[0,2,0]=o*(-0.109204159071)*x_ref[0]**(o-1)+(0.641607024805)
-        ref[0,2,1]=o*(-0.409310547283)*x_ref[1]**(o-1)+(0.202984386731)
-        ref[0,3,0]=o*(0.436833770493)*x_ref[0]**(o-1)+(-0.200611791892)
-        ref[0,3,1]=o*(-0.74814554517)*x_ref[1]**(o-1)+(0.571881526754)
-        ref[0,4,0]=o*(0.704812299415)*x_ref[0]**(o-1)+(0.688151134045)
-        ref[0,4,1]=o*(0.486135712907)*x_ref[1]**(o-1)+(0.955314240096)
-        ref[1,0,0]=o*(-0.731790373321)*x_ref[0]**(o-1)+(-0.711258122556)
-        ref[1,0,1]=o*(-0.961514666684)*x_ref[1]**(o-1)+(0.726573978492)
-        ref[1,1,0]=o*(0.975372389889)*x_ref[0]**(o-1)+(0.5026238435)
-        ref[1,1,1]=o*(0.948955767945)*x_ref[1]**(o-1)+(-0.780842035663)
-        ref[1,2,0]=o*(0.742383399984)*x_ref[0]**(o-1)+(-0.729678661652)
-        ref[1,2,1]=o*(-0.815499612514)*x_ref[1]**(o-1)+(-0.12280674993)
-        ref[1,3,0]=o*(0.323809901662)*x_ref[0]**(o-1)+(-0.441906205977)
-        ref[1,3,1]=o*(-0.308989501913)*x_ref[1]**(o-1)+(-0.549353671447)
-        ref[1,4,0]=o*(0.711285710752)*x_ref[0]**(o-1)+(0.297823778866)
-        ref[1,4,1]=o*(0.645185023747)*x_ref[1]**(o-1)+(0.825620074525)
-        ref[2,0,0]=o*(-0.373175217644)*x_ref[0]**(o-1)+(-0.25651286112)
-        ref[2,0,1]=o*(-0.46193047583)*x_ref[1]**(o-1)+(-0.359820938943)
-        ref[2,1,0]=o*(-0.406101756283)*x_ref[0]**(o-1)+(-0.38896428223)
-        ref[2,1,1]=o*(-0.993257693721)*x_ref[1]**(o-1)+(-0.910326366305)
-        ref[2,2,0]=o*(0.517566718504)*x_ref[0]**(o-1)+(-0.582940900248)
-        ref[2,2,1]=o*(-0.381600156082)*x_ref[1]**(o-1)+(0.466575604699)
-        ref[2,3,0]=o*(0.323944380062)*x_ref[0]**(o-1)+(-0.99359065412)
-        ref[2,3,1]=o*(0.069389014076)*x_ref[1]**(o-1)+(0.960192708612)
-        ref[2,4,0]=o*(-0.741362989132)*x_ref[0]**(o-1)+(0.978137520347)
-        ref[2,4,1]=o*(-0.398259900603)*x_ref[1]**(o-1)+(-0.224949732925)
-        ref[3,0,0]=o*(-0.540235240193)*x_ref[0]**(o-1)+(0.761488584116)
-        ref[3,0,1]=o*(-0.100229643779)*x_ref[1]**(o-1)+(-0.168724555964)
-        ref[3,1,0]=o*(0.565068220879)*x_ref[0]**(o-1)+(-0.778936552173)
-        ref[3,1,1]=o*(-0.933478028833)*x_ref[1]**(o-1)+(-0.274446893155)
-        ref[3,2,0]=o*(-0.198878845493)*x_ref[0]**(o-1)+(0.97185846381)
-        ref[3,2,1]=o*(0.0345948289236)*x_ref[1]**(o-1)+(0.359375885935)
-        ref[3,3,0]=o*(-0.815426880937)*x_ref[0]**(o-1)+(-0.0734806259357)
-        ref[3,3,1]=o*(-0.0452925239934)*x_ref[1]**(o-1)+(0.976167480949)
-        ref[3,4,0]=o*(0.374670688698)*x_ref[0]**(o-1)+(-0.427666745858)
-        ref[3,4,1]=o*(-0.631640994091)*x_ref[1]**(o-1)+(-0.312455066404)
-      else:
-        arg[0,0]=(0.284398400678)*x[0]**o+(0.219396164435)*x[0]+(0.220563761332)*x[1]**o+(0.167554964517)*x[1]+(0.234139558431)*x[2]**o+(-0.462262273341)*x[2]
-        arg[0,1]=(0.161107248226)*x[0]**o+(0.23981806792)*x[0]+(-0.365265066245)*x[1]**o+(0.280522162689)*x[1]+(0.0813974911438)*x[2]**o+(-0.43305486384)*x[2]
-        arg[0,2]=(0.813480874845)*x[0]**o+(0.600760069636)*x[0]+(-0.133815038485)*x[1]**o+(-0.954192097752)*x[1]+(-0.60756978514)*x[2]**o+(0.669710363926)*x[2]
-        arg[0,3]=(-0.760542897936)*x[0]**o+(0.869702837484)*x[0]+(0.568626088907)*x[1]**o+(0.272054244422)*x[1]+(-0.0415999983147)*x[2]**o+(0.446199878551)*x[2]
-        arg[0,4]=(0.0453200557409)*x[0]**o+(0.990444244175)*x[0]+(0.134265180195)*x[1]**o+(0.156166931353)*x[1]+(-0.787964274948)*x[2]**o+(0.0116920503615)*x[2]
-        arg[1,0]=(-0.826245054647)*x[0]**o+(0.203727421041)*x[0]+(0.435254937068)*x[1]**o+(-0.271957510058)*x[1]+(0.24056400787)*x[2]**o+(-0.270322614397)*x[2]
-        arg[1,1]=(-0.423339337474)*x[0]**o+(0.272439137387)*x[0]+(-0.0736213619539)*x[1]**o+(-0.776123259153)*x[1]+(-0.751736227059)*x[2]**o+(0.944253810697)*x[2]
-        arg[1,2]=(0.189348519506)*x[0]**o+(-0.599085006375)*x[0]+(0.511802349511)*x[1]**o+(-0.309756999526)*x[1]+(-0.753093308971)*x[2]**o+(-0.109878524762)*x[2]
-        arg[1,3]=(0.273889782311)*x[0]**o+(0.284416273071)*x[0]+(-0.793016836976)*x[1]**o+(0.584657111427)*x[1]+(0.202246448215)*x[2]**o+(0.669336280646)*x[2]
-        arg[1,4]=(-0.310062687494)*x[0]**o+(-0.0558492819571)*x[0]+(0.661043054703)*x[1]**o+(0.708531199864)*x[1]+(0.0490202348501)*x[2]**o+(0.732983691308)*x[2]
-        arg[2,0]=(0.967228638923)*x[0]**o+(-0.816725187456)*x[0]+(0.836005904943)*x[1]**o+(-0.618363868727)*x[1]+(-0.977101150283)*x[2]**o+(-0.960030792428)*x[2]
-        arg[2,1]=(0.536503091036)*x[0]**o+(-0.786194077149)*x[0]+(-0.337609174718)*x[1]**o+(0.787326702105)*x[1]+(0.989900210061)*x[2]**o+(0.67077581859)*x[2]
-        arg[2,2]=(-0.732242113661)*x[0]**o+(-0.565641876648)*x[0]+(0.175986347852)*x[1]**o+(0.862449074966)*x[1]+(0.0257656069443)*x[2]**o+(0.824927753427)*x[2]
-        arg[2,3]=(-0.863272499797)*x[0]**o+(-0.817781186551)*x[0]+(0.168931269996)*x[1]**o+(-0.530060186715)*x[1]+(-0.516801368376)*x[2]**o+(-0.570137941882)*x[2]
-        arg[2,4]=(-0.675287850319)*x[0]**o+(-0.672701614891)*x[0]+(-0.19851266374)*x[1]**o+(-0.0494587000627)*x[1]+(0.518006592112)*x[2]**o+(0.0337938303974)*x[2]
-        arg[3,0]=(-0.175683006965)*x[0]**o+(-0.843980579113)*x[0]+(0.903358518604)*x[1]**o+(0.962156465407)*x[1]+(-0.0887392353523)*x[2]**o+(0.524587238729)*x[2]
-        arg[3,1]=(0.0622433182846)*x[0]**o+(-0.756701969275)*x[0]+(0.721836266349)*x[1]**o+(0.457673032865)*x[1]+(0.704951904865)*x[2]**o+(0.781015828813)*x[2]
-        arg[3,2]=(-0.457057269128)*x[0]**o+(-0.880403805028)*x[0]+(0.103553852578)*x[1]**o+(-0.807061998574)*x[1]+(-0.0352722677587)*x[2]**o+(0.0527948564177)*x[2]
-        arg[3,3]=(0.161459807817)*x[0]**o+(0.698509459014)*x[0]+(-0.596487730094)*x[1]**o+(-0.906646770174)*x[1]+(0.567036380682)*x[2]**o+(0.490123167386)*x[2]
-        arg[3,4]=(-0.668686195082)*x[0]**o+(0.911485638627)*x[0]+(-0.856948411336)*x[1]**o+(0.0348927535379)*x[1]+(0.17649505057)*x[2]**o+(-0.778920185271)*x[2]
-        ref[0,0,0]=o*(0.284398400678)*x_ref[0]**(o-1)+(0.219396164435)
-        ref[0,0,1]=o*(0.220563761332)*x_ref[1]**(o-1)+(0.167554964517)
-        ref[0,0,2]=o*(0.234139558431)*x_ref[2]**(o-1)+(-0.462262273341)
-        ref[0,1,0]=o*(0.161107248226)*x_ref[0]**(o-1)+(0.23981806792)
-        ref[0,1,1]=o*(-0.365265066245)*x_ref[1]**(o-1)+(0.280522162689)
-        ref[0,1,2]=o*(0.0813974911438)*x_ref[2]**(o-1)+(-0.43305486384)
-        ref[0,2,0]=o*(0.813480874845)*x_ref[0]**(o-1)+(0.600760069636)
-        ref[0,2,1]=o*(-0.133815038485)*x_ref[1]**(o-1)+(-0.954192097752)
-        ref[0,2,2]=o*(-0.60756978514)*x_ref[2]**(o-1)+(0.669710363926)
-        ref[0,3,0]=o*(-0.760542897936)*x_ref[0]**(o-1)+(0.869702837484)
-        ref[0,3,1]=o*(0.568626088907)*x_ref[1]**(o-1)+(0.272054244422)
-        ref[0,3,2]=o*(-0.0415999983147)*x_ref[2]**(o-1)+(0.446199878551)
-        ref[0,4,0]=o*(0.0453200557409)*x_ref[0]**(o-1)+(0.990444244175)
-        ref[0,4,1]=o*(0.134265180195)*x_ref[1]**(o-1)+(0.156166931353)
-        ref[0,4,2]=o*(-0.787964274948)*x_ref[2]**(o-1)+(0.0116920503615)
-        ref[1,0,0]=o*(-0.826245054647)*x_ref[0]**(o-1)+(0.203727421041)
-        ref[1,0,1]=o*(0.435254937068)*x_ref[1]**(o-1)+(-0.271957510058)
-        ref[1,0,2]=o*(0.24056400787)*x_ref[2]**(o-1)+(-0.270322614397)
-        ref[1,1,0]=o*(-0.423339337474)*x_ref[0]**(o-1)+(0.272439137387)
-        ref[1,1,1]=o*(-0.0736213619539)*x_ref[1]**(o-1)+(-0.776123259153)
-        ref[1,1,2]=o*(-0.751736227059)*x_ref[2]**(o-1)+(0.944253810697)
-        ref[1,2,0]=o*(0.189348519506)*x_ref[0]**(o-1)+(-0.599085006375)
-        ref[1,2,1]=o*(0.511802349511)*x_ref[1]**(o-1)+(-0.309756999526)
-        ref[1,2,2]=o*(-0.753093308971)*x_ref[2]**(o-1)+(-0.109878524762)
-        ref[1,3,0]=o*(0.273889782311)*x_ref[0]**(o-1)+(0.284416273071)
-        ref[1,3,1]=o*(-0.793016836976)*x_ref[1]**(o-1)+(0.584657111427)
-        ref[1,3,2]=o*(0.202246448215)*x_ref[2]**(o-1)+(0.669336280646)
-        ref[1,4,0]=o*(-0.310062687494)*x_ref[0]**(o-1)+(-0.0558492819571)
-        ref[1,4,1]=o*(0.661043054703)*x_ref[1]**(o-1)+(0.708531199864)
-        ref[1,4,2]=o*(0.0490202348501)*x_ref[2]**(o-1)+(0.732983691308)
-        ref[2,0,0]=o*(0.967228638923)*x_ref[0]**(o-1)+(-0.816725187456)
-        ref[2,0,1]=o*(0.836005904943)*x_ref[1]**(o-1)+(-0.618363868727)
-        ref[2,0,2]=o*(-0.977101150283)*x_ref[2]**(o-1)+(-0.960030792428)
-        ref[2,1,0]=o*(0.536503091036)*x_ref[0]**(o-1)+(-0.786194077149)
-        ref[2,1,1]=o*(-0.337609174718)*x_ref[1]**(o-1)+(0.787326702105)
-        ref[2,1,2]=o*(0.989900210061)*x_ref[2]**(o-1)+(0.67077581859)
-        ref[2,2,0]=o*(-0.732242113661)*x_ref[0]**(o-1)+(-0.565641876648)
-        ref[2,2,1]=o*(0.175986347852)*x_ref[1]**(o-1)+(0.862449074966)
-        ref[2,2,2]=o*(0.0257656069443)*x_ref[2]**(o-1)+(0.824927753427)
-        ref[2,3,0]=o*(-0.863272499797)*x_ref[0]**(o-1)+(-0.817781186551)
-        ref[2,3,1]=o*(0.168931269996)*x_ref[1]**(o-1)+(-0.530060186715)
-        ref[2,3,2]=o*(-0.516801368376)*x_ref[2]**(o-1)+(-0.570137941882)
-        ref[2,4,0]=o*(-0.675287850319)*x_ref[0]**(o-1)+(-0.672701614891)
-        ref[2,4,1]=o*(-0.19851266374)*x_ref[1]**(o-1)+(-0.0494587000627)
-        ref[2,4,2]=o*(0.518006592112)*x_ref[2]**(o-1)+(0.0337938303974)
-        ref[3,0,0]=o*(-0.175683006965)*x_ref[0]**(o-1)+(-0.843980579113)
-        ref[3,0,1]=o*(0.903358518604)*x_ref[1]**(o-1)+(0.962156465407)
-        ref[3,0,2]=o*(-0.0887392353523)*x_ref[2]**(o-1)+(0.524587238729)
-        ref[3,1,0]=o*(0.0622433182846)*x_ref[0]**(o-1)+(-0.756701969275)
-        ref[3,1,1]=o*(0.721836266349)*x_ref[1]**(o-1)+(0.457673032865)
-        ref[3,1,2]=o*(0.704951904865)*x_ref[2]**(o-1)+(0.781015828813)
-        ref[3,2,0]=o*(-0.457057269128)*x_ref[0]**(o-1)+(-0.880403805028)
-        ref[3,2,1]=o*(0.103553852578)*x_ref[1]**(o-1)+(-0.807061998574)
-        ref[3,2,2]=o*(-0.0352722677587)*x_ref[2]**(o-1)+(0.0527948564177)
-        ref[3,3,0]=o*(0.161459807817)*x_ref[0]**(o-1)+(0.698509459014)
-        ref[3,3,1]=o*(-0.596487730094)*x_ref[1]**(o-1)+(-0.906646770174)
-        ref[3,3,2]=o*(0.567036380682)*x_ref[2]**(o-1)+(0.490123167386)
-        ref[3,4,0]=o*(-0.668686195082)*x_ref[0]**(o-1)+(0.911485638627)
-        ref[3,4,1]=o*(-0.856948411336)*x_ref[1]**(o-1)+(0.0348927535379)
-        ref[3,4,2]=o*(0.17649505057)*x_ref[2]**(o-1)+(-0.778920185271)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.366719126165)*x[0]**o+(0.273305723392)*x[0]+(0.508134048679)*x[1]**o+(-0.0895788966541)*x[1]
-        arg[0,0,1]=(-0.911986850385)*x[0]**o+(-0.98503317507)*x[0]+(-0.310897248279)*x[1]**o+(0.015206007134)*x[1]
-        arg[0,1,0]=(-0.0827324676842)*x[0]**o+(0.566620026269)*x[0]+(-0.0581063189367)*x[1]**o+(0.379530936223)*x[1]
-        arg[0,1,1]=(0.223247684076)*x[0]**o+(0.511247996036)*x[0]+(-0.904638808138)*x[1]**o+(-0.253982863496)*x[1]
-        arg[1,0,0]=(-0.117040630362)*x[0]**o+(0.720200175398)*x[0]+(0.316014562047)*x[1]**o+(-0.88437304478)*x[1]
-        arg[1,0,1]=(0.521261471788)*x[0]**o+(0.866618380963)*x[0]+(0.376866254345)*x[1]**o+(0.0905522236713)*x[1]
-        arg[1,1,0]=(-0.0907011175214)*x[0]**o+(0.925809501719)*x[0]+(0.29066676347)*x[1]**o+(-0.77392365917)*x[1]
-        arg[1,1,1]=(0.410922874646)*x[0]**o+(-0.801953959211)*x[0]+(-0.911104174539)*x[1]**o+(-0.640661859542)*x[1]
-        arg[2,0,0]=(-0.449471274267)*x[0]**o+(0.8111872512)*x[0]+(0.0498814189394)*x[1]**o+(0.683703882124)*x[1]
-        arg[2,0,1]=(-0.192396495147)*x[0]**o+(0.893457442524)*x[0]+(-0.946936565887)*x[1]**o+(-0.0290255758634)*x[1]
-        arg[2,1,0]=(0.90847535637)*x[0]**o+(-0.517929281823)*x[0]+(0.389994692606)*x[1]**o+(-0.601708219886)*x[1]
-        arg[2,1,1]=(0.401910281699)*x[0]**o+(0.485033224067)*x[0]+(-0.362139392478)*x[1]**o+(-0.740542640224)*x[1]
-        arg[3,0,0]=(0.195815356554)*x[0]**o+(-0.584270182199)*x[0]+(-0.773247762709)*x[1]**o+(0.974109226972)*x[1]
-        arg[3,0,1]=(0.516821334505)*x[0]**o+(-0.667535261235)*x[0]+(-0.687554420634)*x[1]**o+(-0.826211449593)*x[1]
-        arg[3,1,0]=(-0.886684033283)*x[0]**o+(0.833394822235)*x[0]+(-0.509561014765)*x[1]**o+(-0.934990250803)*x[1]
-        arg[3,1,1]=(-0.279505984235)*x[0]**o+(0.629210321924)*x[0]+(-0.245033518843)*x[1]**o+(0.148437993524)*x[1]
-        arg[4,0,0]=(-0.120914130766)*x[0]**o+(-0.70386339291)*x[0]+(-0.37739143589)*x[1]**o+(-0.604979315802)*x[1]
-        arg[4,0,1]=(-0.259492475213)*x[0]**o+(0.628922768093)*x[0]+(-0.973387886178)*x[1]**o+(0.285217747252)*x[1]
-        arg[4,1,0]=(-0.986163107858)*x[0]**o+(-0.85082996164)*x[0]+(-0.560402256475)*x[1]**o+(-0.468278543242)*x[1]
-        arg[4,1,1]=(0.370258762453)*x[0]**o+(0.870396552858)*x[0]+(0.57205142923)*x[1]**o+(0.332787259857)*x[1]
-        arg[5,0,0]=(-0.570453853889)*x[0]**o+(0.253977538115)*x[0]+(0.628545140288)*x[1]**o+(-0.766550576107)*x[1]
-        arg[5,0,1]=(-0.626776709555)*x[0]**o+(0.593526092433)*x[0]+(0.824052315861)*x[1]**o+(-0.409883522469)*x[1]
-        arg[5,1,0]=(0.285256467088)*x[0]**o+(-0.808675657802)*x[0]+(-0.818251043807)*x[1]**o+(0.378756627769)*x[1]
-        arg[5,1,1]=(-0.810805592247)*x[0]**o+(-0.879886206051)*x[0]+(0.378171206533)*x[1]**o+(0.478469089448)*x[1]
-        ref[0,0,0,0]=o*(0.366719126165)*x_ref[0]**(o-1)+(0.273305723392)
-        ref[0,0,0,1]=o*(0.508134048679)*x_ref[1]**(o-1)+(-0.0895788966541)
-        ref[0,0,1,0]=o*(-0.911986850385)*x_ref[0]**(o-1)+(-0.98503317507)
-        ref[0,0,1,1]=o*(-0.310897248279)*x_ref[1]**(o-1)+(0.015206007134)
-        ref[0,1,0,0]=o*(-0.0827324676842)*x_ref[0]**(o-1)+(0.566620026269)
-        ref[0,1,0,1]=o*(-0.0581063189367)*x_ref[1]**(o-1)+(0.379530936223)
-        ref[0,1,1,0]=o*(0.223247684076)*x_ref[0]**(o-1)+(0.511247996036)
-        ref[0,1,1,1]=o*(-0.904638808138)*x_ref[1]**(o-1)+(-0.253982863496)
-        ref[1,0,0,0]=o*(-0.117040630362)*x_ref[0]**(o-1)+(0.720200175398)
-        ref[1,0,0,1]=o*(0.316014562047)*x_ref[1]**(o-1)+(-0.88437304478)
-        ref[1,0,1,0]=o*(0.521261471788)*x_ref[0]**(o-1)+(0.866618380963)
-        ref[1,0,1,1]=o*(0.376866254345)*x_ref[1]**(o-1)+(0.0905522236713)
-        ref[1,1,0,0]=o*(-0.0907011175214)*x_ref[0]**(o-1)+(0.925809501719)
-        ref[1,1,0,1]=o*(0.29066676347)*x_ref[1]**(o-1)+(-0.77392365917)
-        ref[1,1,1,0]=o*(0.410922874646)*x_ref[0]**(o-1)+(-0.801953959211)
-        ref[1,1,1,1]=o*(-0.911104174539)*x_ref[1]**(o-1)+(-0.640661859542)
-        ref[2,0,0,0]=o*(-0.449471274267)*x_ref[0]**(o-1)+(0.8111872512)
-        ref[2,0,0,1]=o*(0.0498814189394)*x_ref[1]**(o-1)+(0.683703882124)
-        ref[2,0,1,0]=o*(-0.192396495147)*x_ref[0]**(o-1)+(0.893457442524)
-        ref[2,0,1,1]=o*(-0.946936565887)*x_ref[1]**(o-1)+(-0.0290255758634)
-        ref[2,1,0,0]=o*(0.90847535637)*x_ref[0]**(o-1)+(-0.517929281823)
-        ref[2,1,0,1]=o*(0.389994692606)*x_ref[1]**(o-1)+(-0.601708219886)
-        ref[2,1,1,0]=o*(0.401910281699)*x_ref[0]**(o-1)+(0.485033224067)
-        ref[2,1,1,1]=o*(-0.362139392478)*x_ref[1]**(o-1)+(-0.740542640224)
-        ref[3,0,0,0]=o*(0.195815356554)*x_ref[0]**(o-1)+(-0.584270182199)
-        ref[3,0,0,1]=o*(-0.773247762709)*x_ref[1]**(o-1)+(0.974109226972)
-        ref[3,0,1,0]=o*(0.516821334505)*x_ref[0]**(o-1)+(-0.667535261235)
-        ref[3,0,1,1]=o*(-0.687554420634)*x_ref[1]**(o-1)+(-0.826211449593)
-        ref[3,1,0,0]=o*(-0.886684033283)*x_ref[0]**(o-1)+(0.833394822235)
-        ref[3,1,0,1]=o*(-0.509561014765)*x_ref[1]**(o-1)+(-0.934990250803)
-        ref[3,1,1,0]=o*(-0.279505984235)*x_ref[0]**(o-1)+(0.629210321924)
-        ref[3,1,1,1]=o*(-0.245033518843)*x_ref[1]**(o-1)+(0.148437993524)
-        ref[4,0,0,0]=o*(-0.120914130766)*x_ref[0]**(o-1)+(-0.70386339291)
-        ref[4,0,0,1]=o*(-0.37739143589)*x_ref[1]**(o-1)+(-0.604979315802)
-        ref[4,0,1,0]=o*(-0.259492475213)*x_ref[0]**(o-1)+(0.628922768093)
-        ref[4,0,1,1]=o*(-0.973387886178)*x_ref[1]**(o-1)+(0.285217747252)
-        ref[4,1,0,0]=o*(-0.986163107858)*x_ref[0]**(o-1)+(-0.85082996164)
-        ref[4,1,0,1]=o*(-0.560402256475)*x_ref[1]**(o-1)+(-0.468278543242)
-        ref[4,1,1,0]=o*(0.370258762453)*x_ref[0]**(o-1)+(0.870396552858)
-        ref[4,1,1,1]=o*(0.57205142923)*x_ref[1]**(o-1)+(0.332787259857)
-        ref[5,0,0,0]=o*(-0.570453853889)*x_ref[0]**(o-1)+(0.253977538115)
-        ref[5,0,0,1]=o*(0.628545140288)*x_ref[1]**(o-1)+(-0.766550576107)
-        ref[5,0,1,0]=o*(-0.626776709555)*x_ref[0]**(o-1)+(0.593526092433)
-        ref[5,0,1,1]=o*(0.824052315861)*x_ref[1]**(o-1)+(-0.409883522469)
-        ref[5,1,0,0]=o*(0.285256467088)*x_ref[0]**(o-1)+(-0.808675657802)
-        ref[5,1,0,1]=o*(-0.818251043807)*x_ref[1]**(o-1)+(0.378756627769)
-        ref[5,1,1,0]=o*(-0.810805592247)*x_ref[0]**(o-1)+(-0.879886206051)
-        ref[5,1,1,1]=o*(0.378171206533)*x_ref[1]**(o-1)+(0.478469089448)
-      else:
-        arg[0,0,0]=(0.99032561737)*x[0]**o+(0.0664709329455)*x[0]+(0.118470702946)*x[1]**o+(0.339805181064)*x[1]+(-0.288819936068)*x[2]**o+(0.500626113335)*x[2]
-        arg[0,0,1]=(-0.736833023385)*x[0]**o+(-0.160433791202)*x[0]+(-0.159295012314)*x[1]**o+(-0.0515197665154)*x[1]+(-0.199553046759)*x[2]**o+(0.912767397035)*x[2]
-        arg[0,1,0]=(0.263643352646)*x[0]**o+(-0.408521561602)*x[0]+(-0.690441644678)*x[1]**o+(0.514925086967)*x[1]+(-0.321785011214)*x[2]**o+(-0.192767636106)*x[2]
-        arg[0,1,1]=(-0.00679573309711)*x[0]**o+(-0.0919830030966)*x[0]+(0.0194635540782)*x[1]**o+(0.0364274479874)*x[1]+(0.324767149157)*x[2]**o+(-0.930770951272)*x[2]
-        arg[1,0,0]=(0.129524159454)*x[0]**o+(-0.747948168258)*x[0]+(0.748091879992)*x[1]**o+(0.0701365933978)*x[1]+(-0.227595193537)*x[2]**o+(-0.515988222581)*x[2]
-        arg[1,0,1]=(-0.369843455974)*x[0]**o+(0.902965907161)*x[0]+(0.841050267135)*x[1]**o+(0.985297243316)*x[1]+(-0.96057678523)*x[2]**o+(0.149329555515)*x[2]
-        arg[1,1,0]=(-0.530918169849)*x[0]**o+(0.574734874263)*x[0]+(-0.56424658789)*x[1]**o+(-0.756154171146)*x[1]+(-0.181750429769)*x[2]**o+(-0.270972276027)*x[2]
-        arg[1,1,1]=(0.18184543511)*x[0]**o+(0.810253164883)*x[0]+(-0.0289547932926)*x[1]**o+(0.690366471619)*x[1]+(0.862616271239)*x[2]**o+(0.157705360996)*x[2]
-        arg[2,0,0]=(-0.732811475459)*x[0]**o+(-0.720788617286)*x[0]+(-0.72285785154)*x[1]**o+(-0.764360626538)*x[1]+(0.979115834974)*x[2]**o+(0.430570190112)*x[2]
-        arg[2,0,1]=(-0.602364948602)*x[0]**o+(-0.313871272033)*x[0]+(0.931476652796)*x[1]**o+(-0.553237167378)*x[1]+(0.273773142735)*x[2]**o+(0.732796238419)*x[2]
-        arg[2,1,0]=(0.723724167325)*x[0]**o+(-0.411330362765)*x[0]+(0.415411259564)*x[1]**o+(0.596006586583)*x[1]+(0.588177039382)*x[2]**o+(-0.365406082278)*x[2]
-        arg[2,1,1]=(0.0622006916856)*x[0]**o+(0.583807018004)*x[0]+(0.292401319183)*x[1]**o+(-0.202393075873)*x[1]+(-0.544886623341)*x[2]**o+(-0.269087712755)*x[2]
-        arg[3,0,0]=(-0.543339583883)*x[0]**o+(-0.594218090249)*x[0]+(0.463226896714)*x[1]**o+(0.613466907584)*x[1]+(0.147935164587)*x[2]**o+(0.696530808607)*x[2]
-        arg[3,0,1]=(0.338109512519)*x[0]**o+(0.281428380284)*x[0]+(0.0445095482602)*x[1]**o+(0.898143737155)*x[1]+(0.0465131079784)*x[2]**o+(-0.311801195497)*x[2]
-        arg[3,1,0]=(0.489699597199)*x[0]**o+(0.198461296558)*x[0]+(0.87785894323)*x[1]**o+(0.916226820395)*x[1]+(-0.473685913201)*x[2]**o+(-0.496145627682)*x[2]
-        arg[3,1,1]=(0.249814020596)*x[0]**o+(-0.894315482252)*x[0]+(-0.778776373134)*x[1]**o+(0.760727700644)*x[1]+(0.743775735588)*x[2]**o+(-0.689040985439)*x[2]
-        arg[4,0,0]=(-0.825052728563)*x[0]**o+(0.522046869865)*x[0]+(0.333964173928)*x[1]**o+(-0.76926539114)*x[1]+(0.412352181661)*x[2]**o+(-0.0067772174596)*x[2]
-        arg[4,0,1]=(-0.478610156432)*x[0]**o+(0.750576911314)*x[0]+(-0.531813749953)*x[1]**o+(0.355951176778)*x[1]+(-0.852853671607)*x[2]**o+(0.980221079923)*x[2]
-        arg[4,1,0]=(-0.641389506244)*x[0]**o+(0.881787042426)*x[0]+(-0.304080099649)*x[1]**o+(0.38448900132)*x[1]+(-0.047930997317)*x[2]**o+(-0.276038511441)*x[2]
-        arg[4,1,1]=(0.606877338216)*x[0]**o+(0.693205674961)*x[0]+(-0.731785947563)*x[1]**o+(0.980888111857)*x[1]+(0.355758103413)*x[2]**o+(-0.493780352941)*x[2]
-        arg[5,0,0]=(-0.542680086594)*x[0]**o+(-0.335712421489)*x[0]+(0.196257902892)*x[1]**o+(-0.923381865562)*x[1]+(0.396049043788)*x[2]**o+(0.231195219983)*x[2]
-        arg[5,0,1]=(0.224328300764)*x[0]**o+(0.306254705923)*x[0]+(-0.298262471524)*x[1]**o+(0.318537412793)*x[1]+(-0.0971742408716)*x[2]**o+(-0.374440507273)*x[2]
-        arg[5,1,0]=(-0.408985188836)*x[0]**o+(-0.932478279672)*x[0]+(0.700313488604)*x[1]**o+(0.259720889362)*x[1]+(0.862207003532)*x[2]**o+(0.646109275237)*x[2]
-        arg[5,1,1]=(-0.0341740340851)*x[0]**o+(0.742119475866)*x[0]+(0.310640405448)*x[1]**o+(-0.295841203899)*x[1]+(-0.778064951853)*x[2]**o+(-0.847637829972)*x[2]
-        ref[0,0,0,0]=o*(0.99032561737)*x_ref[0]**(o-1)+(0.0664709329455)
-        ref[0,0,0,1]=o*(0.118470702946)*x_ref[1]**(o-1)+(0.339805181064)
-        ref[0,0,0,2]=o*(-0.288819936068)*x_ref[2]**(o-1)+(0.500626113335)
-        ref[0,0,1,0]=o*(-0.736833023385)*x_ref[0]**(o-1)+(-0.160433791202)
-        ref[0,0,1,1]=o*(-0.159295012314)*x_ref[1]**(o-1)+(-0.0515197665154)
-        ref[0,0,1,2]=o*(-0.199553046759)*x_ref[2]**(o-1)+(0.912767397035)
-        ref[0,1,0,0]=o*(0.263643352646)*x_ref[0]**(o-1)+(-0.408521561602)
-        ref[0,1,0,1]=o*(-0.690441644678)*x_ref[1]**(o-1)+(0.514925086967)
-        ref[0,1,0,2]=o*(-0.321785011214)*x_ref[2]**(o-1)+(-0.192767636106)
-        ref[0,1,1,0]=o*(-0.00679573309711)*x_ref[0]**(o-1)+(-0.0919830030966)
-        ref[0,1,1,1]=o*(0.0194635540782)*x_ref[1]**(o-1)+(0.0364274479874)
-        ref[0,1,1,2]=o*(0.324767149157)*x_ref[2]**(o-1)+(-0.930770951272)
-        ref[1,0,0,0]=o*(0.129524159454)*x_ref[0]**(o-1)+(-0.747948168258)
-        ref[1,0,0,1]=o*(0.748091879992)*x_ref[1]**(o-1)+(0.0701365933978)
-        ref[1,0,0,2]=o*(-0.227595193537)*x_ref[2]**(o-1)+(-0.515988222581)
-        ref[1,0,1,0]=o*(-0.369843455974)*x_ref[0]**(o-1)+(0.902965907161)
-        ref[1,0,1,1]=o*(0.841050267135)*x_ref[1]**(o-1)+(0.985297243316)
-        ref[1,0,1,2]=o*(-0.96057678523)*x_ref[2]**(o-1)+(0.149329555515)
-        ref[1,1,0,0]=o*(-0.530918169849)*x_ref[0]**(o-1)+(0.574734874263)
-        ref[1,1,0,1]=o*(-0.56424658789)*x_ref[1]**(o-1)+(-0.756154171146)
-        ref[1,1,0,2]=o*(-0.181750429769)*x_ref[2]**(o-1)+(-0.270972276027)
-        ref[1,1,1,0]=o*(0.18184543511)*x_ref[0]**(o-1)+(0.810253164883)
-        ref[1,1,1,1]=o*(-0.0289547932926)*x_ref[1]**(o-1)+(0.690366471619)
-        ref[1,1,1,2]=o*(0.862616271239)*x_ref[2]**(o-1)+(0.157705360996)
-        ref[2,0,0,0]=o*(-0.732811475459)*x_ref[0]**(o-1)+(-0.720788617286)
-        ref[2,0,0,1]=o*(-0.72285785154)*x_ref[1]**(o-1)+(-0.764360626538)
-        ref[2,0,0,2]=o*(0.979115834974)*x_ref[2]**(o-1)+(0.430570190112)
-        ref[2,0,1,0]=o*(-0.602364948602)*x_ref[0]**(o-1)+(-0.313871272033)
-        ref[2,0,1,1]=o*(0.931476652796)*x_ref[1]**(o-1)+(-0.553237167378)
-        ref[2,0,1,2]=o*(0.273773142735)*x_ref[2]**(o-1)+(0.732796238419)
-        ref[2,1,0,0]=o*(0.723724167325)*x_ref[0]**(o-1)+(-0.411330362765)
-        ref[2,1,0,1]=o*(0.415411259564)*x_ref[1]**(o-1)+(0.596006586583)
-        ref[2,1,0,2]=o*(0.588177039382)*x_ref[2]**(o-1)+(-0.365406082278)
-        ref[2,1,1,0]=o*(0.0622006916856)*x_ref[0]**(o-1)+(0.583807018004)
-        ref[2,1,1,1]=o*(0.292401319183)*x_ref[1]**(o-1)+(-0.202393075873)
-        ref[2,1,1,2]=o*(-0.544886623341)*x_ref[2]**(o-1)+(-0.269087712755)
-        ref[3,0,0,0]=o*(-0.543339583883)*x_ref[0]**(o-1)+(-0.594218090249)
-        ref[3,0,0,1]=o*(0.463226896714)*x_ref[1]**(o-1)+(0.613466907584)
-        ref[3,0,0,2]=o*(0.147935164587)*x_ref[2]**(o-1)+(0.696530808607)
-        ref[3,0,1,0]=o*(0.338109512519)*x_ref[0]**(o-1)+(0.281428380284)
-        ref[3,0,1,1]=o*(0.0445095482602)*x_ref[1]**(o-1)+(0.898143737155)
-        ref[3,0,1,2]=o*(0.0465131079784)*x_ref[2]**(o-1)+(-0.311801195497)
-        ref[3,1,0,0]=o*(0.489699597199)*x_ref[0]**(o-1)+(0.198461296558)
-        ref[3,1,0,1]=o*(0.87785894323)*x_ref[1]**(o-1)+(0.916226820395)
-        ref[3,1,0,2]=o*(-0.473685913201)*x_ref[2]**(o-1)+(-0.496145627682)
-        ref[3,1,1,0]=o*(0.249814020596)*x_ref[0]**(o-1)+(-0.894315482252)
-        ref[3,1,1,1]=o*(-0.778776373134)*x_ref[1]**(o-1)+(0.760727700644)
-        ref[3,1,1,2]=o*(0.743775735588)*x_ref[2]**(o-1)+(-0.689040985439)
-        ref[4,0,0,0]=o*(-0.825052728563)*x_ref[0]**(o-1)+(0.522046869865)
-        ref[4,0,0,1]=o*(0.333964173928)*x_ref[1]**(o-1)+(-0.76926539114)
-        ref[4,0,0,2]=o*(0.412352181661)*x_ref[2]**(o-1)+(-0.0067772174596)
-        ref[4,0,1,0]=o*(-0.478610156432)*x_ref[0]**(o-1)+(0.750576911314)
-        ref[4,0,1,1]=o*(-0.531813749953)*x_ref[1]**(o-1)+(0.355951176778)
-        ref[4,0,1,2]=o*(-0.852853671607)*x_ref[2]**(o-1)+(0.980221079923)
-        ref[4,1,0,0]=o*(-0.641389506244)*x_ref[0]**(o-1)+(0.881787042426)
-        ref[4,1,0,1]=o*(-0.304080099649)*x_ref[1]**(o-1)+(0.38448900132)
-        ref[4,1,0,2]=o*(-0.047930997317)*x_ref[2]**(o-1)+(-0.276038511441)
-        ref[4,1,1,0]=o*(0.606877338216)*x_ref[0]**(o-1)+(0.693205674961)
-        ref[4,1,1,1]=o*(-0.731785947563)*x_ref[1]**(o-1)+(0.980888111857)
-        ref[4,1,1,2]=o*(0.355758103413)*x_ref[2]**(o-1)+(-0.493780352941)
-        ref[5,0,0,0]=o*(-0.542680086594)*x_ref[0]**(o-1)+(-0.335712421489)
-        ref[5,0,0,1]=o*(0.196257902892)*x_ref[1]**(o-1)+(-0.923381865562)
-        ref[5,0,0,2]=o*(0.396049043788)*x_ref[2]**(o-1)+(0.231195219983)
-        ref[5,0,1,0]=o*(0.224328300764)*x_ref[0]**(o-1)+(0.306254705923)
-        ref[5,0,1,1]=o*(-0.298262471524)*x_ref[1]**(o-1)+(0.318537412793)
-        ref[5,0,1,2]=o*(-0.0971742408716)*x_ref[2]**(o-1)+(-0.374440507273)
-        ref[5,1,0,0]=o*(-0.408985188836)*x_ref[0]**(o-1)+(-0.932478279672)
-        ref[5,1,0,1]=o*(0.700313488604)*x_ref[1]**(o-1)+(0.259720889362)
-        ref[5,1,0,2]=o*(0.862207003532)*x_ref[2]**(o-1)+(0.646109275237)
-        ref[5,1,1,0]=o*(-0.0341740340851)*x_ref[0]**(o-1)+(0.742119475866)
-        ref[5,1,1,1]=o*(0.310640405448)*x_ref[1]**(o-1)+(-0.295841203899)
-        ref[5,1,1,2]=o*(-0.778064951853)*x_ref[2]**(o-1)+(-0.847637829972)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(-0.188926722839)*x[0]**o+(0.0528015322778)*x[0]+(0.394368405707)*x[1]**o+(0.573648619197)*x[1]
-        ref[0]=o*(-0.188926722839)*x_ref[0]**(o-1)+(0.0528015322778)
-        ref[1]=o*(0.394368405707)*x_ref[1]**(o-1)+(0.573648619197)
-      else:
-        arg=(0.208843709667)*x[0]**o+(-0.461780133723)*x[0]+(0.15028897973)*x[1]**o+(-0.594920423887)*x[1]+(0.517629763426)*x[2]**o+(0.403396285863)*x[2]
-        ref[0]=o*(0.208843709667)*x_ref[0]**(o-1)+(-0.461780133723)
-        ref[1]=o*(0.15028897973)*x_ref[1]**(o-1)+(-0.594920423887)
-        ref[2]=o*(0.517629763426)*x_ref[2]**(o-1)+(0.403396285863)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(0.321445299816)*x[0]**o+(-0.133016832047)*x[0]+(0.663051729844)*x[1]**o+(-0.688058231943)*x[1]
-        arg[1]=(-0.0269450330081)*x[0]**o+(0.0944332164606)*x[0]+(-0.285657276114)*x[1]**o+(-0.00151309619508)*x[1]
-        ref[0,0]=o*(0.321445299816)*x_ref[0]**(o-1)+(-0.133016832047)
-        ref[0,1]=o*(0.663051729844)*x_ref[1]**(o-1)+(-0.688058231943)
-        ref[1,0]=o*(-0.0269450330081)*x_ref[0]**(o-1)+(0.0944332164606)
-        ref[1,1]=o*(-0.285657276114)*x_ref[1]**(o-1)+(-0.00151309619508)
-      else:
-        arg[0]=(-0.779418963504)*x[0]**o+(-0.66017852882)*x[0]+(0.0796746454991)*x[1]**o+(-0.559782816375)*x[1]+(0.903645344893)*x[2]**o+(0.752370056114)*x[2]
-        arg[1]=(-0.789198080015)*x[0]**o+(-0.61428352272)*x[0]+(-0.0678314090236)*x[1]**o+(-0.592189717525)*x[1]+(0.289759368386)*x[2]**o+(-0.612628874512)*x[2]
-        ref[0,0]=o*(-0.779418963504)*x_ref[0]**(o-1)+(-0.66017852882)
-        ref[0,1]=o*(0.0796746454991)*x_ref[1]**(o-1)+(-0.559782816375)
-        ref[0,2]=o*(0.903645344893)*x_ref[2]**(o-1)+(0.752370056114)
-        ref[1,0]=o*(-0.789198080015)*x_ref[0]**(o-1)+(-0.61428352272)
-        ref[1,1]=o*(-0.0678314090236)*x_ref[1]**(o-1)+(-0.592189717525)
-        ref[1,2]=o*(0.289759368386)*x_ref[2]**(o-1)+(-0.612628874512)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(-0.23566716053)*x[0]**o+(-0.72341376636)*x[0]+(0.972511874619)*x[1]**o+(-0.915617397257)*x[1]
-        arg[0,1]=(-0.767927641628)*x[0]**o+(0.381522882363)*x[0]+(0.147312331507)*x[1]**o+(0.593669546711)*x[1]
-        arg[0,2]=(0.735354496752)*x[0]**o+(0.0328129903288)*x[0]+(-0.113236521952)*x[1]**o+(0.486761746739)*x[1]
-        arg[0,3]=(-0.324209941994)*x[0]**o+(-0.235510827792)*x[0]+(0.167116943517)*x[1]**o+(0.0751459244008)*x[1]
-        arg[0,4]=(-0.880038149806)*x[0]**o+(0.250698509807)*x[0]+(-0.249975000596)*x[1]**o+(-0.597287763096)*x[1]
-        arg[1,0]=(0.0776176376816)*x[0]**o+(0.719231364575)*x[0]+(-0.573766708326)*x[1]**o+(-0.0657431038913)*x[1]
-        arg[1,1]=(0.214586176047)*x[0]**o+(-0.542584637828)*x[0]+(-0.649916769602)*x[1]**o+(0.360674473897)*x[1]
-        arg[1,2]=(-0.131191309002)*x[0]**o+(0.00956079049513)*x[0]+(-0.0399067337815)*x[1]**o+(-0.870803424616)*x[1]
-        arg[1,3]=(-0.604243786872)*x[0]**o+(0.439677657963)*x[0]+(0.749342339715)*x[1]**o+(0.772192804507)*x[1]
-        arg[1,4]=(0.461907488239)*x[0]**o+(-0.957858912937)*x[0]+(0.915893716197)*x[1]**o+(-0.858798101783)*x[1]
-        arg[2,0]=(0.922598387398)*x[0]**o+(-0.194676923002)*x[0]+(-0.724972013231)*x[1]**o+(-0.83198174562)*x[1]
-        arg[2,1]=(0.62648959348)*x[0]**o+(-0.968390708088)*x[0]+(0.955519507666)*x[1]**o+(0.0140489471727)*x[1]
-        arg[2,2]=(-0.488249561275)*x[0]**o+(-0.354607683897)*x[0]+(-0.781278758499)*x[1]**o+(-0.206598205965)*x[1]
-        arg[2,3]=(-0.503987693598)*x[0]**o+(0.581909066959)*x[0]+(0.133400791996)*x[1]**o+(-0.234595457546)*x[1]
-        arg[2,4]=(-0.768789727431)*x[0]**o+(0.669013649323)*x[0]+(-0.618484878747)*x[1]**o+(-0.287461699457)*x[1]
-        arg[3,0]=(0.125603852132)*x[0]**o+(0.83276119445)*x[0]+(-0.643188775199)*x[1]**o+(0.228300434999)*x[1]
-        arg[3,1]=(0.645892506866)*x[0]**o+(0.701922167913)*x[0]+(-0.283958147744)*x[1]**o+(-0.781197564279)*x[1]
-        arg[3,2]=(-0.0995754594857)*x[0]**o+(-0.106281614694)*x[0]+(0.00912723779796)*x[1]**o+(0.841448365384)*x[1]
-        arg[3,3]=(-0.664740577186)*x[0]**o+(0.100401840489)*x[0]+(0.334300978415)*x[1]**o+(-0.383639183037)*x[1]
-        arg[3,4]=(0.949394733501)*x[0]**o+(-0.0768203586407)*x[0]+(0.715238033192)*x[1]**o+(-0.175178433047)*x[1]
-        ref[0,0,0]=o*(-0.23566716053)*x_ref[0]**(o-1)+(-0.72341376636)
-        ref[0,0,1]=o*(0.972511874619)*x_ref[1]**(o-1)+(-0.915617397257)
-        ref[0,1,0]=o*(-0.767927641628)*x_ref[0]**(o-1)+(0.381522882363)
-        ref[0,1,1]=o*(0.147312331507)*x_ref[1]**(o-1)+(0.593669546711)
-        ref[0,2,0]=o*(0.735354496752)*x_ref[0]**(o-1)+(0.0328129903288)
-        ref[0,2,1]=o*(-0.113236521952)*x_ref[1]**(o-1)+(0.486761746739)
-        ref[0,3,0]=o*(-0.324209941994)*x_ref[0]**(o-1)+(-0.235510827792)
-        ref[0,3,1]=o*(0.167116943517)*x_ref[1]**(o-1)+(0.0751459244008)
-        ref[0,4,0]=o*(-0.880038149806)*x_ref[0]**(o-1)+(0.250698509807)
-        ref[0,4,1]=o*(-0.249975000596)*x_ref[1]**(o-1)+(-0.597287763096)
-        ref[1,0,0]=o*(0.0776176376816)*x_ref[0]**(o-1)+(0.719231364575)
-        ref[1,0,1]=o*(-0.573766708326)*x_ref[1]**(o-1)+(-0.0657431038913)
-        ref[1,1,0]=o*(0.214586176047)*x_ref[0]**(o-1)+(-0.542584637828)
-        ref[1,1,1]=o*(-0.649916769602)*x_ref[1]**(o-1)+(0.360674473897)
-        ref[1,2,0]=o*(-0.131191309002)*x_ref[0]**(o-1)+(0.00956079049513)
-        ref[1,2,1]=o*(-0.0399067337815)*x_ref[1]**(o-1)+(-0.870803424616)
-        ref[1,3,0]=o*(-0.604243786872)*x_ref[0]**(o-1)+(0.439677657963)
-        ref[1,3,1]=o*(0.749342339715)*x_ref[1]**(o-1)+(0.772192804507)
-        ref[1,4,0]=o*(0.461907488239)*x_ref[0]**(o-1)+(-0.957858912937)
-        ref[1,4,1]=o*(0.915893716197)*x_ref[1]**(o-1)+(-0.858798101783)
-        ref[2,0,0]=o*(0.922598387398)*x_ref[0]**(o-1)+(-0.194676923002)
-        ref[2,0,1]=o*(-0.724972013231)*x_ref[1]**(o-1)+(-0.83198174562)
-        ref[2,1,0]=o*(0.62648959348)*x_ref[0]**(o-1)+(-0.968390708088)
-        ref[2,1,1]=o*(0.955519507666)*x_ref[1]**(o-1)+(0.0140489471727)
-        ref[2,2,0]=o*(-0.488249561275)*x_ref[0]**(o-1)+(-0.354607683897)
-        ref[2,2,1]=o*(-0.781278758499)*x_ref[1]**(o-1)+(-0.206598205965)
-        ref[2,3,0]=o*(-0.503987693598)*x_ref[0]**(o-1)+(0.581909066959)
-        ref[2,3,1]=o*(0.133400791996)*x_ref[1]**(o-1)+(-0.234595457546)
-        ref[2,4,0]=o*(-0.768789727431)*x_ref[0]**(o-1)+(0.669013649323)
-        ref[2,4,1]=o*(-0.618484878747)*x_ref[1]**(o-1)+(-0.287461699457)
-        ref[3,0,0]=o*(0.125603852132)*x_ref[0]**(o-1)+(0.83276119445)
-        ref[3,0,1]=o*(-0.643188775199)*x_ref[1]**(o-1)+(0.228300434999)
-        ref[3,1,0]=o*(0.645892506866)*x_ref[0]**(o-1)+(0.701922167913)
-        ref[3,1,1]=o*(-0.283958147744)*x_ref[1]**(o-1)+(-0.781197564279)
-        ref[3,2,0]=o*(-0.0995754594857)*x_ref[0]**(o-1)+(-0.106281614694)
-        ref[3,2,1]=o*(0.00912723779796)*x_ref[1]**(o-1)+(0.841448365384)
-        ref[3,3,0]=o*(-0.664740577186)*x_ref[0]**(o-1)+(0.100401840489)
-        ref[3,3,1]=o*(0.334300978415)*x_ref[1]**(o-1)+(-0.383639183037)
-        ref[3,4,0]=o*(0.949394733501)*x_ref[0]**(o-1)+(-0.0768203586407)
-        ref[3,4,1]=o*(0.715238033192)*x_ref[1]**(o-1)+(-0.175178433047)
-      else:
-        arg[0,0]=(0.697509098917)*x[0]**o+(-0.571983680004)*x[0]+(0.456254556306)*x[1]**o+(0.407076527516)*x[1]+(-0.379511349609)*x[2]**o+(0.37799055755)*x[2]
-        arg[0,1]=(-0.543310012054)*x[0]**o+(0.622613643381)*x[0]+(0.899028609397)*x[1]**o+(0.0358870746022)*x[1]+(0.923875380698)*x[2]**o+(-0.79605331054)*x[2]
-        arg[0,2]=(0.613316685189)*x[0]**o+(0.308568047177)*x[0]+(0.0817110033202)*x[1]**o+(0.631167179752)*x[1]+(0.527259723046)*x[2]**o+(-0.44240882282)*x[2]
-        arg[0,3]=(0.831261835833)*x[0]**o+(-0.0869775296331)*x[0]+(0.30622781536)*x[1]**o+(0.633056041347)*x[1]+(0.631243241273)*x[2]**o+(0.100112313541)*x[2]
-        arg[0,4]=(-0.997030704248)*x[0]**o+(-0.374466395678)*x[0]+(0.0194535973217)*x[1]**o+(0.816505299829)*x[1]+(-0.412869831136)*x[2]**o+(-0.943976805293)*x[2]
-        arg[1,0]=(0.555404162574)*x[0]**o+(-0.335389786458)*x[0]+(0.644585507787)*x[1]**o+(0.917280812233)*x[1]+(0.417410132456)*x[2]**o+(-0.26505427144)*x[2]
-        arg[1,1]=(0.781185373116)*x[0]**o+(-0.852319927495)*x[0]+(-0.442528270016)*x[1]**o+(-0.538132919634)*x[1]+(-0.604047417588)*x[2]**o+(0.727395882535)*x[2]
-        arg[1,2]=(-0.272462727471)*x[0]**o+(-0.834077558378)*x[0]+(0.763269297137)*x[1]**o+(-0.823180222291)*x[1]+(-0.162146758865)*x[2]**o+(0.595529366226)*x[2]
-        arg[1,3]=(-0.0468429326976)*x[0]**o+(-0.179116342871)*x[0]+(-0.640563576973)*x[1]**o+(0.914070705704)*x[1]+(0.725297040984)*x[2]**o+(0.870302256055)*x[2]
-        arg[1,4]=(-0.0632444730547)*x[0]**o+(-0.266315658984)*x[0]+(0.533681589116)*x[1]**o+(0.709939511175)*x[1]+(-0.60554532679)*x[2]**o+(0.915224044125)*x[2]
-        arg[2,0]=(0.23330035938)*x[0]**o+(-0.385419740264)*x[0]+(0.120424890588)*x[1]**o+(0.591983224766)*x[1]+(0.925564960339)*x[2]**o+(-0.602528014193)*x[2]
-        arg[2,1]=(0.786024569139)*x[0]**o+(0.619287163829)*x[0]+(-0.722187904611)*x[1]**o+(0.275352886478)*x[1]+(0.723591624164)*x[2]**o+(0.0909486746072)*x[2]
-        arg[2,2]=(0.766293557291)*x[0]**o+(0.0610694643295)*x[0]+(0.375714644104)*x[1]**o+(-0.772092520637)*x[1]+(0.775058332825)*x[2]**o+(0.533525926942)*x[2]
-        arg[2,3]=(-0.67254491898)*x[0]**o+(-0.0926113197516)*x[0]+(-0.615891770107)*x[1]**o+(-0.616600504392)*x[1]+(-0.808251600122)*x[2]**o+(-0.602309670223)*x[2]
-        arg[2,4]=(0.80242562495)*x[0]**o+(0.359171734464)*x[0]+(-0.560256436586)*x[1]**o+(-0.420334736194)*x[1]+(0.871043977034)*x[2]**o+(0.156212055829)*x[2]
-        arg[3,0]=(-0.0569856826934)*x[0]**o+(-0.381868544897)*x[0]+(-0.396013644801)*x[1]**o+(0.695329212849)*x[1]+(0.201188831017)*x[2]**o+(0.471078018432)*x[2]
-        arg[3,1]=(0.28457474179)*x[0]**o+(-0.623305572154)*x[0]+(-0.442659858168)*x[1]**o+(0.725900635371)*x[1]+(-0.908206119008)*x[2]**o+(-0.190223696293)*x[2]
-        arg[3,2]=(0.568043480074)*x[0]**o+(0.942235524274)*x[0]+(-0.720727900911)*x[1]**o+(0.771808109591)*x[1]+(-0.538996050264)*x[2]**o+(-0.641448383256)*x[2]
-        arg[3,3]=(0.00707362989382)*x[0]**o+(0.139812417833)*x[0]+(-0.179986304531)*x[1]**o+(-0.546332565953)*x[1]+(-0.687783685855)*x[2]**o+(0.292513389166)*x[2]
-        arg[3,4]=(0.657315930332)*x[0]**o+(0.0252304793386)*x[0]+(0.540737656651)*x[1]**o+(0.832327802479)*x[1]+(-0.822641904799)*x[2]**o+(-0.599972412377)*x[2]
-        ref[0,0,0]=o*(0.697509098917)*x_ref[0]**(o-1)+(-0.571983680004)
-        ref[0,0,1]=o*(0.456254556306)*x_ref[1]**(o-1)+(0.407076527516)
-        ref[0,0,2]=o*(-0.379511349609)*x_ref[2]**(o-1)+(0.37799055755)
-        ref[0,1,0]=o*(-0.543310012054)*x_ref[0]**(o-1)+(0.622613643381)
-        ref[0,1,1]=o*(0.899028609397)*x_ref[1]**(o-1)+(0.0358870746022)
-        ref[0,1,2]=o*(0.923875380698)*x_ref[2]**(o-1)+(-0.79605331054)
-        ref[0,2,0]=o*(0.613316685189)*x_ref[0]**(o-1)+(0.308568047177)
-        ref[0,2,1]=o*(0.0817110033202)*x_ref[1]**(o-1)+(0.631167179752)
-        ref[0,2,2]=o*(0.527259723046)*x_ref[2]**(o-1)+(-0.44240882282)
-        ref[0,3,0]=o*(0.831261835833)*x_ref[0]**(o-1)+(-0.0869775296331)
-        ref[0,3,1]=o*(0.30622781536)*x_ref[1]**(o-1)+(0.633056041347)
-        ref[0,3,2]=o*(0.631243241273)*x_ref[2]**(o-1)+(0.100112313541)
-        ref[0,4,0]=o*(-0.997030704248)*x_ref[0]**(o-1)+(-0.374466395678)
-        ref[0,4,1]=o*(0.0194535973217)*x_ref[1]**(o-1)+(0.816505299829)
-        ref[0,4,2]=o*(-0.412869831136)*x_ref[2]**(o-1)+(-0.943976805293)
-        ref[1,0,0]=o*(0.555404162574)*x_ref[0]**(o-1)+(-0.335389786458)
-        ref[1,0,1]=o*(0.644585507787)*x_ref[1]**(o-1)+(0.917280812233)
-        ref[1,0,2]=o*(0.417410132456)*x_ref[2]**(o-1)+(-0.26505427144)
-        ref[1,1,0]=o*(0.781185373116)*x_ref[0]**(o-1)+(-0.852319927495)
-        ref[1,1,1]=o*(-0.442528270016)*x_ref[1]**(o-1)+(-0.538132919634)
-        ref[1,1,2]=o*(-0.604047417588)*x_ref[2]**(o-1)+(0.727395882535)
-        ref[1,2,0]=o*(-0.272462727471)*x_ref[0]**(o-1)+(-0.834077558378)
-        ref[1,2,1]=o*(0.763269297137)*x_ref[1]**(o-1)+(-0.823180222291)
-        ref[1,2,2]=o*(-0.162146758865)*x_ref[2]**(o-1)+(0.595529366226)
-        ref[1,3,0]=o*(-0.0468429326976)*x_ref[0]**(o-1)+(-0.179116342871)
-        ref[1,3,1]=o*(-0.640563576973)*x_ref[1]**(o-1)+(0.914070705704)
-        ref[1,3,2]=o*(0.725297040984)*x_ref[2]**(o-1)+(0.870302256055)
-        ref[1,4,0]=o*(-0.0632444730547)*x_ref[0]**(o-1)+(-0.266315658984)
-        ref[1,4,1]=o*(0.533681589116)*x_ref[1]**(o-1)+(0.709939511175)
-        ref[1,4,2]=o*(-0.60554532679)*x_ref[2]**(o-1)+(0.915224044125)
-        ref[2,0,0]=o*(0.23330035938)*x_ref[0]**(o-1)+(-0.385419740264)
-        ref[2,0,1]=o*(0.120424890588)*x_ref[1]**(o-1)+(0.591983224766)
-        ref[2,0,2]=o*(0.925564960339)*x_ref[2]**(o-1)+(-0.602528014193)
-        ref[2,1,0]=o*(0.786024569139)*x_ref[0]**(o-1)+(0.619287163829)
-        ref[2,1,1]=o*(-0.722187904611)*x_ref[1]**(o-1)+(0.275352886478)
-        ref[2,1,2]=o*(0.723591624164)*x_ref[2]**(o-1)+(0.0909486746072)
-        ref[2,2,0]=o*(0.766293557291)*x_ref[0]**(o-1)+(0.0610694643295)
-        ref[2,2,1]=o*(0.375714644104)*x_ref[1]**(o-1)+(-0.772092520637)
-        ref[2,2,2]=o*(0.775058332825)*x_ref[2]**(o-1)+(0.533525926942)
-        ref[2,3,0]=o*(-0.67254491898)*x_ref[0]**(o-1)+(-0.0926113197516)
-        ref[2,3,1]=o*(-0.615891770107)*x_ref[1]**(o-1)+(-0.616600504392)
-        ref[2,3,2]=o*(-0.808251600122)*x_ref[2]**(o-1)+(-0.602309670223)
-        ref[2,4,0]=o*(0.80242562495)*x_ref[0]**(o-1)+(0.359171734464)
-        ref[2,4,1]=o*(-0.560256436586)*x_ref[1]**(o-1)+(-0.420334736194)
-        ref[2,4,2]=o*(0.871043977034)*x_ref[2]**(o-1)+(0.156212055829)
-        ref[3,0,0]=o*(-0.0569856826934)*x_ref[0]**(o-1)+(-0.381868544897)
-        ref[3,0,1]=o*(-0.396013644801)*x_ref[1]**(o-1)+(0.695329212849)
-        ref[3,0,2]=o*(0.201188831017)*x_ref[2]**(o-1)+(0.471078018432)
-        ref[3,1,0]=o*(0.28457474179)*x_ref[0]**(o-1)+(-0.623305572154)
-        ref[3,1,1]=o*(-0.442659858168)*x_ref[1]**(o-1)+(0.725900635371)
-        ref[3,1,2]=o*(-0.908206119008)*x_ref[2]**(o-1)+(-0.190223696293)
-        ref[3,2,0]=o*(0.568043480074)*x_ref[0]**(o-1)+(0.942235524274)
-        ref[3,2,1]=o*(-0.720727900911)*x_ref[1]**(o-1)+(0.771808109591)
-        ref[3,2,2]=o*(-0.538996050264)*x_ref[2]**(o-1)+(-0.641448383256)
-        ref[3,3,0]=o*(0.00707362989382)*x_ref[0]**(o-1)+(0.139812417833)
-        ref[3,3,1]=o*(-0.179986304531)*x_ref[1]**(o-1)+(-0.546332565953)
-        ref[3,3,2]=o*(-0.687783685855)*x_ref[2]**(o-1)+(0.292513389166)
-        ref[3,4,0]=o*(0.657315930332)*x_ref[0]**(o-1)+(0.0252304793386)
-        ref[3,4,1]=o*(0.540737656651)*x_ref[1]**(o-1)+(0.832327802479)
-        ref[3,4,2]=o*(-0.822641904799)*x_ref[2]**(o-1)+(-0.599972412377)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactOne
-
-      assumptions: Solution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=self.order
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=Solution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.711259674136)*x[0]**o+(0.597099394118)*x[0]+(0.656676641605)*x[1]**o+(0.800065074626)*x[1]
-        arg[0,0,1]=(0.410575880869)*x[0]**o+(0.0290305819624)*x[0]+(-0.746442034948)*x[1]**o+(0.074826200729)*x[1]
-        arg[0,1,0]=(0.478073638149)*x[0]**o+(0.856920711223)*x[0]+(0.517173340088)*x[1]**o+(-0.677846282063)*x[1]
-        arg[0,1,1]=(0.285231489647)*x[0]**o+(0.0756593965609)*x[0]+(-0.355221676478)*x[1]**o+(-0.520564308221)*x[1]
-        arg[1,0,0]=(-0.368777104698)*x[0]**o+(0.474996103371)*x[0]+(0.675654207136)*x[1]**o+(-0.0324979517659)*x[1]
-        arg[1,0,1]=(0.498857835281)*x[0]**o+(-0.73836840989)*x[0]+(0.362789682422)*x[1]**o+(0.315425076703)*x[1]
-        arg[1,1,0]=(-0.325384820094)*x[0]**o+(-0.895297521761)*x[0]+(0.563090918504)*x[1]**o+(0.589834648825)*x[1]
-        arg[1,1,1]=(0.0378060061714)*x[0]**o+(-0.429064920806)*x[0]+(-0.467324629077)*x[1]**o+(0.938161415082)*x[1]
-        arg[2,0,0]=(-0.527827738902)*x[0]**o+(-0.534425169092)*x[0]+(-0.185111533531)*x[1]**o+(-0.810076656622)*x[1]
-        arg[2,0,1]=(-0.221712302033)*x[0]**o+(0.883619587624)*x[0]+(-0.972912188123)*x[1]**o+(0.0780565750992)*x[1]
-        arg[2,1,0]=(-0.752942706408)*x[0]**o+(-0.153790659605)*x[0]+(-0.398384592556)*x[1]**o+(0.657319049074)*x[1]
-        arg[2,1,1]=(0.428492876383)*x[0]**o+(0.427090189076)*x[0]+(-0.017400284896)*x[1]**o+(-0.730635641841)*x[1]
-        arg[3,0,0]=(-0.644602330168)*x[0]**o+(0.706532342264)*x[0]+(-0.64532460698)*x[1]**o+(0.850059843173)*x[1]
-        arg[3,0,1]=(-0.63066688687)*x[0]**o+(0.578132047851)*x[0]+(0.413335880906)*x[1]**o+(0.611233278281)*x[1]
-        arg[3,1,0]=(-0.247378556309)*x[0]**o+(-0.631688468936)*x[0]+(-0.898130068425)*x[1]**o+(0.147210661251)*x[1]
-        arg[3,1,1]=(0.979026126394)*x[0]**o+(-0.231003559285)*x[0]+(-0.884530953901)*x[1]**o+(-0.453907922804)*x[1]
-        arg[4,0,0]=(-0.584910281652)*x[0]**o+(-0.808929690751)*x[0]+(0.661854511996)*x[1]**o+(0.262336033771)*x[1]
-        arg[4,0,1]=(0.32006961919)*x[0]**o+(0.407637671852)*x[0]+(-0.36617527544)*x[1]**o+(-0.28786191714)*x[1]
-        arg[4,1,0]=(0.718670448416)*x[0]**o+(-0.836956284868)*x[0]+(0.694744974874)*x[1]**o+(-0.176920245996)*x[1]
-        arg[4,1,1]=(-0.892867770142)*x[0]**o+(-0.439240069099)*x[0]+(0.960956271989)*x[1]**o+(-0.559541152716)*x[1]
-        arg[5,0,0]=(-0.159459484106)*x[0]**o+(0.497366075466)*x[0]+(0.776343693655)*x[1]**o+(0.326882397775)*x[1]
-        arg[5,0,1]=(-0.769197598992)*x[0]**o+(-0.155931232816)*x[0]+(0.306889959757)*x[1]**o+(0.283798117232)*x[1]
-        arg[5,1,0]=(0.329987736778)*x[0]**o+(-0.181917315586)*x[0]+(0.896508353752)*x[1]**o+(0.505276687831)*x[1]
-        arg[5,1,1]=(-0.805264678584)*x[0]**o+(0.1541429191)*x[0]+(0.759370357364)*x[1]**o+(-0.858941373648)*x[1]
-        ref[0,0,0,0]=o*(0.711259674136)*x_ref[0]**(o-1)+(0.597099394118)
-        ref[0,0,0,1]=o*(0.656676641605)*x_ref[1]**(o-1)+(0.800065074626)
-        ref[0,0,1,0]=o*(0.410575880869)*x_ref[0]**(o-1)+(0.0290305819624)
-        ref[0,0,1,1]=o*(-0.746442034948)*x_ref[1]**(o-1)+(0.074826200729)
-        ref[0,1,0,0]=o*(0.478073638149)*x_ref[0]**(o-1)+(0.856920711223)
-        ref[0,1,0,1]=o*(0.517173340088)*x_ref[1]**(o-1)+(-0.677846282063)
-        ref[0,1,1,0]=o*(0.285231489647)*x_ref[0]**(o-1)+(0.0756593965609)
-        ref[0,1,1,1]=o*(-0.355221676478)*x_ref[1]**(o-1)+(-0.520564308221)
-        ref[1,0,0,0]=o*(-0.368777104698)*x_ref[0]**(o-1)+(0.474996103371)
-        ref[1,0,0,1]=o*(0.675654207136)*x_ref[1]**(o-1)+(-0.0324979517659)
-        ref[1,0,1,0]=o*(0.498857835281)*x_ref[0]**(o-1)+(-0.73836840989)
-        ref[1,0,1,1]=o*(0.362789682422)*x_ref[1]**(o-1)+(0.315425076703)
-        ref[1,1,0,0]=o*(-0.325384820094)*x_ref[0]**(o-1)+(-0.895297521761)
-        ref[1,1,0,1]=o*(0.563090918504)*x_ref[1]**(o-1)+(0.589834648825)
-        ref[1,1,1,0]=o*(0.0378060061714)*x_ref[0]**(o-1)+(-0.429064920806)
-        ref[1,1,1,1]=o*(-0.467324629077)*x_ref[1]**(o-1)+(0.938161415082)
-        ref[2,0,0,0]=o*(-0.527827738902)*x_ref[0]**(o-1)+(-0.534425169092)
-        ref[2,0,0,1]=o*(-0.185111533531)*x_ref[1]**(o-1)+(-0.810076656622)
-        ref[2,0,1,0]=o*(-0.221712302033)*x_ref[0]**(o-1)+(0.883619587624)
-        ref[2,0,1,1]=o*(-0.972912188123)*x_ref[1]**(o-1)+(0.0780565750992)
-        ref[2,1,0,0]=o*(-0.752942706408)*x_ref[0]**(o-1)+(-0.153790659605)
-        ref[2,1,0,1]=o*(-0.398384592556)*x_ref[1]**(o-1)+(0.657319049074)
-        ref[2,1,1,0]=o*(0.428492876383)*x_ref[0]**(o-1)+(0.427090189076)
-        ref[2,1,1,1]=o*(-0.017400284896)*x_ref[1]**(o-1)+(-0.730635641841)
-        ref[3,0,0,0]=o*(-0.644602330168)*x_ref[0]**(o-1)+(0.706532342264)
-        ref[3,0,0,1]=o*(-0.64532460698)*x_ref[1]**(o-1)+(0.850059843173)
-        ref[3,0,1,0]=o*(-0.63066688687)*x_ref[0]**(o-1)+(0.578132047851)
-        ref[3,0,1,1]=o*(0.413335880906)*x_ref[1]**(o-1)+(0.611233278281)
-        ref[3,1,0,0]=o*(-0.247378556309)*x_ref[0]**(o-1)+(-0.631688468936)
-        ref[3,1,0,1]=o*(-0.898130068425)*x_ref[1]**(o-1)+(0.147210661251)
-        ref[3,1,1,0]=o*(0.979026126394)*x_ref[0]**(o-1)+(-0.231003559285)
-        ref[3,1,1,1]=o*(-0.884530953901)*x_ref[1]**(o-1)+(-0.453907922804)
-        ref[4,0,0,0]=o*(-0.584910281652)*x_ref[0]**(o-1)+(-0.808929690751)
-        ref[4,0,0,1]=o*(0.661854511996)*x_ref[1]**(o-1)+(0.262336033771)
-        ref[4,0,1,0]=o*(0.32006961919)*x_ref[0]**(o-1)+(0.407637671852)
-        ref[4,0,1,1]=o*(-0.36617527544)*x_ref[1]**(o-1)+(-0.28786191714)
-        ref[4,1,0,0]=o*(0.718670448416)*x_ref[0]**(o-1)+(-0.836956284868)
-        ref[4,1,0,1]=o*(0.694744974874)*x_ref[1]**(o-1)+(-0.176920245996)
-        ref[4,1,1,0]=o*(-0.892867770142)*x_ref[0]**(o-1)+(-0.439240069099)
-        ref[4,1,1,1]=o*(0.960956271989)*x_ref[1]**(o-1)+(-0.559541152716)
-        ref[5,0,0,0]=o*(-0.159459484106)*x_ref[0]**(o-1)+(0.497366075466)
-        ref[5,0,0,1]=o*(0.776343693655)*x_ref[1]**(o-1)+(0.326882397775)
-        ref[5,0,1,0]=o*(-0.769197598992)*x_ref[0]**(o-1)+(-0.155931232816)
-        ref[5,0,1,1]=o*(0.306889959757)*x_ref[1]**(o-1)+(0.283798117232)
-        ref[5,1,0,0]=o*(0.329987736778)*x_ref[0]**(o-1)+(-0.181917315586)
-        ref[5,1,0,1]=o*(0.896508353752)*x_ref[1]**(o-1)+(0.505276687831)
-        ref[5,1,1,0]=o*(-0.805264678584)*x_ref[0]**(o-1)+(0.1541429191)
-        ref[5,1,1,1]=o*(0.759370357364)*x_ref[1]**(o-1)+(-0.858941373648)
-      else:
-        arg[0,0,0]=(0.168268053227)*x[0]**o+(-0.693455720059)*x[0]+(-0.929660815724)*x[1]**o+(0.986095168154)*x[1]+(0.736239785757)*x[2]**o+(-0.852231596742)*x[2]
-        arg[0,0,1]=(-0.246755690586)*x[0]**o+(0.374568513964)*x[0]+(-0.964930789849)*x[1]**o+(0.911595670675)*x[1]+(-0.450825843592)*x[2]**o+(0.109918389584)*x[2]
-        arg[0,1,0]=(-0.733872890764)*x[0]**o+(-0.673737586895)*x[0]+(0.948528017502)*x[1]**o+(0.00135698010622)*x[1]+(0.960702320728)*x[2]**o+(-0.0223793346126)*x[2]
-        arg[0,1,1]=(0.117470384547)*x[0]**o+(0.390065805504)*x[0]+(0.116939897886)*x[1]**o+(0.201756470627)*x[1]+(0.649311190776)*x[2]**o+(-0.388330674246)*x[2]
-        arg[1,0,0]=(0.848074231014)*x[0]**o+(-0.431699971504)*x[0]+(0.956477578677)*x[1]**o+(0.522633753414)*x[1]+(0.147733403055)*x[2]**o+(0.136817362225)*x[2]
-        arg[1,0,1]=(0.482934543775)*x[0]**o+(-0.358181242578)*x[0]+(-0.013088278343)*x[1]**o+(0.002654195003)*x[1]+(0.960898421715)*x[2]**o+(0.23166323571)*x[2]
-        arg[1,1,0]=(-0.60469206115)*x[0]**o+(-0.449073005118)*x[0]+(-0.0774626329204)*x[1]**o+(-0.135772353437)*x[1]+(-0.796309060217)*x[2]**o+(-0.0601212417342)*x[2]
-        arg[1,1,1]=(0.41742915222)*x[0]**o+(-0.907531578792)*x[0]+(-0.998018453394)*x[1]**o+(0.38863222527)*x[1]+(-0.941909949653)*x[2]**o+(-0.962025400733)*x[2]
-        arg[2,0,0]=(0.677803680186)*x[0]**o+(0.493757303449)*x[0]+(-0.700353467324)*x[1]**o+(0.713489396377)*x[1]+(-0.147276750564)*x[2]**o+(-0.666815984705)*x[2]
-        arg[2,0,1]=(-0.196166170445)*x[0]**o+(-0.776357160477)*x[0]+(0.531757851468)*x[1]**o+(-0.0951663105473)*x[1]+(0.296695659682)*x[2]**o+(0.132047740242)*x[2]
-        arg[2,1,0]=(0.89703218788)*x[0]**o+(0.446461958293)*x[0]+(0.849781349832)*x[1]**o+(0.495003438762)*x[1]+(0.200866318394)*x[2]**o+(-0.239158244355)*x[2]
-        arg[2,1,1]=(0.699816693)*x[0]**o+(-0.498016262468)*x[0]+(0.467212425781)*x[1]**o+(0.507210685133)*x[1]+(0.872000089805)*x[2]**o+(-0.608415132584)*x[2]
-        arg[3,0,0]=(-0.858779999521)*x[0]**o+(-0.934307938564)*x[0]+(0.998531969194)*x[1]**o+(-0.10694369616)*x[1]+(0.565515051636)*x[2]**o+(-0.340328286843)*x[2]
-        arg[3,0,1]=(-0.734447160975)*x[0]**o+(0.592969337009)*x[0]+(0.769648460523)*x[1]**o+(0.939994123398)*x[1]+(-0.14168879251)*x[2]**o+(-0.151602759825)*x[2]
-        arg[3,1,0]=(-0.204447368694)*x[0]**o+(-0.149512701586)*x[0]+(0.496643987821)*x[1]**o+(0.137154021271)*x[1]+(-0.207451973465)*x[2]**o+(0.976289933313)*x[2]
-        arg[3,1,1]=(-0.498939396392)*x[0]**o+(-0.388761371521)*x[0]+(0.918876234523)*x[1]**o+(0.326334103437)*x[1]+(0.135801853065)*x[2]**o+(-0.513268577694)*x[2]
-        arg[4,0,0]=(0.383369953978)*x[0]**o+(0.262190952188)*x[0]+(0.226913840907)*x[1]**o+(0.625767074123)*x[1]+(0.0736409418752)*x[2]**o+(-0.681643359069)*x[2]
-        arg[4,0,1]=(-0.00395633017219)*x[0]**o+(0.103598757494)*x[0]+(0.245388867438)*x[1]**o+(0.0199139065324)*x[1]+(-0.85935209669)*x[2]**o+(0.780770429677)*x[2]
-        arg[4,1,0]=(0.93284113054)*x[0]**o+(0.192867707515)*x[0]+(0.354258046046)*x[1]**o+(0.0244899514488)*x[1]+(-0.00723308587137)*x[2]**o+(0.724287748378)*x[2]
-        arg[4,1,1]=(-0.701870704251)*x[0]**o+(0.29146856048)*x[0]+(-0.677358067691)*x[1]**o+(-0.055827889309)*x[1]+(0.96248585097)*x[2]**o+(0.100526700803)*x[2]
-        arg[5,0,0]=(-0.582058132348)*x[0]**o+(0.5354038569)*x[0]+(-0.608415656952)*x[1]**o+(0.700352801694)*x[1]+(-0.705438310252)*x[2]**o+(0.969824711925)*x[2]
-        arg[5,0,1]=(-0.573326444971)*x[0]**o+(0.00490482707944)*x[0]+(0.300312254171)*x[1]**o+(-0.620154697788)*x[1]+(-0.0703788860867)*x[2]**o+(-0.608567609941)*x[2]
-        arg[5,1,0]=(0.346782282755)*x[0]**o+(-0.022146949553)*x[0]+(0.548359292626)*x[1]**o+(0.314315074761)*x[1]+(0.164808336191)*x[2]**o+(-0.983018613943)*x[2]
-        arg[5,1,1]=(-0.357126808896)*x[0]**o+(0.547191129837)*x[0]+(-0.0128153418859)*x[1]**o+(-0.199507147279)*x[1]+(-0.637546467191)*x[2]**o+(0.65056997574)*x[2]
-        ref[0,0,0,0]=o*(0.168268053227)*x_ref[0]**(o-1)+(-0.693455720059)
-        ref[0,0,0,1]=o*(-0.929660815724)*x_ref[1]**(o-1)+(0.986095168154)
-        ref[0,0,0,2]=o*(0.736239785757)*x_ref[2]**(o-1)+(-0.852231596742)
-        ref[0,0,1,0]=o*(-0.246755690586)*x_ref[0]**(o-1)+(0.374568513964)
-        ref[0,0,1,1]=o*(-0.964930789849)*x_ref[1]**(o-1)+(0.911595670675)
-        ref[0,0,1,2]=o*(-0.450825843592)*x_ref[2]**(o-1)+(0.109918389584)
-        ref[0,1,0,0]=o*(-0.733872890764)*x_ref[0]**(o-1)+(-0.673737586895)
-        ref[0,1,0,1]=o*(0.948528017502)*x_ref[1]**(o-1)+(0.00135698010622)
-        ref[0,1,0,2]=o*(0.960702320728)*x_ref[2]**(o-1)+(-0.0223793346126)
-        ref[0,1,1,0]=o*(0.117470384547)*x_ref[0]**(o-1)+(0.390065805504)
-        ref[0,1,1,1]=o*(0.116939897886)*x_ref[1]**(o-1)+(0.201756470627)
-        ref[0,1,1,2]=o*(0.649311190776)*x_ref[2]**(o-1)+(-0.388330674246)
-        ref[1,0,0,0]=o*(0.848074231014)*x_ref[0]**(o-1)+(-0.431699971504)
-        ref[1,0,0,1]=o*(0.956477578677)*x_ref[1]**(o-1)+(0.522633753414)
-        ref[1,0,0,2]=o*(0.147733403055)*x_ref[2]**(o-1)+(0.136817362225)
-        ref[1,0,1,0]=o*(0.482934543775)*x_ref[0]**(o-1)+(-0.358181242578)
-        ref[1,0,1,1]=o*(-0.013088278343)*x_ref[1]**(o-1)+(0.002654195003)
-        ref[1,0,1,2]=o*(0.960898421715)*x_ref[2]**(o-1)+(0.23166323571)
-        ref[1,1,0,0]=o*(-0.60469206115)*x_ref[0]**(o-1)+(-0.449073005118)
-        ref[1,1,0,1]=o*(-0.0774626329204)*x_ref[1]**(o-1)+(-0.135772353437)
-        ref[1,1,0,2]=o*(-0.796309060217)*x_ref[2]**(o-1)+(-0.0601212417342)
-        ref[1,1,1,0]=o*(0.41742915222)*x_ref[0]**(o-1)+(-0.907531578792)
-        ref[1,1,1,1]=o*(-0.998018453394)*x_ref[1]**(o-1)+(0.38863222527)
-        ref[1,1,1,2]=o*(-0.941909949653)*x_ref[2]**(o-1)+(-0.962025400733)
-        ref[2,0,0,0]=o*(0.677803680186)*x_ref[0]**(o-1)+(0.493757303449)
-        ref[2,0,0,1]=o*(-0.700353467324)*x_ref[1]**(o-1)+(0.713489396377)
-        ref[2,0,0,2]=o*(-0.147276750564)*x_ref[2]**(o-1)+(-0.666815984705)
-        ref[2,0,1,0]=o*(-0.196166170445)*x_ref[0]**(o-1)+(-0.776357160477)
-        ref[2,0,1,1]=o*(0.531757851468)*x_ref[1]**(o-1)+(-0.0951663105473)
-        ref[2,0,1,2]=o*(0.296695659682)*x_ref[2]**(o-1)+(0.132047740242)
-        ref[2,1,0,0]=o*(0.89703218788)*x_ref[0]**(o-1)+(0.446461958293)
-        ref[2,1,0,1]=o*(0.849781349832)*x_ref[1]**(o-1)+(0.495003438762)
-        ref[2,1,0,2]=o*(0.200866318394)*x_ref[2]**(o-1)+(-0.239158244355)
-        ref[2,1,1,0]=o*(0.699816693)*x_ref[0]**(o-1)+(-0.498016262468)
-        ref[2,1,1,1]=o*(0.467212425781)*x_ref[1]**(o-1)+(0.507210685133)
-        ref[2,1,1,2]=o*(0.872000089805)*x_ref[2]**(o-1)+(-0.608415132584)
-        ref[3,0,0,0]=o*(-0.858779999521)*x_ref[0]**(o-1)+(-0.934307938564)
-        ref[3,0,0,1]=o*(0.998531969194)*x_ref[1]**(o-1)+(-0.10694369616)
-        ref[3,0,0,2]=o*(0.565515051636)*x_ref[2]**(o-1)+(-0.340328286843)
-        ref[3,0,1,0]=o*(-0.734447160975)*x_ref[0]**(o-1)+(0.592969337009)
-        ref[3,0,1,1]=o*(0.769648460523)*x_ref[1]**(o-1)+(0.939994123398)
-        ref[3,0,1,2]=o*(-0.14168879251)*x_ref[2]**(o-1)+(-0.151602759825)
-        ref[3,1,0,0]=o*(-0.204447368694)*x_ref[0]**(o-1)+(-0.149512701586)
-        ref[3,1,0,1]=o*(0.496643987821)*x_ref[1]**(o-1)+(0.137154021271)
-        ref[3,1,0,2]=o*(-0.207451973465)*x_ref[2]**(o-1)+(0.976289933313)
-        ref[3,1,1,0]=o*(-0.498939396392)*x_ref[0]**(o-1)+(-0.388761371521)
-        ref[3,1,1,1]=o*(0.918876234523)*x_ref[1]**(o-1)+(0.326334103437)
-        ref[3,1,1,2]=o*(0.135801853065)*x_ref[2]**(o-1)+(-0.513268577694)
-        ref[4,0,0,0]=o*(0.383369953978)*x_ref[0]**(o-1)+(0.262190952188)
-        ref[4,0,0,1]=o*(0.226913840907)*x_ref[1]**(o-1)+(0.625767074123)
-        ref[4,0,0,2]=o*(0.0736409418752)*x_ref[2]**(o-1)+(-0.681643359069)
-        ref[4,0,1,0]=o*(-0.00395633017219)*x_ref[0]**(o-1)+(0.103598757494)
-        ref[4,0,1,1]=o*(0.245388867438)*x_ref[1]**(o-1)+(0.0199139065324)
-        ref[4,0,1,2]=o*(-0.85935209669)*x_ref[2]**(o-1)+(0.780770429677)
-        ref[4,1,0,0]=o*(0.93284113054)*x_ref[0]**(o-1)+(0.192867707515)
-        ref[4,1,0,1]=o*(0.354258046046)*x_ref[1]**(o-1)+(0.0244899514488)
-        ref[4,1,0,2]=o*(-0.00723308587137)*x_ref[2]**(o-1)+(0.724287748378)
-        ref[4,1,1,0]=o*(-0.701870704251)*x_ref[0]**(o-1)+(0.29146856048)
-        ref[4,1,1,1]=o*(-0.677358067691)*x_ref[1]**(o-1)+(-0.055827889309)
-        ref[4,1,1,2]=o*(0.96248585097)*x_ref[2]**(o-1)+(0.100526700803)
-        ref[5,0,0,0]=o*(-0.582058132348)*x_ref[0]**(o-1)+(0.5354038569)
-        ref[5,0,0,1]=o*(-0.608415656952)*x_ref[1]**(o-1)+(0.700352801694)
-        ref[5,0,0,2]=o*(-0.705438310252)*x_ref[2]**(o-1)+(0.969824711925)
-        ref[5,0,1,0]=o*(-0.573326444971)*x_ref[0]**(o-1)+(0.00490482707944)
-        ref[5,0,1,1]=o*(0.300312254171)*x_ref[1]**(o-1)+(-0.620154697788)
-        ref[5,0,1,2]=o*(-0.0703788860867)*x_ref[2]**(o-1)+(-0.608567609941)
-        ref[5,1,0,0]=o*(0.346782282755)*x_ref[0]**(o-1)+(-0.022146949553)
-        ref[5,1,0,1]=o*(0.548359292626)*x_ref[1]**(o-1)+(0.314315074761)
-        ref[5,1,0,2]=o*(0.164808336191)*x_ref[2]**(o-1)+(-0.983018613943)
-        ref[5,1,1,0]=o*(-0.357126808896)*x_ref[0]**(o-1)+(0.547191129837)
-        ref[5,1,1,1]=o*(-0.0128153418859)*x_ref[1]**(o-1)+(-0.199507147279)
-        ref[5,1,1,2]=o*(-0.637546467191)*x_ref[2]**(o-1)+(0.65056997574)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.694260485776)*x[0]+(1.46246375886)*x[1]
-        ref[0]=(0.694260485776)
-        ref[1]=(1.46246375886)
-      else:
-        arg=(-1.10912081576)*x[0]+(1.19790363484)*x[1]+(0.555862453192)*x[2]
-        ref[0]=(-1.10912081576)
-        ref[1]=(1.19790363484)
-        ref[2]=(0.555862453192)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.0963683715208)*x[0]+(-0.985421300426)*x[1]
-        arg[1]=(0.50107481561)*x[0]+(0.296191075154)*x[1]
-        ref[0,0]=(-0.0963683715208)
-        ref[0,1]=(-0.985421300426)
-        ref[1,0]=(0.50107481561)
-        ref[1,1]=(0.296191075154)
-      else:
-        arg[0]=(0.790729361248)*x[0]+(0.3673431791)*x[1]+(0.031915702612)*x[2]
-        arg[1]=(-0.218629391175)*x[0]+(-0.0619831001578)*x[1]+(-1.46460054046)*x[2]
-        ref[0,0]=(0.790729361248)
-        ref[0,1]=(0.3673431791)
-        ref[0,2]=(0.031915702612)
-        ref[1,0]=(-0.218629391175)
-        ref[1,1]=(-0.0619831001578)
-        ref[1,2]=(-1.46460054046)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.102266041928)*x[0]+(0.962985129019)*x[1]
-        arg[0,1]=(1.22474578409)*x[0]+(-0.211640772922)*x[1]
-        arg[0,2]=(-0.51306749275)*x[0]+(0.652502950912)*x[1]
-        arg[0,3]=(1.89516926008)*x[0]+(0.317996805009)*x[1]
-        arg[0,4]=(0.562531430083)*x[0]+(-0.194650166716)*x[1]
-        arg[1,0]=(0.344353002434)*x[0]+(-0.830671914713)*x[1]
-        arg[1,1]=(0.984363231775)*x[0]+(-0.0773767796506)*x[1]
-        arg[1,2]=(-0.893978692143)*x[0]+(1.43362006873)*x[1]
-        arg[1,3]=(0.603459290036)*x[0]+(-0.527471281229)*x[1]
-        arg[1,4]=(-0.768879816113)*x[0]+(0.670739267079)*x[1]
-        arg[2,0]=(0.466692398942)*x[0]+(-0.315362658981)*x[1]
-        arg[2,1]=(1.30065290708)*x[0]+(-0.202369755569)*x[1]
-        arg[2,2]=(-0.114571246331)*x[0]+(1.30250121342)*x[1]
-        arg[2,3]=(-0.243608494456)*x[0]+(-0.103398411275)*x[1]
-        arg[2,4]=(-0.262568543724)*x[0]+(-0.23979204654)*x[1]
-        arg[3,0]=(0.0334727960327)*x[0]+(-0.24547366383)*x[1]
-        arg[3,1]=(0.829837477348)*x[0]+(-0.416646135702)*x[1]
-        arg[3,2]=(1.43081322579)*x[0]+(0.574724874607)*x[1]
-        arg[3,3]=(1.16303985686)*x[0]+(-0.915348714324)*x[1]
-        arg[3,4]=(0.773764690591)*x[0]+(0.28049189996)*x[1]
-        ref[0,0,0]=(0.102266041928)
-        ref[0,0,1]=(0.962985129019)
-        ref[0,1,0]=(1.22474578409)
-        ref[0,1,1]=(-0.211640772922)
-        ref[0,2,0]=(-0.51306749275)
-        ref[0,2,1]=(0.652502950912)
-        ref[0,3,0]=(1.89516926008)
-        ref[0,3,1]=(0.317996805009)
-        ref[0,4,0]=(0.562531430083)
-        ref[0,4,1]=(-0.194650166716)
-        ref[1,0,0]=(0.344353002434)
-        ref[1,0,1]=(-0.830671914713)
-        ref[1,1,0]=(0.984363231775)
-        ref[1,1,1]=(-0.0773767796506)
-        ref[1,2,0]=(-0.893978692143)
-        ref[1,2,1]=(1.43362006873)
-        ref[1,3,0]=(0.603459290036)
-        ref[1,3,1]=(-0.527471281229)
-        ref[1,4,0]=(-0.768879816113)
-        ref[1,4,1]=(0.670739267079)
-        ref[2,0,0]=(0.466692398942)
-        ref[2,0,1]=(-0.315362658981)
-        ref[2,1,0]=(1.30065290708)
-        ref[2,1,1]=(-0.202369755569)
-        ref[2,2,0]=(-0.114571246331)
-        ref[2,2,1]=(1.30250121342)
-        ref[2,3,0]=(-0.243608494456)
-        ref[2,3,1]=(-0.103398411275)
-        ref[2,4,0]=(-0.262568543724)
-        ref[2,4,1]=(-0.23979204654)
-        ref[3,0,0]=(0.0334727960327)
-        ref[3,0,1]=(-0.24547366383)
-        ref[3,1,0]=(0.829837477348)
-        ref[3,1,1]=(-0.416646135702)
-        ref[3,2,0]=(1.43081322579)
-        ref[3,2,1]=(0.574724874607)
-        ref[3,3,0]=(1.16303985686)
-        ref[3,3,1]=(-0.915348714324)
-        ref[3,4,0]=(0.773764690591)
-        ref[3,4,1]=(0.28049189996)
-      else:
-        arg[0,0]=(-0.998409457516)*x[0]+(0.374200474533)*x[1]+(-0.397603453862)*x[2]
-        arg[0,1]=(-1.48600938216)*x[0]+(1.46358462866)*x[1]+(-0.393381462291)*x[2]
-        arg[0,2]=(1.08201727329)*x[0]+(0.065185376372)*x[1]+(-1.32483264357)*x[2]
-        arg[0,3]=(-0.518441162)*x[0]+(0.364373161676)*x[1]+(-1.25875574919)*x[2]
-        arg[0,4]=(-0.836980279478)*x[0]+(1.21655914685)*x[1]+(0.1586084291)*x[2]
-        arg[1,0]=(0.760774732939)*x[0]+(0.515414129191)*x[1]+(-1.50192024303)*x[2]
-        arg[1,1]=(-0.653360330499)*x[0]+(1.71417096347)*x[1]+(-0.169129173291)*x[2]
-        arg[1,2]=(1.07221333767)*x[0]+(-1.07638348405)*x[1]+(1.13393461135)*x[2]
-        arg[1,3]=(0.847567825055)*x[0]+(-0.0298335468796)*x[1]+(0.45122717832)*x[2]
-        arg[1,4]=(-0.108027217492)*x[0]+(-1.12654142913)*x[1]+(-0.781718943065)*x[2]
-        arg[2,0]=(0.408863322164)*x[0]+(0.100914804776)*x[1]+(-0.471567638444)*x[2]
-        arg[2,1]=(-1.42194256762)*x[0]+(-0.348217894465)*x[1]+(-0.830561377367)*x[2]
-        arg[2,2]=(1.36876795155)*x[0]+(0.125252389466)*x[1]+(0.00641454191902)*x[2]
-        arg[2,3]=(0.135243193372)*x[0]+(-1.04394510102)*x[1]+(0.0223029076973)*x[2]
-        arg[2,4]=(-0.969785158394)*x[0]+(-0.48178611106)*x[1]+(-0.0556576599006)*x[2]
-        arg[3,0]=(1.39484073703)*x[0]+(-1.0132109886)*x[1]+(0.0205156989927)*x[2]
-        arg[3,1]=(-0.92783313898)*x[0]+(-1.27904129731)*x[1]+(-0.817768402689)*x[2]
-        arg[3,2]=(1.21718392423)*x[0]+(-0.984091647405)*x[1]+(0.458009888947)*x[2]
-        arg[3,3]=(-0.812990754761)*x[0]+(-0.104941245044)*x[1]+(-0.996531826869)*x[2]
-        arg[3,4]=(-0.28581988131)*x[0]+(-1.24321114539)*x[1]+(0.408464222517)*x[2]
-        ref[0,0,0]=(-0.998409457516)
-        ref[0,0,1]=(0.374200474533)
-        ref[0,0,2]=(-0.397603453862)
-        ref[0,1,0]=(-1.48600938216)
-        ref[0,1,1]=(1.46358462866)
-        ref[0,1,2]=(-0.393381462291)
-        ref[0,2,0]=(1.08201727329)
-        ref[0,2,1]=(0.065185376372)
-        ref[0,2,2]=(-1.32483264357)
-        ref[0,3,0]=(-0.518441162)
-        ref[0,3,1]=(0.364373161676)
-        ref[0,3,2]=(-1.25875574919)
-        ref[0,4,0]=(-0.836980279478)
-        ref[0,4,1]=(1.21655914685)
-        ref[0,4,2]=(0.1586084291)
-        ref[1,0,0]=(0.760774732939)
-        ref[1,0,1]=(0.515414129191)
-        ref[1,0,2]=(-1.50192024303)
-        ref[1,1,0]=(-0.653360330499)
-        ref[1,1,1]=(1.71417096347)
-        ref[1,1,2]=(-0.169129173291)
-        ref[1,2,0]=(1.07221333767)
-        ref[1,2,1]=(-1.07638348405)
-        ref[1,2,2]=(1.13393461135)
-        ref[1,3,0]=(0.847567825055)
-        ref[1,3,1]=(-0.0298335468796)
-        ref[1,3,2]=(0.45122717832)
-        ref[1,4,0]=(-0.108027217492)
-        ref[1,4,1]=(-1.12654142913)
-        ref[1,4,2]=(-0.781718943065)
-        ref[2,0,0]=(0.408863322164)
-        ref[2,0,1]=(0.100914804776)
-        ref[2,0,2]=(-0.471567638444)
-        ref[2,1,0]=(-1.42194256762)
-        ref[2,1,1]=(-0.348217894465)
-        ref[2,1,2]=(-0.830561377367)
-        ref[2,2,0]=(1.36876795155)
-        ref[2,2,1]=(0.125252389466)
-        ref[2,2,2]=(0.00641454191902)
-        ref[2,3,0]=(0.135243193372)
-        ref[2,3,1]=(-1.04394510102)
-        ref[2,3,2]=(0.0223029076973)
-        ref[2,4,0]=(-0.969785158394)
-        ref[2,4,1]=(-0.48178611106)
-        ref[2,4,2]=(-0.0556576599006)
-        ref[3,0,0]=(1.39484073703)
-        ref[3,0,1]=(-1.0132109886)
-        ref[3,0,2]=(0.0205156989927)
-        ref[3,1,0]=(-0.92783313898)
-        ref[3,1,1]=(-1.27904129731)
-        ref[3,1,2]=(-0.817768402689)
-        ref[3,2,0]=(1.21718392423)
-        ref[3,2,1]=(-0.984091647405)
-        ref[3,2,2]=(0.458009888947)
-        ref[3,3,0]=(-0.812990754761)
-        ref[3,3,1]=(-0.104941245044)
-        ref[3,3,2]=(-0.996531826869)
-        ref[3,4,0]=(-0.28581988131)
-        ref[3,4,1]=(-1.24321114539)
-        ref[3,4,2]=(0.408464222517)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedSolution(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedSolution(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.39712204981)*x[0]+(-1.36315938849)*x[1]
-        arg[0,0,1]=(0.654450268666)*x[0]+(-0.198258834351)*x[1]
-        arg[0,1,0]=(0.21357757124)*x[0]+(0.193878132191)*x[1]
-        arg[0,1,1]=(0.0762258436603)*x[0]+(-0.33284111684)*x[1]
-        arg[1,0,0]=(-0.264232939297)*x[0]+(-0.726336076701)*x[1]
-        arg[1,0,1]=(-0.179928817534)*x[0]+(-0.723247805844)*x[1]
-        arg[1,1,0]=(0.923289681593)*x[0]+(0.986763135255)*x[1]
-        arg[1,1,1]=(0.065387254507)*x[0]+(-0.710965008545)*x[1]
-        arg[2,0,0]=(0.759853961917)*x[0]+(0.24486573839)*x[1]
-        arg[2,0,1]=(-0.318336679378)*x[0]+(0.39328274922)*x[1]
-        arg[2,1,0]=(-1.562818948)*x[0]+(-0.891340974738)*x[1]
-        arg[2,1,1]=(0.0508006116584)*x[0]+(1.17654134987)*x[1]
-        arg[3,0,0]=(-0.155883472458)*x[0]+(0.248809866836)*x[1]
-        arg[3,0,1]=(0.287794710222)*x[0]+(-1.72525392296)*x[1]
-        arg[3,1,0]=(0.00665202042795)*x[0]+(-0.0996395796968)*x[1]
-        arg[3,1,1]=(-0.19809021298)*x[0]+(0.487549616652)*x[1]
-        arg[4,0,0]=(0.764163773078)*x[0]+(-0.898694486894)*x[1]
-        arg[4,0,1]=(-0.213042355119)*x[0]+(0.708925705544)*x[1]
-        arg[4,1,0]=(1.55505564031)*x[0]+(-0.545746649289)*x[1]
-        arg[4,1,1]=(-1.31623592165)*x[0]+(0.948772953354)*x[1]
-        arg[5,0,0]=(0.221103671977)*x[0]+(0.866067107464)*x[1]
-        arg[5,0,1]=(-0.0979530612779)*x[0]+(-0.371623102578)*x[1]
-        arg[5,1,0]=(-0.348963169972)*x[0]+(-0.692055450872)*x[1]
-        arg[5,1,1]=(-0.584053243695)*x[0]+(-0.487768032842)*x[1]
-        ref[0,0,0,0]=(0.39712204981)
-        ref[0,0,0,1]=(-1.36315938849)
-        ref[0,0,1,0]=(0.654450268666)
-        ref[0,0,1,1]=(-0.198258834351)
-        ref[0,1,0,0]=(0.21357757124)
-        ref[0,1,0,1]=(0.193878132191)
-        ref[0,1,1,0]=(0.0762258436603)
-        ref[0,1,1,1]=(-0.33284111684)
-        ref[1,0,0,0]=(-0.264232939297)
-        ref[1,0,0,1]=(-0.726336076701)
-        ref[1,0,1,0]=(-0.179928817534)
-        ref[1,0,1,1]=(-0.723247805844)
-        ref[1,1,0,0]=(0.923289681593)
-        ref[1,1,0,1]=(0.986763135255)
-        ref[1,1,1,0]=(0.065387254507)
-        ref[1,1,1,1]=(-0.710965008545)
-        ref[2,0,0,0]=(0.759853961917)
-        ref[2,0,0,1]=(0.24486573839)
-        ref[2,0,1,0]=(-0.318336679378)
-        ref[2,0,1,1]=(0.39328274922)
-        ref[2,1,0,0]=(-1.562818948)
-        ref[2,1,0,1]=(-0.891340974738)
-        ref[2,1,1,0]=(0.0508006116584)
-        ref[2,1,1,1]=(1.17654134987)
-        ref[3,0,0,0]=(-0.155883472458)
-        ref[3,0,0,1]=(0.248809866836)
-        ref[3,0,1,0]=(0.287794710222)
-        ref[3,0,1,1]=(-1.72525392296)
-        ref[3,1,0,0]=(0.00665202042795)
-        ref[3,1,0,1]=(-0.0996395796968)
-        ref[3,1,1,0]=(-0.19809021298)
-        ref[3,1,1,1]=(0.487549616652)
-        ref[4,0,0,0]=(0.764163773078)
-        ref[4,0,0,1]=(-0.898694486894)
-        ref[4,0,1,0]=(-0.213042355119)
-        ref[4,0,1,1]=(0.708925705544)
-        ref[4,1,0,0]=(1.55505564031)
-        ref[4,1,0,1]=(-0.545746649289)
-        ref[4,1,1,0]=(-1.31623592165)
-        ref[4,1,1,1]=(0.948772953354)
-        ref[5,0,0,0]=(0.221103671977)
-        ref[5,0,0,1]=(0.866067107464)
-        ref[5,0,1,0]=(-0.0979530612779)
-        ref[5,0,1,1]=(-0.371623102578)
-        ref[5,1,0,0]=(-0.348963169972)
-        ref[5,1,0,1]=(-0.692055450872)
-        ref[5,1,1,0]=(-0.584053243695)
-        ref[5,1,1,1]=(-0.487768032842)
-      else:
-        arg[0,0,0]=(-1.45023987007)*x[0]+(0.138479134523)*x[1]+(1.46404607112)*x[2]
-        arg[0,0,1]=(-0.647908832568)*x[0]+(-0.503758830859)*x[1]+(1.23196203665)*x[2]
-        arg[0,1,0]=(-0.0108286161243)*x[0]+(0.565615928686)*x[1]+(-0.357789821636)*x[2]
-        arg[0,1,1]=(0.648224572901)*x[0]+(0.775857442933)*x[1]+(0.960991462312)*x[2]
-        arg[1,0,0]=(0.340590670624)*x[0]+(0.0357759349963)*x[1]+(0.358139256621)*x[2]
-        arg[1,0,1]=(0.569789735109)*x[0]+(1.40678949618)*x[1]+(-0.965577726422)*x[2]
-        arg[1,1,0]=(-0.758717082212)*x[0]+(0.612968081377)*x[1]+(-0.417988159948)*x[2]
-        arg[1,1,1]=(0.969867032567)*x[0]+(-0.0700234825891)*x[1]+(1.53879850558)*x[2]
-        arg[2,0,0]=(-1.02952648125)*x[0]+(0.108642437375)*x[1]+(0.251073184196)*x[2]
-        arg[2,0,1]=(0.794766888909)*x[0]+(1.50591346365)*x[1]+(-0.36870578891)*x[2]
-        arg[2,1,0]=(-0.534487055503)*x[0]+(-1.09061679233)*x[1]+(0.799342633685)*x[2]
-        arg[2,1,1]=(0.0435889213805)*x[0]+(-0.209888628166)*x[1]+(1.34633215915)*x[2]
-        arg[3,0,0]=(-0.0344682106376)*x[0]+(-0.92386569455)*x[1]+(-0.551250384619)*x[2]
-        arg[3,0,1]=(-0.168599962689)*x[0]+(0.204634495314)*x[1]+(-0.65426520271)*x[2]
-        arg[3,1,0]=(-1.61759210628)*x[0]+(-0.5922211067)*x[1]+(-0.139092780207)*x[2]
-        arg[3,1,1]=(-0.13862300062)*x[0]+(-1.45951050222)*x[1]+(0.300904423579)*x[2]
-        arg[4,0,0]=(0.629590770742)*x[0]+(-0.217150209985)*x[1]+(-0.140384227583)*x[2]
-        arg[4,0,1]=(-0.0461635416119)*x[0]+(0.525692990183)*x[1]+(-1.89728167146)*x[2]
-        arg[4,1,0]=(-0.130297059668)*x[0]+(-0.138816250007)*x[1]+(1.26805054232)*x[2]
-        arg[4,1,1]=(0.742488751566)*x[0]+(0.659272799907)*x[1]+(-0.370877917078)*x[2]
-        arg[5,0,0]=(-0.521350561164)*x[0]+(-0.213669151076)*x[1]+(0.00949381597317)*x[2]
-        arg[5,0,1]=(-0.951547526648)*x[0]+(-0.388340895795)*x[1]+(0.741997603334)*x[2]
-        arg[5,1,0]=(-0.332922940005)*x[0]+(1.74852940259)*x[1]+(-0.484189519128)*x[2]
-        arg[5,1,1]=(0.418660109098)*x[0]+(-0.690728767024)*x[1]+(-0.675947375912)*x[2]
-        ref[0,0,0,0]=(-1.45023987007)
-        ref[0,0,0,1]=(0.138479134523)
-        ref[0,0,0,2]=(1.46404607112)
-        ref[0,0,1,0]=(-0.647908832568)
-        ref[0,0,1,1]=(-0.503758830859)
-        ref[0,0,1,2]=(1.23196203665)
-        ref[0,1,0,0]=(-0.0108286161243)
-        ref[0,1,0,1]=(0.565615928686)
-        ref[0,1,0,2]=(-0.357789821636)
-        ref[0,1,1,0]=(0.648224572901)
-        ref[0,1,1,1]=(0.775857442933)
-        ref[0,1,1,2]=(0.960991462312)
-        ref[1,0,0,0]=(0.340590670624)
-        ref[1,0,0,1]=(0.0357759349963)
-        ref[1,0,0,2]=(0.358139256621)
-        ref[1,0,1,0]=(0.569789735109)
-        ref[1,0,1,1]=(1.40678949618)
-        ref[1,0,1,2]=(-0.965577726422)
-        ref[1,1,0,0]=(-0.758717082212)
-        ref[1,1,0,1]=(0.612968081377)
-        ref[1,1,0,2]=(-0.417988159948)
-        ref[1,1,1,0]=(0.969867032567)
-        ref[1,1,1,1]=(-0.0700234825891)
-        ref[1,1,1,2]=(1.53879850558)
-        ref[2,0,0,0]=(-1.02952648125)
-        ref[2,0,0,1]=(0.108642437375)
-        ref[2,0,0,2]=(0.251073184196)
-        ref[2,0,1,0]=(0.794766888909)
-        ref[2,0,1,1]=(1.50591346365)
-        ref[2,0,1,2]=(-0.36870578891)
-        ref[2,1,0,0]=(-0.534487055503)
-        ref[2,1,0,1]=(-1.09061679233)
-        ref[2,1,0,2]=(0.799342633685)
-        ref[2,1,1,0]=(0.0435889213805)
-        ref[2,1,1,1]=(-0.209888628166)
-        ref[2,1,1,2]=(1.34633215915)
-        ref[3,0,0,0]=(-0.0344682106376)
-        ref[3,0,0,1]=(-0.92386569455)
-        ref[3,0,0,2]=(-0.551250384619)
-        ref[3,0,1,0]=(-0.168599962689)
-        ref[3,0,1,1]=(0.204634495314)
-        ref[3,0,1,2]=(-0.65426520271)
-        ref[3,1,0,0]=(-1.61759210628)
-        ref[3,1,0,1]=(-0.5922211067)
-        ref[3,1,0,2]=(-0.139092780207)
-        ref[3,1,1,0]=(-0.13862300062)
-        ref[3,1,1,1]=(-1.45951050222)
-        ref[3,1,1,2]=(0.300904423579)
-        ref[4,0,0,0]=(0.629590770742)
-        ref[4,0,0,1]=(-0.217150209985)
-        ref[4,0,0,2]=(-0.140384227583)
-        ref[4,0,1,0]=(-0.0461635416119)
-        ref[4,0,1,1]=(0.525692990183)
-        ref[4,0,1,2]=(-1.89728167146)
-        ref[4,1,0,0]=(-0.130297059668)
-        ref[4,1,0,1]=(-0.138816250007)
-        ref[4,1,0,2]=(1.26805054232)
-        ref[4,1,1,0]=(0.742488751566)
-        ref[4,1,1,1]=(0.659272799907)
-        ref[4,1,1,2]=(-0.370877917078)
-        ref[5,0,0,0]=(-0.521350561164)
-        ref[5,0,0,1]=(-0.213669151076)
-        ref[5,0,0,2]=(0.00949381597317)
-        ref[5,0,1,0]=(-0.951547526648)
-        ref[5,0,1,1]=(-0.388340895795)
-        ref[5,0,1,2]=(0.741997603334)
-        ref[5,1,0,0]=(-0.332922940005)
-        ref[5,1,0,1]=(1.74852940259)
-        ref[5,1,0,2]=(-0.484189519128)
-        ref[5,1,1,0]=(0.418660109098)
-        ref[5,1,1,1]=(-0.690728767024)
-        ref[5,1,1,2]=(-0.675947375912)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
-      """
-      tests gradient for rank 0 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(),w)
-      ref=Data(0,()+(dim,),w_ref)
-      if dim==2:
-        arg=(0.694260485776)*x[0]+(1.46246375886)*x[1]
-        ref[0]=(0.694260485776)
-        ref[1]=(1.46246375886)
-      else:
-        arg=(-1.10912081576)*x[0]+(1.19790363484)*x[1]+(0.555862453192)*x[2]
-        ref[0]=(-1.10912081576)
-        ref[1]=(1.19790363484)
-        ref[2]=(0.555862453192)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),()+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
-      """
-      tests gradient for rank 1 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(2,),w)
-      ref=Data(0,(2,)+(dim,),w_ref)
-      if dim==2:
-        arg[0]=(-0.0963683715208)*x[0]+(-0.985421300426)*x[1]
-        arg[1]=(0.50107481561)*x[0]+(0.296191075154)*x[1]
-        ref[0,0]=(-0.0963683715208)
-        ref[0,1]=(-0.985421300426)
-        ref[1,0]=(0.50107481561)
-        ref[1,1]=(0.296191075154)
-      else:
-        arg[0]=(0.790729361248)*x[0]+(0.3673431791)*x[1]+(0.031915702612)*x[2]
-        arg[1]=(-0.218629391175)*x[0]+(-0.0619831001578)*x[1]+(-1.46460054046)*x[2]
-        ref[0,0]=(0.790729361248)
-        ref[0,1]=(0.3673431791)
-        ref[0,2]=(0.031915702612)
-        ref[1,0]=(-0.218629391175)
-        ref[1,1]=(-0.0619831001578)
-        ref[1,2]=(-1.46460054046)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(2,)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
-      """
-      tests gradient for rank 2 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(4, 5),w)
-      ref=Data(0,(4, 5)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0]=(0.102266041928)*x[0]+(0.962985129019)*x[1]
-        arg[0,1]=(1.22474578409)*x[0]+(-0.211640772922)*x[1]
-        arg[0,2]=(-0.51306749275)*x[0]+(0.652502950912)*x[1]
-        arg[0,3]=(1.89516926008)*x[0]+(0.317996805009)*x[1]
-        arg[0,4]=(0.562531430083)*x[0]+(-0.194650166716)*x[1]
-        arg[1,0]=(0.344353002434)*x[0]+(-0.830671914713)*x[1]
-        arg[1,1]=(0.984363231775)*x[0]+(-0.0773767796506)*x[1]
-        arg[1,2]=(-0.893978692143)*x[0]+(1.43362006873)*x[1]
-        arg[1,3]=(0.603459290036)*x[0]+(-0.527471281229)*x[1]
-        arg[1,4]=(-0.768879816113)*x[0]+(0.670739267079)*x[1]
-        arg[2,0]=(0.466692398942)*x[0]+(-0.315362658981)*x[1]
-        arg[2,1]=(1.30065290708)*x[0]+(-0.202369755569)*x[1]
-        arg[2,2]=(-0.114571246331)*x[0]+(1.30250121342)*x[1]
-        arg[2,3]=(-0.243608494456)*x[0]+(-0.103398411275)*x[1]
-        arg[2,4]=(-0.262568543724)*x[0]+(-0.23979204654)*x[1]
-        arg[3,0]=(0.0334727960327)*x[0]+(-0.24547366383)*x[1]
-        arg[3,1]=(0.829837477348)*x[0]+(-0.416646135702)*x[1]
-        arg[3,2]=(1.43081322579)*x[0]+(0.574724874607)*x[1]
-        arg[3,3]=(1.16303985686)*x[0]+(-0.915348714324)*x[1]
-        arg[3,4]=(0.773764690591)*x[0]+(0.28049189996)*x[1]
-        ref[0,0,0]=(0.102266041928)
-        ref[0,0,1]=(0.962985129019)
-        ref[0,1,0]=(1.22474578409)
-        ref[0,1,1]=(-0.211640772922)
-        ref[0,2,0]=(-0.51306749275)
-        ref[0,2,1]=(0.652502950912)
-        ref[0,3,0]=(1.89516926008)
-        ref[0,3,1]=(0.317996805009)
-        ref[0,4,0]=(0.562531430083)
-        ref[0,4,1]=(-0.194650166716)
-        ref[1,0,0]=(0.344353002434)
-        ref[1,0,1]=(-0.830671914713)
-        ref[1,1,0]=(0.984363231775)
-        ref[1,1,1]=(-0.0773767796506)
-        ref[1,2,0]=(-0.893978692143)
-        ref[1,2,1]=(1.43362006873)
-        ref[1,3,0]=(0.603459290036)
-        ref[1,3,1]=(-0.527471281229)
-        ref[1,4,0]=(-0.768879816113)
-        ref[1,4,1]=(0.670739267079)
-        ref[2,0,0]=(0.466692398942)
-        ref[2,0,1]=(-0.315362658981)
-        ref[2,1,0]=(1.30065290708)
-        ref[2,1,1]=(-0.202369755569)
-        ref[2,2,0]=(-0.114571246331)
-        ref[2,2,1]=(1.30250121342)
-        ref[2,3,0]=(-0.243608494456)
-        ref[2,3,1]=(-0.103398411275)
-        ref[2,4,0]=(-0.262568543724)
-        ref[2,4,1]=(-0.23979204654)
-        ref[3,0,0]=(0.0334727960327)
-        ref[3,0,1]=(-0.24547366383)
-        ref[3,1,0]=(0.829837477348)
-        ref[3,1,1]=(-0.416646135702)
-        ref[3,2,0]=(1.43081322579)
-        ref[3,2,1]=(0.574724874607)
-        ref[3,3,0]=(1.16303985686)
-        ref[3,3,1]=(-0.915348714324)
-        ref[3,4,0]=(0.773764690591)
-        ref[3,4,1]=(0.28049189996)
-      else:
-        arg[0,0]=(-0.998409457516)*x[0]+(0.374200474533)*x[1]+(-0.397603453862)*x[2]
-        arg[0,1]=(-1.48600938216)*x[0]+(1.46358462866)*x[1]+(-0.393381462291)*x[2]
-        arg[0,2]=(1.08201727329)*x[0]+(0.065185376372)*x[1]+(-1.32483264357)*x[2]
-        arg[0,3]=(-0.518441162)*x[0]+(0.364373161676)*x[1]+(-1.25875574919)*x[2]
-        arg[0,4]=(-0.836980279478)*x[0]+(1.21655914685)*x[1]+(0.1586084291)*x[2]
-        arg[1,0]=(0.760774732939)*x[0]+(0.515414129191)*x[1]+(-1.50192024303)*x[2]
-        arg[1,1]=(-0.653360330499)*x[0]+(1.71417096347)*x[1]+(-0.169129173291)*x[2]
-        arg[1,2]=(1.07221333767)*x[0]+(-1.07638348405)*x[1]+(1.13393461135)*x[2]
-        arg[1,3]=(0.847567825055)*x[0]+(-0.0298335468796)*x[1]+(0.45122717832)*x[2]
-        arg[1,4]=(-0.108027217492)*x[0]+(-1.12654142913)*x[1]+(-0.781718943065)*x[2]
-        arg[2,0]=(0.408863322164)*x[0]+(0.100914804776)*x[1]+(-0.471567638444)*x[2]
-        arg[2,1]=(-1.42194256762)*x[0]+(-0.348217894465)*x[1]+(-0.830561377367)*x[2]
-        arg[2,2]=(1.36876795155)*x[0]+(0.125252389466)*x[1]+(0.00641454191902)*x[2]
-        arg[2,3]=(0.135243193372)*x[0]+(-1.04394510102)*x[1]+(0.0223029076973)*x[2]
-        arg[2,4]=(-0.969785158394)*x[0]+(-0.48178611106)*x[1]+(-0.0556576599006)*x[2]
-        arg[3,0]=(1.39484073703)*x[0]+(-1.0132109886)*x[1]+(0.0205156989927)*x[2]
-        arg[3,1]=(-0.92783313898)*x[0]+(-1.27904129731)*x[1]+(-0.817768402689)*x[2]
-        arg[3,2]=(1.21718392423)*x[0]+(-0.984091647405)*x[1]+(0.458009888947)*x[2]
-        arg[3,3]=(-0.812990754761)*x[0]+(-0.104941245044)*x[1]+(-0.996531826869)*x[2]
-        arg[3,4]=(-0.28581988131)*x[0]+(-1.24321114539)*x[1]+(0.408464222517)*x[2]
-        ref[0,0,0]=(-0.998409457516)
-        ref[0,0,1]=(0.374200474533)
-        ref[0,0,2]=(-0.397603453862)
-        ref[0,1,0]=(-1.48600938216)
-        ref[0,1,1]=(1.46358462866)
-        ref[0,1,2]=(-0.393381462291)
-        ref[0,2,0]=(1.08201727329)
-        ref[0,2,1]=(0.065185376372)
-        ref[0,2,2]=(-1.32483264357)
-        ref[0,3,0]=(-0.518441162)
-        ref[0,3,1]=(0.364373161676)
-        ref[0,3,2]=(-1.25875574919)
-        ref[0,4,0]=(-0.836980279478)
-        ref[0,4,1]=(1.21655914685)
-        ref[0,4,2]=(0.1586084291)
-        ref[1,0,0]=(0.760774732939)
-        ref[1,0,1]=(0.515414129191)
-        ref[1,0,2]=(-1.50192024303)
-        ref[1,1,0]=(-0.653360330499)
-        ref[1,1,1]=(1.71417096347)
-        ref[1,1,2]=(-0.169129173291)
-        ref[1,2,0]=(1.07221333767)
-        ref[1,2,1]=(-1.07638348405)
-        ref[1,2,2]=(1.13393461135)
-        ref[1,3,0]=(0.847567825055)
-        ref[1,3,1]=(-0.0298335468796)
-        ref[1,3,2]=(0.45122717832)
-        ref[1,4,0]=(-0.108027217492)
-        ref[1,4,1]=(-1.12654142913)
-        ref[1,4,2]=(-0.781718943065)
-        ref[2,0,0]=(0.408863322164)
-        ref[2,0,1]=(0.100914804776)
-        ref[2,0,2]=(-0.471567638444)
-        ref[2,1,0]=(-1.42194256762)
-        ref[2,1,1]=(-0.348217894465)
-        ref[2,1,2]=(-0.830561377367)
-        ref[2,2,0]=(1.36876795155)
-        ref[2,2,1]=(0.125252389466)
-        ref[2,2,2]=(0.00641454191902)
-        ref[2,3,0]=(0.135243193372)
-        ref[2,3,1]=(-1.04394510102)
-        ref[2,3,2]=(0.0223029076973)
-        ref[2,4,0]=(-0.969785158394)
-        ref[2,4,1]=(-0.48178611106)
-        ref[2,4,2]=(-0.0556576599006)
-        ref[3,0,0]=(1.39484073703)
-        ref[3,0,1]=(-1.0132109886)
-        ref[3,0,2]=(0.0205156989927)
-        ref[3,1,0]=(-0.92783313898)
-        ref[3,1,1]=(-1.27904129731)
-        ref[3,1,2]=(-0.817768402689)
-        ref[3,2,0]=(1.21718392423)
-        ref[3,2,1]=(-0.984091647405)
-        ref[3,2,2]=(0.458009888947)
-        ref[3,3,0]=(-0.812990754761)
-        ref[3,3,1]=(-0.104941245044)
-        ref[3,3,2]=(-0.996531826869)
-        ref[3,4,0]=(-0.28581988131)
-        ref[3,4,1]=(-1.24321114539)
-        ref[3,4,2]=(0.408464222517)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(4, 5)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-   def test_grad_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
-      """
-      tests gradient for rank 3 Data on the ReducedFunctionOnContactOne
-
-      assumptions: ReducedContinuousFunction(self.domain) exists
-                   self.domain supports gradient on ReducedFunctionOnContactOne
-      """
-      o=1
-      dim=self.domain.getDim()
-      w_ref=ReducedFunctionOnContactOne(self.domain)
-      x_ref=w_ref.getX()
-      w=ReducedContinuousFunction(self.domain)
-      x=w.getX()
-      arg=Data(0,(6, 2, 2),w)
-      ref=Data(0,(6, 2, 2)+(dim,),w_ref)
-      if dim==2:
-        arg[0,0,0]=(0.39712204981)*x[0]+(-1.36315938849)*x[1]
-        arg[0,0,1]=(0.654450268666)*x[0]+(-0.198258834351)*x[1]
-        arg[0,1,0]=(0.21357757124)*x[0]+(0.193878132191)*x[1]
-        arg[0,1,1]=(0.0762258436603)*x[0]+(-0.33284111684)*x[1]
-        arg[1,0,0]=(-0.264232939297)*x[0]+(-0.726336076701)*x[1]
-        arg[1,0,1]=(-0.179928817534)*x[0]+(-0.723247805844)*x[1]
-        arg[1,1,0]=(0.923289681593)*x[0]+(0.986763135255)*x[1]
-        arg[1,1,1]=(0.065387254507)*x[0]+(-0.710965008545)*x[1]
-        arg[2,0,0]=(0.759853961917)*x[0]+(0.24486573839)*x[1]
-        arg[2,0,1]=(-0.318336679378)*x[0]+(0.39328274922)*x[1]
-        arg[2,1,0]=(-1.562818948)*x[0]+(-0.891340974738)*x[1]
-        arg[2,1,1]=(0.0508006116584)*x[0]+(1.17654134987)*x[1]
-        arg[3,0,0]=(-0.155883472458)*x[0]+(0.248809866836)*x[1]
-        arg[3,0,1]=(0.287794710222)*x[0]+(-1.72525392296)*x[1]
-        arg[3,1,0]=(0.00665202042795)*x[0]+(-0.0996395796968)*x[1]
-        arg[3,1,1]=(-0.19809021298)*x[0]+(0.487549616652)*x[1]
-        arg[4,0,0]=(0.764163773078)*x[0]+(-0.898694486894)*x[1]
-        arg[4,0,1]=(-0.213042355119)*x[0]+(0.708925705544)*x[1]
-        arg[4,1,0]=(1.55505564031)*x[0]+(-0.545746649289)*x[1]
-        arg[4,1,1]=(-1.31623592165)*x[0]+(0.948772953354)*x[1]
-        arg[5,0,0]=(0.221103671977)*x[0]+(0.866067107464)*x[1]
-        arg[5,0,1]=(-0.0979530612779)*x[0]+(-0.371623102578)*x[1]
-        arg[5,1,0]=(-0.348963169972)*x[0]+(-0.692055450872)*x[1]
-        arg[5,1,1]=(-0.584053243695)*x[0]+(-0.487768032842)*x[1]
-        ref[0,0,0,0]=(0.39712204981)
-        ref[0,0,0,1]=(-1.36315938849)
-        ref[0,0,1,0]=(0.654450268666)
-        ref[0,0,1,1]=(-0.198258834351)
-        ref[0,1,0,0]=(0.21357757124)
-        ref[0,1,0,1]=(0.193878132191)
-        ref[0,1,1,0]=(0.0762258436603)
-        ref[0,1,1,1]=(-0.33284111684)
-        ref[1,0,0,0]=(-0.264232939297)
-        ref[1,0,0,1]=(-0.726336076701)
-        ref[1,0,1,0]=(-0.179928817534)
-        ref[1,0,1,1]=(-0.723247805844)
-        ref[1,1,0,0]=(0.923289681593)
-        ref[1,1,0,1]=(0.986763135255)
-        ref[1,1,1,0]=(0.065387254507)
-        ref[1,1,1,1]=(-0.710965008545)
-        ref[2,0,0,0]=(0.759853961917)
-        ref[2,0,0,1]=(0.24486573839)
-        ref[2,0,1,0]=(-0.318336679378)
-        ref[2,0,1,1]=(0.39328274922)
-        ref[2,1,0,0]=(-1.562818948)
-        ref[2,1,0,1]=(-0.891340974738)
-        ref[2,1,1,0]=(0.0508006116584)
-        ref[2,1,1,1]=(1.17654134987)
-        ref[3,0,0,0]=(-0.155883472458)
-        ref[3,0,0,1]=(0.248809866836)
-        ref[3,0,1,0]=(0.287794710222)
-        ref[3,0,1,1]=(-1.72525392296)
-        ref[3,1,0,0]=(0.00665202042795)
-        ref[3,1,0,1]=(-0.0996395796968)
-        ref[3,1,1,0]=(-0.19809021298)
-        ref[3,1,1,1]=(0.487549616652)
-        ref[4,0,0,0]=(0.764163773078)
-        ref[4,0,0,1]=(-0.898694486894)
-        ref[4,0,1,0]=(-0.213042355119)
-        ref[4,0,1,1]=(0.708925705544)
-        ref[4,1,0,0]=(1.55505564031)
-        ref[4,1,0,1]=(-0.545746649289)
-        ref[4,1,1,0]=(-1.31623592165)
-        ref[4,1,1,1]=(0.948772953354)
-        ref[5,0,0,0]=(0.221103671977)
-        ref[5,0,0,1]=(0.866067107464)
-        ref[5,0,1,0]=(-0.0979530612779)
-        ref[5,0,1,1]=(-0.371623102578)
-        ref[5,1,0,0]=(-0.348963169972)
-        ref[5,1,0,1]=(-0.692055450872)
-        ref[5,1,1,0]=(-0.584053243695)
-        ref[5,1,1,1]=(-0.487768032842)
-      else:
-        arg[0,0,0]=(-1.45023987007)*x[0]+(0.138479134523)*x[1]+(1.46404607112)*x[2]
-        arg[0,0,1]=(-0.647908832568)*x[0]+(-0.503758830859)*x[1]+(1.23196203665)*x[2]
-        arg[0,1,0]=(-0.0108286161243)*x[0]+(0.565615928686)*x[1]+(-0.357789821636)*x[2]
-        arg[0,1,1]=(0.648224572901)*x[0]+(0.775857442933)*x[1]+(0.960991462312)*x[2]
-        arg[1,0,0]=(0.340590670624)*x[0]+(0.0357759349963)*x[1]+(0.358139256621)*x[2]
-        arg[1,0,1]=(0.569789735109)*x[0]+(1.40678949618)*x[1]+(-0.965577726422)*x[2]
-        arg[1,1,0]=(-0.758717082212)*x[0]+(0.612968081377)*x[1]+(-0.417988159948)*x[2]
-        arg[1,1,1]=(0.969867032567)*x[0]+(-0.0700234825891)*x[1]+(1.53879850558)*x[2]
-        arg[2,0,0]=(-1.02952648125)*x[0]+(0.108642437375)*x[1]+(0.251073184196)*x[2]
-        arg[2,0,1]=(0.794766888909)*x[0]+(1.50591346365)*x[1]+(-0.36870578891)*x[2]
-        arg[2,1,0]=(-0.534487055503)*x[0]+(-1.09061679233)*x[1]+(0.799342633685)*x[2]
-        arg[2,1,1]=(0.0435889213805)*x[0]+(-0.209888628166)*x[1]+(1.34633215915)*x[2]
-        arg[3,0,0]=(-0.0344682106376)*x[0]+(-0.92386569455)*x[1]+(-0.551250384619)*x[2]
-        arg[3,0,1]=(-0.168599962689)*x[0]+(0.204634495314)*x[1]+(-0.65426520271)*x[2]
-        arg[3,1,0]=(-1.61759210628)*x[0]+(-0.5922211067)*x[1]+(-0.139092780207)*x[2]
-        arg[3,1,1]=(-0.13862300062)*x[0]+(-1.45951050222)*x[1]+(0.300904423579)*x[2]
-        arg[4,0,0]=(0.629590770742)*x[0]+(-0.217150209985)*x[1]+(-0.140384227583)*x[2]
-        arg[4,0,1]=(-0.0461635416119)*x[0]+(0.525692990183)*x[1]+(-1.89728167146)*x[2]
-        arg[4,1,0]=(-0.130297059668)*x[0]+(-0.138816250007)*x[1]+(1.26805054232)*x[2]
-        arg[4,1,1]=(0.742488751566)*x[0]+(0.659272799907)*x[1]+(-0.370877917078)*x[2]
-        arg[5,0,0]=(-0.521350561164)*x[0]+(-0.213669151076)*x[1]+(0.00949381597317)*x[2]
-        arg[5,0,1]=(-0.951547526648)*x[0]+(-0.388340895795)*x[1]+(0.741997603334)*x[2]
-        arg[5,1,0]=(-0.332922940005)*x[0]+(1.74852940259)*x[1]+(-0.484189519128)*x[2]
-        arg[5,1,1]=(0.418660109098)*x[0]+(-0.690728767024)*x[1]+(-0.675947375912)*x[2]
-        ref[0,0,0,0]=(-1.45023987007)
-        ref[0,0,0,1]=(0.138479134523)
-        ref[0,0,0,2]=(1.46404607112)
-        ref[0,0,1,0]=(-0.647908832568)
-        ref[0,0,1,1]=(-0.503758830859)
-        ref[0,0,1,2]=(1.23196203665)
-        ref[0,1,0,0]=(-0.0108286161243)
-        ref[0,1,0,1]=(0.565615928686)
-        ref[0,1,0,2]=(-0.357789821636)
-        ref[0,1,1,0]=(0.648224572901)
-        ref[0,1,1,1]=(0.775857442933)
-        ref[0,1,1,2]=(0.960991462312)
-        ref[1,0,0,0]=(0.340590670624)
-        ref[1,0,0,1]=(0.0357759349963)
-        ref[1,0,0,2]=(0.358139256621)
-        ref[1,0,1,0]=(0.569789735109)
-        ref[1,0,1,1]=(1.40678949618)
-        ref[1,0,1,2]=(-0.965577726422)
-        ref[1,1,0,0]=(-0.758717082212)
-        ref[1,1,0,1]=(0.612968081377)
-        ref[1,1,0,2]=(-0.417988159948)
-        ref[1,1,1,0]=(0.969867032567)
-        ref[1,1,1,1]=(-0.0700234825891)
-        ref[1,1,1,2]=(1.53879850558)
-        ref[2,0,0,0]=(-1.02952648125)
-        ref[2,0,0,1]=(0.108642437375)
-        ref[2,0,0,2]=(0.251073184196)
-        ref[2,0,1,0]=(0.794766888909)
-        ref[2,0,1,1]=(1.50591346365)
-        ref[2,0,1,2]=(-0.36870578891)
-        ref[2,1,0,0]=(-0.534487055503)
-        ref[2,1,0,1]=(-1.09061679233)
-        ref[2,1,0,2]=(0.799342633685)
-        ref[2,1,1,0]=(0.0435889213805)
-        ref[2,1,1,1]=(-0.209888628166)
-        ref[2,1,1,2]=(1.34633215915)
-        ref[3,0,0,0]=(-0.0344682106376)
-        ref[3,0,0,1]=(-0.92386569455)
-        ref[3,0,0,2]=(-0.551250384619)
-        ref[3,0,1,0]=(-0.168599962689)
-        ref[3,0,1,1]=(0.204634495314)
-        ref[3,0,1,2]=(-0.65426520271)
-        ref[3,1,0,0]=(-1.61759210628)
-        ref[3,1,0,1]=(-0.5922211067)
-        ref[3,1,0,2]=(-0.139092780207)
-        ref[3,1,1,0]=(-0.13862300062)
-        ref[3,1,1,1]=(-1.45951050222)
-        ref[3,1,1,2]=(0.300904423579)
-        ref[4,0,0,0]=(0.629590770742)
-        ref[4,0,0,1]=(-0.217150209985)
-        ref[4,0,0,2]=(-0.140384227583)
-        ref[4,0,1,0]=(-0.0461635416119)
-        ref[4,0,1,1]=(0.525692990183)
-        ref[4,0,1,2]=(-1.89728167146)
-        ref[4,1,0,0]=(-0.130297059668)
-        ref[4,1,0,1]=(-0.138816250007)
-        ref[4,1,0,2]=(1.26805054232)
-        ref[4,1,1,0]=(0.742488751566)
-        ref[4,1,1,1]=(0.659272799907)
-        ref[4,1,1,2]=(-0.370877917078)
-        ref[5,0,0,0]=(-0.521350561164)
-        ref[5,0,0,1]=(-0.213669151076)
-        ref[5,0,0,2]=(0.00949381597317)
-        ref[5,0,1,0]=(-0.951547526648)
-        ref[5,0,1,1]=(-0.388340895795)
-        ref[5,0,1,2]=(0.741997603334)
-        ref[5,1,0,0]=(-0.332922940005)
-        ref[5,1,0,1]=(1.74852940259)
-        ref[5,1,0,2]=(-0.484189519128)
-        ref[5,1,1,0]=(0.418660109098)
-        ref[5,1,1,1]=(-0.690728767024)
-        ref[5,1,1,2]=(-0.675947375912)
-      res=grad(arg,where=w_ref)
-      self.assertTrue(isinstance(res,Data),"wrong type of result.")
-      self.assertEqual(res.getShape(),(6, 2, 2)+(dim,),"wrong shape of result.")
-      self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
-   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_div_onFunctionOnBoundary_fromData_ContinuousFunction(self):
       """
       tests divergence of Data on the FunctionOnBoundary
diff --git a/escriptcore/test/python/test_util_unary_new.py b/escriptcore/test/python/test_util_unary_new.py
new file mode 100644
index 0000000..19399a2
--- /dev/null
+++ b/escriptcore/test/python/test_util_unary_new.py
@@ -0,0 +1,519 @@
+
+##############################################################################
+#
+# Copyright (c) 2016 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) 2016 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"
+
+"""
+test for util operations for unary operations without tagged data
+
+:remark: use see `test_util`
+:var __author__: name of author
+:var __copyright__: copyrights
+:var __license__: licence agreement
+:var __url__: url entry point on documentation
+:var __version__: version
+:var __date__: date of the version
+"""
+
+__author__="Joel Fenwick, joelfenwick at uq.edu.au"
+
+import esys.escriptcore.utestselect as unittest
+import numpy
+import math
+import cmath
+from esys.escript import *
+from test_util_base import Test_util_base, Test_util_values
+
+haveLapack = hasFeature('lapack')
+
+def getTagStr(f, p=None):
+   if p is None:
+        return "self.makeTagged(self.functionspace, "+f+"(r), "+f+"(r2))"
+   else:
+        f1=f.replace(p,'r')
+        f2=f.replace(p,'r2')
+        return "self.makeTagged(self.functionspace, ("+f1+"), ("+f2+"))"
+
+class Test_util_unary_new(Test_util_values):
+   """
+   test for unary operations. 
+   """
+   def iterateops(self, ops, vals):
+       """
+       """
+       for p in ops:
+          o,c,z=p
+          for v in vals:
+            res=o(v)
+            if isinstance(v,complex):
+               ref=z(v)
+            else:
+               ref=c(v)
+            self.assertTrue(isinstance(res,type(ref)),"wrong type of result for "+str(o))
+            self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result for "+str(o))
+            d=Data(v)
+            res=o(d)
+            self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result for data on "+str(o))
+
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_compare_complex_vs_real_data(self):
+      # Compare results of unary ops provided by util and their python equivalents
+      # Note that in some cases util calls these python versions so it is not a
+      # guarantee that they are correct, we also compare with Data implementation
+      # so we reduce the risk unless there is a fault in the system's underlying c library
+      # Also note that these calls are only testing scalars
+      ops=[(sin,math.sin,cmath.sin), (cos,math.cos,cmath.cos), (tan,math.tan,cmath.tan), (log,math.log,cmath.log), (log10, math.log10, cmath.log10), (Abs, abs, abs),
+(acos,math.acos,cmath.acos), (acosh,math.acosh,cmath.acosh), (asin,math.asin,cmath.asin), (asinh, math.asinh,cmath.asinh),
+(cosh, math.cosh, cmath.cosh), (exp, math.exp, cmath.exp), (sinh, math.sinh, cmath.sinh), (sqrt, math.sqrt, cmath.sqrt)]
+      vals=[1+0j,-1+0j,1j, -1j, math.pi*1j,3+4j]
+      self.iterateops(ops,vals)
+      ops=[(atan,math.atan,cmath.atan)]
+      vals=[1+0j,-1+0j, math.pi*1j,3+4j]
+      self.iterateops(ops,vals)
+      ops=[(atanh,math.atanh,cmath.atanh)]
+      vals=[1j, -1j, math.pi*1j,3+4j]
+      self.iterateops(ops,vals)
+      # test for zero values for those functions which can take it
+      vals=[0j]
+      ops=[(sin,math.sin,cmath.sin), (cos,math.cos,cmath.cos), (tan,math.tan,cmath.tan),
+           (Abs, abs, abs),
+           (acos,math.acos,cmath.acos), (acosh,math.acosh,cmath.acosh),
+           (asin,math.asin,cmath.asin), (asinh, math.asinh,cmath.asinh),
+           (cosh, math.cosh, cmath.cosh), (exp, math.exp, cmath.exp), 
+           (sinh, math.sinh, cmath.sinh), (sqrt, math.sqrt, cmath.sqrt),
+           (atan,math.atan,cmath.atan), (atanh,math.atanh,cmath.atanh)]
+      self.iterateops(ops,vals)      
+
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_abs_combined(self):
+        supportcplx=True
+        opstring="abs(a)"
+        misccheck="isinstance(res,float) or (isinstance(res, numpy.ndarray) and res.dtype.kind=='f') or (isinstance(res, Data) and not res.isComplex())"
+        oraclecheck="numpy.abs(ref)"
+        opname="abs"
+        update1=getTagStr("numpy.abs")    
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1)  
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_acos_combined(self):
+        supportcplx=True
+        opstring="acos(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.arccos(ref)"
+        opname="acos"
+        update1=getTagStr("numpy.arccos")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_acosh_combined(self):
+        supportcplx=True
+        opstring="acosh(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.arccosh(ref)"
+        opname="acosh"
+        update1=getTagStr("numpy.arccosh")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=lambda x: x+2)  
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_antihermitian_combined(self):
+        supportcplx=True
+        opstring="antihermitian(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="(ref-numpy.conjugate(transpose(ref)))/2"
+        opname="antihermitian"
+        update1=getTagStr("(r2-numpy.conjugate(transpose(r2)))/2",p='r2')
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, expect_raise_on_ranks=(0,1,3), expected_exceptions=(ValueError,))         
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_antisymmetric_combined(self):
+        supportcplx=True
+        opstring="antisymmetric(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="(ref-transpose(ref))/2"
+        opname="antisymmetric"
+        update1=getTagStr("(r2-transpose(r2))/2",p='r2')
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, expect_raise_on_ranks=(0,1,3), expected_exceptions=(ValueError,))            
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_asin_combined(self):
+        supportcplx=True
+        opstring="asin(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.arcsin(ref)"
+        opname="asin"
+        update1=getTagStr("numpy.arcsin")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_asinh_combined(self):
+        supportcplx=True
+        opstring="asinh(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.arcsinh(ref)"
+        opname="asinh"
+        update1=getTagStr("numpy.arcsinh")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)   
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_atan_combined(self):
+        supportcplx=True
+        opstring="atan(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.arctan(ref)"
+        opname="atan"
+        update1=getTagStr("numpy.arctan")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)   
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_atanh_combined(self):
+        supportcplx=True
+        opstring="atanh(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.arctanh(ref)"
+        opname="atanh"
+        update1=getTagStr("numpy.arctanh")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1) 
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_clip_combined(self):
+        supportcplx=False
+        opstring="clip(a,minval=-0.5, maxval=0.5)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.clip(ref, -0.5, 0.5)"
+        opname="clip"
+        update1=getTagStr("numpy.clip(r2, -0.5, 0.5)", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)          
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_cos_combined(self):
+        supportcplx=True
+        opstring="cos(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.cos(ref)"
+        opname="cos"
+        update1=getTagStr("numpy.cos")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)  
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_cosh_combined(self):
+        supportcplx=True
+        opstring="cosh(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.cosh(ref)"
+        opname="cosh"
+        update1=getTagStr("numpy.cosh")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)  
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_eigenvalues_combined(self):
+        supportcplx=True
+        opstring="eigenvalues(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.linalg.eigvals(ref) if numpy.ndim(ref)==2 else 0."
+        opname="eigenvalues"
+        update1=getTagStr("numpy.sort(numpy.linalg.eigvals(r2)) if numpy.ndim(r2)==2 else 0.", p='r2')
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1,
+                                                 expect_raise_on_ranks=(0,1,3,4), no_scalars=True, 
+                                                 input_trans=lambda x: symmetric(x) if getRank(x)==2 else x)
+        # We aren't testing the scalar case
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_eigenvalues_and_eigenvectors_combined(self):
+        supportcplx=False
+        opstring="eigenvalues_and_eigenvectors(a)"
+        misccheck="(Lsup(matrix_mult(a,res[1][:,0])-res[0][0]*res[1][:,0])<=0.001*Lsup(res[0])) and Lsup(matrix_mult(a,res[1][:,1])-res[0][1]*res[1][:,1])<=0.001*Lsup(res[0])"
+        oraclecheck=None
+        opname="eigenvalues_and_eigenvectors"
+        update1=None    # note missing update1 step, hoping this won't be a problem
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1,
+                                                 expect_raise_on_ranks=(0,1,3,4), no_scalars=True,
+                                                 input_trans=lambda x: symmetric(x) if getRank(x)==2 else x)
+        # We aren't testing the scalar case        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_exp_combined(self):
+        supportcplx=True
+        opstring="exp(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.exp(ref)"
+        opname="exp"
+        update1=getTagStr("numpy.exp")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_hermetitian_combined(self):
+        supportcplx=True
+        opstring="hermitian(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="(ref+numpy.conjugate(transpose(ref)))/2"
+        opname="hermitian"
+        update1=getTagStr("(r2+numpy.conjugate(transpose(r2)))/2", p='r2')
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+                                            expect_raise_on_ranks=(0,1,3), expected_exceptions=(ValueError,))
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_inverse_combined(self):
+        supportcplx=False
+        opstring="inverse(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.linalg.inv(ref)"
+        opname="inverse"
+        update1=getTagStr("numpy.linalg.inv")
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+                                            minrank=2, maxrank=2, no_scalars=True)
+        # escript's inverse also supports scalars so need to check them separately
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_phase_combined(self):
+        supportcplx=True
+        opstring="phase(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.angle(ref)"
+        opname="phase"
+        update1=getTagStr("numpy.angle")
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+                                            minrank=2, maxrank=2, no_scalars=True)        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_sign_combined(self):
+        supportcplx=False
+        opstring="sign(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.sign(ref)"
+        opname="sign"
+        update1=getTagStr("numpy.sign")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)          
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_sin_combined(self):
+        supportcplx=True
+        opstring="sin(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.sin(ref)"
+        opname="sin"
+        update1=getTagStr("numpy.sin")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)  
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_sinh_combined(self):
+        supportcplx=True
+        opstring="sinh(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.sinh(ref)"
+        opname="sinh"
+        update1=getTagStr("numpy.sinh")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)  
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_sqrt_combined(self):
+        supportcplx=True
+        opstring="sqrt(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.sqrt(ref)"
+        opname="sqrt"
+        update1=getTagStr("numpy.sqrt")  
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1, input_trans=lambda x: numpy.abs(x) if type(x) is numpy.ndarray and x.dtype.kind=='f' else abs(x) if type(x) is Data and not x.isComplex() else x)          
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_symmetric_combined(self):
+        supportcplx=True
+        opstring="symmetric(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="(ref+transpose(ref))/2"
+        opname="symmetric"
+        update1=getTagStr("(r2+transpose(r2))/2", p='r2')
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+                                            expect_raise_on_ranks=(0,1,3), expected_exceptions=(ValueError,))         
+    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_swapaxes_combined(self):
+        supportcplx=True
+        opstring="swap_axes(a,axis0=0, axis1=getRank(a)-1)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.swapaxes(ref, 0,ref.ndim-1)"
+        opname="swap_axes"
+        update1=getTagStr("numpy.swapaxes(r2, 0, r2.ndim-1)", p='r2')
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+                                            minrank=2, maxrank=4,no_scalars=True)                
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tan_combined(self):
+        supportcplx=True
+        opstring="tan(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.tan(ref)"
+        opname="tan"
+        update1=getTagStr("numpy.tan")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1) 
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_tanh_combined(self):
+        supportcplx=True
+        opstring="tanh(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.tanh(ref)"
+        opname="tanh"
+        update1=getTagStr("numpy.tanh") 
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_trace_combined(self):
+        supportcplx=True
+        opstring="trace(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.trace(ref)"
+        opname="trace"
+        update1=getTagStr("numpy.trace(r2) if numpy.ndim(r2)>=2 else None", p='r2')
+        update2=None
+        # We could also check to see if it throws when given a scalar but we don't
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+                                      no_scalars=True, minrank=2,
+                                           expect_raise_on_ranks=(0,1),expected_exceptions=(ValueError,))
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_transpose_combined(self):
+        supportcplx=True
+        opstring="transpose(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.transpose(ref, axes=list(range(len(ref.shape)//2,len(ref.shape)))+list(range(0,len(ref.shape)//2)))"
+        opname="tranpose"
+        update1=getTagStr("numpy.transpose(r2, axes=list(range(len(r2.shape)//2,len(r2.shape)))+list(range(0,len(r2.shape)//2)))", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)   
+        opname="transpose-offset-1"
+        opstring="transpose(a,axis_offset=1)"
+        oraclecheck="numpy.transpose(ref, axes=list(range(1,len(ref.shape)))+list(range(0,1)))"
+        update1=getTagStr("numpy.transpose(r2, axes=list(range(1,len(r2.shape)))+list(range(0,1)))", p='r2')
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1,
+                                      no_scalars=True)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_length_combined(self):
+        supportcplx=True
+        opstring="length(a)"
+        misccheck="isinstance(res,float) or (isinstance(res,Data) and not res.isComplex())"
+        oraclecheck="numpy.linalg.norm(ref)"
+        opname="length"
+        update1=getTagStr("numpy.linalg.norm")
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)         
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_log_combined(self):
+        supportcplx=True
+        opstring="log(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.log(ref)"
+        opname="log"
+        update1=getTagStr("numpy.log")
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1, 
+            input_trans=lambda x: numpy.abs(x)+1 if type(x) is numpy.ndarray and x.dtype.kind=='f' else abs(x)+1 if type(x) is Data and not x.isComplex() else x+1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_log10_combined(self):
+        supportcplx=True
+        opstring="log10(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.log10(ref)"
+        opname="log10"
+        update1=getTagStr("numpy.log10") 
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1,  
+            input_trans=lambda x: numpy.abs(x)+1 if type(x) is numpy.ndarray and x.dtype.kind=='f' else abs(x)+1 if type(x) is Data and not x.isComplex() else x+1)  
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_maxval_combined(self):
+        supportcplx=False
+        opstring="maxval(a)"
+        misccheck="isinstance(res,float) or (isinstance(a,numpy.ndarray) and res.dtype.kind=='f') or (isinstance(a, Data) and not res.isComplex())"
+        oraclecheck="numpy.max(ref)"
+        opname="maxval"
+        update1=getTagStr("numpy.max") 
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1)  
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_minval_combined(self):
+        supportcplx=False
+        opstring="minval(a)"
+        misccheck="isinstance(res,float) or (isinstance(a,numpy.ndarray) and res.dtype.kind=='f') or (isinstance(a, Data) and not res.isComplex())"
+        oraclecheck="numpy.min(ref)"
+        opname="minval"
+        update1=getTagStr("numpy.min")    
+        update2=None
+        self.generate_operation_test_batch_large(supportcplx, opstring, misccheck, oraclecheck, opname, update1) 
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_whereNegative_combined(self):
+        supportcplx=False
+        opstring="whereNegative(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.where(ref<0, numpy.ones(ref.shape), numpy.zeros(ref.shape))"
+        opname="whereNegative"
+        update1=getTagStr("numpy.where(r2<0, numpy.ones(r2.shape), numpy.zeros(r2.shape))", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)     
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_whereNonNegative_combined(self):
+        supportcplx=False
+        opstring="whereNonNegative(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.where(ref>=0, numpy.ones(ref.shape), numpy.zeros(ref.shape))"
+        opname="whereNonNegative"
+        update1=getTagStr("numpy.where(r2>=0, numpy.ones(r2.shape), numpy.zeros(r2.shape))", p='r2')    
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)    
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_whereNonPositive_combined(self):
+        supportcplx=False
+        opstring="whereNonPositive(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.where(ref<=0, numpy.ones(ref.shape), numpy.zeros(ref.shape))"
+        opname="whereNonPositive"
+        update1=getTagStr("numpy.where(r2<=0, numpy.ones(r2.shape), numpy.zeros(r2.shape))", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_whereNonZero_combined(self):
+        supportcplx=True
+        opstring="whereNonZero(a)"
+        misccheck="isinstance(res,float) or (isinstance(res, numpy.ndarray) and res.dtype.kind=='f') or (isinstance(res, Data) and not res.isComplex())"
+        oraclecheck="numpy.where(ref!=0, numpy.ones(ref.shape), numpy.zeros(ref.shape))"
+        opname="whereNonZero"
+        update1=getTagStr("numpy.where(r2!=0, numpy.ones(r2.shape), numpy.zeros(r2.shape))", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)        
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_wherePositive_combined(self):
+        supportcplx=False
+        opstring="wherePositive(a)"
+        misccheck="isinstance(res,type(a))"
+        oraclecheck="numpy.where(ref>0, numpy.ones(ref.shape), numpy.zeros(ref.shape))"
+        opname="wherePositive"
+        update1=getTagStr("numpy.where(r2>0, numpy.ones(r2.shape), numpy.zeros(r2.shape))", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1) 
+   #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+   def test_whereZero_combined(self):
+        supportcplx=True
+        opstring="whereZero(a)"
+        misccheck="isinstance(res,float) or (isinstance(res, numpy.ndarray) and res.dtype.kind=='f') or (isinstance(res, Data) and not res.isComplex())"
+        oraclecheck="numpy.where(ref==0, numpy.ones(ref.shape), numpy.zeros(ref.shape))"
+        opname="whereZero"
+        update1=getTagStr("numpy.where(r2==0, numpy.ones(r2.shape), numpy.zeros(r2.shape))", p='r2')
+        update2=None
+        self.generate_operation_test_batch(supportcplx, opstring, misccheck, oraclecheck, opname, update1)
diff --git a/escriptcore/test/python/test_util_unary_no_tagged_data.py b/escriptcore/test/python/test_util_unary_no_tagged_data.py
index 2840413..1347a4a 100644
--- a/escriptcore/test/python/test_util_unary_no_tagged_data.py
+++ b/escriptcore/test/python/test_util_unary_no_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/escriptcore/test/python/test_util_unary_with_tagged_data.py b/escriptcore/test/python/test_util_unary_with_tagged_data.py
index d81b856..f626757 100644
--- a/escriptcore/test/python/test_util_unary_with_tagged_data.py
+++ b/escriptcore/test/python/test_util_unary_with_tagged_data.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/SConscript b/finley/SConscript
index 8ea77e7..684728c 100644
--- a/finley/SConscript
+++ b/finley/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/benchmarks/finleybench.py b/finley/benchmarks/finleybench.py
index 88ea826..275727d 100644
--- a/finley/benchmarks/finleybench.py
+++ b/finley/benchmarks/finleybench.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/benchmarks/runbenchmark.py b/finley/benchmarks/runbenchmark.py
index 6eefd77..9971d38 100755
--- a/finley/benchmarks/runbenchmark.py
+++ b/finley/benchmarks/runbenchmark.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/py_src/SConscript b/finley/py_src/SConscript
index 92ca9f7..a51b4f4 100644
--- a/finley/py_src/SConscript
+++ b/finley/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/py_src/__init__.py b/finley/py_src/__init__.py
index b1fd560..2e58526 100644
--- a/finley/py_src/__init__.py
+++ b/finley/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,7 +19,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/py_src/factorywrappers.py b/finley/py_src/factorywrappers.py
index 4de0dd9..cdd5e10 100644
--- a/finley/py_src/factorywrappers.py
+++ b/finley/py_src/factorywrappers.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2011-2016 by The University of Queensland
+# Copyright (c) 2011-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2011-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2011-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/py_src/readers.py b/finley/py_src/readers.py
index 91b8610..d7a9a44 100644
--- a/finley/py_src/readers.py
+++ b/finley/py_src/readers.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/src/Assemble.h b/finley/src/Assemble.h
index 9fa70c4..e94e9a9 100644
--- a/finley/src/Assemble.h
+++ b/finley/src/Assemble.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -140,14 +140,17 @@ void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
                            bool useHRZ);
 
 /// averages data
+template<typename Scalar>
 void Assemble_AverageElementData(const ElementFile* elements,
                                  escript::Data& out, const escript::Data& in);
 
 /// copies data between different types of elements
+template<typename Scalar>
 void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
                               const escript::Data& in);
 
 /// copies data between different types of nodal representations
+template<typename Scalar>
 void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
                             const escript::Data& in);
 
@@ -165,14 +168,17 @@ void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
 
 /// Assemblage of Jacobians: calculates the gradient of nodal data at
 /// quadrature points
+template<typename Scalar>
 void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                        escript::Data& gradient, const escript::Data& data);
 
 /// integrates data on quadrature points
+template<typename Scalar>
 void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
-                        const escript::Data& data, double* integrals);
+                        const escript::Data& data, Scalar* integrals);
 
 /// interpolates nodal data in a data array onto elements (=integration points)
+template<typename Scalar>
 void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
                           const escript::Data& data, escript::Data& output);
 
diff --git a/finley/src/Assemble_AverageElementData.cpp b/finley/src/Assemble_AverageElementData.cpp
index 3ea6a0f..7d26805 100644
--- a/finley/src/Assemble_AverageElementData.cpp
+++ b/finley/src/Assemble_AverageElementData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -28,30 +28,32 @@
 
 namespace finley {
 
+template<typename Scalar>
 void Assemble_AverageElementData(const ElementFile* elements,
                                  escript::Data& out, const escript::Data& in)
 {
     if (!elements)
         return;
 
-    const double *wq;
+    const double* wq;
     int numQuad_in, numQuad_out;
     if (util::hasReducedIntegrationOrder(in)) {
-        numQuad_in=elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
-        wq=&elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->QuadWeights[0];
+        numQuad_in = elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
+        wq = &elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->QuadWeights[0];
     } else {
-        numQuad_in=elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
-        wq=&elements->referenceElementSet->referenceElement->Parametrization->QuadWeights[0];
+        numQuad_in = elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
+        wq = &elements->referenceElementSet->referenceElement->Parametrization->QuadWeights[0];
     }
     if (util::hasReducedIntegrationOrder(out)) {
-        numQuad_out=elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
+        numQuad_out = elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
     } else {
-        numQuad_out=elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
+        numQuad_out = elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
     }
 
     // check out and in
-    const dim_t numElements=elements->numElements;
-    const int numComps=out.getDataPointSize();
+    const dim_t numElements = elements->numElements;
+    const int numComps = out.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
 
     if (numComps != in.getDataPointSize()) {
         throw escript::ValueError("Assemble_AverageElementData: number of components of input and output data do not match.");
@@ -61,38 +63,48 @@ void Assemble_AverageElementData(const ElementFile* elements,
         throw escript::ValueError("Assemble_AverageElementData: illegal number of samples of output Data object");
     } else if (!out.actsExpanded()) {
         throw escript::ValueError("Assemble_AverageElementData: expanded Data object is expected for output data.");
+    } else if (in.isComplex() != out.isComplex()) {
+        throw escript::ValueError("Assemble_AverageElementData: complexity of input and output data must match.");
     } else {
+        out.requireWrite();
         if (in.actsExpanded()) {
-            double vol=0.;
-            for (int q=0; q<numQuad_in;++q) vol+=wq[q];
-            const double volinv=1./vol;
-            out.requireWrite();
+            double vol = 0.;
+            for (int q = 0; q < numQuad_in; ++q)
+                vol += wq[q];
+            const double volinv = 1./vol;
 #pragma omp parallel for
-            for (index_t n=0; n<numElements; n++) {
-                const double *in_array = in.getSampleDataRO(n);
-                double *out_array = out.getSampleDataRW(n);
-                for (int i=0; i<numComps; ++i) {
-                    double rtmp=0.;
-                    for (int q=0; q<numQuad_in; ++q)
-                        rtmp+=in_array[INDEX2(i,q,numComps)]*wq[q];
-                    rtmp*=volinv;
-                    for (int q=0; q<numQuad_out; ++q)
-                        out_array[INDEX2(i,q,numComps)]=rtmp;
+            for (index_t n = 0; n < numElements; n++) {
+                const Scalar* in_array = in.getSampleDataRO(n, zero);
+                Scalar* out_array = out.getSampleDataRW(n, zero);
+                for (int i = 0; i < numComps; ++i) {
+                    Scalar rtmp = zero;
+                    for (int q = 0; q < numQuad_in; ++q)
+                        rtmp += in_array[INDEX2(i,q,numComps)] * wq[q];
+                    rtmp *= volinv;
+                    for (int q = 0; q < numQuad_out; ++q)
+                        out_array[INDEX2(i,q,numComps)] = rtmp;
                 }
             }
         } else { // constant data
-            const size_t numComps_size=numComps*sizeof(double);
-            out.requireWrite();
+            const size_t numComps_size = numComps * sizeof(Scalar);
 #pragma omp parallel for
-            for (index_t n=0; n<numElements; n++) {
-                const double *in_array = in.getSampleDataRO(n);
-                double *out_array = out.getSampleDataRW(n);
-                for (int q=0; q<numQuad_out; q++)
+            for (index_t n = 0; n < numElements; n++) {
+                const Scalar* in_array = in.getSampleDataRO(n, zero);
+                Scalar* out_array = out.getSampleDataRW(n, zero);
+                for (int q = 0; q < numQuad_out; q++)
                     memcpy(out_array+q*numComps, in_array, numComps_size);
             }
         }
     }
 }
 
+// instantiate our two supported versions
+template void Assemble_AverageElementData<escript::DataTypes::real_t>(
+                const ElementFile* elements,
+                escript::Data& out, const escript::Data& in);
+template void Assemble_AverageElementData<escript::DataTypes::cplx_t>(
+                const ElementFile* elements,
+                escript::Data& out, const escript::Data& in);
+
 } // namespace finley
 
diff --git a/finley/src/Assemble_CopyElementData.cpp b/finley/src/Assemble_CopyElementData.cpp
index 8193d71..f9fdc05 100644
--- a/finley/src/Assemble_CopyElementData.cpp
+++ b/finley/src/Assemble_CopyElementData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -26,50 +26,81 @@
 
 namespace finley {
 
+template<typename Scalar>
 void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
                               const escript::Data& in)
 {
     if (!elements)
         return;
 
-    int numQuad;
+    int numQuad_out, numQuad_in;
+    if (util::hasReducedIntegrationOrder(out)) {
+        numQuad_out = elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
+    } else {
+        numQuad_out = elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
+    }
     if (util::hasReducedIntegrationOrder(in)) {
-        numQuad=elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
+        numQuad_in = elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
     } else {
-        numQuad=elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
+        numQuad_in = elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
     }
 
-    const dim_t numElements=elements->numElements;
-    const int numComps=out.getDataPointSize();
+    const dim_t numElements = elements->numElements;
+    const int numComps = out.getDataPointSize();
 
     if (numComps != in.getDataPointSize()) {
         throw escript::ValueError("Assemble_CopyElementData: number of components of input and output Data do not match.");
-    } else if (!in.numSamplesEqual(numQuad,numElements)) {
-        throw escript::ValueError("Assemble_CopyElementData: illegal number of samples of input Data object");
-    } else if (!out.numSamplesEqual(numQuad,numElements)) {
-        throw escript::ValueError("Assemble_CopyElementData: illegal number of samples of output Data object");
     } else if (!out.actsExpanded()) {
         throw escript::ValueError("Assemble_CopyElementData: expanded Data object is expected for output data.");
+    } else if (!out.numSamplesEqual(numQuad_out,numElements)) {
+        throw escript::ValueError("Assemble_CopyElementData: illegal number of samples of output Data object");
+    } else if (!in.numSamplesEqual(numQuad_in,numElements)) {
+        throw escript::ValueError("Assemble_CopyElementData: illegal number of samples of input Data object");
+    } else if (in.isComplex() != out.isComplex()) {
+        throw escript::ValueError("Assemble_CopyElementData: complexity of input and output Data must match.");
     } else {
-        if (in.actsExpanded()) {
-            const size_t len_size=numComps*numQuad*sizeof(double);
+        const Scalar zero = static_cast<Scalar>(0);
+        if (numQuad_in == 1) {
+            const size_t len_size = numComps*sizeof(Scalar);
             out.requireWrite();
 #pragma omp parallel for
-            for (index_t n=0; n<numElements; n++) 
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n), len_size);
-        } else {
-            const size_t len_size=numComps*sizeof(double);
+            for (index_t n = 0; n < numElements; n++) {
+                const Scalar* in_array = in.getSampleDataRO(n, zero);
+                Scalar* out_array = out.getSampleDataRW(n, zero);
+                for (int q = 0; q < numQuad_out; q++)
+                    memcpy(out_array+q*numComps, in_array, len_size);
+            }
+        } else if (numQuad_in == numQuad_out) {
             out.requireWrite();
+            if (in.actsExpanded()) {
+                const size_t len_size = numComps*numQuad_in*sizeof(Scalar);
 #pragma omp parallel for
-            for (index_t n=0; n<numElements; n++) {
-                const double *in_array = in.getSampleDataRO(n);
-                double *out_array = out.getSampleDataRW(n);
-                for (int q=0; q<numQuad; q++)
-                    memcpy(out_array+q*numComps, in_array, len_size);
+                for (index_t n = 0; n < numElements; n++) 
+                    memcpy(out.getSampleDataRW(n, zero),
+                            in.getSampleDataRO(n, zero), len_size);
+            } else {
+                const size_t len_size = numComps*sizeof(Scalar);
+#pragma omp parallel for
+                for (index_t n = 0; n < numElements; n++) {
+                    const Scalar* in_array = in.getSampleDataRO(n, zero);
+                    Scalar* out_array = out.getSampleDataRW(n, zero);
+                    for (int q = 0; q < numQuad_in; q++)
+                        memcpy(out_array+q*numComps, in_array, len_size);
+                }
             }
+        } else {
+            throw escript::ValueError("Assemble_CopyElementData: unable to process given number of data points.");
         }
     }
 }
 
+// instantiate our two supported versions
+template void Assemble_CopyElementData<escript::DataTypes::real_t>(
+                const ElementFile* elements, escript::Data& out,
+                const escript::Data& in);
+template void Assemble_CopyElementData<escript::DataTypes::cplx_t>(
+                const ElementFile* elements, escript::Data& out,
+                const escript::Data& in);
+
 } // namespace finley
 
diff --git a/finley/src/Assemble_CopyNodalData.cpp b/finley/src/Assemble_CopyNodalData.cpp
index c44e201..27534d9 100644
--- a/finley/src/Assemble_CopyNodalData.cpp
+++ b/finley/src/Assemble_CopyNodalData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -19,6 +19,10 @@
 
 namespace finley {
 
+using escript::ValueError;
+using escript::NotImplementedError;
+
+template<typename Scalar>
 void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
                             const escript::Data& in)
 {
@@ -32,36 +36,38 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
 
     // check out and in
     if (numComps != in.getDataPointSize()) {
-        throw escript::ValueError("Assemble_CopyNodalData: number of components of input and output Data do not match.");
+        throw ValueError("Assemble_CopyNodalData: number of components of input and output Data do not match.");
     } else if (!out.actsExpanded()) {
-        throw escript::ValueError("Assemble_CopyNodalData: expanded Data object is expected for output data.");
+        throw ValueError("Assemble_CopyNodalData: expanded Data object is expected for output data.");
+    } else if (in.isComplex() != out.isComplex()) {
+        throw ValueError("Assemble_CopyNodalData: complexity of input and output Data must match.");
     }
 
     // more sophisticated test needed for overlapping node/DOF counts
     if (in_data_type == FINLEY_NODES) {
         if (!in.numSamplesEqual(1, nodes->getNumNodes())) {
-            throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
+            throw ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
         }
     } else if (in_data_type == FINLEY_REDUCED_NODES) {
         if (!in.numSamplesEqual(1, nodes->getNumReducedNodes())) {
-            throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
+            throw ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
         }
     } else if (in_data_type == FINLEY_DEGREES_OF_FREEDOM) {
         if (!in.numSamplesEqual(1, nodes->getNumDegreesOfFreedom())) {
-            throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
+            throw ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
         }
         if (((out_data_type == FINLEY_NODES) || (out_data_type == FINLEY_DEGREES_OF_FREEDOM)) && !in.actsExpanded() && (mpiSize>1)) {
-            throw escript::ValueError("Assemble_CopyNodalData: FINLEY_DEGREES_OF_FREEDOM to FINLEY_NODES or FINLEY_DEGREES_OF_FREEDOM requires expanded input data on more than one processor.");
+            throw ValueError("Assemble_CopyNodalData: FINLEY_DEGREES_OF_FREEDOM to FINLEY_NODES or FINLEY_DEGREES_OF_FREEDOM requires expanded input data on more than one processor.");
         }
     } else if (in_data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
         if (!in.numSamplesEqual(1, nodes->getNumReducedDegreesOfFreedom())) {
-            throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
+            throw ValueError("Assemble_CopyNodalData: illegal number of samples of input Data object");
         }
         if ((out_data_type == FINLEY_DEGREES_OF_FREEDOM) && !in.actsExpanded() && (mpiSize>1)) {
-            throw escript::ValueError("Assemble_CopyNodalData: FINLEY_REDUCED_DEGREES_OF_FREEDOM to FINLEY_DEGREES_OF_FREEDOM requires expanded input data on more than one processor.");
+            throw ValueError("Assemble_CopyNodalData: FINLEY_REDUCED_DEGREES_OF_FREEDOM to FINLEY_DEGREES_OF_FREEDOM requires expanded input data on more than one processor.");
         }
     } else {
-        throw escript::ValueError( "Assemble_CopyNodalData: illegal function space type for target object");
+        throw ValueError( "Assemble_CopyNodalData: illegal function space type for target object");
     }
 
     dim_t numOut = 0;
@@ -83,14 +89,15 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             break;
 
         default:
-            throw escript::ValueError("Assemble_CopyNodalData: illegal function space type for source object");
+            throw ValueError("Assemble_CopyNodalData: illegal function space type for source object");
     }
 
     if (!out.numSamplesEqual(1, numOut)) {
-        throw escript::ValueError("Assemble_CopyNodalData: illegal number of samples of output Data object");
+        throw ValueError("Assemble_CopyNodalData: illegal number of samples of output Data object");
     }
 
-    const size_t numComps_size = numComps * sizeof(double);
+    const Scalar zero = static_cast<Scalar>(0);
+    const size_t numComps_size = numComps * sizeof(Scalar);
 
     /**************************** FINLEY_NODES ******************************/
     if (in_data_type == FINLEY_NODES) {
@@ -98,28 +105,28 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
         if (out_data_type == FINLEY_NODES) {
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n), numComps_size);
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(n, zero), numComps_size);
             }
         } else if (out_data_type == FINLEY_REDUCED_NODES) {
             const IndexVector& map = nodes->borrowReducedNodesTarget();
             const dim_t mapSize = map.size();
 #pragma omp parallel for
             for (index_t n = 0; n < mapSize; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(map[n]),
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(map[n], zero),
                        numComps_size);
             }
         } else if (out_data_type == FINLEY_DEGREES_OF_FREEDOM) {
             const IndexVector& map = nodes->borrowDegreesOfFreedomTarget();
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(map[n]),
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(map[n], zero),
                        numComps_size);
             }
         } else if (out_data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
             const std::vector<index_t>& map = nodes->borrowReducedDegreesOfFreedomTarget();
 #pragma omp parallel for
             for (index_t n=0; n<numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(map[n]),
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(map[n], zero),
                        numComps_size);
             }
         }
@@ -127,24 +134,24 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
     /************************ FINLEY_REDUCED_NODES **************************/
     } else if (in_data_type == FINLEY_REDUCED_NODES) {
         if (out_data_type == FINLEY_NODES) {
-            throw escript::ValueError("Assemble_CopyNodalData: cannot copy from reduced nodes to nodes.");
+            throw ValueError("Assemble_CopyNodalData: cannot copy from reduced nodes to nodes.");
         } else if (out_data_type == FINLEY_REDUCED_NODES) {
             out.requireWrite();
             const dim_t nNodes = nodes->getNumNodes();
 #pragma omp parallel for
             for (index_t n=0; n < nNodes; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n), numComps_size);
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(n, zero), numComps_size);
             }
        } else if (out_data_type == FINLEY_DEGREES_OF_FREEDOM) {
-            throw escript::ValueError("Assemble_CopyNodalData: cannot copy from reduced nodes to degrees of freedom.");
+            throw ValueError("Assemble_CopyNodalData: cannot copy from reduced nodes to degrees of freedom.");
        } else if (out_data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
             out.requireWrite();
             const index_t* target = nodes->borrowTargetReducedNodes();
             const IndexVector& map = nodes->borrowReducedDegreesOfFreedomTarget();
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-               memcpy(out.getSampleDataRW(n),
-                      in.getSampleDataRO(target[map[n]]), numComps_size);
+               memcpy(out.getSampleDataRW(n, zero),
+                      in.getSampleDataRO(target[map[n]], zero), numComps_size);
             }
         }
     /********************** FINLEY_DEGREES_OF_FREEDOM ***********************/
@@ -153,24 +160,7 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
         if (out_data_type == FINLEY_NODES) {
             const_cast<escript::Data*>(&in)->resolve();
             const index_t* target = nodes->borrowTargetDegreesOfFreedom();
-#ifdef ESYS_HAVE_PASO
-            paso::Coupler_ptr coupler(new paso::Coupler(nodes->degreesOfFreedomConnector, numComps, nodes->MPIInfo));
-            coupler->startCollect(in.getDataRO());
-            const double* recv_buffer = coupler->finishCollect();
-            const index_t upperBound = nodes->getNumDegreesOfFreedom();
-#pragma omp parallel for
-            for (index_t n = 0; n < numOut; n++) {
-                const index_t k = target[n];
-                if (k < upperBound) {
-                    memcpy(out.getSampleDataRW(n), in.getSampleDataRO(k),
-                           numComps_size);
-                } else {
-                    memcpy(out.getSampleDataRW(n),
-                           &recv_buffer[(k - upperBound) * numComps],
-                           numComps_size);
-                }
-            }
-#elif defined(ESYS_HAVE_TRILINOS)
+#ifdef ESYS_HAVE_TRILINOS
             using namespace esys_trilinos;
 
             Teuchos::RCP<const MapType> colMap;
@@ -178,9 +168,9 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             MapType colPointMap;
             MapType rowPointMap;
             if (numComps > 1) {
-                colPointMap = RealBlockVector::makePointMap(
+                colPointMap = BlockVectorType<Scalar>::makePointMap(
                                              *nodes->trilinosColMap, numComps);
-                rowPointMap = RealBlockVector::makePointMap(
+                rowPointMap = BlockVectorType<Scalar>::makePointMap(
                                              *nodes->trilinosRowMap, numComps);
                 colMap = Teuchos::rcpFromRef(colPointMap);
                 rowMap = Teuchos::rcpFromRef(rowPointMap);
@@ -190,44 +180,43 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             }
 
             const ImportType importer(rowMap, colMap);
-            const Teuchos::ArrayView<const real_t> localIn(
-                                               in.getSampleDataRO(0),
+            const Teuchos::ArrayView<const Scalar> localIn(
+                                               in.getSampleDataRO(0, zero),
                                                in.getNumDataPoints()*numComps);
-            Teuchos::RCP<RealVector> lclData = rcp(new RealVector(rowMap,
-                                                  localIn, localIn.size(), 1));
-            Teuchos::RCP<RealVector> gblData = rcp(new RealVector(colMap, 1));
+            Teuchos::RCP<VectorType<Scalar> > lclData =
+                rcp(new VectorType<Scalar>(rowMap, localIn, localIn.size(), 1));
+            Teuchos::RCP<VectorType<Scalar> > gblData = rcp(new VectorType<Scalar>(colMap, 1));
             gblData->doImport(*lclData, importer, Tpetra::INSERT);
-            Teuchos::ArrayRCP<const real_t> gblArray(gblData->getData(0));
+            Teuchos::ArrayRCP<const Scalar> gblArray(gblData->getData(0));
 #pragma omp parallel for
             for (index_t i = 0; i < numOut; i++) {
-                const real_t* src = &gblArray[target[i] * numComps];
-                std::copy(src, src+numComps, out.getSampleDataRW(i));
+                const Scalar* src = &gblArray[target[i] * numComps];
+                std::copy(src, src+numComps, out.getSampleDataRW(i, zero));
             }
-#endif
-        } else if (out_data_type == FINLEY_REDUCED_NODES) {
-            const_cast<escript::Data*>(&in)->resolve();
-            const index_t* target = nodes->borrowTargetDegreesOfFreedom();
-            const IndexVector& map = nodes->borrowReducedNodesTarget();
-#ifdef ESYS_HAVE_PASO
-            paso::Coupler_ptr coupler(new paso::Coupler(nodes->degreesOfFreedomConnector, numComps, nodes->MPIInfo));
-            coupler->startCollect(in.getDataRO());
-            const double* recv_buffer = coupler->finishCollect();
+#elif defined(ESYS_HAVE_PASO)
+            paso::Coupler_ptr<Scalar> coupler(new paso::Coupler<Scalar>(
+                        nodes->degreesOfFreedomConnector, numComps, nodes->MPIInfo));
+            coupler->startCollect(in.getSampleDataRO(0, zero));
+            const Scalar* recv_buffer = coupler->finishCollect();
             const index_t upperBound = nodes->getNumDegreesOfFreedom();
-            const dim_t mapSize = map.size();
-
 #pragma omp parallel for
-            for (index_t n = 0; n < mapSize; n++) {
-                const index_t k = target[map[n]];
+            for (index_t n = 0; n < numOut; n++) {
+                const index_t k = target[n];
                 if (k < upperBound) {
-                    memcpy(out.getSampleDataRW(n), in.getSampleDataRO(k),
+                    memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(k, zero),
                            numComps_size);
                 } else {
-                    memcpy(out.getSampleDataRW(n),
-                           &recv_buffer[(k-upperBound)*numComps],
+                    memcpy(out.getSampleDataRW(n, zero),
+                           &recv_buffer[(k - upperBound) * numComps],
                            numComps_size);
                 }
             }
-#elif defined(ESYS_HAVE_TRILINOS)
+#endif // Trilinos / Paso
+        } else if (out_data_type == FINLEY_REDUCED_NODES) {
+            const_cast<escript::Data*>(&in)->resolve();
+            const index_t* target = nodes->borrowTargetDegreesOfFreedom();
+            const IndexVector& map = nodes->borrowReducedNodesTarget();
+#ifdef ESYS_HAVE_TRILINOS
             using namespace esys_trilinos;
 
             Teuchos::RCP<const MapType> colMap;
@@ -235,9 +224,9 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             MapType colPointMap;
             MapType rowPointMap;
             if (numComps > 1) {
-                colPointMap = RealBlockVector::makePointMap(
+                colPointMap = BlockVectorType<Scalar>::makePointMap(
                                              *nodes->trilinosColMap, numComps);
-                rowPointMap = RealBlockVector::makePointMap(
+                rowPointMap = BlockVectorType<Scalar>::makePointMap(
                                              *nodes->trilinosRowMap, numComps);
                 colMap = Teuchos::rcpFromRef(colPointMap);
                 rowMap = Teuchos::rcpFromRef(rowPointMap);
@@ -247,24 +236,44 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             }
 
             const ImportType importer(rowMap, colMap);
-            const Teuchos::ArrayView<const real_t> localIn(
-                                               in.getSampleDataRO(0),
+            const Teuchos::ArrayView<const Scalar> localIn(
+                                               in.getSampleDataRO(0, zero),
                                                in.getNumDataPoints()*numComps);
-            Teuchos::RCP<RealVector> lclData = rcp(new RealVector(rowMap,
-                                                  localIn, localIn.size(), 1));
-            Teuchos::RCP<RealVector> gblData = rcp(new RealVector(colMap, 1));
+            Teuchos::RCP<VectorType<Scalar> > lclData = rcp(new VectorType<Scalar>(
+                                               rowMap, localIn, localIn.size(), 1));
+            Teuchos::RCP<VectorType<Scalar> > gblData = rcp(new VectorType<Scalar>(colMap, 1));
             gblData->doImport(*lclData, importer, Tpetra::INSERT);
-            Teuchos::ArrayRCP<const real_t> gblArray(gblData->getData(0));
+            Teuchos::ArrayRCP<const Scalar> gblArray(gblData->getData(0));
 #pragma omp parallel for
             for (index_t i = 0; i < numOut; i++) {
-                const real_t* src = &gblArray[target[map[i]] * numComps];
-                std::copy(src, src+numComps, out.getSampleDataRW(i));
+                const Scalar* src = &gblArray[target[map[i]] * numComps];
+                std::copy(src, src+numComps, out.getSampleDataRW(i, zero));
+            }
+#elif defined(ESYS_HAVE_PASO)
+            paso::Coupler_ptr<Scalar> coupler(new paso::Coupler<Scalar>(
+                        nodes->degreesOfFreedomConnector, numComps, nodes->MPIInfo));
+            coupler->startCollect(in.getSampleDataRO(0, zero));
+            const Scalar* recv_buffer = coupler->finishCollect();
+            const index_t upperBound = nodes->getNumDegreesOfFreedom();
+            const dim_t mapSize = map.size();
+
+#pragma omp parallel for
+            for (index_t n = 0; n < mapSize; n++) {
+                const index_t k = target[map[n]];
+                if (k < upperBound) {
+                    memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(k, zero),
+                           numComps_size);
+                } else {
+                    memcpy(out.getSampleDataRW(n, zero),
+                           &recv_buffer[(k-upperBound)*numComps],
+                           numComps_size);
+                }
             }
-#endif
+#endif // Trilinos / Paso
         } else if (out_data_type == FINLEY_DEGREES_OF_FREEDOM) {
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n),
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(n, zero),
                        numComps_size);
             }
         } else if (out_data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
@@ -272,39 +281,21 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             const std::vector<index_t>& map = nodes->borrowReducedDegreesOfFreedomTarget();
 #pragma omp parallel for
             for (index_t n=0; n<numOut; n++) {
-                memcpy(out.getSampleDataRW(n),
-                       in.getSampleDataRO(target[map[n]]), numComps_size);
+                memcpy(out.getSampleDataRW(n, zero),
+                       in.getSampleDataRO(target[map[n]], zero), numComps_size);
             }
         }
 
     /****************** FINLEY_REDUCED_DEGREES_OF_FREEDOM *******************/
     } else if (in_data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
         if (out_data_type == FINLEY_NODES) {
-            throw escript::ValueError("Assemble_CopyNodalData: cannot copy from reduced degrees of freedom to nodes.");
+            throw ValueError("Assemble_CopyNodalData: cannot copy from reduced degrees of freedom to nodes.");
         } else if (out_data_type == FINLEY_REDUCED_NODES) {
             const_cast<escript::Data*>(&in)->resolve();
             const index_t* target = nodes->borrowTargetReducedDegreesOfFreedom();
             const IndexVector& map = nodes->borrowReducedNodesTarget();
             out.requireWrite();
-#ifdef ESYS_HAVE_PASO
-            paso::Coupler_ptr coupler(new paso::Coupler(nodes->reducedDegreesOfFreedomConnector, numComps, nodes->MPIInfo));
-            coupler->startCollect(in.getDataRO());
-            const index_t upperBound = nodes->getNumReducedDegreesOfFreedom();
-            const dim_t mapSize = map.size();
-            const double *recv_buffer = coupler->finishCollect();
-#pragma omp parallel for
-            for (index_t n = 0; n < mapSize; n++) {
-                const index_t k = target[map[n]];
-                if (k < upperBound) {
-                    memcpy(out.getSampleDataRW(n), in.getSampleDataRO(k),
-                           numComps_size);
-                } else {
-                    memcpy(out.getSampleDataRW(n),
-                           &recv_buffer[(k - upperBound) * numComps],
-                           numComps_size);
-                }
-            }
-#elif defined(ESYS_HAVE_TRILINOS)
+#ifdef ESYS_HAVE_TRILINOS
             using namespace esys_trilinos;
 
             Teuchos::RCP<const MapType> colMap;
@@ -312,9 +303,9 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             MapType colPointMap;
             MapType rowPointMap;
             if (numComps > 1) {
-                colPointMap = RealBlockVector::makePointMap(
+                colPointMap = BlockVectorType<Scalar>::makePointMap(
                                       *nodes->trilinosReducedColMap, numComps);
-                rowPointMap = RealBlockVector::makePointMap(
+                rowPointMap = BlockVectorType<Scalar>::makePointMap(
                                       *nodes->trilinosReducedRowMap, numComps);
                 colMap = Teuchos::rcpFromRef(colPointMap);
                 rowMap = Teuchos::rcpFromRef(rowPointMap);
@@ -324,31 +315,56 @@ void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
             }
 
             const ImportType importer(rowMap, colMap);
-            const Teuchos::ArrayView<const real_t> localIn(
-                                               in.getSampleDataRO(0),
+            const Teuchos::ArrayView<const Scalar> localIn(
+                                               in.getSampleDataRO(0, zero),
                                                in.getNumDataPoints()*numComps);
-            Teuchos::RCP<RealVector> lclData = rcp(new RealVector(rowMap,
-                                                  localIn, localIn.size(), 1));
-            Teuchos::RCP<RealVector> gblData = rcp(new RealVector(colMap, 1));
+            Teuchos::RCP<VectorType<Scalar> > lclData = rcp(new VectorType<Scalar>(
+                                               rowMap, localIn, localIn.size(), 1));
+            Teuchos::RCP<VectorType<Scalar> > gblData = rcp(new VectorType<Scalar>(colMap, 1));
             gblData->doImport(*lclData, importer, Tpetra::INSERT);
-            Teuchos::ArrayRCP<const real_t> gblArray(gblData->getData(0));
+            Teuchos::ArrayRCP<const Scalar> gblArray(gblData->getData(0));
 #pragma omp parallel for
             for (index_t i = 0; i < numOut; i++) {
-                const real_t* src = &gblArray[target[map[i]] * numComps];
-                std::copy(src, src+numComps, out.getSampleDataRW(i));
+                const Scalar* src = &gblArray[target[map[i]] * numComps];
+                std::copy(src, src+numComps, out.getSampleDataRW(i, zero));
+            }
+#elif defined(ESYS_HAVE_PASO)
+            paso::Coupler_ptr<Scalar> coupler(new paso::Coupler<Scalar>(
+                        nodes->reducedDegreesOfFreedomConnector, numComps, nodes->MPIInfo));
+            coupler->startCollect(in.getSampleDataRO(0, zero));
+            const index_t upperBound = nodes->getNumReducedDegreesOfFreedom();
+            const dim_t mapSize = map.size();
+            const Scalar* recv_buffer = coupler->finishCollect();
+#pragma omp parallel for
+            for (index_t n = 0; n < mapSize; n++) {
+                const index_t k = target[map[n]];
+                if (k < upperBound) {
+                    memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(k, zero),
+                           numComps_size);
+                } else {
+                    memcpy(out.getSampleDataRW(n, zero),
+                           &recv_buffer[(k - upperBound) * numComps],
+                           numComps_size);
+                }
             }
-#endif
+#endif // Trilinos / Paso
         } else if (out_data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
             out.requireWrite();
 #pragma omp parallel for
             for (index_t n = 0; n < numOut; n++) {
-                memcpy(out.getSampleDataRW(n), in.getSampleDataRO(n), numComps_size);
+                memcpy(out.getSampleDataRW(n, zero), in.getSampleDataRO(n, zero), numComps_size);
             }
         } else if (out_data_type == FINLEY_DEGREES_OF_FREEDOM) {
-            throw escript::ValueError("Assemble_CopyNodalData: cannot copy from reduced degrees of freedom to degrees of freedom.");
+            throw ValueError("Assemble_CopyNodalData: cannot copy from reduced degrees of freedom to degrees of freedom.");
         }
     } // in_data_type
 }
 
+// instantiate our two supported versions
+template void Assemble_CopyNodalData<escript::DataTypes::real_t>(
+           const NodeFile* nodes, escript::Data& out, const escript::Data& in);
+template void Assemble_CopyNodalData<escript::DataTypes::cplx_t>(
+           const NodeFile* nodes, escript::Data& out, const escript::Data& in);
+
 } // namespace finley
 
diff --git a/finley/src/Assemble_LumpedSystem.cpp b/finley/src/Assemble_LumpedSystem.cpp
index c385556..ca4b517 100644
--- a/finley/src/Assemble_LumpedSystem.cpp
+++ b/finley/src/Assemble_LumpedSystem.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_NodeCoordinates.cpp b/finley/src/Assemble_NodeCoordinates.cpp
index 16d6029..679b6ce 100644
--- a/finley/src/Assemble_NodeCoordinates.cpp
+++ b/finley/src/Assemble_NodeCoordinates.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE.cpp b/finley/src/Assemble_PDE.cpp
index 7a2f66a..623054b 100644
--- a/finley/src/Assemble_PDE.cpp
+++ b/finley/src/Assemble_PDE.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_Points.cpp b/finley/src/Assemble_PDE_Points.cpp
index 5ed6578..a03564e 100644
--- a/finley/src/Assemble_PDE_Points.cpp
+++ b/finley/src/Assemble_PDE_Points.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_Single_1D.cpp b/finley/src/Assemble_PDE_Single_1D.cpp
index 89d7ca9..39b86a2 100644
--- a/finley/src/Assemble_PDE_Single_1D.cpp
+++ b/finley/src/Assemble_PDE_Single_1D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_Single_2D.cpp b/finley/src/Assemble_PDE_Single_2D.cpp
index 81e472a..939916a 100644
--- a/finley/src/Assemble_PDE_Single_2D.cpp
+++ b/finley/src/Assemble_PDE_Single_2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_Single_3D.cpp b/finley/src/Assemble_PDE_Single_3D.cpp
index 2e5619a..42f054d 100644
--- a/finley/src/Assemble_PDE_Single_3D.cpp
+++ b/finley/src/Assemble_PDE_Single_3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_Single_C.cpp b/finley/src/Assemble_PDE_Single_C.cpp
index a820890..ea38a76 100644
--- a/finley/src/Assemble_PDE_Single_C.cpp
+++ b/finley/src/Assemble_PDE_Single_C.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_System_1D.cpp b/finley/src/Assemble_PDE_System_1D.cpp
index 2bd5825..0f67e04 100644
--- a/finley/src/Assemble_PDE_System_1D.cpp
+++ b/finley/src/Assemble_PDE_System_1D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_System_2D.cpp b/finley/src/Assemble_PDE_System_2D.cpp
index c44c425..5c3f9c7 100644
--- a/finley/src/Assemble_PDE_System_2D.cpp
+++ b/finley/src/Assemble_PDE_System_2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_System_3D.cpp b/finley/src/Assemble_PDE_System_3D.cpp
index 22b26da..85bde81 100644
--- a/finley/src/Assemble_PDE_System_3D.cpp
+++ b/finley/src/Assemble_PDE_System_3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_PDE_System_C.cpp b/finley/src/Assemble_PDE_System_C.cpp
index bf0a6cc..c8b8903 100644
--- a/finley/src/Assemble_PDE_System_C.cpp
+++ b/finley/src/Assemble_PDE_System_C.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_addToSystemMatrix.cpp b/finley/src/Assemble_addToSystemMatrix.cpp
index 5121593..2cbcdbe 100644
--- a/finley/src/Assemble_addToSystemMatrix.cpp
+++ b/finley/src/Assemble_addToSystemMatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_getAssembleParameters.cpp b/finley/src/Assemble_getAssembleParameters.cpp
index 1bcf3b9..02dd6cc 100644
--- a/finley/src/Assemble_getAssembleParameters.cpp
+++ b/finley/src/Assemble_getAssembleParameters.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_getNormal.cpp b/finley/src/Assemble_getNormal.cpp
index 1cd625f..1a68a2f 100644
--- a/finley/src/Assemble_getNormal.cpp
+++ b/finley/src/Assemble_getNormal.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_getSize.cpp b/finley/src/Assemble_getSize.cpp
index 910da82..795fbce 100644
--- a/finley/src/Assemble_getSize.cpp
+++ b/finley/src/Assemble_getSize.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Assemble_gradient.cpp b/finley/src/Assemble_gradient.cpp
index 351145c..1036d81 100644
--- a/finley/src/Assemble_gradient.cpp
+++ b/finley/src/Assemble_gradient.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -29,30 +29,31 @@
 
 namespace finley {
 
+template<typename Scalar>
 void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
-                       escript::Data& grad_data, const escript::Data& data)
+                       escript::Data& out, const escript::Data& data)
 {
     if (!nodes || !elements)
         return;
 
     const int numComps = data.getDataPointSize();
     const int NN = elements->numNodes;
-    const bool reducedOrder = util::hasReducedIntegrationOrder(grad_data);
-    const int data_type = data.getFunctionSpace().getTypeCode();
+    const bool reducedOrder = util::hasReducedIntegrationOrder(out);
+    const int dataType = data.getFunctionSpace().getTypeCode();
 
     bool reducedShapefunction = false;
     dim_t numNodes = 0;
-    if (data_type == FINLEY_NODES) {
+    if (dataType == FINLEY_NODES) {
         numNodes = nodes->getNumNodes();
-    } else if (data_type==FINLEY_REDUCED_NODES) { 
+    } else if (dataType == FINLEY_REDUCED_NODES) { 
         reducedShapefunction = true;
         numNodes = nodes->getNumReducedNodes();
-    } else if (data_type == FINLEY_DEGREES_OF_FREEDOM) {
+    } else if (dataType == FINLEY_DEGREES_OF_FREEDOM) {
         if (elements->MPIInfo->size > 1) {
             throw escript::ValueError("Assemble_gradient: for more than one processor DEGREES_OF_FREEDOM data are not accepted as input.");
         }
         numNodes = nodes->getNumDegreesOfFreedom();
-    } else if (data_type == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
+    } else if (dataType == FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
         if (elements->MPIInfo->size > 1) {
             throw escript::ValueError("Assemble_gradient: for more than one processor REDUCED_DEGREES_OF_FREEDOM data are not accepted as input.");
         }
@@ -75,13 +76,13 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
     int s_offset = 0;
     const int* nodes_selector = NULL;
   
-    const int grad_data_type = grad_data.getFunctionSpace().getTypeCode();
-    if (grad_data_type==FINLEY_CONTACT_ELEMENTS_2 || grad_data_type==FINLEY_REDUCED_CONTACT_ELEMENTS_2)  {
+    const int gradDataType = out.getFunctionSpace().getTypeCode();
+    if (gradDataType==FINLEY_CONTACT_ELEMENTS_2 || gradDataType==FINLEY_REDUCED_CONTACT_ELEMENTS_2)  {
         s_offset = jac->offsets[1];
     } else {
         s_offset = jac->offsets[0];
     }
-    if (data_type==FINLEY_REDUCED_NODES || data_type==FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
+    if (dataType==FINLEY_REDUCED_NODES || dataType==FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
         nodes_selector = refElement->Type->linearNodes;
         numShapesTotal2 = refElement->LinearBasisFunctions->Type->numShapes * refElement->Type->numSides;
     } else { 
@@ -90,36 +91,37 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
     }
 
     // check the dimensions of data
-    if (!grad_data.numSamplesEqual(numQuad*numSub, elements->numElements)) {
+    if (!out.numSamplesEqual(numQuad*numSub, elements->numElements)) {
         throw escript::ValueError("Assemble_gradient: illegal number of samples in gradient Data object");
     } else if (!data.numSamplesEqual(1, numNodes)) {
         throw escript::ValueError("Assemble_gradient: illegal number of samples of input Data object");
-    } else if (numDim * numComps != grad_data.getDataPointSize()) {
+    } else if (numDim * numComps != out.getDataPointSize()) {
         throw escript::ValueError("Assemble_gradient: illegal number of components in gradient data object.");
-    } else if (!grad_data.actsExpanded()) {
+    } else if (!out.actsExpanded()) {
         throw escript::ValueError("Assemble_gradient: expanded Data object is expected for output data.");
     } else if (!(s_offset+numShapes <= numShapesTotal)) {
         throw escript::ValueError("Assemble_gradient: nodes per element is inconsistent with number of jacobians.");
     }
 
-    const size_t localGradSize = sizeof(double)*numDim*numQuad*numSub*numComps;
-    grad_data.requireWrite();
+    const Scalar zero = static_cast<Scalar>(0);
+    const size_t localGradSize = sizeof(Scalar)*numDim*numQuad*numSub*numComps;
+    out.requireWrite();
 #pragma omp parallel
     {
-        if (data_type == FINLEY_NODES) {
+        if (dataType == FINLEY_NODES) {
             if (numDim == 1) {
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int isub = 0; isub < numSub; isub++) {
                         for (int s = 0; s < numShapes; s++) {
                             const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double* data_array = data.getSampleDataRO(n);
+                            const Scalar* data_array = data.getSampleDataRO(n, zero);
                             for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                                 for (int l = 0; l < numComps; l++) {
-                                    grad_data_e[INDEX4(l, 0, q, isub, numComps, numDim, numQuad)] +=
+                                    gradData_e[INDEX4(l, 0, q, isub, numComps, numDim, numQuad)] +=
                                         data_array[l] * jac->DSDX[INDEX5
                                          (s_offset+s, 0, q, isub, e, numShapesTotal, numDim, numQuad, numSub)];
                                 }
@@ -130,17 +132,17 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
             } else if (numDim == 2) {
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int isub = 0; isub < numSub; isub++) {
                         for (int s = 0; s < numShapes; s++) {
                             const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double* data_array=data.getSampleDataRO(n);
+                            const Scalar* data_array = data.getSampleDataRO(n, zero);
                             for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                                 for (int l = 0; l < numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -149,39 +151,39 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
             } else if (numDim == 3) {
 #pragma omp for
                 for (index_t e = 0; e < elements->numElements; e++) {
-                    double* grad_data_e = grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
                     for (int isub = 0; isub < numSub; isub++) {
                         for (int s = 0; s < numShapes; s++) {
                             const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double* data_array = data.getSampleDataRO(n);
+                            const Scalar* data_array = data.getSampleDataRO(n, zero);
                             for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
                                 for (int l = 0; l < numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
                     }
                 }
             }
-        } else if (data_type == FINLEY_REDUCED_NODES) {
+        } else if (dataType == FINLEY_REDUCED_NODES) {
             const index_t* target = nodes->borrowTargetReducedNodes();
             if (numDim == 1) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0;s<numShapes;s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);            
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {                              
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -189,18 +191,18 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 }
             } else if (numDim==2) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -208,40 +210,40 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 }
             } else if (numDim==3) {
 #pragma omp for
-                for (index_t e=0;e<elements->numElements;e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {   
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {   
 #pragma ivdep
-                                for (int l=0;l<numComps;l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps;l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
                     }
                 }
             }
-        } else if (data_type==FINLEY_DEGREES_OF_FREEDOM) {
+        } else if (dataType==FINLEY_DEGREES_OF_FREEDOM) {
             const index_t* target = nodes->borrowTargetDegreesOfFreedom();
             if (numDim==1) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -249,18 +251,18 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 }
             } else if (numDim==2) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -268,40 +270,40 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 }
             } else if (numDim==3) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
                     }
                 }
             }
-        } else if (data_type==FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
+        } else if (dataType==FINLEY_REDUCED_DEGREES_OF_FREEDOM) {
             const index_t* target = nodes->borrowTargetReducedDegreesOfFreedom();
             if (numDim==1) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e,0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -309,18 +311,18 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
                 }
             } else if (numDim==2) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e, 0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
@@ -329,28 +331,36 @@ void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
 
             } else if (numDim==3) {
 #pragma omp for
-                for (index_t e=0; e<elements->numElements; e++) {
-                    double *grad_data_e=grad_data.getSampleDataRW(e);
-                    memset(grad_data_e,0, localGradSize);
-                    for (int isub=0; isub<numSub; isub++) {
-                        for (int s=0; s<numShapes; s++) {
-                            const index_t n=elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
-                            const double *data_array=data.getSampleDataRO(target[n]);
-                            for (int q=0; q<numQuad; q++) {
+                for (index_t e = 0; e < elements->numElements; e++) {
+                    Scalar* gradData_e = out.getSampleDataRW(e, zero);
+                    memset(gradData_e, 0, localGradSize);
+                    for (int isub = 0; isub < numSub; isub++) {
+                        for (int s = 0; s < numShapes; s++) {
+                            const index_t n = elements->Nodes[INDEX2(nodes_selector[INDEX2(s_offset+s,isub,numShapesTotal2)],e, NN)];
+                            const Scalar* data_array = data.getSampleDataRO(target[n], zero);
+                            for (int q = 0; q < numQuad; q++) {
 #pragma ivdep
-                                for (int l=0; l<numComps; l++) {
-                                    grad_data_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
-                                    grad_data_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)]+=data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                for (int l = 0; l < numComps; l++) {
+                                    gradData_e[INDEX4(l,0,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,0,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,1,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,1,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
+                                    gradData_e[INDEX4(l,2,q,isub,numComps,numDim,numQuad)] += data_array[l]*jac->DSDX[INDEX5(s_offset+s,2,q,isub,e,numShapesTotal,numDim,numQuad,numSub)];
                                 }
                             }
                         }
                     }
                 }
             } // numDim
-        } // data_type
+        } // dataType
     } // end parallel region
 }
 
+// instantiate our two supported versions
+template void Assemble_gradient<escript::DataTypes::real_t>(
+                       const NodeFile* nodes, const ElementFile* elements,
+                       escript::Data& out, const escript::Data& data);
+template void Assemble_gradient<escript::DataTypes::cplx_t>(
+                       const NodeFile* nodes, const ElementFile* elements,
+                       escript::Data& out, const escript::Data& data);
+
 } // namespace finley
 
diff --git a/finley/src/Assemble_integrate.cpp b/finley/src/Assemble_integrate.cpp
index 580fd94..de87b14 100644
--- a/finley/src/Assemble_integrate.cpp
+++ b/finley/src/Assemble_integrate.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -28,8 +28,9 @@
 
 namespace finley {
 
+template<typename Scalar>
 void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
-                        const escript::Data& data, double* out)
+                        const escript::Data& data, Scalar* out)
 {
     if (!nodes || !elements)
         return;
@@ -45,19 +46,20 @@ void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
     }
 
     const int numComps = data.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
 
     for (int q = 0; q < numComps; q++)
-        out[q] = 0;
+        out[q] = zero;
 
 #pragma omp parallel
     {
-        std::vector<double> out_local(numComps);
+        std::vector<Scalar> out_local(numComps);
 
         if (data.actsExpanded()) {
 #pragma omp for
             for (index_t e = 0; e < elements->numElements; e++) {
                 if (elements->Owner[e] == my_mpi_rank) {
-                    const double* data_array = data.getSampleDataRO(e);
+                    const Scalar* data_array = data.getSampleDataRO(e, zero);
                     for (int q = 0; q < numQuadTotal; q++) {
                         for (int i = 0; i < numComps; i++)
                             out_local[i] += data_array[INDEX2(i,q,numComps)]*jac->volume[INDEX2(q,e,numQuadTotal)];
@@ -68,7 +70,7 @@ void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
 #pragma omp for
             for (index_t e = 0; e < elements->numElements; e++) {
                 if (elements->Owner[e] == my_mpi_rank) {
-                    const double* data_array = data.getSampleDataRO(e);
+                    const Scalar* data_array = data.getSampleDataRO(e, zero);
                     double rtmp = 0.;
                     for (int q = 0; q < numQuadTotal; q++)
                         rtmp += jac->volume[INDEX2(q, e, numQuadTotal)];
@@ -84,5 +86,13 @@ void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
     } // parallel section
 }
 
+// instantiate our two supported versions
+template void Assemble_integrate<escript::DataTypes::real_t>(
+                    const NodeFile* nodes, const ElementFile* elements,
+                    const escript::Data& data, escript::DataTypes::real_t* out);
+template void Assemble_integrate<escript::DataTypes::cplx_t>(
+                    const NodeFile* nodes, const ElementFile* elements,
+                    const escript::Data& data, escript::DataTypes::cplx_t* out);
+
 } // namespace finley
 
diff --git a/finley/src/Assemble_interpolate.cpp b/finley/src/Assemble_interpolate.cpp
index 2d3878c..7f2e6bd 100644
--- a/finley/src/Assemble_interpolate.cpp
+++ b/finley/src/Assemble_interpolate.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -29,6 +29,7 @@
 
 namespace finley {
 
+template<typename Scalar>
 void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
                           const escript::Data& data,
                           escript::Data& interpolated_data)
@@ -119,28 +120,39 @@ void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
         throw escript::ValueError("Assemble_interpolate: expanded Data object is expected for output data.");
     }
 
+    const Scalar zero = static_cast<Scalar>(0);
     interpolated_data.requireWrite();
 #pragma omp parallel
     {
-        std::vector<double> local_data(NS_DOF * numComps * numSub);
-        const size_t numComps_size = numComps * sizeof(double);
+        std::vector<Scalar> local_data(NS_DOF * numComps * numSub);
+        const size_t numComps_size = numComps * sizeof(Scalar);
         // open the element loop
 #pragma omp for
         for (index_t e = 0; e < elements->numElements; e++) {
             for (int isub = 0; isub < numSub; isub++) {
                 for (int q = 0; q < NS_DOF; q++) {
                     const index_t i = elements->Nodes[INDEX2(resort_nodes[INDEX2(dof_offset+q,isub,numShapesTotal)],e,NN)];
-                    const double* data_array = data.getSampleDataRO(map[i]);
+                    const Scalar* data_array = data.getSampleDataRO(map[i], zero);
                     memcpy(&local_data[INDEX3(0, q, isub, numComps,NS_DOF)], data_array, numComps_size);
                 }
             }
             // calculate interpolated_data=local_data*S
-            util::smallMatSetMult1(numSub, numComps, numQuad,
-                  interpolated_data.getSampleDataRW(e), NS_DOF,
+            util::smallMatSetMult1<Scalar>(numSub, numComps, numQuad,
+                  interpolated_data.getSampleDataRW(e, zero), NS_DOF,
                   local_data, basis->S);
         } // end of element loop
     } // end of parallel region
 }
 
+// instantiate our two supported versions
+template void Assemble_interpolate<escript::DataTypes::real_t>(
+                          const NodeFile* nodes, const ElementFile* elements,
+                          const escript::Data& data,
+                          escript::Data& interpolated_data);
+template void Assemble_interpolate<escript::DataTypes::cplx_t>(
+                          const NodeFile* nodes, const ElementFile* elements,
+                          const escript::Data& data,
+                          escript::Data& interpolated_data);
+
 } // namespace finley
 
diff --git a/finley/src/Assemble_jacobians.cpp b/finley/src/Assemble_jacobians.cpp
index 7df3975..a64d694 100644
--- a/finley/src/Assemble_jacobians.cpp
+++ b/finley/src/Assemble_jacobians.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/DomainFactory.cpp b/finley/src/DomainFactory.cpp
index d195df9..6305f72 100644
--- a/finley/src/DomainFactory.cpp
+++ b/finley/src/DomainFactory.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,9 +20,19 @@
 #include <escript/SubWorld.h>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncDim.h>
+  #include <ncVar.h>
+  #include <ncFile.h>
+  
+ #include <escript/NCHelper.h>  
+  
+ #else
+  #include <netcdfcpp.h>
+ #endif
 #endif
 
+
 #include <boost/python/extract.hpp>
 #include <boost/scoped_array.hpp>
 
@@ -32,9 +42,32 @@ using namespace std;
 using namespace escript;
 namespace bp = boost::python;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace finley {
 
 #ifdef ESYS_HAVE_NETCDF
+#ifdef NETCDF4
+
+// A convenience method to retrieve an integer attribute from a NetCDF file
+template<typename T>
+T ncReadAtt(NcFile& dataFile, const string& fName, const string& attrName)
+{
+    NcGroupAtt attr = dataFile.getAtt(attrName.c_str());
+    if (attr.isNull()) {
+        stringstream msg;
+        msg << "loadMesh: Error retrieving integer attribute '" << attrName
+            << "' from NetCDF file '" << fName << "'";
+        throw IOError(msg.str());
+    }
+    T value;
+    attr.getValues(&value);
+    return value;
+}
+#else    
+    
 // A convenience method to retrieve an integer attribute from a NetCDF file
 template<typename T>
 T ncReadAtt(NcFile* dataFile, const string& fName, const string& attrName)
@@ -50,6 +83,8 @@ T ncReadAtt(NcFile* dataFile, const string& fName, const string& attrName)
     delete attr;
     return value;
 }
+
+#endif
 #endif
 
 inline void cleanupAndThrow(FinleyDomain* dom, string msg)
@@ -59,6 +94,399 @@ inline void cleanupAndThrow(FinleyDomain* dom, string msg)
     throw IOError(msgPrefix+msg);
 }
 
+#ifdef NETCDF4
+
+Domain_ptr FinleyDomain::load(const string& fileName)
+{
+#ifdef ESYS_HAVE_NETCDF
+    JMPI mpiInfo = makeInfo(MPI_COMM_WORLD);
+    const string fName(mpiInfo->appendRankToFileName(fileName));
+
+    // Open NetCDF file for reading
+    NcGroupAtt attr;
+    NcVar nc_var_temp;
+    NcFile dataFile;
+    // Create the NetCDF file.
+    if (!openNcFile(dataFile, fileName))
+    {
+        throw IOError("load: opening of netCDF file for input failed.");
+    }    
+    // Read NetCDF integer attributes
+
+    // index_size was only introduced with 64-bit index support so fall back
+    // to 32 bits if not found.
+    int index_size;
+    try {
+        index_size = ncReadAtt<int>(dataFile, fName, "index_size");
+    } catch (IOError& e) {
+        index_size = 4;
+    }
+    // technically we could cast if reading 32-bit data on 64-bit escript
+    // but cost-benefit analysis clearly favours this implementation for now
+    if (sizeof(index_t) != index_size) {
+        throw IOError("loadMesh: size of index types at runtime differ from dump file");
+    }
+
+    int mpi_size = ncReadAtt<int>(dataFile, fName, "mpi_size");
+    int mpi_rank = ncReadAtt<int>(dataFile, fName, "mpi_rank");
+    int numDim = ncReadAtt<int>(dataFile, fName, "numDim");
+    int order = ncReadAtt<int>(dataFile, fName, "order");
+    int reduced_order = ncReadAtt<int>(dataFile, fName, "reduced_order");
+    dim_t numNodes = ncReadAtt<dim_t>(dataFile, fName, "numNodes");
+    dim_t num_Elements = ncReadAtt<dim_t>(dataFile, fName, "num_Elements");
+    dim_t num_FaceElements = ncReadAtt<dim_t>(dataFile, fName, "num_FaceElements");
+    dim_t num_ContactElements = ncReadAtt<dim_t>(dataFile, fName, "num_ContactElements");
+    dim_t num_Points = ncReadAtt<dim_t>(dataFile, fName, "num_Points");
+    int num_Elements_numNodes = ncReadAtt<int>(dataFile, fName, "num_Elements_numNodes");
+    int Elements_TypeId = ncReadAtt<int>(dataFile, fName, "Elements_TypeId");
+    int num_FaceElements_numNodes = ncReadAtt<int>(dataFile, fName, "num_FaceElements_numNodes");
+    int FaceElements_TypeId = ncReadAtt<int>(dataFile, fName, "FaceElements_TypeId");
+    int num_ContactElements_numNodes = ncReadAtt<int>(dataFile, fName, "num_ContactElements_numNodes");
+    int ContactElements_TypeId = ncReadAtt<int>(dataFile, fName, "ContactElements_TypeId");
+    int Points_TypeId = ncReadAtt<int>(dataFile, fName, "Points_TypeId");
+    int num_Tags = ncReadAtt<int>(dataFile, fName, "num_Tags");
+
+    // Verify size and rank
+    if (mpiInfo->size != mpi_size) {
+        stringstream msg;
+        msg << "loadMesh: The NetCDF file '" << fName
+            << "' can only be read on " << mpi_size
+            << " CPUs. Currently running: " << mpiInfo->size;
+        throw FinleyException(msg.str());
+    }
+    if (mpiInfo->rank != mpi_rank) {
+        stringstream msg;
+        msg << "loadMesh: The NetCDF file '" << fName
+            << "' should be read on CPU #" << mpi_rank
+            << " and NOT on #" << mpiInfo->rank;
+        throw FinleyException(msg.str());
+    }
+
+    // Read mesh name
+    if ((attr=dataFile.getAtt("Name")).isNull() ) {
+        stringstream msg;
+        msg << "loadMesh: Error retrieving mesh name from NetCDF file '"
+            << fName << "'";
+        throw IOError(msg.str());
+    }
+    string name;
+    attr.getValues(name);
+
+    // allocate mesh
+    FinleyDomain* dom = new FinleyDomain(name, numDim, mpiInfo);
+
+    // read nodes
+    NodeFile* nodes = dom->getNodes();
+    nodes->allocTable(numNodes);
+
+    try
+    {
+        // Nodes_Id
+        nc_var_temp = dataFile.getVar("Nodes_Id");
+        nc_var_temp.getVar(&nodes->Id[0]); // numNodes values read
+        // Nodes_Tag
+        nc_var_temp = dataFile.getVar("Nodes_Tag");
+        nc_var_temp.getVar(&nodes->Tag[0]);   // numNodes
+        // Nodes_gDOF
+        nc_var_temp = dataFile.getVar("Nodes_gDOF");
+        nc_var_temp.getVar(&nodes->globalDegreesOfFreedom[0]);   //numNodes
+        // Nodes_gNI
+        nc_var_temp = dataFile.getVar("Nodes_gNI");
+        nc_var_temp.getVar(&nodes->globalNodesIndex[0]); // numNodes
+        // Nodes_grDfI
+        nc_var_temp = dataFile.getVar("Nodes_grDfI");
+        nc_var_temp.getVar(&nodes->globalReducedDOFIndex[0]); // numNodes
+        // Nodes_grNI
+        nc_var_temp = dataFile.getVar("Nodes_grNI");
+        nc_var_temp.getVar(&nodes->globalReducedNodesIndex[0]);  // numNodes
+        // Nodes_Coordinates
+        nc_var_temp = dataFile.getVar("Nodes_Coordinates");
+        nc_var_temp.getVar(&nodes->Coordinates[0]); // (numNodes, numDim) 
+    }
+    catch (exceptions::NcException e)
+    {
+        cleanupAndThrow(dom, "Read vars from file");
+    }
+    nodes->updateTagList();
+
+    // read elements
+    const_ReferenceElementSet_ptr refElements(new ReferenceElementSet(
+                (ElementTypeId)Elements_TypeId, order, reduced_order));
+    ElementFile* elements = new ElementFile(refElements, mpiInfo);
+    dom->setElements(elements);
+    elements->allocTable(num_Elements);
+    elements->minColor = 0;
+    elements->maxColor = num_Elements-1;
+    if (num_Elements > 0) {
+        try
+        {
+            // Elements_Id
+            nc_var_temp = dataFile.getVar("Elements_Id");
+            nc_var_temp.getVar(&elements->Id[0]);    // num_Elements
+            // Elements_Tag
+            nc_var_temp = dataFile.getVar("Elements_Tag");
+            nc_var_temp.getVar(&elements->Tag[0]); // num_Elements
+            // Elements_Owner
+            nc_var_temp = dataFile.getVar("Elements_Owner");
+            nc_var_temp.getVar(&elements->Owner[0]);  // num_Elements
+            // Elements_Color
+            nc_var_temp = dataFile.getVar("Elements_Color");
+            nc_var_temp.getVar(&elements->Color[0]); // num_Elements
+        }
+        catch (exceptions::NcException e)
+        {
+            cleanupAndThrow(dom, "Readig element vars");            
+        }
+       // Now we need to adjust maxColor
+       index_t mc = elements->Color[0];
+       for (index_t i = 1; i < num_Elements; ++i) {
+           if (mc < elements->Color[i]) {
+               mc = elements->Color[i];
+           }
+       }
+       elements->maxColor = mc;
+       // Elements_Nodes
+       int* Elements_Nodes = new int[num_Elements*num_Elements_numNodes];       
+       try
+       {
+            nc_var_temp = dataFile.getVar("Elements_Nodes");
+            nc_var_temp.getVar(&Elements_Nodes[0]);    // (num_Elements, num_Elements_numNodes) )             
+       }
+       catch (exceptions::NcException e)
+       {
+           delete[] Elements_Nodes;
+           cleanupAndThrow(dom, "get_var(Elements_Nodes)");
+       }
+       // Copy temp array into elements->Nodes
+       for (index_t i = 0; i < num_Elements; i++) {
+           for (int j = 0; j < num_Elements_numNodes; j++) {
+               elements->Nodes[INDEX2(j,i,num_Elements_numNodes)]
+                    = Elements_Nodes[INDEX2(j,i,num_Elements_numNodes)];
+           }
+       }
+       delete[] Elements_Nodes;
+    } // num_Elements > 0
+    elements->updateTagList();
+
+    // get the face elements
+    const_ReferenceElementSet_ptr refFaceElements(
+            new ReferenceElementSet((ElementTypeId)FaceElements_TypeId,
+                order, reduced_order));
+    ElementFile* faces = new ElementFile(refFaceElements, mpiInfo);
+    dom->setFaceElements(faces);
+    faces->allocTable(num_FaceElements);
+    faces->minColor = 0;
+    faces->maxColor = num_FaceElements-1;
+    if (num_FaceElements > 0) {
+        try
+        {
+            // FaceElements_Id
+            nc_var_temp = dataFile.getVar("FaceElements_Id");
+            nc_var_temp.getVar(&faces->Id[0]); // num_FaceElements
+            // FaceElements_Tag
+            nc_var_temp = dataFile.getVar("FaceElements_Tag");
+            nc_var_temp.getVar(&faces->Tag[0]); // num_FaceElements
+            // FaceElements_Owner
+            nc_var_temp = dataFile.getVar("FaceElements_Owner");
+            nc_var_temp.getVar(&faces->Owner[0]);   // num_FaceElements
+            // FaceElements_Color
+            nc_var_temp = dataFile.getVar("FaceElements_Color");
+            nc_var_temp.getVar(&faces->Color[0]); // num_FaceElements
+        }
+        catch (exceptions::NcException e)
+        {
+            cleanupAndThrow(dom, "read face variables");
+        }
+        // Now we need to adjust maxColor
+        index_t mc = faces->Color[0];
+        for (index_t i = 1; i < num_FaceElements; ++i) {
+            if (mc < faces->Color[i]) {
+                mc = faces->Color[i];
+            }
+        }
+        faces->maxColor = mc;
+        // FaceElements_Nodes
+        int* FaceElements_Nodes = new int[num_FaceElements*num_FaceElements_numNodes];
+        try
+        {
+            nc_var_temp = dataFile.getVar("FaceElements_Nodes");
+            nc_var_temp.getVar(&(FaceElements_Nodes[0])); // num_FaceElements, num_FaceElements_numNodes) ) 
+        }
+        catch (exceptions::NcException e)
+        {
+            delete[] FaceElements_Nodes;
+            cleanupAndThrow(dom, "read face elements");
+        }
+        if ((nc_var_temp = dataFile.getVar("FaceElements_Nodes")), nc_var_temp.isNull()) {
+            delete[] FaceElements_Nodes;
+            cleanupAndThrow(dom, "get_var(FaceElements_Nodes)");
+        }
+        nc_var_temp.getVar(&(FaceElements_Nodes[0]));  // num_FaceElements, num_FaceElements_numNodes
+        // Copy temp array into faces->Nodes
+        for (index_t i = 0; i < num_FaceElements; i++) {
+            for (int j = 0; j < num_FaceElements_numNodes; j++) {
+                faces->Nodes[INDEX2(j,i,num_FaceElements_numNodes)] = FaceElements_Nodes[INDEX2(j,i,num_FaceElements_numNodes)];
+            }
+        }
+        delete[] FaceElements_Nodes;
+    } // num_FaceElements > 0
+    faces->updateTagList();
+
+    // get the Contact elements
+    const_ReferenceElementSet_ptr refContactElements(
+         new ReferenceElementSet((ElementTypeId)ContactElements_TypeId,
+             order, reduced_order));
+    ElementFile* contacts = new ElementFile(refContactElements, mpiInfo);
+    dom->setContactElements(contacts);
+    contacts->allocTable(num_ContactElements);
+    contacts->minColor = 0;
+    contacts->maxColor = num_ContactElements-1;
+    if (num_ContactElements > 0) {
+        // ContactElements_Id
+        if (( nc_var_temp = dataFile.getVar("ContactElements_Id")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(ContactElements_Id)");
+        nc_var_temp.getVar(&contacts->Id[0]);       // num_ContactElements
+        // ContactElements_Tag
+        if (( nc_var_temp = dataFile.getVar("ContactElements_Tag")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(ContactElements_Tag)");
+        nc_var_temp.getVar(&contacts->Tag[0]);  //, num_ContactElements
+        // ContactElements_Owner
+        if (( nc_var_temp = dataFile.getVar("ContactElements_Owner")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(ContactElements_Owner)");
+        nc_var_temp.getVar(&contacts->Owner[0]);    //, num_ContactElements)
+        // ContactElements_Color
+        if (( nc_var_temp = dataFile.getVar("ContactElements_Color")), nc_var_temp.isNull() )
+            cleanupAndThrow(dom, "get_var(ContactElements_Color)");
+        nc_var_temp.getVar(&contacts->Color[0]);  //, num_ContactElements
+        // Now we need to adjust maxColor
+        index_t mc = contacts->Color[0];
+        for (index_t i = 1; i < num_ContactElements; ++i) {
+            if (mc < contacts->Color[i]) {
+                mc = contacts->Color[i];
+            }
+        }
+        contacts->maxColor = mc;
+        // ContactElements_Nodes
+        int* ContactElements_Nodes = new int[num_ContactElements*num_ContactElements_numNodes];
+        if ((nc_var_temp = dataFile.getVar("ContactElements_Nodes")), nc_var_temp.isNull()) {
+            delete[] ContactElements_Nodes;
+            cleanupAndThrow(dom, "get_var(ContactElements_Nodes)");
+        }
+        nc_var_temp.getVar(&ContactElements_Nodes[0]);    // num_ContactElements, num_ContactElements_numNodes
+        // Copy temp array into contacts->Nodes
+        for (index_t i = 0; i < num_ContactElements; i++) {
+            for (int j = 0; j < num_ContactElements_numNodes; j++) {
+                contacts->Nodes[INDEX2(j,i,num_ContactElements_numNodes)] = ContactElements_Nodes[INDEX2(j,i,num_ContactElements_numNodes)];
+            }
+        }
+        delete[] ContactElements_Nodes;
+    } // num_ContactElements > 0
+    contacts->updateTagList();
+
+    // get the Points (nodal elements)
+    const_ReferenceElementSet_ptr refPoints(new ReferenceElementSet(
+                (ElementTypeId)Points_TypeId, order, reduced_order));
+    ElementFile* points = new ElementFile(refPoints, mpiInfo);
+    dom->setPoints(points);
+    points->allocTable(num_Points);
+    points->minColor = 0;
+    points->maxColor = num_Points-1;
+    if (num_Points > 0) {
+        // Points_Id
+        if (( nc_var_temp = dataFile.getVar("Points_Id")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Id)");
+        nc_var_temp.getVar(&points->Id[0]); // num_Points
+        // Points_Tag
+        if (( nc_var_temp = dataFile.getVar("Points_Tag")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Tag)");
+        nc_var_temp.getVar(&points->Tag[0]);    // num_Points
+        // Points_Owner
+        if (( nc_var_temp = dataFile.getVar("Points_Owner")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Owner)");
+        nc_var_temp.getVar(&points->Owner[0]);  // num_Points
+        // Points_Color
+        if (( nc_var_temp = dataFile.getVar("Points_Color")), nc_var_temp.isNull())
+            cleanupAndThrow(dom, "get_var(Points_Color)");
+        nc_var_temp.getVar(&points->Color[0]);  // num_Points
+        // Now we need to adjust maxColor
+        index_t mc = points->Color[0];
+        for (index_t i = 1; i < num_Points; ++i) {
+            if (mc < points->Color[i]) {
+                mc = points->Color[i];
+            }
+        }
+        points->maxColor = mc;
+        // Points_Nodes
+        int* Points_Nodes = new int[num_Points];
+        if ((nc_var_temp = dataFile.getVar("Points_Nodes")), nc_var_temp.isNull()) {
+            delete[] Points_Nodes;
+            cleanupAndThrow(dom, "get_var(Points_Nodes)");
+        }
+        nc_var_temp.getVar(&Points_Nodes[0]);  // num_Points
+        // Copy temp array into points->Nodes
+        for (index_t i = 0; i < num_Points; i++) {
+            points->Id[points->Nodes[INDEX2(0,i,1)]] = Points_Nodes[i];
+        }
+        delete[] Points_Nodes;
+    } // num_Points > 0
+    points->updateTagList();
+
+    // get the tags
+    if (num_Tags > 0) {
+        // Temp storage to gather node IDs
+        int *Tags_keys = new int[num_Tags];
+        char name_temp[4096];
+        int i;
+
+        // Tags_keys
+        if (( nc_var_temp = dataFile.getVar("Tags_keys")), nc_var_temp.isNull() ) {
+            delete[] Tags_keys;
+            cleanupAndThrow(dom, "get_var(Tags_keys)");
+        }
+        nc_var_temp.getVar(&Tags_keys[0]); // num_Tags
+        for (i=0; i<num_Tags; i++) {
+          // Retrieve tag name
+          sprintf(name_temp, "Tags_name_%d", i);
+          if ((attr=dataFile.getAtt(name_temp)), attr.isNull() ) {
+              delete[] Tags_keys;
+              stringstream msg;
+              msg << "get_att(" << name_temp << ")";
+              cleanupAndThrow(dom, msg.str());
+          }
+          std::string name;
+          attr.getValues(name);
+//           boost::scoped_array<char> name(attr->as_string(0));
+//           delete attr;
+//           dom->setTagMap(name.get(), Tags_keys[i]);
+          dom->setTagMap(name.c_str(), Tags_keys[i]);
+        }
+        delete[] Tags_keys;
+    }
+
+    // Nodes_DofDistribution
+    IndexVector first_DofComponent(mpi_size+1);
+    if ((nc_var_temp = dataFile.getVar("Nodes_DofDistribution")), nc_var_temp.isNull() ) {
+        cleanupAndThrow(dom, "get_var(Nodes_DofDistribution)");
+    }
+    nc_var_temp.getVar(&first_DofComponent[0]); // mpi_size+1
+
+    // Nodes_NodeDistribution
+    IndexVector first_NodeComponent(mpi_size+1);
+    if ((nc_var_temp = dataFile.getVar("Nodes_NodeDistribution")), nc_var_temp.isNull() ) {
+        cleanupAndThrow(dom, "get_var(Nodes_NodeDistribution)");
+    }
+    nc_var_temp.getVar(&first_NodeComponent[0]);    // mpi_size+1
+    dom->createMappings(first_DofComponent, first_NodeComponent);
+
+    return dom->getPtr();
+#else
+    throw FinleyException("loadMesh: not compiled with NetCDF. Please contact your installation manager.");
+#endif // ESYS_HAVE_NETCDF
+}
+
+
+#else
+
 Domain_ptr FinleyDomain::load(const string& fileName)
 {
 #ifdef ESYS_HAVE_NETCDF
@@ -470,6 +898,8 @@ Domain_ptr FinleyDomain::load(const string& fileName)
 #endif // ESYS_HAVE_NETCDF
 }
 
+#endif
+
 Domain_ptr readMesh_driver(const bp::list& args)
 {
     int l = len(args);
diff --git a/finley/src/DomainFactory.h b/finley/src/DomainFactory.h
index 9625ce2..0dd4833 100644
--- a/finley/src/DomainFactory.h
+++ b/finley/src/DomainFactory.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ElementFile.cpp b/finley/src/ElementFile.cpp
index 58240dd..5387383 100644
--- a/finley/src/ElementFile.cpp
+++ b/finley/src/ElementFile.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ElementFile.h b/finley/src/ElementFile.h
index acde1d5..9684675 100644
--- a/finley/src/ElementFile.h
+++ b/finley/src/ElementFile.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ElementFile_jacobians.cpp b/finley/src/ElementFile_jacobians.cpp
index 78b2744..da98ae1 100644
--- a/finley/src/ElementFile_jacobians.cpp
+++ b/finley/src/ElementFile_jacobians.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Finley.h b/finley/src/Finley.h
index 5b7973c..a3d10a5 100644
--- a/finley/src/Finley.h
+++ b/finley/src/Finley.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/FinleyDomain.cpp b/finley/src/FinleyDomain.cpp
index 977639f..e38ee55 100644
--- a/finley/src/FinleyDomain.cpp
+++ b/finley/src/FinleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -39,16 +39,32 @@ using esys_trilinos::const_TrilinosGraph_ptr;
 #include <boost/scoped_array.hpp>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
+
+
 using namespace std;
 namespace bp = boost::python;
 using escript::NotImplementedError;
 using escript::ValueError;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
+
 namespace finley {
 
+using escript::DataTypes::real_t;
+using escript::DataTypes::cplx_t;
+
 // define the static constants
 FinleyDomain::FunctionSpaceNamesMapType FinleyDomain::m_functionSpaceTypeNames;
 
@@ -190,6 +206,359 @@ void FinleyDomain::relabelElementNodes(const IndexVector& newNode, index_t offse
     m_points->relabelNodes(newNode, offset);
 }
 
+#ifdef NETCDF4
+
+void FinleyDomain::dump(const string& fileName) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    NcDim ncdims[12];
+    NcVar ids;
+    index_t* index_ptr;
+#ifdef ESYS_INDEXTYPE_LONG
+    NcType ncIdxType = ncLong;
+#else
+    NcType ncIdxType = ncInt;
+#endif
+    int num_Tags = 0;
+    int mpi_size                     = getMPISize();
+    int mpi_rank                     = getMPIRank();
+    int numDim                       = m_nodes->numDim;
+    dim_t numNodes                   = m_nodes->getNumNodes();
+    dim_t num_Elements               = m_elements->numElements;
+    dim_t num_FaceElements           = m_faceElements->numElements;
+    dim_t num_ContactElements        = m_contactElements->numElements;
+    dim_t num_Points                 = m_points->numElements;
+    int num_Elements_numNodes        = m_elements->numNodes;
+    int num_FaceElements_numNodes    = m_faceElements->numNodes;
+    int num_ContactElements_numNodes = m_contactElements->numNodes;
+#ifdef ESYS_MPI
+    MPI_Status status;
+#endif
+
+    // Incoming token indicates it's my turn to write
+#ifdef ESYS_MPI
+    if (mpi_rank > 0)
+        MPI_Recv(&num_Tags, 0, MPI_INT, mpi_rank-1, 81800, getMPIComm(), &status);
+#endif
+
+    const string newFileName(m_mpiInfo->appendRankToFileName(fileName));
+
+    // Figure out how much storage is required for tags
+    num_Tags = m_tagMap.size();
+    
+    NcFile dataFile;
+    try
+    {
+        dataFile.open(newFileName.c_str(), NcFile::FileMode::replace,   NcFile::FileFormat::classic64);
+    }
+    catch (exceptions::NcException e)
+    {
+        throw FinleyException("Error - FinleyDomain:: opening of netCDF file for output failed.");
+    }    
+    
+    
+    string msgPrefix("Error in FinleyDomain::dump: NetCDF operation failed - ");
+    // Define dimensions (num_Elements and dim_Elements are identical,
+    // dim_Elements only appears if > 0)
+    if ((ncdims[0] = dataFile.addDim("numNodes", numNodes)).isNull() )
+        throw FinleyException(msgPrefix+"add_dim(numNodes)");
+    if ((ncdims[1] = dataFile.addDim("numDim", numDim)).isNull() )
+        throw FinleyException(msgPrefix+"add_dim(numDim)");
+    if ((ncdims[2] = dataFile.addDim("mpi_size_plus_1", mpi_size+1)).isNull() )
+        throw FinleyException(msgPrefix+"add_dim(mpi_size)");
+    if (num_Elements > 0)
+        if ((ncdims[3] = dataFile.addDim("dim_Elements", num_Elements)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_Elements)");
+    if (num_FaceElements > 0)
+        if ((ncdims[4] = dataFile.addDim("dim_FaceElements", num_FaceElements)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_FaceElements)");
+    if (num_ContactElements > 0)
+        if ((ncdims[5] = dataFile.addDim("dim_ContactElements", num_ContactElements)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_ContactElements)");
+    if (num_Points > 0)
+        if ((ncdims[6] = dataFile.addDim("dim_Points", num_Points)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_Points)");
+    if (num_Elements > 0)
+        if ((ncdims[7] = dataFile.addDim("dim_Elements_Nodes", num_Elements_numNodes)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_Elements_Nodes)");
+    if (num_FaceElements > 0)
+        if ((ncdims[8] = dataFile.addDim("dim_FaceElements_numNodes", num_FaceElements_numNodes)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_FaceElements_numNodes)");
+    if (num_ContactElements > 0)
+        if ((ncdims[9] = dataFile.addDim("dim_ContactElements_numNodes", num_ContactElements_numNodes)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_ContactElements_numNodes)");
+    if (num_Tags > 0)
+        if ((ncdims[10] = dataFile.addDim("dim_Tags", num_Tags)).isNull() )
+            throw FinleyException(msgPrefix+"add_dim(dim_Tags)");
+
+    // Attributes: MPI size, MPI rank, Name, order, reduced_order
+    NcInt ni;
+    if (dataFile.putAtt("index_size", ni, (int)sizeof(index_t)).isNull())
+        throw FinleyException(msgPrefix+"putAtt(index_size)");
+    if (dataFile.putAtt("mpi_size", ni, mpi_size).isNull())
+        throw FinleyException(msgPrefix+"putAtt(mpi_size)");
+    if (dataFile.putAtt("mpi_rank", ni, mpi_rank).isNull())
+        throw FinleyException(msgPrefix+"putAtt(mpi_rank)");
+    if (dataFile.putAtt("Name", m_name).isNull())
+        throw FinleyException(msgPrefix+"putAtt(Name)");
+    if (dataFile.putAtt("numDim", ni, numDim).isNull())
+        throw FinleyException(msgPrefix+"putAtt(order)");
+    if (dataFile.putAtt("order", ni, integrationOrder).isNull())
+        throw FinleyException(msgPrefix+"putAtt(order)");
+    if (dataFile.putAtt("reduced_order", ni, reducedIntegrationOrder).isNull())
+        throw FinleyException(msgPrefix+"putAtt(reduced_order)");
+    if (dataFile.putAtt("numNodes", ni, numNodes).isNull())
+        throw FinleyException(msgPrefix+"putAtt(numNodes)");
+    if (dataFile.putAtt("num_Elements", ni, num_Elements).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_Elements)");
+    if (dataFile.putAtt("num_FaceElements", ni, num_FaceElements).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_FaceElements)");
+    if (dataFile.putAtt("num_ContactElements", ni, num_ContactElements).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_ContactElements)");
+    if (dataFile.putAtt("num_Points", ni, num_Points).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_Points)");
+    if (dataFile.putAtt("num_Elements_numNodes", ni, num_Elements_numNodes).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_Elements_numNodes)");
+    if (dataFile.putAtt("num_FaceElements_numNodes", ni, num_FaceElements_numNodes).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_FaceElements_numNodes)");
+    if (dataFile.putAtt("num_ContactElements_numNodes", ni, num_ContactElements_numNodes).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_ContactElements_numNodes)");
+    if (dataFile.putAtt("Elements_TypeId", ni, m_elements->referenceElementSet->referenceElement->Type->TypeId).isNull() )
+        throw FinleyException(msgPrefix+"putAtt(Elements_TypeId)");
+    if (dataFile.putAtt("FaceElements_TypeId", ni, m_faceElements->referenceElementSet->referenceElement->Type->TypeId).isNull() )
+        throw FinleyException(msgPrefix+"putAtt(FaceElements_TypeId)");
+    if (dataFile.putAtt("ContactElements_TypeId", ni, m_contactElements->referenceElementSet->referenceElement->Type->TypeId).isNull() )
+        throw FinleyException(msgPrefix+"putAtt(ContactElements_TypeId)");
+    if (dataFile.putAtt("Points_TypeId", ni, m_points->referenceElementSet->referenceElement->Type->TypeId).isNull() )
+        throw FinleyException(msgPrefix+"putAtt(Points_TypeId)");
+    if (dataFile.putAtt("num_Tags", ni, num_Tags).isNull())
+        throw FinleyException(msgPrefix+"putAtt(num_Tags)");
+
+    // // // // // Nodes // // // // //
+
+    // Nodes nodeDistribution
+    if ((ids = dataFile.addVar("Nodes_NodeDistribution", ncIdxType, ncdims[2])).isNull() )
+        throw FinleyException(msgPrefix+"add_var(Nodes_NodeDistribution)");
+    index_ptr = &m_nodes->nodesDistribution->first_component[0];
+    ids.putVar(index_ptr);    // don't think I need to specify bounds here but it should be mpi_size+1
+
+    // Nodes degreesOfFreedomDistribution
+    if (( ids = dataFile.addVar("Nodes_DofDistribution", ncIdxType, ncdims[2])).isNull() )
+        throw FinleyException(msgPrefix+"add_var(Nodes_DofDistribution)");
+    index_ptr = &m_nodes->degreesOfFreedomDistribution->first_component[0];
+    ids.putVar(index_ptr);    // don't think I need to specify bounds here but it should be mpi_size+1
+
+    // Only write nodes if non-empty because NetCDF doesn't like empty arrays
+    // (it treats them as NC_UNLIMITED)
+    if (numNodes > 0) {
+        // Nodes Id
+        if (( ids = dataFile.addVar("Nodes_Id", ncIdxType, ncdims[0])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_Id)");
+        ids.putVar(&m_nodes->Id[0]);    // should be numNodes values written
+
+        // Nodes Tag
+        if (( ids = dataFile.addVar("Nodes_Tag", ncInt, ncdims[0])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_Tag)");
+        ids.putVar(&m_nodes->Tag[0]);    // should be numNodes values written
+
+        // Nodes gDOF
+        if (( ids = dataFile.addVar("Nodes_gDOF", ncIdxType, ncdims[0])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_gDOF)");
+        ids.putVar(&m_nodes->globalDegreesOfFreedom[0]);  // should be numNodes values written
+
+        // Nodes global node index
+        if (( ids = dataFile.addVar("Nodes_gNI", ncIdxType, ncdims[0])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_gNI)");
+        ids.putVar(&m_nodes->globalNodesIndex[0]);     // should be numNodes values written
+
+        // Nodes grDof
+        if (( ids = dataFile.addVar("Nodes_grDfI", ncIdxType, ncdims[0])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_grDfI)");
+        ids.putVar(&m_nodes->globalReducedDOFIndex[0]);     // should be numNodes values written
+
+        // Nodes grNI
+        if (( ids = dataFile.addVar("Nodes_grNI", ncIdxType, ncdims[0])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_grNI)");
+        ids.putVar(&m_nodes->globalReducedNodesIndex[0]);     // should be numNodes values written
+
+        // Nodes Coordinates
+        vector<NcDim> ncds;
+        ncds.push_back(ncdims[0]);
+        ncds.push_back(ncdims[1]);
+        if (( ids = dataFile.addVar("Nodes_Coordinates", ncDouble, ncds)).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Nodes_Coordinates)");
+        ids.putVar(m_nodes->Coordinates);  // should be (numNodes, numDim) values written
+    }
+
+    // // // // // Elements // // // // //
+    if (num_Elements > 0) {
+        // Elements_Id
+        if (( ids = dataFile.addVar("Elements_Id", ncIdxType, ncdims[3])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Elements_Id)");
+        ids.putVar(m_elements->Id);     // write num_Elements values
+
+        // Elements_Tag
+        if (( ids = dataFile.addVar("Elements_Tag", ncInt, ncdims[3])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Elements_Tag)");
+        ids.putVar(m_elements->Tag);   // write num_Elements values
+
+        // Elements_Owner
+        if (( ids = dataFile.addVar("Elements_Owner", ncInt, ncdims[3])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Elements_Owner)");
+        ids.putVar(m_elements->Owner);    // write num_Elements values
+
+        // Elements_Color
+        if (( ids = dataFile.addVar("Elements_Color", ncInt, ncdims[3])).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Elements_Color)");
+        ids.putVar(m_elements->Color);   // write num_Elements values
+
+        // Elements_Nodes
+        vector<NcDim> dv;
+        dv.push_back(ncdims[3]);
+        dv.push_back(ncdims[7]);
+        if (( ids = dataFile.addVar("Elements_Nodes", ncIdxType, dv) ).isNull() )
+            throw FinleyException(msgPrefix+"add_var(Elements_Nodes)");
+        ids.putVar(&m_elements->Nodes[0]); //(, num_Elements, num_Elements_numNodes) values written
+    }
+
+    // // // // // Face_Elements // // // // //
+    if (num_FaceElements > 0) {
+        // FaceElements_Id
+        if ((ids = dataFile.addVar("FaceElements_Id", ncIdxType, ncdims[4])).isNull())
+            throw FinleyException(msgPrefix+"add_var(FaceElements_Id)");
+        ids.putVar(m_faceElements->Id);   // num_FaceElements values written
+
+        // FaceElements_Tag
+        if ((ids = dataFile.addVar("FaceElements_Tag", ncInt, ncdims[4])).isNull())
+            throw FinleyException(msgPrefix+"add_var(FaceElements_Tag)");
+        ids.putVar(m_faceElements->Tag);    //  num_FaceElements
+
+        // FaceElements_Owner
+        if ((ids = dataFile.addVar("FaceElements_Owner", ncInt, ncdims[4])).isNull())
+            throw FinleyException(msgPrefix+"add_var(FaceElements_Owner)");
+        ids.putVar(m_faceElements->Owner);  // num_FaceElements
+
+        // FaceElements_Color
+        if ((ids = dataFile.addVar("FaceElements_Color", ncIdxType, ncdims[4])).isNull())
+            throw FinleyException(msgPrefix+"add_var(FaceElements_Color)");
+        ids.putVar(m_faceElements->Color);    // num_FaceElements
+
+        // FaceElements_Nodes
+        vector<NcDim> dv;
+        dv.push_back(ncdims[4]);
+        dv.push_back(ncdims[8]);
+        if ((ids = dataFile.addVar("FaceElements_Nodes", ncIdxType, dv)).isNull())
+            throw FinleyException(msgPrefix+"add_var(FaceElements_Nodes)");
+        ids.putVar(m_faceElements->Nodes);  // num_FaceElements_numNodes
+
+    }
+
+    // // // // // Contact_Elements // // // // //
+    if (num_ContactElements > 0) {
+        // ContactElements_Id
+        if ((ids = dataFile.addVar("ContactElements_Id", ncIdxType, ncdims[5])).isNull())
+            throw FinleyException(msgPrefix+"add_var(ContactElements_Id)");
+        ids.putVar(m_contactElements->Id);  // num_ContactElements values written
+
+        // ContactElements_Tag
+        if ((ids = dataFile.addVar("ContactElements_Tag", ncInt, ncdims[5])).isNull())
+            throw FinleyException(msgPrefix+"add_var(ContactElements_Tag)");
+        ids.putVar(m_contactElements->Tag);   // num_ContactElements values written
+
+        // ContactElements_Owner
+        if ((ids = dataFile.addVar("ContactElements_Owner", ncInt, ncdims[5])).isNull())
+            throw FinleyException(msgPrefix+"add_var(ContactElements_Owner)");
+        ids.putVar(m_contactElements->Owner);    // num_ContactElements values written
+
+        // ContactElements_Color
+        if ((ids = dataFile.addVar("ContactElements_Color", ncInt, ncdims[5])).isNull())
+            throw FinleyException(msgPrefix+"add_var(ContactElements_Color)");
+        ids.putVar(m_contactElements->Color); // num_ContactElements values written
+
+        // ContactElements_Nodes
+        vector<NcDim> dv;
+        dv.push_back(ncdims[5]);
+        dv.push_back(ncdims[9]);
+        if ((ids = dataFile.addVar("ContactElements_Nodes", ncIdxType, dv)).isNull())
+            throw FinleyException(msgPrefix+"add_var(ContactElements_Nodes)");
+        ids.putVar(m_contactElements->Nodes); // (num_ContactElements, num_ContactElements_numNodes) values written
+    }
+
+    // // // // // Points // // // // //
+    if (num_Points > 0) {
+        // Points_Id
+        if ((ids = dataFile.addVar("Points_Id", ncIdxType, ncdims[6])).isNull())
+            throw FinleyException(msgPrefix+"add_var(Points_Id)");
+        ids.putVar(m_points->Id); // num_Points
+
+        // Points_Tag
+        if ((ids = dataFile.addVar("Points_Tag", ncInt, ncdims[6])).isNull())
+            throw FinleyException(msgPrefix+"add_var(Points_Tag)");
+        ids.putVar(m_points->Tag);    // num_Points
+
+        // Points_Owner
+        if ((ids = dataFile.addVar("Points_Owner", ncInt, ncdims[6])).isNull())
+            throw FinleyException(msgPrefix+"add_var(Points_Owner)");
+        ids.putVar(m_points->Owner);  // num_Points
+
+        // Points_Color
+        if ((ids = dataFile.addVar("Points_Color", ncIdxType, ncdims[6])).isNull())
+            throw FinleyException(msgPrefix+"add_var(Points_Color)");
+        ids.putVar(m_points->Color);  // num_Points
+
+        // Points_Nodes
+        if ((ids = dataFile.addVar("Points_Nodes", ncIdxType, ncdims[6])).isNull())
+            throw FinleyException(msgPrefix+"add_var(Points_Nodes)");
+        ids.putVar(m_points->Nodes);  // num_Points)))
+
+    }
+
+    // // // // // TagMap // // // // //
+    if (num_Tags > 0) {
+        // Temp storage to gather node IDs
+        vector<int> Tags_keys;
+
+        // Copy tag data into temp arrays
+        TagMap::const_iterator it;
+        for (it = m_tagMap.begin(); it != m_tagMap.end(); it++) {
+            Tags_keys.push_back(it->second);
+        }
+
+        // Tags_keys
+        if ((ids = dataFile.addVar("Tags_keys", ncInt, ncdims[10])).isNull())
+            throw FinleyException(msgPrefix+"add_var(Tags_keys)");
+        ids.putVar(&Tags_keys[0]);  // num_Tags
+
+        // Tags_names_*
+        // This is an array of strings, it should be stored as an array but
+        // instead I have hacked in one attribute per string because the NetCDF
+        // manual doesn't tell how to do an array of strings
+        int i = 0;
+        for (it = m_tagMap.begin(); it != m_tagMap.end(); it++, i++) {
+            stringstream ss;
+            ss << "Tags_name_" << i;
+            const string name(ss.str());
+            if (dataFile.putAtt(name.c_str(), it->first).isNull())
+                throw FinleyException(msgPrefix+"add_att(Tags_names_X)");
+        }
+    }
+
+    // Send token to next MPI process so he can take his turn
+#ifdef ESYS_MPI
+    if (mpi_rank < mpi_size-1)
+        MPI_Send(&num_Tags, 0, MPI_INT, mpi_rank+1, 81800, getMPIComm());
+#endif
+
+    // NetCDF file is closed by destructor of NcFile object
+
+#else
+    throw FinleyException("FinleyDomain::dump: not configured with netCDF. "
+                          "Please contact your installation manager.");
+#endif // ESYS_HAVE_NETCDF
+}
+
+#else
+
 void FinleyDomain::dump(const string& fileName) const
 {
 #ifdef ESYS_HAVE_NETCDF
@@ -551,6 +920,8 @@ void FinleyDomain::dump(const string& fileName) const
 #endif // ESYS_HAVE_NETCDF
 }
 
+#endif
+
 string FinleyDomain::getDescription() const
 {
     return "FinleyMesh";
@@ -890,24 +1261,39 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
                 case ReducedNodes:
                 case DegreesOfFreedom:
                 case ReducedDegreesOfFreedom:
-                    Assemble_CopyNodalData(m_nodes, target, in);
+                    if (in.isComplex())
+                        Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                    else
+                        Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                 break;
                 case Elements:
                 case ReducedElements:
-                    Assemble_interpolate(m_nodes, m_elements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_elements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_elements, in, target);
                 break;
                 case FaceElements:
                 case ReducedFaceElements:
-                    Assemble_interpolate(m_nodes, m_faceElements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_faceElements, in, target);
                 break;
                 case Points:
-                    Assemble_interpolate(m_nodes, m_points, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_points, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_points, in, target);
                 break;
                 case ContactElementsZero:
                 case ReducedContactElementsZero:
                 case ContactElementsOne:
                 case ReducedContactElementsOne:
-                    Assemble_interpolate(m_nodes, m_contactElements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_contactElements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_contactElements, in, target);
                 break;
                 default:
                     stringstream ss;
@@ -923,24 +1309,39 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
                 case ReducedNodes:
                 case DegreesOfFreedom:
                 case ReducedDegreesOfFreedom:
-                    Assemble_CopyNodalData(m_nodes, target, in);
+                    if (in.isComplex())
+                        Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                    else
+                        Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                 break;
                 case Elements:
                 case ReducedElements:
-                    Assemble_interpolate(m_nodes, m_elements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_elements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_elements, in, target);
                 break;
                 case FaceElements:
                 case ReducedFaceElements:
-                    Assemble_interpolate(m_nodes, m_faceElements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_faceElements, in, target);
                 break;
                 case Points:
-                    Assemble_interpolate(m_nodes, m_points, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_points, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_points, in, target);
                 break;
                 case ContactElementsZero:
                 case ReducedContactElementsZero:
                 case ContactElementsOne:
                 case ReducedContactElementsOne:
-                    Assemble_interpolate(m_nodes, m_contactElements, in, target);
+                    if (in.isComplex())
+                        Assemble_interpolate<cplx_t>(m_nodes, m_contactElements, in, target);
+                    else
+                        Assemble_interpolate<real_t>(m_nodes, m_contactElements, in, target);
                 break;
                 default:
                     stringstream ss;
@@ -952,16 +1353,30 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
         break;
         case Elements:
             if (target.getFunctionSpace().getTypeCode() == Elements) {
-                Assemble_CopyElementData(m_elements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_elements, target, in);
             } else if (target.getFunctionSpace().getTypeCode()==ReducedElements) {
-                Assemble_AverageElementData(m_elements, target, in);
+                if (in.isComplex())
+                    Assemble_AverageElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_AverageElementData<real_t>(m_elements, target, in);
             } else {
                 throw ValueError("No interpolation with data on elements possible.");
             }
             break;
         case ReducedElements:
             if (target.getFunctionSpace().getTypeCode() == ReducedElements) {
-                Assemble_CopyElementData(m_elements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_elements, target, in);
+            } else if (target.getFunctionSpace().getTypeCode() == Elements) {
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_elements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_elements, target, in);
             } else {
                 throw ValueError("No interpolation with data on elements "
                                  "with reduced integration order possible.");
@@ -969,16 +1384,25 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
             break;
         case FaceElements:
             if (target.getFunctionSpace().getTypeCode() == FaceElements) {
-                Assemble_CopyElementData(m_faceElements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_faceElements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_faceElements, target, in);
             } else if (target.getFunctionSpace().getTypeCode() == ReducedFaceElements) {
-                Assemble_AverageElementData(m_faceElements, target, in);
+                if (in.isComplex())
+                    Assemble_AverageElementData<cplx_t>(m_faceElements, target, in);
+                else
+                    Assemble_AverageElementData<real_t>(m_faceElements, target, in);
             } else {
                 throw ValueError("No interpolation with data on face elements possible.");
             }
             break;
         case ReducedFaceElements:
             if (target.getFunctionSpace().getTypeCode() == ReducedFaceElements) {
-                Assemble_CopyElementData(m_faceElements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_faceElements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_faceElements, target, in);
             } else {
                 throw ValueError("No interpolation with data on face "
                          "elements with reduced integration order possible.");
@@ -986,7 +1410,10 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
             break;
         case Points:
             if (target.getFunctionSpace().getTypeCode() == Points) {
-                Assemble_CopyElementData(m_points, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_points, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_points, target, in);
             } else {
                 throw ValueError("No interpolation with data on points possible.");
             }
@@ -994,9 +1421,15 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
         case ContactElementsZero:
         case ContactElementsOne:
             if (target.getFunctionSpace().getTypeCode()==ContactElementsZero || target.getFunctionSpace().getTypeCode()==ContactElementsOne) {
-                Assemble_CopyElementData(m_contactElements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_contactElements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_contactElements, target, in);
             } else if (target.getFunctionSpace().getTypeCode()==ReducedContactElementsZero || target.getFunctionSpace().getTypeCode()==ReducedContactElementsOne) {
-                Assemble_AverageElementData(m_contactElements, target, in);
+                if (in.isComplex())
+                    Assemble_AverageElementData<cplx_t>(m_contactElements, target, in);
+                else
+                    Assemble_AverageElementData<real_t>(m_contactElements, target, in);
             } else {
                 throw ValueError("No interpolation with data on contact elements possible.");
             }
@@ -1004,7 +1437,10 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
         case ReducedContactElementsZero:
         case ReducedContactElementsOne:
             if (target.getFunctionSpace().getTypeCode()==ReducedContactElementsZero || target.getFunctionSpace().getTypeCode()==ReducedContactElementsOne) {
-                Assemble_CopyElementData(m_contactElements, target, in);
+                if (in.isComplex())
+                    Assemble_CopyElementData<cplx_t>(m_contactElements, target, in);
+                else
+                    Assemble_CopyElementData<real_t>(m_contactElements, target, in);
             } else {
                 throw ValueError("No interpolation with data on contact elements with reduced integration order possible.");
             }
@@ -1013,7 +1449,10 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
             switch (target.getFunctionSpace().getTypeCode()) {
                 case ReducedDegreesOfFreedom:
                 case DegreesOfFreedom:
-                    Assemble_CopyNodalData(m_nodes, target, in);
+                    if (in.isComplex())
+                        Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                    else
+                        Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                 break;
 
                 case Nodes:
@@ -1021,34 +1460,55 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
                     if (getMPISize() > 1) {
                         escript::Data temp(in);
                         temp.expand();
-                        Assemble_CopyNodalData(m_nodes, target, temp);
+                        if (in.isComplex())
+                            Assemble_CopyNodalData<cplx_t>(m_nodes, target, temp);
+                        else
+                            Assemble_CopyNodalData<real_t>(m_nodes, target, temp);
                     } else {
-                        Assemble_CopyNodalData(m_nodes, target, in);
+                        if (in.isComplex())
+                            Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                        else
+                            Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                     }
                 break;
                 case Elements:
                 case ReducedElements:
                     if (getMPISize() > 1) {
                         escript::Data temp(in, continuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_elements, temp, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_elements, temp, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_elements, temp, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_elements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_elements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_elements, in, target);
                     }
                 break;
                 case FaceElements:
                 case ReducedFaceElements:
                     if (getMPISize() > 1) {
                         escript::Data temp(in, continuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_faceElements, temp, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, temp, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_faceElements, temp, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_faceElements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_faceElements, in, target);
                     }
                 break;
                 case Points:
                     if (getMPISize() > 1) {
                         //escript::Data temp(in, continuousFunction(*this));
                     } else {
-                        Assemble_interpolate(m_nodes, m_points, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_points, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_points, in, target);
                     }
                 break;
                 case ContactElementsZero:
@@ -1057,9 +1517,15 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
                 case ReducedContactElementsOne:
                     if (getMPISize() > 1) {
                         escript::Data temp(in, continuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_contactElements, temp, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_contactElements, temp, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_contactElements, temp, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_contactElements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_contactElements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_contactElements, in, target);
                     }
                     break;
                 default:
@@ -1078,40 +1544,67 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
                     if (getMPISize() > 1) {
                         escript::Data in2(in);
                         in2.expand();
-                        Assemble_CopyNodalData(m_nodes, target, in2);
+                        if (in.isComplex())
+                            Assemble_CopyNodalData<cplx_t>(m_nodes, target, in2);
+                        else
+                            Assemble_CopyNodalData<real_t>(m_nodes, target, in2);
                     } else {
-                        Assemble_CopyNodalData(m_nodes, target, in);
+                        if (in.isComplex())
+                            Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                        else
+                            Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                     }
                     break;
                 case DegreesOfFreedom:
                     throw ValueError("Finley does not support interpolation from reduced degrees of freedom to degrees of freedom");
                 case ReducedDegreesOfFreedom:
-                    Assemble_CopyNodalData(m_nodes, target, in);
+                    if (in.isComplex())
+                        Assemble_CopyNodalData<cplx_t>(m_nodes, target, in);
+                    else
+                        Assemble_CopyNodalData<real_t>(m_nodes, target, in);
                     break;
                 case Elements:
                 case ReducedElements:
                     if (getMPISize() > 1) {
                         escript::Data in2(in, reducedContinuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_elements, in2, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_elements, in2, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_elements, in2, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_elements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_elements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_elements, in, target);
                     }
                     break;
                 case FaceElements:
                 case ReducedFaceElements:
                     if (getMPISize() > 1) {
                         escript::Data in2(in, reducedContinuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_faceElements, in2, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in2, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_faceElements, in2, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_faceElements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_faceElements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_faceElements, in, target);
                     }
                     break;
                 case Points:
                     if (getMPISize() > 1) {
                         escript::Data in2(in, reducedContinuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_points, in2, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_points, in2, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_points, in2, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_points, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_points, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_points, in, target);
                     }
                     break;
                 case ContactElementsZero:
@@ -1120,9 +1613,15 @@ void FinleyDomain::interpolateOnDomain(escript::Data& target,
                 case ReducedContactElementsOne:
                     if (getMPISize()>1) {
                         escript::Data in2(in, reducedContinuousFunction(*this));
-                        Assemble_interpolate(m_nodes, m_contactElements, in2, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_contactElements, in2, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_contactElements, in2, target);
                     } else {
-                        Assemble_interpolate(m_nodes, m_contactElements, in, target);
+                        if (in.isComplex())
+                            Assemble_interpolate<cplx_t>(m_nodes, m_contactElements, in, target);
+                        else
+                            Assemble_interpolate<real_t>(m_nodes, m_contactElements, in, target);
                     }
                     break;
                 default:
@@ -1195,9 +1694,22 @@ void FinleyDomain::interpolateAcross(escript::Data& /*target*/,
 //
 // calculates the integral of a function defined on arg
 //
-void FinleyDomain::setToIntegrals(vector<double>& integrals,
+void FinleyDomain::setToIntegrals(vector<real_t>& integrals,
+                                  const escript::Data& arg) const
+{
+    setToIntegralsWorker<real_t>(integrals, arg);
+}
+
+void FinleyDomain::setToIntegrals(vector<cplx_t>& integrals,
                                   const escript::Data& arg) const
 {
+    setToIntegralsWorker<cplx_t>(integrals, arg);
+}
+
+template<typename Scalar>
+void FinleyDomain::setToIntegralsWorker(vector<Scalar>& integrals,
+                                        const escript::Data& arg) const
+{
     if (*arg.getFunctionSpace().getDomain() != *this)
         throw ValueError("setToIntegrals: Illegal domain of integration kernel");
 
@@ -1244,12 +1756,14 @@ void FinleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg)
         throw ValueError("setToGradient: Illegal domain of gradient argument");
     if (*grad.getFunctionSpace().getDomain() != *this)
         throw ValueError("setToGradient: Illegal domain of gradient");
+    if (grad.isComplex() != arg.isComplex())
+        throw ValueError("setToGradient: Complexity of input and output must match");
 
     escript::Data nodeData;
     if (getMPISize() > 1) {
         if (arg.getFunctionSpace().getTypeCode() == DegreesOfFreedom) {
             nodeData = escript::Data(arg, continuousFunction(*this));
-        } else if(arg.getFunctionSpace().getTypeCode() == ReducedDegreesOfFreedom) {
+        } else if (arg.getFunctionSpace().getTypeCode() == ReducedDegreesOfFreedom) {
             nodeData = escript::Data(arg, reducedContinuousFunction(*this));
         } else {
             nodeData = arg;
@@ -1264,17 +1778,26 @@ void FinleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg)
             throw ValueError("Gradient at reduced nodes is not supported.");
         case Elements:
         case ReducedElements:
-            Assemble_gradient(m_nodes, m_elements, grad, nodeData);
+            if (arg.isComplex())
+                Assemble_gradient<cplx_t>(m_nodes, m_elements, grad, nodeData);
+            else
+                Assemble_gradient<real_t>(m_nodes, m_elements, grad, nodeData);
             break;
         case FaceElements:
         case ReducedFaceElements:
-            Assemble_gradient(m_nodes, m_faceElements, grad, nodeData);
+            if (arg.isComplex())
+                Assemble_gradient<cplx_t>(m_nodes, m_faceElements, grad, nodeData);
+            else
+                Assemble_gradient<real_t>(m_nodes, m_faceElements, grad, nodeData);
             break;
         case ContactElementsZero:
         case ReducedContactElementsZero:
         case ContactElementsOne:
         case ReducedContactElementsOne:
-            Assemble_gradient(m_nodes, m_contactElements, grad, nodeData);
+            if (arg.isComplex())
+                Assemble_gradient<cplx_t>(m_nodes, m_contactElements, grad, nodeData);
+            else
+                Assemble_gradient<real_t>(m_nodes, m_contactElements, grad, nodeData);
         break;
         case Points:
             throw ValueError("Gradient at points is not supported.");
diff --git a/finley/src/FinleyDomain.h b/finley/src/FinleyDomain.h
index 445872a..7a041d4 100644
--- a/finley/src/FinleyDomain.h
+++ b/finley/src/FinleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -631,7 +631,10 @@ public:
      copies the integrals of the function defined by arg into integrals.
      arg has to be defined on this.
     */
-    virtual void setToIntegrals(std::vector<double>& integrals, const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<escript::DataTypes::real_t>& integrals,
+                                const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<escript::DataTypes::cplx_t>& integrals,
+                                const escript::Data& arg) const;
 
     /**
      \brief
@@ -834,6 +837,10 @@ private:
     /// If k is the old node, the new node is newNode[k-offset].
     void relabelElementNodes(const IndexVector& newNode, index_t offset);
 
+    template<typename Scalar>
+    void setToIntegralsWorker(std::vector<Scalar>& integrals,
+                              const escript::Data& arg) const;
+
 #ifdef ESYS_HAVE_PASO
     paso::SystemMatrixPattern_ptr makePasoPattern(bool reducedRowOrder,
                                                   bool reducedColOrder) const;
diff --git a/finley/src/FinleyException.h b/finley/src/FinleyException.h
index 8efdc39..6e735d5 100644
--- a/finley/src/FinleyException.h
+++ b/finley/src/FinleyException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/FinleyVersion.h b/finley/src/FinleyVersion.h
index a354e52..788df2c 100644
--- a/finley/src/FinleyVersion.h
+++ b/finley/src/FinleyVersion.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -18,6 +18,6 @@
 #ifndef INC_FINLEYVERSION
 #define INC_FINLEYVERSION
 
-char Finley_Version[]="$Revision: 6112 $";
+char Finley_Version[]="$Revision: 6523 $";
 
 #endif 
diff --git a/finley/src/IndexList.cpp b/finley/src/IndexList.cpp
index b9bbf53..b69710e 100644
--- a/finley/src/IndexList.cpp
+++ b/finley/src/IndexList.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/IndexList.h b/finley/src/IndexList.h
index 8cbc145..eae677f 100644
--- a/finley/src/IndexList.h
+++ b/finley/src/IndexList.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_addPoints.cpp b/finley/src/Mesh_addPoints.cpp
index 6943198..cadb700 100644
--- a/finley/src/Mesh_addPoints.cpp
+++ b/finley/src/Mesh_addPoints.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_findMatchingFaces.cpp b/finley/src/Mesh_findMatchingFaces.cpp
index 1c6862e..c56e046 100644
--- a/finley/src/Mesh_findMatchingFaces.cpp
+++ b/finley/src/Mesh_findMatchingFaces.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_getPasoPattern.cpp b/finley/src/Mesh_getPasoPattern.cpp
index 49f584c..028341c 100644
--- a/finley/src/Mesh_getPasoPattern.cpp
+++ b/finley/src/Mesh_getPasoPattern.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_getTrilinosGraph.cpp b/finley/src/Mesh_getTrilinosGraph.cpp
index aade055..36cdb5d 100644
--- a/finley/src/Mesh_getTrilinosGraph.cpp
+++ b/finley/src/Mesh_getTrilinosGraph.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_glueFaces.cpp b/finley/src/Mesh_glueFaces.cpp
index 6483723..3c13a83 100644
--- a/finley/src/Mesh_glueFaces.cpp
+++ b/finley/src/Mesh_glueFaces.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_hex20.cpp b/finley/src/Mesh_hex20.cpp
index 5fe6b93..1388b27 100644
--- a/finley/src/Mesh_hex20.cpp
+++ b/finley/src/Mesh_hex20.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_hex8.cpp b/finley/src/Mesh_hex8.cpp
index 73a758b..263d433 100644
--- a/finley/src/Mesh_hex8.cpp
+++ b/finley/src/Mesh_hex8.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_joinFaces.cpp b/finley/src/Mesh_joinFaces.cpp
index effb5f3..7020fff 100644
--- a/finley/src/Mesh_joinFaces.cpp
+++ b/finley/src/Mesh_joinFaces.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_merge.cpp b/finley/src/Mesh_merge.cpp
index 45aa489..f493b00 100644
--- a/finley/src/Mesh_merge.cpp
+++ b/finley/src/Mesh_merge.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_optimizeDOFDistribution.cpp b/finley/src/Mesh_optimizeDOFDistribution.cpp
index cfd23d9..1493fbc 100644
--- a/finley/src/Mesh_optimizeDOFDistribution.cpp
+++ b/finley/src/Mesh_optimizeDOFDistribution.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_read.cpp b/finley/src/Mesh_read.cpp
index 1054aa0..251cb71 100644
--- a/finley/src/Mesh_read.cpp
+++ b/finley/src/Mesh_read.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_readGmsh.cpp b/finley/src/Mesh_readGmsh.cpp
index 5b66d99..3eb7fe9 100644
--- a/finley/src/Mesh_readGmsh.cpp
+++ b/finley/src/Mesh_readGmsh.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_rec4.cpp b/finley/src/Mesh_rec4.cpp
index 7b26ed5..7f18da3 100644
--- a/finley/src/Mesh_rec4.cpp
+++ b/finley/src/Mesh_rec4.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_rec8.cpp b/finley/src/Mesh_rec8.cpp
index 9a42c44..b09e5ae 100644
--- a/finley/src/Mesh_rec8.cpp
+++ b/finley/src/Mesh_rec8.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Mesh_write.cpp b/finley/src/Mesh_write.cpp
index 19cc2b2..7695a54 100644
--- a/finley/src/Mesh_write.cpp
+++ b/finley/src/Mesh_write.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/NodeFile.cpp b/finley/src/NodeFile.cpp
index 541ec80..81c303d 100644
--- a/finley/src/NodeFile.cpp
+++ b/finley/src/NodeFile.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/NodeFile.h b/finley/src/NodeFile.h
index dc550eb..e386e5d 100644
--- a/finley/src/NodeFile.h
+++ b/finley/src/NodeFile.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/NodeMapping.h b/finley/src/NodeMapping.h
index 4fe7464..ae2fd28 100644
--- a/finley/src/NodeMapping.h
+++ b/finley/src/NodeMapping.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Quadrature.cpp b/finley/src/Quadrature.cpp
index 66884ee..74d1bb9 100644
--- a/finley/src/Quadrature.cpp
+++ b/finley/src/Quadrature.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Quadrature.h b/finley/src/Quadrature.h
index f55de37..5e7a1be 100644
--- a/finley/src/Quadrature.h
+++ b/finley/src/Quadrature.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ReferenceElementSets.h b/finley/src/ReferenceElementSets.h
index ac961a6..b98e48a 100644
--- a/finley/src/ReferenceElementSets.h
+++ b/finley/src/ReferenceElementSets.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ReferenceElements.cpp b/finley/src/ReferenceElements.cpp
index 64621f5..61e6711 100644
--- a/finley/src/ReferenceElements.cpp
+++ b/finley/src/ReferenceElements.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ReferenceElements.h b/finley/src/ReferenceElements.h
index 6961f33..5a791c3 100644
--- a/finley/src/ReferenceElements.h
+++ b/finley/src/ReferenceElements.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/SConscript b/finley/src/SConscript
index f209c30..da569fc 100644
--- a/finley/src/SConscript
+++ b/finley/src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/src/ShapeFunctions.cpp b/finley/src/ShapeFunctions.cpp
index cf8774e..a6ec569 100644
--- a/finley/src/ShapeFunctions.cpp
+++ b/finley/src/ShapeFunctions.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/ShapeFunctions.h b/finley/src/ShapeFunctions.h
index 136c056..71e3134 100644
--- a/finley/src/ShapeFunctions.h
+++ b/finley/src/ShapeFunctions.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/Util.cpp b/finley/src/Util.cpp
index cdf358c..5f7536b 100644
--- a/finley/src/Util.cpp
+++ b/finley/src/Util.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -84,14 +84,15 @@ void smallMatMult(int A1, int A2, double* A, int B2,
     }
 }
 
-void smallMatSetMult1(int len, int A1, int A2, double* A, int B2,
-                      const std::vector<double>& B,
-                      const std::vector<double>& C)
+template<typename Scalar>
+void smallMatSetMult1(int len, int A1, int A2, Scalar* A, int B2,
+                      const std::vector<Scalar>& B,
+                      const std::vector<real_t>& C)
 {
     for (int q = 0; q < len; q++) {
         for (int i = 0; i < A1; i++) {
             for (int j = 0; j < A2; j++) {
-                double sum = 0.;
+                Scalar sum = 0;
                 for (int s = 0; s < B2; s++)
                     sum += B[INDEX3(i,s,q,A1,B2)] * C[INDEX2(s,j,B2)];
                 A[INDEX3(i,j,q,A1,A2)] = sum;
@@ -100,6 +101,15 @@ void smallMatSetMult1(int len, int A1, int A2, double* A, int B2,
     }
 }
 
+template
+void smallMatSetMult1<real_t>(int len, int A1, int A2, real_t* A, int B2,
+                              const std::vector<real_t>& B,
+                              const std::vector<real_t>& C);
+template
+void smallMatSetMult1<cplx_t>(int len, int A1, int A2, cplx_t* A, int B2,
+                              const std::vector<cplx_t>& B,
+                              const std::vector<real_t>& C);
+
 /// inverts the set of dim x dim matrices A(:,:,1:len) with dim=1,2,3
 /// the inverse and determinant are returned.
 void invertSmallMat(int len, int dim, const double* A, double *invA, double* det)
diff --git a/finley/src/Util.h b/finley/src/Util.h
index eb939b9..c27a669 100644
--- a/finley/src/Util.h
+++ b/finley/src/Util.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -60,8 +60,9 @@ void smallMatMult(int A1, int A2, double* A, int B2,
 
 /// multiplies a set of matrices with a single matrix:
 ///   A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2) for i=1,len
-void smallMatSetMult1(int len, int A1, int A2, double* A, int B2,
-                      const std::vector<double>& B,
+template<typename Scalar>
+void smallMatSetMult1(int len, int A1, int A2, Scalar* A, int B2,
+                      const std::vector<Scalar>& B,
                       const std::vector<double>& C);
 
 void invertSmallMat(int len, int dim, const double* A, double *invA,
diff --git a/finley/src/finleycpp.cpp b/finley/src/finleycpp.cpp
index 4d54602..67e4d9a 100644
--- a/finley/src/finleycpp.cpp
+++ b/finley/src/finleycpp.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/src/generateReferenceElementList.py b/finley/src/generateReferenceElementList.py
index bf5dc04..bc2a990 100644
--- a/finley/src/generateReferenceElementList.py
+++ b/finley/src/generateReferenceElementList.py
@@ -1,6 +1,6 @@
 #*******************************************************
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/test/FinleyDomainTestCase.cpp b/finley/test/FinleyDomainTestCase.cpp
index 34a7065..ccf23ce 100644
--- a/finley/test/FinleyDomainTestCase.cpp
+++ b/finley/test/FinleyDomainTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/test/FinleyDomainTestCase.h b/finley/test/FinleyDomainTestCase.h
index 31148f9..3b69358 100644
--- a/finley/test/FinleyDomainTestCase.h
+++ b/finley/test/FinleyDomainTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/test/SConscript b/finley/test/SConscript
index a803574..48b529f 100644
--- a/finley/test/SConscript
+++ b/finley/test/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/test/finley_UnitTests.cpp b/finley/test/finley_UnitTests.cpp
index 6b247e1..ab78f67 100644
--- a/finley/test/finley_UnitTests.cpp
+++ b/finley/test/finley_UnitTests.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/finley/test/python/FCT_benchmark.py b/finley/test/python/FCT_benchmark.py
index 8eca624..e22c0fb 100755
--- a/finley/test/python/FCT_benchmark.py
+++ b/finley/test/python/FCT_benchmark.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/FCT_test0.py b/finley/test/python/FCT_test0.py
index 1dafb2d..83bfeec 100644
--- a/finley/test/python/FCT_test0.py
+++ b/finley/test/python/FCT_test0.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/FCT_test1.py b/finley/test/python/FCT_test1.py
index 33f997a..9ba4609 100644
--- a/finley/test/python/FCT_test1.py
+++ b/finley/test/python/FCT_test1.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/FCT_test2.py b/finley/test/python/FCT_test2.py
index 8a9056e..96647ac 100644
--- a/finley/test/python/FCT_test2.py
+++ b/finley/test/python/FCT_test2.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/OutTest.py b/finley/test/python/OutTest.py
index 8cbb57e..74e1336 100644
--- a/finley/test/python/OutTest.py
+++ b/finley/test/python/OutTest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/PoissonSolverTest.py b/finley/test/python/PoissonSolverTest.py
index cef6f87..ad857b8 100644
--- a/finley/test/python/PoissonSolverTest.py
+++ b/finley/test/python/PoissonSolverTest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/RT2D.py b/finley/test/python/RT2D.py
index e6d59a0..6e13fd8 100644
--- a/finley/test/python/RT2D.py
+++ b/finley/test/python/RT2D.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/test/python/RecTest.py b/finley/test/python/RecTest.py
index f418714..a58c4a0 100644
--- a/finley/test/python/RecTest.py
+++ b/finley/test/python/RecTest.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/SConscript b/finley/test/python/SConscript
index a24f2d1..2196321 100644
--- a/finley/test/python/SConscript
+++ b/finley/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/finley/test/python/axisymm-splitB.py b/finley/test/python/axisymm-splitB.py
index 03e55c9..1555ea9 100755
--- a/finley/test/python/axisymm-splitB.py
+++ b/finley/test/python/axisymm-splitB.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/blocktest.py b/finley/test/python/blocktest.py
index 5c0653f..e40cda0 100755
--- a/finley/test/python/blocktest.py
+++ b/finley/test/python/blocktest.py
@@ -12,7 +12,7 @@
 #
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -27,7 +27,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/brick.py b/finley/test/python/brick.py
index b5c6172..e3ab528 100644
--- a/finley/test/python/brick.py
+++ b/finley/test/python/brick.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/coalgas.py b/finley/test/python/coalgas.py
index d0e8b9d..a969f90 100755
--- a/finley/test/python/coalgas.py
+++ b/finley/test/python/coalgas.py
@@ -1,6 +1,6 @@
 ######################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ Gas in Coal Seam (fully coupled version)
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/convection.py b/finley/test/python/convection.py
index 00b9359..ee59c04 100644
--- a/finley/test/python/convection.py
+++ b/finley/test/python/convection.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -21,7 +21,7 @@ It is solved in dimensionless form
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/damage.py b/finley/test/python/damage.py
index c083a73..5e1be4e 100644
--- a/finley/test/python/damage.py
+++ b/finley/test/python/damage.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ Damage mechanics
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/generate_dumps.py b/finley/test/python/generate_dumps.py
index 32b4ca7..5abf9be 100644
--- a/finley/test/python/generate_dumps.py
+++ b/finley/test/python/generate_dumps.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/generate_meshes.py b/finley/test/python/generate_meshes.py
index 2f43f3d..817bf46 100644
--- a/finley/test/python/generate_meshes.py
+++ b/finley/test/python/generate_meshes.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/linearElastic.py b/finley/test/python/linearElastic.py
index e935bcc..1c7ff65 100755
--- a/finley/test/python/linearElastic.py
+++ b/finley/test/python/linearElastic.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/localization.py b/finley/test/python/localization.py
index 9eb8cfc..281067a 100644
--- a/finley/test/python/localization.py
+++ b/finley/test/python/localization.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -21,7 +21,7 @@ viscous and plastic layer to trigger localization.
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/lumping_advection_test.py b/finley/test/python/lumping_advection_test.py
index cca5907..2c8e041 100755
--- a/finley/test/python/lumping_advection_test.py
+++ b/finley/test/python/lumping_advection_test.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -23,7 +23,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/lumping_wave_test.py b/finley/test/python/lumping_wave_test.py
index f920516..0df8246 100755
--- a/finley/test/python/lumping_wave_test.py
+++ b/finley/test/python/lumping_wave_test.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -20,7 +20,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/rayleigh_taylor_instabilty.py b/finley/test/python/rayleigh_taylor_instabilty.py
index 6ac9a73..884552f 100644
--- a/finley/test/python/rayleigh_taylor_instabilty.py
+++ b/finley/test/python/rayleigh_taylor_instabilty.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/rectangle.py b/finley/test/python/rectangle.py
index 44230af..3959c8d 100644
--- a/finley/test/python/rectangle.py
+++ b/finley/test/python/rectangle.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_amg.py b/finley/test/python/run_amg.py
index ebcb889..b5bafd6 100644
--- a/finley/test/python/run_amg.py
+++ b/finley/test/python/run_amg.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_darcy.py b/finley/test/python/run_darcy.py
index 29e82c4..6bccc2b 100644
--- a/finley/test/python/run_darcy.py
+++ b/finley/test/python/run_darcy.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_escriptOnFinley.py b/finley/test/python/run_escriptOnFinley.py
index f60905b..a0d8d1f 100644
--- a/finley/test/python/run_escriptOnFinley.py
+++ b/finley/test/python/run_escriptOnFinley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_generators.py b/finley/test/python/run_generators.py
index c89cc86..c7193ef 100644
--- a/finley/test/python/run_generators.py
+++ b/finley/test/python/run_generators.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_inputOutput.py b/finley/test/python/run_inputOutput.py
index bfc569c..bac1122 100644
--- a/finley/test/python/run_inputOutput.py
+++ b/finley/test/python/run_inputOutput.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_linearPDEsOnFinley1_2D1.py b/finley/test/python/run_linearPDEsOnFinley1_2D1.py
index 5653a6e..a544db2 100644
--- a/finley/test/python/run_linearPDEsOnFinley1_2D1.py
+++ b/finley/test/python/run_linearPDEsOnFinley1_2D1.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinley1_2D2.py b/finley/test/python/run_linearPDEsOnFinley1_2D2.py
index 1a3d3f8..bba8b8c 100644
--- a/finley/test/python/run_linearPDEsOnFinley1_2D2.py
+++ b/finley/test/python/run_linearPDEsOnFinley1_2D2.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D1.py b/finley/test/python/run_linearPDEsOnFinley1_3D1.py
index fca10c9..d12895c 100644
--- a/finley/test/python/run_linearPDEsOnFinley1_3D1.py
+++ b/finley/test/python/run_linearPDEsOnFinley1_3D1.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D2_part1.py b/finley/test/python/run_linearPDEsOnFinley1_3D2_part1.py
index beb5cbd..3df5913 100644
--- a/finley/test/python/run_linearPDEsOnFinley1_3D2_part1.py
+++ b/finley/test/python/run_linearPDEsOnFinley1_3D2_part1.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D2_part2.py b/finley/test/python/run_linearPDEsOnFinley1_3D2_part2.py
index 4d0472a..665fc34 100644
--- a/finley/test/python/run_linearPDEsOnFinley1_3D2_part2.py
+++ b/finley/test/python/run_linearPDEsOnFinley1_3D2_part2.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-2.py b/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-2.py
deleted file mode 100644
index 1a348f4..0000000
--- a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-2.py
+++ /dev/null
@@ -1,48 +0,0 @@
-
-########################################################
-#
-# Copyright (c) 2003-2016 by The University of Queensland
-# Earth Systems Science Computational Center (ESSCC)
-# 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
-#
-########################################################
-
-from __future__ import print_function, division
-
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
-Earth Systems Science Computational Center (ESSCC)
-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"
-
-"""
-Test suite for the linearPDE and pdetools test on finley
-"""
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-from esys.escriptcore.testing import *
-from test_assemblage_3Do2 import Test_assemblage_3Do2_cont
-from esys.finley import Brick
-
-NE=10 # number of element in each spatial direction (must be even)
-
-class Test_AssemblageOnFinleyHex3DOrder2_part3_2(Test_assemblage_3Do2_cont):
-   RES_TOL=1.e-7
-   ABS_TOL=1.e-8
-   def setUp(self):
-        self.domain = Brick(NE,NE,NE,2)
-        self.order = 2
-   def tearDown(self):
-        del self.domain
-
-if __name__ == '__main__':
-    run_tests(__name__, exit_on_failure=True)
-
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-3.py b/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-3.py
deleted file mode 100644
index 55ad7b5..0000000
--- a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-3.py
+++ /dev/null
@@ -1,48 +0,0 @@
-
-########################################################
-#
-# Copyright (c) 2003-2016 by The University of Queensland
-# Earth Systems Science Computational Center (ESSCC)
-# 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
-#
-########################################################
-
-from __future__ import print_function, division
-
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
-Earth Systems Science Computational Center (ESSCC)
-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"
-
-"""
-Test suite for the linearPDE and pdetools test on finley
-"""
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-from esys.escriptcore.testing import *
-from test_assemblage_3Do2 import Test_assemblage_3Do2_cont2
-from esys.finley import Brick
-
-NE=10 # number of element in each spatial direction (must be even)
-
-class Test_AssemblageOnFinleyHex3DOrder2_part3_3(Test_assemblage_3Do2_cont2):
-   RES_TOL=1.e-7
-   ABS_TOL=1.e-8
-   def setUp(self):
-        self.domain = Brick(NE,NE,NE,2)
-        self.order = 2
-   def tearDown(self):
-        del self.domain
-
-if __name__ == '__main__':
-    run_tests(__name__, exit_on_failure=True)
-
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-4.py b/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-4.py
deleted file mode 100644
index e6443c3..0000000
--- a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-4.py
+++ /dev/null
@@ -1,48 +0,0 @@
-
-########################################################
-#
-# Copyright (c) 2003-2016 by The University of Queensland
-# Earth Systems Science Computational Center (ESSCC)
-# 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
-#
-########################################################
-
-from __future__ import print_function, division
-
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
-Earth Systems Science Computational Center (ESSCC)
-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"
-
-"""
-Test suite for the linearPDE and pdetools test on finley
-"""
-
-__author__="Lutz Gross, l.gross at uq.edu.au"
-
-import esys.escriptcore.utestselect as unittest
-from esys.escriptcore.testing import *
-from test_assemblage_3Do2 import Test_assemblage_3Do2_cont3 
-from esys.finley import Brick
-
-NE=10 # number of element in each spatial direction (must be even)
-
-class Test_AssemblageOnFinleyHex3DOrder2_part3_4(Test_assemblage_3Do2_cont3):
-   RES_TOL=1.e-7
-   ABS_TOL=1.e-8
-   def setUp(self):
-        self.domain = Brick(NE,NE,NE,2)
-        self.order = 2
-   def tearDown(self):
-        del self.domain
-
-if __name__ == '__main__':
-    run_tests(__name__, exit_on_failure=True)
-
diff --git a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-1.py b/finley/test/python/run_linearPDEsOnFinley1_3D2_part3.py
similarity index 80%
rename from finley/test/python/run_linearPDEsOnFinley1_3D2_part3-1.py
rename to finley/test/python/run_linearPDEsOnFinley1_3D2_part3.py
index 714e4d9..d1b6151 100644
--- a/finley/test/python/run_linearPDEsOnFinley1_3D2_part3-1.py
+++ b/finley/test/python/run_linearPDEsOnFinley1_3D2_part3.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
@@ -29,12 +29,12 @@ __author__="Lutz Gross, l.gross at uq.edu.au"
 
 import esys.escriptcore.utestselect as unittest
 from esys.escriptcore.testing import *
-from test_assemblage_3Do2 import Test_assemblage_3Do2
+from test_assemblage import Test_assemblage_3Do2
 from esys.finley import Brick
 
 NE=10 # number of element in each spatial direction (must be even)
 
-class Test_AssemblageOnFinleyHex3DOrder2_part3_1(Test_assemblage_3Do2):
+class Test_AssemblageOnFinleyHex3DOrder2(Test_assemblage_3Do2):
    RES_TOL=1.e-7
    ABS_TOL=1.e-8
    def setUp(self):
diff --git a/finley/test/python/run_linearPDEsOnFinley2.py b/finley/test/python/run_linearPDEsOnFinley2.py
index abb3db1..5be6dd3 100644
--- a/finley/test/python/run_linearPDEsOnFinley2.py
+++ b/finley/test/python/run_linearPDEsOnFinley2.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinley3.py b/finley/test/python/run_linearPDEsOnFinley3.py
index b19359a..49c53e1 100644
--- a/finley/test/python/run_linearPDEsOnFinley3.py
+++ b/finley/test/python/run_linearPDEsOnFinley3.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_linearPDEsOnFinleyMacro.py b/finley/test/python/run_linearPDEsOnFinleyMacro.py
index 7e673e7..06ea7d2 100644
--- a/finley/test/python/run_linearPDEsOnFinleyMacro.py
+++ b/finley/test/python/run_linearPDEsOnFinleyMacro.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_models.py b/finley/test/python/run_models.py
index 65cad11..328c43c 100644
--- a/finley/test/python/run_models.py
+++ b/finley/test/python/run_models.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_nonlinearPDEsOnFinley.py b/finley/test/python/run_nonlinearPDEsOnFinley.py
index ddd5cb6..e2b8874 100644
--- a/finley/test/python/run_nonlinearPDEsOnFinley.py
+++ b/finley/test/python/run_nonlinearPDEsOnFinley.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/finley/test/python/run_pasoSolversOnFinley.py b/finley/test/python/run_pasoSolversOnFinley.py
index af6d2cc..853917e 100644
--- a/finley/test/python/run_pasoSolversOnFinley.py
+++ b/finley/test/python/run_pasoSolversOnFinley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_splitworldOnFinley.py b/finley/test/python/run_splitworldOnFinley.py
index 698419a..6e4ec0d 100644
--- a/finley/test/python/run_splitworldOnFinley.py
+++ b/finley/test/python/run_splitworldOnFinley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c)2015-2016 by The University of Queensland
+__copyright__="""Copyright (c)2015-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/run_trilinosSolversOnFinley.py b/finley/test/python/run_trilinosSolversOnFinley.py
index 0a34eae..cdc6736 100644
--- a/finley/test/python/run_trilinosSolversOnFinley.py
+++ b/finley/test/python/run_trilinosSolversOnFinley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Open Software License version 3.0
diff --git a/finley/test/python/run_utilOnFinley.py b/finley/test/python/run_utilOnFinley.py
index 0e76a48..5a8a762 100644
--- a/finley/test/python/run_utilOnFinley.py
+++ b/finley/test/python/run_utilOnFinley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/runcoalgas.py b/finley/test/python/runcoalgas.py
index 067cf85..7ea8558 100755
--- a/finley/test/python/runcoalgas.py
+++ b/finley/test/python/runcoalgas.py
@@ -1,6 +1,6 @@
 #######################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -18,7 +18,7 @@ Coal Seam gasL ECLIPSE test case
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/seismic_wave.py b/finley/test/python/seismic_wave.py
index 099f086..d109208 100644
--- a/finley/test/python/seismic_wave.py
+++ b/finley/test/python/seismic_wave.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/slip_stress_mesh_old.py b/finley/test/python/slip_stress_mesh_old.py
index 2b7b975..7ddab26 100644
--- a/finley/test/python/slip_stress_mesh_old.py
+++ b/finley/test/python/slip_stress_mesh_old.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/slip_stress_old.py b/finley/test/python/slip_stress_old.py
index 308ab7b..fb945e9 100644
--- a/finley/test/python/slip_stress_old.py
+++ b/finley/test/python/slip_stress_old.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/stokes_problems.py b/finley/test/python/stokes_problems.py
index 1b14a89..4f62a11 100644
--- a/finley/test/python/stokes_problems.py
+++ b/finley/test/python/stokes_problems.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/subduction1.py b/finley/test/python/subduction1.py
index af4c42d..c9e0c86 100644
--- a/finley/test/python/subduction1.py
+++ b/finley/test/python/subduction1.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/subduction1_gen.py b/finley/test/python/subduction1_gen.py
index f72cf33..99e7546 100644
--- a/finley/test/python/subduction1_gen.py
+++ b/finley/test/python/subduction1_gen.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/time_chunks.py b/finley/test/python/time_chunks.py
index 50d5646..b67c026 100644
--- a/finley/test/python/time_chunks.py
+++ b/finley/test/python/time_chunks.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/finley/test/python/tp.py b/finley/test/python/tp.py
index d7bebd6..b2cb396 100644
--- a/finley/test/python/tp.py
+++ b/finley/test/python/tp.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/debian/changelog b/localdebian/changelog
similarity index 60%
copy from debian/changelog
copy to localdebian/changelog
index db44cf7..ff26094 100644
--- a/debian/changelog
+++ b/localdebian/changelog
@@ -1,58 +1,9 @@
-python-escript (5.0-4) unstable; urgency=medium
+python-escript (4.9-1) unstable; urgency=medium
 
   [ Joel Fenwick ]
-  * [6f58a7e] Add sphinx-common to -doc dependencies. (Closes: #861023)
+  * preparing for release
 
-  [ Anton Gladky ]
-  * [8713dfa] Replace latex-xcolor by texlive-latex-recommended. (Closes: #865245)
-  * [7ebf074] Use compat level 10.
-  * [70044aa] Set the highest level of hardening.
-
- -- Anton Gladky <gladk at debian.org>  Mon, 03 Jul 2017 22:02:53 +0200
-
-python-escript (5.0-3) unstable; urgency=medium
-
-  [ Paul Dreik ]
-  * [b33279b] Fix FTBFS due to unused variables. (Closes: #860604)
-
- -- Anton Gladky <gladk at debian.org>  Wed, 19 Apr 2017 13:37:17 +0200
-
-python-escript (5.0-2) unstable; urgency=medium
-
-  [ Joel Fenwick ]
-  * [a75d1b9] Fix moved openmpi lib problem (Closes: #848787)
-
-  [ Anton Gladky ]
-  * [b80952a] Apply cme fix dpkg.
-
- -- Anton Gladky <gladk at debian.org>  Thu, 05 Jan 2017 22:34:39 +0100
-
-python-escript (5.0-1) unstable; urgency=medium
-
-  * New version upload
-
- -- Joel Fenwick <j.oelpublic at gmail.com>  Mon, 19 Sep 2016 12:44:21 +1000
-
-python-escript (4.2.0.1-4) unstable; urgency=medium
-
-  [ Joel Fenwick ]
-  * [96dc875] Protect against g++-6 (Closes: #831149)
-
- -- Anton Gladky <gladk at debian.org>  Thu, 11 Aug 2016 20:05:23 +0200
-
-python-escript (4.2.0.1-3) unstable; urgency=medium
-
-  [ Joel Fenwick ]
-  * [462f3cc] Fix missing dep on python-numpy by python-escript-mpi
-  * [295d646] Fix missing debug syms (and always build for sid options)
-  * [73c3165] Allow extraction of tests from src tree
-  * [ce27363] Fix py3clean issues, piuparts failure. (Closes: #826105, #826070)
-
-  [ Anton Gladky ]
-  * [2a88e77] Apply cme fix dpkg.
-  * [e0c742a] Add VCS-fields.
-
- -- Anton Gladky <gladk at debian.org>  Tue, 21 Jun 2016 23:02:46 +0200
+ -- Joel Fenwick <j.oelpublic at gmail.com>  Mon, 04 Apr 2016 10:49:00 +1000
 
 python-escript (4.2.0.1-2) unstable; urgency=medium
 
diff --git a/localdebian/changelog.trivial b/localdebian/changelog.trivial
new file mode 100644
index 0000000..01a5d19
--- /dev/null
+++ b/localdebian/changelog.trivial
@@ -0,0 +1 @@
+For information on changes between versions, see /usr/share/doc/python-escript-doc/user.pdf in the python-escript-doc package.
diff --git a/localdebian/compat b/localdebian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/localdebian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/localdebian/control
similarity index 96%
copy from debian/control
copy to localdebian/control
index 32cf52e..37c94c4 100644
--- a/debian/control
+++ b/localdebian/control
@@ -19,15 +19,14 @@ Build-Depends: python-all-dev,
                texlive,
                ghostscript,
                texlive-latex-extra,
-               texlive-latex-recommended,
+               latex-xcolor,
                lsb-release,
                libopenmpi-dev,
                openmpi-bin,
-               debhelper (>= 10),
-               dh-python
+               debhelper (>= 9),
+               dh-python,
+               libsuitesparse-dev
 Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/python-escript.git
-Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/python-escript.git
 Homepage: https://launchpad.net/escript-finley
 X-Python-Version: >=2.7
 X-Python3-Version: >=3.2
diff --git a/debian/copyright b/localdebian/copyright
similarity index 70%
copy from debian/copyright
copy to localdebian/copyright
index de62bf9..d4ce19d 100644
--- a/debian/copyright
+++ b/localdebian/copyright
@@ -1,11 +1,36 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
 Upstream-Name: esys-escript
 Source: https://launchpad.net/escript-finley
 Files-Excluded: debian
 
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the complete text of the Apache version 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
+
+License: Expat
+ The MIT License (MIT)
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
 Files: *
 Copyright: 2003-2016 The University of Queensland
-License: ASL-2.0
+License: Apache-2.0
 
 Files: debian/*
 Copyright: 2016 The University of Queensland
@@ -13,11 +38,11 @@ License: Expat
 
 Files: cusplibrary/*
 Copyright: NVIDIA Corporation
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/complex.h
 Copyright: NVIDIA Corporation, The Regents of the University of California, The University of Queensland
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/array2d.h
  cusplibrary/cusp/detail/multiply.inl
@@ -38,7 +63,7 @@ Files: cusplibrary/cusp/array2d.h
  cusplibrary/cusp/dia_matrix.h
  cusplibrary/cusp/monitor.h
 Copyright: NVIDIA Corporation, The University of Queensland
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/opengl/spy/spy.h
  cusplibrary/cusp/opengl/spy/detail/gl_util.inl
@@ -47,7 +72,7 @@ Files: cusplibrary/cusp/opengl/spy/spy.h
  cusplibrary/cusp/opengl/spy/gl_util.h
  cusplibrary/cusp/opengl/spy/colormaps.h
 Copyright: Steven Dalton
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/opengl/spy/detail/matrix_canvas_svg_output.inl
  cusplibrary/cusp/opengl/spy/detail/matrix_data_cursor.inl
@@ -56,21 +81,21 @@ Files: cusplibrary/cusp/opengl/spy/detail/matrix_canvas_svg_output.inl
  cusplibrary/cusp/opengl/spy/matrix_data_panel.h
  cusplibrary/cusp/opengl/spy/matrix_data_cursor.h
 Copyright: Steven Dalton, Stanford University
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/opengl/spy/glext.h
 Copyright: Steven Dalton, Silicon Graphics, Inc
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/krylov/detail/gmres.inl
  cusplibrary/cusp/krylov/gmres.h
 Copyright: The Regents of the University of California
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/cusp/krylov/detail/lsqr.inl
  cusplibrary/cusp/krylov/lsqr.h
 Copyright: The Regents of the University of California, The University of Queensland
-License: ASL-2.0
+License: Apache-2.0
 
 Files: cusplibrary/examples/Algorithms/transposed_spmv.cu
  cusplibrary/cusp/krylov/detail/cgls.inl
@@ -86,55 +111,5 @@ Files: cusplibrary/examples/Algorithms/transposed_spmv.cu
  cusplibrary/cusp/detail/device/transposed_spmv/dia.h
  cusplibrary/cusp/cds_matrix.h
 Copyright: The University of Queensland
-License: ASL-2.0
-
-Files: doc/user/listings.cfg
-Copyright: 1996 - 2003 Carsten Heinz and/or any other author listed elsewhere in this file.
-License: LPPL-1.0+
- This file is distributed under the terms of the LaTeX Project Public
- License from CTAN archives in directory  macros/latex/base/lppl.txt.
- Either version 1.0 or, at your option, any later version.
- .
- This file is completely free and comes without any warranty.
- .
- You may obtain a copy of the License at
- .
- https://latex-project.org/lppl/lppl-1-0.txt
-
-License: ASL-2.0
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- .
- http://www.apache.org/licenses/LICENSE-2.0
- .
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- .
- On Debian systems, the complete text of the Apache version 2.0 license
- can be found in "/usr/share/common-licenses/Apache-2.0".
+License: Apache-2.0
 
-License: Expat
- Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
- .
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
- .
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/localdebian/patches/dateless-gz b/localdebian/patches/dateless-gz
new file mode 100644
index 0000000..1fd9fc4
--- /dev/null
+++ b/localdebian/patches/dateless-gz
@@ -0,0 +1,23 @@
+Description: Prevent gzip of examples from including timestamps.
+  Addresses lintian warning.
+Author: Joel Fenwick <joelfenwick at uq.edu.au>
+Forwarded: yes
+Applied-Upstream: yes
+
+--- a/doc/SConscript
++++ b/doc/SConscript
+@@ -199,9 +199,11 @@ zip_path=os.path.join(release_dir, 'escr
+ zip = local_env.Command(zip_path, None, dir_cmd+"zip "+zip_path+" "+" ".join(ex2))
+ env.Alias('examples_zipfile', zip)
+ 
+-tar_path=os.path.join(release_dir, 'escript_examples.tar.gz')
+-tar = local_env.Command(tar_path, None, dir_cmd+"tar -czf "+tar_path+" "+" ".join(ex2))
+-env.Alias('examples_tarfile', tar)
++tar_path=os.path.join(release_dir, 'escript_examples.tar')
++targz_path=os.path.join(release_dir, 'escript_examples.tar.gz')
++tar = local_env.Command(tar_path, None, dir_cmd+"tar -cf "+tar_path+" "+" ".join(ex2))
++targz = local_env.Command(targz_path, tar, "gzip -n -9 "+tar_path)
++env.Alias('examples_tarfile', targz)
+ 
+ #env=Environment(TARFLAGS = "-c -z",chdir=src_dir)
+ #if 'Tar' in dir(env):
diff --git a/localdebian/patches/doxygenfix b/localdebian/patches/doxygenfix
new file mode 100644
index 0000000..000ce5b
--- /dev/null
+++ b/localdebian/patches/doxygenfix
@@ -0,0 +1,19 @@
+Description: Don't specify a font in doxygen.
+  The doxyfile specified a font which is no longer shipped.
+  Since we don't really care which font is used this has been
+  removed. 
+Author: Joel Fenwick <joelfenwick at uq.edu.au>
+Forwarded: yes
+Applied-Upstream: yes
+
+--- a/doc/doxygen/doxygen_esys
++++ b/doc/doxygen/doxygen_esys
+@@ -2120,7 +2120,7 @@ DOT_NUM_THREADS        = 0
+ # The default value is: Helvetica.
+ # This tag requires that the tag HAVE_DOT is set to YES.
+ 
+-DOT_FONTNAME           = FreeSans
++#DOT_FONTNAME           = FreeSans
+ 
+ # The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+ # dot graphs.
diff --git a/localdebian/patches/grammar-errors b/localdebian/patches/grammar-errors
new file mode 100644
index 0000000..a951803
--- /dev/null
+++ b/localdebian/patches/grammar-errors
@@ -0,0 +1,36 @@
+Description: Fixed some grammar errors.
+Author: Joel Fenwick <joelfenwick at uq.edu.au>
+Forwarded: yes
+Applied-Upstream: yes
+
+--- a/escriptcore/py_src/rheologies.py
++++ b/escriptcore/py_src/rheologies.py
+@@ -60,7 +60,7 @@ class PowerLaw(object):
+    
+          :param numMaterials: number of materials
+          :type numMaterials: ``int``
+-         :param verbose: if ``True`` some informations are printed.
++         :param verbose: if ``True`` some information is printed.
+          :type verbose: ``bool``
+          """
+          if numMaterials<1:
+@@ -623,7 +623,7 @@ class IncompressibleIsotropicFlowCartesi
+          :type t: ``float``
+          :param numMaterials: number of materials
+          :type numMaterials: ``int``
+-         :param verbose: if ``True`` some informations are printed.
++         :param verbose: if ``True`` some information is printed.
+          :type verbose: ``bool``         
+          """
+          PowerLaw. __init__(self, numMaterials,verbose=verbose)
+--- a/escriptcore/src/escriptcpp.cpp
++++ b/escriptcore/src/escriptcpp.cpp
+@@ -1017,7 +1017,7 @@ args("source", "q", "r","factor"),
+         "'residual_norm', 'converged'.\n"
+         ":param value: new value of the diagnostic information\n"
+         ":note: this function is used by a solver to report diagnostics\n"
+-        "informations.")
++        "information.")
+     .def("getDiagnostics", &escript::SolverBuddy::getDiagnostics, args("name"),"Returns the diagnostic information ``name``. Possible values are:\n\n"
+         "- 'num_iter': the number of iteration steps\n"
+         "- 'cum_num_iter': the cumulative number of iteration steps\n"
diff --git a/localdebian/patches/mpi-gaol b/localdebian/patches/mpi-gaol
new file mode 100644
index 0000000..49b426c
--- /dev/null
+++ b/localdebian/patches/mpi-gaol
@@ -0,0 +1,33 @@
+Description: Enable escript launcher to run in a gaol.
+Author: Joel Fenwick <joelfenwick at uq.edu.au>
+Forwarded: yes
+Applied-Upstream: yes
+
+--- a/SConstruct
++++ b/SConstruct
+@@ -370,7 +370,7 @@ if env['launcher'] == 'default':
+     if env['mpi'] == 'INTELMPI':
+         env['launcher'] = "mpirun -hostfile %f -n %N -ppn %p %b"
+     elif env['mpi'] == 'OPENMPI':
+-        env['launcher'] = "mpirun --gmca mpi_warn_on_fork 0 ${EE} --host %h -bynode -bind-to-core --cpus-per-rank %t -np %N %b"
++        env['launcher'] = "mpirun ${AGENTOVERRIDE} --gmca mpi_warn_on_fork 0 ${EE} --host %h -bynode -bind-to-core --cpus-per-rank %t -np %N %b"
+     elif env['mpi'] == 'MPT':
+         env['launcher'] = "mpirun %h -np %p %b"
+     elif env['mpi'] == 'MPICH':
+--- a/run-escript.in
++++ b/run-escript.in
+@@ -467,6 +467,14 @@ then
+    EXPORT_ENV="$EXPORT_ENV,OMP_NUM_THREADS"
+ fi
+ 
++if [ "$MPI_FLAVOUR" = "OPENMPI" ]
++then
++    if [ -z `which rsh``which ssh` ]
++    then
++        AGENTOVERRIDE="--gmca orte_rsh_agent /bin/false"
++    fi
++fi 
++
+ vlog "Pre-launch command: \"@@PRELAUNCH\""
+ @@PRELAUNCH
+ vlog "Launch command: \"@@LAUNCH\""
diff --git a/localdebian/patches/release-sanity b/localdebian/patches/release-sanity
new file mode 100644
index 0000000..336c17c
--- /dev/null
+++ b/localdebian/patches/release-sanity
@@ -0,0 +1,69 @@
+Description: Added a basic sanity check to the scons file.
+Author: Joel Fenwick <joelfenwick at uq.edu.au>
+Forwarded: yes
+Applied-Upstream: yes
+--- a/SConstruct
++++ b/SConstruct
+@@ -683,10 +683,30 @@ install_all_list += ['install_modellib_p
+ install_all_list += ['install_pycad_py']
+ if env['usempi']:
+     install_all_list += ['install_pythonMPI', 'install_overlord']
+-env.Alias('install_all', install_all_list)
++install_all_list += ['install_weipa_py']    
++install_all_list += [env.Install(os.path.join(env['build_dir'],'scripts'), os.path.join('scripts', 'release_sanity.py'))]
++install_all=env.Alias('install_all', install_all_list)
+ 
+ # Default target is install
+-env.Default('install_all')
++#env.Default('install_all')
++
++
++sanity=env.Alias('sanity', env.Command('dummy','',os.path.join(env['prefix'], 'bin', 'run-escript')+' '+os.path.join(env['build_dir'],'scripts', 'release_sanity.py')))
++env.Depends('dummy', install_all)
++if env['usempi']:
++   #env.Requires('dummy', ['build_pythonMPI', 'install_pythonMPI'])
++   #env.Requires('dummy', env['prefix']+"/lib/pythonMPI")
++   env.Depends('dummy', ['build_pythonMPI', 'install_pythonMPI'])
++   env.Depends('dummy', env['prefix']+"/lib/pythonMPI")   
++
++if 'install_dudley' in install_all_list and \
++   'install_finley' in install_all_list and \
++   'install_ripley' in install_all_list and \
++   'install_speckley' in install_all_list:
++       env.AlwaysBuild('sanity')
++       env.Default('sanity')
++else:
++    env.Default('install_all')
+ 
+ ################## Targets to build and run the test suite ###################
+ 
+--- /dev/null
++++ b/scripts/release_sanity.py
+@@ -0,0 +1,27 @@
++
++# Very basic sanity checks following a build
++# It is important that this script does not create any files unless
++# it is _certain_ they are removed when finished or failed.
++# We do not want the source directory polluted by actions here
++
++
++from esys.escript import *
++from esys.escript.linearPDEs import Poisson
++import esys.ripley as ripley
++import esys.finley as finley
++import esys.speckley as speckley
++from esys.weipa import saveVTK
++
++mydomain = finley.Rectangle(l0=1.,l1=1.,n0=40, n1=20)
++# define characteristic function of Gamma^D
++x = mydomain.getX()
++gammaD = whereZero(x[0])+whereZero(x[1])
++# define PDE and get its solution u
++mypde = Poisson(domain=mydomain)
++mypde.setValue(f=1,q=gammaD)
++u = mypde.getSolution()
++# write u to an external file  
++#saveVTK("u.vtu",sol=u)
++
++
++
diff --git a/localdebian/patches/relocating-debian-dir b/localdebian/patches/relocating-debian-dir
new file mode 100644
index 0000000..d1e19e1
--- /dev/null
+++ b/localdebian/patches/relocating-debian-dir
@@ -0,0 +1,24 @@
+Description: Changes to some maint scripts to account for debian/ moving.
+  This does not directly affect debian builds because that directory
+  is removed anyway. But it allows the source to be kept in synch.
+Author: Joel Fenwick <joelfenwick at uq.edu.au>
+Forwarded: yes
+Applied-Upstream: yes
+
+--- a/scripts/extracttests.sh
++++ b/scripts/extracttests.sh
+@@ -55,4 +55,4 @@ find . -name 'src' | xargs rm -r
+ rm -r scons
+ rm -r doc/user doc/cookbook 
+ find doc -name '*.tex' | xargs rm
+-rm -rf debian
++rm -rf localdebian
+--- a/scripts/makesrc.sh
++++ b/scripts/makesrc.sh
+@@ -13,5 +13,5 @@ then
+ fi
+ svnversion > svn_version
+ 
+-tar -czf ../python-escript_$SRCVERSION.orig.tar.gz --exclude-vcs --exclude=debian --exclude=scons/*options.py *
++tar -czf ../python-escript_$SRCVERSION.orig.tar.gz --exclude-vcs --exclude=debian --exclude=localdebian --exclude=scons/*options.py *
+ 
diff --git a/localdebian/patches/series b/localdebian/patches/series
new file mode 100644
index 0000000..5593ba5
--- /dev/null
+++ b/localdebian/patches/series
@@ -0,0 +1,6 @@
+#release-sanity
+#mpi-gaol
+#grammar-errors
+#relocating-debian-dir
+#doxygenfix
+#dateless-gz
diff --git a/localdebian/python-escript-doc.doc-base.1 b/localdebian/python-escript-doc.doc-base.1
new file mode 100644
index 0000000..a9b13c2
--- /dev/null
+++ b/localdebian/python-escript-doc.doc-base.1
@@ -0,0 +1,8 @@
+Document: escript-install-guide
+Title: Escript install guide
+Author: Escript development team
+Abstract: Guide to configuring Escript from source
+Section: Science/Geoscience
+
+Format: PDF
+Files: /usr/share/doc/python-escript-doc/install.pdf.gz
diff --git a/localdebian/python-escript-doc.doc-base.2 b/localdebian/python-escript-doc.doc-base.2
new file mode 100644
index 0000000..ea567c2
--- /dev/null
+++ b/localdebian/python-escript-doc.doc-base.2
@@ -0,0 +1,12 @@
+Document: escript-cookbook
+Title: The escript cookbook
+Author: Antony Hallam, Lutz Gross, et al.
+Abstract: escript is a Python based environment that has been developed to solve complex mathematical models, particularly
+ coupled, non-linear and time-dependent partial differential equations. The intention of this cookbook is to introduce
+ new users to escript and provide a set of examples which demonstrate the major concepts and can be adapted
+ to new problems. Although most of the examples in this cookbook are focused on the disciplines of geophysics
+ and geology, they provide a solid introduction to escript and its capabilities.
+Section: Science/Geoscience
+
+Format: PDF
+Files: /usr/share/doc/python-escript-doc/cookbook.pdf.gz
diff --git a/localdebian/python-escript-doc.doc-base.3 b/localdebian/python-escript-doc.doc-base.3
new file mode 100644
index 0000000..5108166
--- /dev/null
+++ b/localdebian/python-escript-doc.doc-base.3
@@ -0,0 +1,10 @@
+Document: escript-user-guide
+Title: esys-Escript User’s Guide:
+ Solving Partial Differential Equations
+ with Escript and Finley
+Author: Escript development team
+Abstract: User guide the escript PDE solving libraries.
+Section: Science/Geoscience
+
+Format: PDF
+Files: /usr/share/doc/python-escript-doc/user.pdf.gz
\ No newline at end of file
diff --git a/localdebian/python-escript-doc.doc-base.4 b/localdebian/python-escript-doc.doc-base.4
new file mode 100644
index 0000000..1635a33
--- /dev/null
+++ b/localdebian/python-escript-doc.doc-base.4
@@ -0,0 +1,10 @@
+Document: escript-inversion-guide
+Title: esys.downunder: Inversion with
+ escript
+Author: Cihan Altinay, Vince Boros, Lutz Gross, Jaco du Plessis,
+ Azadeh Salehi
+Abstract: Guide to the inversion toolkit in escript
+Section: Science/Geoscience
+
+Format: PDF
+Files: /usr/share/doc/python-escript-doc/inversion.pdf.gz
\ No newline at end of file
diff --git a/localdebian/python-escript-doc.doc-base.5 b/localdebian/python-escript-doc.doc-base.5
new file mode 100644
index 0000000..35a0200
--- /dev/null
+++ b/localdebian/python-escript-doc.doc-base.5
@@ -0,0 +1,10 @@
+Document: escript-c++-side
+Title: API for escript's C++ side
+Author: Escript development team
+Abstract: Documentation for the C++ API for escript and related libraries.
+Section: Science/Geoscience
+
+Format: HTML
+Index: /usr/share/doc/python-escript-doc/c++_html/index.html
+Files: /usr/share/doc/python-escript-doc/c++_html/*.html
+ /usr/share/doc/python-escript-doc/c++_html/*.png
\ No newline at end of file
diff --git a/localdebian/python-escript-doc.doc-base.6 b/localdebian/python-escript-doc.doc-base.6
new file mode 100644
index 0000000..3b4121a
--- /dev/null
+++ b/localdebian/python-escript-doc.doc-base.6
@@ -0,0 +1,9 @@
+Document: escript-python-api
+Title: API for escript's Python side
+Author: Escript development team
+Abstract: Documentation for the Python API for escript and related libraries.
+Section: Science/Geoscience
+
+Format: HTML
+Index: /usr/share/doc/python-escript-doc/python_html/index.html
+Files: /usr/share/doc/python-escript-doc/python_html/*
\ No newline at end of file
diff --git a/localdebian/python-escript-doc.examples b/localdebian/python-escript-doc.examples
new file mode 100644
index 0000000..2b75355
--- /dev/null
+++ b/localdebian/python-escript-doc.examples
@@ -0,0 +1 @@
+debian/stage2/release/doc/escript_examples.tar.gz
diff --git a/localdebian/python-escript-doc.install b/localdebian/python-escript-doc.install
new file mode 100644
index 0000000..6f42c70
--- /dev/null
+++ b/localdebian/python-escript-doc.install
@@ -0,0 +1,9 @@
+#Using this instead of python-escript-doc.docs because I want to rename the c++ doco from "doxygen"
+debian/stage2/release/doc/install/install.pdf	usr/share/doc/python-escript-doc
+debian/stage2/release/doc/user/user.pdf		usr/share/doc/python-escript-doc
+debian/stage2/release/doc/cookbook/cookbook.pdf	usr/share/doc/python-escript-doc
+debian/stage2/release/doc/inversion/inversion.pdf	usr/share/doc/python-escript-doc/
+debian/stage2/release/doc/sphinx_api/* 		usr/share/doc/python-escript-doc/python_html
+debian/stage2/release/doc/sphinx_api/_static/basic.css	usr/share/doc/python-escript-doc/python_html/_static
+debian/stage2/release/doc/doxygen/html/* 		usr/share/doc/python-escript-doc/c++_html
+debian/copyright				usr/share/doc/python-escript-doc
diff --git a/localdebian/python-escript-doc.links b/localdebian/python-escript-doc.links
new file mode 100644
index 0000000..96325da
--- /dev/null
+++ b/localdebian/python-escript-doc.links
@@ -0,0 +1,19 @@
+/usr/share/sphinx/themes/basic/static/ajax-loader.gif	usr/share/doc/python-escript-doc/python_html/_static/ajax-loader.gif
+/usr/share/sphinx/themes/basic/static/comment-bright.png usr/share/doc/python-escript-doc/python_html/_static/comment-bright.png
+/usr/share/sphinx/themes/basic/static/comment-close.png usr/share/doc/python-escript-doc/python_html/_static/comment-close.png
+/usr/share/sphinx/themes/basic/static/comment.png	usr/share/doc/python-escript-doc/python_html/_static/comment.png
+/usr/share/sphinx/themes/basic/static/doctools.js	usr/share/doc/python-escript-doc/python_html/_static/doctools.js
+/usr/share/sphinx/themes/basic/static/down.png		usr/share/doc/python-escript-doc/python_html/_static/down.png
+/usr/share/sphinx/themes/basic/static/down-pressed.png	usr/share/doc/python-escript-doc/python_html/_static/down-pressed.png
+/usr/share/sphinx/themes/basic/static/file.png		usr/share/doc/python-escript-doc/python_html/_static/file.png
+/usr/share/sphinx/themes/basic/static/jquery.js		usr/share/doc/python-escript-doc/python_html/_static/jquery.js
+/usr/share/sphinx/themes/basic/static/jquery.js		usr/share/doc/python-escript-doc/c++_html/jquery.js
+/usr/share/sphinx/themes/basic/static/minus.png		usr/share/doc/python-escript-doc/python_html/_static/minus.png
+/usr/share/sphinx/themes/basic/static/plus.png		usr/share/doc/python-escript-doc/python_html/_static/plus.png
+/usr/share/javascript/sphinxdoc/1.0/searchtools.js	usr/share/doc/python-escript-doc/python_html/_static/searchtools.js
+/usr/share/javascript/sphinxdoc/1.0/sidebar.js		usr/share/doc/python-escript-doc/python_html/_static/sidebar.js
+/usr/share/sphinx/themes/basic/static/underscore.js	usr/share/doc/python-escript-doc/python_html/_static/underscore.js
+/usr/share/sphinx/themes/basic/static/up.png		usr/share/doc/python-escript-doc/python_html/_static/up.png
+/usr/share/sphinx/themes/basic/static/up-pressed.png	usr/share/doc/python-escript-doc/python_html/_static/up-pressed.png
+/usr/share/sphinx/themes/basic/static/websupport.js	usr/share/doc/python-escript-doc/python_html/_static/websupport.js
+
diff --git a/localdebian/python-escript-doc.lintian-overrides b/localdebian/python-escript-doc.lintian-overrides
new file mode 100644
index 0000000..d17ac03
--- /dev/null
+++ b/localdebian/python-escript-doc.lintian-overrides
@@ -0,0 +1,3 @@
+
+# science packages belong in the science section according to science policy
+python-escript-doc: wrong-section-according-to-package-name
diff --git a/localdebian/python-escript-mpi.install b/localdebian/python-escript-mpi.install
new file mode 100644
index 0000000..02b9574
--- /dev/null
+++ b/localdebian/python-escript-mpi.install
@@ -0,0 +1,5 @@
+debian/stage2M/lib/* usr/lib/python-escript-mpi/lib
+debian/stage2M/bin/escript-overlord usr/lib/python-escript-mpi
+debian/stage2M/esys  usr/lib/python-escript-mpi
+debian/stage2M/bin/run-escript2-mpi usr/bin
+debian/copyright	usr/share/doc/python-escript-mpi
diff --git a/localdebian/python-escript-mpi.lintian-overrides b/localdebian/python-escript-mpi.lintian-overrides
new file mode 100644
index 0000000..392f236
--- /dev/null
+++ b/localdebian/python-escript-mpi.lintian-overrides
@@ -0,0 +1,10 @@
+
+# All libraries are build with the same flags, only some are reported
+# as being un-hardened.
+python-escript-mpi: hardening-no-fortify-functions
+
+python-escript-mpi: wrong-section-according-to-package-name
+python-escript-mpi: hyphen-used-as-minus-sign
+
+#tEH in the binary is a coincidence
+python-escript-mpi: spelling-error-in-binary
diff --git a/localdebian/python-escript-mpi.manpages b/localdebian/python-escript-mpi.manpages
new file mode 100644
index 0000000..3dc1755
--- /dev/null
+++ b/localdebian/python-escript-mpi.manpages
@@ -0,0 +1 @@
+debian/stage2M/run-escript2-mpi.man
diff --git a/localdebian/python-escript-mpi.postinst b/localdebian/python-escript-mpi.postinst
new file mode 100644
index 0000000..53ceec3
--- /dev/null
+++ b/localdebian/python-escript-mpi.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript2-mpi 30
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript2-mpi 30
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python-escript-mpi.prerm b/localdebian/python-escript-mpi.prerm
new file mode 100644
index 0000000..b947289
--- /dev/null
+++ b/localdebian/python-escript-mpi.prerm
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+      update-alternatives --remove run-escript /usr/bin/run-escript2-mpi
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python-escript.install b/localdebian/python-escript.install
new file mode 100644
index 0000000..bd89752
--- /dev/null
+++ b/localdebian/python-escript.install
@@ -0,0 +1,4 @@
+debian/stage2/lib/* usr/lib/python-escript/lib
+debian/stage2/esys  usr/lib/python-escript
+debian/stage2/bin/run-escript2 usr/bin
+debian/copyright	usr/share/doc/python-escript
diff --git a/localdebian/python-escript.lintian-overrides b/localdebian/python-escript.lintian-overrides
new file mode 100644
index 0000000..c9a1a83
--- /dev/null
+++ b/localdebian/python-escript.lintian-overrides
@@ -0,0 +1,12 @@
+
+# science packages belong in the science section according to science policy
+python-escript: wrong-section-according-to-package-name
+
+# All libraries are build with the same flags, only some are reported
+# as being un-hardened.
+python-escript: hardening-no-fortify-functions
+
+python-escript: hyphen-used-as-minus-sign
+
+#tEH in the binary is a coincidence
+python-escript: spelling-error-in-binary
diff --git a/localdebian/python-escript.manpages b/localdebian/python-escript.manpages
new file mode 100644
index 0000000..986efca
--- /dev/null
+++ b/localdebian/python-escript.manpages
@@ -0,0 +1 @@
+debian/stage2/run-escript2.man
diff --git a/localdebian/python-escript.postinst b/localdebian/python-escript.postinst
new file mode 100644
index 0000000..d9433bb
--- /dev/null
+++ b/localdebian/python-escript.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript2 50
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript2 50
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python-escript.prerm b/localdebian/python-escript.prerm
new file mode 100644
index 0000000..5de3513
--- /dev/null
+++ b/localdebian/python-escript.prerm
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+      update-alternatives --remove run-escript /usr/bin/run-escript2
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python3-escript-mpi.install b/localdebian/python3-escript-mpi.install
new file mode 100644
index 0000000..ac6ffd1
--- /dev/null
+++ b/localdebian/python3-escript-mpi.install
@@ -0,0 +1,5 @@
+debian/stage3M/lib/* usr/lib/python3-escript-mpi/lib
+debian/stage3M/bin/escript-overlord usr/lib/python3-escript-mpi
+debian/stage3M/esys  usr/lib/python3-escript-mpi
+debian/stage3M/bin/run-escript3-mpi usr/bin
+debian/copyright	usr/share/doc/python3-escript-mpi
diff --git a/localdebian/python3-escript-mpi.lintian-overrides b/localdebian/python3-escript-mpi.lintian-overrides
new file mode 100644
index 0000000..9741799
--- /dev/null
+++ b/localdebian/python3-escript-mpi.lintian-overrides
@@ -0,0 +1,9 @@
+
+# All libraries are build with the same flags, only some are reported
+# as being un-hardened.
+python3-escript-mpi: hardening-no-fortify-functions
+
+python3-escript-mpi: hyphen-used-as-minus-sign
+
+# tEH in the binary is a coincidence
+python3-escript-mpi: spelling-error-in-binary
diff --git a/localdebian/python3-escript-mpi.manpages b/localdebian/python3-escript-mpi.manpages
new file mode 100644
index 0000000..d5c5cb1
--- /dev/null
+++ b/localdebian/python3-escript-mpi.manpages
@@ -0,0 +1 @@
+debian/stage3M/run-escript3-mpi.man
diff --git a/localdebian/python3-escript-mpi.postinst b/localdebian/python3-escript-mpi.postinst
new file mode 100644
index 0000000..3aa134f
--- /dev/null
+++ b/localdebian/python3-escript-mpi.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript3-mpi 20
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript3-mpi 20
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python3-escript-mpi.prerm b/localdebian/python3-escript-mpi.prerm
new file mode 100644
index 0000000..eac0599
--- /dev/null
+++ b/localdebian/python3-escript-mpi.prerm
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+    update-alternatives --remove run-escript /usr/bin/run-escript3-mpi
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python3-escript.install b/localdebian/python3-escript.install
new file mode 100644
index 0000000..e5315ea
--- /dev/null
+++ b/localdebian/python3-escript.install
@@ -0,0 +1,4 @@
+debian/stage3/lib/* usr/lib/python3-escript/lib
+debian/stage3/esys  usr/lib/python3-escript
+debian/stage3/bin/run-escript3 usr/bin
+debian/copyright	usr/share/doc/python3-escript
diff --git a/localdebian/python3-escript.lintian-overrides b/localdebian/python3-escript.lintian-overrides
new file mode 100644
index 0000000..fdf3727
--- /dev/null
+++ b/localdebian/python3-escript.lintian-overrides
@@ -0,0 +1,8 @@
+
+# All libraries are build with the same flags, only some are reported
+# as being un-hardened.
+python3-escript: hardening-no-fortify-functions
+python3-escript: hyphen-used-as-minus-sign
+
+# tEH in the binary is a coincidence
+python3-escript: spelling-error-in-binary
diff --git a/localdebian/python3-escript.manpages b/localdebian/python3-escript.manpages
new file mode 100644
index 0000000..99ddf1c
--- /dev/null
+++ b/localdebian/python3-escript.manpages
@@ -0,0 +1 @@
+debian/stage3/run-escript3.man
diff --git a/localdebian/python3-escript.postinst b/localdebian/python3-escript.postinst
new file mode 100644
index 0000000..e646498
--- /dev/null
+++ b/localdebian/python3-escript.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript3 40
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+      update-alternatives --install /usr/bin/run-escript run-escript /usr/bin/run-escript3 40
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/python3-escript.prerm b/localdebian/python3-escript.prerm
new file mode 100644
index 0000000..ed12372
--- /dev/null
+++ b/localdebian/python3-escript.prerm
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+    update-alternatives --remove run-escript /usr/bin/run-escript3
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/localdebian/rules b/localdebian/rules
new file mode 100755
index 0000000..d6b0ae4
--- /dev/null
+++ b/localdebian/rules
@@ -0,0 +1,130 @@
+#!/usr/bin/make -f
+
+PROJROOT=$(CURDIR)
+BDEST=$(CURDIR)/debian/python-escript
+BMDEST=$(CURDIR)/debian/python-escript-mpi
+B3DEST=$(CURDIR)/debian/python3-escript
+B3MDEST=$(CURDIR)/debian/python3-escript-mpi
+DDEST=$(CURDIR)/debian/python-escript-doc
+BUILD=$(CURDIR)/debian/tmp2
+BUILDM=$(CURDIR)/debian/tmp2M
+BUILD3=$(CURDIR)/debian/tmp3
+BUILD3M=$(CURDIR)/debian/tmp3M
+WORK=$(CURDIR)/debian/stage2
+WORKM=$(CURDIR)/debian/stage2M
+WORK3=$(CURDIR)/debian/stage3
+WORK3M=$(CURDIR)/debian/stage3M
+
+
+
+
+#thanks to the debian manual
+# export DEB_BUILD_OPTIONS="parallel=10"
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    parbuild=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    sflags=-j$(parbuild)
+else
+    sflags=-j1
+endif
+
+%:
+	dh $@  --with python2,python3,sphinxdoc -v
+
+override_dh_clean:
+	rm -rf build condif.log esys include lib release .sconf_tmp .sconsign.dblite config.log .sconf_temp
+	rm -rf scons/templates/*.pyc
+	rm -rf $(BDEST)
+	rm -rf $(B3DEST)
+	rm -rf $(BMDEST)
+	rm -rf $(B3MDEST)
+	rm -rf $(DDEST)
+	rm -rf $(BUILD)
+	rm -rf $(BUILDM)
+	rm -rf $(BUILD3)
+	rm -rf $(BUILD3M)
+	rm -rf $(WORK)
+	rm -rf $(WORKM)
+	rm -rf $(WORK3)
+	rm -rf $(WORK3M)
+	rm -rf $(CURDIR)/debian/tmp/*
+	rm -f debian/files
+	rm -f debian/substvars
+	dh_clean
+
+override_dh_installchangelogs:
+	dh_installchangelogs debian/changelog.trivial
+
+override_dh_auto_build:
+	#Build steps for py2
+	mkdir -p $(WORK)
+	if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
+	scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=scons/templates/sid_options.py
+	# extract the relevant .py files
+	cd $(WORK); $(PROJROOT)/debian/utils/cppy.py $(PROJROOT); cd $(PROJROOT)
+	cp $(PROJROOT)/doc/manpage/man1/run-escript.1 $(WORK)/run-escript2.man
+	mv $(WORK)/bin/run-escript $(WORK)/bin/run-escript2
+	find $(WORK) -name '*.pyc' -print0 | xargs -0 rm -f
+	
+	# build_steps for documentation 
+	# depends on the py2 build so don't do anything here
+	# which will overwrite changes made in the py2 build
+	mkdir -p $(BUILD)
+	scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD) verbose=on prefix=$(WORK) options_file=scons/templates/sid_options.py docs
+	find $(WORK) -name '*.pyc' -print0 | xargs -0 rm -f
+	
+	# Build steps for py2 with MPI	
+	mkdir -p $(WORKM)
+	if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
+	scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILDM)  cc_optim='-O3 -DOVERLORDPATH=\"/usr/lib/python-escript-mpi/\"' verbose=on prefix=$(WORKM) options_file=scons/templates/sid_mpi_options.py
+	# extract the relevant .py files
+	cd $(WORKM); $(PROJROOT)/debian/utils/cppy.py $(PROJROOT); cd $(PROJROOT)
+	cp $(PROJROOT)/doc/manpage/man1/run-escript.1 $(WORKM)/run-escript2-mpi.man
+	ln $(WORKM)/bin/run-escript $(WORKM)/bin/run-escript2-mpi
+	find $(WORKM) -name '*.pyc' -print0| xargs -0 rm -f
+	#rm -rf $(BUILDM)
+
+	# Build steps for py3
+	mkdir -p $(WORK3)
+	if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
+	scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD3) verbose=on prefix=$(WORK3) options_file=scons/templates/sid_py3_options.py
+	# extract the relevant .py files
+	cd $(WORK3); $(PROJROOT)/debian/utils/cppy.py $(PROJROOT); cd $(PROJROOT)
+	cp $(PROJROOT)/doc/manpage/man1/run-escript.1 $(WORK3)/run-escript3.man
+	ln $(WORK3)/bin/run-escript $(WORK3)/bin/run-escript3
+	find $(WORK3) -name '*.pyc' -print0| xargs -0 rm -f
+	#rm -rf $(BUILD3)
+
+	# Build steps for py3 with MPI
+	mkdir -p $(WORK3M)
+	if [ ! -f svn_version ];then echo "No svn_version file found"; exit 3;fi
+	scons $(sflags) SVN_VERSION=`cat svn_version` build_dir=$(BUILD3M)  cc_optim='-O3 -DOVERLORDPATH=\"/usr/lib/python-escript3-mpi/\"' verbose=on prefix=$(WORK3M) options_file=scons/templates/sid_py3_mpi_options.py
+	# extract the relevant .py files
+	cd $(WORK3M); $(PROJROOT)/debian/utils/cppy.py $(PROJROOT); cd $(PROJROOT)
+	cp $(PROJROOT)/doc/manpage/man1/run-escript.1 $(WORK3M)/run-escript3-mpi.man
+	ln $(WORK3M)/bin/run-escript $(WORK3M)/bin/run-escript3-mpi
+	find $(WORK3M) -name '*.pyc' -print0| xargs -0 rm -f	
+	#rm -rf $(BUILD3M)
+	
+	# fix paths in each package and
+	# fix some external links in the doc package
+	debian/utils/tweak.sh "$(WORK)" "$(WORKM)" "$(WORK3)" "$(WORK3M)"
+	rm -f scons/templates/*.pyc
+	rm -f site_scons/*.pyc
+	rm -f utest.sh
+
+override_dh_shlibdeps:
+	# so libraries we just built are checked as well
+	dh_shlibdeps -ppython-escript -Npython3-escript -Npython-escript-mpi -Npython3-escript-mpi -Npython-escript-doc -P$(BDEST) -l$(BDEST)/usr/lib/python-escript/lib
+	dh_shlibdeps -ppython-escript-mpi -Npython3-escript -Npython-escript -Npython3-escript-mpi -Npython-escript-doc -P$(BMDEST) -l$(BMDEST)/usr/lib/python-escript-mpi/lib
+	dh_shlibdeps -ppython3-escript -Npython-escript -Npython-escript-mpi -Npython3-escript-mpi -Npython-escript-doc -P$(B3DEST) -l$(B3DEST)/usr/lib/python3-escript/lib
+	dh_shlibdeps -ppython3-escript-mpi -Npython3-escript -Npython-escript -Npython-escript-mpi -Npython-escript-doc -P$(B3MDEST) -l$(B3MDEST)/usr/lib/python3-escript-mpi/lib
+
+	
+override_dh_python2:
+	dh_python2 -ppython-escript -Npython3-escript -Npython-escript-mpi -Npython3-escript-mpi -Npython-escript-doc --no-ext-rename usr/lib/python-escript/esys
+	dh_python2 -ppython-escript-mpi -Npython3-escript -Npython-escript -Npython3-escript-mpi -Npython-escript-doc --no-ext-rename	usr/lib/python-escript-mpi/esys
+	
+override_dh_python3:
+	dh_python3 -ppython3-escript -Npython-escript -Npython-escript-mpi -Npython3-escript-mpi -Npython-escript-doc --no-ext-rename	usr/lib/python3-escript/esys
+	dh_python3 -ppython3-escript-mpi -Npython3-escript -Npython-escript -Npython-escript-mpi -Npython-escript-doc --no-ext-rename	usr/lib/python3-escript-mpi/esys
+
diff --git a/localdebian/source/format b/localdebian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/localdebian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/utils/cppy.py b/localdebian/utils/cppy.py
similarity index 95%
copy from debian/utils/cppy.py
copy to localdebian/utils/cppy.py
index 4a84209..f9fa23d 100755
--- a/debian/utils/cppy.py
+++ b/localdebian/utils/cppy.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/localdebian/utils/tweak.sh b/localdebian/utils/tweak.sh
new file mode 100755
index 0000000..6e3ee8e
--- /dev/null
+++ b/localdebian/utils/tweak.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# set paths for each package and inform launcher it is operating with 
+# tools in known locations
+
+if [ $# -ne 4 ]
+then
+    echo "Incorrect parameter count" >&2
+    exit 1
+fi
+
+
+WORK=$1
+WORKM=$2
+WORK3=$3
+WORK3M=$4
+
+# python-escript
+sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $WORK/bin/run-escript2
+
+# python-escript-mpi
+sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python-escript-mpi%" $WORKM/bin/run-escript2-mpi
+sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $WORKM/bin/run-escript2-mpi
+
+# python-escript3
+sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $WORK3/bin/run-escript3
+sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python3-escript%" $WORK3/bin/run-escript3
+sed -i -e "s%PYTHON_CMD=python%PYTHON_CMD=python3%" $WORK3/bin/run-escript3
+
+# python-escript3-mpi
+sed -i -e "s%ESCRIPT_ROOT=/usr/lib/python-escript%ESCRIPT_ROOT=/usr/lib/python3-escript-mpi%" $WORK3M/bin/run-escript3-mpi
+sed -i -e "s%STDLOCATION=0%STDLOCATION=1%" $WORK3M/bin/run-escript3-mpi
+sed -i -e "s%PYTHON_CMD=python%PYTHON_CMD=python3%" $WORK3M/bin/run-escript3-mpi
+
+# documentation
+sed -i -e 's%<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>%%' $WORK/release/doc/sphinx_api/*.html
+sed -i -e 's%<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>%%' $WORK/release/doc/sphinx_api/*.html
diff --git a/localdebian/watch b/localdebian/watch
new file mode 100644
index 0000000..a6652e1
--- /dev/null
+++ b/localdebian/watch
@@ -0,0 +1,2 @@
+version=3
+https://launchpad.net/escript-finley/+download https://launchpad.net/escript-finley/3.0\+/.+/\+download/python-escript_(.+).tar.gz
diff --git a/modellib/py_src/SConscript b/modellib/py_src/SConscript
index f4530bc..fa63040 100644
--- a/modellib/py_src/SConscript
+++ b/modellib/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/modellib/py_src/__init__.py b/modellib/py_src/__init__.py
index 562c9d5..dedeb95 100644
--- a/modellib/py_src/__init__.py
+++ b/modellib/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/modellib/py_src/flow.py b/modellib/py_src/flow.py
index 453bbe9..462fc6a 100644
--- a/modellib/py_src/flow.py
+++ b/modellib/py_src/flow.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/geometry.py b/modellib/py_src/geometry.py
index 62e1752..c73f5dd 100644
--- a/modellib/py_src/geometry.py
+++ b/modellib/py_src/geometry.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/input.py b/modellib/py_src/input.py
index 4183a74..5ee7551 100644
--- a/modellib/py_src/input.py
+++ b/modellib/py_src/input.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/materials.py b/modellib/py_src/materials.py
index 684e2f4..4329fb2 100644
--- a/modellib/py_src/materials.py
+++ b/modellib/py_src/materials.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/mechanics.py b/modellib/py_src/mechanics.py
index f006a85..baa1e08 100644
--- a/modellib/py_src/mechanics.py
+++ b/modellib/py_src/mechanics.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/probe.py b/modellib/py_src/probe.py
index 489e809..8bc004a 100644
--- a/modellib/py_src/probe.py
+++ b/modellib/py_src/probe.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/temperature.py b/modellib/py_src/temperature.py
index 1b47f95..e123392 100644
--- a/modellib/py_src/temperature.py
+++ b/modellib/py_src/temperature.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/py_src/visualization.py b/modellib/py_src/visualization.py
index f54f29e..9c784b9 100644
--- a/modellib/py_src/visualization.py
+++ b/modellib/py_src/visualization.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/test/python/SConscript b/modellib/test/python/SConscript
index c1f4273..39eb8c7 100644
--- a/modellib/test/python/SConscript
+++ b/modellib/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/modellib/test/python/drucker_prager.py b/modellib/test/python/drucker_prager.py
index 2713fb7..040f0ec 100644
--- a/modellib/test/python/drucker_prager.py
+++ b/modellib/test/python/drucker_prager.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/test/python/run_convection.py b/modellib/test/python/run_convection.py
index 4ced7fd..b9d8a73 100644
--- a/modellib/test/python/run_convection.py
+++ b/modellib/test/python/run_convection.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/test/python/run_domainreaders.py b/modellib/test/python/run_domainreaders.py
index 042d658..d63b64e 100644
--- a/modellib/test/python/run_domainreaders.py
+++ b/modellib/test/python/run_domainreaders.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/test/python/run_flow.py b/modellib/test/python/run_flow.py
index 1710f62..7792df9 100644
--- a/modellib/test/python/run_flow.py
+++ b/modellib/test/python/run_flow.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/modellib/test/python/run_temp.py b/modellib/test/python/run_temp.py
index 7b2242c..9c9bf51 100644
--- a/modellib/test/python/run_temp.py
+++ b/modellib/test/python/run_temp.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/paso/SConscript b/paso/SConscript
index 410abdf..2875aab 100644
--- a/paso/SConscript
+++ b/paso/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/paso/src/AMG.cpp b/paso/src/AMG.cpp
index c759556..e09221a 100644
--- a/paso/src/AMG.cpp
+++ b/paso/src/AMG.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -452,7 +452,7 @@ void Preconditioner_AMG_setStrongConnections(SystemMatrix_ptr A,
             A->mainBlock->pattern->ptr[my_n]+A->col_coupleBlock->pattern->ptr[my_n]
             -A->mainBlock->pattern->ptr[0]-A->col_coupleBlock->pattern->ptr[0];
 
-        Coupler_ptr threshold_coupler(new Coupler(A->row_coupler->connector, 2, A->mpi_info));
+        Coupler_ptr<real_t> threshold_coupler(new Coupler<real_t>(A->row_coupler->connector, 2, A->mpi_info));
         threshold_coupler->startCollect(threshold_p);
         double* remote_threshold = threshold_coupler->finishCollect();
 
@@ -599,7 +599,7 @@ void Preconditioner_AMG_setStrongConnections_Block(SystemMatrix_ptr A,
             A->mainBlock->pattern->ptr[my_n]+A->col_coupleBlock->pattern->ptr[my_n]
             -A->mainBlock->pattern->ptr[0]-A->col_coupleBlock->pattern->ptr[0];
 
-        Coupler_ptr threshold_coupler(new Coupler(A->row_coupler->connector, 2, A->mpi_info));
+        Coupler_ptr<real_t> threshold_coupler(new Coupler<real_t>(A->row_coupler->connector, 2, A->mpi_info));
         threshold_coupler->startCollect(threshold_p);
         double* remote_threshold = threshold_coupler->finishCollect();
 
@@ -685,7 +685,7 @@ void Preconditioner_AMG_CIJPCoarsening(dim_t n, dim_t my_n,
                                        const_Connector_ptr col_connector,
                                        escript::const_Distribution_ptr col_dist)
 {
-    Coupler_ptr w_coupler(new Coupler(col_connector, 1, col_dist->mpi_info));
+    Coupler_ptr<real_t> w_coupler(new Coupler<real_t>(col_connector, 1, col_dist->mpi_info));
     double* w = new double[n];
     double* Status = new double[n];
     double* random = createRandomVector(col_dist);
diff --git a/paso/src/AMG_Interpolation.cpp b/paso/src/AMG_Interpolation.cpp
index aa01377..bfbe7dc 100644
--- a/paso/src/AMG_Interpolation.cpp
+++ b/paso/src/AMG_Interpolation.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -74,7 +74,7 @@ void Preconditioner_AMG_extendB(SystemMatrix_ptr A, SystemMatrix_ptr B)
     B->row_coupleBlock.reset();
 
     Pattern_ptr pattern_main, pattern_couple;
-    Coupler_ptr coupler;
+    Coupler_ptr<real_t> coupler;
     double *ptr_val=NULL;
     index_t *global_id=NULL, *cols_array=NULL, *ptr_ptr=NULL, *ptr_idx=NULL;
     index_t *ptr_main=NULL, *ptr_couple=NULL, *idx_main=NULL, *idx_couple=NULL;
@@ -95,7 +95,7 @@ void Preconditioner_AMG_extendB(SystemMatrix_ptr A, SystemMatrix_ptr B)
         cols[i] = offset + i;
 
     if (B->global_id == NULL) {
-        coupler.reset(new Coupler(B->col_coupler->connector, 1, A->mpi_info));
+        coupler.reset(new Coupler<real_t>(B->col_coupler->connector, 1, A->mpi_info));
         coupler->startCollect(cols);
     }
 
diff --git a/paso/src/AMG_Prolongation.cpp b/paso/src/AMG_Prolongation.cpp
index b31bf1e..212fe7f 100644
--- a/paso/src/AMG_Prolongation.cpp
+++ b/paso/src/AMG_Prolongation.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/AMG_Restriction.cpp b/paso/src/AMG_Restriction.cpp
index 9ad3db7..ec6c293 100644
--- a/paso/src/AMG_Restriction.cpp
+++ b/paso/src/AMG_Restriction.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/AMG_Root.cpp b/paso/src/AMG_Root.cpp
index 45ea0a6..3608401 100644
--- a/paso/src/AMG_Root.cpp
+++ b/paso/src/AMG_Root.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/BOOMERAMG.cpp b/paso/src/BOOMERAMG.cpp
index 2d26280..87dbb45 100644
--- a/paso/src/BOOMERAMG.cpp
+++ b/paso/src/BOOMERAMG.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/BOOMERAMG.h b/paso/src/BOOMERAMG.h
index f017b52..59723e7 100644
--- a/paso/src/BOOMERAMG.h
+++ b/paso/src/BOOMERAMG.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/BiCGStab.cpp b/paso/src/BiCGStab.cpp
index 4040a1e..9364988 100644
--- a/paso/src/BiCGStab.cpp
+++ b/paso/src/BiCGStab.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/BlockOps.h b/paso/src/BlockOps.h
index e5bb69a..cea6753 100644
--- a/paso/src/BlockOps.h
+++ b/paso/src/BlockOps.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Coupler.cpp b/paso/src/Coupler.cpp
index acaa092..b0c79db 100644
--- a/paso/src/Coupler.cpp
+++ b/paso/src/Coupler.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -26,8 +26,9 @@ namespace paso {
  *
  ****************************************************************************/
 
-Coupler::Coupler(const_Connector_ptr conn, dim_t blockSize,
-                 escript::JMPI mpiInfo) :
+template<typename Scalar>
+Coupler<Scalar>::Coupler(const_Connector_ptr conn, dim_t blockSize,
+                         escript::JMPI mpiInfo) :
     connector(conn),
     block_size(blockSize),
     in_use(false),
@@ -44,13 +45,14 @@ Coupler::Coupler(const_Connector_ptr conn, dim_t blockSize,
     mpi_stati = new MPI_Status[conn->send->neighbour.size() +
                                conn->recv->neighbour.size()];
     if (mpi_info->size > 1) {
-        send_buffer = new double[conn->send->numSharedComponents * block_size];
-        recv_buffer = new double[conn->recv->numSharedComponents * block_size];
+        send_buffer = new Scalar[conn->send->numSharedComponents * block_size];
+        recv_buffer = new Scalar[conn->recv->numSharedComponents * block_size];
     }
 #endif
 }
 
-Coupler::~Coupler()
+template<typename Scalar>
+Coupler<Scalar>::~Coupler()
 {
 #ifdef ESYS_MPI
     delete[] send_buffer;
@@ -60,26 +62,28 @@ Coupler::~Coupler()
 #endif
 }
 
-void Coupler::startCollect(const double* in)
+template<typename Scalar>
+void Coupler<Scalar>::startCollect(const Scalar* in)
 {
-    data = const_cast<double*>(in);
+    data = const_cast<Scalar*>(in);
 #ifdef ESYS_MPI
     if (mpi_info->size > 1) {
         if (in_use) {
             throw PasoException("Coupler::startCollect: Coupler in use.");
         }
+        MPI_Datatype mpiType = (sizeof(Scalar) == sizeof(double) ? MPI_DOUBLE : MPI_DOUBLE_COMPLEX);
         // start receiving input
         for (dim_t i=0; i < connector->recv->neighbour.size(); ++i) {
             MPI_Irecv(&recv_buffer[connector->recv->offsetInShared[i]*block_size],
                     (connector->recv->offsetInShared[i+1]-connector->recv->offsetInShared[i])*block_size,
-                    MPI_DOUBLE, connector->recv->neighbour[i],
+                    mpiType, connector->recv->neighbour[i],
                     mpi_info->counter()+connector->recv->neighbour[i],
                     mpi_info->comm, &mpi_requests[i]);
         }
         // collect values into buffer
         const int numSharedSend = connector->send->numSharedComponents;
         if (block_size > 1) {
-            const size_t block_size_size=block_size*sizeof(double);
+            const size_t block_size_size=block_size*sizeof(Scalar);
 #pragma omp parallel for
             for (dim_t i=0; i < numSharedSend; ++i) {
                 memcpy(&(send_buffer[(block_size)*i]),
@@ -96,7 +100,7 @@ void Coupler::startCollect(const double* in)
         for (dim_t i=0; i < connector->send->neighbour.size(); ++i) {
             MPI_Issend(&send_buffer[connector->send->offsetInShared[i]*block_size],
                     (connector->send->offsetInShared[i+1] - connector->send->offsetInShared[i])*block_size,
-                    MPI_DOUBLE, connector->send->neighbour[i],
+                    mpiType, connector->send->neighbour[i],
                     mpi_info->counter()+mpi_info->rank, mpi_info->comm,
                     &mpi_requests[i+connector->recv->neighbour.size()]);
         }
@@ -106,7 +110,8 @@ void Coupler::startCollect(const double* in)
 #endif
 }
 
-double* Coupler::finishCollect()
+template<typename Scalar>
+Scalar* Coupler<Scalar>::finishCollect()
 {
 #ifdef ESYS_MPI
     if (mpi_info->size > 1) {
@@ -122,7 +127,8 @@ double* Coupler::finishCollect()
     return recv_buffer;
 }
 
-void Coupler::copyAll(Coupler_ptr target) const
+template<typename Scalar>
+void Coupler<Scalar>::copyAll(Coupler_ptr<Scalar> target) const
 {
     const dim_t overlap = getNumOverlapValues();
     const dim_t localSize = getLocalLength()*block_size;
@@ -139,14 +145,15 @@ void Coupler::copyAll(Coupler_ptr target) const
     }
 }
 
-void Coupler::fillOverlap(dim_t n, double* x)
+template<typename Scalar>
+void Coupler<Scalar>::fillOverlap(dim_t n, Scalar* x)
 {
     const dim_t overlap_n = getNumOverlapValues();
     const dim_t my_n= n - overlap_n;
     const dim_t offset = block_size * my_n;
 
     startCollect(x);
-    double* remote_values = finishCollect();
+    Scalar* remote_values = finishCollect();
 
 #pragma omp parallel for
     for (dim_t i=0; i < overlap_n * block_size; ++i) {
@@ -155,18 +162,29 @@ void Coupler::fillOverlap(dim_t n, double* x)
 }
 
 /* adjusts max values across shared values x */
-void Coupler::max(dim_t n, double* x)
+template<>
+void Coupler<real_t>::max(dim_t n, real_t* x)
 {
     const dim_t overlap_n = getNumOverlapValues();
     const dim_t my_n = n - overlap_n;
 
     startCollect(x);
-    double* remote_values = finishCollect();
+    real_t* remote_values = finishCollect();
 
 #pragma omp parallel for
     for (dim_t i=0; i < overlap_n; ++i)
         x[my_n+i] = std::max(x[my_n+i], remote_values[i]);
 }
 
+template<>
+void Coupler<cplx_t>::max(dim_t n, cplx_t* x)
+{
+    throw PasoException("Coupler::max: invalid call for complex data"); 
+}
+
+// instantiate
+template class Coupler<real_t>;
+template class Coupler<cplx_t>;
+
 } // namespace paso
 
diff --git a/paso/src/Coupler.h b/paso/src/Coupler.h
index 2d787a5..f421a0d 100644
--- a/paso/src/Coupler.h
+++ b/paso/src/Coupler.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -38,9 +38,9 @@ struct Connector;
 typedef boost::shared_ptr<Connector> Connector_ptr;
 typedef boost::shared_ptr<const Connector> const_Connector_ptr;
 
-struct Coupler;
-typedef boost::shared_ptr<Coupler> Coupler_ptr;
-typedef boost::shared_ptr<const Coupler> const_Coupler_ptr;
+template<typename Scalar> struct Coupler;
+template<typename T> using Coupler_ptr = boost::shared_ptr<Coupler<T> >;
+template<typename T> using const_Coupler_ptr = boost::shared_ptr<const Coupler<T> >;
 
 PASO_DLL_API
 struct Connector
@@ -95,21 +95,21 @@ struct Connector
 };
 
 
-PASO_DLL_API
+template<typename Scalar>
 struct Coupler
 {
     Coupler(const_Connector_ptr, dim_t blockSize, escript::JMPI mpiInfo);
     ~Coupler();
 
-    void startCollect(const double* in);
-    double* finishCollect();
-    void copyAll(Coupler_ptr target) const;
-    void fillOverlap(dim_t n, double* x);
-    void max(dim_t n, double* x);
+    void startCollect(const Scalar* in);
+    Scalar* finishCollect();
+    void copyAll(Coupler_ptr<Scalar> target) const;
+    void fillOverlap(dim_t n, Scalar* x);
+    void max(dim_t n, Scalar* x);
 
-    inline const double* borrowLocalData() const { return data; }
+    inline const Scalar* borrowLocalData() const { return data; }
 
-    inline const double* borrowRemoteData() const { return recv_buffer; }
+    inline const Scalar* borrowRemoteData() const { return recv_buffer; }
 
     inline dim_t getNumSharedComponents() const
     {
@@ -141,9 +141,9 @@ struct Coupler
     bool in_use;
 
     // unmanaged pointer to data to be sent
-    double* data;
-    double* send_buffer;
-    double* recv_buffer;
+    Scalar* data;
+    Scalar* send_buffer;
+    Scalar* recv_buffer;
     MPI_Request* mpi_requests;
     MPI_Status* mpi_stati;
     escript::JMPI mpi_info;
diff --git a/paso/src/FCT_Solver.cpp b/paso/src/FCT_Solver.cpp
index 9234bb1..6da5127 100644
--- a/paso/src/FCT_Solver.cpp
+++ b/paso/src/FCT_Solver.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -57,8 +57,8 @@ FCT_Solver::FCT_Solver(const_TransportProblem_ptr tp, Options* options) :
         du = new double[n];
         z = new double[n];
     }
-    u_coupler.reset(new Coupler(tp->borrowConnector(), blockSize, mpi_info));
-    u_old_coupler.reset(new Coupler(tp->borrowConnector(), blockSize, mpi_info));
+    u_coupler.reset(new Coupler<real_t>(tp->borrowConnector(), blockSize, mpi_info));
+    u_old_coupler.reset(new Coupler<real_t>(tp->borrowConnector(), blockSize, mpi_info));
 
     if (options->ode_solver == PASO_LINEAR_CRANK_NICOLSON) {
         method = PASO_LINEAR_CRANK_NICOLSON;
@@ -491,7 +491,7 @@ void FCT_Solver::setAntiDiffusionFlux_BE(SystemMatrix_ptr flux_matrix)
  */
 void FCT_Solver::setAntiDiffusionFlux_linearCN(SystemMatrix_ptr flux_matrix)
 {
-    const_Coupler_ptr u_tilde_coupler(flux_limiter->u_tilde_coupler);
+    const_Coupler_ptr<real_t> u_tilde_coupler(flux_limiter->u_tilde_coupler);
     const double* u_tilde = u_tilde_coupler->borrowLocalData();
     const double* u_old = u_old_coupler->borrowLocalData();
     const double* remote_u_tilde = u_tilde_coupler->borrowRemoteData();
@@ -663,7 +663,7 @@ void FCT_Solver::setLowOrderOperator(TransportProblem_ptr fc)
  *       = u_i                                        where m_i<=0
  *
  */
-void FCT_Solver::setMuPaLu(double* out, const_Coupler_ptr coupler, double a)
+void FCT_Solver::setMuPaLu(double* out, const_Coupler_ptr<real_t> coupler, double a)
 {
     const_SystemMatrix_ptr L(transportproblem->iteration_matrix);
     const double* M = transportproblem->lumped_mass_matrix;
diff --git a/paso/src/FCT_Solver.h b/paso/src/FCT_Solver.h
index 2b0f65a..f1e8605 100644
--- a/paso/src/FCT_Solver.h
+++ b/paso/src/FCT_Solver.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -48,7 +48,7 @@ struct FCT_Solver
 
     void setAntiDiffusionFlux_CN(SystemMatrix_ptr flux_matrix);
 
-    void setMuPaLu(double* out, const_Coupler_ptr coupler, double a);
+    void setMuPaLu(double* out, const_Coupler_ptr<real_t> coupler, double a);
 
     inline double getTheta()
     {
@@ -64,8 +64,8 @@ struct FCT_Solver
     double* b;
     double* z;
     double* du;
-    Coupler_ptr u_coupler;
-    Coupler_ptr u_old_coupler; /* last time step */
+    Coupler_ptr<real_t> u_coupler;
+    Coupler_ptr<real_t> u_old_coupler; /* last time step */
 };
 
 
diff --git a/paso/src/FluxLimiter.cpp b/paso/src/FluxLimiter.cpp
index 5dd2dfe..01da4bb 100644
--- a/paso/src/FluxLimiter.cpp
+++ b/paso/src/FluxLimiter.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -39,8 +39,8 @@ FCT_FluxLimiter::FCT_FluxLimiter(const_TransportProblem_ptr tp)
     MQ = new double[2*n];
     R = new double[2*n];
 
-    R_coupler.reset(new Coupler(tp->borrowConnector(), 2*blockSize, mpi_info));
-    u_tilde_coupler.reset(new Coupler(tp->borrowConnector(), blockSize, mpi_info));
+    R_coupler.reset(new Coupler<real_t>(tp->borrowConnector(), 2*blockSize, mpi_info));
+    u_tilde_coupler.reset(new Coupler<real_t>(tp->borrowConnector(), blockSize, mpi_info));
     antidiffusive_fluxes.reset(new SystemMatrix(
                 tp->transport_matrix->type, tp->transport_matrix->pattern,
                 tp->transport_matrix->row_block_size,
diff --git a/paso/src/FluxLimiter.h b/paso/src/FluxLimiter.h
index 3316d6c..ae4c09e 100644
--- a/paso/src/FluxLimiter.h
+++ b/paso/src/FluxLimiter.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -49,8 +49,8 @@ struct FCT_FluxLimiter
     double* MQ;  // (M_C* Q_min, M_C* Q_max)
     double* R;   // (R-, R+)
     //Coupler_ptr MQ_coupler;
-    Coupler_ptr R_coupler;
-    Coupler_ptr u_tilde_coupler;
+    Coupler_ptr<real_t> R_coupler;
+    Coupler_ptr<real_t> u_tilde_coupler;
     double* borrowed_lumped_mass_matrix; // borrowed reference
 };
 
diff --git a/paso/src/Functions.cpp b/paso/src/Functions.cpp
index 90623ff..75af603 100644
--- a/paso/src/Functions.cpp
+++ b/paso/src/Functions.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Functions.h b/paso/src/Functions.h
index 1bdf864..32b78c2 100644
--- a/paso/src/Functions.h
+++ b/paso/src/Functions.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/GMRES.cpp b/paso/src/GMRES.cpp
index 07c32fa..c6961b6 100644
--- a/paso/src/GMRES.cpp
+++ b/paso/src/GMRES.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/GMRES2.cpp b/paso/src/GMRES2.cpp
index ca136c6..1a98af6 100644
--- a/paso/src/GMRES2.cpp
+++ b/paso/src/GMRES2.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/ILU.cpp b/paso/src/ILU.cpp
index 94f6fc2..f916e72 100644
--- a/paso/src/ILU.cpp
+++ b/paso/src/ILU.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/LocalAMG.cpp b/paso/src/LocalAMG.cpp
index a576efc..6e67d2f 100644
--- a/paso/src/LocalAMG.cpp
+++ b/paso/src/LocalAMG.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/LocalAMG_Prolongation.cpp b/paso/src/LocalAMG_Prolongation.cpp
index 4db931a..93cd141 100644
--- a/paso/src/LocalAMG_Prolongation.cpp
+++ b/paso/src/LocalAMG_Prolongation.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/MINRES.cpp b/paso/src/MINRES.cpp
index d8032d8..b5dc525 100644
--- a/paso/src/MINRES.cpp
+++ b/paso/src/MINRES.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/MKL.cpp b/paso/src/MKL.cpp
index 4925afb..54bf710 100644
--- a/paso/src/MKL.cpp
+++ b/paso/src/MKL.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/MKL.h b/paso/src/MKL.h
index ef36ac6..fda8821 100644
--- a/paso/src/MKL.h
+++ b/paso/src/MKL.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/MergedSolver.cpp b/paso/src/MergedSolver.cpp
index 3acd2ef..f3ab5ac 100644
--- a/paso/src/MergedSolver.cpp
+++ b/paso/src/MergedSolver.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/MergedSolver.h b/paso/src/MergedSolver.h
index 4978b22..ae03bd0 100644
--- a/paso/src/MergedSolver.h
+++ b/paso/src/MergedSolver.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/NewtonGMRES.cpp b/paso/src/NewtonGMRES.cpp
index fdc2b5b..bcba0a3 100644
--- a/paso/src/NewtonGMRES.cpp
+++ b/paso/src/NewtonGMRES.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Options.cpp b/paso/src/Options.cpp
index dd414f4..692ad1a 100644
--- a/paso/src/Options.cpp
+++ b/paso/src/Options.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Options.h b/paso/src/Options.h
index b5ca1f0..ee901bc 100644
--- a/paso/src/Options.h
+++ b/paso/src/Options.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/PCG.cpp b/paso/src/PCG.cpp
index 49c6e90..12b5cab 100644
--- a/paso/src/PCG.cpp
+++ b/paso/src/PCG.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Paso.h b/paso/src/Paso.h
index ad8dfab..45efba8 100644
--- a/paso/src/Paso.h
+++ b/paso/src/Paso.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -52,6 +52,7 @@ enum SolverResult {
 using escript::DataTypes::dim_t;
 using escript::DataTypes::index_t;
 using escript::DataTypes::real_t;
+using escript::DataTypes::cplx_t;
 
 }
 
diff --git a/paso/src/PasoException.h b/paso/src/PasoException.h
index 81882ee..083d7b7 100644
--- a/paso/src/PasoException.h
+++ b/paso/src/PasoException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/PasoUtil.cpp b/paso/src/PasoUtil.cpp
index bfa8f68..690ac89 100644
--- a/paso/src/PasoUtil.cpp
+++ b/paso/src/PasoUtil.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/PasoUtil.h b/paso/src/PasoUtil.h
index a24b336..f893da4 100644
--- a/paso/src/PasoUtil.h
+++ b/paso/src/PasoUtil.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Pattern.cpp b/paso/src/Pattern.cpp
index 1f6c471..b6bfc30 100644
--- a/paso/src/Pattern.cpp
+++ b/paso/src/Pattern.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Pattern.h b/paso/src/Pattern.h
index 5be155a..0ef089a 100644
--- a/paso/src/Pattern.h
+++ b/paso/src/Pattern.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Pattern_mis.cpp b/paso/src/Pattern_mis.cpp
index 9cd495a..fe7e467 100644
--- a/paso/src/Pattern_mis.cpp
+++ b/paso/src/Pattern_mis.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Pattern_reduceBandwidth.cpp b/paso/src/Pattern_reduceBandwidth.cpp
index f4c0c66..7b38ff5 100644
--- a/paso/src/Pattern_reduceBandwidth.cpp
+++ b/paso/src/Pattern_reduceBandwidth.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Preconditioner.cpp b/paso/src/Preconditioner.cpp
index 5097571..fafbfeb 100644
--- a/paso/src/Preconditioner.cpp
+++ b/paso/src/Preconditioner.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Preconditioner.h b/paso/src/Preconditioner.h
index 5ed018c..e7913ca 100644
--- a/paso/src/Preconditioner.h
+++ b/paso/src/Preconditioner.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/RILU.cpp b/paso/src/RILU.cpp
index 77762e2..31d4ee5 100644
--- a/paso/src/RILU.cpp
+++ b/paso/src/RILU.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/ReactiveSolver.cpp b/paso/src/ReactiveSolver.cpp
index d86bd8e..ac1820a 100644
--- a/paso/src/ReactiveSolver.cpp
+++ b/paso/src/ReactiveSolver.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/ReactiveSolver.h b/paso/src/ReactiveSolver.h
index 4c76cbd..7f80fe9 100644
--- a/paso/src/ReactiveSolver.h
+++ b/paso/src/ReactiveSolver.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SConscript b/paso/src/SConscript
index e1717c1..9478a35 100644
--- a/paso/src/SConscript
+++ b/paso/src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/paso/src/SchurComplement.cpp b/paso/src/SchurComplement.cpp
index c657038..473553d 100644
--- a/paso/src/SchurComplement.cpp
+++ b/paso/src/SchurComplement.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SharedComponents.h b/paso/src/SharedComponents.h
index eee26c2..7881c2b 100644
--- a/paso/src/SharedComponents.h
+++ b/paso/src/SharedComponents.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Smoother.cpp b/paso/src/Smoother.cpp
index 68e6934..fba525d 100644
--- a/paso/src/Smoother.cpp
+++ b/paso/src/Smoother.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Solver.cpp b/paso/src/Solver.cpp
index bc8856b..74510e7 100644
--- a/paso/src/Solver.cpp
+++ b/paso/src/Solver.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Solver.h b/paso/src/Solver.h
index 3b071c7..8b53c61 100644
--- a/paso/src/Solver.h
+++ b/paso/src/Solver.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Solver_Function.cpp b/paso/src/Solver_Function.cpp
index 2838e2d..3fa8dcd 100644
--- a/paso/src/Solver_Function.cpp
+++ b/paso/src/Solver_Function.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix.cpp b/paso/src/SparseMatrix.cpp
index 70d5ff7..556cb9d 100644
--- a/paso/src/SparseMatrix.cpp
+++ b/paso/src/SparseMatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix.h b/paso/src/SparseMatrix.h
index 939920d..d3661cc 100644
--- a/paso/src/SparseMatrix.h
+++ b/paso/src/SparseMatrix.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix_MatrixMatrix.cpp b/paso/src/SparseMatrix_MatrixMatrix.cpp
index 4c458b1..3051f5c 100644
--- a/paso/src/SparseMatrix_MatrixMatrix.cpp
+++ b/paso/src/SparseMatrix_MatrixMatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix_MatrixMatrixTranspose.cpp b/paso/src/SparseMatrix_MatrixMatrixTranspose.cpp
index d36bac8..a14b420 100644
--- a/paso/src/SparseMatrix_MatrixMatrixTranspose.cpp
+++ b/paso/src/SparseMatrix_MatrixMatrixTranspose.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix_MatrixVector.cpp b/paso/src/SparseMatrix_MatrixVector.cpp
index 1547b8a..d9a0be1 100644
--- a/paso/src/SparseMatrix_MatrixVector.cpp
+++ b/paso/src/SparseMatrix_MatrixVector.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix_getSubmatrix.cpp b/paso/src/SparseMatrix_getSubmatrix.cpp
index 4052749..cf170d7 100644
--- a/paso/src/SparseMatrix_getSubmatrix.cpp
+++ b/paso/src/SparseMatrix_getSubmatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix_nullifyRowsAndCols.cpp b/paso/src/SparseMatrix_nullifyRowsAndCols.cpp
index d2a419e..849bb2f 100644
--- a/paso/src/SparseMatrix_nullifyRowsAndCols.cpp
+++ b/paso/src/SparseMatrix_nullifyRowsAndCols.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SparseMatrix_saveHB.cpp b/paso/src/SparseMatrix_saveHB.cpp
index a209bed..2468ccb 100644
--- a/paso/src/SparseMatrix_saveHB.cpp
+++ b/paso/src/SparseMatrix_saveHB.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SystemMatrix.cpp b/paso/src/SystemMatrix.cpp
index 2de5d5b..efbd9b7 100644
--- a/paso/src/SystemMatrix.cpp
+++ b/paso/src/SystemMatrix.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -126,8 +126,8 @@ SystemMatrix::SystemMatrix(SystemMatrixType ntype,
     } else {
         block_size = row_block_size*col_block_size;
     }
-    col_coupler.reset(new Coupler(pattern->col_connector, col_block_size, mpi_info));
-    row_coupler.reset(new Coupler(pattern->row_connector, row_block_size, mpi_info));
+    col_coupler.reset(new Coupler<real_t>(pattern->col_connector, col_block_size, mpi_info));
+    row_coupler.reset(new Coupler<real_t>(pattern->row_connector, row_block_size, mpi_info));
     mainBlock.reset(new SparseMatrix(type, pattern->mainPattern, row_block_size, col_block_size, true));
     col_coupleBlock.reset(new SparseMatrix(type, pattern->col_couplePattern, row_block_size, col_block_size, true));
     row_coupleBlock.reset(new SparseMatrix(type, pattern->row_couplePattern, row_block_size, col_block_size, true));
@@ -245,6 +245,10 @@ void SystemMatrix::nullifyRowsAndCols(escript::Data& row_q,
                                       escript::Data& col_q,
                                       double main_diagonal_value)
 {
+    if (row_q.isComplex() || col_q.isComplex())
+    {
+        throw PasoException("SystemMatrix::nullifyRowsAndCols: complex arguments not supported");      
+    }
     if (col_q.getDataPointSize() != getColumnBlockSize()) {
         throw PasoException("nullifyRowsAndCols: column block size does not match the number of components of column mask.");
     } else if (row_q.getDataPointSize() != getRowBlockSize()) {
@@ -258,8 +262,8 @@ void SystemMatrix::nullifyRowsAndCols(escript::Data& row_q,
     col_q.expand();
     row_q.requireWrite();
     col_q.requireWrite();
-    double* mask_row = row_q.getSampleDataRW(0);
-    double* mask_col = col_q.getSampleDataRW(0);
+    double* mask_row = row_q.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
+    double* mask_col = col_q.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
 
     if (mpi_info->size > 1) {
         if (type & MATRIX_FORMAT_CSC) {
@@ -309,6 +313,10 @@ void SystemMatrix::resetValues(bool preserveSolverData)
 void SystemMatrix::setToSolution(escript::Data& out, escript::Data& in,
                                  boost::python::object& options) const
 {
+    if (in.isComplex() || out.isComplex())
+    {
+        throw PasoException("SystemMatrix::setToSolution: complex arguments not supported.");
+    }
     options.attr("resetDiagnostics")();
     Options paso_options(options);
     if (out.getDataPointSize() != getColumnBlockSize()) {
@@ -324,14 +332,18 @@ void SystemMatrix::setToSolution(escript::Data& out, escript::Data& in,
     in.expand();
     out.requireWrite();
     in.requireWrite();
-    double* out_dp = out.getSampleDataRW(0);        
-    double* in_dp = in.getSampleDataRW(0);                
+    double* out_dp = out.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();        
+    double* in_dp = in.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();                
     solve(out_dp, in_dp, &paso_options);
     paso_options.updateEscriptDiagnostics(options);
 }
 
 void SystemMatrix::ypAx(escript::Data& y, escript::Data& x) const 
 {
+    if (x.isComplex() || y.isComplex())
+    {
+        throw PasoException("SystemMatrix::ypAx: complex arguments not supported.");
+    }  
     if (x.getDataPointSize() != getColumnBlockSize()) {
         throw PasoException("matrix vector product: column block size does not match the number of components in input.");
     } else if (y.getDataPointSize() != getRowBlockSize()) {
@@ -345,8 +357,8 @@ void SystemMatrix::ypAx(escript::Data& y, escript::Data& x) const
     y.expand();
     x.requireWrite();
     y.requireWrite();
-    double* x_dp = x.getSampleDataRW(0);
-    double* y_dp = y.getSampleDataRW(0);
+    double* x_dp = x.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
+    double* y_dp = y.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
     MatrixVector(1., x_dp, 1., y_dp);
 }
 
diff --git a/paso/src/SystemMatrix.h b/paso/src/SystemMatrix.h
index ad04a47..16befd2 100644
--- a/paso/src/SystemMatrix.h
+++ b/paso/src/SystemMatrix.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -320,8 +320,8 @@ public:
     escript::Distribution_ptr col_distribution;
     escript::JMPI mpi_info;
 
-    Coupler_ptr col_coupler;
-    Coupler_ptr row_coupler;
+    Coupler_ptr<real_t> col_coupler;
+    Coupler_ptr<real_t> row_coupler;
 
     /// main block
     SparseMatrix_ptr mainBlock;
diff --git a/paso/src/SystemMatrixPattern.cpp b/paso/src/SystemMatrixPattern.cpp
index 743ad41..3de709d 100644
--- a/paso/src/SystemMatrixPattern.cpp
+++ b/paso/src/SystemMatrixPattern.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SystemMatrixPattern.h b/paso/src/SystemMatrixPattern.h
index a51774f..e9efa4e 100644
--- a/paso/src/SystemMatrixPattern.h
+++ b/paso/src/SystemMatrixPattern.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SystemMatrixPattern_unrollBlocks.cpp b/paso/src/SystemMatrixPattern_unrollBlocks.cpp
index 501af1b..023aa27 100644
--- a/paso/src/SystemMatrixPattern_unrollBlocks.cpp
+++ b/paso/src/SystemMatrixPattern_unrollBlocks.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SystemMatrix_MatrixVector.cpp b/paso/src/SystemMatrix_MatrixVector.cpp
index b4b9676..b9ed76c 100644
--- a/paso/src/SystemMatrix_MatrixVector.cpp
+++ b/paso/src/SystemMatrix_MatrixVector.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp b/paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp
index 15fd67b..3daa387 100644
--- a/paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp
+++ b/paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -58,9 +58,9 @@ void SystemMatrix::copyRemoteCoupleBlock(bool recreatePattern)
     for (index_t i=0; i<num_main_cols; ++i)
         cols[i] = offset + i;
 
-    Coupler_ptr coupler;
+    Coupler_ptr<real_t> coupler;
     if (!global_id) {
-        coupler.reset(new Coupler(col_coupler->connector, 1, mpi_info));
+        coupler.reset(new Coupler<real_t>(col_coupler->connector, 1, mpi_info));
         coupler->startCollect(cols);
     }
 
diff --git a/paso/src/SystemMatrix_debug.cpp b/paso/src/SystemMatrix_debug.cpp
index dd13c68..c59aeee 100644
--- a/paso/src/SystemMatrix_debug.cpp
+++ b/paso/src/SystemMatrix_debug.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -42,8 +42,8 @@ void SystemMatrix::fillWithGlobalCoordinates(double f1)
     const index_t col_offset = col_distribution->getFirstComponent();
     double* cols = new double[m];
     double* rows = new double[n];
-    Coupler_ptr col_couple(new Coupler(col_coupler->connector, 1, mpi_info));
-    Coupler_ptr row_couple(new Coupler(col_coupler->connector, 1, mpi_info));
+    Coupler_ptr<real_t> col_couple(new Coupler<real_t>(col_coupler->connector, 1, mpi_info));
+    Coupler_ptr<real_t> row_couple(new Coupler<real_t>(col_coupler->connector, 1, mpi_info));
 
 #pragma omp parallel for
     for (dim_t i=0; i<n; ++i)
diff --git a/paso/src/SystemMatrix_extendedRows.cpp b/paso/src/SystemMatrix_extendedRows.cpp
index 20d44e9..8bcec1a 100644
--- a/paso/src/SystemMatrix_extendedRows.cpp
+++ b/paso/src/SystemMatrix_extendedRows.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -54,9 +54,9 @@ void SystemMatrix::extendedRowsForST(dim_t* degree_ST, index_t* offset_ST,
     for (i=0; i<num_main_cols; ++i)
         cols[i] = offset + i;
 
-    Coupler_ptr coupler;
+    Coupler_ptr<real_t> coupler;
     if (global_id == NULL) {
-        coupler.reset(new Coupler(col_coupler->connector, 1, mpi_info));
+        coupler.reset(new Coupler<real_t>(col_coupler->connector, 1, mpi_info));
         coupler->startCollect(cols);
     }
 
@@ -85,7 +85,7 @@ void SystemMatrix::extendedRowsForST(dim_t* degree_ST, index_t* offset_ST,
     }
 
     // sending/receiving the degree_ST
-    coupler.reset(new Coupler(row_coupler->connector, 1, mpi_info));
+    coupler.reset(new Coupler<real_t>(row_coupler->connector, 1, mpi_info));
     coupler->startCollect(rows);
 
     // prepare ST with global ID
diff --git a/paso/src/SystemMatrix_loadMM.cpp b/paso/src/SystemMatrix_loadMM.cpp
index 0bd8bf7..dc72cdd 100644
--- a/paso/src/SystemMatrix_loadMM.cpp
+++ b/paso/src/SystemMatrix_loadMM.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/SystemMatrix_mergeMainAndCouple.cpp b/paso/src/SystemMatrix_mergeMainAndCouple.cpp
index 95737d7..a1ec392 100644
--- a/paso/src/SystemMatrix_mergeMainAndCouple.cpp
+++ b/paso/src/SystemMatrix_mergeMainAndCouple.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -95,7 +95,7 @@ void SystemMatrix::mergeMainAndCouple_CSR_OFFSET0(index_t** p_ptr, index_t** p_i
     }
 
     double* rows = NULL;
-    Coupler_ptr coupler;
+    Coupler_ptr<real_t> coupler;
     if (global_id == NULL) {
         // prepare for global coordinates in colCoupleBlock, the results are
         // in coupler->recv_buffer
@@ -104,7 +104,7 @@ void SystemMatrix::mergeMainAndCouple_CSR_OFFSET0(index_t** p_ptr, index_t** p_i
 #pragma omp parallel for
         for (index_t i=0; i<main_num_rows; ++i)
             rows[i] = row_offset+i;
-        coupler.reset(new Coupler(col_coupler->connector, 1, mpi_info));
+        coupler.reset(new Coupler<real_t>(col_coupler->connector, 1, mpi_info));
         coupler->startCollect(rows);
     }
 
@@ -202,7 +202,7 @@ void SystemMatrix::mergeMainAndCouple_CSR_OFFSET0_Block(index_t** p_ptr, index_t
     }
 
     double* rows = NULL;
-    Coupler_ptr coupler;
+    Coupler_ptr<real_t> coupler;
     if (global_id == NULL) {
         // prepare for global coordinates in colCoupleBlock, the results are
         // in coupler->recv_buffer
@@ -211,7 +211,7 @@ void SystemMatrix::mergeMainAndCouple_CSR_OFFSET0_Block(index_t** p_ptr, index_t
 #pragma omp parallel for
         for (index_t i=0; i<main_num_rows; ++i)
             rows[i]=row_offset+i;
-        coupler.reset(new Coupler(col_coupler->connector, 1, mpi_info));
+        coupler.reset(new Coupler<real_t>(col_coupler->connector, 1, mpi_info));
         coupler->startCollect(rows);
     }
 
diff --git a/paso/src/TFQMR.cpp b/paso/src/TFQMR.cpp
index af4951f..03e2c69 100644
--- a/paso/src/TFQMR.cpp
+++ b/paso/src/TFQMR.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/Transport.cpp b/paso/src/Transport.cpp
index 5e3cf08..a1fb39d 100644
--- a/paso/src/Transport.cpp
+++ b/paso/src/Transport.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -95,18 +95,23 @@ void TransportProblem::setToSolution(escript::Data& out, escript::Data& u0,
                                      escript::Data& source, double dt,
                                      bp::object& options)
 {
+    if (out.isComplex() || u0.isComplex() || source.isComplex())
+    {
+        throw ValueError("setToSolution: complex arguments not supported");
+    }
+  
     Options paso_options(options);
     options.attr("resetDiagnostics")();
     if (out.getDataPointSize() != getBlockSize()) {
-        throw ValueError("solve: block size of solution does not match block size of transport problems.");
+        throw ValueError("setToSolution: block size of solution does not match block size of transport problems.");
     } else if (source.getDataPointSize() != getBlockSize()) {
-        throw ValueError("solve: block size of source term does not match block size of transport problems.");
+        throw ValueError("setToSolution: block size of source term does not match block size of transport problems.");
     } else if (out.getFunctionSpace() != getFunctionSpace()) {
-        throw ValueError("solve: function spaces of solution and of transport problem don't match.");
+        throw ValueError("setToSolution: function spaces of solution and of transport problem don't match.");
     } else if (source.getFunctionSpace() != getFunctionSpace()) {
-        throw ValueError("solve: function spaces of source term and of transport problem don't match.");
+        throw ValueError("setToSolution: function spaces of source term and of transport problem don't match.");
     } else if (dt <= 0.) {
-        throw ValueError("solve: time increment dt needs to be positive.");
+        throw ValueError("setToSolution: time increment dt needs to be positive.");
     }
     out.expand();
     source.expand();
@@ -114,9 +119,9 @@ void TransportProblem::setToSolution(escript::Data& out, escript::Data& u0,
     out.requireWrite();
     source.requireWrite();
     u0.requireWrite();
-    double* out_dp = out.getSampleDataRW(0);
-    double* u0_dp = u0.getSampleDataRW(0);
-    double* source_dp = source.getSampleDataRW(0);
+    double* out_dp = out.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
+    double* u0_dp = u0.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
+    double* source_dp = source.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
     solve(out_dp, dt, u0_dp, source_dp, &paso_options);
     paso_options.updateEscriptDiagnostics(options);
 }
@@ -124,6 +129,10 @@ void TransportProblem::setToSolution(escript::Data& out, escript::Data& u0,
 void TransportProblem::copyConstraint(escript::Data& source, escript::Data& q,
                                       escript::Data& r)
 {
+    if (source.isComplex() || q.isComplex() || r.isComplex())
+    {
+        throw ValueError("copyConstraint: complex arguments not supported.");
+    }
     if (q.getDataPointSize() != getBlockSize()) {
         throw ValueError("copyConstraint: block size does not match the number of components of constraint mask.");
     } else if (q.getFunctionSpace() != getFunctionSpace()) {
@@ -169,15 +178,15 @@ void TransportProblem::copyConstraint(escript::Data& source, escript::Data& q,
     r.requireWrite();
     source.requireWrite();
     q.requireWrite();
-    double* r_dp = r.getSampleDataRW(0);
-    double* source_dp = source.getSampleDataRW(0);
-    double* q_dp = q.getSampleDataRW(0);
+    double* r_dp = r.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
+    double* source_dp = source.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
+    double* q_dp = q.getExpandedVectorReference(static_cast<escript::DataTypes::real_t>(0)).data();
     setUpConstraint(q_dp);
     insertConstraint(r_dp, source_dp);
 #endif
 }
 
-void TransportProblem::resetTransport() const
+void TransportProblem::resetTransport(bool preserveSolverData) const
 {
     const dim_t n = transport_matrix->getTotalNumRows();
     transport_matrix->setValues(0.);
diff --git a/paso/src/Transport.h b/paso/src/Transport.h
index ac39559..1e4e25a 100644
--- a/paso/src/Transport.h
+++ b/paso/src/Transport.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -44,7 +44,7 @@ public:
 
     ~TransportProblem();
 
-    virtual void resetTransport() const;
+    virtual void resetTransport(bool preserveSolverData) const;
 
     void solve(double* u, double dt, double* u0, double* q, Options* options);
 
diff --git a/paso/src/Transport_solve.cpp b/paso/src/Transport_solve.cpp
index c0f192e..3766136 100644
--- a/paso/src/Transport_solve.cpp
+++ b/paso/src/Transport_solve.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/UMFPACK.cpp b/paso/src/UMFPACK.cpp
index ad7319d..8ef611f 100644
--- a/paso/src/UMFPACK.cpp
+++ b/paso/src/UMFPACK.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/UMFPACK.h b/paso/src/UMFPACK.h
index 19b09c1..3e8cda0 100644
--- a/paso/src/UMFPACK.h
+++ b/paso/src/UMFPACK.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/mmio.cpp b/paso/src/mmio.cpp
index e1c9f5d..2874f30 100644
--- a/paso/src/mmio.cpp
+++ b/paso/src/mmio.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/mmio.h b/paso/src/mmio.h
index b5e152e..675029e 100644
--- a/paso/src/mmio.h
+++ b/paso/src/mmio.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/performance.cpp b/paso/src/performance.cpp
index 4c582e1..9680b8e 100644
--- a/paso/src/performance.cpp
+++ b/paso/src/performance.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/performance.h b/paso/src/performance.h
index f6c47b6..2b09b81 100644
--- a/paso/src/performance.h
+++ b/paso/src/performance.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/paso/src/solve.cpp b/paso/src/solve.cpp
index c2973e4..e18c97a 100644
--- a/paso/src/solve.cpp
+++ b/paso/src/solve.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/pycad/py_src/SConscript b/pycad/py_src/SConscript
index a516889..cacb346 100644
--- a/pycad/py_src/SConscript
+++ b/pycad/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/pycad/py_src/Triangle.py b/pycad/py_src/Triangle.py
index bc7104e..73d1965 100644
--- a/pycad/py_src/Triangle.py
+++ b/pycad/py_src/Triangle.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/__init__.py b/pycad/py_src/__init__.py
index f4a3ce5..a799af2 100644
--- a/pycad/py_src/__init__.py
+++ b/pycad/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/design.py b/pycad/py_src/design.py
index b53a684..542167f 100644
--- a/pycad/py_src/design.py
+++ b/pycad/py_src/design.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/extras.py b/pycad/py_src/extras.py
index 8e034ac..133c75f 100644
--- a/pycad/py_src/extras.py
+++ b/pycad/py_src/extras.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/gmsh.py b/pycad/py_src/gmsh.py
index 019046e..5128e94 100644
--- a/pycad/py_src/gmsh.py
+++ b/pycad/py_src/gmsh.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/primitives.py b/pycad/py_src/primitives.py
index 86c2f67..d2dc173 100644
--- a/pycad/py_src/primitives.py
+++ b/pycad/py_src/primitives.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/shapes.py b/pycad/py_src/shapes.py
index e826f14..a736976 100644
--- a/pycad/py_src/shapes.py
+++ b/pycad/py_src/shapes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/py_src/transformations.py b/pycad/py_src/transformations.py
index 5928bad..23861e4 100644
--- a/pycad/py_src/transformations.py
+++ b/pycad/py_src/transformations.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pycad/test/python/SConscript b/pycad/test/python/SConscript
index 1678c08..3ce991a 100644
--- a/pycad/test/python/SConscript
+++ b/pycad/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/pycad/test/python/run_pycad_test.py b/pycad/test/python/run_pycad_test.py
index 6007749..18c3111 100644
--- a/pycad/test/python/run_pycad_test.py
+++ b/pycad/test/python/run_pycad_test.py
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -17,7 +17,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/pythonMPI/src/SConscript b/pythonMPI/src/SConscript
index 16e2deb..84ca94b 100644
--- a/pythonMPI/src/SConscript
+++ b/pythonMPI/src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/pythonMPI/src/ScriptMPI.cpp b/pythonMPI/src/ScriptMPI.cpp
index ae45b63..709b87c 100644
--- a/pythonMPI/src/ScriptMPI.cpp
+++ b/pythonMPI/src/ScriptMPI.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/pythonMPI/src/ScriptMPIredirect.cpp b/pythonMPI/src/ScriptMPIredirect.cpp
index e6938b1..5b80f6b 100644
--- a/pythonMPI/src/ScriptMPIredirect.cpp
+++ b/pythonMPI/src/ScriptMPIredirect.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/SConscript b/ripley/SConscript
index 1e2ca78..739ecc6 100644
--- a/ripley/SConscript
+++ b/ripley/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/generators/lamebuilder.py b/ripley/generators/lamebuilder.py
index cab98e0..461ab20 100644
--- a/ripley/generators/lamebuilder.py
+++ b/ripley/generators/lamebuilder.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/generators/lamesource.py b/ripley/generators/lamesource.py
index d921ac0..483a63d 100644
--- a/ripley/generators/lamesource.py
+++ b/ripley/generators/lamesource.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/py_src/MultiResolutionDomain.py b/ripley/py_src/MultiResolutionDomain.py
index fd8b664..3ea6fab 100644
--- a/ripley/py_src/MultiResolutionDomain.py
+++ b/ripley/py_src/MultiResolutionDomain.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/py_src/SConscript b/ripley/py_src/SConscript
index f392058..693f4b0 100644
--- a/ripley/py_src/SConscript
+++ b/ripley/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/py_src/__init__.py b/ripley/py_src/__init__.py
index f3b03a9..c860c22 100644
--- a/ripley/py_src/__init__.py
+++ b/ripley/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,7 +19,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/src/AbstractAssembler.h b/ripley/src/AbstractAssembler.h
index bba0c67..71ccd00 100644
--- a/ripley/src/AbstractAssembler.h
+++ b/ripley/src/AbstractAssembler.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/Brick.cpp b/ripley/src/Brick.cpp
index 747576b..6a4dff6 100644
--- a/ripley/src/Brick.cpp
+++ b/ripley/src/Brick.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -30,9 +30,19 @@
 #endif
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
+
+
+
 #ifdef ESYS_HAVE_SILO
 #include <silo.h>
 #ifdef ESYS_MPI
@@ -157,6 +167,8 @@ Brick::Brick(dim_t n0, dim_t n1, dim_t n2, double x0, double y0, double z0,
                 warn = true;
                 break;
         }
+        // reset spacing
+        m_dx[0] = l0/n0;
     }
     if ((n1+1)%d1 > 0) {
         switch (getDecompositionPolicy()) {
@@ -168,6 +180,8 @@ Brick::Brick(dim_t n0, dim_t n1, dim_t n2, double x0, double y0, double z0,
                 warn = true;
                 break;
         }
+        // reset spacing
+        m_dx[1] = l1/n1;
     }
     if ((n2+1)%d2 > 0) {
         switch (getDecompositionPolicy()) {
@@ -179,6 +193,8 @@ Brick::Brick(dim_t n0, dim_t n1, dim_t n2, double x0, double y0, double z0,
                 warn = true;
                 break;
         }
+        // reset spacing
+        m_dx[2] = l2/n2;
     }
 
     if ((d0 > 1 && (n0+1)/d0<2) || (d1 > 1 && (n1+1)/d1<2) || (d2 > 1 && (n2+1)/d2<2))
@@ -279,6 +295,181 @@ bool Brick::operator==(const escript::AbstractDomain& other) const
     return false;
 }
 
+#ifdef NETCDF4
+
+void Brick::readNcGrid(escript::Data& out, string filename, string varname,
+            const ReaderParameters& params) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    using namespace netCDF;
+    // check destination function space
+    dim_t myN0, myN1, myN2;
+    if (out.getFunctionSpace().getTypeCode() == Nodes) {
+        myN0 = m_NN[0];
+        myN1 = m_NN[1];
+        myN2 = m_NN[2];
+    } else if (out.getFunctionSpace().getTypeCode() == Elements ||
+                out.getFunctionSpace().getTypeCode() == ReducedElements) {
+        myN0 = m_NE[0];
+        myN1 = m_NE[1];
+        myN2 = m_NE[2];
+    } else
+        throw ValueError("readNcGrid(): invalid function space for output data object");
+
+    if (params.first.size() != 3)
+        throw ValueError("readNcGrid(): argument 'first' must have 3 entries");
+
+    if (params.numValues.size() != 3)
+        throw ValueError("readNcGrid(): argument 'numValues' must have 3 entries");
+
+    if (params.multiplier.size() != 3)
+        throw ValueError("readNcGrid(): argument 'multiplier' must have 3 entries");
+    for (size_t i=0; i<params.multiplier.size(); i++)
+        if (params.multiplier[i]<1)
+            throw ValueError("readNcGrid(): all multipliers must be positive");
+
+    // check file existence and size
+        
+    NcFile f;
+    if (!openNcFile(f, filename))
+    {
+        throw RipleyException("readNcGrid(): cannot open file");
+    }    
+    NcVar var = f.getVar(varname.c_str());
+    if (var.isNull())
+        throw RipleyException("readNcGrid(): invalid variable name");
+
+    // TODO: rank>0 data support
+    const int numComp = out.getDataPointSize();
+    if (numComp > 1)
+        throw RipleyException("readNcGrid(): only scalar data supported");
+
+    const int dims = var.getDimCount();
+    vector<long> edges(dims);
+    std::vector< NcDim > vard=var.getDims();
+    for (size_t i=0;i<vard.size();++i)
+    {
+        edges[i]=vard[i].getSize();
+    }
+
+    // is this a slice of the data object (dims!=3)?
+    // note the expected ordering of edges (as in numpy: z,y,x)
+    if ( (dims==3 && (params.numValues[2] > edges[0] ||
+                      params.numValues[1] > edges[1] ||
+                      params.numValues[0] > edges[2]))
+            || (dims==2 && params.numValues[2]>1)
+            || (dims==1 && (params.numValues[2]>1 || params.numValues[1]>1)) ) {
+        throw RipleyException("readNcGrid(): not enough data in file");
+    }
+
+    // check if this rank contributes anything
+    if (params.first[0] >= m_offset[0]+myN0 ||
+            params.first[0]+params.numValues[0]*params.multiplier[0] <= m_offset[0] ||
+            params.first[1] >= m_offset[1]+myN1 ||
+            params.first[1]+params.numValues[1]*params.multiplier[1] <= m_offset[1] ||
+            params.first[2] >= m_offset[2]+myN2 ||
+            params.first[2]+params.numValues[2]*params.multiplier[2] <= m_offset[2]) {
+        return;
+    }
+
+    // now determine how much this rank has to write
+
+    // first coordinates in data object to write to
+    const dim_t first0 = max(dim_t(0), params.first[0]-m_offset[0]);
+    const dim_t first1 = max(dim_t(0), params.first[1]-m_offset[1]);
+    const dim_t first2 = max(dim_t(0), params.first[2]-m_offset[2]);
+    // indices to first value in file (not accounting for reverse yet)
+    dim_t idx0 = max(dim_t(0), m_offset[0]-params.first[0]);
+    dim_t idx1 = max(dim_t(0), m_offset[1]-params.first[1]);
+    dim_t idx2 = max(dim_t(0), m_offset[2]-params.first[2]);
+    // number of values to read
+    const dim_t num0 = min(params.numValues[0]-idx0, myN0-first0);
+    const dim_t num1 = min(params.numValues[1]-idx1, myN1-first1);
+    const dim_t num2 = min(params.numValues[2]-idx2, myN2-first2);
+
+    // make sure we read the right block if going backwards through file
+    if (params.reverse[0])
+        idx0 = edges[dims-1]-num0-idx0;
+    if (dims>1 && params.reverse[1])
+        idx1 = edges[dims-2]-num1-idx1;
+    if (dims>2 && params.reverse[2])
+        idx2 = edges[dims-3]-num2-idx2;
+
+
+    vector<double> values(num0*num1*num2);
+    vector<size_t> startindex;
+    vector<size_t> counts;
+    if (dims==3) {
+        //var->set_cur(idx2, idx1, idx0);             // from old API
+        startindex.push_back(idx2);
+        startindex.push_back(idx1);
+        startindex.push_back(idx0);
+        counts.push_back(num2);
+        counts.push_back(num1);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    } else if (dims==2) {
+        // var->set_cur(idx1, idx0);                // from old API
+        startindex.push_back(idx1);
+        startindex.push_back(idx0);
+        counts.push_back(num1);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    } else {
+        //var->set_cur(idx0);
+        //var->get(&values[0], num0);
+        startindex.push_back(idx0);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    }
+
+    const int dpp = out.getNumDataPointsPerSample();
+    out.requireWrite();
+
+    // helpers for reversing
+    const dim_t x0 = (params.reverse[0] ? num0-1 : 0);
+    const int x_mult = (params.reverse[0] ? -1 : 1);
+    const dim_t y0 = (params.reverse[1] ? num1-1 : 0);
+    const int y_mult = (params.reverse[1] ? -1 : 1);
+    const dim_t z0 = (params.reverse[2] ? num2-1 : 0);
+    const int z_mult = (params.reverse[2] ? -1 : 1);
+
+    for (index_t z=0; z<num2; z++) {
+        for (index_t y=0; y<num1; y++) {
+#pragma omp parallel for
+            for (index_t x=0; x<num0; x++) {
+                const dim_t baseIndex = first0+x*params.multiplier[0]
+                                     +(first1+y*params.multiplier[1])*myN0
+                                     +(first2+z*params.multiplier[2])*myN0*myN1;
+                const dim_t srcIndex=(z0+z_mult*z)*num1*num0
+                                  +(y0+y_mult*y)*num0
+                                  +(x0+x_mult*x);
+                if (!bm::isnan(values[srcIndex])) {
+                    for (index_t m2=0; m2<params.multiplier[2]; m2++) {
+                        for (index_t m1=0; m1<params.multiplier[1]; m1++) {
+                            for (index_t m0=0; m0<params.multiplier[0]; m0++) {
+                                const dim_t dataIndex = baseIndex+m0
+                                               +m1*myN0
+                                               +m2*myN0*myN1;
+                                double* dest = out.getSampleDataRW(dataIndex);
+                                for (index_t q=0; q<dpp; q++) {
+                                    *dest++ = values[srcIndex];
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+#else
+    throw RipleyException("readNcGrid(): not compiled with netCDF support");
+#endif
+}
+
+
+#else
+
 void Brick::readNcGrid(escript::Data& out, string filename, string varname,
             const ReaderParameters& params) const
 {
@@ -426,6 +617,8 @@ void Brick::readNcGrid(escript::Data& out, string filename, string varname,
 #endif
 }
 
+#endif
+
 void Brick::readBinaryGridFromZipped(escript::Data& out, string filename,
                            const ReaderParameters& params) const
 {
@@ -1511,7 +1704,21 @@ void Brick::assembleCoordinates(escript::Data& arg) const
 }
 
 //protected
-void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
+void Brick::assembleGradient(escript::Data& out,
+                             const escript::Data& in) const
+{
+    if (out.isComplex() != in.isComplex())
+        throw ValueError("Gradient: input & output complexity must match.");
+    else if (in.isComplex())
+        assembleGradientImpl<cplx_t>(out, in);
+    else
+        assembleGradientImpl<real_t>(out, in);
+}
+
+//protected
+template<typename Scalar>
+void Brick::assembleGradientImpl(escript::Data& out,
+                                 const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const double C0 = .044658198738520451079;
@@ -1524,45 +1731,46 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
     const dim_t NE0 = m_NE[0];
     const dim_t NE1 = m_NE[1];
     const dim_t NE2 = m_NE[2];
+    const Scalar zero = static_cast<Scalar>(0);
 
     if (out.getFunctionSpace().getTypeCode() == Elements) {
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<Scalar> f_000(numComp, zero);
+            vector<Scalar> f_001(numComp, zero);
+            vector<Scalar> f_010(numComp, zero);
+            vector<Scalar> f_011(numComp, zero);
+            vector<Scalar> f_100(numComp, zero);
+            vector<Scalar> f_101(numComp, zero);
+            vector<Scalar> f_110(numComp, zero);
+            vector<Scalar> f_111(numComp, zero);
 #pragma omp for
             for (index_t k2=0; k2 < NE2; ++k2) {
                 for (index_t k1=0; k1 < NE1; ++k1) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(INDEX3(k0,k1,k2,NE0,NE1));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(INDEX3(k0,k1,k2,NE0,NE1), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_100[i]-f_000[i])*C5 + (f_111[i]-f_011[i])*C0 + (f_101[i]+f_110[i]-f_001[i]-f_010[i])*C1) / m_dx[0];
-                            const double V1=((f_110[i]-f_010[i])*C5 + (f_101[i]-f_001[i])*C0 + (f_100[i]+f_111[i]-f_000[i]-f_011[i])*C1) / m_dx[0];
-                            const double V2=((f_101[i]-f_001[i])*C5 + (f_110[i]-f_010[i])*C0 + (f_100[i]+f_111[i]-f_000[i]-f_011[i])*C1) / m_dx[0];
-                            const double V3=((f_111[i]-f_011[i])*C5 + (f_100[i]-f_000[i])*C0 + (f_101[i]+f_110[i]-f_001[i]-f_010[i])*C1) / m_dx[0];
-                            const double V4=((f_010[i]-f_000[i])*C5 + (f_111[i]-f_101[i])*C0 + (f_011[i]+f_110[i]-f_001[i]-f_100[i])*C1) / m_dx[1];
-                            const double V5=((f_110[i]-f_100[i])*C5 + (f_011[i]-f_001[i])*C0 + (f_010[i]+f_111[i]-f_000[i]-f_101[i])*C1) / m_dx[1];
-                            const double V6=((f_011[i]-f_001[i])*C5 + (f_110[i]-f_100[i])*C0 + (f_010[i]+f_111[i]-f_000[i]-f_101[i])*C1) / m_dx[1];
-                            const double V7=((f_111[i]-f_101[i])*C5 + (f_010[i]-f_000[i])*C0 + (f_011[i]+f_110[i]-f_001[i]-f_100[i])*C1) / m_dx[1];
-                            const double V8=((f_001[i]-f_000[i])*C5 + (f_111[i]-f_110[i])*C0 + (f_011[i]+f_101[i]-f_010[i]-f_100[i])*C1) / m_dx[2];
-                            const double V9=((f_101[i]-f_100[i])*C5 + (f_011[i]-f_010[i])*C0 + (f_001[i]+f_111[i]-f_000[i]-f_110[i])*C1) / m_dx[2];
-                            const double V10=((f_011[i]-f_010[i])*C5 + (f_101[i]-f_100[i])*C0 + (f_001[i]+f_111[i]-f_000[i]-f_110[i])*C1) / m_dx[2];
-                            const double V11=((f_111[i]-f_110[i])*C5 + (f_001[i]-f_000[i])*C0 + (f_011[i]+f_101[i]-f_010[i]-f_100[i])*C1) / m_dx[2];
+                            const Scalar V0=((f_100[i]-f_000[i])*C5 + (f_111[i]-f_011[i])*C0 + (f_101[i]+f_110[i]-f_001[i]-f_010[i])*C1) / m_dx[0];
+                            const Scalar V1=((f_110[i]-f_010[i])*C5 + (f_101[i]-f_001[i])*C0 + (f_100[i]+f_111[i]-f_000[i]-f_011[i])*C1) / m_dx[0];
+                            const Scalar V2=((f_101[i]-f_001[i])*C5 + (f_110[i]-f_010[i])*C0 + (f_100[i]+f_111[i]-f_000[i]-f_011[i])*C1) / m_dx[0];
+                            const Scalar V3=((f_111[i]-f_011[i])*C5 + (f_100[i]-f_000[i])*C0 + (f_101[i]+f_110[i]-f_001[i]-f_010[i])*C1) / m_dx[0];
+                            const Scalar V4=((f_010[i]-f_000[i])*C5 + (f_111[i]-f_101[i])*C0 + (f_011[i]+f_110[i]-f_001[i]-f_100[i])*C1) / m_dx[1];
+                            const Scalar V5=((f_110[i]-f_100[i])*C5 + (f_011[i]-f_001[i])*C0 + (f_010[i]+f_111[i]-f_000[i]-f_101[i])*C1) / m_dx[1];
+                            const Scalar V6=((f_011[i]-f_001[i])*C5 + (f_110[i]-f_100[i])*C0 + (f_010[i]+f_111[i]-f_000[i]-f_101[i])*C1) / m_dx[1];
+                            const Scalar V7=((f_111[i]-f_101[i])*C5 + (f_010[i]-f_000[i])*C0 + (f_011[i]+f_110[i]-f_001[i]-f_100[i])*C1) / m_dx[1];
+                            const Scalar V8=((f_001[i]-f_000[i])*C5 + (f_111[i]-f_110[i])*C0 + (f_011[i]+f_101[i]-f_010[i]-f_100[i])*C1) / m_dx[2];
+                            const Scalar V9=((f_101[i]-f_100[i])*C5 + (f_011[i]-f_010[i])*C0 + (f_001[i]+f_111[i]-f_000[i]-f_110[i])*C1) / m_dx[2];
+                            const Scalar V10=((f_011[i]-f_010[i])*C5 + (f_101[i]-f_100[i])*C0 + (f_001[i]+f_111[i]-f_000[i]-f_110[i])*C1) / m_dx[2];
+                            const Scalar V11=((f_111[i]-f_110[i])*C5 + (f_001[i]-f_000[i])*C0 + (f_011[i]+f_101[i]-f_010[i]-f_100[i])*C1) / m_dx[2];
                             o[INDEX3(i,0,0,numComp,3)] = V0;
                             o[INDEX3(i,1,0,numComp,3)] = V4;
                             o[INDEX3(i,2,0,numComp,3)] = V8;
@@ -1596,27 +1804,27 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<Scalar> f_000(numComp, zero);
+            vector<Scalar> f_001(numComp, zero);
+            vector<Scalar> f_010(numComp, zero);
+            vector<Scalar> f_011(numComp, zero);
+            vector<Scalar> f_100(numComp, zero);
+            vector<Scalar> f_101(numComp, zero);
+            vector<Scalar> f_110(numComp, zero);
+            vector<Scalar> f_111(numComp, zero);
 #pragma omp for
             for (index_t k2=0; k2 < NE2; ++k2) {
                 for (index_t k1=0; k1 < NE1; ++k1) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(INDEX3(k0,k1,k2,NE0,NE1));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(INDEX3(k0,k1,k2,NE0,NE1), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_100[i]+f_101[i]+f_110[i]+f_111[i]-f_000[i]-f_001[i]-f_010[i]-f_011[i])*C3 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_010[i]+f_011[i]+f_110[i]+f_111[i]-f_000[i]-f_001[i]-f_100[i]-f_101[i])*C3 / m_dx[1];
@@ -1630,32 +1838,32 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<Scalar> f_000(numComp, zero);
+            vector<Scalar> f_001(numComp, zero);
+            vector<Scalar> f_010(numComp, zero);
+            vector<Scalar> f_011(numComp, zero);
+            vector<Scalar> f_100(numComp, zero);
+            vector<Scalar> f_101(numComp, zero);
+            vector<Scalar> f_110(numComp, zero);
+            vector<Scalar> f_111(numComp, zero);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k1=0; k1 < NE1; ++k1) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,NE1));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(1,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(1,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(1,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(1,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,NE1), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_010[i]-f_000[i])*C6 + (f_011[i]-f_001[i])*C2) / m_dx[1];
-                            const double V1=((f_010[i]-f_000[i])*C2 + (f_011[i]-f_001[i])*C6) / m_dx[1];
-                            const double V2=((f_001[i]-f_000[i])*C6 + (f_010[i]-f_011[i])*C2) / m_dx[2];
-                            const double V3=((f_001[i]-f_000[i])*C2 + (f_011[i]-f_010[i])*C6) / m_dx[2];
+                            const Scalar V0=((f_010[i]-f_000[i])*C6 + (f_011[i]-f_001[i])*C2) / m_dx[1];
+                            const Scalar V1=((f_010[i]-f_000[i])*C2 + (f_011[i]-f_001[i])*C6) / m_dx[1];
+                            const Scalar V2=((f_001[i]-f_000[i])*C6 + (f_010[i]-f_011[i])*C2) / m_dx[2];
+                            const Scalar V3=((f_001[i]-f_000[i])*C2 + (f_011[i]-f_010[i])*C6) / m_dx[2];
                             o[INDEX3(i,0,0,numComp,3)] = ((f_100[i]-f_000[i])*C5 + (f_111[i]-f_011[i])*C0 + (f_101[i]+f_110[i]-f_001[i]-f_010[i])*C1) / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = V0;
                             o[INDEX3(i,2,0,numComp,3)] = V2;
@@ -1676,20 +1884,20 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k1=0; k1 < NE1; ++k1) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,NE1));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,NE1), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_110[i]-f_100[i])*C6 + (f_111[i]-f_101[i])*C2) / m_dx[1];
-                            const double V1=((f_110[i]-f_100[i])*C2 + (f_111[i]-f_101[i])*C6) / m_dx[1];
-                            const double V2=((f_101[i]-f_100[i])*C6 + (f_111[i]-f_110[i])*C2) / m_dx[2];
-                            const double V3=((f_101[i]-f_100[i])*C2 + (f_111[i]-f_110[i])*C6) / m_dx[2];
+                            const Scalar V0=((f_110[i]-f_100[i])*C6 + (f_111[i]-f_101[i])*C2) / m_dx[1];
+                            const Scalar V1=((f_110[i]-f_100[i])*C2 + (f_111[i]-f_101[i])*C6) / m_dx[1];
+                            const Scalar V2=((f_101[i]-f_100[i])*C6 + (f_111[i]-f_110[i])*C2) / m_dx[2];
+                            const Scalar V3=((f_101[i]-f_100[i])*C2 + (f_111[i]-f_110[i])*C6) / m_dx[2];
                             o[INDEX3(i,0,0,numComp,3)] = ((f_100[i]-f_000[i])*C5 + (f_111[i]-f_011[i])*C0 + (f_101[i]+f_110[i]-f_001[i]-f_010[i])*C1) / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = V0;
                             o[INDEX3(i,2,0,numComp,3)] = V2;
@@ -1710,19 +1918,19 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_100[i]-f_000[i])*C6 + (f_101[i]-f_001[i])*C2) / m_dx[0];
-                            const double V1=((f_001[i]-f_000[i])*C6 + (f_101[i]-f_100[i])*C2) / m_dx[2];
-                            const double V2=((f_001[i]-f_000[i])*C2 + (f_101[i]-f_100[i])*C6) / m_dx[2];
+                            const Scalar V0=((f_100[i]-f_000[i])*C6 + (f_101[i]-f_001[i])*C2) / m_dx[0];
+                            const Scalar V1=((f_001[i]-f_000[i])*C6 + (f_101[i]-f_100[i])*C2) / m_dx[2];
+                            const Scalar V2=((f_001[i]-f_000[i])*C2 + (f_101[i]-f_100[i])*C6) / m_dx[2];
                             o[INDEX3(i,0,0,numComp,3)] = V0;
                             o[INDEX3(i,1,0,numComp,3)] = ((f_010[i]-f_000[i])*C5 + (f_111[i]-f_101[i])*C0 + (f_011[i]+f_110[i]-f_001[i]-f_100[i])*C1) / m_dx[1];
                             o[INDEX3(i,2,0,numComp,3)] = V1;
@@ -1743,20 +1951,20 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_110[i]-f_010[i])*C6 + (f_111[i]-f_011[i])*C2) / m_dx[0];
-                            const double V1=((f_110[i]-f_010[i])*C2 + (f_111[i]-f_011[i])*C6) / m_dx[0];
-                            const double V2=((f_011[i]-f_010[i])*C6 + (f_111[i]-f_110[i])*C2) / m_dx[2];
-                            const double V3=((f_011[i]-f_010[i])*C2 + (f_111[i]-f_110[i])*C6) / m_dx[2];
+                            const Scalar V0=((f_110[i]-f_010[i])*C6 + (f_111[i]-f_011[i])*C2) / m_dx[0];
+                            const Scalar V1=((f_110[i]-f_010[i])*C2 + (f_111[i]-f_011[i])*C6) / m_dx[0];
+                            const Scalar V2=((f_011[i]-f_010[i])*C6 + (f_111[i]-f_110[i])*C2) / m_dx[2];
+                            const Scalar V3=((f_011[i]-f_010[i])*C2 + (f_111[i]-f_110[i])*C6) / m_dx[2];
                             o[INDEX3(i,0,0,numComp,3)] = V0;
                             o[INDEX3(i,1,0,numComp,3)] = ((f_010[i]-f_000[i])*C5 + (f_111[i]-f_101[i])*C0 + (f_011[i]+f_110[i]-f_001[i]-f_100[i])*C1) / m_dx[1];
                             o[INDEX3(i,2,0,numComp,3)] = V2;
@@ -1777,20 +1985,20 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_100[i]-f_000[i])*C6 + (f_110[i]-f_010[i])*C2) / m_dx[0];
-                            const double V1=((f_100[i]-f_000[i])*C2 + (f_110[i]-f_010[i])*C6) / m_dx[0];
-                            const double V2=((f_010[i]-f_000[i])*C6 + (f_110[i]-f_100[i])*C2) / m_dx[1];
-                            const double V3=((f_010[i]-f_000[i])*C2 + (f_110[i]-f_100[i])*C6) / m_dx[1];
+                            const Scalar V0=((f_100[i]-f_000[i])*C6 + (f_110[i]-f_010[i])*C2) / m_dx[0];
+                            const Scalar V1=((f_100[i]-f_000[i])*C2 + (f_110[i]-f_010[i])*C6) / m_dx[0];
+                            const Scalar V2=((f_010[i]-f_000[i])*C6 + (f_110[i]-f_100[i])*C2) / m_dx[1];
+                            const Scalar V3=((f_010[i]-f_000[i])*C2 + (f_110[i]-f_100[i])*C6) / m_dx[1];
                             o[INDEX3(i,0,0,numComp,3)] = V0;
                             o[INDEX3(i,1,0,numComp,3)] = V2;
                             o[INDEX3(i,2,0,numComp,3)] = ((f_001[i]-f_000[i])*C5 + (f_111[i]-f_110[i])*C0 + (f_011[i]+f_101[i]-f_010[i]-f_100[i])*C1) / m_dx[2];
@@ -1811,20 +2019,20 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
-                            const double V0=((f_101[i]-f_001[i])*C6 + (f_111[i]-f_011[i])*C2) / m_dx[0];
-                            const double V1=((f_101[i]-f_001[i])*C2 + (f_111[i]-f_011[i])*C6) / m_dx[0];
-                            const double V2=((f_011[i]-f_001[i])*C6 + (f_111[i]-f_101[i])*C2) / m_dx[1];
-                            const double V3=((f_011[i]-f_001[i])*C2 + (f_111[i]-f_101[i])*C6) / m_dx[1];
+                            const Scalar V0=((f_101[i]-f_001[i])*C6 + (f_111[i]-f_011[i])*C2) / m_dx[0];
+                            const Scalar V1=((f_101[i]-f_001[i])*C2 + (f_111[i]-f_011[i])*C6) / m_dx[0];
+                            const Scalar V2=((f_011[i]-f_001[i])*C6 + (f_111[i]-f_101[i])*C2) / m_dx[1];
+                            const Scalar V3=((f_011[i]-f_001[i])*C2 + (f_111[i]-f_101[i])*C6) / m_dx[1];
                             o[INDEX3(i,0,0,numComp,3)] = V0;
                             o[INDEX3(i,1,0,numComp,3)] = V2;
                             o[INDEX3(i,2,0,numComp,3)] = ((f_001[i]-f_000[i])*C5 + (f_111[i]-f_110[i])*C0 + (f_011[i]+f_101[i]-f_010[i]-f_100[i])*C1) / m_dx[2];
@@ -1846,27 +2054,27 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<Scalar> f_000(numComp, zero);
+            vector<Scalar> f_001(numComp, zero);
+            vector<Scalar> f_010(numComp, zero);
+            vector<Scalar> f_011(numComp, zero);
+            vector<Scalar> f_100(numComp, zero);
+            vector<Scalar> f_101(numComp, zero);
+            vector<Scalar> f_110(numComp, zero);
+            vector<Scalar> f_111(numComp, zero);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k1=0; k1 < NE1; ++k1) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,NE1));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(1,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(1,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(1,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(1,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,NE1), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_100[i]+f_101[i]+f_110[i]+f_111[i]-f_000[i]-f_001[i]-f_010[i]-f_011[i])*C3 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_010[i]+f_011[i]-f_000[i]-f_001[i])*C4 / m_dx[1];
@@ -1879,15 +2087,15 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k1=0; k1 < NE1; ++k1) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,NE1));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(m_NN[0]-2,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,NE1), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_100[i]+f_101[i]+f_110[i]+f_111[i]-f_000[i]-f_001[i]-f_010[i]-f_011[i])*C3 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_110[i]+f_111[i]-f_100[i]-f_101[i])*C4 / m_dx[1];
@@ -1900,15 +2108,15 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_100[i]+f_101[i]-f_000[i]-f_001[i])*C4 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_010[i]+f_011[i]+f_110[i]+f_111[i]-f_000[i]-f_001[i]-f_100[i]-f_101[i])*C3 / m_dx[1];
@@ -1921,15 +2129,15 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k2=0; k2 < NE2; ++k2) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-2,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-2,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_110[i]+f_111[i]-f_010[i]-f_011[i])*C4 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_010[i]+f_011[i]+f_110[i]+f_111[i]-f_000[i]-f_001[i]-f_100[i]-f_101[i])*C3 / m_dx[1];
@@ -1942,15 +2150,15 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_100[i]+f_110[i]-f_000[i]-f_010[i])*C4 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_010[i]+f_110[i]-f_000[i]-f_100[i])*C4 / m_dx[1];
@@ -1963,15 +2171,15 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
                     for (index_t k0=0; k0 < NE0; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,NE0));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-2, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), zero), numComp*sizeof(Scalar));
+                        Scalar* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,NE0), zero);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX3(i,0,0,numComp,3)] = (f_101[i]+f_111[i]-f_001[i]-f_011[i])*C4 / m_dx[0];
                             o[INDEX3(i,1,0,numComp,3)] = (f_011[i]+f_111[i]-f_001[i]-f_101[i])*C4 / m_dx[1];
@@ -1984,33 +2192,57 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
     }
 }
 
+// instantiate our two supported versions
+template
+void Brick::assembleGradientImpl<real_t>(escript::Data& out,
+                                         const escript::Data& in) const;
+
+template
+void Brick::assembleGradientImpl<cplx_t>(escript::Data& out,
+                                         const escript::Data& in) const;
+
+//protected
+void Brick::assembleIntegrate(vector<real_t>& integrals, const escript::Data& arg) const
+{
+    assembleIntegrateImpl<real_t>(integrals, arg);
+}
+
 //protected
-void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& arg) const
+void Brick::assembleIntegrate(vector<cplx_t>& integrals, const escript::Data& arg) const
+{
+    assembleIntegrateImpl<cplx_t>(integrals, arg);
+}
+
+//private
+template<typename Scalar>
+void Brick::assembleIntegrateImpl(vector<Scalar>& integrals, const escript::Data& arg) const
 {
     const dim_t numComp = arg.getDataPointSize();
     const index_t left = (m_offset[0]==0 ? 0 : 1);
     const index_t bottom = (m_offset[1]==0 ? 0 : 1);
     const index_t front = (m_offset[2]==0 ? 0 : 1);
     const int fs = arg.getFunctionSpace().getTypeCode();
+    const Scalar zero = static_cast<Scalar>(0);
+
     if (fs == Elements && arg.actsExpanded()) {
-        const double w_0 = m_dx[0]*m_dx[1]*m_dx[2]/8.;
+        const real_t w_0 = m_dx[0]*m_dx[1]*m_dx[2]/8.;
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
+            vector<Scalar> int_local(numComp, zero);
 #pragma omp for nowait
             for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(INDEX3(k0, k1, k2, m_NE[0], m_NE[1]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
-                            const double f_4 = f[INDEX2(i,4,numComp)];
-                            const double f_5 = f[INDEX2(i,5,numComp)];
-                            const double f_6 = f[INDEX2(i,6,numComp)];
-                            const double f_7 = f[INDEX2(i,7,numComp)];
+                        const Scalar* f = arg.getSampleDataRO(INDEX3(k0, k1, k2, m_NE[0], m_NE[1]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
+                            const Scalar f_4 = f[INDEX2(i,4,numComp)];
+                            const Scalar f_5 = f[INDEX2(i,5,numComp)];
+                            const Scalar f_6 = f[INDEX2(i,6,numComp)];
+                            const Scalar f_7 = f[INDEX2(i,7,numComp)];
                             int_local[i]+=(f_0+f_1+f_2+f_3+f_4+f_5+f_6+f_7)*w_0;
                         }  // end of component loop i
                     } // end of k0 loop
@@ -2018,50 +2250,50 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
             } // end of k2 loop
 
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
 
     } else if (fs==ReducedElements || (fs==Elements && !arg.actsExpanded())) {
-        const double w_0 = m_dx[0]*m_dx[1]*m_dx[2];
+        const real_t w_0 = m_dx[0]*m_dx[1]*m_dx[2];
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
+            vector<Scalar> int_local(numComp, zero);
 #pragma omp for nowait
             for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(INDEX3(k0, k1, k2, m_NE[0], m_NE[1]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_0;
+                        const Scalar* f = arg.getSampleDataRO(INDEX3(k0, k1, k2, m_NE[0], m_NE[1]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_0;
                         }  // end of component loop i
                     } // end of k0 loop
                 } // end of k1 loop
             } // end of k2 loop
 
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
 
     } else if (fs == FaceElements && arg.actsExpanded()) {
-        const double w_0 = m_dx[1]*m_dx[2]/4.;
-        const double w_1 = m_dx[0]*m_dx[2]/4.;
-        const double w_2 = m_dx[0]*m_dx[1]/4.;
+        const real_t w_0 = m_dx[1]*m_dx[2]/4.;
+        const real_t w_1 = m_dx[0]*m_dx[2]/4.;
+        const real_t w_2 = m_dx[0]*m_dx[1]/4.;
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
+            vector<Scalar> int_local(numComp, zero);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
-                            int_local[i]+=(f_0+f_1+f_2+f_3)*w_0;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
+                            int_local[i] += (f_0+f_1+f_2+f_3)*w_0;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2071,12 +2303,12 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
                             int_local[i]+=(f_0+f_1+f_2+f_3)*w_0;
                         }  // end of component loop i
                     } // end of k1 loop
@@ -2087,12 +2319,12 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
                             int_local[i]+=(f_0+f_1+f_2+f_3)*w_1;
                         }  // end of component loop i
                     } // end of k1 loop
@@ -2103,13 +2335,13 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
-                            int_local[i]+=(f_0+f_1+f_2+f_3)*w_1;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
+                            int_local[i] += (f_0+f_1+f_2+f_3)*w_1;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2119,13 +2351,13 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
-                            int_local[i]+=(f_0+f_1+f_2+f_3)*w_2;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
+                            int_local[i] += (f_0+f_1+f_2+f_3)*w_2;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2135,12 +2367,12 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            const double f_0 = f[INDEX2(i,0,numComp)];
-                            const double f_1 = f[INDEX2(i,1,numComp)];
-                            const double f_2 = f[INDEX2(i,2,numComp)];
-                            const double f_3 = f[INDEX2(i,3,numComp)];
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            const Scalar f_0 = f[INDEX2(i,0,numComp)];
+                            const Scalar f_1 = f[INDEX2(i,1,numComp)];
+                            const Scalar f_2 = f[INDEX2(i,2,numComp)];
+                            const Scalar f_3 = f[INDEX2(i,3,numComp)];
                             int_local[i]+=(f_0+f_1+f_2+f_3)*w_2;
                         }  // end of component loop i
                     } // end of k1 loop
@@ -2148,24 +2380,24 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
             }
 
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
 
     } else if (fs==ReducedFaceElements || (fs==FaceElements && !arg.actsExpanded())) {
-        const double w_0 = m_dx[1]*m_dx[2];
-        const double w_1 = m_dx[0]*m_dx[2];
-        const double w_2 = m_dx[0]*m_dx[1];
+        const real_t w_0 = m_dx[1]*m_dx[2];
+        const real_t w_1 = m_dx[0]*m_dx[2];
+        const real_t w_2 = m_dx[0]*m_dx[1];
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
+            vector<Scalar> int_local(numComp, zero);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_0;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_0;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2175,9 +2407,9 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_0;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_0;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2187,9 +2419,9 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_1;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_1;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2199,9 +2431,9 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k2 = front; k2 < front+m_ownNE[2]; ++k2) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_1;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_1;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2211,9 +2443,9 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_2;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_2;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -2223,17 +2455,17 @@ void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& ar
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                     for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                        const double* f = arg.getSampleDataRO(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]));
-                        for (index_t i=0; i < numComp; ++i) {
-                            int_local[i]+=f[i]*w_2;
+                        const Scalar* f = arg.getSampleDataRO(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]), zero);
+                        for (index_t i = 0; i < numComp; ++i) {
+                            int_local[i] += f[i]*w_2;
                         }  // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
             }
 
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
     } // function space selector
 }
@@ -3037,34 +3269,72 @@ void Brick::interpolateNodesOnElements(escript::Data& out,
                                        const escript::Data& in,
                                        bool reduced) const
 {
+    if (out.isComplex()!=in.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");   
+    }
+    if (out.isComplex())
+    {
+        interpolateNodesOnElementsWorker(out, in, reduced, escript::DataTypes::cplx_t(0));    
+    }
+    else
+    {
+        interpolateNodesOnElementsWorker(out, in, reduced, escript::DataTypes::real_t(0));    
+    }  
+}
+//protected
+void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
+                                    bool reduced) const
+{
+    if (out.isComplex()!=in.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");   
+    }
+    if (out.isComplex())
+    {
+        interpolateNodesOnFacesWorker(out, in, reduced, escript::DataTypes::cplx_t(0));    
+    }
+    else
+    {
+        interpolateNodesOnFacesWorker(out, in, reduced, escript::DataTypes::real_t(0));    
+    }      
+}
+
+
+//private
+template <typename S>
+void Brick::interpolateNodesOnElementsWorker(escript::Data& out,
+                                       const escript::Data& in,
+                                       bool reduced, S sentinel) const                                       
+{
     const dim_t numComp = in.getDataPointSize();
     if (reduced) {
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<S> f_000(numComp);
+            vector<S> f_001(numComp);
+            vector<S> f_010(numComp);
+            vector<S> f_011(numComp);
+            vector<S> f_100(numComp);
+            vector<S> f_101(numComp);
+            vector<S> f_110(numComp);
+            vector<S> f_111(numComp);
 #pragma omp for
             for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                 for (index_t k1=0; k1 < m_NE[1]; ++k1) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(INDEX3(k0,k1,k2,m_NE[0],m_NE[1]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(INDEX3(k0,k1,k2,m_NE[0],m_NE[1]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_001[i] + f_010[i] + f_011[i] + f_100[i] + f_101[i] + f_110[i] + f_111[i])/8;
+                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_001[i] + f_010[i] + f_011[i] + f_100[i] + f_101[i] + f_110[i] + f_111[i])/static_cast<S>(8);
                         } // end of component loop i
                     } // end of k0 loop
                 } // end of k1 loop
@@ -3072,33 +3342,33 @@ void Brick::interpolateNodesOnElements(escript::Data& out,
         } // end of parallel section
     } else {
         out.requireWrite();
-        const double c0 = .0094373878376559314545;
-        const double c1 = .035220810900864519624;
-        const double c2 = .13144585576580214704;
-        const double c3 = .49056261216234406855;
+        const S c0 = .0094373878376559314545;
+        const S c1 = .035220810900864519624;
+        const S c2 = .13144585576580214704;
+        const S c3 = .49056261216234406855;
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<S> f_000(numComp);
+            vector<S> f_001(numComp);
+            vector<S> f_010(numComp);
+            vector<S> f_011(numComp);
+            vector<S> f_100(numComp);
+            vector<S> f_101(numComp);
+            vector<S> f_110(numComp);
+            vector<S> f_111(numComp);
 #pragma omp for
             for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                 for (index_t k1=0; k1 < m_NE[1]; ++k1) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(INDEX3(k0,k1,k2,m_NE[0],m_NE[1]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(INDEX3(k0,k1,k2,m_NE[0],m_NE[1]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_000[i]*c3 + f_111[i]*c0 + c2*(f_001[i] + f_010[i] + f_100[i]) + c1*(f_011[i] + f_101[i] + f_110[i]);
                             o[INDEX2(i,numComp,1)] = f_011[i]*c0 + f_100[i]*c3 + c2*(f_000[i] + f_101[i] + f_110[i]) + c1*(f_001[i] + f_010[i] + f_111[i]);
@@ -3116,34 +3386,35 @@ void Brick::interpolateNodesOnElements(escript::Data& out,
     }
 }
 
-//protected
-void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
-                                    bool reduced) const
+//private
+template <typename S>
+void Brick::interpolateNodesOnFacesWorker(escript::Data& out, const escript::Data& in,
+                                    bool reduced, S sentinel) const
 {
     const dim_t numComp = in.getDataPointSize();
     if (reduced) {
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<S> f_000(numComp);
+            vector<S> f_001(numComp);
+            vector<S> f_010(numComp);
+            vector<S> f_011(numComp);
+            vector<S> f_100(numComp);
+            vector<S> f_101(numComp);
+            vector<S> f_110(numComp);
+            vector<S> f_111(numComp);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k1=0; k1 < m_NE[1]; ++k1) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_001[i] + f_010[i] + f_011[i])/4;
+                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_001[i] + f_010[i] + f_011[i])/static_cast<S>(4);
                         } // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -3152,13 +3423,13 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k1=0; k1 < m_NE[1]; ++k1) {
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_100[i] + f_101[i] + f_110[i] + f_111[i])/4;
+                            o[INDEX2(i,numComp,0)] = (f_100[i] + f_101[i] + f_110[i] + f_111[i])/static_cast<S>(4);
                         } // end of component loop i
                     } // end of k1 loop
                 } // end of k2 loop
@@ -3167,13 +3438,13 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_001[i] + f_100[i] + f_101[i])/4;
+                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_001[i] + f_100[i] + f_101[i])/static_cast<S>(4);
                         } // end of component loop i
                     } // end of k0 loop
                 } // end of k2 loop
@@ -3182,13 +3453,13 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_010[i] + f_011[i] + f_110[i] + f_111[i])/4;
+                            o[INDEX2(i,numComp,0)] = (f_010[i] + f_011[i] + f_110[i] + f_111[i])/static_cast<S>(4);
                         } // end of component loop i
                     } // end of k0 loop
                 } // end of k2 loop
@@ -3197,13 +3468,13 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k1=0; k1 < m_NE[1]; ++k1) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_010[i] + f_100[i] + f_110[i])/4;
+                            o[INDEX2(i,numComp,0)] = (f_000[i] + f_010[i] + f_100[i] + f_110[i])/static_cast<S>(4);
                         } // end of component loop i
                     } // end of k0 loop
                 } // end of k1 loop
@@ -3212,13 +3483,13 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k1=0; k1 < m_NE[1]; ++k1) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
-                            o[INDEX2(i,numComp,0)] = (f_001[i] + f_011[i] + f_101[i] + f_111[i])/4;
+                            o[INDEX2(i,numComp,0)] = (f_001[i] + f_011[i] + f_101[i] + f_111[i])/static_cast<S>(4);
                         } // end of component loop i
                     } // end of k0 loop
                 } // end of k1 loop
@@ -3226,28 +3497,28 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
         } // end of parallel section
     } else {
         out.requireWrite();
-        const double c0 = 0.044658198738520451079;
-        const double c1 = 0.16666666666666666667;
-        const double c2 = 0.62200846792814621559;
+        const S c0 = 0.044658198738520451079;
+        const S c1 = 0.16666666666666666667;
+        const S c2 = 0.62200846792814621559;
 #pragma omp parallel
         {
-            vector<double> f_000(numComp);
-            vector<double> f_001(numComp);
-            vector<double> f_010(numComp);
-            vector<double> f_011(numComp);
-            vector<double> f_100(numComp);
-            vector<double> f_101(numComp);
-            vector<double> f_110(numComp);
-            vector<double> f_111(numComp);
+            vector<S> f_000(numComp);
+            vector<S> f_001(numComp);
+            vector<S> f_010(numComp);
+            vector<S> f_011(numComp);
+            vector<S> f_100(numComp);
+            vector<S> f_101(numComp);
+            vector<S> f_110(numComp);
+            vector<S> f_111(numComp);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k1=0; k1 < m_NE[1]; ++k1) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(0,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(0,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(0,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(0,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[0]+INDEX2(k1,k2,m_NE[1]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_000[i]*c2 + f_011[i]*c0 + c1*(f_001[i] + f_010[i]);
                             o[INDEX2(i,numComp,1)] = f_001[i]*c0 + f_010[i]*c2 + c1*(f_000[i] + f_011[i]);
@@ -3261,11 +3532,11 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k1=0; k1 < m_NE[1]; ++k1) {
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(m_NN[0]-1,k1+1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[1]+INDEX2(k1,k2,m_NE[1]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_100[i]*c2 + f_111[i]*c0 + c1*(f_101[i] + f_110[i]);
                             o[INDEX2(i,numComp,1)] = f_101[i]*c0 + f_110[i]*c2 + c1*(f_100[i] + f_111[i]);
@@ -3279,11 +3550,11 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,0,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,0,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,0,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,0,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[2]+INDEX2(k0,k2,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_000[i]*c2 + f_101[i]*c0 + c1*(f_001[i] + f_100[i]);
                             o[INDEX2(i,numComp,1)] = f_001[i]*c0 + f_100[i]*c2 + c1*(f_000[i] + f_101[i]);
@@ -3297,11 +3568,11 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k2=0; k2 < m_NE[2]; ++k2) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,m_NN[1]-1,k2+1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[3]+INDEX2(k0,k2,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_010[i]*c2 + f_111[i]*c0 + c1*(f_011[i] + f_110[i]);
                             o[INDEX2(i,numComp,1)] = f_011[i]*c0 + f_110[i]*c2 + c1*(f_010[i] + f_111[i]);
@@ -3315,11 +3586,11 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k1=0; k1 < m_NE[1]; ++k1) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]));
+                        memcpy(&f_000[0], in.getSampleDataRO(INDEX3(k0,k1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_010[0], in.getSampleDataRO(INDEX3(k0,k1+1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_100[0], in.getSampleDataRO(INDEX3(k0+1,k1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_110[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,0, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[4]+INDEX2(k0,k1,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_000[i]*c2 + f_110[i]*c0 + c1*(f_010[i] + f_100[i]);
                             o[INDEX2(i,numComp,1)] = f_010[i]*c0 + f_100[i]*c2 + c1*(f_000[i] + f_110[i]);
@@ -3333,11 +3604,11 @@ void Brick::interpolateNodesOnFaces(escript::Data& out, const escript::Data& in,
 #pragma omp for nowait
                 for (index_t k1=0; k1 < m_NE[1]; ++k1) {
                     for (index_t k0=0; k0 < m_NE[0]; ++k0) {
-                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1])), numComp*sizeof(double));
-                        double* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]));
+                        memcpy(&f_001[0], in.getSampleDataRO(INDEX3(k0,k1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_011[0], in.getSampleDataRO(INDEX3(k0,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_101[0], in.getSampleDataRO(INDEX3(k0+1,k1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        memcpy(&f_111[0], in.getSampleDataRO(INDEX3(k0+1,k1+1,m_NN[2]-1, m_NN[0],m_NN[1]), sentinel), numComp*sizeof(S));
+                        S* o = out.getSampleDataRW(m_faceOffset[5]+INDEX2(k0,k1,m_NE[0]), sentinel);
                         for (index_t i=0; i < numComp; ++i) {
                             o[INDEX2(i,numComp,0)] = f_001[i]*c2 + f_111[i]*c0 + c1*(f_011[i] + f_101[i]);
                             o[INDEX2(i,numComp,1)] = f_011[i]*c0 + f_101[i]*c2 + c1*(f_001[i] + f_111[i]);
diff --git a/ripley/src/Brick.h b/ripley/src/Brick.h
index f79bc8c..037f5d4 100644
--- a/ripley/src/Brick.h
+++ b/ripley/src/Brick.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -222,7 +222,9 @@ protected:
     virtual void assembleCoordinates(escript::Data& arg) const;
     virtual void assembleGradient(escript::Data& out,
                                   const escript::Data& in) const;
-    virtual void assembleIntegrate(DoubleVector& integrals,
+    virtual void assembleIntegrate(std::vector<real_t>& integrals,
+                                   const escript::Data& arg) const;
+    virtual void assembleIntegrate(std::vector<cplx_t>& integrals,
                                    const escript::Data& arg) const;
     virtual std::vector<IndexVector> getConnections(bool includeShared=false) const;
 #ifdef ESYS_HAVE_TRILINOS
@@ -245,6 +247,10 @@ protected:
     void populateDofMap();
 
     template<typename Scalar>
+    void assembleGradientImpl(escript::Data& out,
+                              const escript::Data& in) const;
+
+    template<typename Scalar>
     void addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
            const std::vector<Scalar>& EM_S, const std::vector<Scalar>& EM_F,
            bool addS, bool addF, index_t firstNode, int nEq=1, int nComp=1) const;
@@ -324,6 +330,17 @@ protected:
     /// Trilinos graph structure, cached for efficiency
     mutable esys_trilinos::const_TrilinosGraph_ptr m_graph;
 #endif
+private:
+    template<typename Scalar>
+    void assembleIntegrateImpl(std::vector<Scalar>& integrals, const escript::Data& arg) const;
+
+    template <typename S>
+    void interpolateNodesOnElementsWorker(escript::Data& out,
+                                  const escript::Data& in, bool reduced, S sentinel) const;
+    template <typename S>				  
+    void interpolateNodesOnFacesWorker(escript::Data& out,
+                                         const escript::Data& in,
+                                         bool reduced, S sentinel) const;
 };
 
 ////////////////////////////// inline methods ////////////////////////////////
diff --git a/ripley/src/DefaultAssembler2D.cpp b/ripley/src/DefaultAssembler2D.cpp
index 5c4afe8..302274c 100644
--- a/ripley/src/DefaultAssembler2D.cpp
+++ b/ripley/src/DefaultAssembler2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/DefaultAssembler2D.h b/ripley/src/DefaultAssembler2D.h
index 963951d..2b23bc7 100644
--- a/ripley/src/DefaultAssembler2D.h
+++ b/ripley/src/DefaultAssembler2D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/DefaultAssembler3D.cpp b/ripley/src/DefaultAssembler3D.cpp
index f39f1dd..d34dd17 100644
--- a/ripley/src/DefaultAssembler3D.cpp
+++ b/ripley/src/DefaultAssembler3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/DefaultAssembler3D.h b/ripley/src/DefaultAssembler3D.h
index 4ed3b51..c52beaf 100644
--- a/ripley/src/DefaultAssembler3D.h
+++ b/ripley/src/DefaultAssembler3D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/LameAssembler2D.cpp b/ripley/src/LameAssembler2D.cpp
index e876ac9..df4d202 100644
--- a/ripley/src/LameAssembler2D.cpp
+++ b/ripley/src/LameAssembler2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/LameAssembler2D.h b/ripley/src/LameAssembler2D.h
index c48afd3..52f27e6 100644
--- a/ripley/src/LameAssembler2D.h
+++ b/ripley/src/LameAssembler2D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/LameAssembler3D.cpp b/ripley/src/LameAssembler3D.cpp
index 8bd2052..3b64474 100644
--- a/ripley/src/LameAssembler3D.cpp
+++ b/ripley/src/LameAssembler3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/LameAssembler3D.h b/ripley/src/LameAssembler3D.h
index a145285..5b8ec60 100644
--- a/ripley/src/LameAssembler3D.h
+++ b/ripley/src/LameAssembler3D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/MultiBrick.cpp b/ripley/src/MultiBrick.cpp
index 384daa2..1bebcb2 100644
--- a/ripley/src/MultiBrick.cpp
+++ b/ripley/src/MultiBrick.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -142,6 +142,24 @@ void MultiBrick::validateInterpolationAcross(int fsType_source,
 void MultiBrick::interpolateNodesToNodesFiner(const escript::Data& source,
         escript::Data& target, const MultiBrick& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateNodesToNodesFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateNodesToNodesFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiBrick::interpolateNodesToNodesFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiBrick& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t NN0 = m_NN[0], NN1 = m_NN[1], NN2 = m_NN[2], *otherNN = other.getNumNodesPerDim();
     const dim_t numComp = source.getDataPointSize();
@@ -150,27 +168,31 @@ void MultiBrick::interpolateNodesToNodesFiner(const escript::Data& source,
     for (dim_t nz = 0; nz < NN2 - 1; nz++) { //source nodes
         for (dim_t ny = 0; ny < NN1 - 1; ny++) {
             for (dim_t nx = 0; nx < NN0 - 1; nx++) {
-                const double *x0y0z0 = source.getSampleDataRO(INDEX3(nx,   ny,   nz, NN0, NN1));
-                const double *x0y1z0 = source.getSampleDataRO(INDEX3(nx,   ny+1, nz, NN0, NN1));
-                const double *x1y0z0 = source.getSampleDataRO(INDEX3(nx+1, ny,   nz, NN0, NN1));
-                const double *x1y1z0 = source.getSampleDataRO(INDEX3(nx+1, ny+1, nz, NN0, NN1));
-                const double *x0y0z1 = source.getSampleDataRO(INDEX3(nx,   ny,   nz+1, NN0, NN1));
-                const double *x0y1z1 = source.getSampleDataRO(INDEX3(nx,   ny+1, nz+1, NN0, NN1));
-                const double *x1y0z1 = source.getSampleDataRO(INDEX3(nx+1, ny,   nz+1, NN0, NN1));
-                const double *x1y1z1 = source.getSampleDataRO(INDEX3(nx+1, ny+1, nz+1, NN0, NN1));
-                const double origin[3] = {getLocalCoordinate(nx, 0),
+                const S *x0y0z0 = source.getSampleDataRO(INDEX3(nx,   ny,   nz, NN0, NN1), sentinel);
+                const S *x0y1z0 = source.getSampleDataRO(INDEX3(nx,   ny+1, nz, NN0, NN1), sentinel);
+                const S *x1y0z0 = source.getSampleDataRO(INDEX3(nx+1, ny,   nz, NN0, NN1), sentinel);
+                const S *x1y1z0 = source.getSampleDataRO(INDEX3(nx+1, ny+1, nz, NN0, NN1), sentinel);
+                const S *x0y0z1 = source.getSampleDataRO(INDEX3(nx,   ny,   nz+1, NN0, NN1), sentinel);
+                const S *x0y1z1 = source.getSampleDataRO(INDEX3(nx,   ny+1, nz+1, NN0, NN1), sentinel);
+                const S *x1y0z1 = source.getSampleDataRO(INDEX3(nx+1, ny,   nz+1, NN0, NN1), sentinel);
+                const S *x1y1z1 = source.getSampleDataRO(INDEX3(nx+1, ny+1, nz+1, NN0, NN1), sentinel);
+                const S origin[3] = {getLocalCoordinate(nx, 0),
                                           getLocalCoordinate(ny, 1),
                                           getLocalCoordinate(nz, 2)};
                 for (int sz = 0; sz < scaling + 1; sz++) { //target nodes                
-                    const double z = (other.getLocalCoordinate(nz*scaling+sz, 2) - origin[2]) / m_dx[2];
+                    const S z = (other.getLocalCoordinate(nz*scaling+sz, 2) - origin[2]) / m_dx[2];
+		    const S mz = static_cast<S>(1)-z;
                     for (int sy = 0; sy < scaling + 1; sy++) {
-                        const double y = (other.getLocalCoordinate(ny*scaling+sy, 1) - origin[1]) / m_dx[1];
+                        const S y = (other.getLocalCoordinate(ny*scaling+sy, 1) - origin[1]) / m_dx[1];
+			const S my = static_cast<S>(1)-y;
                         for (int sx = 0; sx < scaling + 1; sx++) {
-                            const double x = (other.getLocalCoordinate(nx*scaling+sx, 0) - origin[0]) / m_dx[0];
-                            double *out = target.getSampleDataRW(INDEX3(nx*scaling+sx, ny*scaling+sy, nz*scaling+sz, otherNN[0], otherNN[1]));
+                            const S x = (other.getLocalCoordinate(nx*scaling+sx, 0) - origin[0]) / m_dx[0];
+			    const S mx = static_cast<S>(1)-x;
+                            S *out = target.getSampleDataRW(INDEX3(nx*scaling+sx, ny*scaling+sy, nz*scaling+sz, otherNN[0], otherNN[1]), sentinel);
+			    
                             for (int comp = 0; comp < numComp; comp++) {
-                                out[comp] = x0y0z0[comp]*(1-x)*(1-y)*(1-z) + x1y0z0[comp]*x*(1-y)*(1-z) + x0y1z0[comp]*(1-x)*y*(1-z) + x1y1z0[comp]*x*y*(1-z)
-                                          + x0y0z1[comp]*(1-x)*(1-y)*z     + x1y0z1[comp]*x*(1-y)*z     + x0y1z1[comp]*(1-x)*y*z     + x1y1z1[comp]*x*y*z;
+                                out[comp] = x0y0z0[comp]*(mx)*(my)*(mz) + x1y0z0[comp]*x*(my)*(mz) + x0y1z0[comp]*(mx)*y*(mz) + x1y1z0[comp]*x*y*(mz)
+                                          + x0y0z1[comp]*(mx)*(my)*z     + x1y0z1[comp]*x*(my)*z     + x0y1z1[comp]*(mx)*y*z     + x1y1z1[comp]*x*y*z;
                             }
                         }
                     }
@@ -183,6 +205,24 @@ void MultiBrick::interpolateNodesToNodesFiner(const escript::Data& source,
 void MultiBrick::interpolateReducedToElementsFiner(const escript::Data& source,
         escript::Data& target, const MultiBrick& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateReducedToElementsFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateReducedToElementsFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}        
+
+template <typename S>
+void MultiBrick::interpolateReducedToElementsFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiBrick& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t numComp = source.getDataPointSize();
     target.requireWrite();
@@ -191,7 +231,7 @@ void MultiBrick::interpolateReducedToElementsFiner(const escript::Data& source,
     for (dim_t ez = 0; ez < m_NE[2]; ez++) {
         for (dim_t ey = 0; ey < m_NE[1]; ey++) {
             for (dim_t ex = 0; ex < m_NE[0]; ex++) {
-                const double *in = source.getSampleDataRO(INDEX3(ex, ey, ez, m_NE[0], m_NE[1]));
+                const S *in = source.getSampleDataRO(INDEX3(ex, ey, ez, m_NE[0], m_NE[1]), sentinel);
                 //for each subelement
                 for (dim_t sz = 0; sz < scaling; sz++) {
                     const dim_t tz = ez*scaling + sz;
@@ -199,9 +239,9 @@ void MultiBrick::interpolateReducedToElementsFiner(const escript::Data& source,
                         const dim_t ty = ey*scaling + sy;
                         for (dim_t sx = 0; sx < scaling; sx++) {
                             const dim_t tx = ex*scaling + sx;
-                            double *out = target.getSampleDataRW(INDEX3(tx, ty, tz, m_NE[0]*scaling, m_NE[1]*scaling));
+                            S *out = target.getSampleDataRW(INDEX3(tx, ty, tz, m_NE[0]*scaling, m_NE[1]*scaling), sentinel);
                             for (dim_t comp = 0; comp < numComp; comp++) {
-                                const double quadvalue = in[comp];
+                                const S quadvalue = in[comp];
                                 for (int i = 0; i < 8; i++) {
                                     out[comp + i*numComp] = quadvalue;
                                 }
@@ -217,6 +257,26 @@ void MultiBrick::interpolateReducedToElementsFiner(const escript::Data& source,
 void MultiBrick::interpolateReducedToReducedFiner(const escript::Data& source,
         escript::Data& target, const MultiBrick& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateReducedToReducedFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateReducedToReducedFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}   
+
+
+
+template <typename S>
+void MultiBrick::interpolateReducedToReducedFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiBrick& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t numComp = source.getDataPointSize();
     target.requireWrite();
@@ -224,13 +284,13 @@ void MultiBrick::interpolateReducedToReducedFiner(const escript::Data& source,
 #pragma omp parallel for
     for (dim_t ey = 0; ey < m_NE[1]; ey++) {
         for (dim_t ex = 0; ex < m_NE[0]; ex++) {
-            const double *in = source.getSampleDataRO(ex + ey*m_NE[0]);
+            const S *in = source.getSampleDataRO(ex + ey*m_NE[0], sentinel);
             //for each subelement
             for (dim_t sy = 0; sy < scaling; sy++) {
                 const dim_t ty = ey*scaling + sy;
                 for (dim_t sx = 0; sx < scaling; sx++) {
                     const dim_t tx = ex*scaling + sx;
-                    double *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling);
+                    S *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling, sentinel);
                     for (dim_t comp = 0; comp < numComp; comp++) {
                         out[comp] = in[comp];
                     }
@@ -243,6 +303,24 @@ void MultiBrick::interpolateReducedToReducedFiner(const escript::Data& source,
 void MultiBrick::interpolateNodesToElementsFiner(const escript::Data& source,
         escript::Data& target, const MultiBrick& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateNodesToElementsFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateNodesToElementsFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}   
+
+template <typename S>
+void MultiBrick::interpolateNodesToElementsFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiBrick& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t NE0 = m_NE[0], NE1 = m_NE[1], NE2 = m_NE[2], *theirNE = other.getNumElementsPerDim();
     const dim_t numComp = source.getDataPointSize();
@@ -251,102 +329,109 @@ void MultiBrick::interpolateNodesToElementsFiner(const escript::Data& source,
     for (dim_t ez = 0; ez < NE2; ez++) { //source nodes
         for (dim_t ey = 0; ey < NE1; ey++) {
             for (dim_t ex = 0; ex < NE0; ex++) {
-                const double *points[8] = {
-                        source.getSampleDataRO(INDEX3(ex,   ey,   ez, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex+1, ey,   ez, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex,   ey+1, ez, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex+1, ey+1, ez, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex,   ey,   ez+1, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex+1, ey,   ez+1, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex,   ey+1, ez+1, NE0+1, NE1+1)),
-                        source.getSampleDataRO(INDEX3(ex+1, ey+1, ez+1, NE0+1, NE1+1)),
+                const S *points[8] = {
+                        source.getSampleDataRO(INDEX3(ex,   ey,   ez, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex+1, ey,   ez, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex,   ey+1, ez, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex+1, ey+1, ez, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex,   ey,   ez+1, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex+1, ey,   ez+1, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex,   ey+1, ez+1, NE0+1, NE1+1), sentinel),
+                        source.getSampleDataRO(INDEX3(ex+1, ey+1, ez+1, NE0+1, NE1+1), sentinel),
                     };
-                const double origin[3] = {getLocalCoordinate(ex, 0),
+                const S origin[3] = {getLocalCoordinate(ex, 0),
                                           getLocalCoordinate(ey, 1),
                                           getLocalCoordinate(ez, 2)
                                           };
                 for (int sz = 0; sz < scaling; sz++) { //target elements
                     for (int sy = 0; sy < scaling; sy++) {
                         for (int sx = 0; sx < scaling; sx++) {
-                            const double x1 = (other.getLocalCoordinate(ex*scaling+sx, 0) - origin[0]) / m_dx[0] + FIRST_QUAD/scaling;
-                            const double x2 = x1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
-                            const double y1 = (other.getLocalCoordinate(ey*scaling+sy, 1) - origin[1]) / m_dx[1] + FIRST_QUAD/scaling;
-                            const double y2 = y1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
-                            const double z1 = (other.getLocalCoordinate(ez*scaling+sz, 2) - origin[2]) / m_dx[2] + FIRST_QUAD/scaling;
-                            const double z2 = z1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
-                            double *out = target.getSampleDataRW(INDEX3(ex*scaling+sx, ey*scaling+sy, ez*scaling+sz, theirNE[0], theirNE[1]));
+                            const S x1 = (other.getLocalCoordinate(ex*scaling+sx, 0) - origin[0]) / m_dx[0] + FIRST_QUAD/scaling;
+                            const S x2 = x1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
+                            const S y1 = (other.getLocalCoordinate(ey*scaling+sy, 1) - origin[1]) / m_dx[1] + FIRST_QUAD/scaling;
+                            const S y2 = y1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
+                            const S z1 = (other.getLocalCoordinate(ez*scaling+sz, 2) - origin[2]) / m_dx[2] + FIRST_QUAD/scaling;
+                            const S z2 = z1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
+			    const S mx1 = static_cast<S>(1)-x1;
+			    const S mx2 = static_cast<S>(1)-x2;
+			    const S my1 = static_cast<S>(1)-y1;
+			    const S my2 = static_cast<S>(1)-y2;
+			    const S mz1 = static_cast<S>(1)-z1;
+			    const S mz2 = static_cast<S>(1)-z2;
+			    
+                            S *out = target.getSampleDataRW(INDEX3(ex*scaling+sx, ey*scaling+sy, ez*scaling+sz, theirNE[0], theirNE[1]), sentinel);
                             for (int comp = 0; comp < numComp; comp++) {
                                 out[INDEX4(comp, 0, 0, 0, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x1)*(1-y1)*(1-z1)
-                                            + points[1][comp]*x1*(1-y1)*(1-z1) 
-                                            + points[2][comp]*(1-x1)*y1*(1-z1)
-                                            + points[3][comp]*x1*y1*(1-z1)
-                                            + points[4][comp]*(1-x1)*(1-y1)*z1
-                                            + points[5][comp]*x1*(1-y1)*z1 
-                                            + points[6][comp]*(1-x1)*y1*z1
+                                              points[0][comp]*(mx1)*(my1)*(mz1)
+                                            + points[1][comp]*x1*(my1)*(mz1) 
+                                            + points[2][comp]*(mx1)*y1*(mz1)
+                                            + points[3][comp]*x1*y1*(mz1)
+                                            + points[4][comp]*(mx1)*(my1)*z1
+                                            + points[5][comp]*x1*(my1)*z1 
+                                            + points[6][comp]*(mx1)*y1*z1
                                             + points[7][comp]*x1*y1*z1;
                                 out[INDEX4(comp, 1, 0, 0, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x2)*(1-y1)*(1-z1)
-                                            + points[1][comp]*x2*(1-y1)*(1-z1) 
-                                            + points[2][comp]*(1-x2)*y1*(1-z1)
-                                            + points[3][comp]*x2*y1*(1-z1)
-                                            + points[4][comp]*(1-x2)*(1-y1)*z1
-                                            + points[5][comp]*x2*(1-y1)*z1 
-                                            + points[6][comp]*(1-x2)*y1*z1
+                                              points[0][comp]*(mx2)*(my1)*(mz1)
+                                            + points[1][comp]*x2*(my1)*(mz1) 
+                                            + points[2][comp]*(mx2)*y1*(mz1)
+                                            + points[3][comp]*x2*y1*(mz1)
+                                            + points[4][comp]*(mx2)*(my1)*z1
+                                            + points[5][comp]*x2*(my1)*z1 
+                                            + points[6][comp]*(mx2)*y1*z1
                                             + points[7][comp]*x2*y1*z1;
                                 out[INDEX4(comp, 0, 1, 0, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x1)*(1-y2)*(1-z1)
-                                            + points[1][comp]*x1*(1-y2)*(1-z1) 
-                                            + points[2][comp]*(1-x1)*y2*(1-z1)
-                                            + points[3][comp]*x1*y2*(1-z1)
-                                            + points[4][comp]*(1-x1)*(1-y2)*z1
-                                            + points[5][comp]*x1*(1-y2)*z1 
-                                            + points[6][comp]*(1-x1)*y2*z1
+                                              points[0][comp]*(mx1)*(my2)*(mz1)
+                                            + points[1][comp]*x1*(my2)*(mz1) 
+                                            + points[2][comp]*(mx1)*y2*(mz1)
+                                            + points[3][comp]*x1*y2*(mz1)
+                                            + points[4][comp]*(mx1)*(my2)*z1
+                                            + points[5][comp]*x1*(my2)*z1 
+                                            + points[6][comp]*(mx1)*y2*z1
                                             + points[7][comp]*x1*y2*z1;
                                 out[INDEX4(comp, 1, 1, 0, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x2)*(1-y2)*(1-z1)
-                                            + points[1][comp]*x2*(1-y2)*(1-z1) 
-                                            + points[2][comp]*(1-x2)*y2*(1-z1)
-                                            + points[3][comp]*x2*y2*(1-z1)
-                                            + points[4][comp]*(1-x2)*(1-y2)*z1
-                                            + points[5][comp]*x2*(1-y2)*z1 
-                                            + points[6][comp]*(1-x2)*y2*z1
+                                              points[0][comp]*(mx2)*(my2)*(mz1)
+                                            + points[1][comp]*x2*(my2)*(mz1) 
+                                            + points[2][comp]*(mx2)*y2*(mz1)
+                                            + points[3][comp]*x2*y2*(mz1)
+                                            + points[4][comp]*(mx2)*(my2)*z1
+                                            + points[5][comp]*x2*(my2)*z1 
+                                            + points[6][comp]*(mx2)*y2*z1
                                             + points[7][comp]*x2*y2*z1;
                                 out[INDEX4(comp, 0, 0, 1, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x1)*(1-y1)*(1-z2)
-                                            + points[1][comp]*x1*(1-y1)*(1-z2) 
-                                            + points[2][comp]*(1-x1)*y1*(1-z2)
-                                            + points[3][comp]*x1*y1*(1-z2)
-                                            + points[4][comp]*(1-x1)*(1-y1)*z2
-                                            + points[5][comp]*x1*(1-y1)*z2 
-                                            + points[6][comp]*(1-x1)*y1*z2
+                                              points[0][comp]*(mx1)*(my1)*(mz2)
+                                            + points[1][comp]*x1*(my1)*(mz2) 
+                                            + points[2][comp]*(mx1)*y1*(mz2)
+                                            + points[3][comp]*x1*y1*(mz2)
+                                            + points[4][comp]*(mx1)*(my1)*z2
+                                            + points[5][comp]*x1*(my1)*z2 
+                                            + points[6][comp]*(mx1)*y1*z2
                                             + points[7][comp]*x1*y1*z2;
                                 out[INDEX4(comp, 1, 0, 1, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x2)*(1-y1)*(1-z2)
-                                            + points[1][comp]*x2*(1-y1)*(1-z2) 
-                                            + points[2][comp]*(1-x2)*y1*(1-z2)
-                                            + points[3][comp]*x2*y1*(1-z2)
-                                            + points[4][comp]*(1-x2)*(1-y1)*z2
-                                            + points[5][comp]*x2*(1-y1)*z2 
-                                            + points[6][comp]*(1-x2)*y1*z2
+                                              points[0][comp]*(mx2)*(my1)*(mz2)
+                                            + points[1][comp]*x2*(my1)*(mz2) 
+                                            + points[2][comp]*(mx2)*y1*(mz2)
+                                            + points[3][comp]*x2*y1*(mz2)
+                                            + points[4][comp]*(mx2)*(my1)*z2
+                                            + points[5][comp]*x2*(my1)*z2 
+                                            + points[6][comp]*(mx2)*y1*z2
                                             + points[7][comp]*x2*y1*z2;
                                 out[INDEX4(comp, 0, 1, 1, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x1)*(1-y2)*(1-z2)
-                                            + points[1][comp]*x1*(1-y2)*(1-z2) 
-                                            + points[2][comp]*(1-x1)*y2*(1-z2)
-                                            + points[3][comp]*x1*y2*(1-z2)
-                                            + points[4][comp]*(1-x1)*(1-y2)*z2
-                                            + points[5][comp]*x1*(1-y2)*z2 
-                                            + points[6][comp]*(1-x1)*y2*z2
+                                              points[0][comp]*(mx1)*(my2)*(mz2)
+                                            + points[1][comp]*x1*(my2)*(mz2) 
+                                            + points[2][comp]*(mx1)*y2*(mz2)
+                                            + points[3][comp]*x1*y2*(mz2)
+                                            + points[4][comp]*(mx1)*(my2)*z2
+                                            + points[5][comp]*x1*(my2)*z2 
+                                            + points[6][comp]*(mx1)*y2*z2
                                             + points[7][comp]*x1*y2*z2;
                                 out[INDEX4(comp, 1, 1, 1, numComp, 2, 2)] = 
-                                              points[0][comp]*(1-x2)*(1-y2)*(1-z2)
-                                            + points[1][comp]*x2*(1-y2)*(1-z2) 
-                                            + points[2][comp]*(1-x2)*y2*(1-z2)
-                                            + points[3][comp]*x2*y2*(1-z2)
-                                            + points[4][comp]*(1-x2)*(1-y2)*z2
-                                            + points[5][comp]*x2*(1-y2)*z2 
-                                            + points[6][comp]*(1-x2)*y2*z2
+                                              points[0][comp]*(mx2)*(my2)*(mz2)
+                                            + points[1][comp]*x2*(my2)*(mz2) 
+                                            + points[2][comp]*(mx2)*y2*(mz2)
+                                            + points[3][comp]*x2*y2*(mz2)
+                                            + points[4][comp]*(mx2)*(my2)*z2
+                                            + points[5][comp]*x2*(my2)*z2 
+                                            + points[6][comp]*(mx2)*y2*z2
                                             + points[7][comp]*x2*y2*z2;
                             }
                         }
@@ -360,6 +445,24 @@ void MultiBrick::interpolateNodesToElementsFiner(const escript::Data& source,
 void MultiBrick::interpolateElementsToElementsCoarser(const escript::Data& source,
         escript::Data& target, const MultiBrick& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateElementsToElementsCoarserWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateElementsToElementsCoarserWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}   
+
+template <typename S>
+void MultiBrick::interpolateElementsToElementsCoarserWorker(const escript::Data& source,
+        escript::Data& target, const MultiBrick& other, S sentinel) const
+{
     const int scaling = m_subdivisions/other.getNumSubdivisionsPerElement();
     const double scaling_volume = (1./scaling)*(1./scaling)*(1./scaling);
     const dim_t *theirNE = other.getNumElementsPerDim();
@@ -384,7 +487,7 @@ void MultiBrick::interpolateElementsToElementsCoarser(const escript::Data& sourc
     for (dim_t tz = 0; tz < theirNE[2]; tz++) {
         for (dim_t ty = 0; ty < theirNE[1]; ty++) {
             for (dim_t tx = 0; tx < theirNE[0]; tx++) {
-                double *out = target.getSampleDataRW(INDEX3(tx, ty, tz, theirNE[0], theirNE[1]));
+                S *out = target.getSampleDataRW(INDEX3(tx, ty, tz, theirNE[0], theirNE[1]), sentinel);
                 //for each subelement
                 for (dim_t sz = 0; sz < scaling; sz++) {
                     const dim_t ez = tz*scaling + sz;
@@ -392,13 +495,13 @@ void MultiBrick::interpolateElementsToElementsCoarser(const escript::Data& sourc
                         const dim_t ey = ty*scaling + sy;
                         for (dim_t sx = 0; sx < scaling; sx++) {
                             const dim_t ex = tx*scaling + sx;
-                            const double *in = source.getSampleDataRO(INDEX3(ex, ey, ez, m_NE[0], m_NE[1]));
+                            const S *in = source.getSampleDataRO(INDEX3(ex, ey, ez, m_NE[0], m_NE[1]), sentinel);
                             for (int quad = 0; quad < 8; quad++) {
                                 int lx = sx*2 + quad%2;
                                 int ly = sy*2 + (quad%4)/2;
                                 int lz = sz*2 + quad/4;
                                 for (dim_t comp = 0; comp < numComp; comp++) {
-                                    const double quadvalue = scaling_volume * in[comp + quad*numComp];
+                                    const S quadvalue = scaling_volume * in[comp + quad*numComp];
                                     out[INDEX4(comp, 0, 0, 0, numComp, 2, 2)] += quadvalue * first_lagrange[lx] * first_lagrange[ly] * first_lagrange[lz];
                                     out[INDEX4(comp, 1, 0, 0, numComp, 2, 2)] += quadvalue * second_lagrange[lx] * first_lagrange[ly] * first_lagrange[lz];
                                     out[INDEX4(comp, 0, 1, 0, numComp, 2, 2)] += quadvalue * first_lagrange[lx] * second_lagrange[ly] * first_lagrange[lz];
@@ -417,10 +520,27 @@ void MultiBrick::interpolateElementsToElementsCoarser(const escript::Data& sourc
     }
 }
 
-
 void MultiBrick::interpolateElementsToElementsFiner(const escript::Data& source,
         escript::Data& target, const MultiBrick& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateElementsToElementsFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateElementsToElementsFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}  
+
+template <typename S>
+void MultiBrick::interpolateElementsToElementsFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiBrick& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t numComp = source.getDataPointSize();
 
@@ -441,7 +561,7 @@ void MultiBrick::interpolateElementsToElementsFiner(const escript::Data& source,
     for (dim_t ez = 0; ez < m_NE[2]; ez++) {
         for (dim_t ey = 0; ey < m_NE[1]; ey++) {
             for (dim_t ex = 0; ex < m_NE[0]; ex++) {
-                const double *in = source.getSampleDataRO(INDEX3(ex, ey, ez, m_NE[0], m_NE[1]));
+                const S *in = source.getSampleDataRO(INDEX3(ex, ey, ez, m_NE[0], m_NE[1]), sentinel);
                 //for each subelement
                 for (dim_t sz = 0; sz < scaling; sz++) {
                     const dim_t tz = ez*scaling + sz;
@@ -449,13 +569,13 @@ void MultiBrick::interpolateElementsToElementsFiner(const escript::Data& source,
                         const dim_t ty = ey*scaling + sy;
                         for (dim_t sx = 0; sx < scaling; sx++) {
                             const dim_t tx = ex*scaling + sx;
-                            double *out = target.getSampleDataRW(INDEX3(tx, ty, tz, m_NE[0]*scaling, m_NE[1]*scaling));
+                            S *out = target.getSampleDataRW(INDEX3(tx, ty, tz, m_NE[0]*scaling, m_NE[1]*scaling), sentinel);
                             for (int quad = 0; quad < 8; quad++) {
                                 const int lx = scaling*2*(quad%2) + sx*2;
                                 const int ly = scaling*2*((quad%4)/2) + sy*2;
                                 const int lz = scaling*2*(quad/4) + sz*2;
                                 for (dim_t comp = 0; comp < numComp; comp++) {
-                                    const double quadvalue = in[comp + quad*numComp];
+                                    const S quadvalue = in[comp + quad*numComp];
                                     out[INDEX4(comp, 0, 0, 0, numComp, 2, 2)] += quadvalue * lagranges[lx] * lagranges[ly] * lagranges[lz];
                                     out[INDEX4(comp, 0, 1, 0, numComp, 2, 2)] += quadvalue * lagranges[lx] * lagranges[ly+1] * lagranges[lz];
                                     out[INDEX4(comp, 1, 0, 0, numComp, 2, 2)] += quadvalue * lagranges[lx+1] * lagranges[ly] * lagranges[lz];
diff --git a/ripley/src/MultiBrick.h b/ripley/src/MultiBrick.h
index 2b7cb5c..21eecd2 100644
--- a/ripley/src/MultiBrick.h
+++ b/ripley/src/MultiBrick.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -190,6 +190,23 @@ protected:
     dim_t findNode(const double *coords) const;
 
     const unsigned int m_subdivisions;
+private:
+    template <typename S>
+    void interpolateNodesToNodesFinerWorker(const escript::Data& source, escript::Data& target, const MultiBrick& other, S sentinel) const;
+    template <typename S>    
+    void interpolateNodesToElementsFinerWorker(const escript::Data& source, escript::Data& target, const MultiBrick& other, S sentinel) const;
+
+    template <typename S>    
+    void interpolateElementsToElementsCoarserWorker(const escript::Data& source, escript::Data& target, const MultiBrick& other, S sentinel) const;
+    template <typename S>
+    void interpolateElementsToElementsFinerWorker(const escript::Data& source, escript::Data& target, const MultiBrick& other, S sentinel) const;
+
+    template <typename S>
+    void interpolateReducedToElementsFinerWorker(const escript::Data& source, escript::Data& target, const MultiBrick& other, S sentinel) const;
+    template <typename S>
+    void interpolateReducedToReducedFinerWorker(const escript::Data& source, escript::Data& target, const MultiBrick& other, S sentinel) const;
+  
+    
 };
 
 
diff --git a/ripley/src/MultiRectangle.cpp b/ripley/src/MultiRectangle.cpp
index f0e7550..c78abb4 100644
--- a/ripley/src/MultiRectangle.cpp
+++ b/ripley/src/MultiRectangle.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -118,9 +118,28 @@ void MultiRectangle::validateInterpolationAcross(int fsType_source,
     }
 }
 
+
 void MultiRectangle::interpolateNodesToNodesFiner(const escript::Data& source,
         escript::Data& target, const MultiRectangle& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateNodesToNodesFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateNodesToNodesFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiRectangle::interpolateNodesToNodesFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiRectangle& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t NN0 = m_NN[0], NN1 = m_NN[1], otherNN0 = other.getNumNodesPerDim()[0];
     const dim_t numComp = source.getDataPointSize();
@@ -128,18 +147,19 @@ void MultiRectangle::interpolateNodesToNodesFiner(const escript::Data& source,
 #pragma omp parallel for
     for (dim_t ny = 0; ny < NN1 - 1; ny++) { //source nodes
         for (dim_t nx = 0; nx < NN0 - 1; nx++) {
-            const double *x0y0 = source.getSampleDataRO(ny*NN0 + nx);
-            const double *x0y1 = source.getSampleDataRO((ny+1)*NN0 + nx);
-            const double *x1y0 = source.getSampleDataRO(ny*NN0 + nx + 1);
-            const double *x1y1 = source.getSampleDataRO((ny+1)*NN0 + nx + 1);
-            const double origin[2] = {getLocalCoordinate(nx, 0), getLocalCoordinate(ny, 1)};
+            const S *x0y0 = source.getSampleDataRO(ny*NN0 + nx, sentinel);
+            const S *x0y1 = source.getSampleDataRO((ny+1)*NN0 + nx, sentinel);
+            const S *x1y0 = source.getSampleDataRO(ny*NN0 + nx + 1, sentinel);
+            const S *x1y1 = source.getSampleDataRO((ny+1)*NN0 + nx + 1, sentinel);
+            const S origin[2] = {getLocalCoordinate(nx, 0), getLocalCoordinate(ny, 1)};
             for (int sy = 0; sy < scaling + 1; sy++) { //target nodes
-                const double y = (other.getLocalCoordinate(ny*scaling+sy, 1) - origin[1]) / m_dx[1];
+                const S y = (other.getLocalCoordinate(ny*scaling+sy, 1) - origin[1]) / m_dx[1];
                 for (int sx = 0; sx < scaling + 1; sx++) {
-                    const double x = (other.getLocalCoordinate(nx*scaling+sx, 0) - origin[0]) / m_dx[0];
-                    double *out = target.getSampleDataRW(nx*scaling+sx + (ny*scaling+sy)*otherNN0);
+                    const S x = (other.getLocalCoordinate(nx*scaling+sx, 0) - origin[0]) / m_dx[0];
+                    S *out = target.getSampleDataRW(nx*scaling+sx + (ny*scaling+sy)*otherNN0, sentinel);
                     for (int comp = 0; comp < numComp; comp++) {
-                        out[comp] = x0y0[comp]*(1-x)*(1-y) + x1y0[comp]*x*(1-y) + x0y1[comp]*(1-x)*y + x1y1[comp]*x*y;
+                        out[comp] = x0y0[comp]*(static_cast<S>(1)-x)*(static_cast<S>(1)-y) 
+			   + x1y0[comp]*x*(static_cast<S>(1)-y) + x0y1[comp]*(static_cast<S>(1)-x)*y + x1y1[comp]*x*y;
                     }
                 }
             }
@@ -150,6 +170,24 @@ void MultiRectangle::interpolateNodesToNodesFiner(const escript::Data& source,
 void MultiRectangle::interpolateReducedToElementsFiner(const escript::Data& source,
         escript::Data& target, const MultiRectangle& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateReducedToElementsFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateReducedToElementsFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiRectangle::interpolateReducedToElementsFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiRectangle& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t numComp = source.getDataPointSize();
     target.requireWrite();
@@ -157,15 +195,15 @@ void MultiRectangle::interpolateReducedToElementsFiner(const escript::Data& sour
 #pragma omp parallel for
     for (dim_t ey = 0; ey < m_NE[1]; ey++) {
         for (dim_t ex = 0; ex < m_NE[0]; ex++) {
-            const double *in = source.getSampleDataRO(ex + ey*m_NE[0]);
+            const S *in = source.getSampleDataRO(ex + ey*m_NE[0], sentinel);
             //for each subelement
             for (dim_t sy = 0; sy < scaling; sy++) {
                 const dim_t ty = ey*scaling + sy;
                 for (dim_t sx = 0; sx < scaling; sx++) {
                     const dim_t tx = ex*scaling + sx;
-                    double *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling);
+                    S *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling, sentinel);
                     for (dim_t comp = 0; comp < numComp; comp++) {
-                        const double quadvalue = in[comp];
+                        const S quadvalue = in[comp];
                         out[INDEX3(comp, 0, 0, numComp, 2)] = quadvalue;
                         out[INDEX3(comp, 0, 1, numComp, 2)] = quadvalue;
                         out[INDEX3(comp, 1, 0, numComp, 2)] = quadvalue;
@@ -177,9 +215,28 @@ void MultiRectangle::interpolateReducedToElementsFiner(const escript::Data& sour
     }
 }
 
+
 void MultiRectangle::interpolateReducedToReducedFiner(const escript::Data& source,
         escript::Data& target, const MultiRectangle& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateReducedToReducedFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateReducedToReducedFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiRectangle::interpolateReducedToReducedFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiRectangle& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t numComp = source.getDataPointSize();
     target.requireWrite();
@@ -187,13 +244,13 @@ void MultiRectangle::interpolateReducedToReducedFiner(const escript::Data& sourc
 #pragma omp parallel for
     for (dim_t ey = 0; ey < m_NE[1]; ey++) {
         for (dim_t ex = 0; ex < m_NE[0]; ex++) {
-            const double *in = source.getSampleDataRO(ex + ey*m_NE[0]);
+            const S *in = source.getSampleDataRO(ex + ey*m_NE[0], sentinel);
             //for each subelement
             for (dim_t sy = 0; sy < scaling; sy++) {
                 const dim_t ty = ey*scaling + sy;
                 for (dim_t sx = 0; sx < scaling; sx++) {
                     const dim_t tx = ex*scaling + sx;
-                    double *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling);
+                    S *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling, sentinel);
                     for (dim_t comp = 0; comp < numComp; comp++) {
                         out[comp] = in[comp];
                     }
@@ -203,9 +260,28 @@ void MultiRectangle::interpolateReducedToReducedFiner(const escript::Data& sourc
     }
 }
 
+
 void MultiRectangle::interpolateNodesToElementsFiner(const escript::Data& source,
         escript::Data& target, const MultiRectangle& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateNodesToElementsFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateNodesToElementsFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiRectangle::interpolateNodesToElementsFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiRectangle& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t NE0 = m_NE[0], NE1 = m_NE[1];
     const dim_t numComp = source.getDataPointSize();
@@ -213,23 +289,27 @@ void MultiRectangle::interpolateNodesToElementsFiner(const escript::Data& source
 #pragma omp parallel for
     for (dim_t ey = 0; ey < NE1; ey++) { //source nodes
         for (dim_t ex = 0; ex < NE0; ex++) {
-            const double *x0y0 = source.getSampleDataRO(ey*(NE0+1) + ex);
-            const double *x0y1 = source.getSampleDataRO((ey+1)*(NE0+1) + ex);
-            const double *x1y0 = source.getSampleDataRO(ey*(NE0+1) + ex + 1);
-            const double *x1y1 = source.getSampleDataRO((ey+1)*(NE0+1) + ex + 1);
-            const double origin[2] = {getLocalCoordinate(ex, 0), getLocalCoordinate(ey, 1)};
+            const S *x0y0 = source.getSampleDataRO(ey*(NE0+1) + ex, sentinel);
+            const S *x0y1 = source.getSampleDataRO((ey+1)*(NE0+1) + ex, sentinel);
+            const S *x1y0 = source.getSampleDataRO(ey*(NE0+1) + ex + 1, sentinel);
+            const S *x1y1 = source.getSampleDataRO((ey+1)*(NE0+1) + ex + 1, sentinel);
+            const S origin[2] = {getLocalCoordinate(ex, 0), getLocalCoordinate(ey, 1)};
             for (int sy = 0; sy < scaling; sy++) { //target elements
                 for (int sx = 0; sx < scaling; sx++) {
-                    const double x1 = (other.getLocalCoordinate(ex*scaling+sx, 0) - origin[0]) / m_dx[0] + FIRST_QUAD/scaling;
-                    const double x2 = x1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
-                    const double y1 = (other.getLocalCoordinate(ey*scaling+sy, 1) - origin[1]) / m_dx[1] + FIRST_QUAD/scaling;
-                    const double y2 = y1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
-                    double *out = target.getSampleDataRW(ex*scaling+sx + (ey*scaling+sy)*NE0*scaling);
+                    const S x1 = (other.getLocalCoordinate(ex*scaling+sx, 0) - origin[0]) / m_dx[0] + FIRST_QUAD/scaling;
+                    const S x2 = x1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
+                    const S y1 = (other.getLocalCoordinate(ey*scaling+sy, 1) - origin[1]) / m_dx[1] + FIRST_QUAD/scaling;
+                    const S y2 = y1 + (SECOND_QUAD - FIRST_QUAD)/scaling;
+		    const S mx1=static_cast<S>(1)-x1;
+		    const S mx2=static_cast<S>(1)-x2;
+		    const S my1=static_cast<S>(1)-y1;
+		    const S my2=static_cast<S>(1)-y2;
+                    S *out = target.getSampleDataRW(ex*scaling+sx + (ey*scaling+sy)*NE0*scaling, sentinel);
                     for (int comp = 0; comp < numComp; comp++) {
-                        out[INDEX3(comp, 0, 0, numComp, 2)] = x0y0[comp]*(1-x1)*(1-y1) + x1y0[comp]*x1*(1-y1) + x0y1[comp]*(1-x1)*y1 + x1y1[comp]*x1*y1;
-                        out[INDEX3(comp, 0, 1, numComp, 2)] = x0y0[comp]*(1-x1)*(1-y2) + x1y0[comp]*x1*(1-y2) + x0y1[comp]*(1-x1)*y2 + x1y1[comp]*x1*y2;
-                        out[INDEX3(comp, 1, 0, numComp, 2)] = x0y0[comp]*(1-x2)*(1-y1) + x1y0[comp]*x2*(1-y1) + x0y1[comp]*(1-x2)*y1 + x1y1[comp]*x2*y1;
-                        out[INDEX3(comp, 1, 1, numComp, 2)] = x0y0[comp]*(1-x2)*(1-y2) + x1y0[comp]*x2*(1-y2) + x0y1[comp]*(1-x2)*y2 + x1y1[comp]*x2*y2;
+                        out[INDEX3(comp, 0, 0, numComp, 2)] = x0y0[comp]*(mx1)*(my1) + x1y0[comp]*x1*(my1) + x0y1[comp]*(mx1)*y1 + x1y1[comp]*x1*y1;
+                        out[INDEX3(comp, 0, 1, numComp, 2)] = x0y0[comp]*(mx1)*(my2) + x1y0[comp]*x1*(my2) + x0y1[comp]*(mx1)*y2 + x1y1[comp]*x1*y2;
+                        out[INDEX3(comp, 1, 0, numComp, 2)] = x0y0[comp]*(mx2)*(my1) + x1y0[comp]*x2*(my1) + x0y1[comp]*(mx2)*y1 + x1y1[comp]*x2*y1;
+                        out[INDEX3(comp, 1, 1, numComp, 2)] = x0y0[comp]*(mx2)*(my2) + x1y0[comp]*x2*(my2) + x0y1[comp]*(mx2)*y2 + x1y1[comp]*x2*y2;
                     }
                 }
             }
@@ -240,14 +320,32 @@ void MultiRectangle::interpolateNodesToElementsFiner(const escript::Data& source
 void MultiRectangle::interpolateElementsToElementsCoarser(const escript::Data& source,
         escript::Data& target, const MultiRectangle& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateElementsToElementsCoarserWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateElementsToElementsCoarserWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiRectangle::interpolateElementsToElementsCoarserWorker(const escript::Data& source,
+        escript::Data& target, const MultiRectangle& other, S sentinel) const
+{
     const int scaling = m_subdivisions/other.getNumSubdivisionsPerElement();
-    const double scaling_volume = (1./scaling)*(1./scaling);
+    const S scaling_volume = (1./scaling)*(1./scaling);
     const dim_t *theirNE = other.getNumElementsPerDim();
     const dim_t numComp = source.getDataPointSize();
 
-    vector<double> points(scaling*2, 0);
-    vector<double> first_lagrange(scaling*2, 1);
-    vector<double> second_lagrange(scaling*2, 1);
+    vector<S> points(scaling*2, 0);
+    vector<S> first_lagrange(scaling*2, 1);
+    vector<S> second_lagrange(scaling*2, 1);
     
     for (int i = 0; i < scaling*2; i+=2) {
         points[i] = (i/2 + FIRST_QUAD)/scaling;
@@ -263,18 +361,18 @@ void MultiRectangle::interpolateElementsToElementsCoarser(const escript::Data& s
 #pragma omp parallel for
     for (dim_t ty = 0; ty < theirNE[1]; ty++) {
         for (dim_t tx = 0; tx < theirNE[0]; tx++) {
-            double *out = target.getSampleDataRW(tx + ty*theirNE[0]);
+            S *out = target.getSampleDataRW(tx + ty*theirNE[0], sentinel);
             //for each subelement
             for (dim_t sy = 0; sy < scaling; sy++) {
                 const dim_t ey = ty*scaling + sy;
                 for (dim_t sx = 0; sx < scaling; sx++) {
                     const dim_t ex = tx*scaling + sx;
-                    const double *in = source.getSampleDataRO(ex + ey*m_NE[0]);
+                    const S *in = source.getSampleDataRO(ex + ey*m_NE[0], sentinel);
                     for (int quad = 0; quad < 4; quad++) {
                         int lx = sx*2 + quad%2;
                         int ly = sy*2 + quad/2;
                         for (dim_t comp = 0; comp < numComp; comp++) {
-                            const double quadvalue = scaling_volume * in[comp + quad*numComp];
+                            const S quadvalue = scaling_volume * in[comp + quad*numComp];
                             out[INDEX3(comp, 0, 0, numComp, 2)] += quadvalue * first_lagrange[lx] * first_lagrange[ly];
                             out[INDEX3(comp, 0, 1, numComp, 2)] += quadvalue * first_lagrange[lx] * second_lagrange[ly];
                             out[INDEX3(comp, 1, 0, numComp, 2)] += quadvalue * second_lagrange[lx] * first_lagrange[ly];
@@ -291,11 +389,29 @@ void MultiRectangle::interpolateElementsToElementsCoarser(const escript::Data& s
 void MultiRectangle::interpolateElementsToElementsFiner(const escript::Data& source,
         escript::Data& target, const MultiRectangle& other) const
 {
+    if (source.isComplex()!=target.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");        
+    }
+    if (source.isComplex())
+    {
+        interpolateElementsToElementsFinerWorker(source, target, other, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateElementsToElementsFinerWorker(source, target, other, escript::DataTypes::real_t(0));      
+    }
+}
+
+template <typename S>
+void MultiRectangle::interpolateElementsToElementsFinerWorker(const escript::Data& source,
+        escript::Data& target, const MultiRectangle& other, S sentinel) const
+{
     const int scaling = other.getNumSubdivisionsPerElement()/m_subdivisions;
     const dim_t numComp = source.getDataPointSize();
 
-    vector<double> points(scaling*2, 0);
-    vector<double> lagranges(scaling*4, 1);
+    vector<S> points(scaling*2, 0);
+    vector<S> lagranges(scaling*4, 1);
 
     for (int i = 0; i < scaling*2; i+=2) {
         points[i] = (i/2 + FIRST_QUAD)/scaling;
@@ -310,18 +426,18 @@ void MultiRectangle::interpolateElementsToElementsFiner(const escript::Data& sou
 #pragma omp parallel for
     for (dim_t ey = 0; ey < m_NE[1]; ey++) {
         for (dim_t ex = 0; ex < m_NE[0]; ex++) {
-            const double *in = source.getSampleDataRO(ex + ey*m_NE[0]);
+            const S *in = source.getSampleDataRO(ex + ey*m_NE[0], sentinel);
             //for each subelement
             for (dim_t sy = 0; sy < scaling; sy++) {
                 const dim_t ty = ey*scaling + sy;
                 for (dim_t sx = 0; sx < scaling; sx++) {
                     const dim_t tx = ex*scaling + sx;
-                    double *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling);
+                    S *out = target.getSampleDataRW(tx + ty*m_NE[0]*scaling, sentinel);
                     for (int quad = 0; quad < 4; quad++) {
                         const int lx = scaling*2*(quad%2) + sx*2;
                         const int ly = scaling*2*(quad/2) + sy*2;
                         for (dim_t comp = 0; comp < numComp; comp++) {
-                            const double quadvalue = in[comp + quad*numComp];
+                            const S quadvalue = in[comp + quad*numComp];
                             out[INDEX3(comp, 0, 0, numComp, 2)] += quadvalue * lagranges[lx] * lagranges[ly];
                             out[INDEX3(comp, 0, 1, numComp, 2)] += quadvalue * lagranges[lx] * lagranges[ly+1];
                             out[INDEX3(comp, 1, 0, numComp, 2)] += quadvalue * lagranges[lx+1] * lagranges[ly];
diff --git a/ripley/src/MultiRectangle.h b/ripley/src/MultiRectangle.h
index d9accad..a40256f 100644
--- a/ripley/src/MultiRectangle.h
+++ b/ripley/src/MultiRectangle.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -146,6 +146,24 @@ private:
     mutable std::vector<IndexVector> m_colIndices;
     mutable std::vector<IndexVector> m_rowIndices;
     unsigned int m_subdivisions;
+    
+    template <typename S>
+    void interpolateNodesToNodesFinerWorker(const escript::Data& source, escript::Data& target, const MultiRectangle& other, S sentinel) const;
+    template <typename S>
+    void interpolateNodesToElementsFinerWorker(const escript::Data& source, escript::Data& target, const MultiRectangle& other, S sentinel) const;
+
+    template <typename S>
+    void interpolateElementsToElementsCoarserWorker(const escript::Data& source, escript::Data& target, const MultiRectangle& other, S sentinel) const;
+    template <typename S>
+    void interpolateElementsToElementsFinerWorker(const escript::Data& source, escript::Data& target, const MultiRectangle& other, S sentinel) const;
+
+    template <typename S>
+    void interpolateReducedToElementsFinerWorker(const escript::Data& source, escript::Data& target, const MultiRectangle& other, S sentinel) const;
+    template <typename S>
+    void interpolateReducedToReducedFinerWorker(const escript::Data& source, escript::Data& target, const MultiRectangle& other, S sentinel) const;
+    
+    
+    
 };
 
 //protected
diff --git a/ripley/src/Rectangle.cpp b/ripley/src/Rectangle.cpp
index d3c8bf8..b600fb1 100644
--- a/ripley/src/Rectangle.cpp
+++ b/ripley/src/Rectangle.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -30,9 +30,18 @@
 #endif
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
+
+
 #ifdef ESYS_HAVE_SILO
 #include <silo.h>
 #ifdef ESYS_MPI
@@ -61,6 +70,11 @@ using std::copy;
 using std::ios;
 using std::fill;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
+
 namespace ripley {
 
 Rectangle::Rectangle(dim_t n0, dim_t n1, double x0, double y0, double x1,
@@ -145,6 +159,8 @@ Rectangle::Rectangle(dim_t n0, dim_t n1, double x0, double y0, double x1,
                 warn = true;
                 break;
         }
+        // reset spacing
+        m_dx[0] = l0/n0;
     }
     if ((n1+1)%d1 > 0) {
         switch (getDecompositionPolicy()) {
@@ -156,6 +172,8 @@ Rectangle::Rectangle(dim_t n0, dim_t n1, double x0, double y0, double x1,
                 warn = true;
                 break;
         }
+        // reset spacing
+        m_dx[1] = l1/n1;
     }
 
     if ((d0 > 1 && (n0+1)/d0<2) || (d1 > 1 && (n1+1)/d1<2))
@@ -241,6 +259,146 @@ bool Rectangle::operator==(const escript::AbstractDomain& other) const
     return false;
 }
 
+#ifdef NETCDF4
+void Rectangle::readNcGrid(escript::Data& out, string filename, string varname,
+            const ReaderParameters& params) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    // check destination function space
+    dim_t myN0, myN1;
+    if (out.getFunctionSpace().getTypeCode() == Nodes) {
+        myN0 = m_NN[0];
+        myN1 = m_NN[1];
+    } else if (out.getFunctionSpace().getTypeCode() == Elements ||
+                out.getFunctionSpace().getTypeCode() == ReducedElements) {
+        myN0 = m_NE[0];
+        myN1 = m_NE[1];
+    } else
+        throw ValueError("readNcGrid(): invalid function space for output data object");
+
+    if (params.first.size() != 2)
+        throw ValueError("readNcGrid(): argument 'first' must have 2 entries");
+
+    if (params.numValues.size() != 2)
+        throw ValueError("readNcGrid(): argument 'numValues' must have 2 entries");
+
+    if (params.multiplier.size() != 2)
+        throw ValueError("readNcGrid(): argument 'multiplier' must have 2 entries");
+    for (size_t i=0; i<params.multiplier.size(); i++)
+        if (params.multiplier[i]<1)
+            throw ValueError("readNcGrid(): all multipliers must be positive");
+    if (params.reverse.size() != 2)
+        throw ValueError("readNcGrid(): argument 'reverse' must have 2 entries");
+
+    NcFile f;
+    if (!openNcFile(f, filename))
+    {
+        throw RipleyException("readNcGrid(): cannot open file");
+    }       
+    
+    NcVar var = f.getVar(varname.c_str());
+    if (var.isNull())
+        throw RipleyException("readNcGrid(): invalid variable name");    
+
+    // TODO: rank>0 data support
+    const int numComp = out.getDataPointSize();
+    if (numComp > 1)
+        throw NotImplementedError("readNcGrid(): only scalar data supported");
+
+    const int dims = var.getDimCount();
+    vector<long> edges(dims);
+    std::vector< NcDim > vard=var.getDims();
+    for (size_t i=0;i<vard.size();++i)
+    {
+        edges[i]=vard[i].getSize();
+    }    
+
+    // is this a slice of the data object (dims!=2)?
+    // note the expected ordering of edges (as in numpy: y,x)
+    if ( (dims==2 && (params.numValues[1] > edges[0] || params.numValues[0] > edges[1]))
+            || (dims==1 && params.numValues[1]>1) ) {
+        throw IOError("readNcGrid(): not enough data in file");
+    }
+
+    // check if this rank contributes anything
+    if (params.first[0] >= m_offset[0]+myN0 ||
+            params.first[0]+params.numValues[0]*params.multiplier[0] <= m_offset[0] ||
+            params.first[1] >= m_offset[1]+myN1 ||
+            params.first[1]+params.numValues[1]*params.multiplier[1] <= m_offset[1])
+        return;
+
+    // now determine how much this rank has to write
+
+    // first coordinates in data object to write to
+    const dim_t first0 = max(dim_t(0), params.first[0]-m_offset[0]);
+    const dim_t first1 = max(dim_t(0), params.first[1]-m_offset[1]);
+    // indices to first value in file (not accounting for reverse yet)
+    dim_t idx0 = max(dim_t(0), m_offset[0]-params.first[0]);
+    dim_t idx1 = max(dim_t(0), m_offset[1]-params.first[1]);
+    // number of values to read
+    const dim_t num0 = min(params.numValues[0]-idx0, myN0-first0);
+    const dim_t num1 = min(params.numValues[1]-idx1, myN1-first1);
+
+    // make sure we read the right block if going backwards through file
+    if (params.reverse[0])
+        idx0 = edges[dims-1]-num0-idx0;
+    if (dims>1 && params.reverse[1])
+        idx1 = edges[dims-2]-num1-idx1;
+
+    vector<double> values(num0*num1);
+    vector<size_t> startindex;
+    vector<size_t> counts;    
+    if (dims==2) {
+//         var->set_cur(idx1, idx0);
+//         var->get(&values[0], num1, num0);
+        startindex.push_back(idx1);
+        startindex.push_back(idx0);
+        counts.push_back(num1);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);           
+    } else {
+//         var->set_cur(idx0);
+//         var->get(&values[0], num0);
+        startindex.push_back(idx0);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);           
+    }
+
+    const int dpp = out.getNumDataPointsPerSample();
+    out.requireWrite();
+
+    // helpers for reversing
+    const dim_t x0 = (params.reverse[0] ? num0-1 : 0);
+    const int x_mult = (params.reverse[0] ? -1 : 1);
+    const dim_t y0 = (params.reverse[1] ? num1-1 : 0);
+    const int y_mult = (params.reverse[1] ? -1 : 1);
+
+    for (index_t y=0; y<num1; y++) {
+#pragma omp parallel for
+        for (index_t x=0; x<num0; x++) {
+            const dim_t baseIndex = first0+x*params.multiplier[0]
+                                  +(first1+y*params.multiplier[1])*myN0;
+            const dim_t srcIndex = (y0+y_mult*y)*num0+(x0+x_mult*x);
+            if (!bm::isnan(values[srcIndex])) {
+                for (index_t m1=0; m1<params.multiplier[1]; m1++) {
+                    for (index_t m0=0; m0<params.multiplier[0]; m0++) {
+                        const dim_t dataIndex = baseIndex+m0+m1*myN0;
+                        double* dest = out.getSampleDataRW(dataIndex);
+                        for (index_t q=0; q<dpp; q++) {
+                            *dest++ = values[srcIndex];
+                        }
+                    }
+                }
+            }
+        }
+    }
+#else
+    throw RipleyException("readNcGrid(): not compiled with netCDF support");
+#endif
+}
+
+#else
+
 void Rectangle::readNcGrid(escript::Data& out, string filename, string varname,
             const ReaderParameters& params) const
 {
@@ -362,6 +520,8 @@ void Rectangle::readNcGrid(escript::Data& out, string filename, string varname,
 #endif
 }
 
+#endif
+
 void Rectangle::readBinaryGrid(escript::Data& out, string filename,
                                const ReaderParameters& params) const
 {
@@ -1186,7 +1346,21 @@ void Rectangle::assembleCoordinates(escript::Data& arg) const
 }
 
 //protected
-void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) const
+void Rectangle::assembleGradient(escript::Data& out,
+                                 const escript::Data& in) const
+{
+    if (out.isComplex() && in.isComplex())
+        assembleGradientImpl<cplx_t>(out, in);
+    else if (!out.isComplex() && !in.isComplex())
+        assembleGradientImpl<real_t>(out, in);
+    else
+        throw ValueError("Gradient: input & output complexity must match.");
+}
+
+//protected
+template<typename Scalar>
+void Rectangle::assembleGradientImpl(escript::Data& out,
+                                     const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t NE0 = m_NE[0];
@@ -1197,24 +1371,25 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
     const double cy0 = .21132486540518711775/m_dx[1];
     const double cy1 = .78867513459481288225/m_dx[1];
     const double cy2 = 1./m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
 
     if (out.getFunctionSpace().getTypeCode() == Elements) {
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<Scalar> f_00(numComp, zero);
+            vector<Scalar> f_01(numComp, zero);
+            vector<Scalar> f_10(numComp, zero);
+            vector<Scalar> f_11(numComp, zero);
 #pragma omp for
-            for (index_t k1=0; k1 < NE1; ++k1) {
-                for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]));
-                    for (index_t i=0; i < numComp; ++i) {
+            for (index_t k1 = 0; k1 < NE1; ++k1) {
+                for (index_t k0 = 0; k0 < NE0; ++k0) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]), zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_10[i]-f_00[i])*cx1 + (f_11[i]-f_01[i])*cx0;
                         o[INDEX3(i,1,0,numComp,2)] = (f_01[i]-f_00[i])*cy1 + (f_11[i]-f_10[i])*cy0;
                         o[INDEX3(i,0,1,numComp,2)] = (f_10[i]-f_00[i])*cx1 + (f_11[i]-f_01[i])*cx0;
@@ -1231,21 +1406,21 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<Scalar> f_00(numComp, zero);
+            vector<Scalar> f_01(numComp, zero);
+            vector<Scalar> f_10(numComp, zero);
+            vector<Scalar> f_11(numComp, zero);
 #pragma omp for
-            for (index_t k1=0; k1 < NE1; ++k1) {
-                for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]));
-                    for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX3(i,0,0,numComp,2)] = (f_10[i] + f_11[i] - f_00[i] - f_01[i])*cx2/2;
-                        o[INDEX3(i,1,0,numComp,2)] = (f_01[i] + f_11[i] - f_00[i] - f_10[i])*cy2/2;
+            for (index_t k1 = 0; k1 < NE1; ++k1) {
+                for (index_t k0 = 0; k0 < NE0; ++k0) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]), zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        o[INDEX3(i,0,0,numComp,2)] = (f_10[i] + f_11[i] - f_00[i] - f_01[i])*cx2 * 0.5;
+                        o[INDEX3(i,1,0,numComp,2)] = (f_01[i] + f_11[i] - f_00[i] - f_10[i])*cy2 * 0.5;
                     } // end of component loop i
                 } // end of k0 loop
             } // end of k1 loop
@@ -1254,19 +1429,19 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<Scalar> f_00(numComp, zero);
+            vector<Scalar> f_01(numComp, zero);
+            vector<Scalar> f_10(numComp, zero);
+            vector<Scalar> f_11(numComp, zero);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
-                for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[0]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
+                for (index_t k1 = 0; k1 < NE1; ++k1) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(1,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(1,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[0]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_10[i]-f_00[i])*cx1 + (f_11[i]-f_01[i])*cx0;
                         o[INDEX3(i,1,0,numComp,2)] = (f_01[i]-f_00[i])*cy2;
                         o[INDEX3(i,0,1,numComp,2)] = (f_10[i]-f_00[i])*cx0 + (f_11[i]-f_01[i])*cx1;
@@ -1276,13 +1451,13 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
             } // end of face 0
             if (m_faceOffset[1] > -1) {
 #pragma omp for nowait
-                for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[1]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
+                for (index_t k1 = 0; k1 < NE1; ++k1) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[1]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_10[i]-f_00[i])*cx1 + (f_11[i]-f_01[i])*cx0;
                         o[INDEX3(i,1,0,numComp,2)] = (f_11[i]-f_10[i])*cy2;
                         o[INDEX3(i,0,1,numComp,2)] = (f_10[i]-f_00[i])*cx0 + (f_11[i]-f_01[i])*cx1;
@@ -1292,13 +1467,13 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
             } // end of face 1
             if (m_faceOffset[2] > -1) {
 #pragma omp for nowait
-                for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[2]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
+                for (index_t k0 = 0; k0 < NE0; ++k0) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[2]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_10[i]-f_00[i])*cx2;
                         o[INDEX3(i,1,0,numComp,2)] = (f_01[i]-f_00[i])*cy1 + (f_11[i]-f_10[i])*cy0;
                         o[INDEX3(i,0,1,numComp,2)] = (f_10[i]-f_00[i])*cx2;
@@ -1308,13 +1483,13 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
             } // end of face 2
             if (m_faceOffset[3] > -1) {
 #pragma omp for nowait
-                for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-2, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-2, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[3]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
+                for (index_t k0 = 0; k0 < NE0; ++k0) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-2, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-2, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[3]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_11[i]-f_01[i])*cx2;
                         o[INDEX3(i,1,0,numComp,2)] = (f_01[i]-f_00[i])*cy1 + (f_11[i]-f_10[i])*cy0;
                         o[INDEX3(i,0,1,numComp,2)] = (f_11[i]-f_01[i])*cx2;
@@ -1328,63 +1503,63 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<Scalar> f_00(numComp, zero);
+            vector<Scalar> f_01(numComp, zero);
+            vector<Scalar> f_10(numComp, zero);
+            vector<Scalar> f_11(numComp, zero);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
-                for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[0]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX3(i,0,0,numComp,2)] = (f_10[i] + f_11[i] - f_00[i] - f_01[i])*cx2/2;
+                for (index_t k1 = 0; k1 < NE1; ++k1) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(1,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(1,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[0]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        o[INDEX3(i,0,0,numComp,2)] = (f_10[i] + f_11[i] - f_00[i] - f_01[i])*cx2 * 0.5;
                         o[INDEX3(i,1,0,numComp,2)] = (f_01[i]-f_00[i])*cy2;
                     } // end of component loop i
                 } // end of k1 loop
             } // end of face 0
             if (m_faceOffset[1] > -1) {
 #pragma omp for nowait
-                for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[1]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX3(i,0,0,numComp,2)] = (f_10[i] + f_11[i] - f_00[i] - f_01[i])*cx2/2;
+                for (index_t k1 = 0; k1 < NE1; ++k1) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(m_NN[0]-2,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[1]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        o[INDEX3(i,0,0,numComp,2)] = (f_10[i] + f_11[i] - f_00[i] - f_01[i])*cx2 * 0.5;
                         o[INDEX3(i,1,0,numComp,2)] = (f_11[i]-f_10[i])*cy2;
                     } // end of component loop i
                 } // end of k1 loop
             } // end of face 1
             if (m_faceOffset[2] > -1) {
 #pragma omp for nowait
-                for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[2]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
+                for (index_t k0 = 0; k0 < NE0; ++k0) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[2]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_10[i]-f_00[i])*cx2;
-                        o[INDEX3(i,1,0,numComp,2)] = (f_01[i] + f_11[i] - f_00[i] - f_10[i])*cy2/2;
+                        o[INDEX3(i,1,0,numComp,2)] = (f_01[i] + f_11[i] - f_00[i] - f_10[i])*cy2 * 0.5;
                     } // end of component loop i
                 } // end of k0 loop
             } // end of face 2
             if (m_faceOffset[3] > -1) {
 #pragma omp for nowait
-                for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-2, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-2, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[3]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
+                for (index_t k0 = 0; k0 < NE0; ++k0) {
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-2, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-2, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0]), zero), numComp*sizeof(Scalar));
+                    Scalar* o = out.getSampleDataRW(m_faceOffset[3]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
                         o[INDEX3(i,0,0,numComp,2)] = (f_11[i]-f_01[i])*cx2;
-                        o[INDEX3(i,1,0,numComp,2)] = (f_01[i] + f_11[i] - f_00[i] - f_10[i])*cy2/2;
+                        o[INDEX3(i,1,0,numComp,2)] = (f_01[i] + f_11[i] - f_00[i] - f_10[i])*cy2 * 0.5;
                     } // end of component loop i
                 } // end of k0 loop
             } // end of face 3
@@ -1392,70 +1567,96 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
     }
 }
 
+// instantiate our two supported versions
+template
+void Rectangle::assembleGradientImpl<real_t>(escript::Data& out,
+                                             const escript::Data& in) const;
+
+template
+void Rectangle::assembleGradientImpl<cplx_t>(escript::Data& out,
+                                             const escript::Data& in) const;
+
 //protected
-void Rectangle::assembleIntegrate(vector<double>& integrals,
+void Rectangle::assembleIntegrate(vector<real_t>& integrals,
                                   const escript::Data& arg) const
 {
+    assembleIntegrateImpl<real_t>(integrals, arg);
+}
+
+//protected
+void Rectangle::assembleIntegrate(vector<cplx_t>& integrals,
+                                  const escript::Data& arg) const
+{
+    assembleIntegrateImpl<cplx_t>(integrals, arg);
+}
+
+//private
+template<typename Scalar>
+void Rectangle::assembleIntegrateImpl(vector<Scalar>& integrals,
+                                      const escript::Data& arg) const
+{
     const dim_t numComp = arg.getDataPointSize();
     const index_t left = getFirstInDim(0);
     const index_t bottom = getFirstInDim(1);
-    const int fs=arg.getFunctionSpace().getTypeCode();
+    const int fs = arg.getFunctionSpace().getTypeCode();
+    const Scalar zero = static_cast<Scalar>(0);
+
     if (fs == Elements && arg.actsExpanded()) {
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
-            const double w = m_dx[0]*m_dx[1]/4.;
+            vector<Scalar> int_local(numComp, zero);
+            const real_t w = m_dx[0]*m_dx[1]/4.;
 #pragma omp for nowait
             for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                 for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                    const double* f = arg.getSampleDataRO(INDEX2(k0, k1, m_NE[0]));
-                    for (index_t i=0; i < numComp; ++i) {
-                        const double f0 = f[INDEX2(i,0,numComp)];
-                        const double f1 = f[INDEX2(i,1,numComp)];
-                        const double f2 = f[INDEX2(i,2,numComp)];
-                        const double f3 = f[INDEX2(i,3,numComp)];
-                        int_local[i]+=(f0+f1+f2+f3)*w;
+                    const Scalar* f = arg.getSampleDataRO(INDEX2(k0, k1, m_NE[0]), zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        const Scalar f0 = f[INDEX2(i,0,numComp)];
+                        const Scalar f1 = f[INDEX2(i,1,numComp)];
+                        const Scalar f2 = f[INDEX2(i,2,numComp)];
+                        const Scalar f3 = f[INDEX2(i,3,numComp)];
+                        int_local[i] += (f0+f1+f2+f3)*w;
                     }  // end of component loop i
                 } // end of k0 loop
             } // end of k1 loop
 #pragma omp critical
             for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+                integrals[i] += int_local[i];
         } // end of parallel section
 
     } else if (fs==ReducedElements || (fs==Elements && !arg.actsExpanded())) {
-        const double w = m_dx[0]*m_dx[1];
+        const real_t w = m_dx[0]*m_dx[1];
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
+            vector<Scalar> int_local(numComp, 0);
 #pragma omp for nowait
             for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
                 for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                    const double* f = arg.getSampleDataRO(INDEX2(k0, k1, m_NE[0]));
-                    for (index_t i=0; i < numComp; ++i) {
-                        int_local[i]+=f[i]*w;
+                    const Scalar* f = arg.getSampleDataRO(INDEX2(k0, k1, m_NE[0]), zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        int_local[i] += f[i]*w;
                     }
                 }
             }
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
 
     } else if (fs == FaceElements && arg.actsExpanded()) {
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
-            const double w0 = m_dx[0]/2.;
-            const double w1 = m_dx[1]/2.;
+            vector<Scalar> int_local(numComp, zero);
+            const real_t w0 = m_dx[0]/2.;
+            const real_t w1 = m_dx[1]/2.;
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[0]+k1);
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[0]+k1, zero);
                     for (index_t i=0; i < numComp; ++i) {
-                        const double f0 = f[INDEX2(i,0,numComp)];
-                        const double f1 = f[INDEX2(i,1,numComp)];
-                        int_local[i]+=(f0+f1)*w1;
+                        const Scalar f0 = f[INDEX2(i,0,numComp)];
+                        const Scalar f1 = f[INDEX2(i,1,numComp)];
+                        int_local[i] += (f0+f1)*w1;
                     }  // end of component loop i
                 } // end of k1 loop
             }
@@ -1463,11 +1664,11 @@ void Rectangle::assembleIntegrate(vector<double>& integrals,
             if (m_faceOffset[1] > -1) {
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[1]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
-                        const double f0 = f[INDEX2(i,0,numComp)];
-                        const double f1 = f[INDEX2(i,1,numComp)];
-                        int_local[i]+=(f0+f1)*w1;
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[1]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        const Scalar f0 = f[INDEX2(i,0,numComp)];
+                        const Scalar f1 = f[INDEX2(i,1,numComp)];
+                        int_local[i] += (f0+f1)*w1;
                     }  // end of component loop i
                 } // end of k1 loop
             }
@@ -1475,11 +1676,11 @@ void Rectangle::assembleIntegrate(vector<double>& integrals,
             if (m_faceOffset[2] > -1) {
 #pragma omp for nowait
                 for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[2]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
-                        const double f0 = f[INDEX2(i,0,numComp)];
-                        const double f1 = f[INDEX2(i,1,numComp)];
-                        int_local[i]+=(f0+f1)*w0;
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[2]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        const Scalar f0 = f[INDEX2(i,0,numComp)];
+                        const Scalar f1 = f[INDEX2(i,1,numComp)];
+                        int_local[i] += (f0+f1)*w0;
                     }  // end of component loop i
                 } // end of k0 loop
             }
@@ -1487,29 +1688,29 @@ void Rectangle::assembleIntegrate(vector<double>& integrals,
             if (m_faceOffset[3] > -1) {
 #pragma omp for nowait
                 for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[3]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
-                        const double f0 = f[INDEX2(i,0,numComp)];
-                        const double f1 = f[INDEX2(i,1,numComp)];
-                        int_local[i]+=(f0+f1)*w0;
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[3]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        const Scalar f0 = f[INDEX2(i,0,numComp)];
+                        const Scalar f1 = f[INDEX2(i,1,numComp)];
+                        int_local[i] += (f0+f1)*w0;
                     }  // end of component loop i
                 } // end of k0 loop
             }
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
 
     } else if (fs==ReducedFaceElements || (fs==FaceElements && !arg.actsExpanded())) {
 #pragma omp parallel
         {
-            vector<double> int_local(numComp, 0);
+            vector<Scalar> int_local(numComp, 0);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[0]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
-                        int_local[i]+=f[i]*m_dx[1];
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[0]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        int_local[i] += f[i]*m_dx[1];
                     }
                 }
             }
@@ -1517,9 +1718,9 @@ void Rectangle::assembleIntegrate(vector<double>& integrals,
             if (m_faceOffset[1] > -1) {
 #pragma omp for nowait
                 for (index_t k1 = bottom; k1 < bottom+m_ownNE[1]; ++k1) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[1]+k1);
-                    for (index_t i=0; i < numComp; ++i) {
-                        int_local[i]+=f[i]*m_dx[1];
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[1]+k1, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        int_local[i] += f[i]*m_dx[1];
                     }
                 }
             }
@@ -1527,9 +1728,9 @@ void Rectangle::assembleIntegrate(vector<double>& integrals,
             if (m_faceOffset[2] > -1) {
 #pragma omp for nowait
                 for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[2]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
-                        int_local[i]+=f[i]*m_dx[0];
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[2]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        int_local[i] += f[i]*m_dx[0];
                     }
                 }
             }
@@ -1537,16 +1738,16 @@ void Rectangle::assembleIntegrate(vector<double>& integrals,
             if (m_faceOffset[3] > -1) {
 #pragma omp for nowait
                 for (index_t k0 = left; k0 < left+m_ownNE[0]; ++k0) {
-                    const double* f = arg.getSampleDataRO(m_faceOffset[3]+k0);
-                    for (index_t i=0; i < numComp; ++i) {
-                        int_local[i]+=f[i]*m_dx[0];
+                    const Scalar* f = arg.getSampleDataRO(m_faceOffset[3]+k0, zero);
+                    for (index_t i = 0; i < numComp; ++i) {
+                        int_local[i] += f[i]*m_dx[0];
                     }
                 }
             }
 
 #pragma omp critical
-            for (index_t i=0; i<numComp; i++)
-                integrals[i]+=int_local[i];
+            for (index_t i = 0; i < numComp; i++)
+                integrals[i] += int_local[i];
         } // end of parallel section
     } // function space selector
 }
@@ -2053,26 +2254,65 @@ void Rectangle::interpolateNodesOnElements(escript::Data& out,
                                            const escript::Data& in,
                                            bool reduced) const
 {
+    if (in.isComplex()!=out.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");
+    }
+    if (in.isComplex())
+    {
+        interpolateNodesOnElementsWorker(out, in, reduced, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateNodesOnElementsWorker(out, in, reduced, escript::DataTypes::real_t(0));      
+    }
+}
+
+//protected
+void Rectangle::interpolateNodesOnFaces(escript::Data& out,
+                                           const escript::Data& in,
+                                           bool reduced) const
+{
+    if (in.isComplex()!=out.isComplex())
+    {
+        throw RipleyException("Programmer Error: in and out parameters do not have the same complexity.");
+    }
+    if (in.isComplex())
+    {
+        interpolateNodesOnFacesWorker(out, in, reduced, escript::DataTypes::cplx_t(0));
+    }
+    else
+    {
+        interpolateNodesOnFacesWorker(out, in, reduced, escript::DataTypes::real_t(0));      
+    }
+}
+
+// private	 
+template <typename S> 
+void Rectangle::interpolateNodesOnElementsWorker(escript::Data& out,
+                                           const escript::Data& in,
+                                           bool reduced, S sentinel) const
+{
     const dim_t numComp = in.getDataPointSize();
     const dim_t NE0 = m_NE[0];
     const dim_t NE1 = m_NE[1];
     if (reduced) {
         out.requireWrite();
-        const double c0 = 0.25;
+        const S c0 = 0.25;
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<S> f_00(numComp);
+            vector<S> f_01(numComp);
+            vector<S> f_10(numComp);
+            vector<S> f_11(numComp);
 #pragma omp for
             for (index_t k1=0; k1 < NE1; ++k1) {
                 for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]));
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]), sentinel);
                     for (index_t i=0; i < numComp; ++i) {
                         o[INDEX2(i,numComp,0)] = c0*(f_00[i] + f_01[i] + f_10[i] + f_11[i]);
                     } /* end of component loop i */
@@ -2081,23 +2321,23 @@ void Rectangle::interpolateNodesOnElements(escript::Data& out,
         } /* end of parallel section */
     } else {
         out.requireWrite();
-        const double c0 = 0.16666666666666666667;
-        const double c1 = 0.044658198738520451079;
-        const double c2 = 0.62200846792814621559;
+        const S c0 = 0.16666666666666666667;
+        const S c1 = 0.044658198738520451079;
+        const S c2 = 0.62200846792814621559;
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<S> f_00(numComp);
+            vector<S> f_01(numComp);
+            vector<S> f_10(numComp);
+            vector<S> f_11(numComp);
 #pragma omp for
             for (index_t k1=0; k1 < NE1; ++k1) {
                 for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]));
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(INDEX2(k0,k1,m_NE[0]), sentinel);
                     for (index_t i=0; i < numComp; ++i) {
                         o[INDEX2(i,numComp,0)] = c0*(f_01[i] + f_10[i]) + c1*f_11[i] + c2*f_00[i];
                         o[INDEX2(i,numComp,1)] = c0*(f_00[i] + f_11[i]) + c1*f_01[i] + c2*f_10[i];
@@ -2110,10 +2350,11 @@ void Rectangle::interpolateNodesOnElements(escript::Data& out,
     }
 }
 
-//protected
-void Rectangle::interpolateNodesOnFaces(escript::Data& out,
+//private
+template <typename S>
+void Rectangle::interpolateNodesOnFacesWorker(escript::Data& out,
                                         const escript::Data& in,
-                                        bool reduced) const
+                                        bool reduced, S sentinel) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t NE0 = m_NE[0];
@@ -2122,71 +2363,71 @@ void Rectangle::interpolateNodesOnFaces(escript::Data& out,
         out.requireWrite();
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<S> f_00(numComp);
+            vector<S> f_01(numComp);
+            vector<S> f_10(numComp);
+            vector<S> f_11(numComp);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[0]+k1);
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[0]+k1, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX2(i,numComp,0)] = (f_00[i] + f_01[i])/2;
+                        o[INDEX2(i,numComp,0)] = (f_00[i] + f_01[i])/static_cast<S>(2);
                     } /* end of component loop i */
                 } /* end of k1 loop */
             } /* end of face 0 */
             if (m_faceOffset[1] > -1) {
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[1]+k1);
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[1]+k1, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX2(i,numComp,0)] = (f_10[i] + f_11[i])/2;
+                        o[INDEX2(i,numComp,0)] = (f_10[i] + f_11[i])/static_cast<S>(2);
                     } /* end of component loop i */
                 } /* end of k1 loop */
             } /* end of face 1 */
             if (m_faceOffset[2] > -1) {
 #pragma omp for nowait
                 for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[2]+k0);
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[2]+k0, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX2(i,numComp,0)] = (f_00[i] + f_10[i])/2;
+                        o[INDEX2(i,numComp,0)] = (f_00[i] + f_10[i])/static_cast<S>(2);
                     } /* end of component loop i */
                 } /* end of k0 loop */
             } /* end of face 2 */
             if (m_faceOffset[3] > -1) {
 #pragma omp for nowait
                 for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[3]+k0);
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[3]+k0, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
-                        o[INDEX2(i,numComp,0)] = (f_01[i] + f_11[i])/2;
+                        o[INDEX2(i,numComp,0)] = (f_01[i] + f_11[i])/static_cast<S>(2);
                     } /* end of component loop i */
                 } /* end of k0 loop */
             } /* end of face 3 */
         } /* end of parallel section */
     } else {
         out.requireWrite();
-        const double c0 = 0.21132486540518711775;
-        const double c1 = 0.78867513459481288225;
+        const S c0 = 0.21132486540518711775;
+        const S c1 = 0.78867513459481288225;
 #pragma omp parallel
         {
-            vector<double> f_00(numComp);
-            vector<double> f_01(numComp);
-            vector<double> f_10(numComp);
-            vector<double> f_11(numComp);
+            vector<S> f_00(numComp);
+            vector<S> f_01(numComp);
+            vector<S> f_10(numComp);
+            vector<S> f_11(numComp);
             if (m_faceOffset[0] > -1) {
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[0]+k1);
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(0,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(0,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[0]+k1, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
                         o[INDEX2(i,numComp,0)] = c0*f_01[i] + c1*f_00[i];
                         o[INDEX2(i,numComp,1)] = c0*f_00[i] + c1*f_01[i];
@@ -2196,9 +2437,9 @@ void Rectangle::interpolateNodesOnFaces(escript::Data& out,
             if (m_faceOffset[1] > -1) {
 #pragma omp for nowait
                 for (index_t k1=0; k1 < NE1; ++k1) {
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[1]+k1);
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(m_NN[0]-1,k1+1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[1]+k1, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
                         o[INDEX2(i,numComp,0)] = c1*f_10[i] + c0*f_11[i];
                         o[INDEX2(i,numComp,1)] = c1*f_11[i] + c0*f_10[i];
@@ -2208,9 +2449,9 @@ void Rectangle::interpolateNodesOnFaces(escript::Data& out,
             if (m_faceOffset[2] > -1) {
 #pragma omp for nowait
                 for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[2]+k0);
+                    memcpy(&f_00[0], in.getSampleDataRO(INDEX2(k0,0, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_10[0], in.getSampleDataRO(INDEX2(k0+1,0, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[2]+k0, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
                         o[INDEX2(i,numComp,0)] = c0*f_10[i] + c1*f_00[i];
                         o[INDEX2(i,numComp,1)] = c0*f_00[i] + c1*f_10[i];
@@ -2220,9 +2461,9 @@ void Rectangle::interpolateNodesOnFaces(escript::Data& out,
             if (m_faceOffset[3] > -1) {
 #pragma omp for nowait
                 for (index_t k0=0; k0 < NE0; ++k0) {
-                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0])), numComp*sizeof(double));
-                    double* o = out.getSampleDataRW(m_faceOffset[3]+k0);
+                    memcpy(&f_01[0], in.getSampleDataRO(INDEX2(k0,m_NN[1]-1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    memcpy(&f_11[0], in.getSampleDataRO(INDEX2(k0+1,m_NN[1]-1, m_NN[0]), sentinel), numComp*sizeof(S));
+                    S* o = out.getSampleDataRW(m_faceOffset[3]+k0, sentinel);
                     for (index_t i=0; i < numComp; ++i) {
                         o[INDEX2(i,numComp,0)] = c0*f_11[i] + c1*f_01[i];
                         o[INDEX2(i,numComp,1)] = c0*f_01[i] + c1*f_11[i];
diff --git a/ripley/src/Rectangle.h b/ripley/src/Rectangle.h
index 934a00d..263b8a3 100644
--- a/ripley/src/Rectangle.h
+++ b/ripley/src/Rectangle.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -229,7 +229,9 @@ protected:
     virtual void assembleCoordinates(escript::Data& arg) const;
     virtual void assembleGradient(escript::Data& out,
                                   const escript::Data& in) const;
-    virtual void assembleIntegrate(DoubleVector& integrals,
+    virtual void assembleIntegrate(std::vector<real_t>& integrals,
+                                   const escript::Data& arg) const;
+    virtual void assembleIntegrate(std::vector<cplx_t>& integrals,
                                    const escript::Data& arg) const;
     virtual std::vector<IndexVector> getConnections(bool includeShared=false) const;
 
@@ -242,10 +244,11 @@ protected:
                              bool reducedRowOrder, bool reducedColOrder) const;
 #endif
     virtual void interpolateNodesOnElements(escript::Data& out,
-                                  const escript::Data& in, bool reduced) const;
+                                  const escript::Data& in, bool reduced) const;	  
     virtual void interpolateNodesOnFaces(escript::Data& out,
                                          const escript::Data& in,
                                          bool reduced) const;
+
     virtual void nodesToDOF(escript::Data& out, const escript::Data& in) const;
     virtual dim_t getDofOfNode(dim_t node) const;
 
@@ -253,6 +256,10 @@ protected:
     virtual void populateDofMap();
 
     template<typename Scalar>
+    void assembleGradientImpl(escript::Data& out,
+                              const escript::Data& in) const;
+
+    template<typename Scalar>
     void addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
            const std::vector<Scalar>& EM_S, const std::vector<Scalar>& EM_F,
            bool addS, bool addF, index_t firstNode, int nEq=1, int nComp=1) const;
@@ -332,6 +339,17 @@ protected:
     /// Trilinos graph structure, cached for efficiency
     mutable esys_trilinos::const_TrilinosGraph_ptr m_graph;
 #endif
+private:
+    template<typename Scalar>
+    void assembleIntegrateImpl(std::vector<Scalar>& integrals, const escript::Data& arg) const;
+
+    template <typename S>
+    void interpolateNodesOnElementsWorker(escript::Data& out,
+                                  const escript::Data& in, bool reduced, S sentinel) const;	  
+    template <typename S>
+    void interpolateNodesOnFacesWorker(escript::Data& out,
+                                         const escript::Data& in,
+                                         bool reduced, S sentinel) const;  
 };
 
 ////////////////////////////// inline methods ////////////////////////////////
diff --git a/ripley/src/Ripley.h b/ripley/src/Ripley.h
index d1862a5..a139d76 100644
--- a/ripley/src/Ripley.h
+++ b/ripley/src/Ripley.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/RipleyDomain.cpp b/ripley/src/RipleyDomain.cpp
index 6fa6b41..a7d8f74 100644
--- a/ripley/src/RipleyDomain.cpp
+++ b/ripley/src/RipleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -382,6 +382,8 @@ void RipleyDomain::interpolateOnDomain(escript::Data& target,
         throw ValueError("Illegal domain of interpolant");
     if (targetDomain != *this)
         throw ValueError("Illegal domain of interpolation target");
+    if (target.isComplex() != in.isComplex())
+        throw ValueError("Complexity of input and output must match");
 
     stringstream msg;
     msg << "interpolateOnDomain() not implemented for function space "
@@ -394,7 +396,10 @@ void RipleyDomain::interpolateOnDomain(escript::Data& target,
 
     // simplest case: 1:1 copy
     if (inFS==outFS) {
-        copyData(target, in);
+        if (in.isComplex())
+            copyData<cplx_t>(target, in);
+        else
+            copyData<real_t>(target, in);
     // not allowed: reduced nodes/DOF->non-reduced nodes/DOF
     } else if ((inFS==ReducedNodes || inFS==ReducedDegreesOfFreedom)
             && (outFS==Nodes || outFS==DegreesOfFreedom)) {
@@ -402,13 +407,23 @@ void RipleyDomain::interpolateOnDomain(escript::Data& target,
                               "reduced data to non-reduced data.");
     } else if ((inFS==Elements && outFS==ReducedElements)
             || (inFS==FaceElements && outFS==ReducedFaceElements)) {
-        if (in.actsExpanded())
-            averageData(target, in);
-        else
-            copyData(target, in);
+        if (in.actsExpanded()) {
+            if (in.isComplex())
+                averageData<cplx_t>(target, in);
+            else
+                averageData<real_t>(target, in);
+        } else {
+            if (in.isComplex())
+                copyData<cplx_t>(target, in);
+            else
+                copyData<real_t>(target, in);
+        }
     } else if ((inFS==ReducedElements && outFS==Elements)
             || (inFS==ReducedFaceElements && outFS==FaceElements)) {
-        multiplyData(target, in);
+        if (in.isComplex())
+            multiplyData<cplx_t>(target, in);
+        else
+            multiplyData<real_t>(target, in);
     } else {
         switch (inFS) {
             case Nodes:
@@ -416,15 +431,25 @@ void RipleyDomain::interpolateOnDomain(escript::Data& target,
                 switch (outFS) {
                     case DegreesOfFreedom:
                     case ReducedDegreesOfFreedom:
-                        if (getMPISize()==1)
-                            copyData(target, in);
-                        else
-                            nodesToDOF(target, in);
+                        if (getMPISize()==1) {
+                            if (in.isComplex())
+                                copyData<cplx_t>(target, in);
+                            else
+                                copyData<real_t>(target, in);
+                        } else {
+                            if (in.isComplex())
+                                throw NotImplementedError("nodesToDOF not implemented for complex Data");
+                            else
+                                nodesToDOF(target, in);
+                        }
                         break;
 
                     case Nodes:
                     case ReducedNodes:
-                        copyData(target, in);
+                        if (in.isComplex())
+                            copyData<cplx_t>(target, in);
+                        else
+                            copyData<real_t>(target, in);
                         break;
                     case Elements:
                         interpolateNodesOnElements(target, in, false);
@@ -464,14 +489,23 @@ void RipleyDomain::interpolateOnDomain(escript::Data& target,
                     case Nodes:
                     case ReducedNodes:
                         if (getMPISize()==1)
-                            copyData(target, in);
+                            if (in.isComplex())
+                                copyData<cplx_t>(target, in);
+                            else
+                                copyData<real_t>(target, in);
                         else
-                            dofToNodes(target, in);
+                            if (in.isComplex())
+                                dofToNodes<cplx_t>(target, in);
+                            else
+                                dofToNodes<real_t>(target, in);
                         break;
 
                     case DegreesOfFreedom:
                     case ReducedDegreesOfFreedom:
-                        copyData(target, in);
+                        if (in.isComplex())
+                            copyData<cplx_t>(target, in);
+                        else
+                            copyData<real_t>(target, in);
                         break;
 
                     case Elements:
@@ -606,9 +640,21 @@ void RipleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg)
     }
 }
 
-void RipleyDomain::setToIntegrals(vector<double>& integrals, const escript::Data& arg) const
+void RipleyDomain::setToIntegrals(vector<real_t>& integrals, const escript::Data& arg) const
 {
-    const RipleyDomain& argDomain=dynamic_cast<const RipleyDomain&>(
+    setToIntegralsWorker<real_t>(integrals, arg);
+}
+
+void RipleyDomain::setToIntegrals(vector<cplx_t>& integrals, const escript::Data& arg) const
+{
+    setToIntegralsWorker<cplx_t>(integrals, arg);
+}
+
+template<typename Scalar>
+void RipleyDomain::setToIntegralsWorker(std::vector<Scalar>& integrals,
+                                        const escript::Data& arg) const
+{
+    const RipleyDomain& argDomain = dynamic_cast<const RipleyDomain&>(
             *(arg.getFunctionSpace().getDomain()));
     if (argDomain != *this)
         throw ValueError("setToIntegrals: illegal domain of integration kernel");
@@ -636,7 +682,6 @@ void RipleyDomain::setToIntegrals(vector<double>& integrals, const escript::Data
             throw ValueError(msg.str());
         }
     }
-
 }
 
 bool RipleyDomain::isCellOriented(int fsType) const
@@ -1131,27 +1176,16 @@ void RipleyDomain::setNewX(const escript::Data& arg)
 }
 
 //protected
+template<typename Scalar>
 void RipleyDomain::dofToNodes(escript::Data& out, const escript::Data& in) const
 {
     // expand data object if necessary
     const_cast<escript::Data*>(&in)->expand();
     const dim_t numComp = in.getDataPointSize();
     const dim_t numNodes = getNumNodes();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
-#ifdef ESYS_HAVE_PASO
-    paso::Coupler_ptr coupler(new paso::Coupler(m_connector, numComp, m_mpiInfo));
-    coupler->startCollect(in.getSampleDataRO(0));
-    const dim_t numDOF = getNumDOF();
-    const real_t* buffer = coupler->finishCollect();
-
-#pragma omp parallel for
-    for (index_t i = 0; i < numNodes; i++) {
-        const index_t dof = getDofOfNode(i);
-        const real_t* src = (dof < numDOF ? in.getSampleDataRO(dof)
-                                          : &buffer[(dof - numDOF) * numComp]);
-        copy(src, src+numComp, out.getSampleDataRW(i));
-    }
-#elif defined(ESYS_HAVE_TRILINOS)
+#ifdef ESYS_HAVE_TRILINOS
     using namespace esys_trilinos;
 
     const_TrilinosGraph_ptr graph(getTrilinosGraph());
@@ -1161,10 +1195,10 @@ void RipleyDomain::dofToNodes(escript::Data& out, const escript::Data& in) const
     MapType rowPointMap;
 
     if (numComp > 1) {
-        colPointMap = RealBlockVector::makePointMap(*graph->getColMap(),
-                                                    numComp);
-        rowPointMap = RealBlockVector::makePointMap(*graph->getRowMap(),
-                                                    numComp);
+        colPointMap = BlockVectorType<Scalar>::makePointMap(
+                                        *graph->getColMap(), numComp);
+        rowPointMap = BlockVectorType<Scalar>::makePointMap(
+                                        *graph->getRowMap(), numComp);
         colMap = Teuchos::rcpFromRef(colPointMap);
         rowMap = Teuchos::rcpFromRef(rowPointMap);
     } else {
@@ -1173,68 +1207,89 @@ void RipleyDomain::dofToNodes(escript::Data& out, const escript::Data& in) const
     }
 
     const ImportType importer(rowMap, colMap);
-    const Teuchos::ArrayView<const real_t> localIn(in.getSampleDataRO(0),
-                                                in.getNumDataPoints()*numComp);
-    Teuchos::RCP<RealVector> lclData = rcp(new RealVector(rowMap, localIn,
-                                                          localIn.size(), 1));
-    Teuchos::RCP<RealVector> gblData = rcp(new RealVector(colMap, 1));
+    const Teuchos::ArrayView<const Scalar> localIn(
+                  in.getSampleDataRO(0, zero), in.getNumDataPoints()*numComp);
+    Teuchos::RCP<VectorType<Scalar> > lclData = rcp(new VectorType<Scalar>(
+                                        rowMap, localIn, localIn.size(), 1));
+    Teuchos::RCP<VectorType<Scalar> > gblData = rcp(new VectorType<Scalar>(
+                                        colMap, 1));
     gblData->doImport(*lclData, importer, Tpetra::INSERT);
-    Teuchos::ArrayRCP<const real_t> gblArray(gblData->getData(0));
+    Teuchos::ArrayRCP<const Scalar> gblArray(gblData->getData(0));
 
 #pragma omp parallel for
     for (index_t i = 0; i < numNodes; i++) {
-        const real_t* src = &gblArray[getDofOfNode(i) * numComp];
-        copy(src, src+numComp, out.getSampleDataRW(i));
+        const Scalar* src = &gblArray[getDofOfNode(i) * numComp];
+        copy(src, src+numComp, out.getSampleDataRW(i, zero));
     }
-#endif // ESYS_HAVE_TRILINOS
+#elif defined(ESYS_HAVE_PASO)
+    paso::Coupler_ptr<Scalar> coupler(new paso::Coupler<Scalar>(m_connector,
+                                                         numComp, m_mpiInfo));
+    coupler->startCollect(in.getSampleDataRO(0, zero));
+    const dim_t numDOF = getNumDOF();
+    const Scalar* buffer = coupler->finishCollect();
+
+#pragma omp parallel for
+    for (index_t i = 0; i < numNodes; i++) {
+        const index_t dof = getDofOfNode(i);
+        const Scalar* src = (dof < numDOF ? in.getSampleDataRO(dof, zero)
+                                          : &buffer[(dof - numDOF) * numComp]);
+        copy(src, src+numComp, out.getSampleDataRW(i, zero));
+    }
+#endif // ESYS_HAVE_PASO
 }
 
 //protected
+template<typename Scalar>
 void RipleyDomain::copyData(escript::Data& out, const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t numSamples = in.getNumSamples();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
 #pragma omp parallel for
-    for (index_t i=0; i<numSamples; i++) {
-        const double* src = in.getSampleDataRO(i);
-        copy(src, src+numComp, out.getSampleDataRW(i));
+    for (index_t i = 0; i < numSamples; i++) {
+        const Scalar* src = in.getSampleDataRO(i, zero);
+        copy(src, src+numComp, out.getSampleDataRW(i, zero));
     }
 }
 
 //protected
+template<typename Scalar>
 void RipleyDomain::averageData(escript::Data& out, const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t dpp = in.getNumDataPointsPerSample();
     const dim_t numSamples = in.getNumSamples();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
 #pragma omp parallel for
-    for (index_t i=0; i<numSamples; i++) {
-        const double* src = in.getSampleDataRO(i);
-        double* dest = out.getSampleDataRW(i);
-        for (index_t c=0; c<numComp; c++) {
-            double res=0.;
-            for (index_t q=0; q<dpp; q++)
-                res+=src[c+q*numComp];
-            *dest++ = res/dpp;
+    for (index_t i = 0; i < numSamples; i++) {
+        const Scalar* src = in.getSampleDataRO(i, zero);
+        Scalar* dest = out.getSampleDataRW(i, zero);
+        for (index_t c = 0; c < numComp; c++) {
+            Scalar res = zero;
+            for (index_t q = 0; q < dpp; q++)
+                res += src[c+q*numComp];
+            *dest++ = res / static_cast<real_t>(dpp);
         }
     }
 }
 
 //protected
+template<typename Scalar>
 void RipleyDomain::multiplyData(escript::Data& out, const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t dpp = out.getNumDataPointsPerSample();
     const dim_t numSamples = in.getNumSamples();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
 #pragma omp parallel for
-    for (index_t i=0; i<numSamples; i++) {
-        const double* src = in.getSampleDataRO(i);
-        double* dest = out.getSampleDataRW(i);
-        for (index_t c=0; c<numComp; c++) {
-            for (index_t q=0; q<dpp; q++)
+    for (index_t i = 0; i < numSamples; i++) {
+        const Scalar* src = in.getSampleDataRO(i, zero);
+        Scalar* dest = out.getSampleDataRW(i, zero);
+        for (index_t c = 0; c < numComp; c++) {
+            for (index_t q = 0; q < dpp; q++)
                 dest[c+q*numComp] = src[c];
         }
     }
diff --git a/ripley/src/RipleyDomain.h b/ripley/src/RipleyDomain.h
index 37711b5..dea3b80 100644
--- a/ripley/src/RipleyDomain.h
+++ b/ripley/src/RipleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -493,7 +493,10 @@ public:
        copies the integrals of the function defined by arg into integrals.
        arg has to be defined on this domain.
     */
-    virtual void setToIntegrals(DoubleVector& integrals, const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<real_t>& integrals,
+                                const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<cplx_t>& integrals,
+                                const escript::Data& arg) const;
 
 
     /**
@@ -763,12 +766,15 @@ protected:
     assembler_t assembler_type;
 
     /// copies data in 'in' to 'out' (both must be on same function space)
+    template<typename Scalar>
     void copyData(escript::Data& out, const escript::Data& in) const;
 
     /// averages data in 'in' to 'out' (from non-reduced to reduced fs)
+    template<typename Scalar>
     void averageData(escript::Data& out, const escript::Data& in) const;
 
     /// copies data in 'in' to 'out' (from reduced to non-reduced fs)
+    template<typename Scalar>
     void multiplyData(escript::Data& out, const escript::Data& in) const;
 
     // this is const because setTags is const
@@ -830,7 +836,8 @@ protected:
     virtual void assembleGradient(escript::Data& out, const escript::Data& in) const = 0;
 
     /// copies the integrals of the function defined by 'arg' into 'integrals'
-    virtual void assembleIntegrate(DoubleVector& integrals, const escript::Data& arg) const = 0;
+    virtual void assembleIntegrate(std::vector<real_t>& integrals, const escript::Data& arg) const = 0;
+    virtual void assembleIntegrate(std::vector<cplx_t>& integrals, const escript::Data& arg) const = 0;
 
 #ifdef ESYS_HAVE_TRILINOS
     /// returns the Trilinos matrix graph
@@ -861,7 +868,8 @@ protected:
     virtual void nodesToDOF(escript::Data& out, const escript::Data& in) const = 0;
 
     /// converts data on degrees of freedom in 'in' to nodes in 'out'
-    virtual void dofToNodes(escript::Data& out, const escript::Data& in) const;
+    template<typename Scalar>
+    void dofToNodes(escript::Data& out, const escript::Data& in) const;
 
     virtual dim_t getDofOfNode(dim_t node) const = 0;
 
@@ -892,6 +900,10 @@ private:
                           escript::Data& rhs, const DataMap& coefs,
                           Assembler_ptr assembler) const;
 
+    template<typename Scalar>
+    void setToIntegralsWorker(std::vector<Scalar>& integrals,
+                              const escript::Data& arg) const;
+
     /// finds the node that the given point coordinates belong to
     virtual dim_t findNode(const double *coords) const = 0;
 };
diff --git a/ripley/src/RipleyException.h b/ripley/src/RipleyException.h
index b271559..224f3e8 100644
--- a/ripley/src/RipleyException.h
+++ b/ripley/src/RipleyException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/RipleySystemMatrix.cu b/ripley/src/RipleySystemMatrix.cu
index 7f040e0..946e960 100644
--- a/ripley/src/RipleySystemMatrix.cu
+++ b/ripley/src/RipleySystemMatrix.cu
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/RipleySystemMatrix.h b/ripley/src/RipleySystemMatrix.h
index 1225d45..0377278 100644
--- a/ripley/src/RipleySystemMatrix.h
+++ b/ripley/src/RipleySystemMatrix.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/SConscript b/ripley/src/SConscript
index 5fc384b..bd62abb 100644
--- a/ripley/src/SConscript
+++ b/ripley/src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/src/WaveAssembler2D.cpp b/ripley/src/WaveAssembler2D.cpp
index 702b10e..455a060 100644
--- a/ripley/src/WaveAssembler2D.cpp
+++ b/ripley/src/WaveAssembler2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/WaveAssembler2D.h b/ripley/src/WaveAssembler2D.h
index e6daeb2..1c4eb4c 100644
--- a/ripley/src/WaveAssembler2D.h
+++ b/ripley/src/WaveAssembler2D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/WaveAssembler3D.cpp b/ripley/src/WaveAssembler3D.cpp
index 1cf502b..172bacb 100644
--- a/ripley/src/WaveAssembler3D.cpp
+++ b/ripley/src/WaveAssembler3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/WaveAssembler3D.h b/ripley/src/WaveAssembler3D.h
index f0c28fd..a5376cc 100644
--- a/ripley/src/WaveAssembler3D.h
+++ b/ripley/src/WaveAssembler3D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/blocktools.cpp b/ripley/src/blocktools.cpp
index 43acbe3..eb92cf3 100644
--- a/ripley/src/blocktools.cpp
+++ b/ripley/src/blocktools.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/blocktools.h b/ripley/src/blocktools.h
index 1234fd5..6d61716 100644
--- a/ripley/src/blocktools.h
+++ b/ripley/src/blocktools.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/blocktools2.cpp b/ripley/src/blocktools2.cpp
index 26808c4..35b7612 100644
--- a/ripley/src/blocktools2.cpp
+++ b/ripley/src/blocktools2.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/domainhelpers.cpp b/ripley/src/domainhelpers.cpp
index 1391f11..87c5533 100644
--- a/ripley/src/domainhelpers.cpp
+++ b/ripley/src/domainhelpers.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/domainhelpers.h b/ripley/src/domainhelpers.h
index 625f4ad..5fed644 100644
--- a/ripley/src/domainhelpers.h
+++ b/ripley/src/domainhelpers.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/generate_assamblage.py b/ripley/src/generate_assamblage.py
index 8a097c7..1779768 100644
--- a/ripley/src/generate_assamblage.py
+++ b/ripley/src/generate_assamblage.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/src/generate_assemblage_cpp.py b/ripley/src/generate_assemblage_cpp.py
index 225ec4b..85a30a0 100644
--- a/ripley/src/generate_assemblage_cpp.py
+++ b/ripley/src/generate_assemblage_cpp.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/src/ripleycpp.cpp b/ripley/src/ripleycpp.cpp
index 0a2b7de..5c21a08 100644
--- a/ripley/src/ripleycpp.cpp
+++ b/ripley/src/ripleycpp.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/src/system_dep.h b/ripley/src/system_dep.h
index b3ac35e..1c9c195 100644
--- a/ripley/src/system_dep.h
+++ b/ripley/src/system_dep.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/test/SConscript b/ripley/test/SConscript
index 7430f65..9ea70bb 100644
--- a/ripley/test/SConscript
+++ b/ripley/test/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/test/SystemMatrixTestCase.cpp b/ripley/test/SystemMatrixTestCase.cpp
index e1ea0c3..44a4a87 100644
--- a/ripley/test/SystemMatrixTestCase.cpp
+++ b/ripley/test/SystemMatrixTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/test/SystemMatrixTestCase.h b/ripley/test/SystemMatrixTestCase.h
index 0cadcb0..683a0a1 100644
--- a/ripley/test/SystemMatrixTestCase.h
+++ b/ripley/test/SystemMatrixTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/ripley/test/python/SConscript b/ripley/test/python/SConscript
index 4755a25..e4564f6 100644
--- a/ripley/test/python/SConscript
+++ b/ripley/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/ripley/test/python/run_customAssemblersOnMultiRes.py b/ripley/test/python/run_customAssemblersOnMultiRes.py
index 49ca44b..d85d7e2 100644
--- a/ripley/test/python/run_customAssemblersOnMultiRes.py
+++ b/ripley/test/python/run_customAssemblersOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_customAssemblersOnRipley.py b/ripley/test/python/run_customAssemblersOnRipley.py
index 0137049..f61060f 100644
--- a/ripley/test/python/run_customAssemblersOnRipley.py
+++ b/ripley/test/python/run_customAssemblersOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_diracOnMultiRes.py b/ripley/test/python/run_diracOnMultiRes.py
index a9bdfba..47dfa45 100644
--- a/ripley/test/python/run_diracOnMultiRes.py
+++ b/ripley/test/python/run_diracOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_diracOnRipley.py b/ripley/test/python/run_diracOnRipley.py
index b08c0e4..ffb95bd 100644
--- a/ripley/test/python/run_diracOnRipley.py
+++ b/ripley/test/python/run_diracOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_escriptOnMultiResolution.py b/ripley/test/python/run_escriptOnMultiResolution.py
index 90b33c5..7214e9c 100644
--- a/ripley/test/python/run_escriptOnMultiResolution.py
+++ b/ripley/test/python/run_escriptOnMultiResolution.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_escriptOnRipley.py b/ripley/test/python/run_escriptOnRipley.py
index b9af4a9..c88d77e 100644
--- a/ripley/test/python/run_escriptOnRipley.py
+++ b/ripley/test/python/run_escriptOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_linearPDEsOnMultiRes.py b/ripley/test/python/run_linearPDEsOnMultiRes.py
index e6d1155..18ac04e 100644
--- a/ripley/test/python/run_linearPDEsOnMultiRes.py
+++ b/ripley/test/python/run_linearPDEsOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/ripley/test/python/run_linearPDEsOnRipley.py b/ripley/test/python/run_linearPDEsOnRipley.py
index fe90e8b..7e660aa 100644
--- a/ripley/test/python/run_linearPDEsOnRipley.py
+++ b/ripley/test/python/run_linearPDEsOnRipley.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/ripley/test/python/run_nonlinearPDEOnMultiRes.py b/ripley/test/python/run_nonlinearPDEOnMultiRes.py
index 89d57cc..e54df45 100644
--- a/ripley/test/python/run_nonlinearPDEOnMultiRes.py
+++ b/ripley/test/python/run_nonlinearPDEOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/ripley/test/python/run_nonlinearPDEOnRipley.py b/ripley/test/python/run_nonlinearPDEOnRipley.py
index 5483115..82f2698 100644
--- a/ripley/test/python/run_nonlinearPDEOnRipley.py
+++ b/ripley/test/python/run_nonlinearPDEOnRipley.py
@@ -1,7 +1,7 @@
 
 ########################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # Earth Systems Science Computational Center (ESSCC)
 # http://www.uq.edu.au
 #
@@ -13,7 +13,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 Earth Systems Science Computational Center (ESSCC)
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
diff --git a/ripley/test/python/run_pasoSolversOnMultiRes.py b/ripley/test/python/run_pasoSolversOnMultiRes.py
index 1bf890c..7da085d 100644
--- a/ripley/test/python/run_pasoSolversOnMultiRes.py
+++ b/ripley/test/python/run_pasoSolversOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_pasoSolversOnRipley.py b/ripley/test/python/run_pasoSolversOnRipley.py
index 79318ef..0230a57 100644
--- a/ripley/test/python/run_pasoSolversOnRipley.py
+++ b/ripley/test/python/run_pasoSolversOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_readWriteOnMultiRes.py b/ripley/test/python/run_readWriteOnMultiRes.py
index 684e907..7dce97a 100644
--- a/ripley/test/python/run_readWriteOnMultiRes.py
+++ b/ripley/test/python/run_readWriteOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_readWriteOnRipley.py b/ripley/test/python/run_readWriteOnRipley.py
index ddeddfa..01ae940 100644
--- a/ripley/test/python/run_readWriteOnRipley.py
+++ b/ripley/test/python/run_readWriteOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_splitworldOnRipley.py b/ripley/test/python/run_splitworldOnRipley.py
index 1c28b51..fb64a94 100644
--- a/ripley/test/python/run_splitworldOnRipley.py
+++ b/ripley/test/python/run_splitworldOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c)2015-2016 by The University of Queensland
+__copyright__="""Copyright (c)2015-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_trilinosSolversOnMultiRes.py b/ripley/test/python/run_trilinosSolversOnMultiRes.py
index f656d3b..6389eff 100644
--- a/ripley/test/python/run_trilinosSolversOnMultiRes.py
+++ b/ripley/test/python/run_trilinosSolversOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Open Software License version 3.0
diff --git a/ripley/test/python/run_trilinosSolversOnRipley.py b/ripley/test/python/run_trilinosSolversOnRipley.py
index 5bcf3c2..886e646 100644
--- a/ripley/test/python/run_trilinosSolversOnRipley.py
+++ b/ripley/test/python/run_trilinosSolversOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Open Software License version 3.0
diff --git a/ripley/test/python/run_utilOnMultiRes.py b/ripley/test/python/run_utilOnMultiRes.py
index 4c5205d..52fa925 100644
--- a/ripley/test/python/run_utilOnMultiRes.py
+++ b/ripley/test/python/run_utilOnMultiRes.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/python/run_utilOnRipley.py b/ripley/test/python/run_utilOnRipley.py
index 7114fc6..18af21d 100644
--- a/ripley/test/python/run_utilOnRipley.py
+++ b/ripley/test/python/run_utilOnRipley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/ripley/test/ripley_UnitTest.cpp b/ripley/test/ripley_UnitTest.cpp
index dd29acf..703b581 100644
--- a/ripley/test/ripley_UnitTest.cpp
+++ b/ripley/test/ripley_UnitTest.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2014-2016 by The University of Queensland
+* Copyright (c) 2014-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/run-escript.in b/run-escript.in
index 6953039..69f11a5 100644
--- a/run-escript.in
+++ b/run-escript.in
@@ -2,7 +2,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -24,7 +24,7 @@
 
 # set to 1 if this is part of a packaged build (.deb) and files will be
 # installed in standard locations rather than everything in a single directory
-STDLOCATION=0
+STDLOCATION=@@STDLOCATION
 
 # Now we find the location of this script
 # Note that this location should be absolute but does not need to be unique
@@ -45,7 +45,7 @@ die () {
 if [ $STDLOCATION -ne 0 ]
 then
     #Package building scripts will replace this line
-    ESCRIPT_ROOT=/usr/lib/python-escript
+    ESCRIPT_ROOT=@@ESROOT 
 else
   # We don't know the escript root so we need to work it out from the invocation
   # Need to match if the name contains /
diff --git a/scons/templates/wheezy_py3_mpi_options.py b/scons/badger_options.py
similarity index 57%
copy from scons/templates/wheezy_py3_mpi_options.py
copy to scons/badger_options.py
index 369d691..23b38cc 100644
--- a/scons/templates/wheezy_py3_mpi_options.py
+++ b/scons/badger_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,21 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian GNU/Linux.
-# Refer to README_FIRST for usage instructions.
+from templates.sid_options import *
 
-from .wheezy_py3_options import *
+debug = False
 
-mpi='OPENMPI'
+boost_libs = ['boost_python-py27']
+
+umfpack = True
+silo = True
+
+cxx_extra += ' -Wno-literal-suffix -Wno-deprecated-declarations'
 
+#trilinos=True
+#trilinos_prefix=['/usr/include/trilinos', '/usr/lib/x86_64-linux-gnu']
+trilinos_prefix='/home/jfenwick/trilinos/install_mod'
+
+mpi='OPENMPI'
+openmp=True
+mpi_no_host=True
diff --git a/scons/templates/jessie_mpi_options.py b/scons/badger_py3_options.py
similarity index 78%
copy from scons/templates/jessie_mpi_options.py
copy to scons/badger_py3_options.py
index 1cb53f9..3f3d573 100644
--- a/scons/templates/jessie_mpi_options.py
+++ b/scons/badger_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,9 @@
 #
 ##############################################################################
 
-from .jessie_options import *
+from templates.jessie_py3_options import *
 
-mpi='OPENMPI'
+debug = False
+#lapack = 'clapack'
+silo = True
 
diff --git a/scons/templates/windows_options.py b/scons/cgisrv3_options.py
similarity index 81%
copy from scons/templates/windows_options.py
copy to scons/cgisrv3_options.py
index fe9f8c6..49d4bf5 100644
--- a/scons/templates/windows_options.py
+++ b/scons/cgisrv3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,7 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-# This is a template configuration file for escript on Windows.
-# Copy this file to <hostname>_options.py, where <hostname> is your machine's
-# short hostname, then customize to your needs.
+import os
 
 # PREFIXES:
 # There are two ways to specify where to find dependent headers and libraries
@@ -34,7 +31,7 @@
 # The options file version. SCons will refuse to build if there have been
 # changes to the set of variables and your file has not been updated.
 # This setting is mandatory.
-escript_opts_version = 202
+escript_opts_version = 201
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
@@ -46,11 +43,11 @@ escript_opts_version = 202
 
 # C compiler command name or full path.
 # DEFAULT: auto-detected
-#cc = 'gcc'
+#cc = 'cl'
 
 # C++ compiler command name or full path.
 # DEFAULT: auto-detected
-#cxx = 'g++'
+#cxx = 'cl'
 
 # Flags to use with both C and C++ compilers. Do not set unless you know
 # what you are doing - use cc_extra to specify additional flags!
@@ -79,7 +76,7 @@ escript_opts_version = 202
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
-#werror = False
+werror = False
 
 # Whether to build a debug version
 # DEFAULT: False
@@ -87,7 +84,7 @@ escript_opts_version = 202
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
-#verbose = True
+verbose = True
 
 # Set to True to add flags that enable OpenMP parallelization
 # DEFAULT: False
@@ -104,35 +101,43 @@ escript_opts_version = 202
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
 # DEFAULT: 'none' (disable MPI)
-#mpi = 'MPICH2'
+mpi = 'MPICH2'
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-#mpi_prefix = 'C:/MPICH2'
+mpi_prefix = 'C:/Program Files/MPICH2'
 
 # MPI libraries to link against
-#mpi_libs = ['mpi']
+mpi_libs = ['mpi']
+
+dotdot = os.path.realpath('..')
+system_builddeps = os.path.join('c:',os.sep, 'buildlibs')
+
+# Prefix or paths to python headers and libraries. See note above.
+# By default, this is determined using the running python executable.
+#python_prefix = 'C:/Python26'
 
 # Prefix or paths to boost-python headers and libraries. See note above.
-#boost_prefix = 'C:/boost'
+boost_prefix = [os.path.join(system_builddeps, 'boost_1_41_0'), os.path.join(system_builddeps, 'boost_1_41_0','windows_binary','lib')]
 
 # boost-python library/libraries to link against
-#boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python-vc71-mt-1_41']
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
-#cppunit_prefix = 'C:/CppUnit'
+# C:\buildlibs\cppunit-1.12.1\src\cppunit\Release
+cppunit_prefix = os.path.join(system_builddeps, 'cppunit-1.12.1')
 
 # CppUnit library/libraries to link against
-#cppunit_libs = ['cppunit']
+cppunit_libs = ['cppunit']
 
 # Whether to use the netCDF library for dump file support
 # DEFAULT: False
-#netcdf = True
+netcdf = True
 
 # Prefix or paths to netCDF headers and libraries. See note above.
-#netcdf_prefix = 'C:/netcdf'
+netcdf_prefix = [os.path.join(system_builddeps, 'netcdf', 'src', 'include'), os.path.join(system_builddeps, 'netcdf', 'lib')]
 
 # netCDF library/libraries to link against
-#netcdf_libs = ['netcdf_cpp', 'netcdf']
+netcdf_libs = ['netcdf_cpp', 'netcdf']
 
 # Whether to use the parMETIS library (only in conjunction with MPI)
 # DEFAULT: False
@@ -219,34 +224,15 @@ escript_opts_version = 202
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
-
-
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-#sys_libs = ['ws2_32']
+sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32']
 
 # Additional environmental variables to export to the tools
 #env_export = []
@@ -255,7 +241,7 @@ escript_opts_version = 202
 
 #iknowwhatimdoing = False
 
-#forcelazy = 'auto'
+#forcelazy = 'leave_alone'
 
-#forcecollres = 'auto'
+#forcecollres = 'leave_alone'
 
diff --git a/scons/templates/windows_intelc_options.py b/scons/cgisrv6_options.py
similarity index 73%
copy from scons/templates/windows_intelc_options.py
copy to scons/cgisrv6_options.py
index 53997c9..3d8667c 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/cgisrv6_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,8 +14,6 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-
 import os
 
 # PREFIXES:
@@ -33,7 +31,7 @@ import os
 # The options file version. SCons will refuse to build if there have been
 # changes to the set of variables and your file has not been updated.
 # This setting is mandatory.
-escript_opts_version = 202
+escript_opts_version = 200
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
@@ -43,30 +41,39 @@ escript_opts_version = 202
 # DEFAULT: 'build'
 #build_dir = 'build'
 
+# C compiler command name or full path.
+# DEFAULT: auto-detected
+#cc = 'gcc'
+
 # C++ compiler command name or full path.
 # DEFAULT: auto-detected
 #cxx = 'g++'
 
-# Flags to use with the C++ compiler. Do not set unless you know
-# what you are doing - use cxx_extra to specify additional flags!
+# Flags to use with both C and C++ compilers. Do not set unless you know
+# what you are doing - use cc_extra to specify additional flags!
 # DEFAULT: compiler-dependent
-cc_flags = '/EHsc /GR /MD /Qvc7.1'
+cc_flags = '/EHsc /GR /MD /I"C:/Program Files (x86)/Intel/Composer XE 2011 SP1/compiler/include/" /DCPPUNIT_BUILD_DLL'
 
 # Additional compiler (optimization) flags for non-debug builds
 # DEFAULT: compiler-dependent
-cc_optim = '/fast /Oi /W3 /Qssp /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+cc_optim = '/fast /Oi /W3 /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+cc_optim = '/fast /Oi /Qunroll'
 
 # Additional compiler flags for debug builds
 # DEFAULT: compiler-dependent
-cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
+#cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
 
-# Additional flags to add to the C++ compiler
+# Additional flags to add to the C compiler only
+# DEFAULT: '' (empty)
+#cc_extra = ''
+
+# Additional flags to add to the C++ compiler only
 # DEFAULT: '' (empty)
 #cxx_extra = ''
 
 # Additional flags to add to the linker
 # DEFAULT: '' (empty)
-#ld_extra = ''
+ld_extra = '/libpath:"C:/Program Files (x86)/Intel/Composer XE 2011 SP1/compiler/lib/ia32"'
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
@@ -78,27 +85,29 @@ werror = False
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
-verbose = True
+verbose = False
 
 # Set to True to add flags that enable OpenMP parallelization
 # DEFAULT: False
 openmp = True
 
 # Additional compiler flags for OpenMP builds
+# /Qvec-report0 - Vectorise quietly - http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/copts/common_options/option_vec_report.htm
+# /Qopenmp-report0 - OpenMP quietly (No diagnostics report generated.) - http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/optaps/common/optaps_perf_openmprep.htm
 # DEFAULT: compiler-dependent
 omp_flags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
 
 # Additional linker flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+omp_ldflags = ''
 
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
 # DEFAULT: 'none' (disable MPI)
-mpi = 'MPICH2'
+mpi = 'MPICH2' #'MPICH2'
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-mpi_prefix = 'C:/Program Files/MPICH2'
+mpi_prefix = "C:/Program Files (x86)/MPICH2"
 
 # MPI libraries to link against
 mpi_libs = ['mpi']
@@ -106,10 +115,10 @@ mpi_libs = ['mpi']
 dotdot = os.path.realpath('..')
 
 # Prefix or paths to boost-python headers and libraries. See note above.
-boost_prefix = [os.path.join(dotdot, 'boost_1_39_0'), os.path.join(dotdot, 'boost_1_39_0','stage','lib')]
+boost_prefix = ['C:/projects/boost_1_47_0', 'C:/projects/boost_1_47_0/stage/lib']
 
 # boost-python library/libraries to link against
-boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python-iw-mt-1_47']
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
 #cppunit_prefix = 'C:/CppUnit'
@@ -119,7 +128,7 @@ boost_libs = ['boost_python-vc71-mt-1_39']
 
 # Whether to use the netCDF library for dump file support
 # DEFAULT: False
-netcdf = True
+netcdf = False
 
 # Prefix or paths to netCDF headers and libraries. See note above.
 netcdf_prefix = [os.path.join(dotdot, 'netcdf', 'src', 'include'), os.path.join(dotdot, 'netcdf', 'lib')]
@@ -153,13 +162,14 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 
 # Whether to use Intel MKL (Math Kernel Library)
 # DEFAULT: False
-#mkl = True
+mkl = True
 
 # Prefix or paths to MKL headers and libraries. See note above.
-#mkl_prefix = 'C:/mkl'
+mkl_base_dir = 'C:/Program Files (x86)/Intel/Composer XE 2011 SP1/mkl'
+mkl_prefix = [os.path.join(mkl_base_dir, 'include'), os.path.join(mkl_base_dir, 'lib/ia32')]
 
 # MKL library/libraries to link against
-#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide']
+mkl_libs = ['mkl_intel_c_dll', 'mkl_intel_thread_dll', 'mkl_core_dll', 'libiomp5md', 'mkl_solver', 'mkl_intel_thread', 'mkl_core']
 
 # Whether to use UMFPACK (requires AMD and BLAS)
 # DEFAULT: False
@@ -185,12 +195,14 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 # Recognized values: 'none', 'clapack', 'mkl'
 # DEFAULT: 'none' (do not use LAPACK)
 #lapack = 'clapack'
+lapack = 'mkl'
 
 # Prefix or paths to LAPACK headers and libraries. See note above.
 #lapack_prefix = 'C:/lapack'
+lapack_prefix = mkl_prefix
 
 # LAPACK library/libraries to link against
-#lapack_libs = ['lapack_atlas']
+lapack_libs = ['mkl_lapack95']
 
 # Whether to use LLNL's SILO library for Silo output file support in weipa
 # DEFAULT: False
@@ -212,38 +224,23 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
 
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+# sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+sys_libs = ['']
 
 # Additional environmental variables to export to the tools
 #env_export = []
 
-tools_names = ['intelc']
+# overloading - [('intelc',{'topdir':'/sw/sdev/intel/cc/x86_64/10.1.025'})]
+tools_names = [('intelc',{'topdir':'C:/Program Files (x86)/Intel/Composer XE 2011 SP1'})]
 
 #iknowwhatimdoing = False
 
diff --git a/scons/templates/sid_py3_options.py b/scons/copper_options.py
similarity index 63%
copy from scons/templates/sid_py3_options.py
copy to scons/copper_options.py
index 6c42c10..342febb 100644
--- a/scons/templates/sid_py3_options.py
+++ b/scons/copper_options.py
@@ -1,7 +1,6 @@
-
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,12 +13,21 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
-# Refer to README_FIRST for usage instructions.
+from templates.jessie_mpi_options import *
+
+verbose = True
+silo = True
+#boost_libs = ['boost_python']
+umfpack = True
+werror=False
+
+trilinos=True
+trilinos_prefix="/opt/trilinos_hybrid"
 
-from scons.templates.sid_options import *
+if False:
+  openmp = True 
+  parmetis = True
 
-pythoncmd = 'python3'
+  mpi = 'OPENMPI'
 
-boost_libs = boost_py3_libs
 
diff --git a/escript/py_src/datamanager.py b/scons/ferret_options.py
similarity index 58%
copy from escript/py_src/datamanager.py
copy to scons/ferret_options.py
index 1f6a63c..ed35709 100644
--- a/escript/py_src/datamanager.py
+++ b/scons/ferret_options.py
@@ -1,19 +1,27 @@
-
 ##############################################################################
 #
 # Copyright (c) 2003-2016 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
+# Licensed under the Open Software License version 3.0
+# http://www.opensource.org/licenses/osl-3.0.php
 #
 # 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 templates.jessie_mpi_options import *
+cc_optim = '-O3 -march=native'
+verbose = True
+parmetis = True
+umfpack = True
+silo = True
+trilinos=True
+trilinos_prefix="/opt/trilinos_hybrid"
+werror=False
 
-from __future__ import print_function, division
 
-from esys.escriptcore.datamanager import *
+parmetis_prefix='/usr/local'
+#longindices=True
diff --git a/scons/templates/freebsd10_0_options.py b/scons/guineapig_options.py
similarity index 50%
copy from scons/templates/freebsd10_0_options.py
copy to scons/guineapig_options.py
index 6f545b0..accfcee 100644
--- a/scons/templates/freebsd10_0_options.py
+++ b/scons/guineapig_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,18 +14,17 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on FreeBSD.
-# Refer to README_FIRST for usage instructions.
+from templates.sid_py3_mpi_options import *
 
-escript_opts_version = 203
-cxx_extra = '-I/usr/local/lib/python2.7/site-packages/numpy/core/include'
-openmp = True
-boost_prefix = '/usr/local'
-boost_libs = ['boost_python']
-cppunit_prefix = '/usr/local'
-netcdf = True
-netcdf_prefix = '/usr/local'
+# disabled until the boost issue is fixed.
+#cuda = True
+nvccflags = "-ccbin=g++-4.9 -arch=sm_30 -DBOOST_NOINLINE='__attribute__((noinline))'"
+
+parmetis = True
+umfpack = True
 silo = True
-silo_prefix = '/usr/local'
-silo_libs = ['silo']
+trilinos = True
+trilinos_prefix = '/opt/trilinos_hybrid_eti'
+cxx_extra += " -Wextra -Wno-deprecated-declarations -Wno-unused-parameter"
+launcher = "mpirun ${AGENTOVERRIDE} ${EE} --mca io romio314 --oversubscribe --map-by node:pe=%t -bind-to none -np %N %b"
 
diff --git a/escript/py_src/pdetools.py b/scons/guineapig_py2_options.py
similarity index 75%
copy from escript/py_src/pdetools.py
copy to scons/guineapig_py2_options.py
index d4227a1..7d39387 100644
--- a/escript/py_src/pdetools.py
+++ b/scons/guineapig_py2_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,10 @@
 #
 ##############################################################################
 
-from __future__ import print_function, division
+from guineapig_options import *
 
+pythoncmd = 'python'
+boost_libs = boost_py2_libs
+
+cxx_extra += " -DEXWRITECHK"
 
-from esys.escriptcore.pdetools import *
diff --git a/scons/templates/windows_intelc_options.py b/scons/magnus_options.py
similarity index 65%
copy from scons/templates/windows_intelc_options.py
copy to scons/magnus_options.py
index 53997c9..4fe1c6c 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/magnus_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,30 +14,17 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-
-import os
-
-# PREFIXES:
-# There are two ways to specify where to find dependent headers and libraries
-# (via the <dependency>_prefix):
-# 1) If your installation follows the general scheme where headers are located
-#    in <prefix>/include[32,64], and libraries in <prefix>/lib[32,64] then
-#    it is sufficient to specify this prefix, e.g. boost_prefix='C:/python'
-# 2) Otherwise provide a list with two elements, where the first one is the
-#    include path, and the second the library path, e.g.
-#    boost_prefix=['C:/boost/include/boost1_44', 'C:/boost/lib']
-# All <dependency>_prefix settings default to '/usr' so have to be set
-# manually on Windows.
-
 # The options file version. SCons will refuse to build if there have been
 # changes to the set of variables and your file has not been updated.
 # This setting is mandatory.
-escript_opts_version = 202
+escript_opts_version = 203
+
+import os
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
-#prefix = 'C:/escript'
+#prefix = '/usr/local'
+#prefix = '/group/geosciences953/escript_directory/escript'
 
 # Top-level directory for intermediate build and test files.
 # DEFAULT: 'build'
@@ -45,28 +32,44 @@ escript_opts_version = 202
 
 # C++ compiler command name or full path.
 # DEFAULT: auto-detected
-#cxx = 'g++'
+cxx = 'CC'
 
 # Flags to use with the C++ compiler. Do not set unless you know
-# what you are doing - use cxx_extra to specify additional flags!
+# what you are doing - use cc_extra to specify additional flags!
 # DEFAULT: compiler-dependent
-cc_flags = '/EHsc /GR /MD /Qvc7.1'
+#cc_flags = ''
 
 # Additional compiler (optimization) flags for non-debug builds
 # DEFAULT: compiler-dependent
-cc_optim = '/fast /Oi /W3 /Qssp /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+#cc_optim = '-O3 -mmmx -msse'
 
 # Additional compiler flags for debug builds
 # DEFAULT: compiler-dependent
-cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
+#cc_debug = '-g'
 
 # Additional flags to add to the C++ compiler
 # DEFAULT: '' (empty)
-#cxx_extra = ''
+#cxx_extra = '-shared -fPIC -h gnu -h nomessage=47:1199:1794:1836:11709'
+cxx_extra = '-fPIC'
 
 # Additional flags to add to the linker
 # DEFAULT: '' (empty)
-#ld_extra = ''
+#ld_extra = '-shared-intel -L/opt/cray/hdf5/1.8.11/cray/81/lib -ipo-jobs4'
+#ld_extra = '-dynamic -L/ivec/cle50/devel/PrgEnv-gnu/5.0.41/hdf5/1.8.12/lib'
+ld_extra = '-dynamic'
+
+# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
+# the following substitutions are applied to all three:
+# %b = executable, %n = number of nodes, %p = number of processes,
+# %N = total number of processes, # %t = number of threads,
+# %f = name of hostfile, %h = comma-separated list of hosts,
+# %e = comma-separated list of environment variables to export
+#prelaunch = "EE=$(echo -x %e|sed -e 's/,/ -x /g')"
+prelaunch = ""
+launcher = "aprun -B %b"
+postlaunch = ""
+
+stdlocationisprefix = True
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
@@ -74,7 +77,7 @@ werror = False
 
 # Whether to build a debug version
 # DEFAULT: False
-#debug = True
+# debug = True
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
@@ -86,11 +89,12 @@ openmp = True
 
 # Additional compiler flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_flags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_flags = '-homp'
+omp_flags = '-fopenmp'
 
 # Additional linker flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+omp_ldflags = '-fopenmp'
 
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
@@ -98,21 +102,25 @@ omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
 mpi = 'MPICH2'
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-mpi_prefix = 'C:/Program Files/MPICH2'
+# on magnus, this variable should be set by the programming environment
+mpi_prefix = os.environ['MPICH_DIR']
 
-# MPI libraries to link against
-mpi_libs = ['mpi']
 
-dotdot = os.path.realpath('..')
+# MPI libraries to link against. Compiler wrapper takes care of this
+#mpi_libs = ['mpich', 'mpichcxx']
+mpi_libs = []
 
-# Prefix or paths to boost-python headers and libraries. See note above.
-boost_prefix = [os.path.join(dotdot, 'boost_1_39_0'), os.path.join(dotdot, 'boost_1_39_0','stage','lib')]
 
+# Prefix or paths to boost-python headers and libraries. See note above.
+#boost_prefix = '/ivec/cle50/devel/PrgEnv-intel/boost/1.55.0'
+#boost_prefix = '/ivec/cle50/devel/PrgEnv-gnu/5.0.41/boost/1.49.0'
+#boost_prefix = ['/home/caltinay/boost_1_55_0','/home/caltinay/boost_1_55_0/stage/lib']
+boost_prefix = '/group/pawsey0143/software/cle52up04/apps/PrgEnv-gnu/5.2.82/gcc/4.9.2/haswell/boost/1.57.0'
 # boost-python library/libraries to link against
-boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python']
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
-#cppunit_prefix = 'C:/CppUnit'
+#cppunit_prefix = ''
 
 # CppUnit library/libraries to link against
 #cppunit_libs = ['cppunit']
@@ -122,17 +130,21 @@ boost_libs = ['boost_python-vc71-mt-1_39']
 netcdf = True
 
 # Prefix or paths to netCDF headers and libraries. See note above.
-netcdf_prefix = [os.path.join(dotdot, 'netcdf', 'src', 'include'), os.path.join(dotdot, 'netcdf', 'lib')]
+#netcdf_prefix = '/opt/cray/netcdf-hdf5parallel/4.3.0/CRAY/81'
+#netcdf_prefix = '/ivec/cle50/devel/PrgEnv-gnu/5.0.41/netcdf/4.1.3'
+#netcdf_prefix = '/group/geosciences953/escript_directory/escript'
+netcdf_prefix = '/group/pawsey0143/joel/netcdf'
+#netcdf_prefix=os.environ["NETCDF_DIR"]
 
 # netCDF library/libraries to link against
-netcdf_libs = ['netcdf_cpp', 'netcdf']
+netcdf_libs = ['netcdf_c++', 'netcdf']
 
 # Whether to use the parMETIS library (only in conjunction with MPI)
 # DEFAULT: False
 #parmetis = True
 
 # Prefix or paths to parMETIS headers and libraries. See note above.
-#parmetis_prefix = 'C:/parmetis'
+#parmetis_prefix = '/sw/libs/parmetis/x86_64/icc-13/parmetis-4.0.2'
 
 # parMETIS library/libraries to link against
 #parmetis_libs = ['parmetis', 'metis']
@@ -142,7 +154,7 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #papi = True
 
 # Prefix or paths to PAPI headers and libraries. See note above.
-#papi_prefix = 'C:/papi'
+#papi_prefix = '/usr/local'
 
 # PAPI library/libraries to link against
 #papi_libs = ['papi']
@@ -156,98 +168,85 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #mkl = True
 
 # Prefix or paths to MKL headers and libraries. See note above.
-#mkl_prefix = 'C:/mkl'
+#mkl_prefix = ['/opt/intel/composer_xe_2013.5.192/mkl/include', '/opt/intel/composer_xe_2013.5.192/mkl/lib/intel64']
 
 # MKL library/libraries to link against
-#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide']
+#mkl_libs = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
 
 # Whether to use UMFPACK (requires AMD and BLAS)
 # DEFAULT: False
 #umfpack = True
 
 # Prefix or paths to UMFPACK headers and libraries. See note above.
-#umfpack_prefix = 'C:/umfpack'
+#umfpack_prefix = '/sw/libs/umfpack/x86_64/icc-13/umfpack-5.6.1'
 
 # UMFPACK library/libraries to link against
-#umfpack_libs = ['umfpack']
+#umfpack_libs = ['umfpack', 'amd', 'suitesparseconfig']
 
 # Whether to use BoomerAMG (requires MPI)
 # DEFAULT: False
 #boomeramg = True
 
 # Prefix or paths to BoomerAMG headers and libraries. See note above.
-#boomeramg_prefix = 'C:/boomeramg'
+#boomeramg_prefix = '/sw/libs/hypre/x86_64/gcc-4.3.2/hypre-2.0.0'
 
 # BoomerAMG library/libraries to link against
 #boomeramg_libs = ['HYPRE']
+#boomeramg_libs = ['HYPRE_IJ_mv', 'HYPRE_krylov', 'HYPRE_parcsr_ls']
 
 # Flavour of LAPACK implementation
 # Recognized values: 'none', 'clapack', 'mkl'
 # DEFAULT: 'none' (do not use LAPACK)
-#lapack = 'clapack'
+#lapack = 'mkl'
 
 # Prefix or paths to LAPACK headers and libraries. See note above.
-#lapack_prefix = 'C:/lapack'
+#lapack_prefix = mkl_prefix
 
 # LAPACK library/libraries to link against
-#lapack_libs = ['lapack_atlas']
+#lapack_libs = ['mkl_core']
 
 # Whether to use LLNL's SILO library for Silo output file support in weipa
 # DEFAULT: False
 #silo = True
 
 # Prefix or paths to SILO headers and libraries. See note above.
-#silo_prefix = 'C:/silo'
+silo_prefix = '/group/geosciences953/escript_directory/escript'
 
 # SILO library/libraries to link against
-#silo_libs = ['siloh5', 'hdf5']
+silo_libs = ['silo']
 
 # Whether to use LLNL's VisIt simulation interface (only version 2 supported)
 # DEFAULT: False
 #visit = True
 
 # Prefix or paths to VisIt's sim2 headers and libraries. See note above.
-#visit_prefix = 'C:/visit/2.1.0/linux-intel/libsim/V2'
+#visit_prefix = ''
 
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
 
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+#sys_libs = []
 
 # Additional environmental variables to export to the tools
-#env_export = []
+# On Cray the compiler wrapper depends on a lot of environment vars
+# so we simply export everything
+import os
+env_export = os.environ.keys()
 
-tools_names = ['intelc']
+#tools_names = [('intelc',{'topdir':'/opt/intel/composer_xe_2013.5.192'})]
 
 #iknowwhatimdoing = False
 
-#forcelazy = 'leave_alone'
+#forcelazy = 'auto'
 
-#forcecollres = 'leave_alone'
+#forcecollres = 'auto'
 
diff --git a/scons/mara_options.py b/scons/mara_options.py
new file mode 100644
index 0000000..93a65e8
--- /dev/null
+++ b/scons/mara_options.py
@@ -0,0 +1,45 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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 templates.sid_py3_mpi_options import *
+
+escript_opts_version = 203
+#cuda = True
+cc_optim = '-O3 -march=native'
+cc_debug = "-g3 -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK -D_GLIBCXX_DEBUG -fno-omit-frame-pointer" #-fsanitize=address 
+cxx_extra = '-Wextra -Wno-unused-parameter -Wno-deprecated-declarations -g -fdiagnostics-color'
+nvccflags = "-arch=sm_30 -DBOOST_NOINLINE='__attribute__((noinline))'"
+#ld_extra = ''
+#werror = False
+#debug = True
+#ld_extra = '-fsanitize=address'
+verbose = True
+parmetis = True
+trilinos = True
+trilinos_prefix = '/opt/trilinos_hybrid_eti'
+umfpack = True
+lapack_prefix = ['/usr/include/atlas', '/usr/lib/atlas-base']
+silo = True
+visit = False
+visit_prefix = '/opt/visit/2.7.0b/linux-x86_64/libsim/V2'
+#visit_libs = ['simV2']
+launcher = "mpirun ${AGENTOVERRIDE} ${EE} --map-by node:pe=%t -bind-to none -np %N %b"
+
+#longindices = True
+#cxx_extra += ' -Wconversion'
+#lapack = 'none'
+#parmetis = False
+
diff --git a/scons/templates/sid_py3_options.py b/scons/mole_options.py
similarity index 68%
copy from scons/templates/sid_py3_options.py
copy to scons/mole_options.py
index 6c42c10..3be8a2a 100644
--- a/scons/templates/sid_py3_options.py
+++ b/scons/mole_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,12 +14,12 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
-# Refer to README_FIRST for usage instructions.
-
-from scons.templates.sid_options import *
+from templates.macports_options import *
 
 pythoncmd = 'python3'
-
-boost_libs = boost_py3_libs
+boost_libs = ['boost_python3-mt']
+silo_prefix = '/opt/local'
+silo_libs = ['siloh5']
+trilinos = True
+trilinos_prefix = '/opt/local'
 
diff --git a/scons/templates/jessie_mpi_options.py b/scons/newton_options.py
similarity index 80%
copy from scons/templates/jessie_mpi_options.py
copy to scons/newton_options.py
index 1cb53f9..cc35ba7 100644
--- a/scons/templates/jessie_mpi_options.py
+++ b/scons/newton_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,8 @@
 #
 ##############################################################################
 
-from .jessie_options import *
+from templates.sid_py3_options import *
 
-mpi='OPENMPI'
+umfpack = True
+silo = True
 
diff --git a/scons/templates/windows_intelc_options.py b/scons/raijin_options.py
similarity index 61%
copy from scons/templates/windows_intelc_options.py
copy to scons/raijin_options.py
index 53997c9..a943e42 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/raijin_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,22 +14,6 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-
-import os
-
-# PREFIXES:
-# There are two ways to specify where to find dependent headers and libraries
-# (via the <dependency>_prefix):
-# 1) If your installation follows the general scheme where headers are located
-#    in <prefix>/include[32,64], and libraries in <prefix>/lib[32,64] then
-#    it is sufficient to specify this prefix, e.g. boost_prefix='C:/python'
-# 2) Otherwise provide a list with two elements, where the first one is the
-#    include path, and the second the library path, e.g.
-#    boost_prefix=['C:/boost/include/boost1_44', 'C:/boost/lib']
-# All <dependency>_prefix settings default to '/usr' so have to be set
-# manually on Windows.
-
 # The options file version. SCons will refuse to build if there have been
 # changes to the set of variables and your file has not been updated.
 # This setting is mandatory.
@@ -37,11 +21,11 @@ escript_opts_version = 202
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
-#prefix = 'C:/escript'
+#prefix = '/usr/local'
 
 # Top-level directory for intermediate build and test files.
 # DEFAULT: 'build'
-#build_dir = 'build'
+build_dir = '/short/r17/cha564/escript_build'
 
 # C++ compiler command name or full path.
 # DEFAULT: auto-detected
@@ -50,23 +34,23 @@ escript_opts_version = 202
 # Flags to use with the C++ compiler. Do not set unless you know
 # what you are doing - use cxx_extra to specify additional flags!
 # DEFAULT: compiler-dependent
-cc_flags = '/EHsc /GR /MD /Qvc7.1'
+#cc_flags = ''
 
 # Additional compiler (optimization) flags for non-debug builds
 # DEFAULT: compiler-dependent
-cc_optim = '/fast /Oi /W3 /Qssp /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+#cc_optim = '-O3 -mmmx -msse'
 
 # Additional compiler flags for debug builds
 # DEFAULT: compiler-dependent
-cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
+#cc_debug = '-g'
 
 # Additional flags to add to the C++ compiler
 # DEFAULT: '' (empty)
-#cxx_extra = ''
+cxx_extra = '-sox -I/apps/python/2.7.3/lib/python2.7/site-packages/numpy/core/include -I/apps/metis/5.0.2/include -wd981 -pthread'
 
 # Additional flags to add to the linker
 # DEFAULT: '' (empty)
-#ld_extra = ''
+ld_extra = '-shared-intel -pthread -L/apps/metis/5.0.2/lib'
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
@@ -74,7 +58,7 @@ werror = False
 
 # Whether to build a debug version
 # DEFAULT: False
-#debug = True
+# debug = True
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
@@ -86,33 +70,36 @@ openmp = True
 
 # Additional compiler flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_flags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_flags = '-openmp -openmp-report=1'
 
 # Additional linker flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_ldflags = '-fopenmp'
 
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
 # DEFAULT: 'none' (disable MPI)
-mpi = 'MPICH2'
+mpi = 'OPENMPI'
+#mpi = 'INTELMPI'
+
+#icpc -I/apps/openmpi/1.6.5/include -pthread -L/apps/openmpi/1.6.5/lib -lmpi_cxx -lmpi -ldl -lm -lnuma -Wl,--export-dynamic -lrt -lnsl -lutil -lm -ldl
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-mpi_prefix = 'C:/Program Files/MPICH2'
+mpi_prefix = '/apps/openmpi/1.6.5'
+#mpi_prefix = ['/apps/intel-mpi/4.1.1.036/include64', '/apps/intel-mpi/4.1.1.036/lib64']
 
 # MPI libraries to link against
-mpi_libs = ['mpi']
+mpi_libs = ['mpi_cxx', 'mpi', 'dl', 'm', 'numa', 'rt', 'nsl', 'util']
 
-dotdot = os.path.realpath('..')
 
 # Prefix or paths to boost-python headers and libraries. See note above.
-boost_prefix = [os.path.join(dotdot, 'boost_1_39_0'), os.path.join(dotdot, 'boost_1_39_0','stage','lib')]
+boost_prefix = ['/apps/boost/1.54.0-python27/include', '/apps/boost/1.54.0-python27/lib/Intel']
 
 # boost-python library/libraries to link against
-boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python']
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
-#cppunit_prefix = 'C:/CppUnit'
+cppunit_prefix = '/apps/cppunit/1.12.1'
 
 # CppUnit library/libraries to link against
 #cppunit_libs = ['cppunit']
@@ -122,17 +109,17 @@ boost_libs = ['boost_python-vc71-mt-1_39']
 netcdf = True
 
 # Prefix or paths to netCDF headers and libraries. See note above.
-netcdf_prefix = [os.path.join(dotdot, 'netcdf', 'src', 'include'), os.path.join(dotdot, 'netcdf', 'lib')]
+netcdf_prefix = '/apps/netcdf/4.1.3'
 
 # netCDF library/libraries to link against
-netcdf_libs = ['netcdf_cpp', 'netcdf']
+#netcdf_libs = ['netcdf_c++', 'netcdf']
 
 # Whether to use the parMETIS library (only in conjunction with MPI)
 # DEFAULT: False
-#parmetis = True
+parmetis = True
 
 # Prefix or paths to parMETIS headers and libraries. See note above.
-#parmetis_prefix = 'C:/parmetis'
+parmetis_prefix = '/apps/parmetis/4.0.2'
 
 # parMETIS library/libraries to link against
 #parmetis_libs = ['parmetis', 'metis']
@@ -142,7 +129,7 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #papi = True
 
 # Prefix or paths to PAPI headers and libraries. See note above.
-#papi_prefix = 'C:/papi'
+#papi_prefix = '/usr/local'
 
 # PAPI library/libraries to link against
 #papi_libs = ['papi']
@@ -153,97 +140,82 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 
 # Whether to use Intel MKL (Math Kernel Library)
 # DEFAULT: False
-#mkl = True
+mkl = True
 
 # Prefix or paths to MKL headers and libraries. See note above.
-#mkl_prefix = 'C:/mkl'
+mkl_prefix = ['/apps/intel-ct/13.4.183/mkl/include', '/apps/intel-ct/13.4.183/mkl/lib/intel64']
 
 # MKL library/libraries to link against
-#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide']
+mkl_libs = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
 
 # Whether to use UMFPACK (requires AMD and BLAS)
 # DEFAULT: False
 #umfpack = True
 
 # Prefix or paths to UMFPACK headers and libraries. See note above.
-#umfpack_prefix = 'C:/umfpack'
+#umfpack_prefix = '/sw/libs/umfpack/x86_64/icc-13/umfpack-5.6.1'
 
 # UMFPACK library/libraries to link against
-#umfpack_libs = ['umfpack']
+#umfpack_libs = ['umfpack', 'amd', 'suitesparseconfig']
 
 # Whether to use BoomerAMG (requires MPI)
 # DEFAULT: False
 #boomeramg = True
 
 # Prefix or paths to BoomerAMG headers and libraries. See note above.
-#boomeramg_prefix = 'C:/boomeramg'
+#boomeramg_prefix = '/sw/libs/hypre/x86_64/gcc-4.3.2/hypre-2.0.0'
 
 # BoomerAMG library/libraries to link against
 #boomeramg_libs = ['HYPRE']
+#boomeramg_libs = ['HYPRE_IJ_mv', 'HYPRE_krylov', 'HYPRE_parcsr_ls']
 
 # Flavour of LAPACK implementation
 # Recognized values: 'none', 'clapack', 'mkl'
 # DEFAULT: 'none' (do not use LAPACK)
-#lapack = 'clapack'
+lapack = 'mkl'
+#lapack = 'none'
 
 # Prefix or paths to LAPACK headers and libraries. See note above.
-#lapack_prefix = 'C:/lapack'
+lapack_prefix = mkl_prefix
 
 # LAPACK library/libraries to link against
-#lapack_libs = ['lapack_atlas']
+lapack_libs = ['mkl_core']
 
 # Whether to use LLNL's SILO library for Silo output file support in weipa
 # DEFAULT: False
-#silo = True
+silo = True
 
 # Prefix or paths to SILO headers and libraries. See note above.
-#silo_prefix = 'C:/silo'
+silo_prefix = '/apps/silo/4.9.1'
 
 # SILO library/libraries to link against
-#silo_libs = ['siloh5', 'hdf5']
+silo_libs = ['silo']
 
 # Whether to use LLNL's VisIt simulation interface (only version 2 supported)
 # DEFAULT: False
-#visit = True
+#visit = False
 
 # Prefix or paths to VisIt's sim2 headers and libraries. See note above.
-#visit_prefix = 'C:/visit/2.1.0/linux-intel/libsim/V2'
+#visit_prefix = '/sw/apps/visit/x86_64/gcc-4.3.2/visit-2.6.0/2.6.0/linux-x86_64/libsim/V2'
 
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
 
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+#sys_libs = []
 
 # Additional environmental variables to export to the tools
-#env_export = []
+env_export = ['INTEL_LICENSE_FILE']
 
-tools_names = ['intelc']
+tools_names = [('intelc',{'topdir':'/apps/intel-ct/13.4.183'})]
 
 #iknowwhatimdoing = False
 
diff --git a/scons/templates/sid_py3_options.py b/scons/sage_options.py
similarity index 63%
copy from scons/templates/sid_py3_options.py
copy to scons/sage_options.py
index 6c42c10..dc2e989 100644
--- a/scons/templates/sid_py3_options.py
+++ b/scons/sage_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,12 +14,16 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
-# Refer to README_FIRST for usage instructions.
+from templates.jessie_options import *
 
-from scons.templates.sid_options import *
+debug = False
 
-pythoncmd = 'python3'
+boost_libs = ['boost_python-py27']
 
-boost_libs = boost_py3_libs
+silo = True
 
+#cxx_extra = '-Wextra -Wno-unused-parameter -DEXWRITECHK'
+cxx_extra = '-Wextra -Wno-unused-parameter -Wno-literal-suffix'
+
+#mpi='OPENMPI'
+mpi='none'
diff --git a/scons/templates/jessie_mpi_options.py b/scons/sage_py3_options.py
similarity index 78%
copy from scons/templates/jessie_mpi_options.py
copy to scons/sage_py3_options.py
index 1cb53f9..5fdc77f 100644
--- a/scons/templates/jessie_mpi_options.py
+++ b/scons/sage_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,9 @@
 #
 ##############################################################################
 
-from .jessie_options import *
+from templates.jessie_py3_options import *
 
-mpi='OPENMPI'
+debug = False
+lapack = False
+silo = False
 
diff --git a/escript/py_src/pdetools.py b/scons/savanna_ice_noomp_options.py
similarity index 62%
copy from escript/py_src/pdetools.py
copy to scons/savanna_ice_noomp_options.py
index d4227a1..67b343a 100644
--- a/escript/py_src/pdetools.py
+++ b/scons/savanna_ice_noomp_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,10 @@
 #
 ##############################################################################
 
-from __future__ import print_function, division
+# Replace threaded mkl library by sequential one but don't touch other options
+from savanna_ice_options import *
+openmp = False
+mkl_libs = ['mkl_intel_lp64', 'mkl_sequential', 'mkl_core', 'pthread']
 
+cxx_extra += ' -wd3180 '  #prevent icpc from complaining about OMP
 
-from esys.escriptcore.pdetools import *
diff --git a/scons/templates/sid_py3_mpi_options.py b/scons/savanna_ice_options.py
similarity index 68%
copy from scons/templates/sid_py3_mpi_options.py
copy to scons/savanna_ice_options.py
index b1b3748..f225282 100644
--- a/scons/templates/sid_py3_mpi_options.py
+++ b/scons/savanna_ice_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,11 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
-# Refer to README_FIRST for usage instructions.
+from savanna_options import *
 
-from scons.templates.sid_py3_options import *
+build_dir = 'buildice'
 
-mpi = 'OPENMPI'
+cxx_extra = '-ipo -sox -I/sw/pymodules/2.7/scipy-0.15.1-ice/lib/python2.7/site-packages/numpy/core/include'
 
+cuda = False
+werror = True
diff --git a/escript/py_src/pdetools.py b/scons/savanna_noomp_options.py
similarity index 62%
copy from escript/py_src/pdetools.py
copy to scons/savanna_noomp_options.py
index d4227a1..9bff057 100644
--- a/escript/py_src/pdetools.py
+++ b/scons/savanna_noomp_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,10 @@
 #
 ##############################################################################
 
-from __future__ import print_function, division
+# Replace threaded mkl library by sequential one but don't touch other options
+from savanna_options import *
+openmp = False
+mkl_libs = ['mkl_intel_lp64', 'mkl_sequential', 'mkl_core', 'pthread']
 
+cxx_extra += ' -wd3180 '  #prevent icpc from complaining about OMP
 
-from esys.escriptcore.pdetools import *
diff --git a/scons/savanna_options.py b/scons/savanna_options.py
new file mode 100644
index 0000000..cfa8470
--- /dev/null
+++ b/scons/savanna_options.py
@@ -0,0 +1,86 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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)
+#
+##############################################################################
+
+MKLROOT=None
+try:
+    import os
+    if not 'escript/dev-deps' in os.environ['LOADEDMODULES'].split(':'):
+        print("WARNING: The escript/dev-deps module does not appear to be loaded!")
+    MKLROOT = os.environ['MKLROOT']
+    I_MPI_ROOT = os.environ['I_MPI_ROOT']
+except:
+    pass
+
+escript_opts_version = 203
+
+cxx_extra = '-sox -I/sw/pymodules/3.5/scipy-0.17.1-haswell/lib/python3.5/site-packages/numpy-1.11.0-py3.5-linux-x86_64.egg/numpy/core/include'
+
+ld_extra = '-ipo-separate -shared-intel -L/sw/libs/hdf5/1.8.14/lib'
+ld_extra += ' -wd11021 '  #silence icpc warnings about symbols ipo can't see
+
+werror = False
+verbose = True
+openmp = True
+
+pythoncmd = "python3"
+
+mpi = 'INTELMPI'
+mpi_prefix = I_MPI_ROOT or '/sw/intel/impi/2017.0.098'
+mpi_prefix += '/intel64'
+#cuda = True
+nvccflags = "-arch=sm_35 -ccbin=icpc -DBOOST_NOINLINE='__attribute__((noinline))'"
+cuda_prefix = ['/sw/libs/cuda/7.5/include', '/sw/libs/cuda/7.5/lib64']
+
+boost_prefix = '/sw/libs/boost/1.61.0'
+boost_libs = ['boost_python3']
+cppunit_prefix = '/sw/libs/cppunit/1.13.2'
+netcdf = True
+netcdf_prefix = '/sw/libs/netcdf/4.1.3'
+netcdf_libs = ['netcdf_c++', 'netcdf', 'hdf5']
+parmetis = True
+parmetis_prefix = '/sw/libs/parmetis/4.0.3-impi'
+parmetis_libs = ['parmetis']
+trilinos = True
+trilinos_prefix = '/sw/libs/trilinos/snapshot-hybrid-eti'
+
+mkl = True
+_mklroot=MKLROOT or '/sw/intel/compilers_and_libraries_2017.0.098/linux/mkl'
+mkl_prefix = ['%s/include'%_mklroot, '%s/lib/intel64'%_mklroot]
+mkl_libs = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
+#boomeramg = True
+boomeramg_prefix = '/sw/libs/hypre/2.0.0'
+boomeramg_libs = ['HYPRE']
+#boomeramg_libs = ['HYPRE_IJ_mv', 'HYPRE_krylov', 'HYPRE_parcsr_ls']
+silo = True
+silo_prefix = '/sw/libs/silo/4.10.2'
+silo_libs = ['siloh5', 'hdf5']
+visit = False
+visit_prefix = '/sw/apps/visit/2.7.0/linux-x86_64/libsim/V2'
+
+prelaunch = ""
+launcher = "srun --nodes=%n --ntasks=%N --ntasks-per-node=%p --cpus-per-task=%t --cpu_bind=quiet %b"
+postlaunch = ""
+
+env_export = ['INTEL_LICENSE_FILE']
+
+tools_names = [('intelc',{'topdir':'/sw/intel/compilers_and_libraries_2017.0.098'})]
+
+# uncomment the following four options to build with mpt (check modules!)
+#build_dir = 'buildmpt'
+#mpi = 'MPT'
+#mpi_prefix = '/opt/sgi/mpt/mpt-2.10'
+#parmetis_prefix = '/sw/libs/parmetis/4.0.3-mpt'
+
diff --git a/scons/templates/jessie_mpi_options.py b/scons/squirrel_options.py
similarity index 62%
copy from scons/templates/jessie_mpi_options.py
copy to scons/squirrel_options.py
index 1cb53f9..3bd0052 100644
--- a/scons/templates/jessie_mpi_options.py
+++ b/scons/squirrel_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2013 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -9,12 +9,15 @@
 # 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)
+# Development since 2012 by School of Earth Sciences
 #
 ##############################################################################
 
-from .jessie_options import *
+from templates.wheezy_options import *
 
-mpi='OPENMPI'
+# mpi = 'none'
+mpi = 'OPENMPI'
+boost_libs = ['boost_python-py27']
+umfpack = True
+silo = True
 
diff --git a/scons/templates/windows_intelc_options.py b/scons/standalone_options.py
similarity index 59%
copy from scons/templates/windows_intelc_options.py
copy to scons/standalone_options.py
index 53997c9..300f69b 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/standalone_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,30 +14,11 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-
-import os
-
-# PREFIXES:
-# There are two ways to specify where to find dependent headers and libraries
-# (via the <dependency>_prefix):
-# 1) If your installation follows the general scheme where headers are located
-#    in <prefix>/include[32,64], and libraries in <prefix>/lib[32,64] then
-#    it is sufficient to specify this prefix, e.g. boost_prefix='C:/python'
-# 2) Otherwise provide a list with two elements, where the first one is the
-#    include path, and the second the library path, e.g.
-#    boost_prefix=['C:/boost/include/boost1_44', 'C:/boost/lib']
-# All <dependency>_prefix settings default to '/usr' so have to be set
-# manually on Windows.
-
-# The options file version. SCons will refuse to build if there have been
-# changes to the set of variables and your file has not been updated.
-# This setting is mandatory.
-escript_opts_version = 202
+escript_opts_version = 201
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
-#prefix = 'C:/escript'
+#prefix = '/usr/local'
 
 # Top-level directory for intermediate build and test files.
 # DEFAULT: 'build'
@@ -50,27 +31,27 @@ escript_opts_version = 202
 # Flags to use with the C++ compiler. Do not set unless you know
 # what you are doing - use cxx_extra to specify additional flags!
 # DEFAULT: compiler-dependent
-cc_flags = '/EHsc /GR /MD /Qvc7.1'
+#cc_flags = ''
 
 # Additional compiler (optimization) flags for non-debug builds
 # DEFAULT: compiler-dependent
-cc_optim = '/fast /Oi /W3 /Qssp /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+#cc_optim = '-O3 -mmmx -msse'
 
 # Additional compiler flags for debug builds
 # DEFAULT: compiler-dependent
-cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
+#cc_debug = '-g'
 
 # Additional flags to add to the C++ compiler
 # DEFAULT: '' (empty)
-#cxx_extra = ''
+cxx_extra = '-I../pkg/netcdf/include/'
 
 # Additional flags to add to the linker
 # DEFAULT: '' (empty)
-#ld_extra = ''
+ld_extra = '-L../pkg/boost/lib/ -L../pkg/netcdf/lib/ -L../pkg/python/lib'
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
-werror = False
+#werror = False
 
 # Whether to build a debug version
 # DEFAULT: False
@@ -78,41 +59,51 @@ werror = False
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
-verbose = True
+#verbose = True
 
 # Set to True to add flags that enable OpenMP parallelization
 # DEFAULT: False
-openmp = True
+#openmp = True
 
 # Additional compiler flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_flags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_flags = '-fopenmp'
 
 # Additional linker flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_ldflags = '-fopenmp'
 
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
 # DEFAULT: 'none' (disable MPI)
-mpi = 'MPICH2'
+#mpi = 'OPENMPI'
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-mpi_prefix = 'C:/Program Files/MPICH2'
+#mpi_prefix = '/usr/lib/openmpi'
 
 # MPI libraries to link against
-mpi_libs = ['mpi']
-
-dotdot = os.path.realpath('..')
+#mpi_libs = ['mpi_cxx', 'mpi', 'open-rte', 'open-pal']
 
 # Prefix or paths to boost-python headers and libraries. See note above.
-boost_prefix = [os.path.join(dotdot, 'boost_1_39_0'), os.path.join(dotdot, 'boost_1_39_0','stage','lib')]
+boost_prefix = ['../pkg/boost/include/boost-1_39/', '../pkg/boost/lib/']
+
 
 # boost-python library/libraries to link against
-boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python']
+
+#if this is not 'python' the command will be used instead of the python
+#version scons is running on
+#pythoncmd='python'
+
+#Set to true to build with python3 [You will need to set pythoncmd as well]
+#usepython3=False
+
+#name of the python library to link against.  For Python2 you should not need
+#to set this
+#pythonlibname=''
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
-#cppunit_prefix = 'C:/CppUnit'
+#cppunit_prefix = '/usr/local'
 
 # CppUnit library/libraries to link against
 #cppunit_libs = ['cppunit']
@@ -122,17 +113,18 @@ boost_libs = ['boost_python-vc71-mt-1_39']
 netcdf = True
 
 # Prefix or paths to netCDF headers and libraries. See note above.
-netcdf_prefix = [os.path.join(dotdot, 'netcdf', 'src', 'include'), os.path.join(dotdot, 'netcdf', 'lib')]
+netcdf_prefix = ['../pkg/netcdf/include/', '../pkg/netcdf/lib/']
+ 
 
 # netCDF library/libraries to link against
-netcdf_libs = ['netcdf_cpp', 'netcdf']
+#netcdf_libs = ['netcdf_c++', 'netcdf']
 
 # Whether to use the parMETIS library (only in conjunction with MPI)
 # DEFAULT: False
 #parmetis = True
 
 # Prefix or paths to parMETIS headers and libraries. See note above.
-#parmetis_prefix = 'C:/parmetis'
+#parmetis_prefix = '/usr/local'
 
 # parMETIS library/libraries to link against
 #parmetis_libs = ['parmetis', 'metis']
@@ -142,7 +134,7 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #papi = True
 
 # Prefix or paths to PAPI headers and libraries. See note above.
-#papi_prefix = 'C:/papi'
+#papi_prefix = '/usr/local'
 
 # PAPI library/libraries to link against
 #papi_libs = ['papi']
@@ -156,17 +148,17 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #mkl = True
 
 # Prefix or paths to MKL headers and libraries. See note above.
-#mkl_prefix = 'C:/mkl'
+#mkl_prefix = '/usr'
 
 # MKL library/libraries to link against
-#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide']
+#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide', 'pthread']
 
 # Whether to use UMFPACK (requires AMD and BLAS)
 # DEFAULT: False
 #umfpack = True
 
 # Prefix or paths to UMFPACK headers and libraries. See note above.
-#umfpack_prefix = 'C:/umfpack'
+#umfpack_prefix = ['/usr/include/suitesparse', '/usr/lib']
 
 # UMFPACK library/libraries to link against
 #umfpack_libs = ['umfpack']
@@ -176,18 +168,15 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #boomeramg = True
 
 # Prefix or paths to BoomerAMG headers and libraries. See note above.
-#boomeramg_prefix = 'C:/boomeramg'
+#boomeramg_prefix = '/usr/local'
 
 # BoomerAMG library/libraries to link against
 #boomeramg_libs = ['HYPRE']
 
-# Flavour of LAPACK implementation
-# Recognized values: 'none', 'clapack', 'mkl'
-# DEFAULT: 'none' (do not use LAPACK)
-#lapack = 'clapack'
+#lapack = True
 
 # Prefix or paths to LAPACK headers and libraries. See note above.
-#lapack_prefix = 'C:/lapack'
+#lapack_prefix = '/usr/local'
 
 # LAPACK library/libraries to link against
 #lapack_libs = ['lapack_atlas']
@@ -197,7 +186,7 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #silo = True
 
 # Prefix or paths to SILO headers and libraries. See note above.
-#silo_prefix = 'C:/silo'
+#silo_prefix = '/usr/local'
 
 # SILO library/libraries to link against
 #silo_libs = ['siloh5', 'hdf5']
@@ -207,47 +196,30 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #visit = True
 
 # Prefix or paths to VisIt's sim2 headers and libraries. See note above.
-#visit_prefix = 'C:/visit/2.1.0/linux-intel/libsim/V2'
+#visit_prefix = '/opt/visit/2.1.0/linux-intel/libsim/V2'
 
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
 
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+#sys_libs = []
 
 # Additional environmental variables to export to the tools
 #env_export = []
 
-tools_names = ['intelc']
+#tools_names = ['default']
 
 #iknowwhatimdoing = False
 
-#forcelazy = 'leave_alone'
+#forcelazy = 'auto'
 
-#forcecollres = 'leave_alone'
+#forcecollres = 'auto'
 
diff --git a/scons/templates/README_FIRST b/scons/templates/README_FIRST
index 6bef12b..8d8b62d 100644
--- a/scons/templates/README_FIRST
+++ b/scons/templates/README_FIRST
@@ -125,6 +125,13 @@ mpi_prefix = '/usr/lib/openmpi'
 mpi_libs = ['mpi_cxx', 'mpi', 'open-rte', 'open-pal']
   MPI libraries to link against.
 
+mpi_no_host = False
+  This is a work around for a problem with the open-mpi launcher. In some 
+  versions, "--host localhost" would be added to the launch cmd and this
+  would prevent multiple processes from being spawned.
+  You should not need to set this option to True unless you are having
+  said problem.
+
 cuda = True
   Whether to add support for GPU-based ripley system matrix (requires nvcc
   and thrust headers, experimental) [new in 202].  DEFAULT: False
@@ -132,9 +139,21 @@ cuda = True
 cuda_prefix = '/usr/local'
   Prefix or paths to NVidia CUDA installation. See note above. [new in 202]
 
-netcdf = True
+netcdf = False
   Whether to use the netCDF library for dump file support and netCDF-based
-  downunder data import. Requires the legacy netCDF C++ libraries and headers.
+  downunder data import. 
+  This used to be a boolean value but now selects between 3 options:
+    none - no netcdf support
+    ~~~~
+       none, no, off, False are all synonyms for this
+    3    - support netcdf 3 files
+    ~~
+       Requires the legacy netCDF C++ libraries.
+       on, yes, 3, True are synonyms for this
+    4
+    ~~   - support both version 3 and version 4 formats
+       Requires the netCDF4 C++ headers and libraries
+       4 is the only specifier for this.
   DEFAULT: False
 
 netcdf_prefix = ['/usr/include/netcdf-3', '/usr/lib']
diff --git a/scons/templates/__init__.py b/scons/templates/__init__.py
index fd91591..53210e8 100644
--- a/scons/templates/__init__.py
+++ b/scons/templates/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/centos7_0_options.py b/scons/templates/centos7_0_options.py
index 66ccc84..c09ae00 100644
--- a/scons/templates/centos7_0_options.py
+++ b/scons/templates/centos7_0_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -21,4 +21,8 @@ escript_opts_version = 203
 openmp = True
 netcdf = True
 compressed_files = False
+boost_libs = ['boost_python']
+pythonlibpath = ['/usr/lib64']
+pythonlibname = ['python2.7']
+pythonincpath = ['/usr/include/python2.7']
 
diff --git a/scons/templates/fedora21_5_options.py b/scons/templates/fedora_options.py
similarity index 92%
rename from scons/templates/fedora21_5_options.py
rename to scons/templates/fedora_options.py
index 10075f3..8c5ef70 100644
--- a/scons/templates/fedora21_5_options.py
+++ b/scons/templates/fedora_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/freebsd10_0_options.py b/scons/templates/freebsd10_0_options.py
index 6f545b0..7705f56 100644
--- a/scons/templates/freebsd10_0_options.py
+++ b/scons/templates/freebsd10_0_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/homebrew_10.10_options.py b/scons/templates/homebrew_10.10_options.py
index 834b099..9f479d3 100644
--- a/scons/templates/homebrew_10.10_options.py
+++ b/scons/templates/homebrew_10.10_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/homebrew_11_options.py b/scons/templates/homebrew_11_options.py
index 5d60509..9c089c4 100644
--- a/scons/templates/homebrew_11_options.py
+++ b/scons/templates/homebrew_11_options.py
@@ -20,7 +20,7 @@
 escript_opts_version = 203
 osx_dependency_fix = True
 cc_flags = "-pedantic -Wall -fPIC -Wno-unknown-pragmas -Wno-sign-compare -Wno-system-headers -Wno-long-long -Wno-strict-aliasing"
-cxx_extra = '-Wno-c99-extensions'
+cxx_extra = 'std=c++11 -Wno-c99-extensions'
 #mpi = 'OPENMPI'
 mpi_prefix = '/usr/local'
 mpi_libs = ['mpi_cxx', 'mpi', 'open-rte', 'open-pal']
@@ -29,4 +29,4 @@ cppunit_prefix = '/usr/local'
 netcdf = True
 netcdf_prefix = '/usr/local'
 netcdf_libs = ['netcdf_c++', 'netcdf']
-
+werror = False
diff --git a/scons/templates/homebrew_options.py b/scons/templates/homebrew_options.py
index d05723a..6f646bc 100644
--- a/scons/templates/homebrew_options.py
+++ b/scons/templates/homebrew_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/jessie_mpi_options.py b/scons/templates/jessie_mpi_options.py
index 1cb53f9..c73dea2 100644
--- a/scons/templates/jessie_mpi_options.py
+++ b/scons/templates/jessie_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/jessie_options.py b/scons/templates/jessie_options.py
index c6494a7..4573883 100644
--- a/scons/templates/jessie_options.py
+++ b/scons/templates/jessie_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/jessie_py3_mpi_options.py b/scons/templates/jessie_py3_mpi_options.py
index 4d6aca6..a14f4ab 100644
--- a/scons/templates/jessie_py3_mpi_options.py
+++ b/scons/templates/jessie_py3_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/jessie_py3_options.py b/scons/templates/jessie_py3_options.py
index 5cd152a..583a3ef 100644
--- a/scons/templates/jessie_py3_options.py
+++ b/scons/templates/jessie_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/macports_10.10_options.py b/scons/templates/macports_10.10_options.py
index c4a7e75..5cdce8b 100644
--- a/scons/templates/macports_10.10_options.py
+++ b/scons/templates/macports_10.10_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/macports_options.py b/scons/templates/macports_options.py
index d196a76..c0dda80 100644
--- a/scons/templates/macports_options.py
+++ b/scons/templates/macports_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -27,4 +27,4 @@ silo = True
 silo_prefix = '/usr/local'
 silo_libs = ['silo']
 tools_names = ['clang']
-
+compression_libs = ['boost_iostreams-mt']
diff --git a/scons/templates/opensuse13_2_options.py b/scons/templates/opensuse_options.py
similarity index 77%
copy from scons/templates/opensuse13_2_options.py
copy to scons/templates/opensuse_options.py
index c755259..fbcb33f 100644
--- a/scons/templates/opensuse13_2_options.py
+++ b/scons/templates/opensuse_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,4 +19,8 @@
 
 escript_opts_version = 203
 openmp = True
-
+boost_libs = ['boost_python']
+pythonlibpath = ['/usr/lib64']
+pythonlibname = ['python2.7']
+pythonincpath = ['/usr/include/python']
+netcdf = True
diff --git a/scons/templates/sid_options.py b/scons/templates/sid_options.py
index 205b130..f079486 100644
--- a/scons/templates/sid_options.py
+++ b/scons/templates/sid_options.py
@@ -21,7 +21,11 @@ escript_opts_version = 203
 #cxx_extra = '-Wno-literal-suffix'
 openmp = True
 #mpi = 'OPENMPI'
-mpi_prefix = '/usr/lib/openmpi'
+
+import os
+
+d_mpi_path = '/usr/include/openmpi'
+mpi_prefix = os.path.split(os.path.realpath(d_mpi_path))[0]
 mpi_libs = ['mpi_cxx', 'mpi']
 netcdf = True
 #umfpack = True
diff --git a/scons/templates/sid_py3_mpi_options.py b/scons/templates/sid_py3_mpi_options.py
index b1b3748..a40dab8 100644
--- a/scons/templates/sid_py3_mpi_options.py
+++ b/scons/templates/sid_py3_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/sid_py3_options.py b/scons/templates/sid_py3_options.py
index 6c42c10..8332e14 100644
--- a/scons/templates/sid_py3_options.py
+++ b/scons/templates/sid_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/trusty_options.py b/scons/templates/trusty_options.py
index 291d4e1..6f590c0 100644
--- a/scons/templates/trusty_options.py
+++ b/scons/templates/trusty_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/utopic_options.py b/scons/templates/utopic_options.py
index 291d4e1..6f590c0 100644
--- a/scons/templates/utopic_options.py
+++ b/scons/templates/utopic_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/wheezy_mpi_options.py b/scons/templates/wheezy_mpi_options.py
index f8bcaa1..fb5f7b5 100644
--- a/scons/templates/wheezy_mpi_options.py
+++ b/scons/templates/wheezy_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/wheezy_options.py b/scons/templates/wheezy_options.py
index 4030e7b..07eb44f 100644
--- a/scons/templates/wheezy_options.py
+++ b/scons/templates/wheezy_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/wheezy_py3_mpi_options.py b/scons/templates/wheezy_py3_mpi_options.py
index 369d691..edf5327 100644
--- a/scons/templates/wheezy_py3_mpi_options.py
+++ b/scons/templates/wheezy_py3_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/wheezy_py3_options.py b/scons/templates/wheezy_py3_options.py
index c1cd22a..85f71a1 100644
--- a/scons/templates/wheezy_py3_options.py
+++ b/scons/templates/wheezy_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/windows_intelc_options.py b/scons/templates/windows_intelc_options.py
index 53997c9..f4cb3fc 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/templates/windows_intelc_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/windows_msvc90_options.py b/scons/templates/windows_msvc90_options.py
index 697a06b..bacbf62 100644
--- a/scons/templates/windows_msvc90_options.py
+++ b/scons/templates/windows_msvc90_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/windows_options.py b/scons/templates/windows_options.py
index fe9f8c6..0906e2b 100644
--- a/scons/templates/windows_options.py
+++ b/scons/templates/windows_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/scons/templates/wheezy_py3_mpi_options.py b/scons/templates/xenial_mpi_options.py
similarity index 78%
copy from scons/templates/wheezy_py3_mpi_options.py
copy to scons/templates/xenial_mpi_options.py
index 369d691..013b3bc 100644
--- a/scons/templates/wheezy_py3_mpi_options.py
+++ b/scons/templates/xenial_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian GNU/Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .wheezy_py3_options import *
+from .xenial_options import *
 
 mpi='OPENMPI'
 
diff --git a/scons/templates/trusty_options.py b/scons/templates/xenial_options.py
similarity index 94%
copy from scons/templates/trusty_options.py
copy to scons/templates/xenial_options.py
index 291d4e1..6398e8f 100644
--- a/scons/templates/trusty_options.py
+++ b/scons/templates/xenial_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -29,4 +29,3 @@ umfpack_prefix = ['/usr/include/suitesparse', '/usr/lib']
 umfpack_libs = ['umfpack', 'blas', 'amd']
 lapack_prefix = ['/usr/include/atlas', '/usr/lib/atlas-base']
 dudley_assemble_flags = '-funroll-loops'
-
diff --git a/scons/templates/wheezy_mpi_options.py b/scons/templates/xenial_py3_mpi_options.py
similarity index 78%
copy from scons/templates/wheezy_mpi_options.py
copy to scons/templates/xenial_py3_mpi_options.py
index f8bcaa1..448cec3 100644
--- a/scons/templates/wheezy_mpi_options.py
+++ b/scons/templates/xenial_py3_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian GNU/Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .wheezy_options import *
+from .xenial_py3_options import *
 
 mpi = 'OPENMPI'
 
diff --git a/scons/templates/jessie_py3_options.py b/scons/templates/xenial_py3_options.py
similarity index 81%
copy from scons/templates/jessie_py3_options.py
copy to scons/templates/xenial_py3_options.py
index 5cd152a..38642d7 100644
--- a/scons/templates/jessie_py3_options.py
+++ b/scons/templates/xenial_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .jessie_options import *
+from .xenial_options import *
 
 boost_libs = ['boost_python-py34']
 pythoncmd = 'python3'
diff --git a/scons/templates/wheezy_py3_mpi_options.py b/scons/templates/yakkety_mpi_options.py
similarity index 78%
copy from scons/templates/wheezy_py3_mpi_options.py
copy to scons/templates/yakkety_mpi_options.py
index 369d691..3291a24 100644
--- a/scons/templates/wheezy_py3_mpi_options.py
+++ b/scons/templates/yakkety_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian GNU/Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .wheezy_py3_options import *
+from .yakkety_options import *
 
 mpi='OPENMPI'
 
diff --git a/scons/templates/trusty_options.py b/scons/templates/yakkety_options.py
similarity index 94%
copy from scons/templates/trusty_options.py
copy to scons/templates/yakkety_options.py
index 291d4e1..6398e8f 100644
--- a/scons/templates/trusty_options.py
+++ b/scons/templates/yakkety_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -29,4 +29,3 @@ umfpack_prefix = ['/usr/include/suitesparse', '/usr/lib']
 umfpack_libs = ['umfpack', 'blas', 'amd']
 lapack_prefix = ['/usr/include/atlas', '/usr/lib/atlas-base']
 dudley_assemble_flags = '-funroll-loops'
-
diff --git a/scons/templates/wheezy_mpi_options.py b/scons/templates/yakkety_py3_mpi_options.py
similarity index 78%
copy from scons/templates/wheezy_mpi_options.py
copy to scons/templates/yakkety_py3_mpi_options.py
index f8bcaa1..67e017f 100644
--- a/scons/templates/wheezy_mpi_options.py
+++ b/scons/templates/yakkety_py3_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian GNU/Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .wheezy_options import *
+from .yakkety_py3_options import *
 
 mpi = 'OPENMPI'
 
diff --git a/scons/templates/jessie_py3_options.py b/scons/templates/yakkety_py3_options.py
similarity index 81%
copy from scons/templates/jessie_py3_options.py
copy to scons/templates/yakkety_py3_options.py
index 5cd152a..8de3dee 100644
--- a/scons/templates/jessie_py3_options.py
+++ b/scons/templates/yakkety_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .jessie_options import *
+from .yakkety_options import *
 
 boost_libs = ['boost_python-py34']
 pythoncmd = 'python3'
diff --git a/scons/templates/opensuse13_2_options.py b/scons/templates/zesty_mpi_options.py
similarity index 77%
rename from scons/templates/opensuse13_2_options.py
rename to scons/templates/zesty_mpi_options.py
index c755259..b421823 100644
--- a/scons/templates/opensuse13_2_options.py
+++ b/scons/templates/zesty_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,9 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on OpenSUSE.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-escript_opts_version = 203
-openmp = True
+from .zesty_options import *
+
+mpi='OPENMPI'
 
diff --git a/scons/templates/trusty_options.py b/scons/templates/zesty_options.py
similarity index 94%
copy from scons/templates/trusty_options.py
copy to scons/templates/zesty_options.py
index 291d4e1..6398e8f 100644
--- a/scons/templates/trusty_options.py
+++ b/scons/templates/zesty_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -29,4 +29,3 @@ umfpack_prefix = ['/usr/include/suitesparse', '/usr/lib']
 umfpack_libs = ['umfpack', 'blas', 'amd']
 lapack_prefix = ['/usr/include/atlas', '/usr/lib/atlas-base']
 dudley_assemble_flags = '-funroll-loops'
-
diff --git a/scons/templates/wheezy_mpi_options.py b/scons/templates/zesty_py3_mpi_options.py
similarity index 78%
copy from scons/templates/wheezy_mpi_options.py
copy to scons/templates/zesty_py3_mpi_options.py
index f8bcaa1..e81c4ad 100644
--- a/scons/templates/wheezy_mpi_options.py
+++ b/scons/templates/zesty_py3_mpi_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian GNU/Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .wheezy_options import *
+from .zesty_py3_options import *
 
 mpi = 'OPENMPI'
 
diff --git a/scons/templates/jessie_py3_options.py b/scons/templates/zesty_py3_options.py
similarity index 81%
copy from scons/templates/jessie_py3_options.py
copy to scons/templates/zesty_py3_options.py
index 5cd152a..a736d30 100644
--- a/scons/templates/jessie_py3_options.py
+++ b/scons/templates/zesty_py3_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2015 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,10 +14,10 @@
 #
 ##############################################################################
 
-# This is a template configuration file for escript on Debian/GNU Linux.
+# This is a template configuration file for escript on Ubuntu Linux.
 # Refer to README_FIRST for usage instructions.
 
-from .jessie_options import *
+from .zesty_options import *
 
 boost_libs = ['boost_python-py34']
 pythoncmd = 'python3'
diff --git a/scons/tinaroo_options.py b/scons/tinaroo_options.py
new file mode 100644
index 0000000..9d36c24
--- /dev/null
+++ b/scons/tinaroo_options.py
@@ -0,0 +1,60 @@
+
+##############################################################################
+#
+# Copyright (c) 2003-2017 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)
+#
+##############################################################################
+
+# required modules in env:
+#module load intel_xe/2016.2.181
+#module load GCC/4.9.2
+#module load intel_mpi/5.0.3.048
+
+escript_opts_version = 203
+
+prefix = '/30days/uqcalti1/prefix'
+
+cc_optim = '-O3 -ftz -fno-alias -inline-level=2 -ipo -xCORE-AVX2 -funroll-loops'
+cxx_extra = '-wd2259 -Wall -Wcheck -sox -I%s/lib/python3.5/site-packages/numpy/core/include'%prefix
+
+#ld_extra = '-ipo-separate -shared-intel -qopt-report=5 -qopt-report-phase=vec,loop'
+ld_extra = '-ipo-separate -shared-intel '
+ld_extra += ' -wd11021 '  #silence icpc warnings about symbols ipo can't see
+
+werror = False
+verbose = True
+openmp = True
+omp_flags = '-qopenmp'
+omp_ldflags = '-qopenmp'
+mpi = 'INTELMPI'
+mpi_prefix = '/sw/Licensed/intel/impi/5.0.3.048/intel64'
+pythoncmd = 'python3.5'
+boost_prefix = prefix
+boost_libs = ['boost_python3']
+netcdf = True
+netcdf_prefix = prefix
+netcdf_libs = ['netcdf_c++', 'netcdf', 'hdf5']
+parmetis = False
+mkl = True
+_mklroot='/sw/Licensed/intel/compilers_and_libraries_2016.2.181/linux/mkl'
+mkl_prefix = ['%s/include'%_mklroot, '%s/lib/intel64'%_mklroot]
+mkl_libs = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
+silo = True
+silo_prefix = prefix
+silo_libs = ['siloh5', 'hdf5']
+trilinos = True
+trilinos_prefix = prefix
+cppunit_prefix = prefix
+
+env_export = ['INTEL_LICENSE_FILE']
+tools_names = [('intelc',{'topdir':'/sw/Licensed/intel/compilers_and_libraries_2016.2.181'})]
+
diff --git a/scons/templates/windows_intelc_options.py b/scons/vayu_options.py
similarity index 61%
copy from scons/templates/windows_intelc_options.py
copy to scons/vayu_options.py
index 53997c9..ad56999 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/vayu_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,34 +14,18 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-
-import os
-
-# PREFIXES:
-# There are two ways to specify where to find dependent headers and libraries
-# (via the <dependency>_prefix):
-# 1) If your installation follows the general scheme where headers are located
-#    in <prefix>/include[32,64], and libraries in <prefix>/lib[32,64] then
-#    it is sufficient to specify this prefix, e.g. boost_prefix='C:/python'
-# 2) Otherwise provide a list with two elements, where the first one is the
-#    include path, and the second the library path, e.g.
-#    boost_prefix=['C:/boost/include/boost1_44', 'C:/boost/lib']
-# All <dependency>_prefix settings default to '/usr' so have to be set
-# manually on Windows.
-
 # The options file version. SCons will refuse to build if there have been
 # changes to the set of variables and your file has not been updated.
 # This setting is mandatory.
-escript_opts_version = 202
+escript_opts_version = 201
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
-#prefix = 'C:/escript'
+#prefix = '/usr/local'
 
 # Top-level directory for intermediate build and test files.
 # DEFAULT: 'build'
-#build_dir = 'build'
+#build_dir = '/short/r17/cha564/escript_build'
 
 # C++ compiler command name or full path.
 # DEFAULT: auto-detected
@@ -50,23 +34,23 @@ escript_opts_version = 202
 # Flags to use with the C++ compiler. Do not set unless you know
 # what you are doing - use cxx_extra to specify additional flags!
 # DEFAULT: compiler-dependent
-cc_flags = '/EHsc /GR /MD /Qvc7.1'
+#cc_flags = ''
 
 # Additional compiler (optimization) flags for non-debug builds
 # DEFAULT: compiler-dependent
-cc_optim = '/fast /Oi /W3 /Qssp /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+#cc_optim = '-O3 -mmmx -msse'
 
 # Additional compiler flags for debug builds
 # DEFAULT: compiler-dependent
-cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
+#cc_debug = '-g'
 
 # Additional flags to add to the C++ compiler
 # DEFAULT: '' (empty)
-#cxx_extra = ''
+cxx_extra = '-sox -I/apps/python/2.7.1/lib/python2.7/site-packages/numpy/core/include -wd981'
 
 # Additional flags to add to the linker
 # DEFAULT: '' (empty)
-#ld_extra = ''
+ld_extra = '-shared-intel -L/apps/hdf5/1.8.7/lib'
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
@@ -74,7 +58,7 @@ werror = False
 
 # Whether to build a debug version
 # DEFAULT: False
-#debug = True
+# debug = True
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
@@ -86,33 +70,32 @@ openmp = True
 
 # Additional compiler flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_flags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_flags = '-openmp -openmp-report=1'
 
 # Additional linker flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+#omp_ldflags = '-fopenmp'
 
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
 # DEFAULT: 'none' (disable MPI)
-mpi = 'MPICH2'
+mpi = 'OPENMPI'
+#mpi = 'none'
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-mpi_prefix = 'C:/Program Files/MPICH2'
+mpi_prefix = '/apps/openmpi/1.4.3'
 
 # MPI libraries to link against
 mpi_libs = ['mpi']
 
-dotdot = os.path.realpath('..')
-
 # Prefix or paths to boost-python headers and libraries. See note above.
-boost_prefix = [os.path.join(dotdot, 'boost_1_39_0'), os.path.join(dotdot, 'boost_1_39_0','stage','lib')]
+boost_prefix = '/apps/boost/1.48'
 
 # boost-python library/libraries to link against
-boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python']
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
-#cppunit_prefix = 'C:/CppUnit'
+cppunit_prefix = '/apps/cppunit/1.12.1'
 
 # CppUnit library/libraries to link against
 #cppunit_libs = ['cppunit']
@@ -122,17 +105,17 @@ boost_libs = ['boost_python-vc71-mt-1_39']
 netcdf = True
 
 # Prefix or paths to netCDF headers and libraries. See note above.
-netcdf_prefix = [os.path.join(dotdot, 'netcdf', 'src', 'include'), os.path.join(dotdot, 'netcdf', 'lib')]
+netcdf_prefix = '/apps/netcdf/4.1.3'
 
 # netCDF library/libraries to link against
-netcdf_libs = ['netcdf_cpp', 'netcdf']
+#netcdf_libs = ['netcdf_c++', 'netcdf']
 
 # Whether to use the parMETIS library (only in conjunction with MPI)
 # DEFAULT: False
-#parmetis = True
+parmetis = True
 
 # Prefix or paths to parMETIS headers and libraries. See note above.
-#parmetis_prefix = 'C:/parmetis'
+parmetis_prefix = '/apps/parmetis/3.1.1'
 
 # parMETIS library/libraries to link against
 #parmetis_libs = ['parmetis', 'metis']
@@ -142,7 +125,7 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 #papi = True
 
 # Prefix or paths to PAPI headers and libraries. See note above.
-#papi_prefix = 'C:/papi'
+#papi_prefix = '/usr/local'
 
 # PAPI library/libraries to link against
 #papi_libs = ['papi']
@@ -153,97 +136,82 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 
 # Whether to use Intel MKL (Math Kernel Library)
 # DEFAULT: False
-#mkl = True
+mkl = True
 
 # Prefix or paths to MKL headers and libraries. See note above.
-#mkl_prefix = 'C:/mkl'
+mkl_prefix = ['/apps/intel-ct/12.1.9.293/mkl/include', '/apps/intel-ct/12.1.9.293/mkl/lib/intel64']
 
 # MKL library/libraries to link against
-#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide']
+mkl_libs = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'pthread']
 
 # Whether to use UMFPACK (requires AMD and BLAS)
 # DEFAULT: False
 #umfpack = True
 
 # Prefix or paths to UMFPACK headers and libraries. See note above.
-#umfpack_prefix = 'C:/umfpack'
+#umfpack_prefix = '/sw/libs/umfpack/x86_64/icc-13/umfpack-5.6.1'
 
 # UMFPACK library/libraries to link against
-#umfpack_libs = ['umfpack']
+#umfpack_libs = ['umfpack', 'amd', 'suitesparseconfig']
 
 # Whether to use BoomerAMG (requires MPI)
 # DEFAULT: False
 #boomeramg = True
 
 # Prefix or paths to BoomerAMG headers and libraries. See note above.
-#boomeramg_prefix = 'C:/boomeramg'
+#boomeramg_prefix = '/sw/libs/hypre/x86_64/gcc-4.3.2/hypre-2.0.0'
 
 # BoomerAMG library/libraries to link against
 #boomeramg_libs = ['HYPRE']
+#boomeramg_libs = ['HYPRE_IJ_mv', 'HYPRE_krylov', 'HYPRE_parcsr_ls']
 
 # Flavour of LAPACK implementation
 # Recognized values: 'none', 'clapack', 'mkl'
 # DEFAULT: 'none' (do not use LAPACK)
-#lapack = 'clapack'
+lapack = 'mkl'
+#lapack = 'none'
 
 # Prefix or paths to LAPACK headers and libraries. See note above.
-#lapack_prefix = 'C:/lapack'
+lapack_prefix = mkl_prefix
 
 # LAPACK library/libraries to link against
-#lapack_libs = ['lapack_atlas']
+lapack_libs = ['mkl_core']
 
 # Whether to use LLNL's SILO library for Silo output file support in weipa
 # DEFAULT: False
-#silo = True
+silo = True
 
 # Prefix or paths to SILO headers and libraries. See note above.
-#silo_prefix = 'C:/silo'
+silo_prefix = '/short/r17/cha564/silo-4.9.1-bsd/install'
 
 # SILO library/libraries to link against
-#silo_libs = ['siloh5', 'hdf5']
+silo_libs = ['siloh5', 'hdf5']
 
 # Whether to use LLNL's VisIt simulation interface (only version 2 supported)
 # DEFAULT: False
-#visit = True
+#visit = False
 
 # Prefix or paths to VisIt's sim2 headers and libraries. See note above.
-#visit_prefix = 'C:/visit/2.1.0/linux-intel/libsim/V2'
+#visit_prefix = '/sw/apps/visit/x86_64/gcc-4.3.2/visit-2.6.0/2.6.0/linux-x86_64/libsim/V2'
 
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
 
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+#sys_libs = []
 
 # Additional environmental variables to export to the tools
-#env_export = []
+env_export = ['INTEL_LICENSE_FILE']
 
-tools_names = ['intelc']
+tools_names = [('intelc',{'topdir':'/apps/intel-ct/12.1.9.293'})]
 
 #iknowwhatimdoing = False
 
diff --git a/scons/templates/windows_intelc_options.py b/scons/vmw_options.py
similarity index 77%
copy from scons/templates/windows_intelc_options.py
copy to scons/vmw_options.py
index 53997c9..976a316 100644
--- a/scons/templates/windows_intelc_options.py
+++ b/scons/vmw_options.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,8 +14,6 @@
 #
 ##############################################################################
 
-# NOTE: THIS FILE IS DEPRECATED!
-
 import os
 
 # PREFIXES:
@@ -33,7 +31,7 @@ import os
 # The options file version. SCons will refuse to build if there have been
 # changes to the set of variables and your file has not been updated.
 # This setting is mandatory.
-escript_opts_version = 202
+escript_opts_version = 200
 
 # Installation prefix. Files will be installed in subdirectories underneath.
 # DEFAULT: '.' (current directory)
@@ -50,15 +48,16 @@ escript_opts_version = 202
 # Flags to use with the C++ compiler. Do not set unless you know
 # what you are doing - use cxx_extra to specify additional flags!
 # DEFAULT: compiler-dependent
-cc_flags = '/EHsc /GR /MD /Qvc7.1'
+cc_flags = '/EHsc /GR /MD /I"C:/Program Files (x86)/Intel/Composer XE 2011 SP1/compiler/include/"'
 
 # Additional compiler (optimization) flags for non-debug builds
 # DEFAULT: compiler-dependent
-cc_optim = '/fast /Oi /W3 /Qssp /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+#cc_optim = '/fast /Oi /W3 /Qinline-factor- /Qinline-min-size=0 /Qunroll'
+cc_optim = '/fast /Oi /Qunroll'
 
 # Additional compiler flags for debug builds
 # DEFAULT: compiler-dependent
-cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
+#cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
 
 # Additional flags to add to the C++ compiler
 # DEFAULT: '' (empty)
@@ -66,7 +65,7 @@ cc_debug = '/Od /RTCcsu /Zi /Y- /debug:all /Qtrapuv'
 
 # Additional flags to add to the linker
 # DEFAULT: '' (empty)
-#ld_extra = ''
+ld_extra = '/libpath:"C:/Program Files (x86)/Intel/Composer XE 2011 SP1/compiler/lib/ia32"'
 
 # Whether to treat compiler warnings as errors
 # DEFAULT: True
@@ -78,27 +77,29 @@ werror = False
 
 # Set to True to print the full compiler/linker command line
 # DEFAULT: False
-verbose = True
+verbose = False
 
 # Set to True to add flags that enable OpenMP parallelization
 # DEFAULT: False
 openmp = True
 
 # Additional compiler flags for OpenMP builds
+# /Qvec-report0 - Vectorise quietly - http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/copts/common_options/option_vec_report.htm
+# /Qopenmp-report0 - OpenMP quietly (No diagnostics report generated.) - http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/optaps/common/optaps_perf_openmprep.htm
 # DEFAULT: compiler-dependent
 omp_flags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
 
 # Additional linker flags for OpenMP builds
 # DEFAULT: compiler-dependent
-omp_ldflags = '/Qvec-report0 /Qopenmp /Qopenmp-report0 /Qparallel'
+omp_ldflags = ''
 
 # Flavour of MPI implementation
 # Recognized values: 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI'
 # DEFAULT: 'none' (disable MPI)
-mpi = 'MPICH2'
+mpi = 'MPICH2' #'MPICH2'
 
 # Prefix or paths to MPI headers and libraries. See note above about prefixes.
-mpi_prefix = 'C:/Program Files/MPICH2'
+mpi_prefix = "C:/Program Files (x86)/MPICH2"
 
 # MPI libraries to link against
 mpi_libs = ['mpi']
@@ -106,10 +107,10 @@ mpi_libs = ['mpi']
 dotdot = os.path.realpath('..')
 
 # Prefix or paths to boost-python headers and libraries. See note above.
-boost_prefix = [os.path.join(dotdot, 'boost_1_39_0'), os.path.join(dotdot, 'boost_1_39_0','stage','lib')]
+boost_prefix = ['C:/projects/boost_1_47_0', 'C:/projects/boost_1_47_0/stage/lib']
 
 # boost-python library/libraries to link against
-boost_libs = ['boost_python-vc71-mt-1_39']
+boost_libs = ['boost_python-iw-mt-1_47']
 
 # Prefix or paths to CppUnit headers and libraries. See note above.
 #cppunit_prefix = 'C:/CppUnit'
@@ -119,7 +120,7 @@ boost_libs = ['boost_python-vc71-mt-1_39']
 
 # Whether to use the netCDF library for dump file support
 # DEFAULT: False
-netcdf = True
+netcdf = False
 
 # Prefix or paths to netCDF headers and libraries. See note above.
 netcdf_prefix = [os.path.join(dotdot, 'netcdf', 'src', 'include'), os.path.join(dotdot, 'netcdf', 'lib')]
@@ -153,13 +154,14 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 
 # Whether to use Intel MKL (Math Kernel Library)
 # DEFAULT: False
-#mkl = True
+mkl = True
 
 # Prefix or paths to MKL headers and libraries. See note above.
-#mkl_prefix = 'C:/mkl'
+mkl_base_dir = 'C:/Program Files (x86)/Intel/Composer XE 2011 SP1/mkl'
+mkl_prefix = [os.path.join(mkl_base_dir, 'include'), os.path.join(mkl_base_dir, 'lib/ia32')]
 
 # MKL library/libraries to link against
-#mkl_libs = ['mkl_solver', 'mkl_em64t', 'mkl_core', 'guide']
+mkl_libs = ['mkl_intel_c_dll', 'mkl_intel_thread_dll', 'mkl_core_dll', 'libiomp5md', 'mkl_solver', 'mkl_intel_thread', 'mkl_core']
 
 # Whether to use UMFPACK (requires AMD and BLAS)
 # DEFAULT: False
@@ -185,12 +187,14 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 # Recognized values: 'none', 'clapack', 'mkl'
 # DEFAULT: 'none' (do not use LAPACK)
 #lapack = 'clapack'
+lapack = 'mkl'
 
 # Prefix or paths to LAPACK headers and libraries. See note above.
 #lapack_prefix = 'C:/lapack'
+lapack_prefix = mkl_prefix
 
 # LAPACK library/libraries to link against
-#lapack_libs = ['lapack_atlas']
+lapack_libs = ['mkl_lapack95']
 
 # Whether to use LLNL's SILO library for Silo output file support in weipa
 # DEFAULT: False
@@ -212,38 +216,23 @@ netcdf_libs = ['netcdf_cpp', 'netcdf']
 # Sim2 library/libraries to link against
 #visit_libs = ['simV2']
 
-# Build dynamic libraries only
-#DEFAULT: False
-#build_shared = True
-
-# List of domain families to build [new in 202]
-# DEFAULT: 'all' (i.e. dudley, finley, ripley, speckley)
-#domains = 'finley,ripley'
 
 ### ADVANCED OPTIONS ###
 # Do not change the following options unless you know what they do
 
-# launcher, prelaunch, postlaunch: for MPI builds/batch system runs
-# the following substitutions are applied to all three:
-# %b = executable, %n = number of nodes, %p = number of processes,
-# %N = total number of processes, # %t = number of threads,
-# %f = name of hostfile, %h = comma-separated list of hosts,
-# %e = comma-separated list of environment variables to export
-#prelaunch = "EE=$(echo %e|sed -e 's/,/ -x /g')"
-#launcher = "mpirun --gmca mpi_warn_on_fork 0 -x ${EE} --bynode --bind-to-none --host %h -np %N %b"
-#postlaunch = ""
-
 # Use intel's VSL library for random data
 # DEFAULT: False
 #vsl_random = True
 
 # Extra libraries to link with
-sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+# sys_libs = ['C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/Ws2_32', 'C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib\libguide40']
+sys_libs = ['']
 
 # Additional environmental variables to export to the tools
 #env_export = []
 
-tools_names = ['intelc']
+# overloading - [('intelc',{'topdir':'/sw/sdev/intel/cc/x86_64/10.1.025'})]
+tools_names = [('intelc',{'topdir':'C:/Program Files (x86)/Intel/Composer XE 2011 SP1'})]
 
 #iknowwhatimdoing = False
 
diff --git a/scripts/makesrc.sh b/scripts/makesrc.sh
index ee7e4dd..8c26b02 100755
--- a/scripts/makesrc.sh
+++ b/scripts/makesrc.sh
@@ -2,7 +2,7 @@
 #Make the source tarball for debian release
 #Run this from a clean checkout
 
-SRCVERSION=`head -1 localdebian/changelog | tr -d '()' | tr -s '-' ' '| cut -d\  -f3`
+SRCVERSION=`head -1 debian/changelog | tr -d '()' | tr -s '-' ' '| cut -d\  -f3`
 
 svnversion | grep -q :
 if [ $? == 0 ]
diff --git a/scripts/py_comp.py b/scripts/py_comp.py
index 35b3e7c..288597c 100644
--- a/scripts/py_comp.py
+++ b/scripts/py_comp.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/site_scons/dependencies.py b/site_scons/dependencies.py
index b2f54f3..a16c573 100644
--- a/site_scons/dependencies.py
+++ b/site_scons/dependencies.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -75,6 +75,58 @@ def checkCompiler(env):
     
     return conf.Finish()
 
+def call_python_config(bin=None):
+    import subprocess
+    cmd=''
+    cmd+='import subprocess\n'
+    cmd+='import os\n'
+    cmd+='from distutils import sysconfig\n'
+    cmd+='pyversion=sysconfig.get_python_version()\n'
+    cmd+='sp=subprocess.Popen(["python"+pyversion+"-config","--ldflags"], stdout=subprocess.PIPE)\n'
+    cmd+='d=sp.stdout.readline().split()\n'
+    cmd+="libdirs=[z[2:] for z in d if z.startswith(b'-L')]\n"
+    cmd+="libs=[z[2:] for z in d if z.startswith(b'-lpython')]\n"
+    cmd+="target=''\n"
+    cmd+="libname=''\n"
+    cmd+="for d in libdirs:\n"
+    cmd+="  for f in libs:\n"
+    cmd+="    s=os.path.join(d,b'lib'+f+b'.so')\n"
+    cmd+="    try:\n"
+    cmd+="      dummy=os.stat(s)\n"
+    cmd+="      if target=='':\n"
+    cmd+="        target=d\n"
+    cmd+="        libname=f\n"
+    cmd+="    except Exception:\n"
+    cmd+="      pass\n"
+    cmd+="    s=os.path.join(d,b'lib'+f+b'.dylib')\n"
+    cmd+="    try:\n"
+    cmd+="      dummy=os.stat(s)\n"
+    cmd+="      if target=='':\n"
+    cmd+="        target=d\n"
+    cmd+="        libname=f\n"
+    cmd+="    except Exception:\n"
+    cmd+="      pass\n"
+    if bin is None:
+       exec(cmd)
+       ver=str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2])
+       return (target,libname,ver, sysconfig.get_python_inc())
+    # run an external python to get its library location
+    # yes we are starting another python just to run python?-config
+    cmd+="if 'decode' in dir(target):\n"
+    cmd+="   target=target.decode()\n"
+    cmd+="   libname=libname.decode()\n"
+    cmd+="print(target)\n"
+    cmd+="print(libname)\n"
+    cmd+="import sys\n"
+    cmd+="print(str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2]))\n"
+    cmd+="print(sysconfig.get_python_inc())\n"
+    sp=subprocess.Popen([bin, '-c', cmd], stdin=None, stderr=None, stdout=subprocess.PIPE)
+    target=sp.stdout.readline().strip()
+    libname=sp.stdout.readline().strip()
+    ver=sp.stdout.readline().strip()
+    pinc=sp.stdout.readline().strip()
+    return (target, libname, ver, pinc)
+
 def checkPython(env):
     # First we check to see if the config file has specified
     # where to find the file. Ideally, this should be automatic
@@ -82,64 +134,18 @@ def checkPython(env):
     # directory.
     # Use the python scons is running
     if env['pythoncmd'] == sys.executable:
-        python_inc_path=sysconfig.get_python_inc()
         if env['IS_WINDOWS']:
+            python_inc_path=sysconfig.get_python_inc()
             python_lib_path=os.path.join(sysconfig.get_config_var('prefix'), 'libs')
-        elif env['PLATFORM']=='darwin':
-            python_lib_path=sysconfig.get_config_var('LIBPL')
-        else:
-            python_lib_path=sysconfig.get_config_var('LIBDIR')
-
-        if env['IS_WINDOWS']:
             python_libs=['python%s%s'%(sys.version_info[0], sys.version_info[1])]
+            verstring=".".join([str(i) for i in sys.version_info[:3]])
         else:
-            python_libs = sysconfig.get_config_var('LDLIBRARY')
-            if python_libs[:3] == 'lib':
-                python_libs = [python_libs[3:-3]]
-            else:
-                python_libs = ['python'+sysconfig.get_python_version()]
-
-        verstring=".".join([str(i) for i in sys.version_info[:3]])
+            (python_lib_path, python_libs,verstring, python_inc_path)=call_python_config()
 
     # if we want to use a python other than the one scons is running
     # Note: we assume scons is running python 2 in the following.
     else:
-        p = Popen([env['pythoncmd'], '-c', 'from __future__ import print_function;import sys;print(str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2]))'], stdout=PIPE)
-        verstring, _ = p.communicate()
-        verstring = verstring.strip()
-        ispython3 = (verstring[0] == '3')
-        initstring='from __future__ import print_function;from distutils import sysconfig;'
-        if env['pythonlibname'] != '':
-            python_libs = env['pythonlibname']
-        else: # work it out by calling python
-            cmd = 'print(sysconfig.get_config_var("LDLIBRARY"))'
-            p = Popen([env['pythoncmd'], '-c', initstring+cmd], stdout=PIPE)
-            python_libs, _ = p.communicate()
-            if python_libs[:3] == 'lib':
-                python_libs = [python_libs.strip()[3:-3]]
-            else:
-                cmd = 'print("python"+sysconfig.get_python_version())'
-                p = Popen([env['pythoncmd'], '-c', initstring+cmd], stdout=PIPE)
-                python_libs, _ = p.communicate()
-                python_libs = [python_libs.strip()]
-
-        p = Popen([env['pythoncmd'], '-c',  initstring+'print(sysconfig.get_python_inc())'], stdout=PIPE)
-        python_inc_path, _ = p.communicate()
-        if ispython3:
-            python_inc_path = python_inc_path.encode()
-        python_inc_path = python_inc_path.strip()
-        if env['PLATFORM'] == 'darwin':
-            cmd="sysconfig.get_config_var(\"LIBPL\")"
-        else:
-            cmd="sysconfig.get_config_var(\"LIBDIR\")"
-
-        p = Popen([env['pythoncmd'], '-c', initstring+'print('+cmd+')'], stdout=PIPE)
-        python_lib_path, _ = p.communicate()
-        if ispython3:
-            python_lib_path = python_lib_path.decode()
-        python_lib_path = python_lib_path.strip()
-
-
+        (python_lib_path, python_libs,verstring, python_inc_path)=call_python_config(env['pythoncmd'])
     env['python_version'] = verstring
     ispython3 = (verstring[0] == '3')
     if ispython3:
@@ -155,6 +161,9 @@ def checkPython(env):
     if env['pythonincpath'] != '':
         python_inc_path = env['pythonincpath']
 
+    if env['pythonlibname'] != '':
+        python_libs = env['pythonlibname']
+
     conf = Configure(env.Clone())
 
     if env['sysheaderopt'] == '':
@@ -171,7 +180,7 @@ def checkPython(env):
         print("Cannot find python include files (tried 'Python.h' in directory %s)" % (python_inc_path))
         env.Exit(1)
     if not conf.CheckFunc('Py_Exit', language='c++'):
-        print("Cannot find python library method Py_Main (tried %s in directory %s)" % (python_libs, python_lib_path))
+        print("Cannot find python library method Py_Exit (tried %s in directory %s)" % (python_libs, python_lib_path))
         env.Exit(1)
 
     return conf.Finish()
@@ -343,6 +352,8 @@ def checkOptionalLibraries(env):
         env.Append(CPPDEFINES = ['ESYS_HAVE_NETCDF'])
         env['buildvars']['netcdf_inc_path']=netcdf_inc_path
         env['buildvars']['netcdf_lib_path']=netcdf_lib_path
+        if env['netcdf']==4:
+            env.Append(CPPDEFINES = ['NETCDF4'])
     env['buildvars']['netcdf']=int(env['netcdf'])
 
     ######## PAPI
diff --git a/site_scons/extractdebbuild.py b/site_scons/extractdebbuild.py
index 2c99176..546cf87 100644
--- a/site_scons/extractdebbuild.py
+++ b/site_scons/extractdebbuild.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c)2015-2016 by The University of Queensland
+# Copyright (c)2015-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c)2015-2016 by The University of Queensland
+__copyright__="""Copyright (c)2015-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/site_scons/grouptest.py b/site_scons/grouptest.py
index 44b2a59..271558b 100644
--- a/site_scons/grouptest.py
+++ b/site_scons/grouptest.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -15,7 +15,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/site_scons/site_init.py b/site_scons/site_init.py
index 136cff3..0a0bfe8 100644
--- a/site_scons/site_init.py
+++ b/site_scons/site_init.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
@@ -112,8 +112,16 @@ def write_launcher(env):
     try:
         launchscript = os.path.join(env['bininstall'], 'run-escript')
         launcher=open(launchscript, 'w')
+        if not env['stdlocationisprefix']:
+            usestdlocation='0'
+            stdlocation='/usr/lib/python-escript'
+        else:
+            usestdlocation='1'
+            stdlocation=env['prefix']     
         for line in open('run-escript.in','r').readlines():
-            launcher.write(line.replace('@@PRELAUNCH', pre).replace('@@LAUNCH', cmd).replace('@@POSTLAUNCH', post))
+            s=line.replace('@@PRELAUNCH', pre).replace('@@LAUNCH', cmd).replace('@@POSTLAUNCH', post)
+            s=s.replace('@@STDLOCATION', usestdlocation).replace('@@ESROOT',stdlocation)
+            launcher.write(s)
         launcher.close()
         env.Execute(Chmod(launchscript, 0o755))
     except IOError:
diff --git a/site_scons/site_tools/nvcc.py b/site_scons/site_tools/nvcc.py
index 33ff14d..917d1c1 100644
--- a/site_scons/site_tools/nvcc.py
+++ b/site_scons/site_tools/nvcc.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/speckley/SConscript b/speckley/SConscript
index 9ef7483..5d12290 100644
--- a/speckley/SConscript
+++ b/speckley/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/speckley/py_src/SConscript b/speckley/py_src/SConscript
index 52717d6..69d752e 100644
--- a/speckley/py_src/SConscript
+++ b/speckley/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/speckley/py_src/__init__.py b/speckley/py_src/__init__.py
index 31703d8..1c68626 100644
--- a/speckley/py_src/__init__.py
+++ b/speckley/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -19,7 +19,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/speckley/src/AbstractAssembler.cpp b/speckley/src/AbstractAssembler.cpp
index ebedd29..a15ac3d 100644
--- a/speckley/src/AbstractAssembler.cpp
+++ b/speckley/src/AbstractAssembler.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/AbstractAssembler.h b/speckley/src/AbstractAssembler.h
index 505d9c3..5879d15 100644
--- a/speckley/src/AbstractAssembler.h
+++ b/speckley/src/AbstractAssembler.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/Brick.cpp b/speckley/src/Brick.cpp
index e6affb6..3ff47a3 100644
--- a/speckley/src/Brick.cpp
+++ b/speckley/src/Brick.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -31,7 +31,14 @@
 #include <boost/math/special_functions/fpclassify.hpp> // for isnan
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
 #ifdef ESYS_HAVE_SILO
@@ -51,6 +58,11 @@ using std::min;
 using std::vector;
 using std::string;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
+
 namespace speckley {
 
 inline int indexOfMax(dim_t a, dim_t b, dim_t c)
@@ -232,6 +244,176 @@ bool Brick::operator==(const escript::AbstractDomain& other) const
     return false;
 }
 
+#ifdef NETCDF4
+
+
+void Brick::readNcGrid(escript::Data& out, std::string filename, std::string varname,
+            const ReaderParameters& params) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    // check destination function space
+    dim_t myN0, myN1, myN2;
+    if (out.getFunctionSpace().getTypeCode() == Nodes) {
+        myN0 = m_NN[0];
+        myN1 = m_NN[1];
+        myN2 = m_NN[2];
+    } else if (out.getFunctionSpace().getTypeCode() == Elements) {
+        myN0 = m_NE[0];
+        myN1 = m_NE[1];
+        myN2 = m_NE[2];
+    } else
+        throw SpeckleyException("readNcGrid(): invalid function space for output data object");
+
+    if (params.first.size() != 3)
+        throw SpeckleyException("readNcGrid(): argument 'first' must have 3 entries");
+
+    if (params.numValues.size() != 3)
+        throw SpeckleyException("readNcGrid(): argument 'numValues' must have 3 entries");
+
+    if (params.multiplier.size() != 3)
+        throw SpeckleyException("readNcGrid(): argument 'multiplier' must have 3 entries");
+    for (size_t i=0; i<params.multiplier.size(); i++)
+        if (params.multiplier[i]<1)
+            throw SpeckleyException("readNcGrid(): all multipliers must be positive");
+
+    // check file existence and size
+    NcFile f;
+    if (!openNcFile(f, filename))
+    {
+        throw SpeckleyException("readNcGrid(): cannot open file");
+    }           
+    NcVar var = f.getVar(varname.c_str());
+    if (var.isNull())
+        throw SpeckleyException("readNcGrid(): invalid variable name");
+
+    // TODO: rank>0 data support
+    const int numComp = out.getDataPointSize();
+    if (numComp > 1)
+        throw SpeckleyException("readNcGrid(): only scalar data supported");
+
+    const int dims = var.getDimCount();
+    vector<long> edges(dims);
+    std::vector< NcDim > vard=var.getDims();
+    for (size_t i=0;i<vard.size();++i)
+    {
+        edges[i]=vard[i].getSize();
+    }    
+
+    // is this a slice of the data object (dims!=3)?
+    // note the expected ordering of edges (as in numpy: z,y,x)
+    if ( (dims==3 && (params.numValues[2] > edges[0] ||
+                      params.numValues[1] > edges[1] ||
+                      params.numValues[0] > edges[2]))
+            || (dims==2 && params.numValues[2]>1)
+            || (dims==1 && (params.numValues[2]>1 || params.numValues[1]>1)) ) {
+        throw SpeckleyException("readNcGrid(): not enough data in file");
+    }
+
+    // check if this rank contributes anything
+    if (params.first[0] >= m_offset[0]+myN0 ||
+            params.first[0]+params.numValues[0]*params.multiplier[0] <= m_offset[0] ||
+            params.first[1] >= m_offset[1]+myN1 ||
+            params.first[1]+params.numValues[1]*params.multiplier[1] <= m_offset[1] ||
+            params.first[2] >= m_offset[2]+myN2 ||
+            params.first[2]+params.numValues[2]*params.multiplier[2] <= m_offset[2]) {
+        return;
+    }
+
+    // now determine how much this rank has to write
+
+    // first coordinates in data object to write to
+    const dim_t first0 = max(dim_t(0), params.first[0]-m_offset[0]);
+    const dim_t first1 = max(dim_t(0), params.first[1]-m_offset[1]);
+    const dim_t first2 = max(dim_t(0), params.first[2]-m_offset[2]);
+    // indices to first value in file (not accounting for reverse yet)
+    dim_t idx0 = max(dim_t(0), m_offset[0]-params.first[0]);
+    dim_t idx1 = max(dim_t(0), m_offset[1]-params.first[1]);
+    dim_t idx2 = max(dim_t(0), m_offset[2]-params.first[2]);
+    // number of values to read
+    const dim_t num0 = min(params.numValues[0]-idx0, myN0-first0);
+    const dim_t num1 = min(params.numValues[1]-idx1, myN1-first1);
+    const dim_t num2 = min(params.numValues[2]-idx2, myN2-first2);
+
+    // make sure we read the right block if going backwards through file
+    if (params.reverse[0])
+        idx0 = edges[dims-1]-num0-idx0;
+    if (dims>1 && params.reverse[1])
+        idx1 = edges[dims-2]-num1-idx1;
+    if (dims>2 && params.reverse[2])
+        idx2 = edges[dims-3]-num2-idx2;
+
+    vector<double> values(num0*num1*num2);
+    vector<size_t> startindex;
+    vector<size_t> counts;
+    if (dims==3) {
+        //var->set_cur(idx2, idx1, idx0);             // from old API
+        startindex.push_back(idx2);
+        startindex.push_back(idx1);
+        startindex.push_back(idx0);
+        counts.push_back(num2);
+        counts.push_back(num1);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    } else if (dims==2) {
+        // var->set_cur(idx1, idx0);                // from old API
+        startindex.push_back(idx1);
+        startindex.push_back(idx0);
+        counts.push_back(num1);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    } else {
+        //var->set_cur(idx0);
+        //var->get(&values[0], num0);
+        startindex.push_back(idx0);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    }    
+
+    const int dpp = out.getNumDataPointsPerSample();
+    out.requireWrite();
+
+    // helpers for reversing
+    const dim_t x0 = (params.reverse[0] ? num0-1 : 0);
+    const int x_mult = (params.reverse[0] ? -1 : 1);
+    const dim_t y0 = (params.reverse[1] ? num1-1 : 0);
+    const int y_mult = (params.reverse[1] ? -1 : 1);
+    const dim_t z0 = (params.reverse[2] ? num2-1 : 0);
+    const int z_mult = (params.reverse[2] ? -1 : 1);
+
+    for (index_t z=0; z<num2; z++) {
+        for (index_t y=0; y<num1; y++) {
+#pragma omp parallel for
+            for (index_t x=0; x<num0; x++) {
+                const dim_t baseIndex = first0+x*params.multiplier[0]
+                                     +(first1+y*params.multiplier[1])*myN0
+                                     +(first2+z*params.multiplier[2])*myN0*myN1;
+                const dim_t srcIndex=(z0+z_mult*z)*num1*num0
+                                  +(y0+y_mult*y)*num0
+                                  +(x0+x_mult*x);
+                if (!bm::isnan(values[srcIndex])) {
+                    for (index_t m2=0; m2<params.multiplier[2]; m2++) {
+                        for (index_t m1=0; m1<params.multiplier[1]; m1++) {
+                            for (index_t m0=0; m0<params.multiplier[0]; m0++) {
+                                const dim_t dataIndex = baseIndex+m0
+                                               +m1*myN0
+                                               +m2*myN0*myN1;
+                                double* dest = out.getSampleDataRW(dataIndex);
+                                for (index_t q=0; q<dpp; q++) {
+                                    *dest++ = values[srcIndex];
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+#else
+    throw SpeckleyException("readNcGrid(): not compiled with netCDF support");
+#endif
+}
+#else
+
 void Brick::readNcGrid(escript::Data& out, std::string filename, std::string varname,
             const ReaderParameters& params) const
 {
@@ -378,6 +560,8 @@ void Brick::readNcGrid(escript::Data& out, std::string filename, std::string var
 #endif
 }
 
+#endif
+
 void Brick::readBinaryGridFromZipped(escript::Data& out, std::string filename,
                            const ReaderParameters& params) const
 {
@@ -1166,28 +1350,70 @@ void Brick::assembleGradient(escript::Data& out, const escript::Data& in) const
     }
 
     if (m_order == 2) {
-        gradient_order2(out,converted);
+        if (in.isComplex())
+            gradient_order2<cplx_t>(out,converted);
+        else
+            gradient_order2<real_t>(out,converted);
     } else if (m_order == 3) {
-        gradient_order3(out,converted);
+        if (in.isComplex())
+            gradient_order3<cplx_t>(out,converted);
+        else
+            gradient_order3<real_t>(out,converted);
     } else if (m_order == 4) {
-        gradient_order4(out,converted);
+        if (in.isComplex())
+            gradient_order4<cplx_t>(out,converted);
+        else
+            gradient_order4<real_t>(out,converted);
     } else if (m_order == 5) {
-        gradient_order5(out,converted);
+        if (in.isComplex())
+            gradient_order5<cplx_t>(out,converted);
+        else
+            gradient_order5<real_t>(out,converted);
     } else if (m_order == 6) {
-        gradient_order6(out,converted);
+        if (in.isComplex())
+            gradient_order6<cplx_t>(out,converted);
+        else
+            gradient_order6<real_t>(out,converted);
     } else if (m_order == 7) {
-        gradient_order7(out,converted);
+        if (in.isComplex())
+            gradient_order7<cplx_t>(out,converted);
+        else
+            gradient_order7<real_t>(out,converted);
     } else if (m_order == 8) {
-        gradient_order8(out,converted);
+        if (in.isComplex())
+            gradient_order8<cplx_t>(out,converted);
+        else
+            gradient_order8<real_t>(out,converted);
     } else if (m_order == 9) {
-        gradient_order9(out,converted);
+        if (in.isComplex())
+            gradient_order9<cplx_t>(out,converted);
+        else
+            gradient_order9<real_t>(out,converted);
     } else if (m_order == 10) {
-        gradient_order10(out,converted);
+        if (in.isComplex())
+            gradient_order10<cplx_t>(out,converted);
+        else
+            gradient_order10<real_t>(out,converted);
     }
 }
 
 //protected
-void Brick::assembleIntegrate(vector<double>& integrals, const escript::Data& arg) const
+void Brick::assembleIntegrate(vector<real_t>& integrals,
+                              const escript::Data& arg) const
+{
+    assembleIntegrateWorker<real_t>(integrals, arg);
+}
+
+//protected
+void Brick::assembleIntegrate(vector<cplx_t>& integrals,
+                              const escript::Data& arg) const
+{
+    assembleIntegrateWorker<cplx_t>(integrals, arg);
+}
+
+//private
+template<typename Scalar>
+void Brick::assembleIntegrateWorker(vector<Scalar>& integrals, const escript::Data& arg) const
 {
     const int fs = arg.getFunctionSpace().getTypeCode();
     if (fs != Elements)
@@ -1382,14 +1608,6 @@ void Brick::populateSampleIds()
 #undef RANK_TO_FRONT
 }
 
-//private
-void Brick::addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
-         const std::vector<double>& EM_S, const std::vector<double>& EM_F, bool addS,
-         bool addF, index_t firstNode, int nEq, int nComp) const
-{
-    throw SpeckleyException("Rectangle::addToMatrixAndRHS not implemented");
-}
-
 void Brick::interpolateElementsOnNodes(escript::Data& out,
                                   const escript::Data& in) const {
     const dim_t numComp = in.getDataPointSize();
@@ -1505,23 +1723,50 @@ void Brick::interpolateElementsOnNodes(escript::Data& out,
 void Brick::reduceElements(escript::Data& out, const escript::Data& in) const
 {
     if (m_order == 2) {
-        reduction_order2(in, out);
+        if (in.isComplex())
+            reduction_order2<cplx_t>(in, out);
+        else
+            reduction_order2<real_t>(in, out);
     } else if (m_order == 3) {
-        reduction_order3(in, out);
+        if (in.isComplex())
+            reduction_order3<cplx_t>(in, out);
+        else
+            reduction_order3<real_t>(in, out);
     } else if (m_order == 4) {
-        reduction_order4(in, out);
+        if (in.isComplex())
+            reduction_order4<cplx_t>(in, out);
+        else
+            reduction_order4<real_t>(in, out);
     } else if (m_order == 5) {
-        reduction_order5(in, out);
+        if (in.isComplex())
+            reduction_order5<cplx_t>(in, out);
+        else
+            reduction_order5<real_t>(in, out);
     } else if (m_order == 6) {
-        reduction_order6(in, out);
+        if (in.isComplex())
+            reduction_order6<cplx_t>(in, out);
+        else
+            reduction_order6<real_t>(in, out);
     } else if (m_order == 7) {
-        reduction_order7(in, out);
+        if (in.isComplex())
+            reduction_order7<cplx_t>(in, out);
+        else
+            reduction_order7<real_t>(in, out);
     } else if (m_order == 8) {
-        reduction_order8(in, out);
+        if (in.isComplex())
+            reduction_order8<cplx_t>(in, out);
+        else
+            reduction_order8<real_t>(in, out);
     } else if (m_order == 9) {
-        reduction_order9(in, out);
+        if (in.isComplex())
+            reduction_order9<cplx_t>(in, out);
+        else
+            reduction_order9<real_t>(in, out);
     } else if (m_order == 10) {
-        reduction_order10(in, out);
+        if (in.isComplex())
+            reduction_order10<cplx_t>(in, out);
+        else
+            reduction_order10<real_t>(in, out);
     }
 }
 
@@ -1530,6 +1775,18 @@ void Brick::interpolateNodesOnElements(escript::Data& out,
                                        const escript::Data& in,
                                        bool reduced) const
 {
+    if (in.isComplex())
+        interpolateNodesOnElementsWorker<cplx_t>(out, in, reduced);
+    else
+        interpolateNodesOnElementsWorker<real_t>(out, in, reduced);
+}
+
+//private
+template<typename Scalar>
+void Brick::interpolateNodesOnElementsWorker(escript::Data& out,
+                                             const escript::Data& in,
+                                             bool reduced) const
+{
     if (reduced) { //going to ReducedElements
         escript::Data funcIn(in, escript::function(*this));
         reduceElements(out, funcIn);
@@ -1542,18 +1799,20 @@ void Brick::interpolateNodesOnElements(escript::Data& out,
     const int quads = m_order + 1;
     const dim_t max_x = m_NN[0];
     const dim_t max_y = m_NN[1];
+    const Scalar zero = static_cast<Scalar>(0);
+
     out.requireWrite();
 #pragma omp parallel for
     for (dim_t ez = 0; ez < NE2; ez++) {
         for (dim_t ey = 0; ey < NE1; ey++) {
             for (dim_t ex = 0; ex < NE0; ex++) {
-                double *e_out = out.getSampleDataRW(INDEX3(ex, ey, ez, NE0, NE1));
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ex, ey, ez, NE0, NE1), zero);
                 dim_t start = m_order * INDEX3(ex, ey, ez, max_x, max_y);
                 int quad = 0;
                 for (int qz = 0; qz < quads; qz++) {
                     for (int qy = 0; qy < quads; qy++) {
                         for (int qx = 0; qx < quads; qx++, quad++) {
-                            const double *n_in = in.getSampleDataRO(start + INDEX3(qx,qy,qz,max_x,max_y));
+                            const Scalar* n_in = in.getSampleDataRO(start + INDEX3(qx,qy,qz,max_x,max_y), zero);
                             for (int comp = 0; comp < numComp; comp++) {
                                 e_out[INDEX4(comp, qx, qy, qz, numComp, quads, quads)] = n_in[comp];
                             }
diff --git a/speckley/src/Brick.h b/speckley/src/Brick.h
index b38f264..b7d8a26 100644
--- a/speckley/src/Brick.h
+++ b/speckley/src/Brick.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -220,7 +220,9 @@ protected:
     virtual void assembleCoordinates(escript::Data& arg) const;
     virtual void assembleGradient(escript::Data& out,
                                   const escript::Data& in) const;
-    virtual void assembleIntegrate(DoubleVector& integrals,
+    virtual void assembleIntegrate(std::vector<real_t>& integrals,
+                                   const escript::Data& arg) const;
+    virtual void assembleIntegrate(std::vector<cplx_t>& integrals,
                                    const escript::Data& arg) const;
     virtual void interpolateNodesOnElements(escript::Data& out,
                                   const escript::Data& in,
@@ -235,35 +237,71 @@ protected:
 #endif
 
 private:
+    template<typename Scalar>
     void gradient_order2(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order3(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order4(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order5(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order6(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order7(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order8(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order9(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order10(escript::Data&, const escript::Data&) const;
 
+    template<typename Scalar>
     void reduction_order2(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order3(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order4(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order5(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order6(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order7(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order8(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order9(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order10(const escript::Data&, escript::Data&) const;
 
-    void integral_order2(std::vector<double>&, const escript::Data&) const;
-    void integral_order3(std::vector<double>&, const escript::Data&) const;
-    void integral_order4(std::vector<double>&, const escript::Data&) const;
-    void integral_order5(std::vector<double>&, const escript::Data&) const;
-    void integral_order6(std::vector<double>&, const escript::Data&) const;
-    void integral_order7(std::vector<double>&, const escript::Data&) const;
-    void integral_order8(std::vector<double>&, const escript::Data&) const;
-    void integral_order9(std::vector<double>&, const escript::Data&) const;
-    void integral_order10(std::vector<double>&, const escript::Data&) const; 
+    template<typename Scalar>
+    void integral_order2(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order3(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order4(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order5(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order6(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order7(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order8(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order9(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order10(std::vector<Scalar>&, const escript::Data&) const; 
+
+    template<typename Scalar>
+    void assembleIntegrateWorker(std::vector<Scalar>& integrals,
+                                 const escript::Data& arg) const;
+
+    template<typename Scalar>
+    void interpolateNodesOnElementsWorker(escript::Data& out,
+                                          const escript::Data& in,
+                                          bool reduced) const;
 #ifdef ESYS_MPI
     void setCornerNeighbours();
     void shareEdges(escript::Data& out, int rx, int ry, int rz) const;
@@ -277,9 +315,6 @@ private:
     void interpolateFromCorners(escript::Data& out) const;
 
     void populateSampleIds();
-    void addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
-           const DoubleVector& EM_S, const DoubleVector& EM_F,
-           bool addS, bool addF, index_t firstNode, int nEq=1, int nComp=1) const;
 
     template<typename ValueType>
     void readBinaryGridImpl(escript::Data& out, const std::string& filename,
diff --git a/speckley/src/BrickGradients.cpp b/speckley/src/BrickGradients.cpp
index 24d825f..50b2703 100644
--- a/speckley/src/BrickGradients.cpp
+++ b/speckley/src/BrickGradients.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,25 +20,27 @@
 
 namespace speckley {
 
+template<typename Scalar>
 void Brick::gradient_order2(escript::Data& out, const escript::Data& in) const
 {
-    const double lagrange_deriv_0[3] = {-1.50000000000000, -0.500000000000000, 0.500000000000000};
-    const double lagrange_deriv_1[3] = {2.00000000000000, 0, -2.00000000000000};
-    const double lagrange_deriv_2[3] = {-0.500000000000000, 0.500000000000000, 1.50000000000000};
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t lagrange_deriv_0[3] = {-1.50000000000000, -0.500000000000000, 0.500000000000000};
+    const real_t lagrange_deriv_1[3] = {2.00000000000000, 0, -2.00000000000000};
+    const real_t lagrange_deriv_2[3] = {-0.500000000000000, 0.500000000000000, 1.50000000000000};
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 3; ++k) {
                             for (int j = 0; j < 3; ++j) {
                                 for (int i = 0; i < 3; ++i) {
@@ -58,8 +60,8 @@ void Brick::gradient_order2(escript::Data& out, const escript::Data& in) const
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 3; ++k) {
                         for (int j = 0; j < 3; ++j) {
                             for (int i = 0; i < 3; ++i) {
@@ -77,25 +79,27 @@ void Brick::gradient_order2(escript::Data& out, const escript::Data& in) const
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order3(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[4] = {-3.00000000000000, -0.809016994374948, 0.309016994374948, -0.500000000000000};
-    const double lagrange_deriv_1[4] = {4.04508497187474, 4.44089209850063e-16, -1.11803398874990, 1.54508497187474};
-    const double lagrange_deriv_2[4] = {-1.54508497187474, 1.11803398874989, 2.22044604925031e-16, -4.04508497187474};
-    const double lagrange_deriv_3[4] = {0.500000000000000, -0.309016994374947, 0.809016994374948, 3.00000000000000};
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t lagrange_deriv_0[4] = {-3.00000000000000, -0.809016994374948, 0.309016994374948, -0.500000000000000};
+    const real_t lagrange_deriv_1[4] = {4.04508497187474, 4.44089209850063e-16, -1.11803398874990, 1.54508497187474};
+    const real_t lagrange_deriv_2[4] = {-1.54508497187474, 1.11803398874989, 2.22044604925031e-16, -4.04508497187474};
+    const real_t lagrange_deriv_3[4] = {0.500000000000000, -0.309016994374947, 0.809016994374948, 3.00000000000000};
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 4; ++k) {
                             for (int j = 0; j < 4; ++j) {
                                 for (int i = 0; i < 4; ++i) {
@@ -115,8 +119,8 @@ void Brick::gradient_order3(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 4; ++k) {
                         for (int j = 0; j < 4; ++j) {
                             for (int i = 0; i < 4; ++i) {
@@ -134,28 +138,30 @@ void Brick::gradient_order3(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order4(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[5] = {-4.99999999999999, -1.24099025303098, 0.374999999999999, -0.259009746969017, 0.499999999999999};
-    const double lagrange_deriv_1[5] = {6.75650248872424, -6.66133814775094e-15, -1.33658457769545, 0.763762615825974, -1.41016417794243};
-    const double lagrange_deriv_2[5] = {-2.66666666666667, 1.74574312188794, 1.44328993201270e-15, -1.74574312188794, 2.66666666666667};
-    const double lagrange_deriv_3[5] = {1.41016417794243, -0.763762615825974, 1.33658457769545, 1.66533453693773e-15, -6.75650248872424};
-    const double lagrange_deriv_4[5] = {-0.500000000000001, 0.259009746969017, -0.375000000000000, 1.24099025303098, 5.00000000000000};
+    const real_t lagrange_deriv_0[5] = {-4.99999999999999, -1.24099025303098, 0.374999999999999, -0.259009746969017, 0.499999999999999};
+    const real_t lagrange_deriv_1[5] = {6.75650248872424, -6.66133814775094e-15, -1.33658457769545, 0.763762615825974, -1.41016417794243};
+    const real_t lagrange_deriv_2[5] = {-2.66666666666667, 1.74574312188794, 1.44328993201270e-15, -1.74574312188794, 2.66666666666667};
+    const real_t lagrange_deriv_3[5] = {1.41016417794243, -0.763762615825974, 1.33658457769545, 1.66533453693773e-15, -6.75650248872424};
+    const real_t lagrange_deriv_4[5] = {-0.500000000000001, 0.259009746969017, -0.375000000000000, 1.24099025303098, 5.00000000000000};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 5; ++k) {
                             for (int j = 0; j < 5; ++j) {
                                 for (int i = 0; i < 5; ++i) {
@@ -175,8 +181,8 @@ void Brick::gradient_order4(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 5; ++k) {
                         for (int j = 0; j < 5; ++j) {
                             for (int i = 0; i < 5; ++i) {
@@ -194,29 +200,31 @@ void Brick::gradient_order4(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order5(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[6] = {-7.50000000000002, -1.78636494833911, 0.484951047853572, -0.269700610832040, 0.237781177984232, -0.500000000000002};
-    const double lagrange_deriv_1[6] = {10.1414159363197, 2.13162820728030e-14, -1.72125695283023, 0.786356672223240, -0.653547507429800, 1.34991331419049};
-    const double lagrange_deriv_2[6] = {-4.03618727030532, 2.52342677742945, -4.66293670342566e-15, -1.75296196636786, 1.15282815853593, -2.24468464817616};
-    const double lagrange_deriv_3[6] = {2.24468464817616, -1.15282815853593, 1.75296196636787, -1.77635683940025e-15, -2.52342677742946, 4.03618727030535};
-    const double lagrange_deriv_4[6] = {-1.34991331419048, 0.653547507429800, -0.786356672223242, 1.72125695283023, 2.22044604925031e-15, -10.1414159363197};
-    const double lagrange_deriv_5[6] = {0.499999999999998, -0.237781177984231, 0.269700610832039, -0.484951047853569, 1.78636494833909, 7.50000000000000};
+    const real_t lagrange_deriv_0[6] = {-7.50000000000002, -1.78636494833911, 0.484951047853572, -0.269700610832040, 0.237781177984232, -0.500000000000002};
+    const real_t lagrange_deriv_1[6] = {10.1414159363197, 2.13162820728030e-14, -1.72125695283023, 0.786356672223240, -0.653547507429800, 1.34991331419049};
+    const real_t lagrange_deriv_2[6] = {-4.03618727030532, 2.52342677742945, -4.66293670342566e-15, -1.75296196636786, 1.15282815853593, -2.24468464817616};
+    const real_t lagrange_deriv_3[6] = {2.24468464817616, -1.15282815853593, 1.75296196636787, -1.77635683940025e-15, -2.52342677742946, 4.03618727030535};
+    const real_t lagrange_deriv_4[6] = {-1.34991331419048, 0.653547507429800, -0.786356672223242, 1.72125695283023, 2.22044604925031e-15, -10.1414159363197};
+    const real_t lagrange_deriv_5[6] = {0.499999999999998, -0.237781177984231, 0.269700610832039, -0.484951047853569, 1.78636494833909, 7.50000000000000};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 6; ++k) {
                             for (int j = 0; j < 6; ++j) {
                                 for (int i = 0; i < 6; ++i) {
@@ -236,8 +244,8 @@ void Brick::gradient_order5(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 6; ++k) {
                         for (int j = 0; j < 6; ++j) {
                             for (int i = 0; i < 6; ++i) {
@@ -255,30 +263,32 @@ void Brick::gradient_order5(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order6(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[7] = {-10.5000000000000, -2.44292601424426, 0.625256665515336, -0.312499999999997, 0.226099400942572, -0.226611870395444, 0.500000000000001};
-    const double lagrange_deriv_1[7] = {14.2015766029198, -4.17443857259059e-14, -2.21580428316997, 0.907544471268819, -0.616390835517577, 0.602247179635785, -1.31737343570244};
-    const double lagrange_deriv_2[7] = {-5.66898522554555, 3.45582821429430, 3.10862446895044e-15, -2.00696924058875, 1.06644190400637, -0.961339797288714, 2.04996481307676};
-    const double lagrange_deriv_3[7] = {3.20000000000003, -1.59860668809837, 2.26669808708600, 1.33226762955019e-15, -2.26669808708599, 1.59860668809837, -3.20000000000003};
-    const double lagrange_deriv_4[7] = {-2.04996481307676, 0.961339797288717, -1.06644190400638, 2.00696924058876, -1.77635683940025e-14, -3.45582821429431, 5.66898522554558};
-    const double lagrange_deriv_5[7] = {1.31737343570245, -0.602247179635788, 0.616390835517580, -0.907544471268822, 2.21580428316998, 6.76125821996720e-14, -14.2015766029198};
-    const double lagrange_deriv_6[7] = {-0.500000000000000, 0.226611870395444, -0.226099400942572, 0.312499999999997, -0.625256665515335, 2.44292601424425, 10.5000000000000};
+    const real_t lagrange_deriv_0[7] = {-10.5000000000000, -2.44292601424426, 0.625256665515336, -0.312499999999997, 0.226099400942572, -0.226611870395444, 0.500000000000001};
+    const real_t lagrange_deriv_1[7] = {14.2015766029198, -4.17443857259059e-14, -2.21580428316997, 0.907544471268819, -0.616390835517577, 0.602247179635785, -1.31737343570244};
+    const real_t lagrange_deriv_2[7] = {-5.66898522554555, 3.45582821429430, 3.10862446895044e-15, -2.00696924058875, 1.06644190400637, -0.961339797288714, 2.04996481307676};
+    const real_t lagrange_deriv_3[7] = {3.20000000000003, -1.59860668809837, 2.26669808708600, 1.33226762955019e-15, -2.26669808708599, 1.59860668809837, -3.20000000000003};
+    const real_t lagrange_deriv_4[7] = {-2.04996481307676, 0.961339797288717, -1.06644190400638, 2.00696924058876, -1.77635683940025e-14, -3.45582821429431, 5.66898522554558};
+    const real_t lagrange_deriv_5[7] = {1.31737343570245, -0.602247179635788, 0.616390835517580, -0.907544471268822, 2.21580428316998, 6.76125821996720e-14, -14.2015766029198};
+    const real_t lagrange_deriv_6[7] = {-0.500000000000000, 0.226611870395444, -0.226099400942572, 0.312499999999997, -0.625256665515335, 2.44292601424425, 10.5000000000000};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 7; ++k) {
                             for (int j = 0; j < 7; ++j) {
                                 for (int i = 0; i < 7; ++i) {
@@ -298,8 +308,8 @@ void Brick::gradient_order6(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 7; ++k) {
                         for (int j = 0; j < 7; ++j) {
                             for (int i = 0; i < 7; ++i) {
@@ -317,31 +327,33 @@ void Brick::gradient_order6(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order7(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[8] = {-13.9999999999999, -3.20991570300295, 0.792476681320508, -0.372150435728592, 0.243330712723790, -0.203284568900591, 0.219957514771299, -0.499999999999980};
-    const double lagrange_deriv_1[8] = {18.9375986071174, -6.23945339839338e-14, -2.80647579473643, 1.07894468879045, -0.661157350900312, 0.537039586157660, -0.573565414940254, 1.29768738832019};
-    const double lagrange_deriv_2[8] = {-7.56928981934855, 4.54358506456659, 1.17683640610267e-14, -2.37818723351551, 1.13535801688112, -0.845022556506511, 0.869448098331479, -1.94165942554406};
-    const double lagrange_deriv_3[8] = {4.29790816426521, -2.11206121431455, 2.87551740597250, 3.77475828372553e-15, -2.38892435915824, 1.37278583180603, -1.29423205091348, 2.81018898925786};
-    const double lagrange_deriv_4[8] = {-2.81018898925796, 1.29423205091350, -1.37278583180602, 2.38892435915823, 7.77156117237610e-15, -2.87551740597249, 2.11206121431450, -4.29790816426503};
-    const double lagrange_deriv_5[8] = {1.94165942554413, -0.869448098331493, 0.845022556506508, -1.13535801688111, 2.37818723351550, -2.44249065417534e-14, -4.54358506456649, 7.56928981934828};
-    const double lagrange_deriv_6[8] = {-1.29768738832026, 0.573565414940274, -0.537039586157669, 0.661157350900321, -1.07894468879047, 2.80647579473648, -1.71085368094737e-13, -18.9375986071174};
-    const double lagrange_deriv_7[8] = {0.500000000000021, -0.219957514771312, 0.203284568900599, -0.243330712723800, 0.372150435728609, -0.792476681320546, 3.20991570300311, 14.0000000000002};
+    const real_t lagrange_deriv_0[8] = {-13.9999999999999, -3.20991570300295, 0.792476681320508, -0.372150435728592, 0.243330712723790, -0.203284568900591, 0.219957514771299, -0.499999999999980};
+    const real_t lagrange_deriv_1[8] = {18.9375986071174, -6.23945339839338e-14, -2.80647579473643, 1.07894468879045, -0.661157350900312, 0.537039586157660, -0.573565414940254, 1.29768738832019};
+    const real_t lagrange_deriv_2[8] = {-7.56928981934855, 4.54358506456659, 1.17683640610267e-14, -2.37818723351551, 1.13535801688112, -0.845022556506511, 0.869448098331479, -1.94165942554406};
+    const real_t lagrange_deriv_3[8] = {4.29790816426521, -2.11206121431455, 2.87551740597250, 3.77475828372553e-15, -2.38892435915824, 1.37278583180603, -1.29423205091348, 2.81018898925786};
+    const real_t lagrange_deriv_4[8] = {-2.81018898925796, 1.29423205091350, -1.37278583180602, 2.38892435915823, 7.77156117237610e-15, -2.87551740597249, 2.11206121431450, -4.29790816426503};
+    const real_t lagrange_deriv_5[8] = {1.94165942554413, -0.869448098331493, 0.845022556506508, -1.13535801688111, 2.37818723351550, -2.44249065417534e-14, -4.54358506456649, 7.56928981934828};
+    const real_t lagrange_deriv_6[8] = {-1.29768738832026, 0.573565414940274, -0.537039586157669, 0.661157350900321, -1.07894468879047, 2.80647579473648, -1.71085368094737e-13, -18.9375986071174};
+    const real_t lagrange_deriv_7[8] = {0.500000000000021, -0.219957514771312, 0.203284568900599, -0.243330712723800, 0.372150435728609, -0.792476681320546, 3.20991570300311, 14.0000000000002};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 8; ++k) {
                             for (int j = 0; j < 8; ++j) {
                                 for (int i = 0; i < 8; ++i) {
@@ -361,8 +373,8 @@ void Brick::gradient_order7(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 8; ++k) {
                         for (int j = 0; j < 8; ++j) {
                             for (int i = 0; i < 8; ++i) {
@@ -380,32 +392,34 @@ void Brick::gradient_order7(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order8(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[9] = {-18.0000000000010, -4.08701370203454, 0.985360090074639, -0.444613449281139, 0.273437500000029, -0.207734512035617, 0.189655591978376, -0.215654018702531, 0.500000000000095};
-    const double lagrange_deriv_1[9] = {24.3497451715930, 1.34892097491957e-12, -3.48835875343438, 1.28796075006388, -0.741782397916244, 0.547300160534042, -0.492350938315503, 0.555704981283736, -1.28483063269969};
-    const double lagrange_deriv_2[9] = {-9.73870165721010, 5.78680581663678, -3.21298543326520e-13, -2.83445891207935, 1.26941308635811, -0.855726185092640, 0.738349277190360, -0.816756381741392, 1.87444087344708};
-    const double lagrange_deriv_3[9] = {5.54496390694879, -2.69606544031400, 3.57668094012577, -3.10862446895044e-15, -2.65931021757391, 1.37696489376050, -1.07980381128263, 1.14565373845518, -2.59074567655957};
-    const double lagrange_deriv_4[9] = {-3.65714285714248, 1.66522164500537, -1.71783215719513, 2.85191596846290, -1.06581410364015e-14, -2.85191596846287, 1.71783215719506, -1.66522164500546, 3.65714285714316};
-    const double lagrange_deriv_5[9] = {2.59074567655910, -1.14565373845513, 1.07980381128268, -1.37696489376052, 2.65931021757393, -3.71924713249427e-14, -3.57668094012566, 2.69606544031420, -5.54496390694988};
-    const double lagrange_deriv_6[9] = {-1.87444087344680, 0.816756381741386, -0.738349277190418, 0.855726185092682, -1.26941308635816, 2.83445891207943, 9.27036225562006e-14, -5.78680581663756, 9.73870165721225};
-    const double lagrange_deriv_7[9] = {1.28483063269940, -0.555704981283693, 0.492350938315507, -0.547300160534031, 0.741782397916225, -1.28796075006385, 3.48835875343430, 5.71542813077031e-13, -24.3497451715928};
-    const double lagrange_deriv_8[9] = {-0.499999999999903, 0.215654018702479, -0.189655591978347, 0.207734512035579, -0.273437499999975, 0.444613449281046, -0.985360090074401, 4.08701370203326, 17.9999999999994};
+    const real_t lagrange_deriv_0[9] = {-18.0000000000010, -4.08701370203454, 0.985360090074639, -0.444613449281139, 0.273437500000029, -0.207734512035617, 0.189655591978376, -0.215654018702531, 0.500000000000095};
+    const real_t lagrange_deriv_1[9] = {24.3497451715930, 1.34892097491957e-12, -3.48835875343438, 1.28796075006388, -0.741782397916244, 0.547300160534042, -0.492350938315503, 0.555704981283736, -1.28483063269969};
+    const real_t lagrange_deriv_2[9] = {-9.73870165721010, 5.78680581663678, -3.21298543326520e-13, -2.83445891207935, 1.26941308635811, -0.855726185092640, 0.738349277190360, -0.816756381741392, 1.87444087344708};
+    const real_t lagrange_deriv_3[9] = {5.54496390694879, -2.69606544031400, 3.57668094012577, -3.10862446895044e-15, -2.65931021757391, 1.37696489376050, -1.07980381128263, 1.14565373845518, -2.59074567655957};
+    const real_t lagrange_deriv_4[9] = {-3.65714285714248, 1.66522164500537, -1.71783215719513, 2.85191596846290, -1.06581410364015e-14, -2.85191596846287, 1.71783215719506, -1.66522164500546, 3.65714285714316};
+    const real_t lagrange_deriv_5[9] = {2.59074567655910, -1.14565373845513, 1.07980381128268, -1.37696489376052, 2.65931021757393, -3.71924713249427e-14, -3.57668094012566, 2.69606544031420, -5.54496390694988};
+    const real_t lagrange_deriv_6[9] = {-1.87444087344680, 0.816756381741386, -0.738349277190418, 0.855726185092682, -1.26941308635816, 2.83445891207943, 9.27036225562006e-14, -5.78680581663756, 9.73870165721225};
+    const real_t lagrange_deriv_7[9] = {1.28483063269940, -0.555704981283693, 0.492350938315507, -0.547300160534031, 0.741782397916225, -1.28796075006385, 3.48835875343430, 5.71542813077031e-13, -24.3497451715928};
+    const real_t lagrange_deriv_8[9] = {-0.499999999999903, 0.215654018702479, -0.189655591978347, 0.207734512035579, -0.273437499999975, 0.444613449281046, -0.985360090074401, 4.08701370203326, 17.9999999999994};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 9; ++k) {
                             for (int j = 0; j < 9; ++j) {
                                 for (int i = 0; i < 9; ++i) {
@@ -425,8 +439,8 @@ void Brick::gradient_order8(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 9; ++k) {
                         for (int j = 0; j < 9; ++j) {
                             for (int i = 0; i < 9; ++i) {
@@ -444,33 +458,35 @@ void Brick::gradient_order8(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order9(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[10] = {-22.4999999999988, -5.07406470297709, 1.20335199285206, -0.528369376820220, 0.312047255608382, -0.223527944742433, 0.186645789393719, -0.180786585489230, 0.212702758009187, -0.500000000000077};
-    const double lagrange_deriv_1[10] = {30.4381450292820, -1.52677870346452e-12, -4.25929735496529, 1.52990263818163, -0.845813573406436, 0.588082143045176, -0.483462326333953, 0.464274958908154, -0.543753738235757, 1.27595483609299};
-    const double lagrange_deriv_2[10] = {-12.1779467074315, 7.18550286970643, 3.27293747659496e-13, -3.36412586829791, 1.44485031560171, -0.916555180336469, 0.721237312721631, -0.676797087196100, 0.783239293138005, -1.82956393190377};
-    const double lagrange_deriv_3[10] = {6.94378848513465, -3.35166386274684, 4.36867455701003, 3.17523785042795e-14, -3.02021795819936, 1.46805550939000, -1.04618936550250, 0.936603213139437, -1.05915446364554, 2.45288417544331};
-    const double lagrange_deriv_4[10] = {-4.59935476110357, 2.07820799403643, -2.10435017941307, 3.38731810120242, 2.22044604925031e-16, -3.02518848775198, 1.64649408398706, -1.33491548387823, 1.44494844875159, -3.29464303375000};
-    const double lagrange_deriv_5[10] = {3.29464303374949, -1.44494844875146, 1.33491548387820, -1.64649408398705, 3.02518848775197, 6.66133814775094e-15, -3.38731810120245, 2.10435017941312, -2.07820799403661, 4.59935476110425};
-    const double lagrange_deriv_6[10] = {-2.45288417544291, 1.05915446364544, -0.936603213139410, 1.04618936550249, -1.46805550938999, 3.02021795819934, -1.55431223447522e-15, -4.36867455701010, 3.35166386274711, -6.94378848513561};
-    const double lagrange_deriv_7[10] = {1.82956393190345, -0.783239293137921, 0.676797087196070, -0.721237312721610, 0.916555180336448, -1.44485031560168, 3.36412586829786, -2.10609307771392e-13, -7.18550286970689, 12.1779467074328};
-    const double lagrange_deriv_8[10] = {-1.27595483609268, 0.543753738235664, -0.464274958908104, 0.483462326333909, -0.588082143045126, 0.845813573406365, -1.52990263818151, 4.25929735496501, 2.64499533386697e-12, -30.4381450292815};
-    const double lagrange_deriv_9[10] = {0.499999999999919, -0.212702758009135, 0.180786585489197, -0.186645789393687, 0.223527944742396, -0.312047255608330, 0.528369376820133, -1.20335199285186, 5.07406470297626, 22.4999999999976};
+    const real_t lagrange_deriv_0[10] = {-22.4999999999988, -5.07406470297709, 1.20335199285206, -0.528369376820220, 0.312047255608382, -0.223527944742433, 0.186645789393719, -0.180786585489230, 0.212702758009187, -0.500000000000077};
+    const real_t lagrange_deriv_1[10] = {30.4381450292820, -1.52677870346452e-12, -4.25929735496529, 1.52990263818163, -0.845813573406436, 0.588082143045176, -0.483462326333953, 0.464274958908154, -0.543753738235757, 1.27595483609299};
+    const real_t lagrange_deriv_2[10] = {-12.1779467074315, 7.18550286970643, 3.27293747659496e-13, -3.36412586829791, 1.44485031560171, -0.916555180336469, 0.721237312721631, -0.676797087196100, 0.783239293138005, -1.82956393190377};
+    const real_t lagrange_deriv_3[10] = {6.94378848513465, -3.35166386274684, 4.36867455701003, 3.17523785042795e-14, -3.02021795819936, 1.46805550939000, -1.04618936550250, 0.936603213139437, -1.05915446364554, 2.45288417544331};
+    const real_t lagrange_deriv_4[10] = {-4.59935476110357, 2.07820799403643, -2.10435017941307, 3.38731810120242, 2.22044604925031e-16, -3.02518848775198, 1.64649408398706, -1.33491548387823, 1.44494844875159, -3.29464303375000};
+    const real_t lagrange_deriv_5[10] = {3.29464303374949, -1.44494844875146, 1.33491548387820, -1.64649408398705, 3.02518848775197, 6.66133814775094e-15, -3.38731810120245, 2.10435017941312, -2.07820799403661, 4.59935476110425};
+    const real_t lagrange_deriv_6[10] = {-2.45288417544291, 1.05915446364544, -0.936603213139410, 1.04618936550249, -1.46805550938999, 3.02021795819934, -1.55431223447522e-15, -4.36867455701010, 3.35166386274711, -6.94378848513561};
+    const real_t lagrange_deriv_7[10] = {1.82956393190345, -0.783239293137921, 0.676797087196070, -0.721237312721610, 0.916555180336448, -1.44485031560168, 3.36412586829786, -2.10609307771392e-13, -7.18550286970689, 12.1779467074328};
+    const real_t lagrange_deriv_8[10] = {-1.27595483609268, 0.543753738235664, -0.464274958908104, 0.483462326333909, -0.588082143045126, 0.845813573406365, -1.52990263818151, 4.25929735496501, 2.64499533386697e-12, -30.4381450292815};
+    const real_t lagrange_deriv_9[10] = {0.499999999999919, -0.212702758009135, 0.180786585489197, -0.186645789393687, 0.223527944742396, -0.312047255608330, 0.528369376820133, -1.20335199285186, 5.07406470297626, 22.4999999999976};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 10; ++k) {
                             for (int j = 0; j < 10; ++j) {
                                 for (int i = 0; i < 10; ++i) {
@@ -490,8 +506,8 @@ void Brick::gradient_order9(escript::Data& out, const escript::Data& in) const {
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 10; ++k) {
                         for (int j = 0; j < 10; ++j) {
                             for (int i = 0; i < 10; ++i) {
@@ -509,34 +525,36 @@ void Brick::gradient_order9(escript::Data& out, const escript::Data& in) const {
     }
 }
 
+template<typename Scalar>
 void Brick::gradient_order10(escript::Data& out, const escript::Data& in) const {
 
-    const double lagrange_deriv_0[11] = {-27.4999999999896, -6.17098569730879, 1.44617248279108, -0.622725214738251, 0.357476373116252, -0.246093749999837, 0.194287668796289, -0.172970108511720, 0.174657862947473, -0.210587346312973, 0.500000000000200};
-    const double lagrange_deriv_1[11] = {37.2028673819635, -1.45093936865237e-11, -5.11821182477732, 1.80264679987985, -0.968487138802308, 0.646939963832195, -0.502643313012917, 0.443395636437341, -0.445313527290911, 0.535331085929629, -1.26956267628665};
-    const double lagrange_deriv_2[11] = {-14.8873962951139, 8.73967005352577, 4.30699920173083e-12, -3.96199657704633, 1.65273663422738, -1.00650540857701, 0.747734824688410, -0.643586209360019, 0.637362056418227, -0.760400982244270, 1.79798803579712};
-    const double lagrange_deriv_3[11] = {8.49561949463899, -4.07931619371279, 5.25066175545241, -4.06341627012807e-13, -3.45061471617355, 1.60812790372552, -1.07998725049569, 0.884587314556481, -0.852916813558380, 1.00338624297419, -2.35976991309107};
-    const double lagrange_deriv_4[11] = {-5.64038799768972, 2.53474117868649, -2.53318340860873, 3.99079578802906, 9.19264664389630e-14, -3.30517685337838, 1.69057057046883, -1.24905529156928, 1.14606853428002, -1.31552671443958, 3.06553920088515};
-    const double lagrange_deriv_5[11] = {4.06349206349476, -1.77190705526895, 1.61441910793459, -1.94634945457108, 3.45885134807703, 3.86357612569554e-14, -3.45885134807708, 1.94634945457117, -1.61441910793481, 1.77190705526946, -4.06349206349634};
-    const double lagrange_deriv_6[11] = {-3.06553920088389, 1.31552671443917, -1.14606853427984, 1.24905529156920, -1.69057057046877, 3.30517685337831, -4.28546087505310e-14, -3.99079578802918, 2.53318340860904, -2.53474117868717, 5.64038799769177};
-    const double lagrange_deriv_7[11] = {2.35976991309003, -1.00338624297385, 0.852916813558223, -0.884587314556402, 1.07998725049562, -1.60812790372545, 3.45061471617347, 5.73430192218893e-13, -5.25066175545293, 4.07931619371373, -8.49561949464169};
-    const double lagrange_deriv_8[11] = {-1.79798803579616, 0.760400982243941, -0.637362056418051, 0.643586209359903, -0.747734824688294, 1.00650540857687, -1.65273663422718, 3.96199657704598, -3.31623617455534e-12, -8.73967005352657, 14.8873962951164};
-    const double lagrange_deriv_9[11] = {1.26956267628575, -0.535331085929307, 0.445313527290713, -0.443395636437185, 0.502643313012754, -0.646939963831994, 0.968487138802021, -1.80264679987934, 5.11821182477613, 1.64738223062955e-11, -37.2028673819613};
-    const double lagrange_deriv_10[11] = {-0.499999999999790, 0.210587346312823, -0.174657862947375, 0.172970108511639, -0.194287668796203, 0.246093749999731, -0.357476373116102, 0.622725214737994, -1.44617248279054, 6.17098569730708, 27.4999999999864};
+    const real_t lagrange_deriv_0[11] = {-27.4999999999896, -6.17098569730879, 1.44617248279108, -0.622725214738251, 0.357476373116252, -0.246093749999837, 0.194287668796289, -0.172970108511720, 0.174657862947473, -0.210587346312973, 0.500000000000200};
+    const real_t lagrange_deriv_1[11] = {37.2028673819635, -1.45093936865237e-11, -5.11821182477732, 1.80264679987985, -0.968487138802308, 0.646939963832195, -0.502643313012917, 0.443395636437341, -0.445313527290911, 0.535331085929629, -1.26956267628665};
+    const real_t lagrange_deriv_2[11] = {-14.8873962951139, 8.73967005352577, 4.30699920173083e-12, -3.96199657704633, 1.65273663422738, -1.00650540857701, 0.747734824688410, -0.643586209360019, 0.637362056418227, -0.760400982244270, 1.79798803579712};
+    const real_t lagrange_deriv_3[11] = {8.49561949463899, -4.07931619371279, 5.25066175545241, -4.06341627012807e-13, -3.45061471617355, 1.60812790372552, -1.07998725049569, 0.884587314556481, -0.852916813558380, 1.00338624297419, -2.35976991309107};
+    const real_t lagrange_deriv_4[11] = {-5.64038799768972, 2.53474117868649, -2.53318340860873, 3.99079578802906, 9.19264664389630e-14, -3.30517685337838, 1.69057057046883, -1.24905529156928, 1.14606853428002, -1.31552671443958, 3.06553920088515};
+    const real_t lagrange_deriv_5[11] = {4.06349206349476, -1.77190705526895, 1.61441910793459, -1.94634945457108, 3.45885134807703, 3.86357612569554e-14, -3.45885134807708, 1.94634945457117, -1.61441910793481, 1.77190705526946, -4.06349206349634};
+    const real_t lagrange_deriv_6[11] = {-3.06553920088389, 1.31552671443917, -1.14606853427984, 1.24905529156920, -1.69057057046877, 3.30517685337831, -4.28546087505310e-14, -3.99079578802918, 2.53318340860904, -2.53474117868717, 5.64038799769177};
+    const real_t lagrange_deriv_7[11] = {2.35976991309003, -1.00338624297385, 0.852916813558223, -0.884587314556402, 1.07998725049562, -1.60812790372545, 3.45061471617347, 5.73430192218893e-13, -5.25066175545293, 4.07931619371373, -8.49561949464169};
+    const real_t lagrange_deriv_8[11] = {-1.79798803579616, 0.760400982243941, -0.637362056418051, 0.643586209359903, -0.747734824688294, 1.00650540857687, -1.65273663422718, 3.96199657704598, -3.31623617455534e-12, -8.73967005352657, 14.8873962951164};
+    const real_t lagrange_deriv_9[11] = {1.26956267628575, -0.535331085929307, 0.445313527290713, -0.443395636437185, 0.502643313012754, -0.646939963831994, 0.968487138802021, -1.80264679987934, 5.11821182477613, 1.64738223062955e-11, -37.2028673819613};
+    const real_t lagrange_deriv_10[11] = {-0.499999999999790, 0.210587346312823, -0.174657862947375, 0.172970108511639, -0.194287668796203, 0.246093749999731, -0.357476373116102, 0.622725214737994, -1.44617248279054, 6.17098569730708, 27.4999999999864};
 
-    const double inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
+    const real_t inv_jac[3] = {2/m_dx[0], 2/m_dx[1], 2/m_dx[2]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int comp = 0; comp < numComp; ++comp) {
-                        const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[0];
-                        const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[1];
-                        const double c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[2];
+                        const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[0];
+                        const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[1];
+                        const Scalar c = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[2];
                         for (int k = 0; k < 11; ++k) {
                             for (int j = 0; j < 11; ++j) {
                                 for (int i = 0; i < 11; ++i) {
@@ -556,8 +574,8 @@ void Brick::gradient_order10(escript::Data& out, const escript::Data& in) const
         for (int ei = 0; ei < m_NE[2]; ++ei) {
             for (int ej = 0; ej < m_NE[1]; ++ej) {
                 for (int ek = 0; ek < m_NE[0]; ++ek) {
-                    const double *e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                    double *grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                    const Scalar* e = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                    Scalar* grad = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                     for (int k = 0; k < 11; ++k) {
                         for (int j = 0; j < 11; ++j) {
                             for (int i = 0; i < 11; ++i) {
@@ -575,4 +593,61 @@ void Brick::gradient_order10(escript::Data& out, const escript::Data& in) const
     }
 }
 
-}
+// instantiate
+template
+void Brick::gradient_order2<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order2<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order3<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order3<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order4<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order4<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order5<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order5<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order6<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order6<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order7<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order7<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order8<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order8<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order9<real_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order9<cplx_t>(escript::Data& out,
+                                    const escript::Data& in) const;
+template
+void Brick::gradient_order10<real_t>(escript::Data& out,
+                                     const escript::Data& in) const;
+template
+void Brick::gradient_order10<cplx_t>(escript::Data& out,
+                                     const escript::Data& in) const;
+
+} // namespace speckley
+
diff --git a/speckley/src/BrickIntegrals.cpp b/speckley/src/BrickIntegrals.cpp
index ee677b8..57547fb 100644
--- a/speckley/src/BrickIntegrals.cpp
+++ b/speckley/src/BrickIntegrals.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,16 +20,18 @@
 
 namespace speckley {
 
-void Brick::integral_order2(std::vector<double>& integrals, const escript::Data& arg) const
+template<typename Scalar>
+void Brick::integral_order2(std::vector<Scalar>& integrals, const escript::Data& arg) const
 {
     const double weights[] = {0.333333333333, 1.33333333333, 0.333333333333};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 3; ++i) {
                         for (int j = 0; j < 3; ++j) {
@@ -48,15 +50,17 @@ void Brick::integral_order2(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order3(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order3(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.166666666667, 0.833333333333, 0.833333333333, 0.166666666667};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 4; ++i) {
                         for (int j = 0; j < 4; ++j) {
@@ -75,15 +79,17 @@ void Brick::integral_order3(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order4(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order4(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.1, 0.544444444444, 0.711111111111, 0.544444444444, 0.1};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 5; ++i) {
                         for (int j = 0; j < 5; ++j) {
@@ -102,15 +108,17 @@ void Brick::integral_order4(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order5(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order5(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0666666666667, 0.378474956298, 0.554858377035, 0.554858377035, 0.378474956298, 0.0666666666667};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 6; ++i) {
                         for (int j = 0; j < 6; ++j) {
@@ -129,15 +137,17 @@ void Brick::integral_order5(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order6(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order6(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.047619047619, 0.276826047362, 0.43174538121, 0.487619047619, 0.43174538121, 0.276826047362, 0.047619047619};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 7; ++i) {
                         for (int j = 0; j < 7; ++j) {
@@ -156,15 +166,17 @@ void Brick::integral_order6(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order7(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order7(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0357142857143, 0.210704227144, 0.341122692484, 0.412458794659, 0.412458794659, 0.341122692484, 0.210704227144, 0.0357142857143};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 8; ++i) {
                         for (int j = 0; j < 8; ++j) {
@@ -183,15 +195,17 @@ void Brick::integral_order7(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order8(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order8(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0277777777778, 0.165495361561, 0.2745387125, 0.346428510973, 0.371519274376, 0.346428510973, 0.2745387125, 0.165495361561, 0.0277777777778};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 9; ++i) {
                         for (int j = 0; j < 9; ++j) {
@@ -210,15 +224,17 @@ void Brick::integral_order8(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order9(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order9(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0222222222222, 0.133305990851, 0.224889342063, 0.29204268368, 0.327539761184, 0.327539761184, 0.29204268368, 0.224889342063, 0.133305990851, 0.0222222222222};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 10; ++i) {
                         for (int j = 0; j < 10; ++j) {
@@ -237,15 +253,17 @@ void Brick::integral_order9(std::vector<double>& integrals, const escript::Data&
     }
 }
 
-void Brick::integral_order10(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Brick::integral_order10(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0181818181818, 0.109612273267, 0.18716988178, 0.248048104264, 0.286879124779, 0.300217595456, 0.286879124779, 0.248048104264, 0.18716988178, 0.109612273267, 0.0181818181818};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.125*m_dx[0]*m_dx[1]*m_dx[2];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double result = 0;
+                const Scalar* e = arg.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar result = zero;
                 for (int comp = 0; comp < numComp; ++comp) {
                     for (int i = 0; i < 11; ++i) {
                         for (int j = 0; j < 11; ++j) {
@@ -264,5 +282,61 @@ void Brick::integral_order10(std::vector<double>& integrals, const escript::Data
     }
 }
 
-}
+// instantiate
+template
+void Brick::integral_order2<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order2<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order3<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order3<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order4<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order4<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order5<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order5<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order6<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order6<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order7<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order7<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order8<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order8<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order9<real_t>(std::vector<real_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order9<cplx_t>(std::vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const;
+template
+void Brick::integral_order10<real_t>(std::vector<real_t>& integrals,
+                                     const escript::Data& arg) const;
+template
+void Brick::integral_order10<cplx_t>(std::vector<cplx_t>& integrals,
+                                     const escript::Data& arg) const;
+
+} // namespace speckley
 
diff --git a/speckley/src/BrickReductions.cpp b/speckley/src/BrickReductions.cpp
index d7196bb..abf2c52 100644
--- a/speckley/src/BrickReductions.cpp
+++ b/speckley/src/BrickReductions.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,17 +20,19 @@
 
 namespace speckley {
 
+template<typename Scalar>
 void Brick::reduction_order2(const escript::Data& in, escript::Data& out) const
 {
     const double weights[] = {0.333333333333, 1.33333333333, 0.333333333333};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 3; ++i) {
                         for (int j = 0; j < 3; ++j) {
                             for (int k = 0; k < 3; ++k) {
@@ -45,16 +47,18 @@ void Brick::reduction_order2(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order3(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.166666666667, 0.833333333333, 0.833333333333, 0.166666666667};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 4; ++i) {
                         for (int j = 0; j < 4; ++j) {
                             for (int k = 0; k < 4; ++k) {
@@ -69,16 +73,18 @@ void Brick::reduction_order3(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order4(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.1, 0.544444444444, 0.711111111111, 0.544444444444, 0.1};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 5; ++i) {
                         for (int j = 0; j < 5; ++j) {
                             for (int k = 0; k < 5; ++k) {
@@ -93,16 +99,18 @@ void Brick::reduction_order4(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order5(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0666666666667, 0.378474956298, 0.554858377035, 0.554858377035, 0.378474956298, 0.0666666666667};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 6; ++i) {
                         for (int j = 0; j < 6; ++j) {
                             for (int k = 0; k < 6; ++k) {
@@ -117,16 +125,18 @@ void Brick::reduction_order5(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order6(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.047619047619, 0.276826047362, 0.43174538121, 0.487619047619, 0.43174538121, 0.276826047362, 0.047619047619};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 7; ++i) {
                         for (int j = 0; j < 7; ++j) {
                             for (int k = 0; k < 7; ++k) {
@@ -141,16 +151,18 @@ void Brick::reduction_order6(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order7(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0357142857143, 0.210704227144, 0.341122692484, 0.412458794659, 0.412458794659, 0.341122692484, 0.210704227144, 0.0357142857143};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 8; ++i) {
                         for (int j = 0; j < 8; ++j) {
                             for (int k = 0; k < 8; ++k) {
@@ -165,16 +177,18 @@ void Brick::reduction_order7(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order8(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0277777777778, 0.165495361561, 0.2745387125, 0.346428510973, 0.371519274376, 0.346428510973, 0.2745387125, 0.165495361561, 0.0277777777778};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 9; ++i) {
                         for (int j = 0; j < 9; ++j) {
                             for (int k = 0; k < 9; ++k) {
@@ -189,16 +203,18 @@ void Brick::reduction_order8(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order9(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0222222222222, 0.133305990851, 0.224889342063, 0.29204268368, 0.327539761184, 0.327539761184, 0.29204268368, 0.224889342063, 0.133305990851, 0.0222222222222};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 10; ++i) {
                         for (int j = 0; j < 10; ++j) {
                             for (int k = 0; k < 10; ++k) {
@@ -213,16 +229,18 @@ void Brick::reduction_order9(const escript::Data& in, escript::Data& out) const
     }
 }
 
+template<typename Scalar>
 void Brick::reduction_order10(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0181818181818, 0.109612273267, 0.18716988178, 0.248048104264, 0.286879124779, 0.300217595456, 0.286879124779, 0.248048104264, 0.18716988178, 0.109612273267, 0.0181818181818};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[2]; ++ei) {
         for (int ej = 0; ej < m_NE[1]; ++ej) {
             for (int ek = 0; ek < m_NE[0]; ++ek) {
-                const double *e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
-                double *e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]));
+                const Scalar* e_in = in.getSampleDataRO(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
+                Scalar* e_out = out.getSampleDataRW(INDEX3(ek,ej,ei,m_NE[0],m_NE[1]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    double result = 0;
+                    Scalar result = zero;
                     for (int i = 0; i < 11; ++i) {
                         for (int j = 0; j < 11; ++j) {
                             for (int k = 0; k < 11; ++k) {
@@ -237,4 +255,43 @@ void Brick::reduction_order10(const escript::Data& in, escript::Data& out) const
     }
 }
 
-}
+// instantiate
+template
+void Brick::reduction_order2<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order2<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order3<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order3<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order4<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order4<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order5<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order5<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order6<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order6<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order7<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order7<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order8<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order8<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order9<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order9<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order10<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Brick::reduction_order10<cplx_t>(const escript::Data& in, escript::Data& out) const;
+
+} // namespace speckley
+
diff --git a/speckley/src/CrossDomainCoupler.cpp b/speckley/src/CrossDomainCoupler.cpp
index 8e0147d..06fffe4 100644
--- a/speckley/src/CrossDomainCoupler.cpp
+++ b/speckley/src/CrossDomainCoupler.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/CrossDomainCoupler.h b/speckley/src/CrossDomainCoupler.h
index 21eab74..a10355e 100644
--- a/speckley/src/CrossDomainCoupler.h
+++ b/speckley/src/CrossDomainCoupler.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/DefaultAssembler2D.cpp b/speckley/src/DefaultAssembler2D.cpp
index f1101f5..7e4f291 100644
--- a/speckley/src/DefaultAssembler2D.cpp
+++ b/speckley/src/DefaultAssembler2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/DefaultAssembler2D.h b/speckley/src/DefaultAssembler2D.h
index 65297c0..8f6fefd 100644
--- a/speckley/src/DefaultAssembler2D.h
+++ b/speckley/src/DefaultAssembler2D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/DefaultAssembler3D.cpp b/speckley/src/DefaultAssembler3D.cpp
index 67e72b4..6904f25 100644
--- a/speckley/src/DefaultAssembler3D.cpp
+++ b/speckley/src/DefaultAssembler3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/DefaultAssembler3D.h b/speckley/src/DefaultAssembler3D.h
index 8d81808..8909d4c 100644
--- a/speckley/src/DefaultAssembler3D.h
+++ b/speckley/src/DefaultAssembler3D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/Rectangle.cpp b/speckley/src/Rectangle.cpp
index b660b32..2d30f30 100644
--- a/speckley/src/Rectangle.cpp
+++ b/speckley/src/Rectangle.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -28,9 +28,17 @@
 
 #include <boost/scoped_array.hpp>
 #include <boost/math/special_functions/fpclassify.hpp> // for isnan
+#include <vector>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
 #ifdef ESYS_HAVE_SILO
@@ -48,6 +56,10 @@ namespace bm = boost::math;
 namespace bp = boost::python;
 using escript::FileWriter;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace speckley {
 
 Rectangle::Rectangle(int order, dim_t n0, dim_t n1, double x0, double y0, double x1,
@@ -200,6 +212,146 @@ bool Rectangle::operator==(const escript::AbstractDomain& other) const
     return false;
 }
 
+#ifdef NETCDF4
+
+void Rectangle::readNcGrid(escript::Data& out, std::string filename,
+        std::string varname, const ReaderParameters& params) const
+{
+#ifdef ESYS_HAVE_NETCDF
+    // check destination function space
+    dim_t myN0, myN1;
+    if (out.getFunctionSpace().getTypeCode() == Nodes) {
+        myN0 = m_NE[0] + 1;
+        myN1 = m_NE[1] + 1;
+//    } else if (out.getFunctionSpace().getTypeCode() == Elements) {
+//        myN0 = m_NE[0];
+//        myN1 = m_NE[1];
+    } else
+        throw SpeckleyException("readNcGrid(): invalid function space for output data object");
+
+    if (params.first.size() != 2)
+        throw SpeckleyException("readNcGrid(): argument 'first' must have 2 entries");
+
+    if (params.numValues.size() != 2)
+        throw SpeckleyException("readNcGrid(): argument 'numValues' must have 2 entries");
+
+    if (params.multiplier.size() != 2)
+        throw SpeckleyException("readNcGrid(): argument 'multiplier' must have 2 entries");
+    for (size_t i=0; i<params.multiplier.size(); i++)
+        if (params.multiplier[i]<1)
+            throw SpeckleyException("readNcGrid(): all multipliers must be positive");
+    if (params.reverse.size() != 2)
+        throw SpeckleyException("readNcGrid(): argument 'reverse' must have 2 entries");
+
+    // check file existence and size
+    NcFile f;
+    if (!openNcFile(f, filename))
+    {
+        throw SpeckleyException("readNcGrid(): cannot open file");
+    }       
+
+    NcVar var = f.getVar(varname.c_str());
+    if (var.isNull())
+        throw SpeckleyException("readNcGrid(): invalid variable");
+
+    // TODO: rank>0 data support
+    const int numComp = out.getDataPointSize();
+    if (numComp > 1)
+        throw SpeckleyException("readNcGrid(): only scalar data supported");
+
+    const int dims = var.getDimCount();
+    std::vector<long> edges(dims);
+    std::vector< NcDim > vard=var.getDims();
+    for (size_t i=0;i<vard.size();++i)
+    {
+        edges[i]=vard[i].getSize();
+    }       
+
+    // is this a slice of the data object (dims!=2)?
+    // note the expected ordering of edges (as in numpy: y,x)
+    if ( (dims==2 && (params.numValues[1] > edges[0] || params.numValues[0] > edges[1]))
+            || (dims==1 && params.numValues[1]>1) ) {
+        throw SpeckleyException("readNcGrid(): not enough data in file");
+    }
+
+    // check if this rank contributes anything
+    if (params.first[0] >= m_offset[0]+myN0 ||
+            params.first[0]+params.numValues[0]*params.multiplier[0] <= m_offset[0] ||
+            params.first[1] >= m_offset[1]+myN1 ||
+            params.first[1]+params.numValues[1]*params.multiplier[1] <= m_offset[1])
+        return;
+
+    // now determine how much this rank has to write
+
+    // first coordinates in data object to write to
+    const dim_t first0 = std::max(dim_t(0), params.first[0]-m_offset[0]);
+    const dim_t first1 = std::max(dim_t(0), params.first[1]-m_offset[1]);
+    // indices to first value in file (not accounting for reverse yet)
+    dim_t idx0 = std::max(dim_t(0), m_offset[0]-params.first[0]);
+    dim_t idx1 = std::max(dim_t(0), m_offset[1]-params.first[1]);
+    // number of values to read
+    const dim_t num0 = std::min(params.numValues[0]-idx0, myN0-first0);
+    const dim_t num1 = std::min(params.numValues[1]-idx1, myN1-first1);
+
+    // make sure we read the right block if going backwards through file
+    if (params.reverse[0])
+        idx0 = edges[dims-1]-num0-idx0;
+    if (dims>1 && params.reverse[1])
+        idx1 = edges[dims-2]-num1-idx1;
+
+    std::vector<double> values(num0*num1);
+    std::vector<size_t> startindex;
+    std::vector<size_t> counts;
+    if (dims==2) {
+        // var->set_cur(idx1, idx0);                // from old API
+        startindex.push_back(idx1);
+        startindex.push_back(idx0);
+        counts.push_back(num1);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    } else {
+        //var->set_cur(idx0);
+        //var->get(&values[0], num0);
+        startindex.push_back(idx0);
+        counts.push_back(num0);
+        var.getVar(startindex, counts, &values[0]);   
+    }      
+
+    const int dpp = out.getNumDataPointsPerSample();
+    out.requireWrite();
+
+    // helpers for reversing
+    const dim_t x0 = (params.reverse[0] ? num0-1 : 0);
+    const int x_mult = (params.reverse[0] ? -1 : 1);
+    const dim_t y0 = (params.reverse[1] ? num1-1 : 0);
+    const int y_mult = (params.reverse[1] ? -1 : 1);
+
+    for (index_t y=0; y<num1; y++) {
+#pragma omp parallel for
+        for (index_t x=0; x<num0; x++) {
+            const dim_t baseIndex = first0+x*params.multiplier[0]
+                                  +(first1+y*params.multiplier[1])*myN0;
+            const dim_t srcIndex = (y0+y_mult*y)*num0+(x0+x_mult*x);
+            if (!bm::isnan(values[srcIndex])) {
+                for (index_t m1=0; m1<params.multiplier[1]; m1++) {
+                    for (index_t m0=0; m0<params.multiplier[0]; m0++) {
+                        const dim_t dataIndex = baseIndex+m0+m1*myN0;
+                        double* dest = out.getSampleDataRW(dataIndex);
+                        for (index_t q=0; q<dpp; q++) {
+                            *dest++ = values[srcIndex];
+                        }
+                    }
+                }
+            }
+        }
+    }
+#else
+    throw SpeckleyException("readNcGrid(): not compiled with netCDF support");
+#endif
+}
+
+#else
+
 void Rectangle::readNcGrid(escript::Data& out, std::string filename,
         std::string varname, const ReaderParameters& params) const
 {
@@ -320,6 +472,8 @@ void Rectangle::readNcGrid(escript::Data& out, std::string filename,
 #endif
 }
 
+#endif
+
 void Rectangle::readBinaryGrid(escript::Data& out, std::string filename,
                                const ReaderParameters& params) const
 {
@@ -987,30 +1141,72 @@ void Rectangle::assembleGradient(escript::Data& out, const escript::Data& in) co
     }
 
     if (m_order == 2) {
-        gradient_order2(out,converted);
+        if (in.isComplex())
+            gradient_order2<cplx_t>(out,converted);
+        else
+            gradient_order2<real_t>(out,converted);
     } else if (m_order == 3) {
-        gradient_order3(out,converted);
+        if (in.isComplex())
+            gradient_order3<cplx_t>(out,converted);
+        else
+            gradient_order3<real_t>(out,converted);
     } else if (m_order == 4) {
-        gradient_order4(out,converted);
+        if (in.isComplex())
+            gradient_order4<cplx_t>(out,converted);
+        else
+            gradient_order4<real_t>(out,converted);
     } else if (m_order == 5) {
-        gradient_order5(out,converted);
+        if (in.isComplex())
+            gradient_order5<cplx_t>(out,converted);
+        else
+            gradient_order5<real_t>(out,converted);
     } else if (m_order == 6) {
-        gradient_order6(out,converted);
+        if (in.isComplex())
+            gradient_order6<cplx_t>(out,converted);
+        else
+            gradient_order6<real_t>(out,converted);
     } else if (m_order == 7) {
-        gradient_order7(out,converted);
+        if (in.isComplex())
+            gradient_order7<cplx_t>(out,converted);
+        else
+            gradient_order7<real_t>(out,converted);
     } else if (m_order == 8) {
-        gradient_order8(out,converted);
+        if (in.isComplex())
+            gradient_order8<cplx_t>(out,converted);
+        else
+            gradient_order8<real_t>(out,converted);
     } else if (m_order == 9) {
-        gradient_order9(out,converted);
+        if (in.isComplex())
+            gradient_order9<cplx_t>(out,converted);
+        else
+            gradient_order9<real_t>(out,converted);
     } else if (m_order == 10) {
-        gradient_order10(out,converted);
+        if (in.isComplex())
+            gradient_order10<cplx_t>(out,converted);
+        else
+            gradient_order10<real_t>(out,converted);
     }
 }
 
 //protected
-void Rectangle::assembleIntegrate(std::vector<double>& integrals,
+void Rectangle::assembleIntegrate(std::vector<real_t>& integrals,
                                   const escript::Data& arg) const
 {
+    assembleIntegrateWorker<real_t>(integrals, arg);
+}
+
+//protected
+void Rectangle::assembleIntegrate(std::vector<cplx_t>& integrals,
+                                  const escript::Data& arg) const
+{
+    assembleIntegrateWorker<cplx_t>(integrals, arg);
+}
+
+//private
+template<typename Scalar>
+void Rectangle::assembleIntegrateWorker(std::vector<Scalar>& integrals,
+                                        const escript::Data& arg) const
+{
     const int fs = arg.getFunctionSpace().getTypeCode();
     if (fs != Elements)
         throw new SpeckleyException("Speckley doesn't currently support integrals of non-Element functionspaces");
@@ -1162,34 +1358,53 @@ void Rectangle::populateSampleIds()
     updateTagsInUse(Elements);
 }
 
-//private
-void Rectangle::addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
-         const std::vector<double>& EM_S, const std::vector<double>& EM_F, bool addS,
-         bool addF, index_t firstNode, int nEq, int nComp) const
-{
-    throw SpeckleyException("Rectangle::addToMatrixAndRHS, adding to matrix not supported");
-}
-
 void Rectangle::reduceElements(escript::Data& out, const escript::Data& in) const
 {
     if (m_order == 2) {
-        reduction_order2(in, out);
+        if (in.isComplex())
+            reduction_order2<cplx_t>(in, out);
+        else
+            reduction_order2<real_t>(in, out);
     } else if (m_order == 3) {
-        reduction_order3(in, out);
+        if (in.isComplex())
+            reduction_order3<cplx_t>(in, out);
+        else
+            reduction_order3<real_t>(in, out);
     } else if (m_order == 4) {
-        reduction_order4(in, out);
+        if (in.isComplex())
+            reduction_order4<cplx_t>(in, out);
+        else
+            reduction_order4<real_t>(in, out);
     } else if (m_order == 5) {
-        reduction_order5(in, out);
+        if (in.isComplex())
+            reduction_order5<cplx_t>(in, out);
+        else
+            reduction_order5<real_t>(in, out);
     } else if (m_order == 6) {
-        reduction_order6(in, out);
+        if (in.isComplex())
+            reduction_order6<cplx_t>(in, out);
+        else
+            reduction_order6<real_t>(in, out);
     } else if (m_order == 7) {
-        reduction_order7(in, out);
+        if (in.isComplex())
+            reduction_order7<cplx_t>(in, out);
+        else
+            reduction_order7<real_t>(in, out);
     } else if (m_order == 8) {
-        reduction_order8(in, out);
+        if (in.isComplex())
+            reduction_order8<cplx_t>(in, out);
+        else
+            reduction_order8<real_t>(in, out);
     } else if (m_order == 9) {
-        reduction_order9(in, out);
+        if (in.isComplex())
+            reduction_order9<cplx_t>(in, out);
+        else
+            reduction_order9<real_t>(in, out);
     } else if (m_order == 10) {
-        reduction_order10(in, out);
+        if (in.isComplex())
+            reduction_order10<cplx_t>(in, out);
+        else
+            reduction_order10<real_t>(in, out);
     }
 }
 
@@ -1198,11 +1413,25 @@ void Rectangle::interpolateNodesOnElements(escript::Data& out,
                                            const escript::Data& in,
                                            bool reduced) const
 {
+    if (in.isComplex())
+        interpolateNodesOnElementsWorker<cplx_t>(out, in, reduced);
+    else
+        interpolateNodesOnElementsWorker<real_t>(out, in, reduced);
+}
+
+//private
+template<typename Scalar>
+void Rectangle::interpolateNodesOnElementsWorker(escript::Data& out,
+                                                 const escript::Data& in,
+                                                 bool reduced) const
+{
     const dim_t numComp = in.getDataPointSize();
     const dim_t NE0 = m_NE[0];
     const dim_t NE1 = m_NE[1];
     const int quads = m_order + 1;
     const int max_x = m_NN[0];
+    const Scalar zero = static_cast<Scalar>(0);
+
     out.requireWrite();
     if (reduced) { //going to ReducedElements
         escript::Data funcIn(in, escript::function(*this));
@@ -1212,13 +1441,13 @@ void Rectangle::interpolateNodesOnElements(escript::Data& out,
 #pragma omp parallel for
     for (dim_t ey = 0; ey < NE1; ey++) {
         for (dim_t ex = 0; ex < NE0; ex++) {
-            double *e_out = out.getSampleDataRW(ex + ey*NE0);
+            Scalar* e_out = out.getSampleDataRW(ex + ey*NE0, zero);
             dim_t start = ex*m_order + ey*max_x*m_order;
             int quad = 0;
             for (int qy = 0; qy < quads; qy++) {
                 for (int qx = 0; qx < quads; qx++, quad++) {
-                    const double *n_in = in.getSampleDataRO(start + max_x*qy + qx);
-                    memcpy(e_out+quad*numComp, n_in, sizeof(double) * numComp);
+                    const Scalar* n_in = in.getSampleDataRO(start + max_x*qy + qx, zero);
+                    memcpy(e_out+quad*numComp, n_in, sizeof(Scalar) * numComp);
                 }
             }
         }
@@ -1227,47 +1456,60 @@ void Rectangle::interpolateNodesOnElements(escript::Data& out,
 
 #ifdef ESYS_MPI
 //protected
-void Rectangle::balanceNeighbours(escript::Data& data, bool average) const {
+void Rectangle::balanceNeighbours(escript::Data& data, bool average) const
+{
+    if (data.isComplex())
+        balanceNeighboursWorker<cplx_t>(data, average);
+    else
+        balanceNeighboursWorker<real_t>(data, average);
+}
+
+//private
+template<typename Scalar>
+void Rectangle::balanceNeighboursWorker(escript::Data& data, bool average) const
+{
     if (m_NX[0] * m_NX[1] == 1) {
         return;
     }
     const int numComp = data.getDataPointSize();
     const int rx = m_mpiInfo->rank % m_NX[0];
     const int ry = m_mpiInfo->rank / m_NX[0];
+    const Scalar zero = static_cast<Scalar>(0);
+
     //include bordering ranks in summation
     if (m_NX[1] != 1)
-        shareVertical(data, rx, ry);
+        shareVertical<Scalar>(data, rx, ry);
     if (m_NX[0] != 1)
-        shareSides(data, rx, ry);
+        shareSides<Scalar>(data, rx, ry);
     if (m_NX[0] != 1 && m_NX[1] != 1) {
-        shareCorners(data, rx, ry);
+        shareCorners<Scalar>(data, rx, ry);
         if (!average)
             return;
         //averaging out corners
         // bottom left
         if (rx && ry) {
-            double *values = data.getSampleDataRW(0);
+            Scalar* values = data.getSampleDataRW(0, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
         }
         // bottom right
         if (rx < (m_NX[0] - 1) && ry) {
-            double *values = data.getSampleDataRW(m_NN[0]-1);
+            Scalar* values = data.getSampleDataRW(m_NN[0]-1, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
         }
         // top left
         if (rx && ry < (m_NX[0] - 1)) {
-            double *values = data.getSampleDataRW((m_NN[1]-1)*m_NN[0]);
+            Scalar* values = data.getSampleDataRW((m_NN[1]-1)*m_NN[0], zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
         }
         // top right
         if (rx < (m_NX[0] - 1) && ry < (m_NX[0] - 1)) {
-            double *values = data.getSampleDataRW(m_NN[1]*m_NN[0] - 1);
+            Scalar* values = data.getSampleDataRW(m_NN[1]*m_NN[0] - 1, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
@@ -1280,7 +1522,7 @@ void Rectangle::balanceNeighbours(escript::Data& data, bool average) const {
     if (rx) {
 #pragma omp parallel for
         for (dim_t qy = 0; qy < m_NN[1]; qy++) {
-            double *values = data.getSampleDataRW(qy*m_NN[0]);
+            Scalar* values = data.getSampleDataRW(qy*m_NN[0], zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
@@ -1290,7 +1532,7 @@ void Rectangle::balanceNeighbours(escript::Data& data, bool average) const {
     if (rx < m_NX[0] - 1) {
 #pragma omp parallel for
         for (dim_t qy = 0; qy < m_NN[1]; qy++) {
-            double *values = data.getSampleDataRW(qy*m_NN[0] + m_NN[0] - 1);
+            Scalar* values = data.getSampleDataRW(qy*m_NN[0] + m_NN[0] - 1, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
@@ -1300,7 +1542,7 @@ void Rectangle::balanceNeighbours(escript::Data& data, bool average) const {
     if (ry) {
 #pragma omp parallel for
         for (dim_t qx = 0; qx < m_NN[0]; qx++) {
-            double *values = data.getSampleDataRW(qx);
+            Scalar* values = data.getSampleDataRW(qx, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
@@ -1311,7 +1553,7 @@ void Rectangle::balanceNeighbours(escript::Data& data, bool average) const {
         const dim_t start = (m_NN[1]-1)*m_NN[0];
 #pragma omp parallel for
         for (dim_t qx = 0; qx < m_NN[0]; qx++) {
-            double *values = data.getSampleDataRW(start + qx);
+            Scalar* values = data.getSampleDataRW(start + qx, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 values[comp] /= 2;
             }
@@ -1322,15 +1564,29 @@ void Rectangle::balanceNeighbours(escript::Data& data, bool average) const {
 
 //protected
 void Rectangle::interpolateElementsOnNodes(escript::Data& out,
-        const escript::Data& in) const {
+                                           const escript::Data& in) const
+{
+    if (in.isComplex())
+        interpolateElementsOnNodesWorker<cplx_t>(out, in);
+    else
+        interpolateElementsOnNodesWorker<real_t>(out, in);
+}
+
+//private
+template<typename Scalar>
+void Rectangle::interpolateElementsOnNodesWorker(escript::Data& out,
+                                                 const escript::Data& in) const
+{
     const dim_t numComp = in.getDataPointSize();
     const dim_t NE0 = m_NE[0];
     const dim_t NE1 = m_NE[1];
     const int quads = m_order + 1;
     const dim_t max_x = (m_order*NE0) + 1;
     const dim_t max_y = (m_order*NE1) + 1;
-    out.requireWrite();
     const int inFS = in.getFunctionSpace().getTypeCode();
+    const Scalar zero = static_cast<Scalar>(0);
+    out.requireWrite();
+
     // the summation portion
     if (inFS == ReducedElements) {
         for (dim_t colouring = 0; colouring < 2; colouring++) {
@@ -1338,10 +1594,10 @@ void Rectangle::interpolateElementsOnNodes(escript::Data& out,
             for (dim_t ey = colouring; ey < NE1; ey += 2) {
                 for (dim_t ex = 0; ex < NE0; ex++) {
                     dim_t start = ex*m_order + ey*max_x*m_order;
-                    const double *e_in = in.getSampleDataRO(ex + ey*NE0);
+                    const Scalar* e_in = in.getSampleDataRO(ex + ey*NE0, zero);
                     for (int qy = 0; qy < quads; qy++) {
                         for (int qx = 0; qx < quads; qx++) {
-                            double *n_out = out.getSampleDataRW(start + max_x*qy + qx);
+                            Scalar* n_out = out.getSampleDataRW(start + max_x*qy + qx, zero);
                             for (int comp = 0; comp < numComp; comp++) {
                                 n_out[comp] += e_in[comp];
                             }
@@ -1356,10 +1612,10 @@ void Rectangle::interpolateElementsOnNodes(escript::Data& out,
             for (dim_t ey = colouring; ey < NE1; ey += 2) {
                 for (dim_t ex = 0; ex < NE0; ex++) {
                     dim_t start = ex*m_order + ey*max_x*m_order;
-                    const double *e_in = in.getSampleDataRO(ex + ey*NE0);
+                    const Scalar* e_in = in.getSampleDataRO(ex + ey*NE0, zero);
                     for (int qy = 0; qy < quads; qy++) {
                         for (int qx = 0; qx < quads; qx++) {
-                            double *n_out = out.getSampleDataRW(start + max_x*qy + qx);
+                            Scalar* n_out = out.getSampleDataRW(start + max_x*qy + qx, zero);
                             for (int comp = 0; comp < numComp; comp++) {
                                 n_out[comp] += e_in[INDEX3(comp, qx, qy, numComp, quads)];
                             }
@@ -1377,7 +1633,7 @@ void Rectangle::interpolateElementsOnNodes(escript::Data& out,
 #pragma omp parallel for
     for (dim_t qy = 0; qy < max_y; qy++) {
         for (dim_t qx = m_order; qx < max_x - m_order; qx += m_order) {
-            double *n_out = out.getSampleDataRW(qx + qy*max_x);
+            Scalar* n_out = out.getSampleDataRW(qx + qy*max_x, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 n_out[comp] /= 2;
             }
@@ -1389,7 +1645,7 @@ void Rectangle::interpolateElementsOnNodes(escript::Data& out,
 #pragma omp parallel for
     for (dim_t qy = order; qy < max_y - order; qy += order) {
         for (dim_t qx = 0; qx < max_x; qx ++) {
-            double *n_out = out.getSampleDataRW(qx + qy*max_x);
+            Scalar* n_out = out.getSampleDataRW(qx + qy*max_x, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 n_out[comp] /= 2;
             }
@@ -1399,6 +1655,7 @@ void Rectangle::interpolateElementsOnNodes(escript::Data& out,
 
 #ifdef ESYS_MPI
 //private
+template<typename Scalar>
 void Rectangle::shareCorners(escript::Data& out, int rx, int ry) const
 {
     //setup
@@ -1407,9 +1664,10 @@ void Rectangle::shareCorners(escript::Data& out, int rx, int ry) const
     MPI_Request request[4];
     const int numComp = out.getDataPointSize();
     const int count = 4 * numComp;
-    std::vector<double> outbuf(count, 0);
-    std::vector<double> inbuf(count, 0);
+    std::vector<Scalar> outbuf(count, 0);
+    std::vector<Scalar> inbuf(count, 0);
     const int rank = m_mpiInfo->rank;
+    const Scalar zero = static_cast<Scalar>(0);
     //precalc bounds so we can loop nicely, can probably be cleaned up
     const bool conds[4] = {rx && ry,
                            rx < (m_NX[0] - 1) && ry,
@@ -1422,7 +1680,7 @@ void Rectangle::shareCorners(escript::Data& out, int rx, int ry) const
     //fill everything, regardless of whether we're sharing that corner or not
     for (int y = 0; y < 2; y++) {
         for (int x = 0; x < 2; x++) {
-            const double *data = out.getSampleDataRO(x*(m_NN[0]-1) + y*(m_NN[1]-1)*m_NN[0]);
+            const Scalar* data = out.getSampleDataRO(x*(m_NN[0]-1) + y*(m_NN[1]-1)*m_NN[0], zero);
             std::copy(data, data + numComp, &outbuf[(x + 2*y)*numComp]);
         }
     }
@@ -1430,8 +1688,13 @@ void Rectangle::shareCorners(escript::Data& out, int rx, int ry) const
     //share
     for (int i = 0; i < 4; i++) {
         if (conds[i]) {
-            MPI_Isend(&outbuf[i], numComp, MPI_DOUBLE, ranks[i], tag,
-                    m_mpiInfo->comm, &request[i]);
+            if (sizeof(Scalar) == sizeof(double)) {
+                MPI_Isend(&outbuf[i], numComp, MPI_DOUBLE, ranks[i], tag,
+                          m_mpiInfo->comm, &request[i]);
+            } else {
+                MPI_Isend(&outbuf[i], numComp, MPI_DOUBLE_COMPLEX, ranks[i],
+                          tag, m_mpiInfo->comm, &request[i]);
+            }
         }
     }
 
@@ -1440,9 +1703,14 @@ void Rectangle::shareCorners(escript::Data& out, int rx, int ry) const
         for (int x = 0; x < 2; x++) {
             int i = 2*y+x;
             if (conds[i]) {
-                MPI_Recv(&inbuf[i], numComp, MPI_DOUBLE, ranks[i], tag,
-                        m_mpiInfo->comm, &status);
-                double *data = out.getSampleDataRW(x*(m_NN[0]-1) + y*(m_NN[1]-1)*m_NN[0]);
+                if (sizeof(Scalar) == sizeof(double)) {
+                    MPI_Recv(&inbuf[i], numComp, MPI_DOUBLE, ranks[i], tag,
+                             m_mpiInfo->comm, &status);
+                } else {
+                    MPI_Recv(&inbuf[i], numComp, MPI_DOUBLE_COMPLEX, ranks[i],
+                             tag, m_mpiInfo->comm, &status);
+                }
+                Scalar* data = out.getSampleDataRW(x*(m_NN[0]-1) + y*(m_NN[1]-1)*m_NN[0], zero);
                 for (int comp = 0; comp < numComp; comp++) {
                     data[comp] += inbuf[i*numComp + comp];
                 }
@@ -1457,6 +1725,7 @@ void Rectangle::shareCorners(escript::Data& out, int rx, int ry) const
 }
 
 //private
+template<typename Scalar>
 void Rectangle::shareVertical(escript::Data& out, int rx, int ry) const
 {
     const int tag = 0;
@@ -1466,26 +1735,28 @@ void Rectangle::shareVertical(escript::Data& out, int rx, int ry) const
     const int up_neighbour = m_mpiInfo->rank + m_NX[0];
     const int down_neighbour = m_mpiInfo->rank - m_NX[0];
     //allocate some space to recieve
-    std::vector<double> recv(count);
+    std::vector<Scalar> recv(count);
     //get our sources
-    double *top = out.getSampleDataRW((m_NN[1]-1) * m_NN[0]);
-    double *bottom = out.getSampleDataRW(0);
+    const Scalar zero = static_cast<Scalar>(0);
+    Scalar* top = out.getSampleDataRW((m_NN[1]-1) * m_NN[0], zero);
+    Scalar* bottom = out.getSampleDataRW(0, zero);
+    MPI_Datatype mpiType = (sizeof(Scalar) == sizeof(double) ? MPI_DOUBLE : MPI_DOUBLE_COMPLEX);
 
     MPI_Request request[2];
     
     if (ry) {
-        MPI_Isend(bottom, count, MPI_DOUBLE, down_neighbour, tag,
+        MPI_Isend(bottom, count, mpiType, down_neighbour, tag,
                 m_mpiInfo->comm, request);
     }
 
     if (ry < m_NX[1] - 1) {
-        MPI_Isend(top, count, MPI_DOUBLE, up_neighbour, tag,
+        MPI_Isend(top, count, mpiType, up_neighbour, tag,
             m_mpiInfo->comm, request+1);
     }
     
     //read down
     if (ry) {
-        MPI_Recv(&recv[0], count, MPI_DOUBLE, down_neighbour, tag,
+        MPI_Recv(&recv[0], count, mpiType, down_neighbour, tag,
                 m_mpiInfo->comm, &status);
 
         //unpack bottom
@@ -1496,7 +1767,7 @@ void Rectangle::shareVertical(escript::Data& out, int rx, int ry) const
 
     //read up, send up
     if (ry < m_NX[1] - 1) {
-        MPI_Recv(&recv[0], count, MPI_DOUBLE, up_neighbour, tag,
+        MPI_Recv(&recv[0], count, mpiType, up_neighbour, tag,
                 m_mpiInfo->comm, &status);
 
         //unpack up
@@ -1514,6 +1785,7 @@ void Rectangle::shareVertical(escript::Data& out, int rx, int ry) const
 }
 
 //private
+template<typename Scalar>
 void Rectangle::shareSides(escript::Data& out, int rx, int ry) const
 {
     const int tag = 0;
@@ -1522,40 +1794,42 @@ void Rectangle::shareSides(escript::Data& out, int rx, int ry) const
     const dim_t count = m_NN[1]*numComp;
     const int left_neighbour = m_mpiInfo->rank - 1;
     const int right_neighbour = m_mpiInfo->rank + 1;
+    const Scalar zero = static_cast<Scalar>(0);
     //allocate some space
-    std::vector<double> left(count,170);
-    std::vector<double> right(count,17000);
-    std::vector<double> recv(count,1700);
+    std::vector<Scalar> left(count, 170);
+    std::vector<Scalar> right(count, 17000);
+    std::vector<Scalar> recv(count, 1700);
+    MPI_Datatype mpiType = (sizeof(Scalar) == sizeof(double) ? MPI_DOUBLE : MPI_DOUBLE_COMPLEX);
 
     MPI_Request request[2];
 
     if (rx) {
         for (dim_t n = 0; n < m_NN[1]; n++) {
             index_t index = n*m_NN[0];
-            const double *leftData = out.getSampleDataRO(index);
+            const Scalar* leftData = out.getSampleDataRO(index, zero);
             std::copy(leftData, leftData + numComp, &left[n*numComp]);
         }
-        MPI_Isend(&left[0], count, MPI_DOUBLE, left_neighbour, tag,
+        MPI_Isend(&left[0], count, mpiType, left_neighbour, tag,
                 m_mpiInfo->comm, request);
     }
 
     if (rx < m_NX[0] - 1) {
         for (dim_t n = 0; n < m_NN[1]; n++) {
             index_t index = n*m_NN[0];
-            const double *rightData = out.getSampleDataRO(index+m_NN[0]-1);
+            const Scalar* rightData = out.getSampleDataRO(index+m_NN[0]-1, zero);
             std::copy(rightData, rightData + numComp, &right[n*numComp]);
         }
-        MPI_Isend(&right[0], count, MPI_DOUBLE, right_neighbour, tag,
+        MPI_Isend(&right[0], count, mpiType, right_neighbour, tag,
                 m_mpiInfo->comm, request+1);
     }
 
     //read left
     if (rx) {
-        MPI_Recv(&recv[0], count, MPI_DOUBLE, left_neighbour, tag,
+        MPI_Recv(&recv[0], count, mpiType, left_neighbour, tag,
                 m_mpiInfo->comm, &status);
         //unpack to left
         for (dim_t i = 0; i < m_NN[1]; i++) {
-            double *data = out.getSampleDataRW(i*m_NN[0]);
+            Scalar* data = out.getSampleDataRW(i*m_NN[0], zero);
             for (int comp = 0; comp < numComp; comp++) {
                 data[comp] += recv[i*numComp+comp];
             }
@@ -1564,11 +1838,11 @@ void Rectangle::shareSides(escript::Data& out, int rx, int ry) const
 
     //read right
     if (rx < m_NX[0] - 1) {
-        MPI_Recv(&recv[0], count, MPI_DOUBLE, right_neighbour, tag,
+        MPI_Recv(&recv[0], count, mpiType, right_neighbour, tag,
                 m_mpiInfo->comm, &status);
         //unpack to right
         for (dim_t i = 0; i < m_NN[1]; i++) {
-            double *data = out.getSampleDataRW((i + 1) * m_NN[0] - 1);
+            Scalar* data = out.getSampleDataRW((i + 1) * m_NN[0] - 1, zero);
             for (int comp = 0; comp < numComp; comp++) {
                 data[comp] += recv[i*numComp+comp];
             }
diff --git a/speckley/src/Rectangle.h b/speckley/src/Rectangle.h
index 303640b..841fbba 100644
--- a/speckley/src/Rectangle.h
+++ b/speckley/src/Rectangle.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -229,7 +229,9 @@ protected:
     virtual void assembleCoordinates(escript::Data& arg) const;
     virtual void assembleGradient(escript::Data& out,
                                   const escript::Data& in) const;
-    virtual void assembleIntegrate(DoubleVector& integrals,
+    virtual void assembleIntegrate(std::vector<real_t>& integrals,
+                                   const escript::Data& arg) const;
+    virtual void assembleIntegrate(std::vector<cplx_t>& integrals,
                                    const escript::Data& arg) const;
     virtual void interpolateNodesOnElements(escript::Data& out,
                                   const escript::Data& in,
@@ -240,48 +242,95 @@ protected:
     virtual void reduceElements(escript::Data& out, const escript::Data& in) const;
 
 private:
+    template<typename Scalar>
     void gradient_order2(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order3(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order4(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order5(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order6(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order7(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order8(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order9(escript::Data&, const escript::Data&) const;
+    template<typename Scalar>
     void gradient_order10(escript::Data&, const escript::Data&) const;
 
+    template<typename Scalar>
     void reduction_order2(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order3(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order4(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order5(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order6(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order7(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order8(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order9(const escript::Data&, escript::Data&) const;
+    template<typename Scalar>
     void reduction_order10(const escript::Data&, escript::Data&) const;
 
-    void integral_order2(std::vector<double>&, const escript::Data&) const;
-    void integral_order3(std::vector<double>&, const escript::Data&) const;
-    void integral_order4(std::vector<double>&, const escript::Data&) const;
-    void integral_order5(std::vector<double>&, const escript::Data&) const;
-    void integral_order6(std::vector<double>&, const escript::Data&) const;
-    void integral_order7(std::vector<double>&, const escript::Data&) const;
-    void integral_order8(std::vector<double>&, const escript::Data&) const;
-    void integral_order9(std::vector<double>&, const escript::Data&) const;
-    void integral_order10(std::vector<double>&, const escript::Data&) const; 
+    template<typename Scalar>
+    void integral_order2(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order3(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order4(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order5(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order6(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order7(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order8(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order9(std::vector<Scalar>&, const escript::Data&) const;
+    template<typename Scalar>
+    void integral_order10(std::vector<Scalar>&, const escript::Data&) const; 
+
+    template<typename Scalar>
+    void assembleIntegrateWorker(std::vector<Scalar>& integrals,
+                                 const escript::Data& arg) const;
+
+    template<typename Scalar>
+    void interpolateNodesOnElementsWorker(escript::Data& out,
+                                          const escript::Data& in,
+                                          bool reduced) const;
+
+    template<typename Scalar>
+    void interpolateElementsOnNodesWorker(escript::Data& out,
+                                          const escript::Data& in) const;
+
 #ifdef ESYS_MPI
+    template<typename Scalar>
+    void balanceNeighboursWorker(escript::Data& data, bool average) const;
+
     /* \brief
        Sums the values across MPI overlaps
     */
+    template<typename Scalar>
     void shareCorners(escript::Data& out, int rx, int ry) const;
     /* \brief
        Sums the values across MPI overlaps
     */
+    template<typename Scalar>
     void shareSides(escript::Data& out, int rx, int ry) const;
     
     /* \brief
        Sums the values across MPI overlaps
     */
+    template<typename Scalar>
     void shareVertical(escript::Data& out, int rx, int ry) const;
 #endif
     
@@ -292,9 +341,6 @@ private:
     void interpolateFromCorners(escript::Data& out) const;
     
     void populateSampleIds();
-    void addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
-           const DoubleVector& EM_S, const DoubleVector& EM_F,
-           bool addS, bool addF, index_t firstNode, int nEq=1, int nComp=1) const;
 
     template<typename ValueType>
     void readBinaryGridImpl(escript::Data& out, const std::string& filename,
diff --git a/speckley/src/RectangleGradients.cpp b/speckley/src/RectangleGradients.cpp
index b29917f..50a53cf 100644
--- a/speckley/src/RectangleGradients.cpp
+++ b/speckley/src/RectangleGradients.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,23 +20,25 @@
 
 namespace speckley {
 
+template<typename Scalar>
 void Rectangle::gradient_order2(escript::Data& out, const escript::Data& in) const
 {
-    const double lagrange_deriv_0[3] = {-1.50000000000000, -0.500000000000000, 0.500000000000000};
-    const double lagrange_deriv_1[3] = {2.00000000000000, 0, -2.00000000000000};
-    const double lagrange_deriv_2[3] = {-0.500000000000000, 0.500000000000000, 1.50000000000000};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[3] = {-1.50000000000000, -0.500000000000000, 0.500000000000000};
+    const real_t lagrange_deriv_1[3] = {2.00000000000000, 0, -2.00000000000000};
+    const real_t lagrange_deriv_2[3] = {-0.500000000000000, 0.500000000000000, 1.50000000000000};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 3; ++j) {
                         for (int i = 0; i < 3; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,3);
@@ -51,8 +53,8 @@ void Rectangle::gradient_order2(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 3; ++j) {
                     for (int i = 0; i < 3; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -66,23 +68,25 @@ void Rectangle::gradient_order2(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order3(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[4] = {-3.00000000000000, -0.809016994374948, 0.309016994374948, -0.500000000000000};
-    const double lagrange_deriv_1[4] = {4.04508497187474, 4.44089209850063e-16, -1.11803398874990, 1.54508497187474};
-    const double lagrange_deriv_2[4] = {-1.54508497187474, 1.11803398874989, 2.22044604925031e-16, -4.04508497187474};
-    const double lagrange_deriv_3[4] = {0.500000000000000, -0.309016994374947, 0.809016994374948, 3.00000000000000};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[4] = {-3.00000000000000, -0.809016994374948, 0.309016994374948, -0.500000000000000};
+    const real_t lagrange_deriv_1[4] = {4.04508497187474, 4.44089209850063e-16, -1.11803398874990, 1.54508497187474};
+    const real_t lagrange_deriv_2[4] = {-1.54508497187474, 1.11803398874989, 2.22044604925031e-16, -4.04508497187474};
+    const real_t lagrange_deriv_3[4] = {0.500000000000000, -0.309016994374947, 0.809016994374948, 3.00000000000000};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 4; ++j) {
                         for (int i = 0; i < 4; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,4);
@@ -97,8 +101,8 @@ void Rectangle::gradient_order3(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 4; ++j) {
                     for (int i = 0; i < 4; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -112,24 +116,26 @@ void Rectangle::gradient_order3(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order4(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[5] = {-4.99999999999999, -1.24099025303098, 0.374999999999999, -0.259009746969017, 0.499999999999999};
-    const double lagrange_deriv_1[5] = {6.75650248872424, -6.66133814775094e-15, -1.33658457769545, 0.763762615825974, -1.41016417794243};
-    const double lagrange_deriv_2[5] = {-2.66666666666667, 1.74574312188794, 1.44328993201270e-15, -1.74574312188794, 2.66666666666667};
-    const double lagrange_deriv_3[5] = {1.41016417794243, -0.763762615825974, 1.33658457769545, 1.66533453693773e-15, -6.75650248872424};
-    const double lagrange_deriv_4[5] = {-0.500000000000001, 0.259009746969017, -0.375000000000000, 1.24099025303098, 5.00000000000000};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[5] = {-4.99999999999999, -1.24099025303098, 0.374999999999999, -0.259009746969017, 0.499999999999999};
+    const real_t lagrange_deriv_1[5] = {6.75650248872424, -6.66133814775094e-15, -1.33658457769545, 0.763762615825974, -1.41016417794243};
+    const real_t lagrange_deriv_2[5] = {-2.66666666666667, 1.74574312188794, 1.44328993201270e-15, -1.74574312188794, 2.66666666666667};
+    const real_t lagrange_deriv_3[5] = {1.41016417794243, -0.763762615825974, 1.33658457769545, 1.66533453693773e-15, -6.75650248872424};
+    const real_t lagrange_deriv_4[5] = {-0.500000000000001, 0.259009746969017, -0.375000000000000, 1.24099025303098, 5.00000000000000};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 5; ++j) {
                         for (int i = 0; i < 5; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,5);
@@ -144,8 +150,8 @@ void Rectangle::gradient_order4(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 5; ++j) {
                     for (int i = 0; i < 5; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -159,25 +165,27 @@ void Rectangle::gradient_order4(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order5(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[6] = {-7.50000000000002, -1.78636494833911, 0.484951047853572, -0.269700610832040, 0.237781177984232, -0.500000000000002};
-    const double lagrange_deriv_1[6] = {10.1414159363197, 2.13162820728030e-14, -1.72125695283023, 0.786356672223240, -0.653547507429800, 1.34991331419049};
-    const double lagrange_deriv_2[6] = {-4.03618727030532, 2.52342677742945, -4.66293670342566e-15, -1.75296196636786, 1.15282815853593, -2.24468464817616};
-    const double lagrange_deriv_3[6] = {2.24468464817616, -1.15282815853593, 1.75296196636787, -1.77635683940025e-15, -2.52342677742946, 4.03618727030535};
-    const double lagrange_deriv_4[6] = {-1.34991331419048, 0.653547507429800, -0.786356672223242, 1.72125695283023, 2.22044604925031e-15, -10.1414159363197};
-    const double lagrange_deriv_5[6] = {0.499999999999998, -0.237781177984231, 0.269700610832039, -0.484951047853569, 1.78636494833909, 7.50000000000000};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[6] = {-7.50000000000002, -1.78636494833911, 0.484951047853572, -0.269700610832040, 0.237781177984232, -0.500000000000002};
+    const real_t lagrange_deriv_1[6] = {10.1414159363197, 2.13162820728030e-14, -1.72125695283023, 0.786356672223240, -0.653547507429800, 1.34991331419049};
+    const real_t lagrange_deriv_2[6] = {-4.03618727030532, 2.52342677742945, -4.66293670342566e-15, -1.75296196636786, 1.15282815853593, -2.24468464817616};
+    const real_t lagrange_deriv_3[6] = {2.24468464817616, -1.15282815853593, 1.75296196636787, -1.77635683940025e-15, -2.52342677742946, 4.03618727030535};
+    const real_t lagrange_deriv_4[6] = {-1.34991331419048, 0.653547507429800, -0.786356672223242, 1.72125695283023, 2.22044604925031e-15, -10.1414159363197};
+    const real_t lagrange_deriv_5[6] = {0.499999999999998, -0.237781177984231, 0.269700610832039, -0.484951047853569, 1.78636494833909, 7.50000000000000};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 6; ++j) {
                         for (int i = 0; i < 6; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,6);
@@ -192,8 +200,8 @@ void Rectangle::gradient_order5(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 6; ++j) {
                     for (int i = 0; i < 6; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -207,26 +215,28 @@ void Rectangle::gradient_order5(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order6(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[7] = {-10.5000000000000, -2.44292601424426, 0.625256665515336, -0.312499999999997, 0.226099400942572, -0.226611870395444, 0.500000000000001};
-    const double lagrange_deriv_1[7] = {14.2015766029198, -4.17443857259059e-14, -2.21580428316997, 0.907544471268819, -0.616390835517577, 0.602247179635785, -1.31737343570244};
-    const double lagrange_deriv_2[7] = {-5.66898522554555, 3.45582821429430, 3.10862446895044e-15, -2.00696924058875, 1.06644190400637, -0.961339797288714, 2.04996481307676};
-    const double lagrange_deriv_3[7] = {3.20000000000003, -1.59860668809837, 2.26669808708600, 1.33226762955019e-15, -2.26669808708599, 1.59860668809837, -3.20000000000003};
-    const double lagrange_deriv_4[7] = {-2.04996481307676, 0.961339797288717, -1.06644190400638, 2.00696924058876, -1.77635683940025e-14, -3.45582821429431, 5.66898522554558};
-    const double lagrange_deriv_5[7] = {1.31737343570245, -0.602247179635788, 0.616390835517580, -0.907544471268822, 2.21580428316998, 6.76125821996720e-14, -14.2015766029198};
-    const double lagrange_deriv_6[7] = {-0.500000000000000, 0.226611870395444, -0.226099400942572, 0.312499999999997, -0.625256665515335, 2.44292601424425, 10.5000000000000};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[7] = {-10.5000000000000, -2.44292601424426, 0.625256665515336, -0.312499999999997, 0.226099400942572, -0.226611870395444, 0.500000000000001};
+    const real_t lagrange_deriv_1[7] = {14.2015766029198, -4.17443857259059e-14, -2.21580428316997, 0.907544471268819, -0.616390835517577, 0.602247179635785, -1.31737343570244};
+    const real_t lagrange_deriv_2[7] = {-5.66898522554555, 3.45582821429430, 3.10862446895044e-15, -2.00696924058875, 1.06644190400637, -0.961339797288714, 2.04996481307676};
+    const real_t lagrange_deriv_3[7] = {3.20000000000003, -1.59860668809837, 2.26669808708600, 1.33226762955019e-15, -2.26669808708599, 1.59860668809837, -3.20000000000003};
+    const real_t lagrange_deriv_4[7] = {-2.04996481307676, 0.961339797288717, -1.06644190400638, 2.00696924058876, -1.77635683940025e-14, -3.45582821429431, 5.66898522554558};
+    const real_t lagrange_deriv_5[7] = {1.31737343570245, -0.602247179635788, 0.616390835517580, -0.907544471268822, 2.21580428316998, 6.76125821996720e-14, -14.2015766029198};
+    const real_t lagrange_deriv_6[7] = {-0.500000000000000, 0.226611870395444, -0.226099400942572, 0.312499999999997, -0.625256665515335, 2.44292601424425, 10.5000000000000};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 7; ++j) {
                         for (int i = 0; i < 7; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,7);
@@ -241,8 +251,8 @@ void Rectangle::gradient_order6(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 7; ++j) {
                     for (int i = 0; i < 7; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -256,27 +266,29 @@ void Rectangle::gradient_order6(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order7(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[8] = {-13.9999999999999, -3.20991570300295, 0.792476681320508, -0.372150435728592, 0.243330712723790, -0.203284568900591, 0.219957514771299, -0.499999999999980};
-    const double lagrange_deriv_1[8] = {18.9375986071174, -6.23945339839338e-14, -2.80647579473643, 1.07894468879045, -0.661157350900312, 0.537039586157660, -0.573565414940254, 1.29768738832019};
-    const double lagrange_deriv_2[8] = {-7.56928981934855, 4.54358506456659, 1.17683640610267e-14, -2.37818723351551, 1.13535801688112, -0.845022556506511, 0.869448098331479, -1.94165942554406};
-    const double lagrange_deriv_3[8] = {4.29790816426521, -2.11206121431455, 2.87551740597250, 3.77475828372553e-15, -2.38892435915824, 1.37278583180603, -1.29423205091348, 2.81018898925786};
-    const double lagrange_deriv_4[8] = {-2.81018898925796, 1.29423205091350, -1.37278583180602, 2.38892435915823, 7.77156117237610e-15, -2.87551740597249, 2.11206121431450, -4.29790816426503};
-    const double lagrange_deriv_5[8] = {1.94165942554413, -0.869448098331493, 0.845022556506508, -1.13535801688111, 2.37818723351550, -2.44249065417534e-14, -4.54358506456649, 7.56928981934828};
-    const double lagrange_deriv_6[8] = {-1.29768738832026, 0.573565414940274, -0.537039586157669, 0.661157350900321, -1.07894468879047, 2.80647579473648, -1.71085368094737e-13, -18.9375986071174};
-    const double lagrange_deriv_7[8] = {0.500000000000021, -0.219957514771312, 0.203284568900599, -0.243330712723800, 0.372150435728609, -0.792476681320546, 3.20991570300311, 14.0000000000002};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[8] = {-13.9999999999999, -3.20991570300295, 0.792476681320508, -0.372150435728592, 0.243330712723790, -0.203284568900591, 0.219957514771299, -0.499999999999980};
+    const real_t lagrange_deriv_1[8] = {18.9375986071174, -6.23945339839338e-14, -2.80647579473643, 1.07894468879045, -0.661157350900312, 0.537039586157660, -0.573565414940254, 1.29768738832019};
+    const real_t lagrange_deriv_2[8] = {-7.56928981934855, 4.54358506456659, 1.17683640610267e-14, -2.37818723351551, 1.13535801688112, -0.845022556506511, 0.869448098331479, -1.94165942554406};
+    const real_t lagrange_deriv_3[8] = {4.29790816426521, -2.11206121431455, 2.87551740597250, 3.77475828372553e-15, -2.38892435915824, 1.37278583180603, -1.29423205091348, 2.81018898925786};
+    const real_t lagrange_deriv_4[8] = {-2.81018898925796, 1.29423205091350, -1.37278583180602, 2.38892435915823, 7.77156117237610e-15, -2.87551740597249, 2.11206121431450, -4.29790816426503};
+    const real_t lagrange_deriv_5[8] = {1.94165942554413, -0.869448098331493, 0.845022556506508, -1.13535801688111, 2.37818723351550, -2.44249065417534e-14, -4.54358506456649, 7.56928981934828};
+    const real_t lagrange_deriv_6[8] = {-1.29768738832026, 0.573565414940274, -0.537039586157669, 0.661157350900321, -1.07894468879047, 2.80647579473648, -1.71085368094737e-13, -18.9375986071174};
+    const real_t lagrange_deriv_7[8] = {0.500000000000021, -0.219957514771312, 0.203284568900599, -0.243330712723800, 0.372150435728609, -0.792476681320546, 3.20991570300311, 14.0000000000002};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 8; ++j) {
                         for (int i = 0; i < 8; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,8);
@@ -291,8 +303,8 @@ void Rectangle::gradient_order7(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 8; ++j) {
                     for (int i = 0; i < 8; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -306,28 +318,30 @@ void Rectangle::gradient_order7(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order8(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[9] = {-18.0000000000010, -4.08701370203454, 0.985360090074639, -0.444613449281139, 0.273437500000029, -0.207734512035617, 0.189655591978376, -0.215654018702531, 0.500000000000095};
-    const double lagrange_deriv_1[9] = {24.3497451715930, 1.34892097491957e-12, -3.48835875343438, 1.28796075006388, -0.741782397916244, 0.547300160534042, -0.492350938315503, 0.555704981283736, -1.28483063269969};
-    const double lagrange_deriv_2[9] = {-9.73870165721010, 5.78680581663678, -3.21298543326520e-13, -2.83445891207935, 1.26941308635811, -0.855726185092640, 0.738349277190360, -0.816756381741392, 1.87444087344708};
-    const double lagrange_deriv_3[9] = {5.54496390694879, -2.69606544031400, 3.57668094012577, -3.10862446895044e-15, -2.65931021757391, 1.37696489376050, -1.07980381128263, 1.14565373845518, -2.59074567655957};
-    const double lagrange_deriv_4[9] = {-3.65714285714248, 1.66522164500537, -1.71783215719513, 2.85191596846290, -1.06581410364015e-14, -2.85191596846287, 1.71783215719506, -1.66522164500546, 3.65714285714316};
-    const double lagrange_deriv_5[9] = {2.59074567655910, -1.14565373845513, 1.07980381128268, -1.37696489376052, 2.65931021757393, -3.71924713249427e-14, -3.57668094012566, 2.69606544031420, -5.54496390694988};
-    const double lagrange_deriv_6[9] = {-1.87444087344680, 0.816756381741386, -0.738349277190418, 0.855726185092682, -1.26941308635816, 2.83445891207943, 9.27036225562006e-14, -5.78680581663756, 9.73870165721225};
-    const double lagrange_deriv_7[9] = {1.28483063269940, -0.555704981283693, 0.492350938315507, -0.547300160534031, 0.741782397916225, -1.28796075006385, 3.48835875343430, 5.71542813077031e-13, -24.3497451715928};
-    const double lagrange_deriv_8[9] = {-0.499999999999903, 0.215654018702479, -0.189655591978347, 0.207734512035579, -0.273437499999975, 0.444613449281046, -0.985360090074401, 4.08701370203326, 17.9999999999994};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[9] = {-18.0000000000010, -4.08701370203454, 0.985360090074639, -0.444613449281139, 0.273437500000029, -0.207734512035617, 0.189655591978376, -0.215654018702531, 0.500000000000095};
+    const real_t lagrange_deriv_1[9] = {24.3497451715930, 1.34892097491957e-12, -3.48835875343438, 1.28796075006388, -0.741782397916244, 0.547300160534042, -0.492350938315503, 0.555704981283736, -1.28483063269969};
+    const real_t lagrange_deriv_2[9] = {-9.73870165721010, 5.78680581663678, -3.21298543326520e-13, -2.83445891207935, 1.26941308635811, -0.855726185092640, 0.738349277190360, -0.816756381741392, 1.87444087344708};
+    const real_t lagrange_deriv_3[9] = {5.54496390694879, -2.69606544031400, 3.57668094012577, -3.10862446895044e-15, -2.65931021757391, 1.37696489376050, -1.07980381128263, 1.14565373845518, -2.59074567655957};
+    const real_t lagrange_deriv_4[9] = {-3.65714285714248, 1.66522164500537, -1.71783215719513, 2.85191596846290, -1.06581410364015e-14, -2.85191596846287, 1.71783215719506, -1.66522164500546, 3.65714285714316};
+    const real_t lagrange_deriv_5[9] = {2.59074567655910, -1.14565373845513, 1.07980381128268, -1.37696489376052, 2.65931021757393, -3.71924713249427e-14, -3.57668094012566, 2.69606544031420, -5.54496390694988};
+    const real_t lagrange_deriv_6[9] = {-1.87444087344680, 0.816756381741386, -0.738349277190418, 0.855726185092682, -1.26941308635816, 2.83445891207943, 9.27036225562006e-14, -5.78680581663756, 9.73870165721225};
+    const real_t lagrange_deriv_7[9] = {1.28483063269940, -0.555704981283693, 0.492350938315507, -0.547300160534031, 0.741782397916225, -1.28796075006385, 3.48835875343430, 5.71542813077031e-13, -24.3497451715928};
+    const real_t lagrange_deriv_8[9] = {-0.499999999999903, 0.215654018702479, -0.189655591978347, 0.207734512035579, -0.273437499999975, 0.444613449281046, -0.985360090074401, 4.08701370203326, 17.9999999999994};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 9; ++j) {
                         for (int i = 0; i < 9; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,9);
@@ -342,8 +356,8 @@ void Rectangle::gradient_order8(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 9; ++j) {
                     for (int i = 0; i < 9; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -357,29 +371,31 @@ void Rectangle::gradient_order8(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order9(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[10] = {-22.4999999999988, -5.07406470297709, 1.20335199285206, -0.528369376820220, 0.312047255608382, -0.223527944742433, 0.186645789393719, -0.180786585489230, 0.212702758009187, -0.500000000000077};
-    const double lagrange_deriv_1[10] = {30.4381450292820, -1.52677870346452e-12, -4.25929735496529, 1.52990263818163, -0.845813573406436, 0.588082143045176, -0.483462326333953, 0.464274958908154, -0.543753738235757, 1.27595483609299};
-    const double lagrange_deriv_2[10] = {-12.1779467074315, 7.18550286970643, 3.27293747659496e-13, -3.36412586829791, 1.44485031560171, -0.916555180336469, 0.721237312721631, -0.676797087196100, 0.783239293138005, -1.82956393190377};
-    const double lagrange_deriv_3[10] = {6.94378848513465, -3.35166386274684, 4.36867455701003, 3.17523785042795e-14, -3.02021795819936, 1.46805550939000, -1.04618936550250, 0.936603213139437, -1.05915446364554, 2.45288417544331};
-    const double lagrange_deriv_4[10] = {-4.59935476110357, 2.07820799403643, -2.10435017941307, 3.38731810120242, 2.22044604925031e-16, -3.02518848775198, 1.64649408398706, -1.33491548387823, 1.44494844875159, -3.29464303375000};
-    const double lagrange_deriv_5[10] = {3.29464303374949, -1.44494844875146, 1.33491548387820, -1.64649408398705, 3.02518848775197, 6.66133814775094e-15, -3.38731810120245, 2.10435017941312, -2.07820799403661, 4.59935476110425};
-    const double lagrange_deriv_6[10] = {-2.45288417544291, 1.05915446364544, -0.936603213139410, 1.04618936550249, -1.46805550938999, 3.02021795819934, -1.55431223447522e-15, -4.36867455701010, 3.35166386274711, -6.94378848513561};
-    const double lagrange_deriv_7[10] = {1.82956393190345, -0.783239293137921, 0.676797087196070, -0.721237312721610, 0.916555180336448, -1.44485031560168, 3.36412586829786, -2.10609307771392e-13, -7.18550286970689, 12.1779467074328};
-    const double lagrange_deriv_8[10] = {-1.27595483609268, 0.543753738235664, -0.464274958908104, 0.483462326333909, -0.588082143045126, 0.845813573406365, -1.52990263818151, 4.25929735496501, 2.64499533386697e-12, -30.4381450292815};
-    const double lagrange_deriv_9[10] = {0.499999999999919, -0.212702758009135, 0.180786585489197, -0.186645789393687, 0.223527944742396, -0.312047255608330, 0.528369376820133, -1.20335199285186, 5.07406470297626, 22.4999999999976};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[10] = {-22.4999999999988, -5.07406470297709, 1.20335199285206, -0.528369376820220, 0.312047255608382, -0.223527944742433, 0.186645789393719, -0.180786585489230, 0.212702758009187, -0.500000000000077};
+    const real_t lagrange_deriv_1[10] = {30.4381450292820, -1.52677870346452e-12, -4.25929735496529, 1.52990263818163, -0.845813573406436, 0.588082143045176, -0.483462326333953, 0.464274958908154, -0.543753738235757, 1.27595483609299};
+    const real_t lagrange_deriv_2[10] = {-12.1779467074315, 7.18550286970643, 3.27293747659496e-13, -3.36412586829791, 1.44485031560171, -0.916555180336469, 0.721237312721631, -0.676797087196100, 0.783239293138005, -1.82956393190377};
+    const real_t lagrange_deriv_3[10] = {6.94378848513465, -3.35166386274684, 4.36867455701003, 3.17523785042795e-14, -3.02021795819936, 1.46805550939000, -1.04618936550250, 0.936603213139437, -1.05915446364554, 2.45288417544331};
+    const real_t lagrange_deriv_4[10] = {-4.59935476110357, 2.07820799403643, -2.10435017941307, 3.38731810120242, 2.22044604925031e-16, -3.02518848775198, 1.64649408398706, -1.33491548387823, 1.44494844875159, -3.29464303375000};
+    const real_t lagrange_deriv_5[10] = {3.29464303374949, -1.44494844875146, 1.33491548387820, -1.64649408398705, 3.02518848775197, 6.66133814775094e-15, -3.38731810120245, 2.10435017941312, -2.07820799403661, 4.59935476110425};
+    const real_t lagrange_deriv_6[10] = {-2.45288417544291, 1.05915446364544, -0.936603213139410, 1.04618936550249, -1.46805550938999, 3.02021795819934, -1.55431223447522e-15, -4.36867455701010, 3.35166386274711, -6.94378848513561};
+    const real_t lagrange_deriv_7[10] = {1.82956393190345, -0.783239293137921, 0.676797087196070, -0.721237312721610, 0.916555180336448, -1.44485031560168, 3.36412586829786, -2.10609307771392e-13, -7.18550286970689, 12.1779467074328};
+    const real_t lagrange_deriv_8[10] = {-1.27595483609268, 0.543753738235664, -0.464274958908104, 0.483462326333909, -0.588082143045126, 0.845813573406365, -1.52990263818151, 4.25929735496501, 2.64499533386697e-12, -30.4381450292815};
+    const real_t lagrange_deriv_9[10] = {0.499999999999919, -0.212702758009135, 0.180786585489197, -0.186645789393687, 0.223527944742396, -0.312047255608330, 0.528369376820133, -1.20335199285186, 5.07406470297626, 22.4999999999976};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 10; ++j) {
                         for (int i = 0; i < 10; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,10);
@@ -394,8 +410,8 @@ void Rectangle::gradient_order9(escript::Data& out, const escript::Data& in) con
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 10; ++j) {
                     for (int i = 0; i < 10; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -409,30 +425,32 @@ void Rectangle::gradient_order9(escript::Data& out, const escript::Data& in) con
     }
 }
 
+template<typename Scalar>
 void Rectangle::gradient_order10(escript::Data& out, const escript::Data& in) const {
-    const double lagrange_deriv_0[11] = {-27.4999999999896, -6.17098569730879, 1.44617248279108, -0.622725214738251, 0.357476373116252, -0.246093749999837, 0.194287668796289, -0.172970108511720, 0.174657862947473, -0.210587346312973, 0.500000000000200};
-    const double lagrange_deriv_1[11] = {37.2028673819635, -1.45093936865237e-11, -5.11821182477732, 1.80264679987985, -0.968487138802308, 0.646939963832195, -0.502643313012917, 0.443395636437341, -0.445313527290911, 0.535331085929629, -1.26956267628665};
-    const double lagrange_deriv_2[11] = {-14.8873962951139, 8.73967005352577, 4.30699920173083e-12, -3.96199657704633, 1.65273663422738, -1.00650540857701, 0.747734824688410, -0.643586209360019, 0.637362056418227, -0.760400982244270, 1.79798803579712};
-    const double lagrange_deriv_3[11] = {8.49561949463899, -4.07931619371279, 5.25066175545241, -4.06341627012807e-13, -3.45061471617355, 1.60812790372552, -1.07998725049569, 0.884587314556481, -0.852916813558380, 1.00338624297419, -2.35976991309107};
-    const double lagrange_deriv_4[11] = {-5.64038799768972, 2.53474117868649, -2.53318340860873, 3.99079578802906, 9.19264664389630e-14, -3.30517685337838, 1.69057057046883, -1.24905529156928, 1.14606853428002, -1.31552671443958, 3.06553920088515};
-    const double lagrange_deriv_5[11] = {4.06349206349476, -1.77190705526895, 1.61441910793459, -1.94634945457108, 3.45885134807703, 3.86357612569554e-14, -3.45885134807708, 1.94634945457117, -1.61441910793481, 1.77190705526946, -4.06349206349634};
-    const double lagrange_deriv_6[11] = {-3.06553920088389, 1.31552671443917, -1.14606853427984, 1.24905529156920, -1.69057057046877, 3.30517685337831, -4.28546087505310e-14, -3.99079578802918, 2.53318340860904, -2.53474117868717, 5.64038799769177};
-    const double lagrange_deriv_7[11] = {2.35976991309003, -1.00338624297385, 0.852916813558223, -0.884587314556402, 1.07998725049562, -1.60812790372545, 3.45061471617347, 5.73430192218893e-13, -5.25066175545293, 4.07931619371373, -8.49561949464169};
-    const double lagrange_deriv_8[11] = {-1.79798803579616, 0.760400982243941, -0.637362056418051, 0.643586209359903, -0.747734824688294, 1.00650540857687, -1.65273663422718, 3.96199657704598, -3.31623617455534e-12, -8.73967005352657, 14.8873962951164};
-    const double lagrange_deriv_9[11] = {1.26956267628575, -0.535331085929307, 0.445313527290713, -0.443395636437185, 0.502643313012754, -0.646939963831994, 0.968487138802021, -1.80264679987934, 5.11821182477613, 1.64738223062955e-11, -37.2028673819613};
-    const double lagrange_deriv_10[11] = {-0.499999999999790, 0.210587346312823, -0.174657862947375, 0.172970108511639, -0.194287668796203, 0.246093749999731, -0.357476373116102, 0.622725214737994, -1.44617248279054, 6.17098569730708, 27.4999999999864};
-    const double inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
+    const real_t lagrange_deriv_0[11] = {-27.4999999999896, -6.17098569730879, 1.44617248279108, -0.622725214738251, 0.357476373116252, -0.246093749999837, 0.194287668796289, -0.172970108511720, 0.174657862947473, -0.210587346312973, 0.500000000000200};
+    const real_t lagrange_deriv_1[11] = {37.2028673819635, -1.45093936865237e-11, -5.11821182477732, 1.80264679987985, -0.968487138802308, 0.646939963832195, -0.502643313012917, 0.443395636437341, -0.445313527290911, 0.535331085929629, -1.26956267628665};
+    const real_t lagrange_deriv_2[11] = {-14.8873962951139, 8.73967005352577, 4.30699920173083e-12, -3.96199657704633, 1.65273663422738, -1.00650540857701, 0.747734824688410, -0.643586209360019, 0.637362056418227, -0.760400982244270, 1.79798803579712};
+    const real_t lagrange_deriv_3[11] = {8.49561949463899, -4.07931619371279, 5.25066175545241, -4.06341627012807e-13, -3.45061471617355, 1.60812790372552, -1.07998725049569, 0.884587314556481, -0.852916813558380, 1.00338624297419, -2.35976991309107};
+    const real_t lagrange_deriv_4[11] = {-5.64038799768972, 2.53474117868649, -2.53318340860873, 3.99079578802906, 9.19264664389630e-14, -3.30517685337838, 1.69057057046883, -1.24905529156928, 1.14606853428002, -1.31552671443958, 3.06553920088515};
+    const real_t lagrange_deriv_5[11] = {4.06349206349476, -1.77190705526895, 1.61441910793459, -1.94634945457108, 3.45885134807703, 3.86357612569554e-14, -3.45885134807708, 1.94634945457117, -1.61441910793481, 1.77190705526946, -4.06349206349634};
+    const real_t lagrange_deriv_6[11] = {-3.06553920088389, 1.31552671443917, -1.14606853427984, 1.24905529156920, -1.69057057046877, 3.30517685337831, -4.28546087505310e-14, -3.99079578802918, 2.53318340860904, -2.53474117868717, 5.64038799769177};
+    const real_t lagrange_deriv_7[11] = {2.35976991309003, -1.00338624297385, 0.852916813558223, -0.884587314556402, 1.07998725049562, -1.60812790372545, 3.45061471617347, 5.73430192218893e-13, -5.25066175545293, 4.07931619371373, -8.49561949464169};
+    const real_t lagrange_deriv_8[11] = {-1.79798803579616, 0.760400982243941, -0.637362056418051, 0.643586209359903, -0.747734824688294, 1.00650540857687, -1.65273663422718, 3.96199657704598, -3.31623617455534e-12, -8.73967005352657, 14.8873962951164};
+    const real_t lagrange_deriv_9[11] = {1.26956267628575, -0.535331085929307, 0.445313527290713, -0.443395636437185, 0.502643313012754, -0.646939963831994, 0.968487138802021, -1.80264679987934, 5.11821182477613, 1.64738223062955e-11, -37.2028673819613};
+    const real_t lagrange_deriv_10[11] = {-0.499999999999790, 0.210587346312823, -0.174657862947375, 0.172970108511639, -0.194287668796203, 0.246093749999731, -0.357476373116102, 0.622725214737994, -1.44617248279054, 6.17098569730708, 27.4999999999864};
+    const real_t inv_jac[2] = {2/m_dx[0], 2/m_dx[1]}; //inverse jacobi
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
     if (!in.actsExpanded()) {
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int comp = 0; comp < numComp; ++comp) {
-                    const double a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[0];
-                    const double b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[1];
+                    const Scalar a = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[0];
+                    const Scalar b = (lagrange_deriv_0[0] * e[comp] + lagrange_deriv_1[0] * e[comp] + lagrange_deriv_2[0] * e[comp] + lagrange_deriv_3[0] * e[comp] + lagrange_deriv_4[0] * e[comp] + lagrange_deriv_5[0] * e[comp] + lagrange_deriv_6[0] * e[comp] + lagrange_deriv_7[0] * e[comp] + lagrange_deriv_8[0] * e[comp] + lagrange_deriv_9[0] * e[comp] + lagrange_deriv_10[0] * e[comp]) * inv_jac[1];
                     for (int j = 0; j < 11; ++j) {
                         for (int i = 0; i < 11; ++i) {
                             const index_t ind = INDEX4(0,comp,i,j,2,numComp,11);
@@ -447,8 +465,8 @@ void Rectangle::gradient_order10(escript::Data& out, const escript::Data& in) co
 #pragma omp parallel for
         for (int ei = 0; ei < m_NE[1]; ++ei) {
             for (int ej = 0; ej < m_NE[0]; ++ej) {
-                const double *e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-                double *grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+                const Scalar* e = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+                Scalar* grad = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
                 for (int j = 0; j < 11; ++j) {
                     for (int i = 0; i < 11; ++i) {
                         for (int comp = 0; comp < numComp; ++comp) {
@@ -462,4 +480,62 @@ void Rectangle::gradient_order10(escript::Data& out, const escript::Data& in) co
     }
 }
 
-}
+// instantiate
+template
+void Rectangle::gradient_order2<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order2<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order3<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order3<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order4<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order4<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order5<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order5<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order6<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order6<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order7<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order7<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order8<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order8<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order9<real_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order9<cplx_t>(escript::Data& out,
+                                        const escript::Data& in) const;
+template
+void Rectangle::gradient_order10<real_t>(escript::Data& out,
+                                         const escript::Data& in) const;
+template
+void Rectangle::gradient_order10<cplx_t>(escript::Data& out,
+                                         const escript::Data& in) const;
+
+
+} // namespace speckley
+
diff --git a/speckley/src/RectangleIntegrals.cpp b/speckley/src/RectangleIntegrals.cpp
index f9ce01c..5ba6889 100644
--- a/speckley/src/RectangleIntegrals.cpp
+++ b/speckley/src/RectangleIntegrals.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,15 +20,17 @@
 
 namespace speckley {
 
-void Rectangle::integral_order2(std::vector<double>& integrals, const escript::Data& arg) const
+template<typename Scalar>
+void Rectangle::integral_order2(std::vector<Scalar>& integrals, const escript::Data& arg) const
 {
     const double weights[] = {0.333333333333, 1.33333333333, 0.333333333333};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 3; ++i) {
                     for (int j = 0; j < 3; ++j) {
@@ -44,14 +46,16 @@ void Rectangle::integral_order2(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order3(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order3(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.166666666667, 0.833333333333, 0.833333333333, 0.166666666667};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 4; ++i) {
                     for (int j = 0; j < 4; ++j) {
@@ -67,14 +71,16 @@ void Rectangle::integral_order3(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order4(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order4(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.1, 0.544444444444, 0.711111111111, 0.544444444444, 0.1};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 5; ++i) {
                     for (int j = 0; j < 5; ++j) {
@@ -90,14 +96,16 @@ void Rectangle::integral_order4(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order5(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order5(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0666666666667, 0.378474956298, 0.554858377035, 0.554858377035, 0.378474956298, 0.0666666666667};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 6; ++i) {
                     for (int j = 0; j < 6; ++j) {
@@ -113,14 +121,16 @@ void Rectangle::integral_order5(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order6(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order6(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.047619047619, 0.276826047362, 0.43174538121, 0.487619047619, 0.43174538121, 0.276826047362, 0.047619047619};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 7; ++i) {
                     for (int j = 0; j < 7; ++j) {
@@ -136,14 +146,16 @@ void Rectangle::integral_order6(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order7(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order7(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0357142857143, 0.210704227144, 0.341122692484, 0.412458794659, 0.412458794659, 0.341122692484, 0.210704227144, 0.0357142857143};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 8; ++i) {
                     for (int j = 0; j < 8; ++j) {
@@ -159,14 +171,16 @@ void Rectangle::integral_order7(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order8(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order8(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0277777777778, 0.165495361561, 0.2745387125, 0.346428510973, 0.371519274376, 0.346428510973, 0.2745387125, 0.165495361561, 0.0277777777778};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 9; ++i) {
                     for (int j = 0; j < 9; ++j) {
@@ -182,14 +196,16 @@ void Rectangle::integral_order8(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order9(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order9(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0222222222222, 0.133305990851, 0.224889342063, 0.29204268368, 0.327539761184, 0.327539761184, 0.29204268368, 0.224889342063, 0.133305990851, 0.0222222222222};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 10; ++i) {
                     for (int j = 0; j < 10; ++j) {
@@ -205,14 +221,16 @@ void Rectangle::integral_order9(std::vector<double>& integrals, const escript::D
     }
 }
 
-void Rectangle::integral_order10(std::vector<double>& integrals, const escript::Data& arg) const {
+template<typename Scalar>
+void Rectangle::integral_order10(std::vector<Scalar>& integrals, const escript::Data& arg) const {
     const double weights[] = {0.0181818181818, 0.109612273267, 0.18716988178, 0.248048104264, 0.286879124779, 0.300217595456, 0.286879124779, 0.248048104264, 0.18716988178, 0.109612273267, 0.0181818181818};
     const int numComp = arg.getDataPointSize();
     const double volume_product = 0.25*m_dx[0]*m_dx[1];
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double result = 0;
+            const Scalar* e = arg.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar result = zero;
             for (int comp = 0; comp < numComp; ++comp) {
                 for (int i = 0; i < 11; ++i) {
                     for (int j = 0; j < 11; ++j) {
@@ -228,4 +246,61 @@ void Rectangle::integral_order10(std::vector<double>& integrals, const escript::
     }
 }
 
-}
+// instantiate
+template
+void Rectangle::integral_order2<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order2<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order3<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order3<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order4<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order4<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order5<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order5<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order6<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order6<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order7<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order7<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order8<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order8<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order9<real_t>(std::vector<real_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order9<cplx_t>(std::vector<cplx_t>& integrals,
+                                        const escript::Data& arg) const;
+template
+void Rectangle::integral_order10<real_t>(std::vector<real_t>& integrals,
+                                         const escript::Data& arg) const;
+template
+void Rectangle::integral_order10<cplx_t>(std::vector<cplx_t>& integrals,
+                                         const escript::Data& arg) const;
+
+} // namespace speckley
+
diff --git a/speckley/src/RectangleReductions.cpp b/speckley/src/RectangleReductions.cpp
index 993d28e..9c45672 100644
--- a/speckley/src/RectangleReductions.cpp
+++ b/speckley/src/RectangleReductions.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,16 +20,18 @@
 
 namespace speckley {
 
+template<typename Scalar>
 void Rectangle::reduction_order2(const escript::Data& in, escript::Data& out) const
 {
     const double weights[] = {0.333333333333, 1.33333333333, 0.333333333333};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 3; ++i) {
                     for (int j = 0; j < 3; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,3)];
@@ -41,15 +43,17 @@ void Rectangle::reduction_order2(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order3(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.166666666667, 0.833333333333, 0.833333333333, 0.166666666667};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 4; ++i) {
                     for (int j = 0; j < 4; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,4)];
@@ -61,15 +65,17 @@ void Rectangle::reduction_order3(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order4(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.1, 0.544444444444, 0.711111111111, 0.544444444444, 0.1};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 5; ++i) {
                     for (int j = 0; j < 5; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,5)];
@@ -81,15 +87,17 @@ void Rectangle::reduction_order4(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order5(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0666666666667, 0.378474956298, 0.554858377035, 0.554858377035, 0.378474956298, 0.0666666666667};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 6; ++i) {
                     for (int j = 0; j < 6; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,6)];
@@ -101,15 +109,17 @@ void Rectangle::reduction_order5(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order6(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.047619047619, 0.276826047362, 0.43174538121, 0.487619047619, 0.43174538121, 0.276826047362, 0.047619047619};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 7; ++i) {
                     for (int j = 0; j < 7; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,7)];
@@ -121,15 +131,17 @@ void Rectangle::reduction_order6(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order7(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0357142857143, 0.210704227144, 0.341122692484, 0.412458794659, 0.412458794659, 0.341122692484, 0.210704227144, 0.0357142857143};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 8; ++i) {
                     for (int j = 0; j < 8; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,8)];
@@ -141,15 +153,17 @@ void Rectangle::reduction_order7(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order8(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0277777777778, 0.165495361561, 0.2745387125, 0.346428510973, 0.371519274376, 0.346428510973, 0.2745387125, 0.165495361561, 0.0277777777778};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 9; ++i) {
                     for (int j = 0; j < 9; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,9)];
@@ -161,15 +175,17 @@ void Rectangle::reduction_order8(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order9(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0222222222222, 0.133305990851, 0.224889342063, 0.29204268368, 0.327539761184, 0.327539761184, 0.29204268368, 0.224889342063, 0.133305990851, 0.0222222222222};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 10; ++i) {
                     for (int j = 0; j < 10; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,10)];
@@ -181,15 +197,17 @@ void Rectangle::reduction_order9(const escript::Data& in, escript::Data& out) co
     }
 }
 
+template<typename Scalar>
 void Rectangle::reduction_order10(const escript::Data& in, escript::Data& out) const {
     const double weights[] = {0.0181818181818, 0.109612273267, 0.18716988178, 0.248048104264, 0.286879124779, 0.300217595456, 0.286879124779, 0.248048104264, 0.18716988178, 0.109612273267, 0.0181818181818};
     const int numComp = in.getDataPointSize();
+    const Scalar zero = static_cast<Scalar>(0);
     for (int ei = 0; ei < m_NE[1]; ++ei) {
         for (int ej = 0; ej < m_NE[0]; ++ej) {
-            const double *e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]));
-            double *e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]));
+            const Scalar* e_in = in.getSampleDataRO(INDEX2(ej,ei,m_NE[0]), zero);
+            Scalar* e_out = out.getSampleDataRW(INDEX2(ej,ei,m_NE[0]), zero);
             for (int comp = 0; comp < numComp; ++comp) {
-                double result = 0;
+                Scalar result = zero;
                 for (int i = 0; i < 11; ++i) {
                     for (int j = 0; j < 11; ++j) {
                         result += weights[i] * weights[j] * e_in[INDEX3(comp,j,i,numComp,11)];
@@ -201,4 +219,44 @@ void Rectangle::reduction_order10(const escript::Data& in, escript::Data& out) c
     }
 }
 
-}
+// instantiate
+template
+void Rectangle::reduction_order2<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order2<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order3<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order3<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order4<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order4<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order5<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order5<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order6<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order6<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order7<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order7<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order8<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order8<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order9<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order9<cplx_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order10<real_t>(const escript::Data& in, escript::Data& out) const;
+template
+void Rectangle::reduction_order10<cplx_t>(const escript::Data& in, escript::Data& out) const;
+
+
+} // namespace speckley
+
diff --git a/speckley/src/SConscript b/speckley/src/SConscript
index 28740a3..c0f4542 100644
--- a/speckley/src/SConscript
+++ b/speckley/src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/speckley/src/Speckley.h b/speckley/src/Speckley.h
index 771b69c..e44a33f 100644
--- a/speckley/src/Speckley.h
+++ b/speckley/src/Speckley.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -37,6 +37,7 @@ namespace speckley {
 using escript::DataTypes::dim_t;
 using escript::DataTypes::index_t;
 using escript::DataTypes::real_t;
+using escript::DataTypes::cplx_t;
 
 typedef std::pair<index_t,index_t> IndexPair;
 typedef std::vector<index_t> IndexVector;
diff --git a/speckley/src/SpeckleyDomain.cpp b/speckley/src/SpeckleyDomain.cpp
index f361687..cce6bc0 100644
--- a/speckley/src/SpeckleyDomain.cpp
+++ b/speckley/src/SpeckleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -24,11 +24,11 @@
 #include <iomanip>
 #include <iostream>
 
-namespace bp = boost::python;
+namespace speckley {
 
+namespace bp = boost::python;
 using namespace std;
-
-namespace speckley {
+using escript::ValueError;
 
 void tupleListToMap(DataMap& mapping, const bp::list& list)
 {
@@ -307,8 +307,10 @@ void SpeckleyDomain::interpolateOnDomain(escript::Data& target,
     const SpeckleyDomain& targetDomain=dynamic_cast<const SpeckleyDomain&>(*(target.getFunctionSpace().getDomain()));
     if (inDomain != *this)
         throw SpeckleyException("Illegal domain of interpolant");
-    if (targetDomain != *this)
+    else if (targetDomain != *this)
         throw SpeckleyException("Illegal domain of interpolation target");
+    else if (in.isComplex() != target.isComplex())
+        throw ValueError("interpolateOnDomain: complexity of input and output data must match.");
 
     stringstream msg;
     msg << "interpolateOnDomain() not implemented for function space "
@@ -322,11 +324,17 @@ void SpeckleyDomain::interpolateOnDomain(escript::Data& target,
     target.requireWrite();
     // simplest case: 1:1 copy
     if (inFS==outFS) {
-        copyData(target, in);
+        if (in.isComplex())
+            copyData<cplx_t>(target, in);
+        else
+            copyData<real_t>(target, in);
     } else if ((inFS==Elements || inFS==ReducedElements) && outFS==Nodes) {
         interpolateElementsOnNodes(target, in);
     } else if (inFS==ReducedElements && outFS==Elements) {
-        multiplyData(target, in);
+        if (in.isComplex())
+            multiplyData<cplx_t>(target, in);
+        else
+            multiplyData<real_t>(target, in);
     } else if (inFS==Elements && outFS==ReducedElements) {
         reduceElements(target, in);
     } else {
@@ -335,7 +343,10 @@ void SpeckleyDomain::interpolateOnDomain(escript::Data& target,
                 switch (outFS) {
                     case DegreesOfFreedom:
                     case Nodes:
-                        copyData(target, in);
+                        if (in.isComplex())
+                            copyData<cplx_t>(target, in);
+                        else
+                            copyData<real_t>(target, in);
                         break;
                     case Elements:
                         interpolateNodesOnElements(target, in, false);
@@ -364,7 +375,10 @@ void SpeckleyDomain::interpolateOnDomain(escript::Data& target,
                 switch (outFS) {
                     case Nodes:
                     case DegreesOfFreedom:
-                        copyData(target, in);
+                        if (in.isComplex())
+                            copyData<cplx_t>(target, in);
+                        else
+                            copyData<real_t>(target, in);
                         break;
 
                     case Elements:
@@ -471,6 +485,9 @@ void SpeckleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg
         }
     }
 
+    if (grad.isComplex() != arg.isComplex())
+        throw SpeckleyException("setToGradient: complexity of input and output must match");
+
     if (getMPISize() > 1) {
         if (arg.getFunctionSpace().getTypeCode()==DegreesOfFreedom) {
             escript::Data contArg(arg, escript::continuousFunction(*this));
@@ -483,7 +500,21 @@ void SpeckleyDomain::setToGradient(escript::Data& grad, const escript::Data& arg
     }
 }
 
-void SpeckleyDomain::setToIntegrals(vector<double>& integrals, const escript::Data& arg) const
+void SpeckleyDomain::setToIntegrals(vector<real_t>& integrals,
+                                    const escript::Data& arg) const
+{
+    setToIntegralsWorker<real_t>(integrals, arg);
+}
+
+void SpeckleyDomain::setToIntegrals(vector<cplx_t>& integrals,
+                                    const escript::Data& arg) const
+{
+    setToIntegralsWorker<cplx_t>(integrals, arg);
+}
+
+template<typename Scalar>
+void SpeckleyDomain::setToIntegralsWorker(vector<Scalar>& integrals,
+                                          const escript::Data& arg) const
 {
     const SpeckleyDomain& argDomain=dynamic_cast<const SpeckleyDomain&>(
             *(arg.getFunctionSpace().getDomain()));
@@ -759,29 +790,33 @@ void SpeckleyDomain::setNewX(const escript::Data& arg)
 }
 
 //protected
+template<typename Scalar>
 void SpeckleyDomain::copyData(escript::Data& out, const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t numSamples = in.getNumSamples();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
 #pragma omp parallel for
-    for (index_t i=0; i<numSamples; i++) {
-        const double* src = in.getSampleDataRO(i);
-        copy(src, src+numComp, out.getSampleDataRW(i));
+    for (index_t i = 0; i < numSamples; i++) {
+        const Scalar* src = in.getSampleDataRO(i, zero);
+        copy(src, src+numComp, out.getSampleDataRW(i, zero));
     }
 }
 
 //protected
+template<typename Scalar>
 void SpeckleyDomain::multiplyData(escript::Data& out, const escript::Data& in) const
 {
     const dim_t numComp = in.getDataPointSize();
     const dim_t dpp = out.getNumDataPointsPerSample();
     const dim_t numSamples = in.getNumSamples();
+    const Scalar zero = static_cast<Scalar>(0);
     out.requireWrite();
 #pragma omp parallel for
     for (index_t i=0; i<numSamples; i++) {
-        const double* src = in.getSampleDataRO(i);
-        double* dest = out.getSampleDataRW(i);
+        const Scalar* src = in.getSampleDataRO(i, zero);
+        Scalar* dest = out.getSampleDataRW(i, zero);
         for (index_t c=0; c<numComp; c++) {
             for (index_t q=0; q<dpp; q++)
                 dest[c+q*numComp] = src[c];
diff --git a/speckley/src/SpeckleyDomain.h b/speckley/src/SpeckleyDomain.h
index 88d2643..c91b80e 100644
--- a/speckley/src/SpeckleyDomain.h
+++ b/speckley/src/SpeckleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -489,7 +489,10 @@ public:
        copies the integrals of the function defined by arg into integrals.
        arg has to be defined on this domain.
     */
-    virtual void setToIntegrals(DoubleVector& integrals, const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<real_t>& integrals,
+                                const escript::Data& arg) const;
+    virtual void setToIntegrals(std::vector<cplx_t>& integrals,
+                                const escript::Data& arg) const;
 
 
     /**
@@ -738,6 +741,7 @@ protected:
     int m_order;
     
     /// copies data in 'in' to 'out' (both must be on same function space)
+    template<typename Scalar>
     void copyData(escript::Data& out, const escript::Data& in) const;
 
     // this is const because setTags is const
@@ -751,6 +755,7 @@ protected:
                    const std::vector<int>& tags);
 
     /// expands ReducedFunction (in) to Function (out)
+    template<typename Scalar>
     void multiplyData(escript::Data& out, const escript::Data& in) const;
 
     /***********************************************************************/
@@ -772,7 +777,9 @@ protected:
             const escript::Data& in) const = 0;
 
     /// copies the integrals of the function defined by 'arg' into 'integrals'
-    virtual void assembleIntegrate(DoubleVector& integrals,
+    virtual void assembleIntegrate(std::vector<real_t>& integrals,
+            const escript::Data& arg) const = 0;
+    virtual void assembleIntegrate(std::vector<cplx_t>& integrals,
             const escript::Data& arg) const = 0;
 
     /// interpolates data on nodes in 'in' onto elements in 'out'
@@ -809,6 +816,10 @@ private:
                           escript::Data& rhs, const DataMap& coefs,
                           Assembler_ptr assembler) const;
 
+    template<typename Scalar>
+    void setToIntegralsWorker(std::vector<Scalar>& integrals,
+                              const escript::Data& arg) const;
+
     /// finds the node that the given point coordinates belong to
     virtual dim_t findNode(const double *coords) const = 0;
 };
diff --git a/speckley/src/SpeckleyException.h b/speckley/src/SpeckleyException.h
index b31f974..89d94c1 100644
--- a/speckley/src/SpeckleyException.h
+++ b/speckley/src/SpeckleyException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/WaveAssembler2D.cpp b/speckley/src/WaveAssembler2D.cpp
index ac182cd..1ed3fdd 100644
--- a/speckley/src/WaveAssembler2D.cpp
+++ b/speckley/src/WaveAssembler2D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/WaveAssembler2D.h b/speckley/src/WaveAssembler2D.h
index 34341b7..fea37f8 100644
--- a/speckley/src/WaveAssembler2D.h
+++ b/speckley/src/WaveAssembler2D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/WaveAssembler3D.cpp b/speckley/src/WaveAssembler3D.cpp
index 563855f..25136f6 100644
--- a/speckley/src/WaveAssembler3D.cpp
+++ b/speckley/src/WaveAssembler3D.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/WaveAssembler3D.h b/speckley/src/WaveAssembler3D.h
index 0194486..2b57e16 100644
--- a/speckley/src/WaveAssembler3D.h
+++ b/speckley/src/WaveAssembler3D.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/domainhelpers.cpp b/speckley/src/domainhelpers.cpp
index 58ac278..b6154b7 100644
--- a/speckley/src/domainhelpers.cpp
+++ b/speckley/src/domainhelpers.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/domainhelpers.h b/speckley/src/domainhelpers.h
index 762498d..26aad49 100644
--- a/speckley/src/domainhelpers.h
+++ b/speckley/src/domainhelpers.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/lagrange_functions.h b/speckley/src/lagrange_functions.h
index c665150..aeedeab 100644
--- a/speckley/src/lagrange_functions.h
+++ b/speckley/src/lagrange_functions.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/speckleycpp.cpp b/speckley/src/speckleycpp.cpp
index fe47bb3..d9d8a6e 100644
--- a/speckley/src/speckleycpp.cpp
+++ b/speckley/src/speckleycpp.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/src/system_dep.h b/speckley/src/system_dep.h
index 425bba4..5bc4e2a 100644
--- a/speckley/src/system_dep.h
+++ b/speckley/src/system_dep.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/speckley/test/SConscript b/speckley/test/SConscript
index cea8c7b..7baa3a5 100644
--- a/speckley/test/SConscript
+++ b/speckley/test/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/speckley/test/python/SConscript b/speckley/test/python/SConscript
index a4eca82..69f32d0 100644
--- a/speckley/test/python/SConscript
+++ b/speckley/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/speckley/test/python/run_SpeckleyRipleyCoupler.py b/speckley/test/python/run_SpeckleyRipleyCoupler.py
index 17c501e..cd19359 100644
--- a/speckley/test/python/run_SpeckleyRipleyCoupler.py
+++ b/speckley/test/python/run_SpeckleyRipleyCoupler.py
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -14,7 +14,7 @@
 ##############################################################################
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/speckley/test/python/run_customAssemblersOnSpeckley.py b/speckley/test/python/run_customAssemblersOnSpeckley.py
index cfe7ab8..a02d456 100644
--- a/speckley/test/python/run_customAssemblersOnSpeckley.py
+++ b/speckley/test/python/run_customAssemblersOnSpeckley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/speckley/test/python/run_diracOnSpeckley.py b/speckley/test/python/run_diracOnSpeckley.py
index c1df889..e4e88be 100644
--- a/speckley/test/python/run_diracOnSpeckley.py
+++ b/speckley/test/python/run_diracOnSpeckley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/speckley/test/python/run_readWriteOnSpeckley.py b/speckley/test/python/run_readWriteOnSpeckley.py
index a4825db..fecf929 100644
--- a/speckley/test/python/run_readWriteOnSpeckley.py
+++ b/speckley/test/python/run_readWriteOnSpeckley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/speckley/test/python/run_specialOnSpeckley.py b/speckley/test/python/run_specialOnSpeckley.py
index f267d83..89ca4b3 100644
--- a/speckley/test/python/run_specialOnSpeckley.py
+++ b/speckley/test/python/run_specialOnSpeckley.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import division, print_function
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/svn_version b/svn_version
index 5d5ee38..ce5e96c 100644
--- a/svn_version
+++ b/svn_version
@@ -1 +1 @@
-6403
+6608
diff --git a/tools/escriptconvert/SConscript b/tools/escriptconvert/SConscript
index ea3a74b..8b9cb01 100644
--- a/tools/escriptconvert/SConscript
+++ b/tools/escriptconvert/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/tools/escriptconvert/escriptconvert.cpp b/tools/escriptconvert/escriptconvert.cpp
index 80d3806..1646f3a 100644
--- a/tools/escriptconvert/escriptconvert.cpp
+++ b/tools/escriptconvert/escriptconvert.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/tools/escriptconvert/esdcreate.cpp b/tools/escriptconvert/esdcreate.cpp
index 77c9a4a..1b54120 100644
--- a/tools/escriptconvert/esdcreate.cpp
+++ b/tools/escriptconvert/esdcreate.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/tools/netcdf.cc b/tools/netcdf.cc
new file mode 100644
index 0000000..a8fd250
--- /dev/null
+++ b/tools/netcdf.cc
@@ -0,0 +1,715 @@
+
+/*****************************************************************************
+*
+* Copyright (c) 2017 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)
+*
+*****************************************************************************/
+
+
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <list>
+#include <vector>
+#include <boost/lexical_cast.hpp>
+
+/* From http://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications.html
+The grammar for the header is:
+
+header       = magic  numrecs  dim_list  gatt_list  var_list
+= CDF? followed by 4 bytes(which we don't care about)
+We can just search for the relevant tags:
+
+
+*/
+
+union esV
+{
+    unsigned char b;
+    short s;
+    int i;
+    float f;
+    double d;
+};
+
+
+class esncdfValues
+{
+public:
+    char type;
+    std::string svalue;
+    std::vector<union esV> vec;  
+};
+
+namespace
+{
+    char NC_DIM_TAG=10;
+    char NC_VAR_TAG=11;
+    char NC_ATT_TAG=12;
+    
+    
+    
+    enum nc_type
+    {
+      NC_BYTE=1,
+      NC_CHAR=2,
+      NC_SHORT=3,
+      NC_INT=4,
+      NC_FLOAT=5,
+      NC_DOUBLE=6
+    };
+    
+    int offset;
+    
+char getChar(std::ifstream& ifs)
+{
+    offset++;
+    return ifs.get(); 
+}
+
+
+
+
+typedef std::vector<std::pair<std::string, esncdfValues> >  vsu; 
+
+}
+
+
+using namespace std;
+using namespace boost;
+
+
+
+
+
+
+
+
+// Holds a list of name value pairs
+class esncdfCollection
+{
+public:
+    void add(const std::string& k, const esncdfValues& v)
+    {
+        vec.push_back(std::pair<std::string, esncdfValues>(k,v));
+    }
+    void add_int(const std::string& k, int i)
+    {
+	esncdfValues v;
+	v.type=NC_INT;
+	union esV es;
+	es.i=i;
+	v.vec.push_back(es);
+        vec.push_back(std::pair<std::string, esncdfValues>(k,v));
+    }
+    
+/*    void add(const std::string& k, const std::string& s)
+    {
+	esncdfValues u;
+	u.type=NC_CHAR;
+	u.svalue=s;
+        vec.push_back(std::pair<std::string, esncdfValues>(k,u));
+    }  */  
+    vsu vec;
+    // Here would be extra information regarding variables
+    std::string name;       
+    std::string type;
+};
+
+
+class esncdfVariables
+{
+public:    
+    std::vector<esncdfCollection> vars;    
+    void add(const esncdfCollection& c)
+    {
+        vars.push_back(c);
+    }
+};
+
+
+class esncdfHeader
+{
+public:    
+    esncdfCollection dimensions;
+    esncdfCollection attributes;     // global attributes
+    esncdfVariables variables;       // including specific attributes
+};
+
+
+bool read_list(std::ifstream& ifs, char t, bool offset32, esncdfCollection& coll);
+
+
+bool gobble(ifstream& ifs, int s)
+{
+    for (int i=0;i<s;++i)
+    {
+        getChar(ifs);
+    }
+    return ifs.good();
+}
+
+
+bool read_int(std::ifstream& ifs, int& res)
+{
+    char buff32[4];
+    for (int i=0;i<4;++i)
+    {
+        buff32[i]=getChar(ifs);
+    }
+    if (!ifs)
+    {
+        return false;
+    }
+    res=0;
+    for (int i=0;i<4;++i)
+    {
+        res=(res << 8);
+        res+=(unsigned char)buff32[i];
+    }
+    return true;
+}
+
+bool read_item_header(std::ifstream& ifs, std::string& iname)
+{
+    // format for name is 32 bit length followed by chars (padded to 4byte boundary)
+    int len=0;
+    if (!read_int(ifs,len))
+    {
+        return false;
+    }
+    for (int i=0;i<len;++i)
+    {
+        char c=getChar(ifs);
+        if (c!=0)       // if anyone puts \x00 in their string
+        {               // ...
+            iname+=c;
+        }
+    }
+    // now we need to skip padding
+    if (len%4!=0)
+    {
+	for (int i=0;i<4-len%4;++i)
+	{
+	    char c=getChar(ifs);
+	}
+    }
+    if (!ifs)
+    {
+        return false;
+    }
+    return true;    
+}
+
+bool read_item_dim(std::ifstream& ifs, std::string& iname, esncdfCollection& dims)
+{
+    if (!read_item_header(ifs, iname))
+    {
+        return false;
+    }
+    int len=0;
+    if (!read_int(ifs, len))
+    {
+        return false;
+    }
+    dims.add_int(iname, len);
+    return true;
+}
+
+bool read_tag(std::ifstream& ifs, char& t)
+{
+    for (int i=0;i<3;++i)
+    {
+        t=getChar(ifs); 
+	if (t!=0)
+	{
+	    return false;
+	}
+    }
+    t=getChar(ifs);
+    return ifs.good();  
+}
+
+esncdfValues get_string_value(char tag, int len, char* bytes)
+{
+    esncdfValues res;
+    res.type=tag;
+    switch (tag)
+    {
+        case NC_CHAR:  res.svalue=std::string(bytes); break;
+        case NC_BYTE:
+	{
+	    union esV e;
+            for (int i=0;i<len;++i)
+            {
+		e.b=bytes[i];
+		res.vec.push_back(e);
+            }
+            break;
+	}
+        case NC_SHORT:
+        {
+	    union esV e;
+	    for (int i=0;i<len;++i)
+	    {
+		short v=(bytes[0] << 8)+bytes[1];
+	        e.s=v;
+		res.vec.push_back(e);
+	    }
+            break;
+        }
+        case NC_INT:
+        {
+	    union esV e;
+	    for (int i=0;i<len;++i)
+	    {
+		int v=(bytes[0] << 24) +(bytes[1] << 16) + (bytes[2] << 8) +bytes[3];	      
+	        e.i=v;
+		res.vec.push_back(e);
+	    }
+            break;
+        }
+        case NC_FLOAT:      // here we assume the correct floating point std
+        {
+	    union esV e;
+	    float f=-0.0;
+	    if (reinterpret_cast<unsigned char*>(&f)[0]!=0)	// big endian (yes we assume IEEE floating point
+	    {
+		for (int i=0;i<len;++i)
+		{
+		    float f=0;		// assumes floats are 32bit!
+		    unsigned char* v=reinterpret_cast<unsigned char*>(&f);
+		    for (int j=0;j<4;++j)
+		    {
+			v[j]=bytes[4*i+j];
+		    }
+		    e.f=f;
+		    res.vec.push_back(e);
+		}
+	    }
+	    else
+	    {
+		for (int i=0;i<len;++i)
+		{
+		    float f=0;		// assumes floats are 32bit!
+		    unsigned char* v=reinterpret_cast<unsigned char*>(&f);
+		    for (int j=0;j<4;++j)
+		    {
+			v[j]=bytes[4*i+3-j];
+		    }
+		    e.f=f;
+		    res.vec.push_back(e);
+		}
+	    }
+	    break;
+        }
+        case NC_DOUBLE:
+        {
+	    union esV e;
+	    double f=-0.0;
+	    if (reinterpret_cast<unsigned char*>(&f)[0]!=0)	// big endian (yes we assume IEEE floating point
+	    {
+		for (int i=0;i<len;++i)
+		{
+		    double f=0;
+		    unsigned char* v=reinterpret_cast<unsigned char*>(&f);
+		    for (int j=0;j<8;++j)
+		    {
+			v[j]=bytes[8*i+j];
+		    }
+		    e.d=f;
+		    res.vec.push_back(e);
+		}
+	    }
+	    else
+	    {
+		for (int i=0;i<len;++i)
+		{
+		    double f=0;
+		    unsigned char* v=reinterpret_cast<unsigned char*>(&f);
+		    for (int j=0;j<8;++j)
+		    {
+			v[j]=bytes[8*i+7-j];
+		    }
+		    e.d=f;
+		    res.vec.push_back(e);
+		}
+	    }	  
+	    break;	  
+        }
+        
+        
+        default:
+	    res.type=NC_CHAR;
+	    res.svalue="?????";
+    }    
+    return res;  
+}
+
+// structure for an attribute is:
+//  name  nc_type  nelems  [values ...]
+bool read_item_attr(std::ifstream& ifs, std::string& iname, esncdfCollection& coll)
+{
+    if (!read_item_header(ifs, iname))
+    {
+        return false;
+    }    
+    int len=0;
+    char tag;
+    if (!read_tag(ifs, tag))
+    {
+        return false;
+    }
+    if ((tag<NC_BYTE) || (tag>NC_DOUBLE))	// invalid type
+    {
+        return false;
+    }
+    if (!read_int(ifs, len))
+    {
+        return false;
+    }
+    // for now I'm just going to skip over the values
+    // to do that, I need to know how big each type is
+    int size=0;
+    switch (tag)
+    {
+        case NC_SHORT: size=2; break;
+        case NC_INT: size=4; break;
+        case NC_FLOAT: size=4; break;
+        case NC_DOUBLE: size=8; break;
+        default:
+        size=1;
+    }
+    
+    int skip=len*size;
+    // now we need to skip padding
+    if (len*size%4!=0)
+    {
+        skip+=4-len*size%4;
+    }
+    char buff[skip+1];
+    buff[skip]=0;
+    for (int i=0;i<skip;++i)
+    {
+        buff[i]=getChar(ifs);
+    }
+    if (!ifs.good())
+    {
+        return false;
+    }
+    esncdfValues vs=get_string_value(tag, len, buff);
+    coll.add(iname, vs);    
+    return true;
+}
+
+
+
+
+
+// structure for a variable is:
+// name  nelems  [dimid ...]  vatt_list  nc_type  vsize  begin
+bool read_item_var(std::ifstream& ifs, std::string& iname, bool offset32, esncdfVariables& vars)
+{
+    if (!read_item_header(ifs, iname))
+    {
+        return false;
+    }    
+    int dim=0;
+    if (!read_int(ifs, dim))
+    {
+        return false;
+    }
+    for (int i=0;i<dim;++i)	// just disgarding these at the moment
+    {
+      int v;
+      if (!read_int(ifs, v))
+      {
+        return false;
+      } 
+    }
+    esncdfCollection current;
+    current.name=iname;
+    if (!read_list(ifs, NC_ATT_TAG, offset32, current))
+    {
+        return false;
+    }
+    // now determine the type
+    char tag;
+    if (!read_tag(ifs, tag))
+    {
+        return false;
+    }
+    if ((tag<NC_BYTE) || (tag>NC_DOUBLE))	// invalid type
+    {
+        return false;
+    }
+    switch(tag)
+    {
+    case NC_CHAR: current.type="char"; break;
+    case NC_BYTE: current.type="byte";break;
+    case NC_SHORT: current.type="short";break;
+    case NC_INT: current.type="int";break;
+    case NC_FLOAT: current.type="float";break;
+    case NC_DOUBLE: current.type="double";break;
+    default:
+        current.type="????";
+    }
+    int len;
+    if (!read_int(ifs, len))
+    {
+        return false;
+    }
+    // now we need to get the offset of the variable in the file
+    // which we will promptly discard
+    int gobcount=offset32?4:8;
+    if (!gobble(ifs, gobcount))
+    {
+        return false;
+    }
+    vars.add(current);
+    return true;
+}
+
+// lists<T> are defined as: ABSENT | NC_DIMENSION  nelems  [T ...]
+// where T in {dim, attr, var}
+bool read_list_vars(std::ifstream& ifs, bool offset32, esncdfVariables& coll)
+{
+    char b;
+    // we expect either 8 zeros indicating no list or the expected tag followed
+    // by list information
+    for (int i=0;i<3;++i)
+    {
+        
+        if (!ifs || ((b=getChar(ifs))!=0))
+        {
+            return false;
+        }
+    }
+    b=getChar(ifs);
+    if (!ifs || (b!=0 && b!=NC_VAR_TAG)) // didn't get tag we expected
+    {
+        return false;
+    }
+    if (b==0)   // expecting 4 more zeros
+    {
+        for (int i=0;i<4;++i)
+        {
+            b=getChar(ifs);
+            if (!ifs || b!=0)
+            {
+                return false;
+            }
+        }
+        return true;		// This list is absent
+    }
+    // we must have seen the correct tag
+    // first thing will be number of items
+    int count=0;
+    if (!read_int(ifs, count))
+    {
+        return false;
+    }
+    for (int i=0;i<count;++i)
+    {
+        std::string itemname;
+        if (!read_item_var(ifs, itemname, offset32, coll))
+        {
+            return false;
+        }
+    }
+    return true;
+}
+
+
+
+
+// lists<T> are defined as: ABSENT | NC_DIMENSION  nelems  [T ...]
+// where T in {dim, attr, var}
+bool read_list(std::ifstream& ifs, char t, bool offset32, esncdfCollection& coll)
+{
+    char b;
+    // we expect either 8 zeros indicating no list or the expected tag followed
+    // by list information
+    for (int i=0;i<3;++i)
+    {
+        
+        if (!ifs || ((b=getChar(ifs))!=0))
+        {
+            return false;
+        }
+    }
+    b=getChar(ifs);
+    if (!ifs || (b!=0 && b!=t)) // didn't get tag we expected
+    {
+        return false;
+    }
+    if (b==0)   // expecting 4 more zeros
+    {
+        for (int i=0;i<4;++i)
+        {
+            b=getChar(ifs);
+            if (!ifs || b!=0)
+            {
+                return false;
+            }
+        }
+        return true;		// This list is absent
+    }
+    // we must have seen the correct tag
+    // first thing will be number of items
+    int count=0;
+    if (!read_int(ifs, count))
+    {
+        return false;
+    }
+    if (t==NC_DIM_TAG) 
+    {
+        for (int i=0;i<count;++i)
+        {
+            std::string itemname;
+            if (!read_item_dim(ifs, itemname, coll))
+            {
+                return false;
+            }
+        }
+    }
+    else if (t==NC_ATT_TAG)
+    {
+        for (int i=0;i<count;++i)
+        {
+            std::string itemname;
+            if (!read_item_attr(ifs, itemname, coll))
+            {
+                return false;
+            }
+        }
+    }
+    else
+    {
+        return false;
+    }
+    return true;
+}
+
+bool read_header(const char* fname, esncdfHeader& header)
+{
+    ifstream ifs(fname);
+    if (!ifs)
+    {
+        return false;
+    }
+    gobble(ifs,3);	// skip over "CDF"
+    bool offset32=(getChar(ifs)==1);
+    gobble(ifs, 4);
+    if (!ifs)
+    {
+        return false;
+    }
+    if (!read_list(ifs, NC_DIM_TAG, offset32, header.dimensions))        
+    {
+        return false;
+    }
+    cout << "Dimensions:\n";
+    cout << "Attributes:\n";    
+    if (!read_list(ifs, NC_ATT_TAG, offset32, header.attributes))        
+    {
+        return false;
+    }
+
+    cout << "Variables:\n";    
+    if (!read_list_vars(ifs, offset32, header.variables)) 
+    {
+        return false;
+    }   
+    return true;
+}
+
+void dump_Values(std::ostream& os, const esncdfValues& u)
+{
+    if (u.type==NC_CHAR)
+    {
+        os << u.svalue;
+    }
+    else
+    {
+        for (int i=0;i<u.vec.size();++i)
+	{
+	    switch (u.type)
+	    {
+	    case NC_BYTE: 
+	    {
+		unsigned char x=u.vec[i].b;
+	        os << hex << (unsigned short)(x) << dec << " "; break;
+	    }
+	    case NC_SHORT: os << u.vec[i].s << " "; break;
+	    case NC_INT: os << u.vec[i].i << " "; break;
+	    case NC_FLOAT: os << u.vec[i].f << " "; break;
+	    case NC_DOUBLE: os << u.vec[i].d << " "; break;
+	    default:
+	      os << "????";
+	    }
+	}
+    }
+  
+}
+
+void print_header(const esncdfHeader& h)
+{
+    cout << "Dimensions:\n";
+    for (auto it=h.dimensions.vec.begin();it!=h.dimensions.vec.end();++it)
+    {
+       const esncdfValues& v=it->second;
+       cout << it->first << " = ";
+       dump_Values(cout, v);
+       cout << endl;
+    }
+    cout << "Attributes:\n";
+    for (auto it=h.attributes.vec.begin();it!=h.attributes.vec.end();++it)
+    {
+       const esncdfValues& v=it->second;
+       cout << it->first << " = ";
+       dump_Values(cout, v);
+       cout << endl;
+    }
+    cout << "Variables:\n";
+    for (auto it=h.variables.vars.begin();it!=h.variables.vars.end();++it)
+    {
+       cout << it->type << " " << it->name << ":\n";
+       for (auto jt=it->vec.begin();jt!=it->vec.end();++jt)
+       {
+	  cout << "  " << jt->first << " = ";
+	  const esncdfValues& v=jt->second;
+	  dump_Values(cout, v);
+	  cout << endl;
+       }
+    }
+}
+
+int main(int argc, char** argv)
+{
+    offset=-1;
+    if (argc==1)
+    {
+        std::cerr << "Usage: " << argv[0] << " file.nc\n";
+        return 1;
+    }
+    esncdfHeader header;
+    if (!read_header(argv[1], header))
+    {
+	std::cerr << "Failed\n";
+    }
+    cout << "-------------\n";
+    print_header(header);
+    return 0;
+
+}
diff --git a/tools/overlord/SConscript b/tools/overlord/SConscript
index edbb175..62138f6 100644
--- a/tools/overlord/SConscript
+++ b/tools/overlord/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/tools/overlord/overlord.cpp b/tools/overlord/overlord.cpp
index 74b9e1e..5af0923 100644
--- a/tools/overlord/overlord.cpp
+++ b/tools/overlord/overlord.cpp
@@ -1,6 +1,6 @@
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/tools/testrunner.py b/tools/testrunner.py
index b0c1ee6..685661a 100644
--- a/tools/testrunner.py
+++ b/tools/testrunner.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/tools/trconfcmp.cc b/tools/trconfcmp.cc
new file mode 100644
index 0000000..e04ba77
--- /dev/null
+++ b/tools/trconfcmp.cc
@@ -0,0 +1,167 @@
+
+
+#include <map>
+#include <string>
+#include <fstream>
+#include <iostream>
+#include <set>
+#include <algorithm>
+#include <vector>
+#include <cctype>
+
+using namespace std;
+
+class rec{
+public:    
+    string name;
+    string type;
+    string value;
+    bool operator==(const rec& r1) const {
+        return r1.name==this->name;
+    }
+    bool operator<(const rec& r1) const {
+        return r1.name<this->name;
+    }
+    
+    friend ostream& operator<<(ostream& os, const rec& r);
+
+};
+
+ostream& operator<<(ostream& os, const rec& r) {
+    os << '[' << r.name << '|' << r.type << "](" << r.value << ")" << endl;
+    return os;    
+}
+
+
+
+auto loadmap(ifstream& ifs) {
+    string line;
+    set<rec> res;
+    while(getline(ifs, line), ifs.good()) {
+        auto pos=line.find("-D");
+        if (pos==string::npos) {
+            continue;
+        }
+        while (pos+2<line.size() && (line[pos+2]==' ')) {
+            pos++;
+        }
+        pos+=2;
+        auto tpos=line.find(':', pos);
+        auto eqpos=line.find('=', pos);
+        auto end=line.find_last_of('\\');
+        if (eqpos==string::npos) {
+            continue;
+        }
+        if (end==string::npos) {
+            end=line.size()-1;
+        } else {
+            end-=1; // move back from the backslash
+        }
+        while (isspace(line[end])) {
+            end--;
+        }
+        rec r;
+        r.value=line.substr(eqpos+1, end-eqpos);
+        if (tpos!=string::npos) {
+            r.type=line.substr(tpos+1, eqpos-tpos-1);
+        } else {
+            tpos=eqpos;     // type is missing so we pretend = and : coincide
+        }
+        r.name=line.substr(pos,tpos-pos);
+        res.insert(r);
+        //cout << r.name << ' ' << r.type << " " << r.value << endl;
+    }
+    return res;
+}
+
+
+int main(int argc, char** argv) {
+    if (argc!=3) {
+        cerr << argv[0] << " file1 file2\n";
+        return 1;
+    }
+    string line;
+    ifstream f1(argv[1]);
+    ifstream f2(argv[2]);
+    if (!f1 || !f2) {
+        cerr << "Can't open file\n";
+        return 2;
+    }
+    set<rec> r1=loadmap(f1);
+    set<rec> r2=loadmap(f2);
+
+    vector<rec> all;
+    vector<rec> only_left;
+    vector<rec> only_right;
+    vector<pair<rec,rec>> diff_types;
+    vector<pair<rec,rec>> diff_values;
+    all.reserve(r1.size()+r2.size());
+    set_union(r1.begin(), r1.end(), r2.begin(), r2.end(), inserter(all, all.begin()));
+    
+    for (auto it=all.begin();it!=all.end();++it) {
+        const rec* lhs=0;
+        const rec* rhs=0;
+        for (auto il=r1.begin();il!=r1.end();++il) {
+            if (il->name==it->name) {
+                lhs=&(*il);
+            }
+        }
+        for (auto il=r2.begin();il!=r2.end();++il) {
+            if (il->name==it->name) {
+                rhs=&(*il);
+            }
+        }
+        if (rhs==0) {
+            only_left.push_back(*lhs);
+        } else if (lhs==0) {
+            only_right.push_back(*rhs);
+        } else if (lhs->value!=rhs->value) {
+            diff_values.push_back(pair<rec,rec>(*lhs, *rhs));
+        } else if (lhs->type!=rhs->type) {
+            diff_types.push_back(pair<rec,rec>(*lhs, *rhs));            
+        } else {
+        }
+    }
+    if (!only_left.empty())
+    {
+        cout << "Only in LHS:\n";
+        for (auto it=only_left.begin();it!=only_left.end();++it) {
+            cout << "    -D" << it->name;
+            if (!it->type.empty()) {
+                cout << ':' << it->type;
+            }
+            cout << '=' << it->value << " \\\n";
+        }
+    }
+    if (!only_right.empty())
+    {
+        cout << "Only in RHS:\n";
+        for (auto it=only_right.begin();it!=only_right.end();++it) {
+            cout << "    -D" << it->name;
+            if (!it->type.empty()) {
+                cout << ':' << '{' << it->type << '}';
+            }
+            cout << '=' << it->value << " \\\n";
+        }
+    }
+    if (!diff_values.empty())
+    {
+        cout << "Different values:\n";
+        for (auto it=diff_values.begin();it!=diff_values.end();++it) {
+            cout << "    " << it->first.name;
+            if (!it->first.type.empty()) {
+                cout << ':' << it->first.type;
+            } else if (!it->second.type.empty()) {
+                cout << ':' << it->second.type;                
+            }
+            cout << " LHS=" << it->first.value << " RHS=" << it->second.value << endl;
+        }
+    }
+    if (!diff_types.empty()) {
+        cout << "Different types:\n";
+        for (auto it=diff_types.begin();it!=diff_types.end();++it) {
+            cout << "    " << it->first.name;
+            cout << " LHS=" << it->first.type << " RHS=" << it->second.type << endl;
+        }
+    }
+}
diff --git a/trilinoswrap/SConscript b/trilinoswrap/SConscript
index 8c11dc7..3f16d91 100644
--- a/trilinoswrap/SConscript
+++ b/trilinoswrap/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/trilinoswrap/src/Amesos2Wrapper.cpp b/trilinoswrap/src/Amesos2Wrapper.cpp
index a28faad..c582397 100644
--- a/trilinoswrap/src/Amesos2Wrapper.cpp
+++ b/trilinoswrap/src/Amesos2Wrapper.cpp
@@ -115,7 +115,11 @@ RCP<DirectSolverType<Matrix,Vector> > createDirectSolver(
             Amesos2::query("superlumt")) {
         solver = Amesos2::create<Matrix, Vector>("superlumt", A, X, B);
         Teuchos::ParameterList solverParams(solver->name());
+#ifdef _OPENMP  
         solverParams.set("nprocs", omp_get_max_threads());
+#else
+        solverParams.set("nprocs", 1);
+#endif
         solverParams.set("DiagPivotThresh", sb.getDiagonalDominanceThreshold());
         solverParams.set("SymmetricMode", sb.isSymmetric());
         extractParamIfSet<int>("nprocs", pyParams, solverParams);
diff --git a/trilinoswrap/src/CrsMatrixWrapper.cpp b/trilinoswrap/src/CrsMatrixWrapper.cpp
index e653463..44d9d6c 100644
--- a/trilinoswrap/src/CrsMatrixWrapper.cpp
+++ b/trilinoswrap/src/CrsMatrixWrapper.cpp
@@ -242,7 +242,7 @@ void CrsMatrixWrapper<ST>::nullifyRowsAndCols(
         for (size_t c = 0; c < indices.size(); c++) {
             const LO lclcol = indices[c];
             const GO col = mat.getColMap()->getGlobalElement(lclcol);
-            if (rowMask[lclrow] != 0. || colMask[lclcol] != 0.) {
+            if (rowMask[lclrow] > 0. || colMask[lclcol] > 0.) {
                 cols.push_back(lclcol);
                 vals.push_back(row==col ? mdv : zero);
             }
diff --git a/trilinoswrap/src/SConscript b/trilinoswrap/src/SConscript
index bb7bb3f..16bb1c7 100644
--- a/trilinoswrap/src/SConscript
+++ b/trilinoswrap/src/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/trilinoswrap/src/TrilinosAdapterException.h b/trilinoswrap/src/TrilinosAdapterException.h
index 1f435f5..d2cf6e0 100644
--- a/trilinoswrap/src/TrilinosAdapterException.h
+++ b/trilinoswrap/src/TrilinosAdapterException.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/SConscript b/weipa/SConscript
index 5963dad..f456b41 100644
--- a/weipa/SConscript
+++ b/weipa/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/weipa/py_src/SConscript b/weipa/py_src/SConscript
index 6c9329f..4c6973c 100644
--- a/weipa/py_src/SConscript
+++ b/weipa/py_src/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/weipa/py_src/__init__.py b/weipa/py_src/__init__.py
index a65b8b7..66ccc90 100644
--- a/weipa/py_src/__init__.py
+++ b/weipa/py_src/__init__.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/weipa/src/DataVar.cpp b/weipa/src/DataVar.cpp
index 1656bfb..aeb18eb 100644
--- a/weipa/src/DataVar.cpp
+++ b/weipa/src/DataVar.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -23,7 +23,13 @@
 #endif
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
 #ifdef ESYS_HAVE_SILO
@@ -32,10 +38,15 @@
 
 #include <numeric> // for accumulate
 #include <iostream> // for cerr
+#include <sstream>
 #include <stdio.h>
 
 using namespace std;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace weipa {
     
 //
@@ -217,6 +228,110 @@ bool DataVar::initFromMeshData(const_DomainChunk_ptr dom, const IntVec& data,
 //
 // Reads variable data from dump file
 //
+#ifdef NETCDF4
+bool DataVar::initFromFile(const string& filename, const_DomainChunk_ptr dom)
+{
+    cleanup();
+    
+#if ESYS_HAVE_NETCDF
+
+    NcFile input;
+    if (!openNcFile(input, filename))
+    {
+        cerr << "Could not open input file " << filename << "." << endl;
+        return false;
+    }      
+
+    NcDim dim;
+    NcGroupAtt att;
+
+    att = input.getAtt("type_id");
+    int typeID;
+    att.getValues(&typeID);
+    if (typeID != 2) {
+        cerr << "WARNING: Only expanded data supported!" << endl;
+        return false;
+    }
+
+    att = input.getAtt("rank");
+    att.getValues(&rank);
+
+    dim = input.getDim("num_data_points_per_sample");
+    ptsPerSample = dim.getSize();
+
+    att = input.getAtt("function_space_type");
+    att.getValues(&funcSpace);
+
+    centering = dom->getCenteringForFunctionSpace(funcSpace);
+
+    dim = input.getDim("num_samples");
+    numSamples = dim.getSize();
+
+#ifdef _DEBUG
+    cout << varName << ":\t" << numSamples << " samples,  "
+        << ptsPerSample << " pts/s,  rank: " << rank << endl;
+#endif
+
+    domain = dom;
+    NodeData_ptr nodes = domain->getMeshForFunctionSpace(funcSpace);
+    if (nodes == NULL) {
+        return false;
+    }
+
+    meshName = nodes->getName();
+    siloMeshName = nodes->getFullSiloName();
+    initialized = true;
+
+    size_t dimSize = 1;
+    vector<long> counts;
+
+    if (rank > 0) {
+        dim = input.getDim("d0");
+        int d = dim.getSize();
+        shape.push_back(d);
+        counts.push_back(d);
+        dimSize *= d;
+    }
+    if (rank > 1) {
+        dim = input.getDim("d1");
+        int d = dim.getSize();
+        shape.push_back(d);
+        counts.push_back(d);
+        dimSize *= d;
+    }
+    if (rank > 2) {
+        cerr << "WARNING: Rank " << rank << " data is not supported!\n";
+        initialized = false;
+    }
+ 
+    if (initialized && numSamples > 0) {
+        sampleID.insert(sampleID.end(), numSamples, 0);
+        NcVar var = input.getVar("id");
+        var.getVar(&sampleID[0]);   // numSamples
+
+        size_t dataSize = dimSize*numSamples*ptsPerSample;
+        counts.push_back(ptsPerSample);
+        counts.push_back(numSamples);
+        float* tempData = new float[dataSize];
+        var = input.getVar("data");
+        var.getVar(tempData);   // &counts[0]
+
+        const float* srcPtr = tempData;
+        for (size_t i=0; i < dimSize; i++, srcPtr++) {
+            float* c = averageData(srcPtr, dimSize);
+            dataArray.push_back(c);
+        }
+        delete[] tempData;
+
+        initialized = reorderSamples();
+    }
+#endif // ESYS_HAVE_NETCDF
+
+    return initialized;
+}
+
+#else
+
 bool DataVar::initFromFile(const string& filename, const_DomainChunk_ptr dom)
 {
     cleanup();
@@ -320,6 +435,7 @@ bool DataVar::initFromFile(const string& filename, const_DomainChunk_ptr dom)
 
     return initialized;
 }
+#endif
 
 //
 // Returns true if the data values are nodal, false if they are zonal.
diff --git a/weipa/src/DataVar.h b/weipa/src/DataVar.h
index e795cd8..4c1e80e 100644
--- a/weipa/src/DataVar.h
+++ b/weipa/src/DataVar.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -21,7 +21,7 @@
 #include <ostream>
 
 class DBfile;
-class NcFile;
+//class NcFile;
 
 namespace escript {
     class Data;
diff --git a/weipa/src/DomainChunk.h b/weipa/src/DomainChunk.h
index 35d9ceb..5944285 100644
--- a/weipa/src/DomainChunk.h
+++ b/weipa/src/DomainChunk.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/ElementData.h b/weipa/src/ElementData.h
index aaa724a..eae45be 100644
--- a/weipa/src/ElementData.h
+++ b/weipa/src/ElementData.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/EscriptDataset.cpp b/weipa/src/EscriptDataset.cpp
index f779ebc..9ad7d03 100644
--- a/weipa/src/EscriptDataset.cpp
+++ b/weipa/src/EscriptDataset.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/EscriptDataset.h b/weipa/src/EscriptDataset.h
index 246787f..fad7531 100644
--- a/weipa/src/EscriptDataset.h
+++ b/weipa/src/EscriptDataset.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/FinleyDomain.cpp b/weipa/src/FinleyDomain.cpp
index 4cab673..60bd885 100644
--- a/weipa/src/FinleyDomain.cpp
+++ b/weipa/src/FinleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -29,8 +29,15 @@
 
 #include <iostream>
 
-#if ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+
+#ifdef ESYS_HAVE_NETCDF
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncDim.h>
+  #include <escript/NCHelper.h>
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
 #ifdef ESYS_HAVE_SILO
@@ -38,6 +45,9 @@
 #endif
 
 using namespace std;
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
 
 namespace weipa {
 
@@ -136,6 +146,40 @@ bool FinleyDomain::initFromEscript(const escript::AbstractDomain* escriptDomain)
 //
 // Reads mesh and element data from NetCDF file with given name
 //
+#ifdef NETCDF4
+
+bool FinleyDomain::initFromFile(const string& filename)
+{
+    cleanup();
+
+#if ESYS_HAVE_NETCDF
+    NcFile input;
+    if (!openNcFile(input, filename))
+    {
+        cerr << "Could not open input file " << filename << "." << endl;
+        return false;
+    }     
+
+    nodes = FinleyNodes_ptr(new FinleyNodes("Elements"));
+    if (!nodes->readFromNc(input))
+        return false;
+
+    // Read all element types
+    cells = FinleyElements_ptr(new FinleyElements("Elements", nodes));
+    cells->readFromNc(input);
+    faces = FinleyElements_ptr(new FinleyElements("FaceElements", nodes));
+    faces->readFromNc(input);
+    contacts = FinleyElements_ptr(new FinleyElements("ContactElements", nodes));
+    contacts->readFromNc(input);
+
+    initialized = true;
+#endif
+
+    return initialized;
+}
+
+#else
+
 bool FinleyDomain::initFromFile(const string& filename)
 {
     cleanup();
@@ -169,6 +213,7 @@ bool FinleyDomain::initFromFile(const string& filename)
 
     return initialized;
 }
+#endif
 
 Centering FinleyDomain::getCenteringForFunctionSpace(int fsCode) const
 {
diff --git a/weipa/src/FinleyDomain.h b/weipa/src/FinleyDomain.h
index f405080..0f1c11d 100644
--- a/weipa/src/FinleyDomain.h
+++ b/weipa/src/FinleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/FinleyElements.cpp b/weipa/src/FinleyElements.cpp
index 5841084..388a055 100644
--- a/weipa/src/FinleyElements.cpp
+++ b/weipa/src/FinleyElements.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -31,13 +31,24 @@
 #include <iostream>
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncAtt.h>
+  #include <escript/NCHelper.h>
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
+
 #ifdef ESYS_HAVE_SILO
 #include <silo.h>
 #endif
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 
 using namespace std;
 
@@ -260,6 +271,114 @@ bool FinleyElements::initFromFinley(const finley::ElementFile* finleyFile)
 //
 // Reads element data from given NetCDF file
 //
+#ifdef NETCDF4
+
+bool FinleyElements::readFromNc(netCDF::NcFile& ncfile)
+{
+#if ESYS_HAVE_NETCDF
+    string num_str("num_");
+    num_str += name;
+
+    NcGroupAtt att = ncfile.getAtt(num_str.c_str());
+    att.getValues(&numElements);
+
+    // Only attempt to read further if there are any elements.
+    // Having no elements is not an error.
+    if (numElements > 0) {
+        att = ncfile.getAtt((num_str + string("_numNodes")).c_str());
+        att.getValues(&nodesPerElement);
+
+        nodes.insert(nodes.end(), numElements*nodesPerElement, 0);
+        NcVar var = ncfile.getVar((name + string("_Nodes")).c_str());
+        var.getVar(&nodes[0]);  // numElements, nodesPerElement
+
+        color.insert(color.end(), numElements, 0);
+        var = ncfile.getVar((name + string("_Color")).c_str());
+        var.getVar(&color[0]);  // numElements
+
+        ID.insert(ID.end(), numElements, 0);
+        var = ncfile.getVar((name + string("_Id")).c_str());
+        var.getVar(&ID[0]); // numElements
+
+        owner.insert(owner.end(), numElements, 0);
+        var = ncfile.getVar((name + string("_Owner")).c_str());
+        var.getVar(&owner[0]);  // numElements
+
+        tag.insert(tag.end(), numElements, 0);
+        var = ncfile.getVar((name + string("_Tag")).c_str());
+        var.getVar(&tag[0]);    // numElements
+
+        att = ncfile.getAtt((name + string("_TypeId")).c_str());
+        int temp;
+        att.getValues(&temp);
+        finleyTypeId = (finley::ElementTypeId)temp;
+        FinleyElementInfo f = getFinleyTypeInfo(finleyTypeId);
+        type = f.elementType;
+        elementFactor = f.elementFactor;
+        if (f.elementFactor > 1 || f.reducedElementSize != nodesPerElement)
+            buildReducedElements(f);
+
+        // if we don't link with finley we can't get the quadrature nodes
+        // and hence cannot interpolate data properly
+#if not defined VISIT_PLUGIN && defined USE_FINLEY
+        if (f.useQuadNodes) {
+            att = ncfile.getAtt("order");
+            int order;
+            att.getValues(&order);
+            att = ncfile.getAtt("reduced_order");
+            int reduced_order;
+            att.getValues(&reduced_order);
+            finley::const_ReferenceElementSet_ptr refElements(
+                    new finley::ReferenceElementSet(finleyTypeId, order,
+                        reduced_order));
+
+            CoordArray quadNodes;
+            int numQuadNodes;
+            finley::const_ShapeFunction_ptr sf = refElements->referenceElement
+                ->Parametrization;
+            numQuadNodes = sf->numQuadNodes;
+            for (int i=0; i<f.quadDim; i++) {
+                const double* srcPtr = &sf->QuadNodes[i];
+                float* c = new float[numQuadNodes];
+                quadNodes.push_back(c);
+                for (int j=0; j<numQuadNodes; j++, srcPtr+=f.quadDim) {
+                    *c++ = (float) *srcPtr;
+                }
+            }
+            quadMask = buildQuadMask(quadNodes, numQuadNodes);
+            for (int i=0; i<f.quadDim; i++)
+                delete[] quadNodes[i];
+            quadNodes.clear();
+
+            // now the reduced quadrature
+            sf = refElements->referenceElementReducedQuadrature->Parametrization;
+            numQuadNodes = sf->numQuadNodes;
+            for (int i=0; i<f.quadDim; i++) {
+                const double* srcPtr = &sf->QuadNodes[i];
+                float* c = new float[numQuadNodes];
+                quadNodes.push_back(c);
+                for (int j=0; j<numQuadNodes; j++, srcPtr+=f.quadDim) {
+                    *c++ = (float) *srcPtr;
+                }
+            }
+            reducedQuadMask = buildQuadMask(quadNodes, numQuadNodes);
+            for (int i=0; i<f.quadDim; i++)
+                delete[] quadNodes[i];
+            quadNodes.clear();
+        }
+#endif // VISIT_PLUGIN,USE_FINLEY
+
+        buildMeshes();
+    }
+
+    return true;
+#else // !ESYS_HAVE_NETCDF
+    return false;
+#endif
+}
+
+#else
+
 bool FinleyElements::readFromNc(NcFile* ncfile)
 {
 #if ESYS_HAVE_NETCDF
@@ -359,6 +478,7 @@ bool FinleyElements::readFromNc(NcFile* ncfile)
     return false;
 #endif
 }
+#endif
 
 //
 //
diff --git a/weipa/src/FinleyElements.h b/weipa/src/FinleyElements.h
index 1dbc135..0fd1d50 100644
--- a/weipa/src/FinleyElements.h
+++ b/weipa/src/FinleyElements.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -29,7 +29,14 @@
 #endif
 
 class DBfile;
-class NcFile;
+
+#ifdef NETCDF4
+#include <ncFile.h>
+#define NCFTYPE netCDF::NcFile&
+#else
+class NcFile;  
+#define NCFTYPE NcFile*
+#endif
 
 namespace dudley {
     class ElementFile;
@@ -85,7 +92,7 @@ public:
     bool initFromFinley(const finley::ElementFile* finleyFile);
 
     /// \brief Reads element data from escript/finley NetCDF file.
-    bool readFromNc(NcFile* ncfile);
+    bool readFromNc(NCFTYPE ncfile);
 
     /// \brief Moves "ghost" elements (whose owner does not match ownIndex)
     ///        and the corresponding data to the end of the arrays.
@@ -186,5 +193,6 @@ private:
 
 } // namespace weipa
 
+#undef NCFTYPE
 #endif // __WEIPA_FINLEYELEMENTS_H__
 
diff --git a/weipa/src/FinleyNodes.cpp b/weipa/src/FinleyNodes.cpp
index e5eebf7..6ba7051 100644
--- a/weipa/src/FinleyNodes.cpp
+++ b/weipa/src/FinleyNodes.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -27,7 +27,13 @@ using escript::DataTypes::index_t;
 #endif // VISIT_PLUGIN
 
 #ifdef ESYS_HAVE_NETCDF
-#include <netcdfcpp.h>
+ #ifdef NETCDF4
+  #include <ncVar.h>
+  #include <ncAtt.h>
+  #include <escript/NCHelper.h>
+ #else
+   #include <netcdfcpp.h>
+ #endif
 #endif
 
 #ifdef ESYS_HAVE_SILO
@@ -36,6 +42,10 @@ using escript::DataTypes::index_t;
 
 using namespace std;
 
+#ifdef NETCDF4
+using namespace netCDF;
+#endif
+
 namespace weipa {
 
 //
@@ -224,6 +234,88 @@ bool FinleyNodes::initFromFinley(const finley::NodeFile* finleyFile)
 //
 //
 //
+
+#ifdef NETCDF4
+
+bool FinleyNodes::readFromNc(netCDF::NcFile& ncFile)
+{
+#if ESYS_HAVE_NETCDF
+    NcGroupAtt att;
+    NcVar var;
+ 
+    att = ncFile.getAtt("numDim");
+    att.getValues(&numDims);
+
+    att = ncFile.getAtt("numNodes");
+    att.getValues(&numNodes);
+
+    att = ncFile.getAtt("mpi_size");
+    int mpisize;
+    att.getValues(&mpisize);
+
+    nodeDist.clear();
+    nodeDist.insert(nodeDist.end(), mpisize+1, 0);
+    var = ncFile.getVar("Nodes_NodeDistribution");
+    var.getVar(&nodeDist[0]);    // mpisize+1
+
+    CoordArray::iterator it;
+    for (it = coords.begin(); it != coords.end(); it++)
+        delete[] *it;
+    coords.clear();
+    nodeID.clear();
+    nodeTag.clear();
+    nodeGDOF.clear();
+    nodeGNI.clear();
+    nodeGRDFI.clear();
+    nodeGRNI.clear();
+
+    // Only attempt to read further if there are any nodes.
+    // Having no nodes is not an error.
+    if (numNodes > 0) {
+        var = ncFile.getVar("Nodes_Coordinates");
+        for (int i=0; i<numDims; i++) {
+            float* c = new float[numNodes];
+            std::vector<size_t> v;
+            v.push_back(0);
+            v.push_back(i);
+            //var->set_cur(0, i);
+            //var->get(c, numNodes, 1);
+            var.getVar(v, c);
+            coords.push_back(c);
+        }
+
+        nodeID.insert(nodeID.end(), numNodes, 0);
+        var = ncFile.getVar("Nodes_Id");
+        var.getVar(&nodeID[0]);  // numNodes
+
+        nodeTag.insert(nodeTag.end(), numNodes, 0);
+        var = ncFile.getVar("Nodes_Tag");
+        var.getVar(&nodeTag[0]);    // numNodes
+
+        nodeGDOF.insert(nodeGDOF.end(), numNodes, 0);
+        var = ncFile.getVar("Nodes_gDOF");
+        var.getVar(&nodeGDOF[0]);   // numNodes
+
+        nodeGNI.insert(nodeGNI.end(), numNodes, 0);
+        var = ncFile.getVar("Nodes_gNI");
+        var.getVar(&nodeGNI[0]);    // numNodes
+
+        nodeGRDFI.insert(nodeGRDFI.end(), numNodes, 0);
+        var = ncFile.getVar("Nodes_grDfI");
+        var.getVar(&nodeGRDFI[0]);  // numNodes
+
+        nodeGRNI.insert(nodeGRNI.end(), numNodes, 0);
+        var = ncFile.getVar("Nodes_grNI");
+        var.getVar(&nodeGRNI[0]);   // numNodes
+    }
+
+    return true;
+#else // !ESYS_HAVE_NETCDF
+    return false;
+#endif
+}
+#else
+
 bool FinleyNodes::readFromNc(NcFile* ncFile)
 {
 #if ESYS_HAVE_NETCDF
@@ -297,6 +389,7 @@ bool FinleyNodes::readFromNc(NcFile* ncFile)
 #endif
 }
 
+#endif
 //
 //
 //
diff --git a/weipa/src/FinleyNodes.h b/weipa/src/FinleyNodes.h
index 471429a..05b514b 100644
--- a/weipa/src/FinleyNodes.h
+++ b/weipa/src/FinleyNodes.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
@@ -20,7 +20,15 @@
 #include <weipa/NodeData.h>
 
 class DBfile;
-class NcFile;
+
+#ifdef NETCDF4
+#include <ncFile.h>
+#define NCFTYPE netCDF::NcFile&
+
+#else
+class NcFile;  
+#define NCFTYPE NcFile*
+#endif
 
 namespace finley {
     class NodeFile;
@@ -61,7 +69,7 @@ public:
     bool initFromFinley(const finley::NodeFile* finleyFile);
 
     /// \brief Reads node data from a NetCDF file.
-    bool readFromNc(NcFile* ncFile);
+    bool readFromNc(NCFTYPE ncFile);
 
     /// \brief Writes node data to a Silo file.
     bool writeToSilo(DBfile* dbfile);
@@ -130,5 +138,6 @@ inline std::string FinleyNodes::getFullSiloName() const
 
 } // namespace weipa
 
+#undef NCFTYPE
 #endif // __WEIPA_FINLEYNODES_H__
 
diff --git a/weipa/src/NodeData.h b/weipa/src/NodeData.h
index 9036b7e..5798efd 100644
--- a/weipa/src/NodeData.h
+++ b/weipa/src/NodeData.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/RipleyDomain.cpp b/weipa/src/RipleyDomain.cpp
index bd427b4..d03290a 100644
--- a/weipa/src/RipleyDomain.cpp
+++ b/weipa/src/RipleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/RipleyDomain.h b/weipa/src/RipleyDomain.h
index a20ef08..d18dbd1 100644
--- a/weipa/src/RipleyDomain.h
+++ b/weipa/src/RipleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/RipleyElements.cpp b/weipa/src/RipleyElements.cpp
index 30ef475..99c847b 100644
--- a/weipa/src/RipleyElements.cpp
+++ b/weipa/src/RipleyElements.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/RipleyElements.h b/weipa/src/RipleyElements.h
index b0d8f3c..38b76d6 100644
--- a/weipa/src/RipleyElements.h
+++ b/weipa/src/RipleyElements.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/RipleyNodes.cpp b/weipa/src/RipleyNodes.cpp
index bf81813..4515de4 100644
--- a/weipa/src/RipleyNodes.cpp
+++ b/weipa/src/RipleyNodes.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/RipleyNodes.h b/weipa/src/RipleyNodes.h
index e01d189..0542fef 100644
--- a/weipa/src/RipleyNodes.h
+++ b/weipa/src/RipleyNodes.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/SConscript b/weipa/src/SConscript
index 8f63010..34f0821 100644
--- a/weipa/src/SConscript
+++ b/weipa/src/SConscript
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/weipa/src/SpeckleyDomain.cpp b/weipa/src/SpeckleyDomain.cpp
index bc2c7fc..0775c03 100644
--- a/weipa/src/SpeckleyDomain.cpp
+++ b/weipa/src/SpeckleyDomain.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/SpeckleyDomain.h b/weipa/src/SpeckleyDomain.h
index d7a1222..b4cc8fa 100644
--- a/weipa/src/SpeckleyDomain.h
+++ b/weipa/src/SpeckleyDomain.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/SpeckleyElements.cpp b/weipa/src/SpeckleyElements.cpp
index 201a772..affd25a 100644
--- a/weipa/src/SpeckleyElements.cpp
+++ b/weipa/src/SpeckleyElements.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/SpeckleyElements.h b/weipa/src/SpeckleyElements.h
index d828408..6722e92 100644
--- a/weipa/src/SpeckleyElements.h
+++ b/weipa/src/SpeckleyElements.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/SpeckleyNodes.cpp b/weipa/src/SpeckleyNodes.cpp
index e3bc644..275d050 100644
--- a/weipa/src/SpeckleyNodes.cpp
+++ b/weipa/src/SpeckleyNodes.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/SpeckleyNodes.h b/weipa/src/SpeckleyNodes.h
index b97f622..eb39e6a 100644
--- a/weipa/src/SpeckleyNodes.h
+++ b/weipa/src/SpeckleyNodes.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/VisItControl.cpp b/weipa/src/VisItControl.cpp
index a87021e..e05a93c 100644
--- a/weipa/src/VisItControl.cpp
+++ b/weipa/src/VisItControl.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/VisItControl.h b/weipa/src/VisItControl.h
index 6eac8ec..b828473 100644
--- a/weipa/src/VisItControl.h
+++ b/weipa/src/VisItControl.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/VisItData.cpp b/weipa/src/VisItData.cpp
index 780f69d..979fbfc 100644
--- a/weipa/src/VisItData.cpp
+++ b/weipa/src/VisItData.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/VisItData.h b/weipa/src/VisItData.h
index 944646c..d5b93b0 100644
--- a/weipa/src/VisItData.h
+++ b/weipa/src/VisItData.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/weipa.h b/weipa/src/weipa.h
index 5bee4c9..96a9f3a 100644
--- a/weipa/src/weipa.h
+++ b/weipa/src/weipa.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/src/weipacpp.cpp b/weipa/src/weipacpp.cpp
index 80ff3a3..e7b45da 100644
--- a/weipa/src/weipacpp.cpp
+++ b/weipa/src/weipacpp.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/test/EscriptDatasetTestCase.cpp b/weipa/test/EscriptDatasetTestCase.cpp
index ea72276..8499f45 100644
--- a/weipa/test/EscriptDatasetTestCase.cpp
+++ b/weipa/test/EscriptDatasetTestCase.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/test/EscriptDatasetTestCase.h b/weipa/test/EscriptDatasetTestCase.h
index 4b2b540..f432523 100644
--- a/weipa/test/EscriptDatasetTestCase.h
+++ b/weipa/test/EscriptDatasetTestCase.h
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia
diff --git a/weipa/test/SConscript b/weipa/test/SConscript
index b91ccf1..df30a47 100644
--- a/weipa/test/SConscript
+++ b/weipa/test/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/weipa/test/python/SConscript b/weipa/test/python/SConscript
index bb457d8..9bb74f5 100644
--- a/weipa/test/python/SConscript
+++ b/weipa/test/python/SConscript
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
diff --git a/weipa/test/python/run_savesilo_tests.py b/weipa/test/python/run_savesilo_tests.py
index f10ffc2..0500a31 100644
--- a/weipa/test/python/run_savesilo_tests.py
+++ b/weipa/test/python/run_savesilo_tests.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/weipa/test/python/run_savevtk_tests.py b/weipa/test/python/run_savevtk_tests.py
index 505e175..7bd822b 100644
--- a/weipa/test/python/run_savevtk_tests.py
+++ b/weipa/test/python/run_savevtk_tests.py
@@ -1,7 +1,7 @@
 
 ##############################################################################
 #
-# Copyright (c) 2003-2016 by The University of Queensland
+# Copyright (c) 2003-2017 by The University of Queensland
 # http://www.uq.edu.au
 #
 # Primary Business: Queensland, Australia
@@ -16,7 +16,7 @@
 
 from __future__ import print_function, division
 
-__copyright__="""Copyright (c) 2003-2016 by The University of Queensland
+__copyright__="""Copyright (c) 2003-2017 by The University of Queensland
 http://www.uq.edu.au
 Primary Business: Queensland, Australia"""
 __license__="""Licensed under the Apache License, version 2.0
diff --git a/weipa/test/weipa_UnitTest.cpp b/weipa/test/weipa_UnitTest.cpp
index 2f5ca9b..ed3d0d0 100644
--- a/weipa/test/weipa_UnitTest.cpp
+++ b/weipa/test/weipa_UnitTest.cpp
@@ -1,7 +1,7 @@
 
 /*****************************************************************************
 *
-* Copyright (c) 2003-2016 by The University of Queensland
+* Copyright (c) 2003-2017 by The University of Queensland
 * http://www.uq.edu.au
 *
 * Primary Business: Queensland, Australia

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-escript.git



More information about the debian-science-commits mailing list